From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- js/src/jit-test/tests/1659595.js | 70 + js/src/jit-test/tests/Set/NaN-as-key.js | 40 + js/src/jit-test/tests/Set/bug1729269.js | 19 + .../tests/Set/forEach-selfhosted-behavior.js | 36 + js/src/jit-test/tests/Set/getter-name.js | 3 + js/src/jit-test/tests/Set/iterator-thisv-error.js | 19 + js/src/jit-test/tests/Set/non-iterable-error.js | 7 + js/src/jit-test/tests/Set/symbols.js | 26 + js/src/jit-test/tests/arguments/access-formals.js | 44 + .../tests/arguments/alias-function-closed.js | 167 + .../tests/arguments/alias-function-not-closed.js | 87 + .../jit-test/tests/arguments/apply-args-obj-01.js | 18 + .../jit-test/tests/arguments/apply-args-obj-02.js | 16 + .../jit-test/tests/arguments/apply-args-obj-03.js | 20 + .../jit-test/tests/arguments/apply-args-obj-04.js | 21 + .../apply-closed-over-arguments-strict.js | 15 + .../tests/arguments/apply-closed-over-arguments.js | 14 + .../tests/arguments/apply-redefine-length.js | 18 + js/src/jit-test/tests/arguments/args-attributes.js | 75 + .../jit-test/tests/arguments/args-createontrace.js | 18 + js/src/jit-test/tests/arguments/args-exists-own.js | 109 + js/src/jit-test/tests/arguments/args-exists.js | 109 + js/src/jit-test/tests/arguments/args-mochi-2.js | 23 + js/src/jit-test/tests/arguments/args-mochi-2a.js | 23 + js/src/jit-test/tests/arguments/args-mochi.js | 17 + .../tests/arguments/args-mutate-length-1.js | 16 + .../tests/arguments/args-mutate-length-2.js | 15 + .../tests/arguments/args-mutate-proto-1.js | 15 + .../tests/arguments/args-mutate-proto-2.js | 16 + .../tests/arguments/args-mutate-proto-3.js | 15 + .../tests/arguments/args-mutate-proto-4.js | 13 + js/src/jit-test/tests/arguments/args-range-2.js | 37 + .../jit-test/tests/arguments/args-range-const.js | 14 + js/src/jit-test/tests/arguments/args-range.js | 18 + .../tests/arguments/args-redefine-iterator-1.js | 14 + .../tests/arguments/args-redefine-iterator-2.js | 14 + .../tests/arguments/args-redefine-length-1.js | 7 + .../tests/arguments/args-redefine-length-2.js | 8 + .../tests/arguments/args-redefine-length-3.js | 14 + .../tests/arguments/args-redefine-length-4.js | 14 + .../tests/arguments/args-redefine-length-5.js | 14 + .../tests/arguments/args-redefine-length-6.js | 14 + .../tests/arguments/args-redefine-length-7.js | 14 + js/src/jit-test/tests/arguments/args-sum.js | 16 + js/src/jit-test/tests/arguments/args-vargc.js | 18 + js/src/jit-test/tests/arguments/args1.js | 15 + js/src/jit-test/tests/arguments/args10.js | 16 + js/src/jit-test/tests/arguments/args11.js | 14 + js/src/jit-test/tests/arguments/args2.js | 20 + js/src/jit-test/tests/arguments/args2a.js | 17 + js/src/jit-test/tests/arguments/args2b.js | 17 + js/src/jit-test/tests/arguments/args2c.js | 19 + js/src/jit-test/tests/arguments/args2d.js | 17 + js/src/jit-test/tests/arguments/args3.js | 20 + js/src/jit-test/tests/arguments/args4.js | 21 + js/src/jit-test/tests/arguments/args5.js | 24 + js/src/jit-test/tests/arguments/args6.js | 22 + js/src/jit-test/tests/arguments/args6a.js | 23 + js/src/jit-test/tests/arguments/args7.js | 14 + js/src/jit-test/tests/arguments/args8.js | 14 + js/src/jit-test/tests/arguments/args9.js | 16 + js/src/jit-test/tests/arguments/argsub.js | 13 + js/src/jit-test/tests/arguments/argsx-1.js | 22 + js/src/jit-test/tests/arguments/argsx-2.js | 23 + js/src/jit-test/tests/arguments/argsx-3.js | 27 + js/src/jit-test/tests/arguments/argsx-3a.js | 27 + js/src/jit-test/tests/arguments/argsx-4.js | 23 + .../jit-test/tests/arguments/arguments-on-proto.js | 27 + .../bug-917585-relax-aliasing-constraints.js | 18 + js/src/jit-test/tests/arguments/bug1051760.js | 4 + js/src/jit-test/tests/arguments/bug1227287.js | 8 + js/src/jit-test/tests/arguments/bug1423937.js | 16 + js/src/jit-test/tests/arguments/bug1503071.js | 16 + js/src/jit-test/tests/arguments/bug1621265.js | 17 + js/src/jit-test/tests/arguments/bug1692833.js | 25 + js/src/jit-test/tests/arguments/bug1696181.js | 15 + js/src/jit-test/tests/arguments/bug1711414.js | 11 + js/src/jit-test/tests/arguments/bug1749460.js | 14 + js/src/jit-test/tests/arguments/bug1762575-1.js | 44 + js/src/jit-test/tests/arguments/bug1762575-2.js | 50 + js/src/jit-test/tests/arguments/bug1762575-3.js | 89 + js/src/jit-test/tests/arguments/bug1825907.js | 7 + js/src/jit-test/tests/arguments/bug1827073.js | 15 + js/src/jit-test/tests/arguments/bug503772.js | 16 + js/src/jit-test/tests/arguments/bug508178.js | 18 + js/src/jit-test/tests/arguments/bug633020.js | 11 + js/src/jit-test/tests/arguments/bug843985.js | 5 + js/src/jit-test/tests/arguments/bug956173.js | 7 + js/src/jit-test/tests/arguments/defaults-basic.js | 35 + .../tests/arguments/defaults-bound-to-function.js | 43 + .../jit-test/tests/arguments/defaults-bug759904.js | 4 + .../tests/arguments/defaults-call-function.js | 15 + .../arguments/defaults-destructuring-array.js | 17 + .../defaults-destructuring-expression-closure.js | 19 + .../defaults-destructuring-function-expression.js | 9 + .../defaults-destructuring-mixed-default-value.js | 55 + .../arguments/defaults-destructuring-mixed.js | 29 + .../arguments/defaults-destructuring-object.js | 27 + .../arguments/defaults-destructuring-with-rest.js | 29 + .../tests/arguments/defaults-evaluation-order.js | 27 + .../tests/arguments/defaults-exceptions.js | 6 + .../tests/arguments/defaults-invalid-syntax.js | 30 + .../jit-test/tests/arguments/defaults-scoping.js | 36 + .../tests/arguments/defaults-strict-mode.js | 41 + .../tests/arguments/defaults-with-arguments.js | 10 + .../jit-test/tests/arguments/defaults-with-rest.js | 23 + .../arguments/destructuring-after-defaults.js | 14 + .../arguments/destructuring-default-value-scope.js | 10 + .../tests/arguments/destructuring-exprbody.js | 8 + .../tests/arguments/destructuring-with-rest.js | 21 + js/src/jit-test/tests/arguments/dynamicBindings.js | 32 + .../external-arguments-apply-forwarded.js | 18 + .../tests/arguments/external-arguments-apply.js | 17 + .../tests/arguments/external-arguments-callee.js | 13 + ...xternal-arguments-element-deleted-exists-oob.js | 14 + .../external-arguments-element-deleted-exists.js | 14 + .../external-arguments-element-deleted-oob.js | 14 + .../external-arguments-element-deleted.js | 14 + .../external-arguments-element-exists-oob.js | 13 + .../arguments/external-arguments-element-exists.js | 13 + .../arguments/external-arguments-element-oob.js | 13 + .../tests/arguments/external-arguments-element.js | 13 + .../arguments/external-arguments-inlined-apply.js | 14 + .../external-arguments-inlined-slice-1.js | 15 + .../external-arguments-inlined-slice-2.js | 15 + .../external-arguments-inlined-slice-3.js | 15 + .../external-arguments-inlined-slice-4.js | 15 + .../arguments/external-arguments-inlined-spread.js | 14 + .../tests/arguments/external-arguments-length.js | 14 + .../arguments/external-arguments-mutate-callee.js | 13 + .../arguments/external-arguments-set-length.js | 14 + .../tests/arguments/external-arguments-slice-1.js | 18 + .../tests/arguments/external-arguments-slice-2.js | 18 + .../tests/arguments/external-arguments-slice-3.js | 18 + .../tests/arguments/external-arguments-slice-4.js | 18 + .../external-arguments-slice-forwarded-1.js | 19 + .../external-arguments-slice-forwarded-2.js | 19 + .../external-arguments-slice-forwarded-3.js | 19 + .../external-arguments-slice-forwarded-4.js | 19 + .../external-arguments-spread-forwarded.js | 18 + .../tests/arguments/external-arguments-spread.js | 17 + .../arguments/function_dot_caller_restrictions.js | 78 + .../arguments/inline-arguments-apply-rectifier.js | 40 + .../tests/arguments/inline-arguments-apply.js | 46 + .../tests/arguments/inline-arguments-callee.js | 16 + .../arguments/inline-arguments-escaped-apply.js | 45 + ...line-arguments-escaped-index-constant-exists.js | 40 + .../inline-arguments-escaped-index-constant-oob.js | 40 + .../inline-arguments-escaped-index-constant.js | 40 + .../inline-arguments-escaped-index-var.js | 44 + .../arguments/inline-arguments-escaped-length.js | 42 + ...ne-arguments-escaped-new-spread-optimization.js | 50 + .../arguments/inline-arguments-escaped-slice-1.js | 50 + .../arguments/inline-arguments-escaped-slice-2.js | 50 + .../arguments/inline-arguments-escaped-slice-3.js | 50 + .../arguments/inline-arguments-escaped-slice-4.js | 50 + ...inline-arguments-escaped-spread-optimization.js | 50 + .../inline-arguments-exists-negative-index-1.js | 34 + .../inline-arguments-exists-negative-index-2.js | 27 + .../tests/arguments/inline-arguments-formals.js | 37 + .../inline-arguments-index-constant-exists.js | 40 + .../inline-arguments-index-constant-oob.js | 40 + .../arguments/inline-arguments-index-constant.js | 40 + .../tests/arguments/inline-arguments-index-var.js | 44 + .../tests/arguments/inline-arguments-length.js | 42 + ...-arguments-new-spread-optimization-rectifier.js | 39 + .../inline-arguments-new-spread-optimization.js | 47 + .../inline-arguments-oob-negative-index-1.js | 39 + .../inline-arguments-oob-negative-index-2.js | 32 + .../tests/arguments/inline-arguments-profiler.js | 11 + .../tests/arguments/inline-arguments-slice-1.js | 46 + .../tests/arguments/inline-arguments-slice-2.js | 46 + .../tests/arguments/inline-arguments-slice-3.js | 46 + .../tests/arguments/inline-arguments-slice-4.js | 46 + .../tests/arguments/inline-arguments-slice-5.js | 97 + .../inline-arguments-slice-rectifier-1.js | 40 + .../inline-arguments-slice-rectifier-2.js | 40 + .../inline-arguments-slice-rectifier-3.js | 40 + .../inline-arguments-slice-rectifier-4.js | 40 + ...line-arguments-spread-optimization-rectifier.js | 39 + .../inline-arguments-spread-optimization.js | 47 + .../tests/arguments/inline-rest-array-creation.js | 83 + .../jit-test/tests/arguments/inline-transpile.js | 17 + .../tests/arguments/iterator-set-and-redefine.js | 33 + js/src/jit-test/tests/arguments/mapped-define.js | 81 + js/src/jit-test/tests/arguments/mapped-freeze.js | 8 + .../tests/arguments/mapped-unmapped-args.js | 61 + js/src/jit-test/tests/arguments/nonstrict-args.js | 24 + .../nonstrict-assign-element-get-parameter.js | 13 + .../nonstrict-assign-parameter-get-element.js | 13 + .../jit-test/tests/arguments/nonstrict-assign.js | 17 + .../tests/arguments/nonstrict-later-assign.js | 18 + .../jit-test/tests/arguments/nonstrict-noargs.js | 21 + .../tests/arguments/polymorphic-getelem.js | 15 + .../tests/arguments/recover-osr-arguments-oob.js | 27 + .../tests/arguments/recover-osr-arguments.js | 27 + .../recover-spread-opt-arguments-after-bail.js | 22 + js/src/jit-test/tests/arguments/redefine-callee.js | 31 + .../tests/arguments/rest-alias-function.js | 10 + .../arguments/rest-arguments-as-parameters.js | 9 + js/src/jit-test/tests/arguments/rest-basic.js | 15 + js/src/jit-test/tests/arguments/rest-bug763954.js | 5 + js/src/jit-test/tests/arguments/rest-debugger.js | 17 + .../arguments/rest-disallow-arguments-strict.js | 8 + .../jit-test/tests/arguments/rest-in-Function.js | 3 + .../tests/arguments/rest-invalid-syntax.js | 12 + .../tests/arguments/rest-nested-arguments.js | 7 + js/src/jit-test/tests/arguments/rest-nested.js | 7 + js/src/jit-test/tests/arguments/rest-underflow.js | 9 + .../tests/arguments/rest-with-arguments.js | 40 + .../jit-test/tests/arguments/slice-args-obj-01.js | 19 + .../jit-test/tests/arguments/slice-args-obj-02.js | 17 + .../jit-test/tests/arguments/slice-args-obj-03.js | 21 + .../jit-test/tests/arguments/slice-args-obj-04.js | 22 + .../slice-closed-over-arguments-strict.js | 17 + .../tests/arguments/slice-closed-over-arguments.js | 15 + .../tests/arguments/slice-redefine-length.js | 19 + js/src/jit-test/tests/arguments/slice.js | 366 + .../jit-test/tests/arguments/spread-args-obj-01.js | 18 + .../jit-test/tests/arguments/spread-args-obj-02.js | 16 + .../jit-test/tests/arguments/spread-args-obj-03.js | 20 + .../jit-test/tests/arguments/spread-args-obj-04.js | 21 + .../tests/arguments/spread-call-optimization.js | 216 + .../spread-closed-over-arguments-strict.js | 15 + .../arguments/spread-closed-over-arguments.js | 14 + .../tests/arguments/spread-redefine-length.js | 18 + .../tests/arguments/strict-args-flushstack.js | 27 + .../arguments/strict-args-generator-flushstack.js | 27 + js/src/jit-test/tests/arguments/strict-args.js | 25 + .../tests/arguments/strict-assign-after.js | 28 + .../arguments/strict-assign-arguments-element.js | 21 + .../arguments/strict-assign-outer-param-psych.js | 27 + .../tests/arguments/strict-assign-outer-param.js | 27 + .../strict-assign-parameter-get-element.js | 14 + js/src/jit-test/tests/arguments/strict-assign.js | 26 + .../tests/arguments/strict-eval-mutation.js | 24 + js/src/jit-test/tests/arguments/strict-eval.js | 30 + .../tests/arguments/strict-maybe-assign-outer.js | 26 + .../tests/arguments/strict-maybe-nested-eval.js | 26 + .../strict-nested-assign-shadow-function-call.js | 33 + .../strict-nested-assign-shadow-function-name.js | 33 + .../strict-nested-assign-shadow-function.js | 32 + .../strict-nested-assign-shadowed-catch-call.js | 39 + .../strict-nested-assign-shadowed-catch.js | 39 + .../arguments/strict-nested-assign-shadowed-var.js | 29 + .../jit-test/tests/arguments/strict-nested-eval.js | 31 + .../tests/arguments/strict-nested-shadow-eval.js | 30 + .../arguments/strict-nested-shadow-maybe-eval.js | 30 + js/src/jit-test/tests/arguments/strict-noargs.js | 25 + .../tests/arguments/strict-osr-shadowed-args.js | 13 + js/src/jit-test/tests/arguments/testDelArg1.js | 13 + js/src/jit-test/tests/arguments/testDelArg2.js | 13 + js/src/jit-test/tests/arguments/testDelArg3.js | 42 + .../jit-test/tests/arguments/testDelArg3Strict.js | 44 + js/src/jit-test/tests/arrays/apply-optimization.js | 58 + js/src/jit-test/tests/arrays/bug-1811789.js | 14 + js/src/jit-test/tests/arrays/bug1423173.js | 13 + js/src/jit-test/tests/arrays/bug1673221.js | 5 + js/src/jit-test/tests/arrays/bug1693328.js | 12 + .../jit-test/tests/arrays/change-array-by-copy.js | 106 + .../tests/arrays/defineProperty-redundant.js | 10 + .../fillwithundefined-length-nonwriteable.js | 16 + js/src/jit-test/tests/arrays/from-async-oom.js | 26 + ...-pop-denseinitializedlength-less-than-length.js | 49 + .../tests/arrays/ion-pop-nonwritable-length.js | 48 + .../tests/arrays/ion-push-nonwritable-length.js | 61 + .../tests/arrays/ion-shift-nonwritable-length.js | 59 + .../length-set-after-define-nonconfigurable.js | 7 + .../tests/arrays/length-set-after-has-sparse.js | 9 + .../tests/arrays/new-array-int-undefined-args.js | 2 + .../new-array-undefined-undefined-more-args-1.js | 6 + .../new-array-undefined-undefined-more-args-2.js | 6 + .../arrays/nonwritable-length-grow-capacity.js | 2 + .../arrays/pop-nonarray-nonwritable-length.js | 13 + ...e-length-denseinitializedlength-below-length.js | 49 + .../push-densely-loopy-nonwritable-length.js | 56 + .../arrays/push-densely-nonwritable-length.js | 31 + .../arrays/push-slowly-loopy-nonwritable-length.js | 51 + .../tests/arrays/push-slowly-nonwritable-length.js | 24 + js/src/jit-test/tests/arrays/reverse-frozen.js | 6 + .../arrays/reverse-nonarray-nonwritable-element.js | 13 + .../arrays/setelem-one-past-nonwritable-length.js | 20 + .../jit-test/tests/arrays/slice-sparse-getter.js | 12 + js/src/jit-test/tests/arrays/slice.js | 37 + js/src/jit-test/tests/arrays/sort-getter-only.js | 29 + js/src/jit-test/tests/arrays/sort-update-types.js | 20 + .../tests/arrays/species-redefine-getter.js | 20 + .../tests/arrays/splice-nonwritable-length.js | 53 + .../tests/arrays/spreadcall-optimization.js | 45 + .../tests/arrays/spreadnew-optimization.js | 51 + .../tests/arrays/spreadsupercall-optimization.js | 59 + .../jit-test/tests/arrays/std_Array-prototype.js | 6 + .../tests/arrays/to-spliced-dense-elements.js | 13 + .../jit-test/tests/arrays/too-long-array-splice.js | 10 + .../tests/arrays/unshift-nonwritable-length.js | 61 + .../jit-test/tests/arrow-functions/arguments-1.js | 5 + .../jit-test/tests/arrow-functions/arguments-2.js | 9 + .../jit-test/tests/arrow-functions/arguments-3.js | 16 + .../jit-test/tests/arrow-functions/arguments-4.js | 22 + .../tests/arrow-functions/associativity-1.js | 8 + .../tests/arrow-functions/associativity-2.js | 8 + .../tests/arrow-functions/associativity-3.js | 5 + js/src/jit-test/tests/arrow-functions/block-1.js | 6 + js/src/jit-test/tests/arrow-functions/block-2.js | 4 + .../jit-test/tests/arrow-functions/bug-885067-1.js | 3 + .../jit-test/tests/arrow-functions/bug-885067-2.js | 28 + .../jit-test/tests/arrow-functions/bug-885219.js | 2 + js/src/jit-test/tests/arrow-functions/church-1.js | 17 + js/src/jit-test/tests/arrow-functions/church-2.js | 19 + .../close-paren-arrow-after-expr.js | 8 + .../tests/arrow-functions/column-number.js | 6 + js/src/jit-test/tests/arrow-functions/const-1.js | 11 + .../jit-test/tests/arrow-functions/construct-1.js | 7 + js/src/jit-test/tests/arrow-functions/eval-1.js | 9 + .../jit-test/tests/arrow-functions/lazy-arrow-1.js | 18 + js/src/jit-test/tests/arrow-functions/length.js | 11 + js/src/jit-test/tests/arrow-functions/params-1.js | 6 + js/src/jit-test/tests/arrow-functions/params-2.js | 6 + .../tests/arrow-functions/params-default-1.js | 5 + .../tests/arrow-functions/params-default-2.js | 8 + .../tests/arrow-functions/params-rest-1.js | 7 + .../tests/arrow-functions/params-rest-2.js | 7 + .../jit-test/tests/arrow-functions/precedence-1.js | 7 + .../jit-test/tests/arrow-functions/precedence-2.js | 6 + .../jit-test/tests/arrow-functions/precedence-3.js | 4 + .../jit-test/tests/arrow-functions/precedence-4.js | 6 + .../jit-test/tests/arrow-functions/precedence-5.js | 3 + .../jit-test/tests/arrow-functions/prototype-1.js | 4 + .../jit-test/tests/arrow-functions/prototype-2.js | 4 + js/src/jit-test/tests/arrow-functions/return-1.js | 9 + js/src/jit-test/tests/arrow-functions/return-2.js | 8 + js/src/jit-test/tests/arrow-functions/return-3.js | 10 + js/src/jit-test/tests/arrow-functions/strict-1.js | 13 + js/src/jit-test/tests/arrow-functions/strict-2.js | 11 + js/src/jit-test/tests/arrow-functions/strict-3.js | 4 + .../tests/arrow-functions/syntax-errors.js | 38 + js/src/jit-test/tests/arrow-functions/this-1.js | 17 + js/src/jit-test/tests/arrow-functions/this-2.js | 13 + js/src/jit-test/tests/arrow-functions/this-3.js | 13 + js/src/jit-test/tests/arrow-functions/this-4.js | 5 + js/src/jit-test/tests/arrow-functions/this-5.js | 12 + js/src/jit-test/tests/arrow-functions/this-6.js | 11 + js/src/jit-test/tests/arrow-functions/typeof.js | 4 + .../jit-test/tests/asm.js/arraybuffer-transfer.js | 65 + js/src/jit-test/tests/asm.js/bug1007512.js | 8 + js/src/jit-test/tests/asm.js/bug1008636.js | 12 + js/src/jit-test/tests/asm.js/bug1126251.js | 15 + js/src/jit-test/tests/asm.js/bug1161298.js | 12 + js/src/jit-test/tests/asm.js/bug1174372.js | 6 + js/src/jit-test/tests/asm.js/bug1219954.js | 10 + .../tests/asm.js/bug1268955-usestrict-semantics.js | 19 + js/src/jit-test/tests/asm.js/bug1276028.js | 6 + js/src/jit-test/tests/asm.js/bug1306506.js | 7 + js/src/jit-test/tests/asm.js/bug1385428.js | 18 + js/src/jit-test/tests/asm.js/bug1421565.js | 19 + js/src/jit-test/tests/asm.js/bug1493475.js | 8 + js/src/jit-test/tests/asm.js/bug1565301.js | 29 + js/src/jit-test/tests/asm.js/bug1602675.js | 19 + js/src/jit-test/tests/asm.js/bug855526.js | 13 + js/src/jit-test/tests/asm.js/bug885976.js | 12 + js/src/jit-test/tests/asm.js/bug923867.js | 8 + js/src/jit-test/tests/asm.js/bug927389.js | 6 + js/src/jit-test/tests/asm.js/bug928450.js | 18 + js/src/jit-test/tests/asm.js/bug940864.js | 10 + js/src/jit-test/tests/asm.js/bug941877.js | 164 + js/src/jit-test/tests/asm.js/directives.txt | 1 + .../tests/asm.js/import-function-toPrimitive.js | 26 + js/src/jit-test/tests/asm.js/nested-rewind.js | 9 + .../asm.js/neuter-during-arguments-coercion.js | 27 + .../oom-helper-thread-plus-validation-error.js | 10 + js/src/jit-test/tests/asm.js/oom-helper-thread.js | 4 + js/src/jit-test/tests/asm.js/testAddressErrors.js | 46 + js/src/jit-test/tests/asm.js/testBasic.js | 173 + js/src/jit-test/tests/asm.js/testBug1046688.js | 11 + js/src/jit-test/tests/asm.js/testBug1057248.js | 133 + js/src/jit-test/tests/asm.js/testBug1111327.js | 10 + js/src/jit-test/tests/asm.js/testBug1117255.js | 16 + js/src/jit-test/tests/asm.js/testBug1125561.js | 47 + js/src/jit-test/tests/asm.js/testBug1147144-2.js | 17 + js/src/jit-test/tests/asm.js/testBug1147144.js | 18 + js/src/jit-test/tests/asm.js/testBug1219098.js | 14 + js/src/jit-test/tests/asm.js/testBug1236484.js | 10 + js/src/jit-test/tests/asm.js/testBug1236541.js | 15 + js/src/jit-test/tests/asm.js/testBug1236552.js | 3 + js/src/jit-test/tests/asm.js/testBug1255954.js | 12 + js/src/jit-test/tests/asm.js/testBug1291887.js | 13 + js/src/jit-test/tests/asm.js/testBug1301191.js | 24 + js/src/jit-test/tests/asm.js/testBug1357053.js | 15 + js/src/jit-test/tests/asm.js/testBug1359612.js | 9 + js/src/jit-test/tests/asm.js/testBug1360390.js | 13 + js/src/jit-test/tests/asm.js/testBug1437534.js | 19 + js/src/jit-test/tests/asm.js/testBug1437546.js | 6 + js/src/jit-test/tests/asm.js/testBug1674353.js | 13 + js/src/jit-test/tests/asm.js/testBug855442.js | 8 + js/src/jit-test/tests/asm.js/testBug863867.js | 34 + js/src/jit-test/tests/asm.js/testBug878435.js | 11 + js/src/jit-test/tests/asm.js/testBug878495.js | 10 + js/src/jit-test/tests/asm.js/testBug878520.js | 9 + js/src/jit-test/tests/asm.js/testBug892291.js | 10 + js/src/jit-test/tests/asm.js/testBug893364.js | 14 + js/src/jit-test/tests/asm.js/testBug893368.js | 13 + js/src/jit-test/tests/asm.js/testBug907085.js | 22 + js/src/jit-test/tests/asm.js/testBug952022.js | 57 + js/src/jit-test/tests/asm.js/testBug965767.js | 2098 + js/src/jit-test/tests/asm.js/testBug975182.js | 20 + js/src/jit-test/tests/asm.js/testBug989166.js | 8 + js/src/jit-test/tests/asm.js/testBug999790.js | 65 + js/src/jit-test/tests/asm.js/testBullet.js | 6 + js/src/jit-test/tests/asm.js/testCall.js | 75 + js/src/jit-test/tests/asm.js/testCloning.js | 48 + .../jit-test/tests/asm.js/testCompoundPlusMinus.js | 14 + js/src/jit-test/tests/asm.js/testControlFlow.js | 374 + .../jit-test/tests/asm.js/testDebugModeDisables.js | 9 + js/src/jit-test/tests/asm.js/testExpressions.js | 403 + js/src/jit-test/tests/asm.js/testFFI.js | 175 + js/src/jit-test/tests/asm.js/testFastHeapAccess.js | 81 + js/src/jit-test/tests/asm.js/testFloat32.js | 321 + js/src/jit-test/tests/asm.js/testFloatingPoint.js | 134 + js/src/jit-test/tests/asm.js/testFunctionPtr.js | 74 + js/src/jit-test/tests/asm.js/testGetter.js | 11 + js/src/jit-test/tests/asm.js/testGlobals.js | 164 + js/src/jit-test/tests/asm.js/testHeapAccess.js | 511 + js/src/jit-test/tests/asm.js/testJumpRange.js | 28 + js/src/jit-test/tests/asm.js/testLargeHeap.js | 9 + .../jit-test/tests/asm.js/testLinkErrorAssert.js | 20 + js/src/jit-test/tests/asm.js/testLiterals.js | 50 + js/src/jit-test/tests/asm.js/testMathLib.js | 189 + .../jit-test/tests/asm.js/testModuleFunctions.js | 41 + js/src/jit-test/tests/asm.js/testNeuter.js | 43 + .../jit-test/tests/asm.js/testParallelCompile.js | 21 + js/src/jit-test/tests/asm.js/testProfiling.js | 232 + js/src/jit-test/tests/asm.js/testRangeAnalysis.js | 15 + js/src/jit-test/tests/asm.js/testSource-2.js | 368 + js/src/jit-test/tests/asm.js/testSource.js | 385 + js/src/jit-test/tests/asm.js/testStackWalking.js | 97 + js/src/jit-test/tests/asm.js/testStealing.js | 18 + js/src/jit-test/tests/asm.js/testTimeout1.js | 8 + js/src/jit-test/tests/asm.js/testTimeout2.js | 8 + js/src/jit-test/tests/asm.js/testTimeout3.js | 8 + js/src/jit-test/tests/asm.js/testTimeout4.js | 8 + js/src/jit-test/tests/asm.js/testTimeout5.js | 12 + js/src/jit-test/tests/asm.js/testTimeout6.js | 12 + js/src/jit-test/tests/asm.js/testTimeout7.js | 17 + js/src/jit-test/tests/asm.js/testUseAsmWarnings.js | 14 + js/src/jit-test/tests/asm.js/testX86ByteStore.js | 77 + js/src/jit-test/tests/asm.js/testZOOB.js | 122 + .../async/await-exception-stack-in-finally-1.js | 25 + .../async/await-exception-stack-in-finally-2.js | 17 + .../async/await-exception-stack-in-finally-3.js | 21 + js/src/jit-test/tests/async/bug1773650.js | 58 + .../tests/async/debugger-reject-after-fulfill.js | 229 + js/src/jit-test/tests/async/ecma262-issue-1461.js | 22 + js/src/jit-test/tests/atomics/basic-tests.js | 564 + .../tests/atomics/bigint-add-for-effect.js | 103 + js/src/jit-test/tests/atomics/bigint-add.js | 103 + .../tests/atomics/bigint-and-for-effect.js | 128 + js/src/jit-test/tests/atomics/bigint-and.js | 128 + .../tests/atomics/bigint-compareExchange.js | 121 + js/src/jit-test/tests/atomics/bigint-exchange.js | 103 + js/src/jit-test/tests/atomics/bigint-load.js | 91 + .../jit-test/tests/atomics/bigint-or-for-effect.js | 130 + js/src/jit-test/tests/atomics/bigint-or.js | 130 + js/src/jit-test/tests/atomics/bigint-store.js | 91 + .../tests/atomics/bigint-sub-for-effect.js | 103 + js/src/jit-test/tests/atomics/bigint-sub.js | 103 + .../tests/atomics/bigint-xor-for-effect.js | 121 + js/src/jit-test/tests/atomics/bigint-xor.js | 121 + .../tests/atomics/cross-compartment-nukeccw.js | 219 + js/src/jit-test/tests/atomics/directives.txt | 1 + js/src/jit-test/tests/atomics/inline-add.js | 28 + js/src/jit-test/tests/atomics/inline-add2.js | 28 + js/src/jit-test/tests/atomics/inline-cmpxchg.js | 28 + js/src/jit-test/tests/atomics/memcpy-fidelity.js | 181 + js/src/jit-test/tests/atomics/mutual-exclusion.js | 82 + .../tests/atomics/nursery-non-shared-moved-gc.js | 99 + .../jit-test/tests/atomics/optimization-tests.js | 103 + .../atomics/store-does-not-truncate-returnval.js | 44 + js/src/jit-test/tests/auto-regress/bug1147907.js | 14 + js/src/jit-test/tests/auto-regress/bug1183241.js | 18 + js/src/jit-test/tests/auto-regress/bug1263532.js | 13 + js/src/jit-test/tests/auto-regress/bug1263558.js | 16 + js/src/jit-test/tests/auto-regress/bug1263857.js | 5 + js/src/jit-test/tests/auto-regress/bug1263865.js | 11 + js/src/jit-test/tests/auto-regress/bug1263879.js | 20 + js/src/jit-test/tests/auto-regress/bug1263888.js | 3 + js/src/jit-test/tests/auto-regress/bug1264561.js | 6 + js/src/jit-test/tests/auto-regress/bug1264823.js | 12 + js/src/jit-test/tests/auto-regress/bug1266579.js | 28 + js/src/jit-test/tests/auto-regress/bug1268034.js | 6 + js/src/jit-test/tests/auto-regress/bug1269074.js | 3 + js/src/jit-test/tests/auto-regress/bug1276082.js | 5 + js/src/jit-test/tests/auto-regress/bug1315943.js | 11 + js/src/jit-test/tests/auto-regress/bug1317460.js | 11 + js/src/jit-test/tests/auto-regress/bug1335619.js | 11 + js/src/jit-test/tests/auto-regress/bug1335623.js | 9 + js/src/jit-test/tests/auto-regress/bug1343513-2.js | 9 + js/src/jit-test/tests/auto-regress/bug1343513.js | 9 + js/src/jit-test/tests/auto-regress/bug1357330.js | 17 + js/src/jit-test/tests/auto-regress/bug1357462.js | 6 + js/src/jit-test/tests/auto-regress/bug1375446.js | 10 + js/src/jit-test/tests/auto-regress/bug1390082-1.js | 10 + js/src/jit-test/tests/auto-regress/bug1390082-2.js | 14 + js/src/jit-test/tests/auto-regress/bug1416809-1.js | 12 + js/src/jit-test/tests/auto-regress/bug1416809-2.js | 14 + js/src/jit-test/tests/auto-regress/bug1448582-1.js | 21 + js/src/jit-test/tests/auto-regress/bug1448582-2.js | 25 + js/src/jit-test/tests/auto-regress/bug1448582-3.js | 22 + js/src/jit-test/tests/auto-regress/bug1448582-4.js | 22 + js/src/jit-test/tests/auto-regress/bug1448582-5.js | 133 + js/src/jit-test/tests/auto-regress/bug1448582-6.js | 26 + js/src/jit-test/tests/auto-regress/bug1454285.js | 86 + js/src/jit-test/tests/auto-regress/bug1460436-1.js | 5 + js/src/jit-test/tests/auto-regress/bug1460436-2.js | 9 + js/src/jit-test/tests/auto-regress/bug1462341.js | 12 + js/src/jit-test/tests/auto-regress/bug1466626-1.js | 7 + js/src/jit-test/tests/auto-regress/bug1466626-2.js | 14 + js/src/jit-test/tests/auto-regress/bug1466626-3.js | 13 + js/src/jit-test/tests/auto-regress/bug1466626-4.js | 10 + js/src/jit-test/tests/auto-regress/bug1468629.js | 11 + js/src/jit-test/tests/auto-regress/bug1476417.js | 22 + js/src/jit-test/tests/auto-regress/bug1479076.js | 6 + js/src/jit-test/tests/auto-regress/bug1481032.js | 6 + js/src/jit-test/tests/auto-regress/bug1483188.js | 13 + js/src/jit-test/tests/auto-regress/bug1500255.js | 9 + js/src/jit-test/tests/auto-regress/bug1524943.js | 4 + js/src/jit-test/tests/auto-regress/bug1538542-1.js | 13 + js/src/jit-test/tests/auto-regress/bug1538542-2.js | 13 + js/src/jit-test/tests/auto-regress/bug1544364.js | 8 + js/src/jit-test/tests/auto-regress/bug1546232-2.js | 8 + js/src/jit-test/tests/auto-regress/bug1546232.js | 4 + js/src/jit-test/tests/auto-regress/bug1562102.js | 12 + js/src/jit-test/tests/auto-regress/bug1574415.js | 11 + js/src/jit-test/tests/auto-regress/bug1591019.js | 4 + js/src/jit-test/tests/auto-regress/bug1593971.js | 7 + js/src/jit-test/tests/auto-regress/bug1652148.js | 5 + js/src/jit-test/tests/auto-regress/bug1652153.js | 12 + js/src/jit-test/tests/auto-regress/bug1669914.js | 10 + js/src/jit-test/tests/auto-regress/bug1670378.js | 8 + js/src/jit-test/tests/auto-regress/bug1689880-1.js | 14 + js/src/jit-test/tests/auto-regress/bug1689880-2.js | 14 + js/src/jit-test/tests/auto-regress/bug1736307.js | 3 + js/src/jit-test/tests/auto-regress/bug1750496.js | 8 + js/src/jit-test/tests/auto-regress/bug1763501.js | 6 + js/src/jit-test/tests/auto-regress/bug1765028.js | 3 + js/src/jit-test/tests/auto-regress/bug1765249.js | 34 + js/src/jit-test/tests/auto-regress/bug1766225.js | 12 + js/src/jit-test/tests/auto-regress/bug1783507.js | 17 + js/src/jit-test/tests/auto-regress/bug1790543.js | 7 + js/src/jit-test/tests/auto-regress/bug1791401.js | 19 + js/src/jit-test/tests/auto-regress/bug1798883.js | 11 + js/src/jit-test/tests/auto-regress/bug1805881.js | 21 + js/src/jit-test/tests/auto-regress/bug1812148.js | 49 + js/src/jit-test/tests/auto-regress/bug1813387.js | 10 + js/src/jit-test/tests/auto-regress/bug1863390.js | 6 + js/src/jit-test/tests/auto-regress/bug1863428.js | 10 + js/src/jit-test/tests/auto-regress/bug1874929.js | 12 + js/src/jit-test/tests/auto-regress/bug1875487.js | 26 + js/src/jit-test/tests/auto-regress/bug1879688.js | 7 + js/src/jit-test/tests/auto-regress/bug464116.js | 31 + js/src/jit-test/tests/auto-regress/bug466076.js | 8 + js/src/jit-test/tests/auto-regress/bug469262.js | 10 + js/src/jit-test/tests/auto-regress/bug477877.js | 179 + js/src/jit-test/tests/auto-regress/bug479747.js | 9 + js/src/jit-test/tests/auto-regress/bug486139.js | 6 + js/src/jit-test/tests/auto-regress/bug487320.js | 11 + js/src/jit-test/tests/auto-regress/bug487534.js | 5 + js/src/jit-test/tests/auto-regress/bug487563.js | 17 + js/src/jit-test/tests/auto-regress/bug488015.js | 29 + js/src/jit-test/tests/auto-regress/bug488034.js | 7 + js/src/jit-test/tests/auto-regress/bug488203.js | 13 + js/src/jit-test/tests/auto-regress/bug488421.js | 12 + js/src/jit-test/tests/auto-regress/bug488693.js | 4 + js/src/jit-test/tests/auto-regress/bug489040.js | 4 + js/src/jit-test/tests/auto-regress/bug489836.js | 13 + js/src/jit-test/tests/auto-regress/bug490191.js | 15 + js/src/jit-test/tests/auto-regress/bug490776.js | 37 + js/src/jit-test/tests/auto-regress/bug495843.js | 5 + js/src/jit-test/tests/auto-regress/bug496245.js | 6 + js/src/jit-test/tests/auto-regress/bug496325.js | 19 + js/src/jit-test/tests/auto-regress/bug499169.js | 179 + js/src/jit-test/tests/auto-regress/bug502604.js | 30 + js/src/jit-test/tests/auto-regress/bug505305.js | 5 + js/src/jit-test/tests/auto-regress/bug511938.js | 8 + js/src/jit-test/tests/auto-regress/bug521163.js | 11 + js/src/jit-test/tests/auto-regress/bug521279.js | 6 + js/src/jit-test/tests/auto-regress/bug522624.js | 10 + js/src/jit-test/tests/auto-regress/bug528048.js | 20 + js/src/jit-test/tests/auto-regress/bug533705.js | 25 + js/src/jit-test/tests/auto-regress/bug543436.js | 15 + js/src/jit-test/tests/auto-regress/bug557946.js | 44 + js/src/jit-test/tests/auto-regress/bug558618.js | 15 + js/src/jit-test/tests/auto-regress/bug560566.js | 7 + js/src/jit-test/tests/auto-regress/bug562028.js | 22 + js/src/jit-test/tests/auto-regress/bug563034.js | 11 + js/src/jit-test/tests/auto-regress/bug563126.js | 6 + js/src/jit-test/tests/auto-regress/bug563127.js | 6 + js/src/jit-test/tests/auto-regress/bug564619.js | 14 + js/src/jit-test/tests/auto-regress/bug567577.js | 8 + js/src/jit-test/tests/auto-regress/bug568786.js | 10 + js/src/jit-test/tests/auto-regress/bug571168.js | 9 + js/src/jit-test/tests/auto-regress/bug579348.js | 6 + js/src/jit-test/tests/auto-regress/bug580694.js | 20 + js/src/jit-test/tests/auto-regress/bug580699.js | 12 + js/src/jit-test/tests/auto-regress/bug580701.js | 6 + js/src/jit-test/tests/auto-regress/bug581785.js | 11 + js/src/jit-test/tests/auto-regress/bug582268.js | 6 + js/src/jit-test/tests/auto-regress/bug582276.js | 7 + js/src/jit-test/tests/auto-regress/bug583675.js | 11 + js/src/jit-test/tests/auto-regress/bug583680.js | 14 + js/src/jit-test/tests/auto-regress/bug583681.js | 4 + js/src/jit-test/tests/auto-regress/bug584423.js | 6 + js/src/jit-test/tests/auto-regress/bug586538.js | 12 + js/src/jit-test/tests/auto-regress/bug590772.js | 4 + js/src/jit-test/tests/auto-regress/bug591367.js | 6 + js/src/jit-test/tests/auto-regress/bug591795.js | 4 + js/src/jit-test/tests/auto-regress/bug593580.js | 29 + js/src/jit-test/tests/auto-regress/bug596817.js | 12 + js/src/jit-test/tests/auto-regress/bug596823.js | 6 + js/src/jit-test/tests/auto-regress/bug599446.js | 7 + js/src/jit-test/tests/auto-regress/bug599464.js | 20 + js/src/jit-test/tests/auto-regress/bug600138.js | 11 + js/src/jit-test/tests/auto-regress/bug601070.js | 5 + js/src/jit-test/tests/auto-regress/bug601393.js | 9 + js/src/jit-test/tests/auto-regress/bug605011.js | 19 + js/src/jit-test/tests/auto-regress/bug605013.js | 10 + js/src/jit-test/tests/auto-regress/bug606639.js | 9 + js/src/jit-test/tests/auto-regress/bug607502.js | 8 + js/src/jit-test/tests/auto-regress/bug607513.js | 5 + js/src/jit-test/tests/auto-regress/bug612836.js | 4 + js/src/jit-test/tests/auto-regress/bug613400.js | 4 + js/src/jit-test/tests/auto-regress/bug620315.js | 4 + js/src/jit-test/tests/auto-regress/bug620637.js | 20 + js/src/jit-test/tests/auto-regress/bug621816.js | 4 + js/src/jit-test/tests/auto-regress/bug621988.js | 5 + js/src/jit-test/tests/auto-regress/bug634236.js | 13 + js/src/jit-test/tests/auto-regress/bug635389.js | 8 + js/src/jit-test/tests/auto-regress/bug637205.js | 45 + js/src/jit-test/tests/auto-regress/bug638212.js | 21 + js/src/jit-test/tests/auto-regress/bug638735.js | 23 + js/src/jit-test/tests/auto-regress/bug640079.js | 9 + js/src/jit-test/tests/auto-regress/bug643670.js | 19 + js/src/jit-test/tests/auto-regress/bug643847.js | 13 + js/src/jit-test/tests/auto-regress/bug647464.js | 4 + js/src/jit-test/tests/auto-regress/bug648729.js | 8 + js/src/jit-test/tests/auto-regress/bug648739.js | 10 + js/src/jit-test/tests/auto-regress/bug648747.js | 51 + js/src/jit-test/tests/auto-regress/bug648839.js | 10 + js/src/jit-test/tests/auto-regress/bug648852.js | 12 + js/src/jit-test/tests/auto-regress/bug648992.js | 16 + js/src/jit-test/tests/auto-regress/bug648999.js | 10 + js/src/jit-test/tests/auto-regress/bug649017.js | 8 + js/src/jit-test/tests/auto-regress/bug649937.js | 21 + js/src/jit-test/tests/auto-regress/bug650574.js | 9 + js/src/jit-test/tests/auto-regress/bug650658.js | 10 + js/src/jit-test/tests/auto-regress/bug651827.js | 9 + js/src/jit-test/tests/auto-regress/bug653395.js | 19 + js/src/jit-test/tests/auto-regress/bug653789.js | 8 + js/src/jit-test/tests/auto-regress/bug654392.js | 15 + js/src/jit-test/tests/auto-regress/bug654665.js | 8 + js/src/jit-test/tests/auto-regress/bug655507.js | 6 + js/src/jit-test/tests/auto-regress/bug655940.js | 12 + js/src/jit-test/tests/auto-regress/bug655950.js | 13 + js/src/jit-test/tests/auto-regress/bug657198.js | 36 + js/src/jit-test/tests/auto-regress/bug657586.js | 9 + js/src/jit-test/tests/auto-regress/bug658803.js | 17 + js/src/jit-test/tests/auto-regress/bug659077.js | 16 + js/src/jit-test/tests/auto-regress/bug659779.js | 33 + js/src/jit-test/tests/auto-regress/bug661840.js | 39 + js/src/jit-test/tests/auto-regress/bug662132.js | 14 + js/src/jit-test/tests/auto-regress/bug665914.js | 6 + js/src/jit-test/tests/auto-regress/bug666305.js | 8 + js/src/jit-test/tests/auto-regress/bug666599.js | 15 + js/src/jit-test/tests/auto-regress/bug667824.js | 7 + js/src/jit-test/tests/auto-regress/bug668206.js | 9 + js/src/jit-test/tests/auto-regress/bug672104.js | 13 + js/src/jit-test/tests/auto-regress/bug673792.js | 7 + js/src/jit-test/tests/auto-regress/bug674843.js | 63 + js/src/jit-test/tests/auto-regress/bug675251.js | 25 + js/src/jit-test/tests/auto-regress/bug677386.js | 25 + js/src/jit-test/tests/auto-regress/bug677587.js | 11 + js/src/jit-test/tests/auto-regress/bug677977.js | 25 + js/src/jit-test/tests/auto-regress/bug678086.js | 17 + js/src/jit-test/tests/auto-regress/bug678529.js | 11 + js/src/jit-test/tests/auto-regress/bug679799.js | 16 + js/src/jit-test/tests/auto-regress/bug679810.js | 14 + js/src/jit-test/tests/auto-regress/bug680797.js | 47 + js/src/jit-test/tests/auto-regress/bug682252.js | 7 + js/src/jit-test/tests/auto-regress/bug682298.js | 6 + js/src/jit-test/tests/auto-regress/bug682563.js | 12 + js/src/jit-test/tests/auto-regress/bug684281.js | 14 + js/src/jit-test/tests/auto-regress/bug685472.js | 12 + js/src/jit-test/tests/auto-regress/bug686107.js | 15 + js/src/jit-test/tests/auto-regress/bug686179.js | 15 + js/src/jit-test/tests/auto-regress/bug687099.js | 30 + js/src/jit-test/tests/auto-regress/bug687102.js | 7 + js/src/jit-test/tests/auto-regress/bug687125.js | 25 + js/src/jit-test/tests/auto-regress/bug687399.js | 30 + js/src/jit-test/tests/auto-regress/bug688968.js | 8 + js/src/jit-test/tests/auto-regress/bug688974.js | 13 + js/src/jit-test/tests/auto-regress/bug689892.js | 11 + js/src/jit-test/tests/auto-regress/bug690933.js | 14 + js/src/jit-test/tests/auto-regress/bug691595.js | 20 + js/src/jit-test/tests/auto-regress/bug692300.js | 10 + js/src/jit-test/tests/auto-regress/bug692366.js | 6 + js/src/jit-test/tests/auto-regress/bug693144.js | 12 + js/src/jit-test/tests/auto-regress/bug693971.js | 12 + js/src/jit-test/tests/auto-regress/bug694438.js | 61 + js/src/jit-test/tests/auto-regress/bug695290.js | 11 + js/src/jit-test/tests/auto-regress/bug696039.js | 21 + js/src/jit-test/tests/auto-regress/bug697255.js | 12 + js/src/jit-test/tests/auto-regress/bug698074.js | 7 + js/src/jit-test/tests/auto-regress/bug698148.js | 16 + js/src/jit-test/tests/auto-regress/bug699674.js | 5 + js/src/jit-test/tests/auto-regress/bug700127.js | 17 + js/src/jit-test/tests/auto-regress/bug700295.js | 22 + js/src/jit-test/tests/auto-regress/bug701248.js | 8 + js/src/jit-test/tests/auto-regress/bug701332.js | 15 + js/src/jit-test/tests/auto-regress/bug702003.js | 25 + js/src/jit-test/tests/auto-regress/bug702915.js | 85 + js/src/jit-test/tests/auto-regress/bug704136.js | 8 + js/src/jit-test/tests/auto-regress/bug710192.js | 10 + js/src/jit-test/tests/auto-regress/bug713209.js | 24 + js/src/jit-test/tests/auto-regress/bug713944.js | 16 + js/src/jit-test/tests/auto-regress/bug715682.js | 4 + js/src/jit-test/tests/auto-regress/bug716512.js | 6 + js/src/jit-test/tests/auto-regress/bug717249.js | 7 + js/src/jit-test/tests/auto-regress/bug717251.js | 16 + js/src/jit-test/tests/auto-regress/bug718347.js | 8 + js/src/jit-test/tests/auto-regress/bug720380.js | 8 + js/src/jit-test/tests/auto-regress/bug720396.js | 11 + js/src/jit-test/tests/auto-regress/bug721497.js | 13 + js/src/jit-test/tests/auto-regress/bug722021.js | 8 + js/src/jit-test/tests/auto-regress/bug722023.js | 12 + js/src/jit-test/tests/auto-regress/bug722260.js | 8 + js/src/jit-test/tests/auto-regress/bug724875.js | 15 + js/src/jit-test/tests/auto-regress/bug726636.js | 10 + js/src/jit-test/tests/auto-regress/bug727330.js | 9 + js/src/jit-test/tests/auto-regress/bug728509.js | 14 + js/src/jit-test/tests/auto-regress/bug729571.js | 42 + js/src/jit-test/tests/auto-regress/bug729797.js | 15 + js/src/jit-test/tests/auto-regress/bug729886.js | 12 + js/src/jit-test/tests/auto-regress/bug730806.js | 61 + js/src/jit-test/tests/auto-regress/bug732719.js | 26 + js/src/jit-test/tests/auto-regress/bug732852.js | 10 + js/src/jit-test/tests/auto-regress/bug732855.js | 69 + js/src/jit-test/tests/auto-regress/bug732856.js | 19 + js/src/jit-test/tests/auto-regress/bug732857.js | 34 + js/src/jit-test/tests/auto-regress/bug732861.js | 12 + js/src/jit-test/tests/auto-regress/bug735313.js | 15 + js/src/jit-test/tests/auto-regress/bug735936.js | 8 + js/src/jit-test/tests/auto-regress/bug736609.js | 10 + js/src/jit-test/tests/auto-regress/bug737300.js | 21 + js/src/jit-test/tests/auto-regress/bug737737.js | 36 + js/src/jit-test/tests/auto-regress/bug739402.js | 142 + js/src/jit-test/tests/auto-regress/bug739901.js | 20 + js/src/jit-test/tests/auto-regress/bug740509.js | 82 + js/src/jit-test/tests/auto-regress/bug740654.js | 13 + js/src/jit-test/tests/auto-regress/bug741199.js | 9 + js/src/jit-test/tests/auto-regress/bug743071.js | 51 + js/src/jit-test/tests/auto-regress/bug743094.js | 17 + js/src/jit-test/tests/auto-regress/bug743096.js | 14 + js/src/jit-test/tests/auto-regress/bug743876.js | 35 + js/src/jit-test/tests/auto-regress/bug745452.js | 7 + js/src/jit-test/tests/auto-regress/bug746103.js | 15 + js/src/jit-test/tests/auto-regress/bug746376.js | 65 + js/src/jit-test/tests/auto-regress/bug746377.js | 14 + js/src/jit-test/tests/auto-regress/bug748119.js | 95 + js/src/jit-test/tests/auto-regress/bug754719.js | 10 + js/src/jit-test/tests/auto-regress/bug755639.js | 34 + js/src/jit-test/tests/auto-regress/bug755750.js | 10 + js/src/jit-test/tests/auto-regress/bug756236.js | 15 + js/src/jit-test/tests/auto-regress/bug757428.js | 11 + js/src/jit-test/tests/auto-regress/bug758164.js | 6 + js/src/jit-test/tests/auto-regress/bug759719.js | 81 + js/src/jit-test/tests/auto-regress/bug761864.js | 58 + js/src/jit-test/tests/auto-regress/bug762324.js | 8 + js/src/jit-test/tests/auto-regress/bug763039.js | 69 + js/src/jit-test/tests/auto-regress/bug763989.js | 47 + js/src/jit-test/tests/auto-regress/bug765055.js | 7 + js/src/jit-test/tests/auto-regress/bug765483.js | 15 + js/src/jit-test/tests/auto-regress/bug766065.js | 13 + js/src/jit-test/tests/auto-regress/bug767679.js | 10 + js/src/jit-test/tests/auto-regress/bug770713.js | 21 + js/src/jit-test/tests/auto-regress/bug771027.js | 9 + js/src/jit-test/tests/auto-regress/bug771157.js | 30 + js/src/jit-test/tests/auto-regress/bug771946.js | 4 + js/src/jit-test/tests/auto-regress/bug779390.js | 15 + js/src/jit-test/tests/auto-regress/bug779818.js | 12 + js/src/jit-test/tests/auto-regress/bug780003.js | 6 + js/src/jit-test/tests/auto-regress/bug781364.js | 34 + js/src/jit-test/tests/auto-regress/bug781855.js | 11 + js/src/jit-test/tests/auto-regress/bug782083.js | 16 + js/src/jit-test/tests/auto-regress/bug782129.js | 24 + js/src/jit-test/tests/auto-regress/bug783421.js | 30 + js/src/jit-test/tests/auto-regress/bug785089.js | 4 + js/src/jit-test/tests/auto-regress/bug785305.js | 8 + js/src/jit-test/tests/auto-regress/bug785576.js | 11 + js/src/jit-test/tests/auto-regress/bug785776.js | 6 + js/src/jit-test/tests/auto-regress/bug790921.js | 14 + js/src/jit-test/tests/auto-regress/bug795937.js | 6 + js/src/jit-test/tests/auto-regress/bug797493.js | 15 + js/src/jit-test/tests/auto-regress/bug800878.js | 13 + js/src/jit-test/tests/auto-regress/bug812235.js | 10 + js/src/jit-test/tests/auto-regress/bug813029.js | 12 + js/src/jit-test/tests/auto-regress/bug829795.js | 10 + js/src/jit-test/tests/auto-regress/bug829813.js | 8 + js/src/jit-test/tests/auto-regress/bug909441.js | 19 + js/src/jit-test/tests/auto-regress/bug912379.js | 12 + .../tests/auto-regress/class-method-async.js | 5 + .../auto-regress/for-of-iterator-close-debugger.js | 15 + js/src/jit-test/tests/backup-point-bug1315634.js | 29 + .../baseline/accessor-ic-shape-replacement.js | 55 + .../tests/baseline/arraySubclassPropertyLookup.js | 17 + js/src/jit-test/tests/baseline/bug1024444.js | 7 + js/src/jit-test/tests/baseline/bug1054330.js | 50 + js/src/jit-test/tests/baseline/bug1063878.js | 24 + js/src/jit-test/tests/baseline/bug1095870.js | 4 + js/src/jit-test/tests/baseline/bug1182866.js | 18 + js/src/jit-test/tests/baseline/bug1209585.js | 38 + js/src/jit-test/tests/baseline/bug1216140.js | 6 + js/src/jit-test/tests/baseline/bug1238815.js | 15 + js/src/jit-test/tests/baseline/bug1258301.js | 5 + js/src/jit-test/tests/baseline/bug1344334.js | 13 + js/src/jit-test/tests/baseline/bug1349298.js | 2 + js/src/jit-test/tests/baseline/bug1368626.js | 19 + js/src/jit-test/tests/baseline/bug1416727.js | 20 + js/src/jit-test/tests/baseline/bug1463375.js | 5 + js/src/jit-test/tests/baseline/bug1491337.js | 18 + js/src/jit-test/tests/baseline/bug1491350.js | 10 + js/src/jit-test/tests/baseline/bug1602390.js | 7 + js/src/jit-test/tests/baseline/bug1660465.js | 9 + js/src/jit-test/tests/baseline/bug836742.js | 33 + js/src/jit-test/tests/baseline/bug840984.js | 17 + js/src/jit-test/tests/baseline/bug841718.js | 17 + js/src/jit-test/tests/baseline/bug842313.js | 7 + js/src/jit-test/tests/baseline/bug842316.js | 9 + js/src/jit-test/tests/baseline/bug842317.js | 12 + js/src/jit-test/tests/baseline/bug842429.js | 11 + js/src/jit-test/tests/baseline/bug842430.js | 5 + js/src/jit-test/tests/baseline/bug842431-1.js | 14 + js/src/jit-test/tests/baseline/bug842431-2.js | 25 + js/src/jit-test/tests/baseline/bug842431-3.js | 24 + js/src/jit-test/tests/baseline/bug842432.js | 13 + js/src/jit-test/tests/baseline/bug843429.js | 6 + js/src/jit-test/tests/baseline/bug843886.js | 3 + js/src/jit-test/tests/baseline/bug844383.js | 22 + js/src/jit-test/tests/baseline/bug844467.js | 9 + js/src/jit-test/tests/baseline/bug844470.js | 9 + js/src/jit-test/tests/baseline/bug844828.js | 9 + js/src/jit-test/tests/baseline/bug845331.js | 9 + js/src/jit-test/tests/baseline/bug847410.js | 5 + js/src/jit-test/tests/baseline/bug847425.js | 16 + js/src/jit-test/tests/baseline/bug847446.js | 22 + js/src/jit-test/tests/baseline/bug847484.js | 14 + js/src/jit-test/tests/baseline/bug847678.js | 7 + js/src/jit-test/tests/baseline/bug848743-1.js | 42 + js/src/jit-test/tests/baseline/bug848743-2.js | 14 + js/src/jit-test/tests/baseline/bug852175.js | 5 + js/src/jit-test/tests/baseline/bug852801.js | 106 + js/src/jit-test/tests/baseline/bug857580.js | 13 + js/src/jit-test/tests/baseline/bug877589.js | 7 + js/src/jit-test/tests/baseline/bug881461.js | 2 + js/src/jit-test/tests/baseline/bug892787-1.js | 18 + js/src/jit-test/tests/baseline/bug892787-2.js | 36 + js/src/jit-test/tests/baseline/bug916039.js | 4 + js/src/jit-test/tests/baseline/bug934427.js | 13 + js/src/jit-test/tests/baseline/bug938130.js | 7 + js/src/jit-test/tests/baseline/bug940972.js | 5 + js/src/jit-test/tests/baseline/callee.js | 5 + .../tests/baseline/classConstructor-AnyScripted.js | 24 + .../jit-test/tests/baseline/eval-newtarget-osr.js | 5 + js/src/jit-test/tests/baseline/funcall-array.js | 70 + js/src/jit-test/tests/baseline/funcall.js | 54 + .../tests/baseline/getgname-uninitialized-let.js | 8 + .../tests/baseline/getname-uninitialized-let.js | 13 + js/src/jit-test/tests/baseline/getter_setter.js | 25 + .../jit-test/tests/baseline/long-proto-chains.js | 10 + .../tests/baseline/metadata-hook-on-stack.js | 16 + .../tests/baseline/no-such-property-getprop.js | 1025 + .../tests/baseline/osr-large-stack-frame.js | 18 + js/src/jit-test/tests/baseline/setcall.js | 32 + js/src/jit-test/tests/baseline/try-finally-1.js | 28 + js/src/jit-test/tests/baseline/try-finally-2.js | 37 + js/src/jit-test/tests/baseline/try-finally-3.js | 30 + js/src/jit-test/tests/baseline/try-finally-osr.js | 29 + .../tests/baseline/unboxed-expando-type-update.js | 18 + js/src/jit-test/tests/basic/FPQuadCmp.js | 6 + .../basic/__proto__-not-prototype-mutation-ion.js | 12 + .../basic/__proto__-not-prototype-mutation.js | 29 + .../tests/basic/adjacent-trycatch-second-nested.js | 9 + js/src/jit-test/tests/basic/allow-relazify.js | 9 + .../tests/basic/argumentsPassedToBuiltin.js | 14 + .../jit-test/tests/basic/arityMismatchExtraArg.js | 13 + .../tests/basic/arityMismatchMissingArg.js | 8 + .../tests/basic/array-concat-spreadable.js | 33 + js/src/jit-test/tests/basic/array-copyWithin.js | 187 + js/src/jit-test/tests/basic/array-length-double.js | 13 + .../jit-test/tests/basic/array-proto-outofrange.js | 18 + js/src/jit-test/tests/basic/array-slice.js | 32 + js/src/jit-test/tests/basic/array-tosource.js | 10 + js/src/jit-test/tests/basic/arrayConcat.js | 18 + js/src/jit-test/tests/basic/arrayPopShift.js | 30 + js/src/jit-test/tests/basic/arrayProto.js | 12 + .../jit-test/tests/basic/assign-primitive-error.js | 18 + .../basic/assign-primitive-proxy-class-error.js | 14 + .../jit-test/tests/basic/assign-reuse-propmap.js | 41 + js/src/jit-test/tests/basic/basic-fuses.js | 57 + js/src/jit-test/tests/basic/bigLoadStoreDisp.js | 25 + .../tests/basic/bindname-in-strict-eval.js | 3 + js/src/jit-test/tests/basic/bitwiseAnd.js | 10 + js/src/jit-test/tests/basic/bitwiseGlobal.js | 8 + js/src/jit-test/tests/basic/blinterp-jitoption.js | 3 + .../jit-test/tests/basic/bound-function-proto.js | 18 + js/src/jit-test/tests/basic/bug-1133377.js | 11 + js/src/jit-test/tests/basic/bug-1198090.js | 9 + js/src/jit-test/tests/basic/bug-1240532.js | 3 + js/src/jit-test/tests/basic/bug-1271507.js | 11 + js/src/jit-test/tests/basic/bug-1649234-1.js | 8 + js/src/jit-test/tests/basic/bug-1649234-2.js | 9 + js/src/jit-test/tests/basic/bug-1649234-3.js | 14 + js/src/jit-test/tests/basic/bug-1663741.js | 29 + js/src/jit-test/tests/basic/bug-1665583.js | 41 + js/src/jit-test/tests/basic/bug-1707422.js | 14 + js/src/jit-test/tests/basic/bug-508061.js | 11 + js/src/jit-test/tests/basic/bug-826124.js | 14 + js/src/jit-test/tests/basic/bug1001090-1.js | 2 + js/src/jit-test/tests/basic/bug1001090-2.js | 5 + js/src/jit-test/tests/basic/bug1001090-3.js | 27 + js/src/jit-test/tests/basic/bug1001090-4.js | 30 + js/src/jit-test/tests/basic/bug1001090-5.js | 6 + js/src/jit-test/tests/basic/bug1001090-6.js | 7 + js/src/jit-test/tests/basic/bug1003161.js | 8 + js/src/jit-test/tests/basic/bug1008339.js | 64 + js/src/jit-test/tests/basic/bug1013922.js | 67 + js/src/jit-test/tests/basic/bug1015339.js | 8 + js/src/jit-test/tests/basic/bug1015766.js | 10 + js/src/jit-test/tests/basic/bug1018620.js | 5 + js/src/jit-test/tests/basic/bug1024786.js | 65 + js/src/jit-test/tests/basic/bug1033946.js | 2 + .../bug1035287-track-allocation-sites-recursion.js | 7 + js/src/jit-test/tests/basic/bug1035325.js | 1 + js/src/jit-test/tests/basic/bug1054243.js | 3 + js/src/jit-test/tests/basic/bug1057571.js | 15 + js/src/jit-test/tests/basic/bug1059459.js | 1 + js/src/jit-test/tests/basic/bug1061534.js | 15 + js/src/jit-test/tests/basic/bug1066414.js | 1 + js/src/jit-test/tests/basic/bug1078871.js | 44 + js/src/jit-test/tests/basic/bug1081175.js | 20 + js/src/jit-test/tests/basic/bug1085464.js | 20 + js/src/jit-test/tests/basic/bug1091757.js | 11 + js/src/jit-test/tests/basic/bug1100623.js | 16 + js/src/jit-test/tests/basic/bug1106982-2.js | 15 + js/src/jit-test/tests/basic/bug1106982.js | 19 + js/src/jit-test/tests/basic/bug1113980.js | 10 + js/src/jit-test/tests/basic/bug1118996.js | 13 + js/src/jit-test/tests/basic/bug1122534.js | 16 + js/src/jit-test/tests/basic/bug1122581.js | 10 + js/src/jit-test/tests/basic/bug1127303.js | 9 + js/src/jit-test/tests/basic/bug1131035.js | 9 + js/src/jit-test/tests/basic/bug1134146.js | 10 + js/src/jit-test/tests/basic/bug1135718.js | 14 + js/src/jit-test/tests/basic/bug1137616.js | 9 + js/src/jit-test/tests/basic/bug1141154.js | 19 + js/src/jit-test/tests/basic/bug1141329.js | 15 + js/src/jit-test/tests/basic/bug1143106.js | 8 + js/src/jit-test/tests/basic/bug1146836.js | 11 + js/src/jit-test/tests/basic/bug1147216.js | 25 + js/src/jit-test/tests/basic/bug1153057.js | 1 + js/src/jit-test/tests/basic/bug1161762.js | 24 + js/src/jit-test/tests/basic/bug1170355.js | 3 + js/src/jit-test/tests/basic/bug1172503-2.js | 14 + js/src/jit-test/tests/basic/bug1177907.js | 4 + js/src/jit-test/tests/basic/bug1180054.js | 6 + js/src/jit-test/tests/basic/bug1182865.js | 8 + js/src/jit-test/tests/basic/bug1185653.js | 28 + js/src/jit-test/tests/basic/bug1189744.js | 11 + js/src/jit-test/tests/basic/bug1190733.js | 7 + js/src/jit-test/tests/basic/bug1195452.js | 42 + js/src/jit-test/tests/basic/bug1196579.js | 14 + js/src/jit-test/tests/basic/bug1203790.js | 10 + js/src/jit-test/tests/basic/bug1204722.js | 7 + js/src/jit-test/tests/basic/bug1205870.js | 16 + js/src/jit-test/tests/basic/bug1206265.js | 8 + js/src/jit-test/tests/basic/bug1207863.js | 21 + js/src/jit-test/tests/basic/bug1208403.js | 2 + js/src/jit-test/tests/basic/bug1210596.js | 4 + js/src/jit-test/tests/basic/bug1219128-1.js | 8 + js/src/jit-test/tests/basic/bug1219128-2.js | 4 + js/src/jit-test/tests/basic/bug1219128-3.js | 6 + js/src/jit-test/tests/basic/bug1219128-4.js | 6 + js/src/jit-test/tests/basic/bug1219128-5.js | 6 + js/src/jit-test/tests/basic/bug1219128-6.js | 6 + js/src/jit-test/tests/basic/bug1219128-7.js | 34 + js/src/jit-test/tests/basic/bug1219128-8.js | 4 + js/src/jit-test/tests/basic/bug1219363.js | 9 + js/src/jit-test/tests/basic/bug1232269.js | 30 + js/src/jit-test/tests/basic/bug1234414.js | 11 + js/src/jit-test/tests/basic/bug1236476.js | 18 + js/src/jit-test/tests/basic/bug1237564.js | 8 + js/src/jit-test/tests/basic/bug1238003.js | 15 + js/src/jit-test/tests/basic/bug1238630.js | 7 + js/src/jit-test/tests/basic/bug1240502.js | 2 + js/src/jit-test/tests/basic/bug1247926.js | 6 + js/src/jit-test/tests/basic/bug1263868.js | 11 + js/src/jit-test/tests/basic/bug1264954.js | 7 + js/src/jit-test/tests/basic/bug1265693.js | 2 + js/src/jit-test/tests/basic/bug1276882.js | 5 + js/src/jit-test/tests/basic/bug1278839.js | 3 + js/src/jit-test/tests/basic/bug1280252.js | 9 + js/src/jit-test/tests/basic/bug1285227.js | 4 + js/src/jit-test/tests/basic/bug1292858.js | 60 + js/src/jit-test/tests/basic/bug1293258.js | 10 + js/src/jit-test/tests/basic/bug1293575.js | 9 + js/src/jit-test/tests/basic/bug1295031.js | 24 + js/src/jit-test/tests/basic/bug1296015.js | 13 + js/src/jit-test/tests/basic/bug1296016.js | 6 + js/src/jit-test/tests/basic/bug1296249.js | 7 + js/src/jit-test/tests/basic/bug1300548.js | 13 + js/src/jit-test/tests/basic/bug1300904.js | 6 + js/src/jit-test/tests/basic/bug1301797.js | 4 + js/src/jit-test/tests/basic/bug1302682.js | 10 + js/src/jit-test/tests/basic/bug1310418.js | 9 + js/src/jit-test/tests/basic/bug1317402.js | 8 + js/src/jit-test/tests/basic/bug1341326.js | 14 + js/src/jit-test/tests/basic/bug1344265.js | 3 + js/src/jit-test/tests/basic/bug1348407.js | 5 + js/src/jit-test/tests/basic/bug1355573.js | 10 + js/src/jit-test/tests/basic/bug1372956.js | 5 + js/src/jit-test/tests/basic/bug1373356.js | 6 + js/src/jit-test/tests/basic/bug1380962.js | 11 + js/src/jit-test/tests/basic/bug1403679.js | 195 + js/src/jit-test/tests/basic/bug1407058.js | 16 + js/src/jit-test/tests/basic/bug1411294.js | 12 + js/src/jit-test/tests/basic/bug1420961.js | 5 + js/src/jit-test/tests/basic/bug1445854.js | 4 + js/src/jit-test/tests/basic/bug1447996.js | 10 + js/src/jit-test/tests/basic/bug1459258.js | 7 + js/src/jit-test/tests/basic/bug1470732.js | 10 + js/src/jit-test/tests/basic/bug1473256.js | 5 + js/src/jit-test/tests/basic/bug1483182.js | 15 + js/src/jit-test/tests/basic/bug1492920.js | 41 + js/src/jit-test/tests/basic/bug1493627.js | 4 + js/src/jit-test/tests/basic/bug1516406.js | 2 + js/src/jit-test/tests/basic/bug1520783.js | 2 + js/src/jit-test/tests/basic/bug1527592.js | 7 + js/src/jit-test/tests/basic/bug1532265.js | 33 + js/src/jit-test/tests/basic/bug1548759-1.js | 6 + js/src/jit-test/tests/basic/bug1548759-2.js | 8 + js/src/jit-test/tests/basic/bug1549035.js | 11 + js/src/jit-test/tests/basic/bug1554748.js | 1 + js/src/jit-test/tests/basic/bug1568029.js | 19 + js/src/jit-test/tests/basic/bug1574725.js | 5 + js/src/jit-test/tests/basic/bug1584027.js | 3 + js/src/jit-test/tests/basic/bug1589002.js | 7 + js/src/jit-test/tests/basic/bug1601074.js | 13 + js/src/jit-test/tests/basic/bug1610192.js | 5 + js/src/jit-test/tests/basic/bug1644839-2.js | 5 + js/src/jit-test/tests/basic/bug1644839.js | 5 + js/src/jit-test/tests/basic/bug1656744.js | 8 + js/src/jit-test/tests/basic/bug1666856.js | 8 + js/src/jit-test/tests/basic/bug1669616.js | 9 + js/src/jit-test/tests/basic/bug1678442.js | 6 + js/src/jit-test/tests/basic/bug1700525.js | 14 + js/src/jit-test/tests/basic/bug1707820.js | 9 + js/src/jit-test/tests/basic/bug1717408.js | 5 + js/src/jit-test/tests/basic/bug1721006.js | 15 + js/src/jit-test/tests/basic/bug1731540.js | 4 + js/src/jit-test/tests/basic/bug1733899.js | 14 + js/src/jit-test/tests/basic/bug1754968.js | 4 + js/src/jit-test/tests/basic/bug1757476.js | 16 + js/src/jit-test/tests/basic/bug1759029-1.js | 26 + js/src/jit-test/tests/basic/bug1759029-2.js | 27 + js/src/jit-test/tests/basic/bug1797486.js | 5 + js/src/jit-test/tests/basic/bug1814000.js | 12 + js/src/jit-test/tests/basic/bug1816311.js | 13 + js/src/jit-test/tests/basic/bug1821959.js | 7 + js/src/jit-test/tests/basic/bug1822962.js | 2 + js/src/jit-test/tests/basic/bug1827072.js | 19 + js/src/jit-test/tests/basic/bug1833517.js | 6 + js/src/jit-test/tests/basic/bug1845698.js | 9 + js/src/jit-test/tests/basic/bug1866540.js | 10 + js/src/jit-test/tests/basic/bug1870747.js | 7 + js/src/jit-test/tests/basic/bug1875363.js | 8 + js/src/jit-test/tests/basic/bug1877586.js | 9 + js/src/jit-test/tests/basic/bug504587-1.js | 13 + js/src/jit-test/tests/basic/bug507180.js | 69 + js/src/jit-test/tests/basic/bug509639.js | 3 + js/src/jit-test/tests/basic/bug509982.js | 15 + js/src/jit-test/tests/basic/bug510434.js | 2 + js/src/jit-test/tests/basic/bug510437-2.js | 13 + js/src/jit-test/tests/basic/bug511214.js | 18 + js/src/jit-test/tests/basic/bug511241.js | 15 + js/src/jit-test/tests/basic/bug513038.js | 16 + js/src/jit-test/tests/basic/bug513898-regexp.js | 51 + js/src/jit-test/tests/basic/bug516009.js | 20 + js/src/jit-test/tests/basic/bug517721.js | 8 + js/src/jit-test/tests/basic/bug519129.js | 1 + js/src/jit-test/tests/basic/bug520498.js | 9 + js/src/jit-test/tests/basic/bug522136.js | 10 + js/src/jit-test/tests/basic/bug522817.js | 17 + js/src/jit-test/tests/basic/bug524826-2.js | 11 + js/src/jit-test/tests/basic/bug524826.js | 10 + js/src/jit-test/tests/basic/bug525028.js | 16 + js/src/jit-test/tests/basic/bug528116.js | 8 + js/src/jit-test/tests/basic/bug532568-2.js | 20 + js/src/jit-test/tests/basic/bug532568.js | 19 + js/src/jit-test/tests/basic/bug532823.js | 23 + js/src/jit-test/tests/basic/bug535474.js | 27 + js/src/jit-test/tests/basic/bug535760.js | 13 + js/src/jit-test/tests/basic/bug535930.js | 19 + js/src/jit-test/tests/basic/bug536445.js | 10 + js/src/jit-test/tests/basic/bug536748.js | 8 + js/src/jit-test/tests/basic/bug539379.js | 9 + js/src/jit-test/tests/basic/bug539553-2.js | 9 + js/src/jit-test/tests/basic/bug539553-3.js | 11 + js/src/jit-test/tests/basic/bug539553.js | 11 + js/src/jit-test/tests/basic/bug541191-1.js | 23 + js/src/jit-test/tests/basic/bug541191-2.js | 23 + js/src/jit-test/tests/basic/bug541191-3.js | 23 + js/src/jit-test/tests/basic/bug541191-4.js | 27 + js/src/jit-test/tests/basic/bug541191-5.js | 24 + js/src/jit-test/tests/basic/bug552196.js | 12 + js/src/jit-test/tests/basic/bug557841.js | 1 + js/src/jit-test/tests/basic/bug558530.js | 14 + js/src/jit-test/tests/basic/bug558531.js | 46 + js/src/jit-test/tests/basic/bug558814.js | 10 + js/src/jit-test/tests/basic/bug559912.js | 12 + js/src/jit-test/tests/basic/bug560234.js | 10 + js/src/jit-test/tests/basic/bug560234b.js | 12 + js/src/jit-test/tests/basic/bug561279.js | 4 + js/src/jit-test/tests/basic/bug561359-1.js | 4 + js/src/jit-test/tests/basic/bug561359-2.js | 8 + js/src/jit-test/tests/basic/bug563125.js | 5 + js/src/jit-test/tests/basic/bug563243.js | 7 + js/src/jit-test/tests/basic/bug566136.js | 11 + js/src/jit-test/tests/basic/bug566637.js | 5 + js/src/jit-test/tests/basic/bug568276.js | 1 + js/src/jit-test/tests/basic/bug569651.js | 3 + js/src/jit-test/tests/basic/bug570385-1.js | 9 + js/src/jit-test/tests/basic/bug570385-2.js | 9 + js/src/jit-test/tests/basic/bug570385-3.js | 11 + js/src/jit-test/tests/basic/bug570663-1.js | 4 + js/src/jit-test/tests/basic/bug570663-2.js | 12 + js/src/jit-test/tests/basic/bug572229.js | 12 + js/src/jit-test/tests/basic/bug572232.js | 4 + js/src/jit-test/tests/basic/bug576823-regexp.js | 3 + js/src/jit-test/tests/basic/bug576837-regexp.js | 41 + js/src/jit-test/tests/basic/bug576891.js | 1 + js/src/jit-test/tests/basic/bug578041.js | 3 + js/src/jit-test/tests/basic/bug579740.js | 7 + js/src/jit-test/tests/basic/bug582161.js | 3 + js/src/jit-test/tests/basic/bug582479.js | 4 + js/src/jit-test/tests/basic/bug583757.js | 24 + js/src/jit-test/tests/basic/bug584499-1.js | 6 + js/src/jit-test/tests/basic/bug584499-2.js | 12 + js/src/jit-test/tests/basic/bug584565.js | 10 + js/src/jit-test/tests/basic/bug584603.js | 13 + js/src/jit-test/tests/basic/bug585542.js | 11 + js/src/jit-test/tests/basic/bug586499-regexp.js | 2 + js/src/jit-test/tests/basic/bug586917.js | 1834 + js/src/jit-test/tests/basic/bug587346-regexp-01.js | 1 + js/src/jit-test/tests/basic/bug587366.js | 3 + js/src/jit-test/tests/basic/bug589318.js | 10 + js/src/jit-test/tests/basic/bug590006.js | 12 + js/src/jit-test/tests/basic/bug590036.js | 13 + js/src/jit-test/tests/basic/bug592927.js | 27 + js/src/jit-test/tests/basic/bug593611.js | 11 + js/src/jit-test/tests/basic/bug593663-regexp.js | 111 + js/src/jit-test/tests/basic/bug594108.js | 8 + js/src/jit-test/tests/basic/bug594205.js | 16 + js/src/jit-test/tests/basic/bug595963-1.js | 19 + js/src/jit-test/tests/basic/bug595963-2.js | 19 + js/src/jit-test/tests/basic/bug596351-1.js | 5 + js/src/jit-test/tests/basic/bug596351-2.js | 7 + js/src/jit-test/tests/basic/bug599854.js | 4 + js/src/jit-test/tests/basic/bug601046.js | 8 + js/src/jit-test/tests/basic/bug601398.js | 8 + js/src/jit-test/tests/basic/bug601401.js | 6 + js/src/jit-test/tests/basic/bug601428.js | 2 + js/src/jit-test/tests/basic/bug605754-regexp.js | 2 + js/src/jit-test/tests/basic/bug606083.js | 32 + js/src/jit-test/tests/basic/bug606882-1.js | 3 + js/src/jit-test/tests/basic/bug606882-2.js | 16 + js/src/jit-test/tests/basic/bug608313.js | 11 + js/src/jit-test/tests/basic/bug608980.js | 11 + js/src/jit-test/tests/basic/bug609502-1.js | 9 + js/src/jit-test/tests/basic/bug609502-2.js | 5 + js/src/jit-test/tests/basic/bug610592.js | 29 + js/src/jit-test/tests/basic/bug613122.js | 4 + js/src/jit-test/tests/basic/bug613151.js | 18 + js/src/jit-test/tests/basic/bug613399.js | 3 + js/src/jit-test/tests/basic/bug614688.js | 7 + js/src/jit-test/tests/basic/bug614915.js | 2 + js/src/jit-test/tests/basic/bug616009.js | 35 + js/src/jit-test/tests/basic/bug616170.js | 17 + js/src/jit-test/tests/basic/bug616762.js | 26 + js/src/jit-test/tests/basic/bug617139.js | 9 + js/src/jit-test/tests/basic/bug617171.js | 4 + js/src/jit-test/tests/basic/bug617745.js | 4 + js/src/jit-test/tests/basic/bug618350.js | 24 + js/src/jit-test/tests/basic/bug618577.js | 5 + js/src/jit-test/tests/basic/bug618853.js | 12 + js/src/jit-test/tests/basic/bug619004.js | 3 + js/src/jit-test/tests/basic/bug619338.js | 1 + js/src/jit-test/tests/basic/bug620532.js | 15 + js/src/jit-test/tests/basic/bug620838.js | 22 + js/src/jit-test/tests/basic/bug621022-1.js | 14 + js/src/jit-test/tests/basic/bug621022-2.js | 13 + js/src/jit-test/tests/basic/bug621487.js | 4 + js/src/jit-test/tests/basic/bug623859.js | 10 + js/src/jit-test/tests/basic/bug623863.js | 5 + js/src/jit-test/tests/basic/bug624041-1.js | 8 + js/src/jit-test/tests/basic/bug624041-2.js | 11 + js/src/jit-test/tests/basic/bug625141-1.js | 13 + js/src/jit-test/tests/basic/bug625141-2.js | 13 + js/src/jit-test/tests/basic/bug625399.js | 7 + js/src/jit-test/tests/basic/bug626398.js | 30 + js/src/jit-test/tests/basic/bug627609.js | 2 + js/src/jit-test/tests/basic/bug629858.js | 9 + js/src/jit-test/tests/basic/bug630865-5.js | 13 + js/src/jit-test/tests/basic/bug630865-6.js | 11 + js/src/jit-test/tests/basic/bug631082.js | 13 + js/src/jit-test/tests/basic/bug631219.js | 10 + js/src/jit-test/tests/basic/bug631788.js | 1 + js/src/jit-test/tests/basic/bug632778-1.js | 5 + js/src/jit-test/tests/basic/bug632778-2.js | 2 + js/src/jit-test/tests/basic/bug632901.js | 9 + js/src/jit-test/tests/basic/bug632964-regexp.js | 14 + js/src/jit-test/tests/basic/bug633409-1.js | 13 + js/src/jit-test/tests/basic/bug633409-2.js | 13 + js/src/jit-test/tests/basic/bug633752.js | 11 + js/src/jit-test/tests/basic/bug633828.js | 6 + js/src/jit-test/tests/basic/bug634593.js | 4 + js/src/jit-test/tests/basic/bug635417.js | 2 + js/src/jit-test/tests/basic/bug638981.js | 4 + js/src/jit-test/tests/basic/bug639126.js | 4 + js/src/jit-test/tests/basic/bug639128.js | 10 + js/src/jit-test/tests/basic/bug639311.js | 18 + js/src/jit-test/tests/basic/bug639591.js | 4 + js/src/jit-test/tests/basic/bug639759.js | 9 + js/src/jit-test/tests/basic/bug639797.js | 1 + js/src/jit-test/tests/basic/bug639807.js | 4 + js/src/jit-test/tests/basic/bug640203.js | 2 + js/src/jit-test/tests/basic/bug640993.js | 7 + js/src/jit-test/tests/basic/bug641229.js | 2 + js/src/jit-test/tests/basic/bug641231.js | 1 + js/src/jit-test/tests/basic/bug641235.js | 21 + js/src/jit-test/tests/basic/bug641491.js | 19 + js/src/jit-test/tests/basic/bug641525.js | 34 + js/src/jit-test/tests/basic/bug641563.js | 3 + js/src/jit-test/tests/basic/bug641741.js | 1 + js/src/jit-test/tests/basic/bug642154.js | 16 + js/src/jit-test/tests/basic/bug642161.js | 1 + js/src/jit-test/tests/basic/bug642164.js | 14 + js/src/jit-test/tests/basic/bug642206.js | 30 + js/src/jit-test/tests/basic/bug642248.js | 10 + js/src/jit-test/tests/basic/bug642254.js | 4 + js/src/jit-test/tests/basic/bug642319.js | 10 + js/src/jit-test/tests/basic/bug642326.js | 8 + js/src/jit-test/tests/basic/bug642422.js | 4 + js/src/jit-test/tests/basic/bug642569.js | 13 + js/src/jit-test/tests/basic/bug642592.js | 2 + js/src/jit-test/tests/basic/bug642758.js | 4 + js/src/jit-test/tests/basic/bug642772-1.js | 19 + js/src/jit-test/tests/basic/bug642772-2.js | 101 + js/src/jit-test/tests/basic/bug642772-3.js | 5 + js/src/jit-test/tests/basic/bug642894.js | 9 + js/src/jit-test/tests/basic/bug642985-1.js | 23 + js/src/jit-test/tests/basic/bug642985-2.js | 23 + js/src/jit-test/tests/basic/bug643113.js | 11 + js/src/jit-test/tests/basic/bug643169.js | 7 + js/src/jit-test/tests/basic/bug643243.js | 11 + js/src/jit-test/tests/basic/bug643244.js | 2 + js/src/jit-test/tests/basic/bug643249.js | 13 + js/src/jit-test/tests/basic/bug643285.js | 4 + js/src/jit-test/tests/basic/bug643733.js | 4 + js/src/jit-test/tests/basic/bug645293.js | 12 + js/src/jit-test/tests/basic/bug645632.js | 6 + js/src/jit-test/tests/basic/bug646393.js | 4 + js/src/jit-test/tests/basic/bug646968-3.js | 16 + js/src/jit-test/tests/basic/bug646968-4.js | 10 + js/src/jit-test/tests/basic/bug646968-5.js | 9 + js/src/jit-test/tests/basic/bug646968-6.js | 16 + js/src/jit-test/tests/basic/bug646968-7.js | 10 + js/src/jit-test/tests/basic/bug646968-8.js | 8 + js/src/jit-test/tests/basic/bug647463.js | 6 + js/src/jit-test/tests/basic/bug648357.js | 3 + js/src/jit-test/tests/basic/bug648773.js | 4 + js/src/jit-test/tests/basic/bug649439.js | 3 + js/src/jit-test/tests/basic/bug649771.js | 7 + js/src/jit-test/tests/basic/bug651451-2.js | 6 + js/src/jit-test/tests/basic/bug651451.js | 4 + js/src/jit-test/tests/basic/bug651966.js | 38 + js/src/jit-test/tests/basic/bug652054.js | 55 + js/src/jit-test/tests/basic/bug652060.js | 9 + js/src/jit-test/tests/basic/bug652422.js | 6 + js/src/jit-test/tests/basic/bug652646.js | 11 + js/src/jit-test/tests/basic/bug653153.js | 76 + js/src/jit-test/tests/basic/bug653262.js | 4 + js/src/jit-test/tests/basic/bug653438.js | 2 + js/src/jit-test/tests/basic/bug653672.js | 5 + js/src/jit-test/tests/basic/bug654073.js | 11 + js/src/jit-test/tests/basic/bug654668.js | 10 + js/src/jit-test/tests/basic/bug656261.js | 31 + js/src/jit-test/tests/basic/bug657197.js | 5 + js/src/jit-test/tests/basic/bug657225.js | 9 + js/src/jit-test/tests/basic/bug657245.js | 4 + js/src/jit-test/tests/basic/bug657901.js | 8 + js/src/jit-test/tests/basic/bug658539.js | 2 + js/src/jit-test/tests/basic/bug660081.js | 1 + js/src/jit-test/tests/basic/bug660173.js | 4 + js/src/jit-test/tests/basic/bug660203.js | 9 + js/src/jit-test/tests/basic/bug660204.js | 12 + js/src/jit-test/tests/basic/bug660597.js | 5 + js/src/jit-test/tests/basic/bug662044.js | 12 + js/src/jit-test/tests/basic/bug662841.js | 4 + js/src/jit-test/tests/basic/bug663338.js | 26 + js/src/jit-test/tests/basic/bug665289.js | 4 + js/src/jit-test/tests/basic/bug666448.js | 1 + js/src/jit-test/tests/basic/bug667504-syntax.js | 3 + js/src/jit-test/tests/basic/bug667507.js | 6 + js/src/jit-test/tests/basic/bug673468.js | 8 + js/src/jit-test/tests/basic/bug673469.js | 9 + js/src/jit-test/tests/basic/bug673569.js | 18 + js/src/jit-test/tests/basic/bug673705-1.js | 10 + js/src/jit-test/tests/basic/bug673705-2.js | 12 + js/src/jit-test/tests/basic/bug673715.js | 10 + js/src/jit-test/tests/basic/bug673731.js | 3 + js/src/jit-test/tests/basic/bug673766.js | 20 + js/src/jit-test/tests/basic/bug673767.js | 2 + js/src/jit-test/tests/basic/bug674085.js | 6 + js/src/jit-test/tests/basic/bug674776.js | 18 + js/src/jit-test/tests/basic/bug677635.js | 7 + js/src/jit-test/tests/basic/bug678211.js | 3 + js/src/jit-test/tests/basic/bug679977.js | 26 + js/src/jit-test/tests/basic/bug679986-1.js | 2 + js/src/jit-test/tests/basic/bug679986-2.js | 2 + js/src/jit-test/tests/basic/bug680217.js | 13 + js/src/jit-test/tests/basic/bug683140.js | 13 + js/src/jit-test/tests/basic/bug683838.js | 3 + js/src/jit-test/tests/basic/bug685313.js | 11 + js/src/jit-test/tests/basic/bug685321-1.js | 11 + js/src/jit-test/tests/basic/bug685321-2.js | 13 + js/src/jit-test/tests/basic/bug686296.js | 3 + js/src/jit-test/tests/basic/bug686396.js | 16 + js/src/jit-test/tests/basic/bug688939.js | 4 + js/src/jit-test/tests/basic/bug689916-regexp.js | 4 + js/src/jit-test/tests/basic/bug690732.js | 4 + js/src/jit-test/tests/basic/bug691797-regexp-1.js | 4 + js/src/jit-test/tests/basic/bug691797-regexp-2.js | 6 + js/src/jit-test/tests/basic/bug695922-syntax.js | 2 + js/src/jit-test/tests/basic/bug696748.js | 13 + js/src/jit-test/tests/basic/bug699166.js | 7 + js/src/jit-test/tests/basic/bug700300.js | 4 + js/src/jit-test/tests/basic/bug702426-regexp-gc.js | 5 + js/src/jit-test/tests/basic/bug702572.js | 10 + js/src/jit-test/tests/basic/bug703157.js | 36 + js/src/jit-test/tests/basic/bug703544.js | 7 + js/src/jit-test/tests/basic/bug703818.js | 3 + js/src/jit-test/tests/basic/bug704134.js | 12 + js/src/jit-test/tests/basic/bug705895-1.js | 16 + js/src/jit-test/tests/basic/bug705895-2.js | 13 + js/src/jit-test/tests/basic/bug706316.js | 11 + js/src/jit-test/tests/basic/bug706795.js | 7 + js/src/jit-test/tests/basic/bug706808.js | 5 + js/src/jit-test/tests/basic/bug707750.js | 9 + js/src/jit-test/tests/basic/bug708228.js | 5 + js/src/jit-test/tests/basic/bug708819.js | 12 + js/src/jit-test/tests/basic/bug709634.js | 6 + js/src/jit-test/tests/basic/bug710947.js | 8 + js/src/jit-test/tests/basic/bug713226.js | 20 + js/src/jit-test/tests/basic/bug714614.js | 5 + js/src/jit-test/tests/basic/bug714616.js | 8 + js/src/jit-test/tests/basic/bug716013.js | 4 + js/src/jit-test/tests/basic/bug718852.js | 15 + js/src/jit-test/tests/basic/bug719750.js | 12 + js/src/jit-test/tests/basic/bug720070.js | 6 + js/src/jit-test/tests/basic/bug720675.js | 9 + js/src/jit-test/tests/basic/bug722028.js | 13 + js/src/jit-test/tests/basic/bug727223.js | 15 + js/src/jit-test/tests/basic/bug727921.js | 11 + js/src/jit-test/tests/basic/bug728086.js | 66 + js/src/jit-test/tests/basic/bug728190.js | 24 + js/src/jit-test/tests/basic/bug728609.js | 23 + js/src/jit-test/tests/basic/bug730085.js | 6 + js/src/jit-test/tests/basic/bug730888.js | 14 + js/src/jit-test/tests/basic/bug731642.js | 2 + js/src/jit-test/tests/basic/bug732693.js | 10 + js/src/jit-test/tests/basic/bug737384.js | 10 + js/src/jit-test/tests/basic/bug738841.js | 49 + js/src/jit-test/tests/basic/bug738846.js | 49 + js/src/jit-test/tests/basic/bug739694-2.js | 8 + js/src/jit-test/tests/basic/bug743961.js | 2 + js/src/jit-test/tests/basic/bug744285.js | 71 + js/src/jit-test/tests/basic/bug744287.js | 6 + js/src/jit-test/tests/basic/bug744356.js | 14 + js/src/jit-test/tests/basic/bug745360.js | 2 + js/src/jit-test/tests/basic/bug749039.js | 11 + js/src/jit-test/tests/basic/bug749620.js | 16 + js/src/jit-test/tests/basic/bug750307.js | 5 + js/src/jit-test/tests/basic/bug754150.js | 49 + js/src/jit-test/tests/basic/bug754242.js | 7 + js/src/jit-test/tests/basic/bug756851.js | 10 + js/src/jit-test/tests/basic/bug757199.js | 23 + js/src/jit-test/tests/basic/bug757431.js | 18 + js/src/jit-test/tests/basic/bug763440.js | 26 + js/src/jit-test/tests/basic/bug767074.js | 11 + js/src/jit-test/tests/basic/bug767234.js | 14 + js/src/jit-test/tests/basic/bug767273.js | 7 + js/src/jit-test/tests/basic/bug768732.js | 6 + js/src/jit-test/tests/basic/bug769433.js | 8 + js/src/jit-test/tests/basic/bug770952.js | 7 + js/src/jit-test/tests/basic/bug773153.js | 3 + js/src/jit-test/tests/basic/bug774859.js | 16 + js/src/jit-test/tests/basic/bug777776.js | 5 + js/src/jit-test/tests/basic/bug777992.js | 9 + js/src/jit-test/tests/basic/bug781393.js | 14 + js/src/jit-test/tests/basic/bug782337.js | 15 + js/src/jit-test/tests/basic/bug783989.js | 2 + js/src/jit-test/tests/basic/bug785094.js | 2 + js/src/jit-test/tests/basic/bug785175.js | 9 + js/src/jit-test/tests/basic/bug786114.js | 32 + js/src/jit-test/tests/basic/bug787847.js | 22 + js/src/jit-test/tests/basic/bug791465.js | 75 + js/src/jit-test/tests/basic/bug792239.js | 6 + js/src/jit-test/tests/basic/bug794025.js | 15 + js/src/jit-test/tests/basic/bug794286.js | 6 + js/src/jit-test/tests/basic/bug794947.js | 10 + js/src/jit-test/tests/basic/bug797496.js | 8 + js/src/jit-test/tests/basic/bug798678.js | 10 + js/src/jit-test/tests/basic/bug798834.js | 5 + js/src/jit-test/tests/basic/bug806522.js | 7 + js/src/jit-test/tests/basic/bug807623.js | 12 + js/src/jit-test/tests/basic/bug808067.js | 20 + js/src/jit-test/tests/basic/bug808483.js | 16 + js/src/jit-test/tests/basic/bug817002.js | 13 + js/src/jit-test/tests/basic/bug820124-1.js | 5 + js/src/jit-test/tests/basic/bug820124-2.js | 3 + js/src/jit-test/tests/basic/bug820124-3.js | 8 + js/src/jit-test/tests/basic/bug820124-4.js | 8 + js/src/jit-test/tests/basic/bug821850.js | 9 + js/src/jit-test/tests/basic/bug824856.js | 6 + js/src/jit-test/tests/basic/bug826581.js | 12 + js/src/jit-test/tests/basic/bug827104.js | 14 + js/src/jit-test/tests/basic/bug829795.js | 7 + js/src/jit-test/tests/basic/bug829813.js | 6 + js/src/jit-test/tests/basic/bug829821.js | 5 + js/src/jit-test/tests/basic/bug830045.js | 6 + js/src/jit-test/tests/basic/bug830049.js | 12 + js/src/jit-test/tests/basic/bug830967.js | 4 + js/src/jit-test/tests/basic/bug831658.js | 4 + js/src/jit-test/tests/basic/bug832197-1.js | 4 + js/src/jit-test/tests/basic/bug832197-2.js | 13 + js/src/jit-test/tests/basic/bug832203.js | 11 + js/src/jit-test/tests/basic/bug836563.js | 5 + js/src/jit-test/tests/basic/bug836623.js | 13 + js/src/jit-test/tests/basic/bug839420.js | 17 + js/src/jit-test/tests/basic/bug842425.js | 12 + js/src/jit-test/tests/basic/bug842482.js | 2 + js/src/jit-test/tests/basic/bug842940.js | 1 + js/src/jit-test/tests/basic/bug846080.js | 3 + js/src/jit-test/tests/basic/bug851635.js | 7 + js/src/jit-test/tests/basic/bug851756.js | 3 + js/src/jit-test/tests/basic/bug852016-2.js | 8 + js/src/jit-test/tests/basic/bug852016.js | 9 + js/src/jit-test/tests/basic/bug854124.js | 8 + js/src/jit-test/tests/basic/bug854137.js | 6 + js/src/jit-test/tests/basic/bug855088.js | 5 + js/src/jit-test/tests/basic/bug858097.js | 7 + js/src/jit-test/tests/basic/bug862228.js | 3 + js/src/jit-test/tests/basic/bug863084.js | 17 + js/src/jit-test/tests/basic/bug867946.js | 7 + js/src/jit-test/tests/basic/bug876226.js | 6 + js/src/jit-test/tests/basic/bug877378.js | 18 + js/src/jit-test/tests/basic/bug880377.js | 10 + js/src/jit-test/tests/basic/bug882416.js | 5 + js/src/jit-test/tests/basic/bug883523.js | 1 + js/src/jit-test/tests/basic/bug883623.js | 7 + js/src/jit-test/tests/basic/bug884920.js | 7 + js/src/jit-test/tests/basic/bug886803.js | 3 + js/src/jit-test/tests/basic/bug908915.js | 47 + js/src/jit-test/tests/basic/bug911368.js | 10 + js/src/jit-test/tests/basic/bug913445.js | 19 + js/src/jit-test/tests/basic/bug920484.js | 27 + js/src/jit-test/tests/basic/bug934789-1.js | 13 + js/src/jit-test/tests/basic/bug934789-2.js | 15 + js/src/jit-test/tests/basic/bug934997.js | 30 + js/src/jit-test/tests/basic/bug935294.js | 5 + js/src/jit-test/tests/basic/bug937089.js | 10 + js/src/jit-test/tests/basic/bug942390.js | 21 + js/src/jit-test/tests/basic/bug943126.js | 16 + js/src/jit-test/tests/basic/bug950725.js | 12 + js/src/jit-test/tests/basic/bug951213.js | 8 + js/src/jit-test/tests/basic/bug951346.js | 3 + js/src/jit-test/tests/basic/bug951632.js | 9 + js/src/jit-test/tests/basic/bug970643.js | 18 + js/src/jit-test/tests/basic/bug972961.js | 40 + js/src/jit-test/tests/basic/bug976446.js | 16 + js/src/jit-test/tests/basic/bug980013.js | 9 + js/src/jit-test/tests/basic/bug980450.js | 4 + js/src/jit-test/tests/basic/bug984766.js | 17 + js/src/jit-test/tests/basic/builtinLocals.js | 35 + js/src/jit-test/tests/basic/call-construct-hook.js | 100 + js/src/jit-test/tests/basic/call.js | 28 + js/src/jit-test/tests/basic/call2.js | 13 + .../tests/basic/change-code-write-protect.js | 3 + .../tests/basic/compression-random-data.js | 26 + js/src/jit-test/tests/basic/constAssignError.js | 23 + .../jit-test/tests/basic/constGlobalAssignError.js | 3 + js/src/jit-test/tests/basic/constant-folding-1.js | 45 + ...truct-primitive-Function.prototype.prototype.js | 5 + .../basic/consume-interpreter-stack-bug1473289.js | 495 + js/src/jit-test/tests/basic/cross-global-for-in.js | 11 + .../basic/cross-realm-iterator-suppression.js | 32 + js/src/jit-test/tests/basic/date-getLocale-oom.js | 5 + .../tests/basic/date-late-weekday-warning.js | 34 + .../tests/basic/date-methods-this-error.js | 18 + js/src/jit-test/tests/basic/decompile-script.js | 6 + js/src/jit-test/tests/basic/deep2.js | 11 + js/src/jit-test/tests/basic/deepForInLoop.js | 12 + ...ultvalue-toString-is-noncallable-object-elem.js | 4 + .../defaultvalue-toString-is-noncallable-object.js | 3 + .../defaultvalue-valueOf-is-noncallable-object.js | 3 + .../tests/basic/define-frozen-dense-strict.js | 16 + js/src/jit-test/tests/basic/define-frozen-dense.js | 9 + .../tests/basic/define-frozen-property-strict.js | 14 + .../jit-test/tests/basic/define-frozen-property.js | 7 + .../jit-test/tests/basic/delete-all-dict-props.js | 15 + .../jit-test/tests/basic/delete-array-elements.js | 7 + .../jit-test/tests/basic/delete-indexed-names.js | 7 + .../jit-test/tests/basic/delete-integer-nonid.js | 24 + .../tests/basic/delete-last-check-proto.js | 8 + js/src/jit-test/tests/basic/delete-named-names.js | 12 + js/src/jit-test/tests/basic/delete-non-config.js | 4 + js/src/jit-test/tests/basic/deleteToString.js | 5 + .../jit-test/tests/basic/dense-elements-appear.js | 28 + .../tests/basic/dense-elements-hole-negative.js | 31 + js/src/jit-test/tests/basic/densify-elements.js | 15 + js/src/jit-test/tests/basic/dependentStrings.js | 11 + .../jit-test/tests/basic/destructuring-default.js | 251 + .../jit-test/tests/basic/destructuring-iterator.js | 124 + ...ull-or-undefined-into-computed-property-name.js | 47 + .../basic/destructuring-requireobjectcoercible.js | 107 + .../tests/basic/destructuring-rest-identifiers.js | 69 + js/src/jit-test/tests/basic/destructuring-rest.js | 147 + .../tests/basic/dict-object-freeze-or-seal.js | 26 + .../tests/basic/dictionary-add-prop-oom.js | 9 + .../tests/basic/dictionary-delete-compact.js | 74 + js/src/jit-test/tests/basic/disable-jit-backend.js | 19 + .../jit-test/tests/basic/disassemble-filename.js | 10 + .../tests/basic/display-url-in-stack-trace.js | 27 + js/src/jit-test/tests/basic/doMath.js | 60 + .../tests/basic/dumpStringRepresentation.js | 88 + js/src/jit-test/tests/basic/dumpValue.js | 134 + js/src/jit-test/tests/basic/eif-generator.js | 58 + js/src/jit-test/tests/basic/emulates-undefined.js | 18 + js/src/jit-test/tests/basic/equalInt.js | 29 + .../jit-test/tests/basic/error-stack-accessors.js | 31 + js/src/jit-test/tests/basic/error-toString.js | 9 + .../tests/basic/eval-introduction-principals.js | 16 + .../jit-test/tests/basic/eval-json-differences.js | 25 + js/src/jit-test/tests/basic/eval-scopes.js | 74 + .../jit-test/tests/basic/evalInWorker-interrupt.js | 2 + .../tests/basic/evalInWorker-jit-options.js | 11 + js/src/jit-test/tests/basic/evalInWorker-nested.js | 5 + .../tests/basic/evalInWorker-stack-limit.js | 8 + .../tests/basic/evalReturningScope-global.js | 14 + .../tests/basic/evaluate-catchTermination.js | 6 + .../tests/basic/evaluate-global-debuggee.js | 5 + .../tests/basic/evaluate-global-discardSource.js | 11 + .../tests/basic/evaluate-negative-column.js | 3 + .../tests/basic/evaluate-restore-options.js | 11 + js/src/jit-test/tests/basic/evaluate-worker.js | 19 + .../tests/basic/exception-column-number.js | 11 + .../tests/basic/expr-decompiler-bug1475953.js | 35 + js/src/jit-test/tests/basic/expression-autopsy.js | 287 + .../jit-test/tests/basic/external-strings-cgc.js | 7 + js/src/jit-test/tests/basic/external-strings.js | 48 + js/src/jit-test/tests/basic/fannkuch.js | 17 + .../tests/basic/fdlibm-for-sin-cos-tan-argument.js | 7 + .../tests/basic/finally-implicit-return.js | 45 + js/src/jit-test/tests/basic/firstSlotConflict.js | 10 + js/src/jit-test/tests/basic/folding-bug767660.js | 2 + .../tests/basic/for-in-densified-elements.js | 21 + .../tests/basic/for-in-proto-properties.js | 41 + .../jit-test/tests/basic/for-in-replace-sparse.js | 12 + js/src/jit-test/tests/basic/forVarInWith.js | 12 + js/src/jit-test/tests/basic/freeze-builtins.js | 37 + .../jit-test/tests/basic/function-apply-proxy.js | 26 + js/src/jit-test/tests/basic/function-bind.js | 21 + js/src/jit-test/tests/basic/function-cloning-2.js | 9 + js/src/jit-test/tests/basic/function-gname.js | 34 + .../tests/basic/function-tosource-bug779694.js | 8 + .../tests/basic/function-tosource-constructor.js | 16 + .../basic/function-tosource-exprbody-bug777834.js | 5 + .../tests/basic/function-tosource-func-proto.js | 4 + .../tests/basic/function-tosource-getset.js | 13 + .../tests/basic/function-tosource-lambda.js | 18 + .../tests/basic/function-tosource-statement.js | 13 + js/src/jit-test/tests/basic/functionRedeclConst.js | 5 + .../tests/basic/functionRedeclGlobalConst.js | 3 + js/src/jit-test/tests/basic/functionRedeclLet.js | 5 + js/src/jit-test/tests/basic/functionnames.js | 160 + .../jit-test/tests/basic/getBacktrace-invalid.js | 5 + js/src/jit-test/tests/basic/getelem.js | 30 + js/src/jit-test/tests/basic/getprop.js | 16 + .../tests/basic/global-lexicals-function.js | 18 + js/src/jit-test/tests/basic/globalGet.js | 6 + js/src/jit-test/tests/basic/globalOptimize-1.js | 5 + js/src/jit-test/tests/basic/globalSet.js | 4 + .../basic/hasnativemethodpure-optimization.js | 21 + js/src/jit-test/tests/basic/homogenous-literals.js | 50 + js/src/jit-test/tests/basic/html-extensions.js | 87 + js/src/jit-test/tests/basic/hypot-approx.js | 34 + js/src/jit-test/tests/basic/hypot-exact.js | 74 + js/src/jit-test/tests/basic/ifInsideLoop.js | 12 + js/src/jit-test/tests/basic/inArrayTest.js | 9 + js/src/jit-test/tests/basic/inObjectTest.js | 13 + js/src/jit-test/tests/basic/indexed-iteration.js | 20 + js/src/jit-test/tests/basic/indexof-equal.js | 10 + js/src/jit-test/tests/basic/inflate-oom.js | 14 + .../tests/basic/innerLoopIntOuterDouble.js | 11 + .../jit-test/tests/basic/inner_double_outer_int.js | 10 + js/src/jit-test/tests/basic/invokeFunctionMagic.js | 20 + js/src/jit-test/tests/basic/is-valid-json.js | 25 + .../jit-test/tests/basic/iter-cache-null-proto.js | 11 + .../tests/basic/iterable-error-messages.js | 41 + .../tests/basic/iterator-cache-invalidation.js | 52 + js/src/jit-test/tests/basic/jemalloc-settings.js | 7 + js/src/jit-test/tests/basic/joinTest.js | 15 + .../tests/basic/json-parse-object-edge-cases.js | 49 + .../tests/basic/json-stringify-large-length.js | 10 + js/src/jit-test/tests/basic/key-gc.js | 46 + js/src/jit-test/tests/basic/keys-testing.js | 134 + js/src/jit-test/tests/basic/lazyparse.js | 45 + .../jit-test/tests/basic/letTDZAfterInitializer.js | 19 + js/src/jit-test/tests/basic/letTDZEffectful.js | 13 + js/src/jit-test/tests/basic/letTDZSwitchClosure.js | 60 + js/src/jit-test/tests/basic/local.js | 3 + js/src/jit-test/tests/basic/matchInLoop.js | 8 + js/src/jit-test/tests/basic/math-jit-tests.js | 520 + js/src/jit-test/tests/basic/math-random.js | 43 + js/src/jit-test/tests/basic/mathImul.js | 71 + js/src/jit-test/tests/basic/mathRoundBig.js | 10 + js/src/jit-test/tests/basic/max-string-length.js | 18 + js/src/jit-test/tests/basic/maxConvertAllArgs.js | 11 + .../tests/basic/megamorphic-setelem-plain.js | 53 + js/src/jit-test/tests/basic/merge_type_maps.js | 9 + .../tests/basic/metadata-hook-regexp-result.js | 20 + js/src/jit-test/tests/basic/metadata-hook.js | 30 + js/src/jit-test/tests/basic/missingArgTest.js | 12 + js/src/jit-test/tests/basic/missingArgTest2.js | 26 + .../tests/basic/mod-double-power-of-two.js | 152 + js/src/jit-test/tests/basic/mod.js | 14 + .../jit-test/tests/basic/more-compartments-flag.js | 8 + .../tests/basic/multiple-declared-args-syntax.js | 1 + .../tests/basic/mutable-proto-teleporting.js | 18 + js/src/jit-test/tests/basic/name-inactive-del.js | 28 + .../jit-test/tests/basic/name-inactive-eval-del.js | 10 + .../tests/basic/name-inactive-inferflags.js | 18 + js/src/jit-test/tests/basic/name-inactive.js | 15 + js/src/jit-test/tests/basic/name.js | 9 + js/src/jit-test/tests/basic/negative-zero-index.js | 20 + js/src/jit-test/tests/basic/nestedContinue.js | 11 + js/src/jit-test/tests/basic/nestedExit2.js | 17 + js/src/jit-test/tests/basic/nestedExitLoop.js | 14 + .../jit-test/tests/basic/new-Function-prototype.js | 16 + js/src/jit-test/tests/basic/new-bound-function.js | 20 + .../jit-test/tests/basic/new-read-before-write.js | 24 + js/src/jit-test/tests/basic/newArrayTest.js | 8 + js/src/jit-test/tests/basic/newTargetOSR.js | 6 + js/src/jit-test/tests/basic/newTargetRectifier.js | 12 + js/src/jit-test/tests/basic/newTest.js | 14 + js/src/jit-test/tests/basic/non-constructor-msg.js | 7 + .../jit-test/tests/basic/non-extensible-array.js | 7 + .../tests/basic/non-extensible-elements1.js | 50 + .../tests/basic/non-extensible-elements2.js | 279 + .../tests/basic/non-extensible-elements3.js | 65 + .../tests/basic/non-extensible-elements4.js | 27 + .../tests/basic/non-extensible-elements5.js | 15 + .../tests/basic/non-extensible-elements6.js | 144 + .../tests/basic/non-extensible-elements7.js | 42 + .../tests/basic/non-extensible-elements8.js | 43 + .../tests/basic/non-extensible-elements9.js | 187 + js/src/jit-test/tests/basic/nonEmptyStack1.js | 13 + js/src/jit-test/tests/basic/nonEmptyStack2.js | 10 + js/src/jit-test/tests/basic/null-filename-Error.js | 11 + js/src/jit-test/tests/basic/number-isfinite.js | 15 + js/src/jit-test/tests/basic/number-isinteger.js | 15 + js/src/jit-test/tests/basic/number-isnan.js | 15 + .../tests/basic/number-methods-this-error.js | 12 + .../tests/basic/object-assign-plain-cache.js | 68 + js/src/jit-test/tests/basic/object-assign-plain.js | 148 + js/src/jit-test/tests/basic/object-assign.js | 135 + js/src/jit-test/tests/basic/object-is-inlined.js | 48 + .../jit-test/tests/basic/object-is-polymorphic.js | 20 + js/src/jit-test/tests/basic/object-is.js | 41 + .../tests/basic/object-lookup-shadowing.js | 5 + .../jit-test/tests/basic/object-loose-equality.js | 58 + js/src/jit-test/tests/basic/object-rest.js | 90 + js/src/jit-test/tests/basic/object-shorthand.js | 90 + js/src/jit-test/tests/basic/object-spread.js | 49 + js/src/jit-test/tests/basic/object-tostring.js | 60 + .../tests/basic/offThreadCompileToStencil-01.js | 30 + .../tests/basic/offThreadCompileToStencil-02.js | 25 + .../tests/basic/offThreadCompileToStencil-03.js | 54 + .../tests/basic/offThreadCompileToStencil-04.js | 21 + js/src/jit-test/tests/basic/orNaNTest1.js | 3 + js/src/jit-test/tests/basic/orNaNTest2.js | 3 + js/src/jit-test/tests/basic/outerline.js | 15 + js/src/jit-test/tests/basic/packed-arrays.js | 51 + js/src/jit-test/tests/basic/parseIntTests.js | 24 + js/src/jit-test/tests/basic/parsingNumbers.js | 23 + .../tests/basic/plain-object-prototypes-error.js | 40 + .../tests/basic/plain-object-prototypes.js | 21 + .../jit-test/tests/basic/plain-object-to-string.js | 25 + .../tests/basic/primitive-proto-properties.js | 47 + js/src/jit-test/tests/basic/primitiveProto.js | 24 + .../tests/basic/prop-access-error-message.js | 47 + ...properly-remove-timeout-root-before-shutdown.js | 6 + .../tests/basic/property-enumeration-order.js | 37 + .../basic/property-error-message-fix-disabled.js | 36 + .../tests/basic/property-error-message-fix.js | 36 + js/src/jit-test/tests/basic/putargsNoReturn.js | 6 + js/src/jit-test/tests/basic/putargsReturn.js | 7 + js/src/jit-test/tests/basic/recompute-wrappers.js | 5 + .../tests/basic/regexp-removed-dot-star.js | 49 + js/src/jit-test/tests/basic/regexp-reset-input.js | 8 + .../tests/basic/regexp-sticky-undef-capture.js | 8 + .../tests/basic/regexp-test-direct-bug-694752.js | 15 + .../jit-test/tests/basic/regexp-undefined-match.js | 9 + js/src/jit-test/tests/basic/regexpLastIndex.js | 13 + .../jit-test/tests/basic/regexpLastIndexReset.js | 26 + js/src/jit-test/tests/basic/relazify-selfhosted.js | 4 + js/src/jit-test/tests/basic/relazify.js | 16 + js/src/jit-test/tests/basic/runOnceClosures.js | 11 + .../tests/basic/script-filename-validation-1.js | 51 + .../tests/basic/script-filename-validation-2.js | 22 + js/src/jit-test/tests/basic/setArgumentsLength.js | 14 + js/src/jit-test/tests/basic/setArgumentsLength2.js | 12 + js/src/jit-test/tests/basic/setCall.js | 22 + js/src/jit-test/tests/basic/setCallEvalMiddle.js | 17 + js/src/jit-test/tests/basic/setCallEvalMiddle2.js | 18 + js/src/jit-test/tests/basic/setCallGlobal.js | 14 + js/src/jit-test/tests/basic/setPrototypeOf.js | 106 + js/src/jit-test/tests/basic/setelem.js | 12 + js/src/jit-test/tests/basic/setprop-with-index.js | 5 + js/src/jit-test/tests/basic/setprop.js | 10 + js/src/jit-test/tests/basic/shape-checks.js | 8 + js/src/jit-test/tests/basic/shape-snapshots.js | 37 + .../tests/basic/shape-teleporting-invalidation.js | 144 + .../tests/basic/shape-teleporting-transplant-1.js | 36 + .../tests/basic/shape-teleporting-transplant-2.js | 16 + js/src/jit-test/tests/basic/shapelessCalleeTest.js | 67 + js/src/jit-test/tests/basic/shell-prefs.js | 24 + js/src/jit-test/tests/basic/shell-principals.js | 55 + js/src/jit-test/tests/basic/shell-watchdog.js | 16 + js/src/jit-test/tests/basic/shifted-elements1.js | 14 + js/src/jit-test/tests/basic/shifted-elements2.js | 22 + js/src/jit-test/tests/basic/shifted-elements3.js | 23 + js/src/jit-test/tests/basic/shifted-elements4.js | 11 + js/src/jit-test/tests/basic/shifted-elements5.js | 39 + js/src/jit-test/tests/basic/shifted-elements6.js | 17 + js/src/jit-test/tests/basic/shifted-elements7.js | 47 + js/src/jit-test/tests/basic/singleton.js | 12 + .../jit-test/tests/basic/sleep-without-timeout.js | 6 + .../tests/basic/sparse-and-dense-elements.js | 20 + js/src/jit-test/tests/basic/splice-675164.js | 15 + .../tests/basic/splice-call-plain-object-590780.js | 8 + js/src/jit-test/tests/basic/splice-check-steps.js | 297 + ...splice-delete-non-configurable-during-shrink.js | 26 + js/src/jit-test/tests/basic/splice-fail-step-16.js | 25 + .../tests/basic/splice-huge-array-finishes.js | 15 + js/src/jit-test/tests/basic/splice-on-arguments.js | 39 + .../basic/splice-throwing-length-getter-668024.js | 9 + .../jit-test/tests/basic/spread-array-bug842884.js | 5 + .../jit-test/tests/basic/spread-array-decompile.js | 14 + .../tests/basic/spread-array-evaluation-order.js | 12 + .../tests/basic/spread-array-invalid-syntax.js | 19 + js/src/jit-test/tests/basic/spread-array-wrap.js | 5 + js/src/jit-test/tests/basic/spread-array.js | 50 + js/src/jit-test/tests/basic/spread-call-eval.js | 54 + .../tests/basic/spread-call-evaluation-order.js | 13 + .../jit-test/tests/basic/spread-call-funapply.js | 88 + js/src/jit-test/tests/basic/spread-call-funcall.js | 11 + .../tests/basic/spread-call-invalid-syntax.js | 15 + js/src/jit-test/tests/basic/spread-call-length.js | 52 + js/src/jit-test/tests/basic/spread-call-maxarg.js | 71 + .../tests/basic/spread-call-near-maxarg.js | 71 + js/src/jit-test/tests/basic/spread-call-new.js | 9 + .../tests/basic/spread-call-not-iterable.js | 28 + .../jit-test/tests/basic/spread-call-optimized.js | 26 + .../jit-test/tests/basic/spread-call-recursion.js | 18 + .../tests/basic/spread-call-rest-lookup.js | 14 + js/src/jit-test/tests/basic/spread-call-rest.js | 73 + js/src/jit-test/tests/basic/spread-call-setcall.js | 29 + .../tests/basic/spread-call-this-strict.js | 105 + js/src/jit-test/tests/basic/spread-call-this.js | 123 + js/src/jit-test/tests/basic/spread-call.js | 110 + .../jit-test/tests/basic/statement-after-return.js | 496 + .../tests/basic/str-atom-cache-extensible.js | 15 + .../tests/basic/strict-catch-ident-syntax.js | 9 + .../tests/basic/strict-compare-same-operands.js | 49 + .../jit-test/tests/basic/strict-eval-loop-error.js | 3 + js/src/jit-test/tests/basic/strictParseIntOctal.js | 16 + js/src/jit-test/tests/basic/string-endswith.js | 262 + js/src/jit-test/tests/basic/string-includes.js | 46 + js/src/jit-test/tests/basic/string-index.js | 86 + .../tests/basic/string-regexp-capture-groups.js | 21 + js/src/jit-test/tests/basic/string-repeat.js | 30 + js/src/jit-test/tests/basic/string-startswith.js | 243 + js/src/jit-test/tests/basic/stringConvert.js | 18 + .../tests/basic/stringSplitIntoArrayTest.js | 9 + js/src/jit-test/tests/basic/stringSplitTest.js | 9 + js/src/jit-test/tests/basic/strings.js | 21 + .../tests/basic/substring-inline-strings.js | 49 + js/src/jit-test/tests/basic/symbol-in-loop.js | 8 + .../tests/basic/syntax-error-function-body-eof.js | 9 + .../jit-test/tests/basic/syntax-error-primary.js | 69 + js/src/jit-test/tests/basic/syntax-error-throw.js | 39 + .../tests/basic/syntax-error-toplevel-eof.js | 9 + js/src/jit-test/tests/basic/tagTempl.js | 35 + .../tests/basic/teleporting-mutable-proto.js | 14 + js/src/jit-test/tests/basic/terminate.js | 10 + .../jit-test/tests/basic/test-apply-many-args.js | 14 + .../basic/test-error-accessors-with-wrappers.js | 11 + js/src/jit-test/tests/basic/test-jitinfo.js | 26 + js/src/jit-test/tests/basic/test586387.js | 14 + .../tests/basic/testAbortedImacroDecompilation.js | 7 + .../tests/basic/testAccessCanonicalArgInGetElem.js | 12 + .../tests/basic/testAddAnyInconvertibleObject.js | 28 + .../tests/basic/testAddInconvertibleObjectAny.js | 34 + ...estAddInconvertibleObjectInconvertibleObject.js | 33 + js/src/jit-test/tests/basic/testAddNull.js | 8 + js/src/jit-test/tests/basic/testAddUndefined.js | 5 + js/src/jit-test/tests/basic/testAliasedLet.js | 12 + js/src/jit-test/tests/basic/testApply.js | 7 + .../jit-test/tests/basic/testApplyArrayInline.js | 74 + .../jit-test/tests/basic/testApplyAtJoinPoint.js | 12 + js/src/jit-test/tests/basic/testApplyCall.js | 42 + .../tests/basic/testApplyInterpretLowered.js | 15 + .../tests/basic/testApplyInterpretLowered2.js | 12 + .../basic/testApplySpeculationFailInCompiler.js | 6 + js/src/jit-test/tests/basic/testApplyUnbox.js | 11 + .../testArgumentsOptimizationFailCornerCase.js | 23 + .../tests/basic/testArgumentsPropLookup.js | 19 + .../jit-test/tests/basic/testArrayBufferSlice.js | 57 + .../tests/basic/testArrayBufferSpeciesDelete.js | 5 + js/src/jit-test/tests/basic/testArrayConcat.js | 10 + .../jit-test/tests/basic/testArrayDensityChange.js | 17 + .../tests/basic/testArrayInWithIndexedProto.js | 24 + js/src/jit-test/tests/basic/testArrayNaNIndex.js | 7 + js/src/jit-test/tests/basic/testArrayNamedProp.js | 5 + js/src/jit-test/tests/basic/testArrayPushPop.js | 11 + .../jit-test/tests/basic/testArraySpeciesDelete.js | 5 + .../basic/testAssignmentThatIgnoresSetterRetval.js | 10 + js/src/jit-test/tests/basic/testAtomize.js | 10 + .../tests/basic/testBitOrAnyInconvertibleObject.js | 28 + .../tests/basic/testBitOrInconvertibleObjectAny.js | 28 + ...tBitOrInconvertibleObjectInconvertibleObject.js | 33 + .../jit-test/tests/basic/testBitopWithConstan.js | 741 + js/src/jit-test/tests/basic/testBitwise.js | 12 + js/src/jit-test/tests/basic/testBoolToString.js | 3 + .../tests/basic/testBoxDoubleWithDoubleSizedInt.js | 10 + js/src/jit-test/tests/basic/testBranchCse.js | 7 + js/src/jit-test/tests/basic/testBranchingLoop.js | 11 + .../tests/basic/testBranchingUnstableLoop.js | 11 + .../basic/testBranchingUnstableLoopCounter.js | 11 + .../tests/basic/testBranchingUnstableObject.js | 13 + js/src/jit-test/tests/basic/testBug1126754.js | 9 + js/src/jit-test/tests/basic/testBug1235874.js | 1 + js/src/jit-test/tests/basic/testBug1827733.js | 9 + js/src/jit-test/tests/basic/testBug458838.js | 14 + js/src/jit-test/tests/basic/testBug463490.js | 18 + js/src/jit-test/tests/basic/testBug465272.js | 6 + js/src/jit-test/tests/basic/testBug465688.js | 6 + js/src/jit-test/tests/basic/testBug466262.js | 11 + js/src/jit-test/tests/basic/testBug501690.js | 14 + js/src/jit-test/tests/basic/testBug502914.js | 19 + js/src/jit-test/tests/basic/testBug504520.js | 11 + js/src/jit-test/tests/basic/testBug504520Harder.js | 33 + js/src/jit-test/tests/basic/testBug507425.js | 14 + js/src/jit-test/tests/basic/testBug520503-1.js | 3 + js/src/jit-test/tests/basic/testBug520503-3.js | 6 + js/src/jit-test/tests/basic/testBug529147.js | 22 + js/src/jit-test/tests/basic/testBug547791.js | 21 + js/src/jit-test/tests/basic/testBug550210.js | 16 + js/src/jit-test/tests/basic/testBug552248.js | 37 + js/src/jit-test/tests/basic/testBug554043.js | 6 + js/src/jit-test/tests/basic/testBug555484.js | 8 + js/src/jit-test/tests/basic/testBug558446.js | 10 + js/src/jit-test/tests/basic/testBug579602.js | 21 + js/src/jit-test/tests/basic/testBug582766.js | 18 + js/src/jit-test/tests/basic/testBug586866.js | 16 + js/src/jit-test/tests/basic/testBug593559.js | 9 + js/src/jit-test/tests/basic/testBug602413.js | 45 + js/src/jit-test/tests/basic/testBug604210.js | 11 + js/src/jit-test/tests/basic/testBug606138.js | 3 + js/src/jit-test/tests/basic/testBug607659.js | 8 + js/src/jit-test/tests/basic/testBug614653.js | 10 + js/src/jit-test/tests/basic/testBug614752.js | 3 + js/src/jit-test/tests/basic/testBug616454.js | 2 + js/src/jit-test/tests/basic/testBug621202.js | 16 + js/src/jit-test/tests/basic/testBug628564.js | 8 + js/src/jit-test/tests/basic/testBug629974.js | 7 + js/src/jit-test/tests/basic/testBug630064.js | 48 + js/src/jit-test/tests/basic/testBug634590.js | 12 + js/src/jit-test/tests/basic/testBug634590b.js | 19 + js/src/jit-test/tests/basic/testBug634590c.js | 20 + js/src/jit-test/tests/basic/testBug634590d.js | 19 + js/src/jit-test/tests/basic/testBug634590ma.js | 14 + js/src/jit-test/tests/basic/testBug637014.js | 2 + js/src/jit-test/tests/basic/testBug648438.js | 7 + js/src/jit-test/tests/basic/testBug653396.js | 6 + js/src/jit-test/tests/basic/testBug659577-1.js | 1 + js/src/jit-test/tests/basic/testBug659577-2.js | 15 + js/src/jit-test/tests/basic/testBug663789-1.js | 6 + js/src/jit-test/tests/basic/testBug663789-2.js | 6 + js/src/jit-test/tests/basic/testBug666003.js | 13 + js/src/jit-test/tests/basic/testBug668479.js | 3 + js/src/jit-test/tests/basic/testBug672436.js | 25 + js/src/jit-test/tests/basic/testBug673066.js | 23 + js/src/jit-test/tests/basic/testBug673068.js | 12 + js/src/jit-test/tests/basic/testBug676486.js | 8 + js/src/jit-test/tests/basic/testBug686274.js | 15 + js/src/jit-test/tests/basic/testBug690959.js | 4 + js/src/jit-test/tests/basic/testBug692274-2.js | 7 + js/src/jit-test/tests/basic/testBug692274-3.js | 16 + js/src/jit-test/tests/basic/testBug701227.js | 1 + js/src/jit-test/tests/basic/testBug701239.js | 1 + js/src/jit-test/tests/basic/testBug701244.js | 1 + js/src/jit-test/tests/basic/testBug703857.js | 13 + js/src/jit-test/tests/basic/testBug705423.js | 19 + js/src/jit-test/tests/basic/testBug714650.js | 36 + js/src/jit-test/tests/basic/testBug720695.js | 16 + js/src/jit-test/tests/basic/testBug723445.js | 10 + js/src/jit-test/tests/basic/testBug726380.js | 2 + js/src/jit-test/tests/basic/testBug731181.js | 2 + js/src/jit-test/tests/basic/testBug736012.js | 8 + js/src/jit-test/tests/basic/testBug736807.js | 13 + js/src/jit-test/tests/basic/testBug737388.js | 8 + js/src/jit-test/tests/basic/testBug737575.js | 6 + js/src/jit-test/tests/basic/testBug740442.js | 11 + js/src/jit-test/tests/basic/testBug740445.js | 9 + js/src/jit-test/tests/basic/testBug741497.js | 3 + js/src/jit-test/tests/basic/testBug743408.js | 6 + js/src/jit-test/tests/basic/testBug747554.js | 6 + js/src/jit-test/tests/basic/testBug752205.js | 6 + js/src/jit-test/tests/basic/testBug752379.js | 10 + js/src/jit-test/tests/basic/testBug753158.js | 67 + js/src/jit-test/tests/basic/testBug755916.js | 12 + js/src/jit-test/tests/basic/testBug756918.js | 6 + js/src/jit-test/tests/basic/testBug756919.js | 10 + js/src/jit-test/tests/basic/testBug761863.js | 12 + js/src/jit-test/tests/basic/testBug7618864.js | 55 + js/src/jit-test/tests/basic/testBug762105.js | 33 + js/src/jit-test/tests/basic/testBug762432.js | 15 + js/src/jit-test/tests/basic/testBug762450.js | 7 + js/src/jit-test/tests/basic/testBug762473.js | 49 + js/src/jit-test/tests/basic/testBug763384.js | 9 + js/src/jit-test/tests/basic/testBug763950.js | 6 + js/src/jit-test/tests/basic/testBug766064.js | 7 + js/src/jit-test/tests/basic/testBug769987.js | 13 + js/src/jit-test/tests/basic/testBug770407.js | 4 + js/src/jit-test/tests/basic/testBug772328.js | 20 + js/src/jit-test/tests/basic/testBug775801.js | 8 + js/src/jit-test/tests/basic/testBug775807.js | 19 + js/src/jit-test/tests/basic/testBug776191.js | 8 + js/src/jit-test/tests/basic/testBug778603.js | 1 + js/src/jit-test/tests/basic/testBug780712.js | 9 + js/src/jit-test/tests/basic/testBug783441.js | 1 + js/src/jit-test/tests/basic/testBug783540.js | 5 + js/src/jit-test/tests/basic/testBug783543.js | 11 + js/src/jit-test/tests/basic/testBug784639.js | 17 + js/src/jit-test/tests/basic/testBug840012.js | 18 + js/src/jit-test/tests/basic/testBug878429.js | 9 + js/src/jit-test/tests/basic/testBug895774.js | 14 + js/src/jit-test/tests/basic/testBug961969.js | 2 + js/src/jit-test/tests/basic/testCallApply.js | 168 + .../tests/basic/testCallApplySpeculationFailed.js | 5 + js/src/jit-test/tests/basic/testCallElem.js | 17 + .../basic/testCallFunctionPrototypeInALoop.js | 4 + js/src/jit-test/tests/basic/testCallPick.js | 18 + js/src/jit-test/tests/basic/testCallProtoMethod.js | 14 + js/src/jit-test/tests/basic/testCaseAbort.js | 16 + .../tests/basic/testCaseTypeMismatchBadness.js | 19 + .../tests/basic/testChangingObjectWithLength.js | 33 + .../tests/basic/testChangingTypeDuringRecording.js | 6 + .../tests/basic/testClosedVarInExtensibleScope.js | 13 + .../jit-test/tests/basic/testClosingRecursion.js | 13 + js/src/jit-test/tests/basic/testClosures.js | 18 + js/src/jit-test/tests/basic/testComparisons.js | 988 + .../tests/basic/testConcatNWithSideEffects.js | 12 + js/src/jit-test/tests/basic/testCondSwitch1.js | 46 + js/src/jit-test/tests/basic/testCondSwitch2.js | 33 + js/src/jit-test/tests/basic/testCondSwitch3.js | 22 + .../tests/basic/testConstDestructringArguments.js | 3 + js/src/jit-test/tests/basic/testConstIf.js | 6 + js/src/jit-test/tests/basic/testConstSwitch.js | 13 + js/src/jit-test/tests/basic/testConstSwitch2.js | 6 + .../tests/basic/testConstantBooleanExpr.js | 6 + .../jit-test/tests/basic/testConstructorArgs-1.js | 11 + .../jit-test/tests/basic/testConstructorArgs-2.js | 12 + .../jit-test/tests/basic/testConstructorArgs-3.js | 11 + js/src/jit-test/tests/basic/testConstructorBail.js | 4 + js/src/jit-test/tests/basic/testContinue.js | 11 + .../jit-test/tests/basic/testContinueWithLabel.js | 16 + .../jit-test/tests/basic/testContinueWithLabel3.js | 6 + .../jit-test/tests/basic/testContinueWithLabel4.js | 25 + .../basic/testConvertibleObjectEqUndefined.js | 30 + .../basic/testCrossCompartmentTransparency.js | 165 + .../basic/testCrossCompartmentTransparency2.js | 15 + js/src/jit-test/tests/basic/testDateNow.js | 10 + js/src/jit-test/tests/basic/testDecElem1.js | 7 + js/src/jit-test/tests/basic/testDecElem2.js | 11 + .../jit-test/tests/basic/testDecayingInnerLoop.js | 9 + js/src/jit-test/tests/basic/testDeepBail1.js | 6 + .../tests/basic/testDeepBailFromHasInstance.js | 12 + .../jit-test/tests/basic/testDeepBailInMoreIter.js | 5 + .../tests/basic/testDeepBailWhileRecording.js | 15 + .../tests/basic/testDeepPropertyShadowing.js | 17 + .../basic/testDefinePropertyAcrossCompartment.js | 7 + js/src/jit-test/tests/basic/testDenseArrayProp.js | 12 + .../jit-test/tests/basic/testDenseToSlowArray.js | 185 + js/src/jit-test/tests/basic/testDestructuring.js | 9 + .../tests/basic/testDestructuringFormalError.js | 6 + .../tests/basic/testDestructuringVarInsideWith.js | 4 + js/src/jit-test/tests/basic/testDifferingArgc.js | 18 + .../jit-test/tests/basic/testDivModWithIntMin.js | 62 + js/src/jit-test/tests/basic/testDivision.js | 10 + js/src/jit-test/tests/basic/testDivisionFloat.js | 10 + .../tests/basic/testDivisionWithNegative1.js | 6 + .../tests/basic/testDontClobberScannerError.js | 9 + .../jit-test/tests/basic/testDoubleComparison.js | 13 + js/src/jit-test/tests/basic/testDoubleToStr.js | 9 + .../tests/basic/testDoubleZeroInSwitch1.js | 7 + .../tests/basic/testDoubleZeroInSwitch2.js | 9 + js/src/jit-test/tests/basic/testDynamicLookup.js | 67 + js/src/jit-test/tests/basic/testDynamicUsage.js | 82 + js/src/jit-test/tests/basic/testElemDec1.js | 7 + js/src/jit-test/tests/basic/testElemDec2.js | 7 + js/src/jit-test/tests/basic/testElemInc1.js | 7 + js/src/jit-test/tests/basic/testElemInc2.js | 7 + .../tests/basic/testEliminatedGuardWithinAnchor.js | 6 + .../jit-test/tests/basic/testEqFalseEmptyString.js | 6 + .../testErrorInFinalizerCalledWhileUnwinding.js | 31 + .../tests/basic/testEvalInFrameEdgeCase.js | 11 + .../tests/basic/testEvalInFunctionCallee.js | 4 + .../testExistingPropToJoinedMethodAttempt-2.js | 8 + .../testExistingPropToJoinedMethodAttempt-3.js | 15 + .../testExistingPropToJoinedMethodAttempt-4.js | 12 + .../basic/testExistingPropToJoinedMethodAttempt.js | 10 + .../jit-test/tests/basic/testFakeDOMWeakmapKey.js | 1 + js/src/jit-test/tests/basic/testFloatArrayIndex.js | 9 + .../jit-test/tests/basic/testFoldPropertyAccess.js | 23 + .../tests/basic/testForInLoopChangeIteratorType.js | 11 + .../jit-test/tests/basic/testFunApplyMadness1.js | 19 + .../jit-test/tests/basic/testFunApplyMadness2.js | 20 + .../jit-test/tests/basic/testFunApplyMadness400.js | 19 + .../tests/basic/testFunApplyMisspeculation.js | 3 + .../jit-test/tests/basic/testFunApplyOverflow.js | 10 + .../tests/basic/testFunctionIdentityChange.js | 16 + .../basic/testFunctionStatementAliasLocals.js | 18 + .../basic/testFunctionStatementNamedArguments.js | 10 + .../jit-test/tests/basic/testGCWhileRecording.js | 8 + .../jit-test/tests/basic/testGeneratorDeepBail.js | 11 + .../tests/basic/testGeneratorDieButScopeAlive.js | 24 + js/src/jit-test/tests/basic/testGetCallObj.js | 11 + js/src/jit-test/tests/basic/testGetThis.js | 7 + js/src/jit-test/tests/basic/testGlobalAsProto.js | 3 + .../jit-test/tests/basic/testGlobalOptimize-2.js | 8 + .../jit-test/tests/basic/testGlobalOptimize-3.js | 10 + .../jit-test/tests/basic/testGlobalOptimize-4.js | 8 + .../jit-test/tests/basic/testGlobalOptimize-5.js | 11 + .../jit-test/tests/basic/testGlobalOptimize-6.js | 11 + .../jit-test/tests/basic/testGlobalProtoAccess.js | 5 + .../basic/testGlobalShapeChangeAfterDeepBail.js | 15 + js/src/jit-test/tests/basic/testGroupAssignment.js | 17 + js/src/jit-test/tests/basic/testGrowDenseArray.js | 7 + .../tests/basic/testGuardCalleeSneakAttack.js | 31 + .../tests/basic/testGuardCalleeSneakAttack2.js | 32 + js/src/jit-test/tests/basic/testHOTLOOPSize.js | 4 + js/src/jit-test/tests/basic/testHeavy.js | 14 + js/src/jit-test/tests/basic/testHeavy2.js | 20 + .../jit-test/tests/basic/testHoleInDenseArray.js | 16 + js/src/jit-test/tests/basic/testHolePushing.js | 13 + .../testHolesAndIndexPropertiesOnThePrototype.js | 29 + js/src/jit-test/tests/basic/testINITELEM.js | 8 + .../jit-test/tests/basic/testImplicitThisMiss.js | 2 + js/src/jit-test/tests/basic/testIn.js | 19 + js/src/jit-test/tests/basic/testIncDec.js | 19 + js/src/jit-test/tests/basic/testIncDecReadOnly.js | 22 + js/src/jit-test/tests/basic/testIncElem1.js | 7 + js/src/jit-test/tests/basic/testIncElem2.js | 11 + js/src/jit-test/tests/basic/testIncElem3.js | 6 + js/src/jit-test/tests/basic/testIncElem4.js | 10 + .../jit-test/tests/basic/testInitPropOverMethod.js | 9 + .../tests/basic/testInitPropWithIntName.js | 2 + .../jit-test/tests/basic/testInitProtoPrimitive.js | 2 + js/src/jit-test/tests/basic/testInitSingletons.js | 61 + js/src/jit-test/tests/basic/testInitSlowify.js | 41 + js/src/jit-test/tests/basic/testInitelemCond.js | 13 + .../tests/basic/testInitelemWithFloatIndex.js | 3 + .../jit-test/tests/basic/testInitelemWithSetter.js | 3 + .../jit-test/tests/basic/testInnerMissingArgs.js | 21 + .../jit-test/tests/basic/testInnerSwitchBreak.js | 24 + .../tests/basic/testInnerTreeMutatingUpvars.js | 17 + js/src/jit-test/tests/basic/testInt32ToId.js | 35 + js/src/jit-test/tests/basic/testIntFloor.js | 8 + js/src/jit-test/tests/basic/testIntOverflow.js | 9 + js/src/jit-test/tests/basic/testIntUnderflow.js | 9 + .../jit-test/tests/basic/testInterpreterReentry.js | 6 + .../tests/basic/testInterpreterReentry2.js | 10 + .../tests/basic/testInterpreterReentry3.js | 6 + .../tests/basic/testInterpreterReentry4.js | 6 + .../tests/basic/testInterpreterReentry5.js | 9 + .../tests/basic/testInterpreterReentry6.js | 7 + .../tests/basic/testInterpreterReentry7.js | 11 + .../jit-test/tests/basic/testInvalidCharCodeAt.js | 12 + .../tests/basic/testInvertNullAfterNegateNull.js | 7 + .../tests/basic/testIteratorReification.js | 1 + js/src/jit-test/tests/basic/testLambdaCtor.js | 13 + js/src/jit-test/tests/basic/testLambdaInitedVar.js | 8 + js/src/jit-test/tests/basic/testLengthInString.js | 12 + .../tests/basic/testLengthOnNonNativeProto.js | 20 + js/src/jit-test/tests/basic/testLet.js | 210 + .../jit-test/tests/basic/testLetOverridingArgs.js | 5 + js/src/jit-test/tests/basic/testLirBufOOM.js | 34 + js/src/jit-test/tests/basic/testLocaleCompare.js | 8 + js/src/jit-test/tests/basic/testLogicalNotNaN.js | 8 + js/src/jit-test/tests/basic/testLongNumToString.js | 7 + .../jit-test/tests/basic/testLoopWithUndefined1.js | 12 + .../jit-test/tests/basic/testLoopWithUndefined2.js | 20 + .../jit-test/tests/basic/testLoopingAccumulator.js | 21 + js/src/jit-test/tests/basic/testManyVars.js | 13 + .../jit-test/tests/basic/testMatchAsCondition.js | 8 + .../jit-test/tests/basic/testMatchStringObject.js | 8 + js/src/jit-test/tests/basic/testMathClz32.js | 38 + js/src/jit-test/tests/basic/testMathMinMax.js | 74 + js/src/jit-test/tests/basic/testMethodInc.js | 5 + js/src/jit-test/tests/basic/testMethodInit.js | 10 + .../jit-test/tests/basic/testMethodInitSafety.js | 14 + js/src/jit-test/tests/basic/testMethodSet.js | 13 + .../jit-test/tests/basic/testMethodWriteBarrier.js | 4 + .../tests/basic/testMethodWriteBarrier2.js | 17 + .../tests/basic/testMethodWriteBarrier3.js | 27 + .../tests/basic/testMethodWriteBarrier4.js | 12 + js/src/jit-test/tests/basic/testMissingMethod.js | 9 + js/src/jit-test/tests/basic/testMissingMethod2.js | 10 + .../jit-test/tests/basic/testMissingProperties.js | 49 + .../tests/basic/testModuloWithNegative1.js | 11 + .../tests/basic/testModuloWithNegative2.js | 7 + .../jit-test/tests/basic/testMoreArgcThanNargs.js | 14 + js/src/jit-test/tests/basic/testMoreClosures.js | 14 + js/src/jit-test/tests/basic/testMulOverflow.js | 6 + .../tests/basic/testMultipleArgumentsObjects.js | 12 + .../basic/testMultipleFunctionRedeclarations.js | 44 + .../tests/basic/testMultiplePendingGlobalWrites.js | 11 + js/src/jit-test/tests/basic/testNEWINIT.js | 8 + js/src/jit-test/tests/basic/testNEWINIT_DOUBLE.js | 6 + .../jit-test/tests/basic/testNativeArgsRooting.js | 14 + js/src/jit-test/tests/basic/testNativeLog.js | 8 + js/src/jit-test/tests/basic/testNativeMax.js | 20 + js/src/jit-test/tests/basic/testNativeSetter.js | 8 + js/src/jit-test/tests/basic/testNegZero1.js | 9 + .../tests/basic/testNegativeArrayLength.js | 10 + .../tests/basic/testNegativeGETELEMIndex.js | 6 + js/src/jit-test/tests/basic/testNestedClosures.js | 23 + js/src/jit-test/tests/basic/testNestedDeepBail.js | 20 + .../tests/basic/testNestedEscapingLambdas.js | 31 + .../tests/basic/testNestedExitStackOuter.js | 29 + js/src/jit-test/tests/basic/testNestedForIn.js | 9 + js/src/jit-test/tests/basic/testNeutering.js | 23 + js/src/jit-test/tests/basic/testNewArrayCount.js | 12 + js/src/jit-test/tests/basic/testNewArrayCount2.js | 8 + js/src/jit-test/tests/basic/testNewObject.js | 8 + js/src/jit-test/tests/basic/testNewString.js | 21 + js/src/jit-test/tests/basic/testNewWithClone.js | 7 + .../tests/basic/testNewWithNonNativeProto.js | 9 + js/src/jit-test/tests/basic/testNot.js | 8 + js/src/jit-test/tests/basic/testNullCallee.js | 16 + js/src/jit-test/tests/basic/testNullIncrement.js | 14 + js/src/jit-test/tests/basic/testNullRelCmp.js | 6 + js/src/jit-test/tests/basic/testNullToString.js | 13 + js/src/jit-test/tests/basic/testNumToString.js | 18 + js/src/jit-test/tests/basic/testNumberToString.js | 6 + .../tests/basic/testOOMInAutoEnterCompartment.js | 17 + .../basic/testObjectConstructorReturningObject.js | 12 + js/src/jit-test/tests/basic/testObjectLength.js | 10 + .../jit-test/tests/basic/testObjectOrderedCmp.js | 7 + .../jit-test/tests/basic/testObjectOrderedCmp2.js | 7 + js/src/jit-test/tests/basic/testObjectToNumber.js | 8 + js/src/jit-test/tests/basic/testObjectToString.js | 8 + .../jit-test/tests/basic/testObjectVsPrototype.js | 12 + .../tests/basic/testOverOOMInFixupArity.js | 15 + js/src/jit-test/tests/basic/testOverRecursed1.js | 6 + js/src/jit-test/tests/basic/testOverRecursed2.js | 7 + js/src/jit-test/tests/basic/testOverRecursed3.js | 6 + js/src/jit-test/tests/basic/testOverRecursed4.js | 9 + js/src/jit-test/tests/basic/testOverRecursed6.js | 3 + .../basic/testOverwrittenArgumentsWithUndefined.js | 24 + .../tests/basic/testOwnPropertyWithInOperator.js | 9 + js/src/jit-test/tests/basic/testParseInt.js | 48 + .../jit-test/tests/basic/testPartialFlatClosure.js | 10 + js/src/jit-test/tests/basic/testPaths.js | 68 + .../basic/testPrimitiveConstructorPrototype.js | 7 + .../jit-test/tests/basic/testPropagatedFunArgs.js | 34 + .../testProxyDefinePropertyWithMissingSetter.js | 21 + js/src/jit-test/tests/basic/testProxyPrototypes.js | 81 + .../tests/basic/testPutOnEmptyArgsObject.js | 16 + .../tests/basic/testReallyDeepNestedExit.js | 38 + js/src/jit-test/tests/basic/testRebranding.js | 10 + js/src/jit-test/tests/basic/testRebranding2.js | 21 + js/src/jit-test/tests/basic/testRegExpTest.js | 10 + js/src/jit-test/tests/basic/testRegexpGet.js | 8 + js/src/jit-test/tests/basic/testReplace2.js | 7 + js/src/jit-test/tests/basic/testReplaceMap.js | 27 + .../jit-test/tests/basic/testReplaceWithLambda.js | 52 + js/src/jit-test/tests/basic/testResumeOp.js | 8 + js/src/jit-test/tests/basic/testReverseArgTypes.js | 5 + js/src/jit-test/tests/basic/testRopeMarking.js | 13 + .../basic/testScriptGetter_JSOP_CALLPROP-2.js | 13 + .../tests/basic/testScriptGetter_JSOP_CALLPROP.js | 9 + .../basic/testScriptGetter_JSOP_GETARGPROP.js | 7 + .../basic/testScriptGetter_JSOP_GETLOCALPROP.js | 8 + .../tests/basic/testScriptGetter_JSOP_GETPROP.js | 8 + .../basic/testScriptGetter_JSOP_GETTHISPROP.js | 9 + .../tests/basic/testSetGetterOnlyProperty.js | 5 + .../tests/basic/testSetPropNeitherMissNorHit.js | 5 + js/src/jit-test/tests/basic/testSetPropertyFail.js | 22 + .../basic/testSetProtoRegeneratesObjectShape.js | 24 + .../tests/basic/testSetelemWithFloatIndex.js | 4 + js/src/jit-test/tests/basic/testShiftLeft.js | 36 + .../tests/basic/testShiftRightArithmetic.js | 42 + .../jit-test/tests/basic/testShiftRightLogical.js | 36 + js/src/jit-test/tests/basic/testSlowArrayLength.js | 10 + js/src/jit-test/tests/basic/testSlowArrayPop.js | 12 + .../tests/basic/testSlowArrayPopMultiFrame.js | 24 + .../tests/basic/testSlowArrayPopNestedTrees.js | 36 + js/src/jit-test/tests/basic/testSlowNativeBail.js | 11 + js/src/jit-test/tests/basic/testSlowNativeCtor.js | 7 + .../tests/basic/testSlowNativeWithNullThis.js | 6 + js/src/jit-test/tests/basic/testStaticEvalScope.js | 3 + js/src/jit-test/tests/basic/testStaticsInRegExp.js | 8 + js/src/jit-test/tests/basic/testStrict.js | 11 + js/src/jit-test/tests/basic/testString.js | 14 + .../basic/testStringBufferMallocAccounting.js | 18 + .../basic/testStringConstructorWithExtraArg.js | 6 + js/src/jit-test/tests/basic/testStringIncrement.js | 20 + .../tests/basic/testStringLengthNoTinyId.js | 64 + .../jit-test/tests/basic/testStringObjectLength.js | 7 + js/src/jit-test/tests/basic/testStringToInt32.js | 6 + js/src/jit-test/tests/basic/testStringToNumber.js | 37 + js/src/jit-test/tests/basic/testStringify.js | 20 + js/src/jit-test/tests/basic/testSubstring.js | 7 + js/src/jit-test/tests/basic/testSwitch.js | 25 + js/src/jit-test/tests/basic/testSwitchString.js | 28 + js/src/jit-test/tests/basic/testSwitchUndefined.js | 15 + js/src/jit-test/tests/basic/testTableSwitch1.js | 13 + js/src/jit-test/tests/basic/testTableSwitch2.js | 18 + js/src/jit-test/tests/basic/testThinLoopDemote.js | 13 + .../tests/basic/testThrowWhileWrappingException.js | 7 + .../tests/basic/testThrowingObjectEqUndefined.js | 15 + js/src/jit-test/tests/basic/testToLocaleString.js | 2 + .../tests/basic/testToStringBeforeValueOf.js | 9 + js/src/jit-test/tests/basic/testToUpperToLower.js | 9 + js/src/jit-test/tests/basic/testTruncatedMod.js | 18 + .../jit-test/tests/basic/testTypeUnstableForIn.js | 10 + .../jit-test/tests/basic/testTypedArrayByteRegs.js | 30 + .../jit-test/tests/basic/testTypedArrayClamping.js | 41 + js/src/jit-test/tests/basic/testTypedArrayInit.js | 30 + .../tests/basic/testTypedArrayMaybeUndefined.js | 46 + .../tests/basic/testTypedArrayOutOfBounds.js | 32 + .../jit-test/tests/basic/testTypedArrayPunning.js | 42 + .../tests/basic/testTypedArraySetConversion.js | 15 + .../jit-test/tests/basic/testTypedArrayUint32.js | 19 + .../tests/basic/testTypedArrayUndefinedAndHoles.js | 32 + js/src/jit-test/tests/basic/testTypedArrays.js | 96 + js/src/jit-test/tests/basic/testTypeofHole.js | 8 + js/src/jit-test/tests/basic/testUnaryImacros.js | 26 + .../tests/basic/testUndefinedBooleanCmp.js | 24 + js/src/jit-test/tests/basic/testUndefinedCmp.js | 6 + .../jit-test/tests/basic/testUndefinedIncrement.js | 15 + .../tests/basic/testUndefinedPropertyAccess.js | 12 + .../tests/basic/testUndemotableBinaryOp.js | 6 + js/src/jit-test/tests/basic/testWeirdDateParse.js | 38 + .../tests/basic/testWeirdGetterInvocation.js | 6 + .../basic/testWeirdThingsInFunctionConstructor.js | 6 + .../jit-test/tests/basic/testWhileObjectOrNull.js | 18 + .../jit-test/tests/basic/testWhileWithContinue.js | 10 + js/src/jit-test/tests/basic/testWith.js | 8 + .../jit-test/tests/basic/testWithAndShadowing.js | 14 + js/src/jit-test/tests/basic/test_JSOP_ARGCNT.js | 27 + js/src/jit-test/tests/basic/test_JSOP_ARGSUB.js | 27 + js/src/jit-test/tests/basic/testif.js | 11 + js/src/jit-test/tests/basic/testincops.js | 24 + .../jit-test/tests/basic/this-binding-with-eval.js | 51 + .../tests/basic/throw-apply-too-many-args.js | 27 + .../tests/basic/throw-exception-stack-location.js | 49 + .../jit-test/tests/basic/throw-exception-stack.js | 76 + js/src/jit-test/tests/basic/timeout-check.js | 14 + .../jit-test/tests/basic/track-allocation-sites.js | 24 + .../jit-test/tests/basic/transplant-dom-slot2.js | 7 + js/src/jit-test/tests/basic/trees.js | 10 + js/src/jit-test/tests/basic/truncateDouble.js | 10 + js/src/jit-test/tests/basic/truthies.js | 45 + js/src/jit-test/tests/basic/typeMonitorCall.js | 19 + .../jit-test/tests/basic/typeMonitorSingleton.js | 17 + .../jit-test/tests/basic/typed-array-copyWithin.js | 214 + .../basic/typed-array-getprop-out-of-range.js | 11 + .../tests/basic/typed-array-index-out-of-range.js | 169 + js/src/jit-test/tests/basic/typed-array-offsets.js | 11 + .../tests/basic/typed-array-sealed-frozen.js | 85 + .../typedarray-selfhosted-cross-compartment.js | 13 + js/src/jit-test/tests/basic/typeof-array.js | 9 + js/src/jit-test/tests/basic/typeofTest.js | 8 + js/src/jit-test/tests/basic/unboxint.js | 8 + js/src/jit-test/tests/basic/valuetosource.js | 38 + js/src/jit-test/tests/basic/weird-scopechains.js | 31 + js/src/jit-test/tests/basic/withSourceHook.js | 53 + .../jit-test/tests/basic/wrapping-dead-wrapper.js | 9 + .../basic/write-frozen-dense-strict-inlinecache.js | 20 + .../tests/basic/write-frozen-dense-strict.js | 14 + js/src/jit-test/tests/basic/write-frozen-dense.js | 8 + .../tests/basic/write-frozen-property-strict.js | 14 + .../jit-test/tests/basic/write-frozen-property.js | 7 + js/src/jit-test/tests/basic/xml-in-strict.js | 17 + js/src/jit-test/tests/basic/xprop.js | 8 + js/src/jit-test/tests/bigint/asIntN.js | 473 + js/src/jit-test/tests/bigint/asIntN32.js | 65 + js/src/jit-test/tests/bigint/asIntN64.js | 65 + js/src/jit-test/tests/bigint/asUintN.js | 473 + js/src/jit-test/tests/bigint/asUintN32.js | 65 + js/src/jit-test/tests/bigint/asUintN64.js | 65 + js/src/jit-test/tests/bigint/bigint-add.js | 718 + js/src/jit-test/tests/bigint/bigint-and.js | 718 + .../jit-test/tests/bigint/bigint-cmp-equality.js | 2442 + .../jit-test/tests/bigint/bigint-cmp-relational.js | 4779 + js/src/jit-test/tests/bigint/bigint-dec.js | 51 + js/src/jit-test/tests/bigint/bigint-div-bailout.js | 31 + js/src/jit-test/tests/bigint/bigint-div-by-zero.js | 16 + js/src/jit-test/tests/bigint/bigint-div.js | 1346 + js/src/jit-test/tests/bigint/bigint-inc.js | 51 + js/src/jit-test/tests/bigint/bigint-lsh.js | 894 + js/src/jit-test/tests/bigint/bigint-mod-bailout.js | 31 + js/src/jit-test/tests/bigint/bigint-mod-by-zero.js | 16 + js/src/jit-test/tests/bigint/bigint-mod.js | 1346 + js/src/jit-test/tests/bigint/bigint-mul.js | 1473 + js/src/jit-test/tests/bigint/bigint-neg.js | 51 + js/src/jit-test/tests/bigint/bigint-not.js | 51 + js/src/jit-test/tests/bigint/bigint-or.js | 718 + js/src/jit-test/tests/bigint/bigint-pow-bailout.js | 31 + .../tests/bigint/bigint-pow-negative-exponent.js | 16 + js/src/jit-test/tests/bigint/bigint-pow.js | 527 + js/src/jit-test/tests/bigint/bigint-rsh.js | 894 + js/src/jit-test/tests/bigint/bigint-sub.js | 1383 + js/src/jit-test/tests/bigint/bigint-xor.js | 718 + js/src/jit-test/tests/bigint/bug1531269.js | 13 + js/src/jit-test/tests/bigint/bug1551128.js | 6 + js/src/jit-test/tests/bigint/bug1580020.js | 14 + js/src/jit-test/tests/bigint/bug1679003.js | 4 + js/src/jit-test/tests/bigint/bug1784435.js | 4 + js/src/jit-test/tests/bigint/bug1849099.js | 14 + js/src/jit-test/tests/bug1213574.js | 16 + js/src/jit-test/tests/bug1323854-2.js | 14 + js/src/jit-test/tests/bug1366925.js | 9 + js/src/jit-test/tests/bug1375074.js | 18 + js/src/jit-test/tests/bug1490638.js | 8 + js/src/jit-test/tests/bug1580246.js | 59 + js/src/jit-test/tests/bug1636306.js | 32 + js/src/jit-test/tests/bug1681258.js | 8 + js/src/jit-test/tests/bug1704480.js | 14 + js/src/jit-test/tests/bug1742592.js | 6 + js/src/jit-test/tests/bug1775005.js | 8 + js/src/jit-test/tests/bug1782468-ptrdiff-veclen.js | 13 + js/src/jit-test/tests/bug1782558-veclen.js | 14 + .../jit-test/tests/bug1782562-toSource-veclen.js | 32 + js/src/jit-test/tests/bug1787730.js | 3 + js/src/jit-test/tests/bug1852218.js | 17 + js/src/jit-test/tests/bug765479.js | 6 + js/src/jit-test/tests/bug793385.js | 12 + js/src/jit-test/tests/bug825379.js | 8 + js/src/jit-test/tests/bug828119.js | 32 + js/src/jit-test/tests/bug830943.js | 268 + js/src/jit-test/tests/bug847682.js | 18 + js/src/jit-test/tests/bug953337.js | 8 + js/src/jit-test/tests/cacheir/1877684.js | 6 + .../cacheir/add-dense-element-non-extensible.js | 160 + .../add-dense-element-non-writable-length.js | 160 + js/src/jit-test/tests/cacheir/add-dense-element.js | 124 + .../tests/cacheir/add-function-prototype.js | 55 + .../jit-test/tests/cacheir/alloc-dense-elements.js | 9 + js/src/jit-test/tests/cacheir/apply-minmax-1.js | 23 + js/src/jit-test/tests/cacheir/apply-minmax-2.js | 23 + js/src/jit-test/tests/cacheir/apply-minmax-3.js | 25 + js/src/jit-test/tests/cacheir/apply-minmax-4.js | 15 + .../tests/cacheir/arguments-iterator-mapped.js | 171 + .../tests/cacheir/arguments-iterator-unmapped.js | 184 + js/src/jit-test/tests/cacheir/array-slice.js | 39 + .../cacheir/atomics-store-non-number-value.js | 123 + js/src/jit-test/tests/cacheir/bigint-binary.js | 190 + .../tests/cacheir/bigint-compare-double.js | 209 + .../jit-test/tests/cacheir/bigint-compare-int32.js | 258 + .../tests/cacheir/bigint-compare-null-or-undef.js | 82 + .../tests/cacheir/bigint-compare-number.js | 205 + .../tests/cacheir/bigint-compare-string.js | 189 + js/src/jit-test/tests/cacheir/bigint-compare.js | 163 + js/src/jit-test/tests/cacheir/bigint-tobool.js | 72 + js/src/jit-test/tests/cacheir/bigint-unary.js | 135 + .../tests/cacheir/binaryarith-mod-int32.js | 70 + .../tests/cacheir/binaryarith-null-undef-bool.js | 75 + js/src/jit-test/tests/cacheir/binaryarith.js | 322 + .../tests/cacheir/bind-function-specialized.js | 72 + .../tests/cacheir/bindname-lexical-errors.js | 26 + js/src/jit-test/tests/cacheir/boolean-call.js | 67 + .../cacheir/boolean-compare-string-or-double.js | 149 + .../cacheir/bound-construct-derived-class-ctor.js | 46 + .../jit-test/tests/cacheir/bound-construct-hook.js | 18 + .../tests/cacheir/bound-construct-scripted.js | 72 + js/src/jit-test/tests/cacheir/bug1345707.js | 7 + js/src/jit-test/tests/cacheir/bug1357024.js | 12 + js/src/jit-test/tests/cacheir/bug1397026.js | 43 + js/src/jit-test/tests/cacheir/bug1414849.js | 12 + js/src/jit-test/tests/cacheir/bug1420910.js | 35 + js/src/jit-test/tests/cacheir/bug1423139.js | 15 + js/src/jit-test/tests/cacheir/bug1438727.1.js | 22 + js/src/jit-test/tests/cacheir/bug1438727.2.js | 6 + js/src/jit-test/tests/cacheir/bug1438727.3.js | 16 + js/src/jit-test/tests/cacheir/bug1438727.4.js | 4 + js/src/jit-test/tests/cacheir/bug1438727.js | 7 + js/src/jit-test/tests/cacheir/bug1439180.js | 9 + js/src/jit-test/tests/cacheir/bug1448136.js | 23 + js/src/jit-test/tests/cacheir/bug1451976.js | 11 + js/src/jit-test/tests/cacheir/bug1451984.js | 10 + js/src/jit-test/tests/cacheir/bug1459754.js | 9 + js/src/jit-test/tests/cacheir/bug1462280.js | 3 + js/src/jit-test/tests/cacheir/bug1471361.js | 13 + js/src/jit-test/tests/cacheir/bug1483183.js | 8 + js/src/jit-test/tests/cacheir/bug1488786-2.js | 27 + js/src/jit-test/tests/cacheir/bug1488786.js | 38 + js/src/jit-test/tests/cacheir/bug1494537-plain.js | 123 + js/src/jit-test/tests/cacheir/bug1494537.js | 125 + js/src/jit-test/tests/cacheir/bug1500255.js | 11 + js/src/jit-test/tests/cacheir/bug1502143.js | 15 + js/src/jit-test/tests/cacheir/bug1502709.js | 17 + js/src/jit-test/tests/cacheir/bug1509293.js | 2 + js/src/jit-test/tests/cacheir/bug1514682.js | 15 + js/src/jit-test/tests/cacheir/bug1526872.js | 12 + js/src/jit-test/tests/cacheir/bug1536228.js | 40 + js/src/jit-test/tests/cacheir/bug1612636.js | 10 + .../cacheir/bug1651732-ionic-getprop-super.js | 28 + .../jit-test/tests/cacheir/bug1651732-proxy-get.js | 23 + .../jit-test/tests/cacheir/bug1651732-proxy-has.js | 24 + .../tests/cacheir/bug1651732-proxy-hasOwn.js | 24 + .../jit-test/tests/cacheir/bug1651732-proxy-set.js | 23 + js/src/jit-test/tests/cacheir/bug1654947.js | 11 + js/src/jit-test/tests/cacheir/bug1685684.js | 8 + js/src/jit-test/tests/cacheir/bug1685925-1.js | 15 + js/src/jit-test/tests/cacheir/bug1685925-2.js | 7 + js/src/jit-test/tests/cacheir/bug1713556.js | 25 + js/src/jit-test/tests/cacheir/bug1757634.js | 29 + js/src/jit-test/tests/cacheir/bug1772824.js | 15 + js/src/jit-test/tests/cacheir/bug1785200.js | 15 + js/src/jit-test/tests/cacheir/bug1788528-1.js | 15 + js/src/jit-test/tests/cacheir/bug1788528-2.js | 15 + js/src/jit-test/tests/cacheir/bug1788528-3.js | 15 + js/src/jit-test/tests/cacheir/bug1788528-4.js | 15 + js/src/jit-test/tests/cacheir/bug1804634.js | 34 + js/src/jit-test/tests/cacheir/bug1819486.js | 18 + js/src/jit-test/tests/cacheir/bug1823212.js | 13 + js/src/jit-test/tests/cacheir/bug1834038.js | 9 + js/src/jit-test/tests/cacheir/bug1837157.js | 36 + js/src/jit-test/tests/cacheir/bug1842617.js | 30 + js/src/jit-test/tests/cacheir/bug1851599.js | 44 + js/src/jit-test/tests/cacheir/bug1851911.js | 35 + js/src/jit-test/tests/cacheir/bug1852893-1.js | 27 + js/src/jit-test/tests/cacheir/bug1852893-2.js | 42 + js/src/jit-test/tests/cacheir/call-any-native.js | 59 + .../tests/cacheir/call-bound-function-many-args.js | 63 + .../jit-test/tests/cacheir/call-bound-scripted.js | 84 + .../tests/cacheir/call-native-get-element-super.js | 44 + js/src/jit-test/tests/cacheir/ccw-missing.js | 4 + .../tests/cacheir/compare-null-or-undef.js | 93 + js/src/jit-test/tests/cacheir/compare.js | 292 + .../tests/cacheir/construct-bound-realm.js | 10 + .../tests/cacheir/dataview-non-number-value-set.js | 126 + js/src/jit-test/tests/cacheir/dom-call.js | 29 + .../tests/cacheir/fun-apply-as-call-native-1.js | 38 + .../tests/cacheir/fun-apply-as-call-native-2.js | 46 + .../tests/cacheir/fun-apply-as-call-native-3.js | 39 + .../tests/cacheir/fun-apply-as-call-scripted-1.js | 42 + .../tests/cacheir/fun-apply-as-call-scripted-2.js | 50 + .../tests/cacheir/fun-apply-null-undefined.js | 36 + .../jit-test/tests/cacheir/fun-call-apply-weird.js | 31 + .../tests/cacheir/fun-call-inline-native-1.js | 59 + .../tests/cacheir/fun-call-inline-native-2.js | 20 + .../tests/cacheir/fun-call-inline-native-3.js | 35 + js/src/jit-test/tests/cacheir/function-length.js | 48 + js/src/jit-test/tests/cacheir/function-name.js | 59 + .../jit-test/tests/cacheir/generic-spreadcall.js | 14 + .../tests/cacheir/getelem-undefined-null.js | 52 + js/src/jit-test/tests/cacheir/getpropsuper.js | 15 + .../tests/cacheir/getter-primitive-value.js | 116 + .../tests/cacheir/getter-setter-guards1.js | 64 + .../tests/cacheir/getter-setter-guards2.js | 130 + js/src/jit-test/tests/cacheir/global-getter.js | 36 + js/src/jit-test/tests/cacheir/global-setter.js | 39 + js/src/jit-test/tests/cacheir/has-sparse.js | 58 + .../jit-test/tests/cacheir/has-undefined-null.js | 28 + js/src/jit-test/tests/cacheir/has.js | 66 + js/src/jit-test/tests/cacheir/hasown.js | 46 + js/src/jit-test/tests/cacheir/iter-megamorphic.js | 18 + .../tests/cacheir/load-typed-element-bigint.js | 100 + js/src/jit-test/tests/cacheir/map-get-bigint.js | 88 + .../jit-test/tests/cacheir/map-get-nongcthing.js | 116 + js/src/jit-test/tests/cacheir/map-get-object.js | 31 + js/src/jit-test/tests/cacheir/map-get-string.js | 83 + js/src/jit-test/tests/cacheir/map-get-symbol.js | 31 + js/src/jit-test/tests/cacheir/map-get-value.js | 31 + js/src/jit-test/tests/cacheir/map-has-bigint.js | 84 + .../jit-test/tests/cacheir/map-has-nongcthing.js | 110 + js/src/jit-test/tests/cacheir/map-has-object.js | 30 + js/src/jit-test/tests/cacheir/map-has-string.js | 79 + js/src/jit-test/tests/cacheir/map-has-symbol.js | 30 + js/src/jit-test/tests/cacheir/map-has-value.js | 30 + js/src/jit-test/tests/cacheir/map-size.js | 43 + js/src/jit-test/tests/cacheir/math-min-max.js | 180 + .../tests/cacheir/megamorphic-get-has-dense.js | 63 + .../new-with-non-object-prototype-failure.js | 38 + .../tests/cacheir/new-with-non-object-prototype.js | 129 + js/src/jit-test/tests/cacheir/nukedCCW.js | 40 + .../tests/cacheir/number-parseInt-double.js | 205 + .../tests/cacheir/number-parseInt-int32.js | 93 + .../tests/cacheir/number-parseInt-string.js | 144 + js/src/jit-test/tests/cacheir/number-toString.js | 44 + .../jit-test/tests/cacheir/object-addprop-hook.js | 18 + .../cacheir/object-constructor-metadata-builder.js | 14 + .../jit-test/tests/cacheir/object-constructor.js | 76 + .../tests/cacheir/object-is-prototype-of.js | 41 + .../tests/cacheir/optimize-get-iterator-1.js | 13 + .../tests/cacheir/optimize-get-iterator-2.js | 17 + .../tests/cacheir/optimize-get-iterator-3.js | 13 + .../tests/cacheir/optimize-get-iterator-4.js | 36 + .../tests/cacheir/optimize-get-iterator-5.js | 19 + .../tests/cacheir/optimize-get-iterator-6.js | 7 + .../tests/cacheir/optimize-get-iterator-7.js | 10 + js/src/jit-test/tests/cacheir/optimize-spread.js | 16 + .../tests/cacheir/parseInt-double-truncate.js | 41 + js/src/jit-test/tests/cacheir/rope-char-at.js | 20 + js/src/jit-test/tests/cacheir/set-has-bigint.js | 84 + .../jit-test/tests/cacheir/set-has-nongcthing.js | 110 + js/src/jit-test/tests/cacheir/set-has-object.js | 30 + .../tests/cacheir/set-has-string-gczeal.js | 17 + js/src/jit-test/tests/cacheir/set-has-string.js | 79 + js/src/jit-test/tests/cacheir/set-has-symbol.js | 30 + js/src/jit-test/tests/cacheir/set-has-value.js | 30 + js/src/jit-test/tests/cacheir/set-size.js | 43 + js/src/jit-test/tests/cacheir/setelem-id-guard.js | 91 + .../tests/cacheir/setelem-undefined-null.js | 50 + js/src/jit-test/tests/cacheir/setgname-let.js | 93 + js/src/jit-test/tests/cacheir/setter-is-native.js | 15 + .../jit-test/tests/cacheir/shape-teleporting-1.js | 128 + .../jit-test/tests/cacheir/shape-teleporting-2.js | 47 + .../jit-test/tests/cacheir/shape-teleporting-3.js | 32 + js/src/jit-test/tests/cacheir/spread-minmax-1.js | 23 + js/src/jit-test/tests/cacheir/spread-minmax-2.js | 23 + js/src/jit-test/tests/cacheir/spread-minmax-3.js | 25 + js/src/jit-test/tests/cacheir/spread-minmax-4.js | 15 + js/src/jit-test/tests/cacheir/spread-minmax-5.js | 12 + .../store-dense-element-hole-non-extensible.js | 55 + ...se-element-hole-non-writable-length-at-start.js | 55 + ...store-dense-element-hole-non-writable-length.js | 55 + .../tests/cacheir/store-dense-element-hole.js | 43 + .../tests/cacheir/store-typed-element-bigint.js | 131 + .../store-typed-element-constant-double-rhs.js | 15 + .../cacheir/store-typed-element-payload-reg-rhs.js | 17 + .../store-typed-element-payload-stack-rhs.js | 20 + js/src/jit-test/tests/cacheir/string-at-oob.js | 151 + js/src/jit-test/tests/cacheir/string-at-rope.js | 80 + js/src/jit-test/tests/cacheir/string-at.js | 115 + js/src/jit-test/tests/cacheir/string-charAt-oob.js | 151 + .../jit-test/tests/cacheir/string-charAt-rope.js | 80 + .../tests/cacheir/string-charCodeAt-oob.js | 151 + .../tests/cacheir/string-charCodeAt-rope.js | 80 + .../tests/cacheir/string-codePointAt-oob.js | 151 + .../cacheir/string-codePointAt-rope-twobyte.js | 88 + .../tests/cacheir/string-codePointAt-rope.js | 80 + .../tests/cacheir/string-codePointAt-surrogate.js | 103 + .../tests/cacheir/string-concat-null-undef.js | 31 + .../tests/cacheir/string-fromCharCode-double.js | 17 + .../jit-test/tests/cacheir/string-fromcodepoint.js | 15 + .../jit-test/tests/cacheir/string-int32-arith.js | 56 + .../jit-test/tests/cacheir/string-lastIndexOf.js | 102 + js/src/jit-test/tests/cacheir/string-loadchar.js | 44 + .../jit-test/tests/cacheir/string-number-arith.js | 32 + .../tests/cacheir/string-toString-valueOf.js | 23 + .../jit-test/tests/cacheir/stub-fold-closeiter.js | 25 + .../cacheir/symbol-loose-equal-incompatible.js | 35 + js/src/jit-test/tests/cacheir/tobool.js | 95 + js/src/jit-test/tests/cacheir/topropertykey.js | 36 + .../tests/cacheir/typed-array-intrinsics.js | 93 + .../cacheir/typedarray-constructor-objects.js | 60 + .../tests/cacheir/typedarray-megamorphic-get.js | 53 + .../tests/cacheir/typedarray-megamorphic-has.js | 53 + .../cacheir/typedarray-non-int32-index-get.js | 37 + .../cacheir/typedarray-non-int32-index-has.js | 37 + .../cacheir/typedarray-non-int32-index-set.js | 37 + .../cacheir/typedarray-non-number-value-set.js | 126 + js/src/jit-test/tests/cacheir/typeof-proxy.js | 19 + .../tests/cacheir/unaryarith-null-undef-bool.js | 26 + js/src/jit-test/tests/cacheir/unaryarith-string.js | 58 + js/src/jit-test/tests/cacheir/unaryarith.js | 62 + .../jit-test/tests/cacheir/unboxed-element-hole.js | 41 + js/src/jit-test/tests/cacheir/windowproxy.js | 32 + js/src/jit-test/tests/class/bug1169746.js | 10 + js/src/jit-test/tests/class/bug1357506.js | 16 + js/src/jit-test/tests/class/bug1359622.js | 4 + .../tests/class/bug1473272-default-constructors.js | 24 + js/src/jit-test/tests/class/bug1488385.js | 13 + js/src/jit-test/tests/class/bug1567579.js | 4 + js/src/jit-test/tests/class/bug1616535.js | 3 + js/src/jit-test/tests/class/bug1628719.js | 28 + js/src/jit-test/tests/class/bug1645835.js | 18 + js/src/jit-test/tests/class/bug1709328.js | 18 + js/src/jit-test/tests/class/bug1715318.js | 18 + js/src/jit-test/tests/class/bug1720032-1.js | 29 + js/src/jit-test/tests/class/bug1720032-2.js | 27 + js/src/jit-test/tests/class/bug1720032-3.js | 27 + js/src/jit-test/tests/class/bug1727281.js | 4 + ...checkreturn-catch-return-finally-super-arrow.js | 22 + .../checkreturn-catch-return-finally-super.js | 20 + .../tests/class/checkreturn-catch-return.js | 21 + .../tests/class/checkreturn-catch-super-arrow.js | 21 + .../tests/class/checkreturn-catch-super.js | 19 + .../tests/class/checkreturn-finally-super-arrow.js | 20 + .../tests/class/checkreturn-finally-super.js | 18 + .../tests/class/checkreturn-for-condition.js | 68 + .../tests/class/checkreturn-for-of-arrow.js | 29 + js/src/jit-test/tests/class/checkreturn-for-of.js | 27 + js/src/jit-test/tests/class/checkreturn-for.js | 68 + .../tests/class/checkreturn-optimized-out.js | 23 + .../tests/class/checkreturn-source-location.js | 19 + js/src/jit-test/tests/class/checkreturn-while.js | 68 + js/src/jit-test/tests/class/class-static-01.js | 172 + js/src/jit-test/tests/class/class-static-02.js | 10 + js/src/jit-test/tests/class/class-static-03.js | 15 + js/src/jit-test/tests/class/classconstructor.js | 27 + js/src/jit-test/tests/class/compProp.js | 15 + .../tests/class/default-constructor-position.js | 68 + js/src/jit-test/tests/class/methDefn.js | 15 + .../class/regress-merge-descriptors-simple.js | 37 + .../tests/class/regress-merge-descriptors.js | 92 + .../jit-test/tests/class/relazify-constructor.js | 22 + .../tests/class/super-base-is-null-get-elem.js | 12 + .../tests/class/super-base-is-null-get-prop.js | 12 + .../tests/class/super-base-is-null-set-elem.js | 12 + .../tests/class/super-base-is-null-set-prop.js | 12 + .../jit-test/tests/class/super-in-nested-eval.js | 34 + js/src/jit-test/tests/class/super-this-env.js | 34 + .../jit-test/tests/class/superElemMegamorphic.js | 33 + js/src/jit-test/tests/class/superProp.js | 62 + .../jit-test/tests/class/superPropMegamorphic.js | 42 + js/src/jit-test/tests/class/superPropProxy.js | 23 + js/src/jit-test/tests/class/superSetPropThrow.js | 64 + js/src/jit-test/tests/class/superSetProperty.js | 67 + ...lar-replacement-in-derived-class-constructor.js | 29 + .../jit-test/tests/class/throwOnCallConstructor.js | 77 + js/src/jit-test/tests/closures/bug496922.js | 21 + js/src/jit-test/tests/closures/bug540131-2.js | 13 + js/src/jit-test/tests/closures/bug540131.js | 5 + js/src/jit-test/tests/closures/bug540242.js | 17 + js/src/jit-test/tests/closures/bug540243.js | 10 + js/src/jit-test/tests/closures/bug540528.js | 4 + js/src/jit-test/tests/closures/bug541239.js | 16 + js/src/jit-test/tests/closures/bug543565.js | 7 + js/src/jit-test/tests/closures/bug684178.js | 9 + js/src/jit-test/tests/closures/bug684489.js | 2 + js/src/jit-test/tests/closures/closure-pluseq.js | 31 + js/src/jit-test/tests/closures/closure-pluseq2.js | 30 + js/src/jit-test/tests/closures/closure-plusplus.js | 31 + js/src/jit-test/tests/closures/closure-tests.js | 6 + js/src/jit-test/tests/closures/flat-closure-1.js | 18 + js/src/jit-test/tests/closures/flat-closure-7.js | 15 + js/src/jit-test/tests/closures/flat-closure-8.js | 19 + .../jit-test/tests/closures/lambda-inner-heavy.js | 32 + .../tests/closures/lambda-light-returned.js | 25 + js/src/jit-test/tests/closures/lambda-light.js | 19 + js/src/jit-test/tests/closures/lambda.js | 22 + js/src/jit-test/tests/closures/lambdafc.js | 25 + js/src/jit-test/tests/closures/name-both-hvy.js | 28 + .../tests/closures/name-inactive-missing.js | 14 + js/src/jit-test/tests/closures/name.js | 25 + js/src/jit-test/tests/closures/name2.js | 23 + js/src/jit-test/tests/closures/name2a.js | 23 + js/src/jit-test/tests/closures/name2b.js | 23 + js/src/jit-test/tests/closures/name3.js | 24 + js/src/jit-test/tests/closures/name4.js | 22 + js/src/jit-test/tests/closures/namedLambda.js | 17 + js/src/jit-test/tests/closures/nameinc-loop-2.js | 26 + js/src/jit-test/tests/closures/nameinc-loop-3.js | 33 + .../tests/closures/nameinc-loop-missing-2.js | 19 + .../tests/closures/nameinc-loop-missing.js | 21 + js/src/jit-test/tests/closures/nameinc-loop.js | 24 + js/src/jit-test/tests/closures/nameinc.js | 21 + .../jit-test/tests/closures/set-outer-trace-1.js | 24 + .../jit-test/tests/closures/set-outer-trace-2.js | 23 + .../jit-test/tests/closures/set-outer-trace-3.js | 23 + .../jit-test/tests/closures/set-outer-trace-4.js | 23 + js/src/jit-test/tests/closures/set-outer-trace.js | 23 + js/src/jit-test/tests/closures/setname-1.js | 26 + .../jit-test/tests/closures/setname-closure-2.js | 27 + js/src/jit-test/tests/closures/setname-closure.js | 25 + .../jit-test/tests/closures/setname-inner-heavy.js | 18 + js/src/jit-test/tests/closures/setname-loop-2.js | 29 + js/src/jit-test/tests/closures/setname-loop.js | 26 + js/src/jit-test/tests/closures/setname-no-pop.js | 16 + js/src/jit-test/tests/closures/t001.js | 21 + js/src/jit-test/tests/closures/t002.js | 21 + js/src/jit-test/tests/closures/t003.js | 21 + js/src/jit-test/tests/closures/t004.js | 21 + js/src/jit-test/tests/closures/t005.js | 24 + js/src/jit-test/tests/closures/t006.js | 22 + js/src/jit-test/tests/closures/t007.js | 23 + js/src/jit-test/tests/closures/t008.js | 26 + js/src/jit-test/tests/closures/t009.js | 18 + js/src/jit-test/tests/closures/t010.js | 21 + js/src/jit-test/tests/closures/t011.js | 18 + js/src/jit-test/tests/closures/t012.js | 19 + js/src/jit-test/tests/closures/t013.js | 21 + js/src/jit-test/tests/closures/t014.js | 21 + js/src/jit-test/tests/closures/t015.js | 21 + js/src/jit-test/tests/closures/t016.js | 23 + js/src/jit-test/tests/closures/t017.js | 23 + js/src/jit-test/tests/closures/t020.js | 17 + js/src/jit-test/tests/closures/t021.js | 18 + js/src/jit-test/tests/closures/t022.js | 24 + js/src/jit-test/tests/closures/t023.js | 17 + js/src/jit-test/tests/closures/t024.js | 19 + js/src/jit-test/tests/closures/t025.js | 26 + js/src/jit-test/tests/closures/t026.js | 22 + js/src/jit-test/tests/closures/t027.js | 21 + js/src/jit-test/tests/closures/t028.js | 23 + js/src/jit-test/tests/closures/t029.js | 21 + js/src/jit-test/tests/closures/t030.js | 21 + js/src/jit-test/tests/closures/t031.js | 21 + js/src/jit-test/tests/closures/t032.js | 24 + js/src/jit-test/tests/closures/t033.js | 19 + js/src/jit-test/tests/closures/t034.js | 20 + js/src/jit-test/tests/closures/t035.js | 18 + js/src/jit-test/tests/closures/t036.js | 24 + js/src/jit-test/tests/closures/t037.js | 14 + .../jit-test/tests/closures/test-inner-imports.js | 22 + js/src/jit-test/tests/closures/upvar-nest.js | 24 + js/src/jit-test/tests/collections/Array-of-1.js | 15 + js/src/jit-test/tests/collections/Array-of-2.js | 14 + js/src/jit-test/tests/collections/Array-of-3.js | 8 + js/src/jit-test/tests/collections/Array-of-4.js | 13 + .../collections/Array-of-cross-compartment.js | 10 + .../tests/collections/Array-of-generic-1.js | 25 + .../tests/collections/Array-of-generic-2.js | 11 + .../tests/collections/Array-of-generic-3.js | 7 + .../tests/collections/Array-of-length-setter-2.js | 13 + .../tests/collections/Array-of-length-setter.js | 26 + .../collections/Array-of-nonconfigurable-1.js | 8 + .../collections/Array-of-nonconfigurable-2.js | 16 + .../tests/collections/Array-of-ordering.js | 32 + .../tests/collections/Array-of-surfaces.js | 14 + .../tests/collections/Map-Set-moving-gc.js | 16 + js/src/jit-test/tests/collections/Map-clear-1.js | 8 + js/src/jit-test/tests/collections/Map-clear-2.js | 17 + js/src/jit-test/tests/collections/Map-clear-3.js | 10 + js/src/jit-test/tests/collections/Map-clear-4.js | 10 + js/src/jit-test/tests/collections/Map-clear-5.js | 14 + js/src/jit-test/tests/collections/Map-clear-6.js | 6 + .../tests/collections/Map-clear-iterators-1.js | 23 + .../tests/collections/Map-clear-iterators-2.js | 12 + .../tests/collections/Map-constructor-1.js | 14 + .../tests/collections/Map-constructor-2.js | 6 + .../tests/collections/Map-constructor-3.js | 9 + .../tests/collections/Map-constructor-4.js | 6 + .../tests/collections/Map-constructor-5.js | 15 + .../collections/Map-constructor-duplicates.js | 8 + .../collections/Map-constructor-generator-1.js | 19 + .../collections/Map-constructor-generator-3.js | 7 + .../Map-constructor-generator-exception.js | 12 + .../tests/collections/Map-constructor-set.js | 204 + .../jit-test/tests/collections/Map-delete-size.js | 14 + js/src/jit-test/tests/collections/Map-delete.js | 18 + js/src/jit-test/tests/collections/Map-forEach.js | 58 + js/src/jit-test/tests/collections/Map-gc-4.js | 15 + js/src/jit-test/tests/collections/Map-get.js | 41 + .../jit-test/tests/collections/Map-iterator-1.js | 11 + .../jit-test/tests/collections/Map-iterator-2.js | 11 + .../tests/collections/Map-iterator-add-1.js | 15 + .../tests/collections/Map-iterator-add-2.js | 10 + .../tests/collections/Map-iterator-add-remove.js | 14 + .../tests/collections/Map-iterator-already-done.js | 12 + .../tests/collections/Map-iterator-order.js | 15 + .../tests/collections/Map-iterator-pairs-1.js | 17 + .../tests/collections/Map-iterator-pairs-2.js | 13 + .../tests/collections/Map-iterator-pairs-3.js | 13 + .../tests/collections/Map-iterator-proxies-1.js | 8 + .../tests/collections/Map-iterator-proxies-2.js | 21 + .../tests/collections/Map-iterator-remove-1.js | 40 + .../tests/collections/Map-iterator-remove-2.js | 13 + .../tests/collections/Map-iterator-remove-3.js | 13 + .../tests/collections/Map-iterator-remove-4.js | 31 + .../tests/collections/Map-iterator-remove-5.js | 22 + .../tests/collections/Map-iterator-remove-6.js | 21 + .../jit-test/tests/collections/Map-iterators-3.js | 10 + js/src/jit-test/tests/collections/Map-scale.js | 8 + .../tests/collections/Map-set-returns-this.js | 7 + js/src/jit-test/tests/collections/Map-set-size.js | 14 + .../tests/collections/Map-set-undefined.js | 15 + js/src/jit-test/tests/collections/Map-size.js | 6 + .../jit-test/tests/collections/Map-surfaces-1.js | 48 + .../jit-test/tests/collections/Map-surfaces-2.js | 29 + .../jit-test/tests/collections/Map-surfaces-3.js | 14 + js/src/jit-test/tests/collections/Map-values-1.js | 14 + js/src/jit-test/tests/collections/Map-values-2.js | 18 + .../tests/collections/Set-add-returns-this.js | 7 + js/src/jit-test/tests/collections/Set-add-size.js | 11 + js/src/jit-test/tests/collections/Set-clear-1.js | 8 + js/src/jit-test/tests/collections/Set-clear-2.js | 16 + js/src/jit-test/tests/collections/Set-clear-3.js | 10 + js/src/jit-test/tests/collections/Set-clear-4.js | 10 + js/src/jit-test/tests/collections/Set-clear-5.js | 14 + js/src/jit-test/tests/collections/Set-clear-6.js | 6 + .../tests/collections/Set-clear-iterators-1.js | 23 + .../tests/collections/Set-clear-iterators-2.js | 11 + .../tests/collections/Set-clear-iterators-3.js | 10 + .../tests/collections/Set-constructor-1.js | 14 + .../tests/collections/Set-constructor-2.js | 18 + .../tests/collections/Set-constructor-3.js | 12 + .../tests/collections/Set-constructor-add.js | 183 + .../collections/Set-constructor-generator-1.js | 12 + .../jit-test/tests/collections/Set-delete-size.js | 15 + js/src/jit-test/tests/collections/Set-forEach.js | 49 + .../jit-test/tests/collections/Set-iterator-1.js | 11 + .../jit-test/tests/collections/Set-iterator-2.js | 11 + .../jit-test/tests/collections/Set-iterator-3.js | 11 + .../tests/collections/Set-iterator-add-1.js | 11 + .../tests/collections/Set-iterator-add-2.js | 10 + .../tests/collections/Set-iterator-add-remove.js | 13 + .../tests/collections/Set-iterator-gc-2.js | 8 + .../tests/collections/Set-iterator-gc-3.js | 20 + .../tests/collections/Set-iterator-order.js | 14 + .../tests/collections/Set-iterator-proxies-1.js | 8 + .../tests/collections/Set-iterator-proxies-2.js | 20 + .../tests/collections/Set-iterator-remove-1.js | 26 + .../tests/collections/Set-iterator-remove-2.js | 13 + .../tests/collections/Set-iterator-remove-3.js | 12 + .../tests/collections/Set-iterator-remove-4.js | 31 + .../tests/collections/Set-iterator-remove-5.js | 22 + .../tests/collections/Set-iterator-remove-6.js | 20 + js/src/jit-test/tests/collections/Set-scale.js | 8 + js/src/jit-test/tests/collections/Set-size.js | 7 + .../jit-test/tests/collections/Set-surfaces-1.js | 47 + .../jit-test/tests/collections/Set-surfaces-2.js | 28 + .../jit-test/tests/collections/Set-surfaces-3.js | 10 + js/src/jit-test/tests/collections/Set-values-1.js | 14 + js/src/jit-test/tests/collections/Set-values-2.js | 18 + .../tests/collections/WeakMap-constructor-1.js | 11 + .../tests/collections/WeakMap-constructor-2.js | 37 + .../tests/collections/WeakMap-constructor-3.js | 35 + .../tests/collections/WeakMap-constructor-4.js | 6 + .../tests/collections/WeakMap-constructor-5.js | 23 + .../WeakMap-constructor-arraylike-exception.js | 23 + .../collections/WeakMap-constructor-duplicates.js | 27 + .../collections/WeakMap-constructor-generator-1.js | 25 + .../collections/WeakMap-constructor-generator-3.js | 6 + .../WeakMap-constructor-generator-exception.js | 13 + .../collections/WeakMap-constructor-iterable.js | 28 + .../WeakMap-constructor-non-iterable.js | 13 + .../collections/WeakMap-constructor-nonnull.js | 11 + .../tests/collections/WeakMap-constructor-set.js | 199 + .../tests/collections/WeakMap-moving-gc.js | 12 + .../tests/collections/WeakMap-set-returns-this.js | 9 + .../jit-test/tests/collections/WeakMap-surfaces.js | 32 + .../tests/collections/WeakSet-add-returns-this.js | 9 + .../tests/collections/WeakSet-constructor-1.js | 11 + .../tests/collections/WeakSet-constructor-add.js | 178 + .../tests/collections/WeakSet-constructor.js | 9 + .../jit-test/tests/collections/WeakSet-delete.js | 32 + js/src/jit-test/tests/collections/WeakSet-error.js | 22 + .../tests/collections/WeakSet-moving-gc.js | 12 + .../jit-test/tests/collections/WeakSet-surface.js | 31 + js/src/jit-test/tests/collections/bug-1381423.js | 5 + js/src/jit-test/tests/collections/bug-1863391-1.js | 8 + js/src/jit-test/tests/collections/bug-1863391-2.js | 6 + js/src/jit-test/tests/collections/bug-1866636.js | 10 + js/src/jit-test/tests/collections/bug-743101.js | 7 + .../tests/collections/constructor-errors.js | 19 + js/src/jit-test/tests/collections/for-in.js | 25 + js/src/jit-test/tests/collections/iterator-1.js | 13 + js/src/jit-test/tests/collections/iterator-2.js | 12 + .../tests/collections/iterator-noSuchMethod.js | 24 + .../jit-test/tests/collections/iterator-proto-1.js | 18 + .../jit-test/tests/collections/iterator-proto-2.js | 13 + .../tests/collections/iterator-proto-surfaces.js | 39 + .../jit-test/tests/collections/key-equality-0.js | 43 + .../jit-test/tests/collections/key-equality-1.js | 28 + .../jit-test/tests/collections/key-equality-2.js | 11 + .../jit-test/tests/collections/key-equality-NaN.js | 15 + js/src/jit-test/tests/coverage/bug1203695.js | 15 + js/src/jit-test/tests/coverage/bug1206247.js | 6 + js/src/jit-test/tests/coverage/bug1214548.js | 12 + js/src/jit-test/tests/coverage/bug1274048.js | 10 + .../tests/coverage/bug1304569-switch-case.js | 14 + .../jit-test/tests/coverage/getLcovInfo_twice.js | 4 + js/src/jit-test/tests/coverage/lcov-enabled-1.js | 5 + js/src/jit-test/tests/coverage/lcov-enabled-2.js | 7 + js/src/jit-test/tests/coverage/off-thread-01.js | 23 + js/src/jit-test/tests/coverage/off-thread-02.js | 25 + js/src/jit-test/tests/coverage/simple.js | 596 + js/src/jit-test/tests/ctypes/AddressOfField.js | 12 + .../jit-test/tests/ctypes/argument-length-abi.js | 11 + .../jit-test/tests/ctypes/argument-length-array.js | 15 + .../jit-test/tests/ctypes/argument-length-cdata.js | 18 + .../tests/ctypes/argument-length-ctypes.js | 11 + .../tests/ctypes/argument-length-finalizer.js | 16 + .../tests/ctypes/argument-length-function.js | 11 + .../jit-test/tests/ctypes/argument-length-int64.js | 40 + .../tests/ctypes/argument-length-pointer.js | 11 + .../tests/ctypes/argument-length-primitive.js | 11 + .../tests/ctypes/argument-length-struct.js | 17 + .../jit-test/tests/ctypes/argument-type-array.js | 17 + .../jit-test/tests/ctypes/argument-type-ctypes.js | 13 + .../tests/ctypes/argument-type-function.js | 9 + .../jit-test/tests/ctypes/argument-type-int64.js | 28 + .../jit-test/tests/ctypes/argument-type-pointer.js | 9 + .../jit-test/tests/ctypes/argument-type-struct.js | 17 + js/src/jit-test/tests/ctypes/array-index.js | 29 + js/src/jit-test/tests/ctypes/bug1155985.js | 14 + js/src/jit-test/tests/ctypes/cast.js | 12 + js/src/jit-test/tests/ctypes/construct.js | 11 + js/src/jit-test/tests/ctypes/conversion-array.js | 36 + js/src/jit-test/tests/ctypes/conversion-error.js | 14 + .../jit-test/tests/ctypes/conversion-finalizer.js | 63 + .../jit-test/tests/ctypes/conversion-function.js | 33 + js/src/jit-test/tests/ctypes/conversion-int64.js | 20 + .../tests/ctypes/conversion-native-function.js | 37 + js/src/jit-test/tests/ctypes/conversion-pointer.js | 29 + .../jit-test/tests/ctypes/conversion-primitive.js | 44 + js/src/jit-test/tests/ctypes/conversion-struct.js | 36 + .../jit-test/tests/ctypes/conversion-to-number.js | 98 + .../tests/ctypes/conversion-to-primitive.js | 20 + .../jit-test/tests/ctypes/function-definition.js | 47 + js/src/jit-test/tests/ctypes/incompatible-abi.js | 11 + js/src/jit-test/tests/ctypes/incompatible-array.js | 13 + js/src/jit-test/tests/ctypes/incompatible-cdata.js | 27 + js/src/jit-test/tests/ctypes/incompatible-ctype.js | 13 + .../tests/ctypes/incompatible-finalizer.js | 26 + .../jit-test/tests/ctypes/incompatible-function.js | 13 + js/src/jit-test/tests/ctypes/incompatible-int64.js | 28 + .../jit-test/tests/ctypes/incompatible-pointer.js | 19 + .../jit-test/tests/ctypes/incompatible-struct.js | 31 + js/src/jit-test/tests/ctypes/pointer.js | 31 + .../jit-test/tests/ctypes/size-overflow-array.js | 18 + .../jit-test/tests/ctypes/size-overflow-struct.js | 24 + js/src/jit-test/tests/ctypes/struct-field.js | 21 + js/src/jit-test/tests/ctypes/typedarrays.js | 102 + .../tests/dataview/create-out-of-bounds-ccw.js | 23 + .../tests/dataview/nan-canonicalization.js | 168 + .../tests/dataview/out-of-bounds-access.js | 61 + js/src/jit-test/tests/dataview/read-aligned.js | 52 + js/src/jit-test/tests/dataview/read-unaligned.js | 52 + .../jit-test/tests/dataview/throws-on-detached.js | 43 + js/src/jit-test/tests/dataview/write-aligned.js | 70 + js/src/jit-test/tests/dataview/write-unaligned.js | 70 + js/src/jit-test/tests/debug/DebuggeeWouldRun-01.js | 7 + js/src/jit-test/tests/debug/DebuggeeWouldRun-02.js | 7 + js/src/jit-test/tests/debug/DebuggeeWouldRun-03.js | 9 + js/src/jit-test/tests/debug/DebuggeeWouldRun-04.js | 9 + .../tests/debug/Debugger-add-Debugger-prototype.js | 6 + .../tests/debug/Debugger-adoptDebuggeeValue.js | 39 + js/src/jit-test/tests/debug/Debugger-adoptFrame.js | 81 + .../debug/Debugger-allowUnobservedAsmJS-01.js | 26 + .../debug/Debugger-allowUnobservedAsmJS-02.js | 26 + .../tests/debug/Debugger-clearAllBreakpoints-01.js | 29 + .../tests/debug/Debugger-clearAllBreakpoints-02.js | 31 + js/src/jit-test/tests/debug/Debugger-ctor-01.js | 21 + js/src/jit-test/tests/debug/Debugger-ctor-02.js | 13 + js/src/jit-test/tests/debug/Debugger-ctor-03.js | 19 + js/src/jit-test/tests/debug/Debugger-ctor-04.js | 5 + js/src/jit-test/tests/debug/Debugger-ctor-05.js | 8 + .../jit-test/tests/debug/Debugger-debuggees-01.js | 5 + .../jit-test/tests/debug/Debugger-debuggees-02.js | 10 + .../jit-test/tests/debug/Debugger-debuggees-03.js | 34 + .../jit-test/tests/debug/Debugger-debuggees-04.js | 26 + .../jit-test/tests/debug/Debugger-debuggees-05.js | 8 + .../jit-test/tests/debug/Debugger-debuggees-06.js | 27 + .../jit-test/tests/debug/Debugger-debuggees-08.js | 25 + .../jit-test/tests/debug/Debugger-debuggees-09.js | 21 + .../jit-test/tests/debug/Debugger-debuggees-10.js | 18 + .../jit-test/tests/debug/Debugger-debuggees-11.js | 22 + .../jit-test/tests/debug/Debugger-debuggees-12.js | 10 + .../jit-test/tests/debug/Debugger-debuggees-13.js | 9 + .../jit-test/tests/debug/Debugger-debuggees-14.js | 8 + .../jit-test/tests/debug/Debugger-debuggees-15.js | 7 + .../jit-test/tests/debug/Debugger-debuggees-16.js | 30 + .../jit-test/tests/debug/Debugger-debuggees-17.js | 26 + .../jit-test/tests/debug/Debugger-debuggees-18.js | 114 + .../jit-test/tests/debug/Debugger-debuggees-19.js | 49 + .../jit-test/tests/debug/Debugger-debuggees-20.js | 30 + .../jit-test/tests/debug/Debugger-debuggees-21.js | 12 + .../jit-test/tests/debug/Debugger-debuggees-22.js | 24 + .../jit-test/tests/debug/Debugger-debuggees-23.js | 107 + .../jit-test/tests/debug/Debugger-debuggees-24.js | 55 + .../jit-test/tests/debug/Debugger-debuggees-25.js | 48 + .../jit-test/tests/debug/Debugger-debuggees-26.js | 34 + .../jit-test/tests/debug/Debugger-debuggees-27.js | 19 + .../jit-test/tests/debug/Debugger-debuggees-28.js | 109 + .../jit-test/tests/debug/Debugger-debuggees-29.js | 6 + .../jit-test/tests/debug/Debugger-debuggees-30.js | 32 + .../jit-test/tests/debug/Debugger-debuggees-31.js | 30 + .../jit-test/tests/debug/Debugger-debuggees-32.js | 13 + .../tests/debug/Debugger-findAllGlobals-01.js | 24 + .../tests/debug/Debugger-findAllGlobals-02.js | 26 + .../tests/debug/Debugger-findObjects-01.js | 4 + .../tests/debug/Debugger-findObjects-02.js | 18 + .../tests/debug/Debugger-findObjects-03.js | 12 + .../tests/debug/Debugger-findObjects-04.js | 16 + .../tests/debug/Debugger-findObjects-05.js | 10 + .../tests/debug/Debugger-findObjects-06.js | 14 + .../tests/debug/Debugger-findObjects-07.js | 22 + .../tests/debug/Debugger-findObjects-08.js | 12 + .../tests/debug/Debugger-findObjects-09.js | 9 + .../tests/debug/Debugger-findObjects-10.js | 5 + .../tests/debug/Debugger-findObjects-11.js | 7 + .../tests/debug/Debugger-findObjects-fuzzing.js | 7 + .../tests/debug/Debugger-findScripts-01.js | 4 + .../tests/debug/Debugger-findScripts-02.js | 16 + .../tests/debug/Debugger-findScripts-03.js | 16 + .../tests/debug/Debugger-findScripts-04.js | 27 + .../tests/debug/Debugger-findScripts-05.js | 18 + .../tests/debug/Debugger-findScripts-06.js | 13 + .../tests/debug/Debugger-findScripts-07.js | 33 + .../tests/debug/Debugger-findScripts-08-script2 | 3 + .../tests/debug/Debugger-findScripts-08.js | 81 + .../tests/debug/Debugger-findScripts-09.js | 45 + .../tests/debug/Debugger-findScripts-10.js | 13 + .../tests/debug/Debugger-findScripts-11-script2 | 18 + .../tests/debug/Debugger-findScripts-11.js | 36 + .../tests/debug/Debugger-findScripts-12-script1 | 19 + .../tests/debug/Debugger-findScripts-12-script2 | 19 + .../tests/debug/Debugger-findScripts-12.js | 129 + .../tests/debug/Debugger-findScripts-14.js | 30 + .../tests/debug/Debugger-findScripts-14.script1 | 12 + .../tests/debug/Debugger-findScripts-15.js | 9 + .../tests/debug/Debugger-findScripts-16.js | 12 + .../tests/debug/Debugger-findScripts-17.js | 15 + .../tests/debug/Debugger-findScripts-18.js | 46 + .../tests/debug/Debugger-findScripts-19.js | 5 + .../tests/debug/Debugger-findScripts-20.js | 20 + .../tests/debug/Debugger-findScripts-22.js | 8 + .../tests/debug/Debugger-findScripts-23.js | 21 + .../tests/debug/Debugger-findScripts-24.js | 35 + .../tests/debug/Debugger-findScripts-25.js | 14 + .../tests/debug/Debugger-findScripts-26.js | 18 + .../tests/debug/Debugger-findScripts-27.js | 22 + .../tests/debug/Debugger-findScripts-28.js | 26 + .../tests/debug/Debugger-findScripts-29.js | 21 + .../tests/debug/Debugger-findScripts-30.js | 21 + .../tests/debug/Debugger-findScripts-31.js | 21 + .../tests/debug/Debugger-findScripts-delazify.js | 485 + .../tests/debug/Debugger-findScripts-ghost.js | 37 + .../debug/Debugger-findScripts-optimized-out.js | 31 + .../debug/Debugger-findScripts-uncompleted-01.js | 54 + .../debug/Debugger-findScripts-uncompleted-02.js | 49 + .../tests/debug/Debugger-findSourceURLs.js | 18 + .../tests/debug/Debugger-findSources-01.js | 4 + .../tests/debug/Debugger-findSources-02.js | 15 + .../tests/debug/Debugger-findSources-03.js | 19 + .../tests/debug/Debugger-getNewestFrame-01.js | 20 + .../tests/debug/Debugger-getNewestFrame-02.js | 20 + .../tests/debug/Debugger-getNewestFrame-03.js | 9 + .../debug/Debugger-getNewestFrame-generators-01.js | 49 + .../tests/debug/Debugger-isCompilableUnit.js | 58 + js/src/jit-test/tests/debug/Debugger-multi-01.js | 31 + js/src/jit-test/tests/debug/Debugger-multi-02.js | 32 + js/src/jit-test/tests/debug/Debugger-multi-03.js | 21 + .../debug/Debugger-onEnterFrame-resumption-01.js | 45 + .../debug/Debugger-onEnterFrame-resumption-02.js | 28 + .../debug/Debugger-onEnterFrame-resumption-03.js | 26 + .../debug/Debugger-onEnterFrame-resumption-04.js | 16 + .../debug/Debugger-onEnterFrame-resumption-05.js | 98 + .../debug/Debugger-onEnterFrame-resumption-06.js | 31 + .../tests/debug/Debugger-onNativeCall-01.js | 74 + .../tests/debug/Debugger-onNativeCall-02.js | 61 + .../tests/debug/Debugger-onNativeCall-03.js | 30 + .../tests/debug/Debugger-onNativeCall-04.js | 26 + .../tests/debug/Debugger-onNativeCall-05.js | 26 + .../tests/debug/Debugger-onNativeCall-06.js | 70 + .../tests/debug/Debugger-onNativeCall-07.js | 33 + .../tests/debug/Debugger-onNativeCall-08.js | 22 + .../tests/debug/Debugger-onNativeCall-09.js | 27 + .../tests/debug/Debugger-onNativeCall-10.js | 95 + .../tests/debug/Debugger-onNewGlobalObject-01.js | 64 + .../tests/debug/Debugger-onNewGlobalObject-02.js | 23 + .../tests/debug/Debugger-onNewGlobalObject-03.js | 40 + .../tests/debug/Debugger-onNewGlobalObject-04.js | 14 + .../tests/debug/Debugger-onNewGlobalObject-05.js | 13 + .../tests/debug/Debugger-onNewGlobalObject-06.js | 20 + .../tests/debug/Debugger-onNewGlobalObject-07.js | 18 + .../tests/debug/Debugger-onNewGlobalObject-08.js | 26 + .../tests/debug/Debugger-onNewGlobalObject-09.js | 34 + .../tests/debug/Debugger-onNewGlobalObject-10.js | 27 + .../tests/debug/Debugger-onNewGlobalObject-11.js | 31 + .../tests/debug/Debugger-onNewGlobalObject-12.js | 25 + .../tests/debug/Debugger-onNewGlobalObject-13.js | 18 + .../tests/debug/Debugger-onNewGlobalObject-14.js | 17 + .../tests/debug/Debugger-onNewGlobalObject-15.js | 25 + .../tests/debug/Debugger-onNewPromise-01.js | 13 + .../tests/debug/Debugger-onNewPromise-02.js | 24 + .../tests/debug/Debugger-onNewPromise-03.js | 41 + .../tests/debug/Debugger-onNewPromise-04.js | 14 + .../tests/debug/Debugger-onNewPromise-05.js | 24 + .../tests/debug/Debugger-onNewPromise-06.js | 35 + .../tests/debug/Debugger-onNewPromise-07.js | 13 + .../tests/debug/Debugger-onPromiseSettled-01.js | 18 + .../tests/debug/Debugger-onPromiseSettled-02.js | 24 + .../tests/debug/Debugger-onPromiseSettled-03.js | 40 + .../tests/debug/Debugger-onPromiseSettled-04.js | 14 + .../tests/debug/Debugger-onPromiseSettled-05.js | 25 + .../tests/debug/Debugger-onPromiseSettled-06.js | 35 + js/src/jit-test/tests/debug/Environment-01.js | 23 + js/src/jit-test/tests/debug/Environment-02.js | 20 + js/src/jit-test/tests/debug/Environment-03.js | 10 + .../tests/debug/Environment-Function-prototype.js | 7 + .../tests/debug/Environment-bug-1431461.js | 26 + .../tests/debug/Environment-calleeScript-01.js | 48 + .../tests/debug/Environment-calleeScript-02.js | 25 + .../tests/debug/Environment-calleeScript-03.js | 25 + js/src/jit-test/tests/debug/Environment-find-01.js | 19 + js/src/jit-test/tests/debug/Environment-find-02.js | 18 + js/src/jit-test/tests/debug/Environment-find-03.js | 20 + js/src/jit-test/tests/debug/Environment-find-04.js | 21 + js/src/jit-test/tests/debug/Environment-find-05.js | 0 js/src/jit-test/tests/debug/Environment-find-06.js | 47 + js/src/jit-test/tests/debug/Environment-find-07.js | 22 + js/src/jit-test/tests/debug/Environment-gc-01.js | 19 + js/src/jit-test/tests/debug/Environment-gc-02.js | 28 + js/src/jit-test/tests/debug/Environment-gc-03.js | 21 + .../tests/debug/Environment-getVariable-01.js | 14 + .../tests/debug/Environment-getVariable-02.js | 18 + .../tests/debug/Environment-getVariable-03.js | 21 + .../tests/debug/Environment-getVariable-04.js | 12 + .../tests/debug/Environment-getVariable-05.js | 10 + .../tests/debug/Environment-getVariable-06.js | 12 + .../tests/debug/Environment-getVariable-07.js | 10 + .../tests/debug/Environment-getVariable-08.js | 10 + .../tests/debug/Environment-getVariable-09.js | 13 + .../tests/debug/Environment-getVariable-10.js | 27 + .../tests/debug/Environment-getVariable-11.js | 15 + .../tests/debug/Environment-getVariable-12.js | 61 + .../tests/debug/Environment-getVariable-13.js | 50 + .../tests/debug/Environment-getVariable-14.js | 18 + .../tests/debug/Environment-getVariable-15.js | 31 + .../debug/Environment-getVariable-WouldRun.js | 17 + .../tests/debug/Environment-identity-01.js | 40 + .../tests/debug/Environment-identity-02.js | 29 + .../tests/debug/Environment-identity-03.js | 108 + .../tests/debug/Environment-identity-04.js | 19 + .../tests/debug/Environment-identity-05.js | 19 + .../tests/debug/Environment-inspectable-01.js | 80 + .../jit-test/tests/debug/Environment-module-01.js | 26 + .../jit-test/tests/debug/Environment-module-02.js | 30 + .../debug/Environment-module-tla-env-after-pop.js | 54 + .../tests/debug/Environment-module-tla-env.js | 16 + .../jit-test/tests/debug/Environment-module-tla.js | 25 + .../jit-test/tests/debug/Environment-names-01.js | 19 + .../jit-test/tests/debug/Environment-names-02.js | 34 + .../jit-test/tests/debug/Environment-names-03.js | 22 + .../tests/debug/Environment-nondebuggee.js | 40 + .../jit-test/tests/debug/Environment-object-01.js | 9 + .../tests/debug/Environment-optimizedOut-01.js | 44 + .../jit-test/tests/debug/Environment-parent-01.js | 18 + .../tests/debug/Environment-scopeKind-01.js | 26 + .../tests/debug/Environment-selfhosted-builtins.js | 15 + .../tests/debug/Environment-setVariable-01.js | 9 + .../tests/debug/Environment-setVariable-02.js | 10 + .../tests/debug/Environment-setVariable-03.js | 16 + .../tests/debug/Environment-setVariable-04.js | 10 + .../tests/debug/Environment-setVariable-05.js | 14 + .../tests/debug/Environment-setVariable-06.js | 9 + .../tests/debug/Environment-setVariable-07.js | 14 + .../tests/debug/Environment-setVariable-08.js | 29 + .../tests/debug/Environment-setVariable-10.js | 32 + .../tests/debug/Environment-setVariable-11.js | 16 + .../tests/debug/Environment-setVariable-12.js | 21 + .../tests/debug/Environment-setVariable-13.js | 20 + .../tests/debug/Environment-setVariable-14.js | 31 + .../tests/debug/Environment-setVariable-15.js | 34 + .../tests/debug/Environment-setVariable-16.js | 16 + .../tests/debug/Environment-setVariable-17.js | 17 + .../tests/debug/Environment-setVariable-18.js | 24 + .../tests/debug/Environment-setVariable-19.js | 22 + .../debug/Environment-setVariable-WouldRun.js | 23 + js/src/jit-test/tests/debug/Environment-type-01.js | 29 + .../tests/debug/Environment-unscopables.js | 37 + .../jit-test/tests/debug/Environment-variables.js | 85 + js/src/jit-test/tests/debug/Frame-01.js | 34 + js/src/jit-test/tests/debug/Frame-02.js | 24 + js/src/jit-test/tests/debug/Frame-03.js | 19 + js/src/jit-test/tests/debug/Frame-arguments-01.js | 41 + js/src/jit-test/tests/debug/Frame-arguments-02.js | 19 + js/src/jit-test/tests/debug/Frame-arguments-03.js | 34 + js/src/jit-test/tests/debug/Frame-arguments-04.js | 18 + js/src/jit-test/tests/debug/Frame-arguments-05.js | 19 + js/src/jit-test/tests/debug/Frame-arguments-06.js | 38 + js/src/jit-test/tests/debug/Frame-arguments-07.js | 24 + .../jit-test/tests/debug/Frame-asyncPromise-01.js | 72 + .../jit-test/tests/debug/Frame-asyncPromise-02.js | 26 + .../jit-test/tests/debug/Frame-asyncPromise-03.js | 39 + .../jit-test/tests/debug/Frame-asyncPromise-04.js | 104 + js/src/jit-test/tests/debug/Frame-callee-01.js | 26 + js/src/jit-test/tests/debug/Frame-callee-02.js | 37 + js/src/jit-test/tests/debug/Frame-callee-03.js | 37 + js/src/jit-test/tests/debug/Frame-callee-04.js | 47 + .../jit-test/tests/debug/Frame-constructing-01.js | 27 + .../jit-test/tests/debug/Frame-constructing-02.js | 31 + .../jit-test/tests/debug/Frame-constructing-03.js | 35 + .../jit-test/tests/debug/Frame-environment-01.js | 13 + .../jit-test/tests/debug/Frame-environment-02.js | 12 + .../jit-test/tests/debug/Frame-environment-03.js | 11 + .../jit-test/tests/debug/Frame-environment-04.js | 12 + .../jit-test/tests/debug/Frame-environment-05.js | 9 + .../jit-test/tests/debug/Frame-environment-06.js | 105 + .../jit-test/tests/debug/Frame-environment-07.js | 83 + .../jit-test/tests/debug/Frame-environment-08.js | 108 + js/src/jit-test/tests/debug/Frame-eval-01.js | 8 + js/src/jit-test/tests/debug/Frame-eval-02.js | 10 + js/src/jit-test/tests/debug/Frame-eval-03.js | 19 + js/src/jit-test/tests/debug/Frame-eval-04.js | 11 + js/src/jit-test/tests/debug/Frame-eval-05.js | 14 + js/src/jit-test/tests/debug/Frame-eval-06.js | 19 + js/src/jit-test/tests/debug/Frame-eval-07.js | 31 + js/src/jit-test/tests/debug/Frame-eval-08.js | 23 + js/src/jit-test/tests/debug/Frame-eval-09.js | 21 + js/src/jit-test/tests/debug/Frame-eval-10.js | 13 + js/src/jit-test/tests/debug/Frame-eval-11.js | 15 + js/src/jit-test/tests/debug/Frame-eval-12.js | 13 + js/src/jit-test/tests/debug/Frame-eval-13.js | 13 + js/src/jit-test/tests/debug/Frame-eval-14.js | 26 + js/src/jit-test/tests/debug/Frame-eval-15.js | 13 + js/src/jit-test/tests/debug/Frame-eval-16.js | 31 + js/src/jit-test/tests/debug/Frame-eval-17.js | 24 + js/src/jit-test/tests/debug/Frame-eval-18.js | 12 + js/src/jit-test/tests/debug/Frame-eval-19.js | 34 + js/src/jit-test/tests/debug/Frame-eval-20.js | 48 + js/src/jit-test/tests/debug/Frame-eval-21.js | 33 + js/src/jit-test/tests/debug/Frame-eval-22.js | 32 + js/src/jit-test/tests/debug/Frame-eval-23.js | 37 + js/src/jit-test/tests/debug/Frame-eval-24.js | 25 + js/src/jit-test/tests/debug/Frame-eval-25.js | 25 + js/src/jit-test/tests/debug/Frame-eval-26.js | 16 + js/src/jit-test/tests/debug/Frame-eval-27.js | 13 + js/src/jit-test/tests/debug/Frame-eval-28.js | 12 + js/src/jit-test/tests/debug/Frame-eval-29.js | 59 + js/src/jit-test/tests/debug/Frame-eval-30.js | 19 + js/src/jit-test/tests/debug/Frame-eval-31.js | 9 + js/src/jit-test/tests/debug/Frame-eval-32.js | 8 + js/src/jit-test/tests/debug/Frame-eval-33.js | 39 + js/src/jit-test/tests/debug/Frame-eval-stack.js | 19 + .../tests/debug/Frame-evalWithBindings-01.js | 35 + .../tests/debug/Frame-evalWithBindings-02.js | 21 + .../tests/debug/Frame-evalWithBindings-03.js | 16 + .../tests/debug/Frame-evalWithBindings-04.js | 17 + .../tests/debug/Frame-evalWithBindings-05.js | 12 + .../tests/debug/Frame-evalWithBindings-06.js | 9 + .../tests/debug/Frame-evalWithBindings-07.js | 16 + .../tests/debug/Frame-evalWithBindings-08.js | 13 + .../tests/debug/Frame-evalWithBindings-09.js | 27 + .../tests/debug/Frame-evalWithBindings-10.js | 16 + .../tests/debug/Frame-evalWithBindings-11.js | 18 + .../tests/debug/Frame-evalWithBindings-12.js | 31 + .../tests/debug/Frame-evalWithBindings-13.js | 24 + .../tests/debug/Frame-evalWithBindings-14.js | 20 + .../tests/debug/Frame-evalWithBindings-15.js | 15 + js/src/jit-test/tests/debug/Frame-identity-01.js | 19 + js/src/jit-test/tests/debug/Frame-identity-02.js | 21 + js/src/jit-test/tests/debug/Frame-identity-03.js | 49 + js/src/jit-test/tests/debug/Frame-identity-04.js | 20 + js/src/jit-test/tests/debug/Frame-identity-05.js | 20 + js/src/jit-test/tests/debug/Frame-identity-06.js | 45 + js/src/jit-test/tests/debug/Frame-identity-07.js | 52 + .../tests/debug/Frame-implementation-01.js | 46 + .../tests/debug/Frame-implementation-02.js | 51 + .../jit-test/tests/debug/Frame-newTargetEval-01.js | 40 + .../jit-test/tests/debug/Frame-newTargetEval-02.js | 43 + .../tests/debug/Frame-newTargetOverflow-01.js | 41 + js/src/jit-test/tests/debug/Frame-offset-01.js | 11 + js/src/jit-test/tests/debug/Frame-offset-02.js | 16 + js/src/jit-test/tests/debug/Frame-offset-03.js | 71 + js/src/jit-test/tests/debug/Frame-offset-04.js | 50 + js/src/jit-test/tests/debug/Frame-offset-05.js | 94 + js/src/jit-test/tests/debug/Frame-older-01.js | 19 + js/src/jit-test/tests/debug/Frame-older-02.js | 34 + .../tests/debug/Frame-older-generators-01.js | 53 + .../tests/debug/Frame-older-generators-02.js | 50 + .../tests/debug/Frame-older-generators-03.js | 24 + .../tests/debug/Frame-older-generators-04.js | 28 + .../tests/debug/Frame-older-generators-05.js | 32 + .../tests/debug/Frame-olderSavedFrame-01.js | 40 + .../tests/debug/Frame-olderSavedFrame-02.js | 32 + js/src/jit-test/tests/debug/Frame-onPop-01.js | 29 + js/src/jit-test/tests/debug/Frame-onPop-02.js | 20 + js/src/jit-test/tests/debug/Frame-onPop-03.js | 32 + js/src/jit-test/tests/debug/Frame-onPop-04.js | 30 + js/src/jit-test/tests/debug/Frame-onPop-05.js | 25 + js/src/jit-test/tests/debug/Frame-onPop-06.js | 20 + js/src/jit-test/tests/debug/Frame-onPop-08.js | 16 + js/src/jit-test/tests/debug/Frame-onPop-09.js | 23 + js/src/jit-test/tests/debug/Frame-onPop-10.js | 22 + js/src/jit-test/tests/debug/Frame-onPop-11.js | 23 + js/src/jit-test/tests/debug/Frame-onPop-12.js | 21 + js/src/jit-test/tests/debug/Frame-onPop-13.js | 37 + js/src/jit-test/tests/debug/Frame-onPop-14.js | 25 + js/src/jit-test/tests/debug/Frame-onPop-15.js | 31 + js/src/jit-test/tests/debug/Frame-onPop-16.js | 18 + js/src/jit-test/tests/debug/Frame-onPop-17.js | 41 + js/src/jit-test/tests/debug/Frame-onPop-18.js | 22 + js/src/jit-test/tests/debug/Frame-onPop-19.js | 16 + js/src/jit-test/tests/debug/Frame-onPop-20.js | 15 + js/src/jit-test/tests/debug/Frame-onPop-21.js | 30 + js/src/jit-test/tests/debug/Frame-onPop-23.js | 34 + .../debug/Frame-onPop-after-debugger-return.js | 11 + .../tests/debug/Frame-onPop-assign-function.js | 48 + .../tests/debug/Frame-onPop-assign-generator.js | 68 + .../jit-test/tests/debug/Frame-onPop-async-01.js | 39 + .../jit-test/tests/debug/Frame-onPop-async-02.js | 36 + .../tests/debug/Frame-onPop-async-generators-01.js | 53 + .../jit-test/tests/debug/Frame-onPop-dead-frame.js | 28 + .../tests/debug/Frame-onPop-error-error.js | 60 + .../tests/debug/Frame-onPop-error-return.js | 47 + .../debug/Frame-onPop-error-scope-unwind-01.js | 33 + .../debug/Frame-onPop-error-scope-unwind-02.js | 36 + .../tests/debug/Frame-onPop-error-throw.js | 42 + js/src/jit-test/tests/debug/Frame-onPop-error.js | 59 + .../debug/Frame-onPop-generator-resumption-01.js | 14 + .../tests/debug/Frame-onPop-generators-01.js | 20 + .../tests/debug/Frame-onPop-generators-02.js | 19 + .../tests/debug/Frame-onPop-generators-03.js | 42 + .../tests/debug/Frame-onPop-generators-04.js | 26 + .../tests/debug/Frame-onPop-generators-05.js | 29 + .../tests/debug/Frame-onPop-generators-06.js | 28 + .../tests/debug/Frame-onPop-generators-07.js | 40 + .../tests/debug/Frame-onPop-generators-08.js | 16 + .../tests/debug/Frame-onPop-multiple-01.js | 106 + .../tests/debug/Frame-onPop-multiple-02.js | 36 + .../tests/debug/Frame-onPop-multiple-04.js | 27 + .../tests/debug/Frame-onPop-return-error.js | 59 + .../tests/debug/Frame-onPop-return-return.js | 46 + .../tests/debug/Frame-onPop-return-throw.js | 41 + js/src/jit-test/tests/debug/Frame-onPop-return.js | 45 + .../tests/debug/Frame-onPop-source-location.js | 58 + .../tests/debug/Frame-onPop-throw-error.js | 59 + .../tests/debug/Frame-onPop-throw-return.js | 46 + .../tests/debug/Frame-onPop-throw-throw.js | 41 + js/src/jit-test/tests/debug/Frame-onPop-throw.js | 40 + js/src/jit-test/tests/debug/Frame-onStack-01.js | 41 + js/src/jit-test/tests/debug/Frame-onStack-02.js | 32 + js/src/jit-test/tests/debug/Frame-onStack-03.js | 25 + js/src/jit-test/tests/debug/Frame-onStack-04.js | 31 + js/src/jit-test/tests/debug/Frame-onStack-05.js | 33 + js/src/jit-test/tests/debug/Frame-onStack-06.js | 26 + js/src/jit-test/tests/debug/Frame-onStack-07.js | 56 + js/src/jit-test/tests/debug/Frame-onStep-01.js | 24 + js/src/jit-test/tests/debug/Frame-onStep-02.js | 27 + js/src/jit-test/tests/debug/Frame-onStep-03.js | 28 + js/src/jit-test/tests/debug/Frame-onStep-04.js | 34 + js/src/jit-test/tests/debug/Frame-onStep-05.js | 14 + js/src/jit-test/tests/debug/Frame-onStep-06.js | 58 + js/src/jit-test/tests/debug/Frame-onStep-07.js | 23 + js/src/jit-test/tests/debug/Frame-onStep-08.js | 29 + js/src/jit-test/tests/debug/Frame-onStep-09.js | 24 + js/src/jit-test/tests/debug/Frame-onStep-10.js | 28 + js/src/jit-test/tests/debug/Frame-onStep-11.js | 36 + js/src/jit-test/tests/debug/Frame-onStep-12.js | 118 + js/src/jit-test/tests/debug/Frame-onStep-13.js | 29 + js/src/jit-test/tests/debug/Frame-onStep-14.js | 46 + js/src/jit-test/tests/debug/Frame-onStep-15.js | 43 + js/src/jit-test/tests/debug/Frame-onStep-16.js | 34 + js/src/jit-test/tests/debug/Frame-onStep-17.js | 35 + js/src/jit-test/tests/debug/Frame-onStep-18.js | 22 + js/src/jit-test/tests/debug/Frame-onStep-19.js | 41 + js/src/jit-test/tests/debug/Frame-onStep-20.js | 41 + .../tests/debug/Frame-onStep-assign-function.js | 49 + .../tests/debug/Frame-onStep-assign-generator.js | 68 + .../jit-test/tests/debug/Frame-onStep-async-01.js | 35 + .../jit-test/tests/debug/Frame-onStep-async-02.js | 87 + .../jit-test/tests/debug/Frame-onStep-async-03.js | 18 + .../tests/debug/Frame-onStep-async-gc-01.js | 28 + .../debug/Frame-onStep-generator-resumption-01.js | 42 + .../debug/Frame-onStep-generator-resumption-02.js | 78 + .../debug/Frame-onStep-generator-resumption-03.js | 49 + .../tests/debug/Frame-onStep-generators-01.js | 31 + .../tests/debug/Frame-onStep-generators-02.js | 44 + .../tests/debug/Frame-onStep-generators-03.js | 45 + .../tests/debug/Frame-onStep-generators-04.js | 36 + .../tests/debug/Frame-onStep-generators-05.js | 14 + .../debug/Frame-onStep-generators-defaults.js | 35 + .../tests/debug/Frame-onStep-generators-gc-01.js | 84 + .../jit-test/tests/debug/Frame-onStep-iterators.js | 20 + .../jit-test/tests/debug/Frame-onStep-lines-01.js | 78 + .../tests/debug/Frame-onStep-resumption-01.js | 14 + .../tests/debug/Frame-onStep-resumption-02.js | 17 + .../tests/debug/Frame-onStep-resumption-03.js | 19 + .../tests/debug/Frame-onStep-resumption-04.js | 31 + .../tests/debug/Frame-onStep-resumption-05.js | 55 + .../tests/debug/Frame-onStep-resumption-06.js | 31 + js/src/jit-test/tests/debug/Frame-script-01.js | 25 + js/src/jit-test/tests/debug/Frame-script-02.js | 27 + js/src/jit-test/tests/debug/Frame-script-03.js | 8 + js/src/jit-test/tests/debug/Frame-script-04.js | 35 + js/src/jit-test/tests/debug/Frame-script-05.js | 37 + js/src/jit-test/tests/debug/Frame-script-06.js | 48 + .../debug/Frame-script-environment-nondebuggee.js | 32 + js/src/jit-test/tests/debug/Frame-terminated-01.js | 19 + js/src/jit-test/tests/debug/Frame-terminated-02.js | 27 + js/src/jit-test/tests/debug/Frame-terminated-03.js | 23 + js/src/jit-test/tests/debug/Frame-terminated-04.js | 31 + js/src/jit-test/tests/debug/Frame-this-01.js | 24 + js/src/jit-test/tests/debug/Frame-this-02.js | 17 + js/src/jit-test/tests/debug/Frame-this-03.js | 29 + js/src/jit-test/tests/debug/Frame-this-04.js | 25 + js/src/jit-test/tests/debug/Frame-this-05.js | 23 + js/src/jit-test/tests/debug/Frame-this-06.js | 22 + js/src/jit-test/tests/debug/Frame-this-07.js | 19 + js/src/jit-test/tests/debug/Frame-this-08.js | 16 + js/src/jit-test/tests/debug/Frame-this-09.js | 45 + js/src/jit-test/tests/debug/Frame-this-10.js | 42 + js/src/jit-test/tests/debug/Frame-this-11.js | 46 + js/src/jit-test/tests/debug/Frame-this-12.js | 42 + js/src/jit-test/tests/debug/Frame-this-13.js | 26 + js/src/jit-test/tests/debug/Frame-this-14.js | 31 + js/src/jit-test/tests/debug/Frame-this-15.js | 34 + js/src/jit-test/tests/debug/Frame-this-16.js | 38 + js/src/jit-test/tests/debug/Frame-type-01.js | 22 + js/src/jit-test/tests/debug/Frame-type-02.js | 27 + js/src/jit-test/tests/debug/Frame-type-03.js | 31 + js/src/jit-test/tests/debug/Frame-type-04.js | 35 + js/src/jit-test/tests/debug/Memory-01.js | 6 + .../Memory-allocationSamplingProbability-01.js | 45 + .../Memory-allocationSamplingProbability-02.js | 36 + .../debug/Memory-allocationsLogOverflowed-01.js | 24 + .../tests/debug/Memory-drainAllocationsLog-01.js | 31 + .../tests/debug/Memory-drainAllocationsLog-02.js | 14 + .../tests/debug/Memory-drainAllocationsLog-03.js | 24 + .../tests/debug/Memory-drainAllocationsLog-04.js | 21 + .../tests/debug/Memory-drainAllocationsLog-05.js | 9 + .../tests/debug/Memory-drainAllocationsLog-06.js | 23 + .../tests/debug/Memory-drainAllocationsLog-07.js | 10 + .../tests/debug/Memory-drainAllocationsLog-08.js | 30 + .../tests/debug/Memory-drainAllocationsLog-09.js | 20 + .../tests/debug/Memory-drainAllocationsLog-10.js | 21 + .../tests/debug/Memory-drainAllocationsLog-11.js | 25 + .../tests/debug/Memory-drainAllocationsLog-13.js | 16 + .../tests/debug/Memory-drainAllocationsLog-14.js | 47 + .../tests/debug/Memory-drainAllocationsLog-15.js | 30 + .../tests/debug/Memory-drainAllocationsLog-17.js | 55 + .../tests/debug/Memory-drainAllocationsLog-18.js | 31 + .../jit-test/tests/debug/Memory-takeCensus-01.js | 23 + .../jit-test/tests/debug/Memory-takeCensus-02.js | 49 + .../jit-test/tests/debug/Memory-takeCensus-03.js | 26 + .../jit-test/tests/debug/Memory-takeCensus-04.js | 27 + .../jit-test/tests/debug/Memory-takeCensus-05.js | 14 + .../jit-test/tests/debug/Memory-takeCensus-06.js | 108 + .../jit-test/tests/debug/Memory-takeCensus-07.js | 75 + .../jit-test/tests/debug/Memory-takeCensus-08.js | 73 + .../jit-test/tests/debug/Memory-takeCensus-09.js | 74 + .../jit-test/tests/debug/Memory-takeCensus-10.js | 60 + .../jit-test/tests/debug/Memory-takeCensus-11.js | 62 + .../jit-test/tests/debug/Memory-takeCensus-12.js | 61 + .../debug/Memory-trackingAllocationSites-01.js | 37 + .../debug/Memory-trackingAllocationSites-02.js | 19 + .../debug/Memory-trackingAllocationSites-03.js | 76 + js/src/jit-test/tests/debug/Object-01.js | 17 + js/src/jit-test/tests/debug/Object-02.js | 13 + js/src/jit-test/tests/debug/Object-apply-01.js | 59 + js/src/jit-test/tests/debug/Object-apply-02.js | 58 + js/src/jit-test/tests/debug/Object-apply-03.js | 21 + js/src/jit-test/tests/debug/Object-apply-04.js | 15 + .../tests/debug/Object-asEnvironment-01.js | 15 + .../tests/debug/Object-boundTargetFunction-01.js | 26 + .../tests/debug/Object-boundTargetFunction-02.js | 25 + .../tests/debug/Object-boundTargetFunction-03.js | 20 + js/src/jit-test/tests/debug/Object-callable.js | 18 + js/src/jit-test/tests/debug/Object-class.js | 26 + js/src/jit-test/tests/debug/Object-createSource.js | 20 + .../tests/debug/Object-defineProperties-01.js | 46 + .../tests/debug/Object-defineProperties-02.js | 33 + .../tests/debug/Object-defineProperties-03.js | 20 + .../tests/debug/Object-defineProperty-01.js | 12 + .../tests/debug/Object-defineProperty-02.js | 10 + .../tests/debug/Object-defineProperty-03.js | 21 + .../tests/debug/Object-defineProperty-04.js | 9 + .../tests/debug/Object-defineProperty-05.js | 20 + .../tests/debug/Object-defineProperty-06.js | 21 + .../tests/debug/Object-defineProperty-07.js | 10 + .../tests/debug/Object-defineProperty-08.js | 10 + .../tests/debug/Object-defineProperty-09.js | 24 + .../tests/debug/Object-defineProperty-10.js | 10 + .../tests/debug/Object-defineProperty-11.js | 16 + .../tests/debug/Object-defineProperty-12.js | 18 + .../tests/debug/Object-defineProperty-13.js | 16 + .../tests/debug/Object-defineProperty-14.js | 15 + .../Object-defineProperty-non-primitive-key.js | 41 + .../debug/Object-defineProperty-surfaces-01.js | 8 + .../tests/debug/Object-deleteProperty-01.js | 17 + .../tests/debug/Object-deleteProperty-error-01.js | 16 + .../tests/debug/Object-deleteProperty-error-02.js | 19 + .../Object-deleteProperty-non-primitive-key.js | 49 + .../jit-test/tests/debug/Object-displayName-01.js | 21 + .../jit-test/tests/debug/Object-displayName-02.js | 16 + .../jit-test/tests/debug/Object-environment-01.js | 17 + .../jit-test/tests/debug/Object-environment-02.js | 22 + .../Object-errorLineNumber-errorColumnNumber.js | 59 + .../tests/debug/Object-executeInGlobal-01.js | 13 + .../tests/debug/Object-executeInGlobal-02.js | 20 + .../tests/debug/Object-executeInGlobal-03.js | 19 + .../tests/debug/Object-executeInGlobal-04.js | 55 + .../tests/debug/Object-executeInGlobal-05.js | 21 + .../tests/debug/Object-executeInGlobal-06.js | 8 + .../tests/debug/Object-executeInGlobal-07.js | 29 + .../tests/debug/Object-executeInGlobal-08.js | 22 + .../tests/debug/Object-executeInGlobal-09.js | 9 + .../tests/debug/Object-executeInGlobal-10.js | 13 + .../tests/debug/Object-executeInGlobal-11.js | 29 + .../Object-forceLexicalInitializationByName.js | 61 + js/src/jit-test/tests/debug/Object-gc-01.js | 14 + .../tests/debug/Object-getErrorMessageName.js | 29 + .../tests/debug/Object-getOwnPrivateProperties.js | 44 + .../debug/Object-getOwnPropertyDescriptor-01.js | 59 + .../debug/Object-getOwnPropertyDescriptor-02.js | 8 + .../debug/Object-getOwnPropertyDescriptor-03.js | 22 + .../debug/Object-getOwnPropertyDescriptor-04.js | 18 + .../debug/Object-getOwnPropertyDescriptor-05.js | 17 + .../debug/Object-getOwnPropertyDescriptor-06.js | 29 + ...t-getOwnPropertyDescriptor-non-primitive-key.js | 37 + .../Object-getOwnPropertyDescriptor-surfaces-01.js | 14 + .../Object-getOwnPropertyDescriptor-surfaces-02.js | 14 + .../tests/debug/Object-getOwnPropertyNames-01.js | 33 + .../tests/debug/Object-getOwnPropertyNames-02.js | 11 + .../debug/Object-getOwnPropertyNamesLength.js | 41 + .../tests/debug/Object-getOwnPropertySymbols-01.js | 33 + .../tests/debug/Object-getOwnPropertySymbols-02.js | 12 + .../tests/debug/Object-getPromiseReactions-01.js | 25 + .../tests/debug/Object-getPromiseReactions-02.js | 49 + .../tests/debug/Object-getPromiseReactions-03.js | 41 + .../tests/debug/Object-getPromiseReactions-04.js | 48 + .../tests/debug/Object-getPromiseReactions-05.js | 48 + .../tests/debug/Object-getPromiseReactions-06.js | 43 + .../jit-test/tests/debug/Object-getProperty-01.js | 122 + .../jit-test/tests/debug/Object-getProperty-02.js | 35 + .../jit-test/tests/debug/Object-getProperty-03.js | 46 + .../debug/Object-getProperty-non-primitive-key.js | 37 + js/src/jit-test/tests/debug/Object-identity-01.js | 10 + js/src/jit-test/tests/debug/Object-identity-02.js | 10 + js/src/jit-test/tests/debug/Object-identity-03.js | 25 + .../jit-test/tests/debug/Object-isArrowFunction.js | 24 + .../tests/debug/Object-isClassConstructor.js | 21 + .../jit-test/tests/debug/Object-isSameNative-01.js | 9 + js/src/jit-test/tests/debug/Object-isSameNative.js | 49 + .../tests/debug/Object-makeDebuggeeValue-01.js | 42 + .../tests/debug/Object-makeDebuggeeValue-02.js | 12 + js/src/jit-test/tests/debug/Object-name-01.js | 17 + js/src/jit-test/tests/debug/Object-name-02.js | 16 + js/src/jit-test/tests/debug/Object-name-03.js | 49 + js/src/jit-test/tests/debug/Object-name-04.js | 16 + .../jit-test/tests/debug/Object-parameterNames.js | 32 + .../tests/debug/Object-preventExtensions-01.js | 17 + .../Object-promiseDependentPromises-realms.js | 17 + js/src/jit-test/tests/debug/Object-proto.js | 23 + js/src/jit-test/tests/debug/Object-proxy.js | 44 + .../tests/debug/Object-script-AsmJSNative.js | 15 + .../debug/Object-script-environment-nondebuggee.js | 24 + js/src/jit-test/tests/debug/Object-script-lazy.js | 57 + js/src/jit-test/tests/debug/Object-script.js | 25 + js/src/jit-test/tests/debug/Object-seal-01.js | 63 + .../jit-test/tests/debug/Object-setProperty-01.js | 185 + .../jit-test/tests/debug/Object-setProperty-02.js | 36 + .../jit-test/tests/debug/Object-setProperty-03.js | 67 + .../debug/Object-setProperty-non-primitive-key.js | 49 + .../tests/debug/Object-unsafeDereference-01.js | 10 + js/src/jit-test/tests/debug/Object-unwrap-01.js | 23 + js/src/jit-test/tests/debug/Object-unwrap-02.js | 21 + js/src/jit-test/tests/debug/Object-unwrap-03.js | 15 + .../tests/debug/Promise-race-dependent-promises.js | 46 + .../tests/debug/RematerializedFrame-retval.js | 39 + js/src/jit-test/tests/debug/Script-01.js | 70 + js/src/jit-test/tests/debug/Script-02.js | 6 + .../tests/debug/Script-clearBreakpoint-01.js | 19 + .../tests/debug/Script-clearBreakpoint-02.js | 26 + .../tests/debug/Script-clearBreakpoint-03.js | 25 + .../tests/debug/Script-clearBreakpoint-04.js | 28 + .../jit-test/tests/debug/Script-displayName-01.js | 17 + js/src/jit-test/tests/debug/Script-format-01.js | 18 + js/src/jit-test/tests/debug/Script-gc-01.js | 26 + js/src/jit-test/tests/debug/Script-gc-02.js | 14 + js/src/jit-test/tests/debug/Script-gc-03.js | 15 + .../tests/debug/Script-getAllColumnOffsets.js | 183 + .../tests/debug/Script-getBreakpoints-01.js | 40 + .../tests/debug/Script-getBreakpoints-02.js | 42 + .../tests/debug/Script-getChildScripts-01.js | 40 + .../tests/debug/Script-getChildScripts-02.js | 20 + .../tests/debug/Script-getChildScripts-03.js | 16 + .../tests/debug/Script-getChildScripts-04.js | 15 + .../tests/debug/Script-getChildScripts-05.js | 16 + .../tests/debug/Script-getEffectfulOffsets.js | 67 + .../tests/debug/Script-getLineOffsets-01.js | 13 + .../tests/debug/Script-getLineOffsets-02.js | 33 + .../tests/debug/Script-getLineOffsets-03.js | 36 + .../tests/debug/Script-getLineOffsets-04.js | 53 + .../tests/debug/Script-getLineOffsets-05.js | 65 + .../tests/debug/Script-getLineOffsets-06.js | 99 + .../tests/debug/Script-getLineOffsets-07.js | 19 + .../tests/debug/Script-getLineOffsets-08.js | 25 + .../tests/debug/Script-getOffsetLine-01.js | 25 + .../tests/debug/Script-getOffsetLine-02.js | 19 + .../tests/debug/Script-getOffsetLocation.js | 37 + .../tests/debug/Script-getOffsetMetadata.js | 36 + .../tests/debug/Script-getOffsetsCoverage-01.js | 501 + .../tests/debug/Script-getOffsetsCoverage-02.js | 41 + .../tests/debug/Script-getOffsetsCoverage-03.js | 21 + .../tests/debug/Script-getOffsetsCoverage-04.js | 22 + .../tests/debug/Script-getOffsetsCoverage-05.js | 24 + .../debug/Script-getOffsetsCoverage-bug1233178.js | 13 + .../debug/Script-getPossibleBreakpoints-02.js | 87 + .../tests/debug/Script-getPossibleBreakpoints.js | 384 + js/src/jit-test/tests/debug/Script-global-01.js | 18 + js/src/jit-test/tests/debug/Script-global-02.js | 36 + js/src/jit-test/tests/debug/Script-isFunction.js | 25 + .../jit-test/tests/debug/Script-isInCatchScope.js | 68 + js/src/jit-test/tests/debug/Script-isModule-01.js | 13 + js/src/jit-test/tests/debug/Script-isModule-02.js | 11 + js/src/jit-test/tests/debug/Script-isModule-03.js | 18 + js/src/jit-test/tests/debug/Script-isModule-04.js | 19 + js/src/jit-test/tests/debug/Script-lineCount.js | 23 + .../jit-test/tests/debug/Script-mainOffset-01.js | 20 + .../jit-test/tests/debug/Script-parameterNames.js | 36 + .../tests/debug/Script-selfhosted-builtins.js | 15 + js/src/jit-test/tests/debug/Script-source-01.js | 26 + js/src/jit-test/tests/debug/Script-source-02.js | 16 + js/src/jit-test/tests/debug/Script-source-03.js | 22 + .../jit-test/tests/debug/Script-sourceStart-01.js | 22 + .../jit-test/tests/debug/Script-sourceStart-02.js | 32 + .../jit-test/tests/debug/Script-sourceStart-03.js | 35 + .../jit-test/tests/debug/Script-sourceStart-04.js | 25 + js/src/jit-test/tests/debug/Script-startColumn.js | 101 + js/src/jit-test/tests/debug/Script-startLine.js | 63 + js/src/jit-test/tests/debug/Script-url.js | 10 + .../tests/debug/Source-displayURL-deprecated.js | 26 + .../tests/debug/Source-displayURL-disable.js | 14 + js/src/jit-test/tests/debug/Source-displayURL.js | 91 + js/src/jit-test/tests/debug/Source-element-01.js | 6 + .../tests/debug/Source-elementAttributeName.js | 11 + .../tests/debug/Source-introductionScript-01.js | 118 + .../tests/debug/Source-introductionScript-02.js | 44 + .../tests/debug/Source-introductionScript-03.js | 32 + .../tests/debug/Source-introductionType-data | 1 + .../tests/debug/Source-introductionType.js | 121 + js/src/jit-test/tests/debug/Source-invisible.js | 10 + js/src/jit-test/tests/debug/Source-reparse.js | 50 + .../tests/debug/Source-sourceMapURL-deprecated.js | 82 + .../tests/debug/Source-sourceMapURL-disable.js | 14 + js/src/jit-test/tests/debug/Source-sourceMapURL.js | 82 + .../tests/debug/Source-startLine-startColumn.js | 13 + js/src/jit-test/tests/debug/Source-surfaces.js | 33 + js/src/jit-test/tests/debug/Source-text-01.js | 26 + js/src/jit-test/tests/debug/Source-text-02.js | 30 + js/src/jit-test/tests/debug/Source-text-lazy.js | 38 + js/src/jit-test/tests/debug/Source-url-01.js | 10 + js/src/jit-test/tests/debug/Source-url-02.js | 11 + js/src/jit-test/tests/debug/Source-url.js | 10 + js/src/jit-test/tests/debug/async-stack.js | 35 + js/src/jit-test/tests/debug/breakpoint-01.js | 22 + js/src/jit-test/tests/debug/breakpoint-02.js | 15 + js/src/jit-test/tests/debug/breakpoint-03.js | 16 + js/src/jit-test/tests/debug/breakpoint-04.js | 30 + js/src/jit-test/tests/debug/breakpoint-05.js | 19 + js/src/jit-test/tests/debug/breakpoint-06.js | 20 + js/src/jit-test/tests/debug/breakpoint-07.js | 30 + js/src/jit-test/tests/debug/breakpoint-08.js | 31 + js/src/jit-test/tests/debug/breakpoint-09.js | 13 + js/src/jit-test/tests/debug/breakpoint-10.js | 19 + js/src/jit-test/tests/debug/breakpoint-11.js | 38 + js/src/jit-test/tests/debug/breakpoint-12.js | 78 + js/src/jit-test/tests/debug/breakpoint-13.js | 13 + js/src/jit-test/tests/debug/breakpoint-14.js | 14 + js/src/jit-test/tests/debug/breakpoint-await.js | 47 + .../tests/debug/breakpoint-dot-generator.js | 35 + js/src/jit-test/tests/debug/breakpoint-gc-01.js | 25 + js/src/jit-test/tests/debug/breakpoint-gc-02.js | 28 + js/src/jit-test/tests/debug/breakpoint-gc-04.js | 23 + js/src/jit-test/tests/debug/breakpoint-gc-05.js | 25 + js/src/jit-test/tests/debug/breakpoint-multi-01.js | 28 + js/src/jit-test/tests/debug/breakpoint-multi-02.js | 42 + js/src/jit-test/tests/debug/breakpoint-multi-03.js | 27 + js/src/jit-test/tests/debug/breakpoint-multi-04.js | 48 + js/src/jit-test/tests/debug/breakpoint-noncng.js | 20 + js/src/jit-test/tests/debug/breakpoint-oom-01.js | 41 + .../jit-test/tests/debug/breakpoint-resume-01.js | 25 + .../jit-test/tests/debug/breakpoint-resume-02.js | 34 + .../jit-test/tests/debug/breakpoint-resume-03.js | 30 + .../jit-test/tests/debug/breakpoint-resume-04.js | 37 + js/src/jit-test/tests/debug/bug-1102549.js | 9 + js/src/jit-test/tests/debug/bug-1103386.js | 10 + js/src/jit-test/tests/debug/bug-1103813.js | 7 + js/src/jit-test/tests/debug/bug-1103817.js | 5 + js/src/jit-test/tests/debug/bug-1110327.js | 5 + js/src/jit-test/tests/debug/bug-1136806.js | 7 + js/src/jit-test/tests/debug/bug-1192401.js | 6 + js/src/jit-test/tests/debug/bug-1238610.js | 22 + js/src/jit-test/tests/debug/bug-1240090.js | 23 + js/src/jit-test/tests/debug/bug-1248162.js | 11 + js/src/jit-test/tests/debug/bug-1260725.js | 9 + js/src/jit-test/tests/debug/bug-1260728.js | 12 + js/src/jit-test/tests/debug/bug-1385844-2.js | 39 + js/src/jit-test/tests/debug/bug-1385844.js | 24 + js/src/jit-test/tests/debug/bug-1444604-reduced.js | 27 + js/src/jit-test/tests/debug/bug-1444604.js | 16 + js/src/jit-test/tests/debug/bug-1477084.js | 30 + js/src/jit-test/tests/debug/bug-1564012.js | 8 + js/src/jit-test/tests/debug/bug-1565275.js | 19 + js/src/jit-test/tests/debug/bug-1572391.js | 15 + js/src/jit-test/tests/debug/bug-1576862-2.js | 23 + js/src/jit-test/tests/debug/bug-1584195.js | 31 + js/src/jit-test/tests/debug/bug-725733.js | 9 + js/src/jit-test/tests/debug/bug-800586.js | 7 + js/src/jit-test/tests/debug/bug-826669.js | 7 + js/src/jit-test/tests/debug/bug-858170.js | 7 + js/src/jit-test/tests/debug/bug-876654.js | 13 + js/src/jit-test/tests/debug/bug1001372.js | 21 + js/src/jit-test/tests/debug/bug1002797.js | 15 + js/src/jit-test/tests/debug/bug1004447.js | 23 + js/src/jit-test/tests/debug/bug1006205.js | 20 + js/src/jit-test/tests/debug/bug1006473.js | 19 + js/src/jit-test/tests/debug/bug1106164.js | 17 + js/src/jit-test/tests/debug/bug1106719.js | 12 + js/src/jit-test/tests/debug/bug1107525.js | 9 + js/src/jit-test/tests/debug/bug1107913.js | 7 + js/src/jit-test/tests/debug/bug1108159.js | 13 + js/src/jit-test/tests/debug/bug1108556.js | 10 + js/src/jit-test/tests/debug/bug1109328.js | 8 + js/src/jit-test/tests/debug/bug1109915.js | 17 + js/src/jit-test/tests/debug/bug1109964.js | 10 + js/src/jit-test/tests/debug/bug1111199.js | 17 + js/src/jit-test/tests/debug/bug1114587.js | 26 + js/src/jit-test/tests/debug/bug1116103.js | 11 + js/src/jit-test/tests/debug/bug1118878.js | 11 + js/src/jit-test/tests/debug/bug1121083.js | 15 + js/src/jit-test/tests/debug/bug1130768.js | 12 + js/src/jit-test/tests/debug/bug1133196.js | 16 + js/src/jit-test/tests/debug/bug1147939.js | 8 + js/src/jit-test/tests/debug/bug1148917.js | 14 + js/src/jit-test/tests/debug/bug1160182.js | 13 + js/src/jit-test/tests/debug/bug1161332.js | 16 + js/src/jit-test/tests/debug/bug1188334.js | 18 + js/src/jit-test/tests/debug/bug1191499.js | 17 + js/src/jit-test/tests/debug/bug1216261.js | 12 + js/src/jit-test/tests/debug/bug1219905.js | 11 + js/src/jit-test/tests/debug/bug1221378.js | 11 + js/src/jit-test/tests/debug/bug1232655.js | 5 + js/src/jit-test/tests/debug/bug1240546.js | 9 + js/src/jit-test/tests/debug/bug1240803.js | 20 + js/src/jit-test/tests/debug/bug1242111.js | 8 + js/src/jit-test/tests/debug/bug1242798.js | 14 + js/src/jit-test/tests/debug/bug1245862.js | 22 + js/src/jit-test/tests/debug/bug1246605.js | 13 + js/src/jit-test/tests/debug/bug1251919.js | 10 + js/src/jit-test/tests/debug/bug1252453.js | 21 + js/src/jit-test/tests/debug/bug1252464.js | 15 + js/src/jit-test/tests/debug/bug1253246.js | 5 + js/src/jit-test/tests/debug/bug1254123.js | 14 + js/src/jit-test/tests/debug/bug1254190.js | 12 + js/src/jit-test/tests/debug/bug1254578.js | 19 + js/src/jit-test/tests/debug/bug1257045.js | 10 + js/src/jit-test/tests/debug/bug1263899.js | 30 + js/src/jit-test/tests/debug/bug1264961.js | 23 + js/src/jit-test/tests/debug/bug1266434.js | 8 + js/src/jit-test/tests/debug/bug1272908.js | 19 + js/src/jit-test/tests/debug/bug1275001.js | 30 + js/src/jit-test/tests/debug/bug1282741.js | 28 + js/src/jit-test/tests/debug/bug1299121.js | 10 + js/src/jit-test/tests/debug/bug1300517.js | 12 + js/src/jit-test/tests/debug/bug1300528.js | 34 + js/src/jit-test/tests/debug/bug1302432.js | 11 + js/src/jit-test/tests/debug/bug1304553.js | 21 + js/src/jit-test/tests/debug/bug1308578.js | 10 + js/src/jit-test/tests/debug/bug1330339.js | 36 + js/src/jit-test/tests/debug/bug1330489-sps.js | 44 + js/src/jit-test/tests/debug/bug1330489.js | 36 + js/src/jit-test/tests/debug/bug1330491.js | 21 + js/src/jit-test/tests/debug/bug1331064.js | 19 + js/src/jit-test/tests/debug/bug1331592.js | 28 + js/src/jit-test/tests/debug/bug1332493.js | 14 + js/src/jit-test/tests/debug/bug1343579.js | 26 + js/src/jit-test/tests/debug/bug1351059.js | 22 + js/src/jit-test/tests/debug/bug1353356.js | 65 + js/src/jit-test/tests/debug/bug1363233.js | 14 + js/src/jit-test/tests/debug/bug1368736.js | 19 + js/src/jit-test/tests/debug/bug1370905.js | 15 + js/src/jit-test/tests/debug/bug1375447.js | 18 + js/src/jit-test/tests/debug/bug1385843.js | 21 + js/src/jit-test/tests/debug/bug1397049.js | 40 + js/src/jit-test/tests/debug/bug1397385.js | 16 + js/src/jit-test/tests/debug/bug1404710.js | 10 + js/src/jit-test/tests/debug/bug1406437.js | 5 + js/src/jit-test/tests/debug/bug1417961.js | 31 + js/src/jit-test/tests/debug/bug1432764.js | 16 + js/src/jit-test/tests/debug/bug1434391.js | 8 + js/src/jit-test/tests/debug/bug1437537.js | 18 + js/src/jit-test/tests/debug/bug1480390.js | 35 + js/src/jit-test/tests/debug/bug1488163.js | 17 + js/src/jit-test/tests/debug/bug1516958.js | 3 + js/src/jit-test/tests/debug/bug1557343-2.js | 30 + js/src/jit-test/tests/debug/bug1557343.js | 25 + js/src/jit-test/tests/debug/bug1563051.js | 11 + js/src/jit-test/tests/debug/bug1586762.js | 9 + js/src/jit-test/tests/debug/bug1591342.js | 13 + js/src/jit-test/tests/debug/bug1602392.js | 19 + .../tests/debug/bug1644699-terminated-generator.js | 79 + js/src/jit-test/tests/debug/bug1645358.js | 6 + js/src/jit-test/tests/debug/bug1647309.js | 18 + .../bug1675755-forceLexicalInitializationByName.js | 38 + js/src/jit-test/tests/debug/bug1684821.js | 26 + .../tests/debug/bug1688622-createSource.js | 8 + js/src/jit-test/tests/debug/bug1701859.js | 20 + js/src/jit-test/tests/debug/bug1703760.js | 18 + js/src/jit-test/tests/debug/bug1756592-2.js | 25 + js/src/jit-test/tests/debug/bug1756592.js | 20 + js/src/jit-test/tests/debug/bug1768660.js | 10 + js/src/jit-test/tests/debug/bug1812979.js | 14 + js/src/jit-test/tests/debug/bug1814020.js | 26 + js/src/jit-test/tests/debug/bug1817933.js | 16 + js/src/jit-test/tests/debug/bug1847360.js | 18 + js/src/jit-test/tests/debug/bug1851135.js | 13 + js/src/jit-test/tests/debug/bug1878466.js | 14 + js/src/jit-test/tests/debug/bug1878511.js | 9 + js/src/jit-test/tests/debug/bug911065.js | 34 + js/src/jit-test/tests/debug/bug967039.js | 6 + js/src/jit-test/tests/debug/bug973566.js | 7 + js/src/jit-test/tests/debug/bug980585.js | 10 + js/src/jit-test/tests/debug/bug999655.js | 11 + js/src/jit-test/tests/debug/class-01.js | 20 + js/src/jit-test/tests/debug/class-02.js | 20 + js/src/jit-test/tests/debug/class-03.js | 23 + js/src/jit-test/tests/debug/class-04.js | 22 + js/src/jit-test/tests/debug/class-05.js | 31 + js/src/jit-test/tests/debug/class-06.js | 22 + js/src/jit-test/tests/debug/class-07.js | 21 + js/src/jit-test/tests/debug/class-08.js | 13 + .../tests/debug/class-default-constructor-01.js | 33 + .../debug/class-derived-default-constructor-1.js | 36 + .../debug/class-derived-default-constructor-2.js | 39 + .../debug/class-derived-default-constructor-3.js | 30 + .../jit-test/tests/debug/clear-old-analyses-01.js | 38 + .../jit-test/tests/debug/clear-old-analyses-02.js | 39 + js/src/jit-test/tests/debug/dispatch-01.js | 22 + .../tests/debug/envChain_frame-eval-relazify.js | 41 + .../tests/debug/envChain_frame-eval-with-eval.js | 74 + js/src/jit-test/tests/debug/envChain_frame-eval.js | 67 + .../envChain_frame-evalWithBindings-with-eval.js | 159 + .../tests/debug/envChain_frame-evalWithBindings.js | 147 + .../tests/debug/envChain_object-executeInGlobal.js | 46 + ...ain_object-executeInGlobalWithBindings-empty.js | 51 + ...xecuteInGlobalWithBindings-existing-bindings.js | 103 + ...ain_object-executeInGlobalWithBindings-inner.js | 137 + ...ject-executeInGlobalWithBindings-no-use-eval.js | 63 + ...in_object-executeInGlobalWithBindings-no-use.js | 54 + ...executeInGlobalWithBindings-shadow-only-eval.js | 88 + ...ject-executeInGlobalWithBindings-shadow-only.js | 86 + .../envChain_object-executeInGlobalWithBindings.js | 135 + js/src/jit-test/tests/debug/error-cause-copied.js | 50 + ...-cause-not-copied-when-redefined-to-accessor.js | 35 + js/src/jit-test/tests/debug/exclusive.js | 24 + .../tests/debug/execution-observability-01.js | 22 + .../tests/debug/execution-observability-02.js | 15 + .../tests/debug/execution-observability-03.js | 17 + .../tests/debug/execution-observability-04.js | 21 + .../tests/debug/execution-observability-05.js | 23 + .../tests/debug/execution-observability-06.js | 24 + js/src/jit-test/tests/debug/gc-01.js | 20 + js/src/jit-test/tests/debug/gc-02.js | 28 + js/src/jit-test/tests/debug/gc-03.js | 24 + js/src/jit-test/tests/debug/gc-04.js | 25 + js/src/jit-test/tests/debug/gc-05.js | 41 + js/src/jit-test/tests/debug/gc-06.js | 6 + js/src/jit-test/tests/debug/gc-07.js | 9 + js/src/jit-test/tests/debug/gc-08.js | 22 + js/src/jit-test/tests/debug/gc-09.2.js | 16 + js/src/jit-test/tests/debug/gc-09.js | 15 + js/src/jit-test/tests/debug/gc-10.js | 28 + js/src/jit-test/tests/debug/gc-compartment-01.js | 6 + js/src/jit-test/tests/debug/gc-compartment-02.js | 13 + .../tests/debug/initarrayelem-hole-value.js | 12 + .../tests/debug/inspect-wrapped-promise.js | 87 + .../debug/isAsyncFunction-isGeneratorFunction.js | 57 + js/src/jit-test/tests/debug/isError.js | 19 + js/src/jit-test/tests/debug/job-queue-01.js | 122 + js/src/jit-test/tests/debug/job-queue-02.js | 82 + js/src/jit-test/tests/debug/job-queue-03.js | 173 + js/src/jit-test/tests/debug/job-queue-04.js | 24 + .../tests/debug/makeGlobalObjectReference-01.js | 26 + .../tests/debug/makeGlobalObjectReference-02.js | 13 + .../tests/debug/makeGlobalObjectReference-03.js | 8 + js/src/jit-test/tests/debug/noExecute-01.js | 29 + js/src/jit-test/tests/debug/noExecute-02.js | 39 + js/src/jit-test/tests/debug/noExecute-03.js | 28 + js/src/jit-test/tests/debug/noExecute-04.js | 39 + js/src/jit-test/tests/debug/noExecute-05.js | 43 + js/src/jit-test/tests/debug/noExecute-06.js | 81 + js/src/jit-test/tests/debug/noExecute-07.js | 36 + .../jit-test/tests/debug/onDebuggerStatement-01.js | 7 + .../jit-test/tests/debug/onDebuggerStatement-02.js | 22 + .../jit-test/tests/debug/onDebuggerStatement-03.js | 13 + .../jit-test/tests/debug/onDebuggerStatement-04.js | 10 + .../jit-test/tests/debug/onDebuggerStatement-05.js | 22 + ...uggerStatement-async-generator-resumption-01.js | 60 + .../onDebuggerStatement-async-resumption-01.js | 34 + .../onDebuggerStatement-async-resumption-02.js | 31 + .../onDebuggerStatement-generator-resumption-01.js | 32 + js/src/jit-test/tests/debug/onEnterFrame-01.js | 29 + js/src/jit-test/tests/debug/onEnterFrame-02.js | 22 + js/src/jit-test/tests/debug/onEnterFrame-03.js | 23 + js/src/jit-test/tests/debug/onEnterFrame-05.js | 15 + js/src/jit-test/tests/debug/onEnterFrame-06.js | 19 + js/src/jit-test/tests/debug/onEnterFrame-07.js | 15 + .../jit-test/tests/debug/onEnterFrame-async-01.js | 32 + .../debug/onEnterFrame-async-resumption-01.js | 35 + .../debug/onEnterFrame-async-resumption-02.js | 35 + .../debug/onEnterFrame-async-resumption-03.js | 29 + .../debug/onEnterFrame-async-resumption-04.js | 36 + .../debug/onEnterFrame-async-resumption-05.js | 41 + .../debug/onEnterFrame-async-resumption-06.js | 49 + .../debug/onEnterFrame-async-resumption-07.js | 62 + .../debug/onEnterFrame-async-resumption-08.js | 53 + .../debug/onEnterFrame-async-resumption-09.js | 63 + .../debug/onEnterFrame-async-resumption-10.js | 24 + .../debug/onEnterFrame-async-resumption-11.js | 28 + .../debug/onEnterFrame-async-resumption-12.js | 28 + .../debug/onEnterFrame-async-resumption-13.js | 21 + .../debug/onEnterFrame-async-tryskipawait-01.js | 41 + .../debug/onEnterFrame-async-tryskipawait-02.js | 41 + .../debug/onEnterFrame-async-tryskipawait-03.js | 42 + .../tests/debug/onEnterFrame-generator-01.js | 82 + .../tests/debug/onEnterFrame-generator-02.js | 27 + .../tests/debug/onEnterFrame-generator-03.js | 25 + .../tests/debug/onEnterFrame-generator-04.js | 44 + .../tests/debug/onEnterFrame-generator-05.js | 34 + .../tests/debug/onEnterFrame-generator-06.js | 24 + .../tests/debug/onEnterFrame-generator-07.js | 23 + .../tests/debug/onEnterFrame-generator-08.js | 17 + .../tests/debug/onEnterFrame-generator-09.js | 17 + .../tests/debug/onEnterFrame-generator-10.js | 17 + .../debug/onEnterFrame-generator-resumption-01.js | 36 + .../debug/onEnterFrame-generator-resumption-02.js | 39 + .../debug/onEnterFrame-generator-resumption-03.js | 35 + .../debug/onEnterFrame-generator-resumption-04.js | 34 + .../debug/onEnterFrame-generator-resumption-05.js | 22 + .../jit-test/tests/debug/onExceptionUnwind-01.js | 24 + .../jit-test/tests/debug/onExceptionUnwind-02.js | 47 + .../jit-test/tests/debug/onExceptionUnwind-03.js | 57 + .../jit-test/tests/debug/onExceptionUnwind-04.js | 17 + .../jit-test/tests/debug/onExceptionUnwind-05.js | 12 + .../jit-test/tests/debug/onExceptionUnwind-06.js | 13 + .../jit-test/tests/debug/onExceptionUnwind-07.js | 15 + .../jit-test/tests/debug/onExceptionUnwind-08.js | 18 + .../jit-test/tests/debug/onExceptionUnwind-09.js | 15 + .../jit-test/tests/debug/onExceptionUnwind-10.js | 16 + .../jit-test/tests/debug/onExceptionUnwind-12.js | 14 + .../jit-test/tests/debug/onExceptionUnwind-13.js | 16 + .../jit-test/tests/debug/onExceptionUnwind-14.js | 23 + .../jit-test/tests/debug/onExceptionUnwind-15.js | 25 + .../jit-test/tests/debug/onExceptionUnwind-16.js | 54 + .../jit-test/tests/debug/onExceptionUnwind-17.js | 58 + .../jit-test/tests/debug/onExceptionUnwind-18.js | 58 + .../tests/debug/onExceptionUnwind-generators-01.js | 39 + .../tests/debug/onExceptionUnwind-resumption-01.js | 9 + .../tests/debug/onExceptionUnwind-resumption-02.js | 10 + .../tests/debug/onExceptionUnwind-resumption-03.js | 11 + .../tests/debug/onExceptionUnwind-resumption-04.js | 17 + .../tests/debug/onExceptionUnwind-resumption-05.js | 32 + .../debug/onExceptionUnwind-resumption-async-02.js | 31 + .../debug/onExceptionUnwind-resumption-async.js | 35 + .../onExceptionUnwind-resumption-generator.js | 52 + js/src/jit-test/tests/debug/onNewScript-01.js | 37 + js/src/jit-test/tests/debug/onNewScript-02.js | 59 + js/src/jit-test/tests/debug/onNewScript-03.js | 7 + .../onNewScript-ExecuteInFrameScriptEnvironment.js | 32 + .../tests/debug/onNewScript-off-main-thread-01.js | 18 + .../tests/debug/onNewScript-off-main-thread-02.js | 13 + js/src/jit-test/tests/debug/onNewScript-wasm-01.js | 33 + js/src/jit-test/tests/debug/onNewScript-wasm-02.js | 41 + js/src/jit-test/tests/debug/optimized-out-01.js | 47 + js/src/jit-test/tests/debug/optimized-out-02.js | 38 + js/src/jit-test/tests/debug/optimized-out-03.js | 48 + .../tests/debug/optimized-out-arrow-this.js | 38 + .../tests/debug/private-methods-eval-in-frame.js | 218 + js/src/jit-test/tests/debug/prologueFailure-01.js | 32 + js/src/jit-test/tests/debug/prologueFailure-02.js | 49 + js/src/jit-test/tests/debug/prologueFailure-03.js | 26 + .../tests/debug/relazify-debugee-script-01.js | 14 + js/src/jit-test/tests/debug/resumption-01.js | 12 + js/src/jit-test/tests/debug/resumption-02.js | 9 + js/src/jit-test/tests/debug/resumption-03.js | 35 + js/src/jit-test/tests/debug/resumption-05.js | 35 + js/src/jit-test/tests/debug/resumption-07.js | 34 + js/src/jit-test/tests/debug/resumption-08.js | 93 + js/src/jit-test/tests/debug/resumption-09.js | 41 + js/src/jit-test/tests/debug/resumption-error-01.js | 7 + js/src/jit-test/tests/debug/resumption-error-02.js | 16 + .../tests/debug/save-queue-resets-draining.js | 18 + js/src/jit-test/tests/debug/setter-argc.js | 52 + js/src/jit-test/tests/debug/surfaces-01.js | 17 + js/src/jit-test/tests/debug/surfaces-02.js | 31 + js/src/jit-test/tests/debug/surfaces-03.js | 19 + js/src/jit-test/tests/debug/surfaces-offsets.js | 37 + .../jit-test/tests/debug/testEarlyReturnOnCall.js | 24 + .../debug/throw-exception-stack-location-async.js | 25 + .../tests/debug/uncaughtExceptionHook-01.js | 19 + .../tests/debug/uncaughtExceptionHook-02.js | 12 + .../tests/debug/uncaughtExceptionHook-03.js | 34 + .../debug/uncaughtExceptionHook-resumption-01.js | 25 + .../debug/uncaughtExceptionHook-resumption-02.js | 25 + .../debug/uncaughtExceptionHook-resumption-03.js | 12 + js/src/jit-test/tests/debug/wasm-01.js | 32 + js/src/jit-test/tests/debug/wasm-02.js | 21 + js/src/jit-test/tests/debug/wasm-03.js | 34 + js/src/jit-test/tests/debug/wasm-04.js | 27 + .../tests/debug/wasm-06-onEnterFrame-null.js | 17 + js/src/jit-test/tests/debug/wasm-06-onPop-null.js | 19 + js/src/jit-test/tests/debug/wasm-06.js | 332 + js/src/jit-test/tests/debug/wasm-07.js | 39 + js/src/jit-test/tests/debug/wasm-08.js | 121 + js/src/jit-test/tests/debug/wasm-09.js | 32 + js/src/jit-test/tests/debug/wasm-10.js | 77 + js/src/jit-test/tests/debug/wasm-11.js | 33 + js/src/jit-test/tests/debug/wasm-12.js | 25 + js/src/jit-test/tests/debug/wasm-13.js | 116 + js/src/jit-test/tests/debug/wasm-14.js | 91 + js/src/jit-test/tests/debug/wasm-15.js | 91 + js/src/jit-test/tests/debug/wasm-binary-sources.js | 32 + js/src/jit-test/tests/debug/wasm-breakpoint.js | 191 + js/src/jit-test/tests/debug/wasm-get-return.js | 62 + .../tests/debug/wasm-getAllColumnOffsets.js | 41 + js/src/jit-test/tests/debug/wasm-jseval.js | 53 + .../tests/debug/wasm-onExceptionUnwind-gc.js | 48 + js/src/jit-test/tests/debug/wasm-responseurls.js | 40 + .../jit-test/tests/debug/wasm-sourceMappingURL.js | 72 + js/src/jit-test/tests/debug/wasm-step.js | 64 + .../tests/decorators/accessor-decorators.js | 189 + js/src/jit-test/tests/decorators/accessors.js | 86 + js/src/jit-test/tests/decorators/addInitializer.js | 39 + .../jit-test/tests/decorators/class-decorators.js | 101 + js/src/jit-test/tests/decorators/decorator-this.js | 36 + .../jit-test/tests/decorators/field-decorators.js | 104 + .../tests/decorators/getter-setter-decorators.js | 68 + .../jit-test/tests/decorators/method-decorators.js | 122 + js/src/jit-test/tests/decorators/syntax.js | 172 + .../tests/environments/bug1671563-strict.js | 25 + js/src/jit-test/tests/environments/bug1671563.js | 24 + js/src/jit-test/tests/environments/bug1671762.js | 20 + js/src/jit-test/tests/environments/bug1710089.js | 38 + .../tests/environments/delete-global-var.js | 13 + .../tests/environments/evaluate_envChainObject.js | 32 + .../environments/lexical-shadows-global-var.js | 9 + .../environments/replace-global-var-with-getter.js | 13 + .../tests/environments/strict-eval-bindings.js | 221 + js/src/jit-test/tests/errors/bug1745907.js | 12 + js/src/jit-test/tests/errors/bug1802100.js | 17 + js/src/jit-test/tests/errors/bug1810711.js | 11 + js/src/jit-test/tests/errors/bug1837366.js | 8 + js/src/jit-test/tests/errors/error-report.js | 51 + .../tests/errors/error-sourceURL-disable.js | 8 + .../tests/errors/overrecursed-double-fault-1.js | 8 + js/src/jit-test/tests/fields/access.js | 9 + js/src/jit-test/tests/fields/basic.js | 7 + js/src/jit-test/tests/fields/bug1540787.js | 4 + js/src/jit-test/tests/fields/bug1540789.js | 3 + js/src/jit-test/tests/fields/bug1540798.js | 14 + js/src/jit-test/tests/fields/bug1547129.js | 19 + js/src/jit-test/tests/fields/bug1547130.js | 1 + js/src/jit-test/tests/fields/bug1547133.js | 3 + js/src/jit-test/tests/fields/bug1547136.js | 1 + js/src/jit-test/tests/fields/bug1547467.js | 17 + js/src/jit-test/tests/fields/bug1547915.js | 4 + js/src/jit-test/tests/fields/bug1551454.js | 12 + js/src/jit-test/tests/fields/bug1551454_2.js | 6 + js/src/jit-test/tests/fields/bug1552022.js | 22 + js/src/jit-test/tests/fields/bug1552229.js | 15 + js/src/jit-test/tests/fields/bug1552875.js | 13 + js/src/jit-test/tests/fields/bug1555979.js | 8 + js/src/jit-test/tests/fields/bug1562146.js | 10 + js/src/jit-test/tests/fields/bug1571289.js | 6 + js/src/jit-test/tests/fields/bug1664550.js | 13 + js/src/jit-test/tests/fields/bug1683784.js | 10 + js/src/jit-test/tests/fields/bug1702420.js | 11 + js/src/jit-test/tests/fields/bug1702423.js | 6 + js/src/jit-test/tests/fields/bug1702424.js | 249 + js/src/jit-test/tests/fields/bug1703782.js | 11 + js/src/jit-test/tests/fields/bug1706923.js | 28 + js/src/jit-test/tests/fields/ergonomic-1.js | 69 + js/src/jit-test/tests/fields/error.js | 116 + .../tests/fields/field-initializer-position.js | 52 + js/src/jit-test/tests/fields/field_types.js | 43 + js/src/jit-test/tests/fields/initprop.js | 25 + .../tests/fields/ion-private-idempotent.js | 31 + js/src/jit-test/tests/fields/literal.js | 45 + js/src/jit-test/tests/fields/mixed_methods.js | 9 + js/src/jit-test/tests/fields/multi-line-name.js | 15 + .../tests/fields/private-error-location.js | 10 + .../jit-test/tests/fields/private-eval-in-frame.js | 14 + .../jit-test/tests/fields/private-field-basics.js | 257 + .../tests/fields/private-field-destructuring.js | 41 + .../jit-test/tests/fields/private-field-details.js | 39 + .../tests/fields/private-field-error-messages.js | 39 + .../fields/private-field-symbol-debugger-access.js | 37 + .../jit-test/tests/fields/private-method-static.js | 28 + js/src/jit-test/tests/fields/private-proxy-oom.js | 48 + js/src/jit-test/tests/fields/private-reflect-01.js | 56 + .../jit-test/tests/fields/private-right-side-1.js | 18 + .../jit-test/tests/fields/private-right-side-2.js | 13 + .../tests/fields/private-throwing-initializer.js | 62 + js/src/jit-test/tests/fields/quirks.js | 17 + js/src/jit-test/tests/fields/super.js | 76 + js/src/jit-test/tests/fields/superproperty.js | 31 + js/src/jit-test/tests/fields/transplant.js | 48 + js/src/jit-test/tests/for-of/arguments-1.js | 21 + js/src/jit-test/tests/for-of/arguments-2.js | 14 + js/src/jit-test/tests/for-of/arguments-3.js | 20 + js/src/jit-test/tests/for-of/arguments-4.js | 19 + js/src/jit-test/tests/for-of/arguments-5.js | 20 + js/src/jit-test/tests/for-of/arguments-6.js | 16 + js/src/jit-test/tests/for-of/arguments-7.js | 17 + js/src/jit-test/tests/for-of/array-holes-1.js | 10 + js/src/jit-test/tests/for-of/array-holes-2.js | 8 + js/src/jit-test/tests/for-of/array-holes-3.js | 8 + js/src/jit-test/tests/for-of/array-holes-4.js | 13 + js/src/jit-test/tests/for-of/array-holes-5.js | 6 + js/src/jit-test/tests/for-of/array-holes-6.js | 8 + js/src/jit-test/tests/for-of/array-holes-slow.js | 13 + .../tests/for-of/array-iterator-changing.js | 29 + .../jit-test/tests/for-of/array-iterator-empty.js | 11 + .../tests/for-of/array-iterator-generic.js | 33 + .../tests/for-of/array-iterator-growing-1.js | 26 + .../tests/for-of/array-iterator-keys-entries.js | 16 + .../jit-test/tests/for-of/array-iterator-null.js | 11 + .../jit-test/tests/for-of/array-iterator-proxy.js | 47 + .../tests/for-of/array-iterator-shrinking.js | 20 + .../tests/for-of/array-iterator-surfaces-1.js | 17 + .../tests/for-of/array-iterator-surfaces-2.js | 31 + js/src/jit-test/tests/for-of/array-jit.js | 6 + js/src/jit-test/tests/for-of/array-prototype.js | 11 + js/src/jit-test/tests/for-of/arrays-1.js | 7 + js/src/jit-test/tests/for-of/arrays-2.js | 10 + js/src/jit-test/tests/for-of/arrays-3.js | 9 + js/src/jit-test/tests/for-of/arrays-4.js | 8 + js/src/jit-test/tests/for-of/arrays-5.js | 4 + js/src/jit-test/tests/for-of/arrays-growing-1.js | 10 + js/src/jit-test/tests/for-of/arrays-growing-2.js | 10 + js/src/jit-test/tests/for-of/arrays-shrinking-1.js | 13 + js/src/jit-test/tests/for-of/arrays-shrinking-2.js | 9 + js/src/jit-test/tests/for-of/arrays-slow-1.js | 8 + js/src/jit-test/tests/for-of/arrays-slow-2.js | 10 + js/src/jit-test/tests/for-of/arrays-slow-3.js | 9 + js/src/jit-test/tests/for-of/arrays-slow-4.js | 6 + js/src/jit-test/tests/for-of/arrays-slow-5.js | 10 + js/src/jit-test/tests/for-of/break-1.js | 9 + js/src/jit-test/tests/for-of/break-2.js | 10 + js/src/jit-test/tests/for-of/break-3.js | 12 + js/src/jit-test/tests/for-of/bug-1331444.js | 7 + js/src/jit-test/tests/for-of/bug-1341339.js | 9 + js/src/jit-test/tests/for-of/bug-728079-js17-1.js | 21 + js/src/jit-test/tests/for-of/bug-728079-js17-4.js | 3 + js/src/jit-test/tests/for-of/bug1519700.js | 23 + js/src/jit-test/tests/for-of/bug1773496.js | 47 + js/src/jit-test/tests/for-of/completion.js | 6 + js/src/jit-test/tests/for-of/decompiler.js | 28 + js/src/jit-test/tests/for-of/generators-1.js | 11 + js/src/jit-test/tests/for-of/generators-2.js | 15 + js/src/jit-test/tests/for-of/generators-3.js | 18 + js/src/jit-test/tests/for-of/generators-5.js | 20 + .../tests/for-of/iterclose-dynamic-slot-throw.js | 55 + .../tests/for-of/iterclose-dynamic-slot.js | 47 + .../tests/for-of/iterclose-extra-args-throw.js | 49 + .../jit-test/tests/for-of/iterclose-extra-args.js | 41 + .../tests/for-of/iterclose-generator-throw.js | 46 + .../jit-test/tests/for-of/iterclose-generator.js | 38 + .../tests/for-of/iterclose-invalid-return-throw.js | 48 + .../tests/for-of/iterclose-invalid-return.js | 46 + .../for-of/iterclose-invalidate-with-catch.js | 54 + .../for-of/iterclose-invalidate-with-finally.js | 55 + .../jit-test/tests/for-of/iterclose-invalidate.js | 53 + js/src/jit-test/tests/for-of/manual-advance.js | 15 + js/src/jit-test/tests/for-of/next-3.js | 10 + js/src/jit-test/tests/for-of/next-arity.js | 22 + js/src/jit-test/tests/for-of/next-shenanigans.js | 27 + js/src/jit-test/tests/for-of/non-iterable.js | 25 + js/src/jit-test/tests/for-of/proxy-1.js | 13 + js/src/jit-test/tests/for-of/proxy-2.js | 18 + js/src/jit-test/tests/for-of/proxy-3.js | 13 + js/src/jit-test/tests/for-of/return.js | 14 + js/src/jit-test/tests/for-of/semantics-01.js | 13 + js/src/jit-test/tests/for-of/semantics-02.js | 12 + js/src/jit-test/tests/for-of/semantics-03.js | 13 + js/src/jit-test/tests/for-of/semantics-04.js | 17 + js/src/jit-test/tests/for-of/semantics-05.js | 8 + js/src/jit-test/tests/for-of/semantics-06.js | 8 + js/src/jit-test/tests/for-of/semantics-07.js | 15 + js/src/jit-test/tests/for-of/semantics-08.js | 12 + js/src/jit-test/tests/for-of/semantics-09.js | 25 + js/src/jit-test/tests/for-of/semantics-10.js | 31 + js/src/jit-test/tests/for-of/semantics-11.js | 43 + .../tests/for-of/string-iterator-generic.js | 25 + .../tests/for-of/string-iterator-surfaces.js | 83 + js/src/jit-test/tests/for-of/strings.js | 47 + js/src/jit-test/tests/for-of/syntax-1.js | 20 + js/src/jit-test/tests/for-of/syntax-2.js | 7 + js/src/jit-test/tests/for-of/syntax-3.js | 19 + js/src/jit-test/tests/for-of/syntax-4.js | 19 + js/src/jit-test/tests/for-of/throw-during-break.js | 42 + .../tests/for-of/throw-during-nested-break.js | 29 + js/src/jit-test/tests/for-of/throw.js | 20 + js/src/jit-test/tests/for-of/typedarrays-1.js | 7 + js/src/jit-test/tests/for-of/typedarrays-2.js | 11 + js/src/jit-test/tests/for-of/typedarrays-3.js | 4 + js/src/jit-test/tests/for-of/typedarrays-4.js | 7 + js/src/jit-test/tests/for-of/typedarrays-5.js | 7 + js/src/jit-test/tests/for-of/typedarrays-6.js | 9 + js/src/jit-test/tests/for-of/value-done-access.js | 23 + js/src/jit-test/tests/for-of/wrapper-1.js | 7 + js/src/jit-test/tests/function/bug-1751660.js | 26 + .../function/function-displayName-computed.js | 74 + .../function-toString-discard-source-name.js | 222 + .../function/function-toString-discard-source.js | 213 + .../tests/function/function-toString-lazy-name.js | 7 + js/src/jit-test/tests/fuses/cross-realm.js | 57 + js/src/jit-test/tests/fuses/htmldda-1.js | 29 + js/src/jit-test/tests/fuses/popped-getiter.js | 11 + js/src/jit-test/tests/gc/bug-1004457.js | 3 + js/src/jit-test/tests/gc/bug-1016016.js | 16 + js/src/jit-test/tests/gc/bug-1017141.js | 25 + js/src/jit-test/tests/gc/bug-1028863.js | 3 + js/src/jit-test/tests/gc/bug-1032206.js | 3 + js/src/jit-test/tests/gc/bug-1035371.js | 4 + js/src/jit-test/tests/gc/bug-1039516.js | 6 + js/src/jit-test/tests/gc/bug-1053676.js | 11 + js/src/jit-test/tests/gc/bug-1055219.js | 5 + js/src/jit-test/tests/gc/bug-1070638.js | 20 + js/src/jit-test/tests/gc/bug-1075546.js | 30 + js/src/jit-test/tests/gc/bug-1104162.js | 7 + js/src/jit-test/tests/gc/bug-1108007.js | 23 + js/src/jit-test/tests/gc/bug-1108836.js | 9 + js/src/jit-test/tests/gc/bug-1109913.js | 7 + js/src/jit-test/tests/gc/bug-1109922.js | 6 + js/src/jit-test/tests/gc/bug-1123648.js | 4 + js/src/jit-test/tests/gc/bug-1124563.js | 4 + js/src/jit-test/tests/gc/bug-1124653.js | 5 + js/src/jit-test/tests/gc/bug-1136597.js | 25 + js/src/jit-test/tests/gc/bug-1137341.js | 11 + js/src/jit-test/tests/gc/bug-1143706.js | 2 + js/src/jit-test/tests/gc/bug-1144738.js | 32 + js/src/jit-test/tests/gc/bug-1146696.js | 21 + js/src/jit-test/tests/gc/bug-1148383.js | 17 + js/src/jit-test/tests/gc/bug-1155455.js | 16 + js/src/jit-test/tests/gc/bug-1157577.js | 4 + js/src/jit-test/tests/gc/bug-1161303.js | 7 + js/src/jit-test/tests/gc/bug-1161968.js | 12 + js/src/jit-test/tests/gc/bug-1165966.js | 6 + js/src/jit-test/tests/gc/bug-1171909.js | 3 + js/src/jit-test/tests/gc/bug-1175755.js | 6 + js/src/jit-test/tests/gc/bug-1177778.js | 15 + js/src/jit-test/tests/gc/bug-1191576.js | 14 + js/src/jit-test/tests/gc/bug-1206677.js | 12 + js/src/jit-test/tests/gc/bug-1208994.js | 3 + js/src/jit-test/tests/gc/bug-1209001.js | 3 + js/src/jit-test/tests/gc/bug-1210607.js | 6 + js/src/jit-test/tests/gc/bug-1214006.js | 7 + js/src/jit-test/tests/gc/bug-1214781.js | 7 + js/src/jit-test/tests/gc/bug-1214846.js | 7 + js/src/jit-test/tests/gc/bug-1215363-1.js | 3 + js/src/jit-test/tests/gc/bug-1215363-2.js | 6 + js/src/jit-test/tests/gc/bug-1215363-3.js | 4 + js/src/jit-test/tests/gc/bug-1215678.js | 10 + js/src/jit-test/tests/gc/bug-1216607.js | 18 + js/src/jit-test/tests/gc/bug-1218900-2.js | 3 + js/src/jit-test/tests/gc/bug-1218900.js | 8 + js/src/jit-test/tests/gc/bug-1221359.js | 6 + js/src/jit-test/tests/gc/bug-1221747.js | 6 + js/src/jit-test/tests/gc/bug-1223021.js | 11 + js/src/jit-test/tests/gc/bug-1224710.js | 13 + js/src/jit-test/tests/gc/bug-1226896.js | 6 + js/src/jit-test/tests/gc/bug-1231386.js | 18 + js/src/jit-test/tests/gc/bug-1232386.js | 10 + js/src/jit-test/tests/gc/bug-1234410.js | 9 + js/src/jit-test/tests/gc/bug-1236473.js | 7 + js/src/jit-test/tests/gc/bug-1237153.js | 2 + js/src/jit-test/tests/gc/bug-1238548.js | 2 + js/src/jit-test/tests/gc/bug-1238555.js | 11 + js/src/jit-test/tests/gc/bug-1238575-2.js | 3 + js/src/jit-test/tests/gc/bug-1238575.js | 5 + js/src/jit-test/tests/gc/bug-1238582.js | 3 + js/src/jit-test/tests/gc/bug-1240503.js | 7 + js/src/jit-test/tests/gc/bug-1240527.js | 8 + js/src/jit-test/tests/gc/bug-1241731.js | 3 + js/src/jit-test/tests/gc/bug-1242812.js | 4 + js/src/jit-test/tests/gc/bug-1245520.js | 4 + js/src/jit-test/tests/gc/bug-1246593.js | 4 + js/src/jit-test/tests/gc/bug-1252329.js | 32 + js/src/jit-test/tests/gc/bug-1253124.js | 10 + js/src/jit-test/tests/gc/bug-1254108.js | 5 + js/src/jit-test/tests/gc/bug-1258407.js | 10 + js/src/jit-test/tests/gc/bug-1259306.js | 19 + js/src/jit-test/tests/gc/bug-1259490.js | 13 + js/src/jit-test/tests/gc/bug-1261329.js | 9 + js/src/jit-test/tests/gc/bug-1263862.js | 8 + js/src/jit-test/tests/gc/bug-1263871.js | 8 + js/src/jit-test/tests/gc/bug-1263884.js | 9 + js/src/jit-test/tests/gc/bug-1271110.js | 38 + js/src/jit-test/tests/gc/bug-1276631.js | 17 + js/src/jit-test/tests/gc/bug-1278832.js | 12 + js/src/jit-test/tests/gc/bug-1280588.js | 5 + js/src/jit-test/tests/gc/bug-1280889.js | 8 + js/src/jit-test/tests/gc/bug-1282986.js | 16 + js/src/jit-test/tests/gc/bug-1286244.js | 8 + js/src/jit-test/tests/gc/bug-1287399.js | 11 + js/src/jit-test/tests/gc/bug-1287869.js | 7 + js/src/jit-test/tests/gc/bug-1292564.js | 9 + js/src/jit-test/tests/gc/bug-1293127.js | 11 + js/src/jit-test/tests/gc/bug-1294241.js | 13 + js/src/jit-test/tests/gc/bug-1298356.js | 6 + js/src/jit-test/tests/gc/bug-1301377.js | 12 + js/src/jit-test/tests/gc/bug-1301496.js | 7 + js/src/jit-test/tests/gc/bug-1303015.js | 12 + js/src/jit-test/tests/gc/bug-1305220.js | 22 + js/src/jit-test/tests/gc/bug-1308048.js | 10 + js/src/jit-test/tests/gc/bug-1310589.js | 298 + js/src/jit-test/tests/gc/bug-1311060.js | 2 + js/src/jit-test/tests/gc/bug-1313347.js | 5 + js/src/jit-test/tests/gc/bug-1315946.js | 13 + js/src/jit-test/tests/gc/bug-1321597.js | 6 + js/src/jit-test/tests/gc/bug-1322420.js | 8 + js/src/jit-test/tests/gc/bug-1322648.js | 9 + js/src/jit-test/tests/gc/bug-1323868.js | 6 + js/src/jit-test/tests/gc/bug-1324512.js | 12 + js/src/jit-test/tests/gc/bug-1325551.js | 10 + js/src/jit-test/tests/gc/bug-1328251.js | 11 + js/src/jit-test/tests/gc/bug-1332773.js | 9 + js/src/jit-test/tests/gc/bug-1337414.js | 46 + js/src/jit-test/tests/gc/bug-1338383.js | 17 + js/src/jit-test/tests/gc/bug-1340010.js | 22 + js/src/jit-test/tests/gc/bug-1342261.js | 7 + js/src/jit-test/tests/gc/bug-1354480.js | 10 + js/src/jit-test/tests/gc/bug-1357022.js | 6 + js/src/jit-test/tests/gc/bug-1359252.js | 7 + js/src/jit-test/tests/gc/bug-1370069.js | 6 + js/src/jit-test/tests/gc/bug-1371908.js | 7 + js/src/jit-test/tests/gc/bug-1374797.js | 27 + js/src/jit-test/tests/gc/bug-1382431.js | 5 + js/src/jit-test/tests/gc/bug-1384047.js | 4 + js/src/jit-test/tests/gc/bug-1388701.js | 18 + js/src/jit-test/tests/gc/bug-1390087.js | 10 + js/src/jit-test/tests/gc/bug-1399889.js | 4 + js/src/jit-test/tests/gc/bug-1401141.js | 10 + js/src/jit-test/tests/gc/bug-1411302.js | 17 + js/src/jit-test/tests/gc/bug-1413914.js | 4 + js/src/jit-test/tests/gc/bug-1430752.js | 2 + js/src/jit-test/tests/gc/bug-1435295.js | 9 + js/src/jit-test/tests/gc/bug-1435321.js | 30 + js/src/jit-test/tests/gc/bug-1439284.js | 16 + js/src/jit-test/tests/gc/bug-1449887.js | 3 + js/src/jit-test/tests/gc/bug-1456508.js | 4 + js/src/jit-test/tests/gc/bug-1456536.js | 3 + js/src/jit-test/tests/gc/bug-1459568.js | 7 + js/src/jit-test/tests/gc/bug-1459860.js | 8 + js/src/jit-test/tests/gc/bug-1461319.js | 7 + js/src/jit-test/tests/gc/bug-1461448.js | 40 + js/src/jit-test/tests/gc/bug-1462337.js | 9 + js/src/jit-test/tests/gc/bug-1464872.js | 16 + js/src/jit-test/tests/gc/bug-1468792.js | 18 + js/src/jit-test/tests/gc/bug-1472734.js | 13 + js/src/jit-test/tests/gc/bug-1478943.js | 3 + js/src/jit-test/tests/gc/bug-1490042.js | 31 + js/src/jit-test/tests/gc/bug-1491326.js | 9 + js/src/jit-test/tests/gc/bug-1498177.js | 17 + js/src/jit-test/tests/gc/bug-1505622.js | 54 + js/src/jit-test/tests/gc/bug-1513991.js | 9 + js/src/jit-test/tests/gc/bug-1514927.js | 6 + js/src/jit-test/tests/gc/bug-1515993.js | 15 + js/src/jit-test/tests/gc/bug-1517158.js | 21 + js/src/jit-test/tests/gc/bug-1520778.js | 18 + js/src/jit-test/tests/gc/bug-1530643.js | 6 + js/src/jit-test/tests/gc/bug-1531018.js | 3 + js/src/jit-test/tests/gc/bug-1531626.js | 61 + js/src/jit-test/tests/gc/bug-1532376.js | 10 + js/src/jit-test/tests/gc/bug-1540670.js | 17 + js/src/jit-test/tests/gc/bug-1542279.js | 13 + js/src/jit-test/tests/gc/bug-1542982.js | 20 + js/src/jit-test/tests/gc/bug-1543014.js | 11 + js/src/jit-test/tests/gc/bug-1543589.js | 16 + js/src/jit-test/tests/gc/bug-1556155.js | 7 + js/src/jit-test/tests/gc/bug-1557928.js | 19 + js/src/jit-test/tests/gc/bug-1565272.js | 20 + js/src/jit-test/tests/gc/bug-1568119.js | 21 + js/src/jit-test/tests/gc/bug-1568740.js | 20 + js/src/jit-test/tests/gc/bug-1569840.js | 9 + js/src/jit-test/tests/gc/bug-1571439.js | 24 + js/src/jit-test/tests/gc/bug-1573458.js | 4 + js/src/jit-test/tests/gc/bug-1574877.js | 17 + js/src/jit-test/tests/gc/bug-1578462.js | 59 + js/src/jit-test/tests/gc/bug-1579025.js | 58 + js/src/jit-test/tests/gc/bug-1585159.js | 11 + js/src/jit-test/tests/gc/bug-1590176.js | 13 + js/src/jit-test/tests/gc/bug-1590904.js | 6 + js/src/jit-test/tests/gc/bug-1592487.js | 28 + js/src/jit-test/tests/gc/bug-1593975.js | 21 + js/src/jit-test/tests/gc/bug-1597970.js | 5 + js/src/jit-test/tests/gc/bug-1600238.js | 21 + js/src/jit-test/tests/gc/bug-1602741.js | 24 + js/src/jit-test/tests/gc/bug-1603330.js | 16 + js/src/jit-test/tests/gc/bug-1603917.js | 2 + js/src/jit-test/tests/gc/bug-1605348.js | 5 + js/src/jit-test/tests/gc/bug-1605633.js | 12 + js/src/jit-test/tests/gc/bug-1607495.js | 8 + js/src/jit-test/tests/gc/bug-1607665.js | 9 + js/src/jit-test/tests/gc/bug-1607687.js | 4 + js/src/jit-test/tests/gc/bug-1608355.js | 7 + js/src/jit-test/tests/gc/bug-1610621.js | 1 + js/src/jit-test/tests/gc/bug-1620195.js | 15 + js/src/jit-test/tests/gc/bug-1620196.js | 7 + js/src/jit-test/tests/gc/bug-1620209.js | 5 + js/src/jit-test/tests/gc/bug-1620213.js | 5 + js/src/jit-test/tests/gc/bug-1620221.js | 23 + js/src/jit-test/tests/gc/bug-1628440.js | 9 + js/src/jit-test/tests/gc/bug-1643913.js | 36 + js/src/jit-test/tests/gc/bug-1644985-2.js | 4 + js/src/jit-test/tests/gc/bug-1644985.js | 4 + .../tests/gc/bug-1647747-debugger-weakmark.js | 17 + js/src/jit-test/tests/gc/bug-1648901.js | 7 + js/src/jit-test/tests/gc/bug-1651345.js | 7 + js/src/jit-test/tests/gc/bug-1652425.js | 11 + js/src/jit-test/tests/gc/bug-1652492.js | 17 + js/src/jit-test/tests/gc/bug-1654186.js | 8 + js/src/jit-test/tests/gc/bug-1655917.js | 10 + js/src/jit-test/tests/gc/bug-1657554.js | 2 + js/src/jit-test/tests/gc/bug-1660293.js | 12 + js/src/jit-test/tests/gc/bug-1667336.js | 17 + js/src/jit-test/tests/gc/bug-1671125.js | 5 + js/src/jit-test/tests/gc/bug-1688749.js | 160 + js/src/jit-test/tests/gc/bug-1689039.js | 232 + js/src/jit-test/tests/gc/bug-1689794.js | 22 + js/src/jit-test/tests/gc/bug-1691901.js | 4 + js/src/jit-test/tests/gc/bug-1692221.js | 39 + js/src/jit-test/tests/gc/bug-1695861.js | 6 + js/src/jit-test/tests/gc/bug-1696880.js | 12 + js/src/jit-test/tests/gc/bug-1696886.js | 9 + js/src/jit-test/tests/gc/bug-1698543.js | 34 + js/src/jit-test/tests/gc/bug-1699364.js | 6 + js/src/jit-test/tests/gc/bug-1714530.js | 9 + js/src/jit-test/tests/gc/bug-1723840.js | 12 + js/src/jit-test/tests/gc/bug-1723841.js | 7 + js/src/jit-test/tests/gc/bug-1736310.js | 16 + js/src/jit-test/tests/gc/bug-1739972.js | 5 + js/src/jit-test/tests/gc/bug-1744979.js | 3 + js/src/jit-test/tests/gc/bug-1749298.js | 17 + js/src/jit-test/tests/gc/bug-1755257.js | 1 + js/src/jit-test/tests/gc/bug-1755874.js | 4 + js/src/jit-test/tests/gc/bug-1756590.js | 19 + js/src/jit-test/tests/gc/bug-1757573.js | 7 + js/src/jit-test/tests/gc/bug-1762771.js | 9 + js/src/jit-test/tests/gc/bug-1766648-markQueue.js | 12 + js/src/jit-test/tests/gc/bug-1766656.js | 17 + js/src/jit-test/tests/gc/bug-1768813.js | 19 + js/src/jit-test/tests/gc/bug-1770266.js | 2 + js/src/jit-test/tests/gc/bug-1779833.js | 20 + js/src/jit-test/tests/gc/bug-1787351.js | 1 + js/src/jit-test/tests/gc/bug-1791363.js | 13 + js/src/jit-test/tests/gc/bug-1791975.js | 13 + js/src/jit-test/tests/gc/bug-1792338.js | 14 + js/src/jit-test/tests/gc/bug-1796901.js | 4 + js/src/jit-test/tests/gc/bug-1799678.js | 21 + js/src/jit-test/tests/gc/bug-1802308.js | 8 + js/src/jit-test/tests/gc/bug-1802478.js | 10 + js/src/jit-test/tests/gc/bug-1803233.js | 5 + js/src/jit-test/tests/gc/bug-1804629-2.js | 5 + js/src/jit-test/tests/gc/bug-1804629.js | 6 + js/src/jit-test/tests/gc/bug-1804637.js | 8 + js/src/jit-test/tests/gc/bug-1806976.js | 5 + js/src/jit-test/tests/gc/bug-1817598.js | 3 + js/src/jit-test/tests/gc/bug-1820543.js | 16 + js/src/jit-test/tests/gc/bug-1822995.js | 19 + js/src/jit-test/tests/gc/bug-1825671.js | 12 + js/src/jit-test/tests/gc/bug-1825936.js | 24 + js/src/jit-test/tests/gc/bug-1828396.js | 16 + js/src/jit-test/tests/gc/bug-1830921.js | 15 + js/src/jit-test/tests/gc/bug-1834711.js | 9 + js/src/jit-test/tests/gc/bug-1838154.js | 2 + js/src/jit-test/tests/gc/bug-1839062.js | 5 + js/src/jit-test/tests/gc/bug-1845248.js | 16 + js/src/jit-test/tests/gc/bug-1851619.js | 13 + js/src/jit-test/tests/gc/bug-1852063.js | 32 + js/src/jit-test/tests/gc/bug-1852729.js | 5 + js/src/jit-test/tests/gc/bug-1856739.js | 1 + js/src/jit-test/tests/gc/bug-1865597.js | 10 + js/src/jit-test/tests/gc/bug-1867453.js | 13 + js/src/jit-test/tests/gc/bug-1871186.js | 10 + js/src/jit-test/tests/gc/bug-1872524.js | 17 + js/src/jit-test/tests/gc/bug-1877406.js | 7 + js/src/jit-test/tests/gc/bug-1880444.js | 10 + js/src/jit-test/tests/gc/bug-787703.js | 7 + js/src/jit-test/tests/gc/bug-820186.js | 297 + js/src/jit-test/tests/gc/bug-821551.js | 14 + js/src/jit-test/tests/gc/bug-824321.js | 3 + js/src/jit-test/tests/gc/bug-825326.js | 18 + js/src/jit-test/tests/gc/bug-832103.js | 27 + js/src/jit-test/tests/gc/bug-880816.js | 30 + js/src/jit-test/tests/gc/bug-880886.js | 10 + js/src/jit-test/tests/gc/bug-886551-1.js | 8 + js/src/jit-test/tests/gc/bug-886551-2.js | 7 + js/src/jit-test/tests/gc/bug-886560.js | 11 + js/src/jit-test/tests/gc/bug-886630.js | 109 + js/src/jit-test/tests/gc/bug-889682-1.js | 13 + js/src/jit-test/tests/gc/bug-889682-2.js | 14 + js/src/jit-test/tests/gc/bug-889682-3.js | 14 + js/src/jit-test/tests/gc/bug-891773.js | 14 + js/src/jit-test/tests/gc/bug-906236.js | 9 + js/src/jit-test/tests/gc/bug-906241.js | 9 + js/src/jit-test/tests/gc/bug-912813.js | 7 + js/src/jit-test/tests/gc/bug-913224.js | 1 + js/src/jit-test/tests/gc/bug-913715.js | 31 + js/src/jit-test/tests/gc/bug-919536.js | 17 + js/src/jit-test/tests/gc/bug-924690.js | 25 + js/src/jit-test/tests/gc/bug-935022.js | 4 + js/src/jit-test/tests/gc/bug-939499.js | 4 + js/src/jit-test/tests/gc/bug-945275.js | 11 + js/src/jit-test/tests/gc/bug-945280.js | 4 + js/src/jit-test/tests/gc/bug-945285.js | 3 + js/src/jit-test/tests/gc/bug-950927.js | 31 + js/src/jit-test/tests/gc/bug-952819.js | 3 + js/src/jit-test/tests/gc/bug-956324.js | 28 + js/src/jit-test/tests/gc/bug-957110.js | 7 + js/src/jit-test/tests/gc/bug-957114.js | 13 + js/src/jit-test/tests/gc/bug-961741.js | 5 + js/src/jit-test/tests/gc/bug-961877.js | 14 + js/src/jit-test/tests/gc/bug-969012.js | 60 + js/src/jit-test/tests/gc/bug-978353.js | 6 + js/src/jit-test/tests/gc/bug-978802.js | 17 + js/src/jit-test/tests/gc/bug-981289.js | 8 + js/src/jit-test/tests/gc/bug-981295.js | 9 + js/src/jit-test/tests/gc/bug-985732.js | 84 + js/src/jit-test/tests/gc/bug-993768.js | 13 + js/src/jit-test/tests/gc/bug1116306.js | 8 + js/src/jit-test/tests/gc/bug1146213.js | 10 + js/src/jit-test/tests/gc/bug1191756.js | 18 + js/src/jit-test/tests/gc/bug1246607.js | 15 + js/src/jit-test/tests/gc/bug1282113.js | 6 + js/src/jit-test/tests/gc/bug1283169.js | 5 + js/src/jit-test/tests/gc/bug1285186.js | 5 + js/src/jit-test/tests/gc/bug1285490.js | 3 + js/src/jit-test/tests/gc/bug1287063.js | 4 + js/src/jit-test/tests/gc/bug1326343-gcstats.js | 6 + js/src/jit-test/tests/gc/bug1335642.js | 6 + js/src/jit-test/tests/gc/bug1335643.js | 5 + js/src/jit-test/tests/gc/bug1336866.js | 1 + js/src/jit-test/tests/gc/bug1337324.js | 6 + js/src/jit-test/tests/gc/bug1471949.js | 5 + js/src/jit-test/tests/gc/bug1511412.js | 17 + js/src/jit-test/tests/gc/bug1532289.js | 11 + js/src/jit-test/tests/gc/bug1600017.js | 21 + js/src/jit-test/tests/gc/bug1600488-1.js | 14 + js/src/jit-test/tests/gc/bug1600488-2.js | 14 + js/src/jit-test/tests/gc/bug1698557.js | 6 + js/src/jit-test/tests/gc/bug1704451.js | 6 + js/src/jit-test/tests/gc/bug1709537.js | 9 + js/src/jit-test/tests/gc/bug888463.js | 66 + js/src/jit-test/tests/gc/compartment-revived-gc.js | 133 + js/src/jit-test/tests/gc/dedupe-02.js | 39 + js/src/jit-test/tests/gc/dedupe.js | 44 + js/src/jit-test/tests/gc/dedupeTenuredBase.js | 45 + .../tests/gc/deduplicateTenuringStrings.js | 205 + .../tests/gc/elements-post-write-barrier.js | 27 + .../jit-test/tests/gc/finalizationRegistry-ccw.js | 81 + .../finalizationRegistry-cleanupSome-recursive.js | 51 + .../jit-test/tests/gc/finalizationRegistry-gray.js | 10 + .../jit-test/tests/gc/finalizationRegistry-oom1.js | 8 + .../jit-test/tests/gc/finalizationRegistry-oom2.js | 4 + .../jit-test/tests/gc/finalizationRegistry-oom3.js | 5 + .../jit-test/tests/gc/finalizationRegistry-oom4.js | 5 + ...finalizationRegistry-records-not-initialized.js | 6 + js/src/jit-test/tests/gc/finalizationRegistry.js | 247 + js/src/jit-test/tests/gc/gcparam.js | 63 + js/src/jit-test/tests/gc/gczeal-range.js | 5 + js/src/jit-test/tests/gc/helper-thread-params.js | 34 + js/src/jit-test/tests/gc/incremental-01.js | 31 + js/src/jit-test/tests/gc/incremental-02.js | 30 + .../tests/gc/incremental-AccessorShape-barrier.js | 18 + js/src/jit-test/tests/gc/incremental-abort.js | 57 + js/src/jit-test/tests/gc/incremental-compacting.js | 43 + js/src/jit-test/tests/gc/incremental-state.js | 96 + js/src/jit-test/tests/gc/jsscript-mark-children.js | 24 + js/src/jit-test/tests/gc/marking-thread-count.js | 12 + js/src/jit-test/tests/gc/multi-01.js | 9 + js/src/jit-test/tests/gc/multi-02.js | 10 + js/src/jit-test/tests/gc/multi-03.js | 11 + js/src/jit-test/tests/gc/oomInArrayProtoTest.js | 22 + js/src/jit-test/tests/gc/oomInByteSize.js | 18 + js/src/jit-test/tests/gc/oomInDebugger.js | 4 + js/src/jit-test/tests/gc/oomInDtoa.js | 3 + .../tests/gc/oomInExceptionHandlerBailout.js | 14 + js/src/jit-test/tests/gc/oomInFindPath.js | 18 + js/src/jit-test/tests/gc/oomInFormatStackDump.js | 3 + .../tests/gc/oomInGetJumpLabelForBranch.js | 3 + js/src/jit-test/tests/gc/oomInNewGlobal.js | 3 + js/src/jit-test/tests/gc/oomInOffTheadCompile.js | 15 + js/src/jit-test/tests/gc/oomInOffTheadCompile2.js | 7 + js/src/jit-test/tests/gc/oomInOffTheadCompile3.js | 17 + js/src/jit-test/tests/gc/oomInParseAsmJS.js | 16 + js/src/jit-test/tests/gc/oomInParseFunction.js | 3 + js/src/jit-test/tests/gc/oomInRegExp.js | 5 + js/src/jit-test/tests/gc/oomInRegExp2.js | 5 + .../tests/gc/oomInRegExpAlternativeGeneration.js | 16 + js/src/jit-test/tests/gc/oomInWeakMap.js | 6 + .../tests/gc/pretenure-array-long-lived.js | 17 + .../gc/pretenure-array-long-then-short-lived.js | 28 + .../tests/gc/pretenure-array-short-lived.js | 16 + .../gc/pretenure-array-short-then-long-lived.js | 28 + .../tests/gc/pretenure-object-long-lived.js | 17 + .../gc/pretenure-object-long-then-short-lived.js | 28 + .../tests/gc/pretenure-object-short-lived.js | 16 + .../gc/pretenure-object-short-then-long-lived.js | 28 + js/src/jit-test/tests/gc/pretenuring.js | 50 + js/src/jit-test/tests/gc/regress-1711413.js | 6 + js/src/jit-test/tests/gc/str-atom-dedupe.js | 16 + js/src/jit-test/tests/gc/test-root-arrays.js | 10 + js/src/jit-test/tests/gc/weak-marking-01.js | 220 + js/src/jit-test/tests/gc/weak-marking-02.js | 338 + js/src/jit-test/tests/gc/weak-marking-03.js | 696 + js/src/jit-test/tests/gc/weak-marking-varying.js | 90 + js/src/jit-test/tests/gc/weakRef_in_promise.js | 18 + js/src/jit-test/tests/gc/weakRefs-basic.js | 81 + js/src/jit-test/tests/gc/weakRefs.js | 122 + js/src/jit-test/tests/gc/weakmap-expose.js | 43 + js/src/jit-test/tests/gc/weakmap-nursery-value.js | 35 + js/src/jit-test/tests/gc/weakmark-remap.js | 16 + js/src/jit-test/tests/gc/weakmark-remap2.js | 21 + js/src/jit-test/tests/generators/bug1098947.js | 11 + js/src/jit-test/tests/generators/bug1462353.js | 11 + js/src/jit-test/tests/generators/bug1491331.js | 11 + js/src/jit-test/tests/generators/bug1501722.js | 11 + js/src/jit-test/tests/generators/bug1542660-2.js | 111 + js/src/jit-test/tests/generators/bug1542660.js | 53 + js/src/jit-test/tests/generators/bug1664463.js | 31 + js/src/jit-test/tests/generators/bug1673080.js | 23 + js/src/jit-test/tests/generators/bug1767181.js | 14 + js/src/jit-test/tests/generators/bug1773628.js | 13 + js/src/jit-test/tests/generators/bug1791968.js | 33 + js/src/jit-test/tests/generators/bug1811171.js | 14 + js/src/jit-test/tests/generators/bug908920.js | 9 + js/src/jit-test/tests/generators/bug931414.js | 11 + js/src/jit-test/tests/generators/closing-osr.js | 24 + js/src/jit-test/tests/generators/es6-syntax.js | 34 + js/src/jit-test/tests/generators/limits.js | 90 + .../jit-test/tests/generators/next-on-finished.js | 6 + .../tests/generators/relazify-arguments-usage.js | 10 + .../tests/generators/return-break-continue.js | 66 + js/src/jit-test/tests/generators/return.js | 181 + js/src/jit-test/tests/generators/throw-closes.js | 42 + .../jit-test/tests/generators/throw-on-finished.js | 7 + js/src/jit-test/tests/generators/wrappers.js | 27 + .../generators/yield-exception-stack-in-finally.js | 33 + .../jit-test/tests/generators/yield-in-finally.js | 164 + js/src/jit-test/tests/generators/yield-regexp.js | 28 + js/src/jit-test/tests/generators/yield-yield.js | 12 + js/src/jit-test/tests/heap-analysis/bug-1249107.js | 1 + js/src/jit-test/tests/heap-analysis/bug-1252912.js | 6 + js/src/jit-test/tests/heap-analysis/bug-1254105.js | 3 + .../tests/heap-analysis/byteSize-of-bigint.js | 120 + .../tests/heap-analysis/byteSize-of-object.js | 77 + .../tests/heap-analysis/byteSize-of-scripts.js | 50 + .../tests/heap-analysis/byteSize-of-string.js | 259 + .../tests/heap-analysis/byteSize-of-symbol.js | 23 + js/src/jit-test/tests/heap-analysis/findPath.js | 50 + .../tests/heap-analysis/pointerByteSize.js | 3 + .../jit-test/tests/heap-analysis/shortestPaths.js | 95 + .../jit-test/tests/ion/ArrayLengthGetPropertyIC.js | 54 + .../tests/ion/ConvertElementsToDouble-Int32.js | 9 + js/src/jit-test/tests/ion/InlineAddVTypeMonitor.js | 17 + js/src/jit-test/tests/ion/PurgeProtoChain.js | 10 + js/src/jit-test/tests/ion/absd.js | 7 + js/src/jit-test/tests/ion/andOr.js | 31 + js/src/jit-test/tests/ion/arguments-type-reflow.js | 17 + js/src/jit-test/tests/ion/arithstringtonumber.js | 19 + .../jit-test/tests/ion/array-join-bug1137624-1.js | 12 + .../jit-test/tests/ion/array-join-bug1137624-2.js | 9 + .../jit-test/tests/ion/array-push-frozen-array.js | 19 + .../tests/ion/array-push-length-overflow.js | 14 + .../tests/ion/array-push-multiple-frozen.js | 85 + .../tests/ion/array-push-multiple-with-funapply.js | 78 + js/src/jit-test/tests/ion/array-push-multiple.js | 72 + js/src/jit-test/tests/ion/array-splice.js | 38 + js/src/jit-test/tests/ion/bailout-env.js | 54 + js/src/jit-test/tests/ion/bailout-float-regs.js | 13 + js/src/jit-test/tests/ion/bailout-oom-01.js | 36 + js/src/jit-test/tests/ion/bailout-spread.js | 53 + .../tests/ion/bailout-with-object-or-null.js | 17 + js/src/jit-test/tests/ion/base-reg-fp.js | 13 + js/src/jit-test/tests/ion/base-reg-sp.js | 13 + js/src/jit-test/tests/ion/bindname.js | 53 + .../jit-test/tests/ion/bug-770309-mcall-bailout.js | 68 + js/src/jit-test/tests/ion/bug-870034.js | 12 + js/src/jit-test/tests/ion/bug-952818.js | 9 + js/src/jit-test/tests/ion/bug1000605.js | 43 + js/src/jit-test/tests/ion/bug1000960.js | 9 + js/src/jit-test/tests/ion/bug1001222.js | 5 + js/src/jit-test/tests/ion/bug1001378.js | 17 + js/src/jit-test/tests/ion/bug1001382.js | 10 + js/src/jit-test/tests/ion/bug1001850.js | 110 + js/src/jit-test/tests/ion/bug1003694.js | 9 + js/src/jit-test/tests/ion/bug1005458.js | 5 + js/src/jit-test/tests/ion/bug1005590.js | 9 + js/src/jit-test/tests/ion/bug1006885.js | 9 + js/src/jit-test/tests/ion/bug1007027.js | 5 + js/src/jit-test/tests/ion/bug1007213.js | 21 + js/src/jit-test/tests/ion/bug1015498.js | 91 + js/src/jit-test/tests/ion/bug1018621.js | 7 + js/src/jit-test/tests/ion/bug1022081.js | 8 + js/src/jit-test/tests/ion/bug1027510.js | 96 + js/src/jit-test/tests/ion/bug1028910.js | 14 + js/src/jit-test/tests/ion/bug1033873.js | 6 + js/src/jit-test/tests/ion/bug1034400.js | 28 + js/src/jit-test/tests/ion/bug1046597.js | 6 + js/src/jit-test/tests/ion/bug1053074.js | 12 + js/src/jit-test/tests/ion/bug1054047.js | 12 + js/src/jit-test/tests/ion/bug1054241.js | 12 + js/src/jit-test/tests/ion/bug1054512.js | 11 + js/src/jit-test/tests/ion/bug1054601.js | 8 + js/src/jit-test/tests/ion/bug1054753.js | 13 + js/src/jit-test/tests/ion/bug1055762.js | 13 + js/src/jit-test/tests/ion/bug1055864.js | 8 + js/src/jit-test/tests/ion/bug1057580.js | 15 + js/src/jit-test/tests/ion/bug1057582.js | 10 + js/src/jit-test/tests/ion/bug1057598.js | 18 + js/src/jit-test/tests/ion/bug1060387.js | 12 + js/src/jit-test/tests/ion/bug1060398.js | 16 + js/src/jit-test/tests/ion/bug1062612.js | 7 + js/src/jit-test/tests/ion/bug1063488.js | 16 + js/src/jit-test/tests/ion/bug1063653.js | 10 + js/src/jit-test/tests/ion/bug1064537.js | 17 + js/src/jit-test/tests/ion/bug1066659.js | 13 + js/src/jit-test/tests/ion/bug1070462.js | 4 + js/src/jit-test/tests/ion/bug1070465.js | 5 + js/src/jit-test/tests/ion/bug1071879.js | 39 + js/src/jit-test/tests/ion/bug1072188.js | 24 + js/src/jit-test/tests/ion/bug1072691.js | 58 + js/src/jit-test/tests/ion/bug1072911.js | 14 + js/src/jit-test/tests/ion/bug1073702.js | 10 + js/src/jit-test/tests/ion/bug1073861.js | 69 + js/src/jit-test/tests/ion/bug1073928.js | 30 + js/src/jit-test/tests/ion/bug1074833.js | 44 + js/src/jit-test/tests/ion/bug1076026.js | 9 + js/src/jit-test/tests/ion/bug1076091.js | 11 + js/src/jit-test/tests/ion/bug1076283.js | 10 + js/src/jit-test/tests/ion/bug1077349.js | 20 + js/src/jit-test/tests/ion/bug1077427.js | 12 + js/src/jit-test/tests/ion/bug1079062.js | 6 + js/src/jit-test/tests/ion/bug1079850.js | 5 + js/src/jit-test/tests/ion/bug1080991.js | 5 + js/src/jit-test/tests/ion/bug1085298.js | 7 + js/src/jit-test/tests/ion/bug1089761.js | 14 + js/src/jit-test/tests/ion/bug1090037.js | 7 + js/src/jit-test/tests/ion/bug1090424.js | 55 + js/src/jit-test/tests/ion/bug1092833.js | 49 + js/src/jit-test/tests/ion/bug1101576.js | 14 + js/src/jit-test/tests/ion/bug1101821.js | 89 + js/src/jit-test/tests/ion/bug1102187.js | 49 + js/src/jit-test/tests/ion/bug1105187-sink.js | 9 + js/src/jit-test/tests/ion/bug1105574-ra-sink.js | 11 + js/src/jit-test/tests/ion/bug1105684.js | 6 + js/src/jit-test/tests/ion/bug1106171-sink.js | 19 + js/src/jit-test/tests/ion/bug1107011-1.js | 17 + js/src/jit-test/tests/ion/bug1107011-2.js | 12 + js/src/jit-test/tests/ion/bug1113139.js | 9 + js/src/jit-test/tests/ion/bug1115665.js | 8 + js/src/jit-test/tests/ion/bug1117099.js | 10 + js/src/jit-test/tests/ion/bug1122401.js | 18 + js/src/jit-test/tests/ion/bug1122839.js | 11 + js/src/jit-test/tests/ion/bug1123011.js | 8 + js/src/jit-test/tests/ion/bug1123064.js | 30 + js/src/jit-test/tests/ion/bug1128490.js | 10 + js/src/jit-test/tests/ion/bug1129977.js | 10 + js/src/jit-test/tests/ion/bug1130679.js | 29 + js/src/jit-test/tests/ion/bug1132128.js | 26 + js/src/jit-test/tests/ion/bug1132290.js | 10 + js/src/jit-test/tests/ion/bug1132584.js | 12 + js/src/jit-test/tests/ion/bug1132770.js | 4 + js/src/jit-test/tests/ion/bug1133530.js | 18 + js/src/jit-test/tests/ion/bug1134074.js | 10 + js/src/jit-test/tests/ion/bug1135047.js | 5 + js/src/jit-test/tests/ion/bug1138740.js | 12 + js/src/jit-test/tests/ion/bug1139152.js | 25 + js/src/jit-test/tests/ion/bug1139368.js | 10 + js/src/jit-test/tests/ion/bug1139376.js | 13 + js/src/jit-test/tests/ion/bug1140890.js | 11 + js/src/jit-test/tests/ion/bug1143216.js | 17 + js/src/jit-test/tests/ion/bug1143878.js | 10 + js/src/jit-test/tests/ion/bug1146410.js | 9 + js/src/jit-test/tests/ion/bug1148883.js | 26 + js/src/jit-test/tests/ion/bug1148973-1.js | 16 + js/src/jit-test/tests/ion/bug1148973-2.js | 8 + js/src/jit-test/tests/ion/bug1151323.js | 8 + js/src/jit-test/tests/ion/bug1154971.js | 10 + js/src/jit-test/tests/ion/bug1155807.js | 15 + js/src/jit-test/tests/ion/bug1158632.js | 13 + js/src/jit-test/tests/ion/bug1159899.js | 5 + js/src/jit-test/tests/ion/bug1160884.js | 12 + js/src/jit-test/tests/ion/bug1165905.js | 7 + js/src/jit-test/tests/ion/bug1172498-2.js | 12 + js/src/jit-test/tests/ion/bug1172498.js | 3 + js/src/jit-test/tests/ion/bug1181354.js | 9 + js/src/jit-test/tests/ion/bug1185957.js | 9 + js/src/jit-test/tests/ion/bug1186271.js | 18 + js/src/jit-test/tests/ion/bug1188586.js | 7 + js/src/jit-test/tests/ion/bug1189137.js | 12 + js/src/jit-test/tests/ion/bug1195588.js | 15 + js/src/jit-test/tests/ion/bug1195590.js | 7 + js/src/jit-test/tests/ion/bug1196589.js | 9 + js/src/jit-test/tests/ion/bug1196590.js | 11 + js/src/jit-test/tests/ion/bug1196648.js | 18 + js/src/jit-test/tests/ion/bug1197769.js | 12 + js/src/jit-test/tests/ion/bug1199898.js | 4 + js/src/jit-test/tests/ion/bug1201459.js | 5 + js/src/jit-test/tests/ion/bug1201469.js | 16 + js/src/jit-test/tests/ion/bug1201850.js | 10 + js/src/jit-test/tests/ion/bug1204165.js | 10 + js/src/jit-test/tests/ion/bug1204675.js | 13 + js/src/jit-test/tests/ion/bug1205842.js | 8 + js/src/jit-test/tests/ion/bug1207413.js | 14 + js/src/jit-test/tests/ion/bug1212298.js | 8 + js/src/jit-test/tests/ion/bug1212605.js | 3 + js/src/jit-test/tests/ion/bug1213552.js | 4 + js/src/jit-test/tests/ion/bug1214013.js | 7 + js/src/jit-test/tests/ion/bug1214050.js | 6 + js/src/jit-test/tests/ion/bug1215600.js | 25 + js/src/jit-test/tests/ion/bug1215992.js | 6 + js/src/jit-test/tests/ion/bug1216130.js | 50 + js/src/jit-test/tests/ion/bug1216151.js | 6 + js/src/jit-test/tests/ion/bug1216157.js | 12 + js/src/jit-test/tests/ion/bug1218065.js | 25 + js/src/jit-test/tests/ion/bug1219883.js | 14 + js/src/jit-test/tests/ion/bug1222905.js | 14 + js/src/jit-test/tests/ion/bug1222917.js | 6 + js/src/jit-test/tests/ion/bug1225367.js | 17 + js/src/jit-test/tests/ion/bug1226816.js | 11 + js/src/jit-test/tests/ion/bug1228327.js | 14 + js/src/jit-test/tests/ion/bug1228397.js | 7 + js/src/jit-test/tests/ion/bug1232859.js | 12 + js/src/jit-test/tests/ion/bug1233331.js | 12 + js/src/jit-test/tests/ion/bug1233343.js | 36 + js/src/jit-test/tests/ion/bug1239075.js | 29 + js/src/jit-test/tests/ion/bug1240521.js | 14 + js/src/jit-test/tests/ion/bug1244502.js | 12 + js/src/jit-test/tests/ion/bug1246154.js | 5 + js/src/jit-test/tests/ion/bug1246552.js | 11 + js/src/jit-test/tests/ion/bug1247880.js | 12 + js/src/jit-test/tests/ion/bug1247909.js | 12 + js/src/jit-test/tests/ion/bug1247915.js | 7 + js/src/jit-test/tests/ion/bug1254197.js | 16 + js/src/jit-test/tests/ion/bug1261326.js | 11 + js/src/jit-test/tests/ion/bug1264948-1.js | 9 + js/src/jit-test/tests/ion/bug1265159.js | 17 + js/src/jit-test/tests/ion/bug1269756.js | 7 + js/src/jit-test/tests/ion/bug1273858-1.js | 53 + js/src/jit-test/tests/ion/bug1273858-2.js | 46 + js/src/jit-test/tests/ion/bug1279898.js | 19 + js/src/jit-test/tests/ion/bug1282944.js | 18 + js/src/jit-test/tests/ion/bug1284491.js | 14 + js/src/jit-test/tests/ion/bug1285217.js | 11 + js/src/jit-test/tests/ion/bug1285218.js | 27 + js/src/jit-test/tests/ion/bug1287416.js | 3 + js/src/jit-test/tests/ion/bug1293542.js | 11 + js/src/jit-test/tests/ion/bug1296667.js | 12 + js/src/jit-test/tests/ion/bug1298354.js | 19 + js/src/jit-test/tests/ion/bug1299007.js | 41 + js/src/jit-test/tests/ion/bug1304640.js | 10 + js/src/jit-test/tests/ion/bug1304643.js | 7 + js/src/jit-test/tests/ion/bug1308802.js | 8 + js/src/jit-test/tests/ion/bug1311061.js | 5 + js/src/jit-test/tests/ion/bug1314438.js | 6 + js/src/jit-test/tests/ion/bug1314545.js | 31 + js/src/jit-test/tests/ion/bug1317943.js | 14 + js/src/jit-test/tests/ion/bug1318634.js | 20 + js/src/jit-test/tests/ion/bug1321437.js | 14 + js/src/jit-test/tests/ion/bug1322932.js | 12 + js/src/jit-test/tests/ion/bug1323854.js | 15 + js/src/jit-test/tests/ion/bug1324521.js | 6 + js/src/jit-test/tests/ion/bug1326150.js | 4 + js/src/jit-test/tests/ion/bug1329933.js | 10 + js/src/jit-test/tests/ion/bug1330662.js | 8 + js/src/jit-test/tests/ion/bug1331058.js | 29 + js/src/jit-test/tests/ion/bug1331350.js | 56 + js/src/jit-test/tests/ion/bug1331405.js | 4 + js/src/jit-test/tests/ion/bug1333946.js | 8 + js/src/jit-test/tests/ion/bug1334314.js | 16 + js/src/jit-test/tests/ion/bug1342483-1.js | 6 + js/src/jit-test/tests/ion/bug1342483-2.js | 17 + js/src/jit-test/tests/ion/bug1342882.js | 3 + js/src/jit-test/tests/ion/bug1345160.js | 9 + js/src/jit-test/tests/ion/bug1352510.js | 8 + js/src/jit-test/tests/ion/bug1354275.js | 16 + js/src/jit-test/tests/ion/bug1356822.js | 15 + js/src/jit-test/tests/ion/bug1365518.js | 13 + js/src/jit-test/tests/ion/bug1365769-1.js | 16 + js/src/jit-test/tests/ion/bug1365769-2.js | 16 + js/src/jit-test/tests/ion/bug1368360-1.js | 9 + js/src/jit-test/tests/ion/bug1368360-2.js | 9 + js/src/jit-test/tests/ion/bug1370922.js | 34 + js/src/jit-test/tests/ion/bug1379936.js | 6 + js/src/jit-test/tests/ion/bug1383591.js | 20 + js/src/jit-test/tests/ion/bug1383972.js | 92 + js/src/jit-test/tests/ion/bug1384737.js | 8 + js/src/jit-test/tests/ion/bug1394505.js | 10 + js/src/jit-test/tests/ion/bug1395100.js | 6 + js/src/jit-test/tests/ion/bug1397071.js | 14 + js/src/jit-test/tests/ion/bug1401014.js | 52 + js/src/jit-test/tests/ion/bug1404636.js | 6 + js/src/jit-test/tests/ion/bug1408412.js | 15 + js/src/jit-test/tests/ion/bug1410683.js | 17 + js/src/jit-test/tests/ion/bug1433496.js | 6 + js/src/jit-test/tests/ion/bug1441012.js | 14 + js/src/jit-test/tests/ion/bug1450796.js | 7 + js/src/jit-test/tests/ion/bug1452581.js | 16 + js/src/jit-test/tests/ion/bug1472132.js | 11 + js/src/jit-test/tests/ion/bug1473830.js | 18 + js/src/jit-test/tests/ion/bug1479394.js | 10 + js/src/jit-test/tests/ion/bug1484905.js | 4 + js/src/jit-test/tests/ion/bug1492574.js | 18 + js/src/jit-test/tests/ion/bug1493900-1.js | 17 + js/src/jit-test/tests/ion/bug1493900-2.js | 7 + js/src/jit-test/tests/ion/bug1497107.js | 37 + js/src/jit-test/tests/ion/bug1502090.js | 13 + js/src/jit-test/tests/ion/bug1506968.js | 14 + js/src/jit-test/tests/ion/bug1509482.js | 18 + js/src/jit-test/tests/ion/bug1510684.js | 38 + js/src/jit-test/tests/ion/bug1514625.js | 11 + js/src/jit-test/tests/ion/bug1518377-1.js | 7 + js/src/jit-test/tests/ion/bug1518377-2.js | 16 + js/src/jit-test/tests/ion/bug1526840.js | 13 + js/src/jit-test/tests/ion/bug1527148.js | 17 + js/src/jit-test/tests/ion/bug1528818.js | 11 + js/src/jit-test/tests/ion/bug1538083.js | 8 + js/src/jit-test/tests/ion/bug1543166.js | 17 + js/src/jit-test/tests/ion/bug1544386-1.js | 16 + js/src/jit-test/tests/ion/bug1544386-2.js | 10 + js/src/jit-test/tests/ion/bug1544792.js | 13 + js/src/jit-test/tests/ion/bug1546228.js | 10 + js/src/jit-test/tests/ion/bug1556571.js | 14 + js/src/jit-test/tests/ion/bug1568397.js | 50 + js/src/jit-test/tests/ion/bug1570926.js | 18 + js/src/jit-test/tests/ion/bug1572051.js | 6 + js/src/jit-test/tests/ion/bug1593175.js | 10 + js/src/jit-test/tests/ion/bug1598456.js | 3 + js/src/jit-test/tests/ion/bug1598784.js | 8 + js/src/jit-test/tests/ion/bug1602190.js | 13 + js/src/jit-test/tests/ion/bug1604631.js | 4 + js/src/jit-test/tests/ion/bug1605641.js | 8 + js/src/jit-test/tests/ion/bug1607670-1.js | 13 + js/src/jit-test/tests/ion/bug1607670-2.js | 15 + js/src/jit-test/tests/ion/bug1607670-3.js | 24 + js/src/jit-test/tests/ion/bug1607670-4.js | 16 + js/src/jit-test/tests/ion/bug1608256.js | 13 + js/src/jit-test/tests/ion/bug1620189.js | 11 + js/src/jit-test/tests/ion/bug1620203.js | 7 + js/src/jit-test/tests/ion/bug1620215.js | 15 + js/src/jit-test/tests/ion/bug1621268-1.js | 9 + js/src/jit-test/tests/ion/bug1621268-2.js | 6 + js/src/jit-test/tests/ion/bug1629503-1.js | 13 + js/src/jit-test/tests/ion/bug1629503-2.js | 10 + js/src/jit-test/tests/ion/bug1640737.js | 17 + js/src/jit-test/tests/ion/bug1643888.js | 7 + js/src/jit-test/tests/ion/bug1647293.js | 12 + js/src/jit-test/tests/ion/bug1650526.js | 9 + js/src/jit-test/tests/ion/bug1655940-1.js | 14 + js/src/jit-test/tests/ion/bug1655940-2.js | 15 + js/src/jit-test/tests/ion/bug1655940-3.js | 21 + js/src/jit-test/tests/ion/bug1723464.js | 3 + js/src/jit-test/tests/ion/bug1745388.js | 3 + js/src/jit-test/tests/ion/bug1762343.js | 27 + js/src/jit-test/tests/ion/bug1791520.js | 92 + js/src/jit-test/tests/ion/bug1808210.js | 14 + js/src/jit-test/tests/ion/bug1808352.js | 27 + js/src/jit-test/tests/ion/bug1811803.js | 5 + js/src/jit-test/tests/ion/bug1812001.js | 17 + js/src/jit-test/tests/ion/bug1812508.js | 53 + js/src/jit-test/tests/ion/bug1814746.js | 7 + js/src/jit-test/tests/ion/bug1814899.js | 22 + js/src/jit-test/tests/ion/bug1820602.js | 23 + js/src/jit-test/tests/ion/bug1822966.js | 22 + js/src/jit-test/tests/ion/bug1830107.js | 15 + js/src/jit-test/tests/ion/bug1845257.js | 15 + js/src/jit-test/tests/ion/bug1851976.js | 8 + js/src/jit-test/tests/ion/bug1852917.js | 9 + js/src/jit-test/tests/ion/bug1866502.js | 32 + js/src/jit-test/tests/ion/bug1870756.js | 8 + js/src/jit-test/tests/ion/bug1872842.js | 12 + js/src/jit-test/tests/ion/bug1874502.js | 8 + js/src/jit-test/tests/ion/bug470143.js | 6 + js/src/jit-test/tests/ion/bug669575-1.js | 25 + js/src/jit-test/tests/ion/bug669575-2.js | 27 + js/src/jit-test/tests/ion/bug669575-3.js | 25 + js/src/jit-test/tests/ion/bug669950.js | 3 + js/src/jit-test/tests/ion/bug670484.js | 101 + js/src/jit-test/tests/ion/bug674507-1.js | 19 + js/src/jit-test/tests/ion/bug674507-2.js | 21 + js/src/jit-test/tests/ion/bug674656.js | 22 + js/src/jit-test/tests/ion/bug674664-1.js | 18 + js/src/jit-test/tests/ion/bug674664-2.js | 36 + js/src/jit-test/tests/ion/bug674664-3.js | 10 + js/src/jit-test/tests/ion/bug674694.js | 64 + js/src/jit-test/tests/ion/bug675381.js | 17 + js/src/jit-test/tests/ion/bug677066-2.js | 7 + js/src/jit-test/tests/ion/bug677066.js | 9 + js/src/jit-test/tests/ion/bug677073-2.js | 11 + js/src/jit-test/tests/ion/bug677073.js | 9 + js/src/jit-test/tests/ion/bug677074.js | 6 + js/src/jit-test/tests/ion/bug677080.js | 8 + js/src/jit-test/tests/ion/bug677163.js | 9 + js/src/jit-test/tests/ion/bug677455.js | 14 + js/src/jit-test/tests/ion/bug677715-2.js | 9 + js/src/jit-test/tests/ion/bug677715-3.js | 10 + js/src/jit-test/tests/ion/bug677715-4.js | 10 + js/src/jit-test/tests/ion/bug677715.js | 9 + js/src/jit-test/tests/ion/bug677730.js | 4 + js/src/jit-test/tests/ion/bug677774-1.js | 16 + js/src/jit-test/tests/ion/bug677774-2.js | 8 + js/src/jit-test/tests/ion/bug677871.js | 18 + js/src/jit-test/tests/ion/bug678106.js | 32 + js/src/jit-test/tests/ion/bug678239-1.js | 5 + js/src/jit-test/tests/ion/bug678239-2.js | 7 + js/src/jit-test/tests/ion/bug678353.js | 28 + js/src/jit-test/tests/ion/bug678620.js | 6 + js/src/jit-test/tests/ion/bug678625.js | 8 + js/src/jit-test/tests/ion/bug678798.js | 9 + js/src/jit-test/tests/ion/bug679493-2.js | 30 + js/src/jit-test/tests/ion/bug679493.js | 37 + js/src/jit-test/tests/ion/bug679581.js | 11 + js/src/jit-test/tests/ion/bug679794.js | 7 + js/src/jit-test/tests/ion/bug680432.js | 46 + js/src/jit-test/tests/ion/bug680619.js | 13 + js/src/jit-test/tests/ion/bug680621.js | 10 + js/src/jit-test/tests/ion/bug681185.js | 276 + js/src/jit-test/tests/ion/bug682210.js | 7 + js/src/jit-test/tests/ion/bug684362.js | 14 + js/src/jit-test/tests/ion/bug684384.js | 58 + js/src/jit-test/tests/ion/bug691597.js | 5 + js/src/jit-test/tests/ion/bug691603.js | 11 + js/src/jit-test/tests/ion/bug691747.js | 11 + js/src/jit-test/tests/ion/bug692208.js | 10 + js/src/jit-test/tests/ion/bug692211.js | 8 + js/src/jit-test/tests/ion/bug692213.js | 6 + js/src/jit-test/tests/ion/bug692215.js | 7 + js/src/jit-test/tests/ion/bug695017.js | 7 + js/src/jit-test/tests/ion/bug701956.js | 13 + js/src/jit-test/tests/ion/bug701958.js | 12 + js/src/jit-test/tests/ion/bug701964.js | 36 + js/src/jit-test/tests/ion/bug703376.js | 29 + js/src/jit-test/tests/ion/bug705351.js | 38 + js/src/jit-test/tests/ion/bug706692.js | 21 + js/src/jit-test/tests/ion/bug706699.js | 16 + js/src/jit-test/tests/ion/bug710983.js | 19 + js/src/jit-test/tests/ion/bug714397.js | 17 + js/src/jit-test/tests/ion/bug716504.js | 10 + js/src/jit-test/tests/ion/bug716624-1.js | 88 + js/src/jit-test/tests/ion/bug716624-2.js | 8 + js/src/jit-test/tests/ion/bug716743.js | 3 + js/src/jit-test/tests/ion/bug716853.js | 12 + js/src/jit-test/tests/ion/bug716895.js | 14 + js/src/jit-test/tests/ion/bug717466.js | 82 + js/src/jit-test/tests/ion/bug718850.js | 10 + js/src/jit-test/tests/ion/bug719231.js | 10 + js/src/jit-test/tests/ion/bug719346.js | 15 + js/src/jit-test/tests/ion/bug719774.js | 30 + js/src/jit-test/tests/ion/bug720169.js | 8 + js/src/jit-test/tests/ion/bug723040.js | 16 + js/src/jit-test/tests/ion/bug723271.js | 23 + js/src/jit-test/tests/ion/bug724517.js | 10 + js/src/jit-test/tests/ion/bug724530.js | 10 + js/src/jit-test/tests/ion/bug724562.js | 15 + js/src/jit-test/tests/ion/bug724654.js | 14 + js/src/jit-test/tests/ion/bug724788.js | 29 + js/src/jit-test/tests/ion/bug724944.js | 18 + js/src/jit-test/tests/ion/bug724975.js | 11 + js/src/jit-test/tests/ion/bug724976.js | 4 + js/src/jit-test/tests/ion/bug724999.js | 7 + js/src/jit-test/tests/ion/bug725000.js | 9 + js/src/jit-test/tests/ion/bug725003.js | 15 + js/src/jit-test/tests/ion/bug725011.js | 8 + js/src/jit-test/tests/ion/bug725061.js | 12 + js/src/jit-test/tests/ion/bug725067.js | 11 + js/src/jit-test/tests/ion/bug726180.js | 14 + js/src/jit-test/tests/ion/bug728033.js | 8 + js/src/jit-test/tests/ion/bug728187.js | 10 + js/src/jit-test/tests/ion/bug728188.js | 9 + js/src/jit-test/tests/ion/bug729573.js | 18 + js/src/jit-test/tests/ion/bug729788.js | 25 + js/src/jit-test/tests/ion/bug729795.js | 2 + js/src/jit-test/tests/ion/bug729798.js | 6 + js/src/jit-test/tests/ion/bug729814.js | 9 + js/src/jit-test/tests/ion/bug729884.js | 3 + js/src/jit-test/tests/ion/bug729899-1.js | 19 + js/src/jit-test/tests/ion/bug729899-2.js | 9 + js/src/jit-test/tests/ion/bug729902-1.js | 11 + js/src/jit-test/tests/ion/bug729902-2.js | 13 + js/src/jit-test/tests/ion/bug730115.js | 5 + js/src/jit-test/tests/ion/bug730152.js | 4 + .../tests/ion/bug730977-implement-jsop-delprop.js | 51 + js/src/jit-test/tests/ion/bug731820.js | 29 + js/src/jit-test/tests/ion/bug732758.js | 42 + js/src/jit-test/tests/ion/bug732846.js | 6 + js/src/jit-test/tests/ion/bug732847.js | 20 + js/src/jit-test/tests/ion/bug732849.js | 2 + js/src/jit-test/tests/ion/bug732850.js | 24 + js/src/jit-test/tests/ion/bug732851.js | 11 + js/src/jit-test/tests/ion/bug732858.js | 9 + js/src/jit-test/tests/ion/bug732859.js | 19 + js/src/jit-test/tests/ion/bug732860.js | 21 + js/src/jit-test/tests/ion/bug732862.js | 6 + js/src/jit-test/tests/ion/bug732863.js | 20 + js/src/jit-test/tests/ion/bug732864.js | 22 + js/src/jit-test/tests/ion/bug734383.js | 15 + js/src/jit-test/tests/ion/bug736135-2.js | 23 + js/src/jit-test/tests/ion/bug736135.js | 38 + js/src/jit-test/tests/ion/bug736141.js | 18 + js/src/jit-test/tests/ion/bug739854.js | 12 + js/src/jit-test/tests/ion/bug741202.js | 9 + js/src/jit-test/tests/ion/bug741241.js | 36 + js/src/jit-test/tests/ion/bug743099.js | 9 + js/src/jit-test/tests/ion/bug746370.js | 7 + js/src/jit-test/tests/ion/bug747271.js | 18 + js/src/jit-test/tests/ion/bug750588.js | 13 + js/src/jit-test/tests/ion/bug754713-1.js | 16 + js/src/jit-test/tests/ion/bug754713-2.js | 29 + js/src/jit-test/tests/ion/bug754713-3.js | 9 + js/src/jit-test/tests/ion/bug754713-4.js | 6 + js/src/jit-test/tests/ion/bug754720.js | 64 + js/src/jit-test/tests/ion/bug755157.js | 4 + js/src/jit-test/tests/ion/bug755832.js | 6 + js/src/jit-test/tests/ion/bug756235.js | 18 + js/src/jit-test/tests/ion/bug756238.js | 6 + js/src/jit-test/tests/ion/bug756240.js | 12 + js/src/jit-test/tests/ion/bug756247.js | 13 + js/src/jit-test/tests/ion/bug756780.js | 9 + js/src/jit-test/tests/ion/bug756781.js | 19 + js/src/jit-test/tests/ion/bug758181.js | 13 + js/src/jit-test/tests/ion/bug758991.js | 16 + js/src/jit-test/tests/ion/bug759213.js | 9 + js/src/jit-test/tests/ion/bug760103.js | 21 + js/src/jit-test/tests/ion/bug761835.js | 154 + js/src/jit-test/tests/ion/bug761854.js | 57 + js/src/jit-test/tests/ion/bug762547.js | 14 + js/src/jit-test/tests/ion/bug764432.js | 7 + js/src/jit-test/tests/ion/bug764792.js | 7 + js/src/jit-test/tests/ion/bug765454.js | 26 + js/src/jit-test/tests/ion/bug765477.js | 8 + js/src/jit-test/tests/ion/bug765478.js | 8 + js/src/jit-test/tests/ion/bug765480.js | 9 + js/src/jit-test/tests/ion/bug766218.js | 66 + js/src/jit-test/tests/ion/bug767665.js | 11 + js/src/jit-test/tests/ion/bug768436.js | 18 + js/src/jit-test/tests/ion/bug770235.js | 6 + js/src/jit-test/tests/ion/bug770762.js | 18 + js/src/jit-test/tests/ion/bug772901.js | 7 + js/src/jit-test/tests/ion/bug773587.js | 6 + js/src/jit-test/tests/ion/bug774006.js | 43 + js/src/jit-test/tests/ion/bug774644.js | 10 + js/src/jit-test/tests/ion/bug776687.js | 8 + js/src/jit-test/tests/ion/bug776748.js | 23 + js/src/jit-test/tests/ion/bug779125.js | 7 + js/src/jit-test/tests/ion/bug779245.js | 14 + js/src/jit-test/tests/ion/bug779595.js | 7 + js/src/jit-test/tests/ion/bug779812.js | 6 + js/src/jit-test/tests/ion/bug779841.js | 7 + js/src/jit-test/tests/ion/bug780842.js | 8 + js/src/jit-test/tests/ion/bug782087.js | 11 + js/src/jit-test/tests/ion/bug783590.js | 13 + js/src/jit-test/tests/ion/bug784385.js | 9 + js/src/jit-test/tests/ion/bug786107.js | 10 + js/src/jit-test/tests/ion/bug787921.js | 13 + js/src/jit-test/tests/ion/bug789300.js | 4 + js/src/jit-test/tests/ion/bug789420.js | 38 + js/src/jit-test/tests/ion/bug790479.js | 16 + js/src/jit-test/tests/ion/bug792166-1.js | 8 + js/src/jit-test/tests/ion/bug792166-2.js | 8 + js/src/jit-test/tests/ion/bug792220.js | 12 + js/src/jit-test/tests/ion/bug792234.js | 7 + js/src/jit-test/tests/ion/bug792944.js | 13 + js/src/jit-test/tests/ion/bug798819.js | 10 + js/src/jit-test/tests/ion/bug798823.js | 37 + js/src/jit-test/tests/ion/bug798946.js | 16 + js/src/jit-test/tests/ion/bug799185-2.js | 51 + js/src/jit-test/tests/ion/bug799185-3.js | 9 + js/src/jit-test/tests/ion/bug799185-4.js | 12 + js/src/jit-test/tests/ion/bug799185-5.js | 26 + js/src/jit-test/tests/ion/bug799185-6.js | 19 + js/src/jit-test/tests/ion/bug799185-7.js | 66 + js/src/jit-test/tests/ion/bug799185-8.js | 19 + js/src/jit-test/tests/ion/bug799185-9.js | 12 + js/src/jit-test/tests/ion/bug800179.js | 24 + js/src/jit-test/tests/ion/bug804064.js | 22 + js/src/jit-test/tests/ion/bug807035.js | 6 + js/src/jit-test/tests/ion/bug807047.js | 9 + js/src/jit-test/tests/ion/bug808023.js | 7 + js/src/jit-test/tests/ion/bug809021.js | 73 + js/src/jit-test/tests/ion/bug809472.js | 19 + js/src/jit-test/tests/ion/bug810253.js | 8 + js/src/jit-test/tests/ion/bug813784.js | 184 + js/src/jit-test/tests/ion/bug816492.js | 8 + js/src/jit-test/tests/ion/bug816786.js | 38 + js/src/jit-test/tests/ion/bug818023.js | 53 + js/src/jit-test/tests/ion/bug819611.js | 6 + js/src/jit-test/tests/ion/bug819794.js | 7 + js/src/jit-test/tests/ion/bug819865.js | 2 + js/src/jit-test/tests/ion/bug820873.js | 28 + js/src/jit-test/tests/ion/bug821788.js | 13 + js/src/jit-test/tests/ion/bug821794.js | 10 + js/src/jit-test/tests/ion/bug822938.js | 9 + js/src/jit-test/tests/ion/bug824347.js | 11 + js/src/jit-test/tests/ion/bug824473.js | 41 + js/src/jit-test/tests/ion/bug824863.js | 53 + js/src/jit-test/tests/ion/bug825599.js | 27 + js/src/jit-test/tests/ion/bug825705.js | 8 + js/src/jit-test/tests/ion/bug825716.js | 3 + js/src/jit-test/tests/ion/bug827082.js | 2 + js/src/jit-test/tests/ion/bug827659-1.js | 11 + js/src/jit-test/tests/ion/bug827821-2.js | 58 + js/src/jit-test/tests/ion/bug827821-3.js | 13 + js/src/jit-test/tests/ion/bug830269.js | 12 + js/src/jit-test/tests/ion/bug831087.js | 15 + js/src/jit-test/tests/ion/bug831424-1.js | 16 + js/src/jit-test/tests/ion/bug831424-2.js | 16 + js/src/jit-test/tests/ion/bug832058.js | 16 + js/src/jit-test/tests/ion/bug833076.js | 6 + js/src/jit-test/tests/ion/bug835178.js | 30 + js/src/jit-test/tests/ion/bug835496.js | 6 + js/src/jit-test/tests/ion/bug836102.js | 26 + js/src/jit-test/tests/ion/bug836274.js | 13 + js/src/jit-test/tests/ion/bug836705.js | 12 + js/src/jit-test/tests/ion/bug837312.js | 7 + js/src/jit-test/tests/ion/bug839315.js | 18 + js/src/jit-test/tests/ion/bug843866.js | 8 + js/src/jit-test/tests/ion/bug843875.js | 8 + js/src/jit-test/tests/ion/bug844059.js | 12 + js/src/jit-test/tests/ion/bug844364.js | 6 + js/src/jit-test/tests/ion/bug844452.js | 10 + js/src/jit-test/tests/ion/bug844459.js | 7 + js/src/jit-test/tests/ion/bug846330.js | 9 + js/src/jit-test/tests/ion/bug847412.js | 19 + js/src/jit-test/tests/ion/bug848319.js | 25 + js/src/jit-test/tests/ion/bug848733.js | 11 + js/src/jit-test/tests/ion/bug848803.js | 34 + js/src/jit-test/tests/ion/bug849781-2.js | 9 + js/src/jit-test/tests/ion/bug849781.js | 8 + js/src/jit-test/tests/ion/bug850099.js | 4 + js/src/jit-test/tests/ion/bug851064.js | 13 + js/src/jit-test/tests/ion/bug851067.js | 6 + js/src/jit-test/tests/ion/bug851792.js | 135 + js/src/jit-test/tests/ion/bug852140.js | 8 + js/src/jit-test/tests/ion/bug852342.js | 12 + js/src/jit-test/tests/ion/bug855514.js | 25 + js/src/jit-test/tests/ion/bug858586.js | 30 + js/src/jit-test/tests/ion/bug858617.js | 18 + js/src/jit-test/tests/ion/bug860838-1.js | 39 + js/src/jit-test/tests/ion/bug860838-2.js | 28 + js/src/jit-test/tests/ion/bug860838-3.js | 44 + js/src/jit-test/tests/ion/bug860838-4.js | 54 + js/src/jit-test/tests/ion/bug860838.js | 51 + js/src/jit-test/tests/ion/bug861165.js | 83 + js/src/jit-test/tests/ion/bug861419.js | 18 + js/src/jit-test/tests/ion/bug861439.js | 14 + js/src/jit-test/tests/ion/bug862100.js | 14 + js/src/jit-test/tests/ion/bug862357.js | 22 + js/src/jit-test/tests/ion/bug863261.js | 12 + js/src/jit-test/tests/ion/bug863755.js | 20 + js/src/jit-test/tests/ion/bug866611.js | 5 + js/src/jit-test/tests/ion/bug867820.js | 18 + js/src/jit-test/tests/ion/bug870328.js | 7 + js/src/jit-test/tests/ion/bug870356.js | 33 + js/src/jit-test/tests/ion/bug872331.js | 10 + js/src/jit-test/tests/ion/bug875452.js | 26 + js/src/jit-test/tests/ion/bug875656.js | 2 + js/src/jit-test/tests/ion/bug875804.js | 11 + js/src/jit-test/tests/ion/bug876465.js | 20 + js/src/jit-test/tests/ion/bug877936-2.js | 5 + js/src/jit-test/tests/ion/bug877936.js | 44 + js/src/jit-test/tests/ion/bug878444.js | 26 + js/src/jit-test/tests/ion/bug878510.js | 20 + js/src/jit-test/tests/ion/bug882323.js | 23 + js/src/jit-test/tests/ion/bug882565-1.js | 21 + js/src/jit-test/tests/ion/bug882565.js | 4 + js/src/jit-test/tests/ion/bug883490.js | 33 + js/src/jit-test/tests/ion/bug885660.js | 23 + js/src/jit-test/tests/ion/bug886243.js | 9 + js/src/jit-test/tests/ion/bug886246.js | 11 + js/src/jit-test/tests/ion/bug888568.js | 5 + js/src/jit-test/tests/ion/bug889186.js | 6 + js/src/jit-test/tests/ion/bug889451.js | 18 + js/src/jit-test/tests/ion/bug890722.js | 29 + js/src/jit-test/tests/ion/bug892426.js | 9 + js/src/jit-test/tests/ion/bug892794.js | 13 + js/src/jit-test/tests/ion/bug893732.js | 14 + js/src/jit-test/tests/ion/bug893853.js | 9 + js/src/jit-test/tests/ion/bug894786-2.js | 91 + js/src/jit-test/tests/ion/bug894786.js | 9 + js/src/jit-test/tests/ion/bug894794.js | 7 + js/src/jit-test/tests/ion/bug897747.js | 6 + js/src/jit-test/tests/ion/bug898047.js | 23 + js/src/jit-test/tests/ion/bug898857.js | 6 + js/src/jit-test/tests/ion/bug901086.js | 15 + js/src/jit-test/tests/ion/bug901391.js | 4 + js/src/jit-test/tests/ion/bug904315.js | 15 + js/src/jit-test/tests/ion/bug905166.js | 9 + js/src/jit-test/tests/ion/bug905986.js | 4 + js/src/jit-test/tests/ion/bug905999.js | 11 + js/src/jit-test/tests/ion/bug906035.js | 9 + js/src/jit-test/tests/ion/bug906284.js | 15 + js/src/jit-test/tests/ion/bug908903.js | 54 + js/src/jit-test/tests/ion/bug909401.js | 26 + js/src/jit-test/tests/ion/bug909505.js | 5 + js/src/jit-test/tests/ion/bug909601.js | 10 + js/src/jit-test/tests/ion/bug909997.js | 42 + js/src/jit-test/tests/ion/bug911369.js | 14 + js/src/jit-test/tests/ion/bug911707.js | 5 + js/src/jit-test/tests/ion/bug912152.js | 7 + js/src/jit-test/tests/ion/bug913749.js | 33 + js/src/jit-test/tests/ion/bug914098.js | 16 + js/src/jit-test/tests/ion/bug914341.js | 5 + js/src/jit-test/tests/ion/bug915301.js | 23 + js/src/jit-test/tests/ion/bug915608.js | 8 + js/src/jit-test/tests/ion/bug915903.js | 10 + js/src/jit-test/tests/ion/bug916712.js | 7 + js/src/jit-test/tests/ion/bug916752.js | 20 + js/src/jit-test/tests/ion/bug919118.js | 13 + js/src/jit-test/tests/ion/bug921035.js | 14 + js/src/jit-test/tests/ion/bug922118.js | 30 + js/src/jit-test/tests/ion/bug924538.js | 9 + js/src/jit-test/tests/ion/bug925067-1.js | 25 + js/src/jit-test/tests/ion/bug925067-2.js | 16 + js/src/jit-test/tests/ion/bug925067-3.js | 20 + js/src/jit-test/tests/ion/bug925305.js | 14 + js/src/jit-test/tests/ion/bug925308.js | 18 + js/src/jit-test/tests/ion/bug927389.js | 4 + js/src/jit-test/tests/ion/bug928423.js | 14 + js/src/jit-test/tests/ion/bug928542.js | 10 + js/src/jit-test/tests/ion/bug928625.js | 3 + js/src/jit-test/tests/ion/bug930327.js | 12 + js/src/jit-test/tests/ion/bug930990.js | 8 + js/src/jit-test/tests/ion/bug930993.js | 6 + js/src/jit-test/tests/ion/bug931496.js | 11 + js/src/jit-test/tests/ion/bug936740.js | 26 + js/src/jit-test/tests/ion/bug939868-2.js | 47 + js/src/jit-test/tests/ion/bug939868.js | 3 + js/src/jit-test/tests/ion/bug940635.js | 7 + js/src/jit-test/tests/ion/bug940846.js | 15 + js/src/jit-test/tests/ion/bug942550.js | 6 + js/src/jit-test/tests/ion/bug942604.js | 11 + js/src/jit-test/tests/ion/bug944080.js | 17 + js/src/jit-test/tests/ion/bug945294.js | 22 + js/src/jit-test/tests/ion/bug945512.js | 12 + js/src/jit-test/tests/ion/bug945811.js | 17 + js/src/jit-test/tests/ion/bug946284.js | 5 + js/src/jit-test/tests/ion/bug946969.js | 6 + js/src/jit-test/tests/ion/bug950462.js | 2 + js/src/jit-test/tests/ion/bug950764.js | 19 + js/src/jit-test/tests/ion/bug953164.js | 20 + js/src/jit-test/tests/ion/bug956156.js | 7 + js/src/jit-test/tests/ion/bug958381.js | 4 + js/src/jit-test/tests/ion/bug958432.js | 27 + js/src/jit-test/tests/ion/bug964229-2.js | 58 + js/src/jit-test/tests/ion/bug964229.js | 26 + js/src/jit-test/tests/ion/bug965712.js | 2 + js/src/jit-test/tests/ion/bug966926.js | 12 + js/src/jit-test/tests/ion/bug969203.js | 4 + js/src/jit-test/tests/ion/bug973118.js | 4 + js/src/jit-test/tests/ion/bug975290.js | 6 + js/src/jit-test/tests/ion/bug976110.js | 91 + js/src/jit-test/tests/ion/bug977966.js | 125 + js/src/jit-test/tests/ion/bug980119.js | 9 + js/src/jit-test/tests/ion/bug981325.js | 7 + js/src/jit-test/tests/ion/bug984018.js | 62 + js/src/jit-test/tests/ion/bug984830.js | 16 + js/src/jit-test/tests/ion/bug989586.js | 15 + js/src/jit-test/tests/ion/bug991457.js | 64 + js/src/jit-test/tests/ion/bug994016.js | 48 + js/src/jit-test/tests/ion/bug995673.js | 16 + js/src/jit-test/tests/ion/bug995675.js | 5 + js/src/jit-test/tests/ion/bug995817.js | 17 + js/src/jit-test/tests/ion/bug995826.js | 5 + js/src/jit-test/tests/ion/bug998059.js | 25 + js/src/jit-test/tests/ion/call-generic-args.js | 33 + js/src/jit-test/tests/ion/call-generic-bound.js | 34 + .../jit-test/tests/ion/call-generic-constructor.js | 21 + .../jit-test/tests/ion/call-generic-cross-realm.js | 40 + js/src/jit-test/tests/ion/call-generic-fun-call.js | 20 + js/src/jit-test/tests/ion/call-generic-methods.js | 24 + .../jit-test/tests/ion/call-generic-new-target.js | 26 + js/src/jit-test/tests/ion/call-generic-throw-2.js | 35 + js/src/jit-test/tests/ion/call-generic-throw.js | 41 + js/src/jit-test/tests/ion/callTypeBarriers.js | 25 + js/src/jit-test/tests/ion/callgname.js | 43 + js/src/jit-test/tests/ion/callobj-tdz.js | 14 + js/src/jit-test/tests/ion/ceil.js | 65 + js/src/jit-test/tests/ion/close-iterators-1.js | 11 + js/src/jit-test/tests/ion/compare-char.js | 189 + js/src/jit-test/tests/ion/compare-string.js | 131 + js/src/jit-test/tests/ion/compareAll.js | 279 + js/src/jit-test/tests/ion/condswitch.js | 104 + js/src/jit-test/tests/ion/context-override.js | 2 + .../jit-test/tests/ion/dce-with-rinstructions.js | 2205 + .../jit-test/tests/ion/dense-elem-write-barrier.js | 22 + js/src/jit-test/tests/ion/directEval.js | 10 + .../tests/ion/div-by-constant-bug1555153.js | 5 + js/src/jit-test/tests/ion/divmodself.js | 664 + js/src/jit-test/tests/ion/double-array-loop-phi.js | 11 + js/src/jit-test/tests/ion/doubleArrays.js | 51 + js/src/jit-test/tests/ion/doubleComparisons.js | 88 + .../jit-test/tests/ion/eliminate-type-barrier.js | 41 + .../jit-test/tests/ion/eliminate-unreachable-1.js | 32 + .../jit-test/tests/ion/eliminate-unreachable-2.js | 28 + js/src/jit-test/tests/ion/entryOverflowBailout.js | 220 + js/src/jit-test/tests/ion/eval-neg0.js | 6 + js/src/jit-test/tests/ion/evalCallingName.js | 43 + .../jit-test/tests/ion/exc-bailout-double-reg.js | 24 + .../jit-test/tests/ion/exc-bailout-float32-reg.js | 24 + js/src/jit-test/tests/ion/expando-realloc-slots.js | 28 + js/src/jit-test/tests/ion/filtertypeset-float32.js | 6 + js/src/jit-test/tests/ion/fold-in.js | 44 + .../tests/ion/fold-linear-arith-bug1316830.js | 9 + .../tests/ion/fold-linear-arith-bug1319242.js | 7 + .../tests/ion/fold-linear-arith-bug1528829.js | 18 + .../tests/ion/fold-needless-control-flow.js | 13 + js/src/jit-test/tests/ion/for-in-iterator-1.js | 29 + .../tests/ion/fromcharcode-charcodeat-zero.js | 82 + js/src/jit-test/tests/ion/gc-during-bailout.js | 158 + .../jit-test/tests/ion/getPropertyCacheOverflow.js | 37 + .../jit-test/tests/ion/getelem-bounds-coalesce.js | 49 + js/src/jit-test/tests/ion/getelem-bounds-hoist.js | 83 + js/src/jit-test/tests/ion/getelem-hole.js | 15 + js/src/jit-test/tests/ion/getelem-proto.js | 18 + js/src/jit-test/tests/ion/getelem-string.js | 11 + js/src/jit-test/tests/ion/getelem.js | 77 + js/src/jit-test/tests/ion/getgname-getter.js | 8 + js/src/jit-test/tests/ion/getgname.js | 37 + js/src/jit-test/tests/ion/getprop-cache.js | 28 + js/src/jit-test/tests/ion/getprop-constant.js | 20 + .../tests/ion/getprop-idempotent-cache-1.js | 17 + .../tests/ion/getprop-idempotent-cache-2.js | 21 + js/src/jit-test/tests/ion/getprop-primitive.js | 59 + .../tests/ion/gvn-unremovable-phi-bug1317675.js | 18 + js/src/jit-test/tests/ion/has-definite-folding.js | 32 + js/src/jit-test/tests/ion/hasOwn-megamorphic.js | 32 + js/src/jit-test/tests/ion/hole.js | 11 + js/src/jit-test/tests/ion/ic-fuzz-0.js | 3 + js/src/jit-test/tests/ion/idempotentCache.js | 34 + js/src/jit-test/tests/ion/idiv-by-constant.js | 108 + js/src/jit-test/tests/ion/iloop.js | 4 + .../tests/ion/inline-Math-random-before-called.js | 11 + js/src/jit-test/tests/ion/inline-doubles.js | 33 + js/src/jit-test/tests/ion/inlining/array-pop.js | 17 + js/src/jit-test/tests/ion/inlining/array-push.js | 37 + js/src/jit-test/tests/ion/inlining/bug705251.js | 10 + .../ion/inlining/call-apply-non-singletons.js | 22 + .../inlining/exception-during-inlining-decision.js | 115 + .../tests/ion/inlining/getelem-getter-bailout.js | 48 + .../tests/ion/inlining/getelem-getter-frameiter.js | 48 + .../ion/inlining/getelem-getter-id-mismatch.js | 113 + .../ion/inlining/getelem-getter-megamorphic.js | 79 + .../ion/inlining/getelem-getter-noninlined-call.js | 52 + .../tests/ion/inlining/getelem-getter-own.js | 51 + .../tests/ion/inlining/getelem-getter-proto.js | 55 + .../ion/inlining/inline-callarg-bailout-phi.js | 29 + .../tests/ion/inlining/inline-callarg-bailout.js | 26 + .../inlining/inline-callarg-ubench-no-double2.js | 27 + .../tests/ion/inlining/inline-getelem-args.js | 59 + .../inline-istypedarray-on-nontypedarray.js | 6 + .../jit-test/tests/ion/inlining/isFiniteInline.js | 15 + js/src/jit-test/tests/ion/inlining/isNaNInline.js | 15 + .../tests/ion/inlining/object-is-stricteq.js | 143 + .../typedarray-data-inlining-neuter-samedata.js | 28 + .../tests/ion/inlining/typedarray-large-length.js | 10 + .../inlining/typedarray-length-inlining-neuter.js | 22 + .../jit-test/tests/ion/instanceof-mutate-proto.js | 13 + .../tests/ion/invalidation/easy-invalidate.js | 5 + .../tests/ion/invalidation/framedescriptors.js | 40 + .../jit-test/tests/ion/invalidation/outofline.js | 22 + .../tests/ion/invalidation/recursive-invalidate.js | 21 + js/src/jit-test/tests/ion/is-constructing.js | 62 + js/src/jit-test/tests/ion/isArray.js | 47 + js/src/jit-test/tests/ion/iterator-indices-1.js | 25 + js/src/jit-test/tests/ion/iterator-indices-2.js | 23 + js/src/jit-test/tests/ion/iterator-indices-3.js | 31 + js/src/jit-test/tests/ion/iterator-indices-4.js | 19 + js/src/jit-test/tests/ion/iterator-indices-5.js | 30 + js/src/jit-test/tests/ion/iterator-indices-6.js | 28 + js/src/jit-test/tests/ion/iterator-indices-7.js | 25 + js/src/jit-test/tests/ion/iterator-indices-8.js | 32 + js/src/jit-test/tests/ion/iterator-indices-9.js | 34 + js/src/jit-test/tests/ion/known-class.js | 121 + js/src/jit-test/tests/ion/lambda.js | 25 + js/src/jit-test/tests/ion/lazyLink-bug1150783.js | 34 + js/src/jit-test/tests/ion/lexical-check-1.js | 15 + js/src/jit-test/tests/ion/lexical-check-2.js | 22 + js/src/jit-test/tests/ion/lexical-check-3.js | 26 + js/src/jit-test/tests/ion/lexical-check-4.js | 15 + js/src/jit-test/tests/ion/lexical-check-5.js | 7 + js/src/jit-test/tests/ion/lexical-check-6.js | 39 + js/src/jit-test/tests/ion/lookupswitch.js | 3974 + js/src/jit-test/tests/ion/loop-test-fold.js | 7 + js/src/jit-test/tests/ion/lsra-bug1112164.js | 36 + js/src/jit-test/tests/ion/math-imul-folding.js | 7 + js/src/jit-test/tests/ion/math-max-arraylength.js | 25 + js/src/jit-test/tests/ion/mathFloor.js | 50 + js/src/jit-test/tests/ion/mathMinMax.js | 42 + js/src/jit-test/tests/ion/mathRound.js | 48 + js/src/jit-test/tests/ion/mathSign.js | 75 + js/src/jit-test/tests/ion/mathTrunc.js | 76 + .../tests/ion/megamorphic-null-and-undefined.js | 18 + .../jit-test/tests/ion/merge-phi-usage-analysis.js | 63 + js/src/jit-test/tests/ion/mod-double.js | 13 + js/src/jit-test/tests/ion/monomorphic-inlining.js | 42 + .../tests/ion/monomorphic-property-access.js | 38 + .../tests/ion/muli-constant-1-bug1534810.js | 15 + js/src/jit-test/tests/ion/nativeElementAccesses.js | 44 + js/src/jit-test/tests/ion/new-0.js | 16 + js/src/jit-test/tests/ion/new-1.js | 15 + js/src/jit-test/tests/ion/new-10.js | 15 + js/src/jit-test/tests/ion/new-2.js | 13 + js/src/jit-test/tests/ion/new-3.js | 18 + js/src/jit-test/tests/ion/new-4.js | 21 + js/src/jit-test/tests/ion/new-5.js | 15 + js/src/jit-test/tests/ion/new-6.js | 18 + js/src/jit-test/tests/ion/new-7.js | 32 + js/src/jit-test/tests/ion/new-8.js | 21 + js/src/jit-test/tests/ion/new-9.js | 27 + .../tests/ion/new-object-with-dynamic-slots.js | 35 + js/src/jit-test/tests/ion/notV.js | 32 + js/src/jit-test/tests/ion/nursery-getter-setter.js | 17 + .../jit-test/tests/ion/nursery-getter-setter2.js | 11 + ...ject-create-with-primitive-second-arg-in-ion.js | 8 + js/src/jit-test/tests/ion/object-create.js | 25 + js/src/jit-test/tests/ion/object-keys-00.js | 31 + js/src/jit-test/tests/ion/object-keys-01.js | 36 + js/src/jit-test/tests/ion/object-keys-02.js | 54 + js/src/jit-test/tests/ion/object-keys-03.js | 60 + js/src/jit-test/tests/ion/object-keys-04.js | 208 + js/src/jit-test/tests/ion/object-keys-05.js | 49 + .../tests/ion/object-prototype-tostring.js | 45 + .../jit-test/tests/ion/osr-with-optimized-out.js | 22 + js/src/jit-test/tests/ion/pgo-bug1252120.js | 14 + js/src/jit-test/tests/ion/pgo-bug1259476.js | 16 + js/src/jit-test/tests/ion/popn.js | 11 + .../tests/ion/pow-base-power-of-two-bailouts.js | 85 + js/src/jit-test/tests/ion/pow-base-power-of-two.js | 75 + js/src/jit-test/tests/ion/pow-constant-power.js | 68 + .../tests/ion/range-analysis-bug1122402.js | 11 + .../tests/ion/range-analysis-bug1124448.js | 8 + js/src/jit-test/tests/ion/range-analysis.js | 35 + js/src/jit-test/tests/ion/recover-arguments.js | 26 + js/src/jit-test/tests/ion/recover-arrays.js | 332 + js/src/jit-test/tests/ion/recover-autounsafe-2.js | 20 + js/src/jit-test/tests/ion/recover-autounsafe.js | 36 + js/src/jit-test/tests/ion/recover-bigint.js | 265 + js/src/jit-test/tests/ion/recover-bug1236114.js | 5 + .../jit-test/tests/ion/recover-empty-new-object.js | 35 + .../tests/ion/recover-inline-arguments-debugger.js | 32 + .../jit-test/tests/ion/recover-inline-arguments.js | 38 + js/src/jit-test/tests/ion/recover-inline-rest.js | 103 + .../tests/ion/recover-lambdas-bug1113940.js | 37 + .../tests/ion/recover-lambdas-bug1114566.js | 2 + .../tests/ion/recover-lambdas-bug1118911.js | 10 + .../tests/ion/recover-lambdas-bug1133389.js | 17 + js/src/jit-test/tests/ion/recover-lambdas.js | 62 + .../tests/ion/recover-newarrayiterator-close.js | 15 + .../jit-test/tests/ion/recover-newarrayiterator.js | 66 + .../tests/ion/recover-newstringiterator.js | 66 + .../tests/ion/recover-object-bug1174322.js | 13 + .../tests/ion/recover-object-bug1175233.js | 51 + js/src/jit-test/tests/ion/recover-objects.js | 224 + js/src/jit-test/tests/ion/recover-rest-osr.js | 28 + js/src/jit-test/tests/ion/recover-rest.js | 340 + js/src/jit-test/tests/ion/recover-typed-array.js | 13 + js/src/jit-test/tests/ion/regexp-clone.js | 8 + js/src/jit-test/tests/ion/regexp-exec.js | 20 + js/src/jit-test/tests/ion/result-type-mutated.js | 18 + js/src/jit-test/tests/ion/rinstructions-no-sse4.js | 53 + js/src/jit-test/tests/ion/round-float32.js | 103 + .../jit-test/tests/ion/scalar-replacement-oom.js | 22 + .../jit-test/tests/ion/scripted-getter-setter.js | 59 + .../jit-test/tests/ion/selfhosted-too-many-args.js | 14 + .../tests/ion/setelem-float32-typedarray-ic.js | 23 + js/src/jit-test/tests/ion/setelem-hole.js | 68 + js/src/jit-test/tests/ion/setelem-proto.js | 26 + js/src/jit-test/tests/ion/setelem.js | 109 + js/src/jit-test/tests/ion/setgname-reconfigured.js | 6 + js/src/jit-test/tests/ion/setgname.js | 56 + .../tests/ion/setpropertypolymorphic-float32.js | 24 + .../tests/ion/sincos-abi-args-bug1534492.js | 6 + .../jit-test/tests/ion/sink-in-recovered-object.js | 19 + .../tests/ion/smallObjectVariableKeyHasProp-1.js | 27 + .../tests/ion/smallObjectVariableKeyHasProp-2.js | 34 + .../tests/ion/smallObjectVariableKeyHasProp-3.js | 34 + .../ion/spreadcall-not-optimized-dynamic-1.js | 44 + .../ion/spreadcall-not-optimized-dynamic-2a.js | 37 + .../ion/spreadcall-not-optimized-dynamic-2b.js | 37 + .../ion/spreadcall-not-optimized-dynamic-3.js | 40 + .../ion/spreadcall-not-optimized-dynamic-4a.js | 43 + .../ion/spreadcall-not-optimized-dynamic-4b.js | 39 + .../ion/spreadcall-not-optimized-dynamic-5a.js | 37 + .../ion/spreadcall-not-optimized-dynamic-5b.js | 40 + .../ion/spreadcall-not-optimized-dynamic-6a.js | 38 + .../ion/spreadcall-not-optimized-dynamic-6b.js | 45 + .../tests/ion/spreadcall-not-optimized-static-1.js | 33 + .../ion/spreadcall-not-optimized-static-2a.js | 27 + .../ion/spreadcall-not-optimized-static-2b.js | 27 + .../tests/ion/spreadcall-not-optimized-static-3.js | 30 + .../ion/spreadcall-not-optimized-static-4a.js | 32 + .../ion/spreadcall-not-optimized-static-4b.js | 28 + .../ion/spreadcall-not-optimized-static-5a.js | 27 + .../ion/spreadcall-not-optimized-static-5b.js | 30 + .../ion/spreadcall-not-optimized-static-6a.js | 28 + .../ion/spreadcall-not-optimized-static-6b.js | 35 + .../tests/ion/stack-alignment-bug1126375.js | 7 + js/src/jit-test/tests/ion/stack-alignment.js | 166 + js/src/jit-test/tests/ion/string-compare.js | 9 + js/src/jit-test/tests/ion/string-concat-short.js | 13 + .../jit-test/tests/ion/super-getelem-profiling.js | 12 + js/src/jit-test/tests/ion/super-prop.js | 87 + .../tests/ion/template-tag-callsiteobject.js | 26 + .../tests/ion/test-scalar-replacement-float32.js | 98 + .../tests/ion/testArrayBufferByteLength.js | 20 + .../jit-test/tests/ion/testFloat32-correctness.js | 340 + js/src/jit-test/tests/ion/testFloat32.js | 532 + js/src/jit-test/tests/ion/testInArray.js | 41 + js/src/jit-test/tests/ion/testIsCallable.js | 134 + .../jit-test/tests/ion/testObjectHasPrototype.js | 63 + js/src/jit-test/tests/ion/testPos.js | 32 + .../testPossiblyWrappedArrayBufferByteLength.js | 41 + .../jit-test/tests/ion/testStringFromCodePoint.js | 32 + js/src/jit-test/tests/ion/testStringMatch.js | 71 + js/src/jit-test/tests/ion/testSubtract.js | 20 + js/src/jit-test/tests/ion/testVAndBranch.js | 20 + js/src/jit-test/tests/ion/throw.js | 112 + js/src/jit-test/tests/ion/timeout-iloop.js | 6 + js/src/jit-test/tests/ion/toid.js | 10 + js/src/jit-test/tests/ion/truncate.js | 28 + js/src/jit-test/tests/ion/truncateToInt32-ool.js | 28 + js/src/jit-test/tests/ion/truncateToInt32.js | 46 + js/src/jit-test/tests/ion/try-catch-1.js | 12 + js/src/jit-test/tests/ion/try-catch-2.js | 14 + js/src/jit-test/tests/ion/try-catch-3.js | 27 + js/src/jit-test/tests/ion/try-catch-4.js | 15 + js/src/jit-test/tests/ion/try-catch-5.js | 8 + js/src/jit-test/tests/ion/try-catch-6.js | 14 + js/src/jit-test/tests/ion/try-catch-7.js | 10 + js/src/jit-test/tests/ion/typed-arrays-1.js | 101 + js/src/jit-test/tests/ion/typed-arrays-2.js | 18 + js/src/jit-test/tests/ion/typed-arrays-3.js | 65 + js/src/jit-test/tests/ion/typedarray-length.js | 24 + .../jit-test/tests/ion/typedarray-static-load.js | 12 + .../jit-test/tests/ion/typedarray-static-store.js | 12 + ...rayindex-const-double-representable-as-int32.js | 19 + js/src/jit-test/tests/ion/typeof.js | 16 + js/src/jit-test/tests/ion/udiv-by-constant.js | 114 + js/src/jit-test/tests/ion/udiv-by-u32-constant.js | 110 + .../tests/ion/unboxed-objects-invalidate.js | 16 + js/src/jit-test/tests/ion/ursh-sign-bug1528597.js | 8 + js/src/jit-test/tests/ion/valueToInt32.js | 41 + js/src/jit-test/tests/ion/void.js | 6 + .../jit-test/tests/jaeger/argumentsOptimize-1.js | 14 + .../jit-test/tests/jaeger/argumentsOptimize-2.js | 27 + js/src/jit-test/tests/jaeger/bug549393-1.js | 43 + js/src/jit-test/tests/jaeger/bug549393-2.js | 10 + js/src/jit-test/tests/jaeger/bug549396.js | 1 + js/src/jit-test/tests/jaeger/bug549398.js | 10 + js/src/jit-test/tests/jaeger/bug549521.js | 13 + js/src/jit-test/tests/jaeger/bug549602.js | 30 + js/src/jit-test/tests/jaeger/bug549603.js | 3 + js/src/jit-test/tests/jaeger/bug550490.js | 14 + js/src/jit-test/tests/jaeger/bug551603.js | 8 + js/src/jit-test/tests/jaeger/bug553784.js | 18 + js/src/jit-test/tests/jaeger/bug554580-3.js | 11 + js/src/jit-test/tests/jaeger/bug554580-5.js | 20 + js/src/jit-test/tests/jaeger/bug554651.js | 15 + js/src/jit-test/tests/jaeger/bug554675-1.js | 8 + js/src/jit-test/tests/jaeger/bug555155.js | 12 + js/src/jit-test/tests/jaeger/bug555206.js | 4 + js/src/jit-test/tests/jaeger/bug557070.js | 6 + js/src/jit-test/tests/jaeger/bug557075.js | 8 + js/src/jit-test/tests/jaeger/bug560221.js | 13 + .../tests/jaeger/bug563000/eif-call-newvar.js | 12 + .../tests/jaeger/bug563000/eif-call-typechange.js | 11 + js/src/jit-test/tests/jaeger/bug563000/eif-call.js | 11 + .../tests/jaeger/bug563000/eif-getter-newvar.js | 9 + .../jaeger/bug563000/eif-getter-typechange.js | 9 + .../jit-test/tests/jaeger/bug563000/eif-getter.js | 9 + .../tests/jaeger/bug563000/eif-global-newvar.js | 7 + js/src/jit-test/tests/jaeger/bug565198.js | 6 + js/src/jit-test/tests/jaeger/bug566022.js | 8 + js/src/jit-test/tests/jaeger/bug573433.js | 7 + js/src/jit-test/tests/jaeger/bug576398.js | 10 + js/src/jit-test/tests/jaeger/bug577580.js | 7 + js/src/jit-test/tests/jaeger/bug577646.js | 5 + js/src/jit-test/tests/jaeger/bug577705.js | 65 + js/src/jit-test/tests/jaeger/bug580712.js | 1 + js/src/jit-test/tests/jaeger/bug580884-3.js | 10 + js/src/jit-test/tests/jaeger/bug580884.js | 8 + js/src/jit-test/tests/jaeger/bug580931-2.js | 4 + js/src/jit-test/tests/jaeger/bug581871.js | 10 + js/src/jit-test/tests/jaeger/bug581936.js | 12 + js/src/jit-test/tests/jaeger/bug582185.js | 3 + js/src/jit-test/tests/jaeger/bug582286.js | 3 + js/src/jit-test/tests/jaeger/bug582392.js | 8 + js/src/jit-test/tests/jaeger/bug582880.js | 8 + js/src/jit-test/tests/jaeger/bug582882.js | 11 + js/src/jit-test/tests/jaeger/bug582884.js | 7 + js/src/jit-test/tests/jaeger/bug582897.js | 7 + js/src/jit-test/tests/jaeger/bug582898.js | 7 + js/src/jit-test/tests/jaeger/bug582900.js | 3 + js/src/jit-test/tests/jaeger/bug583158.js | 9 + js/src/jit-test/tests/jaeger/bug583160.js | 10 + js/src/jit-test/tests/jaeger/bug583672.js | 30 + js/src/jit-test/tests/jaeger/bug583688.js | 10 + js/src/jit-test/tests/jaeger/bug583689.js | 7 + js/src/jit-test/tests/jaeger/bug584646.js | 7 + js/src/jit-test/tests/jaeger/bug584647.js | 2 + js/src/jit-test/tests/jaeger/bug585341.js | 6 + js/src/jit-test/tests/jaeger/bug585391.js | 11 + js/src/jit-test/tests/jaeger/bug585408-2.js | 6 + js/src/jit-test/tests/jaeger/bug585408-3.js | 7 + js/src/jit-test/tests/jaeger/bug585408.js | 7 + js/src/jit-test/tests/jaeger/bug585540.js | 13 + js/src/jit-test/tests/jaeger/bug587431.js | 29 + js/src/jit-test/tests/jaeger/bug588338.js | 15 + js/src/jit-test/tests/jaeger/bug588362-1.js | 8 + js/src/jit-test/tests/jaeger/bug588362-2.js | 10 + js/src/jit-test/tests/jaeger/bug588362-3.js | 10 + js/src/jit-test/tests/jaeger/bug588363-1.js | 6 + js/src/jit-test/tests/jaeger/bug588363-2.js | 7 + js/src/jit-test/tests/jaeger/bug589108.js | 10 + js/src/jit-test/tests/jaeger/bug589461.js | 7 + js/src/jit-test/tests/jaeger/bug590083.js | 11 + js/src/jit-test/tests/jaeger/bug591606.js | 5 + js/src/jit-test/tests/jaeger/bug592973-1.js | 12 + js/src/jit-test/tests/jaeger/bug592973-2.js | 7 + js/src/jit-test/tests/jaeger/bug592973-3.js | 8 + js/src/jit-test/tests/jaeger/bug593554.js | 8 + js/src/jit-test/tests/jaeger/bug595917.js | 4 + js/src/jit-test/tests/jaeger/bug597378.js | 12 + js/src/jit-test/tests/jaeger/bug598696.js | 6 + js/src/jit-test/tests/jaeger/bug599488.js | 9 + js/src/jit-test/tests/jaeger/bug600139.js | 10 + js/src/jit-test/tests/jaeger/bug600419.js | 5 + js/src/jit-test/tests/jaeger/bug600424.js | 14 + js/src/jit-test/tests/jaeger/bug601982.js | 33 + js/src/jit-test/tests/jaeger/bug604381.js | 14 + js/src/jit-test/tests/jaeger/bug604427.js | 6 + js/src/jit-test/tests/jaeger/bug606662-2.js | 5 + js/src/jit-test/tests/jaeger/bug606829.js | 8 + js/src/jit-test/tests/jaeger/bug610652.js | 5 + js/src/jit-test/tests/jaeger/bug615440.js | 5 + js/src/jit-test/tests/jaeger/bug616508.js | 14 + js/src/jit-test/tests/jaeger/bug617433.js | 12 + js/src/jit-test/tests/jaeger/bug617440.js | 11 + js/src/jit-test/tests/jaeger/bug617458.js | 6 + js/src/jit-test/tests/jaeger/bug617460.js | 10 + js/src/jit-test/tests/jaeger/bug617549.js | 9 + js/src/jit-test/tests/jaeger/bug617558.js | 7 + js/src/jit-test/tests/jaeger/bug617624.js | 7 + js/src/jit-test/tests/jaeger/bug618007.js | 31 + js/src/jit-test/tests/jaeger/bug618849.js | 11 + js/src/jit-test/tests/jaeger/bug618850.js | 6 + js/src/jit-test/tests/jaeger/bug618863.js | 23 + js/src/jit-test/tests/jaeger/bug619339.js | 3 + js/src/jit-test/tests/jaeger/bug619433-1.js | 22 + js/src/jit-test/tests/jaeger/bug619433-2.js | 10 + js/src/jit-test/tests/jaeger/bug620643.js | 1 + js/src/jit-test/tests/jaeger/bug621522.js | 14 + js/src/jit-test/tests/jaeger/bug621655.js | 10 + js/src/jit-test/tests/jaeger/bug624100.js | 2 + js/src/jit-test/tests/jaeger/bug624483.js | 5 + js/src/jit-test/tests/jaeger/bug625157.js | 16 + js/src/jit-test/tests/jaeger/bug625377.js | 13 + js/src/jit-test/tests/jaeger/bug625718-1.js | 12 + js/src/jit-test/tests/jaeger/bug625718-2.js | 14 + js/src/jit-test/tests/jaeger/bug625718-3.js | 52 + js/src/jit-test/tests/jaeger/bug625757.js | 4 + js/src/jit-test/tests/jaeger/bug627486.js | 23 + js/src/jit-test/tests/jaeger/bug639459.js | 6 + js/src/jit-test/tests/jaeger/bug639478-1.js | 5 + js/src/jit-test/tests/jaeger/bug639478-2.js | 12 + js/src/jit-test/tests/jaeger/bug639587.js | 8 + js/src/jit-test/tests/jaeger/bug639792.js | 8 + js/src/jit-test/tests/jaeger/bug639808.js | 16 + js/src/jit-test/tests/jaeger/bug640098.js | 15 + js/src/jit-test/tests/jaeger/bug640102.js | 3 + js/src/jit-test/tests/jaeger/bug640614.js | 5 + js/src/jit-test/tests/jaeger/bug642198.js | 9 + js/src/jit-test/tests/jaeger/bug643653-1.js | 10 + js/src/jit-test/tests/jaeger/bug643653-2.js | 58 + js/src/jit-test/tests/jaeger/bug643805.js | 50 + js/src/jit-test/tests/jaeger/bug643829.js | 12 + js/src/jit-test/tests/jaeger/bug643913.js | 8 + js/src/jit-test/tests/jaeger/bug645629.js | 8 + js/src/jit-test/tests/jaeger/bug645657.js | 8 + js/src/jit-test/tests/jaeger/bug645985.js | 5 + js/src/jit-test/tests/jaeger/bug646001.js | 12 + js/src/jit-test/tests/jaeger/bug646060.js | 8 + js/src/jit-test/tests/jaeger/bug646411.js | 12 + js/src/jit-test/tests/jaeger/bug646495.js | 6 + js/src/jit-test/tests/jaeger/bug646938.js | 21 + js/src/jit-test/tests/jaeger/bug647440.js | 7 + js/src/jit-test/tests/jaeger/bug647657.js | 1 + js/src/jit-test/tests/jaeger/bug647785.js | 4 + js/src/jit-test/tests/jaeger/bug648004.js | 4 + js/src/jit-test/tests/jaeger/bug648230-1.js | 13 + js/src/jit-test/tests/jaeger/bug648230-2.js | 14 + js/src/jit-test/tests/jaeger/bug648498.js | 5 + js/src/jit-test/tests/jaeger/bug648708.js | 6 + js/src/jit-test/tests/jaeger/bug649272.js | 4 + js/src/jit-test/tests/jaeger/bug649593.js | 10 + js/src/jit-test/tests/jaeger/bug649689.js | 6 + js/src/jit-test/tests/jaeger/bug649775.js | 17 + js/src/jit-test/tests/jaeger/bug649824.js | 6 + js/src/jit-test/tests/jaeger/bug649973.js | 2 + js/src/jit-test/tests/jaeger/bug650076.js | 13 + js/src/jit-test/tests/jaeger/bug650662.js | 6 + js/src/jit-test/tests/jaeger/bug650663.js | 15 + js/src/jit-test/tests/jaeger/bug651147.js | 7 + js/src/jit-test/tests/jaeger/bug652305.js | 25 + js/src/jit-test/tests/jaeger/bug652314.js | 7 + js/src/jit-test/tests/jaeger/bug652590.js | 5 + js/src/jit-test/tests/jaeger/bug653243.js | 12 + js/src/jit-test/tests/jaeger/bug653249.js | 13 + js/src/jit-test/tests/jaeger/bug653397.js | 16 + js/src/jit-test/tests/jaeger/bug655505.js | 15 + js/src/jit-test/tests/jaeger/bug655508.js | 15 + js/src/jit-test/tests/jaeger/bug655810.js | 6 + js/src/jit-test/tests/jaeger/bug655990.js | 12 + js/src/jit-test/tests/jaeger/bug656096.js | 37 + js/src/jit-test/tests/jaeger/bug656252.js | 14 + js/src/jit-test/tests/jaeger/bug656259.js | 11 + js/src/jit-test/tests/jaeger/bug656591.js | 9 + js/src/jit-test/tests/jaeger/bug656748.js | 8 + js/src/jit-test/tests/jaeger/bug656914.js | 23 + js/src/jit-test/tests/jaeger/bug657120.js | 6 + js/src/jit-test/tests/jaeger/bug657247.js | 5 + js/src/jit-test/tests/jaeger/bug657890.js | 6 + js/src/jit-test/tests/jaeger/bug658240.js | 11 + js/src/jit-test/tests/jaeger/bug658294.js | 15 + js/src/jit-test/tests/jaeger/bug658579.js | 5 + js/src/jit-test/tests/jaeger/bug658968.js | 13 + js/src/jit-test/tests/jaeger/bug659438.js | 8 + js/src/jit-test/tests/jaeger/bug659439.js | 16 + js/src/jit-test/tests/jaeger/bug659448.js | 9 + js/src/jit-test/tests/jaeger/bug659456.js | 12 + js/src/jit-test/tests/jaeger/bug660002.js | 4 + js/src/jit-test/tests/jaeger/bug662072.js | 7 + js/src/jit-test/tests/jaeger/bug662082.js | 11 + js/src/jit-test/tests/jaeger/bug663485.js | 17 + js/src/jit-test/tests/jaeger/bug663910.js | 22 + js/src/jit-test/tests/jaeger/bug669706.js | 14 + js/src/jit-test/tests/jaeger/bug670885.js | 16 + js/src/jit-test/tests/jaeger/bug672122.js | 3 + js/src/jit-test/tests/jaeger/bug678234.js | 10 + js/src/jit-test/tests/jaeger/bug678782.js | 9 + js/src/jit-test/tests/jaeger/bug679666.js | 22 + js/src/jit-test/tests/jaeger/bug680842.js | 27 + js/src/jit-test/tests/jaeger/bug681006.js | 10 + js/src/jit-test/tests/jaeger/bug682345.js | 16 + js/src/jit-test/tests/jaeger/bug684084-2.js | 8 + js/src/jit-test/tests/jaeger/bug684084.js | 7 + js/src/jit-test/tests/jaeger/bug684576.js | 10 + js/src/jit-test/tests/jaeger/bug684824.js | 7 + js/src/jit-test/tests/jaeger/bug684943.js | 7 + js/src/jit-test/tests/jaeger/bug687768.js | 17 + js/src/jit-test/tests/jaeger/bug693311.js | 8 + js/src/jit-test/tests/jaeger/bug704138.js | 21 + js/src/jit-test/tests/jaeger/bug705873.js | 7 + js/src/jit-test/tests/jaeger/bug706110.js | 18 + js/src/jit-test/tests/jaeger/bug707641.js | 7 + js/src/jit-test/tests/jaeger/bug709067.js | 11 + js/src/jit-test/tests/jaeger/bug710780.js | 12 + js/src/jit-test/tests/jaeger/bug714645.js | 12 + js/src/jit-test/tests/jaeger/bug719918.js | 17 + js/src/jit-test/tests/jaeger/bug732423.js | 22 + js/src/jit-test/tests/jaeger/bug735161.js | 4 + js/src/jit-test/tests/jaeger/bug738525.js | 37 + js/src/jit-test/tests/jaeger/bug742393.js | 11 + js/src/jit-test/tests/jaeger/bug751320.js | 22 + js/src/jit-test/tests/jaeger/bug767961.js | 6 + js/src/jit-test/tests/jaeger/bug768313.js | 6 + js/src/jit-test/tests/jaeger/bug769985.js | 19 + js/src/jit-test/tests/jaeger/bug771871.js | 7 + js/src/jit-test/tests/jaeger/bug781859-1.js | 25 + js/src/jit-test/tests/jaeger/bug781859-2.js | 8 + js/src/jit-test/tests/jaeger/bug781859-3.js | 9 + js/src/jit-test/tests/jaeger/bug819035.js | 38 + js/src/jit-test/tests/jaeger/bug825966.js | 18 + js/src/jit-test/tests/jaeger/chunk/bug712267.js | 14 + js/src/jit-test/tests/jaeger/clonefun.js | 17 + js/src/jit-test/tests/jaeger/closure-01.js | 18 + js/src/jit-test/tests/jaeger/closure-02.js | 14 + js/src/jit-test/tests/jaeger/closure-03.js | 15 + js/src/jit-test/tests/jaeger/closure-04.js | 30 + js/src/jit-test/tests/jaeger/closure-05.js | 17 + js/src/jit-test/tests/jaeger/compare-wrong-1.js | 4 + js/src/jit-test/tests/jaeger/crash-on-compare.js | 1 + .../tests/jaeger/deepBailAfterRunTracer.js | 25 + js/src/jit-test/tests/jaeger/floatTypedArrays.js | 64 + js/src/jit-test/tests/jaeger/fromCharCode.js | 8 + js/src/jit-test/tests/jaeger/fused-eq-ifeq.js | 6 + js/src/jit-test/tests/jaeger/getelem-sanity-1.js | 9 + js/src/jit-test/tests/jaeger/getelem-sanity-2.js | 22 + js/src/jit-test/tests/jaeger/getelem-sanity-3.js | 22 + js/src/jit-test/tests/jaeger/getelem-sanity-4.js | 51 + js/src/jit-test/tests/jaeger/getelem-sanity-5.js | 4 + js/src/jit-test/tests/jaeger/getelem-sanity-6.js | 4 + js/src/jit-test/tests/jaeger/getelem-sanity-7.js | 10 + js/src/jit-test/tests/jaeger/getelem-sanity-8.js | 13 + .../jit-test/tests/jaeger/getelem-sanity-int-1.js | 7 + .../jit-test/tests/jaeger/getelem-sanity-int-2.js | 12 + .../jit-test/tests/jaeger/getelem-sanity-int-3.js | 19 + js/src/jit-test/tests/jaeger/getter-hook-1.js | 18 + js/src/jit-test/tests/jaeger/getter-hook-2.js | 19 + js/src/jit-test/tests/jaeger/globalOptimize-1.js | 5 + js/src/jit-test/tests/jaeger/globalOptimize-2.js | 10 + js/src/jit-test/tests/jaeger/globalOptimize-4.js | 8 + js/src/jit-test/tests/jaeger/in.js | 21 + js/src/jit-test/tests/jaeger/inline/bug645645.js | 4 + js/src/jit-test/tests/jaeger/inline/bug645666.js | 16 + js/src/jit-test/tests/jaeger/inline/bug646004.js | 9 + js/src/jit-test/tests/jaeger/inline/bug646480.js | 7 + js/src/jit-test/tests/jaeger/inline/bug647973.js | 11 + js/src/jit-test/tests/jaeger/inline/bug651209.js | 11 + js/src/jit-test/tests/jaeger/inline/bug655954.js | 5 + js/src/jit-test/tests/jaeger/inline/bug656221.js | 5 + js/src/jit-test/tests/jaeger/inline/bug676491.js | 14 + js/src/jit-test/tests/jaeger/inline/bug680759.js | 14 + js/src/jit-test/tests/jaeger/inline/doubleArg.js | 10 + js/src/jit-test/tests/jaeger/inline/mathAbs.js | 31 + js/src/jit-test/tests/jaeger/inline/mathFloor.js | 34 + js/src/jit-test/tests/jaeger/inline/mathPow.js | 35 + js/src/jit-test/tests/jaeger/inline/mathRound.js | 41 + js/src/jit-test/tests/jaeger/inline/mathSqrt.js | 29 + js/src/jit-test/tests/jaeger/inline/scripted-01.js | 17 + js/src/jit-test/tests/jaeger/inline/scripted-02.js | 22 + js/src/jit-test/tests/jaeger/inline/scripted-03.js | 14 + js/src/jit-test/tests/jaeger/inline/scripted-04.js | 12 + js/src/jit-test/tests/jaeger/inline/scripted-05.js | 13 + js/src/jit-test/tests/jaeger/inline/scripted-06.js | 17 + js/src/jit-test/tests/jaeger/inline/scripted-07.js | 15 + js/src/jit-test/tests/jaeger/inline/scripted-08.js | 21 + js/src/jit-test/tests/jaeger/inline/scripted-09.js | 19 + js/src/jit-test/tests/jaeger/inline/scripted-10.js | 13 + js/src/jit-test/tests/jaeger/inline/scripted-11.js | 12 + .../jit-test/tests/jaeger/inline/stringCharAt.js | 49 + .../tests/jaeger/inline/stringCharCodeAt.js | 47 + .../jit-test/tests/jaeger/inline/undefinedLocal.js | 19 + .../tests/jaeger/instanceOfWithKnownTypes.js | 13 + js/src/jit-test/tests/jaeger/invokeSessionGuard.js | 8 + js/src/jit-test/tests/jaeger/loops/bug651155.js | 6 + js/src/jit-test/tests/jaeger/loops/bug654393.js | 12 + js/src/jit-test/tests/jaeger/loops/bug655854.js | 8 + js/src/jit-test/tests/jaeger/loops/bug658290.js | 8 + js/src/jit-test/tests/jaeger/loops/bug659452.js | 5 + js/src/jit-test/tests/jaeger/loops/bug668643.js | 12 + js/src/jit-test/tests/jaeger/loops/bug671814.js | 12 + js/src/jit-test/tests/jaeger/loops/bug680809.js | 8 + js/src/jit-test/tests/jaeger/loops/bug684621.js | 15 + js/src/jit-test/tests/jaeger/loops/hoist-01.js | 35 + js/src/jit-test/tests/jaeger/loops/hoist-02.js | 12 + js/src/jit-test/tests/jaeger/loops/hoist-03.js | 12 + js/src/jit-test/tests/jaeger/loops/hoist-04.js | 18 + js/src/jit-test/tests/jaeger/loops/hoist-05.js | 19 + js/src/jit-test/tests/jaeger/loops/hoist-06.js | 14 + js/src/jit-test/tests/jaeger/loops/hoist-07.js | 17 + js/src/jit-test/tests/jaeger/loops/hoist-08.js | 7 + js/src/jit-test/tests/jaeger/loops/hoist-09.js | 11 + js/src/jit-test/tests/jaeger/loops/hoist-10.js | 39 + js/src/jit-test/tests/jaeger/loops/integer-1.js | 7 + js/src/jit-test/tests/jaeger/loops/integer-2.js | 10 + js/src/jit-test/tests/jaeger/loops/integer-3.js | 7 + .../tests/jaeger/loops/multiply-by-int32min.js | 59 + js/src/jit-test/tests/jaeger/loops/property-1.js | 19 + js/src/jit-test/tests/jaeger/modConstDoubles.js | 8 + js/src/jit-test/tests/jaeger/modConstInt.js | 8 + js/src/jit-test/tests/jaeger/modConstZeroRhs.js | 8 + js/src/jit-test/tests/jaeger/modWithConstLhs.js | 2 + js/src/jit-test/tests/jaeger/mulNegZero.js | 31 + js/src/jit-test/tests/jaeger/negation.js | 2 + .../jit-test/tests/jaeger/normalIntTypedArrays.js | 49 + js/src/jit-test/tests/jaeger/optimize-globals-1.js | 9 + js/src/jit-test/tests/jaeger/optimize-globals-2.js | 20 + js/src/jit-test/tests/jaeger/optimize-globals-3.js | 9 + js/src/jit-test/tests/jaeger/propertyOptimize-1.js | 29 + js/src/jit-test/tests/jaeger/propertyOptimize-2.js | 16 + js/src/jit-test/tests/jaeger/propertyOptimize-3.js | 67 + js/src/jit-test/tests/jaeger/propertyOptimize-4.js | 17 + js/src/jit-test/tests/jaeger/recompile/arith.js | 49 + .../jit-test/tests/jaeger/recompile/bug617592.js | 3 + .../jit-test/tests/jaeger/recompile/bug621292.js | 24 + .../jit-test/tests/jaeger/recompile/bug621328.js | 9 + .../jit-test/tests/jaeger/recompile/bug638977.js | 6 + .../jit-test/tests/jaeger/recompile/bug639508.js | 2 + .../jit-test/tests/jaeger/recompile/bug639882.js | 5 + .../jit-test/tests/jaeger/recompile/bug640608.js | 10 + .../jit-test/tests/jaeger/recompile/bug641225.js | 149 + .../jit-test/tests/jaeger/recompile/bug641269.js | 8 + .../jit-test/tests/jaeger/recompile/bug641535.js | 2 + .../jit-test/tests/jaeger/recompile/bug642405.js | 13 + .../jit-test/tests/jaeger/recompile/bug643182.js | 7 + .../jit-test/tests/jaeger/recompile/bug643376.js | 8 + .../jit-test/tests/jaeger/recompile/bug643669.js | 3 + .../jit-test/tests/jaeger/recompile/bug645044.js | 4 + .../jit-test/tests/jaeger/recompile/bug646267.js | 8 + .../jit-test/tests/jaeger/recompile/bug647183.js | 23 + .../jit-test/tests/jaeger/recompile/bug647199.js | 11 + .../jit-test/tests/jaeger/recompile/bug647532.js | 4 + .../jit-test/tests/jaeger/recompile/bug647547.js | 9 + .../jit-test/tests/jaeger/recompile/bug647991-1.js | 18 + .../jit-test/tests/jaeger/recompile/bug647991-2.js | 2 + .../jit-test/tests/jaeger/recompile/bug648502.js | 12 + .../jit-test/tests/jaeger/recompile/bug648567.js | 16 + .../jit-test/tests/jaeger/recompile/bug648843.js | 8 + .../jit-test/tests/jaeger/recompile/bug648966.js | 7 + .../jit-test/tests/jaeger/recompile/bug649261.js | 2 + .../jit-test/tests/jaeger/recompile/bug649769.js | 16 + .../jit-test/tests/jaeger/recompile/bug651119.js | 51 + .../jit-test/tests/jaeger/recompile/bug653980.js | 13 + .../jit-test/tests/jaeger/recompile/bug654536.js | 6 + .../jit-test/tests/jaeger/recompile/bug655949.js | 6 + .../jit-test/tests/jaeger/recompile/bug655998.js | 7 + .../jit-test/tests/jaeger/recompile/bug657288.js | 9 + .../jit-test/tests/jaeger/recompile/bug658209.js | 10 + .../jit-test/tests/jaeger/recompile/bug658211.js | 13 + .../jit-test/tests/jaeger/recompile/bug658212.js | 33 + .../jit-test/tests/jaeger/recompile/bug658561.js | 5 + .../jit-test/tests/jaeger/recompile/bug658777.js | 11 + .../jit-test/tests/jaeger/recompile/bug659639.js | 16 + .../jit-test/tests/jaeger/recompile/bug659766.js | 29 + .../jit-test/tests/jaeger/recompile/bug661859.js | 24 + .../jit-test/tests/jaeger/recompile/bug663690.js | 14 + .../jit-test/tests/jaeger/recompile/bug671943-2.js | 10 + .../jit-test/tests/jaeger/recompile/bug672123.js | 46 + .../jit-test/tests/jaeger/recompile/bug674391.js | 11 + .../jit-test/tests/jaeger/recompile/bug676764.js | 14 + js/src/jit-test/tests/jaeger/recompile/callic.js | 27 + js/src/jit-test/tests/jaeger/recompile/exotic.js | 64 + js/src/jit-test/tests/jaeger/recompile/flush.js | 18 + js/src/jit-test/tests/jaeger/recompile/getelem.js | 26 + js/src/jit-test/tests/jaeger/recompile/incdec.js | 92 + .../jit-test/tests/jaeger/recompile/inlinestubs.js | 43 + .../jit-test/tests/jaeger/recompile/memory-01.js | 12 + .../jit-test/tests/jaeger/recompile/memory-02.js | 19 + .../jit-test/tests/jaeger/recompile/memory-03.js | 6 + .../jit-test/tests/jaeger/recompile/memory-04.js | 8 + js/src/jit-test/tests/jaeger/recompile/native.js | 26 + .../jit-test/tests/jaeger/recompile/nativemulti.js | 21 + .../jit-test/tests/jaeger/recompile/nativestack.js | 25 + .../jit-test/tests/jaeger/recompile/patchdouble.js | 7 + js/src/jit-test/tests/jaeger/recompile/property.js | 26 + js/src/jit-test/tests/jaeger/recompile/propic.js | 24 + .../tests/jaeger/recompile/staticoverflow.js | 26 + js/src/jit-test/tests/jaeger/recompile/undef.js | 61 + js/src/jit-test/tests/jaeger/regalloc-double.js | 12 + js/src/jit-test/tests/jaeger/regalloc-live.js | 41 + js/src/jit-test/tests/jaeger/regress-bug625701.js | 10 + js/src/jit-test/tests/jaeger/rsh-sanity-1.js | 17 + js/src/jit-test/tests/jaeger/scriptedICs-1.js | 39 + js/src/jit-test/tests/jaeger/setPropTypeGuard.js | 23 + .../jit-test/tests/jaeger/smallIntTypedArrays.js | 112 + .../tests/jaeger/strictModeSetUndefinedVar.js | 8 + js/src/jit-test/tests/jaeger/subCommutativity.js | 4 + js/src/jit-test/tests/jaeger/tableSwitchConst.js | 18 + js/src/jit-test/tests/jaeger/tableSwitchDouble.js | 13 + js/src/jit-test/tests/jaeger/tableSwitchEmpty.js | 14 + js/src/jit-test/tests/jaeger/tableSwitchFloat.js | 18 + js/src/jit-test/tests/jaeger/tableSwitchNeg.js | 27 + .../jit-test/tests/jaeger/testAddStringObject.js | 17 + .../jit-test/tests/jaeger/testCallElemAfterGC.js | 20 + js/src/jit-test/tests/jaeger/testDenseCallElem.js | 89 + js/src/jit-test/tests/jaeger/testForOps.js | 67 + js/src/jit-test/tests/jaeger/testIfEqX.js | 37 + js/src/jit-test/tests/jaeger/testPropCallElem.js | 93 + js/src/jit-test/tests/jaeger/testPropCallElem2.js | 20 + js/src/jit-test/tests/jaeger/testSetElem-Easy.js | 41 + .../jit-test/tests/jaeger/testSetElem-Indexed.js | 36 + .../jit-test/tests/jaeger/testSetElem-NewProto.js | 24 + .../tests/jaeger/testSetTypedFloatArray.js | 61 + .../jit-test/tests/jaeger/testSetTypedIntArray.js | 190 + .../jit-test/tests/jaeger/testShiftSameBacking.js | 12 + js/src/jit-test/tests/jaeger/testTableSwitchX.js | 25 + js/src/jit-test/tests/jaeger/undoAdd.js | 25 + js/src/jit-test/tests/jaeger/unsignedShiftZero.js | 8 + js/src/jit-test/tests/jaeger/xor-sanity.js | 1 + .../large-arraybuffers/address-offset-overflow.js | 94 + .../large-arraybuffers/arraybuffer-transfer.js | 64 + .../jit-test/tests/large-arraybuffers/atomics.js | 57 + js/src/jit-test/tests/large-arraybuffers/basic.js | 50 + .../tests/large-arraybuffers/directives.txt | 1 + .../tests/large-arraybuffers/jit-alloc-big.js | 23 + .../tests/large-arraybuffers/jit-bounds-checks.js | 117 + .../large-arraybuffers/large-lengths-offsets.js | 73 + .../large-arraybuffers/max-typed-array-size.js | 19 + .../large-arraybuffers/shared-array-buffer.js | 40 + .../tests/large-arraybuffers/structured-clone.js | 74 + .../tests/large-arraybuffers/typed-array.js | 203 + js/src/jit-test/tests/latin1/assorted.js | 39 + js/src/jit-test/tests/latin1/basic.js | 113 + js/src/jit-test/tests/latin1/bug1033113.js | 20 + js/src/jit-test/tests/latin1/compare.js | 20 + js/src/jit-test/tests/latin1/date.js | 29 + js/src/jit-test/tests/latin1/decompiler.js | 20 + js/src/jit-test/tests/latin1/dependent.js | 92 + js/src/jit-test/tests/latin1/encode-decode.js | 57 + js/src/jit-test/tests/latin1/escape-unescape.js | 24 + js/src/jit-test/tests/latin1/eval.js | 10 + js/src/jit-test/tests/latin1/function.js | 16 + js/src/jit-test/tests/latin1/index.js | 26 + js/src/jit-test/tests/latin1/indexOf.js | 155 + js/src/jit-test/tests/latin1/indexing.js | 47 + js/src/jit-test/tests/latin1/join.js | 24 + js/src/jit-test/tests/latin1/json.js | 75 + js/src/jit-test/tests/latin1/latin1.js | 120 + js/src/jit-test/tests/latin1/other.js | 34 + .../jit-test/tests/latin1/parseInt-parseFloat.js | 43 + js/src/jit-test/tests/latin1/regexp.js | 47 + js/src/jit-test/tests/latin1/replace.js | 145 + js/src/jit-test/tests/latin1/rope-stringchar.js | 16 + js/src/jit-test/tests/latin1/search.js | 79 + js/src/jit-test/tests/latin1/split.js | 27 + .../jit-test/tests/latin1/startsWith-endsWith.js | 69 + js/src/jit-test/tests/latin1/structured-clone.js | 19 + .../tests/latin1/toLowerCase-toUpperCase.js | 57 + js/src/jit-test/tests/latin1/toNumber.js | 28 + js/src/jit-test/tests/latin1/trim.js | 28 + .../tests/modules/add-to-namespace-import.js | 3 + js/src/jit-test/tests/modules/ambiguous-import.js | 2 + .../tests/modules/ambiguous-indirect-export.js | 2 + .../tests/modules/ambiguous-star-export.js | 43 + js/src/jit-test/tests/modules/assign-to-import.js | 3 + .../tests/modules/assign-to-namespace-import.js | 3 + .../jit-test/tests/modules/assign-to-namespace.js | 3 + js/src/jit-test/tests/modules/async-eval-state.js | 207 + .../tests/modules/bad-namespace-created.js | 15 + js/src/jit-test/tests/modules/bug-1168666.js | 2 + js/src/jit-test/tests/modules/bug-1217593.js | 6 + js/src/jit-test/tests/modules/bug-1219044.js | 4 + js/src/jit-test/tests/modules/bug-1219408.js | 2 + js/src/jit-test/tests/modules/bug-1225346.js | 2 + js/src/jit-test/tests/modules/bug-1233117.js | 2 + js/src/jit-test/tests/modules/bug-1233179.js | 8 + js/src/jit-test/tests/modules/bug-1233915.js | 11 + js/src/jit-test/tests/modules/bug-1236875.js | 2 + js/src/jit-test/tests/modules/bug-1245518.js | 15 + js/src/jit-test/tests/modules/bug-1247934.js | 5 + js/src/jit-test/tests/modules/bug-1258097.js | 3 + js/src/jit-test/tests/modules/bug-1283448.js | 4 + js/src/jit-test/tests/modules/bug-1284486-2.js | 34 + js/src/jit-test/tests/modules/bug-1284486.js | 33 + js/src/jit-test/tests/modules/bug-1287406.js | 1 + js/src/jit-test/tests/modules/bug-1287410.js | 17 + js/src/jit-test/tests/modules/bug-1320993.js | 2 + js/src/jit-test/tests/modules/bug-1372258.js | 26 + js/src/jit-test/tests/modules/bug-1402535.js | 6 + js/src/jit-test/tests/modules/bug-1402649.js | 14 + js/src/jit-test/tests/modules/bug-1406452.js | 5 + js/src/jit-test/tests/modules/bug-1420420-2.js | 17 + js/src/jit-test/tests/modules/bug-1420420-3.js | 7 + js/src/jit-test/tests/modules/bug-1420420-4.js | 18 + js/src/jit-test/tests/modules/bug-1420420.js | 17 + js/src/jit-test/tests/modules/bug-1435327.js | 27 + js/src/jit-test/tests/modules/bug-1439416-2.js | 10 + js/src/jit-test/tests/modules/bug-1439416.js | 10 + js/src/jit-test/tests/modules/bug-1443555.js | 29 + js/src/jit-test/tests/modules/bug-1462286.js | 8 + js/src/jit-test/tests/modules/bug-1462326.js | 6 + js/src/jit-test/tests/modules/bug-1466487.js | 7 + js/src/jit-test/tests/modules/bug-1476921.js | 31 + js/src/jit-test/tests/modules/bug-1498980.js | 29 + js/src/jit-test/tests/modules/bug-1501154.js | 25 + js/src/jit-test/tests/modules/bug-1501157.js | 2 + js/src/jit-test/tests/modules/bug-1502669.js | 5 + js/src/jit-test/tests/modules/bug-1503009.js | 1 + js/src/jit-test/tests/modules/bug-1510598.js | 9 + js/src/jit-test/tests/modules/bug-1519140.js | 3 + js/src/jit-test/tests/modules/bug-1604792.js | 7 + js/src/jit-test/tests/modules/bug-1657066.js | 3 + js/src/jit-test/tests/modules/bug-1680878.js | 7 + js/src/jit-test/tests/modules/bug-1681256.js | 20 + js/src/jit-test/tests/modules/bug-1711342.js | 6 + js/src/jit-test/tests/modules/bug-1764239.js | 13 + js/src/jit-test/tests/modules/bug-1771090.js | 9 + js/src/jit-test/tests/modules/bug-1777972.js | 4 + js/src/jit-test/tests/modules/bug-1778439.js | 1 + js/src/jit-test/tests/modules/bug-1782496.js | 9 + js/src/jit-test/tests/modules/bug-1787926.js | 16 + js/src/jit-test/tests/modules/bug-1789412.js | 12 + js/src/jit-test/tests/modules/bug-1790352.js | 13 + js/src/jit-test/tests/modules/bug-1795845.js | 3 + js/src/jit-test/tests/modules/bug-1802479.js | 15 + js/src/jit-test/tests/modules/bug1105608.js | 9 + js/src/jit-test/tests/modules/bug1169850.js | 9 + js/src/jit-test/tests/modules/bug1198673.js | 2 + js/src/jit-test/tests/modules/bug1204857.js | 2 + js/src/jit-test/tests/modules/bug1210391.js | 7 + js/src/jit-test/tests/modules/bug1394492.js | 6 + js/src/jit-test/tests/modules/bug1394493.js | 4 + js/src/jit-test/tests/modules/bug1429031.js | 16 + js/src/jit-test/tests/modules/bug1449153.js | 33 + js/src/jit-test/tests/modules/bug1485698.js | 9 + js/src/jit-test/tests/modules/bug1584034.js | 1 + js/src/jit-test/tests/modules/bug1584309.js | 1 + js/src/jit-test/tests/modules/bug1586599.js | 30 + js/src/jit-test/tests/modules/bug1670236.js | 6 + js/src/jit-test/tests/modules/bug1685992.js | 12 + js/src/jit-test/tests/modules/bug1699622.js | 4 + js/src/jit-test/tests/modules/bug1770048.js | 20 + js/src/jit-test/tests/modules/bug1846247.js | 7 + .../tests/modules/cyclic-function-import.js | 7 + js/src/jit-test/tests/modules/cyclic-import.js | 3 + js/src/jit-test/tests/modules/debugger-frames.js | 83 + .../tests/modules/debugger-vars-function.js | 30 + .../tests/modules/debugger-vars-toplevel.js | 31 + js/src/jit-test/tests/modules/delete-import.js | 3 + .../tests/modules/delete-namespace-import.js | 3 + js/src/jit-test/tests/modules/delete-namespace.js | 3 + js/src/jit-test/tests/modules/duplicate-exports.js | 32 + js/src/jit-test/tests/modules/duplicate-imports.js | 27 + .../jit-test/tests/modules/dynamic-import-error.js | 14 + .../tests/modules/dynamic-import-expression.js | 214 + .../jit-test/tests/modules/dynamic-import-ion.js | 16 + .../jit-test/tests/modules/dynamic-import-lazy.js | 4 + .../tests/modules/dynamic-import-module.js | 39 + .../jit-test/tests/modules/dynamic-import-oom.js | 9 + .../tests/modules/dynamic-import-script.js | 45 + js/src/jit-test/tests/modules/eval-module-oom.js | 23 + .../modules/export-circular-nonexisting-binding.js | 3 + .../jit-test/tests/modules/export-declaration.js | 569 + .../jit-test/tests/modules/export-destructuring.js | 104 + js/src/jit-test/tests/modules/export-entries.js | 130 + js/src/jit-test/tests/modules/export-ns-from.js | 10 + .../export-star-cannot-rescue-missing-export.js | 4 + .../modules/export-star-circular-dependencies.js | 6 + .../tests/modules/function-redeclaration.js | 94 + js/src/jit-test/tests/modules/global-scope.js | 35 + .../jit-test/tests/modules/import-declaration.js | 523 + .../tests/modules/import-default-async-asi.js | 7 + .../tests/modules/import-default-async-regexpy.js | 5 + .../jit-test/tests/modules/import-default-class.js | 5 + .../tests/modules/import-default-function.js | 4 + js/src/jit-test/tests/modules/import-entries.js | 87 + .../tests/modules/import-in-lazy-function.js | 11 + .../tests/modules/import-meta-expression.js | 91 + js/src/jit-test/tests/modules/import-meta-oom.js | 3 + js/src/jit-test/tests/modules/import-meta.js | 67 + js/src/jit-test/tests/modules/import-namespace.js | 114 + js/src/jit-test/tests/modules/import-not-found.js | 2 + js/src/jit-test/tests/modules/inline-data.js | 17 + .../tests/modules/instanceof-error-message.js | 14 + js/src/jit-test/tests/modules/let-tdz.js | 3 + js/src/jit-test/tests/modules/many-exports.js | 17 + js/src/jit-test/tests/modules/many-imports.js | 15 + .../tests/modules/many-namespace-imports.js | 15 + .../tests/modules/missing-export-offthread.js | 10 + .../tests/modules/missing-indirect-export.js | 2 + .../modules/module-declaration-instantiation.js | 37 + .../jit-test/tests/modules/module-environment.js | 34 + js/src/jit-test/tests/modules/module-evaluation.js | 125 + js/src/jit-test/tests/modules/module-this.js | 25 + .../modules/namespace-import-compilation-2.js | 17 + .../tests/modules/namespace-import-compilation.js | 17 + .../jit-test/tests/modules/off-thread-compile.js | 15 + js/src/jit-test/tests/modules/offthread-oom.js | 13 + .../tests/modules/recursive-star-export.js | 2 + js/src/jit-test/tests/modules/requested-modules.js | 95 + js/src/jit-test/tests/modules/shell-parse.js | 30 + js/src/jit-test/tests/modules/shell-wrapper.js | 174 + js/src/jit-test/tests/modules/simple-imports.js | 11 + .../tests/modules/tla-after-many-bindings.js | 24 + js/src/jit-test/tests/modules/tla-many-vars.js | 15 + js/src/jit-test/tests/modules/unbound-export.js | 2 + js/src/jit-test/tests/optional-chain/bug1848244.js | 6 + .../tests/optional-chain/call-ignore-rval.js | 34 + .../tests/optional-chain/fun-call-or-apply.js | 60 + js/src/jit-test/tests/out-of-tree-apis.js | 23 + js/src/jit-test/tests/parser/arrow-rest.js | 204 + js/src/jit-test/tests/parser/arrow-with-block.js | 92 + .../jit-test/tests/parser/break-continue-errors.js | 22 + js/src/jit-test/tests/parser/bug-1090096.js | 12 + js/src/jit-test/tests/parser/bug-1161312.js | 3 + js/src/jit-test/tests/parser/bug-1250192.js | 5 + js/src/jit-test/tests/parser/bug-1254164.js | 6 + js/src/jit-test/tests/parser/bug-1263355-1.js | 5 + js/src/jit-test/tests/parser/bug-1263355-10.js | 4 + js/src/jit-test/tests/parser/bug-1263355-11.js | 6 + js/src/jit-test/tests/parser/bug-1263355-12.js | 6 + js/src/jit-test/tests/parser/bug-1263355-13.js | 26 + js/src/jit-test/tests/parser/bug-1263355-14.js | 28 + js/src/jit-test/tests/parser/bug-1263355-15.js | 4 + js/src/jit-test/tests/parser/bug-1263355-16.js | 11 + js/src/jit-test/tests/parser/bug-1263355-17.js | 4 + js/src/jit-test/tests/parser/bug-1263355-18.js | 4 + js/src/jit-test/tests/parser/bug-1263355-19.js | 4 + js/src/jit-test/tests/parser/bug-1263355-2.js | 2 + js/src/jit-test/tests/parser/bug-1263355-20.js | 2 + js/src/jit-test/tests/parser/bug-1263355-21.js | 7 + js/src/jit-test/tests/parser/bug-1263355-22.js | 16 + js/src/jit-test/tests/parser/bug-1263355-23.js | 7 + js/src/jit-test/tests/parser/bug-1263355-24.js | 3 + js/src/jit-test/tests/parser/bug-1263355-26.js | 7 + js/src/jit-test/tests/parser/bug-1263355-27.js | 5 + js/src/jit-test/tests/parser/bug-1263355-28.js | 3 + js/src/jit-test/tests/parser/bug-1263355-29.js | 6 + js/src/jit-test/tests/parser/bug-1263355-3.js | 4 + js/src/jit-test/tests/parser/bug-1263355-30.js | 19 + js/src/jit-test/tests/parser/bug-1263355-31.js | 6 + js/src/jit-test/tests/parser/bug-1263355-32.js | 4 + js/src/jit-test/tests/parser/bug-1263355-33.js | 22 + js/src/jit-test/tests/parser/bug-1263355-34.js | 4 + js/src/jit-test/tests/parser/bug-1263355-35.js | 7 + js/src/jit-test/tests/parser/bug-1263355-36.js | 9 + js/src/jit-test/tests/parser/bug-1263355-37.js | 7 + js/src/jit-test/tests/parser/bug-1263355-38.js | 9 + js/src/jit-test/tests/parser/bug-1263355-39.js | 8 + js/src/jit-test/tests/parser/bug-1263355-4.js | 2 + js/src/jit-test/tests/parser/bug-1263355-40.js | 5 + js/src/jit-test/tests/parser/bug-1263355-41.js | 5 + js/src/jit-test/tests/parser/bug-1263355-42.js | 11 + js/src/jit-test/tests/parser/bug-1263355-43.js | 4 + js/src/jit-test/tests/parser/bug-1263355-44.js | 8 + js/src/jit-test/tests/parser/bug-1263355-45.js | 8 + js/src/jit-test/tests/parser/bug-1263355-46.js | 23 + js/src/jit-test/tests/parser/bug-1263355-47.js | 6 + js/src/jit-test/tests/parser/bug-1263355-48.js | 18 + js/src/jit-test/tests/parser/bug-1263355-49.js | 4 + js/src/jit-test/tests/parser/bug-1263355-5.js | 3 + js/src/jit-test/tests/parser/bug-1263355-50.js | 4 + js/src/jit-test/tests/parser/bug-1263355-51.js | 9 + js/src/jit-test/tests/parser/bug-1263355-52.js | 11 + js/src/jit-test/tests/parser/bug-1263355-6.js | 3 + js/src/jit-test/tests/parser/bug-1263355-7.js | 5 + js/src/jit-test/tests/parser/bug-1263355-8.js | 5 + js/src/jit-test/tests/parser/bug-1263355-9.js | 5 + js/src/jit-test/tests/parser/bug-1263881-1.js | 6 + js/src/jit-test/tests/parser/bug-1263881-2.js | 5 + js/src/jit-test/tests/parser/bug-1263881-3.js | 6 + js/src/jit-test/tests/parser/bug-1264568.js | 6 + js/src/jit-test/tests/parser/bug-1316832.js | 10 + js/src/jit-test/tests/parser/bug-1319443.js | 11 + js/src/jit-test/tests/parser/bug-1324773-2.js | 15 + js/src/jit-test/tests/parser/bug-1324773.js | 15 + js/src/jit-test/tests/parser/bug-1355046.js | 8 + js/src/jit-test/tests/parser/bug-1357075.js | 10 + js/src/jit-test/tests/parser/bug-1363191.js | 2 + js/src/jit-test/tests/parser/bug-1364648.js | 1 + js/src/jit-test/tests/parser/bug-1366927.js | 1 + js/src/jit-test/tests/parser/bug-1385112.js | 1 + js/src/jit-test/tests/parser/bug-1431353-2.js | 57 + js/src/jit-test/tests/parser/bug-1431353.js | 165 + js/src/jit-test/tests/parser/bug-1433014.js | 5 + js/src/jit-test/tests/parser/bug-1465695.js | 3 + js/src/jit-test/tests/parser/bug-1470992.js | 4 + js/src/jit-test/tests/parser/bug-1566974.js | 5 + js/src/jit-test/tests/parser/bug-1576865-1.js | 49 + js/src/jit-test/tests/parser/bug-1576865-2.js | 44 + js/src/jit-test/tests/parser/bug-1662260.js | 12 + js/src/jit-test/tests/parser/bug-1764737.js | 9 + js/src/jit-test/tests/parser/bug-844805-1.js | 1 + js/src/jit-test/tests/parser/bug-844805-2.js | 10 + js/src/jit-test/tests/parser/bug-888002-1.js | 1 + js/src/jit-test/tests/parser/bug-888002-2.js | 12 + js/src/jit-test/tests/parser/bug-888002-3.js | 18 + js/src/jit-test/tests/parser/bug-888002.js | 1 + js/src/jit-test/tests/parser/bug-889628.js | 33 + js/src/jit-test/tests/parser/bug-896126.js | 11 + js/src/jit-test/tests/parser/bug-975484.js | 7 + js/src/jit-test/tests/parser/bug1461034.js | 2 + js/src/jit-test/tests/parser/bug1547655.js | 2 + js/src/jit-test/tests/parser/bug1604952.js | 4 + js/src/jit-test/tests/parser/bug1605254.js | 4 + js/src/jit-test/tests/parser/bug1657557.js | 7 + js/src/jit-test/tests/parser/bug1661454.js | 12 + js/src/jit-test/tests/parser/bug1750935.js | 11 + js/src/jit-test/tests/parser/bug1764715.js | 4 + js/src/jit-test/tests/parser/bug1803036.js | 22 + js/src/jit-test/tests/parser/bug1835785.js | 8 + js/src/jit-test/tests/parser/bytecode-sharing.js | 103 + js/src/jit-test/tests/parser/columnNumber.js | 50 + js/src/jit-test/tests/parser/compile-script.js | 50 + js/src/jit-test/tests/parser/dumpStencil-01.js | 24 + .../tests/parser/fold-constant-index-access.js | 47 + js/src/jit-test/tests/parser/home-object-getter.js | 4 + .../jit-test/tests/parser/lazy-flag-consistency.js | 65 + .../jit-test/tests/parser/lazy-parse-bad-offset.js | 4 + .../jit-test/tests/parser/let-after-directive.js | 6 + .../jit-test/tests/parser/letContextualKeyword.js | 110 + js/src/jit-test/tests/parser/lineNumber.js | 37 + .../jit-test/tests/parser/missing-closing-brace.js | 90 + .../jit-test/tests/parser/modifier-arrow-rest.js | 11 + js/src/jit-test/tests/parser/modifier-do-while.js | 12 + .../tests/parser/modifier-regexp-vs-div.js | 12 + .../tests/parser/modifier-semicolon-insertion.js | 48 + .../parser/modifier-yield-without-operand-1.js | 12 + .../parser/modifier-yield-without-operand-2.js | 13 + js/src/jit-test/tests/parser/module-line-0.js | 18 + .../tests/parser/off_thread_compile_oom.js | 4 + .../parser/off_thread_compile_throws_error.js | 7 + .../oom-tracking-line-starts-in-tokenizer.js | 143 + .../tests/parser/optimized-out-functions.js | 7 + js/src/jit-test/tests/parser/parse-module.js | 1 + .../tests/parser/parse-non-ascii-latin1.js | 5 + .../jit-test/tests/parser/redeclaration-message.js | 10 + js/src/jit-test/tests/parser/redeclaration.js | 229 + .../jit-test/tests/parser/regexp-after-do-while.js | 8 + .../jit-test/tests/parser/regexp-after-variable.js | 8 + .../jit-test/tests/parser/regexp-error-location.js | 16 + .../jit-test/tests/parser/script-source-extent.js | 337 + .../tests/parser/standalone-function-name.js | 22 + js/src/jit-test/tests/parser/stencil-asmjs.js | 28 + .../parser/stencil-compile-invalid-argument.js | 14 + .../parser/stencil-eager-delazify-certviewer.js | 35 + .../tests/parser/stencil-eager-delazify-empty.js | 22 + .../tests/parser/stencil-eager-delazify.js | 75 + .../tests/parser/stencil-laziness-validate.js | 29 + js/src/jit-test/tests/parser/stencil-scope.js | 134 + js/src/jit-test/tests/parser/stencil.js | 111 + .../parser/strict-with-asi-and-deprecated-octal.js | 4 + .../tests/parser/syntax-error-illegal-character.js | 22 + js/src/jit-test/tests/parser/syntax-parse-error.js | 4 + js/src/jit-test/tests/parser/truncation.js | 73 + js/src/jit-test/tests/parser/warning-oom.js | 7 + .../tests/parser/yield-in-formal-destructuring.js | 1 + js/src/jit-test/tests/pic/arguments.js | 23 + js/src/jit-test/tests/pic/bug584642.js | 3 + js/src/jit-test/tests/pic/bug595706.js | 19 + js/src/jit-test/tests/pic/bug645184.js | 8 + js/src/jit-test/tests/pic/call_self.js | 15 + js/src/jit-test/tests/pic/callname-eager-this1.js | 11 + js/src/jit-test/tests/pic/callname-eager-this2.js | 25 + js/src/jit-test/tests/pic/callname-global1.js | 35 + js/src/jit-test/tests/pic/callname-global2.js | 15 + js/src/jit-test/tests/pic/callname-with.js | 15 + js/src/jit-test/tests/pic/densearray.js | 12 + js/src/jit-test/tests/pic/getelem-large-index.js | 13 + js/src/jit-test/tests/pic/grandproto.js | 28 + js/src/jit-test/tests/pic/length_array.js | 16 + js/src/jit-test/tests/pic/length_mix.js | 22 + js/src/jit-test/tests/pic/length_object.js | 16 + js/src/jit-test/tests/pic/length_string.js | 16 + js/src/jit-test/tests/pic/length_string_object.js | 36 + js/src/jit-test/tests/pic/proto1.js | 24 + js/src/jit-test/tests/pic/proto3.js | 32 + js/src/jit-test/tests/pic/proto_self.js | 39 + js/src/jit-test/tests/pic/self1.js | 18 + js/src/jit-test/tests/pic/self2.js | 18 + js/src/jit-test/tests/pic/self3.js | 19 + js/src/jit-test/tests/pic/self8.js | 32 + js/src/jit-test/tests/pic/set-assign.js | 10 + js/src/jit-test/tests/pic/set1.js | 11 + js/src/jit-test/tests/pic/set2.js | 14 + js/src/jit-test/tests/pic/shape_regen.js | 33 + js/src/jit-test/tests/pic/thisprop.js | 30 + js/src/jit-test/tests/pic/to-dictionary.js | 9 + .../jit-test/tests/profiler/AutoEntryMonitor-01.js | 50 + .../jit-test/tests/profiler/AutoEntryMonitor-02.js | 12 + js/src/jit-test/tests/profiler/bug1135703.js | 6 + js/src/jit-test/tests/profiler/bug1161351.js | 16 + js/src/jit-test/tests/profiler/bug1164448.js | 26 + js/src/jit-test/tests/profiler/bug1211962.js | 11 + js/src/jit-test/tests/profiler/bug1231925.js | 6 + js/src/jit-test/tests/profiler/bug1233921.js | 19 + js/src/jit-test/tests/profiler/bug1242840.js | 15 + js/src/jit-test/tests/profiler/bug1261324.js | 24 + js/src/jit-test/tests/profiler/bug1352507-1.js | 3 + js/src/jit-test/tests/profiler/bug1427774.js | 29 + js/src/jit-test/tests/profiler/bug1478509.js | 5 + js/src/jit-test/tests/profiler/bug1502744.js | 20 + js/src/jit-test/tests/profiler/bug1563889.js | 3 + js/src/jit-test/tests/profiler/bug1774149.js | 14 + js/src/jit-test/tests/profiler/bug1782003.js | 28 + js/src/jit-test/tests/profiler/bug925309.js | 2 + .../debugmode-osr-exception-return-addr.js | 16 + .../tests/profiler/debugmode-osr-resume-addr.js | 11 + .../profiler/enterjit-osr-disabling-earlyret.js | 13 + .../tests/profiler/enterjit-osr-disabling.js | 9 + .../profiler/enterjit-osr-enabling-earlyret.js | 12 + .../tests/profiler/enterjit-osr-enabling.js | 8 + js/src/jit-test/tests/profiler/enterjit-osr.js | 8 + .../tests/profiler/exception-unwind-hook.js | 22 + js/src/jit-test/tests/profiler/getter-setter-ic.js | 32 + .../jit-test/tests/profiler/interpreter-stacks.js | 105 + .../profiler/ion-rectifier-frame-bug1530351.js | 6 + .../profiler/jsop-resume-return-bug1451385-1.js | 10 + .../profiler/jsop-resume-return-bug1451385-2.js | 9 + .../jit-test/tests/profiler/pc-count-profiler.js | 53 + .../profiler/test-baseline-eval-frame-profiling.js | 11 + js/src/jit-test/tests/profiler/test-bug1026485.js | 15 + js/src/jit-test/tests/promise/bug-1298776.js | 4 + js/src/jit-test/tests/promise/bug-1545369.js | 9 + js/src/jit-test/tests/promise/bug1347984.js | 6 + js/src/jit-test/tests/promise/bug1406463.js | 16 + .../promise/debugger-reaction-does-not-resolve.js | 71 + .../promise/drain-job-queue-after-quit-called.js | 15 + .../promise/getwaitforallpromise-error-handling.js | 8 + js/src/jit-test/tests/promise/job-realm.js | 363 + .../promise/newpromisecapability-error-message.js | 23 + .../tests/promise/no-reentrant-drainjobqueue.js | 10 + .../promise/optimized-promise-already-resolved.js | 73 + .../promise/primitives-handling-in-promise-all.js | 5 + .../promise-any-with-non-default-resolving.js | 58 + .../promise-cross-compartment-subclassing.js | 10 + ...promise-race-with-default-resolving-internal.js | 54 + .../promise-race-with-non-default-resolving.js | 56 + .../promise/resolve-promise-scripted-and-api.js | 15 + .../tests/promise/settle-async-generator.js | 23 + .../tests/promise/settle-now-already-resolved.js | 28 + .../promise/settle-now-breaks-all-invariants-1.js | 21 + .../promise/settle-now-breaks-all-invariants-10.js | 18 + .../promise/settle-now-breaks-all-invariants-11.js | 18 + .../promise/settle-now-breaks-all-invariants-2.js | 27 + .../promise/settle-now-breaks-all-invariants-3.js | 27 + .../promise/settle-now-breaks-all-invariants-4.js | 18 + .../promise/settle-now-breaks-all-invariants-5.js | 18 + .../promise/settle-now-breaks-all-invariants-6.js | 20 + .../promise/settle-now-breaks-all-invariants-7.js | 23 + .../promise/settle-now-breaks-all-invariants-8.js | 7 + .../promise/settle-now-breaks-all-invariants-9.js | 15 + .../tests/promise/species-redefine-getter.js | 20 + .../jit-test/tests/promise/stopdrainingjobqueue.js | 4 + .../tests/promise/unhandled-rejections-dead-2.js | 24 + .../tests/promise/unhandled-rejections-dead.js | 17 + .../unhandled-rejections-different-realm.js | 19 + .../tests/promise/unhandled-rejections-error.js | 3 + .../tests/promise/unhandled-rejections-oom.js | 3 + .../jit-test/tests/promise/unhandled-rejections.js | 3 + .../tests/promise/user-activation-propagation.js | 19 + js/src/jit-test/tests/proxy/bug-862848-1.js | 24 + js/src/jit-test/tests/proxy/bug1072817.js | 5 + js/src/jit-test/tests/proxy/bug1095973.js | 5 + js/src/jit-test/tests/proxy/bug1685290.js | 13 + js/src/jit-test/tests/proxy/bug1714531.js | 6 + js/src/jit-test/tests/proxy/bug1853103.js | 6 + js/src/jit-test/tests/proxy/bug1853180-2.js | 32 + js/src/jit-test/tests/proxy/bug1853180.js | 23 + js/src/jit-test/tests/proxy/bug897403.js | 3 + js/src/jit-test/tests/proxy/bug901979-1.js | 16 + js/src/jit-test/tests/proxy/bug901979-2.js | 37 + js/src/jit-test/tests/proxy/bug911553.js | 10 + .../tests/proxy/defineProperty-fallback.js | 8 + .../tests/proxy/delete-not-invoked-on-proto.js | 10 + js/src/jit-test/tests/proxy/freeze-proxy.js | 22 + js/src/jit-test/tests/proxy/function-toString.js | 10 + .../tests/proxy/getElementIfPresent-not-present.js | 5 + .../tests/proxy/getPrototype-cycle-for-in.js | 12 + .../tests/proxy/getPrototype-cycle-hasInstance.js | 11 + .../jit-test/tests/proxy/operations-on-revoked.js | 18 + .../proxy/preserve-iscallable-isconstructor.js | 17 + js/src/jit-test/tests/proxy/proxy-array-length.js | 4 + js/src/jit-test/tests/proxy/seal-proxy.js | 16 + js/src/jit-test/tests/proxy/surfaces.js | 14 + ...comes-nonextensible-during-preventExtensions.js | 8 + js/src/jit-test/tests/proxy/testBug793160.js | 3 + .../jit-test/tests/proxy/testDirectProxyApply1.js | 6 + .../jit-test/tests/proxy/testDirectProxyApply2.js | 19 + .../jit-test/tests/proxy/testDirectProxyApply3.js | 10 + .../jit-test/tests/proxy/testDirectProxyApply4.js | 12 + .../tests/proxy/testDirectProxyConstruct1.js | 12 + .../tests/proxy/testDirectProxyConstruct2.js | 21 + .../tests/proxy/testDirectProxyConstruct3.js | 11 + .../tests/proxy/testDirectProxyConstruct4.js | 12 + .../tests/proxy/testDirectProxyConstruct5.js | 14 + .../tests/proxy/testDirectProxyConstructor.js | 19 + .../tests/proxy/testDirectProxyDefineProperty1.js | 23 + .../tests/proxy/testDirectProxyDefineProperty2.js | 34 + .../tests/proxy/testDirectProxyDefineProperty3.js | 16 + .../tests/proxy/testDirectProxyDefineProperty4.js | 12 + .../tests/proxy/testDirectProxyDefineProperty5.js | 13 + .../tests/proxy/testDirectProxyDefineProperty6.js | 16 + .../tests/proxy/testDirectProxyDefineProperty7.js | 17 + .../proxy/testDirectProxyDefinePropertyFailure.js | 26 + .../tests/proxy/testDirectProxyEnumerate1.js | 14 + js/src/jit-test/tests/proxy/testDirectProxyGet1.js | 12 + .../jit-test/tests/proxy/testDirectProxyGet10.js | 43 + .../jit-test/tests/proxy/testDirectProxyGet11.js | 28 + .../jit-test/tests/proxy/testDirectProxyGet12.js | 31 + .../jit-test/tests/proxy/testDirectProxyGet13.js | 31 + .../jit-test/tests/proxy/testDirectProxyGet14.js | 22 + .../jit-test/tests/proxy/testDirectProxyGet15.js | 25 + js/src/jit-test/tests/proxy/testDirectProxyGet2.js | 22 + js/src/jit-test/tests/proxy/testDirectProxyGet3.js | 50 + js/src/jit-test/tests/proxy/testDirectProxyGet4.js | 14 + js/src/jit-test/tests/proxy/testDirectProxyGet5.js | 16 + js/src/jit-test/tests/proxy/testDirectProxyGet6.js | 12 + js/src/jit-test/tests/proxy/testDirectProxyGet8.js | 31 + js/src/jit-test/tests/proxy/testDirectProxyGet9.js | 33 + .../tests/proxy/testDirectProxyGetInherited1.js | 16 + .../tests/proxy/testDirectProxyGetInherited2.js | 31 + .../tests/proxy/testDirectProxyGetInherited3.js | 21 + .../tests/proxy/testDirectProxyGetInherited4.js | 6 + .../testDirectProxyGetOwnPropertyDescriptor1.js | 27 + .../testDirectProxyGetOwnPropertyDescriptor10.js | 35 + .../testDirectProxyGetOwnPropertyDescriptor11.js | 14 + .../testDirectProxyGetOwnPropertyDescriptor2.js | 20 + .../testDirectProxyGetOwnPropertyDescriptor3.js | 13 + .../testDirectProxyGetOwnPropertyDescriptor4.js | 14 + .../testDirectProxyGetOwnPropertyDescriptor5.js | 15 + .../testDirectProxyGetOwnPropertyDescriptor6.js | 9 + .../testDirectProxyGetOwnPropertyDescriptor7.js | 12 + .../testDirectProxyGetOwnPropertyDescriptor8.js | 13 + .../testDirectProxyGetOwnPropertyDescriptor9.js | 9 + .../proxy/testDirectProxyGetOwnPropertyNames1.js | 30 + .../proxy/testDirectProxyGetOwnPropertyNames2.js | 19 + .../proxy/testDirectProxyGetOwnPropertyNames3.js | 6 + .../proxy/testDirectProxyGetOwnPropertyNames4.js | 7 + .../proxy/testDirectProxyGetOwnPropertyNames5.js | 12 + .../proxy/testDirectProxyGetOwnPropertyNames6.js | 11 + .../proxy/testDirectProxyGetOwnPropertyNames7.js | 15 + .../proxy/testDirectProxyGetOwnPropertyNames8.js | 42 + .../proxy/testDirectProxyGetOwnPropertyNames9.js | 12 + js/src/jit-test/tests/proxy/testDirectProxyHas1.js | 18 + js/src/jit-test/tests/proxy/testDirectProxyHas2.js | 21 + js/src/jit-test/tests/proxy/testDirectProxyHas3.js | 13 + js/src/jit-test/tests/proxy/testDirectProxyHas4.js | 15 + js/src/jit-test/tests/proxy/testDirectProxyHas5.js | 18 + js/src/jit-test/tests/proxy/testDirectProxyHas6.js | 13 + js/src/jit-test/tests/proxy/testDirectProxyHas7.js | 12 + .../tests/proxy/testDirectProxyHasOwnProperty.js | 35 + .../tests/proxy/testDirectProxyIsExtensible1.js | 97 + .../tests/proxy/testDirectProxyIsExtensible2.js | 12 + .../jit-test/tests/proxy/testDirectProxyKeys1.js | 27 + .../jit-test/tests/proxy/testDirectProxyKeys10.js | 23 + .../jit-test/tests/proxy/testDirectProxyKeys11.js | 12 + .../jit-test/tests/proxy/testDirectProxyKeys2.js | 20 + .../jit-test/tests/proxy/testDirectProxyKeys3.js | 7 + .../jit-test/tests/proxy/testDirectProxyKeys4.js | 7 + .../jit-test/tests/proxy/testDirectProxyKeys5.js | 12 + .../jit-test/tests/proxy/testDirectProxyKeys6.js | 12 + .../jit-test/tests/proxy/testDirectProxyKeys7.js | 16 + .../jit-test/tests/proxy/testDirectProxyKeys8.js | 16 + .../jit-test/tests/proxy/testDirectProxyKeys9.js | 35 + .../tests/proxy/testDirectProxyOnProtoWithForIn.js | 23 + .../tests/proxy/testDirectProxyOwnKeysSymbol.js | 33 + .../proxy/testDirectProxyPreventExtensions1.js | 10 + .../proxy/testDirectProxyPreventExtensions2.js | 25 + .../proxy/testDirectProxyPreventExtensions3.js | 7 + .../proxy/testDirectProxyPreventExtensions4.js | 6 + .../proxy/testDirectProxyPreventExtensions5.js | 12 + .../jit-test/tests/proxy/testDirectProxyRevoke.js | 45 + js/src/jit-test/tests/proxy/testDirectProxySet1.js | 18 + .../jit-test/tests/proxy/testDirectProxySet10.js | 60 + js/src/jit-test/tests/proxy/testDirectProxySet2.js | 23 + js/src/jit-test/tests/proxy/testDirectProxySet3.js | 14 + js/src/jit-test/tests/proxy/testDirectProxySet4.js | 17 + js/src/jit-test/tests/proxy/testDirectProxySet5.js | 13 + js/src/jit-test/tests/proxy/testDirectProxySet6.js | 12 + js/src/jit-test/tests/proxy/testDirectProxySet7.js | 20 + js/src/jit-test/tests/proxy/testDirectProxySet8.js | 21 + js/src/jit-test/tests/proxy/testDirectProxySet9.js | 20 + .../tests/proxy/testDirectProxySetArray1.js | 25 + .../tests/proxy/testDirectProxySetArray2.js | 12 + .../tests/proxy/testDirectProxySetArray3.js | 21 + .../tests/proxy/testDirectProxySetArray4.js | 24 + .../tests/proxy/testDirectProxySetFailure.js | 32 + .../tests/proxy/testDirectProxySetInherited.js | 23 + .../tests/proxy/testDirectProxySetNested.js | 15 + .../tests/proxy/testDirectProxySetNested2.js | 16 + .../proxy/testDirectProxySetReceiverLookup.js | 57 + .../proxy/testDirectProxyValidateProperty1.js | 19 + .../proxy/testDirectProxyValidateProperty2.js | 39 + .../proxy/testDirectProxyValidateProperty3.js | 43 + .../proxy/testDirectProxyValidateProperty4.js | 24 + .../proxy/testDirectProxyValidateProperty5.js | 26 + .../proxy/testDirectProxyValidateProperty6.js | 28 + .../proxy/testDirectProxyValidateProperty7.js | 28 + .../tests/proxy/testSetImmutablePrototype.js | 11 + .../jit-test/tests/proxy/testTestIntegrityLevel.js | 30 + .../jit-test/tests/proxy/testWrapWithProtoIter.js | 1 + .../jit-test/tests/proxy/testWrapWithProtoSet.js | 8 + .../tests/proxy/testWrapWithProtoTypedArray.js | 19 + .../testWrapWithProtoTypedArraySortFloat32.js | 3 + .../tests/proxy/testWrapperGetInherited.js | 18 + js/src/jit-test/tests/realms/array-ctor.js | 35 + .../jit-test/tests/realms/array-species-create.js | 35 + js/src/jit-test/tests/realms/basic.js | 114 + js/src/jit-test/tests/realms/bug1385890-c50.js | 20 + js/src/jit-test/tests/realms/bug1479430.js | 6 + js/src/jit-test/tests/realms/bug1487238.js | 3 + js/src/jit-test/tests/realms/bug1496892.js | 4 + js/src/jit-test/tests/realms/bug1513665.js | 24 + js/src/jit-test/tests/realms/bug1514263.js | 16 + js/src/jit-test/tests/realms/bug1518753.js | 13 + js/src/jit-test/tests/realms/bug1518821.js | 11 + js/src/jit-test/tests/realms/bug1519857.js | 4 + js/src/jit-test/tests/realms/bug1548611.js | 5 + js/src/jit-test/tests/realms/bug1610189.js | 15 + js/src/jit-test/tests/realms/ccw-errors.js | 28 + js/src/jit-test/tests/realms/first-global.js | 5 + js/src/jit-test/tests/realms/nuking.js | 49 + js/src/jit-test/tests/realms/promise-job-global.js | 31 + js/src/jit-test/tests/realms/promise-then.js | 32 + js/src/jit-test/tests/realms/proxy-realm.js | 14 + .../tests/realms/scripted-caller-global.js | 5 + .../jit-test/tests/realms/switch-realms-native.js | 60 + .../tests/realms/switch-realms-scripted.js | 113 + js/src/jit-test/tests/record-tuple/bug-1772597.js | 23 + .../record-tuple/compacting-gc-nested-tuples.js | 23 + js/src/jit-test/tests/record-tuple/compartments.js | 19 + js/src/jit-test/tests/record-tuple/from.js | 13 + js/src/jit-test/tests/record-tuple/with.js | 11 + js/src/jit-test/tests/regexp/CheckRegExpSyntax.js | 16 + js/src/jit-test/tests/regexp/RegExpExec-errors.js | 6 + .../regexp/atom-match-unicode-split-surrogate.js | 25 + js/src/jit-test/tests/regexp/bug-1841771.js | 76 + js/src/jit-test/tests/regexp/bug-1845715.js | 2 + js/src/jit-test/tests/regexp/bug1419785.js | 3 + js/src/jit-test/tests/regexp/bug1445907.js | 14 + js/src/jit-test/tests/regexp/bug1600272.js | 6 + js/src/jit-test/tests/regexp/bug1640473.js | 20 + js/src/jit-test/tests/regexp/bug1640475.js | 9 + js/src/jit-test/tests/regexp/bug1640479.js | 15 + js/src/jit-test/tests/regexp/bug1640487.js | 8 + js/src/jit-test/tests/regexp/bug1640592.js | 2 + js/src/jit-test/tests/regexp/bug1697077.js | 13 + js/src/jit-test/tests/regexp/bug1703750.js | 7 + js/src/jit-test/tests/regexp/bug1718842-1.js | 7 + js/src/jit-test/tests/regexp/bug1718842-2.js | 9 + js/src/jit-test/tests/regexp/bug1783555.js | 4 + js/src/jit-test/tests/regexp/bug1783830.js | 7 + js/src/jit-test/tests/regexp/bug1786012.js | 8 + js/src/jit-test/tests/regexp/bug1794317.js | 7 + .../jit-test/tests/regexp/builtin-exec-wrapper.js | 7 + js/src/jit-test/tests/regexp/clone-statics.js | 21 + js/src/jit-test/tests/regexp/flag-getters.js | 61 + .../tests/regexp/has-capture-groups-intrinsic.js | 20 + js/src/jit-test/tests/regexp/huge-01.js | 21 + js/src/jit-test/tests/regexp/huge-02.js | 13 + js/src/jit-test/tests/regexp/lastIndex-negative.js | 14 + .../tests/regexp/lastIndex-non-writable.js | 71 + .../jit-test/tests/regexp/lastIndex-too-large.js | 13 + js/src/jit-test/tests/regexp/lastIndex-valueOf.js | 16 + .../tests/regexp/match-indices-dictionary.js | 24 + js/src/jit-test/tests/regexp/match-indices-warp.js | 8 + js/src/jit-test/tests/regexp/match-stub-realms.js | 19 + .../jit-test/tests/regexp/named-capture-proxy.js | 21 + .../tests/regexp/negated-set-expression.js | 1 + .../non-unicode-case-folding-backreference.js | 67 + .../tests/regexp/non-unicode-case-folding.js | 68 + js/src/jit-test/tests/regexp/replace-exec.js | 12 + .../jit-test/tests/regexp/replace-global-lambda.js | 56 + js/src/jit-test/tests/regexp/rope-inputs.js | 10 + .../tests/regexp/unicode-back-reference.js | 3 + .../jit-test/tests/resist-fingerprinting/locale.js | 19 + .../math-fdlibm-sincostan-asm.js | 56 + .../resist-fingerprinting/math-fdlibm-sincostan.js | 88 + .../tests/resist-fingerprinting/timezone.js | 33 + .../tests/saved-stacks/1438121-async-function.js | 119 + .../tests/saved-stacks/1438121-generator.js | 131 + .../tests/saved-stacks/SavedFrame-constructor.js | 4 + js/src/jit-test/tests/saved-stacks/asm-frames.js | 37 + .../jit-test/tests/saved-stacks/async-implicit.js | 52 + .../jit-test/tests/saved-stacks/async-livecache.js | 43 + .../tests/saved-stacks/async-max-frame-count.js | 99 + .../tests/saved-stacks/async-principals.js | 247 + js/src/jit-test/tests/saved-stacks/async.js | 24 + ...ug-1004479-savedStacks-with-string-parameter.js | 4 + .../saved-stacks/bug-1006876-too-much-recursion.js | 10 + .../saved-stacks/bug-1012646-strlen-crasher.js | 4 + .../saved-stacks/bug-1031168-trace-sources.js | 9 + js/src/jit-test/tests/saved-stacks/bug-1149495.js | 7 + js/src/jit-test/tests/saved-stacks/bug-1225474.js | 6 + js/src/jit-test/tests/saved-stacks/bug-1260712.js | 7 + js/src/jit-test/tests/saved-stacks/bug-1289058.js | 13 + js/src/jit-test/tests/saved-stacks/bug-1289073.js | 1 + .../tests/saved-stacks/bug-1445973-quick.js | 53 + js/src/jit-test/tests/saved-stacks/bug-1451268.js | 23 + .../tests/saved-stacks/bug-1505387-dbg-eval-ion.js | 12 + js/src/jit-test/tests/saved-stacks/bug-1509420.js | 9 + .../bug-1640034-dbg-eval-across-compartments.js | 22 + js/src/jit-test/tests/saved-stacks/bug-1744495.js | 18 + js/src/jit-test/tests/saved-stacks/bug1813533.js | 22 + js/src/jit-test/tests/saved-stacks/bug1832936.js | 13 + .../tests/saved-stacks/caching-and-ccws.js | 35 + .../tests/saved-stacks/caching-and-frame-count.js | 40 + .../capture-first-frame-with-principals.js | 86 + js/src/jit-test/tests/saved-stacks/display-url.js | 26 + js/src/jit-test/tests/saved-stacks/evals.js | 38 + .../tests/saved-stacks/function-display-name.js | 16 + .../jit-test/tests/saved-stacks/gc-frame-cache.js | 87 + js/src/jit-test/tests/saved-stacks/generators.js | 19 + js/src/jit-test/tests/saved-stacks/get-set.js | 25 + .../saved-stacks/getters-on-invalid-objects.js | 23 + .../jit-test/tests/saved-stacks/max-frame-count.js | 42 + js/src/jit-test/tests/saved-stacks/native-calls.js | 12 + .../tests/saved-stacks/oom-in-save-stack-02.js | 28 + .../tests/saved-stacks/oom-in-save-stack.js | 4 + .../jit-test/tests/saved-stacks/principals-01.js | 70 + .../jit-test/tests/saved-stacks/principals-02.js | 56 + .../jit-test/tests/saved-stacks/principals-03.js | 23 + .../jit-test/tests/saved-stacks/principals-04.js | 15 + .../jit-test/tests/saved-stacks/proxy-handlers.js | 10 + js/src/jit-test/tests/saved-stacks/same-stack.js | 12 + js/src/jit-test/tests/saved-stacks/self-hosted.js | 26 + .../tests/saved-stacks/shared-parent-frames.js | 19 + .../tests/saved-stacks/stacks-are-frozen.js | 17 + .../saved-stacks/stringify-with-self-hosted.js | 8 + .../tests/self-hosting/GetStringDataProperty.js | 23 + js/src/jit-test/tests/self-hosting/bug1264575.js | 7 + js/src/jit-test/tests/self-hosting/bug1816084.js | 10 + js/src/jit-test/tests/self-hosting/bug957004.js | 3 + .../tests/self-hosting/define-value-property.js | 8 + ...get-backtrace-in-constructing-bound-function.js | 6 + .../jit-test/tests/self-hosting/get-intrinsic.js | 19 + .../tests/self-hosting/intl-fallback-original.js | 9 + .../self-hosting/invoke-self-hosted-function.js | 9 + .../invoke-self-hosted-with-primitive-this.js | 7 + .../tests/self-hosting/is-constructor-inlined.js | 16 + .../self-hosting/is-constructor-on-wrapper.js | 17 + .../is-possibly-wrapped-typed-array.js | 91 + ...ctible-function-inherited-prototype-property.js | 3 + .../self-hosting/method-called-on-incompatible.js | 9 + .../tests/self-hosting/object-define-hazard.js | 18 + .../tests/self-hosting/object-lookup-hazard.js | 8 + js/src/jit-test/tests/self-hosting/oom-delazify.js | 5 + js/src/jit-test/tests/self-hosting/oom-toplevel.js | 25 + js/src/jit-test/tests/self-hosting/relazify.js | 16 + js/src/jit-test/tests/self-hosting/tolength.js | 13 + js/src/jit-test/tests/self-test/assertDeepEq.js | 112 + .../tests/self-test/assertRecoveredOnBailout-0.js | 12 + .../tests/self-test/assertRecoveredOnBailout-1.js | 36 + .../tests/self-test/baselineCompile-Bug1444894.js | 5 + js/src/jit-test/tests/self-test/baselineCompile.js | 21 + js/src/jit-test/tests/self-test/cacheEntry.js | 23 + .../tests/self-test/delazification-mode-00.js | 19 + .../tests/self-test/delazification-mode-01.js | 24 + .../tests/self-test/delazification-mode-02.js | 24 + .../tests/self-test/delazification-mode-03.js | 17 + .../tests/self-test/getBacktrace-bug1138195.js | 8 + js/src/jit-test/tests/self-test/inIon.js | 20 + js/src/jit-test/tests/self-test/inJit.js | 20 + .../tests/self-test/isRelazifiableFunction-0.js | 3 + js/src/jit-test/tests/self-test/notInIon.js | 3 + js/src/jit-test/tests/self-test/notInJit.js | 4 + .../tests/self-test/oom-test-bug1497906.js | 18 + .../jit-test/tests/self-test/printer-escape-seq.js | 5 + js/src/jit-test/tests/self-test/readlineBuf.js | 42 + js/src/jit-test/tests/sharedbuf/asm-link.js | 15 + js/src/jit-test/tests/sharedbuf/byteLength.js | 8 + js/src/jit-test/tests/sharedbuf/gc-one-view.js | 11 + js/src/jit-test/tests/sharedbuf/gc-two-views.js | 12 + .../tests/sharedbuf/growable-sab-over-mailbox.js | 40 + js/src/jit-test/tests/sharedbuf/inline-access.js | 26 + js/src/jit-test/tests/sharedbuf/is-zeroed.js | 13 + ...ut-of-bounds-to-in-bounds-index-over-mailbox.js | 38 + .../sharedbuf/sab-construct-noargs-1068458.js | 14 + js/src/jit-test/tests/sharedbuf/sab-gating.js | 4 + .../jit-test/tests/sharedbuf/slice-same-memory.js | 25 + js/src/jit-test/tests/sharedbuf/slice.js | 121 + js/src/jit-test/tests/sharedbuf/subtypes.js | 52 + ...from-sharedtypedarray-with-overridden-length.js | 24 + js/src/jit-test/tests/stream/bug-1387503-1.js | 38 + js/src/jit-test/tests/stream/bug-1387503-2.js | 40 + js/src/jit-test/tests/stream/bug-1503399-1.js | 19 + js/src/jit-test/tests/stream/bug-1503399-2.js | 12 + js/src/jit-test/tests/stream/bug-1503406.js | 14 + js/src/jit-test/tests/stream/bug-1512008.js | 9 + js/src/jit-test/tests/stream/bug-1513266.js | 16 + js/src/jit-test/tests/stream/bug-1515816.js | 17 + .../jit-test/tests/stream/proper-realm-cancel.js | 8 + js/src/jit-test/tests/stream/proper-realm-pull.js | 7 + .../tests/stream/reader-closedPromise-handled-2.js | 34 + .../tests/stream/reader-closedPromise-handled.js | 24 + .../structured-clone/Map-Set-cross-compartment.js | 11 + js/src/jit-test/tests/structured-clone/Map.js | 112 + js/src/jit-test/tests/structured-clone/Set.js | 84 + .../tests/structured-clone/array-buffers.js | 80 + .../jit-test/tests/structured-clone/bug1687243.js | 30 + .../jit-test/tests/structured-clone/bug1875797.js | 2 + js/src/jit-test/tests/structured-clone/errors.js | 139 + .../growable-shared-array-buffers.js | 126 + .../resizable-array-buffers-transferable.js | 37 + .../structured-clone/resizable-array-buffers.js | 122 + .../jit-test/tests/structured-clone/roundtrip.js | 30 + .../jit-test/tests/structured-clone/sab-errMsg.js | 26 + .../jit-test/tests/structured-clone/saved-stack.js | 37 + js/src/jit-test/tests/structured-clone/tenuring.js | 92 + .../transferable-across-segments.js | 13 + .../tests/structured-clone/transferable-cleanup.js | 243 + js/src/jit-test/tests/structured-clone/version3.js | 13 + js/src/jit-test/tests/sunspider/check-3d-cube.js | 345 + js/src/jit-test/tests/sunspider/check-3d-morph.js | 59 + .../jit-test/tests/sunspider/check-3d-raytrace.js | 442 + .../tests/sunspider/check-access-binary-trees.js | 52 + .../tests/sunspider/check-access-fannkuch.js | 66 + .../jit-test/tests/sunspider/check-access-nbody.js | 171 + .../tests/sunspider/check-access-nsieve.js | 40 + .../sunspider/check-bitops-3bit-bits-in-byte.js | 35 + .../tests/sunspider/check-bitops-bits-in-byte.js | 24 + .../tests/sunspider/check-bitops-bitwise-and.js | 29 + .../tests/sunspider/check-bitops-nsieve-bits.js | 40 + .../tests/sunspider/check-controlflow-recursive.js | 27 + .../jit-test/tests/sunspider/check-crypto-aes.js | 425 + .../jit-test/tests/sunspider/check-crypto-md5.js | 287 + .../jit-test/tests/sunspider/check-crypto-sha1.js | 225 + .../tests/sunspider/check-date-format-tofte.js | 304 + .../tests/sunspider/check-date-format-xparb.js | 422 + .../jit-test/tests/sunspider/check-math-cordic.js | 94 + .../tests/sunspider/check-math-partial-sums.js | 41 + .../tests/sunspider/check-math-spectral-norm.js | 53 + js/src/jit-test/tests/sunspider/check-mont.js | 119 + .../jit-test/tests/sunspider/check-regexp-dna.js | 1714 + .../jit-test/tests/sunspider/check-string-fasta.js | 90 + .../tests/sunspider/check-string-tagcloud.js | 270 + .../tests/sunspider/check-string-unpack-code.js | 73 + js/src/jit-test/tests/symbol-equality.js | 41 + js/src/jit-test/tests/symbol/bug-1033856.js | 6 + js/src/jit-test/tests/symbol/not.js | 13 + js/src/jit-test/tests/symbol/toNumber-2.js | 14 + js/src/jit-test/tests/symbol/toNumber.js | 53 + js/src/jit-test/tests/symbol/toString.js | 11 + js/src/jit-test/tests/symbol/truthiness.js | 13 + js/src/jit-test/tests/symbol/typed-arrays.js | 29 + js/src/jit-test/tests/symbol/typeof.js | 9 + js/src/jit-test/tests/truthiness/equal-null.js | 37 + .../jit-test/tests/truthiness/equal-undefined.js | 37 + js/src/jit-test/tests/truthiness/if-equal-null.js | 46 + .../tests/truthiness/if-equal-undefined.js | 46 + .../jit-test/tests/truthiness/if-not-equal-null.js | 46 + .../tests/truthiness/if-not-equal-undefined.js | 46 + .../tests/truthiness/if-strict-equal-null.js | 46 + .../tests/truthiness/if-strict-equal-undefined.js | 46 + .../tests/truthiness/if-strict-not-equal-null.js | 46 + .../truthiness/if-strict-not-equal-undefined.js | 46 + js/src/jit-test/tests/truthiness/if.js | 24 + js/src/jit-test/tests/truthiness/not-equal-null.js | 37 + .../tests/truthiness/not-equal-undefined.js | 37 + js/src/jit-test/tests/truthiness/not.js | 24 + js/src/jit-test/tests/truthiness/obj-obj-equal.js | 23 + .../jit-test/tests/truthiness/obj-obj-not-equal.js | 23 + .../jit-test/tests/truthiness/strict-equal-null.js | 37 + .../tests/truthiness/strict-equal-undefined.js | 37 + .../tests/truthiness/strict-not-equal-null.js | 37 + .../tests/truthiness/strict-not-equal-undefined.js | 37 + js/src/jit-test/tests/truthiness/typeof.js | 23 + .../jit-test/tests/typedarray/arraybuffer-pin.js | 69 + ...arraybuffer-transfer-coerce-large-bytelength.js | 15 + .../typedarray/arraybuffer-transfer-mapped.txt | 1 + .../arraybuffer-transfer-unknown-arena.js | 12 + .../tests/typedarray/arraybuffer-transfer.js | 207 + js/src/jit-test/tests/typedarray/bug1518764.js | 8 + js/src/jit-test/tests/typedarray/bug1520536.js | 3 + js/src/jit-test/tests/typedarray/bug1713567.js | 21 + js/src/jit-test/tests/typedarray/bug1858678.js | 12 + .../tests/typedarray/construct-with-arraybuffer.js | 59 + .../tests/typedarray/construct-with-arrays.js | 165 + .../typedarray/construct-with-sharedarraybuffer.js | 61 + .../tests/typedarray/define-property-oob.js | 24 + js/src/jit-test/tests/typedarray/dom-view.js | 13 + .../jit-test/tests/typedarray/ensure-non-inline.js | 85 + js/src/jit-test/tests/typedarray/error-messages.js | 40 + .../typedarray/indexed-integer-exotics-simple.js | 35 + .../tests/typedarray/indexed-integer-exotics.js | 97 + .../oom-allocating-arraybuffer-contents.js | 15 + .../oom-allocating-copying-same-buffer-contents.js | 9 + js/src/jit-test/tests/typedarray/sort.js | 24 + .../tests/typedarray/typed-array-change-by-copy.js | 43 + .../tests/typedarray/typed-array-inline-cache.js | 54 + .../typedarray/typedarrayobject-getelements.js | 6 + js/src/jit-test/tests/v8-v5/check-crypto.js | 1717 + js/src/jit-test/tests/v8-v5/check-deltablue.js | 883 + js/src/jit-test/tests/v8-v5/check-earley-boyer.js | 4696 + js/src/jit-test/tests/v8-v5/check-raytrace.js | 935 + js/src/jit-test/tests/v8-v5/check-regexp.js | 1616 + js/src/jit-test/tests/v8-v5/check-richards.js | 536 + js/src/jit-test/tests/v8-v5/check-splay.js | 430 + .../tests/warp/arguments-object-load-arg.js | 109 + .../tests/warp/arguments-object-load-length.js | 57 + .../tests/warp/bailout-inline-fun-call-no-args.js | 19 + .../jit-test/tests/warp/bailout-inline-getter.js | 22 + js/src/jit-test/tests/warp/booleantostring.js | 9 + js/src/jit-test/tests/warp/bug1646041.js | 9 + js/src/jit-test/tests/warp/bug1646302.js | 9 + js/src/jit-test/tests/warp/bug1647054.js | 8 + js/src/jit-test/tests/warp/bug1652049.js | 7 + js/src/jit-test/tests/warp/bug1652732.js | 8 + js/src/jit-test/tests/warp/bug1653913.js | 3 + js/src/jit-test/tests/warp/bug1653972.js | 11 + js/src/jit-test/tests/warp/bug1661530.js | 7 + js/src/jit-test/tests/warp/bug1661728.js | 43 + js/src/jit-test/tests/warp/bug1662146.js | 12 + js/src/jit-test/tests/warp/bug1663993.js | 9 + js/src/jit-test/tests/warp/bug1664007.js | 12 + js/src/jit-test/tests/warp/bug1665303.js | 20 + js/src/jit-test/tests/warp/bug1666070.js | 8 + js/src/jit-test/tests/warp/bug1666142-1.js | 19 + js/src/jit-test/tests/warp/bug1666142-2.js | 19 + js/src/jit-test/tests/warp/bug1667680.js | 8 + js/src/jit-test/tests/warp/bug1667685.js | 27 + js/src/jit-test/tests/warp/bug1667699.js | 15 + js/src/jit-test/tests/warp/bug1668197.js | 6 + js/src/jit-test/tests/warp/bug1669415.js | 11 + js/src/jit-test/tests/warp/bug1669597.js | 14 + js/src/jit-test/tests/warp/bug1671812.js | 11 + js/src/jit-test/tests/warp/bug1676631.js | 7 + js/src/jit-test/tests/warp/bug1676639.js | 7 + js/src/jit-test/tests/warp/bug1681056.js | 9 + js/src/jit-test/tests/warp/bug1681597.js | 19 + js/src/jit-test/tests/warp/bug1681677.js | 7 + js/src/jit-test/tests/warp/bug1681806.js | 92 + js/src/jit-test/tests/warp/bug1683306.js | 19 + js/src/jit-test/tests/warp/bug1683309.js | 19 + js/src/jit-test/tests/warp/bug1683535-1.js | 6 + js/src/jit-test/tests/warp/bug1683535-2.js | 12 + js/src/jit-test/tests/warp/bug1683614.js | 13 + js/src/jit-test/tests/warp/bug1686207.js | 11 + js/src/jit-test/tests/warp/bug1686702.js | 3 + js/src/jit-test/tests/warp/bug1687661.js | 13 + js/src/jit-test/tests/warp/bug1687672.js | 14 + js/src/jit-test/tests/warp/bug1688136.js | 13 + js/src/jit-test/tests/warp/bug1688346.js | 12 + js/src/jit-test/tests/warp/bug1692857.js | 14 + js/src/jit-test/tests/warp/bug1693062-01.js | 14 + js/src/jit-test/tests/warp/bug1693062-02.js | 16 + js/src/jit-test/tests/warp/bug1694600.js | 16 + js/src/jit-test/tests/warp/bug1696897.js | 8 + js/src/jit-test/tests/warp/bug1697451.js | 15 + js/src/jit-test/tests/warp/bug1697483.js | 46 + js/src/jit-test/tests/warp/bug1698126.js | 11 + js/src/jit-test/tests/warp/bug1698609.js | 11 + js/src/jit-test/tests/warp/bug1699056.js | 12 + js/src/jit-test/tests/warp/bug1700579.js | 28 + js/src/jit-test/tests/warp/bug1700616.js | 32 + js/src/jit-test/tests/warp/bug1701208.js | 18 + js/src/jit-test/tests/warp/bug1702465.js | 14 + js/src/jit-test/tests/warp/bug1703766.js | 212 + js/src/jit-test/tests/warp/bug1703817.js | 9 + js/src/jit-test/tests/warp/bug1704467.js | 9 + js/src/jit-test/tests/warp/bug1706314.js | 9 + js/src/jit-test/tests/warp/bug1708839.js | 16 + js/src/jit-test/tests/warp/bug1713579.js | 8 + js/src/jit-test/tests/warp/bug1716231.js | 25 + js/src/jit-test/tests/warp/bug1716931.js | 13 + js/src/jit-test/tests/warp/bug1719884.js | 19 + js/src/jit-test/tests/warp/bug1720093-1.js | 17 + js/src/jit-test/tests/warp/bug1720093-2.js | 19 + js/src/jit-test/tests/warp/bug1732601.js | 27 + js/src/jit-test/tests/warp/bug1735157.js | 5 + js/src/jit-test/tests/warp/bug1738676.js | 19 + js/src/jit-test/tests/warp/bug1741635-1.js | 11 + js/src/jit-test/tests/warp/bug1741635-2.js | 11 + js/src/jit-test/tests/warp/bug1745949.js | 11 + js/src/jit-test/tests/warp/bug1761947.js | 28 + js/src/jit-test/tests/warp/bug1762769.js | 8 + js/src/jit-test/tests/warp/bug1762770.js | 13 + js/src/jit-test/tests/warp/bug1763012-1.js | 19 + js/src/jit-test/tests/warp/bug1763012-2.js | 19 + js/src/jit-test/tests/warp/bug1767196.js | 15 + js/src/jit-test/tests/warp/bug1769410.js | 14 + js/src/jit-test/tests/warp/bug1770904.js | 7 + js/src/jit-test/tests/warp/bug1789821.js | 14 + js/src/jit-test/tests/warp/bug1825220.js | 11 + js/src/jit-test/tests/warp/bug1825408.js | 20 + js/src/jit-test/tests/warp/bug1852238.js | 14 + js/src/jit-test/tests/warp/bug1852398.js | 27 + js/src/jit-test/tests/warp/bug1852702.js | 17 + .../tests/warp/cancel-offthread-compile.js | 21 + .../jit-test/tests/warp/catch-overflow-regexp.js | 8 + .../jit-test/tests/warp/compare-constant-string.js | 90 + js/src/jit-test/tests/warp/compare-empty-string.js | 50 + .../jit-test/tests/warp/conditional-test-guard.js | 12 + .../tests/warp/conditional-test-undefined-1.js | 22 + .../tests/warp/conditional-test-undefined-2.js | 22 + js/src/jit-test/tests/warp/force-warp.js | 11 + js/src/jit-test/tests/warp/fun-call-not-inlined.js | 29 + js/src/jit-test/tests/warp/function-load-length.js | 86 + js/src/jit-test/tests/warp/function-load-name.js | 100 + .../tests/warp/function-var-environment-inlined.js | 15 + .../tests/warp/function-var-environment.js | 43 + .../warp/guard-function-is-non-builtin-ctor.js | 20 + .../jit-test/tests/warp/guard-has-getter-setter.js | 263 + .../warp/guard-specific-atom-with-short-atom.js | 82 + .../tests/warp/guard-string-to-number-or-int32.js | 36 + js/src/jit-test/tests/warp/guardproto-nursery.js | 13 + js/src/jit-test/tests/warp/inline-array-at.js | 15 + .../tests/warp/inlined-accessor-exc-bailout.js | 45 + .../tests/warp/load-unboxed-typedarray-bigint.js | 7 + js/src/jit-test/tests/warp/map-get-bigint.js | 211 + js/src/jit-test/tests/warp/map-get-nongcthing.js | 343 + js/src/jit-test/tests/warp/map-get-object.js | 104 + js/src/jit-test/tests/warp/map-get-string.js | 162 + js/src/jit-test/tests/warp/map-get-symbol.js | 82 + js/src/jit-test/tests/warp/map-get-value.js | 104 + js/src/jit-test/tests/warp/map-has-bigint.js | 192 + js/src/jit-test/tests/warp/map-has-nongcthing.js | 307 + js/src/jit-test/tests/warp/map-has-object.js | 97 + js/src/jit-test/tests/warp/map-has-string.js | 147 + js/src/jit-test/tests/warp/map-has-symbol.js | 75 + js/src/jit-test/tests/warp/map-has-value.js | 97 + .../jit-test/tests/warp/math-indirect-truncate.js | 55 + .../tests/warp/mega-morphic-load-and-has-prop.js | 99 + js/src/jit-test/tests/warp/min-max-foldsTo-1.js | 47 + js/src/jit-test/tests/warp/min-max-foldsTo-2.js | 153 + js/src/jit-test/tests/warp/min-max-foldsTo-3.js | 177 + js/src/jit-test/tests/warp/min-max-foldsTo-4.js | 11 + .../jit-test/tests/warp/non-int32-array-length.js | 10 + js/src/jit-test/tests/warp/null-not-zero-index.js | 17 + .../warp/number-tostring-with-base-uppercase.js | 92 + .../tests/warp/number-tostring-with-base.js | 89 + .../jit-test/tests/warp/object-class-tostring.js | 65 + js/src/jit-test/tests/warp/phi-specialization.js | 42 + js/src/jit-test/tests/warp/polymorphic-to-bool.js | 39 + js/src/jit-test/tests/warp/property-add-shape.js | 98 + js/src/jit-test/tests/warp/rest-elements.js | 40 + .../warp/scalar-replace-array-apply-array-01.js | 21 + .../warp/scalar-replace-array-apply-array-02.js | 19 + .../warp/scalar-replace-array-apply-array-03.js | 23 + .../warp/scalar-replace-array-apply-array-04.js | 24 + .../tests/warp/scalar-replace-array-apply-array.js | 43 + .../scalar-replace-array-construct-array-01.js | 28 + .../scalar-replace-array-construct-array-02.js | 26 + .../scalar-replace-array-construct-array-03.js | 32 + .../scalar-replace-array-construct-array-04.js | 26 + .../warp/scalar-replace-array-construct-array.js | 48 + .../warp/scalar-replace-array-iterator-next.js | 24 + .../tests/warp/scalar-replace-rest-apply-array.js | 38 + .../warp/scalar-replace-rest-construct-array.js | 43 + js/src/jit-test/tests/warp/set-has-bigint.js | 192 + js/src/jit-test/tests/warp/set-has-nongcthing.js | 307 + js/src/jit-test/tests/warp/set-has-object.js | 97 + js/src/jit-test/tests/warp/set-has-string.js | 147 + js/src/jit-test/tests/warp/set-has-symbol.js | 75 + js/src/jit-test/tests/warp/set-has-value.js | 97 + .../tests/warp/setelem-inlining-bailout.js | 26 + .../tests/warp/small-inlinable-builtins.js | 10 + .../warp/store-element-hole-negative-index.js | 24 + .../warp/store-element-hole-sparse-element.js | 24 + js/src/jit-test/tests/warp/string-char.js | 15 + ...charCodeAt-constant-index-in-left-rope-child.js | 18 + .../tests/warp/string-compare-char-in-bounds.js | 24 + .../warp/string-compare-char-out-of-bounds.js | 28 + .../tests/warp/string-compare-char-string.js | 60 + .../tests/warp/string-endswith-constant-string.js | 81 + .../string-indexof-constant-string-length-one.js | 74 + .../string-indexof-constant-string-length-two.js | 74 + .../tests/warp/string-indexof-constant-string.js | 98 + .../tests/warp/string-indexof-is-startswith.js | 29 + .../warp/string-startswith-constant-string.js | 81 + .../tests/warp/string-substring-is-charat.js | 13 + .../string-substring-startswith-constant-string.js | 90 + .../tests/warp/string-substring-static-strings.js | 20 + .../tests/warp/string-tolowercase-latin1.js | 85 + js/src/jit-test/tests/warp/string-totitlecase.js | 85 + js/src/jit-test/tests/warp/string-trim.js | 75 + .../jit-test/tests/warp/stub-folding-add-case.js | 35 + .../tests/warp/stub-folding-cross-compartment.js | 15 + .../jit-test/tests/warp/stub-folding-transition.js | 24 + js/src/jit-test/tests/warp/stub-folding.js | 35 + .../jit-test/tests/warp/super-native-newtarget.js | 20 + .../tests/warp/throw-exception-stack-location.js | 41 + js/src/jit-test/tests/warp/trial-inline-gc-1.js | 14 + js/src/jit-test/tests/warp/trial-inline-gc-2.js | 18 + js/src/jit-test/tests/warp/trial-inline-gc-3.js | 23 + js/src/jit-test/tests/warp/try-catch-unwind.js | 29 + js/src/jit-test/tests/warp/try-finally-1.js | 36 + js/src/jit-test/tests/warp/try-finally-2.js | 42 + js/src/jit-test/tests/warp/try-finally-3.js | 35 + js/src/jit-test/tests/warp/try-finally-unwind.js | 28 + .../tests/warp/typedarray-element-exists.js | 46 + .../jit-test/tests/warp/typedarrayindextoint32.js | 10 + js/src/jit-test/tests/warp/typeof-is.js | 126 + js/src/jit-test/tests/warp/typeof-switch.js | 78 + js/src/jit-test/tests/wasm/README-codegen.md | 36 + js/src/jit-test/tests/wasm/arm-hwcap-madness.js | 31 + js/src/jit-test/tests/wasm/arraybuffer-transfer.js | 35 + js/src/jit-test/tests/wasm/async-instantiate.js | 47 + js/src/jit-test/tests/wasm/atomic.js | 562 + js/src/jit-test/tests/wasm/atomicity.js | 381 + js/src/jit-test/tests/wasm/backtrace.js | 21 + .../jit-test/tests/wasm/baseline-abs-addr-opt.js | 94 + js/src/jit-test/tests/wasm/baseline-opt.js | 108 + js/src/jit-test/tests/wasm/basic.js | 362 + js/src/jit-test/tests/wasm/bce-x64-ion-codegen.js | 68 + js/src/jit-test/tests/wasm/bce-x86-ion-codegen.js | 54 + js/src/jit-test/tests/wasm/bce.js | 190 + js/src/jit-test/tests/wasm/bench/README.txt | 12 + js/src/jit-test/tests/wasm/bench/directives.txt | 1 + js/src/jit-test/tests/wasm/bench/wasm_box2d.js | 3068 + js/src/jit-test/tests/wasm/bench/wasm_box2d.wasm | Bin 0 -> 116358 bytes js/src/jit-test/tests/wasm/big-resize.js | 8 + js/src/jit-test/tests/wasm/bigint/bigint.js | 468 + js/src/jit-test/tests/wasm/bigint/bug1633740.js | 25 + js/src/jit-test/tests/wasm/bigint/directives.txt | 1 + js/src/jit-test/tests/wasm/bigint/stubs.js | 142 + js/src/jit-test/tests/wasm/binary-slow.js | 20 + js/src/jit-test/tests/wasm/binary.js | 408 + .../jit-test/tests/wasm/binop-arm64-ion-codegen.js | 407 + .../jit-test/tests/wasm/binop-x64-ion-codegen.js | 335 + .../jit-test/tests/wasm/binop-x64-ion-folding.js | 212 + js/src/jit-test/tests/wasm/bug1693500.js | 73 + js/src/jit-test/tests/wasm/bug1776358.js | 28 + js/src/jit-test/tests/wasm/bug1858423.js | 37 + .../tests/wasm/builtin-modules/directives.txt | 1 + .../tests/wasm/builtin-modules/i8vecmul.js | 39 + .../integer-gemm/CommonTestSetup.js | 27 + .../integer-gemm/I8MultiplyAndAddBias.js | 81 + .../builtin-modules/integer-gemm/I8PrepareA.js | 62 + .../builtin-modules/integer-gemm/I8PrepareB.js | 66 + .../I8PrepareBFromQuantizedTransposed.js | 66 + .../integer-gemm/I8PrepareBFromTransposed.js | 66 + .../builtin-modules/integer-gemm/I8PrepareBias.js | 69 + .../integer-gemm/I8SelectColumnsOfB.js | 77 + .../builtin-modules/integer-gemm/directives.txt | 1 + .../tests/wasm/builtin-modules/js-string/basic.js | 316 + .../wasm/builtin-modules/js-string/directives.txt | 1 + .../tests/wasm/builtin-modules/oom-test.js | 6 + js/src/jit-test/tests/wasm/builtin.js | 132 + js/src/jit-test/tests/wasm/caching.js | 63 + js/src/jit-test/tests/wasm/comments.js | 31 + .../jit-test/tests/wasm/compare-select-i32-i64.js | 269 + js/src/jit-test/tests/wasm/compiler-frame-depth.js | 26 + js/src/jit-test/tests/wasm/const.js | 254 + .../jit-test/tests/wasm/control-flow-phi-inputs.js | 80 + js/src/jit-test/tests/wasm/control-flow.js | 680 + js/src/jit-test/tests/wasm/conversion.js | 396 + js/src/jit-test/tests/wasm/cross-global.js | 10 + js/src/jit-test/tests/wasm/custom-section.js | 48 + js/src/jit-test/tests/wasm/declared-segs.js | 58 + js/src/jit-test/tests/wasm/directiveless/README.md | 1 + .../tests/wasm/directiveless/bug1645310.js | 61 + .../tests/wasm/directiveless/bug1664979.js | 21 + .../tests/wasm/directiveless/bug1666051.js | 12 + .../tests/wasm/directiveless/bug1877358.js | 14 + js/src/jit-test/tests/wasm/directives.txt | 1 + js/src/jit-test/tests/wasm/disasm.js | 43 + js/src/jit-test/tests/wasm/drop.js | 45 + js/src/jit-test/tests/wasm/errors.js | 180 + .../tests/wasm/exceptions/bug-1744663-extended.js | 237 + .../jit-test/tests/wasm/exceptions/bug-1744663.js | 71 + .../jit-test/tests/wasm/exceptions/bug-1747562.js | 35 + .../jit-test/tests/wasm/exceptions/bug-1747704.js | 14 + .../jit-test/tests/wasm/exceptions/bug-1751699.js | 8 + .../jit-test/tests/wasm/exceptions/bug-1767446.js | 26 + .../jit-test/tests/wasm/exceptions/bug-1788213.js | 5 + .../jit-test/tests/wasm/exceptions/bug-1791361.js | 12 + .../jit-test/tests/wasm/exceptions/bug-1797685.js | 8 + js/src/jit-test/tests/wasm/exceptions/caching.js | 28 + js/src/jit-test/tests/wasm/exceptions/calls.js | 439 + .../jit-test/tests/wasm/exceptions/directives.txt | 1 + js/src/jit-test/tests/wasm/exceptions/events.js | 160 + js/src/jit-test/tests/wasm/exceptions/example.js | 29 + .../tests/wasm/exceptions/import-export.js | 100 + .../jit-test/tests/wasm/exceptions/instructions.js | 1550 + .../jit-test/tests/wasm/exceptions/ion-loop-phi.js | 59 + js/src/jit-test/tests/wasm/exceptions/js-api.js | 490 + js/src/jit-test/tests/wasm/exceptions/memory.js | 78 + .../tests/wasm/exceptions/oom-construct-message.js | 6 + .../wasm/exceptions/oom-create-exception-data.js | 9 + .../jit-test/tests/wasm/exceptions/prototypes.js | 10 + js/src/jit-test/tests/wasm/exceptions/reftypes.js | 141 + .../tests/wasm/exceptions/side-effects-in-try.js | 234 + js/src/jit-test/tests/wasm/exceptions/stack.js | 28 + .../jit-test/tests/wasm/exceptions/throw-to-js.js | 343 + .../jit-test/tests/wasm/exceptions/unreachable.js | 33 + .../jit-test/tests/wasm/exceptions/validation.js | 663 + js/src/jit-test/tests/wasm/exnref/casting.js | 110 + js/src/jit-test/tests/wasm/exnref/directives.txt | 1 + js/src/jit-test/tests/wasm/exnref/throw-ref.js | 70 + js/src/jit-test/tests/wasm/exnref/try-table.js | 384 + js/src/jit-test/tests/wasm/extended-const/basic.js | 95 + .../tests/wasm/extended-const/directives.txt | 1 + .../jit-test/tests/wasm/extended-const/disabled.js | 22 + .../tests/wasm/extended-const/pathological.js | 78 + js/src/jit-test/tests/wasm/extract-code.js | 12 + js/src/jit-test/tests/wasm/fac.js | 19 + js/src/jit-test/tests/wasm/features.js | 98 + js/src/jit-test/tests/wasm/fence.js | 24 + js/src/jit-test/tests/wasm/float-unaligned.js | 118 + js/src/jit-test/tests/wasm/float.js | 103 + js/src/jit-test/tests/wasm/full-cycle.js | 148 + .../tests/wasm/function-references/as-non-null.js | 13 + .../tests/wasm/function-references/binary.js | 52 + .../tests/wasm/function-references/br-non-null.js | 76 + .../tests/wasm/function-references/br-null.js | 58 + .../tests/wasm/function-references/call_ref.js | 100 + .../tests/wasm/function-references/directives.txt | 1 + .../tests/wasm/function-references/disabled.js | 17 + .../tests/wasm/function-references/nnl-test.js | 176 + .../wasm/function-references/non-nullable-table.js | 79 + .../tests/wasm/function-references/non-nullable.js | 176 + .../wasm/function-references/reftype-parse.js | 51 + js/src/jit-test/tests/wasm/gc/TypedObject.js | 106 + js/src/jit-test/tests/wasm/gc/arrays.js | 2027 + js/src/jit-test/tests/wasm/gc/binary.js | 29 + js/src/jit-test/tests/wasm/gc/br-on-cast-fail.js | 199 + js/src/jit-test/tests/wasm/gc/br-on-cast.js | 197 + js/src/jit-test/tests/wasm/gc/bug-1841119.js | 18 + js/src/jit-test/tests/wasm/gc/bug-1843295.js | 10 + js/src/jit-test/tests/wasm/gc/bug-1845436.js | 10 + js/src/jit-test/tests/wasm/gc/bug-1845673.js | 14 + js/src/jit-test/tests/wasm/gc/bug-1854007.js | 16 + .../tests/wasm/gc/call-indirect-subtyping.js | 137 + js/src/jit-test/tests/wasm/gc/cast-abstract.js | 298 + js/src/jit-test/tests/wasm/gc/cast-extern.js | 54 + js/src/jit-test/tests/wasm/gc/casting.js | 116 + js/src/jit-test/tests/wasm/gc/debugger.js | 38 + js/src/jit-test/tests/wasm/gc/directives.txt | 1 + js/src/jit-test/tests/wasm/gc/disabled.js | 25 + .../tests/wasm/gc/externref-boxing-struct.js | 74 + .../tests/wasm/gc/externref-conversions.js | 94 + js/src/jit-test/tests/wasm/gc/final_types.js | 48 + .../jit-test/tests/wasm/gc/function_subtyping.js | 79 + js/src/jit-test/tests/wasm/gc/global-get.js | 30 + js/src/jit-test/tests/wasm/gc/globals.js | 233 + js/src/jit-test/tests/wasm/gc/i31ref.js | 164 + js/src/jit-test/tests/wasm/gc/init-expr.js | 281 + js/src/jit-test/tests/wasm/gc/ion-and-baseline.js | 88 + js/src/jit-test/tests/wasm/gc/js-boundary.js | 123 + js/src/jit-test/tests/wasm/gc/limits.js | 69 + js/src/jit-test/tests/wasm/gc/linking.js | 72 + js/src/jit-test/tests/wasm/gc/ref-eq.js | 27 + js/src/jit-test/tests/wasm/gc/ref-global.js | 96 + js/src/jit-test/tests/wasm/gc/ref-struct.js | 333 + js/src/jit-test/tests/wasm/gc/ref.js | 202 + js/src/jit-test/tests/wasm/gc/regress-1633355.js | 30 + js/src/jit-test/tests/wasm/gc/regress-1739330.js | 23 + js/src/jit-test/tests/wasm/gc/regress-1745391.js | 13 + js/src/jit-test/tests/wasm/gc/regress-1754701.js | 30 + js/src/jit-test/tests/wasm/gc/regress-1830975.js | 12 + .../jit-test/tests/wasm/gc/regress-outline-repr.js | 151 + js/src/jit-test/tests/wasm/gc/signal-null-check.js | 180 + js/src/jit-test/tests/wasm/gc/structs.js | 742 + js/src/jit-test/tests/wasm/gc/structs2.js | 243 + .../tests/wasm/gc/supertype_later_in_group.js | 15 + .../tests/wasm/gc/tables-generalized-struct.js | 48 + js/src/jit-test/tests/wasm/gc/tables.js | 167 + .../jit-test/tests/wasm/gc/trailers-gc-stress.js | 166 + js/src/jit-test/tests/wasm/gc/unreachable.js | 61 + js/src/jit-test/tests/wasm/gc/value_subtyping.js | 311 + js/src/jit-test/tests/wasm/globals-impl.js | 49 + js/src/jit-test/tests/wasm/globals.js | 558 + js/src/jit-test/tests/wasm/grow-memory.js | 45 + js/src/jit-test/tests/wasm/import-callables.js | 55 + js/src/jit-test/tests/wasm/import-export-sigs.js | 52 + js/src/jit-test/tests/wasm/import-export.js | 798 + js/src/jit-test/tests/wasm/import-gc.js | 62 + js/src/jit-test/tests/wasm/integer.js | 397 + .../jit-test/tests/wasm/ion-adhoc-multiplatform.js | 632 + js/src/jit-test/tests/wasm/ion-args.js | 141 + js/src/jit-test/tests/wasm/ion-asmjs-ctor.js | 12 + js/src/jit-test/tests/wasm/ion-debugger.js | 19 + js/src/jit-test/tests/wasm/ion-error-ool.js | 77 + js/src/jit-test/tests/wasm/ion-error-throw.js | 43 + js/src/jit-test/tests/wasm/ion-error-trace.js | 126 + js/src/jit-test/tests/wasm/ion-gc.js | 53 + js/src/jit-test/tests/wasm/ion-lazy-tables.js | 68 + js/src/jit-test/tests/wasm/ion2wasm.js | 174 + js/src/jit-test/tests/wasm/js-direct-call-wasm.js | 23 + js/src/jit-test/tests/wasm/js-reexport.js | 62 + js/src/jit-test/tests/wasm/js-types/directives.txt | 1 + .../tests/wasm/js-types/function-ctor-callable.js | 33 + .../jit-test/tests/wasm/js-types/table-js-funcs.js | 26 + js/src/jit-test/tests/wasm/large-memory.js | 328 + js/src/jit-test/tests/wasm/lazy-stubs-jitentry.js | 36 + js/src/jit-test/tests/wasm/limits.js | 249 + js/src/jit-test/tests/wasm/memory-aliasing.js | 24 + .../tests/wasm/memory-arm64-ion-codegen.js | 56 + .../tests/wasm/memory-cloning-new-global.js | 12 + js/src/jit-test/tests/wasm/memory-cloning.js | 103 + .../tests/wasm/memory-control/directives.txt | 1 + .../jit-test/tests/wasm/memory-control/disabled.js | 18 + .../tests/wasm/memory-control/memory-discard.js | 227 + .../jit-test/tests/wasm/memory-maximum-clamping.js | 32 + .../tests/wasm/memory-partial-oob-store.js | 131 + js/src/jit-test/tests/wasm/memory-sharing-off.js | 23 + js/src/jit-test/tests/wasm/memory-sharing.js | 210 + js/src/jit-test/tests/wasm/memory.js | 506 + js/src/jit-test/tests/wasm/memory64/basic.js | 1575 + js/src/jit-test/tests/wasm/memory64/data-active.js | 34 + js/src/jit-test/tests/wasm/memory64/directives.txt | 1 + .../tests/wasm/memory64/memory-copy-shared.js | 60 + js/src/jit-test/tests/wasm/memory64/memory-copy.js | 58 + .../tests/wasm/memory64/memory-fill-shared.js | 58 + js/src/jit-test/tests/wasm/memory64/memory-fill.js | 56 + js/src/jit-test/tests/wasm/memory64/memory-grow.js | 31 + js/src/jit-test/tests/wasm/memory64/memory-init.js | 45 + js/src/jit-test/tests/wasm/memory64/utility.js | 16 + .../tests/wasm/multi-memory/directives.txt | 2 + .../tests/wasm/multi-memory/memory_copy.js | 45 + .../jit-test/tests/wasm/multi-value/block-run.js | 268 + .../tests/wasm/multi-value/block-validate.js | 266 + js/src/jit-test/tests/wasm/multi-value/call-js.js | 138 + js/src/jit-test/tests/wasm/multi-value/call-ref.js | 81 + js/src/jit-test/tests/wasm/multi-value/call-run.js | 120 + .../tests/wasm/multi-value/call-validate.js | 47 + .../jit-test/tests/wasm/multi-value/directives.txt | 1 + .../tests/wasm/multi-value/ion-inlining.js | 14 + .../tests/wasm/multi-value/random-tests.js | 467 + .../tests/wasm/multi-value/regress-1597200.js | 41 + .../tests/wasm/multi-value/regress-1621645-2.js | 19 + .../tests/wasm/multi-value/regress-1621645.js | 20 + .../tests/wasm/multi-value/regress-1628417.js | 11 + .../tests/wasm/multi-value/regress-1628426.js | 22 + .../tests/wasm/multi-value/regress-1628429.js | 6 + .../tests/wasm/multi-value/regress-1628499.js | 11 + .../tests/wasm/multi-value/regress-1629496.js | 9 + .../tests/wasm/multi-value/regress-1631423.js | 15 + .../tests/wasm/multi-value/regress-1661723.js | 23 + js/src/jit-test/tests/wasm/name.js | 20 + js/src/jit-test/tests/wasm/nan-semantics.js | 199 + js/src/jit-test/tests/wasm/oom/breakpoints.js | 12 + js/src/jit-test/tests/wasm/oom/directives.txt | 1 + js/src/jit-test/tests/wasm/oom/exports.js | 11 + js/src/jit-test/tests/wasm/oom/jsapi-prototype.js | 29 + .../jit-test/tests/wasm/passive-segs-boundary.js | 442 + .../tests/wasm/passive-segs-nonboundary.js | 1188 + .../tests/wasm/passive-segs-partial-mem.js | 173 + .../tests/wasm/passive-segs-partial-table.js | 153 + js/src/jit-test/tests/wasm/profiling.js | 416 + js/src/jit-test/tests/wasm/prototypes.js | 27 + .../jit-test/tests/wasm/ref-types/directives.txt | 1 + .../tests/wasm/ref-types/externref-boxing.js | 140 + .../tests/wasm/ref-types/externref-fastpaths.js | 100 + .../wasm/ref-types/externref-global-object.js | 91 + .../wasm/ref-types/externref-global-postbarrier.js | 89 + .../wasm/ref-types/externref-global-prebarrier.js | 61 + .../tests/wasm/ref-types/externref-val-tracing.js | 10 + js/src/jit-test/tests/wasm/ref-types/externref.js | 482 + .../tests/wasm/ref-types/funcref-fastpaths.js | 76 + js/src/jit-test/tests/wasm/ref-types/funcref.js | 135 + .../ref-types/fuzz-gc-while-allocating-global.js | 3 + js/src/jit-test/tests/wasm/ref-types/ref-func.js | 290 + js/src/jit-test/tests/wasm/ref-types/stackmaps1.js | 85 + js/src/jit-test/tests/wasm/ref-types/stackmaps2.js | 132 + js/src/jit-test/tests/wasm/ref-types/stackmaps3.js | 201 + .../wasm/ref-types/stackmaps4-params-n-locals.js | 143 + js/src/jit-test/tests/wasm/ref-types/stackmaps5.js | 21 + js/src/jit-test/tests/wasm/ref-types/tables-api.js | 93 + .../jit-test/tests/wasm/ref-types/tables-fill.js | 212 + .../tests/wasm/ref-types/tables-generalized.js | 432 + .../tests/wasm/ref-types/tables-multiple.js | 465 + .../wasm/ref-types/tables-postbarrier-grow.js | 21 + .../jit-test/tests/wasm/ref-types/tables-stress.js | 46 + .../tests/wasm/regress/baseline-arm64-chunk-pop.js | 31 + .../tests/wasm/regress/baseline-builtin-abi.js | 20 + .../tests/wasm/regress/baseline-bytereg.js | 34 + .../tests/wasm/regress/baseline-extend8.js | 34 + .../wasm/regress/baseline-getglobal-scratch.js | 58 + .../tests/wasm/regress/baseline-i64-opt-cmp.js | 16 + .../tests/wasm/regress/baseline-joinreg.js | 16 + .../tests/wasm/regress/baseline-many-results.js | 63 + .../tests/wasm/regress/baseline-nops-jumptable.js | 12 + .../tests/wasm/regress/baseline-pop-along-edge.js | 66 + .../wasm/regress/baseline-pop-before-capture.js | 12 + .../tests/wasm/regress/baseline-stack-height.js | 1 + .../tests/wasm/regress/baseline-stack-height.wasm | Bin 0 -> 67032 bytes .../wasm/regress/brtable-conditionblock-folding.js | 17 + js/src/jit-test/tests/wasm/regress/bug-1833339.js | 17 + js/src/jit-test/tests/wasm/regress/bug1300546.js | 28 + js/src/jit-test/tests/wasm/regress/bug1311019.js | 9 + js/src/jit-test/tests/wasm/regress/bug1392105.js | 8 + js/src/jit-test/tests/wasm/regress/bug1440512.js | 216 + js/src/jit-test/tests/wasm/regress/bug1450800.js | 27 + js/src/jit-test/tests/wasm/regress/bug1467415.js | 29 + js/src/jit-test/tests/wasm/regress/bug1491322.js | 35 + js/src/jit-test/tests/wasm/regress/bug1502886.js | 30 + js/src/jit-test/tests/wasm/regress/bug1507314.js | 6 + js/src/jit-test/tests/wasm/regress/bug1533204.js | 10 + js/src/jit-test/tests/wasm/regress/bug1566992.js | 14 + js/src/jit-test/tests/wasm/regress/bug1569137.js | 67 + js/src/jit-test/tests/wasm/regress/bug1590920.js | 11 + js/src/jit-test/tests/wasm/regress/bug1678542.js | 11 + js/src/jit-test/tests/wasm/regress/bug1678785.js | 20 + js/src/jit-test/tests/wasm/regress/bug1684861.js | 54 + js/src/jit-test/tests/wasm/regress/bug1699647.js | 10 + js/src/jit-test/tests/wasm/regress/bug1700610.js | 8 + js/src/jit-test/tests/wasm/regress/bug1708124.js | 10 + js/src/jit-test/tests/wasm/regress/bug1713581.js | 13 + .../tests/wasm/regress/bug1727284/directives.txt | 1 + .../jit-test/tests/wasm/regress/bug1727284/test.js | 12 + js/src/jit-test/tests/wasm/regress/bug1747870.js | 19 + js/src/jit-test/tests/wasm/regress/bug1761850.js | 79 + js/src/jit-test/tests/wasm/regress/bug1762899.js | 34 + js/src/jit-test/tests/wasm/regress/bug1770335.js | 33 + .../tests/wasm/regress/bug1777604/directives.txt | 1 + .../jit-test/tests/wasm/regress/bug1777604/test.js | 35 + js/src/jit-test/tests/wasm/regress/bug1836708.js | 19 + js/src/jit-test/tests/wasm/regress/bug1837686.js | 50 + js/src/jit-test/tests/wasm/regress/bug1839065.js | 28 + js/src/jit-test/tests/wasm/regress/bug1839142.js | 6 + js/src/jit-test/tests/wasm/regress/bug1856733.js | 45 + js/src/jit-test/tests/wasm/regress/bug1857829.js | 23 + js/src/jit-test/tests/wasm/regress/bug1858982.js | 46 + .../tests/wasm/regress/builtin-import-sigs.js | 15 + .../jit-test/tests/wasm/regress/caller-property.js | 7 + .../tests/wasm/regress/current-memory-tls.js | 95 + .../tests/wasm/regress/debug-clone-segment.js | 36 + .../wasm/regress/debug-exception-in-fast-import.js | 21 + js/src/jit-test/tests/wasm/regress/debug-osr.js | 16 + js/src/jit-test/tests/wasm/regress/directives.txt | 1 + .../wasm/regress/enable-profiling-in-import.js | 9 + .../tests/wasm/regress/frame-offset-stack-arg.js | 38 + .../tests/wasm/regress/fuzzsafe-bug1645610.js | 15 + .../tests/wasm/regress/gvn-unremovable-phi.js | 20 + .../regress/imul64-ion-negative-power-of-two.js | 11 + .../tests/wasm/regress/ion-callerfp-tag.js | 28 + .../wasm/regress/ion-error-gc-fakeexitframe.js | 81 + .../wasm/regress/ion-inlinedcall-resumepoint.js | 50 + .../tests/wasm/regress/ion-lazy-stubs-jit.js | 13 + .../tests/wasm/regress/ion-many-results.js | 17 + .../tests/wasm/regress/jit-updatepcquad.js | 31 + .../jit-test/tests/wasm/regress/lazy-table-nan.js | 10 + .../jit-test/tests/wasm/regress/load-lane-oob.js | 14 + js/src/jit-test/tests/wasm/regress/long-select.js | 38 + .../tests/wasm/regress/misc-control-flow.js | 227 + .../jit-test/tests/wasm/regress/movable-traps.js | 38 + .../regress/no-directives/debugger-no-script.js | 19 + .../tests/wasm/regress/nop-fill-jit-exit.js | 28 + js/src/jit-test/tests/wasm/regress/null-call.js | 14 + .../tests/wasm/regress/null-metadata-filename.js | 20 + .../tests/wasm/regress/onlyjsiter-while-wasm.js | 13 + js/src/jit-test/tests/wasm/regress/oom-eval.js | 7 + js/src/jit-test/tests/wasm/regress/oom-init.js | 21 + .../tests/wasm/regress/oom-masm-baseline.js | 31 + .../tests/wasm/regress/oom-wasm-streaming.js | 14 + .../wasm/regress/oom-wasmtexttobinary-block.js | 7 + .../oom-wrong-argument-number-for-import-call.js | 24 + .../tests/wasm/regress/pass-stack-int64.js | 15 + .../tests/wasm/regress/proxy-get-trap-table.js | 14 + .../wasm/regress/regalloc-i64-load-store-global.js | 20 + .../jit-test/tests/wasm/regress/regalloc-muli64.js | 14 + .../jit-test/tests/wasm/regress/reserve-enough.js | 13 + .../jit-test/tests/wasm/regress/reserve-joinreg.js | 22 + .../wasm/regress/savedframe-lookup-in-wasm.js | 17 + js/src/jit-test/tests/wasm/regress/select-any.js | 41 + js/src/jit-test/tests/wasm/regress/shift-counts.js | 8 + .../tests/wasm/regress/signed-unsigned-div-mod.js | 75 + .../tests/wasm/regress/startfunc-in-table.js | 6 + .../jit-test/tests/wasm/regress/table-of-anyref.js | 9 + js/src/jit-test/tests/wasm/regress/teavm-bugs.js | 53 + .../jit-test/tests/wasm/regress/too-large-frame.js | 27 + .../tests/wasm/regress/unaligned-store64.js | 35 + .../tests/wasm/regress/upper-maximum-memory.js | 4 + js/src/jit-test/tests/wasm/resizing.js | 235 + js/src/jit-test/tests/wasm/select-int32.js | 123 + js/src/jit-test/tests/wasm/select.js | 260 + .../tests/wasm/simd/ad-hack-binop-preamble.js | 334 + js/src/jit-test/tests/wasm/simd/ad-hack-extra.js | 697 + .../jit-test/tests/wasm/simd/ad-hack-preamble.js | 211 + .../tests/wasm/simd/ad-hack-simple-binops0.js | 7 + .../tests/wasm/simd/ad-hack-simple-binops1.js | 7 + .../tests/wasm/simd/ad-hack-simple-binops2.js | 7 + .../tests/wasm/simd/ad-hack-simple-unops.js | 122 + js/src/jit-test/tests/wasm/simd/ad-hack.js | 1747 + .../tests/wasm/simd/avx2-x64-ion-codegen.js | 584 + .../tests/wasm/simd/baseline-bug1636235.js | 113 + .../tests/wasm/simd/binop-x64-ion-codegen.js | 255 + .../tests/wasm/simd/binop-x86-ion-codegen.js | 20 + .../tests/wasm/simd/bitselect-x64-ion-codegen.js | 45 + js/src/jit-test/tests/wasm/simd/cmp-bitselect.js | 107 + .../tests/wasm/simd/cmp-x64-ion-codegen.js | 77 + .../tests/wasm/simd/const-arm64-vixl-codegen.js | 109 + .../tests/wasm/simd/const-x64-ion-codegen.js | 28 + .../tests/wasm/simd/cvt-x64-ion-codegen.js | 27 + .../jit-test/tests/wasm/simd/debug-bug1644759.js | 20 + js/src/jit-test/tests/wasm/simd/directives.txt | 1 + js/src/jit-test/tests/wasm/simd/disabled.js | 28 + js/src/jit-test/tests/wasm/simd/experimental.js | 411 + js/src/jit-test/tests/wasm/simd/ion-analysis.js | 956 + js/src/jit-test/tests/wasm/simd/ion-bug1641973.js | 13 + js/src/jit-test/tests/wasm/simd/ion-bug1688262.js | 22 + js/src/jit-test/tests/wasm/simd/ion-bug1688713.js | 24 + js/src/jit-test/tests/wasm/simd/js-api.js | 130 + .../tests/wasm/simd/neg-abs-not-x64-ion-codegen.js | 34 + .../tests/wasm/simd/pairwise-x64-ion-codegen.js | 38 + .../tests/wasm/simd/pmaddubsw-x64-ion-codegen.js | 154 + .../tests/wasm/simd/reduce-x64-ion-codegen.js | 46 + js/src/jit-test/tests/wasm/simd/select.js | 33 + .../tests/wasm/simd/shift-x64-ion-codegen.js | 26 + .../tests/wasm/simd/shuffle-x86-ion-codegen.js | 88 + .../tests/wasm/simd/simd-partial-oob-store.js | 39 + .../tests/wasm/simd/splat-x64-ion-codegen.js | 29 + js/src/jit-test/tests/wasm/simd/validation.js | 368 + js/src/jit-test/tests/wasm/single-cpu.js | 23 + js/src/jit-test/tests/wasm/spec/README.md | 5 + .../wasm/spec/exception-handling/directives.txt | 1 + .../spec/exception-handling/harness/directives.txt | 1 + .../spec/exception-handling/harness/harness.js | 448 + .../tests/wasm/spec/exception-handling/tag.wast.js | 40 + .../wasm/spec/exception-handling/throw.wast.js | 94 + .../wasm/spec/exception-handling/throw_ref.wast.js | 155 + .../tests/wasm/spec/extended-const/directives.txt | 1 + .../tests/wasm/spec/extended-const/global.wast.js | 828 + .../spec/extended-const/harness/directives.txt | 1 + .../wasm/spec/extended-const/harness/harness.js | 448 + .../wasm/spec/function-references/br_if.wast.js | 886 + .../function-references/br_on_non_null.wast.js | 101 + .../spec/function-references/br_on_null.wast.js | 94 + .../wasm/spec/function-references/call_ref.wast.js | 275 + .../wasm/spec/function-references/directives.txt | 1 + .../wasm/spec/function-references/func.wast.js | 1240 + .../wasm/spec/function-references/global.wast.js | 796 + .../function-references/harness/directives.txt | 1 + .../spec/function-references/harness/harness.js | 448 + .../tests/wasm/spec/function-references/if.wast.js | 1911 + .../spec/function-references/local_get.wast.js | 279 + .../wasm/spec/function-references/ref.wast.js | 110 + .../function-references/ref_as_non_null.wast.js | 71 + .../wasm/spec/function-references/ref_func.wast.js | 156 + .../function-references/return_call_ref.wast.js | 460 + .../function-references/unreached-valid.wast.js | 109 + js/src/jit-test/tests/wasm/spec/gc/array.wast.js | 385 + .../jit-test/tests/wasm/spec/gc/array_copy.wast.js | 202 + .../jit-test/tests/wasm/spec/gc/array_fill.wast.js | 112 + .../jit-test/tests/wasm/spec/gc/binary-gc.wast.js | 30 + js/src/jit-test/tests/wasm/spec/gc/br_if.wast.js | 886 + .../jit-test/tests/wasm/spec/gc/br_on_cast.wast.js | 337 + .../tests/wasm/spec/gc/br_on_cast_fail.wast.js | 352 + .../jit-test/tests/wasm/spec/gc/comments.wast.js | 51 + js/src/jit-test/tests/wasm/spec/gc/directives.txt | 1 + js/src/jit-test/tests/wasm/spec/gc/extern.wast.js | 101 + .../tests/wasm/spec/gc/float_literals.wast.js | 776 + js/src/jit-test/tests/wasm/spec/gc/global.wast.js | 869 + .../tests/wasm/spec/gc/harness/directives.txt | 1 + .../jit-test/tests/wasm/spec/gc/harness/harness.js | 448 + js/src/jit-test/tests/wasm/spec/gc/i31.wast.js | 104 + js/src/jit-test/tests/wasm/spec/gc/if.wast.js | 1928 + .../tests/wasm/spec/gc/obsolete-keywords.wast.js | 82 + .../jit-test/tests/wasm/spec/gc/ref_cast.wast.js | 279 + js/src/jit-test/tests/wasm/spec/gc/ref_eq.wast.js | 351 + .../jit-test/tests/wasm/spec/gc/ref_null.wast.js | 127 + .../jit-test/tests/wasm/spec/gc/ref_test.wast.js | 470 + js/src/jit-test/tests/wasm/spec/gc/struct.wast.js | 271 + js/src/jit-test/tests/wasm/spec/gc/token.wast.js | 289 + .../jit-test/tests/wasm/spec/gc/type-canon.wast.js | 36 + .../tests/wasm/spec/gc/type-equivalence.wast.js | 345 + .../jit-test/tests/wasm/spec/gc/type-rec.wast.js | 189 + .../tests/wasm/spec/gc/type-subtyping.wast.js | 943 + .../tests/wasm/spec/gc/unreachable.wast.js | 424 + .../tests/wasm/spec/gc/unreached-valid.wast.js | 138 + .../tests/wasm/spec/memory64/address64.wast.js | 1025 + .../tests/wasm/spec/memory64/align64.wast.js | 1090 + .../tests/wasm/spec/memory64/directives.txt | 1 + .../tests/wasm/spec/memory64/endianness64.wast.js | 385 + .../wasm/spec/memory64/float_memory64.wast.js | 361 + .../wasm/spec/memory64/harness/directives.txt | 1 + .../tests/wasm/spec/memory64/harness/harness.js | 457 + .../tests/wasm/spec/memory64/load64.wast.js | 749 + .../tests/wasm/spec/memory64/memory64.wast.js | 324 + .../tests/wasm/spec/memory64/memory_grow64.wast.js | 199 + .../wasm/spec/memory64/memory_redundancy64.wast.js | 95 + .../tests/wasm/spec/memory64/memory_trap64.wast.js | 632 + .../tests/wasm/spec/multi-memory/address0.wast.js | 392 + .../tests/wasm/spec/multi-memory/address1.wast.js | 538 + .../tests/wasm/spec/multi-memory/align0.wast.js | 65 + .../tests/wasm/spec/multi-memory/binary0.wast.js | 88 + .../tests/wasm/spec/multi-memory/data0.wast.js | 93 + .../tests/wasm/spec/multi-memory/data1.wast.js | 170 + .../wasm/spec/multi-memory/data_drop0.wast.js | 63 + .../tests/wasm/spec/multi-memory/directives.txt | 1 + .../tests/wasm/spec/multi-memory/exports0.wast.js | 78 + .../wasm/spec/multi-memory/float_exprs0.wast.js | 80 + .../wasm/spec/multi-memory/float_exprs1.wast.js | 128 + .../wasm/spec/multi-memory/float_memory.wast.js | 361 + .../wasm/spec/multi-memory/float_memory0.wast.js | 137 + .../wasm/spec/multi-memory/harness/directives.txt | 1 + .../wasm/spec/multi-memory/harness/harness.js | 448 + .../tests/wasm/spec/multi-memory/imports0.wast.js | 73 + .../tests/wasm/spec/multi-memory/imports1.wast.js | 40 + .../tests/wasm/spec/multi-memory/imports2.wast.js | 120 + .../tests/wasm/spec/multi-memory/imports3.wast.js | 109 + .../tests/wasm/spec/multi-memory/imports4.wast.js | 93 + .../tests/wasm/spec/multi-memory/linking0.wast.js | 68 + .../tests/wasm/spec/multi-memory/linking1.wast.js | 104 + .../tests/wasm/spec/multi-memory/linking2.wast.js | 67 + .../tests/wasm/spec/multi-memory/linking3.wast.js | 120 + .../tests/wasm/spec/multi-memory/load.wast.js | 845 + .../tests/wasm/spec/multi-memory/load0.wast.js | 38 + .../tests/wasm/spec/multi-memory/load1.wast.js | 90 + .../tests/wasm/spec/multi-memory/load2.wast.js | 289 + .../wasm/spec/multi-memory/memory-multi.wast.js | 62 + .../tests/wasm/spec/multi-memory/memory.wast.js | 390 + .../wasm/spec/multi-memory/memory_copy0.wast.js | 117 + .../wasm/spec/multi-memory/memory_fill0.wast.js | 77 + .../wasm/spec/multi-memory/memory_grow.wast.js | 773 + .../wasm/spec/multi-memory/memory_init0.wast.js | 70 + .../wasm/spec/multi-memory/memory_size.wast.js | 208 + .../wasm/spec/multi-memory/memory_size0.wast.js | 49 + .../wasm/spec/multi-memory/memory_size1.wast.js | 73 + .../wasm/spec/multi-memory/memory_size2.wast.js | 90 + .../wasm/spec/multi-memory/memory_size3.wast.js | 43 + .../wasm/spec/multi-memory/memory_trap0.wast.js | 78 + .../wasm/spec/multi-memory/memory_trap1.wast.js | 602 + .../tests/wasm/spec/multi-memory/simd_load.wast.js | 295 + .../spec/multi-memory/simd_memory-multi.wast.js | 58 + .../wasm/spec/multi-memory/simd_store.wast.js | 238 + .../tests/wasm/spec/multi-memory/start0.wast.js | 73 + .../tests/wasm/spec/multi-memory/store.wast.js | 803 + .../tests/wasm/spec/multi-memory/store0.wast.js | 48 + .../tests/wasm/spec/multi-memory/store1.wast.js | 92 + .../tests/wasm/spec/multi-memory/traps0.wast.js | 80 + .../tests/wasm/spec/relaxed-simd/directives.txt | 1 + .../wasm/spec/relaxed-simd/harness/directives.txt | 1 + .../wasm/spec/relaxed-simd/harness/harness.js | 448 + .../relaxed-simd/i16x8_relaxed_q15mulr_s.wast.js | 49 + .../spec/relaxed-simd/i32x4_relaxed_trunc.wast.js | 338 + .../relaxed-simd/i8x16_relaxed_swizzle.wast.js | 90 + .../spec/relaxed-simd/relaxed_dot_product.wast.js | 139 + .../spec/relaxed-simd/relaxed_laneselect.wast.js | 179 + .../spec/relaxed-simd/relaxed_madd_nmadd.wast.js | 325 + .../wasm/spec/relaxed-simd/relaxed_min_max.wast.js | 663 + .../jit-test/tests/wasm/spec/spec/address.wast.js | 1082 + js/src/jit-test/tests/wasm/spec/spec/block.wast.js | 1878 + js/src/jit-test/tests/wasm/spec/spec/br.wast.js | 839 + js/src/jit-test/tests/wasm/spec/spec/br_if.wast.js | 886 + js/src/jit-test/tests/wasm/spec/spec/bulk.wast.js | 499 + js/src/jit-test/tests/wasm/spec/spec/call.wast.js | 683 + .../tests/wasm/spec/spec/call_indirect.wast.js | 1256 + .../jit-test/tests/wasm/spec/spec/comments.wast.js | 34 + js/src/jit-test/tests/wasm/spec/spec/const.wast.js | 3114 + .../tests/wasm/spec/spec/conversions.wast.js | 3109 + .../jit-test/tests/wasm/spec/spec/custom.wast.js | 157 + .../jit-test/tests/wasm/spec/spec/directives.txt | 1 + .../tests/wasm/spec/spec/endianness.wast.js | 385 + js/src/jit-test/tests/wasm/spec/spec/f32.wast.js | 18629 ++++ .../tests/wasm/spec/spec/f32_bitwise.wast.js | 2688 + .../jit-test/tests/wasm/spec/spec/f32_cmp.wast.js | 17342 ++++ js/src/jit-test/tests/wasm/spec/spec/f64.wast.js | 20658 +++++ .../tests/wasm/spec/spec/f64_bitwise.wast.js | 3032 + .../jit-test/tests/wasm/spec/spec/f64_cmp.wast.js | 18854 ++++ js/src/jit-test/tests/wasm/spec/spec/fac.wast.js | 139 + .../tests/wasm/spec/spec/float_exprs.wast.js | 7295 ++ .../tests/wasm/spec/spec/float_literals.wast.js | 764 + .../tests/wasm/spec/spec/float_memory.wast.js | 361 + .../tests/wasm/spec/spec/float_misc.wast.js | 3679 + .../jit-test/tests/wasm/spec/spec/forward.wast.js | 45 + js/src/jit-test/tests/wasm/spec/spec/func.wast.js | 1218 + .../tests/wasm/spec/spec/func_ptrs.wast.js | 191 + .../jit-test/tests/wasm/spec/spec/global.wast.js | 809 + .../tests/wasm/spec/spec/harness/directives.txt | 1 + .../tests/wasm/spec/spec/harness/harness.js | 448 + js/src/jit-test/tests/wasm/spec/spec/i32.wast.js | 1967 + js/src/jit-test/tests/wasm/spec/spec/i64.wast.js | 1600 + js/src/jit-test/tests/wasm/spec/spec/if.wast.js | 1911 + .../tests/wasm/spec/spec/inline-module.wast.js | 20 + .../tests/wasm/spec/spec/int_exprs.wast.js | 534 + .../tests/wasm/spec/spec/int_literals.wast.js | 233 + .../jit-test/tests/wasm/spec/spec/labels.wast.js | 400 + .../tests/wasm/spec/spec/left-to-right.wast.js | 482 + js/src/jit-test/tests/wasm/spec/spec/load.wast.js | 749 + .../tests/wasm/spec/spec/local_get.wast.js | 279 + .../tests/wasm/spec/spec/local_set.wast.js | 442 + .../tests/wasm/spec/spec/local_tee.wast.js | 806 + js/src/jit-test/tests/wasm/spec/spec/loop.wast.js | 986 + .../jit-test/tests/wasm/spec/spec/memory.wast.js | 399 + .../tests/wasm/spec/spec/memory_copy.wast.js | 14165 +++ .../tests/wasm/spec/spec/memory_fill.wast.js | 865 + .../tests/wasm/spec/spec/memory_grow.wast.js | 555 + .../tests/wasm/spec/spec/memory_init.wast.js | 1409 + .../tests/wasm/spec/spec/memory_redundancy.wast.js | 95 + .../tests/wasm/spec/spec/memory_size.wast.js | 174 + js/src/jit-test/tests/wasm/spec/spec/names.wast.js | 2158 + js/src/jit-test/tests/wasm/spec/spec/nop.wast.js | 593 + .../jit-test/tests/wasm/spec/spec/ref_func.wast.js | 156 + .../tests/wasm/spec/spec/ref_is_null.wast.js | 97 + .../jit-test/tests/wasm/spec/spec/ref_null.wast.js | 31 + .../jit-test/tests/wasm/spec/spec/return.wast.js | 636 + .../tests/wasm/spec/spec/simd_address.wast.js | 348 + .../tests/wasm/spec/spec/simd_bit_shift.wast.js | 2102 + .../tests/wasm/spec/spec/simd_bitwise.wast.js | 2769 + .../tests/wasm/spec/spec/simd_boolean.wast.js | 2455 + .../tests/wasm/spec/spec/simd_const.wast.js | 4681 + .../tests/wasm/spec/spec/simd_conversions.wast.js | 3341 + .../tests/wasm/spec/spec/simd_f32x4.wast.js | 18269 ++++ .../tests/wasm/spec/spec/simd_f32x4_arith.wast.js | 45212 +++++++++ .../tests/wasm/spec/spec/simd_f32x4_cmp.wast.js | 47701 ++++++++++ .../wasm/spec/spec/simd_f32x4_pmin_pmax.wast.js | 92356 +++++++++++++++++++ .../wasm/spec/spec/simd_f32x4_rounding.wast.js | 3432 + .../tests/wasm/spec/spec/simd_f64x2.wast.js | 13218 +++ .../tests/wasm/spec/spec/simd_f64x2_arith.wast.js | 32018 +++++++ .../tests/wasm/spec/spec/simd_f64x2_cmp.wast.js | 43747 +++++++++ .../wasm/spec/spec/simd_f64x2_pmin_pmax.wast.js | 64564 +++++++++++++ .../wasm/spec/spec/simd_f64x2_rounding.wast.js | 2210 + .../tests/wasm/spec/spec/simd_i16x8_arith.wast.js | 1801 + .../tests/wasm/spec/spec/simd_i16x8_arith2.wast.js | 1558 + .../tests/wasm/spec/spec/simd_i16x8_cmp.wast.js | 4369 + .../spec/simd_i16x8_extadd_pairwise_i8x16.wast.js | 184 + .../wasm/spec/spec/simd_i16x8_extmul_i8x16.wast.js | 1066 + .../spec/spec/simd_i16x8_q15mulr_sat_s.wast.js | 283 + .../wasm/spec/spec/simd_i16x8_sat_arith.wast.js | 2150 + .../tests/wasm/spec/spec/simd_i32x4_arith.wast.js | 1801 + .../tests/wasm/spec/spec/simd_i32x4_arith2.wast.js | 1279 + .../tests/wasm/spec/spec/simd_i32x4_cmp.wast.js | 4369 + .../wasm/spec/spec/simd_i32x4_dot_i16x8.wast.js | 283 + .../spec/simd_i32x4_extadd_pairwise_i16x8.wast.js | 184 + .../wasm/spec/spec/simd_i32x4_extmul_i16x8.wast.js | 1066 + .../spec/spec/simd_i32x4_trunc_sat_f32x4.wast.js | 1016 + .../spec/spec/simd_i32x4_trunc_sat_f64x2.wast.js | 940 + .../tests/wasm/spec/spec/simd_i64x2_arith.wast.js | 1753 + .../tests/wasm/spec/spec/simd_i64x2_arith2.wast.js | 149 + .../tests/wasm/spec/spec/simd_i64x2_cmp.wast.js | 980 + .../wasm/spec/spec/simd_i64x2_extmul_i32x4.wast.js | 1066 + .../tests/wasm/spec/spec/simd_i8x16_arith.wast.js | 1457 + .../tests/wasm/spec/spec/simd_i8x16_arith2.wast.js | 2263 + .../tests/wasm/spec/spec/simd_i8x16_cmp.wast.js | 4989 + .../wasm/spec/spec/simd_i8x16_sat_arith.wast.js | 2430 + .../wasm/spec/spec/simd_int_to_int_extend.wast.js | 2026 + .../tests/wasm/spec/spec/simd_lane.wast.js | 4349 + .../tests/wasm/spec/spec/simd_load.wast.js | 295 + .../tests/wasm/spec/spec/simd_load16_lane.wast.js | 424 + .../tests/wasm/spec/spec/simd_load32_lane.wast.js | 228 + .../tests/wasm/spec/spec/simd_load64_lane.wast.js | 156 + .../tests/wasm/spec/spec/simd_load8_lane.wast.js | 704 + .../tests/wasm/spec/spec/simd_load_extend.wast.js | 726 + .../tests/wasm/spec/spec/simd_load_splat.wast.js | 750 + .../tests/wasm/spec/spec/simd_load_zero.wast.js | 264 + .../tests/wasm/spec/spec/simd_splat.wast.js | 1607 + .../tests/wasm/spec/spec/simd_store.wast.js | 238 + .../tests/wasm/spec/spec/simd_store16_lane.wast.js | 512 + .../tests/wasm/spec/spec/simd_store32_lane.wast.js | 320 + .../tests/wasm/spec/spec/simd_store64_lane.wast.js | 214 + .../tests/wasm/spec/spec/simd_store8_lane.wast.js | 736 + .../wasm/spec/spec/skip-stack-guard-page.wast.js | 2320 + js/src/jit-test/tests/wasm/spec/spec/stack.wast.js | 263 + js/src/jit-test/tests/wasm/spec/spec/start.wast.js | 150 + js/src/jit-test/tests/wasm/spec/spec/store.wast.js | 583 + .../jit-test/tests/wasm/spec/spec/switch.wast.js | 220 + .../tests/wasm/spec/spec/table-sub.wast.js | 40 + .../tests/wasm/spec/spec/table_copy.wast.js | 6436 ++ .../tests/wasm/spec/spec/table_fill.wast.js | 238 + .../tests/wasm/spec/spec/table_get.wast.js | 126 + .../tests/wasm/spec/spec/table_grow.wast.js | 271 + .../tests/wasm/spec/spec/table_init.wast.js | 3674 + .../tests/wasm/spec/spec/table_set.wast.js | 177 + .../tests/wasm/spec/spec/table_size.wast.js | 172 + js/src/jit-test/tests/wasm/spec/spec/token.wast.js | 22 + .../jit-test/tests/wasm/spec/spec/tokens.wast.js | 283 + js/src/jit-test/tests/wasm/spec/spec/traps.wast.js | 200 + js/src/jit-test/tests/wasm/spec/spec/type.wast.js | 66 + .../tests/wasm/spec/spec/unreachable.wast.js | 424 + .../tests/wasm/spec/spec/unreached-valid.wast.js | 88 + .../jit-test/tests/wasm/spec/spec/unwind.wast.js | 373 + .../tests/wasm/spec/spec/utf8-import-field.wast.js | 2656 + .../wasm/spec/spec/utf8-import-module.wast.js | 2656 + .../wasm/spec/spec/utf8-invalid-encoding.wast.js | 1033 + .../tests/wasm/spec/tail-call/directives.txt | 1 + .../wasm/spec/tail-call/harness/directives.txt | 1 + .../tests/wasm/spec/tail-call/harness/harness.js | 448 + .../tests/wasm/spec/tail-call/return_call.wast.js | 283 + .../spec/tail-call/return_call_indirect.wast.js | 591 + js/src/jit-test/tests/wasm/stack.js | 67 + js/src/jit-test/tests/wasm/start.js | 49 + js/src/jit-test/tests/wasm/stealing.js | 17 + js/src/jit-test/tests/wasm/streaming.js | 99 + js/src/jit-test/tests/wasm/table-gc.js | 221 + js/src/jit-test/tests/wasm/table-pre-barrier.js | 22 + js/src/jit-test/tests/wasm/tables.js | 400 + .../jit-test/tests/wasm/tail-calls/bug1851568.js | 20 + .../jit-test/tests/wasm/tail-calls/bug1862473.js | 24 + .../jit-test/tests/wasm/tail-calls/bug1865044.js | 34 + .../jit-test/tests/wasm/tail-calls/bug1871605.js | 30 + .../jit-test/tests/wasm/tail-calls/bug1871606.js | 22 + .../jit-test/tests/wasm/tail-calls/bug1871951.js | 75 + .../jit-test/tests/wasm/tail-calls/directives.txt | 1 + .../jit-test/tests/wasm/tail-calls/exceptions.js | 54 + js/src/jit-test/tests/wasm/tail-calls/gc.js | 220 + js/src/jit-test/tests/wasm/tail-calls/litmus0.js | 24 + js/src/jit-test/tests/wasm/tail-calls/litmus1.js | 32 + js/src/jit-test/tests/wasm/tail-calls/litmus10.js | 59 + js/src/jit-test/tests/wasm/tail-calls/litmus11.js | 66 + js/src/jit-test/tests/wasm/tail-calls/litmus12.js | 41 + js/src/jit-test/tests/wasm/tail-calls/litmus13.js | 79 + js/src/jit-test/tests/wasm/tail-calls/litmus15.js | 72 + js/src/jit-test/tests/wasm/tail-calls/litmus16.js | 94 + js/src/jit-test/tests/wasm/tail-calls/litmus17.js | 27 + js/src/jit-test/tests/wasm/tail-calls/litmus2.js | 36 + js/src/jit-test/tests/wasm/tail-calls/litmus3.js | 36 + js/src/jit-test/tests/wasm/tail-calls/litmus4.js | 43 + js/src/jit-test/tests/wasm/tail-calls/litmus5.js | 68 + js/src/jit-test/tests/wasm/tail-calls/litmus6.js | 24 + js/src/jit-test/tests/wasm/tail-calls/litmus7.js | 29 + js/src/jit-test/tests/wasm/tail-calls/litmus8.js | 38 + js/src/jit-test/tests/wasm/tail-calls/litmus9.js | 42 + .../wasm/tail-calls/return-call-indirect-syntax.js | 117 + .../tail-calls/return-call-indirect-validate.js | 243 + .../tests/wasm/tail-calls/return-call-profiling.js | 68 + .../tests/wasm/tail-calls/return-call-validate.js | 162 + .../jit-test/tests/wasm/tail-calls/return_call.js | 305 + .../tests/wasm/tail-calls/return_call_indirect.js | 156 + .../tests/wasm/tail-calls/return_call_ref.js | 94 + js/src/jit-test/tests/wasm/text.js | 123 + js/src/jit-test/tests/wasm/timeout/1.js | 15 + js/src/jit-test/tests/wasm/timeout/2.js | 30 + .../tests/wasm/timeout/debug-interrupt-1.js | 23 + .../tests/wasm/timeout/debug-interrupt-2.js | 28 + .../tests/wasm/timeout/debug-noprofiling.js | 31 + js/src/jit-test/tests/wasm/timeout/directives.txt | 2 + .../timeout/interrupt-multi-instance-activation.js | 28 + .../wasm/timeout/interrupt-several-instances.js | 21 + .../jit-test/tests/wasm/timeout/stack-overflow.js | 97 + .../jit-test/tests/wasm/timeout/while-profiling.js | 19 + .../tests/wasm/trap-exit-stack-alignment.js | 123 + js/src/jit-test/tests/wasm/ub-san-interp-entry.js | 4 + js/src/jit-test/tests/wasm/udiv.js | 68 + js/src/jit-test/tests/wasm/unsupported/README.md | 1 + .../tests/wasm/unsupported/requires-armv7.js | 5 + .../wasm/unsupported/requires-floatingpoint.js | 4 + js/src/jit-test/tests/wasm/utf8.js | 36 + js/src/jit-test/tests/wasm/validate.js | 23 + js/src/jit-test/tests/wasm/wasm-abi.js | 39 + .../jit-test/tests/wasm/widening-i32-after-call.js | 50 + js/src/jit-test/tests/wasm/worker-kill.js | 10 + js/src/jit-test/tests/watchtower/basic.js | 87 + js/src/jit-test/tests/watchtower/bug-1871949.js | 19 + .../tests/watchtower/megamorphic-has-prop.js | 33 + .../tests/watchtower/megamorphic-invalidate.js | 81 + .../watchtower/megamorphic-long-proto-chain.js | 28 + .../tests/watchtower/property-modification.js | 36 + js/src/jit-test/tests/xdr/asm.js | 19 + js/src/jit-test/tests/xdr/async-lazy.js | 24 + js/src/jit-test/tests/xdr/async.js | 35 + js/src/jit-test/tests/xdr/bigint.js | 10 + js/src/jit-test/tests/xdr/bug1186973.js | 17 + js/src/jit-test/tests/xdr/bug1390856.js | 9 + js/src/jit-test/tests/xdr/bug1427860.js | 12 + js/src/jit-test/tests/xdr/bug1585158.js | 12 + js/src/jit-test/tests/xdr/bug1607895.js | 7 + js/src/jit-test/tests/xdr/bug1790615.js | 19 + js/src/jit-test/tests/xdr/class-relazify.js | 15 + js/src/jit-test/tests/xdr/classes.js | 36 + js/src/jit-test/tests/xdr/debug-hook.js | 20 + js/src/jit-test/tests/xdr/debug-lazy.js | 19 + js/src/jit-test/tests/xdr/decode-off-thread.js | 54 + js/src/jit-test/tests/xdr/delazifications-atoms.js | 14 + js/src/jit-test/tests/xdr/delazifications-nest.js | 70 + .../tests/xdr/delazify-findScript-lineCount.js | 54 + .../xdr/delazify-findScript-parameterNames.js | 54 + js/src/jit-test/tests/xdr/force-full-parse.js | 19 + js/src/jit-test/tests/xdr/function-flags.js | 40 + js/src/jit-test/tests/xdr/incremental-encoder.js | 66 + js/src/jit-test/tests/xdr/incremental-oom.js | 10 + js/src/jit-test/tests/xdr/lazy-class-definition.js | 51 + js/src/jit-test/tests/xdr/lazy.js | 164 + js/src/jit-test/tests/xdr/load-nonsyntactic.js | 55 + js/src/jit-test/tests/xdr/module-exports.js | 19 + js/src/jit-test/tests/xdr/module-imports.js | 25 + js/src/jit-test/tests/xdr/module-oom.js | 26 + js/src/jit-test/tests/xdr/module.js | 92 + js/src/jit-test/tests/xdr/off-thread-inner-fcn.js | 11 + js/src/jit-test/tests/xdr/option-mismatch.js | 23 + js/src/jit-test/tests/xdr/private-fields.js | 9 + js/src/jit-test/tests/xdr/relazify.js | 31 + js/src/jit-test/tests/xdr/runonce.js | 6 + js/src/jit-test/tests/xdr/scope.js | 19 + js/src/jit-test/tests/xdr/script-source-fields.js | 23 + js/src/jit-test/tests/xdr/share-bytecode.js | 12 + js/src/jit-test/tests/xdr/stencil-arg.js | 25 + .../tests/xdr/stencil-can-lazily-parse-mismatch.js | 71 + js/src/jit-test/tests/xdr/stencil-oom.js | 12 + js/src/jit-test/tests/xdr/stencil.js | 99 + .../tests/xdr/tagged-template-literals-2.js | 4 + .../jit-test/tests/xdr/tagged-template-literals.js | 4 + js/src/jit-test/tests/xdr/trivial.js | 46 + 7973 files changed, 928851 insertions(+) create mode 100644 js/src/jit-test/tests/1659595.js create mode 100644 js/src/jit-test/tests/Set/NaN-as-key.js create mode 100644 js/src/jit-test/tests/Set/bug1729269.js create mode 100644 js/src/jit-test/tests/Set/forEach-selfhosted-behavior.js create mode 100644 js/src/jit-test/tests/Set/getter-name.js create mode 100644 js/src/jit-test/tests/Set/iterator-thisv-error.js create mode 100644 js/src/jit-test/tests/Set/non-iterable-error.js create mode 100644 js/src/jit-test/tests/Set/symbols.js create mode 100644 js/src/jit-test/tests/arguments/access-formals.js create mode 100644 js/src/jit-test/tests/arguments/alias-function-closed.js create mode 100644 js/src/jit-test/tests/arguments/alias-function-not-closed.js create mode 100644 js/src/jit-test/tests/arguments/apply-args-obj-01.js create mode 100644 js/src/jit-test/tests/arguments/apply-args-obj-02.js create mode 100644 js/src/jit-test/tests/arguments/apply-args-obj-03.js create mode 100644 js/src/jit-test/tests/arguments/apply-args-obj-04.js create mode 100644 js/src/jit-test/tests/arguments/apply-closed-over-arguments-strict.js create mode 100644 js/src/jit-test/tests/arguments/apply-closed-over-arguments.js create mode 100644 js/src/jit-test/tests/arguments/apply-redefine-length.js create mode 100644 js/src/jit-test/tests/arguments/args-attributes.js create mode 100644 js/src/jit-test/tests/arguments/args-createontrace.js create mode 100644 js/src/jit-test/tests/arguments/args-exists-own.js create mode 100644 js/src/jit-test/tests/arguments/args-exists.js create mode 100644 js/src/jit-test/tests/arguments/args-mochi-2.js create mode 100644 js/src/jit-test/tests/arguments/args-mochi-2a.js create mode 100644 js/src/jit-test/tests/arguments/args-mochi.js create mode 100644 js/src/jit-test/tests/arguments/args-mutate-length-1.js create mode 100644 js/src/jit-test/tests/arguments/args-mutate-length-2.js create mode 100644 js/src/jit-test/tests/arguments/args-mutate-proto-1.js create mode 100644 js/src/jit-test/tests/arguments/args-mutate-proto-2.js create mode 100644 js/src/jit-test/tests/arguments/args-mutate-proto-3.js create mode 100644 js/src/jit-test/tests/arguments/args-mutate-proto-4.js create mode 100644 js/src/jit-test/tests/arguments/args-range-2.js create mode 100644 js/src/jit-test/tests/arguments/args-range-const.js create mode 100644 js/src/jit-test/tests/arguments/args-range.js create mode 100644 js/src/jit-test/tests/arguments/args-redefine-iterator-1.js create mode 100644 js/src/jit-test/tests/arguments/args-redefine-iterator-2.js create mode 100644 js/src/jit-test/tests/arguments/args-redefine-length-1.js create mode 100644 js/src/jit-test/tests/arguments/args-redefine-length-2.js create mode 100644 js/src/jit-test/tests/arguments/args-redefine-length-3.js create mode 100644 js/src/jit-test/tests/arguments/args-redefine-length-4.js create mode 100644 js/src/jit-test/tests/arguments/args-redefine-length-5.js create mode 100644 js/src/jit-test/tests/arguments/args-redefine-length-6.js create mode 100644 js/src/jit-test/tests/arguments/args-redefine-length-7.js create mode 100644 js/src/jit-test/tests/arguments/args-sum.js create mode 100644 js/src/jit-test/tests/arguments/args-vargc.js create mode 100644 js/src/jit-test/tests/arguments/args1.js create mode 100644 js/src/jit-test/tests/arguments/args10.js create mode 100644 js/src/jit-test/tests/arguments/args11.js create mode 100644 js/src/jit-test/tests/arguments/args2.js create mode 100644 js/src/jit-test/tests/arguments/args2a.js create mode 100644 js/src/jit-test/tests/arguments/args2b.js create mode 100644 js/src/jit-test/tests/arguments/args2c.js create mode 100644 js/src/jit-test/tests/arguments/args2d.js create mode 100644 js/src/jit-test/tests/arguments/args3.js create mode 100644 js/src/jit-test/tests/arguments/args4.js create mode 100644 js/src/jit-test/tests/arguments/args5.js create mode 100644 js/src/jit-test/tests/arguments/args6.js create mode 100644 js/src/jit-test/tests/arguments/args6a.js create mode 100644 js/src/jit-test/tests/arguments/args7.js create mode 100644 js/src/jit-test/tests/arguments/args8.js create mode 100644 js/src/jit-test/tests/arguments/args9.js create mode 100644 js/src/jit-test/tests/arguments/argsub.js create mode 100644 js/src/jit-test/tests/arguments/argsx-1.js create mode 100644 js/src/jit-test/tests/arguments/argsx-2.js create mode 100644 js/src/jit-test/tests/arguments/argsx-3.js create mode 100644 js/src/jit-test/tests/arguments/argsx-3a.js create mode 100644 js/src/jit-test/tests/arguments/argsx-4.js create mode 100644 js/src/jit-test/tests/arguments/arguments-on-proto.js create mode 100644 js/src/jit-test/tests/arguments/bug-917585-relax-aliasing-constraints.js create mode 100644 js/src/jit-test/tests/arguments/bug1051760.js create mode 100644 js/src/jit-test/tests/arguments/bug1227287.js create mode 100644 js/src/jit-test/tests/arguments/bug1423937.js create mode 100644 js/src/jit-test/tests/arguments/bug1503071.js create mode 100644 js/src/jit-test/tests/arguments/bug1621265.js create mode 100644 js/src/jit-test/tests/arguments/bug1692833.js create mode 100644 js/src/jit-test/tests/arguments/bug1696181.js create mode 100644 js/src/jit-test/tests/arguments/bug1711414.js create mode 100644 js/src/jit-test/tests/arguments/bug1749460.js create mode 100644 js/src/jit-test/tests/arguments/bug1762575-1.js create mode 100644 js/src/jit-test/tests/arguments/bug1762575-2.js create mode 100644 js/src/jit-test/tests/arguments/bug1762575-3.js create mode 100644 js/src/jit-test/tests/arguments/bug1825907.js create mode 100644 js/src/jit-test/tests/arguments/bug1827073.js create mode 100644 js/src/jit-test/tests/arguments/bug503772.js create mode 100644 js/src/jit-test/tests/arguments/bug508178.js create mode 100644 js/src/jit-test/tests/arguments/bug633020.js create mode 100644 js/src/jit-test/tests/arguments/bug843985.js create mode 100644 js/src/jit-test/tests/arguments/bug956173.js create mode 100644 js/src/jit-test/tests/arguments/defaults-basic.js create mode 100644 js/src/jit-test/tests/arguments/defaults-bound-to-function.js create mode 100644 js/src/jit-test/tests/arguments/defaults-bug759904.js create mode 100644 js/src/jit-test/tests/arguments/defaults-call-function.js create mode 100644 js/src/jit-test/tests/arguments/defaults-destructuring-array.js create mode 100644 js/src/jit-test/tests/arguments/defaults-destructuring-expression-closure.js create mode 100644 js/src/jit-test/tests/arguments/defaults-destructuring-function-expression.js create mode 100644 js/src/jit-test/tests/arguments/defaults-destructuring-mixed-default-value.js create mode 100644 js/src/jit-test/tests/arguments/defaults-destructuring-mixed.js create mode 100644 js/src/jit-test/tests/arguments/defaults-destructuring-object.js create mode 100644 js/src/jit-test/tests/arguments/defaults-destructuring-with-rest.js create mode 100644 js/src/jit-test/tests/arguments/defaults-evaluation-order.js create mode 100644 js/src/jit-test/tests/arguments/defaults-exceptions.js create mode 100644 js/src/jit-test/tests/arguments/defaults-invalid-syntax.js create mode 100644 js/src/jit-test/tests/arguments/defaults-scoping.js create mode 100644 js/src/jit-test/tests/arguments/defaults-strict-mode.js create mode 100644 js/src/jit-test/tests/arguments/defaults-with-arguments.js create mode 100644 js/src/jit-test/tests/arguments/defaults-with-rest.js create mode 100644 js/src/jit-test/tests/arguments/destructuring-after-defaults.js create mode 100644 js/src/jit-test/tests/arguments/destructuring-default-value-scope.js create mode 100644 js/src/jit-test/tests/arguments/destructuring-exprbody.js create mode 100644 js/src/jit-test/tests/arguments/destructuring-with-rest.js create mode 100644 js/src/jit-test/tests/arguments/dynamicBindings.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-apply-forwarded.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-apply.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-callee.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-element-deleted-exists-oob.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-element-deleted-exists.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-element-deleted-oob.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-element-deleted.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-element-exists-oob.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-element-exists.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-element-oob.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-element.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-inlined-apply.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-inlined-slice-1.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-inlined-slice-2.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-inlined-slice-3.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-inlined-slice-4.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-inlined-spread.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-length.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-mutate-callee.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-set-length.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-slice-1.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-slice-2.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-slice-3.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-slice-4.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-1.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-2.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-3.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-4.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-spread-forwarded.js create mode 100644 js/src/jit-test/tests/arguments/external-arguments-spread.js create mode 100644 js/src/jit-test/tests/arguments/function_dot_caller_restrictions.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-apply-rectifier.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-apply.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-callee.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-escaped-apply.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-escaped-index-constant-exists.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-escaped-index-constant-oob.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-escaped-index-constant.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-escaped-index-var.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-escaped-length.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-escaped-new-spread-optimization.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-1.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-2.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-3.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-4.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-escaped-spread-optimization.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-exists-negative-index-1.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-exists-negative-index-2.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-formals.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-index-constant-exists.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-index-constant-oob.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-index-constant.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-index-var.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-length.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-new-spread-optimization-rectifier.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-new-spread-optimization.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-oob-negative-index-1.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-oob-negative-index-2.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-profiler.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-slice-1.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-slice-2.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-slice-3.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-slice-4.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-slice-5.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-1.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-2.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-3.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-4.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-spread-optimization-rectifier.js create mode 100644 js/src/jit-test/tests/arguments/inline-arguments-spread-optimization.js create mode 100644 js/src/jit-test/tests/arguments/inline-rest-array-creation.js create mode 100644 js/src/jit-test/tests/arguments/inline-transpile.js create mode 100644 js/src/jit-test/tests/arguments/iterator-set-and-redefine.js create mode 100644 js/src/jit-test/tests/arguments/mapped-define.js create mode 100644 js/src/jit-test/tests/arguments/mapped-freeze.js create mode 100644 js/src/jit-test/tests/arguments/mapped-unmapped-args.js create mode 100644 js/src/jit-test/tests/arguments/nonstrict-args.js create mode 100644 js/src/jit-test/tests/arguments/nonstrict-assign-element-get-parameter.js create mode 100644 js/src/jit-test/tests/arguments/nonstrict-assign-parameter-get-element.js create mode 100644 js/src/jit-test/tests/arguments/nonstrict-assign.js create mode 100644 js/src/jit-test/tests/arguments/nonstrict-later-assign.js create mode 100644 js/src/jit-test/tests/arguments/nonstrict-noargs.js create mode 100644 js/src/jit-test/tests/arguments/polymorphic-getelem.js create mode 100644 js/src/jit-test/tests/arguments/recover-osr-arguments-oob.js create mode 100644 js/src/jit-test/tests/arguments/recover-osr-arguments.js create mode 100644 js/src/jit-test/tests/arguments/recover-spread-opt-arguments-after-bail.js create mode 100644 js/src/jit-test/tests/arguments/redefine-callee.js create mode 100644 js/src/jit-test/tests/arguments/rest-alias-function.js create mode 100644 js/src/jit-test/tests/arguments/rest-arguments-as-parameters.js create mode 100644 js/src/jit-test/tests/arguments/rest-basic.js create mode 100644 js/src/jit-test/tests/arguments/rest-bug763954.js create mode 100644 js/src/jit-test/tests/arguments/rest-debugger.js create mode 100644 js/src/jit-test/tests/arguments/rest-disallow-arguments-strict.js create mode 100644 js/src/jit-test/tests/arguments/rest-in-Function.js create mode 100644 js/src/jit-test/tests/arguments/rest-invalid-syntax.js create mode 100644 js/src/jit-test/tests/arguments/rest-nested-arguments.js create mode 100644 js/src/jit-test/tests/arguments/rest-nested.js create mode 100644 js/src/jit-test/tests/arguments/rest-underflow.js create mode 100644 js/src/jit-test/tests/arguments/rest-with-arguments.js create mode 100644 js/src/jit-test/tests/arguments/slice-args-obj-01.js create mode 100644 js/src/jit-test/tests/arguments/slice-args-obj-02.js create mode 100644 js/src/jit-test/tests/arguments/slice-args-obj-03.js create mode 100644 js/src/jit-test/tests/arguments/slice-args-obj-04.js create mode 100644 js/src/jit-test/tests/arguments/slice-closed-over-arguments-strict.js create mode 100644 js/src/jit-test/tests/arguments/slice-closed-over-arguments.js create mode 100644 js/src/jit-test/tests/arguments/slice-redefine-length.js create mode 100644 js/src/jit-test/tests/arguments/slice.js create mode 100644 js/src/jit-test/tests/arguments/spread-args-obj-01.js create mode 100644 js/src/jit-test/tests/arguments/spread-args-obj-02.js create mode 100644 js/src/jit-test/tests/arguments/spread-args-obj-03.js create mode 100644 js/src/jit-test/tests/arguments/spread-args-obj-04.js create mode 100644 js/src/jit-test/tests/arguments/spread-call-optimization.js create mode 100644 js/src/jit-test/tests/arguments/spread-closed-over-arguments-strict.js create mode 100644 js/src/jit-test/tests/arguments/spread-closed-over-arguments.js create mode 100644 js/src/jit-test/tests/arguments/spread-redefine-length.js create mode 100644 js/src/jit-test/tests/arguments/strict-args-flushstack.js create mode 100644 js/src/jit-test/tests/arguments/strict-args-generator-flushstack.js create mode 100644 js/src/jit-test/tests/arguments/strict-args.js create mode 100644 js/src/jit-test/tests/arguments/strict-assign-after.js create mode 100644 js/src/jit-test/tests/arguments/strict-assign-arguments-element.js create mode 100644 js/src/jit-test/tests/arguments/strict-assign-outer-param-psych.js create mode 100644 js/src/jit-test/tests/arguments/strict-assign-outer-param.js create mode 100644 js/src/jit-test/tests/arguments/strict-assign-parameter-get-element.js create mode 100644 js/src/jit-test/tests/arguments/strict-assign.js create mode 100644 js/src/jit-test/tests/arguments/strict-eval-mutation.js create mode 100644 js/src/jit-test/tests/arguments/strict-eval.js create mode 100644 js/src/jit-test/tests/arguments/strict-maybe-assign-outer.js create mode 100644 js/src/jit-test/tests/arguments/strict-maybe-nested-eval.js create mode 100644 js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function-call.js create mode 100644 js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function-name.js create mode 100644 js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function.js create mode 100644 js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-catch-call.js create mode 100644 js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-catch.js create mode 100644 js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-var.js create mode 100644 js/src/jit-test/tests/arguments/strict-nested-eval.js create mode 100644 js/src/jit-test/tests/arguments/strict-nested-shadow-eval.js create mode 100644 js/src/jit-test/tests/arguments/strict-nested-shadow-maybe-eval.js create mode 100644 js/src/jit-test/tests/arguments/strict-noargs.js create mode 100644 js/src/jit-test/tests/arguments/strict-osr-shadowed-args.js create mode 100644 js/src/jit-test/tests/arguments/testDelArg1.js create mode 100644 js/src/jit-test/tests/arguments/testDelArg2.js create mode 100644 js/src/jit-test/tests/arguments/testDelArg3.js create mode 100644 js/src/jit-test/tests/arguments/testDelArg3Strict.js create mode 100644 js/src/jit-test/tests/arrays/apply-optimization.js create mode 100644 js/src/jit-test/tests/arrays/bug-1811789.js create mode 100644 js/src/jit-test/tests/arrays/bug1423173.js create mode 100644 js/src/jit-test/tests/arrays/bug1673221.js create mode 100644 js/src/jit-test/tests/arrays/bug1693328.js create mode 100644 js/src/jit-test/tests/arrays/change-array-by-copy.js create mode 100644 js/src/jit-test/tests/arrays/defineProperty-redundant.js create mode 100644 js/src/jit-test/tests/arrays/fillwithundefined-length-nonwriteable.js create mode 100644 js/src/jit-test/tests/arrays/from-async-oom.js create mode 100644 js/src/jit-test/tests/arrays/ion-pop-denseinitializedlength-less-than-length.js create mode 100644 js/src/jit-test/tests/arrays/ion-pop-nonwritable-length.js create mode 100644 js/src/jit-test/tests/arrays/ion-push-nonwritable-length.js create mode 100644 js/src/jit-test/tests/arrays/ion-shift-nonwritable-length.js create mode 100644 js/src/jit-test/tests/arrays/length-set-after-define-nonconfigurable.js create mode 100644 js/src/jit-test/tests/arrays/length-set-after-has-sparse.js create mode 100644 js/src/jit-test/tests/arrays/new-array-int-undefined-args.js create mode 100644 js/src/jit-test/tests/arrays/new-array-undefined-undefined-more-args-1.js create mode 100644 js/src/jit-test/tests/arrays/new-array-undefined-undefined-more-args-2.js create mode 100644 js/src/jit-test/tests/arrays/nonwritable-length-grow-capacity.js create mode 100644 js/src/jit-test/tests/arrays/pop-nonarray-nonwritable-length.js create mode 100644 js/src/jit-test/tests/arrays/pop-nonwritable-length-denseinitializedlength-below-length.js create mode 100644 js/src/jit-test/tests/arrays/push-densely-loopy-nonwritable-length.js create mode 100644 js/src/jit-test/tests/arrays/push-densely-nonwritable-length.js create mode 100644 js/src/jit-test/tests/arrays/push-slowly-loopy-nonwritable-length.js create mode 100644 js/src/jit-test/tests/arrays/push-slowly-nonwritable-length.js create mode 100644 js/src/jit-test/tests/arrays/reverse-frozen.js create mode 100644 js/src/jit-test/tests/arrays/reverse-nonarray-nonwritable-element.js create mode 100644 js/src/jit-test/tests/arrays/setelem-one-past-nonwritable-length.js create mode 100644 js/src/jit-test/tests/arrays/slice-sparse-getter.js create mode 100644 js/src/jit-test/tests/arrays/slice.js create mode 100644 js/src/jit-test/tests/arrays/sort-getter-only.js create mode 100644 js/src/jit-test/tests/arrays/sort-update-types.js create mode 100644 js/src/jit-test/tests/arrays/species-redefine-getter.js create mode 100644 js/src/jit-test/tests/arrays/splice-nonwritable-length.js create mode 100644 js/src/jit-test/tests/arrays/spreadcall-optimization.js create mode 100644 js/src/jit-test/tests/arrays/spreadnew-optimization.js create mode 100644 js/src/jit-test/tests/arrays/spreadsupercall-optimization.js create mode 100644 js/src/jit-test/tests/arrays/std_Array-prototype.js create mode 100644 js/src/jit-test/tests/arrays/to-spliced-dense-elements.js create mode 100644 js/src/jit-test/tests/arrays/too-long-array-splice.js create mode 100644 js/src/jit-test/tests/arrays/unshift-nonwritable-length.js create mode 100644 js/src/jit-test/tests/arrow-functions/arguments-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/arguments-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/arguments-3.js create mode 100644 js/src/jit-test/tests/arrow-functions/arguments-4.js create mode 100644 js/src/jit-test/tests/arrow-functions/associativity-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/associativity-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/associativity-3.js create mode 100644 js/src/jit-test/tests/arrow-functions/block-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/block-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/bug-885067-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/bug-885067-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/bug-885219.js create mode 100644 js/src/jit-test/tests/arrow-functions/church-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/church-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/close-paren-arrow-after-expr.js create mode 100644 js/src/jit-test/tests/arrow-functions/column-number.js create mode 100644 js/src/jit-test/tests/arrow-functions/const-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/construct-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/eval-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/lazy-arrow-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/length.js create mode 100644 js/src/jit-test/tests/arrow-functions/params-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/params-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/params-default-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/params-default-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/params-rest-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/params-rest-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/precedence-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/precedence-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/precedence-3.js create mode 100644 js/src/jit-test/tests/arrow-functions/precedence-4.js create mode 100644 js/src/jit-test/tests/arrow-functions/precedence-5.js create mode 100644 js/src/jit-test/tests/arrow-functions/prototype-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/prototype-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/return-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/return-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/return-3.js create mode 100644 js/src/jit-test/tests/arrow-functions/strict-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/strict-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/strict-3.js create mode 100644 js/src/jit-test/tests/arrow-functions/syntax-errors.js create mode 100644 js/src/jit-test/tests/arrow-functions/this-1.js create mode 100644 js/src/jit-test/tests/arrow-functions/this-2.js create mode 100644 js/src/jit-test/tests/arrow-functions/this-3.js create mode 100644 js/src/jit-test/tests/arrow-functions/this-4.js create mode 100644 js/src/jit-test/tests/arrow-functions/this-5.js create mode 100644 js/src/jit-test/tests/arrow-functions/this-6.js create mode 100644 js/src/jit-test/tests/arrow-functions/typeof.js create mode 100644 js/src/jit-test/tests/asm.js/arraybuffer-transfer.js create mode 100644 js/src/jit-test/tests/asm.js/bug1007512.js create mode 100644 js/src/jit-test/tests/asm.js/bug1008636.js create mode 100644 js/src/jit-test/tests/asm.js/bug1126251.js create mode 100644 js/src/jit-test/tests/asm.js/bug1161298.js create mode 100644 js/src/jit-test/tests/asm.js/bug1174372.js create mode 100644 js/src/jit-test/tests/asm.js/bug1219954.js create mode 100644 js/src/jit-test/tests/asm.js/bug1268955-usestrict-semantics.js create mode 100644 js/src/jit-test/tests/asm.js/bug1276028.js create mode 100644 js/src/jit-test/tests/asm.js/bug1306506.js create mode 100644 js/src/jit-test/tests/asm.js/bug1385428.js create mode 100644 js/src/jit-test/tests/asm.js/bug1421565.js create mode 100644 js/src/jit-test/tests/asm.js/bug1493475.js create mode 100644 js/src/jit-test/tests/asm.js/bug1565301.js create mode 100644 js/src/jit-test/tests/asm.js/bug1602675.js create mode 100644 js/src/jit-test/tests/asm.js/bug855526.js create mode 100644 js/src/jit-test/tests/asm.js/bug885976.js create mode 100644 js/src/jit-test/tests/asm.js/bug923867.js create mode 100644 js/src/jit-test/tests/asm.js/bug927389.js create mode 100644 js/src/jit-test/tests/asm.js/bug928450.js create mode 100644 js/src/jit-test/tests/asm.js/bug940864.js create mode 100644 js/src/jit-test/tests/asm.js/bug941877.js create mode 100644 js/src/jit-test/tests/asm.js/directives.txt create mode 100644 js/src/jit-test/tests/asm.js/import-function-toPrimitive.js create mode 100644 js/src/jit-test/tests/asm.js/nested-rewind.js create mode 100644 js/src/jit-test/tests/asm.js/neuter-during-arguments-coercion.js create mode 100644 js/src/jit-test/tests/asm.js/oom-helper-thread-plus-validation-error.js create mode 100644 js/src/jit-test/tests/asm.js/oom-helper-thread.js create mode 100644 js/src/jit-test/tests/asm.js/testAddressErrors.js create mode 100644 js/src/jit-test/tests/asm.js/testBasic.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1046688.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1057248.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1111327.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1117255.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1125561.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1147144-2.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1147144.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1219098.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1236484.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1236541.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1236552.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1255954.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1291887.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1301191.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1357053.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1359612.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1360390.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1437534.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1437546.js create mode 100644 js/src/jit-test/tests/asm.js/testBug1674353.js create mode 100644 js/src/jit-test/tests/asm.js/testBug855442.js create mode 100644 js/src/jit-test/tests/asm.js/testBug863867.js create mode 100644 js/src/jit-test/tests/asm.js/testBug878435.js create mode 100644 js/src/jit-test/tests/asm.js/testBug878495.js create mode 100644 js/src/jit-test/tests/asm.js/testBug878520.js create mode 100644 js/src/jit-test/tests/asm.js/testBug892291.js create mode 100644 js/src/jit-test/tests/asm.js/testBug893364.js create mode 100644 js/src/jit-test/tests/asm.js/testBug893368.js create mode 100644 js/src/jit-test/tests/asm.js/testBug907085.js create mode 100644 js/src/jit-test/tests/asm.js/testBug952022.js create mode 100644 js/src/jit-test/tests/asm.js/testBug965767.js create mode 100644 js/src/jit-test/tests/asm.js/testBug975182.js create mode 100644 js/src/jit-test/tests/asm.js/testBug989166.js create mode 100644 js/src/jit-test/tests/asm.js/testBug999790.js create mode 100644 js/src/jit-test/tests/asm.js/testBullet.js create mode 100644 js/src/jit-test/tests/asm.js/testCall.js create mode 100644 js/src/jit-test/tests/asm.js/testCloning.js create mode 100644 js/src/jit-test/tests/asm.js/testCompoundPlusMinus.js create mode 100644 js/src/jit-test/tests/asm.js/testControlFlow.js create mode 100644 js/src/jit-test/tests/asm.js/testDebugModeDisables.js create mode 100644 js/src/jit-test/tests/asm.js/testExpressions.js create mode 100644 js/src/jit-test/tests/asm.js/testFFI.js create mode 100644 js/src/jit-test/tests/asm.js/testFastHeapAccess.js create mode 100644 js/src/jit-test/tests/asm.js/testFloat32.js create mode 100644 js/src/jit-test/tests/asm.js/testFloatingPoint.js create mode 100644 js/src/jit-test/tests/asm.js/testFunctionPtr.js create mode 100644 js/src/jit-test/tests/asm.js/testGetter.js create mode 100644 js/src/jit-test/tests/asm.js/testGlobals.js create mode 100644 js/src/jit-test/tests/asm.js/testHeapAccess.js create mode 100644 js/src/jit-test/tests/asm.js/testJumpRange.js create mode 100644 js/src/jit-test/tests/asm.js/testLargeHeap.js create mode 100644 js/src/jit-test/tests/asm.js/testLinkErrorAssert.js create mode 100644 js/src/jit-test/tests/asm.js/testLiterals.js create mode 100644 js/src/jit-test/tests/asm.js/testMathLib.js create mode 100644 js/src/jit-test/tests/asm.js/testModuleFunctions.js create mode 100644 js/src/jit-test/tests/asm.js/testNeuter.js create mode 100644 js/src/jit-test/tests/asm.js/testParallelCompile.js create mode 100644 js/src/jit-test/tests/asm.js/testProfiling.js create mode 100644 js/src/jit-test/tests/asm.js/testRangeAnalysis.js create mode 100644 js/src/jit-test/tests/asm.js/testSource-2.js create mode 100644 js/src/jit-test/tests/asm.js/testSource.js create mode 100644 js/src/jit-test/tests/asm.js/testStackWalking.js create mode 100644 js/src/jit-test/tests/asm.js/testStealing.js create mode 100644 js/src/jit-test/tests/asm.js/testTimeout1.js create mode 100644 js/src/jit-test/tests/asm.js/testTimeout2.js create mode 100644 js/src/jit-test/tests/asm.js/testTimeout3.js create mode 100644 js/src/jit-test/tests/asm.js/testTimeout4.js create mode 100644 js/src/jit-test/tests/asm.js/testTimeout5.js create mode 100644 js/src/jit-test/tests/asm.js/testTimeout6.js create mode 100644 js/src/jit-test/tests/asm.js/testTimeout7.js create mode 100644 js/src/jit-test/tests/asm.js/testUseAsmWarnings.js create mode 100644 js/src/jit-test/tests/asm.js/testX86ByteStore.js create mode 100644 js/src/jit-test/tests/asm.js/testZOOB.js create mode 100644 js/src/jit-test/tests/async/await-exception-stack-in-finally-1.js create mode 100644 js/src/jit-test/tests/async/await-exception-stack-in-finally-2.js create mode 100644 js/src/jit-test/tests/async/await-exception-stack-in-finally-3.js create mode 100644 js/src/jit-test/tests/async/bug1773650.js create mode 100644 js/src/jit-test/tests/async/debugger-reject-after-fulfill.js create mode 100644 js/src/jit-test/tests/async/ecma262-issue-1461.js create mode 100644 js/src/jit-test/tests/atomics/basic-tests.js create mode 100644 js/src/jit-test/tests/atomics/bigint-add-for-effect.js create mode 100644 js/src/jit-test/tests/atomics/bigint-add.js create mode 100644 js/src/jit-test/tests/atomics/bigint-and-for-effect.js create mode 100644 js/src/jit-test/tests/atomics/bigint-and.js create mode 100644 js/src/jit-test/tests/atomics/bigint-compareExchange.js create mode 100644 js/src/jit-test/tests/atomics/bigint-exchange.js create mode 100644 js/src/jit-test/tests/atomics/bigint-load.js create mode 100644 js/src/jit-test/tests/atomics/bigint-or-for-effect.js create mode 100644 js/src/jit-test/tests/atomics/bigint-or.js create mode 100644 js/src/jit-test/tests/atomics/bigint-store.js create mode 100644 js/src/jit-test/tests/atomics/bigint-sub-for-effect.js create mode 100644 js/src/jit-test/tests/atomics/bigint-sub.js create mode 100644 js/src/jit-test/tests/atomics/bigint-xor-for-effect.js create mode 100644 js/src/jit-test/tests/atomics/bigint-xor.js create mode 100644 js/src/jit-test/tests/atomics/cross-compartment-nukeccw.js create mode 100644 js/src/jit-test/tests/atomics/directives.txt create mode 100644 js/src/jit-test/tests/atomics/inline-add.js create mode 100644 js/src/jit-test/tests/atomics/inline-add2.js create mode 100644 js/src/jit-test/tests/atomics/inline-cmpxchg.js create mode 100644 js/src/jit-test/tests/atomics/memcpy-fidelity.js create mode 100644 js/src/jit-test/tests/atomics/mutual-exclusion.js create mode 100644 js/src/jit-test/tests/atomics/nursery-non-shared-moved-gc.js create mode 100644 js/src/jit-test/tests/atomics/optimization-tests.js create mode 100644 js/src/jit-test/tests/atomics/store-does-not-truncate-returnval.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1147907.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1183241.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1263532.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1263558.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1263857.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1263865.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1263879.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1263888.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1264561.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1264823.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1266579.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1268034.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1269074.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1276082.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1315943.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1317460.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1335619.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1335623.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1343513-2.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1343513.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1357330.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1357462.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1375446.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1390082-1.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1390082-2.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1416809-1.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1416809-2.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1448582-1.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1448582-2.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1448582-3.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1448582-4.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1448582-5.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1448582-6.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1454285.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1460436-1.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1460436-2.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1462341.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1466626-1.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1466626-2.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1466626-3.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1466626-4.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1468629.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1476417.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1479076.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1481032.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1483188.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1500255.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1524943.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1538542-1.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1538542-2.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1544364.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1546232-2.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1546232.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1562102.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1574415.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1591019.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1593971.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1652148.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1652153.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1669914.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1670378.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1689880-1.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1689880-2.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1736307.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1750496.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1763501.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1765028.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1765249.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1766225.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1783507.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1790543.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1791401.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1798883.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1805881.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1812148.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1813387.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1863390.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1863428.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1874929.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1875487.js create mode 100644 js/src/jit-test/tests/auto-regress/bug1879688.js create mode 100644 js/src/jit-test/tests/auto-regress/bug464116.js create mode 100644 js/src/jit-test/tests/auto-regress/bug466076.js create mode 100644 js/src/jit-test/tests/auto-regress/bug469262.js create mode 100644 js/src/jit-test/tests/auto-regress/bug477877.js create mode 100644 js/src/jit-test/tests/auto-regress/bug479747.js create mode 100644 js/src/jit-test/tests/auto-regress/bug486139.js create mode 100644 js/src/jit-test/tests/auto-regress/bug487320.js create mode 100644 js/src/jit-test/tests/auto-regress/bug487534.js create mode 100644 js/src/jit-test/tests/auto-regress/bug487563.js create mode 100644 js/src/jit-test/tests/auto-regress/bug488015.js create mode 100644 js/src/jit-test/tests/auto-regress/bug488034.js create mode 100644 js/src/jit-test/tests/auto-regress/bug488203.js create mode 100644 js/src/jit-test/tests/auto-regress/bug488421.js create mode 100644 js/src/jit-test/tests/auto-regress/bug488693.js create mode 100644 js/src/jit-test/tests/auto-regress/bug489040.js create mode 100644 js/src/jit-test/tests/auto-regress/bug489836.js create mode 100644 js/src/jit-test/tests/auto-regress/bug490191.js create mode 100644 js/src/jit-test/tests/auto-regress/bug490776.js create mode 100644 js/src/jit-test/tests/auto-regress/bug495843.js create mode 100644 js/src/jit-test/tests/auto-regress/bug496245.js create mode 100644 js/src/jit-test/tests/auto-regress/bug496325.js create mode 100644 js/src/jit-test/tests/auto-regress/bug499169.js create mode 100644 js/src/jit-test/tests/auto-regress/bug502604.js create mode 100644 js/src/jit-test/tests/auto-regress/bug505305.js create mode 100644 js/src/jit-test/tests/auto-regress/bug511938.js create mode 100644 js/src/jit-test/tests/auto-regress/bug521163.js create mode 100644 js/src/jit-test/tests/auto-regress/bug521279.js create mode 100644 js/src/jit-test/tests/auto-regress/bug522624.js create mode 100644 js/src/jit-test/tests/auto-regress/bug528048.js create mode 100644 js/src/jit-test/tests/auto-regress/bug533705.js create mode 100644 js/src/jit-test/tests/auto-regress/bug543436.js create mode 100644 js/src/jit-test/tests/auto-regress/bug557946.js create mode 100644 js/src/jit-test/tests/auto-regress/bug558618.js create mode 100644 js/src/jit-test/tests/auto-regress/bug560566.js create mode 100644 js/src/jit-test/tests/auto-regress/bug562028.js create mode 100644 js/src/jit-test/tests/auto-regress/bug563034.js create mode 100644 js/src/jit-test/tests/auto-regress/bug563126.js create mode 100644 js/src/jit-test/tests/auto-regress/bug563127.js create mode 100644 js/src/jit-test/tests/auto-regress/bug564619.js create mode 100644 js/src/jit-test/tests/auto-regress/bug567577.js create mode 100644 js/src/jit-test/tests/auto-regress/bug568786.js create mode 100644 js/src/jit-test/tests/auto-regress/bug571168.js create mode 100644 js/src/jit-test/tests/auto-regress/bug579348.js create mode 100644 js/src/jit-test/tests/auto-regress/bug580694.js create mode 100644 js/src/jit-test/tests/auto-regress/bug580699.js create mode 100644 js/src/jit-test/tests/auto-regress/bug580701.js create mode 100644 js/src/jit-test/tests/auto-regress/bug581785.js create mode 100644 js/src/jit-test/tests/auto-regress/bug582268.js create mode 100644 js/src/jit-test/tests/auto-regress/bug582276.js create mode 100644 js/src/jit-test/tests/auto-regress/bug583675.js create mode 100644 js/src/jit-test/tests/auto-regress/bug583680.js create mode 100644 js/src/jit-test/tests/auto-regress/bug583681.js create mode 100644 js/src/jit-test/tests/auto-regress/bug584423.js create mode 100644 js/src/jit-test/tests/auto-regress/bug586538.js create mode 100644 js/src/jit-test/tests/auto-regress/bug590772.js create mode 100644 js/src/jit-test/tests/auto-regress/bug591367.js create mode 100644 js/src/jit-test/tests/auto-regress/bug591795.js create mode 100644 js/src/jit-test/tests/auto-regress/bug593580.js create mode 100644 js/src/jit-test/tests/auto-regress/bug596817.js create mode 100644 js/src/jit-test/tests/auto-regress/bug596823.js create mode 100644 js/src/jit-test/tests/auto-regress/bug599446.js create mode 100644 js/src/jit-test/tests/auto-regress/bug599464.js create mode 100644 js/src/jit-test/tests/auto-regress/bug600138.js create mode 100644 js/src/jit-test/tests/auto-regress/bug601070.js create mode 100644 js/src/jit-test/tests/auto-regress/bug601393.js create mode 100644 js/src/jit-test/tests/auto-regress/bug605011.js create mode 100644 js/src/jit-test/tests/auto-regress/bug605013.js create mode 100644 js/src/jit-test/tests/auto-regress/bug606639.js create mode 100644 js/src/jit-test/tests/auto-regress/bug607502.js create mode 100644 js/src/jit-test/tests/auto-regress/bug607513.js create mode 100644 js/src/jit-test/tests/auto-regress/bug612836.js create mode 100644 js/src/jit-test/tests/auto-regress/bug613400.js create mode 100644 js/src/jit-test/tests/auto-regress/bug620315.js create mode 100644 js/src/jit-test/tests/auto-regress/bug620637.js create mode 100644 js/src/jit-test/tests/auto-regress/bug621816.js create mode 100644 js/src/jit-test/tests/auto-regress/bug621988.js create mode 100644 js/src/jit-test/tests/auto-regress/bug634236.js create mode 100644 js/src/jit-test/tests/auto-regress/bug635389.js create mode 100644 js/src/jit-test/tests/auto-regress/bug637205.js create mode 100644 js/src/jit-test/tests/auto-regress/bug638212.js create mode 100644 js/src/jit-test/tests/auto-regress/bug638735.js create mode 100644 js/src/jit-test/tests/auto-regress/bug640079.js create mode 100644 js/src/jit-test/tests/auto-regress/bug643670.js create mode 100644 js/src/jit-test/tests/auto-regress/bug643847.js create mode 100644 js/src/jit-test/tests/auto-regress/bug647464.js create mode 100644 js/src/jit-test/tests/auto-regress/bug648729.js create mode 100644 js/src/jit-test/tests/auto-regress/bug648739.js create mode 100644 js/src/jit-test/tests/auto-regress/bug648747.js create mode 100644 js/src/jit-test/tests/auto-regress/bug648839.js create mode 100644 js/src/jit-test/tests/auto-regress/bug648852.js create mode 100644 js/src/jit-test/tests/auto-regress/bug648992.js create mode 100644 js/src/jit-test/tests/auto-regress/bug648999.js create mode 100644 js/src/jit-test/tests/auto-regress/bug649017.js create mode 100644 js/src/jit-test/tests/auto-regress/bug649937.js create mode 100644 js/src/jit-test/tests/auto-regress/bug650574.js create mode 100644 js/src/jit-test/tests/auto-regress/bug650658.js create mode 100644 js/src/jit-test/tests/auto-regress/bug651827.js create mode 100644 js/src/jit-test/tests/auto-regress/bug653395.js create mode 100644 js/src/jit-test/tests/auto-regress/bug653789.js create mode 100644 js/src/jit-test/tests/auto-regress/bug654392.js create mode 100644 js/src/jit-test/tests/auto-regress/bug654665.js create mode 100644 js/src/jit-test/tests/auto-regress/bug655507.js create mode 100644 js/src/jit-test/tests/auto-regress/bug655940.js create mode 100644 js/src/jit-test/tests/auto-regress/bug655950.js create mode 100644 js/src/jit-test/tests/auto-regress/bug657198.js create mode 100644 js/src/jit-test/tests/auto-regress/bug657586.js create mode 100644 js/src/jit-test/tests/auto-regress/bug658803.js create mode 100644 js/src/jit-test/tests/auto-regress/bug659077.js create mode 100644 js/src/jit-test/tests/auto-regress/bug659779.js create mode 100644 js/src/jit-test/tests/auto-regress/bug661840.js create mode 100644 js/src/jit-test/tests/auto-regress/bug662132.js create mode 100644 js/src/jit-test/tests/auto-regress/bug665914.js create mode 100644 js/src/jit-test/tests/auto-regress/bug666305.js create mode 100644 js/src/jit-test/tests/auto-regress/bug666599.js create mode 100644 js/src/jit-test/tests/auto-regress/bug667824.js create mode 100644 js/src/jit-test/tests/auto-regress/bug668206.js create mode 100644 js/src/jit-test/tests/auto-regress/bug672104.js create mode 100644 js/src/jit-test/tests/auto-regress/bug673792.js create mode 100644 js/src/jit-test/tests/auto-regress/bug674843.js create mode 100644 js/src/jit-test/tests/auto-regress/bug675251.js create mode 100644 js/src/jit-test/tests/auto-regress/bug677386.js create mode 100644 js/src/jit-test/tests/auto-regress/bug677587.js create mode 100644 js/src/jit-test/tests/auto-regress/bug677977.js create mode 100644 js/src/jit-test/tests/auto-regress/bug678086.js create mode 100644 js/src/jit-test/tests/auto-regress/bug678529.js create mode 100644 js/src/jit-test/tests/auto-regress/bug679799.js create mode 100644 js/src/jit-test/tests/auto-regress/bug679810.js create mode 100644 js/src/jit-test/tests/auto-regress/bug680797.js create mode 100644 js/src/jit-test/tests/auto-regress/bug682252.js create mode 100644 js/src/jit-test/tests/auto-regress/bug682298.js create mode 100644 js/src/jit-test/tests/auto-regress/bug682563.js create mode 100644 js/src/jit-test/tests/auto-regress/bug684281.js create mode 100644 js/src/jit-test/tests/auto-regress/bug685472.js create mode 100644 js/src/jit-test/tests/auto-regress/bug686107.js create mode 100644 js/src/jit-test/tests/auto-regress/bug686179.js create mode 100644 js/src/jit-test/tests/auto-regress/bug687099.js create mode 100644 js/src/jit-test/tests/auto-regress/bug687102.js create mode 100644 js/src/jit-test/tests/auto-regress/bug687125.js create mode 100644 js/src/jit-test/tests/auto-regress/bug687399.js create mode 100644 js/src/jit-test/tests/auto-regress/bug688968.js create mode 100644 js/src/jit-test/tests/auto-regress/bug688974.js create mode 100644 js/src/jit-test/tests/auto-regress/bug689892.js create mode 100644 js/src/jit-test/tests/auto-regress/bug690933.js create mode 100644 js/src/jit-test/tests/auto-regress/bug691595.js create mode 100644 js/src/jit-test/tests/auto-regress/bug692300.js create mode 100644 js/src/jit-test/tests/auto-regress/bug692366.js create mode 100644 js/src/jit-test/tests/auto-regress/bug693144.js create mode 100644 js/src/jit-test/tests/auto-regress/bug693971.js create mode 100644 js/src/jit-test/tests/auto-regress/bug694438.js create mode 100644 js/src/jit-test/tests/auto-regress/bug695290.js create mode 100644 js/src/jit-test/tests/auto-regress/bug696039.js create mode 100644 js/src/jit-test/tests/auto-regress/bug697255.js create mode 100644 js/src/jit-test/tests/auto-regress/bug698074.js create mode 100644 js/src/jit-test/tests/auto-regress/bug698148.js create mode 100644 js/src/jit-test/tests/auto-regress/bug699674.js create mode 100644 js/src/jit-test/tests/auto-regress/bug700127.js create mode 100644 js/src/jit-test/tests/auto-regress/bug700295.js create mode 100644 js/src/jit-test/tests/auto-regress/bug701248.js create mode 100644 js/src/jit-test/tests/auto-regress/bug701332.js create mode 100644 js/src/jit-test/tests/auto-regress/bug702003.js create mode 100644 js/src/jit-test/tests/auto-regress/bug702915.js create mode 100644 js/src/jit-test/tests/auto-regress/bug704136.js create mode 100644 js/src/jit-test/tests/auto-regress/bug710192.js create mode 100644 js/src/jit-test/tests/auto-regress/bug713209.js create mode 100644 js/src/jit-test/tests/auto-regress/bug713944.js create mode 100644 js/src/jit-test/tests/auto-regress/bug715682.js create mode 100644 js/src/jit-test/tests/auto-regress/bug716512.js create mode 100644 js/src/jit-test/tests/auto-regress/bug717249.js create mode 100644 js/src/jit-test/tests/auto-regress/bug717251.js create mode 100644 js/src/jit-test/tests/auto-regress/bug718347.js create mode 100644 js/src/jit-test/tests/auto-regress/bug720380.js create mode 100644 js/src/jit-test/tests/auto-regress/bug720396.js create mode 100644 js/src/jit-test/tests/auto-regress/bug721497.js create mode 100644 js/src/jit-test/tests/auto-regress/bug722021.js create mode 100644 js/src/jit-test/tests/auto-regress/bug722023.js create mode 100644 js/src/jit-test/tests/auto-regress/bug722260.js create mode 100644 js/src/jit-test/tests/auto-regress/bug724875.js create mode 100644 js/src/jit-test/tests/auto-regress/bug726636.js create mode 100644 js/src/jit-test/tests/auto-regress/bug727330.js create mode 100644 js/src/jit-test/tests/auto-regress/bug728509.js create mode 100644 js/src/jit-test/tests/auto-regress/bug729571.js create mode 100644 js/src/jit-test/tests/auto-regress/bug729797.js create mode 100644 js/src/jit-test/tests/auto-regress/bug729886.js create mode 100644 js/src/jit-test/tests/auto-regress/bug730806.js create mode 100644 js/src/jit-test/tests/auto-regress/bug732719.js create mode 100644 js/src/jit-test/tests/auto-regress/bug732852.js create mode 100644 js/src/jit-test/tests/auto-regress/bug732855.js create mode 100644 js/src/jit-test/tests/auto-regress/bug732856.js create mode 100644 js/src/jit-test/tests/auto-regress/bug732857.js create mode 100644 js/src/jit-test/tests/auto-regress/bug732861.js create mode 100644 js/src/jit-test/tests/auto-regress/bug735313.js create mode 100644 js/src/jit-test/tests/auto-regress/bug735936.js create mode 100644 js/src/jit-test/tests/auto-regress/bug736609.js create mode 100644 js/src/jit-test/tests/auto-regress/bug737300.js create mode 100644 js/src/jit-test/tests/auto-regress/bug737737.js create mode 100644 js/src/jit-test/tests/auto-regress/bug739402.js create mode 100644 js/src/jit-test/tests/auto-regress/bug739901.js create mode 100644 js/src/jit-test/tests/auto-regress/bug740509.js create mode 100644 js/src/jit-test/tests/auto-regress/bug740654.js create mode 100644 js/src/jit-test/tests/auto-regress/bug741199.js create mode 100644 js/src/jit-test/tests/auto-regress/bug743071.js create mode 100644 js/src/jit-test/tests/auto-regress/bug743094.js create mode 100644 js/src/jit-test/tests/auto-regress/bug743096.js create mode 100644 js/src/jit-test/tests/auto-regress/bug743876.js create mode 100644 js/src/jit-test/tests/auto-regress/bug745452.js create mode 100644 js/src/jit-test/tests/auto-regress/bug746103.js create mode 100644 js/src/jit-test/tests/auto-regress/bug746376.js create mode 100644 js/src/jit-test/tests/auto-regress/bug746377.js create mode 100644 js/src/jit-test/tests/auto-regress/bug748119.js create mode 100644 js/src/jit-test/tests/auto-regress/bug754719.js create mode 100644 js/src/jit-test/tests/auto-regress/bug755639.js create mode 100644 js/src/jit-test/tests/auto-regress/bug755750.js create mode 100644 js/src/jit-test/tests/auto-regress/bug756236.js create mode 100644 js/src/jit-test/tests/auto-regress/bug757428.js create mode 100644 js/src/jit-test/tests/auto-regress/bug758164.js create mode 100644 js/src/jit-test/tests/auto-regress/bug759719.js create mode 100644 js/src/jit-test/tests/auto-regress/bug761864.js create mode 100644 js/src/jit-test/tests/auto-regress/bug762324.js create mode 100644 js/src/jit-test/tests/auto-regress/bug763039.js create mode 100644 js/src/jit-test/tests/auto-regress/bug763989.js create mode 100644 js/src/jit-test/tests/auto-regress/bug765055.js create mode 100644 js/src/jit-test/tests/auto-regress/bug765483.js create mode 100644 js/src/jit-test/tests/auto-regress/bug766065.js create mode 100644 js/src/jit-test/tests/auto-regress/bug767679.js create mode 100644 js/src/jit-test/tests/auto-regress/bug770713.js create mode 100644 js/src/jit-test/tests/auto-regress/bug771027.js create mode 100644 js/src/jit-test/tests/auto-regress/bug771157.js create mode 100644 js/src/jit-test/tests/auto-regress/bug771946.js create mode 100644 js/src/jit-test/tests/auto-regress/bug779390.js create mode 100644 js/src/jit-test/tests/auto-regress/bug779818.js create mode 100644 js/src/jit-test/tests/auto-regress/bug780003.js create mode 100644 js/src/jit-test/tests/auto-regress/bug781364.js create mode 100644 js/src/jit-test/tests/auto-regress/bug781855.js create mode 100644 js/src/jit-test/tests/auto-regress/bug782083.js create mode 100644 js/src/jit-test/tests/auto-regress/bug782129.js create mode 100644 js/src/jit-test/tests/auto-regress/bug783421.js create mode 100644 js/src/jit-test/tests/auto-regress/bug785089.js create mode 100644 js/src/jit-test/tests/auto-regress/bug785305.js create mode 100644 js/src/jit-test/tests/auto-regress/bug785576.js create mode 100644 js/src/jit-test/tests/auto-regress/bug785776.js create mode 100644 js/src/jit-test/tests/auto-regress/bug790921.js create mode 100644 js/src/jit-test/tests/auto-regress/bug795937.js create mode 100644 js/src/jit-test/tests/auto-regress/bug797493.js create mode 100644 js/src/jit-test/tests/auto-regress/bug800878.js create mode 100644 js/src/jit-test/tests/auto-regress/bug812235.js create mode 100644 js/src/jit-test/tests/auto-regress/bug813029.js create mode 100644 js/src/jit-test/tests/auto-regress/bug829795.js create mode 100644 js/src/jit-test/tests/auto-regress/bug829813.js create mode 100644 js/src/jit-test/tests/auto-regress/bug909441.js create mode 100644 js/src/jit-test/tests/auto-regress/bug912379.js create mode 100644 js/src/jit-test/tests/auto-regress/class-method-async.js create mode 100644 js/src/jit-test/tests/auto-regress/for-of-iterator-close-debugger.js create mode 100644 js/src/jit-test/tests/backup-point-bug1315634.js create mode 100644 js/src/jit-test/tests/baseline/accessor-ic-shape-replacement.js create mode 100644 js/src/jit-test/tests/baseline/arraySubclassPropertyLookup.js create mode 100644 js/src/jit-test/tests/baseline/bug1024444.js create mode 100644 js/src/jit-test/tests/baseline/bug1054330.js create mode 100644 js/src/jit-test/tests/baseline/bug1063878.js create mode 100644 js/src/jit-test/tests/baseline/bug1095870.js create mode 100644 js/src/jit-test/tests/baseline/bug1182866.js create mode 100644 js/src/jit-test/tests/baseline/bug1209585.js create mode 100644 js/src/jit-test/tests/baseline/bug1216140.js create mode 100644 js/src/jit-test/tests/baseline/bug1238815.js create mode 100644 js/src/jit-test/tests/baseline/bug1258301.js create mode 100644 js/src/jit-test/tests/baseline/bug1344334.js create mode 100644 js/src/jit-test/tests/baseline/bug1349298.js create mode 100644 js/src/jit-test/tests/baseline/bug1368626.js create mode 100644 js/src/jit-test/tests/baseline/bug1416727.js create mode 100644 js/src/jit-test/tests/baseline/bug1463375.js create mode 100644 js/src/jit-test/tests/baseline/bug1491337.js create mode 100644 js/src/jit-test/tests/baseline/bug1491350.js create mode 100644 js/src/jit-test/tests/baseline/bug1602390.js create mode 100644 js/src/jit-test/tests/baseline/bug1660465.js create mode 100644 js/src/jit-test/tests/baseline/bug836742.js create mode 100644 js/src/jit-test/tests/baseline/bug840984.js create mode 100644 js/src/jit-test/tests/baseline/bug841718.js create mode 100644 js/src/jit-test/tests/baseline/bug842313.js create mode 100644 js/src/jit-test/tests/baseline/bug842316.js create mode 100644 js/src/jit-test/tests/baseline/bug842317.js create mode 100644 js/src/jit-test/tests/baseline/bug842429.js create mode 100644 js/src/jit-test/tests/baseline/bug842430.js create mode 100644 js/src/jit-test/tests/baseline/bug842431-1.js create mode 100644 js/src/jit-test/tests/baseline/bug842431-2.js create mode 100644 js/src/jit-test/tests/baseline/bug842431-3.js create mode 100644 js/src/jit-test/tests/baseline/bug842432.js create mode 100644 js/src/jit-test/tests/baseline/bug843429.js create mode 100644 js/src/jit-test/tests/baseline/bug843886.js create mode 100644 js/src/jit-test/tests/baseline/bug844383.js create mode 100644 js/src/jit-test/tests/baseline/bug844467.js create mode 100644 js/src/jit-test/tests/baseline/bug844470.js create mode 100644 js/src/jit-test/tests/baseline/bug844828.js create mode 100644 js/src/jit-test/tests/baseline/bug845331.js create mode 100644 js/src/jit-test/tests/baseline/bug847410.js create mode 100644 js/src/jit-test/tests/baseline/bug847425.js create mode 100644 js/src/jit-test/tests/baseline/bug847446.js create mode 100644 js/src/jit-test/tests/baseline/bug847484.js create mode 100644 js/src/jit-test/tests/baseline/bug847678.js create mode 100644 js/src/jit-test/tests/baseline/bug848743-1.js create mode 100644 js/src/jit-test/tests/baseline/bug848743-2.js create mode 100644 js/src/jit-test/tests/baseline/bug852175.js create mode 100644 js/src/jit-test/tests/baseline/bug852801.js create mode 100644 js/src/jit-test/tests/baseline/bug857580.js create mode 100644 js/src/jit-test/tests/baseline/bug877589.js create mode 100644 js/src/jit-test/tests/baseline/bug881461.js create mode 100644 js/src/jit-test/tests/baseline/bug892787-1.js create mode 100644 js/src/jit-test/tests/baseline/bug892787-2.js create mode 100644 js/src/jit-test/tests/baseline/bug916039.js create mode 100644 js/src/jit-test/tests/baseline/bug934427.js create mode 100644 js/src/jit-test/tests/baseline/bug938130.js create mode 100644 js/src/jit-test/tests/baseline/bug940972.js create mode 100644 js/src/jit-test/tests/baseline/callee.js create mode 100644 js/src/jit-test/tests/baseline/classConstructor-AnyScripted.js create mode 100644 js/src/jit-test/tests/baseline/eval-newtarget-osr.js create mode 100644 js/src/jit-test/tests/baseline/funcall-array.js create mode 100644 js/src/jit-test/tests/baseline/funcall.js create mode 100644 js/src/jit-test/tests/baseline/getgname-uninitialized-let.js create mode 100644 js/src/jit-test/tests/baseline/getname-uninitialized-let.js create mode 100644 js/src/jit-test/tests/baseline/getter_setter.js create mode 100644 js/src/jit-test/tests/baseline/long-proto-chains.js create mode 100644 js/src/jit-test/tests/baseline/metadata-hook-on-stack.js create mode 100644 js/src/jit-test/tests/baseline/no-such-property-getprop.js create mode 100644 js/src/jit-test/tests/baseline/osr-large-stack-frame.js create mode 100644 js/src/jit-test/tests/baseline/setcall.js create mode 100644 js/src/jit-test/tests/baseline/try-finally-1.js create mode 100644 js/src/jit-test/tests/baseline/try-finally-2.js create mode 100644 js/src/jit-test/tests/baseline/try-finally-3.js create mode 100644 js/src/jit-test/tests/baseline/try-finally-osr.js create mode 100644 js/src/jit-test/tests/baseline/unboxed-expando-type-update.js create mode 100644 js/src/jit-test/tests/basic/FPQuadCmp.js create mode 100644 js/src/jit-test/tests/basic/__proto__-not-prototype-mutation-ion.js create mode 100644 js/src/jit-test/tests/basic/__proto__-not-prototype-mutation.js create mode 100644 js/src/jit-test/tests/basic/adjacent-trycatch-second-nested.js create mode 100644 js/src/jit-test/tests/basic/allow-relazify.js create mode 100644 js/src/jit-test/tests/basic/argumentsPassedToBuiltin.js create mode 100644 js/src/jit-test/tests/basic/arityMismatchExtraArg.js create mode 100644 js/src/jit-test/tests/basic/arityMismatchMissingArg.js create mode 100644 js/src/jit-test/tests/basic/array-concat-spreadable.js create mode 100644 js/src/jit-test/tests/basic/array-copyWithin.js create mode 100644 js/src/jit-test/tests/basic/array-length-double.js create mode 100644 js/src/jit-test/tests/basic/array-proto-outofrange.js create mode 100644 js/src/jit-test/tests/basic/array-slice.js create mode 100644 js/src/jit-test/tests/basic/array-tosource.js create mode 100644 js/src/jit-test/tests/basic/arrayConcat.js create mode 100644 js/src/jit-test/tests/basic/arrayPopShift.js create mode 100644 js/src/jit-test/tests/basic/arrayProto.js create mode 100644 js/src/jit-test/tests/basic/assign-primitive-error.js create mode 100644 js/src/jit-test/tests/basic/assign-primitive-proxy-class-error.js create mode 100644 js/src/jit-test/tests/basic/assign-reuse-propmap.js create mode 100644 js/src/jit-test/tests/basic/basic-fuses.js create mode 100644 js/src/jit-test/tests/basic/bigLoadStoreDisp.js create mode 100644 js/src/jit-test/tests/basic/bindname-in-strict-eval.js create mode 100644 js/src/jit-test/tests/basic/bitwiseAnd.js create mode 100644 js/src/jit-test/tests/basic/bitwiseGlobal.js create mode 100644 js/src/jit-test/tests/basic/blinterp-jitoption.js create mode 100644 js/src/jit-test/tests/basic/bound-function-proto.js create mode 100644 js/src/jit-test/tests/basic/bug-1133377.js create mode 100644 js/src/jit-test/tests/basic/bug-1198090.js create mode 100644 js/src/jit-test/tests/basic/bug-1240532.js create mode 100644 js/src/jit-test/tests/basic/bug-1271507.js create mode 100644 js/src/jit-test/tests/basic/bug-1649234-1.js create mode 100644 js/src/jit-test/tests/basic/bug-1649234-2.js create mode 100644 js/src/jit-test/tests/basic/bug-1649234-3.js create mode 100644 js/src/jit-test/tests/basic/bug-1663741.js create mode 100644 js/src/jit-test/tests/basic/bug-1665583.js create mode 100644 js/src/jit-test/tests/basic/bug-1707422.js create mode 100644 js/src/jit-test/tests/basic/bug-508061.js create mode 100644 js/src/jit-test/tests/basic/bug-826124.js create mode 100644 js/src/jit-test/tests/basic/bug1001090-1.js create mode 100644 js/src/jit-test/tests/basic/bug1001090-2.js create mode 100644 js/src/jit-test/tests/basic/bug1001090-3.js create mode 100644 js/src/jit-test/tests/basic/bug1001090-4.js create mode 100644 js/src/jit-test/tests/basic/bug1001090-5.js create mode 100644 js/src/jit-test/tests/basic/bug1001090-6.js create mode 100644 js/src/jit-test/tests/basic/bug1003161.js create mode 100644 js/src/jit-test/tests/basic/bug1008339.js create mode 100644 js/src/jit-test/tests/basic/bug1013922.js create mode 100644 js/src/jit-test/tests/basic/bug1015339.js create mode 100644 js/src/jit-test/tests/basic/bug1015766.js create mode 100644 js/src/jit-test/tests/basic/bug1018620.js create mode 100644 js/src/jit-test/tests/basic/bug1024786.js create mode 100644 js/src/jit-test/tests/basic/bug1033946.js create mode 100644 js/src/jit-test/tests/basic/bug1035287-track-allocation-sites-recursion.js create mode 100644 js/src/jit-test/tests/basic/bug1035325.js create mode 100644 js/src/jit-test/tests/basic/bug1054243.js create mode 100644 js/src/jit-test/tests/basic/bug1057571.js create mode 100644 js/src/jit-test/tests/basic/bug1059459.js create mode 100644 js/src/jit-test/tests/basic/bug1061534.js create mode 100644 js/src/jit-test/tests/basic/bug1066414.js create mode 100644 js/src/jit-test/tests/basic/bug1078871.js create mode 100644 js/src/jit-test/tests/basic/bug1081175.js create mode 100644 js/src/jit-test/tests/basic/bug1085464.js create mode 100644 js/src/jit-test/tests/basic/bug1091757.js create mode 100644 js/src/jit-test/tests/basic/bug1100623.js create mode 100644 js/src/jit-test/tests/basic/bug1106982-2.js create mode 100644 js/src/jit-test/tests/basic/bug1106982.js create mode 100644 js/src/jit-test/tests/basic/bug1113980.js create mode 100644 js/src/jit-test/tests/basic/bug1118996.js create mode 100644 js/src/jit-test/tests/basic/bug1122534.js create mode 100644 js/src/jit-test/tests/basic/bug1122581.js create mode 100644 js/src/jit-test/tests/basic/bug1127303.js create mode 100644 js/src/jit-test/tests/basic/bug1131035.js create mode 100644 js/src/jit-test/tests/basic/bug1134146.js create mode 100644 js/src/jit-test/tests/basic/bug1135718.js create mode 100644 js/src/jit-test/tests/basic/bug1137616.js create mode 100644 js/src/jit-test/tests/basic/bug1141154.js create mode 100644 js/src/jit-test/tests/basic/bug1141329.js create mode 100644 js/src/jit-test/tests/basic/bug1143106.js create mode 100644 js/src/jit-test/tests/basic/bug1146836.js create mode 100644 js/src/jit-test/tests/basic/bug1147216.js create mode 100644 js/src/jit-test/tests/basic/bug1153057.js create mode 100644 js/src/jit-test/tests/basic/bug1161762.js create mode 100644 js/src/jit-test/tests/basic/bug1170355.js create mode 100644 js/src/jit-test/tests/basic/bug1172503-2.js create mode 100644 js/src/jit-test/tests/basic/bug1177907.js create mode 100644 js/src/jit-test/tests/basic/bug1180054.js create mode 100644 js/src/jit-test/tests/basic/bug1182865.js create mode 100644 js/src/jit-test/tests/basic/bug1185653.js create mode 100644 js/src/jit-test/tests/basic/bug1189744.js create mode 100644 js/src/jit-test/tests/basic/bug1190733.js create mode 100644 js/src/jit-test/tests/basic/bug1195452.js create mode 100644 js/src/jit-test/tests/basic/bug1196579.js create mode 100644 js/src/jit-test/tests/basic/bug1203790.js create mode 100644 js/src/jit-test/tests/basic/bug1204722.js create mode 100644 js/src/jit-test/tests/basic/bug1205870.js create mode 100644 js/src/jit-test/tests/basic/bug1206265.js create mode 100644 js/src/jit-test/tests/basic/bug1207863.js create mode 100644 js/src/jit-test/tests/basic/bug1208403.js create mode 100644 js/src/jit-test/tests/basic/bug1210596.js create mode 100644 js/src/jit-test/tests/basic/bug1219128-1.js create mode 100644 js/src/jit-test/tests/basic/bug1219128-2.js create mode 100644 js/src/jit-test/tests/basic/bug1219128-3.js create mode 100644 js/src/jit-test/tests/basic/bug1219128-4.js create mode 100644 js/src/jit-test/tests/basic/bug1219128-5.js create mode 100644 js/src/jit-test/tests/basic/bug1219128-6.js create mode 100644 js/src/jit-test/tests/basic/bug1219128-7.js create mode 100644 js/src/jit-test/tests/basic/bug1219128-8.js create mode 100644 js/src/jit-test/tests/basic/bug1219363.js create mode 100644 js/src/jit-test/tests/basic/bug1232269.js create mode 100644 js/src/jit-test/tests/basic/bug1234414.js create mode 100644 js/src/jit-test/tests/basic/bug1236476.js create mode 100644 js/src/jit-test/tests/basic/bug1237564.js create mode 100644 js/src/jit-test/tests/basic/bug1238003.js create mode 100644 js/src/jit-test/tests/basic/bug1238630.js create mode 100644 js/src/jit-test/tests/basic/bug1240502.js create mode 100644 js/src/jit-test/tests/basic/bug1247926.js create mode 100644 js/src/jit-test/tests/basic/bug1263868.js create mode 100644 js/src/jit-test/tests/basic/bug1264954.js create mode 100644 js/src/jit-test/tests/basic/bug1265693.js create mode 100644 js/src/jit-test/tests/basic/bug1276882.js create mode 100644 js/src/jit-test/tests/basic/bug1278839.js create mode 100644 js/src/jit-test/tests/basic/bug1280252.js create mode 100644 js/src/jit-test/tests/basic/bug1285227.js create mode 100644 js/src/jit-test/tests/basic/bug1292858.js create mode 100644 js/src/jit-test/tests/basic/bug1293258.js create mode 100644 js/src/jit-test/tests/basic/bug1293575.js create mode 100644 js/src/jit-test/tests/basic/bug1295031.js create mode 100644 js/src/jit-test/tests/basic/bug1296015.js create mode 100644 js/src/jit-test/tests/basic/bug1296016.js create mode 100644 js/src/jit-test/tests/basic/bug1296249.js create mode 100644 js/src/jit-test/tests/basic/bug1300548.js create mode 100644 js/src/jit-test/tests/basic/bug1300904.js create mode 100644 js/src/jit-test/tests/basic/bug1301797.js create mode 100644 js/src/jit-test/tests/basic/bug1302682.js create mode 100644 js/src/jit-test/tests/basic/bug1310418.js create mode 100644 js/src/jit-test/tests/basic/bug1317402.js create mode 100644 js/src/jit-test/tests/basic/bug1341326.js create mode 100644 js/src/jit-test/tests/basic/bug1344265.js create mode 100644 js/src/jit-test/tests/basic/bug1348407.js create mode 100644 js/src/jit-test/tests/basic/bug1355573.js create mode 100644 js/src/jit-test/tests/basic/bug1372956.js create mode 100644 js/src/jit-test/tests/basic/bug1373356.js create mode 100644 js/src/jit-test/tests/basic/bug1380962.js create mode 100644 js/src/jit-test/tests/basic/bug1403679.js create mode 100644 js/src/jit-test/tests/basic/bug1407058.js create mode 100644 js/src/jit-test/tests/basic/bug1411294.js create mode 100644 js/src/jit-test/tests/basic/bug1420961.js create mode 100644 js/src/jit-test/tests/basic/bug1445854.js create mode 100644 js/src/jit-test/tests/basic/bug1447996.js create mode 100644 js/src/jit-test/tests/basic/bug1459258.js create mode 100644 js/src/jit-test/tests/basic/bug1470732.js create mode 100644 js/src/jit-test/tests/basic/bug1473256.js create mode 100644 js/src/jit-test/tests/basic/bug1483182.js create mode 100644 js/src/jit-test/tests/basic/bug1492920.js create mode 100644 js/src/jit-test/tests/basic/bug1493627.js create mode 100644 js/src/jit-test/tests/basic/bug1516406.js create mode 100644 js/src/jit-test/tests/basic/bug1520783.js create mode 100644 js/src/jit-test/tests/basic/bug1527592.js create mode 100644 js/src/jit-test/tests/basic/bug1532265.js create mode 100644 js/src/jit-test/tests/basic/bug1548759-1.js create mode 100644 js/src/jit-test/tests/basic/bug1548759-2.js create mode 100644 js/src/jit-test/tests/basic/bug1549035.js create mode 100644 js/src/jit-test/tests/basic/bug1554748.js create mode 100644 js/src/jit-test/tests/basic/bug1568029.js create mode 100644 js/src/jit-test/tests/basic/bug1574725.js create mode 100644 js/src/jit-test/tests/basic/bug1584027.js create mode 100644 js/src/jit-test/tests/basic/bug1589002.js create mode 100644 js/src/jit-test/tests/basic/bug1601074.js create mode 100644 js/src/jit-test/tests/basic/bug1610192.js create mode 100644 js/src/jit-test/tests/basic/bug1644839-2.js create mode 100644 js/src/jit-test/tests/basic/bug1644839.js create mode 100644 js/src/jit-test/tests/basic/bug1656744.js create mode 100644 js/src/jit-test/tests/basic/bug1666856.js create mode 100644 js/src/jit-test/tests/basic/bug1669616.js create mode 100644 js/src/jit-test/tests/basic/bug1678442.js create mode 100644 js/src/jit-test/tests/basic/bug1700525.js create mode 100644 js/src/jit-test/tests/basic/bug1707820.js create mode 100644 js/src/jit-test/tests/basic/bug1717408.js create mode 100644 js/src/jit-test/tests/basic/bug1721006.js create mode 100644 js/src/jit-test/tests/basic/bug1731540.js create mode 100644 js/src/jit-test/tests/basic/bug1733899.js create mode 100644 js/src/jit-test/tests/basic/bug1754968.js create mode 100644 js/src/jit-test/tests/basic/bug1757476.js create mode 100644 js/src/jit-test/tests/basic/bug1759029-1.js create mode 100644 js/src/jit-test/tests/basic/bug1759029-2.js create mode 100644 js/src/jit-test/tests/basic/bug1797486.js create mode 100644 js/src/jit-test/tests/basic/bug1814000.js create mode 100644 js/src/jit-test/tests/basic/bug1816311.js create mode 100644 js/src/jit-test/tests/basic/bug1821959.js create mode 100644 js/src/jit-test/tests/basic/bug1822962.js create mode 100644 js/src/jit-test/tests/basic/bug1827072.js create mode 100644 js/src/jit-test/tests/basic/bug1833517.js create mode 100644 js/src/jit-test/tests/basic/bug1845698.js create mode 100644 js/src/jit-test/tests/basic/bug1866540.js create mode 100644 js/src/jit-test/tests/basic/bug1870747.js create mode 100644 js/src/jit-test/tests/basic/bug1875363.js create mode 100644 js/src/jit-test/tests/basic/bug1877586.js create mode 100644 js/src/jit-test/tests/basic/bug504587-1.js create mode 100644 js/src/jit-test/tests/basic/bug507180.js create mode 100644 js/src/jit-test/tests/basic/bug509639.js create mode 100644 js/src/jit-test/tests/basic/bug509982.js create mode 100644 js/src/jit-test/tests/basic/bug510434.js create mode 100644 js/src/jit-test/tests/basic/bug510437-2.js create mode 100644 js/src/jit-test/tests/basic/bug511214.js create mode 100644 js/src/jit-test/tests/basic/bug511241.js create mode 100644 js/src/jit-test/tests/basic/bug513038.js create mode 100644 js/src/jit-test/tests/basic/bug513898-regexp.js create mode 100644 js/src/jit-test/tests/basic/bug516009.js create mode 100644 js/src/jit-test/tests/basic/bug517721.js create mode 100644 js/src/jit-test/tests/basic/bug519129.js create mode 100644 js/src/jit-test/tests/basic/bug520498.js create mode 100644 js/src/jit-test/tests/basic/bug522136.js create mode 100644 js/src/jit-test/tests/basic/bug522817.js create mode 100644 js/src/jit-test/tests/basic/bug524826-2.js create mode 100644 js/src/jit-test/tests/basic/bug524826.js create mode 100644 js/src/jit-test/tests/basic/bug525028.js create mode 100644 js/src/jit-test/tests/basic/bug528116.js create mode 100644 js/src/jit-test/tests/basic/bug532568-2.js create mode 100644 js/src/jit-test/tests/basic/bug532568.js create mode 100644 js/src/jit-test/tests/basic/bug532823.js create mode 100644 js/src/jit-test/tests/basic/bug535474.js create mode 100644 js/src/jit-test/tests/basic/bug535760.js create mode 100644 js/src/jit-test/tests/basic/bug535930.js create mode 100644 js/src/jit-test/tests/basic/bug536445.js create mode 100644 js/src/jit-test/tests/basic/bug536748.js create mode 100644 js/src/jit-test/tests/basic/bug539379.js create mode 100644 js/src/jit-test/tests/basic/bug539553-2.js create mode 100644 js/src/jit-test/tests/basic/bug539553-3.js create mode 100644 js/src/jit-test/tests/basic/bug539553.js create mode 100644 js/src/jit-test/tests/basic/bug541191-1.js create mode 100644 js/src/jit-test/tests/basic/bug541191-2.js create mode 100644 js/src/jit-test/tests/basic/bug541191-3.js create mode 100644 js/src/jit-test/tests/basic/bug541191-4.js create mode 100644 js/src/jit-test/tests/basic/bug541191-5.js create mode 100644 js/src/jit-test/tests/basic/bug552196.js create mode 100644 js/src/jit-test/tests/basic/bug557841.js create mode 100644 js/src/jit-test/tests/basic/bug558530.js create mode 100644 js/src/jit-test/tests/basic/bug558531.js create mode 100644 js/src/jit-test/tests/basic/bug558814.js create mode 100644 js/src/jit-test/tests/basic/bug559912.js create mode 100644 js/src/jit-test/tests/basic/bug560234.js create mode 100644 js/src/jit-test/tests/basic/bug560234b.js create mode 100644 js/src/jit-test/tests/basic/bug561279.js create mode 100644 js/src/jit-test/tests/basic/bug561359-1.js create mode 100644 js/src/jit-test/tests/basic/bug561359-2.js create mode 100644 js/src/jit-test/tests/basic/bug563125.js create mode 100644 js/src/jit-test/tests/basic/bug563243.js create mode 100644 js/src/jit-test/tests/basic/bug566136.js create mode 100644 js/src/jit-test/tests/basic/bug566637.js create mode 100644 js/src/jit-test/tests/basic/bug568276.js create mode 100644 js/src/jit-test/tests/basic/bug569651.js create mode 100644 js/src/jit-test/tests/basic/bug570385-1.js create mode 100644 js/src/jit-test/tests/basic/bug570385-2.js create mode 100644 js/src/jit-test/tests/basic/bug570385-3.js create mode 100644 js/src/jit-test/tests/basic/bug570663-1.js create mode 100644 js/src/jit-test/tests/basic/bug570663-2.js create mode 100644 js/src/jit-test/tests/basic/bug572229.js create mode 100644 js/src/jit-test/tests/basic/bug572232.js create mode 100644 js/src/jit-test/tests/basic/bug576823-regexp.js create mode 100644 js/src/jit-test/tests/basic/bug576837-regexp.js create mode 100644 js/src/jit-test/tests/basic/bug576891.js create mode 100644 js/src/jit-test/tests/basic/bug578041.js create mode 100644 js/src/jit-test/tests/basic/bug579740.js create mode 100644 js/src/jit-test/tests/basic/bug582161.js create mode 100644 js/src/jit-test/tests/basic/bug582479.js create mode 100644 js/src/jit-test/tests/basic/bug583757.js create mode 100644 js/src/jit-test/tests/basic/bug584499-1.js create mode 100644 js/src/jit-test/tests/basic/bug584499-2.js create mode 100644 js/src/jit-test/tests/basic/bug584565.js create mode 100644 js/src/jit-test/tests/basic/bug584603.js create mode 100644 js/src/jit-test/tests/basic/bug585542.js create mode 100644 js/src/jit-test/tests/basic/bug586499-regexp.js create mode 100644 js/src/jit-test/tests/basic/bug586917.js create mode 100644 js/src/jit-test/tests/basic/bug587346-regexp-01.js create mode 100644 js/src/jit-test/tests/basic/bug587366.js create mode 100644 js/src/jit-test/tests/basic/bug589318.js create mode 100644 js/src/jit-test/tests/basic/bug590006.js create mode 100644 js/src/jit-test/tests/basic/bug590036.js create mode 100644 js/src/jit-test/tests/basic/bug592927.js create mode 100644 js/src/jit-test/tests/basic/bug593611.js create mode 100644 js/src/jit-test/tests/basic/bug593663-regexp.js create mode 100644 js/src/jit-test/tests/basic/bug594108.js create mode 100644 js/src/jit-test/tests/basic/bug594205.js create mode 100644 js/src/jit-test/tests/basic/bug595963-1.js create mode 100644 js/src/jit-test/tests/basic/bug595963-2.js create mode 100644 js/src/jit-test/tests/basic/bug596351-1.js create mode 100644 js/src/jit-test/tests/basic/bug596351-2.js create mode 100644 js/src/jit-test/tests/basic/bug599854.js create mode 100644 js/src/jit-test/tests/basic/bug601046.js create mode 100644 js/src/jit-test/tests/basic/bug601398.js create mode 100644 js/src/jit-test/tests/basic/bug601401.js create mode 100644 js/src/jit-test/tests/basic/bug601428.js create mode 100644 js/src/jit-test/tests/basic/bug605754-regexp.js create mode 100644 js/src/jit-test/tests/basic/bug606083.js create mode 100644 js/src/jit-test/tests/basic/bug606882-1.js create mode 100644 js/src/jit-test/tests/basic/bug606882-2.js create mode 100644 js/src/jit-test/tests/basic/bug608313.js create mode 100644 js/src/jit-test/tests/basic/bug608980.js create mode 100644 js/src/jit-test/tests/basic/bug609502-1.js create mode 100644 js/src/jit-test/tests/basic/bug609502-2.js create mode 100644 js/src/jit-test/tests/basic/bug610592.js create mode 100644 js/src/jit-test/tests/basic/bug613122.js create mode 100644 js/src/jit-test/tests/basic/bug613151.js create mode 100644 js/src/jit-test/tests/basic/bug613399.js create mode 100644 js/src/jit-test/tests/basic/bug614688.js create mode 100644 js/src/jit-test/tests/basic/bug614915.js create mode 100644 js/src/jit-test/tests/basic/bug616009.js create mode 100644 js/src/jit-test/tests/basic/bug616170.js create mode 100644 js/src/jit-test/tests/basic/bug616762.js create mode 100644 js/src/jit-test/tests/basic/bug617139.js create mode 100644 js/src/jit-test/tests/basic/bug617171.js create mode 100644 js/src/jit-test/tests/basic/bug617745.js create mode 100644 js/src/jit-test/tests/basic/bug618350.js create mode 100644 js/src/jit-test/tests/basic/bug618577.js create mode 100644 js/src/jit-test/tests/basic/bug618853.js create mode 100644 js/src/jit-test/tests/basic/bug619004.js create mode 100644 js/src/jit-test/tests/basic/bug619338.js create mode 100644 js/src/jit-test/tests/basic/bug620532.js create mode 100644 js/src/jit-test/tests/basic/bug620838.js create mode 100644 js/src/jit-test/tests/basic/bug621022-1.js create mode 100644 js/src/jit-test/tests/basic/bug621022-2.js create mode 100644 js/src/jit-test/tests/basic/bug621487.js create mode 100644 js/src/jit-test/tests/basic/bug623859.js create mode 100644 js/src/jit-test/tests/basic/bug623863.js create mode 100644 js/src/jit-test/tests/basic/bug624041-1.js create mode 100644 js/src/jit-test/tests/basic/bug624041-2.js create mode 100644 js/src/jit-test/tests/basic/bug625141-1.js create mode 100644 js/src/jit-test/tests/basic/bug625141-2.js create mode 100644 js/src/jit-test/tests/basic/bug625399.js create mode 100644 js/src/jit-test/tests/basic/bug626398.js create mode 100644 js/src/jit-test/tests/basic/bug627609.js create mode 100644 js/src/jit-test/tests/basic/bug629858.js create mode 100644 js/src/jit-test/tests/basic/bug630865-5.js create mode 100644 js/src/jit-test/tests/basic/bug630865-6.js create mode 100644 js/src/jit-test/tests/basic/bug631082.js create mode 100644 js/src/jit-test/tests/basic/bug631219.js create mode 100644 js/src/jit-test/tests/basic/bug631788.js create mode 100644 js/src/jit-test/tests/basic/bug632778-1.js create mode 100644 js/src/jit-test/tests/basic/bug632778-2.js create mode 100644 js/src/jit-test/tests/basic/bug632901.js create mode 100644 js/src/jit-test/tests/basic/bug632964-regexp.js create mode 100644 js/src/jit-test/tests/basic/bug633409-1.js create mode 100644 js/src/jit-test/tests/basic/bug633409-2.js create mode 100644 js/src/jit-test/tests/basic/bug633752.js create mode 100644 js/src/jit-test/tests/basic/bug633828.js create mode 100644 js/src/jit-test/tests/basic/bug634593.js create mode 100644 js/src/jit-test/tests/basic/bug635417.js create mode 100644 js/src/jit-test/tests/basic/bug638981.js create mode 100644 js/src/jit-test/tests/basic/bug639126.js create mode 100644 js/src/jit-test/tests/basic/bug639128.js create mode 100644 js/src/jit-test/tests/basic/bug639311.js create mode 100644 js/src/jit-test/tests/basic/bug639591.js create mode 100644 js/src/jit-test/tests/basic/bug639759.js create mode 100644 js/src/jit-test/tests/basic/bug639797.js create mode 100644 js/src/jit-test/tests/basic/bug639807.js create mode 100644 js/src/jit-test/tests/basic/bug640203.js create mode 100644 js/src/jit-test/tests/basic/bug640993.js create mode 100644 js/src/jit-test/tests/basic/bug641229.js create mode 100644 js/src/jit-test/tests/basic/bug641231.js create mode 100644 js/src/jit-test/tests/basic/bug641235.js create mode 100644 js/src/jit-test/tests/basic/bug641491.js create mode 100644 js/src/jit-test/tests/basic/bug641525.js create mode 100644 js/src/jit-test/tests/basic/bug641563.js create mode 100644 js/src/jit-test/tests/basic/bug641741.js create mode 100644 js/src/jit-test/tests/basic/bug642154.js create mode 100644 js/src/jit-test/tests/basic/bug642161.js create mode 100644 js/src/jit-test/tests/basic/bug642164.js create mode 100644 js/src/jit-test/tests/basic/bug642206.js create mode 100644 js/src/jit-test/tests/basic/bug642248.js create mode 100644 js/src/jit-test/tests/basic/bug642254.js create mode 100644 js/src/jit-test/tests/basic/bug642319.js create mode 100644 js/src/jit-test/tests/basic/bug642326.js create mode 100644 js/src/jit-test/tests/basic/bug642422.js create mode 100644 js/src/jit-test/tests/basic/bug642569.js create mode 100644 js/src/jit-test/tests/basic/bug642592.js create mode 100644 js/src/jit-test/tests/basic/bug642758.js create mode 100644 js/src/jit-test/tests/basic/bug642772-1.js create mode 100644 js/src/jit-test/tests/basic/bug642772-2.js create mode 100644 js/src/jit-test/tests/basic/bug642772-3.js create mode 100644 js/src/jit-test/tests/basic/bug642894.js create mode 100644 js/src/jit-test/tests/basic/bug642985-1.js create mode 100644 js/src/jit-test/tests/basic/bug642985-2.js create mode 100644 js/src/jit-test/tests/basic/bug643113.js create mode 100644 js/src/jit-test/tests/basic/bug643169.js create mode 100644 js/src/jit-test/tests/basic/bug643243.js create mode 100644 js/src/jit-test/tests/basic/bug643244.js create mode 100644 js/src/jit-test/tests/basic/bug643249.js create mode 100644 js/src/jit-test/tests/basic/bug643285.js create mode 100644 js/src/jit-test/tests/basic/bug643733.js create mode 100644 js/src/jit-test/tests/basic/bug645293.js create mode 100644 js/src/jit-test/tests/basic/bug645632.js create mode 100644 js/src/jit-test/tests/basic/bug646393.js create mode 100644 js/src/jit-test/tests/basic/bug646968-3.js create mode 100644 js/src/jit-test/tests/basic/bug646968-4.js create mode 100644 js/src/jit-test/tests/basic/bug646968-5.js create mode 100644 js/src/jit-test/tests/basic/bug646968-6.js create mode 100644 js/src/jit-test/tests/basic/bug646968-7.js create mode 100644 js/src/jit-test/tests/basic/bug646968-8.js create mode 100644 js/src/jit-test/tests/basic/bug647463.js create mode 100644 js/src/jit-test/tests/basic/bug648357.js create mode 100644 js/src/jit-test/tests/basic/bug648773.js create mode 100644 js/src/jit-test/tests/basic/bug649439.js create mode 100644 js/src/jit-test/tests/basic/bug649771.js create mode 100644 js/src/jit-test/tests/basic/bug651451-2.js create mode 100644 js/src/jit-test/tests/basic/bug651451.js create mode 100644 js/src/jit-test/tests/basic/bug651966.js create mode 100644 js/src/jit-test/tests/basic/bug652054.js create mode 100644 js/src/jit-test/tests/basic/bug652060.js create mode 100644 js/src/jit-test/tests/basic/bug652422.js create mode 100644 js/src/jit-test/tests/basic/bug652646.js create mode 100644 js/src/jit-test/tests/basic/bug653153.js create mode 100644 js/src/jit-test/tests/basic/bug653262.js create mode 100644 js/src/jit-test/tests/basic/bug653438.js create mode 100644 js/src/jit-test/tests/basic/bug653672.js create mode 100644 js/src/jit-test/tests/basic/bug654073.js create mode 100644 js/src/jit-test/tests/basic/bug654668.js create mode 100644 js/src/jit-test/tests/basic/bug656261.js create mode 100644 js/src/jit-test/tests/basic/bug657197.js create mode 100644 js/src/jit-test/tests/basic/bug657225.js create mode 100644 js/src/jit-test/tests/basic/bug657245.js create mode 100644 js/src/jit-test/tests/basic/bug657901.js create mode 100644 js/src/jit-test/tests/basic/bug658539.js create mode 100644 js/src/jit-test/tests/basic/bug660081.js create mode 100644 js/src/jit-test/tests/basic/bug660173.js create mode 100644 js/src/jit-test/tests/basic/bug660203.js create mode 100644 js/src/jit-test/tests/basic/bug660204.js create mode 100644 js/src/jit-test/tests/basic/bug660597.js create mode 100644 js/src/jit-test/tests/basic/bug662044.js create mode 100644 js/src/jit-test/tests/basic/bug662841.js create mode 100644 js/src/jit-test/tests/basic/bug663338.js create mode 100644 js/src/jit-test/tests/basic/bug665289.js create mode 100644 js/src/jit-test/tests/basic/bug666448.js create mode 100644 js/src/jit-test/tests/basic/bug667504-syntax.js create mode 100644 js/src/jit-test/tests/basic/bug667507.js create mode 100644 js/src/jit-test/tests/basic/bug673468.js create mode 100644 js/src/jit-test/tests/basic/bug673469.js create mode 100644 js/src/jit-test/tests/basic/bug673569.js create mode 100644 js/src/jit-test/tests/basic/bug673705-1.js create mode 100644 js/src/jit-test/tests/basic/bug673705-2.js create mode 100644 js/src/jit-test/tests/basic/bug673715.js create mode 100644 js/src/jit-test/tests/basic/bug673731.js create mode 100644 js/src/jit-test/tests/basic/bug673766.js create mode 100644 js/src/jit-test/tests/basic/bug673767.js create mode 100644 js/src/jit-test/tests/basic/bug674085.js create mode 100644 js/src/jit-test/tests/basic/bug674776.js create mode 100644 js/src/jit-test/tests/basic/bug677635.js create mode 100644 js/src/jit-test/tests/basic/bug678211.js create mode 100644 js/src/jit-test/tests/basic/bug679977.js create mode 100644 js/src/jit-test/tests/basic/bug679986-1.js create mode 100644 js/src/jit-test/tests/basic/bug679986-2.js create mode 100644 js/src/jit-test/tests/basic/bug680217.js create mode 100644 js/src/jit-test/tests/basic/bug683140.js create mode 100644 js/src/jit-test/tests/basic/bug683838.js create mode 100644 js/src/jit-test/tests/basic/bug685313.js create mode 100644 js/src/jit-test/tests/basic/bug685321-1.js create mode 100644 js/src/jit-test/tests/basic/bug685321-2.js create mode 100644 js/src/jit-test/tests/basic/bug686296.js create mode 100644 js/src/jit-test/tests/basic/bug686396.js create mode 100644 js/src/jit-test/tests/basic/bug688939.js create mode 100644 js/src/jit-test/tests/basic/bug689916-regexp.js create mode 100644 js/src/jit-test/tests/basic/bug690732.js create mode 100644 js/src/jit-test/tests/basic/bug691797-regexp-1.js create mode 100644 js/src/jit-test/tests/basic/bug691797-regexp-2.js create mode 100644 js/src/jit-test/tests/basic/bug695922-syntax.js create mode 100644 js/src/jit-test/tests/basic/bug696748.js create mode 100644 js/src/jit-test/tests/basic/bug699166.js create mode 100644 js/src/jit-test/tests/basic/bug700300.js create mode 100644 js/src/jit-test/tests/basic/bug702426-regexp-gc.js create mode 100644 js/src/jit-test/tests/basic/bug702572.js create mode 100644 js/src/jit-test/tests/basic/bug703157.js create mode 100644 js/src/jit-test/tests/basic/bug703544.js create mode 100644 js/src/jit-test/tests/basic/bug703818.js create mode 100644 js/src/jit-test/tests/basic/bug704134.js create mode 100644 js/src/jit-test/tests/basic/bug705895-1.js create mode 100644 js/src/jit-test/tests/basic/bug705895-2.js create mode 100644 js/src/jit-test/tests/basic/bug706316.js create mode 100644 js/src/jit-test/tests/basic/bug706795.js create mode 100644 js/src/jit-test/tests/basic/bug706808.js create mode 100644 js/src/jit-test/tests/basic/bug707750.js create mode 100644 js/src/jit-test/tests/basic/bug708228.js create mode 100644 js/src/jit-test/tests/basic/bug708819.js create mode 100644 js/src/jit-test/tests/basic/bug709634.js create mode 100644 js/src/jit-test/tests/basic/bug710947.js create mode 100644 js/src/jit-test/tests/basic/bug713226.js create mode 100644 js/src/jit-test/tests/basic/bug714614.js create mode 100644 js/src/jit-test/tests/basic/bug714616.js create mode 100644 js/src/jit-test/tests/basic/bug716013.js create mode 100644 js/src/jit-test/tests/basic/bug718852.js create mode 100644 js/src/jit-test/tests/basic/bug719750.js create mode 100644 js/src/jit-test/tests/basic/bug720070.js create mode 100644 js/src/jit-test/tests/basic/bug720675.js create mode 100644 js/src/jit-test/tests/basic/bug722028.js create mode 100644 js/src/jit-test/tests/basic/bug727223.js create mode 100644 js/src/jit-test/tests/basic/bug727921.js create mode 100644 js/src/jit-test/tests/basic/bug728086.js create mode 100644 js/src/jit-test/tests/basic/bug728190.js create mode 100644 js/src/jit-test/tests/basic/bug728609.js create mode 100644 js/src/jit-test/tests/basic/bug730085.js create mode 100644 js/src/jit-test/tests/basic/bug730888.js create mode 100644 js/src/jit-test/tests/basic/bug731642.js create mode 100644 js/src/jit-test/tests/basic/bug732693.js create mode 100644 js/src/jit-test/tests/basic/bug737384.js create mode 100644 js/src/jit-test/tests/basic/bug738841.js create mode 100644 js/src/jit-test/tests/basic/bug738846.js create mode 100644 js/src/jit-test/tests/basic/bug739694-2.js create mode 100644 js/src/jit-test/tests/basic/bug743961.js create mode 100644 js/src/jit-test/tests/basic/bug744285.js create mode 100644 js/src/jit-test/tests/basic/bug744287.js create mode 100644 js/src/jit-test/tests/basic/bug744356.js create mode 100644 js/src/jit-test/tests/basic/bug745360.js create mode 100644 js/src/jit-test/tests/basic/bug749039.js create mode 100644 js/src/jit-test/tests/basic/bug749620.js create mode 100644 js/src/jit-test/tests/basic/bug750307.js create mode 100644 js/src/jit-test/tests/basic/bug754150.js create mode 100644 js/src/jit-test/tests/basic/bug754242.js create mode 100644 js/src/jit-test/tests/basic/bug756851.js create mode 100644 js/src/jit-test/tests/basic/bug757199.js create mode 100644 js/src/jit-test/tests/basic/bug757431.js create mode 100644 js/src/jit-test/tests/basic/bug763440.js create mode 100644 js/src/jit-test/tests/basic/bug767074.js create mode 100644 js/src/jit-test/tests/basic/bug767234.js create mode 100644 js/src/jit-test/tests/basic/bug767273.js create mode 100644 js/src/jit-test/tests/basic/bug768732.js create mode 100644 js/src/jit-test/tests/basic/bug769433.js create mode 100644 js/src/jit-test/tests/basic/bug770952.js create mode 100644 js/src/jit-test/tests/basic/bug773153.js create mode 100644 js/src/jit-test/tests/basic/bug774859.js create mode 100644 js/src/jit-test/tests/basic/bug777776.js create mode 100644 js/src/jit-test/tests/basic/bug777992.js create mode 100644 js/src/jit-test/tests/basic/bug781393.js create mode 100644 js/src/jit-test/tests/basic/bug782337.js create mode 100644 js/src/jit-test/tests/basic/bug783989.js create mode 100644 js/src/jit-test/tests/basic/bug785094.js create mode 100644 js/src/jit-test/tests/basic/bug785175.js create mode 100644 js/src/jit-test/tests/basic/bug786114.js create mode 100644 js/src/jit-test/tests/basic/bug787847.js create mode 100644 js/src/jit-test/tests/basic/bug791465.js create mode 100644 js/src/jit-test/tests/basic/bug792239.js create mode 100644 js/src/jit-test/tests/basic/bug794025.js create mode 100644 js/src/jit-test/tests/basic/bug794286.js create mode 100644 js/src/jit-test/tests/basic/bug794947.js create mode 100644 js/src/jit-test/tests/basic/bug797496.js create mode 100644 js/src/jit-test/tests/basic/bug798678.js create mode 100644 js/src/jit-test/tests/basic/bug798834.js create mode 100644 js/src/jit-test/tests/basic/bug806522.js create mode 100644 js/src/jit-test/tests/basic/bug807623.js create mode 100644 js/src/jit-test/tests/basic/bug808067.js create mode 100644 js/src/jit-test/tests/basic/bug808483.js create mode 100644 js/src/jit-test/tests/basic/bug817002.js create mode 100644 js/src/jit-test/tests/basic/bug820124-1.js create mode 100644 js/src/jit-test/tests/basic/bug820124-2.js create mode 100644 js/src/jit-test/tests/basic/bug820124-3.js create mode 100644 js/src/jit-test/tests/basic/bug820124-4.js create mode 100644 js/src/jit-test/tests/basic/bug821850.js create mode 100644 js/src/jit-test/tests/basic/bug824856.js create mode 100644 js/src/jit-test/tests/basic/bug826581.js create mode 100644 js/src/jit-test/tests/basic/bug827104.js create mode 100644 js/src/jit-test/tests/basic/bug829795.js create mode 100644 js/src/jit-test/tests/basic/bug829813.js create mode 100644 js/src/jit-test/tests/basic/bug829821.js create mode 100644 js/src/jit-test/tests/basic/bug830045.js create mode 100644 js/src/jit-test/tests/basic/bug830049.js create mode 100644 js/src/jit-test/tests/basic/bug830967.js create mode 100644 js/src/jit-test/tests/basic/bug831658.js create mode 100644 js/src/jit-test/tests/basic/bug832197-1.js create mode 100644 js/src/jit-test/tests/basic/bug832197-2.js create mode 100644 js/src/jit-test/tests/basic/bug832203.js create mode 100644 js/src/jit-test/tests/basic/bug836563.js create mode 100644 js/src/jit-test/tests/basic/bug836623.js create mode 100644 js/src/jit-test/tests/basic/bug839420.js create mode 100644 js/src/jit-test/tests/basic/bug842425.js create mode 100644 js/src/jit-test/tests/basic/bug842482.js create mode 100644 js/src/jit-test/tests/basic/bug842940.js create mode 100644 js/src/jit-test/tests/basic/bug846080.js create mode 100644 js/src/jit-test/tests/basic/bug851635.js create mode 100644 js/src/jit-test/tests/basic/bug851756.js create mode 100644 js/src/jit-test/tests/basic/bug852016-2.js create mode 100644 js/src/jit-test/tests/basic/bug852016.js create mode 100644 js/src/jit-test/tests/basic/bug854124.js create mode 100644 js/src/jit-test/tests/basic/bug854137.js create mode 100644 js/src/jit-test/tests/basic/bug855088.js create mode 100644 js/src/jit-test/tests/basic/bug858097.js create mode 100644 js/src/jit-test/tests/basic/bug862228.js create mode 100644 js/src/jit-test/tests/basic/bug863084.js create mode 100644 js/src/jit-test/tests/basic/bug867946.js create mode 100644 js/src/jit-test/tests/basic/bug876226.js create mode 100644 js/src/jit-test/tests/basic/bug877378.js create mode 100644 js/src/jit-test/tests/basic/bug880377.js create mode 100644 js/src/jit-test/tests/basic/bug882416.js create mode 100644 js/src/jit-test/tests/basic/bug883523.js create mode 100644 js/src/jit-test/tests/basic/bug883623.js create mode 100644 js/src/jit-test/tests/basic/bug884920.js create mode 100644 js/src/jit-test/tests/basic/bug886803.js create mode 100644 js/src/jit-test/tests/basic/bug908915.js create mode 100644 js/src/jit-test/tests/basic/bug911368.js create mode 100644 js/src/jit-test/tests/basic/bug913445.js create mode 100644 js/src/jit-test/tests/basic/bug920484.js create mode 100644 js/src/jit-test/tests/basic/bug934789-1.js create mode 100644 js/src/jit-test/tests/basic/bug934789-2.js create mode 100644 js/src/jit-test/tests/basic/bug934997.js create mode 100644 js/src/jit-test/tests/basic/bug935294.js create mode 100644 js/src/jit-test/tests/basic/bug937089.js create mode 100644 js/src/jit-test/tests/basic/bug942390.js create mode 100644 js/src/jit-test/tests/basic/bug943126.js create mode 100644 js/src/jit-test/tests/basic/bug950725.js create mode 100644 js/src/jit-test/tests/basic/bug951213.js create mode 100644 js/src/jit-test/tests/basic/bug951346.js create mode 100644 js/src/jit-test/tests/basic/bug951632.js create mode 100644 js/src/jit-test/tests/basic/bug970643.js create mode 100644 js/src/jit-test/tests/basic/bug972961.js create mode 100644 js/src/jit-test/tests/basic/bug976446.js create mode 100644 js/src/jit-test/tests/basic/bug980013.js create mode 100644 js/src/jit-test/tests/basic/bug980450.js create mode 100644 js/src/jit-test/tests/basic/bug984766.js create mode 100644 js/src/jit-test/tests/basic/builtinLocals.js create mode 100644 js/src/jit-test/tests/basic/call-construct-hook.js create mode 100644 js/src/jit-test/tests/basic/call.js create mode 100644 js/src/jit-test/tests/basic/call2.js create mode 100644 js/src/jit-test/tests/basic/change-code-write-protect.js create mode 100644 js/src/jit-test/tests/basic/compression-random-data.js create mode 100644 js/src/jit-test/tests/basic/constAssignError.js create mode 100644 js/src/jit-test/tests/basic/constGlobalAssignError.js create mode 100644 js/src/jit-test/tests/basic/constant-folding-1.js create mode 100644 js/src/jit-test/tests/basic/construct-primitive-Function.prototype.prototype.js create mode 100644 js/src/jit-test/tests/basic/consume-interpreter-stack-bug1473289.js create mode 100644 js/src/jit-test/tests/basic/cross-global-for-in.js create mode 100644 js/src/jit-test/tests/basic/cross-realm-iterator-suppression.js create mode 100644 js/src/jit-test/tests/basic/date-getLocale-oom.js create mode 100644 js/src/jit-test/tests/basic/date-late-weekday-warning.js create mode 100644 js/src/jit-test/tests/basic/date-methods-this-error.js create mode 100644 js/src/jit-test/tests/basic/decompile-script.js create mode 100644 js/src/jit-test/tests/basic/deep2.js create mode 100644 js/src/jit-test/tests/basic/deepForInLoop.js create mode 100644 js/src/jit-test/tests/basic/defaultvalue-toString-is-noncallable-object-elem.js create mode 100644 js/src/jit-test/tests/basic/defaultvalue-toString-is-noncallable-object.js create mode 100644 js/src/jit-test/tests/basic/defaultvalue-valueOf-is-noncallable-object.js create mode 100644 js/src/jit-test/tests/basic/define-frozen-dense-strict.js create mode 100644 js/src/jit-test/tests/basic/define-frozen-dense.js create mode 100644 js/src/jit-test/tests/basic/define-frozen-property-strict.js create mode 100644 js/src/jit-test/tests/basic/define-frozen-property.js create mode 100644 js/src/jit-test/tests/basic/delete-all-dict-props.js create mode 100644 js/src/jit-test/tests/basic/delete-array-elements.js create mode 100644 js/src/jit-test/tests/basic/delete-indexed-names.js create mode 100644 js/src/jit-test/tests/basic/delete-integer-nonid.js create mode 100644 js/src/jit-test/tests/basic/delete-last-check-proto.js create mode 100644 js/src/jit-test/tests/basic/delete-named-names.js create mode 100644 js/src/jit-test/tests/basic/delete-non-config.js create mode 100644 js/src/jit-test/tests/basic/deleteToString.js create mode 100644 js/src/jit-test/tests/basic/dense-elements-appear.js create mode 100644 js/src/jit-test/tests/basic/dense-elements-hole-negative.js create mode 100644 js/src/jit-test/tests/basic/densify-elements.js create mode 100644 js/src/jit-test/tests/basic/dependentStrings.js create mode 100644 js/src/jit-test/tests/basic/destructuring-default.js create mode 100644 js/src/jit-test/tests/basic/destructuring-iterator.js create mode 100644 js/src/jit-test/tests/basic/destructuring-null-or-undefined-into-computed-property-name.js create mode 100644 js/src/jit-test/tests/basic/destructuring-requireobjectcoercible.js create mode 100644 js/src/jit-test/tests/basic/destructuring-rest-identifiers.js create mode 100644 js/src/jit-test/tests/basic/destructuring-rest.js create mode 100644 js/src/jit-test/tests/basic/dict-object-freeze-or-seal.js create mode 100644 js/src/jit-test/tests/basic/dictionary-add-prop-oom.js create mode 100644 js/src/jit-test/tests/basic/dictionary-delete-compact.js create mode 100644 js/src/jit-test/tests/basic/disable-jit-backend.js create mode 100644 js/src/jit-test/tests/basic/disassemble-filename.js create mode 100644 js/src/jit-test/tests/basic/display-url-in-stack-trace.js create mode 100644 js/src/jit-test/tests/basic/doMath.js create mode 100644 js/src/jit-test/tests/basic/dumpStringRepresentation.js create mode 100644 js/src/jit-test/tests/basic/dumpValue.js create mode 100644 js/src/jit-test/tests/basic/eif-generator.js create mode 100644 js/src/jit-test/tests/basic/emulates-undefined.js create mode 100644 js/src/jit-test/tests/basic/equalInt.js create mode 100644 js/src/jit-test/tests/basic/error-stack-accessors.js create mode 100644 js/src/jit-test/tests/basic/error-toString.js create mode 100644 js/src/jit-test/tests/basic/eval-introduction-principals.js create mode 100644 js/src/jit-test/tests/basic/eval-json-differences.js create mode 100644 js/src/jit-test/tests/basic/eval-scopes.js create mode 100644 js/src/jit-test/tests/basic/evalInWorker-interrupt.js create mode 100644 js/src/jit-test/tests/basic/evalInWorker-jit-options.js create mode 100644 js/src/jit-test/tests/basic/evalInWorker-nested.js create mode 100644 js/src/jit-test/tests/basic/evalInWorker-stack-limit.js create mode 100644 js/src/jit-test/tests/basic/evalReturningScope-global.js create mode 100644 js/src/jit-test/tests/basic/evaluate-catchTermination.js create mode 100644 js/src/jit-test/tests/basic/evaluate-global-debuggee.js create mode 100644 js/src/jit-test/tests/basic/evaluate-global-discardSource.js create mode 100644 js/src/jit-test/tests/basic/evaluate-negative-column.js create mode 100644 js/src/jit-test/tests/basic/evaluate-restore-options.js create mode 100644 js/src/jit-test/tests/basic/evaluate-worker.js create mode 100644 js/src/jit-test/tests/basic/exception-column-number.js create mode 100644 js/src/jit-test/tests/basic/expr-decompiler-bug1475953.js create mode 100644 js/src/jit-test/tests/basic/expression-autopsy.js create mode 100644 js/src/jit-test/tests/basic/external-strings-cgc.js create mode 100644 js/src/jit-test/tests/basic/external-strings.js create mode 100644 js/src/jit-test/tests/basic/fannkuch.js create mode 100644 js/src/jit-test/tests/basic/fdlibm-for-sin-cos-tan-argument.js create mode 100644 js/src/jit-test/tests/basic/finally-implicit-return.js create mode 100644 js/src/jit-test/tests/basic/firstSlotConflict.js create mode 100644 js/src/jit-test/tests/basic/folding-bug767660.js create mode 100644 js/src/jit-test/tests/basic/for-in-densified-elements.js create mode 100644 js/src/jit-test/tests/basic/for-in-proto-properties.js create mode 100644 js/src/jit-test/tests/basic/for-in-replace-sparse.js create mode 100644 js/src/jit-test/tests/basic/forVarInWith.js create mode 100644 js/src/jit-test/tests/basic/freeze-builtins.js create mode 100644 js/src/jit-test/tests/basic/function-apply-proxy.js create mode 100644 js/src/jit-test/tests/basic/function-bind.js create mode 100644 js/src/jit-test/tests/basic/function-cloning-2.js create mode 100644 js/src/jit-test/tests/basic/function-gname.js create mode 100644 js/src/jit-test/tests/basic/function-tosource-bug779694.js create mode 100644 js/src/jit-test/tests/basic/function-tosource-constructor.js create mode 100644 js/src/jit-test/tests/basic/function-tosource-exprbody-bug777834.js create mode 100644 js/src/jit-test/tests/basic/function-tosource-func-proto.js create mode 100644 js/src/jit-test/tests/basic/function-tosource-getset.js create mode 100644 js/src/jit-test/tests/basic/function-tosource-lambda.js create mode 100644 js/src/jit-test/tests/basic/function-tosource-statement.js create mode 100644 js/src/jit-test/tests/basic/functionRedeclConst.js create mode 100644 js/src/jit-test/tests/basic/functionRedeclGlobalConst.js create mode 100644 js/src/jit-test/tests/basic/functionRedeclLet.js create mode 100644 js/src/jit-test/tests/basic/functionnames.js create mode 100644 js/src/jit-test/tests/basic/getBacktrace-invalid.js create mode 100644 js/src/jit-test/tests/basic/getelem.js create mode 100644 js/src/jit-test/tests/basic/getprop.js create mode 100644 js/src/jit-test/tests/basic/global-lexicals-function.js create mode 100644 js/src/jit-test/tests/basic/globalGet.js create mode 100644 js/src/jit-test/tests/basic/globalOptimize-1.js create mode 100644 js/src/jit-test/tests/basic/globalSet.js create mode 100644 js/src/jit-test/tests/basic/hasnativemethodpure-optimization.js create mode 100644 js/src/jit-test/tests/basic/homogenous-literals.js create mode 100644 js/src/jit-test/tests/basic/html-extensions.js create mode 100644 js/src/jit-test/tests/basic/hypot-approx.js create mode 100644 js/src/jit-test/tests/basic/hypot-exact.js create mode 100644 js/src/jit-test/tests/basic/ifInsideLoop.js create mode 100644 js/src/jit-test/tests/basic/inArrayTest.js create mode 100644 js/src/jit-test/tests/basic/inObjectTest.js create mode 100644 js/src/jit-test/tests/basic/indexed-iteration.js create mode 100644 js/src/jit-test/tests/basic/indexof-equal.js create mode 100644 js/src/jit-test/tests/basic/inflate-oom.js create mode 100644 js/src/jit-test/tests/basic/innerLoopIntOuterDouble.js create mode 100644 js/src/jit-test/tests/basic/inner_double_outer_int.js create mode 100644 js/src/jit-test/tests/basic/invokeFunctionMagic.js create mode 100644 js/src/jit-test/tests/basic/is-valid-json.js create mode 100644 js/src/jit-test/tests/basic/iter-cache-null-proto.js create mode 100644 js/src/jit-test/tests/basic/iterable-error-messages.js create mode 100644 js/src/jit-test/tests/basic/iterator-cache-invalidation.js create mode 100644 js/src/jit-test/tests/basic/jemalloc-settings.js create mode 100644 js/src/jit-test/tests/basic/joinTest.js create mode 100644 js/src/jit-test/tests/basic/json-parse-object-edge-cases.js create mode 100644 js/src/jit-test/tests/basic/json-stringify-large-length.js create mode 100644 js/src/jit-test/tests/basic/key-gc.js create mode 100644 js/src/jit-test/tests/basic/keys-testing.js create mode 100644 js/src/jit-test/tests/basic/lazyparse.js create mode 100644 js/src/jit-test/tests/basic/letTDZAfterInitializer.js create mode 100644 js/src/jit-test/tests/basic/letTDZEffectful.js create mode 100644 js/src/jit-test/tests/basic/letTDZSwitchClosure.js create mode 100644 js/src/jit-test/tests/basic/local.js create mode 100644 js/src/jit-test/tests/basic/matchInLoop.js create mode 100644 js/src/jit-test/tests/basic/math-jit-tests.js create mode 100644 js/src/jit-test/tests/basic/math-random.js create mode 100644 js/src/jit-test/tests/basic/mathImul.js create mode 100644 js/src/jit-test/tests/basic/mathRoundBig.js create mode 100644 js/src/jit-test/tests/basic/max-string-length.js create mode 100644 js/src/jit-test/tests/basic/maxConvertAllArgs.js create mode 100644 js/src/jit-test/tests/basic/megamorphic-setelem-plain.js create mode 100644 js/src/jit-test/tests/basic/merge_type_maps.js create mode 100644 js/src/jit-test/tests/basic/metadata-hook-regexp-result.js create mode 100644 js/src/jit-test/tests/basic/metadata-hook.js create mode 100644 js/src/jit-test/tests/basic/missingArgTest.js create mode 100644 js/src/jit-test/tests/basic/missingArgTest2.js create mode 100644 js/src/jit-test/tests/basic/mod-double-power-of-two.js create mode 100644 js/src/jit-test/tests/basic/mod.js create mode 100644 js/src/jit-test/tests/basic/more-compartments-flag.js create mode 100644 js/src/jit-test/tests/basic/multiple-declared-args-syntax.js create mode 100644 js/src/jit-test/tests/basic/mutable-proto-teleporting.js create mode 100644 js/src/jit-test/tests/basic/name-inactive-del.js create mode 100644 js/src/jit-test/tests/basic/name-inactive-eval-del.js create mode 100644 js/src/jit-test/tests/basic/name-inactive-inferflags.js create mode 100644 js/src/jit-test/tests/basic/name-inactive.js create mode 100644 js/src/jit-test/tests/basic/name.js create mode 100644 js/src/jit-test/tests/basic/negative-zero-index.js create mode 100644 js/src/jit-test/tests/basic/nestedContinue.js create mode 100644 js/src/jit-test/tests/basic/nestedExit2.js create mode 100644 js/src/jit-test/tests/basic/nestedExitLoop.js create mode 100644 js/src/jit-test/tests/basic/new-Function-prototype.js create mode 100644 js/src/jit-test/tests/basic/new-bound-function.js create mode 100644 js/src/jit-test/tests/basic/new-read-before-write.js create mode 100644 js/src/jit-test/tests/basic/newArrayTest.js create mode 100644 js/src/jit-test/tests/basic/newTargetOSR.js create mode 100644 js/src/jit-test/tests/basic/newTargetRectifier.js create mode 100644 js/src/jit-test/tests/basic/newTest.js create mode 100644 js/src/jit-test/tests/basic/non-constructor-msg.js create mode 100644 js/src/jit-test/tests/basic/non-extensible-array.js create mode 100644 js/src/jit-test/tests/basic/non-extensible-elements1.js create mode 100644 js/src/jit-test/tests/basic/non-extensible-elements2.js create mode 100644 js/src/jit-test/tests/basic/non-extensible-elements3.js create mode 100644 js/src/jit-test/tests/basic/non-extensible-elements4.js create mode 100644 js/src/jit-test/tests/basic/non-extensible-elements5.js create mode 100644 js/src/jit-test/tests/basic/non-extensible-elements6.js create mode 100644 js/src/jit-test/tests/basic/non-extensible-elements7.js create mode 100644 js/src/jit-test/tests/basic/non-extensible-elements8.js create mode 100644 js/src/jit-test/tests/basic/non-extensible-elements9.js create mode 100644 js/src/jit-test/tests/basic/nonEmptyStack1.js create mode 100644 js/src/jit-test/tests/basic/nonEmptyStack2.js create mode 100644 js/src/jit-test/tests/basic/null-filename-Error.js create mode 100644 js/src/jit-test/tests/basic/number-isfinite.js create mode 100644 js/src/jit-test/tests/basic/number-isinteger.js create mode 100644 js/src/jit-test/tests/basic/number-isnan.js create mode 100644 js/src/jit-test/tests/basic/number-methods-this-error.js create mode 100644 js/src/jit-test/tests/basic/object-assign-plain-cache.js create mode 100644 js/src/jit-test/tests/basic/object-assign-plain.js create mode 100644 js/src/jit-test/tests/basic/object-assign.js create mode 100644 js/src/jit-test/tests/basic/object-is-inlined.js create mode 100644 js/src/jit-test/tests/basic/object-is-polymorphic.js create mode 100644 js/src/jit-test/tests/basic/object-is.js create mode 100644 js/src/jit-test/tests/basic/object-lookup-shadowing.js create mode 100644 js/src/jit-test/tests/basic/object-loose-equality.js create mode 100644 js/src/jit-test/tests/basic/object-rest.js create mode 100644 js/src/jit-test/tests/basic/object-shorthand.js create mode 100644 js/src/jit-test/tests/basic/object-spread.js create mode 100644 js/src/jit-test/tests/basic/object-tostring.js create mode 100644 js/src/jit-test/tests/basic/offThreadCompileToStencil-01.js create mode 100644 js/src/jit-test/tests/basic/offThreadCompileToStencil-02.js create mode 100644 js/src/jit-test/tests/basic/offThreadCompileToStencil-03.js create mode 100644 js/src/jit-test/tests/basic/offThreadCompileToStencil-04.js create mode 100644 js/src/jit-test/tests/basic/orNaNTest1.js create mode 100644 js/src/jit-test/tests/basic/orNaNTest2.js create mode 100644 js/src/jit-test/tests/basic/outerline.js create mode 100644 js/src/jit-test/tests/basic/packed-arrays.js create mode 100644 js/src/jit-test/tests/basic/parseIntTests.js create mode 100644 js/src/jit-test/tests/basic/parsingNumbers.js create mode 100644 js/src/jit-test/tests/basic/plain-object-prototypes-error.js create mode 100644 js/src/jit-test/tests/basic/plain-object-prototypes.js create mode 100644 js/src/jit-test/tests/basic/plain-object-to-string.js create mode 100644 js/src/jit-test/tests/basic/primitive-proto-properties.js create mode 100644 js/src/jit-test/tests/basic/primitiveProto.js create mode 100644 js/src/jit-test/tests/basic/prop-access-error-message.js create mode 100644 js/src/jit-test/tests/basic/properly-remove-timeout-root-before-shutdown.js create mode 100644 js/src/jit-test/tests/basic/property-enumeration-order.js create mode 100644 js/src/jit-test/tests/basic/property-error-message-fix-disabled.js create mode 100644 js/src/jit-test/tests/basic/property-error-message-fix.js create mode 100644 js/src/jit-test/tests/basic/putargsNoReturn.js create mode 100644 js/src/jit-test/tests/basic/putargsReturn.js create mode 100644 js/src/jit-test/tests/basic/recompute-wrappers.js create mode 100644 js/src/jit-test/tests/basic/regexp-removed-dot-star.js create mode 100644 js/src/jit-test/tests/basic/regexp-reset-input.js create mode 100644 js/src/jit-test/tests/basic/regexp-sticky-undef-capture.js create mode 100644 js/src/jit-test/tests/basic/regexp-test-direct-bug-694752.js create mode 100644 js/src/jit-test/tests/basic/regexp-undefined-match.js create mode 100644 js/src/jit-test/tests/basic/regexpLastIndex.js create mode 100644 js/src/jit-test/tests/basic/regexpLastIndexReset.js create mode 100644 js/src/jit-test/tests/basic/relazify-selfhosted.js create mode 100644 js/src/jit-test/tests/basic/relazify.js create mode 100644 js/src/jit-test/tests/basic/runOnceClosures.js create mode 100644 js/src/jit-test/tests/basic/script-filename-validation-1.js create mode 100644 js/src/jit-test/tests/basic/script-filename-validation-2.js create mode 100644 js/src/jit-test/tests/basic/setArgumentsLength.js create mode 100644 js/src/jit-test/tests/basic/setArgumentsLength2.js create mode 100644 js/src/jit-test/tests/basic/setCall.js create mode 100644 js/src/jit-test/tests/basic/setCallEvalMiddle.js create mode 100644 js/src/jit-test/tests/basic/setCallEvalMiddle2.js create mode 100644 js/src/jit-test/tests/basic/setCallGlobal.js create mode 100644 js/src/jit-test/tests/basic/setPrototypeOf.js create mode 100644 js/src/jit-test/tests/basic/setelem.js create mode 100644 js/src/jit-test/tests/basic/setprop-with-index.js create mode 100644 js/src/jit-test/tests/basic/setprop.js create mode 100644 js/src/jit-test/tests/basic/shape-checks.js create mode 100644 js/src/jit-test/tests/basic/shape-snapshots.js create mode 100644 js/src/jit-test/tests/basic/shape-teleporting-invalidation.js create mode 100644 js/src/jit-test/tests/basic/shape-teleporting-transplant-1.js create mode 100644 js/src/jit-test/tests/basic/shape-teleporting-transplant-2.js create mode 100644 js/src/jit-test/tests/basic/shapelessCalleeTest.js create mode 100644 js/src/jit-test/tests/basic/shell-prefs.js create mode 100644 js/src/jit-test/tests/basic/shell-principals.js create mode 100644 js/src/jit-test/tests/basic/shell-watchdog.js create mode 100644 js/src/jit-test/tests/basic/shifted-elements1.js create mode 100644 js/src/jit-test/tests/basic/shifted-elements2.js create mode 100644 js/src/jit-test/tests/basic/shifted-elements3.js create mode 100644 js/src/jit-test/tests/basic/shifted-elements4.js create mode 100644 js/src/jit-test/tests/basic/shifted-elements5.js create mode 100644 js/src/jit-test/tests/basic/shifted-elements6.js create mode 100644 js/src/jit-test/tests/basic/shifted-elements7.js create mode 100644 js/src/jit-test/tests/basic/singleton.js create mode 100644 js/src/jit-test/tests/basic/sleep-without-timeout.js create mode 100644 js/src/jit-test/tests/basic/sparse-and-dense-elements.js create mode 100644 js/src/jit-test/tests/basic/splice-675164.js create mode 100644 js/src/jit-test/tests/basic/splice-call-plain-object-590780.js create mode 100644 js/src/jit-test/tests/basic/splice-check-steps.js create mode 100644 js/src/jit-test/tests/basic/splice-delete-non-configurable-during-shrink.js create mode 100644 js/src/jit-test/tests/basic/splice-fail-step-16.js create mode 100644 js/src/jit-test/tests/basic/splice-huge-array-finishes.js create mode 100644 js/src/jit-test/tests/basic/splice-on-arguments.js create mode 100644 js/src/jit-test/tests/basic/splice-throwing-length-getter-668024.js create mode 100644 js/src/jit-test/tests/basic/spread-array-bug842884.js create mode 100644 js/src/jit-test/tests/basic/spread-array-decompile.js create mode 100644 js/src/jit-test/tests/basic/spread-array-evaluation-order.js create mode 100644 js/src/jit-test/tests/basic/spread-array-invalid-syntax.js create mode 100644 js/src/jit-test/tests/basic/spread-array-wrap.js create mode 100644 js/src/jit-test/tests/basic/spread-array.js create mode 100644 js/src/jit-test/tests/basic/spread-call-eval.js create mode 100644 js/src/jit-test/tests/basic/spread-call-evaluation-order.js create mode 100644 js/src/jit-test/tests/basic/spread-call-funapply.js create mode 100644 js/src/jit-test/tests/basic/spread-call-funcall.js create mode 100644 js/src/jit-test/tests/basic/spread-call-invalid-syntax.js create mode 100644 js/src/jit-test/tests/basic/spread-call-length.js create mode 100644 js/src/jit-test/tests/basic/spread-call-maxarg.js create mode 100644 js/src/jit-test/tests/basic/spread-call-near-maxarg.js create mode 100644 js/src/jit-test/tests/basic/spread-call-new.js create mode 100644 js/src/jit-test/tests/basic/spread-call-not-iterable.js create mode 100644 js/src/jit-test/tests/basic/spread-call-optimized.js create mode 100644 js/src/jit-test/tests/basic/spread-call-recursion.js create mode 100644 js/src/jit-test/tests/basic/spread-call-rest-lookup.js create mode 100644 js/src/jit-test/tests/basic/spread-call-rest.js create mode 100644 js/src/jit-test/tests/basic/spread-call-setcall.js create mode 100644 js/src/jit-test/tests/basic/spread-call-this-strict.js create mode 100644 js/src/jit-test/tests/basic/spread-call-this.js create mode 100644 js/src/jit-test/tests/basic/spread-call.js create mode 100644 js/src/jit-test/tests/basic/statement-after-return.js create mode 100644 js/src/jit-test/tests/basic/str-atom-cache-extensible.js create mode 100644 js/src/jit-test/tests/basic/strict-catch-ident-syntax.js create mode 100644 js/src/jit-test/tests/basic/strict-compare-same-operands.js create mode 100644 js/src/jit-test/tests/basic/strict-eval-loop-error.js create mode 100644 js/src/jit-test/tests/basic/strictParseIntOctal.js create mode 100644 js/src/jit-test/tests/basic/string-endswith.js create mode 100644 js/src/jit-test/tests/basic/string-includes.js create mode 100644 js/src/jit-test/tests/basic/string-index.js create mode 100644 js/src/jit-test/tests/basic/string-regexp-capture-groups.js create mode 100644 js/src/jit-test/tests/basic/string-repeat.js create mode 100644 js/src/jit-test/tests/basic/string-startswith.js create mode 100644 js/src/jit-test/tests/basic/stringConvert.js create mode 100644 js/src/jit-test/tests/basic/stringSplitIntoArrayTest.js create mode 100644 js/src/jit-test/tests/basic/stringSplitTest.js create mode 100644 js/src/jit-test/tests/basic/strings.js create mode 100644 js/src/jit-test/tests/basic/substring-inline-strings.js create mode 100644 js/src/jit-test/tests/basic/symbol-in-loop.js create mode 100644 js/src/jit-test/tests/basic/syntax-error-function-body-eof.js create mode 100644 js/src/jit-test/tests/basic/syntax-error-primary.js create mode 100644 js/src/jit-test/tests/basic/syntax-error-throw.js create mode 100644 js/src/jit-test/tests/basic/syntax-error-toplevel-eof.js create mode 100644 js/src/jit-test/tests/basic/tagTempl.js create mode 100644 js/src/jit-test/tests/basic/teleporting-mutable-proto.js create mode 100644 js/src/jit-test/tests/basic/terminate.js create mode 100644 js/src/jit-test/tests/basic/test-apply-many-args.js create mode 100644 js/src/jit-test/tests/basic/test-error-accessors-with-wrappers.js create mode 100644 js/src/jit-test/tests/basic/test-jitinfo.js create mode 100644 js/src/jit-test/tests/basic/test586387.js create mode 100644 js/src/jit-test/tests/basic/testAbortedImacroDecompilation.js create mode 100644 js/src/jit-test/tests/basic/testAccessCanonicalArgInGetElem.js create mode 100644 js/src/jit-test/tests/basic/testAddAnyInconvertibleObject.js create mode 100644 js/src/jit-test/tests/basic/testAddInconvertibleObjectAny.js create mode 100644 js/src/jit-test/tests/basic/testAddInconvertibleObjectInconvertibleObject.js create mode 100644 js/src/jit-test/tests/basic/testAddNull.js create mode 100644 js/src/jit-test/tests/basic/testAddUndefined.js create mode 100644 js/src/jit-test/tests/basic/testAliasedLet.js create mode 100644 js/src/jit-test/tests/basic/testApply.js create mode 100644 js/src/jit-test/tests/basic/testApplyArrayInline.js create mode 100644 js/src/jit-test/tests/basic/testApplyAtJoinPoint.js create mode 100644 js/src/jit-test/tests/basic/testApplyCall.js create mode 100644 js/src/jit-test/tests/basic/testApplyInterpretLowered.js create mode 100644 js/src/jit-test/tests/basic/testApplyInterpretLowered2.js create mode 100644 js/src/jit-test/tests/basic/testApplySpeculationFailInCompiler.js create mode 100644 js/src/jit-test/tests/basic/testApplyUnbox.js create mode 100644 js/src/jit-test/tests/basic/testArgumentsOptimizationFailCornerCase.js create mode 100644 js/src/jit-test/tests/basic/testArgumentsPropLookup.js create mode 100644 js/src/jit-test/tests/basic/testArrayBufferSlice.js create mode 100644 js/src/jit-test/tests/basic/testArrayBufferSpeciesDelete.js create mode 100644 js/src/jit-test/tests/basic/testArrayConcat.js create mode 100644 js/src/jit-test/tests/basic/testArrayDensityChange.js create mode 100644 js/src/jit-test/tests/basic/testArrayInWithIndexedProto.js create mode 100644 js/src/jit-test/tests/basic/testArrayNaNIndex.js create mode 100644 js/src/jit-test/tests/basic/testArrayNamedProp.js create mode 100644 js/src/jit-test/tests/basic/testArrayPushPop.js create mode 100644 js/src/jit-test/tests/basic/testArraySpeciesDelete.js create mode 100644 js/src/jit-test/tests/basic/testAssignmentThatIgnoresSetterRetval.js create mode 100644 js/src/jit-test/tests/basic/testAtomize.js create mode 100644 js/src/jit-test/tests/basic/testBitOrAnyInconvertibleObject.js create mode 100644 js/src/jit-test/tests/basic/testBitOrInconvertibleObjectAny.js create mode 100644 js/src/jit-test/tests/basic/testBitOrInconvertibleObjectInconvertibleObject.js create mode 100644 js/src/jit-test/tests/basic/testBitopWithConstan.js create mode 100644 js/src/jit-test/tests/basic/testBitwise.js create mode 100644 js/src/jit-test/tests/basic/testBoolToString.js create mode 100644 js/src/jit-test/tests/basic/testBoxDoubleWithDoubleSizedInt.js create mode 100644 js/src/jit-test/tests/basic/testBranchCse.js create mode 100644 js/src/jit-test/tests/basic/testBranchingLoop.js create mode 100644 js/src/jit-test/tests/basic/testBranchingUnstableLoop.js create mode 100644 js/src/jit-test/tests/basic/testBranchingUnstableLoopCounter.js create mode 100644 js/src/jit-test/tests/basic/testBranchingUnstableObject.js create mode 100644 js/src/jit-test/tests/basic/testBug1126754.js create mode 100644 js/src/jit-test/tests/basic/testBug1235874.js create mode 100644 js/src/jit-test/tests/basic/testBug1827733.js create mode 100644 js/src/jit-test/tests/basic/testBug458838.js create mode 100644 js/src/jit-test/tests/basic/testBug463490.js create mode 100644 js/src/jit-test/tests/basic/testBug465272.js create mode 100644 js/src/jit-test/tests/basic/testBug465688.js create mode 100644 js/src/jit-test/tests/basic/testBug466262.js create mode 100644 js/src/jit-test/tests/basic/testBug501690.js create mode 100644 js/src/jit-test/tests/basic/testBug502914.js create mode 100644 js/src/jit-test/tests/basic/testBug504520.js create mode 100644 js/src/jit-test/tests/basic/testBug504520Harder.js create mode 100644 js/src/jit-test/tests/basic/testBug507425.js create mode 100644 js/src/jit-test/tests/basic/testBug520503-1.js create mode 100644 js/src/jit-test/tests/basic/testBug520503-3.js create mode 100644 js/src/jit-test/tests/basic/testBug529147.js create mode 100644 js/src/jit-test/tests/basic/testBug547791.js create mode 100644 js/src/jit-test/tests/basic/testBug550210.js create mode 100644 js/src/jit-test/tests/basic/testBug552248.js create mode 100644 js/src/jit-test/tests/basic/testBug554043.js create mode 100644 js/src/jit-test/tests/basic/testBug555484.js create mode 100644 js/src/jit-test/tests/basic/testBug558446.js create mode 100644 js/src/jit-test/tests/basic/testBug579602.js create mode 100644 js/src/jit-test/tests/basic/testBug582766.js create mode 100644 js/src/jit-test/tests/basic/testBug586866.js create mode 100644 js/src/jit-test/tests/basic/testBug593559.js create mode 100644 js/src/jit-test/tests/basic/testBug602413.js create mode 100644 js/src/jit-test/tests/basic/testBug604210.js create mode 100644 js/src/jit-test/tests/basic/testBug606138.js create mode 100644 js/src/jit-test/tests/basic/testBug607659.js create mode 100644 js/src/jit-test/tests/basic/testBug614653.js create mode 100644 js/src/jit-test/tests/basic/testBug614752.js create mode 100644 js/src/jit-test/tests/basic/testBug616454.js create mode 100644 js/src/jit-test/tests/basic/testBug621202.js create mode 100644 js/src/jit-test/tests/basic/testBug628564.js create mode 100644 js/src/jit-test/tests/basic/testBug629974.js create mode 100644 js/src/jit-test/tests/basic/testBug630064.js create mode 100644 js/src/jit-test/tests/basic/testBug634590.js create mode 100644 js/src/jit-test/tests/basic/testBug634590b.js create mode 100644 js/src/jit-test/tests/basic/testBug634590c.js create mode 100644 js/src/jit-test/tests/basic/testBug634590d.js create mode 100644 js/src/jit-test/tests/basic/testBug634590ma.js create mode 100644 js/src/jit-test/tests/basic/testBug637014.js create mode 100644 js/src/jit-test/tests/basic/testBug648438.js create mode 100644 js/src/jit-test/tests/basic/testBug653396.js create mode 100644 js/src/jit-test/tests/basic/testBug659577-1.js create mode 100644 js/src/jit-test/tests/basic/testBug659577-2.js create mode 100644 js/src/jit-test/tests/basic/testBug663789-1.js create mode 100644 js/src/jit-test/tests/basic/testBug663789-2.js create mode 100644 js/src/jit-test/tests/basic/testBug666003.js create mode 100644 js/src/jit-test/tests/basic/testBug668479.js create mode 100644 js/src/jit-test/tests/basic/testBug672436.js create mode 100644 js/src/jit-test/tests/basic/testBug673066.js create mode 100644 js/src/jit-test/tests/basic/testBug673068.js create mode 100644 js/src/jit-test/tests/basic/testBug676486.js create mode 100644 js/src/jit-test/tests/basic/testBug686274.js create mode 100644 js/src/jit-test/tests/basic/testBug690959.js create mode 100644 js/src/jit-test/tests/basic/testBug692274-2.js create mode 100644 js/src/jit-test/tests/basic/testBug692274-3.js create mode 100644 js/src/jit-test/tests/basic/testBug701227.js create mode 100644 js/src/jit-test/tests/basic/testBug701239.js create mode 100644 js/src/jit-test/tests/basic/testBug701244.js create mode 100644 js/src/jit-test/tests/basic/testBug703857.js create mode 100644 js/src/jit-test/tests/basic/testBug705423.js create mode 100644 js/src/jit-test/tests/basic/testBug714650.js create mode 100644 js/src/jit-test/tests/basic/testBug720695.js create mode 100644 js/src/jit-test/tests/basic/testBug723445.js create mode 100644 js/src/jit-test/tests/basic/testBug726380.js create mode 100644 js/src/jit-test/tests/basic/testBug731181.js create mode 100644 js/src/jit-test/tests/basic/testBug736012.js create mode 100644 js/src/jit-test/tests/basic/testBug736807.js create mode 100644 js/src/jit-test/tests/basic/testBug737388.js create mode 100644 js/src/jit-test/tests/basic/testBug737575.js create mode 100644 js/src/jit-test/tests/basic/testBug740442.js create mode 100644 js/src/jit-test/tests/basic/testBug740445.js create mode 100644 js/src/jit-test/tests/basic/testBug741497.js create mode 100644 js/src/jit-test/tests/basic/testBug743408.js create mode 100644 js/src/jit-test/tests/basic/testBug747554.js create mode 100644 js/src/jit-test/tests/basic/testBug752205.js create mode 100644 js/src/jit-test/tests/basic/testBug752379.js create mode 100644 js/src/jit-test/tests/basic/testBug753158.js create mode 100644 js/src/jit-test/tests/basic/testBug755916.js create mode 100644 js/src/jit-test/tests/basic/testBug756918.js create mode 100644 js/src/jit-test/tests/basic/testBug756919.js create mode 100644 js/src/jit-test/tests/basic/testBug761863.js create mode 100644 js/src/jit-test/tests/basic/testBug7618864.js create mode 100644 js/src/jit-test/tests/basic/testBug762105.js create mode 100644 js/src/jit-test/tests/basic/testBug762432.js create mode 100644 js/src/jit-test/tests/basic/testBug762450.js create mode 100644 js/src/jit-test/tests/basic/testBug762473.js create mode 100644 js/src/jit-test/tests/basic/testBug763384.js create mode 100644 js/src/jit-test/tests/basic/testBug763950.js create mode 100644 js/src/jit-test/tests/basic/testBug766064.js create mode 100644 js/src/jit-test/tests/basic/testBug769987.js create mode 100644 js/src/jit-test/tests/basic/testBug770407.js create mode 100644 js/src/jit-test/tests/basic/testBug772328.js create mode 100644 js/src/jit-test/tests/basic/testBug775801.js create mode 100644 js/src/jit-test/tests/basic/testBug775807.js create mode 100644 js/src/jit-test/tests/basic/testBug776191.js create mode 100644 js/src/jit-test/tests/basic/testBug778603.js create mode 100644 js/src/jit-test/tests/basic/testBug780712.js create mode 100644 js/src/jit-test/tests/basic/testBug783441.js create mode 100644 js/src/jit-test/tests/basic/testBug783540.js create mode 100644 js/src/jit-test/tests/basic/testBug783543.js create mode 100644 js/src/jit-test/tests/basic/testBug784639.js create mode 100644 js/src/jit-test/tests/basic/testBug840012.js create mode 100644 js/src/jit-test/tests/basic/testBug878429.js create mode 100644 js/src/jit-test/tests/basic/testBug895774.js create mode 100644 js/src/jit-test/tests/basic/testBug961969.js create mode 100644 js/src/jit-test/tests/basic/testCallApply.js create mode 100644 js/src/jit-test/tests/basic/testCallApplySpeculationFailed.js create mode 100644 js/src/jit-test/tests/basic/testCallElem.js create mode 100644 js/src/jit-test/tests/basic/testCallFunctionPrototypeInALoop.js create mode 100644 js/src/jit-test/tests/basic/testCallPick.js create mode 100644 js/src/jit-test/tests/basic/testCallProtoMethod.js create mode 100644 js/src/jit-test/tests/basic/testCaseAbort.js create mode 100644 js/src/jit-test/tests/basic/testCaseTypeMismatchBadness.js create mode 100644 js/src/jit-test/tests/basic/testChangingObjectWithLength.js create mode 100644 js/src/jit-test/tests/basic/testChangingTypeDuringRecording.js create mode 100644 js/src/jit-test/tests/basic/testClosedVarInExtensibleScope.js create mode 100644 js/src/jit-test/tests/basic/testClosingRecursion.js create mode 100644 js/src/jit-test/tests/basic/testClosures.js create mode 100644 js/src/jit-test/tests/basic/testComparisons.js create mode 100644 js/src/jit-test/tests/basic/testConcatNWithSideEffects.js create mode 100644 js/src/jit-test/tests/basic/testCondSwitch1.js create mode 100644 js/src/jit-test/tests/basic/testCondSwitch2.js create mode 100644 js/src/jit-test/tests/basic/testCondSwitch3.js create mode 100644 js/src/jit-test/tests/basic/testConstDestructringArguments.js create mode 100644 js/src/jit-test/tests/basic/testConstIf.js create mode 100644 js/src/jit-test/tests/basic/testConstSwitch.js create mode 100644 js/src/jit-test/tests/basic/testConstSwitch2.js create mode 100644 js/src/jit-test/tests/basic/testConstantBooleanExpr.js create mode 100644 js/src/jit-test/tests/basic/testConstructorArgs-1.js create mode 100644 js/src/jit-test/tests/basic/testConstructorArgs-2.js create mode 100644 js/src/jit-test/tests/basic/testConstructorArgs-3.js create mode 100644 js/src/jit-test/tests/basic/testConstructorBail.js create mode 100644 js/src/jit-test/tests/basic/testContinue.js create mode 100644 js/src/jit-test/tests/basic/testContinueWithLabel.js create mode 100644 js/src/jit-test/tests/basic/testContinueWithLabel3.js create mode 100644 js/src/jit-test/tests/basic/testContinueWithLabel4.js create mode 100644 js/src/jit-test/tests/basic/testConvertibleObjectEqUndefined.js create mode 100644 js/src/jit-test/tests/basic/testCrossCompartmentTransparency.js create mode 100644 js/src/jit-test/tests/basic/testCrossCompartmentTransparency2.js create mode 100644 js/src/jit-test/tests/basic/testDateNow.js create mode 100644 js/src/jit-test/tests/basic/testDecElem1.js create mode 100644 js/src/jit-test/tests/basic/testDecElem2.js create mode 100644 js/src/jit-test/tests/basic/testDecayingInnerLoop.js create mode 100644 js/src/jit-test/tests/basic/testDeepBail1.js create mode 100644 js/src/jit-test/tests/basic/testDeepBailFromHasInstance.js create mode 100644 js/src/jit-test/tests/basic/testDeepBailInMoreIter.js create mode 100644 js/src/jit-test/tests/basic/testDeepBailWhileRecording.js create mode 100644 js/src/jit-test/tests/basic/testDeepPropertyShadowing.js create mode 100644 js/src/jit-test/tests/basic/testDefinePropertyAcrossCompartment.js create mode 100644 js/src/jit-test/tests/basic/testDenseArrayProp.js create mode 100644 js/src/jit-test/tests/basic/testDenseToSlowArray.js create mode 100644 js/src/jit-test/tests/basic/testDestructuring.js create mode 100644 js/src/jit-test/tests/basic/testDestructuringFormalError.js create mode 100644 js/src/jit-test/tests/basic/testDestructuringVarInsideWith.js create mode 100644 js/src/jit-test/tests/basic/testDifferingArgc.js create mode 100644 js/src/jit-test/tests/basic/testDivModWithIntMin.js create mode 100644 js/src/jit-test/tests/basic/testDivision.js create mode 100644 js/src/jit-test/tests/basic/testDivisionFloat.js create mode 100644 js/src/jit-test/tests/basic/testDivisionWithNegative1.js create mode 100644 js/src/jit-test/tests/basic/testDontClobberScannerError.js create mode 100644 js/src/jit-test/tests/basic/testDoubleComparison.js create mode 100644 js/src/jit-test/tests/basic/testDoubleToStr.js create mode 100644 js/src/jit-test/tests/basic/testDoubleZeroInSwitch1.js create mode 100644 js/src/jit-test/tests/basic/testDoubleZeroInSwitch2.js create mode 100644 js/src/jit-test/tests/basic/testDynamicLookup.js create mode 100644 js/src/jit-test/tests/basic/testDynamicUsage.js create mode 100644 js/src/jit-test/tests/basic/testElemDec1.js create mode 100644 js/src/jit-test/tests/basic/testElemDec2.js create mode 100644 js/src/jit-test/tests/basic/testElemInc1.js create mode 100644 js/src/jit-test/tests/basic/testElemInc2.js create mode 100644 js/src/jit-test/tests/basic/testEliminatedGuardWithinAnchor.js create mode 100644 js/src/jit-test/tests/basic/testEqFalseEmptyString.js create mode 100644 js/src/jit-test/tests/basic/testErrorInFinalizerCalledWhileUnwinding.js create mode 100644 js/src/jit-test/tests/basic/testEvalInFrameEdgeCase.js create mode 100644 js/src/jit-test/tests/basic/testEvalInFunctionCallee.js create mode 100644 js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt-2.js create mode 100644 js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt-3.js create mode 100644 js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt-4.js create mode 100644 js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt.js create mode 100644 js/src/jit-test/tests/basic/testFakeDOMWeakmapKey.js create mode 100644 js/src/jit-test/tests/basic/testFloatArrayIndex.js create mode 100644 js/src/jit-test/tests/basic/testFoldPropertyAccess.js create mode 100644 js/src/jit-test/tests/basic/testForInLoopChangeIteratorType.js create mode 100644 js/src/jit-test/tests/basic/testFunApplyMadness1.js create mode 100644 js/src/jit-test/tests/basic/testFunApplyMadness2.js create mode 100644 js/src/jit-test/tests/basic/testFunApplyMadness400.js create mode 100644 js/src/jit-test/tests/basic/testFunApplyMisspeculation.js create mode 100644 js/src/jit-test/tests/basic/testFunApplyOverflow.js create mode 100644 js/src/jit-test/tests/basic/testFunctionIdentityChange.js create mode 100644 js/src/jit-test/tests/basic/testFunctionStatementAliasLocals.js create mode 100644 js/src/jit-test/tests/basic/testFunctionStatementNamedArguments.js create mode 100644 js/src/jit-test/tests/basic/testGCWhileRecording.js create mode 100644 js/src/jit-test/tests/basic/testGeneratorDeepBail.js create mode 100644 js/src/jit-test/tests/basic/testGeneratorDieButScopeAlive.js create mode 100644 js/src/jit-test/tests/basic/testGetCallObj.js create mode 100644 js/src/jit-test/tests/basic/testGetThis.js create mode 100644 js/src/jit-test/tests/basic/testGlobalAsProto.js create mode 100644 js/src/jit-test/tests/basic/testGlobalOptimize-2.js create mode 100644 js/src/jit-test/tests/basic/testGlobalOptimize-3.js create mode 100644 js/src/jit-test/tests/basic/testGlobalOptimize-4.js create mode 100644 js/src/jit-test/tests/basic/testGlobalOptimize-5.js create mode 100644 js/src/jit-test/tests/basic/testGlobalOptimize-6.js create mode 100644 js/src/jit-test/tests/basic/testGlobalProtoAccess.js create mode 100644 js/src/jit-test/tests/basic/testGlobalShapeChangeAfterDeepBail.js create mode 100644 js/src/jit-test/tests/basic/testGroupAssignment.js create mode 100644 js/src/jit-test/tests/basic/testGrowDenseArray.js create mode 100644 js/src/jit-test/tests/basic/testGuardCalleeSneakAttack.js create mode 100644 js/src/jit-test/tests/basic/testGuardCalleeSneakAttack2.js create mode 100644 js/src/jit-test/tests/basic/testHOTLOOPSize.js create mode 100644 js/src/jit-test/tests/basic/testHeavy.js create mode 100644 js/src/jit-test/tests/basic/testHeavy2.js create mode 100644 js/src/jit-test/tests/basic/testHoleInDenseArray.js create mode 100644 js/src/jit-test/tests/basic/testHolePushing.js create mode 100644 js/src/jit-test/tests/basic/testHolesAndIndexPropertiesOnThePrototype.js create mode 100644 js/src/jit-test/tests/basic/testINITELEM.js create mode 100644 js/src/jit-test/tests/basic/testImplicitThisMiss.js create mode 100644 js/src/jit-test/tests/basic/testIn.js create mode 100644 js/src/jit-test/tests/basic/testIncDec.js create mode 100644 js/src/jit-test/tests/basic/testIncDecReadOnly.js create mode 100644 js/src/jit-test/tests/basic/testIncElem1.js create mode 100644 js/src/jit-test/tests/basic/testIncElem2.js create mode 100644 js/src/jit-test/tests/basic/testIncElem3.js create mode 100644 js/src/jit-test/tests/basic/testIncElem4.js create mode 100644 js/src/jit-test/tests/basic/testInitPropOverMethod.js create mode 100644 js/src/jit-test/tests/basic/testInitPropWithIntName.js create mode 100644 js/src/jit-test/tests/basic/testInitProtoPrimitive.js create mode 100644 js/src/jit-test/tests/basic/testInitSingletons.js create mode 100644 js/src/jit-test/tests/basic/testInitSlowify.js create mode 100644 js/src/jit-test/tests/basic/testInitelemCond.js create mode 100644 js/src/jit-test/tests/basic/testInitelemWithFloatIndex.js create mode 100644 js/src/jit-test/tests/basic/testInitelemWithSetter.js create mode 100644 js/src/jit-test/tests/basic/testInnerMissingArgs.js create mode 100644 js/src/jit-test/tests/basic/testInnerSwitchBreak.js create mode 100644 js/src/jit-test/tests/basic/testInnerTreeMutatingUpvars.js create mode 100644 js/src/jit-test/tests/basic/testInt32ToId.js create mode 100644 js/src/jit-test/tests/basic/testIntFloor.js create mode 100644 js/src/jit-test/tests/basic/testIntOverflow.js create mode 100644 js/src/jit-test/tests/basic/testIntUnderflow.js create mode 100644 js/src/jit-test/tests/basic/testInterpreterReentry.js create mode 100644 js/src/jit-test/tests/basic/testInterpreterReentry2.js create mode 100644 js/src/jit-test/tests/basic/testInterpreterReentry3.js create mode 100644 js/src/jit-test/tests/basic/testInterpreterReentry4.js create mode 100644 js/src/jit-test/tests/basic/testInterpreterReentry5.js create mode 100644 js/src/jit-test/tests/basic/testInterpreterReentry6.js create mode 100644 js/src/jit-test/tests/basic/testInterpreterReentry7.js create mode 100644 js/src/jit-test/tests/basic/testInvalidCharCodeAt.js create mode 100644 js/src/jit-test/tests/basic/testInvertNullAfterNegateNull.js create mode 100644 js/src/jit-test/tests/basic/testIteratorReification.js create mode 100644 js/src/jit-test/tests/basic/testLambdaCtor.js create mode 100644 js/src/jit-test/tests/basic/testLambdaInitedVar.js create mode 100644 js/src/jit-test/tests/basic/testLengthInString.js create mode 100644 js/src/jit-test/tests/basic/testLengthOnNonNativeProto.js create mode 100644 js/src/jit-test/tests/basic/testLet.js create mode 100644 js/src/jit-test/tests/basic/testLetOverridingArgs.js create mode 100644 js/src/jit-test/tests/basic/testLirBufOOM.js create mode 100644 js/src/jit-test/tests/basic/testLocaleCompare.js create mode 100644 js/src/jit-test/tests/basic/testLogicalNotNaN.js create mode 100644 js/src/jit-test/tests/basic/testLongNumToString.js create mode 100644 js/src/jit-test/tests/basic/testLoopWithUndefined1.js create mode 100644 js/src/jit-test/tests/basic/testLoopWithUndefined2.js create mode 100644 js/src/jit-test/tests/basic/testLoopingAccumulator.js create mode 100644 js/src/jit-test/tests/basic/testManyVars.js create mode 100644 js/src/jit-test/tests/basic/testMatchAsCondition.js create mode 100644 js/src/jit-test/tests/basic/testMatchStringObject.js create mode 100644 js/src/jit-test/tests/basic/testMathClz32.js create mode 100644 js/src/jit-test/tests/basic/testMathMinMax.js create mode 100644 js/src/jit-test/tests/basic/testMethodInc.js create mode 100644 js/src/jit-test/tests/basic/testMethodInit.js create mode 100644 js/src/jit-test/tests/basic/testMethodInitSafety.js create mode 100644 js/src/jit-test/tests/basic/testMethodSet.js create mode 100644 js/src/jit-test/tests/basic/testMethodWriteBarrier.js create mode 100644 js/src/jit-test/tests/basic/testMethodWriteBarrier2.js create mode 100644 js/src/jit-test/tests/basic/testMethodWriteBarrier3.js create mode 100644 js/src/jit-test/tests/basic/testMethodWriteBarrier4.js create mode 100644 js/src/jit-test/tests/basic/testMissingMethod.js create mode 100644 js/src/jit-test/tests/basic/testMissingMethod2.js create mode 100644 js/src/jit-test/tests/basic/testMissingProperties.js create mode 100644 js/src/jit-test/tests/basic/testModuloWithNegative1.js create mode 100644 js/src/jit-test/tests/basic/testModuloWithNegative2.js create mode 100644 js/src/jit-test/tests/basic/testMoreArgcThanNargs.js create mode 100644 js/src/jit-test/tests/basic/testMoreClosures.js create mode 100644 js/src/jit-test/tests/basic/testMulOverflow.js create mode 100644 js/src/jit-test/tests/basic/testMultipleArgumentsObjects.js create mode 100644 js/src/jit-test/tests/basic/testMultipleFunctionRedeclarations.js create mode 100644 js/src/jit-test/tests/basic/testMultiplePendingGlobalWrites.js create mode 100644 js/src/jit-test/tests/basic/testNEWINIT.js create mode 100644 js/src/jit-test/tests/basic/testNEWINIT_DOUBLE.js create mode 100644 js/src/jit-test/tests/basic/testNativeArgsRooting.js create mode 100644 js/src/jit-test/tests/basic/testNativeLog.js create mode 100644 js/src/jit-test/tests/basic/testNativeMax.js create mode 100644 js/src/jit-test/tests/basic/testNativeSetter.js create mode 100644 js/src/jit-test/tests/basic/testNegZero1.js create mode 100644 js/src/jit-test/tests/basic/testNegativeArrayLength.js create mode 100644 js/src/jit-test/tests/basic/testNegativeGETELEMIndex.js create mode 100644 js/src/jit-test/tests/basic/testNestedClosures.js create mode 100644 js/src/jit-test/tests/basic/testNestedDeepBail.js create mode 100644 js/src/jit-test/tests/basic/testNestedEscapingLambdas.js create mode 100644 js/src/jit-test/tests/basic/testNestedExitStackOuter.js create mode 100644 js/src/jit-test/tests/basic/testNestedForIn.js create mode 100644 js/src/jit-test/tests/basic/testNeutering.js create mode 100644 js/src/jit-test/tests/basic/testNewArrayCount.js create mode 100644 js/src/jit-test/tests/basic/testNewArrayCount2.js create mode 100644 js/src/jit-test/tests/basic/testNewObject.js create mode 100644 js/src/jit-test/tests/basic/testNewString.js create mode 100644 js/src/jit-test/tests/basic/testNewWithClone.js create mode 100644 js/src/jit-test/tests/basic/testNewWithNonNativeProto.js create mode 100644 js/src/jit-test/tests/basic/testNot.js create mode 100644 js/src/jit-test/tests/basic/testNullCallee.js create mode 100644 js/src/jit-test/tests/basic/testNullIncrement.js create mode 100644 js/src/jit-test/tests/basic/testNullRelCmp.js create mode 100644 js/src/jit-test/tests/basic/testNullToString.js create mode 100644 js/src/jit-test/tests/basic/testNumToString.js create mode 100644 js/src/jit-test/tests/basic/testNumberToString.js create mode 100644 js/src/jit-test/tests/basic/testOOMInAutoEnterCompartment.js create mode 100644 js/src/jit-test/tests/basic/testObjectConstructorReturningObject.js create mode 100644 js/src/jit-test/tests/basic/testObjectLength.js create mode 100644 js/src/jit-test/tests/basic/testObjectOrderedCmp.js create mode 100644 js/src/jit-test/tests/basic/testObjectOrderedCmp2.js create mode 100644 js/src/jit-test/tests/basic/testObjectToNumber.js create mode 100644 js/src/jit-test/tests/basic/testObjectToString.js create mode 100644 js/src/jit-test/tests/basic/testObjectVsPrototype.js create mode 100644 js/src/jit-test/tests/basic/testOverOOMInFixupArity.js create mode 100644 js/src/jit-test/tests/basic/testOverRecursed1.js create mode 100644 js/src/jit-test/tests/basic/testOverRecursed2.js create mode 100644 js/src/jit-test/tests/basic/testOverRecursed3.js create mode 100644 js/src/jit-test/tests/basic/testOverRecursed4.js create mode 100644 js/src/jit-test/tests/basic/testOverRecursed6.js create mode 100644 js/src/jit-test/tests/basic/testOverwrittenArgumentsWithUndefined.js create mode 100644 js/src/jit-test/tests/basic/testOwnPropertyWithInOperator.js create mode 100644 js/src/jit-test/tests/basic/testParseInt.js create mode 100644 js/src/jit-test/tests/basic/testPartialFlatClosure.js create mode 100644 js/src/jit-test/tests/basic/testPaths.js create mode 100644 js/src/jit-test/tests/basic/testPrimitiveConstructorPrototype.js create mode 100644 js/src/jit-test/tests/basic/testPropagatedFunArgs.js create mode 100644 js/src/jit-test/tests/basic/testProxyDefinePropertyWithMissingSetter.js create mode 100644 js/src/jit-test/tests/basic/testProxyPrototypes.js create mode 100644 js/src/jit-test/tests/basic/testPutOnEmptyArgsObject.js create mode 100644 js/src/jit-test/tests/basic/testReallyDeepNestedExit.js create mode 100644 js/src/jit-test/tests/basic/testRebranding.js create mode 100644 js/src/jit-test/tests/basic/testRebranding2.js create mode 100644 js/src/jit-test/tests/basic/testRegExpTest.js create mode 100644 js/src/jit-test/tests/basic/testRegexpGet.js create mode 100644 js/src/jit-test/tests/basic/testReplace2.js create mode 100644 js/src/jit-test/tests/basic/testReplaceMap.js create mode 100644 js/src/jit-test/tests/basic/testReplaceWithLambda.js create mode 100644 js/src/jit-test/tests/basic/testResumeOp.js create mode 100644 js/src/jit-test/tests/basic/testReverseArgTypes.js create mode 100644 js/src/jit-test/tests/basic/testRopeMarking.js create mode 100644 js/src/jit-test/tests/basic/testScriptGetter_JSOP_CALLPROP-2.js create mode 100644 js/src/jit-test/tests/basic/testScriptGetter_JSOP_CALLPROP.js create mode 100644 js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETARGPROP.js create mode 100644 js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETLOCALPROP.js create mode 100644 js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETPROP.js create mode 100644 js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETTHISPROP.js create mode 100644 js/src/jit-test/tests/basic/testSetGetterOnlyProperty.js create mode 100644 js/src/jit-test/tests/basic/testSetPropNeitherMissNorHit.js create mode 100644 js/src/jit-test/tests/basic/testSetPropertyFail.js create mode 100644 js/src/jit-test/tests/basic/testSetProtoRegeneratesObjectShape.js create mode 100644 js/src/jit-test/tests/basic/testSetelemWithFloatIndex.js create mode 100644 js/src/jit-test/tests/basic/testShiftLeft.js create mode 100644 js/src/jit-test/tests/basic/testShiftRightArithmetic.js create mode 100644 js/src/jit-test/tests/basic/testShiftRightLogical.js create mode 100644 js/src/jit-test/tests/basic/testSlowArrayLength.js create mode 100644 js/src/jit-test/tests/basic/testSlowArrayPop.js create mode 100644 js/src/jit-test/tests/basic/testSlowArrayPopMultiFrame.js create mode 100644 js/src/jit-test/tests/basic/testSlowArrayPopNestedTrees.js create mode 100644 js/src/jit-test/tests/basic/testSlowNativeBail.js create mode 100644 js/src/jit-test/tests/basic/testSlowNativeCtor.js create mode 100644 js/src/jit-test/tests/basic/testSlowNativeWithNullThis.js create mode 100644 js/src/jit-test/tests/basic/testStaticEvalScope.js create mode 100644 js/src/jit-test/tests/basic/testStaticsInRegExp.js create mode 100644 js/src/jit-test/tests/basic/testStrict.js create mode 100644 js/src/jit-test/tests/basic/testString.js create mode 100644 js/src/jit-test/tests/basic/testStringBufferMallocAccounting.js create mode 100644 js/src/jit-test/tests/basic/testStringConstructorWithExtraArg.js create mode 100644 js/src/jit-test/tests/basic/testStringIncrement.js create mode 100644 js/src/jit-test/tests/basic/testStringLengthNoTinyId.js create mode 100644 js/src/jit-test/tests/basic/testStringObjectLength.js create mode 100644 js/src/jit-test/tests/basic/testStringToInt32.js create mode 100644 js/src/jit-test/tests/basic/testStringToNumber.js create mode 100644 js/src/jit-test/tests/basic/testStringify.js create mode 100644 js/src/jit-test/tests/basic/testSubstring.js create mode 100644 js/src/jit-test/tests/basic/testSwitch.js create mode 100644 js/src/jit-test/tests/basic/testSwitchString.js create mode 100644 js/src/jit-test/tests/basic/testSwitchUndefined.js create mode 100644 js/src/jit-test/tests/basic/testTableSwitch1.js create mode 100644 js/src/jit-test/tests/basic/testTableSwitch2.js create mode 100644 js/src/jit-test/tests/basic/testThinLoopDemote.js create mode 100644 js/src/jit-test/tests/basic/testThrowWhileWrappingException.js create mode 100644 js/src/jit-test/tests/basic/testThrowingObjectEqUndefined.js create mode 100644 js/src/jit-test/tests/basic/testToLocaleString.js create mode 100644 js/src/jit-test/tests/basic/testToStringBeforeValueOf.js create mode 100644 js/src/jit-test/tests/basic/testToUpperToLower.js create mode 100644 js/src/jit-test/tests/basic/testTruncatedMod.js create mode 100644 js/src/jit-test/tests/basic/testTypeUnstableForIn.js create mode 100644 js/src/jit-test/tests/basic/testTypedArrayByteRegs.js create mode 100644 js/src/jit-test/tests/basic/testTypedArrayClamping.js create mode 100644 js/src/jit-test/tests/basic/testTypedArrayInit.js create mode 100644 js/src/jit-test/tests/basic/testTypedArrayMaybeUndefined.js create mode 100644 js/src/jit-test/tests/basic/testTypedArrayOutOfBounds.js create mode 100644 js/src/jit-test/tests/basic/testTypedArrayPunning.js create mode 100644 js/src/jit-test/tests/basic/testTypedArraySetConversion.js create mode 100644 js/src/jit-test/tests/basic/testTypedArrayUint32.js create mode 100644 js/src/jit-test/tests/basic/testTypedArrayUndefinedAndHoles.js create mode 100644 js/src/jit-test/tests/basic/testTypedArrays.js create mode 100644 js/src/jit-test/tests/basic/testTypeofHole.js create mode 100644 js/src/jit-test/tests/basic/testUnaryImacros.js create mode 100644 js/src/jit-test/tests/basic/testUndefinedBooleanCmp.js create mode 100644 js/src/jit-test/tests/basic/testUndefinedCmp.js create mode 100644 js/src/jit-test/tests/basic/testUndefinedIncrement.js create mode 100644 js/src/jit-test/tests/basic/testUndefinedPropertyAccess.js create mode 100644 js/src/jit-test/tests/basic/testUndemotableBinaryOp.js create mode 100644 js/src/jit-test/tests/basic/testWeirdDateParse.js create mode 100644 js/src/jit-test/tests/basic/testWeirdGetterInvocation.js create mode 100644 js/src/jit-test/tests/basic/testWeirdThingsInFunctionConstructor.js create mode 100644 js/src/jit-test/tests/basic/testWhileObjectOrNull.js create mode 100644 js/src/jit-test/tests/basic/testWhileWithContinue.js create mode 100644 js/src/jit-test/tests/basic/testWith.js create mode 100644 js/src/jit-test/tests/basic/testWithAndShadowing.js create mode 100644 js/src/jit-test/tests/basic/test_JSOP_ARGCNT.js create mode 100644 js/src/jit-test/tests/basic/test_JSOP_ARGSUB.js create mode 100644 js/src/jit-test/tests/basic/testif.js create mode 100644 js/src/jit-test/tests/basic/testincops.js create mode 100644 js/src/jit-test/tests/basic/this-binding-with-eval.js create mode 100644 js/src/jit-test/tests/basic/throw-apply-too-many-args.js create mode 100644 js/src/jit-test/tests/basic/throw-exception-stack-location.js create mode 100644 js/src/jit-test/tests/basic/throw-exception-stack.js create mode 100644 js/src/jit-test/tests/basic/timeout-check.js create mode 100644 js/src/jit-test/tests/basic/track-allocation-sites.js create mode 100644 js/src/jit-test/tests/basic/transplant-dom-slot2.js create mode 100644 js/src/jit-test/tests/basic/trees.js create mode 100644 js/src/jit-test/tests/basic/truncateDouble.js create mode 100644 js/src/jit-test/tests/basic/truthies.js create mode 100644 js/src/jit-test/tests/basic/typeMonitorCall.js create mode 100644 js/src/jit-test/tests/basic/typeMonitorSingleton.js create mode 100644 js/src/jit-test/tests/basic/typed-array-copyWithin.js create mode 100644 js/src/jit-test/tests/basic/typed-array-getprop-out-of-range.js create mode 100644 js/src/jit-test/tests/basic/typed-array-index-out-of-range.js create mode 100644 js/src/jit-test/tests/basic/typed-array-offsets.js create mode 100644 js/src/jit-test/tests/basic/typed-array-sealed-frozen.js create mode 100644 js/src/jit-test/tests/basic/typedarray-selfhosted-cross-compartment.js create mode 100644 js/src/jit-test/tests/basic/typeof-array.js create mode 100644 js/src/jit-test/tests/basic/typeofTest.js create mode 100644 js/src/jit-test/tests/basic/unboxint.js create mode 100644 js/src/jit-test/tests/basic/valuetosource.js create mode 100644 js/src/jit-test/tests/basic/weird-scopechains.js create mode 100644 js/src/jit-test/tests/basic/withSourceHook.js create mode 100644 js/src/jit-test/tests/basic/wrapping-dead-wrapper.js create mode 100644 js/src/jit-test/tests/basic/write-frozen-dense-strict-inlinecache.js create mode 100644 js/src/jit-test/tests/basic/write-frozen-dense-strict.js create mode 100644 js/src/jit-test/tests/basic/write-frozen-dense.js create mode 100644 js/src/jit-test/tests/basic/write-frozen-property-strict.js create mode 100644 js/src/jit-test/tests/basic/write-frozen-property.js create mode 100644 js/src/jit-test/tests/basic/xml-in-strict.js create mode 100644 js/src/jit-test/tests/basic/xprop.js create mode 100644 js/src/jit-test/tests/bigint/asIntN.js create mode 100644 js/src/jit-test/tests/bigint/asIntN32.js create mode 100644 js/src/jit-test/tests/bigint/asIntN64.js create mode 100644 js/src/jit-test/tests/bigint/asUintN.js create mode 100644 js/src/jit-test/tests/bigint/asUintN32.js create mode 100644 js/src/jit-test/tests/bigint/asUintN64.js create mode 100644 js/src/jit-test/tests/bigint/bigint-add.js create mode 100644 js/src/jit-test/tests/bigint/bigint-and.js create mode 100644 js/src/jit-test/tests/bigint/bigint-cmp-equality.js create mode 100644 js/src/jit-test/tests/bigint/bigint-cmp-relational.js create mode 100644 js/src/jit-test/tests/bigint/bigint-dec.js create mode 100644 js/src/jit-test/tests/bigint/bigint-div-bailout.js create mode 100644 js/src/jit-test/tests/bigint/bigint-div-by-zero.js create mode 100644 js/src/jit-test/tests/bigint/bigint-div.js create mode 100644 js/src/jit-test/tests/bigint/bigint-inc.js create mode 100644 js/src/jit-test/tests/bigint/bigint-lsh.js create mode 100644 js/src/jit-test/tests/bigint/bigint-mod-bailout.js create mode 100644 js/src/jit-test/tests/bigint/bigint-mod-by-zero.js create mode 100644 js/src/jit-test/tests/bigint/bigint-mod.js create mode 100644 js/src/jit-test/tests/bigint/bigint-mul.js create mode 100644 js/src/jit-test/tests/bigint/bigint-neg.js create mode 100644 js/src/jit-test/tests/bigint/bigint-not.js create mode 100644 js/src/jit-test/tests/bigint/bigint-or.js create mode 100644 js/src/jit-test/tests/bigint/bigint-pow-bailout.js create mode 100644 js/src/jit-test/tests/bigint/bigint-pow-negative-exponent.js create mode 100644 js/src/jit-test/tests/bigint/bigint-pow.js create mode 100644 js/src/jit-test/tests/bigint/bigint-rsh.js create mode 100644 js/src/jit-test/tests/bigint/bigint-sub.js create mode 100644 js/src/jit-test/tests/bigint/bigint-xor.js create mode 100644 js/src/jit-test/tests/bigint/bug1531269.js create mode 100644 js/src/jit-test/tests/bigint/bug1551128.js create mode 100644 js/src/jit-test/tests/bigint/bug1580020.js create mode 100644 js/src/jit-test/tests/bigint/bug1679003.js create mode 100644 js/src/jit-test/tests/bigint/bug1784435.js create mode 100644 js/src/jit-test/tests/bigint/bug1849099.js create mode 100644 js/src/jit-test/tests/bug1213574.js create mode 100644 js/src/jit-test/tests/bug1323854-2.js create mode 100644 js/src/jit-test/tests/bug1366925.js create mode 100644 js/src/jit-test/tests/bug1375074.js create mode 100644 js/src/jit-test/tests/bug1490638.js create mode 100644 js/src/jit-test/tests/bug1580246.js create mode 100644 js/src/jit-test/tests/bug1636306.js create mode 100644 js/src/jit-test/tests/bug1681258.js create mode 100644 js/src/jit-test/tests/bug1704480.js create mode 100644 js/src/jit-test/tests/bug1742592.js create mode 100644 js/src/jit-test/tests/bug1775005.js create mode 100644 js/src/jit-test/tests/bug1782468-ptrdiff-veclen.js create mode 100644 js/src/jit-test/tests/bug1782558-veclen.js create mode 100644 js/src/jit-test/tests/bug1782562-toSource-veclen.js create mode 100644 js/src/jit-test/tests/bug1787730.js create mode 100644 js/src/jit-test/tests/bug1852218.js create mode 100644 js/src/jit-test/tests/bug765479.js create mode 100644 js/src/jit-test/tests/bug793385.js create mode 100644 js/src/jit-test/tests/bug825379.js create mode 100644 js/src/jit-test/tests/bug828119.js create mode 100644 js/src/jit-test/tests/bug830943.js create mode 100644 js/src/jit-test/tests/bug847682.js create mode 100644 js/src/jit-test/tests/bug953337.js create mode 100644 js/src/jit-test/tests/cacheir/1877684.js create mode 100644 js/src/jit-test/tests/cacheir/add-dense-element-non-extensible.js create mode 100644 js/src/jit-test/tests/cacheir/add-dense-element-non-writable-length.js create mode 100644 js/src/jit-test/tests/cacheir/add-dense-element.js create mode 100644 js/src/jit-test/tests/cacheir/add-function-prototype.js create mode 100644 js/src/jit-test/tests/cacheir/alloc-dense-elements.js create mode 100644 js/src/jit-test/tests/cacheir/apply-minmax-1.js create mode 100644 js/src/jit-test/tests/cacheir/apply-minmax-2.js create mode 100644 js/src/jit-test/tests/cacheir/apply-minmax-3.js create mode 100644 js/src/jit-test/tests/cacheir/apply-minmax-4.js create mode 100644 js/src/jit-test/tests/cacheir/arguments-iterator-mapped.js create mode 100644 js/src/jit-test/tests/cacheir/arguments-iterator-unmapped.js create mode 100644 js/src/jit-test/tests/cacheir/array-slice.js create mode 100644 js/src/jit-test/tests/cacheir/atomics-store-non-number-value.js create mode 100644 js/src/jit-test/tests/cacheir/bigint-binary.js create mode 100644 js/src/jit-test/tests/cacheir/bigint-compare-double.js create mode 100644 js/src/jit-test/tests/cacheir/bigint-compare-int32.js create mode 100644 js/src/jit-test/tests/cacheir/bigint-compare-null-or-undef.js create mode 100644 js/src/jit-test/tests/cacheir/bigint-compare-number.js create mode 100644 js/src/jit-test/tests/cacheir/bigint-compare-string.js create mode 100644 js/src/jit-test/tests/cacheir/bigint-compare.js create mode 100644 js/src/jit-test/tests/cacheir/bigint-tobool.js create mode 100644 js/src/jit-test/tests/cacheir/bigint-unary.js create mode 100644 js/src/jit-test/tests/cacheir/binaryarith-mod-int32.js create mode 100644 js/src/jit-test/tests/cacheir/binaryarith-null-undef-bool.js create mode 100644 js/src/jit-test/tests/cacheir/binaryarith.js create mode 100644 js/src/jit-test/tests/cacheir/bind-function-specialized.js create mode 100644 js/src/jit-test/tests/cacheir/bindname-lexical-errors.js create mode 100644 js/src/jit-test/tests/cacheir/boolean-call.js create mode 100644 js/src/jit-test/tests/cacheir/boolean-compare-string-or-double.js create mode 100644 js/src/jit-test/tests/cacheir/bound-construct-derived-class-ctor.js create mode 100644 js/src/jit-test/tests/cacheir/bound-construct-hook.js create mode 100644 js/src/jit-test/tests/cacheir/bound-construct-scripted.js create mode 100644 js/src/jit-test/tests/cacheir/bug1345707.js create mode 100644 js/src/jit-test/tests/cacheir/bug1357024.js create mode 100644 js/src/jit-test/tests/cacheir/bug1397026.js create mode 100644 js/src/jit-test/tests/cacheir/bug1414849.js create mode 100644 js/src/jit-test/tests/cacheir/bug1420910.js create mode 100644 js/src/jit-test/tests/cacheir/bug1423139.js create mode 100644 js/src/jit-test/tests/cacheir/bug1438727.1.js create mode 100644 js/src/jit-test/tests/cacheir/bug1438727.2.js create mode 100644 js/src/jit-test/tests/cacheir/bug1438727.3.js create mode 100644 js/src/jit-test/tests/cacheir/bug1438727.4.js create mode 100644 js/src/jit-test/tests/cacheir/bug1438727.js create mode 100644 js/src/jit-test/tests/cacheir/bug1439180.js create mode 100644 js/src/jit-test/tests/cacheir/bug1448136.js create mode 100644 js/src/jit-test/tests/cacheir/bug1451976.js create mode 100644 js/src/jit-test/tests/cacheir/bug1451984.js create mode 100644 js/src/jit-test/tests/cacheir/bug1459754.js create mode 100644 js/src/jit-test/tests/cacheir/bug1462280.js create mode 100644 js/src/jit-test/tests/cacheir/bug1471361.js create mode 100644 js/src/jit-test/tests/cacheir/bug1483183.js create mode 100644 js/src/jit-test/tests/cacheir/bug1488786-2.js create mode 100644 js/src/jit-test/tests/cacheir/bug1488786.js create mode 100644 js/src/jit-test/tests/cacheir/bug1494537-plain.js create mode 100644 js/src/jit-test/tests/cacheir/bug1494537.js create mode 100644 js/src/jit-test/tests/cacheir/bug1500255.js create mode 100644 js/src/jit-test/tests/cacheir/bug1502143.js create mode 100644 js/src/jit-test/tests/cacheir/bug1502709.js create mode 100644 js/src/jit-test/tests/cacheir/bug1509293.js create mode 100644 js/src/jit-test/tests/cacheir/bug1514682.js create mode 100644 js/src/jit-test/tests/cacheir/bug1526872.js create mode 100644 js/src/jit-test/tests/cacheir/bug1536228.js create mode 100644 js/src/jit-test/tests/cacheir/bug1612636.js create mode 100644 js/src/jit-test/tests/cacheir/bug1651732-ionic-getprop-super.js create mode 100644 js/src/jit-test/tests/cacheir/bug1651732-proxy-get.js create mode 100644 js/src/jit-test/tests/cacheir/bug1651732-proxy-has.js create mode 100644 js/src/jit-test/tests/cacheir/bug1651732-proxy-hasOwn.js create mode 100644 js/src/jit-test/tests/cacheir/bug1651732-proxy-set.js create mode 100644 js/src/jit-test/tests/cacheir/bug1654947.js create mode 100644 js/src/jit-test/tests/cacheir/bug1685684.js create mode 100644 js/src/jit-test/tests/cacheir/bug1685925-1.js create mode 100644 js/src/jit-test/tests/cacheir/bug1685925-2.js create mode 100644 js/src/jit-test/tests/cacheir/bug1713556.js create mode 100644 js/src/jit-test/tests/cacheir/bug1757634.js create mode 100644 js/src/jit-test/tests/cacheir/bug1772824.js create mode 100644 js/src/jit-test/tests/cacheir/bug1785200.js create mode 100644 js/src/jit-test/tests/cacheir/bug1788528-1.js create mode 100644 js/src/jit-test/tests/cacheir/bug1788528-2.js create mode 100644 js/src/jit-test/tests/cacheir/bug1788528-3.js create mode 100644 js/src/jit-test/tests/cacheir/bug1788528-4.js create mode 100644 js/src/jit-test/tests/cacheir/bug1804634.js create mode 100644 js/src/jit-test/tests/cacheir/bug1819486.js create mode 100644 js/src/jit-test/tests/cacheir/bug1823212.js create mode 100644 js/src/jit-test/tests/cacheir/bug1834038.js create mode 100644 js/src/jit-test/tests/cacheir/bug1837157.js create mode 100644 js/src/jit-test/tests/cacheir/bug1842617.js create mode 100644 js/src/jit-test/tests/cacheir/bug1851599.js create mode 100644 js/src/jit-test/tests/cacheir/bug1851911.js create mode 100644 js/src/jit-test/tests/cacheir/bug1852893-1.js create mode 100644 js/src/jit-test/tests/cacheir/bug1852893-2.js create mode 100644 js/src/jit-test/tests/cacheir/call-any-native.js create mode 100644 js/src/jit-test/tests/cacheir/call-bound-function-many-args.js create mode 100644 js/src/jit-test/tests/cacheir/call-bound-scripted.js create mode 100644 js/src/jit-test/tests/cacheir/call-native-get-element-super.js create mode 100644 js/src/jit-test/tests/cacheir/ccw-missing.js create mode 100644 js/src/jit-test/tests/cacheir/compare-null-or-undef.js create mode 100644 js/src/jit-test/tests/cacheir/compare.js create mode 100644 js/src/jit-test/tests/cacheir/construct-bound-realm.js create mode 100644 js/src/jit-test/tests/cacheir/dataview-non-number-value-set.js create mode 100644 js/src/jit-test/tests/cacheir/dom-call.js create mode 100644 js/src/jit-test/tests/cacheir/fun-apply-as-call-native-1.js create mode 100644 js/src/jit-test/tests/cacheir/fun-apply-as-call-native-2.js create mode 100644 js/src/jit-test/tests/cacheir/fun-apply-as-call-native-3.js create mode 100644 js/src/jit-test/tests/cacheir/fun-apply-as-call-scripted-1.js create mode 100644 js/src/jit-test/tests/cacheir/fun-apply-as-call-scripted-2.js create mode 100644 js/src/jit-test/tests/cacheir/fun-apply-null-undefined.js create mode 100644 js/src/jit-test/tests/cacheir/fun-call-apply-weird.js create mode 100644 js/src/jit-test/tests/cacheir/fun-call-inline-native-1.js create mode 100644 js/src/jit-test/tests/cacheir/fun-call-inline-native-2.js create mode 100644 js/src/jit-test/tests/cacheir/fun-call-inline-native-3.js create mode 100644 js/src/jit-test/tests/cacheir/function-length.js create mode 100644 js/src/jit-test/tests/cacheir/function-name.js create mode 100644 js/src/jit-test/tests/cacheir/generic-spreadcall.js create mode 100644 js/src/jit-test/tests/cacheir/getelem-undefined-null.js create mode 100644 js/src/jit-test/tests/cacheir/getpropsuper.js create mode 100644 js/src/jit-test/tests/cacheir/getter-primitive-value.js create mode 100644 js/src/jit-test/tests/cacheir/getter-setter-guards1.js create mode 100644 js/src/jit-test/tests/cacheir/getter-setter-guards2.js create mode 100644 js/src/jit-test/tests/cacheir/global-getter.js create mode 100644 js/src/jit-test/tests/cacheir/global-setter.js create mode 100644 js/src/jit-test/tests/cacheir/has-sparse.js create mode 100644 js/src/jit-test/tests/cacheir/has-undefined-null.js create mode 100644 js/src/jit-test/tests/cacheir/has.js create mode 100644 js/src/jit-test/tests/cacheir/hasown.js create mode 100644 js/src/jit-test/tests/cacheir/iter-megamorphic.js create mode 100644 js/src/jit-test/tests/cacheir/load-typed-element-bigint.js create mode 100644 js/src/jit-test/tests/cacheir/map-get-bigint.js create mode 100644 js/src/jit-test/tests/cacheir/map-get-nongcthing.js create mode 100644 js/src/jit-test/tests/cacheir/map-get-object.js create mode 100644 js/src/jit-test/tests/cacheir/map-get-string.js create mode 100644 js/src/jit-test/tests/cacheir/map-get-symbol.js create mode 100644 js/src/jit-test/tests/cacheir/map-get-value.js create mode 100644 js/src/jit-test/tests/cacheir/map-has-bigint.js create mode 100644 js/src/jit-test/tests/cacheir/map-has-nongcthing.js create mode 100644 js/src/jit-test/tests/cacheir/map-has-object.js create mode 100644 js/src/jit-test/tests/cacheir/map-has-string.js create mode 100644 js/src/jit-test/tests/cacheir/map-has-symbol.js create mode 100644 js/src/jit-test/tests/cacheir/map-has-value.js create mode 100644 js/src/jit-test/tests/cacheir/map-size.js create mode 100644 js/src/jit-test/tests/cacheir/math-min-max.js create mode 100644 js/src/jit-test/tests/cacheir/megamorphic-get-has-dense.js create mode 100644 js/src/jit-test/tests/cacheir/new-with-non-object-prototype-failure.js create mode 100644 js/src/jit-test/tests/cacheir/new-with-non-object-prototype.js create mode 100644 js/src/jit-test/tests/cacheir/nukedCCW.js create mode 100644 js/src/jit-test/tests/cacheir/number-parseInt-double.js create mode 100644 js/src/jit-test/tests/cacheir/number-parseInt-int32.js create mode 100644 js/src/jit-test/tests/cacheir/number-parseInt-string.js create mode 100644 js/src/jit-test/tests/cacheir/number-toString.js create mode 100644 js/src/jit-test/tests/cacheir/object-addprop-hook.js create mode 100644 js/src/jit-test/tests/cacheir/object-constructor-metadata-builder.js create mode 100644 js/src/jit-test/tests/cacheir/object-constructor.js create mode 100644 js/src/jit-test/tests/cacheir/object-is-prototype-of.js create mode 100644 js/src/jit-test/tests/cacheir/optimize-get-iterator-1.js create mode 100644 js/src/jit-test/tests/cacheir/optimize-get-iterator-2.js create mode 100644 js/src/jit-test/tests/cacheir/optimize-get-iterator-3.js create mode 100644 js/src/jit-test/tests/cacheir/optimize-get-iterator-4.js create mode 100644 js/src/jit-test/tests/cacheir/optimize-get-iterator-5.js create mode 100644 js/src/jit-test/tests/cacheir/optimize-get-iterator-6.js create mode 100644 js/src/jit-test/tests/cacheir/optimize-get-iterator-7.js create mode 100644 js/src/jit-test/tests/cacheir/optimize-spread.js create mode 100644 js/src/jit-test/tests/cacheir/parseInt-double-truncate.js create mode 100644 js/src/jit-test/tests/cacheir/rope-char-at.js create mode 100644 js/src/jit-test/tests/cacheir/set-has-bigint.js create mode 100644 js/src/jit-test/tests/cacheir/set-has-nongcthing.js create mode 100644 js/src/jit-test/tests/cacheir/set-has-object.js create mode 100644 js/src/jit-test/tests/cacheir/set-has-string-gczeal.js create mode 100644 js/src/jit-test/tests/cacheir/set-has-string.js create mode 100644 js/src/jit-test/tests/cacheir/set-has-symbol.js create mode 100644 js/src/jit-test/tests/cacheir/set-has-value.js create mode 100644 js/src/jit-test/tests/cacheir/set-size.js create mode 100644 js/src/jit-test/tests/cacheir/setelem-id-guard.js create mode 100644 js/src/jit-test/tests/cacheir/setelem-undefined-null.js create mode 100644 js/src/jit-test/tests/cacheir/setgname-let.js create mode 100644 js/src/jit-test/tests/cacheir/setter-is-native.js create mode 100644 js/src/jit-test/tests/cacheir/shape-teleporting-1.js create mode 100644 js/src/jit-test/tests/cacheir/shape-teleporting-2.js create mode 100644 js/src/jit-test/tests/cacheir/shape-teleporting-3.js create mode 100644 js/src/jit-test/tests/cacheir/spread-minmax-1.js create mode 100644 js/src/jit-test/tests/cacheir/spread-minmax-2.js create mode 100644 js/src/jit-test/tests/cacheir/spread-minmax-3.js create mode 100644 js/src/jit-test/tests/cacheir/spread-minmax-4.js create mode 100644 js/src/jit-test/tests/cacheir/spread-minmax-5.js create mode 100644 js/src/jit-test/tests/cacheir/store-dense-element-hole-non-extensible.js create mode 100644 js/src/jit-test/tests/cacheir/store-dense-element-hole-non-writable-length-at-start.js create mode 100644 js/src/jit-test/tests/cacheir/store-dense-element-hole-non-writable-length.js create mode 100644 js/src/jit-test/tests/cacheir/store-dense-element-hole.js create mode 100644 js/src/jit-test/tests/cacheir/store-typed-element-bigint.js create mode 100644 js/src/jit-test/tests/cacheir/store-typed-element-constant-double-rhs.js create mode 100644 js/src/jit-test/tests/cacheir/store-typed-element-payload-reg-rhs.js create mode 100644 js/src/jit-test/tests/cacheir/store-typed-element-payload-stack-rhs.js create mode 100644 js/src/jit-test/tests/cacheir/string-at-oob.js create mode 100644 js/src/jit-test/tests/cacheir/string-at-rope.js create mode 100644 js/src/jit-test/tests/cacheir/string-at.js create mode 100644 js/src/jit-test/tests/cacheir/string-charAt-oob.js create mode 100644 js/src/jit-test/tests/cacheir/string-charAt-rope.js create mode 100644 js/src/jit-test/tests/cacheir/string-charCodeAt-oob.js create mode 100644 js/src/jit-test/tests/cacheir/string-charCodeAt-rope.js create mode 100644 js/src/jit-test/tests/cacheir/string-codePointAt-oob.js create mode 100644 js/src/jit-test/tests/cacheir/string-codePointAt-rope-twobyte.js create mode 100644 js/src/jit-test/tests/cacheir/string-codePointAt-rope.js create mode 100644 js/src/jit-test/tests/cacheir/string-codePointAt-surrogate.js create mode 100644 js/src/jit-test/tests/cacheir/string-concat-null-undef.js create mode 100644 js/src/jit-test/tests/cacheir/string-fromCharCode-double.js create mode 100644 js/src/jit-test/tests/cacheir/string-fromcodepoint.js create mode 100644 js/src/jit-test/tests/cacheir/string-int32-arith.js create mode 100644 js/src/jit-test/tests/cacheir/string-lastIndexOf.js create mode 100644 js/src/jit-test/tests/cacheir/string-loadchar.js create mode 100644 js/src/jit-test/tests/cacheir/string-number-arith.js create mode 100644 js/src/jit-test/tests/cacheir/string-toString-valueOf.js create mode 100644 js/src/jit-test/tests/cacheir/stub-fold-closeiter.js create mode 100644 js/src/jit-test/tests/cacheir/symbol-loose-equal-incompatible.js create mode 100644 js/src/jit-test/tests/cacheir/tobool.js create mode 100644 js/src/jit-test/tests/cacheir/topropertykey.js create mode 100644 js/src/jit-test/tests/cacheir/typed-array-intrinsics.js create mode 100644 js/src/jit-test/tests/cacheir/typedarray-constructor-objects.js create mode 100644 js/src/jit-test/tests/cacheir/typedarray-megamorphic-get.js create mode 100644 js/src/jit-test/tests/cacheir/typedarray-megamorphic-has.js create mode 100644 js/src/jit-test/tests/cacheir/typedarray-non-int32-index-get.js create mode 100644 js/src/jit-test/tests/cacheir/typedarray-non-int32-index-has.js create mode 100644 js/src/jit-test/tests/cacheir/typedarray-non-int32-index-set.js create mode 100644 js/src/jit-test/tests/cacheir/typedarray-non-number-value-set.js create mode 100644 js/src/jit-test/tests/cacheir/typeof-proxy.js create mode 100644 js/src/jit-test/tests/cacheir/unaryarith-null-undef-bool.js create mode 100644 js/src/jit-test/tests/cacheir/unaryarith-string.js create mode 100644 js/src/jit-test/tests/cacheir/unaryarith.js create mode 100644 js/src/jit-test/tests/cacheir/unboxed-element-hole.js create mode 100644 js/src/jit-test/tests/cacheir/windowproxy.js create mode 100644 js/src/jit-test/tests/class/bug1169746.js create mode 100644 js/src/jit-test/tests/class/bug1357506.js create mode 100644 js/src/jit-test/tests/class/bug1359622.js create mode 100644 js/src/jit-test/tests/class/bug1473272-default-constructors.js create mode 100644 js/src/jit-test/tests/class/bug1488385.js create mode 100644 js/src/jit-test/tests/class/bug1567579.js create mode 100644 js/src/jit-test/tests/class/bug1616535.js create mode 100644 js/src/jit-test/tests/class/bug1628719.js create mode 100644 js/src/jit-test/tests/class/bug1645835.js create mode 100644 js/src/jit-test/tests/class/bug1709328.js create mode 100644 js/src/jit-test/tests/class/bug1715318.js create mode 100644 js/src/jit-test/tests/class/bug1720032-1.js create mode 100644 js/src/jit-test/tests/class/bug1720032-2.js create mode 100644 js/src/jit-test/tests/class/bug1720032-3.js create mode 100644 js/src/jit-test/tests/class/bug1727281.js create mode 100644 js/src/jit-test/tests/class/checkreturn-catch-return-finally-super-arrow.js create mode 100644 js/src/jit-test/tests/class/checkreturn-catch-return-finally-super.js create mode 100644 js/src/jit-test/tests/class/checkreturn-catch-return.js create mode 100644 js/src/jit-test/tests/class/checkreturn-catch-super-arrow.js create mode 100644 js/src/jit-test/tests/class/checkreturn-catch-super.js create mode 100644 js/src/jit-test/tests/class/checkreturn-finally-super-arrow.js create mode 100644 js/src/jit-test/tests/class/checkreturn-finally-super.js create mode 100644 js/src/jit-test/tests/class/checkreturn-for-condition.js create mode 100644 js/src/jit-test/tests/class/checkreturn-for-of-arrow.js create mode 100644 js/src/jit-test/tests/class/checkreturn-for-of.js create mode 100644 js/src/jit-test/tests/class/checkreturn-for.js create mode 100644 js/src/jit-test/tests/class/checkreturn-optimized-out.js create mode 100644 js/src/jit-test/tests/class/checkreturn-source-location.js create mode 100644 js/src/jit-test/tests/class/checkreturn-while.js create mode 100644 js/src/jit-test/tests/class/class-static-01.js create mode 100644 js/src/jit-test/tests/class/class-static-02.js create mode 100644 js/src/jit-test/tests/class/class-static-03.js create mode 100644 js/src/jit-test/tests/class/classconstructor.js create mode 100644 js/src/jit-test/tests/class/compProp.js create mode 100644 js/src/jit-test/tests/class/default-constructor-position.js create mode 100644 js/src/jit-test/tests/class/methDefn.js create mode 100644 js/src/jit-test/tests/class/regress-merge-descriptors-simple.js create mode 100644 js/src/jit-test/tests/class/regress-merge-descriptors.js create mode 100644 js/src/jit-test/tests/class/relazify-constructor.js create mode 100644 js/src/jit-test/tests/class/super-base-is-null-get-elem.js create mode 100644 js/src/jit-test/tests/class/super-base-is-null-get-prop.js create mode 100644 js/src/jit-test/tests/class/super-base-is-null-set-elem.js create mode 100644 js/src/jit-test/tests/class/super-base-is-null-set-prop.js create mode 100644 js/src/jit-test/tests/class/super-in-nested-eval.js create mode 100644 js/src/jit-test/tests/class/super-this-env.js create mode 100644 js/src/jit-test/tests/class/superElemMegamorphic.js create mode 100644 js/src/jit-test/tests/class/superProp.js create mode 100644 js/src/jit-test/tests/class/superPropMegamorphic.js create mode 100644 js/src/jit-test/tests/class/superPropProxy.js create mode 100644 js/src/jit-test/tests/class/superSetPropThrow.js create mode 100644 js/src/jit-test/tests/class/superSetProperty.js create mode 100644 js/src/jit-test/tests/class/this-check-after-scalar-replacement-in-derived-class-constructor.js create mode 100644 js/src/jit-test/tests/class/throwOnCallConstructor.js create mode 100644 js/src/jit-test/tests/closures/bug496922.js create mode 100644 js/src/jit-test/tests/closures/bug540131-2.js create mode 100644 js/src/jit-test/tests/closures/bug540131.js create mode 100644 js/src/jit-test/tests/closures/bug540242.js create mode 100644 js/src/jit-test/tests/closures/bug540243.js create mode 100644 js/src/jit-test/tests/closures/bug540528.js create mode 100644 js/src/jit-test/tests/closures/bug541239.js create mode 100644 js/src/jit-test/tests/closures/bug543565.js create mode 100644 js/src/jit-test/tests/closures/bug684178.js create mode 100644 js/src/jit-test/tests/closures/bug684489.js create mode 100644 js/src/jit-test/tests/closures/closure-pluseq.js create mode 100644 js/src/jit-test/tests/closures/closure-pluseq2.js create mode 100644 js/src/jit-test/tests/closures/closure-plusplus.js create mode 100644 js/src/jit-test/tests/closures/closure-tests.js create mode 100644 js/src/jit-test/tests/closures/flat-closure-1.js create mode 100644 js/src/jit-test/tests/closures/flat-closure-7.js create mode 100644 js/src/jit-test/tests/closures/flat-closure-8.js create mode 100644 js/src/jit-test/tests/closures/lambda-inner-heavy.js create mode 100644 js/src/jit-test/tests/closures/lambda-light-returned.js create mode 100644 js/src/jit-test/tests/closures/lambda-light.js create mode 100644 js/src/jit-test/tests/closures/lambda.js create mode 100644 js/src/jit-test/tests/closures/lambdafc.js create mode 100644 js/src/jit-test/tests/closures/name-both-hvy.js create mode 100644 js/src/jit-test/tests/closures/name-inactive-missing.js create mode 100644 js/src/jit-test/tests/closures/name.js create mode 100644 js/src/jit-test/tests/closures/name2.js create mode 100644 js/src/jit-test/tests/closures/name2a.js create mode 100644 js/src/jit-test/tests/closures/name2b.js create mode 100644 js/src/jit-test/tests/closures/name3.js create mode 100644 js/src/jit-test/tests/closures/name4.js create mode 100644 js/src/jit-test/tests/closures/namedLambda.js create mode 100644 js/src/jit-test/tests/closures/nameinc-loop-2.js create mode 100644 js/src/jit-test/tests/closures/nameinc-loop-3.js create mode 100644 js/src/jit-test/tests/closures/nameinc-loop-missing-2.js create mode 100644 js/src/jit-test/tests/closures/nameinc-loop-missing.js create mode 100644 js/src/jit-test/tests/closures/nameinc-loop.js create mode 100644 js/src/jit-test/tests/closures/nameinc.js create mode 100644 js/src/jit-test/tests/closures/set-outer-trace-1.js create mode 100644 js/src/jit-test/tests/closures/set-outer-trace-2.js create mode 100644 js/src/jit-test/tests/closures/set-outer-trace-3.js create mode 100644 js/src/jit-test/tests/closures/set-outer-trace-4.js create mode 100644 js/src/jit-test/tests/closures/set-outer-trace.js create mode 100644 js/src/jit-test/tests/closures/setname-1.js create mode 100644 js/src/jit-test/tests/closures/setname-closure-2.js create mode 100644 js/src/jit-test/tests/closures/setname-closure.js create mode 100644 js/src/jit-test/tests/closures/setname-inner-heavy.js create mode 100644 js/src/jit-test/tests/closures/setname-loop-2.js create mode 100644 js/src/jit-test/tests/closures/setname-loop.js create mode 100644 js/src/jit-test/tests/closures/setname-no-pop.js create mode 100644 js/src/jit-test/tests/closures/t001.js create mode 100644 js/src/jit-test/tests/closures/t002.js create mode 100644 js/src/jit-test/tests/closures/t003.js create mode 100644 js/src/jit-test/tests/closures/t004.js create mode 100644 js/src/jit-test/tests/closures/t005.js create mode 100644 js/src/jit-test/tests/closures/t006.js create mode 100644 js/src/jit-test/tests/closures/t007.js create mode 100644 js/src/jit-test/tests/closures/t008.js create mode 100644 js/src/jit-test/tests/closures/t009.js create mode 100644 js/src/jit-test/tests/closures/t010.js create mode 100644 js/src/jit-test/tests/closures/t011.js create mode 100644 js/src/jit-test/tests/closures/t012.js create mode 100644 js/src/jit-test/tests/closures/t013.js create mode 100644 js/src/jit-test/tests/closures/t014.js create mode 100644 js/src/jit-test/tests/closures/t015.js create mode 100644 js/src/jit-test/tests/closures/t016.js create mode 100644 js/src/jit-test/tests/closures/t017.js create mode 100644 js/src/jit-test/tests/closures/t020.js create mode 100644 js/src/jit-test/tests/closures/t021.js create mode 100644 js/src/jit-test/tests/closures/t022.js create mode 100644 js/src/jit-test/tests/closures/t023.js create mode 100644 js/src/jit-test/tests/closures/t024.js create mode 100644 js/src/jit-test/tests/closures/t025.js create mode 100644 js/src/jit-test/tests/closures/t026.js create mode 100644 js/src/jit-test/tests/closures/t027.js create mode 100644 js/src/jit-test/tests/closures/t028.js create mode 100644 js/src/jit-test/tests/closures/t029.js create mode 100644 js/src/jit-test/tests/closures/t030.js create mode 100644 js/src/jit-test/tests/closures/t031.js create mode 100644 js/src/jit-test/tests/closures/t032.js create mode 100644 js/src/jit-test/tests/closures/t033.js create mode 100644 js/src/jit-test/tests/closures/t034.js create mode 100644 js/src/jit-test/tests/closures/t035.js create mode 100644 js/src/jit-test/tests/closures/t036.js create mode 100644 js/src/jit-test/tests/closures/t037.js create mode 100644 js/src/jit-test/tests/closures/test-inner-imports.js create mode 100644 js/src/jit-test/tests/closures/upvar-nest.js create mode 100644 js/src/jit-test/tests/collections/Array-of-1.js create mode 100644 js/src/jit-test/tests/collections/Array-of-2.js create mode 100644 js/src/jit-test/tests/collections/Array-of-3.js create mode 100644 js/src/jit-test/tests/collections/Array-of-4.js create mode 100644 js/src/jit-test/tests/collections/Array-of-cross-compartment.js create mode 100644 js/src/jit-test/tests/collections/Array-of-generic-1.js create mode 100644 js/src/jit-test/tests/collections/Array-of-generic-2.js create mode 100644 js/src/jit-test/tests/collections/Array-of-generic-3.js create mode 100644 js/src/jit-test/tests/collections/Array-of-length-setter-2.js create mode 100644 js/src/jit-test/tests/collections/Array-of-length-setter.js create mode 100644 js/src/jit-test/tests/collections/Array-of-nonconfigurable-1.js create mode 100644 js/src/jit-test/tests/collections/Array-of-nonconfigurable-2.js create mode 100644 js/src/jit-test/tests/collections/Array-of-ordering.js create mode 100644 js/src/jit-test/tests/collections/Array-of-surfaces.js create mode 100644 js/src/jit-test/tests/collections/Map-Set-moving-gc.js create mode 100644 js/src/jit-test/tests/collections/Map-clear-1.js create mode 100644 js/src/jit-test/tests/collections/Map-clear-2.js create mode 100644 js/src/jit-test/tests/collections/Map-clear-3.js create mode 100644 js/src/jit-test/tests/collections/Map-clear-4.js create mode 100644 js/src/jit-test/tests/collections/Map-clear-5.js create mode 100644 js/src/jit-test/tests/collections/Map-clear-6.js create mode 100644 js/src/jit-test/tests/collections/Map-clear-iterators-1.js create mode 100644 js/src/jit-test/tests/collections/Map-clear-iterators-2.js create mode 100644 js/src/jit-test/tests/collections/Map-constructor-1.js create mode 100644 js/src/jit-test/tests/collections/Map-constructor-2.js create mode 100644 js/src/jit-test/tests/collections/Map-constructor-3.js create mode 100644 js/src/jit-test/tests/collections/Map-constructor-4.js create mode 100644 js/src/jit-test/tests/collections/Map-constructor-5.js create mode 100644 js/src/jit-test/tests/collections/Map-constructor-duplicates.js create mode 100644 js/src/jit-test/tests/collections/Map-constructor-generator-1.js create mode 100644 js/src/jit-test/tests/collections/Map-constructor-generator-3.js create mode 100644 js/src/jit-test/tests/collections/Map-constructor-generator-exception.js create mode 100644 js/src/jit-test/tests/collections/Map-constructor-set.js create mode 100644 js/src/jit-test/tests/collections/Map-delete-size.js create mode 100644 js/src/jit-test/tests/collections/Map-delete.js create mode 100644 js/src/jit-test/tests/collections/Map-forEach.js create mode 100644 js/src/jit-test/tests/collections/Map-gc-4.js create mode 100644 js/src/jit-test/tests/collections/Map-get.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-1.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-2.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-add-1.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-add-2.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-add-remove.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-already-done.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-order.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-pairs-1.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-pairs-2.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-pairs-3.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-proxies-1.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-proxies-2.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-remove-1.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-remove-2.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-remove-3.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-remove-4.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-remove-5.js create mode 100644 js/src/jit-test/tests/collections/Map-iterator-remove-6.js create mode 100644 js/src/jit-test/tests/collections/Map-iterators-3.js create mode 100644 js/src/jit-test/tests/collections/Map-scale.js create mode 100644 js/src/jit-test/tests/collections/Map-set-returns-this.js create mode 100644 js/src/jit-test/tests/collections/Map-set-size.js create mode 100644 js/src/jit-test/tests/collections/Map-set-undefined.js create mode 100644 js/src/jit-test/tests/collections/Map-size.js create mode 100644 js/src/jit-test/tests/collections/Map-surfaces-1.js create mode 100644 js/src/jit-test/tests/collections/Map-surfaces-2.js create mode 100644 js/src/jit-test/tests/collections/Map-surfaces-3.js create mode 100644 js/src/jit-test/tests/collections/Map-values-1.js create mode 100644 js/src/jit-test/tests/collections/Map-values-2.js create mode 100644 js/src/jit-test/tests/collections/Set-add-returns-this.js create mode 100644 js/src/jit-test/tests/collections/Set-add-size.js create mode 100644 js/src/jit-test/tests/collections/Set-clear-1.js create mode 100644 js/src/jit-test/tests/collections/Set-clear-2.js create mode 100644 js/src/jit-test/tests/collections/Set-clear-3.js create mode 100644 js/src/jit-test/tests/collections/Set-clear-4.js create mode 100644 js/src/jit-test/tests/collections/Set-clear-5.js create mode 100644 js/src/jit-test/tests/collections/Set-clear-6.js create mode 100644 js/src/jit-test/tests/collections/Set-clear-iterators-1.js create mode 100644 js/src/jit-test/tests/collections/Set-clear-iterators-2.js create mode 100644 js/src/jit-test/tests/collections/Set-clear-iterators-3.js create mode 100644 js/src/jit-test/tests/collections/Set-constructor-1.js create mode 100644 js/src/jit-test/tests/collections/Set-constructor-2.js create mode 100644 js/src/jit-test/tests/collections/Set-constructor-3.js create mode 100644 js/src/jit-test/tests/collections/Set-constructor-add.js create mode 100644 js/src/jit-test/tests/collections/Set-constructor-generator-1.js create mode 100644 js/src/jit-test/tests/collections/Set-delete-size.js create mode 100644 js/src/jit-test/tests/collections/Set-forEach.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-1.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-2.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-3.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-add-1.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-add-2.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-add-remove.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-gc-2.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-gc-3.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-order.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-proxies-1.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-proxies-2.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-remove-1.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-remove-2.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-remove-3.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-remove-4.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-remove-5.js create mode 100644 js/src/jit-test/tests/collections/Set-iterator-remove-6.js create mode 100644 js/src/jit-test/tests/collections/Set-scale.js create mode 100644 js/src/jit-test/tests/collections/Set-size.js create mode 100644 js/src/jit-test/tests/collections/Set-surfaces-1.js create mode 100644 js/src/jit-test/tests/collections/Set-surfaces-2.js create mode 100644 js/src/jit-test/tests/collections/Set-surfaces-3.js create mode 100644 js/src/jit-test/tests/collections/Set-values-1.js create mode 100644 js/src/jit-test/tests/collections/Set-values-2.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-1.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-2.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-3.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-4.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-5.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-arraylike-exception.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-duplicates.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-generator-1.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-generator-3.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-generator-exception.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-iterable.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-non-iterable.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-nonnull.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-constructor-set.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-moving-gc.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-set-returns-this.js create mode 100644 js/src/jit-test/tests/collections/WeakMap-surfaces.js create mode 100644 js/src/jit-test/tests/collections/WeakSet-add-returns-this.js create mode 100644 js/src/jit-test/tests/collections/WeakSet-constructor-1.js create mode 100644 js/src/jit-test/tests/collections/WeakSet-constructor-add.js create mode 100644 js/src/jit-test/tests/collections/WeakSet-constructor.js create mode 100644 js/src/jit-test/tests/collections/WeakSet-delete.js create mode 100644 js/src/jit-test/tests/collections/WeakSet-error.js create mode 100644 js/src/jit-test/tests/collections/WeakSet-moving-gc.js create mode 100644 js/src/jit-test/tests/collections/WeakSet-surface.js create mode 100644 js/src/jit-test/tests/collections/bug-1381423.js create mode 100644 js/src/jit-test/tests/collections/bug-1863391-1.js create mode 100644 js/src/jit-test/tests/collections/bug-1863391-2.js create mode 100644 js/src/jit-test/tests/collections/bug-1866636.js create mode 100644 js/src/jit-test/tests/collections/bug-743101.js create mode 100644 js/src/jit-test/tests/collections/constructor-errors.js create mode 100644 js/src/jit-test/tests/collections/for-in.js create mode 100644 js/src/jit-test/tests/collections/iterator-1.js create mode 100644 js/src/jit-test/tests/collections/iterator-2.js create mode 100644 js/src/jit-test/tests/collections/iterator-noSuchMethod.js create mode 100644 js/src/jit-test/tests/collections/iterator-proto-1.js create mode 100644 js/src/jit-test/tests/collections/iterator-proto-2.js create mode 100644 js/src/jit-test/tests/collections/iterator-proto-surfaces.js create mode 100644 js/src/jit-test/tests/collections/key-equality-0.js create mode 100644 js/src/jit-test/tests/collections/key-equality-1.js create mode 100644 js/src/jit-test/tests/collections/key-equality-2.js create mode 100644 js/src/jit-test/tests/collections/key-equality-NaN.js create mode 100644 js/src/jit-test/tests/coverage/bug1203695.js create mode 100644 js/src/jit-test/tests/coverage/bug1206247.js create mode 100644 js/src/jit-test/tests/coverage/bug1214548.js create mode 100644 js/src/jit-test/tests/coverage/bug1274048.js create mode 100644 js/src/jit-test/tests/coverage/bug1304569-switch-case.js create mode 100644 js/src/jit-test/tests/coverage/getLcovInfo_twice.js create mode 100644 js/src/jit-test/tests/coverage/lcov-enabled-1.js create mode 100644 js/src/jit-test/tests/coverage/lcov-enabled-2.js create mode 100644 js/src/jit-test/tests/coverage/off-thread-01.js create mode 100644 js/src/jit-test/tests/coverage/off-thread-02.js create mode 100644 js/src/jit-test/tests/coverage/simple.js create mode 100644 js/src/jit-test/tests/ctypes/AddressOfField.js create mode 100644 js/src/jit-test/tests/ctypes/argument-length-abi.js create mode 100644 js/src/jit-test/tests/ctypes/argument-length-array.js create mode 100644 js/src/jit-test/tests/ctypes/argument-length-cdata.js create mode 100644 js/src/jit-test/tests/ctypes/argument-length-ctypes.js create mode 100644 js/src/jit-test/tests/ctypes/argument-length-finalizer.js create mode 100644 js/src/jit-test/tests/ctypes/argument-length-function.js create mode 100644 js/src/jit-test/tests/ctypes/argument-length-int64.js create mode 100644 js/src/jit-test/tests/ctypes/argument-length-pointer.js create mode 100644 js/src/jit-test/tests/ctypes/argument-length-primitive.js create mode 100644 js/src/jit-test/tests/ctypes/argument-length-struct.js create mode 100644 js/src/jit-test/tests/ctypes/argument-type-array.js create mode 100644 js/src/jit-test/tests/ctypes/argument-type-ctypes.js create mode 100644 js/src/jit-test/tests/ctypes/argument-type-function.js create mode 100644 js/src/jit-test/tests/ctypes/argument-type-int64.js create mode 100644 js/src/jit-test/tests/ctypes/argument-type-pointer.js create mode 100644 js/src/jit-test/tests/ctypes/argument-type-struct.js create mode 100644 js/src/jit-test/tests/ctypes/array-index.js create mode 100644 js/src/jit-test/tests/ctypes/bug1155985.js create mode 100644 js/src/jit-test/tests/ctypes/cast.js create mode 100644 js/src/jit-test/tests/ctypes/construct.js create mode 100644 js/src/jit-test/tests/ctypes/conversion-array.js create mode 100644 js/src/jit-test/tests/ctypes/conversion-error.js create mode 100644 js/src/jit-test/tests/ctypes/conversion-finalizer.js create mode 100644 js/src/jit-test/tests/ctypes/conversion-function.js create mode 100644 js/src/jit-test/tests/ctypes/conversion-int64.js create mode 100644 js/src/jit-test/tests/ctypes/conversion-native-function.js create mode 100644 js/src/jit-test/tests/ctypes/conversion-pointer.js create mode 100644 js/src/jit-test/tests/ctypes/conversion-primitive.js create mode 100644 js/src/jit-test/tests/ctypes/conversion-struct.js create mode 100644 js/src/jit-test/tests/ctypes/conversion-to-number.js create mode 100644 js/src/jit-test/tests/ctypes/conversion-to-primitive.js create mode 100644 js/src/jit-test/tests/ctypes/function-definition.js create mode 100644 js/src/jit-test/tests/ctypes/incompatible-abi.js create mode 100644 js/src/jit-test/tests/ctypes/incompatible-array.js create mode 100644 js/src/jit-test/tests/ctypes/incompatible-cdata.js create mode 100644 js/src/jit-test/tests/ctypes/incompatible-ctype.js create mode 100644 js/src/jit-test/tests/ctypes/incompatible-finalizer.js create mode 100644 js/src/jit-test/tests/ctypes/incompatible-function.js create mode 100644 js/src/jit-test/tests/ctypes/incompatible-int64.js create mode 100644 js/src/jit-test/tests/ctypes/incompatible-pointer.js create mode 100644 js/src/jit-test/tests/ctypes/incompatible-struct.js create mode 100644 js/src/jit-test/tests/ctypes/pointer.js create mode 100644 js/src/jit-test/tests/ctypes/size-overflow-array.js create mode 100644 js/src/jit-test/tests/ctypes/size-overflow-struct.js create mode 100644 js/src/jit-test/tests/ctypes/struct-field.js create mode 100644 js/src/jit-test/tests/ctypes/typedarrays.js create mode 100644 js/src/jit-test/tests/dataview/create-out-of-bounds-ccw.js create mode 100644 js/src/jit-test/tests/dataview/nan-canonicalization.js create mode 100644 js/src/jit-test/tests/dataview/out-of-bounds-access.js create mode 100644 js/src/jit-test/tests/dataview/read-aligned.js create mode 100644 js/src/jit-test/tests/dataview/read-unaligned.js create mode 100644 js/src/jit-test/tests/dataview/throws-on-detached.js create mode 100644 js/src/jit-test/tests/dataview/write-aligned.js create mode 100644 js/src/jit-test/tests/dataview/write-unaligned.js create mode 100644 js/src/jit-test/tests/debug/DebuggeeWouldRun-01.js create mode 100644 js/src/jit-test/tests/debug/DebuggeeWouldRun-02.js create mode 100644 js/src/jit-test/tests/debug/DebuggeeWouldRun-03.js create mode 100644 js/src/jit-test/tests/debug/DebuggeeWouldRun-04.js create mode 100644 js/src/jit-test/tests/debug/Debugger-add-Debugger-prototype.js create mode 100644 js/src/jit-test/tests/debug/Debugger-adoptDebuggeeValue.js create mode 100644 js/src/jit-test/tests/debug/Debugger-adoptFrame.js create mode 100644 js/src/jit-test/tests/debug/Debugger-allowUnobservedAsmJS-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-allowUnobservedAsmJS-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-clearAllBreakpoints-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-clearAllBreakpoints-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-ctor-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-ctor-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-ctor-03.js create mode 100644 js/src/jit-test/tests/debug/Debugger-ctor-04.js create mode 100644 js/src/jit-test/tests/debug/Debugger-ctor-05.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-03.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-04.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-05.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-06.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-08.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-09.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-10.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-11.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-12.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-13.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-14.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-15.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-16.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-17.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-18.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-19.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-20.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-21.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-22.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-23.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-24.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-25.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-26.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-27.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-28.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-29.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-30.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-31.js create mode 100644 js/src/jit-test/tests/debug/Debugger-debuggees-32.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findAllGlobals-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findAllGlobals-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-03.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-04.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-05.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-06.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-07.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-08.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-09.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-10.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-11.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-fuzzing.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-03.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-04.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-05.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-06.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-07.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-08-script2 create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-08.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-09.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-10.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-11-script2 create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-11.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-12-script1 create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-12-script2 create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-12.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-14.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-14.script1 create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-15.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-16.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-17.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-18.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-19.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-20.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-22.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-23.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-24.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-25.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-26.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-27.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-28.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-29.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-30.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-31.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-delazify.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-ghost.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-optimized-out.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-uncompleted-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findScripts-uncompleted-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findSourceURLs.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findSources-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findSources-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-findSources-03.js create mode 100644 js/src/jit-test/tests/debug/Debugger-getNewestFrame-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-getNewestFrame-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-getNewestFrame-03.js create mode 100644 js/src/jit-test/tests/debug/Debugger-getNewestFrame-generators-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-isCompilableUnit.js create mode 100644 js/src/jit-test/tests/debug/Debugger-multi-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-multi-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-multi-03.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-03.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-04.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-05.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-06.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNativeCall-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNativeCall-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNativeCall-03.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNativeCall-04.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNativeCall-05.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNativeCall-06.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNativeCall-07.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNativeCall-08.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNativeCall-09.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNativeCall-10.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-03.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-04.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-05.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-06.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-07.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-08.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-09.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-10.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-11.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-12.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-13.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-14.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-15.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewPromise-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewPromise-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewPromise-03.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewPromise-04.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewPromise-05.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewPromise-06.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onNewPromise-07.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onPromiseSettled-01.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onPromiseSettled-02.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onPromiseSettled-03.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onPromiseSettled-04.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onPromiseSettled-05.js create mode 100644 js/src/jit-test/tests/debug/Debugger-onPromiseSettled-06.js create mode 100644 js/src/jit-test/tests/debug/Environment-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-02.js create mode 100644 js/src/jit-test/tests/debug/Environment-03.js create mode 100644 js/src/jit-test/tests/debug/Environment-Function-prototype.js create mode 100644 js/src/jit-test/tests/debug/Environment-bug-1431461.js create mode 100644 js/src/jit-test/tests/debug/Environment-calleeScript-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-calleeScript-02.js create mode 100644 js/src/jit-test/tests/debug/Environment-calleeScript-03.js create mode 100644 js/src/jit-test/tests/debug/Environment-find-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-find-02.js create mode 100644 js/src/jit-test/tests/debug/Environment-find-03.js create mode 100644 js/src/jit-test/tests/debug/Environment-find-04.js create mode 100644 js/src/jit-test/tests/debug/Environment-find-05.js create mode 100644 js/src/jit-test/tests/debug/Environment-find-06.js create mode 100644 js/src/jit-test/tests/debug/Environment-find-07.js create mode 100644 js/src/jit-test/tests/debug/Environment-gc-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-gc-02.js create mode 100644 js/src/jit-test/tests/debug/Environment-gc-03.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-02.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-03.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-04.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-05.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-06.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-07.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-08.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-09.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-10.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-11.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-12.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-13.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-14.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-15.js create mode 100644 js/src/jit-test/tests/debug/Environment-getVariable-WouldRun.js create mode 100644 js/src/jit-test/tests/debug/Environment-identity-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-identity-02.js create mode 100644 js/src/jit-test/tests/debug/Environment-identity-03.js create mode 100644 js/src/jit-test/tests/debug/Environment-identity-04.js create mode 100644 js/src/jit-test/tests/debug/Environment-identity-05.js create mode 100644 js/src/jit-test/tests/debug/Environment-inspectable-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-module-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-module-02.js create mode 100644 js/src/jit-test/tests/debug/Environment-module-tla-env-after-pop.js create mode 100644 js/src/jit-test/tests/debug/Environment-module-tla-env.js create mode 100644 js/src/jit-test/tests/debug/Environment-module-tla.js create mode 100644 js/src/jit-test/tests/debug/Environment-names-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-names-02.js create mode 100644 js/src/jit-test/tests/debug/Environment-names-03.js create mode 100644 js/src/jit-test/tests/debug/Environment-nondebuggee.js create mode 100644 js/src/jit-test/tests/debug/Environment-object-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-optimizedOut-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-parent-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-scopeKind-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-selfhosted-builtins.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-02.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-03.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-04.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-05.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-06.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-07.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-08.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-10.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-11.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-12.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-13.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-14.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-15.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-16.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-17.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-18.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-19.js create mode 100644 js/src/jit-test/tests/debug/Environment-setVariable-WouldRun.js create mode 100644 js/src/jit-test/tests/debug/Environment-type-01.js create mode 100644 js/src/jit-test/tests/debug/Environment-unscopables.js create mode 100644 js/src/jit-test/tests/debug/Environment-variables.js create mode 100644 js/src/jit-test/tests/debug/Frame-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-arguments-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-arguments-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-arguments-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-arguments-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-arguments-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-arguments-06.js create mode 100644 js/src/jit-test/tests/debug/Frame-arguments-07.js create mode 100644 js/src/jit-test/tests/debug/Frame-asyncPromise-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-asyncPromise-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-asyncPromise-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-asyncPromise-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-callee-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-callee-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-callee-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-callee-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-constructing-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-constructing-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-constructing-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-environment-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-environment-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-environment-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-environment-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-environment-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-environment-06.js create mode 100644 js/src/jit-test/tests/debug/Frame-environment-07.js create mode 100644 js/src/jit-test/tests/debug/Frame-environment-08.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-06.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-07.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-08.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-09.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-10.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-11.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-12.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-13.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-14.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-15.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-16.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-17.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-18.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-19.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-20.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-21.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-22.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-23.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-24.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-25.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-26.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-27.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-28.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-29.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-30.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-31.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-32.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-33.js create mode 100644 js/src/jit-test/tests/debug/Frame-eval-stack.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-06.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-07.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-08.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-09.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-10.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-11.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-12.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-13.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-14.js create mode 100644 js/src/jit-test/tests/debug/Frame-evalWithBindings-15.js create mode 100644 js/src/jit-test/tests/debug/Frame-identity-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-identity-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-identity-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-identity-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-identity-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-identity-06.js create mode 100644 js/src/jit-test/tests/debug/Frame-identity-07.js create mode 100644 js/src/jit-test/tests/debug/Frame-implementation-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-implementation-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-newTargetEval-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-newTargetEval-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-newTargetOverflow-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-offset-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-offset-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-offset-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-offset-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-offset-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-older-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-older-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-older-generators-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-older-generators-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-older-generators-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-older-generators-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-older-generators-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-olderSavedFrame-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-olderSavedFrame-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-06.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-08.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-09.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-10.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-11.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-12.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-13.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-14.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-15.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-16.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-17.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-18.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-19.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-20.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-21.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-23.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-after-debugger-return.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-assign-function.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-assign-generator.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-async-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-async-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-async-generators-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-dead-frame.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-error-error.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-error-return.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-error-scope-unwind-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-error-scope-unwind-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-error-throw.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-error.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-generator-resumption-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-generators-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-generators-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-generators-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-generators-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-generators-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-generators-06.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-generators-07.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-generators-08.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-multiple-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-multiple-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-multiple-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-return-error.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-return-return.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-return-throw.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-return.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-source-location.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-throw-error.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-throw-return.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-throw-throw.js create mode 100644 js/src/jit-test/tests/debug/Frame-onPop-throw.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStack-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStack-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStack-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStack-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStack-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStack-06.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStack-07.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-06.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-07.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-08.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-09.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-10.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-11.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-12.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-13.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-14.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-15.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-16.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-17.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-18.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-19.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-20.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-assign-function.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-assign-generator.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-async-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-async-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-async-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-async-gc-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-generator-resumption-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-generator-resumption-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-generator-resumption-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-generators-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-generators-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-generators-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-generators-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-generators-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-generators-defaults.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-generators-gc-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-iterators.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-lines-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-resumption-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-resumption-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-resumption-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-resumption-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-resumption-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-onStep-resumption-06.js create mode 100644 js/src/jit-test/tests/debug/Frame-script-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-script-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-script-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-script-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-script-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-script-06.js create mode 100644 js/src/jit-test/tests/debug/Frame-script-environment-nondebuggee.js create mode 100644 js/src/jit-test/tests/debug/Frame-terminated-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-terminated-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-terminated-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-terminated-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-04.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-05.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-06.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-07.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-08.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-09.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-10.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-11.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-12.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-13.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-14.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-15.js create mode 100644 js/src/jit-test/tests/debug/Frame-this-16.js create mode 100644 js/src/jit-test/tests/debug/Frame-type-01.js create mode 100644 js/src/jit-test/tests/debug/Frame-type-02.js create mode 100644 js/src/jit-test/tests/debug/Frame-type-03.js create mode 100644 js/src/jit-test/tests/debug/Frame-type-04.js create mode 100644 js/src/jit-test/tests/debug/Memory-01.js create mode 100644 js/src/jit-test/tests/debug/Memory-allocationSamplingProbability-01.js create mode 100644 js/src/jit-test/tests/debug/Memory-allocationSamplingProbability-02.js create mode 100644 js/src/jit-test/tests/debug/Memory-allocationsLogOverflowed-01.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-01.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-02.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-03.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-04.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-05.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-06.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-07.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-08.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-09.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-10.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-11.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-13.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-14.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-15.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-17.js create mode 100644 js/src/jit-test/tests/debug/Memory-drainAllocationsLog-18.js create mode 100644 js/src/jit-test/tests/debug/Memory-takeCensus-01.js create mode 100644 js/src/jit-test/tests/debug/Memory-takeCensus-02.js create mode 100644 js/src/jit-test/tests/debug/Memory-takeCensus-03.js create mode 100644 js/src/jit-test/tests/debug/Memory-takeCensus-04.js create mode 100644 js/src/jit-test/tests/debug/Memory-takeCensus-05.js create mode 100644 js/src/jit-test/tests/debug/Memory-takeCensus-06.js create mode 100644 js/src/jit-test/tests/debug/Memory-takeCensus-07.js create mode 100644 js/src/jit-test/tests/debug/Memory-takeCensus-08.js create mode 100644 js/src/jit-test/tests/debug/Memory-takeCensus-09.js create mode 100644 js/src/jit-test/tests/debug/Memory-takeCensus-10.js create mode 100644 js/src/jit-test/tests/debug/Memory-takeCensus-11.js create mode 100644 js/src/jit-test/tests/debug/Memory-takeCensus-12.js create mode 100644 js/src/jit-test/tests/debug/Memory-trackingAllocationSites-01.js create mode 100644 js/src/jit-test/tests/debug/Memory-trackingAllocationSites-02.js create mode 100644 js/src/jit-test/tests/debug/Memory-trackingAllocationSites-03.js create mode 100644 js/src/jit-test/tests/debug/Object-01.js create mode 100644 js/src/jit-test/tests/debug/Object-02.js create mode 100644 js/src/jit-test/tests/debug/Object-apply-01.js create mode 100644 js/src/jit-test/tests/debug/Object-apply-02.js create mode 100644 js/src/jit-test/tests/debug/Object-apply-03.js create mode 100644 js/src/jit-test/tests/debug/Object-apply-04.js create mode 100644 js/src/jit-test/tests/debug/Object-asEnvironment-01.js create mode 100644 js/src/jit-test/tests/debug/Object-boundTargetFunction-01.js create mode 100644 js/src/jit-test/tests/debug/Object-boundTargetFunction-02.js create mode 100644 js/src/jit-test/tests/debug/Object-boundTargetFunction-03.js create mode 100644 js/src/jit-test/tests/debug/Object-callable.js create mode 100644 js/src/jit-test/tests/debug/Object-class.js create mode 100644 js/src/jit-test/tests/debug/Object-createSource.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperties-01.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperties-02.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperties-03.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-01.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-02.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-03.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-04.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-05.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-06.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-07.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-08.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-09.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-10.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-11.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-12.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-13.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-14.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-non-primitive-key.js create mode 100644 js/src/jit-test/tests/debug/Object-defineProperty-surfaces-01.js create mode 100644 js/src/jit-test/tests/debug/Object-deleteProperty-01.js create mode 100644 js/src/jit-test/tests/debug/Object-deleteProperty-error-01.js create mode 100644 js/src/jit-test/tests/debug/Object-deleteProperty-error-02.js create mode 100644 js/src/jit-test/tests/debug/Object-deleteProperty-non-primitive-key.js create mode 100644 js/src/jit-test/tests/debug/Object-displayName-01.js create mode 100644 js/src/jit-test/tests/debug/Object-displayName-02.js create mode 100644 js/src/jit-test/tests/debug/Object-environment-01.js create mode 100644 js/src/jit-test/tests/debug/Object-environment-02.js create mode 100644 js/src/jit-test/tests/debug/Object-errorLineNumber-errorColumnNumber.js create mode 100644 js/src/jit-test/tests/debug/Object-executeInGlobal-01.js create mode 100644 js/src/jit-test/tests/debug/Object-executeInGlobal-02.js create mode 100644 js/src/jit-test/tests/debug/Object-executeInGlobal-03.js create mode 100644 js/src/jit-test/tests/debug/Object-executeInGlobal-04.js create mode 100644 js/src/jit-test/tests/debug/Object-executeInGlobal-05.js create mode 100644 js/src/jit-test/tests/debug/Object-executeInGlobal-06.js create mode 100644 js/src/jit-test/tests/debug/Object-executeInGlobal-07.js create mode 100644 js/src/jit-test/tests/debug/Object-executeInGlobal-08.js create mode 100644 js/src/jit-test/tests/debug/Object-executeInGlobal-09.js create mode 100644 js/src/jit-test/tests/debug/Object-executeInGlobal-10.js create mode 100644 js/src/jit-test/tests/debug/Object-executeInGlobal-11.js create mode 100644 js/src/jit-test/tests/debug/Object-forceLexicalInitializationByName.js create mode 100644 js/src/jit-test/tests/debug/Object-gc-01.js create mode 100644 js/src/jit-test/tests/debug/Object-getErrorMessageName.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPrivateProperties.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-01.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-02.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-03.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-04.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-05.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-06.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-non-primitive-key.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-surfaces-01.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-surfaces-02.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertyNames-01.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertyNames-02.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertyNamesLength.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertySymbols-01.js create mode 100644 js/src/jit-test/tests/debug/Object-getOwnPropertySymbols-02.js create mode 100644 js/src/jit-test/tests/debug/Object-getPromiseReactions-01.js create mode 100644 js/src/jit-test/tests/debug/Object-getPromiseReactions-02.js create mode 100644 js/src/jit-test/tests/debug/Object-getPromiseReactions-03.js create mode 100644 js/src/jit-test/tests/debug/Object-getPromiseReactions-04.js create mode 100644 js/src/jit-test/tests/debug/Object-getPromiseReactions-05.js create mode 100644 js/src/jit-test/tests/debug/Object-getPromiseReactions-06.js create mode 100644 js/src/jit-test/tests/debug/Object-getProperty-01.js create mode 100644 js/src/jit-test/tests/debug/Object-getProperty-02.js create mode 100644 js/src/jit-test/tests/debug/Object-getProperty-03.js create mode 100644 js/src/jit-test/tests/debug/Object-getProperty-non-primitive-key.js create mode 100644 js/src/jit-test/tests/debug/Object-identity-01.js create mode 100644 js/src/jit-test/tests/debug/Object-identity-02.js create mode 100644 js/src/jit-test/tests/debug/Object-identity-03.js create mode 100644 js/src/jit-test/tests/debug/Object-isArrowFunction.js create mode 100644 js/src/jit-test/tests/debug/Object-isClassConstructor.js create mode 100644 js/src/jit-test/tests/debug/Object-isSameNative-01.js create mode 100644 js/src/jit-test/tests/debug/Object-isSameNative.js create mode 100644 js/src/jit-test/tests/debug/Object-makeDebuggeeValue-01.js create mode 100644 js/src/jit-test/tests/debug/Object-makeDebuggeeValue-02.js create mode 100644 js/src/jit-test/tests/debug/Object-name-01.js create mode 100644 js/src/jit-test/tests/debug/Object-name-02.js create mode 100644 js/src/jit-test/tests/debug/Object-name-03.js create mode 100644 js/src/jit-test/tests/debug/Object-name-04.js create mode 100644 js/src/jit-test/tests/debug/Object-parameterNames.js create mode 100644 js/src/jit-test/tests/debug/Object-preventExtensions-01.js create mode 100644 js/src/jit-test/tests/debug/Object-promiseDependentPromises-realms.js create mode 100644 js/src/jit-test/tests/debug/Object-proto.js create mode 100644 js/src/jit-test/tests/debug/Object-proxy.js create mode 100644 js/src/jit-test/tests/debug/Object-script-AsmJSNative.js create mode 100644 js/src/jit-test/tests/debug/Object-script-environment-nondebuggee.js create mode 100644 js/src/jit-test/tests/debug/Object-script-lazy.js create mode 100644 js/src/jit-test/tests/debug/Object-script.js create mode 100644 js/src/jit-test/tests/debug/Object-seal-01.js create mode 100644 js/src/jit-test/tests/debug/Object-setProperty-01.js create mode 100644 js/src/jit-test/tests/debug/Object-setProperty-02.js create mode 100644 js/src/jit-test/tests/debug/Object-setProperty-03.js create mode 100644 js/src/jit-test/tests/debug/Object-setProperty-non-primitive-key.js create mode 100644 js/src/jit-test/tests/debug/Object-unsafeDereference-01.js create mode 100644 js/src/jit-test/tests/debug/Object-unwrap-01.js create mode 100644 js/src/jit-test/tests/debug/Object-unwrap-02.js create mode 100644 js/src/jit-test/tests/debug/Object-unwrap-03.js create mode 100644 js/src/jit-test/tests/debug/Promise-race-dependent-promises.js create mode 100644 js/src/jit-test/tests/debug/RematerializedFrame-retval.js create mode 100644 js/src/jit-test/tests/debug/Script-01.js create mode 100644 js/src/jit-test/tests/debug/Script-02.js create mode 100644 js/src/jit-test/tests/debug/Script-clearBreakpoint-01.js create mode 100644 js/src/jit-test/tests/debug/Script-clearBreakpoint-02.js create mode 100644 js/src/jit-test/tests/debug/Script-clearBreakpoint-03.js create mode 100644 js/src/jit-test/tests/debug/Script-clearBreakpoint-04.js create mode 100644 js/src/jit-test/tests/debug/Script-displayName-01.js create mode 100644 js/src/jit-test/tests/debug/Script-format-01.js create mode 100644 js/src/jit-test/tests/debug/Script-gc-01.js create mode 100644 js/src/jit-test/tests/debug/Script-gc-02.js create mode 100644 js/src/jit-test/tests/debug/Script-gc-03.js create mode 100644 js/src/jit-test/tests/debug/Script-getAllColumnOffsets.js create mode 100644 js/src/jit-test/tests/debug/Script-getBreakpoints-01.js create mode 100644 js/src/jit-test/tests/debug/Script-getBreakpoints-02.js create mode 100644 js/src/jit-test/tests/debug/Script-getChildScripts-01.js create mode 100644 js/src/jit-test/tests/debug/Script-getChildScripts-02.js create mode 100644 js/src/jit-test/tests/debug/Script-getChildScripts-03.js create mode 100644 js/src/jit-test/tests/debug/Script-getChildScripts-04.js create mode 100644 js/src/jit-test/tests/debug/Script-getChildScripts-05.js create mode 100644 js/src/jit-test/tests/debug/Script-getEffectfulOffsets.js create mode 100644 js/src/jit-test/tests/debug/Script-getLineOffsets-01.js create mode 100644 js/src/jit-test/tests/debug/Script-getLineOffsets-02.js create mode 100644 js/src/jit-test/tests/debug/Script-getLineOffsets-03.js create mode 100644 js/src/jit-test/tests/debug/Script-getLineOffsets-04.js create mode 100644 js/src/jit-test/tests/debug/Script-getLineOffsets-05.js create mode 100644 js/src/jit-test/tests/debug/Script-getLineOffsets-06.js create mode 100644 js/src/jit-test/tests/debug/Script-getLineOffsets-07.js create mode 100644 js/src/jit-test/tests/debug/Script-getLineOffsets-08.js create mode 100644 js/src/jit-test/tests/debug/Script-getOffsetLine-01.js create mode 100644 js/src/jit-test/tests/debug/Script-getOffsetLine-02.js create mode 100644 js/src/jit-test/tests/debug/Script-getOffsetLocation.js create mode 100644 js/src/jit-test/tests/debug/Script-getOffsetMetadata.js create mode 100644 js/src/jit-test/tests/debug/Script-getOffsetsCoverage-01.js create mode 100644 js/src/jit-test/tests/debug/Script-getOffsetsCoverage-02.js create mode 100644 js/src/jit-test/tests/debug/Script-getOffsetsCoverage-03.js create mode 100644 js/src/jit-test/tests/debug/Script-getOffsetsCoverage-04.js create mode 100644 js/src/jit-test/tests/debug/Script-getOffsetsCoverage-05.js create mode 100644 js/src/jit-test/tests/debug/Script-getOffsetsCoverage-bug1233178.js create mode 100644 js/src/jit-test/tests/debug/Script-getPossibleBreakpoints-02.js create mode 100644 js/src/jit-test/tests/debug/Script-getPossibleBreakpoints.js create mode 100644 js/src/jit-test/tests/debug/Script-global-01.js create mode 100644 js/src/jit-test/tests/debug/Script-global-02.js create mode 100644 js/src/jit-test/tests/debug/Script-isFunction.js create mode 100644 js/src/jit-test/tests/debug/Script-isInCatchScope.js create mode 100644 js/src/jit-test/tests/debug/Script-isModule-01.js create mode 100644 js/src/jit-test/tests/debug/Script-isModule-02.js create mode 100644 js/src/jit-test/tests/debug/Script-isModule-03.js create mode 100644 js/src/jit-test/tests/debug/Script-isModule-04.js create mode 100644 js/src/jit-test/tests/debug/Script-lineCount.js create mode 100644 js/src/jit-test/tests/debug/Script-mainOffset-01.js create mode 100644 js/src/jit-test/tests/debug/Script-parameterNames.js create mode 100644 js/src/jit-test/tests/debug/Script-selfhosted-builtins.js create mode 100644 js/src/jit-test/tests/debug/Script-source-01.js create mode 100644 js/src/jit-test/tests/debug/Script-source-02.js create mode 100644 js/src/jit-test/tests/debug/Script-source-03.js create mode 100644 js/src/jit-test/tests/debug/Script-sourceStart-01.js create mode 100644 js/src/jit-test/tests/debug/Script-sourceStart-02.js create mode 100644 js/src/jit-test/tests/debug/Script-sourceStart-03.js create mode 100644 js/src/jit-test/tests/debug/Script-sourceStart-04.js create mode 100644 js/src/jit-test/tests/debug/Script-startColumn.js create mode 100644 js/src/jit-test/tests/debug/Script-startLine.js create mode 100644 js/src/jit-test/tests/debug/Script-url.js create mode 100644 js/src/jit-test/tests/debug/Source-displayURL-deprecated.js create mode 100644 js/src/jit-test/tests/debug/Source-displayURL-disable.js create mode 100644 js/src/jit-test/tests/debug/Source-displayURL.js create mode 100644 js/src/jit-test/tests/debug/Source-element-01.js create mode 100644 js/src/jit-test/tests/debug/Source-elementAttributeName.js create mode 100644 js/src/jit-test/tests/debug/Source-introductionScript-01.js create mode 100644 js/src/jit-test/tests/debug/Source-introductionScript-02.js create mode 100644 js/src/jit-test/tests/debug/Source-introductionScript-03.js create mode 100644 js/src/jit-test/tests/debug/Source-introductionType-data create mode 100644 js/src/jit-test/tests/debug/Source-introductionType.js create mode 100644 js/src/jit-test/tests/debug/Source-invisible.js create mode 100644 js/src/jit-test/tests/debug/Source-reparse.js create mode 100644 js/src/jit-test/tests/debug/Source-sourceMapURL-deprecated.js create mode 100644 js/src/jit-test/tests/debug/Source-sourceMapURL-disable.js create mode 100644 js/src/jit-test/tests/debug/Source-sourceMapURL.js create mode 100644 js/src/jit-test/tests/debug/Source-startLine-startColumn.js create mode 100644 js/src/jit-test/tests/debug/Source-surfaces.js create mode 100644 js/src/jit-test/tests/debug/Source-text-01.js create mode 100644 js/src/jit-test/tests/debug/Source-text-02.js create mode 100644 js/src/jit-test/tests/debug/Source-text-lazy.js create mode 100644 js/src/jit-test/tests/debug/Source-url-01.js create mode 100644 js/src/jit-test/tests/debug/Source-url-02.js create mode 100644 js/src/jit-test/tests/debug/Source-url.js create mode 100644 js/src/jit-test/tests/debug/async-stack.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-01.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-02.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-03.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-04.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-05.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-06.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-07.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-08.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-09.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-10.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-11.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-12.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-13.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-14.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-await.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-dot-generator.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-gc-01.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-gc-02.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-gc-04.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-gc-05.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-multi-01.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-multi-02.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-multi-03.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-multi-04.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-noncng.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-oom-01.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-resume-01.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-resume-02.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-resume-03.js create mode 100644 js/src/jit-test/tests/debug/breakpoint-resume-04.js create mode 100644 js/src/jit-test/tests/debug/bug-1102549.js create mode 100644 js/src/jit-test/tests/debug/bug-1103386.js create mode 100644 js/src/jit-test/tests/debug/bug-1103813.js create mode 100644 js/src/jit-test/tests/debug/bug-1103817.js create mode 100644 js/src/jit-test/tests/debug/bug-1110327.js create mode 100644 js/src/jit-test/tests/debug/bug-1136806.js create mode 100644 js/src/jit-test/tests/debug/bug-1192401.js create mode 100644 js/src/jit-test/tests/debug/bug-1238610.js create mode 100644 js/src/jit-test/tests/debug/bug-1240090.js create mode 100644 js/src/jit-test/tests/debug/bug-1248162.js create mode 100644 js/src/jit-test/tests/debug/bug-1260725.js create mode 100644 js/src/jit-test/tests/debug/bug-1260728.js create mode 100644 js/src/jit-test/tests/debug/bug-1385844-2.js create mode 100644 js/src/jit-test/tests/debug/bug-1385844.js create mode 100644 js/src/jit-test/tests/debug/bug-1444604-reduced.js create mode 100644 js/src/jit-test/tests/debug/bug-1444604.js create mode 100644 js/src/jit-test/tests/debug/bug-1477084.js create mode 100644 js/src/jit-test/tests/debug/bug-1564012.js create mode 100644 js/src/jit-test/tests/debug/bug-1565275.js create mode 100644 js/src/jit-test/tests/debug/bug-1572391.js create mode 100644 js/src/jit-test/tests/debug/bug-1576862-2.js create mode 100644 js/src/jit-test/tests/debug/bug-1584195.js create mode 100644 js/src/jit-test/tests/debug/bug-725733.js create mode 100644 js/src/jit-test/tests/debug/bug-800586.js create mode 100644 js/src/jit-test/tests/debug/bug-826669.js create mode 100644 js/src/jit-test/tests/debug/bug-858170.js create mode 100644 js/src/jit-test/tests/debug/bug-876654.js create mode 100644 js/src/jit-test/tests/debug/bug1001372.js create mode 100644 js/src/jit-test/tests/debug/bug1002797.js create mode 100644 js/src/jit-test/tests/debug/bug1004447.js create mode 100644 js/src/jit-test/tests/debug/bug1006205.js create mode 100644 js/src/jit-test/tests/debug/bug1006473.js create mode 100644 js/src/jit-test/tests/debug/bug1106164.js create mode 100644 js/src/jit-test/tests/debug/bug1106719.js create mode 100644 js/src/jit-test/tests/debug/bug1107525.js create mode 100644 js/src/jit-test/tests/debug/bug1107913.js create mode 100644 js/src/jit-test/tests/debug/bug1108159.js create mode 100644 js/src/jit-test/tests/debug/bug1108556.js create mode 100644 js/src/jit-test/tests/debug/bug1109328.js create mode 100644 js/src/jit-test/tests/debug/bug1109915.js create mode 100644 js/src/jit-test/tests/debug/bug1109964.js create mode 100644 js/src/jit-test/tests/debug/bug1111199.js create mode 100644 js/src/jit-test/tests/debug/bug1114587.js create mode 100644 js/src/jit-test/tests/debug/bug1116103.js create mode 100644 js/src/jit-test/tests/debug/bug1118878.js create mode 100644 js/src/jit-test/tests/debug/bug1121083.js create mode 100644 js/src/jit-test/tests/debug/bug1130768.js create mode 100644 js/src/jit-test/tests/debug/bug1133196.js create mode 100644 js/src/jit-test/tests/debug/bug1147939.js create mode 100644 js/src/jit-test/tests/debug/bug1148917.js create mode 100644 js/src/jit-test/tests/debug/bug1160182.js create mode 100644 js/src/jit-test/tests/debug/bug1161332.js create mode 100644 js/src/jit-test/tests/debug/bug1188334.js create mode 100644 js/src/jit-test/tests/debug/bug1191499.js create mode 100644 js/src/jit-test/tests/debug/bug1216261.js create mode 100644 js/src/jit-test/tests/debug/bug1219905.js create mode 100644 js/src/jit-test/tests/debug/bug1221378.js create mode 100644 js/src/jit-test/tests/debug/bug1232655.js create mode 100644 js/src/jit-test/tests/debug/bug1240546.js create mode 100644 js/src/jit-test/tests/debug/bug1240803.js create mode 100644 js/src/jit-test/tests/debug/bug1242111.js create mode 100644 js/src/jit-test/tests/debug/bug1242798.js create mode 100644 js/src/jit-test/tests/debug/bug1245862.js create mode 100644 js/src/jit-test/tests/debug/bug1246605.js create mode 100644 js/src/jit-test/tests/debug/bug1251919.js create mode 100644 js/src/jit-test/tests/debug/bug1252453.js create mode 100644 js/src/jit-test/tests/debug/bug1252464.js create mode 100644 js/src/jit-test/tests/debug/bug1253246.js create mode 100644 js/src/jit-test/tests/debug/bug1254123.js create mode 100644 js/src/jit-test/tests/debug/bug1254190.js create mode 100644 js/src/jit-test/tests/debug/bug1254578.js create mode 100644 js/src/jit-test/tests/debug/bug1257045.js create mode 100644 js/src/jit-test/tests/debug/bug1263899.js create mode 100644 js/src/jit-test/tests/debug/bug1264961.js create mode 100644 js/src/jit-test/tests/debug/bug1266434.js create mode 100644 js/src/jit-test/tests/debug/bug1272908.js create mode 100644 js/src/jit-test/tests/debug/bug1275001.js create mode 100644 js/src/jit-test/tests/debug/bug1282741.js create mode 100644 js/src/jit-test/tests/debug/bug1299121.js create mode 100644 js/src/jit-test/tests/debug/bug1300517.js create mode 100644 js/src/jit-test/tests/debug/bug1300528.js create mode 100644 js/src/jit-test/tests/debug/bug1302432.js create mode 100644 js/src/jit-test/tests/debug/bug1304553.js create mode 100644 js/src/jit-test/tests/debug/bug1308578.js create mode 100644 js/src/jit-test/tests/debug/bug1330339.js create mode 100644 js/src/jit-test/tests/debug/bug1330489-sps.js create mode 100644 js/src/jit-test/tests/debug/bug1330489.js create mode 100644 js/src/jit-test/tests/debug/bug1330491.js create mode 100644 js/src/jit-test/tests/debug/bug1331064.js create mode 100644 js/src/jit-test/tests/debug/bug1331592.js create mode 100644 js/src/jit-test/tests/debug/bug1332493.js create mode 100644 js/src/jit-test/tests/debug/bug1343579.js create mode 100644 js/src/jit-test/tests/debug/bug1351059.js create mode 100644 js/src/jit-test/tests/debug/bug1353356.js create mode 100644 js/src/jit-test/tests/debug/bug1363233.js create mode 100644 js/src/jit-test/tests/debug/bug1368736.js create mode 100644 js/src/jit-test/tests/debug/bug1370905.js create mode 100644 js/src/jit-test/tests/debug/bug1375447.js create mode 100644 js/src/jit-test/tests/debug/bug1385843.js create mode 100644 js/src/jit-test/tests/debug/bug1397049.js create mode 100644 js/src/jit-test/tests/debug/bug1397385.js create mode 100644 js/src/jit-test/tests/debug/bug1404710.js create mode 100644 js/src/jit-test/tests/debug/bug1406437.js create mode 100644 js/src/jit-test/tests/debug/bug1417961.js create mode 100644 js/src/jit-test/tests/debug/bug1432764.js create mode 100644 js/src/jit-test/tests/debug/bug1434391.js create mode 100644 js/src/jit-test/tests/debug/bug1437537.js create mode 100644 js/src/jit-test/tests/debug/bug1480390.js create mode 100644 js/src/jit-test/tests/debug/bug1488163.js create mode 100644 js/src/jit-test/tests/debug/bug1516958.js create mode 100644 js/src/jit-test/tests/debug/bug1557343-2.js create mode 100644 js/src/jit-test/tests/debug/bug1557343.js create mode 100644 js/src/jit-test/tests/debug/bug1563051.js create mode 100644 js/src/jit-test/tests/debug/bug1586762.js create mode 100644 js/src/jit-test/tests/debug/bug1591342.js create mode 100644 js/src/jit-test/tests/debug/bug1602392.js create mode 100644 js/src/jit-test/tests/debug/bug1644699-terminated-generator.js create mode 100644 js/src/jit-test/tests/debug/bug1645358.js create mode 100644 js/src/jit-test/tests/debug/bug1647309.js create mode 100644 js/src/jit-test/tests/debug/bug1675755-forceLexicalInitializationByName.js create mode 100644 js/src/jit-test/tests/debug/bug1684821.js create mode 100644 js/src/jit-test/tests/debug/bug1688622-createSource.js create mode 100644 js/src/jit-test/tests/debug/bug1701859.js create mode 100644 js/src/jit-test/tests/debug/bug1703760.js create mode 100644 js/src/jit-test/tests/debug/bug1756592-2.js create mode 100644 js/src/jit-test/tests/debug/bug1756592.js create mode 100644 js/src/jit-test/tests/debug/bug1768660.js create mode 100644 js/src/jit-test/tests/debug/bug1812979.js create mode 100644 js/src/jit-test/tests/debug/bug1814020.js create mode 100644 js/src/jit-test/tests/debug/bug1817933.js create mode 100644 js/src/jit-test/tests/debug/bug1847360.js create mode 100644 js/src/jit-test/tests/debug/bug1851135.js create mode 100644 js/src/jit-test/tests/debug/bug1878466.js create mode 100644 js/src/jit-test/tests/debug/bug1878511.js create mode 100644 js/src/jit-test/tests/debug/bug911065.js create mode 100644 js/src/jit-test/tests/debug/bug967039.js create mode 100644 js/src/jit-test/tests/debug/bug973566.js create mode 100644 js/src/jit-test/tests/debug/bug980585.js create mode 100644 js/src/jit-test/tests/debug/bug999655.js create mode 100644 js/src/jit-test/tests/debug/class-01.js create mode 100644 js/src/jit-test/tests/debug/class-02.js create mode 100644 js/src/jit-test/tests/debug/class-03.js create mode 100644 js/src/jit-test/tests/debug/class-04.js create mode 100644 js/src/jit-test/tests/debug/class-05.js create mode 100644 js/src/jit-test/tests/debug/class-06.js create mode 100644 js/src/jit-test/tests/debug/class-07.js create mode 100644 js/src/jit-test/tests/debug/class-08.js create mode 100644 js/src/jit-test/tests/debug/class-default-constructor-01.js create mode 100644 js/src/jit-test/tests/debug/class-derived-default-constructor-1.js create mode 100644 js/src/jit-test/tests/debug/class-derived-default-constructor-2.js create mode 100644 js/src/jit-test/tests/debug/class-derived-default-constructor-3.js create mode 100644 js/src/jit-test/tests/debug/clear-old-analyses-01.js create mode 100644 js/src/jit-test/tests/debug/clear-old-analyses-02.js create mode 100644 js/src/jit-test/tests/debug/dispatch-01.js create mode 100644 js/src/jit-test/tests/debug/envChain_frame-eval-relazify.js create mode 100644 js/src/jit-test/tests/debug/envChain_frame-eval-with-eval.js create mode 100644 js/src/jit-test/tests/debug/envChain_frame-eval.js create mode 100644 js/src/jit-test/tests/debug/envChain_frame-evalWithBindings-with-eval.js create mode 100644 js/src/jit-test/tests/debug/envChain_frame-evalWithBindings.js create mode 100644 js/src/jit-test/tests/debug/envChain_object-executeInGlobal.js create mode 100644 js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-empty.js create mode 100644 js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-existing-bindings.js create mode 100644 js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-inner.js create mode 100644 js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-no-use-eval.js create mode 100644 js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-no-use.js create mode 100644 js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-shadow-only-eval.js create mode 100644 js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-shadow-only.js create mode 100644 js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings.js create mode 100644 js/src/jit-test/tests/debug/error-cause-copied.js create mode 100644 js/src/jit-test/tests/debug/error-cause-not-copied-when-redefined-to-accessor.js create mode 100644 js/src/jit-test/tests/debug/exclusive.js create mode 100644 js/src/jit-test/tests/debug/execution-observability-01.js create mode 100644 js/src/jit-test/tests/debug/execution-observability-02.js create mode 100644 js/src/jit-test/tests/debug/execution-observability-03.js create mode 100644 js/src/jit-test/tests/debug/execution-observability-04.js create mode 100644 js/src/jit-test/tests/debug/execution-observability-05.js create mode 100644 js/src/jit-test/tests/debug/execution-observability-06.js create mode 100644 js/src/jit-test/tests/debug/gc-01.js create mode 100644 js/src/jit-test/tests/debug/gc-02.js create mode 100644 js/src/jit-test/tests/debug/gc-03.js create mode 100644 js/src/jit-test/tests/debug/gc-04.js create mode 100644 js/src/jit-test/tests/debug/gc-05.js create mode 100644 js/src/jit-test/tests/debug/gc-06.js create mode 100644 js/src/jit-test/tests/debug/gc-07.js create mode 100644 js/src/jit-test/tests/debug/gc-08.js create mode 100644 js/src/jit-test/tests/debug/gc-09.2.js create mode 100644 js/src/jit-test/tests/debug/gc-09.js create mode 100644 js/src/jit-test/tests/debug/gc-10.js create mode 100644 js/src/jit-test/tests/debug/gc-compartment-01.js create mode 100644 js/src/jit-test/tests/debug/gc-compartment-02.js create mode 100644 js/src/jit-test/tests/debug/initarrayelem-hole-value.js create mode 100644 js/src/jit-test/tests/debug/inspect-wrapped-promise.js create mode 100644 js/src/jit-test/tests/debug/isAsyncFunction-isGeneratorFunction.js create mode 100644 js/src/jit-test/tests/debug/isError.js create mode 100644 js/src/jit-test/tests/debug/job-queue-01.js create mode 100644 js/src/jit-test/tests/debug/job-queue-02.js create mode 100644 js/src/jit-test/tests/debug/job-queue-03.js create mode 100644 js/src/jit-test/tests/debug/job-queue-04.js create mode 100644 js/src/jit-test/tests/debug/makeGlobalObjectReference-01.js create mode 100644 js/src/jit-test/tests/debug/makeGlobalObjectReference-02.js create mode 100644 js/src/jit-test/tests/debug/makeGlobalObjectReference-03.js create mode 100644 js/src/jit-test/tests/debug/noExecute-01.js create mode 100644 js/src/jit-test/tests/debug/noExecute-02.js create mode 100644 js/src/jit-test/tests/debug/noExecute-03.js create mode 100644 js/src/jit-test/tests/debug/noExecute-04.js create mode 100644 js/src/jit-test/tests/debug/noExecute-05.js create mode 100644 js/src/jit-test/tests/debug/noExecute-06.js create mode 100644 js/src/jit-test/tests/debug/noExecute-07.js create mode 100644 js/src/jit-test/tests/debug/onDebuggerStatement-01.js create mode 100644 js/src/jit-test/tests/debug/onDebuggerStatement-02.js create mode 100644 js/src/jit-test/tests/debug/onDebuggerStatement-03.js create mode 100644 js/src/jit-test/tests/debug/onDebuggerStatement-04.js create mode 100644 js/src/jit-test/tests/debug/onDebuggerStatement-05.js create mode 100644 js/src/jit-test/tests/debug/onDebuggerStatement-async-generator-resumption-01.js create mode 100644 js/src/jit-test/tests/debug/onDebuggerStatement-async-resumption-01.js create mode 100644 js/src/jit-test/tests/debug/onDebuggerStatement-async-resumption-02.js create mode 100644 js/src/jit-test/tests/debug/onDebuggerStatement-generator-resumption-01.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-01.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-02.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-03.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-05.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-06.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-07.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-01.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-01.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-02.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-03.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-04.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-05.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-06.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-07.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-08.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-09.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-10.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-11.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-12.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-resumption-13.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-tryskipawait-01.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-tryskipawait-02.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-async-tryskipawait-03.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-01.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-02.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-03.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-04.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-05.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-06.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-07.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-08.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-09.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-10.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-01.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-02.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-03.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-04.js create mode 100644 js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-05.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-01.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-02.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-03.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-04.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-05.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-06.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-07.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-08.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-09.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-10.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-12.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-13.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-14.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-15.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-16.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-17.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-18.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-generators-01.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-resumption-01.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-resumption-02.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-resumption-03.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-resumption-04.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-resumption-05.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-resumption-async-02.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-resumption-async.js create mode 100644 js/src/jit-test/tests/debug/onExceptionUnwind-resumption-generator.js create mode 100644 js/src/jit-test/tests/debug/onNewScript-01.js create mode 100644 js/src/jit-test/tests/debug/onNewScript-02.js create mode 100644 js/src/jit-test/tests/debug/onNewScript-03.js create mode 100644 js/src/jit-test/tests/debug/onNewScript-ExecuteInFrameScriptEnvironment.js create mode 100644 js/src/jit-test/tests/debug/onNewScript-off-main-thread-01.js create mode 100644 js/src/jit-test/tests/debug/onNewScript-off-main-thread-02.js create mode 100644 js/src/jit-test/tests/debug/onNewScript-wasm-01.js create mode 100644 js/src/jit-test/tests/debug/onNewScript-wasm-02.js create mode 100644 js/src/jit-test/tests/debug/optimized-out-01.js create mode 100644 js/src/jit-test/tests/debug/optimized-out-02.js create mode 100644 js/src/jit-test/tests/debug/optimized-out-03.js create mode 100644 js/src/jit-test/tests/debug/optimized-out-arrow-this.js create mode 100644 js/src/jit-test/tests/debug/private-methods-eval-in-frame.js create mode 100644 js/src/jit-test/tests/debug/prologueFailure-01.js create mode 100644 js/src/jit-test/tests/debug/prologueFailure-02.js create mode 100644 js/src/jit-test/tests/debug/prologueFailure-03.js create mode 100644 js/src/jit-test/tests/debug/relazify-debugee-script-01.js create mode 100644 js/src/jit-test/tests/debug/resumption-01.js create mode 100644 js/src/jit-test/tests/debug/resumption-02.js create mode 100644 js/src/jit-test/tests/debug/resumption-03.js create mode 100644 js/src/jit-test/tests/debug/resumption-05.js create mode 100644 js/src/jit-test/tests/debug/resumption-07.js create mode 100644 js/src/jit-test/tests/debug/resumption-08.js create mode 100644 js/src/jit-test/tests/debug/resumption-09.js create mode 100644 js/src/jit-test/tests/debug/resumption-error-01.js create mode 100644 js/src/jit-test/tests/debug/resumption-error-02.js create mode 100644 js/src/jit-test/tests/debug/save-queue-resets-draining.js create mode 100644 js/src/jit-test/tests/debug/setter-argc.js create mode 100644 js/src/jit-test/tests/debug/surfaces-01.js create mode 100644 js/src/jit-test/tests/debug/surfaces-02.js create mode 100644 js/src/jit-test/tests/debug/surfaces-03.js create mode 100644 js/src/jit-test/tests/debug/surfaces-offsets.js create mode 100644 js/src/jit-test/tests/debug/testEarlyReturnOnCall.js create mode 100644 js/src/jit-test/tests/debug/throw-exception-stack-location-async.js create mode 100644 js/src/jit-test/tests/debug/uncaughtExceptionHook-01.js create mode 100644 js/src/jit-test/tests/debug/uncaughtExceptionHook-02.js create mode 100644 js/src/jit-test/tests/debug/uncaughtExceptionHook-03.js create mode 100644 js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-01.js create mode 100644 js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-02.js create mode 100644 js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-03.js create mode 100644 js/src/jit-test/tests/debug/wasm-01.js create mode 100644 js/src/jit-test/tests/debug/wasm-02.js create mode 100644 js/src/jit-test/tests/debug/wasm-03.js create mode 100644 js/src/jit-test/tests/debug/wasm-04.js create mode 100644 js/src/jit-test/tests/debug/wasm-06-onEnterFrame-null.js create mode 100644 js/src/jit-test/tests/debug/wasm-06-onPop-null.js create mode 100644 js/src/jit-test/tests/debug/wasm-06.js create mode 100644 js/src/jit-test/tests/debug/wasm-07.js create mode 100644 js/src/jit-test/tests/debug/wasm-08.js create mode 100644 js/src/jit-test/tests/debug/wasm-09.js create mode 100644 js/src/jit-test/tests/debug/wasm-10.js create mode 100644 js/src/jit-test/tests/debug/wasm-11.js create mode 100644 js/src/jit-test/tests/debug/wasm-12.js create mode 100644 js/src/jit-test/tests/debug/wasm-13.js create mode 100644 js/src/jit-test/tests/debug/wasm-14.js create mode 100644 js/src/jit-test/tests/debug/wasm-15.js create mode 100644 js/src/jit-test/tests/debug/wasm-binary-sources.js create mode 100644 js/src/jit-test/tests/debug/wasm-breakpoint.js create mode 100644 js/src/jit-test/tests/debug/wasm-get-return.js create mode 100644 js/src/jit-test/tests/debug/wasm-getAllColumnOffsets.js create mode 100644 js/src/jit-test/tests/debug/wasm-jseval.js create mode 100644 js/src/jit-test/tests/debug/wasm-onExceptionUnwind-gc.js create mode 100644 js/src/jit-test/tests/debug/wasm-responseurls.js create mode 100644 js/src/jit-test/tests/debug/wasm-sourceMappingURL.js create mode 100644 js/src/jit-test/tests/debug/wasm-step.js create mode 100644 js/src/jit-test/tests/decorators/accessor-decorators.js create mode 100644 js/src/jit-test/tests/decorators/accessors.js create mode 100644 js/src/jit-test/tests/decorators/addInitializer.js create mode 100644 js/src/jit-test/tests/decorators/class-decorators.js create mode 100644 js/src/jit-test/tests/decorators/decorator-this.js create mode 100644 js/src/jit-test/tests/decorators/field-decorators.js create mode 100644 js/src/jit-test/tests/decorators/getter-setter-decorators.js create mode 100644 js/src/jit-test/tests/decorators/method-decorators.js create mode 100644 js/src/jit-test/tests/decorators/syntax.js create mode 100644 js/src/jit-test/tests/environments/bug1671563-strict.js create mode 100644 js/src/jit-test/tests/environments/bug1671563.js create mode 100644 js/src/jit-test/tests/environments/bug1671762.js create mode 100644 js/src/jit-test/tests/environments/bug1710089.js create mode 100644 js/src/jit-test/tests/environments/delete-global-var.js create mode 100644 js/src/jit-test/tests/environments/evaluate_envChainObject.js create mode 100644 js/src/jit-test/tests/environments/lexical-shadows-global-var.js create mode 100644 js/src/jit-test/tests/environments/replace-global-var-with-getter.js create mode 100644 js/src/jit-test/tests/environments/strict-eval-bindings.js create mode 100644 js/src/jit-test/tests/errors/bug1745907.js create mode 100644 js/src/jit-test/tests/errors/bug1802100.js create mode 100644 js/src/jit-test/tests/errors/bug1810711.js create mode 100644 js/src/jit-test/tests/errors/bug1837366.js create mode 100644 js/src/jit-test/tests/errors/error-report.js create mode 100644 js/src/jit-test/tests/errors/error-sourceURL-disable.js create mode 100644 js/src/jit-test/tests/errors/overrecursed-double-fault-1.js create mode 100644 js/src/jit-test/tests/fields/access.js create mode 100644 js/src/jit-test/tests/fields/basic.js create mode 100644 js/src/jit-test/tests/fields/bug1540787.js create mode 100644 js/src/jit-test/tests/fields/bug1540789.js create mode 100644 js/src/jit-test/tests/fields/bug1540798.js create mode 100644 js/src/jit-test/tests/fields/bug1547129.js create mode 100644 js/src/jit-test/tests/fields/bug1547130.js create mode 100644 js/src/jit-test/tests/fields/bug1547133.js create mode 100644 js/src/jit-test/tests/fields/bug1547136.js create mode 100644 js/src/jit-test/tests/fields/bug1547467.js create mode 100644 js/src/jit-test/tests/fields/bug1547915.js create mode 100644 js/src/jit-test/tests/fields/bug1551454.js create mode 100644 js/src/jit-test/tests/fields/bug1551454_2.js create mode 100644 js/src/jit-test/tests/fields/bug1552022.js create mode 100644 js/src/jit-test/tests/fields/bug1552229.js create mode 100644 js/src/jit-test/tests/fields/bug1552875.js create mode 100644 js/src/jit-test/tests/fields/bug1555979.js create mode 100644 js/src/jit-test/tests/fields/bug1562146.js create mode 100644 js/src/jit-test/tests/fields/bug1571289.js create mode 100644 js/src/jit-test/tests/fields/bug1664550.js create mode 100644 js/src/jit-test/tests/fields/bug1683784.js create mode 100644 js/src/jit-test/tests/fields/bug1702420.js create mode 100644 js/src/jit-test/tests/fields/bug1702423.js create mode 100644 js/src/jit-test/tests/fields/bug1702424.js create mode 100644 js/src/jit-test/tests/fields/bug1703782.js create mode 100644 js/src/jit-test/tests/fields/bug1706923.js create mode 100644 js/src/jit-test/tests/fields/ergonomic-1.js create mode 100644 js/src/jit-test/tests/fields/error.js create mode 100644 js/src/jit-test/tests/fields/field-initializer-position.js create mode 100644 js/src/jit-test/tests/fields/field_types.js create mode 100644 js/src/jit-test/tests/fields/initprop.js create mode 100644 js/src/jit-test/tests/fields/ion-private-idempotent.js create mode 100644 js/src/jit-test/tests/fields/literal.js create mode 100644 js/src/jit-test/tests/fields/mixed_methods.js create mode 100644 js/src/jit-test/tests/fields/multi-line-name.js create mode 100644 js/src/jit-test/tests/fields/private-error-location.js create mode 100644 js/src/jit-test/tests/fields/private-eval-in-frame.js create mode 100644 js/src/jit-test/tests/fields/private-field-basics.js create mode 100644 js/src/jit-test/tests/fields/private-field-destructuring.js create mode 100644 js/src/jit-test/tests/fields/private-field-details.js create mode 100644 js/src/jit-test/tests/fields/private-field-error-messages.js create mode 100644 js/src/jit-test/tests/fields/private-field-symbol-debugger-access.js create mode 100644 js/src/jit-test/tests/fields/private-method-static.js create mode 100644 js/src/jit-test/tests/fields/private-proxy-oom.js create mode 100644 js/src/jit-test/tests/fields/private-reflect-01.js create mode 100644 js/src/jit-test/tests/fields/private-right-side-1.js create mode 100644 js/src/jit-test/tests/fields/private-right-side-2.js create mode 100644 js/src/jit-test/tests/fields/private-throwing-initializer.js create mode 100644 js/src/jit-test/tests/fields/quirks.js create mode 100644 js/src/jit-test/tests/fields/super.js create mode 100644 js/src/jit-test/tests/fields/superproperty.js create mode 100644 js/src/jit-test/tests/fields/transplant.js create mode 100644 js/src/jit-test/tests/for-of/arguments-1.js create mode 100644 js/src/jit-test/tests/for-of/arguments-2.js create mode 100644 js/src/jit-test/tests/for-of/arguments-3.js create mode 100644 js/src/jit-test/tests/for-of/arguments-4.js create mode 100644 js/src/jit-test/tests/for-of/arguments-5.js create mode 100644 js/src/jit-test/tests/for-of/arguments-6.js create mode 100644 js/src/jit-test/tests/for-of/arguments-7.js create mode 100644 js/src/jit-test/tests/for-of/array-holes-1.js create mode 100644 js/src/jit-test/tests/for-of/array-holes-2.js create mode 100644 js/src/jit-test/tests/for-of/array-holes-3.js create mode 100644 js/src/jit-test/tests/for-of/array-holes-4.js create mode 100644 js/src/jit-test/tests/for-of/array-holes-5.js create mode 100644 js/src/jit-test/tests/for-of/array-holes-6.js create mode 100644 js/src/jit-test/tests/for-of/array-holes-slow.js create mode 100644 js/src/jit-test/tests/for-of/array-iterator-changing.js create mode 100644 js/src/jit-test/tests/for-of/array-iterator-empty.js create mode 100644 js/src/jit-test/tests/for-of/array-iterator-generic.js create mode 100644 js/src/jit-test/tests/for-of/array-iterator-growing-1.js create mode 100644 js/src/jit-test/tests/for-of/array-iterator-keys-entries.js create mode 100644 js/src/jit-test/tests/for-of/array-iterator-null.js create mode 100644 js/src/jit-test/tests/for-of/array-iterator-proxy.js create mode 100644 js/src/jit-test/tests/for-of/array-iterator-shrinking.js create mode 100644 js/src/jit-test/tests/for-of/array-iterator-surfaces-1.js create mode 100644 js/src/jit-test/tests/for-of/array-iterator-surfaces-2.js create mode 100644 js/src/jit-test/tests/for-of/array-jit.js create mode 100644 js/src/jit-test/tests/for-of/array-prototype.js create mode 100644 js/src/jit-test/tests/for-of/arrays-1.js create mode 100644 js/src/jit-test/tests/for-of/arrays-2.js create mode 100644 js/src/jit-test/tests/for-of/arrays-3.js create mode 100644 js/src/jit-test/tests/for-of/arrays-4.js create mode 100644 js/src/jit-test/tests/for-of/arrays-5.js create mode 100644 js/src/jit-test/tests/for-of/arrays-growing-1.js create mode 100644 js/src/jit-test/tests/for-of/arrays-growing-2.js create mode 100644 js/src/jit-test/tests/for-of/arrays-shrinking-1.js create mode 100644 js/src/jit-test/tests/for-of/arrays-shrinking-2.js create mode 100644 js/src/jit-test/tests/for-of/arrays-slow-1.js create mode 100644 js/src/jit-test/tests/for-of/arrays-slow-2.js create mode 100644 js/src/jit-test/tests/for-of/arrays-slow-3.js create mode 100644 js/src/jit-test/tests/for-of/arrays-slow-4.js create mode 100644 js/src/jit-test/tests/for-of/arrays-slow-5.js create mode 100644 js/src/jit-test/tests/for-of/break-1.js create mode 100644 js/src/jit-test/tests/for-of/break-2.js create mode 100644 js/src/jit-test/tests/for-of/break-3.js create mode 100644 js/src/jit-test/tests/for-of/bug-1331444.js create mode 100644 js/src/jit-test/tests/for-of/bug-1341339.js create mode 100644 js/src/jit-test/tests/for-of/bug-728079-js17-1.js create mode 100644 js/src/jit-test/tests/for-of/bug-728079-js17-4.js create mode 100644 js/src/jit-test/tests/for-of/bug1519700.js create mode 100644 js/src/jit-test/tests/for-of/bug1773496.js create mode 100644 js/src/jit-test/tests/for-of/completion.js create mode 100644 js/src/jit-test/tests/for-of/decompiler.js create mode 100644 js/src/jit-test/tests/for-of/generators-1.js create mode 100644 js/src/jit-test/tests/for-of/generators-2.js create mode 100644 js/src/jit-test/tests/for-of/generators-3.js create mode 100644 js/src/jit-test/tests/for-of/generators-5.js create mode 100644 js/src/jit-test/tests/for-of/iterclose-dynamic-slot-throw.js create mode 100644 js/src/jit-test/tests/for-of/iterclose-dynamic-slot.js create mode 100644 js/src/jit-test/tests/for-of/iterclose-extra-args-throw.js create mode 100644 js/src/jit-test/tests/for-of/iterclose-extra-args.js create mode 100644 js/src/jit-test/tests/for-of/iterclose-generator-throw.js create mode 100644 js/src/jit-test/tests/for-of/iterclose-generator.js create mode 100644 js/src/jit-test/tests/for-of/iterclose-invalid-return-throw.js create mode 100644 js/src/jit-test/tests/for-of/iterclose-invalid-return.js create mode 100644 js/src/jit-test/tests/for-of/iterclose-invalidate-with-catch.js create mode 100644 js/src/jit-test/tests/for-of/iterclose-invalidate-with-finally.js create mode 100644 js/src/jit-test/tests/for-of/iterclose-invalidate.js create mode 100644 js/src/jit-test/tests/for-of/manual-advance.js create mode 100644 js/src/jit-test/tests/for-of/next-3.js create mode 100644 js/src/jit-test/tests/for-of/next-arity.js create mode 100644 js/src/jit-test/tests/for-of/next-shenanigans.js create mode 100644 js/src/jit-test/tests/for-of/non-iterable.js create mode 100644 js/src/jit-test/tests/for-of/proxy-1.js create mode 100644 js/src/jit-test/tests/for-of/proxy-2.js create mode 100644 js/src/jit-test/tests/for-of/proxy-3.js create mode 100644 js/src/jit-test/tests/for-of/return.js create mode 100644 js/src/jit-test/tests/for-of/semantics-01.js create mode 100644 js/src/jit-test/tests/for-of/semantics-02.js create mode 100644 js/src/jit-test/tests/for-of/semantics-03.js create mode 100644 js/src/jit-test/tests/for-of/semantics-04.js create mode 100644 js/src/jit-test/tests/for-of/semantics-05.js create mode 100644 js/src/jit-test/tests/for-of/semantics-06.js create mode 100644 js/src/jit-test/tests/for-of/semantics-07.js create mode 100644 js/src/jit-test/tests/for-of/semantics-08.js create mode 100644 js/src/jit-test/tests/for-of/semantics-09.js create mode 100644 js/src/jit-test/tests/for-of/semantics-10.js create mode 100644 js/src/jit-test/tests/for-of/semantics-11.js create mode 100644 js/src/jit-test/tests/for-of/string-iterator-generic.js create mode 100644 js/src/jit-test/tests/for-of/string-iterator-surfaces.js create mode 100644 js/src/jit-test/tests/for-of/strings.js create mode 100644 js/src/jit-test/tests/for-of/syntax-1.js create mode 100644 js/src/jit-test/tests/for-of/syntax-2.js create mode 100644 js/src/jit-test/tests/for-of/syntax-3.js create mode 100644 js/src/jit-test/tests/for-of/syntax-4.js create mode 100644 js/src/jit-test/tests/for-of/throw-during-break.js create mode 100644 js/src/jit-test/tests/for-of/throw-during-nested-break.js create mode 100644 js/src/jit-test/tests/for-of/throw.js create mode 100644 js/src/jit-test/tests/for-of/typedarrays-1.js create mode 100644 js/src/jit-test/tests/for-of/typedarrays-2.js create mode 100644 js/src/jit-test/tests/for-of/typedarrays-3.js create mode 100644 js/src/jit-test/tests/for-of/typedarrays-4.js create mode 100644 js/src/jit-test/tests/for-of/typedarrays-5.js create mode 100644 js/src/jit-test/tests/for-of/typedarrays-6.js create mode 100644 js/src/jit-test/tests/for-of/value-done-access.js create mode 100644 js/src/jit-test/tests/for-of/wrapper-1.js create mode 100644 js/src/jit-test/tests/function/bug-1751660.js create mode 100644 js/src/jit-test/tests/function/function-displayName-computed.js create mode 100644 js/src/jit-test/tests/function/function-toString-discard-source-name.js create mode 100644 js/src/jit-test/tests/function/function-toString-discard-source.js create mode 100644 js/src/jit-test/tests/function/function-toString-lazy-name.js create mode 100644 js/src/jit-test/tests/fuses/cross-realm.js create mode 100644 js/src/jit-test/tests/fuses/htmldda-1.js create mode 100644 js/src/jit-test/tests/fuses/popped-getiter.js create mode 100644 js/src/jit-test/tests/gc/bug-1004457.js create mode 100644 js/src/jit-test/tests/gc/bug-1016016.js create mode 100644 js/src/jit-test/tests/gc/bug-1017141.js create mode 100644 js/src/jit-test/tests/gc/bug-1028863.js create mode 100644 js/src/jit-test/tests/gc/bug-1032206.js create mode 100644 js/src/jit-test/tests/gc/bug-1035371.js create mode 100644 js/src/jit-test/tests/gc/bug-1039516.js create mode 100644 js/src/jit-test/tests/gc/bug-1053676.js create mode 100644 js/src/jit-test/tests/gc/bug-1055219.js create mode 100644 js/src/jit-test/tests/gc/bug-1070638.js create mode 100644 js/src/jit-test/tests/gc/bug-1075546.js create mode 100644 js/src/jit-test/tests/gc/bug-1104162.js create mode 100644 js/src/jit-test/tests/gc/bug-1108007.js create mode 100644 js/src/jit-test/tests/gc/bug-1108836.js create mode 100644 js/src/jit-test/tests/gc/bug-1109913.js create mode 100644 js/src/jit-test/tests/gc/bug-1109922.js create mode 100644 js/src/jit-test/tests/gc/bug-1123648.js create mode 100644 js/src/jit-test/tests/gc/bug-1124563.js create mode 100644 js/src/jit-test/tests/gc/bug-1124653.js create mode 100644 js/src/jit-test/tests/gc/bug-1136597.js create mode 100644 js/src/jit-test/tests/gc/bug-1137341.js create mode 100644 js/src/jit-test/tests/gc/bug-1143706.js create mode 100644 js/src/jit-test/tests/gc/bug-1144738.js create mode 100644 js/src/jit-test/tests/gc/bug-1146696.js create mode 100644 js/src/jit-test/tests/gc/bug-1148383.js create mode 100644 js/src/jit-test/tests/gc/bug-1155455.js create mode 100644 js/src/jit-test/tests/gc/bug-1157577.js create mode 100644 js/src/jit-test/tests/gc/bug-1161303.js create mode 100644 js/src/jit-test/tests/gc/bug-1161968.js create mode 100644 js/src/jit-test/tests/gc/bug-1165966.js create mode 100644 js/src/jit-test/tests/gc/bug-1171909.js create mode 100644 js/src/jit-test/tests/gc/bug-1175755.js create mode 100644 js/src/jit-test/tests/gc/bug-1177778.js create mode 100644 js/src/jit-test/tests/gc/bug-1191576.js create mode 100644 js/src/jit-test/tests/gc/bug-1206677.js create mode 100644 js/src/jit-test/tests/gc/bug-1208994.js create mode 100644 js/src/jit-test/tests/gc/bug-1209001.js create mode 100644 js/src/jit-test/tests/gc/bug-1210607.js create mode 100644 js/src/jit-test/tests/gc/bug-1214006.js create mode 100644 js/src/jit-test/tests/gc/bug-1214781.js create mode 100644 js/src/jit-test/tests/gc/bug-1214846.js create mode 100644 js/src/jit-test/tests/gc/bug-1215363-1.js create mode 100644 js/src/jit-test/tests/gc/bug-1215363-2.js create mode 100644 js/src/jit-test/tests/gc/bug-1215363-3.js create mode 100644 js/src/jit-test/tests/gc/bug-1215678.js create mode 100644 js/src/jit-test/tests/gc/bug-1216607.js create mode 100644 js/src/jit-test/tests/gc/bug-1218900-2.js create mode 100644 js/src/jit-test/tests/gc/bug-1218900.js create mode 100644 js/src/jit-test/tests/gc/bug-1221359.js create mode 100644 js/src/jit-test/tests/gc/bug-1221747.js create mode 100644 js/src/jit-test/tests/gc/bug-1223021.js create mode 100644 js/src/jit-test/tests/gc/bug-1224710.js create mode 100644 js/src/jit-test/tests/gc/bug-1226896.js create mode 100644 js/src/jit-test/tests/gc/bug-1231386.js create mode 100644 js/src/jit-test/tests/gc/bug-1232386.js create mode 100644 js/src/jit-test/tests/gc/bug-1234410.js create mode 100644 js/src/jit-test/tests/gc/bug-1236473.js create mode 100644 js/src/jit-test/tests/gc/bug-1237153.js create mode 100644 js/src/jit-test/tests/gc/bug-1238548.js create mode 100644 js/src/jit-test/tests/gc/bug-1238555.js create mode 100644 js/src/jit-test/tests/gc/bug-1238575-2.js create mode 100644 js/src/jit-test/tests/gc/bug-1238575.js create mode 100644 js/src/jit-test/tests/gc/bug-1238582.js create mode 100644 js/src/jit-test/tests/gc/bug-1240503.js create mode 100644 js/src/jit-test/tests/gc/bug-1240527.js create mode 100644 js/src/jit-test/tests/gc/bug-1241731.js create mode 100644 js/src/jit-test/tests/gc/bug-1242812.js create mode 100644 js/src/jit-test/tests/gc/bug-1245520.js create mode 100644 js/src/jit-test/tests/gc/bug-1246593.js create mode 100644 js/src/jit-test/tests/gc/bug-1252329.js create mode 100644 js/src/jit-test/tests/gc/bug-1253124.js create mode 100644 js/src/jit-test/tests/gc/bug-1254108.js create mode 100644 js/src/jit-test/tests/gc/bug-1258407.js create mode 100644 js/src/jit-test/tests/gc/bug-1259306.js create mode 100644 js/src/jit-test/tests/gc/bug-1259490.js create mode 100644 js/src/jit-test/tests/gc/bug-1261329.js create mode 100644 js/src/jit-test/tests/gc/bug-1263862.js create mode 100644 js/src/jit-test/tests/gc/bug-1263871.js create mode 100644 js/src/jit-test/tests/gc/bug-1263884.js create mode 100644 js/src/jit-test/tests/gc/bug-1271110.js create mode 100644 js/src/jit-test/tests/gc/bug-1276631.js create mode 100644 js/src/jit-test/tests/gc/bug-1278832.js create mode 100644 js/src/jit-test/tests/gc/bug-1280588.js create mode 100644 js/src/jit-test/tests/gc/bug-1280889.js create mode 100644 js/src/jit-test/tests/gc/bug-1282986.js create mode 100644 js/src/jit-test/tests/gc/bug-1286244.js create mode 100644 js/src/jit-test/tests/gc/bug-1287399.js create mode 100644 js/src/jit-test/tests/gc/bug-1287869.js create mode 100644 js/src/jit-test/tests/gc/bug-1292564.js create mode 100644 js/src/jit-test/tests/gc/bug-1293127.js create mode 100644 js/src/jit-test/tests/gc/bug-1294241.js create mode 100644 js/src/jit-test/tests/gc/bug-1298356.js create mode 100644 js/src/jit-test/tests/gc/bug-1301377.js create mode 100644 js/src/jit-test/tests/gc/bug-1301496.js create mode 100644 js/src/jit-test/tests/gc/bug-1303015.js create mode 100644 js/src/jit-test/tests/gc/bug-1305220.js create mode 100644 js/src/jit-test/tests/gc/bug-1308048.js create mode 100644 js/src/jit-test/tests/gc/bug-1310589.js create mode 100644 js/src/jit-test/tests/gc/bug-1311060.js create mode 100644 js/src/jit-test/tests/gc/bug-1313347.js create mode 100644 js/src/jit-test/tests/gc/bug-1315946.js create mode 100644 js/src/jit-test/tests/gc/bug-1321597.js create mode 100644 js/src/jit-test/tests/gc/bug-1322420.js create mode 100644 js/src/jit-test/tests/gc/bug-1322648.js create mode 100644 js/src/jit-test/tests/gc/bug-1323868.js create mode 100644 js/src/jit-test/tests/gc/bug-1324512.js create mode 100644 js/src/jit-test/tests/gc/bug-1325551.js create mode 100644 js/src/jit-test/tests/gc/bug-1328251.js create mode 100644 js/src/jit-test/tests/gc/bug-1332773.js create mode 100644 js/src/jit-test/tests/gc/bug-1337414.js create mode 100644 js/src/jit-test/tests/gc/bug-1338383.js create mode 100644 js/src/jit-test/tests/gc/bug-1340010.js create mode 100644 js/src/jit-test/tests/gc/bug-1342261.js create mode 100644 js/src/jit-test/tests/gc/bug-1354480.js create mode 100644 js/src/jit-test/tests/gc/bug-1357022.js create mode 100644 js/src/jit-test/tests/gc/bug-1359252.js create mode 100644 js/src/jit-test/tests/gc/bug-1370069.js create mode 100644 js/src/jit-test/tests/gc/bug-1371908.js create mode 100644 js/src/jit-test/tests/gc/bug-1374797.js create mode 100644 js/src/jit-test/tests/gc/bug-1382431.js create mode 100644 js/src/jit-test/tests/gc/bug-1384047.js create mode 100644 js/src/jit-test/tests/gc/bug-1388701.js create mode 100644 js/src/jit-test/tests/gc/bug-1390087.js create mode 100644 js/src/jit-test/tests/gc/bug-1399889.js create mode 100644 js/src/jit-test/tests/gc/bug-1401141.js create mode 100644 js/src/jit-test/tests/gc/bug-1411302.js create mode 100644 js/src/jit-test/tests/gc/bug-1413914.js create mode 100644 js/src/jit-test/tests/gc/bug-1430752.js create mode 100644 js/src/jit-test/tests/gc/bug-1435295.js create mode 100644 js/src/jit-test/tests/gc/bug-1435321.js create mode 100644 js/src/jit-test/tests/gc/bug-1439284.js create mode 100644 js/src/jit-test/tests/gc/bug-1449887.js create mode 100644 js/src/jit-test/tests/gc/bug-1456508.js create mode 100644 js/src/jit-test/tests/gc/bug-1456536.js create mode 100644 js/src/jit-test/tests/gc/bug-1459568.js create mode 100644 js/src/jit-test/tests/gc/bug-1459860.js create mode 100644 js/src/jit-test/tests/gc/bug-1461319.js create mode 100644 js/src/jit-test/tests/gc/bug-1461448.js create mode 100644 js/src/jit-test/tests/gc/bug-1462337.js create mode 100644 js/src/jit-test/tests/gc/bug-1464872.js create mode 100644 js/src/jit-test/tests/gc/bug-1468792.js create mode 100644 js/src/jit-test/tests/gc/bug-1472734.js create mode 100644 js/src/jit-test/tests/gc/bug-1478943.js create mode 100644 js/src/jit-test/tests/gc/bug-1490042.js create mode 100644 js/src/jit-test/tests/gc/bug-1491326.js create mode 100644 js/src/jit-test/tests/gc/bug-1498177.js create mode 100644 js/src/jit-test/tests/gc/bug-1505622.js create mode 100644 js/src/jit-test/tests/gc/bug-1513991.js create mode 100644 js/src/jit-test/tests/gc/bug-1514927.js create mode 100644 js/src/jit-test/tests/gc/bug-1515993.js create mode 100644 js/src/jit-test/tests/gc/bug-1517158.js create mode 100644 js/src/jit-test/tests/gc/bug-1520778.js create mode 100644 js/src/jit-test/tests/gc/bug-1530643.js create mode 100644 js/src/jit-test/tests/gc/bug-1531018.js create mode 100644 js/src/jit-test/tests/gc/bug-1531626.js create mode 100644 js/src/jit-test/tests/gc/bug-1532376.js create mode 100644 js/src/jit-test/tests/gc/bug-1540670.js create mode 100644 js/src/jit-test/tests/gc/bug-1542279.js create mode 100644 js/src/jit-test/tests/gc/bug-1542982.js create mode 100644 js/src/jit-test/tests/gc/bug-1543014.js create mode 100644 js/src/jit-test/tests/gc/bug-1543589.js create mode 100644 js/src/jit-test/tests/gc/bug-1556155.js create mode 100644 js/src/jit-test/tests/gc/bug-1557928.js create mode 100644 js/src/jit-test/tests/gc/bug-1565272.js create mode 100644 js/src/jit-test/tests/gc/bug-1568119.js create mode 100644 js/src/jit-test/tests/gc/bug-1568740.js create mode 100644 js/src/jit-test/tests/gc/bug-1569840.js create mode 100644 js/src/jit-test/tests/gc/bug-1571439.js create mode 100644 js/src/jit-test/tests/gc/bug-1573458.js create mode 100644 js/src/jit-test/tests/gc/bug-1574877.js create mode 100644 js/src/jit-test/tests/gc/bug-1578462.js create mode 100644 js/src/jit-test/tests/gc/bug-1579025.js create mode 100644 js/src/jit-test/tests/gc/bug-1585159.js create mode 100644 js/src/jit-test/tests/gc/bug-1590176.js create mode 100644 js/src/jit-test/tests/gc/bug-1590904.js create mode 100644 js/src/jit-test/tests/gc/bug-1592487.js create mode 100644 js/src/jit-test/tests/gc/bug-1593975.js create mode 100644 js/src/jit-test/tests/gc/bug-1597970.js create mode 100644 js/src/jit-test/tests/gc/bug-1600238.js create mode 100644 js/src/jit-test/tests/gc/bug-1602741.js create mode 100644 js/src/jit-test/tests/gc/bug-1603330.js create mode 100644 js/src/jit-test/tests/gc/bug-1603917.js create mode 100644 js/src/jit-test/tests/gc/bug-1605348.js create mode 100644 js/src/jit-test/tests/gc/bug-1605633.js create mode 100644 js/src/jit-test/tests/gc/bug-1607495.js create mode 100644 js/src/jit-test/tests/gc/bug-1607665.js create mode 100644 js/src/jit-test/tests/gc/bug-1607687.js create mode 100644 js/src/jit-test/tests/gc/bug-1608355.js create mode 100644 js/src/jit-test/tests/gc/bug-1610621.js create mode 100644 js/src/jit-test/tests/gc/bug-1620195.js create mode 100644 js/src/jit-test/tests/gc/bug-1620196.js create mode 100644 js/src/jit-test/tests/gc/bug-1620209.js create mode 100644 js/src/jit-test/tests/gc/bug-1620213.js create mode 100644 js/src/jit-test/tests/gc/bug-1620221.js create mode 100644 js/src/jit-test/tests/gc/bug-1628440.js create mode 100644 js/src/jit-test/tests/gc/bug-1643913.js create mode 100644 js/src/jit-test/tests/gc/bug-1644985-2.js create mode 100644 js/src/jit-test/tests/gc/bug-1644985.js create mode 100644 js/src/jit-test/tests/gc/bug-1647747-debugger-weakmark.js create mode 100644 js/src/jit-test/tests/gc/bug-1648901.js create mode 100644 js/src/jit-test/tests/gc/bug-1651345.js create mode 100644 js/src/jit-test/tests/gc/bug-1652425.js create mode 100644 js/src/jit-test/tests/gc/bug-1652492.js create mode 100644 js/src/jit-test/tests/gc/bug-1654186.js create mode 100644 js/src/jit-test/tests/gc/bug-1655917.js create mode 100644 js/src/jit-test/tests/gc/bug-1657554.js create mode 100644 js/src/jit-test/tests/gc/bug-1660293.js create mode 100644 js/src/jit-test/tests/gc/bug-1667336.js create mode 100644 js/src/jit-test/tests/gc/bug-1671125.js create mode 100644 js/src/jit-test/tests/gc/bug-1688749.js create mode 100644 js/src/jit-test/tests/gc/bug-1689039.js create mode 100644 js/src/jit-test/tests/gc/bug-1689794.js create mode 100644 js/src/jit-test/tests/gc/bug-1691901.js create mode 100644 js/src/jit-test/tests/gc/bug-1692221.js create mode 100644 js/src/jit-test/tests/gc/bug-1695861.js create mode 100644 js/src/jit-test/tests/gc/bug-1696880.js create mode 100644 js/src/jit-test/tests/gc/bug-1696886.js create mode 100644 js/src/jit-test/tests/gc/bug-1698543.js create mode 100644 js/src/jit-test/tests/gc/bug-1699364.js create mode 100644 js/src/jit-test/tests/gc/bug-1714530.js create mode 100644 js/src/jit-test/tests/gc/bug-1723840.js create mode 100644 js/src/jit-test/tests/gc/bug-1723841.js create mode 100644 js/src/jit-test/tests/gc/bug-1736310.js create mode 100644 js/src/jit-test/tests/gc/bug-1739972.js create mode 100644 js/src/jit-test/tests/gc/bug-1744979.js create mode 100644 js/src/jit-test/tests/gc/bug-1749298.js create mode 100644 js/src/jit-test/tests/gc/bug-1755257.js create mode 100644 js/src/jit-test/tests/gc/bug-1755874.js create mode 100644 js/src/jit-test/tests/gc/bug-1756590.js create mode 100644 js/src/jit-test/tests/gc/bug-1757573.js create mode 100644 js/src/jit-test/tests/gc/bug-1762771.js create mode 100644 js/src/jit-test/tests/gc/bug-1766648-markQueue.js create mode 100644 js/src/jit-test/tests/gc/bug-1766656.js create mode 100644 js/src/jit-test/tests/gc/bug-1768813.js create mode 100644 js/src/jit-test/tests/gc/bug-1770266.js create mode 100644 js/src/jit-test/tests/gc/bug-1779833.js create mode 100644 js/src/jit-test/tests/gc/bug-1787351.js create mode 100644 js/src/jit-test/tests/gc/bug-1791363.js create mode 100644 js/src/jit-test/tests/gc/bug-1791975.js create mode 100644 js/src/jit-test/tests/gc/bug-1792338.js create mode 100644 js/src/jit-test/tests/gc/bug-1796901.js create mode 100644 js/src/jit-test/tests/gc/bug-1799678.js create mode 100644 js/src/jit-test/tests/gc/bug-1802308.js create mode 100644 js/src/jit-test/tests/gc/bug-1802478.js create mode 100644 js/src/jit-test/tests/gc/bug-1803233.js create mode 100644 js/src/jit-test/tests/gc/bug-1804629-2.js create mode 100644 js/src/jit-test/tests/gc/bug-1804629.js create mode 100644 js/src/jit-test/tests/gc/bug-1804637.js create mode 100644 js/src/jit-test/tests/gc/bug-1806976.js create mode 100644 js/src/jit-test/tests/gc/bug-1817598.js create mode 100644 js/src/jit-test/tests/gc/bug-1820543.js create mode 100644 js/src/jit-test/tests/gc/bug-1822995.js create mode 100644 js/src/jit-test/tests/gc/bug-1825671.js create mode 100644 js/src/jit-test/tests/gc/bug-1825936.js create mode 100644 js/src/jit-test/tests/gc/bug-1828396.js create mode 100644 js/src/jit-test/tests/gc/bug-1830921.js create mode 100644 js/src/jit-test/tests/gc/bug-1834711.js create mode 100644 js/src/jit-test/tests/gc/bug-1838154.js create mode 100644 js/src/jit-test/tests/gc/bug-1839062.js create mode 100644 js/src/jit-test/tests/gc/bug-1845248.js create mode 100644 js/src/jit-test/tests/gc/bug-1851619.js create mode 100644 js/src/jit-test/tests/gc/bug-1852063.js create mode 100644 js/src/jit-test/tests/gc/bug-1852729.js create mode 100644 js/src/jit-test/tests/gc/bug-1856739.js create mode 100644 js/src/jit-test/tests/gc/bug-1865597.js create mode 100644 js/src/jit-test/tests/gc/bug-1867453.js create mode 100644 js/src/jit-test/tests/gc/bug-1871186.js create mode 100644 js/src/jit-test/tests/gc/bug-1872524.js create mode 100644 js/src/jit-test/tests/gc/bug-1877406.js create mode 100644 js/src/jit-test/tests/gc/bug-1880444.js create mode 100644 js/src/jit-test/tests/gc/bug-787703.js create mode 100644 js/src/jit-test/tests/gc/bug-820186.js create mode 100644 js/src/jit-test/tests/gc/bug-821551.js create mode 100644 js/src/jit-test/tests/gc/bug-824321.js create mode 100644 js/src/jit-test/tests/gc/bug-825326.js create mode 100644 js/src/jit-test/tests/gc/bug-832103.js create mode 100644 js/src/jit-test/tests/gc/bug-880816.js create mode 100644 js/src/jit-test/tests/gc/bug-880886.js create mode 100644 js/src/jit-test/tests/gc/bug-886551-1.js create mode 100644 js/src/jit-test/tests/gc/bug-886551-2.js create mode 100644 js/src/jit-test/tests/gc/bug-886560.js create mode 100644 js/src/jit-test/tests/gc/bug-886630.js create mode 100644 js/src/jit-test/tests/gc/bug-889682-1.js create mode 100644 js/src/jit-test/tests/gc/bug-889682-2.js create mode 100644 js/src/jit-test/tests/gc/bug-889682-3.js create mode 100644 js/src/jit-test/tests/gc/bug-891773.js create mode 100644 js/src/jit-test/tests/gc/bug-906236.js create mode 100644 js/src/jit-test/tests/gc/bug-906241.js create mode 100644 js/src/jit-test/tests/gc/bug-912813.js create mode 100644 js/src/jit-test/tests/gc/bug-913224.js create mode 100644 js/src/jit-test/tests/gc/bug-913715.js create mode 100644 js/src/jit-test/tests/gc/bug-919536.js create mode 100644 js/src/jit-test/tests/gc/bug-924690.js create mode 100644 js/src/jit-test/tests/gc/bug-935022.js create mode 100644 js/src/jit-test/tests/gc/bug-939499.js create mode 100644 js/src/jit-test/tests/gc/bug-945275.js create mode 100644 js/src/jit-test/tests/gc/bug-945280.js create mode 100644 js/src/jit-test/tests/gc/bug-945285.js create mode 100644 js/src/jit-test/tests/gc/bug-950927.js create mode 100644 js/src/jit-test/tests/gc/bug-952819.js create mode 100644 js/src/jit-test/tests/gc/bug-956324.js create mode 100644 js/src/jit-test/tests/gc/bug-957110.js create mode 100644 js/src/jit-test/tests/gc/bug-957114.js create mode 100644 js/src/jit-test/tests/gc/bug-961741.js create mode 100644 js/src/jit-test/tests/gc/bug-961877.js create mode 100644 js/src/jit-test/tests/gc/bug-969012.js create mode 100644 js/src/jit-test/tests/gc/bug-978353.js create mode 100644 js/src/jit-test/tests/gc/bug-978802.js create mode 100644 js/src/jit-test/tests/gc/bug-981289.js create mode 100644 js/src/jit-test/tests/gc/bug-981295.js create mode 100644 js/src/jit-test/tests/gc/bug-985732.js create mode 100644 js/src/jit-test/tests/gc/bug-993768.js create mode 100644 js/src/jit-test/tests/gc/bug1116306.js create mode 100644 js/src/jit-test/tests/gc/bug1146213.js create mode 100644 js/src/jit-test/tests/gc/bug1191756.js create mode 100644 js/src/jit-test/tests/gc/bug1246607.js create mode 100644 js/src/jit-test/tests/gc/bug1282113.js create mode 100644 js/src/jit-test/tests/gc/bug1283169.js create mode 100644 js/src/jit-test/tests/gc/bug1285186.js create mode 100644 js/src/jit-test/tests/gc/bug1285490.js create mode 100644 js/src/jit-test/tests/gc/bug1287063.js create mode 100644 js/src/jit-test/tests/gc/bug1326343-gcstats.js create mode 100644 js/src/jit-test/tests/gc/bug1335642.js create mode 100644 js/src/jit-test/tests/gc/bug1335643.js create mode 100644 js/src/jit-test/tests/gc/bug1336866.js create mode 100644 js/src/jit-test/tests/gc/bug1337324.js create mode 100644 js/src/jit-test/tests/gc/bug1471949.js create mode 100644 js/src/jit-test/tests/gc/bug1511412.js create mode 100644 js/src/jit-test/tests/gc/bug1532289.js create mode 100644 js/src/jit-test/tests/gc/bug1600017.js create mode 100644 js/src/jit-test/tests/gc/bug1600488-1.js create mode 100644 js/src/jit-test/tests/gc/bug1600488-2.js create mode 100644 js/src/jit-test/tests/gc/bug1698557.js create mode 100644 js/src/jit-test/tests/gc/bug1704451.js create mode 100644 js/src/jit-test/tests/gc/bug1709537.js create mode 100644 js/src/jit-test/tests/gc/bug888463.js create mode 100644 js/src/jit-test/tests/gc/compartment-revived-gc.js create mode 100644 js/src/jit-test/tests/gc/dedupe-02.js create mode 100644 js/src/jit-test/tests/gc/dedupe.js create mode 100644 js/src/jit-test/tests/gc/dedupeTenuredBase.js create mode 100644 js/src/jit-test/tests/gc/deduplicateTenuringStrings.js create mode 100644 js/src/jit-test/tests/gc/elements-post-write-barrier.js create mode 100644 js/src/jit-test/tests/gc/finalizationRegistry-ccw.js create mode 100644 js/src/jit-test/tests/gc/finalizationRegistry-cleanupSome-recursive.js create mode 100644 js/src/jit-test/tests/gc/finalizationRegistry-gray.js create mode 100644 js/src/jit-test/tests/gc/finalizationRegistry-oom1.js create mode 100644 js/src/jit-test/tests/gc/finalizationRegistry-oom2.js create mode 100644 js/src/jit-test/tests/gc/finalizationRegistry-oom3.js create mode 100644 js/src/jit-test/tests/gc/finalizationRegistry-oom4.js create mode 100644 js/src/jit-test/tests/gc/finalizationRegistry-records-not-initialized.js create mode 100644 js/src/jit-test/tests/gc/finalizationRegistry.js create mode 100644 js/src/jit-test/tests/gc/gcparam.js create mode 100644 js/src/jit-test/tests/gc/gczeal-range.js create mode 100644 js/src/jit-test/tests/gc/helper-thread-params.js create mode 100644 js/src/jit-test/tests/gc/incremental-01.js create mode 100644 js/src/jit-test/tests/gc/incremental-02.js create mode 100644 js/src/jit-test/tests/gc/incremental-AccessorShape-barrier.js create mode 100644 js/src/jit-test/tests/gc/incremental-abort.js create mode 100644 js/src/jit-test/tests/gc/incremental-compacting.js create mode 100644 js/src/jit-test/tests/gc/incremental-state.js create mode 100644 js/src/jit-test/tests/gc/jsscript-mark-children.js create mode 100644 js/src/jit-test/tests/gc/marking-thread-count.js create mode 100644 js/src/jit-test/tests/gc/multi-01.js create mode 100644 js/src/jit-test/tests/gc/multi-02.js create mode 100644 js/src/jit-test/tests/gc/multi-03.js create mode 100644 js/src/jit-test/tests/gc/oomInArrayProtoTest.js create mode 100644 js/src/jit-test/tests/gc/oomInByteSize.js create mode 100644 js/src/jit-test/tests/gc/oomInDebugger.js create mode 100644 js/src/jit-test/tests/gc/oomInDtoa.js create mode 100644 js/src/jit-test/tests/gc/oomInExceptionHandlerBailout.js create mode 100644 js/src/jit-test/tests/gc/oomInFindPath.js create mode 100644 js/src/jit-test/tests/gc/oomInFormatStackDump.js create mode 100644 js/src/jit-test/tests/gc/oomInGetJumpLabelForBranch.js create mode 100644 js/src/jit-test/tests/gc/oomInNewGlobal.js create mode 100644 js/src/jit-test/tests/gc/oomInOffTheadCompile.js create mode 100644 js/src/jit-test/tests/gc/oomInOffTheadCompile2.js create mode 100644 js/src/jit-test/tests/gc/oomInOffTheadCompile3.js create mode 100644 js/src/jit-test/tests/gc/oomInParseAsmJS.js create mode 100644 js/src/jit-test/tests/gc/oomInParseFunction.js create mode 100644 js/src/jit-test/tests/gc/oomInRegExp.js create mode 100644 js/src/jit-test/tests/gc/oomInRegExp2.js create mode 100644 js/src/jit-test/tests/gc/oomInRegExpAlternativeGeneration.js create mode 100644 js/src/jit-test/tests/gc/oomInWeakMap.js create mode 100644 js/src/jit-test/tests/gc/pretenure-array-long-lived.js create mode 100644 js/src/jit-test/tests/gc/pretenure-array-long-then-short-lived.js create mode 100644 js/src/jit-test/tests/gc/pretenure-array-short-lived.js create mode 100644 js/src/jit-test/tests/gc/pretenure-array-short-then-long-lived.js create mode 100644 js/src/jit-test/tests/gc/pretenure-object-long-lived.js create mode 100644 js/src/jit-test/tests/gc/pretenure-object-long-then-short-lived.js create mode 100644 js/src/jit-test/tests/gc/pretenure-object-short-lived.js create mode 100644 js/src/jit-test/tests/gc/pretenure-object-short-then-long-lived.js create mode 100644 js/src/jit-test/tests/gc/pretenuring.js create mode 100644 js/src/jit-test/tests/gc/regress-1711413.js create mode 100644 js/src/jit-test/tests/gc/str-atom-dedupe.js create mode 100644 js/src/jit-test/tests/gc/test-root-arrays.js create mode 100644 js/src/jit-test/tests/gc/weak-marking-01.js create mode 100644 js/src/jit-test/tests/gc/weak-marking-02.js create mode 100644 js/src/jit-test/tests/gc/weak-marking-03.js create mode 100644 js/src/jit-test/tests/gc/weak-marking-varying.js create mode 100644 js/src/jit-test/tests/gc/weakRef_in_promise.js create mode 100644 js/src/jit-test/tests/gc/weakRefs-basic.js create mode 100644 js/src/jit-test/tests/gc/weakRefs.js create mode 100644 js/src/jit-test/tests/gc/weakmap-expose.js create mode 100644 js/src/jit-test/tests/gc/weakmap-nursery-value.js create mode 100644 js/src/jit-test/tests/gc/weakmark-remap.js create mode 100644 js/src/jit-test/tests/gc/weakmark-remap2.js create mode 100644 js/src/jit-test/tests/generators/bug1098947.js create mode 100644 js/src/jit-test/tests/generators/bug1462353.js create mode 100644 js/src/jit-test/tests/generators/bug1491331.js create mode 100644 js/src/jit-test/tests/generators/bug1501722.js create mode 100644 js/src/jit-test/tests/generators/bug1542660-2.js create mode 100644 js/src/jit-test/tests/generators/bug1542660.js create mode 100644 js/src/jit-test/tests/generators/bug1664463.js create mode 100644 js/src/jit-test/tests/generators/bug1673080.js create mode 100644 js/src/jit-test/tests/generators/bug1767181.js create mode 100644 js/src/jit-test/tests/generators/bug1773628.js create mode 100644 js/src/jit-test/tests/generators/bug1791968.js create mode 100644 js/src/jit-test/tests/generators/bug1811171.js create mode 100644 js/src/jit-test/tests/generators/bug908920.js create mode 100644 js/src/jit-test/tests/generators/bug931414.js create mode 100644 js/src/jit-test/tests/generators/closing-osr.js create mode 100644 js/src/jit-test/tests/generators/es6-syntax.js create mode 100644 js/src/jit-test/tests/generators/limits.js create mode 100644 js/src/jit-test/tests/generators/next-on-finished.js create mode 100644 js/src/jit-test/tests/generators/relazify-arguments-usage.js create mode 100644 js/src/jit-test/tests/generators/return-break-continue.js create mode 100644 js/src/jit-test/tests/generators/return.js create mode 100644 js/src/jit-test/tests/generators/throw-closes.js create mode 100644 js/src/jit-test/tests/generators/throw-on-finished.js create mode 100644 js/src/jit-test/tests/generators/wrappers.js create mode 100644 js/src/jit-test/tests/generators/yield-exception-stack-in-finally.js create mode 100644 js/src/jit-test/tests/generators/yield-in-finally.js create mode 100644 js/src/jit-test/tests/generators/yield-regexp.js create mode 100644 js/src/jit-test/tests/generators/yield-yield.js create mode 100644 js/src/jit-test/tests/heap-analysis/bug-1249107.js create mode 100644 js/src/jit-test/tests/heap-analysis/bug-1252912.js create mode 100644 js/src/jit-test/tests/heap-analysis/bug-1254105.js create mode 100644 js/src/jit-test/tests/heap-analysis/byteSize-of-bigint.js create mode 100644 js/src/jit-test/tests/heap-analysis/byteSize-of-object.js create mode 100644 js/src/jit-test/tests/heap-analysis/byteSize-of-scripts.js create mode 100644 js/src/jit-test/tests/heap-analysis/byteSize-of-string.js create mode 100644 js/src/jit-test/tests/heap-analysis/byteSize-of-symbol.js create mode 100644 js/src/jit-test/tests/heap-analysis/findPath.js create mode 100644 js/src/jit-test/tests/heap-analysis/pointerByteSize.js create mode 100644 js/src/jit-test/tests/heap-analysis/shortestPaths.js create mode 100644 js/src/jit-test/tests/ion/ArrayLengthGetPropertyIC.js create mode 100644 js/src/jit-test/tests/ion/ConvertElementsToDouble-Int32.js create mode 100644 js/src/jit-test/tests/ion/InlineAddVTypeMonitor.js create mode 100644 js/src/jit-test/tests/ion/PurgeProtoChain.js create mode 100644 js/src/jit-test/tests/ion/absd.js create mode 100644 js/src/jit-test/tests/ion/andOr.js create mode 100644 js/src/jit-test/tests/ion/arguments-type-reflow.js create mode 100644 js/src/jit-test/tests/ion/arithstringtonumber.js create mode 100644 js/src/jit-test/tests/ion/array-join-bug1137624-1.js create mode 100644 js/src/jit-test/tests/ion/array-join-bug1137624-2.js create mode 100644 js/src/jit-test/tests/ion/array-push-frozen-array.js create mode 100644 js/src/jit-test/tests/ion/array-push-length-overflow.js create mode 100644 js/src/jit-test/tests/ion/array-push-multiple-frozen.js create mode 100644 js/src/jit-test/tests/ion/array-push-multiple-with-funapply.js create mode 100644 js/src/jit-test/tests/ion/array-push-multiple.js create mode 100644 js/src/jit-test/tests/ion/array-splice.js create mode 100644 js/src/jit-test/tests/ion/bailout-env.js create mode 100644 js/src/jit-test/tests/ion/bailout-float-regs.js create mode 100644 js/src/jit-test/tests/ion/bailout-oom-01.js create mode 100644 js/src/jit-test/tests/ion/bailout-spread.js create mode 100644 js/src/jit-test/tests/ion/bailout-with-object-or-null.js create mode 100644 js/src/jit-test/tests/ion/base-reg-fp.js create mode 100644 js/src/jit-test/tests/ion/base-reg-sp.js create mode 100644 js/src/jit-test/tests/ion/bindname.js create mode 100644 js/src/jit-test/tests/ion/bug-770309-mcall-bailout.js create mode 100644 js/src/jit-test/tests/ion/bug-870034.js create mode 100644 js/src/jit-test/tests/ion/bug-952818.js create mode 100644 js/src/jit-test/tests/ion/bug1000605.js create mode 100644 js/src/jit-test/tests/ion/bug1000960.js create mode 100644 js/src/jit-test/tests/ion/bug1001222.js create mode 100644 js/src/jit-test/tests/ion/bug1001378.js create mode 100644 js/src/jit-test/tests/ion/bug1001382.js create mode 100644 js/src/jit-test/tests/ion/bug1001850.js create mode 100644 js/src/jit-test/tests/ion/bug1003694.js create mode 100644 js/src/jit-test/tests/ion/bug1005458.js create mode 100644 js/src/jit-test/tests/ion/bug1005590.js create mode 100644 js/src/jit-test/tests/ion/bug1006885.js create mode 100644 js/src/jit-test/tests/ion/bug1007027.js create mode 100644 js/src/jit-test/tests/ion/bug1007213.js create mode 100644 js/src/jit-test/tests/ion/bug1015498.js create mode 100644 js/src/jit-test/tests/ion/bug1018621.js create mode 100644 js/src/jit-test/tests/ion/bug1022081.js create mode 100644 js/src/jit-test/tests/ion/bug1027510.js create mode 100644 js/src/jit-test/tests/ion/bug1028910.js create mode 100644 js/src/jit-test/tests/ion/bug1033873.js create mode 100644 js/src/jit-test/tests/ion/bug1034400.js create mode 100644 js/src/jit-test/tests/ion/bug1046597.js create mode 100644 js/src/jit-test/tests/ion/bug1053074.js create mode 100644 js/src/jit-test/tests/ion/bug1054047.js create mode 100644 js/src/jit-test/tests/ion/bug1054241.js create mode 100644 js/src/jit-test/tests/ion/bug1054512.js create mode 100644 js/src/jit-test/tests/ion/bug1054601.js create mode 100644 js/src/jit-test/tests/ion/bug1054753.js create mode 100644 js/src/jit-test/tests/ion/bug1055762.js create mode 100644 js/src/jit-test/tests/ion/bug1055864.js create mode 100644 js/src/jit-test/tests/ion/bug1057580.js create mode 100644 js/src/jit-test/tests/ion/bug1057582.js create mode 100644 js/src/jit-test/tests/ion/bug1057598.js create mode 100644 js/src/jit-test/tests/ion/bug1060387.js create mode 100644 js/src/jit-test/tests/ion/bug1060398.js create mode 100644 js/src/jit-test/tests/ion/bug1062612.js create mode 100644 js/src/jit-test/tests/ion/bug1063488.js create mode 100644 js/src/jit-test/tests/ion/bug1063653.js create mode 100644 js/src/jit-test/tests/ion/bug1064537.js create mode 100644 js/src/jit-test/tests/ion/bug1066659.js create mode 100644 js/src/jit-test/tests/ion/bug1070462.js create mode 100644 js/src/jit-test/tests/ion/bug1070465.js create mode 100644 js/src/jit-test/tests/ion/bug1071879.js create mode 100644 js/src/jit-test/tests/ion/bug1072188.js create mode 100644 js/src/jit-test/tests/ion/bug1072691.js create mode 100644 js/src/jit-test/tests/ion/bug1072911.js create mode 100644 js/src/jit-test/tests/ion/bug1073702.js create mode 100644 js/src/jit-test/tests/ion/bug1073861.js create mode 100644 js/src/jit-test/tests/ion/bug1073928.js create mode 100644 js/src/jit-test/tests/ion/bug1074833.js create mode 100644 js/src/jit-test/tests/ion/bug1076026.js create mode 100644 js/src/jit-test/tests/ion/bug1076091.js create mode 100644 js/src/jit-test/tests/ion/bug1076283.js create mode 100644 js/src/jit-test/tests/ion/bug1077349.js create mode 100644 js/src/jit-test/tests/ion/bug1077427.js create mode 100644 js/src/jit-test/tests/ion/bug1079062.js create mode 100644 js/src/jit-test/tests/ion/bug1079850.js create mode 100644 js/src/jit-test/tests/ion/bug1080991.js create mode 100644 js/src/jit-test/tests/ion/bug1085298.js create mode 100644 js/src/jit-test/tests/ion/bug1089761.js create mode 100644 js/src/jit-test/tests/ion/bug1090037.js create mode 100644 js/src/jit-test/tests/ion/bug1090424.js create mode 100644 js/src/jit-test/tests/ion/bug1092833.js create mode 100644 js/src/jit-test/tests/ion/bug1101576.js create mode 100644 js/src/jit-test/tests/ion/bug1101821.js create mode 100644 js/src/jit-test/tests/ion/bug1102187.js create mode 100644 js/src/jit-test/tests/ion/bug1105187-sink.js create mode 100644 js/src/jit-test/tests/ion/bug1105574-ra-sink.js create mode 100644 js/src/jit-test/tests/ion/bug1105684.js create mode 100644 js/src/jit-test/tests/ion/bug1106171-sink.js create mode 100644 js/src/jit-test/tests/ion/bug1107011-1.js create mode 100644 js/src/jit-test/tests/ion/bug1107011-2.js create mode 100644 js/src/jit-test/tests/ion/bug1113139.js create mode 100644 js/src/jit-test/tests/ion/bug1115665.js create mode 100644 js/src/jit-test/tests/ion/bug1117099.js create mode 100644 js/src/jit-test/tests/ion/bug1122401.js create mode 100644 js/src/jit-test/tests/ion/bug1122839.js create mode 100644 js/src/jit-test/tests/ion/bug1123011.js create mode 100644 js/src/jit-test/tests/ion/bug1123064.js create mode 100644 js/src/jit-test/tests/ion/bug1128490.js create mode 100644 js/src/jit-test/tests/ion/bug1129977.js create mode 100644 js/src/jit-test/tests/ion/bug1130679.js create mode 100644 js/src/jit-test/tests/ion/bug1132128.js create mode 100644 js/src/jit-test/tests/ion/bug1132290.js create mode 100644 js/src/jit-test/tests/ion/bug1132584.js create mode 100644 js/src/jit-test/tests/ion/bug1132770.js create mode 100644 js/src/jit-test/tests/ion/bug1133530.js create mode 100644 js/src/jit-test/tests/ion/bug1134074.js create mode 100644 js/src/jit-test/tests/ion/bug1135047.js create mode 100644 js/src/jit-test/tests/ion/bug1138740.js create mode 100644 js/src/jit-test/tests/ion/bug1139152.js create mode 100644 js/src/jit-test/tests/ion/bug1139368.js create mode 100644 js/src/jit-test/tests/ion/bug1139376.js create mode 100644 js/src/jit-test/tests/ion/bug1140890.js create mode 100644 js/src/jit-test/tests/ion/bug1143216.js create mode 100644 js/src/jit-test/tests/ion/bug1143878.js create mode 100644 js/src/jit-test/tests/ion/bug1146410.js create mode 100644 js/src/jit-test/tests/ion/bug1148883.js create mode 100644 js/src/jit-test/tests/ion/bug1148973-1.js create mode 100644 js/src/jit-test/tests/ion/bug1148973-2.js create mode 100644 js/src/jit-test/tests/ion/bug1151323.js create mode 100644 js/src/jit-test/tests/ion/bug1154971.js create mode 100644 js/src/jit-test/tests/ion/bug1155807.js create mode 100644 js/src/jit-test/tests/ion/bug1158632.js create mode 100644 js/src/jit-test/tests/ion/bug1159899.js create mode 100644 js/src/jit-test/tests/ion/bug1160884.js create mode 100644 js/src/jit-test/tests/ion/bug1165905.js create mode 100644 js/src/jit-test/tests/ion/bug1172498-2.js create mode 100644 js/src/jit-test/tests/ion/bug1172498.js create mode 100644 js/src/jit-test/tests/ion/bug1181354.js create mode 100644 js/src/jit-test/tests/ion/bug1185957.js create mode 100644 js/src/jit-test/tests/ion/bug1186271.js create mode 100644 js/src/jit-test/tests/ion/bug1188586.js create mode 100644 js/src/jit-test/tests/ion/bug1189137.js create mode 100644 js/src/jit-test/tests/ion/bug1195588.js create mode 100644 js/src/jit-test/tests/ion/bug1195590.js create mode 100644 js/src/jit-test/tests/ion/bug1196589.js create mode 100644 js/src/jit-test/tests/ion/bug1196590.js create mode 100644 js/src/jit-test/tests/ion/bug1196648.js create mode 100644 js/src/jit-test/tests/ion/bug1197769.js create mode 100644 js/src/jit-test/tests/ion/bug1199898.js create mode 100644 js/src/jit-test/tests/ion/bug1201459.js create mode 100644 js/src/jit-test/tests/ion/bug1201469.js create mode 100644 js/src/jit-test/tests/ion/bug1201850.js create mode 100644 js/src/jit-test/tests/ion/bug1204165.js create mode 100644 js/src/jit-test/tests/ion/bug1204675.js create mode 100644 js/src/jit-test/tests/ion/bug1205842.js create mode 100644 js/src/jit-test/tests/ion/bug1207413.js create mode 100644 js/src/jit-test/tests/ion/bug1212298.js create mode 100644 js/src/jit-test/tests/ion/bug1212605.js create mode 100644 js/src/jit-test/tests/ion/bug1213552.js create mode 100644 js/src/jit-test/tests/ion/bug1214013.js create mode 100644 js/src/jit-test/tests/ion/bug1214050.js create mode 100644 js/src/jit-test/tests/ion/bug1215600.js create mode 100644 js/src/jit-test/tests/ion/bug1215992.js create mode 100644 js/src/jit-test/tests/ion/bug1216130.js create mode 100644 js/src/jit-test/tests/ion/bug1216151.js create mode 100644 js/src/jit-test/tests/ion/bug1216157.js create mode 100644 js/src/jit-test/tests/ion/bug1218065.js create mode 100644 js/src/jit-test/tests/ion/bug1219883.js create mode 100644 js/src/jit-test/tests/ion/bug1222905.js create mode 100644 js/src/jit-test/tests/ion/bug1222917.js create mode 100644 js/src/jit-test/tests/ion/bug1225367.js create mode 100644 js/src/jit-test/tests/ion/bug1226816.js create mode 100644 js/src/jit-test/tests/ion/bug1228327.js create mode 100644 js/src/jit-test/tests/ion/bug1228397.js create mode 100644 js/src/jit-test/tests/ion/bug1232859.js create mode 100644 js/src/jit-test/tests/ion/bug1233331.js create mode 100644 js/src/jit-test/tests/ion/bug1233343.js create mode 100644 js/src/jit-test/tests/ion/bug1239075.js create mode 100644 js/src/jit-test/tests/ion/bug1240521.js create mode 100644 js/src/jit-test/tests/ion/bug1244502.js create mode 100644 js/src/jit-test/tests/ion/bug1246154.js create mode 100644 js/src/jit-test/tests/ion/bug1246552.js create mode 100644 js/src/jit-test/tests/ion/bug1247880.js create mode 100644 js/src/jit-test/tests/ion/bug1247909.js create mode 100644 js/src/jit-test/tests/ion/bug1247915.js create mode 100644 js/src/jit-test/tests/ion/bug1254197.js create mode 100644 js/src/jit-test/tests/ion/bug1261326.js create mode 100644 js/src/jit-test/tests/ion/bug1264948-1.js create mode 100644 js/src/jit-test/tests/ion/bug1265159.js create mode 100644 js/src/jit-test/tests/ion/bug1269756.js create mode 100644 js/src/jit-test/tests/ion/bug1273858-1.js create mode 100644 js/src/jit-test/tests/ion/bug1273858-2.js create mode 100644 js/src/jit-test/tests/ion/bug1279898.js create mode 100644 js/src/jit-test/tests/ion/bug1282944.js create mode 100644 js/src/jit-test/tests/ion/bug1284491.js create mode 100644 js/src/jit-test/tests/ion/bug1285217.js create mode 100644 js/src/jit-test/tests/ion/bug1285218.js create mode 100644 js/src/jit-test/tests/ion/bug1287416.js create mode 100644 js/src/jit-test/tests/ion/bug1293542.js create mode 100644 js/src/jit-test/tests/ion/bug1296667.js create mode 100644 js/src/jit-test/tests/ion/bug1298354.js create mode 100644 js/src/jit-test/tests/ion/bug1299007.js create mode 100644 js/src/jit-test/tests/ion/bug1304640.js create mode 100644 js/src/jit-test/tests/ion/bug1304643.js create mode 100644 js/src/jit-test/tests/ion/bug1308802.js create mode 100644 js/src/jit-test/tests/ion/bug1311061.js create mode 100644 js/src/jit-test/tests/ion/bug1314438.js create mode 100644 js/src/jit-test/tests/ion/bug1314545.js create mode 100644 js/src/jit-test/tests/ion/bug1317943.js create mode 100644 js/src/jit-test/tests/ion/bug1318634.js create mode 100644 js/src/jit-test/tests/ion/bug1321437.js create mode 100644 js/src/jit-test/tests/ion/bug1322932.js create mode 100644 js/src/jit-test/tests/ion/bug1323854.js create mode 100644 js/src/jit-test/tests/ion/bug1324521.js create mode 100644 js/src/jit-test/tests/ion/bug1326150.js create mode 100644 js/src/jit-test/tests/ion/bug1329933.js create mode 100644 js/src/jit-test/tests/ion/bug1330662.js create mode 100644 js/src/jit-test/tests/ion/bug1331058.js create mode 100644 js/src/jit-test/tests/ion/bug1331350.js create mode 100644 js/src/jit-test/tests/ion/bug1331405.js create mode 100644 js/src/jit-test/tests/ion/bug1333946.js create mode 100644 js/src/jit-test/tests/ion/bug1334314.js create mode 100644 js/src/jit-test/tests/ion/bug1342483-1.js create mode 100644 js/src/jit-test/tests/ion/bug1342483-2.js create mode 100644 js/src/jit-test/tests/ion/bug1342882.js create mode 100644 js/src/jit-test/tests/ion/bug1345160.js create mode 100644 js/src/jit-test/tests/ion/bug1352510.js create mode 100644 js/src/jit-test/tests/ion/bug1354275.js create mode 100644 js/src/jit-test/tests/ion/bug1356822.js create mode 100644 js/src/jit-test/tests/ion/bug1365518.js create mode 100644 js/src/jit-test/tests/ion/bug1365769-1.js create mode 100644 js/src/jit-test/tests/ion/bug1365769-2.js create mode 100644 js/src/jit-test/tests/ion/bug1368360-1.js create mode 100644 js/src/jit-test/tests/ion/bug1368360-2.js create mode 100644 js/src/jit-test/tests/ion/bug1370922.js create mode 100644 js/src/jit-test/tests/ion/bug1379936.js create mode 100644 js/src/jit-test/tests/ion/bug1383591.js create mode 100644 js/src/jit-test/tests/ion/bug1383972.js create mode 100644 js/src/jit-test/tests/ion/bug1384737.js create mode 100644 js/src/jit-test/tests/ion/bug1394505.js create mode 100644 js/src/jit-test/tests/ion/bug1395100.js create mode 100644 js/src/jit-test/tests/ion/bug1397071.js create mode 100644 js/src/jit-test/tests/ion/bug1401014.js create mode 100644 js/src/jit-test/tests/ion/bug1404636.js create mode 100644 js/src/jit-test/tests/ion/bug1408412.js create mode 100644 js/src/jit-test/tests/ion/bug1410683.js create mode 100644 js/src/jit-test/tests/ion/bug1433496.js create mode 100644 js/src/jit-test/tests/ion/bug1441012.js create mode 100644 js/src/jit-test/tests/ion/bug1450796.js create mode 100644 js/src/jit-test/tests/ion/bug1452581.js create mode 100644 js/src/jit-test/tests/ion/bug1472132.js create mode 100644 js/src/jit-test/tests/ion/bug1473830.js create mode 100644 js/src/jit-test/tests/ion/bug1479394.js create mode 100644 js/src/jit-test/tests/ion/bug1484905.js create mode 100644 js/src/jit-test/tests/ion/bug1492574.js create mode 100644 js/src/jit-test/tests/ion/bug1493900-1.js create mode 100644 js/src/jit-test/tests/ion/bug1493900-2.js create mode 100644 js/src/jit-test/tests/ion/bug1497107.js create mode 100644 js/src/jit-test/tests/ion/bug1502090.js create mode 100644 js/src/jit-test/tests/ion/bug1506968.js create mode 100644 js/src/jit-test/tests/ion/bug1509482.js create mode 100644 js/src/jit-test/tests/ion/bug1510684.js create mode 100644 js/src/jit-test/tests/ion/bug1514625.js create mode 100644 js/src/jit-test/tests/ion/bug1518377-1.js create mode 100644 js/src/jit-test/tests/ion/bug1518377-2.js create mode 100644 js/src/jit-test/tests/ion/bug1526840.js create mode 100644 js/src/jit-test/tests/ion/bug1527148.js create mode 100644 js/src/jit-test/tests/ion/bug1528818.js create mode 100644 js/src/jit-test/tests/ion/bug1538083.js create mode 100644 js/src/jit-test/tests/ion/bug1543166.js create mode 100644 js/src/jit-test/tests/ion/bug1544386-1.js create mode 100644 js/src/jit-test/tests/ion/bug1544386-2.js create mode 100644 js/src/jit-test/tests/ion/bug1544792.js create mode 100644 js/src/jit-test/tests/ion/bug1546228.js create mode 100644 js/src/jit-test/tests/ion/bug1556571.js create mode 100644 js/src/jit-test/tests/ion/bug1568397.js create mode 100644 js/src/jit-test/tests/ion/bug1570926.js create mode 100644 js/src/jit-test/tests/ion/bug1572051.js create mode 100644 js/src/jit-test/tests/ion/bug1593175.js create mode 100644 js/src/jit-test/tests/ion/bug1598456.js create mode 100644 js/src/jit-test/tests/ion/bug1598784.js create mode 100644 js/src/jit-test/tests/ion/bug1602190.js create mode 100644 js/src/jit-test/tests/ion/bug1604631.js create mode 100644 js/src/jit-test/tests/ion/bug1605641.js create mode 100644 js/src/jit-test/tests/ion/bug1607670-1.js create mode 100644 js/src/jit-test/tests/ion/bug1607670-2.js create mode 100644 js/src/jit-test/tests/ion/bug1607670-3.js create mode 100644 js/src/jit-test/tests/ion/bug1607670-4.js create mode 100644 js/src/jit-test/tests/ion/bug1608256.js create mode 100644 js/src/jit-test/tests/ion/bug1620189.js create mode 100644 js/src/jit-test/tests/ion/bug1620203.js create mode 100644 js/src/jit-test/tests/ion/bug1620215.js create mode 100644 js/src/jit-test/tests/ion/bug1621268-1.js create mode 100644 js/src/jit-test/tests/ion/bug1621268-2.js create mode 100644 js/src/jit-test/tests/ion/bug1629503-1.js create mode 100644 js/src/jit-test/tests/ion/bug1629503-2.js create mode 100644 js/src/jit-test/tests/ion/bug1640737.js create mode 100644 js/src/jit-test/tests/ion/bug1643888.js create mode 100644 js/src/jit-test/tests/ion/bug1647293.js create mode 100644 js/src/jit-test/tests/ion/bug1650526.js create mode 100644 js/src/jit-test/tests/ion/bug1655940-1.js create mode 100644 js/src/jit-test/tests/ion/bug1655940-2.js create mode 100644 js/src/jit-test/tests/ion/bug1655940-3.js create mode 100644 js/src/jit-test/tests/ion/bug1723464.js create mode 100644 js/src/jit-test/tests/ion/bug1745388.js create mode 100644 js/src/jit-test/tests/ion/bug1762343.js create mode 100644 js/src/jit-test/tests/ion/bug1791520.js create mode 100644 js/src/jit-test/tests/ion/bug1808210.js create mode 100644 js/src/jit-test/tests/ion/bug1808352.js create mode 100644 js/src/jit-test/tests/ion/bug1811803.js create mode 100644 js/src/jit-test/tests/ion/bug1812001.js create mode 100644 js/src/jit-test/tests/ion/bug1812508.js create mode 100644 js/src/jit-test/tests/ion/bug1814746.js create mode 100644 js/src/jit-test/tests/ion/bug1814899.js create mode 100644 js/src/jit-test/tests/ion/bug1820602.js create mode 100644 js/src/jit-test/tests/ion/bug1822966.js create mode 100644 js/src/jit-test/tests/ion/bug1830107.js create mode 100644 js/src/jit-test/tests/ion/bug1845257.js create mode 100644 js/src/jit-test/tests/ion/bug1851976.js create mode 100644 js/src/jit-test/tests/ion/bug1852917.js create mode 100644 js/src/jit-test/tests/ion/bug1866502.js create mode 100644 js/src/jit-test/tests/ion/bug1870756.js create mode 100644 js/src/jit-test/tests/ion/bug1872842.js create mode 100644 js/src/jit-test/tests/ion/bug1874502.js create mode 100644 js/src/jit-test/tests/ion/bug470143.js create mode 100644 js/src/jit-test/tests/ion/bug669575-1.js create mode 100644 js/src/jit-test/tests/ion/bug669575-2.js create mode 100644 js/src/jit-test/tests/ion/bug669575-3.js create mode 100644 js/src/jit-test/tests/ion/bug669950.js create mode 100644 js/src/jit-test/tests/ion/bug670484.js create mode 100644 js/src/jit-test/tests/ion/bug674507-1.js create mode 100644 js/src/jit-test/tests/ion/bug674507-2.js create mode 100644 js/src/jit-test/tests/ion/bug674656.js create mode 100644 js/src/jit-test/tests/ion/bug674664-1.js create mode 100644 js/src/jit-test/tests/ion/bug674664-2.js create mode 100644 js/src/jit-test/tests/ion/bug674664-3.js create mode 100644 js/src/jit-test/tests/ion/bug674694.js create mode 100644 js/src/jit-test/tests/ion/bug675381.js create mode 100644 js/src/jit-test/tests/ion/bug677066-2.js create mode 100644 js/src/jit-test/tests/ion/bug677066.js create mode 100644 js/src/jit-test/tests/ion/bug677073-2.js create mode 100644 js/src/jit-test/tests/ion/bug677073.js create mode 100644 js/src/jit-test/tests/ion/bug677074.js create mode 100644 js/src/jit-test/tests/ion/bug677080.js create mode 100644 js/src/jit-test/tests/ion/bug677163.js create mode 100644 js/src/jit-test/tests/ion/bug677455.js create mode 100644 js/src/jit-test/tests/ion/bug677715-2.js create mode 100644 js/src/jit-test/tests/ion/bug677715-3.js create mode 100644 js/src/jit-test/tests/ion/bug677715-4.js create mode 100644 js/src/jit-test/tests/ion/bug677715.js create mode 100644 js/src/jit-test/tests/ion/bug677730.js create mode 100644 js/src/jit-test/tests/ion/bug677774-1.js create mode 100644 js/src/jit-test/tests/ion/bug677774-2.js create mode 100644 js/src/jit-test/tests/ion/bug677871.js create mode 100644 js/src/jit-test/tests/ion/bug678106.js create mode 100644 js/src/jit-test/tests/ion/bug678239-1.js create mode 100644 js/src/jit-test/tests/ion/bug678239-2.js create mode 100644 js/src/jit-test/tests/ion/bug678353.js create mode 100644 js/src/jit-test/tests/ion/bug678620.js create mode 100644 js/src/jit-test/tests/ion/bug678625.js create mode 100644 js/src/jit-test/tests/ion/bug678798.js create mode 100644 js/src/jit-test/tests/ion/bug679493-2.js create mode 100644 js/src/jit-test/tests/ion/bug679493.js create mode 100644 js/src/jit-test/tests/ion/bug679581.js create mode 100644 js/src/jit-test/tests/ion/bug679794.js create mode 100644 js/src/jit-test/tests/ion/bug680432.js create mode 100644 js/src/jit-test/tests/ion/bug680619.js create mode 100644 js/src/jit-test/tests/ion/bug680621.js create mode 100644 js/src/jit-test/tests/ion/bug681185.js create mode 100644 js/src/jit-test/tests/ion/bug682210.js create mode 100644 js/src/jit-test/tests/ion/bug684362.js create mode 100644 js/src/jit-test/tests/ion/bug684384.js create mode 100644 js/src/jit-test/tests/ion/bug691597.js create mode 100644 js/src/jit-test/tests/ion/bug691603.js create mode 100644 js/src/jit-test/tests/ion/bug691747.js create mode 100644 js/src/jit-test/tests/ion/bug692208.js create mode 100644 js/src/jit-test/tests/ion/bug692211.js create mode 100644 js/src/jit-test/tests/ion/bug692213.js create mode 100644 js/src/jit-test/tests/ion/bug692215.js create mode 100644 js/src/jit-test/tests/ion/bug695017.js create mode 100644 js/src/jit-test/tests/ion/bug701956.js create mode 100644 js/src/jit-test/tests/ion/bug701958.js create mode 100644 js/src/jit-test/tests/ion/bug701964.js create mode 100644 js/src/jit-test/tests/ion/bug703376.js create mode 100644 js/src/jit-test/tests/ion/bug705351.js create mode 100644 js/src/jit-test/tests/ion/bug706692.js create mode 100644 js/src/jit-test/tests/ion/bug706699.js create mode 100644 js/src/jit-test/tests/ion/bug710983.js create mode 100644 js/src/jit-test/tests/ion/bug714397.js create mode 100644 js/src/jit-test/tests/ion/bug716504.js create mode 100644 js/src/jit-test/tests/ion/bug716624-1.js create mode 100644 js/src/jit-test/tests/ion/bug716624-2.js create mode 100644 js/src/jit-test/tests/ion/bug716743.js create mode 100644 js/src/jit-test/tests/ion/bug716853.js create mode 100644 js/src/jit-test/tests/ion/bug716895.js create mode 100644 js/src/jit-test/tests/ion/bug717466.js create mode 100644 js/src/jit-test/tests/ion/bug718850.js create mode 100644 js/src/jit-test/tests/ion/bug719231.js create mode 100644 js/src/jit-test/tests/ion/bug719346.js create mode 100644 js/src/jit-test/tests/ion/bug719774.js create mode 100644 js/src/jit-test/tests/ion/bug720169.js create mode 100644 js/src/jit-test/tests/ion/bug723040.js create mode 100644 js/src/jit-test/tests/ion/bug723271.js create mode 100644 js/src/jit-test/tests/ion/bug724517.js create mode 100644 js/src/jit-test/tests/ion/bug724530.js create mode 100644 js/src/jit-test/tests/ion/bug724562.js create mode 100644 js/src/jit-test/tests/ion/bug724654.js create mode 100644 js/src/jit-test/tests/ion/bug724788.js create mode 100644 js/src/jit-test/tests/ion/bug724944.js create mode 100644 js/src/jit-test/tests/ion/bug724975.js create mode 100644 js/src/jit-test/tests/ion/bug724976.js create mode 100644 js/src/jit-test/tests/ion/bug724999.js create mode 100644 js/src/jit-test/tests/ion/bug725000.js create mode 100644 js/src/jit-test/tests/ion/bug725003.js create mode 100644 js/src/jit-test/tests/ion/bug725011.js create mode 100644 js/src/jit-test/tests/ion/bug725061.js create mode 100644 js/src/jit-test/tests/ion/bug725067.js create mode 100644 js/src/jit-test/tests/ion/bug726180.js create mode 100644 js/src/jit-test/tests/ion/bug728033.js create mode 100644 js/src/jit-test/tests/ion/bug728187.js create mode 100644 js/src/jit-test/tests/ion/bug728188.js create mode 100644 js/src/jit-test/tests/ion/bug729573.js create mode 100644 js/src/jit-test/tests/ion/bug729788.js create mode 100644 js/src/jit-test/tests/ion/bug729795.js create mode 100644 js/src/jit-test/tests/ion/bug729798.js create mode 100644 js/src/jit-test/tests/ion/bug729814.js create mode 100644 js/src/jit-test/tests/ion/bug729884.js create mode 100644 js/src/jit-test/tests/ion/bug729899-1.js create mode 100644 js/src/jit-test/tests/ion/bug729899-2.js create mode 100644 js/src/jit-test/tests/ion/bug729902-1.js create mode 100644 js/src/jit-test/tests/ion/bug729902-2.js create mode 100644 js/src/jit-test/tests/ion/bug730115.js create mode 100644 js/src/jit-test/tests/ion/bug730152.js create mode 100644 js/src/jit-test/tests/ion/bug730977-implement-jsop-delprop.js create mode 100644 js/src/jit-test/tests/ion/bug731820.js create mode 100644 js/src/jit-test/tests/ion/bug732758.js create mode 100644 js/src/jit-test/tests/ion/bug732846.js create mode 100644 js/src/jit-test/tests/ion/bug732847.js create mode 100644 js/src/jit-test/tests/ion/bug732849.js create mode 100644 js/src/jit-test/tests/ion/bug732850.js create mode 100644 js/src/jit-test/tests/ion/bug732851.js create mode 100644 js/src/jit-test/tests/ion/bug732858.js create mode 100644 js/src/jit-test/tests/ion/bug732859.js create mode 100644 js/src/jit-test/tests/ion/bug732860.js create mode 100644 js/src/jit-test/tests/ion/bug732862.js create mode 100644 js/src/jit-test/tests/ion/bug732863.js create mode 100644 js/src/jit-test/tests/ion/bug732864.js create mode 100644 js/src/jit-test/tests/ion/bug734383.js create mode 100644 js/src/jit-test/tests/ion/bug736135-2.js create mode 100644 js/src/jit-test/tests/ion/bug736135.js create mode 100644 js/src/jit-test/tests/ion/bug736141.js create mode 100644 js/src/jit-test/tests/ion/bug739854.js create mode 100644 js/src/jit-test/tests/ion/bug741202.js create mode 100644 js/src/jit-test/tests/ion/bug741241.js create mode 100644 js/src/jit-test/tests/ion/bug743099.js create mode 100644 js/src/jit-test/tests/ion/bug746370.js create mode 100644 js/src/jit-test/tests/ion/bug747271.js create mode 100644 js/src/jit-test/tests/ion/bug750588.js create mode 100644 js/src/jit-test/tests/ion/bug754713-1.js create mode 100644 js/src/jit-test/tests/ion/bug754713-2.js create mode 100644 js/src/jit-test/tests/ion/bug754713-3.js create mode 100644 js/src/jit-test/tests/ion/bug754713-4.js create mode 100644 js/src/jit-test/tests/ion/bug754720.js create mode 100644 js/src/jit-test/tests/ion/bug755157.js create mode 100644 js/src/jit-test/tests/ion/bug755832.js create mode 100644 js/src/jit-test/tests/ion/bug756235.js create mode 100644 js/src/jit-test/tests/ion/bug756238.js create mode 100644 js/src/jit-test/tests/ion/bug756240.js create mode 100644 js/src/jit-test/tests/ion/bug756247.js create mode 100644 js/src/jit-test/tests/ion/bug756780.js create mode 100644 js/src/jit-test/tests/ion/bug756781.js create mode 100644 js/src/jit-test/tests/ion/bug758181.js create mode 100644 js/src/jit-test/tests/ion/bug758991.js create mode 100644 js/src/jit-test/tests/ion/bug759213.js create mode 100644 js/src/jit-test/tests/ion/bug760103.js create mode 100644 js/src/jit-test/tests/ion/bug761835.js create mode 100644 js/src/jit-test/tests/ion/bug761854.js create mode 100644 js/src/jit-test/tests/ion/bug762547.js create mode 100644 js/src/jit-test/tests/ion/bug764432.js create mode 100644 js/src/jit-test/tests/ion/bug764792.js create mode 100644 js/src/jit-test/tests/ion/bug765454.js create mode 100644 js/src/jit-test/tests/ion/bug765477.js create mode 100644 js/src/jit-test/tests/ion/bug765478.js create mode 100644 js/src/jit-test/tests/ion/bug765480.js create mode 100644 js/src/jit-test/tests/ion/bug766218.js create mode 100644 js/src/jit-test/tests/ion/bug767665.js create mode 100644 js/src/jit-test/tests/ion/bug768436.js create mode 100644 js/src/jit-test/tests/ion/bug770235.js create mode 100644 js/src/jit-test/tests/ion/bug770762.js create mode 100644 js/src/jit-test/tests/ion/bug772901.js create mode 100644 js/src/jit-test/tests/ion/bug773587.js create mode 100644 js/src/jit-test/tests/ion/bug774006.js create mode 100644 js/src/jit-test/tests/ion/bug774644.js create mode 100644 js/src/jit-test/tests/ion/bug776687.js create mode 100644 js/src/jit-test/tests/ion/bug776748.js create mode 100644 js/src/jit-test/tests/ion/bug779125.js create mode 100644 js/src/jit-test/tests/ion/bug779245.js create mode 100644 js/src/jit-test/tests/ion/bug779595.js create mode 100644 js/src/jit-test/tests/ion/bug779812.js create mode 100644 js/src/jit-test/tests/ion/bug779841.js create mode 100644 js/src/jit-test/tests/ion/bug780842.js create mode 100644 js/src/jit-test/tests/ion/bug782087.js create mode 100644 js/src/jit-test/tests/ion/bug783590.js create mode 100644 js/src/jit-test/tests/ion/bug784385.js create mode 100644 js/src/jit-test/tests/ion/bug786107.js create mode 100644 js/src/jit-test/tests/ion/bug787921.js create mode 100644 js/src/jit-test/tests/ion/bug789300.js create mode 100644 js/src/jit-test/tests/ion/bug789420.js create mode 100644 js/src/jit-test/tests/ion/bug790479.js create mode 100644 js/src/jit-test/tests/ion/bug792166-1.js create mode 100644 js/src/jit-test/tests/ion/bug792166-2.js create mode 100644 js/src/jit-test/tests/ion/bug792220.js create mode 100644 js/src/jit-test/tests/ion/bug792234.js create mode 100644 js/src/jit-test/tests/ion/bug792944.js create mode 100644 js/src/jit-test/tests/ion/bug798819.js create mode 100644 js/src/jit-test/tests/ion/bug798823.js create mode 100644 js/src/jit-test/tests/ion/bug798946.js create mode 100644 js/src/jit-test/tests/ion/bug799185-2.js create mode 100644 js/src/jit-test/tests/ion/bug799185-3.js create mode 100644 js/src/jit-test/tests/ion/bug799185-4.js create mode 100644 js/src/jit-test/tests/ion/bug799185-5.js create mode 100644 js/src/jit-test/tests/ion/bug799185-6.js create mode 100644 js/src/jit-test/tests/ion/bug799185-7.js create mode 100644 js/src/jit-test/tests/ion/bug799185-8.js create mode 100644 js/src/jit-test/tests/ion/bug799185-9.js create mode 100644 js/src/jit-test/tests/ion/bug800179.js create mode 100644 js/src/jit-test/tests/ion/bug804064.js create mode 100644 js/src/jit-test/tests/ion/bug807035.js create mode 100644 js/src/jit-test/tests/ion/bug807047.js create mode 100644 js/src/jit-test/tests/ion/bug808023.js create mode 100644 js/src/jit-test/tests/ion/bug809021.js create mode 100644 js/src/jit-test/tests/ion/bug809472.js create mode 100644 js/src/jit-test/tests/ion/bug810253.js create mode 100644 js/src/jit-test/tests/ion/bug813784.js create mode 100644 js/src/jit-test/tests/ion/bug816492.js create mode 100644 js/src/jit-test/tests/ion/bug816786.js create mode 100644 js/src/jit-test/tests/ion/bug818023.js create mode 100644 js/src/jit-test/tests/ion/bug819611.js create mode 100644 js/src/jit-test/tests/ion/bug819794.js create mode 100644 js/src/jit-test/tests/ion/bug819865.js create mode 100644 js/src/jit-test/tests/ion/bug820873.js create mode 100644 js/src/jit-test/tests/ion/bug821788.js create mode 100644 js/src/jit-test/tests/ion/bug821794.js create mode 100644 js/src/jit-test/tests/ion/bug822938.js create mode 100644 js/src/jit-test/tests/ion/bug824347.js create mode 100644 js/src/jit-test/tests/ion/bug824473.js create mode 100644 js/src/jit-test/tests/ion/bug824863.js create mode 100644 js/src/jit-test/tests/ion/bug825599.js create mode 100644 js/src/jit-test/tests/ion/bug825705.js create mode 100644 js/src/jit-test/tests/ion/bug825716.js create mode 100644 js/src/jit-test/tests/ion/bug827082.js create mode 100644 js/src/jit-test/tests/ion/bug827659-1.js create mode 100644 js/src/jit-test/tests/ion/bug827821-2.js create mode 100644 js/src/jit-test/tests/ion/bug827821-3.js create mode 100644 js/src/jit-test/tests/ion/bug830269.js create mode 100644 js/src/jit-test/tests/ion/bug831087.js create mode 100644 js/src/jit-test/tests/ion/bug831424-1.js create mode 100644 js/src/jit-test/tests/ion/bug831424-2.js create mode 100644 js/src/jit-test/tests/ion/bug832058.js create mode 100644 js/src/jit-test/tests/ion/bug833076.js create mode 100644 js/src/jit-test/tests/ion/bug835178.js create mode 100644 js/src/jit-test/tests/ion/bug835496.js create mode 100644 js/src/jit-test/tests/ion/bug836102.js create mode 100644 js/src/jit-test/tests/ion/bug836274.js create mode 100644 js/src/jit-test/tests/ion/bug836705.js create mode 100644 js/src/jit-test/tests/ion/bug837312.js create mode 100644 js/src/jit-test/tests/ion/bug839315.js create mode 100644 js/src/jit-test/tests/ion/bug843866.js create mode 100644 js/src/jit-test/tests/ion/bug843875.js create mode 100644 js/src/jit-test/tests/ion/bug844059.js create mode 100644 js/src/jit-test/tests/ion/bug844364.js create mode 100644 js/src/jit-test/tests/ion/bug844452.js create mode 100644 js/src/jit-test/tests/ion/bug844459.js create mode 100644 js/src/jit-test/tests/ion/bug846330.js create mode 100644 js/src/jit-test/tests/ion/bug847412.js create mode 100644 js/src/jit-test/tests/ion/bug848319.js create mode 100644 js/src/jit-test/tests/ion/bug848733.js create mode 100644 js/src/jit-test/tests/ion/bug848803.js create mode 100644 js/src/jit-test/tests/ion/bug849781-2.js create mode 100644 js/src/jit-test/tests/ion/bug849781.js create mode 100644 js/src/jit-test/tests/ion/bug850099.js create mode 100644 js/src/jit-test/tests/ion/bug851064.js create mode 100644 js/src/jit-test/tests/ion/bug851067.js create mode 100644 js/src/jit-test/tests/ion/bug851792.js create mode 100644 js/src/jit-test/tests/ion/bug852140.js create mode 100644 js/src/jit-test/tests/ion/bug852342.js create mode 100644 js/src/jit-test/tests/ion/bug855514.js create mode 100644 js/src/jit-test/tests/ion/bug858586.js create mode 100644 js/src/jit-test/tests/ion/bug858617.js create mode 100644 js/src/jit-test/tests/ion/bug860838-1.js create mode 100644 js/src/jit-test/tests/ion/bug860838-2.js create mode 100644 js/src/jit-test/tests/ion/bug860838-3.js create mode 100644 js/src/jit-test/tests/ion/bug860838-4.js create mode 100644 js/src/jit-test/tests/ion/bug860838.js create mode 100644 js/src/jit-test/tests/ion/bug861165.js create mode 100644 js/src/jit-test/tests/ion/bug861419.js create mode 100644 js/src/jit-test/tests/ion/bug861439.js create mode 100644 js/src/jit-test/tests/ion/bug862100.js create mode 100644 js/src/jit-test/tests/ion/bug862357.js create mode 100644 js/src/jit-test/tests/ion/bug863261.js create mode 100644 js/src/jit-test/tests/ion/bug863755.js create mode 100644 js/src/jit-test/tests/ion/bug866611.js create mode 100644 js/src/jit-test/tests/ion/bug867820.js create mode 100644 js/src/jit-test/tests/ion/bug870328.js create mode 100644 js/src/jit-test/tests/ion/bug870356.js create mode 100644 js/src/jit-test/tests/ion/bug872331.js create mode 100644 js/src/jit-test/tests/ion/bug875452.js create mode 100644 js/src/jit-test/tests/ion/bug875656.js create mode 100644 js/src/jit-test/tests/ion/bug875804.js create mode 100644 js/src/jit-test/tests/ion/bug876465.js create mode 100644 js/src/jit-test/tests/ion/bug877936-2.js create mode 100644 js/src/jit-test/tests/ion/bug877936.js create mode 100644 js/src/jit-test/tests/ion/bug878444.js create mode 100644 js/src/jit-test/tests/ion/bug878510.js create mode 100644 js/src/jit-test/tests/ion/bug882323.js create mode 100644 js/src/jit-test/tests/ion/bug882565-1.js create mode 100644 js/src/jit-test/tests/ion/bug882565.js create mode 100644 js/src/jit-test/tests/ion/bug883490.js create mode 100644 js/src/jit-test/tests/ion/bug885660.js create mode 100644 js/src/jit-test/tests/ion/bug886243.js create mode 100644 js/src/jit-test/tests/ion/bug886246.js create mode 100644 js/src/jit-test/tests/ion/bug888568.js create mode 100644 js/src/jit-test/tests/ion/bug889186.js create mode 100644 js/src/jit-test/tests/ion/bug889451.js create mode 100644 js/src/jit-test/tests/ion/bug890722.js create mode 100644 js/src/jit-test/tests/ion/bug892426.js create mode 100644 js/src/jit-test/tests/ion/bug892794.js create mode 100644 js/src/jit-test/tests/ion/bug893732.js create mode 100644 js/src/jit-test/tests/ion/bug893853.js create mode 100644 js/src/jit-test/tests/ion/bug894786-2.js create mode 100644 js/src/jit-test/tests/ion/bug894786.js create mode 100644 js/src/jit-test/tests/ion/bug894794.js create mode 100644 js/src/jit-test/tests/ion/bug897747.js create mode 100644 js/src/jit-test/tests/ion/bug898047.js create mode 100644 js/src/jit-test/tests/ion/bug898857.js create mode 100644 js/src/jit-test/tests/ion/bug901086.js create mode 100644 js/src/jit-test/tests/ion/bug901391.js create mode 100644 js/src/jit-test/tests/ion/bug904315.js create mode 100644 js/src/jit-test/tests/ion/bug905166.js create mode 100644 js/src/jit-test/tests/ion/bug905986.js create mode 100644 js/src/jit-test/tests/ion/bug905999.js create mode 100644 js/src/jit-test/tests/ion/bug906035.js create mode 100644 js/src/jit-test/tests/ion/bug906284.js create mode 100644 js/src/jit-test/tests/ion/bug908903.js create mode 100644 js/src/jit-test/tests/ion/bug909401.js create mode 100644 js/src/jit-test/tests/ion/bug909505.js create mode 100644 js/src/jit-test/tests/ion/bug909601.js create mode 100644 js/src/jit-test/tests/ion/bug909997.js create mode 100644 js/src/jit-test/tests/ion/bug911369.js create mode 100644 js/src/jit-test/tests/ion/bug911707.js create mode 100644 js/src/jit-test/tests/ion/bug912152.js create mode 100644 js/src/jit-test/tests/ion/bug913749.js create mode 100644 js/src/jit-test/tests/ion/bug914098.js create mode 100644 js/src/jit-test/tests/ion/bug914341.js create mode 100644 js/src/jit-test/tests/ion/bug915301.js create mode 100644 js/src/jit-test/tests/ion/bug915608.js create mode 100644 js/src/jit-test/tests/ion/bug915903.js create mode 100644 js/src/jit-test/tests/ion/bug916712.js create mode 100644 js/src/jit-test/tests/ion/bug916752.js create mode 100644 js/src/jit-test/tests/ion/bug919118.js create mode 100644 js/src/jit-test/tests/ion/bug921035.js create mode 100644 js/src/jit-test/tests/ion/bug922118.js create mode 100644 js/src/jit-test/tests/ion/bug924538.js create mode 100644 js/src/jit-test/tests/ion/bug925067-1.js create mode 100644 js/src/jit-test/tests/ion/bug925067-2.js create mode 100644 js/src/jit-test/tests/ion/bug925067-3.js create mode 100644 js/src/jit-test/tests/ion/bug925305.js create mode 100644 js/src/jit-test/tests/ion/bug925308.js create mode 100644 js/src/jit-test/tests/ion/bug927389.js create mode 100644 js/src/jit-test/tests/ion/bug928423.js create mode 100644 js/src/jit-test/tests/ion/bug928542.js create mode 100644 js/src/jit-test/tests/ion/bug928625.js create mode 100644 js/src/jit-test/tests/ion/bug930327.js create mode 100644 js/src/jit-test/tests/ion/bug930990.js create mode 100644 js/src/jit-test/tests/ion/bug930993.js create mode 100644 js/src/jit-test/tests/ion/bug931496.js create mode 100644 js/src/jit-test/tests/ion/bug936740.js create mode 100644 js/src/jit-test/tests/ion/bug939868-2.js create mode 100644 js/src/jit-test/tests/ion/bug939868.js create mode 100644 js/src/jit-test/tests/ion/bug940635.js create mode 100644 js/src/jit-test/tests/ion/bug940846.js create mode 100644 js/src/jit-test/tests/ion/bug942550.js create mode 100644 js/src/jit-test/tests/ion/bug942604.js create mode 100644 js/src/jit-test/tests/ion/bug944080.js create mode 100644 js/src/jit-test/tests/ion/bug945294.js create mode 100644 js/src/jit-test/tests/ion/bug945512.js create mode 100644 js/src/jit-test/tests/ion/bug945811.js create mode 100644 js/src/jit-test/tests/ion/bug946284.js create mode 100644 js/src/jit-test/tests/ion/bug946969.js create mode 100644 js/src/jit-test/tests/ion/bug950462.js create mode 100644 js/src/jit-test/tests/ion/bug950764.js create mode 100644 js/src/jit-test/tests/ion/bug953164.js create mode 100644 js/src/jit-test/tests/ion/bug956156.js create mode 100644 js/src/jit-test/tests/ion/bug958381.js create mode 100644 js/src/jit-test/tests/ion/bug958432.js create mode 100644 js/src/jit-test/tests/ion/bug964229-2.js create mode 100644 js/src/jit-test/tests/ion/bug964229.js create mode 100644 js/src/jit-test/tests/ion/bug965712.js create mode 100644 js/src/jit-test/tests/ion/bug966926.js create mode 100644 js/src/jit-test/tests/ion/bug969203.js create mode 100644 js/src/jit-test/tests/ion/bug973118.js create mode 100644 js/src/jit-test/tests/ion/bug975290.js create mode 100644 js/src/jit-test/tests/ion/bug976110.js create mode 100644 js/src/jit-test/tests/ion/bug977966.js create mode 100644 js/src/jit-test/tests/ion/bug980119.js create mode 100644 js/src/jit-test/tests/ion/bug981325.js create mode 100644 js/src/jit-test/tests/ion/bug984018.js create mode 100644 js/src/jit-test/tests/ion/bug984830.js create mode 100644 js/src/jit-test/tests/ion/bug989586.js create mode 100644 js/src/jit-test/tests/ion/bug991457.js create mode 100644 js/src/jit-test/tests/ion/bug994016.js create mode 100644 js/src/jit-test/tests/ion/bug995673.js create mode 100644 js/src/jit-test/tests/ion/bug995675.js create mode 100644 js/src/jit-test/tests/ion/bug995817.js create mode 100644 js/src/jit-test/tests/ion/bug995826.js create mode 100644 js/src/jit-test/tests/ion/bug998059.js create mode 100644 js/src/jit-test/tests/ion/call-generic-args.js create mode 100644 js/src/jit-test/tests/ion/call-generic-bound.js create mode 100644 js/src/jit-test/tests/ion/call-generic-constructor.js create mode 100644 js/src/jit-test/tests/ion/call-generic-cross-realm.js create mode 100644 js/src/jit-test/tests/ion/call-generic-fun-call.js create mode 100644 js/src/jit-test/tests/ion/call-generic-methods.js create mode 100644 js/src/jit-test/tests/ion/call-generic-new-target.js create mode 100644 js/src/jit-test/tests/ion/call-generic-throw-2.js create mode 100644 js/src/jit-test/tests/ion/call-generic-throw.js create mode 100644 js/src/jit-test/tests/ion/callTypeBarriers.js create mode 100644 js/src/jit-test/tests/ion/callgname.js create mode 100644 js/src/jit-test/tests/ion/callobj-tdz.js create mode 100644 js/src/jit-test/tests/ion/ceil.js create mode 100644 js/src/jit-test/tests/ion/close-iterators-1.js create mode 100644 js/src/jit-test/tests/ion/compare-char.js create mode 100644 js/src/jit-test/tests/ion/compare-string.js create mode 100644 js/src/jit-test/tests/ion/compareAll.js create mode 100644 js/src/jit-test/tests/ion/condswitch.js create mode 100644 js/src/jit-test/tests/ion/context-override.js create mode 100644 js/src/jit-test/tests/ion/dce-with-rinstructions.js create mode 100644 js/src/jit-test/tests/ion/dense-elem-write-barrier.js create mode 100644 js/src/jit-test/tests/ion/directEval.js create mode 100644 js/src/jit-test/tests/ion/div-by-constant-bug1555153.js create mode 100644 js/src/jit-test/tests/ion/divmodself.js create mode 100644 js/src/jit-test/tests/ion/double-array-loop-phi.js create mode 100644 js/src/jit-test/tests/ion/doubleArrays.js create mode 100644 js/src/jit-test/tests/ion/doubleComparisons.js create mode 100644 js/src/jit-test/tests/ion/eliminate-type-barrier.js create mode 100644 js/src/jit-test/tests/ion/eliminate-unreachable-1.js create mode 100644 js/src/jit-test/tests/ion/eliminate-unreachable-2.js create mode 100644 js/src/jit-test/tests/ion/entryOverflowBailout.js create mode 100644 js/src/jit-test/tests/ion/eval-neg0.js create mode 100644 js/src/jit-test/tests/ion/evalCallingName.js create mode 100644 js/src/jit-test/tests/ion/exc-bailout-double-reg.js create mode 100644 js/src/jit-test/tests/ion/exc-bailout-float32-reg.js create mode 100644 js/src/jit-test/tests/ion/expando-realloc-slots.js create mode 100644 js/src/jit-test/tests/ion/filtertypeset-float32.js create mode 100644 js/src/jit-test/tests/ion/fold-in.js create mode 100644 js/src/jit-test/tests/ion/fold-linear-arith-bug1316830.js create mode 100644 js/src/jit-test/tests/ion/fold-linear-arith-bug1319242.js create mode 100644 js/src/jit-test/tests/ion/fold-linear-arith-bug1528829.js create mode 100644 js/src/jit-test/tests/ion/fold-needless-control-flow.js create mode 100644 js/src/jit-test/tests/ion/for-in-iterator-1.js create mode 100644 js/src/jit-test/tests/ion/fromcharcode-charcodeat-zero.js create mode 100644 js/src/jit-test/tests/ion/gc-during-bailout.js create mode 100644 js/src/jit-test/tests/ion/getPropertyCacheOverflow.js create mode 100644 js/src/jit-test/tests/ion/getelem-bounds-coalesce.js create mode 100644 js/src/jit-test/tests/ion/getelem-bounds-hoist.js create mode 100644 js/src/jit-test/tests/ion/getelem-hole.js create mode 100644 js/src/jit-test/tests/ion/getelem-proto.js create mode 100644 js/src/jit-test/tests/ion/getelem-string.js create mode 100644 js/src/jit-test/tests/ion/getelem.js create mode 100644 js/src/jit-test/tests/ion/getgname-getter.js create mode 100644 js/src/jit-test/tests/ion/getgname.js create mode 100644 js/src/jit-test/tests/ion/getprop-cache.js create mode 100644 js/src/jit-test/tests/ion/getprop-constant.js create mode 100644 js/src/jit-test/tests/ion/getprop-idempotent-cache-1.js create mode 100644 js/src/jit-test/tests/ion/getprop-idempotent-cache-2.js create mode 100644 js/src/jit-test/tests/ion/getprop-primitive.js create mode 100644 js/src/jit-test/tests/ion/gvn-unremovable-phi-bug1317675.js create mode 100644 js/src/jit-test/tests/ion/has-definite-folding.js create mode 100644 js/src/jit-test/tests/ion/hasOwn-megamorphic.js create mode 100644 js/src/jit-test/tests/ion/hole.js create mode 100644 js/src/jit-test/tests/ion/ic-fuzz-0.js create mode 100644 js/src/jit-test/tests/ion/idempotentCache.js create mode 100644 js/src/jit-test/tests/ion/idiv-by-constant.js create mode 100644 js/src/jit-test/tests/ion/iloop.js create mode 100644 js/src/jit-test/tests/ion/inline-Math-random-before-called.js create mode 100644 js/src/jit-test/tests/ion/inline-doubles.js create mode 100644 js/src/jit-test/tests/ion/inlining/array-pop.js create mode 100644 js/src/jit-test/tests/ion/inlining/array-push.js create mode 100644 js/src/jit-test/tests/ion/inlining/bug705251.js create mode 100644 js/src/jit-test/tests/ion/inlining/call-apply-non-singletons.js create mode 100644 js/src/jit-test/tests/ion/inlining/exception-during-inlining-decision.js create mode 100644 js/src/jit-test/tests/ion/inlining/getelem-getter-bailout.js create mode 100644 js/src/jit-test/tests/ion/inlining/getelem-getter-frameiter.js create mode 100644 js/src/jit-test/tests/ion/inlining/getelem-getter-id-mismatch.js create mode 100644 js/src/jit-test/tests/ion/inlining/getelem-getter-megamorphic.js create mode 100644 js/src/jit-test/tests/ion/inlining/getelem-getter-noninlined-call.js create mode 100644 js/src/jit-test/tests/ion/inlining/getelem-getter-own.js create mode 100644 js/src/jit-test/tests/ion/inlining/getelem-getter-proto.js create mode 100644 js/src/jit-test/tests/ion/inlining/inline-callarg-bailout-phi.js create mode 100644 js/src/jit-test/tests/ion/inlining/inline-callarg-bailout.js create mode 100644 js/src/jit-test/tests/ion/inlining/inline-callarg-ubench-no-double2.js create mode 100644 js/src/jit-test/tests/ion/inlining/inline-getelem-args.js create mode 100644 js/src/jit-test/tests/ion/inlining/inline-istypedarray-on-nontypedarray.js create mode 100644 js/src/jit-test/tests/ion/inlining/isFiniteInline.js create mode 100644 js/src/jit-test/tests/ion/inlining/isNaNInline.js create mode 100644 js/src/jit-test/tests/ion/inlining/object-is-stricteq.js create mode 100644 js/src/jit-test/tests/ion/inlining/typedarray-data-inlining-neuter-samedata.js create mode 100644 js/src/jit-test/tests/ion/inlining/typedarray-large-length.js create mode 100644 js/src/jit-test/tests/ion/inlining/typedarray-length-inlining-neuter.js create mode 100644 js/src/jit-test/tests/ion/instanceof-mutate-proto.js create mode 100644 js/src/jit-test/tests/ion/invalidation/easy-invalidate.js create mode 100644 js/src/jit-test/tests/ion/invalidation/framedescriptors.js create mode 100644 js/src/jit-test/tests/ion/invalidation/outofline.js create mode 100644 js/src/jit-test/tests/ion/invalidation/recursive-invalidate.js create mode 100644 js/src/jit-test/tests/ion/is-constructing.js create mode 100644 js/src/jit-test/tests/ion/isArray.js create mode 100644 js/src/jit-test/tests/ion/iterator-indices-1.js create mode 100644 js/src/jit-test/tests/ion/iterator-indices-2.js create mode 100644 js/src/jit-test/tests/ion/iterator-indices-3.js create mode 100644 js/src/jit-test/tests/ion/iterator-indices-4.js create mode 100644 js/src/jit-test/tests/ion/iterator-indices-5.js create mode 100644 js/src/jit-test/tests/ion/iterator-indices-6.js create mode 100644 js/src/jit-test/tests/ion/iterator-indices-7.js create mode 100644 js/src/jit-test/tests/ion/iterator-indices-8.js create mode 100644 js/src/jit-test/tests/ion/iterator-indices-9.js create mode 100644 js/src/jit-test/tests/ion/known-class.js create mode 100644 js/src/jit-test/tests/ion/lambda.js create mode 100644 js/src/jit-test/tests/ion/lazyLink-bug1150783.js create mode 100644 js/src/jit-test/tests/ion/lexical-check-1.js create mode 100644 js/src/jit-test/tests/ion/lexical-check-2.js create mode 100644 js/src/jit-test/tests/ion/lexical-check-3.js create mode 100644 js/src/jit-test/tests/ion/lexical-check-4.js create mode 100644 js/src/jit-test/tests/ion/lexical-check-5.js create mode 100644 js/src/jit-test/tests/ion/lexical-check-6.js create mode 100644 js/src/jit-test/tests/ion/lookupswitch.js create mode 100644 js/src/jit-test/tests/ion/loop-test-fold.js create mode 100644 js/src/jit-test/tests/ion/lsra-bug1112164.js create mode 100644 js/src/jit-test/tests/ion/math-imul-folding.js create mode 100644 js/src/jit-test/tests/ion/math-max-arraylength.js create mode 100644 js/src/jit-test/tests/ion/mathFloor.js create mode 100644 js/src/jit-test/tests/ion/mathMinMax.js create mode 100644 js/src/jit-test/tests/ion/mathRound.js create mode 100644 js/src/jit-test/tests/ion/mathSign.js create mode 100644 js/src/jit-test/tests/ion/mathTrunc.js create mode 100644 js/src/jit-test/tests/ion/megamorphic-null-and-undefined.js create mode 100644 js/src/jit-test/tests/ion/merge-phi-usage-analysis.js create mode 100644 js/src/jit-test/tests/ion/mod-double.js create mode 100644 js/src/jit-test/tests/ion/monomorphic-inlining.js create mode 100644 js/src/jit-test/tests/ion/monomorphic-property-access.js create mode 100644 js/src/jit-test/tests/ion/muli-constant-1-bug1534810.js create mode 100644 js/src/jit-test/tests/ion/nativeElementAccesses.js create mode 100644 js/src/jit-test/tests/ion/new-0.js create mode 100644 js/src/jit-test/tests/ion/new-1.js create mode 100644 js/src/jit-test/tests/ion/new-10.js create mode 100644 js/src/jit-test/tests/ion/new-2.js create mode 100644 js/src/jit-test/tests/ion/new-3.js create mode 100644 js/src/jit-test/tests/ion/new-4.js create mode 100644 js/src/jit-test/tests/ion/new-5.js create mode 100644 js/src/jit-test/tests/ion/new-6.js create mode 100644 js/src/jit-test/tests/ion/new-7.js create mode 100644 js/src/jit-test/tests/ion/new-8.js create mode 100644 js/src/jit-test/tests/ion/new-9.js create mode 100644 js/src/jit-test/tests/ion/new-object-with-dynamic-slots.js create mode 100644 js/src/jit-test/tests/ion/notV.js create mode 100644 js/src/jit-test/tests/ion/nursery-getter-setter.js create mode 100644 js/src/jit-test/tests/ion/nursery-getter-setter2.js create mode 100644 js/src/jit-test/tests/ion/object-create-with-primitive-second-arg-in-ion.js create mode 100644 js/src/jit-test/tests/ion/object-create.js create mode 100644 js/src/jit-test/tests/ion/object-keys-00.js create mode 100644 js/src/jit-test/tests/ion/object-keys-01.js create mode 100644 js/src/jit-test/tests/ion/object-keys-02.js create mode 100644 js/src/jit-test/tests/ion/object-keys-03.js create mode 100644 js/src/jit-test/tests/ion/object-keys-04.js create mode 100644 js/src/jit-test/tests/ion/object-keys-05.js create mode 100644 js/src/jit-test/tests/ion/object-prototype-tostring.js create mode 100644 js/src/jit-test/tests/ion/osr-with-optimized-out.js create mode 100644 js/src/jit-test/tests/ion/pgo-bug1252120.js create mode 100644 js/src/jit-test/tests/ion/pgo-bug1259476.js create mode 100644 js/src/jit-test/tests/ion/popn.js create mode 100644 js/src/jit-test/tests/ion/pow-base-power-of-two-bailouts.js create mode 100644 js/src/jit-test/tests/ion/pow-base-power-of-two.js create mode 100644 js/src/jit-test/tests/ion/pow-constant-power.js create mode 100644 js/src/jit-test/tests/ion/range-analysis-bug1122402.js create mode 100644 js/src/jit-test/tests/ion/range-analysis-bug1124448.js create mode 100644 js/src/jit-test/tests/ion/range-analysis.js create mode 100644 js/src/jit-test/tests/ion/recover-arguments.js create mode 100644 js/src/jit-test/tests/ion/recover-arrays.js create mode 100644 js/src/jit-test/tests/ion/recover-autounsafe-2.js create mode 100644 js/src/jit-test/tests/ion/recover-autounsafe.js create mode 100644 js/src/jit-test/tests/ion/recover-bigint.js create mode 100644 js/src/jit-test/tests/ion/recover-bug1236114.js create mode 100644 js/src/jit-test/tests/ion/recover-empty-new-object.js create mode 100644 js/src/jit-test/tests/ion/recover-inline-arguments-debugger.js create mode 100644 js/src/jit-test/tests/ion/recover-inline-arguments.js create mode 100644 js/src/jit-test/tests/ion/recover-inline-rest.js create mode 100644 js/src/jit-test/tests/ion/recover-lambdas-bug1113940.js create mode 100644 js/src/jit-test/tests/ion/recover-lambdas-bug1114566.js create mode 100644 js/src/jit-test/tests/ion/recover-lambdas-bug1118911.js create mode 100644 js/src/jit-test/tests/ion/recover-lambdas-bug1133389.js create mode 100644 js/src/jit-test/tests/ion/recover-lambdas.js create mode 100644 js/src/jit-test/tests/ion/recover-newarrayiterator-close.js create mode 100644 js/src/jit-test/tests/ion/recover-newarrayiterator.js create mode 100644 js/src/jit-test/tests/ion/recover-newstringiterator.js create mode 100644 js/src/jit-test/tests/ion/recover-object-bug1174322.js create mode 100644 js/src/jit-test/tests/ion/recover-object-bug1175233.js create mode 100644 js/src/jit-test/tests/ion/recover-objects.js create mode 100644 js/src/jit-test/tests/ion/recover-rest-osr.js create mode 100644 js/src/jit-test/tests/ion/recover-rest.js create mode 100644 js/src/jit-test/tests/ion/recover-typed-array.js create mode 100644 js/src/jit-test/tests/ion/regexp-clone.js create mode 100644 js/src/jit-test/tests/ion/regexp-exec.js create mode 100644 js/src/jit-test/tests/ion/result-type-mutated.js create mode 100644 js/src/jit-test/tests/ion/rinstructions-no-sse4.js create mode 100644 js/src/jit-test/tests/ion/round-float32.js create mode 100644 js/src/jit-test/tests/ion/scalar-replacement-oom.js create mode 100644 js/src/jit-test/tests/ion/scripted-getter-setter.js create mode 100644 js/src/jit-test/tests/ion/selfhosted-too-many-args.js create mode 100644 js/src/jit-test/tests/ion/setelem-float32-typedarray-ic.js create mode 100644 js/src/jit-test/tests/ion/setelem-hole.js create mode 100644 js/src/jit-test/tests/ion/setelem-proto.js create mode 100644 js/src/jit-test/tests/ion/setelem.js create mode 100644 js/src/jit-test/tests/ion/setgname-reconfigured.js create mode 100644 js/src/jit-test/tests/ion/setgname.js create mode 100644 js/src/jit-test/tests/ion/setpropertypolymorphic-float32.js create mode 100644 js/src/jit-test/tests/ion/sincos-abi-args-bug1534492.js create mode 100644 js/src/jit-test/tests/ion/sink-in-recovered-object.js create mode 100644 js/src/jit-test/tests/ion/smallObjectVariableKeyHasProp-1.js create mode 100644 js/src/jit-test/tests/ion/smallObjectVariableKeyHasProp-2.js create mode 100644 js/src/jit-test/tests/ion/smallObjectVariableKeyHasProp-3.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-1.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-2a.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-2b.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-3.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-4a.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-4b.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-5a.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-5b.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-6a.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-6b.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-static-1.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-static-2a.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-static-2b.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-static-3.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-static-4a.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-static-4b.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-static-5a.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-static-5b.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-static-6a.js create mode 100644 js/src/jit-test/tests/ion/spreadcall-not-optimized-static-6b.js create mode 100644 js/src/jit-test/tests/ion/stack-alignment-bug1126375.js create mode 100644 js/src/jit-test/tests/ion/stack-alignment.js create mode 100644 js/src/jit-test/tests/ion/string-compare.js create mode 100644 js/src/jit-test/tests/ion/string-concat-short.js create mode 100644 js/src/jit-test/tests/ion/super-getelem-profiling.js create mode 100644 js/src/jit-test/tests/ion/super-prop.js create mode 100644 js/src/jit-test/tests/ion/template-tag-callsiteobject.js create mode 100644 js/src/jit-test/tests/ion/test-scalar-replacement-float32.js create mode 100644 js/src/jit-test/tests/ion/testArrayBufferByteLength.js create mode 100644 js/src/jit-test/tests/ion/testFloat32-correctness.js create mode 100644 js/src/jit-test/tests/ion/testFloat32.js create mode 100644 js/src/jit-test/tests/ion/testInArray.js create mode 100644 js/src/jit-test/tests/ion/testIsCallable.js create mode 100644 js/src/jit-test/tests/ion/testObjectHasPrototype.js create mode 100644 js/src/jit-test/tests/ion/testPos.js create mode 100644 js/src/jit-test/tests/ion/testPossiblyWrappedArrayBufferByteLength.js create mode 100644 js/src/jit-test/tests/ion/testStringFromCodePoint.js create mode 100644 js/src/jit-test/tests/ion/testStringMatch.js create mode 100644 js/src/jit-test/tests/ion/testSubtract.js create mode 100644 js/src/jit-test/tests/ion/testVAndBranch.js create mode 100644 js/src/jit-test/tests/ion/throw.js create mode 100644 js/src/jit-test/tests/ion/timeout-iloop.js create mode 100644 js/src/jit-test/tests/ion/toid.js create mode 100644 js/src/jit-test/tests/ion/truncate.js create mode 100644 js/src/jit-test/tests/ion/truncateToInt32-ool.js create mode 100644 js/src/jit-test/tests/ion/truncateToInt32.js create mode 100644 js/src/jit-test/tests/ion/try-catch-1.js create mode 100644 js/src/jit-test/tests/ion/try-catch-2.js create mode 100644 js/src/jit-test/tests/ion/try-catch-3.js create mode 100644 js/src/jit-test/tests/ion/try-catch-4.js create mode 100644 js/src/jit-test/tests/ion/try-catch-5.js create mode 100644 js/src/jit-test/tests/ion/try-catch-6.js create mode 100644 js/src/jit-test/tests/ion/try-catch-7.js create mode 100644 js/src/jit-test/tests/ion/typed-arrays-1.js create mode 100644 js/src/jit-test/tests/ion/typed-arrays-2.js create mode 100644 js/src/jit-test/tests/ion/typed-arrays-3.js create mode 100644 js/src/jit-test/tests/ion/typedarray-length.js create mode 100644 js/src/jit-test/tests/ion/typedarray-static-load.js create mode 100644 js/src/jit-test/tests/ion/typedarray-static-store.js create mode 100644 js/src/jit-test/tests/ion/typedarrayindex-const-double-representable-as-int32.js create mode 100644 js/src/jit-test/tests/ion/typeof.js create mode 100644 js/src/jit-test/tests/ion/udiv-by-constant.js create mode 100644 js/src/jit-test/tests/ion/udiv-by-u32-constant.js create mode 100644 js/src/jit-test/tests/ion/unboxed-objects-invalidate.js create mode 100644 js/src/jit-test/tests/ion/ursh-sign-bug1528597.js create mode 100644 js/src/jit-test/tests/ion/valueToInt32.js create mode 100644 js/src/jit-test/tests/ion/void.js create mode 100644 js/src/jit-test/tests/jaeger/argumentsOptimize-1.js create mode 100644 js/src/jit-test/tests/jaeger/argumentsOptimize-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug549393-1.js create mode 100644 js/src/jit-test/tests/jaeger/bug549393-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug549396.js create mode 100644 js/src/jit-test/tests/jaeger/bug549398.js create mode 100644 js/src/jit-test/tests/jaeger/bug549521.js create mode 100644 js/src/jit-test/tests/jaeger/bug549602.js create mode 100644 js/src/jit-test/tests/jaeger/bug549603.js create mode 100644 js/src/jit-test/tests/jaeger/bug550490.js create mode 100644 js/src/jit-test/tests/jaeger/bug551603.js create mode 100644 js/src/jit-test/tests/jaeger/bug553784.js create mode 100644 js/src/jit-test/tests/jaeger/bug554580-3.js create mode 100644 js/src/jit-test/tests/jaeger/bug554580-5.js create mode 100644 js/src/jit-test/tests/jaeger/bug554651.js create mode 100644 js/src/jit-test/tests/jaeger/bug554675-1.js create mode 100644 js/src/jit-test/tests/jaeger/bug555155.js create mode 100644 js/src/jit-test/tests/jaeger/bug555206.js create mode 100644 js/src/jit-test/tests/jaeger/bug557070.js create mode 100644 js/src/jit-test/tests/jaeger/bug557075.js create mode 100644 js/src/jit-test/tests/jaeger/bug560221.js create mode 100644 js/src/jit-test/tests/jaeger/bug563000/eif-call-newvar.js create mode 100644 js/src/jit-test/tests/jaeger/bug563000/eif-call-typechange.js create mode 100644 js/src/jit-test/tests/jaeger/bug563000/eif-call.js create mode 100644 js/src/jit-test/tests/jaeger/bug563000/eif-getter-newvar.js create mode 100644 js/src/jit-test/tests/jaeger/bug563000/eif-getter-typechange.js create mode 100644 js/src/jit-test/tests/jaeger/bug563000/eif-getter.js create mode 100644 js/src/jit-test/tests/jaeger/bug563000/eif-global-newvar.js create mode 100644 js/src/jit-test/tests/jaeger/bug565198.js create mode 100644 js/src/jit-test/tests/jaeger/bug566022.js create mode 100644 js/src/jit-test/tests/jaeger/bug573433.js create mode 100644 js/src/jit-test/tests/jaeger/bug576398.js create mode 100644 js/src/jit-test/tests/jaeger/bug577580.js create mode 100644 js/src/jit-test/tests/jaeger/bug577646.js create mode 100644 js/src/jit-test/tests/jaeger/bug577705.js create mode 100644 js/src/jit-test/tests/jaeger/bug580712.js create mode 100644 js/src/jit-test/tests/jaeger/bug580884-3.js create mode 100644 js/src/jit-test/tests/jaeger/bug580884.js create mode 100644 js/src/jit-test/tests/jaeger/bug580931-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug581871.js create mode 100644 js/src/jit-test/tests/jaeger/bug581936.js create mode 100644 js/src/jit-test/tests/jaeger/bug582185.js create mode 100644 js/src/jit-test/tests/jaeger/bug582286.js create mode 100644 js/src/jit-test/tests/jaeger/bug582392.js create mode 100644 js/src/jit-test/tests/jaeger/bug582880.js create mode 100644 js/src/jit-test/tests/jaeger/bug582882.js create mode 100644 js/src/jit-test/tests/jaeger/bug582884.js create mode 100644 js/src/jit-test/tests/jaeger/bug582897.js create mode 100644 js/src/jit-test/tests/jaeger/bug582898.js create mode 100644 js/src/jit-test/tests/jaeger/bug582900.js create mode 100644 js/src/jit-test/tests/jaeger/bug583158.js create mode 100644 js/src/jit-test/tests/jaeger/bug583160.js create mode 100644 js/src/jit-test/tests/jaeger/bug583672.js create mode 100644 js/src/jit-test/tests/jaeger/bug583688.js create mode 100644 js/src/jit-test/tests/jaeger/bug583689.js create mode 100644 js/src/jit-test/tests/jaeger/bug584646.js create mode 100644 js/src/jit-test/tests/jaeger/bug584647.js create mode 100644 js/src/jit-test/tests/jaeger/bug585341.js create mode 100644 js/src/jit-test/tests/jaeger/bug585391.js create mode 100644 js/src/jit-test/tests/jaeger/bug585408-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug585408-3.js create mode 100644 js/src/jit-test/tests/jaeger/bug585408.js create mode 100644 js/src/jit-test/tests/jaeger/bug585540.js create mode 100644 js/src/jit-test/tests/jaeger/bug587431.js create mode 100644 js/src/jit-test/tests/jaeger/bug588338.js create mode 100644 js/src/jit-test/tests/jaeger/bug588362-1.js create mode 100644 js/src/jit-test/tests/jaeger/bug588362-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug588362-3.js create mode 100644 js/src/jit-test/tests/jaeger/bug588363-1.js create mode 100644 js/src/jit-test/tests/jaeger/bug588363-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug589108.js create mode 100644 js/src/jit-test/tests/jaeger/bug589461.js create mode 100644 js/src/jit-test/tests/jaeger/bug590083.js create mode 100644 js/src/jit-test/tests/jaeger/bug591606.js create mode 100644 js/src/jit-test/tests/jaeger/bug592973-1.js create mode 100644 js/src/jit-test/tests/jaeger/bug592973-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug592973-3.js create mode 100644 js/src/jit-test/tests/jaeger/bug593554.js create mode 100644 js/src/jit-test/tests/jaeger/bug595917.js create mode 100644 js/src/jit-test/tests/jaeger/bug597378.js create mode 100644 js/src/jit-test/tests/jaeger/bug598696.js create mode 100644 js/src/jit-test/tests/jaeger/bug599488.js create mode 100644 js/src/jit-test/tests/jaeger/bug600139.js create mode 100644 js/src/jit-test/tests/jaeger/bug600419.js create mode 100644 js/src/jit-test/tests/jaeger/bug600424.js create mode 100644 js/src/jit-test/tests/jaeger/bug601982.js create mode 100644 js/src/jit-test/tests/jaeger/bug604381.js create mode 100644 js/src/jit-test/tests/jaeger/bug604427.js create mode 100644 js/src/jit-test/tests/jaeger/bug606662-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug606829.js create mode 100644 js/src/jit-test/tests/jaeger/bug610652.js create mode 100644 js/src/jit-test/tests/jaeger/bug615440.js create mode 100644 js/src/jit-test/tests/jaeger/bug616508.js create mode 100644 js/src/jit-test/tests/jaeger/bug617433.js create mode 100644 js/src/jit-test/tests/jaeger/bug617440.js create mode 100644 js/src/jit-test/tests/jaeger/bug617458.js create mode 100644 js/src/jit-test/tests/jaeger/bug617460.js create mode 100644 js/src/jit-test/tests/jaeger/bug617549.js create mode 100644 js/src/jit-test/tests/jaeger/bug617558.js create mode 100644 js/src/jit-test/tests/jaeger/bug617624.js create mode 100644 js/src/jit-test/tests/jaeger/bug618007.js create mode 100644 js/src/jit-test/tests/jaeger/bug618849.js create mode 100644 js/src/jit-test/tests/jaeger/bug618850.js create mode 100644 js/src/jit-test/tests/jaeger/bug618863.js create mode 100644 js/src/jit-test/tests/jaeger/bug619339.js create mode 100644 js/src/jit-test/tests/jaeger/bug619433-1.js create mode 100644 js/src/jit-test/tests/jaeger/bug619433-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug620643.js create mode 100644 js/src/jit-test/tests/jaeger/bug621522.js create mode 100644 js/src/jit-test/tests/jaeger/bug621655.js create mode 100644 js/src/jit-test/tests/jaeger/bug624100.js create mode 100644 js/src/jit-test/tests/jaeger/bug624483.js create mode 100644 js/src/jit-test/tests/jaeger/bug625157.js create mode 100644 js/src/jit-test/tests/jaeger/bug625377.js create mode 100644 js/src/jit-test/tests/jaeger/bug625718-1.js create mode 100644 js/src/jit-test/tests/jaeger/bug625718-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug625718-3.js create mode 100644 js/src/jit-test/tests/jaeger/bug625757.js create mode 100644 js/src/jit-test/tests/jaeger/bug627486.js create mode 100644 js/src/jit-test/tests/jaeger/bug639459.js create mode 100644 js/src/jit-test/tests/jaeger/bug639478-1.js create mode 100644 js/src/jit-test/tests/jaeger/bug639478-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug639587.js create mode 100644 js/src/jit-test/tests/jaeger/bug639792.js create mode 100644 js/src/jit-test/tests/jaeger/bug639808.js create mode 100644 js/src/jit-test/tests/jaeger/bug640098.js create mode 100644 js/src/jit-test/tests/jaeger/bug640102.js create mode 100644 js/src/jit-test/tests/jaeger/bug640614.js create mode 100644 js/src/jit-test/tests/jaeger/bug642198.js create mode 100644 js/src/jit-test/tests/jaeger/bug643653-1.js create mode 100644 js/src/jit-test/tests/jaeger/bug643653-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug643805.js create mode 100644 js/src/jit-test/tests/jaeger/bug643829.js create mode 100644 js/src/jit-test/tests/jaeger/bug643913.js create mode 100644 js/src/jit-test/tests/jaeger/bug645629.js create mode 100644 js/src/jit-test/tests/jaeger/bug645657.js create mode 100644 js/src/jit-test/tests/jaeger/bug645985.js create mode 100644 js/src/jit-test/tests/jaeger/bug646001.js create mode 100644 js/src/jit-test/tests/jaeger/bug646060.js create mode 100644 js/src/jit-test/tests/jaeger/bug646411.js create mode 100644 js/src/jit-test/tests/jaeger/bug646495.js create mode 100644 js/src/jit-test/tests/jaeger/bug646938.js create mode 100644 js/src/jit-test/tests/jaeger/bug647440.js create mode 100644 js/src/jit-test/tests/jaeger/bug647657.js create mode 100644 js/src/jit-test/tests/jaeger/bug647785.js create mode 100644 js/src/jit-test/tests/jaeger/bug648004.js create mode 100644 js/src/jit-test/tests/jaeger/bug648230-1.js create mode 100644 js/src/jit-test/tests/jaeger/bug648230-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug648498.js create mode 100644 js/src/jit-test/tests/jaeger/bug648708.js create mode 100644 js/src/jit-test/tests/jaeger/bug649272.js create mode 100644 js/src/jit-test/tests/jaeger/bug649593.js create mode 100644 js/src/jit-test/tests/jaeger/bug649689.js create mode 100644 js/src/jit-test/tests/jaeger/bug649775.js create mode 100644 js/src/jit-test/tests/jaeger/bug649824.js create mode 100644 js/src/jit-test/tests/jaeger/bug649973.js create mode 100644 js/src/jit-test/tests/jaeger/bug650076.js create mode 100644 js/src/jit-test/tests/jaeger/bug650662.js create mode 100644 js/src/jit-test/tests/jaeger/bug650663.js create mode 100644 js/src/jit-test/tests/jaeger/bug651147.js create mode 100644 js/src/jit-test/tests/jaeger/bug652305.js create mode 100644 js/src/jit-test/tests/jaeger/bug652314.js create mode 100644 js/src/jit-test/tests/jaeger/bug652590.js create mode 100644 js/src/jit-test/tests/jaeger/bug653243.js create mode 100644 js/src/jit-test/tests/jaeger/bug653249.js create mode 100644 js/src/jit-test/tests/jaeger/bug653397.js create mode 100644 js/src/jit-test/tests/jaeger/bug655505.js create mode 100644 js/src/jit-test/tests/jaeger/bug655508.js create mode 100644 js/src/jit-test/tests/jaeger/bug655810.js create mode 100644 js/src/jit-test/tests/jaeger/bug655990.js create mode 100644 js/src/jit-test/tests/jaeger/bug656096.js create mode 100644 js/src/jit-test/tests/jaeger/bug656252.js create mode 100644 js/src/jit-test/tests/jaeger/bug656259.js create mode 100644 js/src/jit-test/tests/jaeger/bug656591.js create mode 100644 js/src/jit-test/tests/jaeger/bug656748.js create mode 100644 js/src/jit-test/tests/jaeger/bug656914.js create mode 100644 js/src/jit-test/tests/jaeger/bug657120.js create mode 100644 js/src/jit-test/tests/jaeger/bug657247.js create mode 100644 js/src/jit-test/tests/jaeger/bug657890.js create mode 100644 js/src/jit-test/tests/jaeger/bug658240.js create mode 100644 js/src/jit-test/tests/jaeger/bug658294.js create mode 100644 js/src/jit-test/tests/jaeger/bug658579.js create mode 100644 js/src/jit-test/tests/jaeger/bug658968.js create mode 100644 js/src/jit-test/tests/jaeger/bug659438.js create mode 100644 js/src/jit-test/tests/jaeger/bug659439.js create mode 100644 js/src/jit-test/tests/jaeger/bug659448.js create mode 100644 js/src/jit-test/tests/jaeger/bug659456.js create mode 100644 js/src/jit-test/tests/jaeger/bug660002.js create mode 100644 js/src/jit-test/tests/jaeger/bug662072.js create mode 100644 js/src/jit-test/tests/jaeger/bug662082.js create mode 100644 js/src/jit-test/tests/jaeger/bug663485.js create mode 100644 js/src/jit-test/tests/jaeger/bug663910.js create mode 100644 js/src/jit-test/tests/jaeger/bug669706.js create mode 100644 js/src/jit-test/tests/jaeger/bug670885.js create mode 100644 js/src/jit-test/tests/jaeger/bug672122.js create mode 100644 js/src/jit-test/tests/jaeger/bug678234.js create mode 100644 js/src/jit-test/tests/jaeger/bug678782.js create mode 100644 js/src/jit-test/tests/jaeger/bug679666.js create mode 100644 js/src/jit-test/tests/jaeger/bug680842.js create mode 100644 js/src/jit-test/tests/jaeger/bug681006.js create mode 100644 js/src/jit-test/tests/jaeger/bug682345.js create mode 100644 js/src/jit-test/tests/jaeger/bug684084-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug684084.js create mode 100644 js/src/jit-test/tests/jaeger/bug684576.js create mode 100644 js/src/jit-test/tests/jaeger/bug684824.js create mode 100644 js/src/jit-test/tests/jaeger/bug684943.js create mode 100644 js/src/jit-test/tests/jaeger/bug687768.js create mode 100644 js/src/jit-test/tests/jaeger/bug693311.js create mode 100644 js/src/jit-test/tests/jaeger/bug704138.js create mode 100644 js/src/jit-test/tests/jaeger/bug705873.js create mode 100644 js/src/jit-test/tests/jaeger/bug706110.js create mode 100644 js/src/jit-test/tests/jaeger/bug707641.js create mode 100644 js/src/jit-test/tests/jaeger/bug709067.js create mode 100644 js/src/jit-test/tests/jaeger/bug710780.js create mode 100644 js/src/jit-test/tests/jaeger/bug714645.js create mode 100644 js/src/jit-test/tests/jaeger/bug719918.js create mode 100644 js/src/jit-test/tests/jaeger/bug732423.js create mode 100644 js/src/jit-test/tests/jaeger/bug735161.js create mode 100644 js/src/jit-test/tests/jaeger/bug738525.js create mode 100644 js/src/jit-test/tests/jaeger/bug742393.js create mode 100644 js/src/jit-test/tests/jaeger/bug751320.js create mode 100644 js/src/jit-test/tests/jaeger/bug767961.js create mode 100644 js/src/jit-test/tests/jaeger/bug768313.js create mode 100644 js/src/jit-test/tests/jaeger/bug769985.js create mode 100644 js/src/jit-test/tests/jaeger/bug771871.js create mode 100644 js/src/jit-test/tests/jaeger/bug781859-1.js create mode 100644 js/src/jit-test/tests/jaeger/bug781859-2.js create mode 100644 js/src/jit-test/tests/jaeger/bug781859-3.js create mode 100644 js/src/jit-test/tests/jaeger/bug819035.js create mode 100644 js/src/jit-test/tests/jaeger/bug825966.js create mode 100644 js/src/jit-test/tests/jaeger/chunk/bug712267.js create mode 100644 js/src/jit-test/tests/jaeger/clonefun.js create mode 100644 js/src/jit-test/tests/jaeger/closure-01.js create mode 100644 js/src/jit-test/tests/jaeger/closure-02.js create mode 100644 js/src/jit-test/tests/jaeger/closure-03.js create mode 100644 js/src/jit-test/tests/jaeger/closure-04.js create mode 100644 js/src/jit-test/tests/jaeger/closure-05.js create mode 100644 js/src/jit-test/tests/jaeger/compare-wrong-1.js create mode 100644 js/src/jit-test/tests/jaeger/crash-on-compare.js create mode 100644 js/src/jit-test/tests/jaeger/deepBailAfterRunTracer.js create mode 100644 js/src/jit-test/tests/jaeger/floatTypedArrays.js create mode 100644 js/src/jit-test/tests/jaeger/fromCharCode.js create mode 100644 js/src/jit-test/tests/jaeger/fused-eq-ifeq.js create mode 100644 js/src/jit-test/tests/jaeger/getelem-sanity-1.js create mode 100644 js/src/jit-test/tests/jaeger/getelem-sanity-2.js create mode 100644 js/src/jit-test/tests/jaeger/getelem-sanity-3.js create mode 100644 js/src/jit-test/tests/jaeger/getelem-sanity-4.js create mode 100644 js/src/jit-test/tests/jaeger/getelem-sanity-5.js create mode 100644 js/src/jit-test/tests/jaeger/getelem-sanity-6.js create mode 100644 js/src/jit-test/tests/jaeger/getelem-sanity-7.js create mode 100644 js/src/jit-test/tests/jaeger/getelem-sanity-8.js create mode 100644 js/src/jit-test/tests/jaeger/getelem-sanity-int-1.js create mode 100644 js/src/jit-test/tests/jaeger/getelem-sanity-int-2.js create mode 100644 js/src/jit-test/tests/jaeger/getelem-sanity-int-3.js create mode 100644 js/src/jit-test/tests/jaeger/getter-hook-1.js create mode 100644 js/src/jit-test/tests/jaeger/getter-hook-2.js create mode 100644 js/src/jit-test/tests/jaeger/globalOptimize-1.js create mode 100644 js/src/jit-test/tests/jaeger/globalOptimize-2.js create mode 100644 js/src/jit-test/tests/jaeger/globalOptimize-4.js create mode 100644 js/src/jit-test/tests/jaeger/in.js create mode 100644 js/src/jit-test/tests/jaeger/inline/bug645645.js create mode 100644 js/src/jit-test/tests/jaeger/inline/bug645666.js create mode 100644 js/src/jit-test/tests/jaeger/inline/bug646004.js create mode 100644 js/src/jit-test/tests/jaeger/inline/bug646480.js create mode 100644 js/src/jit-test/tests/jaeger/inline/bug647973.js create mode 100644 js/src/jit-test/tests/jaeger/inline/bug651209.js create mode 100644 js/src/jit-test/tests/jaeger/inline/bug655954.js create mode 100644 js/src/jit-test/tests/jaeger/inline/bug656221.js create mode 100644 js/src/jit-test/tests/jaeger/inline/bug676491.js create mode 100644 js/src/jit-test/tests/jaeger/inline/bug680759.js create mode 100644 js/src/jit-test/tests/jaeger/inline/doubleArg.js create mode 100644 js/src/jit-test/tests/jaeger/inline/mathAbs.js create mode 100644 js/src/jit-test/tests/jaeger/inline/mathFloor.js create mode 100644 js/src/jit-test/tests/jaeger/inline/mathPow.js create mode 100644 js/src/jit-test/tests/jaeger/inline/mathRound.js create mode 100644 js/src/jit-test/tests/jaeger/inline/mathSqrt.js create mode 100644 js/src/jit-test/tests/jaeger/inline/scripted-01.js create mode 100644 js/src/jit-test/tests/jaeger/inline/scripted-02.js create mode 100644 js/src/jit-test/tests/jaeger/inline/scripted-03.js create mode 100644 js/src/jit-test/tests/jaeger/inline/scripted-04.js create mode 100644 js/src/jit-test/tests/jaeger/inline/scripted-05.js create mode 100644 js/src/jit-test/tests/jaeger/inline/scripted-06.js create mode 100644 js/src/jit-test/tests/jaeger/inline/scripted-07.js create mode 100644 js/src/jit-test/tests/jaeger/inline/scripted-08.js create mode 100644 js/src/jit-test/tests/jaeger/inline/scripted-09.js create mode 100644 js/src/jit-test/tests/jaeger/inline/scripted-10.js create mode 100644 js/src/jit-test/tests/jaeger/inline/scripted-11.js create mode 100644 js/src/jit-test/tests/jaeger/inline/stringCharAt.js create mode 100644 js/src/jit-test/tests/jaeger/inline/stringCharCodeAt.js create mode 100644 js/src/jit-test/tests/jaeger/inline/undefinedLocal.js create mode 100644 js/src/jit-test/tests/jaeger/instanceOfWithKnownTypes.js create mode 100644 js/src/jit-test/tests/jaeger/invokeSessionGuard.js create mode 100644 js/src/jit-test/tests/jaeger/loops/bug651155.js create mode 100644 js/src/jit-test/tests/jaeger/loops/bug654393.js create mode 100644 js/src/jit-test/tests/jaeger/loops/bug655854.js create mode 100644 js/src/jit-test/tests/jaeger/loops/bug658290.js create mode 100644 js/src/jit-test/tests/jaeger/loops/bug659452.js create mode 100644 js/src/jit-test/tests/jaeger/loops/bug668643.js create mode 100644 js/src/jit-test/tests/jaeger/loops/bug671814.js create mode 100644 js/src/jit-test/tests/jaeger/loops/bug680809.js create mode 100644 js/src/jit-test/tests/jaeger/loops/bug684621.js create mode 100644 js/src/jit-test/tests/jaeger/loops/hoist-01.js create mode 100644 js/src/jit-test/tests/jaeger/loops/hoist-02.js create mode 100644 js/src/jit-test/tests/jaeger/loops/hoist-03.js create mode 100644 js/src/jit-test/tests/jaeger/loops/hoist-04.js create mode 100644 js/src/jit-test/tests/jaeger/loops/hoist-05.js create mode 100644 js/src/jit-test/tests/jaeger/loops/hoist-06.js create mode 100644 js/src/jit-test/tests/jaeger/loops/hoist-07.js create mode 100644 js/src/jit-test/tests/jaeger/loops/hoist-08.js create mode 100644 js/src/jit-test/tests/jaeger/loops/hoist-09.js create mode 100644 js/src/jit-test/tests/jaeger/loops/hoist-10.js create mode 100644 js/src/jit-test/tests/jaeger/loops/integer-1.js create mode 100644 js/src/jit-test/tests/jaeger/loops/integer-2.js create mode 100644 js/src/jit-test/tests/jaeger/loops/integer-3.js create mode 100644 js/src/jit-test/tests/jaeger/loops/multiply-by-int32min.js create mode 100644 js/src/jit-test/tests/jaeger/loops/property-1.js create mode 100644 js/src/jit-test/tests/jaeger/modConstDoubles.js create mode 100644 js/src/jit-test/tests/jaeger/modConstInt.js create mode 100644 js/src/jit-test/tests/jaeger/modConstZeroRhs.js create mode 100644 js/src/jit-test/tests/jaeger/modWithConstLhs.js create mode 100644 js/src/jit-test/tests/jaeger/mulNegZero.js create mode 100644 js/src/jit-test/tests/jaeger/negation.js create mode 100644 js/src/jit-test/tests/jaeger/normalIntTypedArrays.js create mode 100644 js/src/jit-test/tests/jaeger/optimize-globals-1.js create mode 100644 js/src/jit-test/tests/jaeger/optimize-globals-2.js create mode 100644 js/src/jit-test/tests/jaeger/optimize-globals-3.js create mode 100644 js/src/jit-test/tests/jaeger/propertyOptimize-1.js create mode 100644 js/src/jit-test/tests/jaeger/propertyOptimize-2.js create mode 100644 js/src/jit-test/tests/jaeger/propertyOptimize-3.js create mode 100644 js/src/jit-test/tests/jaeger/propertyOptimize-4.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/arith.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug617592.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug621292.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug621328.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug638977.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug639508.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug639882.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug640608.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug641225.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug641269.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug641535.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug642405.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug643182.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug643376.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug643669.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug645044.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug646267.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug647183.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug647199.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug647532.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug647547.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug647991-1.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug647991-2.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug648502.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug648567.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug648843.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug648966.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug649261.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug649769.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug651119.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug653980.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug654536.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug655949.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug655998.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug657288.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug658209.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug658211.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug658212.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug658561.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug658777.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug659639.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug659766.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug661859.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug663690.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug671943-2.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug672123.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug674391.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/bug676764.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/callic.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/exotic.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/flush.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/getelem.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/incdec.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/inlinestubs.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/memory-01.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/memory-02.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/memory-03.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/memory-04.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/native.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/nativemulti.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/nativestack.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/patchdouble.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/property.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/propic.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/staticoverflow.js create mode 100644 js/src/jit-test/tests/jaeger/recompile/undef.js create mode 100644 js/src/jit-test/tests/jaeger/regalloc-double.js create mode 100644 js/src/jit-test/tests/jaeger/regalloc-live.js create mode 100644 js/src/jit-test/tests/jaeger/regress-bug625701.js create mode 100644 js/src/jit-test/tests/jaeger/rsh-sanity-1.js create mode 100644 js/src/jit-test/tests/jaeger/scriptedICs-1.js create mode 100644 js/src/jit-test/tests/jaeger/setPropTypeGuard.js create mode 100644 js/src/jit-test/tests/jaeger/smallIntTypedArrays.js create mode 100644 js/src/jit-test/tests/jaeger/strictModeSetUndefinedVar.js create mode 100644 js/src/jit-test/tests/jaeger/subCommutativity.js create mode 100644 js/src/jit-test/tests/jaeger/tableSwitchConst.js create mode 100644 js/src/jit-test/tests/jaeger/tableSwitchDouble.js create mode 100644 js/src/jit-test/tests/jaeger/tableSwitchEmpty.js create mode 100644 js/src/jit-test/tests/jaeger/tableSwitchFloat.js create mode 100644 js/src/jit-test/tests/jaeger/tableSwitchNeg.js create mode 100644 js/src/jit-test/tests/jaeger/testAddStringObject.js create mode 100644 js/src/jit-test/tests/jaeger/testCallElemAfterGC.js create mode 100644 js/src/jit-test/tests/jaeger/testDenseCallElem.js create mode 100644 js/src/jit-test/tests/jaeger/testForOps.js create mode 100644 js/src/jit-test/tests/jaeger/testIfEqX.js create mode 100644 js/src/jit-test/tests/jaeger/testPropCallElem.js create mode 100644 js/src/jit-test/tests/jaeger/testPropCallElem2.js create mode 100644 js/src/jit-test/tests/jaeger/testSetElem-Easy.js create mode 100644 js/src/jit-test/tests/jaeger/testSetElem-Indexed.js create mode 100644 js/src/jit-test/tests/jaeger/testSetElem-NewProto.js create mode 100644 js/src/jit-test/tests/jaeger/testSetTypedFloatArray.js create mode 100644 js/src/jit-test/tests/jaeger/testSetTypedIntArray.js create mode 100644 js/src/jit-test/tests/jaeger/testShiftSameBacking.js create mode 100644 js/src/jit-test/tests/jaeger/testTableSwitchX.js create mode 100644 js/src/jit-test/tests/jaeger/undoAdd.js create mode 100644 js/src/jit-test/tests/jaeger/unsignedShiftZero.js create mode 100644 js/src/jit-test/tests/jaeger/xor-sanity.js create mode 100644 js/src/jit-test/tests/large-arraybuffers/address-offset-overflow.js create mode 100644 js/src/jit-test/tests/large-arraybuffers/arraybuffer-transfer.js create mode 100644 js/src/jit-test/tests/large-arraybuffers/atomics.js create mode 100644 js/src/jit-test/tests/large-arraybuffers/basic.js create mode 100644 js/src/jit-test/tests/large-arraybuffers/directives.txt create mode 100644 js/src/jit-test/tests/large-arraybuffers/jit-alloc-big.js create mode 100644 js/src/jit-test/tests/large-arraybuffers/jit-bounds-checks.js create mode 100644 js/src/jit-test/tests/large-arraybuffers/large-lengths-offsets.js create mode 100644 js/src/jit-test/tests/large-arraybuffers/max-typed-array-size.js create mode 100644 js/src/jit-test/tests/large-arraybuffers/shared-array-buffer.js create mode 100644 js/src/jit-test/tests/large-arraybuffers/structured-clone.js create mode 100644 js/src/jit-test/tests/large-arraybuffers/typed-array.js create mode 100644 js/src/jit-test/tests/latin1/assorted.js create mode 100644 js/src/jit-test/tests/latin1/basic.js create mode 100644 js/src/jit-test/tests/latin1/bug1033113.js create mode 100644 js/src/jit-test/tests/latin1/compare.js create mode 100644 js/src/jit-test/tests/latin1/date.js create mode 100644 js/src/jit-test/tests/latin1/decompiler.js create mode 100644 js/src/jit-test/tests/latin1/dependent.js create mode 100644 js/src/jit-test/tests/latin1/encode-decode.js create mode 100644 js/src/jit-test/tests/latin1/escape-unescape.js create mode 100644 js/src/jit-test/tests/latin1/eval.js create mode 100644 js/src/jit-test/tests/latin1/function.js create mode 100644 js/src/jit-test/tests/latin1/index.js create mode 100644 js/src/jit-test/tests/latin1/indexOf.js create mode 100644 js/src/jit-test/tests/latin1/indexing.js create mode 100644 js/src/jit-test/tests/latin1/join.js create mode 100644 js/src/jit-test/tests/latin1/json.js create mode 100644 js/src/jit-test/tests/latin1/latin1.js create mode 100644 js/src/jit-test/tests/latin1/other.js create mode 100644 js/src/jit-test/tests/latin1/parseInt-parseFloat.js create mode 100644 js/src/jit-test/tests/latin1/regexp.js create mode 100644 js/src/jit-test/tests/latin1/replace.js create mode 100644 js/src/jit-test/tests/latin1/rope-stringchar.js create mode 100644 js/src/jit-test/tests/latin1/search.js create mode 100644 js/src/jit-test/tests/latin1/split.js create mode 100644 js/src/jit-test/tests/latin1/startsWith-endsWith.js create mode 100644 js/src/jit-test/tests/latin1/structured-clone.js create mode 100644 js/src/jit-test/tests/latin1/toLowerCase-toUpperCase.js create mode 100644 js/src/jit-test/tests/latin1/toNumber.js create mode 100644 js/src/jit-test/tests/latin1/trim.js create mode 100644 js/src/jit-test/tests/modules/add-to-namespace-import.js create mode 100644 js/src/jit-test/tests/modules/ambiguous-import.js create mode 100644 js/src/jit-test/tests/modules/ambiguous-indirect-export.js create mode 100644 js/src/jit-test/tests/modules/ambiguous-star-export.js create mode 100644 js/src/jit-test/tests/modules/assign-to-import.js create mode 100644 js/src/jit-test/tests/modules/assign-to-namespace-import.js create mode 100644 js/src/jit-test/tests/modules/assign-to-namespace.js create mode 100644 js/src/jit-test/tests/modules/async-eval-state.js create mode 100644 js/src/jit-test/tests/modules/bad-namespace-created.js create mode 100644 js/src/jit-test/tests/modules/bug-1168666.js create mode 100644 js/src/jit-test/tests/modules/bug-1217593.js create mode 100644 js/src/jit-test/tests/modules/bug-1219044.js create mode 100644 js/src/jit-test/tests/modules/bug-1219408.js create mode 100644 js/src/jit-test/tests/modules/bug-1225346.js create mode 100644 js/src/jit-test/tests/modules/bug-1233117.js create mode 100644 js/src/jit-test/tests/modules/bug-1233179.js create mode 100644 js/src/jit-test/tests/modules/bug-1233915.js create mode 100644 js/src/jit-test/tests/modules/bug-1236875.js create mode 100644 js/src/jit-test/tests/modules/bug-1245518.js create mode 100644 js/src/jit-test/tests/modules/bug-1247934.js create mode 100644 js/src/jit-test/tests/modules/bug-1258097.js create mode 100644 js/src/jit-test/tests/modules/bug-1283448.js create mode 100644 js/src/jit-test/tests/modules/bug-1284486-2.js create mode 100644 js/src/jit-test/tests/modules/bug-1284486.js create mode 100644 js/src/jit-test/tests/modules/bug-1287406.js create mode 100644 js/src/jit-test/tests/modules/bug-1287410.js create mode 100644 js/src/jit-test/tests/modules/bug-1320993.js create mode 100644 js/src/jit-test/tests/modules/bug-1372258.js create mode 100644 js/src/jit-test/tests/modules/bug-1402535.js create mode 100644 js/src/jit-test/tests/modules/bug-1402649.js create mode 100644 js/src/jit-test/tests/modules/bug-1406452.js create mode 100644 js/src/jit-test/tests/modules/bug-1420420-2.js create mode 100644 js/src/jit-test/tests/modules/bug-1420420-3.js create mode 100644 js/src/jit-test/tests/modules/bug-1420420-4.js create mode 100644 js/src/jit-test/tests/modules/bug-1420420.js create mode 100644 js/src/jit-test/tests/modules/bug-1435327.js create mode 100644 js/src/jit-test/tests/modules/bug-1439416-2.js create mode 100644 js/src/jit-test/tests/modules/bug-1439416.js create mode 100644 js/src/jit-test/tests/modules/bug-1443555.js create mode 100644 js/src/jit-test/tests/modules/bug-1462286.js create mode 100644 js/src/jit-test/tests/modules/bug-1462326.js create mode 100644 js/src/jit-test/tests/modules/bug-1466487.js create mode 100644 js/src/jit-test/tests/modules/bug-1476921.js create mode 100644 js/src/jit-test/tests/modules/bug-1498980.js create mode 100644 js/src/jit-test/tests/modules/bug-1501154.js create mode 100644 js/src/jit-test/tests/modules/bug-1501157.js create mode 100644 js/src/jit-test/tests/modules/bug-1502669.js create mode 100644 js/src/jit-test/tests/modules/bug-1503009.js create mode 100644 js/src/jit-test/tests/modules/bug-1510598.js create mode 100644 js/src/jit-test/tests/modules/bug-1519140.js create mode 100644 js/src/jit-test/tests/modules/bug-1604792.js create mode 100644 js/src/jit-test/tests/modules/bug-1657066.js create mode 100644 js/src/jit-test/tests/modules/bug-1680878.js create mode 100644 js/src/jit-test/tests/modules/bug-1681256.js create mode 100644 js/src/jit-test/tests/modules/bug-1711342.js create mode 100644 js/src/jit-test/tests/modules/bug-1764239.js create mode 100644 js/src/jit-test/tests/modules/bug-1771090.js create mode 100644 js/src/jit-test/tests/modules/bug-1777972.js create mode 100644 js/src/jit-test/tests/modules/bug-1778439.js create mode 100644 js/src/jit-test/tests/modules/bug-1782496.js create mode 100644 js/src/jit-test/tests/modules/bug-1787926.js create mode 100644 js/src/jit-test/tests/modules/bug-1789412.js create mode 100644 js/src/jit-test/tests/modules/bug-1790352.js create mode 100644 js/src/jit-test/tests/modules/bug-1795845.js create mode 100644 js/src/jit-test/tests/modules/bug-1802479.js create mode 100644 js/src/jit-test/tests/modules/bug1105608.js create mode 100644 js/src/jit-test/tests/modules/bug1169850.js create mode 100644 js/src/jit-test/tests/modules/bug1198673.js create mode 100644 js/src/jit-test/tests/modules/bug1204857.js create mode 100644 js/src/jit-test/tests/modules/bug1210391.js create mode 100644 js/src/jit-test/tests/modules/bug1394492.js create mode 100644 js/src/jit-test/tests/modules/bug1394493.js create mode 100644 js/src/jit-test/tests/modules/bug1429031.js create mode 100644 js/src/jit-test/tests/modules/bug1449153.js create mode 100644 js/src/jit-test/tests/modules/bug1485698.js create mode 100644 js/src/jit-test/tests/modules/bug1584034.js create mode 100644 js/src/jit-test/tests/modules/bug1584309.js create mode 100644 js/src/jit-test/tests/modules/bug1586599.js create mode 100644 js/src/jit-test/tests/modules/bug1670236.js create mode 100644 js/src/jit-test/tests/modules/bug1685992.js create mode 100644 js/src/jit-test/tests/modules/bug1699622.js create mode 100644 js/src/jit-test/tests/modules/bug1770048.js create mode 100644 js/src/jit-test/tests/modules/bug1846247.js create mode 100644 js/src/jit-test/tests/modules/cyclic-function-import.js create mode 100644 js/src/jit-test/tests/modules/cyclic-import.js create mode 100644 js/src/jit-test/tests/modules/debugger-frames.js create mode 100644 js/src/jit-test/tests/modules/debugger-vars-function.js create mode 100644 js/src/jit-test/tests/modules/debugger-vars-toplevel.js create mode 100644 js/src/jit-test/tests/modules/delete-import.js create mode 100644 js/src/jit-test/tests/modules/delete-namespace-import.js create mode 100644 js/src/jit-test/tests/modules/delete-namespace.js create mode 100644 js/src/jit-test/tests/modules/duplicate-exports.js create mode 100644 js/src/jit-test/tests/modules/duplicate-imports.js create mode 100644 js/src/jit-test/tests/modules/dynamic-import-error.js create mode 100644 js/src/jit-test/tests/modules/dynamic-import-expression.js create mode 100644 js/src/jit-test/tests/modules/dynamic-import-ion.js create mode 100644 js/src/jit-test/tests/modules/dynamic-import-lazy.js create mode 100644 js/src/jit-test/tests/modules/dynamic-import-module.js create mode 100644 js/src/jit-test/tests/modules/dynamic-import-oom.js create mode 100644 js/src/jit-test/tests/modules/dynamic-import-script.js create mode 100644 js/src/jit-test/tests/modules/eval-module-oom.js create mode 100644 js/src/jit-test/tests/modules/export-circular-nonexisting-binding.js create mode 100644 js/src/jit-test/tests/modules/export-declaration.js create mode 100644 js/src/jit-test/tests/modules/export-destructuring.js create mode 100644 js/src/jit-test/tests/modules/export-entries.js create mode 100644 js/src/jit-test/tests/modules/export-ns-from.js create mode 100644 js/src/jit-test/tests/modules/export-star-cannot-rescue-missing-export.js create mode 100644 js/src/jit-test/tests/modules/export-star-circular-dependencies.js create mode 100644 js/src/jit-test/tests/modules/function-redeclaration.js create mode 100644 js/src/jit-test/tests/modules/global-scope.js create mode 100644 js/src/jit-test/tests/modules/import-declaration.js create mode 100644 js/src/jit-test/tests/modules/import-default-async-asi.js create mode 100644 js/src/jit-test/tests/modules/import-default-async-regexpy.js create mode 100644 js/src/jit-test/tests/modules/import-default-class.js create mode 100644 js/src/jit-test/tests/modules/import-default-function.js create mode 100644 js/src/jit-test/tests/modules/import-entries.js create mode 100644 js/src/jit-test/tests/modules/import-in-lazy-function.js create mode 100644 js/src/jit-test/tests/modules/import-meta-expression.js create mode 100644 js/src/jit-test/tests/modules/import-meta-oom.js create mode 100644 js/src/jit-test/tests/modules/import-meta.js create mode 100644 js/src/jit-test/tests/modules/import-namespace.js create mode 100644 js/src/jit-test/tests/modules/import-not-found.js create mode 100644 js/src/jit-test/tests/modules/inline-data.js create mode 100644 js/src/jit-test/tests/modules/instanceof-error-message.js create mode 100644 js/src/jit-test/tests/modules/let-tdz.js create mode 100644 js/src/jit-test/tests/modules/many-exports.js create mode 100644 js/src/jit-test/tests/modules/many-imports.js create mode 100644 js/src/jit-test/tests/modules/many-namespace-imports.js create mode 100644 js/src/jit-test/tests/modules/missing-export-offthread.js create mode 100644 js/src/jit-test/tests/modules/missing-indirect-export.js create mode 100644 js/src/jit-test/tests/modules/module-declaration-instantiation.js create mode 100644 js/src/jit-test/tests/modules/module-environment.js create mode 100644 js/src/jit-test/tests/modules/module-evaluation.js create mode 100644 js/src/jit-test/tests/modules/module-this.js create mode 100644 js/src/jit-test/tests/modules/namespace-import-compilation-2.js create mode 100644 js/src/jit-test/tests/modules/namespace-import-compilation.js create mode 100644 js/src/jit-test/tests/modules/off-thread-compile.js create mode 100644 js/src/jit-test/tests/modules/offthread-oom.js create mode 100644 js/src/jit-test/tests/modules/recursive-star-export.js create mode 100644 js/src/jit-test/tests/modules/requested-modules.js create mode 100644 js/src/jit-test/tests/modules/shell-parse.js create mode 100644 js/src/jit-test/tests/modules/shell-wrapper.js create mode 100644 js/src/jit-test/tests/modules/simple-imports.js create mode 100644 js/src/jit-test/tests/modules/tla-after-many-bindings.js create mode 100644 js/src/jit-test/tests/modules/tla-many-vars.js create mode 100644 js/src/jit-test/tests/modules/unbound-export.js create mode 100644 js/src/jit-test/tests/optional-chain/bug1848244.js create mode 100644 js/src/jit-test/tests/optional-chain/call-ignore-rval.js create mode 100644 js/src/jit-test/tests/optional-chain/fun-call-or-apply.js create mode 100644 js/src/jit-test/tests/out-of-tree-apis.js create mode 100644 js/src/jit-test/tests/parser/arrow-rest.js create mode 100644 js/src/jit-test/tests/parser/arrow-with-block.js create mode 100644 js/src/jit-test/tests/parser/break-continue-errors.js create mode 100644 js/src/jit-test/tests/parser/bug-1090096.js create mode 100644 js/src/jit-test/tests/parser/bug-1161312.js create mode 100644 js/src/jit-test/tests/parser/bug-1250192.js create mode 100644 js/src/jit-test/tests/parser/bug-1254164.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-1.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-10.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-11.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-12.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-13.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-14.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-15.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-16.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-17.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-18.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-19.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-2.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-20.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-21.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-22.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-23.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-24.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-26.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-27.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-28.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-29.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-3.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-30.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-31.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-32.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-33.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-34.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-35.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-36.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-37.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-38.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-39.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-4.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-40.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-41.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-42.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-43.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-44.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-45.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-46.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-47.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-48.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-49.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-5.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-50.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-51.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-52.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-6.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-7.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-8.js create mode 100644 js/src/jit-test/tests/parser/bug-1263355-9.js create mode 100644 js/src/jit-test/tests/parser/bug-1263881-1.js create mode 100644 js/src/jit-test/tests/parser/bug-1263881-2.js create mode 100644 js/src/jit-test/tests/parser/bug-1263881-3.js create mode 100644 js/src/jit-test/tests/parser/bug-1264568.js create mode 100644 js/src/jit-test/tests/parser/bug-1316832.js create mode 100644 js/src/jit-test/tests/parser/bug-1319443.js create mode 100644 js/src/jit-test/tests/parser/bug-1324773-2.js create mode 100644 js/src/jit-test/tests/parser/bug-1324773.js create mode 100644 js/src/jit-test/tests/parser/bug-1355046.js create mode 100644 js/src/jit-test/tests/parser/bug-1357075.js create mode 100644 js/src/jit-test/tests/parser/bug-1363191.js create mode 100644 js/src/jit-test/tests/parser/bug-1364648.js create mode 100644 js/src/jit-test/tests/parser/bug-1366927.js create mode 100644 js/src/jit-test/tests/parser/bug-1385112.js create mode 100644 js/src/jit-test/tests/parser/bug-1431353-2.js create mode 100644 js/src/jit-test/tests/parser/bug-1431353.js create mode 100644 js/src/jit-test/tests/parser/bug-1433014.js create mode 100644 js/src/jit-test/tests/parser/bug-1465695.js create mode 100644 js/src/jit-test/tests/parser/bug-1470992.js create mode 100644 js/src/jit-test/tests/parser/bug-1566974.js create mode 100644 js/src/jit-test/tests/parser/bug-1576865-1.js create mode 100644 js/src/jit-test/tests/parser/bug-1576865-2.js create mode 100644 js/src/jit-test/tests/parser/bug-1662260.js create mode 100644 js/src/jit-test/tests/parser/bug-1764737.js create mode 100644 js/src/jit-test/tests/parser/bug-844805-1.js create mode 100644 js/src/jit-test/tests/parser/bug-844805-2.js create mode 100644 js/src/jit-test/tests/parser/bug-888002-1.js create mode 100644 js/src/jit-test/tests/parser/bug-888002-2.js create mode 100644 js/src/jit-test/tests/parser/bug-888002-3.js create mode 100644 js/src/jit-test/tests/parser/bug-888002.js create mode 100644 js/src/jit-test/tests/parser/bug-889628.js create mode 100644 js/src/jit-test/tests/parser/bug-896126.js create mode 100644 js/src/jit-test/tests/parser/bug-975484.js create mode 100644 js/src/jit-test/tests/parser/bug1461034.js create mode 100644 js/src/jit-test/tests/parser/bug1547655.js create mode 100644 js/src/jit-test/tests/parser/bug1604952.js create mode 100644 js/src/jit-test/tests/parser/bug1605254.js create mode 100644 js/src/jit-test/tests/parser/bug1657557.js create mode 100644 js/src/jit-test/tests/parser/bug1661454.js create mode 100644 js/src/jit-test/tests/parser/bug1750935.js create mode 100644 js/src/jit-test/tests/parser/bug1764715.js create mode 100644 js/src/jit-test/tests/parser/bug1803036.js create mode 100644 js/src/jit-test/tests/parser/bug1835785.js create mode 100644 js/src/jit-test/tests/parser/bytecode-sharing.js create mode 100644 js/src/jit-test/tests/parser/columnNumber.js create mode 100644 js/src/jit-test/tests/parser/compile-script.js create mode 100644 js/src/jit-test/tests/parser/dumpStencil-01.js create mode 100644 js/src/jit-test/tests/parser/fold-constant-index-access.js create mode 100644 js/src/jit-test/tests/parser/home-object-getter.js create mode 100644 js/src/jit-test/tests/parser/lazy-flag-consistency.js create mode 100644 js/src/jit-test/tests/parser/lazy-parse-bad-offset.js create mode 100644 js/src/jit-test/tests/parser/let-after-directive.js create mode 100644 js/src/jit-test/tests/parser/letContextualKeyword.js create mode 100644 js/src/jit-test/tests/parser/lineNumber.js create mode 100644 js/src/jit-test/tests/parser/missing-closing-brace.js create mode 100644 js/src/jit-test/tests/parser/modifier-arrow-rest.js create mode 100644 js/src/jit-test/tests/parser/modifier-do-while.js create mode 100644 js/src/jit-test/tests/parser/modifier-regexp-vs-div.js create mode 100644 js/src/jit-test/tests/parser/modifier-semicolon-insertion.js create mode 100644 js/src/jit-test/tests/parser/modifier-yield-without-operand-1.js create mode 100644 js/src/jit-test/tests/parser/modifier-yield-without-operand-2.js create mode 100644 js/src/jit-test/tests/parser/module-line-0.js create mode 100644 js/src/jit-test/tests/parser/off_thread_compile_oom.js create mode 100644 js/src/jit-test/tests/parser/off_thread_compile_throws_error.js create mode 100644 js/src/jit-test/tests/parser/oom-tracking-line-starts-in-tokenizer.js create mode 100644 js/src/jit-test/tests/parser/optimized-out-functions.js create mode 100644 js/src/jit-test/tests/parser/parse-module.js create mode 100644 js/src/jit-test/tests/parser/parse-non-ascii-latin1.js create mode 100644 js/src/jit-test/tests/parser/redeclaration-message.js create mode 100644 js/src/jit-test/tests/parser/redeclaration.js create mode 100644 js/src/jit-test/tests/parser/regexp-after-do-while.js create mode 100644 js/src/jit-test/tests/parser/regexp-after-variable.js create mode 100644 js/src/jit-test/tests/parser/regexp-error-location.js create mode 100644 js/src/jit-test/tests/parser/script-source-extent.js create mode 100644 js/src/jit-test/tests/parser/standalone-function-name.js create mode 100644 js/src/jit-test/tests/parser/stencil-asmjs.js create mode 100644 js/src/jit-test/tests/parser/stencil-compile-invalid-argument.js create mode 100644 js/src/jit-test/tests/parser/stencil-eager-delazify-certviewer.js create mode 100644 js/src/jit-test/tests/parser/stencil-eager-delazify-empty.js create mode 100644 js/src/jit-test/tests/parser/stencil-eager-delazify.js create mode 100644 js/src/jit-test/tests/parser/stencil-laziness-validate.js create mode 100644 js/src/jit-test/tests/parser/stencil-scope.js create mode 100644 js/src/jit-test/tests/parser/stencil.js create mode 100644 js/src/jit-test/tests/parser/strict-with-asi-and-deprecated-octal.js create mode 100644 js/src/jit-test/tests/parser/syntax-error-illegal-character.js create mode 100644 js/src/jit-test/tests/parser/syntax-parse-error.js create mode 100644 js/src/jit-test/tests/parser/truncation.js create mode 100644 js/src/jit-test/tests/parser/warning-oom.js create mode 100644 js/src/jit-test/tests/parser/yield-in-formal-destructuring.js create mode 100644 js/src/jit-test/tests/pic/arguments.js create mode 100644 js/src/jit-test/tests/pic/bug584642.js create mode 100644 js/src/jit-test/tests/pic/bug595706.js create mode 100644 js/src/jit-test/tests/pic/bug645184.js create mode 100644 js/src/jit-test/tests/pic/call_self.js create mode 100644 js/src/jit-test/tests/pic/callname-eager-this1.js create mode 100644 js/src/jit-test/tests/pic/callname-eager-this2.js create mode 100644 js/src/jit-test/tests/pic/callname-global1.js create mode 100644 js/src/jit-test/tests/pic/callname-global2.js create mode 100644 js/src/jit-test/tests/pic/callname-with.js create mode 100644 js/src/jit-test/tests/pic/densearray.js create mode 100644 js/src/jit-test/tests/pic/getelem-large-index.js create mode 100644 js/src/jit-test/tests/pic/grandproto.js create mode 100644 js/src/jit-test/tests/pic/length_array.js create mode 100644 js/src/jit-test/tests/pic/length_mix.js create mode 100644 js/src/jit-test/tests/pic/length_object.js create mode 100644 js/src/jit-test/tests/pic/length_string.js create mode 100644 js/src/jit-test/tests/pic/length_string_object.js create mode 100644 js/src/jit-test/tests/pic/proto1.js create mode 100644 js/src/jit-test/tests/pic/proto3.js create mode 100644 js/src/jit-test/tests/pic/proto_self.js create mode 100644 js/src/jit-test/tests/pic/self1.js create mode 100644 js/src/jit-test/tests/pic/self2.js create mode 100644 js/src/jit-test/tests/pic/self3.js create mode 100644 js/src/jit-test/tests/pic/self8.js create mode 100644 js/src/jit-test/tests/pic/set-assign.js create mode 100644 js/src/jit-test/tests/pic/set1.js create mode 100644 js/src/jit-test/tests/pic/set2.js create mode 100644 js/src/jit-test/tests/pic/shape_regen.js create mode 100644 js/src/jit-test/tests/pic/thisprop.js create mode 100644 js/src/jit-test/tests/pic/to-dictionary.js create mode 100644 js/src/jit-test/tests/profiler/AutoEntryMonitor-01.js create mode 100644 js/src/jit-test/tests/profiler/AutoEntryMonitor-02.js create mode 100644 js/src/jit-test/tests/profiler/bug1135703.js create mode 100644 js/src/jit-test/tests/profiler/bug1161351.js create mode 100644 js/src/jit-test/tests/profiler/bug1164448.js create mode 100644 js/src/jit-test/tests/profiler/bug1211962.js create mode 100644 js/src/jit-test/tests/profiler/bug1231925.js create mode 100644 js/src/jit-test/tests/profiler/bug1233921.js create mode 100644 js/src/jit-test/tests/profiler/bug1242840.js create mode 100644 js/src/jit-test/tests/profiler/bug1261324.js create mode 100644 js/src/jit-test/tests/profiler/bug1352507-1.js create mode 100644 js/src/jit-test/tests/profiler/bug1427774.js create mode 100644 js/src/jit-test/tests/profiler/bug1478509.js create mode 100644 js/src/jit-test/tests/profiler/bug1502744.js create mode 100644 js/src/jit-test/tests/profiler/bug1563889.js create mode 100644 js/src/jit-test/tests/profiler/bug1774149.js create mode 100644 js/src/jit-test/tests/profiler/bug1782003.js create mode 100644 js/src/jit-test/tests/profiler/bug925309.js create mode 100644 js/src/jit-test/tests/profiler/debugmode-osr-exception-return-addr.js create mode 100644 js/src/jit-test/tests/profiler/debugmode-osr-resume-addr.js create mode 100644 js/src/jit-test/tests/profiler/enterjit-osr-disabling-earlyret.js create mode 100644 js/src/jit-test/tests/profiler/enterjit-osr-disabling.js create mode 100644 js/src/jit-test/tests/profiler/enterjit-osr-enabling-earlyret.js create mode 100644 js/src/jit-test/tests/profiler/enterjit-osr-enabling.js create mode 100644 js/src/jit-test/tests/profiler/enterjit-osr.js create mode 100644 js/src/jit-test/tests/profiler/exception-unwind-hook.js create mode 100644 js/src/jit-test/tests/profiler/getter-setter-ic.js create mode 100644 js/src/jit-test/tests/profiler/interpreter-stacks.js create mode 100644 js/src/jit-test/tests/profiler/ion-rectifier-frame-bug1530351.js create mode 100644 js/src/jit-test/tests/profiler/jsop-resume-return-bug1451385-1.js create mode 100644 js/src/jit-test/tests/profiler/jsop-resume-return-bug1451385-2.js create mode 100644 js/src/jit-test/tests/profiler/pc-count-profiler.js create mode 100644 js/src/jit-test/tests/profiler/test-baseline-eval-frame-profiling.js create mode 100644 js/src/jit-test/tests/profiler/test-bug1026485.js create mode 100644 js/src/jit-test/tests/promise/bug-1298776.js create mode 100644 js/src/jit-test/tests/promise/bug-1545369.js create mode 100644 js/src/jit-test/tests/promise/bug1347984.js create mode 100644 js/src/jit-test/tests/promise/bug1406463.js create mode 100644 js/src/jit-test/tests/promise/debugger-reaction-does-not-resolve.js create mode 100644 js/src/jit-test/tests/promise/drain-job-queue-after-quit-called.js create mode 100644 js/src/jit-test/tests/promise/getwaitforallpromise-error-handling.js create mode 100644 js/src/jit-test/tests/promise/job-realm.js create mode 100644 js/src/jit-test/tests/promise/newpromisecapability-error-message.js create mode 100644 js/src/jit-test/tests/promise/no-reentrant-drainjobqueue.js create mode 100644 js/src/jit-test/tests/promise/optimized-promise-already-resolved.js create mode 100644 js/src/jit-test/tests/promise/primitives-handling-in-promise-all.js create mode 100644 js/src/jit-test/tests/promise/promise-any-with-non-default-resolving.js create mode 100644 js/src/jit-test/tests/promise/promise-cross-compartment-subclassing.js create mode 100644 js/src/jit-test/tests/promise/promise-race-with-default-resolving-internal.js create mode 100644 js/src/jit-test/tests/promise/promise-race-with-non-default-resolving.js create mode 100644 js/src/jit-test/tests/promise/resolve-promise-scripted-and-api.js create mode 100644 js/src/jit-test/tests/promise/settle-async-generator.js create mode 100644 js/src/jit-test/tests/promise/settle-now-already-resolved.js create mode 100644 js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-1.js create mode 100644 js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-10.js create mode 100644 js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-11.js create mode 100644 js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-2.js create mode 100644 js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-3.js create mode 100644 js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-4.js create mode 100644 js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-5.js create mode 100644 js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-6.js create mode 100644 js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-7.js create mode 100644 js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-8.js create mode 100644 js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-9.js create mode 100644 js/src/jit-test/tests/promise/species-redefine-getter.js create mode 100644 js/src/jit-test/tests/promise/stopdrainingjobqueue.js create mode 100644 js/src/jit-test/tests/promise/unhandled-rejections-dead-2.js create mode 100644 js/src/jit-test/tests/promise/unhandled-rejections-dead.js create mode 100644 js/src/jit-test/tests/promise/unhandled-rejections-different-realm.js create mode 100644 js/src/jit-test/tests/promise/unhandled-rejections-error.js create mode 100644 js/src/jit-test/tests/promise/unhandled-rejections-oom.js create mode 100644 js/src/jit-test/tests/promise/unhandled-rejections.js create mode 100644 js/src/jit-test/tests/promise/user-activation-propagation.js create mode 100644 js/src/jit-test/tests/proxy/bug-862848-1.js create mode 100644 js/src/jit-test/tests/proxy/bug1072817.js create mode 100644 js/src/jit-test/tests/proxy/bug1095973.js create mode 100644 js/src/jit-test/tests/proxy/bug1685290.js create mode 100644 js/src/jit-test/tests/proxy/bug1714531.js create mode 100644 js/src/jit-test/tests/proxy/bug1853103.js create mode 100644 js/src/jit-test/tests/proxy/bug1853180-2.js create mode 100644 js/src/jit-test/tests/proxy/bug1853180.js create mode 100644 js/src/jit-test/tests/proxy/bug897403.js create mode 100644 js/src/jit-test/tests/proxy/bug901979-1.js create mode 100644 js/src/jit-test/tests/proxy/bug901979-2.js create mode 100644 js/src/jit-test/tests/proxy/bug911553.js create mode 100644 js/src/jit-test/tests/proxy/defineProperty-fallback.js create mode 100644 js/src/jit-test/tests/proxy/delete-not-invoked-on-proto.js create mode 100644 js/src/jit-test/tests/proxy/freeze-proxy.js create mode 100644 js/src/jit-test/tests/proxy/function-toString.js create mode 100644 js/src/jit-test/tests/proxy/getElementIfPresent-not-present.js create mode 100644 js/src/jit-test/tests/proxy/getPrototype-cycle-for-in.js create mode 100644 js/src/jit-test/tests/proxy/getPrototype-cycle-hasInstance.js create mode 100644 js/src/jit-test/tests/proxy/operations-on-revoked.js create mode 100644 js/src/jit-test/tests/proxy/preserve-iscallable-isconstructor.js create mode 100644 js/src/jit-test/tests/proxy/proxy-array-length.js create mode 100644 js/src/jit-test/tests/proxy/seal-proxy.js create mode 100644 js/src/jit-test/tests/proxy/surfaces.js create mode 100644 js/src/jit-test/tests/proxy/target-becomes-nonextensible-during-preventExtensions.js create mode 100644 js/src/jit-test/tests/proxy/testBug793160.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyApply1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyApply2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyApply3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyApply4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyConstruct1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyConstruct2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyConstruct3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyConstruct4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyConstruct5.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyConstructor.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyDefineProperty1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyDefineProperty2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyDefineProperty3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyDefineProperty4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyDefineProperty5.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyDefineProperty6.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyDefineProperty7.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyDefinePropertyFailure.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyEnumerate1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet10.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet11.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet12.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet13.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet14.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet15.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet5.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet6.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet8.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGet9.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetInherited1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetInherited2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetInherited3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetInherited4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor10.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor11.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor5.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor6.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor7.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor8.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor9.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames5.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames6.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames7.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames8.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames9.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyHas1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyHas2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyHas3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyHas4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyHas5.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyHas6.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyHas7.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyHasOwnProperty.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyIsExtensible1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyIsExtensible2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyKeys1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyKeys10.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyKeys11.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyKeys2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyKeys3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyKeys4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyKeys5.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyKeys6.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyKeys7.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyKeys8.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyKeys9.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyOnProtoWithForIn.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyOwnKeysSymbol.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions5.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyRevoke.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySet1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySet10.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySet2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySet3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySet4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySet5.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySet6.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySet7.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySet8.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySet9.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySetArray1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySetArray2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySetArray3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySetArray4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySetFailure.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySetInherited.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySetNested.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySetNested2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxySetReceiverLookup.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyValidateProperty1.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyValidateProperty2.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyValidateProperty3.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyValidateProperty4.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyValidateProperty5.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyValidateProperty6.js create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyValidateProperty7.js create mode 100644 js/src/jit-test/tests/proxy/testSetImmutablePrototype.js create mode 100644 js/src/jit-test/tests/proxy/testTestIntegrityLevel.js create mode 100644 js/src/jit-test/tests/proxy/testWrapWithProtoIter.js create mode 100644 js/src/jit-test/tests/proxy/testWrapWithProtoSet.js create mode 100644 js/src/jit-test/tests/proxy/testWrapWithProtoTypedArray.js create mode 100644 js/src/jit-test/tests/proxy/testWrapWithProtoTypedArraySortFloat32.js create mode 100644 js/src/jit-test/tests/proxy/testWrapperGetInherited.js create mode 100644 js/src/jit-test/tests/realms/array-ctor.js create mode 100644 js/src/jit-test/tests/realms/array-species-create.js create mode 100644 js/src/jit-test/tests/realms/basic.js create mode 100644 js/src/jit-test/tests/realms/bug1385890-c50.js create mode 100644 js/src/jit-test/tests/realms/bug1479430.js create mode 100644 js/src/jit-test/tests/realms/bug1487238.js create mode 100644 js/src/jit-test/tests/realms/bug1496892.js create mode 100644 js/src/jit-test/tests/realms/bug1513665.js create mode 100644 js/src/jit-test/tests/realms/bug1514263.js create mode 100644 js/src/jit-test/tests/realms/bug1518753.js create mode 100644 js/src/jit-test/tests/realms/bug1518821.js create mode 100644 js/src/jit-test/tests/realms/bug1519857.js create mode 100644 js/src/jit-test/tests/realms/bug1548611.js create mode 100644 js/src/jit-test/tests/realms/bug1610189.js create mode 100644 js/src/jit-test/tests/realms/ccw-errors.js create mode 100644 js/src/jit-test/tests/realms/first-global.js create mode 100644 js/src/jit-test/tests/realms/nuking.js create mode 100644 js/src/jit-test/tests/realms/promise-job-global.js create mode 100644 js/src/jit-test/tests/realms/promise-then.js create mode 100644 js/src/jit-test/tests/realms/proxy-realm.js create mode 100644 js/src/jit-test/tests/realms/scripted-caller-global.js create mode 100644 js/src/jit-test/tests/realms/switch-realms-native.js create mode 100644 js/src/jit-test/tests/realms/switch-realms-scripted.js create mode 100644 js/src/jit-test/tests/record-tuple/bug-1772597.js create mode 100644 js/src/jit-test/tests/record-tuple/compacting-gc-nested-tuples.js create mode 100644 js/src/jit-test/tests/record-tuple/compartments.js create mode 100644 js/src/jit-test/tests/record-tuple/from.js create mode 100644 js/src/jit-test/tests/record-tuple/with.js create mode 100644 js/src/jit-test/tests/regexp/CheckRegExpSyntax.js create mode 100644 js/src/jit-test/tests/regexp/RegExpExec-errors.js create mode 100644 js/src/jit-test/tests/regexp/atom-match-unicode-split-surrogate.js create mode 100644 js/src/jit-test/tests/regexp/bug-1841771.js create mode 100644 js/src/jit-test/tests/regexp/bug-1845715.js create mode 100644 js/src/jit-test/tests/regexp/bug1419785.js create mode 100644 js/src/jit-test/tests/regexp/bug1445907.js create mode 100644 js/src/jit-test/tests/regexp/bug1600272.js create mode 100644 js/src/jit-test/tests/regexp/bug1640473.js create mode 100644 js/src/jit-test/tests/regexp/bug1640475.js create mode 100644 js/src/jit-test/tests/regexp/bug1640479.js create mode 100644 js/src/jit-test/tests/regexp/bug1640487.js create mode 100644 js/src/jit-test/tests/regexp/bug1640592.js create mode 100644 js/src/jit-test/tests/regexp/bug1697077.js create mode 100644 js/src/jit-test/tests/regexp/bug1703750.js create mode 100644 js/src/jit-test/tests/regexp/bug1718842-1.js create mode 100644 js/src/jit-test/tests/regexp/bug1718842-2.js create mode 100644 js/src/jit-test/tests/regexp/bug1783555.js create mode 100644 js/src/jit-test/tests/regexp/bug1783830.js create mode 100644 js/src/jit-test/tests/regexp/bug1786012.js create mode 100644 js/src/jit-test/tests/regexp/bug1794317.js create mode 100644 js/src/jit-test/tests/regexp/builtin-exec-wrapper.js create mode 100644 js/src/jit-test/tests/regexp/clone-statics.js create mode 100644 js/src/jit-test/tests/regexp/flag-getters.js create mode 100644 js/src/jit-test/tests/regexp/has-capture-groups-intrinsic.js create mode 100644 js/src/jit-test/tests/regexp/huge-01.js create mode 100644 js/src/jit-test/tests/regexp/huge-02.js create mode 100644 js/src/jit-test/tests/regexp/lastIndex-negative.js create mode 100644 js/src/jit-test/tests/regexp/lastIndex-non-writable.js create mode 100644 js/src/jit-test/tests/regexp/lastIndex-too-large.js create mode 100644 js/src/jit-test/tests/regexp/lastIndex-valueOf.js create mode 100644 js/src/jit-test/tests/regexp/match-indices-dictionary.js create mode 100644 js/src/jit-test/tests/regexp/match-indices-warp.js create mode 100644 js/src/jit-test/tests/regexp/match-stub-realms.js create mode 100644 js/src/jit-test/tests/regexp/named-capture-proxy.js create mode 100644 js/src/jit-test/tests/regexp/negated-set-expression.js create mode 100644 js/src/jit-test/tests/regexp/non-unicode-case-folding-backreference.js create mode 100644 js/src/jit-test/tests/regexp/non-unicode-case-folding.js create mode 100644 js/src/jit-test/tests/regexp/replace-exec.js create mode 100644 js/src/jit-test/tests/regexp/replace-global-lambda.js create mode 100644 js/src/jit-test/tests/regexp/rope-inputs.js create mode 100644 js/src/jit-test/tests/regexp/unicode-back-reference.js create mode 100644 js/src/jit-test/tests/resist-fingerprinting/locale.js create mode 100644 js/src/jit-test/tests/resist-fingerprinting/math-fdlibm-sincostan-asm.js create mode 100644 js/src/jit-test/tests/resist-fingerprinting/math-fdlibm-sincostan.js create mode 100644 js/src/jit-test/tests/resist-fingerprinting/timezone.js create mode 100644 js/src/jit-test/tests/saved-stacks/1438121-async-function.js create mode 100644 js/src/jit-test/tests/saved-stacks/1438121-generator.js create mode 100644 js/src/jit-test/tests/saved-stacks/SavedFrame-constructor.js create mode 100644 js/src/jit-test/tests/saved-stacks/asm-frames.js create mode 100644 js/src/jit-test/tests/saved-stacks/async-implicit.js create mode 100644 js/src/jit-test/tests/saved-stacks/async-livecache.js create mode 100644 js/src/jit-test/tests/saved-stacks/async-max-frame-count.js create mode 100644 js/src/jit-test/tests/saved-stacks/async-principals.js create mode 100644 js/src/jit-test/tests/saved-stacks/async.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1004479-savedStacks-with-string-parameter.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1006876-too-much-recursion.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1012646-strlen-crasher.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1031168-trace-sources.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1149495.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1225474.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1260712.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1289058.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1289073.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1445973-quick.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1451268.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1505387-dbg-eval-ion.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1509420.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1640034-dbg-eval-across-compartments.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug-1744495.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug1813533.js create mode 100644 js/src/jit-test/tests/saved-stacks/bug1832936.js create mode 100644 js/src/jit-test/tests/saved-stacks/caching-and-ccws.js create mode 100644 js/src/jit-test/tests/saved-stacks/caching-and-frame-count.js create mode 100644 js/src/jit-test/tests/saved-stacks/capture-first-frame-with-principals.js create mode 100644 js/src/jit-test/tests/saved-stacks/display-url.js create mode 100644 js/src/jit-test/tests/saved-stacks/evals.js create mode 100644 js/src/jit-test/tests/saved-stacks/function-display-name.js create mode 100644 js/src/jit-test/tests/saved-stacks/gc-frame-cache.js create mode 100644 js/src/jit-test/tests/saved-stacks/generators.js create mode 100644 js/src/jit-test/tests/saved-stacks/get-set.js create mode 100644 js/src/jit-test/tests/saved-stacks/getters-on-invalid-objects.js create mode 100644 js/src/jit-test/tests/saved-stacks/max-frame-count.js create mode 100644 js/src/jit-test/tests/saved-stacks/native-calls.js create mode 100644 js/src/jit-test/tests/saved-stacks/oom-in-save-stack-02.js create mode 100644 js/src/jit-test/tests/saved-stacks/oom-in-save-stack.js create mode 100644 js/src/jit-test/tests/saved-stacks/principals-01.js create mode 100644 js/src/jit-test/tests/saved-stacks/principals-02.js create mode 100644 js/src/jit-test/tests/saved-stacks/principals-03.js create mode 100644 js/src/jit-test/tests/saved-stacks/principals-04.js create mode 100644 js/src/jit-test/tests/saved-stacks/proxy-handlers.js create mode 100644 js/src/jit-test/tests/saved-stacks/same-stack.js create mode 100644 js/src/jit-test/tests/saved-stacks/self-hosted.js create mode 100644 js/src/jit-test/tests/saved-stacks/shared-parent-frames.js create mode 100644 js/src/jit-test/tests/saved-stacks/stacks-are-frozen.js create mode 100644 js/src/jit-test/tests/saved-stacks/stringify-with-self-hosted.js create mode 100644 js/src/jit-test/tests/self-hosting/GetStringDataProperty.js create mode 100644 js/src/jit-test/tests/self-hosting/bug1264575.js create mode 100644 js/src/jit-test/tests/self-hosting/bug1816084.js create mode 100644 js/src/jit-test/tests/self-hosting/bug957004.js create mode 100644 js/src/jit-test/tests/self-hosting/define-value-property.js create mode 100644 js/src/jit-test/tests/self-hosting/get-backtrace-in-constructing-bound-function.js create mode 100644 js/src/jit-test/tests/self-hosting/get-intrinsic.js create mode 100644 js/src/jit-test/tests/self-hosting/intl-fallback-original.js create mode 100644 js/src/jit-test/tests/self-hosting/invoke-self-hosted-function.js create mode 100644 js/src/jit-test/tests/self-hosting/invoke-self-hosted-with-primitive-this.js create mode 100644 js/src/jit-test/tests/self-hosting/is-constructor-inlined.js create mode 100644 js/src/jit-test/tests/self-hosting/is-constructor-on-wrapper.js create mode 100644 js/src/jit-test/tests/self-hosting/is-possibly-wrapped-typed-array.js create mode 100644 js/src/jit-test/tests/self-hosting/makeconstructible-function-inherited-prototype-property.js create mode 100644 js/src/jit-test/tests/self-hosting/method-called-on-incompatible.js create mode 100644 js/src/jit-test/tests/self-hosting/object-define-hazard.js create mode 100644 js/src/jit-test/tests/self-hosting/object-lookup-hazard.js create mode 100644 js/src/jit-test/tests/self-hosting/oom-delazify.js create mode 100644 js/src/jit-test/tests/self-hosting/oom-toplevel.js create mode 100644 js/src/jit-test/tests/self-hosting/relazify.js create mode 100644 js/src/jit-test/tests/self-hosting/tolength.js create mode 100644 js/src/jit-test/tests/self-test/assertDeepEq.js create mode 100644 js/src/jit-test/tests/self-test/assertRecoveredOnBailout-0.js create mode 100644 js/src/jit-test/tests/self-test/assertRecoveredOnBailout-1.js create mode 100644 js/src/jit-test/tests/self-test/baselineCompile-Bug1444894.js create mode 100644 js/src/jit-test/tests/self-test/baselineCompile.js create mode 100644 js/src/jit-test/tests/self-test/cacheEntry.js create mode 100644 js/src/jit-test/tests/self-test/delazification-mode-00.js create mode 100644 js/src/jit-test/tests/self-test/delazification-mode-01.js create mode 100644 js/src/jit-test/tests/self-test/delazification-mode-02.js create mode 100644 js/src/jit-test/tests/self-test/delazification-mode-03.js create mode 100644 js/src/jit-test/tests/self-test/getBacktrace-bug1138195.js create mode 100644 js/src/jit-test/tests/self-test/inIon.js create mode 100644 js/src/jit-test/tests/self-test/inJit.js create mode 100644 js/src/jit-test/tests/self-test/isRelazifiableFunction-0.js create mode 100644 js/src/jit-test/tests/self-test/notInIon.js create mode 100644 js/src/jit-test/tests/self-test/notInJit.js create mode 100644 js/src/jit-test/tests/self-test/oom-test-bug1497906.js create mode 100644 js/src/jit-test/tests/self-test/printer-escape-seq.js create mode 100644 js/src/jit-test/tests/self-test/readlineBuf.js create mode 100644 js/src/jit-test/tests/sharedbuf/asm-link.js create mode 100644 js/src/jit-test/tests/sharedbuf/byteLength.js create mode 100644 js/src/jit-test/tests/sharedbuf/gc-one-view.js create mode 100644 js/src/jit-test/tests/sharedbuf/gc-two-views.js create mode 100644 js/src/jit-test/tests/sharedbuf/growable-sab-over-mailbox.js create mode 100644 js/src/jit-test/tests/sharedbuf/inline-access.js create mode 100644 js/src/jit-test/tests/sharedbuf/is-zeroed.js create mode 100644 js/src/jit-test/tests/sharedbuf/resized-out-of-bounds-to-in-bounds-index-over-mailbox.js create mode 100644 js/src/jit-test/tests/sharedbuf/sab-construct-noargs-1068458.js create mode 100644 js/src/jit-test/tests/sharedbuf/sab-gating.js create mode 100644 js/src/jit-test/tests/sharedbuf/slice-same-memory.js create mode 100644 js/src/jit-test/tests/sharedbuf/slice.js create mode 100644 js/src/jit-test/tests/sharedbuf/subtypes.js create mode 100644 js/src/jit-test/tests/sharedbuf/typedarray-from-sharedtypedarray-with-overridden-length.js create mode 100644 js/src/jit-test/tests/stream/bug-1387503-1.js create mode 100644 js/src/jit-test/tests/stream/bug-1387503-2.js create mode 100644 js/src/jit-test/tests/stream/bug-1503399-1.js create mode 100644 js/src/jit-test/tests/stream/bug-1503399-2.js create mode 100644 js/src/jit-test/tests/stream/bug-1503406.js create mode 100644 js/src/jit-test/tests/stream/bug-1512008.js create mode 100644 js/src/jit-test/tests/stream/bug-1513266.js create mode 100644 js/src/jit-test/tests/stream/bug-1515816.js create mode 100644 js/src/jit-test/tests/stream/proper-realm-cancel.js create mode 100644 js/src/jit-test/tests/stream/proper-realm-pull.js create mode 100644 js/src/jit-test/tests/stream/reader-closedPromise-handled-2.js create mode 100644 js/src/jit-test/tests/stream/reader-closedPromise-handled.js create mode 100644 js/src/jit-test/tests/structured-clone/Map-Set-cross-compartment.js create mode 100644 js/src/jit-test/tests/structured-clone/Map.js create mode 100644 js/src/jit-test/tests/structured-clone/Set.js create mode 100644 js/src/jit-test/tests/structured-clone/array-buffers.js create mode 100644 js/src/jit-test/tests/structured-clone/bug1687243.js create mode 100644 js/src/jit-test/tests/structured-clone/bug1875797.js create mode 100644 js/src/jit-test/tests/structured-clone/errors.js create mode 100644 js/src/jit-test/tests/structured-clone/growable-shared-array-buffers.js create mode 100644 js/src/jit-test/tests/structured-clone/resizable-array-buffers-transferable.js create mode 100644 js/src/jit-test/tests/structured-clone/resizable-array-buffers.js create mode 100644 js/src/jit-test/tests/structured-clone/roundtrip.js create mode 100644 js/src/jit-test/tests/structured-clone/sab-errMsg.js create mode 100644 js/src/jit-test/tests/structured-clone/saved-stack.js create mode 100644 js/src/jit-test/tests/structured-clone/tenuring.js create mode 100644 js/src/jit-test/tests/structured-clone/transferable-across-segments.js create mode 100644 js/src/jit-test/tests/structured-clone/transferable-cleanup.js create mode 100644 js/src/jit-test/tests/structured-clone/version3.js create mode 100644 js/src/jit-test/tests/sunspider/check-3d-cube.js create mode 100644 js/src/jit-test/tests/sunspider/check-3d-morph.js create mode 100644 js/src/jit-test/tests/sunspider/check-3d-raytrace.js create mode 100644 js/src/jit-test/tests/sunspider/check-access-binary-trees.js create mode 100644 js/src/jit-test/tests/sunspider/check-access-fannkuch.js create mode 100644 js/src/jit-test/tests/sunspider/check-access-nbody.js create mode 100644 js/src/jit-test/tests/sunspider/check-access-nsieve.js create mode 100644 js/src/jit-test/tests/sunspider/check-bitops-3bit-bits-in-byte.js create mode 100644 js/src/jit-test/tests/sunspider/check-bitops-bits-in-byte.js create mode 100644 js/src/jit-test/tests/sunspider/check-bitops-bitwise-and.js create mode 100644 js/src/jit-test/tests/sunspider/check-bitops-nsieve-bits.js create mode 100644 js/src/jit-test/tests/sunspider/check-controlflow-recursive.js create mode 100644 js/src/jit-test/tests/sunspider/check-crypto-aes.js create mode 100644 js/src/jit-test/tests/sunspider/check-crypto-md5.js create mode 100644 js/src/jit-test/tests/sunspider/check-crypto-sha1.js create mode 100644 js/src/jit-test/tests/sunspider/check-date-format-tofte.js create mode 100644 js/src/jit-test/tests/sunspider/check-date-format-xparb.js create mode 100644 js/src/jit-test/tests/sunspider/check-math-cordic.js create mode 100644 js/src/jit-test/tests/sunspider/check-math-partial-sums.js create mode 100644 js/src/jit-test/tests/sunspider/check-math-spectral-norm.js create mode 100644 js/src/jit-test/tests/sunspider/check-mont.js create mode 100644 js/src/jit-test/tests/sunspider/check-regexp-dna.js create mode 100644 js/src/jit-test/tests/sunspider/check-string-fasta.js create mode 100644 js/src/jit-test/tests/sunspider/check-string-tagcloud.js create mode 100644 js/src/jit-test/tests/sunspider/check-string-unpack-code.js create mode 100644 js/src/jit-test/tests/symbol-equality.js create mode 100644 js/src/jit-test/tests/symbol/bug-1033856.js create mode 100644 js/src/jit-test/tests/symbol/not.js create mode 100644 js/src/jit-test/tests/symbol/toNumber-2.js create mode 100644 js/src/jit-test/tests/symbol/toNumber.js create mode 100644 js/src/jit-test/tests/symbol/toString.js create mode 100644 js/src/jit-test/tests/symbol/truthiness.js create mode 100644 js/src/jit-test/tests/symbol/typed-arrays.js create mode 100644 js/src/jit-test/tests/symbol/typeof.js create mode 100644 js/src/jit-test/tests/truthiness/equal-null.js create mode 100644 js/src/jit-test/tests/truthiness/equal-undefined.js create mode 100644 js/src/jit-test/tests/truthiness/if-equal-null.js create mode 100644 js/src/jit-test/tests/truthiness/if-equal-undefined.js create mode 100644 js/src/jit-test/tests/truthiness/if-not-equal-null.js create mode 100644 js/src/jit-test/tests/truthiness/if-not-equal-undefined.js create mode 100644 js/src/jit-test/tests/truthiness/if-strict-equal-null.js create mode 100644 js/src/jit-test/tests/truthiness/if-strict-equal-undefined.js create mode 100644 js/src/jit-test/tests/truthiness/if-strict-not-equal-null.js create mode 100644 js/src/jit-test/tests/truthiness/if-strict-not-equal-undefined.js create mode 100644 js/src/jit-test/tests/truthiness/if.js create mode 100644 js/src/jit-test/tests/truthiness/not-equal-null.js create mode 100644 js/src/jit-test/tests/truthiness/not-equal-undefined.js create mode 100644 js/src/jit-test/tests/truthiness/not.js create mode 100644 js/src/jit-test/tests/truthiness/obj-obj-equal.js create mode 100644 js/src/jit-test/tests/truthiness/obj-obj-not-equal.js create mode 100644 js/src/jit-test/tests/truthiness/strict-equal-null.js create mode 100644 js/src/jit-test/tests/truthiness/strict-equal-undefined.js create mode 100644 js/src/jit-test/tests/truthiness/strict-not-equal-null.js create mode 100644 js/src/jit-test/tests/truthiness/strict-not-equal-undefined.js create mode 100644 js/src/jit-test/tests/truthiness/typeof.js create mode 100644 js/src/jit-test/tests/typedarray/arraybuffer-pin.js create mode 100644 js/src/jit-test/tests/typedarray/arraybuffer-transfer-coerce-large-bytelength.js create mode 100644 js/src/jit-test/tests/typedarray/arraybuffer-transfer-mapped.txt create mode 100644 js/src/jit-test/tests/typedarray/arraybuffer-transfer-unknown-arena.js create mode 100644 js/src/jit-test/tests/typedarray/arraybuffer-transfer.js create mode 100644 js/src/jit-test/tests/typedarray/bug1518764.js create mode 100644 js/src/jit-test/tests/typedarray/bug1520536.js create mode 100644 js/src/jit-test/tests/typedarray/bug1713567.js create mode 100644 js/src/jit-test/tests/typedarray/bug1858678.js create mode 100644 js/src/jit-test/tests/typedarray/construct-with-arraybuffer.js create mode 100644 js/src/jit-test/tests/typedarray/construct-with-arrays.js create mode 100644 js/src/jit-test/tests/typedarray/construct-with-sharedarraybuffer.js create mode 100644 js/src/jit-test/tests/typedarray/define-property-oob.js create mode 100644 js/src/jit-test/tests/typedarray/dom-view.js create mode 100644 js/src/jit-test/tests/typedarray/ensure-non-inline.js create mode 100644 js/src/jit-test/tests/typedarray/error-messages.js create mode 100644 js/src/jit-test/tests/typedarray/indexed-integer-exotics-simple.js create mode 100644 js/src/jit-test/tests/typedarray/indexed-integer-exotics.js create mode 100644 js/src/jit-test/tests/typedarray/oom-allocating-arraybuffer-contents.js create mode 100644 js/src/jit-test/tests/typedarray/oom-allocating-copying-same-buffer-contents.js create mode 100644 js/src/jit-test/tests/typedarray/sort.js create mode 100644 js/src/jit-test/tests/typedarray/typed-array-change-by-copy.js create mode 100644 js/src/jit-test/tests/typedarray/typed-array-inline-cache.js create mode 100644 js/src/jit-test/tests/typedarray/typedarrayobject-getelements.js create mode 100644 js/src/jit-test/tests/v8-v5/check-crypto.js create mode 100644 js/src/jit-test/tests/v8-v5/check-deltablue.js create mode 100644 js/src/jit-test/tests/v8-v5/check-earley-boyer.js create mode 100644 js/src/jit-test/tests/v8-v5/check-raytrace.js create mode 100644 js/src/jit-test/tests/v8-v5/check-regexp.js create mode 100644 js/src/jit-test/tests/v8-v5/check-richards.js create mode 100644 js/src/jit-test/tests/v8-v5/check-splay.js create mode 100644 js/src/jit-test/tests/warp/arguments-object-load-arg.js create mode 100644 js/src/jit-test/tests/warp/arguments-object-load-length.js create mode 100644 js/src/jit-test/tests/warp/bailout-inline-fun-call-no-args.js create mode 100644 js/src/jit-test/tests/warp/bailout-inline-getter.js create mode 100644 js/src/jit-test/tests/warp/booleantostring.js create mode 100644 js/src/jit-test/tests/warp/bug1646041.js create mode 100644 js/src/jit-test/tests/warp/bug1646302.js create mode 100644 js/src/jit-test/tests/warp/bug1647054.js create mode 100644 js/src/jit-test/tests/warp/bug1652049.js create mode 100644 js/src/jit-test/tests/warp/bug1652732.js create mode 100644 js/src/jit-test/tests/warp/bug1653913.js create mode 100644 js/src/jit-test/tests/warp/bug1653972.js create mode 100644 js/src/jit-test/tests/warp/bug1661530.js create mode 100644 js/src/jit-test/tests/warp/bug1661728.js create mode 100644 js/src/jit-test/tests/warp/bug1662146.js create mode 100644 js/src/jit-test/tests/warp/bug1663993.js create mode 100644 js/src/jit-test/tests/warp/bug1664007.js create mode 100644 js/src/jit-test/tests/warp/bug1665303.js create mode 100644 js/src/jit-test/tests/warp/bug1666070.js create mode 100644 js/src/jit-test/tests/warp/bug1666142-1.js create mode 100644 js/src/jit-test/tests/warp/bug1666142-2.js create mode 100644 js/src/jit-test/tests/warp/bug1667680.js create mode 100644 js/src/jit-test/tests/warp/bug1667685.js create mode 100644 js/src/jit-test/tests/warp/bug1667699.js create mode 100644 js/src/jit-test/tests/warp/bug1668197.js create mode 100644 js/src/jit-test/tests/warp/bug1669415.js create mode 100644 js/src/jit-test/tests/warp/bug1669597.js create mode 100644 js/src/jit-test/tests/warp/bug1671812.js create mode 100644 js/src/jit-test/tests/warp/bug1676631.js create mode 100644 js/src/jit-test/tests/warp/bug1676639.js create mode 100644 js/src/jit-test/tests/warp/bug1681056.js create mode 100644 js/src/jit-test/tests/warp/bug1681597.js create mode 100644 js/src/jit-test/tests/warp/bug1681677.js create mode 100644 js/src/jit-test/tests/warp/bug1681806.js create mode 100644 js/src/jit-test/tests/warp/bug1683306.js create mode 100644 js/src/jit-test/tests/warp/bug1683309.js create mode 100644 js/src/jit-test/tests/warp/bug1683535-1.js create mode 100644 js/src/jit-test/tests/warp/bug1683535-2.js create mode 100644 js/src/jit-test/tests/warp/bug1683614.js create mode 100644 js/src/jit-test/tests/warp/bug1686207.js create mode 100644 js/src/jit-test/tests/warp/bug1686702.js create mode 100644 js/src/jit-test/tests/warp/bug1687661.js create mode 100644 js/src/jit-test/tests/warp/bug1687672.js create mode 100644 js/src/jit-test/tests/warp/bug1688136.js create mode 100644 js/src/jit-test/tests/warp/bug1688346.js create mode 100644 js/src/jit-test/tests/warp/bug1692857.js create mode 100644 js/src/jit-test/tests/warp/bug1693062-01.js create mode 100644 js/src/jit-test/tests/warp/bug1693062-02.js create mode 100644 js/src/jit-test/tests/warp/bug1694600.js create mode 100644 js/src/jit-test/tests/warp/bug1696897.js create mode 100644 js/src/jit-test/tests/warp/bug1697451.js create mode 100644 js/src/jit-test/tests/warp/bug1697483.js create mode 100644 js/src/jit-test/tests/warp/bug1698126.js create mode 100644 js/src/jit-test/tests/warp/bug1698609.js create mode 100644 js/src/jit-test/tests/warp/bug1699056.js create mode 100644 js/src/jit-test/tests/warp/bug1700579.js create mode 100644 js/src/jit-test/tests/warp/bug1700616.js create mode 100644 js/src/jit-test/tests/warp/bug1701208.js create mode 100644 js/src/jit-test/tests/warp/bug1702465.js create mode 100644 js/src/jit-test/tests/warp/bug1703766.js create mode 100644 js/src/jit-test/tests/warp/bug1703817.js create mode 100644 js/src/jit-test/tests/warp/bug1704467.js create mode 100644 js/src/jit-test/tests/warp/bug1706314.js create mode 100644 js/src/jit-test/tests/warp/bug1708839.js create mode 100644 js/src/jit-test/tests/warp/bug1713579.js create mode 100644 js/src/jit-test/tests/warp/bug1716231.js create mode 100644 js/src/jit-test/tests/warp/bug1716931.js create mode 100644 js/src/jit-test/tests/warp/bug1719884.js create mode 100644 js/src/jit-test/tests/warp/bug1720093-1.js create mode 100644 js/src/jit-test/tests/warp/bug1720093-2.js create mode 100644 js/src/jit-test/tests/warp/bug1732601.js create mode 100644 js/src/jit-test/tests/warp/bug1735157.js create mode 100644 js/src/jit-test/tests/warp/bug1738676.js create mode 100644 js/src/jit-test/tests/warp/bug1741635-1.js create mode 100644 js/src/jit-test/tests/warp/bug1741635-2.js create mode 100644 js/src/jit-test/tests/warp/bug1745949.js create mode 100644 js/src/jit-test/tests/warp/bug1761947.js create mode 100644 js/src/jit-test/tests/warp/bug1762769.js create mode 100644 js/src/jit-test/tests/warp/bug1762770.js create mode 100644 js/src/jit-test/tests/warp/bug1763012-1.js create mode 100644 js/src/jit-test/tests/warp/bug1763012-2.js create mode 100644 js/src/jit-test/tests/warp/bug1767196.js create mode 100644 js/src/jit-test/tests/warp/bug1769410.js create mode 100644 js/src/jit-test/tests/warp/bug1770904.js create mode 100644 js/src/jit-test/tests/warp/bug1789821.js create mode 100644 js/src/jit-test/tests/warp/bug1825220.js create mode 100644 js/src/jit-test/tests/warp/bug1825408.js create mode 100644 js/src/jit-test/tests/warp/bug1852238.js create mode 100644 js/src/jit-test/tests/warp/bug1852398.js create mode 100644 js/src/jit-test/tests/warp/bug1852702.js create mode 100644 js/src/jit-test/tests/warp/cancel-offthread-compile.js create mode 100644 js/src/jit-test/tests/warp/catch-overflow-regexp.js create mode 100644 js/src/jit-test/tests/warp/compare-constant-string.js create mode 100644 js/src/jit-test/tests/warp/compare-empty-string.js create mode 100644 js/src/jit-test/tests/warp/conditional-test-guard.js create mode 100644 js/src/jit-test/tests/warp/conditional-test-undefined-1.js create mode 100644 js/src/jit-test/tests/warp/conditional-test-undefined-2.js create mode 100644 js/src/jit-test/tests/warp/force-warp.js create mode 100644 js/src/jit-test/tests/warp/fun-call-not-inlined.js create mode 100644 js/src/jit-test/tests/warp/function-load-length.js create mode 100644 js/src/jit-test/tests/warp/function-load-name.js create mode 100644 js/src/jit-test/tests/warp/function-var-environment-inlined.js create mode 100644 js/src/jit-test/tests/warp/function-var-environment.js create mode 100644 js/src/jit-test/tests/warp/guard-function-is-non-builtin-ctor.js create mode 100644 js/src/jit-test/tests/warp/guard-has-getter-setter.js create mode 100644 js/src/jit-test/tests/warp/guard-specific-atom-with-short-atom.js create mode 100644 js/src/jit-test/tests/warp/guard-string-to-number-or-int32.js create mode 100644 js/src/jit-test/tests/warp/guardproto-nursery.js create mode 100644 js/src/jit-test/tests/warp/inline-array-at.js create mode 100644 js/src/jit-test/tests/warp/inlined-accessor-exc-bailout.js create mode 100644 js/src/jit-test/tests/warp/load-unboxed-typedarray-bigint.js create mode 100644 js/src/jit-test/tests/warp/map-get-bigint.js create mode 100644 js/src/jit-test/tests/warp/map-get-nongcthing.js create mode 100644 js/src/jit-test/tests/warp/map-get-object.js create mode 100644 js/src/jit-test/tests/warp/map-get-string.js create mode 100644 js/src/jit-test/tests/warp/map-get-symbol.js create mode 100644 js/src/jit-test/tests/warp/map-get-value.js create mode 100644 js/src/jit-test/tests/warp/map-has-bigint.js create mode 100644 js/src/jit-test/tests/warp/map-has-nongcthing.js create mode 100644 js/src/jit-test/tests/warp/map-has-object.js create mode 100644 js/src/jit-test/tests/warp/map-has-string.js create mode 100644 js/src/jit-test/tests/warp/map-has-symbol.js create mode 100644 js/src/jit-test/tests/warp/map-has-value.js create mode 100644 js/src/jit-test/tests/warp/math-indirect-truncate.js create mode 100644 js/src/jit-test/tests/warp/mega-morphic-load-and-has-prop.js create mode 100644 js/src/jit-test/tests/warp/min-max-foldsTo-1.js create mode 100644 js/src/jit-test/tests/warp/min-max-foldsTo-2.js create mode 100644 js/src/jit-test/tests/warp/min-max-foldsTo-3.js create mode 100644 js/src/jit-test/tests/warp/min-max-foldsTo-4.js create mode 100644 js/src/jit-test/tests/warp/non-int32-array-length.js create mode 100644 js/src/jit-test/tests/warp/null-not-zero-index.js create mode 100644 js/src/jit-test/tests/warp/number-tostring-with-base-uppercase.js create mode 100644 js/src/jit-test/tests/warp/number-tostring-with-base.js create mode 100644 js/src/jit-test/tests/warp/object-class-tostring.js create mode 100644 js/src/jit-test/tests/warp/phi-specialization.js create mode 100644 js/src/jit-test/tests/warp/polymorphic-to-bool.js create mode 100644 js/src/jit-test/tests/warp/property-add-shape.js create mode 100644 js/src/jit-test/tests/warp/rest-elements.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-array-apply-array-01.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-array-apply-array-02.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-array-apply-array-03.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-array-apply-array-04.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-array-apply-array.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-array-construct-array-01.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-array-construct-array-02.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-array-construct-array-03.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-array-construct-array-04.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-array-construct-array.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-array-iterator-next.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-rest-apply-array.js create mode 100644 js/src/jit-test/tests/warp/scalar-replace-rest-construct-array.js create mode 100644 js/src/jit-test/tests/warp/set-has-bigint.js create mode 100644 js/src/jit-test/tests/warp/set-has-nongcthing.js create mode 100644 js/src/jit-test/tests/warp/set-has-object.js create mode 100644 js/src/jit-test/tests/warp/set-has-string.js create mode 100644 js/src/jit-test/tests/warp/set-has-symbol.js create mode 100644 js/src/jit-test/tests/warp/set-has-value.js create mode 100644 js/src/jit-test/tests/warp/setelem-inlining-bailout.js create mode 100644 js/src/jit-test/tests/warp/small-inlinable-builtins.js create mode 100644 js/src/jit-test/tests/warp/store-element-hole-negative-index.js create mode 100644 js/src/jit-test/tests/warp/store-element-hole-sparse-element.js create mode 100644 js/src/jit-test/tests/warp/string-char.js create mode 100644 js/src/jit-test/tests/warp/string-charCodeAt-constant-index-in-left-rope-child.js create mode 100644 js/src/jit-test/tests/warp/string-compare-char-in-bounds.js create mode 100644 js/src/jit-test/tests/warp/string-compare-char-out-of-bounds.js create mode 100644 js/src/jit-test/tests/warp/string-compare-char-string.js create mode 100644 js/src/jit-test/tests/warp/string-endswith-constant-string.js create mode 100644 js/src/jit-test/tests/warp/string-indexof-constant-string-length-one.js create mode 100644 js/src/jit-test/tests/warp/string-indexof-constant-string-length-two.js create mode 100644 js/src/jit-test/tests/warp/string-indexof-constant-string.js create mode 100644 js/src/jit-test/tests/warp/string-indexof-is-startswith.js create mode 100644 js/src/jit-test/tests/warp/string-startswith-constant-string.js create mode 100644 js/src/jit-test/tests/warp/string-substring-is-charat.js create mode 100644 js/src/jit-test/tests/warp/string-substring-startswith-constant-string.js create mode 100644 js/src/jit-test/tests/warp/string-substring-static-strings.js create mode 100644 js/src/jit-test/tests/warp/string-tolowercase-latin1.js create mode 100644 js/src/jit-test/tests/warp/string-totitlecase.js create mode 100644 js/src/jit-test/tests/warp/string-trim.js create mode 100644 js/src/jit-test/tests/warp/stub-folding-add-case.js create mode 100644 js/src/jit-test/tests/warp/stub-folding-cross-compartment.js create mode 100644 js/src/jit-test/tests/warp/stub-folding-transition.js create mode 100644 js/src/jit-test/tests/warp/stub-folding.js create mode 100644 js/src/jit-test/tests/warp/super-native-newtarget.js create mode 100644 js/src/jit-test/tests/warp/throw-exception-stack-location.js create mode 100644 js/src/jit-test/tests/warp/trial-inline-gc-1.js create mode 100644 js/src/jit-test/tests/warp/trial-inline-gc-2.js create mode 100644 js/src/jit-test/tests/warp/trial-inline-gc-3.js create mode 100644 js/src/jit-test/tests/warp/try-catch-unwind.js create mode 100644 js/src/jit-test/tests/warp/try-finally-1.js create mode 100644 js/src/jit-test/tests/warp/try-finally-2.js create mode 100644 js/src/jit-test/tests/warp/try-finally-3.js create mode 100644 js/src/jit-test/tests/warp/try-finally-unwind.js create mode 100644 js/src/jit-test/tests/warp/typedarray-element-exists.js create mode 100644 js/src/jit-test/tests/warp/typedarrayindextoint32.js create mode 100644 js/src/jit-test/tests/warp/typeof-is.js create mode 100644 js/src/jit-test/tests/warp/typeof-switch.js create mode 100644 js/src/jit-test/tests/wasm/README-codegen.md create mode 100644 js/src/jit-test/tests/wasm/arm-hwcap-madness.js create mode 100644 js/src/jit-test/tests/wasm/arraybuffer-transfer.js create mode 100644 js/src/jit-test/tests/wasm/async-instantiate.js create mode 100644 js/src/jit-test/tests/wasm/atomic.js create mode 100644 js/src/jit-test/tests/wasm/atomicity.js create mode 100644 js/src/jit-test/tests/wasm/backtrace.js create mode 100644 js/src/jit-test/tests/wasm/baseline-abs-addr-opt.js create mode 100644 js/src/jit-test/tests/wasm/baseline-opt.js create mode 100644 js/src/jit-test/tests/wasm/basic.js create mode 100644 js/src/jit-test/tests/wasm/bce-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/bce-x86-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/bce.js create mode 100644 js/src/jit-test/tests/wasm/bench/README.txt create mode 100644 js/src/jit-test/tests/wasm/bench/directives.txt create mode 100644 js/src/jit-test/tests/wasm/bench/wasm_box2d.js create mode 100644 js/src/jit-test/tests/wasm/bench/wasm_box2d.wasm create mode 100644 js/src/jit-test/tests/wasm/big-resize.js create mode 100644 js/src/jit-test/tests/wasm/bigint/bigint.js create mode 100644 js/src/jit-test/tests/wasm/bigint/bug1633740.js create mode 100644 js/src/jit-test/tests/wasm/bigint/directives.txt create mode 100644 js/src/jit-test/tests/wasm/bigint/stubs.js create mode 100644 js/src/jit-test/tests/wasm/binary-slow.js create mode 100644 js/src/jit-test/tests/wasm/binary.js create mode 100644 js/src/jit-test/tests/wasm/binop-arm64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/binop-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/binop-x64-ion-folding.js create mode 100644 js/src/jit-test/tests/wasm/bug1693500.js create mode 100644 js/src/jit-test/tests/wasm/bug1776358.js create mode 100644 js/src/jit-test/tests/wasm/bug1858423.js create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/directives.txt create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/i8vecmul.js create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/CommonTestSetup.js create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8MultiplyAndAddBias.js create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareA.js create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareB.js create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareBFromQuantizedTransposed.js create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareBFromTransposed.js create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareBias.js create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8SelectColumnsOfB.js create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/directives.txt create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/js-string/basic.js create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/js-string/directives.txt create mode 100644 js/src/jit-test/tests/wasm/builtin-modules/oom-test.js create mode 100644 js/src/jit-test/tests/wasm/builtin.js create mode 100644 js/src/jit-test/tests/wasm/caching.js create mode 100644 js/src/jit-test/tests/wasm/comments.js create mode 100644 js/src/jit-test/tests/wasm/compare-select-i32-i64.js create mode 100644 js/src/jit-test/tests/wasm/compiler-frame-depth.js create mode 100644 js/src/jit-test/tests/wasm/const.js create mode 100644 js/src/jit-test/tests/wasm/control-flow-phi-inputs.js create mode 100644 js/src/jit-test/tests/wasm/control-flow.js create mode 100644 js/src/jit-test/tests/wasm/conversion.js create mode 100644 js/src/jit-test/tests/wasm/cross-global.js create mode 100644 js/src/jit-test/tests/wasm/custom-section.js create mode 100644 js/src/jit-test/tests/wasm/declared-segs.js create mode 100644 js/src/jit-test/tests/wasm/directiveless/README.md create mode 100644 js/src/jit-test/tests/wasm/directiveless/bug1645310.js create mode 100644 js/src/jit-test/tests/wasm/directiveless/bug1664979.js create mode 100644 js/src/jit-test/tests/wasm/directiveless/bug1666051.js create mode 100644 js/src/jit-test/tests/wasm/directiveless/bug1877358.js create mode 100644 js/src/jit-test/tests/wasm/directives.txt create mode 100644 js/src/jit-test/tests/wasm/disasm.js create mode 100644 js/src/jit-test/tests/wasm/drop.js create mode 100644 js/src/jit-test/tests/wasm/errors.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/bug-1744663-extended.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/bug-1744663.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/bug-1747562.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/bug-1747704.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/bug-1751699.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/bug-1767446.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/bug-1788213.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/bug-1791361.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/bug-1797685.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/caching.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/calls.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/directives.txt create mode 100644 js/src/jit-test/tests/wasm/exceptions/events.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/example.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/import-export.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/instructions.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/ion-loop-phi.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/js-api.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/memory.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/oom-construct-message.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/oom-create-exception-data.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/prototypes.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/reftypes.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/side-effects-in-try.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/stack.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/throw-to-js.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/unreachable.js create mode 100644 js/src/jit-test/tests/wasm/exceptions/validation.js create mode 100644 js/src/jit-test/tests/wasm/exnref/casting.js create mode 100644 js/src/jit-test/tests/wasm/exnref/directives.txt create mode 100644 js/src/jit-test/tests/wasm/exnref/throw-ref.js create mode 100644 js/src/jit-test/tests/wasm/exnref/try-table.js create mode 100644 js/src/jit-test/tests/wasm/extended-const/basic.js create mode 100644 js/src/jit-test/tests/wasm/extended-const/directives.txt create mode 100644 js/src/jit-test/tests/wasm/extended-const/disabled.js create mode 100644 js/src/jit-test/tests/wasm/extended-const/pathological.js create mode 100644 js/src/jit-test/tests/wasm/extract-code.js create mode 100644 js/src/jit-test/tests/wasm/fac.js create mode 100644 js/src/jit-test/tests/wasm/features.js create mode 100644 js/src/jit-test/tests/wasm/fence.js create mode 100644 js/src/jit-test/tests/wasm/float-unaligned.js create mode 100644 js/src/jit-test/tests/wasm/float.js create mode 100644 js/src/jit-test/tests/wasm/full-cycle.js create mode 100644 js/src/jit-test/tests/wasm/function-references/as-non-null.js create mode 100644 js/src/jit-test/tests/wasm/function-references/binary.js create mode 100644 js/src/jit-test/tests/wasm/function-references/br-non-null.js create mode 100644 js/src/jit-test/tests/wasm/function-references/br-null.js create mode 100644 js/src/jit-test/tests/wasm/function-references/call_ref.js create mode 100644 js/src/jit-test/tests/wasm/function-references/directives.txt create mode 100644 js/src/jit-test/tests/wasm/function-references/disabled.js create mode 100644 js/src/jit-test/tests/wasm/function-references/nnl-test.js create mode 100644 js/src/jit-test/tests/wasm/function-references/non-nullable-table.js create mode 100644 js/src/jit-test/tests/wasm/function-references/non-nullable.js create mode 100644 js/src/jit-test/tests/wasm/function-references/reftype-parse.js create mode 100644 js/src/jit-test/tests/wasm/gc/TypedObject.js create mode 100644 js/src/jit-test/tests/wasm/gc/arrays.js create mode 100644 js/src/jit-test/tests/wasm/gc/binary.js create mode 100644 js/src/jit-test/tests/wasm/gc/br-on-cast-fail.js create mode 100644 js/src/jit-test/tests/wasm/gc/br-on-cast.js create mode 100644 js/src/jit-test/tests/wasm/gc/bug-1841119.js create mode 100644 js/src/jit-test/tests/wasm/gc/bug-1843295.js create mode 100644 js/src/jit-test/tests/wasm/gc/bug-1845436.js create mode 100644 js/src/jit-test/tests/wasm/gc/bug-1845673.js create mode 100644 js/src/jit-test/tests/wasm/gc/bug-1854007.js create mode 100644 js/src/jit-test/tests/wasm/gc/call-indirect-subtyping.js create mode 100644 js/src/jit-test/tests/wasm/gc/cast-abstract.js create mode 100644 js/src/jit-test/tests/wasm/gc/cast-extern.js create mode 100644 js/src/jit-test/tests/wasm/gc/casting.js create mode 100644 js/src/jit-test/tests/wasm/gc/debugger.js create mode 100644 js/src/jit-test/tests/wasm/gc/directives.txt create mode 100644 js/src/jit-test/tests/wasm/gc/disabled.js create mode 100644 js/src/jit-test/tests/wasm/gc/externref-boxing-struct.js create mode 100644 js/src/jit-test/tests/wasm/gc/externref-conversions.js create mode 100644 js/src/jit-test/tests/wasm/gc/final_types.js create mode 100644 js/src/jit-test/tests/wasm/gc/function_subtyping.js create mode 100644 js/src/jit-test/tests/wasm/gc/global-get.js create mode 100644 js/src/jit-test/tests/wasm/gc/globals.js create mode 100644 js/src/jit-test/tests/wasm/gc/i31ref.js create mode 100644 js/src/jit-test/tests/wasm/gc/init-expr.js create mode 100644 js/src/jit-test/tests/wasm/gc/ion-and-baseline.js create mode 100644 js/src/jit-test/tests/wasm/gc/js-boundary.js create mode 100644 js/src/jit-test/tests/wasm/gc/limits.js create mode 100644 js/src/jit-test/tests/wasm/gc/linking.js create mode 100644 js/src/jit-test/tests/wasm/gc/ref-eq.js create mode 100644 js/src/jit-test/tests/wasm/gc/ref-global.js create mode 100644 js/src/jit-test/tests/wasm/gc/ref-struct.js create mode 100644 js/src/jit-test/tests/wasm/gc/ref.js create mode 100644 js/src/jit-test/tests/wasm/gc/regress-1633355.js create mode 100644 js/src/jit-test/tests/wasm/gc/regress-1739330.js create mode 100644 js/src/jit-test/tests/wasm/gc/regress-1745391.js create mode 100644 js/src/jit-test/tests/wasm/gc/regress-1754701.js create mode 100644 js/src/jit-test/tests/wasm/gc/regress-1830975.js create mode 100644 js/src/jit-test/tests/wasm/gc/regress-outline-repr.js create mode 100644 js/src/jit-test/tests/wasm/gc/signal-null-check.js create mode 100644 js/src/jit-test/tests/wasm/gc/structs.js create mode 100644 js/src/jit-test/tests/wasm/gc/structs2.js create mode 100644 js/src/jit-test/tests/wasm/gc/supertype_later_in_group.js create mode 100644 js/src/jit-test/tests/wasm/gc/tables-generalized-struct.js create mode 100644 js/src/jit-test/tests/wasm/gc/tables.js create mode 100644 js/src/jit-test/tests/wasm/gc/trailers-gc-stress.js create mode 100644 js/src/jit-test/tests/wasm/gc/unreachable.js create mode 100644 js/src/jit-test/tests/wasm/gc/value_subtyping.js create mode 100644 js/src/jit-test/tests/wasm/globals-impl.js create mode 100644 js/src/jit-test/tests/wasm/globals.js create mode 100644 js/src/jit-test/tests/wasm/grow-memory.js create mode 100644 js/src/jit-test/tests/wasm/import-callables.js create mode 100644 js/src/jit-test/tests/wasm/import-export-sigs.js create mode 100644 js/src/jit-test/tests/wasm/import-export.js create mode 100644 js/src/jit-test/tests/wasm/import-gc.js create mode 100644 js/src/jit-test/tests/wasm/integer.js create mode 100644 js/src/jit-test/tests/wasm/ion-adhoc-multiplatform.js create mode 100644 js/src/jit-test/tests/wasm/ion-args.js create mode 100644 js/src/jit-test/tests/wasm/ion-asmjs-ctor.js create mode 100644 js/src/jit-test/tests/wasm/ion-debugger.js create mode 100644 js/src/jit-test/tests/wasm/ion-error-ool.js create mode 100644 js/src/jit-test/tests/wasm/ion-error-throw.js create mode 100644 js/src/jit-test/tests/wasm/ion-error-trace.js create mode 100644 js/src/jit-test/tests/wasm/ion-gc.js create mode 100644 js/src/jit-test/tests/wasm/ion-lazy-tables.js create mode 100644 js/src/jit-test/tests/wasm/ion2wasm.js create mode 100644 js/src/jit-test/tests/wasm/js-direct-call-wasm.js create mode 100644 js/src/jit-test/tests/wasm/js-reexport.js create mode 100644 js/src/jit-test/tests/wasm/js-types/directives.txt create mode 100644 js/src/jit-test/tests/wasm/js-types/function-ctor-callable.js create mode 100644 js/src/jit-test/tests/wasm/js-types/table-js-funcs.js create mode 100644 js/src/jit-test/tests/wasm/large-memory.js create mode 100644 js/src/jit-test/tests/wasm/lazy-stubs-jitentry.js create mode 100644 js/src/jit-test/tests/wasm/limits.js create mode 100644 js/src/jit-test/tests/wasm/memory-aliasing.js create mode 100644 js/src/jit-test/tests/wasm/memory-arm64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/memory-cloning-new-global.js create mode 100644 js/src/jit-test/tests/wasm/memory-cloning.js create mode 100644 js/src/jit-test/tests/wasm/memory-control/directives.txt create mode 100644 js/src/jit-test/tests/wasm/memory-control/disabled.js create mode 100644 js/src/jit-test/tests/wasm/memory-control/memory-discard.js create mode 100644 js/src/jit-test/tests/wasm/memory-maximum-clamping.js create mode 100644 js/src/jit-test/tests/wasm/memory-partial-oob-store.js create mode 100644 js/src/jit-test/tests/wasm/memory-sharing-off.js create mode 100644 js/src/jit-test/tests/wasm/memory-sharing.js create mode 100644 js/src/jit-test/tests/wasm/memory.js create mode 100644 js/src/jit-test/tests/wasm/memory64/basic.js create mode 100644 js/src/jit-test/tests/wasm/memory64/data-active.js create mode 100644 js/src/jit-test/tests/wasm/memory64/directives.txt create mode 100644 js/src/jit-test/tests/wasm/memory64/memory-copy-shared.js create mode 100644 js/src/jit-test/tests/wasm/memory64/memory-copy.js create mode 100644 js/src/jit-test/tests/wasm/memory64/memory-fill-shared.js create mode 100644 js/src/jit-test/tests/wasm/memory64/memory-fill.js create mode 100644 js/src/jit-test/tests/wasm/memory64/memory-grow.js create mode 100644 js/src/jit-test/tests/wasm/memory64/memory-init.js create mode 100644 js/src/jit-test/tests/wasm/memory64/utility.js create mode 100644 js/src/jit-test/tests/wasm/multi-memory/directives.txt create mode 100644 js/src/jit-test/tests/wasm/multi-memory/memory_copy.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/block-run.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/block-validate.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/call-js.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/call-ref.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/call-run.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/call-validate.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/directives.txt create mode 100644 js/src/jit-test/tests/wasm/multi-value/ion-inlining.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/random-tests.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/regress-1597200.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/regress-1621645-2.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/regress-1621645.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/regress-1628417.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/regress-1628426.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/regress-1628429.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/regress-1628499.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/regress-1629496.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/regress-1631423.js create mode 100644 js/src/jit-test/tests/wasm/multi-value/regress-1661723.js create mode 100644 js/src/jit-test/tests/wasm/name.js create mode 100644 js/src/jit-test/tests/wasm/nan-semantics.js create mode 100644 js/src/jit-test/tests/wasm/oom/breakpoints.js create mode 100644 js/src/jit-test/tests/wasm/oom/directives.txt create mode 100644 js/src/jit-test/tests/wasm/oom/exports.js create mode 100644 js/src/jit-test/tests/wasm/oom/jsapi-prototype.js create mode 100644 js/src/jit-test/tests/wasm/passive-segs-boundary.js create mode 100644 js/src/jit-test/tests/wasm/passive-segs-nonboundary.js create mode 100644 js/src/jit-test/tests/wasm/passive-segs-partial-mem.js create mode 100644 js/src/jit-test/tests/wasm/passive-segs-partial-table.js create mode 100644 js/src/jit-test/tests/wasm/profiling.js create mode 100644 js/src/jit-test/tests/wasm/prototypes.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/directives.txt create mode 100644 js/src/jit-test/tests/wasm/ref-types/externref-boxing.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/externref-fastpaths.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/externref-global-object.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/externref-global-postbarrier.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/externref-global-prebarrier.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/externref-val-tracing.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/externref.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/funcref-fastpaths.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/funcref.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/fuzz-gc-while-allocating-global.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/ref-func.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/stackmaps1.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/stackmaps2.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/stackmaps3.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/stackmaps4-params-n-locals.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/stackmaps5.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/tables-api.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/tables-fill.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/tables-generalized.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/tables-multiple.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/tables-postbarrier-grow.js create mode 100644 js/src/jit-test/tests/wasm/ref-types/tables-stress.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-arm64-chunk-pop.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-builtin-abi.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-bytereg.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-extend8.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-getglobal-scratch.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-i64-opt-cmp.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-joinreg.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-many-results.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-nops-jumptable.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-pop-along-edge.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-pop-before-capture.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-stack-height.js create mode 100644 js/src/jit-test/tests/wasm/regress/baseline-stack-height.wasm create mode 100644 js/src/jit-test/tests/wasm/regress/brtable-conditionblock-folding.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug-1833339.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1300546.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1311019.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1392105.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1440512.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1450800.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1467415.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1491322.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1502886.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1507314.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1533204.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1566992.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1569137.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1590920.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1678542.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1678785.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1684861.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1699647.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1700610.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1708124.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1713581.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1727284/directives.txt create mode 100644 js/src/jit-test/tests/wasm/regress/bug1727284/test.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1747870.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1761850.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1762899.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1770335.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1777604/directives.txt create mode 100644 js/src/jit-test/tests/wasm/regress/bug1777604/test.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1836708.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1837686.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1839065.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1839142.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1856733.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1857829.js create mode 100644 js/src/jit-test/tests/wasm/regress/bug1858982.js create mode 100644 js/src/jit-test/tests/wasm/regress/builtin-import-sigs.js create mode 100644 js/src/jit-test/tests/wasm/regress/caller-property.js create mode 100644 js/src/jit-test/tests/wasm/regress/current-memory-tls.js create mode 100644 js/src/jit-test/tests/wasm/regress/debug-clone-segment.js create mode 100644 js/src/jit-test/tests/wasm/regress/debug-exception-in-fast-import.js create mode 100644 js/src/jit-test/tests/wasm/regress/debug-osr.js create mode 100644 js/src/jit-test/tests/wasm/regress/directives.txt create mode 100644 js/src/jit-test/tests/wasm/regress/enable-profiling-in-import.js create mode 100644 js/src/jit-test/tests/wasm/regress/frame-offset-stack-arg.js create mode 100644 js/src/jit-test/tests/wasm/regress/fuzzsafe-bug1645610.js create mode 100644 js/src/jit-test/tests/wasm/regress/gvn-unremovable-phi.js create mode 100644 js/src/jit-test/tests/wasm/regress/imul64-ion-negative-power-of-two.js create mode 100644 js/src/jit-test/tests/wasm/regress/ion-callerfp-tag.js create mode 100644 js/src/jit-test/tests/wasm/regress/ion-error-gc-fakeexitframe.js create mode 100644 js/src/jit-test/tests/wasm/regress/ion-inlinedcall-resumepoint.js create mode 100644 js/src/jit-test/tests/wasm/regress/ion-lazy-stubs-jit.js create mode 100644 js/src/jit-test/tests/wasm/regress/ion-many-results.js create mode 100644 js/src/jit-test/tests/wasm/regress/jit-updatepcquad.js create mode 100644 js/src/jit-test/tests/wasm/regress/lazy-table-nan.js create mode 100644 js/src/jit-test/tests/wasm/regress/load-lane-oob.js create mode 100644 js/src/jit-test/tests/wasm/regress/long-select.js create mode 100644 js/src/jit-test/tests/wasm/regress/misc-control-flow.js create mode 100644 js/src/jit-test/tests/wasm/regress/movable-traps.js create mode 100644 js/src/jit-test/tests/wasm/regress/no-directives/debugger-no-script.js create mode 100644 js/src/jit-test/tests/wasm/regress/nop-fill-jit-exit.js create mode 100644 js/src/jit-test/tests/wasm/regress/null-call.js create mode 100644 js/src/jit-test/tests/wasm/regress/null-metadata-filename.js create mode 100644 js/src/jit-test/tests/wasm/regress/onlyjsiter-while-wasm.js create mode 100644 js/src/jit-test/tests/wasm/regress/oom-eval.js create mode 100644 js/src/jit-test/tests/wasm/regress/oom-init.js create mode 100644 js/src/jit-test/tests/wasm/regress/oom-masm-baseline.js create mode 100644 js/src/jit-test/tests/wasm/regress/oom-wasm-streaming.js create mode 100644 js/src/jit-test/tests/wasm/regress/oom-wasmtexttobinary-block.js create mode 100644 js/src/jit-test/tests/wasm/regress/oom-wrong-argument-number-for-import-call.js create mode 100644 js/src/jit-test/tests/wasm/regress/pass-stack-int64.js create mode 100644 js/src/jit-test/tests/wasm/regress/proxy-get-trap-table.js create mode 100644 js/src/jit-test/tests/wasm/regress/regalloc-i64-load-store-global.js create mode 100644 js/src/jit-test/tests/wasm/regress/regalloc-muli64.js create mode 100644 js/src/jit-test/tests/wasm/regress/reserve-enough.js create mode 100644 js/src/jit-test/tests/wasm/regress/reserve-joinreg.js create mode 100644 js/src/jit-test/tests/wasm/regress/savedframe-lookup-in-wasm.js create mode 100644 js/src/jit-test/tests/wasm/regress/select-any.js create mode 100644 js/src/jit-test/tests/wasm/regress/shift-counts.js create mode 100644 js/src/jit-test/tests/wasm/regress/signed-unsigned-div-mod.js create mode 100644 js/src/jit-test/tests/wasm/regress/startfunc-in-table.js create mode 100644 js/src/jit-test/tests/wasm/regress/table-of-anyref.js create mode 100644 js/src/jit-test/tests/wasm/regress/teavm-bugs.js create mode 100644 js/src/jit-test/tests/wasm/regress/too-large-frame.js create mode 100644 js/src/jit-test/tests/wasm/regress/unaligned-store64.js create mode 100644 js/src/jit-test/tests/wasm/regress/upper-maximum-memory.js create mode 100644 js/src/jit-test/tests/wasm/resizing.js create mode 100644 js/src/jit-test/tests/wasm/select-int32.js create mode 100644 js/src/jit-test/tests/wasm/select.js create mode 100644 js/src/jit-test/tests/wasm/simd/ad-hack-binop-preamble.js create mode 100644 js/src/jit-test/tests/wasm/simd/ad-hack-extra.js create mode 100644 js/src/jit-test/tests/wasm/simd/ad-hack-preamble.js create mode 100644 js/src/jit-test/tests/wasm/simd/ad-hack-simple-binops0.js create mode 100644 js/src/jit-test/tests/wasm/simd/ad-hack-simple-binops1.js create mode 100644 js/src/jit-test/tests/wasm/simd/ad-hack-simple-binops2.js create mode 100644 js/src/jit-test/tests/wasm/simd/ad-hack-simple-unops.js create mode 100644 js/src/jit-test/tests/wasm/simd/ad-hack.js create mode 100644 js/src/jit-test/tests/wasm/simd/avx2-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/baseline-bug1636235.js create mode 100644 js/src/jit-test/tests/wasm/simd/binop-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/binop-x86-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/bitselect-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/cmp-bitselect.js create mode 100644 js/src/jit-test/tests/wasm/simd/cmp-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/const-arm64-vixl-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/const-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/cvt-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/debug-bug1644759.js create mode 100644 js/src/jit-test/tests/wasm/simd/directives.txt create mode 100644 js/src/jit-test/tests/wasm/simd/disabled.js create mode 100644 js/src/jit-test/tests/wasm/simd/experimental.js create mode 100644 js/src/jit-test/tests/wasm/simd/ion-analysis.js create mode 100644 js/src/jit-test/tests/wasm/simd/ion-bug1641973.js create mode 100644 js/src/jit-test/tests/wasm/simd/ion-bug1688262.js create mode 100644 js/src/jit-test/tests/wasm/simd/ion-bug1688713.js create mode 100644 js/src/jit-test/tests/wasm/simd/js-api.js create mode 100644 js/src/jit-test/tests/wasm/simd/neg-abs-not-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/pairwise-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/pmaddubsw-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/reduce-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/select.js create mode 100644 js/src/jit-test/tests/wasm/simd/shift-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/shuffle-x86-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/simd-partial-oob-store.js create mode 100644 js/src/jit-test/tests/wasm/simd/splat-x64-ion-codegen.js create mode 100644 js/src/jit-test/tests/wasm/simd/validation.js create mode 100644 js/src/jit-test/tests/wasm/single-cpu.js create mode 100644 js/src/jit-test/tests/wasm/spec/README.md create mode 100644 js/src/jit-test/tests/wasm/spec/exception-handling/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/exception-handling/harness/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/exception-handling/harness/harness.js create mode 100644 js/src/jit-test/tests/wasm/spec/exception-handling/tag.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/exception-handling/throw.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/exception-handling/throw_ref.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/extended-const/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/extended-const/global.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/extended-const/harness/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/extended-const/harness/harness.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/br_if.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/br_on_non_null.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/br_on_null.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/call_ref.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/func.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/global.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/harness/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/harness/harness.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/if.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/local_get.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/ref.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/ref_as_non_null.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/ref_func.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/return_call_ref.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/function-references/unreached-valid.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/array.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/array_copy.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/array_fill.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/binary-gc.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/br_if.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/br_on_cast.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/br_on_cast_fail.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/comments.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/gc/extern.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/float_literals.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/global.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/harness/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/gc/harness/harness.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/i31.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/if.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/obsolete-keywords.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/ref_cast.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/ref_eq.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/ref_null.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/ref_test.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/struct.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/token.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/type-canon.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/type-equivalence.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/type-rec.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/type-subtyping.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/unreachable.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/gc/unreached-valid.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/memory64/address64.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/memory64/align64.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/memory64/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/memory64/endianness64.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/memory64/float_memory64.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/memory64/harness/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/memory64/harness/harness.js create mode 100644 js/src/jit-test/tests/wasm/spec/memory64/load64.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/memory64/memory64.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/memory64/memory_grow64.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/memory64/memory_redundancy64.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/memory64/memory_trap64.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/address0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/address1.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/align0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/binary0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/data0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/data1.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/data_drop0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/exports0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/float_exprs0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/float_exprs1.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/float_memory.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/float_memory0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/harness/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/harness/harness.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/imports0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/imports1.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/imports2.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/imports3.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/imports4.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/linking0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/linking1.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/linking2.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/linking3.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/load.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/load0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/load1.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/load2.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory-multi.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory_copy0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory_fill0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory_grow.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory_init0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory_size.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory_size0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory_size1.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory_size2.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory_size3.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory_trap0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/memory_trap1.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/simd_load.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/simd_memory-multi.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/simd_store.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/start0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/store.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/store0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/store1.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/multi-memory/traps0.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/relaxed-simd/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/relaxed-simd/harness/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/relaxed-simd/harness/harness.js create mode 100644 js/src/jit-test/tests/wasm/spec/relaxed-simd/i16x8_relaxed_q15mulr_s.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/relaxed-simd/i32x4_relaxed_trunc.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/relaxed-simd/i8x16_relaxed_swizzle.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_dot_product.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_laneselect.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_madd_nmadd.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_min_max.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/address.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/block.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/br.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/br_if.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/bulk.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/call.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/call_indirect.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/comments.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/const.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/conversions.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/custom.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/spec/endianness.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/f32.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/f32_bitwise.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/f32_cmp.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/f64.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/f64_bitwise.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/f64_cmp.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/fac.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/float_exprs.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/float_literals.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/float_memory.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/float_misc.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/forward.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/func.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/func_ptrs.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/global.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/harness/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/spec/harness/harness.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/i32.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/i64.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/if.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/inline-module.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/int_exprs.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/int_literals.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/labels.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/left-to-right.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/load.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/local_get.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/local_set.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/local_tee.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/loop.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/memory.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/memory_copy.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/memory_fill.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/memory_grow.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/memory_init.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/memory_redundancy.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/memory_size.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/names.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/nop.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/ref_func.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/ref_is_null.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/ref_null.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/return.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_address.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_bit_shift.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_bitwise.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_boolean.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_const.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_conversions.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_f32x4.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_arith.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_cmp.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_pmin_pmax.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_rounding.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_f64x2.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_arith.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_cmp.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_pmin_pmax.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_rounding.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_arith.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_arith2.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_cmp.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_extadd_pairwise_i8x16.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_extmul_i8x16.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_q15mulr_sat_s.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_sat_arith.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_arith.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_arith2.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_cmp.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_dot_i16x8.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_extadd_pairwise_i16x8.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_extmul_i16x8.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_trunc_sat_f32x4.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_trunc_sat_f64x2.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_arith.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_arith2.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_cmp.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_extmul_i32x4.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_arith.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_arith2.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_cmp.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_sat_arith.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_int_to_int_extend.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_lane.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_load.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_load16_lane.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_load32_lane.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_load64_lane.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_load8_lane.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_load_extend.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_load_splat.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_load_zero.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_splat.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_store.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_store16_lane.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_store32_lane.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_store64_lane.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/simd_store8_lane.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/skip-stack-guard-page.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/stack.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/start.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/store.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/switch.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/table-sub.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/table_copy.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/table_fill.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/table_get.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/table_grow.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/table_init.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/table_set.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/table_size.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/token.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/tokens.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/traps.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/type.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/unreachable.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/unreached-valid.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/unwind.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/utf8-import-field.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/utf8-import-module.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/spec/utf8-invalid-encoding.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/tail-call/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/tail-call/harness/directives.txt create mode 100644 js/src/jit-test/tests/wasm/spec/tail-call/harness/harness.js create mode 100644 js/src/jit-test/tests/wasm/spec/tail-call/return_call.wast.js create mode 100644 js/src/jit-test/tests/wasm/spec/tail-call/return_call_indirect.wast.js create mode 100644 js/src/jit-test/tests/wasm/stack.js create mode 100644 js/src/jit-test/tests/wasm/start.js create mode 100644 js/src/jit-test/tests/wasm/stealing.js create mode 100644 js/src/jit-test/tests/wasm/streaming.js create mode 100644 js/src/jit-test/tests/wasm/table-gc.js create mode 100644 js/src/jit-test/tests/wasm/table-pre-barrier.js create mode 100644 js/src/jit-test/tests/wasm/tables.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/bug1851568.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/bug1862473.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/bug1865044.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/bug1871605.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/bug1871606.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/bug1871951.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/directives.txt create mode 100644 js/src/jit-test/tests/wasm/tail-calls/exceptions.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/gc.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus0.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus1.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus10.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus11.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus12.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus13.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus15.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus16.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus17.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus2.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus3.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus4.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus5.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus6.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus7.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus8.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/litmus9.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/return-call-indirect-syntax.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/return-call-indirect-validate.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/return-call-profiling.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/return-call-validate.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/return_call.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/return_call_indirect.js create mode 100644 js/src/jit-test/tests/wasm/tail-calls/return_call_ref.js create mode 100644 js/src/jit-test/tests/wasm/text.js create mode 100644 js/src/jit-test/tests/wasm/timeout/1.js create mode 100644 js/src/jit-test/tests/wasm/timeout/2.js create mode 100644 js/src/jit-test/tests/wasm/timeout/debug-interrupt-1.js create mode 100644 js/src/jit-test/tests/wasm/timeout/debug-interrupt-2.js create mode 100644 js/src/jit-test/tests/wasm/timeout/debug-noprofiling.js create mode 100644 js/src/jit-test/tests/wasm/timeout/directives.txt create mode 100644 js/src/jit-test/tests/wasm/timeout/interrupt-multi-instance-activation.js create mode 100644 js/src/jit-test/tests/wasm/timeout/interrupt-several-instances.js create mode 100644 js/src/jit-test/tests/wasm/timeout/stack-overflow.js create mode 100644 js/src/jit-test/tests/wasm/timeout/while-profiling.js create mode 100644 js/src/jit-test/tests/wasm/trap-exit-stack-alignment.js create mode 100644 js/src/jit-test/tests/wasm/ub-san-interp-entry.js create mode 100644 js/src/jit-test/tests/wasm/udiv.js create mode 100644 js/src/jit-test/tests/wasm/unsupported/README.md create mode 100644 js/src/jit-test/tests/wasm/unsupported/requires-armv7.js create mode 100644 js/src/jit-test/tests/wasm/unsupported/requires-floatingpoint.js create mode 100644 js/src/jit-test/tests/wasm/utf8.js create mode 100644 js/src/jit-test/tests/wasm/validate.js create mode 100644 js/src/jit-test/tests/wasm/wasm-abi.js create mode 100644 js/src/jit-test/tests/wasm/widening-i32-after-call.js create mode 100644 js/src/jit-test/tests/wasm/worker-kill.js create mode 100644 js/src/jit-test/tests/watchtower/basic.js create mode 100644 js/src/jit-test/tests/watchtower/bug-1871949.js create mode 100644 js/src/jit-test/tests/watchtower/megamorphic-has-prop.js create mode 100644 js/src/jit-test/tests/watchtower/megamorphic-invalidate.js create mode 100644 js/src/jit-test/tests/watchtower/megamorphic-long-proto-chain.js create mode 100644 js/src/jit-test/tests/watchtower/property-modification.js create mode 100644 js/src/jit-test/tests/xdr/asm.js create mode 100644 js/src/jit-test/tests/xdr/async-lazy.js create mode 100644 js/src/jit-test/tests/xdr/async.js create mode 100644 js/src/jit-test/tests/xdr/bigint.js create mode 100644 js/src/jit-test/tests/xdr/bug1186973.js create mode 100644 js/src/jit-test/tests/xdr/bug1390856.js create mode 100644 js/src/jit-test/tests/xdr/bug1427860.js create mode 100644 js/src/jit-test/tests/xdr/bug1585158.js create mode 100644 js/src/jit-test/tests/xdr/bug1607895.js create mode 100644 js/src/jit-test/tests/xdr/bug1790615.js create mode 100644 js/src/jit-test/tests/xdr/class-relazify.js create mode 100644 js/src/jit-test/tests/xdr/classes.js create mode 100644 js/src/jit-test/tests/xdr/debug-hook.js create mode 100644 js/src/jit-test/tests/xdr/debug-lazy.js create mode 100644 js/src/jit-test/tests/xdr/decode-off-thread.js create mode 100644 js/src/jit-test/tests/xdr/delazifications-atoms.js create mode 100644 js/src/jit-test/tests/xdr/delazifications-nest.js create mode 100644 js/src/jit-test/tests/xdr/delazify-findScript-lineCount.js create mode 100644 js/src/jit-test/tests/xdr/delazify-findScript-parameterNames.js create mode 100644 js/src/jit-test/tests/xdr/force-full-parse.js create mode 100644 js/src/jit-test/tests/xdr/function-flags.js create mode 100644 js/src/jit-test/tests/xdr/incremental-encoder.js create mode 100644 js/src/jit-test/tests/xdr/incremental-oom.js create mode 100644 js/src/jit-test/tests/xdr/lazy-class-definition.js create mode 100644 js/src/jit-test/tests/xdr/lazy.js create mode 100644 js/src/jit-test/tests/xdr/load-nonsyntactic.js create mode 100644 js/src/jit-test/tests/xdr/module-exports.js create mode 100644 js/src/jit-test/tests/xdr/module-imports.js create mode 100644 js/src/jit-test/tests/xdr/module-oom.js create mode 100644 js/src/jit-test/tests/xdr/module.js create mode 100644 js/src/jit-test/tests/xdr/off-thread-inner-fcn.js create mode 100644 js/src/jit-test/tests/xdr/option-mismatch.js create mode 100644 js/src/jit-test/tests/xdr/private-fields.js create mode 100644 js/src/jit-test/tests/xdr/relazify.js create mode 100644 js/src/jit-test/tests/xdr/runonce.js create mode 100644 js/src/jit-test/tests/xdr/scope.js create mode 100644 js/src/jit-test/tests/xdr/script-source-fields.js create mode 100644 js/src/jit-test/tests/xdr/share-bytecode.js create mode 100644 js/src/jit-test/tests/xdr/stencil-arg.js create mode 100644 js/src/jit-test/tests/xdr/stencil-can-lazily-parse-mismatch.js create mode 100644 js/src/jit-test/tests/xdr/stencil-oom.js create mode 100644 js/src/jit-test/tests/xdr/stencil.js create mode 100644 js/src/jit-test/tests/xdr/tagged-template-literals-2.js create mode 100644 js/src/jit-test/tests/xdr/tagged-template-literals.js create mode 100644 js/src/jit-test/tests/xdr/trivial.js (limited to 'js/src/jit-test/tests') diff --git a/js/src/jit-test/tests/1659595.js b/js/src/jit-test/tests/1659595.js new file mode 100644 index 0000000000..663fa3017c --- /dev/null +++ b/js/src/jit-test/tests/1659595.js @@ -0,0 +1,70 @@ + +// Impliclitly converting regular numeric properties to computed numeric +// properties in the parser means checking there's no semantic changes. + +let a = { + 0: 0, + 1n: 1n, + + get 2() { + return 2; + }, + set 2(o) {}, + + get 3n() { + return 3n; + }, + set 3n(o) {} +}; + +assertEq(a[0], 0); +assertEq(a[1n], 1n); +assertEq(a[2], 2); +assertEq(a[3n], 3n); + +function getterName(x) { + return Object.getOwnPropertyDescriptor(a, x).get.name +} +function setterName(x) { + return Object.getOwnPropertyDescriptor(a, x).set.name +} + +assertEq(/get 2/.test(getterName(2)), true) +assertEq(/get 3/.test(getterName(3n)), true) + +assertEq(/set 2/.test(setterName(2)), true) +assertEq(/set 3/.test(setterName(3n)), true) + +let b = { + 0: 0, + [0]: 'dupe', + 1n: 1, + [1n]: 'dupe', + [2]: 2, + 2: 'dupe', + [3n]: 3, + 3n: 'dupe' +}; +assertEq(b[0], 'dupe'); +assertEq(b[1n], 'dupe'); +assertEq(b[2], 'dupe'); +assertEq(b[3n], 'dupe'); + +let c = { + 0: 0, + 0.0: 'dupe', +}; +assertEq(c[0], 'dupe'); + +let d = { + 0: 0, + '0': 'dupe', +}; +assertEq(d[0], 'dupe'); + +// Test numeric property destructuring. +let {1: x} = {1: 1}; +let {1n: y} = {1n: 1n}; + +assertEq(x, 1); +assertEq(y, 1n); diff --git a/js/src/jit-test/tests/Set/NaN-as-key.js b/js/src/jit-test/tests/Set/NaN-as-key.js new file mode 100644 index 0000000000..1a24010a83 --- /dev/null +++ b/js/src/jit-test/tests/Set/NaN-as-key.js @@ -0,0 +1,40 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +// All NaNs must be treated as identical keys for Set. + +// Avoid constant-folding that would happen were |undefined| to be used. +var key = -/a/g.missingProperty; + +var s = new Set(); +s.add(key, 17); +assertEq(s.has(key), true); +assertEq(s.has(-key), true); +assertEq(s.has(NaN), true); + +s.delete(-key); +assertEq(s.has(key), false); +assertEq(s.has(-key), false); +assertEq(s.has(NaN), false); + +s.add(-key, 17); +assertEq(s.has(key), true); +assertEq(s.has(-key), true); +assertEq(s.has(NaN), true); + +s.delete(NaN); +assertEq(s.has(key), false); +assertEq(s.has(-key), false); +assertEq(s.has(NaN), false); + +s.add(NaN, 17); +assertEq(s.has(key), true); +assertEq(s.has(-key), true); +assertEq(s.has(NaN), true); + +s.delete(key); +assertEq(s.has(key), false); +assertEq(s.has(-key), false); +assertEq(s.has(NaN), false); diff --git a/js/src/jit-test/tests/Set/bug1729269.js b/js/src/jit-test/tests/Set/bug1729269.js new file mode 100644 index 0000000000..e97f6d2a12 --- /dev/null +++ b/js/src/jit-test/tests/Set/bug1729269.js @@ -0,0 +1,19 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var patchSet = new Set(); + +function checkSet(str) { + patchSet.has(str); +} + +for (var i = 0; i < 20; i++) { + checkSet("s"); +} + +let re = /x(.*)x/; +let count = 0; +oomTest(() => { + // Create a string that needs to be atomized. + let result = re.exec("xa" + count++ + "ax")[1]; + checkSet(result); +}) diff --git a/js/src/jit-test/tests/Set/forEach-selfhosted-behavior.js b/js/src/jit-test/tests/Set/forEach-selfhosted-behavior.js new file mode 100644 index 0000000000..ca6363be5c --- /dev/null +++ b/js/src/jit-test/tests/Set/forEach-selfhosted-behavior.js @@ -0,0 +1,36 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +// Don't use .call(...) in the self-hosted Set.prototype.forEach + +var functionCall = Function.prototype.call; + +function throwSyntaxError() +{ + throw new SyntaxError("Function.prototype.call incorrectly called"); +} + +function lalala() {} + +Function.prototype.call = throwSyntaxError; + +new Set().forEach(throwSyntaxError); +new Set([1]).forEach(lalala); +new Set([{}, 4]).forEach(lalala); + +Function.prototype.call = function() { this.add(3.141592654); }; + +new Set().forEach(throwSyntaxError); +new Set(["foo"]).forEach(lalala); +new Set([undefined, NaN]).forEach(lalala); + +var callCount = 0; +Function.prototype.call = function() { callCount++; }; + +new Set().forEach(throwSyntaxError); +new Set([new Number]).forEach(lalala); +new Set([true, new Boolean(false)]).forEach(lalala); + +assertEq(callCount, 0); diff --git a/js/src/jit-test/tests/Set/getter-name.js b/js/src/jit-test/tests/Set/getter-name.js new file mode 100644 index 0000000000..fe049d32a9 --- /dev/null +++ b/js/src/jit-test/tests/Set/getter-name.js @@ -0,0 +1,3 @@ +// Set getters should have get prefix +assertEq(Object.getOwnPropertyDescriptor(Set, Symbol.species).get.name, "get [Symbol.species]"); +assertEq(Object.getOwnPropertyDescriptor(Set.prototype, "size").get.name, "get size"); diff --git a/js/src/jit-test/tests/Set/iterator-thisv-error.js b/js/src/jit-test/tests/Set/iterator-thisv-error.js new file mode 100644 index 0000000000..b8a4e65196 --- /dev/null +++ b/js/src/jit-test/tests/Set/iterator-thisv-error.js @@ -0,0 +1,19 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ */ + +function test(fn, thisv) { + var message; + try { + fn.call(thisv); + } catch (e) { + message = e.message; + } + + assertEq(/^values method called on incompatible.+/.test(message), true); +} + +for (var thisv of [null, undefined, false, true, 0, ""]) { + test(Set.prototype.values, thisv); + test(Set.prototype.keys, thisv); + test(Set.prototype[Symbol.iterator], thisv); +} diff --git a/js/src/jit-test/tests/Set/non-iterable-error.js b/js/src/jit-test/tests/Set/non-iterable-error.js new file mode 100644 index 0000000000..e2702abb49 --- /dev/null +++ b/js/src/jit-test/tests/Set/non-iterable-error.js @@ -0,0 +1,7 @@ +// Self-hosted JS code shouldn't be used for error message. + +try { + new Set(...[1]); +} catch (e) { + assertEq(e.message, "1 is not iterable"); +} diff --git a/js/src/jit-test/tests/Set/symbols.js b/js/src/jit-test/tests/Set/symbols.js new file mode 100644 index 0000000000..f272102800 --- /dev/null +++ b/js/src/jit-test/tests/Set/symbols.js @@ -0,0 +1,26 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ */ + +load(libdir + "asserts.js"); + +var s = new Set; + +// Symbols can be stored in Sets. +var sym = Symbol(); +s.add(sym); +assertEq(s.has(sym), true); +assertEq(s.has(Symbol()), false); +assertEq([...s][0], sym); +s.add(sym); +assertEq(s.has(sym), true); +assertEq(s.size, 1); +s.delete(sym); +assertEq(s.has(sym), false); +assertEq(s.size, 0); + +// Symbols returned by Symbol.for() can be in Sets. +var str = "how much wood would a woodchuck chuck if a woodchuck could chuck wood"; +var s2 = "how much wood would a woodchuck chuck if could"; +var arr = str.split(" ").map(Symbol.for); +s = new Set(arr); +assertDeepEq([...s], s2.split(" ").map(Symbol.for)); diff --git a/js/src/jit-test/tests/arguments/access-formals.js b/js/src/jit-test/tests/arguments/access-formals.js new file mode 100644 index 0000000000..a63098500c --- /dev/null +++ b/js/src/jit-test/tests/arguments/access-formals.js @@ -0,0 +1,44 @@ +function g1(x, args) { + args[0] = 88; +} + +// We assume we can optimize arguments access in |f|. +// +// Then the apply-call invalidates the arguments optimization, +// and creates a real arguments object. +// +// Test that x and y fetch the values from the args object when +// that happens. +function f1(x, y, o) { + var res = 0; + for (var i=0; i<50; i++) { + res += x + y; + if (i > 10) + o.apply(null, arguments); + } + return res; +} + +var o1 = {apply: g1}; +assertEq(f1(3, 5, o1), 3630); +assertEq(f1(3, 5, o1), 3630); + +// In strict mode, the arguments object does not alias formals. +function g2(x, args) { + args[0] = 88; +} + +function f2(x, y, o) { + "use strict"; + var res = 0; + for (var i=0; i<50; i++) { + res += x + y; + if (i > 10) + o.apply(null, arguments); + } + return res; +} + +var o2 = {apply: g2}; +assertEq(f2(3, 5, o2), 400); +assertEq(f2(3, 5, o2), 400); diff --git a/js/src/jit-test/tests/arguments/alias-function-closed.js b/js/src/jit-test/tests/arguments/alias-function-closed.js new file mode 100644 index 0000000000..ba91cc6f66 --- /dev/null +++ b/js/src/jit-test/tests/arguments/alias-function-closed.js @@ -0,0 +1,167 @@ +function f1(a, aIs, // without default parameter + b=()=>62, bIs, // with default parameter + // before function body + c=(assertEq(a(), aIs), assertEq(b(), bIs), + ()=>63), + cIs) { + // before function declarations + assertEq(a(), 52); + assertEq(b(), 53); + assertEq(c(), 55); + + function a() { + return 52; + } + function c() { + return 54; + } + function g() { + // close here + assertEq(a(), 52); // after function declaration + assertEq(b(), 53); // before function declaration + assertEq(c(), 55); // before last function declaration + } + // function declaration after closed + function b() { + return 53; + } + + assertEq(a(), 52); // after function declaration + assertEq(b(), 53); // after function declaration + assertEq(c(), 55); // before last function declaration + + g(); + c = ()=>72; + assertEq(c(), 72); // after assignment in body + h(); + assertEq(c(), 82); // after assignment in closed function + + function h() { + assertEq(c(), 72); // after assignment in body + c = ()=>82; + assertEq(c(), 82); // after assignment in closed function + } + // function re-declaration after closed and assignment + function c() { + return 55; + } +} +f1(()=>42, 42, undefined, 62, undefined, 63); +f1(()=>42, 42, undefined, 62, ()=>44, 44); +f1(()=>42, 42, ()=>43, 43, undefined, 63); +f1(()=>42, 42, ()=>43, 43, ()=>44, 44); + +function f2(a, aIs, + // call before body + b=(function() { assertEq(a(), aIs); })(), + // a inside body not accessible from defaults + c=function() { assertEq(a(), 42); }) { + function a() { + return 52; + } + function g() { + // close here + assertEq(a(), 52); + } + + assertEq(a(), 52); + g(); + c(); +} +f2(()=>42, 42); + +function f3(a, aIs, + // call before body + // close here + b=(function() { assertEq(a(), aIs); })(), + // a inside body not accessible from defaults + c=function() { assertEq(a(), 42); }) { + function a() { + return 52; + } + + assertEq(a(), 52); + c(); +} +f3(()=>42, 42); + +function f4(a, + // assignment before body + b=a=()=>62, + c=(assertEq(a(), 62)), + e=(assertEq(a(), 62))) { + function a() { + return 52; + } + function g() { + // close here + assertEq(a(), 52); + } + + assertEq(a(), 52); + g(); +} +f4(()=>42); + +function f5(a, b, c, d) { + // before var/function declarations + assertEq(a(), 52); + assertEq(b(), 53); + assertEq(c(), 54); + assertEq(d(), 55); + + function g() { + // before var/function declarations, called after var declarations + // close here + assertEq(a(), 52); + assertEq(b(), 63); + assertEq(c(), 54); + assertEq(d(), 65); + } + + var a, b = ()=>63; + var c, d = ()=>65; + + // after var declarations, before function declarations + assertEq(a(), 52); + assertEq(b(), 63); + assertEq(c(), 54); + assertEq(d(), 65); + + function h() { + // after var declarations, before function declarations + assertEq(a(), 52); + assertEq(b(), 63); + assertEq(c(), 54); + assertEq(d(), 65); + } + function a() { + return 52; + } + function b() { + return 53; + } + function c() { + return 54; + } + function d() { + return 55; + } + function i() { + // after var/function declarations + assertEq(a(), 52); + assertEq(b(), 63); + assertEq(c(), 54); + assertEq(d(), 65); + } + + // after var/function declarations + assertEq(a(), 52); + assertEq(b(), 63); + assertEq(c(), 54); + assertEq(d(), 65); + g(); + h(); + i(); +} +f5(()=>42, ()=>43, ()=>44, ()=>45); diff --git a/js/src/jit-test/tests/arguments/alias-function-not-closed.js b/js/src/jit-test/tests/arguments/alias-function-not-closed.js new file mode 100644 index 0000000000..3de71f7c8e --- /dev/null +++ b/js/src/jit-test/tests/arguments/alias-function-not-closed.js @@ -0,0 +1,87 @@ +function f1(a, aIs, // without default parameter + b=()=>62, bIs, // with default parameter + // before function body + c=(assertEq(a(), aIs), assertEq(b(), bIs), + ()=>63), + cIs) { + // before function declarations + assertEq(a(), 52); + assertEq(b(), 53); + assertEq(c(), 55); + + function a() { + return 52; + } + function b() { + return 53; + } + function c() { + return 54; + } + + assertEq(a(), 52); // after function declaration + assertEq(b(), 53); // after function declaration + assertEq(c(), 55); // before last function declaration + + c = ()=>72; + assertEq(c(), 72); // after assignment in body + + // function re-declaration after assignment + function c() { + return 55; + } +} +f1(()=>42, 42, undefined, 62, undefined, 63); +f1(()=>42, 42, undefined, 62, ()=>44, 44); +f1(()=>42, 42, ()=>43, 43, undefined, 63); +f1(()=>42, 42, ()=>43, 43, ()=>44, 44); + +function f2(a, + // assignment before body + b=a=()=>62, + c=(assertEq(a(), 62)), + e=(assertEq(a(), 62))) { + function a() { + return 52; + } + + assertEq(a(), 52); +} +f2(()=>42); + +function f3(a, b, c, d) { + // before var/function declarations + assertEq(a(), 52); + assertEq(b(), 53); + assertEq(c(), 54); + assertEq(d(), 55); + + var a, b = ()=>63; + var c, d = ()=>65; + + // after var declarations, before function declarations + assertEq(a(), 52); + assertEq(b(), 63); + assertEq(c(), 54); + assertEq(d(), 65); + + function a() { + return 52; + } + function b() { + return 53; + } + function c() { + return 54; + } + function d() { + return 55; + } + + // after var/function declarations + assertEq(a(), 52); + assertEq(b(), 63); + assertEq(c(), 54); + assertEq(d(), 65); +} +f3(()=>42, ()=>43, ()=>44, ()=>45); diff --git a/js/src/jit-test/tests/arguments/apply-args-obj-01.js b/js/src/jit-test/tests/arguments/apply-args-obj-01.js new file mode 100644 index 0000000000..586787f963 --- /dev/null +++ b/js/src/jit-test/tests/arguments/apply-args-obj-01.js @@ -0,0 +1,18 @@ +function escape(x) { with ({}) {} } + +function foo() { + escape(arguments); + return bar.apply({}, arguments); +} + +function bar(x,y) { + return x + y; +} + +with ({}) {} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/apply-args-obj-02.js b/js/src/jit-test/tests/arguments/apply-args-obj-02.js new file mode 100644 index 0000000000..f619309818 --- /dev/null +++ b/js/src/jit-test/tests/arguments/apply-args-obj-02.js @@ -0,0 +1,16 @@ +function foo() { + arguments[0] = 3; + return bar.apply({}, arguments); +} + +function bar(x,y) { + return x + y; +} + +with ({}) {} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 500); diff --git a/js/src/jit-test/tests/arguments/apply-args-obj-03.js b/js/src/jit-test/tests/arguments/apply-args-obj-03.js new file mode 100644 index 0000000000..03fe82f683 --- /dev/null +++ b/js/src/jit-test/tests/arguments/apply-args-obj-03.js @@ -0,0 +1,20 @@ +function escape() { with ({}) {} } + +function foo(i) { + return i; +} + +function bar(n) { + escape(arguments); + return foo.apply({}, arguments); +} + +function baz(a, n) { + return bar(n); +} + +var sum = 0; +for (var i = 0; i < 10000; i++) { + sum += baz(0, 1); +} +assertEq(sum, 10000); diff --git a/js/src/jit-test/tests/arguments/apply-args-obj-04.js b/js/src/jit-test/tests/arguments/apply-args-obj-04.js new file mode 100644 index 0000000000..2a1e8b098e --- /dev/null +++ b/js/src/jit-test/tests/arguments/apply-args-obj-04.js @@ -0,0 +1,21 @@ +var result; + +function g(a, b) { + with ({}) {} + result = a + b; +} + +function escape() { with({}) {} } + +function f() { + escape(arguments); + for (var i = 0; i < 50; ++i) { + g.apply(this, arguments); + } +} + +f(1, 2); +assertEq(result, 3); + +f(""); +assertEq(result, "undefined"); diff --git a/js/src/jit-test/tests/arguments/apply-closed-over-arguments-strict.js b/js/src/jit-test/tests/arguments/apply-closed-over-arguments-strict.js new file mode 100644 index 0000000000..71565cde94 --- /dev/null +++ b/js/src/jit-test/tests/arguments/apply-closed-over-arguments-strict.js @@ -0,0 +1,15 @@ +'use strict' +function bar(x,y) { + return x + y; +} + +function foo(x, y) { + function closeOver() { return x; } + return bar.apply({}, arguments); +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 300) diff --git a/js/src/jit-test/tests/arguments/apply-closed-over-arguments.js b/js/src/jit-test/tests/arguments/apply-closed-over-arguments.js new file mode 100644 index 0000000000..708d4cdb09 --- /dev/null +++ b/js/src/jit-test/tests/arguments/apply-closed-over-arguments.js @@ -0,0 +1,14 @@ +function bar(x,y) { + return x + y; +} + +function foo(x, y) { + function closeOver() { return x; } + return bar.apply({}, arguments); +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 300) diff --git a/js/src/jit-test/tests/arguments/apply-redefine-length.js b/js/src/jit-test/tests/arguments/apply-redefine-length.js new file mode 100644 index 0000000000..4dd5cb68d7 --- /dev/null +++ b/js/src/jit-test/tests/arguments/apply-redefine-length.js @@ -0,0 +1,18 @@ +function foo() { + arguments.length = 2; + return bar.apply({}, arguments); +} + +function bar() { + var result = 0; + for (var x of arguments) { + result += x; + } + return result; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2,3,4,5,6); +} +assertEq(sum,300); diff --git a/js/src/jit-test/tests/arguments/args-attributes.js b/js/src/jit-test/tests/arguments/args-attributes.js new file mode 100644 index 0000000000..5182202371 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-attributes.js @@ -0,0 +1,75 @@ +function strictArgs() { + return (function (a, b, c) {'use strict'; return arguments; })(1, 2); +} + +function normalArgs() { + return (function (a, b, c) { return arguments; })(1, 2); +} + +function checkProperty(options, prop, shouldThrow) { + var desc, orig; + var obj = options.strict ? strictArgs() : normalArgs(); + var objType = options.strict ? "strict arguments." : "normal arguments."; + + function check() { + orig = Object.getOwnPropertyDescriptor(obj, prop); + + var threw = false; + try { + obj[prop] = obj[prop]; + } + catch (e) { + threw = true; + } + assertEq(threw, shouldThrow, objType + prop + " threw"); + + if (orig === undefined) { + // The property wasn't defined, so we can skip it. + return; + } + + desc = Object.getOwnPropertyDescriptor(obj, prop); + if ("value" in orig) { + assertEq(desc.value, orig.value, objType + prop + " value"); + } else { + assertEq(desc.get, orig.get, objType + prop + " get"); + assertEq(desc.set, orig.set, objType + prop + " set"); + } + assertEq(desc.writable, orig.writable, objType + prop + " writable"); + assertEq(desc.enumerable, orig.enumerable, objType + prop + " enumerable"); + assertEq(desc.configurable, orig.configurable, objType + prop + " configurable"); + } + + check(); + + if (orig && orig.configurable) { + if(options.refresh) { obj = options.strict ? strictArgs() : normalArgs(); } + Object.defineProperty(obj, prop, {writable: false, enumerable: true}); + check(); + + if(options.refresh) { obj = options.strict ? strictArgs() : normalArgs(); } + Object.defineProperty(obj, prop, {writable: true, enumerable: false}); + check(); + + if(options.refresh) { obj = options.strict ? strictArgs() : normalArgs(); } + Object.defineProperty(obj, prop, {writable: false, configurable: false}); + check(); + } +} + +checkProperty({strict: true, refresh: true}, 'callee', true); +checkProperty({strict: true, refresh: false}, 'callee', true); +checkProperty({strict: false, refresh: true}, 'callee', false); +checkProperty({strict: false, refresh: false}, 'callee', false); + +checkProperty({strict: true, refresh: true}, 'length', false); +checkProperty({strict: true, refresh: false}, 'length', false); +checkProperty({strict: false, refresh: true}, 'length', false); +checkProperty({strict: false, refresh: false}, 'length', false); + +for (var i = 0; i <= 5; i++) { + checkProperty({strict: true, refresh: true}, "" + i, false); + checkProperty({strict: true, refresh: false}, "" + i, false); + checkProperty({strict: false, refresh: true}, "" + i, false); + checkProperty({strict: false, refresh: false}, "" + i, false); +} diff --git a/js/src/jit-test/tests/arguments/args-createontrace.js b/js/src/jit-test/tests/arguments/args-createontrace.js new file mode 100644 index 0000000000..9f9f0a4082 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-createontrace.js @@ -0,0 +1,18 @@ +actual = ''; +expected = '5,4,3,2,1,X,5,4,3,2,1,Y,5,4,3,2,1,'; + +function f() { + for (var i = 0; i < 5; ++i) { + var args = arguments; + appendToActual(args[i]); + } +} + +f(5, 4, 3, 2, 1); +appendToActual("X"); +f(5, 4, 3, 2, 1); +appendToActual("Y"); +f(5, 4, 3, 2, 1); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args-exists-own.js b/js/src/jit-test/tests/arguments/args-exists-own.js new file mode 100644 index 0000000000..937c26608e --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-exists-own.js @@ -0,0 +1,109 @@ +// Test |Object.hasOwn| on arguments objects. + +function testBasic() { + function arg0() { return Object.hasOwn(arguments, 0); } + function arg1() { return Object.hasOwn(arguments, 1); } + function arg100() { return Object.hasOwn(arguments, 100); } + function argn1() { return Object.hasOwn(arguments, -1); } + function argv(i) { return Object.hasOwn(arguments, i); } + + for (let i = 0; i < 100; ++i) { + assertEq(arg0(), false); + assertEq(arg0(1), true); + assertEq(arg0(1, 2), true); + assertEq(arg0(1, 2, 3), true); + assertEq(arg0(1, 2, 3, 4), true); + assertEq(arg0(1, 2, 3, 4, 5), true); + + assertEq(arg1(), false); + assertEq(arg1(1), false); + assertEq(arg1(1, 2), true); + assertEq(arg1(1, 2, 3), true); + assertEq(arg1(1, 2, 3, 4), true); + assertEq(arg1(1, 2, 3, 4, 5), true); + + assertEq(arg100(), false); + assertEq(arg100(1), false); + assertEq(arg100(1, 2), false); + assertEq(arg100(1, 2, 3), false); + assertEq(arg100(1, 2, 3, 4), false); + assertEq(arg100(1, 2, 3, 4, 5), false); + + assertEq(argn1(), false); + assertEq(argn1(1), false); + assertEq(argn1(1, 2), false); + assertEq(argn1(1, 2, 3), false); + assertEq(argn1(1, 2, 3, 4), false); + assertEq(argn1(1, 2, 3, 4, 5), false); + + assertEq(argv(i & 3), (i&3) <= 0); + assertEq(argv(i & 3, 1), (i&3) <= 1); + assertEq(argv(i & 3, 1, 2), (i&3) <= 2); + assertEq(argv(i & 3, 1, 2, 3), true); + assertEq(argv(i & 3, 1, 2, 3, 4), true); + assertEq(argv(i & 3, 1, 2, 3, 4, 5), true); + } +} +testBasic(); + +// Modifying |arguments.length| doesn't change the result. +function testOverriddenLength() { + function f(i) { + if (i === 100) { + arguments.length = 100; + } + return Object.hasOwn(arguments, 1); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i), false); + } +} +testOverriddenLength(); + +// Overridden elements are correctly detected. +function testOverriddenElement() { + function f(i) { + if (i === 100) { + arguments[1] = 0; + } + return Object.hasOwn(arguments, 1); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i), i === 100); + } +} +testOverriddenElement(); + +// Deleted elements are correctly detected. +function testDeletedElement() { + function f(i) { + if (i === 100) { + delete arguments[0]; + } + return Object.hasOwn(arguments, 0); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i), i !== 100); + } +} +testDeletedElement(); + +// Contrary to most other arguments object optimisations, forwarded arguments +// don't inhibit optimising |Object.hasOwn|. +function testForwardedArg() { + function f(i) { + function closedOver() { + if (i === 100) i = 0; + } + closedOver(); + return Object.hasOwn(arguments, 0); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i), true); + } +} +testForwardedArg(); diff --git a/js/src/jit-test/tests/arguments/args-exists.js b/js/src/jit-test/tests/arguments/args-exists.js new file mode 100644 index 0000000000..35ea8e20bb --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-exists.js @@ -0,0 +1,109 @@ +// Test |in| operator on arguments objects. + +function testBasic() { + function arg0() { return 0 in arguments; } + function arg1() { return 1 in arguments; } + function arg100() { return 100 in arguments; } + function argn1() { return -1 in arguments; } + function argv(i) { return i in arguments; } + + for (let i = 0; i < 100; ++i) { + assertEq(arg0(), false); + assertEq(arg0(1), true); + assertEq(arg0(1, 2), true); + assertEq(arg0(1, 2, 3), true); + assertEq(arg0(1, 2, 3, 4), true); + assertEq(arg0(1, 2, 3, 4, 5), true); + + assertEq(arg1(), false); + assertEq(arg1(1), false); + assertEq(arg1(1, 2), true); + assertEq(arg1(1, 2, 3), true); + assertEq(arg1(1, 2, 3, 4), true); + assertEq(arg1(1, 2, 3, 4, 5), true); + + assertEq(arg100(), false); + assertEq(arg100(1), false); + assertEq(arg100(1, 2), false); + assertEq(arg100(1, 2, 3), false); + assertEq(arg100(1, 2, 3, 4), false); + assertEq(arg100(1, 2, 3, 4, 5), false); + + assertEq(argn1(), false); + assertEq(argn1(1), false); + assertEq(argn1(1, 2), false); + assertEq(argn1(1, 2, 3), false); + assertEq(argn1(1, 2, 3, 4), false); + assertEq(argn1(1, 2, 3, 4, 5), false); + + assertEq(argv(i & 3), (i&3) <= 0); + assertEq(argv(i & 3, 1), (i&3) <= 1); + assertEq(argv(i & 3, 1, 2), (i&3) <= 2); + assertEq(argv(i & 3, 1, 2, 3), true); + assertEq(argv(i & 3, 1, 2, 3, 4), true); + assertEq(argv(i & 3, 1, 2, 3, 4, 5), true); + } +} +testBasic(); + +// Modifying |arguments.length| doesn't change the result. +function testOverriddenLength() { + function f(i) { + if (i === 100) { + arguments.length = 100; + } + return 1 in arguments; + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i), false); + } +} +testOverriddenLength(); + +// Overridden elements are correctly detected. +function testOverriddenElement() { + function f(i) { + if (i === 100) { + arguments[1] = 0; + } + return 1 in arguments; + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i), i === 100); + } +} +testOverriddenElement(); + +// Deleted elements are correctly detected. +function testDeletedElement() { + function f(i) { + if (i === 100) { + delete arguments[0]; + } + return 0 in arguments; + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i), i !== 100); + } +} +testDeletedElement(); + +// Contrary to most other arguments object optimisations, forwarded arguments +// don't inhibit optimising the |in| operator. +function testForwardedArg() { + function f(i) { + function closedOver() { + if (i === 100) i = 0; + } + closedOver(); + return 0 in arguments; + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i), true); + } +} +testForwardedArg(); diff --git a/js/src/jit-test/tests/arguments/args-mochi-2.js b/js/src/jit-test/tests/arguments/args-mochi-2.js new file mode 100644 index 0000000000..4fec2dd9b0 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-mochi-2.js @@ -0,0 +1,23 @@ +actual = ''; +expected = 'true,'; + +var isNotEmpty = function (args, i) { + var o = args[i]; + if (!(o && o.length)) { + return false; + } + return true; +}; + +var f = function(obj) { + for (var i = 0; i < arguments.length; i++) { + if (!isNotEmpty(arguments, i)) + return false; + } + return true; +} + +appendToActual(f([1], [1], [1], "asdf", [1])); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args-mochi-2a.js b/js/src/jit-test/tests/arguments/args-mochi-2a.js new file mode 100644 index 0000000000..5c8895b15a --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-mochi-2a.js @@ -0,0 +1,23 @@ +actual = ''; +expected = 'true,'; + +function isNotEmpty(args, i) { + var o = args[i]; + if (!(o && o.length)) { + return false; + } + return true; +}; + +function f(obj) { + for (var i = 0; i < arguments.length; i++) { + if (!isNotEmpty(arguments, i)) + return false; + } + return true; +} + +appendToActual(f([1], [1], [1], "asdf", [1])); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args-mochi.js b/js/src/jit-test/tests/arguments/args-mochi.js new file mode 100644 index 0000000000..c477ef0972 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-mochi.js @@ -0,0 +1,17 @@ +actual = ''; +expected = 'true,'; + +var isNotEmpty = function (obj) { + for (var i = 0; i < arguments.length; i++) { + var o = arguments[i]; + if (!(o && o.length)) { + return false; + } + } + return true; +}; + +appendToActual(isNotEmpty([1], [1], [1], "asdf", [1])); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args-mutate-length-1.js b/js/src/jit-test/tests/arguments/args-mutate-length-1.js new file mode 100644 index 0000000000..cea55bc36a --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-mutate-length-1.js @@ -0,0 +1,16 @@ +actual = ''; +expected = '0,0,0,'; + +function f() { + arguments.length--; + for (var i = 0; i < arguments.length; ++i) { + appendToActual(i); + } +} + +f(1, 2); +f(1, 2); +f(2, 2); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args-mutate-length-2.js b/js/src/jit-test/tests/arguments/args-mutate-length-2.js new file mode 100644 index 0000000000..1db881b423 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-mutate-length-2.js @@ -0,0 +1,15 @@ +actual = ''; +expected = '0,1,0,1,0,1,'; + +function f() { + for (var i = 0; i < arguments.length; ++i) { + appendToActual(i); + } +} + +f(1, 2); +f(1, 2); +f(2, 2); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args-mutate-proto-1.js b/js/src/jit-test/tests/arguments/args-mutate-proto-1.js new file mode 100644 index 0000000000..fc3b8c5b23 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-mutate-proto-1.js @@ -0,0 +1,15 @@ +function outOfBounds() { + var proto = ["pass"]; + + var N = 100; + for (var i = 0; i <= N; ++i) { + if (i === N) { + Object.setPrototypeOf(arguments, proto); + } + + var arg = arguments[0]; + + assertEq(arg, i !== N ? undefined : "pass"); + } +} +outOfBounds(); diff --git a/js/src/jit-test/tests/arguments/args-mutate-proto-2.js b/js/src/jit-test/tests/arguments/args-mutate-proto-2.js new file mode 100644 index 0000000000..9645f88090 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-mutate-proto-2.js @@ -0,0 +1,16 @@ +function outOfBounds() { + var proto = []; + Object.setPrototypeOf(arguments, proto); + + var N = 100; + for (var i = 0; i <= N; ++i) { + if (i === N) { + proto[0] = "pass"; + } + + var arg = arguments[0]; + + assertEq(arg, i !== N ? undefined : "pass"); + } +} +outOfBounds(); diff --git a/js/src/jit-test/tests/arguments/args-mutate-proto-3.js b/js/src/jit-test/tests/arguments/args-mutate-proto-3.js new file mode 100644 index 0000000000..ccfb924dec --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-mutate-proto-3.js @@ -0,0 +1,15 @@ +function outOfBounds() { + Object.setPrototypeOf(arguments, Array.prototype); + + var N = 100; + for (var i = 0; i <= N; ++i) { + if (i === N) { + Array.prototype[0] = "pass"; + } + + var arg = arguments[0]; + + assertEq(arg, i !== N ? undefined : "pass"); + } +} +outOfBounds(); diff --git a/js/src/jit-test/tests/arguments/args-mutate-proto-4.js b/js/src/jit-test/tests/arguments/args-mutate-proto-4.js new file mode 100644 index 0000000000..d971669ca8 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-mutate-proto-4.js @@ -0,0 +1,13 @@ +function outOfBounds() { + var N = 100; + for (var i = 0; i <= N; ++i) { + if (i === N) { + Object.prototype[0] = "pass"; + } + + var arg = arguments[0]; + + assertEq(arg, i !== N ? undefined : "pass"); + } +} +outOfBounds(); diff --git a/js/src/jit-test/tests/arguments/args-range-2.js b/js/src/jit-test/tests/arguments/args-range-2.js new file mode 100644 index 0000000000..393d574df5 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-range-2.js @@ -0,0 +1,37 @@ +actual = ''; +expected = "undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,"; + +var index; + +function h() { + for (var i = 0; i < 5; ++i) { + var a = arguments; + appendToActual(a[index]); + } +} + +index = 0; +h(); +index = -1; +h(); +index = 1; +h(); + +index = -9999999; +h(1, 2, 3); +index = -1; +h(1, 2, 3); +index = 0; +h(1, 2, 3); +index = 1; +h(1, 2, 3); +index = 2; +h(1, 2, 3); +index = 3; +h(1, 2, 3); +index = 4; +h(1, 2, 3); +index = 9999999; +h(1, 2, 3); + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args-range-const.js b/js/src/jit-test/tests/arguments/args-range-const.js new file mode 100644 index 0000000000..d4a9193b9e --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-range-const.js @@ -0,0 +1,14 @@ +actual = ''; +expected = 'undefined,undefined,undefined,undefined,undefined,'; + +function h() { + for (var i = 0; i < 5; ++i) { + var a = arguments; + appendToActual(a[100]); + } +} + +h(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args-range.js b/js/src/jit-test/tests/arguments/args-range.js new file mode 100644 index 0000000000..a5e40acaab --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-range.js @@ -0,0 +1,18 @@ +actual = ''; +expected = '0,0,0,0,0,88,88,88,88,88,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,'; + +function h(k) { + for (var i = 0; i < 5; ++i) { + var a = arguments; + appendToActual(a[k]); + } +} + +h(0); +h(2, 99, 88, 77); +h(-5); +h(46); +h('adf'); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args-redefine-iterator-1.js b/js/src/jit-test/tests/arguments/args-redefine-iterator-1.js new file mode 100644 index 0000000000..77241a6ae7 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-redefine-iterator-1.js @@ -0,0 +1,14 @@ +function t() +{ + var a = arguments; + Object.defineProperty(a, Symbol.iterator, { }); + for (var i = 0; i < 5; i++) + assertEq(a[Symbol.iterator], Array.prototype[Symbol.iterator]); + + var desc = Object.getOwnPropertyDescriptor(a, Symbol.iterator); + assertEq(desc.value, Array.prototype[Symbol.iterator]); + assertEq(desc.writable, true); + assertEq(desc.enumerable, false); + assertEq(desc.configurable, true); +} +t(); diff --git a/js/src/jit-test/tests/arguments/args-redefine-iterator-2.js b/js/src/jit-test/tests/arguments/args-redefine-iterator-2.js new file mode 100644 index 0000000000..186be930c4 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-redefine-iterator-2.js @@ -0,0 +1,14 @@ +function t() +{ + var a = arguments; + Object.defineProperty(a, Symbol.iterator, { writable: false, enumerable: true, configurable: false }); + for (var i = 0; i < 5; i++) + assertEq(a[Symbol.iterator], Array.prototype[Symbol.iterator]); + + var desc = Object.getOwnPropertyDescriptor(a, Symbol.iterator); + assertEq(desc.value, Array.prototype[Symbol.iterator]); + assertEq(desc.writable, false); + assertEq(desc.enumerable, true); + assertEq(desc.configurable, false); +} +t(); diff --git a/js/src/jit-test/tests/arguments/args-redefine-length-1.js b/js/src/jit-test/tests/arguments/args-redefine-length-1.js new file mode 100644 index 0000000000..c71c97b1cb --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-redefine-length-1.js @@ -0,0 +1,7 @@ +function t() +{ + Object.defineProperty(arguments, "length", { value: 17 }); + for (var i = 0; i < 5; i++) + assertEq(arguments.length, 17); +} +t(); diff --git a/js/src/jit-test/tests/arguments/args-redefine-length-2.js b/js/src/jit-test/tests/arguments/args-redefine-length-2.js new file mode 100644 index 0000000000..fe1c9cf2fe --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-redefine-length-2.js @@ -0,0 +1,8 @@ +function t() +{ + var a = arguments; + Object.defineProperty(a, "length", { value: 17 }); + for (var i = 0; i < 5; i++) + assertEq(a.length, 17); +} +t(); diff --git a/js/src/jit-test/tests/arguments/args-redefine-length-3.js b/js/src/jit-test/tests/arguments/args-redefine-length-3.js new file mode 100644 index 0000000000..a4d6823acf --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-redefine-length-3.js @@ -0,0 +1,14 @@ +function t() +{ + var a = arguments; + Object.defineProperty(a, "length", { }); + for (var i = 0; i < 5; i++) + assertEq(a.length, 0); + + var desc = Object.getOwnPropertyDescriptor(a, "length"); + assertEq(desc.value, 0); + assertEq(desc.writable, true); + assertEq(desc.enumerable, false); + assertEq(desc.configurable, true); +} +t(); diff --git a/js/src/jit-test/tests/arguments/args-redefine-length-4.js b/js/src/jit-test/tests/arguments/args-redefine-length-4.js new file mode 100644 index 0000000000..1029e8fca3 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-redefine-length-4.js @@ -0,0 +1,14 @@ +function t() +{ + var a = arguments; + Object.defineProperty(a, "length", { writable: false }); + for (var i = 0; i < 5; i++) + assertEq(a.length, 0); + + var desc = Object.getOwnPropertyDescriptor(a, "length"); + assertEq(desc.value, 0); + assertEq(desc.writable, false); + assertEq(desc.enumerable, false); + assertEq(desc.configurable, true); +} +t(); diff --git a/js/src/jit-test/tests/arguments/args-redefine-length-5.js b/js/src/jit-test/tests/arguments/args-redefine-length-5.js new file mode 100644 index 0000000000..2ae30bf0f7 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-redefine-length-5.js @@ -0,0 +1,14 @@ +function t() +{ + var a = arguments; + Object.defineProperty(a, "length", { enumerable: true }); + for (var i = 0; i < 5; i++) + assertEq(a.length, 0); + + var desc = Object.getOwnPropertyDescriptor(a, "length"); + assertEq(desc.value, 0); + assertEq(desc.writable, true); + assertEq(desc.enumerable, true); + assertEq(desc.configurable, true); +} +t(); diff --git a/js/src/jit-test/tests/arguments/args-redefine-length-6.js b/js/src/jit-test/tests/arguments/args-redefine-length-6.js new file mode 100644 index 0000000000..a4b768d4bd --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-redefine-length-6.js @@ -0,0 +1,14 @@ +function t() +{ + var a = arguments; + Object.defineProperty(a, "length", { configurable: false }); + for (var i = 0; i < 5; i++) + assertEq(a.length, 0); + + var desc = Object.getOwnPropertyDescriptor(a, "length"); + assertEq(desc.value, 0); + assertEq(desc.writable, true); + assertEq(desc.enumerable, false); + assertEq(desc.configurable, false); +} +t(); diff --git a/js/src/jit-test/tests/arguments/args-redefine-length-7.js b/js/src/jit-test/tests/arguments/args-redefine-length-7.js new file mode 100644 index 0000000000..042b224740 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-redefine-length-7.js @@ -0,0 +1,14 @@ +function t() +{ + var a = arguments; + Object.defineProperty(a, "length", { value: 0 }); + for (var i = 0; i < 5; i++) + assertEq(a.length, 0); + + var desc = Object.getOwnPropertyDescriptor(a, "length"); + assertEq(desc.value, 0); + assertEq(desc.writable, true); + assertEq(desc.enumerable, false); + assertEq(desc.configurable, true); +} +t(); diff --git a/js/src/jit-test/tests/arguments/args-sum.js b/js/src/jit-test/tests/arguments/args-sum.js new file mode 100644 index 0000000000..04946e0fe8 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-sum.js @@ -0,0 +1,16 @@ +actual = ''; +expected = '666,'; + +function h() { + var ans = 0; + for (var i = 0; i < arguments.length; ++i) { + ans += arguments[i]; + } + return ans; +} + +var q = h(600, 60, 6); +appendToActual(q); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args-vargc.js b/js/src/jit-test/tests/arguments/args-vargc.js new file mode 100644 index 0000000000..615323c48a --- /dev/null +++ b/js/src/jit-test/tests/arguments/args-vargc.js @@ -0,0 +1,18 @@ +actual = ''; +expected = '1 2,1 2,1 2,1 2,1 2,1 2,1 2,1 2,1 undefined,1 undefined,1 undefined,1 undefined,1 undefined,1 undefined,1 undefined,1 undefined,'; + +function g(a, b) { + appendToActual(a + ' ' + b); +} + +function f() { + for (var i = 0; i < 8; ++i) { + g.apply(this, arguments); + } +} + +f(1, 2); +f(1); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args1.js b/js/src/jit-test/tests/arguments/args1.js new file mode 100644 index 0000000000..3efc2994cf --- /dev/null +++ b/js/src/jit-test/tests/arguments/args1.js @@ -0,0 +1,15 @@ +actual = ''; +expected = 'a,'; + +function f() { + arguments; +} + +for (var i = 0; i < 1000; ++i) { + f(1, 2); +} + +appendToActual('a') + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args10.js b/js/src/jit-test/tests/arguments/args10.js new file mode 100644 index 0000000000..4f31084e06 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args10.js @@ -0,0 +1,16 @@ +actual = ''; +expected = 'function h(x, y) { return arguments; },2,4,8,'; + +function h(x, y) { return arguments; } + +var p; +for (var i = 0; i < 5; ++i) { + p = h(i, i*2); +} +appendToActual(p.callee); +appendToActual(p.length); +appendToActual(p[0]); +appendToActual(p[1]); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args11.js b/js/src/jit-test/tests/arguments/args11.js new file mode 100644 index 0000000000..13e5893a5d --- /dev/null +++ b/js/src/jit-test/tests/arguments/args11.js @@ -0,0 +1,14 @@ +actual = ''; +expected = 'true,true,true,true,true,'; + +function h() { + var a = arguments; + for (var i = 0; i < 5; ++i) { + appendToActual(a == arguments); + } +} + +h(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args2.js b/js/src/jit-test/tests/arguments/args2.js new file mode 100644 index 0000000000..2c19c3198e --- /dev/null +++ b/js/src/jit-test/tests/arguments/args2.js @@ -0,0 +1,20 @@ +actual = ''; +expected = '151,'; + +var g = 0; + +function add(a, b) { + g = a + b; +} + +function f() { + add.apply(this, arguments); +} + +for (var i = 0; i < 5; ++i) { + f(100, 51); +} +appendToActual(g); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args2a.js b/js/src/jit-test/tests/arguments/args2a.js new file mode 100644 index 0000000000..627aef0eb8 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args2a.js @@ -0,0 +1,17 @@ +actual = ''; +expected = 'g,g,g,g,g,'; + +function g() { + appendToActual('g'); +} + +function f() { + g.apply(this, arguments); +} + +for (var i = 0; i < 5; ++i) { + f(); +} + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args2b.js b/js/src/jit-test/tests/arguments/args2b.js new file mode 100644 index 0000000000..aa477863e7 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args2b.js @@ -0,0 +1,17 @@ +actual = ''; +expected = 'g 0,g 1,g 2,g 3,g 4,'; + +function g(x) { + appendToActual('g ' + x); +} + +function f() { + g.apply(this, arguments); +} + +for (var i = 0; i < 5; ++i) { + f(i); +} + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args2c.js b/js/src/jit-test/tests/arguments/args2c.js new file mode 100644 index 0000000000..9e83a424dc --- /dev/null +++ b/js/src/jit-test/tests/arguments/args2c.js @@ -0,0 +1,19 @@ +actual = ''; +expected = 'g 0 0,g 1 2,g 2 4,g 3 6,g 4 8,'; + +function g(x, y) { + appendToActual('g ' + x + ' ' + y); + //appendToActual('g ' + x + ' ' + y); + //appendToActual('g ' + y); +} + +function f() { + g.apply(this, arguments); +} + +for (var i = 0; i < 5; ++i) { + f(i, i*2); +} + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args2d.js b/js/src/jit-test/tests/arguments/args2d.js new file mode 100644 index 0000000000..a95c821fe6 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args2d.js @@ -0,0 +1,17 @@ +actual = ''; +expected = 'g 0 0 0,g 1 2 1,g 2 4 4,g 3 6 9,g 4 8 16,'; + +function g(x, y, z) { + appendToActual('g ' + x + ' ' + y + ' ' + z); +} + +function f() { + g.apply(this, arguments); +} + +for (var i = 0; i < 5; ++i) { + f(i, i*2, i*i); +} + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args3.js b/js/src/jit-test/tests/arguments/args3.js new file mode 100644 index 0000000000..7098521222 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args3.js @@ -0,0 +1,20 @@ +actual = ''; +expected = '51,'; + +var g = 0; + +function add(a, b) { + g = a + b; +} + +function f() { + g = arguments[1]; +} + +for (var i = 0; i < 10000; ++i) { + f(100, 51); +} +appendToActual(g); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args4.js b/js/src/jit-test/tests/arguments/args4.js new file mode 100644 index 0000000000..bd13c88156 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args4.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '51,'; + +var g = 0; + +function h(args) { + g = args[1]; +} + +function f() { + h(arguments); +} + +for (var i = 0; i < 10000; ++i) { + f(100, 51); +} + +appendToActual(g); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args5.js b/js/src/jit-test/tests/arguments/args5.js new file mode 100644 index 0000000000..8bd1c1cb46 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args5.js @@ -0,0 +1,24 @@ +actual = ''; +expected = '150,'; + +var g = 0; + +function h(args) { + var ans = 0; + for (var i = 0; i < 5; ++i) { + ans += args[i]; + } + g = ans; +} + +function f() { + h(arguments); +} + +for (var i = 0; i < 5; ++i) { + f(10, 20, 30, 40, 50); +} +appendToActual(g); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args6.js b/js/src/jit-test/tests/arguments/args6.js new file mode 100644 index 0000000000..a2fc60d36a --- /dev/null +++ b/js/src/jit-test/tests/arguments/args6.js @@ -0,0 +1,22 @@ +actual = ''; +expected = '6,'; + +// tracing length + +var g = 0; + +function h(args) { + g = args.length; +} + +function f() { + h(arguments); +} + +for (var i = 0; i < 5; ++i) { + f(10, 20, 30, 40, 50, 60); +} +appendToActual(g); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args6a.js b/js/src/jit-test/tests/arguments/args6a.js new file mode 100644 index 0000000000..ce5206da1c --- /dev/null +++ b/js/src/jit-test/tests/arguments/args6a.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '5,'; + +// tracing length + +var g = 0; + +function h(args) { + for (var i = 0; i < 6; ++i) + g = args.length; +} + +function f() { + h(arguments); +} + +for (var i = 0; i < 5; ++i) { + f(10, 20, 30, 40, 50); +} +appendToActual(g); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args7.js b/js/src/jit-test/tests/arguments/args7.js new file mode 100644 index 0000000000..5d713e81ac --- /dev/null +++ b/js/src/jit-test/tests/arguments/args7.js @@ -0,0 +1,14 @@ +actual = ''; +expected = '5,4,3,2,1,'; + +function f() { + while (arguments.length > 0) { + appendToActual(arguments[arguments.length-1]); + arguments.length--; + } +} + +f(1, 2, 3, 4, 5); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args8.js b/js/src/jit-test/tests/arguments/args8.js new file mode 100644 index 0000000000..57938d9e23 --- /dev/null +++ b/js/src/jit-test/tests/arguments/args8.js @@ -0,0 +1,14 @@ +actual = ''; +expected = '[object Arguments],[object Arguments],[object Arguments],[object Arguments],[object Arguments],'; + +function h() { + return arguments; +} + +for (var i = 0; i < 5; ++i) { + var p = h(i, i*2); + appendToActual(p); +} + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/args9.js b/js/src/jit-test/tests/arguments/args9.js new file mode 100644 index 0000000000..79a54dfaef --- /dev/null +++ b/js/src/jit-test/tests/arguments/args9.js @@ -0,0 +1,16 @@ +actual = ''; +expected = '10,20,'; + +function h() { + var p; + for (var i = 0; i < 5; ++i) { + p = arguments; + } + appendToActual(p[0]); + appendToActual(p[1]); +} + +h(10, 20); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/argsub.js b/js/src/jit-test/tests/arguments/argsub.js new file mode 100644 index 0000000000..e52992c6b5 --- /dev/null +++ b/js/src/jit-test/tests/arguments/argsub.js @@ -0,0 +1,13 @@ +actual = ''; +expected = 'undefined,undefined,undefined,undefined,undefined,'; + +function h() { + for (var i = 0; i < 5; ++i) { + appendToActual(arguments[100]); + } +} + +h(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/argsx-1.js b/js/src/jit-test/tests/arguments/argsx-1.js new file mode 100644 index 0000000000..ea9d0906e4 --- /dev/null +++ b/js/src/jit-test/tests/arguments/argsx-1.js @@ -0,0 +1,22 @@ +actual = ''; +expected = "function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,1,2,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,[object Object],a,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def,function f() {\n var a = arguments;\n \n for (var i = 0; i < 10; ++i) {\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},2,abc,def," + +// args object created by interpreter + +function f() { + var a = arguments; + + for (var i = 0; i < 10; ++i) { + appendToActual(a.callee); + appendToActual(a.length); + appendToActual(a[0]); + appendToActual(a[1]); + } +} + +f(1, 2, 3); +f({}, 'a'); +f('abc', 'def'); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/argsx-2.js b/js/src/jit-test/tests/arguments/argsx-2.js new file mode 100644 index 0000000000..5fe9af97d8 --- /dev/null +++ b/js/src/jit-test/tests/arguments/argsx-2.js @@ -0,0 +1,23 @@ +actual = ''; +expected = "function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},3,1,2,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},3,1,2,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},3,1,2,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},3,1,2,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},3,1,2,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},3,1,2,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},3,1,2,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},3,1,2,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},3,1,2,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},3,1,2,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,[object Object],a,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,[object Object],a,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,[object Object],a,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,[object Object],a,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,[object Object],a,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,[object Object],a,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,[object Object],a,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,[object Object],a,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,[object Object],a,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,[object Object],a,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,abc,def,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,abc,def,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,abc,def,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,abc,def,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,abc,def,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,abc,def,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,abc,def,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,abc,def,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,abc,def,function f() {\n var a = arguments;\n \n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n},2,abc,def," + +// args object created on trace + +function f() { + var a = arguments; + + appendToActual(a.callee); + appendToActual(a.length); + appendToActual(a[0]); + appendToActual(a[1]); +} + +for (var i = 0; i < 10; ++i) + f(1, 2, 3); +for (var i = 0; i < 10; ++i) + f({}, 'a'); +for (var i = 0; i < 10; ++i) + f('abc', 'def'); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/argsx-3.js b/js/src/jit-test/tests/arguments/argsx-3.js new file mode 100644 index 0000000000..ad5942c618 --- /dev/null +++ b/js/src/jit-test/tests/arguments/argsx-3.js @@ -0,0 +1,27 @@ +actual = ''; +expected = "true,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,false,abc," + +// args object created by interpreter at record time, but not always at run time. + +function f(t) { + if (t) { + var b = arguments; + appendToActual(b[0]); + } + + for (var i = 0; i < 10; ++i) { + var a = arguments; + appendToActual(a.callee); + appendToActual(a.length); + appendToActual(a[0]); + appendToActual(a[1]); + } +} + +f(true, 1, 2, 3); +f(false, 1, 2, 3); +f(false, {}, 'a'); +f(false, 'abc', 'def'); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/argsx-3a.js b/js/src/jit-test/tests/arguments/argsx-3a.js new file mode 100644 index 0000000000..fd278c039b --- /dev/null +++ b/js/src/jit-test/tests/arguments/argsx-3a.js @@ -0,0 +1,27 @@ +actual = ''; +expected = "function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,false,1,true,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},4,true,1,true,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,[object Object],function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,[object Object],true,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,abc,function f(t) {\n if (t) {\n var b = arguments;\n appendToActual(b[0]);\n }\n \n for (var i = 0; i < 10; ++i) {\n var a = arguments;\n appendToActual(a.callee);\n appendToActual(a.length);\n appendToActual(a[0]);\n appendToActual(a[1]);\n }\n},3,true,abc," + +// args object not created by interpreter at record time, but maybe at run time + +function f(t) { + if (t) { + var b = arguments; + appendToActual(b[0]); + } + + for (var i = 0; i < 10; ++i) { + var a = arguments; + appendToActual(a.callee); + appendToActual(a.length); + appendToActual(a[0]); + appendToActual(a[1]); + } +} + +f(false, 1, 2, 3); +f(true, 1, 2, 3); +f(true, {}, 'a'); +f(true, 'abc', 'def'); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/argsx-4.js b/js/src/jit-test/tests/arguments/argsx-4.js new file mode 100644 index 0000000000..b52b14853c --- /dev/null +++ b/js/src/jit-test/tests/arguments/argsx-4.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '[object Arguments] undefined undefined,[object Arguments] undefined undefined,'; + +function f() { + g(arguments); +} + +function g(a, b, c) { + h(arguments); + a = 1; + b = 2; + c = 3; + h(arguments); +} + +function h(a, b, c) { + appendToActual(a + ' ' + b + ' ' + c); +} + +f(4, 5, 6); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/arguments-on-proto.js b/js/src/jit-test/tests/arguments/arguments-on-proto.js new file mode 100644 index 0000000000..745c77b9da --- /dev/null +++ b/js/src/jit-test/tests/arguments/arguments-on-proto.js @@ -0,0 +1,27 @@ +function create() { + return Object.create(arguments, {2: {value: "shadowed"}}); +} + +function createStrict() { + "use strict"; + return Object.create(arguments, {40: {value: "shadowed2"}}); +} + +function f() { + var args = [createStrict(10, 20, 30, 40), create(1, 2, 3)]; + + var threshold = getJitCompilerOptions()["ion.warmup.trigger"] + 101; + + for (var i = 0; i < threshold; i++) { + // We switch between different arguments objects, to make + // sure the right IC is triggered. + var a = args[i % 2]; + assertEq(a.length, (i % 2) ? 3 : 4); + assertEq(a[0], (i % 2) ? 1 : 10); + assertEq(a[1], (i % 2) ? 2 : 20); + assertEq(a[2], (i % 2) ? "shadowed" : 30); + assertEq(a[3], (i % 2) ? undefined : 40); + } +} + +f(); diff --git a/js/src/jit-test/tests/arguments/bug-917585-relax-aliasing-constraints.js b/js/src/jit-test/tests/arguments/bug-917585-relax-aliasing-constraints.js new file mode 100644 index 0000000000..03f77d7a7f --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug-917585-relax-aliasing-constraints.js @@ -0,0 +1,18 @@ + +function foo(a, b) { + blah(function (x) { a = x; }, b); + return arguments[0]; +} + +function blah(f, b) { + f(b); +} + +function main() { + for (var i = 0; i < 1500; i++) { + var x = foo(i, i*2); + assertEq(x, i*2); + } +} + +main(); diff --git a/js/src/jit-test/tests/arguments/bug1051760.js b/js/src/jit-test/tests/arguments/bug1051760.js new file mode 100644 index 0000000000..aeb54feecc --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1051760.js @@ -0,0 +1,4 @@ +function test() { + eval("var { [arguments] : y } = {};"); +} +test(); diff --git a/js/src/jit-test/tests/arguments/bug1227287.js b/js/src/jit-test/tests/arguments/bug1227287.js new file mode 100644 index 0000000000..d0c6b88262 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1227287.js @@ -0,0 +1,8 @@ +// Note: Ion/Warp have known issues with function.arguments. See bug 1626294. + +function f(y) { + y = 1; + assertEq(arguments.callee.arguments[0], 1); + return () => y; +} +f(0); diff --git a/js/src/jit-test/tests/arguments/bug1423937.js b/js/src/jit-test/tests/arguments/bug1423937.js new file mode 100644 index 0000000000..ea4d4890a0 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1423937.js @@ -0,0 +1,16 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration('pbl') +var global = 0; +setInterruptCallback(function() { + foo("A"); +}); +function foo(x) { + for (var i = 0; i < 1000; i++) { + var stack = getBacktrace({args: true}); + } + if (global > 2) return; + global++; + interruptIf(true); + foo("B"); + (function() { g = x;}); +} +foo("C"); diff --git a/js/src/jit-test/tests/arguments/bug1503071.js b/js/src/jit-test/tests/arguments/bug1503071.js new file mode 100644 index 0000000000..d2beeca982 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1503071.js @@ -0,0 +1,16 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration('pbl') +var g = true + +setInterruptCallback(function() { + print(getBacktrace({args: true})); +}); + +function foo(bt, x=3, y = eval("g")) { + if (g) { + g = false + interruptIf(true); + foo(false); + } + (function() { n = bt;}); +} +foo(false); diff --git a/js/src/jit-test/tests/arguments/bug1621265.js b/js/src/jit-test/tests/arguments/bug1621265.js new file mode 100644 index 0000000000..8eaf37c480 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1621265.js @@ -0,0 +1,17 @@ +// |jit-test| error:null + +function f(a) { + // Add |arguments[0]| to mark the function as having an arguments + // access. Even though there's a |JSOp::SetArg| bytecode is present, we can + // still use lazy arguments here, because the |JSOp::SetArg| bytecode is + // always unreachable. + var v = arguments[0]; + assertEq(v, 1); + + // Anything below the |throw| is unreachable. + throw null; + + // Add an unreachable |JSOp::SetArg| bytecode. + a = 4; +} +f(1); diff --git a/js/src/jit-test/tests/arguments/bug1692833.js b/js/src/jit-test/tests/arguments/bug1692833.js new file mode 100644 index 0000000000..a7c7523eed --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1692833.js @@ -0,0 +1,25 @@ +// |jit-test| skip-if: getBuildConfiguration('pbl') +g13 = newGlobal({newCompartment: true}) +g13.parent = this; +g13.eval("(" + function() { + Debugger(parent).onExceptionUnwind = function(frame) { + frame.older; + } +} + ")()"); + +function foo(depth) { + try { + if (depth > 0) { + bar(depth - arguments.length); + } else { + throw 1; + } + } catch (e) { throw e } +} +function bar(depth) { + foo(depth); +} + +try { + foo(50); +} catch {} diff --git a/js/src/jit-test/tests/arguments/bug1696181.js b/js/src/jit-test/tests/arguments/bug1696181.js new file mode 100644 index 0000000000..816a8c00e3 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1696181.js @@ -0,0 +1,15 @@ +function b() {} +function c() {} + +function foo() { + for (f of [b,c]) { + (function () { + f.apply({}, arguments); + })(1,2,3,4) + } +} + +with({}) {} +for (var i = 0; i < 100; i++) { + foo(); +} diff --git a/js/src/jit-test/tests/arguments/bug1711414.js b/js/src/jit-test/tests/arguments/bug1711414.js new file mode 100644 index 0000000000..174a78b507 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1711414.js @@ -0,0 +1,11 @@ +function bar() { this[0] = "overwritten"; } + +function foo() { + bar.apply(arguments, arguments); + return arguments[0]; +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + assertEq(foo("original"), "overwritten"); +} diff --git a/js/src/jit-test/tests/arguments/bug1749460.js b/js/src/jit-test/tests/arguments/bug1749460.js new file mode 100644 index 0000000000..e78cf43f22 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1749460.js @@ -0,0 +1,14 @@ +function opaque(x) { + with ({}) {} + return x; +} + +function foo() { + "use strict"; + Object.defineProperty(arguments, 0, {value: 1}); + return opaque(...arguments); +} + +for (var i = 0; i < 50; i++) { + assertEq(foo(0), 1); +} diff --git a/js/src/jit-test/tests/arguments/bug1762575-1.js b/js/src/jit-test/tests/arguments/bug1762575-1.js new file mode 100644 index 0000000000..b4b15ddf98 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1762575-1.js @@ -0,0 +1,44 @@ +// Tests on mapped arguments objects. + +function ArraySlice() { + Object.defineProperty(arguments, 0, {value: 1}); + var result = Array.prototype.slice.call(arguments); + assertEq(result[0], 1); +} +ArraySlice(0); + +function ArrayShift() { + Object.defineProperty(arguments, 0, {value: 1}); + var result = Array.prototype.shift.call(arguments); + assertEq(result, 1); +} +ArrayShift(0); + +function ArrayPop() { + Object.defineProperty(arguments, 0, {value: 1}); + var result = Array.prototype.pop.call(arguments); + assertEq(result, 1); +} +ArrayPop(0); + +function ArrayJoin() { + Object.defineProperty(arguments, 0, {value: 1}); + var result = Array.prototype.join.call(arguments); + assertEq(result, "1"); +} +ArrayJoin(0); + +function ArrayIncludes() { + Object.defineProperty(arguments, 0, {value: 1}); + var result = Array.prototype.includes.call(arguments, 1); + assertEq(result, true); +} +ArrayIncludes(0); + +function FunctionApply() { + Object.defineProperty(arguments, 0, {value: 1}); + var id = x => x; + var result = id.apply(null, arguments); + assertEq(result, 1); +} +FunctionApply(0); diff --git a/js/src/jit-test/tests/arguments/bug1762575-2.js b/js/src/jit-test/tests/arguments/bug1762575-2.js new file mode 100644 index 0000000000..683e5420ae --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1762575-2.js @@ -0,0 +1,50 @@ +// Tests on unmapped arguments objects. + +function ArraySlice() { + "use strict"; + Object.defineProperty(arguments, 0, {value: 1}); + var result = Array.prototype.slice.call(arguments); + assertEq(result[0], 1); +} +ArraySlice(0); + +function ArrayShift() { + "use strict"; + Object.defineProperty(arguments, 0, {value: 1}); + var result = Array.prototype.shift.call(arguments); + assertEq(result, 1); +} +ArrayShift(0); + +function ArrayPop() { + "use strict"; + Object.defineProperty(arguments, 0, {value: 1}); + var result = Array.prototype.pop.call(arguments); + assertEq(result, 1); +} +ArrayPop(0); + +function ArrayJoin() { + "use strict"; + Object.defineProperty(arguments, 0, {value: 1}); + var result = Array.prototype.join.call(arguments); + assertEq(result, "1"); +} +ArrayJoin(0); + +function ArrayIncludes() { + "use strict"; + Object.defineProperty(arguments, 0, {value: 1}); + var result = Array.prototype.includes.call(arguments, 1); + assertEq(result, true); +} +ArrayIncludes(0); + +function FunctionApply() { + "use strict"; + Object.defineProperty(arguments, 0, {value: 1}); + var id = x => x; + var result = id.apply(null, arguments); + assertEq(result, 1); +} +FunctionApply(0); diff --git a/js/src/jit-test/tests/arguments/bug1762575-3.js b/js/src/jit-test/tests/arguments/bug1762575-3.js new file mode 100644 index 0000000000..371eab009f --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1762575-3.js @@ -0,0 +1,89 @@ +// Test implementation details when arguments object keep strong references +// to their elements. + +function checkWeakRef(f, isCleared = true) { + let [wr, args] = f({}); + + assertEq(wr.deref() !== undefined, true); + + clearKeptObjects(); + gc(); + + // In an ideal world, the reference is always cleared. But in specific + // circumstances we're currently keeping the reference alive. Should this + // ever change, feel free to update this test case accordingly. IOW having + // |isCleared == false| is okay for spec correctness, but it isn't optimal. + assertEq(wr.deref() === undefined, isCleared); +} + +checkWeakRef(function() { + // Create a weak-ref for the first argument. + let wr = new WeakRef(arguments[0]); + + // Clear the reference from the arguments object. + arguments[0] = null; + + // Let the arguments object escape. + return [wr, arguments]; +}); + +checkWeakRef(function() { + // Create a weak-ref for the first argument. + let wr = new WeakRef(arguments[0]); + + // Clear the reference from the arguments object. + Object.defineProperty(arguments, 0, {value: null}); + + // Let the arguments object escape. + return [wr, arguments]; +}); + +checkWeakRef(function self() { + // Create a weak-ref for the first argument. + let wr = new WeakRef(arguments[0]); + + // Delete operation doesn't clear the reference! + delete arguments[0]; + + // Let the arguments object escape. + return [wr, arguments]; +}, /*isCleared=*/ false); + +checkWeakRef(function() { + "use strict"; + + // Create a weak-ref for the first argument. + let wr = new WeakRef(arguments[0]); + + // Clear the reference from the arguments object. + arguments[0] = null; + + // Let the arguments object escape. + return [wr, arguments]; +}); + +checkWeakRef(function() { + "use strict"; + + // Create a weak-ref for the first argument. + let wr = new WeakRef(arguments[0]); + + // This define operation doesn't clear the reference! + Object.defineProperty(arguments, 0, {value: null}); + + // Let the arguments object escape. + return [wr, arguments]; +}, /*isCleared=*/ false); + +checkWeakRef(function() { + "use strict"; + + // Create a weak-ref for the first argument. + let wr = new WeakRef(arguments[0]); + + // Delete operation doesn't clear the reference! + delete arguments[0]; + + // Let the arguments object escape. + return [wr, arguments]; +}, /*isCleared=*/ false); diff --git a/js/src/jit-test/tests/arguments/bug1825907.js b/js/src/jit-test/tests/arguments/bug1825907.js new file mode 100644 index 0000000000..5e9be25d2f --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1825907.js @@ -0,0 +1,7 @@ +function f(arg) { + eval(`var y = 1; function f() {return y}; f();`); + delete y; + arguments[0] = 5; + assertEq(arg, 5); +} +f(0); diff --git a/js/src/jit-test/tests/arguments/bug1827073.js b/js/src/jit-test/tests/arguments/bug1827073.js new file mode 100644 index 0000000000..d87ec97b48 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug1827073.js @@ -0,0 +1,15 @@ +// |jit-test| --fast-warmup +let depth = 0; +function f1(a2, a3, a4, a5) { + f2(); +} +function f2() { + // Recursion depth reduced to allow PBL with debug build (hence larger + // frames) to work. + if (depth++ > 75) { + return; + } + f1(1, 2); + assertEq(JSON.stringify(Array.from(f1.arguments)), "[1,2]"); +} +f1(1, 2); diff --git a/js/src/jit-test/tests/arguments/bug503772.js b/js/src/jit-test/tests/arguments/bug503772.js new file mode 100644 index 0000000000..6ef8e1f974 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug503772.js @@ -0,0 +1,16 @@ +function f(a) { + // Create arguments on trace + var z = arguments; + // Make f need a call object + if (false) { + var p = function() { ++a; } + } +} + +function g() { + for (var i = 0; i < 5; ++i) { + f(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); + } +} + +g(); diff --git a/js/src/jit-test/tests/arguments/bug508178.js b/js/src/jit-test/tests/arguments/bug508178.js new file mode 100644 index 0000000000..c779c82200 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug508178.js @@ -0,0 +1,18 @@ +actual = ''; +expected = 'g,g,g,g,f,'; + +function test() { + var testargs = arguments; + var f = function (name, which) { + var args = [testargs, arguments]; + return args[which][0]; + }; + var arr = [0, 0, 0, 0, 1]; + for (var i = 0; i < arr.length; i++) + arr[i] = f("f", arr[i]); + appendToActual(arr); +} +test('g'); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/arguments/bug633020.js b/js/src/jit-test/tests/arguments/bug633020.js new file mode 100644 index 0000000000..6e30bd1250 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug633020.js @@ -0,0 +1,11 @@ +var N = 10; +function f(b) { + var a = []; + for (var i = 0; i < N; i++) + a[i] = {}; + a[N-1] = arguments; + for (var i = 0; i < N; i++) + a[i][0] = i; + assertEq(b, N - 1); +} +f(null); diff --git a/js/src/jit-test/tests/arguments/bug843985.js b/js/src/jit-test/tests/arguments/bug843985.js new file mode 100644 index 0000000000..3365b9ec87 --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug843985.js @@ -0,0 +1,5 @@ + +for (x in (function*() { + eval("arguments[0]"); + yield; +})())(function() {}) diff --git a/js/src/jit-test/tests/arguments/bug956173.js b/js/src/jit-test/tests/arguments/bug956173.js new file mode 100644 index 0000000000..d88efaa7ab --- /dev/null +++ b/js/src/jit-test/tests/arguments/bug956173.js @@ -0,0 +1,7 @@ +function foo() { + { + let x=arguments; + return function() { return x; }; + } +} +foo()(); diff --git a/js/src/jit-test/tests/arguments/defaults-basic.js b/js/src/jit-test/tests/arguments/defaults-basic.js new file mode 100644 index 0000000000..bca8528581 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-basic.js @@ -0,0 +1,35 @@ +function f1(a, bIs, b=3) { + assertEq(a, 1); + assertEq(b, bIs); +} +assertEq(f1.length, 2); +f1(1, 3); +f1(1, 42, 42); +f1(1, 3, undefined); +function f2(a, bIs, cIs, b=3, c=4) { + assertEq(a, 1); + assertEq(b, bIs); + assertEq(c, cIs); +} +assertEq(f2.length, 3); +f2(1, 3, 4); +f2(1, 42, 4, 42); +f2(1, 42, 43, 42, 43); +f2(1, 3, 4, undefined); +f2(1, 42, 4, 42, undefined); +f2(1, 3, 42, undefined, 42); +function f3(a, b, c=4) { + assertEq(a, 1); + assertEq(b, undefined); + assertEq(c, 4); +} +f3(1); +function f4(a, bIs, cIs, b=3, c) { + assertEq(a, 1); + assertEq(b, bIs); + assertEq(c, cIs); +} +assertEq(f4.length, 3); +f4(1, 3, undefined); +f4(1, 4, undefined, 4); +f4(1, 4, 5, 4, 5); diff --git a/js/src/jit-test/tests/arguments/defaults-bound-to-function.js b/js/src/jit-test/tests/arguments/defaults-bound-to-function.js new file mode 100644 index 0000000000..28a1c3b455 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-bound-to-function.js @@ -0,0 +1,43 @@ +load(libdir + "asserts.js"); + +function f(a=42) { + return a; + function a() { return 19; } +} +assertEq(f()(), 19); +function h(a=b, b=43) { + return [a, b]; + function b() { return 42; } +} +// TDZ +assertThrowsInstanceOf(h, ReferenceError); +function i(b=FAIL) { + function b() {} +} +assertThrowsInstanceOf(i, ReferenceError); +i(42); +function j(a=(b=42), b=8) { + return b; + function b() { return 43; } +} +// TDZ +assertThrowsInstanceOf(j, ReferenceError); +function k(a=(b=42), b=8) { + return b; + function a() { return 43; } +} +// TDZ +assertThrowsInstanceOf(k, ReferenceError); +function l(a=8, b=a) { + return b; + function a() { return 42; } +} +assertEq(l(), 8); +function m([a, b]=[1, 2], c=a) { + function a() { return 42; } + assertEq(typeof a, "function"); + assertEq(a(), 42); + assertEq(b, 2); + assertEq(c, 1); +} +m(); diff --git a/js/src/jit-test/tests/arguments/defaults-bug759904.js b/js/src/jit-test/tests/arguments/defaults-bug759904.js new file mode 100644 index 0000000000..f1ea39208a --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-bug759904.js @@ -0,0 +1,4 @@ +function* a(b=3) { + yield +} +a() diff --git a/js/src/jit-test/tests/arguments/defaults-call-function.js b/js/src/jit-test/tests/arguments/defaults-call-function.js new file mode 100644 index 0000000000..d3dcda0865 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-call-function.js @@ -0,0 +1,15 @@ +load(libdir + "asserts.js"); + +function f1(a=g()) { + function g() { + } +} +assertThrowsInstanceOf(f1, ReferenceError); + +function f2(a=g()) { + function g() { + return 43; + } + assertEq(a, 42); +} +f2(42); diff --git a/js/src/jit-test/tests/arguments/defaults-destructuring-array.js b/js/src/jit-test/tests/arguments/defaults-destructuring-array.js new file mode 100644 index 0000000000..e3994a8795 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-destructuring-array.js @@ -0,0 +1,17 @@ +function f1(a, bIs, [b]=[3]) { + assertEq(a, 1); + assertEq(b, bIs); +} +assertEq(f1.length, 2); +f1(1, 3); +f1(1, 42, [42]); +f1(1, 3, undefined); + +function f2(a, bIs, [b]=[]) { + assertEq(a, 1); + assertEq(b, bIs); +} +assertEq(f2.length, 2); +f2(1, undefined); +f2(1, 42, [42]); +f2(1, undefined, undefined); diff --git a/js/src/jit-test/tests/arguments/defaults-destructuring-expression-closure.js b/js/src/jit-test/tests/arguments/defaults-destructuring-expression-closure.js new file mode 100644 index 0000000000..750289e44e --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-destructuring-expression-closure.js @@ -0,0 +1,19 @@ +function f1(a, bIs, cIs, dIs, {b}={b: 3}, c=4, [d]=[5]) { + assertEq(a, 1), + assertEq(b, bIs), + assertEq(c, cIs), + assertEq(d, dIs) +} +assertEq(f1.length, 4); +f1(1, 3, 4, 5); +f1(1, 42, 43, 44, {b: 42}, 43, [44]); + +let f2 = (a, bIs, cIs, dIs, {b}={b: 3}, c=4, [d]=[5]) => ( + assertEq(a, 1), + assertEq(b, bIs), + assertEq(c, cIs), + assertEq(d, dIs) +); +assertEq(f2.length, 4); +f2(1, 3, 4, 5); +f2(1, 42, 43, 44, {b: 42}, 43, [44]); diff --git a/js/src/jit-test/tests/arguments/defaults-destructuring-function-expression.js b/js/src/jit-test/tests/arguments/defaults-destructuring-function-expression.js new file mode 100644 index 0000000000..9517a5c4d4 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-destructuring-function-expression.js @@ -0,0 +1,9 @@ +let f = function(a, bIs, cIs, dIs, {b}={b: 3}, c=4, [d]=[5]) { + assertEq(a, 1); + assertEq(b, bIs); + assertEq(c, cIs); + assertEq(d, dIs); +}; +assertEq(f.length, 4); +f(1, 3, 4, 5); +f(1, 42, 43, 44, {b: 42}, 43, [44]); diff --git a/js/src/jit-test/tests/arguments/defaults-destructuring-mixed-default-value.js b/js/src/jit-test/tests/arguments/defaults-destructuring-mixed-default-value.js new file mode 100644 index 0000000000..e54255579e --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-destructuring-mixed-default-value.js @@ -0,0 +1,55 @@ +function f1(a=1, + [b, c=(assertEq(a, 2), a=3, 42)]=[(assertEq(a, 1), a=2, 43)], + {d, e:e=(assertEq(a, 4), a=5, 44)}={d: (assertEq(a, 3), a=4, 45)}, + f=(assertEq(a, 5), a=6, 46)) { + assertEq(a, 6); + assertEq(b, 43); + assertEq(c, 42); + assertEq(d, 45); + assertEq(e, 44); + assertEq(f, 46); +} +assertEq(f1.length, 0); +f1(); + +function f2(a=1, + [b, c=assertEq(false)]=[(assertEq(a, 1), a=2, 42), (assertEq(a, 2), a=3, 43)], + {d, e:e=assertEq(false)}={d: (assertEq(a, 3), a=4, 44), e: (assertEq(a, 4), a=5, 45)}, + f=(assertEq(a, 5), a=6, 46)) { + assertEq(a, 6); + assertEq(b, 42); + assertEq(c, 43); + assertEq(d, 44); + assertEq(e, 45); + assertEq(f, 46); +} +assertEq(f2.length, 0); +f2(); + +function f3(a=1, + [b, c=(assertEq(a, 1), a=2, 42)]=[assertEq(false)], + {d, e:e=(assertEq(a, 2), a=3, 43)}={d: assertEq(false)}, + f=(assertEq(a, 3), a=4, 44)) { + assertEq(a, 4); + assertEq(b, 8); + assertEq(c, 42); + assertEq(d, 9); + assertEq(e, 43); + assertEq(f, 44); +} +assertEq(f3.length, 0); +f3(undefined, [8], {d: 9}); + +function f4(a=1, + [b, c=assertEq(false)]=[assertEq(false), assertEq(false)], + {d, e:e=assertEq(false)}={d: assertEq(false), e: assertEq(false)}, + f=(assertEq(a, 1), a=2, 42)) { + assertEq(a, 2); + assertEq(b, 8); + assertEq(c, 9); + assertEq(d, 10); + assertEq(e, 11); + assertEq(f, 42); +} +assertEq(f4.length, 0); +f4(undefined, [8, 9], {d: 10, e: 11}); diff --git a/js/src/jit-test/tests/arguments/defaults-destructuring-mixed.js b/js/src/jit-test/tests/arguments/defaults-destructuring-mixed.js new file mode 100644 index 0000000000..74cb00f1f2 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-destructuring-mixed.js @@ -0,0 +1,29 @@ +function f1(a, bIs, cIs, dIs, b=3, {c}={c: 4}, [d]=[5]) { + assertEq(a, 1); + assertEq(b, bIs); + assertEq(c, cIs); + assertEq(d, dIs); +} +assertEq(f1.length, 4); +f1(1, 3, 4, 5); +f1(1, 42, 4, 5, 42); +f1(1, 42, 43, 5, 42, {c: 43}); +f1(1, 42, 43, 44, 42, {c: 43}, [44]); +f1(1, 3, 4, 5, undefined); +f1(1, 42, 4, 5, 42, undefined); +f1(1, 3, 42, 5, undefined, {c: 42}); +f1(1, 3, 4, 42, undefined, undefined, [42]); + +function f2(a, bIs, cIs, dIs, eIs, {b}={b: 3}, [c]=[b], d=c, {ee: e}={ee: d}) { + assertEq(a, 1); + assertEq(b, bIs); + assertEq(c, cIs); + assertEq(d, dIs); + assertEq(e, eIs); +} +assertEq(f2.length, 5); +f2(1, 3, 3, 3, 3); +f2(1, 42, 42, 42, 42, {b: 42}); +f2(1, 42, 43, 43, 43, {b: 42}, [43]); +f2(1, 42, 43, 44, 44, {b: 42}, [43], 44); +f2(1, 42, 43, 44, 45, {b: 42}, [43], 44, {ee: 45}); diff --git a/js/src/jit-test/tests/arguments/defaults-destructuring-object.js b/js/src/jit-test/tests/arguments/defaults-destructuring-object.js new file mode 100644 index 0000000000..0ca970a144 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-destructuring-object.js @@ -0,0 +1,27 @@ +function f1(a, bIs, cIs, {b}={b: 3}, {cc: c}={cc: 4}) { + assertEq(a, 1); + assertEq(b, bIs); + assertEq(c, cIs); +} +assertEq(f1.length, 3); +f1(1, 3, 4); +f1(1, 42, 4, {b: 42}); +f1(1, 42, 4, {b: 42}, undefined); +f1(1, 42, 43, {b: 42}, {cc: 43}); +f1(1, 3, 4, undefined); +f1(1, 3, 4, undefined, undefined); +f1(1, 3, 43, undefined, {cc: 43}); + +function f2(a, bIs, cIs, {b}={}, {cc: c}={}) { + assertEq(a, 1); + assertEq(b, bIs); + assertEq(c, cIs); +} +assertEq(f2.length, 3); +f2(1, undefined, undefined); +f2(1, 42, undefined, {b: 42}); +f2(1, 42, undefined, {b: 42}, undefined); +f2(1, 42, 43, {b: 42}, {cc: 43}); +f2(1, undefined, undefined, undefined); +f2(1, undefined, undefined, undefined, undefined); +f2(1, undefined, 43, undefined, {cc: 43}); diff --git a/js/src/jit-test/tests/arguments/defaults-destructuring-with-rest.js b/js/src/jit-test/tests/arguments/defaults-destructuring-with-rest.js new file mode 100644 index 0000000000..26c35f6a43 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-destructuring-with-rest.js @@ -0,0 +1,29 @@ +load(libdir + "asserts.js"); +load(libdir + "eqArrayHelper.js"); + +function f1(a, bIs, [b]=[3], ...rest) { + assertEq(a, 1); + assertEq(bIs, b); + assertEqArray(rest, []); +} +assertEq(f1.length, 2); +f1(1, 3); +f1(1, 42, [42]); + +function f2([a]=[rest], ...rest) { + assertEq(a, undefined); +} +// TDZ +assertThrowsInstanceOf(f2, ReferenceError); + +function f3([a]=[rest], ...rest) { + assertEq(a, 1); + assertEqArray(rest, [2, 3, 4]); +} +// TDZ +assertThrowsInstanceOf(f3, ReferenceError); + +function f4([a]=rest, ...rest) { +} +// TDZ +assertThrowsInstanceOf(f4, ReferenceError); diff --git a/js/src/jit-test/tests/arguments/defaults-evaluation-order.js b/js/src/jit-test/tests/arguments/defaults-evaluation-order.js new file mode 100644 index 0000000000..c4ddff7372 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-evaluation-order.js @@ -0,0 +1,27 @@ +function f1(a, bIs, cIs, dIs, b=a, c=5, d=c) { + assertEq(a, 1); + assertEq(b, bIs); + assertEq(c, cIs); + assertEq(d, dIs); +} +f1(1, 1, 5, 5); +f1(1, 42, 5, 5, 42); +f1(1, 42, 43, 43, 42, 43); +f1(1, 42, 43, 44, 42, 43, 44); +function f2(a=[]) { return a; } +assertEq(f2() !== f2(), true); +function f3(a=function () {}) { return a; } +assertEq(f3() !== f3(), true); +function f4(a=Date) { return a; } +assertEq(f4(), Date); +Date = 0; +assertEq(f4(), 0); +function f5(x=FAIL()) {}; // don't throw +var n = 0; +function f6(a=n++) {} +assertEq(n, 0); +function f7([a, b], A=a, B=b) { + assertEq(A, a); + assertEq(B, b); +} +f7([0, 1]); diff --git a/js/src/jit-test/tests/arguments/defaults-exceptions.js b/js/src/jit-test/tests/arguments/defaults-exceptions.js new file mode 100644 index 0000000000..ab8d9c1b69 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-exceptions.js @@ -0,0 +1,6 @@ +load(libdir + "asserts.js"); + +function die() { throw "x"; } +var ok = true; +function f(a = die()) { ok = false; } +assertThrowsValue(f, "x"); diff --git a/js/src/jit-test/tests/arguments/defaults-invalid-syntax.js b/js/src/jit-test/tests/arguments/defaults-invalid-syntax.js new file mode 100644 index 0000000000..f1e1e508af --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-invalid-syntax.js @@ -0,0 +1,30 @@ +load(libdir + "asserts.js"); + +assertThrowsInstanceOf(function () { + eval("function f(...rest=23) {}"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("function f(a=yield 24) {}"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("function f(a={a : 19 + (yield 24).prop}) {}"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("function f(a=1,a=1) {}"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("function f(a,a=1) {}"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("function f(a=1,a) {}"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("function f(a,a,b=1) {}"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("function f(a,b=1,a=1) {}"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("function f(a=1,b=1,a=1) {}"); +}, SyntaxError); +function silly_but_okay(a=(function* () { yield 97; })) {} diff --git a/js/src/jit-test/tests/arguments/defaults-scoping.js b/js/src/jit-test/tests/arguments/defaults-scoping.js new file mode 100644 index 0000000000..366439590e --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-scoping.js @@ -0,0 +1,36 @@ +load(libdir + "asserts.js"); + +var x = 'global'; +function f(a=x) { // global variable x + var x = 'local'; + return a; +} +assertEq(f(), 'global'); + +var i = 42; +function g(f=function () { return ++i; }) { // closes on global variable i + var i = 0; + return f; +} +var gf = g(); +assertEq(gf(), 43); +assertEq(gf(), 44); +gf = g(); +assertEq(gf(), 45); + +function h(f=function (s) { return eval(s); }) { // closes on global scope + var x = 'hlocal'; + return f; +} +var hf = h(); +assertEq(hf('x'), 'global'); +assertEq(hf('f'), hf); +assertEq(hf('var x = 3; x'), 3); + +function j(expr, v=eval(expr)) { + return v; +} +assertEq(j("expr"), "expr"); +assertThrowsInstanceOf(() => j("v"), ReferenceError); +assertEq(j("Array"), Array); +assertEq(j("arguments").length, 1); diff --git a/js/src/jit-test/tests/arguments/defaults-strict-mode.js b/js/src/jit-test/tests/arguments/defaults-strict-mode.js new file mode 100644 index 0000000000..c4ba7bd63d --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-strict-mode.js @@ -0,0 +1,41 @@ +load(libdir + "asserts.js"); + +eval(`"use strict"; +function f1(f=(function () { return typeof this !== "object"; })) { return f; } +assertEq(f1()(), true); +`); + +function f2(f=(function () { "use strict"; return (function () { return typeof this !== "object"; }) })) { assertEq(typeof this, "object"); return f; } +assertEq(f2()()(), true); + +eval(`"use strict"; +function f3(f=(function () { return (function () { return typeof this !== "object"; }) })) { return f; } +assertEq(f3()()(), true); +`); + +// These should be okay. +function f4(f=(function () { with (Object) {} }), g=(function () { "use strict"; })) {} +function f5(g=(function () { "use strict"; }), f=(function () { with (Object) {} })) {} + +assertThrowsInstanceOf(function () { + eval("'use strict'; function f(a=delete x) { }"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + Math.sin(4); + eval("'use strict'; function f(a='\\251') { }"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("'use strict'; function f(a='\\251', b=delete x) { }"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("'use strict'; function f(a=delete x, b='\\251') { }"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("'use strict'; function f(a=(function () { '\\251'; })) { }"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("'use strict'; function f(a=(function () { with (Object) {} })) { }"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("'use strict'; function f(a=(function (b, b) {})) { }"); +}, SyntaxError); diff --git a/js/src/jit-test/tests/arguments/defaults-with-arguments.js b/js/src/jit-test/tests/arguments/defaults-with-arguments.js new file mode 100644 index 0000000000..9924c7c238 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-with-arguments.js @@ -0,0 +1,10 @@ +function f(a=1, b=2, c=3) { return arguments; } +var args = f(); +assertEq(args.length, 0); +assertEq("0" in args, false); +args = f(5, 6); +assertEq(args.length, 2); +assertEq(args[1], 6); +args = f(9, 8, 7, 6, 5); +assertEq(args.length, 5); +assertEq(args[4], 5); diff --git a/js/src/jit-test/tests/arguments/defaults-with-rest.js b/js/src/jit-test/tests/arguments/defaults-with-rest.js new file mode 100644 index 0000000000..b0c7c8bcf9 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-with-rest.js @@ -0,0 +1,23 @@ +load(libdir + "eqArrayHelper.js"); +load(libdir + "asserts.js"); + +function f1(a, bIs, b=3, ...rest) { + assertEq(a, 1); + assertEq(bIs, b); + assertEqArray(rest, []); +} +assertEq(f1.length, 2); +f1(1, 3); +f1(1, 42, 42); +function f2(a=rest, ...rest) { +} +// TDZ +assertThrowsInstanceOf(f2, ReferenceError); +function f3(a=rest, ...rest) { +} +assertThrowsInstanceOf(f3, ReferenceError); +function f4(a=42, ...f) { + assertEq(typeof f, "function"); + function f() {} +} +f4() diff --git a/js/src/jit-test/tests/arguments/destructuring-after-defaults.js b/js/src/jit-test/tests/arguments/destructuring-after-defaults.js new file mode 100644 index 0000000000..66f24a8342 --- /dev/null +++ b/js/src/jit-test/tests/arguments/destructuring-after-defaults.js @@ -0,0 +1,14 @@ +load(libdir + "asserts.js"); + +function f1(a, bIs, cIs, dIs, b=1, [c], {d}) { + assertEq(a, 1); + assertEq(b, bIs); + assertEq(c, cIs); + assertEq(d, dIs); +} +assertEq(f1.length, 4); +f1(1, 1, 42, 43, undefined, [42], {d: 43}); +f1(1, 42, 43, 44, 42, [43], {d: 44}); +assertThrowsInstanceOf(function () { + f1(1, 1, 1, 1); +}, TypeError); diff --git a/js/src/jit-test/tests/arguments/destructuring-default-value-scope.js b/js/src/jit-test/tests/arguments/destructuring-default-value-scope.js new file mode 100644 index 0000000000..c4b16ea4df --- /dev/null +++ b/js/src/jit-test/tests/arguments/destructuring-default-value-scope.js @@ -0,0 +1,10 @@ +var a = 10; +function f1(a, + [b=(assertEq(a, 1), a=2, 42)], + {c:c=(assertEq(a, 2), a=3, 43)}) { + assertEq(a, 3); + assertEq(b, 42); + assertEq(c, 43); +} +f1(1, [], {}); +assertEq(a, 10); diff --git a/js/src/jit-test/tests/arguments/destructuring-exprbody.js b/js/src/jit-test/tests/arguments/destructuring-exprbody.js new file mode 100644 index 0000000000..5f3f04ecb7 --- /dev/null +++ b/js/src/jit-test/tests/arguments/destructuring-exprbody.js @@ -0,0 +1,8 @@ +// See bug 763313 +load(libdir + "iteration.js"); +function f([a]) { return a; } +var i = 0; +var o = {[Symbol.iterator]: function () { i++; return { + next: function () { i++; return {value: 42, done: false}; }}}}; +assertEq(f(o), 42); +assertEq(i, 2); diff --git a/js/src/jit-test/tests/arguments/destructuring-with-rest.js b/js/src/jit-test/tests/arguments/destructuring-with-rest.js new file mode 100644 index 0000000000..81e69ce54d --- /dev/null +++ b/js/src/jit-test/tests/arguments/destructuring-with-rest.js @@ -0,0 +1,21 @@ +load(libdir + "eqArrayHelper.js"); + +function f1(a, bIs, [b], ...rest) { + assertEq(a, 1); + assertEq(bIs, b); + assertEqArray(rest, []); +} +assertEq(f1.length, 3); +f1(1, 3, [3]); +f1(1, 42, [42]); + +function f2([a], ...rest) { + assertEq(a, undefined); +} +f2([]); + +function f3([a], ...rest) { + assertEq(a, 1); + assertEqArray(rest, [2, 3, 4]); +} +f3([1], 2, 3, 4); diff --git a/js/src/jit-test/tests/arguments/dynamicBindings.js b/js/src/jit-test/tests/arguments/dynamicBindings.js new file mode 100644 index 0000000000..326038e12b --- /dev/null +++ b/js/src/jit-test/tests/arguments/dynamicBindings.js @@ -0,0 +1,32 @@ + +function testEval(x, y) { + x = 5; + eval("arguments[0] += 10"); + assertEq(x, 15); +} +for (var i = 0; i < 5; i++) + testEval(3); + +function testEvalWithArguments(x, y) { + eval("arguments[0] += 10"); + assertEq(arguments[y], 13); +} +for (var i = 0; i < 5; i++) + testEvalWithArguments(3, 0); + +function testNestedEval(x, y) { + x = 5; + eval("eval('arguments[0] += 10')"); + assertEq(x, 15); +} +for (var i = 0; i < 5; i++) + testNestedEval(3); + +function testWith(x, y) { + with ({}) { + arguments[0] += 10; + assertEq(x, 13); + } +} +for (var i = 0; i < 5; i++) + testWith(3); diff --git a/js/src/jit-test/tests/arguments/external-arguments-apply-forwarded.js b/js/src/jit-test/tests/arguments/external-arguments-apply-forwarded.js new file mode 100644 index 0000000000..b2f388dd7e --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-apply-forwarded.js @@ -0,0 +1,18 @@ +function foo(x,y) { + function capture() { return x; } + return bar(arguments); +} + +function bar(x) { + return baz.apply({}, x) + arguments.length; +} + +function baz(x,y) { + return x + y; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 400) diff --git a/js/src/jit-test/tests/arguments/external-arguments-apply.js b/js/src/jit-test/tests/arguments/external-arguments-apply.js new file mode 100644 index 0000000000..997aafa2d2 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-apply.js @@ -0,0 +1,17 @@ +function foo(x,y) { + return bar(arguments); +} + +function bar(x) { + return baz.apply({}, x) + arguments.length; +} + +function baz(x,y) { + return x + y; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 400) diff --git a/js/src/jit-test/tests/arguments/external-arguments-callee.js b/js/src/jit-test/tests/arguments/external-arguments-callee.js new file mode 100644 index 0000000000..cee9edba51 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-callee.js @@ -0,0 +1,13 @@ +function foo() { + with ({}) {} + return bar(arguments); +} + +function bar(x) { + assertEq(x.callee.name, "foo"); + assertEq(arguments.callee.name, "bar"); +} + +for (var i = 0; i < 100; i++) { + foo(); +} diff --git a/js/src/jit-test/tests/arguments/external-arguments-element-deleted-exists-oob.js b/js/src/jit-test/tests/arguments/external-arguments-element-deleted-exists-oob.js new file mode 100644 index 0000000000..d6ff36060e --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-element-deleted-exists-oob.js @@ -0,0 +1,14 @@ +function foo(x,y) { + delete arguments[1]; + return bar(arguments); +} + +function bar(x) { + return (100 in x) + arguments.length; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 100); diff --git a/js/src/jit-test/tests/arguments/external-arguments-element-deleted-exists.js b/js/src/jit-test/tests/arguments/external-arguments-element-deleted-exists.js new file mode 100644 index 0000000000..a65abe83e5 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-element-deleted-exists.js @@ -0,0 +1,14 @@ +function foo(x,y) { + delete arguments[1]; + return bar(arguments); +} + +function bar(x) { + return (1 in x) + arguments.length; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 100); diff --git a/js/src/jit-test/tests/arguments/external-arguments-element-deleted-oob.js b/js/src/jit-test/tests/arguments/external-arguments-element-deleted-oob.js new file mode 100644 index 0000000000..8a38aaa8d6 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-element-deleted-oob.js @@ -0,0 +1,14 @@ +function foo(x,y) { + delete arguments[0]; + return bar(arguments); +} + +function bar(x) { + return (x[100]|0) + arguments.length; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 100); diff --git a/js/src/jit-test/tests/arguments/external-arguments-element-deleted.js b/js/src/jit-test/tests/arguments/external-arguments-element-deleted.js new file mode 100644 index 0000000000..f1ba46818a --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-element-deleted.js @@ -0,0 +1,14 @@ +function foo(x,y) { + delete arguments[0]; + return bar(arguments); +} + +function bar(x) { + return x[1] + arguments.length; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/external-arguments-element-exists-oob.js b/js/src/jit-test/tests/arguments/external-arguments-element-exists-oob.js new file mode 100644 index 0000000000..2af2140f37 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-element-exists-oob.js @@ -0,0 +1,13 @@ +function foo(x,y) { + return bar(arguments); +} + +function bar(x) { + return (100 in x) + arguments.length; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 100); diff --git a/js/src/jit-test/tests/arguments/external-arguments-element-exists.js b/js/src/jit-test/tests/arguments/external-arguments-element-exists.js new file mode 100644 index 0000000000..f8e8aadd7c --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-element-exists.js @@ -0,0 +1,13 @@ +function foo(x,y) { + return bar(arguments); +} + +function bar(x) { + return (1 in x) + arguments.length; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 200); diff --git a/js/src/jit-test/tests/arguments/external-arguments-element-oob.js b/js/src/jit-test/tests/arguments/external-arguments-element-oob.js new file mode 100644 index 0000000000..452f08768d --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-element-oob.js @@ -0,0 +1,13 @@ +function foo(x,y) { + return bar(arguments); +} + +function bar(x) { + return (x[100]|0) + arguments.length; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 100); diff --git a/js/src/jit-test/tests/arguments/external-arguments-element.js b/js/src/jit-test/tests/arguments/external-arguments-element.js new file mode 100644 index 0000000000..644eecec82 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-element.js @@ -0,0 +1,13 @@ +function foo(x,y) { + return bar(arguments); +} + +function bar(x) { + return x[1] + arguments.length; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/external-arguments-inlined-apply.js b/js/src/jit-test/tests/arguments/external-arguments-inlined-apply.js new file mode 100644 index 0000000000..882476bf0a --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-inlined-apply.js @@ -0,0 +1,14 @@ +function foo() { + return bar(arguments); +} +function bar(argsFromFoo) { + return baz.apply({}, argsFromFoo) +} +function baz(a,b) { return a + b; } + +var sum = 0; +with ({}) {} +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/external-arguments-inlined-slice-1.js b/js/src/jit-test/tests/arguments/external-arguments-inlined-slice-1.js new file mode 100644 index 0000000000..ad42ff1be8 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-inlined-slice-1.js @@ -0,0 +1,15 @@ +function foo() { + return bar(arguments); +} +function bar(argsFromFoo) { + var args = Array.prototype.slice.call(argsFromFoo); + return baz(args[0], args[1]); +} +function baz(a,b) { return a + b; } + +var sum = 0; +with ({}) {} +for (var i = 0; i < 100; i++) { + sum += foo(1, 2); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/external-arguments-inlined-slice-2.js b/js/src/jit-test/tests/arguments/external-arguments-inlined-slice-2.js new file mode 100644 index 0000000000..d78abe3a45 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-inlined-slice-2.js @@ -0,0 +1,15 @@ +function foo() { + return bar(arguments); +} +function bar(argsFromFoo) { + var args = Array.prototype.slice.call(argsFromFoo, 1); + return baz(args[0], args[1]); +} +function baz(a,b) { return a + b; } + +var sum = 0; +with ({}) {} +for (var i = 0; i < 100; i++) { + sum += foo(0, 1, 2); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/external-arguments-inlined-slice-3.js b/js/src/jit-test/tests/arguments/external-arguments-inlined-slice-3.js new file mode 100644 index 0000000000..ffe6076177 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-inlined-slice-3.js @@ -0,0 +1,15 @@ +function foo() { + return bar(arguments); +} +function bar(argsFromFoo) { + var args = Array.prototype.slice.call(argsFromFoo, -2); + return baz(args[0], args[1]); +} +function baz(a,b) { return a + b; } + +var sum = 0; +with ({}) {} +for (var i = 0; i < 100; i++) { + sum += foo(0, 1, 2); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/external-arguments-inlined-slice-4.js b/js/src/jit-test/tests/arguments/external-arguments-inlined-slice-4.js new file mode 100644 index 0000000000..f292fe12b7 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-inlined-slice-4.js @@ -0,0 +1,15 @@ +function foo() { + return bar(arguments); +} +function bar(argsFromFoo) { + var args = Array.prototype.slice.call(argsFromFoo, 1, 3); + return baz(args[0], args[1]); +} +function baz(a,b) { return a + b; } + +var sum = 0; +with ({}) {} +for (var i = 0; i < 100; i++) { + sum += foo(0, 1, 2, 3); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/external-arguments-inlined-spread.js b/js/src/jit-test/tests/arguments/external-arguments-inlined-spread.js new file mode 100644 index 0000000000..d4be0829bd --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-inlined-spread.js @@ -0,0 +1,14 @@ +function foo() { + return bar(arguments); +} +function bar(argsFromFoo) { + return baz(...argsFromFoo) +} +function baz(a,b) { return a + b; } + +var sum = 0; +with ({}) {} +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/external-arguments-length.js b/js/src/jit-test/tests/arguments/external-arguments-length.js new file mode 100644 index 0000000000..cac00cccb2 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-length.js @@ -0,0 +1,14 @@ +function foo(x,y) { + with ({}) {} + return bar(arguments); +} + +function bar(x) { + return x.length + arguments.length; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/external-arguments-mutate-callee.js b/js/src/jit-test/tests/arguments/external-arguments-mutate-callee.js new file mode 100644 index 0000000000..9cb4af6f1c --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-mutate-callee.js @@ -0,0 +1,13 @@ +function foo() { + arguments.callee = {name: "mutated"}; + return bar(arguments); +} + +function bar(x) { + assertEq(x.callee.name, "mutated"); + assertEq(arguments.callee.name, "bar"); +} + +for (var i = 0; i < 100; i++) { + foo(); +} diff --git a/js/src/jit-test/tests/arguments/external-arguments-set-length.js b/js/src/jit-test/tests/arguments/external-arguments-set-length.js new file mode 100644 index 0000000000..85ac8a5481 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-set-length.js @@ -0,0 +1,14 @@ +function foo(x,y) { + arguments.length = 3; + return bar(arguments); +} + +function bar(x) { + return x.length + arguments.length; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 400); diff --git a/js/src/jit-test/tests/arguments/external-arguments-slice-1.js b/js/src/jit-test/tests/arguments/external-arguments-slice-1.js new file mode 100644 index 0000000000..eeb8dfaccf --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-slice-1.js @@ -0,0 +1,18 @@ +function foo(x, y) { + return bar(arguments); +} + +function bar(x) { + var args = Array.prototype.slice.call(x); + return baz(args[0], args[1]) + arguments.length; +} + +function baz(x, y) { + return x + y; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1, 2); +} +assertEq(sum, 400) diff --git a/js/src/jit-test/tests/arguments/external-arguments-slice-2.js b/js/src/jit-test/tests/arguments/external-arguments-slice-2.js new file mode 100644 index 0000000000..51aa928e39 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-slice-2.js @@ -0,0 +1,18 @@ +function foo(x, y) { + return bar(arguments); +} + +function bar(x) { + var args = Array.prototype.slice.call(x, 1); + return baz(args[0], args[1]) + arguments.length; +} + +function baz(x, y) { + return x + y; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(0, 1, 2); +} +assertEq(sum, 400) diff --git a/js/src/jit-test/tests/arguments/external-arguments-slice-3.js b/js/src/jit-test/tests/arguments/external-arguments-slice-3.js new file mode 100644 index 0000000000..9b58be0465 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-slice-3.js @@ -0,0 +1,18 @@ +function foo(x, y) { + return bar(arguments); +} + +function bar(x) { + var args = Array.prototype.slice.call(x, -2); + return baz(args[0], args[1]) + arguments.length; +} + +function baz(x, y) { + return x + y; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(0, 1, 2); +} +assertEq(sum, 400) diff --git a/js/src/jit-test/tests/arguments/external-arguments-slice-4.js b/js/src/jit-test/tests/arguments/external-arguments-slice-4.js new file mode 100644 index 0000000000..5844fa72e0 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-slice-4.js @@ -0,0 +1,18 @@ +function foo(x, y) { + return bar(arguments); +} + +function bar(x) { + var args = Array.prototype.slice.call(x, 1, 3); + return baz(args[0], args[1]) + arguments.length; +} + +function baz(x, y) { + return x + y; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(0, 1, 2, 3); +} +assertEq(sum, 400) diff --git a/js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-1.js b/js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-1.js new file mode 100644 index 0000000000..fb6fb75a97 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-1.js @@ -0,0 +1,19 @@ +function foo(x,y) { + function capture() { return x; } + return bar(arguments); +} + +function bar(x) { + var args = Array.prototype.slice.call(x); + return baz(args[0], args[1]) + arguments.length; +} + +function baz(x,y) { + return x + y; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1, 2); +} +assertEq(sum, 400) diff --git a/js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-2.js b/js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-2.js new file mode 100644 index 0000000000..20a079be98 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-2.js @@ -0,0 +1,19 @@ +function foo(x,y) { + function capture() { return x; } + return bar(arguments); +} + +function bar(x) { + var args = Array.prototype.slice.call(x, 1); + return baz(args[0], args[1]) + arguments.length; +} + +function baz(x,y) { + return x + y; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(0, 1, 2); +} +assertEq(sum, 400) diff --git a/js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-3.js b/js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-3.js new file mode 100644 index 0000000000..386594b3bd --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-3.js @@ -0,0 +1,19 @@ +function foo(x,y) { + function capture() { return x; } + return bar(arguments); +} + +function bar(x) { + var args = Array.prototype.slice.call(x, -2); + return baz(args[0], args[1]) + arguments.length; +} + +function baz(x,y) { + return x + y; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(0, 1, 2); +} +assertEq(sum, 400) diff --git a/js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-4.js b/js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-4.js new file mode 100644 index 0000000000..f909d79f74 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-slice-forwarded-4.js @@ -0,0 +1,19 @@ +function foo(x,y) { + function capture() { return x; } + return bar(arguments); +} + +function bar(x) { + var args = Array.prototype.slice.call(x, 1, 3); + return baz(args[0], args[1]) + arguments.length; +} + +function baz(x,y) { + return x + y; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(0, 1, 2, 3); +} +assertEq(sum, 400) diff --git a/js/src/jit-test/tests/arguments/external-arguments-spread-forwarded.js b/js/src/jit-test/tests/arguments/external-arguments-spread-forwarded.js new file mode 100644 index 0000000000..7a70189c28 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-spread-forwarded.js @@ -0,0 +1,18 @@ +function foo(x,y) { + function capture() { return x; } + return bar(arguments); +} + +function bar(x) { + return baz(...x) + arguments.length; +} + +function baz(x,y) { + return x + y; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 400) diff --git a/js/src/jit-test/tests/arguments/external-arguments-spread.js b/js/src/jit-test/tests/arguments/external-arguments-spread.js new file mode 100644 index 0000000000..cc0f1e18f1 --- /dev/null +++ b/js/src/jit-test/tests/arguments/external-arguments-spread.js @@ -0,0 +1,17 @@ +function foo(x,y) { + return bar(arguments); +} + +function bar(x) { + return baz(...x) + arguments.length; +} + +function baz(x,y) { + return x + y; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 400) diff --git a/js/src/jit-test/tests/arguments/function_dot_caller_restrictions.js b/js/src/jit-test/tests/arguments/function_dot_caller_restrictions.js new file mode 100644 index 0000000000..414f348eb6 --- /dev/null +++ b/js/src/jit-test/tests/arguments/function_dot_caller_restrictions.js @@ -0,0 +1,78 @@ + +function g() { } +function strict() { + "use strict"; +} + +let bound = g.bind(); +let arrow = x => 0; + +async function fn_async() { } +function * fn_generator() { } + +let o = { + mtd() {}, + get x() {}, + set x(v) {}, +}; + +class Base { } +class Derived extends Base { } + +function asm_mod() { + "use asm"; + function mtd() {} + return { mtd: mtd } +} + +let asm_fun = (new asm_mod).mtd; + +let builtin_selfhost = [].sort; +let builtin_native = Math.sin; + +let dot_caller = Object.getOwnPropertyDescriptor(Function.__proto__, + "caller").get; + +// Returns true if fn.caller is allowed +function check(fn) { + try { + (function() { + fn.caller; + })(); + } + catch (e) { + assertEq(e instanceof TypeError, true); + return false; + } + return true; +} + +// Normal sloppy functions are allowed, even if they also are intended as +// asm.js. +assertEq(check(g), true); +assertEq(check(asm_mod), true); +assertEq(check(asm_fun), true); + +// Most others are not +assertEq(check(strict), false); +assertEq(check(bound), false); +assertEq(check(arrow), false); +assertEq(check(fn_async), false); +assertEq(check(fn_generator), false); +assertEq(check(o.mtd), false) +assertEq(check(Object.getOwnPropertyDescriptor(o, "x").get), false) +assertEq(check(Object.getOwnPropertyDescriptor(o, "x").set), false) +assertEq(check(Base), false); +assertEq(check(Derived), false); +assertEq(check(builtin_selfhost), false); +assertEq(check(builtin_native), false); +assertEq(check(dot_caller), false); + +// Have a native invoke .caller on our behalf. +function foo() { + function inner() { + return callFunctionFromNativeFrame(dot_caller.bind(inner)) + } + return inner(); +} +assertEq(foo, foo()); diff --git a/js/src/jit-test/tests/arguments/inline-arguments-apply-rectifier.js b/js/src/jit-test/tests/arguments/inline-arguments-apply-rectifier.js new file mode 100644 index 0000000000..299b3cafec --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-apply-rectifier.js @@ -0,0 +1,40 @@ +// |jit-test| --fast-warmup + +function foo(a,b) { + with ({}) {} + return a + b; +} + +var obj = {}; +function inner(x,y) { + assertEq(x + y, foo.apply(obj, arguments)); +} + +function outer0() { + trialInline(); + inner(); +} + +function outer1() { + trialInline(); + inner(1); +} + +function outer2() { + trialInline(); + inner(1, 2); +} + +function outer3() { + trialInline(); + inner(1,2,3); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + outer0(); + outer1(); + outer2(); + outer3(); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-apply.js b/js/src/jit-test/tests/arguments/inline-arguments-apply.js new file mode 100644 index 0000000000..0d46785715 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-apply.js @@ -0,0 +1,46 @@ +// |jit-test| --fast-warmup + + +function foo(...args) { + with ({}) {} + return args.length; +} + +function inner() { + return foo.apply({}, arguments); +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(1); +} + +function outer2() { + trialInline(); + return inner(1, 2); +} + +function outer3() { + trialInline(); + return inner(1,2,3) +} + +function outer4() { + trialInline(); + return inner(1,2,3,4) +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 1); + assertEq(outer2(), 2); + assertEq(outer3(), 3); + assertEq(outer4(), 4); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-callee.js b/js/src/jit-test/tests/arguments/inline-arguments-callee.js new file mode 100644 index 0000000000..f825839a0f --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-callee.js @@ -0,0 +1,16 @@ +function inner() { + return arguments.callee; +} +function inner_escaped() { + return arguments; +} +function outer() { + assertEq(inner(), inner); + assertEq(inner_escaped().callee, inner_escaped); + assertEq(arguments.callee, outer); +} + +with({}) {} +for (var i = 0; i < 100; i++) { + outer(); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-apply.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-apply.js new file mode 100644 index 0000000000..29230abb87 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-apply.js @@ -0,0 +1,45 @@ +// |jit-test| --fast-warmup + +function foo(...args) { + with ({}) {} + return args.length +} + +function inner() { + return arguments; +} + +function outer0() { + trialInline(); + return foo.apply({}, inner()); +} + +function outer1() { + trialInline(); + return foo.apply({}, inner(1)); +} + +function outer2() { + trialInline(); + return foo.apply({}, inner(1,2)); +} + +function outer3() { + trialInline(); + return foo.apply({}, inner(1,2,3)); +} + +function outer4() { + trialInline(); + return foo.apply({}, inner(1,2,3,4)); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 1); + assertEq(outer2(), 2); + assertEq(outer3(), 3); + assertEq(outer4(), 4); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-index-constant-exists.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-index-constant-exists.js new file mode 100644 index 0000000000..d80959d4b6 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-index-constant-exists.js @@ -0,0 +1,40 @@ +// |jit-test| --fast-warmup + +function inner() { + return arguments +} + +function outer0() { + trialInline(); + return 1 in inner(); +} + +function outer1() { + trialInline(); + return 1 in inner(1); +} + +function outer2() { + trialInline(); + return 1 in inner(1, 2); +} + +function outer3() { + trialInline(); + return 1 in inner(1,2,3); +} + +function outer4() { + trialInline(); + return 1 in inner(1,2,3,4); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), false); + assertEq(outer1(), false); + assertEq(outer2(), true); + assertEq(outer3(), true); + assertEq(outer4(), true); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-index-constant-oob.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-index-constant-oob.js new file mode 100644 index 0000000000..052c564197 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-index-constant-oob.js @@ -0,0 +1,40 @@ +// |jit-test| --fast-warmup + +function inner() { + return arguments +} + +function outer0() { + trialInline(); + return inner()[100]; +} + +function outer1() { + trialInline(); + return inner(1)[100]; +} + +function outer2() { + trialInline(); + return inner(1, 2)[100]; +} + +function outer3() { + trialInline(); + return inner(1,2,3)[100] +} + +function outer4() { + trialInline(); + return inner(1,2,3,4)[100] +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), undefined); + assertEq(outer1(), undefined); + assertEq(outer2(), undefined); + assertEq(outer3(), undefined); + assertEq(outer4(), undefined); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-index-constant.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-index-constant.js new file mode 100644 index 0000000000..1a5ffd3cfa --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-index-constant.js @@ -0,0 +1,40 @@ +// |jit-test| --fast-warmup + +function inner() { + return arguments +} + +function outer0() { + trialInline(); + return inner()[0]; +} + +function outer1() { + trialInline(); + return inner(1)[0]; +} + +function outer2() { + trialInline(); + return inner(1, 2)[0]; +} + +function outer3() { + trialInline(); + return inner(1,2,3)[0] +} + +function outer4() { + trialInline(); + return inner(1,2,3,4)[0] +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), undefined); + assertEq(outer1(), 1); + assertEq(outer2(), 1); + assertEq(outer3(), 1); + assertEq(outer4(), 1); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-index-var.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-index-var.js new file mode 100644 index 0000000000..4f3856dfe0 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-index-var.js @@ -0,0 +1,44 @@ +// |jit-test| --fast-warmup + +var idx; + +function inner() { + return arguments; +} + +function outer0() { + trialInline(); + return inner()[idx]; +} + +function outer1() { + trialInline(); + return inner(0)[idx]; +} + +function outer2() { + trialInline(); + return inner(0, 1)[idx]; +} + +function outer3() { + trialInline(); + return inner(0,1,2)[idx] +} + +function outer4() { + trialInline(); + return inner(0,1,2,3)[idx] +} + +with ({}) {} + +for (idx = 0; idx < 4; idx++) { + for (var i = 0; i < 50; i++) { + assertEq(outer0(), idx < 0 ? idx : undefined); + assertEq(outer1(), idx < 1 ? idx : undefined); + assertEq(outer2(), idx < 2 ? idx : undefined); + assertEq(outer3(), idx < 3 ? idx : undefined); + assertEq(outer4(), idx < 4 ? idx : undefined); + } +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-length.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-length.js new file mode 100644 index 0000000000..2c275dd3d6 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-length.js @@ -0,0 +1,42 @@ +// |jit-test| --fast-warmup + +var arg = 0; + +function inner() { + return arguments; +} + +function outer0() { + trialInline(); + return inner().length; +} + +function outer1() { + trialInline(); + return inner(arg).length; +} + +function outer2() { + trialInline(); + return inner(arg, arg).length; +} + +function outer3() { + trialInline(); + return inner(arg, arg, arg).length; +} + +function outer4() { + trialInline(); + return inner(arg, arg, arg, arg).length; +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 1); + assertEq(outer2(), 2); + assertEq(outer3(), 3); + assertEq(outer4(), 4); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-new-spread-optimization.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-new-spread-optimization.js new file mode 100644 index 0000000000..e576339069 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-new-spread-optimization.js @@ -0,0 +1,50 @@ +// |jit-test| --fast-warmup + +function foo(...args) { + with ({}) {} + return {result: args.length}; +} + +function inner() { + return arguments; +} + +function outer0() { + trialInline(); + var args = inner(); + return new foo(...args); +} + +function outer1() { + trialInline(); + var args = inner(1); + return new foo(...args); +} + +function outer2() { + trialInline(); + var args = inner(1,2); + return new foo(...args); +} + +function outer3() { + trialInline(); + var args = inner(1,2,3); + return new foo(...args); +} + +function outer4() { + trialInline(); + var args = inner(1,2,3,4); + return new foo(...args); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0().result, 0); + assertEq(outer1().result, 1); + assertEq(outer2().result, 2); + assertEq(outer3().result, 3); + assertEq(outer4().result, 4); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-1.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-1.js new file mode 100644 index 0000000000..e428f87e89 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-1.js @@ -0,0 +1,50 @@ +// |jit-test| --fast-warmup + +function foo(args) { + with ({}) {} + return args.length; +} + +function inner() { + return arguments; +} + +function outer0() { + trialInline(); + var args = Array.prototype.slice.call(inner()); + return foo(args); +} + +function outer1() { + trialInline(); + var args = Array.prototype.slice.call(inner(1)); + return foo(args); +} + +function outer2() { + trialInline(); + var args = Array.prototype.slice.call(inner(1, 2)); + return foo(args); +} + +function outer3() { + trialInline(); + var args = Array.prototype.slice.call(inner(1, 2, 3)); + return foo(args); +} + +function outer4() { + trialInline(); + var args = Array.prototype.slice.call(inner(1, 2, 3, 4)); + return foo(args); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 1); + assertEq(outer2(), 2); + assertEq(outer3(), 3); + assertEq(outer4(), 4); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-2.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-2.js new file mode 100644 index 0000000000..4c831b99f6 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-2.js @@ -0,0 +1,50 @@ +// |jit-test| --fast-warmup + +function foo(args) { + with ({}) {} + return args.length; +} + +function inner() { + return arguments; +} + +function outer0() { + trialInline(); + var args = Array.prototype.slice.call(inner(), 1); + return foo(args); +} + +function outer1() { + trialInline(); + var args = Array.prototype.slice.call(inner(1), 1); + return foo(args); +} + +function outer2() { + trialInline(); + var args = Array.prototype.slice.call(inner(1, 2), 1); + return foo(args); +} + +function outer3() { + trialInline(); + var args = Array.prototype.slice.call(inner(1, 2, 3), 1); + return foo(args); +} + +function outer4() { + trialInline(); + var args = Array.prototype.slice.call(inner(1, 2, 3, 4), 1); + return foo(args); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 0); + assertEq(outer2(), 1); + assertEq(outer3(), 2); + assertEq(outer4(), 3); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-3.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-3.js new file mode 100644 index 0000000000..1e354140af --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-3.js @@ -0,0 +1,50 @@ +// |jit-test| --fast-warmup + +function foo(args) { + with ({}) {} + return args.length; +} + +function inner() { + return arguments; +} + +function outer0() { + trialInline(); + var args = Array.prototype.slice.call(inner(), -2); + return foo(args); +} + +function outer1() { + trialInline(); + var args = Array.prototype.slice.call(inner(1), -2); + return foo(args); +} + +function outer2() { + trialInline(); + var args = Array.prototype.slice.call(inner(1, 2), -2); + return foo(args); +} + +function outer3() { + trialInline(); + var args = Array.prototype.slice.call(inner(1, 2, 3), -2); + return foo(args); +} + +function outer4() { + trialInline(); + var args = Array.prototype.slice.call(inner(1, 2, 3, 4), -2); + return foo(args); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 1); + assertEq(outer2(), 2); + assertEq(outer3(), 2); + assertEq(outer4(), 2); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-4.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-4.js new file mode 100644 index 0000000000..f12410b08f --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-slice-4.js @@ -0,0 +1,50 @@ +// |jit-test| --fast-warmup + +function foo(args) { + with ({}) {} + return args.length; +} + +function inner() { + return arguments; +} + +function outer0() { + trialInline(); + var args = Array.prototype.slice.call(inner(), 1, 3); + return foo(args); +} + +function outer1() { + trialInline(); + var args = Array.prototype.slice.call(inner(1), 1, 3); + return foo(args); +} + +function outer2() { + trialInline(); + var args = Array.prototype.slice.call(inner(1, 2), 1, 3); + return foo(args); +} + +function outer3() { + trialInline(); + var args = Array.prototype.slice.call(inner(1, 2, 3), 1, 3); + return foo(args); +} + +function outer4() { + trialInline(); + var args = Array.prototype.slice.call(inner(1, 2, 3, 4), 1, 3); + return foo(args); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 0); + assertEq(outer2(), 1); + assertEq(outer3(), 2); + assertEq(outer4(), 2); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-spread-optimization.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-spread-optimization.js new file mode 100644 index 0000000000..a5092339e3 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-spread-optimization.js @@ -0,0 +1,50 @@ +// |jit-test| --fast-warmup + +function foo(...args) { + with ({}) {} + return args.length; +} + +function inner() { + return arguments; +} + +function outer0() { + trialInline(); + var args = inner(); + return foo(...args); +} + +function outer1() { + trialInline(); + var args = inner(1); + return foo(...args); +} + +function outer2() { + trialInline(); + var args = inner(1,2); + return foo(...args); +} + +function outer3() { + trialInline(); + var args = inner(1,2,3); + return foo(...args); +} + +function outer4() { + trialInline(); + var args = inner(1,2,3,4); + return foo(...args); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 1); + assertEq(outer2(), 2); + assertEq(outer3(), 3); + assertEq(outer4(), 4); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-exists-negative-index-1.js b/js/src/jit-test/tests/arguments/inline-arguments-exists-negative-index-1.js new file mode 100644 index 0000000000..21dbbb0863 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-exists-negative-index-1.js @@ -0,0 +1,34 @@ +// |jit-test| --fast-warmup + +function inner(i) { + return i in arguments; +} + +function outer(i) { + trialInline(); + + // Loop header to trigger OSR. + let r = 0; + for (let j = 0; j < 1; ++j) { + r += inner(i, + // Add extra arguments to ensure we read the arguments from the frame. + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + ); + } + return r; +} + +let count = 0; + +for (let i = 0; i <= 100; ++i) { + if (i === 50) { + Object.prototype[-1] = 0; + } + count += outer(i < 100 ? i : -1); +} + +assertEq(count, 1 + 21); diff --git a/js/src/jit-test/tests/arguments/inline-arguments-exists-negative-index-2.js b/js/src/jit-test/tests/arguments/inline-arguments-exists-negative-index-2.js new file mode 100644 index 0000000000..52e877d549 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-exists-negative-index-2.js @@ -0,0 +1,27 @@ +// |jit-test| --fast-warmup + +function inner(i) { + return i in arguments; +} + +function outer(i) { + trialInline(); + + // Loop header to trigger OSR. + let r = 0; + for (let j = 0; j < 1; ++j) { + r += inner(i); + } + return r; +} + +let count = 0; + +for (let i = 0; i <= 100; ++i) { + if (i === 50) { + Object.prototype[-1] = 0; + } + count += outer(i < 100 ? i : -1); +} + +assertEq(count, 1 + 1); diff --git a/js/src/jit-test/tests/arguments/inline-arguments-formals.js b/js/src/jit-test/tests/arguments/inline-arguments-formals.js new file mode 100644 index 0000000000..8b081999b6 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-formals.js @@ -0,0 +1,37 @@ +// |jit-test| --fast-warmup + +var dummy; + +function inner(x,y) { + dummy = arguments.length; + return y; +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(0); +} + +function outer2() { + trialInline(); + return inner(0, 1); +} + +function outer3() { + trialInline(); + return inner(0,1,2); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), undefined); + assertEq(outer1(), undefined); + assertEq(outer2(), 1); + assertEq(outer3(), 1); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-index-constant-exists.js b/js/src/jit-test/tests/arguments/inline-arguments-index-constant-exists.js new file mode 100644 index 0000000000..f6f90c63a2 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-index-constant-exists.js @@ -0,0 +1,40 @@ +// |jit-test| --fast-warmup + +function inner() { + return 1 in arguments; +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(1); +} + +function outer2() { + trialInline(); + return inner(1, 2); +} + +function outer3() { + trialInline(); + return inner(1,2,3) +} + +function outer4() { + trialInline(); + return inner(1,2,3,4) +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), false); + assertEq(outer1(), false); + assertEq(outer2(), true); + assertEq(outer3(), true); + assertEq(outer4(), true); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-index-constant-oob.js b/js/src/jit-test/tests/arguments/inline-arguments-index-constant-oob.js new file mode 100644 index 0000000000..4e1dc925e1 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-index-constant-oob.js @@ -0,0 +1,40 @@ +// |jit-test| --fast-warmup + +function inner() { + return arguments[100] +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(1); +} + +function outer2() { + trialInline(); + return inner(1, 2); +} + +function outer3() { + trialInline(); + return inner(1,2,3) +} + +function outer4() { + trialInline(); + return inner(1,2,3,4) +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), undefined); + assertEq(outer1(), undefined); + assertEq(outer2(), undefined); + assertEq(outer3(), undefined); + assertEq(outer4(), undefined); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-index-constant.js b/js/src/jit-test/tests/arguments/inline-arguments-index-constant.js new file mode 100644 index 0000000000..41ef531d22 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-index-constant.js @@ -0,0 +1,40 @@ +// |jit-test| --fast-warmup + +function inner() { + return arguments[0] +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(1); +} + +function outer2() { + trialInline(); + return inner(1, 2); +} + +function outer3() { + trialInline(); + return inner(1,2,3) +} + +function outer4() { + trialInline(); + return inner(1,2,3,4) +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), undefined); + assertEq(outer1(), 1); + assertEq(outer2(), 1); + assertEq(outer3(), 1); + assertEq(outer4(), 1); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-index-var.js b/js/src/jit-test/tests/arguments/inline-arguments-index-var.js new file mode 100644 index 0000000000..21a71d2c29 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-index-var.js @@ -0,0 +1,44 @@ +// |jit-test| --fast-warmup + +var idx; + +function inner() { + return arguments[idx] +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(0); +} + +function outer2() { + trialInline(); + return inner(0, 1); +} + +function outer3() { + trialInline(); + return inner(0,1,2) +} + +function outer4() { + trialInline(); + return inner(0,1,2,3) +} + +with ({}) {} + +for (idx = 0; idx < 4; idx++) { + for (var i = 0; i < 50; i++) { + assertEq(outer0(), idx < 0 ? idx : undefined); + assertEq(outer1(), idx < 1 ? idx : undefined); + assertEq(outer2(), idx < 2 ? idx : undefined); + assertEq(outer3(), idx < 3 ? idx : undefined); + assertEq(outer4(), idx < 4 ? idx : undefined); + } +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-length.js b/js/src/jit-test/tests/arguments/inline-arguments-length.js new file mode 100644 index 0000000000..efd9dedaf7 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-length.js @@ -0,0 +1,42 @@ +// |jit-test| --fast-warmup + +var arg = 0; + +function inner() { + return arguments.length; +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(arg); +} + +function outer2() { + trialInline(); + return inner(arg, arg); +} + +function outer3() { + trialInline(); + return inner(arg, arg, arg); +} + +function outer4() { + trialInline(); + return inner(arg, arg, arg, arg); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 1); + assertEq(outer2(), 2); + assertEq(outer3(), 3); + assertEq(outer4(), 4); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-new-spread-optimization-rectifier.js b/js/src/jit-test/tests/arguments/inline-arguments-new-spread-optimization-rectifier.js new file mode 100644 index 0000000000..6aa15d876f --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-new-spread-optimization-rectifier.js @@ -0,0 +1,39 @@ +// |jit-test| --fast-warmup + +function foo(a,b) { + with ({}) {} + return {result: a + b}; +} + +function inner(x,y) { + assertEq(x + y, new foo(...arguments).result); +} + +function outer0() { + trialInline(); + inner(); +} + +function outer1() { + trialInline(); + inner(1); +} + +function outer2() { + trialInline(); + inner(1, 2); +} + +function outer3() { + trialInline(); + inner(1,2,3); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + outer0(); + outer1(); + outer2(); + outer3(); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-new-spread-optimization.js b/js/src/jit-test/tests/arguments/inline-arguments-new-spread-optimization.js new file mode 100644 index 0000000000..2dab581e68 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-new-spread-optimization.js @@ -0,0 +1,47 @@ +// |jit-test| --fast-warmup + + +function foo(...args) { + with ({}) {} + return {result: args.length}; +} + +function inner() { + // Single argument spread calls with |arguments| can be optimised. + return new foo(...arguments); +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(1); +} + +function outer2() { + trialInline(); + return inner(1, 2); +} + +function outer3() { + trialInline(); + return inner(1,2,3) +} + +function outer4() { + trialInline(); + return inner(1,2,3,4) +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0().result, 0); + assertEq(outer1().result, 1); + assertEq(outer2().result, 2); + assertEq(outer3().result, 3); + assertEq(outer4().result, 4); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-oob-negative-index-1.js b/js/src/jit-test/tests/arguments/inline-arguments-oob-negative-index-1.js new file mode 100644 index 0000000000..b60140b3a6 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-oob-negative-index-1.js @@ -0,0 +1,39 @@ +// |jit-test| --fast-warmup + +function inner(i) { + // Can't be eliminated because negative indices cause a bailout. + arguments[i]; + arguments[i]; + arguments[i]; +} + +function outer(i) { + trialInline(); + + // Loop header to trigger OSR. + for (let j = 0; j < 1; ++j) { + inner(i, + // Add extra arguments to ensure we read the arguments from the frame. + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + ); + } +} + +let count = 0; + +for (let i = 0; i <= 100; ++i) { + if (i === 50) { + Object.defineProperty(Object.prototype, -1, { + get() { + count++; + } + }); + } + outer(i < 100 ? i : -1); +} + +assertEq(count, 3); diff --git a/js/src/jit-test/tests/arguments/inline-arguments-oob-negative-index-2.js b/js/src/jit-test/tests/arguments/inline-arguments-oob-negative-index-2.js new file mode 100644 index 0000000000..e5c9f0cd6e --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-oob-negative-index-2.js @@ -0,0 +1,32 @@ +// |jit-test| --fast-warmup + +function inner(i) { + // Can't be eliminated because negative indices cause a bailout. + arguments[i]; + arguments[i]; + arguments[i]; +} + +function outer(i) { + trialInline(); + + // Loop header to trigger OSR. + for (let j = 0; j < 1; ++j) { + inner(i); + } +} + +let count = 0; + +for (let i = 0; i <= 100; ++i) { + if (i === 50) { + Object.defineProperty(Object.prototype, -1, { + get() { + count++; + } + }); + } + outer(i < 100 ? i : -1); +} + +assertEq(count, 3); diff --git a/js/src/jit-test/tests/arguments/inline-arguments-profiler.js b/js/src/jit-test/tests/arguments/inline-arguments-profiler.js new file mode 100644 index 0000000000..6d89b3d72b --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-profiler.js @@ -0,0 +1,11 @@ +function foo() { return arguments; } +function bar(x) { return foo(x); } + +// Turning on the profiler uses up a register and increases register pressure. +enableGeckoProfiling(); +with ({}) {} +for (var i = 0; i < 100; i++) { + var result = bar(3); + assertEq(result.length, 1); + assertEq(result[0], 3); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-slice-1.js b/js/src/jit-test/tests/arguments/inline-arguments-slice-1.js new file mode 100644 index 0000000000..19021aae4a --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-slice-1.js @@ -0,0 +1,46 @@ +// |jit-test| --fast-warmup + + +function foo(args) { + with ({}) {} + return args.length; +} + +function inner() { + return foo(Array.prototype.slice.call(arguments)); +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(1); +} + +function outer2() { + trialInline(); + return inner(1, 2); +} + +function outer3() { + trialInline(); + return inner(1, 2, 3) +} + +function outer4() { + trialInline(); + return inner(1, 2, 3, 4) +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 1); + assertEq(outer2(), 2); + assertEq(outer3(), 3); + assertEq(outer4(), 4); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-slice-2.js b/js/src/jit-test/tests/arguments/inline-arguments-slice-2.js new file mode 100644 index 0000000000..f3af77f844 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-slice-2.js @@ -0,0 +1,46 @@ +// |jit-test| --fast-warmup + + +function foo(args) { + with ({}) {} + return args.length; +} + +function inner() { + return foo(Array.prototype.slice.call(arguments, 1)); +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(1); +} + +function outer2() { + trialInline(); + return inner(1, 2); +} + +function outer3() { + trialInline(); + return inner(1, 2, 3) +} + +function outer4() { + trialInline(); + return inner(1, 2, 3, 4) +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 0); + assertEq(outer2(), 1); + assertEq(outer3(), 2); + assertEq(outer4(), 3); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-slice-3.js b/js/src/jit-test/tests/arguments/inline-arguments-slice-3.js new file mode 100644 index 0000000000..af16586d6c --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-slice-3.js @@ -0,0 +1,46 @@ +// |jit-test| --fast-warmup + + +function foo(args) { + with ({}) {} + return args.length; +} + +function inner() { + return foo(Array.prototype.slice.call(arguments, -2)); +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(1); +} + +function outer2() { + trialInline(); + return inner(1, 2); +} + +function outer3() { + trialInline(); + return inner(1, 2, 3) +} + +function outer4() { + trialInline(); + return inner(1, 2, 3, 4) +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 1); + assertEq(outer2(), 2); + assertEq(outer3(), 2); + assertEq(outer4(), 2); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-slice-4.js b/js/src/jit-test/tests/arguments/inline-arguments-slice-4.js new file mode 100644 index 0000000000..26cf0563af --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-slice-4.js @@ -0,0 +1,46 @@ +// |jit-test| --fast-warmup + + +function foo(args) { + with ({}) {} + return args.length; +} + +function inner() { + return foo(Array.prototype.slice.call(arguments, 1, 3)); +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(1); +} + +function outer2() { + trialInline(); + return inner(1, 2); +} + +function outer3() { + trialInline(); + return inner(1, 2, 3) +} + +function outer4() { + trialInline(); + return inner(1, 2, 3, 4) +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 0); + assertEq(outer2(), 1); + assertEq(outer3(), 2); + assertEq(outer4(), 2); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-slice-5.js b/js/src/jit-test/tests/arguments/inline-arguments-slice-5.js new file mode 100644 index 0000000000..725b14b752 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-slice-5.js @@ -0,0 +1,97 @@ +// |jit-test| --fast-warmup + +function blackhole() { + // Prevent Ion from optimising away this function and its arguments. + with ({}); +} + +function inner() { + // Compile-time constants after GVN, but not during scalar replacement. + // We don't want these to be constants during scalar replacement to ensure + // we don't optimise away the slice() call. + const zero = Math.pow(0, 1); + const one = Math.pow(1, 1); + const two = Math.pow(2, 1); + const three = Math.pow(3, 1); + const four = Math.pow(4, 1); + + // Test with constant |begin| and |count| a constant after GVN. + { + let a0 = Array.prototype.slice.call(arguments, 0, zero); + let a1 = Array.prototype.slice.call(arguments, 0, one); + let a2 = Array.prototype.slice.call(arguments, 0, two); + let a3 = Array.prototype.slice.call(arguments, 0, three); + let a4 = Array.prototype.slice.call(arguments, 0, four); + blackhole(a0, a1, a2, a3, a4); + } + { + let a0 = Array.prototype.slice.call(arguments, 1, zero); + let a1 = Array.prototype.slice.call(arguments, 1, one); + let a2 = Array.prototype.slice.call(arguments, 1, two); + let a3 = Array.prototype.slice.call(arguments, 1, three); + let a4 = Array.prototype.slice.call(arguments, 1, four); + blackhole(a0, a1, a2, a3, a4); + } + + // Same as above, but this time |begin| isn't a constant during scalar replacement. + { + let a0 = Array.prototype.slice.call(arguments, zero, zero); + let a1 = Array.prototype.slice.call(arguments, zero, one); + let a2 = Array.prototype.slice.call(arguments, zero, two); + let a3 = Array.prototype.slice.call(arguments, zero, three); + let a4 = Array.prototype.slice.call(arguments, zero, four); + blackhole(a0, a1, a2, a3, a4); + } + { + let a0 = Array.prototype.slice.call(arguments, one, zero); + let a1 = Array.prototype.slice.call(arguments, one, one); + let a2 = Array.prototype.slice.call(arguments, one, two); + let a3 = Array.prototype.slice.call(arguments, one, three); + let a4 = Array.prototype.slice.call(arguments, one, four); + blackhole(a0, a1, a2, a3, a4); + } +} + +// Ensure |inner| can be inlined. +assertEq(isSmallFunction(inner), true); + +// Zero arguments. +function outer0() { + trialInline(); + return inner(); +} + +// One argument. +function outer1() { + trialInline(); + return inner(1); +} + +// Two arguments. +function outer2() { + trialInline(); + return inner(1, 2); +} + +// Three arguments. +function outer3() { + trialInline(); + return inner(1, 2, 3); +} + +// Four arguments. (|inner| can't be inlined anymore!) +function outer4() { + trialInline(); + return inner(1, 2, 3, 4); +} + +// Don't Ion compile the top-level script. +with ({}); + +for (var i = 0; i < 50; i++) { + outer0(); + outer1(); + outer2(); + outer3(); + outer4(); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-1.js b/js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-1.js new file mode 100644 index 0000000000..f17d6b20a9 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-1.js @@ -0,0 +1,40 @@ +// |jit-test| --fast-warmup + +function foo(a, b) { + with ({}) {} + return a + b; +} + +function inner(x, y) { + var args = Array.prototype.slice.call(arguments); + assertEq(x + y, foo(args[0], args[1])); +} + +function outer0() { + trialInline(); + inner(); +} + +function outer1() { + trialInline(); + inner(1); +} + +function outer2() { + trialInline(); + inner(1, 2); +} + +function outer3() { + trialInline(); + inner(1, 2, 3); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + outer0(); + outer1(); + outer2(); + outer3(); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-2.js b/js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-2.js new file mode 100644 index 0000000000..ad6f8cfcd5 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-2.js @@ -0,0 +1,40 @@ +// |jit-test| --fast-warmup + +function foo(a, b) { + with ({}) {} + return a + b; +} + +function inner(x, y, z) { + var args = Array.prototype.slice.call(arguments, 1); + assertEq(y + z, foo(args[0], args[1])); +} + +function outer0() { + trialInline(); + inner(); +} + +function outer1() { + trialInline(); + inner(1); +} + +function outer2() { + trialInline(); + inner(1, 2); +} + +function outer3() { + trialInline(); + inner(1, 2, 3); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + outer0(); + outer1(); + outer2(); + outer3(); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-3.js b/js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-3.js new file mode 100644 index 0000000000..083c4ace68 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-3.js @@ -0,0 +1,40 @@ +// |jit-test| --fast-warmup + +function foo(a, b) { + with ({}) {} + return a + b; +} + +function inner(x, y, z) { + var args = Array.prototype.slice.call(arguments, -2); + assertEq((z !== undefined ? y + z : x + y), foo(args[0], args[1])); +} + +function outer0() { + trialInline(); + inner(); +} + +function outer1() { + trialInline(); + inner(1); +} + +function outer2() { + trialInline(); + inner(1, 2); +} + +function outer3() { + trialInline(); + inner(1, 2, 3); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + outer0(); + outer1(); + outer2(); + outer3(); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-4.js b/js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-4.js new file mode 100644 index 0000000000..a7a63d77a8 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-slice-rectifier-4.js @@ -0,0 +1,40 @@ +// |jit-test| --fast-warmup + +function foo(a, b) { + with ({}) {} + return a + b; +} + +function inner(w, x, y, z) { + var args = Array.prototype.slice.call(arguments, 1, 3); + assertEq(x + y, foo(args[0], args[1])); +} + +function outer0() { + trialInline(); + inner(); +} + +function outer1() { + trialInline(); + inner(1); +} + +function outer2() { + trialInline(); + inner(1, 2); +} + +function outer3() { + trialInline(); + inner(1, 2, 3); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + outer0(); + outer1(); + outer2(); + outer3(); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-spread-optimization-rectifier.js b/js/src/jit-test/tests/arguments/inline-arguments-spread-optimization-rectifier.js new file mode 100644 index 0000000000..a89abcdc0b --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-spread-optimization-rectifier.js @@ -0,0 +1,39 @@ +// |jit-test| --fast-warmup + +function foo(a,b) { + with ({}) {} + return a + b; +} + +function inner(x,y) { + assertEq(x + y, foo(...arguments)); +} + +function outer0() { + trialInline(); + inner(); +} + +function outer1() { + trialInline(); + inner(1); +} + +function outer2() { + trialInline(); + inner(1, 2); +} + +function outer3() { + trialInline(); + inner(1,2,3); +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + outer0(); + outer1(); + outer2(); + outer3(); +} diff --git a/js/src/jit-test/tests/arguments/inline-arguments-spread-optimization.js b/js/src/jit-test/tests/arguments/inline-arguments-spread-optimization.js new file mode 100644 index 0000000000..21505e9437 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-spread-optimization.js @@ -0,0 +1,47 @@ +// |jit-test| --fast-warmup + + +function foo(...args) { + with ({}) {} + return args.length; +} + +function inner() { + // Single argument spread calls with |arguments| can be optimised. + return foo(...arguments); +} + +function outer0() { + trialInline(); + return inner(); +} + +function outer1() { + trialInline(); + return inner(1); +} + +function outer2() { + trialInline(); + return inner(1, 2); +} + +function outer3() { + trialInline(); + return inner(1,2,3) +} + +function outer4() { + trialInline(); + return inner(1,2,3,4) +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 1); + assertEq(outer2(), 2); + assertEq(outer3(), 3); + assertEq(outer4(), 4); +} diff --git a/js/src/jit-test/tests/arguments/inline-rest-array-creation.js b/js/src/jit-test/tests/arguments/inline-rest-array-creation.js new file mode 100644 index 0000000000..34998d4cb4 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-rest-array-creation.js @@ -0,0 +1,83 @@ +function zero(...rest) +{ + assertEq(rest.length, 0, "zero rest wrong length"); +} + +function tzero() +{ + zero(); +} + +tzero(); tzero(); tzero(); + +function one(...rest) +{ + assertEq(rest.length, 1, "one rest wrong length"); +} + +function tone() +{ + one(0); +} + +tone(); tone(); tone(); + +function two(...rest) +{ + assertEq(rest.length, 2, "two rest wrong length"); +} + +function ttwo() +{ + two(0, 1); +} + +ttwo(); ttwo(); ttwo(); + +function zeroWithLeading0(x, ...rest) +{ + assertEq(rest.length, 0, "zeroWithLeading0 rest wrong length"); +} + +function tzeroWithLeading0() +{ + zeroWithLeading0(); +} + +tzeroWithLeading0(); tzeroWithLeading0(); tzeroWithLeading0(); + +function zeroWithLeading1(x, ...rest) +{ + assertEq(rest.length, 0, "zeroWithLeading1 rest wrong length"); +} + +function tzeroWithLeading1() +{ + zeroWithLeading1(0); +} + +tzeroWithLeading1(); tzeroWithLeading1(); tzeroWithLeading1(); + +function oneWithLeading(x, ...rest) +{ + assertEq(rest.length, 1, "oneWithLeading rest wrong length"); +} + +function toneWithLeading() +{ + oneWithLeading(0, 1); +} + +toneWithLeading(); toneWithLeading(); toneWithLeading(); + +function twoWithLeading(x, ...rest) +{ + assertEq(rest.length, 2, "twoWithLeading rest wrong length"); +} + +function ttwoWithLeading() +{ + twoWithLeading(0, 1, 2); +} + +ttwoWithLeading(); ttwoWithLeading(); ttwoWithLeading(); diff --git a/js/src/jit-test/tests/arguments/inline-transpile.js b/js/src/jit-test/tests/arguments/inline-transpile.js new file mode 100644 index 0000000000..0720256593 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-transpile.js @@ -0,0 +1,17 @@ +function foo(i) { + return i; +} + +function bar(n) { + return foo.apply({}, arguments); +} + +function baz(a, n) { + return bar(n); +} + +var sum = 0; +for (var i = 0; i < 10000; i++) { + sum += baz(0, 1); +} +assertEq(sum, 10000); diff --git a/js/src/jit-test/tests/arguments/iterator-set-and-redefine.js b/js/src/jit-test/tests/arguments/iterator-set-and-redefine.js new file mode 100644 index 0000000000..bcf182790f --- /dev/null +++ b/js/src/jit-test/tests/arguments/iterator-set-and-redefine.js @@ -0,0 +1,33 @@ +function mapped() { + var Iterator = {}; + + // First overwrite the iterator. + arguments[Symbol.iterator] = Iterator; + + // And then redefine a property attribute. + Object.defineProperty(arguments, Symbol.iterator, { + writable: false + }); + + // Make sure redefining an attribute doesn't reset the iterator value. + assertEq(arguments[Symbol.iterator], Iterator); +} +mapped(); + +function unmapped() { + "use strict"; + + var Iterator = {}; + + // First overwrite the iterator. + arguments[Symbol.iterator] = Iterator; + + // And then redefine a property attribute. + Object.defineProperty(arguments, Symbol.iterator, { + writable: false + }); + + // Make sure redefining an attribute doesn't reset the iterator value. + assertEq(arguments[Symbol.iterator], Iterator); +} +unmapped(); diff --git a/js/src/jit-test/tests/arguments/mapped-define.js b/js/src/jit-test/tests/arguments/mapped-define.js new file mode 100644 index 0000000000..0c806f618b --- /dev/null +++ b/js/src/jit-test/tests/arguments/mapped-define.js @@ -0,0 +1,81 @@ +load(libdir + "asserts.js"); + +function testMapped(a) { + assertEq(arguments[0], 1); + + Object.defineProperty(arguments, 0, {value: 23, writable: true, configurable: true}); + assertEq(arguments[0], 23); + assertEq(a, 23); + + a = 12; + assertEq(a, 12); + assertEq(arguments[0], 12); + + Object.defineProperty(arguments, 0, {value: 9, writable: false, configurable: false}); + assertEq(arguments[0], 9); + assertEq(a, 9); + + a = 4; + assertEq(arguments[0], 9); + assertEq(a, 4); +} +for (var i = 0; i < 5; i++) { + testMapped(1); +} + +function testAttributes(x) { + Object.defineProperty(arguments, 0, {enumerable:true, + writable:true, + configurable:true, + value: 4}); + + // Should inherit enumerable/configurable attributes. + Object.defineProperty(arguments, 0, {writable:true, + value: 8}); + assertEq(JSON.stringify(Object.getOwnPropertyDescriptor(arguments, 0)), + '{"value":8,"writable":true,"enumerable":true,"configurable":true}'); + assertEq(x, 8); + + // Property becomes non-configurable. + Object.defineProperty(arguments, 0, {writable:true, + configurable:false, + value: 6}); + assertEq(JSON.stringify(Object.getOwnPropertyDescriptor(arguments, 0)), + '{"value":6,"writable":true,"enumerable":true,"configurable":false}'); + assertEq(x, 6); + + // Can no longer make it non-enumerable. + assertThrowsInstanceOf(() => Object.defineProperty(arguments, 0, {writable:true, + configurable:false, + enumerable:false, + value: 6}), + TypeError); + + // Can no longer make it configurable. + assertThrowsInstanceOf(() => Object.defineProperty(arguments, 0, {writable:true, + configurable:true, + value: 6}), + TypeError); + + // Can still make it non-writable. + Object.defineProperty(arguments, 0, {writable:false, + enumerable:true, + configurable:false, + value: 3}); + assertEq(x, 3); + + // No longer a mapped property. + x = 5; + assertEq(arguments[0], 3); + + // Can no longer make it writable. + assertThrowsInstanceOf(() => Object.defineProperty(arguments, 0, {writable:true, + enumerable:true, + configurable:false, + value: 5}), + TypeError); + assertEq(x, 5); +} +for (var i = 0; i < 5; i++) { + testAttributes(i); +} diff --git a/js/src/jit-test/tests/arguments/mapped-freeze.js b/js/src/jit-test/tests/arguments/mapped-freeze.js new file mode 100644 index 0000000000..e60cb24233 --- /dev/null +++ b/js/src/jit-test/tests/arguments/mapped-freeze.js @@ -0,0 +1,8 @@ +function f(a) { + Object.freeze(arguments); + a = 1; + return arguments[0]; +} + +assertEq(f(10), 10); +assertEq(f("hello"), "hello"); diff --git a/js/src/jit-test/tests/arguments/mapped-unmapped-args.js b/js/src/jit-test/tests/arguments/mapped-unmapped-args.js new file mode 100644 index 0000000000..d1b063be3d --- /dev/null +++ b/js/src/jit-test/tests/arguments/mapped-unmapped-args.js @@ -0,0 +1,61 @@ +// An unmapped arguments object is created for strict functions or functions +// with default/rest/destructuring args. + +load(libdir + "asserts.js"); + +function testDefaults(a, b=3) { + a = 3; + b = 4; + assertEq(arguments.length, 1); + assertEq(arguments[0], 1); + assertEq(arguments[1], undefined); + arguments[0] = 5; + assertEq(a, 3); + assertThrowsInstanceOf(() => arguments.callee, TypeError); +} +testDefaults(1); + +function testRest(a, ...rest) { + a = 3; + assertEq(arguments.length, 3); + assertEq(arguments[0], 1); + assertEq(arguments[1], 2); + arguments[0] = 5; + assertEq(a, 3); + arguments[1] = 6; + assertEq(arguments[1], 6); + assertEq(rest.toString(), "2,3"); + assertThrowsInstanceOf(() => arguments.callee, TypeError); +} +testRest(1, 2, 3); + +function testDestructuring(a, {foo, bar}, b) { + a = 3; + bar = 4; + b = 1; + assertEq(arguments.length, 3); + assertEq(arguments[0], 1); + assertEq(arguments[1].bar, 2); + assertEq(arguments[2], 9); + assertThrowsInstanceOf(() => arguments.callee, TypeError); +} +testDestructuring(1, {foo: 1, bar: 2}, 9); + +function testStrict(a) { + "use strict"; + a = 3; + assertEq(arguments[0], 1); + arguments[0] = 8; + assertEq(a, 3); + assertThrowsInstanceOf(() => arguments.callee, TypeError); +} +testStrict(1, 2); + +function testMapped(a) { + a = 3; + assertEq(arguments[0], 3); + arguments[0] = 5; + assertEq(a, 5); + assertEq(arguments.callee, testMapped); +} +testMapped(1); diff --git a/js/src/jit-test/tests/arguments/nonstrict-args.js b/js/src/jit-test/tests/arguments/nonstrict-args.js new file mode 100644 index 0000000000..750bcc1e78 --- /dev/null +++ b/js/src/jit-test/tests/arguments/nonstrict-args.js @@ -0,0 +1,24 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function args(a) { return arguments; } + +var a1, a2, a3, a4; + +for (var i = 0; i < 5; i++) +{ + a1 = args(); + a2 = args(1); + a3 = args(1, obj); + a4 = args("foopy"); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [1]), true); +assertEq(arraysEqual(a3, [1, obj]), true); +assertEq(arraysEqual(a4, ["foopy"]), true); diff --git a/js/src/jit-test/tests/arguments/nonstrict-assign-element-get-parameter.js b/js/src/jit-test/tests/arguments/nonstrict-assign-element-get-parameter.js new file mode 100644 index 0000000000..c55588daa4 --- /dev/null +++ b/js/src/jit-test/tests/arguments/nonstrict-assign-element-get-parameter.js @@ -0,0 +1,13 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +function assignElementGetParameter(a) +{ + arguments[0] = 17; + return a; +} + +for (var i = 0; i < 5; i++) + assertEq(assignElementGetParameter(42), 17); diff --git a/js/src/jit-test/tests/arguments/nonstrict-assign-parameter-get-element.js b/js/src/jit-test/tests/arguments/nonstrict-assign-parameter-get-element.js new file mode 100644 index 0000000000..747abbad31 --- /dev/null +++ b/js/src/jit-test/tests/arguments/nonstrict-assign-parameter-get-element.js @@ -0,0 +1,13 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +function assignParameterGetElement(a) +{ + a = 17; + return arguments[0]; +} + +for (var i = 0; i < 5; i++) + assertEq(assignParameterGetElement(42), 17); diff --git a/js/src/jit-test/tests/arguments/nonstrict-assign.js b/js/src/jit-test/tests/arguments/nonstrict-assign.js new file mode 100644 index 0000000000..8dd75e7209 --- /dev/null +++ b/js/src/jit-test/tests/arguments/nonstrict-assign.js @@ -0,0 +1,17 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +function assign(a) +{ + a = 17; + return arguments; +} + +var a1; +for (var i = 0; i < 5; i++) + a1 = assign(1); + +assertEq(arraysEqual(a1, [17]), true); diff --git a/js/src/jit-test/tests/arguments/nonstrict-later-assign.js b/js/src/jit-test/tests/arguments/nonstrict-later-assign.js new file mode 100644 index 0000000000..fbf72abc4c --- /dev/null +++ b/js/src/jit-test/tests/arguments/nonstrict-later-assign.js @@ -0,0 +1,18 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +function getLaterAssign(a) +{ + var o = arguments; + a = 17; + return o; +} + +var a1, a2; +for (var i = 0; i < 5; i++) + a1 = getLaterAssign(1); + +assertEq(arraysEqual(a1, [17]), true); diff --git a/js/src/jit-test/tests/arguments/nonstrict-noargs.js b/js/src/jit-test/tests/arguments/nonstrict-noargs.js new file mode 100644 index 0000000000..ef1bca7dee --- /dev/null +++ b/js/src/jit-test/tests/arguments/nonstrict-noargs.js @@ -0,0 +1,21 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function noargs() { return arguments; } + +var a1, a2, a3; +for (var i = 0; i < 5; i++) +{ + a1 = noargs(); + a2 = noargs(1); + a3 = noargs(2, obj, 8); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [1]), true); +assertEq(arraysEqual(a3, [2, obj, 8]), true); diff --git a/js/src/jit-test/tests/arguments/polymorphic-getelem.js b/js/src/jit-test/tests/arguments/polymorphic-getelem.js new file mode 100644 index 0000000000..95672c7ca7 --- /dev/null +++ b/js/src/jit-test/tests/arguments/polymorphic-getelem.js @@ -0,0 +1,15 @@ +function foo(s) { + return arguments[s]; +} + +for (var i = 0; i < 100; i++) { + assertEq(foo("callee"), foo); +} + +for (var i = 0; i < 100; i++) { + assertEq(foo("length"), 1); +} + +for (var i = 0; i < 100; i++) { + assertEq(foo(0), 0); +} diff --git a/js/src/jit-test/tests/arguments/recover-osr-arguments-oob.js b/js/src/jit-test/tests/arguments/recover-osr-arguments-oob.js new file mode 100644 index 0000000000..72e322dd85 --- /dev/null +++ b/js/src/jit-test/tests/arguments/recover-osr-arguments-oob.js @@ -0,0 +1,27 @@ +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("ion.warmup.trigger", 120); +gczeal(0); +with ({}) {} + +function bar(i) { + // |arguments| can be recovered, even if this is inlined into an OSR script. + assertRecoveredOnBailout(arguments, true); + return arguments[i & 1]|0; +} + +function foo(n) { + // |arguments| for an OSR script can't be recovered. + assertRecoveredOnBailout(arguments, false); + var sum = 0; + for (var i = 0; i < n; i++) { + sum += bar(i); + } + trialInline(); + return sum; +} + +// Trigger trial-inlining of bar into foo. +foo(110); + +// OSR-compile foo. +assertEq(foo(1000), 249500); diff --git a/js/src/jit-test/tests/arguments/recover-osr-arguments.js b/js/src/jit-test/tests/arguments/recover-osr-arguments.js new file mode 100644 index 0000000000..88756d4a54 --- /dev/null +++ b/js/src/jit-test/tests/arguments/recover-osr-arguments.js @@ -0,0 +1,27 @@ +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("ion.warmup.trigger", 120); +gczeal(0); +with ({}) {} + +function bar() { + // |arguments| can be recovered, even if this is inlined into an OSR script. + assertRecoveredOnBailout(arguments, true); + return arguments[0]; +} + +function foo(n) { + // |arguments| for an OSR script can't be recovered. + assertRecoveredOnBailout(arguments, false); + var sum = 0; + for (var i = 0; i < n; i++) { + sum += bar(i); + } + trialInline(); + return sum; +} + +// Trigger trial-inlining of bar into foo. +foo(110); + +// OSR-compile foo. +assertEq(foo(1000), 499500); diff --git a/js/src/jit-test/tests/arguments/recover-spread-opt-arguments-after-bail.js b/js/src/jit-test/tests/arguments/recover-spread-opt-arguments-after-bail.js new file mode 100644 index 0000000000..c8c76c278a --- /dev/null +++ b/js/src/jit-test/tests/arguments/recover-spread-opt-arguments-after-bail.js @@ -0,0 +1,22 @@ +function outer(fn, x, y) { + fn(...arguments); +} + +function inner1(fn, x, y) { + assertEq(fn, inner1); + assertEq(x, y); +} + +function inner2(fn, x, y) { + assertEq(fn, inner2); + assertEq(x, 100); + assertEq(y, 200); +} + +for (let i = 0; i < 100; i++) { + outer(inner1, i, i); +} + +// Call with a different function to cause a bailout. This will lead to +// recovering the |arguments| object. +outer(inner2, 100, 200); diff --git a/js/src/jit-test/tests/arguments/redefine-callee.js b/js/src/jit-test/tests/arguments/redefine-callee.js new file mode 100644 index 0000000000..c200f5326d --- /dev/null +++ b/js/src/jit-test/tests/arguments/redefine-callee.js @@ -0,0 +1,31 @@ +function test() { + let count = 0; + for (var i = 0; i < 30; i++) { + assertEq(arguments.callee, i > 20 ? 3 : test); + if (i === 20) { + Object.defineProperty(arguments, "callee", {get: function() { count++; return 3; }}); + } + } + assertEq(count, 9); +} +test(); + +function testUnusedResult() { + let count = 0; + for (var i = 0; i < 30; i++) { + arguments.callee; + if (i === 20) { + Object.defineProperty(arguments, "callee", {get: function() { count++; return 3; }}); + } + } + assertEq(count, 9); +} +testUnusedResult(); + +function testSetter() { + Object.defineProperty(arguments, "callee", {set: function() {}}); + for (var i = 0; i < 15; i++) { + assertEq(arguments.callee, undefined); + } +} +testSetter(); diff --git a/js/src/jit-test/tests/arguments/rest-alias-function.js b/js/src/jit-test/tests/arguments/rest-alias-function.js new file mode 100644 index 0000000000..1dda665210 --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-alias-function.js @@ -0,0 +1,10 @@ +function no_defaults(a, ...rest) { + return rest; + function rest() { return a; } +} +assertEq(typeof no_defaults(), "function"); +function with_defaults(a=42, ...rest) { + return rest; + function rest() { return a; } +} +assertEq(typeof with_defaults(), "function"); diff --git a/js/src/jit-test/tests/arguments/rest-arguments-as-parameters.js b/js/src/jit-test/tests/arguments/rest-arguments-as-parameters.js new file mode 100644 index 0000000000..120b0ce1c0 --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-arguments-as-parameters.js @@ -0,0 +1,9 @@ +function f1(...arguments) { + assertEq("1,2,3", arguments.toString()); +} +f1(1, 2, 3); +function f2(arguments, ...rest) { + assertEq(arguments, 42); + assertEq("1,2,3", rest.toString()); +} +f2(42, 1, 2, 3); \ No newline at end of file diff --git a/js/src/jit-test/tests/arguments/rest-basic.js b/js/src/jit-test/tests/arguments/rest-basic.js new file mode 100644 index 0000000000..cb050d13b3 --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-basic.js @@ -0,0 +1,15 @@ +function check(expected, ...rest) { + assertEq(expected.toString(), rest.toString()); +} + +assertEq(check.length, 1); +check([]); +check(['a', 'b'], 'a', 'b'); +check(['a', 'b', 'c', 'd'], 'a', 'b', 'c', 'd'); +check.apply(null, [['a', 'b'], 'a', 'b']) +check.call(null, ['a', 'b'], 'a', 'b') + +var g = newGlobal(); +g.eval("function f(...rest) { return rest; }"); +var a = g.f(1, 2, 3); +assertEq(a instanceof g.Array, true); \ No newline at end of file diff --git a/js/src/jit-test/tests/arguments/rest-bug763954.js b/js/src/jit-test/tests/arguments/rest-bug763954.js new file mode 100644 index 0000000000..3884abf8e2 --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-bug763954.js @@ -0,0 +1,5 @@ +for (i in ['']) {} +function f(...patterns) { + patterns[i]; +}; +f(''); diff --git a/js/src/jit-test/tests/arguments/rest-debugger.js b/js/src/jit-test/tests/arguments/rest-debugger.js new file mode 100644 index 0000000000..be9016a07c --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-debugger.js @@ -0,0 +1,17 @@ +var g = newGlobal({newCompartment: true}); +g.eval("function f(...x) {}"); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var fw = gw.getOwnPropertyDescriptor("f").value; +assertEq(fw.parameterNames.toString(), "x"); + +var g = newGlobal({newCompartment: true}); +g.eval("function f(...rest) { debugger; }"); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + frame.eval("args = arguments"); +}; +g.f(9, 8, 7); + +assertEq(g.args.length, 3); +assertEq(g.args[2], 7); diff --git a/js/src/jit-test/tests/arguments/rest-disallow-arguments-strict.js b/js/src/jit-test/tests/arguments/rest-disallow-arguments-strict.js new file mode 100644 index 0000000000..7f54e5ef7a --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-disallow-arguments-strict.js @@ -0,0 +1,8 @@ +"use strict"; +load(libdir + "asserts.js"); +assertThrowsInstanceOf(function () { + eval("(function (...arguments) {})"); +}, SyntaxError); +assertThrowsInstanceOf(function () { + eval("(function (...eval) {})"); +}, SyntaxError); diff --git a/js/src/jit-test/tests/arguments/rest-in-Function.js b/js/src/jit-test/tests/arguments/rest-in-Function.js new file mode 100644 index 0000000000..e2966be691 --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-in-Function.js @@ -0,0 +1,3 @@ +h = Function("a", "b", "c", "...rest", "return rest.toString();"); +assertEq(h.length, 3); +assertEq(h(1, 2, 3, 4, 5), "4,5"); diff --git a/js/src/jit-test/tests/arguments/rest-invalid-syntax.js b/js/src/jit-test/tests/arguments/rest-invalid-syntax.js new file mode 100644 index 0000000000..f91d93ea62 --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-invalid-syntax.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); +var ieval = eval; +var offenders = [["..."], ["...rest"," x"], ["...rest", "[x]"], + ["...rest", "...rest2"]]; +for (var arglist of offenders) { + assertThrowsInstanceOf(function () { + ieval("function x(" + arglist.join(", ") + ") {}"); + }, SyntaxError); + assertThrowsInstanceOf(function () { + Function.apply(null, arglist.concat("return 0;")); + }, SyntaxError); +} \ No newline at end of file diff --git a/js/src/jit-test/tests/arguments/rest-nested-arguments.js b/js/src/jit-test/tests/arguments/rest-nested-arguments.js new file mode 100644 index 0000000000..18f5ca56df --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-nested-arguments.js @@ -0,0 +1,7 @@ +function f(...rest) { + function nested() { + return arguments.length; + } + return nested; +} +assertEq(f()(1, 2, 3), 3); diff --git a/js/src/jit-test/tests/arguments/rest-nested.js b/js/src/jit-test/tests/arguments/rest-nested.js new file mode 100644 index 0000000000..0ad82e5475 --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-nested.js @@ -0,0 +1,7 @@ +function f(...rest) { + function nested () { + return rest; + } + return nested; +} +assertEq(f(1, 2, 3)().toString(), [1, 2, 3].toString()); \ No newline at end of file diff --git a/js/src/jit-test/tests/arguments/rest-underflow.js b/js/src/jit-test/tests/arguments/rest-underflow.js new file mode 100644 index 0000000000..bb9b39c50b --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-underflow.js @@ -0,0 +1,9 @@ +function f(a, b, c, ...rest) { + assertEq(a, 1); + assertEq(b, undefined); + assertEq(c, undefined); + assertEq(Array.isArray(rest), true); + assertEq(rest.length, 0); + assertEq(Object.getPrototypeOf(rest), Array.prototype); +} +f(1); diff --git a/js/src/jit-test/tests/arguments/rest-with-arguments.js b/js/src/jit-test/tests/arguments/rest-with-arguments.js new file mode 100644 index 0000000000..7dfc63c739 --- /dev/null +++ b/js/src/jit-test/tests/arguments/rest-with-arguments.js @@ -0,0 +1,40 @@ +// 'arguments' is allowed with rest parameters. + +var args; + +function restWithArgs(a, b, ...rest) { + return arguments; +} + +args = restWithArgs(1, 3, 6, 9); +assertEq(args.length, 4); +assertEq(JSON.stringify(args), '{"0":1,"1":3,"2":6,"3":9}'); + +args = restWithArgs(); +assertEq(args.length, 0); + +args = restWithArgs(4, 5); +assertEq(args.length, 2); +assertEq(JSON.stringify(args), '{"0":4,"1":5}'); + +function restWithArgsEval(a, b, ...rest) { + return eval("arguments"); +} + +args = restWithArgsEval(1, 3, 6, 9); +assertEq(args.length, 4); +assertEq(JSON.stringify(args), '{"0":1,"1":3,"2":6,"3":9}'); + +function g(...rest) { + h(); +} +function h() { + g.arguments; +} +g(); + +// eval() is evil, but you can still use it with rest parameters! +function still_use_eval(...rest) { + eval("x = 4"); +} +still_use_eval(); diff --git a/js/src/jit-test/tests/arguments/slice-args-obj-01.js b/js/src/jit-test/tests/arguments/slice-args-obj-01.js new file mode 100644 index 0000000000..6d3a826d8e --- /dev/null +++ b/js/src/jit-test/tests/arguments/slice-args-obj-01.js @@ -0,0 +1,19 @@ +function escape(x) { with ({}) {} } + +function foo() { + escape(arguments); + var args = Array.prototype.slice.call(arguments); + return bar(args[0], args[1]); +} + +function bar(x, y) { + return x + y; +} + +with ({}) {} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1, 2); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/slice-args-obj-02.js b/js/src/jit-test/tests/arguments/slice-args-obj-02.js new file mode 100644 index 0000000000..03581fbdf0 --- /dev/null +++ b/js/src/jit-test/tests/arguments/slice-args-obj-02.js @@ -0,0 +1,17 @@ +function foo() { + arguments[0] = 3; + var args = Array.prototype.slice.call(arguments); + return bar(args[0], args[1]); +} + +function bar(x, y) { + return x + y; +} + +with ({}) {} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1, 2); +} +assertEq(sum, 500); diff --git a/js/src/jit-test/tests/arguments/slice-args-obj-03.js b/js/src/jit-test/tests/arguments/slice-args-obj-03.js new file mode 100644 index 0000000000..3205580229 --- /dev/null +++ b/js/src/jit-test/tests/arguments/slice-args-obj-03.js @@ -0,0 +1,21 @@ +function escape() { with ({}) {} } + +function foo(i) { + return i; +} + +function bar(n) { + escape(arguments); + var args = Array.prototype.slice.call(arguments); + return foo(args[0]); +} + +function baz(a, n) { + return bar(n); +} + +var sum = 0; +for (var i = 0; i < 10000; i++) { + sum += baz(0, 1); +} +assertEq(sum, 10000); diff --git a/js/src/jit-test/tests/arguments/slice-args-obj-04.js b/js/src/jit-test/tests/arguments/slice-args-obj-04.js new file mode 100644 index 0000000000..2cddb3351b --- /dev/null +++ b/js/src/jit-test/tests/arguments/slice-args-obj-04.js @@ -0,0 +1,22 @@ +var result; + +function g(a, b) { + with ({}) {} + result = a + b; +} + +function escape() { with({}) {} } + +function f() { + escape(arguments); + for (var i = 0; i < 50; ++i) { + var args = Array.prototype.slice.call(arguments); + g(args[0], args[1]); + } +} + +f(1, 2); +assertEq(result, 3); + +f(""); +assertEq(result, "undefined"); diff --git a/js/src/jit-test/tests/arguments/slice-closed-over-arguments-strict.js b/js/src/jit-test/tests/arguments/slice-closed-over-arguments-strict.js new file mode 100644 index 0000000000..71815f0b43 --- /dev/null +++ b/js/src/jit-test/tests/arguments/slice-closed-over-arguments-strict.js @@ -0,0 +1,17 @@ +"use strict"; + +function bar(x, y) { + return x + y; +} + +function foo(x, y) { + function closeOver() { return x; } + var args = Array.prototype.slice.call(arguments); + return bar(args[0], args[1]); +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1, 2); +} +assertEq(sum, 300) diff --git a/js/src/jit-test/tests/arguments/slice-closed-over-arguments.js b/js/src/jit-test/tests/arguments/slice-closed-over-arguments.js new file mode 100644 index 0000000000..4a61c4005b --- /dev/null +++ b/js/src/jit-test/tests/arguments/slice-closed-over-arguments.js @@ -0,0 +1,15 @@ +function bar(x, y) { + return x + y; +} + +function foo(x, y) { + function closeOver() { return x; } + var args = Array.prototype.slice.call(arguments); + return bar(args[0], args[1]); +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1, 2); +} +assertEq(sum, 300) diff --git a/js/src/jit-test/tests/arguments/slice-redefine-length.js b/js/src/jit-test/tests/arguments/slice-redefine-length.js new file mode 100644 index 0000000000..9b776064d7 --- /dev/null +++ b/js/src/jit-test/tests/arguments/slice-redefine-length.js @@ -0,0 +1,19 @@ +function foo() { + arguments.length = 2; + var args = Array.prototype.slice.call(arguments); + return bar(args); +} + +function bar(args) { + var result = 0; + for (var x of args) { + result += x; + } + return result; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1, 2, 3, 4, 5, 6); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/slice.js b/js/src/jit-test/tests/arguments/slice.js new file mode 100644 index 0000000000..3ab3d82b67 --- /dev/null +++ b/js/src/jit-test/tests/arguments/slice.js @@ -0,0 +1,366 @@ +// Tests when |arguments| are used with Array.prototype.slice. + +function testBasic() { + // Return the number of arguments. + function argslen() { return arguments.length; } + + // Return the first argument. + function arg0() { return arguments[0]; } + + // Return the argument at the request index. + function argIndex(i) { return arguments[i]; } + + // Call the above functions when no formals are present. + function noFormalsLen() { return argslen(...Array.prototype.slice.call(arguments)); } + function noFormals0() { return arg0(...Array.prototype.slice.call(arguments)); } + function noFormalsIndex() { return argIndex(...Array.prototype.slice.call(arguments)); } + + // Call the above functions when some formals are present. + function formalsLen(x, y, z) { return argslen(...Array.prototype.slice.call(arguments)); } + function formals0(x, y, z) { return arg0(...Array.prototype.slice.call(arguments)); } + function formalsIndex(x, y, z) { return argIndex(...Array.prototype.slice.call(arguments)); } + + // Call the above functions when a rest argument is present. + function restLen(...rest) { return argslen(...Array.prototype.slice.call(arguments)); } + function rest0(...rest) { return arg0(...Array.prototype.slice.call(arguments)); } + function restIndex(...rest) { return argIndex(...Array.prototype.slice.call(arguments)); } + + // Call the above functions when default parameters are present. + function defaultLen(x = 0) { return argslen(...Array.prototype.slice.call(arguments)); } + function default0(x = 0) { return arg0(...Array.prototype.slice.call(arguments)); } + function defaultIndex(x = 0) { return argIndex(...Array.prototype.slice.call(arguments)); } + + for (let i = 0; i < 100; ++i) { + assertEq(noFormalsLen(), 0); + assertEq(noFormalsLen(1), 1); + assertEq(noFormalsLen(1, 2, 3), 3); + + assertEq(formalsLen(), 0); + assertEq(formalsLen(1), 1); + assertEq(formalsLen(1, 2, 3), 3); + + assertEq(restLen(), 0); + assertEq(restLen(1), 1); + assertEq(restLen(1, 2, 3), 3); + + assertEq(defaultLen(), 0); + assertEq(defaultLen(1), 1); + assertEq(defaultLen(1, 2, 3), 3); + + assertEq(noFormals0(), undefined); + assertEq(noFormals0(100), 100); + assertEq(noFormals0(100, 200, 300), 100); + + assertEq(formals0(), undefined); + assertEq(formals0(100), 100); + assertEq(formals0(100, 200, 300), 100); + + assertEq(rest0(), undefined); + assertEq(rest0(100), 100); + assertEq(rest0(100, 200, 300), 100); + + assertEq(default0(), undefined); + assertEq(default0(100), 100); + assertEq(default0(100, 200, 300), 100); + + assertEq(noFormalsIndex(), undefined); + assertEq(noFormalsIndex(0), 0); + assertEq(noFormalsIndex(0, 100), 0); + assertEq(noFormalsIndex(0, 100, 200, 300), 0); + assertEq(noFormalsIndex(1, 100), 100); + assertEq(noFormalsIndex(1, 100, 200, 300), 100); + + assertEq(formalsIndex(), undefined); + assertEq(formalsIndex(0), 0); + assertEq(formalsIndex(0, 100), 0); + assertEq(formalsIndex(0, 100, 200, 300), 0); + assertEq(formalsIndex(1, 100), 100); + assertEq(formalsIndex(1, 100, 200, 300), 100); + + assertEq(restIndex(), undefined); + assertEq(restIndex(0), 0); + assertEq(restIndex(0, 100), 0); + assertEq(restIndex(0, 100, 200, 300), 0); + assertEq(restIndex(1, 100), 100); + assertEq(restIndex(1, 100, 200, 300), 100); + + assertEq(defaultIndex(), undefined); + assertEq(defaultIndex(0), 0); + assertEq(defaultIndex(0, 100), 0); + assertEq(defaultIndex(0, 100, 200, 300), 0); + assertEq(defaultIndex(1, 100), 100); + assertEq(defaultIndex(1, 100, 200, 300), 100); + } +} +testBasic(); + +// Same as testBasic, except that the first argument is removed. +function testRemoveFirst() { + // Return the number of arguments. + function argslen() { return arguments.length; } + + // Return the first argument. + function arg0() { return arguments[0]; } + + // Return the argument at the request index. + function argIndex(i) { return arguments[i]; } + + // Call the above functions when no formals are present. + function noFormalsLen() { return argslen(...Array.prototype.slice.call(arguments, 1)); } + function noFormals0() { return arg0(...Array.prototype.slice.call(arguments, 1)); } + function noFormalsIndex() { return argIndex(...Array.prototype.slice.call(arguments, 1)); } + + // Call the above functions when some formals are present. + function formalsLen(x, y, z) { return argslen(...Array.prototype.slice.call(arguments, 1)); } + function formals0(x, y, z) { return arg0(...Array.prototype.slice.call(arguments, 1)); } + function formalsIndex(x, y, z) { return argIndex(...Array.prototype.slice.call(arguments, 1)); } + + // Call the above functions when a rest argument is present. + function restLen(...rest) { return argslen(...Array.prototype.slice.call(arguments, 1)); } + function rest0(...rest) { return arg0(...Array.prototype.slice.call(arguments, 1)); } + function restIndex(...rest) { return argIndex(...Array.prototype.slice.call(arguments, 1)); } + + // Call the above functions when default parameters are present. + function defaultLen(x = 0) { return argslen(...Array.prototype.slice.call(arguments, 1)); } + function default0(x = 0) { return arg0(...Array.prototype.slice.call(arguments, 1)); } + function defaultIndex(x = 0) { return argIndex(...Array.prototype.slice.call(arguments, 1)); } + + for (let i = 0; i < 100; ++i) { + assertEq(noFormalsLen(), 0); + assertEq(noFormalsLen(1), 0); + assertEq(noFormalsLen(1, 2, 3), 2); + + assertEq(formalsLen(), 0); + assertEq(formalsLen(1), 0); + assertEq(formalsLen(1, 2, 3), 2); + + assertEq(restLen(), 0); + assertEq(restLen(1), 0); + assertEq(restLen(1, 2, 3), 2); + + assertEq(defaultLen(), 0); + assertEq(defaultLen(1), 0); + assertEq(defaultLen(1, 2, 3), 2); + + assertEq(noFormals0(), undefined); + assertEq(noFormals0(100), undefined); + assertEq(noFormals0(100, 200, 300), 200); + + assertEq(formals0(), undefined); + assertEq(formals0(100), undefined); + assertEq(formals0(100, 200, 300), 200); + + assertEq(rest0(), undefined); + assertEq(rest0(100), undefined); + assertEq(rest0(100, 200, 300), 200); + + assertEq(default0(), undefined); + assertEq(default0(100), undefined); + assertEq(default0(100, 200, 300), 200); + + assertEq(noFormalsIndex(), undefined); + assertEq(noFormalsIndex(0), undefined); + assertEq(noFormalsIndex(0, 100), undefined); + assertEq(noFormalsIndex(0, 0, 100), 0); + assertEq(noFormalsIndex(0, 0, 100, 200, 300), 0); + assertEq(noFormalsIndex(0, 1, 100), 100); + assertEq(noFormalsIndex(0, 1, 100, 200, 300), 100); + + assertEq(formalsIndex(), undefined); + assertEq(formalsIndex(0), undefined); + assertEq(formalsIndex(0, 100), undefined); + assertEq(formalsIndex(0, 0, 100), 0); + assertEq(formalsIndex(0, 0, 100, 200, 300), 0); + assertEq(formalsIndex(0, 1, 100), 100); + assertEq(formalsIndex(0, 1, 100, 200, 300), 100); + + assertEq(restIndex(), undefined); + assertEq(restIndex(0), undefined); + assertEq(restIndex(0, 0), 0); + assertEq(restIndex(0, 0, 100), 0); + assertEq(restIndex(0, 0, 100, 200, 300), 0); + assertEq(restIndex(0, 1, 100), 100); + assertEq(restIndex(0, 1, 100, 200, 300), 100); + + assertEq(defaultIndex(), undefined); + assertEq(defaultIndex(0), undefined); + assertEq(defaultIndex(0, 0), 0); + assertEq(defaultIndex(0, 0, 100), 0); + assertEq(defaultIndex(0, 0, 100, 200, 300), 0); + assertEq(defaultIndex(0, 1, 100), 100); + assertEq(defaultIndex(0, 1, 100, 200, 300), 100); + } +} +testRemoveFirst(); + +// Same as testBasic, except that the last argument is removed. +function testRemoveLast() { + // Return the number of arguments. + function argslen() { return arguments.length; } + + // Return the first argument. + function arg0() { return arguments[0]; } + + // Return the argument at the request index. + function argIndex(i) { return arguments[i]; } + + // Call the above functions when no formals are present. + function noFormalsLen() { return argslen(...Array.prototype.slice.call(arguments, 0, -1)); } + function noFormals0() { return arg0(...Array.prototype.slice.call(arguments, 0, -1)); } + function noFormalsIndex() { return argIndex(...Array.prototype.slice.call(arguments, 0, -1)); } + + // Call the above functions when some formals are present. + function formalsLen(x, y, z) { return argslen(...Array.prototype.slice.call(arguments, 0, -1)); } + function formals0(x, y, z) { return arg0(...Array.prototype.slice.call(arguments, 0, -1)); } + function formalsIndex(x, y, z) { return argIndex(...Array.prototype.slice.call(arguments, 0, -1)); } + + // Call the above functions when a rest argument is present. + function restLen(...rest) { return argslen(...Array.prototype.slice.call(arguments, 0, -1)); } + function rest0(...rest) { return arg0(...Array.prototype.slice.call(arguments, 0, -1)); } + function restIndex(...rest) { return argIndex(...Array.prototype.slice.call(arguments, 0, -1)); } + + // Call the above functions when default parameters are present. + function defaultLen(x = 0) { return argslen(...Array.prototype.slice.call(arguments, 0, -1)); } + function default0(x = 0) { return arg0(...Array.prototype.slice.call(arguments, 0, -1)); } + function defaultIndex(x = 0) { return argIndex(...Array.prototype.slice.call(arguments, 0, -1)); } + + for (let i = 0; i < 100; ++i) { + assertEq(noFormalsLen(), 0); + assertEq(noFormalsLen(1), 0); + assertEq(noFormalsLen(1, 2, 3), 2); + + assertEq(formalsLen(), 0); + assertEq(formalsLen(1), 0); + assertEq(formalsLen(1, 2, 3), 2); + + assertEq(restLen(), 0); + assertEq(restLen(1), 0); + assertEq(restLen(1, 2, 3), 2); + + assertEq(defaultLen(), 0); + assertEq(defaultLen(1), 0); + assertEq(defaultLen(1, 2, 3), 2); + + assertEq(noFormals0(), undefined); + assertEq(noFormals0(100), undefined); + assertEq(noFormals0(100, 200, 300), 100); + + assertEq(formals0(), undefined); + assertEq(formals0(100), undefined); + assertEq(formals0(100, 200, 300), 100); + + assertEq(rest0(), undefined); + assertEq(rest0(100), undefined); + assertEq(rest0(100, 200, 300), 100); + + assertEq(default0(), undefined); + assertEq(default0(100), undefined); + assertEq(default0(100, 200, 300), 100); + + assertEq(noFormalsIndex(), undefined); + assertEq(noFormalsIndex(0), undefined); + assertEq(noFormalsIndex(0, 100), 0); + assertEq(noFormalsIndex(0, 100, 200, 300), 0); + assertEq(noFormalsIndex(1, 100), undefined); + assertEq(noFormalsIndex(1, 100, 200, 300), 100); + + assertEq(formalsIndex(), undefined); + assertEq(formalsIndex(0), undefined); + assertEq(formalsIndex(0, 100), 0); + assertEq(formalsIndex(0, 100, 200, 300), 0); + assertEq(formalsIndex(1, 100), undefined); + assertEq(formalsIndex(1, 100, 200, 300), 100); + + assertEq(restIndex(), undefined); + assertEq(restIndex(0), undefined); + assertEq(restIndex(0, 100), 0); + assertEq(restIndex(0, 100, 200, 300), 0); + assertEq(restIndex(1, 100), undefined); + assertEq(restIndex(1, 100, 200, 300), 100); + + assertEq(defaultIndex(), undefined); + assertEq(defaultIndex(0), undefined); + assertEq(defaultIndex(0, 100), 0); + assertEq(defaultIndex(0, 100, 200, 300), 0); + assertEq(defaultIndex(1, 100), undefined); + assertEq(defaultIndex(1, 100, 200, 300), 100); + } +} +testRemoveLast(); + +function testOverriddenLength() { + function g(x, y = 0) { + return x + y; + } + + function f(i) { + if (i === 100) { + arguments.length = 1; + } + var args = Array.prototype.slice.call(arguments); + return g.apply(null, args); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i, i), i !== 100 ? i * 2 : i); + } +} +testOverriddenLength(); + +function testOverriddenElement() { + function g(x, y) { + return x + y; + } + + function f(i) { + if (i === 100) { + arguments[1] = 0; + } + var args = Array.prototype.slice.call(arguments); + return g(args[0], args[1]); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i, i), i !== 100 ? i * 2 : i); + } +} +testOverriddenElement(); + +function testDeletedElement() { + function g(x, y = 0) { + return x + y; + } + + function f(i) { + if (i === 100) { + delete arguments[1]; + } + var args = Array.prototype.slice.call(arguments); + return g.apply(null, args); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i, i), i !== 100 ? i * 2 : i); + } +} +testDeletedElement(); + +function testForwardedArg() { + function g(x, y) { + return x + y; + } + + function f(i) { + function closedOver() { + if (i === 100) i = 0; + } + closedOver(); + var args = Array.prototype.slice.call(arguments); + return g(args[0], args[1]); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i, i), i !== 100 ? i * 2 : i); + } +} +testForwardedArg(); diff --git a/js/src/jit-test/tests/arguments/spread-args-obj-01.js b/js/src/jit-test/tests/arguments/spread-args-obj-01.js new file mode 100644 index 0000000000..2528922a4a --- /dev/null +++ b/js/src/jit-test/tests/arguments/spread-args-obj-01.js @@ -0,0 +1,18 @@ +function escape(x) { with ({}) {} } + +function foo() { + escape(arguments); + return bar(...arguments); +} + +function bar(x,y) { + return x + y; +} + +with ({}) {} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/arguments/spread-args-obj-02.js b/js/src/jit-test/tests/arguments/spread-args-obj-02.js new file mode 100644 index 0000000000..6bb14851c5 --- /dev/null +++ b/js/src/jit-test/tests/arguments/spread-args-obj-02.js @@ -0,0 +1,16 @@ +function foo() { + arguments[0] = 3; + return bar(...arguments); +} + +function bar(x,y) { + return x + y; +} + +with ({}) {} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 500); diff --git a/js/src/jit-test/tests/arguments/spread-args-obj-03.js b/js/src/jit-test/tests/arguments/spread-args-obj-03.js new file mode 100644 index 0000000000..702884272a --- /dev/null +++ b/js/src/jit-test/tests/arguments/spread-args-obj-03.js @@ -0,0 +1,20 @@ +function escape() { with ({}) {} } + +function foo(i) { + return i; +} + +function bar(n) { + escape(arguments); + return foo(...arguments); +} + +function baz(a, n) { + return bar(n); +} + +var sum = 0; +for (var i = 0; i < 10000; i++) { + sum += baz(0, 1); +} +assertEq(sum, 10000); diff --git a/js/src/jit-test/tests/arguments/spread-args-obj-04.js b/js/src/jit-test/tests/arguments/spread-args-obj-04.js new file mode 100644 index 0000000000..b72322a365 --- /dev/null +++ b/js/src/jit-test/tests/arguments/spread-args-obj-04.js @@ -0,0 +1,21 @@ +var result; + +function g(a, b) { + with ({}) {} + result = a + b; +} + +function escape() { with({}) {} } + +function f() { + escape(arguments); + for (var i = 0; i < 50; ++i) { + g(...arguments); + } +} + +f(1, 2); +assertEq(result, 3); + +f(""); +assertEq(result, "undefined"); diff --git a/js/src/jit-test/tests/arguments/spread-call-optimization.js b/js/src/jit-test/tests/arguments/spread-call-optimization.js new file mode 100644 index 0000000000..5ebc68de36 --- /dev/null +++ b/js/src/jit-test/tests/arguments/spread-call-optimization.js @@ -0,0 +1,216 @@ +// Tests when |arguments| are used in optimized spread calls. + +function testBasic() { + // Return the number of arguments. + function argslen() { return arguments.length; } + + // Return the first argument. + function arg0() { return arguments[0]; } + + // Return the argument at the request index. + function argIndex(i) { return arguments[i]; } + + // Call the above functions when no formals are present. + function noFormalsLen() { return argslen(...arguments); } + function noFormals0() { return arg0(...arguments); } + function noFormalsIndex() { return argIndex(...arguments); } + + // Call the above functions when some formals are present. + function formalsLen(x, y, z) { return argslen(...arguments); } + function formals0(x, y, z) { return arg0(...arguments); } + function formalsIndex(x, y, z) { return argIndex(...arguments); } + + // Call the above functions when a rest argument is present. + function restLen(...rest) { return argslen(...arguments); } + function rest0(...rest) { return arg0(...arguments); } + function restIndex(...rest) { return argIndex(...arguments); } + + // Call the above functions when default parameters are present. + function defaultLen(x = 0) { return argslen(...arguments); } + function default0(x = 0) { return arg0(...arguments); } + function defaultIndex(x = 0) { return argIndex(...arguments); } + + for (let i = 0; i < 100; ++i) { + assertEq(noFormalsLen(), 0); + assertEq(noFormalsLen(1), 1); + assertEq(noFormalsLen(1, 2, 3), 3); + + assertEq(formalsLen(), 0); + assertEq(formalsLen(1), 1); + assertEq(formalsLen(1, 2, 3), 3); + + assertEq(restLen(), 0); + assertEq(restLen(1), 1); + assertEq(restLen(1, 2, 3), 3); + + assertEq(defaultLen(), 0); + assertEq(defaultLen(1), 1); + assertEq(defaultLen(1, 2, 3), 3); + + assertEq(noFormals0(), undefined); + assertEq(noFormals0(100), 100); + assertEq(noFormals0(100, 200, 300), 100); + + assertEq(formals0(), undefined); + assertEq(formals0(100), 100); + assertEq(formals0(100, 200, 300), 100); + + assertEq(rest0(), undefined); + assertEq(rest0(100), 100); + assertEq(rest0(100, 200, 300), 100); + + assertEq(default0(), undefined); + assertEq(default0(100), 100); + assertEq(default0(100, 200, 300), 100); + + assertEq(noFormalsIndex(), undefined); + assertEq(noFormalsIndex(0), 0); + assertEq(noFormalsIndex(0, 100), 0); + assertEq(noFormalsIndex(0, 100, 200, 300), 0); + assertEq(noFormalsIndex(1, 100), 100); + assertEq(noFormalsIndex(1, 100, 200, 300), 100); + + assertEq(formalsIndex(), undefined); + assertEq(formalsIndex(0), 0); + assertEq(formalsIndex(0, 100), 0); + assertEq(formalsIndex(0, 100, 200, 300), 0); + assertEq(formalsIndex(1, 100), 100); + assertEq(formalsIndex(1, 100, 200, 300), 100); + + assertEq(restIndex(), undefined); + assertEq(restIndex(0), 0); + assertEq(restIndex(0, 100), 0); + assertEq(restIndex(0, 100, 200, 300), 0); + assertEq(restIndex(1, 100), 100); + assertEq(restIndex(1, 100, 200, 300), 100); + + assertEq(defaultIndex(), undefined); + assertEq(defaultIndex(0), 0); + assertEq(defaultIndex(0, 100), 0); + assertEq(defaultIndex(0, 100, 200, 300), 0); + assertEq(defaultIndex(1, 100), 100); + assertEq(defaultIndex(1, 100, 200, 300), 100); + } +} +testBasic(); + +function testOverriddenIterator() { + function g(x) { + return x; + } + + function f(i) { + if (i === 100) { + arguments[Symbol.iterator] = function() { + return ["bad"].values(); + }; + } + return g(...arguments); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i), i !== 100 ? i : "bad"); + } +} +testOverriddenIterator(); + +function testOverriddenLength() { + function g(x, y = 0) { + return x + y; + } + + function f(i) { + if (i === 100) { + arguments.length = 1; + } + return g(...arguments); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i, i), i !== 100 ? i * 2 : i); + } +} +testOverriddenLength(); + +function testOverriddenElement() { + function g(x, y) { + return x + y; + } + + function f(i) { + if (i === 100) { + arguments[1] = 0; + } + return g(...arguments); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i, i), i !== 100 ? i * 2 : i); + } +} +testOverriddenElement(); + +function testDeletedElement() { + function g(x, y = 0) { + return x + y; + } + + function f(i) { + if (i === 100) { + delete arguments[1]; + } + return g(...arguments); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i, i), i !== 100 ? i * 2 : i); + } +} +testDeletedElement(); + +function testForwardedArg() { + function g(x, y) { + return x + y; + } + + function f(i) { + function closedOver() { + if (i === 100) i = 0; + } + closedOver(); + return g(...arguments); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i, i), i !== 100 ? i * 2 : i); + } +} +testForwardedArg(); + +function testModifiedArrayIteratorPrototype() { + function g(x, y) { + return x + y; + } + + const ArrayIteratorPrototype = Reflect.getPrototypeOf([][Symbol.iterator]()); + const ArrayIteratorPrototypeNext = ArrayIteratorPrototype.next; + function newNext() { + var result = ArrayIteratorPrototypeNext.call(this); + if (!result.done) { + result.value *= 2; + } + return result; + } + + function f(i) { + if (i === 100) { + ArrayIteratorPrototype.next = newNext; + } + return g(...arguments); + } + + for (let i = 0; i <= 150; ++i) { + assertEq(f(i, i), i < 100 ? i * 2 : i * 4); + } +} +testModifiedArrayIteratorPrototype(); diff --git a/js/src/jit-test/tests/arguments/spread-closed-over-arguments-strict.js b/js/src/jit-test/tests/arguments/spread-closed-over-arguments-strict.js new file mode 100644 index 0000000000..05ce6ec831 --- /dev/null +++ b/js/src/jit-test/tests/arguments/spread-closed-over-arguments-strict.js @@ -0,0 +1,15 @@ +'use strict' +function bar(x,y) { + return x + y; +} + +function foo(x, y) { + function closeOver() { return x; } + return bar(...arguments); +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 300) diff --git a/js/src/jit-test/tests/arguments/spread-closed-over-arguments.js b/js/src/jit-test/tests/arguments/spread-closed-over-arguments.js new file mode 100644 index 0000000000..15dd800ae3 --- /dev/null +++ b/js/src/jit-test/tests/arguments/spread-closed-over-arguments.js @@ -0,0 +1,14 @@ +function bar(x,y) { + return x + y; +} + +function foo(x, y) { + function closeOver() { return x; } + return bar(...arguments); +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2); +} +assertEq(sum, 300) diff --git a/js/src/jit-test/tests/arguments/spread-redefine-length.js b/js/src/jit-test/tests/arguments/spread-redefine-length.js new file mode 100644 index 0000000000..8c62ddd5d9 --- /dev/null +++ b/js/src/jit-test/tests/arguments/spread-redefine-length.js @@ -0,0 +1,18 @@ +function foo() { + arguments.length = 2; + return bar(...arguments); +} + +function bar() { + var result = 0; + for (var x of arguments) { + result += x; + } + return result; +} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1,2,3,4,5,6); +} +assertEq(sum,300); diff --git a/js/src/jit-test/tests/arguments/strict-args-flushstack.js b/js/src/jit-test/tests/arguments/strict-args-flushstack.js new file mode 100644 index 0000000000..257018ba3f --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-args-flushstack.js @@ -0,0 +1,27 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +var args; + +function test() +{ + "use strict"; + eval("args = arguments;"); + var a = []; + for (var i = 0; i < 9; i++) + a.push(arguments); + return a; +} + +var a = test(); + +assertEq(Array.isArray(a), true); +assertEq(a.length, 9); + +var count = 0; +a.forEach(function(v, i) { count++; assertEq(v, args); }); +assertEq(count, 9); + +assertEq(Object.prototype.toString.call(args), "[object Arguments]"); +assertEq(args.length, 0); diff --git a/js/src/jit-test/tests/arguments/strict-args-generator-flushstack.js b/js/src/jit-test/tests/arguments/strict-args-generator-flushstack.js new file mode 100644 index 0000000000..ecef5dde74 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-args-generator-flushstack.js @@ -0,0 +1,27 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +var args; + +function* upToTen() +{ + "use strict"; + eval("args = arguments;"); + for (var i = 0; i < 9; i++) + yield i; +} + +var gen = upToTen(); + +var i = 0; +for (var v of gen) +{ + assertEq(v, i); + i++; +} + +assertEq(i, 9); + +assertEq(Object.prototype.toString.call(args), "[object Arguments]"); +assertEq(args.length, 0); diff --git a/js/src/jit-test/tests/arguments/strict-args.js b/js/src/jit-test/tests/arguments/strict-args.js new file mode 100644 index 0000000000..c6d68b2b1f --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-args.js @@ -0,0 +1,25 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictArgs(a) +{ + "use strict"; + return arguments; +} + +var a1, a2, a3; +for (var i = 0; i < 9; i++) +{ + a1 = strictArgs(); + a2 = strictArgs(1); + a3 = strictArgs(1, obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [1]), true); +assertEq(arraysEqual(a3, [1, obj]), true); diff --git a/js/src/jit-test/tests/arguments/strict-assign-after.js b/js/src/jit-test/tests/arguments/strict-assign-after.js new file mode 100644 index 0000000000..b295321c3b --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-assign-after.js @@ -0,0 +1,28 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +var upper; +function strictAssignAfter(a) +{ + "use strict"; + upper = arguments; + a = 42; + return upper; +} + +var a1, a2, a3; +for (var i = 0; i < 5; i++) +{ + a1 = strictAssignAfter(); + a2 = strictAssignAfter(17); + a3 = strictAssignAfter(obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [17]), true); +assertEq(arraysEqual(a3, [obj]), true); diff --git a/js/src/jit-test/tests/arguments/strict-assign-arguments-element.js b/js/src/jit-test/tests/arguments/strict-assign-arguments-element.js new file mode 100644 index 0000000000..d2f4f1e5b8 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-assign-arguments-element.js @@ -0,0 +1,21 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictAssignArgumentsElement(a) +{ + "use strict"; + arguments[0] = 42; + return a; +} + +for (var i = 0; i < 5; i++) +{ + assertEq(strictAssignArgumentsElement(), undefined); + assertEq(strictAssignArgumentsElement(obj), obj); + assertEq(strictAssignArgumentsElement(17), 17); +} diff --git a/js/src/jit-test/tests/arguments/strict-assign-outer-param-psych.js b/js/src/jit-test/tests/arguments/strict-assign-outer-param-psych.js new file mode 100644 index 0000000000..6b8fb680eb --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-assign-outer-param-psych.js @@ -0,0 +1,27 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictAssignOuterParamPSYCH(p) +{ + "use strict"; + function inner(p) { p = 17; } + inner(); + return arguments; +} + +var a1, a2, a3; +for (var i = 0; i < 5; i++) +{ + a1 = strictAssignOuterParamPSYCH(); + a2 = strictAssignOuterParamPSYCH(17); + a3 = strictAssignOuterParamPSYCH(obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [17]), true); +assertEq(arraysEqual(a3, [obj]), true); diff --git a/js/src/jit-test/tests/arguments/strict-assign-outer-param.js b/js/src/jit-test/tests/arguments/strict-assign-outer-param.js new file mode 100644 index 0000000000..f6e4f47675 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-assign-outer-param.js @@ -0,0 +1,27 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictAssignOuterParam(p) +{ + "use strict"; + function inner() { p = 17; } + inner(); + return arguments; +} + +var a1, a2, a3; +for (var i = 0; i < 5; i++) +{ + a1 = strictAssignOuterParam(); + a2 = strictAssignOuterParam(42); + a3 = strictAssignOuterParam(obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [42]), true); +assertEq(arraysEqual(a3, [obj]), true); diff --git a/js/src/jit-test/tests/arguments/strict-assign-parameter-get-element.js b/js/src/jit-test/tests/arguments/strict-assign-parameter-get-element.js new file mode 100644 index 0000000000..ca283fb9b6 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-assign-parameter-get-element.js @@ -0,0 +1,14 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +function strictAssignParameterGetElement(a) +{ + "use strict"; + a = 17; + return arguments[0]; +} + +for (var i = 0; i < 5; i++) + assertEq(strictAssignParameterGetElement(42), 42); diff --git a/js/src/jit-test/tests/arguments/strict-assign.js b/js/src/jit-test/tests/arguments/strict-assign.js new file mode 100644 index 0000000000..6666dec9bb --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-assign.js @@ -0,0 +1,26 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictAssign(a) +{ + "use strict"; + a = 17; + return arguments; +} + +var a1, a2, a3; +for (var i = 0; i < 5; i++) +{ + a1 = strictAssign(); + a2 = strictAssign(1); + a3 = strictAssign(1, obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [1]), true); +assertEq(arraysEqual(a3, [1, obj]), true); diff --git a/js/src/jit-test/tests/arguments/strict-eval-mutation.js b/js/src/jit-test/tests/arguments/strict-eval-mutation.js new file mode 100644 index 0000000000..d33a05c3a0 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-eval-mutation.js @@ -0,0 +1,24 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictEvalMutation(code) +{ + "use strict"; + return eval(code); +} + +var a1, a2; +for (var i = 0; i < 5; i++) +{ + a1 = strictEvalMutation("code = 17; arguments"); + a2 = strictEvalMutation("arguments[0] = 17; arguments"); + assertEq(strictEvalMutation("arguments[0] = 17; code"), "arguments[0] = 17; code"); +} + +assertEq(arraysEqual(a1, ["code = 17; arguments"]), true); +assertEq(arraysEqual(a2, [17]), true); diff --git a/js/src/jit-test/tests/arguments/strict-eval.js b/js/src/jit-test/tests/arguments/strict-eval.js new file mode 100644 index 0000000000..22ffb7fd85 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-eval.js @@ -0,0 +1,30 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +function strictEval(code, p) +{ + "use strict"; + eval(code); + return arguments; +} + +var a1, a2, a3, a4, a5, a6; +for (var i = 0; i < 5; i++) +{ + a1 = strictEval("1", 2); + a2 = strictEval("arguments"); + a3 = strictEval("p = 2"); + a4 = strictEval("p = 2", 17); + a5 = strictEval("arguments[0] = 17"); + a6 = strictEval("arguments[0] = 17", 42); +} + +assertEq(arraysEqual(a1, ["1", 2]), true); +assertEq(arraysEqual(a2, ["arguments"]), true); +assertEq(arraysEqual(a3, ["p = 2"]), true); +assertEq(arraysEqual(a4, ["p = 2", 17]), true); +assertEq(arraysEqual(a5, [17]), true); +assertEq(arraysEqual(a6, [17, 42]), true); diff --git a/js/src/jit-test/tests/arguments/strict-maybe-assign-outer.js b/js/src/jit-test/tests/arguments/strict-maybe-assign-outer.js new file mode 100644 index 0000000000..63f9f69248 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-maybe-assign-outer.js @@ -0,0 +1,26 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictMaybeAssignOuterParam(p) +{ + "use strict"; + function inner() { p = 17; } + return arguments; +} + +var a1, a2, a3; +for (var i = 0; i < 5; i++) +{ + a1 = strictMaybeAssignOuterParam(); + a2 = strictMaybeAssignOuterParam(17); + a3 = strictMaybeAssignOuterParam(obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [17]), true); +assertEq(arraysEqual(a3, [obj]), true); diff --git a/js/src/jit-test/tests/arguments/strict-maybe-nested-eval.js b/js/src/jit-test/tests/arguments/strict-maybe-nested-eval.js new file mode 100644 index 0000000000..a1fe88fd35 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-maybe-nested-eval.js @@ -0,0 +1,26 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +function strictMaybeNestedEval(code, p) +{ + "use strict"; + function inner() { eval(code); } + return arguments; +} + +var a1, a2, a3, a4; +for (var i = 0; i < 5; i++) +{ + a1 = strictMaybeNestedEval("1", 2); + a2 = strictMaybeNestedEval("arguments"); + a3 = strictMaybeNestedEval("p = 2"); + a4 = strictMaybeNestedEval("p = 2", 17); +} + +assertEq(arraysEqual(a1, ["1", 2]), true); +assertEq(arraysEqual(a2, ["arguments"]), true); +assertEq(arraysEqual(a3, ["p = 2"]), true); +assertEq(arraysEqual(a4, ["p = 2", 17]), true); diff --git a/js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function-call.js b/js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function-call.js new file mode 100644 index 0000000000..a9430e3247 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function-call.js @@ -0,0 +1,33 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictNestedAssignShadowFunctionCall(p) +{ + "use strict"; + function inner() + { + function p() { } + p = 1776; + } + inner(); + return arguments; +} + +var a1, a2, a3, a4; +for (var i = 0; i < 5; i++) +{ + a1 = strictNestedAssignShadowFunctionCall(); + a2 = strictNestedAssignShadowFunctionCall(99); + a3 = strictNestedAssignShadowFunctionCall(""); + a4 = strictNestedAssignShadowFunctionCall(obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [99]), true); +assertEq(arraysEqual(a3, [""]), true); +assertEq(arraysEqual(a4, [obj]), true); diff --git a/js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function-name.js b/js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function-name.js new file mode 100644 index 0000000000..e8ae3177aa --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function-name.js @@ -0,0 +1,33 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictNestedAssignShadowFunctionName(p) +{ + "use strict"; + function inner() + { + function p() { p = 1776; } + p(); + } + inner(); + return arguments; +} + +var a1, a2, a3, a4, a5; +for (var i = 0; i < 5; i++) +{ + a1 = strictNestedAssignShadowFunctionName(); + a2 = strictNestedAssignShadowFunctionName(99); + a3 = strictNestedAssignShadowFunctionName(""); + a4 = strictNestedAssignShadowFunctionName(obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [99]), true); +assertEq(arraysEqual(a3, [""]), true); +assertEq(arraysEqual(a4, [obj]), true); diff --git a/js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function.js b/js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function.js new file mode 100644 index 0000000000..46e0acfd04 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function.js @@ -0,0 +1,32 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictNestedAssignShadowFunction(p) +{ + "use strict"; + function inner() + { + function p() { } + p = 1776; + } + return arguments; +} + +var a1, a2, a3, a4; +for (var i = 0; i < 5; i++) +{ + a1 = strictNestedAssignShadowFunction(); + a2 = strictNestedAssignShadowFunction(99); + a3 = strictNestedAssignShadowFunction(""); + a4 = strictNestedAssignShadowFunction(obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [99]), true); +assertEq(arraysEqual(a3, [""]), true); +assertEq(arraysEqual(a4, [obj]), true); diff --git a/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-catch-call.js b/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-catch-call.js new file mode 100644 index 0000000000..03c5e027de --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-catch-call.js @@ -0,0 +1,39 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictNestedAssignShadowCatchCall(p) +{ + "use strict"; + function inner() + { + try + { + } + catch (p) + { + var f = function innermost() { p = 1776; return 12; }; + f(); + } + } + inner(); + return arguments; +} + +var a1, a2, a3, a4; +for (var i = 0; i < 5; i++) +{ + a1 = strictNestedAssignShadowCatchCall(); + a2 = strictNestedAssignShadowCatchCall(99); + a3 = strictNestedAssignShadowCatchCall(""); + a4 = strictNestedAssignShadowCatchCall(obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [99]), true); +assertEq(arraysEqual(a3, [""]), true); +assertEq(arraysEqual(a4, [obj]), true); diff --git a/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-catch.js b/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-catch.js new file mode 100644 index 0000000000..06df3f9149 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-catch.js @@ -0,0 +1,39 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictNestedAssignShadowCatch(p) +{ + "use strict"; + function inner() + { + try + { + } + catch (p) + { + var f = function innermost() { p = 1776; return 12; }; + f(); + } + } + return arguments; +} + +var a1, a2, a3, a4; +for (var i = 0; i < 5; i++) +{ + a1 = strictNestedAssignShadowCatch(); + a2 = strictNestedAssignShadowCatch(99); + a3 = strictNestedAssignShadowCatch(""); + a4 = strictNestedAssignShadowCatch(obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [99]), true); +assertEq(arraysEqual(a3, [""]), true); +assertEq(arraysEqual(a4, [obj]), true); + diff --git a/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-var.js b/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-var.js new file mode 100644 index 0000000000..8248bed338 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-var.js @@ -0,0 +1,29 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +/******************** + * STRICT ARGUMENTS * + ********************/ + +function strictNestedAssignShadowVar(p) +{ + "use strict"; + function inner() + { + var p = 12; + function innermost() { p = 1776; return 12; } + return innermost(); + } + return arguments; +} + +assertEq(arraysEqual(strictNestedAssignShadowVar(), []), true); +assertEq(arraysEqual(strictNestedAssignShadowVar(99), [99]), true); +assertEq(arraysEqual(strictNestedAssignShadowVar(""), [""]), true); +assertEq(arraysEqual(strictNestedAssignShadowVar(obj), [obj]), true); + diff --git a/js/src/jit-test/tests/arguments/strict-nested-eval.js b/js/src/jit-test/tests/arguments/strict-nested-eval.js new file mode 100644 index 0000000000..1f6eab54e4 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-nested-eval.js @@ -0,0 +1,31 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +function strictNestedEval(code, p) +{ + "use strict"; + function inner() { eval(code); } + inner(); + return arguments; +} + +var a1, a2, a3, a4, a5, a6; +for (var i = 0; i < 5; i++) +{ + a1 = strictNestedEval("1", 2); + a2 = strictNestedEval("arguments"); + a3 = strictNestedEval("p = 2"); + a4 = strictNestedEval("p = 2", 17); + a5 = strictNestedEval("arguments[0] = 17"); + a6 = strictNestedEval("arguments[0] = 17", 42); +} + +assertEq(arraysEqual(a1, ["1", 2]), true); +assertEq(arraysEqual(a2, ["arguments"]), true); +assertEq(arraysEqual(a3, ["p = 2"]), true); +assertEq(arraysEqual(a4, ["p = 2", 17]), true); +assertEq(arraysEqual(a5, ["arguments[0] = 17"]), true); +assertEq(arraysEqual(a6, ["arguments[0] = 17", 42]), true); diff --git a/js/src/jit-test/tests/arguments/strict-nested-shadow-eval.js b/js/src/jit-test/tests/arguments/strict-nested-shadow-eval.js new file mode 100644 index 0000000000..d80b7be0a7 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-nested-shadow-eval.js @@ -0,0 +1,30 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +function strictNestedShadowEval(code, p) +{ + "use strict"; + function inner(p) { eval(code); } + return arguments; +} + +var a1, a2, a3, a4, a5, a6; +for (var i = 0; i < 5; i++) +{ + a1 = strictNestedShadowEval("1", 2); + a2 = strictNestedShadowEval("arguments"); + a3 = strictNestedShadowEval("p = 2"); + a4 = strictNestedShadowEval("p = 2", 17); + a5 = strictNestedShadowEval("arguments[0] = 17"); + a6 = strictNestedShadowEval("arguments[0] = 17", 42); +} + +assertEq(arraysEqual(a1, ["1", 2]), true); +assertEq(arraysEqual(a2, ["arguments"]), true); +assertEq(arraysEqual(a3, ["p = 2"]), true); +assertEq(arraysEqual(a4, ["p = 2", 17]), true); +assertEq(arraysEqual(a5, ["arguments[0] = 17"]), true); +assertEq(arraysEqual(a6, ["arguments[0] = 17", 42]), true); diff --git a/js/src/jit-test/tests/arguments/strict-nested-shadow-maybe-eval.js b/js/src/jit-test/tests/arguments/strict-nested-shadow-maybe-eval.js new file mode 100644 index 0000000000..cf9edea9ee --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-nested-shadow-maybe-eval.js @@ -0,0 +1,30 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +function strictNestedShadowMaybeEval(code, p) +{ + "use strict"; + function inner(p) { eval(code); } + return arguments; +} + +var a1, a2, a3, a4, a5, a6; +for (var i = 0; i < 5; i++) +{ + a1 = strictNestedShadowMaybeEval("1", 2); + a2 = strictNestedShadowMaybeEval("arguments"); + a3 = strictNestedShadowMaybeEval("p = 2"); + a4 = strictNestedShadowMaybeEval("p = 2", 17); + a5 = strictNestedShadowMaybeEval("arguments[0] = 17"); + a6 = strictNestedShadowMaybeEval("arguments[0] = 17", 42); +} + +assertEq(arraysEqual(a1, ["1", 2]), true); +assertEq(arraysEqual(a2, ["arguments"]), true); +assertEq(arraysEqual(a3, ["p = 2"]), true); +assertEq(arraysEqual(a4, ["p = 2", 17]), true); +assertEq(arraysEqual(a5, ["arguments[0] = 17"]), true); +assertEq(arraysEqual(a6, ["arguments[0] = 17", 42]), true); diff --git a/js/src/jit-test/tests/arguments/strict-noargs.js b/js/src/jit-test/tests/arguments/strict-noargs.js new file mode 100644 index 0000000000..dfee3c8583 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-noargs.js @@ -0,0 +1,25 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictNoargs() +{ + "use strict"; + return arguments; +} + +var a1, a2, a3; +for (var i = 0; i < 5; i++) +{ + a1 = strictNoargs(); + a2 = strictNoargs(1); + a3 = strictNoargs(1, obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [1]), true); +assertEq(arraysEqual(a3, [1, obj]), true); diff --git a/js/src/jit-test/tests/arguments/strict-osr-shadowed-args.js b/js/src/jit-test/tests/arguments/strict-osr-shadowed-args.js new file mode 100644 index 0000000000..5c193b99f6 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-osr-shadowed-args.js @@ -0,0 +1,13 @@ + +"use strict"; + +function loop(a) { + a = arguments.length; + var result = 0; + for (var i = 0; i < 5000; i++) { + result += a; + } + return result; +} + +assertEq(loop(11), 5000); diff --git a/js/src/jit-test/tests/arguments/testDelArg1.js b/js/src/jit-test/tests/arguments/testDelArg1.js new file mode 100644 index 0000000000..a6b5eee326 --- /dev/null +++ b/js/src/jit-test/tests/arguments/testDelArg1.js @@ -0,0 +1,13 @@ +function f(x,y,z) { + z = 9; + delete arguments[2]; + assertEq(arguments[2], undefined); + o = arguments; + assertEq(o[2], undefined); + assertEq(o[2] == undefined, true); +} + +for (var i = 0; i < 10; ++i) { + print(i); + f(1,2,3) +} diff --git a/js/src/jit-test/tests/arguments/testDelArg2.js b/js/src/jit-test/tests/arguments/testDelArg2.js new file mode 100644 index 0000000000..09fcf1f57d --- /dev/null +++ b/js/src/jit-test/tests/arguments/testDelArg2.js @@ -0,0 +1,13 @@ +function f(del) { + o = arguments; + if (del) + delete o[2]; + for (var i = 0; i < 10; ++i) + assertEq(o[2] == undefined, del); +} + +// record without arg deleted +f(false, 1,2,3,4); + +// run with arg deleted +f(true, 1,2,3,4); diff --git a/js/src/jit-test/tests/arguments/testDelArg3.js b/js/src/jit-test/tests/arguments/testDelArg3.js new file mode 100644 index 0000000000..4931870bbc --- /dev/null +++ b/js/src/jit-test/tests/arguments/testDelArg3.js @@ -0,0 +1,42 @@ +function assertGood(x) { + assertEq(x, "good"); +} + +(function() { + var a = arguments; + return function() { + assertGood.apply(null, a); + } +})("good")(); + +(function() { + var a = arguments; + return function() { + a[0] = "good"; + assertGood.apply(null, a); + } +})("bad")(); + +Object.prototype[0] = "good"; + +(function() { + var a = arguments; + return function() { + delete a[0]; + assertGood.apply(null, a); + } +})("bad")(); + +delete Object.prototype[0]; + +function assertUndefined(x) { + assertEq(x, undefined); +} + +(function() { + var a = arguments; + return function() { + a[0] = "bad"; + assertUndefined.apply(null, a); + } +})()(); diff --git a/js/src/jit-test/tests/arguments/testDelArg3Strict.js b/js/src/jit-test/tests/arguments/testDelArg3Strict.js new file mode 100644 index 0000000000..77d247a4d8 --- /dev/null +++ b/js/src/jit-test/tests/arguments/testDelArg3Strict.js @@ -0,0 +1,44 @@ +"use strict"; + +function assertGood(x) { + assertEq(x, "good"); +} + +(function() { + var a = arguments; + return function() { + assertGood.apply(null, a); + } +})("good")(); + +(function() { + var a = arguments; + return function() { + a[0] = "good"; + assertGood.apply(null, a); + } +})("bad")(); + +Object.prototype[0] = "good"; + +(function() { + var a = arguments; + return function() { + delete a[0]; + assertGood.apply(null, a); + } +})("bad")(); + +delete Object.prototype[0]; + +function assertUndefined(x) { + assertEq(x, undefined); +} + +(function() { + var a = arguments; + return function() { + a[0] = "bad"; + assertUndefined.apply(null, a); + } +})()(); diff --git a/js/src/jit-test/tests/arrays/apply-optimization.js b/js/src/jit-test/tests/arrays/apply-optimization.js new file mode 100644 index 0000000000..fc62da910f --- /dev/null +++ b/js/src/jit-test/tests/arrays/apply-optimization.js @@ -0,0 +1,58 @@ +function make(k) { + var a = new Array(k); + for ( let i=0 ; i < k ; i++ ) + a[i] = {} + return a; +} + +function g() { + return arguments.length; +} + +function f(a) { + var sum = 0; + for ( let i=0 ; i < 1000 ; i++ ) + sum += g.apply(null, a); + return sum; +} + +function F2() { + var sum = 0; + for ( let i=0 ; i < 1000 ; i++ ) + sum += g.apply(null, arguments); + return sum; +} + +function F(a) { + return F2.apply(null, a); +} + +function time(k, t) { + var then = Date.now(); + assertEq(t(), 1000*k); + var now = Date.now(); + return now - then; +} + +function p(v) { + // Uncomment to see timings + // print(v); +} + +f(make(200)); + +// There is currently a cutoff after 375 where we bailout in order to avoid +// handling very large stack frames. This slows the operation down by a factor +// of 100 or so. + +p(time(374, () => f(make(374)))); +p(time(375, () => f(make(375)))); +p(time(376, () => f(make(376)))); +p(time(377, () => f(make(377)))); + +F(make(200)); + +p(time(374, () => F(make(374)))); +p(time(375, () => F(make(375)))); +p(time(376, () => F(make(376)))); +p(time(377, () => F(make(377)))); diff --git a/js/src/jit-test/tests/arrays/bug-1811789.js b/js/src/jit-test/tests/arrays/bug-1811789.js new file mode 100644 index 0000000000..8d1cb8b0e7 --- /dev/null +++ b/js/src/jit-test/tests/arrays/bug-1811789.js @@ -0,0 +1,14 @@ +// |jit-test| + +load(libdir + "asserts.js"); + +function f5() { } + +function f0() { + const v15 = new Uint8Array(); + f5 &&= v15; + const v17 = new Uint8Array(); + const v16 = wrapWithProto(v17, f5); + v16.with(); +} +assertThrowsInstanceOf(() => f0(), RangeError); diff --git a/js/src/jit-test/tests/arrays/bug1423173.js b/js/src/jit-test/tests/arrays/bug1423173.js new file mode 100644 index 0000000000..38e584ce36 --- /dev/null +++ b/js/src/jit-test/tests/arrays/bug1423173.js @@ -0,0 +1,13 @@ +// |jit-test| --baseline-eager +Array.prototype.push(1); +Object.freeze([].__proto__); +var x = []; +var c = 0; +for (var j = 0; j < 5; ++j) { + try { + x.push(function() {}); + } catch (e) { + c++; + } +} +assertEq(c, j); diff --git a/js/src/jit-test/tests/arrays/bug1673221.js b/js/src/jit-test/tests/arrays/bug1673221.js new file mode 100644 index 0000000000..497c4befec --- /dev/null +++ b/js/src/jit-test/tests/arrays/bug1673221.js @@ -0,0 +1,5 @@ +let x = [7]; +x.splice(0, {valueOf() { x.length = 2; return 0; }}, 5); +assertEq(x.length, 2); +assertEq(x[0], 5); +assertEq(x[1], 7); diff --git a/js/src/jit-test/tests/arrays/bug1693328.js b/js/src/jit-test/tests/arrays/bug1693328.js new file mode 100644 index 0000000000..2494dbe2b0 --- /dev/null +++ b/js/src/jit-test/tests/arrays/bug1693328.js @@ -0,0 +1,12 @@ +function bar() {} + +function foo() { + const v2 = [0,0]; + v2[16777217] = "a"; + v2.length = 2; + bar(...v2); +} + +for (var i = 0; i < 100; i++) { + foo(); +} diff --git a/js/src/jit-test/tests/arrays/change-array-by-copy.js b/js/src/jit-test/tests/arrays/change-array-by-copy.js new file mode 100644 index 0000000000..7b4e5fa28a --- /dev/null +++ b/js/src/jit-test/tests/arrays/change-array-by-copy.js @@ -0,0 +1,106 @@ +// |jit-test| + +load(libdir + 'array-compare.js'); +load(libdir + "asserts.js"); + +var sequence = [1, 2, 3]; +let reversedSequence = sequence.toReversed(); +assertEq(arraysEqual(sequence, [1, 2, 3]), true); +assertEq(arraysEqual(reversedSequence, [3, 2, 1]), true); + +sequence = [87, 3, 5, 888, 321, 42]; +var sortedSequence = sequence.toSorted((x, y) => (x >= y)); +assertEq(arraysEqual(sequence, [87, 3, 5, 888, 321, 42]), true); +assertEq(arraysEqual(sortedSequence, [3, 5, 42, 87, 321, 888]), true); + +sequence = ["the", "quick", "fox", "jumped", "over", "the", "lazy", "dog"]; +sortedSequence = sequence.toSorted(); +assertEq(arraysEqual(sequence, ["the", "quick", "fox", "jumped", "over", "the", "lazy", "dog"]), true); +assertEq(arraysEqual(sortedSequence, ["dog", "fox", "jumped", "lazy", "over", "quick", "the", "the"]), true); + +/* Test that the correct exception is thrown with a + non-function comparefn argument */ +assertThrowsInstanceOf(() => sequence.toSorted([1, 2, 3]), TypeError); + +/* toSpliced */ +/* examples from: + https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice */ + +function unchanged(a) { + assertEq(arraysEqual(a, ['angel', 'clown', 'mandarin', 'sturgeon']), true); +} + +// Remove no elements before index 2, insert "drum" +let myFish = ['angel', 'clown', 'mandarin', 'sturgeon'] +var myFishSpliced = myFish.toSpliced(2, 0, 'drum') +unchanged(myFish); +assertEq(arraysEqual(myFishSpliced, ['angel', 'clown', 'drum', 'mandarin', 'sturgeon']), true); + + +// Remove no elements before index 2, insert "drum" and "guitar" +var myFishSpliced = myFish.toSpliced(2, 0, 'drum', 'guitar'); +unchanged(myFish); +assertEq(arraysEqual(myFishSpliced, ['angel', 'clown', 'drum', 'guitar', 'mandarin', 'sturgeon']), true); + +// Remove 1 element at index 3 +let myFish1 = ['angel', 'clown', 'drum', 'mandarin', 'sturgeon'] +myFishSpliced = myFish1.toSpliced(3, 1); +assertEq(arraysEqual(myFish1, ['angel', 'clown', 'drum', 'mandarin', 'sturgeon']), true); +assertEq(arraysEqual(myFishSpliced, ['angel', 'clown', 'drum', 'sturgeon']), true); + +// Remove 1 element at index 2, and insert 'trumpet' +let myFish2 = ['angel', 'clown', 'drum', 'sturgeon'] +myFishSpliced = myFish2.toSpliced(2, 1, 'trumpet'); +assertEq(arraysEqual(myFish2, ['angel', 'clown', 'drum', 'sturgeon']), true); +assertEq(arraysEqual(myFishSpliced, ['angel', 'clown', 'trumpet', 'sturgeon']), true); + +// Remove 2 elements at index 0, and insert 'parrot', 'anemone', and 'blue' +let myFish3 = ['angel', 'clown', 'trumpet', 'sturgeon'] +myFishSpliced = myFish3.toSpliced(0, 2, 'parrot', 'anemone', 'blue'); +assertEq(arraysEqual(myFish3, ['angel', 'clown', 'trumpet', 'sturgeon']), true); +assertEq(arraysEqual(myFishSpliced, ['parrot', 'anemone', 'blue', 'trumpet', 'sturgeon']), true); + +// Remove 2 elements, starting at index 2 +let myFish4 = ['parrot', 'anemone', 'blue', 'trumpet', 'sturgeon'] +myFishSpliced = myFish4.toSpliced(2, 2); +assertEq(arraysEqual(myFish4, ['parrot', 'anemone', 'blue', 'trumpet', 'sturgeon']), true); +assertEq(arraysEqual(myFishSpliced, ['parrot', 'anemone', 'sturgeon']), true); + +// Remove 1 element from index -2 +myFishSpliced = myFish.toSpliced(-2, 1); +unchanged(myFish); +assertEq(arraysEqual(myFishSpliced, ['angel', 'clown', 'sturgeon']), true); + +// Remove all elements, starting from index 2 +myFishSpliced = myFish.toSpliced(2); +unchanged(myFish); +assertEq(arraysEqual(myFishSpliced, ['angel', 'clown']), true); + +/* with */ +sequence = [1, 2, 3]; +let seq_with = sequence.with(1, 42); +assertEq(arraysEqual(sequence, [1, 2, 3]), true); +assertEq(arraysEqual(seq_with, [1, 42, 3]), true); +assertEq(arraysEqual(sequence.with(-0, 42), [42, 2, 3]), true); + +/* false/true => index 0/1 */ +assertEq(arraysEqual(sequence.with(false, 42), [42, 2, 3]), true); +assertEq(arraysEqual(sequence.with(true, 42), [1, 42, 3]), true); + +/* null => 0 */ +assertEq(arraysEqual(sequence.with(null, 42), [42, 2, 3]), true); +/* [] => 0 */ +assertEq(arraysEqual(sequence.with([], 42), [42, 2, 3]), true); + +assertEq(arraysEqual(sequence.with("2", 42), [1, 2, 42]), true); + +/* Non-numeric indices => 0 */ +assertEq(arraysEqual(sequence.with("monkeys", 42), [42, 2, 3]), true); +assertEq(arraysEqual(sequence.with(undefined, 42), [42, 2, 3]), true); +assertEq(arraysEqual(sequence.with(function() {}, 42), [42, 2, 3]), true); + +assertThrowsInstanceOf(() => sequence.with(3, 42), RangeError); +assertThrowsInstanceOf(() => sequence.with(5, 42), RangeError); +assertThrowsInstanceOf(() => sequence.with(-10, 42), RangeError); +assertThrowsInstanceOf(() => sequence.with(Infinity, 42), RangeError); + diff --git a/js/src/jit-test/tests/arrays/defineProperty-redundant.js b/js/src/jit-test/tests/arrays/defineProperty-redundant.js new file mode 100644 index 0000000000..7e46ffc08a --- /dev/null +++ b/js/src/jit-test/tests/arrays/defineProperty-redundant.js @@ -0,0 +1,10 @@ +var array = [123]; +Object.freeze(array); +Object.defineProperty(array, 0, {}); +Object.defineProperty(array, 0, {abc: 1}); +Object.defineProperty(array, 0, {value: 123}); +Object.defineProperty(array, 0, {writable: false}); +Object.defineProperty(array, 0, {enumerable: true}); +Object.defineProperty(array, 0, {configurable: false}); +Object.defineProperty(array, 0, {value: 123, writable: false, + enumerable: true, configurable: false}); diff --git a/js/src/jit-test/tests/arrays/fillwithundefined-length-nonwriteable.js b/js/src/jit-test/tests/arrays/fillwithundefined-length-nonwriteable.js new file mode 100644 index 0000000000..852d84116c --- /dev/null +++ b/js/src/jit-test/tests/arrays/fillwithundefined-length-nonwriteable.js @@ -0,0 +1,16 @@ +var called = false; +var a = [/* hole */, undefined, { + toString() { + if (!called) { + called = true; + a.length = 3; + Object.defineProperty(a, "length", {writable:false}); + } + return 0; + } +}, 0]; +a.sort(); + +assertEq(a.length, 3); +assertEq(a[1], 0); +assertEq(a[2], undefined); diff --git a/js/src/jit-test/tests/arrays/from-async-oom.js b/js/src/jit-test/tests/arrays/from-async-oom.js new file mode 100644 index 0000000000..a68fd33299 --- /dev/null +++ b/js/src/jit-test/tests/arrays/from-async-oom.js @@ -0,0 +1,26 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// Basic Smoke Test +async function* asyncGen(n) { + for (let i = 0; i < n; i++) { + yield i * 2; + } +} + +function test() { + Array.fromAsync(asyncGen(4)).then((x) => { + assertEq(Array.isArray(x), true); + assertEq(x.length, 4); + assertEq(x[0], 0); + assertEq(x[1], 2); + assertEq(x[2], 4); + assertEq(x[3], 6); + done = true; + } + ); + + drainJobQueue(); +} + +oomTest(test); + diff --git a/js/src/jit-test/tests/arrays/ion-pop-denseinitializedlength-less-than-length.js b/js/src/jit-test/tests/arrays/ion-pop-denseinitializedlength-less-than-length.js new file mode 100644 index 0000000000..9f4bda0236 --- /dev/null +++ b/js/src/jit-test/tests/arrays/ion-pop-denseinitializedlength-less-than-length.js @@ -0,0 +1,49 @@ +load(libdir + "asserts.js"); + +function f(arr) +{ + arr.pop(); +} + +var N = 100; + +function test() +{ + // Create an array of arrays, to be iterated over for [].pop-calling. We + // can't just loop on pop on a single array with non-writable length because + // pop throws when called on an array with non-writable length. + var arrs = []; + for (var i = 0; i < N; i++) + arrs.push([0, 1, 2, 3]); + + // Test Ion-pop where dense initialized length < length. + var a = [0, 1, 2]; + a.length = 4; + + arrs.push(a); + + for (var i = 0, sz = arrs.length; i < sz; i++) + f(arrs[i]); + + return arrs; +} + +var arrs = test(); +assertEq(arrs.length, N + 1); +for (var i = 0; i < N; i++) +{ + assertEq(arrs[i].length, 3, "unexpected length for arrs[" + i + "]"); + assertEq(arrs[i][0], 0, "bad element for arrs[" + i + "][0]"); + assertEq(arrs[i][1], 1, "bad element for arrs[" + i + "][1]"); + assertEq(arrs[i][2], 2, "bad element for arrs[" + i + "][2]"); + assertEq(3 in arrs[i], false, "shouldn't be a third element"); + assertEq(arrs[i][3], undefined); +} + +var a = arrs[N]; +assertEq(a.length, 3, "unexpected length for arrs[" + i + "]"); +assertEq(a[0], 0, "bad element for arrs[" + i + "][0]"); +assertEq(a[1], 1, "bad element for arrs[" + i + "][1]"); +assertEq(a[2], 2, "bad element for arrs[" + i + "][2]"); +assertEq(3 in a, false, "shouldn't be a third element"); +assertEq(a[3], undefined); diff --git a/js/src/jit-test/tests/arrays/ion-pop-nonwritable-length.js b/js/src/jit-test/tests/arrays/ion-pop-nonwritable-length.js new file mode 100644 index 0000000000..acecd0a2c0 --- /dev/null +++ b/js/src/jit-test/tests/arrays/ion-pop-nonwritable-length.js @@ -0,0 +1,48 @@ +load(libdir + "asserts.js"); + +function f(arr) +{ + arr.pop(); +} + +var N = 100; + +function test(out) +{ + // Create an array of arrays, to be iterated over for [].pop-calling. We + // can't just loop on pop on a single array with non-writable length because + // pop throws when called on an array with non-writable length. + var arrs = out.arrs = []; + for (var i = 0; i < N; i++) + arrs.push([0, 1, 2, 3]); + + // Use a much-greater capacity than the eventual non-writable length. + var a = [0, 1, 2, 3, 4, 5, 6, 7]; + Object.defineProperty(a, "length", { writable: false, value: 4 }); + + arrs.push(a); + + for (var i = 0, sz = arrs.length; i < sz; i++) + f(arrs[i]); +} + +var obj = {}; + +assertThrowsInstanceOf(function() { test(obj); }, TypeError); + +var arrs = obj.arrs; +assertEq(arrs.length, N + 1); +for (var i = 0; i < N; i++) +{ + assertEq(arrs[i].length, 3, "unexpected length for arrs[" + i + "]"); + assertEq(arrs[i][0], 0, "bad element for arrs[" + i + "][0]"); + assertEq(arrs[i][1], 1, "bad element for arrs[" + i + "][1]"); + assertEq(arrs[i][2], 2, "bad element for arrs[" + i + "][2]"); + assertEq(3 in arrs[i], false, "shouldn't be a third element"); + assertEq(arrs[i][3], undefined); +} + +var a = arrs[N]; +assertEq(a.hasOwnProperty(3), false, "should have been deleted before throw"); +assertEq(a[3], undefined); +assertEq(a.length, 4, "length shouldn't have been changed"); diff --git a/js/src/jit-test/tests/arrays/ion-push-nonwritable-length.js b/js/src/jit-test/tests/arrays/ion-push-nonwritable-length.js new file mode 100644 index 0000000000..5149103169 --- /dev/null +++ b/js/src/jit-test/tests/arrays/ion-push-nonwritable-length.js @@ -0,0 +1,61 @@ +function f(arr) +{ + assertEq(arr.push(4), 5); // if it doesn't throw :-) +} + +function test(out) +{ + // Create an array of arrays, to be iterated over for [].push-calling. We + // can't just loop on push on a single array with non-writable length because + // push throws when called on an array with non-writable length. + var arrs = out.arrs = []; + for (var i = 0; i < 100; i++) + arrs.push([0, 1, 2, 3]); + + // Use a much-greater capacity than the eventual non-writable length, so that + // the inline-push will work. + var a = [0, 1, 2, 3, 4, 5, 6, 7]; + Object.defineProperty(a, "length", { writable: false, value: 4 }); + + arrs.push(a); + + for (var i = 0, sz = arrs.length; i < sz; i++) + { + var arr = arrs[i]; + f(arr); + } +} + +var obj = {}; +var a, arrs; + +try +{ + test(obj); + throw new Error("didn't throw!"); +} +catch (e) +{ + assertEq(e instanceof TypeError, true, "expected TypeError, got " + e); + + arrs = obj.arrs; + assertEq(arrs.length, 101); + for (var i = 0; i < 100; i++) + { + assertEq(arrs[i].length, 5, "unexpected length for arrs[" + i + "]"); + assertEq(arrs[i][0], 0, "bad element for arrs[" + i + "][0]"); + assertEq(arrs[i][1], 1, "bad element for arrs[" + i + "][1]"); + assertEq(arrs[i][2], 2, "bad element for arrs[" + i + "][2]"); + assertEq(arrs[i][3], 3, "bad element for arrs[" + i + "][3]"); + assertEq(arrs[i][4], 4, "bad element for arrs[" + i + "][4]"); + } + + a = arrs[100]; + assertEq(a[0], 0, "bad element for a[" + i + "]"); + assertEq(a[1], 1, "bad element for a[" + i + "]"); + assertEq(a[2], 2, "bad element for a[" + i + "]"); + assertEq(a[3], 3, "bad element for a[" + i + "]"); + assertEq(a.hasOwnProperty(4), false, "element addition should have thrown"); + assertEq(a[4], undefined); + assertEq(a.length, 4, "length shouldn't have been changed"); +} diff --git a/js/src/jit-test/tests/arrays/ion-shift-nonwritable-length.js b/js/src/jit-test/tests/arrays/ion-shift-nonwritable-length.js new file mode 100644 index 0000000000..119271f201 --- /dev/null +++ b/js/src/jit-test/tests/arrays/ion-shift-nonwritable-length.js @@ -0,0 +1,59 @@ +function f(arr) +{ + assertEq(arr.shift(), 0); +} + +function test(out) +{ + // Create an array of arrays, to be iterated over for [].shift-calling. We + // can't just loop on shift on a single array with non-writable length because + // shift throws when called on an array with non-writable length. + var arrs = out.arrs = []; + for (var i = 0; i < 100; i++) + arrs.push([0, 1, 2, 3]); + + // Use a much-greater capacity than the eventual non-writable length. + var a = [0, 1, 2, 3, 4, 5, 6, 7]; + Object.defineProperty(a, "length", { writable: false, value: 4 }); + + arrs.push(a); + + for (var i = 0, sz = arrs.length; i < sz; i++) + { + var arr = arrs[i]; + f(arr); + } +} + +var obj = {}; +var a, arrs; + +try +{ + test(obj); + throw new Error("didn't throw!"); +} +catch (e) +{ + assertEq(e instanceof TypeError, true, "expected TypeError, got " + e); + + arrs = obj.arrs; + assertEq(arrs.length, 101); + for (var i = 0; i < 100; i++) + { + assertEq(arrs[i].length, 3, "unexpected length for arrs[" + i + "]"); + assertEq(arrs[i][0], 1, "bad element for arrs[" + i + "][0]"); + assertEq(arrs[i][1], 2, "bad element for arrs[" + i + "][1]"); + assertEq(arrs[i][2], 3, "bad element for arrs[" + i + "][2]"); + assertEq(3 in arrs[i], false, "shouldn't be a third element"); + assertEq(arrs[i][3], undefined); + } + + a = arrs[100]; + assertEq(a[0], 1, "bad element for a[" + i + "]"); + assertEq(a[1], 2, "bad element for a[" + i + "]"); + assertEq(a[2], 3, "bad element for a[" + i + "]"); + assertEq(a.hasOwnProperty(3), false, "should have been deleted before throw"); + assertEq(a[3], undefined); + assertEq(a.length, 4, "length shouldn't have been changed"); +} diff --git a/js/src/jit-test/tests/arrays/length-set-after-define-nonconfigurable.js b/js/src/jit-test/tests/arrays/length-set-after-define-nonconfigurable.js new file mode 100644 index 0000000000..3841540565 --- /dev/null +++ b/js/src/jit-test/tests/arrays/length-set-after-define-nonconfigurable.js @@ -0,0 +1,7 @@ +var arr = [1]; +Object.defineProperty(arr, 1, { value: undefined, configurable: false }); + +// no particular reason for 9 -- just enough to trigger property-cache code, +// maybe start JITting a little +for (var y = 0; y < 9; y++) + arr.length = 1; diff --git a/js/src/jit-test/tests/arrays/length-set-after-has-sparse.js b/js/src/jit-test/tests/arrays/length-set-after-has-sparse.js new file mode 100644 index 0000000000..44e662661b --- /dev/null +++ b/js/src/jit-test/tests/arrays/length-set-after-has-sparse.js @@ -0,0 +1,9 @@ +var arr = []; +Object.defineProperty(arr, 4, { + configurable: true, + enumerable: false, + writable: false, + value: undefined +}); +for (var y = 0; y < 2; y++) + arr.length = 0; diff --git a/js/src/jit-test/tests/arrays/new-array-int-undefined-args.js b/js/src/jit-test/tests/arrays/new-array-int-undefined-args.js new file mode 100644 index 0000000000..56ac8e64d4 --- /dev/null +++ b/js/src/jit-test/tests/arrays/new-array-int-undefined-args.js @@ -0,0 +1,2 @@ +for (var i = 0; i < 1e4; i++) + assertEq(new Array(0, undefined).length, 2, "bad, i: " + i); diff --git a/js/src/jit-test/tests/arrays/new-array-undefined-undefined-more-args-1.js b/js/src/jit-test/tests/arrays/new-array-undefined-undefined-more-args-1.js new file mode 100644 index 0000000000..e4a9e1a88c --- /dev/null +++ b/js/src/jit-test/tests/arrays/new-array-undefined-undefined-more-args-1.js @@ -0,0 +1,6 @@ +for (var i = 0; i < 1e4; i++) +{ + assertEq(typeof new Array(undefined, undefined, 1, 2, 3, 4).sort()[0], + "number", + "bad, i: " + i); +} diff --git a/js/src/jit-test/tests/arrays/new-array-undefined-undefined-more-args-2.js b/js/src/jit-test/tests/arrays/new-array-undefined-undefined-more-args-2.js new file mode 100644 index 0000000000..cf81504938 --- /dev/null +++ b/js/src/jit-test/tests/arrays/new-array-undefined-undefined-more-args-2.js @@ -0,0 +1,6 @@ +for (var i = 0; i < 1e4; i++) +{ + assertEq(new Array(undefined, undefined, 1, 2, 3, 4).length, + 6, + "bad, i: " + i); +} diff --git a/js/src/jit-test/tests/arrays/nonwritable-length-grow-capacity.js b/js/src/jit-test/tests/arrays/nonwritable-length-grow-capacity.js new file mode 100644 index 0000000000..160689bea0 --- /dev/null +++ b/js/src/jit-test/tests/arrays/nonwritable-length-grow-capacity.js @@ -0,0 +1,2 @@ +var arr = Object.defineProperty([], "length", { writable: false, value: 12 }); +arr[11] = true; diff --git a/js/src/jit-test/tests/arrays/pop-nonarray-nonwritable-length.js b/js/src/jit-test/tests/arrays/pop-nonarray-nonwritable-length.js new file mode 100644 index 0000000000..22a5b706b5 --- /dev/null +++ b/js/src/jit-test/tests/arrays/pop-nonarray-nonwritable-length.js @@ -0,0 +1,13 @@ +// Array.prototype.pop does a strict assignment to this.length even if the +// caller is nonstrict. Bug 886087. + +load(libdir + "asserts.js"); + +// obj.length is read-only +var obj = {pop: [].pop, 0: "zero"}; +Object.defineProperty(obj, "length", {configurable: true, value: 1, writable: false}); +assertThrowsInstanceOf(() => obj.pop(), TypeError); + +// obj.length has only a getter +obj = {pop: [].pop, 0: "zero", get length() { return 1; }}; +assertThrowsInstanceOf(() => obj.pop(), TypeError); diff --git a/js/src/jit-test/tests/arrays/pop-nonwritable-length-denseinitializedlength-below-length.js b/js/src/jit-test/tests/arrays/pop-nonwritable-length-denseinitializedlength-below-length.js new file mode 100644 index 0000000000..9330f775ba --- /dev/null +++ b/js/src/jit-test/tests/arrays/pop-nonwritable-length-denseinitializedlength-below-length.js @@ -0,0 +1,49 @@ +load(libdir + "asserts.js"); + +function f(arr) +{ + assertEq(arr.pop(), undefined); // if it doesn't throw +} + +var N = 100; + +function basic(out) +{ + // Create an array of arrays, to be iterated over for [].pop-calling. We + // can't just loop on pop on a single array with non-writable length because + // pop throws when called on an array with non-writable length. + var arrs = out.arrs = []; + for (var i = 0; i < N; i++) + { + var arr = [0, 1, 2, 3, 4]; + arr.length = 6; + arrs.push(arr); + } + + var a = [0, 1, 2, 3, 4]; + Object.defineProperty(a, "length", { writable: false, value: 6 }); + + arrs.push(a); + + for (var i = 0, sz = arrs.length; i < sz; i++) + f(arrs[i]); +} + +var obj = {}; +var arrs, a; + +assertThrowsInstanceOf(function() { basic(obj); }, TypeError); + +var arrs = obj.arrs; +assertEq(arrs.length, N + 1); +for (var i = 0; i < N; i++) +{ + assertEq(arrs[i].length, 5, "unexpected length for arrs[" + i + "]"); + assertEq(arrs[i].hasOwnProperty(5), false, + "element not deleted for arrs[" + i + "]"); +} + +var a = arrs[N]; +assertEq(a.hasOwnProperty(5), false); +assertEq(a[5], undefined); +assertEq(a.length, 6); diff --git a/js/src/jit-test/tests/arrays/push-densely-loopy-nonwritable-length.js b/js/src/jit-test/tests/arrays/push-densely-loopy-nonwritable-length.js new file mode 100644 index 0000000000..e09ed09645 --- /dev/null +++ b/js/src/jit-test/tests/arrays/push-densely-loopy-nonwritable-length.js @@ -0,0 +1,56 @@ +// Force recognition of a known-constant. +var push = Array.prototype.push; + +function f(arr) +{ + // Push an actual constant to trigger JIT-inlining of the effect of the push. + push.call(arr, 99); +} + +function basic(out) +{ + // Create an array of arrays, to be iterated over for [].push-calling. We + // can't just loop on push on a single array with non-writable length because + // push throws when called on an array with non-writable length. + var arrs = out.arrs = []; + for (var i = 0; i < 100; i++) + arrs.push([]); + + // Use a much-greater capacity than the eventual non-writable length. + var a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + Object.defineProperty(a, "length", { writable: false, value: 6 }); + + arrs.push(a); + + for (var i = 0, sz = arrs.length; i < sz; i++) + { + var arr = arrs[i]; + f(arr); + } +} + +var obj = {}; +var arrs, a; + +try +{ + basic(obj); + throw new Error("didn't throw!"); +} +catch (e) +{ + assertEq(e instanceof TypeError, true, "expected TypeError, got " + e); + + arrs = obj.arrs; + assertEq(arrs.length, 101); + for (var i = 0; i < 100; i++) + { + assertEq(arrs[i].length, 1, "unexpected length for arrs[" + i + "]"); + assertEq(arrs[i][0], 99, "bad element for arrs[" + i + "]"); + } + + a = arrs[100]; + assertEq(a.hasOwnProperty(6), false); + assertEq(a[6], undefined); + assertEq(a.length, 6); +} diff --git a/js/src/jit-test/tests/arrays/push-densely-nonwritable-length.js b/js/src/jit-test/tests/arrays/push-densely-nonwritable-length.js new file mode 100644 index 0000000000..9c26661cb7 --- /dev/null +++ b/js/src/jit-test/tests/arrays/push-densely-nonwritable-length.js @@ -0,0 +1,31 @@ +function f(arr, v) +{ + arr.push(v); +} + +function basic(out) +{ + // Use a much-greater capacity than the eventual non-writable length. + var a = out.a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + Object.defineProperty(a, "length", { writable: false, value: 6 }); + + f(a, 99); +} + +var obj = {}; +var a; + +try +{ + basic(obj); + throw new Error("didn't throw!"); +} +catch (e) +{ + assertEq(e instanceof TypeError, true, "expected TypeError, got " + e); + + a = obj.a; + assertEq(a.hasOwnProperty(6), false); + assertEq(a[6], undefined); + assertEq(a.length, 6); +} diff --git a/js/src/jit-test/tests/arrays/push-slowly-loopy-nonwritable-length.js b/js/src/jit-test/tests/arrays/push-slowly-loopy-nonwritable-length.js new file mode 100644 index 0000000000..79d8587153 --- /dev/null +++ b/js/src/jit-test/tests/arrays/push-slowly-loopy-nonwritable-length.js @@ -0,0 +1,51 @@ +load(libdir + "asserts.js"); + +function f(arr, v1, v2) +{ + // Ensure array_push_slowly is called by passing more than one argument. + arr.push(v1, v2); +} + +var N = 100; + +function test(out) +{ + // Create an array of arrays, to be iterated over for [].push-calling. We + // can't just loop on push on a single array with non-writable length because + // push throws when called on an array with non-writable length. + var arrs = out.arrs = []; + for (var i = 0; i < N; i++) + arrs.push([]); + + // Use a much-greater capacity than the eventual non-writable length. + var a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + Object.defineProperty(a, "length", { writable: false, value: 6 }); + + arrs.push(a); + + for (var i = 0, sz = arrs.length; i < sz; i++) + { + var arr = arrs[i]; + f(arr, 8675309, 3141592); + } +} + +var obj = {}; + +assertThrowsInstanceOf(function() { test(obj); }, TypeError); + +var arrs = obj.arrs; +assertEq(arrs.length, N + 1); +for (var i = 0; i < N; i++) +{ + assertEq(arrs[i].length, 2, "unexpected length for arrs[" + i + "]"); + assertEq(arrs[i][0], 8675309, "bad element for arrs[" + i + "][0]"); + assertEq(arrs[i][1], 3141592, "bad element for arrs[" + i + "][1]"); +} + +var a = arrs[N]; +assertEq(a.hasOwnProperty(6), false); +assertEq(a[6], undefined); +assertEq(a.hasOwnProperty(7), false); +assertEq(a[7], undefined); +assertEq(a.length, 6); diff --git a/js/src/jit-test/tests/arrays/push-slowly-nonwritable-length.js b/js/src/jit-test/tests/arrays/push-slowly-nonwritable-length.js new file mode 100644 index 0000000000..9cfc455844 --- /dev/null +++ b/js/src/jit-test/tests/arrays/push-slowly-nonwritable-length.js @@ -0,0 +1,24 @@ +load(libdir + "asserts.js"); + +function f(arr, v1, v2) +{ + // Ensure array_push_slowly is called by passing more than one argument. + arr.push(v1, v2); +} + +function basic() +{ + // Use a much-greater capacity than the eventual non-writable length. + var a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + Object.defineProperty(a, "length", { writable: false, value: 6 }); + + assertThrowsInstanceOf(() => f(a, 8675309, 3141592), TypeError); + + assertEq(a.hasOwnProperty(6), false); + assertEq(a[6], undefined); + assertEq(a.hasOwnProperty(7), false); + assertEq(a[7], undefined); + assertEq(a.length, 6); +} + +basic(); diff --git a/js/src/jit-test/tests/arrays/reverse-frozen.js b/js/src/jit-test/tests/arrays/reverse-frozen.js new file mode 100644 index 0000000000..d2f32b78d2 --- /dev/null +++ b/js/src/jit-test/tests/arrays/reverse-frozen.js @@ -0,0 +1,6 @@ +// |jit-test| error: TypeError + +x = [0]; +x.length = 9; +Object.freeze(x); +x.reverse(); diff --git a/js/src/jit-test/tests/arrays/reverse-nonarray-nonwritable-element.js b/js/src/jit-test/tests/arrays/reverse-nonarray-nonwritable-element.js new file mode 100644 index 0000000000..bca75a96b3 --- /dev/null +++ b/js/src/jit-test/tests/arrays/reverse-nonarray-nonwritable-element.js @@ -0,0 +1,13 @@ +// Array.prototype.reverse does a strict assignment to this.length even if the +// caller is nonstrict. Bug 886087. + +load(libdir + "asserts.js"); + +// obj[1] is read-only +var obj = {0: "zero", length: 2, reverse: [].reverse}; +Object.defineProperty(obj, "1", {configurable: true, value: "one", writable: false}); +assertThrowsInstanceOf(() => obj.reverse(), TypeError); + +// obj[1] has only a getter +Object.defineProperty(obj, "1", {configurable: true, get: () => "one"}); +assertThrowsInstanceOf(() => obj.reverse(), TypeError); diff --git a/js/src/jit-test/tests/arrays/setelem-one-past-nonwritable-length.js b/js/src/jit-test/tests/arrays/setelem-one-past-nonwritable-length.js new file mode 100644 index 0000000000..7ea5971c05 --- /dev/null +++ b/js/src/jit-test/tests/arrays/setelem-one-past-nonwritable-length.js @@ -0,0 +1,20 @@ +function f(arr, i, v) +{ + arr[i] = v; +} + +function test() +{ + // Use a much-greater capacity than the eventual non-writable length. + var a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + Object.defineProperty(a, "length", { writable: false, value: 6 }); + + for (var i = 0; i < 100; i++) + f(a, a.length, i); + + assertEq(a.hasOwnProperty(6), false); + assertEq(a[6], undefined); + assertEq(a.length, 6); +} + +test(); diff --git a/js/src/jit-test/tests/arrays/slice-sparse-getter.js b/js/src/jit-test/tests/arrays/slice-sparse-getter.js new file mode 100644 index 0000000000..9416349ce5 --- /dev/null +++ b/js/src/jit-test/tests/arrays/slice-sparse-getter.js @@ -0,0 +1,12 @@ +// Indexed getters can add new properties that slice should not ignore. +var arr = []; +Object.defineProperty(arr, 10000, {get: function() { + arr[10001] = 4; + return 3; +}}); +arr[10010] = 6; + +var res = arr.slice(8000); +assertEq(res[2000], 3); +assertEq(res[2001], 4); +assertEq(res[2010], 6); diff --git a/js/src/jit-test/tests/arrays/slice.js b/js/src/jit-test/tests/arrays/slice.js new file mode 100644 index 0000000000..ad4f66f633 --- /dev/null +++ b/js/src/jit-test/tests/arrays/slice.js @@ -0,0 +1,37 @@ +let invoked = false; +Object.defineProperty(Array.prototype, '0', {set: function () { + invoked = true; +}}); + +let result = [1, 2, 3].slice(1); +assertEq(invoked, false); + +let proxy = new Proxy({}, { + get: function (target, name, proxy) { + switch (name) { + case "length": + return 2; + case "0": + return 15; + case "1": + // Should not invoke [[Get]] for this hole. + default: + assertEq(false, true); + } + }, + has: function (target, name) { + switch (name) { + case "0": + return true; + case "1": + return false; + default: + assertEq(false, true); + } + } +}) +result = Array.prototype.slice.call(proxy, 0); +assertEq(result.length, 2); +assertEq(0 in result, true); +assertEq(1 in result, false); +assertEq(result[0], 15); diff --git a/js/src/jit-test/tests/arrays/sort-getter-only.js b/js/src/jit-test/tests/arrays/sort-getter-only.js new file mode 100644 index 0000000000..d17e8556d6 --- /dev/null +++ b/js/src/jit-test/tests/arrays/sort-getter-only.js @@ -0,0 +1,29 @@ +// The property assignments in Array.prototype.sort are strict assignments. + +load(libdir + "asserts.js"); + +var a = ["A", , "B", "C", "D"]; +var normalArrayElementDesc = Object.getOwnPropertyDescriptor(a, 0); +var getterDesc = { + get: function () { return "F"; }, + set: undefined, + enumerable: true, + configurable: false +}; +Object.defineProperty(a, 1, getterDesc); + +// a.sort is permitted to try to delete a[1] or to try to assign a[1], but it +// must try one or the other. Either one will fail, throwing a TypeError. +assertThrowsInstanceOf(() => a.sort(), TypeError); + +// a.sort() is not permitted to delete the nonconfigurable property. +assertDeepEq(Object.getOwnPropertyDescriptor(a, 1), getterDesc); + +// The values left in the other elements of a are unspecified; some or all may +// have been deleted. +for (var i = 0; i < a.length; i++) { + if (i !== 1 && a.hasOwnProperty(i)) { + normalArrayElementDesc.value = a[i]; + assertDeepEq(Object.getOwnPropertyDescriptor(a, i), normalArrayElementDesc); + } +} diff --git a/js/src/jit-test/tests/arrays/sort-update-types.js b/js/src/jit-test/tests/arrays/sort-update-types.js new file mode 100644 index 0000000000..ab0063fd49 --- /dev/null +++ b/js/src/jit-test/tests/arrays/sort-update-types.js @@ -0,0 +1,20 @@ +Object.setPrototypeOf(Array.prototype, { + get 0() { + Object.setPrototypeOf(Array.prototype, Object.prototype); + return "159".repeat(5).substring(2, 5); + } +}); + +var array = [ + /*0*/, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, +]; + +array.sort(); + +gc(); + +var r = array[array.length - 1] * 1; +assertEq(r, 915); diff --git a/js/src/jit-test/tests/arrays/species-redefine-getter.js b/js/src/jit-test/tests/arrays/species-redefine-getter.js new file mode 100644 index 0000000000..94ab329c08 --- /dev/null +++ b/js/src/jit-test/tests/arrays/species-redefine-getter.js @@ -0,0 +1,20 @@ +// Ensure the HadGetterSetterChange flag is set. +Object.defineProperty(Array, "foo", {configurable: true, get: function() {}}); +Object.defineProperty(Array, "foo", {configurable: true, get: function() {}}); + +// Initialize ArraySpeciesLookup. +let a = [1, 2, 3]; +for (let i = 0; i < 5; i++) { + assertEq(a.slice().length, 3); +} + +// Redefine the Array[Symbol.species] getter without changing its attributes/shape. +let count = 0; +Object.defineProperty(Array, Symbol.species, + {get: function() { count++; }, enumerable: false, configurable: true}); + +// Ensure ArraySpeciesLookup now deoptimizes and calls the getter. +for (let i = 0; i < 5; i++) { + assertEq(a.slice().length, 3); +} +assertEq(count, 5); diff --git a/js/src/jit-test/tests/arrays/splice-nonwritable-length.js b/js/src/jit-test/tests/arrays/splice-nonwritable-length.js new file mode 100644 index 0000000000..233eb027bc --- /dev/null +++ b/js/src/jit-test/tests/arrays/splice-nonwritable-length.js @@ -0,0 +1,53 @@ +load(libdir + "asserts.js"); + +function f(arr) +{ + assertEq(arr.splice(1, 2, 9, 8, 7, 6).length, 2); // if it doesn't throw :-) +} + +var N = 100; + +function test(out) +{ + // Create an array of arrays, to be iterated over for [].splice-calling. + var arrs = out.arrs = []; + for (var i = 0; i < N; i++) + arrs.push([0, 1, 2, 3]); + + // Use a much-greater capacity than the eventual non-writable length, just for + // variability. + var a = [0, 1, 2, 3, 4, 5, 6, 7]; + Object.defineProperty(a, "length", { writable: false, value: 4 }); + + arrs.push(a); + + for (var i = 0, sz = arrs.length; i < sz; i++) + f(arrs[i]); +} + +var obj = {}; +assertThrowsInstanceOf(function() { test(obj); }, TypeError); + +var arrs = obj.arrs; +assertEq(arrs.length, N + 1); +for (var i = 0; i < N; i++) +{ + assertEq(arrs[i].length, 6, "unexpected length for arrs[" + i + "]"); + assertEq(arrs[i][0], 0, "bad element for arrs[" + i + "][0]"); + assertEq(arrs[i][1], 9, "bad element for arrs[" + i + "][1]"); + assertEq(arrs[i][2], 8, "bad element for arrs[" + i + "][2]"); + assertEq(arrs[i][3], 7, "bad element for arrs[" + i + "][3]"); + assertEq(arrs[i][4], 6, "bad element for arrs[" + i + "][4]"); + assertEq(arrs[i][5], 3, "bad element for arrs[" + i + "][5]"); +} + +var a = arrs[N]; +assertEq(a[0], 0, "bad element for a[0]"); +assertEq(a[1], 1, "bad element for a[1]"); +assertEq(a[2], 2, "bad element for a[2]"); +assertEq(a[3], 3, "bad element for a[3]"); +assertEq(a.hasOwnProperty(4), false, "shouldn't have added any elements"); +assertEq(a[4], undefined); +assertEq(a.hasOwnProperty(5), false, "shouldn't have added any elements"); +assertEq(a[5], undefined); +assertEq(a.length, 4, "length shouldn't have been changed"); diff --git a/js/src/jit-test/tests/arrays/spreadcall-optimization.js b/js/src/jit-test/tests/arrays/spreadcall-optimization.js new file mode 100644 index 0000000000..7273f24a0f --- /dev/null +++ b/js/src/jit-test/tests/arrays/spreadcall-optimization.js @@ -0,0 +1,45 @@ +// Test case adapted from "apply-optimization.js" to test SpreadCall instead of FunApply. + +// Uses fewer iterations than "apply-optimization.js" to keep the overall runtime reasonable. +const iterations = 40; + +function make(k) { + var a = new Array(k); + for ( let i=0 ; i < k ; i++ ) + a[i] = {} + return a; +} + +function g() { + return arguments.length; +} + +function f(a) { + var sum = 0; + for ( let i=0 ; i < iterations ; i++ ) + sum += g(...a); + return sum; +} + +function time(k, t) { + var then = Date.now(); + assertEq(t(), iterations*k); + var now = Date.now(); + return now - then; +} + +function p(v) { + // Uncomment to see timings + // print(v); +} + +f(make(200)); + +// There is currently a cutoff after 375 where we bailout in order to avoid +// handling very large stack frames. This slows the operation down by a factor +// of 100 or so. + +p(time(374, () => f(make(374)))); +p(time(375, () => f(make(375)))); +p(time(376, () => f(make(376)))); +p(time(377, () => f(make(377)))); diff --git a/js/src/jit-test/tests/arrays/spreadnew-optimization.js b/js/src/jit-test/tests/arrays/spreadnew-optimization.js new file mode 100644 index 0000000000..d676bdb753 --- /dev/null +++ b/js/src/jit-test/tests/arrays/spreadnew-optimization.js @@ -0,0 +1,51 @@ +// Test case adapted from "apply-optimization.js" to test SpreadNew instead of FunApply. + +// Uses fewer iterations than "apply-optimization.js" to keep the overall runtime reasonable. +const iterations = 40; + +function make(k) { + var a = new Array(k); + for ( let i=0 ; i < k ; i++ ) + a[i] = {} + return a; +} + +function g() { + // Ensure |new.target| and |this| are correct. + assertEq(new.target, g); + assertEq(typeof this, "object"); + assertEq(Object.getPrototypeOf(this), g.prototype); + + // Returns a Number object, because constructor calls need to return an object! + return new Number(arguments.length); +} + +function f(a) { + var sum = 0; + for ( let i=0 ; i < iterations ; i++ ) + sum += new g(...a); + return sum; +} + +function time(k, t) { + var then = Date.now(); + assertEq(t(), iterations*k); + var now = Date.now(); + return now - then; +} + +function p(v) { + // Uncomment to see timings + // print(v); +} + +f(make(200)); + +// There is currently a cutoff after 375 where we bailout in order to avoid +// handling very large stack frames. This slows the operation down by a factor +// of 100 or so. + +p(time(374, () => f(make(374)))); +p(time(375, () => f(make(375)))); +p(time(376, () => f(make(376)))); +p(time(377, () => f(make(377)))); diff --git a/js/src/jit-test/tests/arrays/spreadsupercall-optimization.js b/js/src/jit-test/tests/arrays/spreadsupercall-optimization.js new file mode 100644 index 0000000000..7c37d79930 --- /dev/null +++ b/js/src/jit-test/tests/arrays/spreadsupercall-optimization.js @@ -0,0 +1,59 @@ +// Test case adapted from "apply-optimization.js" to test SpreadNew instead of FunApply. + +// Uses fewer iterations than "apply-optimization.js" to keep the overall runtime reasonable. +const iterations = 40; + +function make(k) { + var a = new Array(k); + for ( let i=0 ; i < k ; i++ ) + a[i] = {} + return a; +} + +class Base { + constructor() { + // Ensure |new.target| and |this| are correct. + assertEq(new.target, g); + assertEq(typeof this, "object"); + assertEq(Object.getPrototypeOf(this), g.prototype); + + // Returns a Number object, because constructor calls need to return an object! + return new Number(arguments.length); + } +} + +class g extends Base { + constructor(...args) { + super(...args); + } +} + +function f(a) { + var sum = 0; + for ( let i=0 ; i < iterations ; i++ ) + sum += new g(...a); + return sum; +} + +function time(k, t) { + var then = Date.now(); + assertEq(t(), iterations*k); + var now = Date.now(); + return now - then; +} + +function p(v) { + // Uncomment to see timings + // print(v); +} + +f(make(200)); + +// There is currently a cutoff after 375 where we bailout in order to avoid +// handling very large stack frames. This slows the operation down by a factor +// of 100 or so. + +p(time(374, () => f(make(374)))); +p(time(375, () => f(make(375)))); +p(time(376, () => f(make(376)))); +p(time(377, () => f(make(377)))); diff --git a/js/src/jit-test/tests/arrays/std_Array-prototype.js b/js/src/jit-test/tests/arrays/std_Array-prototype.js new file mode 100644 index 0000000000..89ebde5d00 --- /dev/null +++ b/js/src/jit-test/tests/arrays/std_Array-prototype.js @@ -0,0 +1,6 @@ +Object.prototype.prototype = {}; +assertEq(Object.getPrototypeOf([].concat()), Array.prototype); +assertEq(Object.getPrototypeOf([].map(x => x)), Array.prototype); +assertEq(Object.getPrototypeOf([].filter(x => x)), Array.prototype); +assertEq(Object.getPrototypeOf([].slice()), Array.prototype); +assertEq(Object.getPrototypeOf([].splice()), Array.prototype); diff --git a/js/src/jit-test/tests/arrays/to-spliced-dense-elements.js b/js/src/jit-test/tests/arrays/to-spliced-dense-elements.js new file mode 100644 index 0000000000..05b2ab8dad --- /dev/null +++ b/js/src/jit-test/tests/arrays/to-spliced-dense-elements.js @@ -0,0 +1,13 @@ +// |jit-test| + +for (let i = 0; i < 1000; ++i) { + let arr = [0]; + let result = arr.toSpliced(0, 0, 1, 2, 3); + assertEq(result.length, 4); +} + +for (let i = 0; i < 1000; ++i) { + let arr = [0]; + let result = arr.toSpliced(1, 0, 1, 2, 3); + assertEq(result.length, 4); +} diff --git a/js/src/jit-test/tests/arrays/too-long-array-splice.js b/js/src/jit-test/tests/arrays/too-long-array-splice.js new file mode 100644 index 0000000000..d691cc929f --- /dev/null +++ b/js/src/jit-test/tests/arrays/too-long-array-splice.js @@ -0,0 +1,10 @@ +// |jit-test| allow-oom +// array.splice should throw if array.length is too large. + +var length = 4294967295; +var array = new Array(length); + +// Disable any fast paths by adding an indexed property on the prototype chain. +Array.prototype[0] = 0; + +array.splice(100); diff --git a/js/src/jit-test/tests/arrays/unshift-nonwritable-length.js b/js/src/jit-test/tests/arrays/unshift-nonwritable-length.js new file mode 100644 index 0000000000..db95c5f2ef --- /dev/null +++ b/js/src/jit-test/tests/arrays/unshift-nonwritable-length.js @@ -0,0 +1,61 @@ +load(libdir + "asserts.js"); + +function f(arr) +{ + assertEq(arr.unshift(3, 5, 7, 9), 8); // if it doesn't throw :-) +} + +var N = 100; + +function test(out) +{ + // Create an array of arrays, to be iterated over for [].unshift-calling. We + // can't just loop on unshift on a single array with non-writable length + // because unshift throws when called on an array with non-writable length. + var arrs = out.arrs = []; + for (var i = 0; i < N; i++) + arrs.push([0, 1, 2, 3]); + + // Use a much-greater capacity than the eventual non-writable length, just for + // variability. + var a = [0, 1, 2, 3, 4, 5, 6, 7]; + Object.defineProperty(a, "length", { writable: false, value: 4 }); + + arrs.push(a); + + for (var i = 0, sz = arrs.length; i < sz; i++) + f(arrs[i]); +} + +var obj = {}; +assertThrowsInstanceOf(function() { test(obj); }, TypeError); + +var arrs = obj.arrs; +assertEq(arrs.length, N + 1); +for (var i = 0; i < N; i++) +{ + assertEq(arrs[i].length, 8, "unexpected length for arrs[" + i + "]"); + assertEq(arrs[i][0], 3, "bad element for arrs[" + i + "][0]"); + assertEq(arrs[i][1], 5, "bad element for arrs[" + i + "][1]"); + assertEq(arrs[i][2], 7, "bad element for arrs[" + i + "][2]"); + assertEq(arrs[i][3], 9, "bad element for arrs[" + i + "][3]"); + assertEq(arrs[i][4], 0, "bad element for arrs[" + i + "][4]"); + assertEq(arrs[i][5], 1, "bad element for arrs[" + i + "][5]"); + assertEq(arrs[i][6], 2, "bad element for arrs[" + i + "][6]"); + assertEq(arrs[i][7], 3, "bad element for arrs[" + i + "][7]"); +} + +var a = arrs[N]; +assertEq(a[0], 0, "bad element for a[0]"); +assertEq(a[1], 1, "bad element for a[1]"); +assertEq(a[2], 2, "bad element for a[2]"); +assertEq(a[3], 3, "bad element for a[3]"); +assertEq(a.hasOwnProperty(4), false, "shouldn't have added any elements"); +assertEq(a[4], undefined); +assertEq(a.hasOwnProperty(5), false, "shouldn't have added any elements"); +assertEq(a[5], undefined); +assertEq(a.hasOwnProperty(6), false, "shouldn't have added any elements"); +assertEq(a[6], undefined); +assertEq(a.hasOwnProperty(7), false, "shouldn't have added any elements"); +assertEq(a[7], undefined); +assertEq(a.length, 4, "length shouldn't have been changed"); diff --git a/js/src/jit-test/tests/arrow-functions/arguments-1.js b/js/src/jit-test/tests/arrow-functions/arguments-1.js new file mode 100644 index 0000000000..1bd8bc0cdc --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/arguments-1.js @@ -0,0 +1,5 @@ +// no 'arguments' binding in arrow functions + +var arguments = []; +var f = () => arguments; +assertEq(f(), arguments); diff --git a/js/src/jit-test/tests/arrow-functions/arguments-2.js b/js/src/jit-test/tests/arrow-functions/arguments-2.js new file mode 100644 index 0000000000..d6ad23ce8c --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/arguments-2.js @@ -0,0 +1,9 @@ +// 'arguments' is lexically scoped in arrow functions + +var args, g; +function f() { + g = () => arguments; + args = arguments; +} +f(); +assertEq(g(), args); diff --git a/js/src/jit-test/tests/arrow-functions/arguments-3.js b/js/src/jit-test/tests/arrow-functions/arguments-3.js new file mode 100644 index 0000000000..f4453438c1 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/arguments-3.js @@ -0,0 +1,16 @@ +// 'arguments' in eval + +function f() { + var g = s => eval(s); + assertEq(g("arguments"), arguments); +} + +f(); +f(0, 1, 2); + +function h() { + return s => eval(s); +} +var result = h(1, 2, 3, 4)("arguments"); +assertEq(result.length, 4); +assertEq(result[3], 4); diff --git a/js/src/jit-test/tests/arrow-functions/arguments-4.js b/js/src/jit-test/tests/arrow-functions/arguments-4.js new file mode 100644 index 0000000000..8a28cee06f --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/arguments-4.js @@ -0,0 +1,22 @@ +load(libdir + "asserts.js"); + +// 'arguments' is allowed in a non-arrow-function with a rest param. +assertEq((function(...rest) { return (x => arguments)(1, 2)})().length, 0); + +function restAndArgs(...rest) { + return () => eval("arguments"); +} + +var args = restAndArgs(1, 2, 3)(); +assertEq(args.length, 3); +assertEq(args[0], 1); +assertEq(args[1], 2); +assertEq(args[2], 3); + +(function() { + return ((...rest) => { + assertDeepEq(rest, [1, 2, 3]); + assertEq(arguments.length, 2); + assertEq(eval("arguments").length, 2); + })(1, 2, 3); +})(4, 5); diff --git a/js/src/jit-test/tests/arrow-functions/associativity-1.js b/js/src/jit-test/tests/arrow-functions/associativity-1.js new file mode 100644 index 0000000000..a3ce3ea34a --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/associativity-1.js @@ -0,0 +1,8 @@ +// Arrow right-associativity. + +var t = a => b => a; +assertEq(t('A')('B'), 'A'); + +var curry = f => a => b => f(a, b); +var curried_atan2 = curry(Math.atan2); +assertEq(curried_atan2(0)(1), 0); diff --git a/js/src/jit-test/tests/arrow-functions/associativity-2.js b/js/src/jit-test/tests/arrow-functions/associativity-2.js new file mode 100644 index 0000000000..45712965f0 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/associativity-2.js @@ -0,0 +1,8 @@ +// Arrow right-associativity with = + +var a, b, c; +a = b = c => a = b = c; +assertEq(a, b); +a(13); +assertEq(b, 13); +assertEq(a, 13); diff --git a/js/src/jit-test/tests/arrow-functions/associativity-3.js b/js/src/jit-test/tests/arrow-functions/associativity-3.js new file mode 100644 index 0000000000..2be671c5b9 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/associativity-3.js @@ -0,0 +1,5 @@ +// Arrow right-associativity with += + +var s = ""; +s += x => x.name; +assertEq(s, "x => x.name"); diff --git a/js/src/jit-test/tests/arrow-functions/block-1.js b/js/src/jit-test/tests/arrow-functions/block-1.js new file mode 100644 index 0000000000..7bfdf43a6d --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/block-1.js @@ -0,0 +1,6 @@ +// Braces after => indicate a block body as opposed to an expression body. + +var f = () => {}; +assertEq(f(), undefined); +var g = () => ({}); +assertEq(typeof g(), 'object'); diff --git a/js/src/jit-test/tests/arrow-functions/block-2.js b/js/src/jit-test/tests/arrow-functions/block-2.js new file mode 100644 index 0000000000..66637f53fa --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/block-2.js @@ -0,0 +1,4 @@ +// Block arrow functions don't return the last expression-statement value automatically. + +var f = a => { a + 1; }; +assertEq(f(0), undefined); diff --git a/js/src/jit-test/tests/arrow-functions/bug-885067-1.js b/js/src/jit-test/tests/arrow-functions/bug-885067-1.js new file mode 100644 index 0000000000..04ee5fe507 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/bug-885067-1.js @@ -0,0 +1,3 @@ +(function() { + a = (b => eval("0; [arguments]"))(); +})(); diff --git a/js/src/jit-test/tests/arrow-functions/bug-885067-2.js b/js/src/jit-test/tests/arrow-functions/bug-885067-2.js new file mode 100644 index 0000000000..a45bdccb8d --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/bug-885067-2.js @@ -0,0 +1,28 @@ +// deoptimize `arguments` in the arrow's closest enclosing non-arrow-function + +// non-arrow-function -> arrow function +a = 0; +(function() { + a = (() => eval("arguments"))(); +})(1, 2, 3, 4); +assertEq(a.length, 4); + +// non-arrow-function -> arrow function -> arrow function +a = 0; +(function() { + (() => { + a = (() => eval("arguments"))(); + })(); +})(1, 2, 3, 4); +assertEq(a.length, 4); + +// non-arrow-function -> arrow function -> non-arrow-function -> arrow function +a = 0; +(function() { + (() => { + (function () { + a = (() => eval("arguments"))(); + })(1, 2, 3, 4); + })(); +})(); +assertEq(a.length, 4); diff --git a/js/src/jit-test/tests/arrow-functions/bug-885219.js b/js/src/jit-test/tests/arrow-functions/bug-885219.js new file mode 100644 index 0000000000..70544bde8d --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/bug-885219.js @@ -0,0 +1,2 @@ +if (typeof disassemble === "function") + disassemble("-r", Function("()=>e,d")); diff --git a/js/src/jit-test/tests/arrow-functions/church-1.js b/js/src/jit-test/tests/arrow-functions/church-1.js new file mode 100644 index 0000000000..7849980a53 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/church-1.js @@ -0,0 +1,17 @@ +// Church booleans + +var True = t => f => t; +var False = t => f => f; +var bool_to_str = b => b("True")("False"); +var And = a => b => a(b)(a); +var Or = a => b => a(a)(b); + +assertEq(And(True)(True), True); +assertEq(And(True)(False), False); +assertEq(And(False)(True), False); +assertEq(And(False)(False), False); + +assertEq(Or(True)(True), True); +assertEq(Or(True)(False), True); +assertEq(Or(False)(True), True); +assertEq(Or(False)(False), False); diff --git a/js/src/jit-test/tests/arrow-functions/church-2.js b/js/src/jit-test/tests/arrow-functions/church-2.js new file mode 100644 index 0000000000..d38be6fdb4 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/church-2.js @@ -0,0 +1,19 @@ +// Church-Peano integers + +var Zero = f => x => x; +var Succ = n => f => x => n(f)(f(x)); +var Add = a => b => f => x => a(f)(b(f)(x)); +var Mul = a => b => f => x => a(b(f))(x); +var Exp = a => b => b(a); + +var n = f => f(k => k + 1)(0); + +assertEq(n(Zero), 0); +assertEq(n(Succ(Zero)), 1); +assertEq(n(Succ(Succ(Zero))), 2); + +var Three = Succ(Succ(Succ(Zero))); +var Five = Succ(Succ(Three)); +assertEq(n(Add(Three)(Five)), 8); +assertEq(n(Mul(Three)(Five)), 15); +assertEq(n(Exp(Three)(Five)), 243); diff --git a/js/src/jit-test/tests/arrow-functions/close-paren-arrow-after-expr.js b/js/src/jit-test/tests/arrow-functions/close-paren-arrow-after-expr.js new file mode 100644 index 0000000000..a9ecb7caaa --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/close-paren-arrow-after-expr.js @@ -0,0 +1,8 @@ +var caught = false; +try { + eval("1\n)=>"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/arrow-functions/column-number.js b/js/src/jit-test/tests/arrow-functions/column-number.js new file mode 100644 index 0000000000..eed3b6d72c --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/column-number.js @@ -0,0 +1,6 @@ +function f() { return g(abcd => Error()); } +function g(x) { return x(); } +var err = f(1, 2); +var lines = err.stack.split("\n"); +assertEq(lines[0].endsWith(":1:33"), true); +assertEq(lines[1].endsWith(":2:24"), true); \ No newline at end of file diff --git a/js/src/jit-test/tests/arrow-functions/const-1.js b/js/src/jit-test/tests/arrow-functions/const-1.js new file mode 100644 index 0000000000..f8e7fce4c2 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/const-1.js @@ -0,0 +1,11 @@ +// Arguments with default parameters can shadow const locals. + +"use strict"; + +function f() { + const x = 1; + return (x = 0) => x; +} + +var g = f(); +assertEq(g(), 0); diff --git a/js/src/jit-test/tests/arrow-functions/construct-1.js b/js/src/jit-test/tests/arrow-functions/construct-1.js new file mode 100644 index 0000000000..0871888e3d --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/construct-1.js @@ -0,0 +1,7 @@ +// Arrow functions are not constructors. + +load(libdir + "asserts.js"); + +var f = a => { this.a = a; }; +assertThrowsInstanceOf(() => new f, TypeError); +assertThrowsInstanceOf(() => new f(1, 2), TypeError); diff --git a/js/src/jit-test/tests/arrow-functions/eval-1.js b/js/src/jit-test/tests/arrow-functions/eval-1.js new file mode 100644 index 0000000000..fba4de65f0 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/eval-1.js @@ -0,0 +1,9 @@ +// Arrow functions in direct eval code. + +function f(s) { + var a = 2; + return eval(s); +} + +var c = f("k => a + k"); // closure should see 'a' +assertEq(c(3), 5); diff --git a/js/src/jit-test/tests/arrow-functions/lazy-arrow-1.js b/js/src/jit-test/tests/arrow-functions/lazy-arrow-1.js new file mode 100644 index 0000000000..d8678f35dd --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/lazy-arrow-1.js @@ -0,0 +1,18 @@ +function f() { + let z = (a = (() => 10), + b = (() => 20)) => { + return [a, b]; + } + + function g() { + return 30; + } + + return [...z(), g]; +} + +let [a, b, c] = f(); + +assertEq(a(), 10); +assertEq(b(), 20); +assertEq(c(), 30); diff --git a/js/src/jit-test/tests/arrow-functions/length.js b/js/src/jit-test/tests/arrow-functions/length.js new file mode 100644 index 0000000000..53ca3e64df --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/length.js @@ -0,0 +1,11 @@ +// Arrow functions have a .length property like ordinary functions. + +assertEq((a => a).hasOwnProperty("length"), true); + +assertEq((a => a).length, 1); +assertEq((() => 0).length, 0); +assertEq(((a) => 0).length, 1); +assertEq(((a, b) => 0).length, 2); + +assertEq(((...arr) => arr).length, 0); +assertEq(((a=1, b=2) => 0).length, 0); diff --git a/js/src/jit-test/tests/arrow-functions/params-1.js b/js/src/jit-test/tests/arrow-functions/params-1.js new file mode 100644 index 0000000000..5c2395c394 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/params-1.js @@ -0,0 +1,6 @@ +// arrow functions may have empty arguments + +var f = () => 'x'; +assertEq(f.length, 0); +assertEq(f(), 'x'); +assertEq(f(0, 1, 2, 3, 4, 5, 6, 7, 8, 9), 'x'); diff --git a/js/src/jit-test/tests/arrow-functions/params-2.js b/js/src/jit-test/tests/arrow-functions/params-2.js new file mode 100644 index 0000000000..a5520166a7 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/params-2.js @@ -0,0 +1,6 @@ +// (a) => expr + +var f = (a) => 2 * a; // parens are allowed +assertEq(f(12), 24); +var g = (a, b) => a + b; +assertEq([1, 2, 3, 4, 5].reduce((a, b) => a + b), 15); diff --git a/js/src/jit-test/tests/arrow-functions/params-default-1.js b/js/src/jit-test/tests/arrow-functions/params-default-1.js new file mode 100644 index 0000000000..c4ff50774b --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/params-default-1.js @@ -0,0 +1,5 @@ +// Parameter default values work in arrow functions + +var f = (a=0) => a + 1; +assertEq(f(), 1); +assertEq(f(50), 51); diff --git a/js/src/jit-test/tests/arrow-functions/params-default-2.js b/js/src/jit-test/tests/arrow-functions/params-default-2.js new file mode 100644 index 0000000000..746911e578 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/params-default-2.js @@ -0,0 +1,8 @@ +// Parameter default values work in arrow functions + +load(libdir + "asserts.js"); + +var f = (a=1, b=2, ...rest) => [a, b, rest]; +assertDeepEq(f(), [1, 2, []]); +assertDeepEq(f(0, 0), [0, 0, []]); +assertDeepEq(f(0, 1, 1, 2, 3, 5), [0, 1, [1, 2, 3, 5]]); diff --git a/js/src/jit-test/tests/arrow-functions/params-rest-1.js b/js/src/jit-test/tests/arrow-functions/params-rest-1.js new file mode 100644 index 0000000000..2e35fb15fa --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/params-rest-1.js @@ -0,0 +1,7 @@ +// Rest parameters are allowed in arrow functions. + +load(libdir + "asserts.js"); + +var A = (...x) => x; +assertDeepEq(A(), []); +assertEq("" + A(3, 4, 5), "3,4,5"); diff --git a/js/src/jit-test/tests/arrow-functions/params-rest-2.js b/js/src/jit-test/tests/arrow-functions/params-rest-2.js new file mode 100644 index 0000000000..b98650a61a --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/params-rest-2.js @@ -0,0 +1,7 @@ +// Rest parameters work in arrow functions + +load(libdir + "asserts.js"); + +var f = (a, b, ...rest) => [a, b, rest]; +assertDeepEq(f(), [(void 0), (void 0), []]); +assertDeepEq(f(1, 2, 3, 4), [1, 2, [3, 4]]); diff --git a/js/src/jit-test/tests/arrow-functions/precedence-1.js b/js/src/jit-test/tests/arrow-functions/precedence-1.js new file mode 100644 index 0000000000..f84826cf1e --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/precedence-1.js @@ -0,0 +1,7 @@ +// || binds tighter than =>. + +var f; +f = a => a || 'nothing'; // f = ((a => a) || 'nothing'); +assertEq(f.length, 1); +assertEq(f(0), 'nothing'); +assertEq(f(1), 1); diff --git a/js/src/jit-test/tests/arrow-functions/precedence-2.js b/js/src/jit-test/tests/arrow-functions/precedence-2.js new file mode 100644 index 0000000000..479cb20a45 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/precedence-2.js @@ -0,0 +1,6 @@ +// => binds tighter than , + +var f, g; +g = (f, h => h + 1); // sequence expression: (f, (h => h + 1)) +assertEq(g.length, 1); +assertEq(g(37), 38); diff --git a/js/src/jit-test/tests/arrow-functions/precedence-3.js b/js/src/jit-test/tests/arrow-functions/precedence-3.js new file mode 100644 index 0000000000..761b171888 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/precedence-3.js @@ -0,0 +1,4 @@ +// => binds tighter than , (on the other side) + +var h = (a => a, 13); // sequence expression +assertEq(h, 13); diff --git a/js/src/jit-test/tests/arrow-functions/precedence-4.js b/js/src/jit-test/tests/arrow-functions/precedence-4.js new file mode 100644 index 0000000000..ca3e30d6e2 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/precedence-4.js @@ -0,0 +1,6 @@ +// Funny case that looks kind of like default arguments isn't. + +var f = (msg='hi', w=window => w.alert(a, b)); // sequence expression +assertEq(msg, 'hi'); +assertEq(typeof w, 'function'); +assertEq(f, w); diff --git a/js/src/jit-test/tests/arrow-functions/precedence-5.js b/js/src/jit-test/tests/arrow-functions/precedence-5.js new file mode 100644 index 0000000000..9418aac0b3 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/precedence-5.js @@ -0,0 +1,3 @@ +// map(x => x, 32) is two arguments, not one + +assertEq("" + [1, 2, 3, 4].map(x => x, 32), "1,2,3,4"); diff --git a/js/src/jit-test/tests/arrow-functions/prototype-1.js b/js/src/jit-test/tests/arrow-functions/prototype-1.js new file mode 100644 index 0000000000..57922420f1 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/prototype-1.js @@ -0,0 +1,4 @@ +// The prototype of an arrow function is Function.prototype. + +assertEq(Object.getPrototypeOf(a => a), Function.prototype); +assertEq(Object.getPrototypeOf(() => {}), Function.prototype); diff --git a/js/src/jit-test/tests/arrow-functions/prototype-2.js b/js/src/jit-test/tests/arrow-functions/prototype-2.js new file mode 100644 index 0000000000..6573783a92 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/prototype-2.js @@ -0,0 +1,4 @@ +// Arrow functions do not have a .prototype property. + +assertEq("prototype" in (a => a), false); +assertEq("prototype" in (() => {}), false); diff --git a/js/src/jit-test/tests/arrow-functions/return-1.js b/js/src/jit-test/tests/arrow-functions/return-1.js new file mode 100644 index 0000000000..b89d979e2d --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/return-1.js @@ -0,0 +1,9 @@ +// return from a block function works when there is no other enclosing function + +var f = a => { + if (a) + return a + 1; + throw "FAIL"; +}; + +assertEq(f(1), 2); diff --git a/js/src/jit-test/tests/arrow-functions/return-2.js b/js/src/jit-test/tests/arrow-functions/return-2.js new file mode 100644 index 0000000000..b4ecebb842 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/return-2.js @@ -0,0 +1,8 @@ +// return exits the innermost enclosing arrow (not an enclosing function) + +function f() { + var g = x => { return !x; }; + return "f:" + g(true); +} + +assertEq(f(), "f:false"); diff --git a/js/src/jit-test/tests/arrow-functions/return-3.js b/js/src/jit-test/tests/arrow-functions/return-3.js new file mode 100644 index 0000000000..ea71fb138a --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/return-3.js @@ -0,0 +1,10 @@ +// return exits the innermost enclosing arrow (not an enclosing arrow) + +load(libdir + "asserts.js"); + +function f() { + var g = a => [0, 1].map(x => { return x + a; }); + return g(13); +} + +assertDeepEq(f(), [13, 14]); diff --git a/js/src/jit-test/tests/arrow-functions/strict-1.js b/js/src/jit-test/tests/arrow-functions/strict-1.js new file mode 100644 index 0000000000..9bb715a4c9 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/strict-1.js @@ -0,0 +1,13 @@ +// arrow functions are not implicitly strict-mode code + +load(libdir + "asserts.js"); + +var f = a => { with (a) return f(); }; +assertEq(f({f: () => 7}), 7); + +f = a => function () { with (a) return f(); }; +assertEq(f({f: () => 7})(), 7); + +f = (a = {x: 1, x: 2}) => b => { "use strict"; return a.x; }; +assertEq(f()(0), 2); + diff --git a/js/src/jit-test/tests/arrow-functions/strict-2.js b/js/src/jit-test/tests/arrow-functions/strict-2.js new file mode 100644 index 0000000000..150b2ddb0e --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/strict-2.js @@ -0,0 +1,11 @@ +// code in arrow function default arguments is strict if arrow is strict + +load(libdir + "asserts.js"); + +assertThrowsInstanceOf( + () => Function("'use strict'; (a = function (obj) { with (obj) f(); }) => { }"), + SyntaxError); + +assertThrowsInstanceOf( + () => Function("'use strict'; (a = obj => { with (obj) f(); }) => { }"), + SyntaxError); diff --git a/js/src/jit-test/tests/arrow-functions/strict-3.js b/js/src/jit-test/tests/arrow-functions/strict-3.js new file mode 100644 index 0000000000..24150cfd77 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/strict-3.js @@ -0,0 +1,4 @@ +// "use strict" is not special as the body of an arrow function without braces. + +var f = (a = obj => { with (obj) return x; }) => "use strict"; +assertEq(f(), "use strict"); diff --git a/js/src/jit-test/tests/arrow-functions/syntax-errors.js b/js/src/jit-test/tests/arrow-functions/syntax-errors.js new file mode 100644 index 0000000000..925fd5b894 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/syntax-errors.js @@ -0,0 +1,38 @@ +// Check that we correctly throw SyntaxErrors for various syntactic near-misses. + +load(libdir + "asserts.js"); + +var mistakes = [ + "((a)) => expr", + "a + b => a", + "'' + a => a", + "...x", + "[x] => x", + "([x] => x)", + "{p: p} => p", + "({p: p} => p)", + "{p} => p", + "(...x => expr)", + "1 || a => a", + "'use strict' => {}", + "package => {'use strict';}", // tricky: FutureReservedWord in strict mode code only + "'use strict'; arguments => 0", // names banned in strict mode code + "'use strict'; eval => 0", + "a => {'use strict'; with (a) return x; }", + "a => yield a", + "a => { yield a; }", + "a => { { let x; yield a; } }", + "(a = yield 0) => a", + "for (;;) a => { break; };", + "for (;;) a => { continue; };", + "...rest) =>", + "2 + ...rest) =>" +]; + +for (var s of mistakes) + assertThrowsInstanceOf(function () { Function(s); }, SyntaxError); + +// Check that the tricky case is not an error in non-strict-mode code. +var f = package => 0; +assertEq(f(1), 0); + diff --git a/js/src/jit-test/tests/arrow-functions/this-1.js b/js/src/jit-test/tests/arrow-functions/this-1.js new file mode 100644 index 0000000000..1367052700 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/this-1.js @@ -0,0 +1,17 @@ +// 'this' is lexically scoped in arrow functions + +var obj = { + f: function (expected) { + assertEq(this, expected); + return a => this; + } +}; + +var g = obj.f(obj); +assertEq(g(), obj); + +var obj2 = {f: obj.f}; +var g2 = obj2.f(obj2); +assertEq(g2(), obj2); +assertEq(g(), obj); + diff --git a/js/src/jit-test/tests/arrow-functions/this-2.js b/js/src/jit-test/tests/arrow-functions/this-2.js new file mode 100644 index 0000000000..3dac3c863d --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/this-2.js @@ -0,0 +1,13 @@ +// 'this' is lexically scoped in direct eval code in arrow functions + +var obj = { + f: function (s) { + return a => eval(s); + } +}; + +var g = obj.f("this"); +assertEq(g(), obj); + +var obj2 = {g: g, fail: true}; +assertEq(obj2.g(), obj); diff --git a/js/src/jit-test/tests/arrow-functions/this-3.js b/js/src/jit-test/tests/arrow-functions/this-3.js new file mode 100644 index 0000000000..59398a3cb3 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/this-3.js @@ -0,0 +1,13 @@ +// 'this' is lexically scoped in arrow functions in direct eval code + +var obj = { + f: function (s) { + return eval(s); + } +}; + +var g = obj.f("a => this"); +assertEq(g(), obj); + +var obj2 = {g: g, fail: true}; +assertEq(obj2.g(), obj); diff --git a/js/src/jit-test/tests/arrow-functions/this-4.js b/js/src/jit-test/tests/arrow-functions/this-4.js new file mode 100644 index 0000000000..0379ef86e5 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/this-4.js @@ -0,0 +1,5 @@ +// 'this' in a toplevel arrow is the global object. + +var f = () => this; +assertEq(f(), this); +assertEq({f: f}.f(), this); diff --git a/js/src/jit-test/tests/arrow-functions/this-5.js b/js/src/jit-test/tests/arrow-functions/this-5.js new file mode 100644 index 0000000000..98b7bf8168 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/this-5.js @@ -0,0 +1,12 @@ +// Arrow functions can have primitive |this| values. + +Number.prototype.foo = function() { + "use strict"; + return () => this; +} + +for (var i=0; i<5; i++) { + var n = i.foo()(); + assertEq(typeof n, "number"); + assertEq(n, i); +} diff --git a/js/src/jit-test/tests/arrow-functions/this-6.js b/js/src/jit-test/tests/arrow-functions/this-6.js new file mode 100644 index 0000000000..c5ee4d95a3 --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/this-6.js @@ -0,0 +1,11 @@ +// Eval expressions in arrow functions use the correct |this| value. + +function Dog(name) { + this.name = name; + this.getName = () => eval("this.name"); + this.getNameHard = () => eval("(() => this.name)()"); +} + +var d = new Dog("Max"); +assertEq(d.getName(), d.name); +assertEq(d.getNameHard(), d.name); diff --git a/js/src/jit-test/tests/arrow-functions/typeof.js b/js/src/jit-test/tests/arrow-functions/typeof.js new file mode 100644 index 0000000000..a610deb91c --- /dev/null +++ b/js/src/jit-test/tests/arrow-functions/typeof.js @@ -0,0 +1,4 @@ +// The typeof an arrow function is "function". + +assertEq(typeof (() => 1), "function"); +assertEq(typeof (a => { return a + 1; }), "function"); diff --git a/js/src/jit-test/tests/asm.js/arraybuffer-transfer.js b/js/src/jit-test/tests/asm.js/arraybuffer-transfer.js new file mode 100644 index 0000000000..c96df0536a --- /dev/null +++ b/js/src/jit-test/tests/asm.js/arraybuffer-transfer.js @@ -0,0 +1,65 @@ +load(libdir + "asm.js"); + +function module(stdlib, foreign, buffer) { + "use asm"; + + var i32 = new stdlib.Int32Array(buffer); + + function zero() { + return i32[0] | 0; + } + return zero; +} + +const byteLength = BUF_MIN; +let buffer = new ArrayBuffer(byteLength); +let i32 = new Int32Array(buffer); +let zero = module(globalThis, null, buffer); + +const magic = 0xbadf00d; + +assertEq(zero(), 0); +assertEq(i32[0], 0); + +i32[0] = magic; + +assertEq(zero(), magic); +assertEq(i32[0], magic); + +assertEq(buffer.detached, false); +assertEq(buffer.byteLength, byteLength); + +if (isAsmJSCompilationAvailable()) { + // asm.js compilation is enabled. + + assertEq(isAsmJSModule(module), true); + assertEq(isAsmJSFunction(zero), true); + + // Can't transfer asm.js prepared array buffers. + assertThrowsInstanceOf(() => buffer.transfer(), TypeError); + + // |buffer| is still attached. + assertEq(buffer.detached, false); + assertEq(buffer.byteLength, byteLength); + + // Access still returns the original value. + assertEq(zero(), magic); + assertEq(i32[0], magic); +} else { + // asm.js compilation is disabled. + + assertEq(isAsmJSModule(module), false); + assertEq(isAsmJSFunction(zero), false); + + let copy = buffer.transfer(); + + assertEq(buffer.detached, true); + assertEq(buffer.byteLength, 0); + + assertEq(copy.detached, false); + assertEq(copy.byteLength, byteLength); + + // Access returns undefined when detached. + assertEq(zero(), 0); + assertEq(i32[0], undefined); +} diff --git a/js/src/jit-test/tests/asm.js/bug1007512.js b/js/src/jit-test/tests/asm.js/bug1007512.js new file mode 100644 index 0000000000..657fed6210 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1007512.js @@ -0,0 +1,8 @@ +// |jit-test| error: TypeError + +new(function(stdlib, n, heap) { + "use asm" + var x = new stdlib.Uint32Array(heap) + function f() {} + return f +}) diff --git a/js/src/jit-test/tests/asm.js/bug1008636.js b/js/src/jit-test/tests/asm.js/bug1008636.js new file mode 100644 index 0000000000..03e52e9b17 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1008636.js @@ -0,0 +1,12 @@ +// |jit-test| error:TypeError +// stdlib is undefined + +(function(stdlib, n, heap) { + "use asm" + var Int16ArrayView = new stdlib.Int16Array(heap) + function f() { + var x = 4. + Int16ArrayView[~~((1 ? .0 : .9) % x) >> 1] = 0 + u(x) + } +})() diff --git a/js/src/jit-test/tests/asm.js/bug1126251.js b/js/src/jit-test/tests/asm.js/bug1126251.js new file mode 100644 index 0000000000..77aa56dbeb --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1126251.js @@ -0,0 +1,15 @@ +load(libdir + "asm.js"); + +// Bug 1126251 +var v = asmLink(asmCompile('global', ` + "use asm"; + var frd = global.Math.fround; + function e() { + var x = frd(.1e+71); + x = frd(x / x); + return +x; + } + return e; +`), this)(); + +assertEq(v, NaN); diff --git a/js/src/jit-test/tests/asm.js/bug1161298.js b/js/src/jit-test/tests/asm.js/bug1161298.js new file mode 100644 index 0000000000..19da18e17e --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1161298.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer || largeArrayBufferSupported() + +// The length exceeds INT32_MAX and should be rejected. + +var failed = false; +try { + var sab = new SharedArrayBuffer((2147483648)); +} +catch (e) { + failed = true; +} +assertEq(failed, true); diff --git a/js/src/jit-test/tests/asm.js/bug1174372.js b/js/src/jit-test/tests/asm.js/bug1174372.js new file mode 100644 index 0000000000..e7031ea104 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1174372.js @@ -0,0 +1,6 @@ +// |jit-test| --no-baseline; --non-writable-jitcode +(function(stdlib, foreign, heap) { + "use asm"; + function f() {} + return f; +})(); diff --git a/js/src/jit-test/tests/asm.js/bug1219954.js b/js/src/jit-test/tests/asm.js/bug1219954.js new file mode 100644 index 0000000000..305369a936 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1219954.js @@ -0,0 +1,10 @@ +// |jit-test| slow; skip-if: !('oomTest' in this) +"use strict"; + +let g = (function() { + "use asm"; + function f() {} + return f; +})(); + +oomTest(() => "" + g); diff --git a/js/src/jit-test/tests/asm.js/bug1268955-usestrict-semantics.js b/js/src/jit-test/tests/asm.js/bug1268955-usestrict-semantics.js new file mode 100644 index 0000000000..501c4392da --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1268955-usestrict-semantics.js @@ -0,0 +1,19 @@ + +var scope = {}; +scope.mod = eval(`"use strict"; (function() { "use asm"; function f() {} return f; });`); + +scope.fun = scope.mod(); + +var caught = false; +for (let callee of ['mod', 'fun']) { + for (let getter of ['caller', 'arguments']) { + caught = false; + try { + scope[callee][getter]; + } catch (e) { + caught = true; + assertEq(e instanceof TypeError, true); + } + assertEq(caught, true); + } +} diff --git a/js/src/jit-test/tests/asm.js/bug1276028.js b/js/src/jit-test/tests/asm.js/bug1276028.js new file mode 100644 index 0000000000..6ef823e247 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1276028.js @@ -0,0 +1,6 @@ +load(libdir + "asm.js"); + +var f = asmLink(asmCompile(USE_ASM + "function a234567() { return 42 } return a234567")); +assertEq(f(), 42); +enableGeckoProfiling(); +assertEq(f(), 42); diff --git a/js/src/jit-test/tests/asm.js/bug1306506.js b/js/src/jit-test/tests/asm.js/bug1306506.js new file mode 100644 index 0000000000..69cfc7b0ed --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1306506.js @@ -0,0 +1,7 @@ +f = (function(stdlib, foreign, heap) { + "use asm"; + function f() { + return (1, 1 / 0)|0; + } + return f; +}); diff --git a/js/src/jit-test/tests/asm.js/bug1385428.js b/js/src/jit-test/tests/asm.js/bug1385428.js new file mode 100644 index 0000000000..c586ec8f3e --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1385428.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: !('oomTest' in this) + +loadFile(` +try { + Array.prototype.splice.call({ get length() { + "use asm" + function f() {} + return f; +} }); +} catch (e) { + assertEq(e, s2, "wrong error thrown: " + e); +} +`); +function loadFile(lfVarx) { + try { + oomTest(new Function(lfVarx)); + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/asm.js/bug1421565.js b/js/src/jit-test/tests/asm.js/bug1421565.js new file mode 100644 index 0000000000..04ab718305 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1421565.js @@ -0,0 +1,19 @@ +// |jit-test| --ion-offthread-compile=off; skip-if: !isAsmJSCompilationAvailable() || !('oomTest' in this) + +load(libdir + "asm.js"); + +oomTest( + function() { + eval(` + function f(stdlib, foreign, buffer) { + "use asm"; + var i32 = new stdlib.Int32Array(buffer); + function set(v) { + v=v|0; + i32[5] = v; + } + return set; + } + `); + } +); diff --git a/js/src/jit-test/tests/asm.js/bug1493475.js b/js/src/jit-test/tests/asm.js/bug1493475.js new file mode 100644 index 0000000000..8a015d1471 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1493475.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +offThreadCompileToStencil("\ + (function(stdlib, foreign) {\ + \"use asm\";\ + function() {};\ + })();\ +"); diff --git a/js/src/jit-test/tests/asm.js/bug1565301.js b/js/src/jit-test/tests/asm.js/bug1565301.js new file mode 100644 index 0000000000..77feaa1e26 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1565301.js @@ -0,0 +1,29 @@ +// |jit-test| skip-if: !isAsmJSCompilationAvailable() || helperThreadCount() === 0 + +const maxSize = Math.pow(2, 29) - 1; + +// We just don't want to crash during compilation here. + +evaluate(` + offThreadCompileToStencil("\\ + g = (function(t,foreign){\\ + \\"use asm\\";\\ + var ff = foreign.ff;\\ + function f() {\\ + +ff()\\ + }\\ + return f\\ +", { lineNumber: (${maxSize})}); +`); + +evaluate(` + offThreadCompileToStencil("\\ + g = (function(t,foreign){\\ + \\"use asm\\";\\ + var ff = foreign.ff;\\ + function f() {\\ + +ff()\\ + }\\ + return f\\ +", { lineNumber: (${maxSize + 1})}); +`); diff --git a/js/src/jit-test/tests/asm.js/bug1602675.js b/js/src/jit-test/tests/asm.js/bug1602675.js new file mode 100644 index 0000000000..facc68cf9e --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug1602675.js @@ -0,0 +1,19 @@ +// |jit-test| skip-if: !isAsmJSCompilationAvailable() +// +// Confusion between TA constructor and TA view led to invalid wasm code +// generation and a subsequent failure in the wasm verifier. This code should +// not validate; we should fall back to JS execution. + +function f(stdlib, foreign, buffer) { + "use asm"; + var i32 =stdlib.Int32Array + function g(i) { + i=i|0; + var j=0; + for (; (j>>>0) < 100000; j=(j+1)|0) + i32[i>>2] = j; + } + return g +} +var g = f(this, null, new ArrayBuffer(1<<16)); +g(1<<16); diff --git a/js/src/jit-test/tests/asm.js/bug855526.js b/js/src/jit-test/tests/asm.js/bug855526.js new file mode 100644 index 0000000000..fd75b137d4 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug855526.js @@ -0,0 +1,13 @@ +// Don't assert. +try { + eval('\ + function asmModule(g, foreign, heap) {\ + "use asm";\ + let HEAP8 = new g.Int8Array(heap);\ + function f() { return 17; } \ + return {f: f};\ + }\ + let m = asmModule("", "", 1, "");\ + '); +} catch (ex) { +} diff --git a/js/src/jit-test/tests/asm.js/bug885976.js b/js/src/jit-test/tests/asm.js/bug885976.js new file mode 100644 index 0000000000..303a8d07f2 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug885976.js @@ -0,0 +1,12 @@ +// |jit-test| error: TypeError +function test(stdlib, foreign) { + "use asm" + var ff = foreign.ff + function f(y) { + y = +y; + ff(0); + } + return f; +}; +f = test(this, {ff: Object.defineProperty}); +f(); diff --git a/js/src/jit-test/tests/asm.js/bug923867.js b/js/src/jit-test/tests/asm.js/bug923867.js new file mode 100644 index 0000000000..59bd296b8f --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug923867.js @@ -0,0 +1,8 @@ +(function(a) { + "use asm" + var Infinity = a.Infinity + function f() { + Infinity - (2 ? (1. / .0) : +0) + } + return f +})(this)() diff --git a/js/src/jit-test/tests/asm.js/bug927389.js b/js/src/jit-test/tests/asm.js/bug927389.js new file mode 100644 index 0000000000..ad2ea74d7b --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug927389.js @@ -0,0 +1,6 @@ +(function() { + "use asm" + function f() { + +~~1.1 + } +})() diff --git a/js/src/jit-test/tests/asm.js/bug928450.js b/js/src/jit-test/tests/asm.js/bug928450.js new file mode 100644 index 0000000000..a12036735d --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug928450.js @@ -0,0 +1,18 @@ +(function() { + "use asm"; + function f() { + i((1.5 != 2.) ? 3 : 0); + } + return f; +})(); + +// Bug 933104 +(function() { + "use asm"; + function f(x) { + x = +x; + x = -2.; + (x > -1.5) ? 0 : 0; + } + return f; +})() diff --git a/js/src/jit-test/tests/asm.js/bug940864.js b/js/src/jit-test/tests/asm.js/bug940864.js new file mode 100644 index 0000000000..4df37bb400 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug940864.js @@ -0,0 +1,10 @@ +function a() +{ + "use asm"; + function f() + { + return (((((-1) >>> (0+0)) | 0) % 10000) >> (0+0)) | 0; + } + return f; +} +assertEq(a()(), -1); diff --git a/js/src/jit-test/tests/asm.js/bug941877.js b/js/src/jit-test/tests/asm.js/bug941877.js new file mode 100644 index 0000000000..c2033cf8d9 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/bug941877.js @@ -0,0 +1,164 @@ +load(libdir + "asm.js"); + +function FunctionBody(f) { + var str = f.toString(); + var firstBrace = str.indexOf('{'); + var lastBrace = str.lastIndexOf('}'); + return str.substr(firstBrace + 1, lastBrace - firstBrace - 1); +} + +var F = (function (stdlib, n, heap) { + var Int16ArrayView = new stdlib.Int16Array(heap); + function f(i0, d1) { + i0 = i0 | 0 + d1 = +d1 + var d2 = 1. + var i3 = 0 + Int16ArrayView[0] = i0 + d2 = (.0 / .0) + switch ((i0 + i0) | 0) { + case 0: + d2 = .0 + break + }; + (((i3 - (0 < 0)) >>> ((.0 < -0) + (.0 > .0))) / 0) >> (0 + (((0 + 0) ^ +(9 > 0)) | 0)) + } + return f; +}); + +var compiled = asmCompile('stdlib', 'n', 'heap', USE_ASM + FunctionBody(F)); +asmLink(compiled, this, null, new ArrayBuffer(BUF_MIN))(); + +var F = (function(stdlib, n, heap) { + var Float64ArrayView = new stdlib.Float64Array(heap) + function f() { + Float64ArrayView[0] = +(0xffffffff / 0xffffffff >> 0) + } + return f; +}); + +var compiled = asmCompile('stdlib', 'n', 'heap', USE_ASM + FunctionBody(F)); +asmLink(compiled, this, null, new ArrayBuffer(BUF_MIN))(); + +function test0(x) +{ + return (x >>> 0) % 10; +} +assertEq(test0(25), 5); +assertEq(test0(24), 4); +assertEq(test0(23), 3); +assertEq(test0(0), 0); +assertEq(test0(4294967295), 5); + +function test1(x) +{ + return (x >>> 2) % 10; +} +assertEq(test1(25), 6); +assertEq(test1(24), 6); +assertEq(test1(23), 5); +assertEq(test1(4294967295), 3); + +function test2(x, y) +{ + return (x >>> 0) % (y >>> 0); +} +assertEq(test2(25, 3), 1); +assertEq(test2(24, 4), 0); +assertEq(test2(4294967295, 10), 5); +assertEq(test2(23, 0), NaN); + +function test3() +{ + function f(x, y) + { + x = x|0; + y = y|0; + var t = 0; + t = (((x|0) % (y|0))|0) > -2; + return t|0; + } + return f; +} +var compiled = asmCompile(USE_ASM + FunctionBody(test3)); +var linked = asmLink(compiled); +assertEq(linked(4294967290, 4294967295), 1); +assertEq(linked(4294967290, 4294967295), 1); + +function test4() +{ + function f(x, y) + { + x = x|0; + y = y|0; + var t = 0; + t = (((x>>>0) % (y>>>0)) >>> 0) > 0; + return t|0; + } + return f; +} +var compiled = asmCompile(USE_ASM + FunctionBody(test4)); +var linked = asmLink(compiled); +assertEq(linked(4294967290, 4294967295), 1); +assertEq(linked(4294967290, 4294967295), 1); + +function test5() +{ + function f(x, y) + { + x = x|0; + y = y|0; + var t = 0.; + t = +(((x>>>0) % (y>>>0)) >>> 0) * 1.01; + return +t; + } + return f; +} +var compiled = asmCompile(USE_ASM + FunctionBody(test5)); +var linked = asmLink(compiled); +assertEq(linked(4294967290, 4294967295), 4337916962.9); +assertEq(linked(4294967290, 4294967295), 4337916962.9); + +function test6() +{ + function f(x, y) + { + x = x|0; + y = y|0; + return ((x>>>1) % (y>>>1))|0; + } + return f; +} +var compiled = asmCompile(USE_ASM + FunctionBody(test6)); +var linked = asmLink(compiled); +assertEq(linked(23847, 7), 1); +assertEq(linked(23848, 7), 2); + +function test7() +{ + function f(x) + { + x = x|0; + return ((x>>>0) / 8)|0; + } + return f; +} +var compiled = asmCompile(USE_ASM + FunctionBody(test7)); +var linked = asmLink(compiled); +assertEq(linked(23847, 7), 2980); +assertEq(linked(23848, 7), 2981); + +function test8() +{ + function f(i,j) + { + i=i|0;j=j|0; + return ((i>>>0)/(j>>>0))|0; + } + return f; +} +var compiled = asmCompile(USE_ASM + FunctionBody(test8)); +var linked = asmLink(compiled); +assertEq(linked(2147483647, 0), 0); +assertEq(linked(2147483646, 0), 0); diff --git a/js/src/jit-test/tests/asm.js/directives.txt b/js/src/jit-test/tests/asm.js/directives.txt new file mode 100644 index 0000000000..5e1df0378d --- /dev/null +++ b/js/src/jit-test/tests/asm.js/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--no-asmjs; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); diff --git a/js/src/jit-test/tests/asm.js/import-function-toPrimitive.js b/js/src/jit-test/tests/asm.js/import-function-toPrimitive.js new file mode 100644 index 0000000000..aa529b465d --- /dev/null +++ b/js/src/jit-test/tests/asm.js/import-function-toPrimitive.js @@ -0,0 +1,26 @@ +var counter = 0; + +function f(stdlib, foreign) +{ + "use asm"; + var a = +foreign.a; + var b = +foreign.b; + function g() {} + return g; +} + +var foreign = + { + a: function() {}, + b: /value that doesn't coerce purely/, + }; + +foreign.a[Symbol.toPrimitive] = + function() + { + counter++; + return 0; + }; + +f(null, foreign); +assertEq(counter, 1); diff --git a/js/src/jit-test/tests/asm.js/nested-rewind.js b/js/src/jit-test/tests/asm.js/nested-rewind.js new file mode 100644 index 0000000000..231eef1f6a --- /dev/null +++ b/js/src/jit-test/tests/asm.js/nested-rewind.js @@ -0,0 +1,9 @@ +function g(x = + function() { + "use asm"; + function f(){} + return f; + } +) { + "use asm"; +} diff --git a/js/src/jit-test/tests/asm.js/neuter-during-arguments-coercion.js b/js/src/jit-test/tests/asm.js/neuter-during-arguments-coercion.js new file mode 100644 index 0000000000..bfe8913e79 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/neuter-during-arguments-coercion.js @@ -0,0 +1,27 @@ +load(libdir + "asm.js"); + +function f(stdlib, foreign, buffer) +{ + "use asm"; + var i32 = new stdlib.Int32Array(buffer); + function set(v) + { + v=v|0; + i32[5] = v; + } + return set; +} +if (isAsmJSCompilationAvailable()) + assertEq(isAsmJSModule(f), true); + +var i32 = new Int32Array(65536); +var buffer = i32.buffer; +var set = f(this, null, buffer); +if (isAsmJSCompilationAvailable()) + assertEq(isAsmJSFunction(set), true); + +try +{ + set({ valueOf() { detachArrayBuffer(buffer); return 17; } }); +} +catch (e) { /* if an exception thrown, swallow */ } diff --git a/js/src/jit-test/tests/asm.js/oom-helper-thread-plus-validation-error.js b/js/src/jit-test/tests/asm.js/oom-helper-thread-plus-validation-error.js new file mode 100644 index 0000000000..2d80e98d3c --- /dev/null +++ b/js/src/jit-test/tests/asm.js/oom-helper-thread-plus-validation-error.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('oomAfterAllocations' in this) + +oomAfterAllocations(10, 2); +evaluate(`function mod(stdlib, ffi, heap) { + "use asm"; + function f3(k) { + k = k | 0; + } + function g3(k) {} +}`); diff --git a/js/src/jit-test/tests/asm.js/oom-helper-thread.js b/js/src/jit-test/tests/asm.js/oom-helper-thread.js new file mode 100644 index 0000000000..18165c01b3 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/oom-helper-thread.js @@ -0,0 +1,4 @@ +// |jit-test| exitstatus: 3; skip-if: !('oomAfterAllocations' in this) + +oomAfterAllocations(50, 2); +eval("(function() {'use asm'; function f() { return +pow(.0, .0) })") diff --git a/js/src/jit-test/tests/asm.js/testAddressErrors.js b/js/src/jit-test/tests/asm.js/testAddressErrors.js new file mode 100644 index 0000000000..1b89b278ad --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testAddressErrors.js @@ -0,0 +1,46 @@ +load(libdir + "asm.js"); + +setIonCheckGraphCoherency(false); + +// constants +var buf = new ArrayBuffer(BUF_MIN); + +// An unshifted literal constant byte index in the range 0 to 2^31-1 inclusive should give a link failure. +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int8Array(b); function f() {return arr[0x7fffffff]|0 } return f'), this, null, buf); +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[0x1fffffff]|0 } return f'), this, null, buf); + + +// An unshifted literal constant byte index outside the range 0 to 2^31-1 inclusive should cause an error compiling. +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[0x20000000]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[0x3fffffff]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[0x40000000]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[0x7fffffff]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[0x80000000]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[0x8fffffff]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[0xffffffff]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[0x100000000]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int8Array(b); function f() {return arr[0x80000000]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int8Array(b); function f() {return arr[0xffffffff]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int8Array(b); function f() {return arr[0x100000000]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int16Array(b); function f() {return arr[-1]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[-2]|0 } return f'); + +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[10-12]|0 } return f'); + +// An intish shifted literal constant index should not fail to compile or link. +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int8Array(b); function f() {return arr[0x3fffffff>>0]|0 } return f'), this, null, buf)(), 0); +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[0x3fffffff>>2]|0 } return f'), this, null, buf)(), 0); +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int8Array(b); function f() {return arr[0xffffffff>>0]|0 } return f'), this, null, buf)(), 0); +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[0xffffffff>>2]|0 } return f'), this, null, buf)(), 0); +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int8Array(b); function f() {return arr[-1>>0]|0 } return f'), this, null, buf)(), 0); +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[-1>>2]|0 } return f'), this, null, buf)(), 0); +// Unsigned (intish) folded constant index. +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int8Array(b); function f() {return arr[0xffffffff>>>0]|0 } return f'), this, null, buf)(), 0); +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int8Array(b); function f() {arr[0] = 1; return arr[(0xffffffff+1)>>>0]|0 } return f'), this, null, buf)(), 1); + +// A non-intish shifted literal constant index should cause an error compiling. +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int8Array(b); function f() {return arr[0x100000000>>0]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int32Array(b); function f() {return arr[0x100000000>>2]|0 } return f'); + +// Folded non-intish constant expressions should cause an error compiling. +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + 'var arr=new glob.Int8Array(b); function f() {return arr[0xffffffff+1]|0 } return f'); diff --git a/js/src/jit-test/tests/asm.js/testBasic.js b/js/src/jit-test/tests/asm.js/testBasic.js new file mode 100644 index 0000000000..13cc7c455b --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBasic.js @@ -0,0 +1,173 @@ +load(libdir + "asm.js"); +load(libdir + "asserts.js"); + +assertAsmTypeFail(USE_ASM); +assertAsmTypeFail(USE_ASM + 'return'); +assertAsmTypeFail(USE_ASM + 'function f(){}'); +assertAsmTypeFail(USE_ASM + 'function f(){} return 0'); +assertAsmTypeFail(USE_ASM + 'function f(){} return g'); +assertAsmTypeFail(USE_ASM + 'function f(){} function f(){} return f'); +assertAsmTypeFail(USE_ASM + 'function f(){}; function g(){}; return {f, g}'); +assertAsmTypeFail(USE_ASM + 'var f = f;'); +assertAsmTypeFail(USE_ASM + 'var f=0; function f(){} return f'); +assertAsmTypeFail(USE_ASM + 'var f=glob.Math.imul; return {}'); +assertAsmTypeFail('glob', USE_ASM + 'var f=glob.Math.imul; function f(){} return f'); +assertAsmTypeFail('glob','foreign', USE_ASM + 'var f=foreign.foo; function f(){} return f'); +assertAsmTypeFail(USE_ASM + 'function f(){} var f=[f,f]; return f'); +assertAsmTypeFail('"use strict";' + USE_ASM + 'function f() {} return f'); +assertAsmTypeFail(USE_ASM + '"use strict"; function f() {} return f'); +assertAsmTypeFail(USE_ASM + '"use foopy" + 1; function f() {} return f'); +assertAsmTypeFail(USE_ASM + 'function f() { "use strict"; } return f'); +assertEq(asmLink(asmCompile(USE_ASM + '"use asm"; function f() {} return f'))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + '"use foopy"; function f() {} return f'))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + '"use foopy"; "use blarg"; function f() {} return f'))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + 'function f() { "use asm"; } return f'))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + 'function f() { "use foopy"; } return f'))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + 'function f() { "use foopy"; "use blarg"; } return f'))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(i) { "use foopy"; i=i|0; } return f'))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(i) { "use foopy"; "use asm"; i=i|0; } return f'))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + '"use warm"; function f(i) { "use cold"; i=i|0 } function g() { "use hot"; return 0 } return f'))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + '"use warm"; function f(i) { "use cold"; i=i|0 } function g() { "use asm"; return 0 } return f'))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(){} return f'))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(){;} return f'))(), undefined); +assertAsmTypeFail(USE_ASM + 'function f(i,j){;} return f'); +assertEq(asmLink(asmCompile('"use asm";; function f(){};;; return f;;'))(), undefined); +assertAsmTypeFail(USE_ASM + 'function f(x){} return f'); +assertAsmTypeFail(USE_ASM + 'function f(){if (0) return; return 1} return f'); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(x){x=x|0} return f'))(42), undefined); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(x){x=x|0; return x|0} return f'))(42), 42); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(x){x=x|0; return x|0;;;} return f'))(42), 42); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(x,y){x=x|0;y=y|0; return (x+y)|0} return f'))(44, -2), 42); +assertAsmTypeFail('a', USE_ASM + 'function a(){} return a'); +assertAsmTypeFail('a','b','c', USE_ASM + 'var c'); +assertAsmTypeFail('a','b','c', USE_ASM + 'var c=0'); +assertAsmTypeFail(USE_ASM + 'c=0;return {}'); +assertAsmTypeFail('x','x', USE_ASM + 'function a(){} return a'); +assertAsmTypeFail('x','y','x', USE_ASM + 'function a(){} return a'); +assertEq(asmLink(asmCompile('x', USE_ASM + 'function a(){} return a'))(), undefined); +assertEq(asmLink(asmCompile('x','y', USE_ASM + 'function a(){} return a'))(), undefined); +assertEq(asmLink(asmCompile('x','y','z', USE_ASM + 'function a(){} return a'))(), undefined); +assertAsmTypeFail('x','y', USE_ASM + 'function y(){} return f'); +assertEq(asmLink(asmCompile('x', USE_ASM + 'function f(){} return f'), 1, 2, 3)(), undefined); +assertEq(asmLink(asmCompile('x', USE_ASM + 'function f(){} return f'), 1)(), undefined); +assertEq(asmLink(asmCompile('x','y', USE_ASM + 'function f(){} return f'), 1, 2)(), undefined); + +assertEq(asmLink(asmCompile(USE_ASM + 'function f(i) {i=i|0} return f'))(42), undefined); +assertEq(asmLink(asmCompile(USE_ASM + 'function f() {var i=0;; var j=1;} return f'))(), undefined); // bug 877965 second part +assertAsmTypeFail(USE_ASM + 'function f(i) {i=i|0;var i} return f'); +assertAsmTypeFail(USE_ASM + 'function f(i) {i=i|0;var i=0} return f'); + +assertAsmTypeFail('glob', USE_ASM + 'var im=glob.imul; function f() {} return f'); +assertAsmLinkAlwaysFail(asmCompile('glob', USE_ASM + 'var im=glob.Math.imul; function f(i,j) {i=i|0;j=j|0; return im(i,j)|0} return f'), null); +assertAsmLinkAlwaysFail(asmCompile('glob', USE_ASM + 'var im=glob.Math.imul; function f(i,j) {i=i|0;j=j|0; return im(i,j)|0} return f'), {}); +assertAsmLinkAlwaysFail(asmCompile('glob', USE_ASM + 'var im=glob.Math.imul; function f(i,j) {i=i|0;j=j|0; return im(i,j)|0} return f'), {imul:Math.imul}); +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var im=glob.Math.imul; function f(i,j) {i=i|0;j=j|0; return im(i,j)|0} return f'), {Math:{imul:Math.imul}})(2,3), 6); +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var im=glob.Math.imul; function f(i,j) {i=i|0;j=j|0; return im(i,j)|0} return f'), this)(8,4), 32); + +var module = asmCompile('glob','i','b', USE_ASM + 'var i32=new glob.Int32Array(b); function f(){} return f'); +assertAsmLinkAlwaysFail(module, null, null); +assertAsmLinkFail(module, this, null, null); +assertAsmLinkFail(module, this, null, null); +assertAsmLinkAlwaysFail(module, this, null, new ArrayBuffer(1)); +assertAsmLinkFail(module, this, null, new ArrayBuffer(4)); +assertAsmLinkFail(module, this, null, new ArrayBuffer(100)); +assertAsmLinkFail(module, this, null, new ArrayBuffer(4092)); +assertAsmLinkFail(module, this, null, new ArrayBuffer(64000)); +assertAsmLinkFail(module, this, null, new ArrayBuffer(BUF_MIN+4)); +assertAsmLinkDeprecated(module, this, null, new ArrayBuffer(4096)); +assertAsmLinkDeprecated(module, this, null, new ArrayBuffer(2*4096)); +assertAsmLinkDeprecated(module, this, null, new ArrayBuffer(4*4096)); +assertAsmLinkDeprecated(module, this, null, new ArrayBuffer(32*1024)); +assertEq(asmLink(module, this, null, new ArrayBuffer(BUF_MIN))(), undefined); + +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i = i32[i]|0; return i|0}; return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i = i32[i>>1]|0; return i|0}; return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i = i32[i>>1]|0; return i|0}; return f'); +assertAsmLinkAlwaysFail(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i = i32[i>>2]|0; return i|0}; return f'), this, null, new ArrayBuffer(BUF_MIN-1)); +assertEq(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i = i32[i>>2]|0; return i|0}; return f')(this, null, new ArrayBuffer(BUF_MIN))(), 0); + +var exp = asmLink(asmCompile(USE_ASM + "return {}")); +assertEq(Object.keys(exp).length, 0); + +var exp = asmLink(asmCompile(USE_ASM + "function f() { return 3 } return {f:f,f:f}")); +assertEq(exp.f(), 3); +assertEq(Object.keys(exp).join(), 'f'); + +var exp = asmLink(asmCompile(USE_ASM + "function f() { return 4 } return {f1:f,f2:f}")); +assertEq(exp.f1(), 4); +assertEq(exp.f2(), 4); +assertEq(Object.keys(exp).sort().join(), 'f1,f2'); +assertEq(exp.f1, exp.f2); + +assertAsmTypeFail(USE_ASM + "function f() { return 3 } return {1:f}"); +assertAsmTypeFail(USE_ASM + "function f() { return 3 } return {__proto__:f}"); +assertAsmTypeFail(USE_ASM + "function f() { return 3 } return {get x() {} }"); + +var exp = asmLink(asmCompile(USE_ASM + 'function internal() { return ((g()|0)+2)|0 } function f() { return 1 } function g() { return 2 } function h() { return internal()|0 } return {f:f,g1:g,h1:h}')); +assertEq(exp.f(), 1); +assertEq(exp.g1(), 2); +assertEq(exp.h1(), 4); +assertEq(Object.keys(exp).join(), 'f,g1,h1'); + +// can't test destructuring args with Function constructor +function assertTypeFailInEval(str) +{ + if (!isAsmJSCompilationAvailable()) + return; + + assertWarning(() => { + eval(str); + }, /asm.js type error:/) +} +assertTypeFailInEval('function f({}) { "use asm"; function g() {} return g }'); +assertTypeFailInEval('function f({global}) { "use asm"; function g() {} return g }'); +assertTypeFailInEval('function f(global, {imports}) { "use asm"; function g() {} return g }'); +assertTypeFailInEval('function f(g = 2) { "use asm"; function g() {} return g }'); +assertTypeFailInEval('function *f() { "use asm"; function g() {} return g }'); +assertAsmTypeFail(USE_ASM + 'function *f(){}'); +assertTypeFailInEval('f => { "use asm"; function g() {} return g }'); +assertTypeFailInEval('var f = { method() {"use asm"; return {}} }'); +assertAsmTypeFail(USE_ASM + 'return {m() {}};'); +assertTypeFailInEval('var f = { get p() {"use asm"; return {}} }'); +assertAsmTypeFail(USE_ASM + 'return {get p() {}};'); +assertTypeFailInEval('var f = { set p(x) {"use asm"; return {}} }'); +assertAsmTypeFail(USE_ASM + 'return {set p(x) {}};'); +assertTypeFailInEval('class f { constructor() {"use asm"; return {}} }'); +assertAsmTypeFail(USE_ASM + 'class c { constructor() {}}; return c;'); + +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'var)') }, SyntaxError); +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'return)') }, SyntaxError); +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'var z=-2w') }, SyntaxError); +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'var z=-2w;') }, SyntaxError); +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'function') }, SyntaxError); +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'function f') }, SyntaxError); +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'function f(') }, SyntaxError); +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'function f()') }, SyntaxError); +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'function f() {') }, SyntaxError); +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'function f() {} var') }, SyntaxError); +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'function f() {} var TBL=-2w; return f') }, SyntaxError); +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'function f() {} var TBL=-2w return f') }, SyntaxError); +assertThrowsInstanceOf(function() { new Function(USE_ASM + 'function () {}') }, SyntaxError); +assertNoWarning(function() { parse("function f() { 'use asm'; function g() {} return g }") }); + +// Test asm.js->asm.js, wasm->asm.js, asm.js->wasm imports: + +var f = asmLink(asmCompile(USE_ASM + 'function f() {} return f')); +var g = asmLink(asmCompile('glob', 'ffis', USE_ASM + 'var f = ffis.f; function g() { return f(1)|0; } return g'), null, {f}); +assertEq(g(), 0); + +if (wasmIsSupported()) { + var h = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`(module + (import "imp" "f" (func $f (param i32) (result i32))) + (func $h (result i32) (call $f (i32.const 1))) + (export "h" (func $h)) + )`)), {imp:{f}}).exports.h; + assertEq(h(), 0); + + var i = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`(module (func $i) (export "i" (func $i)))`))).exports.i + var j = asmLink(asmCompile('glob', 'ffis', USE_ASM + 'var i = ffis.i; function j() { return i(1)|0; } return j'), null, {i}); + assertEq(j(), 0); +} + +var exp = asmLink(asmCompile(USE_ASM + "function f() { return 0 } return {f:f}")); +assertEq(Object.isFrozen(exp), false); diff --git a/js/src/jit-test/tests/asm.js/testBug1046688.js b/js/src/jit-test/tests/asm.js/testBug1046688.js new file mode 100644 index 0000000000..8c71543bea --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1046688.js @@ -0,0 +1,11 @@ +enableGeckoProfiling(); +for (var j = 0; j < 1000; ++j) { + (function(stdlib) { + "use asm"; + var pow = stdlib.Math.pow; + function f() { + return +pow(.0, .0) + } + return f; +})(this)() +} diff --git a/js/src/jit-test/tests/asm.js/testBug1057248.js b/js/src/jit-test/tests/asm.js/testBug1057248.js new file mode 100644 index 0000000000..39aeffe290 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1057248.js @@ -0,0 +1,133 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer || !isAsmJSCompilationAvailable() + +Random = { + weighted: function(wa) { + var a = []; + for (var i = 0; i < wa.length; ++i) { + for (var j = 0; j < wa[i]; ++j) {} + } + } +} +s = (function() { + Random.weighted([{ + n() {} + }, { + n() {} + }, { + n() {} + }, { + w: 5, + n() {} + } + ]) +})() +var builtinObjectNames = []; +(function() { + function exploreDeeper(a, a) { + var s = Object.getOwnPropertyNames(a) + for (var j = 0; j < s.length; ++j) { + if (typeof h == "" && n != "") {} + } + builtinObjectNames.push() + } + exploreDeeper(Math, "") +})(this, false) +r = autoExpr(Random.weighted([])); +r = autoExpr(Random.weighted([])); +(Random.weighted([])); +r = (Random.weighted([])) +v = autoExpr(Random.weighted([]), true); +r = autoExpr(Random.weighted([{ + n() {} + } +]), true) +function autoExpr() {} +function makeStatement() {} +s = Random.weighted([{ + n() {} + } +]) +a = Random.weighted([{}, {}, {}, {}, {}, { + n() {} + } +]) +a = Random.weighted([{ + n() {} + }, {}, {} +]) +var recursiveFunctions = [{ + text: "(function(){{}})" + }, { + text: "(function(){if(0){}(1)})", + n() {} + }, { + text: "(function(){t:[]()})", + n() {} + }, { + text: "(function(){g()})", + n() {} + } +]; +(function s() { + for (var i = 0; i < recursiveFunctions.length; ++i) { + a = recursiveFunctions[i]; + var text = a.text + a = eval(text.replace(/@/, "")) + } + function g() {} + s = Random.weighted([{ + w: 1, + n() {} + }, { + n() {} + }, // + { + n() {} + }, // + { + n() {} + }, { + w: 0, + n() {} + }, { + n() {} + }, { + n() {} + }, { + w: 1, + n() {} + }, { + w: makeStatement + }, { + w: 5 + } + ]) + t = function() {} + function c() {} +})() +function testMathyFunction(f, inputs) { + var r = []; + for (var j = 0; j < inputs.length; ++j) { + for (var k = 0; k < inputs.length; ++k) { + try { + f(inputs[j]) + } catch (e) {} + } + } + JSON.stringify([]) +} +mathy2 = (function(stdlib, foreign, heap) { + "use asm"; + var Float32ArrayView = new stdlib.Float32Array(heap) + function f(i0) { + i0 = i0 | 0; + (Float32ArrayView[-i0 >> 2]) = 1. + } + return f +})(this, { +}, new SharedArrayBuffer(4096)) +testMathyFunction(mathy2, [-0]) +mathy5 = (function(y) { + ((function() {})(mathy2(y)())) +}) +testMathyFunction(mathy5, [Math.PI]) diff --git a/js/src/jit-test/tests/asm.js/testBug1111327.js b/js/src/jit-test/tests/asm.js/testBug1111327.js new file mode 100644 index 0000000000..340de77e1a --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1111327.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !getBuildConfiguration("arm-simulator") +// Single-step profiling currently only works in the ARM simulator + +load(libdir + "asm.js"); + +enableGeckoProfiling(); +enableSingleStepProfiling(); +var m = asmCompile(USE_ASM + 'function f() {} return f'); +asmLink(m)(); +asmLink(m)(); diff --git a/js/src/jit-test/tests/asm.js/testBug1117255.js b/js/src/jit-test/tests/asm.js/testBug1117255.js new file mode 100644 index 0000000000..8033705325 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1117255.js @@ -0,0 +1,16 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") + +function f(stdlib, foreign, buffer) { + "use asm"; + var i32 = new stdlib.Int32Array(buffer); + function g(i) { + i=i|0; + var j=0; + for (; (j>>>0) < 100000; j=(j+1)|0) + i32[i>>2] = j; + } + return g +} +var g = f(this, null, new ArrayBuffer(1<<16)); +timeout(.1, function cb() { return true }); +g(1<<16); diff --git a/js/src/jit-test/tests/asm.js/testBug1125561.js b/js/src/jit-test/tests/asm.js/testBug1125561.js new file mode 100644 index 0000000000..9d0d99ca43 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1125561.js @@ -0,0 +1,47 @@ +load(libdir + "asm.js"); + +setJitCompilerOption("ion.warmup.trigger", 0); +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("offthread-compilation.enable", 0); + +function ffi1() { assertJitStackInvariants() } +function ffi2() { return { valueOf() { assertJitStackInvariants() } } } + +// FFI with no coercion +var m = asmCompile('stdlib', 'foreign', ` + "use asm"; + var ffi = foreign.ffi; + function f() { ffi(); } + return f +`); +var f = asmLink(m, null, {ffi:ffi1}); +f(); +f(); + +// FFI with ToInt32 coercion +var m = asmCompile('stdlib', 'foreign', ` + "use asm"; + var ffi = foreign.ffi; + function f() { ffi() | 0; } + return f +`); +var f = asmLink(m, null, {ffi:ffi1}); +f(); +f(); +var f = asmLink(m, null, {ffi:ffi2}); +f(); +f(); + +// FFI with ToNumber coercion +var m = asmCompile('stdlib', 'foreign', ` + "use asm"; + var ffi = foreign.ffi; + function f() { +ffi(); } + return f +`); +var f = asmLink(m, this, {ffi:ffi1}); +f(); +f(); +var f = asmLink(m, this, {ffi:ffi2}); +f(); +f(); diff --git a/js/src/jit-test/tests/asm.js/testBug1147144-2.js b/js/src/jit-test/tests/asm.js/testBug1147144-2.js new file mode 100644 index 0000000000..b5b6a45958 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1147144-2.js @@ -0,0 +1,17 @@ +// |jit-test| skip-if: !isAsmJSCompilationAvailable()||!Function.prototype.toSource + +function test() { +load(libdir + 'asm.js'); +load(libdir + 'asserts.js'); + +assertEq(eval(`(function asmModule() { "use asm"; function asmFun() {} return asmFun })`).toSource(), "(function asmModule() {\n [native code]\n})"); +assertEq(eval(`(function asmModule() { "use asm"; function asmFun() {} return asmFun })`)().toSource(), "function asmFun() {\n [native code]\n}"); +assertEq((evaluate(`function asmModule2() { "use asm"; function asmFun() {} return asmFun }`), asmModule2).toSource(), "function asmModule2() {\n [native code]\n}"); +assertEq((evaluate(`function asmModule4() { "use asm"; function asmFun() {} return asmFun }`), asmModule4)().toSource(), "function asmFun() {\n [native code]\n}"); +assertEq(asmCompile(USE_ASM + `function asmFun() {} return asmFun`).toSource(), "(function anonymous() {\n [native code]\n})"); +assertEq(asmCompile(USE_ASM + `function asmFun() {} return asmFun`)().toSource(), "function asmFun() {\n [native code]\n}"); +} + +var g = newGlobal({ discardSource: true }); +g.libdir = libdir; +g.evaluate(test.toString() + "test()"); diff --git a/js/src/jit-test/tests/asm.js/testBug1147144.js b/js/src/jit-test/tests/asm.js/testBug1147144.js new file mode 100644 index 0000000000..8c1f214e25 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1147144.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: !isAsmJSCompilationAvailable() + +function test() { +load(libdir + 'asm.js'); +load(libdir + 'asserts.js'); + +assertEq(eval(`(function asmModule() { "use asm"; function asmFun() {} return asmFun })`).toString(), "function asmModule() {\n [native code]\n}"); +assertEq(eval(`(function asmModule() { "use asm"; function asmFun() {} return asmFun })`)().toString(), "function asmFun() {\n [native code]\n}"); +assertEq((evaluate(`function asmModule1() { "use asm"; function asmFun() {} return asmFun }`), asmModule1).toString(), "function asmModule1() {\n [native code]\n}"); +assertEq((evaluate(`function asmModule3() { "use asm"; function asmFun() {} return asmFun }`), asmModule3)().toString(), "function asmFun() {\n [native code]\n}"); +assertEq(asmCompile(USE_ASM + `function asmFun() {} return asmFun`).toString(), "function anonymous() {\n [native code]\n}"); +assertEq(asmCompile(USE_ASM + `function asmFun() {} return asmFun`)().toString(), "function asmFun() {\n [native code]\n}"); +assertThrowsInstanceOf(()=>asmCompile('stdlib',USE_ASM + "var sin=stdlib.Math.sin;return {}")({Math:{}}), Error); +} + +var g = newGlobal({ discardSource: true }); +g.libdir = libdir; +g.evaluate(test.toString() + "test()"); diff --git a/js/src/jit-test/tests/asm.js/testBug1219098.js b/js/src/jit-test/tests/asm.js/testBug1219098.js new file mode 100644 index 0000000000..6096f2685f --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1219098.js @@ -0,0 +1,14 @@ +load(libdir + "asm.js"); + +var bigScript = ` + function wee() { return 42 } + function asmModule() { 'use asm'; function f() { return 43 } return f} +` + ' '.repeat(10 * 1024 * 1024); + +eval(bigScript); + +if (isAsmJSCompilationAvailable()) + assertEq(isAsmJSModule(asmModule), true); + +assertEq(wee(), 42); +assertEq(eval('(' + wee.toString() + ')')(), 42); diff --git a/js/src/jit-test/tests/asm.js/testBug1236484.js b/js/src/jit-test/tests/asm.js/testBug1236484.js new file mode 100644 index 0000000000..61a8b49dc5 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1236484.js @@ -0,0 +1,10 @@ +var lfcode = new Array(); +lfcode.push("gczeal(2, 1);"); +lfcode.push(` +function test(stdlib, foreign) { + "use asm" + function f(y) {} + return f +}`); +for (var i = 0; i < 2; ++i) + evaluate(lfcode.shift()); diff --git a/js/src/jit-test/tests/asm.js/testBug1236541.js b/js/src/jit-test/tests/asm.js/testBug1236541.js new file mode 100644 index 0000000000..baa6517915 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1236541.js @@ -0,0 +1,15 @@ +enableGeckoProfiling(); + +function mod() { + "use asm"; + function f(i0) { + i0 = i0 | 0 + switch (0) { + case 0: + } + } + return f; +} + +mod()(); +mod()(); diff --git a/js/src/jit-test/tests/asm.js/testBug1236552.js b/js/src/jit-test/tests/asm.js/testBug1236552.js new file mode 100644 index 0000000000..b91a170406 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1236552.js @@ -0,0 +1,3 @@ +g = newGlobal({newCompartment: true}); +Debugger(g).memory.trackingAllocationSites = true; +evaluate("function h() { 'use asm'; return {}}", { global: g }); diff --git a/js/src/jit-test/tests/asm.js/testBug1255954.js b/js/src/jit-test/tests/asm.js/testBug1255954.js new file mode 100644 index 0000000000..004136bc18 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1255954.js @@ -0,0 +1,12 @@ +// |jit-test| slow; skip-if: !('oomTest' in this) + +const USE_ASM = '"use asm";'; +function asmCompile() { + var f = Function.apply(null, arguments); +} +oomTest(() => { + try { + function f(b) {} + } catch (exc0) {} + f(asmCompile(USE_ASM + "function f() { var i=42; return i|0; for(;1;) {} return 0 } return f")); +}); diff --git a/js/src/jit-test/tests/asm.js/testBug1291887.js b/js/src/jit-test/tests/asm.js/testBug1291887.js new file mode 100644 index 0000000000..7632f0bf3b --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1291887.js @@ -0,0 +1,13 @@ +(function(stdlib) { + "use asm" + var log = stdlib.Math.log + + function f(x) { + x = +x + var y = 3. + return 0, y + return +log(x) + y + } + + return f +})(this) diff --git a/js/src/jit-test/tests/asm.js/testBug1301191.js b/js/src/jit-test/tests/asm.js/testBug1301191.js new file mode 100644 index 0000000000..14fc21a9f5 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1301191.js @@ -0,0 +1,24 @@ +// |jit-test| exitstatus:6; skip-if: getBuildConfiguration("wasi") +timeout(1); +// Adapted from randomly chosen test: js/src/jit-test/tests/asm.js/testBug975182.js +(function() { + g = (function(t, foreign) { + "use asm"; + var ff = foreign.ff; + function f() { + ff() + } + return f + })(this, { + ff: arguments.callee + }) +})() +function m(f) { + var i = 0; + while (true) { + f(); + if ((i++ % 1000) === 0) + gc(); + } +} +m(g); diff --git a/js/src/jit-test/tests/asm.js/testBug1357053.js b/js/src/jit-test/tests/asm.js/testBug1357053.js new file mode 100644 index 0000000000..054e2e35ad --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1357053.js @@ -0,0 +1,15 @@ +// |jit-test| --arm-asm-nop-fill=1 + +try { + enableSingleStepProfiling(); + disableSingleStepProfiling(); +} catch(e) { + // Single step profiling not supported here. + quit(); +} + +enableGeckoProfiling(); +var m = new Function('g', "'use asm'; var tof=g.Math.fround; var fun=g.Math.ceil; function f(d) { d=tof(d); return tof(fun(d)) } return f"); +var f = m(this); +enableSingleStepProfiling(); +f(.1); diff --git a/js/src/jit-test/tests/asm.js/testBug1359612.js b/js/src/jit-test/tests/asm.js/testBug1359612.js new file mode 100644 index 0000000000..f2a2255322 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1359612.js @@ -0,0 +1,9 @@ +load(libdir + 'asm.js'); + +asmLink(asmCompile('stdlib', 'foreign', USE_ASM + ` + var ff = foreign.ff; + function f() { + ff(+1); + } + return f +`), this, { ff: Math.log1p }); diff --git a/js/src/jit-test/tests/asm.js/testBug1360390.js b/js/src/jit-test/tests/asm.js/testBug1360390.js new file mode 100644 index 0000000000..eadd57876c --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1360390.js @@ -0,0 +1,13 @@ +load(libdir + "asm.js"); + +var code = ` + "use asm"; + var ff = foreign.ff; + function f(x) { + x = +x + return ~~x + (ff(3 ^ 9 / 7), 1) & 1; + } + return f; +`; + +assertEq(asmLink(asmCompile("b", "foreign", code), 0, { ff: decodeURIComponent })(Infinity), 1); diff --git a/js/src/jit-test/tests/asm.js/testBug1437534.js b/js/src/jit-test/tests/asm.js/testBug1437534.js new file mode 100644 index 0000000000..ca6daf2b5e --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1437534.js @@ -0,0 +1,19 @@ +let __v_11662 = `(function module() { "use asm";function foo(`; +const __v_11663 = +551; +for (let __v_11665 = 0; __v_11665 < __v_11663; ++__v_11665) { + __v_11662 += `arg${__v_11665},`; +} +try { + __v_11662 += `arg${__v_11663}){`; +} catch (e) {} +for (let __v_11666 = 0; __v_11666 <= __v_11663; ++__v_11666) { + __v_11662 += `arg${__v_11666}=+arg${__v_11666};`; +} + __v_11662 += "return 10;}function bar(){return foo("; +for (let __v_11667 = 0; __v_11667 < __v_11663; ++__v_11667) { + __v_11662 += "0.0,"; +} + __v_11662 += "1.0)|0;}"; + __v_11662 += "return bar})()()"; +const __v_11664 = eval(__v_11662); \ No newline at end of file diff --git a/js/src/jit-test/tests/asm.js/testBug1437546.js b/js/src/jit-test/tests/asm.js/testBug1437546.js new file mode 100644 index 0000000000..d8f45fcd27 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1437546.js @@ -0,0 +1,6 @@ +const __v_16876 = 50000; +const __v_16877 = '"use asm";\nfunction f() { LOCALS }\nreturn f;'; +for (var __v_16878 = __v_16876; __v_16878 < __v_16876 + 2; ++__v_16878) { + const __v_16879 = __v_16877.replace('LOCALS', Array(__v_16878).fill().map((__v_16882, __v_16883) => 'var l' + __v_16883 + ' = 0;').join('\n')); + const __v_16880 = new Function(__v_16879); +} \ No newline at end of file diff --git a/js/src/jit-test/tests/asm.js/testBug1674353.js b/js/src/jit-test/tests/asm.js/testBug1674353.js new file mode 100644 index 0000000000..44d0c76c71 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug1674353.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: getBuildConfiguration("pointer-byte-size") != 8 + +var stdlib = this; +// The significance of this constant is that it is a 31-bit value that is larger +// than the largest valid wasm32 heap size on 32-bit platforms -- valid sizes +// are limited to floor(INT32_MAX/64K). It is however not a valid asm.js heap +// length, because too many of the low-order bits are set. +var buffer = new ArrayBuffer((2097120) * 1024); +m = (function Module(stdlib, foreign, heap) { + "use asm"; + var mem = new stdlib.Int16Array(heap); + return {}; +})(stdlib, {}, buffer); diff --git a/js/src/jit-test/tests/asm.js/testBug855442.js b/js/src/jit-test/tests/asm.js/testBug855442.js new file mode 100644 index 0000000000..cd95449f01 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug855442.js @@ -0,0 +1,8 @@ +gczeal(2,4); +function asmModule(g, foreign, heap) { + "use asm"; + var HEAP8 = new g.Int8Array(heap); + function f() {} + return {f: f}; +} +asmModule(this, 2, new ArrayBuffer(2048)); diff --git a/js/src/jit-test/tests/asm.js/testBug863867.js b/js/src/jit-test/tests/asm.js/testBug863867.js new file mode 100644 index 0000000000..4d5a2dce18 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug863867.js @@ -0,0 +1,34 @@ +assertEq((function() { + 'use asm'; + function _main() { + var $1=0, $2=0, $3=0, $4=0, $5=0, $6=0, $7=0, $8=0, $9=0, $10=0, label=0; + label = 1; + while (1) { + switch (label | 0) { + case 1: + $2 = $1 + 14 | 0; + $3 = $1; + label = 20; + break; + case 20: + $5 = $2; + $4 = $3; + label = 24; + break; + case 24: + $7 = $5 + 1 | 0; + $8 = $4 + 1 | 0; + return $8|0; + case 49: + $9 = $6 + 1 | 0; + if ($10) { + $6 = $9; + break; + } + return 0; + } + } + return 0; + } + return _main; +})()(), 1); diff --git a/js/src/jit-test/tests/asm.js/testBug878435.js b/js/src/jit-test/tests/asm.js/testBug878435.js new file mode 100644 index 0000000000..965b280025 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug878435.js @@ -0,0 +1,11 @@ +function g() +{ + "use asm"; + function f() + { + return (0 > (0x80000000 | 0)) | 0; + } + return f; +} + +assertEq(g()(), (0 > (0x80000000 | 0)) | 0); diff --git a/js/src/jit-test/tests/asm.js/testBug878495.js b/js/src/jit-test/tests/asm.js/testBug878495.js new file mode 100644 index 0000000000..a4c01f4d4f --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug878495.js @@ -0,0 +1,10 @@ +var disassemble = disassemble || false; +if (disassemble) +{ + disassemble("-r", (function() { + (function() { + "use asm" + return {} + })() + })) +} diff --git a/js/src/jit-test/tests/asm.js/testBug878520.js b/js/src/jit-test/tests/asm.js/testBug878520.js new file mode 100644 index 0000000000..fbc3358720 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug878520.js @@ -0,0 +1,9 @@ +function surprise(depth) { + arguments.callee.caller(depth); +} + +(function(depth) { + function foo() { function asmModule() { 'use asm'; return {} } }; + if (depth) + surprise(depth - 1); +})(2); diff --git a/js/src/jit-test/tests/asm.js/testBug892291.js b/js/src/jit-test/tests/asm.js/testBug892291.js new file mode 100644 index 0000000000..9e0ae97610 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug892291.js @@ -0,0 +1,10 @@ +function a(stdlib) { + "use asm"; + var imul = stdlib.Math.imul; + function f() { + return ((imul(-800, 0xf8ba1243)|0) % -1)|0; + } + return f; +} +var f = a(this); +assertEq(f(), 0); diff --git a/js/src/jit-test/tests/asm.js/testBug893364.js b/js/src/jit-test/tests/asm.js/testBug893364.js new file mode 100644 index 0000000000..8a0eadd35f --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug893364.js @@ -0,0 +1,14 @@ +function m() +{ + "use asm"; + function f() + { + var x = 0; + var y = 0; + x = (((0x77777777 - 0xcccccccc) | 0) % -1) | 0; + y = (((0x7FFFFFFF + 0x7FFFFFFF) | 0) % -1) | 0; + return (x+y)|0; + } + return f; +} +assertEq(m()(), 0) diff --git a/js/src/jit-test/tests/asm.js/testBug893368.js b/js/src/jit-test/tests/asm.js/testBug893368.js new file mode 100644 index 0000000000..b149390e77 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug893368.js @@ -0,0 +1,13 @@ +function m(stdlib) +{ + "use asm"; + var abs = stdlib.Math.abs; + function f(p) + { + p = p|0; + return ((abs(p|0)|0) % 3)|0; + } + return f; +} +var f = m(this); +assertEq(f(0x80000000), -2); diff --git a/js/src/jit-test/tests/asm.js/testBug907085.js b/js/src/jit-test/tests/asm.js/testBug907085.js new file mode 100644 index 0000000000..fb35331dfb --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug907085.js @@ -0,0 +1,22 @@ +try { + s.e +} catch (e) {} +o = o = s2 = /x/ +for (let e in []); +x = s2 +schedulegc(21) +eval("x.e=x.t") +try { + (function() { + this.eval("\ + (function(stdlib,fgn,heap) {\ + \"use asm\";\ + var Vie = new stdlib.Float64Array(heap);\ + var Iew = new stdlib.Int8Array(heap);\ + function f(){\ + ent\ + }\ + })()\ + ") + })() +} catch (e) {} diff --git a/js/src/jit-test/tests/asm.js/testBug952022.js b/js/src/jit-test/tests/asm.js/testBug952022.js new file mode 100644 index 0000000000..12f5d71f8d --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug952022.js @@ -0,0 +1,57 @@ +function g(f) { + for (var j = 0; j < 9; ++j) { + try { + f() + } catch (e) {} + } +} +function h(code) { + Function(code)(); +} +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +g([]); +h("\ + m = (function(stdlib, foreign) { \ + \"use asm\";\ + var ff=foreign.ff;\ + function f(){\ + ff(0);\ + } \ + return f \ + })(this , { \ + ff: arguments.callee.caller\ + });\ + g(m , []);\ +"); +h("\ + m = undefined;\ + gc();\ +") diff --git a/js/src/jit-test/tests/asm.js/testBug965767.js b/js/src/jit-test/tests/asm.js/testBug965767.js new file mode 100644 index 0000000000..95ddc6522d --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug965767.js @@ -0,0 +1,2098 @@ +var buffer = new ArrayBuffer(4096); + +function testmod (glob, env, b) { + 'use asm'; + var f32=new glob.Float32Array(b) + function fn1() { + f32[0 >> 2]=2.0 + f32[4 >> 2]=2.125 + f32[8 >> 2]=2.25 + f32[12 >> 2]=2.375 + f32[16 >> 2]=2.5 + f32[20 >> 2]=2.625 + f32[24 >> 2]=2.75 + f32[28 >> 2]=2.875 + f32[32 >> 2]=3.0 + f32[36 >> 2]=3.125 + f32[40 >> 2]=3.25 + f32[44 >> 2]=3.375 + f32[48 >> 2]=3.5 + f32[52 >> 2]=3.625 + f32[56 >> 2]=3.75 + f32[60 >> 2]=3.875 + f32[64 >> 2]=4.0 + f32[68 >> 2]=4.25 + f32[72 >> 2]=4.5 + f32[76 >> 2]=4.75 + f32[80 >> 2]=5.0 + f32[84 >> 2]=5.25 + f32[88 >> 2]=5.5 + f32[92 >> 2]=5.75 + f32[96 >> 2]=6.0 + f32[100 >> 2]=6.25 + f32[104 >> 2]=6.5 + f32[108 >> 2]=6.75 + f32[112 >> 2]=7.0 + f32[116 >> 2]=7.25 + f32[120 >> 2]=7.5 + f32[124 >> 2]=7.75 + f32[128 >> 2]=8.0 + f32[132 >> 2]=8.5 + f32[136 >> 2]=9.0 + f32[140 >> 2]=9.5 + f32[144 >> 2]=10.0 + f32[148 >> 2]=10.5 + f32[152 >> 2]=11.0 + f32[156 >> 2]=11.5 + f32[160 >> 2]=12.0 + f32[164 >> 2]=12.5 + f32[168 >> 2]=13.0 + f32[172 >> 2]=13.5 + f32[176 >> 2]=14.0 + f32[180 >> 2]=14.5 + f32[184 >> 2]=15.0 + f32[188 >> 2]=15.5 + f32[192 >> 2]=16.0 + f32[196 >> 2]=17.0 + f32[200 >> 2]=18.0 + f32[204 >> 2]=19.0 + f32[208 >> 2]=20.0 + f32[212 >> 2]=21.0 + f32[216 >> 2]=22.0 + f32[220 >> 2]=23.0 + f32[224 >> 2]=24.0 + f32[228 >> 2]=25.0 + f32[232 >> 2]=26.0 + f32[236 >> 2]=27.0 + f32[240 >> 2]=28.0 + f32[244 >> 2]=29.0 + f32[248 >> 2]=30.0 + f32[252 >> 2]=31.0 + f32[256 >> 2]=0.125 + f32[260 >> 2]=0.1328125 + f32[264 >> 2]=0.140625 + f32[268 >> 2]=0.1484375 + f32[272 >> 2]=0.15625 + f32[276 >> 2]=0.1640625 + f32[280 >> 2]=0.171875 + f32[284 >> 2]=0.1796875 + f32[288 >> 2]=0.1875 + f32[292 >> 2]=0.1953125 + f32[296 >> 2]=0.203125 + f32[300 >> 2]=0.2109375 + f32[304 >> 2]=0.21875 + f32[308 >> 2]=0.2265625 + f32[312 >> 2]=0.234375 + f32[316 >> 2]=0.2421875 + f32[320 >> 2]=0.25 + f32[324 >> 2]=0.265625 + f32[328 >> 2]=0.28125 + f32[332 >> 2]=0.296875 + f32[336 >> 2]=0.3125 + f32[340 >> 2]=0.328125 + f32[344 >> 2]=0.34375 + f32[348 >> 2]=0.359375 + f32[352 >> 2]=0.375 + f32[356 >> 2]=0.390625 + f32[360 >> 2]=0.40625 + f32[364 >> 2]=0.421875 + f32[368 >> 2]=0.4375 + f32[368 >> 2]=0.4375 + f32[372 >> 2]=0.453125 + f32[376 >> 2]=0.46875 + f32[380 >> 2]=0.484375 + f32[384 >> 2]=0.5 + f32[388 >> 2]=0.53125 + f32[392 >> 2]=0.5625 + f32[396 >> 2]=0.59375 + f32[400 >> 2]=0.625 + f32[404 >> 2]=0.65625 + f32[408 >> 2]=0.6875 + f32[412 >> 2]=0.71875 + f32[416 >> 2]=0.75 + f32[420 >> 2]=0.78125 + f32[424 >> 2]=0.8125 + f32[428 >> 2]=0.84375 + f32[432 >> 2]=0.875 + f32[436 >> 2]=0.90625 + f32[440 >> 2]=0.9375 + f32[444 >> 2]=0.96875 + f32[448 >> 2]=1.0 + f32[452 >> 2]=1.0625 + f32[456 >> 2]=1.125 + f32[460 >> 2]=1.1875 + f32[464 >> 2]=1.25 + f32[468 >> 2]=1.3125 + f32[472 >> 2]=1.375 + f32[476 >> 2]=1.4375 + f32[480 >> 2]=1.5 + f32[484 >> 2]=1.5625 + f32[488 >> 2]=1.625 + f32[492 >> 2]=1.6875 + f32[496 >> 2]=1.75 + f32[500 >> 2]=1.8125 + f32[504 >> 2]=1.875 + f32[508 >> 2]=1.9375 + f32[512 >> 2]=-2.0 + f32[516 >> 2]=-2.125 + f32[520 >> 2]=-2.25 + f32[524 >> 2]=-2.375 + f32[528 >> 2]=-2.5 + f32[532 >> 2]=-2.625 + f32[536 >> 2]=-2.75 + f32[540 >> 2]=-2.875 + f32[544 >> 2]=-3.0 + f32[548 >> 2]=-3.125 + f32[552 >> 2]=-3.25 + f32[556 >> 2]=-3.375 + f32[560 >> 2]=-3.5 + f32[564 >> 2]=-3.625 + f32[568 >> 2]=-3.75 + f32[572 >> 2]=-3.875 + f32[576 >> 2]=-4.0 + f32[580 >> 2]=-4.25 + f32[584 >> 2]=-4.5 + f32[588 >> 2]=-4.75 + f32[592 >> 2]=-5.0 + f32[596 >> 2]=-5.25 + f32[600 >> 2]=-5.5 + f32[604 >> 2]=-5.75 + f32[608 >> 2]=-6.0 + f32[612 >> 2]=-6.25 + f32[616 >> 2]=-6.5 + f32[620 >> 2]=-6.75 + f32[624 >> 2]=-7.0 + f32[628 >> 2]=-7.25 + f32[632 >> 2]=-7.5 + f32[636 >> 2]=-7.75 + f32[640 >> 2]=-8.0 + f32[644 >> 2]=-8.5 + f32[648 >> 2]=-9.0 + f32[652 >> 2]=-9.5 + f32[656 >> 2]=-10.0 + f32[660 >> 2]=-10.5 + f32[664 >> 2]=-11.0 + f32[668 >> 2]=-11.5 + f32[672 >> 2]=-12.0 + f32[676 >> 2]=-12.5 + f32[680 >> 2]=-13.0 + f32[684 >> 2]=-13.5 + f32[688 >> 2]=-14.0 + f32[692 >> 2]=-14.5 + f32[696 >> 2]=-15.0 + f32[700 >> 2]=-15.5 + f32[704 >> 2]=-16.0 + f32[708 >> 2]=-17.0 + f32[712 >> 2]=-18.0 + f32[716 >> 2]=-19.0 + f32[720 >> 2]=-20.0 + f32[724 >> 2]=-21.0 + f32[728 >> 2]=-22.0 + f32[732 >> 2]=-23.0 + f32[736 >> 2]=-24.0 + f32[740 >> 2]=-25.0 + f32[744 >> 2]=-26.0 + f32[748 >> 2]=-27.0 + f32[752 >> 2]=-28.0 + f32[756 >> 2]=-29.0 + f32[760 >> 2]=-30.0 + f32[764 >> 2]=-31.0 + f32[768 >> 2]=-0.125 + f32[768 >> 2]=-0.125 + f32[772 >> 2]=-0.1328125 + f32[776 >> 2]=-0.140625 + f32[780 >> 2]=-0.1484375 + f32[784 >> 2]=-0.15625 + f32[788 >> 2]=-0.1640625 + f32[792 >> 2]=-0.171875 + f32[796 >> 2]=-0.1796875 + f32[800 >> 2]=-0.1875 + f32[804 >> 2]=-0.1953125 + f32[808 >> 2]=-0.203125 + f32[812 >> 2]=-0.2109375 + f32[816 >> 2]=-0.21875 + f32[820 >> 2]=-0.2265625 + f32[824 >> 2]=-0.234375 + f32[828 >> 2]=-0.2421875 + f32[832 >> 2]=-0.25 + f32[836 >> 2]=-0.265625 + f32[840 >> 2]=-0.28125 + f32[844 >> 2]=-0.296875 + f32[848 >> 2]=-0.3125 + f32[852 >> 2]=-0.328125 + f32[856 >> 2]=-0.34375 + f32[860 >> 2]=-0.359375 + f32[864 >> 2]=-0.375 + f32[868 >> 2]=-0.390625 + f32[872 >> 2]=-0.40625 + f32[876 >> 2]=-0.421875 + f32[880 >> 2]=-0.4375 + f32[884 >> 2]=-0.453125 + f32[888 >> 2]=-0.46875 + f32[892 >> 2]=-0.484375 + f32[896 >> 2]=-0.5 + f32[900 >> 2]=-0.53125 + f32[904 >> 2]=-0.5625 + f32[908 >> 2]=-0.59375 + f32[912 >> 2]=-0.625 + f32[916 >> 2]=-0.65625 + f32[920 >> 2]=-0.6875 + f32[924 >> 2]=-0.71875 + f32[928 >> 2]=-0.75 + f32[932 >> 2]=-0.78125 + f32[936 >> 2]=-0.8125 + f32[940 >> 2]=-0.84375 + f32[944 >> 2]=-0.875 + f32[948 >> 2]=-0.90625 + f32[952 >> 2]=-0.9375 + f32[956 >> 2]=-0.96875 + f32[960 >> 2]=-1.0 + f32[964 >> 2]=-1.0625 + f32[968 >> 2]=-1.125 + f32[972 >> 2]=-1.1875 + f32[976 >> 2]=-1.25 + f32[980 >> 2]=-1.3125 + f32[984 >> 2]=-1.375 + f32[988 >> 2]=-1.4375 + f32[992 >> 2]=-1.5 + f32[996 >> 2]=-1.5625 + f32[1000 >> 2]=-1.625 + f32[1004 >> 2]=-1.6875 + f32[1008 >> 2]=-1.75 + f32[1012 >> 2]=-1.8125 + f32[1016 >> 2]=-1.875 + f32[1020 >> 2]=-1.9375 + + // Some cases that should not be encoded as an immediate on the ARM. + + // All the low zero bits set. + f32[1024 >> 2]=2.1249998 + f32[1028 >> 2]=2.2499998 + f32[1032 >> 2]=2.3749998 + f32[1036 >> 2]=2.4999998 + f32[1040 >> 2]=2.6249998 + f32[1044 >> 2]=2.7499998 + f32[1048 >> 2]=2.8749998 + f32[1052 >> 2]=2.9999998 + f32[1056 >> 2]=3.1249998 + f32[1060 >> 2]=3.2499998 + f32[1064 >> 2]=3.3749998 + f32[1068 >> 2]=3.4999998 + f32[1072 >> 2]=3.6249998 + f32[1076 >> 2]=3.7499998 + f32[1080 >> 2]=3.8749998 + f32[1084 >> 2]=3.9999998 + f32[1088 >> 2]=4.2499995 + f32[1092 >> 2]=4.4999995 + f32[1096 >> 2]=4.7499995 + f32[1100 >> 2]=4.9999995 + f32[1104 >> 2]=5.2499995 + f32[1108 >> 2]=5.4999995 + f32[1112 >> 2]=5.7499995 + f32[1116 >> 2]=5.9999995 + f32[1120 >> 2]=6.2499995 + f32[1124 >> 2]=6.4999995 + f32[1128 >> 2]=6.7499995 + f32[1132 >> 2]=6.9999995 + f32[1136 >> 2]=7.2499995 + f32[1140 >> 2]=7.4999995 + f32[1144 >> 2]=7.7499995 + f32[1148 >> 2]=7.9999995 + f32[1152 >> 2]=8.499999 + f32[1156 >> 2]=8.999999 + f32[1160 >> 2]=9.499999 + f32[1164 >> 2]=9.999999 + f32[1168 >> 2]=10.499999 + f32[1172 >> 2]=10.999999 + f32[1176 >> 2]=11.499999 + f32[1180 >> 2]=11.999999 + f32[1184 >> 2]=12.499999 + f32[1188 >> 2]=12.999999 + f32[1192 >> 2]=13.499999 + f32[1196 >> 2]=13.999999 + f32[1200 >> 2]=14.499999 + f32[1204 >> 2]=14.999999 + f32[1208 >> 2]=15.499999 + f32[1212 >> 2]=15.999999 + f32[1216 >> 2]=16.999998 + f32[1220 >> 2]=17.999998 + f32[1224 >> 2]=18.999998 + f32[1228 >> 2]=19.999998 + f32[1232 >> 2]=20.999998 + f32[1236 >> 2]=21.999998 + f32[1240 >> 2]=22.999998 + f32[1244 >> 2]=23.999998 + f32[1248 >> 2]=24.999998 + f32[1252 >> 2]=25.999998 + f32[1256 >> 2]=26.999998 + f32[1260 >> 2]=27.999998 + f32[1264 >> 2]=28.999998 + f32[1268 >> 2]=29.999998 + f32[1272 >> 2]=30.999998 + f32[1276 >> 2]=31.999998 + f32[1280 >> 2]=0.13281249 + f32[1284 >> 2]=0.14062499 + f32[1288 >> 2]=0.14843749 + f32[1292 >> 2]=0.15624999 + f32[1296 >> 2]=0.16406249 + f32[1300 >> 2]=0.17187499 + f32[1304 >> 2]=0.17968749 + f32[1308 >> 2]=0.18749999 + f32[1312 >> 2]=0.19531249 + f32[1316 >> 2]=0.20312499 + f32[1320 >> 2]=0.21093749 + f32[1324 >> 2]=0.21874999 + f32[1328 >> 2]=0.22656249 + f32[1332 >> 2]=0.23437499 + f32[1336 >> 2]=0.24218749 + f32[1340 >> 2]=0.24999999 + f32[1344 >> 2]=0.26562497 + f32[1348 >> 2]=0.28124997 + f32[1352 >> 2]=0.29687497 + f32[1356 >> 2]=0.31249997 + f32[1360 >> 2]=0.32812497 + f32[1364 >> 2]=0.34374997 + f32[1368 >> 2]=0.35937497 + f32[1372 >> 2]=0.37499997 + f32[1376 >> 2]=0.39062497 + f32[1380 >> 2]=0.40624997 + f32[1384 >> 2]=0.42187497 + f32[1388 >> 2]=0.43749997 + f32[1392 >> 2]=0.45312497 + f32[1396 >> 2]=0.46874997 + f32[1400 >> 2]=0.48437497 + f32[1404 >> 2]=0.49999997 + f32[1408 >> 2]=0.53124994 + f32[1412 >> 2]=0.56249994 + f32[1416 >> 2]=0.59374994 + f32[1420 >> 2]=0.62499994 + f32[1424 >> 2]=0.65624994 + f32[1428 >> 2]=0.68749994 + f32[1432 >> 2]=0.71874994 + f32[1436 >> 2]=0.74999994 + f32[1440 >> 2]=0.78124994 + f32[1444 >> 2]=0.81249994 + f32[1448 >> 2]=0.84374994 + f32[1452 >> 2]=0.87499994 + f32[1456 >> 2]=0.90624994 + f32[1460 >> 2]=0.93749994 + f32[1464 >> 2]=0.96874994 + f32[1468 >> 2]=0.99999994 + f32[1472 >> 2]=1.0624999 + f32[1476 >> 2]=1.1249999 + f32[1480 >> 2]=1.1874999 + f32[1484 >> 2]=1.2499999 + f32[1488 >> 2]=1.3124999 + f32[1488 >> 2]=1.3124999 + f32[1492 >> 2]=1.3749999 + f32[1496 >> 2]=1.4374999 + f32[1500 >> 2]=1.4999999 + f32[1504 >> 2]=1.5624999 + f32[1508 >> 2]=1.6249999 + f32[1512 >> 2]=1.6874999 + f32[1516 >> 2]=1.7499999 + f32[1520 >> 2]=1.8124999 + f32[1524 >> 2]=1.8749999 + f32[1528 >> 2]=1.9374999 + f32[1532 >> 2]=1.9999999 + f32[1536 >> 2]=-2.1249998 + f32[1540 >> 2]=-2.2499998 + f32[1544 >> 2]=-2.3749998 + f32[1548 >> 2]=-2.4999998 + f32[1552 >> 2]=-2.6249998 + f32[1556 >> 2]=-2.7499998 + f32[1560 >> 2]=-2.8749998 + f32[1564 >> 2]=-2.9999998 + f32[1568 >> 2]=-3.1249998 + f32[1572 >> 2]=-3.2499998 + f32[1576 >> 2]=-3.3749998 + f32[1580 >> 2]=-3.4999998 + f32[1584 >> 2]=-3.6249998 + f32[1588 >> 2]=-3.7499998 + f32[1592 >> 2]=-3.8749998 + f32[1596 >> 2]=-3.9999998 + f32[1600 >> 2]=-4.2499995 + f32[1604 >> 2]=-4.4999995 + f32[1608 >> 2]=-4.7499995 + f32[1612 >> 2]=-4.9999995 + f32[1616 >> 2]=-5.2499995 + f32[1620 >> 2]=-5.4999995 + f32[1624 >> 2]=-5.7499995 + f32[1628 >> 2]=-5.9999995 + f32[1632 >> 2]=-6.2499995 + f32[1636 >> 2]=-6.4999995 + f32[1640 >> 2]=-6.7499995 + f32[1644 >> 2]=-6.9999995 + f32[1648 >> 2]=-7.2499995 + f32[1652 >> 2]=-7.4999995 + f32[1656 >> 2]=-7.7499995 + f32[1660 >> 2]=-7.9999995 + f32[1664 >> 2]=-8.499999 + f32[1668 >> 2]=-8.999999 + f32[1672 >> 2]=-9.499999 + f32[1676 >> 2]=-9.999999 + f32[1680 >> 2]=-10.499999 + f32[1684 >> 2]=-10.999999 + f32[1688 >> 2]=-11.499999 + f32[1692 >> 2]=-11.999999 + f32[1696 >> 2]=-12.499999 + f32[1700 >> 2]=-12.999999 + f32[1704 >> 2]=-13.499999 + f32[1708 >> 2]=-13.999999 + f32[1712 >> 2]=-14.499999 + f32[1716 >> 2]=-14.999999 + f32[1720 >> 2]=-15.499999 + f32[1724 >> 2]=-15.999999 + f32[1728 >> 2]=-16.999998 + f32[1732 >> 2]=-17.999998 + f32[1736 >> 2]=-18.999998 + f32[1740 >> 2]=-19.999998 + f32[1744 >> 2]=-20.999998 + f32[1748 >> 2]=-21.999998 + f32[1752 >> 2]=-22.999998 + f32[1756 >> 2]=-23.999998 + f32[1760 >> 2]=-24.999998 + f32[1764 >> 2]=-25.999998 + f32[1768 >> 2]=-26.999998 + f32[1772 >> 2]=-27.999998 + f32[1776 >> 2]=-28.999998 + f32[1780 >> 2]=-29.999998 + f32[1784 >> 2]=-30.999998 + f32[1788 >> 2]=-31.999998 + f32[1792 >> 2]=-0.13281249 + f32[1796 >> 2]=-0.14062499 + f32[1800 >> 2]=-0.14843749 + f32[1804 >> 2]=-0.15624999 + f32[1808 >> 2]=-0.16406249 + f32[1812 >> 2]=-0.17187499 + f32[1816 >> 2]=-0.17968749 + f32[1820 >> 2]=-0.18749999 + f32[1824 >> 2]=-0.19531249 + f32[1828 >> 2]=-0.20312499 + f32[1832 >> 2]=-0.21093749 + f32[1836 >> 2]=-0.21874999 + f32[1840 >> 2]=-0.22656249 + f32[1844 >> 2]=-0.23437499 + f32[1848 >> 2]=-0.24218749 + f32[1852 >> 2]=-0.24999999 + f32[1856 >> 2]=-0.26562497 + f32[1860 >> 2]=-0.28124997 + f32[1864 >> 2]=-0.29687497 + f32[1868 >> 2]=-0.31249997 + f32[1872 >> 2]=-0.32812497 + f32[1876 >> 2]=-0.34374997 + f32[1880 >> 2]=-0.35937497 + f32[1884 >> 2]=-0.37499997 + f32[1888 >> 2]=-0.39062497 + f32[1888 >> 2]=-0.39062497 + f32[1892 >> 2]=-0.40624997 + f32[1896 >> 2]=-0.42187497 + f32[1900 >> 2]=-0.43749997 + f32[1904 >> 2]=-0.45312497 + f32[1908 >> 2]=-0.46874997 + f32[1912 >> 2]=-0.48437497 + f32[1916 >> 2]=-0.49999997 + f32[1920 >> 2]=-0.53124994 + f32[1924 >> 2]=-0.56249994 + f32[1928 >> 2]=-0.59374994 + f32[1932 >> 2]=-0.62499994 + f32[1936 >> 2]=-0.65624994 + f32[1940 >> 2]=-0.68749994 + f32[1944 >> 2]=-0.71874994 + f32[1948 >> 2]=-0.74999994 + f32[1952 >> 2]=-0.78124994 + f32[1956 >> 2]=-0.81249994 + f32[1960 >> 2]=-0.84374994 + f32[1964 >> 2]=-0.87499994 + f32[1968 >> 2]=-0.90624994 + f32[1972 >> 2]=-0.93749994 + f32[1976 >> 2]=-0.96874994 + f32[1980 >> 2]=-0.99999994 + f32[1984 >> 2]=-1.0624999 + f32[1988 >> 2]=-1.1249999 + f32[1992 >> 2]=-1.1874999 + f32[1996 >> 2]=-1.2499999 + f32[2000 >> 2]=-1.3124999 + f32[2004 >> 2]=-1.3749999 + f32[2008 >> 2]=-1.4374999 + f32[2012 >> 2]=-1.4999999 + f32[2016 >> 2]=-1.5624999 + f32[2020 >> 2]=-1.6249999 + f32[2024 >> 2]=-1.6874999 + f32[2028 >> 2]=-1.7499999 + f32[2032 >> 2]=-1.8124999 + f32[2036 >> 2]=-1.8749999 + f32[2040 >> 2]=-1.9374999 + f32[2044 >> 2]=-1.9999999 + + // Just the lowest zero bit set. + f32[2048 >> 2]=2.0000002 + f32[2052 >> 2]=2.1250002 + f32[2056 >> 2]=2.2500002 + f32[2060 >> 2]=2.3750002 + f32[2064 >> 2]=2.5000002 + f32[2068 >> 2]=2.6250002 + f32[2072 >> 2]=2.7500002 + f32[2076 >> 2]=2.8750002 + f32[2080 >> 2]=3.0000002 + f32[2084 >> 2]=3.1250002 + f32[2088 >> 2]=3.2500002 + f32[2092 >> 2]=3.3750002 + f32[2096 >> 2]=3.5000002 + f32[2100 >> 2]=3.6250002 + f32[2104 >> 2]=3.7500002 + f32[2108 >> 2]=3.8750002 + f32[2112 >> 2]=4.0000005 + f32[2116 >> 2]=4.2500005 + f32[2120 >> 2]=4.5000005 + f32[2124 >> 2]=4.7500005 + f32[2128 >> 2]=5.0000005 + f32[2132 >> 2]=5.2500005 + f32[2136 >> 2]=5.5000005 + f32[2140 >> 2]=5.7500005 + f32[2140 >> 2]=5.7500005 + f32[2144 >> 2]=6.0000005 + f32[2148 >> 2]=6.2500005 + f32[2152 >> 2]=6.5000005 + f32[2156 >> 2]=6.7500005 + f32[2160 >> 2]=7.0000005 + f32[2164 >> 2]=7.2500005 + f32[2168 >> 2]=7.5000005 + f32[2172 >> 2]=7.7500005 + f32[2176 >> 2]=8.000001 + f32[2180 >> 2]=8.500001 + f32[2184 >> 2]=9.000001 + f32[2188 >> 2]=9.500001 + f32[2192 >> 2]=10.000001 + f32[2196 >> 2]=10.500001 + f32[2200 >> 2]=11.000001 + f32[2204 >> 2]=11.500001 + f32[2208 >> 2]=12.000001 + f32[2212 >> 2]=12.500001 + f32[2216 >> 2]=13.000001 + f32[2220 >> 2]=13.500001 + f32[2224 >> 2]=14.000001 + f32[2228 >> 2]=14.500001 + f32[2232 >> 2]=15.000001 + f32[2236 >> 2]=15.500001 + f32[2240 >> 2]=16.000002 + f32[2244 >> 2]=17.000002 + f32[2248 >> 2]=18.000002 + f32[2252 >> 2]=19.000002 + f32[2256 >> 2]=20.000002 + f32[2260 >> 2]=21.000002 + f32[2264 >> 2]=22.000002 + f32[2268 >> 2]=23.000002 + f32[2272 >> 2]=24.000002 + f32[2276 >> 2]=25.000002 + f32[2280 >> 2]=26.000002 + f32[2284 >> 2]=27.000002 + f32[2288 >> 2]=28.000002 + f32[2292 >> 2]=29.000002 + f32[2296 >> 2]=30.000002 + f32[2300 >> 2]=31.000002 + f32[2304 >> 2]=0.12500001 + f32[2308 >> 2]=0.13281251 + f32[2312 >> 2]=0.14062501 + f32[2316 >> 2]=0.14843751 + f32[2320 >> 2]=0.15625001 + f32[2324 >> 2]=0.16406251 + f32[2328 >> 2]=0.17187501 + f32[2332 >> 2]=0.17968751 + f32[2336 >> 2]=0.18750001 + f32[2340 >> 2]=0.19531251 + f32[2344 >> 2]=0.20312501 + f32[2348 >> 2]=0.21093751 + f32[2352 >> 2]=0.21875001 + f32[2356 >> 2]=0.22656251 + f32[2360 >> 2]=0.23437501 + f32[2364 >> 2]=0.24218751 + f32[2368 >> 2]=0.25000003 + f32[2372 >> 2]=0.26562503 + f32[2376 >> 2]=0.28125003 + f32[2380 >> 2]=0.29687503 + f32[2384 >> 2]=0.31250003 + f32[2388 >> 2]=0.32812503 + f32[2392 >> 2]=0.34375003 + f32[2396 >> 2]=0.35937503 + f32[2400 >> 2]=0.37500003 + f32[2404 >> 2]=0.39062503 + f32[2408 >> 2]=0.40625003 + f32[2412 >> 2]=0.42187503 + f32[2416 >> 2]=0.43750003 + f32[2420 >> 2]=0.45312503 + f32[2424 >> 2]=0.46875003 + f32[2428 >> 2]=0.48437503 + f32[2432 >> 2]=0.50000006 + f32[2436 >> 2]=0.53125006 + f32[2440 >> 2]=0.56250006 + f32[2444 >> 2]=0.59375006 + f32[2448 >> 2]=0.62500006 + f32[2452 >> 2]=0.65625006 + f32[2456 >> 2]=0.68750006 + f32[2460 >> 2]=0.71875006 + f32[2464 >> 2]=0.75000006 + f32[2468 >> 2]=0.78125006 + f32[2472 >> 2]=0.81250006 + f32[2476 >> 2]=0.84375006 + f32[2480 >> 2]=0.87500006 + f32[2484 >> 2]=0.90625006 + f32[2488 >> 2]=0.93750006 + f32[2492 >> 2]=0.96875006 + f32[2496 >> 2]=1.0000001 + f32[2500 >> 2]=1.0625001 + f32[2504 >> 2]=1.1250001 + f32[2508 >> 2]=1.1875001 + f32[2512 >> 2]=1.2500001 + f32[2516 >> 2]=1.3125001 + f32[2520 >> 2]=1.3750001 + f32[2524 >> 2]=1.4375001 + f32[2528 >> 2]=1.5000001 + f32[2532 >> 2]=1.5625001 + f32[2536 >> 2]=1.6250001 + f32[2540 >> 2]=1.6875001 + f32[2540 >> 2]=1.6875001 + f32[2544 >> 2]=1.7500001 + f32[2548 >> 2]=1.8125001 + f32[2552 >> 2]=1.8750001 + f32[2556 >> 2]=1.9375001 + f32[2560 >> 2]=-2.0000002 + f32[2564 >> 2]=-2.1250002 + f32[2568 >> 2]=-2.2500002 + f32[2572 >> 2]=-2.3750002 + f32[2576 >> 2]=-2.5000002 + f32[2580 >> 2]=-2.6250002 + f32[2584 >> 2]=-2.7500002 + f32[2588 >> 2]=-2.8750002 + f32[2592 >> 2]=-3.0000002 + f32[2596 >> 2]=-3.1250002 + f32[2600 >> 2]=-3.2500002 + f32[2604 >> 2]=-3.3750002 + f32[2608 >> 2]=-3.5000002 + f32[2612 >> 2]=-3.6250002 + f32[2616 >> 2]=-3.7500002 + f32[2620 >> 2]=-3.8750002 + f32[2624 >> 2]=-4.0000005 + f32[2628 >> 2]=-4.2500005 + f32[2632 >> 2]=-4.5000005 + f32[2636 >> 2]=-4.7500005 + f32[2640 >> 2]=-5.0000005 + f32[2644 >> 2]=-5.2500005 + f32[2648 >> 2]=-5.5000005 + f32[2652 >> 2]=-5.7500005 + f32[2656 >> 2]=-6.0000005 + f32[2660 >> 2]=-6.2500005 + f32[2664 >> 2]=-6.5000005 + f32[2668 >> 2]=-6.7500005 + f32[2672 >> 2]=-7.0000005 + f32[2676 >> 2]=-7.2500005 + f32[2680 >> 2]=-7.5000005 + f32[2684 >> 2]=-7.7500005 + f32[2688 >> 2]=-8.000001 + f32[2692 >> 2]=-8.500001 + f32[2696 >> 2]=-9.000001 + f32[2700 >> 2]=-9.500001 + f32[2704 >> 2]=-10.000001 + f32[2708 >> 2]=-10.500001 + f32[2712 >> 2]=-11.000001 + f32[2716 >> 2]=-11.500001 + f32[2720 >> 2]=-12.000001 + f32[2724 >> 2]=-12.500001 + f32[2728 >> 2]=-13.000001 + f32[2732 >> 2]=-13.500001 + f32[2736 >> 2]=-14.000001 + f32[2740 >> 2]=-14.500001 + f32[2744 >> 2]=-15.000001 + f32[2748 >> 2]=-15.500001 + f32[2752 >> 2]=-16.000002 + f32[2756 >> 2]=-17.000002 + f32[2760 >> 2]=-18.000002 + f32[2764 >> 2]=-19.000002 + f32[2768 >> 2]=-20.000002 + f32[2772 >> 2]=-21.000002 + f32[2776 >> 2]=-22.000002 + f32[2780 >> 2]=-23.000002 + f32[2784 >> 2]=-24.000002 + f32[2788 >> 2]=-25.000002 + f32[2792 >> 2]=-26.000002 + f32[2796 >> 2]=-27.000002 + f32[2800 >> 2]=-28.000002 + f32[2804 >> 2]=-29.000002 + f32[2808 >> 2]=-30.000002 + f32[2812 >> 2]=-31.000002 + f32[2816 >> 2]=-0.12500001 + f32[2820 >> 2]=-0.13281251 + f32[2824 >> 2]=-0.14062501 + f32[2828 >> 2]=-0.14843751 + f32[2832 >> 2]=-0.15625001 + f32[2836 >> 2]=-0.16406251 + f32[2840 >> 2]=-0.17187501 + f32[2844 >> 2]=-0.17968751 + f32[2848 >> 2]=-0.18750001 + f32[2852 >> 2]=-0.19531251 + f32[2856 >> 2]=-0.20312501 + f32[2860 >> 2]=-0.21093751 + f32[2864 >> 2]=-0.21875001 + f32[2868 >> 2]=-0.22656251 + f32[2872 >> 2]=-0.23437501 + f32[2876 >> 2]=-0.24218751 + f32[2880 >> 2]=-0.25000003 + f32[2884 >> 2]=-0.26562503 + f32[2888 >> 2]=-0.28125003 + f32[2892 >> 2]=-0.29687503 + f32[2896 >> 2]=-0.31250003 + f32[2900 >> 2]=-0.32812503 + f32[2904 >> 2]=-0.34375003 + f32[2908 >> 2]=-0.35937503 + f32[2912 >> 2]=-0.37500003 + f32[2916 >> 2]=-0.39062503 + f32[2920 >> 2]=-0.40625003 + f32[2924 >> 2]=-0.42187503 + f32[2928 >> 2]=-0.43750003 + f32[2932 >> 2]=-0.45312503 + f32[2936 >> 2]=-0.46875003 + f32[2940 >> 2]=-0.48437503 + f32[2940 >> 2]=-0.48437503 + f32[2944 >> 2]=-0.50000006 + f32[2948 >> 2]=-0.53125006 + f32[2952 >> 2]=-0.56250006 + f32[2956 >> 2]=-0.59375006 + f32[2960 >> 2]=-0.62500006 + f32[2964 >> 2]=-0.65625006 + f32[2968 >> 2]=-0.68750006 + f32[2972 >> 2]=-0.71875006 + f32[2976 >> 2]=-0.75000006 + f32[2980 >> 2]=-0.78125006 + f32[2984 >> 2]=-0.81250006 + f32[2988 >> 2]=-0.84375006 + f32[2992 >> 2]=-0.87500006 + f32[2996 >> 2]=-0.90625006 + f32[3000 >> 2]=-0.93750006 + f32[3004 >> 2]=-0.96875006 + f32[3008 >> 2]=-1.0000001 + f32[3012 >> 2]=-1.0625001 + f32[3016 >> 2]=-1.1250001 + f32[3020 >> 2]=-1.1875001 + f32[3024 >> 2]=-1.2500001 + f32[3028 >> 2]=-1.3125001 + f32[3032 >> 2]=-1.3750001 + f32[3036 >> 2]=-1.4375001 + f32[3040 >> 2]=-1.5000001 + f32[3044 >> 2]=-1.5625001 + f32[3048 >> 2]=-1.6250001 + f32[3052 >> 2]=-1.6875001 + f32[3056 >> 2]=-1.7500001 + f32[3060 >> 2]=-1.8125001 + f32[3064 >> 2]=-1.8750001 + f32[3068 >> 2]=-1.9375001 + + // Just the highest zero bit set. + f32[3073 >> 2]=2.0625 + f32[3073 >> 2]=2.0625 + f32[3077 >> 2]=2.1875 + f32[3081 >> 2]=2.3125 + f32[3085 >> 2]=2.4375 + f32[3089 >> 2]=2.5625 + f32[3093 >> 2]=2.6875 + f32[3097 >> 2]=2.8125 + f32[3101 >> 2]=2.9375 + f32[3105 >> 2]=3.0625 + f32[3109 >> 2]=3.1875 + f32[3113 >> 2]=3.3125 + f32[3117 >> 2]=3.4375 + f32[3121 >> 2]=3.5625 + f32[3125 >> 2]=3.6875 + f32[3129 >> 2]=3.8125 + f32[3133 >> 2]=3.9375 + f32[3137 >> 2]=4.125 + f32[3141 >> 2]=4.375 + f32[3145 >> 2]=4.625 + f32[3149 >> 2]=4.875 + f32[3153 >> 2]=5.125 + f32[3157 >> 2]=5.375 + f32[3161 >> 2]=5.625 + f32[3165 >> 2]=5.875 + f32[3169 >> 2]=6.125 + f32[3173 >> 2]=6.375 + f32[3177 >> 2]=6.625 + f32[3181 >> 2]=6.875 + f32[3185 >> 2]=7.125 + f32[3189 >> 2]=7.375 + f32[3193 >> 2]=7.625 + f32[3197 >> 2]=7.875 + f32[3201 >> 2]=8.25 + f32[3205 >> 2]=8.75 + f32[3209 >> 2]=9.25 + f32[3213 >> 2]=9.75 + f32[3217 >> 2]=10.25 + f32[3221 >> 2]=10.75 + f32[3225 >> 2]=11.25 + f32[3229 >> 2]=11.75 + f32[3233 >> 2]=12.25 + f32[3237 >> 2]=12.75 + f32[3241 >> 2]=13.25 + f32[3245 >> 2]=13.75 + f32[3249 >> 2]=14.25 + f32[3253 >> 2]=14.75 + f32[3257 >> 2]=15.25 + f32[3261 >> 2]=15.75 + f32[3265 >> 2]=16.5 + f32[3269 >> 2]=17.5 + f32[3273 >> 2]=18.5 + f32[3277 >> 2]=19.5 + f32[3281 >> 2]=20.5 + f32[3285 >> 2]=21.5 + f32[3289 >> 2]=22.5 + f32[3293 >> 2]=23.5 + f32[3297 >> 2]=24.5 + f32[3301 >> 2]=25.5 + f32[3305 >> 2]=26.5 + f32[3309 >> 2]=27.5 + f32[3313 >> 2]=28.5 + f32[3317 >> 2]=29.5 + f32[3321 >> 2]=30.5 + f32[3325 >> 2]=31.5 + f32[3329 >> 2]=0.12890625 + f32[3333 >> 2]=0.13671875 + f32[3337 >> 2]=0.14453125 + f32[3341 >> 2]=0.15234375 + f32[3345 >> 2]=0.16015625 + f32[3349 >> 2]=0.16796875 + f32[3353 >> 2]=0.17578125 + f32[3357 >> 2]=0.18359375 + f32[3361 >> 2]=0.19140625 + f32[3365 >> 2]=0.19921875 + f32[3369 >> 2]=0.20703125 + f32[3373 >> 2]=0.21484375 + f32[3377 >> 2]=0.22265625 + f32[3381 >> 2]=0.23046875 + f32[3385 >> 2]=0.23828125 + f32[3389 >> 2]=0.24609375 + f32[3393 >> 2]=0.2578125 + f32[3397 >> 2]=0.2734375 + f32[3401 >> 2]=0.2890625 + f32[3405 >> 2]=0.3046875 + f32[3409 >> 2]=0.3203125 + f32[3413 >> 2]=0.3359375 + f32[3417 >> 2]=0.3515625 + f32[3421 >> 2]=0.3671875 + f32[3425 >> 2]=0.3828125 + f32[3429 >> 2]=0.3984375 + f32[3433 >> 2]=0.4140625 + f32[3437 >> 2]=0.4296875 + f32[3441 >> 2]=0.4453125 + f32[3445 >> 2]=0.4609375 + f32[3449 >> 2]=0.4765625 + f32[3453 >> 2]=0.4921875 + f32[3457 >> 2]=0.515625 + f32[3461 >> 2]=0.546875 + f32[3465 >> 2]=0.578125 + f32[3469 >> 2]=0.609375 + f32[3473 >> 2]=0.640625 + f32[3473 >> 2]=0.640625 + f32[3477 >> 2]=0.671875 + f32[3481 >> 2]=0.703125 + f32[3485 >> 2]=0.734375 + f32[3489 >> 2]=0.765625 + f32[3493 >> 2]=0.796875 + f32[3497 >> 2]=0.828125 + f32[3501 >> 2]=0.859375 + f32[3505 >> 2]=0.890625 + f32[3509 >> 2]=0.921875 + f32[3513 >> 2]=0.953125 + f32[3517 >> 2]=0.984375 + f32[3521 >> 2]=1.03125 + f32[3525 >> 2]=1.09375 + f32[3529 >> 2]=1.15625 + f32[3533 >> 2]=1.21875 + f32[3537 >> 2]=1.28125 + f32[3541 >> 2]=1.34375 + f32[3545 >> 2]=1.40625 + f32[3549 >> 2]=1.46875 + f32[3553 >> 2]=1.53125 + f32[3557 >> 2]=1.59375 + f32[3561 >> 2]=1.65625 + f32[3565 >> 2]=1.71875 + f32[3569 >> 2]=1.78125 + f32[3573 >> 2]=1.84375 + f32[3577 >> 2]=1.90625 + f32[3581 >> 2]=1.96875 + f32[3585 >> 2]=-2.0625 + f32[3589 >> 2]=-2.1875 + f32[3593 >> 2]=-2.3125 + f32[3597 >> 2]=-2.4375 + f32[3601 >> 2]=-2.5625 + f32[3605 >> 2]=-2.6875 + f32[3609 >> 2]=-2.8125 + f32[3613 >> 2]=-2.9375 + f32[3617 >> 2]=-3.0625 + f32[3621 >> 2]=-3.1875 + f32[3625 >> 2]=-3.3125 + f32[3629 >> 2]=-3.4375 + f32[3633 >> 2]=-3.5625 + f32[3637 >> 2]=-3.6875 + f32[3641 >> 2]=-3.8125 + f32[3645 >> 2]=-3.9375 + f32[3649 >> 2]=-4.125 + f32[3653 >> 2]=-4.375 + f32[3657 >> 2]=-4.625 + f32[3661 >> 2]=-4.875 + f32[3665 >> 2]=-5.125 + f32[3669 >> 2]=-5.375 + f32[3673 >> 2]=-5.625 + f32[3677 >> 2]=-5.875 + f32[3681 >> 2]=-6.125 + f32[3685 >> 2]=-6.375 + f32[3689 >> 2]=-6.625 + f32[3693 >> 2]=-6.875 + f32[3697 >> 2]=-7.125 + f32[3701 >> 2]=-7.375 + f32[3705 >> 2]=-7.625 + f32[3709 >> 2]=-7.875 + f32[3713 >> 2]=-8.25 + f32[3717 >> 2]=-8.75 + f32[3721 >> 2]=-9.25 + f32[3725 >> 2]=-9.75 + f32[3729 >> 2]=-10.25 + f32[3733 >> 2]=-10.75 + f32[3737 >> 2]=-11.25 + f32[3741 >> 2]=-11.75 + f32[3745 >> 2]=-12.25 + f32[3749 >> 2]=-12.75 + f32[3753 >> 2]=-13.25 + f32[3757 >> 2]=-13.75 + f32[3761 >> 2]=-14.25 + f32[3765 >> 2]=-14.75 + f32[3769 >> 2]=-15.25 + f32[3773 >> 2]=-15.75 + f32[3777 >> 2]=-16.5 + f32[3781 >> 2]=-17.5 + f32[3785 >> 2]=-18.5 + f32[3789 >> 2]=-19.5 + f32[3793 >> 2]=-20.5 + f32[3797 >> 2]=-21.5 + f32[3801 >> 2]=-22.5 + f32[3805 >> 2]=-23.5 + f32[3809 >> 2]=-24.5 + f32[3813 >> 2]=-25.5 + f32[3817 >> 2]=-26.5 + f32[3821 >> 2]=-27.5 + f32[3825 >> 2]=-28.5 + f32[3829 >> 2]=-29.5 + f32[3833 >> 2]=-30.5 + f32[3837 >> 2]=-31.5 + f32[3841 >> 2]=-0.12890625 + f32[3845 >> 2]=-0.13671875 + f32[3849 >> 2]=-0.14453125 + f32[3853 >> 2]=-0.15234375 + f32[3857 >> 2]=-0.16015625 + f32[3861 >> 2]=-0.16796875 + f32[3865 >> 2]=-0.17578125 + f32[3869 >> 2]=-0.18359375 + f32[3873 >> 2]=-0.19140625 + f32[3873 >> 2]=-0.19140625 + f32[3877 >> 2]=-0.19921875 + f32[3881 >> 2]=-0.20703125 + f32[3885 >> 2]=-0.21484375 + f32[3889 >> 2]=-0.22265625 + f32[3893 >> 2]=-0.23046875 + f32[3897 >> 2]=-0.23828125 + f32[3901 >> 2]=-0.24609375 + f32[3905 >> 2]=-0.2578125 + f32[3909 >> 2]=-0.2734375 + f32[3913 >> 2]=-0.2890625 + f32[3917 >> 2]=-0.3046875 + f32[3921 >> 2]=-0.3203125 + f32[3925 >> 2]=-0.3359375 + f32[3929 >> 2]=-0.3515625 + f32[3933 >> 2]=-0.3671875 + f32[3937 >> 2]=-0.3828125 + f32[3941 >> 2]=-0.3984375 + f32[3945 >> 2]=-0.4140625 + f32[3949 >> 2]=-0.4296875 + f32[3953 >> 2]=-0.4453125 + f32[3957 >> 2]=-0.4609375 + f32[3961 >> 2]=-0.4765625 + f32[3965 >> 2]=-0.4921875 + f32[3969 >> 2]=-0.515625 + f32[3973 >> 2]=-0.546875 + f32[3977 >> 2]=-0.578125 + f32[3981 >> 2]=-0.609375 + f32[3985 >> 2]=-0.640625 + f32[3989 >> 2]=-0.671875 + f32[3993 >> 2]=-0.703125 + f32[3997 >> 2]=-0.734375 + f32[4001 >> 2]=-0.765625 + f32[4005 >> 2]=-0.796875 + f32[4009 >> 2]=-0.828125 + f32[4013 >> 2]=-0.859375 + f32[4017 >> 2]=-0.890625 + f32[4021 >> 2]=-0.921875 + f32[4025 >> 2]=-0.953125 + f32[4029 >> 2]=-0.984375 + f32[4033 >> 2]=-1.03125 + f32[4037 >> 2]=-1.09375 + f32[4041 >> 2]=-1.15625 + f32[4045 >> 2]=-1.21875 + f32[4049 >> 2]=-1.28125 + f32[4053 >> 2]=-1.34375 + f32[4057 >> 2]=-1.40625 + f32[4061 >> 2]=-1.46875 + f32[4065 >> 2]=-1.53125 + f32[4069 >> 2]=-1.59375 + f32[4073 >> 2]=-1.65625 + f32[4077 >> 2]=-1.71875 + f32[4081 >> 2]=-1.78125 + f32[4085 >> 2]=-1.84375 + f32[4089 >> 2]=-1.90625 + f32[4093 >> 2]=-1.96875 + }; + + return { + fn1: fn1 + }; +}; + +var asm = testmod(this, {}, buffer); + +asm.fn1() + +var f32=new Float32Array(buffer); +assertEq(f32[0 >> 2], 2.0) +assertEq(f32[4 >> 2], 2.125) +assertEq(f32[8 >> 2], 2.25) +assertEq(f32[12 >> 2], 2.375) +assertEq(f32[16 >> 2], 2.5) +assertEq(f32[20 >> 2], 2.625) +assertEq(f32[24 >> 2], 2.75) +assertEq(f32[28 >> 2], 2.875) +assertEq(f32[32 >> 2], 3.0) +assertEq(f32[36 >> 2], 3.125) +assertEq(f32[40 >> 2], 3.25) +assertEq(f32[44 >> 2], 3.375) +assertEq(f32[48 >> 2], 3.5) +assertEq(f32[52 >> 2], 3.625) +assertEq(f32[56 >> 2], 3.75) +assertEq(f32[60 >> 2], 3.875) +assertEq(f32[64 >> 2], 4.0) +assertEq(f32[68 >> 2], 4.25) +assertEq(f32[72 >> 2], 4.5) +assertEq(f32[76 >> 2], 4.75) +assertEq(f32[80 >> 2], 5.0) +assertEq(f32[84 >> 2], 5.25) +assertEq(f32[88 >> 2], 5.5) +assertEq(f32[92 >> 2], 5.75) +assertEq(f32[96 >> 2], 6.0) +assertEq(f32[100 >> 2], 6.25) +assertEq(f32[104 >> 2], 6.5) +assertEq(f32[108 >> 2], 6.75) +assertEq(f32[112 >> 2], 7.0) +assertEq(f32[116 >> 2], 7.25) +assertEq(f32[120 >> 2], 7.5) +assertEq(f32[124 >> 2], 7.75) +assertEq(f32[128 >> 2], 8.0) +assertEq(f32[132 >> 2], 8.5) +assertEq(f32[136 >> 2], 9.0) +assertEq(f32[140 >> 2], 9.5) +assertEq(f32[144 >> 2], 10.0) +assertEq(f32[148 >> 2], 10.5) +assertEq(f32[152 >> 2], 11.0) +assertEq(f32[156 >> 2], 11.5) +assertEq(f32[160 >> 2], 12.0) +assertEq(f32[164 >> 2], 12.5) +assertEq(f32[168 >> 2], 13.0) +assertEq(f32[172 >> 2], 13.5) +assertEq(f32[176 >> 2], 14.0) +assertEq(f32[180 >> 2], 14.5) +assertEq(f32[184 >> 2], 15.0) +assertEq(f32[188 >> 2], 15.5) +assertEq(f32[192 >> 2], 16.0) +assertEq(f32[196 >> 2], 17.0) +assertEq(f32[200 >> 2], 18.0) +assertEq(f32[204 >> 2], 19.0) +assertEq(f32[208 >> 2], 20.0) +assertEq(f32[212 >> 2], 21.0) +assertEq(f32[216 >> 2], 22.0) +assertEq(f32[220 >> 2], 23.0) +assertEq(f32[224 >> 2], 24.0) +assertEq(f32[228 >> 2], 25.0) +assertEq(f32[232 >> 2], 26.0) +assertEq(f32[236 >> 2], 27.0) +assertEq(f32[240 >> 2], 28.0) +assertEq(f32[244 >> 2], 29.0) +assertEq(f32[248 >> 2], 30.0) +assertEq(f32[252 >> 2], 31.0) +assertEq(f32[256 >> 2], 0.125) +assertEq(f32[260 >> 2], 0.1328125) +assertEq(f32[264 >> 2], 0.140625) +assertEq(f32[268 >> 2], 0.1484375) +assertEq(f32[272 >> 2], 0.15625) +assertEq(f32[276 >> 2], 0.1640625) +assertEq(f32[280 >> 2], 0.171875) +assertEq(f32[284 >> 2], 0.1796875) +assertEq(f32[288 >> 2], 0.1875) +assertEq(f32[292 >> 2], 0.1953125) +assertEq(f32[296 >> 2], 0.203125) +assertEq(f32[300 >> 2], 0.2109375) +assertEq(f32[304 >> 2], 0.21875) +assertEq(f32[308 >> 2], 0.2265625) +assertEq(f32[312 >> 2], 0.234375) +assertEq(f32[316 >> 2], 0.2421875) +assertEq(f32[320 >> 2], 0.25) +assertEq(f32[324 >> 2], 0.265625) +assertEq(f32[328 >> 2], 0.28125) +assertEq(f32[332 >> 2], 0.296875) +assertEq(f32[336 >> 2], 0.3125) +assertEq(f32[340 >> 2], 0.328125) +assertEq(f32[344 >> 2], 0.34375) +assertEq(f32[348 >> 2], 0.359375) +assertEq(f32[348 >> 2], 0.359375) +assertEq(f32[352 >> 2], 0.375) +assertEq(f32[356 >> 2], 0.390625) +assertEq(f32[360 >> 2], 0.40625) +assertEq(f32[364 >> 2], 0.421875) +assertEq(f32[368 >> 2], 0.4375) +assertEq(f32[372 >> 2], 0.453125) +assertEq(f32[376 >> 2], 0.46875) +assertEq(f32[380 >> 2], 0.484375) +assertEq(f32[384 >> 2], 0.5) +assertEq(f32[388 >> 2], 0.53125) +assertEq(f32[392 >> 2], 0.5625) +assertEq(f32[396 >> 2], 0.59375) +assertEq(f32[400 >> 2], 0.625) +assertEq(f32[404 >> 2], 0.65625) +assertEq(f32[408 >> 2], 0.6875) +assertEq(f32[412 >> 2], 0.71875) +assertEq(f32[416 >> 2], 0.75) +assertEq(f32[420 >> 2], 0.78125) +assertEq(f32[424 >> 2], 0.8125) +assertEq(f32[428 >> 2], 0.84375) +assertEq(f32[432 >> 2], 0.875) +assertEq(f32[436 >> 2], 0.90625) +assertEq(f32[440 >> 2], 0.9375) +assertEq(f32[444 >> 2], 0.96875) +assertEq(f32[448 >> 2], 1.0) +assertEq(f32[452 >> 2], 1.0625) +assertEq(f32[456 >> 2], 1.125) +assertEq(f32[460 >> 2], 1.1875) +assertEq(f32[464 >> 2], 1.25) +assertEq(f32[468 >> 2], 1.3125) +assertEq(f32[472 >> 2], 1.375) +assertEq(f32[476 >> 2], 1.4375) +assertEq(f32[480 >> 2], 1.5) +assertEq(f32[484 >> 2], 1.5625) +assertEq(f32[488 >> 2], 1.625) +assertEq(f32[492 >> 2], 1.6875) +assertEq(f32[496 >> 2], 1.75) +assertEq(f32[500 >> 2], 1.8125) +assertEq(f32[504 >> 2], 1.875) +assertEq(f32[508 >> 2], 1.9375) +assertEq(f32[512 >> 2], -2.0) +assertEq(f32[516 >> 2], -2.125) +assertEq(f32[520 >> 2], -2.25) +assertEq(f32[524 >> 2], -2.375) +assertEq(f32[528 >> 2], -2.5) +assertEq(f32[532 >> 2], -2.625) +assertEq(f32[536 >> 2], -2.75) +assertEq(f32[540 >> 2], -2.875) +assertEq(f32[544 >> 2], -3.0) +assertEq(f32[548 >> 2], -3.125) +assertEq(f32[552 >> 2], -3.25) +assertEq(f32[556 >> 2], -3.375) +assertEq(f32[560 >> 2], -3.5) +assertEq(f32[564 >> 2], -3.625) +assertEq(f32[568 >> 2], -3.75) +assertEq(f32[572 >> 2], -3.875) +assertEq(f32[576 >> 2], -4.0) +assertEq(f32[580 >> 2], -4.25) +assertEq(f32[584 >> 2], -4.5) +assertEq(f32[588 >> 2], -4.75) +assertEq(f32[592 >> 2], -5.0) +assertEq(f32[596 >> 2], -5.25) +assertEq(f32[600 >> 2], -5.5) +assertEq(f32[604 >> 2], -5.75) +assertEq(f32[608 >> 2], -6.0) +assertEq(f32[612 >> 2], -6.25) +assertEq(f32[616 >> 2], -6.5) +assertEq(f32[620 >> 2], -6.75) +assertEq(f32[624 >> 2], -7.0) +assertEq(f32[628 >> 2], -7.25) +assertEq(f32[632 >> 2], -7.5) +assertEq(f32[636 >> 2], -7.75) +assertEq(f32[640 >> 2], -8.0) +assertEq(f32[644 >> 2], -8.5) +assertEq(f32[648 >> 2], -9.0) +assertEq(f32[652 >> 2], -9.5) +assertEq(f32[656 >> 2], -10.0) +assertEq(f32[660 >> 2], -10.5) +assertEq(f32[664 >> 2], -11.0) +assertEq(f32[668 >> 2], -11.5) +assertEq(f32[672 >> 2], -12.0) +assertEq(f32[676 >> 2], -12.5) +assertEq(f32[680 >> 2], -13.0) +assertEq(f32[684 >> 2], -13.5) +assertEq(f32[688 >> 2], -14.0) +assertEq(f32[692 >> 2], -14.5) +assertEq(f32[696 >> 2], -15.0) +assertEq(f32[700 >> 2], -15.5) +assertEq(f32[704 >> 2], -16.0) +assertEq(f32[708 >> 2], -17.0) +assertEq(f32[712 >> 2], -18.0) +assertEq(f32[716 >> 2], -19.0) +assertEq(f32[720 >> 2], -20.0) +assertEq(f32[724 >> 2], -21.0) +assertEq(f32[728 >> 2], -22.0) +assertEq(f32[732 >> 2], -23.0) +assertEq(f32[736 >> 2], -24.0) +assertEq(f32[740 >> 2], -25.0) +assertEq(f32[744 >> 2], -26.0) +assertEq(f32[748 >> 2], -27.0) +assertEq(f32[748 >> 2], -27.0) +assertEq(f32[752 >> 2], -28.0) +assertEq(f32[756 >> 2], -29.0) +assertEq(f32[760 >> 2], -30.0) +assertEq(f32[764 >> 2], -31.0) +assertEq(f32[768 >> 2], -0.125) +assertEq(f32[772 >> 2], -0.1328125) +assertEq(f32[776 >> 2], -0.140625) +assertEq(f32[780 >> 2], -0.1484375) +assertEq(f32[784 >> 2], -0.15625) +assertEq(f32[788 >> 2], -0.1640625) +assertEq(f32[792 >> 2], -0.171875) +assertEq(f32[796 >> 2], -0.1796875) +assertEq(f32[800 >> 2], -0.1875) +assertEq(f32[804 >> 2], -0.1953125) +assertEq(f32[808 >> 2], -0.203125) +assertEq(f32[812 >> 2], -0.2109375) +assertEq(f32[816 >> 2], -0.21875) +assertEq(f32[820 >> 2], -0.2265625) +assertEq(f32[824 >> 2], -0.234375) +assertEq(f32[828 >> 2], -0.2421875) +assertEq(f32[832 >> 2], -0.25) +assertEq(f32[836 >> 2], -0.265625) +assertEq(f32[840 >> 2], -0.28125) +assertEq(f32[844 >> 2], -0.296875) +assertEq(f32[848 >> 2], -0.3125) +assertEq(f32[852 >> 2], -0.328125) +assertEq(f32[856 >> 2], -0.34375) +assertEq(f32[860 >> 2], -0.359375) +assertEq(f32[864 >> 2], -0.375) +assertEq(f32[868 >> 2], -0.390625) +assertEq(f32[872 >> 2], -0.40625) +assertEq(f32[876 >> 2], -0.421875) +assertEq(f32[880 >> 2], -0.4375) +assertEq(f32[884 >> 2], -0.453125) +assertEq(f32[888 >> 2], -0.46875) +assertEq(f32[892 >> 2], -0.484375) +assertEq(f32[896 >> 2], -0.5) +assertEq(f32[900 >> 2], -0.53125) +assertEq(f32[904 >> 2], -0.5625) +assertEq(f32[908 >> 2], -0.59375) +assertEq(f32[912 >> 2], -0.625) +assertEq(f32[916 >> 2], -0.65625) +assertEq(f32[920 >> 2], -0.6875) +assertEq(f32[924 >> 2], -0.71875) +assertEq(f32[928 >> 2], -0.75) +assertEq(f32[932 >> 2], -0.78125) +assertEq(f32[936 >> 2], -0.8125) +assertEq(f32[940 >> 2], -0.84375) +assertEq(f32[944 >> 2], -0.875) +assertEq(f32[948 >> 2], -0.90625) +assertEq(f32[952 >> 2], -0.9375) +assertEq(f32[956 >> 2], -0.96875) +assertEq(f32[960 >> 2], -1.0) +assertEq(f32[964 >> 2], -1.0625) +assertEq(f32[968 >> 2], -1.125) +assertEq(f32[972 >> 2], -1.1875) +assertEq(f32[976 >> 2], -1.25) +assertEq(f32[980 >> 2], -1.3125) +assertEq(f32[984 >> 2], -1.375) +assertEq(f32[988 >> 2], -1.4375) +assertEq(f32[992 >> 2], -1.5) +assertEq(f32[996 >> 2], -1.5625) +assertEq(f32[1000 >> 2], -1.625) +assertEq(f32[1004 >> 2], -1.6875) +assertEq(f32[1008 >> 2], -1.75) +assertEq(f32[1012 >> 2], -1.8125) +assertEq(f32[1016 >> 2], -1.875) +assertEq(f32[1020 >> 2], -1.9375) + +assertEq(f32[1024 >> 2], 2.124999761581421) +assertEq(f32[1028 >> 2], 2.249999761581421) +assertEq(f32[1032 >> 2], 2.374999761581421) +assertEq(f32[1036 >> 2], 2.499999761581421) +assertEq(f32[1040 >> 2], 2.624999761581421) +assertEq(f32[1044 >> 2], 2.749999761581421) +assertEq(f32[1048 >> 2], 2.874999761581421) +assertEq(f32[1052 >> 2], 2.999999761581421) +assertEq(f32[1056 >> 2], 3.124999761581421) +assertEq(f32[1060 >> 2], 3.249999761581421) +assertEq(f32[1064 >> 2], 3.374999761581421) +assertEq(f32[1068 >> 2], 3.499999761581421) +assertEq(f32[1072 >> 2], 3.624999761581421) +assertEq(f32[1076 >> 2], 3.749999761581421) +assertEq(f32[1080 >> 2], 3.874999761581421) +assertEq(f32[1084 >> 2], 3.999999761581421) +assertEq(f32[1088 >> 2], 4.249999523162842) +assertEq(f32[1092 >> 2], 4.499999523162842) +assertEq(f32[1096 >> 2], 4.749999523162842) +assertEq(f32[1100 >> 2], 4.999999523162842) +assertEq(f32[1104 >> 2], 5.249999523162842) +assertEq(f32[1108 >> 2], 5.499999523162842) +assertEq(f32[1112 >> 2], 5.749999523162842) +assertEq(f32[1116 >> 2], 5.999999523162842) +assertEq(f32[1120 >> 2], 6.249999523162842) +assertEq(f32[1124 >> 2], 6.499999523162842) +assertEq(f32[1128 >> 2], 6.749999523162842) +assertEq(f32[1132 >> 2], 6.999999523162842) +assertEq(f32[1136 >> 2], 7.249999523162842) +assertEq(f32[1140 >> 2], 7.499999523162842) +assertEq(f32[1144 >> 2], 7.749999523162842) +assertEq(f32[1148 >> 2], 7.999999523162842) +assertEq(f32[1152 >> 2], 8.499999046325684) +assertEq(f32[1156 >> 2], 8.999999046325684) +assertEq(f32[1160 >> 2], 9.499999046325684) +assertEq(f32[1164 >> 2], 9.999999046325684) +assertEq(f32[1168 >> 2], 10.499999046325684) +assertEq(f32[1172 >> 2], 10.999999046325684) +assertEq(f32[1176 >> 2], 11.499999046325684) +assertEq(f32[1180 >> 2], 11.999999046325684) +assertEq(f32[1184 >> 2], 12.499999046325684) +assertEq(f32[1184 >> 2], 12.499999046325684) +assertEq(f32[1188 >> 2], 12.999999046325684) +assertEq(f32[1192 >> 2], 13.499999046325684) +assertEq(f32[1196 >> 2], 13.999999046325684) +assertEq(f32[1200 >> 2], 14.499999046325684) +assertEq(f32[1204 >> 2], 14.999999046325684) +assertEq(f32[1208 >> 2], 15.499999046325684) +assertEq(f32[1212 >> 2], 15.999999046325684) +assertEq(f32[1216 >> 2], 16.999998092651367) +assertEq(f32[1220 >> 2], 17.999998092651367) +assertEq(f32[1224 >> 2], 18.999998092651367) +assertEq(f32[1228 >> 2], 19.999998092651367) +assertEq(f32[1232 >> 2], 20.999998092651367) +assertEq(f32[1236 >> 2], 21.999998092651367) +assertEq(f32[1240 >> 2], 22.999998092651367) +assertEq(f32[1244 >> 2], 23.999998092651367) +assertEq(f32[1248 >> 2], 24.999998092651367) +assertEq(f32[1252 >> 2], 25.999998092651367) +assertEq(f32[1256 >> 2], 26.999998092651367) +assertEq(f32[1260 >> 2], 27.999998092651367) +assertEq(f32[1264 >> 2], 28.999998092651367) +assertEq(f32[1268 >> 2], 29.999998092651367) +assertEq(f32[1272 >> 2], 30.999998092651367) +assertEq(f32[1276 >> 2], 31.999998092651367) +assertEq(f32[1280 >> 2], 0.1328124850988388) +assertEq(f32[1284 >> 2], 0.1406249850988388) +assertEq(f32[1288 >> 2], 0.1484374850988388) +assertEq(f32[1292 >> 2], 0.1562499850988388) +assertEq(f32[1296 >> 2], 0.1640624850988388) +assertEq(f32[1300 >> 2], 0.1718749850988388) +assertEq(f32[1304 >> 2], 0.1796874850988388) +assertEq(f32[1308 >> 2], 0.1874999850988388) +assertEq(f32[1312 >> 2], 0.1953124850988388) +assertEq(f32[1316 >> 2], 0.2031249850988388) +assertEq(f32[1320 >> 2], 0.2109374850988388) +assertEq(f32[1324 >> 2], 0.2187499850988388) +assertEq(f32[1328 >> 2], 0.2265624850988388) +assertEq(f32[1332 >> 2], 0.2343749850988388) +assertEq(f32[1336 >> 2], 0.2421874850988388) +assertEq(f32[1340 >> 2], 0.2499999850988388) +assertEq(f32[1344 >> 2], 0.2656249701976776) +assertEq(f32[1348 >> 2], 0.2812499701976776) +assertEq(f32[1352 >> 2], 0.2968749701976776) +assertEq(f32[1356 >> 2], 0.3124999701976776) +assertEq(f32[1360 >> 2], 0.3281249701976776) +assertEq(f32[1364 >> 2], 0.3437499701976776) +assertEq(f32[1368 >> 2], 0.3593749701976776) +assertEq(f32[1372 >> 2], 0.3749999701976776) +assertEq(f32[1376 >> 2], 0.3906249701976776) +assertEq(f32[1380 >> 2], 0.4062499701976776) +assertEq(f32[1384 >> 2], 0.4218749701976776) +assertEq(f32[1388 >> 2], 0.4374999701976776) +assertEq(f32[1392 >> 2], 0.4531249701976776) +assertEq(f32[1396 >> 2], 0.4687499701976776) +assertEq(f32[1400 >> 2], 0.4843749701976776) +assertEq(f32[1404 >> 2], 0.4999999701976776) +assertEq(f32[1408 >> 2], 0.5312499403953552) +assertEq(f32[1412 >> 2], 0.5624999403953552) +assertEq(f32[1416 >> 2], 0.5937499403953552) +assertEq(f32[1420 >> 2], 0.6249999403953552) +assertEq(f32[1424 >> 2], 0.6562499403953552) +assertEq(f32[1428 >> 2], 0.6874999403953552) +assertEq(f32[1432 >> 2], 0.7187499403953552) +assertEq(f32[1436 >> 2], 0.7499999403953552) +assertEq(f32[1440 >> 2], 0.7812499403953552) +assertEq(f32[1444 >> 2], 0.8124999403953552) +assertEq(f32[1448 >> 2], 0.8437499403953552) +assertEq(f32[1452 >> 2], 0.8749999403953552) +assertEq(f32[1456 >> 2], 0.9062499403953552) +assertEq(f32[1460 >> 2], 0.9374999403953552) +assertEq(f32[1464 >> 2], 0.9687499403953552) +assertEq(f32[1468 >> 2], 0.9999999403953552) +assertEq(f32[1472 >> 2], 1.0624998807907104) +assertEq(f32[1476 >> 2], 1.1249998807907104) +assertEq(f32[1480 >> 2], 1.1874998807907104) +assertEq(f32[1484 >> 2], 1.2499998807907104) +assertEq(f32[1488 >> 2], 1.3124998807907104) +assertEq(f32[1492 >> 2], 1.3749998807907104) +assertEq(f32[1496 >> 2], 1.4374998807907104) +assertEq(f32[1500 >> 2], 1.4999998807907104) +assertEq(f32[1504 >> 2], 1.5624998807907104) +assertEq(f32[1508 >> 2], 1.6249998807907104) +assertEq(f32[1512 >> 2], 1.6874998807907104) +assertEq(f32[1516 >> 2], 1.7499998807907104) +assertEq(f32[1520 >> 2], 1.8124998807907104) +assertEq(f32[1524 >> 2], 1.8749998807907104) +assertEq(f32[1528 >> 2], 1.9374998807907104) +assertEq(f32[1532 >> 2], 1.9999998807907104) +assertEq(f32[1536 >> 2], -2.124999761581421) +assertEq(f32[1540 >> 2], -2.249999761581421) +assertEq(f32[1544 >> 2], -2.374999761581421) +assertEq(f32[1548 >> 2], -2.499999761581421) +assertEq(f32[1552 >> 2], -2.624999761581421) +assertEq(f32[1556 >> 2], -2.749999761581421) +assertEq(f32[1560 >> 2], -2.874999761581421) +assertEq(f32[1564 >> 2], -2.999999761581421) +assertEq(f32[1568 >> 2], -3.124999761581421) +assertEq(f32[1572 >> 2], -3.249999761581421) +assertEq(f32[1576 >> 2], -3.374999761581421) +assertEq(f32[1580 >> 2], -3.499999761581421) +assertEq(f32[1584 >> 2], -3.624999761581421) +assertEq(f32[1584 >> 2], -3.624999761581421) +assertEq(f32[1588 >> 2], -3.749999761581421) +assertEq(f32[1592 >> 2], -3.874999761581421) +assertEq(f32[1596 >> 2], -3.999999761581421) +assertEq(f32[1600 >> 2], -4.249999523162842) +assertEq(f32[1604 >> 2], -4.499999523162842) +assertEq(f32[1608 >> 2], -4.749999523162842) +assertEq(f32[1612 >> 2], -4.999999523162842) +assertEq(f32[1616 >> 2], -5.249999523162842) +assertEq(f32[1620 >> 2], -5.499999523162842) +assertEq(f32[1624 >> 2], -5.749999523162842) +assertEq(f32[1628 >> 2], -5.999999523162842) +assertEq(f32[1632 >> 2], -6.249999523162842) +assertEq(f32[1636 >> 2], -6.499999523162842) +assertEq(f32[1640 >> 2], -6.749999523162842) +assertEq(f32[1644 >> 2], -6.999999523162842) +assertEq(f32[1648 >> 2], -7.249999523162842) +assertEq(f32[1652 >> 2], -7.499999523162842) +assertEq(f32[1656 >> 2], -7.749999523162842) +assertEq(f32[1660 >> 2], -7.999999523162842) +assertEq(f32[1664 >> 2], -8.499999046325684) +assertEq(f32[1668 >> 2], -8.999999046325684) +assertEq(f32[1672 >> 2], -9.499999046325684) +assertEq(f32[1676 >> 2], -9.999999046325684) +assertEq(f32[1680 >> 2], -10.499999046325684) +assertEq(f32[1684 >> 2], -10.999999046325684) +assertEq(f32[1688 >> 2], -11.499999046325684) +assertEq(f32[1692 >> 2], -11.999999046325684) +assertEq(f32[1696 >> 2], -12.499999046325684) +assertEq(f32[1700 >> 2], -12.999999046325684) +assertEq(f32[1704 >> 2], -13.499999046325684) +assertEq(f32[1708 >> 2], -13.999999046325684) +assertEq(f32[1712 >> 2], -14.499999046325684) +assertEq(f32[1716 >> 2], -14.999999046325684) +assertEq(f32[1720 >> 2], -15.499999046325684) +assertEq(f32[1724 >> 2], -15.999999046325684) +assertEq(f32[1728 >> 2], -16.999998092651367) +assertEq(f32[1732 >> 2], -17.999998092651367) +assertEq(f32[1736 >> 2], -18.999998092651367) +assertEq(f32[1740 >> 2], -19.999998092651367) +assertEq(f32[1744 >> 2], -20.999998092651367) +assertEq(f32[1748 >> 2], -21.999998092651367) +assertEq(f32[1752 >> 2], -22.999998092651367) +assertEq(f32[1756 >> 2], -23.999998092651367) +assertEq(f32[1760 >> 2], -24.999998092651367) +assertEq(f32[1764 >> 2], -25.999998092651367) +assertEq(f32[1768 >> 2], -26.999998092651367) +assertEq(f32[1772 >> 2], -27.999998092651367) +assertEq(f32[1776 >> 2], -28.999998092651367) +assertEq(f32[1780 >> 2], -29.999998092651367) +assertEq(f32[1784 >> 2], -30.999998092651367) +assertEq(f32[1788 >> 2], -31.999998092651367) +assertEq(f32[1792 >> 2], -0.1328124850988388) +assertEq(f32[1796 >> 2], -0.1406249850988388) +assertEq(f32[1800 >> 2], -0.1484374850988388) +assertEq(f32[1804 >> 2], -0.1562499850988388) +assertEq(f32[1808 >> 2], -0.1640624850988388) +assertEq(f32[1812 >> 2], -0.1718749850988388) +assertEq(f32[1816 >> 2], -0.1796874850988388) +assertEq(f32[1820 >> 2], -0.1874999850988388) +assertEq(f32[1824 >> 2], -0.1953124850988388) +assertEq(f32[1828 >> 2], -0.2031249850988388) +assertEq(f32[1832 >> 2], -0.2109374850988388) +assertEq(f32[1836 >> 2], -0.2187499850988388) +assertEq(f32[1840 >> 2], -0.2265624850988388) +assertEq(f32[1844 >> 2], -0.2343749850988388) +assertEq(f32[1848 >> 2], -0.2421874850988388) +assertEq(f32[1852 >> 2], -0.2499999850988388) +assertEq(f32[1856 >> 2], -0.2656249701976776) +assertEq(f32[1860 >> 2], -0.2812499701976776) +assertEq(f32[1864 >> 2], -0.2968749701976776) +assertEq(f32[1868 >> 2], -0.3124999701976776) +assertEq(f32[1872 >> 2], -0.3281249701976776) +assertEq(f32[1876 >> 2], -0.3437499701976776) +assertEq(f32[1880 >> 2], -0.3593749701976776) +assertEq(f32[1884 >> 2], -0.3749999701976776) +assertEq(f32[1888 >> 2], -0.3906249701976776) +assertEq(f32[1892 >> 2], -0.4062499701976776) +assertEq(f32[1896 >> 2], -0.4218749701976776) +assertEq(f32[1900 >> 2], -0.4374999701976776) +assertEq(f32[1904 >> 2], -0.4531249701976776) +assertEq(f32[1908 >> 2], -0.4687499701976776) +assertEq(f32[1912 >> 2], -0.4843749701976776) +assertEq(f32[1916 >> 2], -0.4999999701976776) +assertEq(f32[1920 >> 2], -0.5312499403953552) +assertEq(f32[1924 >> 2], -0.5624999403953552) +assertEq(f32[1928 >> 2], -0.5937499403953552) +assertEq(f32[1932 >> 2], -0.6249999403953552) +assertEq(f32[1936 >> 2], -0.6562499403953552) +assertEq(f32[1940 >> 2], -0.6874999403953552) +assertEq(f32[1944 >> 2], -0.7187499403953552) +assertEq(f32[1948 >> 2], -0.7499999403953552) +assertEq(f32[1952 >> 2], -0.7812499403953552) +assertEq(f32[1956 >> 2], -0.8124999403953552) +assertEq(f32[1960 >> 2], -0.8437499403953552) +assertEq(f32[1964 >> 2], -0.8749999403953552) +assertEq(f32[1968 >> 2], -0.9062499403953552) +assertEq(f32[1972 >> 2], -0.9374999403953552) +assertEq(f32[1976 >> 2], -0.9687499403953552) +assertEq(f32[1980 >> 2], -0.9999999403953552) +assertEq(f32[1984 >> 2], -1.0624998807907104) +assertEq(f32[1984 >> 2], -1.0624998807907104) +assertEq(f32[1988 >> 2], -1.1249998807907104) +assertEq(f32[1992 >> 2], -1.1874998807907104) +assertEq(f32[1996 >> 2], -1.2499998807907104) +assertEq(f32[2000 >> 2], -1.3124998807907104) +assertEq(f32[2004 >> 2], -1.3749998807907104) +assertEq(f32[2008 >> 2], -1.4374998807907104) +assertEq(f32[2012 >> 2], -1.4999998807907104) +assertEq(f32[2016 >> 2], -1.5624998807907104) +assertEq(f32[2020 >> 2], -1.6249998807907104) +assertEq(f32[2024 >> 2], -1.6874998807907104) +assertEq(f32[2028 >> 2], -1.7499998807907104) +assertEq(f32[2032 >> 2], -1.8124998807907104) +assertEq(f32[2036 >> 2], -1.8749998807907104) +assertEq(f32[2040 >> 2], -1.9374998807907104) +assertEq(f32[2044 >> 2], -1.9999998807907104) + +assertEq(f32[2048 >> 2], 2.000000238418579) +assertEq(f32[2052 >> 2], 2.125000238418579) +assertEq(f32[2056 >> 2], 2.250000238418579) +assertEq(f32[2060 >> 2], 2.375000238418579) +assertEq(f32[2064 >> 2], 2.500000238418579) +assertEq(f32[2068 >> 2], 2.625000238418579) +assertEq(f32[2072 >> 2], 2.750000238418579) +assertEq(f32[2076 >> 2], 2.875000238418579) +assertEq(f32[2080 >> 2], 3.000000238418579) +assertEq(f32[2084 >> 2], 3.125000238418579) +assertEq(f32[2088 >> 2], 3.250000238418579) +assertEq(f32[2092 >> 2], 3.375000238418579) +assertEq(f32[2096 >> 2], 3.500000238418579) +assertEq(f32[2100 >> 2], 3.625000238418579) +assertEq(f32[2104 >> 2], 3.750000238418579) +assertEq(f32[2108 >> 2], 3.875000238418579) +assertEq(f32[2112 >> 2], 4.000000476837158) +assertEq(f32[2116 >> 2], 4.250000476837158) +assertEq(f32[2120 >> 2], 4.500000476837158) +assertEq(f32[2124 >> 2], 4.750000476837158) +assertEq(f32[2128 >> 2], 5.000000476837158) +assertEq(f32[2132 >> 2], 5.250000476837158) +assertEq(f32[2136 >> 2], 5.500000476837158) +assertEq(f32[2140 >> 2], 5.750000476837158) +assertEq(f32[2144 >> 2], 6.000000476837158) +assertEq(f32[2148 >> 2], 6.250000476837158) +assertEq(f32[2152 >> 2], 6.500000476837158) +assertEq(f32[2156 >> 2], 6.750000476837158) +assertEq(f32[2160 >> 2], 7.000000476837158) +assertEq(f32[2164 >> 2], 7.250000476837158) +assertEq(f32[2168 >> 2], 7.500000476837158) +assertEq(f32[2172 >> 2], 7.750000476837158) +assertEq(f32[2176 >> 2], 8.000000953674316) +assertEq(f32[2180 >> 2], 8.500000953674316) +assertEq(f32[2184 >> 2], 9.000000953674316) +assertEq(f32[2188 >> 2], 9.500000953674316) +assertEq(f32[2192 >> 2], 10.000000953674316) +assertEq(f32[2196 >> 2], 10.500000953674316) +assertEq(f32[2200 >> 2], 11.000000953674316) +assertEq(f32[2204 >> 2], 11.500000953674316) +assertEq(f32[2208 >> 2], 12.000000953674316) +assertEq(f32[2212 >> 2], 12.500000953674316) +assertEq(f32[2216 >> 2], 13.000000953674316) +assertEq(f32[2220 >> 2], 13.500000953674316) +assertEq(f32[2224 >> 2], 14.000000953674316) +assertEq(f32[2228 >> 2], 14.500000953674316) +assertEq(f32[2228 >> 2], 14.500000953674316) +assertEq(f32[2232 >> 2], 15.000000953674316) +assertEq(f32[2236 >> 2], 15.500000953674316) +assertEq(f32[2240 >> 2], 16.000001907348633) +assertEq(f32[2244 >> 2], 17.000001907348633) +assertEq(f32[2248 >> 2], 18.000001907348633) +assertEq(f32[2252 >> 2], 19.000001907348633) +assertEq(f32[2256 >> 2], 20.000001907348633) +assertEq(f32[2260 >> 2], 21.000001907348633) +assertEq(f32[2264 >> 2], 22.000001907348633) +assertEq(f32[2268 >> 2], 23.000001907348633) +assertEq(f32[2272 >> 2], 24.000001907348633) +assertEq(f32[2276 >> 2], 25.000001907348633) +assertEq(f32[2280 >> 2], 26.000001907348633) +assertEq(f32[2284 >> 2], 27.000001907348633) +assertEq(f32[2288 >> 2], 28.000001907348633) +assertEq(f32[2292 >> 2], 29.000001907348633) +assertEq(f32[2296 >> 2], 30.000001907348633) +assertEq(f32[2300 >> 2], 31.000001907348633) +assertEq(f32[2304 >> 2], 0.1250000149011612) +assertEq(f32[2308 >> 2], 0.1328125149011612) +assertEq(f32[2312 >> 2], 0.1406250149011612) +assertEq(f32[2316 >> 2], 0.1484375149011612) +assertEq(f32[2320 >> 2], 0.1562500149011612) +assertEq(f32[2324 >> 2], 0.1640625149011612) +assertEq(f32[2328 >> 2], 0.1718750149011612) +assertEq(f32[2332 >> 2], 0.1796875149011612) +assertEq(f32[2336 >> 2], 0.1875000149011612) +assertEq(f32[2340 >> 2], 0.1953125149011612) +assertEq(f32[2344 >> 2], 0.2031250149011612) +assertEq(f32[2348 >> 2], 0.2109375149011612) +assertEq(f32[2352 >> 2], 0.2187500149011612) +assertEq(f32[2356 >> 2], 0.2265625149011612) +assertEq(f32[2360 >> 2], 0.2343750149011612) +assertEq(f32[2364 >> 2], 0.2421875149011612) +assertEq(f32[2368 >> 2], 0.2500000298023224) +assertEq(f32[2372 >> 2], 0.2656250298023224) +assertEq(f32[2376 >> 2], 0.2812500298023224) +assertEq(f32[2380 >> 2], 0.2968750298023224) +assertEq(f32[2384 >> 2], 0.3125000298023224) +assertEq(f32[2388 >> 2], 0.3281250298023224) +assertEq(f32[2392 >> 2], 0.3437500298023224) +assertEq(f32[2396 >> 2], 0.3593750298023224) +assertEq(f32[2400 >> 2], 0.3750000298023224) +assertEq(f32[2404 >> 2], 0.3906250298023224) +assertEq(f32[2408 >> 2], 0.4062500298023224) +assertEq(f32[2412 >> 2], 0.4218750298023224) +assertEq(f32[2416 >> 2], 0.4375000298023224) +assertEq(f32[2420 >> 2], 0.4531250298023224) +assertEq(f32[2424 >> 2], 0.4687500298023224) +assertEq(f32[2428 >> 2], 0.4843750298023224) +assertEq(f32[2432 >> 2], 0.5000000596046448) +assertEq(f32[2436 >> 2], 0.5312500596046448) +assertEq(f32[2440 >> 2], 0.5625000596046448) +assertEq(f32[2444 >> 2], 0.5937500596046448) +assertEq(f32[2448 >> 2], 0.6250000596046448) +assertEq(f32[2452 >> 2], 0.6562500596046448) +assertEq(f32[2456 >> 2], 0.6875000596046448) +assertEq(f32[2460 >> 2], 0.7187500596046448) +assertEq(f32[2464 >> 2], 0.7500000596046448) +assertEq(f32[2468 >> 2], 0.7812500596046448) +assertEq(f32[2472 >> 2], 0.8125000596046448) +assertEq(f32[2476 >> 2], 0.8437500596046448) +assertEq(f32[2480 >> 2], 0.8750000596046448) +assertEq(f32[2484 >> 2], 0.9062500596046448) +assertEq(f32[2488 >> 2], 0.9375000596046448) +assertEq(f32[2492 >> 2], 0.9687500596046448) +assertEq(f32[2496 >> 2], 1.0000001192092896) +assertEq(f32[2500 >> 2], 1.0625001192092896) +assertEq(f32[2504 >> 2], 1.1250001192092896) +assertEq(f32[2508 >> 2], 1.1875001192092896) +assertEq(f32[2512 >> 2], 1.2500001192092896) +assertEq(f32[2516 >> 2], 1.3125001192092896) +assertEq(f32[2520 >> 2], 1.3750001192092896) +assertEq(f32[2524 >> 2], 1.4375001192092896) +assertEq(f32[2528 >> 2], 1.5000001192092896) +assertEq(f32[2532 >> 2], 1.5625001192092896) +assertEq(f32[2536 >> 2], 1.6250001192092896) +assertEq(f32[2540 >> 2], 1.6875001192092896) +assertEq(f32[2544 >> 2], 1.7500001192092896) +assertEq(f32[2548 >> 2], 1.8125001192092896) +assertEq(f32[2552 >> 2], 1.8750001192092896) +assertEq(f32[2556 >> 2], 1.9375001192092896) +assertEq(f32[2560 >> 2], -2.000000238418579) +assertEq(f32[2564 >> 2], -2.125000238418579) +assertEq(f32[2568 >> 2], -2.250000238418579) +assertEq(f32[2572 >> 2], -2.375000238418579) +assertEq(f32[2576 >> 2], -2.500000238418579) +assertEq(f32[2580 >> 2], -2.625000238418579) +assertEq(f32[2584 >> 2], -2.750000238418579) +assertEq(f32[2588 >> 2], -2.875000238418579) +assertEq(f32[2592 >> 2], -3.000000238418579) +assertEq(f32[2596 >> 2], -3.125000238418579) +assertEq(f32[2600 >> 2], -3.250000238418579) +assertEq(f32[2604 >> 2], -3.375000238418579) +assertEq(f32[2608 >> 2], -3.500000238418579) +assertEq(f32[2612 >> 2], -3.625000238418579) +assertEq(f32[2616 >> 2], -3.750000238418579) +assertEq(f32[2620 >> 2], -3.875000238418579) +assertEq(f32[2624 >> 2], -4.000000476837158) +assertEq(f32[2628 >> 2], -4.250000476837158) +assertEq(f32[2628 >> 2], -4.250000476837158) +assertEq(f32[2632 >> 2], -4.500000476837158) +assertEq(f32[2636 >> 2], -4.750000476837158) +assertEq(f32[2640 >> 2], -5.000000476837158) +assertEq(f32[2644 >> 2], -5.250000476837158) +assertEq(f32[2648 >> 2], -5.500000476837158) +assertEq(f32[2652 >> 2], -5.750000476837158) +assertEq(f32[2656 >> 2], -6.000000476837158) +assertEq(f32[2660 >> 2], -6.250000476837158) +assertEq(f32[2664 >> 2], -6.500000476837158) +assertEq(f32[2668 >> 2], -6.750000476837158) +assertEq(f32[2672 >> 2], -7.000000476837158) +assertEq(f32[2676 >> 2], -7.250000476837158) +assertEq(f32[2680 >> 2], -7.500000476837158) +assertEq(f32[2684 >> 2], -7.750000476837158) +assertEq(f32[2688 >> 2], -8.000000953674316) +assertEq(f32[2692 >> 2], -8.500000953674316) +assertEq(f32[2696 >> 2], -9.000000953674316) +assertEq(f32[2700 >> 2], -9.500000953674316) +assertEq(f32[2704 >> 2], -10.000000953674316) +assertEq(f32[2708 >> 2], -10.500000953674316) +assertEq(f32[2712 >> 2], -11.000000953674316) +assertEq(f32[2716 >> 2], -11.500000953674316) +assertEq(f32[2720 >> 2], -12.000000953674316) +assertEq(f32[2724 >> 2], -12.500000953674316) +assertEq(f32[2728 >> 2], -13.000000953674316) +assertEq(f32[2732 >> 2], -13.500000953674316) +assertEq(f32[2736 >> 2], -14.000000953674316) +assertEq(f32[2740 >> 2], -14.500000953674316) +assertEq(f32[2744 >> 2], -15.000000953674316) +assertEq(f32[2748 >> 2], -15.500000953674316) +assertEq(f32[2752 >> 2], -16.000001907348633) +assertEq(f32[2756 >> 2], -17.000001907348633) +assertEq(f32[2760 >> 2], -18.000001907348633) +assertEq(f32[2764 >> 2], -19.000001907348633) +assertEq(f32[2768 >> 2], -20.000001907348633) +assertEq(f32[2772 >> 2], -21.000001907348633) +assertEq(f32[2776 >> 2], -22.000001907348633) +assertEq(f32[2780 >> 2], -23.000001907348633) +assertEq(f32[2784 >> 2], -24.000001907348633) +assertEq(f32[2788 >> 2], -25.000001907348633) +assertEq(f32[2792 >> 2], -26.000001907348633) +assertEq(f32[2796 >> 2], -27.000001907348633) +assertEq(f32[2800 >> 2], -28.000001907348633) +assertEq(f32[2804 >> 2], -29.000001907348633) +assertEq(f32[2808 >> 2], -30.000001907348633) +assertEq(f32[2812 >> 2], -31.000001907348633) +assertEq(f32[2816 >> 2], -0.1250000149011612) +assertEq(f32[2820 >> 2], -0.1328125149011612) +assertEq(f32[2824 >> 2], -0.1406250149011612) +assertEq(f32[2828 >> 2], -0.1484375149011612) +assertEq(f32[2832 >> 2], -0.1562500149011612) +assertEq(f32[2836 >> 2], -0.1640625149011612) +assertEq(f32[2840 >> 2], -0.1718750149011612) +assertEq(f32[2844 >> 2], -0.1796875149011612) +assertEq(f32[2848 >> 2], -0.1875000149011612) +assertEq(f32[2852 >> 2], -0.1953125149011612) +assertEq(f32[2856 >> 2], -0.2031250149011612) +assertEq(f32[2860 >> 2], -0.2109375149011612) +assertEq(f32[2864 >> 2], -0.2187500149011612) +assertEq(f32[2868 >> 2], -0.2265625149011612) +assertEq(f32[2872 >> 2], -0.2343750149011612) +assertEq(f32[2876 >> 2], -0.2421875149011612) +assertEq(f32[2880 >> 2], -0.2500000298023224) +assertEq(f32[2884 >> 2], -0.2656250298023224) +assertEq(f32[2888 >> 2], -0.2812500298023224) +assertEq(f32[2892 >> 2], -0.2968750298023224) +assertEq(f32[2896 >> 2], -0.3125000298023224) +assertEq(f32[2900 >> 2], -0.3281250298023224) +assertEq(f32[2904 >> 2], -0.3437500298023224) +assertEq(f32[2908 >> 2], -0.3593750298023224) +assertEq(f32[2912 >> 2], -0.3750000298023224) +assertEq(f32[2916 >> 2], -0.3906250298023224) +assertEq(f32[2920 >> 2], -0.4062500298023224) +assertEq(f32[2924 >> 2], -0.4218750298023224) +assertEq(f32[2928 >> 2], -0.4375000298023224) +assertEq(f32[2932 >> 2], -0.4531250298023224) +assertEq(f32[2936 >> 2], -0.4687500298023224) +assertEq(f32[2940 >> 2], -0.4843750298023224) +assertEq(f32[2944 >> 2], -0.5000000596046448) +assertEq(f32[2948 >> 2], -0.5312500596046448) +assertEq(f32[2952 >> 2], -0.5625000596046448) +assertEq(f32[2956 >> 2], -0.5937500596046448) +assertEq(f32[2960 >> 2], -0.6250000596046448) +assertEq(f32[2964 >> 2], -0.6562500596046448) +assertEq(f32[2968 >> 2], -0.6875000596046448) +assertEq(f32[2972 >> 2], -0.7187500596046448) +assertEq(f32[2976 >> 2], -0.7500000596046448) +assertEq(f32[2980 >> 2], -0.7812500596046448) +assertEq(f32[2984 >> 2], -0.8125000596046448) +assertEq(f32[2988 >> 2], -0.8437500596046448) +assertEq(f32[2992 >> 2], -0.8750000596046448) +assertEq(f32[2996 >> 2], -0.9062500596046448) +assertEq(f32[3000 >> 2], -0.9375000596046448) +assertEq(f32[3004 >> 2], -0.9687500596046448) +assertEq(f32[3008 >> 2], -1.0000001192092896) +assertEq(f32[3012 >> 2], -1.0625001192092896) +assertEq(f32[3016 >> 2], -1.1250001192092896) +assertEq(f32[3020 >> 2], -1.1875001192092896) +assertEq(f32[3024 >> 2], -1.2500001192092896) +assertEq(f32[3028 >> 2], -1.3125001192092896) +assertEq(f32[3028 >> 2], -1.3125001192092896) +assertEq(f32[3032 >> 2], -1.3750001192092896) +assertEq(f32[3036 >> 2], -1.4375001192092896) +assertEq(f32[3040 >> 2], -1.5000001192092896) +assertEq(f32[3044 >> 2], -1.5625001192092896) +assertEq(f32[3048 >> 2], -1.6250001192092896) +assertEq(f32[3052 >> 2], -1.6875001192092896) +assertEq(f32[3056 >> 2], -1.7500001192092896) +assertEq(f32[3060 >> 2], -1.8125001192092896) +assertEq(f32[3064 >> 2], -1.8750001192092896) +assertEq(f32[3068 >> 2], -1.9375001192092896) + +assertEq(f32[3072 >> 2], 2.0625) +assertEq(f32[3076 >> 2], 2.1875) +assertEq(f32[3080 >> 2], 2.3125) +assertEq(f32[3084 >> 2], 2.4375) +assertEq(f32[3088 >> 2], 2.5625) +assertEq(f32[3092 >> 2], 2.6875) +assertEq(f32[3096 >> 2], 2.8125) +assertEq(f32[3100 >> 2], 2.9375) +assertEq(f32[3104 >> 2], 3.0625) +assertEq(f32[3108 >> 2], 3.1875) +assertEq(f32[3112 >> 2], 3.3125) +assertEq(f32[3116 >> 2], 3.4375) +assertEq(f32[3120 >> 2], 3.5625) +assertEq(f32[3124 >> 2], 3.6875) +assertEq(f32[3128 >> 2], 3.8125) +assertEq(f32[3132 >> 2], 3.9375) +assertEq(f32[3136 >> 2], 4.125) +assertEq(f32[3140 >> 2], 4.375) +assertEq(f32[3144 >> 2], 4.625) +assertEq(f32[3148 >> 2], 4.875) +assertEq(f32[3152 >> 2], 5.125) +assertEq(f32[3156 >> 2], 5.375) +assertEq(f32[3160 >> 2], 5.625) +assertEq(f32[3164 >> 2], 5.875) +assertEq(f32[3168 >> 2], 6.125) +assertEq(f32[3172 >> 2], 6.375) +assertEq(f32[3176 >> 2], 6.625) +assertEq(f32[3180 >> 2], 6.875) +assertEq(f32[3184 >> 2], 7.125) +assertEq(f32[3188 >> 2], 7.375) +assertEq(f32[3192 >> 2], 7.625) +assertEq(f32[3196 >> 2], 7.875) +assertEq(f32[3200 >> 2], 8.25) +assertEq(f32[3204 >> 2], 8.75) +assertEq(f32[3208 >> 2], 9.25) +assertEq(f32[3212 >> 2], 9.75) +assertEq(f32[3216 >> 2], 10.25) +assertEq(f32[3220 >> 2], 10.75) +assertEq(f32[3224 >> 2], 11.25) +assertEq(f32[3224 >> 2], 11.25) +assertEq(f32[3228 >> 2], 11.75) +assertEq(f32[3232 >> 2], 12.25) +assertEq(f32[3236 >> 2], 12.75) +assertEq(f32[3240 >> 2], 13.25) +assertEq(f32[3244 >> 2], 13.75) +assertEq(f32[3248 >> 2], 14.25) +assertEq(f32[3252 >> 2], 14.75) +assertEq(f32[3256 >> 2], 15.25) +assertEq(f32[3260 >> 2], 15.75) +assertEq(f32[3264 >> 2], 16.5) +assertEq(f32[3268 >> 2], 17.5) +assertEq(f32[3272 >> 2], 18.5) +assertEq(f32[3276 >> 2], 19.5) +assertEq(f32[3280 >> 2], 20.5) +assertEq(f32[3284 >> 2], 21.5) +assertEq(f32[3288 >> 2], 22.5) +assertEq(f32[3292 >> 2], 23.5) +assertEq(f32[3296 >> 2], 24.5) +assertEq(f32[3300 >> 2], 25.5) +assertEq(f32[3304 >> 2], 26.5) +assertEq(f32[3308 >> 2], 27.5) +assertEq(f32[3312 >> 2], 28.5) +assertEq(f32[3316 >> 2], 29.5) +assertEq(f32[3320 >> 2], 30.5) +assertEq(f32[3324 >> 2], 31.5) +assertEq(f32[3328 >> 2], 0.12890625) +assertEq(f32[3332 >> 2], 0.13671875) +assertEq(f32[3336 >> 2], 0.14453125) +assertEq(f32[3340 >> 2], 0.15234375) +assertEq(f32[3344 >> 2], 0.16015625) +assertEq(f32[3348 >> 2], 0.16796875) +assertEq(f32[3352 >> 2], 0.17578125) +assertEq(f32[3356 >> 2], 0.18359375) +assertEq(f32[3360 >> 2], 0.19140625) +assertEq(f32[3364 >> 2], 0.19921875) +assertEq(f32[3368 >> 2], 0.20703125) +assertEq(f32[3372 >> 2], 0.21484375) +assertEq(f32[3376 >> 2], 0.22265625) +assertEq(f32[3380 >> 2], 0.23046875) +assertEq(f32[3384 >> 2], 0.23828125) +assertEq(f32[3388 >> 2], 0.24609375) +assertEq(f32[3392 >> 2], 0.2578125) +assertEq(f32[3396 >> 2], 0.2734375) +assertEq(f32[3400 >> 2], 0.2890625) +assertEq(f32[3404 >> 2], 0.3046875) +assertEq(f32[3408 >> 2], 0.3203125) +assertEq(f32[3412 >> 2], 0.3359375) +assertEq(f32[3416 >> 2], 0.3515625) +assertEq(f32[3420 >> 2], 0.3671875) +assertEq(f32[3424 >> 2], 0.3828125) +assertEq(f32[3428 >> 2], 0.3984375) +assertEq(f32[3432 >> 2], 0.4140625) +assertEq(f32[3436 >> 2], 0.4296875) +assertEq(f32[3440 >> 2], 0.4453125) +assertEq(f32[3444 >> 2], 0.4609375) +assertEq(f32[3448 >> 2], 0.4765625) +assertEq(f32[3452 >> 2], 0.4921875) +assertEq(f32[3456 >> 2], 0.515625) +assertEq(f32[3460 >> 2], 0.546875) +assertEq(f32[3464 >> 2], 0.578125) +assertEq(f32[3468 >> 2], 0.609375) +assertEq(f32[3472 >> 2], 0.640625) +assertEq(f32[3476 >> 2], 0.671875) +assertEq(f32[3480 >> 2], 0.703125) +assertEq(f32[3484 >> 2], 0.734375) +assertEq(f32[3488 >> 2], 0.765625) +assertEq(f32[3492 >> 2], 0.796875) +assertEq(f32[3496 >> 2], 0.828125) +assertEq(f32[3500 >> 2], 0.859375) +assertEq(f32[3504 >> 2], 0.890625) +assertEq(f32[3508 >> 2], 0.921875) +assertEq(f32[3512 >> 2], 0.953125) +assertEq(f32[3516 >> 2], 0.984375) +assertEq(f32[3520 >> 2], 1.03125) +assertEq(f32[3524 >> 2], 1.09375) +assertEq(f32[3528 >> 2], 1.15625) +assertEq(f32[3532 >> 2], 1.21875) +assertEq(f32[3536 >> 2], 1.28125) +assertEq(f32[3540 >> 2], 1.34375) +assertEq(f32[3544 >> 2], 1.40625) +assertEq(f32[3548 >> 2], 1.46875) +assertEq(f32[3552 >> 2], 1.53125) +assertEq(f32[3556 >> 2], 1.59375) +assertEq(f32[3560 >> 2], 1.65625) +assertEq(f32[3564 >> 2], 1.71875) +assertEq(f32[3568 >> 2], 1.78125) +assertEq(f32[3572 >> 2], 1.84375) +assertEq(f32[3576 >> 2], 1.90625) +assertEq(f32[3580 >> 2], 1.96875) +assertEq(f32[3584 >> 2], -2.0625) +assertEq(f32[3588 >> 2], -2.1875) +assertEq(f32[3592 >> 2], -2.3125) +assertEq(f32[3596 >> 2], -2.4375) +assertEq(f32[3600 >> 2], -2.5625) +assertEq(f32[3604 >> 2], -2.6875) +assertEq(f32[3608 >> 2], -2.8125) +assertEq(f32[3612 >> 2], -2.9375) +assertEq(f32[3616 >> 2], -3.0625) +assertEq(f32[3620 >> 2], -3.1875) +assertEq(f32[3624 >> 2], -3.3125) +assertEq(f32[3624 >> 2], -3.3125) +assertEq(f32[3628 >> 2], -3.4375) +assertEq(f32[3632 >> 2], -3.5625) +assertEq(f32[3636 >> 2], -3.6875) +assertEq(f32[3640 >> 2], -3.8125) +assertEq(f32[3644 >> 2], -3.9375) +assertEq(f32[3648 >> 2], -4.125) +assertEq(f32[3652 >> 2], -4.375) +assertEq(f32[3656 >> 2], -4.625) +assertEq(f32[3660 >> 2], -4.875) +assertEq(f32[3664 >> 2], -5.125) +assertEq(f32[3668 >> 2], -5.375) +assertEq(f32[3672 >> 2], -5.625) +assertEq(f32[3676 >> 2], -5.875) +assertEq(f32[3680 >> 2], -6.125) +assertEq(f32[3684 >> 2], -6.375) +assertEq(f32[3688 >> 2], -6.625) +assertEq(f32[3692 >> 2], -6.875) +assertEq(f32[3696 >> 2], -7.125) +assertEq(f32[3700 >> 2], -7.375) +assertEq(f32[3704 >> 2], -7.625) +assertEq(f32[3708 >> 2], -7.875) +assertEq(f32[3712 >> 2], -8.25) +assertEq(f32[3716 >> 2], -8.75) +assertEq(f32[3720 >> 2], -9.25) +assertEq(f32[3724 >> 2], -9.75) +assertEq(f32[3728 >> 2], -10.25) +assertEq(f32[3732 >> 2], -10.75) +assertEq(f32[3736 >> 2], -11.25) +assertEq(f32[3740 >> 2], -11.75) +assertEq(f32[3744 >> 2], -12.25) +assertEq(f32[3748 >> 2], -12.75) +assertEq(f32[3752 >> 2], -13.25) +assertEq(f32[3756 >> 2], -13.75) +assertEq(f32[3760 >> 2], -14.25) +assertEq(f32[3764 >> 2], -14.75) +assertEq(f32[3768 >> 2], -15.25) +assertEq(f32[3772 >> 2], -15.75) +assertEq(f32[3776 >> 2], -16.5) +assertEq(f32[3780 >> 2], -17.5) +assertEq(f32[3784 >> 2], -18.5) +assertEq(f32[3788 >> 2], -19.5) +assertEq(f32[3792 >> 2], -20.5) +assertEq(f32[3796 >> 2], -21.5) +assertEq(f32[3800 >> 2], -22.5) +assertEq(f32[3804 >> 2], -23.5) +assertEq(f32[3808 >> 2], -24.5) +assertEq(f32[3812 >> 2], -25.5) +assertEq(f32[3816 >> 2], -26.5) +assertEq(f32[3820 >> 2], -27.5) +assertEq(f32[3824 >> 2], -28.5) +assertEq(f32[3828 >> 2], -29.5) +assertEq(f32[3832 >> 2], -30.5) +assertEq(f32[3836 >> 2], -31.5) +assertEq(f32[3840 >> 2], -0.12890625) +assertEq(f32[3844 >> 2], -0.13671875) +assertEq(f32[3848 >> 2], -0.14453125) +assertEq(f32[3852 >> 2], -0.15234375) +assertEq(f32[3856 >> 2], -0.16015625) +assertEq(f32[3860 >> 2], -0.16796875) +assertEq(f32[3864 >> 2], -0.17578125) +assertEq(f32[3868 >> 2], -0.18359375) +assertEq(f32[3872 >> 2], -0.19140625) +assertEq(f32[3876 >> 2], -0.19921875) +assertEq(f32[3880 >> 2], -0.20703125) +assertEq(f32[3884 >> 2], -0.21484375) +assertEq(f32[3888 >> 2], -0.22265625) +assertEq(f32[3892 >> 2], -0.23046875) +assertEq(f32[3896 >> 2], -0.23828125) +assertEq(f32[3900 >> 2], -0.24609375) +assertEq(f32[3904 >> 2], -0.2578125) +assertEq(f32[3908 >> 2], -0.2734375) +assertEq(f32[3912 >> 2], -0.2890625) +assertEq(f32[3916 >> 2], -0.3046875) +assertEq(f32[3920 >> 2], -0.3203125) +assertEq(f32[3924 >> 2], -0.3359375) +assertEq(f32[3928 >> 2], -0.3515625) +assertEq(f32[3932 >> 2], -0.3671875) +assertEq(f32[3936 >> 2], -0.3828125) +assertEq(f32[3940 >> 2], -0.3984375) +assertEq(f32[3944 >> 2], -0.4140625) +assertEq(f32[3948 >> 2], -0.4296875) +assertEq(f32[3952 >> 2], -0.4453125) +assertEq(f32[3956 >> 2], -0.4609375) +assertEq(f32[3960 >> 2], -0.4765625) +assertEq(f32[3964 >> 2], -0.4921875) +assertEq(f32[3968 >> 2], -0.515625) +assertEq(f32[3972 >> 2], -0.546875) +assertEq(f32[3976 >> 2], -0.578125) +assertEq(f32[3980 >> 2], -0.609375) +assertEq(f32[3984 >> 2], -0.640625) +assertEq(f32[3988 >> 2], -0.671875) +assertEq(f32[3992 >> 2], -0.703125) +assertEq(f32[3996 >> 2], -0.734375) +assertEq(f32[4000 >> 2], -0.765625) +assertEq(f32[4004 >> 2], -0.796875) +assertEq(f32[4008 >> 2], -0.828125) +assertEq(f32[4012 >> 2], -0.859375) +assertEq(f32[4016 >> 2], -0.890625) +assertEq(f32[4020 >> 2], -0.921875) +assertEq(f32[4024 >> 2], -0.953125) +assertEq(f32[4024 >> 2], -0.953125) +assertEq(f32[4028 >> 2], -0.984375) +assertEq(f32[4032 >> 2], -1.03125) +assertEq(f32[4036 >> 2], -1.09375) +assertEq(f32[4040 >> 2], -1.15625) +assertEq(f32[4044 >> 2], -1.21875) +assertEq(f32[4048 >> 2], -1.28125) +assertEq(f32[4052 >> 2], -1.34375) +assertEq(f32[4056 >> 2], -1.40625) +assertEq(f32[4060 >> 2], -1.46875) +assertEq(f32[4064 >> 2], -1.53125) +assertEq(f32[4068 >> 2], -1.59375) +assertEq(f32[4072 >> 2], -1.65625) +assertEq(f32[4076 >> 2], -1.71875) +assertEq(f32[4080 >> 2], -1.78125) +assertEq(f32[4084 >> 2], -1.84375) +assertEq(f32[4088 >> 2], -1.90625) +assertEq(f32[4092 >> 2], -1.96875) diff --git a/js/src/jit-test/tests/asm.js/testBug975182.js b/js/src/jit-test/tests/asm.js/testBug975182.js new file mode 100644 index 0000000000..41c627148f --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug975182.js @@ -0,0 +1,20 @@ +Function("\ + g = (function(t,foreign){\ + \"use asm\";\ + var ff = foreign.ff;\ + function f() {\ + +ff()\ + }\ + return f\ + })(this, {\ + ff: arguments.callee\ + }, new ArrayBuffer(4096))\ +")() +function m(f) { + for (var j = 0; j < 6000; ++j) { + f(); + if ((j % 1000) === 0) + gc(); + } +} +m(g); diff --git a/js/src/jit-test/tests/asm.js/testBug989166.js b/js/src/jit-test/tests/asm.js/testBug989166.js new file mode 100644 index 0000000000..c96d19de46 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug989166.js @@ -0,0 +1,8 @@ +(function(stdlib) { + "use asm"; + var pow = stdlib.Math.pow + function f() { + return +pow(.0, .0) + } + return f +})(this, {}, ArrayBuffer)() diff --git a/js/src/jit-test/tests/asm.js/testBug999790.js b/js/src/jit-test/tests/asm.js/testBug999790.js new file mode 100644 index 0000000000..85f92c22f7 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBug999790.js @@ -0,0 +1,65 @@ +function CanBeConstructed(f) { + var caught = false; + try { + new f; + } catch (e) { + caught = true; + } + return !caught; +} + +function IsConstructedFunction(f) { + return f.hasOwnProperty('length') + && f.hasOwnProperty('name') + && f.hasOwnProperty('prototype') + && f.prototype.hasOwnProperty('constructor') + && f.prototype.constructor === f; +} + +function IsntConstructedFunction(f) { + return !f.hasOwnProperty('length') + && !f.hasOwnProperty('name') + && !f.hasOwnProperty('prototype') +} + +var m = function() { + "use asm" + function g(){} + return g; +}; +assertEq(CanBeConstructed(m), true, "asm.js modules can't be constructed"); + +var objM = new m; +assertEq(IsConstructedFunction(objM), true); + +var g = m(); +assertEq(CanBeConstructed(g), true, "asm.js functions can't be constructed"); +// g is a ctor returning an primitive value, thus an empty object +assertEq(Object.getOwnPropertyNames(new g).length, 0); + +var n = function() { + "use asm" + function g(){return 42.0} + function h(){return 42} + return { + g: g, + h: h + }; +}; +assertEq(CanBeConstructed(n), true, "asm.js modules can't be constructed"); + +var objN = new n; +// objN is an object with attributes g and h +assertEq(IsntConstructedFunction(objN), true); +assertEq(objN.hasOwnProperty('g'), true); +assertEq(objN.hasOwnProperty('h'), true); + +assertEq(IsConstructedFunction(objN.g), true); +assertEq(IsConstructedFunction(objN.h), true); + +var h = n().h; +assertEq(CanBeConstructed(h), true, "asm.js functions can't be constructed"); +// h is a ctor returning an primitive value, thus an empty object +assertEq(Object.getOwnPropertyNames(new h).length, 0); + +assertEq(typeof(function() {"use asm"; return {}}.prototype) !== 'undefined', true); diff --git a/js/src/jit-test/tests/asm.js/testBullet.js b/js/src/jit-test/tests/asm.js/testBullet.js new file mode 100644 index 0000000000..e8b8c98949 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testBullet.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !isAsmJSCompilationAvailable() + +setIonCheckGraphCoherency(false); +load(libdir + 'bullet.js'); +var results = runBullet(); +assertEq(results.asmJSValidated, true); diff --git a/js/src/jit-test/tests/asm.js/testCall.js b/js/src/jit-test/tests/asm.js/testCall.js new file mode 100644 index 0000000000..e1e14cb47d --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testCall.js @@ -0,0 +1,75 @@ +load(libdir + "asm.js"); +load(libdir + "asserts.js"); + +assertAsmTypeFail(USE_ASM+"function f(){i=i|0} function g() { f(0) } return g"); +assertAsmTypeFail(USE_ASM+"function f(i){i=i|0} function g() { f() } return g"); +assertAsmTypeFail(USE_ASM+"function f(){} function g() { f()|0 } return g"); +assertAsmTypeFail(USE_ASM+"function f(){} function g() { +f() } return g"); +assertAsmTypeFail(USE_ASM+"function f(){} function g() { return f() } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0} function g() { +f() } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0} function g() { f()|f() } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0.0} function g() { f()|0 } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0.0} function g() { ~~f() } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0.0} function g() { -f() } return g"); +assertAsmTypeFail(USE_ASM+"function f(i,j,k,l){i=i|0;j=j|0;k=k|0;l=l|0} function g() { f(0,1,2) } return g"); +assertAsmTypeFail(USE_ASM+"function f(i,j,k,l){i=i|0;j=j|0;k=k|0;l=l|0} function g() { f(0,1,2,3,4) } return g"); +assertAsmTypeFail(USE_ASM+"function f(i){i=i|0} function g() { f(.1) } return g"); +assertAsmTypeFail(USE_ASM+"function f(i){i=+i} function g() { f(1) } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0} function g() { var i=0.1; i=f()|0 } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0} function g() { var i=0.1; i=+f() } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0.1} function g() { var i=0; i=f() } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0.1} function g() { var i=0; i=f()|0 } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0.1} function g() { var i=0; i=+f() } return g"); +assertAsmTypeFail(USE_ASM+"function f(){} function g() { (1, f()) } return g"); + +assertEq(asmLink(asmCompile(USE_ASM+"var x=0; function f() {x=42} function g() { return (f(),x)|0 } return g"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM+"function f() {return 42} function g() { return f()|0 } return g"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM+"function g(i) { i=i|0; return (i+2)|0 } function h(i) { i=i|0; return ((g(i)|0)+8)|0 } return h"))(50), 60); +assertEq(asmLink(asmCompile(USE_ASM+"function g(i) { i=i|0; return (i+2)|0 } function h(i) { i=i|0; return ((g(i)|0)+i)|0 } return h"))(50), 102); +assertEq(asmLink(asmCompile(USE_ASM+"function g(i) { i=+i; return +(i+.1) } function h(i) { i=+i; return +(+g(i)+.2) } return h"))(20), 20+.1+.2); +assertEq(asmLink(asmCompile(USE_ASM+"function g(i,j) { i=i|0;j=j|0; return (i-j)|0 } function h(j,i) { j=j|0;i=i|0; return ((g(i,j)|0)+8)|0 } return h"))(10,20), 18); +assertEq(asmLink(asmCompile(USE_ASM+"function g(i,j) { i=i|0;j=+j; return +(+~~i+j) } function h(i,j) { i=i|0;j=+j; return +(+g(i,j)+8.6) } return h"))(10, 1.5), 10+1.5+8.6); +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o) { i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0; return (n-o)|0 } return f"))(1,2,3,4,5,6,100), -94); +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p) { i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0; return (o-p)|0 } return f"))(1,2,3,4,5,6,100,20), 80); +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p) { i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0; return (((o+p)|0) + ((o+p)|0))|0 } return f"))(1,2,3,4,5,6,30,20), 100); +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p,q,r) { i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p;q=+q;r=+r; return +(q-r) } return f"))(1,2,3,4,5,6,7,8,40.2,1.4), 40.2-1.4); + +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o) { i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0; return (n-o)|0 } function g(i,j) { i=i|0;j=j|0; return f(0,0,0,0,0,i,j)|0 } return g"))(20,5), 15); +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p) { i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0; return (o-p)|0 } function g(i,j) { i=i|0;j=j|0; return f(0,0,0,0,0,0,i,j)|0 } return g"))(20,5), 15); +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p) { i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p; return +(o-p) } function g(i,j) { i=+i;j=+j; return +f(0.0,0.0,0.0,0.0,0.0,0.0,i,j) } return g"))(.5, .1), .5-.1); +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p) { i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0; return (o-p)|0 } function g(i,j) { i=i|0;j=j|0; var k=0; k=(i+j)|0; return ((f(0,0,0,0,0,0,i,j)|0)+k)|0 } return g"))(20,10), 40); +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p) { i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p; return +(o-p) } function g(i,j) { i=+i;j=+j; var k=0.1; k=i+j; return +(+f(0.0,0.0,0.0,0.0,0.0,0.0,i,j)+k) } return g"))(.5, .1), (.5+.1)+(.5-.1)); + +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p,q) { i=i|0;j=j|0;k=k|0;l=l|0;m=+m;n=n|0;o=o|0;p=+p;q=q|0; return +((m-p) + +~~q) } function g(i,j,k) { i=+i;j=+j;k=k|0; return +f(0,0,0,0,j,0,0,i,k) } return g"))(.5, 20.1, 4), (20.1-.5)+4); + +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p) { i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0; return (o-p)|0 } function g(i,j) { i=i|0;j=j|0; return f(0,0,0,0,0,0,f(0,0,0,0,0,0,i,j)|0,j)|0 } return g"))(20,5), 10); +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p) { i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0; return (o-p)|0 } function g(i,j) { i=i|0;j=j|0; return f(0,0,0,0,0,0,f(0,0,0,0,0,0,i,j)|0,f(0,0,0,0,0,0,j,i)|0)|0 } return g"))(20,5), 30); +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p) { i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p; return +(o-p) } function g(i,j) { i=+i;j=+j; return +f(0.0,0.0,0.0,0.0,0.0,0.0,+f(0.0,0.0,0.0,0.0,0.0,0.0,i,j),j) } return g"))(10.3, .2), 10.3-.2-.2); +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p) { i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;p=+p; return +(o-p) } function g(i,j) { i=+i;j=+j; return +f(0.0,0.0,0.0,0.0,0.0,0.0,+f(0.0,0.0,0.0,0.0,0.0,0.0,i,j),+f(0.0,0.0,0.0,0.0,0.0,0.0,j,i)) } return g"))(10.3, .2), (10.3-.2)-(.2-10.3)); +assertEq(asmLink(asmCompile(USE_ASM+"function f(i,j,k,l,m,n,o,p,q) { i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0; return (o-p)|0 } function g(i,j) { i=i|0;j=j|0; return f(0,0,0,0,0,0,i,f(0,0,0,0,0,0,i,j,0)|0,0)|0 } return g"))(20,5), 5); + +assertEq(asmLink(asmCompile(USE_ASM+"function f(i) {i=i|0; return i|0} function g() { return 42; return f(13)|0 } return g"))(), 42); + +assertEq(asmLink(asmCompile(USE_ASM+"function e() { return 42 } function f(i) { i=i|0; switch(i|0) { case 0: return e()|0; default: return 13 } return 0 } function g() { return f(0)|0 } return g"))(), 42); + +var rec = asmLink(asmCompile(USE_ASM+"function rec() { rec() } return rec")); +assertThrowsInstanceOf(rec, InternalError); + +var rec = asmLink(asmCompile(USE_ASM+"function rec(i) { i=i|0; if (!i) return 0; return ((rec((i-1)|0)|0)+1)|0 } return rec")); +assertEq(rec(100), 100); +assertEq(rec(1000), 1000); +assertThrowsInstanceOf(() => rec(100000000000), InternalError); +assertEq(rec(2000), 2000); + +assertAsmTypeFail(USE_ASM+"function f(){return 0} function g() { var i=0; i=f() } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0.0} function g() { var i=0.0; i=f() } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0} function g() { return (f()+1)|0 } return g"); +assertAsmTypeFail(USE_ASM+"function f(){return 0.0} function g() { return +(f()+1.0) } return g"); + +assertEq(asmLink(asmCompile(USE_ASM + "const M = 42; function f() { return M } function g() { return f()|0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "const M = -42; function f() { return M } function g() { return f()|0 } return f"))(), -42); +assertAsmTypeFail(USE_ASM + "const M = 42; function f() { return M } function g() { return +f() } return f"); +assertEq(asmLink(asmCompile(USE_ASM + "const M = 42.1; function f() { return M } function g() { return +f() } return f"))(), 42.1); +assertAsmTypeFail(USE_ASM + "const M = 42.1; function f() { return M } function g() { return f()|0 } return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + "var tof = glob.Math.fround; const M = tof(42); function f() { return M } function g() { return tof(f()) } return f"), this)(), 42); +assertAsmTypeFail('glob', USE_ASM + "var tof = glob.Math.fround; const M = tof(42); function f() { return M } function g() { return +f() } return f"); diff --git a/js/src/jit-test/tests/asm.js/testCloning.js b/js/src/jit-test/tests/asm.js/testCloning.js new file mode 100644 index 0000000000..d4ecb43a25 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testCloning.js @@ -0,0 +1,48 @@ +load(libdir + "asm.js"); + +var code = asmCompile(USE_ASM + "function g() { return 42 } return g"); +assertEq(asmLink(code)(), 42); +assertEq(asmLink(code)(), 42); + +var code = evaluate("(function() { " + USE_ASM + " function g() { return 43 } return g})", {fileName: null}); +assertEq(asmLink(code)(), 43); +assertEq(asmLink(code)(), 43); + +var code = asmCompile('glob', 'ffis', 'buf', USE_ASM + 'var i32=new glob.Int32Array(buf); function g() { return i32[0]|0 } return g'); +var i32_1 = new Int32Array(BUF_MIN/4); +i32_1[0] = 42; +var i32_2 = new Int32Array(BUF_MIN/4); +i32_2[0] = 13; +assertEq(asmLink(code, this, null, i32_1.buffer)(), 42); +assertEq(asmLink(code, this, null, i32_2.buffer)(), 13); +var i32_3 = new Int32Array(4097); +assertAsmLinkFail(code, this, null, i32_3.buffer); + +var code = asmCompile('glob', 'ffis', USE_ASM + 'var ffi=ffis.ffi; function g(n) { n=n|0; var i=0; for(; (i|0)<(n|0); i=(i+1)|0) ffi() } return g'); +var calls1 = 0, calls2 = 0; +function ffi1() { calls1++ } +function ffi2() { calls2++ } +asmLink(code, null, {ffi:ffi1})(100000); +assertEq(calls1, 100000); +assertEq(calls2, 0); +calls1 = 0; +asmLink(code, null, {ffi:ffi2})(50000); +assertEq(calls1, 0); +assertEq(calls2, 50000); + +var code = asmCompile(USE_ASM + 'var g = 0; function h() { g=(g+1)|0; return g|0 } return h'); +var h1 = code(); +assertEq(h1(), 1); +assertEq(h1(), 2); +var h2 = code(); +assertEq(h2(), 1); +assertEq(h1(), 3); +assertEq(h2(), 2); +assertEq(h1(), 4); + +var code = asmCompile(USE_ASM + "return {}"); +var h1 = code(); +var h2 = code(); +assertEq(h1 === h2, false); +assertEq(Object.keys(h1).length, 0); +assertEq(Object.keys(h2).length, 0); diff --git a/js/src/jit-test/tests/asm.js/testCompoundPlusMinus.js b/js/src/jit-test/tests/asm.js/testCompoundPlusMinus.js new file mode 100644 index 0000000000..9b070541e3 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testCompoundPlusMinus.js @@ -0,0 +1,14 @@ +load(libdir + "asm.js"); + +assertAsmTypeFail(USE_ASM + "function f(i,j,k) { i=i|0;j=+j;k=+k; return (i+(j+k))|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f(i,j,k) { i=i|0;j=j|0;k=+k; return +((i+j)+k) } return f"); +assertAsmTypeFail('imp', USE_ASM + "var ffi=imp.ffi; function f(i) { i=i|0; return (i+ffi())|0 } return f"); + +assertEq(asmLink(asmCompile(USE_ASM + "function f(i,j,k) { i=i|0;j=j|0;k=k|0; return (i+j+k)|0 } return f"))(1,2,3), 6); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i,j,k) { i=i|0;j=j|0;k=k|0; return (i+j-k)|0 } return f"))(1,2,3), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i,j,k) { i=i|0;j=j|0;k=k|0; return (i-j+k)|0 } return f"))(1,2,3), 2); + +const INT32_MAX = Math.pow(2,31)-1; +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return (i+i+i+i+i+i+i+i+i+i)|0 } return f"))(INT32_MAX), (10*INT32_MAX)|0); +const INT32_MIN = -Math.pow(2,31); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return (i+i+i+i+i+i+i+i+i+i)|0 } return f"))(INT32_MIN), (10*INT32_MIN)|0); diff --git a/js/src/jit-test/tests/asm.js/testControlFlow.js b/js/src/jit-test/tests/asm.js/testControlFlow.js new file mode 100644 index 0000000000..40711cd6ce --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testControlFlow.js @@ -0,0 +1,374 @@ +load(libdir + "asm.js"); + +assertEq(asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=+j; if (i) return j; return j+1.0 } return f"))(0, 1.2), 1.2+1.0); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=+j; if (i) return j; return +~~i } return f"))(1,1.4), 1.4); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; if (i) return j^0; return i^1 } return f"))(1, 1), 1); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; if (i) return j^0; return i|0 } return f"))(1,8), 8); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; if ((i|0) == 0) return 10; else if ((i|0) == 1) return 12; else if ((i|0) == 2) return 14; return 0} return f"))(2), 14); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; if ((i|0) == 0) return 10; else if ((i|0) == 1) return 12; else if ((i|0) == 2) return 14; else return 16; return 0} return f"))(3), 16); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; if ((i|0) == 0) i = 10; else if ((i|0) == 1) return 12; return (i|0) } return f"))(0), 10); + +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; if (i) return 0; } return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; if (i) return 0; else return 1 } return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; if (i) return 0; return 1.0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { if (0) return 0; 1 } return f"); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { while (0) {} return 0} return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { for (;0;) {} return 0} return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { do {} while(0); return 0} return f"))(), 0); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { while (0) ; return 0} return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { for (;0;) ; return 0} return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { do ; while(0); return 0} return f"))(), 0); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { do {} while (0); while (0); return 0} return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i = 0; do {} while (0); return i|0} return f"))(), 0); + +assertAsmTypeFail(USE_ASM + "function f(d) {d=+d; while (d) {}; return 0} return f"); +assertAsmTypeFail(USE_ASM + "function f(d) {d=+d; for (;d;) {}; return 0} return f"); +assertAsmTypeFail(USE_ASM + "function f(d) {d=+d; do {} while (d); return 0} return f"); + +assertEq(asmLink(asmCompile(USE_ASM + "function f(j) {j=j|0; var i=0; while ((i|0) < (j|0)) i=(i+4)|0; return i|0} return f"))(6), 8); +assertEq(asmLink(asmCompile(USE_ASM + "function f(j) {j=j|0; var i=0; for (;(i|0) < (j|0);) i=(i+4)|0; return i|0} return f"))(6), 8); +assertEq(asmLink(asmCompile(USE_ASM + "function f(j) {j=j|0; var i=0; do { i=(i+4)|0; } while ((i|0) < (j|0)); return i|0} return f"))(6), 8); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { while(1) return 42; return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { for(;1;) return 42; return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { do return 42; while(1); return 0 } return f"))(), 42); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; while(1) { if (i) return 13; return 42 } return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; for(;1;) { if (i) return 13; return 42 } return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; do { if (i) return 13; return 42 } while(1); return 0 } return f"))(), 42); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; while(1) { break; while(1) {} } return 42 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; for(;;) { break; for(;;) {} } return 42 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; do { break; do {} while(1) {} } while(1); return 42 } return f"))(), 42); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=1; while(1) { if (i) return 42; return 13 } return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=1; for(;1;) { if (i) return 42; return 13 } return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=1; do { if (i) return 42; return 13 } while(1); return 0 } return f"))(), 42); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; while(1) { if (i) return 13; else return 42; return 13 } return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; for(;;) { if (i) return 13; else return 42; return 13 } return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; do { if (i) return 13; else return 42; return 13 } while(1); return 0 } return f"))(), 42); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; while((i|0) < 3) { if (i) return 42; i=(i+1)|0 } return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; for(;(i|0) < 3;) { if (i) return 42; i=(i+1)|0 } return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; do { if (i) return 42; i=(i+1)|0 } while((i|0) < 3); return 0 } return f"))(), 42); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; while((i|0) < 3) { if (!i) i=(i+1)|0; return 42 } return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; for(;(i|0) < 3;) { if (!i) i=(i+1)|0; return 42 } return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; do { if (!i) i=(i+1)|0; return 42 } while((i|0) < 3); return 0 } return f"))(), 42); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=42; return i|0; while(1) {} return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=42; return i|0; for(;1;) {} return 0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=42; return i|0; do {} while(1); return 0 } return f"))(), 42); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; while((i|0) < 10) if ((i|0) == 4) break; else i=(i+1)|0; return i|0 } return f"))(), 4); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; for(; (i|0) < 10;) if ((i|0) == 4) break; else i=(i+1)|0; return i|0 } return f"))(), 4); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; do if ((i|0) == 4) break; else i=(i+1)|0; while((i|0) < 10); return i|0 } return f"))(), 4); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0,sum=0; while ((i=(i+1)|0)<2) { sum=(sum+1)|0; if ((i&1)==0) continue; sum=(sum+100)|0 } return sum|0 } return f"))(), 101); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0,sum=0; for (;(i=(i+1)|0)<2;) { sum=(sum+1)|0; if ((i&1)==0) continue; sum=(sum+100)|0 } return sum|0 } return f"))(), 101); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0,sum=0; do { sum=(sum+1)|0; if ((i&1)==0) continue; sum=(sum+100)|0 } while((i=(i+1)|0)<2); return sum|0 } return f"))(), 102); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; x:a:y:while(1) { i=1; while(1) { i=2; break a; } i=3; } return i|0 } return f"))(), 2); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; x:a:y:for(;;) { i=1; while(1) { i=2; break a; } i=3; } return i|0 } return f"))(), 2); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; x:a:y:do { i=1; while(1) { i=2; break a; } i=3; } while(1); return i|0 } return f"))(), 2); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; a:b:while((i|0) < 5) { i=(i+1)|0; while(1) continue b; } return i|0 } return f"))(), 5); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; a:b:for(;(i|0) < 5;) { i=(i+1)|0; while(1) continue b; } return i|0 } return f"))(), 5); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; a:b:do { i=(i+1)|0; while(1) continue b; } while((i|0) < 5); return i|0 } return f"))(), 5); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; return 0; a:b:while((i|0) < 5) { i=(i+1)|0; while(1) continue b; } return i|0 } return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; return 0; a:b:for(;(i|0) < 5;) { i=(i+1)|0; while(1) continue b; } return i|0 } return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; return 0; a:b:do { i=(i+1)|0; while(1) continue b; } while((i|0) < 5); return i|0 } return f"))(), 0); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=42; a:{ break a; i=2; } b:{ c:{ break b; i=3 } i=4 } return i|0 } return f"))(), 42); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; a:b:for(;(i|0) < 5;i=(i+1)|0) { while(1) continue b; } return i|0 } return f"))(), 5); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=42,sum=0; for(i=1;(i|0)<4;i=(i+1)|0) sum=(sum+i)|0; return sum|0 } return f"))(), 6); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=42,sum=0; for(i=1;(i|0)<8;i=(i+1)|0) { if ((i&1) == 0) continue; sum=(sum+i)|0; } return sum|0 } return f"))(), 16); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; while(1) { i=(i+1)|0; if ((i|0) > 10) break; } return i|0 } return f"))(), 11); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; for(;1;i=(i+1)|0) { if ((i|0) > 10) break; } return i|0 } return f"))(), 11); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; do { if ((i|0) > 10) break; i=(i+1)|0 } while(1); return i|0 } return f"))(), 11); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; while(1){ if ((i|0)>0) break; while (1) { i=i+1|0; if ((i|0)==1) break; } } return i|0; } return f"))(), 1); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; for(;;){ if ((i|0)>0) break; while (1) { i=i+1|0; if ((i|0)==1) break; } } return i|0; } return f"))(), 1); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; do{ if ((i|0)>0) break; while (1) { i=i+1|0; if ((i|0)==1) break; } }while(1); return i|0; } return f"))(), 1); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0,sum=0; while(1){ if ((i|0)>5) break; while (1) { i=i+1|0; sum=(sum+i)|0; if ((i|0)>3) break; } } return sum|0; } return f"))(), 21); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0,sum=0; for(;;){ if ((i|0)>5) break; while (1) { i=i+1|0; sum=(sum+i)|0; if ((i|0)>3) break; } } return sum|0; } return f"))(), 21); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0,sum=0; do{ if ((i|0)>5) break; while (1) { i=i+1|0; sum=(sum+i)|0; if ((i|0)>3) break; } }while(1); return sum|0; } return f"))(), 21); + +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; while(1) { if (i) { break; } else { return i|0 } i = 1 } return i|0 } return f"))(3), 3); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; for(;1;) { if (i) { break; } else { return i|0 } i = 1 } return i|0 } return f"))(3), 3); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; do { if (i) { break; } else { return i|0 } i = 1 } while (0); return i|0 } return f"))(3), 3); + +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; while(1) { if (i) { return i|0 } else { return i|0 } i = 1 } return i|0 } return f"))(3), 3); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; for(;;) { if (i) { return i|0 } else { return i|0 } i = 1 } return i|0 } return f"))(3), 3); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; do { if (i) { return i|0 } else { return i|0 } i = 1 } while (0); return i|0 } return f"))(3), 3); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() {var j=1,i=0; while(j){ if(0) continue; j=i } return j|0 } return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {var j=1,i=0; for(;j;){ if(0) continue; j=i } return j|0 } return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {var j=1,i=0; do{ if(0) continue; j=i } while(j) return j|0 } return f"))(), 0); + +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; for(;;) { return i|0 } return 0 } return f"))(42), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f(n) { n=n|0; var i=0,s=0; for(;;i=(i+1)|0) { if (~~i==~~n) return s|0; s=(s+i)|0 } return 0 } return f"))(8), 28); + +var f = asmLink(asmCompile(USE_ASM + "function f(n,m) { n=n|0;m=m|0; var i=0,sum=0; while((n|0)>(m|0) ? ((i|0)<(n|0))|0 : ((i|0)<(m|0))|0) { sum = (sum+i)|0; i=(i+1)|0 } return sum|0 } return f")); +assertEq(f(1,5), 10); +assertEq(f(6,5), 15); + +var f = asmLink(asmCompile(USE_ASM + "function f(n,m) { n=n|0;m=m|0; var i=0,sum=0; for(; (n|0)>(m|0) ? ((i|0)<(n|0))|0 : ((i|0)<(m|0))|0; i=(i+1)|0) { sum = (sum+i)|0 } return sum|0 } return f")); +assertEq(f(1,5), 10); +assertEq(f(6,5), 15); + +var f = asmLink(asmCompile(USE_ASM + "function f(n,m) { n=n|0;m=m|0; var i=0,sum=0; do { sum = (sum+i)|0; i=(i+1)|0 } while((n|0)>(m|0) ? ((i|0)<(n|0))|0 : ((i|0)<(m|0))|0); return sum|0 } return f")); +assertEq(f(1,5), 10); +assertEq(f(6,5), 15); + +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; switch(i|0) { case 1: return 0; case 1: return 0 } return 0} return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; switch(i|0) { case 1: return 0; case 2: return 0; case 1: return 0 } return 0} return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; switch(1) { case 1: return 0; case 1: return 0 } return 0} return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0; switch(i) {}; return i|0 } return f"); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; switch(i|0) {}; return i|0 } return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; switch(i|0) { default: i=42 } return i|0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; switch(i|0) { default: i=42; break } return i|0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; switch(i|0) { case 0: i=42 } return i|0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; switch(i|0) { case 0: i=42; break } return i|0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; switch(i|0) { case 0: default: i=42 } return i|0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=0; switch(i|0) { case 0: default: i=42; break } return i|0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=1; switch(i|0) { case 0: case 2: break; default: i=42 } return i|0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=1; switch(i|0) { case 0: case 2: break; default: i=42; break } return i|0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { return 42; switch(1) { case 1: return 13 } return 14 } return f"))(), 42); + +var exp = asmLink(asmCompile(USE_ASM + "var x=0; function a() { return x|0 } function b(i) { i=i|0; x=i } function c(i) { i=i|0; if (i) b(i); } return {a:a,b:b,c:c}")); +assertEq(exp.c(10), undefined); +assertEq(exp.a(), 10); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; switch(i|0) { case 1: i=-1; break; case 133742: i=2; break; default: i=42; break } return i|0 } return f")); +assertEq(f(1), -1); +assertEq(f(2), 42); +assertEq(f(133742), 2); +assertEq(f(133743), 42); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; switch(i|0) { case 1: i=42; break; default: i=13 } return i|0 } return f")); +assertEq(f(-1), 13); +assertEq(f(0), 13); +assertEq(f(1), 42); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; switch(i|0) { case -1: i=42; break; default: i=13 } return i|0 } return f")); +assertEq(f(-1), 42); +assertEq(f(0), 13); +assertEq(f(1), 13); +assertEq(f(0xffffffff), 42); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; var sum=0; switch(i|0) { case -1: sum=(sum+1)|0; case 1: sum=(sum+1)|0; case 3: sum=(sum+1)|0; default: sum=(sum+100)|0; } return sum|0 } return f")); +assertEq(f(-1), 103); +assertEq(f(0), 100); +assertEq(f(1), 102); +assertEq(f(2), 100); +assertEq(f(3), 101); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; var sum=0; switch(i|0) { case -1: sum=10; break; case 1: sum=11; break; case 3: sum=12; break; default: sum=13; } return sum|0 } return f")); +assertEq(f(-1), 10); +assertEq(f(0), 13); +assertEq(f(1), 11); +assertEq(f(2), 13); +assertEq(f(3), 12); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=8,sum=0; a:for(; (i|0)<20; i=(i+1)|0) { switch(i&3) { case 0:case 1:sum=(sum+i)|0;break;case 2:sum=(sum+100)|0;continue;default:break a} sum=(sum+10)|0; } sum=(sum+1000)|0; return sum|0 } return f"))(), 1137); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { a: do{break a;}while(0); a: do{break a;}while(0); return 42 } return f"))(), 42); +assertEq(asmLink(asmCompile('g', USE_ASM + "function f() { g:{ return 42 } return 13 } return f"), null)(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f(x) {x=x|0;switch (x|0) {case 31:return 13;case 9: {x = 3;if ((x|0) <= 0) {return -1;}}}return 1;} return f"))(31), 13); + +var imp = { ffi:function() { throw "Wrong" } }; +assertEq(asmLink(asmCompile('glob','imp', USE_ASM + "var ffi=imp.ffi; function f() { var i=0; return (i+1)|0; return ffi(i|0)|0 } return f"), null, imp)(), 1); + +assertEq(asmLink(asmCompile(USE_ASM + 'function f() {var k = 1;if (1) {for(k = 1; k|0; k=k-1|0) {}} return 1}; return f'))(), 1); + +// Ternaries conditionals +// +// Basic ternaries +var f = asmLink(asmCompile(USE_ASM + "function f() { return 0; if (1) return -1; return -2} return f")); +assertEq(f(5), 0); + +var f = asmLink(asmCompile(USE_ASM + "function f(x) { x=x|0; var a=2;if(x?1:0)a=1;else a=0; return a|0 } return f")); +assertEq(f(1), 1); +assertEq(f(0), 0); + +var guard = (function() { + var called_ = false; + return { + called: function(){ return called_ }, + call: function(){ called_ = true } + } +})(); + +var f = asmLink(asmCompile('glob', 'ffi', USE_ASM + "var func=ffi.func; function f(x) { x=x|0; var a=2;if(x?1:1)a=1; else {func();a=0}return a|0 } return f"), this, {func: guard.call}); +assertEq(f(1), 1); +assertEq(f(0), 1); +assertEq(guard.called(), false); + +var f = asmLink(asmCompile('glob', 'ffi', USE_ASM + "var func=ffi.func; function f(x) { x=x|0; var a=2;if(x?0:0){a=1; func()}else a=0;return a|0 } return f"), this, {func: guard.call}); +assertEq(f(1), 0); +assertEq(f(0), 0); +assertEq(guard.called(), false); + +var f = asmLink(asmCompile('glob', 'ffi', USE_ASM + "var func=ffi.func; function f(x,y) { x=x|0;y=y|0; var a=2;if(x?func()|0:y)a=1;else a=0; return a|0 } return f"), this, {func: guard.call}); +assertEq(f(0,1), 1); +assertEq(guard.called(), false); + +var f = asmLink(asmCompile('glob', 'ffi', USE_ASM + "var func=ffi.func; function f(x,y) { x=x|0;y=y|0; var a=2;if(x?y:func()|0)a=1;else a=0; return a|0 } return f"), this, {func: guard.call}); +assertEq(f(1,0), 0); +assertEq(guard.called(), false); + +var f = asmLink(asmCompile(USE_ASM + "function f(x,y) { x=x|0;y=y|0; var a=2;if(x?0:y)a=1;else a=0; return a|0 } return f")); +assertEq(f(1,1), 0); +assertEq(f(1,0), 0); +assertEq(f(0,0), 0); +assertEq(f(0,1), 1); + +var f = asmLink(asmCompile(USE_ASM + "function f(x,y) { x=x|0;y=y|0; var a=2;if(x?y:1)a=1;else a=0; return a|0 } return f")); +assertEq(f(1,1), 1); +assertEq(f(1,0), 0); +assertEq(f(0,0), 1); +assertEq(f(0,1), 1); + +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=2;if(x?y:z)a=1;else a=0; return a|0 } return f")); +for (var i = 0; i < 2; ++i) + for (var j = 0; j < 2; ++j) + for (var k = 0; k < 2; ++k) + assertEq(f(i,j,k), ((i && j) || (!i && k))|0); + +// Complex ternaries +function CheckTwoArgsTwoOptions(f) { + function check(x,y) { + return (x > 2 && y < 5) | 0; + } + for (var a = -10; a < 10; a++) + for (var b = -10; b < 10; b++) + assertEq(f(a,b), check(a,b)); +} + +function CheckThreeArgsTwoOptions(f) { + function check(x,y,z) { + return (x > 2 && y < 5 && z > -1) | 0; + } + for (var a = -10; a < 10; a++) + for (var b = -10; b < 10; b++) + for (var c = -10; c < 10; c++) + assertEq(f(a,b,c), check(a,b,c)); +} + +// Ternaries with && semantics +var f = asmLink(asmCompile(USE_ASM + "function f(x,y) { x=x|0;y=y|0; var z=0; if((x|0) > 2 ? (y|0) < 5 : 0) z=1; return z|0;} return f")); +CheckTwoArgsTwoOptions(f); +var f = asmLink(asmCompile(USE_ASM + "function f(x,y) { x=x|0;y=y|0; var z=2; if((x|0) > 2 ? (y|0) < 5 : 0) z=1; else z=0; return z|0;} return f")); +CheckTwoArgsTwoOptions(f); + +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=0; if((x|0) > 2 ? ((y|0) < 5 ? (z|0) > -1 : 0) : 0) a=1; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=2; if((x|0) > 2 ? ((y|0) < 5 ? (z|0) > -1 : 0) : 0) a=1; else a=0; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); + +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=0; if((x|0) > 2 ? (y|0) < 5 : 0) {if ((z|0) > -1) a=1}; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=2; if((x|0) > 2 ? (y|0) < 5 : 0) {if ((z|0) > -1) a=1; else a=0;} else a=0; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); + +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=0; if(((x|0) == 3 ? 1 : ((x|0) > 3)) ? ((y|0) < 5 ? (z|0) > -1 : 0) : 0) a=1; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=2; if(((x|0) == 3 ? 1 : ((x|0) > 3)) ? ((y|0) < 5 ? (z|0) > -1 : 0) : 0) a=1; else a=0; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); + +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=0; if((x|0) == 3 ? 1 : (x|0) > 3) {if ((y|0) < 5 ? (z|0) > -1 : 0) a=1;} return a|0;} return f")); +CheckThreeArgsTwoOptions(f); +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=2; if((x|0) == 3 ? 1 : (x|0) > 3) {if ((y|0) < 5 ? (z|0) > -1 : 0) a=1; else a=0;} else a=0; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); + +// Ternaries with || semantics +var f = asmLink(asmCompile(USE_ASM + "function f(x,y) { x=x|0;y=y|0; var z=1; if((x|0) <= 2 ? 1 : (y|0) >= 5) z=0; return z|0;} return f")); +CheckTwoArgsTwoOptions(f); +var f = asmLink(asmCompile(USE_ASM + "function f(x,y) { x=x|0;y=y|0; var z=2; if((x|0) <= 2 ? 1 : (y|0) >= 5) z=0; else z=1; return z|0;} return f")); +CheckTwoArgsTwoOptions(f); + +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=1; if((x|0) <= 2 ? 1 : ((y|0) >= 5 ? 1 : (z|0) <= -1)) a=0; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=2; if((x|0) <= 2 ? 1 : ((y|0) >= 5 ? 1 : (z|0) <= -1)) a=0; else a=1; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); + +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=1; if((x|0) <= 2 ? 1 : (y|0) >= 5) a=0; else if ((z|0) <= -1) a=0; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=2; if((x|0) <= 2 ? 1 : (y|0) >= 5) a=0; else if ((z|0) <= -1) a=0; else a=1; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); + +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=1; if(((x|0) != 3 ? ((x|0) <= 3) : 0) ? 1 : ((y|0) >= 5 ? 1 : (z|0) <= -1)) a=0; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); +var f = asmLink(asmCompile(USE_ASM + "function f(x,y,z) { x=x|0;y=y|0;z=z|0; var a=2; if(((x|0) != 3 ? ((x|0) <= 3) : 0) ? 1 : ((y|0) >= 5 ? 1 : (z|0) <= -1)) a=0; else a=1; return a|0;} return f")); +CheckThreeArgsTwoOptions(f); + +// Massive test +var code = '"use asm";\ + function g(x,y) {\ + x=x|0;\ + y=y|0;\ + var z = 0;\ + if ((y|0) == 1337) {\ + z = 1;\ + } else if ((x|0) == 1 ? 1 : ((x|0) < 0 ? (y|0) == 1 : 0)) {\ + z = 2;\ + } else if ((x|0) == 2) {\ + z = 3;\ + } else if ((x|0) == 3 ? 1 : (x|0) == 4) {\ + z = 4;\ + } else if ((x|0) == 5 ? (y|0) > 5 : 0) {\ + z = 5;\ + } else {\ + z = 6;\ + }\ + return z|0;\ + }\ + return g;'; + +var m = asmLink(asmCompile(code)); + +assertEq(m(0, 1337), 1); +assertEq(m(0, 1338), 6); +assertEq(m(0, 0), 6); +assertEq(m(0, 1), 6); +assertEq(m(0, 1336), 6); +assertEq(m(1, 1337), 1); +assertEq(m(2, 1337), 1); +assertEq(m(3, 1337), 1); +assertEq(m(4, 1337), 1); +assertEq(m(5, 1337), 1); + +assertEq(m(1, 10), 2); +assertEq(m(1, 1336), 2); +assertEq(m(-1, 10), 6); +assertEq(m(-1, 2), 6); +assertEq(m(-1, -1), 6); +assertEq(m(-1, 1), 2); +assertEq(m(-9, 1), 2); + +assertEq(m(2, 1), 3); +assertEq(m(2, 0), 3); +assertEq(m(2, 6), 3); + +assertEq(m(3, 1), 4); +assertEq(m(3, 0), 4); +assertEq(m(3, 6), 4); +assertEq(m(3, 3), 4); +assertEq(m(4, 1), 4); +assertEq(m(4, 0), 4); +assertEq(m(4, 6), 4); +assertEq(m(4, 3), 4); + +assertEq(m(5, -1), 6); +assertEq(m(5, 4), 6); +assertEq(m(5, 5), 6); +assertEq(m(5, 6), 5); +assertEq(m(5, 10), 5); diff --git a/js/src/jit-test/tests/asm.js/testDebugModeDisables.js b/js/src/jit-test/tests/asm.js/testDebugModeDisables.js new file mode 100644 index 0000000000..9c04cbf264 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testDebugModeDisables.js @@ -0,0 +1,9 @@ +// |jit-test| + +load(libdir + "asm.js"); + +// Turn on debugging for the current global. +var g = newGlobal({newCompartment: true}); +var dbg = new g.Debugger(this); + +assertAsmTypeFail("'use asm'; function f() {} return f"); diff --git a/js/src/jit-test/tests/asm.js/testExpressions.js b/js/src/jit-test/tests/asm.js/testExpressions.js new file mode 100644 index 0000000000..0e04ac0db2 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testExpressions.js @@ -0,0 +1,403 @@ +load(libdir + "asm.js"); + +assertAsmTypeFail(USE_ASM + "function f() { var i=0,j=0.0; return (i+j)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0.0,j=0; return (i+j)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0,j=0.0; return (i-j)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0.0,j=0; return (i-j)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0,j=0.0; return (i*j)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0.0,j=0; return (i*j)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0,j=0; return (i*j)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0; return (i*1048576)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0; return (i*-1048576)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0,j=0; return (i + (j*4))|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var two30 = 1073741824; return (((two30 * 524288 * 16) + 1) & 1)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0,j=0.0; return (i/j)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0.0,j=0; return (i/j)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=1,j=1; return (i/j)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0,j=0.0; return (i%j)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0.0,j=0; return (i%j)|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0.0,j=0; return (i>>0)/(k>>>0) } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0,j=0,k=0; k = (i|0)%(k|0) } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var i=0,j=0,k=0; k = (i>>>0)%(k>>>0) } return f"); + +const UINT32_MAX = Math.pow(2,32)-1; +const INT32_MIN = -Math.pow(2,31); +const INT32_MAX = Math.pow(2,31)-1; + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return (i*2)|0 } return f")); +assertEq(f(0), 0); +assertEq(f(INT32_MIN), (2*INT32_MIN)|0); +assertEq(f(INT32_MAX), (2*INT32_MAX)|0); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return (2*i)|0 } return f")); +assertEq(f(0), 0); +assertEq(f(INT32_MIN), (2*INT32_MIN)|0); +assertEq(f(INT32_MAX), (2*INT32_MAX)|0); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return (i*1048575)|0 } return f")); +assertEq(f(0), 0); +assertEq(f(2), (1048575*2)|0); +assertEq(f(-1), (1048575*-1)|0); +assertEq(f(INT32_MIN), (1048575*INT32_MIN)|0); +assertEq(f(INT32_MAX), (1048575*INT32_MAX)|0); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return (1048575*i)|0 } return f")); +assertEq(f(0), 0); +assertEq(f(2), (1048575*2)|0); +assertEq(f(-1), (1048575*-1)|0); +assertEq(f(INT32_MIN), (1048575*INT32_MIN)|0); +assertEq(f(INT32_MAX), (1048575*INT32_MAX)|0); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; var j=0; j=~i; return j|0 } return f")); +assertEq(f(0), ~0); +assertEq(f(3), ~3); +assertEq(f(-3), ~-3); +assertEq(f(INT32_MAX), ~INT32_MAX); +assertEq(f(INT32_MIN), ~INT32_MIN); +assertEq(f(UINT32_MAX), ~UINT32_MAX); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=+i; var j=0; j=~~i; return j|0 } return f")); +assertEq(f(0), 0); +assertEq(f(3.5), 3); +assertEq(f(-3.5), -3); +assertEq(f(INT32_MAX), INT32_MAX); +assertEq(f(INT32_MIN), INT32_MIN); +assertEq(f(UINT32_MAX), -1); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; var j=0.0; j=+~~i; return +j } return f")); +assertEq(f(0), 0); +assertEq(f(INT32_MAX), INT32_MAX); +assertEq(f(INT32_MIN), INT32_MIN); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; var j=0.1; j=+(i>>>0); return +j } return f")); +assertEq(f(0), 0); +assertEq(f(INT32_MAX), INT32_MAX); +assertEq(f(UINT32_MAX), UINT32_MAX); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return (-i)|0 } return f")); +assertEq(f(0), 0); +assertEq(f(-0), 0); +assertEq(f(1), -1); +assertEq(f(INT32_MAX), INT32_MIN+1); +assertEq(f(INT32_MIN), INT32_MIN); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=+i; return +(-i) } return f")); +assertEq(f(0), -0); +assertEq(f(-0), 0); +assertEq(f(-1), 1); +assertEq(f(1), -1); +assertEq(f(Math.pow(2,50)), -Math.pow(2,50)); +assertEq(f(1.54e20), -1.54e20); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; return ((i|0) < (j|0))|0 } return f")); +assertEq(f(0, 1), 1); +assertEq(f(1, 0), 0); +assertEq(f(1, 1), 0); +assertEq(f(INT32_MIN, INT32_MAX), 1); +assertEq(f(INT32_MAX, INT32_MIN), 0); +assertEq(f(0, INT32_MAX), 1); +assertEq(f(INT32_MAX, 0), 0); +assertEq(f(INT32_MIN, 0), 1); +assertEq(f(0, INT32_MIN), 0); +assertEq(f(UINT32_MAX, 0), 1); +assertEq(f(0, UINT32_MAX), 0); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; return ((i>>>0) < (j>>>0))|0 } return f")); +assertEq(f(0, 1), 1); +assertEq(f(1, 0), 0); +assertEq(f(1, 1), 0); +assertEq(f(INT32_MIN, INT32_MAX), 0); +assertEq(f(INT32_MAX, INT32_MIN), 1); +assertEq(f(0, INT32_MAX), 1); +assertEq(f(INT32_MAX, 0), 0); +assertEq(f(INT32_MIN, 0), 0); +assertEq(f(0, INT32_MIN), 1); +assertEq(f(UINT32_MAX, 0), 0); +assertEq(f(0, UINT32_MAX), 1); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; var k=0; k=(i|0)==(j|0); return k|0 } return f")); +assertEq(f(1,2), 0); +assertEq(f(1,1), 1); +assertEq(f(2,1), 0); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; var k=0; k=(i|0)!=(j|0); return k|0 } return f")); +assertEq(f(1,2), 1); +assertEq(f(1,1), 0); +assertEq(f(2,1), 1); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; var k=0; k=(i|0)<(j|0); return k|0 } return f")); +assertEq(f(1,2), 1); +assertEq(f(1,1), 0); +assertEq(f(1,0), 0); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; var k=0; k=(i|0)>(j|0); return k|0 } return f")); +assertEq(f(1,2), 0); +assertEq(f(1,1), 0); +assertEq(f(1,0), 1); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; var k=0; k=(i|0)<=(j|0); return k|0 } return f")); +assertEq(f(1,2), 1); +assertEq(f(1,1), 1); +assertEq(f(1,0), 0); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; var k=0; k=(i|0)>=(j|0); return k|0 } return f")); +assertEq(f(1,2), 0); +assertEq(f(1,1), 1); +assertEq(f(1,0), 1); + +assertEq(asmLink(asmCompile(USE_ASM + "const I=2; function f(i) { i=i|0; var k=0; k=(i|0)>>0)>>0)>>0)/(j>>>0))|0 } return f")); +assertEq(f(4,2), 2); +assertEq(f(3,2), 1); +assertEq(f(3,-2), 0); +assertEq(f(-3,-2), 0); +assertEq(f(0, -1), 0); +assertEq(f(0, INT32_MAX), 0); +assertEq(f(0, INT32_MIN), 0); +assertEq(f(0, UINT32_MAX), 0); +assertEq(f(INT32_MAX, 0), 0); +assertEq(f(INT32_MIN, 0), 0); +assertEq(f(UINT32_MAX, 0), 0); +assertEq(f(-1, INT32_MAX), 2); +assertEq(f(-1, INT32_MIN), 1); +assertEq(f(-1, UINT32_MAX), 1); +assertEq(f(INT32_MAX, -1), 0); +assertEq(f(INT32_MIN, -1), 0); +assertEq(f(UINT32_MAX, -1), 1); +assertEq(f(INT32_MAX, INT32_MAX), 1); +assertEq(f(INT32_MAX, INT32_MIN), 0); +assertEq(f(UINT32_MAX, INT32_MAX), 2); +assertEq(f(INT32_MAX, UINT32_MAX), 0); +assertEq(f(UINT32_MAX, UINT32_MAX), 1); +assertEq(f(INT32_MIN, INT32_MAX), 1); +assertEq(f(INT32_MIN, UINT32_MAX), 0); +assertEq(f(INT32_MIN, INT32_MIN), 1); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; var k = 0; k = (i|0)%(j|0)|0; return k|0 } return f")); +assertEq(f(4,2), 0); +assertEq(f(3,2), 1); +assertEq(f(3,-2), 1); +assertEq(f(-3,-2), -1); +assertEq(f(0, -1), 0); +assertEq(f(0, INT32_MAX), 0); +assertEq(f(0, INT32_MIN), 0); +assertEq(f(INT32_MAX, 0), 0); +assertEq(f(INT32_MIN, 0), 0); +assertEq(f(-1, INT32_MAX), -1); +assertEq(f(-1, INT32_MIN), -1); +assertEq(f(INT32_MAX, -1), 0); +assertEq(f(INT32_MIN, -1), 0); // !! +assertEq(f(INT32_MAX, INT32_MAX), 0); +assertEq(f(INT32_MAX, INT32_MIN), INT32_MAX); +assertEq(f(INT32_MIN, INT32_MAX), -1); +assertEq(f(INT32_MIN, INT32_MIN), 0); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; var k = 0; k = (i|0)%4|0; return k|0 } return f")); +assertEq(f(0), 0); +assertEq(f(-1), -1); +assertEq(f(-3), -3); +assertEq(f(-4), 0); +assertEq(f(INT32_MIN), 0); +assertEq(f(3), 3); +assertEq(f(4), 0); +assertEq(f(INT32_MAX), 3); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; var k = 0; k = (i>>>0)%(j>>>0)|0; return k|0 } return f")); +assertEq(f(4,2), 0); +assertEq(f(3,2), 1); +assertEq(f(3,-2), 3); +assertEq(f(-3,-2), -3); +assertEq(f(0, -1), 0); +assertEq(f(0, INT32_MAX), 0); +assertEq(f(0, INT32_MIN), 0); +assertEq(f(0, UINT32_MAX), 0); +assertEq(f(INT32_MAX, 0), 0); +assertEq(f(INT32_MIN, 0), 0); +assertEq(f(UINT32_MAX, 0), 0); +assertEq(f(-1, INT32_MAX), 1); +assertEq(f(-1, INT32_MIN), INT32_MAX); +assertEq(f(-1, UINT32_MAX), 0); +assertEq(f(INT32_MAX, -1), INT32_MAX); +assertEq(f(INT32_MIN, -1), INT32_MIN); +assertEq(f(UINT32_MAX, -1), 0); +assertEq(f(INT32_MAX, INT32_MAX), 0); +assertEq(f(INT32_MAX, INT32_MIN), INT32_MAX); +assertEq(f(UINT32_MAX, INT32_MAX), 1); +assertEq(f(INT32_MAX, UINT32_MAX), INT32_MAX); +assertEq(f(UINT32_MAX, UINT32_MAX), 0); +assertEq(f(INT32_MIN, INT32_MAX), 1); +assertEq(f(INT32_MIN, UINT32_MAX), INT32_MIN); +assertEq(f(INT32_MIN, INT32_MIN), 0); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { return (4 / 2)|0 } return f"))(), 2); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { return (3 / 2)|0 } return f"))(), 1); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { return (4 % 2)|0 } return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { return (3 % 2)|0 } return f"))(), 1); + +assertAsmTypeFail(USE_ASM + "function f() { var i=42,j=1.1; return +(i?i:j) } return f"); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { return 0; 1 ? 1 : 1; return 0; } return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=42,j=1.1; return +(i?+(i|0):j) } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=42,j=1; return (i?i:j)|0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var i=42,j=1; return 13; return (i?i:j)|0 } return f"))(), 13); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { return (0 > (-(~~1) >>> 0)) | 0; } return f"))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { return 0 < 4294967294 | 0; } return f"))(), 1); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; return ((i|0)>(j|0)?(i+10)|0:(j+100)|0)|0 } return f")); +assertEq(f(2, 4), 104); +assertEq(f(-2, -4), 8); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j,k) { i=i|0;j=j|0;k=k|0; return ((i|0)>(j|0) ? (i|0)>(k|0) ? i : k : (j|0)>(k|0) ? j : k)|0 } return f")); +assertEq(f(1,2,3), 3); +assertEq(f(1,3,2), 3); +assertEq(f(2,1,3), 3); +assertEq(f(2,3,1), 3); +assertEq(f(3,1,2), 3); +assertEq(f(3,2,1), 3); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; var a=0,b=0; a=i>>>0 < 4294967292; b=(i|0) < -4; return (j ? a : b)|0 } return f")); +assertEq(f(1,true), 1); +assertEq(f(-1,true), 0); +assertEq(f(-5,true), 1); +assertEq(f(1,false), 0); +assertEq(f(-1,false), 0); +assertEq(f(-5,false), 1); + +assertAsmTypeFail('glob','imp','b', USE_ASM + HEAP_IMPORTS + "function f() { return (i32[0]+1)|0 } return f"); +new Float64Array(BUF_64KB)[0] = 2.3; +assertEq(asmLink(asmCompile('glob','imp','b', USE_ASM + HEAP_IMPORTS + "function f() { return +(f64[0] + 2.0) } return f"), this, null, BUF_64KB)(), 2.3+2); +assertEq(asmLink(asmCompile('glob','imp','b', USE_ASM + HEAP_IMPORTS + "function f() { return +(f64[0] - 2.0) } return f"), this, null, BUF_64KB)(), 2.3-2); +assertEq(asmLink(asmCompile('glob','imp','b', USE_ASM + HEAP_IMPORTS + "function f() { return +(f64[0] * 2.0) } return f"), this, null, BUF_64KB)(), 2.3*2); +assertEq(asmLink(asmCompile('glob','imp','b', USE_ASM + HEAP_IMPORTS + "function f() { return +(f64[0] / 2.0) } return f"), this, null, BUF_64KB)(), 2.3/2); +assertEq(asmLink(asmCompile('glob','imp','b', USE_ASM + HEAP_IMPORTS + "function f() { return +(f64[0] % 2.0) } return f"), this, null, BUF_64KB)(), 2.3%2); +assertEq(asmLink(asmCompile('glob','imp','b', USE_ASM + HEAP_IMPORTS + "function f() { return +-f64[0] } return f"), this, null, BUF_64KB)(), -2.3); +assertEq(asmLink(asmCompile('glob','imp','b', USE_ASM + HEAP_IMPORTS + "var sqrt=glob.Math.sqrt; function f() { return +sqrt(f64[0]) } return f"), this, null, BUF_64KB)(), Math.sqrt(2.3)); +new Int32Array(BUF_64KB)[0] = 42; +assertEq(asmLink(asmCompile('glob','imp','b', USE_ASM + HEAP_IMPORTS + "var imul=glob.Math.imul; function f() { return imul(i32[0], 2)|0 } return f"), this, null, BUF_64KB)(), 84); + +// beware ye phis of comparisons and integers +var f = asmLink(asmCompile(USE_ASM + "function g(i) { i=i|0; if (i) { i = ((i|0) == 2); } else { i=(i-1)|0 } return i|0; } return g ")); +assertEq(f(0), -1); +assertEq(f(1), 0); +assertEq(f(2), 1); +var f = asmLink(asmCompile(USE_ASM + "function g(i) { i=i|0; if (i) { i = !i } else { i=(i-1)|0 } return i|0; } return g ")); +assertEq(f(0), -1); +assertEq(f(1), 0); +assertEq(f(2), 0); + +// beware ye constant-evaluate of boolean-producing operators +assertEq(asmLink(asmCompile(USE_ASM + "function f() { return (4 | (2 == 2))|0 } return f"))(), 5); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { return (4 | (!2))|0 } return f"))(), 4); + +// get that order-of-operations right! +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob','imp','buf', USE_ASM + "var i32=new glob.Int32Array(buf); var x=0; function a() { return x|0 } function b() { x=42; return 0 } function f() { i32[((b()|0) & 0x3) >> 2] = a()|0 } return f"), this, null, buf)(); +assertEq(new Int32Array(buf)[0], 42); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { var a=0,i=0; for (; ~~i!=4; i=(i+1)|0) { a = (a*5)|0; if (+(a>>>0) != 0.0) return 1; } return 0; } return f"))(), 0) + +// Signed integer division by a power of two. +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return ((i|0)/1)|0; } return f;")); +for (let i = 0; i < 31; i++) { + assertEq(f(Math.pow(2,i)), Math.pow(2,i)); + assertEq(f(Math.pow(2,i)-1), Math.pow(2,i)-1); + assertEq(f(-Math.pow(2,i)), -Math.pow(2,i)); + assertEq(f(-Math.pow(2,i)-1), -Math.pow(2,i)-1); +} +assertEq(f(INT32_MIN), INT32_MIN); +assertEq(f(INT32_MAX), INT32_MAX); +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return ((i|0)/2)|0; } return f;")); +for (let i = 0; i < 31; i++) { + assertEq(f(Math.pow(2,i)), (Math.pow(2,i)/2)|0); + assertEq(f(Math.pow(2,i)-1), ((Math.pow(2,i)-1)/2)|0); + assertEq(f(-Math.pow(2,i)), (-Math.pow(2,i)/2)|0); + assertEq(f(-Math.pow(2,i)-1), ((-Math.pow(2,i)-1)/2)|0); +} +assertEq(f(INT32_MIN), (INT32_MIN/2)|0); +assertEq(f(INT32_MAX), (INT32_MAX/2)|0); +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return ((i|0)/4)|0; } return f;")); +for (let i = 0; i < 31; i++) { + assertEq(f(Math.pow(2,i)), (Math.pow(2,i)/4)|0); + assertEq(f(Math.pow(2,i)-1), ((Math.pow(2,i)-1)/4)|0); + assertEq(f(-Math.pow(2,i)), (-Math.pow(2,i)/4)|0); + assertEq(f(-Math.pow(2,i)-1), ((-Math.pow(2,i)-1)/4)|0); +} +assertEq(f(INT32_MIN), (INT32_MIN/4)|0); +assertEq(f(INT32_MAX), (INT32_MAX/4)|0); +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return ((i|0)/1073741824)|0; } return f;")); +for (let i = 0; i < 31; i++) { + assertEq(f(Math.pow(2,i)), (Math.pow(2,i)/Math.pow(2,30))|0); + assertEq(f(Math.pow(2,i)-1), ((Math.pow(2,i)-1)/Math.pow(2,30))|0); + assertEq(f(-Math.pow(2,i)), (-Math.pow(2,i)/Math.pow(2,30))|0); + assertEq(f(-Math.pow(2,i)-1), ((-Math.pow(2,i)-1)/Math.pow(2,30))|0); +} +assertEq(f(INT32_MIN), (INT32_MIN/Math.pow(2,30))|0); +assertEq(f(INT32_MAX), (INT32_MAX/Math.pow(2,30))|0); +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return ((((i|0)/1)|0)+i)|0; } return f;")); +for (let i = 0; i < 31; i++) { + assertEq(f(Math.pow(2,i)), (Math.pow(2,i) * 2)|0); + assertEq(f(Math.pow(2,i) - 1), ((Math.pow(2,i) - 1) * 2)|0); + assertEq(f(-Math.pow(2,i)), (-Math.pow(2,i) * 2)|0); + assertEq(f(-Math.pow(2,i) - 1), ((-Math.pow(2,i) - 1) * 2)|0); +} +assertEq(f(INT32_MIN), (INT32_MIN * 2)|0); +assertEq(f(INT32_MAX), (INT32_MAX * 2)|0); + +// Signed integer division by a power of two - with a non-negative numerator! +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; i=(i&2147483647)|0; return ((i|0)/1)|0; } return f;")); +for (let i = 0; i < 31; i++) { + assertEq(f(Math.pow(2,i)), Math.pow(2,i)); + assertEq(f(Math.pow(2,i+1)-1), Math.pow(2,i+1)-1); +} +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; i=(i&2147483647)|0; return ((i|0)/2)|0; } return f;")); +for (let i = 0; i < 31; i++) { + assertEq(f(Math.pow(2,i)), (Math.pow(2,i)/2)|0); + assertEq(f(Math.pow(2,i+1)-1), ((Math.pow(2,i+1)-1)/2)|0); +} +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; i=(i&2147483647)|0; return ((i|0)/4)|0; } return f;")); +for (let i = 0; i < 31; i++) { + assertEq(f(Math.pow(2,i)), (Math.pow(2,i)/4)|0); + assertEq(f(Math.pow(2,i+1)-1), ((Math.pow(2,i+1)-1)/4)|0); +} +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; i=(i&2147483647)|0; return ((i|0)/1073741824)|0; } return f;")); +for (let i = 0; i < 31; i++) { + assertEq(f(Math.pow(2,i)), (Math.pow(2,i)/Math.pow(2,30))|0); + assertEq(f(Math.pow(2,i+1)-1), ((Math.pow(2,i+1)-1)/Math.pow(2,30))|0); +} +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; i=(i&2147483647)|0; return ((((i|0)/1)|0)+i)|0; } return f;")); +for (let i = 0; i < 31; i++) { + assertEq(f(Math.pow(2,i)), (Math.pow(2,i) * 2)|0); + assertEq(f(Math.pow(2,i+1) - 1), ((Math.pow(2,i+1) - 1) * 2)|0); +} +assertEq(asmLink(asmCompile(USE_ASM + "var g=0; function f(x, y) { x = x|0; y = y|0; g = (x>>>0)%(y>>>0)|0; return (x|0)%(y|0)|0; } return f;"))(0xff40001, 0xfff80000), 0x40001); diff --git a/js/src/jit-test/tests/asm.js/testFFI.js b/js/src/jit-test/tests/asm.js/testFFI.js new file mode 100644 index 0000000000..5f2884793a --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testFFI.js @@ -0,0 +1,175 @@ +load(libdir + "asm.js"); +load(libdir + "asserts.js"); + +function ffi(a,b,c,d) { + return a+b+c+d; +} + +var f = asmLink(asmCompile('global','imp', USE_ASM + 'var ffi=imp.ffi; function g() { return 1 } function f() { var i=0; i=g()|0; return ((ffi(4,5,6,7)|0)+i)|0 } return f'), null, {ffi:ffi}); +assertEq(f(1), 23); + +var counter = 0; +function inc() { return counter++ } +function add1(x) { return x+1 } +function add2(x,y) { return x+y } +function add3(x,y,z) { return x+y+z } +function addN() { + var sum = 0; + for (var i = 0; i < arguments.length; i++) + sum += arguments[i]; + return sum; +} +var imp = { inc:inc, add1:add1, add2:add2, add3:add3, addN:addN, identity: x => x }; + +assertAsmTypeFail('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { incc() } return f'); +assertAsmTypeFail('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { var i = 0; return (i + inc)|0 } return f'); +assertAsmTypeFail('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { inc = 0 } return f'); +assertAsmTypeFail('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { return (inc() + 1)|0 } return f'); +assertAsmTypeFail('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { return +((inc()|0) + 1.1) } return f'); +assertAsmTypeFail('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { return +(inc() + 1.1) } return f'); +assertAsmTypeFail('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { return (+inc() + 1)|0 } return f'); +assertAsmTypeFail('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { var i = 0; inc(i>>>0) } return f'); +assertAsmTypeFail('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { if (0) return inc(); return } return f'); +assertAsmTypeFail('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { inc(inc()) } return f'); +assertAsmTypeFail('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { g(inc()) } function g() {} return f'); +assertAsmTypeFail('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { inc()|inc() } return f'); + +assertAsmLinkFail(asmCompile('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { return inc()|0 } return f'), null, {}); +assertAsmLinkFail(asmCompile('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { return inc()|0 } return f'), null, {inc:0}); +assertAsmLinkFail(asmCompile('glob', 'imp', USE_ASM + 'var inc=imp.inc; function f() { return inc()|0 } return f'), null, {inc:{}}); + +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'var inc=imp.inc; function g() { inc() } return g'), null, imp)(), undefined); +assertEq(counter, 1); + +var f = asmLink(asmCompile('glob', 'imp', USE_ASM + 'var inc=imp.inc; function g() { return inc()|0 } return g'), null, imp); +assertEq(f(), 1); +assertEq(counter, 2); +assertEq(f(), 2); +assertEq(counter, 3); + +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'var add1=imp.add1; function g(i) { i=i|0; return add1(i|0)|0 } return g'), null, imp)(9), 10); +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'const add1=imp.add1; function g(i) { i=i|0; return add1(i|0)|0 } return g'), null, imp)(9), 10); +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'var add3=imp.add3; function g() { var i=1,j=3,k=9; return add3(i|0,j|0,k|0)|0 } return g'), null, imp)(), 13); +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'const add3=imp.add3; function g() { var i=1,j=3,k=9; return add3(i|0,j|0,k|0)|0 } return g'), null, imp)(), 13); +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'var add3=imp.add3; function g() { var i=1.4,j=2.3,k=32.1; return +add3(i,j,k) } return g'), null, imp)(), 1.4+2.3+32.1); +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'const add3=imp.add3; function g() { var i=1.4,j=2.3,k=32.1; return +add3(i,j,k) } return g'), null, imp)(), 1.4+2.3+32.1); + +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'var add3=imp.add3; function f(i,j,k) { i=i|0;j=+j;k=k|0; return add3(i|0,j,k|0)|0 } return f'), null, imp)(1, 2.5, 3), 6); +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'var addN=imp.addN; function f() { return +addN(1,2,3,4.1,5,6.1,7,8.1,9.1,10,11.1,12,13,14.1,15.1,16.1,17.1,18.1) } return f'), null, imp)(), 1+2+3+4.1+5+6.1+7+8.1+9.1+10+11.1+12+13+14.1+15.1+16.1+17.1+18.1); + +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'var add2=imp.add2; function f(i,j) { i=i|0;j=+j; return +(+(add2(i|0,1)|0) + +add2(j,1) + +add2(+~~i,j)) } return f'), null, imp)(2, 5.5), 3+(5.5+1)+(2+5.5)); +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'var addN=imp.addN; function f(i,j) { i=i|0;j=+j; return +(+addN(i|0,j,3,j,i|0) + +addN() + +addN(j,j,j)) } return f'), null, imp)(1, 2.2), (1+2.2+3+2.2+1)+(2.2+2.2+2.2)); + +counter = 0; +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'var addN=imp.addN,inc=imp.inc; function f() { return ((addN(inc()|0,inc(3.3)|0,inc()|0)|0) + (addN(inc(0)|0)|0))|0 } return f'), null, imp)(), 6); +assertEq(counter, 4); + +var recurse = function(i,j) { if (i == 0) return j; return f(i-1,j+1)+j } +imp.recurse = recurse; +var f = asmLink(asmCompile('glob', 'imp', USE_ASM + 'var r=imp.recurse; function f(i,j) { i=i|0;j=+j; return +r(i|0,j) } return f'), null, imp); +assertEq(f(0,3.3), 3.3); +assertEq(f(1,3.3), 3.3+4.3); +assertEq(f(2,3.3), 3.3+4.3+5.3); + +function maybeThrow(i, j) { + if (i == 0) + throw j; + try { + return f(i-1, j); + } catch(e) { + assertEq(typeof e, "number"); + return e; + } +} +var f = asmLink(asmCompile('glob', 'imp', USE_ASM + 'var ffi=imp.ffi; function f(i, j) { i=i|0;j=j|0; return ffi(i|0, (j+1)|0)|0 } return f'), null, {ffi:maybeThrow}); +assertThrowsValue(function() { f(0,0) }, 1); +assertThrowsValue(function() { f(0,Math.pow(2,31)-1) }, -Math.pow(2,31)); +assertEq(f(1,0), 2); +assertEq(f(2,0), 3); +assertEq(f(3,0), 4); +assertEq(f(4,5), 10); + +var recurse = function(i,j) { if (i == 0) throw j; f(i-1,j) } +var f = asmLink(asmCompile('glob', 'imp', USE_ASM + 'var ffi=imp.ffi; function g(i,j,k) { i=i|0;j=+j;k=k|0; if (!(k|0)) ffi(i|0,j)|0; else g(i, j+1.0, (k-1)|0) } function f(i,j) { i=i|0;j=+j; g(i,j,4) } return f'), null, {ffi:recurse}); +assertThrowsValue(function() { f(0,2.4) }, 2.4+4); +assertThrowsValue(function() { f(1,2.4) }, 2.4+8); +assertThrowsValue(function() { f(8,2.4) }, 2.4+36); + +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + 'var identity=imp.identity; function g(x) { x=+x; return +identity(x) } return g'), null, imp)(13.37), 13.37); + +// Test asm.js => ion paths +setJitCompilerOption("ion.warmup.trigger", 10); +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("offthread-compilation.enable", 0); + +// In registers on x64 and ARM, on the stack for x86 +function ffiIntFew(a,b,c,d) { return d+1 } +var f = asmLink(asmCompile('glob', 'imp', USE_ASM + 'var ffi=imp.ffi; function f(i) { i=i|0; return ffi(i|0,(i+1)|0,(i+2)|0,(i+3)|0)|0 } return f'), null, {ffi:ffiIntFew}); +for (var i = 0; i < 40; i++) + assertEq(f(i), i+4); + +// Stack and registers for x64 and ARM, stack for x86 +function ffiIntMany(a,b,c,d,e,f,g,h,i,j) { return j+1 } +var f = asmLink(asmCompile('glob', 'imp', USE_ASM + 'var ffi=imp.ffi; function f(i) { i=i|0; return ffi(i|0,(i+1)|0,(i+2)|0,(i+3)|0,(i+4)|0,(i+5)|0,(i+6)|0,(i+7)|0,(i+8)|0,(i+9)|0)|0 } return f'), null, {ffi:ffiIntMany}); +for (var i = 0; i < 15; i++) + assertEq(f(i), i+10); + +// In registers on x64 and ARM, on the stack for x86 +function ffiDoubleFew(a,b,c,d) { return d+1 } +var f = asmLink(asmCompile('glob', 'imp', USE_ASM + 'var ffi=imp.ffi; function f(i) { i=+i; return +ffi(i,i+1.0,i+2.0,i+3.0) } return f'), null, {ffi:ffiDoubleFew}); +for (var i = 0; i < 15; i++) + assertEq(f(i), i+4); + +// Stack and registers for x64 and ARM, stack for x86 +function ffiDoubleMany(a,b,c,d,e,f,g,h,i,j) { return j+1 } +var f = asmLink(asmCompile('glob', 'imp', USE_ASM + 'var ffi=imp.ffi; function f(i) { i=+i; return +ffi(i,i+1.0,i+2.0,i+3.0,i+4.0,i+5.0,i+6.0,i+7.0,i+8.0,i+9.0) } return f'), null, {ffi:ffiDoubleMany}); +for (var i = 0; i < 15; i++) + assertEq(f(i), i+10); + +// Test the throw path +function ffiThrow(n) { if (n == 14) throw new Error('yolo'); } +var f = asmLink(asmCompile('glob', 'imp', USE_ASM + 'var ffi=imp.ffi; function f(i) { i=i|0; ffi(i >> 0); } return f'), null, {ffi:ffiThrow}); +var i = 0; +try { + for (; i < 15; i++) + f(i); + throw 'assume unreachable'; +} catch (e) { + assertEq(e.message, 'yolo'); + assertEq(i, 14); +} + +// OOL conversion paths +var INT32_MAX = Math.pow(2, 31) - 1; +function ffiOOLConvertInt(n) { if (n == 40) return valueToConvert; return 42; } +var f = asmLink(asmCompile('glob', 'imp', USE_ASM + 'var ffi=imp.ffi; function f(i) { i=i|0; return ffi(i >> 0) | 0; } return f'), null, {ffi:ffiOOLConvertInt}); +for (var i = 0; i < 40; i++) + assertEq(f(i), 42); +valueToConvert = INT32_MAX + 1; +assertEq(f(40), INT32_MAX + 1 | 0); +function testBadConversions(f) { + valueToConvert = {valueOf: function () { throw new Error("FAIL"); }}; + + var errMsg; + try { + f(40); + } catch(e) { + errMsg = e.message; + } + assertEq(errMsg, "FAIL"); + + valueToConvert = {valueOf: function () { throw "FAIL"; }}; + assertThrowsValue(() => f(40), "FAIL"); + + valueToConvert = Symbol(); + assertThrowsInstanceOf(() => f(40), TypeError); +} +testBadConversions(f); + +function ffiOOLConvertDouble(n) { if (n == 40) return valueToConvert; return 42.5; } +var f = asmLink(asmCompile('glob', 'imp', USE_ASM + 'var ffi=imp.ffi; function f(i) { i=i|0; return +ffi(i >> 0); } return f'), null, {ffi:ffiOOLConvertDouble}); +for (var i = 0; i < 40; i++) + assertEq(f(i), 42.5); +valueToConvert = {valueOf: function() { return 13.37 }}; +assertEq(f(40), 13.37); +testBadConversions(f); diff --git a/js/src/jit-test/tests/asm.js/testFastHeapAccess.js b/js/src/jit-test/tests/asm.js/testFastHeapAccess.js new file mode 100644 index 0000000000..09bd89693f --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testFastHeapAccess.js @@ -0,0 +1,81 @@ +load(libdir + "asm.js"); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i,j) {i=i|0;j=j|0; u32[((i<<2)+32 & 0xffff)>>2] = j } return f'); +var f = asmLink(code, this, null, BUF_64KB); +for (var i = 0; i < 100; i++) + f(i, i); +var u32 = new Uint32Array(BUF_64KB); +for (var i = 0; i < 100; i++) + assertEq(u32[8+i], i); +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; return u32[((i<<2)+32 & 0xffff)>>2]|0 } return f'); +var f = asmLink(code, this, null, BUF_64KB); +for (var i = 0; i < 100; i++) + assertEq(f(i), i); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i,j) {i=i|0;j=j|0; u32[(i<<2 & 0xffff)>>2] = j } return f'); +var f = asmLink(code, this, null, BUF_64KB); +for (var i = 0; i < 100; i++) + f(i, i); +var u32 = new Uint32Array(BUF_64KB); +for (var i = 0; i < 100; i++) + assertEq(u32[i], i); +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; return u32[(i<<2 & 0xffff)>>2]|0 } return f'); +var f = asmLink(code, this, null, BUF_64KB); +for (var i = 0; i < 100; i++) + assertEq(f(i), i); + +// For legacy compatibility, test Int8/Uint8 accesses with no shift. +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i,j) {i=i|0;j=j|0; u8[i+20 & 0xffff] = j } return f'); +var f = asmLink(code, this, null, BUF_64KB); +for (var i = 0; i < 100; i++) + f(i, i); +var u8 = new Uint8Array(BUF_64KB); +for (var i = 0; i < 100; i++) + assertEq(u8[i+20], i); +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; return u8[i+20 & 0xffff]|0 } return f'); +var f = asmLink(code, this, null, BUF_64KB); +for (var i = 0; i < 100; i++) + assertEq(f(i), i); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i,j) {i=i|0;j=j|0; u8[(i+20 & 0xffff)>>0] = j } return f'); +var f = asmLink(code, this, null, BUF_64KB); +for (var i = 0; i < 100; i++) + f(i, i); +var u8 = new Uint8Array(BUF_64KB); +for (var i = 0; i < 100; i++) + assertEq(u8[i+20], i); +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; return u8[(i+20 & 0xffff)>>0]|0 } return f'); +var f = asmLink(code, this, null, BUF_64KB); +for (var i = 0; i < 100; i++) + assertEq(f(i), i); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i,j,k) {i=i|0;j=j|0;k=k|0; i32[(i + (j<<2) & 0xffff) >> 2] = k } return f'); +var f = asmLink(code, this, null, BUF_64KB); +for (var i = 0; i < 100; i++) + f(32, i, i); +var u32 = new Uint32Array(BUF_64KB); +for (var i = 0; i < 100; i++) + assertEq(u32[8+i], i); +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i,j) {i=i|0;j=j|0; return i32[(i + (j<<2) & 0xffff) >> 2]|0 } return f'); +var f = asmLink(code, this, null, BUF_64KB); +for (var i = 0; i < 100; i++) + assertEq(f(32, i), i); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i,j,k) {i=i|0;j=j|0;k=k|0; i32[(((i + (j<<2))|0) + 16 & 0xffff) >> 2] = k } return f'); +var f = asmLink(code, this, null, BUF_64KB); +for (var i = 0; i < 100; i++) + f(32, i, i); +var u32 = new Uint32Array(BUF_64KB); +for (var i = 0; i < 100; i++) + assertEq(u32[8+i+4], i); +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i,j) {i=i|0;j=j|0; return i32[(((i + (j<<2))|0) + 16 & 0xffff) >> 2]|0 } return f'); +var f = asmLink(code, this, null, BUF_64KB); +for (var i = 0; i < 100; i++) + assertEq(f(32, i), i); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i,j) {i=i|0;j=j|0; return ((i32[(i+(j<<2)&0xffff)>>2]|0) + (i32[(((i+(j<<2))|0)+4&0xffff)>>2]|0))|0 } return f'); +var f = asmLink(code, this, null, BUF_64KB); +var i32 = new Uint32Array(BUF_64KB); +i32[11] = 3; +i32[12] = 97; +assertEq(f(12,8), 100); diff --git a/js/src/jit-test/tests/asm.js/testFloat32.js b/js/src/jit-test/tests/asm.js/testFloat32.js new file mode 100644 index 0000000000..34f893b072 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testFloat32.js @@ -0,0 +1,321 @@ +load(libdir + "asm.js"); +const TO_FLOAT32 = "var toF = glob.Math.fround;"; +const HEAP32 = "var f32 = new glob.Float32Array(heap);"; +const HEAP64 = "var f64 = new glob.Float64Array(heap);" +var heap = new ArrayBuffer(BUF_MIN); + +// Module linking +assertAsmLinkAlwaysFail(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() {} return f"), null); +assertAsmLinkAlwaysFail(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() {} return f"), {fround: Math.fround}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() {} return f"), {Math: {fround: Math.imul}}); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() {} return f"), {Math:{fround: Math.fround}})(), undefined); + +// Argument coercions +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = unknown(x); } return f"); +assertAsmTypeFail('glob', USE_ASM + "function f(i) { i = toF(i); } return f"); +assertAsmTypeFail('glob', USE_ASM + "var cos = glob.Math.cos; function f(x) { x = cos(x); } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = toF(); } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = toF(x, x); } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = toF('hi'); } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = toF(loat); } return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(i) { i = toF(i); } return f"), this)(), undefined); + +// Local variables declarations +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = unknown(); } return f"); +assertAsmTypeFail('glob', USE_ASM + "var cos = glob.Math.cos; function f() { var i = cos(); } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF(); } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF(x, x); } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF('hi'); } return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF(5); } return f"), this)(), undefined); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF(5.); } return f"), this)(), undefined); + +// Return values +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(4, 4); } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(); } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF({}); } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(x); } return f"); + +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(42); } return f"), this)(), 42); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(0.); } return f"), this)(), 0); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(-0.); } return f"), this)(), -0); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var inf = glob.Infinity; function f() { return toF(inf); } return f"), this)(), Infinity); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(13.37); } return f"), this)(), Math.fround(13.37)); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return +toF(4.); } return f"), this)(), 4); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return +~~toF(4.5); } return f"), this)(), 4); + +// Assign values +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF(5.); i = 5; return toF(i); } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF(5.); i = 6.; return toF(i); } return f"); + +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF(-0.); return toF(i); } return f"), this)(), -0); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF(0.); return toF(i); } return f"), this)(), 0); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF(5.); return toF(i); } return f"), this)(), 5); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF(5.); i = toF(42); return toF(i); } return f"), this)(), 42); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF(5.); i = toF(6.); return toF(i); } return f"), this)(), 6); + +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { var i = toF(5.); f32[0] = toF(6.); i = f32[0]; return toF(i); } return f"); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { var i = toF(5.); f32[0] = toF(6.); i = toF(f32[0]); return toF(i); } return f"), this, null, heap)(), 6); + +// Special array assignments (the other ones are tested in testHeapAccess) +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { var i = 5.; f32[0] = i; return toF(f32[0]); } return f"), this, null, heap)(), 5); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "var f64 = new glob.Float64Array(heap); function f() { var i = toF(5.); f64[0] = i; return +f64[0]; } return f"), this, null, heap)(), 5); + +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 1.5; return +f32[0]; } return f"), this, null, heap)(), 1.5); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + HEAP64 + "function f() { f64[0] = 1.5; return toF(f64[0]); } return f"), this, null, heap)(), 1.5); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + HEAP64 + "function f() { f32[0] = toF(42); f64[0] = f32[0]; return +f64[0]; } return f"), this, null, heap)(), 42); + +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = toF(-1.4013e-45) / toF(42.); } return f"), this, null, heap)(), undefined); + +// Coercions +// -> from Float32 +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { var n = 0; n = toF(4.5) | 0; } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { var i = toF(5.); var n = 0; n = i | 0; return n | 0; } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = toF(x); var n = 0; n = ~~(x + x) >>> 0; return n | 0; } return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = toF(x); var n = 0.; n = +x; return +n; } return f"), this)(16.64), Math.fround(16.64)); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = toF(x); var n = 0; n = ~~x; return n | 0; } return f"), this)(16.64), 16); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = toF(x); var n = 0; n = ~~x >>> 0; return n | 0; } return f"), this)(16.64), 16); + +// -> from float? +function makeCoercion(coercionFunc) { + return USE_ASM + HEAP32 + TO_FLOAT32 + "function f(x) { x = toF(x); f32[0] = x; return " + coercionFunc('f32[0]') + " } return f"; +} +assertAsmTypeFail('glob', 'ffi', 'heap', makeCoercion(x => x + '|0')); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', makeCoercion(x => '+' + x)), this, null, heap)(16.64), Math.fround(16.64)); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', makeCoercion(x => 'toF(' + x + ')')), this, null, heap)(16.64), Math.fround(16.64)); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', makeCoercion(x => '~~+' + x + '|0')), this, null, heap)(16.64), 16); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', makeCoercion(x => '~~toF(' + x + ')|0')), this, null, heap)(16.64), 16); + +// -> to Float32 +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = x|0; return toF(~~x); } return f"), this)(23), 23); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = x|0; return toF(x >> 0); } return f"), this)(23), 23); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = +x; return toF(x); } return f"), this)(13.37), Math.fround(13.37)); + +UINT32_MAX = Math.pow(2, 32)-1; +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = x|0; return toF(x >>> 0); } return f"), this)(-1), Math.fround(UINT32_MAX)); +var tof = asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = x|0; return toF(x>>>0) } return f"), this); +for (x of [0, 1, 10, 64, 1025, 65000, Math.pow(2,30), Math.pow(2,31), Math.pow(2,32)-2, Math.pow(2,32)-1]) + assertEq(tof(x), Math.fround(x)); + +// Global variables imports +assertAsmTypeFail('glob', USE_ASM + "var x = toF(); function f() {} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var x = some(3); function f() {} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var x = toF(); function f() {} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var x = toF(3, 4); function f() {} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var x = toF({x: 3}); function f() {} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var x = toF(true); function f() {} return f"); +assertAsmTypeFail('glob', USE_ASM + "var x = toF(3);" + TO_FLOAT32 + "function f() {} return f"); + +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var x = toF(3.5); function f() {} return f"), this)(), undefined); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var x = toF(3); function f() {} return f"), this)(), undefined); +assertEq(asmLink(asmCompile('glob', 'ffi', USE_ASM + TO_FLOAT32 + "var x = toF(ffi.x); function f() {} return f"), this, {x:3})(), undefined); +assertEq(asmLink(asmCompile('glob', 'ffi', USE_ASM + TO_FLOAT32 + "var x = toF(ffi.x); function f() {} return f"), this, {x:3.5})(), undefined); + +// Global variables uses +values = [2.01, 13.37, -3.141592653] +specials = [NaN, Infinity] + +for (v of values) { + assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var x = toF(" + v + "); function f() {return toF(x);} return f"), this)(), Math.fround(v)); + assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "const x = toF(" + v + "); function f() {return toF(x);} return f"), this)(), Math.fround(v)); + assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var x = toF(0.); function f() {x = toF(" + v + "); return toF(x);} return f"), this)(), Math.fround(v)); + assertEq(asmLink(asmCompile('glob', 'ffi', USE_ASM + TO_FLOAT32 + "var x = toF(ffi.x); function f() {return toF(x);} return f"), this, {x:v})(), Math.fround(v)); +} + +for (v of specials) { + assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var special = glob." + v + "; var g=toF(0.); function f() {g=toF(special); return toF(g);} return f"), this)(), Math.fround(v)); +} + +// Math builtins +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var imul = glob.Math.imul; function f() {var x = toF(1.5), y = toF(2.4); return imul(x, y) | 0;} return f"); + +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var abs = glob.Math.abs; function f() {var x = toF(1.5); return abs(x) | 0;} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var abs = glob.Math.abs; function f() {var x = toF(1.5); return +abs(x);} return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var abs = glob.Math.abs; function f() {var x = toF(1.5); return +toF(abs(x));} return f"), this)(), 1.5); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var abs = glob.Math.abs; function f() {var x = toF(1.5); return toF(abs(x))} return f"), this)(), Math.fround(1.5)); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var abs = glob.Math.abs; function f() {var x = toF(-1.5); return toF(abs(x))} return f"), this)(), Math.fround(1.5)); + +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var sqrt = glob.Math.sqrt; function f() {var x = toF(1.5); return sqrt(x) | 0;} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var sqrt = glob.Math.sqrt; function f() {var x = toF(1.5); return +sqrt(x);} return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var sqrt = glob.Math.sqrt; function f() {var x = toF(1.5); return +toF(sqrt(x));} return f"), this)(), Math.fround(Math.sqrt(Math.fround(1.5)))); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var sqrt = glob.Math.sqrt; function f() {var x = toF(2.25); return toF(sqrt(x))} return f"), this)(), Math.fround(1.5)); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var sqrt = glob.Math.sqrt; function f() {var x = toF(-1.); return toF(sqrt(x))} return f"), this)(), NaN); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var sqrt = glob.Math.sqrt; var inf = glob.Infinity; function f() {var x = toF(0.); x = toF(inf); return toF(sqrt(x))} return f"), this)(), Infinity); + +// float?s +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + HEAP32 + TO_FLOAT32 + "var sqrt = glob.Math.sqrt; function f(x) { x = toF(x); f32[0] = x; return toF(sqrt(f32[0])) } return f"), this, null, heap)(64), Math.fround(8)); + +// The only other Math functions that can receive float32 as arguments and that strictly commute are floor and ceil (see +// also bug 969203). +var floorModule = asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.floor; function f(x) {x = toF(x); return toF(g(x))} return f"), this); +for (v of [-10.5, -1.2345, -1, 0, 1, 3.141592653, 13.37, Math.Infinity, NaN]) + assertEq(floorModule(v), Math.fround(Math.floor(Math.fround(v)))); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + HEAP32 + TO_FLOAT32 + "var floor = glob.Math.floor; function f(x) { x = toF(x); f32[0] = x; return toF(floor(f32[0])) } return f"), this, null, heap)(13.37), 13); + +var ceilModule = asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.ceil; function f(x) {x = toF(x); return toF(g(x))} return f"), this); +for (v of [-10.5, -1.2345, -1, 0, 1, 3.141592653, 13.37, Math.Infinity, NaN]) + assertEq(ceilModule(v), Math.fround(Math.ceil(Math.fround(v)))); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + HEAP32 + TO_FLOAT32 + "var ceil = glob.Math.ceil; function f(x) { x = toF(x); f32[0] = x; return toF(ceil(f32[0])) } return f"), this, null, heap)(13.37), 14); + +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.cos; function f(x) {x = toF(x); return toF(g(x))} return f"); + +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.cos; function f(x) {x = toF(x); return +(g(x))} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.cos; function f(x) {x = x|0; return toF(g(x))} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.cos; function f(x) {x = toF(x); return g(x) | 0} return f"); + +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.cos; function f(x) {x = +x; return toF(g(+x))} return f"), this)(5), Math.fround(Math.cos(5))); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.cos; function f(x) {x = +x; return toF(g(x))} return f"), this)(5), Math.fround(Math.cos(5))); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + HEAP32 + TO_FLOAT32 + "var g = glob.Math.cos; function f(x) { x = toF(x); return toF(+g(+x)) } return f"), this, null, heap)(3.14159265358), -1); + +// Math functions with arity of two are not specialized for floats, so we shouldn't feed them with floats arguments or +// return type +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.pow; function f(x) {x = toF(x); return toF(g(x, 2.))} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.pow; function f(x) {x = toF(x); return +g(x, 2.)} return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.pow; function f(x) {x = toF(x); return toF(g(+x, 2.))} return f"), this)(3), 9); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.pow; function f(x) {x = toF(x); return +g(+x, 2.)} return f"), this)(3), 9); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var g = glob.Math.pow; function f(x) {x = toF(x); return toF(+g(+x, 2.))} return f"), this)(3), 9); + +// Other function calls +// -> Signature comparisons +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function g(x){x=toF(x); return toF(x);} function f() {var x=toF(4.); var y=toF(0.); var z = 0.; y=toF(g(x)); z = +g(x); return toF(z); } return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var sqrt=glob.Math.sqrt; function g(x){x=toF(x); return toF(sqrt(x));} function f() {var x=toF(4.); var y=toF(0.); var z = 0.; y = toF(g(x)); z = +toF(g(x)); return toF(z); } return f"), this)(), 2); + +// -> FFI +var FFI = "var ffi = env.ffi;"; +assertAsmTypeFail('glob', 'env', USE_ASM + TO_FLOAT32 + FFI + "function f() {var x = toF(3.14); return +ffi(x);} return f"); +assertAsmTypeFail('glob', 'env', USE_ASM + TO_FLOAT32 + FFI + "function f() {var x = toF(3.14); return toF(ffi(+x));} return f"); + +var env = {ffi: function(x) { return x+1; }}; // use registers +assertEq(asmLink(asmCompile('glob', 'env', USE_ASM + TO_FLOAT32 + FFI + "function f(x) {x = toF(x); return toF(+ffi(+x));} return f"), this, env)(5), Math.fround(6)); +env = {ffi: function(a,b,c,d,e,f,g,h,i) { return a+b+c+d+e+f+g+h+i; }}; // use stack arguments (> 8 arguments on linux x64) +assertEq(asmLink(asmCompile('glob', 'env', USE_ASM + TO_FLOAT32 + FFI + "function f(x) {x = toF(x); return toF(+ffi(+x, 1., 2., 3., 4., 5., -5., -4., 1.));} return f"), this, env)(5), Math.fround(12)); + +// -> Internal calls +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function g(x){x=toF(x);return toF(+x + 1.);} function f(x) {x = +x; return toF(g(x));} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function g(x){x=toF(x);return toF(+x + 1.);} function f(x) {x = x|0; return toF(g(x));} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function g(x){x=toF(x);return toF(+x + 1.);} function f(x) {x = x|0; return toF(g(x));} return f"); + +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function g(x){x=toF(x);return toF(+x + 1.);} function f(x) {x = toF(x); return toF(g(x));} return f"), this, env)(5), Math.fround(6)); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function g(x,y){x=toF(x);y=toF(y);return toF(+x + +y);} function f(x) {x = toF(x); return toF(g(x, toF(1.)));} return f"), this, env)(5), Math.fround(6)); + +// --> internal calls with unused return values +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "var g = 4; function s(x) { x = +x; g = (g + ~~x)|0; return g|0;} function f(x) { x = +x; toF(s(x)); return g|0} return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var g = 4; function s(x) { x = +x; g = (g + ~~x)|0; return toF(g|0);} function f(x) { x = +x; toF(s(x)); return g|0} return f"), this)(3), 7); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var g = 4; function s(x) { x = toF(x); g = (g + ~~x)|0; return toF(g|0);} function f(x) { x = toF(x); return (toF(s(x)), g)|0} return f"), this)(3), 7); + +// --> coerced calls +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var g = 4; function s(x) { x = toF(x); g = (g + ~~x)|0; return +(g|0);} function f(x) { x = toF(x); return toF(+s(x))} return f"), this)(3), 7); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var g = 4; function s(x) { x = toF(x); g = (g + ~~x)|0; return g|0;} function f(x) { x = toF(x); return toF(s(x)|0)} return f"), this)(3), 7); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "var g = 4; function s(x) { x = toF(x); g = (g + ~~x)|0; return toF(g|0);} function f(x) { x = toF(x); return toF(toF(s(x)))} return f"), this)(3), 7); + +// --> test pressure on registers in internal calls when there are |numArgs| arguments +for (numArgs of [5, 9, 17, 33, 65, 129]) { + let code = (function(n) { + let args = "", coercions = "", sum = "", call="x"; + for (let i = 0; i < n; i++) { + let name = 'a' + i; + args += name + ((i == n-1)?'':','); + coercions += name + '=toF(' + name + ');'; + sum += ((i>0)?'+':'') + ' +' + name; + call += (i==0)?'':',toF(' + i + '.)' + } + return "function g(" + args + "){" + coercions + "return toF(" + sum + ");}" + +"function f(x) { x = toF(x); return toF(g(" + call + "))}"; + })(numArgs); + assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + code + "return f"), this, env)(5), Math.fround(5 + numArgs * (numArgs-1) / 2)); +} + +// -> Pointer calls +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function a(x){x=toF(x);return toF(+x + .5);} function b(x){x=toF(x);return toF(+x - .5);} function f(x, n) {x=+x;n=n|0;return toF(t[n&1](x));} var t=[a,b]; return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function a(x){x=toF(x);return toF(+x + .5);} function b(x){x=toF(x);return toF(+x - .5);} function f(x, n) {x=x|0;n=n|0;return toF(t[n&1](x));} var t=[a,b]; return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function a(x){x=toF(x);return toF(+x + .5);} function b(x){x=toF(x);return toF(+x - .5);} function f(x, n) {x=toF(x);n=n|0;return t[n&1](x)|0;} var t=[a,b]; return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function a(x){x=toF(x);return toF(+x + .5);} function b(x){x=toF(x);return toF(+x - .5);} function f(x, n) {x=toF(x);n=n|0;return +t[n&1](x);} var t=[a,b]; return f"); + +code = asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function a(x){x=toF(x);return toF(+x + .5);} function b(x){x=toF(x);return toF(+x - .5);}" + + "function f(x, n) {x=toF(x);n=n|0;return toF(t[n&1](x));} var t=[a,b]; return f"), this); +assertEq(code(0, 0), .5); +assertEq(code(0, 1), -.5); +assertEq(code(13.37, 0), Math.fround(13.37 + .5)); +assertEq(code(13.37, 1), Math.fround(13.37 - .5)); + +// Arithmetic operations +// -> mul +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(3 * toF(4.));} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(3. * toF(4.)); } return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return +(toF(3.) * toF(4.));} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(3) * toF(4) * toF(5));} return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(3.) * toF(4.)); } return f"), this)(), 12); + +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return toF(3 * f32[0]);} return f"); +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return toF(3. * f32[0]);} return f"); +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return +(toF(3.) * f32[0]);} return f"); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return toF(toF(3.) * f32[0]);} return f"), this, null, heap)(), 12); + +var mul = asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x=toF(x); return toF(x * toF(4.));} return f"), this); +assertEq(mul(Infinity), Infinity); +assertEq(mul(NaN), NaN); +assertEq(mul(0), 0); +assertEq(mul(1), 4); +assertEq(mul(0.33), Math.fround(0.33 * 4)); + +// -> add +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(3 + toF(4.));} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(3.5 + toF(4.));} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return +(toF(3.5) + toF(4.));} return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(3.5) + toF(4.)); } return f"), this)(), 7.5); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(3.5) + toF(4.) + toF(4.5));} return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(toF(3.5) + toF(4.)) + toF(4.5)); } return f"), this)(), 12); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return toF(toF(3) + f32[0]);} return f"), this, null, heap)(), 7); + +// --> no additions with float? or floatish +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return toF(3 + f32[0]);} return f"); +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return toF(3. + f32[0]);} return f"); + +// -> sub +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(3 - toF(4.));} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(3.5 - toF(4.));} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return +(toF(3.5) - toF(4.));} return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(3.5) - toF(4.)); } return f"), this)(), -.5); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(3.5) - toF(4.) - toF(4.5));} return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(toF(3.5) - toF(4.)) - toF(4.5)); } return f"), this)(), -5); + +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(3.5) + toF(4.) - toF(4.5));} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(3.5) - toF(4.) + toF(4.5));} return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(toF(3.5) + toF(4.)) - toF(4.5)); } return f"), this)(), 3); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(toF(3.5) - toF(4.)) + toF(4.5)); } return f"), this)(), 4); + +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return toF(3 - f32[0]);} return f"); +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return toF(3. - f32[0]);} return f"); +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return +(toF(3) - f32[0]);} return f"); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return toF(toF(3) - f32[0]);} return f"), this, null, heap)(), -1); + +// -> div +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(3 / toF(4.));} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(3.5 / toF(4.));} return f"); +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return +(toF(3.5) / toF(4.));} return f"); +assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(12.) / toF(4.)); } return f"), this)(), 3); + +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return toF(3 / f32[0]);} return f"); +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return toF(3. / f32[0]);} return f"); +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 4.; return +(toF(3) / f32[0]);} return f"); +assertEq(asmLink(asmCompile('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { f32[0] = 2.; return toF(toF(4) / f32[0]);} return f"), this, null, heap)(), 2); + +// -> mod +assertAsmTypeFail('glob', USE_ASM + TO_FLOAT32 + "function f() { return toF(toF(3.5) % toF(4.));} return f"); +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { return toF(f32[0] % toF(4.));} return f"); +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { return toF(toF(3.5) % f32[0]);} return f"); +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { return toF(f32[1] % f32[0]);} return f"); + +// Comparisons +for (op of ['==', '!=', '<', '>', '<=', '>=']) { + let code = asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = toF(x); if( x " + op + " toF(3.) ) return 1; else return 0; return -1; } return f"), this); + let ternary = asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = toF(x); return ((x " + op + " toF(3.)) ? 1 : 0)|0 } return f"), this); + for (v of [-5, 0, 2.5, 3, 13.37, NaN, Infinity]) { + let expected = eval("("+ v + " " + op + " 3)|0"); + assertEq(code(v) | 0, expected); + assertEq(ternary(v) | 0, expected); + } + + assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { if( f32[0] " + op + " toF(3.) ) return 1; else return 0; return -1; } return f"); + assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + TO_FLOAT32 + HEAP32 + "function f() { if( (toF(1.) + toF(2.)) " + op + " toF(3.) ) return 1; else return 0; return -1; } return f"); +} + diff --git a/js/src/jit-test/tests/asm.js/testFloatingPoint.js b/js/src/jit-test/tests/asm.js/testFloatingPoint.js new file mode 100644 index 0000000000..bad22028e0 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testFloatingPoint.js @@ -0,0 +1,134 @@ +load(libdir + "asm.js"); + +assertEq(asmLink(asmCompile(USE_ASM + "function f() { return 1.1 } return f"))(), 1.1); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; return +(+(i|0) + .1) } return f"))(1), 1.1); +assertEq(asmLink(asmCompile(USE_ASM + "function f(d) { d=+d; return +d } return f"))(1.1), 1.1); +assertEq(asmLink(asmCompile(USE_ASM + "function f(d,e) { d=+d;e=+e; return +(d+e) } return f"))(1.0, .1), 1.1); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i,e) { i=i|0;e=+e; return +(+~~i+e) } return f"))(1, .1), 1.1); +assertEq(asmLink(asmCompile(USE_ASM + "function f(d,i) { d=+d;i=i|0; return +(d + +(i|0)) } return f"))(.1, 1), 1.1); +assertEq(asmLink(asmCompile(USE_ASM + "function f(d,e) { d=+d;e=+e; return +(d-e) } return f"))(1.1, .8), (1.1-.8)); +assertEq(asmLink(asmCompile(USE_ASM + "function f(d,e) { d=+d;e=+e; return +(d*e) } return f"))(1.1, 2.2), (1.1*2.2)); +assertEq(asmLink(asmCompile(USE_ASM + "function g() { var i=2; return (~~(i=(i+1)|0))|0 } return g"))(), 3); + +var f = asmLink(asmCompile(USE_ASM + "function f(d,e) { d=+d;e=+e; return (de)|0 } return f")); +assertEq(f(2.1, 1.1), 1); +assertEq(f(1.1, 1.1), 0); +assertEq(f(1.1, 2.1), 0); +assertEq(f(NaN, 1.1), 0); +assertEq(f(1.1, NaN), 0); +assertEq(f(NaN, NaN), 0); + +var f = asmLink(asmCompile(USE_ASM + "function f(d,e) { d=+d;e=+e; return (d>=e)|0 } return f")); +assertEq(f(2.1, 1.1), 1); +assertEq(f(1.0, 1.1), 0); +assertEq(f(1.1, 2.1), 0); +assertEq(f(NaN, 1.1), 0); +assertEq(f(1.1, NaN), 0); +assertEq(f(NaN, NaN), 0); + +var f = asmLink(asmCompile(USE_ASM + "function f(d,e) { d=+d;e=+e; return (d==e)|0 } return f")); +assertEq(f(2.1, 1.1), 0); +assertEq(f(1.1, 1.1), 1); +assertEq(f(1.1, 2.1), 0); +assertEq(f(NaN, 1.1), 0); +assertEq(f(1.1, NaN), 0); +assertEq(f(NaN, NaN), 0); + +var f = asmLink(asmCompile(USE_ASM + "function f(d,e) { d=+d;e=+e; return (d!=e)|0 } return f")); +assertEq(f(2.1, 1.1), 1); +assertEq(f(1.1, 1.1), 0); +assertEq(f(1.1, 2.1), 1); +assertEq(f(NaN, 1.1), 1); +assertEq(f(1.1, NaN), 1); +assertEq(f(NaN, NaN), 1); + +var f = asmLink(asmCompile(USE_ASM + "function f(d,e) { d=+d;e=+e; return +(d/e) } return f")); +assertEq(f(1.1, .1), (1.1/.1)); +assertEq(f(1.1, 0), (1.1/0)); +assertEq(f(1.1, -0), (1.1/-0)); + +var f = asmLink(asmCompile(USE_ASM + "function f(d,e) { d=+d;e=+e; return +(d%e) } return f")); +assertEq(f(1.1, .1), (1.1%.1)); +assertEq(f(1.1, 0), (1.1%0)); +assertEq(f(1.1, -0), (1.1%-0)); + +var f = asmLink(asmCompile(USE_ASM + "function f(d) { d=+d; var i = 0; i = ~~d; return i|0 } return f")); +assertEq(f(1.0), 1); +assertEq(f(1.9), 1); +assertEq(f(1.9999), 1); +assertEq(f(2.0), 2); +assertEq(f(Math.pow(2,40)), ~~Math.pow(2,40)); +assertEq(f(-Math.pow(2,40)), ~~-Math.pow(2,40)); +assertEq(f(4000000000), ~~4000000000); +assertEq(f(-4000000000), ~~-4000000000); +assertEq(f(NaN), 0); +assertEq(f(Infinity), 0); +assertEq(f(-Infinity), 0); + +assertAsmTypeFail(USE_ASM + "function f(i,j) { i=i|0;j=j|0; return +((i|0)/(j|0)) } return f"); +assertAsmTypeFail(USE_ASM + "function f(i,j) { i=i|0;j=j|0; return +(i+j) } return f"); +assertAsmTypeFail(USE_ASM + "function f(i,j) { i=i|0;j=j|0; return +(i-j) } return f"); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; return +(((i|0)/(j|0))|0) } return f")); +assertEq(f(1,0), 0); +assertEq(f(-Math.pow(2,31),-1), -Math.pow(2,31)); + +var f = asmLink(asmCompile(USE_ASM + "function f(i,j) { i=i|0;j=j|0; return +(((i|0)%(j|0))|0) } return f")); +assertEq(f(1,0), 0); +assertEq(f(-Math.pow(2,31),-1), 0); + +var {f,g} = asmLink(asmCompile(USE_ASM + "function f() { return 3.5 } function g(d) { d=+d; return +(d+3.5) } return {f:f,g:g}")); +assertEq(f(), 3.5); +assertEq(g(1), 1+3.5); + +var buf = new ArrayBuffer(BUF_MIN); +var f64 = new Float64Array(buf); +var i32 = new Int32Array(buf); +var u32 = new Uint32Array(buf); +var f = asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f64[0] } return f'), this, null, buf); +f64[0] = 0; +assertEq(f(), 0); +f64[0] = -1; +assertEq(f(), -1); +f64[0] = 1; +assertEq(f(), 1); +f64[0] = Infinity; +assertEq(f(), Infinity); +f64[0] = -Infinity; +assertEq(f(), -Infinity); + +function ffi(d) { str = String(d) } +var g = asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'var ffi=imp.ffi; function g() { ffi(+f64[0]) } return g'), this, {ffi:ffi}, buf); +var h = asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function g() { return +(+f64[0] < 0.0 ? -+f64[0] : +f64[0]) } return g'), this, null, buf) + +function ffi1() { return 2.6 } +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + "var ffi1=imp.ffi1; function g() { var i=0,j=0.0; i=ffi1()|0; j=+ffi1(); return +(+(i|0)+j) } return g"), null, {ffi1:ffi1})(), 2+2.6); + +// that sounds dangerous! +var a = [0,1,0xffff0000,0x7fff0000,0xfff80000,0x7ff80000,0xfffc0000,0x7ffc0000,0xffffffff,0x0000ffff,0x00008fff7]; +for (i of a) { + for (j of a) { + u32[0] = i; + u32[1] = j; + + assertEq(f(), f64[0]); + + g(); + assertEq(str, String(f64[0])); + + assertEq(h(), Math.abs(f64[0])); + } +} diff --git a/js/src/jit-test/tests/asm.js/testFunctionPtr.js b/js/src/jit-test/tests/asm.js/testFunctionPtr.js new file mode 100644 index 0000000000..9998356f04 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testFunctionPtr.js @@ -0,0 +1,74 @@ +load(libdir + "asm.js"); + +assertAsmTypeFail('imp', USE_ASM + "function f() {} var imp=[f]; return f"); +assertAsmTypeFail(USE_ASM + "function f() {} var eval=[f]; return f"); +assertAsmTypeFail(USE_ASM + "var tbl=0; function f() {} var tbl=[f]; return f"); +assertAsmTypeFail(USE_ASM + "function f() {} var tbl; return f"); +assertAsmTypeFail(USE_ASM + "function f() {} var tbl=[]; return f"); +assertAsmTypeFail(USE_ASM + "function f() {} var tbl=[f,f,f]; return f"); +assertAsmTypeFail(USE_ASM + "function f() {} var tbl=[1]; return f"); +assertAsmTypeFail(USE_ASM + "var g = 0; function f() {} var tbl=[g]; return f"); +assertAsmTypeFail(USE_ASM + "function f() {} function g(i) {i=i|0} var tbl=[f,g]; return f"); +assertAsmTypeFail(USE_ASM + "function f() {} function g() {return 0} var tbl=[f,g]; return f"); +assertAsmTypeFail(USE_ASM + "function f(i) {i=i|0} function g(i) {i=+i} var tbl=[f,g]; return f"); +assertAsmTypeFail(USE_ASM + "function f() {return 0} function g() {return 0.0} var tbl=[f,g]; return f"); +assertAsmTypeFail(USE_ASM + "var tbl=0; function g() {tbl[0&1]()|0} return g"); +assertEq(asmLink(asmCompile(USE_ASM + "function f() { return 42 } var tbl=[f]; return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 0} function g() {return 1} var tbl=[f,g]; return f"))(), 0); + +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g(i) { i=i|0; return ([])[i&1]()|0 } var tbl=[f,f]; return g"); +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g(i) { i=i|0; return f[i&1]()|0 } var tbl=[f,f]; return g"); +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g(i) { i=i|0; return tbl[i]()|0 } var tbl=[f,f]; return g"); +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g(i) { i=i|0; return tbl[i&0]()|0 } var tbl=[f,f]; return g"); +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g(i) { i=i|0; return tbl[i&3]()|0 } var tbl=[f,f]; return g"); +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g(i,j) { i=i|0;j=+j; return tbl[j&1]()|0 } var tbl=[f,f]; return g"); +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g(i) { i=i|0; return tbl[i&1](1)|0 } var tbl=[f,f]; return g"); +assertAsmTypeFail(USE_ASM + "function f(i) {i=i|0} function g(i) { i=i|0; return tbl[i&1]()|0 } var tbl=[f,f]; return g"); +assertAsmTypeFail(USE_ASM + "function f(i) {i=i|0} function g(i) { i=i|0; return tbl[i&1](3.0)|0 } var tbl=[f,f]; return g"); +assertAsmTypeFail(USE_ASM + "function f(d) {d=+d} function g(i) { i=i|0; return tbl[i&1](3)|0 } var tbl=[f,f]; return g"); +assertAsmTypeFail(USE_ASM + "function g() {tbl[0&1]()|0} return g"); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 42} function g(i) { i=i|0; return tbl[i&1]()|0 } var tbl=[f,f]; return g"))(0), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 42} function g(i) { i=i|0; return tbl[i&1]()|0 } const tbl=[f,f]; return g"))(0), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 42} function g() {return 13} function h(i) { i=i|0; return tbl[i&1]()|0 } var tbl=[f,g]; return h"))(1), 13); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 42} function g() {return 13} function h(i) { i=i|0; return tbl[i&1]()|0 } const tbl=[f,g]; return h"))(1), 13); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 42} function g() {return 13} function h(i) { i=i|0; return tbl2[i&1]()|0 } var tbl1=[f,g]; var tbl2=[g,f]; return h"))(1), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 42} function g() {return 13} function h(i) { i=i|0; return tbl2[i&1]()|0 } const tbl1=[f,g]; const tbl2=[g,f]; return h"))(1), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 42} function g() {return 13} function h(i) { i=i|0; return tbl2[i&3]()|0 } var tbl1=[f,g]; var tbl2=[g,g,g,f]; return h"))(3), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 42} function g() {return 13} function h(i) { i=i|0; return tbl2[i&3]()|0 } const tbl1=[f,g]; const tbl2=[g,g,g,f]; return h"))(3), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 42} function g() {return 13} function h(i) { i=i|0; return tbl1[i&1]()|0 } var tbl1=[f,g]; var tbl2=[g,g,g,f]; return h"))(1), 13); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 42} function g() {return 13} function h(i) { i=i|0; return tbl1[i&1]()|0 } const tbl1=[f,g]; const tbl2=[g,g,g,f]; return h"))(1), 13); +assertEq(asmLink(asmCompile(USE_ASM + "var i=0,j=0; function f() {return i|0} function g() {return j|0} function h(x) { x=x|0; i=5;j=10; return tbl2[x&3]()|0 } var tbl1=[f,g]; var tbl2=[g,g,g,f]; return h"))(3), 5); +assertEq(asmLink(asmCompile(USE_ASM + "var i=0,j=0; function f() {return i|0} function g() {return j|0} function h(x) { x=x|0; i=5;j=10; return tbl2[x&3]()|0 } const tbl1=[f,g]; const tbl2=[g,g,g,f]; return h"))(3), 5); +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + "var ffi=imp.ffi; function f() {return ffi()|0} function g() {return 13} function h(x) { x=x|0; return tbl2[x&3]()|0 } var tbl2=[g,g,g,f]; return h"), null, {ffi:function(){return 20}})(3), 20); +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + "const ffi=imp.ffi; function f() {return ffi()|0} function g() {return 13} function h(x) { x=x|0; return tbl2[x&3]()|0 } const tbl2=[g,g,g,f]; return h"), null, {ffi:function(){return 20}})(3), 20); +assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + "var ffi=imp.ffi; var i=0; function f() {return ((ffi()|0)+i)|0} function g() {return 13} function h(x) { x=x|0; i=2; return tbl2[x&3]()|0 } var tbl2=[g,g,g,f]; return h"), null, {ffi:function(){return 20}})(3), 22) +;assertEq(asmLink(asmCompile('glob', 'imp', USE_ASM + "const ffi=imp.ffi; var i=0; function f() {return ((ffi()|0)+i)|0} function g() {return 13} function h(x) { x=x|0; i=2; return tbl2[x&3]()|0 } const tbl2=[g,g,g,f]; return h"), null, {ffi:function(){return 20}})(3), 22); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) {i=i|0; return +((i+1)|0)} function g(d) { d=+d; return +(d+2.5) } function h(i,j) { i=i|0;j=j|0; return +tbl2[i&1](+tbl1[i&1](j)) } var tbl1=[f,f]; var tbl2=[g,g]; return h"))(0,10), 11+2.5); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) {i=i|0; return +((i+1)|0)} function g(d) { d=+d; return +(d+2.5) } function h(i,j) { i=i|0;j=j|0; return +tbl2[i&1](+tbl1[i&1](j)) } const tbl1=[f,f]; const tbl2=[g,g]; return h"))(0,10), 11+2.5); + +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g() { return tbl[0]()|0 } var tbl=[f]; return g"); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 42} function g() { return tbl[0&0]()|0 } var tbl=[f]; return g"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f() {return 42} function g() { return tbl[0&0]()|0 } const tbl=[f]; return g"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f1() {return 42} function f2() {return 13} function g() { return tbl[1&1]()|0 } var tbl=[f1,f2]; return g"))(), 13); +assertEq(asmLink(asmCompile(USE_ASM + "function f1() {return 42} function f2() {return 13} function g() { return tbl[1&1]()|0 } const tbl=[f1,f2]; return g"))(), 13); + +// Test some literal constant paths. +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g() { return tbl[0&4294967295]()|0 } var tbl=[f]; return g"); +assertAsmTypeFail(USE_ASM + "const i=4294967295; function f() {return 42} function g() { return tbl[0&i]()|0 } var tbl=[f]; return g"); +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g() { return tbl[0&-1]()|0 } var tbl=[f]; return g"); +assertAsmTypeFail(USE_ASM + "const i=-1; function f() {return 42} function g() { return tbl[0&i]()|0 } var tbl=[f]; return g"); +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g() { return tbl[0&0x80000000]()|0 } var tbl=[f]; return g"); +assertAsmTypeFail(USE_ASM + "const i=0x80000000; function f() {return 42} function g() { return tbl[0&i]()|0 } var tbl=[f]; return g"); +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g() { return tbl[0&-2147483648]()|0 } var tbl=[f]; return g"); +assertAsmTypeFail(USE_ASM + "const i=-2147483648; function f() {return 42} function g() { return tbl[0&i]()|0 } var tbl=[f]; return g"); +assertAsmTypeFail(USE_ASM + "const i=0; function f() {return 42} function g() { return tbl[0&i]()|0 } var tbl=[f]; return g"); +// Limited by the inability to test really large tables. +assertAsmTypeFail(USE_ASM + "function f() {return 42} function g() { return tbl[0&0x7fffffff]()|0 } var tbl=[f]; return g"); + +var f = asmLink(asmCompile(USE_ASM + "function f1(d) {d=+d; return +(d/2.0)} function f2(d) {d=+d; return +(d+10.0)} function g(i,j) { i=i|0;j=+j; return +tbl[i&1](+tbl[(i+1)&1](j)) } var tbl=[f1,f2]; return g")); +assertEq(f(0,10.2), (10.2+10)/2); +assertEq(f(1,10.2), (10.2/2)+10); + +var f = asmLink(asmCompile('glob','imp', USE_ASM + "var ffi=imp.ffi; function f(){return 13} function g(){return 42} function h(i) { i=i|0; var j=0; ffi(1); j=TBL[i&7]()|0; ffi(1.5); return j|0 } var TBL=[f,g,f,f,f,f,f,f]; return h"), null, {ffi:function(){}}); +for (var i = 0; i < 100; i++) + assertEq(f(i), (i%8 == 1) ? 42 : 13); diff --git a/js/src/jit-test/tests/asm.js/testGetter.js b/js/src/jit-test/tests/asm.js/testGetter.js new file mode 100644 index 0000000000..9a97463550 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testGetter.js @@ -0,0 +1,11 @@ +function asmJSGetter() { + "use asm"; + return {} +} +var sym = Symbol(); +var o = {}; +o.__defineGetter__(sym, asmJSGetter); + +for (var i = 0; i < 10; i++) { + o[sym]; +} diff --git a/js/src/jit-test/tests/asm.js/testGlobals.js b/js/src/jit-test/tests/asm.js/testGlobals.js new file mode 100644 index 0000000000..1e9fc3ac9c --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testGlobals.js @@ -0,0 +1,164 @@ +load(libdir + "asm.js"); +load(libdir + "asserts.js"); + +assertAsmTypeFail(USE_ASM + "var i; function f(){} return f"); +assertEq(asmLink(asmCompile(USE_ASM + "var i=0; function f(){} return f"))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + "const i=0; function f(){} return f"))(), undefined); +assertEq(asmLink(asmCompile(USE_ASM + "var i=42; function f(){ return i|0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "const i=42; function f(){ return i|0 } return f"))(), 42); +assertEq(asmLink(asmCompile(USE_ASM + "var i=4.2; function f(){ return +i } return f"))(), 4.2); +assertEq(asmLink(asmCompile(USE_ASM + "const i=4.2; function f(){ return +i } return f"))(), 4.2); +assertAsmTypeFail(USE_ASM + "var i=42; function f(){ return +(i+.1) } return f"); +assertAsmTypeFail(USE_ASM + "const i=42; function f(){ return +(i+.1) } return f"); +assertAsmTypeFail(USE_ASM + "var i=1.2; function f(){ return i|0 } return f"); +assertAsmTypeFail(USE_ASM + "const i=1.2; function f(){ return i|0 } return f"); +assertAsmTypeFail(USE_ASM + "var i=0; function f(e){ e=+e; i=e } return f"); +assertAsmTypeFail(USE_ASM + "var d=0.1; function f(i){ i=i|0; d=i } return f"); +assertEq(asmLink(asmCompile(USE_ASM + "var i=13; function f(j) { j=j|0; i=j; return i|0 } return f"))(42), 42); +assertEq(asmLink(asmCompile(USE_ASM + "var d=.1; function f(e) { e=+e; d=e; return +e } return f"))(42.1), 42.1); +assertEq(asmLink(asmCompile(USE_ASM + "var i=13; function f(i, j) { i=i|0; j=j|0; i=j; return i|0 } return f"))(42,43), 43); +assertEq(asmLink(asmCompile(USE_ASM + "var i=13; function f(j) { j=j|0; var i=0; i=j; return i|0 } return f"))(42), 42); + +var f = asmLink(asmCompile(USE_ASM + "var i=13; function f(j) { j=j|0; if ((j|0) != -1) { i=j } else { return i|0 } return 0 } return f")); +assertEq(f(-1), 13); +assertEq(f(42), 0); +assertEq(f(-1), 42); + +assertAsmTypeFail(USE_ASM + "var i=13; function f() { var j=i; return j|0 } return f"); +assertAsmTypeFail(USE_ASM + "var i=13.37; function f() { var j=i; return +j } return f"); +assertAsmTypeFail('global', USE_ASM + "var f32 = global.Math.fround; var i=f32(13.37); function f() { var j=i; return f32(j) } return f"); + +assertEq(asmLink(asmCompile('global', USE_ASM + 'var i=global.Infinity; function f() { var j=i; return +j } return f'), {Infinity:Infinity})(), Infinity); +assertEq(asmLink(asmCompile('global', USE_ASM + 'var i=global.NaN; function f() { var j=i; return +j } return f'), {NaN:NaN})(), NaN); + +assertEq(asmLink(asmCompile(USE_ASM + "const i=13; function f() { var j=i; return j|0 } return f"))(), 13); +assertEq(asmLink(asmCompile(USE_ASM + "const i=13.37; function f() { var j=i; return +j } return f"))(), 13.37); +assertEq(asmLink(asmCompile('global', USE_ASM + "var f32 = global.Math.fround; const i=f32(13.37); function f() { var j=i; return f32(j) } return f"), this)(), Math.fround(13.37)); + +assertAsmTypeFail(USE_ASM + "function f() { var j=i; return j|0 } return f"); +assertAsmTypeFail(USE_ASM + "function i(){} function f() { var j=i; return j|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f() { var j=i; return j|0 } var i = [f]; return f"); +assertAsmTypeFail('global', USE_ASM + "var i=global.Math.fround; function f() { var j=i; return j|0 } return f"); +assertAsmTypeFail('global', 'imp', USE_ASM + "var i=imp.f; function f() { var j=i; return j|0 } return f"); +assertAsmTypeFail('global', 'imp', USE_ASM + "var i=imp.i|0; function f() { var j=i; return j|0 } return f"); +assertAsmTypeFail('global', 'imp', USE_ASM + "var i=+imp.i; function f() { var j=i; return +j } return f"); +assertAsmTypeFail('global', 'imp', USE_ASM + "const i=imp.i|0; function f() { var j=i; return j|0 } return f"); +assertAsmTypeFail('global', 'imp', USE_ASM + "const i=+imp.i; function f() { var j=i; return +j } return f"); +assertAsmTypeFail('global', 'imp', 'heap', USE_ASM + "var i=new global.Float32Array(heap); function f() { var j=i; return +j } return f"); + +assertAsmTypeFail('global', USE_ASM + "var i=global; function f() { return i|0 } return f"); +assertAsmTypeFail('global', USE_ASM + "const i=global; function f() { return i|0 } return f"); +assertAsmTypeFail('global', USE_ASM + "var i=global|0; function f() { return i|0 } return f"); +assertAsmTypeFail('global', USE_ASM + "const i=global|0; function f() { return i|0 } return f"); +assertAsmTypeFail('global', USE_ASM + "var j=0;var i=j.i|0; function f() { return i|0 } return f"); +assertAsmTypeFail('global', USE_ASM + "var i=global.i|0; function f() { return i|0 } return f"); +assertAsmTypeFail('global', USE_ASM + "const i=global.i|0; function f() { return i|0 } return f"); +assertAsmTypeFail('global', USE_ASM + "var i=global.i|0; function f() { return i|0 } return f"); +assertAsmTypeFail('global', USE_ASM + 'var i=global.Infinity; function f() { i = 0.0 } return f'); +assertAsmLinkAlwaysFail(asmCompile('global', USE_ASM + 'var i=global.Infinity; function f() { return +i } return f'), undefined); +assertAsmLinkAlwaysFail(asmCompile('global', USE_ASM + 'const i=global.Infinity; function f() { return +i } return f'), undefined); +assertAsmLinkAlwaysFail(asmCompile('global', USE_ASM + 'var i=global.Infinity; function f() { return +i } return f'), null); +assertAsmLinkAlwaysFail(asmCompile('global', USE_ASM + 'const i=global.Infinity; function f() { return +i } return f'), null); +assertAsmLinkFail(asmCompile('global', USE_ASM + 'var i=global.Infinity; function f() { return +i } return f'), 3); +assertAsmLinkFail(asmCompile('global', USE_ASM + 'var i=global.Infinity; function f() { return +i } return f'), {}); +assertAsmLinkFail(asmCompile('global', USE_ASM + 'var i=global.Infinity; function f() { return +i } return f'), {Infinity:NaN}); +assertAsmLinkFail(asmCompile('global', USE_ASM + 'var i=global.Infinity; function f() { return +i } return f'), {Infinity:-Infinity}); +assertEq(asmLink(asmCompile('global', USE_ASM + 'var i=global.Infinity; function f() { return +i } return f'), {Infinity:Infinity})(), Infinity); +assertEq(asmLink(asmCompile('global', USE_ASM + 'const i=global.Infinity; function f() { return +i } return f'), {Infinity:Infinity})(), Infinity); +assertEq(asmLink(asmCompile('global', USE_ASM + 'var i=global.Infinity; function f() { return +i } return f'), this)(), Infinity); +assertEq(asmLink(asmCompile('global', USE_ASM + 'const i=global.Infinity; function f() { return +i } return f'), this)(), Infinity); +assertAsmLinkAlwaysFail(asmCompile('global', USE_ASM + 'var i=global.NaN; function f() { return +i } return f'), undefined); +assertAsmLinkAlwaysFail(asmCompile('global', USE_ASM + 'var i=global.NaN; function f() { return +i } return f'), null); +assertAsmLinkFail(asmCompile('global', USE_ASM + 'var i=global.NaN; function f() { return +i } return f'), 3); +assertAsmLinkFail(asmCompile('global', USE_ASM + 'var i=global.NaN; function f() { return +i } return f'), {}); +assertAsmLinkFail(asmCompile('global', USE_ASM + 'var i=global.NaN; function f() { return +i } return f'), {Infinity:Infinity}); +assertAsmLinkFail(asmCompile('global', USE_ASM + 'var i=global.NaN; function f() { return +i } return f'), {Infinity:-Infinity}); +assertEq(asmLink(asmCompile('global', USE_ASM + 'var i=global.NaN; function f() { return +i } return f'), {NaN:NaN})(), NaN); +assertEq(asmLink(asmCompile('global', USE_ASM + 'const i=global.NaN; function f() { return +i } return f'), {NaN:NaN})(), NaN); +assertEq(asmLink(asmCompile('global', USE_ASM + 'var i=global.NaN; function f() { return +i } return f'), this)(), NaN); +assertEq(asmLink(asmCompile('global', USE_ASM + 'const i=global.NaN; function f() { return +i } return f'), this)(), NaN); + +assertAsmLinkFail(asmCompile('glob','foreign','buf', USE_ASM + 'var t = new glob.Int32Array(buf); function f() {} return f'), {get Int32Array(){return Int32Array}}, null, new ArrayBuffer(4096)) +assertAsmLinkFail(asmCompile('glob','foreign','buf', USE_ASM + 'const t = new glob.Int32Array(buf); function f() {} return f'), {get Int32Array(){return Int32Array}}, null, new ArrayBuffer(4096)) +assertAsmLinkFail(asmCompile('glob','foreign','buf', USE_ASM + 'var t = new glob.Int32Array(buf); function f() {} return f'), new Proxy(this, {}), null, new ArrayBuffer(4096)) +assertAsmLinkFail(asmCompile('glob','foreign','buf', USE_ASM + 'const t = new glob.Int32Array(buf); function f() {} return f'), new Proxy(this, {}), null, new ArrayBuffer(4096)) +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var t = glob.Math.sin; function f() {} return f'), {get Math(){return Math}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var t = glob.Math.sin; function f() {} return f'), new Proxy(this, {})); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var t = glob.Math.sin; function f() {} return f'), {Math:{get sin(){return Math.sin}}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var t = glob.Math.sin; function f() {} return f'), {Math:new Proxy(Math, {})}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var t = glob.Infinity; function f() {} return f'), {get Infinity(){return Infinity}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var t = glob.Infinity; function f() {} return f'), new Proxy(this, {})); +assertAsmLinkFail(asmCompile('glob','foreign', USE_ASM + 'var i = foreign.x|0; function f() {} return f'), null, {get x(){return 42}}) +assertAsmLinkFail(asmCompile('glob','foreign', USE_ASM + 'var i = +foreign.x; function f() {} return f'), null, {get x(){return 42}}) +assertAsmLinkFail(asmCompile('glob','foreign', USE_ASM + 'var i = foreign.x|0; function f() {} return f'), null, new Proxy({x:42}, {})); +assertAsmLinkFail(asmCompile('glob','foreign', USE_ASM + 'var i = +foreign.x; function f() {} return f'), null, new Proxy({x:42}, {})); +assertAsmLinkFail(asmCompile('glob','foreign', USE_ASM + 'var i = foreign.x; function f() {} return f'), null, {get x(){return function(){}}}) +assertAsmLinkFail(asmCompile('glob','foreign', USE_ASM + 'var i = foreign.x; function f() {} return f'), null, new Proxy({x:function(){}}, {})); +assertAsmTypeFail('global', 'imp', USE_ASM + "var i=imp; function f() { return i|0 } return f"); +assertAsmTypeFail('global', 'imp', USE_ASM + "var j=0;var i=j.i|0; function f() { return i|0 } return f"); +assertAsmLinkAlwaysFail(asmCompile('global','imp', USE_ASM + "var i=imp.i|0; function f() { return i|0 } return f"), null, undefined); +assertAsmLinkAlwaysFail(asmCompile('global','imp', USE_ASM + "var i=imp.i|0; function f() { return i|0 } return f"), this, undefined); +assertAsmLinkAlwaysFail(asmCompile('global', 'imp', USE_ASM + "var i=imp.i|0; function f() { return i|0 } return f"), null, null); +assertAsmLinkAlwaysFail(asmCompile('global', 'imp', USE_ASM + "var i=imp.i|0; function f() { return i|0 } return f"), this, null); +assertAsmLinkFail(asmCompile('global', 'imp', USE_ASM + "var i=imp.i|0; function f() { return i|0 } return f"), this, 42); +assertEq(asmLink(asmCompile('global', 'imp', USE_ASM + "var i=imp.i|0; function f() { return i|0 } return f")(null, {i:42})), 42); +assertEq(asmLink(asmCompile('global', 'imp', USE_ASM + "const i=imp.i|0; function f() { return i|0 } return f")(null, {i:42})), 42); +assertEq(asmLink(asmCompile('global', 'imp', USE_ASM + "var i=imp.i|0; function f() { return i|0 } return f")(null, {i:1.4})), 1); +assertEq(asmLink(asmCompile('global', 'imp', USE_ASM + "const i=imp.i|0; function f() { return i|0 } return f")(null, {i:1.4})), 1); +assertEq(asmLink(asmCompile('global', 'imp', USE_ASM + "var i=+imp.i; function f() { return +i } return f")(null, {i:42})), 42); +assertEq(asmLink(asmCompile('global', 'imp', USE_ASM + "const i=+imp.i; function f() { return +i } return f")(null, {i:42})), 42); +assertEq(asmLink(asmCompile('global', 'imp', USE_ASM + "var i=+imp.i; function f() { return +i } return f")(this, {i:1.4})), 1.4); +assertEq(asmLink(asmCompile('global', 'imp', USE_ASM + "const i=+imp.i; function f() { return +i } return f")(this, {i:1.4})), 1.4); +assertEq(asmLink(asmCompile(USE_ASM + "var g=0; function f() { var i=42; while (1) { break; } g = i; return g|0 } return f"))(), 42); +assertAsmLinkFail(asmCompile('glob','foreign', USE_ASM + 'var i = +foreign.x; function f() {} return f'), null, {x:{valueOf:function() { return 42 }}}); +assertAsmLinkFail(asmCompile('glob','foreign', USE_ASM + 'var i = foreign.x|0; function f() {} return f'), null, {x:{valueOf:function() { return 42 }}}); +assertEq(asmLink(asmCompile('glob','foreign', USE_ASM + 'var i = foreign.x|0; function f() { return i|0} return f'), null, {x:"blah"})(), 0); +assertEq(asmLink(asmCompile('glob','foreign', USE_ASM + 'var i = +foreign.x; function f() { return +i} return f'), null, {x:"blah"})(), NaN); +assertEq(asmLink(asmCompile('glob','foreign', USE_ASM + 'var tof = glob.Math.fround; var i = tof(foreign.x); function f() { return +i} return f'), this, {x:"blah"})(), NaN); +assertThrowsInstanceOf(() => asmCompile('glob','foreign',USE_ASM + 'var i = foreign.x|0; function f() { return i|0} return f')(null, {x:Symbol("blah")}), TypeError); +assertThrowsInstanceOf(() => asmCompile('glob','foreign',USE_ASM + 'var i = +foreign.x; function f() { return +i} return f')(null, {x:Symbol("blah")}), TypeError); +assertThrowsInstanceOf(() => asmCompile('glob','foreign',USE_ASM + 'var tof = glob.Math.fround; var i = tof(foreign.x); function f() { return +i} return f')(this, {x:Symbol("blah")}), TypeError); + +// Temporary workaround; this test can be removed when Emscripten is fixed and +// the fix has propagated out to most apps: +assertEq(asmLink(asmCompile('glob','foreign', USE_ASM + 'var i = foreign.i|0; function f() { return i|0} return f'), null, {i:function(){}})(), 0); +assertEq(asmLink(asmCompile('glob','foreign', USE_ASM + 'var i = +foreign.i; function f() { return +i} return f'), null, {i:function(){}})(), NaN); +assertEq(asmLink(asmCompile('glob','foreign', USE_ASM + 'var tof = glob.Math.fround; var i = tof(foreign.i); function f() { return +i} return f'), this, {i:function(){}})(), NaN); +var module = asmCompile('glob','foreign', USE_ASM + 'var i = foreign.i|0; function f() { return i|0} return f'); +var fun = function() {} +fun.valueOf = function() {} +assertAsmLinkFail(module, null, {i:fun}); +var fun = function() {} +fun.toString = function() {} +assertAsmLinkFail(module, null, {i:fun}); +var fun = function() {} +var origFunToString = Function.prototype.toString; +Function.prototype.toString = function() {} +assertAsmLinkFail(module, null, {i:fun}); +Function.prototype.toString = origFunToString; +assertEq(asmLink(module, null, {i:fun})(), 0); +Function.prototype.valueOf = function() {} +assertAsmLinkFail(module, null, {i:fun}); +delete Function.prototype.valueOf; +assertEq(asmLink(module, null, {i:fun})(), 0); +var origObjValueOf = Object.prototype.valueOf; +Object.prototype.valueOf = function() {} +assertAsmLinkFail(module, null, {i:fun}); +Object.prototype.valueOf = origObjValueOf; +assertEq(asmLink(module, null, {i:fun})(), 0); +Object.prototype.toString = function() {} +assertEq(asmLink(module, null, {i:fun})(), 0); + +var f1 = asmCompile('global', 'foreign', 'heap', USE_ASM + 'var i32 = new global.Int32Array(heap); function g() { return i32[4]|0 } return g'); +var global = this; +var ab = new ArrayBuffer(4096); +var p = new Proxy(global, + {has:function(name) { f1(global, null, ab); return true}, + getOwnPropertyDescriptor:function(name) { return {configurable:true, value:Int32Array}}}); +new Int32Array(ab)[4] = 42; +assertEq(f1(p, null, ab)(), 42); + +// GVN checks +assertEq(asmLink(asmCompile(USE_ASM + "var g=0; function f() { var x = 0; g = 1; x = g; return (x+g)|0 } return f"))(), 2); +assertEq(asmLink(asmCompile(USE_ASM + "var g=0; function f() { var x = 0; g = 1; x = g; g = 2; return (x+g)|0 } return f"))(), 3); +assertEq(asmLink(asmCompile(USE_ASM + "var g=0; var h=0; function f() { var x = 0; g = 1; x = g; h = 3; return (x+g)|0 } return f"))(), 2); diff --git a/js/src/jit-test/tests/asm.js/testHeapAccess.js b/js/src/jit-test/tests/asm.js/testHeapAccess.js new file mode 100644 index 0000000000..6a7f7f5fa0 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testHeapAccess.js @@ -0,0 +1,511 @@ +load(libdir + "asm.js"); + +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i32[0>>2] = 4.0; return i32[0>>2]|0; } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f32[0>>2] = 4; return +f32[0>>2]; } return f'); + +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { var x=0,y=0; return i8[x+y]|0 } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { var x=0,y=0; return u8[x+y]|0 } return f'); + +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return i32[0>>0]|0 }; return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return i32[0>>1]|0 }; return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return i32[0>>4]|0 }; return f'); +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return i32[0]|0 }; return f'), this, null, new ArrayBuffer(BUF_MIN))(), 0); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i = i32[i>>2]|0; return i|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0), 0); + +// In order to allow following tests work on both big-endian and little- +// endian architectures we need to define least significant byte (lsb) and +// least significant word (lsw). +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i8[0]|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +var lsb=0; +var lsw=0 +if (f(0x12345678) == 0x12) { + lsb=3; + lsw=1; +} + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i8[' + lsb + ']|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0),0); +assertEq(f(0x7f),0x7f); +assertEq(f(0xff),-1); +assertEq(f(0x100),0); + +{ + var buf = new ArrayBuffer(BUF_MIN); + var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + '/* not a clone */ function f(i) {i=i|0; i32[0] = i; return i8[' + lsb + ']|0}; return f'); + var f = asmLink(code, this, null, buf); + assertEq(f(0),0); + assertEq(f(0x7f),0x7f); + assertEq(f(0xff),-1); + assertEq(f(0x100),0); + + // Bug 1088655 + assertEq(asmLink(asmCompile('stdlib', 'foreign', 'heap', USE_ASM + 'var i32=new stdlib.Int32Array(heap); function f(i) {i=i|0;var j=0x10000;return (i32[j>>2] = i)|0 } return f'), this, null, buf)(1), 1); +} + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u8[' + lsb + ']|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0),0); +assertEq(f(0x7f),0x7f); +assertEq(f(0xff),0xff); +assertEq(f(0x100),0); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i16[' + lsw + ']|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0),0); +assertEq(f(0x7fff),0x7fff); +assertEq(f(0xffff),-1); +assertEq(f(0x10000),0); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u16[' + lsw + ']|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0),0); +assertEq(f(0x7fff),0x7fff); +assertEq(f(0xffff),0xffff); +assertEq(f(0x10000),0); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i32[0]|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0),0); +assertEq(f(0x7fffffff),0x7fffffff); +assertEq(f(0xffffffff),-1); +assertEq(f(0x100000000),0); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u32[0]|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0),0); +assertEq(f(0x7fffffff),0x7fffffff); +assertEq(f(0xffffffff),-1); +assertEq(f(0x100000000),0); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i8[' + lsb + ']|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0),0); +assertEq(f(0x7f),0x7f); +assertEq(f(0xff),-1); +assertEq(f(0x100),0); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u8[' + lsb + ']|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0),0); +assertEq(f(0x7f),0x7f); +assertEq(f(0xff),0xff); +assertEq(f(0x100),0); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i8[0] = i; return i8[0]|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0),0); +assertEq(f(0x7f),0x7f); +assertEq(f(0xff),-1); +assertEq(f(0x100),0); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i8[0] = i; return u8[0]|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0),0); +assertEq(f(0x7f),0x7f); +assertEq(f(0xff),0xff); +assertEq(f(0x100),0); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i,j) {i=i|0;j=+j; f64[i>>3] = j; return (~~+f64[i>>3])|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0, 1.3), 1); +assertEq(f(BUF_MIN-8, 2.5), 2); +assertEq(f(BUF_MIN, 3.8), 0); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i,j) {i=i|0;j=+j; f64[i>>3] = j; return (~~f64[i>>3])|0}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0, 1.3), 1); +assertEq(f(BUF_MIN-8, 2.5), 2); +assertEq(f(BUF_MIN, 3.8), 0); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i,j) {i=i|0;j=+j; f64[i>>3] = j; return +f64[i>>3]}; return f'); +var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); +assertEq(f(0, 1.3), 1.3); +assertEq(f(BUF_MIN-8, 2.5), 2.5); +assertEq(f(BUF_MIN, 3.8), NaN); + +var i32 = new Int32Array(BUF_MIN); +i32[0] = 42; +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i32[1] = i32[0] }; return f'), this, null, i32.buffer)(); +assertEq(i32[1], 42); + +var f64 = new Float64Array(BUF_MIN); +f64[0] = 42; +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f64[1] = f64[0] }; return f'), this, null, f64.buffer)(); +assertEq(f64[1], 42); + +var i32 = new Int32Array(BUF_MIN/4); +i32[0] = 13; +i32[1] = 0xfffeeee; +var f = asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; return i32[((i<<2)+1)>>2]|0 }; return f'), this, null, i32.buffer); +assertEq(f(0), 13); +assertEq(f(1), 0xfffeeee); +var f = asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; return i32[((i<<2)+2)>>2]|0 }; return f'), this, null, i32.buffer); +assertEq(f(0), 13); +assertEq(f(1), 0xfffeeee); +var f = asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; return i32[(i<<1)>>2]|0 }; return f'), this, null, i32.buffer); +assertEq(f(0), 13); +assertEq(f(1), 13); +assertEq(f(2), 0xfffeeee); +assertEq(f(3), 0xfffeeee); + +var f = asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; return i32[(i<<2)>>2]|0 }; return f'), this, null, i32.buffer); +assertEq(f(0), 13); +assertEq(f(1), 0xfffeeee); + +var f = asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; return i32[((i<<2)+4)>>2]|0 }; return f'), this, null, i32.buffer); +assertEq(f(0), 0xfffeeee); + +// For legacy compatibility, test Int8/Uint8 accesses with no shift. +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u8[7&0xffff] = 41 } return f'), this, null, BUF_64KB)(); +assertEq(new Uint8Array(BUF_64KB)[7], 41); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i8[7&0xffff] = -41 } return f'), this, null, BUF_64KB)(); +assertEq(new Int8Array(BUF_64KB)[7], -41); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u8[(7&0xffff)>>0] = 41 } return f'), this, null, BUF_64KB)(); +assertEq(new Uint8Array(BUF_64KB)[7], 41); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i8[(7&0xffff)>>0] = -41 } return f'), this, null, BUF_64KB)(); +assertEq(new Int8Array(BUF_64KB)[7], -41); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u16[(6&0xffff)>>1] = 0xabc } return f'), this, null, BUF_64KB)(); +assertEq(new Uint16Array(BUF_64KB)[3], 0xabc); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i16[(6&0xffff)>>1] = -0xabc } return f'), this, null, BUF_64KB)(); +assertEq(new Int16Array(BUF_64KB)[3], -0xabc); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u32[(4&0xffff)>>2] = 0xabcde } return f'), this, null, BUF_64KB)(); +assertEq(new Uint32Array(BUF_64KB)[1], 0xabcde); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i32[(4&0xffff)>>2] = -0xabcde } return f'), this, null, BUF_64KB)(); +assertEq(new Int32Array(BUF_64KB)[1], -0xabcde); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f32[(4&0xffff)>>2] = 1.0 } return f'), this, null, BUF_64KB)(); +assertEq(new Float32Array(BUF_64KB)[1], 1.0); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f64[(8&0xffff)>>3] = 1.3 } return f'), this, null, BUF_64KB)(); +assertEq(new Float64Array(BUF_64KB)[1], 1.3); + +new Float32Array(BUF_64KB)[1] = 1.0; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f32[(4&0xffff)>>2] } return f'), this, null, BUF_64KB)(), 1.0); +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'var toFloat32 = glob.Math.fround; function f() { return toFloat32(f32[(4&0xffff)>>2]) } return f'), this, null, BUF_64KB)(), 1.0); +new Float64Array(BUF_64KB)[1] = 1.3; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f64[(8&0xffff)>>3] } return f'), this, null, BUF_64KB)(), 1.3); + +asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) { i=i|0; u8[255]; u8[i] } return f'); +// For legacy compatibility, test Int8/Uint8 accesses with no shift. +asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) { i=i|0; u8[i&0xff]; u8[255] } return f'); +asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) { i=i|0; u8[(i&0xff)>>0]; u8[255] } return f'); +asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) { i=i|0; u32[63]; u32[i>>2] } return f'); +asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) { i=i|0; u32[i>>2]; u32[63] } return f'); + +var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) { i=i|0; u32[64] } return f'); +asmLink(code, this, null, new ArrayBuffer(BUF_MIN)); + +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) { i=i|0; u32[12] = i } return f'), this, null, BUF_64KB)(11); +assertEq(new Int32Array(BUF_64KB)[12], 11); +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return u32[12]|0 } return f'), this, null, BUF_64KB)(), 11); +new Float64Array(BUF_64KB)[0] = 3.5; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +-f64[0] } return f'), this, null, BUF_64KB)(), -3.5); + +// Test constant loads. +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u8[1] = -1 } return f'), this, null, buf)(); +assertEq(new Uint8Array(buf)[0], 0); +assertEq(new Uint8Array(buf)[1], 255); +assertEq(new Uint8Array(buf)[2], 0); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u8[4095] = -1 } return f'), this, null, buf)(); +assertEq(new Uint8Array(buf)[4094], 0); +assertEq(new Uint8Array(buf)[4095], 255); +assertEq(new Uint8Array(buf)[4096], 0); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u8[4096] = -1 } return f'), this, null, buf)(); +assertEq(new Uint8Array(buf)[4095], 0); +assertEq(new Uint8Array(buf)[4096], 255); +assertEq(new Uint8Array(buf)[4097], 0); +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u8[' + BUF_MIN + '] = -1 } return f'), this, null, buf); +var buf = new ArrayBuffer(262144); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u8[258048] = -1 } return f'), this, null, buf)(); +assertEq(new Uint8Array(buf)[258047], 0); +assertEq(new Uint8Array(buf)[258048], 255); +assertEq(new Uint8Array(buf)[258049], 0); + +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i8[1] = -1 } return f'), this, null, buf)(); +assertEq(new Int8Array(buf)[0], 0); +assertEq(new Int8Array(buf)[1], -1); +assertEq(new Int8Array(buf)[2], 0); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i8[4095] = -1 } return f'), this, null, buf)(); +assertEq(new Int8Array(buf)[4094], 0); +assertEq(new Int8Array(buf)[4095], -1); +assertEq(new Int8Array(buf)[4096], 0); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i8[4096] = -1 } return f'), this, null, buf)(); +assertEq(new Int8Array(buf)[4095], 0); +assertEq(new Int8Array(buf)[4096], -1); +assertEq(new Int8Array(buf)[4097], 0); +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i8[' + BUF_MIN + '] = -1 } return f'), this, null, buf); +var buf = new ArrayBuffer(262144); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i8[258048] = -1 } return f'), this, null, buf)(); +assertEq(new Int8Array(buf)[258047], 0); +assertEq(new Int8Array(buf)[258048], -1); +assertEq(new Int8Array(buf)[258049], 0); + +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u16[1] = -1 } return f'), this, null, buf)(); +assertEq(new Uint16Array(buf)[0], 0); +assertEq(new Uint16Array(buf)[1], 65535); +assertEq(new Uint16Array(buf)[2], 0); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u16[' + (BUF_MIN/2-1) + '] = -1 } return f'), this, null, buf)(); +assertEq(new Uint16Array(buf)[BUF_MIN/2-2], 0); +assertEq(new Uint16Array(buf)[BUF_MIN/2-1], 65535); +assertEq(new Uint16Array(buf)[BUF_MIN/2], undefined); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u16[' + (BUF_MIN/4) + '] = -1 } return f'), this, null, buf)(); +assertEq(new Uint16Array(buf)[BUF_MIN/4-1], 0); +assertEq(new Uint16Array(buf)[BUF_MIN/4], 65535); +assertEq(new Uint16Array(buf)[BUF_MIN/4+1], 0); +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u16[' + (BUF_MIN/2) + '] = -1 } return f'), this, null, buf); +var buf = new ArrayBuffer(262144); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u16[126976] = -1 } return f'), this, null, buf)(); +assertEq(new Uint16Array(buf)[126975], 0); +assertEq(new Uint16Array(buf)[126976], 65535); +assertEq(new Uint16Array(buf)[126977], 0); + +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i16[1] = -1 } return f'), this, null, buf)(); +assertEq(new Int16Array(buf)[0], 0); +assertEq(new Int16Array(buf)[1], -1); +assertEq(new Int16Array(buf)[2], 0); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i16[' + (BUF_MIN/2-1) + '] = -1 } return f'), this, null, buf)(); +assertEq(new Int16Array(buf)[BUF_MIN/2-2], 0); +assertEq(new Int16Array(buf)[BUF_MIN/2-1], -1); +assertEq(new Int16Array(buf)[BUF_MIN/2], undefined); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i16[' + (BUF_MIN/4) + '] = -1 } return f'), this, null, buf)(); +assertEq(new Int16Array(buf)[BUF_MIN/4-1], 0); +assertEq(new Int16Array(buf)[BUF_MIN/4], -1); +assertEq(new Int16Array(buf)[BUF_MIN/4+1], 0); +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i16[' + (BUF_MIN/2) + '] = -1 } return f'), this, null, buf); +var buf = new ArrayBuffer(262144); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i16[126976] = -1 } return f'), this, null, buf)(); +assertEq(new Int16Array(buf)[126975], 0); +assertEq(new Int16Array(buf)[126976], -1); +assertEq(new Int16Array(buf)[126977], 0); + +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u32[1] = -1 } return f'), this, null, buf)(); +assertEq(new Uint32Array(buf)[0], 0); +assertEq(new Uint32Array(buf)[1], 4294967295); +assertEq(new Uint32Array(buf)[2], 0); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u32[' + (BUF_MIN/4-1) + '] = -1 } return f'), this, null, buf)(); +assertEq(new Uint32Array(buf)[BUF_MIN/4-2], 0); +assertEq(new Uint32Array(buf)[BUF_MIN/4-1], 4294967295); +assertEq(new Uint32Array(buf)[BUF_MIN/4], undefined); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u32[' + (BUF_MIN/8) + '] = -1 } return f'), this, null, buf)(); +assertEq(new Uint32Array(buf)[BUF_MIN/8-1], 0); +assertEq(new Uint32Array(buf)[BUF_MIN/8], 4294967295); +assertEq(new Uint32Array(buf)[BUF_MIN/8+1], 0); +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u32[' + (BUF_MIN/4) + '] = -1 } return f'), this, null, buf); +var buf = new ArrayBuffer(262144); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u32[61440] = -1 } return f'), this, null, buf)(); +assertEq(new Uint32Array(buf)[61439], 0); +assertEq(new Uint32Array(buf)[61440], 4294967295); +assertEq(new Uint32Array(buf)[61441], 0); + +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i32[1] = -1 } return f'), this, null, buf)(); +assertEq(new Int32Array(buf)[0], 0); +assertEq(new Int32Array(buf)[1], -1); +assertEq(new Int32Array(buf)[2], 0); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i32[' + (BUF_MIN/4-1) + '] = -1 } return f'), this, null, buf)(); +assertEq(new Int32Array(buf)[BUF_MIN/4-2], 0); +assertEq(new Int32Array(buf)[BUF_MIN/4-1], -1); +assertEq(new Int32Array(buf)[BUF_MIN/4], undefined); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i32[' + (BUF_MIN/8) + '] = -1 } return f'), this, null, buf)(); +assertEq(new Int32Array(buf)[BUF_MIN/8-1], 0); +assertEq(new Int32Array(buf)[BUF_MIN/8], -1); +assertEq(new Int32Array(buf)[BUF_MIN/8+1], 0); +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i32[' + (BUF_MIN/4) + '] = -1 } return f'), this, null, buf); +var buf = new ArrayBuffer(262144); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i32[61440] = -1 } return f'), this, null, buf)(); +assertEq(new Int32Array(buf)[61439], 0); +assertEq(new Int32Array(buf)[61440], -1); +assertEq(new Int32Array(buf)[61441], 0); + +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f32[1] = -1.0 } return f'), this, null, buf)(); +assertEq(new Int32Array(buf)[0], 0); +assertEq(new Float32Array(buf)[1], -1.0); +assertEq(new Int32Array(buf)[2], 0); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f32[' + (BUF_MIN/4-1) + '] = -1.0 } return f'), this, null, buf)(); +assertEq(new Int32Array(buf)[BUF_MIN/4-2], 0); +assertEq(new Float32Array(buf)[BUF_MIN/4-1], -1.0); +assertEq(new Int32Array(buf)[BUF_MIN/4], undefined); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f32[' + (BUF_MIN/8) + '] = -1.0 } return f'), this, null, buf)(); +assertEq(new Int32Array(buf)[BUF_MIN/8-1], 0); +assertEq(new Float32Array(buf)[BUF_MIN/8], -1.0); +assertEq(new Int32Array(buf)[BUF_MIN/8+1], 0); +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f32[' + (BUF_MIN/4) + '] = -1.0 } return f'), this, null, buf); +var buf = new ArrayBuffer(262144); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f32[61440] = -1.0 } return f'), this, null, buf)(); +assertEq(new Float32Array(buf)[61439], 0.0); +assertEq(new Float32Array(buf)[61440], -1.0); +assertEq(new Float32Array(buf)[61441], 0.0); + +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f64[1] = -1.0 } return f'), this, null, buf)(); +assertEq(new Float64Array(buf)[0], 0.0); +assertEq(new Float64Array(buf)[1], -1.0); +assertEq(new Float64Array(buf)[2], 0.0); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f64[' + (BUF_MIN/8-1) + '] = -1.0 } return f'), this, null, buf)(); +assertEq(new Float64Array(buf)[BUF_MIN/8-2], 0.0); +assertEq(new Float64Array(buf)[BUF_MIN/8-1], -1.0); +assertEq(new Float64Array(buf)[BUF_MIN/8], undefined); +var buf = new ArrayBuffer(BUF_MIN); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f64[' + (BUF_MIN/16) + '] = -1.0 } return f'), this, null, buf)(); +assertEq(new Float64Array(buf)[BUF_MIN/16-1], 0.0); +assertEq(new Float64Array(buf)[BUF_MIN/16], -1.0); +assertEq(new Float64Array(buf)[BUF_MIN/16+1], 0.0); +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f64[' + (BUF_MIN/8) + '] = -1.0 } return f'), this, null, buf); +var buf = new ArrayBuffer(262144); +asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f64[28672] = -1.0 } return f'), this, null, buf)(); +assertEq(new Float64Array(buf)[28671], 0.0); +assertEq(new Float64Array(buf)[28672], -1.0); +assertEq(new Float64Array(buf)[28673], 0.0); + + +var buf = new ArrayBuffer(BUF_MIN); +new Uint8Array(buf)[1] = -1; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return u8[1]|0; } return f'), this, null, buf)(),255); +new Int8Array(buf)[1] = -1; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return i8[1]|0; } return f'), this, null, buf)(),-1); +var buf = new ArrayBuffer(262144); +new Uint8Array(buf)[126976] = -1; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return u8[126976]|0; } return f'), this, null, buf)(),255); +new Int8Array(buf)[126976] = -1; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return i8[126976]|0; } return f'), this, null, buf)(),-1); + +var buf = new ArrayBuffer(BUF_MIN); +new Uint16Array(buf)[1] = -1; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return u16[1]|0; } return f'), this, null, buf)(),65535); +new Int16Array(buf)[1] = -1; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return i16[1]|0; } return f'), this, null, buf)(),-1); +var buf = new ArrayBuffer(262144); +new Uint16Array(buf)[126976] = -1; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return u16[126976]|0; } return f'), this, null, buf)(),65535); +new Int16Array(buf)[126976] = -1; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return i16[126976]|0; } return f'), this, null, buf)(),-1); + +var buf = new ArrayBuffer(BUF_MIN); +new Uint32Array(buf)[1] = -1; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return u32[1]|0; } return f'), this, null, buf)(),-1); +new Int32Array(buf)[1] = -1; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return i32[1]|0; } return f'), this, null, buf)(),-1); +var buf = new ArrayBuffer(262144); +new Int32Array(buf)[61440] = -1; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return i32[61440]|0; } return f'), this, null, buf)(),-1); + +var buf = new ArrayBuffer(BUF_MIN); +new Float32Array(buf)[1] = -1.0; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f32[1]; } return f'), this, null, buf)(),-1.0); +new Float32Array(buf)[BUF_MIN/4-1] = -1.0; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f32[' + (BUF_MIN/4-1) + ']; } return f'), this, null, buf)(),-1.0); +new Float32Array(buf)[BUF_MIN/8] = -1.0; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f32[' + (BUF_MIN/8) + ']; } return f'), this, null, buf)(),-1.0); +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f32[' + (BUF_MIN/4) + ']; } return f'), this, null, buf); +var buf = new ArrayBuffer(262144); +new Float32Array(buf)[61440] = -1.0; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f32[61440]; } return f'), this, null, buf)(),-1.0); + +var buf = new ArrayBuffer(BUF_MIN); +new Float64Array(buf)[1] = -1.0; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f64[1]; } return f'), this, null, buf)(),-1.0); +new Float64Array(buf)[BUF_MIN/8-1] = -1.0; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f64[' + (BUF_MIN/8-1) + ']; } return f'), this, null, buf)(),-1.0); +new Float64Array(buf)[BUF_MIN/16] = -1.0; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f64[' + (BUF_MIN/16) + ']; } return f'), this, null, buf)(),-1.0); +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f64[' + (BUF_MIN/8) + ']; } return f'), this, null, buf); +var buf = new ArrayBuffer(262144); +new Float64Array(buf)[28672] = -1.0; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +f64[28672]; } return f'), this, null, buf)(),-1.0); + +// Bug 913867 +var buf = new ArrayBuffer(BUF_MIN); +new Int32Array(buf)[0] = 0x55aa5a5a; +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f1() { i32[0] = 1; return 8; }; function f() { return i32[((f1()|0)&0)>>2]|0; } return f'), this, null, buf)(),1); +assertEq(new Int32Array(buf)[0], 1); + +// Bug 882012 +assertEq(asmLink(asmCompile('stdlib', 'foreign', 'heap', USE_ASM + "var id=foreign.id;var doubles=new stdlib.Float64Array(heap);function g(){doubles[0]=+id(2.0);return +doubles[0];}return g"), this, {id: function(x){return x;}}, BUF_64KB)(), 2.0); + +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return u8[4294967295]|0; } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'const i=4294967295; function f() { return u8[i]|0; } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return u8[-1]|0; } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'const i=-1; function f() { return u8[i]|0; } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return u8[0x80000000]|0; } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'const i=0x80000000; function f() { return u8[i]|0; } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return u8[-2147483648]|0; } return f'); +assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'const i=-2147483648; function f() { return u8[i]|0; } return f'); + +// GVN checks +var buf = new ArrayBuffer(BUF_MIN); +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'var i=0; function f() { var x = 0, y = 0; u8[0] = 1; u8[1] = 2; x = 0|u8[i]; i = x; y = 0|u8[i]; return y|0;} return f'), this, null, buf)(),2); +assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'var i=0; function f() { var x = 0, y = 0; u8[0] = 1; u8[1] = 2; x = 0|u8[i]; y = 0|u8[i]; return (x+y)|0;} return f'), this, null, buf)(),2); + +// Heap length constraints +var m = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) { i=i|0; return u8[i]|0; } return f'); +assertAsmLinkAlwaysFail(m, this, null, new ArrayBuffer(0xffff)); +assertEq(asmLink(m, this, null, new ArrayBuffer(0x10000))(0),0); +assertAsmLinkFail(m, this, null, new ArrayBuffer(0x10010)); +assertEq(asmLink(m, this, null, new ArrayBuffer(0x20000))(0),0); +assertAsmLinkFail(m, this, null, new ArrayBuffer(0xfe0000)); +assertAsmLinkFail(m, this, null, new ArrayBuffer(0xfe0010)); +assertAsmLinkFail(m, this, null, new ArrayBuffer(0xfe0000)); +assertAsmLinkFail(m, this, null, new ArrayBuffer(0xff8000)); +var buf = new ArrayBuffer(0x100000); +new Uint8Array(buf)[0x4242] = 0xAA; +var f = asmLink(m, this, null, buf); +assertEq(f(0),0); +assertEq(f(0x4242),0xAA); +assertEq(f(0x100000),0); +assertAsmLinkFail(m, this, null, new ArrayBuffer(0x104000)); +assertEq(asmLink(m, this, null, new ArrayBuffer(0x200000))(0),0); +assertAsmLinkFail(m, this, null, new ArrayBuffer(0x3f8000)); +assertAsmLinkFail(m, this, null, new ArrayBuffer(0x3fe000)); +assertAsmLinkFail(m, this, null, new ArrayBuffer(0x3fc000)); +assertEq(asmLink(m, this, null, new ArrayBuffer(0x400000))(0),0); +assertAsmLinkFail(m, this, null, new ArrayBuffer(0x410000)); +assertEq(asmLink(m, this, null, new ArrayBuffer(0x800000))(0),0); +var buf = new ArrayBuffer(0x1000000); +new Uint8Array(buf)[0x424242] = 0xAA; +var f = asmLink(m, this, null, buf); +assertEq(f(0),0); +assertEq(f(0x424242),0xAA); +assertEq(f(0x1000000),0); +assertEq(asmLink(m, this, null, new ArrayBuffer(0x2000000))(0),0); +assertEq(asmLink(m, this, null, new ArrayBuffer(0x3000000))(0),0); + +// Heap offsets +var asmMod = function test (glob, env, b) { + 'use asm'; + var i8 = new glob.Int8Array(b); + function f(i) { + i = i | 0; + i = i & 1; + i = (i - 0x40000)|0; + i8[0x3ffff] = 0; + return i8[(i + 0x7fffe) >> 0] | 0; + } + return f; +}; +var buffer = new ArrayBuffer(0x40000); +var asm = asmMod(this, {}, buffer); +assertEq(asm(-1),0); diff --git a/js/src/jit-test/tests/asm.js/testJumpRange.js b/js/src/jit-test/tests/asm.js/testJumpRange.js new file mode 100644 index 0000000000..a9ac854d98 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testJumpRange.js @@ -0,0 +1,28 @@ +load(libdir + "asm.js"); +load(libdir + "asserts.js"); + +var fatFunc = USE_ASM + '\n'; +// Recursion depth reduced to allow PBL with debug build (hence larger +// frames) to work. +for (var i = 0; i < 75; i++) + fatFunc += "function f" + i + "() { return ((f" + (i+1) + "()|0)+1)|0 }\n"; +fatFunc += "function f75() { return 42 }\n"; +fatFunc += "return f0"; + +for (let threshold of [0, 50, 100, 5000, -1]) { + setJitCompilerOption("jump-threshold", threshold); + + assertEq(asmCompile( + USE_ASM + ` + function h() { return ((g()|0)+2)|0 } + function g() { return ((f()|0)+1)|0 } + function f() { return 42 } + return h + `)()(), 45); + + enableGeckoProfiling(); + asmLink(asmCompile(USE_ASM + 'function f() {} function g() { f() } function h() { g() } return h'))(); + disableGeckoProfiling(); + + assertEq(asmCompile(fatFunc)()(), 117); +} diff --git a/js/src/jit-test/tests/asm.js/testLargeHeap.js b/js/src/jit-test/tests/asm.js/testLargeHeap.js new file mode 100644 index 0000000000..6ae545115d --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testLargeHeap.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !largeArrayBufferSupported() + +load(libdir + "asm.js"); + +// This is a validly structured length but it is too large for our asm.js +// implementation: for the sake of simplicity, we draw the line at 7fff_ffff (ie +// really at 7f00_0000 given constraints on the format of the address). +var buf = new ArrayBuffer(0x8000_0000); +assertAsmLinkFail(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { u8[' + BUF_MIN + '] = -1 } return f'), this, null, buf); diff --git a/js/src/jit-test/tests/asm.js/testLinkErrorAssert.js b/js/src/jit-test/tests/asm.js/testLinkErrorAssert.js new file mode 100644 index 0000000000..9084d72a26 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testLinkErrorAssert.js @@ -0,0 +1,20 @@ +// This test should not assert. + +function asmModule(g, foreign, heap) { + "use asm"; + let HEAP8 = new g.Int8Array(heap); + + function f() { return 99; } + return {f: f}; +} + +// linking error +let m = asmModule(this, 2, new ArrayBuffer(4095)); + +print(m.f()); + +// linking error +let m2 = asmModule(this, 2, new ArrayBuffer(2048)); + +print(m2.f()); + diff --git a/js/src/jit-test/tests/asm.js/testLiterals.js b/js/src/jit-test/tests/asm.js/testLiterals.js new file mode 100644 index 0000000000..1a24002af3 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testLiterals.js @@ -0,0 +1,50 @@ +load(libdir + 'asm.js'); + +assertAsmTypeFail(USE_ASM + 'function f(d) { d=+d; var e=0; e=d; return +e } return f'); +assertAsmTypeFail(USE_ASM + 'function f(d) { d=+d; var e=1e1; e=d; return +e } return f'); +assertAsmTypeFail(USE_ASM + 'function f(d) { d=+d; var e=+0; e=d; return +e } return f'); +assertEq(asmLink(asmCompile(USE_ASM + 'function f() { var e=-0; return +e } return f'))(-0), -0); +assertEq(asmLink(asmCompile(USE_ASM + 'function f() { var e=-0.0; return +e } return f'))(-0), -0); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(d) { d=+d; var e=0.0; e=d; return +e } return f'))(0.1), 0.1); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(d) { d=+d; var e=-0.0; e=d; return +e } return f'))(0.1), 0.1); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(d) { d=+d; var e=10.0; e=d; return +e } return f'))(0.1), 0.1); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(d) { d=+d; var e=-10.0; e=d; return +e } return f'))(0.1), 0.1); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(d) { d=+d; var e=1.0e2; e=d; return +e } return f'))(0.1), 0.1); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(d) { d=+d; var e=-1.0e2; e=d; return +e } return f'))(0.1), 0.1); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(d) { d=+d; var e=1.0e0; e=d; return +e } return f'))(0.1), 0.1); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(d) { d=+d; var e=-1.0e0; e=d; return +e } return f'))(0.1), 0.1); +assertEq(asmLink(asmCompile(USE_ASM + 'function f() { return 0.0 } function g() { var d=0.1; d=+f(); return +d } return g'))(), 0); +assertEq(asmLink(asmCompile(USE_ASM + 'function f() { return -0.0 } function g() { var d=0.1; d=+f(); return +d } return g'))(), -0); +assertEq(asmLink(asmCompile(USE_ASM + 'function f() { return 10.0 } function g() { var d=0.1; d=+f(); return +d } return g'))(), 10); +assertEq(asmLink(asmCompile(USE_ASM + 'function f() { return -10.0 } function g() { var d=0.1; d=+f(); return +d } return g'))(), -10.0); + +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; var j=1e10; j=i; return j|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; var j=9007199254740991e0; j=i; return j|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; var j=9007199254740992e0; j=i; return j|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; var j=9007199254740993e0; j=i; return j|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; var j=-9007199254740991e0; j=i; return j|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; var j=-9007199254740992e0; j=i; return j|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; var j=-9007199254740993e0; j=i; return j|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; var j=1e100; j=i; return j|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; var j=1e10000; j=i; return j|0 } return f"); +assertAsmTypeFail(USE_ASM + "function f(i) { i=i|0; var j=1000000000000000000; j=i; return j|0 } return f"); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; var j=1e0; j=i; return j|0 } return f"))(42), 42); +assertEq(asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; var j=1e9; j=i; return j|0 } return f"))(42), 42); + +assertAsmTypeFail(USE_ASM + 'function f() { var i=-2147483649; return i|0 } return f'); +assertAsmTypeFail(USE_ASM + 'function f() { var i=4294967296; return i|0 } return f'); +assertEq(asmLink(asmCompile(USE_ASM + 'function f() { var i=-2147483648; return i|0 } return f'))(), -2147483648); +assertEq(asmLink(asmCompile(USE_ASM + 'function f() { var i=4294967295; return i|0 } return f'))(), 4294967295|0); +assertAsmTypeFail(USE_ASM + 'function f(i) { i=i|0; return (i+-2147483649)|0 } return f'); +assertAsmTypeFail(USE_ASM + 'function f(i) { i=i|0; return (i+4294967296)|0 } return f'); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(i) { i=i|0; return (i+-2147483648)|0 } return f'))(0), -2147483648); +assertEq(asmLink(asmCompile(USE_ASM + 'function f(i) { i=i|0; return (i+4294967295)|0 } return f'))(0), 4294967295|0); + +assertAsmTypeFail(USE_ASM + 'var i=-2147483649; function f() { return i|0 } return f'); +assertAsmTypeFail(USE_ASM + 'const i=-2147483649; function f() { return i|0 } return f'); +assertAsmTypeFail(USE_ASM + 'var i=4294967296; function f() { return i|0 } return f'); +assertAsmTypeFail(USE_ASM + 'const i=4294967296; function f() { return i|0 } return f'); +assertEq(asmLink(asmCompile(USE_ASM + 'var i=-2147483648; function f() { return i|0 } return f'))(), -2147483648); +assertEq(asmLink(asmCompile(USE_ASM + 'const i=-2147483648; function f() { return i|0 } return f'))(), -2147483648); +assertEq(asmLink(asmCompile(USE_ASM + 'var i=4294967295; function f() { return i|0 } return f'))(), 4294967295|0); +assertEq(asmLink(asmCompile(USE_ASM + 'const i=4294967295; function f() { return i|0 } return f'))(), 4294967295|0); diff --git a/js/src/jit-test/tests/asm.js/testMathLib.js b/js/src/jit-test/tests/asm.js/testMathLib.js new file mode 100644 index 0000000000..5c2eb9db46 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testMathLib.js @@ -0,0 +1,189 @@ +load(libdir + "asm.js"); + +function testUnary(f, g) { + var numbers = [NaN, Infinity, -Infinity, -10000, -3.4, -0, 0, 3.4, 10000]; + for (n of numbers) + assertEq(f(n), g(n)); +} + +const FROUND = 'var fround=glob.Math.fround;'; + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var sq=glob.Math.sin; function f(d) { d=+d; return +sq(d) } return f'), {Math:{sin:Math.sqrt}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var sq=glob.Math.sin; function f(d) { d=+d; return +sq(d) } return f'), {Math:{sin:null}}); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'var sq=glob.Math.sin; function f(d) { d=+d; return +sq(d) } return f'), {Math:{sin:Math.sin}}), Math.sin); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'const sq=glob.Math.sin; function f(d) { d=+d; return +sq(d) } return f'), {Math:{sin:Math.sin}}), Math.sin); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var co=glob.Math.cos; function f(d) { d=+d; return +co(d) } return f'), {Math:{cos:Math.sqrt}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var co=glob.Math.cos; function f(d) { d=+d; return +co(d) } return f'), {Math:{cos:null}}); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'var co=glob.Math.cos; function f(d) { d=+d; return +co(d) } return f'), {Math:{cos:Math.cos}}), Math.cos); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var ta=glob.Math.tan; function f(d) { d=+d; return +ta(d) } return f'), {Math:{tan:Math.sqrt}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var ta=glob.Math.tan; function f(d) { d=+d; return +ta(d) } return f'), {Math:{tan:null}}); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'var ta=glob.Math.tan; function f(d) { d=+d; return +ta(d) } return f'), {Math:{tan:Math.tan}}), Math.tan); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var as=glob.Math.asin; function f(d) { d=+d; return +as(d) } return f'), {Math:{asin:Math.sqrt}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var as=glob.Math.asin; function f(d) { d=+d; return +as(d) } return f'), {Math:{asin:null}}); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'var as=glob.Math.asin; function f(d) { d=+d; return +as(d) } return f'), {Math:{asin:Math.asin}}), Math.asin); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var ac=glob.Math.acos; function f(d) { d=+d; return +ac(d) } return f'), {Math:{acos:Math.sqrt}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var ac=glob.Math.acos; function f(d) { d=+d; return +ac(d) } return f'), {Math:{acos:null}}); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'var ac=glob.Math.acos; function f(d) { d=+d; return +ac(d) } return f'), {Math:{acos:Math.acos}}), Math.acos); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var at=glob.Math.atan; function f(d) { d=+d; return +at(d) } return f'), {Math:{atan:Math.sqrt}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var at=glob.Math.atan; function f(d) { d=+d; return +at(d) } return f'), {Math:{atan:null}}); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'var at=glob.Math.atan; function f(d) { d=+d; return +at(d) } return f'), {Math:{atan:Math.atan}}), Math.atan); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var ce=glob.Math.ceil; function f(d) { d=+d; return +ce(d) } return f'), {Math:{ceil:Math.sqrt}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var ce=glob.Math.ceil; function f(d) { d=+d; return +ce(d) } return f'), {Math:{ceil:null}}); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'var ce=glob.Math.ceil; function f(d) { d=+d; return +ce(d) } return f'), {Math:{ceil:Math.ceil}}), Math.ceil); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var fl=glob.Math.floor; function f(d) { d=+d; return +fl(d) } return f'), {Math:{floor:Math.sqrt}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var fl=glob.Math.floor; function f(d) { d=+d; return +fl(d) } return f'), {Math:{floor:null}}); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'var fl=glob.Math.floor; function f(d) { d=+d; return +fl(d) } return f'), {Math:{floor:Math.floor}}), Math.floor); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var exq=glob.Math.exp; function f(d) { d=+d; return +exq(d) } return f'), {Math:{exp:Math.sqrt}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var exq=glob.Math.exp; function f(d) { d=+d; return +exq(d) } return f'), {Math:{exp:null}}); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'var exq=glob.Math.exp; function f(d) { d=+d; return +exq(d) } return f'), {Math:{exp:Math.exp}}), Math.exp); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var lo=glob.Math.log; function f(d) { d=+d; return +lo(d) } return f'), {Math:{log:Math.sqrt}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var lo=glob.Math.log; function f(d) { d=+d; return +lo(d) } return f'), {Math:{log:null}}); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'var lo=glob.Math.log; function f(d) { d=+d; return +lo(d) } return f'), {Math:{log:Math.log}}), Math.log); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var sq=glob.Math.sqrt; function f(d) { d=+d; return +sq(d) } return f'), {Math:{sqrt:Math.sin}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var sq=glob.Math.sqrt; function f(d) { d=+d; return +sq(d) } return f'), {Math:{sqrt:null}}); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'var sq=glob.Math.sqrt; function f(d) { d=+d; return +sq(d) } return f'), {Math:{sqrt:Math.sqrt}}), Math.sqrt); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var abs=glob.Math.abs; function f(d) { d=+d; return +abs(d) } return f'), {Math:{abs:Math.sin}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var abs=glob.Math.abs; function f(d) { d=+d; return +abs(d) } return f'), {Math:{abs:null}}); +testUnary(asmLink(asmCompile('glob', USE_ASM + 'var abs=glob.Math.abs; function f(d) { d=+d; return +abs(d) } return f'), {Math:{abs:Math.abs}}), Math.abs); + +var f = asmLink(asmCompile('glob', USE_ASM + 'var abs=glob.Math.abs; function f(i) { i=i|0; return abs(i|0)|0 } return f'), this); +for (n of [-Math.pow(2,31)-1, -Math.pow(2,31), -Math.pow(2,31)+1, -1, 0, 1, Math.pow(2,31)-2, Math.pow(2,31)-1, Math.pow(2,31)]) + assertEq(f(n), Math.abs(n|0)|0); + +var f = asmLink(asmCompile('glob', USE_ASM + 'var clz32=glob.Math.clz32; function f(i) { i=i|0; return clz32(i)|0 } return f'), this); +for (n of [0, 1, 2, 15, 16, Math.pow(2,31)-1, Math.pow(2,31), Math.pow(2,31)+1, Math.pow(2,32)-1, Math.pow(2,32), Math.pow(2,32)+1]) + assertEq(f(n), Math.clz32(n|0)); +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var clz32=glob.Math.clz32; function f(i, j) { i=i|0;j=j|0; return (clz32(i) < (j|0))|0 } return f'), this)(0x1, 30), 0); +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var clz32=glob.Math.clz32; function f(i, j) { i=i|0;j=j|0; return (clz32(i) < (j>>>0))|0 } return f'), this)(0x1, 30), 0); + +var doubleNumbers = [NaN, Infinity, -Infinity, -10000, -3.4, -0, 0, 3.4, 10000]; +var floatNumbers = []; +for (var x of doubleNumbers) floatNumbers.push(Math.fround(x)); +var intNumbers = [-Math.pow(2,31), -10000, -3, -1, 0, 3, 10000, Math.pow(2,31), Math.pow(2,31)+1]; + +function testBinary(f, g, numbers) { + for (n of numbers) + for (o of numbers) + assertEq(f(n,o), g(n,o)); +} + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var po=glob.Math.pow; function f(d,e) { d=+d;e=+e; return +po(d,e) } return f'), {Math:{pow:Math.sin}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var po=glob.Math.pow; function f(d,e) { d=+d;e=+e; return +po(d,e) } return f'), {Math:{pow:null}}); +testBinary(asmLink(asmCompile('glob', USE_ASM + 'var po=glob.Math.pow; function f(d,e) { d=+d;e=+e; return +po(d,e) } return f'), {Math:{pow:Math.pow}}), Math.pow, doubleNumbers); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var at=glob.Math.atan2; function f(d,e) { d=+d;e=+e; return +at(d,e) } return f'), {Math:{atan2:Math.sin}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var at=glob.Math.atan2; function f(d,e) { d=+d;e=+e; return +at(d,e) } return f'), {Math:{atan2:null}}); +testBinary(asmLink(asmCompile('glob', USE_ASM + 'var at=glob.Math.atan2; function f(d,e) { d=+d;e=+e; return +at(d,e) } return f'), {Math:{atan2:Math.atan2}}), Math.atan2, doubleNumbers); + +function coercedMin(...args) { for (var i = 0; i < args.length; i++) args[i] = args[i]|0; return Math.min(...args) } +function coercedMax(...args) { for (var i = 0; i < args.length; i++) args[i] = args[i]|0; return Math.max(...args) } +assertAsmTypeFail('glob', USE_ASM + 'var min=glob.Math.min; function f(d) { d=+d; return +min(d) } return f'); +assertAsmTypeFail('glob', 'ffi', 'heap', USE_ASM + 'var i32=new glob.Int32Array(heap); var min=glob.Math.min; function f() { return min(i32[0], 5)|0 } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var min=glob.Math.min; function f(x) { x=x|0; return min(3 + x, 5)|0 } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var min=glob.Math.min; function f(x) { x=x|0; return min(5, 3 + x)|0 } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var min=glob.Math.min; function f(x) { x=x|0; return min(x, 1)|0 } return f'); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var min=glob.Math.min; function f(d,e) { d=+d;e=+e; return +min(d,e) } return f'), {Math:{min:Math.sin}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var min=glob.Math.min; function f(d,e) { d=+d;e=+e; return +min(d,e) } return f'), {Math:{min:null}}); +testBinary(asmLink(asmCompile('glob', USE_ASM + 'var min=glob.Math.min; function f(d,e) { d=+d;e=+e; return +min(d,e) } return f'), {Math:{min:Math.min}}), Math.min, doubleNumbers); +testBinary(asmLink(asmCompile('glob', USE_ASM + 'var min=glob.Math.min; var f32=glob.Math.fround; function f(d,e) { d=f32(d);e=f32(e); return f32(min(d,e)) } return f'), this), Math.min, floatNumbers); +testBinary(asmLink(asmCompile('glob', USE_ASM + 'var min=glob.Math.min; function f(d,e) { d=d|0;e=e|0; return min(d|0,e|0)|0} return f'), {Math:{min:Math.min}}), coercedMin, intNumbers); + +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var max=glob.Math.max; function f(d,e) { d=+d;e=+e; return +max(d,e) } return f'), {Math:{max:Math.sin}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var max=glob.Math.max; function f(d,e) { d=+d;e=+e; return +max(d,e) } return f'), {Math:{max:null}}); +testBinary(asmLink(asmCompile('glob', USE_ASM + 'var max=glob.Math.max; function f(d,e) { d=+d;e=+e; return +max(d,e) } return f'), {Math:{max:Math.max}}), Math.max, doubleNumbers); +testBinary(asmLink(asmCompile('glob', USE_ASM + 'var max=glob.Math.max; var f32=glob.Math.fround; function f(d,e) { d=f32(d);e=f32(e); return f32(max(d,e)) } return f'), this), Math.max, floatNumbers); +testBinary(asmLink(asmCompile('glob', USE_ASM + 'var max=glob.Math.max; function f(d,e) { d=d|0;e=e|0; return max(d|0,e|0)|0} return f'), {Math:{max:Math.max}}), coercedMax, intNumbers); + +function testTernary(f, g, numbers) { + for (n of numbers) + for (o of numbers) + for (p of numbers) + assertEq(f(n,o,p), g(n,o,p)); +} + +assertAsmTypeFail('glob', USE_ASM + 'var min=glob.Math.min; function f(d,e,g) { d=+d;e=+e;g=g|0; return +min(d,e,g) } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var max=glob.Math.max; function f(d,e,g) { d=d|0;e=e|0;g=+g; return max(d,e,g)|0 } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var min=glob.Math.min; function f(d,e,g) { d=+d;e=+e;g=+g; return min(d,e,g)|0 } return f'); +testTernary(asmLink(asmCompile('glob', USE_ASM + 'var max=glob.Math.max; function f(d,e,g) { d=d|0;e=e|0;g=g|0; return +max(d|0,e|0,g|0) } return f'), {Math:{max:Math.max}}), coercedMax, intNumbers); +testTernary(asmLink(asmCompile('glob', USE_ASM + 'var max=glob.Math.max; function f(d,e,g) { d=d|0;e=e|0;g=g|0; return max(d|0,e|0,g|0)|0 } return f'), {Math:{max:Math.max}}), coercedMax, intNumbers); +testTernary(asmLink(asmCompile('glob', USE_ASM + 'var max=glob.Math.max; function f(d,e,g) { d=+d;e=+e;g=+g; return +max(d,e,g) } return f'), {Math:{max:Math.max}}), Math.max, doubleNumbers); +testTernary(asmLink(asmCompile('glob', USE_ASM + 'var max=glob.Math.max; var _=glob.Math.fround; function f(d,e,g) { d=_(d);e=_(e);g=_(g); return _(max(d,e,g)) } return f'), this), Math.max, floatNumbers); +testTernary(asmLink(asmCompile('glob', USE_ASM + 'var min=glob.Math.min; function f(d,e,g) { d=d|0;e=e|0;g=g|0; return min(d|0,e|0,g|0)|0 } return f'), {Math:{min:Math.min}}), coercedMin, intNumbers); +testTernary(asmLink(asmCompile('glob', USE_ASM + 'var min=glob.Math.min; function f(d,e,g) { d=+d;e=+e;g=+g; return +min(d,e,g) } return f'), {Math:{min:Math.min}}), Math.min, doubleNumbers); +testTernary(asmLink(asmCompile('glob', USE_ASM + 'var min=glob.Math.min; var _=glob.Math.fround; function f(d,e,g) { d=_(d);e=_(e);g=_(g); return _(min(d,e,g)) } return f'), this), Math.min, floatNumbers); + +// Implicit return coercions of math functions +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var im=glob.Math.imul; function f(i) { i=i|0; i = im(i,i); return i|0 } return f'), this)(3), 9); +assertAsmTypeFail('glob', USE_ASM + 'var im=glob.Math.imul; function f(d) { d=+d; d = im(d, d) } return f'); +assertAsmTypeFail('glob', USE_ASM + FROUND + 'var im=glob.Math.imul; function f(d) { d=fround(d); d = im(d, d) } return f'); + +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var abs=glob.Math.abs; function f(d) { d=d|0; d = abs(d|0); return +(d>>>0) } return f'), this)(-1), 1); +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var abs=glob.Math.abs; function f(d) { d=d|0; var m = 0; m = (-1)>>>0; return (abs(d|0) < (m>>>0))|0 } return f'), this)(42), 1); +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var abs=glob.Math.abs; function f(d) { d=+d; d = abs(d); return +d } return f'), this)(-1.5), 1.5); +assertEq(asmLink(asmCompile('glob', USE_ASM + FROUND + 'var abs=glob.Math.abs; function f(d) { d=fround(d); d = fround(abs(d)); return +d } return f'), this)(-1.5), 1.5); +assertAsmTypeFail('glob', USE_ASM + FROUND + 'var abs=glob.Math.abs; function f(d) { d=fround(d); d = abs(d); return +d } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var abs=glob.Math.abs; function f(d) { d=d|0; var m = 0; m = -1; return (abs(d|0) < (m|0))|0 } return f'); + +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var sqrt=glob.Math.sqrt; function f(d) { d=+d; d = sqrt(d); return +d } return f'), this)(256), 16); +assertEq(asmLink(asmCompile('glob', USE_ASM + FROUND + 'var sqrt=glob.Math.sqrt; function f(d) { d=fround(d); d = fround(sqrt(d)); return +d } return f'), this)(13.37), Math.fround(Math.sqrt(Math.fround(13.37)))); +assertAsmTypeFail('glob', USE_ASM + FROUND + 'var sqrt=glob.Math.sqrt; function f(d) { d=fround(d); d = sqrt(d); return fround(d) } return f'); +assertAsmTypeFail('glob', USE_ASM + FROUND + 'var sqrt=glob.Math.sqrt; function f(d) { d=fround(d); d = sqrt(d); return d } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var sqrt=glob.Math.sqrt; function f(n) { n=n|0; var d=0.; d = sqrt(n|0) } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var sqrt=glob.Math.sqrt; function f(n) { n=n|0; var d=3.; n = sqrt(d)|0 } return f'); + +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var min=glob.Math.min; function f(d) { d=+d; d = min(d, 13.); return +d } return f'), this)(12), 12); +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var min=glob.Math.min; function f(d) { d=d|0; d = min(d|0, 11); return d|0 } return f'), this)(12), 11); +assertEq(asmLink(asmCompile('glob', USE_ASM + FROUND + 'var min=glob.Math.min; function f(d) { d=fround(d); d = min(d, fround(13.37)); return fround(d) } return f'), this)(14), Math.fround(13.37)); + +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var sin=glob.Math.sin; function f(d) { d=+d; d = sin(d); return +d } return f'), this)(Math.PI), Math.sin(Math.PI)); +assertAsmTypeFail('glob', USE_ASM + FROUND + 'var sin=glob.Math.sin; function f(d) { d=fround(d); d = sin(d) } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var sin=glob.Math.sin; function f(d) { d=d|0; d = sin(d) } return f'); + +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var pow=glob.Math.pow; function f(d) { d=+d; d = pow(d,d); return +d } return f'), this)(3), 27); +assertAsmTypeFail('glob', USE_ASM + FROUND + 'var pow=glob.Math.pow; function f(d) { d=fround(d); d = pow(d, d) } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var pow=glob.Math.pow; function f(d) { d=d|0; d = pow(d, d) } return f'); + +assertAsmTypeFail('glob', USE_ASM + 'var sin=glob.Math.sin; function f(d) { d=+d; var i=0; i = sin(d)|0; } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var pow=glob.Math.pow; function f(d) { d=+d; var i=0; i = pow(d,d)|0; } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var atan2=glob.Math.atan2; function f(d) { d=+d; var i=0; i = atan2(d,d)|0; } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var sqrt=glob.Math.sqrt; function f(d) { d=+d; sqrt(d)|0; } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var abs=glob.Math.abs; function f(d) { d=+d; abs(d)|0; } return f'); + +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var im=glob.Math.imul; function f(i) { i=i|0; var d=0.0; d = +im(i,i); return +d } return f'), this)(42), Math.imul(42, 42)); +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var abs=glob.Math.abs; function f(i) { i=i|0; var d=0.0; d = +abs(i|0); return +d } return f'), this)(-42), 42); +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var min=glob.Math.min; function f(i) { i=i|0; var d=0.0; d = +min(i|0, 0); return +d } return f'), this)(-42), -42); +assertEq(asmLink(asmCompile('glob', USE_ASM + FROUND + 'var min=glob.Math.min; function f(i) { i=i|0; var d=fround(0); d = fround(min(i|0, 0)); return +d } return f'), this)(-42), -42); +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var max=glob.Math.max; function f(i) { i=i|0; var d=0.0; d = +max(i|0, 0); return +d } return f'), this)(-42), 0); +assertEq(asmLink(asmCompile('glob', USE_ASM + FROUND + 'var max=glob.Math.max; function f(i) { i=i|0; var d=fround(0); d = fround(max(i|0, 0)); return +d } return f'), this)(-42), 0); +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var min=glob.Math.min; function f(d) { d=+d; var i=0; i = ~~min(d, 0.)|0; return i|0 } return f'), this)(-42), -42); +assertEq(asmLink(asmCompile('glob', USE_ASM + FROUND + 'var min=glob.Math.min; function f(d) { d=fround(d); var i=0; i = ~~min(d, fround(0))|0; return i|0 } return f'), this)(-42), -42); +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var max=glob.Math.max; function f(d) { d=+d; var i=0; i = ~~max(d, 0.)|0; return i|0 } return f'), this)(-42), 0); +assertEq(asmLink(asmCompile('glob', USE_ASM + FROUND + 'var max=glob.Math.max; function f(d) { d=fround(d); var i=0; i = ~~max(d, fround(0))|0; return i|0 } return f'), this)(-42), 0); + +assertEq(asmLink(asmCompile('glob', USE_ASM + 'var abs=glob.Math.abs; function f(i) { i=i|0; var d=0.0; return +d; +abs(i|0); return 3.0;} return f'), this)(-42), 0); + +assertAsmTypeFail('glob', USE_ASM + 'var tau=glob.Math.TAU; function f() {} return f'); +assertAsmTypeFail('glob', USE_ASM + 'var pi=glob.Math.PI; function f() { return pi | 0 } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var pi=glob.Math.PI; function f() { return +pi() } return f'); +assertAsmTypeFail('glob', USE_ASM + 'var pi=glob.Math.PI; function f() { pi = +3; } return f'); +assertAsmLinkAlwaysFail(asmCompile('glob', USE_ASM + 'var pi=glob.Math.PI; function f() {} return f'), {}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var pi=glob.Math.PI; function f() {} return f'), {Math: {}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var pi=glob.Math.PI; function f() {} return f'), {Math: {PI: Math.cos}}); +assertAsmLinkFail(asmCompile('glob', USE_ASM + 'var pi=glob.Math.PI; function f() {} return f'), {Math: {PI: Math.SQRT2}}); + +for (var c of ['E', 'LN10', 'LN2', 'LOG2E', 'LOG10E', 'PI', 'SQRT1_2', 'SQRT2']) { + var f = asmLink(asmCompile('glob', USE_ASM + 'var x=glob.Math.' + c +'; function f() { return +x } return f'), this); + assertEq(f(), eval('Math.' + c)); +} diff --git a/js/src/jit-test/tests/asm.js/testModuleFunctions.js b/js/src/jit-test/tests/asm.js/testModuleFunctions.js new file mode 100644 index 0000000000..2e3c80f45f --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testModuleFunctions.js @@ -0,0 +1,41 @@ + +function testUniqueness(asmJSModule) { + var f = asmJSModule(); + var g = asmJSModule(); + assertEq(f === g, false); + f.x = 4; + assertEq(f.x, 4); + assertEq(g.x, undefined); +} + +function deffun() { + if (Math.sin) { + function inner() { "use asm"; function g() {} return g } + } + return inner; +} + +testUniqueness(deffun); + +function lambda() { + var x = function inner() { "use asm"; function g() {} return g }; + return x; +} + +testUniqueness(lambda); + +function inEval() { + eval("function inner() { 'use asm'; function g() {} return g }"); + return inner; +} + +testUniqueness(inEval); + +function inWith() { + with ({}) { + function inner() { "use asm"; function g() {} return g } + } + return inner; +} + +testUniqueness(inWith); diff --git a/js/src/jit-test/tests/asm.js/testNeuter.js b/js/src/jit-test/tests/asm.js/testNeuter.js new file mode 100644 index 0000000000..32f3b47e70 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testNeuter.js @@ -0,0 +1,43 @@ +// |jit-test| skip-if: !isAsmJSCompilationAvailable() + +load(libdir + "asm.js"); +load(libdir + "asserts.js"); + +var m = asmCompile('stdlib', 'foreign', 'buffer', + `"use asm"; + var i32 = new stdlib.Int32Array(buffer); + function set(i,j) { + i=i|0; + j=j|0; + i32[i>>2] = j; + } + function get(i) { + i=i|0; + return i32[i>>2]|0 + } + return {get:get, set:set}`); + +var buffer = new ArrayBuffer(BUF_MIN); +var {get, set} = asmLink(m, this, null, buffer); +set(4, 42); +assertEq(get(4), 42); +assertThrowsInstanceOf(() => detachArrayBuffer(buffer), Error); + +var m = asmCompile('stdlib', 'foreign', 'buffer', + `"use asm"; + var i32 = new stdlib.Int32Array(buffer); + var ffi = foreign.ffi; + function inner(i) { + i=i|0; + ffi(); + return i32[i>>2]|0 + } + return inner`); + +var buffer = new ArrayBuffer(BUF_MIN); +function ffi1() +{ + assertThrowsInstanceOf(() => detachArrayBuffer(buffer), Error); +} + +var inner = asmLink(m, this, {ffi: ffi1}, buffer); diff --git a/js/src/jit-test/tests/asm.js/testParallelCompile.js b/js/src/jit-test/tests/asm.js/testParallelCompile.js new file mode 100644 index 0000000000..cc962bd55f --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testParallelCompile.js @@ -0,0 +1,21 @@ +// |jit-test| skip-if: !isAsmJSCompilationAvailable() || helperThreadCount() === 0 + +load(libdir + "asm.js"); + +var module = "'use asm';\n"; +for (var i = 0; i < 100; i++) { + module += "function f" + i + "(i) {\n"; + module += " i=i|0; var j=0; j=(i+1)|0; i=(j-4)|0; i=(i+j)|0; return i|0\n"; + module += "}\n"; +} +module += "return f0"; +var script = "(function() {\n" + module + "})"; + +for (var i = 0; i < 10; i++) { + offThreadCompileToStencil(script); + var f = new Function(module); + var stencil = finishOffThreadStencil(); + var g = evalStencil(stencil); + assertEq(isAsmJSModule(f), true); + assertEq(isAsmJSModule(g), true); +} diff --git a/js/src/jit-test/tests/asm.js/testProfiling.js b/js/src/jit-test/tests/asm.js/testProfiling.js new file mode 100644 index 0000000000..35113f0a29 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testProfiling.js @@ -0,0 +1,232 @@ +// |jit-test| skip-if: !isAsmJSCompilationAvailable() || !getBuildConfiguration("arm-simulator") +// Single-step profiling currently only works in the ARM simulator + +load(libdir + "asm.js"); +load(libdir + "asserts.js"); + +function checkSubSequence(got, expect) +{ + var got_i = 0; + EXP: for (var exp_i = 0; exp_i < expect.length; exp_i++) { + var item = expect[exp_i]; + // Scan for next match in got. + while (got_i < got.length) { + if (got[got_i++] == expect[exp_i]) + continue EXP; + } + print("MISMATCH: " + got.join(",") + "\n" + + " VS " + expect.join(",")); + return false; + } + return true; +} + +function assertStackContainsSeq(got, expect) +{ + var normalized = []; + + for (var i = 0; i < got.length; i++) { + if (got[i].length == 0) + continue; + var parts = got[i].split(','); + for (var j = 0; j < parts.length; j++) { + var frame = parts[j]; + frame = frame.replace(/ \([^\)]*\)/g, ""); + frame = frame.replace(/fast exit trampoline to native/g, "N"); + frame = frame.replace(/^call to( asm.js)? native .*\(in wasm\)$/g, "N"); + frame = frame.replace(/(fast|slow) exit trampoline/g, "<"); + frame = frame.replace(/(fast|slow) entry trampoline/g, ">"); + frame = frame.replace(/(\/[^\/,<]+)*\/testProfiling.js/g, ""); + frame = frame.replace(/testBuiltinD2D/g, ""); + frame = frame.replace(/testBuiltinF2F/g, ""); + frame = frame.replace(/testBuiltinDD2D/g, ""); + frame = frame.replace(/assertThrowsInstanceOf/g, ""); + frame = frame.replace(/^ffi[12]?/g, ""); + normalized.push(frame); + } + } + + var gotNorm = normalized.join(',').replace(/,+/g, ","); + gotNorm = gotNorm.replace(/^,/, "").replace(/,$/, ""); + + assertEq(checkSubSequence(gotNorm.split(','), expect.split(',')), true); +} + +// Test profiling enablement while asm.js is running. +var stacks; +var ffi = function(enable) { + if (enable == +1) + enableGeckoProfiling(); + enableSingleStepProfiling(); + stacks = disableSingleStepProfiling(); + if (enable == -1) + disableGeckoProfiling(); +} +var f = asmLink(asmCompile('global','ffis',USE_ASM + "var ffi=ffis.ffi; function g(i) { i=i|0; ffi(i|0) } function f(i) { i=i|0; g(i|0) } return f"), null, {ffi}); +f(0); +assertStackContainsSeq(stacks, ""); +f(+1); +assertStackContainsSeq(stacks, "<,g,f,>"); +f(0); +assertStackContainsSeq(stacks, "<,g,f,>"); +f(-1); +assertStackContainsSeq(stacks, "<,g,f,>"); +f(0); +assertStackContainsSeq(stacks, ""); + +// Enable profiling for the rest of the tests. +enableGeckoProfiling(); + +var f = asmLink(asmCompile(USE_ASM + "function f() { return 42 } return f")); +enableSingleStepProfiling(); +assertEq(f(), 42); +var stacks = disableSingleStepProfiling(); +assertStackContainsSeq(stacks, ">,f,>,>"); + +var m = asmCompile(USE_ASM + "function g(i) { i=i|0; return (i+1)|0 } function f() { return g(42)|0 } return f"); +for (var i = 0; i < 3; i++) { + var f = asmLink(m); + enableSingleStepProfiling(); + assertEq(f(), 43); + var stacks = disableSingleStepProfiling(); + assertStackContainsSeq(stacks, ">,f,>,g,f,>,f,>,>"); +} + +var m = asmCompile(USE_ASM + "function g1() { return 1 } function g2() { return 2 } function f(i) { i=i|0; return TBL[i&1]()|0 } var TBL=[g1,g2]; return f"); +for (var i = 0; i < 3; i++) { + var f = asmLink(m); + enableSingleStepProfiling(); + assertEq(f(0), 1); + assertEq(f(1), 2); + var stacks = disableSingleStepProfiling(); + assertStackContainsSeq(stacks, ">,f,>,g1,f,>,f,>,>,>,f,>,g2,f,>,f,>,>"); +} + +function testBuiltinD2D(name) { + var m = asmCompile('g', USE_ASM + "var fun=g.Math." + name + "; function f(d) { d=+d; return +fun(d) } return f"); + for (var i = 0; i < 3; i++) { + var f = asmLink(m, this); + enableSingleStepProfiling(); + assertEq(f(.1), eval("Math." + name + "(.1)")); + var stacks = disableSingleStepProfiling(); + assertStackContainsSeq(stacks, ">,f,>,N,f,>,f,>,>"); + } +} +for (name of ['sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'ceil', 'floor', 'exp', 'log']) + testBuiltinD2D(name); + +function testBuiltinF2F(name) { + var m = asmCompile('g', USE_ASM + "var tof=g.Math.fround; var fun=g.Math." + name + "; function f(d) { d=tof(d); return tof(fun(d)) } return f"); + for (var i = 0; i < 3; i++) { + var f = asmLink(m, this); + enableSingleStepProfiling(); + assertEq(f(.1), eval("Math.fround(Math." + name + "(Math.fround(.1)))")); + var stacks = disableSingleStepProfiling(); + assertStackContainsSeq(stacks, ">,f,>,N,f,>,f,>,>"); + } +} +for (name of ['ceil', 'floor']) + testBuiltinF2F(name); + +function testBuiltinDD2D(name) { + var m = asmCompile('g', USE_ASM + "var fun=g.Math." + name + "; function f(d, e) { d=+d; e=+e; return +fun(d,e) } return f"); + for (var i = 0; i < 3; i++) { + var f = asmLink(m, this); + enableSingleStepProfiling(); + assertEq(f(.1, .2), eval("Math." + name + "(.1, .2)")); + var stacks = disableSingleStepProfiling(); + assertStackContainsSeq(stacks, ">,f,>,N,f,>,f,>,>"); + } +} +for (name of ['atan2', 'pow']) + testBuiltinDD2D(name); + +// FFI tests: +setJitCompilerOption("ion.warmup.trigger", 10); +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("offthread-compilation.enable", 0); + +var m = asmCompile('g','ffis', USE_ASM + "var ffi1=ffis.ffi1, ffi2=ffis.ffi2; function f() { return ((ffi1()|0) + (ffi2()|0))|0 } return f"); + +var ffi1 = function() { return 10 } +var ffi2 = function() { return 73 } +var f = asmLink(m, null, {ffi1,ffi2}); + +// Interp FFI exit +enableSingleStepProfiling(); +assertEq(f(), 83); +var stacks = disableSingleStepProfiling(); +assertStackContainsSeq(stacks, ">,f,>,<,f,>,f,>,<,f,>,f,>,>"); + +// Ion FFI exit +for (var i = 0; i < 20; i++) + assertEq(f(), 83); +enableSingleStepProfiling(); +assertEq(f(), 83); +var stacks = disableSingleStepProfiling(); +assertStackContainsSeq(stacks, ">,f,>,<,f,>,f,>,<,f,>,f,>,>"); + +var ffi1 = function() { return { valueOf() { return 20 } } } +var ffi2 = function() { return { valueOf() { return 74 } } } +var f = asmLink(m, null, {ffi1,ffi2}); + +// Interp FFI exit +enableSingleStepProfiling(); +assertEq(f(), 94); +var stacks = disableSingleStepProfiling(); +assertStackContainsSeq(stacks, ">,f,>,<,f,>,f,>,<,f,>,f,>,>"); // TODO: add 'valueOf' once interp shows up + +// Ion FFI exit +for (var i = 0; i < 20; i++) + assertEq(f(), 94); +enableSingleStepProfiling(); +assertEq(f(), 94); +var stacks = disableSingleStepProfiling(); +assertStackContainsSeq(stacks, ">,f,>,<,f,>,f,>,<,f,>,f,>,>"); // TODO: add 'valueOf' once interp shows up + +var ffi1 = function() { return 15 } +var ffi2 = function() { return f2() + 17 } +var {f1,f2} = asmLink(asmCompile('g','ffis', USE_ASM + "var ffi1=ffis.ffi1, ffi2=ffis.ffi2; function f2() { return ffi1()|0 } function f1() { return ffi2()|0 } return {f1:f1, f2:f2}"), null, {ffi1, ffi2}); +// Interpreter FFI exit +enableSingleStepProfiling(); +assertEq(f1(), 32); +var stacks = disableSingleStepProfiling(); +assertStackContainsSeq(stacks, ">,f1,>,<,f1,>,>,<,f1,>,f2,>,<,f1,>,<,f2,>,<,f1,>,f2,>,<,f1,>,>,<,f1,>,<,f1,>,f1,>,>"); + + +// Ion FFI exit +var jitOptions = getJitCompilerOptions(); +if (jitOptions['baseline.enable']) { + for (var i = 0; i < 20; i++) + assertEq(f1(), 32); + enableSingleStepProfiling(); + assertEq(f1(), 32); + var stacks = disableSingleStepProfiling(); + assertStackContainsSeq(stacks, ">,f1,>,<,f1,>,>,<,f1,>,f2,>,<,f1,>,<,f2,>,<,f1,>,f2,>,<,f1,>,>,<,f1,>,<,f1,>,f1,>,>"); +} + +// Thunks +setJitCompilerOption("jump-threshold", 0); +var h = asmLink(asmCompile(USE_ASM + 'function f() {} function g() { f() } function h() { g() } return h')); +enableSingleStepProfiling(); +h(); +var stacks = disableSingleStepProfiling(); +assertStackContainsSeq(stacks, ">,h,>,g,h,>,f,g,h,>,g,h,>,h,>,>"); +setJitCompilerOption("jump-threshold", -1); + +// This takes forever to run. +// Stack-overflow exit test +//var limit = -1; +//var maxct = 0; +//function ffi(ct) { if (ct == limit) { enableSingleStepProfiling(); print("enabled"); } maxct = ct; } +//var f = asmLink(asmCompile('g', 'ffis',USE_ASM + "var ffi=ffis.ffi; var ct=0; function rec(){ ct=(ct+1)|0; ffi(ct|0); rec() } function f() { ct=0; rec() } return f"), null, {ffi}); +//// First find the stack limit: +//var caught = false; +//try { f() } catch (e) { caught = true; assertEq(String(e).indexOf("too much recursion") >= 0, true) } +//assertEq(caught, true); +//limit = maxct; +//print("Setting limit"); +//var caught = false; +//try { f() } catch (e) { caught = true; print("caught"); assertEq(String(e).indexOf("too much recursion") >= 0, true) } +//var stacks = disableSingleStepProfiling(); +//assertEq(String(stacks).indexOf("rec") >= 0, true); diff --git a/js/src/jit-test/tests/asm.js/testRangeAnalysis.js b/js/src/jit-test/tests/asm.js/testRangeAnalysis.js new file mode 100644 index 0000000000..6418bc1b39 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testRangeAnalysis.js @@ -0,0 +1,15 @@ +// Bug 894781 +function m(stdlib) +{ + "use asm"; + var abs = stdlib.Math.abs; + function f(d) + { + d = +d; + return (~~(5.0 - +abs(d)))|0; + } + return f; +} +var f = m(this); +assertEq(f(0.2), 4); +assertEq(f(NaN), 0); diff --git a/js/src/jit-test/tests/asm.js/testSource-2.js b/js/src/jit-test/tests/asm.js/testSource-2.js new file mode 100644 index 0000000000..34cd3ae06b --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testSource-2.js @@ -0,0 +1,368 @@ +// |jit-test| skip-if: !Function.prototype.toSource + +(function() { +/* + * NO ARGUMENT + */ + +function f0() { + "use asm"; + function g() {} + return g; + +} + +var bodyOnly = '"use asm";\n\ + function g() {}\n\ + return g;\n'; + +var funcBody = 'function f0() {\n\ + "use asm";\n\ + function g() {}\n\ + return g;\n\n\ +}'; + +assertEq(f0.toSource(), funcBody); + +var f0 = function() { + "use asm"; + function g() {} + return g; + +} + +funcBody1 = funcBody.replace('function f0','function'); +assertEq(f0.toSource(), '(' + funcBody1 + ')'); + +var g = function g0() { + "use asm"; + function g() {} + return g; + +} + +funcBody2 = funcBody.replace('function f0', 'function g0'); +assertEq(g.toSource(), '(' + funcBody2 + ')'); + +f0 = new Function(bodyOnly); +assertEq(f0.toSource(), "(function anonymous(\n) {\n" + bodyOnly + "\n})"); + +if (isAsmJSCompilationAvailable()) { + var m = new Function(bodyOnly); + assertEq(isAsmJSModule(m), true); + assertEq(m.toSource(), "(function anonymous(\n) {\n" + bodyOnly + "\n})"); +} + +})(); + +(function() { +/* + * ONE ARGUMENT + */ +function f1(glob) { + "use asm"; + function g() {} + return g; + +} + +var bodyOnly = '"use asm";\n\ + function g() {}\n\ + return g;\n'; + +var funcBody = 'function f1(glob) {\n\ + "use asm";\n\ + function g() {}\n\ + return g;\n\n\ +}'; + +assertEq(f1.toSource(), funcBody); + +f1 = function(glob) { + "use asm"; + function g() {} + return g; + +} + +funcBody1 = funcBody.replace('function f1', 'function'); +assertEq(f1.toSource(), '(' + funcBody1 + ')'); + +var g = function g0(glob) { + "use asm"; + function g() {} + return g; + +} + +funcBody2 = funcBody.replace('function f1', 'function g0'); +assertEq(g.toSource(), '(' + funcBody2 + ')'); + +f1 = new Function('glob', bodyOnly); +assertEq(f1.toSource(), "(function anonymous(glob\n) {\n" + bodyOnly + "\n})"); + +if (isAsmJSCompilationAvailable()) { + var m = new Function('glob', bodyOnly); + assertEq(isAsmJSModule(m), true); + assertEq(m.toSource(), "(function anonymous(glob\n) {\n" + bodyOnly + "\n})"); +} + +})(); + + +(function() { +/* + * TWO ARGUMENTS + */ +function f2(glob, ffi) { + "use asm"; + function g() {} + return g; + +} + +var bodyOnly = '"use asm";\n\ + function g() {}\n\ + return g;\n'; + +var funcBody = 'function f2(glob, ffi) {\n\ + "use asm";\n\ + function g() {}\n\ + return g;\n\n\ +}'; + +assertEq(f2.toSource(), funcBody); + +f2 = function(glob, ffi) { + "use asm"; + function g() {} + return g; + +} + +funcBody1 = funcBody.replace('function f2', 'function'); +assertEq(f2.toSource(), '(' + funcBody1 + ')'); + +var g = function g0(glob, ffi) { + "use asm"; + function g() {} + return g; + +} + +var funcBody2 = funcBody.replace('function f2', 'function g0'); +assertEq(g.toSource(), '(' + funcBody2 + ')'); + +f2 = new Function('glob', 'ffi', bodyOnly); +assertEq(f2.toSource(), "(function anonymous(glob,ffi\n) {\n" + bodyOnly + "\n})"); + +if (isAsmJSCompilationAvailable()) { + var m = new Function('glob', 'ffi', bodyOnly); + assertEq(isAsmJSModule(m), true); + assertEq(m.toSource(), "(function anonymous(glob,ffi\n) {\n" + bodyOnly + "\n})"); +} + +})(); + + +(function() { +/* + * THREE ARGUMENTS + */ +function f3(glob, ffi, heap) { + "use asm"; + function g() {} + return g; + +} + +var bodyOnly = '"use asm";\n\ + function g() {}\n\ + return g;\n'; + +var funcBody = 'function f3(glob, ffi, heap) {\n\ + "use asm";\n\ + function g() {}\n\ + return g;\n\n\ +}'; + +assertEq(f3.toSource(), funcBody); + +f3 = function(glob, ffi, heap) { + "use asm"; + function g() {} + return g; + +} + +funcBody1 = funcBody.replace('function f3', 'function'); +assertEq(f3.toSource(), '(' + funcBody1 + ')'); + +var g = function g0(glob, ffi, heap) { + "use asm"; + function g() {} + return g; + +} + +funcBody2 = funcBody.replace('function f3', 'function g0'); +assertEq(g.toSource(), '(' + funcBody2 + ')'); + +f3 = new Function('glob', 'ffi', 'heap', bodyOnly); +assertEq(f3.toSource(), "(function anonymous(glob,ffi,heap\n) {\n" + bodyOnly + "\n})"); + +if (isAsmJSCompilationAvailable()) { + var m = new Function('glob', 'ffi', 'heap', bodyOnly); + assertEq(isAsmJSModule(m), true); + assertEq(m.toSource(), "(function anonymous(glob,ffi,heap\n) {\n" + bodyOnly + "\n})"); +} + +})(); + +/* Modules in "use strict" context */ +(function() { + +var funcSource = + `function(glob, ffi, heap) { + "use asm"; + function g() {} + return g; + }`; + +var f4 = eval("\"use strict\";\n(" + funcSource + ")"); + +var expectedToString = funcSource; +var expectedToSource = '(' + expectedToString + ')'; + +assertEq(f4.toSource(), expectedToSource); + +if (isAsmJSCompilationAvailable()) { + var f5 = eval("\"use strict\";\n(" + funcSource + ")"); + assertEq(isAsmJSModule(f5), true); + assertEq(f5.toSource(), expectedToSource); +} +})(); + +/* Functions */ +(function() { + +var noSrc = "function noArgument() {\n\ + return 42;\n\ +}" +var oneSrc = "function oneArgument(x) {\n\ + x = x | 0;\n\ + return x + 1 | 0;\n\ +}"; +var twoSrc = "function twoArguments(x, y) {\n\ + x = x | 0;\n\ + y = y | 0;\n\ + return x + y | 0;\n\ +}"; +var threeSrc = "function threeArguments(a, b, c) {\n\ + a = +a;\n\ + b = +b;\n\ + c = +c;\n\ + return +(+(a * b) + c);\n\ +}"; + +var funcBody = '\n\ + "use asm";\n' + + noSrc + '\n' + + oneSrc + '\n' + + twoSrc + '\n' + + threeSrc + '\n' + + 'return {\n\ + no: noArgument,\n\ + one: oneArgument,\n\ + two: twoArguments,\n\ + three: threeArguments\n\ + }'; + +var g = new Function(funcBody); +var moduleG = g(); + +function checkFuncSrc(m) { + assertEq(m.no.toSource(), noSrc); + + assertEq(m.one.toSource(), oneSrc); + + assertEq(m.two.toSource(), twoSrc); + + assertEq(m.three.toSource(), threeSrc); +} +checkFuncSrc(moduleG); + +if (isAsmJSCompilationAvailable()) { + var g2 = new Function(funcBody); + assertEq(isAsmJSModule(g2), true); + m = g2(); + checkFuncSrc(m); + + var moduleDecl = 'function g3() {' + funcBody + '}'; + eval(moduleDecl); + m = g3(); + assertEq(isAsmJSModule(g3), true); + checkFuncSrc(m); + + eval('var x = 42;' + moduleDecl); + m = g3(); + assertEq(isAsmJSModule(g3), true); + checkFuncSrc(m); +} + +})(); + +/* Functions in "use strict" context */ +(function () { + +var funcCode = 'function g(x) {\n\ + x=x|0;\n\ + return x + 1 | 0;}'; +var moduleCode = 'function () {\n\ + "use asm";\n' + funcCode + '\n\ + return g;\n\ + }', + useStrict = '"use strict";'; + +var f5 = eval(useStrict + ";\n(" + moduleCode + "())"); + +var expectedToString = funcCode; +var expectedToSource = expectedToString + +assertEq(f5.toSource(), expectedToSource); + +if (isAsmJSCompilationAvailable()) { + var mf5 = eval("\"use strict\";\n(" + moduleCode + ")"); + assertEq(isAsmJSModule(mf5), true); + var f5 = mf5(); + assertEq(f5.toSource(), expectedToSource); +} + +})(); + +/* Functions in "use strict" context with dynamic linking failure */ +(function () { + +var funcCode = 'function g(x) {\n\ + x=x|0;\n\ + return x + 1 | 0;}'; +var moduleCode = 'function (glob) {\n\ + "use asm";\n\ + var fround = glob.Math.fround;\n\ + ' + funcCode + '\n\ + return g;\n\ + }', + useStrict = '"use strict";'; + +var f6 = eval(useStrict + ";\n(" + moduleCode + "({Math:{}}))"); + +assertEq(f6.toSource(), funcCode); + +if (isAsmJSCompilationAvailable()) { + var mf6 = eval("\"use strict\";\n(" + moduleCode + ")"); + assertEq(isAsmJSModule(mf6), true); + var f6 = mf6({Math:{}}); + assertEq(f6.toSource(), funcCode); +} + +})(); diff --git a/js/src/jit-test/tests/asm.js/testSource.js b/js/src/jit-test/tests/asm.js/testSource.js new file mode 100644 index 0000000000..5e0fbb3a22 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testSource.js @@ -0,0 +1,385 @@ +(function() { +/* + * NO ARGUMENT + */ + +function f0() { + "use asm"; + function g() {} + return g; + +} + +var bodyOnly = '"use asm";\n\ + function g() {}\n\ + return g;\n'; + +var funcBody = 'function f0() {\n\ + "use asm";\n\ + function g() {}\n\ + return g;\n\n\ +}'; + +assertEq(f0.toString(), funcBody); + +var f0 = function() { + "use asm"; + function g() {} + return g; + +} + +funcBody1 = funcBody.replace('function f0','function'); +assertEq(f0.toString(), funcBody1); + +var g = function g0() { + "use asm"; + function g() {} + return g; + +} + +funcBody2 = funcBody.replace('function f0', 'function g0'); +assertEq(g.toString(), funcBody2); + +f0 = new Function(bodyOnly); +assertEq(f0.toString(), "function anonymous(\n) {\n" + bodyOnly + "\n}"); + +if (isAsmJSCompilationAvailable()) { + var m = new Function(bodyOnly); + assertEq(isAsmJSModule(m), true); + assertEq(m.toString(), "function anonymous(\n) {\n" + bodyOnly + "\n}"); +} + +})(); + +(function() { +/* + * ONE ARGUMENT + */ +function f1(glob) { + "use asm"; + function g() {} + return g; + +} + +var bodyOnly = '"use asm";\n\ + function g() {}\n\ + return g;\n'; + +var funcBody = 'function f1(glob) {\n\ + "use asm";\n\ + function g() {}\n\ + return g;\n\n\ +}'; + +assertEq(f1.toString(), funcBody); + +f1 = function(glob) { + "use asm"; + function g() {} + return g; + +} + +funcBody1 = funcBody.replace('function f1', 'function'); +assertEq(f1.toString(), funcBody1); + +var g = function g0(glob) { + "use asm"; + function g() {} + return g; + +} + +funcBody2 = funcBody.replace('function f1', 'function g0'); +assertEq(g.toString(), funcBody2); + +f1 = new Function('glob', bodyOnly); +assertEq(f1.toString(), "function anonymous(glob\n) {\n" + bodyOnly + "\n}"); + +if (isAsmJSCompilationAvailable()) { + var m = new Function('glob', bodyOnly); + assertEq(isAsmJSModule(m), true); + assertEq(m.toString(), "function anonymous(glob\n) {\n" + bodyOnly + "\n}"); +} + +})(); + + +(function() { +/* + * TWO ARGUMENTS + */ +function f2(glob, ffi) { + "use asm"; + function g() {} + return g; + +} + +var bodyOnly = '"use asm";\n\ + function g() {}\n\ + return g;\n'; + +var funcBody = 'function f2(glob, ffi) {\n\ + "use asm";\n\ + function g() {}\n\ + return g;\n\n\ +}'; + +assertEq(f2.toString(), funcBody); + +f2 = function(glob, ffi) { + "use asm"; + function g() {} + return g; + +} + +funcBody1 = funcBody.replace('function f2', 'function'); +assertEq(f2.toString(), funcBody1); + +var g = function g0(glob, ffi) { + "use asm"; + function g() {} + return g; + +} + +var funcBody2 = funcBody.replace('function f2', 'function g0'); +assertEq(g.toString(), funcBody2); + +f2 = new Function('glob', 'ffi', bodyOnly); +assertEq(f2.toString(), "function anonymous(glob,ffi\n) {\n" + bodyOnly + "\n}"); + +if (isAsmJSCompilationAvailable()) { + var m = new Function('glob', 'ffi', bodyOnly); + assertEq(isAsmJSModule(m), true); + assertEq(m.toString(), "function anonymous(glob,ffi\n) {\n" + bodyOnly + "\n}"); +} + +})(); + + +(function() { +/* + * THREE ARGUMENTS + */ +function f3(glob, ffi, heap) { + "use asm"; + function g() {} + return g; + +} + +var bodyOnly = '"use asm";\n\ + function g() {}\n\ + return g;\n'; + +var funcBody = 'function f3(glob, ffi, heap) {\n\ + "use asm";\n\ + function g() {}\n\ + return g;\n\n\ +}'; + +assertEq(f3.toString(), funcBody); + +f3 = function(glob, ffi, heap) { + "use asm"; + function g() {} + return g; + +} + +funcBody1 = funcBody.replace('function f3', 'function'); +assertEq(f3.toString(), funcBody1); + +var g = function g0(glob, ffi, heap) { + "use asm"; + function g() {} + return g; + +} + +funcBody2 = funcBody.replace('function f3', 'function g0'); +assertEq(g.toString(), funcBody2); + +f3 = new Function('glob', 'ffi', 'heap', bodyOnly); +assertEq(f3.toString(), "function anonymous(glob,ffi,heap\n) {\n" + bodyOnly + "\n}"); + +if (isAsmJSCompilationAvailable()) { + var m = new Function('glob', 'ffi', 'heap', bodyOnly); + assertEq(isAsmJSModule(m), true); + assertEq(m.toString(), "function anonymous(glob,ffi,heap\n) {\n" + bodyOnly + "\n}"); +} + +})(); + +/* Modules in "use strict" context */ +(function() { + +var funcSource = + `function(glob, ffi, heap) { + "use asm"; + function g() {} + return g; + }`; + +var f4 = eval("\"use strict\";\n(" + funcSource + ")"); + +var expectedToString = funcSource; + +assertEq(f4.toString(), expectedToString); + +if (isAsmJSCompilationAvailable()) { + var f5 = eval("\"use strict\";\n(" + funcSource + ")"); + assertEq(isAsmJSModule(f5), true); + assertEq(f5.toString(), expectedToString); +} +})(); + +/* Functions */ +(function() { + +var noSrc = "function noArgument() {\n\ + return 42;\n\ +}" +var oneSrc = "function oneArgument(x) {\n\ + x = x | 0;\n\ + return x + 1 | 0;\n\ +}"; +var twoSrc = "function twoArguments(x, y) {\n\ + x = x | 0;\n\ + y = y | 0;\n\ + return x + y | 0;\n\ +}"; +var threeSrc = "function threeArguments(a, b, c) {\n\ + a = +a;\n\ + b = +b;\n\ + c = +c;\n\ + return +(+(a * b) + c);\n\ +}"; + +var funcBody = '\n\ + "use asm";\n' + + noSrc + '\n' + + oneSrc + '\n' + + twoSrc + '\n' + + threeSrc + '\n' + + 'return {\n\ + no: noArgument,\n\ + one: oneArgument,\n\ + two: twoArguments,\n\ + three: threeArguments\n\ + }'; + +var g = new Function(funcBody); +var moduleG = g(); + +function checkFuncSrc(m) { + assertEq(m.no.toString(), noSrc); + + assertEq(m.one.toString(), oneSrc); + + assertEq(m.two.toString(), twoSrc); + + assertEq(m.three.toString(), threeSrc); +} +checkFuncSrc(moduleG); + +if (isAsmJSCompilationAvailable()) { + var g2 = new Function(funcBody); + assertEq(isAsmJSModule(g2), true); + m = g2(); + checkFuncSrc(m); + + var moduleDecl = 'function g3() {' + funcBody + '}'; + eval(moduleDecl); + m = g3(); + assertEq(isAsmJSModule(g3), true); + checkFuncSrc(m); + + eval('var x = 42;' + moduleDecl); + m = g3(); + assertEq(isAsmJSModule(g3), true); + checkFuncSrc(m); +} + +})(); + +/* Functions in "use strict" context */ +(function () { + +var funcCode = 'function g(x) {\n\ + x=x|0;\n\ + return x + 1 | 0;}'; +var moduleCode = 'function () {\n\ + "use asm";\n' + funcCode + '\n\ + return g;\n\ + }', + useStrict = '"use strict";'; + +var f5 = eval(useStrict + ";\n(" + moduleCode + "())"); + +var expectedToString = funcCode; + +assertEq(f5.toString(), expectedToString); + +if (isAsmJSCompilationAvailable()) { + var mf5 = eval("\"use strict\";\n(" + moduleCode + ")"); + assertEq(isAsmJSModule(mf5), true); + var f5 = mf5(); + assertEq(f5.toString(), expectedToString); +} + +})(); + +/* Functions in "use strict" context with dynamic linking failure */ +(function () { + +var funcCode = 'function g(x) {\n\ + x=x|0;\n\ + return x + 1 | 0;}'; +var moduleCode = 'function (glob) {\n\ + "use asm";\n\ + var fround = glob.Math.fround;\n\ + ' + funcCode + '\n\ + return g;\n\ + }', + useStrict = '"use strict";'; + +var f6 = eval(useStrict + ";\n(" + moduleCode + "({Math:{}}))"); + +assertEq(f6.toString(), funcCode); + +if (isAsmJSCompilationAvailable()) { + var mf6 = eval("\"use strict\";\n(" + moduleCode + ")"); + assertEq(isAsmJSModule(mf6), true); + var f6 = mf6({Math:{}}); + assertEq(f6.toString(), funcCode); +} + +})(); + +/* Column number > 0. */ +(function() { + +var asmSource = `function evaluate() { + "use asm"; + function another() {} + function func() {} + return func +}` + +var m = evaluate(` +var f = x =>(${asmSource}); +f()`, { + columnNumber: 100 +}); + +assertEq(m.toString(), asmSource); +assertEq(m().toString(), `function func() {}`) + +})(); diff --git a/js/src/jit-test/tests/asm.js/testStackWalking.js b/js/src/jit-test/tests/asm.js/testStackWalking.js new file mode 100644 index 0000000000..48f781a323 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testStackWalking.js @@ -0,0 +1,97 @@ +load(libdir + "asm.js"); +load(libdir + "asserts.js"); + +function matchStack(stackString, stackArray) +{ + var match = 0; + for (name of stackArray) { + match = stackString.indexOf(name, match); + if (match === -1) + throw name + " not found in the stack " + stack; + } +} + +var stack; +function dumpStack() +{ + stack = new Error().stack +} + +setJitCompilerOption("ion.warmup.trigger", 10); +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("offthread-compilation.enable", 0); + +var callFFI = asmCompile('global', 'ffis', USE_ASM + "var ffi=ffis.ffi; function f() { return ffi()|0 } return f"); + +var f = asmLink(callFFI, null, {ffi:dumpStack}); +for (var i = 0; i < 15; i++) { + stack = null; + f(); + matchStack(stack, ['dumpStack', 'f']); +} + +if (isAsmJSCompilationAvailable()) { + var callFFI = asmCompile('global', 'ffis', USE_ASM + "var ffi=ffis.ffi; function f() { return ffi()|0 } return f"); + assertEq(isAsmJSModule(callFFI), true); + stack = null; + f(); + matchStack(stack, ['dumpStack', 'f']); +} + +var f1 = asmLink(callFFI, null, {ffi:dumpStack}); +var f2 = asmLink(callFFI, null, {ffi:function middle() { f1() }}); +stack = null; +(function outer() { f2() })(); +matchStack(stack, ["dumpStack", "f", "middle", "f"]); + +function returnStackDumper() { return { valueOf:function() { stack = new Error().stack } } } +var f = asmLink(callFFI, null, {ffi:returnStackDumper}); +for (var i = 0; i < 15; i++) { + stack = null; + f(); + matchStack(stack, ['valueOf', 'f']); +} + +var caught = false; +try { + stack = null; + asmLink(asmCompile(USE_ASM + "function asmRec() { asmRec() } return asmRec"))(); +} catch (e) { + caught = true; + matchStack(e.stack, ['asmRec', 'asmRec', 'asmRec', 'asmRec']); +} +assertEq(caught, true); + +var caught = false; +try { + callFFI(null, {ffi:Object.defineProperty})(); +} catch (e) { + caught = true; +} +assertEq(caught, true); + +asmLink(callFFI, null, {ffi:eval})(); +asmLink(callFFI, null, {ffi:Function})(); +asmLink(callFFI, null, {ffi:Error})(); + +var manyCalls = asmCompile('global', 'ffis', + USE_ASM + + "var ffi=ffis.ffi;\ + function f1(a,b,c,d,e,f,g,h,i,j,k) { \ + a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0; \ + ffi(); \ + return (a+b+c+d+e+f+g+h+i+j+k)|0; \ + } \ + function f2() { \ + return f1(1,2,3,4,5,6,7,8,f1(1,2,3,4,5,6,7,8,9,10,11)|0,10,11)|0; \ + } \ + function f3() { return 13 } \ + function f4(i) { \ + i=i|0; \ + return TBL[i&3]()|0; \ + } \ + var TBL=[f3, f3, f2, f3]; \ + return f4;"); +stack = null; +assertEq(asmLink(manyCalls, null, {ffi:dumpStack})(2), 123); +matchStack(stack, ['dumpStack', 'f1', 'f2', 'f4']); diff --git a/js/src/jit-test/tests/asm.js/testStealing.js b/js/src/jit-test/tests/asm.js/testStealing.js new file mode 100644 index 0000000000..8751cea49e --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testStealing.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: !isAsmJSCompilationAvailable() + +load(libdir + "asm.js"); +load(libdir + "asserts.js"); + +var code = USE_ASM + "var i32 = new stdlib.Int32Array(buf); function f() { return i32[0]|0 } return f"; + +var ab = new ArrayBuffer(BUF_MIN); +new Int32Array(ab)[0] = 42; + +var f = asmLink(asmCompile('stdlib', 'ffi', 'buf', code), this, null, ab); +assertEq(f(), 42); + +assertThrowsInstanceOf(() => detachArrayBuffer(ab), Error); +assertEq(f(), 42); + +assertThrowsInstanceOf(() => serialize(ab, [ab]), Error); +assertEq(f(), 42); diff --git a/js/src/jit-test/tests/asm.js/testTimeout1.js b/js/src/jit-test/tests/asm.js/testTimeout1.js new file mode 100644 index 0000000000..df05435737 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testTimeout1.js @@ -0,0 +1,8 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") + +load(libdir + "asm.js"); + +var g = asmLink(asmCompile(USE_ASM + "function f() {} function g() { while(1) { f() } } return g")); +timeout(1); +g(); +assertEq(true, false); diff --git a/js/src/jit-test/tests/asm.js/testTimeout2.js b/js/src/jit-test/tests/asm.js/testTimeout2.js new file mode 100644 index 0000000000..b55edda3dc --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testTimeout2.js @@ -0,0 +1,8 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") + +load(libdir + "asm.js"); + +var g = asmLink(asmCompile(USE_ASM + "function g() { while(1) {} } return g")); +timeout(1); +g(); +assertEq(true, false); diff --git a/js/src/jit-test/tests/asm.js/testTimeout3.js b/js/src/jit-test/tests/asm.js/testTimeout3.js new file mode 100644 index 0000000000..f9c5e58238 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testTimeout3.js @@ -0,0 +1,8 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") + +load(libdir + "asm.js"); + +var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; if (!i) return; f((i-1)|0); f((i-1)|0); f((i-1)|0); f((i-1)|0); f((i-1)|0); } return f")); +timeout(1); +f(100); +assertEq(true, false); diff --git a/js/src/jit-test/tests/asm.js/testTimeout4.js b/js/src/jit-test/tests/asm.js/testTimeout4.js new file mode 100644 index 0000000000..ce74bbc741 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testTimeout4.js @@ -0,0 +1,8 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") + +load(libdir + "asm.js"); + +var g = asmLink(asmCompile(USE_ASM + "function f(d) { d=+d; d=d*.1; d=d/.4; return +d } function g() { while(1) { +f(1.1) } } return g")); +timeout(1); +g(); +assertEq(true, false); diff --git a/js/src/jit-test/tests/asm.js/testTimeout5.js b/js/src/jit-test/tests/asm.js/testTimeout5.js new file mode 100644 index 0000000000..446db0cb9b --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testTimeout5.js @@ -0,0 +1,12 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") + +load(libdir + "asm.js"); + +enableGeckoProfiling(); + +var f = asmLink(asmCompile('glob', 'ffis', 'buf', USE_ASM + "function f() { var i=0; while (1) { i=(i+1)|0 } } return f")); +timeout(1); +if (getBuildConfiguration("arm-simulator")) + enableSingleStepProfiling(); +f(); +assertEq(true, false); diff --git a/js/src/jit-test/tests/asm.js/testTimeout6.js b/js/src/jit-test/tests/asm.js/testTimeout6.js new file mode 100644 index 0000000000..5390ae83d2 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testTimeout6.js @@ -0,0 +1,12 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") + +load(libdir + "asm.js"); + +enableGeckoProfiling(); + +var f = asmLink(asmCompile('glob', 'ffis', 'buf', USE_ASM + "function g() { var i=0; while (1) { i=(i+1)|0 } } function f() { g() } return f")); +timeout(1); +if (getBuildConfiguration("arm-simulator")) + enableSingleStepProfiling(); +f(); +assertEq(true, false); diff --git a/js/src/jit-test/tests/asm.js/testTimeout7.js b/js/src/jit-test/tests/asm.js/testTimeout7.js new file mode 100644 index 0000000000..10fcb71d1a --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testTimeout7.js @@ -0,0 +1,17 @@ +// |jit-test| exitstatus: 6; skip-if: helperThreadCount() == 0 + +var job = offThreadCompileToStencil(` + function asmModule() { + "use asm"; + function f() { + while(1) { + } + } + return f; + } +`); +var stencil = finishOffThreadStencil(job); +evalStencil(stencil); +timeout(1); +asmModule()(); +assertEq(true, false); diff --git a/js/src/jit-test/tests/asm.js/testUseAsmWarnings.js b/js/src/jit-test/tests/asm.js/testUseAsmWarnings.js new file mode 100644 index 0000000000..2c260dd98f --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testUseAsmWarnings.js @@ -0,0 +1,14 @@ +load(libdir + "asm.js"); + +assertAsmDirectiveFail("'use asm'"); +assertAsmDirectiveFail("eval('\"use asm\";');"); +assertAsmDirectiveFail("{ eval('\"use asm\";'); }"); +assertAsmDirectiveFail("if (Math) { 'use asm'; }"); +assertAsmDirectiveFail("function f(){ { 'use asm'; } }"); +assertAsmDirectiveFail("function f(){ ; 'use asm'; }"); +assertAsmDirectiveFail("function f(){ 1; 'use asm'; }"); +assertAsmDirectiveFail("function f(){ var x; 'use asm'; }"); +assertAsmDirectiveFail("function f(){ if (Math) { 'use asm'; } }"); +assertAsmDirectiveFail("(function(){ eval('\"use asm\";') })()"); +assertAsmDirectiveFail("new Function('{\"use asm\";}')"); +assertAsmDirectiveFail("new Function('if (Math){\"use asm\";}')"); diff --git a/js/src/jit-test/tests/asm.js/testX86ByteStore.js b/js/src/jit-test/tests/asm.js/testX86ByteStore.js new file mode 100644 index 0000000000..05556a5d9a --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testX86ByteStore.js @@ -0,0 +1,77 @@ +load(libdir + "asm.js"); + +var body = +' "use asm";\ + var i8=new global.Int8Array(buffer);\ + function g(i,j,k) {\ + i=i|0;\ + j=j|0;\ + k=k|0;\ + var a=0,b=0,c=0,d=0,e=0,f=0;\ + a=(i+j)|0;\ + b=(k+j)|0;\ + c=(i+k)|0;\ + b=(a+b)|0;\ + d=(b+c+i+j)|0;\ + e=(a+j+c)|0;\ + f=(a+i+k)|0;\ + i8[i] = f;\ + return (a+b+c+d+e+f)|0;\ + }\ + return g;'; + +var buf=new ArrayBuffer(BUF_MIN); +var g = asmLink(asmCompile('global','foreign','buffer',body), this, null, buf); +assertEq(g(1,2,3), 46); +assertEq(new Int8Array(buf)[1], 7); + +var body = +' "use asm";\ + var i8=new global.Int8Array(buffer);\ + function g(i,j,k) {\ + i=i|0;\ + j=j|0;\ + k=k|0;\ + var a=0,b=0,c=0,d=0,e=0,f=0;\ + a=(i+j)|0;\ + b=(k+j)|0;\ + c=(i+k)|0;\ + b=(a+b)|0;\ + d=(b+c+i+j)|0;\ + e=(a+j+c)|0;\ + f=(a+i+k)|0;\ + i8[i] = e;\ + return (a+b+c+d+e+f)|0;\ + }\ + return g;'; + +var buf=new ArrayBuffer(BUF_MIN); +var g = asmLink(asmCompile('global','foreign','buffer',body), this, null, buf); +assertEq(g(1,2,3), 46); +assertEq(new Int8Array(buf)[1], 9); + +var body = +' "use asm";\ + var i8=new global.Int8Array(buffer);\ + function g(i,j,k) {\ + i=i|0;\ + j=j|0;\ + k=k|0;\ + var a=0,b=0,c=0,d=0,e=0,f=0,g=0;\ + a=(i+j)|0;\ + b=(k+j)|0;\ + c=(i+k)|0;\ + b=(a+b)|0;\ + d=(b+c+i+j)|0;\ + e=(a+j+c)|0;\ + f=(a+i+k)|0;\ + g=(f+j+b)|0;\ + i8[i] = g;\ + return (a+b+c+d+e+f+g)|0;\ + }\ + return g;'; + +var buf=new ArrayBuffer(BUF_MIN); +var g = asmLink(asmCompile('global','foreign','buffer',body), this, null, buf); +assertEq(g(1,2,3), 63); +assertEq(new Int8Array(buf)[1], 17); diff --git a/js/src/jit-test/tests/asm.js/testZOOB.js b/js/src/jit-test/tests/asm.js/testZOOB.js new file mode 100644 index 0000000000..1d211cdc98 --- /dev/null +++ b/js/src/jit-test/tests/asm.js/testZOOB.js @@ -0,0 +1,122 @@ +// |jit-test| skip-if: !isAsmJSCompilationAvailable() +load(libdir + "asm.js"); +load(libdir + "asserts.js"); + +// This test runs a lot of code and is very slow with --ion-eager. Use a minimum +// Ion warmup trigger of 5 to avoid timeouts. +if (getJitCompilerOptions()["ion.warmup.trigger"] < 5) + setJitCompilerOption("ion.warmup.trigger", 5); + +var ab = new ArrayBuffer(BUF_MIN); + +// Compute a set of interesting indices. +indices = [0] +for (var i of [4,1024,BUF_MIN,Math.pow(2,30),Math.pow(2,31),Math.pow(2,32),Math.pow(2,33)]) { + for (var j of [-2,-1,0,1,2]) { + for (var k of [1,-1]) + indices.push((i+j)*k); + } +} + +function testInt(ctor, shift, scale, disp) { + var arr = new ctor(ab); + + var c = asmCompile('glob', 'imp', 'b', + USE_ASM + + 'var arr=new glob.' + ctor.name + '(b); ' + + 'function load(i) {i=i|0; return arr[((i<<' + scale + ')+' + disp + ')>>' + shift + ']|0 } ' + + 'function store(i,j) {i=i|0;j=j|0; arr[((i<<' + scale + ')+' + disp + ')>>' + shift + '] = j } ' + + 'function storeZero(i) {i=i|0; arr[((i<<' + scale + ')+' + disp + ')>>' + shift + '] = 0 } ' + + 'function storeNegOne(i) {i=i|0; arr[((i<<' + scale + ')+' + disp + ')>>' + shift + '] = -1 } ' + + 'return { load: load, store: store, storeZero: storeZero, storeNegOne: storeNegOne }'); + var f = asmLink(c, this, null, ab); + + var v = arr[0]; + arr[0] = -1; + var negOne = arr[0]|0; + arr[0] = v; + + for (var i of indices) { + var index = ((i<>shift; + v = arr[index]|0; + + // Loads + assertEq(f.load(i), v); + + // Stores of immediates + arr[index] = 1; + f.storeZero(i); + assertEq(arr[index]|0, 0); + f.storeNegOne(i); + assertEq(arr[index]|0, index>>>0 < arr.length ? negOne : 0); + + // Stores + arr[index] = ~v; + f.store(i, v); + assertEq(arr[index]|0, v); + } +} + +function testFloat(ctor, shift, scale, disp, coercion) { + var arr = new ctor(ab); + + var c = asmCompile('glob', 'imp', 'b', + USE_ASM + + 'var arr=new glob.' + ctor.name + '(b); ' + + 'var toF = glob.Math.fround; ' + + 'function load(i) {i=i|0; return ' + coercion + '(arr[((i<<' + scale + ')+' + disp + ')>>' + shift + ']) } ' + + 'function store(i,j) {i=i|0;j=+j; arr[((i<<' + scale + ')+' + disp + ')>>' + shift + '] = j } ' + + 'return { load: load, store: store }'); + var f = asmLink(c, this, null, ab); + + for (var i of indices) { + var index = ((i<>shift; + var v = +arr[index]; + + // Loads + assertEq(f.load(i), v); + + // Stores + arr[index] = ~v; + f.store(i, v); + assertEq(+arr[index], v); + } +} + +function testFloat32(ctor, shift, scale, disp) { + testFloat(ctor, shift, scale, disp, "toF"); +} +function testFloat64(ctor, shift, scale, disp) { + testFloat(ctor, shift, scale, disp, "+"); +} + +function assertEqX4(observed, expected) { + assertEq(observed.x, expected.x); + assertEq(observed.y, expected.y); + assertEq(observed.z, expected.z); + assertEq(observed.w, expected.w); +} + +function test(tester, ctor, shift) { + var arr = new ctor(ab); + for (var i = 0; i < arr.length; i++) + arr[i] = Math.imul(i, Math.imul((i & 1), 2) - 1); + for (scale of [0,1,2,3]) { + for (disp of [0,1,2,8,Math.pow(2,30),Math.pow(2,31)-1,Math.pow(2,31),Math.pow(2,32)-1]) + tester(ctor, shift, scale, disp); + } + for (var i = 0; i < arr.length; i++) { + var v = arr[i]; + arr[i] = Math.imul(i, Math.imul((i & 1), 2) - 1); + assertEq(arr[i], v); + } +} + +test(testInt, Int8Array, 0); +test(testInt, Uint8Array, 0); +test(testInt, Int16Array, 1); +test(testInt, Uint16Array, 1); +test(testInt, Int32Array, 2); +test(testInt, Uint32Array, 2); +test(testFloat32, Float32Array, 2); +test(testFloat64, Float64Array, 3); diff --git a/js/src/jit-test/tests/async/await-exception-stack-in-finally-1.js b/js/src/jit-test/tests/async/await-exception-stack-in-finally-1.js new file mode 100644 index 0000000000..bfdc586c06 --- /dev/null +++ b/js/src/jit-test/tests/async/await-exception-stack-in-finally-1.js @@ -0,0 +1,25 @@ +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}) + +// Throw an exception from a different compartment. +var thrower = g.Function(` + throw 0; +`); + +async function throwAndAwait() { + try { + thrower(); + } finally { + // The |finally| block is entered with the exception stack on the function + // stack. The function stack is saved in the generator object when executing + // |await|, so the exception stack, which was created in a different + // compartment, has to be wrapped into the current compartment. + await {}; + } +} +throwAndAwait().then(() => { + throw new Error("missing error"); +}, e => { + assertEq(e, 0); +}); diff --git a/js/src/jit-test/tests/async/await-exception-stack-in-finally-2.js b/js/src/jit-test/tests/async/await-exception-stack-in-finally-2.js new file mode 100644 index 0000000000..93ad6c591f --- /dev/null +++ b/js/src/jit-test/tests/async/await-exception-stack-in-finally-2.js @@ -0,0 +1,17 @@ +ignoreUnhandledRejections(); + +var g = newGlobal({newCompartment: true}) + +// Throw an exception from a different compartment. +var thrower = g.Function(` + throw 0; +`); + +async function justThrow() { + thrower(); +} + +justThrow(); + +// Nuke wrappers and make sure we don't crash. +nukeAllCCWs(); diff --git a/js/src/jit-test/tests/async/await-exception-stack-in-finally-3.js b/js/src/jit-test/tests/async/await-exception-stack-in-finally-3.js new file mode 100644 index 0000000000..f7c672c4da --- /dev/null +++ b/js/src/jit-test/tests/async/await-exception-stack-in-finally-3.js @@ -0,0 +1,21 @@ +ignoreUnhandledRejections(); + +var g = newGlobal({newCompartment: true}) + +// Allow |g| to nuke wrappers from the main compartment. +g.nuke = () => { + // Nuke wrappers and make sure we don't crash. + nukeAllCCWs(); +}; + +// Throw an exception from a different compartment. +var thrower = g.Function(` + nuke(); + throw 0; +`); + +async function justThrow() { + thrower(); +} + +justThrow(); diff --git a/js/src/jit-test/tests/async/bug1773650.js b/js/src/jit-test/tests/async/bug1773650.js new file mode 100644 index 0000000000..8fcc3cf743 --- /dev/null +++ b/js/src/jit-test/tests/async/bug1773650.js @@ -0,0 +1,58 @@ +// This approach is based on async/debugger-reject-after-fulfill.js +function searchLastBreakpointBeforeReturn(declCode, callCode) { + const g = newGlobal({ newCompartment: true }); + const dbg = new Debugger(g); + g.eval(declCode); + + let offset = 0; + dbg.onEnterFrame = function(frame) { + if (frame.callee && frame.callee.name == "f") { + frame.onStep = () => { + if (!g.returning) { + return undefined; + } + + offset = frame.offset; + return undefined; + }; + } + }; + g.eval(callCode); + drainJobQueue(); + assertEq(offset != 0, true); + return offset; +} + +let declaration = ` + var returning = false; + async function f() { + try { + throw undefined; + } catch (exc) { + try { + return (returning = true, "expected"); + } catch {} + } + }`; +let call = "var p = f();" + +let offset = searchLastBreakpointBeforeReturn(declaration, call); + +let g = newGlobal({ newCompartment: true }); +let dbg = new Debugger(g); +g.eval(declaration); + +dbg.onEnterFrame = function(frame) { + if (frame.callee && frame.callee.name == "f") { + dbg.onEnterFrame = undefined; + frame.script.setBreakpoint(offset, { + hit() { + return { throw: "unexpected" }; + } + }); + } +}; + +try { + g.eval(call); +} catch {} diff --git a/js/src/jit-test/tests/async/debugger-reject-after-fulfill.js b/js/src/jit-test/tests/async/debugger-reject-after-fulfill.js new file mode 100644 index 0000000000..6f147e3705 --- /dev/null +++ b/js/src/jit-test/tests/async/debugger-reject-after-fulfill.js @@ -0,0 +1,229 @@ +// Throwing error after resolving async function's promise should not +// overwrite the promise's state or value/reason. +// This situation can happen either with debugger interaction or OOM. + +// This testcase relies on the fact that there's a breakpoint after resolving +// the async function's promise, before leaving the async function's frame. +// This function searches for the last breakpoint before leaving the frame. +// +// - `declCode` should declare an async function `f`, and the function should +// set global variable `returning` to `true` just before return +// - `callCode` should call the function `f` and make sure the function's +// execution reaches the last breakpoint +function searchLastBreakpointBeforeReturn(declCode, callCode) { + const g = newGlobal({ newCompartment: true }); + const dbg = new Debugger(g); + g.eval(declCode); + + let hit = false; + let offset = 0; + dbg.onEnterFrame = function(frame) { + if (frame.callee && frame.callee.name == "f") { + frame.onStep = () => { + if (!g.returning) { + return undefined; + } + + offset = frame.offset; + return undefined; + }; + } + }; + + g.eval(callCode); + + drainJobQueue(); + + assertEq(offset != 0, true); + + return offset; +} + +function testWithoutAwait() { + const declCode = ` + var returning = false; + async function f() { + return (returning = true, "expected"); + }; + `; + + const callCode = ` + var p = f(); + `; + + const offset = searchLastBreakpointBeforeReturn(declCode, callCode); + + const g = newGlobal({ newCompartment: true }); + const dbg = new Debugger(g); + g.eval(declCode); + + let onPromiseSettledCount = 0; + dbg.onPromiseSettled = function(promise) { + onPromiseSettledCount++; + // No promise should be rejected. + assertEq(promise.promiseState, "fulfilled"); + + // Async function's promise should have expected value. + if (onPromiseSettledCount == 1) { + assertEq(promise.promiseValue, "expected"); + } + }; + + let hitBreakpoint = false; + dbg.onEnterFrame = function(frame) { + if (frame.callee && frame.callee.name == "f") { + dbg.onEnterFrame = undefined; + frame.script.setBreakpoint(offset, { + hit() { + hitBreakpoint = true; + return { throw: "unexpected" }; + } + }); + } + }; + + enableLastWarning(); + + g.eval(` + var fulfilledValue; + var rejected = false; + `); + + g.eval(callCode); + + // The execution reaches to the last breakpoint without running job queue. + assertEq(hitBreakpoint, true); + + const warn = getLastWarning(); + assertEq(warn.message, + "unhandlable error after resolving async function's promise"); + clearLastWarning(); + + // Add reaction handler after resolution. + // This handler's job will be enqueued immediately. + g.eval(` + p.then(x => { + fulfilledValue = x; + }, e => { + rejected = true; + }); + `); + + // Run the above handler. + drainJobQueue(); + + assertEq(g.fulfilledValue, "expected"); + assertEq(onPromiseSettledCount >= 1, true); +} + +function testWithAwait() { + const declCode = ` + var resolve; + var p = new Promise(r => { resolve = r }); + var returning = false; + async function f() { + await p; + return (returning = true, "expected"); + }; + `; + + const callCode = ` + var p = f(); + `; + + const resolveCode = ` + resolve("resolve"); + `; + + const offset = searchLastBreakpointBeforeReturn(declCode, + callCode + resolveCode); + + const g = newGlobal({newCompartment: true}); + const dbg = new Debugger(g); + g.eval(declCode); + + let onPromiseSettledCount = 0; + dbg.onPromiseSettled = function(promise) { + onPromiseSettledCount++; + + // No promise should be rejected. + assertEq(promise.promiseState, "fulfilled"); + + // Async function's promise should have expected value. + if (onPromiseSettledCount == 2) { + assertEq(promise.promiseValue, "expected"); + } + }; + + let hitBreakpoint = false; + dbg.onEnterFrame = function(frame) { + if (frame.callee && frame.callee.name == "f") { + dbg.onEnterFrame = undefined; + frame.script.setBreakpoint(offset, { + hit() { + hitBreakpoint = true; + return { throw: "unexpected" }; + } + }); + } + }; + + enableLastWarning(); + + g.eval(` + var fulfilledValue1; + var fulfilledValue2; + var rejected = false; + `); + + g.eval(callCode); + + assertEq(getLastWarning(), null); + + // Add reaction handler before resolution. + // This handler's job will be enqueued when `p` is resolved. + g.eval(` + p.then(x => { + fulfilledValue1 = x; + }, e => { + rejected = true; + }); + `); + + g.eval(resolveCode); + + // Run the remaining part of async function, and the above handler. + drainJobQueue(); + + // The execution reaches to the last breakpoint after running job queue for + // resolving `p`. + assertEq(hitBreakpoint, true); + + const warn = getLastWarning(); + assertEq(warn.message, + "unhandlable error after resolving async function's promise"); + clearLastWarning(); + + assertEq(g.fulfilledValue1, "expected"); + assertEq(g.rejected, false); + + // Add reaction handler after resolution. + // This handler's job will be enqueued immediately. + g.eval(` + p.then(x => { + fulfilledValue2 = x; + }, e => { + rejected = true; + }); + `); + + // Run the above handler. + drainJobQueue(); + + assertEq(g.fulfilledValue2, "expected"); + assertEq(g.rejected, false); + assertEq(onPromiseSettledCount >= 3, true); +} + +testWithoutAwait(); +testWithAwait(); diff --git a/js/src/jit-test/tests/async/ecma262-issue-1461.js b/js/src/jit-test/tests/async/ecma262-issue-1461.js new file mode 100644 index 0000000000..7449c303b0 --- /dev/null +++ b/js/src/jit-test/tests/async/ecma262-issue-1461.js @@ -0,0 +1,22 @@ +// changes a detail of +// error-handling in %AsyncFromSyncIteratorPrototype% methods. This test is +// based on a comment in the thread where the issue was first reported, +// + +let log = []; + +{ + async function f() { + var p = Promise.resolve(0); + Object.defineProperty(p, "constructor", {get() { throw "hi" }}); + for await (var x of [p]); + } + Promise.resolve(0) + .then(() => log.push("tick 1")) + .then(() => log.push("tick 2")) + .then(() => log.push("tick 3")); + f().catch(exc => log.push(exc)); +} + +drainJobQueue(); +assertEq(log.join(), "tick 1,tick 2,hi,tick 3"); diff --git a/js/src/jit-test/tests/atomics/basic-tests.js b/js/src/jit-test/tests/atomics/basic-tests.js new file mode 100644 index 0000000000..3712dd1b6f --- /dev/null +++ b/js/src/jit-test/tests/atomics/basic-tests.js @@ -0,0 +1,564 @@ +// Basic functional tests for the Atomics primitives. +// +// These do not test atomicity, just that calling and coercions and +// indexing and exception behavior all work right. +// +// These do not test the wait/wake operations. + +load(libdir + "asserts.js"); + +var DEBUG = false; // Set to true for useful printouts + +function dprint(...xs) { + if (!DEBUG) + return; + var s = ""; + for ( var x in xs ) + s += String(xs[x]); + print(s); +} + +// Clone a function so that we get reliable inlining of primitives with --ion-eager. +// For eg testMethod and testFunction that are polymorphic in the array a, +// the inliner gets confused and stops inlining after Int8 -- not what we want. +function CLONE(f) { + return this.eval("(" + f.toString() + ")"); +} + +function testMethod(a, ...indices) { + dprint("Method: " + a.constructor.name); + var poison; + switch (a.BYTES_PER_ELEMENT) { + case 1: poison = 0x5A; break; + case 2: poison = 0x5A5A; break; + case 4: poison = 0x5A5A5A5A; break; + } + for ( var i=0 ; i < indices.length ; i++ ) { + var x = indices[i]; + if (x > 0) + a[x-1] = poison; + if (x < a.length-1) + a[x+1] = poison; + + // val = 0 + assertEq(Atomics.compareExchange(a, x, 0, 37), 0); + // val = 37 + assertEq(Atomics.compareExchange(a, x, 37, 5), 37); + // val = 5 + assertEq(Atomics.compareExchange(a, x, 7, 8), 5); // ie should fail + // val = 5 + assertEq(Atomics.compareExchange(a, x, 5, 9), 5); + // val = 9 + assertEq(Atomics.compareExchange(a, x, 5, 0), 9); // should also fail + + // val = 9 + assertEq(Atomics.exchange(a, x, 4), 9); + // val = 4 + assertEq(Atomics.exchange(a, x, 9), 4); + + // val = 9 + assertEq(Atomics.load(a, x), 9); + // val = 9 + assertEq(Atomics.store(a, x, 14), 14); // What about coercion? + // val = 14 + assertEq(Atomics.load(a, x), 14); + // val = 14 + Atomics.store(a, x, 0); + // val = 0 + + // val = 0 + assertEq(Atomics.add(a, x, 3), 0); + // val = 3 + assertEq(Atomics.sub(a, x, 2), 3); + // val = 1 + assertEq(Atomics.or(a, x, 6), 1); + // val = 7 + assertEq(Atomics.and(a, x, 14), 7); + // val = 6 + assertEq(Atomics.xor(a, x, 5), 6); + // val = 3 + assertEq(Atomics.load(a, x), 3); + // val = 3 + Atomics.store(a, x, 0); + // val = 0 + + // Check adjacent elements were not affected + if (x > 0) { + assertEq(a[x-1], poison); + a[x-1] = 0; + } + if (x < a.length-1) { + assertEq(a[x+1], poison); + a[x+1] = 0; + } + } +} + +function testFunction(a, ...indices) { + dprint("Function: " + a.constructor.name); + var poison; + switch (a.BYTES_PER_ELEMENT) { + case 1: poison = 0x5A; break; + case 2: poison = 0x5A5A; break; + case 4: poison = 0x5A5A5A5A; break; + } + for ( var i=0 ; i < indices.length ; i++ ) { + var x = indices[i]; + if (x > 0) + a[x-1] = poison; + if (x < a.length-1) + a[x+1] = poison; + + // val = 0 + assertEq(gAtomics_compareExchange(a, x, 0, 37), 0); + // val = 37 + assertEq(gAtomics_compareExchange(a, x, 37, 5), 37); + // val = 5 + assertEq(gAtomics_compareExchange(a, x, 7, 8), 5); // ie should fail + // val = 5 + assertEq(gAtomics_compareExchange(a, x, 5, 9), 5); + // val = 9 + assertEq(gAtomics_compareExchange(a, x, 5, 0), 9); // should also fail + + // val = 9 + assertEq(gAtomics_exchange(a, x, 4), 9); + // val = 4 + assertEq(gAtomics_exchange(a, x, 9), 4); + + // val = 9 + assertEq(gAtomics_load(a, x), 9); + // val = 9 + assertEq(gAtomics_store(a, x, 14), 14); // What about coercion? + // val = 14 + assertEq(gAtomics_load(a, x), 14); + // val = 14 + gAtomics_store(a, x, 0); + // val = 0 + + // val = 0 + assertEq(gAtomics_add(a, x, 3), 0); + // val = 3 + assertEq(gAtomics_sub(a, x, 2), 3); + // val = 1 + assertEq(gAtomics_or(a, x, 6), 1); + // val = 7 + assertEq(gAtomics_and(a, x, 14), 7); + // val = 6 + assertEq(gAtomics_xor(a, x, 5), 6); + // val = 3 + assertEq(gAtomics_load(a, x), 3); + // val = 3 + gAtomics_store(a, x, 0); + // val = 0 + + // Check adjacent elements were not affected + if (x > 0) { + assertEq(a[x-1], poison); + a[x-1] = 0; + } + if (x < a.length-1) { + assertEq(a[x+1], poison); + a[x+1] = 0; + } + } +} + +function testTypeCAS(a) { + dprint("Type: " + a.constructor.name); + + var thrown = false; + try { + Atomics.compareExchange([0], 0, 0, 1); + } + catch (e) { + thrown = true; + assertEq(e instanceof TypeError, true); + } + assertEq(thrown, true); + + // All these variants should be OK + Atomics.compareExchange(a, 0, 0.7, 1.8); + Atomics.compareExchange(a, 0, "0", 1); + Atomics.compareExchange(a, 0, 0, "1"); + Atomics.compareExchange(a, 0, 0); +} + +function testTypeBinop(a, op) { + dprint("Type: " + a.constructor.name); + + var thrown = false; + try { + op([0], 0, 1); + } + catch (e) { + thrown = true; + assertEq(e instanceof TypeError, true); + } + assertEq(thrown, true); + + // These are all OK + op(a, 0, 0.7); + op(a, 0, "0"); + op(a, 0); +} + +var globlength = 0; // Will be set later + +function testRangeCAS(a) { + dprint("Range: " + a.constructor.name); + + var msg = /out-of-range index/; // A generic message + + assertErrorMessage(() => Atomics.compareExchange(a, -1, 0, 1), RangeError, msg); + assertEq(a[0], 0); + + // Converted to 0 + assertEq(Atomics.compareExchange(a, "hi", 0, 33), 0); + assertEq(a[0], 33); + a[0] = 0; + + assertErrorMessage(() => Atomics.compareExchange(a, a.length + 5, 0, 1), RangeError, msg); + assertEq(a[0], 0); + + assertErrorMessage(() => Atomics.compareExchange(a, globlength, 0, 1), RangeError, msg); + assertEq(a[0], 0); +} + +// Ad-hoc tests for extreme and out-of-range values. +// None of these should throw + +function testInt8Extremes(a) { + dprint("Int8 extremes"); + + a[10] = 0; + a[11] = 0; + + Atomics.store(a, 10, 255); + assertEq(a[10], -1); + assertEq(Atomics.load(a, 10), -1); + + Atomics.add(a, 10, 255); // should coerce to -1 + assertEq(a[10], -2); + assertEq(Atomics.load(a, 10), -2); + + Atomics.add(a, 10, -1); + assertEq(a[10], -3); + assertEq(Atomics.load(a, 10), -3); + + Atomics.sub(a, 10, 255); // should coerce to -1 + assertEq(a[10], -2); + assertEq(Atomics.load(a, 10), -2); + + Atomics.sub(a, 10, 256); // should coerce to 0 + assertEq(a[10], -2); + assertEq(Atomics.load(a, 10), -2); + + Atomics.and(a, 10, -1); // Preserve all + assertEq(a[10], -2); + assertEq(Atomics.load(a, 10), -2); + + Atomics.and(a, 10, 256); // Preserve none + assertEq(a[10], 0); + assertEq(Atomics.load(a, 10), 0); + + Atomics.store(a, 10, 255); + assertEq(Atomics.exchange(a, 10, 0), -1); + + assertEq(a[11], 0); +} + +function testUint8Extremes(a) { + dprint("Uint8 extremes"); + + a[10] = 0; + a[11] = 0; + + Atomics.store(a, 10, 255); + assertEq(a[10], 255); + assertEq(Atomics.load(a, 10), 255); + + Atomics.add(a, 10, 255); + assertEq(a[10], 254); + assertEq(Atomics.load(a, 10), 254); + + Atomics.add(a, 10, -1); + assertEq(a[10], 253); + assertEq(Atomics.load(a, 10), 253); + + Atomics.sub(a, 10, 255); + assertEq(a[10], 254); + assertEq(Atomics.load(a, 10), 254); + + Atomics.and(a, 10, -1); // Preserve all + assertEq(a[10], 254); + assertEq(Atomics.load(a, 10), 254); + + Atomics.and(a, 10, 256); // Preserve none + assertEq(a[10], 0); + assertEq(Atomics.load(a, 10), 0); + + Atomics.store(a, 10, 255); + assertEq(Atomics.exchange(a, 10, 0), 255); + + assertEq(a[11], 0); +} + +function testInt16Extremes(a) { + dprint("Int16 extremes"); + + a[10] = 0; + a[11] = 0; + + Atomics.store(a, 10, 65535); + assertEq(a[10], -1); + assertEq(Atomics.load(a, 10), -1); + + Atomics.add(a, 10, 65535); // should coerce to -1 + assertEq(a[10], -2); + assertEq(Atomics.load(a, 10), -2); + + Atomics.add(a, 10, -1); + assertEq(a[10], -3); + assertEq(Atomics.load(a, 10), -3); + + Atomics.sub(a, 10, 65535); // should coerce to -1 + assertEq(a[10], -2); + assertEq(Atomics.load(a, 10), -2); + + Atomics.sub(a, 10, 65536); // should coerce to 0 + assertEq(a[10], -2); + assertEq(Atomics.load(a, 10), -2); + + Atomics.and(a, 10, -1); // Preserve all + assertEq(a[10], -2); + assertEq(Atomics.load(a, 10), -2); + + Atomics.and(a, 10, 65536); // Preserve none + assertEq(a[10], 0); + assertEq(Atomics.load(a, 10), 0); + + assertEq(a[11], 0); +} + +function testUint32(a) { + var k = 0; + for ( var i=0 ; i < 20 ; i++ ) { + a[i] = i+5; + k += a[i]; + } + + var sum = 0; + for ( var i=0 ; i < 20 ; i++ ) + sum += Atomics.add(a, i, 1); + + assertEq(sum, k); +} + +// This test is a reliable test of sign extension in the JIT where +// testInt8Extremes is not (because there may not be enough type +// information without a loop - see bug 1181062 for a description +// of the general problem). + +function exchangeLoop(ta) { + var sum = 0; + for ( var i=0 ; i < 100000 ; i++ ) + sum += Atomics.exchange(ta, i & 15, 255); + return sum; +} + +function adHocExchange(SharedOrUnsharedArrayBuffer) { + var a = new Int8Array(new SharedOrUnsharedArrayBuffer(16)); + for ( var i=0 ; i < a.length ; i++ ) + a[i] = 255; + assertEq(exchangeLoop(a), -100000); +} + +// isLockFree(n) may return true only if there is an integer array +// on which atomic operations is allowed whose byte size is n, +// ie, it must return false for n=7. +// +// SpiderMonkey has isLockFree(1), isLockFree(2), isLockFree(8), isLockFree(4) +// on all supported platforms, only the last is guaranteed by the spec. + +var sizes = [ 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12]; +var answers = [ true, true, false, true, false, false, false, true, + false, false, false, false]; + +function testIsLockFree() { + // This ought to defeat most compile-time resolution. + for ( var i=0 ; i < sizes.length ; i++ ) { + var v = Atomics.isLockFree(sizes[i]); + var a = answers[i]; + assertEq(typeof v, 'boolean'); + assertEq(v, a); + } + + // This ought to be optimizable. + assertEq(Atomics.isLockFree(1), true); + assertEq(Atomics.isLockFree(2), true); + assertEq(Atomics.isLockFree(3), false); + assertEq(Atomics.isLockFree(4), true); + assertEq(Atomics.isLockFree(5), false); + assertEq(Atomics.isLockFree(6), false); + assertEq(Atomics.isLockFree(7), false); + assertEq(Atomics.isLockFree(8), true); + assertEq(Atomics.isLockFree(9), false); + assertEq(Atomics.isLockFree(10), false); + assertEq(Atomics.isLockFree(11), false); + assertEq(Atomics.isLockFree(12), false); +} + +function testIsLockFree2() { + assertEq(Atomics.isLockFree(0), false); + assertEq(Atomics.isLockFree(0/-1), false); + assertEq(Atomics.isLockFree(3.5), false); + assertEq(Atomics.isLockFree(Number.NaN), false); // NaN => +0 + assertEq(Atomics.isLockFree(Number.POSITIVE_INFINITY), false); + assertEq(Atomics.isLockFree(Number.NEGATIVE_INFINITY), false); + assertEq(Atomics.isLockFree(-4), false); + assertEq(Atomics.isLockFree('4'), true); + assertEq(Atomics.isLockFree('-4'), false); + assertEq(Atomics.isLockFree('4.5'), true); + assertEq(Atomics.isLockFree('5.5'), false); + assertEq(Atomics.isLockFree(new Number(4)), true); + assertEq(Atomics.isLockFree(new String('4')), true); + assertEq(Atomics.isLockFree(new Boolean(true)), true); + var thrown = false; + try { + Atomics.isLockFree(Symbol('1')); + } catch (e) { + thrown = e; + } + assertEq(thrown instanceof TypeError, true); + assertEq(Atomics.isLockFree(true), true); + assertEq(Atomics.isLockFree(false), false); + assertEq(Atomics.isLockFree(undefined), false); + assertEq(Atomics.isLockFree(null), false); + assertEq(Atomics.isLockFree({toString: () => '4'}), true); + assertEq(Atomics.isLockFree({valueOf: () => 4}), true); + assertEq(Atomics.isLockFree({valueOf: () => 5}), false); + assertEq(Atomics.isLockFree({password: "qumquat"}), false); +} + +function testUint8Clamped(sab) { + var ta = new Uint8ClampedArray(sab); + var thrown = false; + try { + CLONE(testMethod)(ta, 0); + } + catch (e) { + thrown = true; + assertEq(e instanceof TypeError, true); + } + assertEq(thrown, true); +} + +function testWeirdIndices(SharedOrUnsharedArrayBuffer) { + var a = new Int8Array(new SharedOrUnsharedArrayBuffer(16)); + a[3] = 10; + assertEq(Atomics.load(a, "0x03"), 10); + assertEq(Atomics.load(a, {valueOf: () => 3}), 10); +} + +function isLittleEndian() { + var xxx = new ArrayBuffer(2); + var xxa = new Int16Array(xxx); + var xxb = new Int8Array(xxx); + xxa[0] = 37; + var is_little = xxb[0] == 37; + return is_little; +} + +function runTests(SharedOrUnsharedArrayBuffer) { + var is_little = isLittleEndian(); + + // Currently the SharedArrayBuffer needs to be a multiple of 4K bytes in size. + var sab = new SharedOrUnsharedArrayBuffer(4096); + + // Test that two arrays created on the same storage alias + var t1 = new Int8Array(sab); + var t2 = new Uint16Array(sab); + + assertEq(t1[0], 0); + assertEq(t2[0], 0); + t1[0] = 37; + if (is_little) + assertEq(t2[0], 37); + else + assertEq(t2[0], 37 << 8); + t1[0] = 0; + + // Test that invoking as Atomics.whatever() works, on correct arguments. + CLONE(testMethod)(new Int8Array(sab), 0, 42, 4095); + CLONE(testMethod)(new Uint8Array(sab), 0, 42, 4095); + CLONE(testMethod)(new Int16Array(sab), 0, 42, 2047); + CLONE(testMethod)(new Uint16Array(sab), 0, 42, 2047); + CLONE(testMethod)(new Int32Array(sab), 0, 42, 1023); + CLONE(testMethod)(new Uint32Array(sab), 0, 42, 1023); + + // Test that invoking as v = Atomics.whatever; v() works, on correct arguments. + gAtomics_compareExchange = Atomics.compareExchange; + gAtomics_exchange = Atomics.exchange; + gAtomics_load = Atomics.load; + gAtomics_store = Atomics.store; + gAtomics_add = Atomics.add; + gAtomics_sub = Atomics.sub; + gAtomics_and = Atomics.and; + gAtomics_or = Atomics.or; + gAtomics_xor = Atomics.xor; + + CLONE(testFunction)(new Int8Array(sab), 0, 42, 4095); + CLONE(testFunction)(new Uint8Array(sab), 0, 42, 4095); + CLONE(testFunction)(new Int16Array(sab), 0, 42, 2047); + CLONE(testFunction)(new Uint16Array(sab), 0, 42, 2047); + CLONE(testFunction)(new Int32Array(sab), 0, 42, 1023); + CLONE(testFunction)(new Uint32Array(sab), 0, 42, 1023); + + // Test various range and type conditions + var v8 = new Int8Array(sab); + var v32 = new Int32Array(sab); + + CLONE(testTypeCAS)(v8); + CLONE(testTypeCAS)(v32); + + CLONE(testTypeBinop)(v8, Atomics.add); + CLONE(testTypeBinop)(v8, Atomics.sub); + CLONE(testTypeBinop)(v8, Atomics.and); + CLONE(testTypeBinop)(v8, Atomics.or); + CLONE(testTypeBinop)(v8, Atomics.xor); + + CLONE(testTypeBinop)(v32, Atomics.add); + CLONE(testTypeBinop)(v32, Atomics.sub); + CLONE(testTypeBinop)(v32, Atomics.and); + CLONE(testTypeBinop)(v32, Atomics.or); + CLONE(testTypeBinop)(v32, Atomics.xor); + + // Test out-of-range references + globlength = v8.length + 5; + CLONE(testRangeCAS)(v8); + globlength = v32.length + 5; + CLONE(testRangeCAS)(v32); + + // Test extreme values + testInt8Extremes(new Int8Array(sab)); + testUint8Extremes(new Uint8Array(sab)); + testInt16Extremes(new Int16Array(sab)); + testUint32(new Uint32Array(sab)); + + // Test that Uint8ClampedArray is not accepted. + testUint8Clamped(sab); + + // Misc ad-hoc tests + adHocExchange(SharedOrUnsharedArrayBuffer); + + // Misc + testIsLockFree(); + testIsLockFree2(); + testWeirdIndices(SharedOrUnsharedArrayBuffer); + + assertEq(Atomics[Symbol.toStringTag], "Atomics"); +} + +runTests(SharedArrayBuffer); +runTests(ArrayBuffer); diff --git a/js/src/jit-test/tests/atomics/bigint-add-for-effect.js b/js/src/jit-test/tests/atomics/bigint-add-for-effect.js new file mode 100644 index 0000000000..bed65c6aae --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-add-for-effect.js @@ -0,0 +1,103 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testAdd() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + // Test with constant index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + Atomics.add(int64, 0, value); + assertEq(int64[0], BigInt.asIntN(64, value)); + + Atomics.add(uint64, 0, value); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + Atomics.add(int64, 0, -value); + assertEq(int64[0], 0n); + + Atomics.add(uint64, 0, -value); + assertEq(uint64[0], 0n); + } + } + + // Test with variable index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + Atomics.add(int64, idx, value); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + Atomics.add(uint64, idx, value); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + Atomics.add(int64, idx, -value); + assertEq(int64[idx], 0n); + + Atomics.add(uint64, idx, -value); + assertEq(uint64[idx], 0n); + } + } +} +for (let i = 0; i < 2; ++i) testAdd(); diff --git a/js/src/jit-test/tests/atomics/bigint-add.js b/js/src/jit-test/tests/atomics/bigint-add.js new file mode 100644 index 0000000000..18c97b4214 --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-add.js @@ -0,0 +1,103 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testAdd() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + // Test with constant index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + assertEq(Atomics.add(int64, 0, value), 0n); + assertEq(int64[0], BigInt.asIntN(64, value)); + + assertEq(Atomics.add(uint64, 0, value), 0n); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + assertEq(Atomics.add(int64, 0, -value), BigInt.asIntN(64, value)); + assertEq(int64[0], 0n); + + assertEq(Atomics.add(uint64, 0, -value), BigInt.asUintN(64, value)); + assertEq(uint64[0], 0n); + } + } + + // Test with variable index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + assertEq(Atomics.add(int64, idx, value), 0n); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + assertEq(Atomics.add(uint64, idx, value), 0n); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + assertEq(Atomics.add(int64, idx, -value), BigInt.asIntN(64, value)); + assertEq(int64[idx], 0n); + + assertEq(Atomics.add(uint64, idx, -value), BigInt.asUintN(64, value)); + assertEq(uint64[idx], 0n); + } + } +} +for (let i = 0; i < 2; ++i) testAdd(); diff --git a/js/src/jit-test/tests/atomics/bigint-and-for-effect.js b/js/src/jit-test/tests/atomics/bigint-and-for-effect.js new file mode 100644 index 0000000000..cbe3c7e065 --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-and-for-effect.js @@ -0,0 +1,128 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testAnd() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + const int64All = -1n; + const uint64All = 0xffff_ffff_ffff_ffffn; + + // Test with constant index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + // x & 0 == 0 + Atomics.and(int64, 0, value); + assertEq(int64[0], 0n); + + Atomics.and(uint64, 0, value); + assertEq(uint64[0], 0n); + + // x & -1 == x + int64[0] = int64All; + Atomics.and(int64, 0, value); + assertEq(int64[0], BigInt.asIntN(64, value)); + + uint64[0] = uint64All; + Atomics.and(uint64, 0, value); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + // 0 & x == 0 + Atomics.and(int64, 0, 0n); + assertEq(int64[0], 0n); + + Atomics.and(uint64, 0, 0n); + assertEq(uint64[0], 0n); + } + } + + // Test with variable index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + // x & 0 == 0 + Atomics.and(int64, idx, value); + assertEq(int64[idx], 0n); + + Atomics.and(uint64, idx, value); + assertEq(uint64[idx], 0n); + + // x & -1 == x + int64[idx] = int64All; + Atomics.and(int64, idx, value); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + uint64[idx] = uint64All; + Atomics.and(uint64, idx, value); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + // 0 & x == 0 + Atomics.and(int64, idx, 0n); + assertEq(int64[idx], 0n); + + Atomics.and(uint64, idx, 0n); + assertEq(uint64[idx], 0n); + } + } +} +for (let i = 0; i < 2; ++i) testAnd(); diff --git a/js/src/jit-test/tests/atomics/bigint-and.js b/js/src/jit-test/tests/atomics/bigint-and.js new file mode 100644 index 0000000000..b80535e6aa --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-and.js @@ -0,0 +1,128 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testAnd() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + const int64All = -1n; + const uint64All = 0xffff_ffff_ffff_ffffn; + + // Test with constant index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + // x & 0 == 0 + assertEq(Atomics.and(int64, 0, value), 0n); + assertEq(int64[0], 0n); + + assertEq(Atomics.and(uint64, 0, value), 0n); + assertEq(uint64[0], 0n); + + // x & -1 == x + int64[0] = int64All; + assertEq(Atomics.and(int64, 0, value), int64All); + assertEq(int64[0], BigInt.asIntN(64, value)); + + uint64[0] = uint64All; + assertEq(Atomics.and(uint64, 0, value), uint64All); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + // 0 & x == 0 + assertEq(Atomics.and(int64, 0, 0n), BigInt.asIntN(64, value)); + assertEq(int64[0], 0n); + + assertEq(Atomics.and(uint64, 0, 0n), BigInt.asUintN(64, value)); + assertEq(uint64[0], 0n); + } + } + + // Test with variable index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + // x & 0 == 0 + assertEq(Atomics.and(int64, idx, value), 0n); + assertEq(int64[idx], 0n); + + assertEq(Atomics.and(uint64, idx, value), 0n); + assertEq(uint64[idx], 0n); + + // x & -1 == x + int64[idx] = int64All; + assertEq(Atomics.and(int64, idx, value), int64All); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + uint64[idx] = uint64All; + assertEq(Atomics.and(uint64, idx, value), uint64All); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + // 0 & x == 0 + assertEq(Atomics.and(int64, idx, 0n), BigInt.asIntN(64, value)); + assertEq(int64[idx], 0n); + + assertEq(Atomics.and(uint64, idx, 0n), BigInt.asUintN(64, value)); + assertEq(uint64[idx], 0n); + } + } +} +for (let i = 0; i < 2; ++i) testAnd(); diff --git a/js/src/jit-test/tests/atomics/bigint-compareExchange.js b/js/src/jit-test/tests/atomics/bigint-compareExchange.js new file mode 100644 index 0000000000..b899ea9adc --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-compareExchange.js @@ -0,0 +1,121 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testCompareExchange() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + // Test with constant index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + // Comparison fails. + assertEq(Atomics.compareExchange(int64, 0, 1n, value), 0n); + assertEq(int64[0], 0n); + + assertEq(Atomics.compareExchange(uint64, 0, 1n, value), 0n); + assertEq(uint64[0], 0n); + + // Comparison succeeds, the new value is written into the memory location. + assertEq(Atomics.compareExchange(int64, 0, 0n, value), 0n); + assertEq(int64[0], BigInt.asIntN(64, value)); + + assertEq(Atomics.compareExchange(uint64, 0, 0n, value), 0n); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + // Comparison succeeds, the memory location is reset. + assertEq(Atomics.compareExchange(int64, 0, value, 0n), BigInt.asIntN(64, value)); + assertEq(int64[0], 0n); + + assertEq(Atomics.compareExchange(uint64, 0, value, 0n), BigInt.asUintN(64, value)); + assertEq(uint64[0], 0n); + } + } + + // Test with variable index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + // Comparison fails. + assertEq(Atomics.compareExchange(int64, idx, 1n, value), 0n); + assertEq(int64[idx], 0n); + + assertEq(Atomics.compareExchange(uint64,idx, 1n, value), 0n); + assertEq(uint64[idx], 0n); + + // Comparison succeeds, the new value is written into the memory location. + assertEq(Atomics.compareExchange(int64, idx, 0n, value), 0n); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + assertEq(Atomics.compareExchange(uint64, idx, 0n, value), 0n); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + // Comparison succeeds, the memory location is reset. + assertEq(Atomics.compareExchange(int64, idx, value, 0n), BigInt.asIntN(64, value)); + assertEq(int64[idx], 0n); + + assertEq(Atomics.compareExchange(uint64, idx, value, 0n), BigInt.asUintN(64, value)); + assertEq(uint64[idx], 0n); + } + } +} +for (let i = 0; i < 2; ++i) testCompareExchange(); diff --git a/js/src/jit-test/tests/atomics/bigint-exchange.js b/js/src/jit-test/tests/atomics/bigint-exchange.js new file mode 100644 index 0000000000..1d36167ca3 --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-exchange.js @@ -0,0 +1,103 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testExchange() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + // Test with constant index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + assertEq(Atomics.exchange(int64, 0, value), 0n); + assertEq(int64[0], BigInt.asIntN(64, value)); + + assertEq(Atomics.exchange(uint64, 0, value), 0n); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + assertEq(Atomics.exchange(int64, 0, 0n), BigInt.asIntN(64, value)); + assertEq(int64[0], 0n); + + assertEq(Atomics.exchange(uint64, 0, 0n), BigInt.asUintN(64, value)); + assertEq(uint64[0], 0n); + } + } + + // Test with variable index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + assertEq(Atomics.exchange(int64, idx, value), 0n); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + assertEq(Atomics.exchange(uint64, idx, value), 0n); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + assertEq(Atomics.exchange(int64, idx, 0n), BigInt.asIntN(64, value)); + assertEq(int64[idx], 0n); + + assertEq(Atomics.exchange(uint64, idx, 0n), BigInt.asUintN(64, value)); + assertEq(uint64[idx], 0n); + } + } +} +for (let i = 0; i < 2; ++i) testExchange(); diff --git a/js/src/jit-test/tests/atomics/bigint-load.js b/js/src/jit-test/tests/atomics/bigint-load.js new file mode 100644 index 0000000000..f16f3583d2 --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-load.js @@ -0,0 +1,91 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testLoad() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + // Test with constant index. + for (let i = 0; i < 50; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + int64[0] = value; + assertEq(Atomics.load(int64, 0), BigInt.asIntN(64, value)); + + uint64[0] = value; + assertEq(Atomics.load(uint64, 0), BigInt.asUintN(64, value)); + } + } + + // Test with variable index. + for (let i = 0; i < 50; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + int64[idx] = value; + assertEq(Atomics.load(int64, idx), BigInt.asIntN(64, value)); + + uint64[idx] = value; + assertEq(Atomics.load(uint64, idx), BigInt.asUintN(64, value)); + } + } +} +for (let i = 0; i < 2; ++i) testLoad(); diff --git a/js/src/jit-test/tests/atomics/bigint-or-for-effect.js b/js/src/jit-test/tests/atomics/bigint-or-for-effect.js new file mode 100644 index 0000000000..4d25f298b6 --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-or-for-effect.js @@ -0,0 +1,130 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testOr() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + const int64All = -1n; + const uint64All = 0xffff_ffff_ffff_ffffn; + + // Test with constant index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + // x | 0 == x + Atomics.or(int64, 0, value); + assertEq(int64[0], BigInt.asIntN(64, value)); + + Atomics.or(uint64, 0, value); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + // 0 | x == x + Atomics.or(int64, 0, 0n); + assertEq(int64[0], BigInt.asIntN(64, value)); + + Atomics.or(uint64, 0, 0n); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + // x | ~x == -1 + Atomics.or(int64, 0, ~value); + assertEq(int64[0], int64All); + + Atomics.or(uint64, 0, ~value); + assertEq(uint64[0], uint64All); + + int64[0] = 0n; + uint64[0] = 0n; + } + } + + // Test with variable index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + // x | 0 == x + Atomics.or(int64, idx, value); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + Atomics.or(uint64, idx, value); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + // 0 | x == x + Atomics.or(int64, idx, 0n); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + Atomics.or(uint64, idx, 0n); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + // x | ~x == -1 + Atomics.or(int64, idx, ~value); + assertEq(int64[idx], int64All); + + Atomics.or(uint64, idx, ~value); + assertEq(uint64[idx], uint64All); + + int64[idx] = 0n; + uint64[idx] = 0n; + } + } +} +for (let i = 0; i < 2; ++i) testOr(); diff --git a/js/src/jit-test/tests/atomics/bigint-or.js b/js/src/jit-test/tests/atomics/bigint-or.js new file mode 100644 index 0000000000..95b99958e5 --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-or.js @@ -0,0 +1,130 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testOr() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + const int64All = -1n; + const uint64All = 0xffff_ffff_ffff_ffffn; + + // Test with constant index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + // x | 0 == x + assertEq(Atomics.or(int64, 0, value), 0n); + assertEq(int64[0], BigInt.asIntN(64, value)); + + assertEq(Atomics.or(uint64, 0, value), 0n); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + // 0 | x == x + assertEq(Atomics.or(int64, 0, 0n), BigInt.asIntN(64, value)); + assertEq(int64[0], BigInt.asIntN(64, value)); + + assertEq(Atomics.or(uint64, 0, 0n), BigInt.asUintN(64, value)); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + // x | ~x == -1 + assertEq(Atomics.or(int64, 0, ~value), BigInt.asIntN(64, value)); + assertEq(int64[0], int64All); + + assertEq(Atomics.or(uint64, 0, ~value), BigInt.asUintN(64, value)); + assertEq(uint64[0], uint64All); + + int64[0] = 0n; + uint64[0] = 0n; + } + } + + // Test with variable index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + // x | 0 == x + assertEq(Atomics.or(int64, idx, value), 0n); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + assertEq(Atomics.or(uint64, idx, value), 0n); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + // 0 | x == x + assertEq(Atomics.or(int64, idx, 0n), BigInt.asIntN(64, value)); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + assertEq(Atomics.or(uint64, idx, 0n), BigInt.asUintN(64, value)); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + // x | ~x == -1 + assertEq(Atomics.or(int64, idx, ~value), BigInt.asIntN(64, value)); + assertEq(int64[idx], int64All); + + assertEq(Atomics.or(uint64, idx, ~value), BigInt.asUintN(64, value)); + assertEq(uint64[idx], uint64All); + + int64[idx] = 0n; + uint64[idx] = 0n; + } + } +} +for (let i = 0; i < 2; ++i) testOr(); diff --git a/js/src/jit-test/tests/atomics/bigint-store.js b/js/src/jit-test/tests/atomics/bigint-store.js new file mode 100644 index 0000000000..1b38f8f087 --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-store.js @@ -0,0 +1,91 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testStore() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + // Test with constant index. + for (let i = 0; i < 50; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + assertEq(Atomics.store(int64, 0, value), value); + assertEq(int64[0], BigInt.asIntN(64, value)); + + assertEq(Atomics.store(uint64, 0, value), value); + assertEq(uint64[0], BigInt.asUintN(64, value)); + } + } + + // Test with variable index. + for (let i = 0; i < 50; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + assertEq(Atomics.store(int64, idx, value), value); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + assertEq(Atomics.store(uint64, idx, value), value); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + } + } +} +for (let i = 0; i < 2; ++i) testStore(); diff --git a/js/src/jit-test/tests/atomics/bigint-sub-for-effect.js b/js/src/jit-test/tests/atomics/bigint-sub-for-effect.js new file mode 100644 index 0000000000..5ca0a82fe8 --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-sub-for-effect.js @@ -0,0 +1,103 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testSub() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + // Test with constant index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + Atomics.sub(int64, 0, value); + assertEq(int64[0], BigInt.asIntN(64, -value)); + + Atomics.sub(uint64, 0, value); + assertEq(uint64[0], BigInt.asUintN(64, -value)); + + Atomics.sub(int64, 0, -value); + assertEq(int64[0], 0n); + + Atomics.sub(uint64, 0, -value); + assertEq(uint64[0], 0n); + } + } + + // Test with variable index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + Atomics.sub(int64, idx, value); + assertEq(int64[idx], BigInt.asIntN(64, -value)); + + Atomics.sub(uint64, idx, value); + assertEq(uint64[idx], BigInt.asUintN(64, -value)); + + Atomics.sub(int64, idx, -value); + assertEq(int64[idx], 0n); + + Atomics.sub(uint64, idx, -value); + assertEq(uint64[idx], 0n); + } + } +} +for (let i = 0; i < 2; ++i) testSub(); diff --git a/js/src/jit-test/tests/atomics/bigint-sub.js b/js/src/jit-test/tests/atomics/bigint-sub.js new file mode 100644 index 0000000000..deb997617e --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-sub.js @@ -0,0 +1,103 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testSub() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + // Test with constant index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + assertEq(Atomics.sub(int64, 0, value), 0n); + assertEq(int64[0], BigInt.asIntN(64, -value)); + + assertEq(Atomics.sub(uint64, 0, value), 0n); + assertEq(uint64[0], BigInt.asUintN(64, -value)); + + assertEq(Atomics.sub(int64, 0, -value), BigInt.asIntN(64, -value)); + assertEq(int64[0], 0n); + + assertEq(Atomics.sub(uint64, 0, -value), BigInt.asUintN(64, -value)); + assertEq(uint64[0], 0n); + } + } + + // Test with variable index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + assertEq(Atomics.sub(int64, idx, value), 0n); + assertEq(int64[idx], BigInt.asIntN(64, -value)); + + assertEq(Atomics.sub(uint64, idx, value), 0n); + assertEq(uint64[idx], BigInt.asUintN(64, -value)); + + assertEq(Atomics.sub(int64, idx, -value), BigInt.asIntN(64, -value)); + assertEq(int64[idx], 0n); + + assertEq(Atomics.sub(uint64, idx, -value), BigInt.asUintN(64, -value)); + assertEq(uint64[idx], 0n); + } + } +} +for (let i = 0; i < 2; ++i) testSub(); diff --git a/js/src/jit-test/tests/atomics/bigint-xor-for-effect.js b/js/src/jit-test/tests/atomics/bigint-xor-for-effect.js new file mode 100644 index 0000000000..0b70b07193 --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-xor-for-effect.js @@ -0,0 +1,121 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testXor() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + // Test with constant index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + // x ^ 0 == x + Atomics.xor(int64, 0, value); + assertEq(int64[0], BigInt.asIntN(64, value)); + + Atomics.xor(uint64, 0, value); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + // 0 ^ x == x + Atomics.xor(int64, 0, 0n); + assertEq(int64[0], BigInt.asIntN(64, value)); + + Atomics.xor(uint64, 0, 0n); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + // x ^ x == 0 + Atomics.xor(int64, 0, value); + assertEq(int64[0], 0n); + + Atomics.xor(uint64, 0, value); + assertEq(uint64[0], 0n); + } + } + + // Test with variable index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + // x ^ 0 == x + Atomics.xor(int64, idx, value); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + Atomics.xor(uint64, idx, value); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + // 0 ^ x == x + Atomics.xor(int64, idx, 0n); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + Atomics.xor(uint64, idx, 0n); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + // x ^ x == 0 + Atomics.xor(int64, idx, value); + assertEq(int64[idx], 0n); + + Atomics.xor(uint64, idx, value); + assertEq(uint64[idx], 0n); + } + } +} +for (let i = 0; i < 2; ++i) testXor(); diff --git a/js/src/jit-test/tests/atomics/bigint-xor.js b/js/src/jit-test/tests/atomics/bigint-xor.js new file mode 100644 index 0000000000..9e565ffbcb --- /dev/null +++ b/js/src/jit-test/tests/atomics/bigint-xor.js @@ -0,0 +1,121 @@ +// |jit-test| test-join=--spectre-mitigations=off + +// These do not test atomicity, just that code generation for BigInt values +// works correctly. + +const bigIntValues = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function testXor() { + const int64 = new BigInt64Array(2); + const uint64 = new BigUint64Array(2); + + // Test with constant index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + + // x ^ 0 == x + assertEq(Atomics.xor(int64, 0, value), 0n); + assertEq(int64[0], BigInt.asIntN(64, value)); + + assertEq(Atomics.xor(uint64, 0, value), 0n); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + // 0 ^ x == x + assertEq(Atomics.xor(int64, 0, 0n), BigInt.asIntN(64, value)); + assertEq(int64[0], BigInt.asIntN(64, value)); + + assertEq(Atomics.xor(uint64, 0, 0n), BigInt.asUintN(64, value)); + assertEq(uint64[0], BigInt.asUintN(64, value)); + + // x ^ x == 0 + assertEq(Atomics.xor(int64, 0, value), BigInt.asIntN(64, value)); + assertEq(int64[0], 0n); + + assertEq(Atomics.xor(uint64, 0, value), BigInt.asUintN(64, value)); + assertEq(uint64[0], 0n); + } + } + + // Test with variable index. + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < bigIntValues.length; ++j) { + let value = bigIntValues[j]; + let idx = j & 1; + + // x ^ 0 == x + assertEq(Atomics.xor(int64, idx, value), 0n); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + assertEq(Atomics.xor(uint64, idx, value), 0n); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + // 0 ^ x == x + assertEq(Atomics.xor(int64, idx, 0n), BigInt.asIntN(64, value)); + assertEq(int64[idx], BigInt.asIntN(64, value)); + + assertEq(Atomics.xor(uint64, idx, 0n), BigInt.asUintN(64, value)); + assertEq(uint64[idx], BigInt.asUintN(64, value)); + + // x ^ x == 0 + assertEq(Atomics.xor(int64, idx, value), BigInt.asIntN(64, value)); + assertEq(int64[idx], 0n); + + assertEq(Atomics.xor(uint64, idx, value), BigInt.asUintN(64, value)); + assertEq(uint64[idx], 0n); + } + } +} +for (let i = 0; i < 2; ++i) testXor(); diff --git a/js/src/jit-test/tests/atomics/cross-compartment-nukeccw.js b/js/src/jit-test/tests/atomics/cross-compartment-nukeccw.js new file mode 100644 index 0000000000..2ef9030923 --- /dev/null +++ b/js/src/jit-test/tests/atomics/cross-compartment-nukeccw.js @@ -0,0 +1,219 @@ +load(libdir + "asserts.js"); + +const otherGlobal = newGlobal({newCompartment: true}); + +function nukeValue(wrapper, value) { + return { + valueOf() { + nukeCCW(wrapper); + return value; + } + }; +}; + +function assertIsDeadWrapper(value) { + assertTypeErrorMessage(() => value.foo, "can't access dead object"); +} + +// Atomics.load +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 1; + + let val = Atomics.load(ta, nukeValue(ta, 0)); + + assertEq(val, 1); + assertIsDeadWrapper(ta); +} +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 1; + + let val = Atomics.load(ta, nukeValue(sab, 0)); + + assertEq(val, 1); + assertEq(ta[0], 1); + assertIsDeadWrapper(sab); +} + +// Atomics.store +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + + Atomics.store(ta, 0, nukeValue(ta, 1)); + + assertIsDeadWrapper(ta); +} +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + + Atomics.store(ta, 0, nukeValue(sab, 1)); + + assertEq(ta[0], 1); + assertIsDeadWrapper(sab); +} + +// Atomics.compareExchange +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 1; + + let val = Atomics.compareExchange(ta, 0, 1, nukeValue(ta, 2)); + + assertEq(val, 1); + assertIsDeadWrapper(ta); +} +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 1; + + let val = Atomics.compareExchange(ta, 0, 1, nukeValue(sab, 2)); + + assertEq(val, 1); + assertEq(ta[0], 2); + assertIsDeadWrapper(sab); +} + +// Atomics.exchange +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 1; + + let val = Atomics.exchange(ta, 0, nukeValue(ta, 2)); + + assertEq(val, 1); + assertIsDeadWrapper(ta); +} +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 1; + + let val = Atomics.exchange(ta, 0, nukeValue(sab, 2)); + + assertEq(val, 1); + assertEq(ta[0], 2); + assertIsDeadWrapper(sab); +} + +// Atomics.add +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 1; + + let val = Atomics.add(ta, 0, nukeValue(ta, 2)); + + assertEq(val, 1); + assertIsDeadWrapper(ta); +} +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 1; + + let val = Atomics.add(ta, 0, nukeValue(sab, 2)); + + assertEq(val, 1); + assertEq(ta[0], 3); + assertIsDeadWrapper(sab); +} + +// Atomics.sub +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 3; + + let val = Atomics.sub(ta, 0, nukeValue(ta, 2)); + + assertEq(val, 3); + assertIsDeadWrapper(ta); +} +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 3; + + let val = Atomics.sub(ta, 0, nukeValue(sab, 2)); + + assertEq(val, 3); + assertEq(ta[0], 1); + assertIsDeadWrapper(sab); +} + +// Atomics.and +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 3; + + let val = Atomics.and(ta, 0, nukeValue(ta, 1)); + + assertEq(val, 3); + assertIsDeadWrapper(ta); +} +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 3; + + let val = Atomics.and(ta, 0, nukeValue(sab, 1)); + + assertEq(val, 3); + assertEq(ta[0], 1); + assertIsDeadWrapper(sab); +} + +// Atomics.or +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 2; + + let val = Atomics.or(ta, 0, nukeValue(ta, 1)); + + assertEq(val, 2); + assertIsDeadWrapper(ta); +} +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 2; + + let val = Atomics.or(ta, 0, nukeValue(sab, 1)); + + assertEq(val, 2); + assertEq(ta[0], 3); + assertIsDeadWrapper(sab); +} + +// Atomics.xor +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 3; + + let val = Atomics.xor(ta, 0, nukeValue(ta, 1)); + + assertEq(val, 3); + assertIsDeadWrapper(ta); +} +{ + let sab = new otherGlobal.SharedArrayBuffer(4); + let ta = new otherGlobal.Int32Array(sab); + ta[0] = 3; + + let val = Atomics.xor(ta, 0, nukeValue(sab, 1)); + + assertEq(val, 3); + assertEq(ta[0], 2); + assertIsDeadWrapper(sab); +} diff --git a/js/src/jit-test/tests/atomics/directives.txt b/js/src/jit-test/tests/atomics/directives.txt new file mode 100644 index 0000000000..002776b8fe --- /dev/null +++ b/js/src/jit-test/tests/atomics/directives.txt @@ -0,0 +1 @@ +|jit-test| skip-if: !this.SharedArrayBuffer || !this.Atomics diff --git a/js/src/jit-test/tests/atomics/inline-add.js b/js/src/jit-test/tests/atomics/inline-add.js new file mode 100644 index 0000000000..bc1848cb22 --- /dev/null +++ b/js/src/jit-test/tests/atomics/inline-add.js @@ -0,0 +1,28 @@ +// |jit-test| slow; +// +// This is intended to be run manually with IONFLAGS=logs and +// postprocessing by iongraph to verify manually (by inspecting the +// MIR) that: +// +// - the add operation is inlined as it should be +// - loads and stores are not moved across the add +// +// Be sure to run with --ion-eager --ion-offthread-compile=off. + +function add(ta) { + var x = ta[0]; + Atomics.add(ta, 86, 6); + var y = ta[1]; + var z = y + 1; + var w = x + z; + return w; +} + +var sab = new SharedArrayBuffer(4096); +var ia = new Int32Array(sab); +for ( var i=0, limit=ia.length ; i < limit ; i++ ) + ia[i] = 37; +var v = 0; +for ( var i=0 ; i < 1000 ; i++ ) + v += add(ia); +//print(v); diff --git a/js/src/jit-test/tests/atomics/inline-add2.js b/js/src/jit-test/tests/atomics/inline-add2.js new file mode 100644 index 0000000000..4a8447022e --- /dev/null +++ b/js/src/jit-test/tests/atomics/inline-add2.js @@ -0,0 +1,28 @@ +// |jit-test| slow; +// +// Like inline-add, but with Uint32Array, which is a special case +// because the value is representable only as a Number. All this +// tests is that the Uint32 path is being triggered. +// +// This is intended to be run manually with IONFLAGS=logs and +// postprocessing by iongraph to verify manually (by inspecting the +// MIR) that: +// +// - the add operation is inlined as it should be, with +// a return type 'Double' +// - loads and stores are not moved across the add +// +// Be sure to run with --ion-eager --ion-offthread-compile=off. + +function add(ta) { + return Atomics.add(ta, 86, 6); +} + +var sab = new SharedArrayBuffer(4096); +var ia = new Uint32Array(sab); +for ( var i=0, limit=ia.length ; i < limit ; i++ ) + ia[i] = 0xdeadbeef; // Important: Not an int32-capable value +var v = 0; +for ( var i=0 ; i < 1000 ; i++ ) + v += add(ia); +//print(v); diff --git a/js/src/jit-test/tests/atomics/inline-cmpxchg.js b/js/src/jit-test/tests/atomics/inline-cmpxchg.js new file mode 100644 index 0000000000..a04e120f32 --- /dev/null +++ b/js/src/jit-test/tests/atomics/inline-cmpxchg.js @@ -0,0 +1,28 @@ +// |jit-test| slow; +// +// This is intended to be run manually with IONFLAGS=logs and +// postprocessing by iongraph to verify manually (by inspecting the +// MIR) that: +// +// - the cmpxchg operation is inlined as it should be +// - loads and stores are not moved across the cmpxchg +// +// Be sure to run with --ion-eager --ion-offthread-compile=off. + +function cmpxchg(ta) { + var x = ta[0]; + Atomics.compareExchange(ta, 86, 37, 42); + var y = ta[1]; + var z = y + 1; + var w = x + z; + return w; +} + +var sab = new SharedArrayBuffer(4096); +var ia = new Int32Array(sab); +for ( var i=0, limit=ia.length ; i < limit ; i++ ) + ia[i] = 37; +var v = 0; +for ( var i=0 ; i < 1000 ; i++ ) + v += cmpxchg(ia); +//print(v); diff --git a/js/src/jit-test/tests/atomics/memcpy-fidelity.js b/js/src/jit-test/tests/atomics/memcpy-fidelity.js new file mode 100644 index 0000000000..3a19641444 --- /dev/null +++ b/js/src/jit-test/tests/atomics/memcpy-fidelity.js @@ -0,0 +1,181 @@ +// In order not to run afoul of C++ UB we have our own non-C++ definitions of +// operations (they are actually jitted) that can operate racily on shared +// memory, see jit/shared/AtomicOperations-shared-jit.cpp. +// +// Operations on fixed-width 1, 2, 4, and 8 byte data are adequately tested +// elsewhere. Here we specifically test our safe-when-racy replacements of +// memcpy and memmove. +// +// There are two primitives in the engine, memcpy_down and memcpy_up. These are +// equivalent except when data overlap, in which case memcpy_down handles +// overlapping copies that move from higher to lower addresses and memcpy_up +// handles ditto from lower to higher. memcpy uses memcpy_down always while +// memmove selects the one to use dynamically based on its arguments. + +// Basic memcpy algorithm to be tested: +// +// - if src and target have the same alignment +// - byte copy up to word alignment +// - block copy as much as possible +// - word copy as much as possible +// - byte copy any tail +// - else if on a platform that can deal with unaligned access +// (ie, x86, ARM64, and ARM if the proper flag is set) +// - block copy as much as possible +// - word copy as much as possible +// - byte copy any tail +// - else // on a platform that can't deal with unaligned access +// (ie ARM without the flag or x86 DEBUG builds with the +// JS_NO_UNALIGNED_MEMCPY env var) +// - block copy with byte copies +// - word copy with byte copies +// - byte copy any tail + +var target_buf = new SharedArrayBuffer(1024); +var src_buf = new SharedArrayBuffer(1024); + +/////////////////////////////////////////////////////////////////////////// +// +// Different src and target buffer, this is memcpy "move down". The same +// code is used in the engine for overlapping buffers when target addresses +// are lower than source addresses. + +fill(src_buf); + +// Basic 1K perfectly aligned copy, copies blocks only. +{ + let target = new Uint8Array(target_buf); + let src = new Uint8Array(src_buf); + clear(target_buf); + target.set(src); + check(target_buf, 0, 1024, 0); +} + +// Buffers are equally aligned but not on a word boundary and not ending on a +// word boundary either, so this will copy first some bytes, then some blocks, +// then some words, and then some bytes. +{ + let fill = 0x79; + clear(target_buf, fill); + let target = new Uint8Array(target_buf, 1, 1022); + let src = new Uint8Array(src_buf, 1, 1022); + target.set(src); + check_fill(target_buf, 0, 1, fill); + check(target_buf, 1, 1023, 1); + check_fill(target_buf, 1023, 1024, fill); +} + +// Buffers are unequally aligned, we'll copy bytes only on some platforms and +// unaligned blocks/words on others. +{ + clear(target_buf); + let target = new Uint8Array(target_buf, 0, 1023); + let src = new Uint8Array(src_buf, 1); + target.set(src); + check(target_buf, 0, 1023, 1); + check_zero(target_buf, 1023, 1024); +} + +/////////////////////////////////////////////////////////////////////////// +// +// Overlapping src and target buffer and the target addresses are always +// higher than the source addresses, this is memcpy "move up" + +// Buffers are equally aligned but not on a word boundary and not ending on a +// word boundary either, so this will copy first some bytes, then some blocks, +// then some words, and then some bytes. +{ + fill(target_buf); + let target = new Uint8Array(target_buf, 9, 999); + let src = new Uint8Array(target_buf, 1, 999); + target.set(src); + check(target_buf, 9, 1008, 1); + check(target_buf, 1008, 1024, 1008 & 255); +} + +// Buffers are unequally aligned, we'll copy bytes only on some platforms and +// unaligned blocks/words on others. +{ + fill(target_buf); + let target = new Uint8Array(target_buf, 2, 1022); + let src = new Uint8Array(target_buf, 1, 1022); + target.set(src); + check(target_buf, 2, 1024, 1); +} + +/////////////////////////////////////////////////////////////////////////// +// +// Copy 0 to 127 bytes from and to a variety of addresses to check that we +// handle limits properly in these edge cases. + +// Too slow in debug-noopt builds but we don't want to flag the test as slow, +// since that means it'll never be run. + +if (this.getBuildConfiguration && !getBuildConfiguration("debug")) +{ + let t = new Uint8Array(target_buf); + for (let my_src_buf of [src_buf, target_buf]) { + for (let size=0; size < 127; size++) { + for (let src_offs=0; src_offs < 8; src_offs++) { + for (let target_offs=0; target_offs < 8; target_offs++) { + clear(target_buf, Math.random()*255); + let target = new Uint8Array(target_buf, target_offs, size); + + // Zero is boring + let bias = (Math.random() * 100 % 12) | 0; + + // Note src may overlap target partially + let src = new Uint8Array(my_src_buf, src_offs, size); + for ( let i=0; i < size; i++ ) + src[i] = i+bias; + + // We expect these values to be unchanged by the copy + let below = target_offs > 0 ? t[target_offs - 1] : 0; + let above = t[target_offs + size]; + + // Copy + target.set(src); + + // Verify + check(target_buf, target_offs, target_offs + size, bias); + if (target_offs > 0) + assertEq(t[target_offs-1], below); + assertEq(t[target_offs+size], above); + } + } + } + } +} + + +// Utilities + +function clear(buf, fill) { + let a = new Uint8Array(buf); + for ( let i=0; i < a.length; i++ ) + a[i] = fill; +} + +function fill(buf) { + let a = new Uint8Array(buf); + for ( let i=0; i < a.length; i++ ) + a[i] = i & 255 +} + +function check(buf, from, to, startingWith) { + let a = new Uint8Array(buf); + for ( let i=from; i < to; i++ ) { + assertEq(a[i], startingWith); + startingWith = (startingWith + 1) & 255; + } +} + +function check_zero(buf, from, to) { + check_fill(buf, from, to, 0); +} + +function check_fill(buf, from, to, fill) { + let a = new Uint8Array(buf); + for ( let i=from; i < to; i++ ) + assertEq(a[i], fill); +} diff --git a/js/src/jit-test/tests/atomics/mutual-exclusion.js b/js/src/jit-test/tests/atomics/mutual-exclusion.js new file mode 100644 index 0000000000..ccf4b1789e --- /dev/null +++ b/js/src/jit-test/tests/atomics/mutual-exclusion.js @@ -0,0 +1,82 @@ +// |jit-test| skip-if: helperThreadCount() === 0 || getBuildConfiguration("arm64-simulator") === true + +// Let a few threads hammer on memory with atomics to provoke errors +// in exclusion work. This test is not 100% fail-safe: the test may +// pass despite a bug, but this is unlikely. + +// Map an Int32Array on shared memory. The first location is used as +// a counter, each worker counts up on exit and the main thread will +// wait until the counter reaches the number of workers. The other +// elements are contended accumulators where we count up and down very +// rapidly and for a long time, any failure in mutual exclusion should +// lead to errors in the result. (For example, the test fails almost +// immediately when I disable simulation of mutual exclusion in the +// ARM simulator.) + +const numWorkers = 4; // You're not meant to change this +const iterCount = 255; // Nor this +const sabLength = 1024; // Nor this + +const oddResult = (function () { + var v = 0; + for ( var j=0 ; j < numWorkers ; j++ ) + v |= (iterCount << (8 * j)); + return v; +})(); + +const evenResult = 0; + +const sab = new SharedArrayBuffer(sabLength); + +setSharedObject(sab); + +const iab = new Int32Array(sab); + +function testRun(limit) { + console.log("Limit = " + limit); + + // Fork off workers to hammer on memory. + for ( var i=0 ; i < numWorkers ; i++ ) { + evalInWorker(` + const iab = new Int32Array(getSharedObject()); + const v = 1 << (8 * ${i}); + for ( var i=0 ; i < ${limit} ; i++ ) { + for ( var k=0 ; k < ${iterCount} ; k++ ) { + if (i & 1) { + for ( var j=1 ; j < iab.length ; j++ ) + Atomics.sub(iab, j, v); + } + else { + for ( var j=1 ; j < iab.length ; j++ ) + Atomics.add(iab, j, v); + } + } + } + Atomics.add(iab, 0, 1); + `); + } + + // Wait... + while (Atomics.load(iab, 0) != numWorkers) + ; + Atomics.store(iab, 0, 0); + + // Check the results and clear the array again. + const v = (limit & 1) ? oddResult : evenResult; + for ( var i=1 ; i < iab.length ; i++ ) { + assertEq(iab[i], v); + iab[i] = 0; + } +} + +// Under some configurations the test can take a while to run (and may +// saturate the CPU since it runs four workers); try not to time out. + +var then = new Date(); +testRun(1); +if (new Date() - then < 20000) { + testRun(2); + if (new Date() - then < 30000) { + testRun(3); + } +} diff --git a/js/src/jit-test/tests/atomics/nursery-non-shared-moved-gc.js b/js/src/jit-test/tests/atomics/nursery-non-shared-moved-gc.js new file mode 100644 index 0000000000..472076ce63 --- /dev/null +++ b/js/src/jit-test/tests/atomics/nursery-non-shared-moved-gc.js @@ -0,0 +1,99 @@ +// Small (non-shared) TypedArrays can use inline storage and can also be nursery +// allocated. Ensure Atomics functions use correct rooting and don't store the +// TypedArray's data pointer on the stack across a GC. +const INLINE_MEMORY_LENGTH = 1; + +function gcValue(value) { + return { + valueOf() { + minorgc(); + return value; + } + }; +}; + +// Atomics.store +{ + let ta = new Int32Array(INLINE_MEMORY_LENGTH); + + Atomics.store(ta, 0, gcValue(1)); + + assertEq(ta[0], 1); +} + +// Atomics.compareExchange +{ + let ta = new Int32Array(INLINE_MEMORY_LENGTH); + ta[0] = 1; + + let val = Atomics.compareExchange(ta, 0, 1, gcValue(2)); + + assertEq(val, 1); + assertEq(ta[0], 2); +} + +// Atomics.exchange +{ + let ta = new Int32Array(INLINE_MEMORY_LENGTH); + ta[0] = 1; + + let val = Atomics.exchange(ta, 0, gcValue(2)); + + assertEq(val, 1); + assertEq(ta[0], 2); +} + +// Atomics.add +{ + let ta = new Int32Array(INLINE_MEMORY_LENGTH); + ta[0] = 1; + + let val = Atomics.add(ta, 0, gcValue(2)); + + assertEq(val, 1); + assertEq(ta[0], 3); +} + +// Atomics.sub +{ + let ta = new Int32Array(INLINE_MEMORY_LENGTH); + ta[0] = 3; + + let val = Atomics.sub(ta, 0, gcValue(2)); + + assertEq(val, 3); + assertEq(ta[0], 1); +} + +// Atomics.and +{ + let ta = new Int32Array(INLINE_MEMORY_LENGTH); + ta[0] = 3; + + let val = Atomics.and(ta, 0, gcValue(1)); + + assertEq(val, 3); + assertEq(ta[0], 1); +} + +// Atomics.or +{ + let ta = new Int32Array(INLINE_MEMORY_LENGTH); + ta[0] = 2; + + let val = Atomics.or(ta, 0, gcValue(1)); + + assertEq(val, 2); + assertEq(ta[0], 3); +} + +// Atomics.xor +{ + let ta = new Int32Array(INLINE_MEMORY_LENGTH); + ta[0] = 3; + + let val = Atomics.xor(ta, 0, gcValue(1)); + + assertEq(val, 3); + assertEq(ta[0], 2); +} diff --git a/js/src/jit-test/tests/atomics/optimization-tests.js b/js/src/jit-test/tests/atomics/optimization-tests.js new file mode 100644 index 0000000000..65b2055dc6 --- /dev/null +++ b/js/src/jit-test/tests/atomics/optimization-tests.js @@ -0,0 +1,103 @@ +// Some optimization tests for the Atomics primitives. +// +// These do not test atomicity, just code generation on a single +// thread. +// +// It's useful to look at the code generated for this test with -D to +// the JS shell. +// +// Bug 1138348 - unconstrained use of byte registers on x64 +// Bug 1077014 - code generation for Atomic operations for effect, +// all platforms +// Bug 1141121 - immediate operand in atomic operations on x86/x64 + +function test(SharedOrUnsharedArrayBuffer) { +var sum = 0; + +function f(ia, k) { + // For effect, variable value. The generated code on x86/x64 + // should be one LOCK ADDB. (On ARM, there should be no + // sign-extend of the current value in the cell, otherwise this is + // still a LDREX/STREX loop.) + Atomics.add(ia, 0, k); + + // Ditto constant value. Here the LOCK ADDB should have an + // immediate operand. + Atomics.add(ia, 0, 1); +} + +function f2(ia, k) { + // For effect, variable value and constant value. The generated + // code on x86/x64 should be one LOCK SUBB. + Atomics.sub(ia, 2, k); + + // Ditto constant value. Here the LOCK SUBB should have an + // immediate operand. + Atomics.sub(ia, 2, 1); +} + +function f4(ia, k) { + // For effect, variable value. The generated code on x86/x64 + // should be one LOCK ORB. (On ARM, there should be no + // sign-extend of the current value in the cell, otherwise this is + // still a LDREX/STREX loop.) + Atomics.or(ia, 6, k); + + // Ditto constant value. Here the LOCK ORB should have an + // immediate operand. + Atomics.or(ia, 6, 1); +} + +function g(ia, k) { + // For its value, variable value. The generated code on x86/x64 + // should be one LOCK XADDB. + sum += Atomics.add(ia, 1, k); + + // Ditto constant value. XADD does not admit an immediate + // operand, so in the second case there should be a preliminary + // MOV of the immediate to the output register. + sum += Atomics.add(ia, 1, 1); +} + +function g2(ia, k) { + // For its value, variable value. The generated code on x86/x64 + // should be one LOCK XADDB, preceded by a NEG into the output + // register instead of a MOV. + sum += Atomics.sub(ia, 3, k); + + // Ditto constant value. XADD does not admit an immediate + // operand, so in the second case there should be a preliminary + // MOV of the negated immediate to the output register. + sum += Atomics.sub(ia, 3, 1); +} + +function g4(ia, k) { + // For its value, variable value. The generated code on x86/x64 + // should be a loop around ORB ; CMPXCHGB + sum += Atomics.or(ia, 7, k); + + // Ditto constant value. Here the ORB in the loop should have + // an immediate operand. + sum += Atomics.or(ia, 7, 1); +} + +var i8a = new Int8Array(new SharedOrUnsharedArrayBuffer(65536)); +for ( var i=0 ; i < 10000 ; i++ ) { + f(i8a, i % 10); + g(i8a, i % 10); + f2(i8a, i % 10); + g2(i8a, i % 10); + f4(i8a, i % 10); + g4(i8a, i % 10); +} + +assertEq(i8a[0], ((10000 + 10000*4.5) << 24) >> 24); +assertEq(i8a[1], ((10000 + 10000*4.5) << 24) >> 24); +assertEq(i8a[2], ((-10000 + -10000*4.5) << 24) >> 24); +assertEq(i8a[3], ((-10000 + -10000*4.5) << 24) >> 24); +assertEq(i8a[6], 15); +assertEq(i8a[7], 15); +} + +test(SharedArrayBuffer); +test(ArrayBuffer); \ No newline at end of file diff --git a/js/src/jit-test/tests/atomics/store-does-not-truncate-returnval.js b/js/src/jit-test/tests/atomics/store-does-not-truncate-returnval.js new file mode 100644 index 0000000000..f689511ba4 --- /dev/null +++ b/js/src/jit-test/tests/atomics/store-does-not-truncate-returnval.js @@ -0,0 +1,44 @@ +function test(SharedOrUnsharedArrayBuffer) { +var ia = new Int32Array(new SharedOrUnsharedArrayBuffer(4)); + +// Atomics.store() returns the input value converted to integer as if +// by ToInteger. +// +// JIT and interpreter have different paths here, so loop a little to +// trigger the JIT properly. + +function f() { + assertEq(Atomics.store(ia, 0, 3.5), 3); + assertEq(ia[0], 3); + + assertEq(Atomics.store(ia, 0, -0), +0); + assertEq(ia[0], 0); + + assertEq(Atomics.store(ia, 0, '4.6'), 4); + assertEq(ia[0], 4); + + assertEq(Atomics.store(ia, 0, '-4.6'), -4); + assertEq(ia[0], -4); + + assertEq(Atomics.store(ia, 0, undefined), 0); + assertEq(ia[0], 0); + + assertEq(Atomics.store(ia, 0, Infinity), Infinity); + assertEq(ia[0], 0); + + assertEq(Atomics.store(ia, 0, -Infinity), -Infinity); + assertEq(ia[0], 0); + + assertEq(Atomics.store(ia, 0, Math.pow(2, 32)+5), Math.pow(2, 32)+5); + assertEq(ia[0], 5); + + assertEq(Atomics.store(ia, 0, { valueOf: () => 3.7 }), 3); + assertEq(ia[0], 3); +} + +for ( var i=0 ; i < 10 ; i++ ) + f(); +} + +test(SharedArrayBuffer); +test(ArrayBuffer); diff --git a/js/src/jit-test/tests/auto-regress/bug1147907.js b/js/src/jit-test/tests/auto-regress/bug1147907.js new file mode 100644 index 0000000000..bf22640058 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1147907.js @@ -0,0 +1,14 @@ +var evalInFrame = (function (global) { + var dbgGlobal = newGlobal({newCompartment: true}); + var dbg = new dbgGlobal.Debugger(); + return function evalInFrame(upCount, code) { + dbg.addDebuggee(global); + var frame = dbg.getNewestFrame().older; + var completion = frame.eval(code); + }; +})(this); +var x = 5; +{ + let x = eval("this.x++"); + evalInFrame(0, ("for (var x = 0; x < 3; ++x) { (function(){})() } ")) +} diff --git a/js/src/jit-test/tests/auto-regress/bug1183241.js b/js/src/jit-test/tests/auto-regress/bug1183241.js new file mode 100644 index 0000000000..6f236afd2e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1183241.js @@ -0,0 +1,18 @@ +// |jit-test| error:TypeError +"use strict"; + +// Make it impossible to create a toSource() representation of |o|, because +// 100 * 2**22 exceeds the maximum string length. +var s = "a".repeat(2 ** 22); +var o = {}; +for (var i = 0; i < 100; ++i) { + o["$" + i] = s; +} + +Object.seal(o); + +// Before the patch the toSource() represention was generated when an +// assignment failed in strict mode. And because it's not possible to create +// a toSource() representation for |o| (see above), this line caused an +// InternalError to be thrown. With the patch this line throws a TypeError. +o.foo = 0; diff --git a/js/src/jit-test/tests/auto-regress/bug1263532.js b/js/src/jit-test/tests/auto-regress/bug1263532.js new file mode 100644 index 0000000000..e9d222d3c9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1263532.js @@ -0,0 +1,13 @@ +setJitCompilerOption("ion.warmup.trigger", 1); +function f(g) { + for (var i = 0; i < 99; i++) { + "abc".match("b."); + g(); + } +} +f(function() {}); +f(function() { + Object.defineProperty(RegExp.prototype, "sticky", { + get: function() {} + }); +}); diff --git a/js/src/jit-test/tests/auto-regress/bug1263558.js b/js/src/jit-test/tests/auto-regress/bug1263558.js new file mode 100644 index 0000000000..41705977ac --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1263558.js @@ -0,0 +1,16 @@ +// |jit-test| skip-if: !('oomTest' in this) + +evalcx(` + eval('\ + var appendToActual = function(s) {};\ + gczeal = function() {};\ + gcslice = function() {};\ + selectforgc = function() {};\ + if (!("verifyprebarriers" in this)) {\ + verifyprebarriers = function() {};\ + }\ + '); + oomTest(() => eval('Array(..."")')); + if ('Intl' in this) + new Intl.NumberFormat().format(0); +`, newGlobal()); diff --git a/js/src/jit-test/tests/auto-regress/bug1263857.js b/js/src/jit-test/tests/auto-regress/bug1263857.js new file mode 100644 index 0000000000..95dabfdc52 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1263857.js @@ -0,0 +1,5 @@ +// |jit-test| allow-oom; allow-unhandlable-oom; skip-if: getBuildConfiguration("android") +// Disabled on Android due to harness problems (Bug 1532654) +gcparam("maxBytes", gcparam("gcBytes") + 1); +fullcompartmentchecks(true); +/x/g[Symbol.replace](" x".repeat(32768), ""); diff --git a/js/src/jit-test/tests/auto-regress/bug1263865.js b/js/src/jit-test/tests/auto-regress/bug1263865.js new file mode 100644 index 0000000000..e5b11769d9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1263865.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !('oomTest' in this) + +loadFile(""); +loadFile(""); +loadFile("Array.prototype.splice.call(1)"); +function loadFile(lfVarx) { + parseInt("1"); + oomTest(function() { + eval(lfVarx); + }); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1263879.js b/js/src/jit-test/tests/auto-regress/bug1263879.js new file mode 100644 index 0000000000..1baba2dd3e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1263879.js @@ -0,0 +1,20 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var lines = ` + + + +"".replace([[2], 3]) +`.split('\n'); +var code = ""; +while (true) { + var line = lines.shift(); + if (line == null) + break; + loadFile(); + code += line + "\n"; +} +loadFile(code); +function loadFile(code) { + oomTest(() => eval(code)); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1263888.js b/js/src/jit-test/tests/auto-regress/bug1263888.js new file mode 100644 index 0000000000..c5e8a12dbf --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1263888.js @@ -0,0 +1,3 @@ +Array.prototype.constructor = []; +for (let i = 0; i < 100; i++) + [].slice(); diff --git a/js/src/jit-test/tests/auto-regress/bug1264561.js b/js/src/jit-test/tests/auto-regress/bug1264561.js new file mode 100644 index 0000000000..b5cc40bb22 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1264561.js @@ -0,0 +1,6 @@ +var r = RegExp(""); +var s = ""; +s += "".replace(r, Function("x")); +for (var x = 0; x < 5; x++) { + s += "".replace(r, this); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1264823.js b/js/src/jit-test/tests/auto-regress/bug1264823.js new file mode 100644 index 0000000000..afac37c3c6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1264823.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('oomTest' in this) + +loadFile(""); +loadFile(""); +loadFile(` function lalala() {} + new Map([[1, 2]]).forEach(lalala) + `); +function loadFile(lfVarx) { + return oomTest(function() { + eval(lfVarx) + }); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1266579.js b/js/src/jit-test/tests/auto-regress/bug1266579.js new file mode 100644 index 0000000000..ff3f6986cc --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1266579.js @@ -0,0 +1,28 @@ +function test1() { + do { + "8pan08pa8pan08pa".split(""); + } while (!inIon()); +} + +function test2() { + do { + "abababababababababababababababab".split("a"); + } while (!inIon()); +} + +function test3() { + do { + "abcabcabcabcabcabcabcabcabcabcabcabcabcabcabc".split("ab"); + } while (!inIon()); +} + +function test4() { + do { + "".split(""); + } while (!inIon()); +} + +test1(); +test2(); +test3(); +test4(); diff --git a/js/src/jit-test/tests/auto-regress/bug1268034.js b/js/src/jit-test/tests/auto-regress/bug1268034.js new file mode 100644 index 0000000000..43f2a661fd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1268034.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(function() { + offThreadCompileToStencil(""); +}); +"".match(); diff --git a/js/src/jit-test/tests/auto-regress/bug1269074.js b/js/src/jit-test/tests/auto-regress/bug1269074.js new file mode 100644 index 0000000000..6e2cc33035 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1269074.js @@ -0,0 +1,3 @@ +// |jit-test| allow-oom; skip-if: !('oomTest' in this) + +evalcx('oomTest(function() { Array(...""); })', newGlobal()); diff --git a/js/src/jit-test/tests/auto-regress/bug1276082.js b/js/src/jit-test/tests/auto-regress/bug1276082.js new file mode 100644 index 0000000000..5a32fa06a0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1276082.js @@ -0,0 +1,5 @@ +function f() { + (function() {}).bind()(/x/); +} +f(); +f(); diff --git a/js/src/jit-test/tests/auto-regress/bug1315943.js b/js/src/jit-test/tests/auto-regress/bug1315943.js new file mode 100644 index 0000000000..9aabb6f198 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1315943.js @@ -0,0 +1,11 @@ +var s = "{}"; +for (var i = 0; i < 21; i++) s += s; +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function(frame) { + var s = frame.eval("f").return.script; +}; +g.eval("line0 = Error().lineNumber;\n" + "debugger;\n" + // line0 + 1 + "function f(i) {\n" + // line0 + 2 + s + // line0 + 3 ... line0 + where - 2 + "}\n"); diff --git a/js/src/jit-test/tests/auto-regress/bug1317460.js b/js/src/jit-test/tests/auto-regress/bug1317460.js new file mode 100644 index 0000000000..ccd6aacf12 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1317460.js @@ -0,0 +1,11 @@ +// |jit-test| error:TypeError + +g = newGlobal(); +g.parent = this; +g.eval("(" + function() { + Debugger(parent).onExceptionUnwind = function() { return 0; }; +} + ")()"); +async function f() { + t; +} +f(); diff --git a/js/src/jit-test/tests/auto-regress/bug1335619.js b/js/src/jit-test/tests/auto-regress/bug1335619.js new file mode 100644 index 0000000000..574fa1fcc5 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1335619.js @@ -0,0 +1,11 @@ +// jsfunfuzz-generated +x = []; +y = x.push(Set, 1); +Array.prototype.shift.call(x); +// Adapted from randomly chosen test: js/src/tests/ecma_5/String/match-defines-match-elements.js +Object.defineProperty(Array.prototype, 1, { + set: function() {} +}) +// jsfunfuzz-generated +Array.prototype.splice.call(x, 3, {}, y); +new Set(x); diff --git a/js/src/jit-test/tests/auto-regress/bug1335623.js b/js/src/jit-test/tests/auto-regress/bug1335623.js new file mode 100644 index 0000000000..8d729f7fe7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1335623.js @@ -0,0 +1,9 @@ +// jsfunfuzz-generated +x = []; +// Adapted from randomly chosen test: js/src/tests/ecma_5/String/match-defines-match-elements.js +y = Object.defineProperty(Array.prototype, 1, { + set: function () {} +}); +// jsfunfuzz-generated +x.splice(0, 1, y, y); +new Float64Array(x); diff --git a/js/src/jit-test/tests/auto-regress/bug1343513-2.js b/js/src/jit-test/tests/auto-regress/bug1343513-2.js new file mode 100644 index 0000000000..e2bbe7bc95 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1343513-2.js @@ -0,0 +1,9 @@ +// |jit-test| error:RangeError; skip-if: largeArrayBufferSupported(); --ion-warmup-threshold=50 +setJitCompilerOption("offthread-compilation.enable", 0); +gcPreserveCode(); + +var i = 0; +do { + i++; + var ta = new Int32Array(inIon() ? 0x20000001 : 1); +} while (!inIon()); diff --git a/js/src/jit-test/tests/auto-regress/bug1343513.js b/js/src/jit-test/tests/auto-regress/bug1343513.js new file mode 100644 index 0000000000..03f48d3912 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1343513.js @@ -0,0 +1,9 @@ +// |jit-test| error:RangeError; skip-if: largeArrayBufferSupported(); --ion-warmup-threshold=50 +setJitCompilerOption("offthread-compilation.enable", 0); +gcPreserveCode(); + +var i = 0; +do { + i++; + var ta = new Int32Array(inIon() ? 0x7fffffff : 1); +} while (!inIon()); diff --git a/js/src/jit-test/tests/auto-regress/bug1357330.js b/js/src/jit-test/tests/auto-regress/bug1357330.js new file mode 100644 index 0000000000..a657ba8024 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1357330.js @@ -0,0 +1,17 @@ +function byteValue(value) { + var isLittleEndian = new Uint8Array(new Uint16Array([1]).buffer)[0] !== 0; + var ui8 = new Uint8Array(new Float64Array([value]).buffer); + + var hex = "0123456789ABCDEF"; + var s = ""; + for (var i = 0; i < 8; ++i) { + var v = ui8[isLittleEndian ? 7 - i : i]; + s += hex[(v >> 4) & 0xf] + hex[v & 0xf]; + } + return s; +} + +var obj = {}; +Object.defineProperty(obj, "prop", {value: NaN}); +Object.defineProperty(obj, "prop", {value: -NaN}); +assertEq(byteValue(obj.prop), byteValue(NaN)); diff --git a/js/src/jit-test/tests/auto-regress/bug1357462.js b/js/src/jit-test/tests/auto-regress/bug1357462.js new file mode 100644 index 0000000000..f2364951fb --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1357462.js @@ -0,0 +1,6 @@ +var p = Object.freeze(["old-value"]); +var a = Object.setPrototypeOf([], p); + +assertEq(p[0], "old-value"); +assertEq(Reflect.set(a, 0, "new-value", p), false); +assertEq(p[0], "old-value"); diff --git a/js/src/jit-test/tests/auto-regress/bug1375446.js b/js/src/jit-test/tests/auto-regress/bug1375446.js new file mode 100644 index 0000000000..ef8ae4c640 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1375446.js @@ -0,0 +1,10 @@ +// |jit-test| allow-oom; skip-if: !('oomTest' in this) + +loadFile(` + disassemble(function() { + return assertDeepEq(x.concat(obj), [1, 2, 3, "hey"]); + }) +`); +function loadFile(lfVarx) { + oomTest(new Function(lfVarx)); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1390082-1.js b/js/src/jit-test/tests/auto-regress/bug1390082-1.js new file mode 100644 index 0000000000..7b583f3a48 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1390082-1.js @@ -0,0 +1,10 @@ +Object.defineProperty(Array.prototype, "2", { + set: function () {} +}); +async function* f() { + yield {}; +} +var x = f(); +x.next(); +x.next(); +x.next(); diff --git a/js/src/jit-test/tests/auto-regress/bug1390082-2.js b/js/src/jit-test/tests/auto-regress/bug1390082-2.js new file mode 100644 index 0000000000..40283ce896 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1390082-2.js @@ -0,0 +1,14 @@ +Object.prototype.set = function () {}; +let f = async function* () { + yield; +}; +let x = f(); +x.next(); +x.next().then(function () { + x.next(); +}); +Object.defineProperty(Array.prototype, "0", { + get: function () { + return 1; + } +}); diff --git a/js/src/jit-test/tests/auto-regress/bug1416809-1.js b/js/src/jit-test/tests/auto-regress/bug1416809-1.js new file mode 100644 index 0000000000..067943575b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1416809-1.js @@ -0,0 +1,12 @@ +// https://tc39.github.io/proposal-async-iteration + +// Recursion between: +// 11.4.3.3 AsyncGeneratorResolve, step 8 +// 11.4.3.5 AsyncGeneratorResumeNext, step 11. + +var asyncIter = async function*(){ yield; }(); +asyncIter.next(); + +for (var i = 0; i < 20000; i++) { + asyncIter.next(); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1416809-2.js b/js/src/jit-test/tests/auto-regress/bug1416809-2.js new file mode 100644 index 0000000000..eb63cdbe33 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1416809-2.js @@ -0,0 +1,14 @@ +// https://tc39.github.io/proposal-async-iteration + +// Recursion between: +// 11.4.3.4 AsyncGeneratorReject, step 7. +// 11.4.3.5 AsyncGeneratorResumeNext, step 10.b.ii.2. + +ignoreUnhandledRejections(); + +var asyncIter = async function*(){ yield; }(); +asyncIter.next(); + +for (var i = 0; i < 20000; i++) { + asyncIter.throw(); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1448582-1.js b/js/src/jit-test/tests/auto-regress/bug1448582-1.js new file mode 100644 index 0000000000..28f2e3ea9f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1448582-1.js @@ -0,0 +1,21 @@ +// Overview: +// - The outer function is an IIFE which gets marked as a singleton. +// - The |o[index]| inner function is then also marked as a singleton. +// - The |o[index]| inner function has a dynamic name from a computed property name. +// - The |self| inner function uses |Function.prototype.caller| to reinvoke the outer function. +// +// When we reinvoke outer, we end up cloning a previously reused, i.e. non-cloned, +// function which triggered an assertion in js::SetFunctionNameIfNoOwnName(). + +(function(index) { + var o = { + [index]: function() {} + }; + + // Reinvoke the IIFE through |Function.prototype.caller|. + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); diff --git a/js/src/jit-test/tests/auto-regress/bug1448582-2.js b/js/src/jit-test/tests/auto-regress/bug1448582-2.js new file mode 100644 index 0000000000..fdf59d281b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1448582-2.js @@ -0,0 +1,25 @@ +// Overview: +// - The outer function is an IIFE which gets marked as a singleton. +// - The |o[index]| inner function is then also marked as a singleton. +// - The |o[index]| inner function has a dynamic name from a computed property name. +// - The |self| inner function uses |Function.prototype.caller| to reinvoke the outer function. +// +// When we reinvoke outer, we end up cloning a previously reused, i.e. non-cloned, +// function which triggered an assertion in js::SetFunctionNameIfNoOwnName(). + +(function(index) { + var o = { + [index]: function() {} + }; + + // Accessing |.name| sets the resolved-name flag, which triggered yet + // another assertion when compared to bug1448582-1.js + assertEq(o[index].name, String(index)); + + // Reinvoke the IIFE through |Function.prototype.caller|. + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); diff --git a/js/src/jit-test/tests/auto-regress/bug1448582-3.js b/js/src/jit-test/tests/auto-regress/bug1448582-3.js new file mode 100644 index 0000000000..d6d491f433 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1448582-3.js @@ -0,0 +1,22 @@ +// Overview: +// - The outer function is an IIFE which gets marked as a singleton. +// - The |fn| inner function is then also marked as a singleton. +// - The |self| inner function uses |Function.prototype.caller| to reinvoke the outer function. +// +// When we reinvoke outer, we end up cloning a previously reused, i.e. non-cloned, +// function. + +(function(index) { + var fn = function() {}; + + // Accessing |.name| sets the resolved-name flag, which should not be + // copied over to the function clone. + assertEq(fn.name, "fn"); + + // Reinvoke the IIFE through |Function.prototype.caller|. + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); diff --git a/js/src/jit-test/tests/auto-regress/bug1448582-4.js b/js/src/jit-test/tests/auto-regress/bug1448582-4.js new file mode 100644 index 0000000000..a806e4a2e8 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1448582-4.js @@ -0,0 +1,22 @@ +// Overview: +// - The outer function is an IIFE which gets marked as a singleton. +// - The |fn| inner function is then also marked as a singleton. +// - The |self| inner function uses |Function.prototype.caller| to reinvoke the outer function. +// +// When we reinvoke outer, we end up cloning a previously reused, i.e. non-cloned, +// function. + +(function(index) { + var fn = function(a) {}; + + // Accessing |.length| sets the resolved-length flag, which should not be + // copied over to the function clone. + assertEq(fn.length, 1); + + // Reinvoke the IIFE through |Function.prototype.caller|. + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); diff --git a/js/src/jit-test/tests/auto-regress/bug1448582-5.js b/js/src/jit-test/tests/auto-regress/bug1448582-5.js new file mode 100644 index 0000000000..a877ee6c1e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1448582-5.js @@ -0,0 +1,133 @@ +// Repeat 1448582-{1,3,4}.js for classes. + +(function(index) { + // Does not assert. + var c = class { constructor(){} }; + + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); + +(function(index) { + var c = class { constructor(){} }; + + // Accessing |.name| sets the resolved-name flag, which should not be + // copied over to the function clone. + assertEq(c.name, "c"); + + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); + +(function(index) { + var c = class { constructor(a){} }; + + // Accessing |.length| sets the resolved-length flag, which should not be + // copied over to the function clone. + assertEq(c.length, 1); + + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); + + +// Repeat 1448582-{3,4}.js for generator functions. + +(function(index) { + function* f() {} + + // Accessing |.name| sets the resolved-name flag, which should not be + // copied over to the function clone. + assertEq(f.name, "f"); + + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); + +(function(index) { + function* f(a) {} + + // Accessing |.length| sets the resolved-length flag, which should not be + // copied over to the function clone. + assertEq(f.length, 1); + + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); + + +// Repeat 1448582-{3,4}.js for async functions. + +(function(index) { + async function f() {} + + // Accessing |.name| sets the resolved-name flag, which should not be + // copied over to the function clone. + assertEq(f.name, "f"); + + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); + +(function(index) { + async function f(a) {} + + // Accessing |.length| sets the resolved-length flag, which should not be + // copied over to the function clone. + assertEq(f.length, 1); + + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); + + +// Repeat 1448582-{3,4}.js for async generator functions. + +(function(index) { + async function* f() {} + + // Accessing |.name| sets the resolved-name flag, which should not be + // copied over to the function clone. + assertEq(f.name, "f"); + + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); + +(function(index) { + async function* f(a) {} + + // Accessing |.length| sets the resolved-length flag, which should not be + // copied over to the function clone. + assertEq(f.length, 1); + + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); diff --git a/js/src/jit-test/tests/auto-regress/bug1448582-6.js b/js/src/jit-test/tests/auto-regress/bug1448582-6.js new file mode 100644 index 0000000000..b864a1c13a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1448582-6.js @@ -0,0 +1,26 @@ +// Overview: +// - The outer function is an IIFE which gets marked as a singleton. +// - The |o[index]| inner function is then also marked as a singleton. +// - The |o[index]| inner function has a dynamic name from a computed property name. +// - The |self| inner function uses |Function.prototype.caller| to reinvoke the outer function. + +(function(index) { + var o = { + [index]: class { + constructor() {} + + // The static method named "name" is added after assigning the + // inferred name. + static [(index === 0 ? "not-name" : "name")]() {} + } + } + + // The inferred name matches the current index. + assertEq(displayName(o[index]), String(index)); + + if (index === 0) { + (function self() { + self.caller(1); + })(); + } +})(0); diff --git a/js/src/jit-test/tests/auto-regress/bug1454285.js b/js/src/jit-test/tests/auto-regress/bug1454285.js new file mode 100644 index 0000000000..9170977be6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1454285.js @@ -0,0 +1,86 @@ +// IteratorClose in for-await-of with block-scoped function. + +// Non-local-jump without target. + +(async function() { + for await (let c of []) { + function f() {}; + return; + } +})(); +(async function() { + for await (let c of []) { + function f() {}; + break; + } +})(); +(async function() { + for await (let c of []) { + function f() {}; + continue; + } +})(); + +// Non-local-jump with target. + +(async function() { + for (let x of []) { + x: for (let y of []) { + for await (let c of []) { + function f() {}; + return; + } + } + } +})(); +(async function() { + for (let x of []) { + x: for (let y of []) { + for await (let c of []) { + function f() {}; + break x; + } + } + } +})(); +(async function() { + for (let x of []) { + x: for (let y of []) { + for await (let c of []) { + function f() {}; + continue x; + } + } + } +})(); + +(async function() { + for await (let x of []) { + x: for await (let y of []) { + for await (let c of []) { + function f() {}; + return; + } + } + } +})(); +(async function() { + for await (let x of []) { + x: for await (let y of []) { + for await (let c of []) { + function f() {}; + break x; + } + } + } +})(); +(async function() { + for await (let x of []) { + x: for await (let y of []) { + for await (let c of []) { + function f() {}; + continue x; + } + } + } +})(); diff --git a/js/src/jit-test/tests/auto-regress/bug1460436-1.js b/js/src/jit-test/tests/auto-regress/bug1460436-1.js new file mode 100644 index 0000000000..8b1ddd4fbc --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1460436-1.js @@ -0,0 +1,5 @@ +for (var j = 0; j < 2; ++j) { + for (var k = 0; k < 2; ++k) { + assertEq(Math.sign(Math.PI ? 2 : (function() {})() ? h : l), 1) + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug1460436-2.js b/js/src/jit-test/tests/auto-regress/bug1460436-2.js new file mode 100644 index 0000000000..5a6a7dc17a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1460436-2.js @@ -0,0 +1,9 @@ +function f(y) { + Math.sign(y) ? n : undefined +} +f(); +function g() {}; +(function() { + for (var j = 0; j < 1100; ++j) + f(!1 ^ 1 ? undefined | 0 : +w()) +})(); diff --git a/js/src/jit-test/tests/auto-regress/bug1462341.js b/js/src/jit-test/tests/auto-regress/bug1462341.js new file mode 100644 index 0000000000..37c4f2129c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1462341.js @@ -0,0 +1,12 @@ +// |jit-test| allow-oom; skip-if: !('oomTest' in this) + +loadFile(` + switch (0) { + case (-1): + } +`); +function loadFile(lfVarx) { + oomTest(function() { + let m = parseModule(lfVarx); + }); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1466626-1.js b/js/src/jit-test/tests/auto-regress/bug1466626-1.js new file mode 100644 index 0000000000..f82c4de48e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1466626-1.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(function() { + for (var i = 0; i < 10; ++i) { + Promise.resolve().then(); + } +}); diff --git a/js/src/jit-test/tests/auto-regress/bug1466626-2.js b/js/src/jit-test/tests/auto-regress/bug1466626-2.js new file mode 100644 index 0000000000..056ea075e2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1466626-2.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var globals = []; +for (var i = 0; i < 24; ++i) { + var g = newGlobal(); + globals.push(g); +} + +var i = 0; +oomTest(function() { + globals[(i++) % globals.length].eval(` + evaluate("function f() {}", {envChainObject: this.env}); + `); +}); diff --git a/js/src/jit-test/tests/auto-regress/bug1466626-3.js b/js/src/jit-test/tests/auto-regress/bug1466626-3.js new file mode 100644 index 0000000000..bffecfce73 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1466626-3.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var g = newGlobal(); + +var i = 0; +oomTest(function() { + var s = String.fromCharCode((i++) & 0xffff); + var r = ""; + for (var j = 0; j < 1000; ++j) { + r = s + r; + } + g.String.prototype.toString.call(r); +}); diff --git a/js/src/jit-test/tests/auto-regress/bug1466626-4.js b/js/src/jit-test/tests/auto-regress/bug1466626-4.js new file mode 100644 index 0000000000..aa02a3ba08 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1466626-4.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var source = "{"; +for (var i = 0; i < 120; ++i) + source += `function f${i}(){}` +source += "}"; + +oomTest(function() { + Function(source); +}); diff --git a/js/src/jit-test/tests/auto-regress/bug1468629.js b/js/src/jit-test/tests/auto-regress/bug1468629.js new file mode 100644 index 0000000000..da2bb51899 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1468629.js @@ -0,0 +1,11 @@ +function lfEvalInCache(lfCode, lfIncremental = false, lfRunOnce = false) { + let ctx = {}; + let code = cacheEntry(lfCode); + ctx_save = Object.create(ctx, { saveIncrementalBytecode: { value: true } }); + try { evaluate(code, ctx_save); } catch(exc) {} + try { evaluate(code, Object.create(ctx_save, { loadBytecode: { value: true } })); } catch(exc) {} +} +lfEvalInCache(` + function q() {} + Object.freeze(this); +`, false, true); diff --git a/js/src/jit-test/tests/auto-regress/bug1476417.js b/js/src/jit-test/tests/auto-regress/bug1476417.js new file mode 100644 index 0000000000..7748723f7e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1476417.js @@ -0,0 +1,22 @@ +function f(x) { + var y, z; + + arguments; // Force creation of mapped arguments, so modifying |x| writes to the arguments object. + Math; // Access a global variable to create a resume point. + z = x + 1; // Was executed twice because only the resume point for 'Math' was present before the fix. + x = z; // Modifying |x| writes into the arguments object. We missed to create a resume point here. + y = 2 * x; // Triggers a bailout when overflowing int32 boundaries. + + return [x, y]; +} + +var x = [0, 0, 0x3FFFFFFF]; + +for (var j = 0; j < 3; ++j) { + var value = x[j]; + var expected = [value + 1, (value + 1) * 2]; + var actual = f(value); + + assertEq(actual[0], expected[0]); + assertEq(actual[1], expected[1]); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1479076.js b/js/src/jit-test/tests/auto-regress/bug1479076.js new file mode 100644 index 0000000000..d3d5f9d6e2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1479076.js @@ -0,0 +1,6 @@ +fullcompartmentchecks(true); +var dbg = new Debugger(); +var g = newGlobal({newCompartment: true}); +g.eval("function f(){}"); +dbg.addDebuggee(g); +dbg.findScripts(); diff --git a/js/src/jit-test/tests/auto-regress/bug1481032.js b/js/src/jit-test/tests/auto-regress/bug1481032.js new file mode 100644 index 0000000000..f1384d6e96 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1481032.js @@ -0,0 +1,6 @@ +x = []; +x[6] = 0; +Object.preventExtensions(x); + +// Don't assert. +x.length = 1; diff --git a/js/src/jit-test/tests/auto-regress/bug1483188.js b/js/src/jit-test/tests/auto-regress/bug1483188.js new file mode 100644 index 0000000000..0aebdba25c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1483188.js @@ -0,0 +1,13 @@ +var P = newGlobal().eval(` +(class extends Promise { + static resolve(o) { + return o; + } +}); +`); +var alwaysPending = new Promise(() => {}); +function neverCalled() { + assertEq(true, false); +} +P.race([alwaysPending]).then(neverCalled, neverCalled); + diff --git a/js/src/jit-test/tests/auto-regress/bug1500255.js b/js/src/jit-test/tests/auto-regress/bug1500255.js new file mode 100644 index 0000000000..7a09cf2397 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1500255.js @@ -0,0 +1,9 @@ + +setJitCompilerOption("offthread-compilation.enable", 0); +setJitCompilerOption("ion.warmup.trigger", 100); + +Array.prototype.__proto__ = function() {}; +var LENGTH = 1024; +var big = []; +for (var i = 0; i < LENGTH; i++) + big[i] = i; diff --git a/js/src/jit-test/tests/auto-regress/bug1524943.js b/js/src/jit-test/tests/auto-regress/bug1524943.js new file mode 100644 index 0000000000..1c5cc34123 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1524943.js @@ -0,0 +1,4 @@ +Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; + +// Just ensure it doesn't crash. +Uint8Array.from(0); diff --git a/js/src/jit-test/tests/auto-regress/bug1538542-1.js b/js/src/jit-test/tests/auto-regress/bug1538542-1.js new file mode 100644 index 0000000000..5057de6f94 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1538542-1.js @@ -0,0 +1,13 @@ +var lfOffThreadGlobal = newGlobal(); +nukeAllCCWs(); +const thisGlobal = this; +const otherGlobalNewCompartment = newGlobal({ + newCompartment: true +}); +let { transplant } = transplantableObject(); + +// Just don't crash. +try { + transplant(otherGlobalNewCompartment); + transplant(thisGlobal); +} catch {} diff --git a/js/src/jit-test/tests/auto-regress/bug1538542-2.js b/js/src/jit-test/tests/auto-regress/bug1538542-2.js new file mode 100644 index 0000000000..3efc05ceb6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1538542-2.js @@ -0,0 +1,13 @@ +var lfOffThreadGlobal = newGlobal(); +nukeAllCCWs(); +const thisGlobal = this; +const otherGlobalNewCompartment = newGlobal({ + newCompartment: false +}); +let { transplant } = transplantableObject(); + +// Just don't crash. +try { + transplant(otherGlobalNewCompartment); + transplant(thisGlobal); +} catch {} diff --git a/js/src/jit-test/tests/auto-regress/bug1544364.js b/js/src/jit-test/tests/auto-regress/bug1544364.js new file mode 100644 index 0000000000..672bbae784 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1544364.js @@ -0,0 +1,8 @@ +// |jit-test| error:Error + +let sandbox = evalcx("lazy"); + +let domObject = new FakeDOMObject(); +let {object, transplant} = transplantableObject({object: domObject}); + +transplant(sandbox); diff --git a/js/src/jit-test/tests/auto-regress/bug1546232-2.js b/js/src/jit-test/tests/auto-regress/bug1546232-2.js new file mode 100644 index 0000000000..bde98444c8 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1546232-2.js @@ -0,0 +1,8 @@ +var g = newGlobal(); +g.eval(` +Array.from(function*() { + yield 1; + relazifyFunctions(); + yield 1; +}()); +`); diff --git a/js/src/jit-test/tests/auto-regress/bug1546232.js b/js/src/jit-test/tests/auto-regress/bug1546232.js new file mode 100644 index 0000000000..4c3204b809 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1546232.js @@ -0,0 +1,4 @@ +var g = newGlobal(); +g.Int8Array.from([]); +relazifyFunctions(); +g.eval("[].values()"); diff --git a/js/src/jit-test/tests/auto-regress/bug1562102.js b/js/src/jit-test/tests/auto-regress/bug1562102.js new file mode 100644 index 0000000000..78f5ef9010 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1562102.js @@ -0,0 +1,12 @@ +// |jit-test| allow-oom; allow-unhandlable-oom; skip-if: !('oomTest' in this) +oomTest( + function() { + evaluate(` +class C { + c; +} +`, { + compileAndGo: true +}); + } +) diff --git a/js/src/jit-test/tests/auto-regress/bug1574415.js b/js/src/jit-test/tests/auto-regress/bug1574415.js new file mode 100644 index 0000000000..81c61c41da --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1574415.js @@ -0,0 +1,11 @@ +var err = 0; + +for (let x of [0, Object.create(null)]) { + try { + (new Int8Array)[1] = x; + } catch (e) { + err += 1; + } +} + +assertEq(err, 1); diff --git a/js/src/jit-test/tests/auto-regress/bug1591019.js b/js/src/jit-test/tests/auto-regress/bug1591019.js new file mode 100644 index 0000000000..2c2aff3f44 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1591019.js @@ -0,0 +1,4 @@ +// |jit-test| --ion-gvn=off; + +"foo".charAt(3.4); +for (name of []) {} diff --git a/js/src/jit-test/tests/auto-regress/bug1593971.js b/js/src/jit-test/tests/auto-regress/bug1593971.js new file mode 100644 index 0000000000..42ffbbd855 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1593971.js @@ -0,0 +1,7 @@ +var ta = new Uint32Array(10); + +// Shadow the %TypedArray.prototype%.length getter. +Object.defineProperty(ta, "length", {value: 0x1000}); + +// Call Array.prototype.fill, not %TypedArray.prototype%.fill! +Array.prototype.fill.call(ta, 0); diff --git a/js/src/jit-test/tests/auto-regress/bug1652148.js b/js/src/jit-test/tests/auto-regress/bug1652148.js new file mode 100644 index 0000000000..232957edb6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1652148.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => { + new AggregateError([]); +}); diff --git a/js/src/jit-test/tests/auto-regress/bug1652153.js b/js/src/jit-test/tests/auto-regress/bug1652153.js new file mode 100644 index 0000000000..875949c7ea --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1652153.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('oomTest' in this) + +x = "x"; + +lFile(x); + +function lFile() { + return oomTest(function() { + let error = new Error("foobar"); + let report = createErrorReport(error); + }); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1669914.js b/js/src/jit-test/tests/auto-regress/bug1669914.js new file mode 100644 index 0000000000..9e433f685f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1669914.js @@ -0,0 +1,10 @@ +function v0(v1, v2) { + try { + v3 = v0(); + } catch (v4) { + if (typeof disassemble === "function") { + disassemble("-r", Function("()=>e,d")); + } + } +} +v24 = v0("matchAll"); diff --git a/js/src/jit-test/tests/auto-regress/bug1670378.js b/js/src/jit-test/tests/auto-regress/bug1670378.js new file mode 100644 index 0000000000..da3c1e93dd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1670378.js @@ -0,0 +1,8 @@ +// |jit-test| allow-unhandlable-oom; skip-if: !('oomTest' in this) + +const otherGlobalNewCompartment = newGlobal({newCompartment: true}); + +oomTest(function() { + let {transplant} = transplantableObject(); + transplant(otherGlobalNewCompartment); +}); diff --git a/js/src/jit-test/tests/auto-regress/bug1689880-1.js b/js/src/jit-test/tests/auto-regress/bug1689880-1.js new file mode 100644 index 0000000000..e2da308010 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1689880-1.js @@ -0,0 +1,14 @@ +// |jit-test| error: ReferenceError + +// We elide the uninitialised lexical check for the second access to |x|, +// because we statically know that the first access will throw an error. +// `!x` is compiled straight from bytecode without going through any ICs, so +// already on first (eager) compilation we may be Warp compiling. + +function testNot(x = (x, !x)) { + function inner() { + // Close over |x|. + x; + } +} +testNot(); diff --git a/js/src/jit-test/tests/auto-regress/bug1689880-2.js b/js/src/jit-test/tests/auto-regress/bug1689880-2.js new file mode 100644 index 0000000000..2fefdc7ce2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1689880-2.js @@ -0,0 +1,14 @@ +// |jit-test| error: ReferenceError + +// We elide the uninitialised lexical check for the second access to |x|, +// because we statically know that the first access will throw an error. +// `x ? . : .` is compiled straight from bytecode without going through any +// ICs, so already on first (eager) compilation we may be Warp compiling. + +function testConditional(x = (x, (x ? 1 : 0))) { + function inner() { + // Close over |x|. + x; + } +} +testConditional(); diff --git a/js/src/jit-test/tests/auto-regress/bug1736307.js b/js/src/jit-test/tests/auto-regress/bug1736307.js new file mode 100644 index 0000000000..7fe3cbb6d9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1736307.js @@ -0,0 +1,3 @@ +for (var i = 0; i < 100; ++i) { + assertEq(typeof Uint16Array == undefined, false); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1750496.js b/js/src/jit-test/tests/auto-regress/bug1750496.js new file mode 100644 index 0000000000..1cac966546 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1750496.js @@ -0,0 +1,8 @@ +// |jit-test| --ion-offthread-compile=off; --ion-warmup-threshold=6; --baseline-warmup-threshold=0; --small-function-length=1024; --inlining-entry-threshold=1; --trial-inlining-warmup-threshold=5; +for (let v1 = 0; v1 < 4; v1++) { + const v28 = "aa".split(''); + v28[0] = 1; + const v35 = "aa".split(''); + assertEq(v35[0], "a"); + assertEq(Object.is(v35, v28), false); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1763501.js b/js/src/jit-test/tests/auto-regress/bug1763501.js new file mode 100644 index 0000000000..72ce59903b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1763501.js @@ -0,0 +1,6 @@ +function test(expected) { + with ({}) assertEq(new.target, expected); +} + +test(undefined); +new test(test); diff --git a/js/src/jit-test/tests/auto-regress/bug1765028.js b/js/src/jit-test/tests/auto-regress/bug1765028.js new file mode 100644 index 0000000000..dc39692334 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1765028.js @@ -0,0 +1,3 @@ +gczeal(6, 1); +var a = []; +Array.call(a); diff --git a/js/src/jit-test/tests/auto-regress/bug1765249.js b/js/src/jit-test/tests/auto-regress/bug1765249.js new file mode 100644 index 0000000000..9c6ae09b92 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1765249.js @@ -0,0 +1,34 @@ + // |jit-test| --fast-warmup; --no-threads + +function main() { + // Disable Warp compilation, so we don't inline |f|. + with ({}) {} + + let begin = 0; + for (let i = 1; i < 30; i++) { + f(begin); + begin = undefined; + } +} +main(); + +function g(i) { + return i < 3; +} + +function f(begin) { + // Loop body is only reachable on the first invocation. + for (let i = begin; i < 5; i++) { + // |arguments| with out-of-bounds access. This adds a guard on the prototype + // of the arguments object. + arguments[100]; + + // Loop with a call expression. This ensures we emit bail instructions for + // unreachable code after the first invocation. + for (let j = 0; g(j); j++) {} + + // Change the prototype of the arguments object. This will cause a failure + // on the prototype guard added above. + arguments.__proto__ = {}; + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug1766225.js b/js/src/jit-test/tests/auto-regress/bug1766225.js new file mode 100644 index 0000000000..1539114712 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1766225.js @@ -0,0 +1,12 @@ +// |jit-test| --ion-offthread-compile=off; --ion-warmup-threshold=1; --ion-gvn=off + +gczeal(4) +function a() {} +function b() { + a(Array.prototype.slice.call(arguments, 1, 3)); +} +function c() { + b(1, 2); +} +for (i=0 ; i<200; ++i) + c() diff --git a/js/src/jit-test/tests/auto-regress/bug1783507.js b/js/src/jit-test/tests/auto-regress/bug1783507.js new file mode 100644 index 0000000000..a7a4fd7f57 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1783507.js @@ -0,0 +1,17 @@ +function main(x) { + var ta = new Int32Array(10); + + for (var i = 0; i < 100; ++i) { + // MCompare::Compare_UIntPtr with result only used on bailout. + var r = 0 in ta; + + // Path only entered through bailout condition. + if (x) { + // |r| must be recovered on bailout here. + x(r); + } + } +} + +main(); +main(() => {}); diff --git a/js/src/jit-test/tests/auto-regress/bug1790543.js b/js/src/jit-test/tests/auto-regress/bug1790543.js new file mode 100644 index 0000000000..1fb70c9d00 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1790543.js @@ -0,0 +1,7 @@ +Array.prototype[0] = 0; + +var a = []; +for (var i = 0; i < 10_000; ++i) + a.push(0); + +assertEq(a.length, 10_000); diff --git a/js/src/jit-test/tests/auto-regress/bug1791401.js b/js/src/jit-test/tests/auto-regress/bug1791401.js new file mode 100644 index 0000000000..6b3a7a5dbd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1791401.js @@ -0,0 +1,19 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(function() { + var f = Function(` + // Don't actually enter the loop. This still causes the original bug and + // additionally makes the test complete faster. + // + // Don't directly use |false|, otherwise the byte code emitter won't emit + // the loop. + var False = [false, false][0]; + if (False) { + for (let x;;) { + // Capture |x|, so it's freshened each loop iteration. + Object(() => x); + } + } + `); + f(); +}); diff --git a/js/src/jit-test/tests/auto-regress/bug1798883.js b/js/src/jit-test/tests/auto-regress/bug1798883.js new file mode 100644 index 0000000000..9ebe5daa2e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1798883.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// String with an initial part which doesn't need to be normalised and a tail +// which gets normalised to "\u05E9\u05BC\u05C1". +var s = "a".repeat(32) + String.fromCharCode(0xFB2C); + +oomTest(function() { + // |normalize()| needs to be called at least twice to trigger the bug. + s.normalize(); + s.normalize(); +}); \ No newline at end of file diff --git a/js/src/jit-test/tests/auto-regress/bug1805881.js b/js/src/jit-test/tests/auto-regress/bug1805881.js new file mode 100644 index 0000000000..8f3df42198 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1805881.js @@ -0,0 +1,21 @@ +// |jit-test| --baseline-warmup-threshold=10; --ion-warmup-threshold=100 + +function blackhole() { + with ({}); +} + +function main() { + for (let i = 0; i < 100; i++) { + try { + const v3 = 0..toString(i); + for (let j = 0; j < 100; j++) { + } + blackhole(v3); + } catch { + } + for (let j = 0; j < 6; ++j) { + } + } +} + +main(); diff --git a/js/src/jit-test/tests/auto-regress/bug1812148.js b/js/src/jit-test/tests/auto-regress/bug1812148.js new file mode 100644 index 0000000000..9b8290b449 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1812148.js @@ -0,0 +1,49 @@ +const f = (x) => 1; +for (let v4 = 0; v4 < 100; v4++) { + for (const v8 of "arguments") { + v8 == "a"; + Symbol.for().description; + Symbol.for(); + Symbol.for(); + } + const v16 = Symbol.search; + let v17 = v16.description; + Symbol.for("arguments"); + const v19 = v16.description; + v17 = 0; + const v21 = Symbol.for(v19).description; + Symbol.for(v21); + Symbol.for(v21); + const v25 = Symbol.for().description; + Symbol.for(); + Symbol.for(); + Symbol.for(); + Symbol.for().description; + Symbol.for(); + Symbol.for(); + Symbol.for().description; + Symbol.for(); + Symbol.for(v25).description; + Symbol.for(); + Symbol.for(); + Symbol.for(); + Symbol.for(); + const v42 = (1024)[v16]; + const v43 = Symbol(); + Symbol.for(v19).description; + Symbol.for(); + Symbol.for(); + Symbol.for(v21).description; + Symbol.for(); + Symbol.for(); + Symbol.for(); + Symbol.for(); + Symbol.for(); + Symbol.for(); + Symbol.for(); + Symbol[v43] ||= v42; +} +f(0); +f(0); +f(0); +f(0); diff --git a/js/src/jit-test/tests/auto-regress/bug1813387.js b/js/src/jit-test/tests/auto-regress/bug1813387.js new file mode 100644 index 0000000000..b6afc9d01a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1813387.js @@ -0,0 +1,10 @@ +var g = newGlobal(); +function foo() { + try { + foo(); + } catch { + g.Reflect.construct(g.Uint8ClampedArray, new g.Int8Array); + } +} + +foo(); diff --git a/js/src/jit-test/tests/auto-regress/bug1863390.js b/js/src/jit-test/tests/auto-regress/bug1863390.js new file mode 100644 index 0000000000..f414fceb7c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1863390.js @@ -0,0 +1,6 @@ +var left = "left-rope-child"; +var right = newString("right-rope-child", {twoByte: true}); +var rope = newRope(left, right); +var result = rope.substring(0, left.length + 1); + +assertEq(result, "left-rope-childr"); diff --git a/js/src/jit-test/tests/auto-regress/bug1863428.js b/js/src/jit-test/tests/auto-regress/bug1863428.js new file mode 100644 index 0000000000..29939549f3 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1863428.js @@ -0,0 +1,10 @@ +// |jit-test| --fast-warmup; --no-threads + +function foo() { + var args = new Float32Array(10); + return args[0]?.toString(); +} + +for (var i = 0; i < 50; i++) { + foo() +} diff --git a/js/src/jit-test/tests/auto-regress/bug1874929.js b/js/src/jit-test/tests/auto-regress/bug1874929.js new file mode 100644 index 0000000000..d49355faee --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1874929.js @@ -0,0 +1,12 @@ +// |jit-test| --ion-offthread-compile=off; --small-function-length=1500 + +function test() { + var r = 0; + for (let i = 100; i >= 0; --i) { + for (let j = 0; j < 15; ++j) { + r += ("aaaaaaaaaa").padStart(i, "bbb").length; + } + } + assertEq(r, 76575); +} +test(); diff --git a/js/src/jit-test/tests/auto-regress/bug1875487.js b/js/src/jit-test/tests/auto-regress/bug1875487.js new file mode 100644 index 0000000000..e682652330 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1875487.js @@ -0,0 +1,26 @@ +function f(i) { + // Add use of the boxed Int32 parameter |i| as a Double. + (2 ** i); + + // This call into |g| will get inlined and an inline-arguments object will be + // created. |i| was unboxed to Double earlier, but we must not store the + // unboxed Double into the inline-arguments object, because other uses of the + // boxed Int32 |i| may expect Int32 inputs. + return g(i); +} + +function g(i) { + // Add use of aliased |i| as an Int32. + if (i) { + // Add use |arguments| to make |i| an aliased variable which gets stored in + // the inline-arguments object. + return arguments; + } +} + +// Don't inline |f| into the top-level script. +with ({}); + +for (let i = 0; i < 4000; i++) { + f(i); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1879688.js b/js/src/jit-test/tests/auto-regress/bug1879688.js new file mode 100644 index 0000000000..a05ae548b5 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1879688.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) + +let x = 0; +oomTest(function () { + let y = x++; + [](y.toString(y)); +}); diff --git a/js/src/jit-test/tests/auto-regress/bug464116.js b/js/src/jit-test/tests/auto-regress/bug464116.js new file mode 100644 index 0000000000..f6b38cc5d2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug464116.js @@ -0,0 +1,31 @@ +// Binary: cache/js-dbg-32-7d06dac3fe83-linux +// Flags: -j +// +function partOfSHA1(str) +{ + var rotate_left = function (n,s) { return ( n<>>(32-s)); }, + W = [], H0 = 0x67452301, + H1 = 0xEFCDAB89, H2 = 0x98BADCFE, + H3 = 0x10325476, H4 = 0xC3D2E1F0, + A, B, C, D, E, temp, str_len = str.length, + word_array = []; + i = 0x080000000; + word_array.push( (str_len<<3)&0x0ffffffff ); + for ( blockstart=0; blockstart>= x})); diff --git a/js/src/jit-test/tests/auto-regress/bug487320.js b/js/src/jit-test/tests/auto-regress/bug487320.js new file mode 100644 index 0000000000..01293b5765 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug487320.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-57213af4a45d-linux +// Flags: +// +function outer(x) { + return (function foo() { + this.bar = foo; + return x; + })(); +} +print(outer(42)); +print(bar()); // BOOM! diff --git a/js/src/jit-test/tests/auto-regress/bug487534.js b/js/src/jit-test/tests/auto-regress/bug487534.js new file mode 100644 index 0000000000..cf2c859c90 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug487534.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-32-96746395df4f-linux +// Flags: -j +// +var fs = { x: /a/, y: /a/, z: /a/ }; +for (var p in fs) { this[fs[p]] = null; } diff --git a/js/src/jit-test/tests/auto-regress/bug487563.js b/js/src/jit-test/tests/auto-regress/bug487563.js new file mode 100644 index 0000000000..66ce94c07f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug487563.js @@ -0,0 +1,17 @@ +// Binary: cache/js-dbg-64-86c8e18f20eb-linux +// Flags: +// +try { + !(Iterator(( + eval("\ + (function(){\ + (function a() { \ + new function(){\ + __iterator__ = a\ + }\ + }\ + )(); \ + return this\ + })") + )())) +} catch(e) {} diff --git a/js/src/jit-test/tests/auto-regress/bug488015.js b/js/src/jit-test/tests/auto-regress/bug488015.js new file mode 100644 index 0000000000..5d19c2b95b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug488015.js @@ -0,0 +1,29 @@ +// Binary: cache/js-dbg-64-e1257570fef8-linux +// Flags: +// +var a = []; +function addEventListener(e, f, g) +{ + a.push(f); +} +function setTimeout(f, t) +{ + a.push(f); +} +var b; +this.document = {}; +function e(w) { + addEventListener("mousedown", d, true); + function d() { + var d; + w.setTimeout(function() { + b(d); + }, 0); + } + function b(d){ + w.document; /* Crash Here!! */ + } +} +e(this); +a[0](); +a[1](); diff --git a/js/src/jit-test/tests/auto-regress/bug488034.js b/js/src/jit-test/tests/auto-regress/bug488034.js new file mode 100644 index 0000000000..fa816d1a29 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug488034.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-64-e1257570fef8-linux +// Flags: +// +(function(){ + var x; + eval("var x; ((function () { return x; })())"); +})() diff --git a/js/src/jit-test/tests/auto-regress/bug488203.js b/js/src/jit-test/tests/auto-regress/bug488203.js new file mode 100644 index 0000000000..a24fae3464 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug488203.js @@ -0,0 +1,13 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-32-756dd46daf6c-linux +// Flags: -j +// +var d = { + p: function () { + for (var i = 0; i < 9; ++i); + with (d) { q(); } + } +}; +d.q = function() { eval('this.p()'); } +d.p(); diff --git a/js/src/jit-test/tests/auto-regress/bug488421.js b/js/src/jit-test/tests/auto-regress/bug488421.js new file mode 100644 index 0000000000..c81684420a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug488421.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-862693caa320-linux +// Flags: +// +function f(foo) +{ + var x; + eval("this.__defineGetter__(\"y\", function () { return x; })"); +} +f(""); +try { +((function(){ throw y })()) +} catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug488693.js b/js/src/jit-test/tests/auto-regress/bug488693.js new file mode 100644 index 0000000000..ddc6b42163 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug488693.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-ec03b7905b5a-linux +// Flags: -j +// +(new Function("for (var x = 0; x < 2; ++x) { gczeal(2)} "))() diff --git a/js/src/jit-test/tests/auto-regress/bug489040.js b/js/src/jit-test/tests/auto-regress/bug489040.js new file mode 100644 index 0000000000..2541e84199 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug489040.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-c319b49e2880-linux +// Flags: -j +// +for (var y = 0; y < 2; ++y) { (/x/)[this] } diff --git a/js/src/jit-test/tests/auto-regress/bug489836.js b/js/src/jit-test/tests/auto-regress/bug489836.js new file mode 100644 index 0000000000..ba105cb5a2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug489836.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-32-1a1611bb1063-linux +// Flags: -j +// +var e; +function w(f, y) { + e = 2 * f; + for (var i = 0; i < 1; i++) { + } +} +for (var u = 0; u < 4; ++u) { + w(undefined, 0); + w(1, (2) * 2); +} diff --git a/js/src/jit-test/tests/auto-regress/bug490191.js b/js/src/jit-test/tests/auto-regress/bug490191.js new file mode 100644 index 0000000000..d198832cbd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug490191.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-daefd30072a6-linux +// Flags: +// +function f(param) { + var w; + return eval("\ + (function(){\ + this.__defineGetter__(\"y\", function() { return ({\ + x: function(){ return w }()\ + }); })\ + });\ + "); +} +(f())(); +(new Function("eval(\"y\")"))(); diff --git a/js/src/jit-test/tests/auto-regress/bug490776.js b/js/src/jit-test/tests/auto-regress/bug490776.js new file mode 100644 index 0000000000..2348f1269c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug490776.js @@ -0,0 +1,37 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-7504904b5f8f-linux +// Flags: -j +// +Object.extend = function(destination, source) { + for (var property in source) + destination[property] = source[property] +} +Object.extend(Function.prototype, { + curry: function() { + var __method = this, + args = $A(arguments) + return function() { + return __method( + arguments) + } + }, + wrap: function(wrapper) { + return function() { ([]( + $A(arguments))) + } + } +}) +function $A(iterable) { + var length = iterable.length + while (length--); +} +var ga = { + c: 3, + d: 4 +} +ga. +__defineGetter__("", /x/.test.wrap("").curry(true, "")) +for (var p in ga) { + ga[p] +} diff --git a/js/src/jit-test/tests/auto-regress/bug495843.js b/js/src/jit-test/tests/auto-regress/bug495843.js new file mode 100644 index 0000000000..673e8294ec --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug495843.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-64-fe91973cc783-linux +// Flags: +// +const [x]=''; +for(;[] && false;){} diff --git a/js/src/jit-test/tests/auto-regress/bug496245.js b/js/src/jit-test/tests/auto-regress/bug496245.js new file mode 100644 index 0000000000..800257dcb2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug496245.js @@ -0,0 +1,6 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-9d6f5ab54933-linux +// Flags: +// +(function(a){ 1(function(){delete a;}); })(); diff --git a/js/src/jit-test/tests/auto-regress/bug496325.js b/js/src/jit-test/tests/auto-regress/bug496325.js new file mode 100644 index 0000000000..4f901d9f72 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug496325.js @@ -0,0 +1,19 @@ +// Binary: cache/js-dbg-32-9d6f5ab54933-linux +// Flags: -j +// +(function() { + var Y = function() {}; + function g() { + function f(x) { + for (var j = 0; j < 1; ++j) { + x.apply(this); + } + } + return function() { + f(Y); + } + }; + for (var i = 0; i < 2; ++i) { + g()(); + } +})(); diff --git a/js/src/jit-test/tests/auto-regress/bug499169.js b/js/src/jit-test/tests/auto-regress/bug499169.js new file mode 100644 index 0000000000..fd6b8c3446 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug499169.js @@ -0,0 +1,179 @@ +// Binary: cache/js-dbg-32-30b481fd82f5-linux +// Flags: -j +// +var Native = function(k) { + var f = k.initialize; + var d = f; + var j = function(n, l, o, m) { + n.prototype[l] = o; + }; + d.alias = function(n, l, o) { + n = this.prototype[n] + return j(this, l, n, o); + }; + d.implement = function(m, l, o) { + for (var n in m) { + j(this, n, m[n], l); + } + } + return d; +}; +(function() { + var a = { + Array: Array, + Function: Function, + }; + for (var h in a) { + new Native({ + initialize: a[h], + }); + } +} ()); +Array.alias("forEach", "each"); +function $merge() { + var a = Array.prototype.slice.call(arguments); + a.unshift({}); + return $mixin.apply(null, a); +} +function $mixin(e) { + for (var d = 1, a = arguments.length; d < a; d++) { + var b = arguments[d]; + for (var c in b) { + var g = b[c], + f = e[c]; + e[c] = f && $type(g) == "object" && $type(f) == "object" ? $mixin(f, g) : $unlink(g); + } + } +} +function $type(a) { + if (a == undefined) { + return false; + } + if (a.$family) { + } + return typeof a; +} +function $unlink(c) { + if ($type(c) == "object") { + b = {}; + } + return b; +} +var Window = new Native({ + initialize: function(a) {}, +}); +Array.implement({ + extend: function(c) { + return this; + } +}); +Function.implement({ + extend: function(a) { + for (var b in a) { + this[b] = a[b]; + } + return this; + }, + run: function(a, b) { + return this.apply(b, a); + } +}); +function Class(b) { + var a = function() { + Object.reset(this); + var c = this.initialize ? this.initialize.apply(this, arguments) : this; + }.extend(this); + a.implement(b); + return a; +} +Object.reset = function(a, c) { + if (c == null) { + for (var e in a) { + Object.reset(a, e); + } + } + switch ($type(a[c])) { + case "object": + var d = function() {}; + d.prototype = a[c]; + var b = new d; + a[c] = Object.reset(b); + } + return a; +}; +(new Native({initialize: Class})).extend({}); + function wrap(a, b, c) { + return function() { + var d = c.apply(this, arguments); + }.extend({}); + } +Class.implement({ + implement: function(a, d) { + if ($type(a) == "object") { + for (var e in a) { + this.implement(e, a[e]); + } + } + var f = Class.Mutators[a]; + if (f) { + d = f.call(this, d); + } + var c = this.prototype; + switch ($type(d)) { + case "function": + c[a] = wrap(this, a, d); + break; + case "object": + var b = c[a]; + if ($type(b) == "object") { + $mixin(b, d); + } else { + c[a] = $unlink(d); + } + } + } +}); +Class.Mutators = { + Extends: function(a) { + this.prototype = new a; + }, + Implements: function(a) { + a.each(function(b) { + b = new b; + this.implement(b); + }, + this); + } +}; +var Events = new Class({}); +var Options = new Class({ + setOptions: function() { + this.options = $merge.run([this.options].extend(arguments)); + } +}); +var Autocompleter = {}; +Autocompleter.Base = new Class({ + Implements: [Options, Events], + options: {}, +}); +Autocompleter.Ajax = {}; +Autocompleter.Ajax.Base = new Class({ + Extends: Autocompleter.Base, + options: { + postVar: "value", + onRequest: function(){}, + } +}); +Autocompleter.Ajax.Json = new Class({ + Extends: Autocompleter.Ajax.Base, +}); +Autocompleter.JsonP = new Class({ + Extends: Autocompleter.Ajax.Json, + options: { + minLength: 1 + }, + initialize: function(el, url, options) { + this.setOptions({}); + } +}); +new Autocompleter.JsonP(); diff --git a/js/src/jit-test/tests/auto-regress/bug502604.js b/js/src/jit-test/tests/auto-regress/bug502604.js new file mode 100644 index 0000000000..79be300e21 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug502604.js @@ -0,0 +1,30 @@ +// Binary: cache/js-dbg-32-b4fee3813956-linux +// Flags: -j +// +var aej=new Array( 'A3|297|420', 'dummy|1|1' ); +var aes=aej.length-1, +aet=new Array(); +for(var i=0; i <= aes; ++i) + aet[i] = aej[i].split('|'); +afo=4; +R=new Array( + '17523|2500|275||', + '17524|5000|300.3||', + '17535|500|207.4|=|120x120|=|=|=|=|=|=|=', + '17556|500|349.3|=|A5|=|=|=|=|=|=|=' +); +var ags = R.length-1; +px= new Array(); +for(var i=1; i<=ags; i++) { + px[i] = R[i].split('|'); + for(var j=0; j<=11;j++) + agt = ank(px[i][afo]); +} +function ank(akr) { + var XX=YY=0; + for(var i=0;i0)) { + var tt=akr.split('x'); + XX=tt[0];YY=tt[1] + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug505305.js b/js/src/jit-test/tests/auto-regress/bug505305.js new file mode 100644 index 0000000000..9b86db3ef8 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug505305.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-32-aa85b2f55960-linux +// Flags: +// +var str = 'afoo$40bar'.substr(1); +print(str.replace(str, str)); diff --git a/js/src/jit-test/tests/auto-regress/bug511938.js b/js/src/jit-test/tests/auto-regress/bug511938.js new file mode 100644 index 0000000000..3e2df3bc94 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug511938.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-32-16baceea5fe2-linux +// Flags: -j +// +(function () { + for (let x = 0; x < 4; ++x) { + gczeal(2) + } +})() diff --git a/js/src/jit-test/tests/auto-regress/bug521163.js b/js/src/jit-test/tests/auto-regress/bug521163.js new file mode 100644 index 0000000000..f25648f0df --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug521163.js @@ -0,0 +1,11 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-c08baee44cf4-linux +// Flags: +// +for (c in [0]) { + { + let c = this.__defineGetter__("", function(){}); + eval("function w(){}")++ + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug521279.js b/js/src/jit-test/tests/auto-regress/bug521279.js new file mode 100644 index 0000000000..1950ea0772 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug521279.js @@ -0,0 +1,6 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-ca95f2397bc5-linux +// Flags: +// +for(let a in[0]){eval("var b")=x} diff --git a/js/src/jit-test/tests/auto-regress/bug522624.js b/js/src/jit-test/tests/auto-regress/bug522624.js new file mode 100644 index 0000000000..251519a47b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug522624.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !this.uneval + +// Binary: cache/js-dbg-32-a847cf5b4669-linux +// Flags: -j +// +function r([]) { r(); } +var a = {}; +a.__defineGetter__("t", r); +try { a.t; } catch(e) { } +print(uneval(a)); diff --git a/js/src/jit-test/tests/auto-regress/bug528048.js b/js/src/jit-test/tests/auto-regress/bug528048.js new file mode 100644 index 0000000000..f162e5fdaf --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug528048.js @@ -0,0 +1,20 @@ +// Binary: cache/js-dbg-32-761988dd0d81-linux +// Flags: -j +// +for (j = 0; j < 3; j++) {} +m = []; +m.concat(); +n = []; +n.concat([]); +Function("\ + for (i = 0; i < 8; i++)\ + ((function f1(b, c) {\ + if (c) {\ + return (gc)()\ + }\ + f1(b, 1);\ + ((function f2(d, e) {\ + return d.length == e ? 0 : d[e] + f2(d, e + 1)\ + })([{}, /x/, /x/], 0))\ + })())\ +")() diff --git a/js/src/jit-test/tests/auto-regress/bug533705.js b/js/src/jit-test/tests/auto-regress/bug533705.js new file mode 100644 index 0000000000..b112b9e903 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug533705.js @@ -0,0 +1,25 @@ +// Binary: cache/js-dbg-64-61b1c094b729-linux +// Flags: -j +// +function mk() { + return (function () {}); +} + +function f() { + var j = 55; + + var f = function () { + return j; + } + + var g = function() { + } + + var a = [ mk(), f, g, mk(), mk() ]; + + for (var i = 0; i < 5; ++i) { + a[i].p = 99; + } +} + +f(); diff --git a/js/src/jit-test/tests/auto-regress/bug543436.js b/js/src/jit-test/tests/auto-regress/bug543436.js new file mode 100644 index 0000000000..a1145cb594 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug543436.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-f57b95afb57e-linux +// Flags: +// +(function() { + try { + eval("\ + function() {\ + if (3)\ + (1 for (x in []));\ + else \ + (this._ = function(){})\ + }\ + "); + } catch(e) {} +})() diff --git a/js/src/jit-test/tests/auto-regress/bug557946.js b/js/src/jit-test/tests/auto-regress/bug557946.js new file mode 100644 index 0000000000..8d1e95c53b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug557946.js @@ -0,0 +1,44 @@ +// Binary: cache/js-dbg-64-6f1a38b94754-linux +// Flags: -j +// +/* vim: set ts=8 sts=4 et sw=4 tw=99: */ + +var x = 0; +var y = 0; + +function h() { + if (x == 1) + y++; + else + y--; +} + +function F() { + var m = null; + + function g(i) { + /* Force outgoing typemaps to have a string. */ + m = "badness"; + + /* Loop a bit. */ + for (var i = 0; i < 10; i++) { + h(); + } + } + + /* Spin for a while so trees build. */ + for (var i = 0; i < 100; i++) { + /* Capture m == TT_NULL in outgoing fi for rp[0] */ + g(); + + /* Flip the switch to bail out with deep nested frames. */ + if (i > 50) + x = 1; + + /* Set m = null on the loop tail to get better traces. */ + m = null; + } +} + +F(); + diff --git a/js/src/jit-test/tests/auto-regress/bug558618.js b/js/src/jit-test/tests/auto-regress/bug558618.js new file mode 100644 index 0000000000..3fe1dfb257 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug558618.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-e69034463eeb-linux +// Flags: -j +// +/* vim: set ts=8 sts=4 et sw=4 tw=99: */ +function f() { + this.search = function(a, b, c) { + arguments[3] = { } + arguments.length = 4; + for (var i = 0; i < 100; i++) { + print(arguments[3]); + } + } +} +var o = new f(); +o.search({x: -1, y: -1, w: 100600, h: 100600}); diff --git a/js/src/jit-test/tests/auto-regress/bug560566.js b/js/src/jit-test/tests/auto-regress/bug560566.js new file mode 100644 index 0000000000..bec7cb6237 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug560566.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-64-58c9dd4f0c1f-linux +// Flags: +// +var o = {} +Object.defineProperty(o, "x", {get: undefined, set: function() { Object.defineProperty(o, "x", {set: function() { }}); }, configurable: true}); +o.a = 0; +o.x = 0; diff --git a/js/src/jit-test/tests/auto-regress/bug562028.js b/js/src/jit-test/tests/auto-regress/bug562028.js new file mode 100644 index 0000000000..4f64431c0b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug562028.js @@ -0,0 +1,22 @@ +// |jit-test| skip-if: !this.uneval + +// Binary: cache/js-dbg-64-0723bab9f15d-linux +// Flags: +// +function f(code) { + uneval(Function(code.replace(/\/\*DUPTRY\d+/, + function(k) { + n = k.substr(8) + return g("try{}catch(e){}", n) + } + ))) +} +function g(s, n) { + if (n == 1) return s + s2 = s + s + r = n % 2 + d = (n - r) / 2; + m = g(s2, d) + return r ? m: m +} +f("if(/>/(\"\")){/*DUPTRY4968(u)}else if([]()){}") diff --git a/js/src/jit-test/tests/auto-regress/bug563034.js b/js/src/jit-test/tests/auto-regress/bug563034.js new file mode 100644 index 0000000000..2f3bb3ac60 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug563034.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-c9212eb6175b-linux +// Flags: +// +function f(a) { + function* g() { + yield function () { return a; }; + } + return g(); +} +var x; +assertEq(f(7).next().value(), 7); diff --git a/js/src/jit-test/tests/auto-regress/bug563126.js b/js/src/jit-test/tests/auto-regress/bug563126.js new file mode 100644 index 0000000000..9a42bacc2c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug563126.js @@ -0,0 +1,6 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-985cdfad1c7e-linux +// Flags: +// +(function(x){ function a () { x = 2 }; tracing(true); a(); })() diff --git a/js/src/jit-test/tests/auto-regress/bug563127.js b/js/src/jit-test/tests/auto-regress/bug563127.js new file mode 100644 index 0000000000..eeb063db41 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug563127.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-985cdfad1c7e-linux +// Flags: -j +// +function a() {} +a(); +for(var j=0;j<3;++j){ evalcx("lazy");} diff --git a/js/src/jit-test/tests/auto-regress/bug564619.js b/js/src/jit-test/tests/auto-regress/bug564619.js new file mode 100644 index 0000000000..08541d5ec7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug564619.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-32-a214b695dc7b-linux +// Flags: -j +// +(function() { + eval("\ + function c() {\ + for (var b = 0; b < 2; ++b) {\ + print(this)\ + }\ + }\ + c();\ + c();\ + ") +})() diff --git a/js/src/jit-test/tests/auto-regress/bug567577.js b/js/src/jit-test/tests/auto-regress/bug567577.js new file mode 100644 index 0000000000..6b6229d06a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug567577.js @@ -0,0 +1,8 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-88a6e0534e03-linux +// Flags: -j +// +for (a in [/x/, null, new String - Infinity]) { + print(new evalcx(" ")) +} diff --git a/js/src/jit-test/tests/auto-regress/bug568786.js b/js/src/jit-test/tests/auto-regress/bug568786.js new file mode 100644 index 0000000000..cf14af148e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug568786.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-64-fadb38356e0f-linux +// Flags: +// +function f() { + this.e = function() {}; + Object.defineProperty(this, "e", ({ + get: eval + })); +} +new f(); diff --git a/js/src/jit-test/tests/auto-regress/bug571168.js b/js/src/jit-test/tests/auto-regress/bug571168.js new file mode 100644 index 0000000000..f759dccdd5 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug571168.js @@ -0,0 +1,9 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-b84d0be52070-linux +// Flags: +// +var x = new Proxy(Function, {}); +if (x.__proto__ = x) { + print(x); +} diff --git a/js/src/jit-test/tests/auto-regress/bug579348.js b/js/src/jit-test/tests/auto-regress/bug579348.js new file mode 100644 index 0000000000..45ba59bec2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug579348.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-32-2d09181ec4cd-linux +// Flags: -j +// +for(a in[0,0,0]) { + ([])[-1] +} diff --git a/js/src/jit-test/tests/auto-regress/bug580694.js b/js/src/jit-test/tests/auto-regress/bug580694.js new file mode 100644 index 0000000000..a3604d7e74 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug580694.js @@ -0,0 +1,20 @@ +// Binary: cache/js-dbg-32-7c6f62fcbd91-linux +// Flags: -m +// +function f3() { + try { + v = f() + } catch (r) {} +} +function f1(a, t) { + f2(f, a) +} +function f2() { + u = String() +} +f = (function () { + Proxy((function () {})(gc()), []) +}) +a = "" +f1() +f3(f, a) diff --git a/js/src/jit-test/tests/auto-regress/bug580699.js b/js/src/jit-test/tests/auto-regress/bug580699.js new file mode 100644 index 0000000000..234c6b5544 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug580699.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-7c6f62fcbd91-linux +// Flags: -m +// +function f() { + (function () { + x; + function a() {} + print(a) + })() +} +this.__defineGetter__("x", gc) +f() diff --git a/js/src/jit-test/tests/auto-regress/bug580701.js b/js/src/jit-test/tests/auto-regress/bug580701.js new file mode 100644 index 0000000000..906a6b6724 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug580701.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-32-7c6f62fcbd91-linux +// Flags: -m +// +for (let c in []) { + c = 0 +}(eval)() diff --git a/js/src/jit-test/tests/auto-regress/bug581785.js b/js/src/jit-test/tests/auto-regress/bug581785.js new file mode 100644 index 0000000000..62a4ffdabf --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug581785.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-441daac3fef9-linux +// Flags: -j +// +function f() { + this.b = function() {}; + this.b = Object.e; + Object.defineProperty(this, "b", {}) +} +for (a in [0, 0, 0, 0]) { + new f +} diff --git a/js/src/jit-test/tests/auto-regress/bug582268.js b/js/src/jit-test/tests/auto-regress/bug582268.js new file mode 100644 index 0000000000..a42157e915 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug582268.js @@ -0,0 +1,6 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-e0988eae6c08-linux +// Flags: -m +// +7%s diff --git a/js/src/jit-test/tests/auto-regress/bug582276.js b/js/src/jit-test/tests/auto-regress/bug582276.js new file mode 100644 index 0000000000..235f1a7329 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug582276.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-32-e0988eae6c08-linux +// Flags: -m +// +(function() { + this / z + var z = "" +})() diff --git a/js/src/jit-test/tests/auto-regress/bug583675.js b/js/src/jit-test/tests/auto-regress/bug583675.js new file mode 100644 index 0000000000..d12924535e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug583675.js @@ -0,0 +1,11 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-2ee92d697741-linux +// Flags: -m +// +{ + gczeal(2) +} +(function () { + ''.w() +})() diff --git a/js/src/jit-test/tests/auto-regress/bug583680.js b/js/src/jit-test/tests/auto-regress/bug583680.js new file mode 100644 index 0000000000..5d23212297 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug583680.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-32-2ee92d697741-linux +// Flags: -m +// +function f(foo) { + foo.replace(/s/, "") + Function(foo)() +} +for (a = 0; a < 1000; a++) { + f("\ + for (var b = 0; b < 7; b++) {\ + gczeal(2)\ + }\ + ") +} diff --git a/js/src/jit-test/tests/auto-regress/bug583681.js b/js/src/jit-test/tests/auto-regress/bug583681.js new file mode 100644 index 0000000000..a6d86e3c60 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug583681.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-2ee92d697741-linux +// Flags: -m +// +Function[typeof h] diff --git a/js/src/jit-test/tests/auto-regress/bug584423.js b/js/src/jit-test/tests/auto-regress/bug584423.js new file mode 100644 index 0000000000..6dc2f08b1b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug584423.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !this.uneval + +// Binary: cache/js-dbg-64-c761f8e85b8c-linux +// Flags: +// +uneval(Function("function r([],x){this.b=function(){x}}")) diff --git a/js/src/jit-test/tests/auto-regress/bug586538.js b/js/src/jit-test/tests/auto-regress/bug586538.js new file mode 100644 index 0000000000..f3d9685888 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug586538.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-f7cf2b7b7961-linux +// Flags: -m +// +Function("\ + for (var a = 0,i=0;i<10;++i) {\ + if (a % 3) {\ + return\ + }\ + function b() {}\ + b((function() {})([Infinity]))\ + }\ +")() diff --git a/js/src/jit-test/tests/auto-regress/bug590772.js b/js/src/jit-test/tests/auto-regress/bug590772.js new file mode 100644 index 0000000000..a5e81091d8 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug590772.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-f561f17e6c27-linux +// Flags: +// +Reflect.parse("for (var x in []) { }") diff --git a/js/src/jit-test/tests/auto-regress/bug591367.js b/js/src/jit-test/tests/auto-regress/bug591367.js new file mode 100644 index 0000000000..78cb0dca66 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug591367.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-32-33b05dd43cd4-linux +// Flags: -m +// +for (let x in []) { + t(x !== x) +} diff --git a/js/src/jit-test/tests/auto-regress/bug591795.js b/js/src/jit-test/tests/auto-regress/bug591795.js new file mode 100644 index 0000000000..a8227f7e6c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug591795.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-eae8350841be-linux +// Flags: +// +gczeal() diff --git a/js/src/jit-test/tests/auto-regress/bug593580.js b/js/src/jit-test/tests/auto-regress/bug593580.js new file mode 100644 index 0000000000..e6155b9c90 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug593580.js @@ -0,0 +1,29 @@ +// Binary: cache/js-dbg-64-60af58b42567-linux +// Flags: +// +realEval = eval +f = eval("(function(){for(let x in[\ + __defineGetter__(\"\",function(){})\ + ,__defineGetter__(\"\ + functional\ + \",Math.pow)\ + ]){\ + (__defineSetter__(\"\",function(){}))\ + ()\ + }})") +try { + f() +} catch (r) { + delete this.eval + delete this.Math + eval = realEval + e = this.toSource +} +f = eval("(function(){(__defineSetter__(\"\ + functional\ + \",(function(){return{t:function(){}}})))()})") +try { + f() +} catch (r) { + eval() +} diff --git a/js/src/jit-test/tests/auto-regress/bug596817.js b/js/src/jit-test/tests/auto-regress/bug596817.js new file mode 100644 index 0000000000..247bb0c2ce --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug596817.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-a409054e1395-linux +// Flags: -m +// +load(libdir + 'asserts.js'); +// value is not iterable +(function() { + for (var [x] in [[] < []]) + { + // Just a useless expression. + []; + } +})(); diff --git a/js/src/jit-test/tests/auto-regress/bug596823.js b/js/src/jit-test/tests/auto-regress/bug596823.js new file mode 100644 index 0000000000..6b989b90ee --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug596823.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-32-a409054e1395-linux +// Flags: -j +// +for (a = 0; a < 9; a++) { + "".charAt(3 / 0) +} diff --git a/js/src/jit-test/tests/auto-regress/bug599446.js b/js/src/jit-test/tests/auto-regress/bug599446.js new file mode 100644 index 0000000000..a3186853ff --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug599446.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-32-1c913526c597-linux +// Flags: +// +(function () { + x = constructor +})() +new(x)(x) diff --git a/js/src/jit-test/tests/auto-regress/bug599464.js b/js/src/jit-test/tests/auto-regress/bug599464.js new file mode 100644 index 0000000000..15b293c073 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug599464.js @@ -0,0 +1,20 @@ +// Binary: cache/js-dbg-64-1c913526c597-linux +// Flags: +// +aa = eval +function bb() { + this.eval = aa +} +var f = (function () { + (Object.seal)(this) + l +}) +try { + f() +} catch (r) {} +bb() +try { + f() +} catch (r) { + bb() +} diff --git a/js/src/jit-test/tests/auto-regress/bug600138.js b/js/src/jit-test/tests/auto-regress/bug600138.js new file mode 100644 index 0000000000..d4f7341d87 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug600138.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-54700fad8cf9-linux +// Flags: -j +// +function z() { + this.a = function () {} + this.a = this + Object.defineProperty(this, "a", ({})) +} +for (e in [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) { + new z() +} diff --git a/js/src/jit-test/tests/auto-regress/bug601070.js b/js/src/jit-test/tests/auto-regress/bug601070.js new file mode 100644 index 0000000000..11bbaab449 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug601070.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-32-82ff7c27fcb0-linux +// Flags: +// +var x = new Int32Array(); +x.set(x); diff --git a/js/src/jit-test/tests/auto-regress/bug601393.js b/js/src/jit-test/tests/auto-regress/bug601393.js new file mode 100644 index 0000000000..db14f473a7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug601393.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-64-0230a9e80c1f-linux +// Flags: -m +// +var code = "(function(){ function eval(){} function eval(){} "; +for (var i = 0; i < 2048; ++i) { + code += " try{}catch(e){}"; +} +code += " })()" +eval(code); diff --git a/js/src/jit-test/tests/auto-regress/bug605011.js b/js/src/jit-test/tests/auto-regress/bug605011.js new file mode 100644 index 0000000000..dde0e31036 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug605011.js @@ -0,0 +1,19 @@ +// Binary: cache/js-dbg-32-47a8311cf0bb-linux +// Flags: +// +function g(x, n) { + for (var i = 0; i < n; ++i) { + x = { + a: x + }; + } + return x; +} +try { + d = g(0, 672); +} catch(exc1) {} +(function() { + try { + gczeal(2)(JSON.stringify(this)) + } catch(exc2) {} +})() diff --git a/js/src/jit-test/tests/auto-regress/bug605013.js b/js/src/jit-test/tests/auto-regress/bug605013.js new file mode 100644 index 0000000000..e058b256c1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug605013.js @@ -0,0 +1,10 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-47a8311cf0bb-linux +// Flags: +// +x = /x/ +Function("Object.defineProperty(x,new AttributeName,({e:true,enumerable:true}))")() +{ + throw (Object.keys)(x, /x/) +} diff --git a/js/src/jit-test/tests/auto-regress/bug606639.js b/js/src/jit-test/tests/auto-regress/bug606639.js new file mode 100644 index 0000000000..dd7b463bb9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug606639.js @@ -0,0 +1,9 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-32b049250e03-linux +// Flags: -m +// +function v(s) { eval(s); } +v("eval(function(){})()"); +var x = new Int32Array(0); +v("x.set()"); diff --git a/js/src/jit-test/tests/auto-regress/bug607502.js b/js/src/jit-test/tests/auto-regress/bug607502.js new file mode 100644 index 0000000000..1fbeab36e0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug607502.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-32-d253c44465ae-linux +// Flags: -m +// +function q() { ++i; } +var i = 0; +Object.freeze(this); +q(); +q(); diff --git a/js/src/jit-test/tests/auto-regress/bug607513.js b/js/src/jit-test/tests/auto-regress/bug607513.js new file mode 100644 index 0000000000..cde7eba6b3 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug607513.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-64-d253c44465ae-linux +// Flags: +// +Object.freeze(this); +try { eval('const q;') } catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug612836.js b/js/src/jit-test/tests/auto-regress/bug612836.js new file mode 100644 index 0000000000..6ed4adb1c1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug612836.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-7b8898c9b54c-linux +// Flags: +// +new Proxy(this,{}) diff --git a/js/src/jit-test/tests/auto-regress/bug613400.js b/js/src/jit-test/tests/auto-regress/bug613400.js new file mode 100644 index 0000000000..03448044ce --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug613400.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-cbd2053aa825-linux +// Flags: +// +/(?!()m)/.exec("m"); diff --git a/js/src/jit-test/tests/auto-regress/bug620315.js b/js/src/jit-test/tests/auto-regress/bug620315.js new file mode 100644 index 0000000000..98b09cdec6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug620315.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-fc50c521bf48-linux +// Flags: -j -m +// +new Function('"use strict"; for (var j = 0; j < 9; ++j) { 4 > this; }')() diff --git a/js/src/jit-test/tests/auto-regress/bug620637.js b/js/src/jit-test/tests/auto-regress/bug620637.js new file mode 100644 index 0000000000..772f420d78 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug620637.js @@ -0,0 +1,20 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-aeeb631c6d43-linux +// Flags: +// +options('tracejit'); +var actual = '' +function f() { + for (var a = 0; a < 3; ++a) { + (function () { + for (var b = 0; b < 2; ++b) { + (function () { + for (a = 0, b = 0; b < 15; b++, actual = actual + "7") { + } + })(); + } + })(); + } +} +f(); diff --git a/js/src/jit-test/tests/auto-regress/bug621816.js b/js/src/jit-test/tests/auto-regress/bug621816.js new file mode 100644 index 0000000000..42a48730c6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug621816.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-250bf984b8bc-linux +// Flags: -j +// +for (let j=0; j<9; ++j) { var a = new Int8Array(); a[0] = 5; a[0]; } diff --git a/js/src/jit-test/tests/auto-regress/bug621988.js b/js/src/jit-test/tests/auto-regress/bug621988.js new file mode 100644 index 0000000000..0cfb160600 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug621988.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-64-250bf984b8bc-linux +// Flags: +// +f = function() { L: 3; alert(5); } +print(f.toString(28800000,23,59,999)); diff --git a/js/src/jit-test/tests/auto-regress/bug634236.js b/js/src/jit-test/tests/auto-regress/bug634236.js new file mode 100644 index 0000000000..68eb8c48fb --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug634236.js @@ -0,0 +1,13 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-e25c8949931d-linux +// Flags: +// +(eval("\ + (function(){\ + b = {};\ + b.__proto__=evalcx('split');\ + print(b)\ + }\ + )\ +"))() diff --git a/js/src/jit-test/tests/auto-regress/bug635389.js b/js/src/jit-test/tests/auto-regress/bug635389.js new file mode 100644 index 0000000000..5eaff76612 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug635389.js @@ -0,0 +1,8 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-a3946d490610-linux +// Flags: +// +var x = []; +x.join = x.toString; +"" + x; diff --git a/js/src/jit-test/tests/auto-regress/bug637205.js b/js/src/jit-test/tests/auto-regress/bug637205.js new file mode 100644 index 0000000000..9cb4f60b6d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug637205.js @@ -0,0 +1,45 @@ +// Binary: cache/js-dbg-64-21e90d198613-linux +// Flags: +// +load(libdir + "immutable-prototype.js"); + +var x = {}; +function jsTestDriverEnd() +{ + for (var optionName in x) + { + } + x = {}; +} + +var o2 = this; +var o5 = Object.prototype; + +function f28(o) { + var _var_ = o; + if (globalPrototypeChainIsMutable()) + _var_['__proto_'+'_'] = null; +} + +function _var_(f7) { + function f15(o) {} +} + +function f39(o) { + for(var j=0; j<5; j++) { + try { o.__proto__ = o2; } catch(e) {} + } +} + +for(var i=0; i<11; i++) { + f39(o5); + f28(o2); +} + +jsTestDriverEnd(); + +{ + delete Function; +} + +jsTestDriverEnd(); diff --git a/js/src/jit-test/tests/auto-regress/bug638212.js b/js/src/jit-test/tests/auto-regress/bug638212.js new file mode 100644 index 0000000000..4def4ca336 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug638212.js @@ -0,0 +1,21 @@ +// Binary: cache/js-dbg-64-01037ab16a65-linux +// Flags: -j -m -a +// +o2 = this; +function f0(o) { } +function f4(o) { } +(function() { +Object.seal(o2); +})(); +function f3(o) { } +function f7(o) { +var _var_ = o; +--(_var_["-1"]); +} +for(var i1=0; i1<6; i1++) { +f4(f3); +f4 = new Proxy(f7, {}); +} +f4(f0); + +try { eval("var __proto__"); } catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug638735.js b/js/src/jit-test/tests/auto-regress/bug638735.js new file mode 100644 index 0000000000..c941f53695 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug638735.js @@ -0,0 +1,23 @@ +// Binary: cache/js-dbg-64-290712e55ade-linux +// Flags: -j +// +var o9 = Function.prototype; +var o13 = Array; +function f5(o) { +ox1 = new Proxy(o, {}); +} +f5(o9); +f5(o13); +var o0 = []; +function f3(o) { + var prop = Object.getOwnPropertyNames(ox1)[0]; + if (prop) { Object.defineProperty(ox1, prop, {configurable: true,enumerable: true,unused: 1 }); } +}(function() { +for(var o3 in o0) { +f3(f3); +} +})(); + for (var i = 0; i < 9; i++) + { + new Array(1, 2); + } diff --git a/js/src/jit-test/tests/auto-regress/bug640079.js b/js/src/jit-test/tests/auto-regress/bug640079.js new file mode 100644 index 0000000000..2892bb5b3e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug640079.js @@ -0,0 +1,9 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-adc45b0a01c8-linux +// Flags: -m -n +// +eval("\ + x = evalcx('split');\ + evalcx(\"for(e in ){}\" ,x)\ +") diff --git a/js/src/jit-test/tests/auto-regress/bug643670.js b/js/src/jit-test/tests/auto-regress/bug643670.js new file mode 100644 index 0000000000..7014907173 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug643670.js @@ -0,0 +1,19 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-55f463c562d4-linux +// Flags: -m -n -a +// +o3 = evalcx("split") +function f3(o) { + try { + new o + } catch(e) {} +} +function f16(o) { + Object.getOwnPropertyNames(o); + o.__defineGetter__("prototype", function() {}) +} +for (;;) { + new f3(o3); + f16(o3) +} diff --git a/js/src/jit-test/tests/auto-regress/bug643847.js b/js/src/jit-test/tests/auto-regress/bug643847.js new file mode 100644 index 0000000000..0574e20b43 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug643847.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-64-c811be25eaad-linux +// Flags: +// +function f(o) { + o.constructor = function() {}; +} +__proto__.__defineSetter__('constructor', +function(v) {}); +f({}); +Object.defineProperty(__proto__, 'constructor', { + writable: true, +}); +f({}); diff --git a/js/src/jit-test/tests/auto-regress/bug647464.js b/js/src/jit-test/tests/auto-regress/bug647464.js new file mode 100644 index 0000000000..2aee06b9e5 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug647464.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-c340841f0465-linux +// Flags: -m -n -a +// +RegExp.__proto__ diff --git a/js/src/jit-test/tests/auto-regress/bug648729.js b/js/src/jit-test/tests/auto-regress/bug648729.js new file mode 100644 index 0000000000..2b3d4cbdac --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648729.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-32-d3215d1e985a-linux +// Flags: -m -n -a +// +(function() { + for (let y in [0]) { + return + } +})() diff --git a/js/src/jit-test/tests/auto-regress/bug648739.js b/js/src/jit-test/tests/auto-regress/bug648739.js new file mode 100644 index 0000000000..f270f882bd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648739.js @@ -0,0 +1,10 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-6c8becdd1574-linux +// Flags: +// +(function () { + [] = x = /x/; + x.toString = Function.prototype.bind; + print(x) +})() diff --git a/js/src/jit-test/tests/auto-regress/bug648747.js b/js/src/jit-test/tests/auto-regress/bug648747.js new file mode 100644 index 0000000000..136999dc4d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648747.js @@ -0,0 +1,51 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-d3215d1e985a-linux +// Flags: -m -n -a +// +function ygTreeView(id) { + this.init(id) +} +ygTreeView.prototype.init = function (id) { + this.root = new ygRootNode(this) +}; +function ygNode() {} +ygNode.prototype.init = function (_32, _33, _34) { + this.children = [] + this.expanded = _34 + if (_33) _33.appendChild(this) +}; +ygNode.prototype.appendChild = function (_35) { + this.children[this.children.length] = _35 +}; +ygNode.prototype.hasChildren = function () { + return this.children.length > 0; +}; +ygNode.prototype.getHtml = function () { + var sb = []; + if (this.hasChildren(true) && this.expanded) sb[sb.length] = this.renderChildren() +}; +ygNode.prototype.renderChildren = function () { + this.completeRender() +}; +ygNode.prototype.completeRender = function () { + for (var i = 0;;) sb[sb.length] = this.children[i].getHtml() +}; +ygRootNode.prototype = new ygNode; + +function ygRootNode(_48) { + this.init(null, null, true) +} +ygTextNode.prototype = new ygNode; +function ygTextNode(_49, _50, _51) { + this.init(_49, _50, _51) +} +function buildUserTree() { + userTree = new ygTreeView("userTree") + addMenuNode(userTree, "N", "navheader") +} +function addMenuNode(tree, label, styleClass) { + new ygTextNode({}, tree.root, false) +} +buildUserTree(); +userTree.root.getHtml() diff --git a/js/src/jit-test/tests/auto-regress/bug648839.js b/js/src/jit-test/tests/auto-regress/bug648839.js new file mode 100644 index 0000000000..43908bad76 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648839.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-64-d3215d1e985a-linux +// Flags: -m -n -a +// +ForIn_1( { length:4, company:"netscape", year:2000, 0:"zero" } ); +function ForIn_1( object ) { + PropertyArray = new Array(); + for ( PropertyArray[PropertyArray.length] in object ) { + object[1]; + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug648852.js b/js/src/jit-test/tests/auto-regress/bug648852.js new file mode 100644 index 0000000000..0b8ed0db40 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648852.js @@ -0,0 +1,12 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-d3215d1e985a-linux +// Flags: -m -n -a +// +var toString = 1; +VERSION = ""; +function startTest() { + if (print) if (VERSION == "ECMA_1") {} +} +var VERSION = this; +startTest(); diff --git a/js/src/jit-test/tests/auto-regress/bug648992.js b/js/src/jit-test/tests/auto-regress/bug648992.js new file mode 100644 index 0000000000..b96d4b3092 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648992.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-32-74a8fb1bbec5-linux +// Flags: -m -n -a +// +o0 = (3).__proto__ +function f(o) { + var prop + [o][0][prop] = [] + try { + ({ + x: function() { + return o + } + }.x()()) + } catch (e) {} +} +f(o0) diff --git a/js/src/jit-test/tests/auto-regress/bug648999.js b/js/src/jit-test/tests/auto-regress/bug648999.js new file mode 100644 index 0000000000..748a85bb16 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648999.js @@ -0,0 +1,10 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-74a8fb1bbec5-linux +// Flags: -m -n -a +// +test(); +function test() +{ + for (var j = 0; j < 10; ++j) new j; +} diff --git a/js/src/jit-test/tests/auto-regress/bug649017.js b/js/src/jit-test/tests/auto-regress/bug649017.js new file mode 100644 index 0000000000..62f2a63c7e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug649017.js @@ -0,0 +1,8 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-74a8fb1bbec5-linux +// Flags: +// +try { + throw {toString: parseInt.call}; +} catch(e) { e.toString(); } diff --git a/js/src/jit-test/tests/auto-regress/bug649937.js b/js/src/jit-test/tests/auto-regress/bug649937.js new file mode 100644 index 0000000000..84152afc05 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug649937.js @@ -0,0 +1,21 @@ +// Binary: cache/js-dbg-64-a3eeee8f7803-linux +// Flags: -m -n +// +var i = 0; +var gTestcases = new Array; +var gTc = gTestcases; +function TestCase(n, d, e, a) { + this.description=d; + gTestcases[gTc++]=this; +} +function writeTestCaseResult( expect, actual, string ) {}; +new TestCase; +test(); +function test() { + for ( gTc=0 ; ; ) { + i++; + if (i > 20) { break; } + gTestcases[gTc].description+=" )"; + gTestcases=[1,]; + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug650574.js b/js/src/jit-test/tests/auto-regress/bug650574.js new file mode 100644 index 0000000000..fdd1e56e5d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug650574.js @@ -0,0 +1,9 @@ +// |jit-test| error:InternalError; skip-if: !Error.prototype.toSource + +// Binary: cache/js-dbg-64-0906d9490eaf-linux +// Flags: +// +var e = Error(''); +e.fileName = e; +e.toSource(); +--> Crash with too much recursion in exn_toSource diff --git a/js/src/jit-test/tests/auto-regress/bug650658.js b/js/src/jit-test/tests/auto-regress/bug650658.js new file mode 100644 index 0000000000..b706ecb9dd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug650658.js @@ -0,0 +1,10 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-ac0989a03bf1-linux +// Flags: -m -n -a +// +AddRegExpCases(/a*b/, "xxx", 0, null ); +AddRegExpCases(/x\d\dy/, "abcx45ysss235", 3,[] ); +function AddRegExpCases(regexp, pattern, index, matches_array ) { + return (matches_array.length, regexp); +} diff --git a/js/src/jit-test/tests/auto-regress/bug651827.js b/js/src/jit-test/tests/auto-regress/bug651827.js new file mode 100644 index 0000000000..12bda58da3 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug651827.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-32-1fe03044bfeb-linux +// Flags: -m -n -a +// +try { + function x() {} +} catch(e) {} +switch (undefined) { + case(y) = Infinity: +} diff --git a/js/src/jit-test/tests/auto-regress/bug653395.js b/js/src/jit-test/tests/auto-regress/bug653395.js new file mode 100644 index 0000000000..8d5ef33168 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug653395.js @@ -0,0 +1,19 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-09cce9915b80-linux +// Flags: -m -n +// +try { + (function () { + __proto__ = new Uint32Array() + }()) +} catch (e) {}(function () { +})() +eval("\ +function testAtomize() {\ + x = {};\ + for (var i = false ; i < 65536; ++i)\ + x[String.fromCharCode(i)] = 1;\ +}\ +new testAtomize()(testAtomize(), 65536);\ +"); diff --git a/js/src/jit-test/tests/auto-regress/bug653789.js b/js/src/jit-test/tests/auto-regress/bug653789.js new file mode 100644 index 0000000000..68816a57f6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug653789.js @@ -0,0 +1,8 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-3dd6ec45084c-linux +// Flags: +// +this.__defineGetter__("x", eval); +eval.toString = toLocaleString +eval < x diff --git a/js/src/jit-test/tests/auto-regress/bug654392.js b/js/src/jit-test/tests/auto-regress/bug654392.js new file mode 100644 index 0000000000..ceae70f999 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug654392.js @@ -0,0 +1,15 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-3062ff7fef83-linux +// Flags: -m -n +// +function enterFunc (funcName) {} +test(); +function test() +{ + enterFunc ( "NaN number", "'eeeefghi'.match(/e*/)", new test( "Date.prototype" )); + function err() { + return new Error(); + } + var error = err(s,s,s,s); +} diff --git a/js/src/jit-test/tests/auto-regress/bug654665.js b/js/src/jit-test/tests/auto-regress/bug654665.js new file mode 100644 index 0000000000..e1be9f9b89 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug654665.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-3062ff7fef83-linux +// Flags: -m -n -a +// +test(); +function test() +{ + for (var i = 0; i < 0e2.length; ); +} diff --git a/js/src/jit-test/tests/auto-regress/bug655507.js b/js/src/jit-test/tests/auto-regress/bug655507.js new file mode 100644 index 0000000000..ec6caa52ee --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug655507.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-e09e209d988e-linux +// Flags: -m -n -a +// +a = new Array; +a[2] = "2"; +a[1]; diff --git a/js/src/jit-test/tests/auto-regress/bug655940.js b/js/src/jit-test/tests/auto-regress/bug655940.js new file mode 100644 index 0000000000..463635e236 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug655940.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-32e8c937a409-linux +// Flags: -m -n -a +// +NaN.__proto__; +function f0() { + try {} catch(e) {} +} +for (i = 0; i < 9; i++) { + new f0; + f0(); + gc() +} diff --git a/js/src/jit-test/tests/auto-regress/bug655950.js b/js/src/jit-test/tests/auto-regress/bug655950.js new file mode 100644 index 0000000000..21629924ff --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug655950.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-32-32e8c937a409-linux +// Flags: -m -n +// +function f() { + try { + (new { + x: function() {} + }.x)(); + } catch (e) {} +} +for (var i = 0; i<10000; i++) { + f(); +} diff --git a/js/src/jit-test/tests/auto-regress/bug657198.js b/js/src/jit-test/tests/auto-regress/bug657198.js new file mode 100644 index 0000000000..a1d5a38be1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug657198.js @@ -0,0 +1,36 @@ +// |jit-test| slow; + +// Binary: cache/js-dbg-32-599d1c6cba63-linux +// Flags: -j +// +eval("") +o15 = {} +function f11(o) { + props = Object.getOwnPropertyNames(o) + prop = props.length ? prop[prop.e] + "" : "" + o[prop] = 3 +} +function f12(o) { + _someglobal_ = o; + for (j = 0; j < 5; j++) { + for (x in { + x: { + x: function() { + return _someglobal_ + } + }.x() + }.x) { + ({ + x: { + x: function() {} + }.x() + }[x]) + } + gc() + } +} { + for (i = 0; i < 100; i++) { + f12(o15) + f11(o15) + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug657586.js b/js/src/jit-test/tests/auto-regress/bug657586.js new file mode 100644 index 0000000000..2e28d30e01 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug657586.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-32-8aa5d9272628-linux +// Flags: -m -n +// +(function() { + with([]) {} + Object.defineProperty([], "", { + set: (function() {}) + }) +})() diff --git a/js/src/jit-test/tests/auto-regress/bug658803.js b/js/src/jit-test/tests/auto-regress/bug658803.js new file mode 100644 index 0000000000..95b1a5bba7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug658803.js @@ -0,0 +1,17 @@ +// Binary: cache/js-dbg-32-33f1ad45ccb8-linux +// Flags: -m -n +// +function f() { + var N = 624; + this.init_genrand = function(s) { + for (z = 1; z < N; z++) {} + }; +}(function() { + new f; +}()); +function g(o) { + var props = Object.getOwnPropertyNames(o); + var prop = props[props.length - 1] + "p" + o[prop] = Number.prototype.__proto__; +} +g(Number.prototype.__proto__); diff --git a/js/src/jit-test/tests/auto-regress/bug659077.js b/js/src/jit-test/tests/auto-regress/bug659077.js new file mode 100644 index 0000000000..27487a6343 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug659077.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-32-29f08848d96c-linux +// Flags: -j +// +try { + function l() { } + function r() { } + d = 4; + var _ = q; +} catch (e) { } +try { + v = new ArrayBuffer(); + s = []; + function e() { } + let a; + eval("for(var[x]=e in this){(function(){})()}"); +} catch (e) { } diff --git a/js/src/jit-test/tests/auto-regress/bug659779.js b/js/src/jit-test/tests/auto-regress/bug659779.js new file mode 100644 index 0000000000..1001a7d5ca --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug659779.js @@ -0,0 +1,33 @@ +// Binary: cache/js-dbg-64-8bcb569c9bf9-linux +// Flags: -m -n -a +// + +var gTestcases = new Array; +function TestCase(n, d, e, a) { + this.description=d + gTestcases[gTc++]=this +} +TestCase.prototype.dump=function () { return + toPrinted(this.description); }; +function toPrinted(value) { return value=value; } +function reportCompare (expected, actual, description) { + new TestCase("unknown-test-name", description, expected, actual) +} +function enterFunc (funcName) { + try { + expectCompile = 'No Error' + var actualCompile; + reportCompare(expectCompile, actualCompile, ': compile actual') + } catch(ex) {} +} +gTc=0; +function jsTestDriverEnd() { + for (var i = 0; i < gTestcases.length; i++) gTestcases[i].dump() +} +enterFunc(); +reportCompare(0, 0, 5.123456); +reportCompare(0, 0, this ); +jsTestDriverEnd(); +try { + this.__proto__=[] +} catch(ex) {} +jsTestDriverEnd() diff --git a/js/src/jit-test/tests/auto-regress/bug661840.js b/js/src/jit-test/tests/auto-regress/bug661840.js new file mode 100644 index 0000000000..40326bc138 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug661840.js @@ -0,0 +1,39 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-11714be33655-linux +// Flags: -m -n +// +function f(a) {} +s = [{ + s: [], + s: function(d, b) {}, + t: function() { + try {} catch (e) {} + } +}, { + t: "", + s: [], + s: function(d, b) {} +}, { + t: "", + s: [], + s: function(d, b) {}, + t: function() {} +}, { + t: "", + x: "", + s: [], + g: function(b) {}, + t: function(f) {} +}, { + t: "", + s: [], + s: function() {} +}]; +v = 0 +Function("gc(evalcx('lazy'))")(); +gczeal(); +gc(); +(function() { + x +})() diff --git a/js/src/jit-test/tests/auto-regress/bug662132.js b/js/src/jit-test/tests/auto-regress/bug662132.js new file mode 100644 index 0000000000..a3f52a2be7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug662132.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-32-6d423e5f2e48-linux +// Flags: -m -n +// +gczeal() +let n = {} +let o = {} +for (let i = 0; i < 5; i++) { + Array(); + for (let j = 0; j < 7; j++) { + o.__defineSetter__("", function() {}) + o.p3 = 1 + delete o.p3 + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug665914.js b/js/src/jit-test/tests/auto-regress/bug665914.js new file mode 100644 index 0000000000..2b7b0ee10d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug665914.js @@ -0,0 +1,6 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-57ef3b619966-linux +// Flags: +// +ArrayBuffer.prototype['byteLength'] diff --git a/js/src/jit-test/tests/auto-regress/bug666305.js b/js/src/jit-test/tests/auto-regress/bug666305.js new file mode 100644 index 0000000000..5a8d318716 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug666305.js @@ -0,0 +1,8 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-0428dbdf3d58-linux +// Flags: +// +o = (new Uint32Array).buffer +o.__proto__ = o +o.__proto__ = o diff --git a/js/src/jit-test/tests/auto-regress/bug666599.js b/js/src/jit-test/tests/auto-regress/bug666599.js new file mode 100644 index 0000000000..6c76178296 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug666599.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-32-0428dbdf3d58-linux +// Flags: +// +o1 = new Float32Array().buffer +o2 = ArrayBuffer.prototype +o3 = new Uint32Array().buffer +for (i = 0; i < 2; i++) { + for (var x in o2) { + o3.__defineGetter__("", function() {}) + } + o2.__defineGetter__("", function() {}) + o1[ + x] + o1.__proto__ = o3 +} diff --git a/js/src/jit-test/tests/auto-regress/bug667824.js b/js/src/jit-test/tests/auto-regress/bug667824.js new file mode 100644 index 0000000000..c84b745ee9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug667824.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-32-208160c856b7-linux +// Flags: -j +// +var x; +for (let a = 0; a < 8; a++) { + Function.prototype() +} diff --git a/js/src/jit-test/tests/auto-regress/bug668206.js b/js/src/jit-test/tests/auto-regress/bug668206.js new file mode 100644 index 0000000000..5af6ac9ff8 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug668206.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-64-0d2a1a6e967f-linux +// Flags: -j -m +// +function f() { + for (var i = 0; i < 2; ++i) {} +} +for (let a = 0; a < 40; a++) { + f((new Array) ^ 0) +} diff --git a/js/src/jit-test/tests/auto-regress/bug672104.js b/js/src/jit-test/tests/auto-regress/bug672104.js new file mode 100644 index 0000000000..1150ee42bd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug672104.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-64-a37127f33d22-linux +// Flags: -m -n +// +load(libdir + "immutable-prototype.js"); + +a = {}; +b = __proto__; +for (i = 0; i < 9; i++) { + if (globalPrototypeChainIsMutable()) { + __proto__ = a; + a.__proto__ = b + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug673792.js b/js/src/jit-test/tests/auto-regress/bug673792.js new file mode 100644 index 0000000000..08bc11dac0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug673792.js @@ -0,0 +1,7 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-8c7adf094b8e-linux +// Flags: +// +a = {}.__proto__ +gc(evalcx('split')) diff --git a/js/src/jit-test/tests/auto-regress/bug674843.js b/js/src/jit-test/tests/auto-regress/bug674843.js new file mode 100644 index 0000000000..ff1167c9bb --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug674843.js @@ -0,0 +1,63 @@ +// Binary: cache/js-dbg-64-d066929dd830-linux +// Flags: -m +// +function fnSupportsArrayIndexGettersOnObjects() { + if (fnExists(Object.defineProperty)) { + var obj = {}; + Object.defineProperty(obj, "0", { + get: function () { + supportsArrayIndexGettersOnObjects = true; + } + }); + var res = obj[0]; + } + return supportsArrayIndexGettersOnObjects; +} +function fnExists( /*arguments*/ ) { + return true; +} +var ES5Harness = (function () { + var $this = this; + function registerTest(test) { + if (!(test.precondition && !test.precondition())) { + try { + var res = test.test.call($this); + } catch (e) {} + } + } + return { + registerTest: registerTest + } +})(); +ES5Harness.registerTest({ + test: function testcase() { + function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) {} + } + var obj = { + length: 10 + }; + Object.defineProperty(obj, "0", { + get: function () { + defineProperty(idx, idx, registerTest + ": }}}}}"); + }, + }); + try { + Array.prototype.reduce.call(obj, callbackfn, "initialValue"); + } finally {} + }, + precondition: function prereq() { + return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects(); + } +}); +ES5Harness.registerTest({ + test: function testcase() { + var obj = {}; + Object.defineProperty(obj, "property", { + configurable: new Date() + }); + }, + precondition: function prereq() { + return fnExists(gczeal(2)); + } +}); diff --git a/js/src/jit-test/tests/auto-regress/bug675251.js b/js/src/jit-test/tests/auto-regress/bug675251.js new file mode 100644 index 0000000000..d3f19c3bd5 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug675251.js @@ -0,0 +1,25 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-d43c6dddeb2b-linux +// Flags: -m -n +// + +function printBugNumber (num) { + BUGNUMBER = num; + print ('BUGNUMBER: ' + num); +} +var actual = ''; +test(); +function test() { + printBugNumber(test); + function f(N) { + for (var i = 0; i != N; ++i) { + for (var repeat = 0;repeat != 2; ++repeat) { + var count = BUGNUMBER(repeat); + } + } + } + var array = [function() { f(10); }, ]; + for (var i = 0; i != array.length; ++i) + array[i](); +} diff --git a/js/src/jit-test/tests/auto-regress/bug677386.js b/js/src/jit-test/tests/auto-regress/bug677386.js new file mode 100644 index 0000000000..c763177985 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug677386.js @@ -0,0 +1,25 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-82545b1e4129-linux +// Flags: +// + +var g = newGlobal({newCompartment: true}); +g.eval("var line0 = Error().lineNumber;\n" + + "function f() {\n" + // line0 + 1 + " return 2;\n" + // line0 + 2 + "}\n"); +var N = 4; +for (var i = 0; i < N; i++) { + var dbg = Debugger(g); + dbg.onDebuggerStatement = function (frame) { + var handler = {hit: function () { hits++; }}; + var s = frame.eval("f").return.script; + var offs = s.getLineOffsets(g.line0 + 2); + for (var j = 0; j < offs.length; j++) + s.setBreakpoint(offs[j], handler); + }; + g.eval('debugger;'); +} +gc(/c$...$/); +assertEq(g.f(), 2); diff --git a/js/src/jit-test/tests/auto-regress/bug677587.js b/js/src/jit-test/tests/auto-regress/bug677587.js new file mode 100644 index 0000000000..5497e7cef0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug677587.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-f189dd6316eb-linux +// Flags: +// + +var g = newGlobal({newCompartment: true}); +g.eval("var a = {};"); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var desc = gw.getOwnPropertyDescriptor("a"); +gw.defineProperty("b", desc); +Debugger(g.a, g.b); diff --git a/js/src/jit-test/tests/auto-regress/bug677977.js b/js/src/jit-test/tests/auto-regress/bug677977.js new file mode 100644 index 0000000000..e2b0735613 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug677977.js @@ -0,0 +1,25 @@ +// Binary: cache/js-dbg-64-48e43edc8834-linux +// Flags: +// + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + var s = frame.eval("f").return.script; +}; +function test(s) { + g.eval("line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "function f(i) {\n" + // line0 + 2 + "}\n"); +} +test("i = 128;\n" + "}\n"); +var hits = 0; +dbg.onNewScript = function (s) { + hits++; +}; +assertEq(g.eval("eval('2 + 3')"), 5); +this.gczeal(hits, 2); +var fn = g.evaluate("(function (a) { return 5 + a; })"); +var g2 = newGlobal({newCompartment: true}); +dbg.addDebuggee(g2, dbg); diff --git a/js/src/jit-test/tests/auto-regress/bug678086.js b/js/src/jit-test/tests/auto-regress/bug678086.js new file mode 100644 index 0000000000..8d7a9ed7d0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug678086.js @@ -0,0 +1,17 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-48e43edc8834-linux +// Flags: +// + +function f() { + frame = dbg.getNewestFrame(); +} +var g = newGlobal(); +g.f = function (a, b) { return a + "/" + this . f( ) ; }; +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + var f = frame.eval("f").return; + assertEq(f.call(null, "a", "b").return, "a/b"); +}; +g.eval("debugger;"); diff --git a/js/src/jit-test/tests/auto-regress/bug678529.js b/js/src/jit-test/tests/auto-regress/bug678529.js new file mode 100644 index 0000000000..ff8b8058c2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug678529.js @@ -0,0 +1,11 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-32-48e43edc8834-linux +// Flags: -j -m -a +// + +var g = newGlobal(); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (stack) { return {return: 1234}; }; +g.eval("function f() { debugger; return 'bad'; }"); +assertEq(new g.f(), 1234); diff --git a/js/src/jit-test/tests/auto-regress/bug679799.js b/js/src/jit-test/tests/auto-regress/bug679799.js new file mode 100644 index 0000000000..fa899458f9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug679799.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-64-2d95fc517e57-linux +// Flags: -m -n -a +// + +function test() +{ + var x = { "0": 3, "-0": 7 }; + try { + delete x["-0"]; + if ("-0" in x) + throw "0 not in x after insertion of 0 property"; + this ["-0"] = 7; + } catch(ex) {} +} +test(); +test(); diff --git a/js/src/jit-test/tests/auto-regress/bug679810.js b/js/src/jit-test/tests/auto-regress/bug679810.js new file mode 100644 index 0000000000..56eafcf294 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug679810.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-64-2d95fc517e57-linux +// Flags: -m -n +// + +function WorkerBee(name, dept, projs) { + this.projects &= projs || new Array(); +} +function Engineer(name, projs, machine) { + this.base = WorkerBee; + this.base(name, "engineering", projs) + this.machine = machine || ""; +} +Engineer.prototype = {}; +var les = new Engineer("Morris, Les", new Array("JavaScript"), "indy"); diff --git a/js/src/jit-test/tests/auto-regress/bug680797.js b/js/src/jit-test/tests/auto-regress/bug680797.js new file mode 100644 index 0000000000..aa151c3e7b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug680797.js @@ -0,0 +1,47 @@ +// |jit-test| slow; error:InternalError + +// Binary: cache/js-dbg-64-a2bbe9c999b4-linux +// Flags: -m -n +// +gczeal(2); +function Day( t ) {} +function YearFromTime( t ) {} +function HourFromTime( t ) {} +function MakeTime( hour, min, sec, ms ) {} +function MakeDay( year, month, date ) {} +function MakeDate( day, time ) {} +function TimeClip( t ) { + return ToInteger( t ); +} +function ToInteger( t ) { + sign = 1 + return sign * Math.floor( Math.abs( t ) ); +} +addNewTestCase( 28800000, 23, 59, 999,0, "TDATE = new Date(28800000);(TDATE).setHours(23,59,999);TDATE" ); +function addNewTestCase( time, hours, min, sec, ms, DateString) { + UTCDateFromTime( SetHours( time, hours, min, sec, ms )) +} +function MyDate() { return this.seconds=0; } +function UTCDateFromTime(t) { + MyDateFromTime(t) +} +function MyDateFromTime( t ) { + d = new MyDate + d.year=YearFromTime(t) + d.month= + d.date= + d.hours=HourFromTime(t) + d.minutes= + d.time=MakeTime( d.hours, d, d.seconds, d ) + d=TimeClip( MakeDate( MakeDay( d.year, d.month, ( ( MyDateFromTime(t) ) , null ) ), d.time ) ) +} +function SetHours( t, hour, min, sec, ms ) { + TIME = + HOUR = + MIN = min == 0 ? TIME : + SEC = sec == 0 ? addNewTestCaseSecFromTime : Number + var MS = ms == void 0 ? TIME : ms; + var RESULT6 = ( HOUR, MS ); + var UTC_TIME = MakeDate(Day(TIME), RESULT6); + return TimeClip(UTC_TIME); +} diff --git a/js/src/jit-test/tests/auto-regress/bug682252.js b/js/src/jit-test/tests/auto-regress/bug682252.js new file mode 100644 index 0000000000..dd39e1d286 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug682252.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-64-7054f0e3e70e-linux +// Flags: +// + +re = new RegExp("([^b]*)+((..)|(\\3))+?Sc*a!(a|ab)(c|bcd)(<*)", "i"); +var str = "aNULLxabcd"; +str.replace(re, function(s) { return s; }); diff --git a/js/src/jit-test/tests/auto-regress/bug682298.js b/js/src/jit-test/tests/auto-regress/bug682298.js new file mode 100644 index 0000000000..b29dfdb0bc --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug682298.js @@ -0,0 +1,6 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-cc1e08803869-linux +// Flags: +// +(function(){clear()})() diff --git a/js/src/jit-test/tests/auto-regress/bug682563.js b/js/src/jit-test/tests/auto-regress/bug682563.js new file mode 100644 index 0000000000..5522e5f3b2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug682563.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-9a0172368402-linux +// Flags: -m -n +// +var TITLE = "Labeled statements"; +LabelTest(0, 0); +function LabelTest(limit, expect) { + woo: for (var result = 0; limit<100; result++,limit++) { + if (result == limit) { + result = 'Error'; + } else "$0$00" || this ? TITLE : 1; + }; +} diff --git a/js/src/jit-test/tests/auto-regress/bug684281.js b/js/src/jit-test/tests/auto-regress/bug684281.js new file mode 100644 index 0000000000..6612a87180 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug684281.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-64-fcca99426576-linux +// Flags: -m -n -a +// + +function printStatus (msg) {} +F = function () {}; +F.prototype = new Int32Array(1); +o = new F(); +function f2(o){ + with(this) + for(var x in o) + printStatus(o[x]); +} +f2([]); diff --git a/js/src/jit-test/tests/auto-regress/bug685472.js b/js/src/jit-test/tests/auto-regress/bug685472.js new file mode 100644 index 0000000000..1a63841814 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug685472.js @@ -0,0 +1,12 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-b7d269a291b6-linux +// Flags: -m -n -a +// + +function Integer(value, exception) { + try {} catch (e) {} + new(value = this)(this.value); + Math.floor(({})[value.Math, this].abstract) +} +new Integer(3, false); diff --git a/js/src/jit-test/tests/auto-regress/bug686107.js b/js/src/jit-test/tests/auto-regress/bug686107.js new file mode 100644 index 0000000000..9135cd6c12 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug686107.js @@ -0,0 +1,15 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-d078623f7875-linux +// Flags: -m -n -a +// + +function testKeyTransitions() { + var i, key, result, message; + var array = []; + for (i = 0; i != 10; i++) { + key = (i < 3) ? 'pop' : (/\u009e\u0029/g ); + array[key](i); + } +} +testKeyTransitions(); diff --git a/js/src/jit-test/tests/auto-regress/bug686179.js b/js/src/jit-test/tests/auto-regress/bug686179.js new file mode 100644 index 0000000000..9eb69e5840 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug686179.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-b31b25125429-linux +// Flags: -m -n -a +// + +(function () { + assertEquals = function assertEquals(expected, found, name_opt) { }; + assertTrue = function assertTrue(value, name_opt) { }; +})(); +function f0() {} +function f1(x) {} +function test(f) { + assertTrue(null === (assertEquals).arguments); +} +test(f0); +test(f1); diff --git a/js/src/jit-test/tests/auto-regress/bug687099.js b/js/src/jit-test/tests/auto-regress/bug687099.js new file mode 100644 index 0000000000..c013b72b9e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug687099.js @@ -0,0 +1,30 @@ +// Binary: cache/js-dbg-64-94ceb173baed-linux +// Flags: -m -n -a +// + +gczeal(2); +function iso(d) { + return new Date(d).toISOString(); +} +function check(s, millis){ + description = "Date.parse('"+s+"') == '"+iso(millis)+"'"; +} +function dd(year, month, day, hour, minute, second, millis){ + return Date.UTC(year, month-1, day, hour, minute, second, millis); +} +function TZAtDate(d){ + return d.getTimezoneOffset() * 60000; +} +function TZInMonth(month){ + return TZAtDate(new Date(dd(2009,month,1,0,0,0,0))); +} +JulTZ = TZInMonth(7); +check("2009-07-23T19:53:21.001+12:00", dd(2009,7,23,7,53,21,1)); +check("2009-07-23T19:53:21+12:00", dd(2009,7,23,7,53,21,0)); +check("2009-07-23T19:53+12:00", dd(2009,7,23,7,53,0,0)); +check("2009-07T19:53:21.001", dd(2009,0Xe ,1,19,53,21,1)+JulTZ); +check("2009-07T19:53:21", dd(2009,7,1,19,53,21,0)+JulTZ); +check("2009-07T19:53", dd(2009,7,1,19,53,0,0)+JulTZ); +check("2009-07-23T19:53:21.001+12:00", dd(2009,7,23,7,53,21,1)); +check("2009-07-23T00:00:00.000-07:00", dd(2009,7,23,7,0,0,0)); +check("2009-07-23T24:00:00.000-07:00", dd(2009,7,24,7,0,0,0)); diff --git a/js/src/jit-test/tests/auto-regress/bug687102.js b/js/src/jit-test/tests/auto-regress/bug687102.js new file mode 100644 index 0000000000..0612c332ac --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug687102.js @@ -0,0 +1,7 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-32-f3f5d8a8a473-linux +// Flags: +// +function caller(obj) {} +var pc = line2pc(caller, pc2line(caller, 0XeBebb ) + 2); diff --git a/js/src/jit-test/tests/auto-regress/bug687125.js b/js/src/jit-test/tests/auto-regress/bug687125.js new file mode 100644 index 0000000000..c4811e926d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug687125.js @@ -0,0 +1,25 @@ +// Binary: cache/js-dbg-64-f3f5d8a8a473-linux +// Flags: -m -n +// + +function MakeDay( year, month, date ) { + date = ToInteger(date ); + var t = ( year < 1970 ) ? 1 : 0; + return ( (Math.floor(t/86400000)) + date - 1 ); +} +function MakeDate( day, time ) { + if ( day == Number.POSITIVE_INFINITY || day == Number.NEGATIVE_INFINITY ) { } +} +function ToInteger( t ) { + var sign = ( t < 0 ) ? -1 : 1; + return ( sign * Math.floor( Math.abs( t ) ) ); +} +var UTCDate = MyDateFromTime( Number("946684800000") ); +function MyDate() { + this.date = 0; +} +function MyDateFromTime( t ) { + var d = new MyDate(); + d.value = ToInteger( MakeDate( MakeDay( d.year, d.month, d.date ), d.time ) ); + var i = 0; while (Uint32Array && i < 10000) { ++i; if (0 == 100000) return; } +} diff --git a/js/src/jit-test/tests/auto-regress/bug687399.js b/js/src/jit-test/tests/auto-regress/bug687399.js new file mode 100644 index 0000000000..4a6734d1a9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug687399.js @@ -0,0 +1,30 @@ +// Binary: cache/js-dbg-64-06445f55f009-linux +// Flags: -m -n -a +// + +if (!this.emulatedJSON) { + emulatedJSON = function () { + function stringify(value, whitelist) { + var a, i, v; + switch (typeof value) { + case 'string': + if (!(value.propertyIsEnumerable('length'))) { + for (i = 0; i < l; i += 1) { + k = whitelist[i]; + if (typeof k === 'string') { + if (i %= 'not visited') {} + } + } + } + } + } + return { + stringify: stringify, + }; + }(); + var testPairs = [ ['{"five":5}'] ] + for (var i = 0; i < testPairs.length; i++) { + var pair = testPairs[i]; + var s = emulatedJSON.stringify(pair[1]) + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug688968.js b/js/src/jit-test/tests/auto-regress/bug688968.js new file mode 100644 index 0000000000..0b1185d4c1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug688968.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-fecae145d884-linux +// Flags: -m -n -a +// + +function foo(x) { + x === x--; +} +foo(1.2); diff --git a/js/src/jit-test/tests/auto-regress/bug688974.js b/js/src/jit-test/tests/auto-regress/bug688974.js new file mode 100644 index 0000000000..0c88dc5bd2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug688974.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-64-fecae145d884-linux +// Flags: -m -n +// + +gczeal(2); +Object.defineProperty(Object.prototype, "b", {set: function() {}}); +function C(a, b) { + this.a=a; + this.b=b; +} +var f = C.bind(0x2004, 2); +for (var i=0; i<10000; ++i) + new f; diff --git a/js/src/jit-test/tests/auto-regress/bug689892.js b/js/src/jit-test/tests/auto-regress/bug689892.js new file mode 100644 index 0000000000..ad3fbc8575 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug689892.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-32-7f4867717226-linux +// Flags: -m -n -a +// + +function foo2(x, n) { + var i = 0; + while (--n >= 0) { + x[i++] = 0; + } +} +foo2([1,0Xae ,3,4,5],('0123456')); diff --git a/js/src/jit-test/tests/auto-regress/bug690933.js b/js/src/jit-test/tests/auto-regress/bug690933.js new file mode 100644 index 0000000000..d4a5b5f357 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug690933.js @@ -0,0 +1,14 @@ +// |jit-test| slow; error:allocation size overflow + +// Binary: cache/js-dbg-32-1463dc6308a8-linux +// Flags: +// + +var fe="vv"; +for (i=0; i<24; i++) + fe += fe; +var fu=new Function( + fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, + fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, + "done" +); diff --git a/js/src/jit-test/tests/auto-regress/bug691595.js b/js/src/jit-test/tests/auto-regress/bug691595.js new file mode 100644 index 0000000000..d62ee7cc76 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug691595.js @@ -0,0 +1,20 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-acf3c1fb7c94-linux +// Flags: --ion-eager +// + +function k(f_arg) { + for (var i = 0; i < 10; ++i) { + f_arg( ) ; + } +} +function t() { + k(function (i) { actual ^ this | this; }); +} +var ans = 0; +for (var j = 0; j < 10; ++j) { + for (var i = 0; i < 10; ++i) { + ans += t(); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug692300.js b/js/src/jit-test/tests/auto-regress/bug692300.js new file mode 100644 index 0000000000..67698ee08a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug692300.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-64-38a487da2def-linux +// Flags: +// + +var x = newGlobal().Date; +var OBJ = new MyObject( new x(0) ); +try { eval("OBJ.valueOf()"); } catch(exc1) {} +function MyObject( value ) { + this.valueOf = x.prototype.valueOf; +} diff --git a/js/src/jit-test/tests/auto-regress/bug692366.js b/js/src/jit-test/tests/auto-regress/bug692366.js new file mode 100644 index 0000000000..4e8516d001 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug692366.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-32536d199fcf-linux +// Flags: +// +try { + Uint8Array.subarray(newGlobal()); +} catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug693144.js b/js/src/jit-test/tests/auto-regress/bug693144.js new file mode 100644 index 0000000000..bf89fc55b6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug693144.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-b4da2d439cbc-linux +// Flags: -m -n -a +// + +function f() { + var oa = []; + for (var i = 0; i < 8; ++i) { + var o = {}; + oa[(new Int32Array(ArrayBuffer.prototype).length)] = o; + } +} +f(); diff --git a/js/src/jit-test/tests/auto-regress/bug693971.js b/js/src/jit-test/tests/auto-regress/bug693971.js new file mode 100644 index 0000000000..174a12f092 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug693971.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-07c668448519-linux +// Flags: -m -n +// + +function testContinue() { + for (i = 0; i < 100; ++i) { + if ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) + continue; + } + return 0; +} +assertEq(testContinue(), 0); diff --git a/js/src/jit-test/tests/auto-regress/bug694438.js b/js/src/jit-test/tests/auto-regress/bug694438.js new file mode 100644 index 0000000000..aaca0c0d1a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug694438.js @@ -0,0 +1,61 @@ +// Binary: cache/js-dbg-64-ae061e27e3df-linux +// Flags: -m -n +// + +var lfcode = new Array(); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("3"); +lfcode.push("b40eb3beb80c7cde2828a33bd779f7826e25287d.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("1"); +lfcode.push("02b39295c36bbe079e9dca0aca95d253d064a194.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("4"); +lfcode.push("6d3ccd7e95a67392260056fd31425aa671cb5c54.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("0"); +lfcode.push("0d88bd3fca079ce7b26f26e12511d3e36edb4202.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("4"); +lfcode.push("c26e5241caa1d0dad95a2202a57cdc48322e5917.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("3"); +lfcode.push("7eeb48e00f249e4a8ab82e7c70102725f3c88195.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("2"); +lfcode.push("7b61d02cc95bbc7309f749c5deb5d4709687214f.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("1"); +lfcode.push("8eafe3c62c3ce1635548fc09c4434ef0259bcfff.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +var lfRunTypeId = -1; +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file); +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + switch (lfRunTypeId) { + case 4: eval("(function() { " + "" + " })();"); + } + } + } catch (lfVare) { } +} diff --git a/js/src/jit-test/tests/auto-regress/bug695290.js b/js/src/jit-test/tests/auto-regress/bug695290.js new file mode 100644 index 0000000000..0dff9c33e9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug695290.js @@ -0,0 +1,11 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-cf5da681d577-linux +// Flags: -m -n -a +// + +options("typeinfer"); +gczeal(2); +var g = newGlobal(); +gcparam("maxBytes", 22000); +let array = g.eval("new Array(1,2,3)"); diff --git a/js/src/jit-test/tests/auto-regress/bug696039.js b/js/src/jit-test/tests/auto-regress/bug696039.js new file mode 100644 index 0000000000..a28e60d3eb --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug696039.js @@ -0,0 +1,21 @@ +// Binary: cache/js-dbg-32-67673422f7d2-linux +// Flags: -m -n -a +// + +gczeal(2); +var lfcode = new Array(); +lfcode.push(""); +lfcode.push(""); +while (lfcode.length > 0) { + var file = lfcode.shift(); + loadFile(file); +} +function loadFile(lfVarx) { + try { + eval("\ + Array.prototype[30] = 'B';\ + delete Array.prototype[30];\ + assertEquals('edcba', a.join(''));\ + "); + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/auto-regress/bug697255.js b/js/src/jit-test/tests/auto-regress/bug697255.js new file mode 100644 index 0000000000..b9f0cae0d2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug697255.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-6cd262091470-linux +// Flags: -j +// +a = evalcx("lazy"); +b = {} +b.__proto__ = a +a.__proto__ = String +for (var a = 0; a < 50; a++) { + try { + b + "" + } catch (e) {} +} diff --git a/js/src/jit-test/tests/auto-regress/bug698074.js b/js/src/jit-test/tests/auto-regress/bug698074.js new file mode 100644 index 0000000000..fd0c950226 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug698074.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-32-b01eb1ba58ce-linux +// Flags: +// +a = (0).__proto__ +b = (0).__proto__ +b.__defineSetter__("valueOf", function() {}) +a + 8 diff --git a/js/src/jit-test/tests/auto-regress/bug698148.js b/js/src/jit-test/tests/auto-regress/bug698148.js new file mode 100644 index 0000000000..b6feb657aa --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug698148.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-64-b01eb1ba58ce-linux +// Flags: +// + +expect = 'Test skipped.'; +function addPointImagedata(pointArray, n, col, row) { + pointArray[expect + 2] = 2; +} +function createMandelSet() { + points = new Array; + for (var idx = 0; idx < 1440000 ; ++idx) { + points[idx] = 0 + } + addPointImagedata(points, ({}, {}), 0,0) +} +createMandelSet(); diff --git a/js/src/jit-test/tests/auto-regress/bug699674.js b/js/src/jit-test/tests/auto-regress/bug699674.js new file mode 100644 index 0000000000..8266213494 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug699674.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-32-6dc7901db1d6-linux +// Flags: +// +Array(24) +for(v in(Array(2440598491))){} diff --git a/js/src/jit-test/tests/auto-regress/bug700127.js b/js/src/jit-test/tests/auto-regress/bug700127.js new file mode 100644 index 0000000000..4ef82fb249 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug700127.js @@ -0,0 +1,17 @@ +// Binary: cache/js-dbg-64-921e1db5cf11-linux +// Flags: -m -n -a +// + +function addThis() {} +function Integer( value ) { + try { + checkValue( value ) + } catch (e) { } +} +function checkValue( value ) { + if ( addThis() != value || value ) + throw value='foo'; + return value; +} +Integer( 3 ); +Integer( NaN ); diff --git a/js/src/jit-test/tests/auto-regress/bug700295.js b/js/src/jit-test/tests/auto-regress/bug700295.js new file mode 100644 index 0000000000..f92039923c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug700295.js @@ -0,0 +1,22 @@ +// Binary: cache/js-dbg-64-1210706b4576-linux +// Flags: +// +load(libdir + "immutable-prototype.js"); + +if (globalPrototypeChainIsMutable()) { + this.__proto__ = null; + Object.prototype.__proto__ = this; +} + +function exploreProperties(obj) { + var props = []; + for (var o = obj; o; o = Object.getPrototypeOf(o)) { + props = props.concat(Object.getOwnPropertyNames(o)); + } + for (var i = 0; i < props.length; ++i) { + var p = props[i]; + var v = obj[p]; + } +} +var c = [{}]; +exploreProperties(c); diff --git a/js/src/jit-test/tests/auto-regress/bug701248.js b/js/src/jit-test/tests/auto-regress/bug701248.js new file mode 100644 index 0000000000..825c656b4d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug701248.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-c60535115ea1-linux +// Flags: +// + +function F(x, y) { + var { j, y, p, a } = testSyntax("#1=b", true) = this; +} +var src = F.toString(-1)+"\n"; diff --git a/js/src/jit-test/tests/auto-regress/bug701332.js b/js/src/jit-test/tests/auto-regress/bug701332.js new file mode 100644 index 0000000000..ca40e15a6e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug701332.js @@ -0,0 +1,15 @@ +// |jit-test| error:InternalError; slow; + +// Binary: cache/js-dbg-64-c60535115ea1-linux +// Flags: +// + +gczeal(2); +test(); +function test() { + function t(o, proplist) { + var props=proplist.split(/\s+/g); + }; + t({ bar: 123, baz: 123, quux: 123 }, 'bar baz quux'); + ( test(), this )(( "7.4.2-6-n" ) , actual, summary + ' : nonjit'); +} diff --git a/js/src/jit-test/tests/auto-regress/bug702003.js b/js/src/jit-test/tests/auto-regress/bug702003.js new file mode 100644 index 0000000000..da30715dc4 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug702003.js @@ -0,0 +1,25 @@ +// Binary: cache/js-dbg-64-50c1bcb49c76-linux +// Flags: -m -n -a +// + +var lfcode = new Array(); +lfcode.push("try { \ + gczeal(2);\ + exitFunc ('test');\ + } catch(exc1) {}\ +"); +lfcode.push("var summary = 'Foo'; \ + var actual = 'No Crash';\ + var expect = 'No Crash';\ + test();\ + function test() {\ + try {\ + eval('(function(){ .(yield 4) })().next();');\ + }\ catch(ex) { 'Bar'; }\ + }\ +"); +while (true) { + var code = lfcode.shift(); + if (code == undefined) { break; } + evaluate(code); +} diff --git a/js/src/jit-test/tests/auto-regress/bug702915.js b/js/src/jit-test/tests/auto-regress/bug702915.js new file mode 100644 index 0000000000..9829b19191 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug702915.js @@ -0,0 +1,85 @@ +// Binary: cache/js-dbg-64-d51bd1645a2f-linux +// Flags: -m -n -a +// +gczeal(4); +var callStack = new Array(); +var gTestcases = new Array(); +var gTc = gTestcases.length; +function TestCase(n, d, e, a) { + this.name = n; + this.description = d; + this.expect = e; + this.actual = a; + this.passed = getTestCaseResult(e, a); + this.reason = ''; + this.bugnumber = ''; + this.type = (typeof window == 'undefined' ? 'shell' : 'browser'); + gTestcases[gTc++] = this; +} +function enterFunc (funcName) { + try { throw foo; } catch(ex) {} +} +function getTestCaseResult(expected, actual) {} +function writeHeaderToLog( string ) {} +var lfcode = new Array(); +lfcode.push("\ + var code = ''; \ + code+=createCode((gczeal(2))); \ + function createCode(i) { \ + jstop+= + delete + i + \" string.';\"; \ + } \ +"); +lfcode.push("\ +var SECTION = '9.9-1'; \ +new TestCase( SECTION, '(Object(true)).__proto__', Boolean.prototype, (Object(true)).__proto__ ); \ +new TestCase( SECTION, '(Object(1)).__proto__', Number.prototype, (Object(1)).__proto__ ); \ +new TestCase( SECTION, '(Object(-1)).__proto__', Number.prototype, (Object(-1)).__proto__ ); \ +new TestCase( SECTION, '(Object(Number.MAX_VALUE)).__proto__', Number.prototype, (Object(Number.MAX_VALUE)).__proto__ ); \ +new TestCase( SECTION, '(Object(Number.MIN_VALUE)).__proto__', Number.prototype, (Object(Number.MIN_VALUE)).__proto__ ); \ +new TestCase( SECTION, '(Object(Number.POSITIVE_INFINITY)).__proto__', Number.prototype, (Object(Number.POSITIVE_INFINITY)).__proto__ ); \ +new TestCase( SECTION, '(Object(Number.NEGATIVE_INFINITY)).__proto__', Number.prototype, (Object(Number.NEGATIVE_INFINITY)).__proto__ ); \ +new TestCase( SECTION, '(Object(Number.NaN)).__proto__', Number.prototype, (Object(Number.NaN)).__proto__ ); \ +new TestCase( ) ; \ +new TestCase( SECTION, '(Object(\"\")).__proto__', String.prototype, (Object('')).__proto__ ); \ +new TestCase( SECTION, \"(Object('foo')).__proto__\", String.prototype, (Object('foo')).__proto__ ); \ +new TestCase( SECTION, \"Object( '' ).__proto__\", String.prototype, (Object(\"\")).__proto__ ); \ +new TestCase( SECTION, '(Object( new MyObject(true) )).toString()', '[object Object]', eval('(Object( new MyObject(true) )).toString()') ); \ +"); +lfcode.push("jsTestDriverEnd();"); +lfcode.push(""); +lfcode.push("\ + enterFunc ('test'); \ + Array.prototype[1] = 'bar'; \ + var a = []; \ + exitFunc ('test'); \ +"); +lfcode.push(""); +lfcode.push("\ + var VERSION = 'ECMA_1'; \ +var TITLE = 'Value Properties of the Math Object'; \ +writeHeaderToLog( SECTION + ' '+ TITLE); \ +new TestCase( '15.8.1.1', 'Math.E', \ + this . TITLE ); \ + 'typeof Math.E', \ +new TestCase( '15.8.1.2', \ + 'Math.LN10', \ + 'typeof Math.LN10', \ + typeof Math.LN10 ); \ +new TestCase( '15.8.1.3', \ + 'Math.LN2', \ + Math.LN2 ); \ +new TestCase( '15.8.1.3', \ + Math.LOG2E ); \ +new TestCase( '15.8.1.4', \ + Math.SQRT1_2); \ +new TestCase( '15.8.1.7', \ + typeof Math.SQRT2 ); \ +new TestCase( SECTION, \ + eval('var MATHPROPS=\"\";for( p in Math ){ MATHPROPS +=p; };MATHPROPS') ); \ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + try { + eval(file); + } catch(exc1) { print(exc1); }; +} diff --git a/js/src/jit-test/tests/auto-regress/bug704136.js b/js/src/jit-test/tests/auto-regress/bug704136.js new file mode 100644 index 0000000000..c5e0b83e79 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug704136.js @@ -0,0 +1,8 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-a335853be219-linux +// Flags: +// + +gczeal(4); +jsTestDriverEnd(); diff --git a/js/src/jit-test/tests/auto-regress/bug710192.js b/js/src/jit-test/tests/auto-regress/bug710192.js new file mode 100644 index 0000000000..399eee384f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug710192.js @@ -0,0 +1,10 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-63bff373cb94-linux +// Flags: -m -n -a +// + +function f(a, b, c) { + arguments[('4294967295')] = 2; +} +assertEq(f(1), "1234"); diff --git a/js/src/jit-test/tests/auto-regress/bug713209.js b/js/src/jit-test/tests/auto-regress/bug713209.js new file mode 100644 index 0000000000..559cbfadfd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug713209.js @@ -0,0 +1,24 @@ +// Binary: cache/js-dbg-32-c5b90ea7e475-linux +// Flags: -m -n -a +// +load(libdir + "immutable-prototype.js"); + +var save__proto__ = __proto__; +if (globalPrototypeChainIsMutable()) + __proto__ = save__proto__; + +function bar(x, y) { + return x + y; +} +function foo(x, y) { + var a = 0; + for (var i = 0; i < 1000; i++) { + a += (this.toString); + a += bar(x, y); + a = bar(x, (a)); + a += bar(x, y); + } + return a; +} +var q = foo(0, 1); +print(q.toString()); diff --git a/js/src/jit-test/tests/auto-regress/bug713944.js b/js/src/jit-test/tests/auto-regress/bug713944.js new file mode 100644 index 0000000000..36377b2f2a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug713944.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-64-7e28cce342a6-linux +// Flags: +// +function f() { + constructor = {} +} +Object.defineProperty(function() { + return {}.__proto__ +}(), "constructor", { + set: function() {} +}) +f() +Object.defineProperty({}.__proto__, "constructor", { + value: 3 +}) +f() diff --git a/js/src/jit-test/tests/auto-regress/bug715682.js b/js/src/jit-test/tests/auto-regress/bug715682.js new file mode 100644 index 0000000000..191a95507e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug715682.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-10894668e37f-linux +// Flags: +// +({set"0"(l){}}) diff --git a/js/src/jit-test/tests/auto-regress/bug716512.js b/js/src/jit-test/tests/auto-regress/bug716512.js new file mode 100644 index 0000000000..631a19b811 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug716512.js @@ -0,0 +1,6 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-9a230265bad5-linux +// Flags: +// +gcparam("maxBytes", -1); diff --git a/js/src/jit-test/tests/auto-regress/bug717249.js b/js/src/jit-test/tests/auto-regress/bug717249.js new file mode 100644 index 0000000000..5dfb880b6f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug717249.js @@ -0,0 +1,7 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-4de07a341aab-linux +// Flags: -m -n -a +// + +[].__proto__(); diff --git a/js/src/jit-test/tests/auto-regress/bug717251.js b/js/src/jit-test/tests/auto-regress/bug717251.js new file mode 100644 index 0000000000..b3e5696585 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug717251.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-64-4de07a341aab-linux +// Flags: -m -n -a +// +load(libdir + "immutable-prototype.js"); + +if (globalPrototypeChainIsMutable()) + this.__proto__ = []; + +var msPerDay = 86400000; +for ( var time = 0, year = 1969; year >= 0; year-- ) { + time -= TimeInYear(year); +} +function DaysInYear( y ) {} +function TimeInYear( y ) { + return ( DaysInYear(y) * msPerDay ); +} diff --git a/js/src/jit-test/tests/auto-regress/bug718347.js b/js/src/jit-test/tests/auto-regress/bug718347.js new file mode 100644 index 0000000000..e8886a7967 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug718347.js @@ -0,0 +1,8 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-49afabda6701-linux +// Flags: -m -n -a +// + +this.__proto__ = newGlobal(); +eval("(toLocaleString)();"); diff --git a/js/src/jit-test/tests/auto-regress/bug720380.js b/js/src/jit-test/tests/auto-regress/bug720380.js new file mode 100644 index 0000000000..d673ab8988 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug720380.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-42368fe44c8c-linux +// Flags: -m -n +// + +function MyObject( value ) { + this.toBoolean = (this[ this.Function = this ]++ ); +} +new MyObject(true); diff --git a/js/src/jit-test/tests/auto-regress/bug720396.js b/js/src/jit-test/tests/auto-regress/bug720396.js new file mode 100644 index 0000000000..8244185a9e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug720396.js @@ -0,0 +1,11 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-1962ca549264-linux +// Flags: +// + +var g = newGlobal(); +var dbg1 = new Debugger; +var gw1 = dbg1.addDebuggee(g); +var dbg2 = new Debugger; +var gw2 = dbg2.addDebuggee((gw1.__proto__)); diff --git a/js/src/jit-test/tests/auto-regress/bug721497.js b/js/src/jit-test/tests/auto-regress/bug721497.js new file mode 100644 index 0000000000..021a7bc9ab --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug721497.js @@ -0,0 +1,13 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-edf8075b0333-linux +// Flags: +// + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + assertEq(dumpStack(), true); +}; +g.eval("function f(a, [b, c], {x: [y], z: w}, {q}) { debugger; }"); +g.eval("f(1, [2, 3], {x: [4], z: 5}, {q: 6});"); diff --git a/js/src/jit-test/tests/auto-regress/bug722021.js b/js/src/jit-test/tests/auto-regress/bug722021.js new file mode 100644 index 0000000000..47a8bbc18c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug722021.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-8a59519e137e-linux +// Flags: -m -n -a +// + +var a = []; +for (let j = 0; j < 5; ++j) { + a.push(-2 in (a)); +} diff --git a/js/src/jit-test/tests/auto-regress/bug722023.js b/js/src/jit-test/tests/auto-regress/bug722023.js new file mode 100644 index 0000000000..e58cd39e00 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug722023.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-8a59519e137e-linux +// Flags: -m -n -a +// + +var obj = new Object(); +var index = [ (null ), 1073741824, 1073741825 ]; +for (var j in index) { + testProperty(index[j]); +} +function testProperty(i) { + actual = obj[String(i)]; +} diff --git a/js/src/jit-test/tests/auto-regress/bug722260.js b/js/src/jit-test/tests/auto-regress/bug722260.js new file mode 100644 index 0000000000..d9777c29bc --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug722260.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-8a59519e137e-linux +// Flags: +// + +var m = new Map; +var key = -((/\u0024/ ).x); +var v = {}; +m.set(key,v); diff --git a/js/src/jit-test/tests/auto-regress/bug724875.js b/js/src/jit-test/tests/auto-regress/bug724875.js new file mode 100644 index 0000000000..a6e20496c9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug724875.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-c34398f961e7-linux +// Flags: --ion-eager +// + +var lfcode = new Array(); +lfcode.push("gczeal(4);"); +lfcode.push(""); +while (true) { + var file = lfcode.shift(); + if (file == undefined) { break; } + loadFile(file); +} +function loadFile(lfVarx) { + eval(lfVarx); +} diff --git a/js/src/jit-test/tests/auto-regress/bug726636.js b/js/src/jit-test/tests/auto-regress/bug726636.js new file mode 100644 index 0000000000..595ed290ea --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug726636.js @@ -0,0 +1,10 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-4a9a6ffd1f21-linux +// Flags: +// +function jsTestDriverEnd() {} +this.__defineSetter__("x", function () {}); +x %= 5; +jsTestDriverEnd(); +mjitChunkLimit(); diff --git a/js/src/jit-test/tests/auto-regress/bug727330.js b/js/src/jit-test/tests/auto-regress/bug727330.js new file mode 100644 index 0000000000..bfa4533026 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug727330.js @@ -0,0 +1,9 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-ff51ddfdf5d1-linux +// Flags: +// +var a = []; +for (var i = 0; i < 200; ++i) a.push({}); +var p = new Proxy({}, {preventExtensions() { return false; }}); +Object.preventExtensions(p); diff --git a/js/src/jit-test/tests/auto-regress/bug728509.js b/js/src/jit-test/tests/auto-regress/bug728509.js new file mode 100644 index 0000000000..102770aa5b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug728509.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-32-78fde7e54d92-linux +// Flags: -m -n -a +// +function g(code) { + try { + f = eval("(function(){" + code + "})") + } catch (r) {} + f() + try { + evalcx("(function(){return" + code + "})()") + } catch (e) {} +} +g("") +g(" function(x,[]){NaN.x::c}()") diff --git a/js/src/jit-test/tests/auto-regress/bug729571.js b/js/src/jit-test/tests/auto-regress/bug729571.js new file mode 100644 index 0000000000..449ce040fe --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug729571.js @@ -0,0 +1,42 @@ +// Binary: cache/js-dbg-64-ca97bbcd6b90-linux +// Flags: --ion-eager +// + +gczeal(4); +function TestCase(n, d, e, a) {} +TestCase.prototype.dump = function () {}; +TestCase.prototype.testFailed = (function TestCase_testFailed() { + }); + try { + try { } catch(ex1) { } + } catch(ex) { } + options.initvalues = {}; + var optionNames = options().split(','); + var optionsframe = {}; + try { + optionsClear(); + } catch(ex) { } +var lfcode = new Array(); +lfcode.push("\ + try { } catch (exception) { }\ + try { } catch (exception) { }\ + try { } catch (exception) { }\ + try { } catch (actual) { }\ + var props = {};\ + function test(which) {\ + var g = newGlobal();\ + function addDebugger(g, i) {\ + var dbg = Debugger(g);\ + dbg.onDebuggerStatement = function (frame) { };\ + }\ + for (var i = 0; i < 3; i++) {\ + addDebugger(g, i);\ + }\ + g.eval(\"debugger;\");\ +}\ +for (var j = 0; j < 3; j++) test(j);\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + try { evaluate(file); } catch (lfVare) { } +} diff --git a/js/src/jit-test/tests/auto-regress/bug729797.js b/js/src/jit-test/tests/auto-regress/bug729797.js new file mode 100644 index 0000000000..4d5c4512bf --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug729797.js @@ -0,0 +1,15 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-5a04fd69aa09-linux +// Flags: --ion-eager +// + +var patterns = new Array(); +patterns[0] = ''; +test(); +function test() { + for (i in patterns) { + s = patterns[i]; + status =(test)(s); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug729886.js b/js/src/jit-test/tests/auto-regress/bug729886.js new file mode 100644 index 0000000000..b17ac1e299 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug729886.js @@ -0,0 +1,12 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-opt-64-5a04fd69aa09-linux +// Flags: --ion-eager +// + +function deep1(x) { + if (0) { } + else i : dumpStack(); +} +for (var i = 0; 1; ++i) + deep1(i); diff --git a/js/src/jit-test/tests/auto-regress/bug730806.js b/js/src/jit-test/tests/auto-regress/bug730806.js new file mode 100644 index 0000000000..9c5ed54b7e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug730806.js @@ -0,0 +1,61 @@ +// Binary: cache/js-opt-32-2dc40eb83023-linux +// Flags: -m -n -a +// +function toPrinted(value) { + return value = value.replace(/\\n/g, 'NL') + .replace(/\\r/g, 'CR') + .replace(/[^\x20-\x7E]+/g, escapeString); +} +function escapeString (str) +{ + var a, b, c, d; + var len = str.length; + var result = ""; + var digits = ["0", "1", "2", "3", "4", "5", "6", "7", + "8", "9", "A", "B", "C", "D", "E", "F"]; + for (var i=0; i>= 4; + d = digits[ch & 0xf]; + result += "\\u" + d + c + b + a; + } + } +} +function reportCompare (expected, actual, description) { +function test() { + try + { + } + catch(e) + { + } + } +} +try { +gczeal(2,4); +function setprop() { +} +} catch(exc1) {} +var trimMethods = ['trim', 'trimLeft', 'trimRight']; +var whitespace = [ + {s : '\u2028', t : 'LINE SEPARATOR'}, + ]; +for (var j = 0; j < trimMethods.length; ++j) +{ + var method = trimMethods[j]; + for (var i = 0; i < whitespace.length; ++i) + { + var v = whitespace[i].s; + var t = whitespace[i].t; + v = v + v + v; + str = v; + expected = ''; + actual = str[method](); + reportCompare(expected, actual, t + ':' + '"' + toPrinted(str) + '".' + method + '()'); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug732719.js b/js/src/jit-test/tests/auto-regress/bug732719.js new file mode 100644 index 0000000000..7ae9ea4ee5 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug732719.js @@ -0,0 +1,26 @@ +// |jit-test| slow; error:InternalError + +// Binary: cache/js-dbg-32-343ec916dfd5-linux +// Flags: -m -n +// + +function TestCase(n, d, e, a) { + return TestCase.prototype.dump = function () {}; +} +function enterFunc (funcName) { +return function writeHeaderToLog( string ) {}; +} +gczeal(2); +function f() {} +try { +var BUGNUMBER = 350621; +test(); +} catch(exc1) {} +function test() { + enterFunc ( summary = this, test(BUGNUMBER)); + function gen1() { } + function test_it(RUNS) { } +} +new TestCase (String([(1),'a22','a23','a24']), + String('a11\na22\na23\na24'.match(new RegExp('a..$','g')))); +test(); diff --git a/js/src/jit-test/tests/auto-regress/bug732852.js b/js/src/jit-test/tests/auto-regress/bug732852.js new file mode 100644 index 0000000000..8936fa855f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug732852.js @@ -0,0 +1,10 @@ +// |jit-test| error:SyntaxError + +// Binary: cache/js-dbg-64-1fd6c40d3852-linux +// Flags: --ion-eager +// + +var ary = ["\u001Cfoo", "\u001Dfoo", "\u001Efoo", "\u001Ffoo"]; +for (var i in ary) { + ary[Number(i)].search("var MYVAR='077';++MYVAR") +} diff --git a/js/src/jit-test/tests/auto-regress/bug732855.js b/js/src/jit-test/tests/auto-regress/bug732855.js new file mode 100644 index 0000000000..62c66c305a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug732855.js @@ -0,0 +1,69 @@ +// Binary: cache/js-dbg-64-1fd6c40d3852-linux +// Flags: --ion-eager +// +function TestCase(n, d, e, a) {} +var msPerDay = 86400000; +var msPerHour = 3600000; +var now = new Date(); +var TIME_NOW = now.valueOf(); +function DaysInYear( y ) { + if ( y % 4 != 0 ) { + return 365; + } + return 366; +} +function TimeInYear( y ) { + return ( DaysInYear(y) * msPerDay ); +} +function TimeFromYear( y ) { + return ( msPerDay * DayFromYear(y) ); +} +function DayFromYear( y ) { + return ( 365*(y-1970) + + Math.floor((y-1601)/400) ); +} +function InLeapYear( t ) { + if ( DaysInYear(YearFromTime(t)) == 365 ) { + return 0; + } + if ( DaysInYear(YearFromTime(t)) == 366 ) { + } +} +function YearFromTime( t ) { + var sign = ( t < 0 ) ? -1 : 1; + var year = ( sign < 0 ) ? 1969 : 1970; + for ( var timeToTimeZero = t; ; ) { + timeToTimeZero -= sign * TimeInYear(year) + if ( sign < 0 ) { + } else { + if ( sign * timeToTimeZero < 0 ) { + break; + } else { + year += sign; + } + } + } + return ( year ); +} +function WeekDay( t ) {} +function LocalTZA() {} +function LocalTime( t ) { + var dst_start = GetDSTStart(t); +} +function GetFirstSundayInMonth( t, m ) { + var leap = InLeapYear(t); +} +function GetDSTStart( t ) { + return (GetFirstSundayInMonth(t, 2) + 7*msPerDay + 2*msPerHour - LocalTZA()); +} +var SECTION = "15.9.5.12"; +addTestCase( TIME_NOW ); +function addTestCase( t ) { + var start = TimeFromYear(YearFromTime(t)); + var stop = TimeFromYear(YearFromTime(t) + 1); + for (var d = start; d < stop; d += msPerDay) { + new TestCase( SECTION, + WeekDay((LocalTime(d))), + (__lookupGetter__) ); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug732856.js b/js/src/jit-test/tests/auto-regress/bug732856.js new file mode 100644 index 0000000000..e6a7d2a079 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug732856.js @@ -0,0 +1,19 @@ +// Binary: cache/js-dbg-64-1fd6c40d3852-linux +// Flags: --ion-eager +// + +var cnName = 'name'; +var cnNameGetter = function() {this.nameGETS++; return this._name;}; +obj = (new (function ( ) { } ) ); +obj.__defineGetter__(cnName, cnNameGetter); +function lameFunc(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (obj.name) + (y >> 16) + (lsw >> 16); +} +function runSomeTimes(func, iters) { + for (var i = 0; i < iters; ++i) { + result = func(42, 42); + } +} +for (var i = 0; i < 11000; ++i) + runSomeTimes(lameFunc, 1); diff --git a/js/src/jit-test/tests/auto-regress/bug732857.js b/js/src/jit-test/tests/auto-regress/bug732857.js new file mode 100644 index 0000000000..d78f3e3c70 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug732857.js @@ -0,0 +1,34 @@ +// Binary: cache/js-dbg-32-1fd6c40d3852-linux +// Flags: --ion-eager +// +load(libdir + "immutable-prototype.js"); + +function TestCase(n, d, e, a) {}; + +if (globalPrototypeChainIsMutable()) + this.__proto__ = []; + +var msPerDay = 86400000; +var TIME_1900 = -2208988800000; +function TimeFromYear( y ) { + return ( msPerDay * DayFromYear(y) ); +} +function DayFromYear( y ) { + return ( 365*(y-1970) + + Math.floor((y-1601)/400) ); +} +function YearFromTime( t ) { + var sign = ( t < 0 ) ? -1 : 1; + var year = ( sign < 0 ) ? 1969 : 1970; + return ( year ); +} +var SECTION = "15.9.5.10"; +addTestCase( TIME_1900 ); +function addTestCase( t ) { + var start = TimeFromYear(YearFromTime(t)); + var stop = TimeFromYear(YearFromTime(t) + 1); + for (var d = start; d < stop; d += msPerDay) { + new TestCase( SECTION, + (new Date( SECTION ? "Failed" : prototype += "'abc'.search(new RegExp('^'))") ).getDate() ); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug732861.js b/js/src/jit-test/tests/auto-regress/bug732861.js new file mode 100644 index 0000000000..6ceed608b0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug732861.js @@ -0,0 +1,12 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-1fd6c40d3852-linux +// Flags: --ion-eager +// + +j = 0; +out1: +for ((exception) = 0; ; j++) + if (j == 50) + break out1; +while (dbgeval("[]").proto ? g : 50) {} diff --git a/js/src/jit-test/tests/auto-regress/bug735313.js b/js/src/jit-test/tests/auto-regress/bug735313.js new file mode 100644 index 0000000000..fe57887fcc --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug735313.js @@ -0,0 +1,15 @@ +// |jit-test| slow; allow-oom; + +// Binary: cache/js-dbg-64-dfcb11712ec2-linux +// Flags: +// + +a=[]; +for (var i=0; i<10; i++) { + a[a.length] = a; +} +try { + for (var i=0; i<26; i++) { + a[a.length] = a.toString(); + } +} catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug735936.js b/js/src/jit-test/tests/auto-regress/bug735936.js new file mode 100644 index 0000000000..a7f8db1acf --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug735936.js @@ -0,0 +1,8 @@ +// |jit-test| error: SyntaxError +// Binary: cache/js-dbg-32-7e713db43d8d-linux +// Flags: +// +f = (function() { + "use strict"; + [arguments] = eval() +}) diff --git a/js/src/jit-test/tests/auto-regress/bug736609.js b/js/src/jit-test/tests/auto-regress/bug736609.js new file mode 100644 index 0000000000..a4b3633153 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug736609.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-32-c7ef262e3024-linux +// Flags: +// +try { + a = new ArrayBuffer(76); + b = new Uint32Array(a); + String() + c = new Uint8Array(a); + c.set(b) +} catch (e) {} diff --git a/js/src/jit-test/tests/auto-regress/bug737300.js b/js/src/jit-test/tests/auto-regress/bug737300.js new file mode 100644 index 0000000000..ad5b021916 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug737300.js @@ -0,0 +1,21 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-b5b6e6aebb36-linux +// Flags: --ion-eager +// + +function loopy(p0) +{ + var r3 = p0; + var r4 = p0; + var r6 = p0; + var r7 = p0; + while (r2) { + while (r2) { + r5 = r6 & r1; + r3 = r4 & r3; + r2 = r7; + } + } +} +loopy(0); diff --git a/js/src/jit-test/tests/auto-regress/bug737737.js b/js/src/jit-test/tests/auto-regress/bug737737.js new file mode 100644 index 0000000000..cf219d5b33 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug737737.js @@ -0,0 +1,36 @@ +// Binary: cache/js-dbg-32-e96d5b1f47b8-linux +// Flags: --ion-eager +// +function b(z) { + switch (z) { + default: + primarySandbox = newGlobal() + } + return function(f, code) { + try { + evalcx(code, primarySandbox) + } catch (e) {} + } +} +function a(code) { + gc(); + f = Function(code) + c(f, code) +} +c = b() +a("\ + f2 = (function() {\ + a0 + o2.m;\ + a2.shift()\ + });\ + a2 = new Array;\ + Object.defineProperty(a2, 0, {\ + get: f2\ + });\ + o2 = {};\ + a0 = [];\ + a2.shift();\ + var x;\ +") +a("a0 = x") +a("a2.shift()") diff --git a/js/src/jit-test/tests/auto-regress/bug739402.js b/js/src/jit-test/tests/auto-regress/bug739402.js new file mode 100644 index 0000000000..d42de4e410 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug739402.js @@ -0,0 +1,142 @@ +// |jit-test| slow; + +// Binary: cache/js-dbg-32-be41973873db-linux +// Flags: --ion-eager +// +function MersenneTwister19937() { + N = 624; + var M = 397; + MATRIX_A = 567483615; + UPPER_MASK = 2147483648; + var LOWER_MASK = 767; + mt = Array(); + function unsigned32(n1) { + return n1 < 0 ? (n1 ^ UPPER_MASK) + UPPER_MASK : n1; + } + function addition32(n1, n2) { + return unsigned32(n1 + n2 & 4294967295); + } + function multiplication32(n1, n2) { + sum = 0; + for (i = 0; i < 32; ++i) { + if (n1 >> i & 1) { + sum = addition32(sum, unsigned32(n2 << i)); + } + } + return sum; + } + this.init_genrand = function() { + for (mti = 1; mti < N; mti++) { + mt[mti] = addition32(multiplication32(181433253, unsigned32(mt[mti - 1] ^ mt[mti - 1] >>> 30)), mti); + } + }; + this.genrand_int32 = function() { + mag01 = Array(0, MATRIX_A); + if (mti > N) { + for (kk = 0; kk < N - M; kk++) { + y = unsigned32(mt[kk] & UPPER_MASK | mt[kk + 1] & LOWER_MASK); + } + for (; kk < N; kk++) { + mt[kk] = unsigned32(mt[kk + (M - N)] ^ y >>> 1 ^ mag01[y & 1]); + } + mti = 0; + } + y = mt[mti++]; + return y; + }; +} +(function() { + var fuzzMT = new MersenneTwister19937; + fuzzSeed = 4; + fuzzMT.init_genrand(fuzzSeed); + rnd = function(n) { + var x = fuzzMT.genrand_int32() * 2.2e-10; + return Math.floor(x * n); + }; +}()); + +function rndElt(a) { + return a[rnd(a.length)]; +} +varBinderFor = ["", "t", ""]; +function forLoopHead(d, b, v, reps) { + var sInit = rndElt(varBinderFor) + v + "=0"; + var sCond = v + "<" + reps; + sNext = "++" + v; + return "for(" + sInit + ";" + sCond + ";" + sNext + ")"; +} +function makeBranchUnstableLoop(d, b) { + var reps = rnd(rnd(9)); + v = uniqueVarName(); + var mod = rnd(); + target = rnd(mod); + return "" + forLoopHead(d, b, v, reps) + "{" + "if(" + v + "%" + mod + "==" + target + "){" + makeStatement(d - 2, b) + "}" + "{" + makeStatement(d - 2) + "}" + "}"; +} +function weighted(wa) { + a = []; + for (var i = 0; i < wa.length; ++i) { + for (var j = 0; j < wa[i].w; ++j) { + a.push(wa[i].fun); + } + } + return a; +} +statementMakers = weighted([{ + w: 6, + fun: makeBranchUnstableLoop +}, {}]); +(function() { + builderStatementMakers = weighted([{ + w: 1, + fun: function() { + return "gc()"; + } + }, { + w: 10, + fun: function() {} + }]); + makeBuilderStatement = function() { + return rndElt(builderStatementMakers)(); + }; +}()); +function uniqueVarName() { + for (i = 0; i < 6; ++i) { + s = String.fromCharCode(97 + rnd(6)); + } + return s; +} +function makeLittleStatement(d) { + rnd(0); + if (rnd) { + rndElt(littleStatementMakers)(); + } +} +littleStatementMakers = [function() {}]; +function testOne() { + var code = makeOv(10); + tryItOut(code); +} +function makeStatement(d, b) { + if (rnd(0)) {} + if (rnd(2)) { + return makeBuilderStatement(); + } + d < 6 && rnd() == 0; + if (d < rnd(8)) { + return makeLittleStatement(); + } + return rndElt(statementMakers)(d, b); +} +function makeOv(d, B) { + if (rnd() == 0) {} + return "" + makeStatement(d, [""]); +} +function tryItOut(code) { + try { + f = Function(code); + f(); + } catch (r) {} +} +for (let aa = 0; aa < 9999; aa++) { + testOne(); +} diff --git a/js/src/jit-test/tests/auto-regress/bug739901.js b/js/src/jit-test/tests/auto-regress/bug739901.js new file mode 100644 index 0000000000..9bb1e26fbd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug739901.js @@ -0,0 +1,20 @@ +// Binary: cache/js-dbg-64-940078281bbf-linux +// Flags: --ion-eager +// +function List(l) { + this.l = l; +} +function f(p) { + return g(p.l); +}; +function g(p) { + return !(p instanceof List) ? null : f(p.l); +}; +list = + new List(new List( + new List(new List( + new List(new List( + new List(new List(null)))))))) +for (let i = 0; i < 99999; i++) { + g(list); +} diff --git a/js/src/jit-test/tests/auto-regress/bug740509.js b/js/src/jit-test/tests/auto-regress/bug740509.js new file mode 100644 index 0000000000..1e9c7b2f90 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug740509.js @@ -0,0 +1,82 @@ +// |jit-test| slow; + +// Binary: cache/js-dbg-64-fb23c30e3d60-linux +// Flags: -m -n -a +// +function TestCase(n, d, e, a) { +return TestCase.prototype.dump = function () { +}; +} +var lfcode = new Array(); +lfcode.push("2"); +lfcode.push("var lfcode = new Array();\ +lfcode.push(\"gczeal(4,1);\");\ +while (true) {\ + var file = lfcode.shift(); if (file == ((0Xa ) . shift )) { break; }\ + eval(file);\ +}\ +"); +lfcode.push("function testJSON(str, expectSyntaxError)\ +"); +lfcode.push("{ return 1; }"); +lfcode.push("Number.prototype.toString = function() { return 3; };\ +assertEq(JSON.stringify({ 3: 3, 4: 4 }, [(this . abstract )]),\ + '{\"3\":3}');\ +"); +lfcode.push("var HoursPerDay = 24;\ +var MinutesPerHour = 60;\ +var SecondsPerMinute = 60;\ +var msPerSecond = 1000;\ +var msPerMinute = 60000;\ +var TZ_ADJUST = TZ_DIFF * msPerHour;\ +var PST_DIFF = TZ_DIFF - TZ_PST;\ +var PST_ADJUST = TZ_PST * msPerHour;\ +var TIME_0000 = (function ()\ + {\ +var TIME_1970 = 0;\ +var TIME_1900 = -2208988800000;\ +var UTC_FEB_29_2000 = TIME_2000 + 31*msPerDay + 28*msPerDay;\ +var UTC_JAN_1_2005 = TIME_2000 + TimeInYear(2000) + TimeInYear(2001) +\ + TimeInYear(2002) + TimeInYear(2003) + TimeInYear(2004);\ +var TIME_NOW = now.valueOf();\ +function getTimeZoneDiff()\ +{\ + return -((new Date(2000, 1, 1)).getTimezoneOffset())/60;\ +function adjustResultArray(ResultArray, msMode)\ + { return ResultArray[UTC_HOURS] = HourFromTime(t); }\ + ResultArray[UTC_DATE] = DateFromTime(t);\ + ResultArray[UTC_MONTH] = MonthFromTime(t);\ + ResultArray[UTC_YEAR] = YearFromTime(t);\ +function DaysInYear( y ) {\ + return \"ERROR: DaysInYear(\" + y + \") case not covered\";\ +function DayNumber( t ) {\ +function TimeWithinDay( t ) {\ +function YearNumber( t ) {\ +function TimeFromYear( y ) {\ +function InLeapYear( t ) {\ + return \"ERROR: InLeapYear(\"+ t + \") case not covered\";\ + for ( var timeToTimeZero = t; ; ) {\ + return \"ERROR: MonthFromTime(\"+t+\") not known\";\ +function DayWithinYear( t ) {\ + return( Day(t) - DayFromYear(YearFromTime(t)));\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + if (file == "evaluate") { + } else { + loadFile(file); + } +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + } else if (!isNaN(lfVarx)) { + lfRunTypeId = parseInt(lfVarx); + } else { + switch (lfRunTypeId) { + case 1: eval(lfVarx); break; + case 2: new Function(lfVarx)(); break; + } + } + } catch (lfVare) { } +} diff --git a/js/src/jit-test/tests/auto-regress/bug740654.js b/js/src/jit-test/tests/auto-regress/bug740654.js new file mode 100644 index 0000000000..5b2d151ba0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug740654.js @@ -0,0 +1,13 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-32-92fe907ddac8-linux +// Flags: -m -n +// +o = {} +o.valueOf = function() { + for (var p in undefined) { + a = new Function; + } + +o; +}; ++o; diff --git a/js/src/jit-test/tests/auto-regress/bug741199.js b/js/src/jit-test/tests/auto-regress/bug741199.js new file mode 100644 index 0000000000..6205bfcfa3 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug741199.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-32-e96d5b1f47b8-linux +// Flags: --ion-eager +// + +var a = new Array(1000 * 100); +var i = a.length; +while (i-- != 0) {} +gc(); +(({ }).break--); diff --git a/js/src/jit-test/tests/auto-regress/bug743071.js b/js/src/jit-test/tests/auto-regress/bug743071.js new file mode 100644 index 0000000000..0c5e80d3c2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug743071.js @@ -0,0 +1,51 @@ +// Binary: cache/js-dbg-64-a9a18824b4c1-linux +// Flags: --ion-eager +// + +{ + try + { + try + { + } + catch(ex1) + { + } + } + catch(ex) + { + } +} +function optionsClear() { + var optionNames = options().split(','); + for (var i = 0; i < optionNames.length; i++) + { + var optionName = optionNames[i]; + if (optionName && + optionName != "methodjit_always") + { + options(optionName); + } + } +} +{ + optionsClear(); + { + } +} +function test() { + for ( gTc=0; gTc < gTestcases.length; gTc++ ) { + try + { + } + catch(e) + { + } + } +} +try { +var g = newGlobal(); +g.eval("(" + function () { + dbg = new Debugger(debuggeeGlobal); + } + ")();"); +} catch(exc0) {} diff --git a/js/src/jit-test/tests/auto-regress/bug743094.js b/js/src/jit-test/tests/auto-regress/bug743094.js new file mode 100644 index 0000000000..982d9d3a87 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug743094.js @@ -0,0 +1,17 @@ +// Binary: cache/js-dbg-32-a9a18824b4c1-linux +// Flags: --ion-eager +// + +var i = 0; + +gczeal(2); +function test() { + // Recursion depth reduced to allow PBL with debug build (hence larger + // frames) to work. + if (i++ > 75) + return "function"; + var res = typeof (new test("1")) != 'function'; + return res ? "function" : "string"; +} + +test(); diff --git a/js/src/jit-test/tests/auto-regress/bug743096.js b/js/src/jit-test/tests/auto-regress/bug743096.js new file mode 100644 index 0000000000..81661ea6e1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug743096.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-64-a9a18824b4c1-linux +// Flags: --ion-eager +// + +try { +function f() { + var obj = { + p0:0, p1:1, p2:2, p3:3, p4:4, p5:5, p6:6, p7:7, p8:8, p9:9, + p10:0, p11:1, set:2, p13:3, p14:4, p15:5, p16:6, p17:7, p18:8, p19:9, + with : function() { return 42; } + }; +} + actual = f(); +} catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug743876.js b/js/src/jit-test/tests/auto-regress/bug743876.js new file mode 100644 index 0000000000..2dd81faefa --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug743876.js @@ -0,0 +1,35 @@ +// Binary: cache/js-dbg-64-434f50e70815-linux +// Flags: -m -n -a +// + +var lfcode = new Array(); +lfcode.push("3"); +lfcode.push("\ +evaluate(\"\");\ +function slice(a, b) {\ + return slice(index, ++(ArrayBuffer));\ +}\ +"); +lfcode.push("0"); +lfcode.push("var arr = [0, 1, 2, 3, 4];\ +function replacer() {\ + assertEq(arguments.length, 2);\ + var key = arguments[0], value = arguments[1];\ + return value;\ +}\ +assertEq(JSON.stringify(arr, replacer), '[0,1,2,3,4]');\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file); +} +function loadFile(lfVarx) { + if (!isNaN(lfVarx)) { + lfRunTypeId = parseInt(lfVarx); + } else { + switch (lfRunTypeId) { + case 0: evaluate(lfVarx); break; + case 3: function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); break; + } + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug745452.js b/js/src/jit-test/tests/auto-regress/bug745452.js new file mode 100644 index 0000000000..38ca2a42fc --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug745452.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-64-55e7efcc1946-linux +// Flags: +// + +var o = Object.preventExtensions(new ArrayBuffer); +try { (function () { o.__proto__ = ({ __proto__: o, indexArray: ["abc"] }); })(); } catch(exc) {} +JSON.stringify(this); diff --git a/js/src/jit-test/tests/auto-regress/bug746103.js b/js/src/jit-test/tests/auto-regress/bug746103.js new file mode 100644 index 0000000000..75a34319b7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug746103.js @@ -0,0 +1,15 @@ +// |jit-test| slow; error:InternalError + +// Binary: cache/js-dbg-64-c61e7c3a232a-linux +// Flags: -m -n -a +// + +gczeal(2); +function testCallProtoMethod() { + function X() { + this.valueOf = new testCallProtoMethod( "return this.value" ); + } + X.prototype.getName = function () { return "X"; } + var a = [new X, new X, new getName, new new this, new Y]; +} +testCallProtoMethod(); diff --git a/js/src/jit-test/tests/auto-regress/bug746376.js b/js/src/jit-test/tests/auto-regress/bug746376.js new file mode 100644 index 0000000000..7cbde055c8 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug746376.js @@ -0,0 +1,65 @@ +// Binary: cache/js-dbg-64-67bf9a4a1f77-linux +// Flags: --ion-eager +// +var callStack = new Array(); +var gTestcases = new Array(); +var gTc = gTestcases.length; +function TestCase(n, d, e, a) { + this.expect = e; + this.actual = a; + this.passed = getTestCaseResult(e, a); + this.reason = ''; + this.bugnumber = typeof(BUGNUMER) != 'undefined' ? BUGNUMBER : ''; + this.type = (typeof window == 'undefined' ? 'shell' : 'browser'); + gTestcases[gTc++] = this; +} +function reportCompare (expected, actual, description) { + var output = ""; + if (typeof description == "undefined") + if (expected != actual) + printStatus ("Expected value '" + toPrinted(expected) + + "' matched actual value '" + toPrinted(actual) + "'"); + var testcase = new TestCase("unknown-test-name", description, expected, actual); + testcase.reason = output; + if (testcase.passed) { } + return testcase.passed; +} +function enterFunc (funcName) { + var lastFunc = callStack.pop(); + reportCompare(funcName, lastFunc, "Test driver failure wrong exit function "); +} +function getTestCaseResult(expected, actual) {} +var lfcode = new Array(); +lfcode.push("\ +var summary = 'decompilation of \"let with with\" ';\ +var actual = '';\ +var expect = '';\ +test();\ +function test() {\ + enterFunc ('test');\ + gczeal(2);\ + for (let q = 0; q < 50; ++q) {\ + new Function('for (var i = 0; i < 5; ++i) { } ')();\ + var w = 'r'.match(/r/);\ + new Function('for (var j = 0; j < 1; ++j) { } ')();\ + }\ + reportCompare(expect, actual, summary);\ +}\ +"); +delete Debugger; +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + if (file == "evaluate") { + } else { + loadFile(file); + } +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + } else { + evaluate(lfVarx); + } + } catch (lfVare) { + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug746377.js b/js/src/jit-test/tests/auto-regress/bug746377.js new file mode 100644 index 0000000000..ba65b84a61 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug746377.js @@ -0,0 +1,14 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-67bf9a4a1f77-linux +// Flags: --ion-eager +// + +var actual = ''; +test(); +function test() +{ + a = {x: 1}; + b = {__proto__: a}; + print(actual += test(1,2,3,4)); +} diff --git a/js/src/jit-test/tests/auto-regress/bug748119.js b/js/src/jit-test/tests/auto-regress/bug748119.js new file mode 100644 index 0000000000..759db8cb10 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug748119.js @@ -0,0 +1,95 @@ +// Binary: cache/js-dbg-32-17af008937e3-linux +// Flags: -m -n -a +// +var lfcode = new Array(); +lfcode.push("\ +var gTestcases = new Array();\ +var gTc = gTestcases.length;\ +function TestCase(n, d, e, a) {\ + this.passed = getTestCaseResult(e, a);\ + this.bugnumber = typeof(BUGNUMER) != 'undefined' ? BUGNUMBER : '';\ + gTestcases[gTc++] = this;\ +}\ +for (var i=0; i -10; i-- ) { + f(f / 16); +} diff --git a/js/src/jit-test/tests/auto-regress/bug758164.js b/js/src/jit-test/tests/auto-regress/bug758164.js new file mode 100644 index 0000000000..fa94c520a6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug758164.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-407632130d1b-linux +// Flags: +// + +gc(); +evaluate("gcslice(1);"); diff --git a/js/src/jit-test/tests/auto-regress/bug759719.js b/js/src/jit-test/tests/auto-regress/bug759719.js new file mode 100644 index 0000000000..816d0c1229 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug759719.js @@ -0,0 +1,81 @@ +// Binary: cache/js-dbg-64-e8a025a7101b-linux +// Flags: -m -n +// +var SECTION = ""; +function AddTestCase( description, expect, actual ) {} +function TestCase(n, d, e, a) {} +TestCase.prototype.dump = function () {}; +function printStatus (msg) { + msg = msg.toString(); + var lines = msg.split ("\n"); +} +function printBugNumber (num) {} +function optionsInit() {} +function optionsClear() {} + var optionsframe = {}; + try { + optionsClear(); + for (var optionName in options.initvalues) { } + } catch(ex) { + optionsInit(); + if (typeof window == 'undefined' && typeof print == 'function') + try { + gTestcases[gTc].passed = writeTestCaseResult( + gTestcases[gTc].description +" = "+ gTestcases[gTc].actual ); + } catch(e) { + if (typeof document != "object" || !document.location.href.match(/jsreftest.html/)) {} + } + } + code = "(function(x){ if(x) return x; })"; +gczeal(2); +for (var loopa2 = 0; loopa2 < 13; loopa2++) { + [, , , , , , ][(loopa2.loopa2)] &= (/\u0042[\u0061]\\u0026/ ); +} +this.summary = false; +printStatus (summary); +try {} catch(e) {} +var TIME_0000 = (function () { })(); +function getTimeZoneDiff() {} +new TestCase( SECTION, Array.prototype.reverse.length ); +new TestCase( SECTION, eval("delete Array.prototype.reverse.length; Array.prototype.reverse.length") ); +var S = "var A = new Array( true,false )"; +eval(S); +var R = Reverse(A); +new TestCase( SECTION, eval( S + "; A.reverse(); A.length") ); +CheckItems( R, A ); +CheckItems( R, A ); +eval(S); +new TestCase( SECTION, eval( S + "; A.reverse(); A.length") ); +CheckItems( R, A ); +var S = "var A = new Array(); A[8] = 'hi', A[3] = 'yo'"; +eval(S); +var R = Reverse(A); +new TestCase( SECTION, eval( S + "; A.reverse(); A.length") ); +CheckItems( R, A ); +var OBJECT_OBJECT = new Object(); +var FUNCTION_OBJECT = new Function( 'return this' ); +var BOOLEAN_OBJECT = new Boolean; +var DATE_OBJECT = new Date(0); +var STRING_OBJECT = new String('howdy'); +var NUMBER_OBJECT = new Number(Math.PI); +var ARRAY_OBJECT= new Array(1000); +var args = "null, void 0, Math.pow(2,32), 1.234e-32, OBJECT_OBJECT, BOOLEAN_OBJECT, FUNCTION_OBJECT, DATE_OBJECT, STRING_OBJECT,"+ + "ARRAY_OBJECT, NUMBER_OBJECT, Math, true, false, 123, '90210'"; +var S = "var A = new Array("+args+")"; +eval(S); +var R = Reverse(A); +new TestCase( SECTION, eval( S + "; A.reverse(); A.length") ); +CheckItems( R, A ); +var limit = 1000; +for (var i = 0; i < limit; i++ ) { + args += i +""; +} +function CheckItems( R, A ) { + for ( var i = 0; i < R.length; i++ ) { + new TestCase( ( code ) [i] ); + } +} +function Object_1( value ) {} +function Reverse( array ) { + return array; +} diff --git a/js/src/jit-test/tests/auto-regress/bug761864.js b/js/src/jit-test/tests/auto-regress/bug761864.js new file mode 100644 index 0000000000..c6f0c70441 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug761864.js @@ -0,0 +1,58 @@ +// Binary: cache/js-dbg-32-cf4face65451-linux +// Flags: -m -n +// +function printStatus (msg) { + var lines = msg.split (""); +} +function printBugNumber (num) { + var digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; +} +var lfcode = new Array(); +lfcode.push("gczeal(4);"); +lfcode.push("jsTestDriverEnd();"); +lfcode.push(""); +lfcode.push("var BUGNUMBER = \"(none)\";\ +var summary = \"gen.close(); gen.throw(ex) throws ex forever\";\ +var actual, expect;\ +printBugNumber(BUGNUMBER);\ +printStatus(summary);\ +function gen() {\ + var x = 5, y = 7;\ + yield z;\ +}\ +var failed = false;\ +var it = gen();\ +try {\ + it.close();\ + var doThrow = true;\ + var thrown = \"foobar\";\ + try { } catch (e) { }\ + try { } catch (e) { }\ + throw \"it.throw(\\\"\" + thrown + \"\\\") failed\";\ + var stopPassed = false;\ + try { } catch (e) {\ + if (\"1234\")\ + stopPassed = true;\ + }\ +} catch (e) {}\ +"); +var lfRunTypeId = -1; +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + if (file == "evaluate") { + } else { + loadFile(file); + } +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + } else { + switch (lfRunTypeId) { + default: evaluate(lfVarx); + } + } + } catch (lfVare) { + print(lfVare); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug762324.js b/js/src/jit-test/tests/auto-regress/bug762324.js new file mode 100644 index 0000000000..ed5dd5f621 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug762324.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-f918d74f736c-linux +// Flags: +// +(function(){ + try { + Function("function d(e= Pron((function hy() {return {d: function() { vum =pln(+ 'Lte'); return {get: function() { thr; }, set: function() { thr; }}; }, g: function(){ (yum + 'LE');}, has: function() { (yum + '')},Own: f}; })(x), ((function sing(xg) { ; xg :vc; })([, nen(true),l, n, null, l, nan(true), nen(true),ull,ull,lean(true), ean(), nan(true), nun(true),an(true), nen(true),lean(true), n(true),ull,ull,an(true), nuean(), nan(true), null, ll, ll, ean(), nan(true), nen(true),lean(true), ean(), nl, n(true), ean(), n, nu, nen(true),lean(true), ll, ean(), nan(true), nuean(), nll, ean(true), nan(true), nun(true),(true), ean(true), nan(true), nen(true),n(true),an(true), nen(true),l, null,lean(true), n(true),an(true), nen(true),l, null,lean(true), ll, ean(true), nan(true), nuean(), null, n, ean(), null,lean(true), ean(), null], 0)), ((\"y\")))['ww']){/*jjj*/}gc();") + } catch (e) {} +})() diff --git a/js/src/jit-test/tests/auto-regress/bug763039.js b/js/src/jit-test/tests/auto-regress/bug763039.js new file mode 100644 index 0000000000..dcd8df564a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug763039.js @@ -0,0 +1,69 @@ +// Binary: cache/js-dbg-32-5cfb73435e06-linux +// Flags: --ion-eager +// +var actual = ''; +function TestCase(n, d, e, a) { + this.reason = ''; +} +function inSection(x) {} +function reportCompare (expected, actual, description) { + var testcase = new TestCase("unknown-test-name", description, expected, actual); + testcase.reason = output; +} +var lfcode = new Array(); +lfcode.push("4"); +lfcode.push("function START(summary) {\ +}\ +function TEST(section, expected, actual) {\ + return reportCompare(expected, actual, inSection(section) + SUMMARY);\ +}\ +var expect = (1);\ +TEST(1,1 << this < assertEq++ < this, actual);\ +"); +lfcode.push("\ +gczeal(4);\ +data >>>= RunSingleBenchmark(data);\ +"); +lfcode.push("4"); +lfcode.push("\ +var BUGNUMBER = 345855;\ +var summary = 'Blank yield expressions are not syntax errors';\ +test();\ +function test() {\ + try {\ + eval('(function() {x = 12 + yield;})');\ + } catch(ex) {}\ + try { eval('(function() {x = 12 + yield 42})'); } catch(ex) {\ + status = inSection(4);\ + }\ + try {\ + eval('(function() {x = 12 + (yield);})');\ + } catch(ex) { }\ + try {\ + eval('(function () {foo((yield))})');\ + } catch(ex) { }\ + try {\ + eval('(function() {x = 12 + (yield 42)})');\ + } catch(ex) { }\ + reportCompare(expect, actual, summary + ': function() {x = 12 + (yield 42)}');\ +}\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file); +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + } else if (!isNaN(lfVarx)) { + lfRunTypeId = lfVarx; + } else { + switch (lfRunTypeId) { + case 1: eval(read(lfVarx)); break; + default: evaluate(lfVarx); + } + } + } catch (lfVare) { + print(lfVare); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug763989.js b/js/src/jit-test/tests/auto-regress/bug763989.js new file mode 100644 index 0000000000..042df9f868 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug763989.js @@ -0,0 +1,47 @@ +// Binary: cache/js-dbg-32-4bcbb63b89c3-linux +// Flags: --ion-eager +// +var summary = ''; +function reportFailure (msg) {} +function toPrinted(value) { + value = value.replace(/\n/g, 'NL') +} +function reportCompare (expected, actual, description) { + var output = ""; + output += "Expected value '" + toPrinted(expected) + + "', Actual value '" + toPrinted(actual) + "' "; + reportFailure (description + " : " + output); +} +var lfcode = new Array(); +lfcode.push("\ + expect = actual = 'No Exception';\ + reportCompare(expect, actual, summary);\ +"); +lfcode.push("\ +function reportFailure (section, msg)\ + msg = inSection(section)+\"\"+msg;\ +"); +lfcode.push("\ +try {\ + for (var i in expect) \ + reportCompare(expect[i], actual[i], getStatus(i));\ +} catch(exc1) {}\ +function getStatus(i) {}\ +"); +lfcode.push("gczeal(2,(9));"); +lfcode.push("evaluate(\"reportCompare(expect, actual, summary);\");"); + gcPreserveCode() +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + if (file == "evaluate") { + } else { + loadFile(file); + } +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) != ".js") { + evaluate(lfVarx); + } + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/auto-regress/bug765055.js b/js/src/jit-test/tests/auto-regress/bug765055.js new file mode 100644 index 0000000000..557d37e5c7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug765055.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-32-85e31a4bdd41-linux +// Flags: +// + +function test( d = 1, a = this, ... f) { + function f() {} +} diff --git a/js/src/jit-test/tests/auto-regress/bug765483.js b/js/src/jit-test/tests/auto-regress/bug765483.js new file mode 100644 index 0000000000..2028b8000b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug765483.js @@ -0,0 +1,15 @@ +// |jit-test| error:ReferenceError; + +// Binary: cache/js-dbg-64-de23a9fc29db-linux +// Flags: --ion-eager +// + +load(libdir + "evalInFrame.js"); + +var obj1 = {}, obj2 = {}; +obj2['b'+i] = 0; +for (var k in obj2) { + (function g() { evalInFrame(1, "assertStackIs(['eval-code', f, 'bound(f)', 'global-code'])", true); })(); +} +for (var i = 0; i != array.length; ++i) + array[i](); diff --git a/js/src/jit-test/tests/auto-regress/bug766065.js b/js/src/jit-test/tests/auto-regress/bug766065.js new file mode 100644 index 0000000000..bfb323f786 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug766065.js @@ -0,0 +1,13 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-19bfe36cace8-linux +// Flags: -m -n -a +// + +function testApplyCallHelper(f) { + for (var i = 0; i < 10; ++i) dumpStack.apply(this,[0,1]); +} +function testApplyCall() { + var r = testApplyCallHelper(function (a0,a1,a2,a3,a4,a5,a6,a7) { x = [a0,a1,a2,a3,a4,a5,a6,a7]; }); +} +testApplyCall(); diff --git a/js/src/jit-test/tests/auto-regress/bug767679.js b/js/src/jit-test/tests/auto-regress/bug767679.js new file mode 100644 index 0000000000..b336694568 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug767679.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-32-05a756967f25-linux +// Flags: --ion-eager +// +eval("\ + \"use strict\";\ + a();\ + function a() {\ + print\ + }\ +") diff --git a/js/src/jit-test/tests/auto-regress/bug770713.js b/js/src/jit-test/tests/auto-regress/bug770713.js new file mode 100644 index 0000000000..cdaf5a02ae --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug770713.js @@ -0,0 +1,21 @@ +// Binary: cache/js-dbg-32-b39f4007be5a-linux +// Flags: -m -n -a +// + +gczeal(4); +var a = ['a','test string',456,9.34,new String("string object"),[],['h','i','j','k']]; +var b = [1,2,3,4,5,6,7,8,9,0]; +exhaustiveSliceTest("exhaustive slice test 1", a); +function mySlice(a, from, to) { + var returnArray = []; + try { } catch ( [ x ] ) { } finally { } + return returnArray; +} +function exhaustiveSliceTest(testname, a) { + var x = 0; + for (y = (2 + a.length); y >= -(2 + a.length); y--) { + var c = mySlice(a,x,y); + if (String(b) != String(c)) + " expected result: " + String(c) + "\n"; + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug771027.js b/js/src/jit-test/tests/auto-regress/bug771027.js new file mode 100644 index 0000000000..d9038ad85d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug771027.js @@ -0,0 +1,9 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-b6aa44d8f11f-linux +// Flags: +// + +Array.prototype.iterator = (function() { { while(0) { function Uint8ClampedArray() { } } } }); +var s = new Set(["testing", "testing", 123]); +assertEq(s.size(), 2); diff --git a/js/src/jit-test/tests/auto-regress/bug771157.js b/js/src/jit-test/tests/auto-regress/bug771157.js new file mode 100644 index 0000000000..af283fea1a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug771157.js @@ -0,0 +1,30 @@ +// Binary: cache/js-dbg-64-9cf3ea112635-linux +// Flags: --ion-eager +// + +var callStack = new Array(); +function TestCase(n, d, e, a) { + this.expect = e; + this.actual = a; + this.passed = getTestCaseResult(e, a); + dump(+ this.path + ' ' + 'reason: ' + toPrinted(this.reason)+ '\n'); +}; +function reportCompare (expected, actual, description) { + var testcase = new TestCase("unknown-test-name", description, expected, actual); +} +function enterFunc (funcName) { + callStack.push(funcName); + var lastFunc = callStack.pop(); + reportCompare(funcName, lastFunc, "Test driver failure wrong exit function "); +} +try { +var summary = 'String static methods'; +var actual = ''; +expect = '2'; +reportCompare(expect, actual, summary + " String.toUpperCase(new Boolean(true))"); +} catch(exc0) {} +try { +function TestCase(n, d, e, a) {} +enterFunc ('test'); +reportCompare(expect, actual, summary); +} catch(exc2) {} diff --git a/js/src/jit-test/tests/auto-regress/bug771946.js b/js/src/jit-test/tests/auto-regress/bug771946.js new file mode 100644 index 0000000000..3cfb590e14 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug771946.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-221f1a184f67-linux +// Flags: +// +new Date().setFullYear(Math.cos(1)) diff --git a/js/src/jit-test/tests/auto-regress/bug779390.js b/js/src/jit-test/tests/auto-regress/bug779390.js new file mode 100644 index 0000000000..9b85257224 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug779390.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-b46621aba6fd-linux +// Flags: --ion-eager +// + +function TestCase(n, d, e, a) { + this.passed = getTestCaseResult(e, a); +} +function getTestCaseResult(expected, actual) {} +try { +for (var i = 0; i < bomchars.length; i++) + try {} catch(ex) {} +} catch(exc0) {} +["a"].map(function(s) {gczeal(4);})[0] +new TestCase(); +new TestCase("", "", 5e-324, i); diff --git a/js/src/jit-test/tests/auto-regress/bug779818.js b/js/src/jit-test/tests/auto-regress/bug779818.js new file mode 100644 index 0000000000..717f91af33 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug779818.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-2169bca0c9a5-linux +// Flags: --ion-eager +// + +var SECTION = "lexical-015"; +(function() { + for (var a = 0; a < 9; a++) { + if (SECTION[a]) { + while (arguments[a]) break; + } + } +})() diff --git a/js/src/jit-test/tests/auto-regress/bug780003.js b/js/src/jit-test/tests/auto-regress/bug780003.js new file mode 100644 index 0000000000..414429ec09 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug780003.js @@ -0,0 +1,6 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-9f3dc298e25b-linux +// Flags: --ion-eager +// +for(a in b){} diff --git a/js/src/jit-test/tests/auto-regress/bug781364.js b/js/src/jit-test/tests/auto-regress/bug781364.js new file mode 100644 index 0000000000..99a944145c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug781364.js @@ -0,0 +1,34 @@ +// Binary: cache/js-dbg-64-21b4797e4cb3-linux +// Flags: -m -a --ion-eager +// +k = m +function h() { + switch (true) { + default: + x = newGlobal('') + } + return function(f, code) { + try { + evalcx(code, x) + } catch (e) {} + } +} +function m() { + f() +} +function g(code) { + f = new Function(code); + k(f, code) +} +g("k=h()") +g("\ + a='';\ + Object.defineProperty(this,\"b\",{get:function(){a=this.d()}});\ + Object.defineProperty(this,\"c\",{get:function(){b}});\ + d=2;\ + b\ +"); +g("b"); +g("b"); +g("for(v of c);"); +g("a=eval(\"function f(){}\");b") diff --git a/js/src/jit-test/tests/auto-regress/bug781855.js b/js/src/jit-test/tests/auto-regress/bug781855.js new file mode 100644 index 0000000000..d061f85209 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug781855.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-32-b5ae446888f5-linux +// Flags: -m -n -a +// + +var Constr = function( ... property) {}; +Constr.prototype = []; +var c = new Constr(); +c.push(5); +gc(); +function enterFunc() {} +evaluate('enterFunc (c.length);'); diff --git a/js/src/jit-test/tests/auto-regress/bug782083.js b/js/src/jit-test/tests/auto-regress/bug782083.js new file mode 100644 index 0000000000..b6cb9a4e7d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug782083.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-32-f1764bf06b29-linux +// Flags: --ion-eager +// + +gcPreserveCode(); +function r() {} +gczeal(2); +evaluate(""); +evaluate("\ +function randomFloat () {\ + if (r < 0.25)\ + fac = 10000000;\ +}\ +for (var i = 0; i < 2000; i++)\ + randomFloat();\ +"); diff --git a/js/src/jit-test/tests/auto-regress/bug782129.js b/js/src/jit-test/tests/auto-regress/bug782129.js new file mode 100644 index 0000000000..44a543cd95 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug782129.js @@ -0,0 +1,24 @@ +// Binary: cache/js-dbg-32-f1764bf06b29-linux +// Flags: --ion-eager +// + +var callStack = new Array(); +function enterFunc (funcName) { + funcName += "()"; + callStack.push(funcName); +} +function exitFunc (funcName) { + var lastFunc = callStack.pop(); + funcName += "()"; + if (lastFunc != funcName) + print(); +} +try { + test(); +} catch(exc1) {} +function test() { + enterFunc ('test'); + test(); +} +for (var l = 0; l < 50000; l++) + exitFunc ('test'); diff --git a/js/src/jit-test/tests/auto-regress/bug783421.js b/js/src/jit-test/tests/auto-regress/bug783421.js new file mode 100644 index 0000000000..920a78f978 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug783421.js @@ -0,0 +1,30 @@ +// Binary: cache/js-dbg-64-50e4ff05741e-linux +// Flags: -m -n -a +// +gc() +var p = n +function m() { + return function(f, code, t) { + try { + evalcx(code, newGlobal()) + } catch (e) {} + } +} +function n() { + f() +} +function h(code) { + f = Function(code) + p(f, code, true) +} +h("\ + p=m();\ + gcPreserveCode();\ + gcslice(8);\ +") +h("\"\"") +h("") +h("gc()") +h("") +h("") +h("gczeal(4,2)") diff --git a/js/src/jit-test/tests/auto-regress/bug785089.js b/js/src/jit-test/tests/auto-regress/bug785089.js new file mode 100644 index 0000000000..50e2bfcf54 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug785089.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-198ca6edd0ae-linux +// Flags: +// +odeURIL:(function(){}) diff --git a/js/src/jit-test/tests/auto-regress/bug785305.js b/js/src/jit-test/tests/auto-regress/bug785305.js new file mode 100644 index 0000000000..4beba0d989 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug785305.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-29ca472bf2d2-linux +// Flags: +// +Reflect.parse("\ + function l(x = (function() {})) {\ + function x() {}\ + }\ +") diff --git a/js/src/jit-test/tests/auto-regress/bug785576.js b/js/src/jit-test/tests/auto-regress/bug785576.js new file mode 100644 index 0000000000..ffd0563a1b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug785576.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-29ca472bf2d2-linux +// Flags: -m -n -a +// +sandbox = newGlobal('') +evalcx("x=[]", sandbox) +evalcx("\ + x[0] = this;\ + Object.defineProperty(x, 0, {})\ +", sandbox) +gc() +evalcx("x.shift()", sandbox) diff --git a/js/src/jit-test/tests/auto-regress/bug785776.js b/js/src/jit-test/tests/auto-regress/bug785776.js new file mode 100644 index 0000000000..2bab1bfd52 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug785776.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-e08a67884b9b-linux +// Flags: -m -n -a +// +load(libdir + 'asserts.js'); +// has no @@iterator property +assertThrowsInstanceOf(() => {function f([x]){}f(DataView.prototype)}, TypeError); diff --git a/js/src/jit-test/tests/auto-regress/bug790921.js b/js/src/jit-test/tests/auto-regress/bug790921.js new file mode 100644 index 0000000000..afe8803f07 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug790921.js @@ -0,0 +1,14 @@ +// |jit-test| slow; allow-unhandlable-oom +// Binary: cache/js-dbg-64-fdfaef738a00-linux +// Flags: --ion-eager +// + +evaluate("\ +gcparam(\"maxBytes\", gcparam(\"gcBytes\") + 4 );\n\ +test();\n\ +function test() {\n\ + function flatten(arr)\n\ + { return actual = flatten([1, [2], 3]); }\ +}\n\ +"); +try {} catch (lfVare) {} diff --git a/js/src/jit-test/tests/auto-regress/bug795937.js b/js/src/jit-test/tests/auto-regress/bug795937.js new file mode 100644 index 0000000000..b681d15ff7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug795937.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-895f66c4eada-linux +// Flags: +// + +var g = newGlobal(); +new Proxy(g, {}); diff --git a/js/src/jit-test/tests/auto-regress/bug797493.js b/js/src/jit-test/tests/auto-regress/bug797493.js new file mode 100644 index 0000000000..880495437a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug797493.js @@ -0,0 +1,15 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-13fd49ef7786-linux +// Flags: +// + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function handleDebugger(frame) { + frame.onPop = function handlePop(c) { + poppedFrames.indexOf(this) + } +}; +g.eval("function* g() { for (var i = 0; i < 10; i++) { debugger; yield i; } }"); +assertEq(g.eval("var t = 0; for (j of g()) t += j; t;"), 45); diff --git a/js/src/jit-test/tests/auto-regress/bug800878.js b/js/src/jit-test/tests/auto-regress/bug800878.js new file mode 100644 index 0000000000..ce6aabd586 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug800878.js @@ -0,0 +1,13 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-32-1301a72b1c39-linux +// Flags: --ion-eager +// + +load(libdir + "evalInFrame.js"); + +[1,2,3,4,(':'),6,7,8].forEach( + function(x) { + assertEq(evalInFrame(0, ('^')), x); + } +); diff --git a/js/src/jit-test/tests/auto-regress/bug812235.js b/js/src/jit-test/tests/auto-regress/bug812235.js new file mode 100644 index 0000000000..ab5d4dd563 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug812235.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-64-a37525d304d9-linux +// Flags: --ion-eager +// +gc() +schedulezone(this) +gcslice(3) +function f() { + this["x"] = this["x"] = {} +} +new f() diff --git a/js/src/jit-test/tests/auto-regress/bug813029.js b/js/src/jit-test/tests/auto-regress/bug813029.js new file mode 100644 index 0000000000..4f78376aec --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug813029.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-4fddb9923ef0-linux +// Flags: --ion-eager +// + +function printBugNumber (num) { + BUGNUMBER = num; +} +gcslice(1) +schedulezone(this); +gcslice(2); +var BUGNUMBER = ("one"); +printBugNumber(); diff --git a/js/src/jit-test/tests/auto-regress/bug829795.js b/js/src/jit-test/tests/auto-regress/bug829795.js new file mode 100644 index 0000000000..ecbd564498 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug829795.js @@ -0,0 +1,10 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-44dcffe8792b-linux +// Flags: -a +// +try { + x = []; + Array.prototype.forEach() +} catch (e) {} +x.forEach() diff --git a/js/src/jit-test/tests/auto-regress/bug829813.js b/js/src/jit-test/tests/auto-regress/bug829813.js new file mode 100644 index 0000000000..18a5d21d80 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug829813.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-44dcffe8792b-linux +// Flags: +// +for (x in [0]) { + (function() { + return Object.propertyIsEnumerable + })().call([0], x) +} diff --git a/js/src/jit-test/tests/auto-regress/bug909441.js b/js/src/jit-test/tests/auto-regress/bug909441.js new file mode 100644 index 0000000000..fc6ba5ba56 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug909441.js @@ -0,0 +1,19 @@ +// |jit-test| error: too much recursion +function f(code) { + try { + g = Function(code) + } catch (e) {} + g() +} +f("\ + Object.defineProperty(this,\"x\",{\ + get: function(){\ + evaluate(\"Array(x)\",{\ + catchTermination:(function(){})\ + })\ + }\ + })\ +"); +f("x"); +f(")"); +f("x"); diff --git a/js/src/jit-test/tests/auto-regress/bug912379.js b/js/src/jit-test/tests/auto-regress/bug912379.js new file mode 100644 index 0000000000..fd0ae9b332 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug912379.js @@ -0,0 +1,12 @@ +s = newGlobal(); +evalcx("\ + try { \ + throw StopIteration;\ + } catch(a) {\ + x = a;\ + } \ + new Proxy(x, {});\ +", s); +evalcx("\ + n = x;\ +", s); diff --git a/js/src/jit-test/tests/auto-regress/class-method-async.js b/js/src/jit-test/tests/auto-regress/class-method-async.js new file mode 100644 index 0000000000..e8cce25874 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/class-method-async.js @@ -0,0 +1,5 @@ +class X { + async ["foo"]() { + return eval(); + } +} diff --git a/js/src/jit-test/tests/auto-regress/for-of-iterator-close-debugger.js b/js/src/jit-test/tests/auto-regress/for-of-iterator-close-debugger.js new file mode 100644 index 0000000000..c1daeff77d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/for-of-iterator-close-debugger.js @@ -0,0 +1,15 @@ +// |jit-test| error:ReferenceError + +// for-of should close iterator even if the exception is once caught by the +// debugger. + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () { };"); +// jsfunfuzz-generated +for (var x of []) {}; +for (var l of [0]) { + for (var y = 0; y < 1; y++) { + g2; + } +} diff --git a/js/src/jit-test/tests/backup-point-bug1315634.js b/js/src/jit-test/tests/backup-point-bug1315634.js new file mode 100644 index 0000000000..337bd5b40c --- /dev/null +++ b/js/src/jit-test/tests/backup-point-bug1315634.js @@ -0,0 +1,29 @@ +setJitCompilerOption('ion.forceinlineCaches', 1); +function g(f, x) { + for (var j = 0; j < 3; ++j) + for (var k = 0; k < 21; ++k) + try { + f(x[k]); + } catch (e) {} +} +a0 = y = []; +function f2() { + f1() +}; +function f1() { + switch (abs(abs(3187503207)(134217728) | 0) | 0) { + case -2: + this.y.splice(NaN, 2, x({}) = 4277) + } + return + 4006901336 | 0 +} +g(f1, []); +g(f2, []); +f1 = (function() { + function f() { + a0.splice(NaN, 0); + } + return f; +})(); +g(f2, []); diff --git a/js/src/jit-test/tests/baseline/accessor-ic-shape-replacement.js b/js/src/jit-test/tests/baseline/accessor-ic-shape-replacement.js new file mode 100644 index 0000000000..7ddf007858 --- /dev/null +++ b/js/src/jit-test/tests/baseline/accessor-ic-shape-replacement.js @@ -0,0 +1,55 @@ +// Make sure we properly update the getter when we update the holder +// shape in the getter IC. +function f(obj) { + var x; + for (var i = 0; i < 20; ++i) { + x = obj.foo; + } + return x; +} + +var proto = {}; +var obj1 = Object.create(proto); +var obj2 = Object.create(proto); +obj2.bar = "5"; +Object.defineProperty(proto, "foo", + { get: function() { return 1; }, configurable: true }); +assertEq(f(obj1), 1); +assertEq(f(obj2), 1); + +Object.defineProperty(proto, "foo", + { get: function() { return 2; }, configurable: true }); +assertEq(f(obj1), 2); +assertEq(f(obj2), 2); + +// Make sure we properly update the setter when we update the holder +// shape in the setter IC. +function g(obj) { + var x; + for (var i = 0; i < 20; ++i) { + obj.foo = i; + } + return x; +} + +var proto = {}; +var obj1 = Object.create(proto); +var obj2 = Object.create(proto); +var sideEffect; +obj2.bar = "5"; +Object.defineProperty(proto, "foo", + { set: function() { sideEffect = 1; }, configurable: true }); +g(obj1); +assertEq(sideEffect, 1); +sideEffect = undefined; +g(obj2); +assertEq(sideEffect, 1); +sideEffect = undefined; + +Object.defineProperty(proto, "foo", + { set: function() { sideEffect = 2; }, configurable: true }); +g(obj1); +assertEq(sideEffect, 2); +sideEffect = undefined; +g(obj2); +assertEq(sideEffect, 2); diff --git a/js/src/jit-test/tests/baseline/arraySubclassPropertyLookup.js b/js/src/jit-test/tests/baseline/arraySubclassPropertyLookup.js new file mode 100644 index 0000000000..62b339f54f --- /dev/null +++ b/js/src/jit-test/tests/baseline/arraySubclassPropertyLookup.js @@ -0,0 +1,17 @@ +function f(v, expected) { + assertEq(v.prop, expected); +}; + +class SubArrayA extends Array { +} +class SubArrayB extends Array { +} +SubArrayA.prototype.prop = "A"; +SubArrayB.prototype.prop = "B"; + +var a = new SubArrayA(); +var b = new SubArrayB(); +for (let i = 0; i < 10; i++) { + f(a, "A"); + f(b, "B"); +} diff --git a/js/src/jit-test/tests/baseline/bug1024444.js b/js/src/jit-test/tests/baseline/bug1024444.js new file mode 100644 index 0000000000..7ebd93dcdc --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1024444.js @@ -0,0 +1,7 @@ +function f(x) { + x = eval("a = arguments.callee.arguments; 10"); +} +for (var i=0; i<5; i++) { + f(5); + assertEq(a[0], 10); +} diff --git a/js/src/jit-test/tests/baseline/bug1054330.js b/js/src/jit-test/tests/baseline/bug1054330.js new file mode 100644 index 0000000000..eddc6e9adf --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1054330.js @@ -0,0 +1,50 @@ +function testSplit1() { + function split(s, sep) { + return s.split(sep); + } + for (var i=0; i<10; i++) { + var arr = split("a,,b", ","); + assertEq(arr.length, 3); + assertEq(arr[0], "a"); + assertEq(arr[1], ""); + assertEq(arr[2], "b"); + } + + // Now pass a different separator to the stub. + var arr = split("a,,b.c", "."); + assertEq(arr.length, 2); + assertEq(arr[0], "a,,b"); + assertEq(arr[1], "c"); +} + +function testSplit2() { + function split(s, sep) { + return s.split(sep); + } + for (var i=0; i<10; i++) { + var arr = split("0101", 0); + assertEq(arr.length, 3); + assertEq(arr[0], ""); + assertEq(arr[1], "1"); + assertEq(arr[2], "1"); + } + + // Now pass a different separator to the stub. + var arr = split("0101", 1); + assertEq(arr.length, 3); + assertEq(arr[0], "0"); + assertEq(arr[1], "0"); + assertEq(arr[2], ""); +} + +function testSplit3() { + for (var i=0; i<100; i++) { + var arr = "a|b|c".split("|"); + arr.push("d"); + assertEq(arr.length, 4); + } +} + +testSplit1(); +testSplit2(); +testSplit3(); diff --git a/js/src/jit-test/tests/baseline/bug1063878.js b/js/src/jit-test/tests/baseline/bug1063878.js new file mode 100644 index 0000000000..1a569ec2fe --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1063878.js @@ -0,0 +1,24 @@ +function getx() { + return x; +} +function gety() { + return y; +} +function getz() { + return z; +} + +function main() { + var proto = Object.getPrototypeOf(this); + Object.defineProperty(proto, "x", { value: 5}); + // not-scripted getter + Object.defineProperty(proto, "y", { get: String }); + // scripted getter + Object.defineProperty(proto, "z", { get: function () { return 7;} }); + for (var i=0; i<20; i++) { + assertEq(getx(), 5); + assertEq(gety(), ""); + assertEq(getz(), 7); + } +} +main(); diff --git a/js/src/jit-test/tests/baseline/bug1095870.js b/js/src/jit-test/tests/baseline/bug1095870.js new file mode 100644 index 0000000000..97a93bda1c --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1095870.js @@ -0,0 +1,4 @@ +// |jit-test| --ion-eager; +for (var j = 0; j < 2; j++) { + (false).__proto__ = 0 +} diff --git a/js/src/jit-test/tests/baseline/bug1182866.js b/js/src/jit-test/tests/baseline/bug1182866.js new file mode 100644 index 0000000000..7628367c7e --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1182866.js @@ -0,0 +1,18 @@ +// |jit-test| error: ReferenceError + +with(7) { + function f() { + if (i == 15) { + g(); + } + const x = 42; + function g() { + eval(""); + return x; + } + return g; + } +} +for (var i = 0; i < 99; i++) { + assertEq(f()(), 42); +} diff --git a/js/src/jit-test/tests/baseline/bug1209585.js b/js/src/jit-test/tests/baseline/bug1209585.js new file mode 100644 index 0000000000..6873fe37d5 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1209585.js @@ -0,0 +1,38 @@ +// |jit-test| skip-if: helperThreadCount() === 0 || !('oomAtAllocation' in this) + +if ("gczeal" in this) + gczeal(0); + +eval("g=function() {}") +var lfGlobal = newGlobal(); +for (lfLocal in this) { + if (!(lfLocal in lfGlobal)) { + lfGlobal[lfLocal] = this[lfLocal]; + } +} +lfGlobal.offThreadCompileToStencil(` +if (!("oomAtAllocation" in this && "resetOOMFailure" in this)) + gczeal(0); +function oomTest(f) { + var i = 1; + do { + try { + oomAtAllocation(i); + f(); + more = resetOOMFailure(); + } catch (e) { + more = resetOOMFailure(); + } + i++; + } while(more); +} +var g = newGlobal(); +oomTest(function() { new revocable(); }); +`); +try { + var stencil = lfGlobal.finishOffThreadStencil(); + lfGlobal.evalStencil(stencil); +} catch(e) { + // This can happen if we OOM while bailing out in Ion. + assertEq(e, "out of memory"); +} diff --git a/js/src/jit-test/tests/baseline/bug1216140.js b/js/src/jit-test/tests/baseline/bug1216140.js new file mode 100644 index 0000000000..9aede5c026 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1216140.js @@ -0,0 +1,6 @@ +function newFunc(x) { return Function(x)(); } +newFunc(` + var BUGNUMBER = 8[ anonymous = true ]--; + () => BUGNUMBER; +`); + diff --git a/js/src/jit-test/tests/baseline/bug1238815.js b/js/src/jit-test/tests/baseline/bug1238815.js new file mode 100644 index 0000000000..3d4ee3faeb --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1238815.js @@ -0,0 +1,15 @@ +// This program crashes the ARM code generator because the machine code is +// longer than the 32MB range of ARM branch instructions. +// +// Baseline should not attempt to compile the script. + +i = 1; +function test(s) { + return eval("line0 = Error.lineNumber\ndebugger\n" + s); +} +function repeat(s) { + return Array(65 << 13).join(s) +} +long_expr = repeat(" + i") +long_throw_stmt = long_expr; +test(long_throw_stmt); diff --git a/js/src/jit-test/tests/baseline/bug1258301.js b/js/src/jit-test/tests/baseline/bug1258301.js new file mode 100644 index 0000000000..ce510a0e0b --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1258301.js @@ -0,0 +1,5 @@ +x = new WeakMap; +x.__proto__ = null; +for (var i = 0; i < 3; i++) + x.someprop; +gc(); diff --git a/js/src/jit-test/tests/baseline/bug1344334.js b/js/src/jit-test/tests/baseline/bug1344334.js new file mode 100644 index 0000000000..8245148833 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1344334.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function f(s) { + s + "x"; + s.indexOf("y") === 0; + oomTest(new Function(s)); +} +var s = ` + class TestClass { constructor() {} } + for (var fun of hasPrototype) {} +`; +if (s.length) + f(s); diff --git a/js/src/jit-test/tests/baseline/bug1349298.js b/js/src/jit-test/tests/baseline/bug1349298.js new file mode 100644 index 0000000000..826b60f813 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1349298.js @@ -0,0 +1,2 @@ +for (var i=0; i<40; i++) + assertEq(typeof createIsHTMLDDA(), "undefined"); diff --git a/js/src/jit-test/tests/baseline/bug1368626.js b/js/src/jit-test/tests/baseline/bug1368626.js new file mode 100644 index 0000000000..637c98efbb --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1368626.js @@ -0,0 +1,19 @@ +var sandbox = evalcx("lazy"); + +// Ensure we can't change the "lazy" property of the sandbox to an accessor, +// because that'd allow to execute arbitrary side-effects when calling the +// resolve hook of the sandbox. +var err; +try { + Object.defineProperty(sandbox, "lazy", { + get() { + Object.defineProperty(sandbox, "foo", { value: 0 }); + } + }); +} catch (e) { + err = e; +} +assertEq(err instanceof TypeError, true); + +// Don't assert here. +sandbox.foo = 1; diff --git a/js/src/jit-test/tests/baseline/bug1416727.js b/js/src/jit-test/tests/baseline/bug1416727.js new file mode 100644 index 0000000000..a407da740d --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1416727.js @@ -0,0 +1,20 @@ +// |jit-test| allow-overrecursed +g = newGlobal({newCompartment: true}) +g.parent = this +g.eval("new Debugger(parent).onExceptionUnwind = function(){}"); +var depth = 0; +function test() { + if (++depth > 50) + return; + function f(n) { + if (n != 0) { + f(n - 1); + return; + } + try { + test(); + } finally {} + } + f(80); +} +test(); diff --git a/js/src/jit-test/tests/baseline/bug1463375.js b/js/src/jit-test/tests/baseline/bug1463375.js new file mode 100644 index 0000000000..8b9030b7fc --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1463375.js @@ -0,0 +1,5 @@ +// |jit-test| allow-overrecursed +function f() { + f.apply(null, new Array(20000)); +} +f() diff --git a/js/src/jit-test/tests/baseline/bug1491337.js b/js/src/jit-test/tests/baseline/bug1491337.js new file mode 100644 index 0000000000..107507155f --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1491337.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(new Function(` + let kJSEmbeddingMaxTypes = 1000000; + let kJSEmbeddingMaxFunctions = 1000000; + let kJSEmbeddingMaxImports = 100000; + const known_failures = {}; + function test(func, description) { + known_failures[description] + } + function testLimit(name, min, limit, gen) { + test(() => {}, \`Validate \${name} mininum\`); + test(() => {}, \`Async compile \${name} over limit\`); + } + testLimit("types", 1, kJSEmbeddingMaxTypes, (builder, count) => {}); + testLimit("functions", 1, kJSEmbeddingMaxFunctions, (builder, count) => {}); + testLimit("imports", 1, kJSEmbeddingMaxImports, (builder, count) => {}); +`)); diff --git a/js/src/jit-test/tests/baseline/bug1491350.js b/js/src/jit-test/tests/baseline/bug1491350.js new file mode 100644 index 0000000000..697a39c50c --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1491350.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(new Function(` + var a = ['p', 'q', 'r', 's', 't']; + var o = {p:1, q:2, r:3, s:4, t:5}; + for (var i in o) + delete o[i]; + for (var i of a) + o.hasOwnProperty(undefined + this, false); +`)); diff --git a/js/src/jit-test/tests/baseline/bug1602390.js b/js/src/jit-test/tests/baseline/bug1602390.js new file mode 100644 index 0000000000..365c13955a --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1602390.js @@ -0,0 +1,7 @@ +// |jit-test| --ion-osr=off; error:InternalError +function f() { + while (true) { + var r = f(); + } +} +f(); diff --git a/js/src/jit-test/tests/baseline/bug1660465.js b/js/src/jit-test/tests/baseline/bug1660465.js new file mode 100644 index 0000000000..75d203b09a --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug1660465.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +var src = "function foo() {}" +src += "foo("; +for (var i = 0; i < 50000; i++) { + src += i + ","; +} +src += "1);\n" + +evalInWorker(src); diff --git a/js/src/jit-test/tests/baseline/bug836742.js b/js/src/jit-test/tests/baseline/bug836742.js new file mode 100644 index 0000000000..b8e3761c12 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug836742.js @@ -0,0 +1,33 @@ +// Ensure the correct frame is passed to exception unwind hooks. +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.eval("(" + function () { + frames = []; + var dbg = Debugger(debuggeeGlobal); + dbg.onEnterFrame = function(frame) { + frames.push(frame); + }; + dbg.onExceptionUnwind = function(frame) { + assertEq(frames.indexOf(frame), frames.length - 1); + frames.pop(); + assertEq(frame, dbg.getNewestFrame()); + } +} + ")()"); + +function f(n) { + debugger; + n--; + if (n > 0) { + f(n); + } else { + assertEq(g.frames.length, 10); + throw "fit"; + } +} +try { + f(10); + assertEq(0, 1); +} catch (e) { + assertEq(e, "fit"); +} +assertEq(g.frames.length, 0); diff --git a/js/src/jit-test/tests/baseline/bug840984.js b/js/src/jit-test/tests/baseline/bug840984.js new file mode 100644 index 0000000000..410c3a8a4d --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug840984.js @@ -0,0 +1,17 @@ +function foo() { + x = null; +} +function f() { + for (var i=0; i<99; i++) { + x = null; + if (i >= 97) { + gc(); + gc(); + foo(); + } + x = {}; + if (i >= 97) + foo(); + } +} +f(); diff --git a/js/src/jit-test/tests/baseline/bug841718.js b/js/src/jit-test/tests/baseline/bug841718.js new file mode 100644 index 0000000000..d8abc66fed --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug841718.js @@ -0,0 +1,17 @@ +// Don't assert in the decompiler. +function f() { + var o = null; + + try { + delete o.prop; + } catch(e) {} + + try { + delete o[1]; + } catch(e) {} + + try { + o[{}]++; + } catch(e) {} +} +f(); diff --git a/js/src/jit-test/tests/baseline/bug842313.js b/js/src/jit-test/tests/baseline/bug842313.js new file mode 100644 index 0000000000..251d86f9fa --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug842313.js @@ -0,0 +1,7 @@ +function concat(v, index, array) {} +var strings = ['hello', 'Array', 'WORLD']; +try { + strings.forEach(); +} catch(e) { + strings.forEach(concat); +} diff --git a/js/src/jit-test/tests/baseline/bug842316.js b/js/src/jit-test/tests/baseline/bug842316.js new file mode 100644 index 0000000000..028f5ead71 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug842316.js @@ -0,0 +1,9 @@ +DoWhile( new DoWhileObject( false, true, true, true ) ); +function DoWhileObject( out1, out2, out3, in1 ) {} +function DoWhile( object ) { + if ( object.breakOutOne ) {} + innie: + do { + if ( object.breakOutThree ) {} + } while ( false ); +} diff --git a/js/src/jit-test/tests/baseline/bug842317.js b/js/src/jit-test/tests/baseline/bug842317.js new file mode 100644 index 0000000000..2092664297 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug842317.js @@ -0,0 +1,12 @@ +gczeal(2); +function A(a) { this.a = a; } +function B(b) { this.b = b; } +function C(c) { this.c = c; } +function makeArray(n) { + var classes = [A, B, C]; + var arr = []; + for (var i = 0; i < n; i++) { + arr.push(new classes[i % 3](i % 3)); + } +} +var arr = makeArray(30000); diff --git a/js/src/jit-test/tests/baseline/bug842429.js b/js/src/jit-test/tests/baseline/bug842429.js new file mode 100644 index 0000000000..50434c42a2 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug842429.js @@ -0,0 +1,11 @@ +function* gen() { + try { + yield 3; + } finally { + quit(); + } +} +try { + for (var i of gen()) + foo(); +} catch (e) {} diff --git a/js/src/jit-test/tests/baseline/bug842430.js b/js/src/jit-test/tests/baseline/bug842430.js new file mode 100644 index 0000000000..6d3aa5ffd0 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug842430.js @@ -0,0 +1,5 @@ +test(); +function test() { + ({}).abstract; +} +test(); diff --git a/js/src/jit-test/tests/baseline/bug842431-1.js b/js/src/jit-test/tests/baseline/bug842431-1.js new file mode 100644 index 0000000000..2c17b9b060 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug842431-1.js @@ -0,0 +1,14 @@ +// |jit-test| error:123 +var g = newGlobal({newCompartment: true}); +g.eval('function f() { var y; debugger; }'); + +var dbg = new Debugger(g); + +dbg.onDebuggerStatement = function handleDebugger(frame) { + frame.onPop = function(c) { + this.eval('y = 33'); + return {throw: 123}; + } +}; + +g.f(); diff --git a/js/src/jit-test/tests/baseline/bug842431-2.js b/js/src/jit-test/tests/baseline/bug842431-2.js new file mode 100644 index 0000000000..ddfed1b749 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug842431-2.js @@ -0,0 +1,25 @@ +// |jit-test| + +// If a frame's onPop handler throws, we should not call the +// onExceptionUnwind hook for that frame. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval('function f() { var y; debugger; }'); + +dbg.onExceptionUnwind = function() { + assertEq(0, 1); +}; + +dbg.onDebuggerStatement = function handleDebugger(frame) { + frame.onPop = function(c) { + return {throw: 555}; + } +}; + +try { + g.f(); + assertEq(0, 2); +} catch(e) { + assertEq(e.toString().includes("555"), true); +} diff --git a/js/src/jit-test/tests/baseline/bug842431-3.js b/js/src/jit-test/tests/baseline/bug842431-3.js new file mode 100644 index 0000000000..fedd151a13 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug842431-3.js @@ -0,0 +1,24 @@ +// |jit-test| + +// If an exception unwind hook performs a forced return, and this calls an +// onPop handler that throws, the exception should not be handled in the +// current frame but propagated to the caller. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval('function f() { try { var y; throw 123; } catch(e) { assertEq(0, 1); } }'); + +dbg.onExceptionUnwind = function(frame) { + frame.onPop = function() { + return {throw: 321}; + } + + return {return: 11}; +}; + +try { + g.f(); + assertEq(0, 1); +} catch(e) { + assertEq(e.toString().includes("321"), true); +} diff --git a/js/src/jit-test/tests/baseline/bug842432.js b/js/src/jit-test/tests/baseline/bug842432.js new file mode 100644 index 0000000000..f23198fafd --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug842432.js @@ -0,0 +1,13 @@ +// |jit-test| error: fff is not +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval('function f(n) { if (n > 0) f(n-1); }'); + +dbg.onEnterFrame = function(frame) { + frame.onPop = function() { + fff(); + }; +}; + +g.f(5); diff --git a/js/src/jit-test/tests/baseline/bug843429.js b/js/src/jit-test/tests/baseline/bug843429.js new file mode 100644 index 0000000000..e161714a02 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug843429.js @@ -0,0 +1,6 @@ +(function () { + const x = [] = []; + (function () { + String(x); + })(); +})(); diff --git a/js/src/jit-test/tests/baseline/bug843886.js b/js/src/jit-test/tests/baseline/bug843886.js new file mode 100644 index 0000000000..ffe627c397 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug843886.js @@ -0,0 +1,3 @@ +// |jit-test| error: TypeError +__proto__["__noSuchMethod__"] = __proto__; +''.t(); diff --git a/js/src/jit-test/tests/baseline/bug844383.js b/js/src/jit-test/tests/baseline/bug844383.js new file mode 100644 index 0000000000..9adb6a33a0 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug844383.js @@ -0,0 +1,22 @@ +s = newGlobal() +try { + evalcx("\ + function g() {\ + h()\ + }\ + for (p in this) {\ + function h(h) {\ + ''instanceof 5\ + }\ + }\ + h.valueOf=g;\ + h==9\ + ", s) +} catch (e) {} +try { + evalcx("throw h", s) +} catch (e) { + try { + "" + e + } catch(e) {} +} diff --git a/js/src/jit-test/tests/baseline/bug844467.js b/js/src/jit-test/tests/baseline/bug844467.js new file mode 100644 index 0000000000..b4ab4a8835 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug844467.js @@ -0,0 +1,9 @@ +function test() { + var f; + function gen() { + f = function(){} + } + for (var i in gen()) {} + arguments[arguments.length - 1]; +} +test(); diff --git a/js/src/jit-test/tests/baseline/bug844470.js b/js/src/jit-test/tests/baseline/bug844470.js new file mode 100644 index 0000000000..60ff939a4d --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug844470.js @@ -0,0 +1,9 @@ +// |jit-test| --blinterp-eager +// See bug 1702259 for rationale for the above jit-test line. +function f() { + var s=''; + for (var i=0; i < 20000; i++) + s += 'x' + i + '=' + i + ';\n'; + return s; +} +eval(f()); diff --git a/js/src/jit-test/tests/baseline/bug844828.js b/js/src/jit-test/tests/baseline/bug844828.js new file mode 100644 index 0000000000..a9f3234533 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug844828.js @@ -0,0 +1,9 @@ +gczeal(2); +eval("\ +for (var z = 0; z < 50; z++) {\ + try { (function() {\ + h\ + })()\ + } catch(e) {}\ +}\ +"); diff --git a/js/src/jit-test/tests/baseline/bug845331.js b/js/src/jit-test/tests/baseline/bug845331.js new file mode 100644 index 0000000000..fd5182a988 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug845331.js @@ -0,0 +1,9 @@ +function TestCase(n, d, e, a) {}; +function reportCompare (expected, actual) { + var testcase = new TestCase("unknown-test-name", null, expected, actual); +} +reportCompare(); +var b = eval(String((TestCase))); +reportCompare(true, true); +expect = actual = '' +reportCompare(expect, actual); diff --git a/js/src/jit-test/tests/baseline/bug847410.js b/js/src/jit-test/tests/baseline/bug847410.js new file mode 100644 index 0000000000..052f218e03 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug847410.js @@ -0,0 +1,5 @@ +function h(code) { + f = eval("(function(){" + code + "})") +} +h("") +h("debugger;") diff --git a/js/src/jit-test/tests/baseline/bug847425.js b/js/src/jit-test/tests/baseline/bug847425.js new file mode 100644 index 0000000000..c746247c49 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug847425.js @@ -0,0 +1,16 @@ +// |jit-test| allow-oom; allow-unhandlable-oom; skip-if: getBuildConfiguration("android") +// Disabled on Android due to harness problems (Bug 1532654) + +gcparam("maxBytes", gcparam("gcBytes") + 4*1024); +var max = 400; +function f(b) { + if (b) { + f(b - 1); + } else { + g = { + apply:function(x,y) { } + }; + } + g.apply(null, arguments); +} +f(max - 1); diff --git a/js/src/jit-test/tests/baseline/bug847446.js b/js/src/jit-test/tests/baseline/bug847446.js new file mode 100644 index 0000000000..c54a375363 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug847446.js @@ -0,0 +1,22 @@ +// |jit-test| error: ReferenceError +var k = 0; +function test() { + function* gen() { + try { + try { + yield 1; + } finally { + if (k++ < 60) + actual += "Inner finally"; + } + } finally { } + } + try { + var g = gen(); + assertEq(g.next().value, 1); + g.next(); + } catch (e) { + throw e; + } +} +test(); diff --git a/js/src/jit-test/tests/baseline/bug847484.js b/js/src/jit-test/tests/baseline/bug847484.js new file mode 100644 index 0000000000..7e271c34bd --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug847484.js @@ -0,0 +1,14 @@ +function TestCase(n, d) {} +function reportCompare() { + new TestCase; +} +Object.defineProperty(Object.prototype, "name", {}); +reportCompare(); +try { + function TestCase( n, d ) { + this.name = n; + this.description = d; + } + reportCompare(); + reportCompare(); +} catch(exc3) { assertEq(0, 1); } diff --git a/js/src/jit-test/tests/baseline/bug847678.js b/js/src/jit-test/tests/baseline/bug847678.js new file mode 100644 index 0000000000..80ecebfdf0 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug847678.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError +s = newGlobal(); +function g(c) { + evalcx(c, s) +} +g("[eval]=(function(){})") +g("while(eval());") diff --git a/js/src/jit-test/tests/baseline/bug848743-1.js b/js/src/jit-test/tests/baseline/bug848743-1.js new file mode 100644 index 0000000000..08bf75fc9e --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug848743-1.js @@ -0,0 +1,42 @@ +function A() {}; +A.prototype = []; + +function B() {}; +B.prototype = new A(); + +function C() {}; +C.prototype = new B(); + +function D() {}; +D.prototype = new C(); + +function E() {}; +E.prototype = new D(); + +function f() { + var o = new B(); + for (var i=0; i<10; i++) + o[i] = i; + + var expected = '{"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9}'; + assertEq(JSON.stringify(o), expected); + + var o = new A(); + for (var i=0; i<10; i++) + o[i] = i; + + assertEq(JSON.stringify(o), expected); + + var o = new D(); + for (var i=0; i<10; i++) + o[i] = i; + + assertEq(JSON.stringify(o), expected); + + var o = new E(); + for (var i=0; i<10; i++) + o[i] = i; + + assertEq(JSON.stringify(o), expected); +} +f(); diff --git a/js/src/jit-test/tests/baseline/bug848743-2.js b/js/src/jit-test/tests/baseline/bug848743-2.js new file mode 100644 index 0000000000..b985c6068e --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug848743-2.js @@ -0,0 +1,14 @@ +var gTestcases = new Array(); +var gTc = gTestcases.length; +var setterCalled = false; +function TestCase() { + gTestcases[gTc++] = this; +} +for(var i = 0; i < 13; ++i) { + var testcase = new TestCase(); +} +Array.prototype.__defineSetter__(32, function() { setterCalled = true; }); +for(var i = 0; i < 20; ++i) { + var testcase = new TestCase(); +} +assertEq(setterCalled, true); diff --git a/js/src/jit-test/tests/baseline/bug852175.js b/js/src/jit-test/tests/baseline/bug852175.js new file mode 100644 index 0000000000..ccfc0680d9 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug852175.js @@ -0,0 +1,5 @@ +// |jit-test| error: InternalError +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +g.eval("function f(n) { if (n == 0) debugger; else f(n - 1); }"); +g.f("function f() { debugger; }"); diff --git a/js/src/jit-test/tests/baseline/bug852801.js b/js/src/jit-test/tests/baseline/bug852801.js new file mode 100644 index 0000000000..771c4f55bd --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug852801.js @@ -0,0 +1,106 @@ +// |jit-test| allow-oom; allow-unhandlable-oom +var STATUS = "STATUS: "; +var callStack = new Array(); +function startTest() { } +function TestCase(n, d, e, a) { + this.name = n; +} +TestCase.prototype.dump = function () {}; +TestCase.prototype.testPassed = (function TestCase_testPassed() { return this.passed; }); +TestCase.prototype.testFailed = (function TestCase_testFailed() { return !this.passed; }); +function printStatus (msg) { + var lines = msg.split ("\n"); + for (var i=0; iisInterpretedConstructor(). +[0].some(Function.prototype) +function f() { + new Function.prototype +} +function g() { + var count = 0; + for (var i=0; i<3; i++) { + try { + f(); + } catch (e) { + assertEq(e.message.includes("is not a constructor"), true); + count++; + } + } + assertEq(count, 3); +} +g(); diff --git a/js/src/jit-test/tests/baseline/bug892787-2.js b/js/src/jit-test/tests/baseline/bug892787-2.js new file mode 100644 index 0000000000..51381684f5 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug892787-2.js @@ -0,0 +1,36 @@ +// Constructing calls should throw if !callee->isInterpretedConstructor(). +// This tests the polymorphic call path. + +for (var i=0; i<20; i++) + Function.prototype(); + +var funs = [ + function() { return 1; }, + function() { return 2; }, + function() { return 3; }, + function() { return 4; }, + function() { return 5; }, + function() { return 6; }, + function() { return 7; }, + function() { return 8; }, + function() { return 9; }, + function() { return 10; }, + Function.prototype +]; + +function f(callee) { + new callee; +} +function g() { + var c = 0; + for (var i=0; i<50; i++) { + try { + f(funs[i % funs.length]); + } catch (e) { + assertEq(e.message.includes("not a constructor"), true); + c++; + } + } + assertEq(c, 4); +} +g(); diff --git a/js/src/jit-test/tests/baseline/bug916039.js b/js/src/jit-test/tests/baseline/bug916039.js new file mode 100644 index 0000000000..f35d31ceb0 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug916039.js @@ -0,0 +1,4 @@ +(function() { + "use strict"; + assertEq(eval("this"), undefined); +})(); diff --git a/js/src/jit-test/tests/baseline/bug934427.js b/js/src/jit-test/tests/baseline/bug934427.js new file mode 100644 index 0000000000..0be2118b72 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug934427.js @@ -0,0 +1,13 @@ +// |jit-test| error: InternalError + +function f(){ + var j; + f(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9); +} +f() diff --git a/js/src/jit-test/tests/baseline/bug938130.js b/js/src/jit-test/tests/baseline/bug938130.js new file mode 100644 index 0000000000..5f0ecbe7e3 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug938130.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError + +function f() { } +function g() { } +var x = [f,f,f,undefined,g]; +for (var i = 0; i < 5; ++i) + y = x[i]("x"); diff --git a/js/src/jit-test/tests/baseline/bug940972.js b/js/src/jit-test/tests/baseline/bug940972.js new file mode 100644 index 0000000000..21def56812 --- /dev/null +++ b/js/src/jit-test/tests/baseline/bug940972.js @@ -0,0 +1,5 @@ +setJitCompilerOption("baseline.warmup.trigger", 0); +var arr = new Uint8ClampedArray(1); +for (var i = 0; i < 2; ++i) + arr[0] = 4294967296; +assertEq(arr[0], 255); diff --git a/js/src/jit-test/tests/baseline/callee.js b/js/src/jit-test/tests/baseline/callee.js new file mode 100644 index 0000000000..328574dcc9 --- /dev/null +++ b/js/src/jit-test/tests/baseline/callee.js @@ -0,0 +1,5 @@ +ff = (function g() { + for (var i=0; i<15; i++) {} + return g; +}); +assertEq(ff(), ff); diff --git a/js/src/jit-test/tests/baseline/classConstructor-AnyScripted.js b/js/src/jit-test/tests/baseline/classConstructor-AnyScripted.js new file mode 100644 index 0000000000..763a8bb7d9 --- /dev/null +++ b/js/src/jit-test/tests/baseline/classConstructor-AnyScripted.js @@ -0,0 +1,24 @@ +function test(fun) { + fun(); +} + +// Generate a CallAnyScripted stub in test() +for (let i = 0; i < 20; i++) { + test(function() { /* wheeee */ }); +} + +class foo { + constructor() { } +} + +// Compile foo() +for (let i = 0; i < 11; i++) + new foo(); + +try { + test(foo); + throw new Error("Invoking a class constructor without new must throw"); +} catch (e) { + if (!(e instanceof TypeError)) + throw e; +} diff --git a/js/src/jit-test/tests/baseline/eval-newtarget-osr.js b/js/src/jit-test/tests/baseline/eval-newtarget-osr.js new file mode 100644 index 0000000000..48bbdba805 --- /dev/null +++ b/js/src/jit-test/tests/baseline/eval-newtarget-osr.js @@ -0,0 +1,5 @@ +function f(expected) { + eval("for (var i = 0; i < 30; i++) assertEq(new.target, expected)"); +} +new f(f); +f(undefined); diff --git a/js/src/jit-test/tests/baseline/funcall-array.js b/js/src/jit-test/tests/baseline/funcall-array.js new file mode 100644 index 0000000000..f2f8563f19 --- /dev/null +++ b/js/src/jit-test/tests/baseline/funcall-array.js @@ -0,0 +1,70 @@ + +var emptyArray = []; +var denseArray = [1, 2, 3, 4]; +var sparseArray = [1,,2,,3,,4]; +var bigArray = new Array(); +for (var i = 0; i < 128; i++) { + bigArray.push(i); +} +var nonArray = {0:1, 1:2, 2:3, 3:4, length:2}; +var indexedGetterArray = new Array(); +Object.defineProperty(indexedGetterArray, '2', {get:function () { return 51; }}); + +var ARRAYS = [emptyArray, denseArray, sparseArray, bigArray, nonArray, indexedGetterArray]; + +var targetFun = function (a, b, c, d) { + if (a === undefined) + a = 0; + if (b === undefined) + b = 0; + if (c === undefined) + c = 0; + if (d === undefined) + d = 0; + this.count += arguments.length + a + b + c + d; +} + +var PERMUTATIONS = ARRAYS.length * ARRAYS.length; +function arrayPermutation(num) { + var idx1 = num % ARRAYS.length; + var idx2 = ((num / ARRAYS.length)|0) % ARRAYS.length; + var resultArray = []; + resultArray.push(ARRAYS[idx1]); + resultArray.push(ARRAYS[idx2]); + return resultArray; +} +var EXPECTED_RESULTS = { + 0:0, 1:280, 2:200, 3:2680, 4:100, 5:1080, 6:280, 7:560, 8:480, 9:2960, + 10:380, 11:1360, 12:200, 13:480, 14:400, 15:2880, 16:300, 17:1280, 18:2680, + 19:2960, 20:2880, 21:5360, 22:2780, 23:3760, 24:100, 25:380, 26:300, 27:2780, + 28:200, 29:1180, 30:1080, 31:1360, 32:1280, 33:3760, 34:1180, 35:2160 +}; + +var callerNo = 0; +function generateCaller() { + var fn; + + // Salt eval-string with callerNo to make sure eval caching doesn't take effect. + var s = "function caller" + callerNo + "(fn, thisObj, arrays) {" + + " for (var i = 0; i < arrays.length; i++) {" + + " fn.apply(thisObj, arrays[i]);" + + " }" + + "}" + + "fn = caller" + callerNo + ";"; + eval(s); + return fn; +}; + +function main() { + for (var i = 0; i < PERMUTATIONS; i++) { + var obj = {count:0}; + var arrs = arrayPermutation(i); + var fn = generateCaller(arrs.length); + // Loop 20 times so baseline compiler has chance to kick in and compile the scripts. + for (var j = 0; j < 20; j++) + fn(targetFun, obj, arrs); + assertEq(obj.count, EXPECTED_RESULTS[i]); + } +} + +main(); diff --git a/js/src/jit-test/tests/baseline/funcall.js b/js/src/jit-test/tests/baseline/funcall.js new file mode 100644 index 0000000000..a57e0ce97b --- /dev/null +++ b/js/src/jit-test/tests/baseline/funcall.js @@ -0,0 +1,54 @@ +function test1() { + var f = function() { return 1; }; + + for (var i=0; i<25; i++) { + f.call(); + if (i > 20) + f = Math.abs; + } +} +test1(); + +var origCall = Function.prototype.call; + +function test2() { + var f = function() { return 1; }; + var c = 0; + for (var i=0; i<25; i++) { + f.call(); + if (i > 20) + Function.prototype.call = function() { c++; }; + } + assertEq(c, 3); +} +test2(); +Function.prototype.call = origCall; + +function test3() { + var f = function() { return 1; }; + for (var i=0; i<25; i++) { + f.call(); + if (i > 20) + Function.prototype.call = undefined; + } +} +try { + test3(); + assertEq(0, 1); +} catch(e) {} + +Function.prototype.call = origCall; + +function test4() { + var f = function(a, b, c) { + assertEq(arguments.length, 1); + assertEq(a, 1); + assertEq(b, undefined); + assertEq(c, undefined); + return 1; + }; + for (var i=0; i<25; i++) { + f.call(null, 1); + } +} +test4(); diff --git a/js/src/jit-test/tests/baseline/getgname-uninitialized-let.js b/js/src/jit-test/tests/baseline/getgname-uninitialized-let.js new file mode 100644 index 0000000000..6901ded963 --- /dev/null +++ b/js/src/jit-test/tests/baseline/getgname-uninitialized-let.js @@ -0,0 +1,8 @@ +for (var i = 0; i < 12; i++) { + try { + // GetGName + void x; + } catch (e) { } +} + +let x; diff --git a/js/src/jit-test/tests/baseline/getname-uninitialized-let.js b/js/src/jit-test/tests/baseline/getname-uninitialized-let.js new file mode 100644 index 0000000000..a20d4a8906 --- /dev/null +++ b/js/src/jit-test/tests/baseline/getname-uninitialized-let.js @@ -0,0 +1,13 @@ +function f() { + for (var i = 0; i < 12; i++) { + try { + eval(""); + + void x; + } catch (e) { } + } +} + +f(); + +let x; diff --git a/js/src/jit-test/tests/baseline/getter_setter.js b/js/src/jit-test/tests/baseline/getter_setter.js new file mode 100644 index 0000000000..1ca3ff8c51 --- /dev/null +++ b/js/src/jit-test/tests/baseline/getter_setter.js @@ -0,0 +1,25 @@ +function f() { + for (var i=0; i<20; i++) { + var o = {x: 1, + get g1() { return this.x; }, + set g2(v) { this.x = v; }, + get 44() { return this.x }, + set 44(v) { this.x = v; } + }; + + assertEq(o.x, 1); + assertEq(o.g1, 1); + assertEq(o[44], 1); + + o.g2 = i; + assertEq(o.x, i); + assertEq(o.g1, i); + assertEq(o[44], i); + + o[44] = 33; + assertEq(o.x, 33); + assertEq(o.g1, 33); + assertEq(o[44], 33); + } +} +f(); diff --git a/js/src/jit-test/tests/baseline/long-proto-chains.js b/js/src/jit-test/tests/baseline/long-proto-chains.js new file mode 100644 index 0000000000..ceb387b087 --- /dev/null +++ b/js/src/jit-test/tests/baseline/long-proto-chains.js @@ -0,0 +1,10 @@ +function f() { + var o = {x: 1}; + for (var i = 0; i < 300; i++) + o = Object.create(o); + for (var i = 0; i < 15; i++) { + assertEq(o.x, 1); + assertEq(o.y, undefined); + } +} +f(); diff --git a/js/src/jit-test/tests/baseline/metadata-hook-on-stack.js b/js/src/jit-test/tests/baseline/metadata-hook-on-stack.js new file mode 100644 index 0000000000..c2103f32f6 --- /dev/null +++ b/js/src/jit-test/tests/baseline/metadata-hook-on-stack.js @@ -0,0 +1,16 @@ +// JSOP_NEWOBJECT should respect the metadata hook, even if +// it's set with scripts on the stack. + +function f() { + for (var i=0; i<100; i++) { + if (i === 20) + enableShellAllocationMetadataBuilder(); + var o = {x: 1}; + if (i >= 20) { + var md = getAllocationMetadata(o); + assertEq(typeof md === "object" && md !== null, true); + assertEq(typeof md.index, "number"); + } + } +} +f(); diff --git a/js/src/jit-test/tests/baseline/no-such-property-getprop.js b/js/src/jit-test/tests/baseline/no-such-property-getprop.js new file mode 100644 index 0000000000..72303d2660 --- /dev/null +++ b/js/src/jit-test/tests/baseline/no-such-property-getprop.js @@ -0,0 +1,1025 @@ +///////////////////////////////////////// +// This is a generated file! +// See jit-tests/etc/generate-nosuchproperty-tests.js for the code +// that generated this code! +///////////////////////////////////////// + +///////////////////////////////////////// +// PRELUDE // +///////////////////////////////////////// + +function createTower(n) { + var result = Object.create(null); + for (var i = 0; i < n; i++) + result = Object.create(result); + return result; +} +function updateChain(obj, depth, prop, value) { + // Walk down the proto chain |depth| iterations and set |prop| to |value|. + var cur = obj; + for (var i = 0; i < depth; i++) + cur = Object.getPrototypeOf(cur); + + var desc = {value:value, writable:true, configurable:true, enumerable:true}; + Object.defineProperty(cur, prop, desc); +} + +///////////////////////////////////////// +// TEST CASES // +///////////////////////////////////////// + +//// Test chain of length 0 with late-property-addition at depth 0 +function runChain_0_0(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_0_0() { + var obj = createTower(0); + assertEq(runChain_0_0(obj), NaN); + updateChain(obj, 0, 'foo', 9); + assertEq(runChain_0_0(obj), 900); +} + +//// Test chain of length 1 with late-property-addition at depth 0 +function runChain_1_0(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_1_0() { + var obj = createTower(1); + assertEq(runChain_1_0(obj), NaN); + updateChain(obj, 0, 'foo', 9); + assertEq(runChain_1_0(obj), 900); +} + +//// Test chain of length 1 with late-property-addition at depth 1 +function runChain_1_1(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_1_1() { + var obj = createTower(1); + assertEq(runChain_1_1(obj), NaN); + updateChain(obj, 1, 'foo', 9); + assertEq(runChain_1_1(obj), 900); +} + +//// Test chain of length 2 with late-property-addition at depth 0 +function runChain_2_0(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_2_0() { + var obj = createTower(2); + assertEq(runChain_2_0(obj), NaN); + updateChain(obj, 0, 'foo', 9); + assertEq(runChain_2_0(obj), 900); +} + +//// Test chain of length 2 with late-property-addition at depth 1 +function runChain_2_1(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_2_1() { + var obj = createTower(2); + assertEq(runChain_2_1(obj), NaN); + updateChain(obj, 1, 'foo', 9); + assertEq(runChain_2_1(obj), 900); +} + +//// Test chain of length 2 with late-property-addition at depth 2 +function runChain_2_2(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_2_2() { + var obj = createTower(2); + assertEq(runChain_2_2(obj), NaN); + updateChain(obj, 2, 'foo', 9); + assertEq(runChain_2_2(obj), 900); +} + +//// Test chain of length 3 with late-property-addition at depth 0 +function runChain_3_0(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_3_0() { + var obj = createTower(3); + assertEq(runChain_3_0(obj), NaN); + updateChain(obj, 0, 'foo', 9); + assertEq(runChain_3_0(obj), 900); +} + +//// Test chain of length 3 with late-property-addition at depth 1 +function runChain_3_1(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_3_1() { + var obj = createTower(3); + assertEq(runChain_3_1(obj), NaN); + updateChain(obj, 1, 'foo', 9); + assertEq(runChain_3_1(obj), 900); +} + +//// Test chain of length 3 with late-property-addition at depth 2 +function runChain_3_2(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_3_2() { + var obj = createTower(3); + assertEq(runChain_3_2(obj), NaN); + updateChain(obj, 2, 'foo', 9); + assertEq(runChain_3_2(obj), 900); +} + +//// Test chain of length 3 with late-property-addition at depth 3 +function runChain_3_3(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_3_3() { + var obj = createTower(3); + assertEq(runChain_3_3(obj), NaN); + updateChain(obj, 3, 'foo', 9); + assertEq(runChain_3_3(obj), 900); +} + +//// Test chain of length 4 with late-property-addition at depth 0 +function runChain_4_0(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_4_0() { + var obj = createTower(4); + assertEq(runChain_4_0(obj), NaN); + updateChain(obj, 0, 'foo', 9); + assertEq(runChain_4_0(obj), 900); +} + +//// Test chain of length 4 with late-property-addition at depth 1 +function runChain_4_1(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_4_1() { + var obj = createTower(4); + assertEq(runChain_4_1(obj), NaN); + updateChain(obj, 1, 'foo', 9); + assertEq(runChain_4_1(obj), 900); +} + +//// Test chain of length 4 with late-property-addition at depth 2 +function runChain_4_2(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_4_2() { + var obj = createTower(4); + assertEq(runChain_4_2(obj), NaN); + updateChain(obj, 2, 'foo', 9); + assertEq(runChain_4_2(obj), 900); +} + +//// Test chain of length 4 with late-property-addition at depth 3 +function runChain_4_3(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_4_3() { + var obj = createTower(4); + assertEq(runChain_4_3(obj), NaN); + updateChain(obj, 3, 'foo', 9); + assertEq(runChain_4_3(obj), 900); +} + +//// Test chain of length 4 with late-property-addition at depth 4 +function runChain_4_4(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_4_4() { + var obj = createTower(4); + assertEq(runChain_4_4(obj), NaN); + updateChain(obj, 4, 'foo', 9); + assertEq(runChain_4_4(obj), 900); +} + +//// Test chain of length 5 with late-property-addition at depth 0 +function runChain_5_0(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_5_0() { + var obj = createTower(5); + assertEq(runChain_5_0(obj), NaN); + updateChain(obj, 0, 'foo', 9); + assertEq(runChain_5_0(obj), 900); +} + +//// Test chain of length 5 with late-property-addition at depth 1 +function runChain_5_1(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_5_1() { + var obj = createTower(5); + assertEq(runChain_5_1(obj), NaN); + updateChain(obj, 1, 'foo', 9); + assertEq(runChain_5_1(obj), 900); +} + +//// Test chain of length 5 with late-property-addition at depth 2 +function runChain_5_2(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_5_2() { + var obj = createTower(5); + assertEq(runChain_5_2(obj), NaN); + updateChain(obj, 2, 'foo', 9); + assertEq(runChain_5_2(obj), 900); +} + +//// Test chain of length 5 with late-property-addition at depth 3 +function runChain_5_3(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_5_3() { + var obj = createTower(5); + assertEq(runChain_5_3(obj), NaN); + updateChain(obj, 3, 'foo', 9); + assertEq(runChain_5_3(obj), 900); +} + +//// Test chain of length 5 with late-property-addition at depth 4 +function runChain_5_4(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_5_4() { + var obj = createTower(5); + assertEq(runChain_5_4(obj), NaN); + updateChain(obj, 4, 'foo', 9); + assertEq(runChain_5_4(obj), 900); +} + +//// Test chain of length 5 with late-property-addition at depth 5 +function runChain_5_5(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_5_5() { + var obj = createTower(5); + assertEq(runChain_5_5(obj), NaN); + updateChain(obj, 5, 'foo', 9); + assertEq(runChain_5_5(obj), 900); +} + +//// Test chain of length 6 with late-property-addition at depth 0 +function runChain_6_0(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_6_0() { + var obj = createTower(6); + assertEq(runChain_6_0(obj), NaN); + updateChain(obj, 0, 'foo', 9); + assertEq(runChain_6_0(obj), 900); +} + +//// Test chain of length 6 with late-property-addition at depth 1 +function runChain_6_1(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_6_1() { + var obj = createTower(6); + assertEq(runChain_6_1(obj), NaN); + updateChain(obj, 1, 'foo', 9); + assertEq(runChain_6_1(obj), 900); +} + +//// Test chain of length 6 with late-property-addition at depth 2 +function runChain_6_2(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_6_2() { + var obj = createTower(6); + assertEq(runChain_6_2(obj), NaN); + updateChain(obj, 2, 'foo', 9); + assertEq(runChain_6_2(obj), 900); +} + +//// Test chain of length 6 with late-property-addition at depth 3 +function runChain_6_3(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_6_3() { + var obj = createTower(6); + assertEq(runChain_6_3(obj), NaN); + updateChain(obj, 3, 'foo', 9); + assertEq(runChain_6_3(obj), 900); +} + +//// Test chain of length 6 with late-property-addition at depth 4 +function runChain_6_4(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_6_4() { + var obj = createTower(6); + assertEq(runChain_6_4(obj), NaN); + updateChain(obj, 4, 'foo', 9); + assertEq(runChain_6_4(obj), 900); +} + +//// Test chain of length 6 with late-property-addition at depth 5 +function runChain_6_5(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_6_5() { + var obj = createTower(6); + assertEq(runChain_6_5(obj), NaN); + updateChain(obj, 5, 'foo', 9); + assertEq(runChain_6_5(obj), 900); +} + +//// Test chain of length 6 with late-property-addition at depth 6 +function runChain_6_6(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_6_6() { + var obj = createTower(6); + assertEq(runChain_6_6(obj), NaN); + updateChain(obj, 6, 'foo', 9); + assertEq(runChain_6_6(obj), 900); +} + +//// Test chain of length 7 with late-property-addition at depth 0 +function runChain_7_0(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_7_0() { + var obj = createTower(7); + assertEq(runChain_7_0(obj), NaN); + updateChain(obj, 0, 'foo', 9); + assertEq(runChain_7_0(obj), 900); +} + +//// Test chain of length 7 with late-property-addition at depth 1 +function runChain_7_1(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_7_1() { + var obj = createTower(7); + assertEq(runChain_7_1(obj), NaN); + updateChain(obj, 1, 'foo', 9); + assertEq(runChain_7_1(obj), 900); +} + +//// Test chain of length 7 with late-property-addition at depth 2 +function runChain_7_2(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_7_2() { + var obj = createTower(7); + assertEq(runChain_7_2(obj), NaN); + updateChain(obj, 2, 'foo', 9); + assertEq(runChain_7_2(obj), 900); +} + +//// Test chain of length 7 with late-property-addition at depth 3 +function runChain_7_3(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_7_3() { + var obj = createTower(7); + assertEq(runChain_7_3(obj), NaN); + updateChain(obj, 3, 'foo', 9); + assertEq(runChain_7_3(obj), 900); +} + +//// Test chain of length 7 with late-property-addition at depth 4 +function runChain_7_4(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_7_4() { + var obj = createTower(7); + assertEq(runChain_7_4(obj), NaN); + updateChain(obj, 4, 'foo', 9); + assertEq(runChain_7_4(obj), 900); +} + +//// Test chain of length 7 with late-property-addition at depth 5 +function runChain_7_5(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_7_5() { + var obj = createTower(7); + assertEq(runChain_7_5(obj), NaN); + updateChain(obj, 5, 'foo', 9); + assertEq(runChain_7_5(obj), 900); +} + +//// Test chain of length 7 with late-property-addition at depth 6 +function runChain_7_6(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_7_6() { + var obj = createTower(7); + assertEq(runChain_7_6(obj), NaN); + updateChain(obj, 6, 'foo', 9); + assertEq(runChain_7_6(obj), 900); +} + +//// Test chain of length 7 with late-property-addition at depth 7 +function runChain_7_7(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_7_7() { + var obj = createTower(7); + assertEq(runChain_7_7(obj), NaN); + updateChain(obj, 7, 'foo', 9); + assertEq(runChain_7_7(obj), 900); +} + +//// Test chain of length 8 with late-property-addition at depth 0 +function runChain_8_0(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_8_0() { + var obj = createTower(8); + assertEq(runChain_8_0(obj), NaN); + updateChain(obj, 0, 'foo', 9); + assertEq(runChain_8_0(obj), 900); +} + +//// Test chain of length 8 with late-property-addition at depth 1 +function runChain_8_1(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_8_1() { + var obj = createTower(8); + assertEq(runChain_8_1(obj), NaN); + updateChain(obj, 1, 'foo', 9); + assertEq(runChain_8_1(obj), 900); +} + +//// Test chain of length 8 with late-property-addition at depth 2 +function runChain_8_2(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_8_2() { + var obj = createTower(8); + assertEq(runChain_8_2(obj), NaN); + updateChain(obj, 2, 'foo', 9); + assertEq(runChain_8_2(obj), 900); +} + +//// Test chain of length 8 with late-property-addition at depth 3 +function runChain_8_3(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_8_3() { + var obj = createTower(8); + assertEq(runChain_8_3(obj), NaN); + updateChain(obj, 3, 'foo', 9); + assertEq(runChain_8_3(obj), 900); +} + +//// Test chain of length 8 with late-property-addition at depth 4 +function runChain_8_4(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_8_4() { + var obj = createTower(8); + assertEq(runChain_8_4(obj), NaN); + updateChain(obj, 4, 'foo', 9); + assertEq(runChain_8_4(obj), 900); +} + +//// Test chain of length 8 with late-property-addition at depth 5 +function runChain_8_5(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_8_5() { + var obj = createTower(8); + assertEq(runChain_8_5(obj), NaN); + updateChain(obj, 5, 'foo', 9); + assertEq(runChain_8_5(obj), 900); +} + +//// Test chain of length 8 with late-property-addition at depth 6 +function runChain_8_6(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_8_6() { + var obj = createTower(8); + assertEq(runChain_8_6(obj), NaN); + updateChain(obj, 6, 'foo', 9); + assertEq(runChain_8_6(obj), 900); +} + +//// Test chain of length 8 with late-property-addition at depth 7 +function runChain_8_7(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_8_7() { + var obj = createTower(8); + assertEq(runChain_8_7(obj), NaN); + updateChain(obj, 7, 'foo', 9); + assertEq(runChain_8_7(obj), 900); +} + +//// Test chain of length 8 with late-property-addition at depth 8 +function runChain_8_8(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_8_8() { + var obj = createTower(8); + assertEq(runChain_8_8(obj), NaN); + updateChain(obj, 8, 'foo', 9); + assertEq(runChain_8_8(obj), 900); +} + +//// Test chain of length 9 with late-property-addition at depth 0 +function runChain_9_0(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_9_0() { + var obj = createTower(9); + assertEq(runChain_9_0(obj), NaN); + updateChain(obj, 0, 'foo', 9); + assertEq(runChain_9_0(obj), 900); +} + +//// Test chain of length 9 with late-property-addition at depth 1 +function runChain_9_1(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_9_1() { + var obj = createTower(9); + assertEq(runChain_9_1(obj), NaN); + updateChain(obj, 1, 'foo', 9); + assertEq(runChain_9_1(obj), 900); +} + +//// Test chain of length 9 with late-property-addition at depth 2 +function runChain_9_2(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_9_2() { + var obj = createTower(9); + assertEq(runChain_9_2(obj), NaN); + updateChain(obj, 2, 'foo', 9); + assertEq(runChain_9_2(obj), 900); +} + +//// Test chain of length 9 with late-property-addition at depth 3 +function runChain_9_3(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_9_3() { + var obj = createTower(9); + assertEq(runChain_9_3(obj), NaN); + updateChain(obj, 3, 'foo', 9); + assertEq(runChain_9_3(obj), 900); +} + +//// Test chain of length 9 with late-property-addition at depth 4 +function runChain_9_4(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_9_4() { + var obj = createTower(9); + assertEq(runChain_9_4(obj), NaN); + updateChain(obj, 4, 'foo', 9); + assertEq(runChain_9_4(obj), 900); +} + +//// Test chain of length 9 with late-property-addition at depth 5 +function runChain_9_5(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_9_5() { + var obj = createTower(9); + assertEq(runChain_9_5(obj), NaN); + updateChain(obj, 5, 'foo', 9); + assertEq(runChain_9_5(obj), 900); +} + +//// Test chain of length 9 with late-property-addition at depth 6 +function runChain_9_6(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_9_6() { + var obj = createTower(9); + assertEq(runChain_9_6(obj), NaN); + updateChain(obj, 6, 'foo', 9); + assertEq(runChain_9_6(obj), 900); +} + +//// Test chain of length 9 with late-property-addition at depth 7 +function runChain_9_7(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_9_7() { + var obj = createTower(9); + assertEq(runChain_9_7(obj), NaN); + updateChain(obj, 7, 'foo', 9); + assertEq(runChain_9_7(obj), 900); +} + +//// Test chain of length 9 with late-property-addition at depth 8 +function runChain_9_8(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_9_8() { + var obj = createTower(9); + assertEq(runChain_9_8(obj), NaN); + updateChain(obj, 8, 'foo', 9); + assertEq(runChain_9_8(obj), 900); +} + +//// Test chain of length 9 with late-property-addition at depth 9 +function runChain_9_9(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_9_9() { + var obj = createTower(9); + assertEq(runChain_9_9(obj), NaN); + updateChain(obj, 9, 'foo', 9); + assertEq(runChain_9_9(obj), 900); +} + +//// Test chain of length 10 with late-property-addition at depth 0 +function runChain_10_0(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_10_0() { + var obj = createTower(10); + assertEq(runChain_10_0(obj), NaN); + updateChain(obj, 0, 'foo', 9); + assertEq(runChain_10_0(obj), 900); +} + +//// Test chain of length 10 with late-property-addition at depth 1 +function runChain_10_1(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_10_1() { + var obj = createTower(10); + assertEq(runChain_10_1(obj), NaN); + updateChain(obj, 1, 'foo', 9); + assertEq(runChain_10_1(obj), 900); +} + +//// Test chain of length 10 with late-property-addition at depth 2 +function runChain_10_2(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_10_2() { + var obj = createTower(10); + assertEq(runChain_10_2(obj), NaN); + updateChain(obj, 2, 'foo', 9); + assertEq(runChain_10_2(obj), 900); +} + +//// Test chain of length 10 with late-property-addition at depth 3 +function runChain_10_3(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_10_3() { + var obj = createTower(10); + assertEq(runChain_10_3(obj), NaN); + updateChain(obj, 3, 'foo', 9); + assertEq(runChain_10_3(obj), 900); +} + +//// Test chain of length 10 with late-property-addition at depth 4 +function runChain_10_4(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_10_4() { + var obj = createTower(10); + assertEq(runChain_10_4(obj), NaN); + updateChain(obj, 4, 'foo', 9); + assertEq(runChain_10_4(obj), 900); +} + +//// Test chain of length 10 with late-property-addition at depth 5 +function runChain_10_5(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_10_5() { + var obj = createTower(10); + assertEq(runChain_10_5(obj), NaN); + updateChain(obj, 5, 'foo', 9); + assertEq(runChain_10_5(obj), 900); +} + +//// Test chain of length 10 with late-property-addition at depth 6 +function runChain_10_6(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_10_6() { + var obj = createTower(10); + assertEq(runChain_10_6(obj), NaN); + updateChain(obj, 6, 'foo', 9); + assertEq(runChain_10_6(obj), 900); +} + +//// Test chain of length 10 with late-property-addition at depth 7 +function runChain_10_7(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_10_7() { + var obj = createTower(10); + assertEq(runChain_10_7(obj), NaN); + updateChain(obj, 7, 'foo', 9); + assertEq(runChain_10_7(obj), 900); +} + +//// Test chain of length 10 with late-property-addition at depth 8 +function runChain_10_8(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_10_8() { + var obj = createTower(10); + assertEq(runChain_10_8(obj), NaN); + updateChain(obj, 8, 'foo', 9); + assertEq(runChain_10_8(obj), 900); +} + +//// Test chain of length 10 with late-property-addition at depth 9 +function runChain_10_9(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_10_9() { + var obj = createTower(10); + assertEq(runChain_10_9(obj), NaN); + updateChain(obj, 9, 'foo', 9); + assertEq(runChain_10_9(obj), 900); +} + +//// Test chain of length 10 with late-property-addition at depth 10 +function runChain_10_10(obj) { + var sum = 0; + for (var i = 0; i < 100; i++) + sum += obj.foo; + return sum; +} +function testChain_10_10() { + var obj = createTower(10); + assertEq(runChain_10_10(obj), NaN); + updateChain(obj, 10, 'foo', 9); + assertEq(runChain_10_10(obj), 900); +} + + +///////////////////////////////////////// +// RUNNER // +///////////////////////////////////////// + +testChain_0_0(); +testChain_1_0(); +testChain_1_1(); +testChain_2_0(); +testChain_2_1(); +testChain_2_2(); +testChain_3_0(); +testChain_3_1(); +testChain_3_2(); +testChain_3_3(); +testChain_4_0(); +testChain_4_1(); +testChain_4_2(); +testChain_4_3(); +testChain_4_4(); +testChain_5_0(); +testChain_5_1(); +testChain_5_2(); +testChain_5_3(); +testChain_5_4(); +testChain_5_5(); +testChain_6_0(); +testChain_6_1(); +testChain_6_2(); +testChain_6_3(); +testChain_6_4(); +testChain_6_5(); +testChain_6_6(); +testChain_7_0(); +testChain_7_1(); +testChain_7_2(); +testChain_7_3(); +testChain_7_4(); +testChain_7_5(); +testChain_7_6(); +testChain_7_7(); +testChain_8_0(); +testChain_8_1(); +testChain_8_2(); +testChain_8_3(); +testChain_8_4(); +testChain_8_5(); +testChain_8_6(); +testChain_8_7(); +testChain_8_8(); +testChain_9_0(); +testChain_9_1(); +testChain_9_2(); +testChain_9_3(); +testChain_9_4(); +testChain_9_5(); +testChain_9_6(); +testChain_9_7(); +testChain_9_8(); +testChain_9_9(); +testChain_10_0(); +testChain_10_1(); +testChain_10_2(); +testChain_10_3(); +testChain_10_4(); +testChain_10_5(); +testChain_10_6(); +testChain_10_7(); +testChain_10_8(); +testChain_10_9(); +testChain_10_10(); diff --git a/js/src/jit-test/tests/baseline/osr-large-stack-frame.js b/js/src/jit-test/tests/baseline/osr-large-stack-frame.js new file mode 100644 index 0000000000..bcaca2cfc2 --- /dev/null +++ b/js/src/jit-test/tests/baseline/osr-large-stack-frame.js @@ -0,0 +1,18 @@ +// Creates a huge stack frame and uses OSR. See bug 1839669. +function f() { + var varinits = []; + var varnames = []; + for (var i = 0; i < 19553; i++) { + var varname = `x${i}`; + varnames.push(varname); + varinits.push(`${varname} = ${i}`); + } + var source = "var " + varinits.join(",") + ";\n"; + source += "for (var i = 0; i < 100; i++) {}\n"; + source += "return " + varnames.join("+") + ";"; + + var g = new Function(source); + assertEq(g(), 191150128); + assertEq(g(), 191150128); +} +f(); diff --git a/js/src/jit-test/tests/baseline/setcall.js b/js/src/jit-test/tests/baseline/setcall.js new file mode 100644 index 0000000000..c5b6494aac --- /dev/null +++ b/js/src/jit-test/tests/baseline/setcall.js @@ -0,0 +1,32 @@ +load(libdir + 'asserts.js'); + +var calls = 0; +function g() { + calls++; +}; +function test1() { + for (var i=0; i<20; i++) { + if (i > 18) + g() = 2; + } +} +assertThrowsInstanceOf(test1, ReferenceError); +assertEq(calls, 1); + +function test2() { + for (var i=0; i<20; i++) { + if (i > 18) + g()++; + } +} +assertThrowsInstanceOf(test2, ReferenceError); +assertEq(calls, 2); + +function test3() { + for (var i=0; i<20; i++) { + if (i > 18) + g() >>= 2; + } +} +assertThrowsInstanceOf(test3, ReferenceError); +assertEq(calls, 3); diff --git a/js/src/jit-test/tests/baseline/try-finally-1.js b/js/src/jit-test/tests/baseline/try-finally-1.js new file mode 100644 index 0000000000..8ce4f5a89b --- /dev/null +++ b/js/src/jit-test/tests/baseline/try-finally-1.js @@ -0,0 +1,28 @@ +function test1() { + try { + return "try"; + } finally { + return "finally"; + } +} +assertEq(test1(), "finally"); + +function test2() { + try { + throw 4; + } catch(e) { + return "catch"; + } finally { + return "finally"; + } +} +assertEq(test2(), "finally"); + +function test3() { + try { + throw 4; + } finally { + return "finally"; // Don't rethrow. + } +} +assertEq(test3(), "finally"); diff --git a/js/src/jit-test/tests/baseline/try-finally-2.js b/js/src/jit-test/tests/baseline/try-finally-2.js new file mode 100644 index 0000000000..1a51a6af12 --- /dev/null +++ b/js/src/jit-test/tests/baseline/try-finally-2.js @@ -0,0 +1,37 @@ +var count = 0; +function f() { + try { + try { + try { + count += 2; + } finally { + count += 3; + throw 3; + } + } catch(e) { + count += 4; + throw 4; + } + } finally { + count += 5; + try { + count += 6; + } catch(e) { + count += 7; + throw 123; + } finally { + count += 8; + } + count += 9; + } + count += 10; +} +for (var i=0; i<3; i++) { + try { + f(); + assertEq(0, 1); + } catch(e) { + assertEq(e, 4); + } +} +assertEq(count, 111); diff --git a/js/src/jit-test/tests/baseline/try-finally-3.js b/js/src/jit-test/tests/baseline/try-finally-3.js new file mode 100644 index 0000000000..23bfacbeb5 --- /dev/null +++ b/js/src/jit-test/tests/baseline/try-finally-3.js @@ -0,0 +1,30 @@ +// Test optimized RetSub stubs. +var count = 0; +function f(x) { + try { + if (x < 0) + throw "negative"; + if (x & 1) + return "odd"; + count++; + } finally { + count += 3; + } + + return "even"; +} +for (var i=0; i<15; i++) { + var res = f(i); + if ((i % 2) === 0) + assertEq(res, "even"); + else + assertEq(res, "odd"); +} +try { + f(-1); + assertEq(0, 1); +} catch(e) { + assertEq(e, "negative"); +} + +assertEq(count, 56); diff --git a/js/src/jit-test/tests/baseline/try-finally-osr.js b/js/src/jit-test/tests/baseline/try-finally-osr.js new file mode 100644 index 0000000000..4a58aec711 --- /dev/null +++ b/js/src/jit-test/tests/baseline/try-finally-osr.js @@ -0,0 +1,29 @@ +var count = 0; + +// OSR into a finally block should not throw away the frame's +// return value. +function test1() { + try { + return [1, 2, 3]; + } finally { + for (var i=0; i<20; i++) { count++; } + } +} +assertEq(test1().toString(), "1,2,3"); +assertEq(count, 20); + +// OSR into the finally block, with exception pending. +function test2() { + try { + throw 3; + } finally { + for (var i=0; i<20; i++) { count++; } + } +} +try { + test2(); + assertEq(0, 1); +} catch(e) { + assertEq(e, 3); +} +assertEq(count, 40); diff --git a/js/src/jit-test/tests/baseline/unboxed-expando-type-update.js b/js/src/jit-test/tests/baseline/unboxed-expando-type-update.js new file mode 100644 index 0000000000..ad7bca5b77 --- /dev/null +++ b/js/src/jit-test/tests/baseline/unboxed-expando-type-update.js @@ -0,0 +1,18 @@ +function f() { + var a = []; + for (var i=0; i<100; i++) + a.push({x: i}); + + var vals = [1, "", true, null]; + + for (var j=0; j<100; j++) { + var v = vals[j % vals.length]; + a[95].y = v; + assertEq(a[95].y, v); + a[j].z1 = v; + a[j].z2 = v; + assertEq(a[j].z1, v); + assertEq(a[j].z2, v); + } +} +f(); diff --git a/js/src/jit-test/tests/basic/FPQuadCmp.js b/js/src/jit-test/tests/basic/FPQuadCmp.js new file mode 100644 index 0000000000..010228d1ff --- /dev/null +++ b/js/src/jit-test/tests/basic/FPQuadCmp.js @@ -0,0 +1,6 @@ +function FPQuadCmp() +{ + for (let j = 0; j < 3; ++j) { true == 0; } + return "ok"; +} +assertEq(FPQuadCmp(), "ok"); diff --git a/js/src/jit-test/tests/basic/__proto__-not-prototype-mutation-ion.js b/js/src/jit-test/tests/basic/__proto__-not-prototype-mutation-ion.js new file mode 100644 index 0000000000..4a7b0bd37b --- /dev/null +++ b/js/src/jit-test/tests/basic/__proto__-not-prototype-mutation-ion.js @@ -0,0 +1,12 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +function f() +{ + return { *__proto__() {}, __proto__: null }; +} + +for (var i = 0; i < 2e3; i++) + f(); diff --git a/js/src/jit-test/tests/basic/__proto__-not-prototype-mutation.js b/js/src/jit-test/tests/basic/__proto__-not-prototype-mutation.js new file mode 100644 index 0000000000..b940a229b2 --- /dev/null +++ b/js/src/jit-test/tests/basic/__proto__-not-prototype-mutation.js @@ -0,0 +1,29 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +var __proto__ = "string value"; + +var propdefs = + [{ c: "['__proto__']: null", t: "object" }, + { c: "__proto__() {}", t: "function" }, + { c: "['__proto__']() {}", t: "function" }, + { c: "*__proto__() {}", t: "function" }, + { c: "*['__proto__']() {}", t: "function" }, + { c: "__proto__", t: "string" }, + { c: "get __proto__() { return 42; }", t: "number" }, + { c: "get ['__proto__']() { return undefined; }", t: "undefined" }, + { c: "set __proto__(v) { }", t: "undefined" }, + { c: "set ['__proto__'](v) { }", t: "undefined" }]; + +for (var propdef of propdefs) +{ + var f = new Function("return { " + propdef.c + " };"); + for (var i = 0; i < 100; i++) + { + var inst = f(); + assertEq(typeof inst.__proto__, propdef.t); + assertEq(Object.getPrototypeOf(inst), Object.prototype); + } +} diff --git a/js/src/jit-test/tests/basic/adjacent-trycatch-second-nested.js b/js/src/jit-test/tests/basic/adjacent-trycatch-second-nested.js new file mode 100644 index 0000000000..35767eb402 --- /dev/null +++ b/js/src/jit-test/tests/basic/adjacent-trycatch-second-nested.js @@ -0,0 +1,9 @@ +try { } +catch (e) { } + +try { throw 2; } +catch (e) +{ + try { throw 3; } + catch (e2) { } +} diff --git a/js/src/jit-test/tests/basic/allow-relazify.js b/js/src/jit-test/tests/basic/allow-relazify.js new file mode 100644 index 0000000000..26e20aa289 --- /dev/null +++ b/js/src/jit-test/tests/basic/allow-relazify.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: isLcovEnabled() +function f() { + return 1; +} +assertEq(isLazyFunction(f), true); +assertEq(isRelazifiableFunction(f), false); +f(); +assertEq(isLazyFunction(f), false); +assertEq(isRelazifiableFunction(f), true); diff --git a/js/src/jit-test/tests/basic/argumentsPassedToBuiltin.js b/js/src/jit-test/tests/basic/argumentsPassedToBuiltin.js new file mode 100644 index 0000000000..d8edfffffa --- /dev/null +++ b/js/src/jit-test/tests/basic/argumentsPassedToBuiltin.js @@ -0,0 +1,14 @@ +// bug 504797 + +function f() { + g(arguments, 1); +} + +function g(a, b) { + var s = Array.prototype.slice.call(a, b); + assertEq(s[0] == undefined, false); +} + +for (var i = 0; i < 10; ++i) { + f(1, 2, 3, 4); +} diff --git a/js/src/jit-test/tests/basic/arityMismatchExtraArg.js b/js/src/jit-test/tests/basic/arityMismatchExtraArg.js new file mode 100644 index 0000000000..6803368acd --- /dev/null +++ b/js/src/jit-test/tests/basic/arityMismatchExtraArg.js @@ -0,0 +1,13 @@ +function arityMismatchMissingArg(arg) +{ + for (var a = 0, i = 1; i < 10000; i *= 2) { + a += i; + } + return a; +} + +function arityMismatchExtraArg() +{ + return arityMismatchMissingArg(1, 2); +} +assertEq(arityMismatchExtraArg(), 16383); diff --git a/js/src/jit-test/tests/basic/arityMismatchMissingArg.js b/js/src/jit-test/tests/basic/arityMismatchMissingArg.js new file mode 100644 index 0000000000..79284e9487 --- /dev/null +++ b/js/src/jit-test/tests/basic/arityMismatchMissingArg.js @@ -0,0 +1,8 @@ +function arityMismatchMissingArg(arg) +{ + for (var a = 0, i = 1; i < 10000; i *= 2) { + a += i; + } + return a; +} +assertEq(arityMismatchMissingArg(), 16383); diff --git a/js/src/jit-test/tests/basic/array-concat-spreadable.js b/js/src/jit-test/tests/basic/array-concat-spreadable.js new file mode 100644 index 0000000000..5a8bd496d5 --- /dev/null +++ b/js/src/jit-test/tests/basic/array-concat-spreadable.js @@ -0,0 +1,33 @@ +function testConcat(o1, o2, len, json) { + let res = Array.prototype.concat.call(o1, o2); + assertEq(res.length, len); + assertEq(JSON.stringify(res), json); +} + +const o1 = {[Symbol.isConcatSpreadable]: true, length: 2, 0: 4, 1: 5, 2: 6}; +const o2 = {[Symbol.isConcatSpreadable]: true, length: 2, 0: 4, 2: 6}; + +testConcat([1, 2, 3], o1, 5, "[1,2,3,4,5]"); +testConcat([1, 2, 3], o2, 5, "[1,2,3,4,null]"); + +testConcat(o1, [1, 2, 3], 5, "[4,5,1,2,3]"); +testConcat(o2, [1, 2, 3], 5, "[4,null,1,2,3]"); + +testConcat(o1, o1, 4, "[4,5,4,5]"); +testConcat(o2, o2, 4, "[4,null,4,null]"); + +testConcat(o1, o2, 4, "[4,5,4,null]"); +testConcat(o2, o1, 4, "[4,null,4,5]"); + +o1[Symbol.isConcatSpreadable] = false; + +testConcat(o1, o2, 3, '[{"0":4,"1":5,"2":6,"length":2},4,null]'); +testConcat(o2, o1, 3, '[4,null,{"0":4,"1":5,"2":6,"length":2}]'); + +const ta = new Int32Array([4, 5, 6]); +testConcat([1, 2, 3], ta, 4, '[1,2,3,{"0":4,"1":5,"2":6}]'); +testConcat(ta, ta, 2, '[{"0":4,"1":5,"2":6},{"0":4,"1":5,"2":6}]'); + +ta[Symbol.isConcatSpreadable] = true; +testConcat([1, 2, 3], ta, 6, "[1,2,3,4,5,6]"); +testConcat(ta, ta, 6, "[4,5,6,4,5,6]"); diff --git a/js/src/jit-test/tests/basic/array-copyWithin.js b/js/src/jit-test/tests/basic/array-copyWithin.js new file mode 100644 index 0000000000..113613b38b --- /dev/null +++ b/js/src/jit-test/tests/basic/array-copyWithin.js @@ -0,0 +1,187 @@ +// Tests for Array#copyWithin + +load(libdir + "asserts.js"); + +assertEq(Array.prototype.copyWithin.length, 2); + +// works with two arguments +assertDeepEq([1, 2, 3, 4, 5].copyWithin(0, 3), [4, 5, 3, 4, 5]); +assertDeepEq([1, 2, 3, 4, 5].copyWithin(1, 3), [1, 4, 5, 4, 5]); +assertDeepEq([1, 2, 3, 4, 5].copyWithin(1, 2), [1, 3, 4, 5, 5]); +assertDeepEq([1, 2, 3, 4, 5].copyWithin(2, 2), [1, 2, 3, 4, 5]); + +// works with three arguments +assertDeepEq([1, 2, 3, 4, 5].copyWithin(0, 3, 4), [4, 2, 3, 4, 5]); +assertDeepEq([1, 2, 3, 4, 5].copyWithin(1, 3, 4), [1, 4, 3, 4, 5]); +assertDeepEq([1, 2, 3, 4, 5].copyWithin(1, 2, 4), [1, 3, 4, 4, 5]); + +// works with negative arguments +assertDeepEq([1, 2, 3, 4, 5].copyWithin(0, -2), [4, 5, 3, 4, 5]); +assertDeepEq([1, 2, 3, 4, 5].copyWithin(0, -2, -1), [4, 2, 3, 4, 5]); +assertDeepEq([1, 2, 3, 4, 5].copyWithin(-4, -3, -2), [1, 3, 3, 4, 5]); +assertDeepEq([1, 2, 3, 4, 5].copyWithin(-4, -3, -1), [1, 3, 4, 4, 5]); +assertDeepEq([1, 2, 3, 4, 5].copyWithin(-4, -3), [1, 3, 4, 5, 5]); + +// works with array-like objects +var args = (function () { return Array.prototype.slice.call(arguments); }(1, 2, 3)); +var argsClass = Object.prototype.toString.call(args); +assertDeepEq(args, [1, 2, 3]); +Array.prototype.copyWithin.call(args, -2, 0); +assertDeepEq(args, [1, 1, 2]); +assertDeepEq(Object.prototype.toString.call(args), argsClass); + +// throws on null/undefined values +assertThrowsInstanceOf(function() { + Array.prototype.copyWithin.call(null, 0, 3); +}, TypeError, "Assert that copyWithin fails if this value is null"); + +assertThrowsInstanceOf(function() { + Array.prototype.copyWithin.call(undefined, 0, 3); +}, TypeError, "Assert that copyWithin fails if this value is undefined"); + +// test with this value as string +assertThrowsInstanceOf(function() { + Array.prototype.copyWithin.call("hello world", 0, 3); +}, TypeError, "Assert that copyWithin fails if this value is string"); + +// test with this value as number +assertDeepEq(Array.prototype.copyWithin.call(34, 0, 3), new Number(34)); + +// test with this value as TypedArray +var buffer = new ArrayBuffer(16); +var int32View = new Int32Array(buffer); +for (var i=0; i start on 2 arguments +assertDeepEq([1, 2, 3, 4, 5].copyWithin(3, 0), [1, 2, 3, 1, 2]); + +// test with target > start on 3 arguments +assertDeepEq([1, 2, 3, 4, 5].copyWithin(3, 0, 4), [1, 2, 3, 1, 2]); + +// test on array with holes +var arr = new Array(6); +for (var i = 0; i < arr.length; i += 2) { + arr[i] = i; +} +assertDeepEq(arr.copyWithin(0, 3), [, 4, , , 4, , ]); + +// test on fractional arguments +assertDeepEq([1, 2, 3, 4, 5].copyWithin(0.2, 3.9), [4, 5, 3, 4, 5]); + +// test with -0 +assertDeepEq([1, 2, 3, 4, 5].copyWithin(-0, 3), [4, 5, 3, 4, 5]); + +// test with arguments more than this.length +assertDeepEq([1, 2, 3, 4, 5].copyWithin(0, 7), [1, 2, 3, 4, 5]); + +// test with arguments less than -this.length +assertDeepEq([1, 2, 3, 4, 5].copyWithin(-7, 0), [1, 2, 3, 4, 5]); + +// test with arguments equal to -this.length +assertDeepEq([1, 2, 3, 4, 5].copyWithin(-5, 0), [1, 2, 3, 4, 5]); + +// test on empty array +assertDeepEq([].copyWithin(0, 3), []); + +// test with target range being shorter than end - start +assertDeepEq([1, 2, 3, 4, 5].copyWithin(2, 1, 4), [1, 2, 2, 3, 4]); + +// test overlapping ranges +arr = [1, 2, 3, 4, 5]; +arr.copyWithin(2, 1, 4); +assertDeepEq(arr.copyWithin(2, 1, 4), [1, 2, 2, 2, 3]); + +// check that delete is strict +arr = [1, , 3, , 4, 5]; +Object.freeze(arr); +assertThrowsInstanceOf(function() { + arr.copyWithin(2, 1, 4); +}, TypeError, "Assert that delete is strict in copyWithin"); + +// test with a proxy object +var proxyObj = { + get: function(recipient, name) { + return recipient[name] + 2; + } +}; + +var p = new Proxy([1, 2, 3, 4, 5], proxyObj); +Array.prototype.copyWithin.call(p, 0, 3); +for (name of Object.getOwnPropertyNames(p)) { + print(name + ": " + JSON.stringify(Object.getOwnPropertyDescriptor(p, name))); +} + +assertDeepEq(p, [6, 7, , , 5]); + +// test if we throw in between +arr = [1, 2, 3, 4, 5]; +Object.defineProperty(arr, 1, { + set: function () { + throw new Error("Boom!"); + } +}); + +assertThrowsInstanceOf(function() { + arr.copyWithin(1, 3); +}, Error, "Throwing in between."); +assertEq(arr[0], 1); +assertEq(arr[1], undefined); +assertEq(arr[2], 3); +assertEq(arr[3], 4); +assertEq(arr[4], 5); + +// undefined as third argument +assertDeepEq([1, 2, 3, 4, 5].copyWithin(0, 3, undefined), [4, 5, 3, 4, 5]); + +// test that this.length is called only once +arr = {0: 1, 1: 2, 2: 3, 3: 4, 4: 5}; +var count = 0; +Object.defineProperty(arr, "length", { + get: function () { + count++; + } +}); +Array.prototype.copyWithin.call(arr, 1, 3); +assertEq(count, 1); + +count = 0; +Array.prototype.copyWithin.call(arr, 1, 3, 4); +assertEq(count, 1); + +var large = 10000; + +// test on a large array +arr = new Array(large); +assertDeepEq(arr.copyWithin(45, 900), arr); + +// test on floating point numbers +for (var i = 0; i < large; i++) { + arr[i] = Math.random(); +} +arr.copyWithin(45, 900); + +// test on array of objects +for (var i = 0; i < large; i++) { + arr[i] = { num: Math.random() }; +} +arr.copyWithin(45, 900); + +// test array length remains same +assertEq(arr.length, large); + +// test null on third argument is handled correctly +assertDeepEq([1, 2, 3, 4, 5].copyWithin(0, 3, null), [1, 2, 3, 4, 5]); + +// tamper the global Object prototype and test this works +Object.prototype[2] = 1; +assertDeepEq([1, 2, 3, 4, 5].copyWithin(0, 3), [4, 5, 3, 4, 5]); diff --git a/js/src/jit-test/tests/basic/array-length-double.js b/js/src/jit-test/tests/basic/array-length-double.js new file mode 100644 index 0000000000..f4e0fd210d --- /dev/null +++ b/js/src/jit-test/tests/basic/array-length-double.js @@ -0,0 +1,13 @@ +function getLength(arr) { + return arr.length; +} +function f() { + var arr1 = new Array(10); + var arr2 = new Array(4294967295); + + for (var i=0; i<10; i++) { + assertEq(getLength(arr1), 10); + assertEq(getLength(arr2), 4294967295); + } +} +f(); diff --git a/js/src/jit-test/tests/basic/array-proto-outofrange.js b/js/src/jit-test/tests/basic/array-proto-outofrange.js new file mode 100644 index 0000000000..795f41f72d --- /dev/null +++ b/js/src/jit-test/tests/basic/array-proto-outofrange.js @@ -0,0 +1,18 @@ +function f(obj) { + return typeof obj[15]; +} + +function test() { + var a = [1, 2]; + a.__proto__ = {15: 1337}; + var b = [1, 2, 3, 4]; + + for (var i = 0; i < 1000; i++) { + var r = f(i % 2 ? a : b); + assertEq(r, i % 2 ? "number" : "undefined"); + } +} + +test(); +test(); +test(); diff --git a/js/src/jit-test/tests/basic/array-slice.js b/js/src/jit-test/tests/basic/array-slice.js new file mode 100644 index 0000000000..5aa87f391b --- /dev/null +++ b/js/src/jit-test/tests/basic/array-slice.js @@ -0,0 +1,32 @@ +function check_specified_range_zero_base_slice() { + var arr = new Array(32) + arr[0]=0, arr[1]=1, arr[7]=7; + var res = arr.slice(0,10); + assertEq(arr[0],res[0]); + assertEq(arr[1],res[1]); + assertEq(arr[7],res[7]); + assertEq(res.length,10); +} + +function check_specified_range_slice() { + var arr = new Array(32) + arr[0]=0, arr[6]=1, arr[8]=3; + var res = arr.slice(5,9); + assertEq(arr[6],res[1]); + assertEq(arr[8],res[3]); + assertEq(res.length,4); +} + +function check_all_range_slice() { + var arr = new Array(32) + arr[0]=0, arr[6]=1, arr[8]=3; + var res = arr.slice(); + assertEq(arr[0],res[0]); + assertEq(arr[6],res[6]); + assertEq(arr[8],res[8]); + assertEq(res.length,32); +} + +check_all_range_slice(); +check_specified_range_slice(); +check_specified_range_zero_base_slice(); \ No newline at end of file diff --git a/js/src/jit-test/tests/basic/array-tosource.js b/js/src/jit-test/tests/basic/array-tosource.js new file mode 100644 index 0000000000..b1f51f26d3 --- /dev/null +++ b/js/src/jit-test/tests/basic/array-tosource.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !Array.prototype.toSource + +load(libdir + 'asserts.js'); + +assertEq(Array.prototype.toSource.call([1, 'hi']), '[1, "hi"]'); +assertEq(Array.prototype.toSource.call({1: 10, 0: 42, length: 2}), "[42, 10]"); +assertEq(Array.prototype.toSource.call({1: 10, 0: 42, length: 1}), "[42]"); +assertThrowsInstanceOf(() => Array.prototype.toSource.call("someString"), TypeError); +assertThrowsInstanceOf(() => Array.prototype.toSource.call(42), TypeError); +assertThrowsInstanceOf(() => Array.prototype.toSource.call(undefined), TypeError); diff --git a/js/src/jit-test/tests/basic/arrayConcat.js b/js/src/jit-test/tests/basic/arrayConcat.js new file mode 100644 index 0000000000..17ad877113 --- /dev/null +++ b/js/src/jit-test/tests/basic/arrayConcat.js @@ -0,0 +1,18 @@ + +/* Test concat compiler paths. */ + +for (var i = 9; i < 10; i++) + assertEq([2].concat([3])[0], 2); + +function f(a, b) { + return a.concat(b)[0]; +} +function g() { + var x = []; + var y = [1]; + for (var i = 0; i < 50; i++) + assertEq(f(x, y), 1); + eval('y[0] = "three"'); + assertEq(f(x, y), "three"); +} +g(); diff --git a/js/src/jit-test/tests/basic/arrayPopShift.js b/js/src/jit-test/tests/basic/arrayPopShift.js new file mode 100644 index 0000000000..9213f3c9ac --- /dev/null +++ b/js/src/jit-test/tests/basic/arrayPopShift.js @@ -0,0 +1,30 @@ + +/* Test pop/shift compiler paths. */ + +function a() { + var x = []; + for (var i = 0; i < 50; i++) + x.push(i); + for (var j = 0; j < 100; j++) { + var z = x.shift(); + if (j < 50) + assertEq(z, j); + else + assertEq(z, undefined); + } +} +a(); + +function b() { + var x = []; + for (var i = 0; i < 50; i++) + x.push(i); + for (var j = 0; j < 100; j++) { + var z = x.pop(); + if (j < 50) + assertEq(z, 49 - j); + else + assertEq(z, undefined); + } +} +b(); diff --git a/js/src/jit-test/tests/basic/arrayProto.js b/js/src/jit-test/tests/basic/arrayProto.js new file mode 100644 index 0000000000..0186d161e6 --- /dev/null +++ b/js/src/jit-test/tests/basic/arrayProto.js @@ -0,0 +1,12 @@ + +for (var i = 0; i < 15; i++) { + var x = Object.create([]); + assertEq(x.length, 0); +} + +for (var i = 0; i < 15; i++) { + function foo() {} + foo.prototype = []; + var x = new foo(); + assertEq(x.length, 0); +} diff --git a/js/src/jit-test/tests/basic/assign-primitive-error.js b/js/src/jit-test/tests/basic/assign-primitive-error.js new file mode 100644 index 0000000000..5dcf8b4d16 --- /dev/null +++ b/js/src/jit-test/tests/basic/assign-primitive-error.js @@ -0,0 +1,18 @@ +'use strict'; + +load(libdir + 'asserts.js'); + +assertTypeErrorMessage(() => { var x = 1; x.a = 'a'; }, + `can't assign to property "a" on 1: not an object`); +assertTypeErrorMessage(() => { var x = "hello"; x.b = 'a'; }, + `can't assign to property "b" on "hello": not an object`); +assertTypeErrorMessage(() => { var x = false; x.c = 'a'; }, + `can't assign to property "c" on false: not an object`); +assertTypeErrorMessage(() => { var x = Symbol(); x.d = 'a'; }, + `can't assign to property "d" on Symbol(): not an object`); +assertTypeErrorMessage(() => { var x = Symbol("abc"); x.d = 'a'; }, + `can't assign to property "d" on Symbol("abc"): not an object`); +assertTypeErrorMessage(() => { var x = 1; x[15] = 'a'; }, + `can't assign to property 15 on 1: not an object`); +assertTypeErrorMessage(() => { var x = 1; x[Symbol("abc")] = 'a'; }, + `can't assign to property Symbol("abc") on 1: not an object`); diff --git a/js/src/jit-test/tests/basic/assign-primitive-proxy-class-error.js b/js/src/jit-test/tests/basic/assign-primitive-proxy-class-error.js new file mode 100644 index 0000000000..a861c00c36 --- /dev/null +++ b/js/src/jit-test/tests/basic/assign-primitive-proxy-class-error.js @@ -0,0 +1,14 @@ +'use strict'; + +load(libdir + 'asserts.js'); + +let hook = {} +let Base = function() {} +Base.prototype = new Proxy(Base.prototype, hook); +class Derived extends Base { + testPrimitiveReceiver() { + super.foo = "Derived"; + } +} +assertTypeErrorMessage(() => Derived.prototype.testPrimitiveReceiver.call(null), + `can't assign to property "foo" on ({}): not an object`) diff --git a/js/src/jit-test/tests/basic/assign-reuse-propmap.js b/js/src/jit-test/tests/basic/assign-reuse-propmap.js new file mode 100644 index 0000000000..e78bddd20e --- /dev/null +++ b/js/src/jit-test/tests/basic/assign-reuse-propmap.js @@ -0,0 +1,41 @@ +function testBasic() { + var o1 = {x: 1}; + var o2 = {a: 1, b: 2, c: 3, x: 4, y: 5, z: 6}; + for (var i = 0; i < 4; i++) { + var to1 = Object.assign({}, o1); + assertEq(JSON.stringify(to1), '{"x":1}'); + var to2 = Object.assign({}, o2); + assertEq(JSON.stringify(to2), '{"a":1,"b":2,"c":3,"x":4,"y":5,"z":6}'); + } +} +testBasic(); + +// Target object's proto must not be changed by assign. +function testProto() { + var from = {}; + from.a = 1; + from.b = 2; + from.c = 3; + for (var i = 0; i < 5; i++) { + var to = Object.assign(Object.create(null), from); + assertEq(JSON.stringify(to), '{"a":1,"b":2,"c":3}'); + assertEq(Object.getPrototypeOf(to), null); + } +} +testProto(); + +// Target object's realm must not be changed by assign. +function testRealm() { + var global = newGlobal({sameCompartmentAs: this}); + var from = global.evaluate("({})"); + from.a = 1; + from.b = 2; + from.c = 3; + for (var i = 0; i < 5; i++) { + var to = Object.assign({}, from); + assertEq(JSON.stringify(to), '{"a":1,"b":2,"c":3}'); + assertEq(objectGlobal(to), this); + assertEq(Object.getPrototypeOf(to), Object.prototype); + } +} +testRealm(); diff --git a/js/src/jit-test/tests/basic/basic-fuses.js b/js/src/jit-test/tests/basic/basic-fuses.js new file mode 100644 index 0000000000..220c22ba8a --- /dev/null +++ b/js/src/jit-test/tests/basic/basic-fuses.js @@ -0,0 +1,57 @@ +// |jit-test| skip-if: !(getBuildConfiguration('debug')||getBuildConfiguration('fuzzing-defined')) + +function intact(name) { + let state = getFuseState(); + if (!(name in state)) { + throw "No such fuse " + name; + } + return state[name].intact +} + +function testRealmChange() { + let g = newGlobal(); + g.evaluate(intact.toString()) + + // Get a mutating function which will affect the symbol.iterator fuse. + let rdel = g.evaluate("function del(o) { delete o.prototype[Symbol.iterator] };del") + // Fuse is still intact. + g.evaluate(`assertEq(intact("ArrayPrototypeIteratorFuse"), true)`); + + // setup a new global, + let g2 = newGlobal(); + g2.evaluate(intact.toString()) + + // register the popping function. + g2.rdel = rdel; + + // Pop the array fuse in the new global. + g2.evaluate(`rdel(Array)`); + + // The realm of the original array should have a fuse still intact + g.evaluate(`assertEq(intact("ArrayPrototypeIteratorFuse"), true)`); + + // The realm of the array proto should no longer be intact. Oh dear. This is + // interesting. We currently ask the cx for the array iterator proto, + g2.evaluate(`assertEq(intact("ArrayPrototypeIteratorFuse"), false)`); +} + +testRealmChange(); + +function testInNewGlobal(pre, post) { + g = newGlobal(); + g.evaluate(intact.toString()); + g.evaluate(pre) + g.evaluate("assertRealmFuseInvariants()"); + g.evaluate(post); +} + +testInNewGlobal("delete Array.prototype[Symbol.iterator]", `assertEq(intact("ArrayPrototypeIteratorFuse"), false)`) +testInNewGlobal("([])[Symbol.iterator]().__proto__['return'] = () => 10;", `assertEq(intact("ArrayIteratorPrototypeHasNoReturnProperty"), false)`) +testInNewGlobal("([])[Symbol.iterator]().__proto__.__proto__['return'] = () => 10;", `assertEq(intact("IteratorPrototypeHasNoReturnProperty"), false)`) +testInNewGlobal("Object.prototype['return'] = () => 10;", `assertEq(intact("ObjectPrototypeHasNoReturnProperty"), false)`) +testInNewGlobal(`assertEq(intact("ArrayIteratorPrototypeHasIteratorProto"), true); Object.setPrototypeOf(( ([])[Symbol.iterator]().__proto__ ), {a:10})`, `assertEq(intact("ArrayIteratorPrototypeHasIteratorProto"), false);`); +testInNewGlobal(`assertEq(intact("IteratorPrototypeHasObjectProto"), true); Object.setPrototypeOf( ( ([])[Symbol.iterator]().__proto__.__proto__ ), {a:10})`, `assertEq(intact("IteratorPrototypeHasObjectProto"), false);`); + +testInNewGlobal(`assertEq(intact("hasSeenObjectEmulateUndefinedFuse"), true); createIsHTMLDDA()`, `assertEq(intact("hasSeenObjectEmulateUndefinedFuse"), false);`); +// Runtime wide fuse. +assertEq(intact("hasSeenObjectEmulateUndefinedFuse"), false); diff --git a/js/src/jit-test/tests/basic/bigLoadStoreDisp.js b/js/src/jit-test/tests/basic/bigLoadStoreDisp.js new file mode 100644 index 0000000000..4f0df81550 --- /dev/null +++ b/js/src/jit-test/tests/basic/bigLoadStoreDisp.js @@ -0,0 +1,25 @@ +// In Nanojit, loads and stores have a maximum displacement of 16-bits. Any +// displacements larger than that should be split off into a separate +// instruction that adds the displacement to the base pointer. This +// program tests if this is done correctly. +// +// x.y ends up having a dslot offset of 79988, because of the 20000 array +// elements before it. If Nanojit incorrectly stores this offset into a +// 16-bit value it will truncate to 14452 (because 79988 - 65536 == 14452). +// This means that the increments in the second loop will be done to one of +// the array elements instead of x.y. And so x.y's final value will be +// (99 + 8) instead of 1099. +// +// Note that setting x.y to 99 and checking its value at the end will +// access the correct location because those lines are interpreted. Phew. + +var x = {} +for (var i = 0; i < 20000; i++) + x[i] = 0; +x.y = 99; // not traced, correctly accessed + +for (var i = 0; i < 1000; ++i) { + x.y++; // traced, will access an array elem if disp was truncated +} +assertEq(x.y, 1099); // not traced, correctly accessed + diff --git a/js/src/jit-test/tests/basic/bindname-in-strict-eval.js b/js/src/jit-test/tests/basic/bindname-in-strict-eval.js new file mode 100644 index 0000000000..e052a65dd5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bindname-in-strict-eval.js @@ -0,0 +1,3 @@ +'use strict'; +eval("var i = 0; var end = 9; for(var j = 0; j < end; i++, j++) { i = 0; }"); +print("done"); diff --git a/js/src/jit-test/tests/basic/bitwiseAnd.js b/js/src/jit-test/tests/basic/bitwiseAnd.js new file mode 100644 index 0000000000..dc9fafa4ff --- /dev/null +++ b/js/src/jit-test/tests/basic/bitwiseAnd.js @@ -0,0 +1,10 @@ +function bitwiseAnd_inner(bitwiseAndValue) { + for (var i = 0; i < 60000; i++) + bitwiseAndValue = bitwiseAndValue & i; + return bitwiseAndValue; +} +function bitwiseAnd() +{ + return bitwiseAnd_inner(12341234); +} +assertEq(bitwiseAnd(), 0); diff --git a/js/src/jit-test/tests/basic/bitwiseGlobal.js b/js/src/jit-test/tests/basic/bitwiseGlobal.js new file mode 100644 index 0000000000..e8967c12b8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bitwiseGlobal.js @@ -0,0 +1,8 @@ +bitwiseAndValue = Math.pow(2,32); +for (var i = 0; i < 60000; i++) + bitwiseAndValue = bitwiseAndValue & i; + +assertEq(bitwiseAndValue, 0); + + + diff --git a/js/src/jit-test/tests/basic/blinterp-jitoption.js b/js/src/jit-test/tests/basic/blinterp-jitoption.js new file mode 100644 index 0000000000..68c042b288 --- /dev/null +++ b/js/src/jit-test/tests/basic/blinterp-jitoption.js @@ -0,0 +1,3 @@ +// |jit-test| error:Enabling or disabling the Baseline Interpreter +let blInterpEnabled = getJitCompilerOptions()['blinterp.enable'] === 1; +setJitCompilerOption("blinterp.enable", blInterpEnabled ? 0 : 1); diff --git a/js/src/jit-test/tests/basic/bound-function-proto.js b/js/src/jit-test/tests/basic/bound-function-proto.js new file mode 100644 index 0000000000..a692381717 --- /dev/null +++ b/js/src/jit-test/tests/basic/bound-function-proto.js @@ -0,0 +1,18 @@ +// When allocating a bound function in JIT code, ensure it ends up with the +// correct proto. +function f() { + var arr = [function(){}, function(){}]; + + arr[0].bind = Function.prototype.bind; + arr[1].bind = Function.prototype.bind; + + var proto = {}; + Object.setPrototypeOf(arr[1], proto); + + for (var i = 0; i < 2000; i++) { + var fun = arr[Number(i > 1000)]; + var bound = fun.bind(null); + assertEq(Object.getPrototypeOf(bound), i > 1000 ? proto : Function.prototype); + } +} +f(); diff --git a/js/src/jit-test/tests/basic/bug-1133377.js b/js/src/jit-test/tests/basic/bug-1133377.js new file mode 100644 index 0000000000..3883eb7435 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug-1133377.js @@ -0,0 +1,11 @@ +var buffer = new ArrayBuffer(100); + +view = new DataView(buffer, undefined, undefined); +assertEq(view.buffer, buffer); +assertEq(view.byteOffset, 0); +assertEq(view.byteLength, 100); + +view = new DataView(buffer, 20, undefined); +assertEq(view.buffer, buffer); +assertEq(view.byteOffset, 20); +assertEq(view.byteLength, 80); diff --git a/js/src/jit-test/tests/basic/bug-1198090.js b/js/src/jit-test/tests/basic/bug-1198090.js new file mode 100644 index 0000000000..2ee6b5a2ed --- /dev/null +++ b/js/src/jit-test/tests/basic/bug-1198090.js @@ -0,0 +1,9 @@ +// |jit-test| allow-oom; skip-if: !('oomAtAllocation' in this) + +for (let a of [ + null, function() {}, function() {}, null, function() {}, function() {}, + function() {}, null, null, null, null, null, null, null, null, + function() {}, null, null, null, function() {} + ]) { + oomAtAllocation(5); +} diff --git a/js/src/jit-test/tests/basic/bug-1240532.js b/js/src/jit-test/tests/basic/bug-1240532.js new file mode 100644 index 0000000000..6fd1ccd46f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug-1240532.js @@ -0,0 +1,3 @@ +if (helperThreadCount() > 0) { + evalInWorker("try { newGlobal({principal : 5}); } catch (e) {}"); +} diff --git a/js/src/jit-test/tests/basic/bug-1271507.js b/js/src/jit-test/tests/basic/bug-1271507.js new file mode 100644 index 0000000000..88097aca8d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug-1271507.js @@ -0,0 +1,11 @@ +// |jit-test| allow-oom; skip-if: typeof oomAfterAllocations !== 'function' +lfcode = new Array(); +oomAfterAllocations(100); +loadFile(file); +lfGlobal = newGlobal() +for (lfLocal in this) + if (!(lfLocal in lfGlobal)) + lfGlobal[lfLocal] = this[lfLocal] +offThreadCompileToStencil(lfVarx); +var stencil = lfGlobal.finishOffThreadStencil(); +lfGlobal.evalStencil(stencil); diff --git a/js/src/jit-test/tests/basic/bug-1649234-1.js b/js/src/jit-test/tests/basic/bug-1649234-1.js new file mode 100644 index 0000000000..ab8368893b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug-1649234-1.js @@ -0,0 +1,8 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") + +timeout(0.1, function() { return false; }); +Atomics.add(new Int32Array(1), 0, { + valueOf() { + while (1); + } +}); diff --git a/js/src/jit-test/tests/basic/bug-1649234-2.js b/js/src/jit-test/tests/basic/bug-1649234-2.js new file mode 100644 index 0000000000..c5cbfc5e46 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug-1649234-2.js @@ -0,0 +1,9 @@ +// |jit-test| exitstatus: 6; + +setInterruptCallback(() => false); +0n == { + valueOf() { + interruptIf(true); + for (;;) {} // block until interrupt callback, which terminates the script + } +}; diff --git a/js/src/jit-test/tests/basic/bug-1649234-3.js b/js/src/jit-test/tests/basic/bug-1649234-3.js new file mode 100644 index 0000000000..80df8b3ecf --- /dev/null +++ b/js/src/jit-test/tests/basic/bug-1649234-3.js @@ -0,0 +1,14 @@ +// |jit-test| exitstatus: 3; skip-if: getBuildConfiguration('pbl') + +let debuggerRealm = newGlobal({newCompartment: true}); +debuggerRealm.debuggee = this; +debuggerRealm.eval(` + let dbg = new Debugger(debuggee); + dbg.onDebuggerStatement = (frame) => null; // terminate the debuggee +`); + +Atomics.add(new Int32Array(1), 0, { + valueOf() { + debugger; + } +}); diff --git a/js/src/jit-test/tests/basic/bug-1663741.js b/js/src/jit-test/tests/basic/bug-1663741.js new file mode 100644 index 0000000000..866bd083a3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug-1663741.js @@ -0,0 +1,29 @@ +const thisGlobal = this; +const otherGlobalSameCompartment = newGlobal({sameCompartmentAs: thisGlobal}); +const otherGlobalNewCompartment = newGlobal({newCompartment: true}); + +const globals = [thisGlobal, otherGlobalSameCompartment, otherGlobalNewCompartment]; + +function testProperties(global, count) { + let {object: source, transplant} = transplantableObject(); + + // Create a bunch properties on |source|, which force allocation of dynamic + // slots. + for (let i = 0; i < count; i++) { + source["foo" + i] = i; + } + + // Calling |transplant| transplants the object and then returns undefined. + transplant(global); + + // Check the properties were copied over to the swapped object. + for (let i = 0; i < count; i++) { + assertEq(source["foo" + i], i); + } +} + +for (let global of globals) { + for (let count of [0, 10, 30]) { + testProperties(global, count); + } +} diff --git a/js/src/jit-test/tests/basic/bug-1665583.js b/js/src/jit-test/tests/basic/bug-1665583.js new file mode 100644 index 0000000000..012dc1d043 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug-1665583.js @@ -0,0 +1,41 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function parseModule(source) { + offThreadCompileModuleToStencil(source); + var stencil = finishOffThreadStencil(); + return instantiateModuleStencil(stencil); +} +function loadFile(lfVarx) { + oomTest(function() { + parseModule(lfVarx); + }); +} +loadFile(` +const numberingSystems = { + "adlm": {}, + "ahom": {}, + "arab": {}, + "arabext": {}, + "armn": {}, + "armnlow": {}, + "bali": {}, + "beng": {}, + "bhks": {}, + "brah": {}, + "cakm": {}, + "cham": {}, + "cyrl": {}, + "hmnp": {}, + "java": {}, + "jpan": {}, + "jpanfin": {}, + "jpanyear": {}, + "knda": {}, + "lana": {}, + "latn": {}, + "lepc": {}, + "limb": {}, + "wcho": {}, + "extra1": {} +}; +`); diff --git a/js/src/jit-test/tests/basic/bug-1707422.js b/js/src/jit-test/tests/basic/bug-1707422.js new file mode 100644 index 0000000000..fa46c69735 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug-1707422.js @@ -0,0 +1,14 @@ +x = "a"; +x += +"a"; +x += +"a"; +x += x; +x += x; +var s = x; +x += 0; +y = x += 0; +y += x += "a"; +for (let i = 0; i < 12; ++i) { + try { + this(); + } catch {} +} diff --git a/js/src/jit-test/tests/basic/bug-508061.js b/js/src/jit-test/tests/basic/bug-508061.js new file mode 100644 index 0000000000..8ee45e8610 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug-508061.js @@ -0,0 +1,11 @@ +function loop() { + var x; + for (var i = 0; i < 9; i++) + x = {1.5: 1}; + return x; +} + +loop(); // record +Object.prototype.__defineSetter__('1.5', function () { return 'BAD'; }); +var x = loop(); // playback +assertEq(x["1.5"], 1); \ No newline at end of file diff --git a/js/src/jit-test/tests/basic/bug-826124.js b/js/src/jit-test/tests/basic/bug-826124.js new file mode 100644 index 0000000000..6efda93aaf --- /dev/null +++ b/js/src/jit-test/tests/basic/bug-826124.js @@ -0,0 +1,14 @@ +var x = {}; +function f() { y.prop; } +x.toStr = function () { f(); }; +try { + f(); +} catch (e) { } +try { + x.toStr(); +} catch (e) { } +try { + function f() { which = 2; } + x.toStr(); +} catch (e) { which = 1; } +assertEq(which, 2); diff --git a/js/src/jit-test/tests/basic/bug1001090-1.js b/js/src/jit-test/tests/basic/bug1001090-1.js new file mode 100644 index 0000000000..86970ffc46 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1001090-1.js @@ -0,0 +1,2 @@ +(function() { let arguments })(); +(() => { let arguments; })() diff --git a/js/src/jit-test/tests/basic/bug1001090-2.js b/js/src/jit-test/tests/basic/bug1001090-2.js new file mode 100644 index 0000000000..2a3be27221 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1001090-2.js @@ -0,0 +1,5 @@ +// |jit-test| error: ReferenceError +(function() { + with(x); + let x +})() diff --git a/js/src/jit-test/tests/basic/bug1001090-3.js b/js/src/jit-test/tests/basic/bug1001090-3.js new file mode 100644 index 0000000000..3739c06b6f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1001090-3.js @@ -0,0 +1,27 @@ +var output = []; +function g(s) { + L = s.length; + for (var i = 0; i < L; i++) { + a = s.charAt() + } +} +function h(f, inputs) { + results = []; + for (var j = 0; j < 99; ++j) { + for (var k = 0; k < 99; ++k) { + try { + results.push(f()) + } catch (e) {} + } + } + output.push(g(JSON.stringify(results))) +} +m = (function(x, y) {}); +h(m, []) +try { + output.push(x); + let x = s() +} catch (e) {} + +assertEq(output.length, 1); +assertEq(output[0], undefined); diff --git a/js/src/jit-test/tests/basic/bug1001090-4.js b/js/src/jit-test/tests/basic/bug1001090-4.js new file mode 100644 index 0000000000..a94048af46 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1001090-4.js @@ -0,0 +1,30 @@ +var output = []; +function g(s) { + for (var i = 0; i < s.length; i++) { + s.charAt() + } +} +function h(f, inputs) { + results = [] + for (var j = 0; j < 99; ++j) { + for (var k = 0; k < 99; ++k) { + try { + results.push(f()) + } catch (e) {} + } + } + g(JSON.stringify(results)) +} +try { + x() +} catch (e) {} +m = function(y) { + return y; +}; +h(m, []); +try { + output.push(b); + let b = ""; +} catch (e) {} + +assertEq(output.length, 0); diff --git a/js/src/jit-test/tests/basic/bug1001090-5.js b/js/src/jit-test/tests/basic/bug1001090-5.js new file mode 100644 index 0000000000..4636ca053f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1001090-5.js @@ -0,0 +1,6 @@ +// |jit-test| error: ReferenceError +evalcx("\ + for(x = 0; x < 9; x++) {\ + let y = y.s()\ + }\ +", newGlobal()) diff --git a/js/src/jit-test/tests/basic/bug1001090-6.js b/js/src/jit-test/tests/basic/bug1001090-6.js new file mode 100644 index 0000000000..14d60e8043 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1001090-6.js @@ -0,0 +1,7 @@ +// |jit-test| error: ReferenceError +(function() { + ((function() { + p(y) + })()); + let y +})() diff --git a/js/src/jit-test/tests/basic/bug1003161.js b/js/src/jit-test/tests/basic/bug1003161.js new file mode 100644 index 0000000000..c2c602acb5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1003161.js @@ -0,0 +1,8 @@ + +function foo(a, b) { + function bar() { + return b; + } + return arguments[0] + arguments[1] + bar(); +} +foo(1, 2); diff --git a/js/src/jit-test/tests/basic/bug1008339.js b/js/src/jit-test/tests/basic/bug1008339.js new file mode 100644 index 0000000000..f253d6024c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1008339.js @@ -0,0 +1,64 @@ + +var count = 0; + +function Parent() { + // Scanning "this" properties here with Object.keys() solved the bug in my case + //Object.keys(this); + + this.log('Parent ctor'); + this.meth1(); + this.log('data3 before : ' + this.data3); + this.meth2(); + // Added properties lost in ChildA + this.log('data3 after : ' + this.data3); + this.log(''); + + if (count++) + assertEq(this.data3, 'z'); +} +Parent.prototype.meth1 = function () { + this.log('Parent.meth1()'); +}; +Parent.prototype.meth2 = function () { + this.log('Parent.meth2()'); + // Requirement for the bug : Parent.meth2() needs to add data + this.data4 = 'x'; +}; +Parent.prototype.log = function (data) { + print(data); +} + +// Intermediate constructor to instantiate children prototype without executing Parent constructor code +function ParentEmptyCtor() { } +ParentEmptyCtor.prototype = Parent.prototype; + +function ChildA() { + this.log('ChildA ctor'); + Parent.call(this); +} +ChildA.prototype = new ParentEmptyCtor(); +// Using Object.create() instead solves the bug +//ChildA.prototype = Object.create(ParentEmptyCtor.prototype); +ChildA.prototype.constructor = ChildA; +ChildA.prototype.meth1 = function () { + this.log('ChildA.meth1()'); + this.data3 = 'z'; +}; +ChildA.prototype.meth2 = function () { + this.log('ChildA.meth2()'); +}; + +function ChildB() { + this.log('ChildB ctor'); + Parent.call(this); +} +ChildB.prototype = new ParentEmptyCtor(); +//ChildB.prototype = Object.create(ParentEmptyCtor.prototype); +ChildB.prototype.constructor = ChildB; + +function demo() { + // Requirement for the bug : ChildB needs to be instantiated before ChildA + new ChildB(); + new ChildA(); +} +demo(); diff --git a/js/src/jit-test/tests/basic/bug1013922.js b/js/src/jit-test/tests/basic/bug1013922.js new file mode 100644 index 0000000000..febe32ea5f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1013922.js @@ -0,0 +1,67 @@ +String.prototype.repeat = function(num) { + return new Array(num + 1).join(this); +} + +function set_to_length(length, frag_size) +{ + var fragment = "'" + "x".repeat(frag_size) + "' + "; + var frags = Math.floor((length - 1)/frag_size); + var code = "var x = " + fragment.repeat(frags) + "'" + + "x".repeat(length - frags * frag_size) + "';"; + + try { + eval(code); + } + catch(err) { + if (err.message && err.message == "Out of memory") + return -1; + if (err == "out of memory") + return -1; + throw(err); /* Oops, broke something. */ + } + + return code.length; +} + +var first_fail; +var first_pass; +var frag_size; +var pass_code_length; + +function search_up() +{ + if (set_to_length(first_fail, frag_size) < 0) { + setTimeout(binary_search, 0); + return; + } + + first_fail *= 2; +} + +function binary_search() +{ + if (first_fail - first_pass > 1) { + var length = (first_pass + first_fail) / 2; + var code_len = set_to_length(length, frag_size); + if (code_len > 0) { + first_pass = length; + pass_code_length = code_len; + } else + first_fail = length; + setTimeout(binary_search, 0); + return; + } +} + +function run_find_limit() +{ + frag_size = 64; + first_fail = 65536; /* A guess */ + first_pass = 0; + pass_code_length = 0; + + for (var i=0; i<5; i++) + search_up(0); +} + +run_find_limit(); diff --git a/js/src/jit-test/tests/basic/bug1015339.js b/js/src/jit-test/tests/basic/bug1015339.js new file mode 100644 index 0000000000..2441811d49 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1015339.js @@ -0,0 +1,8 @@ +function f(x, y) { + for (var i=0; i<40; i++) { + var stack = getBacktrace({args: true, locals: true, thisprops: true}); + assertEq(stack.includes("f(x = "), true); + backtrace(); + } +} +f(1, 2); diff --git a/js/src/jit-test/tests/basic/bug1015766.js b/js/src/jit-test/tests/basic/bug1015766.js new file mode 100644 index 0000000000..e76aff7c7a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1015766.js @@ -0,0 +1,10 @@ +gczeal(8, 2) +try { + [new String, y] +} catch (e) {} +r = /()/ +try { + "".replace(r, () => { + []() + }); +} catch(e) {} diff --git a/js/src/jit-test/tests/basic/bug1018620.js b/js/src/jit-test/tests/basic/bug1018620.js new file mode 100644 index 0000000000..64463d23c4 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1018620.js @@ -0,0 +1,5 @@ + +String.prototype.search = evalcx('').String.prototype.search; +''.search(/()/); +gcPreserveCode(); +gc(this); diff --git a/js/src/jit-test/tests/basic/bug1024786.js b/js/src/jit-test/tests/basic/bug1024786.js new file mode 100644 index 0000000000..6811513cbe --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1024786.js @@ -0,0 +1,65 @@ +//|jit-test| error: SyntaxError + +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +(function(){}); +evaluate("function f(){\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",({ + fileName: null, + lineNumber: 42, + isRunOnce: 9, +})) diff --git a/js/src/jit-test/tests/basic/bug1033946.js b/js/src/jit-test/tests/basic/bug1033946.js new file mode 100644 index 0000000000..e2f07a8532 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1033946.js @@ -0,0 +1,2 @@ +assertEq((/(?!(?!(?!6)[\Wc]))/i).test(), false); +assertEq("foobar\xff5baz\u1200".search(/bar\u0178\d/i), 3); diff --git a/js/src/jit-test/tests/basic/bug1035287-track-allocation-sites-recursion.js b/js/src/jit-test/tests/basic/bug1035287-track-allocation-sites-recursion.js new file mode 100644 index 0000000000..79394c31c7 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1035287-track-allocation-sites-recursion.js @@ -0,0 +1,7 @@ +// |jit-test| exitstatus: 3 + +enableTrackAllocations(); +function f() { + eval('f();'); +} +f(); diff --git a/js/src/jit-test/tests/basic/bug1035325.js b/js/src/jit-test/tests/basic/bug1035325.js new file mode 100644 index 0000000000..48e6ff33a1 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1035325.js @@ -0,0 +1 @@ +print("\uDBFF\uDFFF"); // don't crash/assert diff --git a/js/src/jit-test/tests/basic/bug1054243.js b/js/src/jit-test/tests/basic/bug1054243.js new file mode 100644 index 0000000000..66d167ad70 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1054243.js @@ -0,0 +1,3 @@ +// |jit-test| error: uncaught exception +var prox = new Proxy({}, {getOwnPropertyDescriptor: function() { throw prox; }}); +Object.prototype.__lookupGetter__.call(prox, 'q'); diff --git a/js/src/jit-test/tests/basic/bug1057571.js b/js/src/jit-test/tests/basic/bug1057571.js new file mode 100644 index 0000000000..740febd3e6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1057571.js @@ -0,0 +1,15 @@ + +test = (function () { + function f() { + [1,2,3,4,5]; + }; + return "var obj = { x : 2 };" + f.toString() + "; f()"; +})(); +evalWithCache(test, {}); +function evalWithCache(code, ctx) { + code = cacheEntry(code); + ctx.global = newGlobal(); + ctx.isRunOnce = true; + var res1 = evaluate(code, Object.create(ctx, {saveIncrementalBytecode: { value: true } })); + var res2 = evaluate(code, Object.create(ctx, {loadBytecode: { value: true }, saveIncrementalBytecode: { value: true } })); +} diff --git a/js/src/jit-test/tests/basic/bug1059459.js b/js/src/jit-test/tests/basic/bug1059459.js new file mode 100644 index 0000000000..47f0246c71 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1059459.js @@ -0,0 +1 @@ +evalcx(" s = 3; s; for(let x = 0; x < 1; ++x) { null }", newGlobal()) diff --git a/js/src/jit-test/tests/basic/bug1061534.js b/js/src/jit-test/tests/basic/bug1061534.js new file mode 100644 index 0000000000..3fce6a7580 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1061534.js @@ -0,0 +1,15 @@ + +test = (function () { + function f() {}; + return "var obj = { x : 2 };" + f.toString() + (4); +})(); +evalWithCache(test, {}); +function evalWithCache(code, ctx) { + code = cacheEntry(code); + ctx.global = newGlobal({ cloneSingletons: true }); + var res1 = evaluate(code, Object.create(ctx, {saveIncrementalBytecode: { value: true } })); +} +if (typeof assertThrowsInstanceOf === 'undefined') { + var assertThrowsInstanceOf = function assertThrowsInstanceOf(f, ctor, msg) {}; +} +evaluate('evaluate(\'assertThrowsInstanceOf(function () {}, ["jak", "ms"]);\', { noScriptRval : true, isRunOnce: true })'); diff --git a/js/src/jit-test/tests/basic/bug1066414.js b/js/src/jit-test/tests/basic/bug1066414.js new file mode 100644 index 0000000000..be7ab33466 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1066414.js @@ -0,0 +1 @@ +for (var [...y] in Object) {} // dont assert diff --git a/js/src/jit-test/tests/basic/bug1078871.js b/js/src/jit-test/tests/basic/bug1078871.js new file mode 100644 index 0000000000..13ed812801 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1078871.js @@ -0,0 +1,44 @@ + +// Robert Jenkins' 32 bit integer hash function +var seed = 100; +Math.random = function() { + seed = (seed + 0x7ed55d16) + (seed<<12); + seed = (seed ^ 0xc761c23c) ^ (seed>>19); + seed = (seed + 0x165667b1) + (seed<<5); + seed = (seed + 0xd3a2646c) ^ (seed<<9); + seed = (seed + 0xfd7046c5) + (seed<<3); + seed = (seed ^ 0xb55a4f09) ^ (seed>>16); + seed = Math.abs(seed | 0); + return seed / 0xffffffff * 2; +} + +function tangle(n, m) { + function rand(n) { + return Math.floor(Math.random() * n); + } + + var arr = []; + for (var i = 0; i < n; i++) + arr[i] = String.fromCharCode(65 + rand(26)); + for (var i = 0; i < m; i++) { + var j = rand(n); + switch (rand(2)) { + case 0: { + var s = arr[rand(n)]; + var b = rand(s.length); + var e = b + rand(s.length - b); + if (e - b > 1) + arr[j] = s.substring(b, e); + } + break; + case 1: { + arr[j] = arr[rand(n)] + arr[rand(n)]; + } + } + JSON.stringify(arr[j]); + } + + return arr; +} + +tangle(10, 500); diff --git a/js/src/jit-test/tests/basic/bug1081175.js b/js/src/jit-test/tests/basic/bug1081175.js new file mode 100644 index 0000000000..32766d7680 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1081175.js @@ -0,0 +1,20 @@ +var input = "webkit-search-cancel-button-aaaaaaa-bbbbb-ccccccc-dddddddd," +var bad_regex = '([a-u-]|\\u0080|\\u0100)*[d]'; + +function forceUnicode(s) { + return ('\uffff' + s).replace(/^\uffff/, ''); +} +function testRegex(input) { + for (var i = 0; i < input.length; i++) { + var sub = input.substring(0, i + 1); + var res = sub.match(bad_regex); + if (i >= 50) { + assertEq(res.length, 2); + assertEq(res[1], sub.substr(-2, 1)); + } else { + assertEq(res, null); + } + } +} +testRegex(input); +testRegex(forceUnicode(input)); diff --git a/js/src/jit-test/tests/basic/bug1085464.js b/js/src/jit-test/tests/basic/bug1085464.js new file mode 100644 index 0000000000..1c09eb8afc --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1085464.js @@ -0,0 +1,20 @@ +function *f() { + var o = new Proxy({}, { + get: function() { assertEq(0, 1); }, + has: function() { assertEq(0, 2); } + }); + + with (o) { + yield 1; + with ({}) { + yield 2; + } + } + with ({".generator": 100}) { + yield eval("3"); + } +} +var s = ""; +for (var i of f()) + s += i; +assertEq(s, "123"); diff --git a/js/src/jit-test/tests/basic/bug1091757.js b/js/src/jit-test/tests/basic/bug1091757.js new file mode 100644 index 0000000000..e3c437b6a2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1091757.js @@ -0,0 +1,11 @@ +try { + (function() { + let a = 3; + let XY = XY; + return function() { return a; }; + })(); + assertEq(0, 1); +} catch(e) { + assertEq(e instanceof ReferenceError, true); + assertEq(e.message.includes("XY"), true); +} diff --git a/js/src/jit-test/tests/basic/bug1100623.js b/js/src/jit-test/tests/basic/bug1100623.js new file mode 100644 index 0000000000..dbd75ed4dd --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1100623.js @@ -0,0 +1,16 @@ +// |jit-test| error: baz is null; skip-if: getBuildConfiguration('pbl') +// +// (skip if PBL enabled: it doesn't support the decompiler so doesn't give the +// specific error message) + +var document = {getElementById: () => null}; + +(function() { + const one = 1; + + function foo() { return one; } + function bar() { return foo(); } + + var baz = document.getElementById("baz"); + baz.value; +})(); diff --git a/js/src/jit-test/tests/basic/bug1106982-2.js b/js/src/jit-test/tests/basic/bug1106982-2.js new file mode 100644 index 0000000000..1983c4b04f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1106982-2.js @@ -0,0 +1,15 @@ +var x = "wrong"; +var t = {x: "x"}; +var hits = 0; +var p = new Proxy(t, { + has(t, id) { + var found = id in t; + if (++hits == 2) + delete t[id]; + return found; + }, + get(t, id) { return t[id]; } +}); +evaluate(`x += " x";`, {envChainObject: p}); +assertEq(hits, 2); +assertEq(t.x, "undefined x"); diff --git a/js/src/jit-test/tests/basic/bug1106982.js b/js/src/jit-test/tests/basic/bug1106982.js new file mode 100644 index 0000000000..ededf3b936 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1106982.js @@ -0,0 +1,19 @@ +var x = "wrong"; +var t = {x: "x"}; +var hits = 0; +var p = new Proxy(t, { + has(t, id) { + var found = id in t; + if (++hits == 2) + delete t[id]; + return found; + }, + get(t, id) { return t[id]; } +}); +with (p) + x += " x"; +// If you change this testcase (e.g. because we fix the number of +// has() calls we end up making to match spec better), don't forget to +// update bug1106982-2.js too. See also bug 1145641. +assertEq(hits, 2); +assertEq(t.x, "undefined x"); diff --git a/js/src/jit-test/tests/basic/bug1113980.js b/js/src/jit-test/tests/basic/bug1113980.js new file mode 100644 index 0000000000..d975c5d8d1 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1113980.js @@ -0,0 +1,10 @@ +var p = new Proxy({}, { + getOwnPropertyDescriptor: function() { + return {value: 1, configurable: true, writable: true}; + }, + defineProperty: function() { + } +}, null); + +var o = Object.create(p); +o.a = 1; diff --git a/js/src/jit-test/tests/basic/bug1118996.js b/js/src/jit-test/tests/basic/bug1118996.js new file mode 100644 index 0000000000..44b345711d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1118996.js @@ -0,0 +1,13 @@ +// |jit-test| allow-oom; --fuzzing-safe; --no-threads; --no-ion; allow-unhandlable-oom +g = newGlobal(); +gcparam('maxBytes', gcparam('gcBytes')); +try { + evaluate("return 0", ({ + global: g, + newContext: true + })); +} catch (error) { + // We expect evaluate() above to fail with OOM, but due to GC zeal settings + // it may execute correctly and throw "SyntaxError: return not in function". + // This catch block is to ignore that error. +} diff --git a/js/src/jit-test/tests/basic/bug1122534.js b/js/src/jit-test/tests/basic/bug1122534.js new file mode 100644 index 0000000000..bdf1a0b57a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1122534.js @@ -0,0 +1,16 @@ +// |jit-test| error: TypeError + +function newFunc(x) { new Function(x)(); }; +newFunc("\ +function GetUnicodeValues(c) {\ + u = new Array();\ + if ((c >= 0x0100 && c < 0x0138) || (c > 0x1Bedb && c < 0x0178))\ + return;\ + return u;\ +}\ +function Unicode(c) {\ + u = GetUnicodeValues(c);\ + this.upper = u[0];\ +}\ +for (var i = 0; i <= 0x017f; i++) { var U = new Unicode(i); }\ +"); diff --git a/js/src/jit-test/tests/basic/bug1122581.js b/js/src/jit-test/tests/basic/bug1122581.js new file mode 100644 index 0000000000..7c99924270 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1122581.js @@ -0,0 +1,10 @@ +function f(x, y) { + for (var i=0; i<50; i++) { + if (i % 10 === 0) { + var stack = getBacktrace({args: true, locals: true, thisprops: true}); + assertEq(stack.includes("f(x = "), true); + foo = arguments; + } + } +} +f(1, 2); diff --git a/js/src/jit-test/tests/basic/bug1127303.js b/js/src/jit-test/tests/basic/bug1127303.js new file mode 100644 index 0000000000..078b4477c2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1127303.js @@ -0,0 +1,9 @@ + +function test1() {} +function test() { test1.call(this); } +var length = 30 * 1024 - 1; +var obj = new test(); +for(var i = 0 ; i < length ; i++) { + obj.next = new (function ( ) { } ) (); + obj = obj.next; +} diff --git a/js/src/jit-test/tests/basic/bug1131035.js b/js/src/jit-test/tests/basic/bug1131035.js new file mode 100644 index 0000000000..6ff80f3743 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1131035.js @@ -0,0 +1,9 @@ + +function TestCase() { + this.passed = 'x'; +} +result = "pass"; +for (var i = 0; i < 100; i++) + new TestCase(result); +function Gen2(value) {} +Gen2.prototype = new TestCase(); diff --git a/js/src/jit-test/tests/basic/bug1134146.js b/js/src/jit-test/tests/basic/bug1134146.js new file mode 100644 index 0000000000..5d2a478957 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1134146.js @@ -0,0 +1,10 @@ + +function Foo(a, b) { + b = {}; + this.b = b; +}; +var a = []; +for (var i = 0; i < 50; i++) + a.push(new Foo(i, i + 1)); +i = 0; +a[i].c = i; diff --git a/js/src/jit-test/tests/basic/bug1135718.js b/js/src/jit-test/tests/basic/bug1135718.js new file mode 100644 index 0000000000..515457cdfb --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1135718.js @@ -0,0 +1,14 @@ + +setJitCompilerOption("ion.warmup.trigger", 30); +function ArrayCallback(state) { + return this.state = state; +} +ArrayCallback.prototype.isUpperCase = function(v, index, array) { + return this.state ? true : (v == v.toUpperCase()); +}; +strings = ['hello', 'Array', 'WORLD']; +obj = new ArrayCallback(false); +strings.filter(obj.isUpperCase, obj) +obj = new ArrayCallback(true); +strings.filter(obj.isUpperCase, obj) +obj.__proto__ = {}; diff --git a/js/src/jit-test/tests/basic/bug1137616.js b/js/src/jit-test/tests/basic/bug1137616.js new file mode 100644 index 0000000000..ca093c1baf --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1137616.js @@ -0,0 +1,9 @@ +// Accessing a name that isn't a global property is a ReferenceError, +// even if a proxy is on the global's prototype chain. +load(libdir + "asserts.js"); +load(libdir + "immutable-prototype.js"); + +var g = newGlobal(); +if (globalPrototypeChainIsMutable()) + g.__proto__ = {}; +assertThrowsInstanceOf(() => g.eval("s += ''"), g.ReferenceError); diff --git a/js/src/jit-test/tests/basic/bug1141154.js b/js/src/jit-test/tests/basic/bug1141154.js new file mode 100644 index 0000000000..a56e6dc132 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1141154.js @@ -0,0 +1,19 @@ +function foo() { + (function() { + Object.preventExtensions(this); + setJitCompilerOption("ion.warmup.trigger", 4); + var g = newGlobal({newCompartment: true}); + g.debuggeeGlobal = this; + g.eval("(" + function () { + dbg = new Debugger(debuggeeGlobal); + dbg.onExceptionUnwind = function (frame, exc) { + var s = '!'; + for (var f = frame; f; f = f.older) + debuggeeGlobal.log += s; + }; + } + ")();"); + try { + j('Number.prototype.toString.call([])'); + } catch (exc) {} + })(); +} foo(); diff --git a/js/src/jit-test/tests/basic/bug1141329.js b/js/src/jit-test/tests/basic/bug1141329.js new file mode 100644 index 0000000000..ee41a61bbb --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1141329.js @@ -0,0 +1,15 @@ +x = [] +Object.defineProperty(x, 7, {}) +function f() { + "use strict" + x.length = { + valueOf: function() { + return 7 + } + } +} +for (var m = 0; m < 9; m++) { + try { + f() + } catch (e) {} +} diff --git a/js/src/jit-test/tests/basic/bug1143106.js b/js/src/jit-test/tests/basic/bug1143106.js new file mode 100644 index 0000000000..6bf81bb654 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1143106.js @@ -0,0 +1,8 @@ +({x:3}), ({x:3}), ({x:3}), ({x:3}), ({x:3}), ({x:3}), +({x:3}), ({x:3}), ({x:3}), ({x:3}), ({x:3}), ({x:3}), +({x:3}), ({x:3}), ({x:3}), ({x:3}), ({x:3}), ({x:3}), +({x:3}), ({x:3}), ({x:3}) + +[{x:3},{x:3},{x:3},{x:3},{x:3},{x:3},{x:3}, + {x:3},{x:3},{x:3},{x:3},{x:3},{x:3},{x:3}, + {x:3},{x:3},{x:3},{x:3},{x:3},{x:3},{x:3}] diff --git a/js/src/jit-test/tests/basic/bug1146836.js b/js/src/jit-test/tests/basic/bug1146836.js new file mode 100644 index 0000000000..2b4f4acec8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1146836.js @@ -0,0 +1,11 @@ +function f() { + var s = "switch (x) {"; + for (var i=8000; i<16400; i++) { + s += "case " + i + ": return " + i + "; break;"; + } + s += "case 8005: return -1; break;"; + s += "}"; + var g = Function("x", s); + assertEq(g(8005), 8005); +} +f(); diff --git a/js/src/jit-test/tests/basic/bug1147216.js b/js/src/jit-test/tests/basic/bug1147216.js new file mode 100644 index 0000000000..d683d713f6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1147216.js @@ -0,0 +1,25 @@ +// Ensure JSOP_LINENO (emitted after JSOP_EVAL) handles big line +// numbers correctly. +function getsource() { + var s = ""; + for (var i=0; i<66002; i++) { + s += "\n"; + if (i === 66000) + s += "eval('stack = Error().stack');"; + } + return s; +} +function test() { + var stack; + eval(getsource()); + assertEq(stack.indexOf("line 66002") > 0, true); +} +test(); + +function testStrict() { + "use strict"; + var stack; + eval(getsource()); + assertEq(stack.indexOf("line 66002") > 0, true); +} +testStrict(); diff --git a/js/src/jit-test/tests/basic/bug1153057.js b/js/src/jit-test/tests/basic/bug1153057.js new file mode 100644 index 0000000000..7f4ab1b110 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1153057.js @@ -0,0 +1 @@ +({ "0"() { eval(); } }); diff --git a/js/src/jit-test/tests/basic/bug1161762.js b/js/src/jit-test/tests/basic/bug1161762.js new file mode 100644 index 0000000000..ba072c507f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1161762.js @@ -0,0 +1,24 @@ + +for (var actual = .5; actual < 100; actual++) { + var test2 = { + test4: actual + 6, + test2: actual + 9, + printStatus: actual + 10, + isPrototypeOf: actual + 12, + expect: actual + 14, + printErr: actual + 17, + ret2: actual + 19, + printBugNumber: actual + 32, + test3: actual + 33, + String: actual + 34, + summary: actual + 40, + test1: actual + 42, + Array: actual + 43, + BUGNUMBER: actual + 44, + assertEq: actual + 45, + __call__: actual + 47, + x: actual + 48, + test0: actual + 49, + res: actual + 50 + }; +} diff --git a/js/src/jit-test/tests/basic/bug1170355.js b/js/src/jit-test/tests/basic/bug1170355.js new file mode 100644 index 0000000000..cddb3c547d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1170355.js @@ -0,0 +1,3 @@ +x = Array(4294967295); +x[1] = 0; +Array.prototype.shift.call(x); diff --git a/js/src/jit-test/tests/basic/bug1172503-2.js b/js/src/jit-test/tests/basic/bug1172503-2.js new file mode 100644 index 0000000000..2c65b71617 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1172503-2.js @@ -0,0 +1,14 @@ +load(libdir + "immutable-prototype.js"); + +var n = 0; +if (globalPrototypeChainIsMutable()) { + this.__proto__ = new Proxy({}, { + has: function () { + if (++n === 2) + return false; + a = 0; + } + }); + } +a = 0; +assertEq(a, 0); diff --git a/js/src/jit-test/tests/basic/bug1177907.js b/js/src/jit-test/tests/basic/bug1177907.js new file mode 100644 index 0000000000..11bf47fe5c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1177907.js @@ -0,0 +1,4 @@ +// |jit-test| error: TypeError + +var Date_toString = newGlobal().Date.prototype.toString; +(function f(){ f(Date_toString.call({})); })(); diff --git a/js/src/jit-test/tests/basic/bug1180054.js b/js/src/jit-test/tests/basic/bug1180054.js new file mode 100644 index 0000000000..ae23ad3d60 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1180054.js @@ -0,0 +1,6 @@ +function entryFrame_1(d) { + assertJitStackInvariants(); +} +for (i = 0Xa; i < 40; i++) { + new entryFrame_1(); +} diff --git a/js/src/jit-test/tests/basic/bug1182865.js b/js/src/jit-test/tests/basic/bug1182865.js new file mode 100644 index 0000000000..f221b4328c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1182865.js @@ -0,0 +1,8 @@ + +for (var j = 0; j < 99; j++) { + Array[{ + f() { + eval() + } + }]; +} diff --git a/js/src/jit-test/tests/basic/bug1185653.js b/js/src/jit-test/tests/basic/bug1185653.js new file mode 100644 index 0000000000..b29fd6e0cd --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1185653.js @@ -0,0 +1,28 @@ +function f() { + var arr = []; + for (var i=0; i<80; i++) { + var o3 = {foo: i}; + var o2 = {owner: o3}; + arr.push(o2); + } + for (var i=0; i<80; i++) { + var o2 = arr[i]; + var o3 = o2.owner; + Object.defineProperty(o3, "bar", {value: arr, enumerable: false}); + } + assertEq(JSON.stringify(arr).length, 1671); +} +f(); + +function g() { + var arr = []; + for (var i=0; i<100; i++) { + arr.push([1, i]); + } + for (var i=0; i<100; i++) { + for (var p in arr[i]) { + assertEq(p === "0" || p === "1", true); + } + } +} +g(); diff --git a/js/src/jit-test/tests/basic/bug1189744.js b/js/src/jit-test/tests/basic/bug1189744.js new file mode 100644 index 0000000000..6d202e702c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1189744.js @@ -0,0 +1,11 @@ +var obj; +for (var i = 0; i < 100; i++) + obj = {a: 7, b: 13, c: 42, d: 0}; + +Object.defineProperty(obj, "x", { + get: function () { return 3; } +}); +obj.__ob__ = 17; + +Object.defineProperty(obj, "c", {value: 8, writable: true}); +assertEq(obj.__ob__, 17); diff --git a/js/src/jit-test/tests/basic/bug1190733.js b/js/src/jit-test/tests/basic/bug1190733.js new file mode 100644 index 0000000000..2b3f4a419d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1190733.js @@ -0,0 +1,7 @@ + +x = []; +Array.prototype.push.call(x, Uint8ClampedArray); +(function() { + x.length = 9; +})(); +Array.prototype.reverse.call(x); diff --git a/js/src/jit-test/tests/basic/bug1195452.js b/js/src/jit-test/tests/basic/bug1195452.js new file mode 100644 index 0000000000..92d8568574 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1195452.js @@ -0,0 +1,42 @@ +// |jit-test| allow-oom; allow-unhandlable-oom + +var lfcode = new Array(); +lfcode.push(` +function TestCase(e) { + this.expect = e; +} +function writeHeaderToLog() {} +var SECTION = "15.5.4.7-1"; +var TITLE = "String.protoype.lastIndexOf"; +writeHeaderToLog(); +var j = 0; +for (k = 0, i = 0x0021; i < 0x007e; i++, j++, k++) + new TestCase("x" - 1); +LastIndexOf(); +function LastIndexOf() { + if (isNaN(n)) {} +} +`); +lfcode.push(` +oomAfterAllocations(50); +writeHeaderToLog(SECTION + " " + TITLE); +var expect = "Passed"; +try { + eval("this = true"); +} catch (e) { + result = expect; + exception = e.toString(0, 0); +} +new TestCase(); +`); +while (lfcode.length > 0) { + var file = lfcode.shift(); + loadFile(file) +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) != ".js" && lfVarx.length != 1) { + evaluate(lfVarx); + } + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/basic/bug1196579.js b/js/src/jit-test/tests/basic/bug1196579.js new file mode 100644 index 0000000000..1f8f3760e3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1196579.js @@ -0,0 +1,14 @@ + +setJitCompilerOption("ion.warmup.trigger", 30); +var spaces = [ +"\u0009", "\u000b", "\u000c", "\u0020", "\u00a0", "\u1680", +"\u180e", "\u2000", "\u2001", "\u2002", "\u2003", "\u2004", +"\u2005", "\u2006", "\u2007", "\u2008", "\u2009", "\u200a", +]; +var line_terminators = [ "\u2028", "\u2029", "\u000a", "\u000d" ]; +var space_chars = [].concat(spaces, line_terminators); +var non_space_chars = [ "\u200b", "\u200c", "\u200d" ]; +var chars = [].concat(space_chars, non_space_chars); +var is_space = [].concat(space_chars.map(function(ch) { return true; }), +non_space_chars.map(function() { return false; })); +chars.map(function(ch) {}).join(','); diff --git a/js/src/jit-test/tests/basic/bug1203790.js b/js/src/jit-test/tests/basic/bug1203790.js new file mode 100644 index 0000000000..9fee5117f4 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1203790.js @@ -0,0 +1,10 @@ +gczeal(14); +verifyprebarriers(); +x = []; +Array.prototype.push.call(x, new Uint8Array()); +Array.prototype.some.call(x, function() { + try { + y.toString(); + } catch (e) {} +}); +Array.prototype.shift.call(x); diff --git a/js/src/jit-test/tests/basic/bug1204722.js b/js/src/jit-test/tests/basic/bug1204722.js new file mode 100644 index 0000000000..5102b57c9c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1204722.js @@ -0,0 +1,7 @@ + +x = [1e81]; +x.map(function() {}); +x.pop(); +x.push([]); +[].map(function() {}); +eval("[1/0]"); diff --git a/js/src/jit-test/tests/basic/bug1205870.js b/js/src/jit-test/tests/basic/bug1205870.js new file mode 100644 index 0000000000..8340a797c6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1205870.js @@ -0,0 +1,16 @@ + +// Make sure that unboxed arrays can be created with all possible inline +// capacities for the different sizes. +var bools = []; +var ints = []; +var doubles = []; +for (var i = 0; i < 150; i++) { + bools.push(false); + ints.push(0); + doubles.push(0.5); +} +for (var i = 0; i < 150; i++) { + bools = bools.slice(1); + ints = ints.slice(1); + doubles = doubles.slice(1); +} diff --git a/js/src/jit-test/tests/basic/bug1206265.js b/js/src/jit-test/tests/basic/bug1206265.js new file mode 100644 index 0000000000..7787389861 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1206265.js @@ -0,0 +1,8 @@ +x = [ + createIsHTMLDDA(), + function() {} +]; +x.forEach(function() {}); +this.x.sort(function() {}); +assertEq(x[0] instanceof Function, false); +assertEq(x[1] instanceof Function, true); diff --git a/js/src/jit-test/tests/basic/bug1207863.js b/js/src/jit-test/tests/basic/bug1207863.js new file mode 100644 index 0000000000..ef079a3c29 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1207863.js @@ -0,0 +1,21 @@ +// |jit-test| allow-oom; allow-unhandlable-oom; skip-if: !("oomAtAllocation" in this && "resetOOMFailure" in this) + +function oomTest(f) { + var i = 1; + do { + try { + oomAtAllocation(i); + f(); + } catch (e) { + more = resetOOMFailure(); + } + i++; + } while(more); +} +oomTest( + () => 3 + | (function () { + "use strict"; + return eval("f();"); + })() +); diff --git a/js/src/jit-test/tests/basic/bug1208403.js b/js/src/jit-test/tests/basic/bug1208403.js new file mode 100644 index 0000000000..5077fcef04 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1208403.js @@ -0,0 +1,2 @@ +// |jit-test| error: scripted function +byteSizeOfScript(Array); diff --git a/js/src/jit-test/tests/basic/bug1210596.js b/js/src/jit-test/tests/basic/bug1210596.js new file mode 100644 index 0000000000..5efea9fccf --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1210596.js @@ -0,0 +1,4 @@ +var count = 0; +var a = Array.prototype.concat.call([], [, []], []); +a.forEach(function() { count++; }); +assertEq(count, 1); diff --git a/js/src/jit-test/tests/basic/bug1219128-1.js b/js/src/jit-test/tests/basic/bug1219128-1.js new file mode 100644 index 0000000000..7a81d73f0a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1219128-1.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !('oomTest' in this) + +evaluate(` + x = evalcx("lazy"); + oomTest(function () { + x.start("1"); + }); +`); diff --git a/js/src/jit-test/tests/basic/bug1219128-2.js b/js/src/jit-test/tests/basic/bug1219128-2.js new file mode 100644 index 0000000000..7208fc3260 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1219128-2.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('oomTest' in this) + +a = evalcx("lazy") +oomTest(() => a.toString) diff --git a/js/src/jit-test/tests/basic/bug1219128-3.js b/js/src/jit-test/tests/basic/bug1219128-3.js new file mode 100644 index 0000000000..feca3eb55c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1219128-3.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +x = evalcx('lazy'); +oomTest(function() { + x.eval +}); diff --git a/js/src/jit-test/tests/basic/bug1219128-4.js b/js/src/jit-test/tests/basic/bug1219128-4.js new file mode 100644 index 0000000000..41f8b9757a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1219128-4.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +x = evalcx("lazy"); +oomTest((function() { + evalcx("({", x); +})) diff --git a/js/src/jit-test/tests/basic/bug1219128-5.js b/js/src/jit-test/tests/basic/bug1219128-5.js new file mode 100644 index 0000000000..30dc56e5ce --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1219128-5.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +x = evalcx("lazy"); +oomTest(function() { + x.of(new(delete y)); +}); diff --git a/js/src/jit-test/tests/basic/bug1219128-6.js b/js/src/jit-test/tests/basic/bug1219128-6.js new file mode 100644 index 0000000000..cb9f4c7170 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1219128-6.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +a = evalcx("lazy") +oomTest(function() { + a.b +}) diff --git a/js/src/jit-test/tests/basic/bug1219128-7.js b/js/src/jit-test/tests/basic/bug1219128-7.js new file mode 100644 index 0000000000..87ec092f87 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1219128-7.js @@ -0,0 +1,34 @@ +// |jit-test| slow; skip-if: !('oomTest' in this) + +function main() { + const v1 = this.newGlobal(); + function v2(v3,v4) { + oomTest(() => { + const v13 = this.parseModule("apply"); + const v14 = {}; + const v15 = v14.size; + const v17 = Uint16Array !== v15; + const v18 = v17 && Uint16Array; + const v20 = this.objectGlobal(v18); + const v21 = v20.newGlobal(); + const v24 = this.resumeProfilers(); + const v25 = v24 && v21; + const v26 = v25.evalInWorker("9007199254740991"); + function v27(v28,v29) { + } + const v31 = new Promise(v27); + const v33 = this.getModuleEnvironmentNames(v13); + }); + } + const v36 = new Promise(v2); + const v37 = v1.Debugger; + const v38 = v37(); + const v39 = v38.findAllGlobals(); + const v40 = v39.pop(); + const v41 = v40.getOwnPropertyDescriptor(v37); + gc(); +} +try { + main(); +} catch(exn) { +} diff --git a/js/src/jit-test/tests/basic/bug1219128-8.js b/js/src/jit-test/tests/basic/bug1219128-8.js new file mode 100644 index 0000000000..a957b879dc --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1219128-8.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('oomTest' in this) + +a = evalcx('lazy') +oomTest(() => a < 0) diff --git a/js/src/jit-test/tests/basic/bug1219363.js b/js/src/jit-test/tests/basic/bug1219363.js new file mode 100644 index 0000000000..03e4008ab0 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1219363.js @@ -0,0 +1,9 @@ +var x = [1, 2, , 4] +x[100000] = 1; +var y = Object.create(x); +y.a = 1; +y.b = 1; +var arr = []; +for (var z in y) + arr.push(z); +assertEq(arr.join(), "a,b,0,1,3,100000"); diff --git a/js/src/jit-test/tests/basic/bug1232269.js b/js/src/jit-test/tests/basic/bug1232269.js new file mode 100644 index 0000000000..c979d3b400 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1232269.js @@ -0,0 +1,30 @@ + +function f() { + for (var i=0; i<100; i++) { + var obj = {data: {id:1}}; + } + Object.defineProperty(obj, "id", { + configurable: true, + enumerable: false, + get: function() { + return this.data.id; + } + }); + return obj.id; +} +assertEq(f(), 1); + +function f2() { + for (var i=0; i<100; i++) { + var obj = {data: {id:1}}; + } + Object.defineProperty(obj, "id", { + configurable: true, + enumerable: false, + get: function() { return this.data.id; }, + set: function(v) { this.data.id = v; } + }); + obj.id = 3; + return obj.id; +} +assertEq(f2(), 3); diff --git a/js/src/jit-test/tests/basic/bug1234414.js b/js/src/jit-test/tests/basic/bug1234414.js new file mode 100644 index 0000000000..2aeda2c897 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1234414.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => { + var max = 400; + function f(b) { + if (b) { + f(b - 1); + } else eval('"use strict"; const z = w; z = 1 + w; c = 5'); + } + f(max - 1); +}); diff --git a/js/src/jit-test/tests/basic/bug1236476.js b/js/src/jit-test/tests/basic/bug1236476.js new file mode 100644 index 0000000000..4e34a0a762 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1236476.js @@ -0,0 +1,18 @@ +// |jit-test| allow-oom; allow-unhandlable-oom +// 1236476 + +if (typeof oomTest !== 'function' || + typeof offThreadCompileToStencil !== 'function' || + typeof finishOffThreadStencil !== 'function' || + typeof evalStencil !== 'function') + quit(); + +oomTest(() => { + offThreadCompileToStencil(` + "use asm"; + return assertEq; + `); + var stencil = finishOffThreadStencil(); + evalStencil(); +}); + diff --git a/js/src/jit-test/tests/basic/bug1237564.js b/js/src/jit-test/tests/basic/bug1237564.js new file mode 100644 index 0000000000..a67174c757 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1237564.js @@ -0,0 +1,8 @@ +// |jit-test| error:ReferenceError: can't access lexical +try { + evaluate("let x = (() => { throw 3 })();"); +} catch(e) { + assertEq(e, 3); +} +Object.defineProperty(this, "x", {}); +(function() { x = 3; })(); diff --git a/js/src/jit-test/tests/basic/bug1238003.js b/js/src/jit-test/tests/basic/bug1238003.js new file mode 100644 index 0000000000..64c89cb273 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1238003.js @@ -0,0 +1,15 @@ +function f(str) { + if (typeof str === 'string') + str = new RegExp(str); + for (var i = 0; i < 2000; i++) + str.test('foo'); +} +f("abc"); + +function g(str) { + if (typeof str === 'string') + str = new RegExp(str); + for (var i = 0; i < 2000; i++) + str.exec('foo'); +} +g("abc"); diff --git a/js/src/jit-test/tests/basic/bug1238630.js b/js/src/jit-test/tests/basic/bug1238630.js new file mode 100644 index 0000000000..021b66af55 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1238630.js @@ -0,0 +1,7 @@ +var g = /1/g; +g.exec('1234561'); +g.exec(); +var r = /uDC38/ug; +r.lastIndex = 1; +var str = "\uD83D\uDC38"; +r.exec(str); diff --git a/js/src/jit-test/tests/basic/bug1240502.js b/js/src/jit-test/tests/basic/bug1240502.js new file mode 100644 index 0000000000..08d6619460 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1240502.js @@ -0,0 +1,2 @@ +// |jit-test| skip-if: !('oomTest' in this) +oomTest(() => eval(`Array(..."ABC")`)); diff --git a/js/src/jit-test/tests/basic/bug1247926.js b/js/src/jit-test/tests/basic/bug1247926.js new file mode 100644 index 0000000000..e93198db31 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1247926.js @@ -0,0 +1,6 @@ + +JSON.parse('[1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0]', function(k, v) { return ""; }); +str = "["; +for (i = 0; i < 2048; i++) str += "1," +str += "1]"; +JSON.parse(str); diff --git a/js/src/jit-test/tests/basic/bug1263868.js b/js/src/jit-test/tests/basic/bug1263868.js new file mode 100644 index 0000000000..ba678d71d5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1263868.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !('oomTest' in this) +function g(f, params) { + entryPoints(params); +} +function entry1() {}; +s = "g(entry1, {function: entry1});"; +f(s); +f(s); +function f(x) { + oomTest(() => eval(x)); +} diff --git a/js/src/jit-test/tests/basic/bug1264954.js b/js/src/jit-test/tests/basic/bug1264954.js new file mode 100644 index 0000000000..e9d6422798 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1264954.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) +function f(x) { + oomTest(() => eval(x)); +} +f(""); +f(""); +f(`eval([ "x = \`\${new Error.lineNumber}" ].join())`); diff --git a/js/src/jit-test/tests/basic/bug1265693.js b/js/src/jit-test/tests/basic/bug1265693.js new file mode 100644 index 0000000000..9922999d1b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1265693.js @@ -0,0 +1,2 @@ +// |jit-test| skip-if: !('oomTest' in this) +oomTest(Function("Function.hasOwnProperty(1.1)")); diff --git a/js/src/jit-test/tests/basic/bug1276882.js b/js/src/jit-test/tests/basic/bug1276882.js new file mode 100644 index 0000000000..4e88122be9 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1276882.js @@ -0,0 +1,5 @@ +// |jit-test| error: sleep interval is not a number +sleep(0.001); +1; +sleep(0.1); +sleep(this); diff --git a/js/src/jit-test/tests/basic/bug1278839.js b/js/src/jit-test/tests/basic/bug1278839.js new file mode 100644 index 0000000000..3756e95d68 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1278839.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) +for (var i=0; i<2; i++) + oomTest(() => eval("setJitCompilerOption(eval + Function, 0);")); diff --git a/js/src/jit-test/tests/basic/bug1280252.js b/js/src/jit-test/tests/basic/bug1280252.js new file mode 100644 index 0000000000..486d2d2a51 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1280252.js @@ -0,0 +1,9 @@ +function f() { + x = arguments; + delete x[1]; +} +f(0, 1); +gc(); +assertEq(x.length, 2); +assertEq(0 in x, true); +assertEq(1 in x, false); diff --git a/js/src/jit-test/tests/basic/bug1285227.js b/js/src/jit-test/tests/basic/bug1285227.js new file mode 100644 index 0000000000..7611337082 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1285227.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +evalInWorker(` + (new WeakMap).set(FakeDOMObject.prototype, this) +`); diff --git a/js/src/jit-test/tests/basic/bug1292858.js b/js/src/jit-test/tests/basic/bug1292858.js new file mode 100644 index 0000000000..5fde05f6f7 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1292858.js @@ -0,0 +1,60 @@ +// |jit-test| --ion-warmup-threshold=50 +setJitCompilerOption("offthread-compilation.enable", 0); +gcPreserveCode(); + +function test1() { + var caughtInvalidArguments = false; + var a = -1 + try { + var buf = new Uint8ClampedArray(a); + throw new Error("didn't throw"); + } catch (e) { + assertEq(e instanceof RangeError, true, + "expected RangeError, instead threw: " + e); + caughtInvalidArguments = true; + } + assertEq(caughtInvalidArguments, true); +} +test1(); + +function test2() { + var caughtInvalidArguments = false; + var i = 0; + while (true) { + i = (i + 1) | 0; + var a = inIon() ? -1 : 300; + try { + var buf = new Uint8ClampedArray(a); + assertEq(buf.length, 300); + } catch (e) { + assertEq(a, -1); + assertEq(e instanceof RangeError, true, + "expected RangeError, instead threw: " + e); + caughtInvalidArguments = true; + break; + } + } + assertEq(caughtInvalidArguments, true); +} +test2(); + +function test3() { + var caughtInvalidArguments = false; + var i = 0; + while (true) { + i = (i + 1) | 0; + var a = inIon() ? -1 : 0; + try { + var buf = new Uint8ClampedArray(a); + assertEq(buf.length, 0); + } catch (e) { + assertEq(a, -1); + assertEq(e instanceof RangeError, true, + "expected RangeError, instead threw: " + e); + caughtInvalidArguments = true; + break; + } + } + assertEq(caughtInvalidArguments, true); +} +test3(); diff --git a/js/src/jit-test/tests/basic/bug1293258.js b/js/src/jit-test/tests/basic/bug1293258.js new file mode 100644 index 0000000000..79d4dcbd5d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1293258.js @@ -0,0 +1,10 @@ +try { + function test() { + var arr = new Int8Array(400); + var o = new test(true); + arr[idx] = 9; + } + test(); +} catch(e) { + assertEq(""+e, "InternalError: too much recursion"); +} diff --git a/js/src/jit-test/tests/basic/bug1293575.js b/js/src/jit-test/tests/basic/bug1293575.js new file mode 100644 index 0000000000..3e88699e0f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1293575.js @@ -0,0 +1,9 @@ + +function f(y) { + y = 123456; + for (var x = 0; x < 9; ++x) { + z = arguments.callee.arguments; + assertEq(z[0], Math); + } +} +f(Math); diff --git a/js/src/jit-test/tests/basic/bug1295031.js b/js/src/jit-test/tests/basic/bug1295031.js new file mode 100644 index 0000000000..b8afb38025 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1295031.js @@ -0,0 +1,24 @@ +// |jit-test| --ion-warmup-threshold=50 +setJitCompilerOption("offthread-compilation.enable", 0); +gcPreserveCode(); + +try { + while (true) { + a = inIon() ? 0 : 300; + try { + buf = new Uint8ClampedArray(a); + assertEq(buf.length, 300); + } catch (e) { + assertEqa; + } + } +} catch(exc1) {} +loadFile() +function loadFile() { + try { + switch (lfRunTypeId) { + case 1: + eval(); + } + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/basic/bug1296015.js b/js/src/jit-test/tests/basic/bug1296015.js new file mode 100644 index 0000000000..824344c6f1 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1296015.js @@ -0,0 +1,13 @@ +// |jit-test| --ion-warmup-threshold=50 +setJitCompilerOption("offthread-compilation.enable", 0); +gcPreserveCode(); + +function f() { + for (var i=0; i<30000; i++) { + var a = inIon() ? 0 : 300; + var buf = new Uint8ClampedArray(a); + (function() {}) * this; + } + try {} catch(e) {} +} +f(); diff --git a/js/src/jit-test/tests/basic/bug1296016.js b/js/src/jit-test/tests/basic/bug1296016.js new file mode 100644 index 0000000000..3411b7114a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1296016.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +offThreadCompileToStencil(``); +evalInWorker(` +var stencil = finishOffThreadStencil(); +evalStencil(stencil); +`); diff --git a/js/src/jit-test/tests/basic/bug1296249.js b/js/src/jit-test/tests/basic/bug1296249.js new file mode 100644 index 0000000000..7c8b7c5df4 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1296249.js @@ -0,0 +1,7 @@ +// |jit-test| slow; skip-if: !('oomTest' in this) +function f(x) { + new Int32Array(x); +} + +f(0); +oomTest(() => f(2147483647)); diff --git a/js/src/jit-test/tests/basic/bug1300548.js b/js/src/jit-test/tests/basic/bug1300548.js new file mode 100644 index 0000000000..6f3def77c2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1300548.js @@ -0,0 +1,13 @@ +var g1 = newGlobal(); +var g2 = newGlobal({sameZoneAs: g1}); +function f() { + var o = Object.create(null); + for (var p in o) {}; +} +g1.eval(f.toString()); +g2.eval(f.toString()); + +for (var i=0; i<10; i++) { + g1.eval("f()"); + g2.eval("f()"); +} diff --git a/js/src/jit-test/tests/basic/bug1300904.js b/js/src/jit-test/tests/basic/bug1300904.js new file mode 100644 index 0000000000..2274129366 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1300904.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) +Object.getOwnPropertyNames(this); +oomTest(function() { + this[0] = null; + Object.freeze(this); +}); diff --git a/js/src/jit-test/tests/basic/bug1301797.js b/js/src/jit-test/tests/basic/bug1301797.js new file mode 100644 index 0000000000..0822943e38 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1301797.js @@ -0,0 +1,4 @@ +var arr = new Uint8ClampedArray(10*1024*1024); +var sum = 0; +for (var i = 0; i < 10000; i++) + sum += arr[i]; diff --git a/js/src/jit-test/tests/basic/bug1302682.js b/js/src/jit-test/tests/basic/bug1302682.js new file mode 100644 index 0000000000..12808092b0 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1302682.js @@ -0,0 +1,10 @@ +// |jit-test| --ion-warmup-threshold=50 +setJitCompilerOption("offthread-compilation.enable", 0); +gcPreserveCode(); + +for (var i = 0; i < 30000; i++) { + var a = inIon() ? 7 : 300; + var buf = new Uint8ClampedArray(a); + (function() {}) * this; + try {} catch (e) {} +} diff --git a/js/src/jit-test/tests/basic/bug1310418.js b/js/src/jit-test/tests/basic/bug1310418.js new file mode 100644 index 0000000000..abbfa6127a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1310418.js @@ -0,0 +1,9 @@ +(function(stdlib, n, heap) { + "use asm"; + var Uint8ArrayView = new stdlib.Uint8Array(heap); + function f(d1) { + d1 = +d1; + var d2 = .0; + Uint8ArrayView[d1 < d2] = 0 + 3 + (d2 > -0); + } +})(this, 0>>0, new Int32Array(0)) diff --git a/js/src/jit-test/tests/basic/bug1317402.js b/js/src/jit-test/tests/basic/bug1317402.js new file mode 100644 index 0000000000..127af2e62d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1317402.js @@ -0,0 +1,8 @@ +gczeal(9); +let o = {p1:0, p2:0, set p3({}) {}, p4:1, p5:1, + p6:1, p7:1, p8:1, p9:1, p10:1, p11:1}; +for (let p in o) + x = o[p]; +delete o.p3; +for (let i = 0; i < 100; i++) + x = -o; diff --git a/js/src/jit-test/tests/basic/bug1341326.js b/js/src/jit-test/tests/basic/bug1341326.js new file mode 100644 index 0000000000..9bacd45270 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1341326.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +function eval(source) { + offThreadCompileModuleToStencil(source); +} +var N = 10000; +var left = repeat_str('(1&', N); +var right = repeat_str(')', N); +var str = 'actual = '.concat(left, '1', right, ';'); +eval(str); +function repeat_str(str, repeat_count) { + var arr = new Array(--repeat_count); + while (repeat_count != 0) arr[--repeat_count] = str; + return str.concat.apply(str, arr); +} diff --git a/js/src/jit-test/tests/basic/bug1344265.js b/js/src/jit-test/tests/basic/bug1344265.js new file mode 100644 index 0000000000..2ffc2f7e5c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1344265.js @@ -0,0 +1,3 @@ +// |jit-test| allow-unhandlable-oom; allow-oom; skip-if: !('oomAfterAllocations' in this) +oomAfterAllocations(1); +newString("a", {external: true}); diff --git a/js/src/jit-test/tests/basic/bug1348407.js b/js/src/jit-test/tests/basic/bug1348407.js new file mode 100644 index 0000000000..133a49018c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1348407.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !('oomTest' in this) +x = evalcx("lazy"); +oomTest(function () { + x.eval("1"); +}); diff --git a/js/src/jit-test/tests/basic/bug1355573.js b/js/src/jit-test/tests/basic/bug1355573.js new file mode 100644 index 0000000000..ce2e34c4a1 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1355573.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: getBuildConfiguration("debug") === true +function f(){}; +Object.defineProperty(f, "name", {value: "a".repeat((1<<30)-2)}); +var ex = null; +try { + len = f.bind().name.length; +} catch (e) { + ex = e; +} +assertEq(ex === "out of memory" || (ex instanceof InternalError), true); diff --git a/js/src/jit-test/tests/basic/bug1372956.js b/js/src/jit-test/tests/basic/bug1372956.js new file mode 100644 index 0000000000..c45fb085f0 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1372956.js @@ -0,0 +1,5 @@ +// |jit-test| error: TypeError +x = {}; +Array.prototype.push.call(x, 0); +Object.freeze(x); +Array.prototype.unshift.call(x, 0); diff --git a/js/src/jit-test/tests/basic/bug1373356.js b/js/src/jit-test/tests/basic/bug1373356.js new file mode 100644 index 0000000000..bf0cef93e4 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1373356.js @@ -0,0 +1,6 @@ +// |jit-test| error:TypeError +x = [0, 0]; +x.shift(); +x.pop(); +Object.preventExtensions(x); +x.unshift(0); diff --git a/js/src/jit-test/tests/basic/bug1380962.js b/js/src/jit-test/tests/basic/bug1380962.js new file mode 100644 index 0000000000..b05624b989 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1380962.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !Function.prototype.toSource + +// Source string has balanced parentheses even when the source code was discarded. + +function test() { +eval("var f = function() { return 0; };"); +assertEq(f.toSource(), "(function() {\n [native code]\n})"); +} + +var g = newGlobal({ discardSource: true }); +g.evaluate(test.toString() + "test()"); diff --git a/js/src/jit-test/tests/basic/bug1403679.js b/js/src/jit-test/tests/basic/bug1403679.js new file mode 100644 index 0000000000..72bb046203 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1403679.js @@ -0,0 +1,195 @@ +load(libdir + "asserts.js"); + +const thisGlobal = this; +const otherGlobalSameCompartment = newGlobal({sameCompartmentAs: thisGlobal}); +const otherGlobalNewCompartment = newGlobal({newCompartment: true}); + +const globals = [thisGlobal, otherGlobalSameCompartment, otherGlobalNewCompartment]; + +function testWithOptions(fn, variants = [undefined]) { + for (let variant of variants) { + for (let global of globals) { + for (let options of [ + {}, + {proxy: true}, + {object: new FakeDOMObject()}, + ]) { + fn(options, global, variant); + } + } + } +} + +function testWithGlobals(fn) { + for (let global of globals) { + fn(global); + } +} + +function testBasic(options, global) { + let {object: source, transplant} = transplantableObject(options); + + // Validate that |source| is an object and |transplant| is a function. + assertEq(typeof source, "object"); + assertEq(typeof transplant, "function"); + + // |source| is created in the current global. + assertEq(objectGlobal(source), this); + + // |source|'s prototype is %ObjectPrototype%, unless it's a FakeDOMObject. + let oldPrototype; + if (options.object) { + oldPrototype = FakeDOMObject.prototype; + } else { + oldPrototype = Object.prototype; + } + assertEq(Object.getPrototypeOf(source), oldPrototype); + + // Properties can be created on |source|. + assertEq(source.foo, undefined); + source.foo = 1; + assertEq(source.foo, 1); + + // Calling |transplant| transplants the object and then returns undefined. + assertEq(transplant(global), undefined); + + // |source| was moved into the new global. If the new global is in a + // different compartment, |source| is a now a CCW. + if (global !== otherGlobalNewCompartment) { + assertEq(objectGlobal(source), global); + } else { + assertEq(objectGlobal(source), null); + assertEq(isProxy(source), true); + } + + // The properties are copied over to the swapped object. + assertEq(source.foo, 1); + + // The prototype was changed to %ObjectPrototype% of |global| or the + // FakeDOMObject.prototype. + let newPrototype; + if (options.object) { + newPrototype = global.FakeDOMObject.prototype; + } else { + newPrototype = global.Object.prototype; + } + assertEq(Object.getPrototypeOf(source), newPrototype); +} +testWithOptions(testBasic); + +// Objects can be transplanted multiple times between globals. +function testTransplantMulti(options, global1, global2) { + let {object: source, transplant} = transplantableObject(options); + + transplant(global1); + transplant(global2); +} +testWithOptions(testTransplantMulti, globals); + +// Test the case when the source object already has a wrapper in the target global. +function testHasWrapperInTarget(options, global) { + let {object: source, transplant} = transplantableObject(options); + + // Create a wrapper for |source| in the other global. + global.p = source; + assertEq(global.eval("p"), source); + + if (options.proxy) { + // It's a proxy object either way. + assertEq(global.eval("isProxy(p)"), true); + } else { + if (global === otherGlobalNewCompartment) { + // |isProxy| returns true because |p| is a CCW. + assertEq(global.eval("isProxy(p)"), true); + } else { + // |isProxy| returns false because |p| is not a CCW. + assertEq(global.eval("isProxy(p)"), false); + } + } + + // And now transplant it into that global. + transplant(global); + + assertEq(global.eval("p"), source); + + if (options.proxy) { + // It's a proxy object either way. + assertEq(global.eval("isProxy(p)"), true); + } else { + // The previous CCW was replaced with a same-compartment object. + assertEq(global.eval("isProxy(p)"), false); + } +} +testWithOptions(testHasWrapperInTarget); + +// Test the case when the source object has a wrapper, but in a different compartment. +function testHasWrapperOtherCompartment(options, global) { + let thirdGlobal = newGlobal({newCompartment: true}); + let {object: source, transplant} = transplantableObject(options); + + // Create a wrapper for |source| in the new global. + thirdGlobal.p = source; + assertEq(thirdGlobal.eval("p"), source); + + // And now transplant the object. + transplant(global); + + assertEq(thirdGlobal.eval("p"), source); +} +testWithOptions(testHasWrapperOtherCompartment); + +// Ensure a transplanted object is correctly handled by (weak) collections. +function testCollections(options, global, AnySet) { + let {object, transplant} = transplantableObject(options); + + let set = new AnySet(); + + assertEq(set.has(object), false); + set.add(object); + assertEq(set.has(object), true); + + transplant(global); + + assertEq(set.has(object), true); +} +testWithOptions(testCollections, [Set, WeakSet]); + +// Ensure DOM object slot is correctly transplanted. +function testDOMObjectSlot(global) { + let domObject = new FakeDOMObject(); + let expectedValue = domObject.x; + assertEq(typeof expectedValue, "number"); + + let {object, transplant} = transplantableObject({object: domObject}); + assertEq(object, domObject); + + transplant(global); + + assertEq(object, domObject); + assertEq(domObject.x, expectedValue); +} +testWithGlobals(testDOMObjectSlot); + +function testArgumentValidation() { + // Throws an error if too many arguments are present. + assertThrowsInstanceOf(() => transplantableObject(thisGlobal, {}), Error); + + let {object, transplant} = transplantableObject(); + + // Throws an error if called with no arguments. + assertThrowsInstanceOf(() => transplant(), Error); + + // Throws an error if called with too many arguments. + assertThrowsInstanceOf(() => transplant(thisGlobal, {}), Error); + + // Throws an error if the first argument isn't an object + assertThrowsInstanceOf(() => transplant(null), Error); + + // Throws an error if the argument isn't a global object. + assertThrowsInstanceOf(() => transplant({}), Error); + + // Throws an error if the 'object' option isn't a FakeDOMObject. + assertThrowsInstanceOf(() => transplant({object: null}), Error); + assertThrowsInstanceOf(() => transplant({object: {}}), Error); +} +testArgumentValidation(); diff --git a/js/src/jit-test/tests/basic/bug1407058.js b/js/src/jit-test/tests/basic/bug1407058.js new file mode 100644 index 0000000000..7c0953986b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1407058.js @@ -0,0 +1,16 @@ +"use strict"; +function f() { + var o = {}; + Object.defineProperty(o, "x", {get: undefined, set: undefined}); + for (var i = 0; i < 20; i++) { + var ex = null; + try { + o.x = 9; + } catch (e) { + ex = e; + } + assertEq(ex instanceof TypeError, true); + assertEq(o.x, undefined); + } +} +f(); diff --git a/js/src/jit-test/tests/basic/bug1411294.js b/js/src/jit-test/tests/basic/bug1411294.js new file mode 100644 index 0000000000..327c808bcf --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1411294.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('oomTest' in this) +oomTest(function() { + eval(`var clonebuffer = serialize("abc"); + clonebuffer.clonebuffer = "\ +\\x00\\x00\\x00\\x00\\b\\x00\\xFF\\xFF\\f\ +\\x00\\x00\\x00\\x03\\x00\\xFF\\xFF\\x00\\x00\\x00\\x00\\x00\\x00\\x00\ +\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xF0?\\x00\\x00\\x00\\\x00\\x00\ +\\x00\\xFF\\xFF" + var obj = deserialize(clonebuffer) + assertEq(new ({ get }).keys(obj).toString(), "12,ab"); +`); +}); diff --git a/js/src/jit-test/tests/basic/bug1420961.js b/js/src/jit-test/tests/basic/bug1420961.js new file mode 100644 index 0000000000..24b2c355e5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1420961.js @@ -0,0 +1,5 @@ +var g = newGlobal(); +g.eval("azx918 = 1"); +for (var x in g) { + assertEq(x, x); +} diff --git a/js/src/jit-test/tests/basic/bug1445854.js b/js/src/jit-test/tests/basic/bug1445854.js new file mode 100644 index 0000000000..2bd7f30659 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1445854.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !this.hasOwnProperty("ReadableStream") +load(libdir + "asserts.js"); +assertThrowsInstanceOf(() => ReadableStream.prototype.tee(), + TypeError); diff --git a/js/src/jit-test/tests/basic/bug1447996.js b/js/src/jit-test/tests/basic/bug1447996.js new file mode 100644 index 0000000000..ec7cc5a25a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1447996.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('stackTest' in this) + +var x = 0; +function f() { + var s = "abcdef(((((((a|b)a|b)a|b)a|b)a|b)a|b)a|b)" + x; + res = "abcdefa".match(new RegExp(s)); + x++; +} +f(); +stackTest(f, true); diff --git a/js/src/jit-test/tests/basic/bug1459258.js b/js/src/jit-test/tests/basic/bug1459258.js new file mode 100644 index 0000000000..d29231a34a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1459258.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) +oomTest(function() { + return [0, Math.PI, NaN, Infinity, true, false, Symbol(), Math.tan, + Reflect, Proxy, print, assertEq, Array, String, Boolean, Number, parseInt, + parseFloat, Math.sin, Math.cos, Math.abs, Math.pow, Math.sqrt, + Uint8Array, Int8Array, Int32Array, Int16Array, Uint16Array]; +}); diff --git a/js/src/jit-test/tests/basic/bug1470732.js b/js/src/jit-test/tests/basic/bug1470732.js new file mode 100644 index 0000000000..fd854d70a2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1470732.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +var i = 0; +while(i++ < 500) { + evalInWorker(` + assertFloat32(0x23456789 | 0, false); + `); + let m = parseModule(""); + moduleLink(m); +} + diff --git a/js/src/jit-test/tests/basic/bug1473256.js b/js/src/jit-test/tests/basic/bug1473256.js new file mode 100644 index 0000000000..b0d748cd6d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1473256.js @@ -0,0 +1,5 @@ +var a1 = Reflect.construct(Array, [], Object); +var g = newGlobal({sameZoneAs: this}); +var a2 = new g.Array(1, 2, 3); +assertEq(a1.length, 0); +assertEq(a2.length, 3); diff --git a/js/src/jit-test/tests/basic/bug1483182.js b/js/src/jit-test/tests/basic/bug1483182.js new file mode 100644 index 0000000000..75e7f2e873 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1483182.js @@ -0,0 +1,15 @@ +var lfLogBuffer = ` + function testOuterForInVar() { + return eval("for (var x in {}); (function() { return delete x; })"); + } + testOuterForInVar(); +`; +loadFile(lfLogBuffer); +loadFile(lfLogBuffer); +function loadFile(lfVarx) { + try { + oomTest(function() { + eval(lfVarx); + }); + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/basic/bug1492920.js b/js/src/jit-test/tests/basic/bug1492920.js new file mode 100644 index 0000000000..ac7bc57dce --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1492920.js @@ -0,0 +1,41 @@ +var N = 20; +var k = 15; // k < N + +/* test 1: insertion of new blank object in ctor.__proto__ chain */ + +function C() {} +C.__proto__ = Object.create(Function.prototype); + +for (var i = 0; i < N; i++) { + var o = new C(); + assertEq(o instanceof C, true); +} + +/* test 2: overriding of @@hasInstance on the proto chain, partway + * through execution (should trigger a guard) */ + +function D() {} + +for (var i = 0; i < N; i++) { + var o = new D(); + if (i == k) { + D.__proto__ = {[Symbol.hasInstance]() { return false; }}; + } + assertEq(o instanceof D, i < k); +} + +/* test 3: overriding of @@hasInstance on an intermediate object in the proto + * chain */ + +function E() {} + +E.__proto__ = Object.create(Object.create(Object.create(Function.prototype))); +var intermediateProto = E.__proto__.__proto__; + +for (var i = 0; i < N; i++) { + var o = new E; + if (i == k) { + intermediateProto.__proto__ = {[Symbol.hasInstance]() { return false; }}; + } + assertEq(o instanceof E, i < k); +} diff --git a/js/src/jit-test/tests/basic/bug1493627.js b/js/src/jit-test/tests/basic/bug1493627.js new file mode 100644 index 0000000000..ee0525128c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1493627.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('stackTest' in this) +stackTest(function() { + eval(`var g = newGlobal(); recomputeWrappers(this, g);`); +}); diff --git a/js/src/jit-test/tests/basic/bug1516406.js b/js/src/jit-test/tests/basic/bug1516406.js new file mode 100644 index 0000000000..9a513fc1a2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1516406.js @@ -0,0 +1,2 @@ +// |jit-test| skip-if: !('oomTest' in this) +oomTest(() => dumpScopeChain(eval(`b => 1`))); diff --git a/js/src/jit-test/tests/basic/bug1520783.js b/js/src/jit-test/tests/basic/bug1520783.js new file mode 100644 index 0000000000..4142f45385 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1520783.js @@ -0,0 +1,2 @@ +// |jit-test| error: Error +createMappedArrayBuffer(""); diff --git a/js/src/jit-test/tests/basic/bug1527592.js b/js/src/jit-test/tests/basic/bug1527592.js new file mode 100644 index 0000000000..109bc88dc5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1527592.js @@ -0,0 +1,7 @@ +// |jit-test| error:dead object +var g1 = newGlobal(); +var g2 = newGlobal({newCompartment: true}); +var f = g2.Function(""); +nukeAllCCWs(); +var c = new class extends f {}; +c(); diff --git a/js/src/jit-test/tests/basic/bug1532265.js b/js/src/jit-test/tests/basic/bug1532265.js new file mode 100644 index 0000000000..500b6e4a64 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1532265.js @@ -0,0 +1,33 @@ +// |jit-test| allow-oom; skip-if: !('oomTest' in this) + +ignoreUnhandledRejections(); + +var v = {} +async function f() { + // Increasing level of stack size during await to make OOM more likely when + // saving the stack state. + [await v]; + [[await v]]; + [[[await v]]]; + [[[[await v]]]]; + [[[[[await v]]]]]; + [[[[[[await v]]]]]]; + [[[[[[[await v]]]]]]]; + [[[[[[[[await v]]]]]]]]; + [[[[[[[[[await v]]]]]]]]]; + [[[[[[[[[[await v]]]]]]]]]]; +} + +oomTest(function() { + for (var i = 0; i < 8; ++i) { + f(); + } + + // Drain all jobs, ignoring any OOM errors. + while (true) { + try { + drainJobQueue(); + break; + } catch {} + } +}); diff --git a/js/src/jit-test/tests/basic/bug1548759-1.js b/js/src/jit-test/tests/basic/bug1548759-1.js new file mode 100644 index 0000000000..6e6f795cad --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1548759-1.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) +(function() { + oomTest(async function() { + x; + }) +})(); diff --git a/js/src/jit-test/tests/basic/bug1548759-2.js b/js/src/jit-test/tests/basic/bug1548759-2.js new file mode 100644 index 0000000000..5e0eef54cc --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1548759-2.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !('oomTest' in this) +oomTest(function() { + return { + x: async function() { + y + }(), z + } +}); diff --git a/js/src/jit-test/tests/basic/bug1549035.js b/js/src/jit-test/tests/basic/bug1549035.js new file mode 100644 index 0000000000..f1d85bcbe3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1549035.js @@ -0,0 +1,11 @@ +var expected = 2; +for (var i = 0; i < 100; ++i) { + if (i === 50) { + expected = 0; + String.prototype[Symbol.split] = function() { + return []; + }; + } + var r = "ab".split(""); + assertEq(r.length, expected); +} diff --git a/js/src/jit-test/tests/basic/bug1554748.js b/js/src/jit-test/tests/basic/bug1554748.js new file mode 100644 index 0000000000..a272db1de5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1554748.js @@ -0,0 +1 @@ +undefined + { valueOf: Object }; diff --git a/js/src/jit-test/tests/basic/bug1568029.js b/js/src/jit-test/tests/basic/bug1568029.js new file mode 100644 index 0000000000..0400d4573c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1568029.js @@ -0,0 +1,19 @@ +function TestObject(a) { + this.a = 1; + if (a >= 0) { + this.b = 2; + } + + if (a > 0) { + new TestObject(a - 1); + } +} + +// Force analysis. There may be a better way. +for (let i = 0; i < 1000; i++) { + new TestObject(-1); +} + +let x = new TestObject(1); +assertEq(x.a, 1); +assertEq(x.b, 2); diff --git a/js/src/jit-test/tests/basic/bug1574725.js b/js/src/jit-test/tests/basic/bug1574725.js new file mode 100644 index 0000000000..f7ccb27d92 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1574725.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0 +for (let i = 0; i < 15; ++i) { + evalInWorker("for (var i = 0; i < 100; i++) {}"); +} +oomTest(() => {}); diff --git a/js/src/jit-test/tests/basic/bug1584027.js b/js/src/jit-test/tests/basic/bug1584027.js new file mode 100644 index 0000000000..82fa1b1776 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1584027.js @@ -0,0 +1,3 @@ +// |jit-test| error:unsafe filename: +setTestFilenameValidationCallback(); +evaluate("throw 2", {fileName: "\uDEFF"}); diff --git a/js/src/jit-test/tests/basic/bug1589002.js b/js/src/jit-test/tests/basic/bug1589002.js new file mode 100644 index 0000000000..9ea89923a8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1589002.js @@ -0,0 +1,7 @@ +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval(` + x = "12"; + x += "3"; + parent.evaluate("", {global: this, sourceMapURL: x}); +`); diff --git a/js/src/jit-test/tests/basic/bug1601074.js b/js/src/jit-test/tests/basic/bug1601074.js new file mode 100644 index 0000000000..63bf9a91f6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1601074.js @@ -0,0 +1,13 @@ +for (let y of [ + { x: 1 }, + { x: 2 }, + { x: 3 }, + { x: 4 }, + { x: 5 }, + { x: 6 }, + { x: 7 }, + { x: 8 }, + { x: 9 }, + { x: 10 }, + { x: 11 }, +]) {} diff --git a/js/src/jit-test/tests/basic/bug1610192.js b/js/src/jit-test/tests/basic/bug1610192.js new file mode 100644 index 0000000000..96d1201b75 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1610192.js @@ -0,0 +1,5 @@ +// |jit-test| slow; skip-if: getBuildConfiguration("debug") + +var s = ''; +s += new Uint8Array(2 ** 23 + 2); +eval("[" + s + "1]"); diff --git a/js/src/jit-test/tests/basic/bug1644839-2.js b/js/src/jit-test/tests/basic/bug1644839-2.js new file mode 100644 index 0000000000..cf0f7d8981 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1644839-2.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !('oomTest' in this) +var code = ` + (\`\${key}: \${(args[1]?.toString)?.()}\`) +`; +oomTest(function() { return parseModule(code); }); diff --git a/js/src/jit-test/tests/basic/bug1644839.js b/js/src/jit-test/tests/basic/bug1644839.js new file mode 100644 index 0000000000..b83b662358 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1644839.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !('oomTest' in this) +var code = ` + (\`\${key}: \${args[1]?.toString()}\`) +`; +oomTest(function() { return parseModule(code); }); diff --git a/js/src/jit-test/tests/basic/bug1656744.js b/js/src/jit-test/tests/basic/bug1656744.js new file mode 100644 index 0000000000..b1fd7cfc61 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1656744.js @@ -0,0 +1,8 @@ +Array.prototype[0] = 'x'; +Array.prototype[1] = 'x'; +var arr = []; +for (var p in arr) { + arr[0] = 0; + arr[1] = 1; + arr.reverse(); +} diff --git a/js/src/jit-test/tests/basic/bug1666856.js b/js/src/jit-test/tests/basic/bug1666856.js new file mode 100644 index 0000000000..ea6e6942d2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1666856.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !this.oomTest + +let i = 10000; +oomTest(() => { + let arr = []; + arr[i++] = 1; + for (var key in arr) {} +}); diff --git a/js/src/jit-test/tests/basic/bug1669616.js b/js/src/jit-test/tests/basic/bug1669616.js new file mode 100644 index 0000000000..7c48b229a5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1669616.js @@ -0,0 +1,9 @@ +enableLastWarning(); +eval(` + function blah() { + return 0; + if (true) {} /* no newline here */ 400n == "abc"; + } +`); +assertEq(getLastWarning().message, "unreachable code after return statement"); +blah(); diff --git a/js/src/jit-test/tests/basic/bug1678442.js b/js/src/jit-test/tests/basic/bug1678442.js new file mode 100644 index 0000000000..d2f3dd5823 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1678442.js @@ -0,0 +1,6 @@ +var fun = function() {}; +var newTarget = (function(){}).bind(); +Object.defineProperty(newTarget, "prototype", {get() { relazifyFunctions() }}); +for (var i = 0; i < 10; i++) { + Reflect.construct(fun, [], newTarget); +} diff --git a/js/src/jit-test/tests/basic/bug1700525.js b/js/src/jit-test/tests/basic/bug1700525.js new file mode 100644 index 0000000000..80424f7e2f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1700525.js @@ -0,0 +1,14 @@ +// Get a dictionary object. +var o = {x: 1, y: 2, z: 3}; +delete o.x; + +// Redefine |y| as an accessor. +var val = 0; +Object.defineProperty(o, "y", {get: () => val, set: v => { val = v; }}); + +// Optimized Object.assign path should fail. +Object.assign(o, {x: 3, y: 4, z: 5}); +assertEq(val, 4); +assertEq(o.x, 3); +assertEq(o.y, 4); +assertEq(o.z, 5); diff --git a/js/src/jit-test/tests/basic/bug1707820.js b/js/src/jit-test/tests/basic/bug1707820.js new file mode 100644 index 0000000000..d635965f7a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1707820.js @@ -0,0 +1,9 @@ +gczeal(4); +let a = "x".repeat(100); +for (let i = 0; i < 50; i++) { + let s = new String(a); + s.a = 0; + s.b = 0; + delete s.a; + Object.keys(s); +} diff --git a/js/src/jit-test/tests/basic/bug1717408.js b/js/src/jit-test/tests/basic/bug1717408.js new file mode 100644 index 0000000000..5ee6fbfaa1 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1717408.js @@ -0,0 +1,5 @@ +let g = newGlobal({newCompartment: true}); +g.evaluate("obj = {}") +g.obj.__proto__ = {}; +recomputeWrappers(); +g.evaluate("obj.x = 1"); diff --git a/js/src/jit-test/tests/basic/bug1721006.js b/js/src/jit-test/tests/basic/bug1721006.js new file mode 100644 index 0000000000..1f48286175 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1721006.js @@ -0,0 +1,15 @@ +// |jit-test| --no-threads; --baseline-warmup-threshold=10; --ion-warmup-threshold=100 + +function foo() { + let x = 1; + let y = 1; + let z = 1; + for (let i = 0; i < 4; i++) {} + for (let i = 0; i < 1000; i++) { + y &= x; + for (let j = 0; j < 100; j++) {} + x = z; + for (let j = 0; j < 8; j++) {} + } +} +foo(); diff --git a/js/src/jit-test/tests/basic/bug1731540.js b/js/src/jit-test/tests/basic/bug1731540.js new file mode 100644 index 0000000000..fc445cc58f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1731540.js @@ -0,0 +1,4 @@ +// |jit-test| exitstatus: 6 +v11 = undefined; +interruptIf(true); +for (v63 in v11); diff --git a/js/src/jit-test/tests/basic/bug1733899.js b/js/src/jit-test/tests/basic/bug1733899.js new file mode 100644 index 0000000000..4d829be655 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1733899.js @@ -0,0 +1,14 @@ +a = {} +a[Symbol.iterator] = function() { + return { + next() { + return { + done: this + } + } + } +} +function b([[]] = a) {} +try { + b(); +} catch {} diff --git a/js/src/jit-test/tests/basic/bug1754968.js b/js/src/jit-test/tests/basic/bug1754968.js new file mode 100644 index 0000000000..534b4631cc --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1754968.js @@ -0,0 +1,4 @@ +const root = {a:0, b:0}; +const subclass = Object.create(root); +const instance = Object.create(subclass); +Object.assign(subclass, root); diff --git a/js/src/jit-test/tests/basic/bug1757476.js b/js/src/jit-test/tests/basic/bug1757476.js new file mode 100644 index 0000000000..b103a89f5c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1757476.js @@ -0,0 +1,16 @@ +// |jit-test| --blinterp-eager; --ion-warmup-threshold=0; --fast-warmup; --no-threads + +function bar(x, y) { + return ((Math.fround(x) && Math.fround(y)) >>> 0) + y & x | 0 + undef(); +}; + +function foo(f, inputs) { + for (var j = 0; j < inputs.length; ++j) + for (var k = 0; k < inputs.length; ++k) + try { + f(inputs[j], inputs[k]); + } catch {} + +} + +foo(bar, [1, 1, 1, 1, 1, 1, 1, 1, -0x080000001, -0x0ffffffff]); diff --git a/js/src/jit-test/tests/basic/bug1759029-1.js b/js/src/jit-test/tests/basic/bug1759029-1.js new file mode 100644 index 0000000000..2f379cab5c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1759029-1.js @@ -0,0 +1,26 @@ +// |jit-test| --fast-warmup; --no-threads + +var arr = []; +arr[0] = 1; +arr[NaN] = 0; + +function foo() { + for (let i = 0; i < 7; i++) { + const a = i % i; + counter += a >>> a; + + try { + throw 3; + } catch { + counter += arr[a]; + } + } + for (let i = 0; i < 100; i++) { } +} + +let counter = 0; +for (var i = 0; i < 10; i++) { + foo(); +} + +assertEq(counter, 60); diff --git a/js/src/jit-test/tests/basic/bug1759029-2.js b/js/src/jit-test/tests/basic/bug1759029-2.js new file mode 100644 index 0000000000..9e5b725c3c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1759029-2.js @@ -0,0 +1,27 @@ +// |jit-test| --fast-warmup; --no-threads + +var arr = []; +arr[0] = 1; +arr[NaN] = 0; + +function foo(a) { + "use strict"; + for (let i = 0; i < 7; i++) { + a = i % i; + counter += a >>> a; + + try { + throw 3; + } catch { + counter += arr[a]; + } + } + for (let i = 0; i < 100; i++) { } +} + +let counter = 0; +for (var i = 0; i < 10; i++) { + foo(); +} + +assertEq(counter, 60); diff --git a/js/src/jit-test/tests/basic/bug1797486.js b/js/src/jit-test/tests/basic/bug1797486.js new file mode 100644 index 0000000000..e901a15f34 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1797486.js @@ -0,0 +1,5 @@ +let v2 = []; +for (let v6 = 0; v6 < 550000; v6++) { + v2[v6] = 0; + delete v2[v6]; +} diff --git a/js/src/jit-test/tests/basic/bug1814000.js b/js/src/jit-test/tests/basic/bug1814000.js new file mode 100644 index 0000000000..1a0d47f947 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1814000.js @@ -0,0 +1,12 @@ +// Don't crash because we're exposing a ScriptSourceObject to JS. +evaluate(` +const src = \` + [function f() { + const v = eval("[]"); + v[0] = function() {}; + newGlobal({sameZoneAs: this}).findPath(v, src); + }] +\`; +var arr = eval(src); +arr[0](); +`, {envChainObject: {}}); diff --git a/js/src/jit-test/tests/basic/bug1816311.js b/js/src/jit-test/tests/basic/bug1816311.js new file mode 100644 index 0000000000..e3683922e3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1816311.js @@ -0,0 +1,13 @@ +const v1 = ["foo"]; +const v17 = {...this}; +const glob = newGlobal({sameZoneAs: this}); +const dbg = glob.Debugger({}); +const v0 = eval(` + const frame = dbg.getNewestFrame(); + with (frame) { + for (const v13 in eval("function f9() {}")) {} + } + const v15 = [v1]; + findPath(v15, v15); +`); +JSON.stringify(v0); diff --git a/js/src/jit-test/tests/basic/bug1821959.js b/js/src/jit-test/tests/basic/bug1821959.js new file mode 100644 index 0000000000..d7fbe7260f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1821959.js @@ -0,0 +1,7 @@ +// Transplant an object that is using the shifted-dense-elements optimization +const v1 = this.transplantableObject(); +const v2 = v1.object; +Array.prototype.push.call(v2, 0); +Array.prototype.push.call(v2, 0); +Array.prototype.shift.call(v2); +v1.transplant(newGlobal()); diff --git a/js/src/jit-test/tests/basic/bug1822962.js b/js/src/jit-test/tests/basic/bug1822962.js new file mode 100644 index 0000000000..ca04b0b753 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1822962.js @@ -0,0 +1,2 @@ +newGlobal({newCompartment: true}).help(/a|b/); +gc(); diff --git a/js/src/jit-test/tests/basic/bug1827072.js b/js/src/jit-test/tests/basic/bug1827072.js new file mode 100644 index 0000000000..9e47c26cd7 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1827072.js @@ -0,0 +1,19 @@ +assertThrows(() => newString("", { capacity: 1 })); +assertThrows(() => newString("x", { capacity: 2 })); + +// Too large for an inline string. +const nonInlineLinear = "123456789012345678901234567890"; +assertEq(nonInlineLinear.length, 30); + +newString(nonInlineLinear, { capacity: 29, tenured: true }); +newString(nonInlineLinear, { capacity: 30, tenured: true }); +newString(nonInlineLinear, { capacity: 31, tenured: true }); + +function assertThrows(f) { + try { + f(); + } catch { + return; + } + throw new Error("missing error"); +} diff --git a/js/src/jit-test/tests/basic/bug1833517.js b/js/src/jit-test/tests/basic/bug1833517.js new file mode 100644 index 0000000000..798ddbc325 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1833517.js @@ -0,0 +1,6 @@ +enableShellAllocationMetadataBuilder(); +(function f() { + (function () { + f; + }); +})(); diff --git a/js/src/jit-test/tests/basic/bug1845698.js b/js/src/jit-test/tests/basic/bug1845698.js new file mode 100644 index 0000000000..1dc569879b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1845698.js @@ -0,0 +1,9 @@ +function f() { + var o = {x: 1, y: 2}; + Object.defineProperty(o, "z", {value: 3, configurable: false}); + delete o.x; + var snapshot = createShapeSnapshot(o); + delete o.y; + checkShapeSnapshot(snapshot); +} +f(); diff --git a/js/src/jit-test/tests/basic/bug1866540.js b/js/src/jit-test/tests/basic/bug1866540.js new file mode 100644 index 0000000000..b02a80b63f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1866540.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// On x86, MaxCodePages is 2240. Because we sometimes leave a one-page +// gap, this will guarantee there are no free two-page chunks. +for (var i = 0; i < 2200; i++) { + evalcx("function s(){}", evalcx('lazy')); +} + +// Allocating trampolines for the JitRuntime requires two pages. +evalInWorker(""); diff --git a/js/src/jit-test/tests/basic/bug1870747.js b/js/src/jit-test/tests/basic/bug1870747.js new file mode 100644 index 0000000000..c97e056f06 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1870747.js @@ -0,0 +1,7 @@ +// |jit-test| --fast-warmup; --no-threads; --ion-check-range-analysis; --arm-hwcap=vfp +function foo(x) { return x % -1; } + +with ({}) {} +for (var i = 0; i < 1000; i++) { + foo(i); +} diff --git a/js/src/jit-test/tests/basic/bug1875363.js b/js/src/jit-test/tests/basic/bug1875363.js new file mode 100644 index 0000000000..67dd8b6d1b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1875363.js @@ -0,0 +1,8 @@ +// |jit-test| --fuzzing-safe; --baseline-eager; --arm-hwcap=vfp +function f() {}; +f(); +f(); +f(); +try { + print(disnative(f)); +} catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug1877586.js b/js/src/jit-test/tests/basic/bug1877586.js new file mode 100644 index 0000000000..d6ff5b1ae3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1877586.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomAtAllocation' in this); allow-oom +try { + for (let i = 0; i < 5; i++) { + WebAssembly.instantiateStreaming( + wasmTextToBinary('(module (func) (export "" (func 0)))') + ); + } +} catch (e) {} +oomAtAllocation(7, 7); diff --git a/js/src/jit-test/tests/basic/bug504587-1.js b/js/src/jit-test/tests/basic/bug504587-1.js new file mode 100644 index 0000000000..a489f99cac --- /dev/null +++ b/js/src/jit-test/tests/basic/bug504587-1.js @@ -0,0 +1,13 @@ +// This test case failed a WIP patch. See https://bugzilla.mozilla.org/show_bug.cgi?id=504587#c68 + +function B() {} +B.prototype.x = 1; +var d = new B; + +var names = ['z', 'z', 'z', 'z', 'z', 'z', 'z', 'x']; +for (var i = 0; i < names.length; i++) { + x = d.x; // guard on shapeOf(d) + d[names[i]] = 2; // unpredicted shape change + y = d.x; // guard here is elided +} +assertEq(y, 2); // Assertion failed: got 1, expected 2 diff --git a/js/src/jit-test/tests/basic/bug507180.js b/js/src/jit-test/tests/basic/bug507180.js new file mode 100644 index 0000000000..9d8fb19580 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug507180.js @@ -0,0 +1,69 @@ +var o = { + valueOf : function() { + return { + toString : function() { return "fail" } + } + }, + toString : function() { return "good" } +}; + +var p = { + valueOf : function() { + return { + toString : function() { return "0" } + } + }, + toString : function() { return "7" } +}; + +var q = { + toString : function() { + return { + valueOf : function() { return "0" } + } + }, + valueOf : function() { return "7" } +}; + +function assert(b, s) { + if (b) + return; + assertEq("imacro produces incorrect result for " + s, "fail"); +} + +function run() { + for (var i = 0; i < 5; ++i) { + // equality / inequality + assert(!(o == "fail"), "obj == any"); + assert(!("fail" == o), "any == obj"); + assert(!(o != "good"), "obj != any"); + assert(!("good" != o), "any != obj"); + + // binary + assert(!((p | 3) != 7), "obj | any"); + assert(!((3 | p) != 7), "any | obj"); + assert(!((p | p) != 7), "obj | obj"); + assert(!((p & 3) != 3), "obj & any"); + assert(!((3 & p) != 3), "any & obj"); + assert(!((p & p) != 7), "obj & obj"); + assert(!((p * 3) != 21), "obj * any"); + assert(!((3 * p) != 21), "any * obj"); + assert(!((p * p) != 49), "obj * obj"); + + // addition + assert(!(o + "" != "good"), "obj + any"); + assert(!("" + o != "good"), "any + obj"); + assert(!(o + o != "goodgood"), "any + any"); + + // sign + assert(!(-p != -7), "-obj"); + assert(!(+p != 7), "+obj"); + + // String + assert(!(String(q) != "7"), "String(obj)"); + assert(!(new String(q) != "7"), "new String(obj)"); + } + return true; +} + +run(); diff --git a/js/src/jit-test/tests/basic/bug509639.js b/js/src/jit-test/tests/basic/bug509639.js new file mode 100644 index 0000000000..7c5b0c7919 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug509639.js @@ -0,0 +1,3 @@ +// don't crash + +(function(){ var c; eval("for(c in [1,2,3,4]) {}") })(); diff --git a/js/src/jit-test/tests/basic/bug509982.js b/js/src/jit-test/tests/basic/bug509982.js new file mode 100644 index 0000000000..36b9364a1f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug509982.js @@ -0,0 +1,15 @@ +function g() { + const e = 0; + return function () { + switch (7) { + case e: + } + }; +} + +for (var i = 0; i < 2; i++) { + let f = g; + f(); +} + +// Just test that we don't crash. diff --git a/js/src/jit-test/tests/basic/bug510434.js b/js/src/jit-test/tests/basic/bug510434.js new file mode 100644 index 0000000000..253352e29d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug510434.js @@ -0,0 +1,2 @@ +var f = function(){ var arguments = 3; for (var j=0;j<4;++j) print(arguments); }; +f(); diff --git a/js/src/jit-test/tests/basic/bug510437-2.js b/js/src/jit-test/tests/basic/bug510437-2.js new file mode 100644 index 0000000000..1fca2067f0 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug510437-2.js @@ -0,0 +1,13 @@ +function f() { + eval("g=function() { \ + for (let x=0; x < 2; ++x) { \ + d=x \ + } \ + }") + g(); + eval("var d") + g(); +} + +f(); +assertEq(d, 1); diff --git a/js/src/jit-test/tests/basic/bug511214.js b/js/src/jit-test/tests/basic/bug511214.js new file mode 100644 index 0000000000..611d86e45a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug511214.js @@ -0,0 +1,18 @@ +eval(1); // avoid global shape change when we call eval below +function q() { + var x = 1; + function f() { + function g() { + var t=0; + for (var i=0; i<3; i++) + x = i; + }; + g(); + eval("var x = 3"); + g(); + assertEq(x, 2); + } + f(); + assertEq(x, 2); +} +q(); diff --git a/js/src/jit-test/tests/basic/bug511241.js b/js/src/jit-test/tests/basic/bug511241.js new file mode 100644 index 0000000000..fe28febb93 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug511241.js @@ -0,0 +1,15 @@ +var d = 1; +function heavy(x) { + eval(x); + return function lite() { + var s = 0; + for (var i = 0; i < 9; i++) + s += d; + return s; + }; +} + +var f1 = heavy("1"); +var f2 = heavy("var d = 100;"); +assertEq(f1(), 9); +assertEq(f2(), 900); diff --git a/js/src/jit-test/tests/basic/bug513038.js b/js/src/jit-test/tests/basic/bug513038.js new file mode 100644 index 0000000000..21cf1c3264 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug513038.js @@ -0,0 +1,16 @@ +// Just don't assert or crash. + +function f() { + let c + try { + (eval("\ + (function(){\ + with(\ + this.__defineGetter__(\"x\", function(){for(a = 0; a < 3; a++){c=a}})\ + ){}\ + })\ + "))() + } catch(e) {} +} +f() +print(x) diff --git a/js/src/jit-test/tests/basic/bug513898-regexp.js b/js/src/jit-test/tests/basic/bug513898-regexp.js new file mode 100644 index 0000000000..48a5d9fd41 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug513898-regexp.js @@ -0,0 +1,51 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + * Contributor: haytjes + */ + +/* Check the undefined pattern is equivalent to empty string. */ + +assertEq(RegExp(undefined).source, '(?:)'); +assertEq(RegExp(undefined).global, false); +assertEq("test".replace(RegExp(undefined), "*"), '*test'); +assertEq(new RegExp(undefined).source, '(?:)'); +assertEq(new RegExp(undefined).global, false); +assertEq('test'.replace(new RegExp(undefined), "*"), '*test'); + +/* Global flags. */ + +assertEq(new RegExp(undefined, "g").global, true); +assertEq("test".replace(new RegExp(undefined, "g"), "*"), "*t*e*s*t*"); +assertEq(RegExp(undefined, "g").global, true); +assertEq("test".replace(RegExp(undefined, "g"), "*"), "*t*e*s*t*"); + +/* Undefined flags. */ + +var re = new RegExp(undefined, undefined); +assertEq(re.multiline, false); +assertEq(re.global, false); +assertEq(re.ignoreCase, false); + +var re = new RegExp("test", undefined); +assertEq(re.multiline, false); +assertEq(re.global, false); +assertEq(re.ignoreCase, false); + +/* Flags argument that requires toString. */ + +function Flags() {}; + +Flags.prototype.toString = function dogToString() { return ""; } + +var re = new RegExp(undefined, new Flags()); +assertEq(re.multiline, false); +assertEq(re.global, false); +assertEq(re.ignoreCase, false); + +Flags.prototype.toString = function dogToString() { return "gim"; } + +var re = new RegExp(undefined, new Flags()); +assertEq(re.multiline, true); +assertEq(re.global, true); +assertEq(re.ignoreCase, true); diff --git a/js/src/jit-test/tests/basic/bug516009.js b/js/src/jit-test/tests/basic/bug516009.js new file mode 100644 index 0000000000..db3a359425 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug516009.js @@ -0,0 +1,20 @@ +var gFutureCalls = []; + +function add_future_call(index, func) +{ + if (!(index in gFutureCalls)) { + gFutureCalls[index] = []; + } +} + +function check_reset_test(time) +{ +} + +check_reset_test(0); + +for (var i = 1; i <= 8; ++i) { + (function(j) { + add_future_call(j, function() { check_reset_test(j); }); + })(i); +} diff --git a/js/src/jit-test/tests/basic/bug517721.js b/js/src/jit-test/tests/basic/bug517721.js new file mode 100644 index 0000000000..77a2c944e6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug517721.js @@ -0,0 +1,8 @@ +try { + for (var j = 0; j < 2; ++j) { + if (j == 1) { + ++(null[2]); + } + } +} catch(e) { +} diff --git a/js/src/jit-test/tests/basic/bug519129.js b/js/src/jit-test/tests/basic/bug519129.js new file mode 100644 index 0000000000..89ba1f9daa --- /dev/null +++ b/js/src/jit-test/tests/basic/bug519129.js @@ -0,0 +1 @@ +(function(){eval("for(l in[0,0,0]){}",0)})() diff --git a/js/src/jit-test/tests/basic/bug520498.js b/js/src/jit-test/tests/basic/bug520498.js new file mode 100644 index 0000000000..55324f6f30 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug520498.js @@ -0,0 +1,9 @@ +var Q = 0; +try { + (function f(i) { Q = i; if (i == 100000) return; f(i+1); })(1) +} catch (e) { +} + +if (Q == 100000) + assertEq(Q, "fail"); + diff --git a/js/src/jit-test/tests/basic/bug522136.js b/js/src/jit-test/tests/basic/bug522136.js new file mode 100644 index 0000000000..98b16df3ae --- /dev/null +++ b/js/src/jit-test/tests/basic/bug522136.js @@ -0,0 +1,10 @@ +var Q = 0; +var thrown = false; +try { + (function f(i) { Q = i; if (i == 200000) return; f(i+1); })(1) +} catch (e) { + thrown = true; +} + +// Exact behavior of recursion check depends on which JIT we use. +assertEq(thrown && Q > 350, true); diff --git a/js/src/jit-test/tests/basic/bug522817.js b/js/src/jit-test/tests/basic/bug522817.js new file mode 100644 index 0000000000..25b5b99f37 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug522817.js @@ -0,0 +1,17 @@ +// This test should not assert in a debug build. + +var q1={}; +var $native = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + arguments[i].extend = function (props) {}; + } +}; +$native(q1, Array, String, Number); +Array.extend({}); +Number.extend({}); +Object.Native = function () { + for (var i = 0; i < arguments.length; i++) { + arguments[i].eeeeee = (function(){}); + } +}; +new Object.Native(q1, Array, String, Number); diff --git a/js/src/jit-test/tests/basic/bug524826-2.js b/js/src/jit-test/tests/basic/bug524826-2.js new file mode 100644 index 0000000000..38e3c27285 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug524826-2.js @@ -0,0 +1,11 @@ +var x = 42; + +function f() { + var a = [{}, {}, {}, {}, {}]; + for (var i = 0; i < 5; i++) + a[i].m = function () {return x}; + for (i = 0; i < 4; i++) + if (a[i].m == a[i+1].m) + throw "FAIL!"; +} +f(); diff --git a/js/src/jit-test/tests/basic/bug524826.js b/js/src/jit-test/tests/basic/bug524826.js new file mode 100644 index 0000000000..225c3591fa --- /dev/null +++ b/js/src/jit-test/tests/basic/bug524826.js @@ -0,0 +1,10 @@ +var x = 42; +function f() { + var a = [new Date, new Date, new Date, new Date, new Date]; + for (var i = 0; i < 5; i++) + a[i].m = function () {return x}; + for (i = 0; i < 4; i++) + if (a[i].m == a[i+1].m) + throw "FAIL!"; +} +f(); diff --git a/js/src/jit-test/tests/basic/bug525028.js b/js/src/jit-test/tests/basic/bug525028.js new file mode 100644 index 0000000000..90200b6bc0 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug525028.js @@ -0,0 +1,16 @@ +// don't crash + +function f() { + var _L1 = arguments; + for (var i = 0; i < _L1.length; i++) { + if (typeof _L1[i] == "string") + _L1[i] = new Object(); + } + print(arguments[2]); +} + +f(1, 2, "3", 4, 5); +f(1, 2, "3", 4, 5); +f(1, 2, "3", 4, 5); +f(1, 2, "3", 4, 5); + diff --git a/js/src/jit-test/tests/basic/bug528116.js b/js/src/jit-test/tests/basic/bug528116.js new file mode 100644 index 0000000000..8a47778f71 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug528116.js @@ -0,0 +1,8 @@ +(function() { + var x = [null, [], null]; + for (var i = 0; i != x.length; ++i) { + eval("for (var b = 0; b < 2; ++b);", x[i]); + } +})(); + +// Just test that we don't crash. diff --git a/js/src/jit-test/tests/basic/bug532568-2.js b/js/src/jit-test/tests/basic/bug532568-2.js new file mode 100644 index 0000000000..47f705810f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug532568-2.js @@ -0,0 +1,20 @@ +var before = ''; +var after = ''; + +function g(b) { + for (var i = 0; i < 10; ++i) { + } +} + +function f(xa_arg) { + var xa = xa_arg; + for (var i = 0; i < 5; ++i) { + var j = i + xa[i]; + before += j + ','; + g(); + after += j + ','; + } +} + +f([ 0, 1, 2, 3, 4 ]); +assertEq(before, after); diff --git a/js/src/jit-test/tests/basic/bug532568.js b/js/src/jit-test/tests/basic/bug532568.js new file mode 100644 index 0000000000..b1cf86c15f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug532568.js @@ -0,0 +1,19 @@ +var actual = ""; + +function f() { + var x = 10; + + var g = function(p) { + for (var i = 0; i < 10; ++i) + x = p + i; + } + + for (var i = 0; i < 10; ++i) { + g(100 * i + x); + actual += x + ','; + } +} + +f(); + +assertEq(actual, "19,128,337,646,1055,1564,2173,2882,3691,4600,"); diff --git a/js/src/jit-test/tests/basic/bug532823.js b/js/src/jit-test/tests/basic/bug532823.js new file mode 100644 index 0000000000..c2b2dc6d5f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug532823.js @@ -0,0 +1,23 @@ +function loop(f) { + var p; + for (var i = 0; i < 10; ++i) { + p = f(); + } + return p; +} + +function f(j, k) { + var g = function() { return k; } + + var ans = ''; + + for (k = 0; k < 5; ++k) { + ans += loop(g); + } + return ans; +} + +var t0 = new Date; +var actual = f(1); + +assertEq(actual, '01234'); diff --git a/js/src/jit-test/tests/basic/bug535474.js b/js/src/jit-test/tests/basic/bug535474.js new file mode 100644 index 0000000000..6e34298a2b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug535474.js @@ -0,0 +1,27 @@ +function f() { + var _76 = {}; + for (var i = 0; i < arguments.length; i++) { + var typ = arguments[i]; + _76[typ] = typ; + } + return function () { + for (var i = 0; i < arguments.length; i++) { + if (!(typeof (arguments[i]) in _76)) { + return false; + } + } + return true; + } +} + +g = f("number", "boolean", "object"); + +g("a", "b", "c", "d", "e", "f", 2); +g(2, "a", "b", "c", "d", "e", "f", 2); + +/* + * Don't assert -- + * Assertion failed: frame entry -4 wasn't freed + * : _activation.entry[i] == 0 (../nanojit/Assembler.cpp:786) + */ + diff --git a/js/src/jit-test/tests/basic/bug535760.js b/js/src/jit-test/tests/basic/bug535760.js new file mode 100644 index 0000000000..dd00b96152 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug535760.js @@ -0,0 +1,13 @@ +/* vim: set ts=8 sts=4 et sw=4 tw=99: */ +function foundit(items, n) { + for (var i = 0; i < 10; i++) + arguments[2](items, this); +} + +function dostuff() { + print(this); +} +foundit('crab', 'crab', dostuff); + +/* Don't crash or assert */ + diff --git a/js/src/jit-test/tests/basic/bug535930.js b/js/src/jit-test/tests/basic/bug535930.js new file mode 100644 index 0000000000..ac985d18ef --- /dev/null +++ b/js/src/jit-test/tests/basic/bug535930.js @@ -0,0 +1,19 @@ +(function () { + p = function () { + Set() + }; + var Set = function () {}; + for (var x = 0; x < 5; x++) { + Set = function (z) { + return function () { + [z] + } + } (x) + } +})() + +/* + * bug 535930, mistakenly generated code to GetUpvar and crashed inside the call. + * so don't crash. + */ + diff --git a/js/src/jit-test/tests/basic/bug536445.js b/js/src/jit-test/tests/basic/bug536445.js new file mode 100644 index 0000000000..16808bb305 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug536445.js @@ -0,0 +1,10 @@ +var x; +var str = "a"; +assertEq(str.charCodeAt(Infinity) | 0, 0); +for (var i = 0; i < 10; ++i) + x = str.charCodeAt(Infinity) | 0; +assertEq(x, 0); +for (var i = 0; i < 10; ++i) + x = str.charCodeAt(Infinity); +assertEq(x | 0, 0); + diff --git a/js/src/jit-test/tests/basic/bug536748.js b/js/src/jit-test/tests/basic/bug536748.js new file mode 100644 index 0000000000..42d8200895 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug536748.js @@ -0,0 +1,8 @@ +// Do not assert. + +var s = "a"; +var b = 32767; + +for (var i = 0; i < 10; ++i) { + b = b & s.charCodeAt(); +} diff --git a/js/src/jit-test/tests/basic/bug539379.js b/js/src/jit-test/tests/basic/bug539379.js new file mode 100644 index 0000000000..dab57f507f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug539379.js @@ -0,0 +1,9 @@ +try { + // On X64 this was crashing rather than causing a "too much recursion" exception. + x = /x/; + (function f() { + x.r = x; + return f() + })(); +} catch (e) {} + diff --git a/js/src/jit-test/tests/basic/bug539553-2.js b/js/src/jit-test/tests/basic/bug539553-2.js new file mode 100644 index 0000000000..244355bccb --- /dev/null +++ b/js/src/jit-test/tests/basic/bug539553-2.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !Object.prototype.toSource + +function f() { + var x = arguments; + arguments.length = {}; + for (var i = 0; i < 9; i++) + x.length.toSource(); +} +f(); diff --git a/js/src/jit-test/tests/basic/bug539553-3.js b/js/src/jit-test/tests/basic/bug539553-3.js new file mode 100644 index 0000000000..44b7d41f53 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug539553-3.js @@ -0,0 +1,11 @@ +function g(x) { + assertEq(arguments.length, 1); + assertEq(x.length, 4); +} + +function f() { + for (var i = 0; i < 9; i++) + g(arguments); +} + +f(1, 2, 3, 4); diff --git a/js/src/jit-test/tests/basic/bug539553.js b/js/src/jit-test/tests/basic/bug539553.js new file mode 100644 index 0000000000..41f12c7948 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug539553.js @@ -0,0 +1,11 @@ +function g(x) { + assertEq(x.length, 1); +} + +function f() { + arguments.length = 1; + for (var i = 0; i < 9; i++) + g(arguments); +} + +f(); diff --git a/js/src/jit-test/tests/basic/bug541191-1.js b/js/src/jit-test/tests/basic/bug541191-1.js new file mode 100644 index 0000000000..74ccae8297 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug541191-1.js @@ -0,0 +1,23 @@ +/* vim: set ts=8 sts=4 et sw=4 tw=99: */ + +function g(a, b, c, d) { + return "" + a + b + c + d; +} + +var x = 1; +function f(a, b, c) { + arguments[1] = 2; + arguments[2] = 3; + arguments[3] = 4; + if (!x) + arguments.length = 4; + var k; + for (var i = 0; i < 10; i++) + k = g.apply(this, arguments); + return k; +} + +assertEq(f(1), "1undefinedundefinedundefined"); +x = 0; +assertEq(f(1), "1234"); + diff --git a/js/src/jit-test/tests/basic/bug541191-2.js b/js/src/jit-test/tests/basic/bug541191-2.js new file mode 100644 index 0000000000..d270b7de1e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug541191-2.js @@ -0,0 +1,23 @@ +/* vim: set ts=8 sts=4 et sw=4 tw=99: */ + +function g(a, b, c, d) { + return "" + a + b + c + d; +} + +var x = 1; +function f(a, b, c) { + arguments[1] = 2; + arguments[2] = 3; + arguments[3] = 4; + if (x) + arguments.length = 4; + var k; + for (var i = 0; i < 9; i++) + k = g.apply(this, arguments); + return k; +} + +assertEq(f(1), "1234"); +x = 0; +assertEq(f(1), "1undefinedundefinedundefined"); + diff --git a/js/src/jit-test/tests/basic/bug541191-3.js b/js/src/jit-test/tests/basic/bug541191-3.js new file mode 100644 index 0000000000..f447d49d1e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug541191-3.js @@ -0,0 +1,23 @@ +/* vim: set ts=8 sts=4 et sw=4 tw=99: */ + +function g(a, b, c, d) { + return "" + a + b + c + d; +} + +var x = 1; +function f(a, b, c) { + arguments[1] = 2; + arguments[2] = 3; + arguments[3] = 4; + if (x) + arguments.length = 1; + var k; + for (var i = 0; i < 10; i++) + k = g.apply(this, arguments); + return k; +} + +assertEq(f(1), "1undefinedundefinedundefined"); +x = 0; +assertEq(f(1), "1undefinedundefinedundefined"); + diff --git a/js/src/jit-test/tests/basic/bug541191-4.js b/js/src/jit-test/tests/basic/bug541191-4.js new file mode 100644 index 0000000000..5d15bedb5c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug541191-4.js @@ -0,0 +1,27 @@ +/* vim: set ts=8 sts=4 et sw=4 tw=99: */ + +function g(a, b, c, d) { + return "" + a + b + c + d; +} + +var x = 1; +function f(a, b, c) { + arguments[1] = 2; + arguments[2] = 3; + arguments[3] = 4; + if (x) { + arguments.length = 1; + delete arguments.length; + arguments.__defineGetter__('length', function () { return eval('1'); }); + } + var k; + for (var i = 0; i < 10; i++) + k = g.apply(this, arguments); + return k; +} + +assertEq(f(1), "1undefinedundefinedundefined"); +x = 0; +assertEq(f(1), "1undefinedundefinedundefined"); + + diff --git a/js/src/jit-test/tests/basic/bug541191-5.js b/js/src/jit-test/tests/basic/bug541191-5.js new file mode 100644 index 0000000000..f87217b2cc --- /dev/null +++ b/js/src/jit-test/tests/basic/bug541191-5.js @@ -0,0 +1,24 @@ +/* vim: set ts=8 sts=4 et sw=4 tw=99: */ + +function g(a, b, c, d) { + return "" + a + b + c + d; +} + +var x = 1; +function f(a, b, c) { + arguments[1] = 2; + arguments[2] = 3; + arguments[3] = 4; + if (x) + arguments.length = 1; + var k; + for (var i = 0; i < 10; i++) + k = g.apply(this, arguments); + return k; +} + +assertEq(f(1), "1undefinedundefinedundefined"); +x = 0; +assertEq(f(1), "1undefinedundefinedundefined"); + + diff --git a/js/src/jit-test/tests/basic/bug552196.js b/js/src/jit-test/tests/basic/bug552196.js new file mode 100644 index 0000000000..d526234851 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug552196.js @@ -0,0 +1,12 @@ +(Function("\ + for (a = 0; a < 5; a++)\n\ + (function f(b) {\n\ + if (b > 0) {\n\ + f(b - 1)\n\ + }\n\ + })\n\ + (3)\n\ +"))() + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/basic/bug557841.js b/js/src/jit-test/tests/basic/bug557841.js new file mode 100644 index 0000000000..903490e6ed --- /dev/null +++ b/js/src/jit-test/tests/basic/bug557841.js @@ -0,0 +1 @@ +eval("for(a = 0; a < 4; a++) x = 1;", []); diff --git a/js/src/jit-test/tests/basic/bug558530.js b/js/src/jit-test/tests/basic/bug558530.js new file mode 100644 index 0000000000..31fa78eadb --- /dev/null +++ b/js/src/jit-test/tests/basic/bug558530.js @@ -0,0 +1,14 @@ +// There's no assertEq() here; the test is just that it doesn't crash. +(function () { + new function () {} +}()); +[function () {}] +gc() +for (z = 0; z < 6; ++z) { + x = [] +} +for (w in [0]) { + x._ = w +} +gc() + diff --git a/js/src/jit-test/tests/basic/bug558531.js b/js/src/jit-test/tests/basic/bug558531.js new file mode 100644 index 0000000000..ddabce8799 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug558531.js @@ -0,0 +1,46 @@ +function f2(c) { + return { + g: c.match(/:/) & c.match(/:/) & c.match(/f/) & c.m & c.a & c.match(/f/) & + c.match(/c/) & c.match(/a/) & (/s/) & c.match(/e/) & c.match(/s/) & + (c.match(/./) & c.i) & (c.match(/\*/)) & (c.match(/n/)), + y: c.a & c.a & c.match(/\)/) & c.match(/\)/) & c.match(/\)/) + & c.match(/\\/), + c: c.match(/f/) + } +} +function f1(c) { + t = f2(c.replace(/s/)) + try { + eval(c) + } catch(e) {} + f4(); + if (c.indexOf("<") == -1 || c.indexOf()) + try {} catch(e) {} + try { + try { + l + } catch(e) {} + if ("unwatch" in this) {} + g + } catch(e) {} + try {} catch(p) {} +} +function f4() { + try {} catch(e) {} { + try { + eval(s + "") + } catch(e) {} + } +} [{}] +s = [{},{}]; +(function(){}()) +s[{},{},{}] = [function(){}] +a = [{},{},{}].concat([{},{}]) +f1("") +f1("") +f1("n") +f1("") +f1("(__proto__=null)") +f1("for(var z=0;z<1;z++){gc()(*::*)}") +f1("gc()") +f1("<") diff --git a/js/src/jit-test/tests/basic/bug558814.js b/js/src/jit-test/tests/basic/bug558814.js new file mode 100644 index 0000000000..63a9f877ba --- /dev/null +++ b/js/src/jit-test/tests/basic/bug558814.js @@ -0,0 +1,10 @@ +function f() +{ + var a = []; + a.length = 10; + for (var i = 0; i < 100; i++) { + var y = a[a.length]; + } +} +f(); +// No assertEq() call, the test is just that it shouldn't assert or crash. diff --git a/js/src/jit-test/tests/basic/bug559912.js b/js/src/jit-test/tests/basic/bug559912.js new file mode 100644 index 0000000000..8f05ff5a3a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug559912.js @@ -0,0 +1,12 @@ + +function s(f) { this._m = f; } +function C() { + Object.defineProperty(this, "m", {set: s}); + this.m = function () {}; +} +var last = {}; +for (var i = 0; i < 20; i++) { + var a = new C; + assertEq(a._m === last._m, false); + last = a; +} diff --git a/js/src/jit-test/tests/basic/bug560234.js b/js/src/jit-test/tests/basic/bug560234.js new file mode 100644 index 0000000000..dc2956a76b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug560234.js @@ -0,0 +1,10 @@ +function test() { + var a = ['x', '', '', '', '', '', '', 'x']; + var b = ''; + for (var i = 0; i < a.length; i++) { + (function() { + a[i].replace(/x/, function() { return b; }); + }()); + } +} +test(); // should NOT get a ReferenceError for b on trace diff --git a/js/src/jit-test/tests/basic/bug560234b.js b/js/src/jit-test/tests/basic/bug560234b.js new file mode 100644 index 0000000000..a008b5f42a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug560234b.js @@ -0,0 +1,12 @@ +function f(a) { + function* g() { + yield function () { return a; }; + } + if (a == 8) + return g(); + a = 3; +} +var x; +for (var i = 0; i < 9; i++) + x = f(i); +x.next().value(); // ReferenceError: a is not defined. diff --git a/js/src/jit-test/tests/basic/bug561279.js b/js/src/jit-test/tests/basic/bug561279.js new file mode 100644 index 0000000000..2160be51b9 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug561279.js @@ -0,0 +1,4 @@ +{ + let y; + eval('eval("for (z = 0; z < 6; z++) a = z;")'); +} diff --git a/js/src/jit-test/tests/basic/bug561359-1.js b/js/src/jit-test/tests/basic/bug561359-1.js new file mode 100644 index 0000000000..4439174e06 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug561359-1.js @@ -0,0 +1,4 @@ +for (let z = 0; z < 2; z++) { + with ({x: function () {}}) + f = x; +} diff --git a/js/src/jit-test/tests/basic/bug561359-2.js b/js/src/jit-test/tests/basic/bug561359-2.js new file mode 100644 index 0000000000..017b9bf338 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug561359-2.js @@ -0,0 +1,8 @@ +function f(s) { + var obj = {m: function () { return a; }}; + eval(s); + return obj; +} +var obj = f("var a = 'right';"); +var a = 'wrong'; +assertEq(obj.m(), 'right'); diff --git a/js/src/jit-test/tests/basic/bug563125.js b/js/src/jit-test/tests/basic/bug563125.js new file mode 100644 index 0000000000..79e43eae4f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug563125.js @@ -0,0 +1,5 @@ +var array = new Array(4294967295); +for (var j = 0; j < 9; ++j) { '' + array.length; } + +// Don't assert. + diff --git a/js/src/jit-test/tests/basic/bug563243.js b/js/src/jit-test/tests/basic/bug563243.js new file mode 100644 index 0000000000..64dc830e83 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug563243.js @@ -0,0 +1,7 @@ +// |jit-test| error:SyntaxError + +(function () { + for (a in (function () { + yield Array.reduce() + })()) function () {} +})() diff --git a/js/src/jit-test/tests/basic/bug566136.js b/js/src/jit-test/tests/basic/bug566136.js new file mode 100644 index 0000000000..2d5f7ffb08 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug566136.js @@ -0,0 +1,11 @@ +load(libdir + "immutable-prototype.js"); + +Object.prototype.length = 0; +if (globalPrototypeChainIsMutable()) + this.__proto__ = []; + +function f() { + eval('Math'); + length = 2; +} +f(); diff --git a/js/src/jit-test/tests/basic/bug566637.js b/js/src/jit-test/tests/basic/bug566637.js new file mode 100644 index 0000000000..6623dbabf8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug566637.js @@ -0,0 +1,5 @@ +for (var j = 0; j < 9; j++) { + var a = j; + var b = this.a; +} +assertEq(b, 8); diff --git a/js/src/jit-test/tests/basic/bug568276.js b/js/src/jit-test/tests/basic/bug568276.js new file mode 100644 index 0000000000..4f3f6e7e51 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug568276.js @@ -0,0 +1 @@ +function outer(a) { var b, c, d, e, f, g, h, i; function a() {} } diff --git a/js/src/jit-test/tests/basic/bug569651.js b/js/src/jit-test/tests/basic/bug569651.js new file mode 100644 index 0000000000..58f9c13626 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug569651.js @@ -0,0 +1,3 @@ +// don't crash or assert + ++Function("switch(\"\"){case 1:case 8:}"); \ No newline at end of file diff --git a/js/src/jit-test/tests/basic/bug570385-1.js b/js/src/jit-test/tests/basic/bug570385-1.js new file mode 100644 index 0000000000..ec9007c010 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug570385-1.js @@ -0,0 +1,9 @@ +var actual = ''; + +var a = [0, 1]; +for (var i in a) { + appendToActual(i); + a.pop(); +} + +assertEq(actual, "0,"); diff --git a/js/src/jit-test/tests/basic/bug570385-2.js b/js/src/jit-test/tests/basic/bug570385-2.js new file mode 100644 index 0000000000..dc189dd5c0 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug570385-2.js @@ -0,0 +1,9 @@ +var actual = ''; + +var a = [0, 1]; +for (var i in a) { + appendToActual(i); + delete a[1]; +} + +assertEq(actual, "0,"); diff --git a/js/src/jit-test/tests/basic/bug570385-3.js b/js/src/jit-test/tests/basic/bug570385-3.js new file mode 100644 index 0000000000..f65fabccd4 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug570385-3.js @@ -0,0 +1,11 @@ +var actual = ''; + +var a = [0, 1]; +a.x = 10; +delete a.x; +for (var i in a) { + appendToActual(i); + a.pop(); +} + +assertEq(actual, "0,"); diff --git a/js/src/jit-test/tests/basic/bug570663-1.js b/js/src/jit-test/tests/basic/bug570663-1.js new file mode 100644 index 0000000000..08f14ecf7a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug570663-1.js @@ -0,0 +1,4 @@ +// don't crash +for (var a = 0; a < 4; a++) { + switch (NaN) {} +} diff --git a/js/src/jit-test/tests/basic/bug570663-2.js b/js/src/jit-test/tests/basic/bug570663-2.js new file mode 100644 index 0000000000..bc4b08869d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug570663-2.js @@ -0,0 +1,12 @@ +function f() { + var x; + for (var a = 0; a < 4; a++) { + switch (NaN) { + default: + x = a; + } + } + assertEq(x, 3); +} + +f(); diff --git a/js/src/jit-test/tests/basic/bug572229.js b/js/src/jit-test/tests/basic/bug572229.js new file mode 100644 index 0000000000..c45cea0b6c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug572229.js @@ -0,0 +1,12 @@ +// Don't crash + +function f(o, s) { + var k = s.substr(0, 1); + var c; + for (var i = 0; i < 10; ++i) { + c = k in o; + } + return c; +} + +assertEq(f({ a: 66 }, 'abc'), true); diff --git a/js/src/jit-test/tests/basic/bug572232.js b/js/src/jit-test/tests/basic/bug572232.js new file mode 100644 index 0000000000..f651ca9867 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug572232.js @@ -0,0 +1,4 @@ +// |jit-test| error: TypeError +gczeal(11); +var o = { valueOf: function() { new Object(); gc(); return 17; } }; +(new String.prototype.substring(o)).toString; diff --git a/js/src/jit-test/tests/basic/bug576823-regexp.js b/js/src/jit-test/tests/basic/bug576823-regexp.js new file mode 100644 index 0000000000..175ecb2bce --- /dev/null +++ b/js/src/jit-test/tests/basic/bug576823-regexp.js @@ -0,0 +1,3 @@ +// Sticky should work across disjunctions. + +assertEq(/A|B/y.exec("CB"), null); diff --git a/js/src/jit-test/tests/basic/bug576837-regexp.js b/js/src/jit-test/tests/basic/bug576837-regexp.js new file mode 100644 index 0000000000..956b3eae99 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug576837-regexp.js @@ -0,0 +1,41 @@ +/* + * Check that builtin character classes within ranges produce syntax + * errors. + * + * Note: /\b/ is the backspace escape, which is a single pattern character, + * though it looks deceptively like a character class. + */ + +function isRegExpSyntaxError(pattern) { + try { + var re = new RegExp(pattern); + } catch (e) { + if (e instanceof SyntaxError) + return true; + } + return false; +} + +//assertEq(isRegExpSyntaxError('[C-\\s]'), false); +//assertEq(isRegExpSyntaxError('[C-\\d]'), false); +//assertEq(isRegExpSyntaxError('[C-\\W]'), false); +assertEq(isRegExpSyntaxError('[C-]'), false); +assertEq(isRegExpSyntaxError('[-C]'), false); +assertEq(isRegExpSyntaxError('[C-C]'), false); +assertEq(isRegExpSyntaxError('[C-C]'), false); +assertEq(isRegExpSyntaxError('[\\b-\\b]'), false); +assertEq(isRegExpSyntaxError('[\\B-\\B]'), false); +assertEq(isRegExpSyntaxError('[\\b-\\B]'), false); +assertEq(isRegExpSyntaxError('[\\B-\\b]'), true); +//assertEq(isRegExpSyntaxError('[\\b-\\w]'), false); +//assertEq(isRegExpSyntaxError('[\\B-\\w]'), false); + +/* Extension. */ +assertEq(isRegExpSyntaxError('[\\s-\\s]'), false); +assertEq(isRegExpSyntaxError('[\\W-\\s]'), false); +assertEq(isRegExpSyntaxError('[\\s-\\W]'), false); +assertEq(isRegExpSyntaxError('[\\W-C]'), false); +assertEq(isRegExpSyntaxError('[\\d-C]'), false); +assertEq(isRegExpSyntaxError('[\\s-C]'), false); +assertEq(isRegExpSyntaxError('[\\w-\\b]'), false); +assertEq(isRegExpSyntaxError('[\\w-\\B]'), false); diff --git a/js/src/jit-test/tests/basic/bug576891.js b/js/src/jit-test/tests/basic/bug576891.js new file mode 100644 index 0000000000..5abae94ce2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug576891.js @@ -0,0 +1 @@ +/[&@!)OZ%3,#]/; diff --git a/js/src/jit-test/tests/basic/bug578041.js b/js/src/jit-test/tests/basic/bug578041.js new file mode 100644 index 0000000000..59a1f2910d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug578041.js @@ -0,0 +1,3 @@ +this.__defineGetter__('x', () => new Float32Array()); +with(this) + x; diff --git a/js/src/jit-test/tests/basic/bug579740.js b/js/src/jit-test/tests/basic/bug579740.js new file mode 100644 index 0000000000..26fa1ce22a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug579740.js @@ -0,0 +1,7 @@ +try { + for (a = 0; a < 4; a++) { + new Math.round(0).t + } +} +catch (e) {} +/* Don't assert. */ diff --git a/js/src/jit-test/tests/basic/bug582161.js b/js/src/jit-test/tests/basic/bug582161.js new file mode 100644 index 0000000000..09f9a89194 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug582161.js @@ -0,0 +1,3 @@ +// |jit-test| error: RangeError; +var vs = [1, 1, 1, 1, 3.5, 1]; +for (var i = 0, sz = vs.length; i < sz; i++) new Array(vs[i]); diff --git a/js/src/jit-test/tests/basic/bug582479.js b/js/src/jit-test/tests/basic/bug582479.js new file mode 100644 index 0000000000..246c66780d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug582479.js @@ -0,0 +1,4 @@ +for (b = 0; b < 2; b++) { + / /.exec(function(){}) +} + diff --git a/js/src/jit-test/tests/basic/bug583757.js b/js/src/jit-test/tests/basic/bug583757.js new file mode 100644 index 0000000000..3a7f910bab --- /dev/null +++ b/js/src/jit-test/tests/basic/bug583757.js @@ -0,0 +1,24 @@ +var arr = []; + +function f() {} + +function g(n, h) { + var a = f; + if (n <= 0) + return f; + + var t = g(n - 1, h); + var r = function(x) { + if (x) + return a; + return a(h(function() { return t(); })); + }; + arr.push(r); + return r; +} + +g(80, f); +g(80, f); +g(80, f); +for (var i = 0; i < arr.length; i++) + assertEq(arr[i](1), f); diff --git a/js/src/jit-test/tests/basic/bug584499-1.js b/js/src/jit-test/tests/basic/bug584499-1.js new file mode 100644 index 0000000000..bc98953799 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug584499-1.js @@ -0,0 +1,6 @@ +// |jit-test| error: TypeError +var s = "12345"; +for(var i=0; i<7; i++) { + print(s[i].length); +} + diff --git a/js/src/jit-test/tests/basic/bug584499-2.js b/js/src/jit-test/tests/basic/bug584499-2.js new file mode 100644 index 0000000000..bb31a731e3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug584499-2.js @@ -0,0 +1,12 @@ +function f(x) { + var s = "a"; + var last = ""; + for (var i = 0; i < 10; i++) { + last = s[x]; + } + return last; +} + +f(0); + +assertEq(f(1), undefined); diff --git a/js/src/jit-test/tests/basic/bug584565.js b/js/src/jit-test/tests/basic/bug584565.js new file mode 100644 index 0000000000..ad7d4b4757 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug584565.js @@ -0,0 +1,10 @@ +// Any copyright is dedicated to the Public Domain. +// http://creativecommons.org/licenses/publicdomain/ +// Contributor: Luke Wagner + +var x, f; +for (var i = 0; i < 100; i++) { + f = function() {}; + f.foo; + x = f.length; +} diff --git a/js/src/jit-test/tests/basic/bug584603.js b/js/src/jit-test/tests/basic/bug584603.js new file mode 100644 index 0000000000..4e7607939f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug584603.js @@ -0,0 +1,13 @@ +var f = 99; + +function g(a) { + if (a) { + var e = 55; + function f() { + print("f"); + } + assertEq(f == 99, false); + } +} + +g(true); diff --git a/js/src/jit-test/tests/basic/bug585542.js b/js/src/jit-test/tests/basic/bug585542.js new file mode 100644 index 0000000000..9ea3de6be6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug585542.js @@ -0,0 +1,11 @@ +function f() { return 2; } +function g(o) { + with (o) { + var f = function() { return 4; } + } + return f(); +} + +assertEq(g({}), 4); + + diff --git a/js/src/jit-test/tests/basic/bug586499-regexp.js b/js/src/jit-test/tests/basic/bug586499-regexp.js new file mode 100644 index 0000000000..3f7f451cff --- /dev/null +++ b/js/src/jit-test/tests/basic/bug586499-regexp.js @@ -0,0 +1,2 @@ +// Don't crash. +var re = /^(?:\s*.){0,16}/; diff --git a/js/src/jit-test/tests/basic/bug586917.js b/js/src/jit-test/tests/basic/bug586917.js new file mode 100644 index 0000000000..7b8b5072a3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug586917.js @@ -0,0 +1,1834 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */ + +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +/* The tracer should properly parse JSOP_TABLESWITCHX instructions. */ +var x = 1; +for (i = 0; i < 8; i++) { + switch (x) { + case 2: + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + try {} catch (e) {} + } +} diff --git a/js/src/jit-test/tests/basic/bug587346-regexp-01.js b/js/src/jit-test/tests/basic/bug587346-regexp-01.js new file mode 100644 index 0000000000..cf341a4f63 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug587346-regexp-01.js @@ -0,0 +1 @@ +var re = /(?:){1,60}/ diff --git a/js/src/jit-test/tests/basic/bug587366.js b/js/src/jit-test/tests/basic/bug587366.js new file mode 100644 index 0000000000..9934d987a2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug587366.js @@ -0,0 +1,3 @@ +// Test flat string replacement, per ECMAScriptv5 15.5.4.11. +assertEq("1+2".replace("1+2", "$&+3"), "1+2+3"); +assertEq(")".replace(")","*$&*"), "*)*"); diff --git a/js/src/jit-test/tests/basic/bug589318.js b/js/src/jit-test/tests/basic/bug589318.js new file mode 100644 index 0000000000..98902b0b96 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug589318.js @@ -0,0 +1,10 @@ +// Use arguments in an eval. +code = " \ +function f(a) { var x = a; } \ +for (var i = 0; i < 10; i++) { f(5); } \ +"; + +eval(code); + + +// Test it doesn't assert. diff --git a/js/src/jit-test/tests/basic/bug590006.js b/js/src/jit-test/tests/basic/bug590006.js new file mode 100644 index 0000000000..233aeb2928 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug590006.js @@ -0,0 +1,12 @@ +function f() { + var ret; + for (var i = 0; i < 10; ++i) { + { + let local = 3; + ret = function() { print(local++); } + } + } + return ret; +} +f()(); // test.js:5: ReferenceError: local is not defined + diff --git a/js/src/jit-test/tests/basic/bug590036.js b/js/src/jit-test/tests/basic/bug590036.js new file mode 100644 index 0000000000..25add41ff1 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug590036.js @@ -0,0 +1,13 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +load(libdir + 'eqArrayHelper.js'); + +assertEqArray(eval('[]'), []); +assertEqArray(eval('[,]'), [,]); +assertEqArray(eval('[,,]'), [,,]); +assertEqArray(eval('[1, 1, ]'), [1,1, ]); +assertEqArray(eval('[1, 1, true]'), [1, 1, true]); +assertEqArray(eval('[1, false, true]'), [1, false, true]); diff --git a/js/src/jit-test/tests/basic/bug592927.js b/js/src/jit-test/tests/basic/bug592927.js new file mode 100644 index 0000000000..69f0bd237e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug592927.js @@ -0,0 +1,27 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +function f(x, y) { + x(f); + assertEq(y, "hello"); +} + +function g(x) { + assertEq(x.arguments[1], "hello"); + x.arguments[1] = "bye"; + assertEq(x.arguments[1], "hello"); +} + +function f2(x, y) { + arguments; + x(f2); + assertEq(y, "hello"); +} + +function g2(x) { + assertEq(x.arguments[1], "hello"); + x.arguments[1] = "bye"; + assertEq(x.arguments[1], "hello"); +} + +f(g, "hello"); +f2(g2, "hello"); + diff --git a/js/src/jit-test/tests/basic/bug593611.js b/js/src/jit-test/tests/basic/bug593611.js new file mode 100644 index 0000000000..6106c0f5ce --- /dev/null +++ b/js/src/jit-test/tests/basic/bug593611.js @@ -0,0 +1,11 @@ +var global = this; +(function() { + global.__defineGetter__("x", /x/.constructor) +})() +for (var a = 0; a < 4; ++a) { + if (a % 4 == 1) { + gc() + } else { + print(x); + } +} diff --git a/js/src/jit-test/tests/basic/bug593663-regexp.js b/js/src/jit-test/tests/basic/bug593663-regexp.js new file mode 100644 index 0000000000..012a7fb4cd --- /dev/null +++ b/js/src/jit-test/tests/basic/bug593663-regexp.js @@ -0,0 +1,111 @@ +/* + * Ensure that flat matches with metachars in them don't have their metachars + * interpreted as special. + */ + +function isPatternSyntaxError(pattern) { + try { + new RegExp(pattern); + return false; + } catch (e) { + if (!(e instanceof SyntaxError)) + throw e; + return true; + } +} + +// Bug example. +assertEq("1+2".replace("1+2", "$&+3"), "1+2+3"); +assertEq("1112".replace("1+2", ""), "1112"); + +// ^ +assertEq("leading text^my hat".replace("^my hat", ""), "leading text"); +assertEq("my hat".replace("^my hat", ""), "my hat"); + +// $ +assertEq("leading text$my money".replace("leading text$", ""), "my money"); +assertEq("leading text".replace("leading text$", ""), "leading text"); + +// \ +var BSL = '\\'; +assertEq(("dir C:" + BSL + "Windoze").replace("C:" + BSL, ""), + "dir Windoze"); +assertEq(isPatternSyntaxError("C:" + BSL), true); + +// . +assertEq("This is a sentence. It has words.".replace(".", "!"), + "This is a sentence! It has words."); +assertEq("This is an unterminated sentence".replace(".", ""), + "This is an unterminated sentence"); + +// * +assertEq("Video killed the radio *".replace(" *", ""), "Video killed the radio"); +assertEq("aaa".replace("a*", ""), "aaa"); + +// + +assertEq("On the + side".replace(" +", ""), "On the side"); +assertEq("1111111111111".replace("1+", ""), "1111111111111"); + +// \+ +assertEq(("Inverse cone head: " + BSL + "++/").replace(BSL + "+", ""), + "Inverse cone head: +/"); +assertEq((BSL + BSL + BSL).replace(BSL + "+", ""), + BSL + BSL + BSL); + +// \\+ +assertEq((BSL + BSL + "+").replace(BSL + BSL + "+", ""), ""); +assertEq((BSL + BSL + BSL).replace(BSL + BSL + "+", ""), (BSL + BSL + BSL)); + +// \\\ +assertEq((BSL + BSL + BSL + BSL).replace(BSL + BSL + BSL, ""), BSL); +assertEq(isPatternSyntaxError(BSL + BSL + BSL), true); + +// \\\\ +assertEq((BSL + BSL + BSL + BSL).replace(BSL + BSL + BSL + BSL, "", "i"), ""); +assertEq((BSL + BSL).replace(BSL + BSL + BSL + BSL, ""), BSL + BSL); + + +// ? +assertEq("Pressing question?".replace("?", "."), "Pressing question."); +assertEq("a".replace("a?", ""), "a"); + +// ( +assertEq("(a".replace("(", ""), "a"); + +// ) +assertEq("a)".replace(")", ""), "a"); + +// ( and ) +assertEq("(foo)".replace("(foo)", ""), ""); +assertEq("a".replace("(a)", ""), "a"); + +// [ +assertEq("[a".replace("[", ""), "a"); + +// ] +assertEq("a]".replace("]", ""), "a"); + +// [ and ] +assertEq("a".replace("[a-z]", ""), "a"); +assertEq("You would write your regexp as [a-z]".replace("[a-z]", ""), + "You would write your regexp as "); + +// { +assertEq("Numbers may be specified in the interval {1,100}".replace("{1,", ""), + "Numbers may be specified in the interval 100}"); + +// } +assertEq("Numbers may be specified in the interval {1,100}".replace(",100}", ""), + "Numbers may be specified in the interval {1"); + +// { and } +assertEq("Numbers may be specified in the interval {1,100}".replace(" {1,100}", ""), + "Numbers may be specified in the interval"); +assertEq("aaa".replace("a{1,10}", ""), "aaa"); + +// | +assertEq("Mr. Gorbachev|Tear down this wall!".replace("|Tear down this wall!", ""), + "Mr. Gorbachev"); +assertEq("foobar".replace("foo|bar", ""), "foobar"); + +print("PASS"); diff --git a/js/src/jit-test/tests/basic/bug594108.js b/js/src/jit-test/tests/basic/bug594108.js new file mode 100644 index 0000000000..3a250db9f3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug594108.js @@ -0,0 +1,8 @@ +var res; +for (var i = 0; i < 10; i++) { + var re = /a(b)c/; + var b = (re.exec(""), v = re.exec("abc")) !== null; + assertEq(v[0], "abc"); + assertEq(v[1], "b"); +} + diff --git a/js/src/jit-test/tests/basic/bug594205.js b/js/src/jit-test/tests/basic/bug594205.js new file mode 100644 index 0000000000..beaeaa1644 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug594205.js @@ -0,0 +1,16 @@ +var re = /a(b)c/; + +for (var i = 0; i < 10; i++) { + // These two are of a form where we can convert exec() to test(). + if (!re.exec("abc")) print("huh?"); + re.exec("abc"); +} + +RegExp.prototype.test = 1; + +for (var i = 0; i < 10; i++) { + // These two are the same form, but we've replaced test(), so we must + // not convert. + if (!re.exec("abc")) print("huh?"); // don't crash/assert + re.exec("abc"); // don't crash/assert +} diff --git a/js/src/jit-test/tests/basic/bug595963-1.js b/js/src/jit-test/tests/basic/bug595963-1.js new file mode 100644 index 0000000000..2cccfac400 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug595963-1.js @@ -0,0 +1,19 @@ +function remove(k, L) { + for (var i in k) { + if (i == L) + k.splice(L, 1); + } +} +function f(k) { + var L = 0; + for (var i in k) { + if (L == 1) + remove(k, L); + L++; + assertEq(k[i], 3); + } + assertEq(L, 6); +} + +var a = [3, 3, 3, 3, 3, 3, 3]; +f(a); diff --git a/js/src/jit-test/tests/basic/bug595963-2.js b/js/src/jit-test/tests/basic/bug595963-2.js new file mode 100644 index 0000000000..651a38064e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug595963-2.js @@ -0,0 +1,19 @@ +function remove(k, L) { + for (var i in k) { + if (i == L) + k.splice(L, 3); + } +} +function f(k) { + var L = 0; + for (var i in k) { + if (L == 1) + remove(k, L); + L++; + assertEq(k[i], 3); + } + assertEq(L, 4); +} + +var a = [3, 3, 3, 3, 3, 3, 3]; +f(a); diff --git a/js/src/jit-test/tests/basic/bug596351-1.js b/js/src/jit-test/tests/basic/bug596351-1.js new file mode 100644 index 0000000000..f4d764a6d0 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug596351-1.js @@ -0,0 +1,5 @@ +// |jit-test| error: TypeError +"use strict" +var g = newGlobal(); +g.eval("foo = {}; Object.defineProperty(foo, 'a', {value: 2, writable: false});"); +g.foo.a = 3; diff --git a/js/src/jit-test/tests/basic/bug596351-2.js b/js/src/jit-test/tests/basic/bug596351-2.js new file mode 100644 index 0000000000..2a014ad15a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug596351-2.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError + +"use strict" +var g = newGlobal(); + +g.eval("bar = {}; Object.freeze(bar);"); +g.bar.a = 4; diff --git a/js/src/jit-test/tests/basic/bug599854.js b/js/src/jit-test/tests/basic/bug599854.js new file mode 100644 index 0000000000..19e3f7c722 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug599854.js @@ -0,0 +1,4 @@ +load(libdir + 'eqArrayHelper.js'); +assertEqArray(/(?:(?:(")(c)")?)*/.exec('"c"'), [ '"c"', '"', "c" ]); +assertEqArray(/(?:(?:a*?(")(c)")?)*/.exec('"c"'), [ '"c"', '"', "c" ]); +assertEqArray(/]*type=['"]?(?:dojo\/|text\/html\b))(?:[^>]*?(?:src=(['"]?)([^>]*?)\1[^>]*)?)*>([\s\S]*?)<\/script>/gi.exec(''), ['', '"', "...", ""]); diff --git a/js/src/jit-test/tests/basic/bug601046.js b/js/src/jit-test/tests/basic/bug601046.js new file mode 100644 index 0000000000..45f3bf82e5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug601046.js @@ -0,0 +1,8 @@ +// don't assert +var f = function(){}; +for (var p in f); +Object.defineProperty(f, "j", ({configurable: true, value: "a"})); +Object.defineProperty(f, "k", ({configurable: true, value: "b"})); +Object.defineProperty(f, "j", ({configurable: true, get: function() {}})); +delete f.k; +Object.defineProperty(f, "j", ({configurable: false})); diff --git a/js/src/jit-test/tests/basic/bug601398.js b/js/src/jit-test/tests/basic/bug601398.js new file mode 100644 index 0000000000..f3eaddccbf --- /dev/null +++ b/js/src/jit-test/tests/basic/bug601398.js @@ -0,0 +1,8 @@ +(function () { + try {} finally { + { + let z; + return; + } + } +})() diff --git a/js/src/jit-test/tests/basic/bug601401.js b/js/src/jit-test/tests/basic/bug601401.js new file mode 100644 index 0000000000..5c4a4f36c4 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug601401.js @@ -0,0 +1,6 @@ +{ + let e; + with({}) try {} catch (x) {} finally { + { let y; } + } +} diff --git a/js/src/jit-test/tests/basic/bug601428.js b/js/src/jit-test/tests/basic/bug601428.js new file mode 100644 index 0000000000..b9419f822c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug601428.js @@ -0,0 +1,2 @@ +// |jit-test| error: SyntaxError; +let({}=[c for(x in[])]){let diff --git a/js/src/jit-test/tests/basic/bug605754-regexp.js b/js/src/jit-test/tests/basic/bug605754-regexp.js new file mode 100644 index 0000000000..9acd314377 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug605754-regexp.js @@ -0,0 +1,2 @@ +var result = "foobarbaz".replace(/foo(bar)?bar/, "$1"); +assertEq(result, "baz"); diff --git a/js/src/jit-test/tests/basic/bug606083.js b/js/src/jit-test/tests/basic/bug606083.js new file mode 100644 index 0000000000..d8049b94fa --- /dev/null +++ b/js/src/jit-test/tests/basic/bug606083.js @@ -0,0 +1,32 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +function f(L) { + do { + L: for (var i = 0; i < L; i++) { + break L; + } + } while (0); +} +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); +f(1); diff --git a/js/src/jit-test/tests/basic/bug606882-1.js b/js/src/jit-test/tests/basic/bug606882-1.js new file mode 100644 index 0000000000..3d8bdf4a2a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug606882-1.js @@ -0,0 +1,3 @@ +// don't crash + +"ABC".match("A+(?:X?(?:|(?:))(?:(?:B)?C+w?w?)?)*"); diff --git a/js/src/jit-test/tests/basic/bug606882-2.js b/js/src/jit-test/tests/basic/bug606882-2.js new file mode 100644 index 0000000000..b7542170f5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug606882-2.js @@ -0,0 +1,16 @@ +// don't crash +var book = 'Ps'; +var pattern = "(?:" ++ "(?:" ++ "(?:" ++ "(?:-|)" ++ "\\s?" ++ ")" ++ "|" ++ ")" ++ " ?" ++ "\\d+" ++ "\\w?" ++ ")*"; +var re = new RegExp(pattern); +'8:5-8'.match(re); diff --git a/js/src/jit-test/tests/basic/bug608313.js b/js/src/jit-test/tests/basic/bug608313.js new file mode 100644 index 0000000000..1bd20df4a8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug608313.js @@ -0,0 +1,11 @@ + +function testInt8Array(L) { + var f = new Int8Array(8); + f[0] = 0; // Don't assert. +} + +for (var i = 0; i < 10; i++) { + testInt8Array(0); +} + + diff --git a/js/src/jit-test/tests/basic/bug608980.js b/js/src/jit-test/tests/basic/bug608980.js new file mode 100644 index 0000000000..53ad2cbadc --- /dev/null +++ b/js/src/jit-test/tests/basic/bug608980.js @@ -0,0 +1,11 @@ + +/* Don't trip bogus assert. */ + +function foo() +{ + var x; + while (x = 0) { + x = 1; + } +} +foo(); diff --git a/js/src/jit-test/tests/basic/bug609502-1.js b/js/src/jit-test/tests/basic/bug609502-1.js new file mode 100644 index 0000000000..a62316d604 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug609502-1.js @@ -0,0 +1,9 @@ +for(var i = 0; i < 9; i++) { + x = ''.charCodeAt(NaN); +} + +for(var i = 0; i < 9; i++) { + x = ''.charAt(NaN); +} + +// Don't assert diff --git a/js/src/jit-test/tests/basic/bug609502-2.js b/js/src/jit-test/tests/basic/bug609502-2.js new file mode 100644 index 0000000000..4c1469dcea --- /dev/null +++ b/js/src/jit-test/tests/basic/bug609502-2.js @@ -0,0 +1,5 @@ +for (var i = 0; i < 9; i++) { + Math.abs(-2147483648) +} + +// Don't assert diff --git a/js/src/jit-test/tests/basic/bug610592.js b/js/src/jit-test/tests/basic/bug610592.js new file mode 100644 index 0000000000..da825d2843 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug610592.js @@ -0,0 +1,29 @@ + +/* Don't confuse JIT code by making slow arrays that use inline slots inconsistently. */ + +function foo(a) +{ + assertEq(a.x, 5); +} + +function bar() +{ + for (var i = 0; i < 50; i++) { + var a = []; + a[i] = 0; + delete a[i]; + a.x = 5; + foo(a); + } + + var b = [1,,2,,3,,4,,5]; + assertEq(b.toString(), "1,,2,,3,,4,,5"); + b.x = 0; + assertEq(b.toString(), "1,,2,,3,,4,,5"); + delete b.x; + delete b[8]; + delete b[6]; + delete b[4]; + assertEq(b.toString(), "1,,2,,,,,,"); +} +bar(); diff --git a/js/src/jit-test/tests/basic/bug613122.js b/js/src/jit-test/tests/basic/bug613122.js new file mode 100644 index 0000000000..64c6b06883 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug613122.js @@ -0,0 +1,4 @@ +var a = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; +a.push(1); +a.splice(0, a.length); +a.d = ""; diff --git a/js/src/jit-test/tests/basic/bug613151.js b/js/src/jit-test/tests/basic/bug613151.js new file mode 100644 index 0000000000..6a3a24ae3a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug613151.js @@ -0,0 +1,18 @@ +// Iterating over a property with an Array id. +function n() {} +function g() {} +eval("\ + function a() {}\ + function b() {\ + for (w in this) {}\ + Object.defineProperty(\ + this, \ + new Array, \ + ({enumerable: true})\ + )\ + }\ + for (z in [0, 0, 0]) b()\ +") + +// Test it doesn't assert. + diff --git a/js/src/jit-test/tests/basic/bug613399.js b/js/src/jit-test/tests/basic/bug613399.js new file mode 100644 index 0000000000..b2431c9f91 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug613399.js @@ -0,0 +1,3 @@ +// don't assert +/((?=()+))?/.exec(""); + diff --git a/js/src/jit-test/tests/basic/bug614688.js b/js/src/jit-test/tests/basic/bug614688.js new file mode 100644 index 0000000000..c075cadab8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug614688.js @@ -0,0 +1,7 @@ +function Foo() { + u = 0; +} + +var x = new Foo(); +assertEq(Object.getPrototypeOf(x) === Foo.prototype, true); +assertEq(Object.getPrototypeOf(x) === Object.prototype, false); diff --git a/js/src/jit-test/tests/basic/bug614915.js b/js/src/jit-test/tests/basic/bug614915.js new file mode 100644 index 0000000000..b4ab9491ae --- /dev/null +++ b/js/src/jit-test/tests/basic/bug614915.js @@ -0,0 +1,2 @@ +var s = [undefined, undefined].sort(); +assertEq(s.length, 2); diff --git a/js/src/jit-test/tests/basic/bug616009.js b/js/src/jit-test/tests/basic/bug616009.js new file mode 100644 index 0000000000..ecfbc65062 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug616009.js @@ -0,0 +1,35 @@ +function run() { + var obj = { + toJSON: function() { + return { + key: { + toJSON: function() { + for (i=0; i!=1<<10; ++i) + new Object(); + var big = unescape("%udddd"); + while (big.length != 0x100000) + big += big; + for (i=0; i!=32; ++i) + new String(big+i); + return "whatever"; + } + }, + __iterator__: function() { + return { + next: function() { + return "key"; + } + } + } + } + } + }; + + var repl = function(id, val) { + this[0]++; + return val; + }; + + JSON.stringify(obj, repl); +} +run(); diff --git a/js/src/jit-test/tests/basic/bug616170.js b/js/src/jit-test/tests/basic/bug616170.js new file mode 100644 index 0000000000..efcd468ba5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug616170.js @@ -0,0 +1,17 @@ +/* Don't trip bogus assert. */ + +function e() +{ + try + { + var t = undefined; + } + catch (e) + { + var t = null; + } + while (t && (t.tagName.toUpperCase() != "BODY")) + continue; +} +for (var i = 0; i < 20; i++) + e(); diff --git a/js/src/jit-test/tests/basic/bug616762.js b/js/src/jit-test/tests/basic/bug616762.js new file mode 100644 index 0000000000..02f5c953cf --- /dev/null +++ b/js/src/jit-test/tests/basic/bug616762.js @@ -0,0 +1,26 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +document = { + ready: function (x) { + this.exec = x; + } +}; + +var $ = function (x) { + return document; +}; + +(function ($) { + eval("(function(){\n" + + " var Private={};\n" + + " $(document).ready(function(){\n" + + " init()\n" + + " });\n" + + " function init(){\n" + + " $(Private)\n" + + " };\n" + + "})();"); +})($); +document.exec(); + +// Don't crash or assert. + diff --git a/js/src/jit-test/tests/basic/bug617139.js b/js/src/jit-test/tests/basic/bug617139.js new file mode 100644 index 0000000000..d53456e657 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug617139.js @@ -0,0 +1,9 @@ +// |jit-test| error: InternalError +// don't assert + +gczeal(2) +function x() { + [null].some(x) +} +x(); + diff --git a/js/src/jit-test/tests/basic/bug617171.js b/js/src/jit-test/tests/basic/bug617171.js new file mode 100644 index 0000000000..c4305f957d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug617171.js @@ -0,0 +1,4 @@ +var a = 6; +Object.defineProperty(this, "a", {writable: false}); +a = 7; +assertEq(a, 6); diff --git a/js/src/jit-test/tests/basic/bug617745.js b/js/src/jit-test/tests/basic/bug617745.js new file mode 100644 index 0000000000..f7f60e20eb --- /dev/null +++ b/js/src/jit-test/tests/basic/bug617745.js @@ -0,0 +1,4 @@ + +var array1 = ['0']; +var array2 = (new Array(1)).splice(0,0, array1); +assertEq("" + array2, ""); diff --git a/js/src/jit-test/tests/basic/bug618350.js b/js/src/jit-test/tests/basic/bug618350.js new file mode 100644 index 0000000000..61e72d0a0e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug618350.js @@ -0,0 +1,24 @@ + +var global = 0; + +Object.defineProperty(Object.prototype, 0, {set: function() { global++; }}); + +for (var x = 0; x < 20; ++x) + [1,2]; +assertEq(global, 0); + +Object.defineProperty(Object.prototype, 1, {set: function() { global++; }}); + +for (var x = 0; x < 20; ++x) + [1,2]; +assertEq(global, 0); + +Object.defineProperty(Object.prototype, "b", {set: function() { global++; }}); + +for (var x = 0; x < 20; ++x) { + var s = { a:0, b:1, 0: 2, 1: 3 }; +} +assertEq(global, 0); + +assertEq([42][0], 42); +assertEq([42].length, 1); diff --git a/js/src/jit-test/tests/basic/bug618577.js b/js/src/jit-test/tests/basic/bug618577.js new file mode 100644 index 0000000000..a41f820cb4 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug618577.js @@ -0,0 +1,5 @@ +var x = new Uint32Array(); +for (var i = 0; i < 100; i++) + x[77] = x[77]; + +// Don't assert. diff --git a/js/src/jit-test/tests/basic/bug618853.js b/js/src/jit-test/tests/basic/bug618853.js new file mode 100644 index 0000000000..9c80b7fee2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug618853.js @@ -0,0 +1,12 @@ + +try { new isNaN; } catch (e) {} +new Array; +new Boolean; +new Date; +new Number; +new Object; +new String; +try { new [].push(4); } catch (e) {} +try { new [1,2,3].pop(); } catch (e) {} +try { new "a,b,c".split(","); } catch (e) {} +try { new Array.concat(3); } catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug619004.js b/js/src/jit-test/tests/basic/bug619004.js new file mode 100644 index 0000000000..90d3bca993 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug619004.js @@ -0,0 +1,3 @@ +// don't crash +gczeal(2); +evalcx('lazy'); diff --git a/js/src/jit-test/tests/basic/bug619338.js b/js/src/jit-test/tests/basic/bug619338.js new file mode 100644 index 0000000000..2548c0c710 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug619338.js @@ -0,0 +1 @@ +try { new Function.prototype } catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug620532.js b/js/src/jit-test/tests/basic/bug620532.js new file mode 100644 index 0000000000..4a2f6f664b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug620532.js @@ -0,0 +1,15 @@ +for (var i = 0; i < 20; i++) { + m = Math.min(0xffffffff, 0); +} +assertEq(m == 0, true); + +var buffer = new ArrayBuffer(4); +var int32View = new Int32Array(buffer); +var uint32View = new Uint32Array(buffer); +int32View[0] = -1; +var m; +for (var i = 0; i < 20; i++) { + m = Math.min(uint32View[0], 0); // uint32View[0] == 0xffffffff +} +assertEq(m == 0, true); + diff --git a/js/src/jit-test/tests/basic/bug620838.js b/js/src/jit-test/tests/basic/bug620838.js new file mode 100644 index 0000000000..c82933ae80 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug620838.js @@ -0,0 +1,22 @@ +function g() { + return "global"; +} + +function q(fun) { + return fun(); +} + +function f(x) { + if (x) { + function g() { + return "local"; + } + var ans = q(function() { + return g(); + }); + } + g = null; + return ans; +} + +assertEq(f(true), "local"); diff --git a/js/src/jit-test/tests/basic/bug621022-1.js b/js/src/jit-test/tests/basic/bug621022-1.js new file mode 100644 index 0000000000..aab5bf90f7 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug621022-1.js @@ -0,0 +1,14 @@ +function f(x) { + delete arguments[0]; + undefined != arguments[0]; + undefined == arguments[0]; + undefined != arguments[0]; + undefined === arguments[0]; +} + +for(var i=0; i<20; i++) { + f(1); +} + +// Don't assert. + diff --git a/js/src/jit-test/tests/basic/bug621022-2.js b/js/src/jit-test/tests/basic/bug621022-2.js new file mode 100644 index 0000000000..0f3549c026 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug621022-2.js @@ -0,0 +1,13 @@ +function f(j) { + var a = [[1],[1],[1],[1],[1],[1],[1],[1],[1],arguments]; + var b; + for (var i = 0; i < a.length; i++) { + delete a[i][0]; + b = arguments[0]; + } + assertEq(b === undefined, true); +} + +f(1); + + diff --git a/js/src/jit-test/tests/basic/bug621487.js b/js/src/jit-test/tests/basic/bug621487.js new file mode 100644 index 0000000000..ebe92e3d53 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug621487.js @@ -0,0 +1,4 @@ + +(function() { while (0) { var a, a = b; } })(); + +(function(b) { do { var a, a = b; } while (0); assertEq(a, 10); })(10); diff --git a/js/src/jit-test/tests/basic/bug623859.js b/js/src/jit-test/tests/basic/bug623859.js new file mode 100644 index 0000000000..e712f40103 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug623859.js @@ -0,0 +1,10 @@ +// |jit-test| allow-oom; allow-unhandlable-oom +var size = 1000000; +var a = []; +for (var i = 0; i < size; ++i) { + a[i] = null; +} +gcparam("maxBytes", gcparam("gcBytes") + 4*1024); +for (var i = 0; i < size; ++i) { + a[i] = []; +} diff --git a/js/src/jit-test/tests/basic/bug623863.js b/js/src/jit-test/tests/basic/bug623863.js new file mode 100644 index 0000000000..d9ba4f79ee --- /dev/null +++ b/js/src/jit-test/tests/basic/bug623863.js @@ -0,0 +1,5 @@ +// Contributor: Christian Holler +if (typeof gczeal === 'function') gczeal(2); +Function.prototype.prototype = function() { return 42; }; +try { foo(Function); } catch (e) { } +Function.prototype.prototype = function() { return 42; }; diff --git a/js/src/jit-test/tests/basic/bug624041-1.js b/js/src/jit-test/tests/basic/bug624041-1.js new file mode 100644 index 0000000000..4eef9e9a99 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug624041-1.js @@ -0,0 +1,8 @@ +var count = 0; + +var a = [0, 1]; +for (var i in a) { + assertEq(++count <= 1, true); + a.shift(); +} + diff --git a/js/src/jit-test/tests/basic/bug624041-2.js b/js/src/jit-test/tests/basic/bug624041-2.js new file mode 100644 index 0000000000..6eb1b78f96 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug624041-2.js @@ -0,0 +1,11 @@ +var s = ''; + +var a = [, 0, 1]; +for (var i in a) { + a.reverse(); + s += i + ','; +} + +// Index of the element with value '0'. +assertEq(s, '1,'); + diff --git a/js/src/jit-test/tests/basic/bug625141-1.js b/js/src/jit-test/tests/basic/bug625141-1.js new file mode 100644 index 0000000000..9f79cf7b25 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug625141-1.js @@ -0,0 +1,13 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +function f() { + var arr = new Int32Array(10); + x = function () { return arr.length; } + for (var i = 0; i < arr.length; i++) { + arr[i] = i; + } + assertEq(arr[5], 5); +} +f(); diff --git a/js/src/jit-test/tests/basic/bug625141-2.js b/js/src/jit-test/tests/basic/bug625141-2.js new file mode 100644 index 0000000000..d97cdf4dfb --- /dev/null +++ b/js/src/jit-test/tests/basic/bug625141-2.js @@ -0,0 +1,13 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +function f() { + var arr = new Int8Array(10); + x = function () { return arr.length; } + for (var i = 0; i < arr.length; i++) { + arr[i] = i; + } + assertEq(arr[5], 5); +} +f(); diff --git a/js/src/jit-test/tests/basic/bug625399.js b/js/src/jit-test/tests/basic/bug625399.js new file mode 100644 index 0000000000..01b616df40 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug625399.js @@ -0,0 +1,7 @@ +function a(bb) { + "use strict"; + return; + this.d = function() { bb; }; +} +for (var i = 0; i <= 9; i++) + a(); diff --git a/js/src/jit-test/tests/basic/bug626398.js b/js/src/jit-test/tests/basic/bug626398.js new file mode 100644 index 0000000000..f9571e9333 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug626398.js @@ -0,0 +1,30 @@ + +function g(n) { + var s; + switch (n) { + case 0: + s = "c"+n; + break; + + default: + s = "d"+n; + break; + } + return s; +} + +// Do it twice with different initial values for 'i' to allow for 8 +// being even or odd. + +var s = ""; +for (let i = 0; i != 30; i+=2) { + s += g(i%4/2); +} +assertEq(s, "c0d1c0d1c0d1c0d1c0d1c0d1c0d1c0"); + +var s = ""; +for (let i = 2; i != 30; i+=2) { + s += g(i%4/2); +} +assertEq(s, "d1c0d1c0d1c0d1c0d1c0d1c0d1c0"); + diff --git a/js/src/jit-test/tests/basic/bug627609.js b/js/src/jit-test/tests/basic/bug627609.js new file mode 100644 index 0000000000..c36a995567 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug627609.js @@ -0,0 +1,2 @@ +load(libdir + 'eqArrayHelper.js'); +assertEqArray(/((a|)+b)+/.exec('bb'), [ "bb", "b", "" ]); diff --git a/js/src/jit-test/tests/basic/bug629858.js b/js/src/jit-test/tests/basic/bug629858.js new file mode 100644 index 0000000000..a931e4faf6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug629858.js @@ -0,0 +1,9 @@ +// |jit-test| error: strict +options("strict"); +options("warn"); // Exit with error code on lint failures. +eval("\n\ +function f(a) {\n\ + if (a > 3)\n\ + return 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';\n\ +}"); + diff --git a/js/src/jit-test/tests/basic/bug630865-5.js b/js/src/jit-test/tests/basic/bug630865-5.js new file mode 100644 index 0000000000..67fdb7e5b0 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug630865-5.js @@ -0,0 +1,13 @@ +function C(a, b) { + this.a = a; + this.b = b; +} +var f = C.bind(null, 2); +Object.defineProperty(f, "prototype", {get: function () { throw "FAIL"; }}); +var x; +for (var i = 0; i < 10; i++) + x = new f(i); +assertEq(toString.call(x), "[object Object]"); +assertEq(Object.getPrototypeOf(x), C.prototype); +assertEq(x.a, 2); +assertEq(x.b, 9); diff --git a/js/src/jit-test/tests/basic/bug630865-6.js b/js/src/jit-test/tests/basic/bug630865-6.js new file mode 100644 index 0000000000..0532101bd0 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug630865-6.js @@ -0,0 +1,11 @@ +var a = []; +var x, i; +for (i = 0; i < 18; i++) { + a[i] = function (b) { this.b = b; }; + if (i != 17) + x = a[i].prototype; +} +for (i = 0; i < 18; i++) + x = new a[i]; +assertEq(toString.call(x), "[object Object]"); +assertEq(Object.getPrototypeOf(x), a[17].prototype); diff --git a/js/src/jit-test/tests/basic/bug631082.js b/js/src/jit-test/tests/basic/bug631082.js new file mode 100644 index 0000000000..19d61b1a77 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug631082.js @@ -0,0 +1,13 @@ +var t; +(function () { + t = (function*() { + yield k(); + })(); + function h() { + } + function k() { + return function() { h(); }; + } +})(); +t.next(); + diff --git a/js/src/jit-test/tests/basic/bug631219.js b/js/src/jit-test/tests/basic/bug631219.js new file mode 100644 index 0000000000..5b33919bdd --- /dev/null +++ b/js/src/jit-test/tests/basic/bug631219.js @@ -0,0 +1,10 @@ +// don't assert or crash +function g(o) { + o.__proto__ = arguments; + o.length = 123; +} +function f() { + g(arguments); +} +f(); + diff --git a/js/src/jit-test/tests/basic/bug631788.js b/js/src/jit-test/tests/basic/bug631788.js new file mode 100644 index 0000000000..503d32f04e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug631788.js @@ -0,0 +1 @@ +for (var j = 1; j < 10; ++j) { switch(0/j) { } } // don't assert diff --git a/js/src/jit-test/tests/basic/bug632778-1.js b/js/src/jit-test/tests/basic/bug632778-1.js new file mode 100644 index 0000000000..b982727a61 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug632778-1.js @@ -0,0 +1,5 @@ +function f() { + "use strict"; +} +g = new Proxy(f, {}); +Object.defineProperty(g, "arguments", {set: function(){}}); diff --git a/js/src/jit-test/tests/basic/bug632778-2.js b/js/src/jit-test/tests/basic/bug632778-2.js new file mode 100644 index 0000000000..b135b560ff --- /dev/null +++ b/js/src/jit-test/tests/basic/bug632778-2.js @@ -0,0 +1,2 @@ +obj = new Proxy(Number.bind(), {}); +Object.defineProperty(obj, "caller", {set: function () {}}); diff --git a/js/src/jit-test/tests/basic/bug632901.js b/js/src/jit-test/tests/basic/bug632901.js new file mode 100644 index 0000000000..3039318c2b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug632901.js @@ -0,0 +1,9 @@ +// don't crash when tracing +function f(o) { + var prop = "arguments"; + f[prop] = f[prop]; +} +for(var i = 0; i < 50; i++) { + f(); +} + diff --git a/js/src/jit-test/tests/basic/bug632964-regexp.js b/js/src/jit-test/tests/basic/bug632964-regexp.js new file mode 100644 index 0000000000..75612dbc73 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug632964-regexp.js @@ -0,0 +1,14 @@ +var sText = "s"; + +for (var i = 0; i < 250000; ++i) + sText += 'a\n'; + +sText += 'e'; + +var start = new Date(); +var match = sText.match(/s(\s|.)*?e/gi); +//var match = sText.match(/s([\s\S]*?)e/gi); +//var match = sText.match(/s(?:[\s\S]*?)e/gi); +var end = new Date(); + +assertEq(match.length, 1); diff --git a/js/src/jit-test/tests/basic/bug633409-1.js b/js/src/jit-test/tests/basic/bug633409-1.js new file mode 100644 index 0000000000..20eaa6cda5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug633409-1.js @@ -0,0 +1,13 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +x = { a: 1, b: 2, c: 3, d: 4, e: 5, f: 6 }; + +for (i in x) + delete x.d; + +x = { a: 1, b: 2, c: 3, d: 4, e: 5, f: 6 }; +y = []; +for (i in x) + y.push(i) + +assertEq(y[3], "d"); + diff --git a/js/src/jit-test/tests/basic/bug633409-2.js b/js/src/jit-test/tests/basic/bug633409-2.js new file mode 100644 index 0000000000..d3c498d6d2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug633409-2.js @@ -0,0 +1,13 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +var o1 = {p1: 1}; +var o2 = {p1: 1, p2: 2}; + +for(var x in o1) { + for(var y in o2) { + delete o2.p2; + } +} + +/* Don't fail cx->enumerators == obj assert, see bug comment #31 */ + diff --git a/js/src/jit-test/tests/basic/bug633752.js b/js/src/jit-test/tests/basic/bug633752.js new file mode 100644 index 0000000000..522f642778 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug633752.js @@ -0,0 +1,11 @@ +function f(o) { + var p = "arguments"; + for(var i=0; i<10; i++) { + f[p]; + } +} +f({}); +f({}); +f({}); +f({}); + diff --git a/js/src/jit-test/tests/basic/bug633828.js b/js/src/jit-test/tests/basic/bug633828.js new file mode 100644 index 0000000000..6b71d095bd --- /dev/null +++ b/js/src/jit-test/tests/basic/bug633828.js @@ -0,0 +1,6 @@ +// |jit-test| error: SyntaxError; +(function() { + function a() {} + function a() {} +} +for diff --git a/js/src/jit-test/tests/basic/bug634593.js b/js/src/jit-test/tests/basic/bug634593.js new file mode 100644 index 0000000000..b4241a8a4c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug634593.js @@ -0,0 +1,4 @@ +this.__defineGetter__("x3", Function); +parseInt = x3; +parseInt.prototype = []; +for (var z = 0; z < 10; ++z) { new parseInt() } \ No newline at end of file diff --git a/js/src/jit-test/tests/basic/bug635417.js b/js/src/jit-test/tests/basic/bug635417.js new file mode 100644 index 0000000000..94dd10163c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug635417.js @@ -0,0 +1,2 @@ +assertEq(/^@(A*)x(B)*/.test("@xB"), true); + diff --git a/js/src/jit-test/tests/basic/bug638981.js b/js/src/jit-test/tests/basic/bug638981.js new file mode 100644 index 0000000000..944daa76ea --- /dev/null +++ b/js/src/jit-test/tests/basic/bug638981.js @@ -0,0 +1,4 @@ +/* Don't crash. */ + +delete Function; +Object.getOwnPropertyNames(this); diff --git a/js/src/jit-test/tests/basic/bug639126.js b/js/src/jit-test/tests/basic/bug639126.js new file mode 100644 index 0000000000..7283fe6ca7 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug639126.js @@ -0,0 +1,4 @@ +Array.__proto__ = Array.__proto__; +gc(); +Array["name" + ""]; +Array(); diff --git a/js/src/jit-test/tests/basic/bug639128.js b/js/src/jit-test/tests/basic/bug639128.js new file mode 100644 index 0000000000..fadd559aae --- /dev/null +++ b/js/src/jit-test/tests/basic/bug639128.js @@ -0,0 +1,10 @@ +function f(o) { + Object.seal(o); +} +gc(); +if(2 != 2) { + g = new f(g); +} +with({}) { + f({}); +} diff --git a/js/src/jit-test/tests/basic/bug639311.js b/js/src/jit-test/tests/basic/bug639311.js new file mode 100644 index 0000000000..277d0c3d10 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug639311.js @@ -0,0 +1,18 @@ +/* Avoid use-after-free while sweeping type objects. */ + +try { + Reflparse("") +} catch(e) {} +Reflect.parse("for(var a;a;j){if(a%2==0){c()}}") +try { + (function() { + for (a = 0;; j) { + gc() + } + })() +} catch(e) { + delete this.Math +} +gc() +Reflect.parse("{ let x; }") +gc() diff --git a/js/src/jit-test/tests/basic/bug639591.js b/js/src/jit-test/tests/basic/bug639591.js new file mode 100644 index 0000000000..435cc31fc1 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug639591.js @@ -0,0 +1,4 @@ +gczeal(2); +var x; +[eval("x")] ? eval("x") : 3; +eval("Object()"); diff --git a/js/src/jit-test/tests/basic/bug639759.js b/js/src/jit-test/tests/basic/bug639759.js new file mode 100644 index 0000000000..ede9713748 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug639759.js @@ -0,0 +1,9 @@ +gczeal(2); +function f() { + for(var i=0; i<10; i++) { + [1, [1, 2, 3]]; + eval(""); + } +} +eval("Array(f() ? 0 : 1)"); +eval("Array((eval(\"f()\")) ? true : eval(''))"); diff --git a/js/src/jit-test/tests/basic/bug639797.js b/js/src/jit-test/tests/basic/bug639797.js new file mode 100644 index 0000000000..f061fac46d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug639797.js @@ -0,0 +1 @@ +Function("with([]){const x=0}")() diff --git a/js/src/jit-test/tests/basic/bug639807.js b/js/src/jit-test/tests/basic/bug639807.js new file mode 100644 index 0000000000..42702b46bd --- /dev/null +++ b/js/src/jit-test/tests/basic/bug639807.js @@ -0,0 +1,4 @@ + +try { + eval("const[]=*,[x]=r") +} catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug640203.js b/js/src/jit-test/tests/basic/bug640203.js new file mode 100644 index 0000000000..aa066bfb27 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug640203.js @@ -0,0 +1,2 @@ +var x = [,].splice(0); +assertEq(x[0], undefined); diff --git a/js/src/jit-test/tests/basic/bug640993.js b/js/src/jit-test/tests/basic/bug640993.js new file mode 100644 index 0000000000..45ce0856a3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug640993.js @@ -0,0 +1,7 @@ +function f() { + return f; +} +f.__proto__ = null; +gc(); +f(); +new f(); diff --git a/js/src/jit-test/tests/basic/bug641229.js b/js/src/jit-test/tests/basic/bug641229.js new file mode 100644 index 0000000000..4ae5427b26 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug641229.js @@ -0,0 +1,2 @@ +this.__defineSetter__("x",Math.max) +Function("({x}=[])")() diff --git a/js/src/jit-test/tests/basic/bug641231.js b/js/src/jit-test/tests/basic/bug641231.js new file mode 100644 index 0000000000..0e778a0244 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug641231.js @@ -0,0 +1 @@ +try { Function("function a(){this(*)}new a")() } catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug641235.js b/js/src/jit-test/tests/basic/bug641235.js new file mode 100644 index 0000000000..8534b53c04 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug641235.js @@ -0,0 +1,21 @@ +try { +function g(code) { + code = code.replace(/\/\*DUPTRY\d+\*\//, function(k) { + var n = parseInt(k.substr(8), 10); + return aa("try{}catch(e){}", n); + }); + var f = new Function(code); + f() +} +function aa(s, n) { + if (n == 1) { + return s; + } + var s2 = s + s; + var r = n % 2; + var d = (n - r) / 2; + var m = aa(s2, d); + return r ? m + s : m; +} +g("switch(x){default:case l:/*DUPTRY5338*/case 0:x}"); +} catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug641491.js b/js/src/jit-test/tests/basic/bug641491.js new file mode 100644 index 0000000000..653e47a6ab --- /dev/null +++ b/js/src/jit-test/tests/basic/bug641491.js @@ -0,0 +1,19 @@ +function f1() { +} +function f2() { +} +function f3(o) { + f2 = Date.prototype; +} +var key = Object.getOwnPropertyNames(f1)[30]; +if(key) { + f3 = f1[key]; +} +gc(); +gc(); +try { +for(var i=0; i<10; i++) { + delete f2[1]; + f3(function() {}); +} +} catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug641525.js b/js/src/jit-test/tests/basic/bug641525.js new file mode 100644 index 0000000000..4c7c8b85ca --- /dev/null +++ b/js/src/jit-test/tests/basic/bug641525.js @@ -0,0 +1,34 @@ + +var o2 = new Proxy({}, {}); +function f1() {} +function f2() {} +function f4(o) { + var key = Object.getOwnPropertyNames(o)[18]; + o4 = o[key]; + o.prototype = {}; +} +f4(f1); +f4(f1); +f4(f2); +new f2(o2); + +// these will hold only if type inference is enabled. +//assertEq(shapeOf(f1) == shapeOf(f2), false); +//assertEq(shapeOf(f1) == shapeOf(f4), false); + +function factory() { + function foo() {} + foo.x = 0; + return foo; +} + +var fobjs = []; +for (var i = 0; i < 10; i++) { + var of = fobjs[i] = factory(); + if (i > 0) { + assertEq(fobjs[i - 1] === of, false); + assertEq(shapeOf(fobjs[i - 1]), shapeOf(of)); + } +} + +assertEq(shapeOf(fobjs[0]) == shapeOf(f1), false); diff --git a/js/src/jit-test/tests/basic/bug641563.js b/js/src/jit-test/tests/basic/bug641563.js new file mode 100644 index 0000000000..e3d60afefb --- /dev/null +++ b/js/src/jit-test/tests/basic/bug641563.js @@ -0,0 +1,3 @@ +// |jit-test| error: SyntaxError; +Function("(x)\nfor(var b,x in") + diff --git a/js/src/jit-test/tests/basic/bug641741.js b/js/src/jit-test/tests/basic/bug641741.js new file mode 100644 index 0000000000..760f7ec51f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug641741.js @@ -0,0 +1 @@ +try { eval("var[]=(++false[x])()=[],x") } catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug642154.js b/js/src/jit-test/tests/basic/bug642154.js new file mode 100644 index 0000000000..8518e2f878 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642154.js @@ -0,0 +1,16 @@ +assertEq(Math.pow(1, undefined), NaN); +assertEq(Math.pow(1, null), 1); +assertEq(Math.pow(1, true), 1); +assertEq(Math.pow(1, false), 1); +assertEq(Math.pow(1, 0), 1); +assertEq(Math.pow(1, -0), 1); +assertEq(Math.pow(1, NaN), NaN); +assertEq(Math.pow(1, {}), NaN); +assertEq(Math.pow(1, {valueOf: function() { return undefined; }}), NaN); + +x = 2.2; +assertEq(Math.pow(x - 1.2, undefined), NaN); + +var y; +assertEq(Math.pow(1, y), NaN); + diff --git a/js/src/jit-test/tests/basic/bug642161.js b/js/src/jit-test/tests/basic/bug642161.js new file mode 100644 index 0000000000..18679dd9ed --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642161.js @@ -0,0 +1 @@ +assertEq(JSON.stringify(0 | "prefix" || Boolean), undefined); diff --git a/js/src/jit-test/tests/basic/bug642164.js b/js/src/jit-test/tests/basic/bug642164.js new file mode 100644 index 0000000000..6b97e82ea7 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642164.js @@ -0,0 +1,14 @@ +function raisesException(exception) { + return function (code) { + eval(code); + }; +}; +function obj() { + var o = { assertEq: true, y: 1 }; + Object.defineProperty(o, 'x', { writable: false }); + return o; +} +function in_strict_with(expr) { + return "with(obj()) { (function () { 'use strict'; " + expr + " })(); }"; +} +try { assertEq(raisesException(TypeError)(in_strict_with('x++;')), true); } catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug642206.js b/js/src/jit-test/tests/basic/bug642206.js new file mode 100644 index 0000000000..775e4c6e17 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642206.js @@ -0,0 +1,30 @@ +Function.prototype.__proto__ = null; + +function testLenientAndStrict(code, lenient_pred, strict_pred) { + return (strict_pred("'use strict'; " + code) && + lenient_pred(code)); +} +function raisesException(exception) { + return function (code) { + try { + eval(code); + } catch (actual) { + } + }; +}; +try { +function arr() { + return Object.defineProperty(Object()* delete Object, 0, {writable: false}); +} +assertEq(testLenientAndStrict('var a = arr(); [a.splice(0, 1), a]', + raisesException(TypeError), + raisesException(TypeError)), + true); +} catch (e) {} +ForIn_2(this); +function ForIn_2(object) { + for ( property in object ) { + with ( object ) { + } + } +} diff --git a/js/src/jit-test/tests/basic/bug642248.js b/js/src/jit-test/tests/basic/bug642248.js new file mode 100644 index 0000000000..8c37b76759 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642248.js @@ -0,0 +1,10 @@ +function test(makeNonArray) { + function C() {} + C.prototype = [] + c = new C(); + c.push("foo"); + return c.length +} +assertEq(test(true), 1); +var a = []; +var b = Object.create(a); diff --git a/js/src/jit-test/tests/basic/bug642254.js b/js/src/jit-test/tests/basic/bug642254.js new file mode 100644 index 0000000000..a603920fe3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642254.js @@ -0,0 +1,4 @@ +function f(i) { + for (var n = 0; n < 0; n = i) { } +} +actual = f(.5); diff --git a/js/src/jit-test/tests/basic/bug642319.js b/js/src/jit-test/tests/basic/bug642319.js new file mode 100644 index 0000000000..6be3a4c59d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642319.js @@ -0,0 +1,10 @@ + +test(); +function test() { + function f() { + function test( ) { summary( summary, test, false ); } + } + f.__proto__ = this; +} +gc(); +test(); diff --git a/js/src/jit-test/tests/basic/bug642326.js b/js/src/jit-test/tests/basic/bug642326.js new file mode 100644 index 0000000000..8b91ecacfe --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642326.js @@ -0,0 +1,8 @@ +load(libdir + "immutable-prototype.js"); + +if (globalPrototypeChainIsMutable()) + this.__proto__ = null; + +gczeal(2); +gc(); +var box = evalcx('lazy'); diff --git a/js/src/jit-test/tests/basic/bug642422.js b/js/src/jit-test/tests/basic/bug642422.js new file mode 100644 index 0000000000..bb9cfea83a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642422.js @@ -0,0 +1,4 @@ +gczeal(2); +var x; +var foo = "for (var z = 0; z < 2; ++z) { new Object(new String(this), x)}"; +eval(foo); diff --git a/js/src/jit-test/tests/basic/bug642569.js b/js/src/jit-test/tests/basic/bug642569.js new file mode 100644 index 0000000000..6f84492d8b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642569.js @@ -0,0 +1,13 @@ +function main() { + var v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, + v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, + v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, + v43, v44, v45, v46, v47; + var v48 = 0, v49 = 0; + if (true) { + var v50 = v48 - 1; + var v51 = v49 + 1; + return v51; + } +} +assertEq(main(), 1); diff --git a/js/src/jit-test/tests/basic/bug642592.js b/js/src/jit-test/tests/basic/bug642592.js new file mode 100644 index 0000000000..57e40facac --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642592.js @@ -0,0 +1,2 @@ +var strings = new Array(); +strings[0x7fffffff] = 0; diff --git a/js/src/jit-test/tests/basic/bug642758.js b/js/src/jit-test/tests/basic/bug642758.js new file mode 100644 index 0000000000..e92e657309 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642758.js @@ -0,0 +1,4 @@ +function Integer( value, exception ) { } +try { +new Integer( Math.LN2, ++INVALID_INTEGER_VALUE? exception+1.1: 1900 ); +} catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug642772-1.js b/js/src/jit-test/tests/basic/bug642772-1.js new file mode 100644 index 0000000000..b7dc483fcc --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642772-1.js @@ -0,0 +1,19 @@ +var n1 = Number.prototype.toFixed; +var s1 = String.prototype.split; +delete Number; +delete String; + +var n2 = (5).toFixed; +var s2 = ("foo").split; + +// Check enumeration doesn't resurrect deleted standard classes +for (x in this) {} + +// Ensure the prototypes are shared. +var n3 = (5).toFixed; +var s3 = ("foo").split; + +assertEq(s1, s2); +assertEq(s1, s3); +assertEq(n1, n2); +assertEq(n1, n3); diff --git a/js/src/jit-test/tests/basic/bug642772-2.js b/js/src/jit-test/tests/basic/bug642772-2.js new file mode 100644 index 0000000000..d797664bfb --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642772-2.js @@ -0,0 +1,101 @@ +function failWrapper(callback) { + try { + callback(); // this should fail + throw "test-error"; // and if it didn't we have a problem` + } catch (e) { + if (e == "test-error") + throw ("Testing error when running " + callback.toString()); + } +} + + +print ("Deleting standard classes"); +delete Function; +delete Object; +delete Array; +delete Boolean; +delete JSON; +delete Date; +delete Math; +delete Number; +delete String; +delete Regexp; +delete Reflect; +delete Proxy; +delete Error; +delete Iterator; +delete Generator; +delete StopIteration; +delete Float32Array; +delete Float64Array; +delete Int16Array; +delete Int32Array; +delete Int32Array; +delete Uint16Array; +delete Uint32Array; +delete Uint8Array; +delete Uint8ClampedArray; +delete Weakmap; + + +print ("Accessing standard classes shouldn't recreate them"); +failWrapper(function () { Function; }); +failWrapper(function () { Object; }); +failWrapper(function () { Array; }); +failWrapper(function () { Boolean; }); +failWrapper(function () { JSON; }); +failWrapper(function () { Date; }); +failWrapper(function () { Math; }); +failWrapper(function () { Number; }); +failWrapper(function () { String; }); +failWrapper(function () { Regexp; }); +failWrapper(function () { Reflect; }); +failWrapper(function () { Proxy; }); +failWrapper(function () { Error; }); +failWrapper(function () { Iterator; }); +failWrapper(function () { Generator; }); +failWrapper(function () { StopIteration; }); +failWrapper(function () { Float32Array; }); +failWrapper(function () { Float64Array; }); +failWrapper(function () { Int16Array; }); +failWrapper(function () { Int32Array; }); +failWrapper(function () { Int32Array; }); +failWrapper(function () { Uint16Array; }); +failWrapper(function () { Uint32Array; }); +failWrapper(function () { Uint8Array; }); +failWrapper(function () { Uint8ClampedArray; }); +failWrapper(function () { Weakmap; }); + + +print ("Enumerate over the global object"); +for (c in this) {} + +print ("That shouldn't have recreated the standard classes either"); +failWrapper(function () { Function; }); +failWrapper(function () { Object; }); +failWrapper(function () { Array; }); +failWrapper(function () { Boolean; }); +failWrapper(function () { JSON; }); +failWrapper(function () { Date; }); +failWrapper(function () { Math; }); +failWrapper(function () { Number; }); +failWrapper(function () { String; }); +failWrapper(function () { Regexp; }); +failWrapper(function () { Reflect; }); +failWrapper(function () { Proxy; }); +failWrapper(function () { Error; }); +failWrapper(function () { Iterator; }); +failWrapper(function () { Generator; }); +failWrapper(function () { StopIteration; }); +failWrapper(function () { Float32Array; }); +failWrapper(function () { Float64Array; }); +failWrapper(function () { Int16Array; }); +failWrapper(function () { Int32Array; }); +failWrapper(function () { Int32Array; }); +failWrapper(function () { Uint16Array; }); +failWrapper(function () { Uint32Array; }); +failWrapper(function () { Uint8Array; }); +failWrapper(function () { Uint8ClampedArray; }); +failWrapper(function () { Weakmap; }); + +print ("success"); diff --git a/js/src/jit-test/tests/basic/bug642772-3.js b/js/src/jit-test/tests/basic/bug642772-3.js new file mode 100644 index 0000000000..8280b389ad --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642772-3.js @@ -0,0 +1,5 @@ +// Catch memory leaks when enumerating over the global object. + +for (let z = 1; z <= 1600; ++z) { + for (y in this); +} diff --git a/js/src/jit-test/tests/basic/bug642894.js b/js/src/jit-test/tests/basic/bug642894.js new file mode 100644 index 0000000000..5de6f3597e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642894.js @@ -0,0 +1,9 @@ + +function foo() { + var x = {}; + x.__proto__ = function() { return 0 } + return x; +} +var a = foo(); +var b = foo(); +assertEq(a.__proto__ === b.__proto__, false); diff --git a/js/src/jit-test/tests/basic/bug642985-1.js b/js/src/jit-test/tests/basic/bug642985-1.js new file mode 100644 index 0000000000..fb90691a94 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642985-1.js @@ -0,0 +1,23 @@ +gczeal(2); +function complex(aReal, aImag) {} +function mandelbrotValueOO (aC, aIterMax) { + for (var iter = 0; iter < aIterMax; iter++) { } +} +function f(trace) { + const width = 5; + const height = 5; + const max_iters = 5; + var output = []; + for (let img_x = 0; img_x < width; img_x++) { + for (let img_y = 0; img_y < height; img_y++) { + let C = new complex(-2 + (img_x / width) * 3, + -1.5 + (img_y / height) * 3); + var res = mandelbrotValueOO(C, max_iters); + if (output.length > 0 && complex(5)) { + } else { + output.push([res, 1]); + } + } + } +} +var timenonjit = f(false); diff --git a/js/src/jit-test/tests/basic/bug642985-2.js b/js/src/jit-test/tests/basic/bug642985-2.js new file mode 100644 index 0000000000..478b585591 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug642985-2.js @@ -0,0 +1,23 @@ +function f(N) +{ + for (var i = 0; i != N; ++i) { + var obj1 = {}, obj2 = {}; + obj1['a'+i] = 0; + obj2['b'+i] = 0; + for (var repeat = 0;repeat != 2; ++repeat) { + for (var j in obj1) { + for (var k in obj2) { + gc(); + } + } + } + } +} +var array = [function() { f(10); }, + function(array) { f(50); }, + function() { propertyIsEnumerable.call(undefined, {}); }, + ]; +try { + for (var i = 0; i != array.length; ++i) + array[i](); +} catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug643113.js b/js/src/jit-test/tests/basic/bug643113.js new file mode 100644 index 0000000000..54ade98916 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug643113.js @@ -0,0 +1,11 @@ +function printBugNumber (num) +{ + print ('BUGNUMBER: ' + num); +} +try { test(); } catch (e) {} +function test() +{ + printBugNumber(typeof BUGNUMBER == 'undefined'); + 1|| q + 48? new q( printBugNumber, + eval("var EXP_1 = new MyValuelessObject('string'); var EXP_2 = new MyValuelessObject(false); EXP_1 + EXP_2") ): 1; +} diff --git a/js/src/jit-test/tests/basic/bug643169.js b/js/src/jit-test/tests/basic/bug643169.js new file mode 100644 index 0000000000..28f3ac0252 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug643169.js @@ -0,0 +1,7 @@ +for(var i=0; i<3; i++) { + var x; + function ff() {} + with(this) {} + x; + x = true; +} diff --git a/js/src/jit-test/tests/basic/bug643243.js b/js/src/jit-test/tests/basic/bug643243.js new file mode 100644 index 0000000000..71530c56a1 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug643243.js @@ -0,0 +1,11 @@ +{ + function newSandbox(n) {} +} +var o12 = Float32Array.prototype; +function f12(o) { + eval('o')['__proto_' + '_'] = null; +} +for (var i = 0; i < 14; i++) { + gc() + new f12(o12); +} diff --git a/js/src/jit-test/tests/basic/bug643244.js b/js/src/jit-test/tests/basic/bug643244.js new file mode 100644 index 0000000000..90e2d510eb --- /dev/null +++ b/js/src/jit-test/tests/basic/bug643244.js @@ -0,0 +1,2 @@ +delete(0).__proto__.valueOf +eval("(function(){(0).valueOf();})")() diff --git a/js/src/jit-test/tests/basic/bug643249.js b/js/src/jit-test/tests/basic/bug643249.js new file mode 100644 index 0000000000..86a000228e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug643249.js @@ -0,0 +1,13 @@ +{ + function x() {} +} +for (i = 0; i < 10; i++) { + _someglobal_ = /a/; + (function() { + return function() { + return _someglobal_ + } () + } () == /a/); + gc(); + try { _someglobal_ = new Function.__lookupSetter__ } catch (e) {} +} diff --git a/js/src/jit-test/tests/basic/bug643285.js b/js/src/jit-test/tests/basic/bug643285.js new file mode 100644 index 0000000000..0f8d755923 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug643285.js @@ -0,0 +1,4 @@ +function fun() { + (new Function ("function ff () { actual = '' + ff. caller; } function f () { ff (); } f ();")) ('function pf' + fun + '() {}'); +} +fun(); diff --git a/js/src/jit-test/tests/basic/bug643733.js b/js/src/jit-test/tests/basic/bug643733.js new file mode 100644 index 0000000000..89a6695b3d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug643733.js @@ -0,0 +1,4 @@ +var x; +assertEq(-(typeof (x+x)), NaN); +assertEq(-(typeof Math.abs()), NaN); + diff --git a/js/src/jit-test/tests/basic/bug645293.js b/js/src/jit-test/tests/basic/bug645293.js new file mode 100644 index 0000000000..366c498fa2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug645293.js @@ -0,0 +1,12 @@ +/* Don't assert. */ +function f() { + NaN++; + --NaN; + Infinity--; + ++Infinity; + undefined++; + --undefined; + ++Math; + Math--; +} +f(); \ No newline at end of file diff --git a/js/src/jit-test/tests/basic/bug645632.js b/js/src/jit-test/tests/basic/bug645632.js new file mode 100644 index 0000000000..dbb5b8fd75 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug645632.js @@ -0,0 +1,6 @@ + +function f(o) { + o[{}] = 1; + with(Object) {} +} +f(Object.prototype); diff --git a/js/src/jit-test/tests/basic/bug646393.js b/js/src/jit-test/tests/basic/bug646393.js new file mode 100644 index 0000000000..5d98e15410 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug646393.js @@ -0,0 +1,4 @@ +try { + x.y; +} catch(ex) {} +x = Number(1); diff --git a/js/src/jit-test/tests/basic/bug646968-3.js b/js/src/jit-test/tests/basic/bug646968-3.js new file mode 100644 index 0000000000..a02cb3f682 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug646968-3.js @@ -0,0 +1,16 @@ +var s, v = "NOPE"; + +s = ''; +for (let v = 0, x = v; x < 3; x++) + s += x; +assertEq(s, '012'); + +s = ''; +for (let v = 0, x = eval('v'); x < 3; x++) + s += x; +assertEq(s, '012'); + +s = '' +for (let v = 0, x = function () { with ({}) return v; }(); x < 3; x++) + s += x; +assertEq(s, '012'); diff --git a/js/src/jit-test/tests/basic/bug646968-4.js b/js/src/jit-test/tests/basic/bug646968-4.js new file mode 100644 index 0000000000..fdcafbb2b1 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug646968-4.js @@ -0,0 +1,10 @@ +load(libdir + "asserts.js"); + +// Scoping: `x` in the head of a `for (let x...)` loop refers to the loop variable. + +assertThrowsInstanceOf(function () { +var s = "", x = {a: 1, b: 2, c: 3}; +for (let x in eval('x')) + s += x; +assertEq(s, ""); +}, ReferenceError); diff --git a/js/src/jit-test/tests/basic/bug646968-5.js b/js/src/jit-test/tests/basic/bug646968-5.js new file mode 100644 index 0000000000..abc372a853 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug646968-5.js @@ -0,0 +1,9 @@ +var y = 7; + +switch (function () { with ({}) return y; }()) { +case 7: + let y; + break; +default: + throw 'FAIL'; +} diff --git a/js/src/jit-test/tests/basic/bug646968-6.js b/js/src/jit-test/tests/basic/bug646968-6.js new file mode 100644 index 0000000000..11b1fa1c18 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug646968-6.js @@ -0,0 +1,16 @@ +// In `for (let x = EXPR; ;)`, if `x` appears within EXPR, it refers to the +// loop variable. Actually doing this is typically a TDZ error. + +load(libdir + "asserts.js"); + +assertThrowsInstanceOf(() => { + for (let x = x; null.foo; null.foo++) {} +}, ReferenceError); + +assertThrowsInstanceOf(() => { + for (let x = eval('x'); null.foo; null.foo++) {} +}, ReferenceError); + +assertThrowsInstanceOf(() => { + for (let x = function () { with ({}) return x; }(); null.foo; null.foo++) {} +}, ReferenceError); diff --git a/js/src/jit-test/tests/basic/bug646968-7.js b/js/src/jit-test/tests/basic/bug646968-7.js new file mode 100644 index 0000000000..7fac119f56 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug646968-7.js @@ -0,0 +1,10 @@ +load(libdir + "evalInFrame.js"); + +function test(s) { + eval(s); + { + let y = evalInFrame(0, '3'), x = x0; + assertEq(x, 5); + } +} +test('var x0= 5;'); diff --git a/js/src/jit-test/tests/basic/bug646968-8.js b/js/src/jit-test/tests/basic/bug646968-8.js new file mode 100644 index 0000000000..9214f0798f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug646968-8.js @@ -0,0 +1,8 @@ +load(libdir + "evalInFrame.js"); + +var x = 5; +{ + let x = eval("this.x++"); + assertEq(evalInFrame(0, "x"), 5); +} +assertEq(x, 6); diff --git a/js/src/jit-test/tests/basic/bug647463.js b/js/src/jit-test/tests/basic/bug647463.js new file mode 100644 index 0000000000..0f3d5cd57a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug647463.js @@ -0,0 +1,6 @@ + +try { + eval("\ + [0].sort()\ + ") +} catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug648357.js b/js/src/jit-test/tests/basic/bug648357.js new file mode 100644 index 0000000000..9c2c939e08 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug648357.js @@ -0,0 +1,3 @@ +var x = [1, 2, 3, 4, 5, 6, 7, 8]; +x.pop(); +x.push(9); diff --git a/js/src/jit-test/tests/basic/bug648773.js b/js/src/jit-test/tests/basic/bug648773.js new file mode 100644 index 0000000000..2ab57ed240 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug648773.js @@ -0,0 +1,4 @@ +gczeal(2); +for (var loopa2 = 0; loopa2 < 13; loopa2++) { + [, , , , , , ][new Float64Array()] = 72413.8139177333; +} diff --git a/js/src/jit-test/tests/basic/bug649439.js b/js/src/jit-test/tests/basic/bug649439.js new file mode 100644 index 0000000000..0f19afca8c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug649439.js @@ -0,0 +1,3 @@ +var o1 = new String("abc"); +var o2 = o1[1]; +o2[1]; diff --git a/js/src/jit-test/tests/basic/bug649771.js b/js/src/jit-test/tests/basic/bug649771.js new file mode 100644 index 0000000000..6ecc2d83e6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug649771.js @@ -0,0 +1,7 @@ +function f(o) { + f = o.constructor; + eval('delete o.x'); +} +for(var i=0; i<3; i++) { + f(RegExp.prototype); +} diff --git a/js/src/jit-test/tests/basic/bug651451-2.js b/js/src/jit-test/tests/basic/bug651451-2.js new file mode 100644 index 0000000000..d5594b8922 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug651451-2.js @@ -0,0 +1,6 @@ +var arr = [1, 2, 3, 4, 5]; +arr.length = 100; +arr.pop(); +assertEq(arr.length, 99); +arr.pop(); +assertEq(arr.length, 98); \ No newline at end of file diff --git a/js/src/jit-test/tests/basic/bug651451.js b/js/src/jit-test/tests/basic/bug651451.js new file mode 100644 index 0000000000..e547fa4d78 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug651451.js @@ -0,0 +1,4 @@ +var arr = [2]; +arr.pop(); +arr[0] = 2; +assertEq(arr.length, 1); diff --git a/js/src/jit-test/tests/basic/bug651966.js b/js/src/jit-test/tests/basic/bug651966.js new file mode 100644 index 0000000000..35e0c1049b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug651966.js @@ -0,0 +1,38 @@ + +function f(code) { + g = eval("(function(){" + code + "})"); + g() +} +f(); +f(); +f(); +f(); +f(); +f(); +f(); +f(); +f(); +f(); +f(); +f(); +f(); +f(); +f(); +f(); +try { f("function x(){}(x())"); } catch (e) {} + +function f2() { + a = { + x + } = x, (x._) + function + x(){ return ({}); } +} +try { f2(); } catch (e) {} + +function f3() { + var x = 0; + with ({}) { x = 'three'; } + return x; +} +f3(); diff --git a/js/src/jit-test/tests/basic/bug652054.js b/js/src/jit-test/tests/basic/bug652054.js new file mode 100644 index 0000000000..3e43d36733 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug652054.js @@ -0,0 +1,55 @@ +var M4x4 = {}; +M4x4.mul = function M4x4_mul(a, b, r) { + a11 = a[0] + a21 = a[1] + a31 = a[2] + a12 = a[4] + a22 = a[5] + a32 = a[6] + a13 = a[8] + a23 = a[9] + a33 = a[10] + a14 = a[12] + a24 = a[13] + a34 = a[14] + b[3] + b[4] + b13 = b[8] + b23 = b[9] + b33 = b[10] + b43 = b[11] + r[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43 + r[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43 + r[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43 + return r; +}; +M4x4.scale3 = function M4x4_scale3(x, y, z, m) { + m[0] *= x; + m[3] *= x; + m[4] *= y; + m[11] *= z; +}; +M4x4.makeLookAt = function M4x4_makeLookAt() { + tm1 = new Float32Array(16); + tm2 = new Float32Array(16); + r = new Float32Array(16) + return M4x4.mul(tm1, tm2, r); +}; +var jellyfish = {}; +jellyfish.order = []; +function jellyfishInstance() {} +jellyfishInstance.prototype.drawShadow = function () { + pMatrix = M4x4.makeLookAt(); + M4x4.mul(M4x4.makeLookAt(), pMatrix, pMatrix); + M4x4.scale3(6, 180, 0, pMatrix); +} +function drawScene() { + jellyfish.order.push([0, 0]) + jellyfish[0] = new jellyfishInstance() + for (var i = 0, j = 0; i < jellyfish.count, j < 30; ++j) { + jellyfish.order[i][0] + jellyfish[0].drawShadow(); + } +} +drawScene(); + diff --git a/js/src/jit-test/tests/basic/bug652060.js b/js/src/jit-test/tests/basic/bug652060.js new file mode 100644 index 0000000000..d7d5609a09 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug652060.js @@ -0,0 +1,9 @@ +var x = -false; +var y = -0; +assertEq(-x === x, true); +assertEq(-x === y, true); +assertEq(-y !== y, false); + +assertEq(-x == x, true); +assertEq(-x == y, true); +assertEq(-y != y, false); diff --git a/js/src/jit-test/tests/basic/bug652422.js b/js/src/jit-test/tests/basic/bug652422.js new file mode 100644 index 0000000000..64525ee36a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug652422.js @@ -0,0 +1,6 @@ +try { (function() { + var o = {}; + with (o) o='recorder not started, '; + ('arguments' in o, false, + "property deletion observable") +})() } catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug652646.js b/js/src/jit-test/tests/basic/bug652646.js new file mode 100644 index 0000000000..5f54c32dea --- /dev/null +++ b/js/src/jit-test/tests/basic/bug652646.js @@ -0,0 +1,11 @@ +function foo() { + try { + return 0; + } catch (e) { + try { + return 1; + } catch (e) { + } + } +} +foo(); diff --git a/js/src/jit-test/tests/basic/bug653153.js b/js/src/jit-test/tests/basic/bug653153.js new file mode 100644 index 0000000000..c06e3b82b8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug653153.js @@ -0,0 +1,76 @@ +// ES5 15.1.2.2 step 1 + +/* + * Boundary testing for super-large positive numbers between non-exponential + * and in-exponential-form. + * + * NB: While 1e21 is exactly representable as an IEEE754 double-precision + * number, its nearest neighboring representable values are a good distance + * away, 65536 to be precise. + */ + +// This is the boundary in theory. +assertEq(parseInt(1e21), 1); + +// This is the boundary in practice. +assertEq(parseInt(1e21 - 65537) > 1e20, true); +assertEq(parseInt(1e21 - 65536), 1); +assertEq(parseInt(1e21 + 65536), 1); + +// Check that we understand floating point accuracy near the boundary +assertEq(1e21 - 65537 !== 1e21 - 65536, true); +assertEq(1e21 - 65536, 1e21); +assertEq(1e21 + 65535, 1e21); +assertEq(1e21 + 65536, 1e21); + +// ES5 leaves exact precision in ToString(bigMagNum) undefined, which +// might make this value inconsistent across implementations (maybe, +// nobody's done the math here). Regardless, it's definitely a number +// very close to 1, and not a large-magnitude positive number. +assertEq(1e21 + 65537 !== 1e21, true); +assertEq(parseInt(1e21 + 65537) < 1.001, true); + + +/* + * Now do the same tests for super-large negative numbers crossing the + * opposite boundary. + */ + +// This is the boundary in theory. +assertEq(parseInt(-1e21), -1); + +// This is the boundary in practice. +assertEq(parseInt(-1e21 + 65537) < -1e20, true); +assertEq(parseInt(-1e21 + 65536), -1); +assertEq(parseInt(-1e21 - 65536), -1); + +// Check that we understand floating point accuracy near the boundary +assertEq(-1e21 + 65537 !== -1e21 + 65536, true); +assertEq(-1e21 + 65536, -1e21); +assertEq(-1e21 - 65535, -1e21); +assertEq(-1e21 - 65536, -1e21); + +// ES5 leaves exact precision in ToString(bigMagNum) undefined, which +// might make this value inconsistent across implementations (maybe, +// nobody's done the math here). Regardless, it's definitely a number +// very close to -1, and not a large-magnitude negative number. +assertEq(-1e21 - 65537 !== 1e21, true); +assertEq(parseInt(-1e21 - 65537) > -1.001, true); + + +/* Check values around the boundary. */ +arr = [1e0, 5e1, 9e19, 0.1e20, 1.3e20, 1e20, 9e20, 9.99e20, 0.1e21, + 1e21, 1.0e21, 2e21, 2e20, 2.1e22, 9e21, 0.1e22, 1e22, 3e46, 3e23, 3e100, 3.4e200, 7e1000, + 1e21, 1e21+65537, 1e21+65536, 1e21-65536, 1e21-65537]; + +/* Check across a range of values in case we missed anything. */ +for (var i = 0; i < 4000; i++) { + arr.push(1e19 + i*1e19); +} + +for (var i in arr) { + assertEq(parseInt( arr[i]), parseInt(String( arr[i]))); + assertEq(parseInt(-arr[i]), parseInt(String(-arr[i]))); +} + + diff --git a/js/src/jit-test/tests/basic/bug653262.js b/js/src/jit-test/tests/basic/bug653262.js new file mode 100644 index 0000000000..9a488bbaa1 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug653262.js @@ -0,0 +1,4 @@ +with(evalcx(''))(function eval() {}, this.__defineGetter__("x", Function)); +var i = 0; +var o; +new(x); diff --git a/js/src/jit-test/tests/basic/bug653438.js b/js/src/jit-test/tests/basic/bug653438.js new file mode 100644 index 0000000000..23cd086ba2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug653438.js @@ -0,0 +1,2 @@ +assertEq((123456789).toExponential(), "1.23456789e+8"); +assertEq((123456789).toExponential(undefined), "1.23456789e+8"); diff --git a/js/src/jit-test/tests/basic/bug653672.js b/js/src/jit-test/tests/basic/bug653672.js new file mode 100644 index 0000000000..c9d5e202b4 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug653672.js @@ -0,0 +1,5 @@ +// don't crash + +var regexp1 = /(?:(?=g))|(?:m).{2147483648,}/; +var regexp2 = /(?:(?=g)).{2147483648,}/; + diff --git a/js/src/jit-test/tests/basic/bug654073.js b/js/src/jit-test/tests/basic/bug654073.js new file mode 100644 index 0000000000..7659d534b8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug654073.js @@ -0,0 +1,11 @@ +load(libdir + "immutable-prototype.js"); + +if (globalPrototypeChainIsMutable()) { + this.__proto__ = null; + Object.prototype.__proto__ = this; +} + +for (var y in Object.prototype) + continue; +for (var x in this) + continue; diff --git a/js/src/jit-test/tests/basic/bug654668.js b/js/src/jit-test/tests/basic/bug654668.js new file mode 100644 index 0000000000..8706c154a2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug654668.js @@ -0,0 +1,10 @@ +var summary = 'foo'; +function X(n) { + var y = []; + while (summary + y[0]) { + break; + } +} +X(); + +// Don't crash wthi -m -n -a diff --git a/js/src/jit-test/tests/basic/bug656261.js b/js/src/jit-test/tests/basic/bug656261.js new file mode 100644 index 0000000000..8757508045 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug656261.js @@ -0,0 +1,31 @@ +function build_getter(i) { + var x = [i]; + return function f() { return x; } +} + +function test() +{ + var N = internalConst("MARK_STACK_BASE_CAPACITY") + 2; + var o = {}; + var descriptor = { enumerable: true}; + for (var i = 0; i != N; ++i) { + descriptor.get = build_getter(i); + Object.defineProperty(o, i, descriptor); + } + + // At this point we have an object o with N getters. Each getter in turn + // is a closure storing an array. During the GC we push to the object + // marking stack all the getters found in an object after we mark it. As N + // exceeds the size of the object marking stack, this requires to run the + // dealyed scanning for some closures to mark the array objects stored in + // them. + // + // We run the GC twice to make sure that the background finalization + // finishes before we access the objects. + gc(); + gc(); + for (var i = 0; i != N; ++i) + assertEq(o[i][0], i); +} + +test(); diff --git a/js/src/jit-test/tests/basic/bug657197.js b/js/src/jit-test/tests/basic/bug657197.js new file mode 100644 index 0000000000..fde956abee --- /dev/null +++ b/js/src/jit-test/tests/basic/bug657197.js @@ -0,0 +1,5 @@ +try { (function() { + new function() { + throw []; + } +})() } catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug657225.js b/js/src/jit-test/tests/basic/bug657225.js new file mode 100644 index 0000000000..510b768515 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug657225.js @@ -0,0 +1,9 @@ + +function reportCompare(expected, actual, description) { return + ++actual + "'"; } +var summary = 'Object.prototype.toLocaleString() should track Object.prototype.toString() '; +var o = { + toString: function () {} +}; +expect = o; +actual = o.toLocaleString(); +reportCompare(expect, actual, summary); diff --git a/js/src/jit-test/tests/basic/bug657245.js b/js/src/jit-test/tests/basic/bug657245.js new file mode 100644 index 0000000000..15bea1c94f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug657245.js @@ -0,0 +1,4 @@ + +var length = 4294967295; +var array1 = Array(length); +array1.pop(); diff --git a/js/src/jit-test/tests/basic/bug657901.js b/js/src/jit-test/tests/basic/bug657901.js new file mode 100644 index 0000000000..a0531ae758 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug657901.js @@ -0,0 +1,8 @@ +function f() {}; +function g(o) { + f = new Function(""); + eval(""); +} +g({}); +g({}); +f++; diff --git a/js/src/jit-test/tests/basic/bug658539.js b/js/src/jit-test/tests/basic/bug658539.js new file mode 100644 index 0000000000..0454394113 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug658539.js @@ -0,0 +1,2 @@ +with(newGlobal('same-compartment')) +new Number() diff --git a/js/src/jit-test/tests/basic/bug660081.js b/js/src/jit-test/tests/basic/bug660081.js new file mode 100644 index 0000000000..1c62a654c3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug660081.js @@ -0,0 +1 @@ +(function() { "length" in (true && arguments); })() diff --git a/js/src/jit-test/tests/basic/bug660173.js b/js/src/jit-test/tests/basic/bug660173.js new file mode 100644 index 0000000000..99d0f8ed8c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug660173.js @@ -0,0 +1,4 @@ +(function() {}).apply(null, (function() { + var x; + return (x = arguments); +})()); diff --git a/js/src/jit-test/tests/basic/bug660203.js b/js/src/jit-test/tests/basic/bug660203.js new file mode 100644 index 0000000000..faed7b6864 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug660203.js @@ -0,0 +1,9 @@ + +function throwsRangeError(t) { + try { + var date = arguments; + date.setTime + } catch (err) { + } +} +throwsRangeError(); diff --git a/js/src/jit-test/tests/basic/bug660204.js b/js/src/jit-test/tests/basic/bug660204.js new file mode 100644 index 0000000000..eddd4ba839 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug660204.js @@ -0,0 +1,12 @@ + +eval("try { name(); } catch(e) {}"); +function Employee ( name, dept ) { + this.name=name || "" + this.dept +} +function WorkerBee ( name, dept, projs ) { + this.base=Employee + this.base( name, print("WHAT")) +} +new WorkerBee; +WorkerBee(); diff --git a/js/src/jit-test/tests/basic/bug660597.js b/js/src/jit-test/tests/basic/bug660597.js new file mode 100644 index 0000000000..207a828e71 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug660597.js @@ -0,0 +1,5 @@ + +function foo() { + with(foo) this["00"]=function(){} +} +new foo; diff --git a/js/src/jit-test/tests/basic/bug662044.js b/js/src/jit-test/tests/basic/bug662044.js new file mode 100644 index 0000000000..bebabef84f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug662044.js @@ -0,0 +1,12 @@ +eval("var OBJ = new MyObject(true); OBJ.valueOf()") +function MyObject( value ) { + this.valueOf = new Function( "return this.value" ); +} +eval("\ +var VERSION = \"ECMA_1\";\ +var DATE1 = new Date();\ +var MYOB1 = new MyObject( DATE1 );\ +function MyProtoValuelessObject() {}\ +function Function() {\ + __proto__[MyProtoValuelessObject] = VERSION;\ +}"); diff --git a/js/src/jit-test/tests/basic/bug662841.js b/js/src/jit-test/tests/basic/bug662841.js new file mode 100644 index 0000000000..351bb97a9b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug662841.js @@ -0,0 +1,4 @@ +var e = newGlobal(); +for (let w in [0, 0, 0, 0, 0, 0, 0, 0]) { + -e; +} diff --git a/js/src/jit-test/tests/basic/bug663338.js b/js/src/jit-test/tests/basic/bug663338.js new file mode 100644 index 0000000000..efc038972b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug663338.js @@ -0,0 +1,26 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + + +assertEq(parseInt(1.0e-7, 10), 1); +assertEq(parseInt(-1.0e-7, 10), -1); + +assertEq(parseInt(9e-8, 10), 9); +assertEq(parseInt(-9e-8, 10), -9); + +assertEq(parseInt(1.5e-8, 10), 1); +assertEq(parseInt(-1.5e-8, 10), -1); + +assertEq(parseInt(1.0e-6, 10), 0); + +assertEq(parseInt(0, 10), 0); +assertEq(parseInt(-0, 10), 0); + +assertEq(parseInt('0', 10), 0); +assertEq(parseInt('-0', 10), -0); + +// Test with 0 typed as a double instead of int. +assertEq(parseInt(numberToDouble(0), 10), 0); +assertEq(parseInt(numberToDouble(-0), 10), 0); diff --git a/js/src/jit-test/tests/basic/bug665289.js b/js/src/jit-test/tests/basic/bug665289.js new file mode 100644 index 0000000000..a5e9d7e548 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug665289.js @@ -0,0 +1,4 @@ +delete this.Function; +a = evalcx("lazy"); +a["Object"] = this; +if (typeof a.isPrototypeOf == "") {} diff --git a/js/src/jit-test/tests/basic/bug666448.js b/js/src/jit-test/tests/basic/bug666448.js new file mode 100644 index 0000000000..aef626265d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug666448.js @@ -0,0 +1 @@ +assertEq(["a"].map(escape)[0], ["a"].map(function(s) {return escape(s);})[0]); diff --git a/js/src/jit-test/tests/basic/bug667504-syntax.js b/js/src/jit-test/tests/basic/bug667504-syntax.js new file mode 100644 index 0000000000..6069220206 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug667504-syntax.js @@ -0,0 +1,3 @@ +for (var x in x) { +function x() {} +} diff --git a/js/src/jit-test/tests/basic/bug667507.js b/js/src/jit-test/tests/basic/bug667507.js new file mode 100644 index 0000000000..883857a1e7 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug667507.js @@ -0,0 +1,6 @@ +for (i = 0; i < 10; i++) { + Object.defineProperty({}, "", { + get: function() {} + }) + gc() +} diff --git a/js/src/jit-test/tests/basic/bug673468.js b/js/src/jit-test/tests/basic/bug673468.js new file mode 100644 index 0000000000..90749115b3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug673468.js @@ -0,0 +1,8 @@ +var g = newGlobal(); +var k = g.eval('var u = new Object(); u'); +var m = new WeakMap(); +m.set(k, {}); +k = null; +gc(); +k = g.eval('u'); +assertEq(m.has(k), true); diff --git a/js/src/jit-test/tests/basic/bug673469.js b/js/src/jit-test/tests/basic/bug673469.js new file mode 100644 index 0000000000..21dbf43fe3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug673469.js @@ -0,0 +1,9 @@ +var a = Boolean(); +false.__proto__; +var c = ({}).__proto__; +var d = {}; +gc() +c[0] = d; +for (var x in a) { + a[x]; +} diff --git a/js/src/jit-test/tests/basic/bug673569.js b/js/src/jit-test/tests/basic/bug673569.js new file mode 100644 index 0000000000..05f031d9ce --- /dev/null +++ b/js/src/jit-test/tests/basic/bug673569.js @@ -0,0 +1,18 @@ +function qualified_tests(prefix) { + let scope = evalReturningScope(prefix + "var x = 1"); + assertEq(scope.x, 1); +} + +qualified_tests(""); +qualified_tests("'use strict'; "); + +let scope = evalReturningScope("x = 1"); +assertEq(scope.x, 1); + +let fail = true; +try { + evalReturningScope("'use strict'; x = 1"); +} catch (e) { + fail = false; +} +assertEq(fail, false); diff --git a/js/src/jit-test/tests/basic/bug673705-1.js b/js/src/jit-test/tests/basic/bug673705-1.js new file mode 100644 index 0000000000..42fc30591c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug673705-1.js @@ -0,0 +1,10 @@ +function bug673705() { + var x; + try { + } catch (e) { + } finally { + print(x); + } + return x; +} +assertEq(bug673705(), undefined); diff --git a/js/src/jit-test/tests/basic/bug673705-2.js b/js/src/jit-test/tests/basic/bug673705-2.js new file mode 100644 index 0000000000..28076f9c46 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug673705-2.js @@ -0,0 +1,12 @@ +function bug673705() { + var x; + try { + try { + } catch (e) { + } + } finally { + } + print(x); + return x; +} +assertEq(bug673705(), undefined); diff --git a/js/src/jit-test/tests/basic/bug673715.js b/js/src/jit-test/tests/basic/bug673715.js new file mode 100644 index 0000000000..b204069061 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug673715.js @@ -0,0 +1,10 @@ +function g() { + "use strict"; + for (var i = 0; i < 50; i++) + arguments[0]; + eval(""); +} +function f() { + g.call(arguments); +} +f(); diff --git a/js/src/jit-test/tests/basic/bug673731.js b/js/src/jit-test/tests/basic/bug673731.js new file mode 100644 index 0000000000..ca249828e6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug673731.js @@ -0,0 +1,3 @@ +// |jit-test| error: ReferenceError + +const IS_TOKEN_ARRAY = [ printBugNumber && this() ? this() : this() ]; diff --git a/js/src/jit-test/tests/basic/bug673766.js b/js/src/jit-test/tests/basic/bug673766.js new file mode 100644 index 0000000000..d1bdc3d45c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug673766.js @@ -0,0 +1,20 @@ +function TestCase(n, d, e, a) { + this.name = n + this.description = d +} +function reportCompare(expected, actual, description) { + new TestCase +} +var actual = ''; +var expect = ''; +for (var i = 0; i < 2; ++i) reportCompare(expect, actual, ': 2'); +try { + ({ + valueOf: gc + } - []) +} catch (prop) {} +function addThis() { return reportCompare(expect, actual, 'ok'); } +Object.defineProperty(Object.prototype, "name", { + set: function (newValue) {} +}); +addThis() diff --git a/js/src/jit-test/tests/basic/bug673767.js b/js/src/jit-test/tests/basic/bug673767.js new file mode 100644 index 0000000000..5a7fb07b7d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug673767.js @@ -0,0 +1,2 @@ +var stack = {}; +stack.length += 3; diff --git a/js/src/jit-test/tests/basic/bug674085.js b/js/src/jit-test/tests/basic/bug674085.js new file mode 100644 index 0000000000..0147621e7a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug674085.js @@ -0,0 +1,6 @@ +function f(x) { + for (var i = 0; i < 50; i++) {}; + [1][arguments[0]]++; + x = 1.2; +} +f(0); diff --git a/js/src/jit-test/tests/basic/bug674776.js b/js/src/jit-test/tests/basic/bug674776.js new file mode 100644 index 0000000000..2693029caa --- /dev/null +++ b/js/src/jit-test/tests/basic/bug674776.js @@ -0,0 +1,18 @@ +// |jit-test| slow + +/* Make a lot of functions of the form: +function x1(){x1();} +function x2(){x2();} +function x3(){x3();} +... +*/ + +var g = newGlobal({newCompartment: true}); +var dbg = new g.Debugger(this); + +var s = ''; +for (var i = 0; i < 70000; i++) { + s += 'function x' + i + '() { x' + i + '(); }\n'; +} +s += 'pc2line(1);\n' +evaluate(s); diff --git a/js/src/jit-test/tests/basic/bug677635.js b/js/src/jit-test/tests/basic/bug677635.js new file mode 100644 index 0000000000..fffc67cc59 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug677635.js @@ -0,0 +1,7 @@ + +index = 0; +test(); +function test() { + var [message,prettyPrinting]=[arguments,__lookupGetter__]; + message>= '';\ + URI += '';\ +}\ +test();\ +"); diff --git a/js/src/jit-test/tests/basic/bug699166.js b/js/src/jit-test/tests/basic/bug699166.js new file mode 100644 index 0000000000..1b75e174a2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug699166.js @@ -0,0 +1,7 @@ +a = "".__proto__ +b = String().__proto__ +for (var i = 0; i < 2; i++) { + a.__defineSetter__("valueOf", function() {}) + a + "" + delete b.valueOf +} diff --git a/js/src/jit-test/tests/basic/bug700300.js b/js/src/jit-test/tests/basic/bug700300.js new file mode 100644 index 0000000000..ccee3ecfd2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug700300.js @@ -0,0 +1,4 @@ +for (let j = 0; j < (20); ++(__lookupSetter__)) { + function g() { j; } + j++; +} diff --git a/js/src/jit-test/tests/basic/bug702426-regexp-gc.js b/js/src/jit-test/tests/basic/bug702426-regexp-gc.js new file mode 100644 index 0000000000..206e2fd957 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug702426-regexp-gc.js @@ -0,0 +1,5 @@ +function g(code) { + eval("(function(){" + code + "})")() +} +g("evalcx(\"(/a/g,function(){})\")"); +g("'a'.replace(/a/g,gc)") diff --git a/js/src/jit-test/tests/basic/bug702572.js b/js/src/jit-test/tests/basic/bug702572.js new file mode 100644 index 0000000000..50595d09e5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug702572.js @@ -0,0 +1,10 @@ +eval("function f() { function g() {} return g; }"); +assertEq(f().prototype !== f().prototype, true); + +function f1() { + function g1() { + function h1() { return h1; } + } + return g1; +} +assertEq(f1().prototype !== f1().prototype, true); diff --git a/js/src/jit-test/tests/basic/bug703157.js b/js/src/jit-test/tests/basic/bug703157.js new file mode 100644 index 0000000000..2acdd92ebd --- /dev/null +++ b/js/src/jit-test/tests/basic/bug703157.js @@ -0,0 +1,36 @@ +// Define a test object +var test = {x:1,y:2}; + +// Put the object into dictionary mode by deleting +// a property that was not the last one added. +delete test.x; + +// Define a an accessor property with a setter that +// itself calls Object.defineProperty +Object.defineProperty(test, "foo", { + get: function() { return 1; }, + set: function(v) { + Object.defineProperty(this, "foo", { value: v }); + // Prints the correct object descriptor + assertEq(this.foo, 33); + }, + configurable: true +}); + +// Add another property, so generateOwnShape does not replace the foo property. +test.other = 0; + +// This line prints 1, as expected +assertEq(test.foo, 1); + +// Now set the property. This calls the setter method above. +// And the setter method prints the expected value and property descriptor. +test.foo = 33; + +// Finally read the newly set value. +assertEq(test.foo, 33); + +// Check that enumeration order is correct. +var arr = []; +for (var x in test) arr.push(x); +assertEq("" + arr, "y,other"); diff --git a/js/src/jit-test/tests/basic/bug703544.js b/js/src/jit-test/tests/basic/bug703544.js new file mode 100644 index 0000000000..87d1a1b0d0 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug703544.js @@ -0,0 +1,7 @@ +gczeal(4); +function testInterpreterReentry7() { + var arr = [0, 1, 2, 3, 4]; + for (var i = (1); i < 5; i++) + arr[i] = "grue"; +} +testInterpreterReentry7(); diff --git a/js/src/jit-test/tests/basic/bug703818.js b/js/src/jit-test/tests/basic/bug703818.js new file mode 100644 index 0000000000..9d844986af --- /dev/null +++ b/js/src/jit-test/tests/basic/bug703818.js @@ -0,0 +1,3 @@ +Object.defineProperty(Array.prototype, "toString", { + enumerable: true +}) diff --git a/js/src/jit-test/tests/basic/bug704134.js b/js/src/jit-test/tests/basic/bug704134.js new file mode 100644 index 0000000000..947a0b13bb --- /dev/null +++ b/js/src/jit-test/tests/basic/bug704134.js @@ -0,0 +1,12 @@ +function f(s) { + eval(s); + return function() { + with({}) {}; + return b; + }; +} +var b = 1; +var g1 = f(""); +var g2 = f("var b = 2;"); +g1(''); +assertEq(g2(''), 2); diff --git a/js/src/jit-test/tests/basic/bug705895-1.js b/js/src/jit-test/tests/basic/bug705895-1.js new file mode 100644 index 0000000000..c2beca9f63 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug705895-1.js @@ -0,0 +1,16 @@ +load(libdir + "immutable-prototype.js"); + +c = Number.prototype; +function f(o) { + if (globalPrototypeChainIsMutable() || o !== Object.prototype) + o.__proto__ = null + for (x in o) {} +} +for (i = 0; i < 9; i++) { + f(c) + if (globalPrototypeChainIsMutable()) + Object.prototype.__proto__ = c; + for (x in Object.prototype) + continue; + f(Math.__proto__); +} diff --git a/js/src/jit-test/tests/basic/bug705895-2.js b/js/src/jit-test/tests/basic/bug705895-2.js new file mode 100644 index 0000000000..445efb56a8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug705895-2.js @@ -0,0 +1,13 @@ +// |jit-test| error: TypeError +function f(o) { + for (j = 0; j < 9; j++) { + if (j) { + o.__proto__ = null + } + for (v in o) {} + } +} +for (i = 0; i < 9; i++) { + (new Boolean).__proto__.__defineGetter__("toString", function() {}) + f(Boolean.prototype) +} diff --git a/js/src/jit-test/tests/basic/bug706316.js b/js/src/jit-test/tests/basic/bug706316.js new file mode 100644 index 0000000000..d34aa79f78 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug706316.js @@ -0,0 +1,11 @@ +// |jit-test| error: ReferenceError +gczeal(4); +function setprop() { + var obj = { a:({ } ) }; + var obj2 = { b:-1, a:-1 }; + for (var i = 0; i < 20; (length(resultsY.global0, 42))) { + obj2.b = obj.a = i; + } +} +assertEq(setprop(), "19,-1,19"); + diff --git a/js/src/jit-test/tests/basic/bug706795.js b/js/src/jit-test/tests/basic/bug706795.js new file mode 100644 index 0000000000..57d1a41a4e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug706795.js @@ -0,0 +1,7 @@ +executed = false; +Object.defineProperty(Object.prototype, 'x', { set: function() { executed = true; } }); +function A() { + this.x = 12; +} +new A(); +assertEq(executed, true); diff --git a/js/src/jit-test/tests/basic/bug706808.js b/js/src/jit-test/tests/basic/bug706808.js new file mode 100644 index 0000000000..8bbba9d98a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug706808.js @@ -0,0 +1,5 @@ + +Object.defineProperty(Object.prototype, "a", {}); +function t2(b) { this.a = b; } +var x = new t2(3); +assertEq(x.a, undefined); diff --git a/js/src/jit-test/tests/basic/bug707750.js b/js/src/jit-test/tests/basic/bug707750.js new file mode 100644 index 0000000000..56df1043c6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug707750.js @@ -0,0 +1,9 @@ +// |jit-test| error: ReferenceError +var lfcode = new Array(); +lfcode.push("gczeal(4);"); +lfcode.push('print(BUGNUMBER + ": " + (W -- ));'); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + eval(file); +} + diff --git a/js/src/jit-test/tests/basic/bug708228.js b/js/src/jit-test/tests/basic/bug708228.js new file mode 100644 index 0000000000..4a627fd1fb --- /dev/null +++ b/js/src/jit-test/tests/basic/bug708228.js @@ -0,0 +1,5 @@ +// |jit-test| error: TypeError +gczeal(4); +var g_rx = /(?:)/; +(3).replace(g_rx.compile("test", "g"), {}); + diff --git a/js/src/jit-test/tests/basic/bug708819.js b/js/src/jit-test/tests/basic/bug708819.js new file mode 100644 index 0000000000..8f3f0a552e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug708819.js @@ -0,0 +1,12 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +try { + var e = new Error(); + e.name = e; + "" + e; +} catch (e) { + assertEq(e.message, 'too much recursion'); +} diff --git a/js/src/jit-test/tests/basic/bug709634.js b/js/src/jit-test/tests/basic/bug709634.js new file mode 100644 index 0000000000..78691ca98d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug709634.js @@ -0,0 +1,6 @@ + +Function.prototype.toString = function () { return f(this, true); }; +function f(obj) { + f.caller.p +} +decodeURI + 3; diff --git a/js/src/jit-test/tests/basic/bug710947.js b/js/src/jit-test/tests/basic/bug710947.js new file mode 100644 index 0000000000..2782880206 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug710947.js @@ -0,0 +1,8 @@ +// |jit-test| allow-oom; +function startTest() { + if (typeof document != "object" + || !document.location.href.match(/jsreftest.html/)) {} +}; +gczeal(4); +startTest(); +new ArrayBuffer( 8192 ); diff --git a/js/src/jit-test/tests/basic/bug713226.js b/js/src/jit-test/tests/basic/bug713226.js new file mode 100644 index 0000000000..dc7e5adea4 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug713226.js @@ -0,0 +1,20 @@ +// |jit-test| +gczeal(4); +var optionNames = options().split(','); + for (var i = 0; i < optionNames.length; i++) + var optionName = optionNames[i]; +evaluate("\ +function addDebug(g, id) {\ + var debuggerGlobal = newGlobal({newCompartment: true});\ + debuggerGlobal.debuggee = g;\ + debuggerGlobal.id = id;\ + debuggerGlobal.print = function (s) { print(s); };\ + debuggerGlobal.eval('var dbg = new Debugger(debuggee);dbg.onDebuggerStatement = function () { print(id); debugger; };');\ + return debuggerGlobal;\ +}\ +var base = newGlobal({newCompartment: true});\ +var top = base;\ +for (var i = 0; i < 8; i++ )\ + top = addDebug(top, i);\ +base.eval('debugger;');\ +"); diff --git a/js/src/jit-test/tests/basic/bug714614.js b/js/src/jit-test/tests/basic/bug714614.js new file mode 100644 index 0000000000..fd01dce561 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug714614.js @@ -0,0 +1,5 @@ +function testForVarInWith(foo, foo) { + return eval("with ({}) { for (var x = 0; x < 5; x++); } (function() { return delete x; })"); +} +f = testForVarInWith()(); + diff --git a/js/src/jit-test/tests/basic/bug714616.js b/js/src/jit-test/tests/basic/bug714616.js new file mode 100644 index 0000000000..706594d055 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug714616.js @@ -0,0 +1,8 @@ +array1 = new Array(); +size = 10; +for (i = 0; i < size; (array1.length)++) +{ + array1.push(array1.shift()); + ++i +} + diff --git a/js/src/jit-test/tests/basic/bug716013.js b/js/src/jit-test/tests/basic/bug716013.js new file mode 100644 index 0000000000..defd30537b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug716013.js @@ -0,0 +1,4 @@ +f = (function*() { + for (x in [arguments, arguments]) yield(gczeal(4, function(){})) +}); +for (i of f()) {} diff --git a/js/src/jit-test/tests/basic/bug718852.js b/js/src/jit-test/tests/basic/bug718852.js new file mode 100644 index 0000000000..845b84cf3f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug718852.js @@ -0,0 +1,15 @@ +// |jit-test| error:ReferenceError + +function fannkuch(n) { + var perm1 = Array(n); + while (true) { + if (check < 30){ + for(var i=0; i= 0) {} + arr.splice(2, 3); + seen.push(p); +} + diff --git a/js/src/jit-test/tests/basic/bug727223.js b/js/src/jit-test/tests/basic/bug727223.js new file mode 100644 index 0000000000..5011c134df --- /dev/null +++ b/js/src/jit-test/tests/basic/bug727223.js @@ -0,0 +1,15 @@ +try { + mjitChunkLimit(1) + function x() {} +} catch (e) {} +(function() { + for (let c in [0, 0, 0]) { + let c + for (y in decodeURI()) { + (function() { + c + }()) + } + } +}()) + diff --git a/js/src/jit-test/tests/basic/bug727921.js b/js/src/jit-test/tests/basic/bug727921.js new file mode 100644 index 0000000000..7c7e6418f4 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug727921.js @@ -0,0 +1,11 @@ +(function*() { + { + let d; + yield + } +})() +eval("\ + (function(){\ + schedulegc(5), 'a'.replace(/a/,function*(){yield})\ + })\ +")() diff --git a/js/src/jit-test/tests/basic/bug728086.js b/js/src/jit-test/tests/basic/bug728086.js new file mode 100644 index 0000000000..9d7a771026 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug728086.js @@ -0,0 +1,66 @@ +var expected = ''; +function TestCase(n, d, e, a) {} +function reportFailure (msg) {} +function toPrinted(value) { + value = value.replace(/\\\n/g, 'NL') + .replace(/[^\x20-\x7E]+/g, escapeString); +} +function escapeString (str) {} +function reportCompare (expected, actual, description) { + var expected_t = typeof expected; + var actual_t = typeof actual; + var output = ""; + var testcase = new TestCase("unknown-test-name", description, expected, actual); + reportFailure (description + " : " + output); +} +function enterFunc (funcName) { + return callStack.push(funcName); +} + try { + reportCompare(expectCompile, actualCompile, + summary + ': compile actual'); + } catch(ex) { } +var lfcode = new Array(); +lfcode.push("gczeal(2);\ +enterFunc ('test');\ +"); +lfcode.push("{}"); +lfcode.push("noexist.js"); +lfcode.push("var BUGNUMBER = 305064;\ +var summary = 'Tests the trim, trimRight and trimLeft methods';\ +var trimMethods = ['trim', 'trimLeft', 'trimRight'];\ +var whitespace = [\ + {s : '\\u0009', t : 'HORIZONTAL TAB'},\ + {s : '\\u200A', t : 'HAIR SPACE'},\ + ];\ +for (var j = 0; j < trimMethods.length; ++j)\ + var method = trimMethods[j];\ + reportCompare(true, true, 'Test skipped. String.prototype.' + method + ' is not supported');\ + str = '';\ + for (var i = 0; i < whitespace.length; ++i) {\ + var v = whitespace[i].s;\ + var t = (summary)[i].t;\ + v = v + v + v;\ + print('Test ' + method + ' with with leading whitespace. : ' + t);\ + actual = str[method]();\ + reportCompare(expected, actual, t + ':' + '\"' + toPrinted(str) + '\".' + method + '()');\ + str = v + 'a' + v;\ +}\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + if (file == "evaluate") { + } else { + loadFile(file); + } +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + switch (lfRunTypeId) { + } + } else { + eval(lfVarx); + } + } catch (lfVare) { } +} diff --git a/js/src/jit-test/tests/basic/bug728190.js b/js/src/jit-test/tests/basic/bug728190.js new file mode 100644 index 0000000000..0e2f29726e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug728190.js @@ -0,0 +1,24 @@ +// |jit-test| slow; + +function TestCase(n, d, e, a) {} +var lfcode = new Array(); +lfcode.push(""); +lfcode.push("\ + var summary = 'foo';\ + test();\ + function test() {\ + test(\"TEST-UNEXPECTED-FAIL | TestPerf | \" + summary);\ + }\ +"); +lfcode.push("gczeal(2);"); +lfcode.push("\ + new TestCase(TestFunction_3( \"P\", \"A\", \"S\", \"S\" ) +\"\");\ + new TestCase(TestFunction_4( \"F\", \"A\", (\"length\"), \"L\" ) +\"\");\ + function TestFunction_3( a, b, c, d, e ) {\ + TestFunction_3(arguments);\ + }\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + try { evaluate(file); } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/basic/bug728609.js b/js/src/jit-test/tests/basic/bug728609.js new file mode 100644 index 0000000000..cd6f088e79 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug728609.js @@ -0,0 +1,23 @@ +var lfcode = new Array(); +lfcode.push("\ +test();\ +function test() {\ + function removeAllProperties(o) {\ + bar() = thaw, patterns;\ + }\ + var o = { method: function() { this.first.method(); } };\ + o.first = { method: function() { removeAllProperties(o); } };\ + return o.method();\ +}\ +"); +lfcode.push("test();"); +gczeal(4); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file); +} +function loadFile(lfVarx) { + try { + evaluate(lfVarx); + } catch (lfVare) { } +} diff --git a/js/src/jit-test/tests/basic/bug730085.js b/js/src/jit-test/tests/basic/bug730085.js new file mode 100644 index 0000000000..f2f6cb6994 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug730085.js @@ -0,0 +1,6 @@ +load(libdir + "asserts.js"); +var calledToString = false; +assertThrowsInstanceOf(function () { Object.prototype.hasOwnProperty.call(null, + {toString: function () { calledToString = true; }}); }, + TypeError); +assertEq(calledToString, true); diff --git a/js/src/jit-test/tests/basic/bug730888.js b/js/src/jit-test/tests/basic/bug730888.js new file mode 100644 index 0000000000..5d328d6aa5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug730888.js @@ -0,0 +1,14 @@ + +(function() { + for (var i = 0; i < 64; ++i) { + var name; + switch (this) { + case 0: name = 'firstAttr'; break; + case 1: name = 'secondAttr'; + case 2: name = 'thirdAttr'; break; + } + switch (name) { + case 'firstAttr': assertEq(result, 'value'); break; + } + } +})(); diff --git a/js/src/jit-test/tests/basic/bug731642.js b/js/src/jit-test/tests/basic/bug731642.js new file mode 100644 index 0000000000..5459dfa657 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug731642.js @@ -0,0 +1,2 @@ +Object.defineProperty(Object.prototype, 1, {get: function() { this.foo++; return 23 }}); +assertEq([1,,].pop(), 23); diff --git a/js/src/jit-test/tests/basic/bug732693.js b/js/src/jit-test/tests/basic/bug732693.js new file mode 100644 index 0000000000..d82da1e24e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug732693.js @@ -0,0 +1,10 @@ +var res = 0; +var o = {__proto__: function() { res++; }}; + +function f() { + for (var i=0; i<70; i++) { + o.__proto__(); + } +} +f(); +assertEq(res, 70); diff --git a/js/src/jit-test/tests/basic/bug737384.js b/js/src/jit-test/tests/basic/bug737384.js new file mode 100644 index 0000000000..6ec87ec784 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug737384.js @@ -0,0 +1,10 @@ +a = evalcx(''); +for (var i = 0; i < 1000; i++) { + a[i] = i; +} +function foo(x) { + for (var i in x) + var summary = "Basic support for iterable objects and for-in"; +} +schedulegc(1234); +foo(a); diff --git a/js/src/jit-test/tests/basic/bug738841.js b/js/src/jit-test/tests/basic/bug738841.js new file mode 100644 index 0000000000..3429aea5b3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug738841.js @@ -0,0 +1,49 @@ +try { + for (let z = 0; z < 1; ++evalcx("[]", newGlobal())) {} +} catch (e) {} +try { + for (y in [schedulegc(58)]) { + b + } +} catch (e) {} +try { + e +} catch (e) {} +try { + (function() { + h + }()) +} catch (e) {} +try { + (function() { + this.m.f = function() {} + }()) +} catch (e) {} +try { + t() +} catch (e) {} +try { + p +} catch (e) {} +try { + gc() + p +} catch (e) {} +try { + (function() { + for (var v of m) {} + }()) +} catch (e) {} +try { + m +} catch (e) {} +try { + var f = function() { + { + print(new function(q) { return ("", s); }) + let u + } + }; + dis(f); + f(); +} catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug738846.js b/js/src/jit-test/tests/basic/bug738846.js new file mode 100644 index 0000000000..32f973bdc0 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug738846.js @@ -0,0 +1,49 @@ +try { + (function() { + var m + new ArrayBuffer() + var _ = t + var _2 = [] + }()) +} catch (e) {} +try { + for (y in [schedulegc(58)]) { + m + } +} catch (e) {} +try { + (function() { + true + }()) +} catch (e) {} +try { + (function() { + s + }()) +} catch (e) {} +try { + e +} catch (e) {} +try { + "" () +} catch (e) {} +try { + gc() + s +} catch (e) {} +try { + (function() { + for (v of m) {} + }()) +} catch (e) {} +try { + t +} catch (e) {} +try { + (function() { + "use strict"; + print(new function() { + r + }(this)) + }()) +} catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug739694-2.js b/js/src/jit-test/tests/basic/bug739694-2.js new file mode 100644 index 0000000000..41cc4b6e46 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug739694-2.js @@ -0,0 +1,8 @@ +try { + ({ + f: evalcx("evalcx(\"e\",newGlobal())", + newGlobal()) + }) +} catch (e) {} +gc() +gc() diff --git a/js/src/jit-test/tests/basic/bug743961.js b/js/src/jit-test/tests/basic/bug743961.js new file mode 100644 index 0000000000..6c1f253d46 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug743961.js @@ -0,0 +1,2 @@ +var n = (evalcx('lazy')); +try { var nbuf = serialize(n); } catch(e) {} // Don't crash diff --git a/js/src/jit-test/tests/basic/bug744285.js b/js/src/jit-test/tests/basic/bug744285.js new file mode 100644 index 0000000000..a1033f764a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug744285.js @@ -0,0 +1,71 @@ +// |jit-test| error: TypeError; +var TZ_DIFF = getTimeZoneDiff(); +var now = new Date; +var TZ_DIFF = getTimeZoneDiff(); +var now = new Date; +var MAX_UNIX_TIMET = 2145859200; +var RANGE_EXPANSION_AMOUNT = 60; +function tzOffsetFromUnixTimestamp(timestamp) { + new Date + } +function clearDSTOffsetCache(undesiredTimestamp) { + tzOffsetFromUnixTimestamp() + tzOffsetFromUnixTimestamp() + tzOffsetFromUnixTimestamp() + tzOffsetFromUnixTimestamp() + tzOffsetFromUnixTimestamp() + } +function computeCanonicalTZOffset(timestamp) { + clearDSTOffsetCache() + tzOffsetFromUnixTimestamp() + } +var TEST_TIMESTAMPS_SECONDS = [ + 0, + RANGE_EXPANSION_AMOUNT, + MAX_UNIX_TIMET, + ]; +var TEST_TIMESTAMPS = TEST_TIMESTAMPS_SECONDS.map(function(v) { }); +var CORRECT_TZOFFSETS = TEST_TIMESTAMPS.map(computeCanonicalTZOffset); +var TZ_DIFF = getTimeZoneDiff(); +var now = new Date; +var TZ_DIFF = getTimeZoneDiff(); +var now = new Date;function getTimeZoneDiff() { + new Date/60 +} +function check(b, desc) { + function classOf(obj) { + return Object.prototype.toString.call(obj); + } + function ownProperties(obj) { + return Object.getOwnPropertyNames(obj). + map(function (p) { return [p, Object.getOwnPropertyDescriptor(obj, p)]; }); + } + function isCloneable(pair) { } + function assertIsCloneOf(a, b, path) { + ca = classOf(a) + assertEq(ca, classOf(b), path) + assertEq(Object.getPrototypeOf(a), ca == "[object Object]" ? Object.prototype : Array.prototype, path) + pb = ownProperties(b).filter(isCloneable) + pa = ownProperties(a) + function byName(a, b) { return 0; } + byName + (pa.length, pb.length, "should see the same number of properties " + path) + for (var i = 0; i < pa.length; i++) { + gczeal(4) + } + } + banner = desc || String() + a = deserialize(serialize(b)) + var queue = [[a, b, banner]]; + while (queue.length) { + var triple = queue.shift(); + assertIsCloneOf(triple[0], triple[1], triple[2]) + } +} +check({x: 0.7, p: "forty-two", y: null, z: undefined}); +check(Object.prototype); +b=[, , 2, 3]; +b.expando=true; +b[5]=5; +b[0]=0;b[4]=4; +check(b)([, , , , , , 6]) diff --git a/js/src/jit-test/tests/basic/bug744287.js b/js/src/jit-test/tests/basic/bug744287.js new file mode 100644 index 0000000000..534b644e61 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug744287.js @@ -0,0 +1,6 @@ +function callbackfn(v) { + gczeal(4); + return arr[0] + (Uint8ClampedArray); +} +arr = [1,2,3,4,5]; +arr = arr.map(callbackfn); diff --git a/js/src/jit-test/tests/basic/bug744356.js b/js/src/jit-test/tests/basic/bug744356.js new file mode 100644 index 0000000000..9487f5f4d5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug744356.js @@ -0,0 +1,14 @@ +// |jit-test| error: ReferenceError; +gczeal(4); +function* gen() { + var c = [1, "x"]; + try { + yield c; + } finally { + gc(); + } +} +var iter = gen(); +for (i of iter) { + (SECTION)(); +} diff --git a/js/src/jit-test/tests/basic/bug745360.js b/js/src/jit-test/tests/basic/bug745360.js new file mode 100644 index 0000000000..7d17b722c6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug745360.js @@ -0,0 +1,2 @@ +// |jit-test| error: TypeError +newGlobal().eval("eval.arguments") diff --git a/js/src/jit-test/tests/basic/bug749039.js b/js/src/jit-test/tests/basic/bug749039.js new file mode 100644 index 0000000000..6461de7774 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug749039.js @@ -0,0 +1,11 @@ +// |jit-test| error: ReferenceError; +gczeal(4); +try { jsTestDriverEnd(); } catch(exc1) {} +evaluate("\ +schedulegc(10);\ +for(var i=0; i<3; i++) {\ + var obj = { first: 'first', second: 'second' };\ + for (var elem in obj) {}\ + x.push(count);\ +}\ +"); diff --git a/js/src/jit-test/tests/basic/bug749620.js b/js/src/jit-test/tests/basic/bug749620.js new file mode 100644 index 0000000000..75d11db362 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug749620.js @@ -0,0 +1,16 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +var v = [0, 0x7fffffff]; +v.sort(); + +assertEq(v[0], 0); +assertEq(v[1], 0x7fffffff); + +v = [0x7fffffff, 0]; +v.sort(); + +assertEq(v[0], 0); +assertEq(v[1], 0x7fffffff); diff --git a/js/src/jit-test/tests/basic/bug750307.js b/js/src/jit-test/tests/basic/bug750307.js new file mode 100644 index 0000000000..b60ad08941 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug750307.js @@ -0,0 +1,5 @@ +load(libdir + "asserts.js"); +var g = newGlobal(); +var a = g.RegExp("x"); +Object.defineProperty(a, "ignoreCase", {value: undefined}); +a.toString(); diff --git a/js/src/jit-test/tests/basic/bug754150.js b/js/src/jit-test/tests/basic/bug754150.js new file mode 100644 index 0000000000..c66c16dbc3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug754150.js @@ -0,0 +1,49 @@ +// |jit-test| error: TypeError; + +// String.prototype.replace takes too long time with gczeal(4) if +// --no-baseline --no-ion options. +if (typeof inJit == "function" && typeof inJit() == "string") { + assertEq(inJit(), "Baseline is disabled."); + // This test expects TypeError. + toPrinted(null); +} + +function printStatus (msg) {} +function toPrinted(value) { + value = value.replace(/\\n/g, 'NL') +} +function reportCompare (expected, actual, description) { + printStatus ("Expected value '" + toPrinted(expected) + "' matched actual value '" + toPrinted(actual) + "'"); +} +var UBound = 0; +var statusitems = []; +var actual = ''; +var actualvalues = []; +var expect= ''; +var expectedvalues = []; +testThis('x()'); +testThis('"abc"()'); +testThis('x()'); +testThis('Date(12345)()'); +testThis('x()'); +testThis('1()'); +testThis('x()'); +testThis('void(0)()'); +testThis('x()'); +testThis('[1,2,3,4,5](1)'); +gczeal(4); +testThis('x(1)'); +checkThis('(function (y) {return y+1;})("abc")'); +checkThis('f("abc")'); +function testThis(sInvalidSyntax) { + expectedvalues[UBound] = expect; + actualvalues[UBound] = actual; + UBound++; +} +function checkThis(sValidSyntax) { + for (var i=0; i", ">=", "in", "instanceof", + "<<", ">>", ">>>", + "+", "-", + "*", "/", "%", +]; + +var invalid_strict_funs = [ + function () { + "use strict" + , "not"; + }, + function () { + "use strict" + ? 1 : 0; + }, + function () { + "use strict" + .length; + }, + function () { + "use strict" + [0]; + }, + function () { + "use strict" + (); + }, + ...([]), + ...(binary_ops.map(op => Function("'use strict'\n " + op + " 'not'"))), +]; + +for (var f of invalid_strict_funs) { + f.caller; +} + + +var assignment_ops = [ + "=", "+=", "-=", + "|=", "^=", "&=", + "<<=", ">>=", ">>>=", + "*=", "/=", "%=", +]; + +var invalid_strict_funs_syntax_error = assignment_ops.map(op => ("'use strict'\n " + op + " 'not'")); + +// assignment with string literal as LHS is an early error, therefore we +// can only test for SyntaxError +for (var f of invalid_strict_funs_syntax_error) { + assertThrowsInstanceOf(function() { Function(f) }, SyntaxError); +} diff --git a/js/src/jit-test/tests/basic/bug792239.js b/js/src/jit-test/tests/basic/bug792239.js new file mode 100644 index 0000000000..0635acf114 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug792239.js @@ -0,0 +1,6 @@ +var f = String.prototype.m = function () { + return [this.m, this]; +}; +var a = "s".m(); +gczeal(4); +evaluate("for (a = 0; a < 13; a++) {}", { noScriptRval: true }); diff --git a/js/src/jit-test/tests/basic/bug794025.js b/js/src/jit-test/tests/basic/bug794025.js new file mode 100644 index 0000000000..c76eab73e5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug794025.js @@ -0,0 +1,15 @@ +// |jit-test| error:RangeError + +function getterFunction(v) { return "getter"; } +Object.defineProperty(Array.prototype, 1,{ + get: getterFunction, +}); +var N = (10000); +repeat_str("try { f(); } finally {\n", N), +repeat_str("}", ("" )); +function repeat_str(str, repeat_count) { + var arr = new Array(--repeat_count); + while (repeat_count != 0) + arr[--repeat_count] = str; + return str.concat.apply(str, arr); +} diff --git a/js/src/jit-test/tests/basic/bug794286.js b/js/src/jit-test/tests/basic/bug794286.js new file mode 100644 index 0000000000..a3c1a13cdd --- /dev/null +++ b/js/src/jit-test/tests/basic/bug794286.js @@ -0,0 +1,6 @@ +// |jit-test| error: TypeError +for (var i = 0; i < 1; i++) { + let y + if (undefined) continue + undefined.e +} diff --git a/js/src/jit-test/tests/basic/bug794947.js b/js/src/jit-test/tests/basic/bug794947.js new file mode 100644 index 0000000000..e8a2829da2 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug794947.js @@ -0,0 +1,10 @@ +function f(o) +{ + print(o instanceof String); +} + +var g = newGlobal(); +f(new Object()); +var o1 = g.eval('new Object()'); +var o2 = Object.create(o1); +f(o2); diff --git a/js/src/jit-test/tests/basic/bug797496.js b/js/src/jit-test/tests/basic/bug797496.js new file mode 100644 index 0000000000..d8bc1897c5 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug797496.js @@ -0,0 +1,8 @@ +// |jit-test| error: TypeError +var set = new Set(['a']); +var n = 5; +for (let v of set) { + if (n === 0) + break; + let g = set(new Set(0xffffffff, n), 1); +} diff --git a/js/src/jit-test/tests/basic/bug798678.js b/js/src/jit-test/tests/basic/bug798678.js new file mode 100644 index 0000000000..e68dae4d0c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug798678.js @@ -0,0 +1,10 @@ +var w = new WeakMap(); +var g = newGlobal(); +var k = g.eval('for (var i=0; i<100; i++) new Object(); var q = new Object(); q'); +w.set(k, {}); +k = null; + +gc(); +g.eval('q = null'); +gc(g); +gc(); diff --git a/js/src/jit-test/tests/basic/bug798834.js b/js/src/jit-test/tests/basic/bug798834.js new file mode 100644 index 0000000000..669fe20d34 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug798834.js @@ -0,0 +1,5 @@ +(function(start, stop, step) { + stop = start; + step = arguments[2]; + assertEq(stop, true); +})(true); diff --git a/js/src/jit-test/tests/basic/bug806522.js b/js/src/jit-test/tests/basic/bug806522.js new file mode 100644 index 0000000000..1507276c1a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug806522.js @@ -0,0 +1,7 @@ +load(libdir + "asserts.js"); + +var g = evalcx("lazy"); +assertThrowsInstanceOf( + () => evaluate("{ let eval; eval()}", {global: g}), + g.TypeError); // eval is not a function +assertEq(evaluate("{ let eval = parseInt; eval()}", {global: g}), NaN); diff --git a/js/src/jit-test/tests/basic/bug807623.js b/js/src/jit-test/tests/basic/bug807623.js new file mode 100644 index 0000000000..35c34d3cb3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug807623.js @@ -0,0 +1,12 @@ +var objectProxy = new Proxy({}, {}); +var functionProxy = new Proxy(function() {}, {}); + +assertEq(Object.prototype.toString.call(objectProxy), '[object Object]'); +assertEq(Object.prototype.toString.call(functionProxy), '[object Function]'); + +try { + Function.prototype.toString.call(objectProxy); + assertEq(true, false); +} catch (e) { + assertEq(!!/incompatible/.exec(e), true); +} diff --git a/js/src/jit-test/tests/basic/bug808067.js b/js/src/jit-test/tests/basic/bug808067.js new file mode 100644 index 0000000000..34abc2a11d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug808067.js @@ -0,0 +1,20 @@ +function TestCase(n, d, e, a) { + return this.reason = ''; +} +function reportCompare (expected, actual, description) { + var output = ""; + var testcase = new TestCase("unknown-test-name", description, expected, actual); + testcase.reason = output; +} +gcPreserveCode(); +var summary = 'return with argument and lazy generator detection'; +expect = "generator function foo returns a value"; +actual = (function (j) {}).message; +reportCompare(expect, actual, summary + ": 1"); +reportCompare(expect, actual, summary + ": 2"); +gcslice(1); +gcslice(2); +gc(); +var strings = [ (0), ]; +for (var i = 0; i < strings.length; i++) + reportCompare(expect, actual, summary + (5e1) + strings[i]); diff --git a/js/src/jit-test/tests/basic/bug808483.js b/js/src/jit-test/tests/basic/bug808483.js new file mode 100644 index 0000000000..9dd2be0293 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug808483.js @@ -0,0 +1,16 @@ +pSandbox = newGlobal(); +evalcx("\ + x = ArrayBuffer;\ + y = new Map();\ + x += 1;\ + w = x;\ + x += '0';\ + z = x;\ +", pSandbox); +evalcx("\ + x + '0';\ +", pSandbox); +evalcx("\ + y.delete(z);\ + w.slice(2);\ +", pSandbox) diff --git a/js/src/jit-test/tests/basic/bug817002.js b/js/src/jit-test/tests/basic/bug817002.js new file mode 100644 index 0000000000..e6839680bf --- /dev/null +++ b/js/src/jit-test/tests/basic/bug817002.js @@ -0,0 +1,13 @@ +gc() +evalcx("\ + if (!(\"gcslice\" in this))\ + gcslice = function() { };\ + array = new Uint8Array;\ + t0 = array.subarray();\ + gcslice(12); \ + array.subarray();\ + gc();\ + gc();\ + array.subarray().a = 1;\ + gc();", +newGlobal('')) diff --git a/js/src/jit-test/tests/basic/bug820124-1.js b/js/src/jit-test/tests/basic/bug820124-1.js new file mode 100644 index 0000000000..6b6ec5d7b9 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug820124-1.js @@ -0,0 +1,5 @@ +// Don't assert. +verifyprebarriers(); +r = /()()()\3/.test(); +gc(); +RegExp().test(); diff --git a/js/src/jit-test/tests/basic/bug820124-2.js b/js/src/jit-test/tests/basic/bug820124-2.js new file mode 100644 index 0000000000..a4a8dd9ecc --- /dev/null +++ b/js/src/jit-test/tests/basic/bug820124-2.js @@ -0,0 +1,3 @@ +// Don't assert. +'123456'.replace(/1(\d+)3/, ''); +RegExp.lastMatch.toString(); diff --git a/js/src/jit-test/tests/basic/bug820124-3.js b/js/src/jit-test/tests/basic/bug820124-3.js new file mode 100644 index 0000000000..1f0dfd0fa3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug820124-3.js @@ -0,0 +1,8 @@ +// Don't assert. +eval("\ + x = RegExp(\"()\", \"y\");\ + x.test();\ + x = {};\ +") +gc() +RegExp.$6 diff --git a/js/src/jit-test/tests/basic/bug820124-4.js b/js/src/jit-test/tests/basic/bug820124-4.js new file mode 100644 index 0000000000..606a1e498e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug820124-4.js @@ -0,0 +1,8 @@ +// Don't assert. +eval("\ + r = RegExp(\"(?!()(((!))))\", \"g\");\ + \"^\".replace(r, '');\ + r = (\"1+\")\ +") +gc() +RegExp.$8 diff --git a/js/src/jit-test/tests/basic/bug821850.js b/js/src/jit-test/tests/basic/bug821850.js new file mode 100644 index 0000000000..fb0819c7b6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug821850.js @@ -0,0 +1,9 @@ +load(libdir + "asserts.js"); + +m={} +Object.defineProperty(m, 'p', {value: 3}); +assertThrowsInstanceOf(function() {"use strict"; delete m.p;}, TypeError); + +x = new Proxy(m, {}) +assertEq(x.p, 3); +assertThrowsInstanceOf(function fun() {"use strict"; return delete x.p; }, TypeError); diff --git a/js/src/jit-test/tests/basic/bug824856.js b/js/src/jit-test/tests/basic/bug824856.js new file mode 100644 index 0000000000..d2c31d5798 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug824856.js @@ -0,0 +1,6 @@ +// |jit-test| error: TypeError +RegExp("(&)??\\1}").test("&D") +"xy".match(/((x)??){2}y/) +"\u66d6J".split(/((\u66d6)??){7}J/) +"2\"".match("(((2)??)+\")")() + diff --git a/js/src/jit-test/tests/basic/bug826581.js b/js/src/jit-test/tests/basic/bug826581.js new file mode 100644 index 0000000000..bfeade6106 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug826581.js @@ -0,0 +1,12 @@ +// Don't crash. + +try { + x = " () "; + for (var y = 0; y < 19; y++) { + x += x; + } +} catch (e) {} + +try { + "".replace(x, "", "gy"); +} catch (e) { } diff --git a/js/src/jit-test/tests/basic/bug827104.js b/js/src/jit-test/tests/basic/bug827104.js new file mode 100644 index 0000000000..a4ae50201f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug827104.js @@ -0,0 +1,14 @@ +function f() { + var a = []; + for (var i = 0; i < 1000; i++) { + a.x = {} + } + a[i][0] = 0; +} + +var e; +try { + f(); +} catch (error) {e = error;} +assertEq(e.constructor.name, "TypeError"); +assertEq(e.message.includes("a[i] is undefined"), true); diff --git a/js/src/jit-test/tests/basic/bug829795.js b/js/src/jit-test/tests/basic/bug829795.js new file mode 100644 index 0000000000..236b5e68d6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug829795.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError + +try { + x = []; + Array.prototype.forEach() +} catch (e) {} +x.forEach() diff --git a/js/src/jit-test/tests/basic/bug829813.js b/js/src/jit-test/tests/basic/bug829813.js new file mode 100644 index 0000000000..c3f9b145c8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug829813.js @@ -0,0 +1,6 @@ + +for (x in [0]) { + (function() { + return Object.propertyIsEnumerable + })().call([0], x) +} diff --git a/js/src/jit-test/tests/basic/bug829821.js b/js/src/jit-test/tests/basic/bug829821.js new file mode 100644 index 0000000000..9825e6e2b6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug829821.js @@ -0,0 +1,5 @@ +// |jit-test| error:TypeError + +x = []; +x.unshift(Uint8ClampedArray); +x.forEach(Array.prototype.push.bind(new Uint8ClampedArray)) diff --git a/js/src/jit-test/tests/basic/bug830045.js b/js/src/jit-test/tests/basic/bug830045.js new file mode 100644 index 0000000000..de1350f772 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug830045.js @@ -0,0 +1,6 @@ + +Array.prototype[1] = 'y'; +var a = [0, (8)]; +for (var i in a) { + delete a[1]; +} diff --git a/js/src/jit-test/tests/basic/bug830049.js b/js/src/jit-test/tests/basic/bug830049.js new file mode 100644 index 0000000000..641134a27f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug830049.js @@ -0,0 +1,12 @@ +// |jit-test| error: TypeError +load(libdir + "immutable-prototype.js"); + +Object.defineProperty(Object.prototype, "name", + { set(v) { throw new TypeError("hit name"); }, + enumerable: true, + configurable: true }); + +function TestCase(n) { + this.name = n; +} +new TestCase(); diff --git a/js/src/jit-test/tests/basic/bug830967.js b/js/src/jit-test/tests/basic/bug830967.js new file mode 100644 index 0000000000..3fe77edc60 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug830967.js @@ -0,0 +1,4 @@ +var x = Array.prototype.concat.call(Object.freeze([{}])); +assertEq(x.length, 1); +assertEq(0 in x, true); +assertEq(JSON.stringify(x[0]), "{}"); diff --git a/js/src/jit-test/tests/basic/bug831658.js b/js/src/jit-test/tests/basic/bug831658.js new file mode 100644 index 0000000000..ae7d6a5a13 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug831658.js @@ -0,0 +1,4 @@ +// Don't assert. +String.prototype.search = evalcx('').String.prototype.search +x = /./.test() +''.search(/()/) diff --git a/js/src/jit-test/tests/basic/bug832197-1.js b/js/src/jit-test/tests/basic/bug832197-1.js new file mode 100644 index 0000000000..4caf7cc2c8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug832197-1.js @@ -0,0 +1,4 @@ +// Don't assert. +''.search(evalcx("/(?:}?)/", undefined)) +gc() +gc() diff --git a/js/src/jit-test/tests/basic/bug832197-2.js b/js/src/jit-test/tests/basic/bug832197-2.js new file mode 100644 index 0000000000..b4e4ca47a1 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug832197-2.js @@ -0,0 +1,13 @@ +// Don't assert. +try { + var r = evalcx("new RegExp(\"\",\"\")", w); + var s = ""; + (s.search(r))(x) +} catch (e) {} + r = /()()()()/; +try { + for (let x = 0; x < 3; ++x) { + gc() + } +} catch (e) {} +var w diff --git a/js/src/jit-test/tests/basic/bug832203.js b/js/src/jit-test/tests/basic/bug832203.js new file mode 100644 index 0000000000..d850819b0d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug832203.js @@ -0,0 +1,11 @@ +// Don't assert. +gczeal(2,1); +eval("(function() { " + "\ +var g1 = newGlobal('same-compartment');\ +function test(str, f) {\ + var x = f(eval(str));\ + assertEq(x, f(g1.eval(str)));\ +}\ +test('new RegExp(\"1\")', function(r) { return assertEq('a1'.search(r), 1); });\ +" + " })();"); +eval("(function() { " + "" + " })();"); diff --git a/js/src/jit-test/tests/basic/bug836563.js b/js/src/jit-test/tests/basic/bug836563.js new file mode 100644 index 0000000000..1b1c610956 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug836563.js @@ -0,0 +1,5 @@ + +var x = {}; +Object.defineProperty(x, 0, { configurable: true, value: null }); +x.p = 0 +Object.defineProperty(x, 0, { value: 2 }); diff --git a/js/src/jit-test/tests/basic/bug836623.js b/js/src/jit-test/tests/basic/bug836623.js new file mode 100644 index 0000000000..d0d90dc780 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug836623.js @@ -0,0 +1,13 @@ + +x = [] +Object.defineProperty(x, 4, { + configurable: true +}) +Array.prototype.pop.call(x) +for (let y = 0; y < 9; ++y) { + Object.defineProperty(x, 7, { + configurable: true, + enumerable: (y != 2), + writable: true + }) +} diff --git a/js/src/jit-test/tests/basic/bug839420.js b/js/src/jit-test/tests/basic/bug839420.js new file mode 100644 index 0000000000..66b2c87ef8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug839420.js @@ -0,0 +1,17 @@ +function f() { + var x = undefined; + try { + [1, 2, 3].map(x); + assertEq(0, 1); + } catch(e) { + assertEq(e.toString().includes("x is not"), true); + } + + try { + [1, 2, 3].filter(x, 1, 2); + assertEq(0, 1); + } catch(e) { + assertEq(e.toString().includes("x is not"), true); + } +} +f(); diff --git a/js/src/jit-test/tests/basic/bug842425.js b/js/src/jit-test/tests/basic/bug842425.js new file mode 100644 index 0000000000..f951787768 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug842425.js @@ -0,0 +1,12 @@ +// |jit-test| error: TypeError + +function g() { + var a = []; + for (var i = 0; i < 10; i++) + a.push(i, 1.5); + for (var i = 0; i < 32 ; i++) { + print(i); + a[i].m = function() {} + } +} +g(); diff --git a/js/src/jit-test/tests/basic/bug842482.js b/js/src/jit-test/tests/basic/bug842482.js new file mode 100644 index 0000000000..79e71e0435 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug842482.js @@ -0,0 +1,2 @@ +var g = newGlobal(); +new g.DataView(new g.ArrayBuffer()); diff --git a/js/src/jit-test/tests/basic/bug842940.js b/js/src/jit-test/tests/basic/bug842940.js new file mode 100644 index 0000000000..015b18bb3e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug842940.js @@ -0,0 +1 @@ +try { for (let v of wrapWithProto(new Proxy({}, {}), [])) { } } catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug846080.js b/js/src/jit-test/tests/basic/bug846080.js new file mode 100644 index 0000000000..2cc363d685 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug846080.js @@ -0,0 +1,3 @@ +// |jit-test| error: TypeError +this.__defineSetter__("x", [].map); +evaluate('[x]="";'); diff --git a/js/src/jit-test/tests/basic/bug851635.js b/js/src/jit-test/tests/basic/bug851635.js new file mode 100644 index 0000000000..993fbb3131 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug851635.js @@ -0,0 +1,7 @@ + +gcPreserveCode() +try { + eval("({a1:1});e i") +} catch (e) {} +gc() +eval("({a1:1})") diff --git a/js/src/jit-test/tests/basic/bug851756.js b/js/src/jit-test/tests/basic/bug851756.js new file mode 100644 index 0000000000..fb98ed2b6f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug851756.js @@ -0,0 +1,3 @@ + +({ x: false })[String] = 7 +eval("[{x:3}]") diff --git a/js/src/jit-test/tests/basic/bug852016-2.js b/js/src/jit-test/tests/basic/bug852016-2.js new file mode 100644 index 0000000000..3efc589648 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug852016-2.js @@ -0,0 +1,8 @@ + +function* foo(str) { + var x = eval(str); yield x[0]; +} +for (var i = 0; i < 5; i++) + assertEq(foo("[4,5,6]").next().value, 4); +for (var i = 0; i < 5; i++) + assertEq(foo("arguments").next().value, "arguments"); diff --git a/js/src/jit-test/tests/basic/bug852016.js b/js/src/jit-test/tests/basic/bug852016.js new file mode 100644 index 0000000000..971d426a83 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug852016.js @@ -0,0 +1,9 @@ +//|jit-test| error: SyntaxError + +(function() { + x = "arguments"; + f = eval("(function(){return(c for (x in eval('print(arguments[0])')))})"); + for (e in f()) { + (function() {}); + } +})(3) diff --git a/js/src/jit-test/tests/basic/bug854124.js b/js/src/jit-test/tests/basic/bug854124.js new file mode 100644 index 0000000000..505ed2dfb6 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug854124.js @@ -0,0 +1,8 @@ +// Don't assert. +"p".match(/(p)/); +assertEq(RegExp.$1, "p"); +assertEq(RegExp.$2, ""); + +"x\ny\n".replace(/(^\n*)/, ""); +assertEq(RegExp.$1, ""); +assertEq(RegExp.$2, ""); diff --git a/js/src/jit-test/tests/basic/bug854137.js b/js/src/jit-test/tests/basic/bug854137.js new file mode 100644 index 0000000000..d1f6b69764 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug854137.js @@ -0,0 +1,6 @@ +// Don't assert. +try { + eval("function x(y = {\ + x: (7) ? 0 : yield(0)\ + }"); +} catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug855088.js b/js/src/jit-test/tests/basic/bug855088.js new file mode 100644 index 0000000000..9d1145616d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug855088.js @@ -0,0 +1,5 @@ + +(function (y) { + arguments.y = 2; + with (0) var arguments=5; +})(1); diff --git a/js/src/jit-test/tests/basic/bug858097.js b/js/src/jit-test/tests/basic/bug858097.js new file mode 100644 index 0000000000..9420eada4d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug858097.js @@ -0,0 +1,7 @@ +// |jit-test| allow-oom; allow-unhandlable-oom +gczeal(0); +function MyObject( value ) {} +gcparam("maxBytes", gcparam("gcBytes") + 4*(1)); +gczeal(4); +function test() {} +var obj = new test(); diff --git a/js/src/jit-test/tests/basic/bug862228.js b/js/src/jit-test/tests/basic/bug862228.js new file mode 100644 index 0000000000..c151d91543 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug862228.js @@ -0,0 +1,3 @@ +// |jit-test| error: SyntaxError + +({"":y=""}= diff --git a/js/src/jit-test/tests/basic/bug863084.js b/js/src/jit-test/tests/basic/bug863084.js new file mode 100644 index 0000000000..1bcb9cd477 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug863084.js @@ -0,0 +1,17 @@ +// |jit-test| error: too much recursion +function f(code) { + try { + eval(code) + } catch (e) {} + eval(code) +} +f("\ + z=evalcx('');\ + gc();\ + z.toString=(function(){\ + v=evaluate(\"(Math.atan2(\\\"\\\",this))\",{\ + global:z,catchTermination:this\ + });\ + });\ + String(z)\ +") diff --git a/js/src/jit-test/tests/basic/bug867946.js b/js/src/jit-test/tests/basic/bug867946.js new file mode 100644 index 0000000000..a673966f42 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug867946.js @@ -0,0 +1,7 @@ +// |jit-test| error: InternalError: too much recursion +b = {}; +b.__proto__ = evalcx("lazy"); +function g() { + g(b.toString()) +} +g(); diff --git a/js/src/jit-test/tests/basic/bug876226.js b/js/src/jit-test/tests/basic/bug876226.js new file mode 100644 index 0000000000..4fb779b4f9 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug876226.js @@ -0,0 +1,6 @@ +// |jit-test| error: SyntaxError +try { + evaluate("throw 3"); +} catch(e) {} + +evaluate("()", {}); diff --git a/js/src/jit-test/tests/basic/bug877378.js b/js/src/jit-test/tests/basic/bug877378.js new file mode 100644 index 0000000000..06d63c10ee --- /dev/null +++ b/js/src/jit-test/tests/basic/bug877378.js @@ -0,0 +1,18 @@ +evalcx("\ + let z = 'x';\ + for (var v of z) {\ + y = evaluate(\"Object.defineProperty(this,\\\"y\\\",\ + {get: function() {}}\ + );\",\ + {catchTermination: true}\ + );\ + }", + newGlobal('') +) + +evalcx("\ + for (x = 0; x < 1; ++x) { \ + v = evaluate(\"gc\",{ \ + })\ + }\ +", newGlobal('')); diff --git a/js/src/jit-test/tests/basic/bug880377.js b/js/src/jit-test/tests/basic/bug880377.js new file mode 100644 index 0000000000..4332bd2a94 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug880377.js @@ -0,0 +1,10 @@ +var actual = ''; +var obj0 = {} +obj2 = {}; +obj2['b'+1] = 1; +if (actual[0] != 0[0]) + throw new i(); +for (var k in obj2) { + for (var apply in obj0) + ++count; +} \ No newline at end of file diff --git a/js/src/jit-test/tests/basic/bug882416.js b/js/src/jit-test/tests/basic/bug882416.js new file mode 100644 index 0000000000..48dde94163 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug882416.js @@ -0,0 +1,5 @@ +// |jit-test| error: SyntaxError +Error.prototype.toString = Function; +evaluate("n f", { + noScriptRval: true, +}); diff --git a/js/src/jit-test/tests/basic/bug883523.js b/js/src/jit-test/tests/basic/bug883523.js new file mode 100644 index 0000000000..c448b70c91 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug883523.js @@ -0,0 +1 @@ +if(1) /a/.test("a"); // should not be a SyntaxError. diff --git a/js/src/jit-test/tests/basic/bug883623.js b/js/src/jit-test/tests/basic/bug883623.js new file mode 100644 index 0000000000..d5599fb1f9 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug883623.js @@ -0,0 +1,7 @@ + +(function() { + eval("\ + arguments.valueOf();\ + with (function(){}){};\ + "); +})() \ No newline at end of file diff --git a/js/src/jit-test/tests/basic/bug884920.js b/js/src/jit-test/tests/basic/bug884920.js new file mode 100644 index 0000000000..7f5737d30f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug884920.js @@ -0,0 +1,7 @@ +// |jit-test| error:SyntaxError + +function testcase({}, a = b, ... x) { + "use strict"; + function f() { }; + with ( f(3) ); +} diff --git a/js/src/jit-test/tests/basic/bug886803.js b/js/src/jit-test/tests/basic/bug886803.js new file mode 100644 index 0000000000..c89e9bce9c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug886803.js @@ -0,0 +1,3 @@ + +f = Function("with({}) { var i; }"); +f(); diff --git a/js/src/jit-test/tests/basic/bug908915.js b/js/src/jit-test/tests/basic/bug908915.js new file mode 100644 index 0000000000..a35a08bed1 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug908915.js @@ -0,0 +1,47 @@ +// |jit-test| error: 42; skip-if: getBuildConfiguration("wasi") +load(libdir + "immutable-prototype.js"); + +// Suppress the large quantity of output on stdout (eg from calling +// dumpHeap()). +os.file.redirect(null); + +var ignorelist = { + 'quit': true, + 'crash': true, + 'readline': true, + 'terminate': true, + 'nukeAllCCWs': true, + 'cacheIRHealthReport': true, + 'getInnerMostEnvironmentObject': true, + 'getEnclosingEnvironmentObject': true, + 'getEnvironmentObjectType' : true, +}; + +function f(y) {} +for (let e of Object.values(newGlobal())) { + if (e.name in ignorelist) + continue; + print(e.name); + try { + e(); + } catch (r) {} +} +(function() { + arguments; + if (globalPrototypeChainIsMutable()) + Object.prototype.__proto__ = newGlobal() + function f(y) { + y() + } + var arr = []; + arr.__proto__ = newGlobal(); + for (b of Object.values(arr)) { + if (b.name in ignorelist) + continue; + try { + f(b) + } catch (e) {} + } +})(); + +throw 42; diff --git a/js/src/jit-test/tests/basic/bug911368.js b/js/src/jit-test/tests/basic/bug911368.js new file mode 100644 index 0000000000..3006155f25 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug911368.js @@ -0,0 +1,10 @@ +// |jit-test| +(function (stdlib, heap) { + "use asm"; + function f(i0) { + i0 = i0 | 0; + switch (0xc << (0xa % 1)) { + case -2: + }; + } +})() diff --git a/js/src/jit-test/tests/basic/bug913445.js b/js/src/jit-test/tests/basic/bug913445.js new file mode 100644 index 0000000000..c6d1d74da3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug913445.js @@ -0,0 +1,19 @@ +// |jit-test| skip-if: !this.uneval + +// uneval works on objects with no callable .toSource method. + +var obj = Object.create(null); +assertEq(uneval(obj), "({})"); +assertEq(Function.prototype.toSource.call(obj), "({})"); +obj.x = 1; +obj.y = 2; +assertEq(uneval(obj), "({x:1, y:2})"); + +var d = new Date(); +delete Date.prototype.toSource; +assertEq(uneval(d), "({})"); + +delete Object.prototype.toSource; +assertEq(uneval({p: 2+2}), "({p:4})"); + +assertEq(uneval({toSource: [0]}), "({toSource:[0]})"); diff --git a/js/src/jit-test/tests/basic/bug920484.js b/js/src/jit-test/tests/basic/bug920484.js new file mode 100644 index 0000000000..34c1ff6a76 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug920484.js @@ -0,0 +1,27 @@ +load(libdir + "asserts.js"); + +// Add an invalid "localeMatcher" option to Object.prototype, the exact value does not matter, +// any value except "best fit" or "lookup" is okay. +Object.prototype.localeMatcher = "invalid matcher option"; + +// The Intl API may not be available in the testing environment. +if (this.hasOwnProperty("Intl")) { + // Intl constructors still work perfectly fine. The default options object doesn't inherit + // from Object.prototype and the invalid "localeMatcher" value from Object.prototype isn't + // consulted. + new Intl.Collator().compare("a", "b"); + new Intl.NumberFormat().format(10); + new Intl.DateTimeFormat().format(new Date); + + // If an explicit "localeMatcher" option is given, the default from Object.prototype is ignored. + new Intl.Collator(void 0, {localeMatcher: "lookup"}).compare("a", "b"); + new Intl.NumberFormat(void 0, {localeMatcher: "lookup"}).format(10); + new Intl.DateTimeFormat(void 0, {localeMatcher: "lookup"}).format(new Date); + + delete Object.prototype.localeMatcher; + + // After removing the default option from Object.prototype, everything still works as expected. + new Intl.Collator().compare("a", "b"); + new Intl.NumberFormat().format(10); + new Intl.DateTimeFormat().format(new Date); +} diff --git a/js/src/jit-test/tests/basic/bug934789-1.js b/js/src/jit-test/tests/basic/bug934789-1.js new file mode 100644 index 0000000000..3b290e135b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug934789-1.js @@ -0,0 +1,13 @@ +if (typeof dis === "function") { + (function() { + function foo() {} + + dis(function bar(e) { + try { + (function() { e; }); + } catch (e) { + foo(); + } + }); + }()); +} diff --git a/js/src/jit-test/tests/basic/bug934789-2.js b/js/src/jit-test/tests/basic/bug934789-2.js new file mode 100644 index 0000000000..5272d63e01 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug934789-2.js @@ -0,0 +1,15 @@ +load(libdir + "asserts.js"); +assertThrowsInstanceOf( + function() { + function foo() {} + foo = null; + (function bar(e) { + try { + (function() { e; }); + throw 1; + } catch (e) { + foo(); + } + })(); + }, + TypeError); diff --git a/js/src/jit-test/tests/basic/bug934997.js b/js/src/jit-test/tests/basic/bug934997.js new file mode 100644 index 0000000000..91d81f0294 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug934997.js @@ -0,0 +1,30 @@ +function test1() { + var BUGNUMBER = ''; + var summary = ''; + var actual = ''; + test(BUGNUMBER); + function test() { + try { + (function () { eval("'foo'.b()", arguments) })(); + } catch(ex) { + actual = ex + ''; + } + } + assertEq(actual, 'TypeError: "foo".b is not a function'); +} +test1(); + +function test2() { + var BUGNUMBER = ''; + var summary = ''; + function g() { + 'use strict'; + try { + eval('function foo() { var a, arguments, b;}'); + } catch (x) { + return (x instanceof SyntaxError); + } + }; + assertEq(g(), true); +} +test2(); diff --git a/js/src/jit-test/tests/basic/bug935294.js b/js/src/jit-test/tests/basic/bug935294.js new file mode 100644 index 0000000000..c6dfc36e7e --- /dev/null +++ b/js/src/jit-test/tests/basic/bug935294.js @@ -0,0 +1,5 @@ +// |jit-test| error: ReferenceError +for (var c in foo) + try { + throw new Error(); + } catch (e) {} diff --git a/js/src/jit-test/tests/basic/bug937089.js b/js/src/jit-test/tests/basic/bug937089.js new file mode 100644 index 0000000000..09eedbe030 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug937089.js @@ -0,0 +1,10 @@ + +function test1() { + eval("with (arguments) var arguments = 0;"); +} +test1(); + +function test2() { + eval("eval('with (arguments) var arguments = 0;')"); +} +test2(); diff --git a/js/src/jit-test/tests/basic/bug942390.js b/js/src/jit-test/tests/basic/bug942390.js new file mode 100644 index 0000000000..9b661a4f44 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug942390.js @@ -0,0 +1,21 @@ +load(libdir + "immutable-prototype.js"); + +var count = 0; +if (globalPrototypeChainIsMutable()) { + Object.defineProperty(__proto__, "__iterator__", { + get: (function() { + count++; + }) + }); +} else { + count = 7; +} + +if (globalPrototypeChainIsMutable()) + __proto__ = (function(){}); + +for (var m = 0; m < 7; ++m) { + for (var a in 6) {} +} + +assertEq(count, 7); diff --git a/js/src/jit-test/tests/basic/bug943126.js b/js/src/jit-test/tests/basic/bug943126.js new file mode 100644 index 0000000000..319274fb2f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug943126.js @@ -0,0 +1,16 @@ +// Test fast-path for String.split(""). + +load(libdir + 'eqArrayHelper.js'); + +assertEqArray("".split(""), []); +assertEqArray("a".split(""), ["a"]); +assertEqArray("abc".split(""), ["a", "b", "c"]); + +assertEqArray("abcd".split("", 2), ["a", "b"]); +assertEqArray("abcd".split("", 0), []); +assertEqArray("abcd".split("", -1), ["a", "b", "c", "d"]); + +// Note: V8 disagrees about this one, but we are correct by ecma-262 15.5.4.14 part 9. +assertEqArray("abcd".split(undefined, 0), []); + +assertEqArray("abcd".split(undefined, 1), ["abcd"]); diff --git a/js/src/jit-test/tests/basic/bug950725.js b/js/src/jit-test/tests/basic/bug950725.js new file mode 100644 index 0000000000..c036ee0410 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug950725.js @@ -0,0 +1,12 @@ +function test() { + + T[g].act +} +gc(); +var c = 0; +for (var i = 0; i < 20; test['$+']) { + if (c++ > 110) + break; + try { + __count__(f(2), 1); + } catch (e) {} +} diff --git a/js/src/jit-test/tests/basic/bug951213.js b/js/src/jit-test/tests/basic/bug951213.js new file mode 100644 index 0000000000..37454491dd --- /dev/null +++ b/js/src/jit-test/tests/basic/bug951213.js @@ -0,0 +1,8 @@ + +enableShellAllocationMetadataBuilder(); +function foo(x, y) { + this.g = x + y; +} +var a = 0; +var b = { valueOf: function() { return Object.defineProperty(Object.prototype, 'g', {}); } }; +var c = new foo(a, b); diff --git a/js/src/jit-test/tests/basic/bug951346.js b/js/src/jit-test/tests/basic/bug951346.js new file mode 100644 index 0000000000..c1a006264d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug951346.js @@ -0,0 +1,3 @@ + +enableShellAllocationMetadataBuilder(); +eval(`(${JSON.stringify({'-1':true})})`); diff --git a/js/src/jit-test/tests/basic/bug951632.js b/js/src/jit-test/tests/basic/bug951632.js new file mode 100644 index 0000000000..9c5c17e8ee --- /dev/null +++ b/js/src/jit-test/tests/basic/bug951632.js @@ -0,0 +1,9 @@ +enableShellAllocationMetadataBuilder(); +var g = newGlobal({newCompartment: true}) +g.eval("function f(a) { return h(); }"); +g.h = function () { + return [1, 2, 3]; +}; +var o = getAllocationMetadata(g.f(5)); +assertEq(o.stack.length, 1); +assertEq(o.stack[0], g.h); diff --git a/js/src/jit-test/tests/basic/bug970643.js b/js/src/jit-test/tests/basic/bug970643.js new file mode 100644 index 0000000000..758754fa0a --- /dev/null +++ b/js/src/jit-test/tests/basic/bug970643.js @@ -0,0 +1,18 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") + +setJitCompilerOption("baseline.warmup.trigger", 1); +setJitCompilerOption("ion.warmup.trigger", 2); + +// The timepout function is made to trigger the interruption callback. The +// interruption callback will protect the code while a GC might be +// marking/updating pointers in it. +var x = 0; +function interrupt_gc() { + if (x++ >= 20) + return; + timeout(0.1, interrupt_gc); + while(x < 20) + gc(); +} + +interrupt_gc(); diff --git a/js/src/jit-test/tests/basic/bug972961.js b/js/src/jit-test/tests/basic/bug972961.js new file mode 100644 index 0000000000..10df12cad8 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug972961.js @@ -0,0 +1,40 @@ +// Bug 972961 - Test compiler with very long chains of property accesses + +// Return true if we can compile a chain of n property accesses, +// false if we cannot. Throw if compilation fails in an unexpected way. +function test(n) { + print("testing " + n); + try { + eval('if (false) {' + Array(n).join(("a.")) + 'a}'); + } catch (exc) { + // Expected outcome if the expression is too deeply nested is an InternalError. + if (!(exc instanceof InternalError)) + throw exc; + print(exc.message); + return false; + } + print("no exception"); + return true; +} + +// Find out how long a chain is enough to break the compiler. +var n = 4, LIMIT = 0x000fffff; +var lo = 1, hi = 1; +while (n <= LIMIT && test(n)) { + lo = n; + n *= 4; +} + +// Using binary search, find a pass/fail boundary (in order to +// test the edge case). +if (n <= LIMIT) { + hi = n; + while (lo !== hi) { + var mid = Math.floor((lo + hi) / 2); + if (test(mid)) + lo = mid + 1; + else + hi = mid; + } + print((lo - 1) + " attributes should be enough for anyone"); +} diff --git a/js/src/jit-test/tests/basic/bug976446.js b/js/src/jit-test/tests/basic/bug976446.js new file mode 100644 index 0000000000..e99e221311 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug976446.js @@ -0,0 +1,16 @@ + +try { + +function f() {} +f("".match(/(?:(?=g)).{2147483648,}/ + (/[]/)), null); + +} catch (e) {} // Yarr throws on the above regexp + +var re = new RegExp("a[\x01-\\xDE]+M", "gi"); +re.exec(""); + +var re = new RegExp("a[\x01-\\u00b8]+?c", "gi"); +re.exec(""); + +var re = new RegExp("a[\x01-\\u00f8]?c", "gi"); +re.exec(""); diff --git a/js/src/jit-test/tests/basic/bug980013.js b/js/src/jit-test/tests/basic/bug980013.js new file mode 100644 index 0000000000..d84295285b --- /dev/null +++ b/js/src/jit-test/tests/basic/bug980013.js @@ -0,0 +1,9 @@ + +x = new Uint8ClampedArray; +x.__proto__ = {}; +Object.defineProperty(this, "y", { + get: function() { + return x.length; + } +}); +assertEq(y, undefined); diff --git a/js/src/jit-test/tests/basic/bug980450.js b/js/src/jit-test/tests/basic/bug980450.js new file mode 100644 index 0000000000..afe1c5fac3 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug980450.js @@ -0,0 +1,4 @@ + +var f32 = new Float32Array(1); +for(var n = 100; n; --n) + f32.hasOwnProperty(4) diff --git a/js/src/jit-test/tests/basic/bug984766.js b/js/src/jit-test/tests/basic/bug984766.js new file mode 100644 index 0000000000..bd44fc31bc --- /dev/null +++ b/js/src/jit-test/tests/basic/bug984766.js @@ -0,0 +1,17 @@ + +for (var i = 0; i < 10; i++) { + x = new ArrayBuffer(4) + x.f = (function() {}) + new Uint16Array(x).set(JSON.parse) + gcslice() +} + +if (!this.SharedArrayBuffer) + quit(0); + +for (var i = 0; i < 10; i++) { + x = new SharedArrayBuffer(4) + x.f = (function() {}) + new Uint16Array(x).set(JSON.parse) + gcslice() +} diff --git a/js/src/jit-test/tests/basic/builtinLocals.js b/js/src/jit-test/tests/basic/builtinLocals.js new file mode 100644 index 0000000000..032b801d00 --- /dev/null +++ b/js/src/jit-test/tests/basic/builtinLocals.js @@ -0,0 +1,35 @@ + +/* Resolve 'arguments' and the name of the function itself in the presence of such local variables. */ + +function f() { + return typeof arguments; + function arguments() { + return 7; + } +} +assertEq(f(), "function"); + +function g() { + var arguments = 0; + return typeof arguments; +} +assertEq(g(), "number"); + +function h() { + return typeof h; + function h() { + return 7; + } +} +assertEq(h(), "function"); + +function i() { + return typeof i; + var i; +} +assertEq(i(), "undefined"); + +function j() { + return typeof j; +} +assertEq(j(), "function"); diff --git a/js/src/jit-test/tests/basic/call-construct-hook.js b/js/src/jit-test/tests/basic/call-construct-hook.js new file mode 100644 index 0000000000..ed6cb23e01 --- /dev/null +++ b/js/src/jit-test/tests/basic/call-construct-hook.js @@ -0,0 +1,100 @@ +// Tests for invoking JSClass call/construct hooks. + +function testBasic() { + let obj = {fun: newObjectWithCallHook()}; + for (var i = 0; i < 1000; i++) { + let res = obj.fun(1, 2, 3); + assertEq(res.this, obj); + assertEq(res.callee, obj.fun); + assertEq(JSON.stringify(res.arguments), "[1,2,3]"); + assertEq(res.newTarget, undefined); + + res = new obj.fun(1, 2, 3); + assertEq(res.this, ""); + assertEq(res.callee, obj.fun); + assertEq(JSON.stringify(res.arguments), "[1,2,3]"); + assertEq(res.newTarget, obj.fun); + } +} +testBasic(); + +function testSpread() { + let obj = {fun: newObjectWithCallHook()}; + for (var i = 0; i < 1000; i++) { + let res = obj.fun(...[1, 2, 3]); + assertEq(res.this, obj); + assertEq(res.callee, obj.fun); + assertEq(JSON.stringify(res.arguments), "[1,2,3]"); + assertEq(res.newTarget, undefined); + + res = new obj.fun(...[1, 2, 3]); + assertEq(res.this, ""); + assertEq(res.callee, obj.fun); + assertEq(JSON.stringify(res.arguments), "[1,2,3]"); + assertEq(res.newTarget, obj.fun); + } +} +testSpread(); + +function testNewTarget() { + let obj = newObjectWithCallHook(); + let newTargetVal = function() {}; + for (var i = 0; i < 1000; i++) { + let res = Reflect.construct(obj, [], newTargetVal); + assertEq(res.this, ""); + assertEq(res.callee, obj); + assertEq(res.arguments.length, 0); + assertEq(res.newTarget, newTargetVal); + } +} +testNewTarget(); + +function testRealmSwitch() { + // We currently switch to the callable's realm for class hook calls (similar to + // JS function calls). This might change at some point, but for now assert the + // returned object's realm matches that of the callee. + + let g = newGlobal({sameCompartmentAs: this}); + let obj = g.newObjectWithCallHook(); + assertEq(objectGlobal(obj), g); + + for (var i = 0; i < 1000; i++) { + let res = obj(1, 2); + assertEq(objectGlobal(res), g); + assertEq(res.this, undefined); + assertEq(res.callee, obj); + assertEq(JSON.stringify(res.arguments), "[1,2]"); + + res = new obj(1, 2); + assertEq(objectGlobal(res), g); + assertEq(res.this, ""); + assertEq(res.callee, obj); + assertEq(JSON.stringify(res.arguments), "[1,2]"); + assertEq(res.newTarget, obj); + } +} +testRealmSwitch(); + +function testCrossCompartmentWrapper() { + // Call/construct hooks can be called through cross-compartment wrappers. + + let g = newGlobal({newCompartment: true}); + let obj = g.newObjectWithCallHook(); + assertEq(isProxy(obj), true); // It's a CCW. + + for (var i = 0; i < 1000; i++) { + let res = obj(1, 2); + assertEq(isProxy(res), true); + assertEq(res.this, undefined); + assertEq(res.callee, obj); + assertEq(JSON.stringify(res.arguments), "[1,2]"); + + res = new obj(1, 2); + assertEq(isProxy(res), true); + assertEq(res.this, ""); + assertEq(res.callee, obj); + assertEq(JSON.stringify(res.arguments), "[1,2]"); + assertEq(res.newTarget, obj); + } +} +testCrossCompartmentWrapper(); diff --git a/js/src/jit-test/tests/basic/call.js b/js/src/jit-test/tests/basic/call.js new file mode 100644 index 0000000000..8e6b647b60 --- /dev/null +++ b/js/src/jit-test/tests/basic/call.js @@ -0,0 +1,28 @@ +function glob_f1() { + return 1; +} +function glob_f2() { + return glob_f1(); +} +function call() +{ + var q1 = 0, q2 = 0, q3 = 0, q4 = 0, q5 = 0; + var o = {}; + function f1() { + return 1; + } + function f2(f) { + return f(); + } + o.f = f1; + for (var i = 0; i < 100; ++i) { + q1 += f1(); + q2 += f2(f1); + q3 += glob_f1(); + q4 += o.f(); + q5 += glob_f2(); + } + var ret = String([q1, q2, q3, q4, q5]); + return ret; +} +assertEq(call(), "100,100,100,100,100"); diff --git a/js/src/jit-test/tests/basic/call2.js b/js/src/jit-test/tests/basic/call2.js new file mode 100644 index 0000000000..9e68bb20ae --- /dev/null +++ b/js/src/jit-test/tests/basic/call2.js @@ -0,0 +1,13 @@ +function g(x) { + if ((x & 1) == 1) return 1; + return 2; +} + +function f(n) { + var q = 0; + for (var i = 0; i < n; i++) + q += g(i); + return q; +} + +assertEq(f(1000), 1500); diff --git a/js/src/jit-test/tests/basic/change-code-write-protect.js b/js/src/jit-test/tests/basic/change-code-write-protect.js new file mode 100644 index 0000000000..d44a30a3b1 --- /dev/null +++ b/js/src/jit-test/tests/basic/change-code-write-protect.js @@ -0,0 +1,3 @@ +// |jit-test| error:Can't change code write protection at runtime +var value = getJitCompilerOptions()["write-protect-code"]; +setJitCompilerOption("write-protect-code", Number(!value)); diff --git a/js/src/jit-test/tests/basic/compression-random-data.js b/js/src/jit-test/tests/basic/compression-random-data.js new file mode 100644 index 0000000000..fa416142d3 --- /dev/null +++ b/js/src/jit-test/tests/basic/compression-random-data.js @@ -0,0 +1,26 @@ +// Deterministic Math.random, from Octane. +var seed = 49734321; +function rand() { + // Robert Jenkins' 32 bit integer hash function. + seed = ((seed + 0x7ed55d16) + (seed << 12)) & 0xffffffff; + seed = ((seed ^ 0xc761c23c) ^ (seed >>> 19)) & 0xffffffff; + seed = ((seed + 0x165667b1) + (seed << 5)) & 0xffffffff; + seed = ((seed + 0xd3a2646c) ^ (seed << 9)) & 0xffffffff; + seed = ((seed + 0xfd7046c5) + (seed << 3)) & 0xffffffff; + seed = ((seed ^ 0xb55a4f09) ^ (seed >>> 16)) & 0xffffffff; + return (seed & 0xfffffff) / 0x10000000; +} +var randomS = ""; +function test(len) { + const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + var s = "var data = '"; + while (randomS.length < len) { + randomS += chars.charAt((rand() * chars.length)|0); + } + s += randomS; + s += "'; function f() {}; assertEq(f.toString(), 'function f() {}');"; + eval(s); +} +for (var i=32740; i<32780; i += 5) { + test(i); +} diff --git a/js/src/jit-test/tests/basic/constAssignError.js b/js/src/jit-test/tests/basic/constAssignError.js new file mode 100644 index 0000000000..3e93fb464c --- /dev/null +++ b/js/src/jit-test/tests/basic/constAssignError.js @@ -0,0 +1,23 @@ +// Can't assign to const is a runtime TypeError + +load(libdir + 'asserts.js'); + +function assertTypeError(str) { + assertThrowsInstanceOf(function () { eval(str); }, TypeError); +} + +assertTypeError("(function() { const x = 3; (() => x++)(); return x })()"); +assertTypeError("(function() { const x = 3; (() => x++)(); return x++ })()"); +assertTypeError("(function() { const x = 2; (() => x++)(); return ++x })()"); +assertTypeError("(function() { const x = 2; (() => x++)(); return x += 1 })()"); + +assertTypeError("(function() { const x = 3; x = 1; return (function() { return x})() })()"); +assertTypeError("(function() { const x = 3; x = 1; return (function() { return x})() })()"); +assertTypeError("(function() { const x = 3; x++; return (function() { return x})() })()"); +assertTypeError("(function() { const x = 3; ++x; return (function() { return x})() })()"); +assertTypeError("(function() { const x = 3; x--; return (function() { return x})() })()"); +assertTypeError("(function() { const x = 3; --x; return (function() { return x})() })()"); +assertTypeError("(function() { const x = 3; x += 1; return (function() { return x})() })()"); +assertTypeError("(function() { const x = 3; x -= 1; return (function() { return x})() })()"); + +assertTypeError("(function() { const x = 3; [x] = [1]; })()"); diff --git a/js/src/jit-test/tests/basic/constGlobalAssignError.js b/js/src/jit-test/tests/basic/constGlobalAssignError.js new file mode 100644 index 0000000000..87c7b78f04 --- /dev/null +++ b/js/src/jit-test/tests/basic/constGlobalAssignError.js @@ -0,0 +1,3 @@ +// |jit-test| error: TypeError + +const x = 1; x = 2; diff --git a/js/src/jit-test/tests/basic/constant-folding-1.js b/js/src/jit-test/tests/basic/constant-folding-1.js new file mode 100644 index 0000000000..851a0a804a --- /dev/null +++ b/js/src/jit-test/tests/basic/constant-folding-1.js @@ -0,0 +1,45 @@ +function bytecode(f) { + if (typeof disassemble !== "function") + return "unavailable"; + var d = disassemble(f); + // Remove line numbers. + d = d.replace(/(\n\d{5}:).*\d+/g, "$1"); + return d.slice(d.indexOf("main:"), d.indexOf("\n\n")); +} +assertEq(bytecode(() => "hello" + "world"), + bytecode(() => "helloworld")); +assertEq(bytecode(() => 2 + "2" + "2"), + bytecode(() => "222")); +assertEq(bytecode(() => "x" + "3"), + bytecode(() => "x3")); + +var s = "hoge"; +assertEq(bytecode(() => "fo" + "o" + s + "ba" + "r"), + bytecode(() => "foo" + s + "bar")); +assertEq(bytecode(() => "fo" + "o" + 1 + s + 1 + "ba" + "r"), + bytecode(() => "foo1" + s + "1bar")); +assertEq(bytecode(() => 1 + (2 * 2) + "x"), + bytecode(() => 5 + "x")); +assertEq(s + 1 + 2, "hoge12"); +assertEq((() => s + 1 + 2)(), "hoge12"); + +// SpiderMonkey knows that 1 + 1 == "11". +assertEq(bytecode(() => "x" + s + 1 + 1), + bytecode(() => "x" + s + "11")); + +var n = 5; +assertEq(1 + n + 1 + "ba" + "r", "7bar"); +assertEq(1 + 2 + {valueOf: () => 3, toString: () => 'x'} + 4 + 5,15); +assertEq(1+2+n,8); +assertEq(bytecode(() => 1 + 2 + n + 1 + 2), + bytecode(() => 3 + n + 1 + 2)); +assertEq(1 + 2 + n + 1 + 2, 11); +assertEq(bytecode(() => 1 + 2 + s + 1 + 2), + bytecode(() => 3 + s + 1 + 2)); +assertEq(1 + 2 + s + 1 + 2, "3hoge12"); + +assertEq(bytecode(() => ["a" + "b" + n]), + bytecode(() => ["ab" + n])); +var a = ["a" + "b" + n]; +assertEq(a[0], "ab5"); + diff --git a/js/src/jit-test/tests/basic/construct-primitive-Function.prototype.prototype.js b/js/src/jit-test/tests/basic/construct-primitive-Function.prototype.prototype.js new file mode 100644 index 0000000000..0b83325cfe --- /dev/null +++ b/js/src/jit-test/tests/basic/construct-primitive-Function.prototype.prototype.js @@ -0,0 +1,5 @@ +Object.defineProperty(Function.prototype, "prototype", { + get: function() { throw 17; }, + set: function() { throw 42; } +}); +this.hasOwnProperty("Intl"); diff --git a/js/src/jit-test/tests/basic/consume-interpreter-stack-bug1473289.js b/js/src/jit-test/tests/basic/consume-interpreter-stack-bug1473289.js new file mode 100644 index 0000000000..13c3c88dd1 --- /dev/null +++ b/js/src/jit-test/tests/basic/consume-interpreter-stack-bug1473289.js @@ -0,0 +1,495 @@ +// |jit-test| slow; allow-overrecursed + +(function f(x) { + f(x - 1); + Array.prototype.unshift.call(a1, s2, a1, t2, a0, p2, t2); + var r2; + var r3; + var r4; + var r5; + var r6; + var r7; + var r8; + var r9; + var r10; + var r11; + var r12; + var r13; + var r14; + var r15; + var r16; + var r17; + var r18; + var r19; + var r20; + var r21; + var r22; + var r23; + var r24; + var r25; + var r26; + var r27; + var r28; + var r29; + var r30; + var r31; + var r32; + var r33; + var r34; + var r35; + var r36; + var r37; + var r38; + var r39; + var r40; + var r41; + var r42; + var r43; + var r44; + var r45; + var r46; + var r47; + var r48; + var r49; + var r50; + var r51; + var r52; + var r53; + var r54; + var r55; + var r56; + var r57; + var r58; + var r59; + var r60; + var r61; + var r62; + var r63; + var r64; + var r65; + var r66; + var r67; + var r68; + var r69; + var r70; + var r71; + var r72; + var r73; + var r74; + var r75; + var r76; + var r77; + var r78; + var r79; + var r80; + var r81; + var r82; + var r83; + var r84; + var r85; + var r86; + var r87; + var r88; + var r89; + var r90; + var r91; + var r92; + var r93; + var r149; + var r150; + var r151; + var r152; + var r153; + var r154; + var r155; + var r156; + var r157; + var r158; + var r159; + var r160; + var r161; + var r162; + var r163; + var r164; + var r165; + var r166; + var r167; + var r168; + var r169; + var r170; + var r171; + var r172; + var r173; + var r174; + var r175; + var r176; + var r177; + var r178; + var r179; + var r180; + var r181; + var r182; + var r183; + var r184; + var r185; + var r186; + var r187; + var r188; + var r189; + var r190; + var r191; + var r192; + var r193; + var r194; + var r195; + var r196; + var r197; + var r198; + var r199; + var r200; + var r201; + var r202; + var r203; + var r204; + var r205; + var r206; + var r207; + var r208; + var r209; + var r210; + var r211; + var r212; + var r213; + var r214; + var r215; + var r216; + var r217; + var r218; + var r219; + var r220; + var r221; + var r222; + var r223; + var r224; + var r225; + var r226; + var r227; + var r228; + var r229; + var r230; + var r231; + var r232; + var r233; + var r234; + var r235; + var r236; + var r237; + var r238; + var r239; + var r240; + var r241; + var r242; + var r243; + var r244; + var r245; + var r246; + var r247; + var r248; + var r249; + var r250; + var r251; + var r252; + var r253; + var r254; + var r255; + var r256; + var r257; + var r258; + var r259; + var r260; + var r261; + var r262; + var r263; + var r264; + var r265; + var r266; + var r267; + var r268; + var r269; + var r270; + var r271; + var r272; + var r273; + var r274; + var r275; + var r276; + var r277; + var r278; + var r279; + var r280; + var r281; + var r282; + var r283; + var r284; + var r285; + var r286; + var r287; + var r288; + var r289; + var r290; + var r291; + var r292; + var r293; + var r294; + var r295; + var r296; + var r297; + var r298; + var r299; + var r300; + var r301; + var r302; + var r303; + var r304; + var r305; + var r306; + var r307; + var r308; + var r309; + var r310; + var r311; + var r312; + var r313; + var r314; + var r315; + var r316; + var r317; + var r318; + var r319; + var r320; + var r321; + var r322; + var r323; + var r324; + var r325; + var r326; + var r327; + var r328; + var r329; + var r330; + var r331; + var r332; + var r333; + var r334; + var r335; + var r336; + var r337; + var r338; + var r339; + var r340; + var r341; + var r342; + var r343; + var r344; + var r345; + var r346; + var r347; + var r348; + var r349; + var r350; + var r351; + var r352; + var r353; + var r354; + var r355; + var r356; + var r357; + var r358; + var r359; + var r360; + var r361; + var r362; + var r363; + var r364; + var r365; + var r366; + var r367; + var r368; + var r369; + var r370; + var r371; + var r372; + var r373; + var r374; + var r375; + var r376; + var r377; + var r378; + var r379; + var r380; + var r381; + var r382; + var r383; + var r384; + var r385; + var r386; + var r387; + var r388; + var r389; + var r390; + var r391; + var r392; + var r393; + var r394; + var r395; + var r396; + var r397; + var r398; + var r399; + var r400; + var r401; + var r402; + var r403; + var r404; + var r405; + var r406; + var r407; + var r408; + var r409; + var r410; + var r411; + var r412; + var r413; + var r414; + var r415; + var r416; + var r417; + var r418; + var r419; + var r420; + var r421; + var r422; + var r423; + var r424; + var r425; + var r426; + var r427; + var r428; + var r429; + var r430; + var r431; + var r432; + var r433; + var r434; + var r435; + var r436; + var r437; + var r438; + var r439; + var r440; + var r441; + var r442; + var r443; + var r444; + var r445; + var r446; + var r447; + var r448; + var r449; + var r450; + var r451; + var r452; + var r453; + var r454; + var r455; + var r456; + var r457; + var r458; + var r459; + var r460; + var r461; + var r462; + var r463; + var r464; + var r465; + var r466; + var r467; + var r468; + var r469; + var r470; + var r471; + var r472; + var r473; + var r474; + var r475; + var r476; + var r477; + var r478; + var r479; + var r480; + var r481; + var r482; + var r483; + var r484; + var r485; + var r486; + var r487; + var r488; + var r489; + var r490; + var r491; + var r492; + var r493; + var r494; + var r495; + var r496; + var r497; + var r498; + var r499; + var r500; + var r501; + var r502; + var r503; + var r504; + var r505; + var r506; + var r507; + var r508; + var r509; + var r510; + var r511; + var r512; + var r513; + var r514; + var r515; + var r516; + var r517; + var r518; + var r519; + var r520; + var r521; + var r522; + var r523; + var r524; + var r525; + var r526; + var r527; + var r528; + var r529; + var r530; + var r531; + var r532; + var r533; + var r534; + var r535; + var r536; + var r537; + var r538; + var r539; + var r540; + var r541; + var r542; + var r543; + var r544; + var r545; +})(32769); diff --git a/js/src/jit-test/tests/basic/cross-global-for-in.js b/js/src/jit-test/tests/basic/cross-global-for-in.js new file mode 100644 index 0000000000..3fd7720525 --- /dev/null +++ b/js/src/jit-test/tests/basic/cross-global-for-in.js @@ -0,0 +1,11 @@ +var global = newGlobal(); + +var arrayIter = (new global.Array())[global.Symbol.iterator](); +var ArrayIteratorPrototype = Object.getPrototypeOf(arrayIter); +var arrayIterProtoBase = Object.getPrototypeOf(ArrayIteratorPrototype); +var IteratorPrototype = arrayIterProtoBase; +delete IteratorPrototype.next; + +var obj = global.eval('({a: 1})') +for (var x in obj) {} +assertEq(x, "a"); diff --git a/js/src/jit-test/tests/basic/cross-realm-iterator-suppression.js b/js/src/jit-test/tests/basic/cross-realm-iterator-suppression.js new file mode 100644 index 0000000000..cded3d4c88 --- /dev/null +++ b/js/src/jit-test/tests/basic/cross-realm-iterator-suppression.js @@ -0,0 +1,32 @@ +function foo(o) { + // Ensure a NativeIterator exists for o. + for (var s in o) {} + + // Loop over the keys, deleting y. + // If y is correctly suppressed, then result should + // be the name of the first property. + var result = ""; + for (var s in o) { + delete o.y; + result += s; + } + assertEq(o[result], 42); +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + var o = {}; + o["x" + i] = 42; + o.y = 1; + foo(o); +} + +// Cross-realm, same-compartment +var g = newGlobal({newCompartment: false}); +g.eval("var o = {x: 42, y: 1}"); +foo(g.o); + +// Cross-realm, cross-compartment +var g2 = newGlobal({newCompartment: true}); +g2.eval("var o = {x: 42, y: 1}"); +foo(g2.o); diff --git a/js/src/jit-test/tests/basic/date-getLocale-oom.js b/js/src/jit-test/tests/basic/date-getLocale-oom.js new file mode 100644 index 0000000000..7c0b1a7190 --- /dev/null +++ b/js/src/jit-test/tests/basic/date-getLocale-oom.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(function () { + new Date(NaN).toString(); +}, {keepFailing: true}); diff --git a/js/src/jit-test/tests/basic/date-late-weekday-warning.js b/js/src/jit-test/tests/basic/date-late-weekday-warning.js new file mode 100644 index 0000000000..ca6730e56c --- /dev/null +++ b/js/src/jit-test/tests/basic/date-late-weekday-warning.js @@ -0,0 +1,34 @@ +/** + * Test deprecation warning for late weekday in Date.parse + */ + +function testWarn(date) { + const g = newGlobal(); + g.eval(`Date.parse("${date}")`); + const warning = getLastWarning(); + assertEq(warning !== null, true, `warning should be caught for ${date}`); + assertEq(warning.name, "Warning", warning.name); + + clearLastWarning(); + + g.eval(`Date.parse("${date}")`); + assertEq(getLastWarning(), null, "warning should not be caught for 2nd ocurrence"); +} + +function testNoWarn(date) { + Date.parse(date); + assertEq(getLastWarning(), null, `warning should not be caught for ${date}`); +} + +enableLastWarning(); + +testWarn("Sep 26 1995 Tues"); +testWarn("Sep 26 Tues 1995"); +testWarn("Sep 26 Tues 1995 Tues"); +testWarn("Sep 26 1995 10:Tues:00"); + +testNoWarn("Sep 26 1995"); +testNoWarn("Tues Sep 26 1995"); +testNoWarn("Sep Tues 26 1995"); + +disableLastWarning(); diff --git a/js/src/jit-test/tests/basic/date-methods-this-error.js b/js/src/jit-test/tests/basic/date-methods-this-error.js new file mode 100644 index 0000000000..b075a6e37d --- /dev/null +++ b/js/src/jit-test/tests/basic/date-methods-this-error.js @@ -0,0 +1,18 @@ +load(libdir + "asserts.js"); + +let ignored = [ + "constructor", + "toJSON", // Generic, but calls toISOString + "toGMTString", // Same method as toUTCString +] + +let methods = Object.getOwnPropertyNames(Date.prototype) + .filter(name => !ignored.includes(name)); + +for (let method of methods) { + assertTypeErrorMessage(() => Date.prototype[method].call(new Map), + `Date.prototype.${method} called on incompatible Map`); + + assertTypeErrorMessage(() => Date.prototype[method].call(false), + `Date.prototype.${method} called on incompatible boolean`); +} diff --git a/js/src/jit-test/tests/basic/decompile-script.js b/js/src/jit-test/tests/basic/decompile-script.js new file mode 100644 index 0000000000..b5926d79c1 --- /dev/null +++ b/js/src/jit-test/tests/basic/decompile-script.js @@ -0,0 +1,6 @@ +function example(a, b, c) { + var complicated = 3; + perform_some_operations(); +} +var myfun = function (a, b) { return a + b; } +assertEq(decompileThis(), snarf(thisFilename())); diff --git a/js/src/jit-test/tests/basic/deep2.js b/js/src/jit-test/tests/basic/deep2.js new file mode 100644 index 0000000000..2cf30b814b --- /dev/null +++ b/js/src/jit-test/tests/basic/deep2.js @@ -0,0 +1,11 @@ +function deep1(x) { + if (x > 90) + return 1; + return 2; +} +function deep2() { + for (var i = 0; i < 100; ++i) + deep1(i); + return "ok"; +} +assertEq(deep2(), "ok"); diff --git a/js/src/jit-test/tests/basic/deepForInLoop.js b/js/src/jit-test/tests/basic/deepForInLoop.js new file mode 100644 index 0000000000..8bae45eb15 --- /dev/null +++ b/js/src/jit-test/tests/basic/deepForInLoop.js @@ -0,0 +1,12 @@ +function deepForInLoop() { + // NB: the number of props set in C is arefully tuned to match 8 = 2. + function C(){this.p = 1, this.q = 2} + C.prototype = {p:1, q:2, r:3, s:4, t:5}; + var o = new C; + var j = 0; + var a = []; + for (var i in o) + a[j++] = i; + return a.join(""); +} +assertEq(deepForInLoop(), "pqrst"); diff --git a/js/src/jit-test/tests/basic/defaultvalue-toString-is-noncallable-object-elem.js b/js/src/jit-test/tests/basic/defaultvalue-toString-is-noncallable-object-elem.js new file mode 100644 index 0000000000..b5a28be554 --- /dev/null +++ b/js/src/jit-test/tests/basic/defaultvalue-toString-is-noncallable-object-elem.js @@ -0,0 +1,4 @@ +var arr = ["foo", "bar"]; +var obj = { toString: {}, valueOf: function() { return 1; } }; +for (var i = 0; i < 25; i++) + assertEq(arr[obj], "bar"); diff --git a/js/src/jit-test/tests/basic/defaultvalue-toString-is-noncallable-object.js b/js/src/jit-test/tests/basic/defaultvalue-toString-is-noncallable-object.js new file mode 100644 index 0000000000..f0a30d1158 --- /dev/null +++ b/js/src/jit-test/tests/basic/defaultvalue-toString-is-noncallable-object.js @@ -0,0 +1,3 @@ +var obj = { toString: {}, valueOf: function() { return "foopy"; } }; +for (var i = 0; i < 25; i++) + assertEq(String(obj), "foopy"); diff --git a/js/src/jit-test/tests/basic/defaultvalue-valueOf-is-noncallable-object.js b/js/src/jit-test/tests/basic/defaultvalue-valueOf-is-noncallable-object.js new file mode 100644 index 0000000000..9bb2126b93 --- /dev/null +++ b/js/src/jit-test/tests/basic/defaultvalue-valueOf-is-noncallable-object.js @@ -0,0 +1,3 @@ +var obj = { valueOf: {}, toString: function() { return 0; } }; +for (var i = 0; i < 25; i++) + assertEq(obj < 1, true); diff --git a/js/src/jit-test/tests/basic/define-frozen-dense-strict.js b/js/src/jit-test/tests/basic/define-frozen-dense-strict.js new file mode 100644 index 0000000000..a1e82e9c58 --- /dev/null +++ b/js/src/jit-test/tests/basic/define-frozen-dense-strict.js @@ -0,0 +1,16 @@ +"use strict"; +var t = [4]; +var stop; +Object.freeze(t); +do { + let ok = false; + stop = inIon(); + try { + t[1] = 2; + } catch(e) { + ok = true; + } + assertEq(ok, true); + assertEq(t.length, 1); + assertEq(t[1], undefined); +} while (!stop); diff --git a/js/src/jit-test/tests/basic/define-frozen-dense.js b/js/src/jit-test/tests/basic/define-frozen-dense.js new file mode 100644 index 0000000000..7a7e2a97f3 --- /dev/null +++ b/js/src/jit-test/tests/basic/define-frozen-dense.js @@ -0,0 +1,9 @@ +var t = [4]; +var stop; +Object.freeze(t); +do { + stop = inIon(); + t[1] = 2; + assertEq(t.length, 1); + assertEq(t[1], undefined); +} while (!stop); diff --git a/js/src/jit-test/tests/basic/define-frozen-property-strict.js b/js/src/jit-test/tests/basic/define-frozen-property-strict.js new file mode 100644 index 0000000000..7e2b2d818b --- /dev/null +++ b/js/src/jit-test/tests/basic/define-frozen-property-strict.js @@ -0,0 +1,14 @@ +function foo(x) { + "use strict"; + var ok = false; + try { + x.c = 10; + } catch(e) { + ok = true; + } + assertEq(ok, true); + assertEq(x.c, undefined); +} +x = {a:0,b:1}; +Object.freeze(x); +foo(x); diff --git a/js/src/jit-test/tests/basic/define-frozen-property.js b/js/src/jit-test/tests/basic/define-frozen-property.js new file mode 100644 index 0000000000..759552c58c --- /dev/null +++ b/js/src/jit-test/tests/basic/define-frozen-property.js @@ -0,0 +1,7 @@ +function foo(x) { + x.c = 10; + assertEq(x.c, undefined); +} +x = {a:0,b:1}; +Object.freeze(x); +foo(x); diff --git a/js/src/jit-test/tests/basic/delete-all-dict-props.js b/js/src/jit-test/tests/basic/delete-all-dict-props.js new file mode 100644 index 0000000000..3a68a02e69 --- /dev/null +++ b/js/src/jit-test/tests/basic/delete-all-dict-props.js @@ -0,0 +1,15 @@ +function f(o) { + for (var i = 0; i < 100; i++) { + o["a" + i] = i; + } + for (var i = 0; i < 100; i++) { + delete o["a" + i]; + } + o.x = 123; + assertEq(Object.keys(o).length, 1); +} +f({}); +f([]); +let obj = newObjectWithManyReservedSlots(); +f(obj); +checkObjectWithManyReservedSlots(obj); diff --git a/js/src/jit-test/tests/basic/delete-array-elements.js b/js/src/jit-test/tests/basic/delete-array-elements.js new file mode 100644 index 0000000000..e56fa36bd0 --- /dev/null +++ b/js/src/jit-test/tests/basic/delete-array-elements.js @@ -0,0 +1,7 @@ +var a = [0,1,2,3,4,5,6,7,8,9,10]; +for (var i = 0; i < 10; i++) + delete a[9 - i]; +assertEq(a.length, 11); +for (i = 0; i < 10; i++) + assertEq(a.hasOwnProperty(i), false); + diff --git a/js/src/jit-test/tests/basic/delete-indexed-names.js b/js/src/jit-test/tests/basic/delete-indexed-names.js new file mode 100644 index 0000000000..d65a1acba2 --- /dev/null +++ b/js/src/jit-test/tests/basic/delete-indexed-names.js @@ -0,0 +1,7 @@ +var a = ['p', 'q', 'r', 's', 't']; +var o = {p:1, q:2, r:3, s:4, t:5}; +for (var i in o) + delete o[i]; +for (var i of a) + assertEq(o.hasOwnProperty(i), false); + diff --git a/js/src/jit-test/tests/basic/delete-integer-nonid.js b/js/src/jit-test/tests/basic/delete-integer-nonid.js new file mode 100644 index 0000000000..e016227cba --- /dev/null +++ b/js/src/jit-test/tests/basic/delete-integer-nonid.js @@ -0,0 +1,24 @@ +var JSID_INT_MIN = -(1 << 30); +var JSID_INT_MAX = (1 << 30) - 1; + +var o = {}; + + +for (var i = 0; i < 10; i++) + delete o[JSID_INT_MIN - 1]; + +for (var i = 0; i < 10; i++) + delete o[JSID_INT_MIN]; + +for (var i = 0; i < 10; i++) + delete o[JSID_INT_MIN + 1]; + + +for (var i = 0; i < 10; i++) + delete o[JSID_INT_MAX - 1]; + +for (var i = 0; i < 10; i++) + delete o[JSID_INT_MAX]; + +for (var i = 0; i < 10; i++) + delete o[JSID_INT_MAX + 1]; diff --git a/js/src/jit-test/tests/basic/delete-last-check-proto.js b/js/src/jit-test/tests/basic/delete-last-check-proto.js new file mode 100644 index 0000000000..5384c8e336 --- /dev/null +++ b/js/src/jit-test/tests/basic/delete-last-check-proto.js @@ -0,0 +1,8 @@ +// Test that removing a non-dictionary property does not roll back the object's +// shape to the previous one if the protos are different. + +var o = {x: 1}; +o.y = 2; +Object.setPrototypeOf(o, null); +delete o.y; +assertEq(Object.getPrototypeOf(o), null); diff --git a/js/src/jit-test/tests/basic/delete-named-names.js b/js/src/jit-test/tests/basic/delete-named-names.js new file mode 100644 index 0000000000..ce2443cd69 --- /dev/null +++ b/js/src/jit-test/tests/basic/delete-named-names.js @@ -0,0 +1,12 @@ +var a = ['p', 'q', 'r', 's', 't']; +var o = {p:1, q:2, r:3, s:4, t:5}; +for (var i in o) { + delete o.p; + delete o.q; + delete o.r; + delete o.s; + delete o.t; +} +for (var i of a) + assertEq(o.hasOwnProperty(i), false); + diff --git a/js/src/jit-test/tests/basic/delete-non-config.js b/js/src/jit-test/tests/basic/delete-non-config.js new file mode 100644 index 0000000000..da6020cad8 --- /dev/null +++ b/js/src/jit-test/tests/basic/delete-non-config.js @@ -0,0 +1,4 @@ +var a = [0,1,2,3,4,5,6,7,8,9,10]; +for (var i = 0; i < 10; i++) + assertEq(delete a.length, false); +assertEq(delete a.length, false); diff --git a/js/src/jit-test/tests/basic/deleteToString.js b/js/src/jit-test/tests/basic/deleteToString.js new file mode 100644 index 0000000000..0b8dfc59d4 --- /dev/null +++ b/js/src/jit-test/tests/basic/deleteToString.js @@ -0,0 +1,5 @@ + +/* Inheritance of shadowed function properties from Object.prototype. */ + +delete Function.prototype.toString; +assertEq(Function.prototype.toString, Object.prototype.toString); diff --git a/js/src/jit-test/tests/basic/dense-elements-appear.js b/js/src/jit-test/tests/basic/dense-elements-appear.js new file mode 100644 index 0000000000..351f8f6763 --- /dev/null +++ b/js/src/jit-test/tests/basic/dense-elements-appear.js @@ -0,0 +1,28 @@ +function f() { + var x = [1, 2, 3]; + var y = {}; + x.__proto__ = y; + + for (var i = 0; i < 200; i++) { + if (i == 100) + y[100000] = 15; + else + assertEq(typeof x[100000], i > 100 ? "number" : "undefined"); + } +} + +function g() { + var x = [1, 2, 3]; + var y = {}; + x.__proto__ = y; + + for (var i = 0; i < 200; i++) { + if (i == 100) + y[4] = 15; + else + assertEq(typeof x[4], i > 100 ? "number" : "undefined"); + } +} + +f(); +g(); diff --git a/js/src/jit-test/tests/basic/dense-elements-hole-negative.js b/js/src/jit-test/tests/basic/dense-elements-hole-negative.js new file mode 100644 index 0000000000..cf63da92e0 --- /dev/null +++ b/js/src/jit-test/tests/basic/dense-elements-hole-negative.js @@ -0,0 +1,31 @@ +// The index is negative before code generation. + +let v = {}; +let negativeIndex = -1; + +function f(obj) { + assertEq(obj[negativeIndex] === v, true); +} +for (let i = 0; i < 2000; i++) { + let obj = {}; + obj[1] = {}; + obj[negativeIndex] = v; + f(obj); +} + +// The sign of the index changes after the code generation. + +function g(obj, i) { + for (let j = 0; j < 4; j++) { + assertEq(obj[i-j] === v, true); + } +} +for (let i = 0; i < 2000; i++) { + let obj = {}; + obj[1] = {}; + let X = 2000 - i; + for (let j = 0; j < 10; j++) { + obj[X-j] = v; + } + g(obj, X); +} diff --git a/js/src/jit-test/tests/basic/densify-elements.js b/js/src/jit-test/tests/basic/densify-elements.js new file mode 100644 index 0000000000..f2944c0e55 --- /dev/null +++ b/js/src/jit-test/tests/basic/densify-elements.js @@ -0,0 +1,15 @@ +function f(o) { + for (var i = 1; i <= 5; i += 4) { + var start = i * 4000; + var end = (start * 1.4)|0; + for (var j = end; j > start; j--) { + o[j] = j; + } + } + assertEq(Object.keys(o).length, 9600); +} +f({}); +f([]); +let obj = newObjectWithManyReservedSlots(); +f(obj); +checkObjectWithManyReservedSlots(obj); diff --git a/js/src/jit-test/tests/basic/dependentStrings.js b/js/src/jit-test/tests/basic/dependentStrings.js new file mode 100644 index 0000000000..1dd38bbacb --- /dev/null +++ b/js/src/jit-test/tests/basic/dependentStrings.js @@ -0,0 +1,11 @@ +function dependentStrings() +{ + var a = []; + var t = "abcdefghijklmnopqrst"; + for (var i = 0; i < 10; i++) { + var s = t.substring(2*i, 2*i + 2); + a[i] = s + s.length; + } + return a.join(""); +} +assertEq(dependentStrings(), "ab2cd2ef2gh2ij2kl2mn2op2qr2st2"); diff --git a/js/src/jit-test/tests/basic/destructuring-default.js b/js/src/jit-test/tests/basic/destructuring-default.js new file mode 100644 index 0000000000..49a908b8aa --- /dev/null +++ b/js/src/jit-test/tests/basic/destructuring-default.js @@ -0,0 +1,251 @@ + +load(libdir + 'asserts.js'); +load(libdir + 'eqArrayHelper.js'); + +var arrayPattern = '[a = 1, b = 2, c = 3, d = 4, e = 5, f = 6]'; +var objectPattern = '{0: a = 1, 1: b = 2, 2: c = 3, 3: d = 4, 4: e = 5, 5: f = 6}'; +var objectPatternShorthand = '{a = 1, b = 2, c = 3, d = 4, e = 5, f = 6}'; +var nestedPattern = '{a: a = 1, b: [b = 2] = [], c: {c: [c]} = {c: [3]}, d: {d, e} = {d: 4, e: 5}, f: f = 6}'; + +function testAll(fn) { + assertEqArray(fn(arrayPattern, []), [1, 2, 3, 4, 5, 6]); + assertEqArray(fn(arrayPattern, [2, 3, 4, 5, 6, 7, 8, 9]), [2, 3, 4, 5, 6, 7]); + assertEqArray(fn(arrayPattern, [undefined, 0, false, null, "", undefined]), [1, 0, false, null, "", 6]); + assertEqArray(fn(arrayPattern, [0, false]), [0, false, 3, 4, 5, 6]); + + assertEqArray(fn(objectPattern, []), [1, 2, 3, 4, 5, 6]); + assertEqArray(fn(objectPattern, [2, 3, 4, 5, 6, 7, 8, 9]), [2, 3, 4, 5, 6, 7]); + assertEqArray(fn(objectPattern, [undefined, 0, false, null, "", undefined]), [1, 0, false, null, "", 6]); + assertEqArray(fn(objectPattern, [0, false]), [0, false, 3, 4, 5, 6]); + + assertEqArray(fn(objectPatternShorthand, {}), [1, 2, 3, 4, 5, 6]); + assertEqArray(fn(objectPatternShorthand, {a: 2, b: 3, c: 4, d: 5, e: 6, f: 7, g: 8, h: 9}), [2, 3, 4, 5, 6, 7]); + assertEqArray(fn(objectPatternShorthand, {a: undefined, b: 0, c: false, d: null, e: "", f: undefined}), + [1, 0, false, null, "", 6]); + assertEqArray(fn(objectPatternShorthand, {a: 0, b: false}), [0, false, 3, 4, 5, 6]); + assertEqArray(fn(nestedPattern, {}), [1, 2, 3, 4, 5, 6]); + assertEqArray(fn(nestedPattern, {a: 2, b: [], c: undefined}), [2, 2, 3, 4, 5, 6]); + assertEqArray(fn(nestedPattern, {a: undefined, b: [3], c: {c: [4]}}), [1, 3, 4, 4, 5, 6]); + assertEqArray(fn(nestedPattern, {a: undefined, b: [3], c: {c: [4]}, d: {d: 5, e: 6}}), [1, 3, 4, 5, 6, 6]); +} + +function testVar(pattern, input) { + return new Function('input', + 'var ' + pattern + ' = input;' + + 'return [a, b, c, d, e, f];' + )(input); +} +testAll(testVar); + +function testLet(pattern, input) { + return new Function('input', + 'let ' + pattern + ' = input;' + + 'return [a, b, c, d, e, f];' + )(input); +} +testAll(testLet); + +function testConst(pattern, input) { + return new Function('input', + 'const ' + pattern + ' = input;' + + 'return [a, b, c, d, e, f];' + )(input); +} +testAll(testConst); + +function testGlobal(pattern, input) { + return new Function('input', + '(' + pattern + ' = input);' + + 'return [a, b, c, d, e, f];' + )(input); +} +testAll(testGlobal); + +function testClosure(pattern, input) { + return new Function('input', + 'var rest; (function () {' + + '(' + pattern + ' = input);' + + '})();' + + 'return [a, b, c, d, e, f];' + )(input); +} +testAll(testClosure); + +function testArgument(pattern, input) { + return new Function('input', + 'return (function (' + pattern + ') {' + + 'return [a, b, c, d, e, f]; })(input);' + )(input); +} +testAll(testArgument); + +function testArgumentFunction(pattern, input) { + return new Function(pattern, + 'return [a, b, c, d, e, f];' + )(input); +} +testAll(testArgumentFunction); + +function testThrow(pattern, input) { + return new Function('input', + 'try { throw input }' + + 'catch(' + pattern + ') {' + + 'return [a, b, c, d, e, f]; }' + )(input); +} +testAll(testThrow); + +// test global const +const [ca = 1, cb = 2] = []; +assertEq(ca, 1); +assertEq(cb, 2); + +const {a: {a: cc = 3} = {a: undefined}} = {}; +assertEq(cc, 3); + +// test that the assignment happens in source order +var a = undefined, b = undefined, c = undefined; +({a: a = 1, c: c = 2, b: b = 3} = { + get a() { + assertEq(a, undefined); + assertEq(c, undefined); + assertEq(b, undefined); + return undefined; + }, + get b() { + assertEq(a, 1); + assertEq(c, 2); + assertEq(b, undefined); + return 4; + }, + get c() { + assertEq(a, 1); + assertEq(c, undefined); + assertEq(b, undefined); + return undefined; + } +}); +assertEq(b, 4); + +assertThrowsInstanceOf(() => { var {a: {a} = null} = {}; }, TypeError); +assertThrowsInstanceOf(() => { var [[a] = 2] = []; }, TypeError); + +// destructuring assignment might have duplicate variable names. +var [a = 1, a = 2] = [3]; +assertEq(a, 2); + +// assignment to properties of default params +[a = {y: 2}, a.x = 1] = []; +assertEq(typeof a, 'object'); +assertEq(a.x, 1); +assertEq(a.y, 2); + +// defaults are evaluated even if there is no binding +var evaled = false; +({a: {} = (evaled = true, {})} = {}); +assertEq(evaled, true); +evaled = false; +assertThrowsInstanceOf(() => { [[] = (evaled = true, 2)] = [] }, TypeError); +assertEq(evaled, true); + +assertThrowsInstanceOf(() => new Function('var [...rest = defaults] = [];'), SyntaxError); + +new Function(` + b = undefined; + for (var [a, b = 10] in " ") {} + assertEq(b, 10);`)(); + +new Function(` + b = undefined; + for (let [a, c = 10] in " ") { b = c; } + assertEq(b, 10);`)(); + +new Function(` + b = undefined; + for (let [a, c = (x => y)] in " ") { b = c; } + assertEq(typeof b, "function");`)(); + +new Function(` + b = undefined; + for (let [a, __proto__ = 10] in " ") { b = __proto__; } + assertEq(b, 10);`)(); + +new Function(` + b = undefined; + for (let [a, __proto__ = (x => y)] in " ") { b = __proto__; } + assertEq(typeof b, "function");`)(); + +new Function(` + b = undefined; + for (var {1: b = 10} in " ") {} + assertEq(b, 10);`)(); + +new Function(` + b = undefined; + for (let {1: c = 10} in " ") { b = c; } + assertEq(b, 10);`)(); + +new Function(` + b = undefined; + for (let { c = 10 } in " ") { b = c; } + assertEq(b, 10);`)(); + +new Function(` + b = undefined; + assertEq(Number.prototype.a, undefined); + for (var { a: c = (x => y) } in [{}]) { b = c; } + assertEq(typeof b, "function");`)(); + +new Function(` + b = undefined; + Object.defineProperty(String.prototype, "__proto__", + { value: undefined, configurable: true }); + for (var { __proto__: c = (x => y) } in [{}]) { b = c; } + delete String.prototype.__proto__; + assertEq(typeof b, "function");`)(); + +new Function(` + b = undefined; + for (var { a: c = (x => y) } of [{ a: undefined }]) { b = c; } + assertEq(typeof b, "function");`)(); + +new Function(` + b = undefined; + for (var { __proto__: c = (x => y) } of [{ ["__proto__"]: undefined }]) { b = c; } + assertEq(typeof b, "function");`)(); + +new Function(` + b = undefined; + var ts = Function.prototype.toString; + Function.prototype.toString = () => 'hi'; + String.prototype.hi = 42; + for (var { [(x => y)]: c } in [0]) { b = c; } + Function.prototype.toString = ts; + delete String.prototype.hi; + assertEq(b, 42);`)(); + +new Function(` + b = undefined; + var ts = Function.prototype.toString; + Function.prototype.toString = () => 'hi'; + String.prototype.hi = 42; + for (var { [(x => y)]: __proto__ } in [0]) { b = __proto__; } + Function.prototype.toString = ts; + delete String.prototype.hi; + assertEq(b, 42);`)(); + +new Function(` + b = undefined; + var ts = Function.prototype.toString; + Function.prototype.toString = () => 'hi'; + for (var { [(x => y)]: c } of [{ 'hi': 42 }]) { b = c; } + Function.prototype.toString = ts; + assertEq(b, 42);`)(); + +new Function(` + b = undefined; + var ts = Function.prototype.toString; + Function.prototype.toString = () => 'hi'; + for (var { [(x => y)]: __proto__ } of [{ hi: 42 }]) { b = __proto__; } + Function.prototype.toString = ts; + assertEq(b, 42);`)(); diff --git a/js/src/jit-test/tests/basic/destructuring-iterator.js b/js/src/jit-test/tests/basic/destructuring-iterator.js new file mode 100644 index 0000000000..ca65930242 --- /dev/null +++ b/js/src/jit-test/tests/basic/destructuring-iterator.js @@ -0,0 +1,124 @@ + +load(libdir + 'asserts.js'); +load(libdir + 'iteration.js'); +load(libdir + 'eqArrayHelper.js'); + +// throw on non-iterables +assertThrowsInstanceOf(() => { [a, b, c] = {0: 0, 1: 1, 2: 2} }, TypeError); + +var nextcalls = 0, donecalls = 0, valuecalls = 0; +var doneafter = 0; +var iterable = {}; +iterable[Symbol.iterator] = function () { + return { + next: function () { + assertEq(arguments.length, 0, 'iterator.next() should be called with no arguments'); + nextcalls++; + return { + get done() { + donecalls++; + return --doneafter < 0; + }, + get value() { + valuecalls++; + return valuecalls; + } + }; + } + } +}; + +function assertIterable(expectCalls, fn, expectResult) { + [nextcalls, donecalls, valuecalls, doneafter] = [0,0,0, expectCalls[3]]; + assertEqArray(fn(iterable), expectResult); + assertEq(nextcalls, expectCalls[0], 'calls to iterator.next()'); + assertEq(donecalls, expectCalls[1], 'getting iterator.next().done'); + assertEq(valuecalls, expectCalls[2], 'getting iterator.next().value'); +} + +assertIterable([1,1,1,1], + it => { var [a] = it; return [a]; }, + [1]); +assertIterable([2,2,1,1], + it => { var [a,b,c] = it; return [a,b,c]; }, + [1,undefined,undefined]); +assertIterable([2,2,1,1], + it => { var [a,b,...rest] = it; return [a,b,...rest]; }, + [1,undefined]); +assertIterable([5,5,4,4], + it => { var [,,...rest] = it; return rest; }, + [3,4]); + +// the iterator should be exhausted before any error is thrown +assertIterable([5,5,4,4], + it => { + assertThrowsInstanceOf(function () { + "use strict"; + [...{0: "".x}] = it; + }, TypeError); + return []; + }, + []); + +var arraycalls = 0; +var ArrayIterator = Array.prototype[Symbol.iterator]; +Array.prototype[Symbol.iterator] = function () { + arraycalls++; + return ArrayIterator.apply(this, arguments); +}; +// [...rest] should not call Array#@@iterator for the LHS +var [...rest] = iterable; +assertEq(arraycalls, 0, 'calls to Array#@@iterator'); +// [...[...rest]] should do so, since it creates an implicit array for the +// first rest pattern, then destructures that again using @@iterator() for the +// second rest pattern. +var [...[...rest]] = iterable; +assertEq(arraycalls, 1, 'calls to Array#@@iterator'); + +// loop `fn` a few times, to get it JIT-compiled +function loop(fn) { + var i = 1e4; + while (i--) fn(); +} + +loop(() => { doneafter = 4; var [a] = iterable; return a; }); +loop(() => { doneafter = 4; var [a,b,...[...rest]] = iterable; return rest; }); + + +// destructuring assignment should always use iterators and not optimize +// to a "group assignment" +delete Array.prototype[Symbol.iterator]; +assertThrowsInstanceOf(() => { var [a,b] = [1,2]; }, TypeError); +Array.prototype[Symbol.iterator] = ArrayIterator; + +// observe the binding order +a = undefined, b = undefined, c = undefined; +var obj = {}; +obj[Symbol.iterator] = function* () { + // normal fields should be initialized right after |.next()| + yield 1; + assertEq(a, 1); + yield 2; + yield 3; + assertEq(b, 3); + yield 4; + yield 5; + // rest should be initialized after the iterator is exhausted + assertEq(c, undefined); +}; +[a, , b, ...c] = obj; +assertEqArray(c, [4,5]); + +// a throw inside the destructuring of the "catch" value should not enter +// the "catch" block + +assertThrowsValue(function () { + try { + Array.prototype[Symbol.iterator] = function () { throw 'from iterator'; }; + throw [1, 2]; + } catch ([x, y]) { + throw 'not reached'; + } +}, 'from iterator'); +Array.prototype[Symbol.iterator] = ArrayIterator; + diff --git a/js/src/jit-test/tests/basic/destructuring-null-or-undefined-into-computed-property-name.js b/js/src/jit-test/tests/basic/destructuring-null-or-undefined-into-computed-property-name.js new file mode 100644 index 0000000000..c5d75801ab --- /dev/null +++ b/js/src/jit-test/tests/basic/destructuring-null-or-undefined-into-computed-property-name.js @@ -0,0 +1,47 @@ +load(libdir + 'asserts.js'); +load(libdir + 'iteration.js'); + +var outer = "unmodified"; + +function f(v) +{ + if (v + "") + ({ [(outer = "modified")]: v } = v); +} + +assertEq(outer, "unmodified"); +f(true); +assertEq(outer, "modified"); + +outer = "unmodified"; +f({}); +assertEq(outer, "modified"); + +outer = "unmodified"; +assertThrowsInstanceOf(() => f(null), TypeError); +assertEq(outer, "unmodified"); + +assertThrowsInstanceOf(() => f(undefined), TypeError); +assertEq(outer, "unmodified"); + + +function g(v) +{ + if (v + "") + ({ [{ toString() { outer = "modified"; return 0; } }]: v } = v); +} + +outer = "unmodified"; +g(true); +assertEq(outer, "modified"); + +outer = "unmodified"; +g({}); +assertEq(outer, "modified"); + +outer = "unmodified"; +assertThrowsInstanceOf(() => g(undefined), TypeError); +assertEq(outer, "unmodified"); + +assertThrowsInstanceOf(() => g(null), TypeError); +assertEq(outer, "unmodified"); diff --git a/js/src/jit-test/tests/basic/destructuring-requireobjectcoercible.js b/js/src/jit-test/tests/basic/destructuring-requireobjectcoercible.js new file mode 100644 index 0000000000..c2b1403d30 --- /dev/null +++ b/js/src/jit-test/tests/basic/destructuring-requireobjectcoercible.js @@ -0,0 +1,107 @@ +load(libdir + 'asserts.js'); +load(libdir + 'iteration.js'); + +function f(v) +{ + if (v + "") + ({} = v); +} + +f(true); +f({}); +assertThrowsInstanceOf(() => f(null), TypeError); +assertThrowsInstanceOf(() => f(undefined), TypeError); + +function g(v) +{ + if (v + "") + ({} = v); +} + +g(true); +g({}); +assertThrowsInstanceOf(() => g(undefined), TypeError); +assertThrowsInstanceOf(() => g(null), TypeError); + +function h(v) +{ + if (v + "") + ([] = v); +} + +h([true]); +h("foo"); +assertThrowsInstanceOf(() => h(undefined), TypeError); +assertThrowsInstanceOf(() => h(null), TypeError); + +Object.defineProperty(Boolean.prototype, "v", + { get() { "use strict"; return typeof this; }, + enumerable: true, + configurable: true }); + +Object.defineProperty(Number.prototype, "v", + { get() { "use strict"; return typeof this; }, + enumerable: true, + configurable: true }); + +Object.defineProperty(String.prototype, "v", + { get() { "use strict"; return typeof this; }, + enumerable: true, + configurable: true }); + +Object.defineProperty(Symbol.prototype, "v", + { get() { "use strict"; return typeof this; }, + enumerable: true, + configurable: true }); + +function primitiveThisSupported() +{ + return 3.14.custom === "number"; +} + +function primitiveThisTests() +{ + function f(v) + { + var type = typeof v; + + ({ v } = v); + + assertEq(v, type); + } + + f(true); + f(3.14); + f(72); + f("ohai"); + f(Symbol.iterator); + + assertThrowsInstanceOf(() => f(undefined), TypeError); + assertThrowsInstanceOf(() => f(null), TypeError); + + function g(v) + { + var type = typeof v; + + ({ v } = v); + + assertEq(v, type); + } + + g(true); + g(3.14); + g(72); + g("ohai"); + g(Symbol.iterator); + + assertThrowsInstanceOf(() => g(null), TypeError); + assertThrowsInstanceOf(() => g(undefined), TypeError); +} +if (primitiveThisSupported()) + primitiveThisTests(); + +// Ensure the internal implementation of destructuring object pattern +// assignment -- using a self-hosted intrinsic function -- works even when lazy +// standard class initialization hasn't occurred. Unfortunately we can't use +// |newGlobal()| because that method eagerly initializes standard classes. +evalcx("({} = 1);", evalcx("lazy")); diff --git a/js/src/jit-test/tests/basic/destructuring-rest-identifiers.js b/js/src/jit-test/tests/basic/destructuring-rest-identifiers.js new file mode 100644 index 0000000000..8276ff6e2a --- /dev/null +++ b/js/src/jit-test/tests/basic/destructuring-rest-identifiers.js @@ -0,0 +1,69 @@ + +load(libdir + 'asserts.js'); +load(libdir + 'eqArrayHelper.js'); + +var reserved = [ + 'break', + 'do', + 'in', + 'typeof', + 'case', + 'else', + 'instanceof', + 'var', + 'catch', + 'export', + 'new', + 'void', + 'class', + 'extends', + 'return', + 'while', + 'const', + 'finally', + 'super', + 'with', + 'continue', + 'for', + 'switch', + 'debugger', + 'function', + 'this', + 'delete', + 'import', + 'try', + 'enum', + 'null', + 'true', + 'false' +]; +reserved.forEach(ident => { + assertThrowsInstanceOf(() => new Function('var [...' + ident + '] = []'), SyntaxError); +}); + +var strictIdentifiers = [ + 'yield', + 'let', + 'eval', + 'arguments', + 'implements', + 'interface', + 'package', + 'private', + 'protected', + 'public', + 'static' +]; + +strictIdentifiers.forEach(ident => + assertThrowsInstanceOf(() => + new Function('"use strict"; [...' + ident + '] = []'), SyntaxError)); + +var globalEval = eval; +strictIdentifiers.forEach(ident => { + globalEval(ident + ' = null'); + assertEqArray(new Function('input', '[, ...' + ident + '] = input;' + + 'return ' + ident + )([1, 2, 3]), [2, 3]); +}); + diff --git a/js/src/jit-test/tests/basic/destructuring-rest.js b/js/src/jit-test/tests/basic/destructuring-rest.js new file mode 100644 index 0000000000..fcb7b79bba --- /dev/null +++ b/js/src/jit-test/tests/basic/destructuring-rest.js @@ -0,0 +1,147 @@ + +load(libdir + 'asserts.js'); +load(libdir + 'eqArrayHelper.js'); + +assertThrowsInstanceOf(() => new Function('[...a, ,] = []'), SyntaxError, 'trailing elision'); +assertThrowsInstanceOf(() => new Function('[a, ...b, c] = []'), SyntaxError, 'trailing param'); +assertThrowsInstanceOf(() => new Function('[...a=b] = []'), SyntaxError, 'assignment expression'); +assertThrowsInstanceOf(() => new Function('[...a()] = []'), SyntaxError, 'call expression'); +assertThrowsInstanceOf(() => new Function('[...(a,b)] = []'), SyntaxError, 'comma expression'); +assertThrowsInstanceOf(() => new Function('[...a++] = []'), SyntaxError, 'postfix expression'); +assertThrowsInstanceOf(() => new Function('[...!a] = []'), SyntaxError, 'unary expression'); +assertThrowsInstanceOf(() => new Function('[...a+b] = []'), SyntaxError, 'binary expression'); +assertThrowsInstanceOf(() => new Function('var [...a.x] = []'), SyntaxError, 'lvalue expression in declaration'); +assertThrowsInstanceOf(() => new Function('var [...(b)] = []'), SyntaxError); +assertThrowsInstanceOf(() => new Function('[...b,] = []'), SyntaxError); + +assertThrowsInstanceOf(() => { + try { + eval('let [...[...x]] = (() => { throw "foo"; } )();'); + } catch(e) { + assertEq(e, "foo"); + } + x; +}, ReferenceError); + +var inputArray = [1, 2, 3]; +var inputDeep = [1, inputArray]; +var inputObject = {a: inputArray}; +var inputStr = 'str'; +function *inputGenerator() { + yield 1; + yield 2; + yield 3; +} + +var o = {prop: null, call: function () { return o; }}; + +var expected = [2, 3]; +var expectedStr = ['t', 'r']; + +function testAll(fn) { + testDeclaration(fn); + + o.prop = null; + assertEqArray(fn('[, ...(o.prop)]', inputArray, 'o.prop'), expected); + o.prop = null; + assertEqArray(fn('[, ...(o.call().prop)]', inputArray, 'o.prop'), expected); + + o.prop = null; + assertEqArray(fn('[, ...[...(o.prop)]]', inputArray, 'o.prop'), expected); + o.prop = null; + assertEqArray(fn('[, ...[...(o.call().prop)]]', inputArray, 'o.prop'), expected); +} +function testDeclaration(fn) { + testStr(fn); + + assertEqArray(fn('[, ...rest]', inputArray), expected); + assertEqArray(fn('[, ...rest]', inputGenerator()), expected); + assertEqArray(fn('[, [, ...rest]]', inputDeep), expected); + assertEqArray(fn('{a: [, ...rest]}', inputObject), expected); + + assertEqArray(fn('[, ...[...rest]]', inputArray), expected); + assertEqArray(fn('[, ...[...rest]]', inputGenerator()), expected); + assertEqArray(fn('[, [, ...[...rest]]]', inputDeep), expected); + assertEqArray(fn('{a: [, ...[...rest]]}', inputObject), expected); + + assertEqArray(fn('[, ...{0: a, 1: b}]', inputArray, '[a, b]'), expected); + assertEqArray(fn('[, ...{0: a, 1: b}]', inputGenerator(), '[a, b]'), expected); + assertEqArray(fn('[, [, ...{0: a, 1: b}]]', inputDeep, '[a, b]'), expected); + assertEqArray(fn('{a: [, ...{0: a, 1: b}]}', inputObject, '[a, b]'), expected); +} + +function testStr(fn) { + assertEqArray(fn('[, ...rest]', inputStr), expectedStr); + + assertEqArray(fn('[, ...[...rest]]', inputStr), expectedStr); + + assertEqArray(fn('[, ...{0: a, 1: b}]', inputStr, '[a, b]'), expectedStr); +} + +function testForIn(pattern, input, binding) { + binding = binding || 'rest'; + return new Function('input', + 'for (var ' + pattern + ' in {[input]: 1}) {}' + + 'return ' + binding + )(input); +} +testStr(testForIn); + +function testVar(pattern, input, binding) { + binding = binding || 'rest'; + return new Function('input', + 'var ' + pattern + ' = input;' + + 'return ' + binding + )(input); +} +testDeclaration(testVar); + +function testGlobal(pattern, input, binding) { + binding = binding || 'rest'; + return new Function('input', + '(' + pattern + ' = input);' + + 'return ' + binding + )(input); +} +testAll(testGlobal); + +function testClosure(pattern, input, binding) { + binding = binding || 'rest'; + const decl = binding.replace('[', '').replace(']', ''); + return new Function('input', + 'var ' + decl + '; (function () {' + + '(' + pattern + ' = input);' + + '})();' + + 'return ' + binding + )(input); +} +testDeclaration(testClosure); + +function testArgument(pattern, input, binding) { + binding = binding || 'rest'; + return new Function('input', + 'return (function (' + pattern + ') {' + + 'return ' + binding + '; })(input);' + )(input); +} +testDeclaration(testArgument); + +function testArgumentFunction(pattern, input, binding) { + binding = binding || 'rest'; + return new Function(pattern, + 'return ' + binding + )(input); +} +// ES6 requires the `Function` constructor to accept arbitrary +// `BindingElement`s as formal parameters. +testDeclaration(testArgumentFunction); + +function testThrow(pattern, input, binding) { + binding = binding || 'rest'; + return new Function('input', + 'try { throw input }' + + 'catch(' + pattern + ') {' + + 'return ' + binding + '; }' + )(input); +} +testDeclaration(testThrow); diff --git a/js/src/jit-test/tests/basic/dict-object-freeze-or-seal.js b/js/src/jit-test/tests/basic/dict-object-freeze-or-seal.js new file mode 100644 index 0000000000..595e5ca55a --- /dev/null +++ b/js/src/jit-test/tests/basic/dict-object-freeze-or-seal.js @@ -0,0 +1,26 @@ +let sym = Symbol(); + +let o = {x: 1, y: 2, z: 3, a: 4, b: 5, 12345678: 6, [sym]: 7}; +for (let i = 0; i < 100; i++) { + o["foo" + i] = 1; +} +delete o.x; + +Object.seal(o); +assertEq(Object.getOwnPropertyNames(o).length, 105); +assertEq(Object.getOwnPropertySymbols(o).length, 1); + +assertEq(Object.isSealed(o), true); +assertEq(Object.isFrozen(o), false); + +let desc = Object.getOwnPropertyDescriptor(o, "y"); +assertEq(desc.writable, true); +assertEq(desc.configurable, false); + +Object.freeze(o); +assertEq(Object.isSealed(o), true); +assertEq(Object.isFrozen(o), true); + +desc = Object.getOwnPropertyDescriptor(o, "y"); +assertEq(desc.writable, false); +assertEq(desc.configurable, false); diff --git a/js/src/jit-test/tests/basic/dictionary-add-prop-oom.js b/js/src/jit-test/tests/basic/dictionary-add-prop-oom.js new file mode 100644 index 0000000000..e393cfca6b --- /dev/null +++ b/js/src/jit-test/tests/basic/dictionary-add-prop-oom.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this) +enableShapeConsistencyChecks(); +oomTest(() => { + var obj = {a: 1, b: 2, c: 3}; + delete obj.a; + for (var i = 0; i < 100; i++) { + obj["x" + i] = i; + } +}); diff --git a/js/src/jit-test/tests/basic/dictionary-delete-compact.js b/js/src/jit-test/tests/basic/dictionary-delete-compact.js new file mode 100644 index 0000000000..73887c978c --- /dev/null +++ b/js/src/jit-test/tests/basic/dictionary-delete-compact.js @@ -0,0 +1,74 @@ +// Stress test dictionary object/map property deletion/addition/compaction. + +const numProps = 1000; + +// Delete a range of properties and check correctness. +function deleteRange(deleteStart, deleteEnd) { + for (var i = 0; i < numProps; i++) { + o["x" + i] = i; + } + for (var i = deleteStart; i < deleteEnd; i++) { + delete o["x" + i]; + } + assertEq(Object.getOwnPropertyNames(o).length, + numProps - (deleteEnd - deleteStart)); + for (var i = 0; i < numProps; i++) { + if (deleteStart <= i && i < deleteEnd) { + assertEq(("x" + i) in o, false); + } else { + assertEq(o["x" + i], i); + } + } +} + +// For every "stride" properties, delete all of them except one. +function deleteMany(stride) { + for (var i = 0; i < numProps; i++) { + o["x" + i] = i; + } + var propsNotDeleted = 0; + for (var i = 0; i < numProps; i++) { + if ((i % stride) === 1) { + propsNotDeleted++; + continue; + } + delete o["x" + i]; + } + assertEq(Object.getOwnPropertyNames(o).length, propsNotDeleted); + for (var i = 0; i < numProps; i++) { + if ((i % stride) !== 1) { + assertEq(("x" + i) in o, false); + } else { + assertEq(o["x" + i], i); + } + } +} + +var o = {}; + +function test(useFreshObject) { + function testOne(f) { + if (useFreshObject) { + o = {}; + } + f(); + } + + for (var i = 6; i < 12; i++) { + testOne(_ => deleteRange(i, 1000)); + } + testOne(_ => deleteRange(100, 1000)); + testOne(_ => deleteRange(0, 1000)); + testOne(_ => deleteRange(1, 1000)); + testOne(_ => deleteRange(8, 990)); + + testOne(_ => deleteMany(3)); + testOne(_ => deleteMany(7)); + testOne(_ => deleteMany(8)); + testOne(_ => deleteMany(15)); + testOne(_ => deleteMany(111)); +} + +test(true); +o = {}; +test(false); diff --git a/js/src/jit-test/tests/basic/disable-jit-backend.js b/js/src/jit-test/tests/basic/disable-jit-backend.js new file mode 100644 index 0000000000..2eb0fa84eb --- /dev/null +++ b/js/src/jit-test/tests/basic/disable-jit-backend.js @@ -0,0 +1,19 @@ +// |jit-test| --no-jit-backend + +assertEq(wasmIsSupportedByHardware(), false); +assertEq(wasmIsSupported(), false); +assertEq(isAsmJSCompilationAvailable(), false); + +function test() { + var sum = 0; + for (var i = 0; i < 15; i++) { + sum += i; + } + return sum; +} +assertEq(test(), 105); + +var re = /[\d][a-z]{3}[\d]/; +for (var i = 0; i < 10; i++) { + assertEq(re.exec("123foo456")[0], "3foo4"); +} diff --git a/js/src/jit-test/tests/basic/disassemble-filename.js b/js/src/jit-test/tests/basic/disassemble-filename.js new file mode 100644 index 0000000000..3c97e229d3 --- /dev/null +++ b/js/src/jit-test/tests/basic/disassemble-filename.js @@ -0,0 +1,10 @@ +if (typeof disassemble !== "function") { + quit(); +} + +const out = evaluate(` +disassemble(); +`, { + fileName: String.fromCharCode(3823486100), +}); +assertEq(out.includes(`"file": "\uC494",`), true); diff --git a/js/src/jit-test/tests/basic/display-url-in-stack-trace.js b/js/src/jit-test/tests/basic/display-url-in-stack-trace.js new file mode 100644 index 0000000000..acab47ab61 --- /dev/null +++ b/js/src/jit-test/tests/basic/display-url-in-stack-trace.js @@ -0,0 +1,27 @@ +eval(` + function a() { + return b(); + } + //# sourceURL=source-a.js +`); + +eval(` + function b() { + return c(); + } + //# sourceURL=source-b.js +`); + +eval(` + function c() { + return Error().stack; + } + //# sourceURL=source-c.js +`); + +let filenames = a().split(/\n/) + .map(f => f.slice(f.indexOf("@") + 1, f.indexOf(":"))); +print(filenames.join("\n")); +assertEq(filenames[0], "source-c.js"); +assertEq(filenames[1], "source-b.js"); +assertEq(filenames[2], "source-a.js"); diff --git a/js/src/jit-test/tests/basic/doMath.js b/js/src/jit-test/tests/basic/doMath.js new file mode 100644 index 0000000000..8129a466e2 --- /dev/null +++ b/js/src/jit-test/tests/basic/doMath.js @@ -0,0 +1,60 @@ +function map_test(t, cases) +{ + for (var i = 0; i < cases.length; i++) { + function c() { return t(cases[i].input); } + var expected = cases[i].expected; + assertEq(c(), expected); + } +} + +function lsh_inner(n) +{ + var r; + for (var i = 0; i < 35; i++) + r = 0x1 << n; + return r; +} +map_test (lsh_inner, + [{input: 15, expected: 32768}, + {input: 55, expected: 8388608}, + {input: 1, expected: 2}, + {input: 0, expected: 1}]); + +function rsh_inner(n) +{ + var r; + for (var i = 0; i < 35; i++) + r = 0x11010101 >> n; + return r; +} +map_test (rsh_inner, + [{input: 8, expected: 1114369}, + {input: 5, expected: 8914952}, + {input: 35, expected: 35659808}, + {input: -1, expected: 0}]); + +function ursh_inner(n) +{ + var r; + for (var i = 0; i < 35; i++) + r = -55 >>> n; + return r; +} +map_test (ursh_inner, + [{input: 8, expected: 16777215}, + {input: 33, expected: 2147483620}, + {input: 0, expected: 4294967241}, + {input: 1, expected: 2147483620}]); + +function doMath_inner(cos) +{ + var s = 0; + var sin = Math.sin; + for (var i = 0; i < 200; i++) + s = -Math.pow(sin(i) + cos(i * 0.75), 4); + return s; +} +function doMath() { + return doMath_inner(Math.cos); +} +assertEq(doMath(), -0.5405549555611059); diff --git a/js/src/jit-test/tests/basic/dumpStringRepresentation.js b/js/src/jit-test/tests/basic/dumpStringRepresentation.js new file mode 100644 index 0000000000..049d46ba30 --- /dev/null +++ b/js/src/jit-test/tests/basic/dumpStringRepresentation.js @@ -0,0 +1,88 @@ +// |jit-test| skip-if: typeof dumpStringRepresentation !== 'function' + +// Try the dumpStringRepresentation shell function on various types of +// strings, and make sure it doesn't crash. + +print("Empty string:"); +dumpStringRepresentation(""); + +print("\nResult of coercion to string:"); +dumpStringRepresentation(); + +print("\nString with an index value:"); +dumpStringRepresentation((12345).toString()); + +print("\ns = Simple short atom:"); +var s = "xxxxxxxx"; +dumpStringRepresentation(s); + +// Simple non-atom flat. +print("\ns + s: Non-atom flat:"); +var s2 = s + s; +dumpStringRepresentation(s2); + +print("\nNon-Latin1 flat:"); +var j = "渋谷区"; +dumpStringRepresentation(j); + +print("\nt = Non-inline atom:"); +var t = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // 31 characters +dumpStringRepresentation(t); + +print("\nr1 = t + s: Simple rope:"); +var r1 = t + s; +dumpStringRepresentation(r1); + +// Flatten that rope, and re-examine the representations of both the result and +// its former leaves. This should be an extensible string. +print("\nr1, former rope after flattening, now extensible:"); +r1.match(/x/); +dumpStringRepresentation(r1); + +print("\nt, s: Original leaves, representation unchanged:"); +dumpStringRepresentation(t); +dumpStringRepresentation(s); + +// Create a new rope with the extensible string as its left child. +print("\nr2 = r1 + s: Rope with extensible leftmost child:"); +var r2 = r1 + s; +dumpStringRepresentation(r2); + +// Flatten that; this should re-use the extensible string's buffer. +print("\nr2: flattened, stole r1's buffer:"); +r2.match(/x/); +dumpStringRepresentation(r2); + +print("\nr1: mutated into a dependent string:"); +dumpStringRepresentation(r1); + +print("\nr3 = r2 + s: a new rope with an extensible leftmost child:"); +r3 = r2 + s; +r3.match(/x/); +dumpStringRepresentation(r3); + +print("\nr2: now mutated into a dependent string"); +dumpStringRepresentation(r2); + +print("\nr1: now a doubly-dependent string, because of r2's mutation:"); +dumpStringRepresentation(r1); + +print("\nt, s: Original leaves, representation unchanged:"); +dumpStringRepresentation(t); +dumpStringRepresentation(s); + +// Extensible string, created directly. +print("\nExtensible:"); +var e = newString("一二三四五六七八九*一二三四五六七八", { capacity: 80 }); +dumpStringRepresentation(e); + +// Reuse an extensible string's storage when flattening a rope whose DAG contains +// the extensible string multiple times. +print("\nFlattened dag with shared leaves:"); +var e_flat = newRope(e, newRope(e, "!")); +ensureLinearString(e_flat); +dumpStringRepresentation(e_flat); +assertEq(e_flat.charAt(e.length), e_flat.charAt(0)); + +for (var str of representativeStringArray()) + dumpStringRepresentation(str); diff --git a/js/src/jit-test/tests/basic/dumpValue.js b/js/src/jit-test/tests/basic/dumpValue.js new file mode 100644 index 0000000000..6bf4ffcb8d --- /dev/null +++ b/js/src/jit-test/tests/basic/dumpValue.js @@ -0,0 +1,134 @@ +// |jit-test| skip-if: typeof dumpValue !== 'function' || getBuildConfiguration("windows") + +// FIXME: Fix backslash handling on windows (bug 1880003). + +// Try the dumpValue and dumpValueToString shell functions on various types of +// values, and make sure theyit don't crash, and the result is valid JSON. + +function testDump(v) { + dumpValue(v); + + const s = dumpValueToString(v); + + const result = JSON.parse(s); + assertEq(typeof result, "object"); + assertEq(typeof result.type, "string"); +} + + +testDump(1); +testDump(1.1); +testDump(-0.1); + +testDump(100n); + +testDump(true); +testDump(false); + +testDump(null); + +testDump(undefined); + +// dumpStringRepresentation.js covers more strings. +testDump("foo"); + +testDump(/foo/ig); + +testDump(Symbol.iterator); +testDump(Symbol("hello")); +testDump(Symbol.for("hello")); + +testDump({}); +testDump({ prop1: 10, prop2: 20 }); + +testDump([]); +testDump([1, , 3, 4]); + +testDump(function f() {}); +testDump(function* f() {}); +testDump(async function f() {}); +testDump(async function* f() {}); + +testDump(Promise.withResolvers()); + +var p1 = new Promise(() => {}); p1.then(() => {}); +testDump(p1); +var p2 = new Promise(() => {}); p2.then(() => {}); p2.then(() => {}); +testDump(p2); +var p3 = Promise.reject(10).catch(() => {}); +testDump(p3); + +testDump(new ArrayBuffer([1, 2, 3])); +testDump(new Int8Array([1, 2, 3])); +testDump(new Int8Array(new Int8Array([1, 2, 3]).buffer, 1)); +testDump(new Int32Array([1, 2, 3])); +testDump(new Int32Array(new Int32Array([1, 2, 3]).buffer, 4)); +testDump(new Float64Array([1, 2, 3])); + +testDump(new Date()); +testDump(new Map([[1, 2]])); +testDump(new Set([1, 2])); +testDump(new WeakMap([ [{}, 10], [{}, 20] ])); +testDump(new WeakSet([{}, {}])); +testDump(new Proxy({}, {})); + +testDump(Array); +testDump(Array.prototype); +testDump(this); + +testDump([ + 1, + 1.1, + -0.1, + + 100n, + + true, + false, + + null, + + undefined, + + "foo", + + /foo/ig, + + Symbol.iterator, + Symbol("hello"), + Symbol.for("hello"), + + {}, + { prop1: 10, prop2: 20 }, + + [], + [1, , 3, 4], + + function f() {}, + function* f() {}, + async function f() {}, + async function* f() {}, + + Promise.withResolvers(), + p1, + p2, + p3, + + new ArrayBuffer([1, 2, 3]), + new Int8Array([1, 2, 3]), + new Int8Array(new Int8Array([1, 2, 3]).buffer, 1), + new Int32Array([1, 2, 3]), + new Int32Array(new Int32Array([1, 2, 3]).buffer, 4), + new Float64Array([1, 2, 3]), + new Float64Array([1, 2, 3]), + + new Map([[1, 2]]), + new Set([1, 2]), + new WeakMap([ [{}, 10], [{}, 20] ]), + new WeakSet([{}, {}]), + new Proxy({}, {}), + + Array, + Array.prototype, + this, +]); diff --git a/js/src/jit-test/tests/basic/eif-generator.js b/js/src/jit-test/tests/basic/eif-generator.js new file mode 100644 index 0000000000..afd6e427f0 --- /dev/null +++ b/js/src/jit-test/tests/basic/eif-generator.js @@ -0,0 +1,58 @@ +load(libdir + "evalInFrame.js"); + +function* f() { + { + let x = 1; + while (true) { + yield evalInFrame(0, "x"); + x++; + { + let y = 1; + yield evalInFrame(0, "++y"); + yield evalInFrame(0, "++y"); + } + } + } +} + +var gen = f(); +assertEq(gen.next().value, 1); +assertEq(gen.next().value, 2); +gc(); +assertEq(gen.next().value, 3); +gc(); +assertEq(gen.next().value, 2); +assertEq(gen.next().value, 2); +gc(); +assertEq(gen.next().value, 3); +gc(); +assertEq(gen.next().value, 3); +assertEq(gen.next().value, 2); +gc(); +assertEq(gen.next().value, 3); +gen = null; +gc(); + +function* g() { + { + let x = 1; + while (true) { + var inner = function (inc) { x += inc; return evalInFrame(0, "x") }; + assertEq(inner(0), x); + yield inner; + assertEq(inner(0), x); + } + } +} + +var gen = g(); +var g1 = gen.next().value; +var g2 = gen.next().value; +gc(); +assertEq(g1(1), 2); +assertEq(g2(1), 3); +gc(); +assertEq(g1(1), 4); +assertEq(g2(1), 5); +gen = g1 = g2 = null; +gc(); diff --git a/js/src/jit-test/tests/basic/emulates-undefined.js b/js/src/jit-test/tests/basic/emulates-undefined.js new file mode 100644 index 0000000000..3e379d8746 --- /dev/null +++ b/js/src/jit-test/tests/basic/emulates-undefined.js @@ -0,0 +1,18 @@ +function test() { + var values = [undefined, null, Math, createIsHTMLDDA()]; + var expected = [true, true, false, true]; + + for (var i=0; i<100; i++) { + var idx = i % values.length; + if (values[idx] == undefined) + assertEq(expected[idx], true); + else + assertEq(expected[idx], false); + + if (null != values[idx]) + assertEq(expected[idx], false); + else + assertEq(expected[idx], true); + } +} +test(); diff --git a/js/src/jit-test/tests/basic/equalInt.js b/js/src/jit-test/tests/basic/equalInt.js new file mode 100644 index 0000000000..d63c8815db --- /dev/null +++ b/js/src/jit-test/tests/basic/equalInt.js @@ -0,0 +1,29 @@ +function equalInt() +{ + var i1 = 55, one = 1, zero = 0, undef; + var o1 = { }, o2 = { }; + var s = "5"; + var hits = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; + for (var i = 0; i < 5000; i++) { + if (i1 == 55) hits[0]++; + if (i1 != 56) hits[1]++; + if (i1 < 56) hits[2]++; + if (i1 > 50) hits[3]++; + if (i1 <= 60) hits[4]++; + if (i1 >= 30) hits[5]++; + if (i1 == 7) hits[6]++; + if (i1 != 55) hits[7]++; + if (i1 < 30) hits[8]++; + if (i1 > 90) hits[9]++; + if (i1 <= 40) hits[10]++; + if (i1 >= 70) hits[11]++; + if (o1 == o2) hits[12]++; + if (o2 != null) hits[13]++; + if (s < 10) hits[14]++; + if (true < zero) hits[15]++; + if (undef > one) hits[16]++; + if (undef < zero) hits[17]++; + } + return hits.toString(); +} +assertEq(equalInt(), "5000,5000,5000,5000,5000,5000,0,0,0,0,0,0,0,5000,5000,0,0,0"); diff --git a/js/src/jit-test/tests/basic/error-stack-accessors.js b/js/src/jit-test/tests/basic/error-stack-accessors.js new file mode 100644 index 0000000000..9bbcae14ba --- /dev/null +++ b/js/src/jit-test/tests/basic/error-stack-accessors.js @@ -0,0 +1,31 @@ +// Test the Error.prototype.stack getter/setter with various "fun" edge cases. + +load(libdir + "asserts.js"); + +// Stack should be accessible in subclasses. The accessor should walk up the +// prototype chain. +assertEq(typeof Object.create(Error()).stack, "string"); +assertEq(Object.create(Error.prototype).stack, ""); + +// Stack should be overridable in subclasses. +{ + let myError = Object.create(Error()); + myError.stack = 5; + assertEq(myError.stack, 5); + + let myOtherError = Object.create(Error.prototype); + myOtherError.stack = 2; + assertEq(myOtherError.stack, 2); +} + +// Should throw when there is no Error in the `this` object's prototype chain. +var obj = Object.create(null); +var desc = Object.getOwnPropertyDescriptor(Error.prototype, "stack"); +Object.defineProperty(obj, "stack", desc); +assertThrowsInstanceOf(() => obj.stack, TypeError); + +// Should throw with non-object `this` values. +assertThrowsInstanceOf(desc.set, TypeError); +assertThrowsInstanceOf(desc.set.bind("string"), TypeError); +assertThrowsInstanceOf(desc.get, TypeError); +assertThrowsInstanceOf(desc.get.bind("string"), TypeError); diff --git a/js/src/jit-test/tests/basic/error-toString.js b/js/src/jit-test/tests/basic/error-toString.js new file mode 100644 index 0000000000..44839333d9 --- /dev/null +++ b/js/src/jit-test/tests/basic/error-toString.js @@ -0,0 +1,9 @@ +var errorToString = Error.prototype.toString; + + +assertEq(errorToString.call({message: "", name: ""}), ""); +assertEq(errorToString.call({name: undefined, message: ""}), "Error"); +assertEq(errorToString.call({name: "Test", message: undefined}), "Test"); +assertEq(errorToString.call({name: "Test", message: ""}), "Test"); +assertEq(errorToString.call({name: "", message: "Test"}), "Test"); +assertEq(errorToString.call({name: "Test", message: "it!"}), "Test: it!"); diff --git a/js/src/jit-test/tests/basic/eval-introduction-principals.js b/js/src/jit-test/tests/basic/eval-introduction-principals.js new file mode 100644 index 0000000000..25eb1bea82 --- /dev/null +++ b/js/src/jit-test/tests/basic/eval-introduction-principals.js @@ -0,0 +1,16 @@ +// Ensure the introduction info for eval scripts respects principal checks. + +function myAPI(f) { return f(); } + +var contentGlobal = newGlobal({principal: 0x1}); +contentGlobal.chrome = this; +contentGlobal.eval("\n" + + "function contentTest() { chrome.myAPI(eval.bind(undefined, 'chrome.stack = Error().stack;')) };\n" + + "contentTest();"); + +// Note that the stack below does not include the current filename or file +// line numbers, and there's no trace of the myAPI call between the two +// evals. +assertEq(stack, "@eval line 2 > eval:1:16\n" + + "contentTest@eval:2:33\n" + + "@eval:3:1\n"); diff --git a/js/src/jit-test/tests/basic/eval-json-differences.js b/js/src/jit-test/tests/basic/eval-json-differences.js new file mode 100644 index 0000000000..eb7ff3389b --- /dev/null +++ b/js/src/jit-test/tests/basic/eval-json-differences.js @@ -0,0 +1,25 @@ +load(libdir + "asserts.js"); + +// eval({__proto__}) changes [[Prototype]] +var obj = eval('({"__proto__": null})'); +assertEq(Object.getPrototypeOf(obj), null); +assertEq(Object.prototype.hasOwnProperty.call(obj, "__proto__"), false); + +// JSON.parse({__proto__}) creates new property __proto__ +obj = JSON.parse('{"__proto__": null}'); +assertEq(Object.getPrototypeOf(obj), Object.prototype); +assertEq(Object.prototype.hasOwnProperty.call(obj, "__proto__"), true); + +// If __proto__ appears more than once as quoted or unquoted property name in an +// object initializer expression, that's an error. +//(No other property name has this restriction.)" +assertThrowsInstanceOf(() => + eval('({ "__proto__" : null, "__proto__" : null })'), SyntaxError); + +assertThrowsInstanceOf(() => + eval(' ({ "__proto__" : null, "__proto__" : null })'), SyntaxError); + +// JSON.parse doesn't care about duplication, the last definition counts. +obj = JSON.parse('{"__proto__": null, "__proto__": 5}'); +assertEq(Object.getPrototypeOf(obj), Object.prototype); +assertEq(obj["__proto__"], 5); diff --git a/js/src/jit-test/tests/basic/eval-scopes.js b/js/src/jit-test/tests/basic/eval-scopes.js new file mode 100644 index 0000000000..695adb8a79 --- /dev/null +++ b/js/src/jit-test/tests/basic/eval-scopes.js @@ -0,0 +1,74 @@ +function bytecode(f) { + if (typeof disassemble !== "function") + return "unavailable"; + var d = disassemble(f); + return d.slice(d.indexOf("main:"), d.indexOf("\n\n")); +} + +function hasGname(f, v, hasIt = true) { + // Do a try-catch that prints the full stack, so we can tell + // _which_ part of this test failed. + try { + var b = bytecode(f); + if (b != "unavailable") { + assertEq(b.includes(`GetGName "${v}"`), hasIt); + assertEq(b.includes(`GetName "${v}"`), !hasIt); + } + } catch (e) { + print(e.stack); + throw e; + } +} + +var x = "outer"; + +{ + let x = "inner"; + eval("function h() { assertEq(x, 'inner');} h()"); + eval("function h2() { (function nest() { assertEq(x, 'inner'); })(); } h2()"); +} + +// GNAME optimizations should work through lazy parsing. +eval(` + function h3() { + assertEq(x, 'outer'); + } + h3(); + hasGname(h3, 'x', true); + `); +eval(` + function h4() { + function nest() { assertEq(x, 'outer'); } + nest(); + return nest; + } + hasGname(h4(), 'x', true); + `); + +with ({}) { + let x = "inner"; + eval("function j() { assertEq(x, 'inner');} j()"); + eval("function j2() { (function nest() { assertEq(x, 'inner'); })(); } j2()"); +} + +(function () { + let x = "inner"; + eval("function l() { assertEq(x, 'inner');} l()"); + eval("function l2() { (function nest() { assertEq(x, 'inner'); })(); } l2()"); +})(); + +var y1 = 5; +eval(` + 'use strict'; + var y1 = 6; + assertEq(y1, 6); + (function() { assertEq(y1, 6); })() + `); +assertEq(y1, 5); + +eval(` + 'use strict'; + var y2 = 6; + assertEq(y2, 6); + (function() { assertEq(y2, 6); })() + `); diff --git a/js/src/jit-test/tests/basic/evalInWorker-interrupt.js b/js/src/jit-test/tests/basic/evalInWorker-interrupt.js new file mode 100644 index 0000000000..acd09f0077 --- /dev/null +++ b/js/src/jit-test/tests/basic/evalInWorker-interrupt.js @@ -0,0 +1,2 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +evalInWorker("setInterruptCallback(function() {}); timeout(1000);"); diff --git a/js/src/jit-test/tests/basic/evalInWorker-jit-options.js b/js/src/jit-test/tests/basic/evalInWorker-jit-options.js new file mode 100644 index 0000000000..24c624539f --- /dev/null +++ b/js/src/jit-test/tests/basic/evalInWorker-jit-options.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +var fun = function() { + var ex; + try { + setJitCompilerOption("baseline.warmup.trigger", 5); + } catch(e) { + ex = e; + } + assertEq(ex && ex.toString().includes("Can't set"), true); +} +evalInWorker("(" + fun.toString() + ")()"); diff --git a/js/src/jit-test/tests/basic/evalInWorker-nested.js b/js/src/jit-test/tests/basic/evalInWorker-nested.js new file mode 100644 index 0000000000..1ae4805038 --- /dev/null +++ b/js/src/jit-test/tests/basic/evalInWorker-nested.js @@ -0,0 +1,5 @@ +try { + evalInWorker("evalInWorker('evalInWorker(\"assertEq(1, 1)\")')"); +} catch(e) { + assertEq(e.toString().includes("--no-threads"), true); +} diff --git a/js/src/jit-test/tests/basic/evalInWorker-stack-limit.js b/js/src/jit-test/tests/basic/evalInWorker-stack-limit.js new file mode 100644 index 0000000000..c1a1f472f1 --- /dev/null +++ b/js/src/jit-test/tests/basic/evalInWorker-stack-limit.js @@ -0,0 +1,8 @@ +try { + evalInWorker(` + function f() { f(); } + try { f(); } catch(e) {} + `); +} catch(e) { + assertEq(e.toString().includes("--no-threads"), true); +} diff --git a/js/src/jit-test/tests/basic/evalReturningScope-global.js b/js/src/jit-test/tests/basic/evalReturningScope-global.js new file mode 100644 index 0000000000..e8411b59f2 --- /dev/null +++ b/js/src/jit-test/tests/basic/evalReturningScope-global.js @@ -0,0 +1,14 @@ +// Passing global with discardSource shouldn't crash. + +const g = newGlobal({ + discardSource: true +}); + +evalReturningScope(` +var f = function(){ + var g = function(){ + }; + g(); +}; +f(); +`, g); diff --git a/js/src/jit-test/tests/basic/evaluate-catchTermination.js b/js/src/jit-test/tests/basic/evaluate-catchTermination.js new file mode 100644 index 0000000000..6a9d3c74a7 --- /dev/null +++ b/js/src/jit-test/tests/basic/evaluate-catchTermination.js @@ -0,0 +1,6 @@ +// Test evaluate's catchTermination option. + +var x = 0; +assertEq(evaluate('x = 1; terminate(); x = 2;', { catchTermination: true }), + "terminated"); +assertEq(x, 1); diff --git a/js/src/jit-test/tests/basic/evaluate-global-debuggee.js b/js/src/jit-test/tests/basic/evaluate-global-debuggee.js new file mode 100644 index 0000000000..cdc88bafb5 --- /dev/null +++ b/js/src/jit-test/tests/basic/evaluate-global-debuggee.js @@ -0,0 +1,5 @@ +var a = newGlobal({ newCompartment: true }); +Debugger(a); +evaluate("function h() { 'use asm'; return {}}", { + global: a +}); diff --git a/js/src/jit-test/tests/basic/evaluate-global-discardSource.js b/js/src/jit-test/tests/basic/evaluate-global-discardSource.js new file mode 100644 index 0000000000..9bacbacbab --- /dev/null +++ b/js/src/jit-test/tests/basic/evaluate-global-discardSource.js @@ -0,0 +1,11 @@ +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); + +let g_discardSource = newGlobal({ + discardSource: true, +}); + +g.evaluate("function f() { (function(){})(); }; f();", { + global: g_discardSource, +}); diff --git a/js/src/jit-test/tests/basic/evaluate-negative-column.js b/js/src/jit-test/tests/basic/evaluate-negative-column.js new file mode 100644 index 0000000000..c86bd20447 --- /dev/null +++ b/js/src/jit-test/tests/basic/evaluate-negative-column.js @@ -0,0 +1,3 @@ +// Negative column number should be handled as the first column. +const column = evaluate("new Error().columnNumber;", { columnNumber: -1 }); +assertEq(column, 1); diff --git a/js/src/jit-test/tests/basic/evaluate-restore-options.js b/js/src/jit-test/tests/basic/evaluate-restore-options.js new file mode 100644 index 0000000000..263cc7272a --- /dev/null +++ b/js/src/jit-test/tests/basic/evaluate-restore-options.js @@ -0,0 +1,11 @@ +// Bug 791157: the shell 'evaluate' function should properly restore the +// context's options. + +try { + evaluate('%', {noScriptRval: true}); +} catch(e) {} +new Function(""); + +try { + evaluate('new Function("");', {noScriptRval: true}); +} catch (e) {} diff --git a/js/src/jit-test/tests/basic/evaluate-worker.js b/js/src/jit-test/tests/basic/evaluate-worker.js new file mode 100644 index 0000000000..a382ee339d --- /dev/null +++ b/js/src/jit-test/tests/basic/evaluate-worker.js @@ -0,0 +1,19 @@ +// |jit-test| slow; skip-if: typeof evalInWorker === 'undefined' || helperThreadCount() === 0 + +gcslice(11); +evalInWorker("print('helo world');"); +for (i = 0; i < 100000; i++) {} + +evalInWorker("\ + for (var i = 0; i < 10; i++) { \ + var o = {}; \ + for (var j = 0; j < 100; j++) \ + o['a' + j] = j; \ + JSON.stringify(o); \ + o = null; \ + gc(); \ +}"); +for (var i = 0; i < 10; i++) { + gc(); + for (var j = 0; j < 100000; j++) {} +} diff --git a/js/src/jit-test/tests/basic/exception-column-number.js b/js/src/jit-test/tests/basic/exception-column-number.js new file mode 100644 index 0000000000..1df01b4848 --- /dev/null +++ b/js/src/jit-test/tests/basic/exception-column-number.js @@ -0,0 +1,11 @@ +try { + Array.from(); +} catch (e) { + assertEq(e.columnNumber, 11); + // Filter the filename from the stack, since we have no clue what + // to expect there. Search for ':' from the end, because the file + // path may contain ':' in it. + var lastColon = e.stack.lastIndexOf(':'); + var afterPath = e.stack.lastIndexOf(':', lastColon - 1); + assertEq(e.stack.substring(afterPath), ":2:11\n"); +} diff --git a/js/src/jit-test/tests/basic/expr-decompiler-bug1475953.js b/js/src/jit-test/tests/basic/expr-decompiler-bug1475953.js new file mode 100644 index 0000000000..5b1b93b75e --- /dev/null +++ b/js/src/jit-test/tests/basic/expr-decompiler-bug1475953.js @@ -0,0 +1,35 @@ +Object.defineProperty(this, "fuzzutils", { value:{} }); +try { evaluate(` + var f = 396684; + var src = "return f(" +Array(10*1000).join("0,")+"Math.atan2());"; + var result = new Function(src)(); +`); +} catch (exc) {} +try { + evalInWorker(` + function lfEvalInCache(lfCode, lfIncremental = false, lfRunOnce = false) { + ctx = Object.create(ctx, {}); + } + try { evaluate(\` + var f = 396684; + var src = "return f(" +Array(10*1000).join("0,")+"Math.atan2());"; + var result = new Function(src)(); + \`); } catch(exc) {} + `); + evalInWorker(` + Object.defineProperty(this, "fuzzutils", { value:{} }); + try { evaluate(\` + var f = 396684; + var src = "return f(" +Array(10*1000).join("0,")+"Math.atan2());"; + var result = new Function(src)(); + \`); } catch(exc) {} + `); +} catch (exc) {} +try { evalInWorker(` + try { evaluate(\` + var f = 396684; + var src = "return f(" +Array(10*1000).join("0,")+"Math.atan2());"; + var result = new Function(src)(); + \`); } catch(exc) {} +`); +} catch (exc) {} diff --git a/js/src/jit-test/tests/basic/expression-autopsy.js b/js/src/jit-test/tests/basic/expression-autopsy.js new file mode 100644 index 0000000000..a5c4801719 --- /dev/null +++ b/js/src/jit-test/tests/basic/expression-autopsy.js @@ -0,0 +1,287 @@ +// |jit-test| skip-if: getBuildConfiguration('pbl') +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +function check_one(expected, f, err) { + var failed = true; + try { + f(); + failed = false; + } catch (ex) { + assertEq(ex.constructor.name, "TypeError"); + var s = ex.message; + assertEq(s.slice(-err.length), err); + assertEq(s.slice(-(err.length + expected.length), -err.length), expected); + } + if (!failed) + throw new Error("didn't fail"); +} +ieval = eval; +function check(expr, expected=expr, testStrict=true) { + var end, err; + for ([end, err] of [[".random_prop", " is undefined"], ["()", " is not a function"]]) { + var statement = "o = {};" + expr + end, f; + var cases = [ + // Global scope + function () { + ieval("var o, undef;\n" + statement); + }, + // Function scope + Function("o", "undef", statement), + // Function scope with variables + Function("var o, undef;\n" + statement), + // Function scope with some different arugments + Function("arg1", "arg2", "var o, undef;\n" + statement), + // Deoptimized function scope + Function("o", "undef", "with (Object) {}\n" + statement), + // Inside with + Function("with (Object) { " + statement + " }"), + // Closure + Function("o", "undef", "function myfunc() { return o + undef; }\n" + statement), + // Let definitions in a block + Function("{ let o, undef;\n" + statement + "}"), + // Let in a switch + Function("var x = 4; switch (x) { case 4: let o, undef;" + statement + "\ncase 6: break;}"), + // Try-catch blocks + Function("o", "undef", "try { let q = 4; try { let p = 4; } catch (e) {} } catch (e) {} { let o, undef; " + statement + " }"), + // Let in for-in (uses with to prevent jit compilation: bug 942804, bug 831120 and bug 1041586) + Function("with ({}) {} var undef, o; for (let z in [1, 2]) { " + statement + " }"), + ]; + + if (testStrict) { + // Strict mode. + cases.push(Function("o", "undef", "\"use strict\";\n" + statement)); + } + + for (var f of cases) { + check_one(expected, f, err); + } + } +} + +check("undef"); +check("o.b"); +check("o.length"); +check("o[true]"); +check("o[false]"); +check("o[null]"); +check("o[0]"); +check("o[1]"); +check("o[3]"); +check("o[256]"); +check("o[65536]"); +check("o[268435455]"); +check("o['1.1']"); +check("o[4 + 'h']", "o['4h']"); +check("ieval(undef)", "ieval(...)"); +check("ieval.call()", "ieval.call()"); +check("ieval(...[])", "ieval(...)"); +check("ieval(...[undef])", "ieval(...)"); +check("ieval(...[undef, undef])", "ieval(...)"); +check("(o[0] = 4).foo", "o[0].foo"); +// NOTE: This one produces different output in strict mode since "this" is +// undefined in that case. +check("this.x", "this.x", false); + +for (let tok of ["|", "^", "&", "==", "!==", "===", "!==", "<", "<=", ">", ">=", + ">>", "<<", ">>>", "+", "-", "*", "/", "%"]) { + check("o[(undef " + tok + " 4)]"); +} + +check("o[(!o)]"); +check("o[(~o)]"); +check("o[(+ o)]"); +check("o[(- o)]"); + +check("o[(!(o + 1))]"); +check("o[(~(o + 1))]"); +check("o[(+ (o + 1))]"); +check("o[(- (o + 1))]"); + +// A few one off tests +check_one("6", (function () { 6() }), " is not a function"); +check_one("4", (function() { (4||eval)(); }), " is not a function"); +check_one("0", (function () { Array.prototype.reverse.call('123'); }), " is read-only"); +check_one("[...][Symbol.iterator]().next().value", + function () { ieval("{ let x; var [a, b, [c0, c1]] = [x, x, x]; }") }, " is undefined"); +check_one("(void 1)", function() { (void 1)(); }, " is not a function"); +check_one("(void o[1])", function() { var o = []; (void o[1])() }, " is not a function"); + +check_one("(typeof 1)", function() { (typeof 1)(); }, " is not a function"); +check_one("(typeof o[1])", function() { var o = []; (typeof o[1])() }, " is not a function"); + +check_one("(delete foo)", + function() { (delete foo)(); }, + " is not a function"); +check_one("(delete obj.foo)", + function() { var obj = {}; (delete obj.foo)(); }, + " is not a function"); +check_one("(delete obj.foo)", + function() { "use strict"; var obj = {}; (delete obj.foo)(); }, + " is not a function"); +check_one("(delete obj[y])", + function() { var obj = {}, y = {}; (delete obj[y])(); }, + " is not a function"); +check_one("(delete obj[y])", + function() { "use strict"; var obj = {}, y = {}; (delete obj[y])(); }, + " is not a function"); + +check_one("foo.apply()", + function() { function foo() {} foo.apply()(); }, + " is not a function"); + +check_one("super()", + function() { + class X extends Object { + constructor() { + super()(); + } + } + new X(); + }, + " is not a function"); +check_one("super(...)", + function() { + class X extends Object { + constructor() { + super(...[])(); + } + } + new X(); + }, + " is not a function"); + +check_one("super.a", + function() { + class X extends Object { + test() { + super.a(); + } + } + var x = new X(); + x.test(); + }, + " is not a function"); + +check_one("super[a]", + function() { + var a = "a"; + class X extends Object { + test() { + super[a](); + } + } + var x = new X(); + x.test(); + }, + " is not a function"); + +check_one("super.a()", + function() { + class Y { + a() { + return 5; + } + } + + class X extends Y { + test() { + super.a()(); + } + } + + var x = new X(); + x.test(); + }, + " is not a function"); + +check_one("super[a]()", + function() { + class Y { + a() { + return 5; + } + } + + var a = "a"; + class X extends Y { + test() { + super[a]()(); + } + } + + var x = new X(); + x.test(); + }, + " is not a function"); + +check_one("super[1]", + function() { + class X extends Object { + foo() { + return super[1](); + } + } + new X().foo(); + }, + " is not a function"); + +check_one("eval(...)", + function() { eval("")(); }, + " is not a function"); +check_one("eval(...)", + function() { "use strict"; eval("")(); }, + " is not a function"); +check_one("eval(...)", + function() { eval(...[""])(); }, + " is not a function"); +check_one("eval(...)", + function() { "use strict"; eval(...[""])(); }, + " is not a function"); + +check_one("(new foo())", + function() { function foo() {}; new foo()(); }, + " is not a function"); +check_one("(new foo(...))", + function() { function foo() {}; new foo(...[])(); }, + " is not a function"); +check_one("(new foo.x())", + function() { var foo = { x: function() {} }; new foo.x()(); }, + " is not a function"); +check_one("(new foo.x(...))", + function() { var foo = { x: function() {} }; new foo.x(...[])(); }, + " is not a function"); + +check_one("[...].foo", + function() { [undefined].foo(); }, + " is not a function"); +check_one("[...].foo", + function() { [undefined, ...[]].foo(); }, + " is not a function"); + +check_one("[...][Symbol.iterator]().next().value", + function () { var [{x}] = [null, {}]; }, " is null"); +check_one("[...][Symbol.iterator]().next().value", + function () { var [{x}] = [void 0, {}]; }, " is undefined"); + +check_one("(a += b)", + function() { var a, b; (a += b)(); }, + " is not a function"); + +try { + (function() { + "use strict"; + var o = []; + Object.freeze(o); + o[0] = "foo"; + }()); + throw new Error("didn't throw"); +} catch (e) { + assertEq(e instanceof TypeError, true, + "expected TypeError, got " + e); + assertEq(e.message, + "can't define array index property past the end of an array with non-writable length"); +} + +// Check fallback behavior +assertThrowsInstanceOf(function () { for (let x of undefined) {} }, TypeError); diff --git a/js/src/jit-test/tests/basic/external-strings-cgc.js b/js/src/jit-test/tests/basic/external-strings-cgc.js new file mode 100644 index 0000000000..aa64172122 --- /dev/null +++ b/js/src/jit-test/tests/basic/external-strings-cgc.js @@ -0,0 +1,7 @@ +gczeal(0); +startgc(1, "shrinking"); +for (var i=0; i<100; i++) { + gcslice(100000); + var s = "abcdefghi0"; + assertEq(newString(s, {maybeExternal: true}), s); +} diff --git a/js/src/jit-test/tests/basic/external-strings.js b/js/src/jit-test/tests/basic/external-strings.js new file mode 100644 index 0000000000..fd5faa27ef --- /dev/null +++ b/js/src/jit-test/tests/basic/external-strings.js @@ -0,0 +1,48 @@ +assertEq(newString("", {external: true}), ""); +assertEq(newString("abc", {external: true}), "abc"); +assertEq(newString("abc\0def\u1234", {external: true}), "abc\0def\u1234"); + +var o = {foo: 2, "foo\0": 4}; +var ext = newString("foo", {external: true}); +assertEq(o[ext], 2); +var ext2 = newString("foo\0", {external: true}); +assertEq(o[ext2], 4); + +eval(newString("assertEq(1, 1)", {external: true})); + +// Make sure ensureLinearString does the right thing for external strings. +ext = newString("abc\0defg\0", {external: true}); +assertEq(ensureLinearString(ext), "abc\0defg\0"); +assertEq(ensureLinearString(ext), "abc\0defg\0"); + +for (var s of representativeStringArray()) + assertEq(ensureLinearString(s), s); + +for (var s of representativeStringArray()) + assertEq(newString(s, {external: true}), s); + +function testQuote() { + for (var data of [["abc", "abc"], + ["abc\t", "abc\\t"], + ["abc\t\t\0", "abc\\t\\t\\x00"], + ["abc\\def", "abc\\\\def"]]) { + try { + assertEq(newString(data[0], {external: true}), false); + } catch(e) { + assertEq(e.toString().includes('got "' + data[1] + '",'), true) + } + } +} +testQuote(); + +function testMaybeExternal() { + for (var i=0; i<10; i++) { + var s = "abcdef4321" + i; + assertEq(newString(s, {maybeExternal: true}), s); + if ((i % 2) === 0) + assertEq(ensureLinearString(newString(s, {maybeExternal: true})), s); + } +} +testMaybeExternal(); +gc(); +testMaybeExternal(); diff --git a/js/src/jit-test/tests/basic/fannkuch.js b/js/src/jit-test/tests/basic/fannkuch.js new file mode 100644 index 0000000000..a6154f2dfa --- /dev/null +++ b/js/src/jit-test/tests/basic/fannkuch.js @@ -0,0 +1,17 @@ +function fannkuch() { + var count = Array(8); + var r = 8; + var done = 0; + while (done < 40) { + // write-out the first 30 permutations + done += r; + while (r != 1) { count[r - 1] = r; r--; } + while (true) { + count[r] = count[r] - 1; + if (count[r] > 0) break; + r++; + } + } + return done; +} +assertEq(fannkuch(), 41); diff --git a/js/src/jit-test/tests/basic/fdlibm-for-sin-cos-tan-argument.js b/js/src/jit-test/tests/basic/fdlibm-for-sin-cos-tan-argument.js new file mode 100644 index 0000000000..e46a8259bc --- /dev/null +++ b/js/src/jit-test/tests/basic/fdlibm-for-sin-cos-tan-argument.js @@ -0,0 +1,7 @@ +// |jit-test| --use-fdlibm-for-sin-cos-tan +// Test that fdlibm is being used for sin, cos, and tan. + +// Tests adapted from https://github.com/arkenfox/TZP/blob/master/tests/math.html#L158-L319 +assertEq(Math.cos(1e284), 0.7086865671674247); +assertEq(Math.sin(7*Math.LOG10E), 0.10135692924965616); +assertEq(Math.tan(6*Math.E), 0.6866761546452431); diff --git a/js/src/jit-test/tests/basic/finally-implicit-return.js b/js/src/jit-test/tests/basic/finally-implicit-return.js new file mode 100644 index 0000000000..3bbd78d380 --- /dev/null +++ b/js/src/jit-test/tests/basic/finally-implicit-return.js @@ -0,0 +1,45 @@ +// Implicit return at the end of a function should return |undefined|, +// even if we initially set another return value and then executed a finally +// block. + +function test1() { + try { + try { + return 3; + } finally { + throw 4; + } + } catch (e) {} +} +assertEq(test1(), undefined); + +function test2() { + L: try { + return 3; + } finally { + break L; + } +} +assertEq(test2(), undefined); + +function test3() { + for (var i=0; i<2; i++) { + try { + return 5; + } finally { + continue; + } + } +} +assertEq(test3(), undefined); + +// "return;" should work the same way. +function test4() { + L: try { + return 6; + } finally { + break L; + } + return; +} +assertEq(test4(), undefined); diff --git a/js/src/jit-test/tests/basic/firstSlotConflict.js b/js/src/jit-test/tests/basic/firstSlotConflict.js new file mode 100644 index 0000000000..fe6ef51c7c --- /dev/null +++ b/js/src/jit-test/tests/basic/firstSlotConflict.js @@ -0,0 +1,10 @@ +(function(x) { + function f1() { return 1; } + function f2() { return 2; } + function f3() { return 3; } + function f4() { return 4; } + var g = function () { return x; } + var a = [f1, f2, f3, f4, g]; + for (var v of a) + v.adhoc = 42; // Don't assertbotch in jsbuiltins.cpp setting g.adhoc +})(33); diff --git a/js/src/jit-test/tests/basic/folding-bug767660.js b/js/src/jit-test/tests/basic/folding-bug767660.js new file mode 100644 index 0000000000..7fc8b7c2cb --- /dev/null +++ b/js/src/jit-test/tests/basic/folding-bug767660.js @@ -0,0 +1,2 @@ +var j, w; +if (j && w && w && true) {} diff --git a/js/src/jit-test/tests/basic/for-in-densified-elements.js b/js/src/jit-test/tests/basic/for-in-densified-elements.js new file mode 100644 index 0000000000..4874901f17 --- /dev/null +++ b/js/src/jit-test/tests/basic/for-in-densified-elements.js @@ -0,0 +1,21 @@ +function test() { + // An array with sparse elements... + var arr = []; + arr[10_000] = 1; + arr[10_001] = 1; + + for (var prop in arr) { + assertEq(prop, "10000"); + assertEq(arr.length, 10_002); + + // Densify the elements. + for (var i = 0; i < arr.length; i++) { + arr[i] = 1; + } + + // Delete the last dense element (10001). It should not be visited by the + // active for-in (checked above). + arr.length = 10_001; + } +} +test(); diff --git a/js/src/jit-test/tests/basic/for-in-proto-properties.js b/js/src/jit-test/tests/basic/for-in-proto-properties.js new file mode 100644 index 0000000000..a8f2279c4e --- /dev/null +++ b/js/src/jit-test/tests/basic/for-in-proto-properties.js @@ -0,0 +1,41 @@ +function testNonEnumerableVisited() { + // Non-enumerable properties must still be included in the duplicate-property + // checking. + + var proto1 = Object.create(null); + Object.defineProperty(proto1, "x", {enumerable: true, value: 1}); + + var proto2 = Object.create(proto1); + Object.defineProperty(proto2, "x", {enumerable: false, value: 1}); + + for (var p in proto2) { + throw "Shouldn't enumerate any properties"; + } + + var o = Object.create(proto2); + for (var p in o) { + throw "Shouldn't enumerate any properties"; + } +} +testNonEnumerableVisited(); + +function testEnumerableOnProto() { + var iter = o => { + var props = []; + for (var p in o) { props.push(p); } + return props; + }; + + // Test dense elements on the proto chain are included. + var props = iter(Object.create({0: 1})); + assertEq(JSON.stringify(props), '["0"]'); + + // Test typed array elements on the proto chain are included. + props = iter(Object.create(new Int32Array(2))); + assertEq(JSON.stringify(props), '["0","1"]'); + + // Test sparse elements on the proto chain are included. + props = iter(Object.create({1234567: 1})); + assertEq(JSON.stringify(props), '["1234567"]'); +} +testEnumerableOnProto(); diff --git a/js/src/jit-test/tests/basic/for-in-replace-sparse.js b/js/src/jit-test/tests/basic/for-in-replace-sparse.js new file mode 100644 index 0000000000..2a89ec6679 --- /dev/null +++ b/js/src/jit-test/tests/basic/for-in-replace-sparse.js @@ -0,0 +1,12 @@ +// Array with sparse element (because non-writable). +var arr = []; +Object.defineProperty(arr, 0, {writable: false, configurable: true, enumerable: true, value: 0}); + +for (var p in arr) { + // Replace sparse element with dense element. + assertEq(p, "0"); + delete arr[0]; + arr[0] = 0; + arr[1] = 1; + arr.reverse(); +} diff --git a/js/src/jit-test/tests/basic/forVarInWith.js b/js/src/jit-test/tests/basic/forVarInWith.js new file mode 100644 index 0000000000..593805642d --- /dev/null +++ b/js/src/jit-test/tests/basic/forVarInWith.js @@ -0,0 +1,12 @@ +function forVarInWith() { + function foo() { return {notk:42}; } + function bar() { return {p:1, q:2, r:3, s:4, t:5}; }; + var o = foo(); + var a = []; + with (o) { + for (var k in bar()) + a[a.length] = k; + } + return a.join(""); +} +assertEq(forVarInWith(), "pqrst"); diff --git a/js/src/jit-test/tests/basic/freeze-builtins.js b/js/src/jit-test/tests/basic/freeze-builtins.js new file mode 100644 index 0000000000..086551135a --- /dev/null +++ b/js/src/jit-test/tests/basic/freeze-builtins.js @@ -0,0 +1,37 @@ +var g = newGlobal({freezeBuiltins: true}); + +g.evaluate("" + function checkFrozen(name) { + // Check constructor on the global is non-writable/non-configurable. + let desc = Object.getOwnPropertyDescriptor(this, name); + assertEq(desc.writable, false); + assertEq(desc.configurable, false); + + // Constructor must be frozen. + let ctor = desc.value; + assertEq(Object.isFrozen(ctor), true); + + // Prototype must be sealed. + if (ctor.prototype) { + assertEq(Object.isSealed(ctor.prototype), true); + } +}); + +g.checkFrozen("Object"); +g.checkFrozen("Array"); +g.checkFrozen("Function"); + +g.checkFrozen("ArrayBuffer"); +g.checkFrozen("Int32Array"); +g.checkFrozen("Number"); +g.checkFrozen("String"); +g.checkFrozen("Proxy"); +g.checkFrozen("Promise"); +g.checkFrozen("RegExp"); +g.checkFrozen("Map"); +g.checkFrozen("WeakMap"); +g.checkFrozen("WeakRef"); +g.checkFrozen("Error"); +g.checkFrozen("TypeError"); + +g.checkFrozen("JSON"); +g.checkFrozen("Math"); diff --git a/js/src/jit-test/tests/basic/function-apply-proxy.js b/js/src/jit-test/tests/basic/function-apply-proxy.js new file mode 100644 index 0000000000..9a00fdb3de --- /dev/null +++ b/js/src/jit-test/tests/basic/function-apply-proxy.js @@ -0,0 +1,26 @@ +// fun.apply(null, proxy) should not invoke the proxy's Has trap. + +var proxy = new Proxy({}, { + get: function (target, name, proxy) { + switch (name) { + case "length": + return 2; + case "0": + return 15; + case "1": + return undefined; + default: + assertEq(false, true); + } + }, + has: function (target, name) { + assertEq(false, true); + } +}); +function foo() { + assertEq(arguments.length, 2); + assertEq(arguments[0], 15); + assertEq(1 in arguments, true); + assertEq(arguments[1], undefined); +} +foo.apply(null, proxy); diff --git a/js/src/jit-test/tests/basic/function-bind.js b/js/src/jit-test/tests/basic/function-bind.js new file mode 100644 index 0000000000..7831ef068b --- /dev/null +++ b/js/src/jit-test/tests/basic/function-bind.js @@ -0,0 +1,21 @@ +var A = Array.bind(1, 1, 2); + +var a1; +for (var i = 0; i < 5; i++) + a1 = A(3, 4); + +assertEq(a1.length, 4); +assertEq(a1[0], 1); +assertEq(a1[1], 2); +assertEq(a1[2], 3); +assertEq(a1[3], 4); + +var a2; +for (var i = 0; i < 5; i++) + a2 = new A(3, 4); + +assertEq(a2.length, 4); +assertEq(a2[0], 1); +assertEq(a2[1], 2); +assertEq(a2[2], 3); +assertEq(a2[3], 4); diff --git a/js/src/jit-test/tests/basic/function-cloning-2.js b/js/src/jit-test/tests/basic/function-cloning-2.js new file mode 100644 index 0000000000..755a178e78 --- /dev/null +++ b/js/src/jit-test/tests/basic/function-cloning-2.js @@ -0,0 +1,9 @@ +if (typeof oomAtAllocation === 'object') { + var a = []; + oomAtAllocation(1); + try { + a.forEach(); + } catch (e) { + } + a.forEach(()=>1); +} diff --git a/js/src/jit-test/tests/basic/function-gname.js b/js/src/jit-test/tests/basic/function-gname.js new file mode 100644 index 0000000000..061bb08761 --- /dev/null +++ b/js/src/jit-test/tests/basic/function-gname.js @@ -0,0 +1,34 @@ +function bytecode(f) { + if (typeof disassemble !== "function") + return "unavailable"; + var d = disassemble(f); + return d.slice(d.indexOf("main:"), d.indexOf("\n\n")); +} + +function hasGname(f, v) { + // Do a try-catch that prints the full stack, so we can tell + // _which_ part of this test failed. + try { + var b = bytecode(f); + if (b != "unavailable") { + assertEq(b.includes(`GetGName "${v}"`), true); + assertEq(b.includes(`GetName "${v}"`), false); + } + } catch (e) { + print(e.stack); + throw e; + } +} + +var x = "outer"; + +var f1 = new Function("assertEq(x, 'outer')"); +f1(); +hasGname(f1, 'x'); + +{ + let x = "inner"; + var f3 = new Function("assertEq(x, 'outer')"); + f3(); + hasGname(f3, 'x'); +} diff --git a/js/src/jit-test/tests/basic/function-tosource-bug779694.js b/js/src/jit-test/tests/basic/function-tosource-bug779694.js new file mode 100644 index 0000000000..782b2594bc --- /dev/null +++ b/js/src/jit-test/tests/basic/function-tosource-bug779694.js @@ -0,0 +1,8 @@ +// This test creates poorly compressible input, which tests certain paths in +// source code compression. +var x = ""; +for (var i=0; i<400; ++i) { + x += String.fromCharCode(i * 289); +} +var s = "'" + x + "'"; +assertEq(Function("evt", s).toString(), "function anonymous(evt\n) {\n" + s + "\n}"); diff --git a/js/src/jit-test/tests/basic/function-tosource-constructor.js b/js/src/jit-test/tests/basic/function-tosource-constructor.js new file mode 100644 index 0000000000..26817d9eed --- /dev/null +++ b/js/src/jit-test/tests/basic/function-tosource-constructor.js @@ -0,0 +1,16 @@ +var f = Function("a", "b", "return a + b;"); +assertEq(f.toString(), "function anonymous(a,b\n) {\nreturn a + b;\n}"); +if (Function.prototype.toSource) { + assertEq(f.toSource(), "(function anonymous(a,b\n) {\nreturn a + b;\n})"); +} +assertEq(decompileFunction(f), f.toString()); +f = Function("a", "...rest", "return rest[42] + b;"); +assertEq(f.toString(), "function anonymous(a,...rest\n) {\nreturn rest[42] + b;\n}"); +if (Function.prototype.toSource) { + assertEq(f.toSource(), "(function anonymous(a,...rest\n) {\nreturn rest[42] + b;\n})") +} +assertEq(decompileFunction(f), f.toString()); +f = Function(""); +assertEq(f.toString(), "function anonymous(\n) {\n\n}"); +f = Function("", "(abc)"); +assertEq(f.toString(), "function anonymous(\n) {\n(abc)\n}"); diff --git a/js/src/jit-test/tests/basic/function-tosource-exprbody-bug777834.js b/js/src/jit-test/tests/basic/function-tosource-exprbody-bug777834.js new file mode 100644 index 0000000000..be5d60ccd5 --- /dev/null +++ b/js/src/jit-test/tests/basic/function-tosource-exprbody-bug777834.js @@ -0,0 +1,5 @@ +load(libdir + "asserts.js"); + +assertThrowsInstanceOf(function () { + eval("function f()((l()))++2s"); +}, SyntaxError); diff --git a/js/src/jit-test/tests/basic/function-tosource-func-proto.js b/js/src/jit-test/tests/basic/function-tosource-func-proto.js new file mode 100644 index 0000000000..34bcdf965e --- /dev/null +++ b/js/src/jit-test/tests/basic/function-tosource-func-proto.js @@ -0,0 +1,4 @@ +assertEq(Function.prototype.toString(), "function () {\n [native code]\n}"); +if (Function.prototype.toSource) { + assertEq(Function.prototype.toSource(), "function () {\n [native code]\n}"); +} diff --git a/js/src/jit-test/tests/basic/function-tosource-getset.js b/js/src/jit-test/tests/basic/function-tosource-getset.js new file mode 100644 index 0000000000..c8e8007513 --- /dev/null +++ b/js/src/jit-test/tests/basic/function-tosource-getset.js @@ -0,0 +1,13 @@ +var o = {get prop() { a + b; }, set prop(x) { a + b; }}; +var prop = Object.getOwnPropertyDescriptor(o, "prop"); +assertEq(prop.get.toString(), "get prop() { a + b; }"); +if (Function.prototype.toSource) { + assertEq(prop.get.toSource(), "get prop() { a + b; }"); +} +assertEq(prop.set.toString(), "set prop(x) { a + b; }"); +if (Function.prototype.toSource) { + assertEq(prop.set.toSource(), "set prop(x) { a + b; }"); +} +if (Object.prototype.toSource) { + assertEq(o.toSource(), "({get prop() { a + b; }, set prop(x) { a + b; }})"); +} diff --git a/js/src/jit-test/tests/basic/function-tosource-lambda.js b/js/src/jit-test/tests/basic/function-tosource-lambda.js new file mode 100644 index 0000000000..97f28b40ff --- /dev/null +++ b/js/src/jit-test/tests/basic/function-tosource-lambda.js @@ -0,0 +1,18 @@ +var f1 = function f0(a, b) { return a + b; } +if (Function.prototype.toSource) { + assertEq(f1.toSource(), "(function f0(a, b) { return a + b; })"); +} +assertEq(f1.toString(), "function f0(a, b) { return a + b; }"); +assertEq(decompileFunction(f1), f1.toString()); +var f2 = function (a, b) { return a + b; }; +if (Function.prototype.toSource) { + assertEq(f2.toSource(), "(function (a, b) { return a + b; })"); +} +assertEq(f2.toString(), "function (a, b) { return a + b; }"); +assertEq(decompileFunction(f2), f2.toString()); +var f3 = (function (a, b) { return a + b; }); +if (Function.prototype.toSource) { + assertEq(f3.toSource(), "(function (a, b) { return a + b; })"); +} +assertEq(f3.toString(), "function (a, b) { return a + b; }"); +assertEq(decompileFunction(f3), f3.toString()); diff --git a/js/src/jit-test/tests/basic/function-tosource-statement.js b/js/src/jit-test/tests/basic/function-tosource-statement.js new file mode 100644 index 0000000000..e5d1bb7c24 --- /dev/null +++ b/js/src/jit-test/tests/basic/function-tosource-statement.js @@ -0,0 +1,13 @@ +function f1(a, b) { + return a + b; +} +assertEq(f1.toString(), "function f1(a, b) {\n return a + b;\n}"); +if (Function.prototype.toSource) { + assertEq(f1.toSource(), f1.toString()); +} +function f2(a, /* ))))pernicious comment */ b, + c, // another comment(( + d) {} +assertEq(f2.toString(), "function f2(a, /* ))))pernicious comment */ b,\n c, // another comment((\n d) {}"); +function f3() { } +assertEq(f3.toString(), "function f3() { }"); diff --git a/js/src/jit-test/tests/basic/functionRedeclConst.js b/js/src/jit-test/tests/basic/functionRedeclConst.js new file mode 100644 index 0000000000..fd7fec6559 --- /dev/null +++ b/js/src/jit-test/tests/basic/functionRedeclConst.js @@ -0,0 +1,5 @@ +// |jit-test| error: SyntaxError +{ + const x = 0; + function x() { } +} diff --git a/js/src/jit-test/tests/basic/functionRedeclGlobalConst.js b/js/src/jit-test/tests/basic/functionRedeclGlobalConst.js new file mode 100644 index 0000000000..117811b6bb --- /dev/null +++ b/js/src/jit-test/tests/basic/functionRedeclGlobalConst.js @@ -0,0 +1,3 @@ +// |jit-test| error: SyntaxError +const x = 0; +function x() { } diff --git a/js/src/jit-test/tests/basic/functionRedeclLet.js b/js/src/jit-test/tests/basic/functionRedeclLet.js new file mode 100644 index 0000000000..7014c3ba89 --- /dev/null +++ b/js/src/jit-test/tests/basic/functionRedeclLet.js @@ -0,0 +1,5 @@ +// |jit-test| error: SyntaxError +{ + let x; + function x() { } +} diff --git a/js/src/jit-test/tests/basic/functionnames.js b/js/src/jit-test/tests/basic/functionnames.js new file mode 100644 index 0000000000..8b046db8b9 --- /dev/null +++ b/js/src/jit-test/tests/basic/functionnames.js @@ -0,0 +1,160 @@ +// |jit-test| skip-if: isLcovEnabled() + +/* + * Most of these test cases are adapted from: + * http://johnjbarton.github.com/nonymous/index.html + */ + +function assertName(fn, name) { + assertEq(displayName(fn), name) +} + +/* simple names */ +var a = function b() {}; +function c() {}; +assertName(a, 'b'); +assertName(c, 'c'); + +var a = function(){}, + b = function(){}; +assertName(a, 'a'); +assertName(b, 'b'); + +/* nested names */ +var main = function() { + function Foo(a) { assertName(a, 'main/foo<') } + var foo = new Foo(function() {}); +}; +assertName(main, 'main') +main(); + +/* duplicated */ +var Baz = Bar = function(){} +assertName(Baz, 'Bar'); +assertName(Bar, 'Bar'); + +/* returned from an immediate function */ +var Foo = function (){ + assertName(arguments.callee, 'Foo<') + return function(){}; +}(); +assertName(Foo, 'Foo= 3, true); +assertEq(obj.Foo, Foo); +assertEq(obj.x, 1); +assertEq(obj.y, 2); +assertEq("z" in obj, false); + +assertEq("uninit" in obj, false); +let uninit; + +// It's just a copy. +obj.x = 2; +assertEq(x, 1); diff --git a/js/src/jit-test/tests/basic/globalGet.js b/js/src/jit-test/tests/basic/globalGet.js new file mode 100644 index 0000000000..53d73a6f60 --- /dev/null +++ b/js/src/jit-test/tests/basic/globalGet.js @@ -0,0 +1,6 @@ +globalName = 907; +var globalInt = 0; +for (var i = 0; i < 500; i++) + globalInt = globalName + i; + +assertEq(globalInt, globalName + 499); diff --git a/js/src/jit-test/tests/basic/globalOptimize-1.js b/js/src/jit-test/tests/basic/globalOptimize-1.js new file mode 100644 index 0000000000..f90114c334 --- /dev/null +++ b/js/src/jit-test/tests/basic/globalOptimize-1.js @@ -0,0 +1,5 @@ +/* Test that NaN does not trigger js_InitMathClass & constants while parsing. */ +var NaN + +var x = 2; + diff --git a/js/src/jit-test/tests/basic/globalSet.js b/js/src/jit-test/tests/basic/globalSet.js new file mode 100644 index 0000000000..ceb2852d06 --- /dev/null +++ b/js/src/jit-test/tests/basic/globalSet.js @@ -0,0 +1,4 @@ +for (var i = 0; i < 500; i++) + globalInt = i; + +assertEq(globalInt, 499); diff --git a/js/src/jit-test/tests/basic/hasnativemethodpure-optimization.js b/js/src/jit-test/tests/basic/hasnativemethodpure-optimization.js new file mode 100644 index 0000000000..2f5e991864 --- /dev/null +++ b/js/src/jit-test/tests/basic/hasnativemethodpure-optimization.js @@ -0,0 +1,21 @@ +load(libdir + "asserts.js"); + +let string = Object.defineProperty(new String("123"), "valueOf", { + get: function() { throw "get-valueOf"; } +}); +assertThrowsValue(() => "" + string, "get-valueOf"); + +string = Object.defineProperty(new String("123"), "toString", { + get: function() { throw "get-toString"; } +}); +assertThrowsValue(() => string.toLowerCase(), "get-toString"); + +string = Object.defineProperty(new String("123"), Symbol.toPrimitive, { + get: function() { throw "get-toPrimitive"; } +}); +assertThrowsValue(() => string.toLowerCase(), "get-toPrimitive"); + +let number = Object.defineProperty(new Number(123), "valueOf", { + get: function() { throw "get-valueOf"; } +}); +assertThrowsValue(() => +number, "get-valueOf"); \ No newline at end of file diff --git a/js/src/jit-test/tests/basic/homogenous-literals.js b/js/src/jit-test/tests/basic/homogenous-literals.js new file mode 100644 index 0000000000..d9e3e77610 --- /dev/null +++ b/js/src/jit-test/tests/basic/homogenous-literals.js @@ -0,0 +1,50 @@ + +function processNoProperty(a) { + var total = 0; + for (var i = 0; i < a.length; i++) { + var sa = a[i]; + for (var j = 0; j < sa.length; j++) + total += sa[j]; + } + assertEq(total, 22); +} + +var literalArray = [ + [1,2,3,4], + [1.5,2.5,3.5,4.5] +]; + +var jsonArray = JSON.parse(`[ + [1,2,3,4], + [1.5,2.5,3.5,4.5] +]`); + +for (var i = 0; i < 1000; i++) { + processNoProperty(literalArray); + processNoProperty(jsonArray); +} + +function processWithProperty(a) { + var total = 0; + for (var i = 0; i < a.length; i++) { + var sa = a[i].p; + for (var j = 0; j < sa.length; j++) + total += sa[j]; + } + assertEq(total, 22); +} + +var literalPropertyArray = [ + {p:[1,2,3,4]}, + {p:[1.5,2.5,3.5,4.5]} +]; + +var jsonPropertyArray = JSON.parse(`[ + {"p":[1,2,3,4]}, + {"p":[1.5,2.5,3.5,4.5]} +]`); + +for (var i = 0; i < 1000; i++) { + processWithProperty(literalPropertyArray); + processWithProperty(jsonPropertyArray); +} diff --git a/js/src/jit-test/tests/basic/html-extensions.js b/js/src/jit-test/tests/basic/html-extensions.js new file mode 100644 index 0000000000..5cf52aefd1 --- /dev/null +++ b/js/src/jit-test/tests/basic/html-extensions.js @@ -0,0 +1,87 @@ +var noParamFuns = ["".bold, "".italics, "".fixed, "".strike, "".small, "".big, + "".blink, "".sup, "".sub]; +var noParamTags = ["b", "i", "tt", "strike", "small", "big", + "blink", "sup", "sub"]; + +function testNoParam(s) { + for (var i=0; i" + String(s) + ""); + } +} +testNoParam("Foo"); +testNoParam('aaa"bbb\'c<>123'); +testNoParam(123); + +// toString should be called, not valueOf +testNoParam({toString: () => 1, valueOf: () => { throw "fail"; } }); + +assertEq("".anchor.length, 1); +assertEq("".link.length, 1); +assertEq("".fontsize.length, 1); +assertEq("".fontcolor.length, 1); + +// Ensure @@replace on String.prototype isn't called. +String.prototype[Symbol.replace] = function() { + throw "Shouldn't call @@replace"; +}; + +// " in the attribute value is escaped (") +assertEq("bla\"<>'".anchor("foo'<>\"\"123\"/\\"), + """123"/\\\">bla\"<>'"); +assertEq("bla\"<>'".link("foo'<>\"\"123\"/\\"), + """123"/\\\">bla\"<>'"); +assertEq("bla\"<>'".fontsize("foo'<>\"\"123\"/\\"), + """123"/\\\">bla\"<>'"); +assertEq("bla\"<>'".fontcolor("foo'<>\"\"123\"/\\"), + """123"/\\\">bla\"<>'"); + +assertEq("".anchor('"'), ''); +assertEq("".link('"'), ''); +assertEq("".fontcolor('"'), ''); +assertEq("".fontsize('"'), ''); + +assertEq("".anchor('"1'), ''); +assertEq("".link('"1'), ''); +assertEq("".fontcolor('"1'), ''); +assertEq("".fontsize('"1'), ''); + +assertEq("".anchor('"""a"'), ''); +assertEq("".link('"""a"'), ''); +assertEq("".fontcolor('"""a"'), ''); +assertEq("".fontsize('"""a"'), ''); + +assertEq("".anchor(""), ''); +assertEq("".link(""), ''); +assertEq("".fontcolor(""), ''); +assertEq("".fontsize(""), ''); + +assertEq("foo".anchor(), "foo"); +assertEq("foo".link(), "foo"); +assertEq("foo".fontcolor(), "foo"); +assertEq("foo".fontsize(), "foo"); + +assertEq("foo".anchor(3.14), 'foo'); +assertEq("foo".link(3.14), 'foo'); +assertEq("foo".fontcolor(3.14), 'foo'); +assertEq("foo".fontsize(3.14), 'foo'); + +assertEq("foo".anchor({}), 'foo'); +assertEq("foo".link(Math), 'foo'); +assertEq("foo".fontcolor([1,2]), 'foo'); +assertEq("foo".fontsize({}), 'foo'); + +// toString should be called, not valueOf, and toString must be called on |this| +// before it's called on the argument. Also makes sure toString is called only +// once. +var count = 0; +var o1 = {toString: () => { return count += 1; }, valueOf: () => { throw "fail"; } }; +var o2 = {toString: () => { return count += 5; }, valueOf: () => { throw "fail"; } }; +assertEq("".anchor.call(o1, o2), '1'); +assertEq("".link.call(o1, o2), '7'); +assertEq("".fontcolor.call(o1, o2), '13'); +assertEq("".fontsize.call(o1, o2), '19'); +assertEq(count, 24); diff --git a/js/src/jit-test/tests/basic/hypot-approx.js b/js/src/jit-test/tests/basic/hypot-approx.js new file mode 100644 index 0000000000..b848b1fe60 --- /dev/null +++ b/js/src/jit-test/tests/basic/hypot-approx.js @@ -0,0 +1,34 @@ +load(libdir + "math.js"); + +for (var i = -20; i < 20; i++) { + assertEq(Math.hypot(+0, i), Math.abs(i)); + assertEq(Math.hypot(-0, i), Math.abs(i)); +} + +// The implementation must avoid underlow. +// The implementation must avoid overflow, where possible. +// The implementation must minimise rounding errors. + +assertNear(Math.hypot(1e-300, 1e-300), 1.414213562373095e-300); +assertNear(Math.hypot(1e-300, 1e-300, 1e-300), 1.732050807568877e-300); + +assertNear(Math.hypot(1e-3, 1e-3, 1e-3), 0.0017320508075688772); + +assertNear(Math.hypot(1e300, 1e300), 1.4142135623730952e+300); +assertNear(Math.hypot(1e100, 1e200, 1e300), 1e300); + +assertNear(Math.hypot(1e3, 1e-3), 1000.0000000005); +assertNear(Math.hypot(1e-300, 1e300), 1e300); +assertNear(Math.hypot(1e3, 1e-3, 1e3, 1e-3), 1414.2135623738021555); + +assertNear(Math.hypot(1e1, 1e2, 1e3), Math.sqrt(1e2 + 1e4 + 1e6)); +assertNear(Math.hypot(1e1, 1e2, 1e3, 1e4), Math.sqrt(1e2 + 1e4 + 1e6 + 1e8)); + +for (var i = 1, j = 2; i < 2; i += 0.05, j += 0.05) + assertNear(Math.hypot(i, j), Math.sqrt(i * i + j * j)); + +for (var i = 1, j = 2, k = 3; i < 2; i += 0.05, j += 0.05, k += 0.05) + assertNear(Math.hypot(i, j, k), Math.sqrt(i * i + j * j + k * k)); + +for (var i = 1, j = 2, k = 3, l = 4; i < 2; i += 0.05, j += 0.05, k += 0.05, l += 0.5) + assertNear(Math.hypot(i, j, k, l), Math.sqrt(i * i + j * j + k * k + l * l)); diff --git a/js/src/jit-test/tests/basic/hypot-exact.js b/js/src/jit-test/tests/basic/hypot-exact.js new file mode 100644 index 0000000000..7c208d5143 --- /dev/null +++ b/js/src/jit-test/tests/basic/hypot-exact.js @@ -0,0 +1,74 @@ +// Properties of Math.hypot that are guaranteed by the spec. + +// If no arguments are passed, the result is +0. +assertEq(Math.hypot(), +0); + +// If any argument is +∞, the result is +∞. +// If any argument is −∞, the result is +∞. +for (var inf of [Infinity, -Infinity]) { + assertEq(Math.hypot(inf, 0), Infinity); + assertEq(Math.hypot(0, inf), Infinity); + assertEq(Math.hypot(inf, inf), Infinity); + assertEq(Math.hypot(inf, -inf), Infinity); + + assertEq(Math.hypot(inf, -0), Infinity); + assertEq(Math.hypot(-0, inf), Infinity); + assertEq(Math.hypot(inf, Math.MIN_VALUE), Infinity); + assertEq(Math.hypot(Math.MIN_VALUE, inf), Infinity); + assertEq(Math.hypot(inf, 1), Infinity); + assertEq(Math.hypot(1, inf), Infinity); + + assertEq(Math.hypot(inf, 0, 0), Infinity); + assertEq(Math.hypot(0, inf, 0), Infinity); + assertEq(Math.hypot(0, 0, inf), Infinity); + + assertEq(Math.hypot(inf, NaN), Infinity); + assertEq(Math.hypot(NaN, inf), Infinity); + + assertEq(Math.hypot(inf, NaN, NaN), Infinity); + assertEq(Math.hypot(NaN, inf, NaN), Infinity); + assertEq(Math.hypot(NaN, NaN, inf), Infinity); + + assertEq(Math.hypot(inf, NaN, NaN, NaN), Infinity); + assertEq(Math.hypot(NaN, inf, NaN, NaN), Infinity); + assertEq(Math.hypot(NaN, NaN, inf, NaN), Infinity); + assertEq(Math.hypot(NaN, NaN, NaN, inf), Infinity); +} + +// If no argument is +∞ or −∞, and any argument is NaN, the result is NaN. +assertEq(Math.hypot(NaN), NaN); + +assertEq(Math.hypot(NaN, 0), NaN); +assertEq(Math.hypot(0, NaN), NaN); + +assertEq(Math.hypot(NaN, NaN), NaN); + +assertEq(Math.hypot(NaN, 0, 0), NaN); +assertEq(Math.hypot(0, NaN, 0), NaN); +assertEq(Math.hypot(0, 0, NaN), NaN); + +assertEq(Math.hypot(NaN, 0, 0, 0), NaN); +assertEq(Math.hypot(0, NaN, 0, 0), NaN); +assertEq(Math.hypot(0, 0, NaN, 0), NaN); +assertEq(Math.hypot(0, 0, 0, NaN), NaN); + +assertEq(Math.hypot(Number.MAX_VALUE, Number.MIN_VALUE, NaN), NaN); +assertEq(Math.hypot(Number.MAX_VALUE, Number.MIN_VALUE, Number.MIN_VALUE, NaN), NaN); + +// If all arguments are either +0 or -0, the result is +0. +assertEq(Math.hypot(-0, -0), +0); +assertEq(Math.hypot(+0, -0), +0); + +assertEq(Math.hypot(-0, -0, -0), +0); +assertEq(Math.hypot(+0, -0, -0), +0); +assertEq(Math.hypot(-0, +0, -0), +0); +assertEq(Math.hypot(+0, +0, -0), +0); + +assertEq(Math.hypot(-0, -0, -0, -0), +0); +assertEq(Math.hypot(+0, -0, -0, -0), +0); +assertEq(Math.hypot(-0, -0, +0, -0), +0); +assertEq(Math.hypot(+0, +0, +0, -0), +0); +assertEq(Math.hypot(-0, -0, -0, +0), +0); + +// The length property of the hypot function is 2. +assertEq(Math.hypot.length, 2); diff --git a/js/src/jit-test/tests/basic/ifInsideLoop.js b/js/src/jit-test/tests/basic/ifInsideLoop.js new file mode 100644 index 0000000000..296e3f82d5 --- /dev/null +++ b/js/src/jit-test/tests/basic/ifInsideLoop.js @@ -0,0 +1,12 @@ +function ifInsideLoop() +{ + var cond = true, intCond = 5, count = 0; + for (var i = 0; i < 100; i++) { + if (cond) + count++; + if (intCond) + count++; + } + return count; +} +assertEq(ifInsideLoop(), 200); diff --git a/js/src/jit-test/tests/basic/inArrayTest.js b/js/src/jit-test/tests/basic/inArrayTest.js new file mode 100644 index 0000000000..d57f013fd3 --- /dev/null +++ b/js/src/jit-test/tests/basic/inArrayTest.js @@ -0,0 +1,9 @@ +function inArrayTest() { + var a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + for (var i = 0; i < a.length; i++) { + if (!(i in a)) + break; + } + return i; +} +assertEq(inArrayTest(), 10); diff --git a/js/src/jit-test/tests/basic/inObjectTest.js b/js/src/jit-test/tests/basic/inObjectTest.js new file mode 100644 index 0000000000..f19fdbe429 --- /dev/null +++ b/js/src/jit-test/tests/basic/inObjectTest.js @@ -0,0 +1,13 @@ +function inObjectTest() { + var o = {p: 1, q: 2, r: 3, s: 4, t: 5}; + var r = 0; + for (var i in o) { + if (!(i in o)) + break; + if ((i + i) in o) + break; + ++r; + } + return r; +} +assertEq(inObjectTest(), 5); diff --git a/js/src/jit-test/tests/basic/indexed-iteration.js b/js/src/jit-test/tests/basic/indexed-iteration.js new file mode 100644 index 0000000000..952aa105ba --- /dev/null +++ b/js/src/jit-test/tests/basic/indexed-iteration.js @@ -0,0 +1,20 @@ + +// Don't use NativeIterator cache for objects with dense elements. + +function bar(a) { + var n = 0; + for (var b in a) { n++; } + return n; +} + +function foo() { + var x = {a:0,b:1}; + var y = {a:0,b:1}; + y[0] = 2; + y[1] = 3; + for (var i = 0; i < 10; i++) { + assertEq(bar(x), 2); + assertEq(bar(y), 4); + } +} +foo(); diff --git a/js/src/jit-test/tests/basic/indexof-equal.js b/js/src/jit-test/tests/basic/indexof-equal.js new file mode 100644 index 0000000000..f6e3256048 --- /dev/null +++ b/js/src/jit-test/tests/basic/indexof-equal.js @@ -0,0 +1,10 @@ +var x = "abc"; +assertEq(x.indexOf(x), 0); +assertEq(x.indexOf(x, -1), 0); +assertEq(x.indexOf(x, 1), -1); +assertEq(x.indexOf(x, 100), -1); + +assertEq(x.lastIndexOf(x), 0); +assertEq(x.lastIndexOf(x, -1), 0); +assertEq(x.lastIndexOf(x, 1), 0); +assertEq(x.lastIndexOf(x, 100), 0); diff --git a/js/src/jit-test/tests/basic/inflate-oom.js b/js/src/jit-test/tests/basic/inflate-oom.js new file mode 100644 index 0000000000..645980789f --- /dev/null +++ b/js/src/jit-test/tests/basic/inflate-oom.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: !('oomTest' in this) +function test() { + function foo() { + return 1; + }; + oomTest(() => { + gc(); + foo.toString(); + }); +} +var s = ";".repeat(70000); +s += test.toString() + "test()"; +s += ";".repeat(70000); +eval(s); diff --git a/js/src/jit-test/tests/basic/innerLoopIntOuterDouble.js b/js/src/jit-test/tests/basic/innerLoopIntOuterDouble.js new file mode 100644 index 0000000000..be820f956d --- /dev/null +++ b/js/src/jit-test/tests/basic/innerLoopIntOuterDouble.js @@ -0,0 +1,11 @@ +function innerLoopIntOuterDouble() { + var n = 1000, i=0, j=0, count=0, limit=0; + for (i = 1; i <= n; ++i) { + limit = i * 1; + for (j = 0; j < limit; ++j) { + ++count; + } + } + return "" + count; +} +assertEq(innerLoopIntOuterDouble(), "500500"); diff --git a/js/src/jit-test/tests/basic/inner_double_outer_int.js b/js/src/jit-test/tests/basic/inner_double_outer_int.js new file mode 100644 index 0000000000..4051aa21aa --- /dev/null +++ b/js/src/jit-test/tests/basic/inner_double_outer_int.js @@ -0,0 +1,10 @@ +function inner_double_outer_int() { + function f(i) { + for (var m = 0; m < 20; ++m) + for (var n = 0; n < 100; n += i) + ; + return n; + } + return f(.5); +} +assertEq(inner_double_outer_int(), 100); diff --git a/js/src/jit-test/tests/basic/invokeFunctionMagic.js b/js/src/jit-test/tests/basic/invokeFunctionMagic.js new file mode 100644 index 0000000000..9fc364315f --- /dev/null +++ b/js/src/jit-test/tests/basic/invokeFunctionMagic.js @@ -0,0 +1,20 @@ +// JS_IS_CONSTRUCTING +var g = newGlobal(); +do { + new g.String(); // jit::CreateThis passes JS_IS_CONSTRUCTING +} while (!inIon()); + +// JS_UNINITIALIZED_LEXICAL +function dontAbortWholeCompilation() { + class B {}; + class D extends B { + constructor() { super(); } + }; + + return D; +} +var classImpl = dontAbortWholeCompilation(); + +do { + new classImpl(); // jit::CreateThis passes JS_UNINITIALIZED_LEXICAL +} while (!inIon()); diff --git a/js/src/jit-test/tests/basic/is-valid-json.js b/js/src/jit-test/tests/basic/is-valid-json.js new file mode 100644 index 0000000000..ea30518f1d --- /dev/null +++ b/js/src/jit-test/tests/basic/is-valid-json.js @@ -0,0 +1,25 @@ +assertEq(isValidJSON(`0`), true); +assertEq(isValidJSON(`1.2`), true); +assertEq(isValidJSON(`-2.3`), true); +assertEq(isValidJSON(`true`), true); +assertEq(isValidJSON(`false`), true); +assertEq(isValidJSON(`null`), true); +assertEq(isValidJSON(`"foo"`), true); +assertEq(isValidJSON(`[]`), true); +assertEq(isValidJSON(`[0, true, false, null]`), true); +assertEq(isValidJSON(`{}`), true); +assertEq(isValidJSON(`{"foo": 10}`), true); + +assertEq(isValidJSON(``), false); +assertEq(isValidJSON(`.2`), false); +assertEq(isValidJSON(`2.`), false); +assertEq(isValidJSON(`undefined`), false); +assertEq(isValidJSON(`'foo'`), false); +assertEq(isValidJSON(`'foo`), false); +assertEq(isValidJSON(`"foo`), false); +assertEq(isValidJSON(`[`), false); +assertEq(isValidJSON(`[,]`), false); +assertEq(isValidJSON(`[1,]`), false); +assertEq(isValidJSON(`{foo: 10}`), false); +assertEq(isValidJSON(`{"foo": 10,}`), false); +assertEq(isValidJSON(`{`), false); diff --git a/js/src/jit-test/tests/basic/iter-cache-null-proto.js b/js/src/jit-test/tests/basic/iter-cache-null-proto.js new file mode 100644 index 0000000000..8e6af52a6b --- /dev/null +++ b/js/src/jit-test/tests/basic/iter-cache-null-proto.js @@ -0,0 +1,11 @@ +function f() { + var o = {x: 0}; + for (var i = 0; i < 20; i++) { + if ((i % 4) === 0) + Object.setPrototypeOf(o, null); + else + Object.setPrototypeOf(o, Object.prototype); + for (var x in o) {} + } +} +f(); diff --git a/js/src/jit-test/tests/basic/iterable-error-messages.js b/js/src/jit-test/tests/basic/iterable-error-messages.js new file mode 100644 index 0000000000..7b9002580c --- /dev/null +++ b/js/src/jit-test/tests/basic/iterable-error-messages.js @@ -0,0 +1,41 @@ +// |jit-test| skip-if: getBuildConfiguration('pbl') + +function assertThrowsMsgEndsWith(f, msg) { + try { + f(); + assertEq(0, 1); + } catch(e) { + assertEq(e instanceof TypeError, true); + assertEq(e.message.endsWith(msg), true); + } +} + +// For-of +function testForOf(val) { + for (var x of val) {} +} +for (v of [{}, Math, new Proxy({}, {})]) { + assertThrowsMsgEndsWith(() => testForOf(v), "val is not iterable"); +} +assertThrowsMsgEndsWith(() => testForOf(null), "val is null"); +assertThrowsMsgEndsWith(() => { for (var x of () => 1) {}}, "() => 1 is not iterable"); + +// Destructuring +function testDestr(val) { + var [a, b] = val; +} +for (v of [{}, Math, new Proxy({}, {})]) { + assertThrowsMsgEndsWith(() => testDestr(v), "val is not iterable"); +} +assertThrowsMsgEndsWith(() => testDestr(null), "val is null"); +assertThrowsMsgEndsWith(() => { [a, b] = () => 1; }, "() => 1 is not iterable"); + +// Spread +function testSpread(val) { + [...val]; +} +for (v of [{}, Math, new Proxy({}, {})]) { + assertThrowsMsgEndsWith(() => testSpread(v), "val is not iterable"); +} +assertThrowsMsgEndsWith(() => testSpread(null), "val is null"); +assertThrowsMsgEndsWith(() => { [...() => 1]; }, "() => 1 is not iterable"); diff --git a/js/src/jit-test/tests/basic/iterator-cache-invalidation.js b/js/src/jit-test/tests/basic/iterator-cache-invalidation.js new file mode 100644 index 0000000000..33adc5a16a --- /dev/null +++ b/js/src/jit-test/tests/basic/iterator-cache-invalidation.js @@ -0,0 +1,52 @@ +function test(obj, expected) { + var result = ""; + for (var s in obj) { + result += s + ","; + } + assertEq(result, expected); +} + +function runTest(mutate, expectedAfter) { + var p = {px: 1, py: 2}; + var o = Object.create(p); + o.x = 3; + o.y = 4; + + var expectedBefore = "x,y,px,py,"; + test(o, expectedBefore); + mutate(o, p); + test(o, expectedAfter); +} + + +function testAddElement() { + runTest((o,p) => { o[0] = 5; }, "0,x,y,px,py,"); +} +function testAddProtoElement() { + runTest((o,p) => { p[0] = 5; }, "x,y,0,px,py,"); +} +function testDelete() { + runTest((o,p) => { delete o.x; }, "y,px,py,"); +} +function testProtoDelete() { + runTest((o,p) => { delete p.px; }, "x,y,py,"); +} +function testMakeUnenumerable() { + runTest((o,p) => { + Object.defineProperty(o, "x", { value: 1, enumerable: false }); + }, "y,px,py,"); +} +function testMakeProtoUnenumerable() { + runTest((o,p) => { + Object.defineProperty(p, "px", { value: 1, enumerable: false }); + }, "x,y,py,"); +} + +for (var i = 0; i < 10; i++) { + testAddElement(); + testAddProtoElement(); + testDelete(); + testProtoDelete(); + testMakeUnenumerable() + testMakeProtoUnenumerable() +} diff --git a/js/src/jit-test/tests/basic/jemalloc-settings.js b/js/src/jit-test/tests/basic/jemalloc-settings.js new file mode 100644 index 0000000000..a5693614ec --- /dev/null +++ b/js/src/jit-test/tests/basic/jemalloc-settings.js @@ -0,0 +1,7 @@ +for (var i = -5; i <= 16; i++) { + setMallocMaxDirtyPageModifier(i); + for (var j = 0; j < 20; j++) { + var arr = Array(j).fill(j); + } + gc(); +} diff --git a/js/src/jit-test/tests/basic/joinTest.js b/js/src/jit-test/tests/basic/joinTest.js new file mode 100644 index 0000000000..1988da4f41 --- /dev/null +++ b/js/src/jit-test/tests/basic/joinTest.js @@ -0,0 +1,15 @@ +function joinTest() +{ + var s = ""; + var a = []; + for (var i = 0; i < 8; i++) + a[i] = [String.fromCharCode(97 + i)]; + for (i = 0; i < 8; i++) { + for (var j = 0; j < 8; j++) + a[i][1 + j] = j; + } + for (i = 0; i < 8; i++) + s += a[i].join(","); + return s; +} +assertEq(joinTest(), "a,0,1,2,3,4,5,6,7b,0,1,2,3,4,5,6,7c,0,1,2,3,4,5,6,7d,0,1,2,3,4,5,6,7e,0,1,2,3,4,5,6,7f,0,1,2,3,4,5,6,7g,0,1,2,3,4,5,6,7h,0,1,2,3,4,5,6,7"); diff --git a/js/src/jit-test/tests/basic/json-parse-object-edge-cases.js b/js/src/jit-test/tests/basic/json-parse-object-edge-cases.js new file mode 100644 index 0000000000..2a93cd4211 --- /dev/null +++ b/js/src/jit-test/tests/basic/json-parse-object-edge-cases.js @@ -0,0 +1,49 @@ +// Array includes objects with duplicate keys and integer keys. +let json = `[ + {"x1": 1}, + {"x2": 2}, + {"x3": 3}, + {"x1": 1, "y": 0}, + {"x2": 1, "y": 0}, + {"x3": 1, "y": 0}, + {"x1": 1, "x1": 2, "y": 0}, + {"x1": 1, "x1": 2, "y": 0}, + {"x1": 1, "x1": 2, "y": 0}, + {"0": 1, "x1": 1}, + {"0": 1, "0": 2, "x1": 1}, + {"0": 1, "0": 2, "x1": 1}, + {"2147483648": 1}, + {"2147483648": 2}, + {"2147483648": 0, "x": 0, "2147483648": 3}, + {"4294967295": 4}, + {"4294967295": 5}, + {"-1": 6}, + {"-1": 7}, + {"__proto__": 1}, + {"__proto__": 2} +]`; +for (let i = 0; i < 3; i++) { + let res = JSON.parse(json); + assertEq(JSON.stringify(res), + `[{"x1":1},` + + `{"x2":2},` + + `{"x3":3},` + + `{"x1":1,"y":0},` + + `{"x2":1,"y":0},` + + `{"x3":1,"y":0},` + + `{"x1":2,"y":0},` + + `{"x1":2,"y":0},` + + `{"x1":2,"y":0},` + + `{"0":1,"x1":1},` + + `{"0":2,"x1":1},` + + `{"0":2,"x1":1},` + + `{"2147483648":1},` + + `{"2147483648":2},` + + `{"2147483648":3,"x":0},` + + `{"4294967295":4},` + + `{"4294967295":5},` + + `{"-1":6},` + + `{"-1":7},` + + `{"__proto__":1},` + + `{"__proto__":2}]`); +} diff --git a/js/src/jit-test/tests/basic/json-stringify-large-length.js b/js/src/jit-test/tests/basic/json-stringify-large-length.js new file mode 100644 index 0000000000..d362d1c763 --- /dev/null +++ b/js/src/jit-test/tests/basic/json-stringify-large-length.js @@ -0,0 +1,10 @@ +// |jit-test| error:InternalError +var arr = [1, 2, 3]; +var proxy = new Proxy(arr, { + get(target, prop) { + if (prop === "length") { + return Math.pow(2, 33); + } + } +}); +JSON.stringify(proxy); diff --git a/js/src/jit-test/tests/basic/key-gc.js b/js/src/jit-test/tests/basic/key-gc.js new file mode 100644 index 0000000000..5b684aa136 --- /dev/null +++ b/js/src/jit-test/tests/basic/key-gc.js @@ -0,0 +1,46 @@ +function f(o) { + return Object.keys(o) +} + +function test(o) { + for (var i = 0; i<10; i++) { + res = f(o); + assertEq(true, res.includes("cakebread") ); + + // Initialize for-in cache for o. + for (var prop in o) { + if (prop == "abra") print(prop); + } + + } +} + +let obj = {about: 5, + ballisitic: 6, + cakebread: 8, + dalespeople: 9, + evilproof: 20, + fairgoing: 30, + gargoylish: 2, + harmonici: 1, + jinniwink: 12, + kaleidoscopical: 2, + labellum: 1, + macadamization: 4, + neutrino: 1, + observership: 0, + quadratomandibular: 9, + rachicentesis: 1, + saltcat: 0, + trousseau: 1, + view: 10, + wheelbox: 2, + xerography: 1, + yez: 3, +} + +// Verify things. + +// Collect after every allocation to shake loose issues +gczeal(2,1); +test(obj) diff --git a/js/src/jit-test/tests/basic/keys-testing.js b/js/src/jit-test/tests/basic/keys-testing.js new file mode 100644 index 0000000000..d02ac7be5d --- /dev/null +++ b/js/src/jit-test/tests/basic/keys-testing.js @@ -0,0 +1,134 @@ +function f(o) { + return Object.keys(o) +} + +po = { + failure: 'hello' +} + +o = {about: 5, + ballisitic: 6, + cakebread: 8, + dalespeople: 9, + evilproof: 20, + fairgoing: 30, + gargoylish: 2, + harmonici: 1, + jinniwink: 12, + kaleidoscopical: 2, + labellum: 1, + macadamization: 4, + neutrino: 1, + observership: 0, + quadratomandibular: 9, + rachicentesis: 1, + saltcat: 0, + trousseau: 1, + view: 10, + wheelbox: 2, + xerography: 1, + yez: 3, +} +Object.setPrototypeOf(o, po); + +// Initialize for-in cache for o. +for (var prop in o) { + print(prop) +} + +function test(o) { + for (var i = 0; i<10; i++) { + res = f(o); + assertEq(false, res.includes("failure") ); + // assertEq(true, res.includes("1") ); + } +} + +// Verify things. +test(o) + + +po[2] = "hi"; +test(o); + +po[3] = "bye"; +for (var prop in o) { + assertEq(prop == "gnome", false); +} +test(o); + + +o2 = {about: 5, + ballisitic: 6, + cakebread: 8, + dalespeople: 9, + evilproof: 20, + fairgoing: 30, + gargoylish: 2, + harmonici: 1, + jinniwink: 12, + kaleidoscopical: 2, + labellum: 1, + macadamization: 4, + neutrino: 1, + observership: 0, + quadratomandibular: 9, + rachicentesis: 1, + saltcat: 0, + trousseau: 1, + view: 10, + wheelbox: 2, + xerography: 1, + yez: 3, + "1": 10, +} + +// Initialize for-in cache for o. +for (var prop in o2) { + if (prop == "abra") print(prop); +} + +// Verify things. +test(o2) + + +for (var i = 0; i < 20; i++) { + assertEq(Object.keys(o2).includes("1"), true); +} + +let o3 = {about: 5, + ballisitic: 6, + cakebread: 8, + dalespeople: 9, + evilproof: 20, + fairgoing: 30, + gargoylish: 2, + harmonici: 1, + jinniwink: 12, + kaleidoscopical: 2, + labellum: 1, + macadamization: 4, + neutrino: 1, + observership: 0, + quadratomandibular: 9, + rachicentesis: 1, + saltcat: 0, + trousseau: 1, + view: 10, + wheelbox: 2, + xerography: 1, + yez: 3, +} + +// Initialize for-in cache for o. +for (var prop in o2) { + if (prop == "abra") print(prop); +} + +// Verify things. +test(o3) + + +for (var i = 0; i < 20; i++) { + assertEq(Object.keys(o3).includes("yez"), true); +} diff --git a/js/src/jit-test/tests/basic/lazyparse.js b/js/src/jit-test/tests/basic/lazyparse.js new file mode 100644 index 0000000000..b878c6302e --- /dev/null +++ b/js/src/jit-test/tests/basic/lazyparse.js @@ -0,0 +1,45 @@ + +function outer() { + var xyz = 0; + function foo() { + function bar() { xyz++; } + bar(); + let x = 3; + } + foo(); + assertEq(xyz, 1); +} +outer(); + +function mapfloor(a) { + var b = a.map(function(v) { + "use strict"; + try { + eval("delete String;"); + } catch (e) { + return e instanceof res; + } + }); + var res = ""; +} +try { + mapfloor([1,2]); +} catch (e) {} + +test(); +function test() { + try { + eval('let(z) { with({}) let y = 3; }'); + } catch(ex) { + (function(x) { return !(x) })(0/0) + } +} + +testCatch(15); +function testCatch(y) { + try { + throw 5; + } catch(ex) { + (function(x) { assertEq(x + y + ex, 25); })(5) + } +} diff --git a/js/src/jit-test/tests/basic/letTDZAfterInitializer.js b/js/src/jit-test/tests/basic/letTDZAfterInitializer.js new file mode 100644 index 0000000000..575615c176 --- /dev/null +++ b/js/src/jit-test/tests/basic/letTDZAfterInitializer.js @@ -0,0 +1,19 @@ +function throwSomething() { + throw "something"; +} + +try { + // Use eval to force BINDNAME. Should throw "something" instead of the TDZ + // ReferenceError. + eval("x = throwSomething()"); + let x; +} catch (e) { + assertEq(e, "something"); +} + +try { + eval("x = 42"); + let x; +} catch (e) { + assertEq(e instanceof ReferenceError, true); +} diff --git a/js/src/jit-test/tests/basic/letTDZEffectful.js b/js/src/jit-test/tests/basic/letTDZEffectful.js new file mode 100644 index 0000000000..62245d8c16 --- /dev/null +++ b/js/src/jit-test/tests/basic/letTDZEffectful.js @@ -0,0 +1,13 @@ +function assertThrowsReferenceError(f) { + var e = null; + try { + f(); + } catch (ex) { + e = ex; + } + assertEq(e instanceof ReferenceError, true); +} + +// TDZ is effectful, don't optimize out x. +assertThrowsReferenceError(function () { x; let x; }); +assertThrowsReferenceError(function () { x; const x = undefined; }); diff --git a/js/src/jit-test/tests/basic/letTDZSwitchClosure.js b/js/src/jit-test/tests/basic/letTDZSwitchClosure.js new file mode 100644 index 0000000000..c601f9858d --- /dev/null +++ b/js/src/jit-test/tests/basic/letTDZSwitchClosure.js @@ -0,0 +1,60 @@ +function assertThrowsReferenceError(f) { + var err; + try { + f(); + } catch (e) { + err = e; + } + assertEq(err instanceof ReferenceError, true); +} + +function f() { + switch (0) { + case 1: + let x + case function() { + print(x) + }(): + } +} +assertThrowsReferenceError(f); + +function g() { + switch (0) { + case 1: + let x; + case 0: + var inner = function () { + print(x); + } + inner(); + break; + } +} +assertThrowsReferenceError(g); + +function h() { + switch (0) { + case 0: + var inner = function () { + print(x); + } + inner(); + case 1: + let x; + } +} +assertThrowsReferenceError(h); + +// Tests that a dominating lexical doesn't throw. +function F() { + switch (0) { + case 0: + let x = 42; + var inner = function () { + assertEq(x, 42); + } + inner(); + } +} +F(); diff --git a/js/src/jit-test/tests/basic/local.js b/js/src/jit-test/tests/basic/local.js new file mode 100644 index 0000000000..0f8b12b3fb --- /dev/null +++ b/js/src/jit-test/tests/basic/local.js @@ -0,0 +1,3 @@ +// A file in the same directory as testPaths.js + +x = 'local'; diff --git a/js/src/jit-test/tests/basic/matchInLoop.js b/js/src/jit-test/tests/basic/matchInLoop.js new file mode 100644 index 0000000000..89f40ac5fd --- /dev/null +++ b/js/src/jit-test/tests/basic/matchInLoop.js @@ -0,0 +1,8 @@ +function matchInLoop() { + var k = "hi"; + for (var i = 0; i < 10; i++) { + var result = k.match(/hi/) != null; + } + return result; +} +assertEq(matchInLoop(), true); diff --git a/js/src/jit-test/tests/basic/math-jit-tests.js b/js/src/jit-test/tests/basic/math-jit-tests.js new file mode 100644 index 0000000000..32da64fed0 --- /dev/null +++ b/js/src/jit-test/tests/basic/math-jit-tests.js @@ -0,0 +1,520 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */ + +// Apply FUNCNAME to ARGS, and check against EXPECTED. +// Expect a loop containing such a call to be traced. +// FUNCNAME and ARGS are both strings. +// ARGS has the form of an argument list: a comma-separated list of expressions. +// Certain Tracemonkey limitations require us to pass FUNCNAME as a string. +// Passing ARGS as a string allows us to assign better test names: +// expressions like Math.PI/4 haven't been evaluated to big hairy numbers. +function testmath(funcname, args, expected) { + var i, j; + + var arg_value_list = eval("[" + args + "]"); + var arity = arg_value_list.length; + + // Build the string "a[i][0],...,a[i][ARITY-1]". + var actuals = [] + for (i = 0; i < arity; i++) + actuals.push("a[i][" + i + "]"); + actuals = actuals.join(","); + + // Create a function that maps FUNCNAME across an array of input values. + // Unless we eval here, the call to funcname won't get traced. + // FUNCNAME="Infinity/Math.abs" and cases like that happen to + // parse, too, in a twisted way. + var mapfunc = eval("(function(a) {\n" + + " for (var i = 0; i < a.length; i++)\n" + + " a[i] = " + funcname + "(" + actuals +");\n" + + " })\n"); + + // To prevent the compiler from doing constant folding, produce an + // array to pass to mapfunc that contains enough dummy + // values at the front to get the loop body jitted, and then our + // actual test value. + var dummies_and_input = []; + for (i = 0; i < 9; i++) { + var dummy_list = []; + for (j = 0; j < arity; j++) + dummy_list[j] = .0078125 * ((i + j) % 128); + dummies_and_input[i] = dummy_list; + } + dummies_and_input[9] = arg_value_list; + + function testfunc() { + // Map the function across the dummy values and the test input. + mapfunc(dummies_and_input); + return dummies_and_input[9]; + } + + assertEq(close_enough(testfunc(), expected), true); +} + +function close_enough(expected, actual) +{ + if (typeof expected != typeof actual) + return false; + if (typeof expected != 'number') + return actual == expected; + + // Distinguish NaN from other values. Using x != x comparisons here + // works even if tests redefine isNaN. + if (actual != actual) + return expected != expected + if (expected != expected) + return false; + + // Tolerate a certain degree of error. + if (actual != expected) + return Math.abs(actual - expected) <= 1E-10; + + // Distinguish 0 and -0. + if (actual == 0) + return (1 / actual > 0) == (1 / expected > 0); + + return true; +} + +testmath("Math.abs", "void 0", Number.NaN) +testmath("Math.abs", "null", 0) +testmath("Math.abs", "true", 1) +testmath("Math.abs", "false", 0) +testmath("Math.abs", "\"a string primitive\"", Number.NaN) +testmath("Math.abs", "new String( 'a String object' )", Number.NaN) +testmath("Math.abs", "Number.NaN", Number.NaN) +testmath("Math.abs", "0", 0) +testmath("Math.abs", "-0", 0) +testmath("Infinity/Math.abs", "-0", Infinity) +testmath("Math.abs", "Number.NEGATIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.abs", "Number.POSITIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.abs", "- Number.MAX_VALUE", Number.MAX_VALUE) +testmath("Math.abs", "-Number.MIN_VALUE", Number.MIN_VALUE) +testmath("Math.abs", "Number.MAX_VALUE", Number.MAX_VALUE) +testmath("Math.abs", "Number.MIN_VALUE", Number.MIN_VALUE) +testmath("Math.abs", "-1", 1) +testmath("Math.abs", "new Number(-1)", 1) +testmath("Math.abs", "1", 1) +testmath("Math.abs", "Math.PI", Math.PI) +testmath("Math.abs", "-Math.PI", Math.PI) +testmath("Math.abs", "-1/100000000", 1/100000000) +testmath("Math.abs", "-Math.pow(2,32)", Math.pow(2,32)) +testmath("Math.abs", "Math.pow(2,32)", Math.pow(2,32)) +testmath("Math.abs", "-0xfff", 4095) +testmath("Math.abs", "-0777", 511) +testmath("Math.abs", "'-1e-1'", 0.1) +testmath("Math.abs", "'0xff'", 255) +testmath("Math.abs", "'077'", 77) +testmath("Math.abs", "'Infinity'", Infinity) +testmath("Math.abs", "'-Infinity'", Infinity) + +testmath("Math.acos", "void 0", Number.NaN) +testmath("Math.acos", "null", Math.PI/2) +testmath("Math.acos", "Number.NaN", Number.NaN) +testmath("Math.acos", "\"a string\"", Number.NaN) +testmath("Math.acos", "'0'", Math.PI/2) +testmath("Math.acos", "'1'", 0) +testmath("Math.acos", "'-1'", Math.PI) +testmath("Math.acos", "1.00000001", Number.NaN) +testmath("Math.acos", "-1.00000001", Number.NaN) +testmath("Math.acos", "1", 0) +testmath("Math.acos", "-1", Math.PI) +testmath("Math.acos", "0", Math.PI/2) +testmath("Math.acos", "-0", Math.PI/2) +testmath("Math.acos", "Math.SQRT1_2", Math.PI/4) +testmath("Math.acos", "-Math.SQRT1_2", Math.PI/4*3) +testmath("Math.acos", "0.9999619230642", Math.PI/360) +testmath("Math.acos", "-3.0", Number.NaN) + +testmath("Math.asin", "void 0", Number.NaN) +testmath("Math.asin", "null", 0) +testmath("Math.asin", "Number.NaN", Number.NaN) +testmath("Math.asin", "\"string\"", Number.NaN) +testmath("Math.asin", "\"0\"", 0) +testmath("Math.asin", "\"1\"", Math.PI/2) +testmath("Math.asin", "\"-1\"", -Math.PI/2) +testmath("Math.asin", "Math.SQRT1_2+''", Math.PI/4) +testmath("Math.asin", "-Math.SQRT1_2+''", -Math.PI/4) +testmath("Math.asin", "1.000001", Number.NaN) +testmath("Math.asin", "-1.000001", Number.NaN) +testmath("Math.asin", "0", 0) +testmath("Math.asin", "-0", -0) +testmath("Infinity/Math.asin", "-0", -Infinity) +testmath("Math.asin", "1", Math.PI/2) +testmath("Math.asin", "-1", -Math.PI/2) +testmath("Math.asin", "Math.SQRT1_2", Math.PI/4) +testmath("Math.asin", "-Math.SQRT1_2", -Math.PI/4) + +testmath("Math.atan", "void 0", Number.NaN) +testmath("Math.atan", "null", 0) +testmath("Math.atan", "Number.NaN", Number.NaN) +testmath("Math.atan", "\"a string\"", Number.NaN) +testmath("Math.atan", "'0'", 0) +testmath("Math.atan", "'1'", Math.PI/4) +testmath("Math.atan", "'-1'", -Math.PI/4) +testmath("Math.atan", "'Infinity'", Math.PI/2) +testmath("Math.atan", "'-Infinity'", -Math.PI/2) +testmath("Math.atan", "0", 0) +testmath("Math.atan", "-0", -0) +testmath("Infinity/Math.atan", "-0", -Infinity) +testmath("Math.atan", "Number.POSITIVE_INFINITY", Math.PI/2) +testmath("Math.atan", "Number.NEGATIVE_INFINITY", -Math.PI/2) +testmath("Math.atan", "1", Math.PI/4) +testmath("Math.atan", "-1", -Math.PI/4) + +testmath("Math.atan2", "Number.NaN,0", Number.NaN) +testmath("Math.atan2", "null, null", 0) +testmath("Math.atan2", "void 0, void 0", Number.NaN) +testmath("Math.atan2", "0,Number.NaN", Number.NaN) +testmath("Math.atan2", "1,0", Math.PI/2) +testmath("Math.atan2", "1,-0", Math.PI/2) +testmath("Math.atan2", "0,0.001", 0) +testmath("Math.atan2", "0,0", 0) +testmath("Math.atan2", "0,-0", Math.PI) +testmath("Math.atan2", "0, -1", Math.PI) +testmath("Math.atan2", "-0, 1", -0) +testmath("Infinity/Math.atan2", "-0,1", -Infinity) +testmath("Math.atan2", "-0,0", -0) +testmath("Math.atan2", "-0, -0", -Math.PI) +testmath("Math.atan2", "-0, -1", -Math.PI) +testmath("Math.atan2", "-1, 0", -Math.PI/2) +testmath("Math.atan2", "-1, -0", -Math.PI/2) +testmath("Math.atan2", "1, Number.POSITIVE_INFINITY", 0) +testmath("Math.atan2", "1, Number.NEGATIVE_INFINITY", Math.PI) +testmath("Math.atan2", "-1,Number.POSITIVE_INFINITY", -0) +testmath("Infinity/Math.atan2", "-1,Infinity", -Infinity) +testmath("Math.atan2", "-1,Number.NEGATIVE_INFINITY", -Math.PI) +testmath("Math.atan2", "Number.POSITIVE_INFINITY, 0", Math.PI/2) +testmath("Math.atan2", "Number.POSITIVE_INFINITY, 1", Math.PI/2) +testmath("Math.atan2", "Number.POSITIVE_INFINITY,-1", Math.PI/2) +testmath("Math.atan2", "Number.POSITIVE_INFINITY,-0", Math.PI/2) +testmath("Math.atan2", "Number.NEGATIVE_INFINITY, 0", -Math.PI/2) +testmath("Math.atan2", "Number.NEGATIVE_INFINITY,-0", -Math.PI/2) +testmath("Math.atan2", "Number.NEGATIVE_INFINITY, 1", -Math.PI/2) +testmath("Math.atan2", "Number.NEGATIVE_INFINITY,-1", -Math.PI/2) +testmath("Math.atan2", "Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY", Math.PI/4) +testmath("Math.atan2", "Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY", 3*Math.PI/4) +testmath("Math.atan2", "Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY", -Math.PI/4) +testmath("Math.atan2", "Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY", -3*Math.PI/4) +testmath("Math.atan2", "-1, 1", -Math.PI/4) + +testmath("Math.ceil", "Number.NaN", Number.NaN) +testmath("Math.ceil", "null", 0) +testmath("Math.ceil", "void 0", Number.NaN) +testmath("Math.ceil", "'0'", 0) +testmath("Math.ceil", "'-0'", -0) +testmath("Infinity/Math.ceil", "'0'", Infinity) +testmath("Infinity/Math.ceil", "'-0'", -Infinity) +testmath("Math.ceil", "0", 0) +testmath("Math.ceil", "-0", -0) +testmath("Infinity/Math.ceil", "0", Infinity) +testmath("Infinity/Math.ceil", "-0", -Infinity) +testmath("Math.ceil", "Number.POSITIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.ceil", "Number.NEGATIVE_INFINITY", Number.NEGATIVE_INFINITY) +testmath("Math.ceil", "-Number.MIN_VALUE", -0) +testmath("Infinity/Math.ceil", "-Number.MIN_VALUE", -Infinity) +testmath("Math.ceil", "1", 1) +testmath("Math.ceil", "-1", -1) +testmath("Math.ceil", "-0.9", -0) +testmath("Infinity/Math.ceil", "-0.9", -Infinity) +testmath("Math.ceil", "0.9", 1) +testmath("Math.ceil", "-1.1", -1) +testmath("Math.ceil", "1.1", 2) +testmath("Math.ceil", "Number.POSITIVE_INFINITY", -Math.floor(-Infinity)) +testmath("Math.ceil", "Number.NEGATIVE_INFINITY", -Math.floor(Infinity)) +testmath("Math.ceil", "-Number.MIN_VALUE", -Math.floor(Number.MIN_VALUE)) +testmath("Math.ceil", "1", -Math.floor(-1)) +testmath("Math.ceil", "-1", -Math.floor(1)) +testmath("Math.ceil", "-0.9", -Math.floor(0.9)) +testmath("Math.ceil", "0.9", -Math.floor(-0.9)) +testmath("Math.ceil", "-1.1", -Math.floor(1.1)) +testmath("Math.ceil", "1.1", -Math.floor(-1.1)) + +testmath("Math.cos", "void 0", Number.NaN) +testmath("Math.cos", "false", 1) +testmath("Math.cos", "null", 1) +testmath("Math.cos", "'0'", 1) +testmath("Math.cos", "\"Infinity\"", Number.NaN) +testmath("Math.cos", "'3.14159265359'", -1) +testmath("Math.cos", "Number.NaN", Number.NaN) +testmath("Math.cos", "0", 1) +testmath("Math.cos", "-0", 1) +testmath("Math.cos", "Number.POSITIVE_INFINITY", Number.NaN) +testmath("Math.cos", "Number.NEGATIVE_INFINITY", Number.NaN) +testmath("Math.cos", "0.7853981633974", 0.7071067811865) +testmath("Math.cos", "1.570796326795", 0) +testmath("Math.cos", "2.356194490192", -0.7071067811865) +testmath("Math.cos", "3.14159265359", -1) +testmath("Math.cos", "3.926990816987", -0.7071067811865) +testmath("Math.cos", "4.712388980385", 0) +testmath("Math.cos", "5.497787143782", 0.7071067811865) +testmath("Math.cos", "Math.PI*2", 1) +testmath("Math.cos", "Math.PI/4", Math.SQRT2/2) +testmath("Math.cos", "Math.PI/2", 0) +testmath("Math.cos", "3*Math.PI/4", -Math.SQRT2/2) +testmath("Math.cos", "Math.PI", -1) +testmath("Math.cos", "5*Math.PI/4", -Math.SQRT2/2) +testmath("Math.cos", "3*Math.PI/2", 0) +testmath("Math.cos", "7*Math.PI/4", Math.SQRT2/2) +testmath("Math.cos", "2*Math.PI", 1) +testmath("Math.cos", "-0.7853981633974", 0.7071067811865) +testmath("Math.cos", "-1.570796326795", 0) +testmath("Math.cos", "2.3561944901920", -.7071067811865) +testmath("Math.cos", "3.14159265359", -1) +testmath("Math.cos", "3.926990816987", -0.7071067811865) +testmath("Math.cos", "4.712388980385", 0) +testmath("Math.cos", "5.497787143782", 0.7071067811865) +testmath("Math.cos", "6.28318530718", 1) +testmath("Math.cos", "-Math.PI/4", Math.SQRT2/2) +testmath("Math.cos", "-Math.PI/2", 0) +testmath("Math.cos", "-3*Math.PI/4", -Math.SQRT2/2) +testmath("Math.cos", "-Math.PI", -1) +testmath("Math.cos", "-5*Math.PI/4", -Math.SQRT2/2) +testmath("Math.cos", "-3*Math.PI/2", 0) +testmath("Math.cos", "-7*Math.PI/4", Math.SQRT2/2) +testmath("Math.cos", "-Math.PI*2", 1) + +testmath("Math.exp", "null", 1) +testmath("Math.exp", "void 0", Number.NaN) +testmath("Math.exp", "1", Math.E) +testmath("Math.exp", "true", Math.E) +testmath("Math.exp", "false", 1) +testmath("Math.exp", "'1'", Math.E) +testmath("Math.exp", "'0'", 1) +testmath("Math.exp", "Number.NaN", Number.NaN) +testmath("Math.exp", "0", 1) +testmath("Math.exp", "-0", 1) +testmath("Math.exp", "Number.POSITIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.exp", "Number.NEGATIVE_INFINITY", 0) + +testmath("Math.floor", "void 0", Number.NaN) +testmath("Math.floor", "null", 0) +testmath("Math.floor", "true", 1) +testmath("Math.floor", "false", 0) +testmath("Math.floor", "\"1.1\"", 1) +testmath("Math.floor", "\"-1.1\"", -2) +testmath("Math.floor", "\"0.1\"", 0) +testmath("Math.floor", "\"-0.1\"", -1) +testmath("Math.floor", "Number.NaN", Number.NaN) +testmath("Math.floor(Number.NaN) == -Math.ceil", "-Number.NaN", false) +testmath("Math.floor", "0", 0) +testmath("Math.floor(0) == -Math.ceil", "-0", true) +testmath("Math.floor", "-0", -0) +testmath("Infinity/Math.floor", "-0", -Infinity) +testmath("Math.floor(-0)== -Math.ceil", "0", true) +testmath("Math.floor", "Number.POSITIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.floor(Number.POSITIVE_INFINITY) == -Math.ceil", "Number.NEGATIVE_INFINITY", true) +testmath("Math.floor", "Number.NEGATIVE_INFINITY", Number.NEGATIVE_INFINITY) +testmath("Math.floor(Number.NEGATIVE_INFINITY) == -Math.ceil", "Number.POSITIVE_INFINITY", true) +testmath("Math.floor", "0.0000001", 0) +testmath("Math.floor(0.0000001)==-Math.ceil", "-0.0000001", true) +testmath("Math.floor", "-0.0000001", -1) +testmath("Math.floor(-0.0000001)==-Math.ceil", "0.0000001", true) + +testmath("Math.log", "void 0", Number.NaN) +testmath("Math.log", "null", Number.NEGATIVE_INFINITY) +testmath("Math.log", "true", 0) +testmath("Math.log", "false", -Infinity) +testmath("Math.log", "'0'", -Infinity) +testmath("Math.log", "'1'", 0) +testmath("Math.log", "\"Infinity\"", Infinity) +testmath("Math.log", "Number.NaN", Number.NaN) +testmath("Math.log", "-0.000001", Number.NaN) +testmath("Math.log", "-1", Number.NaN) +testmath("Math.log", "0", Number.NEGATIVE_INFINITY) +testmath("Math.log", "-0", Number.NEGATIVE_INFINITY) +testmath("Math.log", "1", 0) +testmath("Math.log", "Number.POSITIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.log", "Number.NEGATIVE_INFINITY", Number.NaN) + +testmath("Math.max", "void 0, 1", Number.NaN) +testmath("Math.max", "void 0, void 0", Number.NaN) +testmath("Math.max", "null, 1", 1) +testmath("Math.max", "-1, null", 0) +testmath("Math.max", "true,false", 1) +testmath("Math.max", "\"-99\",\"99\"", 99) +testmath("Math.max", "Number.NaN,Number.POSITIVE_INFINITY", Number.NaN) +testmath("Math.max", "Number.NaN, 0", Number.NaN) +testmath("Math.max", "\"a string\", 0", Number.NaN) +testmath("Math.max", "Number.NaN,1", Number.NaN) +testmath("Math.max", "\"a string\", Number.POSITIVE_INFINITY", Number.NaN) +testmath("Math.max", "Number.POSITIVE_INFINITY, Number.NaN", Number.NaN) +testmath("Math.max", "Number.NaN, Number.NaN", Number.NaN) +testmath("Math.max", "0,Number.NaN", Number.NaN) +testmath("Math.max", "1, Number.NaN", Number.NaN) +testmath("Math.max", "0,0", 0) +testmath("Math.max", "0,-0", 0) +testmath("Math.max", "-0,0", 0) +testmath("Math.max", "-0,-0", -0) +testmath("Infinity/Math.max", "-0,-0", -Infinity) +testmath("Math.max", "Number.POSITIVE_INFINITY, Number.MAX_VALUE", Number.POSITIVE_INFINITY) +testmath("Math.max", "Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.max", "Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY", Number.NEGATIVE_INFINITY) +testmath("Math.max", "1,.99999999999999", 1) +testmath("Math.max", "-1,-.99999999999999", -.99999999999999) + +testmath("Math.min", "void 0, 1", Number.NaN) +testmath("Math.min", "void 0, void 0", Number.NaN) +testmath("Math.min", "null, 1", 0) +testmath("Math.min", "-1, null", -1) +testmath("Math.min", "true,false", 0) +testmath("Math.min", "\"-99\",\"99\"", -99) +testmath("Math.min", "Number.NaN,0", Number.NaN) +testmath("Math.min", "Number.NaN,1", Number.NaN) +testmath("Math.min", "Number.NaN,-1", Number.NaN) +testmath("Math.min", "0,Number.NaN", Number.NaN) +testmath("Math.min", "1,Number.NaN", Number.NaN) +testmath("Math.min", "-1,Number.NaN", Number.NaN) +testmath("Math.min", "Number.NaN,Number.NaN", Number.NaN) +testmath("Math.min", "1,1.0000000001", 1) +testmath("Math.min", "1.0000000001,1", 1) +testmath("Math.min", "0,0", 0) +testmath("Math.min", "0,-0", -0) +testmath("Math.min", "-0,-0", -0) +testmath("Infinity/Math.min", "0,-0", -Infinity) +testmath("Infinity/Math.min", "-0,-0", -Infinity) + +testmath("Math.pow", "null,null", 1) +testmath("Math.pow", "void 0, void 0", Number.NaN) +testmath("Math.pow", "true, false", 1) +testmath("Math.pow", "false,true", 0) +testmath("Math.pow", "'2','32'", 4294967296) +testmath("Math.pow", "1,Number.NaN", Number.NaN) +testmath("Math.pow", "0,Number.NaN", Number.NaN) +testmath("Math.pow", "Number.NaN,0", 1) +testmath("Math.pow", "Number.NaN,-0", 1) +testmath("Math.pow", "Number.NaN, 1", Number.NaN) +testmath("Math.pow", "Number.NaN, .5", Number.NaN) +testmath("Math.pow", "1.00000001, Number.POSITIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.pow", "1.00000001, Number.NEGATIVE_INFINITY", 0) +testmath("Math.pow", "-1.00000001,Number.POSITIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.pow", "-1.00000001,Number.NEGATIVE_INFINITY", 0) +testmath("Math.pow", "1, Number.POSITIVE_INFINITY", Number.NaN) +testmath("Math.pow", "1, Number.NEGATIVE_INFINITY", Number.NaN) +testmath("Math.pow", "-1, Number.POSITIVE_INFINITY", Number.NaN) +testmath("Math.pow", "-1, Number.NEGATIVE_INFINITY", Number.NaN) +testmath("Math.pow", ".0000000009, Number.POSITIVE_INFINITY", 0) +testmath("Math.pow", "-.0000000009, Number.POSITIVE_INFINITY", 0) +testmath("Math.pow", "-.0000000009, Number.NEGATIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.pow", "Number.POSITIVE_INFINITY,.00000000001", Number.POSITIVE_INFINITY) +testmath("Math.pow", "Number.POSITIVE_INFINITY, 1", Number.POSITIVE_INFINITY) +testmath("Math.pow", "Number.POSITIVE_INFINITY, -.00000000001", 0) +testmath("Math.pow", "Number.POSITIVE_INFINITY, -1", 0) +testmath("Math.pow", "Number.NEGATIVE_INFINITY, 1", Number.NEGATIVE_INFINITY) +testmath("Math.pow", "Number.NEGATIVE_INFINITY, 333", Number.NEGATIVE_INFINITY) +testmath("Math.pow", "Number.POSITIVE_INFINITY, 2", Number.POSITIVE_INFINITY) +testmath("Math.pow", "Number.NEGATIVE_INFINITY, 666", Number.POSITIVE_INFINITY) +testmath("Math.pow", "Number.NEGATIVE_INFINITY, 0.5", Number.POSITIVE_INFINITY) +testmath("Math.pow", "Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.pow", "Number.NEGATIVE_INFINITY, -1", -0) +testmath("Infinity/Math.pow", "Number.NEGATIVE_INFINITY, -1", -Infinity) +testmath("Math.pow", "Number.NEGATIVE_INFINITY, -3", -0) +testmath("Math.pow", "Number.NEGATIVE_INFINITY, -2", 0) +testmath("Math.pow", "Number.NEGATIVE_INFINITY,-0.5", 0) +testmath("Math.pow", "Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY", 0) +testmath("Math.pow", "0,1", 0) +testmath("Math.pow", "0,0", 1) +testmath("Math.pow", "1,0", 1) +testmath("Math.pow", "-1,0", 1) +testmath("Math.pow", "0,0.5", 0) +testmath("Math.pow", "0,1000", 0) +testmath("Math.pow", "0, Number.POSITIVE_INFINITY", 0) +testmath("Math.pow", "0, -1", Number.POSITIVE_INFINITY) +testmath("Math.pow", "0, -0.5", Number.POSITIVE_INFINITY) +testmath("Math.pow", "0, -1000", Number.POSITIVE_INFINITY) +testmath("Math.pow", "0, Number.NEGATIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.pow", "-0, 1", -0) +testmath("Math.pow", "-0,3", -0) +testmath("Infinity/Math.pow", "-0, 1", -Infinity) +testmath("Infinity/Math.pow", "-0,3", -Infinity) +testmath("Math.pow", "-0,2", 0) +testmath("Math.pow", "-0, Number.POSITIVE_INFINITY", 0) +testmath("Math.pow", "-0, -1", Number.NEGATIVE_INFINITY) +testmath("Math.pow", "-0, -10001", Number.NEGATIVE_INFINITY) +testmath("Math.pow", "-0, -2", Number.POSITIVE_INFINITY) +testmath("Math.pow", "-0, 0.5", 0) +testmath("Math.pow", "-0, Number.POSITIVE_INFINITY", 0) +testmath("Math.pow", "-1, 0.5", Number.NaN) +testmath("Math.pow", "-1, Number.NaN", Number.NaN) +testmath("Math.pow", "-1, -0.5", Number.NaN) + +testmath("Math.round", "0", 0) +testmath("Math.round", "void 0", Number.NaN) +testmath("Math.round", "true", 1) +testmath("Math.round", "false", 0) +testmath("Math.round", "'.99999'", 1) +testmath("Math.round", "'12345e-2'", 123) +testmath("Math.round", "Number.NaN", Number.NaN) +testmath("Math.round", "0", 0) +testmath("Math.round", "-0", -0) +testmath("Infinity/Math.round", "-0", -Infinity) +testmath("Math.round", "Number.POSITIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.round", "Number.NEGATIVE_INFINITY", Number.NEGATIVE_INFINITY) +testmath("Math.round", "0.49", 0) +testmath("Math.round", "0.5", 1) +testmath("Math.round", "0.51", 1) +testmath("Math.round", "-0.49", -0) +testmath("Math.round", "-0.5", -0) +testmath("Infinity/Math.round", "-0.49", -Infinity) +testmath("Infinity/Math.round", "-0.5", -Infinity) +testmath("Math.round", "-0.51", -1) +testmath("Math.round", "3.5", 4) +testmath("Math.round", "-3", -3) + +testmath("Math.sin", "null", 0) +testmath("Math.sin", "void 0", Number.NaN) +testmath("Math.sin", "false", 0) +testmath("Math.sin", "'2.356194490192'", 0.7071067811865) +testmath("Math.sin", "Number.NaN", Number.NaN) +testmath("Math.sin", "0", 0) +testmath("Math.sin", "-0", -0) +testmath("Math.sin", "Number.POSITIVE_INFINITY", Number.NaN) +testmath("Math.sin", "Number.NEGATIVE_INFINITY", Number.NaN) +testmath("Math.sin", "0.7853981633974", 0.7071067811865) +testmath("Math.sin", "1.570796326795", 1) +testmath("Math.sin", "2.356194490192", 0.7071067811865) +testmath("Math.sin", "3.14159265359", 0) + +testmath("Math.sqrt", "void 0", Number.NaN) +testmath("Math.sqrt", "null", 0) +testmath("Math.sqrt", "1", 1) +testmath("Math.sqrt", "false", 0) +testmath("Math.sqrt", "'225'", 15) +testmath("Math.sqrt", "Number.NaN", Number.NaN) +testmath("Math.sqrt", "Number.NEGATIVE_INFINITY", Number.NaN) +testmath("Math.sqrt", "-1", Number.NaN) +testmath("Math.sqrt", "-0.5", Number.NaN) +testmath("Math.sqrt", "0", 0) +testmath("Math.sqrt", "-0", -0) +testmath("Infinity/Math.sqrt", "-0", -Infinity) +testmath("Math.sqrt", "Number.POSITIVE_INFINITY", Number.POSITIVE_INFINITY) +testmath("Math.sqrt", "1", 1) +testmath("Math.sqrt", "2", Math.SQRT2) +testmath("Math.sqrt", "0.5", Math.SQRT1_2) +testmath("Math.sqrt", "4", 2) +testmath("Math.sqrt", "9", 3) +testmath("Math.sqrt", "16", 4) +testmath("Math.sqrt", "25", 5) +testmath("Math.sqrt", "36", 6) +testmath("Math.sqrt", "49", 7) +testmath("Math.sqrt", "64", 8) +testmath("Math.sqrt", "256", 16) +testmath("Math.sqrt", "10000", 100) +testmath("Math.sqrt", "65536", 256) +testmath("Math.sqrt", "0.09", 0.3) +testmath("Math.sqrt", "0.01", 0.1) +testmath("Math.sqrt", "0.00000001", 0.0001) + +testmath("Math.tan", "void 0", Number.NaN) +testmath("Math.tan", "null", 0) +testmath("Math.tan", "false", 0) +testmath("Math.tan", "Number.NaN", Number.NaN) +testmath("Math.tan", "0", 0) +testmath("Math.tan", "-0", -0) +testmath("Math.tan", "Number.POSITIVE_INFINITY", Number.NaN) +testmath("Math.tan", "Number.NEGATIVE_INFINITY", Number.NaN) +testmath("Math.tan", "Math.PI/4", 1) +testmath("Math.tan", "3*Math.PI/4", -1) +testmath("Math.tan", "Math.PI", -0) +testmath("Math.tan", "5*Math.PI/4", 1) +testmath("Math.tan", "7*Math.PI/4", -1) +testmath("Infinity/Math.tan", "-0", -Infinity) diff --git a/js/src/jit-test/tests/basic/math-random.js b/js/src/jit-test/tests/basic/math-random.js new file mode 100644 index 0000000000..e9efab5882 --- /dev/null +++ b/js/src/jit-test/tests/basic/math-random.js @@ -0,0 +1,43 @@ +function test() { + setRNGState(0x12341234, 0x98765); + + function f() { + let x = []; + for (let i = 0; i < 10000; i++) { + x.push(Math.random()); + } + return x; + } + let x = f(); + assertEq(x[0], 0.28443027522441433); + assertEq(x[10], 0.5283908544644392); + assertEq(x[100], 0.5593668121538891); + assertEq(x[1000], 0.7008807796441313); + assertEq(x[2000], 0.11737403776989574); + assertEq(x[3000], 0.08573924080320472); + assertEq(x[4000], 0.22428965439295678); + assertEq(x[5000], 0.4657521920883555); + assertEq(x[6000], 0.11816220100329233); + assertEq(x[7000], 0.6306689010335697); + assertEq(x[8000], 0.8654862148946609); + assertEq(x[9000], 0.31734259460387015); + assertEq(x[9999], 0.013959566914027777); + + // Test some other (arbitrary) seeds. + setRNGState(0, 1); + x = f(); + assertEq(x[0], 2.220446049250313e-16); + assertEq(x[2000], 0.8259328082050756); + assertEq(x[6000], 0.01060492365550314); + assertEq(x[9999], 0.7402370773147143); + + setRNGState(0x0fff0101, 0x44440001); + x = f(); + assertEq(x[0], 0.24994062119568194); + assertEq(x[2000], 0.4375430448883283); + assertEq(x[6000], 0.7298689950209452); + assertEq(x[9999], 0.13284280897626954); +} + +if (typeof setRNGState == "function") + test(); diff --git a/js/src/jit-test/tests/basic/mathImul.js b/js/src/jit-test/tests/basic/mathImul.js new file mode 100644 index 0000000000..aa1861e5a7 --- /dev/null +++ b/js/src/jit-test/tests/basic/mathImul.js @@ -0,0 +1,71 @@ + +var table = [ + [NaN, 0, 0], + [Infinity, Infinity, 0], + [NaN, 1000, 0], + + [-1, -2, 2], + [1, 2, 2], + [-1, 2, -2], + [1, -2, -2], + [-0, 0, 0], + [0, -0, 0], + [-1, -0, 0], + [1, -0, 0], + + [0xffffffff, 1, -1], + + [0xffffffff, 0xffffffff, 1], + [0xffffffff, -0xffffffff, -1], + [0xffffffff, 0xfffffffe, 2], + [0xffffffff, -0xfffffffe, -2], + [0x10000, 0x10000, 0], + + [{}, {}, 0], + [[], [], 0], + [{}, [], 0], + [[], {}, 0], + + [{valueOf: function() { return -1; }}, 0x100000, -1048576], + ["3", "-4", -12], + [3.4, 6, 18] +]; + +try { + Math.imul({ valueOf: function() { throw "ha ha ha"; } }); + assertEq(true, false, "no error thrown"); +} catch (e) { + assertEq(e, "ha ha ha"); +} + +var order = []; +assertEq(Math.imul({ valueOf: function() { order.push("first"); return 0; } }, + { valueOf: function() { order.push("second"); return 0; } }), + 0); +assertEq(order[0], "first"); +assertEq(order[1], "second"); + +var seen = []; +try +{ + Math.imul({ valueOf: function() { seen.push("one"); return 17; } }, + { valueOf: function() { throw "abort!"; } }); + assertEq(true, false, "no error thrown"); +} +catch (e) +{ + assertEq(e, "abort!", "should have thrown partway through, instead threw " + e); +} +assertEq(seen.length, 1); +assertEq(seen[0], "one"); + +assertEq(Math.imul(), 0); +assertEq(Math.imul(100), 0); +assertEq(Math.imul(NaN, 100), 0); +assertEq(Math.imul(NaN, NaN), 0); +assertEq(Math.imul(5, Infinity), 0); + +for (var i = 0; i < table.length; i++) { + assertEq(Math.imul(table[i][0], table[i][1]), table[i][2]); + assertEq(Math.imul(table[i][1], table[i][0]), table[i][2]); +} diff --git a/js/src/jit-test/tests/basic/mathRoundBig.js b/js/src/jit-test/tests/basic/mathRoundBig.js new file mode 100644 index 0000000000..e01ffa4f54 --- /dev/null +++ b/js/src/jit-test/tests/basic/mathRoundBig.js @@ -0,0 +1,10 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +assertEq(Math.round(9007199254740991), 9007199254740991); +assertEq(Math.round(-19007199254740990), -19007199254740990); + +assertEq(Math.round("9007199254740991"), 9007199254740991); +assertEq(Math.round("-19007199254740990"), -19007199254740990); diff --git a/js/src/jit-test/tests/basic/max-string-length.js b/js/src/jit-test/tests/basic/max-string-length.js new file mode 100644 index 0000000000..95daaa640a --- /dev/null +++ b/js/src/jit-test/tests/basic/max-string-length.js @@ -0,0 +1,18 @@ +load(libdir + "asserts.js"); + +const MaxStringLength = 2**30 - 2; + +// First check MaxStringLength is accurate. +assertThrowsInstanceOf(() => "a".repeat(MaxStringLength + 1), + RangeError); + +// escape() must handle uint32_t overflow correctly. +var s = "\u0390".repeat(MaxStringLength); +assertEq(s.length, MaxStringLength); +var ex = null; +try { + escape(s); +} catch (e) { + ex = e; +} +assertEq(ex === "out of memory" || (ex instanceof InternalError), true); diff --git a/js/src/jit-test/tests/basic/maxConvertAllArgs.js b/js/src/jit-test/tests/basic/maxConvertAllArgs.js new file mode 100644 index 0000000000..9fd9198404 --- /dev/null +++ b/js/src/jit-test/tests/basic/maxConvertAllArgs.js @@ -0,0 +1,11 @@ +//Bug 818620 + +load(libdir + "asserts.js"); + +assertThrowsInstanceOf(function () { + Math.max(NaN, { valueOf: function () { throw new Error() } }); +}, Error); + +assertThrowsInstanceOf(function () { + Math.min(NaN, { valueOf: function () { throw new Error() } }); +}, Error); diff --git a/js/src/jit-test/tests/basic/megamorphic-setelem-plain.js b/js/src/jit-test/tests/basic/megamorphic-setelem-plain.js new file mode 100644 index 0000000000..0a60a116e8 --- /dev/null +++ b/js/src/jit-test/tests/basic/megamorphic-setelem-plain.js @@ -0,0 +1,53 @@ +setJitCompilerOption("ic.force-megamorphic", 1); + +// The megamorphic SetElem. +function doSet(obj, prop, v) { + "use strict"; + obj[prop] = v; +} +function test() { + with ({}) {} // No inlining. + for (var i = 0; i < 10; i++) { + var obj = {}; + + // Test simple add/set cases. + for (var j = 0; j < 10; j++) { + doSet(obj, "x" + (j % 8), j); + } + + // Ensure __proto__ is handled correctly. + var setterCalls = 0; + var proto = {set someSetter(v) { setterCalls++; }}; + doSet(obj, "__proto__", proto); + assertEq(Object.getPrototypeOf(obj), proto); + + // Can't shadow a non-writable data property. + Object.defineProperty(proto, "readonly", + {value: 1, writable: false, configurable: true}); + var ex = null; + try { + doSet(obj, "readonly", 2); + } catch (e) { + ex = e; + } + assertEq(ex instanceof TypeError, true); + assertEq(obj.readonly, 1); + + // Setter on the proto chain must be called. + doSet(obj, "someSetter", 1); + assertEq(setterCalls, 1); + + // Can't add properties if non-extensible. + Object.preventExtensions(obj); + ex = null; + try { + doSet(obj, "foo", 1); + } catch (e) { + ex = e; + } + assertEq(ex instanceof TypeError, true); + + assertEq(JSON.stringify(obj), '{"x0":8,"x1":9,"x2":2,"x3":3,"x4":4,"x5":5,"x6":6,"x7":7}'); + } +} +test(); diff --git a/js/src/jit-test/tests/basic/merge_type_maps.js b/js/src/jit-test/tests/basic/merge_type_maps.js new file mode 100644 index 0000000000..1be4b9df57 --- /dev/null +++ b/js/src/jit-test/tests/basic/merge_type_maps.js @@ -0,0 +1,9 @@ +var merge_type_maps_x = 0, merge_type_maps_y = 0; +function merge_type_maps() { + for (merge_type_maps_x = 0; merge_type_maps_x < 50; ++merge_type_maps_x) + if ((merge_type_maps_x & 1) == 1) + ++merge_type_maps_y; + return [merge_type_maps_x,merge_type_maps_y].join(","); +} +merge_type_maps(); + diff --git a/js/src/jit-test/tests/basic/metadata-hook-regexp-result.js b/js/src/jit-test/tests/basic/metadata-hook-regexp-result.js new file mode 100644 index 0000000000..cad570db78 --- /dev/null +++ b/js/src/jit-test/tests/basic/metadata-hook-regexp-result.js @@ -0,0 +1,20 @@ +var g = newGlobal({sameCompartmentAs: this}); +g.evaluate(`enableShellAllocationMetadataBuilder()`); + +function f() { + // Ensure a match stub is created for the zone. + var re = /abc.+/; + for (var i = 0; i < 100; i++) { + assertEq(re.exec("..abcd").index, 2); + } + // Allocated match result objects in the realm with the metadata hook + // must have metadata. + g.evaluate(` + var re = /abc.+/; + for (var i = 0; i < 100; i++) { + var obj = re.exec("..abcd"); + assertEq(getAllocationMetadata(obj).stack.length > 0, true); + } + `) +} +f(); diff --git a/js/src/jit-test/tests/basic/metadata-hook.js b/js/src/jit-test/tests/basic/metadata-hook.js new file mode 100644 index 0000000000..2b251ab8c6 --- /dev/null +++ b/js/src/jit-test/tests/basic/metadata-hook.js @@ -0,0 +1,30 @@ + +enableShellAllocationMetadataBuilder(); + +function Foo() { + this.x = 0; + this.y = 1; +} + +function hello() { + function there() { + w = new Foo(); + x = [1,2,3]; + y = [2,3,5]; + z = {a:0,b:1}; + } + callee = there; + callee(); +} +hello(); + +var wc = getAllocationMetadata(w).index; +var xc = getAllocationMetadata(x).index; +var yc = getAllocationMetadata(y).index; +var zc = getAllocationMetadata(z).index; + +assertEq(xc > wc, true); +assertEq(yc > xc, true); +assertEq(zc > yc, true); +assertEq(getAllocationMetadata(x).stack[0], callee); +assertEq(getAllocationMetadata(x).stack[1], hello); diff --git a/js/src/jit-test/tests/basic/missingArgTest.js b/js/src/jit-test/tests/basic/missingArgTest.js new file mode 100644 index 0000000000..28fe79036a --- /dev/null +++ b/js/src/jit-test/tests/basic/missingArgTest.js @@ -0,0 +1,12 @@ +function arity1(x) +{ + return (x == undefined) ? 1 : 0; +} +function missingArgTest() { + var q; + for (var i = 0; i < 10; i++) { + q = arity1(); + } + return q; +} +assertEq(missingArgTest(), 1); diff --git a/js/src/jit-test/tests/basic/missingArgTest2.js b/js/src/jit-test/tests/basic/missingArgTest2.js new file mode 100644 index 0000000000..3d48a369df --- /dev/null +++ b/js/src/jit-test/tests/basic/missingArgTest2.js @@ -0,0 +1,26 @@ +JSON = function () { + return { + stringify: function stringify(value, whitelist) { + switch (typeof(value)) { + case "object": + return value.constructor.name; + } + } + }; +}(); + +function missingArgTest2() { + var testPairs = [ + ["{}", {}], + ["[]", []], + ['{"foo":"bar"}', {"foo":"bar"}], + ] + + var a = []; + for (var i=0; i < testPairs.length; i++) { + var s = JSON.stringify(testPairs[i][1]) + a[i] = s; + } + return a.join(","); +} +assertEq(missingArgTest2(), "Object,Array,Object"); diff --git a/js/src/jit-test/tests/basic/mod-double-power-of-two.js b/js/src/jit-test/tests/basic/mod-double-power-of-two.js new file mode 100644 index 0000000000..30dc7f78f4 --- /dev/null +++ b/js/src/jit-test/tests/basic/mod-double-power-of-two.js @@ -0,0 +1,152 @@ +const isLittleEndian = new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + +function fromRawBits(s) { + let bits = s.split(" ").map(n => parseInt(n, 16)); + assertEq(bits.length, 8); + if (isLittleEndian) { + bits.reverse(); + } + return new Float64Array(new Uint8Array(bits).buffer)[0]; +} + +function toRawBits(d) { + let bits = [...new Uint8Array(new Float64Array([d]).buffer)]; + if (isLittleEndian) { + bits.reverse(); + } + return bits.map(n => n.toString(16).padStart(2, "0")).join(" "); +} + +assertEq(fromRawBits("7f ef ff ff ff ff ff ff"), Number.MAX_VALUE); +assertEq(toRawBits(Number.MAX_VALUE), "7f ef ff ff ff ff ff ff"); + +assertEq(fromRawBits("00 00 00 00 00 00 00 01"), Number.MIN_VALUE); +assertEq(toRawBits(Number.MIN_VALUE), "00 00 00 00 00 00 00 01"); + +let values = [ + 0, 0.000001, 0.1, 0.125, 1/6, 0.25, 0.3, 1/3, 0.5, 2/3, 0.8, 0.9, + 1, 2, 3, 4, 5, 10, 14, 15, 16, + 100.1, 100.2, + + Number.MAX_SAFE_INTEGER + 4, + Number.MAX_SAFE_INTEGER + 3, + Number.MAX_SAFE_INTEGER + 2, + Number.MAX_SAFE_INTEGER + 1, + Number.MAX_SAFE_INTEGER, + Number.MAX_SAFE_INTEGER - 1, + Number.MAX_SAFE_INTEGER - 2, + Number.MAX_SAFE_INTEGER - 3, + Number.MAX_SAFE_INTEGER - 4, + + // Largest normal (Number.MAX_VALUE) + fromRawBits("7f ef ff ff ff ff ff ff"), + fromRawBits("7f ef ff ff ff ff ff fe"), + fromRawBits("7f ef ff ff ff ff ff fd"), + fromRawBits("7f ef ff ff ff ff ff fc"), + fromRawBits("7f ef ff ff ff ff ff fb"), + fromRawBits("7f ef ff ff ff ff ff fa"), + fromRawBits("7f ef ff ff ff ff ff f9"), + fromRawBits("7f ef ff ff ff ff ff f8"), + fromRawBits("7f ef ff ff ff ff ff f7"), + fromRawBits("7f ef ff ff ff ff ff f6"), + fromRawBits("7f ef ff ff ff ff ff f5"), + fromRawBits("7f ef ff ff ff ff ff f4"), + fromRawBits("7f ef ff ff ff ff ff f3"), + fromRawBits("7f ef ff ff ff ff ff f2"), + fromRawBits("7f ef ff ff ff ff ff f1"), + fromRawBits("7f ef ff ff ff ff ff f0"), + + // Smallest subnormal (Number.MIN_VALUE) + fromRawBits("00 00 00 00 00 00 00 01"), + fromRawBits("00 00 00 00 00 00 00 02"), + fromRawBits("00 00 00 00 00 00 00 03"), + fromRawBits("00 00 00 00 00 00 00 04"), + fromRawBits("00 00 00 00 00 00 00 05"), + fromRawBits("00 00 00 00 00 00 00 06"), + fromRawBits("00 00 00 00 00 00 00 07"), + fromRawBits("00 00 00 00 00 00 00 08"), + fromRawBits("00 00 00 00 00 00 00 09"), + fromRawBits("00 00 00 00 00 00 00 0a"), + fromRawBits("00 00 00 00 00 00 00 0b"), + fromRawBits("00 00 00 00 00 00 00 0c"), + fromRawBits("00 00 00 00 00 00 00 0d"), + fromRawBits("00 00 00 00 00 00 00 0e"), + fromRawBits("00 00 00 00 00 00 00 0f"), + + // Largest subnormal + fromRawBits("00 0f ff ff ff ff ff ff"), + fromRawBits("00 0f ff ff ff ff ff fe"), + fromRawBits("00 0f ff ff ff ff ff fd"), + fromRawBits("00 0f ff ff ff ff ff fc"), + fromRawBits("00 0f ff ff ff ff ff fb"), + fromRawBits("00 0f ff ff ff ff ff fa"), + fromRawBits("00 0f ff ff ff ff ff f9"), + fromRawBits("00 0f ff ff ff ff ff f8"), + fromRawBits("00 0f ff ff ff ff ff f7"), + fromRawBits("00 0f ff ff ff ff ff f6"), + fromRawBits("00 0f ff ff ff ff ff f5"), + fromRawBits("00 0f ff ff ff ff ff f4"), + fromRawBits("00 0f ff ff ff ff ff f3"), + fromRawBits("00 0f ff ff ff ff ff f2"), + fromRawBits("00 0f ff ff ff ff ff f1"), + fromRawBits("00 0f ff ff ff ff ff f0"), + + // Least positive normal + fromRawBits("00 10 00 00 00 00 00 00"), + fromRawBits("00 10 00 00 00 00 00 01"), + fromRawBits("00 10 00 00 00 00 00 02"), + fromRawBits("00 10 00 00 00 00 00 03"), + fromRawBits("00 10 00 00 00 00 00 04"), + fromRawBits("00 10 00 00 00 00 00 05"), + fromRawBits("00 10 00 00 00 00 00 06"), + fromRawBits("00 10 00 00 00 00 00 07"), + fromRawBits("00 10 00 00 00 00 00 08"), + fromRawBits("00 10 00 00 00 00 00 09"), + fromRawBits("00 10 00 00 00 00 00 0a"), + fromRawBits("00 10 00 00 00 00 00 0b"), + fromRawBits("00 10 00 00 00 00 00 0c"), + fromRawBits("00 10 00 00 00 00 00 0d"), + fromRawBits("00 10 00 00 00 00 00 0e"), + fromRawBits("00 10 00 00 00 00 00 0f"), + + Infinity, + NaN, + + Math.E, Math.LN10, Math.LN2, Math.LOG10E, Math.LOG2E, + Math.PI, Math.SQRT1_2, Math.SQRT2, +]; + +// Also test with sign bit set. +values = values.concat(values.map(x => -x)); + +function mod(n, d) { + with ({}); // disable Ion + return n % d; +} + +function makeTest(divisor) { + function test() { + let expected = values.map(x => mod(x, divisor)); + + for (let i = 0; i < 2000; ++i) { + let j = i % values.length; + assertEq(values[j] % divisor, expected[j]); + } + } + + // Create a new function for each divisor to ensure we have proper compile-time constants. + return Function(`return ${test.toString().replaceAll("divisor", divisor)}`)(); +} + +// The optimisation is used for power of two values up to 2^31. +for (let i = 0; i <= 31; ++i) { + let divisor = 2 ** i; + let f = makeTest(divisor); + f(); +} + +// Also cover some cases which don't trigger the optimisation +for (let divisor of [-3, -2, -1, -0.5, 0, 0.5, 3, 5, 10]) { + let f = makeTest(divisor); + f(); +} diff --git a/js/src/jit-test/tests/basic/mod.js b/js/src/jit-test/tests/basic/mod.js new file mode 100644 index 0000000000..cd8f6f6b96 --- /dev/null +++ b/js/src/jit-test/tests/basic/mod.js @@ -0,0 +1,14 @@ +function mod() +{ + var mods = [-1,-1,-1,-1]; + var a = 9.5, b = -5, c = 42, d = (1/0); + for (var i = 0; i < 20; i++) { + mods[0] = a % b; + mods[1] = b % 1; + mods[2] = c % d; + mods[3] = c % a; + mods[4] = b % 0; + } + return mods.toString(); +} +assertEq(mod(), "4.5,0,42,4,NaN"); diff --git a/js/src/jit-test/tests/basic/more-compartments-flag.js b/js/src/jit-test/tests/basic/more-compartments-flag.js new file mode 100644 index 0000000000..fa0e13f165 --- /dev/null +++ b/js/src/jit-test/tests/basic/more-compartments-flag.js @@ -0,0 +1,8 @@ +// |jit-test| --more-compartments + +// With --more-compartments we should default to creating a new compartment for +// new globals. + +var g = newGlobal(); +assertEq(isSameCompartment(this, g), false); +assertEq(isProxy(g), true); diff --git a/js/src/jit-test/tests/basic/multiple-declared-args-syntax.js b/js/src/jit-test/tests/basic/multiple-declared-args-syntax.js new file mode 100644 index 0000000000..d41a98fcca --- /dev/null +++ b/js/src/jit-test/tests/basic/multiple-declared-args-syntax.js @@ -0,0 +1 @@ +assertEq((function (a, b, a) { return a; })(2, 4, 6), 6); diff --git a/js/src/jit-test/tests/basic/mutable-proto-teleporting.js b/js/src/jit-test/tests/basic/mutable-proto-teleporting.js new file mode 100644 index 0000000000..a52faf1c58 --- /dev/null +++ b/js/src/jit-test/tests/basic/mutable-proto-teleporting.js @@ -0,0 +1,18 @@ +// The teleporting optimization should work correctly +// when we modify an object's proto. + +var A = {x: 1}; +var B = Object.create(A); + +var C = {}; +C.__proto__ = B; + +function f() { + for (var i=0; i<25; i++) { + assertEq(C.x, (i <= 20) ? 1 : 3); + if (i === 20) { + B.x = 3; + } + } +} +f(); diff --git a/js/src/jit-test/tests/basic/name-inactive-del.js b/js/src/jit-test/tests/basic/name-inactive-del.js new file mode 100644 index 0000000000..ba2f69f09e --- /dev/null +++ b/js/src/jit-test/tests/basic/name-inactive-del.js @@ -0,0 +1,28 @@ +function mp(g) { + var ans = ''; + for (var i = 0; i < 5; ++i) { + ans += g(); + } + + return ans; +} + +function f() { + var k = 5; + + function g() { + return k; + } + + ans = ''; + + k = 6; + ans += mp(g); + + delete k; + ans += mp(g); + + return ans; +} + +assertEq(f(), '6666666666'); diff --git a/js/src/jit-test/tests/basic/name-inactive-eval-del.js b/js/src/jit-test/tests/basic/name-inactive-eval-del.js new file mode 100644 index 0000000000..593ab39ffe --- /dev/null +++ b/js/src/jit-test/tests/basic/name-inactive-eval-del.js @@ -0,0 +1,10 @@ +function mp(g) { + ans = '' + for (var i = 0; i < 5; ++i) { + ans += g(); + } + return ans; +} + +var f = eval("(function() { var k = 5; function g() { return k; } k = 6; mp(g); delete k; return mp(g); })"); +assertEq(f(), "66666"); diff --git a/js/src/jit-test/tests/basic/name-inactive-inferflags.js b/js/src/jit-test/tests/basic/name-inactive-inferflags.js new file mode 100644 index 0000000000..0bbd3fb2cf --- /dev/null +++ b/js/src/jit-test/tests/basic/name-inactive-inferflags.js @@ -0,0 +1,18 @@ +function addAccumulations(f) { + var a = f(); + var b = f(); + return a() + b(); +} + +function loopingAccumulator() { + var x = 0; + return function () { + for (var i = 0; i < 10; ++i) { + ++x; + } + return x; + } +} + +var x = addAccumulations(loopingAccumulator); +assertEq(x, 20); diff --git a/js/src/jit-test/tests/basic/name-inactive.js b/js/src/jit-test/tests/basic/name-inactive.js new file mode 100644 index 0000000000..6f3b9c4c0a --- /dev/null +++ b/js/src/jit-test/tests/basic/name-inactive.js @@ -0,0 +1,15 @@ +function f(k) { + function g(j) { + return j + k; + } + return g; +} + +g = f(10); +var ans = ''; +for (var i = 0; i < 5; ++i) { + ans += g(i) + ','; +} + +assertEq(ans, '10,11,12,13,14,'); + diff --git a/js/src/jit-test/tests/basic/name.js b/js/src/jit-test/tests/basic/name.js new file mode 100644 index 0000000000..92b76d0225 --- /dev/null +++ b/js/src/jit-test/tests/basic/name.js @@ -0,0 +1,9 @@ +globalName = 907; +function name() +{ + var a = 0; + for (var i = 0; i < 100; i++) + a = globalName; + return a; +} +assertEq(name(), 907); diff --git a/js/src/jit-test/tests/basic/negative-zero-index.js b/js/src/jit-test/tests/basic/negative-zero-index.js new file mode 100644 index 0000000000..7f585a115e --- /dev/null +++ b/js/src/jit-test/tests/basic/negative-zero-index.js @@ -0,0 +1,20 @@ +function test() { + const array = [1]; + for (let i = 0; i < 10; i++) { + assertEq(array[0], 1); + assertEq(array[0.0], 1); + assertEq(array[-0.0], 1); + // ToPropertyKey(-0.0) is "0", but "-0" is distinct! + assertEq(array["-0"], undefined); + } + + const string = "a"; + for (let i = 0; i < 10; i++) { + assertEq(string[0], "a"); + assertEq(string[0.0], "a"); + assertEq(string[-0.0], "a"); + assertEq(string["-0"], undefined); + } +} + +test(); diff --git a/js/src/jit-test/tests/basic/nestedContinue.js b/js/src/jit-test/tests/basic/nestedContinue.js new file mode 100644 index 0000000000..23cd702bf9 --- /dev/null +++ b/js/src/jit-test/tests/basic/nestedContinue.js @@ -0,0 +1,11 @@ +x = 10; +outer: +while (x < 10) { + while (x < 10) { + if (x < 10) + continue outer; + while (x < 10) { + y = 0; + } + } +} diff --git a/js/src/jit-test/tests/basic/nestedExit2.js b/js/src/jit-test/tests/basic/nestedExit2.js new file mode 100644 index 0000000000..a868954f28 --- /dev/null +++ b/js/src/jit-test/tests/basic/nestedExit2.js @@ -0,0 +1,17 @@ +function bitsinbyte(b) { + var m = 1, c = 0; + while(m<0x100) { + if(b & m) c++; + m <<= 1; + } + return 1; +} +function TimeFunc(func) { + var x,y; + for(var y=0; y<256; y++) func(y); +} +function nestedExit2() { + TimeFunc(bitsinbyte); + return "ok"; +} +assertEq(nestedExit2(), "ok"); diff --git a/js/src/jit-test/tests/basic/nestedExitLoop.js b/js/src/jit-test/tests/basic/nestedExitLoop.js new file mode 100644 index 0000000000..fffc8573bd --- /dev/null +++ b/js/src/jit-test/tests/basic/nestedExitLoop.js @@ -0,0 +1,14 @@ +function nestedExit(x) { + var q = 0; + for (var i = 0; i < 10; ++i) + { + if (x) + ++q; + } +} +function nestedExitLoop() { + for (var j = 0; j < 10; ++j) + nestedExit(j < 7); + return "ok"; +} +assertEq(nestedExitLoop(), "ok"); diff --git a/js/src/jit-test/tests/basic/new-Function-prototype.js b/js/src/jit-test/tests/basic/new-Function-prototype.js new file mode 100644 index 0000000000..65198cabb1 --- /dev/null +++ b/js/src/jit-test/tests/basic/new-Function-prototype.js @@ -0,0 +1,16 @@ +var funProto = Function.prototype; +assertEq(Object.getOwnPropertyDescriptor(funProto, "prototype"), undefined); +assertEq(parseInt.prototype, undefined); +var oldObj; +for (var i = 0, sz = 9; i < sz; oldObj = obj, i++) +{ + + try { + var obj = new funProto; + } + catch (e) {} + assertEq(Object.getOwnPropertyDescriptor(funProto, "prototype"), undefined); + assertEq(Object.getOwnPropertyDescriptor(parseInt, "prototype"), undefined); + assertEq(parseInt.prototype, undefined); +} + diff --git a/js/src/jit-test/tests/basic/new-bound-function.js b/js/src/jit-test/tests/basic/new-bound-function.js new file mode 100644 index 0000000000..49d06d8c3c --- /dev/null +++ b/js/src/jit-test/tests/basic/new-bound-function.js @@ -0,0 +1,20 @@ +var funProto = Function.prototype; +assertEq(Object.getOwnPropertyDescriptor(funProto, "prototype"), undefined); + +function Point(x, y) { this.x = x; this.y = y; } + +var YAxisPoint = Point.bind(null, 0); + +assertEq(YAxisPoint.prototype, undefined); + +var oldPoint; +for (var i = 0, sz = 9; i < sz; oldPoint = point, i++) +{ + var point = new YAxisPoint(5); + assertEq(point === oldPoint, false); + assertEq(point.x, 0); + assertEq(point.y, 5); + assertEq(Object.getOwnPropertyDescriptor(funProto, "prototype"), undefined); + assertEq(Object.getOwnPropertyDescriptor(YAxisPoint, "prototype"), undefined); +} + diff --git a/js/src/jit-test/tests/basic/new-read-before-write.js b/js/src/jit-test/tests/basic/new-read-before-write.js new file mode 100644 index 0000000000..a5259b2116 --- /dev/null +++ b/js/src/jit-test/tests/basic/new-read-before-write.js @@ -0,0 +1,24 @@ + +function Foo() { + var x = this.property; + this.property = 5; + glob = x; +} +Foo.prototype.property = 10; +for (var i = 0; i < 10; i++) { + new Foo(); + assertEq(glob, 10); +} + +function Bar() { + this.property; + this.other = 5; +} +Bar.prototype.other = 10; +Object.defineProperty(Bar.prototype, "property", { + get: function() { glob = this.other; } +}); +for (var i = 0; i < 10; i++) { + new Bar(); + assertEq(glob, 10); +} diff --git a/js/src/jit-test/tests/basic/newArrayTest.js b/js/src/jit-test/tests/basic/newArrayTest.js new file mode 100644 index 0000000000..aca33bcfd1 --- /dev/null +++ b/js/src/jit-test/tests/basic/newArrayTest.js @@ -0,0 +1,8 @@ +function newArrayTest() +{ + var a = []; + for (var i = 0; i < 10; i++) + a[i] = new Array(); + return a.map(x => x.length).toString(); +} +assertEq(newArrayTest(), "0,0,0,0,0,0,0,0,0,0"); diff --git a/js/src/jit-test/tests/basic/newTargetOSR.js b/js/src/jit-test/tests/basic/newTargetOSR.js new file mode 100644 index 0000000000..b90e96cf1b --- /dev/null +++ b/js/src/jit-test/tests/basic/newTargetOSR.js @@ -0,0 +1,6 @@ +function testOSRNewTarget(expected) { + for (let i = 0; i < 1100; i++) + assertEq(new.target, expected); +} + +new testOSRNewTarget(testOSRNewTarget); diff --git a/js/src/jit-test/tests/basic/newTargetRectifier.js b/js/src/jit-test/tests/basic/newTargetRectifier.js new file mode 100644 index 0000000000..78716869fb --- /dev/null +++ b/js/src/jit-test/tests/basic/newTargetRectifier.js @@ -0,0 +1,12 @@ +function testBailoutNewTarget() { + function Inner(ex, forceRectifier) { + bailout(); + assertEq(new.target, ex); + } + + for (let i = 0; i < 1100; i++) + new Inner(Inner); +} + +for (let i = 0; i < 15; i++) + testBailoutNewTarget(); diff --git a/js/src/jit-test/tests/basic/newTest.js b/js/src/jit-test/tests/basic/newTest.js new file mode 100644 index 0000000000..5defbe9f26 --- /dev/null +++ b/js/src/jit-test/tests/basic/newTest.js @@ -0,0 +1,14 @@ +function MyConstructor(i) +{ + this.i = i; +} +MyConstructor.prototype.toString = function() {return this.i + ""}; + +function newTest() +{ + var a = []; + for (var i = 0; i < 10; i++) + a[i] = new MyConstructor(i); + return a.join(""); +} +assertEq(newTest(), "0123456789"); diff --git a/js/src/jit-test/tests/basic/non-constructor-msg.js b/js/src/jit-test/tests/basic/non-constructor-msg.js new file mode 100644 index 0000000000..dc86f05d19 --- /dev/null +++ b/js/src/jit-test/tests/basic/non-constructor-msg.js @@ -0,0 +1,7 @@ +load(libdir + 'asserts.js'); + +// Censor potentially existing toSource to trigger fallback in ValueToSource. +Function.prototype.toSource = null; + +assertTypeErrorMessage(() => { new (function*() {}) }, + "(function*() {}) is not a constructor"); diff --git a/js/src/jit-test/tests/basic/non-extensible-array.js b/js/src/jit-test/tests/basic/non-extensible-array.js new file mode 100644 index 0000000000..133ec2bf12 --- /dev/null +++ b/js/src/jit-test/tests/basic/non-extensible-array.js @@ -0,0 +1,7 @@ + +function foo(x) { + Object.seal(x); + x[3] = 4; + assertEq("" + x, "1,2,3"); +} +foo([1,2,3]); diff --git a/js/src/jit-test/tests/basic/non-extensible-elements1.js b/js/src/jit-test/tests/basic/non-extensible-elements1.js new file mode 100644 index 0000000000..01831931a8 --- /dev/null +++ b/js/src/jit-test/tests/basic/non-extensible-elements1.js @@ -0,0 +1,50 @@ +function testTestIntegrityLevel(a, hasElems) { + assertEq(Object.isExtensible(a), true); + assertEq(Object.isSealed(a), false); + assertEq(Object.isFrozen(a), false); + + Object.preventExtensions(a); + assertEq(Object.isExtensible(a), false); + assertEq(Object.isSealed(a), !hasElems); + assertEq(Object.isFrozen(a), false); + + Object.seal(a); + assertEq(Object.isExtensible(a), false); + assertEq(Object.isSealed(a), true); + assertEq(Object.isFrozen(a), false); + + Object.freeze(a); + assertEq(Object.isExtensible(a), false); + assertEq(Object.isSealed(a), true); + assertEq(Object.isFrozen(a), true); +} +testTestIntegrityLevel([1, 2, 3], true); +testTestIntegrityLevel([1, , , 2], true); +testTestIntegrityLevel([1, , , ], true); +testTestIntegrityLevel([, , , ], false); +testTestIntegrityLevel([], false); +testTestIntegrityLevel({0: 0}, true); +var a = [,,,,,,, 1]; +a.pop(); +testTestIntegrityLevel(a, false); + +function testDescriptor() { + var a = [1]; + Object.preventExtensions(a); + assertEq(JSON.stringify(Object.getOwnPropertyDescriptors(a)), + `{"0":{"value":1,"writable":true,"enumerable":true,"configurable":true},` + + `"length":{"value":1,"writable":true,"enumerable":false,"configurable":false}}`); + + a = [1]; + Object.seal(a); + assertEq(JSON.stringify(Object.getOwnPropertyDescriptors(a)), + `{"0":{"value":1,"writable":true,"enumerable":true,"configurable":false},` + + `"length":{"value":1,"writable":true,"enumerable":false,"configurable":false}}`); + + a = [1]; + Object.freeze(a); + assertEq(JSON.stringify(Object.getOwnPropertyDescriptors(a)), + `{"0":{"value":1,"writable":false,"enumerable":true,"configurable":false},` + + `"length":{"value":1,"writable":false,"enumerable":false,"configurable":false}}`); +} +testDescriptor(); diff --git a/js/src/jit-test/tests/basic/non-extensible-elements2.js b/js/src/jit-test/tests/basic/non-extensible-elements2.js new file mode 100644 index 0000000000..dd31b81ce5 --- /dev/null +++ b/js/src/jit-test/tests/basic/non-extensible-elements2.js @@ -0,0 +1,279 @@ +load(libdir + "asserts.js"); + +function testPopSimple() { + var a = [4, 3, 2, 1, 0]; + Object.preventExtensions(a); + for (var i = 0; i < 5; i++) + assertEq(a.pop(), i); + assertEq(a.length, 0); + + a = [1, 2, 3]; + Object.seal(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.pop(), TypeError); + assertEq(a.toString(), "1,2,3"); + + a = [1, 2, 3]; + Object.freeze(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.pop(), TypeError); + assertEq(a.toString(), "1,2,3"); +} +testPopSimple(); + +function testPopHoles() { + var a = [1, , 3]; + Object.preventExtensions(a); + assertEq(a.pop(), 3); + assertEq(a.pop(), undefined); + assertEq(a.pop(), 1); + assertEq(a.length, 0); + + a = [1, ,]; + Object.seal(a); + assertEq(a.pop(), undefined); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.pop(), TypeError); + assertEq(a.toString(), "1"); + + a = [1, ,]; + Object.freeze(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.pop(), TypeError); + assertEq(a.toString(), "1,"); +} +testPopHoles(); + +function testPushSimple() { + var a = [1, 2, 3]; + Object.preventExtensions(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.push(4), TypeError); + assertEq(a.length, 3); + assertEq(a.toString(), "1,2,3"); + + a = [1, 2, 3]; + Object.seal(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.push(4), TypeError); + assertEq(a.toString(), "1,2,3"); + + a = [1, 2, 3]; + Object.freeze(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.push(4), TypeError); + assertEq(a.toString(), "1,2,3"); +} +testPushSimple(); + +function testPushHoles() { + var a = [,,,]; + Object.preventExtensions(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.push(4), TypeError); + assertEq(a.length, 3); + assertEq(a.toString(), ",,"); + + a = [,,,]; + Object.seal(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.push(4), TypeError); + assertEq(a.toString(), ",,"); + + a = [,,,]; + Object.freeze(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.push(4), TypeError); + assertEq(a.toString(), ",,"); +} +testPushHoles(); + +function testReverseSimple() { + var a = [1, 2, 3]; + Object.preventExtensions(a); + a.reverse(); + assertEq(a.toString(), "3,2,1"); + + a = [1, 2, 3]; + Object.seal(a); + a.reverse(); + assertEq(a.toString(), "3,2,1"); + + a = [1, 2, 3]; + Object.freeze(a); + assertThrowsInstanceOf(() => a.reverse(), TypeError); + assertEq(a.toString(), "1,2,3"); +} +testReverseSimple(); + +function testReverseHoles() { + var a = [1, 2, , 4]; + Object.preventExtensions(a); + assertThrowsInstanceOf(() => a.reverse(), TypeError); + assertEq(a.toString(), "4,,,1"); + + a = [1, 2, , 4]; + Object.seal(a); + assertThrowsInstanceOf(() => a.reverse(), TypeError); + assertEq(a.toString(), "4,2,,1"); + + a = [1, 2, , 4]; + Object.freeze(a); + assertThrowsInstanceOf(() => a.reverse(), TypeError); + assertEq(a.toString(), "1,2,,4"); +} +testReverseHoles(); + +function testShiftSimple() { + var a = [1, 2, 3]; + Object.preventExtensions(a); + assertEq(a.shift(), 1); + assertEq(a.toString(), "2,3"); + for (var i = 0; i < 10; i++) + a.shift(); + assertEq(a.length, 0); + + a = [1, 2, 3]; + Object.seal(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.shift(), TypeError); + assertEq(a.toString(), "3,3,3"); + + a = [1, 2, 3]; + Object.freeze(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.shift(), TypeError); + assertEq(a.toString(), "1,2,3"); +} +testShiftSimple(); +testShiftSimple(); + +function testShiftHoles() { + var a = [1, 2, , 4]; + Object.preventExtensions(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.shift(), TypeError); + assertEq(a.toString(), ",,,4"); + + a = [1, 2, , 4]; + Object.seal(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.shift(), TypeError); + assertEq(a.toString(), "2,2,,4"); + + a = [1, 2, , 4]; + Object.freeze(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.shift(), TypeError); + assertEq(a.toString(), "1,2,,4"); +} +testShiftHoles(); +testShiftHoles(); + +function testUnshiftSimple() { + var a = [1, 2, 3]; + Object.preventExtensions(a); + assertThrowsInstanceOf(() => a.unshift(0), TypeError); + assertEq(a.toString(), "1,2,3"); + + a = [1, 2, 3]; + Object.seal(a); + assertThrowsInstanceOf(() => a.unshift(0), TypeError); + assertEq(a.toString(), "1,2,3"); + + a = [1, 2, 3]; + Object.freeze(a); + assertThrowsInstanceOf(() => a.unshift(0), TypeError); + assertEq(a.toString(), "1,2,3"); +} +testUnshiftSimple(); + +function testUnshiftHoles() { + var a = [,,,]; + Object.preventExtensions(a); + assertThrowsInstanceOf(() => a.unshift(0), TypeError); + assertEq(a.toString(), ",,"); + + a = [,,,]; + Object.seal(a); + assertThrowsInstanceOf(() => a.unshift(0), TypeError); + assertEq(a.toString(), ",,"); + + a = [,,,]; + Object.freeze(a); + assertThrowsInstanceOf(() => a.unshift(0), TypeError); + assertEq(a.toString(), ",,"); +} +testUnshiftHoles(); + +function testSpliceDelete() { + var a = [1, 2, 3]; + Object.preventExtensions(a); + a.splice(1, 2); + assertEq(a.toString(), "1"); + + a = [1, 2, 3]; + Object.seal(a); + assertThrowsInstanceOf(() => a.splice(1, 2), TypeError); + assertEq(a.toString(), "1,2,3"); + + a = [1, 2, 3]; + Object.freeze(a); + assertThrowsInstanceOf(() => a.splice(1, 2), TypeError); + assertEq(a.toString(), "1,2,3"); +} +testSpliceDelete(); + +function testSpliceAdd() { + var a = [1, 2, 3]; + Object.preventExtensions(a); + assertThrowsInstanceOf(() => a.splice(2, 1, 4, 5), TypeError); + assertEq(a.toString(), "1,2,4"); + + a = [1, 2, 3]; + Object.seal(a); + assertThrowsInstanceOf(() => a.splice(2, 1, 4, 5), TypeError); + assertEq(a.toString(), "1,2,4"); + + a = [1, 2, 3]; + Object.freeze(a); + assertThrowsInstanceOf(() => a.splice(2, 1, 4, 5), TypeError); + assertEq(a.toString(), "1,2,3"); +} +testSpliceAdd(); + +function testSortSimple() { + var a = [3, 1, 2]; + Object.preventExtensions(a); + a.sort(); + assertEq(a.toString(), "1,2,3"); + + a = [3, 1, 2]; + Object.seal(a); + a.sort(); + assertEq(a.toString(), "1,2,3"); + + a = [3, 1, 2]; + Object.freeze(a); + assertThrowsInstanceOf(() => a.sort(), TypeError); + assertEq(a.toString(), "3,1,2"); +} +testSortSimple(); + +function testSortHoles() { + var a = [, , 3, 1, 2]; + Object.preventExtensions(a); + assertThrowsInstanceOf(() => a.sort(), TypeError); + assertEq(a.toString(), ",,3,1,2"); + + a = [, , 3, 1, 2]; + Object.seal(a); + assertThrowsInstanceOf(() => a.sort(), TypeError); + assertEq(a.toString(), ",,3,1,2"); + + a = [, , 3, 1, 2]; + Object.freeze(a); + assertThrowsInstanceOf(() => a.sort(), TypeError); + assertEq(a.toString(), ",,3,1,2"); +} +testSortHoles(); diff --git a/js/src/jit-test/tests/basic/non-extensible-elements3.js b/js/src/jit-test/tests/basic/non-extensible-elements3.js new file mode 100644 index 0000000000..eed7e0c1bd --- /dev/null +++ b/js/src/jit-test/tests/basic/non-extensible-elements3.js @@ -0,0 +1,65 @@ +function testAdd() { + var a = []; + Object.preventExtensions(a); + for (var i = 0; i < 20; i++) + a[i] = i; + assertEq(a.length, 0); + + a = []; + Object.seal(a); + for (var i = 0; i < 20; i++) + a[i] = i; + assertEq(a.length, 0); + + a = []; + Object.freeze(a); + for (var i = 0; i < 20; i++) + a[i] = i; + assertEq(a.length, 0); +} +testAdd(); +testAdd(); + +function testSet() { + var a = [1, 2, 3]; + Object.preventExtensions(a); + for (var i = 0; i < 20; i++) + a[2] = i; + assertEq(a.toString(), "1,2,19"); + + a = [1, 2, 3]; + Object.seal(a); + for (var i = 0; i < 20; i++) + a[0] = i; + assertEq(a.toString(), "19,2,3"); + + a = [1, 2, 3]; + Object.freeze(a); + for (var i = 0; i < 20; i++) + a[1] = i; + assertEq(a.toString(), "1,2,3"); +} +testSet(); +testSet(); + +function testSetHole() { + var a = [1, , 3]; + Object.preventExtensions(a); + for (var i = 0; i < 30; i++) + a[1] = i; + assertEq(a.toString(), "1,,3"); + + a = [1, , 3]; + Object.seal(a); + for (var i = 0; i < 30; i++) + a[1] = i; + assertEq(a.toString(), "1,,3"); + + a = [1, , 3]; + Object.freeze(a); + for (var i = 0; i < 30; i++) + a[1] = i; + assertEq(a.toString(), "1,,3"); +} +testSetHole(); +testSetHole(); diff --git a/js/src/jit-test/tests/basic/non-extensible-elements4.js b/js/src/jit-test/tests/basic/non-extensible-elements4.js new file mode 100644 index 0000000000..6b14b97c6f --- /dev/null +++ b/js/src/jit-test/tests/basic/non-extensible-elements4.js @@ -0,0 +1,27 @@ +// When an already-non-extensible object is frozen, its Shape doesn't change. +// Make sure SetElement ICs handle this correctly. + +function doStore(a) { + for (var i = 0; i < 100; i++) { + a[1] = i; + } +} +function test() { + with(this) {} // Don't Ion-compile. + + var a = {0: 0, 1: 1}; + Object.preventExtensions(a); + doStore(a); + assertEq(a[1], 99); + + a[1] = 0; + Object.freeze(a); + doStore(a); + assertEq(a[1], 0); +} + +setJitCompilerOption("ion.forceinlineCaches", 1); +test(); + +setJitCompilerOption("ion.forceinlineCaches", 0); +test(); diff --git a/js/src/jit-test/tests/basic/non-extensible-elements5.js b/js/src/jit-test/tests/basic/non-extensible-elements5.js new file mode 100644 index 0000000000..00cfee2a39 --- /dev/null +++ b/js/src/jit-test/tests/basic/non-extensible-elements5.js @@ -0,0 +1,15 @@ +// Make sure a non-extensible proto object that's later frozen is handled +// correctly by AddElement ICs. +function f() { + var proto = {60: "ok"}; + Object.preventExtensions(proto); + var o = Object.create(proto); + for (var i = 0; i < 65; i++) { + o[i] = i; + if (i === 50) + Object.freeze(proto); + } + assertEq(o[60], "ok"); + assertEq(o[61], 61); +} +f(); diff --git a/js/src/jit-test/tests/basic/non-extensible-elements6.js b/js/src/jit-test/tests/basic/non-extensible-elements6.js new file mode 100644 index 0000000000..9e865be910 --- /dev/null +++ b/js/src/jit-test/tests/basic/non-extensible-elements6.js @@ -0,0 +1,144 @@ +load(libdir + "asserts.js"); + +function testNonExtensible() { + var a = [1, 2, 3, , 5]; + Object.preventExtensions(a); + + // Can change the value. + Object.defineProperty(a, 1, {value:7, enumerable: true, configurable: true, writable: true}); + assertEq(JSON.stringify(Object.getOwnPropertyDescriptor(a, 1)), + `{"value":7,"writable":true,"enumerable":true,"configurable":true}`); + + // Can make non-writable, non-configurable, non-enumerable. + Object.defineProperty(a, 1, {value:9, enumerable: true, configurable: true, writable: false}); + assertEq(JSON.stringify(Object.getOwnPropertyDescriptor(a, 1)), + `{"value":9,"writable":false,"enumerable":true,"configurable":true}`); + Object.defineProperty(a, 0, {value:4, enumerable: true, configurable: false, writable: true}); + assertEq(JSON.stringify(Object.getOwnPropertyDescriptor(a, 0)), + `{"value":4,"writable":true,"enumerable":true,"configurable":false}`); + Object.defineProperty(a, 2, {value:3, enumerable: false, configurable: true, writable: true}); + assertEq(JSON.stringify(Object.getOwnPropertyDescriptor(a, 2)), + `{"value":3,"writable":true,"enumerable":false,"configurable":true}`); + + // Turn into an accessor. + Object.defineProperty(a, 4, {get:() => -2, enumerable: true, configurable: true}); + + // Can't add new properties. + assertThrowsInstanceOf(() => Object.defineProperty(a, 3, + {value:4, enumerable: true, + configurable: true, + writable: true}), + TypeError); + assertThrowsInstanceOf(() => Object.defineProperty(a, 10, + {value:4, + enumerable: true, + configurable: true, + writable: true}), + TypeError); + + assertEq(a.toString(), "4,9,3,,-2"); +} +for (var i = 0; i < 15; i++) + testNonExtensible(); + +function testSealed() { + var a = [1, 2, 3, , 5]; + Object.seal(a); + + // Can change the value. + Object.defineProperty(a, 1, {value:7, enumerable: true, configurable: false, writable: true}); + assertEq(JSON.stringify(Object.getOwnPropertyDescriptor(a, 1)), + `{"value":7,"writable":true,"enumerable":true,"configurable":false}`); + + // Can make non-writable. + Object.defineProperty(a, 0, {value:4, enumerable: true, configurable: false, writable: false}); + + // Can't make configurable, non-enumerable. + assertThrowsInstanceOf(() => Object.defineProperty(a, 2, + {value:7, + enumerable: true, + configurable: true, + writable: true}), + TypeError); + assertThrowsInstanceOf(() => Object.defineProperty(a, 2, + {value:7, + enumerable: false, + configurable: false, + writable: true}), + TypeError); + + // Can't turn into an accessor. + assertThrowsInstanceOf(() => Object.defineProperty(a, 4, {get:() => -2, + enumerable: true, + configurable: true}), + TypeError); + + // Can't add new properties. + assertThrowsInstanceOf(() => Object.defineProperty(a, 3, + {value:4, enumerable: true, + configurable: true, + writable: true}), + TypeError); + assertThrowsInstanceOf(() => Object.defineProperty(a, 10, + {value:4, + enumerable: true, + configurable: true, + writable: true}), + TypeError); + + assertEq(a.toString(), "4,7,3,,5"); +} +for (var i = 0; i < 15; i++) + testSealed(); + +function testFrozen() { + var a = [1, 2, 3, , 5]; + Object.freeze(a); + + // Can redefine with same value/attributes. + Object.defineProperty(a, 0, {value:1, enumerable: true, configurable: false, writable: false}); + + // Can't change the value. + assertThrowsInstanceOf(() => Object.defineProperty(a, 1, + {value:7, + enumerable: true, + configurable: false, + writable: false}), + TypeError); + + // Can't make configurable, non-enumerable. + assertThrowsInstanceOf(() => Object.defineProperty(a, 2, + {value:3, + enumerable: true, + configurable: true, + writable: false}), + TypeError); + assertThrowsInstanceOf(() => Object.defineProperty(a, 2, + {value:3, + enumerable: false, + configurable: false, + writable: false}), + TypeError); + // Can't turn into an accessor. + assertThrowsInstanceOf(() => Object.defineProperty(a, 4, {get:() => -2, + enumerable: true, + configurable: true}), + TypeError); + + // Can't add new properties. + assertThrowsInstanceOf(() => Object.defineProperty(a, 3, + {value:4, enumerable: true, + configurable: true, + writable: true}), + TypeError); + assertThrowsInstanceOf(() => Object.defineProperty(a, 10, + {value:4, + enumerable: true, + configurable: true, + writable: true}), + TypeError); + + assertEq(a.toString(), "1,2,3,,5"); +} +for (var i = 0; i < 15; i++) + testFrozen(); diff --git a/js/src/jit-test/tests/basic/non-extensible-elements7.js b/js/src/jit-test/tests/basic/non-extensible-elements7.js new file mode 100644 index 0000000000..6c4d2a3485 --- /dev/null +++ b/js/src/jit-test/tests/basic/non-extensible-elements7.js @@ -0,0 +1,42 @@ +// Test array.length setter on non-extensible/sealed/frozen arrays. +"use strict"; + +load(libdir + "asserts.js"); + +function testNonExtensible() { + var a = [1, 2, 3, , ,]; + Object.preventExtensions(a); + for (var i = 0; i < 10; i++) + a.length = 10; + assertEq(a.length, 10); + for (var i = 0; i < 10; i++) + a.length = 0; + assertEq(a.length, 0); + assertEq(a.toString(), ""); +} +testNonExtensible(); + +function testSealed() { + var a = [1, 2, 3, , ,]; + Object.seal(a); + for (var i = 0; i < 10; i++) + a.length = 10; + assertEq(a.length, 10); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.length = 0, TypeError); + assertEq(a.length, 3); + assertEq(a.toString(), "1,2,3"); +} +testSealed(); + +function testFrozen() { + var a = [1, 2, 3, , ,]; + Object.freeze(a); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.length = 10, TypeError); + for (var i = 0; i < 10; i++) + assertThrowsInstanceOf(() => a.length = 0, TypeError); + assertEq(a.length, 5); + assertEq(a.toString(), "1,2,3,,"); +} +testFrozen(); diff --git a/js/src/jit-test/tests/basic/non-extensible-elements8.js b/js/src/jit-test/tests/basic/non-extensible-elements8.js new file mode 100644 index 0000000000..6139cac32a --- /dev/null +++ b/js/src/jit-test/tests/basic/non-extensible-elements8.js @@ -0,0 +1,43 @@ +function testSealNonExtensibleArray() { + var obj = Object.preventExtensions([0]); + var desc = {value: 0, writable: true, enumerable: true, configurable: true}; + + var errorAt = -1; + var N = 100; + + for (var i = 0; i <= N; ++i) { + if (i === N) { + Object.seal(obj); + } + try { + Object.defineProperty(obj, 0, desc); + } catch { + errorAt = i; + } + } + assertEq(errorAt, N); +} +for (var i = 0; i < 15; i++) + testSealNonExtensibleArray(); + +function testSealNonExtensibleObject() { + var obj = Object.preventExtensions({0:1}); + var desc = {value: 0, writable: true, enumerable: true, configurable: true}; + + var errorAt = -1; + var N = 100; + + for (var i = 0; i <= N; ++i) { + if (i === N) { + Object.seal(obj); + } + try { + Object.defineProperty(obj, 0, desc); + } catch { + errorAt = i; + } + } + assertEq(errorAt, N); +} +for (var i = 0; i < 15; i++) + testSealNonExtensibleObject(); diff --git a/js/src/jit-test/tests/basic/non-extensible-elements9.js b/js/src/jit-test/tests/basic/non-extensible-elements9.js new file mode 100644 index 0000000000..847a7d006e --- /dev/null +++ b/js/src/jit-test/tests/basic/non-extensible-elements9.js @@ -0,0 +1,187 @@ +function testNonExtensibleStoreFallibleT() { + // Create an array with initialized-length = capacity = 2. + var x = [8, 0]; + + // Make it non-extensible. + Object.preventExtensions(x); + + // Now reduce initialized-length by one, so that initialized-length < capacity is true. + x.length = 1; + + // There's enough capacity in the elements storage to save the new element, + // but we still need to reject the store since the object is non-extensible. + x[1] = 4; + + assertEq(x.length, 1); + assertEq(x[0], 8); +} + +for (var i = 0; i < 15; ++i) + testNonExtensibleStoreFallibleT(); + +// Repeat testNonExtensibleStoreFallibleT for the MIRType::Value specialization. +function testNonExtensibleStoreFallibleV(i) { + // Create an array with initialized-length = capacity = 2. + var x = [8, ""]; + + // Make it non-extensible. + Object.preventExtensions(x); + + // Now reduce initialized-length by one, so that initialized-length < capacity is true. + x.length = 1; + + // There's enough capacity in the elements storage to save the new element, + // but we still need to reject the store since the object is non-extensible. + x[1] = [true, 1][i & 1]; + + assertEq(x.length, 1); + assertEq(x[0], 8); +} + +for (var i = 0; i < 15; ++i) + testNonExtensibleStoreFallibleV(i); + +function testForInIterationNonExtensibleStoreFallibleT() { + // Create an array with initialized-length = capacity = 2. + var x = [8, 0]; + + // Make it non-extensible. + Object.preventExtensions(x); + + // Modifying an array's length takes a different path during for-in + // iteration of the array. + for (var k in x) { + // Now reduce initialized-length by one, so that initialized-length < capacity is true. + x.length = 1; + } + + // There's enough capacity in the elements storage to save the new element, + // but we still need to reject the store since the object is non-extensible. + x[1] = 4; + + assertEq(x.length, 1); + assertEq(x[0], 8); +} + +for (var i = 0; i < 15; ++i) + testForInIterationNonExtensibleStoreFallibleT(); + +// Repeat testForInIterationNonExtensibleStoreFallibleT for the MIRType::Value specialization. +function testForInIterationNonExtensibleStoreFallibleV(i) { + // Create an array with initialized-length = capacity = 2. + var x = [8, ""]; + + // Make it non-extensible. + Object.preventExtensions(x); + + // Modifying an array's length takes a different path during for-in + // iteration of the array. + for (var k in x) { + // Now reduce initialized-length by one, so that initialized-length < capacity is true. + x.length = 1; + break; + } + + // There's enough capacity in the elements storage to save the new element, + // but we still need to reject the store since the object is non-extensible. + x[1] = [true, 1][i & 1]; + + assertEq(x.length, 1); + assertEq(x[0], 8); +} + +for (var i = 0; i < 15; ++i) + testForInIterationNonExtensibleStoreFallibleV(i); + +function testNonExtensibleArrayPop() { + // Create an array with initialized-length = capacity = 2. + var x = [8, 0]; + + // Make it non-extensible. + Object.preventExtensions(x); + + // Now reduce initialized-length by one, so that initialized-length < capacity is true. + x.pop(); + + // There's enough capacity in the elements storage to save the new element, + // but we still need to reject the store since the object is non-extensible. + x[1] = 4; + + assertEq(x.length, 1); + assertEq(x[0], 8); +} + +for (var i = 0; i < 15; ++i) + testNonExtensibleArrayPop(); + +function testNonExtensibleArrayPopNonWritable() { + // Create an array with initialized-length = capacity = 2. + var x = [8, 0]; + + // Make it non-extensible. + Object.preventExtensions(x); + + // And make the "length" property non-writable. + Object.defineProperty(x, "length", {writable: false}); + + // Now reduce initialized-length by one, so that initialized-length < capacity is true. + // This doesn't update |x.length|, because the "length" property is non-writable. + try { + x.pop(); + } catch {} + + // There's enough capacity in the elements storage to save the new element, + // but we still need to reject the store since the object is non-extensible. + for (var i = 0; i < 100; ++i) + x[1] = 4; + + assertEq(x.length, 2); + assertEq(x[0], 8); + assertEq(x[1], undefined); + assertEq(1 in x, false); +} + +for (var i = 0; i < 15; ++i) + testNonExtensibleArrayPopNonWritable(); + +function testNonExtensibleArrayShift() { + // Create an array with initialized-length = capacity = 2. + var x = [8, 0]; + + // Make it non-extensible. + Object.preventExtensions(x); + + // Now reduce initialized-length by one, so that initialized-length < capacity is true. + x.shift(); + + // There's enough capacity in the elements storage to save the new element, + // but we still need to reject the store since the object is non-extensible. + x[1] = 4; + + assertEq(x.length, 1); + assertEq(x[0], 0); +} + +for (var i = 0; i < 15; ++i) + testNonExtensibleArrayShift(); + +function testNonExtensibleArraySplice() { + // Create an array with initialized-length = capacity = 2. + var x = [8, 0]; + + // Make it non-extensible. + Object.preventExtensions(x); + + // Now reduce initialized-length by one, so that initialized-length < capacity is true. + x.splice(1, 1); + + // There's enough capacity in the elements storage to save the new element, + // but we still need to reject the store since the object is non-extensible. + x[1] = 4; + + assertEq(x.length, 1); + assertEq(x[0], 8); +} + +for (var i = 0; i < 15; ++i) + testNonExtensibleArraySplice(); diff --git a/js/src/jit-test/tests/basic/nonEmptyStack1.js b/js/src/jit-test/tests/basic/nonEmptyStack1.js new file mode 100644 index 0000000000..b3b2603868 --- /dev/null +++ b/js/src/jit-test/tests/basic/nonEmptyStack1.js @@ -0,0 +1,13 @@ +function nonEmptyStack1Helper(o, farble) { + var a = []; + var j = 0; + for (var i in o) + a[j++] = i; + return a.join(""); +} + +function nonEmptyStack1() { + return nonEmptyStack1Helper({a:1,b:2,c:3,d:4,e:5,f:6,g:7,h:8}, "hi"); +} + +assertEq(nonEmptyStack1(), "abcdefgh"); diff --git a/js/src/jit-test/tests/basic/nonEmptyStack2.js b/js/src/jit-test/tests/basic/nonEmptyStack2.js new file mode 100644 index 0000000000..fb83942457 --- /dev/null +++ b/js/src/jit-test/tests/basic/nonEmptyStack2.js @@ -0,0 +1,10 @@ +function nonEmptyStack2() +{ + var a = 0; + for (var c in {a:1, b:2, c:3}) { + for (var i = 0; i < 10; i++) + a += i; + } + return String(a); +} +assertEq(nonEmptyStack2(), "135"); diff --git a/js/src/jit-test/tests/basic/null-filename-Error.js b/js/src/jit-test/tests/basic/null-filename-Error.js new file mode 100644 index 0000000000..acba373462 --- /dev/null +++ b/js/src/jit-test/tests/basic/null-filename-Error.js @@ -0,0 +1,11 @@ +// Compiling a script with null filename does not break the Error constructor. + +var exc = null; +try { + evaluate("throw Error('pass');", {fileName: null}); +} catch (x) { + exc = x; +} +assertEq(exc.constructor, Error); +assertEq(exc.message, "pass"); +assertEq(exc.fileName, ""); diff --git a/js/src/jit-test/tests/basic/number-isfinite.js b/js/src/jit-test/tests/basic/number-isfinite.js new file mode 100644 index 0000000000..fc58b4c667 --- /dev/null +++ b/js/src/jit-test/tests/basic/number-isfinite.js @@ -0,0 +1,15 @@ +assertEq(Number.isFinite(Infinity), false); +assertEq(Number.isFinite(-Infinity), false); +assertEq(Number.isFinite(NaN), false); +assertEq(Number.isFinite(4), true); +assertEq(Number.isFinite(4.5), true); +assertEq(Number.isFinite("hi"), false); +assertEq(Number.isFinite("1.3"), false); +assertEq(Number.isFinite("51"), false); +assertEq(Number.isFinite(0), true); +assertEq(Number.isFinite(-0), true); +assertEq(Number.isFinite({valueOf: function () { return 3; }}), false); +assertEq(Number.isFinite({valueOf: function () { return 0/0; }}), false); +assertEq(Number.isFinite({ valueOf: function() { throw 17; } }), false); +assertEq(Number.isFinite({ toString: function() { throw 17; } }), false); +assertEq(Number.isFinite({ valueOf: function() { throw 17; }, toString: function() { throw 42; } }), false); diff --git a/js/src/jit-test/tests/basic/number-isinteger.js b/js/src/jit-test/tests/basic/number-isinteger.js new file mode 100644 index 0000000000..750a987871 --- /dev/null +++ b/js/src/jit-test/tests/basic/number-isinteger.js @@ -0,0 +1,15 @@ +assertEq(Number.isInteger(4), true); +assertEq(Number.isInteger(4.), true); +assertEq(Number.isInteger(4.2), false); +assertEq(Number.isInteger(0.), true); +assertEq(Number.isInteger(-0.), true); +assertEq(Number.isInteger(Infinity), false); +assertEq(Number.isInteger(-Infinity), false); +assertEq(Number.isInteger(NaN), false); +assertEq(Number.isInteger(true), false); +assertEq(Number.isInteger(false), false); +assertEq(Number.isInteger({valueOf: function () { return 3; }}), false); +assertEq(Number.isInteger({valueOf: function () { return 0/0; }}), false); +assertEq(Number.isInteger({ valueOf: function() { throw 17; } }), false); +assertEq(Number.isInteger({ toString: function() { throw 17; } }), false); +assertEq(Number.isInteger({ valueOf: function() { throw 17; }, toString: function() { throw 42; } }), false); diff --git a/js/src/jit-test/tests/basic/number-isnan.js b/js/src/jit-test/tests/basic/number-isnan.js new file mode 100644 index 0000000000..78e8345918 --- /dev/null +++ b/js/src/jit-test/tests/basic/number-isnan.js @@ -0,0 +1,15 @@ +assertEq(Number.isNaN(NaN), true); +assertEq(Number.isNaN(0/0), true); +assertEq(Number.isNaN(Number("NaN")), true); +assertEq(Number.isNaN(4), false); +assertEq(Number.isNaN(4.5), false); +assertEq(Number.isNaN("hi"), false); +assertEq(Number.isNaN("1.3"), false); +assertEq(Number.isNaN("51"), false); +assertEq(Number.isNaN(0), false); +assertEq(Number.isNaN(-0), false); +assertEq(Number.isNaN({valueOf: function () { return 3; }}), false); +assertEq(Number.isNaN({valueOf: function () { return 0/0; }}), false); +assertEq(Number.isNaN({ valueOf: function() { throw 17; } }), false); +assertEq(Number.isNaN({ toString: function() { throw 17; } }), false); +assertEq(Number.isNaN({ valueOf: function() { throw 17; }, toString: function() { throw 42; } }), false); diff --git a/js/src/jit-test/tests/basic/number-methods-this-error.js b/js/src/jit-test/tests/basic/number-methods-this-error.js new file mode 100644 index 0000000000..6d5a710bb1 --- /dev/null +++ b/js/src/jit-test/tests/basic/number-methods-this-error.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); + +let methods = Object.getOwnPropertyNames(Number.prototype) + .filter(n => n != "constructor"); + +for (let method of methods) { + assertTypeErrorMessage(() => Number.prototype[method].call(new Map), + `Number.prototype.${method} called on incompatible Map`); + + assertTypeErrorMessage(() => Number.prototype[method].call(false), + `Number.prototype.${method} called on incompatible boolean`); +} diff --git a/js/src/jit-test/tests/basic/object-assign-plain-cache.js b/js/src/jit-test/tests/basic/object-assign-plain-cache.js new file mode 100644 index 0000000000..8c6c163857 --- /dev/null +++ b/js/src/jit-test/tests/basic/object-assign-plain-cache.js @@ -0,0 +1,68 @@ +// The cache lookup must happen after ensuring there are no dense elements. +function testNewDenseElement() { + var from = {x: 1, y: 2, z: 3}; + + for (var i = 0; i < 10; i++) { + if (i === 6) { + from[0] = 1; + } + var to = Object.assign({}, from); + if (i >= 6) { + assertEq(JSON.stringify(to), '{"0":1,"x":1,"y":2,"z":3}'); + } else { + assertEq(JSON.stringify(to), '{"x":1,"y":2,"z":3}'); + } + } +} +testNewDenseElement(); + +// The cache lookup must happen after ensuring there are non-writable +// properties on the proto chain. +function testProtoNonWritable() { + var proto = {x: 1}; + var from = {x: 1, y: 2, z: 3}; + + for (var i = 0; i < 10; i++) { + if (i === 6) { + Object.freeze(proto); + } + + var to = Object.create(proto); + var ex = null; + try { + Object.assign(to, from); + } catch (e) { + ex = e; + } + + assertEq(ex instanceof TypeError, i > 5); + + if (i <= 5) { + assertEq(JSON.stringify(to), '{"x":1,"y":2,"z":3}'); + } else { + assertEq(JSON.stringify(to), '{}'); + } + } +} +testProtoNonWritable(); + +function testDictionary1() { + var from = {a: 1, b: 2, c: 3}; + delete from.a; + for (var i = 0; i < 10; i++) { + var to = Object.assign({}, from); + assertEq(JSON.stringify(to), '{"b":2,"c":3}'); + } +} +testDictionary1(); + +function testDictionary2() { + var from = {a: 1, b: 2, c: 3}; + delete from.a; + from.a = 4; + for (var i = 0; i < 10; i++) { + var to = Object.assign({}, from); + assertEq(JSON.stringify(to), '{"b":2,"c":3,"a":4}'); + } +} +testDictionary2(); diff --git a/js/src/jit-test/tests/basic/object-assign-plain.js b/js/src/jit-test/tests/basic/object-assign-plain.js new file mode 100644 index 0000000000..cf0db7134e --- /dev/null +++ b/js/src/jit-test/tests/basic/object-assign-plain.js @@ -0,0 +1,148 @@ +// Tests for Object.assign's fast path for plain objects. + +load(libdir + "asserts.js"); + +function testProtoSetter() { + var from = Object.create(null); + from.__proto__ = {}; + assertEq(Object.getPrototypeOf(from), null); + + var to = Object.assign({}, from); + assertEq(Object.getPrototypeOf(to), from.__proto__); + assertEq(Object.getOwnPropertyNames(to).length, 0); +} +testProtoSetter(); +testProtoSetter(); +testProtoSetter(); + +function testProtoDataProp() { + var to = Object.create(null); + to.__proto__ = 1; + var from = Object.create(null); + from.__proto__ = 2; + Object.assign(to, from); + assertEq(Object.getPrototypeOf(to), null); + assertEq(to.__proto__, 2); +} +testProtoDataProp(); +testProtoDataProp(); +testProtoDataProp(); + +function testNonExtensible() { + var to = Object.preventExtensions({x: 1}); + Object.assign(to, {x: 2}); + assertEq(to.x, 2); + assertThrowsInstanceOf(() => Object.assign(to, {x: 3, y: 4}), TypeError); + assertEq(to.x, 3); + assertEq("y" in to, false); +} +testNonExtensible(); +testNonExtensible(); +testNonExtensible(); + +function testNonExtensibleNoProps() { + var to = Object.preventExtensions({}); + Object.assign(to, {}); // No exception. +} +testNonExtensibleNoProps(); +testNonExtensibleNoProps(); +testNonExtensibleNoProps(); + +function testDenseElements() { + var to = Object.assign({}, {0: 1, 1: 2}); + assertEq(to[0], 1); + assertEq(to[1], 2); +} +testDenseElements(); +testDenseElements(); +testDenseElements(); + +function testNonWritableOnProto() { + var proto = {}; + Object.defineProperty(proto, "x", {value: 1, enumerable: true, configurable: true}); + var to = Object.create(proto); + assertThrowsInstanceOf(() => Object.assign(to, {x: 2}), TypeError); + assertEq(to.x, 1); + assertEq(Object.getOwnPropertyNames(to).length, 0); +} +testNonWritableOnProto(); +testNonWritableOnProto(); +testNonWritableOnProto(); + +function testAccessorOnProto() { + var setterVal; + var proto = {set a(v) { setterVal = v; }}; + var to = Object.assign(Object.create(proto), {a: 9}); + assertEq(setterVal, 9); + assertEq(Object.getOwnPropertyNames(to).length, 0); +} +testAccessorOnProto(); +testAccessorOnProto(); +testAccessorOnProto(); + +function testSetAndAdd() { + var to = Object.assign({x: 1, y: 2}, {x: 3, y: 4, z: 5}); + assertEq(to.x, 3); + assertEq(to.y, 4); + assertEq(to.z, 5); +} +testSetAndAdd(); +testSetAndAdd(); +testSetAndAdd(); + +function testNonConfigurableFrom() { + var from = {}; + Object.defineProperty(from, "x", {value: 1, enumerable: true, writable: true}); + var to = Object.assign({}, from); + assertEq(to.x, 1); + assertEq(Object.getOwnPropertyDescriptor(to, "x").configurable, true); +} +testNonConfigurableFrom(); +testNonConfigurableFrom(); +testNonConfigurableFrom(); + +function testNonEnumerableFrom() { + var from = {}; + Object.defineProperty(from, "x", {value: 1, configurable: true, writable: true}); + var to = Object.assign({}, from); + assertEq(Object.getOwnPropertyNames(to).length, 0); + assertEq(to.x, undefined); +} +testNonEnumerableFrom(); +testNonEnumerableFrom(); +testNonEnumerableFrom(); + +function testNonWritableFrom() { + var from = {}; + Object.defineProperty(from, "x", {value: 1, configurable: true, enumerable: true}); + var to = Object.assign({}, from); + assertEq(to.x, 1); + assertEq(Object.getOwnPropertyDescriptor(to, "x").writable, true); +} +testNonWritableFrom(); +testNonWritableFrom(); +testNonWritableFrom(); + +function testFrozenProto() { + var proto = Object.freeze({x: 1}); + var target = Object.create(proto); + Object.assign(target, {foo: 1}); + assertEq(target.foo, 1); + assertThrowsInstanceOf(() => Object.assign(target, {x: 2}), TypeError); + assertEq(target.x, 1); +} +testFrozenProto(); +testFrozenProto(); +testFrozenProto(); + +function testReuseShape() { + var from = {}; + from.x = 1; + from.y = 2; + var to = Object.assign({}, from); + assertEq(to.x, 1); + assertEq(to.y, 2); +} +testReuseShape(); +testReuseShape(); +testReuseShape(); diff --git a/js/src/jit-test/tests/basic/object-assign.js b/js/src/jit-test/tests/basic/object-assign.js new file mode 100644 index 0000000000..0b1297849a --- /dev/null +++ b/js/src/jit-test/tests/basic/object-assign.js @@ -0,0 +1,135 @@ +function test() { + var from, to; + + // Property changes value. + from = {x: 1, y: 2}; + to = {set x(v) { from.y = 5; }}; + Object.assign(to, from); + assertEq(to.y, 5); + + // Property becomes a getter. + from = {x: 1, y: 2}; + to = {set x(v) { Object.defineProperty(from, "y", {get: () => 4}); }}; + Object.assign(to, from); + assertEq(to.y, 4); + + // Property becomes non-enumerable. + from = {x: 1, y: 2}; + to = {set x(v) { Object.defineProperty(from, "y", {value: 2, + enumerable: false, + configurable: true, + writable: true}); }}; + Object.assign(to, from); + assertEq("y" in to, false); + to = {}; + Object.assign(to, from); + assertEq("y" in to, false); + + // Property is deleted. Should NOT get Object.prototype.toString. + from = {x: 1, toString: 2}; + to = {set x(v) { delete from.toString; }}; + Object.assign(to, from); + assertEq(to.hasOwnProperty("toString"), false); + + from = {toString: 2, x: 1}; + to = {set x(v) { delete from.toString; }}; + Object.assign(to, from); + assertEq(to.toString, 2); + + from = {x: 1, toString: 2, y: 3}; + to = {set x(v) { delete from.toString; }}; + Object.assign(to, from); + assertEq(to.hasOwnProperty("toString"), false); + assertEq(to.y, 3); + + // New property is added. + from = {x: 1, y: 2}; + to = {set x(v) { from.z = 3; }}; + Object.assign(to, from); + assertEq("z" in to, false); + + // From getter. + var c = 7; + from = {x: 1, get y() { return ++c; }}; + to = {}; + Object.assign(to, from); + Object.assign(to, from, from); + assertEq(to.y, 10); + + // Frozen object. + from = {x: 1, y: 2}; + to = {x: 4}; + Object.freeze(to); + var ex; + try { + Object.assign(to, from); + } catch (e) { + ex = e; + } + assertEq(ex instanceof TypeError, true); + assertEq(to.x, 4); + + // Non-writable property. + from = {x: 1, y: 2, z: 3}; + to = {}; + Object.defineProperty(to, "y", {value: 9, writable: false}); + ex = null; + try { + Object.assign(to, from); + } catch(e) { + ex = e; + } + assertEq(ex instanceof TypeError, true); + assertEq(to.x, 1); + assertEq(to.y, 9); + assertEq(to.z, undefined); + + // Array with dense elements. + from = [1, 2, 3]; + to = {}; + Object.assign(to, from); + assertEq(to[2], 3); + assertEq("length" in to, false); + + // Object with sparse elements and symbols. + from = {x: 1, 1234567: 2, 1234560: 3,[Symbol.iterator]: 5, z: 3}; + to = {}; + Object.assign(to, from); + assertEq(to[1234567], 2); + assertEq(Object.keys(to).toString(), "1234560,1234567,x,z"); + assertEq(to[Symbol.iterator], 5); + + // Symbol properties need to be assigned last. + from = {x: 1, [Symbol.iterator]: 2, y: 3}; + to = {set y(v) { throw 9; }}; + ex = null; + try { + Object.assign(to, from); + } catch (e) { + ex = e; + } + assertEq(ex, 9); + assertEq(to.x, 1); + assertEq(to.hasOwnProperty(Symbol.iterator), false); + + // Typed array. + from = new Int32Array([1, 2, 3]); + to = {}; + Object.assign(to, from); + assertEq(to[1], 2); + + // Primitive string. + from = "foo"; + to = {}; + Object.assign(to, from); + assertEq(to[0], "f"); + + // String object. + from = new String("bar"); + to = {}; + Object.assign(to, from); + assertEq(to[2], "r"); +} +test(); +test(); +test(); diff --git a/js/src/jit-test/tests/basic/object-is-inlined.js b/js/src/jit-test/tests/basic/object-is-inlined.js new file mode 100644 index 0000000000..0220175c11 --- /dev/null +++ b/js/src/jit-test/tests/basic/object-is-inlined.js @@ -0,0 +1,48 @@ +function SameValue(x, y) { + if (x === y) { + return (x !== 0) || (1 / x === 1 / y); + } + return (x !== x && y !== y); +} + +function* cartesian(a, b = a) { + for (var pa of a) { + for (var pb of b) { + yield [pa, pb]; + } + } +} + +var testValues = { + Double: `[-0.0, +0.0, 1.0, NaN]`, + Int32: `[-1, 0, 1, 2]`, + Value: `[-0.0, +0.0, "", NaN]`, +}; + +for (var [xs, ys] of cartesian(Object.values(testValues))) { + var fn = Function(` + var xs = ${xs}; + var ys = ${ys}; + assertEq(xs.length, 4); + assertEq(ys.length, 4); + + // Compare each entry in xs with each entry in ys and ensure Object.is + // computes the same result as SameValue. + var actual = 0, expected = 0; + for (var i = 0; i < 1000; ++i) { + // 0 1 2 3 + var xi = i & 3; + + // 0 1 2 3 1 2 3 0 2 3 0 1 3 0 1 2 + var yi = (i + ((i >> 2) & 3)) & 3; + + actual += Object.is(xs[xi], ys[yi]) ? 1 : 0; + expected += SameValue(xs[xi], ys[yi]) ? 1 : 0; + } + assertEq(actual, expected); + `); + for (var i = 0; i < 3; ++i) { + fn(); + } +} + diff --git a/js/src/jit-test/tests/basic/object-is-polymorphic.js b/js/src/jit-test/tests/basic/object-is-polymorphic.js new file mode 100644 index 0000000000..137c710c15 --- /dev/null +++ b/js/src/jit-test/tests/basic/object-is-polymorphic.js @@ -0,0 +1,20 @@ +function foo(arr) { + var result = 0; + for (var i = 0; i < arr.length; i++) { + for (var j = 0; j < arr.length; j++) { + if (Object.is(arr[i], arr[j])) { + result++; + } + } + } + return result; +} + +var input = [1,"one",{x:1}, + 1,"one",{x:1}]; + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(input); +} +assertEq(sum, 1000); diff --git a/js/src/jit-test/tests/basic/object-is.js b/js/src/jit-test/tests/basic/object-is.js new file mode 100644 index 0000000000..a62b5dfe80 --- /dev/null +++ b/js/src/jit-test/tests/basic/object-is.js @@ -0,0 +1,41 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +var list = [ + [1, 1, true], + [0, 1, false], + [3.5, 3.5, true], + [0, 0, true], + [0, -0, false], + [-0, 0, false], + [-0, -0, true], + + [true, true, true], + [true, false, false], + [false, false, true], + + [NaN, NaN, true], + [NaN, undefined, false], + [Infinity, -Infinity, false], + [Infinity, Infinity, true], +] + +for (var test of list) { + assertEq(Object.is(test[0], test[1]), test[2]) +} + +var obj = {} +assertEq(Object.is(obj, obj), true); +assertEq(Object.is(obj, {}), false); +assertEq(Object.is([], []), false); + +assertEq(Object.is(null, null, null), true); + +/* Not defined parameters are undefined ... */ +assertEq(Object.is(null), false); +assertEq(Object.is(undefined), true); +assertEq(Object.is(), true); + +assertEq(Object.is.length, 2); diff --git a/js/src/jit-test/tests/basic/object-lookup-shadowing.js b/js/src/jit-test/tests/basic/object-lookup-shadowing.js new file mode 100644 index 0000000000..927727e32a --- /dev/null +++ b/js/src/jit-test/tests/basic/object-lookup-shadowing.js @@ -0,0 +1,5 @@ +var x = {get prop() { return 2; }, set prop(v) {}}; +var y = {__proto__: x, prop: 1}; + +assertEq(y.__lookupGetter__("prop"), undefined); +assertEq(y.__lookupSetter__("prop"), undefined); diff --git a/js/src/jit-test/tests/basic/object-loose-equality.js b/js/src/jit-test/tests/basic/object-loose-equality.js new file mode 100644 index 0000000000..b1f72960b3 --- /dev/null +++ b/js/src/jit-test/tests/basic/object-loose-equality.js @@ -0,0 +1,58 @@ +var obj = {}; +var sym = Symbol(); + +var notEqual = [ + [obj, sym], + + [0, {valueOf() { return null; }}], + [0, {toString() { return null; }}], + [null, {valueOf() { return null; }}], + [null, {toString() { return null; }}], + [undefined, {valueOf() { return null; }}], + [undefined, {toString() { return null; }}], + ["", {valueOf() { return null; }}], + ["", {toString() { return null; }}], + ["0", {valueOf() { return null; }}], + ["0", {toString() { return null; }}], + + [0, {valueOf() { return undefined; }}], + [0, {toString() { return undefined; }}], + [null, {valueOf() { return undefined; }}], + [null, {toString() { return undefined; }}], + [undefined, {valueOf() { return undefined; }}], + [undefined, {toString() { return undefined; }}], + ["", {valueOf() { return undefined; }}], + ["", {toString() { return undefined; }}], + ["0", {valueOf() { return undefined; }}], + ["0", {toString() { return undefined; }}], +] + +var equal = [ + [sym, {valueOf() { return sym; }}], + [sym, {toString() { return sym; }}], + + ["abc", {valueOf() { return "abc"; }}], + ["abc", {toString() { return "abc"; }}], + + [1, {valueOf() { return 1; }}], + [1, {toString() { return 1; }}], + + [1, {valueOf() { return true; }}], + [1, {toString() { return true; }}], + + [true, {valueOf() { return true; }}], + [true, {toString() { return true; }}], + + [true, {valueOf() { return 1; }}], + [true, {toString() { return 1; }}], +] + +for (var [lhs, rhs] of notEqual) { + assertEq(lhs == rhs, false); + assertEq(rhs == lhs, false); +} + +for (var [lhs, rhs] of equal) { + assertEq(lhs == rhs, true); + assertEq(rhs == lhs, true); +} diff --git a/js/src/jit-test/tests/basic/object-rest.js b/js/src/jit-test/tests/basic/object-rest.js new file mode 100644 index 0000000000..b8fb8102ad --- /dev/null +++ b/js/src/jit-test/tests/basic/object-rest.js @@ -0,0 +1,90 @@ +function test() { + var from, to; + + // From values. + from = {x: 1, y: 2}; + ({...to} = from); + assertEq(to.y, 2); + + var z; + from = {x: 1, y: 2}; + ({x: z, ...to} = from); + assertEq(z, 1); + assertEq(to.y, 2); + + // From getter. + var c = 7; + from = {x: 1, get y() { return ++c; }}; + ({...to} = from); + assertEq(c, 8); + assertEq(to.y, 8); + + from = {x: 1, get y() { return ++c; }}; + ({y: z, ...to} = from); + assertEq(c, 9); + assertEq(z, 9); + assertEq(to.y, undefined); + + // Array with dense elements. + from = [1, 2, 3]; + ({...to} = from); + assertEq(to[2], 3); + assertEq("length" in to, false); + + from = [1, 2, 3]; + ({2: z, ...to} = from); + assertEq(z, 3); + assertEq(to[2], undefined); + assertEq(to[0], 1); + assertEq("length" in to, false); + + // Object with sparse elements and symbols. + from = {x: 1, 1234567: 2, 1234560: 3, [Symbol.iterator]: 5, z: 3}; + ({...to} = from); + assertEq(to[1234567], 2); + assertEq(Object.keys(to).toString(), "1234560,1234567,x,z"); + assertEq(to[Symbol.iterator], 5); + + from = {x: 1, 1234567: 2, 1234560: 3, [Symbol.iterator]: 5, z: 3}; + ({[Symbol.iterator]: z, ...to} = from); + assertEq(to[1234567], 2); + assertEq(Object.keys(to).toString(), "1234560,1234567,x,z"); + assertEq(to[Symbol.iterator], undefined); + assertEq(z, 5); + + // Typed array. + from = new Int32Array([1, 2, 3]); + ({...to} = from); + assertEq(to[1], 2); + + from = new Int32Array([1, 2, 3]); + ({1: z, ...to} = from); + assertEq(z, 2); + assertEq(to[1], undefined); + assertEq(to[2], 3); + + // Primitive string. + from = "foo"; + ({...to} = from); + assertEq(to[0], "f"); + + from = "foo"; + ({0: z, ...to} = from); + assertEq(z, "f"); + assertEq(to[0], undefined); + assertEq(to[1], "o"); + + // String object. + from = new String("bar"); + ({...to} = from); + assertEq(to[2], "r"); + + from = new String("bar"); + ({1: z, ...to} = from); + assertEq(z, "a"); + assertEq(to[1], undefined); + assertEq(to[2], "r"); +} +test(); +test(); +test(); diff --git a/js/src/jit-test/tests/basic/object-shorthand.js b/js/src/jit-test/tests/basic/object-shorthand.js new file mode 100644 index 0000000000..934f466800 --- /dev/null +++ b/js/src/jit-test/tests/basic/object-shorthand.js @@ -0,0 +1,90 @@ + +load(libdir + 'asserts.js'); + +// globals: +a = b = get = set = eval = arguments = 10; + +assertEq({arguments}.arguments, 10); + +var o = {a, b: b, get, set: set}; +assertEq(o.a, 10); +assertEq(o.b, 10); +assertEq(o.get, 10); +assertEq(o.set, 10); + +var names = ['a', 'get', 'set', 'eval']; +// global +names.forEach(ident => + assertEq(new Function('return {' + ident + '}.' + ident + ';')(), 10)); +// local +names.forEach(ident => + assertEq(new Function('var ' + ident + ' = 20; return {' + ident + '}.' + ident + ';')(), 20)); +// scope +names.forEach(ident => + assertEq(new Function('var ' + ident + ' = 30; return (function () {return {' + ident + '}.' + ident + ';})();')(), 30)); + +var reserved = [ + 'break', + 'do', + 'in', + 'typeof', + 'case', + 'else', + 'instanceof', + 'var', + 'catch', + 'export', + 'new', + 'void', + 'class', + 'extends', + 'return', + 'while', + 'const', + 'finally', + 'super', + 'with', + 'continue', + 'for', + 'switch', + 'debugger', + 'function', + 'this', + 'delete', + 'import', + 'try', + 'enum', + 'null', + 'true', + 'false' +]; + +// non-identifiers should also throw +var nonidents = [ + '"str"', + '0' +]; + +reserved.concat(nonidents).forEach(ident => + assertThrowsInstanceOf(() => new Function('return {' + ident + '}'), SyntaxError)); + +var reservedStrict = [ + 'implements', + 'interface', + 'package', + 'private', + 'protected', + 'public', + 'static', + // XXX: according to 12.1.1, these should only be errors in strict code: + // see https://bugzilla.mozilla.org/show_bug.cgi?id=1032150 + //'let', + //'yield' +]; + +reservedStrict.forEach(ident => + assertEq(new Function('var ' + ident + ' = 10; return {' + ident + '}.' + ident + ';')(), 10)); + +reservedStrict.concat(['let', 'yield']).forEach(ident => + assertThrowsInstanceOf(() => new Function('"use strict"; return {' + ident + '}'), SyntaxError)); + diff --git a/js/src/jit-test/tests/basic/object-spread.js b/js/src/jit-test/tests/basic/object-spread.js new file mode 100644 index 0000000000..c963dc1d43 --- /dev/null +++ b/js/src/jit-test/tests/basic/object-spread.js @@ -0,0 +1,49 @@ +function test() { + var from, to; + + // From values. + from = {x: 1, y: 2}; + to = {...from}; + assertEq(to.y, 2); + to = {...from, ...from}; + assertEq(to.y, 2); + + // From getter. + var c = 7; + from = {x: 1, get y() { return ++c; }}; + to = {...from}; + assertEq(to.y, 8); + to = {...from, ...from}; + assertEq(to.y, 10); + + // Array with dense elements. + from = [1, 2, 3]; + to = {...from}; + assertEq(to[2], 3); + assertEq("length" in to, false); + + // Object with sparse elements and symbols. + from = {x: 1, 1234567: 2, 1234560: 3, [Symbol.iterator]: 5, z: 3}; + to = {...from}; + assertEq(to[1234567], 2); + assertEq(Object.keys(to).toString(), "1234560,1234567,x,z"); + assertEq(to[Symbol.iterator], 5); + + // Typed array. + from = new Int32Array([1, 2, 3]); + to = {...from}; + assertEq(to[1], 2); + + // Primitive string. + from = "foo"; + to = {...from}; + assertEq(to[0], "f"); + + // String object. + from = new String("bar"); + to = {...from}; + assertEq(to[2], "r"); +} +test(); +test(); +test(); diff --git a/js/src/jit-test/tests/basic/object-tostring.js b/js/src/jit-test/tests/basic/object-tostring.js new file mode 100644 index 0000000000..5f6204d6dd --- /dev/null +++ b/js/src/jit-test/tests/basic/object-tostring.js @@ -0,0 +1,60 @@ + +function doTest(expected, v) { + assertEq(Object.prototype.toString.call(v), expected) +} + +function Dummy() {} + +// Basic primitive cases +doTest("[object Undefined]", undefined); +doTest("[object Null]", null); +doTest("[object String]", ""); +doTest("[object Number]", 12); +doTest("[object Number]", 12.34); +doTest("[object Boolean]", true); +doTest("[object Symbol]", Symbol()); +doTest("[object BigInt]", 1234n); + +// Exotic objects with builtinTag +doTest("[object Array]", []); +(function() { + doTest("[object Arguments]", arguments); +})(); +doTest("[object Function]", () => {}); +doTest("[object Error]", new Error); +doTest("[object Date]", new Date); +doTest("[object RegExp]", /i/); + +// Exotic objects with @@toStringTag +doTest("[object Map]", new Map); +doTest("[object Set]", new Set); +doTest("[object JSON]", JSON); +doTest("[object Math]", Math); + +// Normal object cases +doTest("[object Object]", {}); +doTest("[object Object]", new Dummy); +doTest("[object Foo]", { [Symbol.toStringTag]: "Foo" }); + +// Test the receiver of Symbol.toStringTag +let receiver1; +let object1 = { + __proto__: { + get [Symbol.toStringTag]() { + receiver1 = this; + } + } +}; +doTest("[object Object]", object1); +assertEq(receiver1, object1); + +//// BELOW THIS LINE TAMPERS WITH GLOBAL + +// Set a toStringTag on the global String.prototype +let receiver2; +Object.defineProperty(String.prototype, Symbol.toStringTag, { get: function() { + receiver2 = this; + return "XString"; +}}); +doTest("[object XString]", ""); +assertEq(Object.getPrototypeOf(receiver2), String.prototype); diff --git a/js/src/jit-test/tests/basic/offThreadCompileToStencil-01.js b/js/src/jit-test/tests/basic/offThreadCompileToStencil-01.js new file mode 100644 index 0000000000..461af86511 --- /dev/null +++ b/js/src/jit-test/tests/basic/offThreadCompileToStencil-01.js @@ -0,0 +1,30 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// Any copyright is dedicated to the Public Domain. +// http://creativecommons.org/licenses/publicdomain/ + +// Test off-thread parsing. + +load(libdir + 'asserts.js'); + +offThreadCompileToStencil('Math.sin(Math.PI/2)'); +var stencil = finishOffThreadStencil(); +assertEq(evalStencil(stencil), 1); + +offThreadCompileToStencil('a string which cannot be reduced to the start symbol'); +assertThrowsInstanceOf(() => { + var stencil = finishOffThreadStencil(); + evalStencil(stencil); +}, SyntaxError); + +offThreadCompileToStencil('smerg;'); +assertThrowsInstanceOf(() => { + var stencil = finishOffThreadStencil(); + evalStencil(stencil); +}, ReferenceError); + +offThreadCompileToStencil('throw "blerg";'); +assertThrowsValue(() => { + var stencil = finishOffThreadStencil(); + evalStencil(stencil); +}, 'blerg'); diff --git a/js/src/jit-test/tests/basic/offThreadCompileToStencil-02.js b/js/src/jit-test/tests/basic/offThreadCompileToStencil-02.js new file mode 100644 index 0000000000..2273cb63dd --- /dev/null +++ b/js/src/jit-test/tests/basic/offThreadCompileToStencil-02.js @@ -0,0 +1,25 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// Test offThreadCompileToStencil/evalStencil option handling. + +offThreadCompileToStencil("Error()"); +var stencil = finishOffThreadStencil(); +assertEq(!!evalStencil(stencil).stack.match(/^@:1:1\n/), true); + +offThreadCompileToStencil("Error()", { fileName: "candelabra", lineNumber: 6502 }); +stencil = finishOffThreadStencil(); +assertEq(!!evalStencil(stencil).stack.match(/^@candelabra:6502:1\n/), true); + +var element = {}; +offThreadCompileToStencil("Error()"); // shouldn't crash +stencil = finishOffThreadStencil(); +evalStencil(stencil, { element }); + +var elementAttributeName = "molybdenum"; +elementAttributeName += + elementAttributeName + elementAttributeName + elementAttributeName; +offThreadCompileToStencil("Error()"); // shouldn't crash +stencil = finishOffThreadStencil(); +evalStencil(stencil, { + elementAttributeName, +}); diff --git a/js/src/jit-test/tests/basic/offThreadCompileToStencil-03.js b/js/src/jit-test/tests/basic/offThreadCompileToStencil-03.js new file mode 100644 index 0000000000..300497cd1c --- /dev/null +++ b/js/src/jit-test/tests/basic/offThreadCompileToStencil-03.js @@ -0,0 +1,54 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// Test offThreadCompileToStencil for different function types. + +load(libdir + 'asserts.js'); + +var id, stencil; + +id = offThreadCompileToStencil(` + function f() { return "pass"; } + f(); +`); +stencil = finishOffThreadStencil(id); +assertEq(evalStencil(stencil), "pass"); + +id = offThreadCompileToStencil(` + function* f() { return "pass"; } + f().next(); +`); +stencil = finishOffThreadStencil(id); +assertDeepEq(evalStencil(stencil), {value: "pass", done: true}); + +id = offThreadCompileToStencil(` + async function f() { return "pass"; } + f(); +`); +stencil = finishOffThreadStencil(id); +assertEventuallyEq(evalStencil(stencil), "pass"); + +id = offThreadCompileToStencil(` + async function* f() { return "pass"; } + f().next(); +`); +stencil = finishOffThreadStencil(id); +assertEventuallyDeepEq(evalStencil(stencil), {value: "pass", done: true}); + +// Copied from js/src/tests/shell.js +function getPromiseResult(promise) { + var result, error, caught = false; + promise.then(r => { result = r; }, + e => { caught = true; error = e; }); + drainJobQueue(); + if (caught) + throw error; + return result; +} + +function assertEventuallyEq(promise, expected) { + assertEq(getPromiseResult(promise), expected); +} + +function assertEventuallyDeepEq(promise, expected) { + assertDeepEq(getPromiseResult(promise), expected); +} diff --git a/js/src/jit-test/tests/basic/offThreadCompileToStencil-04.js b/js/src/jit-test/tests/basic/offThreadCompileToStencil-04.js new file mode 100644 index 0000000000..1b10df8174 --- /dev/null +++ b/js/src/jit-test/tests/basic/offThreadCompileToStencil-04.js @@ -0,0 +1,21 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// Any copyright is dedicated to the Public Domain. +// http://creativecommons.org/licenses/publicdomain/ + +// Ensure off-thread parse works for ergonomic brand checks. + +load(libdir + 'asserts.js'); + +offThreadCompileToStencil(` + class A { + #x + static hx(o) { return #x in o; } + }; + + throw "Yay"`); + +assertThrowsValue(() => { + var stencil = finishOffThreadStencil(); + evalStencil(stencil); +}, 'Yay'); diff --git a/js/src/jit-test/tests/basic/orNaNTest1.js b/js/src/jit-test/tests/basic/orNaNTest1.js new file mode 100644 index 0000000000..0b713b2c53 --- /dev/null +++ b/js/src/jit-test/tests/basic/orNaNTest1.js @@ -0,0 +1,3 @@ +load(libdir + 'orTestHelper.js'); +var orNaNTest1 = new Function("return orTestHelper(NaN, NaN, 10);"); +assertEq(orNaNTest1(), 0); diff --git a/js/src/jit-test/tests/basic/orNaNTest2.js b/js/src/jit-test/tests/basic/orNaNTest2.js new file mode 100644 index 0000000000..113fe038ff --- /dev/null +++ b/js/src/jit-test/tests/basic/orNaNTest2.js @@ -0,0 +1,3 @@ +load(libdir + 'orTestHelper.js'); +var orNaNTest2 = new Function("return orTestHelper(NaN, 1, 10);"); +assertEq(orNaNTest2(), 45); diff --git a/js/src/jit-test/tests/basic/outerline.js b/js/src/jit-test/tests/basic/outerline.js new file mode 100644 index 0000000000..8056864082 --- /dev/null +++ b/js/src/jit-test/tests/basic/outerline.js @@ -0,0 +1,15 @@ +function outerline(){ + var i=0; + var j=0; + + for (i = 3; i<= 100000; i+=2) + { + for (j = 3; j < 1000; j+=2) + { + if ((i & 1) == 1) + break; + } + } + return "ok"; +} +assertEq(outerline(), "ok"); diff --git a/js/src/jit-test/tests/basic/packed-arrays.js b/js/src/jit-test/tests/basic/packed-arrays.js new file mode 100644 index 0000000000..a6814d47aa --- /dev/null +++ b/js/src/jit-test/tests/basic/packed-arrays.js @@ -0,0 +1,51 @@ +var isPacked = getSelfHostedValue("IsPackedArray"); + +function test() { + var arr; + + // basic + arr = []; + assertEq(isPacked(arr), true); + arr[0] = 0; + assertEq(isPacked(arr), true); + arr[2] = 2; + assertEq(isPacked(arr), false); + + // delete + arr = [1, 2, 3]; + assertEq(isPacked(arr), true); + delete arr[1]; + assertEq(isPacked(arr), false); + + // setting .length + arr = [1]; + arr.length = 0; + assertEq(isPacked(arr), true); + arr.length = 1; + assertEq(isPacked(arr), false); + + // slice + arr = [1, 2, , 3]; + assertEq(isPacked(arr), false); + assertEq(isPacked(arr.slice(0, 2)), true); + assertEq(isPacked(arr.slice(0, 3)), false); + assertEq(isPacked(arr.slice(2, 3)), false); + assertEq(isPacked(arr.slice(3, 4)), true); + + // splice + arr = [1, 2, 3]; + assertEq(isPacked(arr.splice(0)), true); + arr = [1, , 2]; + assertEq(isPacked(arr.splice(0)), false); + arr = [1, , 2]; + assertEq(isPacked(arr.splice(0, 1)), true); + assertEq(arr.length, 2); + assertEq(isPacked(arr.splice(0, 1)), false); + assertEq(arr.length, 1); + assertEq(isPacked(arr.splice(0, 1)), true); + assertEq(arr.length, 0); + assertEq(isPacked(arr.splice(0)), true); +} +for (var i = 0; i < 5; i++) { + test(); +} diff --git a/js/src/jit-test/tests/basic/parseIntTests.js b/js/src/jit-test/tests/basic/parseIntTests.js new file mode 100644 index 0000000000..4138d07df8 --- /dev/null +++ b/js/src/jit-test/tests/basic/parseIntTests.js @@ -0,0 +1,24 @@ +function parseIntHelper(n) { + var a; + for (var i = 0; i < 5; i++) + a = parseInt(n); + return a; +} +function doParseIntTests() { + var inputs = [0, -0, .1, -.1, .7, -.7, 1.3, -1.3]; + var outputs = new Array(8); + //avoid jit, unrolled + outputs[0] = outputs[1] = outputs[2] = outputs[4] = 0; + outputs[3] = outputs[5] = -0; + outputs[6] = 1; + outputs[7] = -1; + for (var i = 0; i < 8; i++) { + var n = Object.is(inputs[i], -0) ? "-0" : String(inputs[i]); + var testfn = new Function('return parseIntHelper(' + n + ');'); + assertEq(testfn(), outputs[i]); + } +} +doParseIntTests(); + +assertEq(parseInt("08"), 8); +assertEq(parseInt("09"), 9); diff --git a/js/src/jit-test/tests/basic/parsingNumbers.js b/js/src/jit-test/tests/basic/parsingNumbers.js new file mode 100644 index 0000000000..1630612b69 --- /dev/null +++ b/js/src/jit-test/tests/basic/parsingNumbers.js @@ -0,0 +1,23 @@ +function parsingNumbers() { + var s1 = "123"; + var s1z = "123zzz"; + var s2 = "123.456"; + var s2z = "123.456zzz"; + + var e1 = 123; + var e2 = 123.456; + + var r1, r1z, r2, r2z; + + for (var i = 0; i < 10; i++) { + r1 = parseInt(s1); + r1z = parseInt(s1z); + r2 = parseFloat(s2); + r2z = parseFloat(s2z); + } + + if (r1 == e1 && r1z == e1 && r2 == e2 && r2z == e2) + return "ok"; + return "fail"; +} +assertEq(parsingNumbers(), "ok"); diff --git a/js/src/jit-test/tests/basic/plain-object-prototypes-error.js b/js/src/jit-test/tests/basic/plain-object-prototypes-error.js new file mode 100644 index 0000000000..d62d7fbe72 --- /dev/null +++ b/js/src/jit-test/tests/basic/plain-object-prototypes-error.js @@ -0,0 +1,40 @@ +// Make sure the error has a sensible error message. +function assertThrowsObjectError(f, name) { + try { + f(); + assertEq(true, false); + } catch (e) { + assertEq(e instanceof TypeError, true); + assertEq(e.message.includes("called on incompatible " + name), true, e.message); + } +} + +// Call methods on the prototypes where the methods themselves are defined. +assertThrowsObjectError(() => Map.prototype.has(0), "Map.prototype"); +assertThrowsObjectError(() => Set.prototype.has(0), "Set.prototype"); +assertThrowsObjectError(() => WeakMap.prototype.has({}), "WeakMap.prototype"); +assertThrowsObjectError(() => WeakSet.prototype.has({}), "WeakSet.prototype"); +assertThrowsObjectError(() => Date.prototype.getSeconds(), "Date.prototype"); +assertThrowsObjectError(() => RegExp.prototype.compile(), "RegExp.prototype"); + +// Call methods with different prototype objects. +assertThrowsObjectError(() => Map.prototype.has.call(ArrayBuffer.prototype), "ArrayBuffer.prototype"); +assertThrowsObjectError(() => Map.prototype.has.call(BigInt.prototype), "BigInt.prototype"); +assertThrowsObjectError(() => Map.prototype.has.call(DataView.prototype), "DataView.prototype"); +assertThrowsObjectError(() => Map.prototype.has.call(Date.prototype), "Date.prototype"); +assertThrowsObjectError(() => Map.prototype.has.call(FinalizationRegistry.prototype), "FinalizationRegistry.prototype"); +assertThrowsObjectError(() => Map.prototype.has.call(Int32Array.prototype), "Int32Array.prototype"); +assertThrowsObjectError(() => Map.prototype.has.call(Promise.prototype), "Promise.prototype"); +if (this.hasOwnProperty("ReadableStream")) { + // ReadableStream is only present for the JS Streams implementation + assertThrowsObjectError(() => Map.prototype.has.call(ReadableStream.prototype), "ReadableStream.prototype"); +} +assertThrowsObjectError(() => Map.prototype.has.call(RegExp.prototype), "RegExp.prototype"); +assertThrowsObjectError(() => Map.prototype.has.call(Set.prototype), "Set.prototype"); +assertThrowsObjectError(() => Map.prototype.has.call(TypeError.prototype), "TypeError.prototype"); +assertThrowsObjectError(() => Map.prototype.has.call(WeakMap.prototype), "WeakMap.prototype"); +assertThrowsObjectError(() => Map.prototype.has.call(WeakRef.prototype), "WeakRef.prototype"); + +// Call methods with different objects. +assertThrowsObjectError(() => Map.prototype.has.call(new Error), "Error"); +assertThrowsObjectError(() => Map.prototype.has.call(new TypeError), "TypeError"); diff --git a/js/src/jit-test/tests/basic/plain-object-prototypes.js b/js/src/jit-test/tests/basic/plain-object-prototypes.js new file mode 100644 index 0000000000..c53f0c9e16 --- /dev/null +++ b/js/src/jit-test/tests/basic/plain-object-prototypes.js @@ -0,0 +1,21 @@ +const prototypes = [ + Map.prototype, + Set.prototype, + WeakMap.prototype, + WeakSet.prototype, + Date.prototype, + Error.prototype, + InternalError.prototype, + EvalError.prototype, + RangeError.prototype, + ReferenceError.prototype, + SyntaxError.prototype, + TypeError.prototype, + URIError.prototype, + RegExp.prototype, +]; + +for (const prototype of prototypes) { + delete prototype[Symbol.toStringTag]; + assertEq(Object.prototype.toString.call(prototype), "[object Object]"); +} diff --git a/js/src/jit-test/tests/basic/plain-object-to-string.js b/js/src/jit-test/tests/basic/plain-object-to-string.js new file mode 100644 index 0000000000..8af972bb4a --- /dev/null +++ b/js/src/jit-test/tests/basic/plain-object-to-string.js @@ -0,0 +1,25 @@ +// Test for OrdinaryToPrimitive called on a plain object with hint "string". + +function assertStr(o, s) { + assertEq(String(o), s); +} +function test() { + assertStr({x: 1}, "[object Object]"); + assertStr({[Symbol.toStringTag]: "Foo"}, "[object Foo]"); + assertStr({toString() { return 123; }}, "123"); + assertStr({toString: Math.abs}, "NaN"); + assertStr({x: "hello", toString() { return this.x; }}, "hello"); + + let c = 0; + let fun = () => "hi-" + ++c; + assertStr({toString: fun}, "hi-1"); + assertStr({toString: "foo", valueOf: fun}, "hi-2"); + assertStr({toString() { return {}; }, valueOf: fun}, "hi-3"); + + let proto = {}; + proto[Symbol.toStringTag] = null; + assertStr(Object.create(proto), "[object Object]"); + proto[Symbol.toStringTag] = "Bar"; + assertStr(Object.create(proto), "[object Bar]"); +} +test(); diff --git a/js/src/jit-test/tests/basic/primitive-proto-properties.js b/js/src/jit-test/tests/basic/primitive-proto-properties.js new file mode 100644 index 0000000000..ea012e40e6 --- /dev/null +++ b/js/src/jit-test/tests/basic/primitive-proto-properties.js @@ -0,0 +1,47 @@ +function shadowing() { + Object.prototype.x = 1; + + for (var i = 0; i < 20; i++) { + var x = "a".x; + assertEq(x, i <= 15 ? 1 : "hello"); + + if (i == 15) { + String.prototype.x = "hello"; + } + } + + delete Object.prototype.x; +} + +function deleted() { + String.prototype.y = 1; + + for (var i = 0; i < 20; i++) { + var y = "a".y; + assertEq(y, i <= 15 ? 1 : undefined); + + if (i == 15) { + delete String.prototype.y; + } + } + + delete String.prototype.y; +} + + +function notdefined() { + for (var i = 0; i < 20; i++) { + var z = "a".z; + assertEq(z, i <= 15 ? undefined : "test"); + + if (i == 15) { + String.prototype.z = "test"; + } + } + + delete String.prototype.z; +} + +shadowing(); +deleted(); +notdefined(); diff --git a/js/src/jit-test/tests/basic/primitiveProto.js b/js/src/jit-test/tests/basic/primitiveProto.js new file mode 100644 index 0000000000..e9043225c8 --- /dev/null +++ b/js/src/jit-test/tests/basic/primitiveProto.js @@ -0,0 +1,24 @@ + +function fna() {} +fna.prototype = undefined; +new fna; + +function fnb() {} +fnb.prototype = null; +new fnb; + +function fnc() {} +fnc.prototype = 3; +new fnc; + +function fnd() {} +fnd.prototype = true; +new fnd; + +function fne() {} +fne.prototype = "foo"; +new fne; + +function fnf() {} +fnf.prototype = /foo/; +new fnf; diff --git a/js/src/jit-test/tests/basic/prop-access-error-message.js b/js/src/jit-test/tests/basic/prop-access-error-message.js new file mode 100644 index 0000000000..05a7f49a7c --- /dev/null +++ b/js/src/jit-test/tests/basic/prop-access-error-message.js @@ -0,0 +1,47 @@ +// |jit-test| skip-if: getBuildConfiguration('pbl') +// The decompiled expression used in the error messsage should not be confused +// by unrelated value on the stack. + +var a = {}; +var b = {}; +var p = "c"; + +function doPropAccess() { + // Both "a.c" and "b.e" are undefined. + // "a.c" should be used. + a.c.d = b.e; +} + +function testPropAccess() { + var caught = false; + try { + doPropAccess(); + } catch (e) { + assertEq(e.message.includes("a.c is undefined"), true); + caught = true; + } + assertEq(caught, true); +} + +function doElemAccess() { + // Both "a[x]" and "b.e" are undefined. + // "a[x]" should be used. + var x = "c"; + a[x].d = b.e; +} + +function testElemAccess() { + var caught = false; + try { + doElemAccess(); + } catch (e) { + assertEq(e.message.includes("a[x] is undefined"), true); + caught = true; + } + assertEq(caught, true); +} + +for (var i = 0; i < 10; i++) { + testPropAccess(); + testElemAccess(); +} diff --git a/js/src/jit-test/tests/basic/properly-remove-timeout-root-before-shutdown.js b/js/src/jit-test/tests/basic/properly-remove-timeout-root-before-shutdown.js new file mode 100644 index 0000000000..e42bbede4c --- /dev/null +++ b/js/src/jit-test/tests/basic/properly-remove-timeout-root-before-shutdown.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") +// Bug 857050: Remove the timeout function root before shutting down. +function timeoutfunc() {} +timeout(1, timeoutfunc); +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); diff --git a/js/src/jit-test/tests/basic/property-enumeration-order.js b/js/src/jit-test/tests/basic/property-enumeration-order.js new file mode 100644 index 0000000000..2a891b4369 --- /dev/null +++ b/js/src/jit-test/tests/basic/property-enumeration-order.js @@ -0,0 +1,37 @@ +function check(obj, expected, expectedAll = expected) { + assertEq(Reflect.ownKeys(obj).join(""), expectedAll); + assertEq(Object.getOwnPropertyNames(obj).join(""), expectedAll); + assertEq(Object.keys(obj).join(""), expected); + var s = ""; + for (var x in obj) + s += x; + assertEq(s, expected); +} + +var obj = {2: 0, 0: 0, "foo": "bar", 4: 0, "-5": 1}; +check(obj, "024foo-5"); +obj.x = 1; +check(obj, "024foo-5x"); +obj[1] = 1; +check(obj, "0124foo-5x"); +obj[1.2] = 1; +check(obj, "0124foo-5x1.2"); +Object.defineProperty(obj, '3', {value:1,enumerable:false,configurable:false,writable:false}); +check(obj, "0124foo-5x1.2", "01234foo-5x1.2"); +delete obj[2]; +check(obj, "014foo-5x1.2", "0134foo-5x1.2"); +obj[2] = 1; +check(obj, "0124foo-5x1.2", "01234foo-5x1.2"); + +assertEq(JSON.stringify(obj), '{"0":0,"1":1,"2":1,"4":0,"foo":"bar","-5":1,"x":1,"1.2":1}'); + +var arr = [1, 2, 3]; +Object.defineProperty(arr, '3', {value:1,enumerable:true,configurable:true,writable:true}); +check(arr, "0123", "0123length"); +Object.defineProperty(arr, '1000', {value:1,enumerable:true,configurable:true,writable:false}); +check(arr, "01231000", "01231000length"); + +arr = [1, 2, , , 5]; +check(arr, "014", "014length"); +arr[0xfffffff] = 4; +check(arr, "014268435455", "014268435455length"); diff --git a/js/src/jit-test/tests/basic/property-error-message-fix-disabled.js b/js/src/jit-test/tests/basic/property-error-message-fix-disabled.js new file mode 100644 index 0000000000..542bada65f --- /dev/null +++ b/js/src/jit-test/tests/basic/property-error-message-fix-disabled.js @@ -0,0 +1,36 @@ +// |jit-test| --disable-property-error-message-fix; skip-if: getBuildConfiguration('pbl') + +function check(f, message) { + let caught = false; + try { + f(); + } catch (e) { + assertEq(e.message, message); + caught = true; + } + assertEq(caught, true); +} + +check(() => { + let obj = { + prop: undefined + }; + obj.prop.prop2(); +}, "obj.prop is undefined"); + +check(() => { + let obj = { + prop: null + }; + obj.prop.prop2(); +}, "obj.prop is null"); + +check(() => { + let prop = "prop"; + undefined[prop](); +}, "undefined has no properties"); + +check(() => { + let prop = "prop"; + null[prop](); +}, "null has no properties"); diff --git a/js/src/jit-test/tests/basic/property-error-message-fix.js b/js/src/jit-test/tests/basic/property-error-message-fix.js new file mode 100644 index 0000000000..6f27416496 --- /dev/null +++ b/js/src/jit-test/tests/basic/property-error-message-fix.js @@ -0,0 +1,36 @@ +// |jit-test| skip-if: getBuildConfiguration('pbl') + +function check(f, message) { + let caught = false; + try { + f(); + } catch (e) { + assertEq(e.message, message); + caught = true; + } + assertEq(caught, true); +} + +check(() => { + let obj = { + prop: undefined + }; + obj.prop.prop2(); +}, "can't access property \"prop2\", obj.prop is undefined"); + +check(() => { + let obj = { + prop: null + }; + obj.prop.prop2(); +}, "can't access property \"prop2\", obj.prop is null"); + +check(() => { + let prop = "prop"; + undefined[prop](); +}, "can't access property \"prop\" of undefined"); + +check(() => { + let prop = "prop"; + null[prop](); +}, "can't access property \"prop\" of null"); diff --git a/js/src/jit-test/tests/basic/putargsNoReturn.js b/js/src/jit-test/tests/basic/putargsNoReturn.js new file mode 100644 index 0000000000..73df78b49f --- /dev/null +++ b/js/src/jit-test/tests/basic/putargsNoReturn.js @@ -0,0 +1,6 @@ +function f(a) { + x = arguments; +} +for (var i = 0; i < 9; i++) + f(123); +assertEq(x[0], 123); diff --git a/js/src/jit-test/tests/basic/putargsReturn.js b/js/src/jit-test/tests/basic/putargsReturn.js new file mode 100644 index 0000000000..1a6f3c3588 --- /dev/null +++ b/js/src/jit-test/tests/basic/putargsReturn.js @@ -0,0 +1,7 @@ +function f(a) { + x = arguments; + return 99; +} +for (var i = 0; i < 9; i++) + f(123); +assertEq(x[0], 123); diff --git a/js/src/jit-test/tests/basic/recompute-wrappers.js b/js/src/jit-test/tests/basic/recompute-wrappers.js new file mode 100644 index 0000000000..cf45a37407 --- /dev/null +++ b/js/src/jit-test/tests/basic/recompute-wrappers.js @@ -0,0 +1,5 @@ +var g = newGlobal(); +var w1 = g.Math; +var w2 = g.evaluate("new Array"); +recomputeWrappers(this, g); +recomputeWrappers(); diff --git a/js/src/jit-test/tests/basic/regexp-removed-dot-star.js b/js/src/jit-test/tests/basic/regexp-removed-dot-star.js new file mode 100644 index 0000000000..5218494883 --- /dev/null +++ b/js/src/jit-test/tests/basic/regexp-removed-dot-star.js @@ -0,0 +1,49 @@ + +// Test that removal of leading or trailing .* from RegExp test() calls +// does not affect lastMatch or other RegExpStatics info. + +function first(input) { + var re = /.*b(cd)/; + for (var i = 0; i < 10; i++) + re.test(input); +} + +first("1234\nabcdefg\n1234"); +assertEq(RegExp.lastMatch, "abcd"); +assertEq(RegExp.$1, "cd"); +assertEq(RegExp.input, "1234\nabcdefg\n1234"); +assertEq(RegExp.leftContext, "1234\n"); +assertEq(RegExp.rightContext, "efg\n1234"); +assertEq(RegExp.lastParen, "cd"); + + +// Test that removal of leading or trailing .* from RegExp test() calls +// does not affect lastMatch or other RegExpStatics info. + +function second(input) { + var re = /bcd.*/; + for (var i = 0; i < 10; i++) + re.test(input); +} + +second("1234\nabcdefg\n1234"); +assertEq(RegExp.lastMatch, "bcdefg"); +assertEq(RegExp.$1, ""); +assertEq(RegExp.input, "1234\nabcdefg\n1234"); +assertEq(RegExp.leftContext, "1234\na"); +assertEq(RegExp.rightContext, "\n1234"); +assertEq(RegExp.lastParen, ""); + +function third(input) { + var re = /.*bcd.*/; + for (var i = 0; i < 10; i++) + re.test(input); +} + +third("1234\nabcdefg\n1234"); +assertEq(RegExp.lastMatch, "abcdefg"); +assertEq(RegExp.$1, ""); +assertEq(RegExp.input, "1234\nabcdefg\n1234"); +assertEq(RegExp.leftContext, "1234\n"); +assertEq(RegExp.rightContext, "\n1234"); +assertEq(RegExp.lastParen, ""); diff --git a/js/src/jit-test/tests/basic/regexp-reset-input.js b/js/src/jit-test/tests/basic/regexp-reset-input.js new file mode 100644 index 0000000000..77cdd69dd6 --- /dev/null +++ b/js/src/jit-test/tests/basic/regexp-reset-input.js @@ -0,0 +1,8 @@ +var re = /(pattern)/g; +var input = "patternpatternpattern"; +re.exec(input) +RegExp.input = "satturn"; +assertEq(RegExp.$1, "pattern"); +assertEq(RegExp.lastMatch, "pattern"); +assertEq(RegExp.lastParen, "pattern"); +assertEq(RegExp.rightContext, "patternpattern"); diff --git a/js/src/jit-test/tests/basic/regexp-sticky-undef-capture.js b/js/src/jit-test/tests/basic/regexp-sticky-undef-capture.js new file mode 100644 index 0000000000..3d96d4e44c --- /dev/null +++ b/js/src/jit-test/tests/basic/regexp-sticky-undef-capture.js @@ -0,0 +1,8 @@ +var re = /abc(WHOO!)?def/y; +var input = 'abcdefabcdefabcdef'; +var count = 0; +while ((match = re.exec(input)) !== null) { + print(count++); + assertEq(match[0], 'abcdef'); + assertEq(match[1], undefined); +} diff --git a/js/src/jit-test/tests/basic/regexp-test-direct-bug-694752.js b/js/src/jit-test/tests/basic/regexp-test-direct-bug-694752.js new file mode 100644 index 0000000000..7e0bae7dae --- /dev/null +++ b/js/src/jit-test/tests/basic/regexp-test-direct-bug-694752.js @@ -0,0 +1,15 @@ +function whoo() { + // Cause mjit to use the script's RegExpObject directly when it compiles this function. + assertEq(/foo.*baz/.test('foobarbaz'), true); +} + +var orig_test = RegExp.prototype.test +for (var i = 0; i < 50; ++i) + whoo(); +eval('RegExp.prototype.test = function(str) { return orig_test.call(this, str) }') +for (var i = 0; i < 50; ++i) + whoo(); +RegExp.prototype.test = orig_test; +gc(); +whoo(); + diff --git a/js/src/jit-test/tests/basic/regexp-undefined-match.js b/js/src/jit-test/tests/basic/regexp-undefined-match.js new file mode 100644 index 0000000000..cf1d799833 --- /dev/null +++ b/js/src/jit-test/tests/basic/regexp-undefined-match.js @@ -0,0 +1,9 @@ + +function f(str) { + for (var i=0; i<10; i++) { + arr = /foo(ba(r))?/.exec(str); + var x = arr[0] + " " + arr[1] + " " + arr[2]; + } +} +f("foobar"); +f("foo"); diff --git a/js/src/jit-test/tests/basic/regexpLastIndex.js b/js/src/jit-test/tests/basic/regexpLastIndex.js new file mode 100644 index 0000000000..80991fa4b9 --- /dev/null +++ b/js/src/jit-test/tests/basic/regexpLastIndex.js @@ -0,0 +1,13 @@ +function regexpLastIndex() +{ + var n = 0; + var re = /hi/g; + var ss = " hi hi hi hi hi hi hi hi hi hi"; + for (var i = 0; i < 10; i++) { + // re.exec(ss); + n += (re.lastIndex > 0) ? 3 : 0; + re.lastIndex = 0; + } + return n; +} +assertEq(regexpLastIndex(), 0); diff --git a/js/src/jit-test/tests/basic/regexpLastIndexReset.js b/js/src/jit-test/tests/basic/regexpLastIndexReset.js new file mode 100644 index 0000000000..dbe3c3b763 --- /dev/null +++ b/js/src/jit-test/tests/basic/regexpLastIndexReset.js @@ -0,0 +1,26 @@ +// Bug 1207922 - lastIndex should be reset to 0 when match fails. + +var pattern = /abc/; +var string = 'aaaaaaaa'; + +function test() { + pattern.lastIndex = 3; + var result = pattern.exec(string); + assertEq(result, null); + assertEq(pattern.lastIndex, 3); +} + +for (let i = 0; i < 10; i++) { + test(); +} + +function test2() { + pattern.lastIndex = 3; + var result = pattern.test(string); + assertEq(result, false); + assertEq(pattern.lastIndex, 3); +} + +for (let i = 0; i < 10; i++) { + test2(); +} diff --git a/js/src/jit-test/tests/basic/relazify-selfhosted.js b/js/src/jit-test/tests/basic/relazify-selfhosted.js new file mode 100644 index 0000000000..63cad1c2d1 --- /dev/null +++ b/js/src/jit-test/tests/basic/relazify-selfhosted.js @@ -0,0 +1,4 @@ +var g = newGlobal(); +g.eval("this.inner = getSelfHostedValue('outer')()"); +gc(); +g.inner(); diff --git a/js/src/jit-test/tests/basic/relazify.js b/js/src/jit-test/tests/basic/relazify.js new file mode 100644 index 0000000000..01e7dcd496 --- /dev/null +++ b/js/src/jit-test/tests/basic/relazify.js @@ -0,0 +1,16 @@ +function f(x) { + return x * 3; +} +for (var i=0; i<100; i++) { + f(i); +} +relazifyFunctions(); + +f(1); +f(1); + +relazifyFunctions(); + +for (var i=0; i<10; i++) { + f.call(null, i); +} diff --git a/js/src/jit-test/tests/basic/runOnceClosures.js b/js/src/jit-test/tests/basic/runOnceClosures.js new file mode 100644 index 0000000000..49c81b3827 --- /dev/null +++ b/js/src/jit-test/tests/basic/runOnceClosures.js @@ -0,0 +1,11 @@ + +compare = (function() { + function inner() { return inner.caller; }; + globalInner = inner; + globalClosure = inner(); + return function(f) { return f === inner; } +})(); + +assertEq(compare(globalInner), true); +globalClosure(); +assertEq(compare(globalInner), false); diff --git a/js/src/jit-test/tests/basic/script-filename-validation-1.js b/js/src/jit-test/tests/basic/script-filename-validation-1.js new file mode 100644 index 0000000000..fa440dd6d4 --- /dev/null +++ b/js/src/jit-test/tests/basic/script-filename-validation-1.js @@ -0,0 +1,51 @@ +load(libdir + "asserts.js"); + +setTestFilenameValidationCallback(); + +// Filenames starting with "safe" are fine. +assertEq(evaluate("2", {fileName: "safe.js"}), 2); +assertEq(evaluate("eval(3)", {fileName: "safe.js"}), 3); +assertEq(evaluate("Function('return 4')()", {fileName: "safe.js"}), 4); + +// Delazification is fine. +function foo(x) { + function bar(x) { return x + 1; } + return bar(x); +} +assertEq(foo(1), 2); + +// These are all blocked. +assertThrowsInstanceOf(() => evaluate("throw 2", {fileName: "unsafe.js"}), InternalError); +assertThrowsInstanceOf(() => evaluate("throw 2", {fileName: "system.js"}), InternalError); +assertThrowsInstanceOf(() => evaluate("throw 2", {fileName: ""}), InternalError); +assertThrowsInstanceOf(() => evaluate("throw 2"), InternalError); +assertThrowsInstanceOf(() => eval("throw 2"), InternalError); +assertThrowsInstanceOf(() => Function("return 1"), InternalError); +assertThrowsInstanceOf(() => parseModule("{ function x() {} }"), InternalError); + +// The error message must contain the filename. +var ex = null; +try { + evaluate("throw 2", {fileName: "file://foo.js"}); +} catch (e) { + ex = e; +} +assertEq(ex.toString(), "InternalError: unsafe filename: file://foo.js"); + +// Off-thread parse throws too, when finishing. +if (helperThreadCount() > 0) { + offThreadCompileToStencil('throw 1'); + var stencil = finishOffThreadStencil(); + assertThrowsInstanceOf(() => evalStencil(stencil), InternalError); +} + +// Unsafe filename is accepted if we opt-out. +assertEq(evaluate("2", {fileName: "unsafe.js", skipFileNameValidation: true}), 2); +assertEq(evaluate("3", {skipFileNameValidation: true}), 3); + +// In system realms we also accept filenames starting with "system". +var systemRealm = newGlobal({newCompartment: true, systemPrincipal: true}); +assertEq(systemRealm.evaluate("1 + 2", {fileName: "system.js"}), 3); +assertEq(systemRealm.evaluate("2 + 2", {fileName: "safe.js"}), 4); +assertThrowsInstanceOf(() => systemRealm.evaluate("1 + 2", {fileName: "unsafe.js"}), + systemRealm.InternalError); diff --git a/js/src/jit-test/tests/basic/script-filename-validation-2.js b/js/src/jit-test/tests/basic/script-filename-validation-2.js new file mode 100644 index 0000000000..432c26c0ce --- /dev/null +++ b/js/src/jit-test/tests/basic/script-filename-validation-2.js @@ -0,0 +1,22 @@ +load(libdir + "asserts.js"); +load(libdir + 'bytecode-cache.js'); + +// Install the callback after evaluating the script and saving the bytecode +// (generation 0). XDR decoding after this should throw. + +var g = newGlobal({cloneSingletons: true}); +test = ` + assertEq(generation, 0); +`; +assertThrowsInstanceOf(() => { + evalWithCache(test, { + global: g, + checkAfter: function (ctx) { + assertEq(g.generation, 0); + setTestFilenameValidationCallback(); + } + }); +}, g.InternalError); + +// Generation should be 1 (XDR decoding threw an exception). +assertEq(g.generation, 1); diff --git a/js/src/jit-test/tests/basic/setArgumentsLength.js b/js/src/jit-test/tests/basic/setArgumentsLength.js new file mode 100644 index 0000000000..775d3ef9f2 --- /dev/null +++ b/js/src/jit-test/tests/basic/setArgumentsLength.js @@ -0,0 +1,14 @@ +var count = 0; + +function f() { + arguments.length--; + for (var i = 0; i < arguments.length; ++i) { + ++count; + } +} + +f(1, 2); +f(1, 2); +f(2, 2); + +assertEq(count, 3); diff --git a/js/src/jit-test/tests/basic/setArgumentsLength2.js b/js/src/jit-test/tests/basic/setArgumentsLength2.js new file mode 100644 index 0000000000..2dcb174242 --- /dev/null +++ b/js/src/jit-test/tests/basic/setArgumentsLength2.js @@ -0,0 +1,12 @@ +// don't crash + +var q; + +function f() { + while (arguments.length > 0) { + q = arguments[arguments.length-1]; + arguments.length--; + } +} + +f(1, 2, 3, 4, 5); diff --git a/js/src/jit-test/tests/basic/setCall.js b/js/src/jit-test/tests/basic/setCall.js new file mode 100644 index 0000000000..0e4950e1c2 --- /dev/null +++ b/js/src/jit-test/tests/basic/setCall.js @@ -0,0 +1,22 @@ +function f() { + var x = 11; + + function g() { + var y = 12; + + function h() { + for (var i = 0; i < 5; ++i) { + y = 4; + x = i * 2; + } + } + h(); + + assertEq(y, 4); + } + g(); + + assertEq(x, 8); +} + +f(); diff --git a/js/src/jit-test/tests/basic/setCallEvalMiddle.js b/js/src/jit-test/tests/basic/setCallEvalMiddle.js new file mode 100644 index 0000000000..71de2ac69b --- /dev/null +++ b/js/src/jit-test/tests/basic/setCallEvalMiddle.js @@ -0,0 +1,17 @@ +eval(1); // avoid global shape change when we call eval below +function q() { + var x = 1; + function f() { + function g() { + var t=0; + for (var i=0; i<3; i++) + x = i; + }; + g(); + eval("var x = 3"); + g(); + assertEq(x, 2); + } + f(); +} +q(); diff --git a/js/src/jit-test/tests/basic/setCallEvalMiddle2.js b/js/src/jit-test/tests/basic/setCallEvalMiddle2.js new file mode 100644 index 0000000000..b93622f36c --- /dev/null +++ b/js/src/jit-test/tests/basic/setCallEvalMiddle2.js @@ -0,0 +1,18 @@ +eval(1); // avoid global shape change when we call eval below +function q() { + var x = 1; + function f() { + function g() { + var t=0; + for (var i=0; i<3; i++) + x = i; + assertEq(x, 2); + eval("var x = 3"); + }; + g(); + g(); + assertEq(x, 2); + } + f(); +} +q(); diff --git a/js/src/jit-test/tests/basic/setCallGlobal.js b/js/src/jit-test/tests/basic/setCallGlobal.js new file mode 100644 index 0000000000..a4ba54bae8 --- /dev/null +++ b/js/src/jit-test/tests/basic/setCallGlobal.js @@ -0,0 +1,14 @@ +var x = 1; +function f() { + function g() { + var t=0; + for (var i=0; i<3; i++) + x = i; + }; + g(); + eval("var x = 2"); + g(); + assertEq(x, 2); +} +f(); +assertEq(x, 2); diff --git a/js/src/jit-test/tests/basic/setPrototypeOf.js b/js/src/jit-test/tests/basic/setPrototypeOf.js new file mode 100644 index 0000000000..69558ac6c6 --- /dev/null +++ b/js/src/jit-test/tests/basic/setPrototypeOf.js @@ -0,0 +1,106 @@ +load(libdir + 'asserts.js'); + +function getObjects() { + function func(){} + return [func, + new func(), + {x: 5}, + /regexp/, + [1, 2, 3], + new Date(), + new Number(1), + new Boolean(true), + new String('str'), + Object.create(null)]; +} + +var coercibleValues = [1, + true, + 'string']; + +var nonCoercibleValues = [undefined, + null]; + +var valuesWithoutNull = coercibleValues.concat(undefined); + +function TestSetPrototypeOf(object, proto) { + assertEq(Object.setPrototypeOf(object, proto), object); + assertEq(Object.getPrototypeOf(object), proto); +} + +// check if Object.setPrototypeOf works with coercible values +for(var value of coercibleValues) { + assertEq(Object.setPrototypeOf(value, {}), value); +} + +// check if Object.setPrototypeOf fails on non-coercible values +for (var value of nonCoercibleValues) { + assertThrowsInstanceOf(() => Object.setPrototypeOf(value, {}), + TypeError, "Object.setPrototypeOf shouldn't work on non-coercible values"); +} + +// check if Object.setPrototypeOf works when prototype is set to non-objects +var objects = getObjects(); +for (var object of objects) { + for (var proto of valuesWithoutNull) { + assertThrowsInstanceOf(() => Object.setPrototypeOf(object, proto), + TypeError, "Object.setPrototypeOf fails when the prototype is set to non-objects"); + } +} + +// check if Object.setPrototypeOf works when prototype is set to objects +var objects1 = getObjects(); +var objects2 = getObjects(); +for (var object1 of objects1) { + for (var object2 of objects2) { + TestSetPrototypeOf(object1, object2); + } +} + +// check if Object.setPrototypeOf works when prototype is set to null +objects = getObjects(); +for (var object of objects) { + TestSetPrototypeOf(object, null); +} + +// check if Object.setPrototypeOf fails when object is not extensible +var objects = getObjects(); +var proto = {}; +for (var object of objects) { + Object.preventExtensions(object); + assertThrowsInstanceOf(() => Object.setPrototypeOf(object, proto), + TypeError, "Object.setPrototypeOf should fail when the object is not extensible"); +} + +// check if Object.setPrototypeof(A, B) succeeds on not extensible object A if +// prototype of A == B already +var objectProto = {}; +var nonExtensibleObject = Object.create(objectProto); +Object.preventExtensions(nonExtensibleObject); +assertEq(Object.setPrototypeOf(nonExtensibleObject, objectProto), nonExtensibleObject); + +// check if Object.setPrototypeOf works with prototype lookup +var object = {}; +assertEq('x' in object, false); +assertEq('y' in object, false); + +var oldProto = { + x: 'old x', + y: 'old y' +}; +Object.setPrototypeOf(object, oldProto); +assertEq(object.x, 'old x'); +assertEq(object.y, 'old y'); + +var newProto = { + x: 'new x' +}; +Object.setPrototypeOf(object, newProto); +assertEq(object.x, 'new x'); +assertEq('y' in object, false); + +// check if Object.setPrototypeOf throws TypeError on fewer arguments +assertThrowsInstanceOf(() => Object.setPrototypeOf(), + TypeError, "Object.setPrototypeOf throws TypeError when called without any parameters"); +assertThrowsInstanceOf(() => Object.setPrototypeOf({}), + TypeError, "Object.setPrototypeOf throws TypeError when called with 1 parameter"); diff --git a/js/src/jit-test/tests/basic/setelem.js b/js/src/jit-test/tests/basic/setelem.js new file mode 100644 index 0000000000..cdbe035b46 --- /dev/null +++ b/js/src/jit-test/tests/basic/setelem.js @@ -0,0 +1,12 @@ +var a; +function setelem() +{ + a = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; + a = a.concat(a, a, a); + var l = a.length; + for (var i = 0; i < l; i++) { + a[i] = i; + } + return a.toString(); +} +assertEq(setelem(), "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83"); diff --git a/js/src/jit-test/tests/basic/setprop-with-index.js b/js/src/jit-test/tests/basic/setprop-with-index.js new file mode 100644 index 0000000000..8d39c77600 --- /dev/null +++ b/js/src/jit-test/tests/basic/setprop-with-index.js @@ -0,0 +1,5 @@ +function f() +{ + arguments['4294967295'] = 2; +} +assertEq(f(), undefined); diff --git a/js/src/jit-test/tests/basic/setprop.js b/js/src/jit-test/tests/basic/setprop.js new file mode 100644 index 0000000000..bb93e1e498 --- /dev/null +++ b/js/src/jit-test/tests/basic/setprop.js @@ -0,0 +1,10 @@ +function setprop() +{ + var obj = { a:-1 }; + var obj2 = { b:-1, a:-1 }; + for (var i = 0; i < 20; i++) { + obj2.b = obj.a = i; + } + return [obj.a, obj2.a, obj2.b].toString(); +} +assertEq(setprop(), "19,-1,19"); diff --git a/js/src/jit-test/tests/basic/shape-checks.js b/js/src/jit-test/tests/basic/shape-checks.js new file mode 100644 index 0000000000..ba193a9cc2 --- /dev/null +++ b/js/src/jit-test/tests/basic/shape-checks.js @@ -0,0 +1,8 @@ +enableShapeConsistencyChecks(); +var o = {}; +for (var i = 0; i < 50; i++) { + o["x" + i] = i; +} +for (var i = 0; i < 50; i += 2) { + delete o["x" + i]; +} diff --git a/js/src/jit-test/tests/basic/shape-snapshots.js b/js/src/jit-test/tests/basic/shape-snapshots.js new file mode 100644 index 0000000000..866298caeb --- /dev/null +++ b/js/src/jit-test/tests/basic/shape-snapshots.js @@ -0,0 +1,37 @@ +function test1() { + var o = {x: 1, y: 2}; + var snapshot = createShapeSnapshot(o); + checkShapeSnapshot(snapshot); + Object.defineProperty(o, "z", {get: function() {}}); + checkShapeSnapshot(snapshot); + + snapshot = createShapeSnapshot(o); + checkShapeSnapshot(snapshot); + o[12345678] = 1; + checkShapeSnapshot(snapshot); + + snapshot = createShapeSnapshot(o); + Object.defineProperty(o, "a", {configurable: true, set: function(){}}); + checkShapeSnapshot(snapshot); + + snapshot = createShapeSnapshot(o); + checkShapeSnapshot(snapshot); + delete o.a; + checkShapeSnapshot(snapshot); +} +test1(); + +function test2() { + var dictObject = {x: 1, y: 2, z: 3}; + delete dictObject.x; + var objects = [this, {}, {x: 1}, {x: 2}, dictObject, function() {}, [1, 2], + Object.prototype, new Proxy({}, {})]; + var snapshots = objects.map(o => createShapeSnapshot(o)); + gc(); + snapshots.forEach(function(snapshot) { + objects.forEach(function(obj) { + checkShapeSnapshot(snapshot, obj); + }); + }); +} +test2(); diff --git a/js/src/jit-test/tests/basic/shape-teleporting-invalidation.js b/js/src/jit-test/tests/basic/shape-teleporting-invalidation.js new file mode 100644 index 0000000000..37769bcb5a --- /dev/null +++ b/js/src/jit-test/tests/basic/shape-teleporting-invalidation.js @@ -0,0 +1,144 @@ +// The shape teleporting optimization can be disabled for an object that's used +// as prototype when either it's involved in prototype changes or it had a property +// shadowed on another prototype object. + +function changeProps(o) { + Object.assign(o, {x: 1, y: 2, z: 3}); + o.foo = 4; + delete o.x; +} + +function testProtoChange() { + var receiver = {}; + var A = Object.create(null); + var B = Object.create(A); + + // Change |receiver|'s proto: receiver => B => A => null + // Because |receiver| is not used as a prototype object, this doesn't affect + // teleporting. + Object.setPrototypeOf(receiver, B); + assertEq(hasInvalidatedTeleporting(receiver), false); + assertEq(hasInvalidatedTeleporting(A), false); + assertEq(hasInvalidatedTeleporting(B), false); + + // Change B's proto to C: receiver => B => C => null + // Because B is used as prototype object, both A and B invalidate teleporting. + var C = Object.create(null); + Object.setPrototypeOf(B, C); + assertEq(hasInvalidatedTeleporting(receiver), false); + assertEq(hasInvalidatedTeleporting(A), true); + assertEq(hasInvalidatedTeleporting(B), true); + assertEq(hasInvalidatedTeleporting(C), false); + + // Change B's proto a second time: receiver => B => D => null + // Now C has teleporting invalidated too. + var D = Object.create(null); + Object.setPrototypeOf(B, D); + assertEq(hasInvalidatedTeleporting(receiver), false); + assertEq(hasInvalidatedTeleporting(A), true); + assertEq(hasInvalidatedTeleporting(B), true); + assertEq(hasInvalidatedTeleporting(C), true); + assertEq(hasInvalidatedTeleporting(D), false); + + // Changing properties (without shadowing) must not affect teleporting state. + changeProps(C); + changeProps(D); + assertEq(hasInvalidatedTeleporting(C), true); + assertEq(hasInvalidatedTeleporting(D), false); +} +testProtoChange(); + +function testShadowingProp() { + // receiver => C => B => A => null + var A = Object.create(null); + var B = Object.create(A); + var C = Object.create(B); + var receiver = Object.create(C); + + // Adding non-shadowing properties doesn't affect teleporting. + A.a = 1; + B.b = 1; + C.c = 1; + receiver.receiver = 1; + assertEq(hasInvalidatedTeleporting(receiver), false); + assertEq(hasInvalidatedTeleporting(C), false); + assertEq(hasInvalidatedTeleporting(B), false); + assertEq(hasInvalidatedTeleporting(A), false); + + // Objects not used as prototype can shadow properties without affecting + // teleporting. + receiver.a = 1; + receiver.b = 2; + receiver.c = 3; + assertEq(hasInvalidatedTeleporting(receiver), false); + assertEq(hasInvalidatedTeleporting(C), false); + assertEq(hasInvalidatedTeleporting(B), false); + assertEq(hasInvalidatedTeleporting(A), false); + + // Shadowing a property of B on C invalidates teleporting for B. + C.b = 1; + assertEq(hasInvalidatedTeleporting(receiver), false); + assertEq(hasInvalidatedTeleporting(C), false); + assertEq(hasInvalidatedTeleporting(B), true); + assertEq(hasInvalidatedTeleporting(A), false); + + // Shadowing a property of A on C invalidates teleporting for A. + C.a = 2; + assertEq(hasInvalidatedTeleporting(receiver), false); + assertEq(hasInvalidatedTeleporting(C), false); + assertEq(hasInvalidatedTeleporting(B), true); + assertEq(hasInvalidatedTeleporting(A), true); + + // Changing properties (without shadowing) must not affect teleporting state. + changeProps(C); + changeProps(B); + assertEq(hasInvalidatedTeleporting(C), false); + assertEq(hasInvalidatedTeleporting(B), true); +} +testShadowingProp(); + +function testShadowingPropStopsAtFirst() { + // receiver => C => B{x,y} => A{x,y,z} => null + var A = Object.create(null); + A.x = 1; + A.y = 2; + A.z = 3; + var B = Object.create(A); + B.x = 1; + B.y = 2; + var C = Object.create(B); + var receiver = Object.create(C); + + // Teleporting is supported. + assertEq(hasInvalidatedTeleporting(receiver), false); + assertEq(hasInvalidatedTeleporting(C), false); + assertEq(hasInvalidatedTeleporting(B), false); + assertEq(hasInvalidatedTeleporting(A), false); + + // Shadowing a property of B (and A) on C. + // This invalidates teleporting for B but not for A, because the search stops + // at B. + C.x = 1; + assertEq(hasInvalidatedTeleporting(receiver), false); + assertEq(hasInvalidatedTeleporting(C), false); + assertEq(hasInvalidatedTeleporting(B), true); + assertEq(hasInvalidatedTeleporting(A), false); + + // "y" is similar. + C.y = 2; + assertEq(hasInvalidatedTeleporting(receiver), false); + assertEq(hasInvalidatedTeleporting(C), false); + assertEq(hasInvalidatedTeleporting(B), true); + assertEq(hasInvalidatedTeleporting(A), false); + + // "z" is only defined on A, so now A is affected. + C.z = 3; + assertEq(hasInvalidatedTeleporting(receiver), false); + assertEq(hasInvalidatedTeleporting(C), false); + assertEq(hasInvalidatedTeleporting(B), true); + assertEq(hasInvalidatedTeleporting(A), true); +} +testShadowingPropStopsAtFirst(); + +// Ensure teleporting properties on Object.prototype is still possible. +assertEq(hasInvalidatedTeleporting(Object.prototype), false); diff --git a/js/src/jit-test/tests/basic/shape-teleporting-transplant-1.js b/js/src/jit-test/tests/basic/shape-teleporting-transplant-1.js new file mode 100644 index 0000000000..889fcaf7b0 --- /dev/null +++ b/js/src/jit-test/tests/basic/shape-teleporting-transplant-1.js @@ -0,0 +1,36 @@ +// Test for invalidating shape teleporting when transplanting objects on proto +// chains. + +function checkGetProp(obj, expected) { + for (var i = 0; i < 50; i++) { + assertEq(obj.prop, expected); + } +} + +Object.prototype.prop = 1234; + +// Construct the following proto chain: +// +// receiver => protoA (FakeDOMObject) => protoB {prop: 567} => null +const protoB = Object.create(null); +protoB.prop = 567; +const protoA = new FakeDOMObject(); +Object.setPrototypeOf(protoA, protoB); +const receiver = Object.create(protoA); + +// Ensure all objects we allocated are tenured. This way we don't need to trigger +// a GC later in TransplantableObject, which makes the test more reliable. +gc(); + +// Attach an IC for `receiver.prop`. +checkGetProp(receiver, 567); + +// Swap protoA with another object. This must invalidate shape teleporting, +// because the proto chain of `receiver` now looks like this: +// +// receiver => protoA (new FakeDOMObject) => FakeDOMObject.prototype => Object.prototype => null +const {transplant} = transplantableObject({object: protoA}); +transplant(this); + +// `receiver.prop` now gets `prop` from Object.prototype. +checkGetProp(receiver, 1234); diff --git a/js/src/jit-test/tests/basic/shape-teleporting-transplant-2.js b/js/src/jit-test/tests/basic/shape-teleporting-transplant-2.js new file mode 100644 index 0000000000..b3b7189ceb --- /dev/null +++ b/js/src/jit-test/tests/basic/shape-teleporting-transplant-2.js @@ -0,0 +1,16 @@ +// Put DOM object on prototype chain +let x = new FakeDOMObject; +let y = Object.create(x); + +// Transplant the DOM object while it is still a prototype +let g = newGlobal({newCompartment: true}); +let { transplant } = transplantableObject({ object: x }); + +// JIT an IC to access Object.prototype.toString +function f(o) { return o.toString; } +for (var i = 0; i < 20; ++i) { f(y) } + +// Transplanting should not interfere with teleporting +transplant(g); +x.toString = "override"; +assertEq(f(y), "override"); diff --git a/js/src/jit-test/tests/basic/shapelessCalleeTest.js b/js/src/jit-test/tests/basic/shapelessCalleeTest.js new file mode 100644 index 0000000000..6d12e7c9d8 --- /dev/null +++ b/js/src/jit-test/tests/basic/shapelessCalleeTest.js @@ -0,0 +1,67 @@ +// The following functions use a delay line of length 2 to change the value +// of the callee without exiting the traced loop. This is obviously tuned to +// match the current 8 setting of 2. +function shapelessArgCalleeLoop(f, g, h, a) +{ + for (var i = 0; i < 10; i++) { + f(i, a); + f = g; + g = h; + } +} + +function shapelessVarCalleeLoop(f0, g, h, a) +{ + var f = f0; + for (var i = 0; i < 10; i++) { + f(i, a); + f = g; + g = h; + } +} + +function shapelessLetCalleeLoop(f0, g, h, a) +{ + for (var i = 0; i < 10; i++) { + let f = f0; + f(i, a); + f = g; + g = h; + } +} + +function shapelessUnknownCalleeLoop(n, f, g, h, a) +{ + for (var i = 0; i < 10; i++) { + (n || f)(i, a); + f = g; + g = h; + } +} + +function shapelessCalleeTest() +{ + var a = []; + + var helper = function (i, a) { a[i] = i; }; + shapelessArgCalleeLoop(helper, helper, function (i, a) { a[i] = -i; }, a); + + helper = function (i, a) { a[10 + i] = i; }; + shapelessVarCalleeLoop(helper, helper, function (i, a) { a[10 + i] = -i; }, a); + + helper = function (i, a) { a[20 + i] = i; }; + shapelessLetCalleeLoop(helper, helper, function (i, a) { a[20 + i] = -i; }, a); + + helper = function (i, a) { a[30 + i] = i; }; + shapelessUnknownCalleeLoop(null, helper, helper, function (i, a) { a[30 + i] = -i; }, a); + + try { + helper = {hack: 42}; + shapelessUnknownCalleeLoop(null, helper, helper, helper, a); + } catch (e) { + if (e + "" != "TypeError: f is not a function") + print("shapelessUnknownCalleeLoop: unexpected exception " + e); + } + return a.join(""); +} +assertEq(shapelessCalleeTest(), "01-2-3-4-5-6-7-8-901-2-3-4-5-6-7-8-9012345678901-2-3-4-5-6-7-8-9"); diff --git a/js/src/jit-test/tests/basic/shell-prefs.js b/js/src/jit-test/tests/basic/shell-prefs.js new file mode 100644 index 0000000000..f0c2c8a251 --- /dev/null +++ b/js/src/jit-test/tests/basic/shell-prefs.js @@ -0,0 +1,24 @@ +// |jit-test| --setpref=site_based_pretenuring=false; --setpref=tests.uint32-pref=123450 + +let names = getAllPrefNames(); +assertEq(names.length > 0, true, "Expected at least one pref!"); +assertEq(new Set(names).size, names.length, "Unexpected duplicate pref name"); + +for (let name of names) { + let val = getPrefValue(name); + assertEq(typeof val === "number" || typeof val === "boolean", true); +} + +// Check that --setpref worked. Note: this is just an arbitrary pref. If we ever +// remove it, change this test to check a different one. +assertEq(getPrefValue("site_based_pretenuring"), false); +assertEq(getPrefValue("tests.uint32-pref"), 123450); + +// Must throw an exception for unknown pref names. +let ex; +try { + getPrefValue("some.invalid.pref"); +} catch (e) { + ex = e; +} +assertEq(ex.toString(), "Error: invalid pref name"); diff --git a/js/src/jit-test/tests/basic/shell-principals.js b/js/src/jit-test/tests/basic/shell-principals.js new file mode 100644 index 0000000000..4b330f6616 --- /dev/null +++ b/js/src/jit-test/tests/basic/shell-principals.js @@ -0,0 +1,55 @@ +// Test the JS shell's toy principals. + +var count = 0; + +// Given a string of letters |expected|, say "abc", assert that the stack +// contains calls to a series of functions named by the next letter from +// the string, say a, b, and then c. Younger frames appear earlier in +// |expected| than older frames. +function check(expected, stack) { + print("check(" + JSON.stringify(expected) + ") against:\n" + stack); + count++; + + // Extract only the function names from the stack trace. Omit the frames + // for the top-level evaluation, if it is present. + var split = stack.split(/(.)?@.*\n/).slice(0, -1); + if (split[split.length - 1] === undefined) + split = split.slice(0, -2); + + // Check the function names against the expected sequence. + assertEq(split.length, expected.length * 2); + for (var i = 0; i < expected.length; i++) + assertEq(split[i * 2 + 1], expected[i]); +} + +var low = newGlobal({ principal: 0 }); +var mid = newGlobal({ principal: 0xffff }); +var high = newGlobal({ principal: 0xfffff }); + + eval('function a() { check("a", Error().stack); b(); }'); +low .eval('function b() { check("b", Error().stack); c(); }'); +mid .eval('function c() { check("cba", Error().stack); d(); }'); +high.eval('function d() { check("dcba", Error().stack); e(); }'); + +// Globals created with no explicit principals get 0xffff. + eval('function e() { check("ecba", Error().stack); f(); }'); + +low .eval('function f() { check("fb", Error().stack); g(); }'); +mid .eval('function g() { check("gfecba", Error().stack); h(); }'); +high.eval('function h() { check("hgfedcba", Error().stack); }'); + +// Make everyone's functions visible to each other, as needed. + b = low .b; +low .c = mid .c; +mid .d = high.d; +high.e = e; + f = low .f; +low .g = mid .g; +mid .h = high.h; + +low.check = mid.check = high.check = check; + +// Kick the whole process off. +a(); + +assertEq(count, 8); diff --git a/js/src/jit-test/tests/basic/shell-watchdog.js b/js/src/jit-test/tests/basic/shell-watchdog.js new file mode 100644 index 0000000000..04ae0d9e71 --- /dev/null +++ b/js/src/jit-test/tests/basic/shell-watchdog.js @@ -0,0 +1,16 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") + +/* This test will loop infinitely if the shell watchdog + fails to kick in. */ + +timeout(0.1); +var start = new Date(); + +while (true) { + var end = new Date(); + var duration = (end.getTime() - start.getTime()) / 1000; + if (duration > 1) { + print("tick"); + start = new Date(); + } +} diff --git a/js/src/jit-test/tests/basic/shifted-elements1.js b/js/src/jit-test/tests/basic/shifted-elements1.js new file mode 100644 index 0000000000..ee001c5e35 --- /dev/null +++ b/js/src/jit-test/tests/basic/shifted-elements1.js @@ -0,0 +1,14 @@ +function f() { + var arr = []; + var iters = 1500; + for (var i = 0; i < iters; i++) { + arr.push(i); + if (i % 2 === 0) + assertEq(arr.shift(), i / 2); + } + assertEq(arr.length, iters / 2); + for (var i = iters / 2; i < iters; i++) + assertEq(arr.shift(), i); + assertEq(arr.length, 0); +} +f(); diff --git a/js/src/jit-test/tests/basic/shifted-elements2.js b/js/src/jit-test/tests/basic/shifted-elements2.js new file mode 100644 index 0000000000..f989db1542 --- /dev/null +++ b/js/src/jit-test/tests/basic/shifted-elements2.js @@ -0,0 +1,22 @@ +// Always use the per-element barrier. +gczeal(12); + +function f() { + var arr = []; + for (var i = 0; i < 1000; i++) + arr.push(i); + gc(); // Ensure arr is tenured. + + // Now store a nursery object somewhere in the array, shift elements, + // trigger a GC, and check the post barrier kept the object alive. + for (var i = 0; i < 20; i++) + arr.shift(); + for (var i = 0; i < 40; i++) + arr[900] = {x: i}; + for (var i = 0; i < 10; i++) + arr.shift(); + gc(); + + assertEq(arr[890].x, 39); +} +f(); diff --git a/js/src/jit-test/tests/basic/shifted-elements3.js b/js/src/jit-test/tests/basic/shifted-elements3.js new file mode 100644 index 0000000000..6bbe296faa --- /dev/null +++ b/js/src/jit-test/tests/basic/shifted-elements3.js @@ -0,0 +1,23 @@ +// Always use the per-element barrier. +gczeal(12); + +function f() { + var arr = []; + for (var i = 0; i < 1000; i++) + arr.push(i); + gc(); // Ensure arr is tenured. + + for (var i = 0; i < 10; i++) + arr.shift(); + + // Add a nursery object, shift all elements, and trigger a GC to ensure + // the post barrier doesn't misbehave. + for (var j = 0; j < 40; j++) + arr[500] = {x: j}; + while (arr.length > 0) + arr.shift(); + + gc(); + return arr; +} +f(); diff --git a/js/src/jit-test/tests/basic/shifted-elements4.js b/js/src/jit-test/tests/basic/shifted-elements4.js new file mode 100644 index 0000000000..59bd836087 --- /dev/null +++ b/js/src/jit-test/tests/basic/shifted-elements4.js @@ -0,0 +1,11 @@ +function f() { + var arr = []; + for (var i = 0; i < 2; i++) { + for (var j = 0; j < 90000; j++) + arr.push(j); + for (var j = 0; j < 90000; j++) + assertEq(arr.shift(), j); + assertEq(arr.length, 0); + } +} +f(); diff --git a/js/src/jit-test/tests/basic/shifted-elements5.js b/js/src/jit-test/tests/basic/shifted-elements5.js new file mode 100644 index 0000000000..07e0bce5b5 --- /dev/null +++ b/js/src/jit-test/tests/basic/shifted-elements5.js @@ -0,0 +1,39 @@ +function testFreeze() { + var arr = []; + for (var i = 0; i < 20; i++) + arr.push(i); + for (var i = 0; i < 10; i++) + arr.shift(); + Object.freeze(arr); + assertEq(arr.length, 10); + arr[0] = -1; + assertEq(arr[0], 10); +} +testFreeze(); +testFreeze(); + +function testCopyOnWrite() { + var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]; + for (var i = 0; i < 5; i++) + assertEq(arr.shift(), i + 1); + assertEq(arr.toString(), "6,7,8,9"); +} +testCopyOnWrite(); +testCopyOnWrite(); + +function testNonWritableLength() { + var arr = []; + for (var i = 0; i < 20; i++) + arr.push(i); + Object.defineProperty(arr, "length", {writable: false, value: arr.length}); + var ex; + try { + arr.shift(); + } catch(e) { + ex = e; + } + assertEq(ex instanceof TypeError, true); + assertEq(arr.length, 20); +} +testNonWritableLength(); +testNonWritableLength(); diff --git a/js/src/jit-test/tests/basic/shifted-elements6.js b/js/src/jit-test/tests/basic/shifted-elements6.js new file mode 100644 index 0000000000..671e493254 --- /dev/null +++ b/js/src/jit-test/tests/basic/shifted-elements6.js @@ -0,0 +1,17 @@ +// Test incremental GC slices and shifted elements. +function f() { + var arr = []; + for (var i = 0; i < 1000; i++) + arr.push({x: i}); + var arr2 = []; + for (var i = 0; i < 1000; i++) { + gcslice(900); + var o = arr.shift(); + assertEq(o.x, i); + arr2.push(o); + } + gc(); + for (var i = 0; i < 1000; i++) + assertEq(arr2[i].x, i); +} +f(); diff --git a/js/src/jit-test/tests/basic/shifted-elements7.js b/js/src/jit-test/tests/basic/shifted-elements7.js new file mode 100644 index 0000000000..3adcb61be8 --- /dev/null +++ b/js/src/jit-test/tests/basic/shifted-elements7.js @@ -0,0 +1,47 @@ +function test1() { + var a = []; + for (var i = 0; i < 100; i++) + a.unshift("foo" + i); + for (var i = 99; i >= 0; i--) { + assertEq(a.shift(), "foo" + i); + a.unshift("foo" + (i - 1)); + } + assertEq(a.length, 100); +} +test1(); + +function sum(arr) { + var res = 0; + for (var i = 0; i < arr.length; i++) + res += arr[i]; + return res; +} +function test2() { + var a = []; + for (var i = 0; i < 200; i++) + a.push(i); + for (var i = 0; i < 100; i++) + a.shift(); + for (var i = 0; i < 200; i++) + a.unshift(i); + assertEq(a.length, 300); + assertEq(sum(a), 34850); +} +test2(); + +function test3() { + var a = []; + for (var i = 0; i < 200; i++) + a.push(i); + var toAdd = []; + var step = 1; + for (var i = 0; i < 2500; i += step) { + for (var j = 0; j < step; j++) + toAdd.unshift(i + j); + a.unshift(...toAdd); + step = Math.max((i / 16)|0, 1); + } + assertEq(a.length, 41463); + assertEq(sum(a), 26657756); +} +test3(); diff --git a/js/src/jit-test/tests/basic/singleton.js b/js/src/jit-test/tests/basic/singleton.js new file mode 100644 index 0000000000..8e7c4c8faf --- /dev/null +++ b/js/src/jit-test/tests/basic/singleton.js @@ -0,0 +1,12 @@ + +var a = [1,2,3,4]; +var b = [{a:0,b:1},{a:0,b:1},{a:0,b:1}]; +var c = {a:0,b:4.5}; +var d = [1,2,3,true]; +var e = {a:0,b:1,c:2}; +var f = {a:0,b:1,c:true}; + +var w = JSON.parse('[1,2,3,4]'); +var x = JSON.parse('{"a":0,"b":true,"c":4.5}'); +var y = JSON.parse('{"d":true,"b":true,"c":4.5}'); +var z = JSON.parse('[{"a":0,"b":1},{"a":0,"b":1},{"a":0,"b":1}]'); diff --git a/js/src/jit-test/tests/basic/sleep-without-timeout.js b/js/src/jit-test/tests/basic/sleep-without-timeout.js new file mode 100644 index 0000000000..c912b18792 --- /dev/null +++ b/js/src/jit-test/tests/basic/sleep-without-timeout.js @@ -0,0 +1,6 @@ +// sleep() should work without timeout() prior to it. + +sleep(0.001); +sleep(0.01); +sleep(0.1); +sleep(1); diff --git a/js/src/jit-test/tests/basic/sparse-and-dense-elements.js b/js/src/jit-test/tests/basic/sparse-and-dense-elements.js new file mode 100644 index 0000000000..2c18c98f93 --- /dev/null +++ b/js/src/jit-test/tests/basic/sparse-and-dense-elements.js @@ -0,0 +1,20 @@ +function f(o) { + for (var i = 0; i < 40; i++) { + if ((i > 10 && (i % 2) === 0) || i > 30) { + Object.defineProperty(o, i, {value: i, enumerable: false, + writable: true, configurable: true}); + } else { + o[i] = i; + } + } + for (var i = 0; i < 15; i++) { + var sum = 0; + for (var j = 0; j < 40; j++) { + o[j]++; + sum += o[j]; + } + assertEq(sum, 820 + i * 40); + } +} +f({}); +f([]); diff --git a/js/src/jit-test/tests/basic/splice-675164.js b/js/src/jit-test/tests/basic/splice-675164.js new file mode 100644 index 0000000000..10d0d97887 --- /dev/null +++ b/js/src/jit-test/tests/basic/splice-675164.js @@ -0,0 +1,15 @@ +function NPList() {} +NPList.prototype = new Array; + +var list = new NPList(); +list.push('a'); + +var cut = list.splice(0, 1); + +assertEq(cut[0], 'a'); +assertEq(cut.length, 1); +assertEq(list.length, 0); + +var desc = Object.getOwnPropertyDescriptor(list, "0"); +assertEq(desc, undefined); +assertEq("0" in list, false); diff --git a/js/src/jit-test/tests/basic/splice-call-plain-object-590780.js b/js/src/jit-test/tests/basic/splice-call-plain-object-590780.js new file mode 100644 index 0000000000..4a0dc5d159 --- /dev/null +++ b/js/src/jit-test/tests/basic/splice-call-plain-object-590780.js @@ -0,0 +1,8 @@ +var o = { 0: 1, 1: 2, 2: 3, length: 3 }; +Array.prototype.splice.call(o, 0, 1); + +assertEq(o[0], 2); +assertEq(o[1], 3); +assertEq(Object.getOwnPropertyDescriptor(o, 2), undefined); +assertEq("2" in o, false); +assertEq(o.length, 2); diff --git a/js/src/jit-test/tests/basic/splice-check-steps.js b/js/src/jit-test/tests/basic/splice-check-steps.js new file mode 100644 index 0000000000..25985e9f32 --- /dev/null +++ b/js/src/jit-test/tests/basic/splice-check-steps.js @@ -0,0 +1,297 @@ +/* + * Check the order of splice's internal operations, because the ordering is + * visible externally. + */ + +function handlerMaker(expected_exceptions) { + var order = []; + function note(trap, name) + { + order.push(trap + '-' + name); + if (expected_exceptions[trap] === name) { + throw ("fail"); + } + } + + return [{ + /* this is the only trap we care about */ + deleteProperty: function(target, name) { + note("del", name); + return Reflect.deleteProperty(target, name); + }, + // derived traps + has: function(target, name) { + note("has", name); + return name in target; + }, + get: function(target, name, receiver) { + note("get", name); + return Reflect.get(target, name, receiver); + }, + set: function(target, name, value, receiver) { + note("set", name); + return Reflect.set(target, name, value, receiver); + }, + }, order]; +} + +// arr: the array to splice +// expected_order: the expected order of operations on arr, stringified +function check_splice_proxy(arr, expected_order, expected_exceptions, expected_array, expected_result) { + print (arr); + var [handler, store] = handlerMaker(expected_exceptions); + var proxy = new Proxy(arr, handler); + + try { + var args = Array.prototype.slice.call(arguments, 5); + var result = Array.prototype.splice.apply(proxy, args); + assertEq(Object.keys(expected_exceptions).length, 0); + } catch (e) { + assertEq(Object.keys(expected_exceptions).length > 0, true); + } + + // check the order of the property accesses, etc + assertEq(store.toString(), expected_order); + + // The deleted elements are returned in an object that's always an Array. + assertEq(Array.isArray(result) || result === undefined, true); + + // check the return value + for (var i in expected_result) { + assertEq(result[i], expected_result[i]); + } + for (var i in result) { + assertEq(result[i], expected_result[i]); + } + + // check the value of arr + for (var i in expected_array) { + assertEq(arr[i], expected_array[i]); + } + for (var i in arr) { + assertEq(arr[i], expected_array[i]); + } + + return result; +} + +// Shrinking array +check_splice_proxy( + [10,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "has-3,get-3,set-0,has-4,get-4,set-1,has-5,get-5,set-2," + + "del-5,del-4,del-3," + + "set-length", + {}, + [3,4,5], + [10,1,2], + 0, 3 +); + +// Growing array +check_splice_proxy( + [11,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "has-5,get-5,set-9,has-4,get-4,set-8,has-3,get-3,set-7," + + "set-0,set-1,set-2,set-3,set-4,set-5,set-6," + + "set-length", + {}, + [9,9,9,9,9,9,9,3,4,5], + [11,1,2], + 0, 3, 9, 9, 9, 9, 9, 9, 9 +); + +// Same sized array +check_splice_proxy( + [12,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "set-0,set-1,set-2," + + "set-length", + {}, + [9,9,9,3,4,5], + [12,1,2], + 0, 3, 9, 9, 9 +); + + +/* + * Check that if we fail at a particular step in the algorithm, we don't + * continue with the algorithm beyond that step. + */ + + +// Step 3: fail when getting length +check_splice_proxy( + [13,1,2,3,4,5], + "get-length", + {get: 'length'}, + [13,1,2,3,4,5], + undefined, + 0, 3, 9, 9, 9 +); + +// Step 9b: fail when [[HasProperty]] +check_splice_proxy( + [14,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1", + {has: '1'}, + [14,1,2,3,4,5], + undefined, + 0, 3, 9, 9, 9 +); + +// Step 9c(i): fail when [[Get]] +check_splice_proxy( + [15,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1", + {get: '1'}, + [15,1,2,3,4,5], + undefined, + 0, 3, 9, 9, 9 +); + +// Step 12b(iii): fail when [[HasProperty]] +check_splice_proxy( + [16,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "has-3,get-3,set-0,has-4", + {has: '4'}, + [3,1,2,3,4,5], + undefined, + 0, 3 +); + + +// Step 12b(iv)1: fail when [[Get]] +check_splice_proxy( + [17,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "has-3,get-3,set-0,has-4,get-4", + {get: '4'}, + [3,1,2,3,4,5], + undefined, + 0, 3 +); + + +// Step 12b(iv)2: fail when [[Put]] +check_splice_proxy( + [18,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "has-3,get-3,set-0,has-4,get-4,set-1", + {set: '1'}, + [3,1,2,3,4,5], + undefined, + 0, 3 +); + +// Step 12b(v)1: fail when [[Delete]] +check_splice_proxy( + [19,1,2,3,,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "has-3,get-3,set-0,has-4,del-1", + {del: '1'}, + [3,1,2,3,,5], + undefined, + 0, 3 +); + +// Step 12d(i): fail when [[Delete]] +check_splice_proxy( + [20,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "has-3,get-3,set-0,has-4,get-4,set-1,has-5,get-5,set-2," + + "del-5,del-4", + {del: '4'}, + [3,4,5,3,4], + undefined, + 0, 3 +); + +// Step 13b(iii): fail when [[HasProperty]] +check_splice_proxy( + [21,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "has-5,get-5,set-8,has-4", + {has: '4'}, + [21,1,2,3,4,5,,,5], + undefined, + 0, 3, 9,9,9,9,9,9 +); + + +// Step 13b(iv)1: fail when [[Get]] +check_splice_proxy( + [22,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "has-5,get-5,set-8,has-4,get-4", + {get: '4'}, + [22,1,2,3,4,5,,,5], + undefined, + 0, 3, 9,9,9,9,9,9 +); + + +// Step 13b(iv)2: fail when [[Put]] +check_splice_proxy( + [23,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "has-5,get-5,set-8,has-4,get-4,set-7", + {set: '7'}, + [23,1,2,3,4,5,,,5], + undefined, + 0, 3, 9,9,9,9,9,9 +); + +// Step 13b(v)1: fail when [[Delete]] +check_splice_proxy( + [24,1,2,3,,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "has-5,get-5,set-8,has-4,del-7", + {del: '7'}, + [24,1,2,3,,5,,,5], + undefined, + 0, 3, 9,9,9,9,9,9 +); + +// Step 15b: fail when [[Put]] +check_splice_proxy( + [25,1,2,3,4,5], + "get-length," + + "get-constructor," + + "has-0,get-0,has-1,get-1,has-2,get-2," + + "has-5,get-5,set-8,has-4,get-4,set-7,has-3,get-3,set-6," + + "set-0,set-1,set-2", + {set: '2'}, + [9,9,2,3,4,5,3,4,5], + undefined, + 0, 3, 9,9,9,9,9,9 +); diff --git a/js/src/jit-test/tests/basic/splice-delete-non-configurable-during-shrink.js b/js/src/jit-test/tests/basic/splice-delete-non-configurable-during-shrink.js new file mode 100644 index 0000000000..93dddb5cc6 --- /dev/null +++ b/js/src/jit-test/tests/basic/splice-delete-non-configurable-during-shrink.js @@ -0,0 +1,26 @@ +/* Test that splice causing deletion of a non-configurable property stops at exactly step 12(v) of ES5 15.4.4.12 */ + +var O = [1,2,3,4,5,6]; +var A = undefined; +Object.defineProperty(O, 3, { configurable: false }); + +try +{ + A = O.splice(0, 6); + throw new Error("didn't throw, returned " + A); +} +catch (e) +{ + assertEq(e instanceof TypeError, true, + "deleting O[3] should have caused a TypeError"); +} + +assertEq(O.length, 6); // setting length not reached +assertEq(A, undefined); // return value not reached + +assertEq(O[5], undefined); // deletion reached +assertEq(O[4], undefined); // deletion reached +assertEq(O[3], 4); // deletion caused exception +assertEq(O[2], 3); // deletion not reached +assertEq(O[1], 2); // deletion not reached +assertEq(O[0], 1); // deletion not reached diff --git a/js/src/jit-test/tests/basic/splice-fail-step-16.js b/js/src/jit-test/tests/basic/splice-fail-step-16.js new file mode 100644 index 0000000000..549ad0129d --- /dev/null +++ b/js/src/jit-test/tests/basic/splice-fail-step-16.js @@ -0,0 +1,25 @@ +/* Test that arrays resize normally during splice, even if .length is non-writable. */ + +var arr = [1, 2, 3, 4, 5, 6]; + +Object.defineProperty(arr, "length", {writable: false}); + +try +{ + var removed = arr.splice(3, 3, 9, 9, 9, 9); + throw new Error("splice didn't throw, returned [" + removed + "]"); +} +catch (e) +{ + assertEq(e instanceof TypeError, true, + "should have thrown a TypeError, instead threw " + e + ", arr is " + arr); +} + +// The exception should happen in step 16, which means we've already removed the array elements. +assertEq(arr[0], 1); +assertEq(arr[1], 2); +assertEq(arr[2], 3); +assertEq(arr[3], 9); +assertEq(arr[4], 9); +assertEq(arr[5], 9); +assertEq(arr.length, 6); diff --git a/js/src/jit-test/tests/basic/splice-huge-array-finishes.js b/js/src/jit-test/tests/basic/splice-huge-array-finishes.js new file mode 100644 index 0000000000..d894e50888 --- /dev/null +++ b/js/src/jit-test/tests/basic/splice-huge-array-finishes.js @@ -0,0 +1,15 @@ +// Making the array huge and sparse shouldn't leave us iterating through the entire array. +// But it does, sadly. Disable, because it takes too long. +if (0) { + var arr = [1, 2, 3, 4, 5, 6, 7, 8]; + arr.length = Math.pow(2, 32) - 2; + arr.splice(5); // also test overflow + + assertEq(arr.length, 5); + assertEq(arr[0], 1); + assertEq(arr[1], 2); + assertEq(arr[2], 3); + assertEq(arr[3], 4); + assertEq(arr[4], 5); + assertEq(arr[5], undefined); +} diff --git a/js/src/jit-test/tests/basic/splice-on-arguments.js b/js/src/jit-test/tests/basic/splice-on-arguments.js new file mode 100644 index 0000000000..e36522ae0c --- /dev/null +++ b/js/src/jit-test/tests/basic/splice-on-arguments.js @@ -0,0 +1,39 @@ +// test whether splice works on arguments + +function splice_args () { + args = arguments; + return Array.prototype.splice.apply(args, [0, 5]); +} + +var args; +var O = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; +var A = splice_args.apply(undefined, O) + +// args: [5, 6, 7, 8, 9] +assertEq(args[0], 5); +assertEq(args[1], 6); +assertEq(args[2], 7); +assertEq(args[3], 8); +assertEq(args[4], 9); +assertEq(args.length, 5); + +// A: [0, 1, 2, 3, 4] +assertEq(A[0], 0); +assertEq(A[1], 1); +assertEq(A[2], 2); +assertEq(A[3], 3); +assertEq(A[4], 4); +assertEq(A.length, 5); + +// O: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] +assertEq(O[0], 0); +assertEq(O[1], 1); +assertEq(O[2], 2); +assertEq(O[3], 3); +assertEq(O[4], 4); +assertEq(O[5], 5); +assertEq(O[6], 6); +assertEq(O[7], 7); +assertEq(O[8], 8); +assertEq(O[9], 9); +assertEq(O.length, 10); diff --git a/js/src/jit-test/tests/basic/splice-throwing-length-getter-668024.js b/js/src/jit-test/tests/basic/splice-throwing-length-getter-668024.js new file mode 100644 index 0000000000..695460b5c8 --- /dev/null +++ b/js/src/jit-test/tests/basic/splice-throwing-length-getter-668024.js @@ -0,0 +1,9 @@ +try +{ + Array.prototype.splice.call({ get length() { throw 'error'; } }); + throw new Error("should have thrown, didn't"); +} +catch (e) +{ + assertEq(e, "error", "wrong error thrown: " + e); +} diff --git a/js/src/jit-test/tests/basic/spread-array-bug842884.js b/js/src/jit-test/tests/basic/spread-array-bug842884.js new file mode 100644 index 0000000000..909bb5c6be --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-array-bug842884.js @@ -0,0 +1,5 @@ +load(libdir + "asserts.js"); + +assertThrowsInstanceOf(function () { + var [] = [x, ...d]; +}, ReferenceError); diff --git a/js/src/jit-test/tests/basic/spread-array-decompile.js b/js/src/jit-test/tests/basic/spread-array-decompile.js new file mode 100644 index 0000000000..10939664dd --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-array-decompile.js @@ -0,0 +1,14 @@ +var samples = [ + "[...a]", + "[...[1]]", + "[1, ...a, 2]", + "[1, ...[2, 3], 4]", + "[...[1], , ]", + "[1, , ...[2]]", + "[, 1, ...[2], ...[3], , 4, 5, , ]" +]; +for (var sample of samples) { + var source = "function f() {\n return " + sample + ";\n}"; + eval(source); + assertEq(f.toString(), source); +} diff --git a/js/src/jit-test/tests/basic/spread-array-evaluation-order.js b/js/src/jit-test/tests/basic/spread-array-evaluation-order.js new file mode 100644 index 0000000000..0887a05926 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-array-evaluation-order.js @@ -0,0 +1,12 @@ +load(libdir + "eqArrayHelper.js"); + +var check = []; +function t(token) { + check.push(token); + return token; +} +[3, ...[t(1)],, ...[t(2), t(3)], 34, 42, ...[t(4)]]; +assertEqArray(check, [1, 2, 3, 4]); + +var arr = [1, 2, 3]; +assertEqArray([...arr, arr.pop()], [1, 2, 3, 3]); diff --git a/js/src/jit-test/tests/basic/spread-array-invalid-syntax.js b/js/src/jit-test/tests/basic/spread-array-invalid-syntax.js new file mode 100644 index 0000000000..a7bcd5205a --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-array-invalid-syntax.js @@ -0,0 +1,19 @@ +load(libdir + "asserts.js"); + +var offenders = [ + "(1 ... n)", + "[1 ... n]", + "(...x)", + "[...x for (x of y)]", + "[...x, x for (x of y)]", + "[...]", + "(...)", + "[...,]", + "[... ...[]]", + "(... ...[])", + "[x, ...]", + "(x, ...)" +]; +for (var sample of offenders) { + assertThrowsInstanceOf(function () { eval(sample); }, SyntaxError); +} diff --git a/js/src/jit-test/tests/basic/spread-array-wrap.js b/js/src/jit-test/tests/basic/spread-array-wrap.js new file mode 100644 index 0000000000..84a57bdd94 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-array-wrap.js @@ -0,0 +1,5 @@ +load(libdir + "eqArrayHelper.js"); + +// XXX disabled bug 827449 +//assertEqArray([...wrap([1])], [1]); +//assertEqArray([1,, ...wrap([2, 3, 4]), 5, ...wrap([6])], [1,, 2, 3, 4, 5, 6]); diff --git a/js/src/jit-test/tests/basic/spread-array.js b/js/src/jit-test/tests/basic/spread-array.js new file mode 100644 index 0000000000..30d4cb52b4 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-array.js @@ -0,0 +1,50 @@ +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); +load(libdir + "eqArrayHelper.js"); + +assertEqArray([...[1, 2, 3]], [1, 2, 3]); +assertEqArray([1, ...[2, 3, 4], 5], [1, 2, 3, 4, 5]); +assertEqArray([1, ...[], 2], [1, 2]); +assertEqArray([1, ...[2, 3], 4, ...[5, 6]], [1, 2, 3, 4, 5, 6]); +assertEqArray([1, ...[], 2], [1, 2]); +assertEqArray([1,, ...[2]], [1,, 2]); +assertEqArray([1,, ...[2],, 3,, 4,], [1,, 2,, 3,, 4,]); +assertEqArray([...[1, 2, 3],,,,], [1, 2, 3,,,,]); +assertEqArray([,,...[1, 2, 3],,,,], [,,1,2,3,,,,]); +assertEqArray([...[1, 2, 3],,,,...[]], [1,2,3,,,,]); + +assertEqArray([...[undefined]], [undefined]); + +// other iterable objects +assertEqArray([...new Int32Array([1, 2, 3])], [1, 2, 3]); +assertEqArray([..."abc"], ["a", "b", "c"]); +assertEqArray([...[1, 2, 3][Symbol.iterator]()], [1, 2, 3]); +assertEqArray([...new Set([1, 2, 3])], [1, 2, 3]); +assertEqArray([...new Map([["a", "A"], ["b", "B"], ["c", "C"]])].map(([k, v]) => k + v), ["aA", "bB", "cC"]); +let itr = {}; +itr[Symbol.iterator] = function () { + return { + i: 1, + next: function() { + if (this.i < 4) + return { value: this.i++, done: false }; + else + return { value: undefined, done: true }; + } + }; +} +assertEqArray([...itr], [1, 2, 3]); +function* gen() { + for (let i = 1; i < 4; i ++) + yield i; +} +assertEqArray([...gen()], [1, 2, 3]); + +let a, b = [1, 2, 3]; +assertEqArray([...a=b], [1, 2, 3]); + +// 12.2.4.1.2 Runtime Semantics: ArrayAccumulation +// If Type(spreadObj) is not Object, then throw a TypeError exception. +assertThrowsInstanceOf(() => [...null], TypeError); +assertThrowsInstanceOf(() => [...undefined], TypeError); + diff --git a/js/src/jit-test/tests/basic/spread-call-eval.js b/js/src/jit-test/tests/basic/spread-call-eval.js new file mode 100644 index 0000000000..1fad8e7a59 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-eval.js @@ -0,0 +1,54 @@ +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +assertEq(eval(...[]), undefined); +assertEq(eval(...["1 + 2"]), 3); + +let a = 10, b = 1; +assertEq(eval(...["a + b"]), 11); + +(function() { + let a = 20; + assertEq(eval(...["a + b"]), 21); +})(); + +with ({ a: 30 }) { + assertEq(eval(...["a + b"]), 31); +} + +let line0 = Error().lineNumber; +try { // line0 + 1 + eval(...["("]); // line0 + 2 +} catch (e) { + assertEq(e.lineNumber, 1); +} + +// other iterable objects +assertEq(eval(...["a + b"][Symbol.iterator]()), 11); +assertEq(eval(...new Set(["a + b"])), 11); +let itr = {}; +itr[Symbol.iterator] = function() { + return { + i: 0, + next: function() { + this.i++; + if (this.i == 1) + return { value: "a + b", done: false }; + else + return { value: undefined, done: true }; + } + }; +}; +assertEq(eval(...itr), 11); +function* gen() { + yield "a + b"; +} +assertEq(eval(...gen()), 11); + +let c = ["C"], d = "D"; +assertEq(eval(...c=["c[0] + d"]), "c[0] + dD"); + +// 12.2.4.1.2 Runtime Semantics: ArrayAccumulation +// If Type(spreadObj) is not Object, then throw a TypeError exception. +assertThrowsInstanceOf(() => eval("a + b", ...null), TypeError); +assertThrowsInstanceOf(() => eval("a + b", ...undefined), TypeError); diff --git a/js/src/jit-test/tests/basic/spread-call-evaluation-order.js b/js/src/jit-test/tests/basic/spread-call-evaluation-order.js new file mode 100644 index 0000000000..2c2f53953c --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-evaluation-order.js @@ -0,0 +1,13 @@ +load(libdir + "eqArrayHelper.js"); + +var check = []; +function t(token) { + check.push(token); + return token; +} +let f = (...x) => x; +f(3, ...[t(1)], ...[t(2), t(3)], 34, 42, ...[t(4)]); +assertEqArray(check, [1, 2, 3, 4]); + +var arr = [1, 2, 3]; +assertEqArray(f(...arr, arr.pop()), [1, 2, 3, 3]); diff --git a/js/src/jit-test/tests/basic/spread-call-funapply.js b/js/src/jit-test/tests/basic/spread-call-funapply.js new file mode 100644 index 0000000000..a285d4e827 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-funapply.js @@ -0,0 +1,88 @@ +load(libdir + "asserts.js"); +load(libdir + "eqArrayHelper.js"); +load(libdir + "iteration.js"); + +function checkCommon(f) { + assertEqArray(f.apply(null, ...[[1, 2, 3]]), [1, 2, 3]); + assertEqArray(f.apply(...[null], [1, 2, 3]), [1, 2, 3]); + assertEqArray(f.apply(...[null], ...[[1, 2, 3]]), [1, 2, 3]); + assertEqArray(f.apply(...[null, [1, 2, 3]]), [1, 2, 3]); + + // other iterable objects + assertEqArray(f.apply(...new Set([null, [1, 2, 3]])), [1, 2, 3]); + assertEqArray(f.apply(...[null, [1, 2, 3]][Symbol.iterator]()), [1, 2, 3]); + let itr = {}; + itr[Symbol.iterator] = function() { + return { + i: 0, + next: function() { + this.i++; + if (this.i == 1) + return { value: null, done: false }; + else if (this.i == 2) + return { value: [1, 2, 3], done: false }; + else + return { value: undefined, done: true }; + } + }; + }; + assertEqArray(f.apply(...itr), [1, 2, 3]); + function* gen() { + yield null; + yield [1, 2, 3]; + } + assertEqArray(f.apply(...gen()), [1, 2, 3]); + + let a; + assertEqArray(f.apply(null, ...a=[[1, 2, 3]]), [1, 2, 3]); + + // 12.2.4.1.2 Runtime Semantics: ArrayAccumulation + // If Type(spreadObj) is not Object, then throw a TypeError exception. + assertThrowsInstanceOf(() => f.apply(null, ...null, [1, 2, 3]), TypeError); + assertThrowsInstanceOf(() => f.apply(null, ...undefined, [1, 2, 3]), TypeError); +} + +function checkNormal(f) { + checkCommon(f); + + assertEqArray(f.apply(null, ...[[]]), [undefined, undefined, undefined]); + assertEqArray(f.apply(null, ...[[1]]), [1, undefined, undefined]); + assertEqArray(f.apply(null, ...[[1, 2]]), [1, 2, undefined]); + assertEqArray(f.apply(null, ...[[1, 2, 3, 4]]), [1, 2, 3]); + + assertEqArray(f.apply(null, ...[[undefined]]), [undefined, undefined, undefined]); +} + +checkNormal(function(a, b, c) { return [a, b, c]; }); +checkNormal((a, b, c) => [a, b, c]); + +function checkDefault(f) { + checkCommon(f); + + assertEqArray(f.apply(null, ...[[]]), [-1, -2, -3]); + assertEqArray(f.apply(null, ...[[1]]), [1, -2, -3]); + assertEqArray(f.apply(null, ...[[1, 2]]), [1, 2, -3]); + assertEqArray(f.apply(null, ...[[1, 2, 3, 4]]), [1, 2, 3]); + + assertEqArray(f.apply(null, ...[[undefined]]), [-1, -2, -3]); +} + +checkDefault(function(a = -1, b = -2, c = -3) { return [a, b, c]; }); +checkDefault((a = -1, b = -2, c = -3) => [a, b, c]); + +function checkRest(f) { + checkCommon(f); + + assertEqArray(f.apply(null, ...[[]]), []); + assertEqArray(f.apply(null, ...[[1]]), [1]); + assertEqArray(f.apply(null, ...[[1, 2]]), [1, 2]); + assertEqArray(f.apply(null, ...[[1, 2, 3, 4]]), [1, 2, 3, 4]); + + assertEqArray(f.apply(null, ...[[undefined]]), [undefined]); + + // other iterable objects + assertEqArray(f.apply(null, ...new Map([[["a", "A"], ["b", "B"]]])).map(([k, v]) => k + v), ["aA", "bB"]); +} + +checkRest(function(...x) { return x; }); +checkRest((...x) => x); diff --git a/js/src/jit-test/tests/basic/spread-call-funcall.js b/js/src/jit-test/tests/basic/spread-call-funcall.js new file mode 100644 index 0000000000..97edfb6599 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-funcall.js @@ -0,0 +1,11 @@ +load(libdir + "eqArrayHelper.js"); + +function check(f) { + assertEqArray(f.call(...[null], 1, 2, 3), [1, 2, 3]); + assertEqArray(f.call(...[null], 1, ...[2, 3], 4, ...[5, 6]), [1, 2, 3, 4, 5, 6]); + assertEqArray(f.call(...[null, 1], ...[2, 3], 4, ...[5, 6]), [1, 2, 3, 4, 5, 6]); + assertEqArray(f.call(...[null, 1, ...[2, 3], 4, ...[5, 6]]), [1, 2, 3, 4, 5, 6]); +} + +check(function(...x) { return x; }); +check((...x) => x); diff --git a/js/src/jit-test/tests/basic/spread-call-invalid-syntax.js b/js/src/jit-test/tests/basic/spread-call-invalid-syntax.js new file mode 100644 index 0000000000..c3288736d4 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-invalid-syntax.js @@ -0,0 +1,15 @@ +load(libdir + "asserts.js"); + +var offenders = [ + "f(1 ... n)", + "f(...x for (x in y))", + "f(...)", + "f(...,)", + "f(... ...[])", + "f(x, ...)", + "f(...x, x for (x in y))", + "f(x for (x in y), ...x)" +]; +for (var sample of offenders) { + assertThrowsInstanceOf(function() { eval(sample); }, SyntaxError); +} diff --git a/js/src/jit-test/tests/basic/spread-call-length.js b/js/src/jit-test/tests/basic/spread-call-length.js new file mode 100644 index 0000000000..1d84d046d8 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-length.js @@ -0,0 +1,52 @@ +load(libdir + 'iteration.js'); + +let makeCall = farg => Function("f", "arg", "return f(" + farg + ");"); +let makeFunCall = farg => Function("f", "arg", "return f.call(null, " + farg + ");"); +let makeNew = farg => Function("f", "arg", "return new f(" + farg + ").length;"); + +function checkLength(f, makeFn) { + assertEq(makeFn("...[1, 2, 3]")(f), 3); + assertEq(makeFn("1, ...[2], 3")(f), 3); + assertEq(makeFn("1, ...[2], ...[3]")(f), 3); + assertEq(makeFn("1, ...[2, 3]")(f), 3); + assertEq(makeFn("1, ...[], 2, 3")(f), 3); + + assertEq(makeFn("...[1]")(f), 1); + assertEq(makeFn("...[1, 2]")(f), 2); + assertEq(makeFn("...[1, 2, 3, 4]")(f), 4); + assertEq(makeFn("1, ...[2, 3, 4], 5")(f), 5); + + assertEq(makeFn("...[undefined]")(f), 1); + + // other iterable objects + assertEq(makeFn("...arg")(f, new Int32Array([1, 2, 3])), 3); + assertEq(makeFn("...arg")(f, "abc"), 3); + assertEq(makeFn("...arg")(f, [1, 2, 3][Symbol.iterator]()), 3); + assertEq(makeFn("...arg")(f, new Set([1, 2, 3])), 3); + assertEq(makeFn("...arg")(f, new Map([["a", "A"], ["b", "B"], ["c", "C"]])), 3); + let itr = {}; + itr[Symbol.iterator] = function() { + return { + i: 1, + next: function() { + if (this.i < 4) + return { value: this.i++, done: false }; + else + return { value: undefined, done: true }; + } + }; + } + assertEq(makeFn("...arg")(f, itr), 3); + function* gen() { + for (let i = 1; i < 4; i ++) + yield i; + } + assertEq(makeFn("...arg")(f, gen()), 3); +} + +checkLength(function(x) { return arguments.length; }, makeCall); +checkLength(function(x) { return arguments.length; }, makeFunCall); +function lengthClass(x) { + this.length = arguments.length; +} +checkLength(lengthClass, makeNew); diff --git a/js/src/jit-test/tests/basic/spread-call-maxarg.js b/js/src/jit-test/tests/basic/spread-call-maxarg.js new file mode 100644 index 0000000000..5ba6eef558 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-maxarg.js @@ -0,0 +1,71 @@ +// FIXME: ASAN and debug builds run this too slowly for now. +if (!getBuildConfiguration("debug") && !getBuildConfiguration("asan")) { + let longArray = []; + longArray.length = getMaxArgs() + 1; + let shortArray = []; + let a; + + let f = function() { + }; + + // Call_Scripted + // Optimized stub is used after some calls. + a = shortArray; + for (let i = 0; i < 4; i++) { + if (i == 3) { + a = longArray; + } + try { + f(...a); + } catch (e) { + assertEq(e.message, "too many function arguments"); + } + } + + // Call_Scripted (constructing) + a = shortArray; + for (let i = 0; i < 4; i++) { + if (i == 3) { + a = longArray; + } + try { + new f(...a); + } catch (e) { + assertEq(e.message, "too many constructor arguments"); + } + } + + // Call_Native + a = shortArray; + for (let i = 0; i < 4; i++) { + if (i == 3) { + a = longArray; + } + try { + Math.max(...a); + } catch (e) { + assertEq(e.message, "too many function arguments"); + } + } + + // Call_Native (constructing) + a = shortArray; + for (let i = 0; i < 4; i++) { + if (i == 3) { + a = longArray; + } + try { + new Date(...a); + } catch (e) { + assertEq(e.message, "too many constructor arguments"); + } + } + + // No optimized stub for eval. + a = longArray; + try { + eval(...a); + } catch (e) { + assertEq(e.message, "too many function arguments"); + } +} diff --git a/js/src/jit-test/tests/basic/spread-call-near-maxarg.js b/js/src/jit-test/tests/basic/spread-call-near-maxarg.js new file mode 100644 index 0000000000..0d2711c4c9 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-near-maxarg.js @@ -0,0 +1,71 @@ +// FIXME: ASAN and debug builds run this too slowly for now. +if (!getBuildConfiguration("debug") && !getBuildConfiguration("asan")) { + let longArray = []; + longArray.length = getMaxArgs() - 1; + let shortArray = []; + let a; + + let f = function() { + }; + + // Call_Scripted + // Optimized stub is used after some calls. + a = shortArray; + for (let i = 0; i < 4; i++) { + if (i == 3) { + a = longArray; + } + try { + f(...a); + } catch (e) { + assertEq(e.message, "too much recursion"); + } + } + + // Call_Scripted (constructing) + a = shortArray; + for (let i = 0; i < 4; i++) { + if (i == 3) { + a = longArray; + } + try { + new f(...a); + } catch (e) { + assertEq(e.message, "too much recursion"); + } + } + + // Call_Native + a = shortArray; + for (let i = 0; i < 4; i++) { + if (i == 3) { + a = longArray; + } + try { + Math.max(...a); + } catch (e) { + assertEq(e.message, "too much recursion"); + } + } + + // Call_Native (constructing) + a = shortArray; + for (let i = 0; i < 4; i++) { + if (i == 3) { + a = longArray; + } + try { + new Date(...a); + } catch (e) { + assertEq(e.message, "too much recursion"); + } + } + + // No optimized stub for eval. + a = longArray; + try { + eval(...a); + } catch (e) { + assertEq(e.message, "too much recursion"); + } +} diff --git a/js/src/jit-test/tests/basic/spread-call-new.js b/js/src/jit-test/tests/basic/spread-call-new.js new file mode 100644 index 0000000000..dd26ff958a --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-new.js @@ -0,0 +1,9 @@ +load(libdir + "eqArrayHelper.js"); + +function g(a, b, c) { + this.value = [a, b, c]; + assertEq(Object.getPrototypeOf(this), g.prototype); + assertEq(arguments.callee, g); +} + +assertEqArray(new g(...[1, 2, 3]).value, [1, 2, 3]); diff --git a/js/src/jit-test/tests/basic/spread-call-not-iterable.js b/js/src/jit-test/tests/basic/spread-call-not-iterable.js new file mode 100644 index 0000000000..969d99bccf --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-not-iterable.js @@ -0,0 +1,28 @@ +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +assertThrowsInstanceOf(() => Math.sin(...true), TypeError); +assertThrowsInstanceOf(() => Math.sin(...false), TypeError); +assertThrowsInstanceOf(() => Math.sin(...new Date()), TypeError); +assertThrowsInstanceOf(() => Math.sin(...Function("")), TypeError); +assertThrowsInstanceOf(() => Math.sin(...function () {}), TypeError); +assertThrowsInstanceOf(() => Math.sin(...(x => x)), TypeError); +assertThrowsInstanceOf(() => Math.sin(...1), TypeError); +assertThrowsInstanceOf(() => Math.sin(...{}), TypeError); +var foo = {} + +foo[Symbol.iterator] = 10; +assertThrowsInstanceOf(() => Math.sin(...foo), TypeError); + +foo[Symbol.iterator] = function() { return undefined; }; +assertThrowsInstanceOf(() => Math.sin(...foo), TypeError); + +foo[Symbol.iterator] = function() { return this; }; +assertThrowsInstanceOf(() => Math.sin(...foo), TypeError); + +foo[Symbol.iterator] = function() { return this; }; +foo.next = function() { throw 10; }; +assertThrowsValue(() => Math.sin(...foo), 10); + +assertThrowsInstanceOf(() => Math.sin(.../a/), TypeError); +assertThrowsInstanceOf(() => Math.sin(...new Error()), TypeError); diff --git a/js/src/jit-test/tests/basic/spread-call-optimized.js b/js/src/jit-test/tests/basic/spread-call-optimized.js new file mode 100644 index 0000000000..afb1368f13 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-optimized.js @@ -0,0 +1,26 @@ +// Call_Scripted +let f = function(a, b, c, d, e) { + return a * 10000 + b * 1000 + c * 100 + d * 10 + e; +}; +for (let i = 0; i < 4; i++) { + assertEq(f(...[1, 2, 3, 4, 5]), 12345); +} + +// Call_Scripted (constructing) +let A = function(a, b, c, d, e) { + this.v = a * 10000 + b * 1000 + c * 100 + d * 10 + e; +}; +for (let i = 0; i < 4; i++) { + assertEq(new A(...[1, 2, 3, 4, 5]).v, 12345); +} + +// Call_Native +for (let i = 0; i < 4; i++) { + assertEq(Math.max(...[1, 2, 3, 4, 5]), 5); +} + +// Call_Native (constructing) +for (let i = 0; i < 4; i++) { + assertEq(new Date(...[2014, 4, 28, 8, 16, 1]).getTime(), + new Date(2014, 4, 28, 8, 16, 1).getTime()); +} diff --git a/js/src/jit-test/tests/basic/spread-call-recursion.js b/js/src/jit-test/tests/basic/spread-call-recursion.js new file mode 100644 index 0000000000..5d7caa341a --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-recursion.js @@ -0,0 +1,18 @@ +let a = []; +a.length = 30; + +function check(f) { + try { + f(); + } catch (e) { + assertEq(e.message, "too much recursion"); + } +} + +let f = function() { return f(...a) + 1; }; +let g = () => g(...a) + 1; +let h = function() { return new h(...a) + 1; }; + +check(f); +check(g); +check(h); diff --git a/js/src/jit-test/tests/basic/spread-call-rest-lookup.js b/js/src/jit-test/tests/basic/spread-call-rest-lookup.js new file mode 100644 index 0000000000..d57d65e48b --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-rest-lookup.js @@ -0,0 +1,14 @@ +var count = 0; +var scope = { + get args() { + count++; + return ""; + } +}; + +with (scope) { + [].push(...args); +} + +// Ensure |args| is only looked up once. +assertEq(count, 1); diff --git a/js/src/jit-test/tests/basic/spread-call-rest.js b/js/src/jit-test/tests/basic/spread-call-rest.js new file mode 100644 index 0000000000..6907ed34ba --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-rest.js @@ -0,0 +1,73 @@ +// bug 1235092 +// Optimize spread call with rest parameter. + +load(libdir + "asserts.js"); + +function makeArray(...args) { + return args; +} + +// Optimizable Case. +function test(...args) { + return makeArray(...args); +} +assertDeepEq(test(1, 2, 3), [1, 2, 3]); + +// Not optimizable case 1: the array has hole. +function hole1(...args) { + args[4] = 5; + return makeArray(...args); +} +assertDeepEq(hole1(1, 2, 3), [1, 2, 3, undefined, 5]); + +function hole2(...args) { + args.length = 5; + return makeArray(...args); +} +assertDeepEq(hole2(1, 2, 3), [1, 2, 3, undefined, undefined]); + +function hole3(...args) { + delete args[1]; + return makeArray(...args); +} +assertDeepEq(hole3(1, 2, 3), [1, undefined, 3]); + +// Not optimizable case 2: array[@@iterator] is modified. +function modifiedIterator(...args) { + args[Symbol.iterator] = function*() { + for (let i = 0; i < this.length; i++) + yield this[i] * 10; + }; + return makeArray(...args); +} +assertDeepEq(modifiedIterator(1, 2, 3), [10, 20, 30]); + +// Not optimizable case 3: the array's prototype is modified. +function modifiedProto(...args) { + args.__proto__ = { + __proto__: Array.prototype, + *[Symbol.iterator]() { + for (let i = 0; i < this.length; i++) + yield this[i] * 10; + } + }; + return makeArray(...args); +} +assertDeepEq(modifiedProto(1, 2, 3), [10, 20, 30]); + +// Not optimizable case 4: Array.prototype[@@iterator] is modified. +let ArrayValues = Array.prototype[Symbol.iterator]; +Array.prototype[Symbol.iterator] = function*() { + for (let i = 0; i < this.length; i++) + yield this[i] * 10; +}; +assertDeepEq(test(1, 2, 3), [10, 20, 30]); +Array.prototype[Symbol.iterator] = ArrayValues; + +// Not optimizable case 5: %ArrayIteratorPrototype%.next is modified. +let ArrayIteratorPrototype = Object.getPrototypeOf(Array.prototype[Symbol.iterator]()); +let i = 1; +ArrayIteratorPrototype.next = function() { + return { done: i % 4 == 0, value: 10 * i++ }; +}; +assertDeepEq(test(1, 2, 3), [10, 20, 30]); diff --git a/js/src/jit-test/tests/basic/spread-call-setcall.js b/js/src/jit-test/tests/basic/spread-call-setcall.js new file mode 100644 index 0000000000..5a1100b8e9 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-setcall.js @@ -0,0 +1,29 @@ +load(libdir + "asserts.js"); + +function g() { +} + +let a = { + g: function() { + } +}; + +function check(expr) { + assertThrowsInstanceOf(Function(expr), ReferenceError); +} +function checkDestructuring(expr) { + assertThrowsInstanceOf(() => Function(expr), SyntaxError); +} + +check("g(...[]) = 1"); +check("a.g(...[]) = 1"); +check("eval(...['1']) = 1"); +check("g(...[]) ++"); +check("a.g(...[]) ++"); +check("eval(...['1']) ++"); +checkDestructuring("[g(...[])] = []"); +checkDestructuring("[a.g(...[])] = []"); +checkDestructuring("[eval(...['1'])] = []"); +checkDestructuring("({y: g(...[])} = 1)"); +checkDestructuring("({y: a.g(...[])} = 1)"); +checkDestructuring("({y: eval(...['1'])} = 1)"); diff --git a/js/src/jit-test/tests/basic/spread-call-this-strict.js b/js/src/jit-test/tests/basic/spread-call-this-strict.js new file mode 100644 index 0000000000..3c88b11176 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-this-strict.js @@ -0,0 +1,105 @@ +"use strict"; + +let global = this; +let p = {}; +let q = {}; + +let g1 = function() { + assertEq(this, undefined); +}; +g1(...[]); + +let g2 = x => { + assertEq(this, global); +}; +g2(...[]); + +let g3 = function() { + assertEq(this, p); +}; +g3.apply(p, ...[]); +g3.call(p, ...[]); + +g2.apply(p, ...[]); +g2.call(p, ...[]); + +let o = { + f1: function() { + assertEq(this, o); + + let g1 = function() { + assertEq(this, undefined); + }; + g1(...[]); + + let g2 = x => { + assertEq(this, o); + }; + g2(...[]); + + let g3 = function() { + assertEq(this, q); + }; + g3.apply(q, ...[]); + g3.call(q, ...[]); + + let g4 = x => { + assertEq(this, o); + }; + g4.apply(q, ...[]); + g4.call(q, ...[]); + }, + f2: x => { + assertEq(this, global); + let g1 = function() { + assertEq(this, undefined); + }; + g1(...[]); + + let g2 = x => { + assertEq(this, global); + }; + g2(...[]); + + let g3 = function() { + assertEq(this, q); + }; + g3.apply(q, ...[]); + g3.call(q, ...[]); + + let g4 = x => { + assertEq(this, global); + }; + g4.apply(q, ...[]); + g4.call(q, ...[]); + }, + f3: function() { + assertEq(this, p); + + let g1 = function() { + assertEq(this, undefined); + }; + g1(...[]); + + let g2 = x => { + assertEq(this, p); + }; + g2(...[]); + + let g3 = function() { + assertEq(this, q); + }; + g3.apply(q, ...[]); + g3.call(q, ...[]); + + let g4 = x => { + assertEq(this, p); + }; + g4.apply(q, ...[]); + g4.call(q, ...[]); + } +}; +o.f1(...[]); +o.f2(...[]); +o.f3.apply(p, ...[]); +o.f2.apply(p, ...[]); diff --git a/js/src/jit-test/tests/basic/spread-call-this.js b/js/src/jit-test/tests/basic/spread-call-this.js new file mode 100644 index 0000000000..7dac8ca62c --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-this.js @@ -0,0 +1,123 @@ +let global = this; +let p = {}; +let q = {}; + +let g1 = function() { + assertEq(this, global); + assertEq(arguments.callee, g1); +}; +g1(...[]); + +let g2 = x => { + assertEq(this, global); + // arguments.callee is unbound function object, and following assertion fails. + // see Bug 889158 + //assertEq(arguments.callee, g2); +}; +g2(...[]); + +let g3 = function() { + assertEq(this, p); + assertEq(arguments.callee, g3); +}; +g3.apply(p, ...[]); +g3.call(p, ...[]); + +g2.apply(p, ...[]); +g2.call(p, ...[]); + +let o = { + f1: function() { + assertEq(this, o); + assertEq(arguments.callee, o.f1); + + let g1 = function() { + assertEq(this, global); + assertEq(arguments.callee, g1); + }; + g1(...[]); + + let g2 = x => { + assertEq(this, o); + //assertEq(arguments.callee, g2); + }; + g2(...[]); + + let g3 = function() { + assertEq(this, q); + assertEq(arguments.callee, g3); + }; + g3.apply(q, ...[]); + g3.call(q, ...[]); + + let g4 = x => { + assertEq(this, o); + //assertEq(arguments.callee, g4); + }; + g4.apply(q, ...[]); + g4.call(q, ...[]); + }, + f2: x => { + assertEq(this, global); + //assertEq(arguments.callee, o.f2); + let g1 = function() { + assertEq(this, global); + assertEq(arguments.callee, g1); + }; + g1(...[]); + + let g2 = x => { + assertEq(this, global); + //assertEq(arguments.callee, g2); + }; + g2(...[]); + + let g3 = function() { + assertEq(this, q); + assertEq(arguments.callee, g3); + }; + g3.apply(q, ...[]); + g3.call(q, ...[]); + + let g4 = x => { + assertEq(this, global); + //assertEq(arguments.callee, g4); + }; + g4.apply(q, ...[]); + g4.call(q, ...[]); + }, + f3: function() { + assertEq(this, p); + assertEq(arguments.callee, o.f3); + + let g1 = function() { + assertEq(this, global); + assertEq(arguments.callee, g1); + }; + g1(...[]); + + let g2 = x => { + assertEq(this, p); + //assertEq(arguments.callee, g2); + }; + g2(...[]); + + let g3 = function() { + assertEq(this, q); + assertEq(arguments.callee, g3); + }; + g3.apply(q, ...[]); + g3.call(q, ...[]); + + let g4 = x => { + assertEq(this, p); + //assertEq(arguments.callee, g4); + }; + g4.apply(q, ...[]); + g4.call(q, ...[]); + } +}; +o.f1(...[]); +o.f2(...[]); +o.f3.apply(p, ...[]); +o.f2.apply(p, ...[]); diff --git a/js/src/jit-test/tests/basic/spread-call.js b/js/src/jit-test/tests/basic/spread-call.js new file mode 100644 index 0000000000..6604430733 --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call.js @@ -0,0 +1,110 @@ +load(libdir + "asserts.js"); +load(libdir + "eqArrayHelper.js"); +load(libdir + "iteration.js"); + +let makeCall = farg => Function("f", "arg", "return f(" + farg + ");"); +let makeFunCall = farg => Function("f", "arg", "return f.call(null, " + farg + ");"); +let makeNew = farg => Function("f", "arg", "return new f(" + farg + ").value;"); + +function checkCommon(f, makeFn) { + assertEqArray(makeFn("...[1, 2, 3]")(f), [1, 2, 3]); + assertEqArray(makeFn("1, ...[2], 3")(f), [1, 2, 3]); + assertEqArray(makeFn("1, ...[2], ...[3]")(f), [1, 2, 3]); + assertEqArray(makeFn("1, ...[2, 3]")(f), [1, 2, 3]); + assertEqArray(makeFn("1, ...[], 2, 3")(f), [1, 2, 3]); + + // other iterable objects + assertEqArray(makeFn("...arg")(f, new Int32Array([1, 2, 3])), [1, 2, 3]); + assertEqArray(makeFn("...arg")(f, "abc"), ["a", "b", "c"]); + assertEqArray(makeFn("...arg")(f, [1, 2, 3][Symbol.iterator]()), [1, 2, 3]); + assertEqArray(makeFn("...arg")(f, new Set([1, 2, 3])), [1, 2, 3]); + assertEqArray(makeFn("...arg")(f, new Map([["a", "A"], ["b", "B"], ["c", "C"]])).map(([k, v]) => k + v), ["aA", "bB", "cC"]); + let itr = {}; + itr[Symbol.iterator] = function() { + return { + i: 1, + next: function() { + if (this.i < 4) + return { value: this.i++, done: false }; + else + return { value: undefined, done: true }; + } + }; + }; + assertEqArray(makeFn("...arg")(f, itr), [1, 2, 3]); + function* gen() { + for (let i = 1; i < 4; i ++) + yield i; + } + assertEqArray(makeFn("...arg")(f, gen()), [1, 2, 3]); + + assertEqArray(makeFn("...arg=[1, 2, 3]")(f), [1, 2, 3]); + + // 12.2.4.1.2 Runtime Semantics: ArrayAccumulation + // If Type(spreadObj) is not Object, then throw a TypeError exception. + assertThrowsInstanceOf(makeFn("1, ...null, 2, 3"), TypeError); + assertThrowsInstanceOf(makeFn("1, ...undefined, 2, 3"), TypeError); +} + +function checkNormal(f, makeFn) { + checkCommon(f, makeFn); + + assertEqArray(makeFn("...[]")(f), [undefined, undefined, undefined]); + assertEqArray(makeFn("...[1]")(f), [1, undefined, undefined]); + assertEqArray(makeFn("...[1, 2]")(f), [1, 2, undefined]); + assertEqArray(makeFn("...[1, 2, 3, 4]")(f), [1, 2, 3]); + + assertEqArray(makeFn("...[undefined]")(f), [undefined, undefined, undefined]); +} + +checkNormal(function(a, b, c) { return [a, b, c]; }, makeCall); +checkNormal(function(a, b, c) { return [a, b, c]; }, makeFunCall); +checkNormal((a, b, c) => [a, b, c], makeCall); +checkNormal((a, b, c) => [a, b, c], makeFunCall); +function normalClass(a, b, c) { + this.value = [a, b, c]; + assertEq(Object.getPrototypeOf(this), normalClass.prototype); +} +checkNormal(normalClass, makeNew); + +function checkDefault(f, makeFn) { + checkCommon(f, makeFn); + + assertEqArray(makeFn("...[]")(f), [-1, -2, -3]); + assertEqArray(makeFn("...[1]")(f), [1, -2, -3]); + assertEqArray(makeFn("...[1, 2]")(f), [1, 2, -3]); + assertEqArray(makeFn("...[1, 2, 3, 4]")(f), [1, 2, 3]); + + assertEqArray(makeFn("...[undefined]")(f), [-1, -2, -3]); +} + +checkDefault(function(a = -1, b = -2, c = -3) { return [a, b, c]; }, makeCall); +checkDefault(function(a = -1, b = -2, c = -3) { return [a, b, c]; }, makeFunCall); +checkDefault((a = -1, b = -2, c = -3) => [a, b, c], makeCall); +checkDefault((a = -1, b = -2, c = -3) => [a, b, c], makeFunCall); +function defaultClass(a = -1, b = -2, c = -3) { + this.value = [a, b, c]; + assertEq(Object.getPrototypeOf(this), defaultClass.prototype); +} +checkDefault(defaultClass, makeNew); + +function checkRest(f, makeFn) { + checkCommon(f, makeFn); + + assertEqArray(makeFn("...[]")(f), []); + assertEqArray(makeFn("1, ...[2, 3, 4], 5")(f), [1, 2, 3, 4, 5]); + assertEqArray(makeFn("1, ...[], 2")(f), [1, 2]); + assertEqArray(makeFn("1, ...[2, 3], 4, ...[5, 6]")(f), [1, 2, 3, 4, 5, 6]); + + assertEqArray(makeFn("...[undefined]")(f), [undefined]); +} + +checkRest(function(...x) { return x; }, makeCall); +checkRest(function(...x) { return x; }, makeFunCall); +checkRest((...x) => x, makeCall); +checkRest((...x) => x, makeFunCall); +function restClass(...x) { + this.value = x; + assertEq(Object.getPrototypeOf(this), restClass.prototype); +} +checkRest(restClass, makeNew); diff --git a/js/src/jit-test/tests/basic/statement-after-return.js b/js/src/jit-test/tests/basic/statement-after-return.js new file mode 100644 index 0000000000..2a49c74577 --- /dev/null +++ b/js/src/jit-test/tests/basic/statement-after-return.js @@ -0,0 +1,496 @@ +// Warning should be shown for unreachable statement after return (bug 1151931). + +function testWarn(code, lineNumber, columnNumber) { + enableLastWarning(); + eval(code); + var warning = getLastWarning(); + assertEq(warning !== null, true, "warning should be caught for " + code); + assertEq(warning.name, "Warning"); + assertEq(warning.lineNumber, lineNumber); + assertEq(warning.columnNumber, columnNumber); + + clearLastWarning(); + Reflect.parse(code); + warning = getLastWarning(); + assertEq(warning !== null, true, "warning should be caught for " + code); + assertEq(warning.name, "Warning"); + // Warning generated by Reflect.parse has line/column number for Reflect.parse + // itself, not parsed code. + disableLastWarning(); +} + +function testPass(code) { + enableLastWarning(); + eval(code); + var warning = getLastWarning(); + assertEq(warning, null, "warning should not be caught for " + code); + + clearLastWarning(); + Reflect.parse(code); + warning = getLastWarning(); + assertEq(warning, null, "warning should not be caught for " + code); + disableLastWarning(); +} + +testPass(` +function f() { + return ( + 1 + 2 + ); +} +`); + +// unary expression +testWarn(` +function f() { + var i = 0; + return + ++i; +} +`, 5, 5); +testWarn(` +function f() { + var i = 0; + return + --i; +} +`, 5, 5); + +// array +testWarn(` +function f() { + return + [1, 2, 3]; +} +`, 4, 5); + +// block (object) +testWarn(` +function f() { + return + {x: 10}; +} +`, 4, 5); +testWarn(` +function f() { + return + { + method() + { + f(); + } + }; +} +`, 4, 3); + +// expression in paren +testWarn(` +function f() { + return + (1 + 2); +} +`, 4, 5); + +// name +testWarn(` +function f() { + return + f; +} +`, 4, 5); + +// binary expression +testWarn(` +function f() { + return + 1 + 2; +} +`, 4, 5); +testWarn(` +function f() { + return + .1 + .2; +} +`, 4, 5); + +// string +testWarn(` +function f() { + return + "foo"; +} +`, 4, 5); +testWarn(` +function f() { + return + "use struct"; +} +`, 4, 5); +testWarn(` +function f() { + return + 'foo'; +} +`, 4, 5); + +// template string +testWarn(` +function f() { + return + \`foo\${1 + 2}\`; +} +`, 4, 5); +testWarn(` +function f() { + return + \`foo\`; +} +`, 4, 5); + +// RegExp +testWarn(` +function f() { + return + /foo/; +} +`, 4, 5); + +// boolean +testWarn(` +function f() { + return + true; +} +`, 4, 5); +testWarn(` +function f() { + return + false; +} +`, 4, 5); + +// null +testWarn(` +function f() { + return + null; +} +`, 4, 5); + +// this +testWarn(` +function f() { + return + this; +} +`, 4, 5); + +// new +testWarn(` +function f() { + return + new Array(); +} +`, 4, 5); + +// delete +testWarn(` +function f() { + var a = {x: 10}; + return + delete a.x; +} +`, 5, 5); + +// yield +testWarn(` +function* f() { + return + yield 1; +} +`, 4, 5); + +// class +testWarn(` +function f() { + return + class A { constructor() {} }; +} +`, 4, 5); + +// unary expression +testWarn(` +function f() { + return + +1; +} +`, 4, 5); +testWarn(` +function f() { + return + -1; +} +`, 4, 5); +testWarn(` +function f() { + return + !1; +} +`, 4, 5); +testWarn(` +function f() { + return + ~1; +} +`, 4, 5); + +// eof +testPass(` +var f = new Function("return\\n"); +`); + +// empty statement +testPass(` +function f() { + return; + ; // empty statement +} +`); + +// end of block +testPass(` +function f() { + { + return + } +} +`); + +// function (hosted) +testPass(` +function f() { + g(); + return + function g() {} +} +`); + +// if +testWarn(` +function f() { + return + if (true) + 1 + 2; +} +`, 4, 3); + +// else +testPass(` +function f() { + if (true) + return + else + 1 + 2; +} +`); + +// switch +testWarn(` +function f() { + return + switch (1) { + case 1: + break; + } +} +`, 4, 3); + +// return in switch +testWarn(` +function f() { + switch (1) { + case 1: + return; + 1 + 2; + break; + } +} +`, 6, 7); + +// break in switch +testPass(` +function f() { + switch (1) { + case 1: + return; + break; + } +} +`); + +// case +testPass(` +function f() { + switch (1) { + case 0: + return + case 1: + break; + } +} +`); + +// default +testPass(` +function f() { + switch (1) { + case 0: + return + default: + break; + } +} +`); + +// while +testWarn(` +function f() { + return + while (false) + 1 + 2; +} +`, 4, 3); +testPass(` +function f() { + do + return + while (false); +} +`); + +// do +testWarn(` +function f() { + return + do { + 1 + 2; + } while (false); +} +`, 4, 3); + +// for +testWarn(` +function f() { + return + for (;;) { + break; + } +} +`, 4, 3); + +// break in for +testPass(` +function f() { + for (;;) { + return + break; + } +} +`, 5, 5); + +// continue +testWarn(` +function f() { + for (;;) { + return + continue; + } +} +`, 5, 5); + +// var (hosted) +testPass(` +function f() { + return + var a = 1; +} +`); + +// const +testWarn(` +function f() { + return + const a = 1; +} +`, 4, 3); + +// with +testWarn(` +function f() { + return + with ({}) { + 1; + } +} +`, 4, 3); + +// return +testWarn(` +function f() { + return + return; +} +`, 4, 3); + +// try +testWarn(` +function f() { + return + try { + } catch (e) { + } +} +`, 4, 3); + +// throw +testPass(` +function f() { + return + throw 1; +} +`); + +// debugger +testWarn(` +function f() { + return + debugger; +} +`, 4, 3); + +// let +testWarn(` +function f() { + return + let a = 1; +} +`, 4, 3); + +// skip hoisted + +testWarn(` +function f() { + return + var a = 0; + (1 + 2); +} +`, 5, 3); + +testWarn(` +function f() { + return + function f() {} + var a = 0; + (1 + 2); +} +`, 6, 3); diff --git a/js/src/jit-test/tests/basic/str-atom-cache-extensible.js b/js/src/jit-test/tests/basic/str-atom-cache-extensible.js new file mode 100644 index 0000000000..bee8f13847 --- /dev/null +++ b/js/src/jit-test/tests/basic/str-atom-cache-extensible.js @@ -0,0 +1,15 @@ +// Create an extensible string. +var extensible = "foo".repeat(50); +extensible += "bar"; +extensible.indexOf("X"); + +// Ensure it's in the StringToAtomCache. +var obj = {}; +obj[extensible] = 1; + +// Make it a dependent string. +var other = extensible + "baz"; +other.indexOf("X"); + +// Must still be in the cache. +obj[extensible] = 1; diff --git a/js/src/jit-test/tests/basic/strict-catch-ident-syntax.js b/js/src/jit-test/tests/basic/strict-catch-ident-syntax.js new file mode 100644 index 0000000000..2058e5aa29 --- /dev/null +++ b/js/src/jit-test/tests/basic/strict-catch-ident-syntax.js @@ -0,0 +1,9 @@ +/* Parse correctly. */ + +function assignToClassListStrict(e) { + "use strict"; + try { + e.classList = "foo"; + ok(false, "assigning to classList didn't throw"); + } catch (e) { } +} diff --git a/js/src/jit-test/tests/basic/strict-compare-same-operands.js b/js/src/jit-test/tests/basic/strict-compare-same-operands.js new file mode 100644 index 0000000000..57ca425054 --- /dev/null +++ b/js/src/jit-test/tests/basic/strict-compare-same-operands.js @@ -0,0 +1,49 @@ +function f(l, m) { + var a = NaN; + var b = 13; + var c = "test"; + var d = undefined; + var e = null; + var f = 15.7; + var g = Math.fround(189777.111); + var h = "ABC"; + var i = String.fromCharCode(65, 65, 65); + var j = {}; + var k = Math.fround("".charCodeAt(15)); + + // Special case rigt here: + assertEq(a === a, false); + assertEq(a !== a, true); + assertEq(k === k, false); + assertEq(k !== k, true); + assertEq(l === l, false); + assertEq(l !== l, true); + + assertEq(b === b, true); + assertEq(b !== b, false); + assertEq(c === c, true); + assertEq(c !== c, false); + assertEq(d === d, true); + assertEq(d !== d, false); + assertEq(e === e, true); + assertEq(e !== e, false); + assertEq(f === f, true); + assertEq(f !== f, false); + assertEq(g === g, true); + assertEq(g !== g, false); + assertEq(h === h, true); + assertEq(h !== h, false); + assertEq(i === i, true); + assertEq(i !== i, false); + assertEq(j === j, true); + assertEq(j !== j, false); + assertEq(m === m, true); + assertEq(m !== m, false); +} + +function test() { + for (var i = 0; i < 100; i++) + f("".charCodeAt(15), 42); +} + +test(); diff --git a/js/src/jit-test/tests/basic/strict-eval-loop-error.js b/js/src/jit-test/tests/basic/strict-eval-loop-error.js new file mode 100644 index 0000000000..f09ad44028 --- /dev/null +++ b/js/src/jit-test/tests/basic/strict-eval-loop-error.js @@ -0,0 +1,3 @@ +var COUNT = 9; +eval("'use strict'; for (let j = 0; j < COUNT; j++); try { x; throw new Error(); } catch (e) { if (!(e instanceof ReferenceError)) throw e; }"); +assertEq(typeof j, "undefined"); diff --git a/js/src/jit-test/tests/basic/strictParseIntOctal.js b/js/src/jit-test/tests/basic/strictParseIntOctal.js new file mode 100644 index 0000000000..59412f3179 --- /dev/null +++ b/js/src/jit-test/tests/basic/strictParseIntOctal.js @@ -0,0 +1,16 @@ +"use strict"; + +assertEq(parseInt("08"), 8); +assertEq(parseInt("09"), 9); +assertEq(parseInt("014"), 14); +assertEq(parseInt("0xA"), 10); +assertEq(parseInt("00123"), 123); + +for (var i = 0; i < 5; i++) +{ + assertEq(parseInt("08"), 8); + assertEq(parseInt("09"), 9); + assertEq(parseInt("014"), 14); + assertEq(parseInt("0xA"), 10); + assertEq(parseInt("00123"), 123); +} diff --git a/js/src/jit-test/tests/basic/string-endswith.js b/js/src/jit-test/tests/basic/string-endswith.js new file mode 100644 index 0000000000..6ba5a4f5d3 --- /dev/null +++ b/js/src/jit-test/tests/basic/string-endswith.js @@ -0,0 +1,262 @@ +/* +* Copyright (c) 2013 Mathias Bynens. All rights reserved. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. +*/ + +function assertThrows(fun, errorType) { + try { + fun(); + assertEq(true, false, "Expected error, but none was thrown"); + } catch (e) { + assertEq(e instanceof errorType, true, "Wrong error type thrown"); + } +} +assertEq(String.prototype.endsWith.length, 1); +assertEq(String.prototype.propertyIsEnumerable('endsWith'), false); + +assertEq('undefined'.endsWith(), true); +assertEq('undefined'.endsWith(undefined), true); +assertEq('undefined'.endsWith(null), false); +assertEq('null'.endsWith(), false); +assertEq('null'.endsWith(undefined), false); +assertEq('null'.endsWith(null), true); + +assertEq('abc'.endsWith(), false); +assertEq('abc'.endsWith(''), true); +assertEq('abc'.endsWith('\0'), false); +assertEq('abc'.endsWith('c'), true); +assertEq('abc'.endsWith('b'), false); +assertEq('abc'.endsWith('a'), false); +assertEq('abc'.endsWith('ab'), false); +assertEq('abc'.endsWith('bc'), true); +assertEq('abc'.endsWith('abc'), true); +assertEq('abc'.endsWith('bcd'), false); +assertEq('abc'.endsWith('abcd'), false); +assertEq('abc'.endsWith('bcde'), false); + +assertEq('abc'.endsWith('', NaN), true); +assertEq('abc'.endsWith('\0', NaN), false); +assertEq('abc'.endsWith('c', NaN), false); +assertEq('abc'.endsWith('b', NaN), false); +assertEq('abc'.endsWith('a', NaN), false); +assertEq('abc'.endsWith('ab', NaN), false); +assertEq('abc'.endsWith('bc', NaN), false); +assertEq('abc'.endsWith('abc', NaN), false); +assertEq('abc'.endsWith('bcd', NaN), false); +assertEq('abc'.endsWith('abcd', NaN), false); +assertEq('abc'.endsWith('bcde', NaN), false); + +assertEq('abc'.endsWith('', false), true); +assertEq('abc'.endsWith('\0', false), false); +assertEq('abc'.endsWith('c', false), false); +assertEq('abc'.endsWith('b', false), false); +assertEq('abc'.endsWith('a', false), false); +assertEq('abc'.endsWith('ab', false), false); +assertEq('abc'.endsWith('bc', false), false); +assertEq('abc'.endsWith('abc', false), false); +assertEq('abc'.endsWith('bcd', false), false); +assertEq('abc'.endsWith('abcd', false), false); +assertEq('abc'.endsWith('bcde', false), false); + +assertEq('abc'.endsWith('', undefined), true); +assertEq('abc'.endsWith('\0', undefined), false); +assertEq('abc'.endsWith('c', undefined), true); +assertEq('abc'.endsWith('b', undefined), false); +assertEq('abc'.endsWith('a', undefined), false); +assertEq('abc'.endsWith('ab', undefined), false); +assertEq('abc'.endsWith('bc', undefined), true); +assertEq('abc'.endsWith('abc', undefined), true); +assertEq('abc'.endsWith('bcd', undefined), false); +assertEq('abc'.endsWith('abcd', undefined), false); +assertEq('abc'.endsWith('bcde', undefined), false); + +assertEq('abc'.endsWith('', null), true); +assertEq('abc'.endsWith('\0', null), false); +assertEq('abc'.endsWith('c', null), false); +assertEq('abc'.endsWith('b', null), false); +assertEq('abc'.endsWith('a', null), false); +assertEq('abc'.endsWith('ab', null), false); +assertEq('abc'.endsWith('bc', null), false); +assertEq('abc'.endsWith('abc', null), false); +assertEq('abc'.endsWith('bcd', null), false); +assertEq('abc'.endsWith('abcd', null), false); +assertEq('abc'.endsWith('bcde', null), false); + +assertEq('abc'.endsWith('', -Infinity), true); +assertEq('abc'.endsWith('\0', -Infinity), false); +assertEq('abc'.endsWith('c', -Infinity), false); +assertEq('abc'.endsWith('b', -Infinity), false); +assertEq('abc'.endsWith('a', -Infinity), false); +assertEq('abc'.endsWith('ab', -Infinity), false); +assertEq('abc'.endsWith('bc', -Infinity), false); +assertEq('abc'.endsWith('abc', -Infinity), false); +assertEq('abc'.endsWith('bcd', -Infinity), false); +assertEq('abc'.endsWith('abcd', -Infinity), false); +assertEq('abc'.endsWith('bcde', -Infinity), false); + +assertEq('abc'.endsWith('', -1), true); +assertEq('abc'.endsWith('\0', -1), false); +assertEq('abc'.endsWith('c', -1), false); +assertEq('abc'.endsWith('b', -1), false); +assertEq('abc'.endsWith('a', -1), false); +assertEq('abc'.endsWith('ab', -1), false); +assertEq('abc'.endsWith('bc', -1), false); +assertEq('abc'.endsWith('abc', -1), false); +assertEq('abc'.endsWith('bcd', -1), false); +assertEq('abc'.endsWith('abcd', -1), false); +assertEq('abc'.endsWith('bcde', -1), false); + +assertEq('abc'.endsWith('', -0), true); +assertEq('abc'.endsWith('\0', -0), false); +assertEq('abc'.endsWith('c', -0), false); +assertEq('abc'.endsWith('b', -0), false); +assertEq('abc'.endsWith('a', -0), false); +assertEq('abc'.endsWith('ab', -0), false); +assertEq('abc'.endsWith('bc', -0), false); +assertEq('abc'.endsWith('abc', -0), false); +assertEq('abc'.endsWith('bcd', -0), false); +assertEq('abc'.endsWith('abcd', -0), false); +assertEq('abc'.endsWith('bcde', -0), false); + +assertEq('abc'.endsWith('', +0), true); +assertEq('abc'.endsWith('\0', +0), false); +assertEq('abc'.endsWith('c', +0), false); +assertEq('abc'.endsWith('b', +0), false); +assertEq('abc'.endsWith('a', +0), false); +assertEq('abc'.endsWith('ab', +0), false); +assertEq('abc'.endsWith('bc', +0), false); +assertEq('abc'.endsWith('abc', +0), false); +assertEq('abc'.endsWith('bcd', +0), false); +assertEq('abc'.endsWith('abcd', +0), false); +assertEq('abc'.endsWith('bcde', +0), false); + +assertEq('abc'.endsWith('', 1), true); +assertEq('abc'.endsWith('\0', 1), false); +assertEq('abc'.endsWith('c', 1), false); +assertEq('abc'.endsWith('b', 1), false); +assertEq('abc'.endsWith('ab', 1), false); +assertEq('abc'.endsWith('bc', 1), false); +assertEq('abc'.endsWith('abc', 1), false); +assertEq('abc'.endsWith('bcd', 1), false); +assertEq('abc'.endsWith('abcd', 1), false); +assertEq('abc'.endsWith('bcde', 1), false); + +assertEq('abc'.endsWith('', 2), true); +assertEq('abc'.endsWith('\0', 2), false); +assertEq('abc'.endsWith('c', 2), false); +assertEq('abc'.endsWith('b', 2), true); +assertEq('abc'.endsWith('ab', 2), true); +assertEq('abc'.endsWith('bc', 2), false); +assertEq('abc'.endsWith('abc', 2), false); +assertEq('abc'.endsWith('bcd', 2), false); +assertEq('abc'.endsWith('abcd', 2), false); +assertEq('abc'.endsWith('bcde', 2), false); + +assertEq('abc'.endsWith('', +Infinity), true); +assertEq('abc'.endsWith('\0', +Infinity), false); +assertEq('abc'.endsWith('c', +Infinity), true); +assertEq('abc'.endsWith('b', +Infinity), false); +assertEq('abc'.endsWith('a', +Infinity), false); +assertEq('abc'.endsWith('ab', +Infinity), false); +assertEq('abc'.endsWith('bc', +Infinity), true); +assertEq('abc'.endsWith('abc', +Infinity), true); +assertEq('abc'.endsWith('bcd', +Infinity), false); +assertEq('abc'.endsWith('abcd', +Infinity), false); +assertEq('abc'.endsWith('bcde', +Infinity), false); + +assertEq('abc'.endsWith('', true), true); +assertEq('abc'.endsWith('\0', true), false); +assertEq('abc'.endsWith('c', true), false); +assertEq('abc'.endsWith('b', true), false); +assertEq('abc'.endsWith('ab', true), false); +assertEq('abc'.endsWith('bc', true), false); +assertEq('abc'.endsWith('abc', true), false); +assertEq('abc'.endsWith('bcd', true), false); +assertEq('abc'.endsWith('abcd', true), false); +assertEq('abc'.endsWith('bcde', true), false); + +assertEq('abc'.endsWith('', 'x'), true); +assertEq('abc'.endsWith('\0', 'x'), false); +assertEq('abc'.endsWith('c', 'x'), false); +assertEq('abc'.endsWith('b', 'x'), false); +assertEq('abc'.endsWith('a', 'x'), false); +assertEq('abc'.endsWith('ab', 'x'), false); +assertEq('abc'.endsWith('bc', 'x'), false); +assertEq('abc'.endsWith('abc', 'x'), false); +assertEq('abc'.endsWith('bcd', 'x'), false); +assertEq('abc'.endsWith('abcd', 'x'), false); +assertEq('abc'.endsWith('bcde', 'x'), false); + +assertEq('[a-z]+(bar)?'.endsWith('(bar)?'), true); +assertThrows(function() { '[a-z]+(bar)?'.endsWith(/(bar)?/); }, TypeError); +assertEq('[a-z]+(bar)?'.endsWith('[a-z]+', 6), true); +assertThrows(function() { '[a-z]+(bar)?'.endsWith(/(bar)?/); }, TypeError); +assertThrows(function() { '[a-z]+/(bar)?/'.endsWith(/(bar)?/); }, TypeError); +var global = newGlobal(); +global.eval('this.re = /(bar)?/'); +assertThrows(function() { '[a-z]+/(bar)?/'.endsWith(global.re); }, TypeError); + +// http://mathiasbynens.be/notes/javascript-unicode#poo-test +var string = 'I\xF1t\xEBrn\xE2ti\xF4n\xE0liz\xE6ti\xF8n\u2603\uD83D\uDCA9'; +assertEq(string.endsWith(''), true); +assertEq(string.endsWith('\xF1t\xEBr'), false); +assertEq(string.endsWith('\xF1t\xEBr', 5), true); +assertEq(string.endsWith('\xE0liz\xE6'), false); +assertEq(string.endsWith('\xE0liz\xE6', 16), true); +assertEq(string.endsWith('\xF8n\u2603\uD83D\uDCA9'), true); +assertEq(string.endsWith('\xF8n\u2603\uD83D\uDCA9', 23), true); +assertEq(string.endsWith('\u2603'), false); +assertEq(string.endsWith('\u2603', 21), true); +assertEq(string.endsWith('\uD83D\uDCA9'), true); +assertEq(string.endsWith('\uD83D\uDCA9', 23), true); + +assertThrows(function() { String.prototype.endsWith.call(undefined); }, TypeError); +assertThrows(function() { String.prototype.endsWith.call(undefined, 'b'); }, TypeError); +assertThrows(function() { String.prototype.endsWith.call(undefined, 'b', 4); }, TypeError); +assertThrows(function() { String.prototype.endsWith.call(null); }, TypeError); +assertThrows(function() { String.prototype.endsWith.call(null, 'b'); }, TypeError); +assertThrows(function() { String.prototype.endsWith.call(null, 'b', 4); }, TypeError); +assertEq(String.prototype.endsWith.call(42, '2'), true); +assertEq(String.prototype.endsWith.call(42, '4'), false); +assertEq(String.prototype.endsWith.call(42, 'b', 4), false); +assertEq(String.prototype.endsWith.call(42, '2', 1), false); +assertEq(String.prototype.endsWith.call(42, '2', 4), true); +assertEq(String.prototype.endsWith.call({ 'toString': function() { return 'abc'; } }, 'b', 0), false); +assertEq(String.prototype.endsWith.call({ 'toString': function() { return 'abc'; } }, 'b', 1), false); +assertEq(String.prototype.endsWith.call({ 'toString': function() { return 'abc'; } }, 'b', 2), true); +assertThrows(function() { String.prototype.endsWith.call({ 'toString': function() { throw RangeError(); } }, /./); }, RangeError); +assertThrows(function() { String.prototype.endsWith.call({ 'toString': function() { return 'abc' } }, /./); }, TypeError); + +assertThrows(function() { String.prototype.endsWith.apply(undefined); }, TypeError); +assertThrows(function() { String.prototype.endsWith.apply(undefined, ['b']); }, TypeError); +assertThrows(function() { String.prototype.endsWith.apply(undefined, ['b', 4]); }, TypeError); +assertThrows(function() { String.prototype.endsWith.apply(null); }, TypeError); +assertThrows(function() { String.prototype.endsWith.apply(null, ['b']); }, TypeError); +assertThrows(function() { String.prototype.endsWith.apply(null, ['b', 4]); }, TypeError); +assertEq(String.prototype.endsWith.apply(42, ['2']), true); +assertEq(String.prototype.endsWith.apply(42, ['4']), false); +assertEq(String.prototype.endsWith.apply(42, ['b', 4]), false); +assertEq(String.prototype.endsWith.apply(42, ['2', 1]), false); +assertEq(String.prototype.endsWith.apply(42, ['2', 4]), true); +assertEq(String.prototype.endsWith.apply({ 'toString': function() { return 'abc'; } }, ['b', 0]), false); +assertEq(String.prototype.endsWith.apply({ 'toString': function() { return 'abc'; } }, ['b', 1]), false); +assertEq(String.prototype.endsWith.apply({ 'toString': function() { return 'abc'; } }, ['b', 2]), true); +assertThrows(function() { String.prototype.endsWith.apply({ 'toString': function() { throw RangeError(); } }, [/./]); }, RangeError); +assertThrows(function() { String.prototype.endsWith.apply({ 'toString': function() { return 'abc' } }, [/./]); }, TypeError); diff --git a/js/src/jit-test/tests/basic/string-includes.js b/js/src/jit-test/tests/basic/string-includes.js new file mode 100644 index 0000000000..f41b0c6d78 --- /dev/null +++ b/js/src/jit-test/tests/basic/string-includes.js @@ -0,0 +1,46 @@ +assertEq("abc".includes("a"), true); +assertEq("abc".includes("b"), true); +assertEq("abc".includes("abc"), true); +assertEq("abc".includes("bc"), true); +assertEq("abc".includes("d"), false); +assertEq("abc".includes("abcd"), false); +assertEq("abc".includes("ac"), false); +assertEq("abc".includes("abc", 0), true); +assertEq("abc".includes("bc", 0), true); +assertEq("abc".includes("de", 0), false); +assertEq("abc".includes("bc", 1), true); +assertEq("abc".includes("c", 1), true); +assertEq("abc".includes("a", 1), false); +assertEq("abc".includes("abc", 1), false); +assertEq("abc".includes("c", 2), true); +assertEq("abc".includes("d", 2), false); +assertEq("abc".includes("dcd", 2), false); +assertEq("abc".includes("a", 42), false); +assertEq("abc".includes("a", Infinity), false); +assertEq("abc".includes("ab", -43), true); +assertEq("abc".includes("cd", -42), false); +assertEq("abc".includes("ab", -Infinity), true); +assertEq("abc".includes("cd", -Infinity), false); +assertEq("abc".includes("ab", NaN), true); +assertEq("abc".includes("cd", NaN), false); +var myobj = {toString : () => "abc", includes : String.prototype.includes}; +assertEq(myobj.includes("abc"), true); +assertEq(myobj.includes("cd"), false); +var gotStr = false, gotPos = false; +myobj = {toString : (function () { + assertEq(gotPos, false); + gotStr = true; + return "xyz"; +}), +includes : String.prototype.includes}; +var idx = {valueOf : (function () { + assertEq(gotStr, true); + gotPos = true; + return 42; +})}; +myobj.includes("elephant", idx); +assertEq(gotPos, true); +assertEq("xyzzy".includes("zy\0", 2), false); +var dots = Array(10000).join('.'); +assertEq(dots.includes("\x01", 10000), false); +assertEq(dots.includes("\0", 10000), false); diff --git a/js/src/jit-test/tests/basic/string-index.js b/js/src/jit-test/tests/basic/string-index.js new file mode 100644 index 0000000000..aee56e4647 --- /dev/null +++ b/js/src/jit-test/tests/basic/string-index.js @@ -0,0 +1,86 @@ +function basic() { + var zero = "0"; + var one = "1"; + var thousand = String(1000); + var max = String(0xffff); + + assertEq(zero, "0"); + assertEq(Number(zero), 0); + assertEq(String(Number(zero)), "0"); + + assertEq(one, "1"); + assertEq(Number(one), 1); + assertEq(String(Number(one)), "1"); + + assertEq(thousand, "1000"); + assertEq(Number(thousand), 1000); + assertEq(String(Number(thousand)), "1000"); + + assertEq(max, "65535"); + assertEq(Number(max), 0xffff); + assertEq(String(Number(max)), "65535"); +} + +function index() { + var zero = "0"; + var trippleZero = "000"; + + var seven = "7"; + var doubleOhSeven = "007"; + + var object = {0: "a", "000": "b"}; + var object2 = {7: "a", "007": "b"}; + + var array = ["a"]; + array[trippleZero] = "b"; + var array2 = [0, 1, 2, 3, 4, 5, 6, "a"]; + array2[doubleOhSeven] = "b"; + + for (var i = 0; i < 30; i++) { + assertEq(object[zero], "a"); + assertEq(object[0], "a"); + assertEq(object[trippleZero], "b"); + + assertEq(object2[seven], "a"); + assertEq(object2[7], "a"); + assertEq(object2[doubleOhSeven], "b"); + + assertEq(array[zero], "a"); + assertEq(array[0], "a"); + assertEq(array[trippleZero], "b"); + + assertEq(array2[seven], "a"); + assertEq(array2[7], "a"); + assertEq(array2[doubleOhSeven], "b"); + } +} + +function forin() { + var array = [0, 1, 2, 3, 4, 5, 6]; + + var i = 0; + for (var name in array) { + assertEq(name, String(i)); + assertEq(Number(name), i); + + assertEq(array[name], i); + assertEq(array.hasOwnProperty(name), true); + + i++; + } +} + +function parse() { + var numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1000, 0xffff]; + + for (var number of numbers) { + assertEq(parseInt(String(number)), number); + assertEq(parseInt(String(number), 10), number); + assertEq(parseInt(String(number), 0), number); + } +} + +basic(); +index(); +forin(); +parse(); diff --git a/js/src/jit-test/tests/basic/string-regexp-capture-groups.js b/js/src/jit-test/tests/basic/string-regexp-capture-groups.js new file mode 100644 index 0000000000..0fc1bb8a11 --- /dev/null +++ b/js/src/jit-test/tests/basic/string-regexp-capture-groups.js @@ -0,0 +1,21 @@ +"abcdefg".match(/(x)y(z)/g); +assertEq(RegExp.$1, ""); + +assertEq("abcdef".match(/a(b)cd/g)[0], "abcd"); +assertEq(RegExp.$1, "b"); +assertEq(RegExp.$2, ""); + +"abcdef".match(/(a)b(c)/g); +assertEq(RegExp.$1, "a"); +assertEq(RegExp.$2, "c"); +assertEq(RegExp.$3, ""); + +"abcabdabe".match(/(a)b(.)/g); +assertEq(RegExp.$1, "a"); +assertEq(RegExp.$2, "e"); + +"abcdefg".match(/(x)y(z)/g); +assertEq(RegExp.$1, "a"); //If there's no match, we don't update the statics. + +"abcdefg".match(/(g)/g); +assertEq(RegExp.$1, "g"); diff --git a/js/src/jit-test/tests/basic/string-repeat.js b/js/src/jit-test/tests/basic/string-repeat.js new file mode 100644 index 0000000000..8e9e9ee664 --- /dev/null +++ b/js/src/jit-test/tests/basic/string-repeat.js @@ -0,0 +1,30 @@ +/* Test String.prototype.repeat */ + +load(libdir + 'asserts.js'); + +assertEq("abc".repeat(1), "abc"); +assertEq("abc".repeat(2), "abcabc"); +assertEq("abc".repeat(3), "abcabcabc"); +assertEq("a".repeat(10), "aaaaaaaaaa"); +assertEq("abc".repeat(0), ""); +assertEq("abc".repeat(2.9), "abcabc"); + +var myobj = {toString : () => "abc", repeat : String.prototype.repeat}; +assertEq(myobj.repeat(1), "abc"); +assertEq(myobj.repeat(2), "abcabc"); + +assertThrowsInstanceOf(function() { + "abc".repeat(-1); + }, RangeError, + "String.prototype.repeat should raise RangeError on negative arguments"); +assertThrowsInstanceOf(function() { + "abc".repeat(Number.POSITIVE_INFINITY); + }, RangeError, + "String.prototype.repeat should raise RangeError on excedding maximum string length"); +assertThrowsInstanceOf(function() { + "abc".repeat(1 << 29); + }, RangeError, + "String.prototype.repeat should raise RangeError on excedding maximum string length"); + +assertEq("".repeat(5), ""); +assertEq("".repeat(1 << 29), ""); diff --git a/js/src/jit-test/tests/basic/string-startswith.js b/js/src/jit-test/tests/basic/string-startswith.js new file mode 100644 index 0000000000..d788e30e8d --- /dev/null +++ b/js/src/jit-test/tests/basic/string-startswith.js @@ -0,0 +1,243 @@ +/* +* Copyright (c) 2013 Mathias Bynens. All rights reserved. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. +*/ + +function assertThrows(fun, errorType) { + try { + fun(); + assertEq(true, false, "Expected error, but none was thrown"); + } catch (e) { + assertEq(e instanceof errorType, true, "Wrong error type thrown"); + } +} + +Object.prototype[1] = 2; // try to break `arguments[1]` + +assertEq(String.prototype.startsWith.length, 1); +assertEq(String.prototype.propertyIsEnumerable('startsWith'), false); + +assertEq('undefined'.startsWith(), true); +assertEq('undefined'.startsWith(undefined), true); +assertEq('undefined'.startsWith(null), false); +assertEq('null'.startsWith(), false); +assertEq('null'.startsWith(undefined), false); +assertEq('null'.startsWith(null), true); + +assertEq('abc'.startsWith(), false); +assertEq('abc'.startsWith(''), true); +assertEq('abc'.startsWith('\0'), false); +assertEq('abc'.startsWith('a'), true); +assertEq('abc'.startsWith('b'), false); +assertEq('abc'.startsWith('ab'), true); +assertEq('abc'.startsWith('bc'), false); +assertEq('abc'.startsWith('abc'), true); +assertEq('abc'.startsWith('bcd'), false); +assertEq('abc'.startsWith('abcd'), false); +assertEq('abc'.startsWith('bcde'), false); + +assertEq('abc'.startsWith('', NaN), true); +assertEq('abc'.startsWith('\0', NaN), false); +assertEq('abc'.startsWith('a', NaN), true); +assertEq('abc'.startsWith('b', NaN), false); +assertEq('abc'.startsWith('ab', NaN), true); +assertEq('abc'.startsWith('bc', NaN), false); +assertEq('abc'.startsWith('abc', NaN), true); +assertEq('abc'.startsWith('bcd', NaN), false); +assertEq('abc'.startsWith('abcd', NaN), false); +assertEq('abc'.startsWith('bcde', NaN), false); + +assertEq('abc'.startsWith('', false), true); +assertEq('abc'.startsWith('\0', false), false); +assertEq('abc'.startsWith('a', false), true); +assertEq('abc'.startsWith('b', false), false); +assertEq('abc'.startsWith('ab', false), true); +assertEq('abc'.startsWith('bc', false), false); +assertEq('abc'.startsWith('abc', false), true); +assertEq('abc'.startsWith('bcd', false), false); +assertEq('abc'.startsWith('abcd', false), false); +assertEq('abc'.startsWith('bcde', false), false); + +assertEq('abc'.startsWith('', undefined), true); +assertEq('abc'.startsWith('\0', undefined), false); +assertEq('abc'.startsWith('a', undefined), true); +assertEq('abc'.startsWith('b', undefined), false); +assertEq('abc'.startsWith('ab', undefined), true); +assertEq('abc'.startsWith('bc', undefined), false); +assertEq('abc'.startsWith('abc', undefined), true); +assertEq('abc'.startsWith('bcd', undefined), false); +assertEq('abc'.startsWith('abcd', undefined), false); +assertEq('abc'.startsWith('bcde', undefined), false); + +assertEq('abc'.startsWith('', null), true); +assertEq('abc'.startsWith('\0', null), false); +assertEq('abc'.startsWith('a', null), true); +assertEq('abc'.startsWith('b', null), false); +assertEq('abc'.startsWith('ab', null), true); +assertEq('abc'.startsWith('bc', null), false); +assertEq('abc'.startsWith('abc', null), true); +assertEq('abc'.startsWith('bcd', null), false); +assertEq('abc'.startsWith('abcd', null), false); +assertEq('abc'.startsWith('bcde', null), false); + +assertEq('abc'.startsWith('', -Infinity), true); +assertEq('abc'.startsWith('\0', -Infinity), false); +assertEq('abc'.startsWith('a', -Infinity), true); +assertEq('abc'.startsWith('b', -Infinity), false); +assertEq('abc'.startsWith('ab', -Infinity), true); +assertEq('abc'.startsWith('bc', -Infinity), false); +assertEq('abc'.startsWith('abc', -Infinity), true); +assertEq('abc'.startsWith('bcd', -Infinity), false); +assertEq('abc'.startsWith('abcd', -Infinity), false); +assertEq('abc'.startsWith('bcde', -Infinity), false); + +assertEq('abc'.startsWith('', -1), true); +assertEq('abc'.startsWith('\0', -1), false); +assertEq('abc'.startsWith('a', -1), true); +assertEq('abc'.startsWith('b', -1), false); +assertEq('abc'.startsWith('ab', -1), true); +assertEq('abc'.startsWith('bc', -1), false); +assertEq('abc'.startsWith('abc', -1), true); +assertEq('abc'.startsWith('bcd', -1), false); +assertEq('abc'.startsWith('abcd', -1), false); +assertEq('abc'.startsWith('bcde', -1), false); + +assertEq('abc'.startsWith('', -0), true); +assertEq('abc'.startsWith('\0', -0), false); +assertEq('abc'.startsWith('a', -0), true); +assertEq('abc'.startsWith('b', -0), false); +assertEq('abc'.startsWith('ab', -0), true); +assertEq('abc'.startsWith('bc', -0), false); +assertEq('abc'.startsWith('abc', -0), true); +assertEq('abc'.startsWith('bcd', -0), false); +assertEq('abc'.startsWith('abcd', -0), false); +assertEq('abc'.startsWith('bcde', -0), false); + +assertEq('abc'.startsWith('', +0), true); +assertEq('abc'.startsWith('\0', +0), false); +assertEq('abc'.startsWith('a', +0), true); +assertEq('abc'.startsWith('b', +0), false); +assertEq('abc'.startsWith('ab', +0), true); +assertEq('abc'.startsWith('bc', +0), false); +assertEq('abc'.startsWith('abc', +0), true); +assertEq('abc'.startsWith('bcd', +0), false); +assertEq('abc'.startsWith('abcd', +0), false); +assertEq('abc'.startsWith('bcde', +0), false); + +assertEq('abc'.startsWith('', 1), true); +assertEq('abc'.startsWith('\0', 1), false); +assertEq('abc'.startsWith('a', 1), false); +assertEq('abc'.startsWith('b', 1), true); +assertEq('abc'.startsWith('ab', 1), false); +assertEq('abc'.startsWith('bc', 1), true); +assertEq('abc'.startsWith('abc', 1), false); +assertEq('abc'.startsWith('bcd', 1), false); +assertEq('abc'.startsWith('abcd', 1), false); +assertEq('abc'.startsWith('bcde', 1), false); + +assertEq('abc'.startsWith('', +Infinity), true); +assertEq('abc'.startsWith('\0', +Infinity), false); +assertEq('abc'.startsWith('a', +Infinity), false); +assertEq('abc'.startsWith('b', +Infinity), false); +assertEq('abc'.startsWith('ab', +Infinity), false); +assertEq('abc'.startsWith('bc', +Infinity), false); +assertEq('abc'.startsWith('abc', +Infinity), false); +assertEq('abc'.startsWith('bcd', +Infinity), false); +assertEq('abc'.startsWith('abcd', +Infinity), false); +assertEq('abc'.startsWith('bcde', +Infinity), false); + +assertEq('abc'.startsWith('', true), true); +assertEq('abc'.startsWith('\0', true), false); +assertEq('abc'.startsWith('a', true), false); +assertEq('abc'.startsWith('b', true), true); +assertEq('abc'.startsWith('ab', true), false); +assertEq('abc'.startsWith('bc', true), true); +assertEq('abc'.startsWith('abc', true), false); +assertEq('abc'.startsWith('bcd', true), false); +assertEq('abc'.startsWith('abcd', true), false); +assertEq('abc'.startsWith('bcde', true), false); + +assertEq('abc'.startsWith('', 'x'), true); +assertEq('abc'.startsWith('\0', 'x'), false); +assertEq('abc'.startsWith('a', 'x'), true); +assertEq('abc'.startsWith('b', 'x'), false); +assertEq('abc'.startsWith('ab', 'x'), true); +assertEq('abc'.startsWith('bc', 'x'), false); +assertEq('abc'.startsWith('abc', 'x'), true); +assertEq('abc'.startsWith('bcd', 'x'), false); +assertEq('abc'.startsWith('abcd', 'x'), false); +assertEq('abc'.startsWith('bcde', 'x'), false); + +assertEq('[a-z]+(bar)?'.startsWith('[a-z]+'), true); +assertThrows(function() { '[a-z]+(bar)?'.startsWith(/[a-z]+/); }, TypeError); +assertEq('[a-z]+(bar)?'.startsWith('(bar)?', 6), true); +assertThrows(function() { '[a-z]+(bar)?'.startsWith(/(bar)?/); }, TypeError); +assertThrows(function() { '[a-z]+/(bar)?/'.startsWith(/(bar)?/); }, TypeError); +var global = newGlobal(); +global.eval('this.re = /(bar)?/'); +assertThrows(function() { '[a-z]+/(bar)?/'.startsWith(global.re); }, TypeError); + +// http://mathiasbynens.be/notes/javascript-unicode#poo-test +var string = 'I\xF1t\xEBrn\xE2ti\xF4n\xE0liz\xE6ti\xF8n\u2603\uD83D\uDCA9'; +assertEq(string.startsWith(''), true); +assertEq(string.startsWith('\xF1t\xEBr'), false); +assertEq(string.startsWith('\xF1t\xEBr', 1), true); +assertEq(string.startsWith('\xE0liz\xE6'), false); +assertEq(string.startsWith('\xE0liz\xE6', 11), true); +assertEq(string.startsWith('\xF8n\u2603\uD83D\uDCA9'), false); +assertEq(string.startsWith('\xF8n\u2603\uD83D\uDCA9', 18), true); +assertEq(string.startsWith('\u2603'), false); +assertEq(string.startsWith('\u2603', 20), true); +assertEq(string.startsWith('\uD83D\uDCA9'), false); +assertEq(string.startsWith('\uD83D\uDCA9', 21), true); + +assertThrows(function() { String.prototype.startsWith.call(undefined); }, TypeError); +assertThrows(function() { String.prototype.startsWith.call(undefined, 'b'); }, TypeError); +assertThrows(function() { String.prototype.startsWith.call(undefined, 'b', 4); }, TypeError); +assertThrows(function() { String.prototype.startsWith.call(null); }, TypeError); +assertThrows(function() { String.prototype.startsWith.call(null, 'b'); }, TypeError); +assertThrows(function() { String.prototype.startsWith.call(null, 'b', 4); }, TypeError); +assertEq(String.prototype.startsWith.call(42, '2'), false); +assertEq(String.prototype.startsWith.call(42, '4'), true); +assertEq(String.prototype.startsWith.call(42, 'b', 4), false); +assertEq(String.prototype.startsWith.call(42, '2', 1), true); +assertEq(String.prototype.startsWith.call(42, '2', 4), false); +assertEq(String.prototype.startsWith.call({ 'toString': function() { return 'abc'; } }, 'b', 0), false); +assertEq(String.prototype.startsWith.call({ 'toString': function() { return 'abc'; } }, 'b', 1), true); +assertEq(String.prototype.startsWith.call({ 'toString': function() { return 'abc'; } }, 'b', 2), false); +assertThrows(function() { String.prototype.startsWith.call({ 'toString': function() { throw RangeError(); } }, /./); }, RangeError); +assertThrows(function() { String.prototype.startsWith.call({ 'toString': function() { return 'abc'; } }, /./); }, TypeError); + +assertThrows(function() { String.prototype.startsWith.apply(undefined); }, TypeError); +assertThrows(function() { String.prototype.startsWith.apply(undefined, ['b']); }, TypeError); +assertThrows(function() { String.prototype.startsWith.apply(undefined, ['b', 4]); }, TypeError); +assertThrows(function() { String.prototype.startsWith.apply(null); }, TypeError); +assertThrows(function() { String.prototype.startsWith.apply(null, ['b']); }, TypeError); +assertThrows(function() { String.prototype.startsWith.apply(null, ['b', 4]); }, TypeError); +assertEq(String.prototype.startsWith.apply(42, ['2']), false); +assertEq(String.prototype.startsWith.apply(42, ['4']), true); +assertEq(String.prototype.startsWith.apply(42, ['b', 4]), false); +assertEq(String.prototype.startsWith.apply(42, ['2', 1]), true); +assertEq(String.prototype.startsWith.apply(42, ['2', 4]), false); +assertEq(String.prototype.startsWith.apply({ 'toString': function() { return 'abc'; } }, ['b', 0]), false); +assertEq(String.prototype.startsWith.apply({ 'toString': function() { return 'abc'; } }, ['b', 1]), true); +assertEq(String.prototype.startsWith.apply({ 'toString': function() { return 'abc'; } }, ['b', 2]), false); +assertThrows(function() { String.prototype.startsWith.apply({ 'toString': function() { throw RangeError(); } }, [/./]); }, RangeError); +assertThrows(function() { String.prototype.startsWith.apply({ 'toString': function() { return 'abc'; } }, [/./]); }, TypeError); diff --git a/js/src/jit-test/tests/basic/stringConvert.js b/js/src/jit-test/tests/basic/stringConvert.js new file mode 100644 index 0000000000..53181891d5 --- /dev/null +++ b/js/src/jit-test/tests/basic/stringConvert.js @@ -0,0 +1,18 @@ +function stringConvert() +{ + var a = []; + var s1 = "F", s2 = "1.3", s3 = "5"; + for (var i = 0; i < 10; i++) { + a[0] = 1 >> s1; + a[1] = 10 - s2; + a[2] = 15 * s3; + a[3] = s3 | 32; + a[4] = s2 + 60; + // a[5] = 9 + s3; + // a[6] = -s3; + a[7] = s3 & "7"; + // a[8] = ~s3; + } + return a.toString(); +} +assertEq(stringConvert(), "1,8.7,75,37,1.360,,,5"); diff --git a/js/src/jit-test/tests/basic/stringSplitIntoArrayTest.js b/js/src/jit-test/tests/basic/stringSplitIntoArrayTest.js new file mode 100644 index 0000000000..e7fdb097be --- /dev/null +++ b/js/src/jit-test/tests/basic/stringSplitIntoArrayTest.js @@ -0,0 +1,9 @@ +function stringSplitIntoArrayTest() +{ + var s = "a,b" + var a = []; + for (var i = 0; i < 10; ++i) + a[i] = s.split(","); + return a.join(); +} +assertEq(stringSplitIntoArrayTest(), "a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b"); diff --git a/js/src/jit-test/tests/basic/stringSplitTest.js b/js/src/jit-test/tests/basic/stringSplitTest.js new file mode 100644 index 0000000000..942c7e79bc --- /dev/null +++ b/js/src/jit-test/tests/basic/stringSplitTest.js @@ -0,0 +1,9 @@ +function stringSplitTest() +{ + var s = "a,b" + var a = null; + for (var i = 0; i < 10; ++i) + a = s.split(","); + return a.join(); +} +assertEq(stringSplitTest(), "a,b"); diff --git a/js/src/jit-test/tests/basic/strings.js b/js/src/jit-test/tests/basic/strings.js new file mode 100644 index 0000000000..19139b9927 --- /dev/null +++ b/js/src/jit-test/tests/basic/strings.js @@ -0,0 +1,21 @@ +function strings() +{ + var a = [], b = -1; + var s = "abcdefghij", s2 = "a"; + var f = "f"; + var c = 0, d = 0, e = 0, g = 0; + for (var i = 0; i < 10; i++) { + a[i] = (s.substring(i, i+1) + s[i] + String.fromCharCode(s2.charCodeAt(0) + i)).concat(i) + i; + if (s[i] == f) + c++; + if (s[i] != 'b') + d++; + if ("B" > s2) + g++; // f already used + if (s2 < "b") + e++; + b = s.length; + } + return a.toString() + b + c + d + e + g; +} +assertEq(strings(), "aaa00,bbb11,ccc22,ddd33,eee44,fff55,ggg66,hhh77,iii88,jjj991019100"); diff --git a/js/src/jit-test/tests/basic/substring-inline-strings.js b/js/src/jit-test/tests/basic/substring-inline-strings.js new file mode 100644 index 0000000000..3f9381bb50 --- /dev/null +++ b/js/src/jit-test/tests/basic/substring-inline-strings.js @@ -0,0 +1,49 @@ +let hasStringRepresentation = typeof stringRepresentation === "function"; + +function testLatin1() { + var s = "abcdefghijklmnopqrstuvwxyz"; + for (var i = 0; i < 100; i++) { + var sub8 = s.substring(0, 8); + assertEq(sub8, "abcdefgh"); + if (hasStringRepresentation) { + assertEq(stringRepresentation(sub8).includes("(JSThinInlineString*)"), true); + } + + var sub24 = s.substring(0, 24); + assertEq(sub24, "abcdefghijklmnopqrstuvwx"); + if (hasStringRepresentation) { + assertEq(stringRepresentation(sub24).includes("(JSFatInlineString*)"), true); + } + + var sub25 = s.substring(0, 25); + assertEq(sub25, "abcdefghijklmnopqrstuvwxy"); + if (hasStringRepresentation) { + assertEq(stringRepresentation(sub25).includes("(JSDependentString*)"), true); + } + } +} +testLatin1(); + +function testTwoByte() { + var s = "\u1000bcdefghijklmnopqrstuvwxyz"; + for (var i = 0; i < 100; i++) { + var sub4 = s.substring(0, 4); + assertEq(sub4, "\u1000bcd"); + if (hasStringRepresentation) { + assertEq(stringRepresentation(sub4).includes("(JSThinInlineString*)"), true); + } + + var sub12 = s.substring(0, 12); + assertEq(sub12, "\u1000bcdefghijkl"); + if (hasStringRepresentation) { + assertEq(stringRepresentation(sub12).includes("(JSFatInlineString*)"), true); + } + + var sub13 = s.substring(0, 13); + assertEq(sub13, "\u1000bcdefghijklm"); + if (hasStringRepresentation) { + assertEq(stringRepresentation(sub13).includes("(JSDependentString*)"), true); + } + } +} +testTwoByte(); diff --git a/js/src/jit-test/tests/basic/symbol-in-loop.js b/js/src/jit-test/tests/basic/symbol-in-loop.js new file mode 100644 index 0000000000..cddef52655 --- /dev/null +++ b/js/src/jit-test/tests/basic/symbol-in-loop.js @@ -0,0 +1,8 @@ +function f() { + return Object(Symbol()); +} + +for (var i = 0; i < 4; i++) { + f(); + gc(); +} diff --git a/js/src/jit-test/tests/basic/syntax-error-function-body-eof.js b/js/src/jit-test/tests/basic/syntax-error-function-body-eof.js new file mode 100644 index 0000000000..7015f83b10 --- /dev/null +++ b/js/src/jit-test/tests/basic/syntax-error-function-body-eof.js @@ -0,0 +1,9 @@ +var caught = false; +try { + new Function("switch (x) {} }"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("unexpected garbage after function body, starting with '}'") == -1, false); + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/basic/syntax-error-primary.js b/js/src/jit-test/tests/basic/syntax-error-primary.js new file mode 100644 index 0000000000..6be66ee0c1 --- /dev/null +++ b/js/src/jit-test/tests/basic/syntax-error-primary.js @@ -0,0 +1,69 @@ +var caught = false; +try { + new Function(")"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("expected expression, got ')'") == -1, false); + caught = true; +} +assertEq(caught, true); + +caught = false; +try { + new Function("...;"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("expected rest argument name, got ';'") == -1, false); + caught = true; +} +assertEq(caught, true); + +caught = false; +try { + new Function("...a;"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("expected closing parenthesis, got ';'") == -1, false); + caught = true; +} +assertEq(caught, true); + +caught = false; +try { + new Function("...a);"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("expected '=>' after argument list, got ';'") == -1, false); + caught = true; +} +assertEq(caught, true); + +caught = false; +try { + new Function("...a) @"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("expected '=>' after argument list, got '@'") == -1, false); + caught = true; +} +assertEq(caught, true); + +caught = false; +try { + new Function("(if)"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("expected expression, got keyword 'if'") == -1, false); + caught = true; +} +assertEq(caught, true); + +caught = false; +try { + new Function("("); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("expected expression, got end of script") == -1, false); + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/basic/syntax-error-throw.js b/js/src/jit-test/tests/basic/syntax-error-throw.js new file mode 100644 index 0000000000..c82c56cf8b --- /dev/null +++ b/js/src/jit-test/tests/basic/syntax-error-throw.js @@ -0,0 +1,39 @@ +var caught = false; +try { + new Function("throw;"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("throw statement is missing an expression") == -1, false); + caught = true; +} +assertEq(caught, true); + +caught = false; +try { + new Function("throw\n1;"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("no line break is allowed between 'throw' and its expression") == -1, false); + caught = true; +} +assertEq(caught, true); + +caught = false; +try { + new Function("throw}"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("throw statement is missing an expression") == -1, false); + caught = true; +} +assertEq(caught, true); + +caught = false; +try { + new Function("throw"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("throw statement is missing an expression") == -1, false); + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/basic/syntax-error-toplevel-eof.js b/js/src/jit-test/tests/basic/syntax-error-toplevel-eof.js new file mode 100644 index 0000000000..15aaaf7801 --- /dev/null +++ b/js/src/jit-test/tests/basic/syntax-error-toplevel-eof.js @@ -0,0 +1,9 @@ +var caught = false; +try { + Reflect.parse("}"); +} catch (e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.message.startsWith("unexpected garbage after script, starting with '}'") == -1, false); + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/basic/tagTempl.js b/js/src/jit-test/tests/basic/tagTempl.js new file mode 100644 index 0000000000..f4007a8c9a --- /dev/null +++ b/js/src/jit-test/tests/basic/tagTempl.js @@ -0,0 +1,35 @@ +/* + * Tests tagged template string functionality. + */ + +function check(actual, expected) { + assertEq(actual.length, expected.length); + for (var i = 0; i < expected.length; i++) + assertEq(actual[i], expected[i]); +} + +function func(a) { return a; } + +function csoLoop() { + var cso = []; + for (var index = 0; index < 2000; index++) { + cso[index] = func`hey${4}there`; + if (index > 0) + assertEq(cso[index - 1], cso[index]); + } +} + +// Tests baseline and ion functionality. +csoLoop(); + +// Tests off thread compilation +if (helperThreadCount() !== 0) { + offThreadCompileToStencil("(x=>x)`abc`"); + var stencil = finishOffThreadStencil(); + a = evalStencil(stencil); + check(a, ["abc"]); + check(a.raw, ["abc"]); + assertEq(a === a.raw, false); + assertEq(Object.isFrozen(a), true); + assertEq(Object.isFrozen(a.raw), true); +} diff --git a/js/src/jit-test/tests/basic/teleporting-mutable-proto.js b/js/src/jit-test/tests/basic/teleporting-mutable-proto.js new file mode 100644 index 0000000000..c9bfd7f287 --- /dev/null +++ b/js/src/jit-test/tests/basic/teleporting-mutable-proto.js @@ -0,0 +1,14 @@ +var A = {x: 3}; +var B = Object.create(A); +var C = Object.create(B); +var D = Object.create(C); + +function f() { + for (var i=0; i<30; i++) { + assertEq(D.x, (i <= 20) ? 3 : 10); + if (i === 20) { + C.__proto__ = {x: 10}; + } + } +} +f(); diff --git a/js/src/jit-test/tests/basic/terminate.js b/js/src/jit-test/tests/basic/terminate.js new file mode 100644 index 0000000000..f2966d783a --- /dev/null +++ b/js/src/jit-test/tests/basic/terminate.js @@ -0,0 +1,10 @@ +// |jit-test| exitstatus: 3 +try { + terminate(); + assertEq("execution continued", "execution should not continue"); +} catch (x) { + assertEq("caught exception", "uncatchable"); +} finally { + assertEq("'finally' clause ran", "'finally' clause should not run"); +} +assertEq("top-level execution continued", "top-level execution should not continue"); diff --git a/js/src/jit-test/tests/basic/test-apply-many-args.js b/js/src/jit-test/tests/basic/test-apply-many-args.js new file mode 100644 index 0000000000..ea02f4df35 --- /dev/null +++ b/js/src/jit-test/tests/basic/test-apply-many-args.js @@ -0,0 +1,14 @@ +function f(x) { + if (x == 0) + return; + arguments[0]--; + f.apply(null, arguments); +} + +// When the apply-optimization isn't on, each recursive call chews up the C +// stack, so don't push it. +a = [20]; + +for (var i = 0; i < 2000; ++i) + a.push(i); +f.apply(null, a); diff --git a/js/src/jit-test/tests/basic/test-error-accessors-with-wrappers.js b/js/src/jit-test/tests/basic/test-error-accessors-with-wrappers.js new file mode 100644 index 0000000000..2afa881f3a --- /dev/null +++ b/js/src/jit-test/tests/basic/test-error-accessors-with-wrappers.js @@ -0,0 +1,11 @@ +let g = newGlobal(); + +let error = g.eval("Error()"); + +// This should not throw. +assertEq(typeof error.stack, "string"); + +g.error = Error(); + +// Nor should this. +assertEq(g.eval("typeof error.stack"), "string"); diff --git a/js/src/jit-test/tests/basic/test-jitinfo.js b/js/src/jit-test/tests/basic/test-jitinfo.js new file mode 100644 index 0000000000..606f277794 --- /dev/null +++ b/js/src/jit-test/tests/basic/test-jitinfo.js @@ -0,0 +1,26 @@ +// Test for the shell's FakeDOMObject constructor. This test +// ensures the fuzzers know about this object. +function f() { + var res = 0; + var d = new FakeDOMObject(); + assertEq(d !== new FakeDOMObject(), true); + + for (var i = 0; i < 100; i++) { + assertEq(d.slot, 42); + + var x = d.x; + assertEq(typeof x, "number"); + + d.x = 10; + d.x = undefined; + + d.x = FakeDOMObject.prototype.x; + FakeDOMObject.prototype.x = d.x; + FakeDOMObject.prototype.doFoo(); + + assertEq(d.doFoo(), 0); + assertEq(d.doFoo(1), 1); + assertEq(d.doFoo(1, 2), 2); + } +} +f(); diff --git a/js/src/jit-test/tests/basic/test586387.js b/js/src/jit-test/tests/basic/test586387.js new file mode 100644 index 0000000000..5ddc2d7266 --- /dev/null +++ b/js/src/jit-test/tests/basic/test586387.js @@ -0,0 +1,14 @@ +function testFloatArray() { + var v = new Float32Array(32); + + for (var i = 0; i < v.length; ++i) + v[i] = i; + + var t = 0; + for (var i = 0; i < v.length; ++i) + t += v[i]; + + return t; +} + +assertEq(testFloatArray(), 496); diff --git a/js/src/jit-test/tests/basic/testAbortedImacroDecompilation.js b/js/src/jit-test/tests/basic/testAbortedImacroDecompilation.js new file mode 100644 index 0000000000..b1cfdb92d1 --- /dev/null +++ b/js/src/jit-test/tests/basic/testAbortedImacroDecompilation.js @@ -0,0 +1,7 @@ +function f() { + for (var i=0; i<9; i++) + assertEq("" + f, expected); +} + +var expected = "" + f; +f(); diff --git a/js/src/jit-test/tests/basic/testAccessCanonicalArgInGetElem.js b/js/src/jit-test/tests/basic/testAccessCanonicalArgInGetElem.js new file mode 100644 index 0000000000..6440724615 --- /dev/null +++ b/js/src/jit-test/tests/basic/testAccessCanonicalArgInGetElem.js @@ -0,0 +1,12 @@ +var o = {x:42}; + +function f(index,param) { + arguments[1] = 0; + var ret = 0; + for (var i = 0; i < 5; ++i) + ret = arguments[index].x; + return ret; +} + +assertEq(f(2,o,o), 42); +assertEq(f(1,o,o), undefined); diff --git a/js/src/jit-test/tests/basic/testAddAnyInconvertibleObject.js b/js/src/jit-test/tests/basic/testAddAnyInconvertibleObject.js new file mode 100644 index 0000000000..4a4b1d8575 --- /dev/null +++ b/js/src/jit-test/tests/basic/testAddAnyInconvertibleObject.js @@ -0,0 +1,28 @@ +function testAddAnyInconvertibleObject() +{ + var count = 0; + function toString() { ++count; if (count == 95) return {}; return "" + count; } + var o = {valueOf: undefined, toString: toString}; + + var threw = false; + try + { + for (var i = 0; i < 100; i++) + var q = 5 + o; + } + catch (e) + { + threw = true; + if (i !== 94) + return "expected i === 94, got " + i; + if (q !== "594") + return "expected q === '594', got " + q + " (type " + typeof q + ")"; + if (count !== 95) + return "expected count === 95, got " + count; + } + if (!threw) + return "expected throw with 5 + o"; // hey, a rhyme! + + return "pass"; +} +assertEq(testAddAnyInconvertibleObject(), "pass"); diff --git a/js/src/jit-test/tests/basic/testAddInconvertibleObjectAny.js b/js/src/jit-test/tests/basic/testAddInconvertibleObjectAny.js new file mode 100644 index 0000000000..aabf8ec573 --- /dev/null +++ b/js/src/jit-test/tests/basic/testAddInconvertibleObjectAny.js @@ -0,0 +1,34 @@ +function testAddInconvertibleObjectAny() +{ + var count = 0; + function toString() + { + ++count; + if (count == 95) + return {}; + return "" + count; + } + var o = {valueOf: undefined, toString: toString}; + + var threw = false; + try + { + for (var i = 0; i < 100; i++) + var q = o + 5; + } + catch (e) + { + threw = true; + if (i !== 94) + return "expected i === 94, got " + i; + if (q !== "945") + return "expected q === '945', got " + q + " (type " + typeof q + ")"; + if (count !== 95) + return "expected count === 95, got " + count; + } + if (!threw) + return "expected throw with o + 5"; + + return "pass"; +} +assertEq(testAddInconvertibleObjectAny(), "pass"); diff --git a/js/src/jit-test/tests/basic/testAddInconvertibleObjectInconvertibleObject.js b/js/src/jit-test/tests/basic/testAddInconvertibleObjectInconvertibleObject.js new file mode 100644 index 0000000000..5004dbbe5c --- /dev/null +++ b/js/src/jit-test/tests/basic/testAddInconvertibleObjectInconvertibleObject.js @@ -0,0 +1,33 @@ +function testAddInconvertibleObjectInconvertibleObject() +{ + var count1 = 0; + function toString1() { ++count1; if (count1 == 95) return {}; return "" + count1; } + var o1 = {valueOf: undefined, toString: toString1}; + var count2 = 0; + function toString2() { ++count2; if (count2 == 95) return {}; return "" + count2; } + var o2 = {valueOf: undefined, toString: toString2}; + + var threw = false; + try + { + for (var i = 0; i < 100; i++) + var q = o1 + o2; + } + catch (e) + { + threw = true; + if (i !== 94) + return "expected i === 94, got " + i; + if (q !== "9494") + return "expected q === '9494', got " + q + " (type " + typeof q + ")"; + if (count1 !== 95) + return "expected count1 === 95, got " + count1; + if (count2 !== 94) + return "expected count2 === 94, got " + count2; + } + if (!threw) + return "expected throw with o1 + o2"; + + return "pass"; +} +assertEq(testAddInconvertibleObjectInconvertibleObject(), "pass"); diff --git a/js/src/jit-test/tests/basic/testAddNull.js b/js/src/jit-test/tests/basic/testAddNull.js new file mode 100644 index 0000000000..78b40a519a --- /dev/null +++ b/js/src/jit-test/tests/basic/testAddNull.js @@ -0,0 +1,8 @@ +function testAddNull() +{ + var rv; + for (var x = 0; x < 9; ++x) + rv = null + [,,]; + return rv; +} +assertEq(testAddNull(), "null,"); diff --git a/js/src/jit-test/tests/basic/testAddUndefined.js b/js/src/jit-test/tests/basic/testAddUndefined.js new file mode 100644 index 0000000000..9a21e2f93b --- /dev/null +++ b/js/src/jit-test/tests/basic/testAddUndefined.js @@ -0,0 +1,5 @@ +function testAddUndefined() { + for (var j = 0; j < 3; ++j) + (0 + void 0) && 0; +} +testAddUndefined(); diff --git a/js/src/jit-test/tests/basic/testAliasedLet.js b/js/src/jit-test/tests/basic/testAliasedLet.js new file mode 100644 index 0000000000..3ab016999b --- /dev/null +++ b/js/src/jit-test/tests/basic/testAliasedLet.js @@ -0,0 +1,12 @@ +function f() { + { + let x, y, z; + eval('x = 1; y = 2; z = 3'); + for (var i = 0; i < 10000; ++i) { + assertEq(x, 1); + assertEq(y, 2); + assertEq(z, 3); + } + } +} +f(); diff --git a/js/src/jit-test/tests/basic/testApply.js b/js/src/jit-test/tests/basic/testApply.js new file mode 100644 index 0000000000..73e3592284 --- /dev/null +++ b/js/src/jit-test/tests/basic/testApply.js @@ -0,0 +1,7 @@ +function testApply() { + var q = []; + for (var i = 0; i < 10; ++i) + Array.prototype.push.apply(q, [5]); + return q.join(","); +} +assertEq(testApply(), "5,5,5,5,5,5,5,5,5,5"); diff --git a/js/src/jit-test/tests/basic/testApplyArrayInline.js b/js/src/jit-test/tests/basic/testApplyArrayInline.js new file mode 100644 index 0000000000..75b5d9239c --- /dev/null +++ b/js/src/jit-test/tests/basic/testApplyArrayInline.js @@ -0,0 +1,74 @@ +// |jit-test| skip-if: !this.getJitCompilerOptions() || !getJitCompilerOptions()['ion.enable']; --ion-warmup-threshold=50 + +// Test inlining in Ion of fun.apply(..., array). + +setJitCompilerOption("offthread-compilation.enable", 0); +gcPreserveCode(); + +var itercount = 1000; +var warmup = 100; + +// Force Ion to do something predictable without having to wait +// forever for it. + +if (getJitCompilerOptions()["ion.warmup.trigger"] > warmup) + setJitCompilerOption("ion.warmup.trigger", warmup); + +setJitCompilerOption("offthread-compilation.enable", 0); + +function g(a, b, c, d) { + return a + b + c + (d === undefined); +} + +var g_inIonInLoop = false; +var g_inIonAtEnd = false; + +function f(xs) { + var sum = 0; + var inIonInLoop = 0; + for ( var i=0 ; i < itercount ; i++ ) { + inIonInLoop |= inIon(); + sum += g.apply(null, xs); + } + g_ionAtEnd = inIon(); + g_inIonInLoop = !!inIonInLoop; + return sum; +} + +// Basic test + +assertEq(f([1,2,3,4]), 6*itercount); + +// Attempt to detect a botched optimization: either we ion-compiled +// the loop, or we did not ion-compile the function (ion not actually +// effective at all, this can happen). + +assertEq(g_inIonInLoop || !g_inIonAtEnd, true); + +// If Ion is inert just leave. + +if (!g_inIonInLoop) { + print("Leaving early - ion not kicking in at all"); + quit(0); +} + +// Test that we get the correct argument value even if the array has +// fewer initialized members than its length. + +var headroom = [1,2,3]; +headroom.length = 13; +assertEq(f(headroom), 7*itercount); + +// Test that we throw when the array is too long. + +var thrown = false; +try { + var long = []; + long.length = getMaxArgs() + 1; + f(long); +} +catch (e) { + thrown = true; + assertEq(e instanceof RangeError, true); +} +assertEq(thrown, true); diff --git a/js/src/jit-test/tests/basic/testApplyAtJoinPoint.js b/js/src/jit-test/tests/basic/testApplyAtJoinPoint.js new file mode 100644 index 0000000000..bb7f219abf --- /dev/null +++ b/js/src/jit-test/tests/basic/testApplyAtJoinPoint.js @@ -0,0 +1,12 @@ +var isTrue = true; + +function g(x) { + return x; +} + +function f() { + return g.apply(null, isTrue ? ["happy"] : arguments); +} + +for (var i = 0; i < 18; ++i) + assertEq(f("sad"), "happy"); diff --git a/js/src/jit-test/tests/basic/testApplyCall.js b/js/src/jit-test/tests/basic/testApplyCall.js new file mode 100644 index 0000000000..0afe2ff7c9 --- /dev/null +++ b/js/src/jit-test/tests/basic/testApplyCall.js @@ -0,0 +1,42 @@ +function testApplyCallHelper(f) { + var r = []; + for (var i = 0; i < 10; ++i) f.call(); + r.push(x); + for (var i = 0; i < 10; ++i) f.call(this); + r.push(x); + for (var i = 0; i < 10; ++i) f.apply(this); + r.push(x); + for (var i = 0; i < 10; ++i) f.call(this,0); + r.push(x); + for (var i = 0; i < 10; ++i) f.apply(this,[0]); + r.push(x); + for (var i = 0; i < 10; ++i) f.call(this,0,1); + r.push(x); + for (var i = 0; i < 10; ++i) f.apply(this,[0,1]); + r.push(x); + for (var i = 0; i < 10; ++i) f.call(this,0,1,2); + r.push(x); + for (var i = 0; i < 10; ++i) f.apply(this,[0,1,2]); + r.push(x); + for (var i = 0; i < 10; ++i) f.call(this,0,1,2,3); + r.push(x); + for (var i = 0; i < 10; ++i) f.apply(this,[0,1,2,3]); + r.push(x); + for (var i = 0; i < 10; ++i) f.call(this,0,1,2,3,4); + r.push(x); + for (var i = 0; i < 10; ++i) f.apply(this,[0,1,2,3,4]); + r.push(x); + for (var i = 0; i < 10; ++i) f.call(this,0,1,2,3,4,5); + r.push(x); + for (var i = 0; i < 10; ++i) f.apply(this,[0,1,2,3,4,5]) + r.push(x); + return(r.join(",")); +} +function testApplyCall() { + var r = testApplyCallHelper(function (a0,a1,a2,a3,a4,a5,a6,a7) { x = [a0,a1,a2,a3,a4,a5,a6,a7]; }); + r += testApplyCallHelper(function (a0,a1,a2,a3,a4,a5,a6,a7) { x = [a0,a1,a2,a3,a4,a5,a6,a7]; }); + return r; +} + +assertEq(testApplyCall(), ",,,,,,,,,,,,,,,,,,,,,,,,0,,,,,,,,0,,,,,,,,0,1,,,,,,,0,1,,,,,,,0,1,2,,,,,,0,1,2,,,,,,0,1,2,3,,,,,0,1,2,3,,,,,0,1,2,3,4,,,,0,1,2,3,4,,,,0,1,2,3,4,5,,,0,1,2,3,4,5,," + +",,,,,,,,,,,,,,,,,,,,,,,,0,,,,,,,,0,,,,,,,,0,1,,,,,,,0,1,,,,,,,0,1,2,,,,,,0,1,2,,,,,,0,1,2,3,,,,,0,1,2,3,,,,,0,1,2,3,4,,,,0,1,2,3,4,,,,0,1,2,3,4,5,,,0,1,2,3,4,5,,"); diff --git a/js/src/jit-test/tests/basic/testApplyInterpretLowered.js b/js/src/jit-test/tests/basic/testApplyInterpretLowered.js new file mode 100644 index 0000000000..e35659f9e8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testApplyInterpretLowered.js @@ -0,0 +1,15 @@ + +/* Read correct return value when the interpreter pops a lowered call/apply. */ + +function recompile() {} + +function foo() { + if (arguments[0] == 9) + recompile(); + return arguments[0]; +} +function bar() { + for (var i = 0; i < 10; i++) + assertEq(foo.apply(null, [i]), i); +} +bar(); diff --git a/js/src/jit-test/tests/basic/testApplyInterpretLowered2.js b/js/src/jit-test/tests/basic/testApplyInterpretLowered2.js new file mode 100644 index 0000000000..0564ead0b6 --- /dev/null +++ b/js/src/jit-test/tests/basic/testApplyInterpretLowered2.js @@ -0,0 +1,12 @@ + +/* Make sure the interpreter can pop lowered frames pushed by CompileFunction. */ + +function recompile() {} + +function bar() { + for (var i = 0; i < 50; i++) { + var foo = new Function("recompile(arguments[0] + " + i + "); return arguments[0]"); + assertEq(foo.apply(null, [i]), i); + } +} +bar(); diff --git a/js/src/jit-test/tests/basic/testApplySpeculationFailInCompiler.js b/js/src/jit-test/tests/basic/testApplySpeculationFailInCompiler.js new file mode 100644 index 0000000000..8a79a5cf5e --- /dev/null +++ b/js/src/jit-test/tests/basic/testApplySpeculationFailInCompiler.js @@ -0,0 +1,6 @@ +function baz(i) { return i } +function bar(x, y) { return baz.apply(null, x ? y : arguments) } +var s; +for (var i = 0; i < 1000; ++i) + s = bar(true, [42]); +assertEq(s, 42); diff --git a/js/src/jit-test/tests/basic/testApplyUnbox.js b/js/src/jit-test/tests/basic/testApplyUnbox.js new file mode 100644 index 0000000000..5336ace075 --- /dev/null +++ b/js/src/jit-test/tests/basic/testApplyUnbox.js @@ -0,0 +1,11 @@ +function testApplyUnboxHelper(f,a) { + var q; + for (var i = 0; i < 10; ++i) + q = f.apply(f,a); + return q; +} +function testApplyUnbox() { + var f = function(x) { return x; } + return [testApplyUnboxHelper(f,[1]), testApplyUnboxHelper(f,[true])].join(","); +} +assertEq(testApplyUnbox(), "1,true"); diff --git a/js/src/jit-test/tests/basic/testArgumentsOptimizationFailCornerCase.js b/js/src/jit-test/tests/basic/testArgumentsOptimizationFailCornerCase.js new file mode 100644 index 0000000000..90f4f11c94 --- /dev/null +++ b/js/src/jit-test/tests/basic/testArgumentsOptimizationFailCornerCase.js @@ -0,0 +1,23 @@ +Object.prototype.blah = 42; + +function g(a,b,c) { + assertEq(a, 1); + assertEq(b, 2); + assertEq(c, 3); + return 43; +} + +function f() { + var a = arguments; + var b = a; + var s = "blah"; + assertEq(a[s], 42); + assertEq(b[s], 42); + assertEq(a[s], 42); + assertEq(b.length, 3); + assertEq(a.length, 3); + assertEq(g.apply(null, b), 43); +} + +for (var i = 0; i < 10; ++i) + f(1,2,3); diff --git a/js/src/jit-test/tests/basic/testArgumentsPropLookup.js b/js/src/jit-test/tests/basic/testArgumentsPropLookup.js new file mode 100644 index 0000000000..6e8a4cda75 --- /dev/null +++ b/js/src/jit-test/tests/basic/testArgumentsPropLookup.js @@ -0,0 +1,19 @@ +(function() { + var s = "__proto__"; + assertEq(arguments[s], Object.prototype); +})(); + +Object.defineProperty(Object.prototype, "foo", { + get:function() { + this.bar = 42; + return 41 + } +}); + +(function() { + var s = "foo"; + assertEq(arguments[s], 41); + s = "bar"; + assertEq(arguments[s], 42); + assertEq("bar" in Object.prototype, false); +})(); diff --git a/js/src/jit-test/tests/basic/testArrayBufferSlice.js b/js/src/jit-test/tests/basic/testArrayBufferSlice.js new file mode 100644 index 0000000000..3b1f353def --- /dev/null +++ b/js/src/jit-test/tests/basic/testArrayBufferSlice.js @@ -0,0 +1,57 @@ +function testSlice() { + function test(subBuf, starts, size) { + var byteLength = size; + var subBuffer = eval(subBuf); + var subArray = new Int8Array(subBuffer); + assertEq(subBuffer.byteLength, byteLength); + for (var i = 0; i < size; ++i) + assertEq(starts + i, subArray[i]); + } + + var buffer = new ArrayBuffer(32); + var array = new Int8Array(buffer); + for (var i = 0; i < 32; ++i) + array[i] = i; + + test("buffer.slice(0)", 0, 32); + test("buffer.slice(16)", 16, 16); + test("buffer.slice(24)", 24, 8); + test("buffer.slice(32)", 32, 0); + test("buffer.slice(40)", 32, 0); + test("buffer.slice(80)", 32, 0); + + test("buffer.slice(-8)", 24, 8); + test("buffer.slice(-16)", 16, 16); + test("buffer.slice(-24)", 8, 24); + test("buffer.slice(-32)", 0, 32); + test("buffer.slice(-40)", 0, 32); + test("buffer.slice(-80)", 0, 32); + + test("buffer.slice(0, 32)", 0, 32); + test("buffer.slice(0, 16)", 0, 16); + test("buffer.slice(8, 24)", 8, 16); + test("buffer.slice(16, 32)", 16, 16); + test("buffer.slice(24, 16)", 24, 0); + + test("buffer.slice(16, -8)", 16, 8); + test("buffer.slice(-20, 30)", 12, 18); + + test("buffer.slice(-8, -20)", 24, 0); + test("buffer.slice(-20, -8)", 12, 12); + test("buffer.slice(-40, 16)", 0, 16); + test("buffer.slice(-40, 40)", 0, 32); + + gczeal(7, 100000); + var nurseryBuf = new ArrayBuffer(32); + var arr = new Int8Array(nurseryBuf); + arr[0] = 77; + + // tenure nurseryBuf during the slice operation + nurseryBuf.slice; // Creates an object + schedulegc(1); + var newbuf = nurseryBuf.slice(0); + var arr2 = new Int8Array(newbuf); + assertEq(arr2[0], 77); +} + +testSlice(); diff --git a/js/src/jit-test/tests/basic/testArrayBufferSpeciesDelete.js b/js/src/jit-test/tests/basic/testArrayBufferSpeciesDelete.js new file mode 100644 index 0000000000..02e515d325 --- /dev/null +++ b/js/src/jit-test/tests/basic/testArrayBufferSpeciesDelete.js @@ -0,0 +1,5 @@ +delete ArrayBuffer[Symbol.species]; +var a = new Uint8Array(new Uint8Array([1, 2])); +assertEq(a.length, 2); +assertEq(a[0], 1); +assertEq(a[1], 2); diff --git a/js/src/jit-test/tests/basic/testArrayConcat.js b/js/src/jit-test/tests/basic/testArrayConcat.js new file mode 100644 index 0000000000..ec29e43536 --- /dev/null +++ b/js/src/jit-test/tests/basic/testArrayConcat.js @@ -0,0 +1,10 @@ + +var x = Array(4); +x[0] = 1; +x[1] = 2; +x[2] = 3; +var y = x.concat(); +assertEq(y[3], undefined); + +var z = x.concat(/abc/).pop(); +assertEq(z.source, "abc"); diff --git a/js/src/jit-test/tests/basic/testArrayDensityChange.js b/js/src/jit-test/tests/basic/testArrayDensityChange.js new file mode 100644 index 0000000000..b9dfabad1e --- /dev/null +++ b/js/src/jit-test/tests/basic/testArrayDensityChange.js @@ -0,0 +1,17 @@ +function testArrayDensityChange() { + var x = []; + var count = 0; + for (var i=0; i < 100; ++i) { + x[i] = "asdf"; + } + for (var i=0; i < x.length; ++i) { + if (i == 51) + { + x[199] = "asdf"; + } + if (x[i]) + count += x[i].length; + } + return count; +} +assertEq(testArrayDensityChange(), 404); diff --git a/js/src/jit-test/tests/basic/testArrayInWithIndexedProto.js b/js/src/jit-test/tests/basic/testArrayInWithIndexedProto.js new file mode 100644 index 0000000000..97da0ee07a --- /dev/null +++ b/js/src/jit-test/tests/basic/testArrayInWithIndexedProto.js @@ -0,0 +1,24 @@ +function testArrayInWithIndexedProto() +{ + Array.prototype[0] = "Got me"; + var zeroPresent, zeroPresent2; + // Need to go to 18 because in the failure mode this is + // testing we have various side-exits in there due to interp and + // tracer not agreeing that confuse the issue and cause us to not + // hit the bad case within 9 iterations. + for (var j = 0; j < 18; ++j) { + zeroPresent = 0 in []; + } + + var arr = [1, 2]; + delete arr[0]; + for (var j = 0; j < 18; ++j) { + zeroPresent2 = 0 in arr; + } + return [zeroPresent, zeroPresent2]; +} + +var [ret, ret2] = testArrayInWithIndexedProto(); +assertEq(ret, true); +assertEq(ret2, true); + diff --git a/js/src/jit-test/tests/basic/testArrayNaNIndex.js b/js/src/jit-test/tests/basic/testArrayNaNIndex.js new file mode 100644 index 0000000000..671f6ff8f6 --- /dev/null +++ b/js/src/jit-test/tests/basic/testArrayNaNIndex.js @@ -0,0 +1,7 @@ +function testArrayNaNIndex() +{ + for (var j = 0; j < 4; ++j) { [this[NaN]]; } + for (var j = 0; j < 5; ++j) { if([1][-0]) { } } + return "ok"; +} +assertEq(testArrayNaNIndex(), "ok"); diff --git a/js/src/jit-test/tests/basic/testArrayNamedProp.js b/js/src/jit-test/tests/basic/testArrayNamedProp.js new file mode 100644 index 0000000000..7357412dd4 --- /dev/null +++ b/js/src/jit-test/tests/basic/testArrayNamedProp.js @@ -0,0 +1,5 @@ +function testArrayNamedProp() { + for (var x = 0; x < 10; ++x) { [4].sort-- } + return "ok"; +} +assertEq(testArrayNamedProp(), "ok"); diff --git a/js/src/jit-test/tests/basic/testArrayPushPop.js b/js/src/jit-test/tests/basic/testArrayPushPop.js new file mode 100644 index 0000000000..8e00dad231 --- /dev/null +++ b/js/src/jit-test/tests/basic/testArrayPushPop.js @@ -0,0 +1,11 @@ +function testArrayPushPop() { + var a = [], sum1 = 0, sum2 = 0; + for (var i = 0; i < 10; ++i) + sum1 += a.push(i); + for (var i = 0; i < 10; ++i) + sum2 += a.pop(); + a.push(sum1); + a.push(sum2); + return a.join(","); +} +assertEq(testArrayPushPop(), "55,45"); diff --git a/js/src/jit-test/tests/basic/testArraySpeciesDelete.js b/js/src/jit-test/tests/basic/testArraySpeciesDelete.js new file mode 100644 index 0000000000..8677d22547 --- /dev/null +++ b/js/src/jit-test/tests/basic/testArraySpeciesDelete.js @@ -0,0 +1,5 @@ +delete Array[Symbol.species]; +var a = [1, 2, 3].slice(1); +assertEq(a.length, 2); +assertEq(a[0], 2); +assertEq(a[1], 3); diff --git a/js/src/jit-test/tests/basic/testAssignmentThatIgnoresSetterRetval.js b/js/src/jit-test/tests/basic/testAssignmentThatIgnoresSetterRetval.js new file mode 100644 index 0000000000..1c59113482 --- /dev/null +++ b/js/src/jit-test/tests/basic/testAssignmentThatIgnoresSetterRetval.js @@ -0,0 +1,10 @@ +var o = { + set x(v) { + return 42; + } +}; + +for (var i = 0; i < 10; ++i) { + var z = o.x = "choose me"; + assertEq(z, "choose me"); +} diff --git a/js/src/jit-test/tests/basic/testAtomize.js b/js/src/jit-test/tests/basic/testAtomize.js new file mode 100644 index 0000000000..16076eb6be --- /dev/null +++ b/js/src/jit-test/tests/basic/testAtomize.js @@ -0,0 +1,10 @@ +function testAtomize() { + x = {}; + for (var i = 0; i < 65536; ++i) + x[String.fromCharCode(i)] = 1; + var z = 0; + for (var p in x) + ++z; + return z; +} +assertEq(testAtomize(), 65536) diff --git a/js/src/jit-test/tests/basic/testBitOrAnyInconvertibleObject.js b/js/src/jit-test/tests/basic/testBitOrAnyInconvertibleObject.js new file mode 100644 index 0000000000..d3daadbea4 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBitOrAnyInconvertibleObject.js @@ -0,0 +1,28 @@ +function testBitOrAnyInconvertibleObject() +{ + var count = 0; + function toString() { ++count; if (count == 95) return {}; return count; } + var o = {valueOf: undefined, toString: toString}; + + var threw = false; + try + { + for (var i = 0; i < 100; i++) + var q = 1 | o; + } + catch (e) + { + threw = true; + if (i !== 94) + return "expected i === 94, got " + i; + if (q !== 95) + return "expected q === 95, got " + q; + if (count !== 95) + return "expected count === 95, got " + count; + } + if (!threw) + return "expected throw with 2 | o"; // hey, a rhyme! + + return "pass"; +} +assertEq(testBitOrAnyInconvertibleObject(), "pass"); diff --git a/js/src/jit-test/tests/basic/testBitOrInconvertibleObjectAny.js b/js/src/jit-test/tests/basic/testBitOrInconvertibleObjectAny.js new file mode 100644 index 0000000000..29d983ab09 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBitOrInconvertibleObjectAny.js @@ -0,0 +1,28 @@ +function testBitOrInconvertibleObjectAny() +{ + var count = 0; + function toString() { ++count; if (count == 95) return {}; return count; } + var o = {valueOf: undefined, toString: toString}; + + var threw = false; + try + { + for (var i = 0; i < 100; i++) + var q = o | 1; + } + catch (e) + { + threw = true; + if (i !== 94) + return "expected i === 94, got " + i; + if (q !== 95) + return "expected q === 95, got " + q; + if (count !== 95) + return "expected count === 95, got " + count; + } + if (!threw) + return "expected throw with o | 2"; + + return "pass"; +} +assertEq(testBitOrInconvertibleObjectAny(), "pass"); diff --git a/js/src/jit-test/tests/basic/testBitOrInconvertibleObjectInconvertibleObject.js b/js/src/jit-test/tests/basic/testBitOrInconvertibleObjectInconvertibleObject.js new file mode 100644 index 0000000000..420b431ea0 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBitOrInconvertibleObjectInconvertibleObject.js @@ -0,0 +1,33 @@ +function testBitOrInconvertibleObjectInconvertibleObject() +{ + var count1 = 0; + function toString1() { ++count1; if (count1 == 95) return {}; return count1; } + var o1 = {valueOf: undefined, toString: toString1}; + var count2 = 0; + function toString2() { ++count2; if (count2 == 95) return {}; return count2; } + var o2 = {valueOf: undefined, toString: toString2}; + + var threw = false; + try + { + for (var i = 0; i < 100; i++) + var q = o1 | o2; + } + catch (e) + { + threw = true; + if (i !== 94) + return "expected i === 94, got " + i; + if (q !== 94) + return "expected q === 94, got " + q; + if (count1 !== 95) + return "expected count1 === 95, got " + count1; + if (count2 !== 94) + return "expected count2 === 94, got " + count2; + } + if (!threw) + return "expected throw with o1 | o2"; + + return "pass"; +} +assertEq(testBitOrInconvertibleObjectInconvertibleObject(), "pass"); diff --git a/js/src/jit-test/tests/basic/testBitopWithConstan.js b/js/src/jit-test/tests/basic/testBitopWithConstan.js new file mode 100644 index 0000000000..494994d7f5 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBitopWithConstan.js @@ -0,0 +1,741 @@ +function test1 (x) { + assertEq(x | -1, -1); + assertEq(-1 | x, -1); + assertEq(x & -1, 1); + assertEq(-1 & x, 1); + assertEq(x ^ -1, -2); + assertEq(-1 ^ x, -2); + assertEq(x >> -1, 0); + assertEq(-1 >> x, -1); + assertEq(x >>> -1, 0); + assertEq(-1 >>> x, 2147483647); + assertEq(x << -1, -2147483648); + assertEq(-1 << x, -2); + assertEq(x | 1, 1); + assertEq(1 | x, 1); + assertEq(x & 1, 1); + assertEq(1 & x, 1); + assertEq(x ^ 1, 0); + assertEq(1 ^ x, 0); + assertEq(x >> 1, 0); + assertEq(1 >> x, 0); + assertEq(x >>> 1, 0); + assertEq(1 >>> x, 0); + assertEq(x << 1, 2); + assertEq(1 << x, 2); + assertEq(x | 0, 1); + assertEq(0 | x, 1); + assertEq(x & 0, 0); + assertEq(0 & x, 0); + assertEq(x ^ 0, 1); + assertEq(0 ^ x, 1); + assertEq(x >> 0, 1); + assertEq(0 >> x, 0); + assertEq(x >>> 0, 1); + assertEq(0 >>> x, 0); + assertEq(x << 0, 1); + assertEq(0 << x, 0); + assertEq(x | 0xffffffff, -1); + assertEq(0xffffffff | x, -1); + assertEq(x & 0xffffffff, 1); + assertEq(0xffffffff & x, 1); + assertEq(x ^ 0xffffffff, -2); + assertEq(0xffffffff ^ x, -2); + assertEq(x >> 0xffffffff, 0); + assertEq(0xffffffff >> x, -1); + assertEq(x >>> 0xffffffff, 0); + assertEq(0xffffffff >>> x, 2147483647); + assertEq(x << 0xffffffff, -2147483648); + assertEq(0xffffffff << x, -2); + assertEq(x | "10.6", 11); + assertEq("10.6" | x, 11); + assertEq(x & "10.6", 0); + assertEq("10.6" & x, 0); + assertEq(x ^ "10.6", 11); + assertEq("10.6" ^ x, 11); + assertEq(x >> "10.6", 0); + assertEq("10.6" >> x, 5); + assertEq(x >>> "10.6", 0); + assertEq("10.6" >>> x, 5); + assertEq(x << "10.6", 1024); + assertEq("10.6" << x, 20); + assertEq(x | 2147483648, -2147483647); + assertEq(2147483648 | x, -2147483647); + assertEq(x & 2147483648, 0); + assertEq(2147483648 & x, 0); + assertEq(x ^ 2147483648, -2147483647); + assertEq(2147483648 ^ x, -2147483647); + assertEq(x >> 2147483648, 1); + assertEq(2147483648 >> x, -1073741824); + assertEq(x >>> 2147483648, 1); + assertEq(2147483648 >>> x, 1073741824); + assertEq(x << 2147483648, 1); + assertEq(2147483648 << x, 0); + assertEq(x | 4294967296, 1); + assertEq(4294967296 | x, 1); + assertEq(x & 4294967296, 0); + assertEq(4294967296 & x, 0); + assertEq(x ^ 4294967296, 1); + assertEq(4294967296 ^ x, 1); + assertEq(x >> 4294967296, 1); + assertEq(4294967296 >> x, 0); + assertEq(x >>> 4294967296, 1); + assertEq(4294967296 >>> x, 0); + assertEq(x << 4294967296, 1); + assertEq(4294967296 << x, 0); + assertEq(x | undefined, 1); + assertEq(undefined | x, 1); + assertEq(x & undefined, 0); + assertEq(undefined & x, 0); + assertEq(x ^ undefined, 1); + assertEq(undefined ^ x, 1); + assertEq(x >> undefined, 1); + assertEq(undefined >> x, 0); + assertEq(x >>> undefined, 1); + assertEq(undefined >>> x, 0); + assertEq(x << undefined, 1); + assertEq(undefined << x, 0); + assertEq(x | null, 1); + assertEq(null | x, 1); + assertEq(x & null, 0); + assertEq(null & x, 0); + assertEq(x ^ null, 1); + assertEq(null ^ x, 1); + assertEq(x >> null, 1); + assertEq(null >> x, 0); + assertEq(x >>> null, 1); + assertEq(null >>> x, 0); + assertEq(x << null, 1); + assertEq(null << x, 0); + assertEq(x | false, 1); + assertEq(false | x, 1); + assertEq(x & false, 0); + assertEq(false & x, 0); + assertEq(x ^ false, 1); + assertEq(false ^ x, 1); + assertEq(x >> false, 1); + assertEq(false >> x, 0); + assertEq(x >>> false, 1); + assertEq(false >>> x, 0); + assertEq(x << false, 1); + assertEq(false << x, 0); + assertEq(x | true, 1); + assertEq(true | x, 1); + assertEq(x & true, 1); + assertEq(true & x, 1); + assertEq(x ^ true, 0); + assertEq(true ^ x, 0); + assertEq(x >> true, 0); + assertEq(true >> x, 0); + assertEq(x >>> true, 0); + assertEq(true >>> x, 0); + assertEq(x << true, 2); + assertEq(true << x, 2); + assertEq(x | -1.5, -1); + assertEq(-1.5 | x, -1); + assertEq(x & -1.5, 1); + assertEq(-1.5 & x, 1); + assertEq(x ^ -1.5, -2); + assertEq(-1.5 ^ x, -2); + assertEq(x >> -1.5, 0); + assertEq(-1.5 >> x, -1); + assertEq(x >>> -1.5, 0); + assertEq(-1.5 >>> x, 2147483647); + assertEq(x << -1.5, -2147483648); + assertEq(-1.5 << x, -2); +} +test1(1) + +function test2 (x) { + assertEq(x | -1, -1); + assertEq(-1 | x, -1); + assertEq(x & -1, 0); + assertEq(-1 & x, 0); + assertEq(x ^ -1, -1); + assertEq(-1 ^ x, -1); + assertEq(x >> -1, 0); + assertEq(-1 >> x, -1); + assertEq(x >>> -1, 0); + assertEq(-1 >>> x, 4294967295); + assertEq(x << -1, 0); + assertEq(-1 << x, -1); + assertEq(x | 1, 1); + assertEq(1 | x, 1); + assertEq(x & 1, 0); + assertEq(1 & x, 0); + assertEq(x ^ 1, 1); + assertEq(1 ^ x, 1); + assertEq(x >> 1, 0); + assertEq(1 >> x, 1); + assertEq(x >>> 1, 0); + assertEq(1 >>> x, 1); + assertEq(x << 1, 0); + assertEq(1 << x, 1); + assertEq(x | 0, 0); + assertEq(0 | x, 0); + assertEq(x & 0, 0); + assertEq(0 & x, 0); + assertEq(x ^ 0, 0); + assertEq(0 ^ x, 0); + assertEq(x >> 0, 0); + assertEq(0 >> x, 0); + assertEq(x >>> 0, 0); + assertEq(0 >>> x, 0); + assertEq(x << 0, 0); + assertEq(0 << x, 0); + assertEq(x | 0xffffffff, -1); + assertEq(0xffffffff | x, -1); + assertEq(x & 0xffffffff, 0); + assertEq(0xffffffff & x, 0); + assertEq(x ^ 0xffffffff, -1); + assertEq(0xffffffff ^ x, -1); + assertEq(x >> 0xffffffff, 0); + assertEq(0xffffffff >> x, -1); + assertEq(x >>> 0xffffffff, 0); + assertEq(0xffffffff >>> x, 4294967295); + assertEq(x << 0xffffffff, 0); + assertEq(0xffffffff << x, -1); + assertEq(x | "10.6", 10); + assertEq("10.6" | x, 10); + assertEq(x & "10.6", 0); + assertEq("10.6" & x, 0); + assertEq(x ^ "10.6", 10); + assertEq("10.6" ^ x, 10); + assertEq(x >> "10.6", 0); + assertEq("10.6" >> x, 10); + assertEq(x >>> "10.6", 0); + assertEq("10.6" >>> x, 10); + assertEq(x << "10.6", 0); + assertEq("10.6" << x, 10); + assertEq(x | 2147483648, -2147483648); + assertEq(2147483648 | x, -2147483648); + assertEq(x & 2147483648, 0); + assertEq(2147483648 & x, 0); + assertEq(x ^ 2147483648, -2147483648); + assertEq(2147483648 ^ x, -2147483648); + assertEq(x >> 2147483648, 0); + assertEq(2147483648 >> x, -2147483648); + assertEq(x >>> 2147483648, 0); + assertEq(2147483648 >>> x, 2147483648); + assertEq(x << 2147483648, 0); + assertEq(2147483648 << x, -2147483648); + assertEq(x | 4294967296, 0); + assertEq(4294967296 | x, 0); + assertEq(x & 4294967296, 0); + assertEq(4294967296 & x, 0); + assertEq(x ^ 4294967296, 0); + assertEq(4294967296 ^ x, 0); + assertEq(x >> 4294967296, 0); + assertEq(4294967296 >> x, 0); + assertEq(x >>> 4294967296, 0); + assertEq(4294967296 >>> x, 0); + assertEq(x << 4294967296, 0); + assertEq(4294967296 << x, 0); + assertEq(x | undefined, 0); + assertEq(undefined | x, 0); + assertEq(x & undefined, 0); + assertEq(undefined & x, 0); + assertEq(x ^ undefined, 0); + assertEq(undefined ^ x, 0); + assertEq(x >> undefined, 0); + assertEq(undefined >> x, 0); + assertEq(x >>> undefined, 0); + assertEq(undefined >>> x, 0); + assertEq(x << undefined, 0); + assertEq(undefined << x, 0); + assertEq(x | null, 0); + assertEq(null | x, 0); + assertEq(x & null, 0); + assertEq(null & x, 0); + assertEq(x ^ null, 0); + assertEq(null ^ x, 0); + assertEq(x >> null, 0); + assertEq(null >> x, 0); + assertEq(x >>> null, 0); + assertEq(null >>> x, 0); + assertEq(x << null, 0); + assertEq(null << x, 0); + assertEq(x | false, 0); + assertEq(false | x, 0); + assertEq(x & false, 0); + assertEq(false & x, 0); + assertEq(x ^ false, 0); + assertEq(false ^ x, 0); + assertEq(x >> false, 0); + assertEq(false >> x, 0); + assertEq(x >>> false, 0); + assertEq(false >>> x, 0); + assertEq(x << false, 0); + assertEq(false << x, 0); + assertEq(x | true, 1); + assertEq(true | x, 1); + assertEq(x & true, 0); + assertEq(true & x, 0); + assertEq(x ^ true, 1); + assertEq(true ^ x, 1); + assertEq(x >> true, 0); + assertEq(true >> x, 1); + assertEq(x >>> true, 0); + assertEq(true >>> x, 1); + assertEq(x << true, 0); + assertEq(true << x, 1); + assertEq(x | -1.5, -1); + assertEq(-1.5 | x, -1); + assertEq(x & -1.5, 0); + assertEq(-1.5 & x, 0); + assertEq(x ^ -1.5, -1); + assertEq(-1.5 ^ x, -1); + assertEq(x >> -1.5, 0); + assertEq(-1.5 >> x, -1); + assertEq(x >>> -1.5, 0); + assertEq(-1.5 >>> x, 4294967295); + assertEq(x << -1.5, 0); + assertEq(-1.5 << x, -1); +} +test2(0) + +function test3 (x) { + assertEq(x | -1, -1); + assertEq(-1 | x, -1); + assertEq(x & -1, -1); + assertEq(-1 & x, -1); + assertEq(x ^ -1, 0); + assertEq(-1 ^ x, 0); + assertEq(x >> -1, -1); + assertEq(-1 >> x, -1); + assertEq(x >>> -1, 1); + assertEq(-1 >>> x, 1); + assertEq(x << -1, -2147483648); + assertEq(-1 << x, -2147483648); + assertEq(x | 1, -1); + assertEq(1 | x, -1); + assertEq(x & 1, 1); + assertEq(1 & x, 1); + assertEq(x ^ 1, -2); + assertEq(1 ^ x, -2); + assertEq(x >> 1, -1); + assertEq(1 >> x, 0); + assertEq(x >>> 1, 2147483647); + assertEq(1 >>> x, 0); + assertEq(x << 1, -2); + assertEq(1 << x, -2147483648); + assertEq(x | 0, -1); + assertEq(0 | x, -1); + assertEq(x & 0, 0); + assertEq(0 & x, 0); + assertEq(x ^ 0, -1); + assertEq(0 ^ x, -1); + assertEq(x >> 0, -1); + assertEq(0 >> x, 0); + assertEq(x >>> 0, 4294967295); + assertEq(0 >>> x, 0); + assertEq(x << 0, -1); + assertEq(0 << x, 0); + assertEq(x | 0xffffffff, -1); + assertEq(0xffffffff | x, -1); + assertEq(x & 0xffffffff, -1); + assertEq(0xffffffff & x, -1); + assertEq(x ^ 0xffffffff, 0); + assertEq(0xffffffff ^ x, 0); + assertEq(x >> 0xffffffff, -1); + assertEq(0xffffffff >> x, -1); + assertEq(x >>> 0xffffffff, 1); + assertEq(0xffffffff >>> x, 1); + assertEq(x << 0xffffffff, -2147483648); + assertEq(0xffffffff << x, -2147483648); + assertEq(x | "10.6", -1); + assertEq("10.6" | x, -1); + assertEq(x & "10.6", 10); + assertEq("10.6" & x, 10); + assertEq(x ^ "10.6", -11); + assertEq("10.6" ^ x, -11); + assertEq(x >> "10.6", -1); + assertEq("10.6" >> x, 0); + assertEq(x >>> "10.6", 4194303); + assertEq("10.6" >>> x, 0); + assertEq(x << "10.6", -1024); + assertEq("10.6" << x, 0); + assertEq(x | 2147483648, -1); + assertEq(2147483648 | x, -1); + assertEq(x & 2147483648, -2147483648); + assertEq(2147483648 & x, -2147483648); + assertEq(x ^ 2147483648, 2147483647); + assertEq(2147483648 ^ x, 2147483647); + assertEq(x >> 2147483648, -1); + assertEq(2147483648 >> x, -1); + assertEq(x >>> 2147483648, 4294967295); + assertEq(2147483648 >>> x, 1); + assertEq(x << 2147483648, -1); + assertEq(2147483648 << x, 0); + assertEq(x | 4294967296, -1); + assertEq(4294967296 | x, -1); + assertEq(x & 4294967296, 0); + assertEq(4294967296 & x, 0); + assertEq(x ^ 4294967296, -1); + assertEq(4294967296 ^ x, -1); + assertEq(x >> 4294967296, -1); + assertEq(4294967296 >> x, 0); + assertEq(x >>> 4294967296, 4294967295); + assertEq(4294967296 >>> x, 0); + assertEq(x << 4294967296, -1); + assertEq(4294967296 << x, 0); + assertEq(x | undefined, -1); + assertEq(undefined | x, -1); + assertEq(x & undefined, 0); + assertEq(undefined & x, 0); + assertEq(x ^ undefined, -1); + assertEq(undefined ^ x, -1); + assertEq(x >> undefined, -1); + assertEq(undefined >> x, 0); + assertEq(x >>> undefined, 4294967295); + assertEq(undefined >>> x, 0); + assertEq(x << undefined, -1); + assertEq(undefined << x, 0); + assertEq(x | null, -1); + assertEq(null | x, -1); + assertEq(x & null, 0); + assertEq(null & x, 0); + assertEq(x ^ null, -1); + assertEq(null ^ x, -1); + assertEq(x >> null, -1); + assertEq(null >> x, 0); + assertEq(x >>> null, 4294967295); + assertEq(null >>> x, 0); + assertEq(x << null, -1); + assertEq(null << x, 0); + assertEq(x | false, -1); + assertEq(false | x, -1); + assertEq(x & false, 0); + assertEq(false & x, 0); + assertEq(x ^ false, -1); + assertEq(false ^ x, -1); + assertEq(x >> false, -1); + assertEq(false >> x, 0); + assertEq(x >>> false, 4294967295); + assertEq(false >>> x, 0); + assertEq(x << false, -1); + assertEq(false << x, 0); + assertEq(x | true, -1); + assertEq(true | x, -1); + assertEq(x & true, 1); + assertEq(true & x, 1); + assertEq(x ^ true, -2); + assertEq(true ^ x, -2); + assertEq(x >> true, -1); + assertEq(true >> x, 0); + assertEq(x >>> true, 2147483647); + assertEq(true >>> x, 0); + assertEq(x << true, -2); + assertEq(true << x, -2147483648); + assertEq(x | -1.5, -1); + assertEq(-1.5 | x, -1); + assertEq(x & -1.5, -1); + assertEq(-1.5 & x, -1); + assertEq(x ^ -1.5, 0); + assertEq(-1.5 ^ x, 0); + assertEq(x >> -1.5, -1); + assertEq(-1.5 >> x, -1); + assertEq(x >>> -1.5, 1); + assertEq(-1.5 >>> x, 1); + assertEq(x << -1.5, -2147483648); + assertEq(-1.5 << x, -2147483648); +} +test3(-1) + +function test4 (x) { + assertEq(x | -1, -1); + assertEq(-1 | x, -1); + assertEq(x & -1, -2147483648); + assertEq(-1 & x, -2147483648); + assertEq(x ^ -1, 2147483647); + assertEq(-1 ^ x, 2147483647); + assertEq(x >> -1, -1); + assertEq(-1 >> x, -1); + assertEq(x >>> -1, 1); + assertEq(-1 >>> x, 4294967295); + assertEq(x << -1, 0); + assertEq(-1 << x, -1); + assertEq(x | 1, -2147483647); + assertEq(1 | x, -2147483647); + assertEq(x & 1, 0); + assertEq(1 & x, 0); + assertEq(x ^ 1, -2147483647); + assertEq(1 ^ x, -2147483647); + assertEq(x >> 1, -1073741824); + assertEq(1 >> x, 1); + assertEq(x >>> 1, 1073741824); + assertEq(1 >>> x, 1); + assertEq(x << 1, 0); + assertEq(1 << x, 1); + assertEq(x | 0, -2147483648); + assertEq(0 | x, -2147483648); + assertEq(x & 0, 0); + assertEq(0 & x, 0); + assertEq(x ^ 0, -2147483648); + assertEq(0 ^ x, -2147483648); + assertEq(x >> 0, -2147483648); + assertEq(0 >> x, 0); + assertEq(x >>> 0, 2147483648); + assertEq(0 >>> x, 0); + assertEq(x << 0, -2147483648); + assertEq(0 << x, 0); + assertEq(x | 0xffffffff, -1); + assertEq(0xffffffff | x, -1); + assertEq(x & 0xffffffff, -2147483648); + assertEq(0xffffffff & x, -2147483648); + assertEq(x ^ 0xffffffff, 2147483647); + assertEq(0xffffffff ^ x, 2147483647); + assertEq(x >> 0xffffffff, -1); + assertEq(0xffffffff >> x, -1); + assertEq(x >>> 0xffffffff, 1); + assertEq(0xffffffff >>> x, 4294967295); + assertEq(x << 0xffffffff, 0); + assertEq(0xffffffff << x, -1); + assertEq(x | "10.6", -2147483638); + assertEq("10.6" | x, -2147483638); + assertEq(x & "10.6", 0); + assertEq("10.6" & x, 0); + assertEq(x ^ "10.6", -2147483638); + assertEq("10.6" ^ x, -2147483638); + assertEq(x >> "10.6", -2097152); + assertEq("10.6" >> x, 10); + assertEq(x >>> "10.6", 2097152); + assertEq("10.6" >>> x, 10); + assertEq(x << "10.6", 0); + assertEq("10.6" << x, 10); + assertEq(x | 2147483648, -2147483648); + assertEq(2147483648 | x, -2147483648); + assertEq(x & 2147483648, -2147483648); + assertEq(2147483648 & x, -2147483648); + assertEq(x ^ 2147483648, 0); + assertEq(2147483648 ^ x, 0); + assertEq(x >> 2147483648, -2147483648); + assertEq(2147483648 >> x, -2147483648); + assertEq(x >>> 2147483648, 2147483648); + assertEq(2147483648 >>> x, 2147483648); + assertEq(x << 2147483648, -2147483648); + assertEq(2147483648 << x, -2147483648); + assertEq(x | 4294967296, -2147483648); + assertEq(4294967296 | x, -2147483648); + assertEq(x & 4294967296, 0); + assertEq(4294967296 & x, 0); + assertEq(x ^ 4294967296, -2147483648); + assertEq(4294967296 ^ x, -2147483648); + assertEq(x >> 4294967296, -2147483648); + assertEq(4294967296 >> x, 0); + assertEq(x >>> 4294967296, 2147483648); + assertEq(4294967296 >>> x, 0); + assertEq(x << 4294967296, -2147483648); + assertEq(4294967296 << x, 0); + assertEq(x | undefined, -2147483648); + assertEq(undefined | x, -2147483648); + assertEq(x & undefined, 0); + assertEq(undefined & x, 0); + assertEq(x ^ undefined, -2147483648); + assertEq(undefined ^ x, -2147483648); + assertEq(x >> undefined, -2147483648); + assertEq(undefined >> x, 0); + assertEq(x >>> undefined, 2147483648); + assertEq(undefined >>> x, 0); + assertEq(x << undefined, -2147483648); + assertEq(undefined << x, 0); + assertEq(x | null, -2147483648); + assertEq(null | x, -2147483648); + assertEq(x & null, 0); + assertEq(null & x, 0); + assertEq(x ^ null, -2147483648); + assertEq(null ^ x, -2147483648); + assertEq(x >> null, -2147483648); + assertEq(null >> x, 0); + assertEq(x >>> null, 2147483648); + assertEq(null >>> x, 0); + assertEq(x << null, -2147483648); + assertEq(null << x, 0); + assertEq(x | false, -2147483648); + assertEq(false | x, -2147483648); + assertEq(x & false, 0); + assertEq(false & x, 0); + assertEq(x ^ false, -2147483648); + assertEq(false ^ x, -2147483648); + assertEq(x >> false, -2147483648); + assertEq(false >> x, 0); + assertEq(x >>> false, 2147483648); + assertEq(false >>> x, 0); + assertEq(x << false, -2147483648); + assertEq(false << x, 0); + assertEq(x | true, -2147483647); + assertEq(true | x, -2147483647); + assertEq(x & true, 0); + assertEq(true & x, 0); + assertEq(x ^ true, -2147483647); + assertEq(true ^ x, -2147483647); + assertEq(x >> true, -1073741824); + assertEq(true >> x, 1); + assertEq(x >>> true, 1073741824); + assertEq(true >>> x, 1); + assertEq(x << true, 0); + assertEq(true << x, 1); + assertEq(x | -1.5, -1); + assertEq(-1.5 | x, -1); + assertEq(x & -1.5, -2147483648); + assertEq(-1.5 & x, -2147483648); + assertEq(x ^ -1.5, 2147483647); + assertEq(-1.5 ^ x, 2147483647); + assertEq(x >> -1.5, -1); + assertEq(-1.5 >> x, -1); + assertEq(x >>> -1.5, 1); + assertEq(-1.5 >>> x, 4294967295); + assertEq(x << -1.5, 0); + assertEq(-1.5 << x, -1); +} +test4(2147483648) + +function test5 (x) { + assertEq(x | -1, -1); + assertEq(-1 | x, -1); + assertEq(x & -1, -2147483648); + assertEq(-1 & x, -2147483648); + assertEq(x ^ -1, 2147483647); + assertEq(-1 ^ x, 2147483647); + assertEq(x >> -1, -1); + assertEq(-1 >> x, -1); + assertEq(x >>> -1, 1); + assertEq(-1 >>> x, 4294967295); + assertEq(x << -1, 0); + assertEq(-1 << x, -1); + assertEq(x | 1, -2147483647); + assertEq(1 | x, -2147483647); + assertEq(x & 1, 0); + assertEq(1 & x, 0); + assertEq(x ^ 1, -2147483647); + assertEq(1 ^ x, -2147483647); + assertEq(x >> 1, -1073741824); + assertEq(1 >> x, 1); + assertEq(x >>> 1, 1073741824); + assertEq(1 >>> x, 1); + assertEq(x << 1, 0); + assertEq(1 << x, 1); + assertEq(x | 0, -2147483648); + assertEq(0 | x, -2147483648); + assertEq(x & 0, 0); + assertEq(0 & x, 0); + assertEq(x ^ 0, -2147483648); + assertEq(0 ^ x, -2147483648); + assertEq(x >> 0, -2147483648); + assertEq(0 >> x, 0); + assertEq(x >>> 0, 2147483648); + assertEq(0 >>> x, 0); + assertEq(x << 0, -2147483648); + assertEq(0 << x, 0); + assertEq(x | 0xffffffff, -1); + assertEq(0xffffffff | x, -1); + assertEq(x & 0xffffffff, -2147483648); + assertEq(0xffffffff & x, -2147483648); + assertEq(x ^ 0xffffffff, 2147483647); + assertEq(0xffffffff ^ x, 2147483647); + assertEq(x >> 0xffffffff, -1); + assertEq(0xffffffff >> x, -1); + assertEq(x >>> 0xffffffff, 1); + assertEq(0xffffffff >>> x, 4294967295); + assertEq(x << 0xffffffff, 0); + assertEq(0xffffffff << x, -1); + assertEq(x | "10.6", -2147483638); + assertEq("10.6" | x, -2147483638); + assertEq(x & "10.6", 0); + assertEq("10.6" & x, 0); + assertEq(x ^ "10.6", -2147483638); + assertEq("10.6" ^ x, -2147483638); + assertEq(x >> "10.6", -2097152); + assertEq("10.6" >> x, 10); + assertEq(x >>> "10.6", 2097152); + assertEq("10.6" >>> x, 10); + assertEq(x << "10.6", 0); + assertEq("10.6" << x, 10); + assertEq(x | 2147483648, -2147483648); + assertEq(2147483648 | x, -2147483648); + assertEq(x & 2147483648, -2147483648); + assertEq(2147483648 & x, -2147483648); + assertEq(x ^ 2147483648, 0); + assertEq(2147483648 ^ x, 0); + assertEq(x >> 2147483648, -2147483648); + assertEq(2147483648 >> x, -2147483648); + assertEq(x >>> 2147483648, 2147483648); + assertEq(2147483648 >>> x, 2147483648); + assertEq(x << 2147483648, -2147483648); + assertEq(2147483648 << x, -2147483648); + assertEq(x | 4294967296, -2147483648); + assertEq(4294967296 | x, -2147483648); + assertEq(x & 4294967296, 0); + assertEq(4294967296 & x, 0); + assertEq(x ^ 4294967296, -2147483648); + assertEq(4294967296 ^ x, -2147483648); + assertEq(x >> 4294967296, -2147483648); + assertEq(4294967296 >> x, 0); + assertEq(x >>> 4294967296, 2147483648); + assertEq(4294967296 >>> x, 0); + assertEq(x << 4294967296, -2147483648); + assertEq(4294967296 << x, 0); + assertEq(x | undefined, -2147483648); + assertEq(undefined | x, -2147483648); + assertEq(x & undefined, 0); + assertEq(undefined & x, 0); + assertEq(x ^ undefined, -2147483648); + assertEq(undefined ^ x, -2147483648); + assertEq(x >> undefined, -2147483648); + assertEq(undefined >> x, 0); + assertEq(x >>> undefined, 2147483648); + assertEq(undefined >>> x, 0); + assertEq(x << undefined, -2147483648); + assertEq(undefined << x, 0); + assertEq(x | null, -2147483648); + assertEq(null | x, -2147483648); + assertEq(x & null, 0); + assertEq(null & x, 0); + assertEq(x ^ null, -2147483648); + assertEq(null ^ x, -2147483648); + assertEq(x >> null, -2147483648); + assertEq(null >> x, 0); + assertEq(x >>> null, 2147483648); + assertEq(null >>> x, 0); + assertEq(x << null, -2147483648); + assertEq(null << x, 0); + assertEq(x | false, -2147483648); + assertEq(false | x, -2147483648); + assertEq(x & false, 0); + assertEq(false & x, 0); + assertEq(x ^ false, -2147483648); + assertEq(false ^ x, -2147483648); + assertEq(x >> false, -2147483648); + assertEq(false >> x, 0); + assertEq(x >>> false, 2147483648); + assertEq(false >>> x, 0); + assertEq(x << false, -2147483648); + assertEq(false << x, 0); + assertEq(x | true, -2147483647); + assertEq(true | x, -2147483647); + assertEq(x & true, 0); + assertEq(true & x, 0); + assertEq(x ^ true, -2147483647); + assertEq(true ^ x, -2147483647); + assertEq(x >> true, -1073741824); + assertEq(true >> x, 1); + assertEq(x >>> true, 1073741824); + assertEq(true >>> x, 1); + assertEq(x << true, 0); + assertEq(true << x, 1); + assertEq(x | -1.5, -1); + assertEq(-1.5 | x, -1); + assertEq(x & -1.5, -2147483648); + assertEq(-1.5 & x, -2147483648); + assertEq(x ^ -1.5, 2147483647); + assertEq(-1.5 ^ x, 2147483647); + assertEq(x >> -1.5, -1); + assertEq(-1.5 >> x, -1); + assertEq(x >>> -1.5, 1); + assertEq(-1.5 >>> x, 4294967295); + assertEq(x << -1.5, 0); + assertEq(-1.5 << x, -1); +} +test5(-2147483648) + + diff --git a/js/src/jit-test/tests/basic/testBitwise.js b/js/src/jit-test/tests/basic/testBitwise.js new file mode 100644 index 0000000000..5d940a556b --- /dev/null +++ b/js/src/jit-test/tests/basic/testBitwise.js @@ -0,0 +1,12 @@ +function testBitwise() { + var x = 10000; + var y = 123456; + var z = 987234; + for (var i = 0; i < 50; i++) { + x = x ^ y; + y = y | z; + z = ~x; + } + return x + y + z; +} +assertEq(testBitwise(), -1298); diff --git a/js/src/jit-test/tests/basic/testBoolToString.js b/js/src/jit-test/tests/basic/testBoolToString.js new file mode 100644 index 0000000000..9eeb40c5d5 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBoolToString.js @@ -0,0 +1,3 @@ +// |jit-test| error: TypeError; +var bts = true.toString; +bts(); diff --git a/js/src/jit-test/tests/basic/testBoxDoubleWithDoubleSizedInt.js b/js/src/jit-test/tests/basic/testBoxDoubleWithDoubleSizedInt.js new file mode 100644 index 0000000000..5327e56e5f --- /dev/null +++ b/js/src/jit-test/tests/basic/testBoxDoubleWithDoubleSizedInt.js @@ -0,0 +1,10 @@ +function testBoxDoubleWithDoubleSizedInt() +{ + var i = 0; + var a = new Array(3); + + while (i < a.length) + a[i++] = 0x5a827999; + return a.join(","); +} +assertEq(testBoxDoubleWithDoubleSizedInt(), "1518500249,1518500249,1518500249"); diff --git a/js/src/jit-test/tests/basic/testBranchCse.js b/js/src/jit-test/tests/basic/testBranchCse.js new file mode 100644 index 0000000000..1c99658171 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBranchCse.js @@ -0,0 +1,7 @@ +function testBranchCse() { + empty = []; + out = []; + for (var j=0;j<10;++j) { empty[42]; out.push((1 * (1)) | ""); } + return out.join(","); +} +assertEq(testBranchCse(), "1,1,1,1,1,1,1,1,1,1"); diff --git a/js/src/jit-test/tests/basic/testBranchingLoop.js b/js/src/jit-test/tests/basic/testBranchingLoop.js new file mode 100644 index 0000000000..5c302425fe --- /dev/null +++ b/js/src/jit-test/tests/basic/testBranchingLoop.js @@ -0,0 +1,11 @@ +function testBranchingLoop() { + var x = 0; + for (var i=0; i < 100; ++i) { + if (i == 51) { + x += 10; + } + x++; + } + return x; +} +assertEq(testBranchingLoop(), 110); diff --git a/js/src/jit-test/tests/basic/testBranchingUnstableLoop.js b/js/src/jit-test/tests/basic/testBranchingUnstableLoop.js new file mode 100644 index 0000000000..f8333ecff8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBranchingUnstableLoop.js @@ -0,0 +1,11 @@ +function testBranchingUnstableLoop() { + var x = 0; + for (var i=0; i < 100; ++i) { + if (i == 51) { + x += 10.1; + } + x++; + } + return x; +} +assertEq(testBranchingUnstableLoop(), 110.1); diff --git a/js/src/jit-test/tests/basic/testBranchingUnstableLoopCounter.js b/js/src/jit-test/tests/basic/testBranchingUnstableLoopCounter.js new file mode 100644 index 0000000000..53fff9e087 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBranchingUnstableLoopCounter.js @@ -0,0 +1,11 @@ +function testBranchingUnstableLoopCounter() { + var x = 0; + for (var i=0; i < 100; ++i) { + if (i == 51) { + i += 1.1; + } + x++; + } + return x; +} +assertEq(testBranchingUnstableLoopCounter(), 99); diff --git a/js/src/jit-test/tests/basic/testBranchingUnstableObject.js b/js/src/jit-test/tests/basic/testBranchingUnstableObject.js new file mode 100644 index 0000000000..338ae73c0b --- /dev/null +++ b/js/src/jit-test/tests/basic/testBranchingUnstableObject.js @@ -0,0 +1,13 @@ +function testBranchingUnstableObject() { + var x = {s: "a"}; + var t = ""; + for (var i=0; i < 100; ++i) { + if (i == 51) + { + x.s = 5; + } + t += x.s; + } + return t.length; +} +assertEq(testBranchingUnstableObject(), 100); diff --git a/js/src/jit-test/tests/basic/testBug1126754.js b/js/src/jit-test/tests/basic/testBug1126754.js new file mode 100644 index 0000000000..70f27c29ef --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug1126754.js @@ -0,0 +1,9 @@ +// |jit-test| error:SyntaxError + +(function() { + with ({}) {} + function f() { + ({ *h(){} }) + } + function f +})() diff --git a/js/src/jit-test/tests/basic/testBug1235874.js b/js/src/jit-test/tests/basic/testBug1235874.js new file mode 100644 index 0000000000..8e78410814 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug1235874.js @@ -0,0 +1 @@ +evaluate('evalcx("1")', { fileName: null }); diff --git a/js/src/jit-test/tests/basic/testBug1827733.js b/js/src/jit-test/tests/basic/testBug1827733.js new file mode 100644 index 0000000000..3e35bfe597 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug1827733.js @@ -0,0 +1,9 @@ +function test(a, b) { + return a + b; +} + +try { + disnative(test); +} catch (err) { + assertEq(err.message, "The function hasn't been warmed up, hence no JIT code to disassemble."); +} \ No newline at end of file diff --git a/js/src/jit-test/tests/basic/testBug458838.js b/js/src/jit-test/tests/basic/testBug458838.js new file mode 100644 index 0000000000..59b55a50c9 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug458838.js @@ -0,0 +1,14 @@ +var escape; +function testBug458838() { + var a = 1; + function g() { + var b = 0 + for (var i = 0; i < 10; ++i) { + b += a; + } + return b; + } + + return g(); +} +assertEq(testBug458838(), 10); diff --git a/js/src/jit-test/tests/basic/testBug463490.js b/js/src/jit-test/tests/basic/testBug463490.js new file mode 100644 index 0000000000..730879ead7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug463490.js @@ -0,0 +1,18 @@ +//test no multitrees assert +function testBug463490() { + function f(a, b, d) { + for (var i = 0; i < 10; i++) { + if (d) + b /= 2; + } + return a + b; + } + //integer stable loop + f(2, 2, false); + //double stable loop + f(3, 4.5, false); + //integer unstable branch + f(2, 2, true); + return true; +}; +assertEq(testBug463490(), true); diff --git a/js/src/jit-test/tests/basic/testBug465272.js b/js/src/jit-test/tests/basic/testBug465272.js new file mode 100644 index 0000000000..88a8f064f7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug465272.js @@ -0,0 +1,6 @@ +function testBug465272() { + var a = new Array(5); + for (j=0;j<5;++j) a[j] = "" + ((5) - 2); + return a.join(","); +} +assertEq(testBug465272(), "3,3,3,3,3"); diff --git a/js/src/jit-test/tests/basic/testBug465688.js b/js/src/jit-test/tests/basic/testBug465688.js new file mode 100644 index 0000000000..40cdde52b9 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug465688.js @@ -0,0 +1,6 @@ +//test no assert +function testBug465688() { + for (let d of [-0x80000000, -0x80000000]) - -d; + return true; +} +assertEq(testBug465688(), true); diff --git a/js/src/jit-test/tests/basic/testBug466262.js b/js/src/jit-test/tests/basic/testBug466262.js new file mode 100644 index 0000000000..450d095030 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug466262.js @@ -0,0 +1,11 @@ +//test no assert +function testBug466262() { + var e = 1; + for (var d = 0; d < 3; ++d) { + if (d == 2) { + e = ""; + } + } + return true; +} +assertEq(testBug466262(), true); diff --git a/js/src/jit-test/tests/basic/testBug501690.js b/js/src/jit-test/tests/basic/testBug501690.js new file mode 100644 index 0000000000..9fa65b6c24 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug501690.js @@ -0,0 +1,14 @@ +function testBug501690() { + // Property cache assertion when 3 objects along a prototype chain have the same shape. + function B(){} + B.prototype = {x: 123}; + + function D(){} + D.prototype = new B; + D.prototype.x = 1; // [1] shapeOf(B.prototype) == shapeOf(D.prototype) + + arr = [new D, new D, new D, D.prototype]; // [2] all the same shape + for (var i = 0; i < 4; i++) + assertEq(arr[i].x, 1); // same kshape [2], same vshape [1] +} +testBug501690(); diff --git a/js/src/jit-test/tests/basic/testBug502914.js b/js/src/jit-test/tests/basic/testBug502914.js new file mode 100644 index 0000000000..d01ee9786e --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug502914.js @@ -0,0 +1,19 @@ +function testBug502914() { + // Assigning a non-function to a function-valued property on trace should + // bump the shape. + function f1() {} + function C() {} + var x = C.prototype = {m: f1}; + x.m(); // brand scope + var arr = [new C, new C, new C, x]; + try { + for (var i = 0; i < 4; i++) { + arr[i].m = 12; + x.m(); // should throw last time through + } + } catch (exc) { + return exc.constructor.name; + } + return "no exception"; +} +assertEq(testBug502914(), "TypeError"); diff --git a/js/src/jit-test/tests/basic/testBug504520.js b/js/src/jit-test/tests/basic/testBug504520.js new file mode 100644 index 0000000000..ba5f767640 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug504520.js @@ -0,0 +1,11 @@ +function testBug504520() { + // A bug involving comparisons. + var arr = [1/0, 1/0, 1/0, 1/0, 1/0, 1/0, 1/0, 1/0, 1/0, 0]; + assertEq(arr.length > 9, true); + + var s = ''; + for (var i = 0; i < arr.length; i++) + arr[i] >= 1/0 ? null : (s += i); + assertEq(s, '9'); +} +testBug504520(); diff --git a/js/src/jit-test/tests/basic/testBug504520Harder.js b/js/src/jit-test/tests/basic/testBug504520Harder.js new file mode 100644 index 0000000000..9a08193195 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug504520Harder.js @@ -0,0 +1,33 @@ +function testBug504520Harder() { + // test 1024 similar cases + var vals = [1/0, -1/0, 0, 0/0]; + var ops = ["===", "!==", "==", "!=", "<", ">", "<=", ">="]; + for (var x of vals) { + for (var y of vals) { + for (var op of ops) { + for (var z of vals) { + // Assume eval is correct. This depends on the global + // Infinity property not having been reassigned. + var xz = eval(x + op + z); + var yz = eval(y + op + z); + + var arr = [x, x, x, x, x, x, x, x, x, y]; + assertEq(arr.length > 9, true); + var expected = [xz, xz, xz, xz, xz, xz, xz, xz, xz, yz]; + + // ?: looks superfluous but that's what we're testing here + var fun = eval( + '(function (arr, results) {\n' + + ' for (let i = 0; i < arr.length; i++)\n' + + ' results.push(arr[i]' + op + z + ' ? "true" : "false");\n' + + '});\n'); + var actual = []; + fun(arr, actual); + print(x, y, op, z); + assertEq("" + actual, "" + expected); + } + } + } + } +} +testBug504520Harder(); diff --git a/js/src/jit-test/tests/basic/testBug507425.js b/js/src/jit-test/tests/basic/testBug507425.js new file mode 100644 index 0000000000..616bababde --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug507425.js @@ -0,0 +1,14 @@ +// |jit-test| allow-oom; +function testBug507425() { + var r = /x/; + for (var i = 0; i < 3; i++) + r.lastIndex = 0; // call a setter + var s = ';'; + try { + for (i = 0; i < 80; i++) + s += s; // call js_CanLeaveTrace + } catch (exc) { + return "ok"; + } +} +assertEq(testBug507425(), "ok"); diff --git a/js/src/jit-test/tests/basic/testBug520503-1.js b/js/src/jit-test/tests/basic/testBug520503-1.js new file mode 100644 index 0000000000..a3730e5a34 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug520503-1.js @@ -0,0 +1,3 @@ +(new Function("for (var j=0; j<9; ++j) { (function sum_indexing(array,start){return array.length==start ? 0 : array[start]+ sum_indexing(array,start+1)})([true,true,undefined],0)}"))() + +/* Should not have crashed. */ diff --git a/js/src/jit-test/tests/basic/testBug520503-3.js b/js/src/jit-test/tests/basic/testBug520503-3.js new file mode 100644 index 0000000000..1385af09a9 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug520503-3.js @@ -0,0 +1,6 @@ +(Function("for (var a = 0; a < 6; a++) {\ + (function sum_indexing(b, c) {\ + return b.length == c ? 0 : b[c] + sum_indexing(b, c + 1)\ + })([(void 0), Infinity, Infinity], 0)\ +}"))() + diff --git a/js/src/jit-test/tests/basic/testBug529147.js b/js/src/jit-test/tests/basic/testBug529147.js new file mode 100644 index 0000000000..8b700879d8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug529147.js @@ -0,0 +1,22 @@ +var magicNumbers = [1, -1, 0, 0]; +var magicIndex = 0; + +var sum = 0; + +function foo(n) { + for (var i = 0; i < n; ++i) { + sum += 10; + bar(); + } +} + +function bar() { + var q = magicNumbers[magicIndex++]; + if (q != -1) { + sum += 1; + foo(q); + } +} + +foo(3); +assertEq(sum, 43); diff --git a/js/src/jit-test/tests/basic/testBug547791.js b/js/src/jit-test/tests/basic/testBug547791.js new file mode 100644 index 0000000000..2d4482eb51 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug547791.js @@ -0,0 +1,21 @@ + +function Bext(k) { + if (k > 0) { + let i = k + 1; + if (k == 10) { + function x () { i = 2; } + } + Bext(i - 2); + Bext(i - 2); + } + return 0; +} + +function f() { + Bext(12); +} + +f(); + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/basic/testBug550210.js b/js/src/jit-test/tests/basic/testBug550210.js new file mode 100644 index 0000000000..1e722bd14f --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug550210.js @@ -0,0 +1,16 @@ +function g(e) { + return ("" + e); +} + +function* blah() { + do { + yield; + } while ({}(p = arguments)); +} +rv = blah(); +try { + for (a of rv) ; +} catch (e) { + print("" + g(e)); +} +gc(); diff --git a/js/src/jit-test/tests/basic/testBug552248.js b/js/src/jit-test/tests/basic/testBug552248.js new file mode 100644 index 0000000000..ec310d158b --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug552248.js @@ -0,0 +1,37 @@ +load(libdir + "evalInFrame.js"); + +var a = new Array(); + +function i(save) { + var x = 9; + evalInFrame(0, "a.push(x)", save); + evalInFrame(1, "a.push(z)", save); + evalInFrame(2, "a.push(z)", save); + evalInFrame(3, "a.push(y)", save); + evalInFrame(4, "a.push(x)", save); +} + +function h() { + var z = 5; + evalInFrame(0, "a.push(z)"); + evalInFrame(1, "a.push(y)"); + evalInFrame(2, "a.push(x)"); + evalInFrame(0, "i(false)"); + evalInFrame(0, "a.push(z)", true); + evalInFrame(1, "a.push(y)", true); + evalInFrame(2, "a.push(x)", true); + evalInFrame(0, "i(true)", true); +} + +function g() { + var y = 4; + h(); +} + +function f() { + var x = 3; + g(); +} + +f(); +assertEq(a+'', [5, 4, 3, 9, 5, 5, 4, 3, 5, 4, 3, 9, 5, 5, 4, 3]+''); diff --git a/js/src/jit-test/tests/basic/testBug554043.js b/js/src/jit-test/tests/basic/testBug554043.js new file mode 100644 index 0000000000..a0071aeb80 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug554043.js @@ -0,0 +1,6 @@ +(function () { + for (var a = 0; a < 5; a++) { + print(-false) + assertEq(-false, -0.0); + } +})() diff --git a/js/src/jit-test/tests/basic/testBug555484.js b/js/src/jit-test/tests/basic/testBug555484.js new file mode 100644 index 0000000000..f15f2b268a --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug555484.js @@ -0,0 +1,8 @@ +var result = ""; +o = { valueOf:function(){ throw "cow" } }; +try { + String.fromCharCode(o); +} catch (e) { + result = e.toString(); +} +assertEq(result, "cow"); diff --git a/js/src/jit-test/tests/basic/testBug558446.js b/js/src/jit-test/tests/basic/testBug558446.js new file mode 100644 index 0000000000..8560de0947 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug558446.js @@ -0,0 +1,10 @@ +function f(a, b) { return a + " " + b; } + +for (var i = 0; i < 10; ++i) { + var s = ''; + var a = {toString: function () { s += 'a'; return 'a'; }}; + var b = {toString: function () { s += 'b'; return 'b'; }}; + f(a, b); + assertEq(s, 'ab'); +} + diff --git a/js/src/jit-test/tests/basic/testBug579602.js b/js/src/jit-test/tests/basic/testBug579602.js new file mode 100644 index 0000000000..3ad40a64ad --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug579602.js @@ -0,0 +1,21 @@ +// don't panic + +f = function*() { + x = yield +} +rv = f() +for (a of rv) (function() {}) +x = new Proxy({}, (function() { + return { + defineProperty: gc + } +})()); +with({ + d: (({ + x: Object.defineProperty(x, "", ({ + set: Array.e + })) + })) +}) {} + +// don't crash diff --git a/js/src/jit-test/tests/basic/testBug582766.js b/js/src/jit-test/tests/basic/testBug582766.js new file mode 100644 index 0000000000..cfcafbed08 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug582766.js @@ -0,0 +1,18 @@ +expected = 4; + +var fourth = { nextSibling: null }; +var third = { nextSibling: fourth }; +var second = { nextSibling: third }; +var first = { nextSibling: second }; + +function f() { + let loopcount = 0; + for (let node = first; node; node = node.nextSibling) { + loopcount++; + } + return loopcount; +} + +actual = f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/basic/testBug586866.js b/js/src/jit-test/tests/basic/testBug586866.js new file mode 100644 index 0000000000..425bf2b782 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug586866.js @@ -0,0 +1,16 @@ +var magic = 8; + +var obj = {}; +for (var i = 1; i <= magic; ++i) + obj[i] = "a"; + +function func() { + var i = 1; + while (i in obj) { + ++i; + } + return i - 1; +} +assertEq(func(), magic); +assertEq(func(), magic); +assertEq(func(), magic); diff --git a/js/src/jit-test/tests/basic/testBug593559.js b/js/src/jit-test/tests/basic/testBug593559.js new file mode 100644 index 0000000000..d9445c8b2f --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug593559.js @@ -0,0 +1,9 @@ +var gen = (function* () {yield})(); +var t = gen.throw; +try { + new t; +} catch (e) { + actual = e; +} +assertEq(actual.name, "TypeError"); +assertEq(/is not a constructor/.test(actual.message), true); diff --git a/js/src/jit-test/tests/basic/testBug602413.js b/js/src/jit-test/tests/basic/testBug602413.js new file mode 100644 index 0000000000..eeef15cbee --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug602413.js @@ -0,0 +1,45 @@ +var so = []; + +function U(unusedV) +{ + for (var i = 0; i < so.length; ++i) + return false; + so.push(0); +} + +function C(v) +{ + if (typeof v == "object" || typeof v == "function") { + for (var i = 0; i < 10; ++i) {} + U(v); + } +} + +function exploreProperties(obj) +{ + var props = []; + for (var o = obj; o; o = Object.getPrototypeOf(o)) { + props = props.concat(Object.getOwnPropertyNames(o)); + } + for (var i = 0; i < props.length; ++i) { + var p = props[i]; + try { + var v = obj[p]; + C(v); + } catch(e) { } + } +} + +function boom() +{ + var a = []; + var b = function(){}; + var c = [{}]; + exploreProperties(a); + exploreProperties(b); + exploreProperties(c); + exploreProperties(c); +} + +boom(); + diff --git a/js/src/jit-test/tests/basic/testBug604210.js b/js/src/jit-test/tests/basic/testBug604210.js new file mode 100644 index 0000000000..146eaf1801 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug604210.js @@ -0,0 +1,11 @@ +function f() { + var ex; + try { + var x = undefined; + print(x.foo); + } catch (e) { + ex = e; + } + assertEq(/(x is|"foo" of) undefined/.test(ex.message), true); +} +f(); diff --git a/js/src/jit-test/tests/basic/testBug606138.js b/js/src/jit-test/tests/basic/testBug606138.js new file mode 100644 index 0000000000..141bf25345 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug606138.js @@ -0,0 +1,3 @@ +// The proxy is going to mutate thisv in place. InvokeSessionGuard should be +// cool with that +with(evalcx(''))[7, 8].map((n) => new Int16Array(n), []) diff --git a/js/src/jit-test/tests/basic/testBug607659.js b/js/src/jit-test/tests/basic/testBug607659.js new file mode 100644 index 0000000000..edfda935c3 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug607659.js @@ -0,0 +1,8 @@ +var g = 0; +Object.defineProperty(RegExp.prototype, 'test', { get:function() { ++g } }); +function f() { + for (var i = 0; i < 100; ++i) + /a/.exec('a'); +} +f(); +assertEq(g, 0); diff --git a/js/src/jit-test/tests/basic/testBug614653.js b/js/src/jit-test/tests/basic/testBug614653.js new file mode 100644 index 0000000000..e09759ae58 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug614653.js @@ -0,0 +1,10 @@ +/* Bug 614653 - This test .2 seconds with the fix, 20 minutes without. */ +for (var i = 0; i < 10; ++i) { + var arr = []; + var s = "abcdefghijklmnop"; + for (var j = 0; j < 50000; ++j) { + s = "<" + s + ">"; + arr.push(s); + } + gc(); +} diff --git a/js/src/jit-test/tests/basic/testBug614752.js b/js/src/jit-test/tests/basic/testBug614752.js new file mode 100644 index 0000000000..d34392da10 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug614752.js @@ -0,0 +1,3 @@ +// |jit-test| error: TypeError +Object.prototype.apply = Function.prototype.apply; +({}).apply(null, null); // don't assert diff --git a/js/src/jit-test/tests/basic/testBug616454.js b/js/src/jit-test/tests/basic/testBug616454.js new file mode 100644 index 0000000000..34ca440a7a --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug616454.js @@ -0,0 +1,2 @@ +function isnan(x) { return x !== x } +assertEq(isnan(deserialize(serialize(-'test'))), true); diff --git a/js/src/jit-test/tests/basic/testBug621202.js b/js/src/jit-test/tests/basic/testBug621202.js new file mode 100644 index 0000000000..5bf8269103 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug621202.js @@ -0,0 +1,16 @@ +const MAX = 10000; + +var arr = []; +var str = ""; +for (var i = 0; i < MAX; ++i) { + /x/.test(str); + str = str + 'xxxxxxxxxxxxxx'; + arr.push(str); +} + +arr.length = Math.floor(MAX/3); +gc(); + +for (var i = 0; i < MAX; ++i) { + /x/.test(arr[i]); +} diff --git a/js/src/jit-test/tests/basic/testBug628564.js b/js/src/jit-test/tests/basic/testBug628564.js new file mode 100644 index 0000000000..8e9455064f --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug628564.js @@ -0,0 +1,8 @@ +x = 0 +for (a = 0; a < 13; ++a) { + if (a == 7) { + if (!x) { + this.__defineSetter__("x", Object.defineProperties) + } + } +} diff --git a/js/src/jit-test/tests/basic/testBug629974.js b/js/src/jit-test/tests/basic/testBug629974.js new file mode 100644 index 0000000000..50e7247f4f --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug629974.js @@ -0,0 +1,7 @@ +foo = {} +foo.y = 3; +foo.y = function () {} +Object.defineProperty(foo, "y", { set:function(){} }) +gc() +delete foo.y +gc(); diff --git a/js/src/jit-test/tests/basic/testBug630064.js b/js/src/jit-test/tests/basic/testBug630064.js new file mode 100644 index 0000000000..aab4885cc5 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug630064.js @@ -0,0 +1,48 @@ +var BUGNUMBER = ''; +function printBugNumber (num) +{ + return "foo"; +} +function optionsClear() { + var x = printBugNumber().split(','); +} +function optionsReset() { + optionsClear(); +} +var code = new Array(); +code.push("evaluate"); +var x0 = "\ + printBugNumber(BUGNUMBER);\n\ + function gen()\n\ + {\n\ + try {\n\ + yield 0;\n\ + } finally {\n\ + }\n\ + }\n\ + var iter1 = gen( iter1=\"NaN\", new gen(gen)) ;\n\ + gc();\n\ +"; +code.push(x0); +code.push("evaluate"); +var files = new Array(); +while (true) { + var file = code.shift(); + if (file == "evaluate") { + loadFiles(files); + } else if (file == undefined) { + break; + } else { + files.push(file); + } +} +function loadFiles(x) { + for (i in x) { + try { + eval(x[i]); + } catch (e) { + } + } + optionsReset(); +} + diff --git a/js/src/jit-test/tests/basic/testBug634590.js b/js/src/jit-test/tests/basic/testBug634590.js new file mode 100644 index 0000000000..32df4f3bd8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug634590.js @@ -0,0 +1,12 @@ +this.name = "outer"; +var sb = evalcx(''); +sb.name = "inner"; +sb.parent = this; +function f() { return this.name; } +assertEq(evalcx('this.f = parent.f;\n' + + 'var s = "";\n' + + 'for (i = 0; i < 10; ++i)\n' + + ' s += f();\n' + + 's', + sb), + "outerouterouterouterouterouterouterouterouterouter"); diff --git a/js/src/jit-test/tests/basic/testBug634590b.js b/js/src/jit-test/tests/basic/testBug634590b.js new file mode 100644 index 0000000000..42531a8295 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug634590b.js @@ -0,0 +1,19 @@ +this.name = "outer"; +var sb = evalcx(''); +sb.name = "inner"; +sb.parent = this; +function f() { return this.name; } +f.notMuchTodo = '42'; +assertEq(evalcx('{\n' + + ' let f = parent.f;\n' + + ' let name = "block";\n' + + ' (function () {\n' + + ' eval(f.notMuchTodo);\n' + // reify Block + ' var s = "";\n' + + ' for (i = 0; i < 10; ++i)\n' + + ' s += f();\n' + + ' return s;\n' + + ' })();\n' + + '}', + sb), + "outerouterouterouterouterouterouterouterouterouter"); diff --git a/js/src/jit-test/tests/basic/testBug634590c.js b/js/src/jit-test/tests/basic/testBug634590c.js new file mode 100644 index 0000000000..1ae2542def --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug634590c.js @@ -0,0 +1,20 @@ +this.name = "outer"; +var sb = evalcx(''); +sb.name = "inner"; +sb.parent = this; +function f() { return this.name; } +f.notMuchTodo = '42'; +assertEq(evalcx('(function () {\n' + + ' arguments = null;\n' + // force heavyweight + ' var f = parent.f;\n' + + ' var name = "call";\n' + + ' return (function () {\n' + + ' eval(f.notMuchTodo);\n' + // reify Call, make f() compile to JSOP_CALLNAME + ' var s = "";\n' + + ' for (i = 0; i < 10; ++i)\n' + + ' s += f();\n' + + ' return s;\n' + + ' })();\n' + + '})()', + sb), + "outerouterouterouterouterouterouterouterouterouter"); diff --git a/js/src/jit-test/tests/basic/testBug634590d.js b/js/src/jit-test/tests/basic/testBug634590d.js new file mode 100644 index 0000000000..d2e47b51fa --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug634590d.js @@ -0,0 +1,19 @@ +this.name = "outer"; +var sb = evalcx(''); +sb.name = "inner"; +sb.parent = this; +this.f = function name(outer) { + if (outer) { + return function () { + return name(false); + }(); + } + return this.name; +} +assertEq(evalcx('this.f = parent.f;\n' + + 'var s = "";\n' + + 'for (i = 0; i < 10; ++i)\n' + + ' s += f(true);\n' + + 's', + sb), + "outerouterouterouterouterouterouterouterouterouter"); diff --git a/js/src/jit-test/tests/basic/testBug634590ma.js b/js/src/jit-test/tests/basic/testBug634590ma.js new file mode 100644 index 0000000000..3914cba47a --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug634590ma.js @@ -0,0 +1,14 @@ +// |jit-test| + +this.name = "outer"; +var sb = evalcx(''); +sb.name = "inner"; +sb.parent = this; +function f() { return this.name; } +assertEq(evalcx('this.f = parent.f;\n' + + 'var s = "";\n' + + 'for (i = 0; i < 10; ++i)\n' + + ' s += f();\n' + + 's', + sb), + "outerouterouterouterouterouterouterouterouterouter"); diff --git a/js/src/jit-test/tests/basic/testBug637014.js b/js/src/jit-test/tests/basic/testBug637014.js new file mode 100644 index 0000000000..53e22f8bde --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug637014.js @@ -0,0 +1,2 @@ +var o = newGlobal(); +o.makeFinalizeObserver(); diff --git a/js/src/jit-test/tests/basic/testBug648438.js b/js/src/jit-test/tests/basic/testBug648438.js new file mode 100644 index 0000000000..9bdfc0fbd8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug648438.js @@ -0,0 +1,7 @@ +for (var i = 0; i < 20; i++) { + (function () { + try { + JSON.parse(); + } catch (e) {} + }).call(); +} diff --git a/js/src/jit-test/tests/basic/testBug653396.js b/js/src/jit-test/tests/basic/testBug653396.js new file mode 100644 index 0000000000..6eefdf2289 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug653396.js @@ -0,0 +1,6 @@ +// |jit-test| error: RangeError +function g(a, b, c, d) {} +function f(a, b, c) { + arguments.length = getMaxArgs() + 1; + g.apply(this, arguments); +}f(); diff --git a/js/src/jit-test/tests/basic/testBug659577-1.js b/js/src/jit-test/tests/basic/testBug659577-1.js new file mode 100644 index 0000000000..3ae1a605a3 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug659577-1.js @@ -0,0 +1 @@ +Function("for(;(function(){([x],0)});x){}var x") diff --git a/js/src/jit-test/tests/basic/testBug659577-2.js b/js/src/jit-test/tests/basic/testBug659577-2.js new file mode 100644 index 0000000000..dbd4ec2407 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug659577-2.js @@ -0,0 +1,15 @@ +gczeal(4); +evaluate("\ +Date.formatFunctions = {count:0};\ +Date.prototype.dateFormat = function(format) {\ + var funcName = 'format' + Date.formatFunctions.count++;\ + var code = 'Date.prototype.' + funcName + ' = function(){return ';\ + var ch = '';\ + for (var i = 0; i < format.length; ++i) {\ + ch = format.charAt(i);\ + eval(code.substring(0, code.length - 3) + ';}');\ + }\ +};\ +var date = new Date('1/1/2007 1:11:11');\ + var shortFormat = date.dateFormat('Y-m-d');\ +"); diff --git a/js/src/jit-test/tests/basic/testBug663789-1.js b/js/src/jit-test/tests/basic/testBug663789-1.js new file mode 100644 index 0000000000..4fdc262b51 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug663789-1.js @@ -0,0 +1,6 @@ +function f() { + a = arguments; + return a[0] - a[1]; +} + +[1,2,3,4].sort(f); diff --git a/js/src/jit-test/tests/basic/testBug663789-2.js b/js/src/jit-test/tests/basic/testBug663789-2.js new file mode 100644 index 0000000000..3e1a608bda --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug663789-2.js @@ -0,0 +1,6 @@ +load(libdir + "evalInFrame.js"); + +o = { toString:function() { return evalInFrame(1, "x") } } +var x = 'C'; +var s = "aaaaaaaaaa".replace(/a/g, function() { var x = 'B'; return o }); +assertEq(s, "CCCCCCCCCC"); diff --git a/js/src/jit-test/tests/basic/testBug666003.js b/js/src/jit-test/tests/basic/testBug666003.js new file mode 100644 index 0000000000..b508e7aa55 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug666003.js @@ -0,0 +1,13 @@ +function f() { + f = function() { g(); }; + f(); +} +g = f; + +var caught = false; +try { + f(); +} catch(e) { + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/basic/testBug668479.js b/js/src/jit-test/tests/basic/testBug668479.js new file mode 100644 index 0000000000..30eaca5c40 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug668479.js @@ -0,0 +1,3 @@ +function a() { + with(a) eval("arguments[0]"); +} a(); diff --git a/js/src/jit-test/tests/basic/testBug672436.js b/js/src/jit-test/tests/basic/testBug672436.js new file mode 100644 index 0000000000..95a6d07a1d --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug672436.js @@ -0,0 +1,25 @@ +try { new Error() } catch (e) {} + +const N = 18; + +var arr = []; +for (var i = 0; i < N; ++i) + arr[i] = 'a'; +arr[N] = '%'; + +function inner(i) { + decodeURI(arr[i]); +} +function outer() { + for (var i = 0; i <= N; ++i) + inner(i); +} + +var caught = false; +try { + outer(); +} catch (e) { + caught = true; +} +assertEq(caught, true); + diff --git a/js/src/jit-test/tests/basic/testBug673066.js b/js/src/jit-test/tests/basic/testBug673066.js new file mode 100644 index 0000000000..28aa518028 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug673066.js @@ -0,0 +1,23 @@ +function f(code) { + a = code.replace(/s/, ""); + wtt = a + code = code.replace(/\/\*DUPTRY\d+\*\//, function(k) { + n = parseInt(k.substr(8), 0); + return g("try{}catch(e){}", n) + }); + f = eval("(function(){" + code + "})") + if (typeof disassemble == 'function') { + disassemble("-r", f) + } +} +function g(s, n) { + if (n == 0) { + return s + } + s2 = s + s + r = n % 2 + d = (n - r) / 2 + m = g(s2, d) + return r ? m + s : m +} +f("switch(''){default:break;/*DUPTRY525*/}") diff --git a/js/src/jit-test/tests/basic/testBug673068.js b/js/src/jit-test/tests/basic/testBug673068.js new file mode 100644 index 0000000000..5f2618b1aa --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug673068.js @@ -0,0 +1,12 @@ +// |jit-test| + +function f(x) { + var x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10; + var y0, y1, y2, y3, y4, y5, y6, y7, y8, y9, y10; + var z0, z1, z2, z3, z4, z5, z6, z7, z8, z9, z10; + if (x == 0) + return; + f(x - 1); +} + +f(100); diff --git a/js/src/jit-test/tests/basic/testBug676486.js b/js/src/jit-test/tests/basic/testBug676486.js new file mode 100644 index 0000000000..5f5de23c6a --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug676486.js @@ -0,0 +1,8 @@ +var proxy = new Proxy(function() { + return (function () { eval("foo") })(); + }, {}); + +try { + new proxy(); +} catch (e) { +} diff --git a/js/src/jit-test/tests/basic/testBug686274.js b/js/src/jit-test/tests/basic/testBug686274.js new file mode 100644 index 0000000000..e03fd43542 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug686274.js @@ -0,0 +1,15 @@ +// Don't Baseline-compile the huge array literal with --baseline-eager +// as it's slow, especially in debug builds. +setJitCompilerOption("baseline.warmup.trigger", 2); + +function f(N) { + var body = "return ["; + for (var i = 0; i < N-1; i++) + body += "1,"; + body += "2]"; + var f = new Function(body); + var arr = f(); + assertEq(arr.length, N); + assertEq(arr[N-1], 2); +} +f(1000000); diff --git a/js/src/jit-test/tests/basic/testBug690959.js b/js/src/jit-test/tests/basic/testBug690959.js new file mode 100644 index 0000000000..6f4b800c1e --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug690959.js @@ -0,0 +1,4 @@ +var s = 'abcdFF0123456789012345fail'; +s = s.replace("abcd", "0123456789012345678901234567890123456789012FF"); +s = s.replace("FF0123456789012345fail", "ok"); +assertEq(s, '0123456789012345678901234567890123456789012FFok'); diff --git a/js/src/jit-test/tests/basic/testBug692274-2.js b/js/src/jit-test/tests/basic/testBug692274-2.js new file mode 100644 index 0000000000..dff5c90523 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug692274-2.js @@ -0,0 +1,7 @@ +function f() { + var ss = [new f("abc"), new String("foobar"), new String("quux")]; + for (let a6 = this ;; ) {} +} +try { + f(); +} catch (e) {} diff --git a/js/src/jit-test/tests/basic/testBug692274-3.js b/js/src/jit-test/tests/basic/testBug692274-3.js new file mode 100644 index 0000000000..a8c0afe65f --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug692274-3.js @@ -0,0 +1,16 @@ +var x = -false; +switch(x) { + case 11: + let y = 42; +} +switch(x) { + case 11: + let y = 42; + let z = 'ponies'; +} +switch(x) { + case 11: + let y = 42; + let z = 'ponies'; + let a = false; +} diff --git a/js/src/jit-test/tests/basic/testBug701227.js b/js/src/jit-test/tests/basic/testBug701227.js new file mode 100644 index 0000000000..cf12409fea --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug701227.js @@ -0,0 +1 @@ +(function f() { try {} catch(e) { let x } }).toString() diff --git a/js/src/jit-test/tests/basic/testBug701239.js b/js/src/jit-test/tests/basic/testBug701239.js new file mode 100644 index 0000000000..665134c1d1 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug701239.js @@ -0,0 +1 @@ +(function f(w) { for([w] in 1) {} }).toString(); diff --git a/js/src/jit-test/tests/basic/testBug701244.js b/js/src/jit-test/tests/basic/testBug701244.js new file mode 100644 index 0000000000..4a9931f804 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug701244.js @@ -0,0 +1 @@ +(function f({length}) {}).toString(); diff --git a/js/src/jit-test/tests/basic/testBug703857.js b/js/src/jit-test/tests/basic/testBug703857.js new file mode 100644 index 0000000000..dcdcc1e1f1 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug703857.js @@ -0,0 +1,13 @@ +Function.prototype.X = 42; +function ownProperties() { + var props = {}; + var r = function () {}; + for (var a in r) { + { + let a = function() { for (var r=0;r<6;++r) ++a; }; + a(); + } + props[a] = true; + } +} +ownProperties(); diff --git a/js/src/jit-test/tests/basic/testBug705423.js b/js/src/jit-test/tests/basic/testBug705423.js new file mode 100644 index 0000000000..4ce993c203 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug705423.js @@ -0,0 +1,19 @@ +gczeal(1); + +var g = newGlobal(); + +g.eval("\ +var f = function(x) { \ + arg = arguments; \ + fun = function() { return x }; \ +} \ +"); + +g.f(3); +g.f = null; +assertEq(g.fun(), 3); +assertEq(g.arg[0], 3); +gc(); +g.arg[0] = 9; +assertEq(g.fun(), 9); +assertEq(g.arg[0], 9); diff --git a/js/src/jit-test/tests/basic/testBug714650.js b/js/src/jit-test/tests/basic/testBug714650.js new file mode 100644 index 0000000000..2284faa197 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug714650.js @@ -0,0 +1,36 @@ +{ + let [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], + [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = [], [] = []; + print("ok"); +} diff --git a/js/src/jit-test/tests/basic/testBug720695.js b/js/src/jit-test/tests/basic/testBug720695.js new file mode 100644 index 0000000000..4e3dc764ff --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug720695.js @@ -0,0 +1,16 @@ +var v = [ -0x80000003, -0x80000002, -0x80000001, -0x80000000, -0x7fffffff, -0x7ffffffe, -0x7ffffffd, + -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 20, 21, 100, 101, 110, 111, 500, + 0x7ffffffd, 0x7ffffffe, 0x7fffffff, 0x80000000, 0x80000001, 0x80000002, 0x80000003]; + +function strcmp(x, y) { + return Number(String(x) > String(y)) +} + +for (var i = 0; i < v.length; ++i) { + for (var j = 0; j < v.length; ++j) { + var builtin = String([v[i], v[j]].sort()); + var manual = String([v[i], v[j]].sort(strcmp)); + assertEq(builtin, manual); + } +} diff --git a/js/src/jit-test/tests/basic/testBug723445.js b/js/src/jit-test/tests/basic/testBug723445.js new file mode 100644 index 0000000000..7cbe0a0172 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug723445.js @@ -0,0 +1,10 @@ +var global = newGlobal(); +global.eval("function f(b) { if (b) { new Error }; }"); + +function f(b) { global.f(b) } +function g(b) { f(b) } +function h() { + for (var i = 0; i < 1000; ++i) + g(i > 900); +} +h(); diff --git a/js/src/jit-test/tests/basic/testBug726380.js b/js/src/jit-test/tests/basic/testBug726380.js new file mode 100644 index 0000000000..2f4475674a --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug726380.js @@ -0,0 +1,2 @@ +var r = /a/; +r.compile(r); diff --git a/js/src/jit-test/tests/basic/testBug731181.js b/js/src/jit-test/tests/basic/testBug731181.js new file mode 100644 index 0000000000..9ece975354 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug731181.js @@ -0,0 +1,2 @@ +gczeal(2,1); +/a/y.exec('a'); diff --git a/js/src/jit-test/tests/basic/testBug736012.js b/js/src/jit-test/tests/basic/testBug736012.js new file mode 100644 index 0000000000..fdcb4fc1d5 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug736012.js @@ -0,0 +1,8 @@ +evaluate("\ +function fatty() {\ + try { fatty(); } catch (e) {\ + for (foo of [1]) {}\ + }\ +}\ +fatty();\ +"); diff --git a/js/src/jit-test/tests/basic/testBug736807.js b/js/src/jit-test/tests/basic/testBug736807.js new file mode 100644 index 0000000000..b279b02eb9 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug736807.js @@ -0,0 +1,13 @@ +function f() { + newGlobal().eval('\ + try {\ + if (typeof gczeal === "function") \ + gczeal(2,1); \ + throw new Error();\ + } catch (e) { \ + gc(); \ + assertEq("" + e, "Error"); \ + } \ + '); +} +f({}, [1,2,4,5,6,7,8,1], new RegExp(), function() {}); diff --git a/js/src/jit-test/tests/basic/testBug737388.js b/js/src/jit-test/tests/basic/testBug737388.js new file mode 100644 index 0000000000..1a97ab57fe --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug737388.js @@ -0,0 +1,8 @@ +function one() {}; +function two() { assertEq(arguments[0], undefined); } +function three() { + one("","","","","",""); + two(); +} +for (var i = 0; i < 10; ++i) + three(); diff --git a/js/src/jit-test/tests/basic/testBug737575.js b/js/src/jit-test/tests/basic/testBug737575.js new file mode 100644 index 0000000000..5c0c9705f1 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug737575.js @@ -0,0 +1,6 @@ +function f(s) { + return arguments[s]; +} + +for (var i = 0; i < 10; ++i) + assertEq(f(String(i+1), 0,1,2,3,4,5,6,7,8,9), i); diff --git a/js/src/jit-test/tests/basic/testBug740442.js b/js/src/jit-test/tests/basic/testBug740442.js new file mode 100644 index 0000000000..143ce2da96 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug740442.js @@ -0,0 +1,11 @@ +function g1() {} +function g2() { + return function Int8Array () {}; +} +function f1(other) { + eval("gc(); h = g1"); + for(var i=0; i<20; i++) { + i = i.name; + } +} +f1(g2); diff --git a/js/src/jit-test/tests/basic/testBug740445.js b/js/src/jit-test/tests/basic/testBug740445.js new file mode 100644 index 0000000000..227ddfc236 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug740445.js @@ -0,0 +1,9 @@ +function testMethodInit() { + function o() {} + function k() { + for (i = 0; i < this.depth; ++i) {} + } + for (var i = 0; i < 10; i++) + (i) = {o: o, k: k}; +} +testMethodInit(); diff --git a/js/src/jit-test/tests/basic/testBug741497.js b/js/src/jit-test/tests/basic/testBug741497.js new file mode 100644 index 0000000000..f61138aa44 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug741497.js @@ -0,0 +1,3 @@ +// |jit-test| error: SyntaxError +"use strict"; +function inner() (([arguments, b] = this, c)()); diff --git a/js/src/jit-test/tests/basic/testBug743408.js b/js/src/jit-test/tests/basic/testBug743408.js new file mode 100644 index 0000000000..2c55106584 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug743408.js @@ -0,0 +1,6 @@ +// |jit-test| error:ReferenceError +test(); +function test() { + (arguments); + F.prototype = new F(); +} diff --git a/js/src/jit-test/tests/basic/testBug747554.js b/js/src/jit-test/tests/basic/testBug747554.js new file mode 100644 index 0000000000..8b77ef8a13 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug747554.js @@ -0,0 +1,6 @@ +assertEq((function(x) { + (function () { x++ })(); + var z; + ({ z } = { z:'ponies' }) + return z; +})(), 'ponies'); diff --git a/js/src/jit-test/tests/basic/testBug752205.js b/js/src/jit-test/tests/basic/testBug752205.js new file mode 100644 index 0000000000..edf7348551 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug752205.js @@ -0,0 +1,6 @@ +var x = "one"; +var y = "two"; +const a = x + y; +var hit = false; +eval('switch("onetwo") { case a: hit = true; };'); +assertEq(hit, true); diff --git a/js/src/jit-test/tests/basic/testBug752379.js b/js/src/jit-test/tests/basic/testBug752379.js new file mode 100644 index 0000000000..376657defa --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug752379.js @@ -0,0 +1,10 @@ +var lfcode = new Array(); +lfcode.push(""); +lfcode.push("print('hi');"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file); +} +function loadFile(lfVarx) { + evaluate(lfVarx); +} diff --git a/js/src/jit-test/tests/basic/testBug753158.js b/js/src/jit-test/tests/basic/testBug753158.js new file mode 100644 index 0000000000..50ba14b232 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug753158.js @@ -0,0 +1,67 @@ +function testFuncStmt1() { + var g = 3; + function f(b) { + if (b) { + function g() { return 42 } + assertEq(g(), 42); + } + } + f(true); +} +testFuncStmt1(); + +function testFuncStmt2() { + var g = 3; + (function(b) { + if (b) { + function g() { return 42 } + function f() { assertEq(g(), 42); } + f(); + } + })(true); +} +testFuncStmt2(); + +function testEval1() { + var g = 3; + function f() { + eval("var g = 42"); + assertEq(g, 42); + } + f(); +} +testEval1(); + +function testEval2() { + var g = 3; + (function() { + eval("var g = 42"); + function f() { + assertEq(g, 42); + } + f(); + })(); +} +testEval2(); + +function testWith1() { + var g = 3; + function f() { + with ({g:42}) { + assertEq(g, 42); + } + } + f(); +} +testWith1(); + +function testWith2() { + var g = 3; + with ({g:42}) { + function f() { + assertEq(g, 42); + } + } + f(); +} +testWith2(); diff --git a/js/src/jit-test/tests/basic/testBug755916.js b/js/src/jit-test/tests/basic/testBug755916.js new file mode 100644 index 0000000000..157d3073ac --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug755916.js @@ -0,0 +1,12 @@ +// |jit-test| error:InternalError + +Object.defineProperty(this, "t2", { + get: function() { + for (p in h2) { + t2 + } + } +}) +h2 = {} +h2.a = function() {} +Object(t2) diff --git a/js/src/jit-test/tests/basic/testBug756918.js b/js/src/jit-test/tests/basic/testBug756918.js new file mode 100644 index 0000000000..2787b38813 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug756918.js @@ -0,0 +1,6 @@ +// |jit-test| error:Error + +with({}) + let([] = []) { + eval("throw new Error()"); + } diff --git a/js/src/jit-test/tests/basic/testBug756919.js b/js/src/jit-test/tests/basic/testBug756919.js new file mode 100644 index 0000000000..a72f46bece --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug756919.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('oomTest' in this) +function test(x) { + var upvar = ""; + function f() { upvar += ""; } + if (x > 0) + test(x - 1); + eval(''); +} + +oomTest(() => test(10)); diff --git a/js/src/jit-test/tests/basic/testBug761863.js b/js/src/jit-test/tests/basic/testBug761863.js new file mode 100644 index 0000000000..fc5c12d20b --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug761863.js @@ -0,0 +1,12 @@ +gczeal(4); +function blah() { + var i = 1; + function o() {} + function k() { i++; } + o.x = 0; + for (var j = 0; j < 100; ++j) { + i = {a: o, b: k}; + i++; + } +} +blah(); diff --git a/js/src/jit-test/tests/basic/testBug7618864.js b/js/src/jit-test/tests/basic/testBug7618864.js new file mode 100644 index 0000000000..9b9ba0ec41 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug7618864.js @@ -0,0 +1,55 @@ +function printStatus (msg) { + var lines = msg.split (""); +} +function printBugNumber (num) { + var digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; +} +var lfcode = new Array(); +lfcode.push("gczeal(4);"); +lfcode.push("jsTestDriverEnd();"); +lfcode.push(""); +lfcode.push("var BUGNUMBER = \"(none)\";\ +var summary = \"gen.close(); gen.throw(ex) throws ex forever\";\ +var actual, expect;\ +printBugNumber(BUGNUMBER);\ +printStatus(summary);\ +function gen() {\ + var x = 5, y = 7;\ + yield z;\ +}\ +var failed = false;\ +var it = gen();\ +try {\ + it.close();\ + var doThrow = true;\ + var thrown = \"foobar\";\ + try { } catch (e) { }\ + try { } catch (e) { }\ + throw \"it.throw(\\\"\" + thrown + \"\\\") failed\";\ + var stopPassed = false;\ + try { } catch (e) {\ + if (\"1234\")\ + stopPassed = true;\ + }\ +} catch (e) {}\ +"); +var lfRunTypeId = -1; +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + if (file == "evaluate") { + } else { + loadFile(file); + } +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + } else { + switch (lfRunTypeId) { + default: evaluate(lfVarx); + } + } + } catch (lfVare) { + print(lfVare); + } +} diff --git a/js/src/jit-test/tests/basic/testBug762105.js b/js/src/jit-test/tests/basic/testBug762105.js new file mode 100644 index 0000000000..147a87eac0 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug762105.js @@ -0,0 +1,33 @@ +function escapeme() {} + +function f1(x) { + escapeme(arguments); + var y = ++x; + return x + y; +} +for (var i = 0; i < 100; ++i) + assertEq(f1(2), 6); + +function f2(x) { + escapeme(arguments); + var y = --x; + return x + y; +} +for (var i = 0; i < 100; ++i) + assertEq(f2(2), 2); + +function f3(x) { + escapeme(arguments); + var y = x++; + return x + y; +} +for (var i = 0; i < 100; ++i) + assertEq(f3(2), 5); + +function f4(x) { + escapeme(arguments); + var y = x--; + return x + y; +} +for (var i = 0; i < 100; ++i) + assertEq(f4(2), 3); diff --git a/js/src/jit-test/tests/basic/testBug762432.js b/js/src/jit-test/tests/basic/testBug762432.js new file mode 100644 index 0000000000..c010aefc1e --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug762432.js @@ -0,0 +1,15 @@ +function getter() { return 1; } +function setter() { } +function getDescriptor(target, name) { + if (name != 'prop') + throw "Unknown property: " + name; + return { configurable: true, enumerable: true, get: getter, set: setter }; +} +var handler = { + getOwnPropertyDescriptor: getDescriptor, +}; + +// Make sure that __lookup{Getter,Setter}__ works on proxies. +var proxy = new Proxy({}, handler); +assertEq(Object.prototype.__lookupGetter__.call(proxy, 'prop'), getter); +assertEq(Object.prototype.__lookupSetter__.call(proxy, 'prop'), setter); diff --git a/js/src/jit-test/tests/basic/testBug762450.js b/js/src/jit-test/tests/basic/testBug762450.js new file mode 100644 index 0000000000..2813015a60 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug762450.js @@ -0,0 +1,7 @@ +function f(a, b, c) { + arguments[0] = 3; + return (c--) + 1; +} +var r = f(); +print(r); +assertEq(r !== r, true); diff --git a/js/src/jit-test/tests/basic/testBug762473.js b/js/src/jit-test/tests/basic/testBug762473.js new file mode 100644 index 0000000000..d79bc2e2e4 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug762473.js @@ -0,0 +1,49 @@ +function f(i) { + var a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a16,a17; + var b = true; + if (b) + function f1() {} + if (b) + function f2() {} + if (b) + function f3() {} + if (b) + function f4() {} + if (b) + function f5() {} + if (b) + function f6() {} + if (b) + function f7() {} + if (b) + function f8() {} + if (b) + function f9() {} + if (b) + function f10() {} + if (b) + function f11() {} + if (b) + function f12() {} + if (b) + function f13() {} + if (b) + function f14() {} + if (b) + function f15() {} + if (b) + function f16() {} + if (b) + function f17() {} + + a1 = i; + + function f() { + return a1; + } + + return f(); +} + +for (var i = 0; i < 100; ++i) + assertEq(f(i), i); diff --git a/js/src/jit-test/tests/basic/testBug763384.js b/js/src/jit-test/tests/basic/testBug763384.js new file mode 100644 index 0000000000..572941366d --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug763384.js @@ -0,0 +1,9 @@ +var caught = false; +try { + ''.match('('); +} catch (e) { + caught = true; + assertEq(e instanceof Error, true); + assertEq(('' + e).indexOf('SyntaxError') === -1, false); +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/basic/testBug763950.js b/js/src/jit-test/tests/basic/testBug763950.js new file mode 100644 index 0000000000..6f685217fd --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug763950.js @@ -0,0 +1,6 @@ +(function() { + var x; + for (let j = 0; j < 1; j = j + 1) + x = function() { return j; }; + assertEq(x(), 0); +})(); diff --git a/js/src/jit-test/tests/basic/testBug766064.js b/js/src/jit-test/tests/basic/testBug766064.js new file mode 100644 index 0000000000..cd13f1f674 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug766064.js @@ -0,0 +1,7 @@ +function loop(actual = 0) { + if (function() { actual++ }) + {} + return actual; +} + +assertEq(loop(), 0); diff --git a/js/src/jit-test/tests/basic/testBug769987.js b/js/src/jit-test/tests/basic/testBug769987.js new file mode 100644 index 0000000000..52bcdc1118 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug769987.js @@ -0,0 +1,13 @@ +function h(code) { + f = Function(code); + g() +} +function g() { + f() +} +h() +h() +h("\ + arguments[\"0\"];\ + gc();\ +") diff --git a/js/src/jit-test/tests/basic/testBug770407.js b/js/src/jit-test/tests/basic/testBug770407.js new file mode 100644 index 0000000000..54184fab41 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug770407.js @@ -0,0 +1,4 @@ +// |jit-test| error:TypeError +var otherGlobal = newGlobal(); +var proxy = new (otherGlobal.Proxy)({}, {}); +Int8Array.set(proxy); diff --git a/js/src/jit-test/tests/basic/testBug772328.js b/js/src/jit-test/tests/basic/testBug772328.js new file mode 100644 index 0000000000..4b465b0a22 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug772328.js @@ -0,0 +1,20 @@ +function f(x) { + function x() {} + arguments[0] = 42; + return x; +} +assertEq(f(0), 42); + +function g(x) { + function x() {} + assertEq(arguments[0], x); +} +g(0); + +var caught = false; +try { + (function h(x) { function x() {} }).blah.baz; +} catch (e) { + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/basic/testBug775801.js b/js/src/jit-test/tests/basic/testBug775801.js new file mode 100644 index 0000000000..35ced600ec --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug775801.js @@ -0,0 +1,8 @@ +function f() { + var x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20; + var b = {a:'ponies'}; + eval(''); + return function(e) { return b[e] } +} + +assertEq("aaa".replace(/a/g, f()), "poniesponiesponies"); diff --git a/js/src/jit-test/tests/basic/testBug775807.js b/js/src/jit-test/tests/basic/testBug775807.js new file mode 100644 index 0000000000..b136b0a81b --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug775807.js @@ -0,0 +1,19 @@ +// |jit-test| --dump-bytecode + +(function() { + const x = ((function() { + return { + e: function() { + (function() { + for (e in x) {} + })() + } + } + }(function() { + return { + t: { + c + } + } + }))) +})() diff --git a/js/src/jit-test/tests/basic/testBug776191.js b/js/src/jit-test/tests/basic/testBug776191.js new file mode 100644 index 0000000000..043e50111d --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug776191.js @@ -0,0 +1,8 @@ +(function() { + { + let a, b, c; + ((function() { + with({}) { { let b; { ((function() { c = 0 })()) } } } + })()) + } +})() diff --git a/js/src/jit-test/tests/basic/testBug778603.js b/js/src/jit-test/tests/basic/testBug778603.js new file mode 100644 index 0000000000..9df17d04ea --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug778603.js @@ -0,0 +1 @@ +assertEq(unescape("0%u0000".substr(0,2)), "0%"); diff --git a/js/src/jit-test/tests/basic/testBug780712.js b/js/src/jit-test/tests/basic/testBug780712.js new file mode 100644 index 0000000000..f82ad8db0f --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug780712.js @@ -0,0 +1,9 @@ +r = evalcx("/x/", undefined); +s = ""; +gc() +Function("\ + s.match(r);\ + schedulezone(__proto__);\ + ({c:schedulegc(2)});\ + s.match(r);\ +")() diff --git a/js/src/jit-test/tests/basic/testBug783441.js b/js/src/jit-test/tests/basic/testBug783441.js new file mode 100644 index 0000000000..b1d6af68ab --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug783441.js @@ -0,0 +1 @@ +assertEq((function(x, y, x) { return (function() { return x+y; })(); })(1,2,5), 7); diff --git a/js/src/jit-test/tests/basic/testBug783540.js b/js/src/jit-test/tests/basic/testBug783540.js new file mode 100644 index 0000000000..618570707d --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug783540.js @@ -0,0 +1,5 @@ +gczeal(2, 2) +var stringA = "abcdef"; +var stringB = "ghijk"; +var stringC = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"; +(stringA + stringB + stringC).replace('abc', 'AA') diff --git a/js/src/jit-test/tests/basic/testBug783543.js b/js/src/jit-test/tests/basic/testBug783543.js new file mode 100644 index 0000000000..80e3495fc7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug783543.js @@ -0,0 +1,11 @@ +// |jit-test| error:ReferenceError + +try { + evaluate(" (function(c) { const x = 1; for (x in null); })();"); + var expect = "Passed"; +} catch ( e ) { + result = expect; +} +schedulegc(10); +eval("var o = new MyObject(); var result = 0; for (var o in foo) { result += this[o]; } ") +function MyObject() {} diff --git a/js/src/jit-test/tests/basic/testBug784639.js b/js/src/jit-test/tests/basic/testBug784639.js new file mode 100644 index 0000000000..1380ae6ed2 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug784639.js @@ -0,0 +1,17 @@ +evalcx("\ + Object.defineProperty(this, \"a\", {});\ + f = (function(j) {\ + a = Proxy\ + });\ + Object.defineProperty(this, \"g\", {\ + get: function() {\ + return ({\ + r: function() {},\ + t: function() {}\ + })\ + }\ + });\ + for (p in g) {\ + f(1)\ + }\ +", newGlobal()) diff --git a/js/src/jit-test/tests/basic/testBug840012.js b/js/src/jit-test/tests/basic/testBug840012.js new file mode 100644 index 0000000000..20793f7efe --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug840012.js @@ -0,0 +1,18 @@ +// |jit-test| allow-oom; allow-unhandlable-oom; allow-overrecursed + +gcPreserveCode(); +evaluate("gcparam(\"maxBytes\", gcparam(\"gcBytes\") + 4*1024);"); +evaluate("\ +function testDontEnum(F) { \ + function test() {\ + var upvar = \"\";\ + function f() { upvar += \"\"; }\ + typeof (new test(\"1\")) != 'function'\ + }\ + test();\ +} \ +var list = [];\ +for (i in list)\ + var F = this[list[i]];\ +actual = testDontEnum(F);\ +"); diff --git a/js/src/jit-test/tests/basic/testBug878429.js b/js/src/jit-test/tests/basic/testBug878429.js new file mode 100644 index 0000000000..edbb0523bf --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug878429.js @@ -0,0 +1,9 @@ +function negZeroMinusNegZero() +{ + var x = -0.0; + var y = -0.0; + return +(x - y); +} + +assertEq(1 / negZeroMinusNegZero(), Infinity); +assertEq(1 / negZeroMinusNegZero(), Infinity); diff --git a/js/src/jit-test/tests/basic/testBug895774.js b/js/src/jit-test/tests/basic/testBug895774.js new file mode 100644 index 0000000000..ad83832efb --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug895774.js @@ -0,0 +1,14 @@ +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +g1.eval("function f1() { debugger; evaluate('debugger') }"); +g2.eval("function f2() { f1(); assertEq(Number(this), 42) }"); +g2.f1 = g1.f1; + +var dbg = new Debugger(g1,g2); +dbg.onDebuggerStatement = function(frame) { + var target = frame.older; + dbg.onDebuggerStatement = function(frame) { + assertEq(Number(target.this.unsafeDereference()), 42); + } +} +g2.f2.call(42); diff --git a/js/src/jit-test/tests/basic/testBug961969.js b/js/src/jit-test/tests/basic/testBug961969.js new file mode 100644 index 0000000000..999e15e1d0 --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug961969.js @@ -0,0 +1,2 @@ +(()=>{ var x,y,z; ()=>{x++;y++;z++} })(); +(()=>{ var x,y; if (true) { function z() { x++;y++ } } })(); diff --git a/js/src/jit-test/tests/basic/testCallApply.js b/js/src/jit-test/tests/basic/testCallApply.js new file mode 100644 index 0000000000..9141f80bcb --- /dev/null +++ b/js/src/jit-test/tests/basic/testCallApply.js @@ -0,0 +1,168 @@ +function script1() { return arguments.length; } +function script2(x) { return x; } +function script3(x) { var o = arguments; return o[0]; } +function genClosure() { var x = 3; eval("x = 4"); return function(y) { return x + y } }; +var closed1 = genClosure(); +var closed2 = genClosure(); +var closed3 = genClosure(); +var native1 = String.prototype.search; +var native2 = String.prototype.match; +var tricky1 = { call:function(x,y) { return y }, apply:function(x,y) { return y } }; + +test0(); +test1(); +test2(); +test3(); + +function test0() { + assertEq(script1.call(null), 0); + assertEq(script1.call(null, 1), 1); + assertEq(script1.call(null, 1,2), 2); + assertEq(native1.call("aabc", /b/), 2); + assertEq(native1.call("abc"), 0); + assertEq(tricky1.call(null, 9), 9); + assertEq(script1.apply(null), 0); + assertEq(script1.apply(null, [1]), 1); + assertEq(script1.apply(null, [1,2]), 2); + assertEq(native1.apply("aabc", [/b/]), 2); + assertEq(native1.apply("abc"), 0); + assertEq(tricky1.apply(null, 1), 1); +} +test0(); + +function test1() { + function f(arr) { + for (var i = 0; i < 10; ++i) { + for (var j = 0; j < arr.length; ++j) { + arr[j].call('a'); + arr[j].apply('a', []); + var arg0 = []; + arr[j].apply('a', arg0); + (function() { arr[j].apply('a', arguments); })(); + + arr[j].call('a', 1); + arr[j].apply('a', [1]); + var arg0 = [1]; + arr[j].apply('a', arg0); + (function() { arr[j].apply('a', arguments); })(1); + + arr[j].call('a', 1,'g'); + arr[j].apply('a', [1,'g']); + var arg0 = [1,'g']; + arr[j].apply('a', arg0); + (function() { arr[j].apply('a', arguments); })(1,'g'); + + arr[j].call('a', 1,'g',3,4,5,6,7,8,9); + arr[j].apply('a', [1,'g',3,4,5,6,7,8,9]); + var arg0 = [1,'g',3,4,5,6,7,8,9]; + arr[j].apply('a', arg0); + (function() { arr[j].apply('a', arguments); })(1,'g',3,4,5,6,7,8,9); + } + } + } + + f([script1, script1, script1, script1, script2, script2, script1, script2]); + f([script1, script2, script3, script1, script2, script3, script3, script3]); + f([script1, script2, script2, script2, script2, script3, script1, script2]); + f([script1, script1, script1, native1, native1, native1, native1, script1]); + f([native1, native1, native1, native2, native2, native2, native2, native1]); + f([native1, native2, native1, native2, native1, native2, native1, native2]); + f([native1, native1, native1, script1, script2, script2, native1, script3]); + f([closed1, closed1, closed1, closed2, closed2, closed2, script3, script3]); + f([closed1, closed2, closed1, closed2, closed1, closed2, closed1, closed2]); + f([closed1, closed2, closed3, closed1, closed2, closed3, script1, script2]); + f([closed1, closed1, closed1, closed2, closed2, closed2, native1, native2]); + f([closed1, closed1, closed1, closed2, closed2, closed2, native1, native2]); + f([native1, native1, native1, closed1, closed2, script1, script2, native2]); +} + +// test things that break our speculation +function test2() { + var threw = false; + try { + (3).call(null, 1,2); + } catch (e) { + threw = true; + } + assertEq(threw, true); + + var threw = false; + try { + (3).apply(null, [1,2]); + } catch (e) { + threw = true; + } + assertEq(threw, true); + + var threw = false; + try { + var arr = [1,2]; + (3).apply(null, arr); + } catch (e) { + threw = true; + } + assertEq(threw, true); + + function tryAndFail(o) { + var threw = false; + try { + o.call(null, 1,2); + } catch(e) { + threw = true; + } + assertEq(threw, true); + threw = false; + try { + o.apply(null, [1,2]); + } catch(e) { + threw = true; + } + assertEq(threw, true); + } + + tryAndFail(1); + tryAndFail({}); + tryAndFail({call:{}, apply:{}}); + tryAndFail({call:function() { throw "not js_fun_call"}, apply:function(){ throw "not js_fun_apply" }}); +} + +// hit the stubs::CompileFunction path +function test3() { + function genFreshFunction(s) { return new Function(s, "return " + s); } + + function callIt(f) { + assertEq(f.call(null, 1,2), 1); + } + callIt(script2); callIt(script2); callIt(script2); callIt(script2); + callIt(genFreshFunction("x")); + callIt(genFreshFunction("y")); + callIt(genFreshFunction("z")); + + function applyIt(f) { + var arr = [1,2]; + assertEq(f.apply(null, arr), 1); + } + applyIt(script2); applyIt(script2); applyIt(script2); applyIt(script2); + applyIt(genFreshFunction("x")); + applyIt(genFreshFunction("y")); + applyIt(genFreshFunction("z")); + + function applyIt1(f) { + function g() { + assertEq(f.apply(null, arguments), 1); + } + g(1,2); + } + applyIt1(script2); applyIt1(script2); applyIt1(script2); applyIt1(script2); + applyIt1(genFreshFunction("x")); + applyIt1(genFreshFunction("y")); + applyIt1(genFreshFunction("z")); + + function applyIt2(f) { + assertEq(f.apply(null, [1,2]), 1); + } + applyIt2(script2); applyIt2(script2); applyIt2(script2); applyIt2(script2); + applyIt2(genFreshFunction("x")); + applyIt2(genFreshFunction("y")); + applyIt2(genFreshFunction("z")); +} diff --git a/js/src/jit-test/tests/basic/testCallApplySpeculationFailed.js b/js/src/jit-test/tests/basic/testCallApplySpeculationFailed.js new file mode 100644 index 0000000000..f1b127839f --- /dev/null +++ b/js/src/jit-test/tests/basic/testCallApplySpeculationFailed.js @@ -0,0 +1,5 @@ +function foo(n) { return n; } +foo.apply = function(a, b) { return b[0]; } +function bar(value) { return foo.apply(null, arguments); } +for (var i = 1 ; i < 4; i++) + assertEq(bar(i), i); diff --git a/js/src/jit-test/tests/basic/testCallElem.js b/js/src/jit-test/tests/basic/testCallElem.js new file mode 100644 index 0000000000..b40553edc1 --- /dev/null +++ b/js/src/jit-test/tests/basic/testCallElem.js @@ -0,0 +1,17 @@ +function testCALLELEM() +{ + function f() { + return 5; + } + + function g() { + return 7; + } + + var x = [f,f,f,f,g]; + var y = 0; + for (var i = 0; i < 5; ++i) + y = x[i](); + return y; +} +assertEq(testCALLELEM(), 7); diff --git a/js/src/jit-test/tests/basic/testCallFunctionPrototypeInALoop.js b/js/src/jit-test/tests/basic/testCallFunctionPrototypeInALoop.js new file mode 100644 index 0000000000..5930cdc90b --- /dev/null +++ b/js/src/jit-test/tests/basic/testCallFunctionPrototypeInALoop.js @@ -0,0 +1,4 @@ +var x; +for (var a = 0; a < 8; a++) { + Function.prototype() +} diff --git a/js/src/jit-test/tests/basic/testCallPick.js b/js/src/jit-test/tests/basic/testCallPick.js new file mode 100644 index 0000000000..7f1d9ade00 --- /dev/null +++ b/js/src/jit-test/tests/basic/testCallPick.js @@ -0,0 +1,18 @@ +function testCallPick() { + function g(x,a) { + x.f(); + } + + var x = []; + x.f = function() { } + + var y = []; + y.f = function() { } + + var z = [x,x,x,x,x,y,y,y,y,y]; + + for (var i = 0; i < 10; ++i) + g.call(this, z[i], ""); + return true; +} +assertEq(testCallPick(), true); diff --git a/js/src/jit-test/tests/basic/testCallProtoMethod.js b/js/src/jit-test/tests/basic/testCallProtoMethod.js new file mode 100644 index 0000000000..8907871ba0 --- /dev/null +++ b/js/src/jit-test/tests/basic/testCallProtoMethod.js @@ -0,0 +1,14 @@ +function testCallProtoMethod() { + function X() { this.x = 1; } + X.prototype.getName = function () { return "X"; } + + function Y() { this.x = 2; } + Y.prototype.getName = function() { return "Y"; }; + + var a = [new X, new X, new X, new X, new Y]; + var s = ''; + for (var i = 0; i < a.length; i++) + s += a[i].getName(); + return s; +} +assertEq(testCallProtoMethod(), 'XXXXY'); diff --git a/js/src/jit-test/tests/basic/testCaseAbort.js b/js/src/jit-test/tests/basic/testCaseAbort.js new file mode 100644 index 0000000000..4e594bb86e --- /dev/null +++ b/js/src/jit-test/tests/basic/testCaseAbort.js @@ -0,0 +1,16 @@ +function testCaseAbort() +{ + var four = "4"; + var r = 0; + for (var i = 0; i < 5; i++) + { + switch (i) + { + case four: r += 1; break; + default: r += 2; break; + } + } + + return "" + r; +} +assertEq(testCaseAbort(), "10"); diff --git a/js/src/jit-test/tests/basic/testCaseTypeMismatchBadness.js b/js/src/jit-test/tests/basic/testCaseTypeMismatchBadness.js new file mode 100644 index 0000000000..4bacba9aae --- /dev/null +++ b/js/src/jit-test/tests/basic/testCaseTypeMismatchBadness.js @@ -0,0 +1,19 @@ +function testCaseTypeMismatchBadness() +{ + for (var z = 0; z < 3; ++z) + { + switch ("") + { + default: + case 9: + break; + + case "": + case {}: + break; + } + } + + return "no crash"; +} +assertEq(testCaseTypeMismatchBadness(), "no crash"); diff --git a/js/src/jit-test/tests/basic/testChangingObjectWithLength.js b/js/src/jit-test/tests/basic/testChangingObjectWithLength.js new file mode 100644 index 0000000000..9269d0de57 --- /dev/null +++ b/js/src/jit-test/tests/basic/testChangingObjectWithLength.js @@ -0,0 +1,33 @@ +function testChangingObjectWithLength() +{ + var obj = { length: 10 }; + var dense = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + var slow = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; slow.slow = 5; + + /* + * The elements of objs constitute a De Bruijn sequence repeated 4x to trace + * and run native code for every object and transition. + */ + var objs = [obj, obj, obj, obj, + obj, obj, obj, obj, + dense, dense, dense, dense, + obj, obj, obj, obj, + slow, slow, slow, slow, + dense, dense, dense, dense, + dense, dense, dense, dense, + slow, slow, slow, slow, + slow, slow, slow, slow, + obj, obj, obj, obj]; + + var counter = 0; + + for (var i = 0, sz = objs.length; i < sz; i++) + { + var o = objs[i]; + for (var j = 0; j < o.length; j++) + counter++; + } + + return counter; +} +assertEq(testChangingObjectWithLength(), 400); diff --git a/js/src/jit-test/tests/basic/testChangingTypeDuringRecording.js b/js/src/jit-test/tests/basic/testChangingTypeDuringRecording.js new file mode 100644 index 0000000000..5c6a576ca4 --- /dev/null +++ b/js/src/jit-test/tests/basic/testChangingTypeDuringRecording.js @@ -0,0 +1,6 @@ +X = { value: "" } +z = 0; +for (var i = 0; i < 20; i++) { + Object.defineProperty(this, "z", X); + z = 1; +} diff --git a/js/src/jit-test/tests/basic/testClosedVarInExtensibleScope.js b/js/src/jit-test/tests/basic/testClosedVarInExtensibleScope.js new file mode 100644 index 0000000000..f06efa6bda --- /dev/null +++ b/js/src/jit-test/tests/basic/testClosedVarInExtensibleScope.js @@ -0,0 +1,13 @@ +function runTest() { + if (Math) { + function createTester(options) { + return function() { + return options.blah; + }; + } + + return createTester({blah:"bar"}); + } +} + +assertEq(runTest()(), "bar"); diff --git a/js/src/jit-test/tests/basic/testClosingRecursion.js b/js/src/jit-test/tests/basic/testClosingRecursion.js new file mode 100644 index 0000000000..5b76d2ab13 --- /dev/null +++ b/js/src/jit-test/tests/basic/testClosingRecursion.js @@ -0,0 +1,13 @@ +// Test no assert (bug 464089) +function shortRecursiveLoop(b, c) { + for (var i = 0; i < c; i++) { + if (b) + shortRecursiveLoop(c - 1); + } +} +function testClosingRecursion() { + shortRecursiveLoop(false, 1); + shortRecursiveLoop(true, 3); + return true; +} +assertEq(testClosingRecursion(), true); diff --git a/js/src/jit-test/tests/basic/testClosures.js b/js/src/jit-test/tests/basic/testClosures.js new file mode 100644 index 0000000000..a8152c209c --- /dev/null +++ b/js/src/jit-test/tests/basic/testClosures.js @@ -0,0 +1,18 @@ +function testClosures() +{ + function MyObject(id) { + var thisObject = this; + this.id = id; + this.toString = str; + + function str() { + return "" + this.id + thisObject.id; + } + } + + var a = []; + for (var i = 0; i < 5; i++) + a.push(new MyObject(i)); + return a.toString(); +} +assertEq(testClosures(), "00,11,22,33,44"); diff --git a/js/src/jit-test/tests/basic/testComparisons.js b/js/src/jit-test/tests/basic/testComparisons.js new file mode 100644 index 0000000000..b4ae997d54 --- /dev/null +++ b/js/src/jit-test/tests/basic/testComparisons.js @@ -0,0 +1,988 @@ +function testComparisons() +{ + // All the special values from each of the types in + // ECMA-262, 3rd ed. section 8 + var undefinedType, nullType, booleanType, stringType, numberType, objectType; + + var types = []; + types[undefinedType = 0] = "Undefined"; + types[nullType = 1] = "Null"; + types[booleanType = 2] = "Boolean"; + types[stringType = 3] = "String"; + types[numberType = 4] = "Number"; + types[objectType = 5] = "Object"; + + var JSVAL_INT_MIN = -Math.pow(2, 30); + var JSVAL_INT_MAX = Math.pow(2, 30) - 1; + + // Values from every ES3 type, hitting all the edge-case and special values + // that can be dreamed up + var values = + { + "undefined": + { + value: function() { return undefined; }, + type: undefinedType + }, + "null": + { + value: function() { return null; }, + type: nullType + }, + "true": + { + value: function() { return true; }, + type: booleanType + }, + "false": + { + value: function() { return false; }, + type: booleanType + }, + '""': + { + value: function() { return ""; }, + type: stringType + }, + '"a"': + { + // a > [, for string-object comparisons + value: function() { return "a"; }, + type: stringType + }, + '"Z"': + { + // Z < [, for string-object comparisons + value: function() { return "Z"; }, + type: stringType + }, + "0": + { + value: function() { return 0; }, + type: numberType + }, + "-0": + { + value: function() { return -0; }, + type: numberType + }, + "1": + { + value: function() { return 1; }, + type: numberType + }, + "Math.E": + { + value: function() { return Math.E; }, + type: numberType + }, + "JSVAL_INT_MIN - 1": + { + value: function() { return JSVAL_INT_MIN - 1; }, + type: numberType + }, + "JSVAL_INT_MIN": + { + value: function() { return JSVAL_INT_MIN; }, + type: numberType + }, + "JSVAL_INT_MIN + 1": + { + value: function() { return JSVAL_INT_MIN + 1; }, + type: numberType + }, + "JSVAL_INT_MAX - 1": + { + value: function() { return JSVAL_INT_MAX - 1; }, + type: numberType + }, + "JSVAL_INT_MAX": + { + value: function() { return JSVAL_INT_MAX; }, + type: numberType + }, + "JSVAL_INT_MAX + 1": + { + value: function() { return JSVAL_INT_MAX + 1; }, + type: numberType + }, + "Infinity": + { + value: function() { return Infinity; }, + type: numberType + }, + "-Infinity": + { + value: function() { return -Infinity; }, + type: numberType + }, + "NaN": + { + value: function() { return NaN; }, + type: numberType + }, + "{}": + { + value: function() { return {}; }, + type: objectType + }, + "{ valueOf: undefined }": + { + value: function() { return { valueOf: undefined }; }, + type: objectType + }, + "[]": + { + value: function() { return []; }, + type: objectType + }, + '[""]': + { + value: function() { return [""]; }, + type: objectType + }, + '["a"]': + { + value: function() { return ["a"]; }, + type: objectType + }, + "[0]": + { + value: function() { return [0]; }, + type: objectType + } + }; + + var orderOps = + { + "<": function(a, b) { return a < b; }, + ">": function(a, b) { return a > b; }, + "<=": function(a, b) { return a <= b; }, + ">=": function(a, b) { return a >= b; } + }; + var eqOps = + { + "==": function(a, b) { return a == b; }, + "!=": function(a, b) { return a != b; }, + "===": function(a, b) { return a === b; }, + "!==": function(a, b) { return a !== b; } + }; + + + var notEqualIncomparable = + { + eq: { "==": false, "!=": true, "===": false, "!==": true }, + order: { "<": false, ">": false, "<=": false, ">=": false } + }; + var notEqualLessThan = + { + eq: { "==": false, "!=": true, "===": false, "!==": true }, + order: { "<": true, ">": false, "<=": true, ">=": false } + }; + var notEqualGreaterThan = + { + eq: { "==": false, "!=": true, "===": false, "!==": true }, + order: { "<": false, ">": true, "<=": false, ">=": true } + }; + var notEqualNorDifferent = + { + eq: { "==": false, "!=": true, "===": false, "!==": true }, + order: { "<": false, ">": false, "<=": true, ">=": true } + }; + var strictlyEqual = + { + eq: { "==": true, "!=": false, "===": true, "!==": false }, + order: { "<": false, ">": false, "<=": true, ">=": true } + }; + var looselyEqual = + { + eq: { "==": true, "!=": false, "===": false, "!==": true }, + order: { "<": false, ">": false, "<=": true, ">=": true } + }; + var looselyEqualNotDifferent = + { + eq: { "==": true, "!=": false, "===": false, "!==": true }, + order: { "<": false, ">": false, "<=": true, ">=": true } + }; + var looselyEqualIncomparable = + { + eq: { "==": true, "!=": false, "===": false, "!==": true }, + order: { "<": false, ">": false, "<=": false, ">=": false } + }; + var strictlyEqualNotDifferent = + { + eq: { "==": true, "!=": false, "===": true, "!==": false }, + order: { "<": false, ">": false, "<=": true, ">=": true } + }; + var strictlyEqualIncomparable = + { + eq: { "==": true, "!=": false, "===": true, "!==": false }, + order: { "<": false, ">": false, "<=": false, ">=": false } + }; + + var comparingZeroToSomething = + { + "undefined": notEqualIncomparable, + "null": notEqualNorDifferent, + "true": notEqualLessThan, + "false": looselyEqual, + '""': looselyEqualNotDifferent, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": strictlyEqual, + "-0": strictlyEqual, + "1": notEqualLessThan, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": looselyEqual, + '[""]': looselyEqual, + '["a"]': notEqualIncomparable, + "[0]": looselyEqual + }; + + var comparingObjectOrObjectWithValueUndefined = + { + "undefined": notEqualIncomparable, + "null": notEqualIncomparable, + "true": notEqualIncomparable, + "false": notEqualIncomparable, + '""': notEqualGreaterThan, + '"a"': notEqualLessThan, + '"Z"': notEqualGreaterThan, + "0": notEqualIncomparable, + "-0": notEqualIncomparable, + "1": notEqualIncomparable, + "Math.E": notEqualIncomparable, + "JSVAL_INT_MIN - 1": notEqualIncomparable, + "JSVAL_INT_MIN": notEqualIncomparable, + "JSVAL_INT_MIN + 1": notEqualIncomparable, + "JSVAL_INT_MAX - 1": notEqualIncomparable, + "JSVAL_INT_MAX": notEqualIncomparable, + "JSVAL_INT_MAX + 1": notEqualIncomparable, + "Infinity": notEqualIncomparable, + "-Infinity": notEqualIncomparable, + "NaN": notEqualIncomparable, + "{}": notEqualNorDifferent, + "{ valueOf: undefined }": notEqualNorDifferent, + "[]": notEqualGreaterThan, + '[""]': notEqualGreaterThan, + '["a"]': notEqualLessThan, + "[0]": notEqualGreaterThan + }; + + // Constructed expected-value matrix + var expected = + { + "undefined": + { + "undefined": strictlyEqualIncomparable, + "null": looselyEqualIncomparable, + "true": notEqualIncomparable, + "false": notEqualIncomparable, + '""': notEqualIncomparable, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualIncomparable, + "-0": notEqualIncomparable, + "1": notEqualIncomparable, + "Math.E": notEqualIncomparable, + "JSVAL_INT_MIN - 1": notEqualIncomparable, + "JSVAL_INT_MIN": notEqualIncomparable, + "JSVAL_INT_MIN + 1": notEqualIncomparable, + "JSVAL_INT_MAX - 1": notEqualIncomparable, + "JSVAL_INT_MAX": notEqualIncomparable, + "JSVAL_INT_MAX + 1": notEqualIncomparable, + "Infinity": notEqualIncomparable, + "-Infinity": notEqualIncomparable, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualIncomparable, + '[""]': notEqualIncomparable, + '["a"]': notEqualIncomparable, + "[0]": notEqualIncomparable + }, + "null": + { + "undefined": looselyEqualIncomparable, + "null": strictlyEqualNotDifferent, + "true": notEqualLessThan, + "false": notEqualNorDifferent, + '""': notEqualNorDifferent, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualNorDifferent, + "-0": notEqualNorDifferent, + "1": notEqualLessThan, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualNorDifferent, + '[""]': notEqualNorDifferent, + '["a"]': notEqualIncomparable, + "[0]": notEqualNorDifferent + }, + "true": + { + "undefined": notEqualIncomparable, + "null": notEqualGreaterThan, + "true": strictlyEqual, + "false": notEqualGreaterThan, + '""': notEqualGreaterThan, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualGreaterThan, + "-0": notEqualGreaterThan, + "1": looselyEqual, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualGreaterThan, + '[""]': notEqualGreaterThan, + '["a"]': notEqualIncomparable, + "[0]": notEqualGreaterThan + }, + "false": + { + "undefined": notEqualIncomparable, + "null": notEqualNorDifferent, + "true": notEqualLessThan, + "false": strictlyEqual, + '""': looselyEqualNotDifferent, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": looselyEqual, + "-0": looselyEqual, + "1": notEqualLessThan, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": looselyEqual, + '[""]': looselyEqual, + '["a"]': notEqualIncomparable, + "[0]": looselyEqual + }, + '""': + { + "undefined": notEqualIncomparable, + "null": notEqualNorDifferent, + "true": notEqualLessThan, + "false": looselyEqual, + '""': strictlyEqual, + '"a"': notEqualLessThan, + '"Z"': notEqualLessThan, + "0": looselyEqual, + "-0": looselyEqual, + "1": notEqualLessThan, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualLessThan, + "{ valueOf: undefined }": notEqualLessThan, + "[]": looselyEqual, + '[""]': looselyEqual, + '["a"]': notEqualLessThan, + "[0]": notEqualLessThan + }, + '"a"': + { + "undefined": notEqualIncomparable, + "null": notEqualIncomparable, + "true": notEqualIncomparable, + "false": notEqualIncomparable, + '""': notEqualGreaterThan, + '"a"': strictlyEqual, + '"Z"': notEqualGreaterThan, + "0": notEqualIncomparable, + "-0": notEqualIncomparable, + "1": notEqualIncomparable, + "Math.E": notEqualIncomparable, + "JSVAL_INT_MIN - 1": notEqualIncomparable, + "JSVAL_INT_MIN": notEqualIncomparable, + "JSVAL_INT_MIN + 1": notEqualIncomparable, + "JSVAL_INT_MAX - 1": notEqualIncomparable, + "JSVAL_INT_MAX": notEqualIncomparable, + "JSVAL_INT_MAX + 1": notEqualIncomparable, + "Infinity": notEqualIncomparable, + "-Infinity": notEqualIncomparable, + "NaN": notEqualIncomparable, + "{}": notEqualGreaterThan, + "{ valueOf: undefined }": notEqualGreaterThan, + "[]": notEqualGreaterThan, + '[""]': notEqualGreaterThan, + '["a"]': looselyEqualNotDifferent, + "[0]": notEqualGreaterThan + }, + '"Z"': + { + "undefined": notEqualIncomparable, + "null": notEqualIncomparable, + "true": notEqualIncomparable, + "false": notEqualIncomparable, + '""': notEqualGreaterThan, + '"a"': notEqualLessThan, + '"Z"': strictlyEqual, + "0": notEqualIncomparable, + "-0": notEqualIncomparable, + "1": notEqualIncomparable, + "Math.E": notEqualIncomparable, + "JSVAL_INT_MIN - 1": notEqualIncomparable, + "JSVAL_INT_MIN": notEqualIncomparable, + "JSVAL_INT_MIN + 1": notEqualIncomparable, + "JSVAL_INT_MAX - 1": notEqualIncomparable, + "JSVAL_INT_MAX": notEqualIncomparable, + "JSVAL_INT_MAX + 1": notEqualIncomparable, + "Infinity": notEqualIncomparable, + "-Infinity": notEqualIncomparable, + "NaN": notEqualIncomparable, + "{}": notEqualLessThan, + "{ valueOf: undefined }": notEqualLessThan, + "[]": notEqualGreaterThan, + '[""]': notEqualGreaterThan, + '["a"]': notEqualLessThan, + "[0]": notEqualGreaterThan + }, + "0": comparingZeroToSomething, + "-0": comparingZeroToSomething, + "1": + { + "undefined": notEqualIncomparable, + "null": notEqualGreaterThan, + "true": looselyEqual, + "false": notEqualGreaterThan, + '""': notEqualGreaterThan, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualGreaterThan, + "-0": notEqualGreaterThan, + "1": strictlyEqual, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualGreaterThan, + '[""]': notEqualGreaterThan, + '["a"]': notEqualIncomparable, + "[0]": notEqualGreaterThan + }, + "Math.E": + { + "undefined": notEqualIncomparable, + "null": notEqualGreaterThan, + "true": notEqualGreaterThan, + "false": notEqualGreaterThan, + '""': notEqualGreaterThan, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualGreaterThan, + "-0": notEqualGreaterThan, + "1": notEqualGreaterThan, + "Math.E": strictlyEqual, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualGreaterThan, + '[""]': notEqualGreaterThan, + '["a"]': notEqualIncomparable, + "[0]": notEqualGreaterThan + }, + "JSVAL_INT_MIN - 1": + { + "undefined": notEqualIncomparable, + "null": notEqualLessThan, + "true": notEqualLessThan, + "false": notEqualLessThan, + '""': notEqualLessThan, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualLessThan, + "-0": notEqualLessThan, + "1": notEqualLessThan, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": strictlyEqual, + "JSVAL_INT_MIN": notEqualLessThan, + "JSVAL_INT_MIN + 1": notEqualLessThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualLessThan, + '[""]': notEqualLessThan, + '["a"]': notEqualIncomparable, + "[0]": notEqualLessThan + }, + "JSVAL_INT_MIN": + { + "undefined": notEqualIncomparable, + "null": notEqualLessThan, + "true": notEqualLessThan, + "false": notEqualLessThan, + '""': notEqualLessThan, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualLessThan, + "-0": notEqualLessThan, + "1": notEqualLessThan, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": strictlyEqual, + "JSVAL_INT_MIN + 1": notEqualLessThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualLessThan, + '[""]': notEqualLessThan, + '["a"]': notEqualIncomparable, + "[0]": notEqualLessThan + }, + "JSVAL_INT_MIN + 1": + { + "undefined": notEqualIncomparable, + "null": notEqualLessThan, + "true": notEqualLessThan, + "false": notEqualLessThan, + '""': notEqualLessThan, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualLessThan, + "-0": notEqualLessThan, + "1": notEqualLessThan, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": strictlyEqual, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualLessThan, + '[""]': notEqualLessThan, + '["a"]': notEqualIncomparable, + "[0]": notEqualLessThan + }, + "JSVAL_INT_MAX - 1": + { + "undefined": notEqualIncomparable, + "null": notEqualGreaterThan, + "true": notEqualGreaterThan, + "false": notEqualGreaterThan, + '""': notEqualGreaterThan, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualGreaterThan, + "-0": notEqualGreaterThan, + "1": notEqualGreaterThan, + "Math.E": notEqualGreaterThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": strictlyEqual, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualGreaterThan, + '[""]': notEqualGreaterThan, + '["a"]': notEqualIncomparable, + "[0]": notEqualGreaterThan + }, + "JSVAL_INT_MAX": + { + "undefined": notEqualIncomparable, + "null": notEqualGreaterThan, + "true": notEqualGreaterThan, + "false": notEqualGreaterThan, + '""': notEqualGreaterThan, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualGreaterThan, + "-0": notEqualGreaterThan, + "1": notEqualGreaterThan, + "Math.E": notEqualGreaterThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualGreaterThan, + "JSVAL_INT_MAX": strictlyEqual, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualGreaterThan, + '[""]': notEqualGreaterThan, + '["a"]': notEqualIncomparable, + "[0]": notEqualGreaterThan + }, + "JSVAL_INT_MAX + 1": + { + "undefined": notEqualIncomparable, + "null": notEqualGreaterThan, + "true": notEqualGreaterThan, + "false": notEqualGreaterThan, + '""': notEqualGreaterThan, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualGreaterThan, + "-0": notEqualGreaterThan, + "1": notEqualGreaterThan, + "Math.E": notEqualGreaterThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualGreaterThan, + "JSVAL_INT_MAX": notEqualGreaterThan, + "JSVAL_INT_MAX + 1": strictlyEqual, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualGreaterThan, + '[""]': notEqualGreaterThan, + '["a"]': notEqualIncomparable, + "[0]": notEqualGreaterThan + }, + "Infinity": + { + "undefined": notEqualIncomparable, + "null": notEqualGreaterThan, + "true": notEqualGreaterThan, + "false": notEqualGreaterThan, + '""': notEqualGreaterThan, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualGreaterThan, + "-0": notEqualGreaterThan, + "1": notEqualGreaterThan, + "Math.E": notEqualGreaterThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualGreaterThan, + "JSVAL_INT_MAX": notEqualGreaterThan, + "JSVAL_INT_MAX + 1": notEqualGreaterThan, + "Infinity": strictlyEqual, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualGreaterThan, + '[""]': notEqualGreaterThan, + '["a"]': notEqualIncomparable, + "[0]": notEqualGreaterThan + }, + "-Infinity": + { + "undefined": notEqualIncomparable, + "null": notEqualLessThan, + "true": notEqualLessThan, + "false": notEqualLessThan, + '""': notEqualLessThan, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualLessThan, + "-0": notEqualLessThan, + "1": notEqualLessThan, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": notEqualLessThan, + "JSVAL_INT_MIN": notEqualLessThan, + "JSVAL_INT_MIN + 1": notEqualLessThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": strictlyEqual, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualLessThan, + '[""]': notEqualLessThan, + '["a"]': notEqualIncomparable, + "[0]": notEqualLessThan + }, + "NaN": + { + "undefined": notEqualIncomparable, + "null": notEqualIncomparable, + "true": notEqualIncomparable, + "false": notEqualIncomparable, + '""': notEqualIncomparable, + '"a"': notEqualIncomparable, + '"Z"': notEqualIncomparable, + "0": notEqualIncomparable, + "-0": notEqualIncomparable, + "1": notEqualIncomparable, + "Math.E": notEqualIncomparable, + "JSVAL_INT_MIN - 1": notEqualIncomparable, + "JSVAL_INT_MIN": notEqualIncomparable, + "JSVAL_INT_MIN + 1": notEqualIncomparable, + "JSVAL_INT_MAX - 1": notEqualIncomparable, + "JSVAL_INT_MAX": notEqualIncomparable, + "JSVAL_INT_MAX + 1": notEqualIncomparable, + "Infinity": notEqualIncomparable, + "-Infinity": notEqualIncomparable, + "NaN": notEqualIncomparable, + "{}": notEqualIncomparable, + "{ valueOf: undefined }": notEqualIncomparable, + "[]": notEqualIncomparable, + '[""]': notEqualIncomparable, + '["a"]': notEqualIncomparable, + "[0]": notEqualIncomparable + }, + "{}": comparingObjectOrObjectWithValueUndefined, + "{ valueOf: undefined }": comparingObjectOrObjectWithValueUndefined, + "[]": + { + "undefined": notEqualIncomparable, + "null": notEqualNorDifferent, + "true": notEqualLessThan, + "false": looselyEqual, + '""': looselyEqual, + '"a"': notEqualLessThan, + '"Z"': notEqualLessThan, + "0": looselyEqual, + "-0": looselyEqual, + "1": notEqualLessThan, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualLessThan, + "{ valueOf: undefined }": notEqualLessThan, + "[]": notEqualNorDifferent, + '[""]': notEqualNorDifferent, + '["a"]': notEqualLessThan, + "[0]": notEqualLessThan + }, + '[""]': + { + "undefined": notEqualIncomparable, + "null": notEqualNorDifferent, + "true": notEqualLessThan, + "false": looselyEqual, + '""': looselyEqual, + '"a"': notEqualLessThan, + '"Z"': notEqualLessThan, + "0": looselyEqual, + "-0": looselyEqual, + "1": notEqualLessThan, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualLessThan, + "{ valueOf: undefined }": notEqualLessThan, + "[]": notEqualNorDifferent, + '[""]': notEqualNorDifferent, + '["a"]': notEqualLessThan, + "[0]": notEqualLessThan + }, + '["a"]': + { + "undefined": notEqualIncomparable, + "null": notEqualIncomparable, + "true": notEqualIncomparable, + "false": notEqualIncomparable, + '""': notEqualGreaterThan, + '"a"': looselyEqual, + '"Z"': notEqualGreaterThan, + "0": notEqualIncomparable, + "-0": notEqualIncomparable, + "1": notEqualIncomparable, + "Math.E": notEqualIncomparable, + "JSVAL_INT_MIN - 1": notEqualIncomparable, + "JSVAL_INT_MIN": notEqualIncomparable, + "JSVAL_INT_MIN + 1": notEqualIncomparable, + "JSVAL_INT_MAX - 1": notEqualIncomparable, + "JSVAL_INT_MAX": notEqualIncomparable, + "JSVAL_INT_MAX + 1": notEqualIncomparable, + "Infinity": notEqualIncomparable, + "-Infinity": notEqualIncomparable, + "NaN": notEqualIncomparable, + "{}": notEqualGreaterThan, + "{ valueOf: undefined }": notEqualGreaterThan, + "[]": notEqualGreaterThan, + '[""]': notEqualGreaterThan, + '["a"]': notEqualNorDifferent, + "[0]": notEqualGreaterThan + }, + "[0]": + { + "undefined": notEqualIncomparable, + "null": notEqualNorDifferent, + "true": notEqualLessThan, + "false": looselyEqual, + '""': notEqualGreaterThan, + '"a"': notEqualLessThan, + '"Z"': notEqualLessThan, + "0": looselyEqual, + "-0": looselyEqual, + "1": notEqualLessThan, + "Math.E": notEqualLessThan, + "JSVAL_INT_MIN - 1": notEqualGreaterThan, + "JSVAL_INT_MIN": notEqualGreaterThan, + "JSVAL_INT_MIN + 1": notEqualGreaterThan, + "JSVAL_INT_MAX - 1": notEqualLessThan, + "JSVAL_INT_MAX": notEqualLessThan, + "JSVAL_INT_MAX + 1": notEqualLessThan, + "Infinity": notEqualLessThan, + "-Infinity": notEqualGreaterThan, + "NaN": notEqualIncomparable, + "{}": notEqualLessThan, + "{ valueOf: undefined }": notEqualLessThan, + "[]": notEqualGreaterThan, + '[""]': notEqualGreaterThan, + '["a"]': notEqualLessThan, + "[0]": notEqualNorDifferent + } + }; + + + + var failures = []; + function fail(a, ta, b, tb, ex, ac, op) + { + failures.push("(" + a + " " + op + " " + b + ") wrong: " + + "expected " + ex + ", got " + ac + + " (types " + types[ta] + ", " + types[tb] + ")"); + } + + var result = false; + for (var i in values) + { + for (var j in values) + { + // Constants, so hoist to help JIT know that + var vala = values[i], valb = values[j]; + var a = vala.value(), b = valb.value(); + + for (var opname in orderOps) + { + var op = orderOps[opname]; + var expect = expected[i][j].order[opname]; + var failed = false; + + for (var iter = 0; iter < 5; iter++) + { + result = op(a, b); + failed = failed || result !== expect; + } + + if (failed) + fail(i, vala.type, j, valb.type, expect, result, opname); + } + + for (var opname in eqOps) + { + var op = eqOps[opname]; + var expect = expected[i][j].eq[opname]; + var failed = false; + + for (var iter = 0; iter < 5; iter++) + { + result = op(a, b); + failed = failed || result !== expect; + } + + if (failed) + fail(i, vala.type, j, valb.type, expect, result, opname); + } + } + } + + if (failures.length == 0) + return "no failures reported!"; + + return "\n" + failures.join(",\n"); +} +assertEq(testComparisons(), "no failures reported!"); diff --git a/js/src/jit-test/tests/basic/testConcatNWithSideEffects.js b/js/src/jit-test/tests/basic/testConcatNWithSideEffects.js new file mode 100644 index 0000000000..b7b636e5d8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testConcatNWithSideEffects.js @@ -0,0 +1,12 @@ +var log; +function b(x) { log += 'b'; return 'B'; } +function g() { + log = ''; + var a = {toString: function () { log += 'a'; return 'A'; }}; + assertEq("[" + a + b() + "]", "[AB]"); + assertEq(log, "ab"); +} + +for (var i = 0; i < 1000; ++i) + g(); + diff --git a/js/src/jit-test/tests/basic/testCondSwitch1.js b/js/src/jit-test/tests/basic/testCondSwitch1.js new file mode 100644 index 0000000000..a1318fb574 --- /dev/null +++ b/js/src/jit-test/tests/basic/testCondSwitch1.js @@ -0,0 +1,46 @@ +function get(x) { + return x; +} + +function f(x) { + switch(x) { + case get(0): + return 0; + case get(1): + return 1; + case get("foo"): + return "foo"; + case get(true): + return true; + case get(false): + return false; + case get({}): + return {}; + case get(null): + return null; + case Number.MIN_VALUE: + return Number.MIN_VALUE; + case Math: + return Math; + default: + return -123; + } +} + +assertEq(f(0), 0); +assertEq(f(-0), 0); +assertEq(f(1), 1); +assertEq(f("foo"), "foo"); +assertEq(f(true), true); +assertEq(f(false), false); +assertEq(f({}), -123); +assertEq(f([]), -123); +assertEq(f(Math), Math); + +assertEq(f({x:1}), -123); +assertEq(f(333), -123); +assertEq(f(null), null); +assertEq(f(undefined), -123); + +assertEq(f(Number.MIN_VALUE), Number.MIN_VALUE); + diff --git a/js/src/jit-test/tests/basic/testCondSwitch2.js b/js/src/jit-test/tests/basic/testCondSwitch2.js new file mode 100644 index 0000000000..39bb5347a1 --- /dev/null +++ b/js/src/jit-test/tests/basic/testCondSwitch2.js @@ -0,0 +1,33 @@ + +var C1 = 1; +var C2 = 2; +const C3 = 3; + +function f(x) { + var s = ""; + + switch(x) { + case C1: + s += "1"; + case C2: + s += "2"; + break; + case C3: + s += "3"; + default: + s += "d"; + case 4: + s += "4"; + } + return s; +} +assertEq(f(1), "12"); +assertEq(f(2), "2"); +assertEq(f(3), "3d4"); +assertEq(f(4), "4"); + +assertEq(f(0), "d4"); +assertEq(f(-0), "d4"); + +assertEq(f(true), "d4"); + diff --git a/js/src/jit-test/tests/basic/testCondSwitch3.js b/js/src/jit-test/tests/basic/testCondSwitch3.js new file mode 100644 index 0000000000..43ea73b7ef --- /dev/null +++ b/js/src/jit-test/tests/basic/testCondSwitch3.js @@ -0,0 +1,22 @@ + +var C1 = 1; + +function f(x) { + var s = ""; + + switch(x) { + case 0: + s += "0"; + case C1: + s += "1"; + } + return s; +} + +assertEq(f(0), "01"); +assertEq(f(1), "1"); +assertEq(f(2), ""); + +assertEq(f(true), ""); +assertEq(f(Math), ""); + diff --git a/js/src/jit-test/tests/basic/testConstDestructringArguments.js b/js/src/jit-test/tests/basic/testConstDestructringArguments.js new file mode 100644 index 0000000000..e07d93a55f --- /dev/null +++ b/js/src/jit-test/tests/basic/testConstDestructringArguments.js @@ -0,0 +1,3 @@ +// |jit-test| error: TypeError + +(function () { const [arguments] = 0; })(); diff --git a/js/src/jit-test/tests/basic/testConstIf.js b/js/src/jit-test/tests/basic/testConstIf.js new file mode 100644 index 0000000000..2fcde1caf0 --- /dev/null +++ b/js/src/jit-test/tests/basic/testConstIf.js @@ -0,0 +1,6 @@ +function testConstIf() { + var x; + for (var j=0;j<5;++j) { if (1.1 || 5) { } x = 2;} + return x; +} +assertEq(testConstIf(), 2); diff --git a/js/src/jit-test/tests/basic/testConstSwitch.js b/js/src/jit-test/tests/basic/testConstSwitch.js new file mode 100644 index 0000000000..f98959adf8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testConstSwitch.js @@ -0,0 +1,13 @@ +// No test case, just make sure this doesn't assert. +function testNegZero2() { + var z = 0; + for (let j = 0; j < 5; ++j) { ({p: (-z)}); } +} +testNegZero2(); + +function testConstSwitch() { + var x; + for (var j=0;j<5;++j) { switch(1.1) { case NaN: case 2: } x = 2; } + return x; +} +assertEq(testConstSwitch(), 2); diff --git a/js/src/jit-test/tests/basic/testConstSwitch2.js b/js/src/jit-test/tests/basic/testConstSwitch2.js new file mode 100644 index 0000000000..48d5f2c9df --- /dev/null +++ b/js/src/jit-test/tests/basic/testConstSwitch2.js @@ -0,0 +1,6 @@ +function testConstSwitch2() { + var x; + for (var j = 0; j < 4; ++j) { switch(0/0) { } } + return "ok"; +} +assertEq(testConstSwitch2(), "ok"); diff --git a/js/src/jit-test/tests/basic/testConstantBooleanExpr.js b/js/src/jit-test/tests/basic/testConstantBooleanExpr.js new file mode 100644 index 0000000000..8cc5f34822 --- /dev/null +++ b/js/src/jit-test/tests/basic/testConstantBooleanExpr.js @@ -0,0 +1,6 @@ +function testConstantBooleanExpr() +{ + for (var j = 0; j < 3; ++j) { if(true <= true) { } } + return "ok"; +} +assertEq(testConstantBooleanExpr(), "ok"); diff --git a/js/src/jit-test/tests/basic/testConstructorArgs-1.js b/js/src/jit-test/tests/basic/testConstructorArgs-1.js new file mode 100644 index 0000000000..46b6c4e08a --- /dev/null +++ b/js/src/jit-test/tests/basic/testConstructorArgs-1.js @@ -0,0 +1,11 @@ +function f(a, b) { + this.a = a; + assertEq(b, 'x'); +} + +for (var x = 0; x < 9; ++x) { + f.prototype = {}; + var obj = new f(x, 'x'); + assertEq(obj.a, x); + assertEq(Object.getPrototypeOf(obj), f.prototype); +} diff --git a/js/src/jit-test/tests/basic/testConstructorArgs-2.js b/js/src/jit-test/tests/basic/testConstructorArgs-2.js new file mode 100644 index 0000000000..0a8292dd8c --- /dev/null +++ b/js/src/jit-test/tests/basic/testConstructorArgs-2.js @@ -0,0 +1,12 @@ +function f(a, b, c) { + this.a = a; + assertEq(b, 'x'); + assertEq(c, void 0); +} + +for (var x = 0; x < 9; ++x) { + f.prototype = {}; + var obj = new f(x, 'x'); // fewer than f.length arguments + assertEq(obj.a, x); + assertEq(Object.getPrototypeOf(obj), f.prototype); +} diff --git a/js/src/jit-test/tests/basic/testConstructorArgs-3.js b/js/src/jit-test/tests/basic/testConstructorArgs-3.js new file mode 100644 index 0000000000..eb594b3dd8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testConstructorArgs-3.js @@ -0,0 +1,11 @@ +function f(a) { + this.a = a; + assertEq(arguments[1], 'x'); +} + +for (var x = 0; x < 9; ++x) { + f.prototype = {}; + var obj = new f(x, 'x'); // more than f.length arguments + assertEq(obj.a, x); + assertEq(Object.getPrototypeOf(obj), f.prototype); +} diff --git a/js/src/jit-test/tests/basic/testConstructorBail.js b/js/src/jit-test/tests/basic/testConstructorBail.js new file mode 100644 index 0000000000..0cd3397f73 --- /dev/null +++ b/js/src/jit-test/tests/basic/testConstructorBail.js @@ -0,0 +1,4 @@ +function testConstructorBail() { + for (let i = 0; i < 5; ++i) new Number(/x/); +} +testConstructorBail(); diff --git a/js/src/jit-test/tests/basic/testContinue.js b/js/src/jit-test/tests/basic/testContinue.js new file mode 100644 index 0000000000..a878bbb930 --- /dev/null +++ b/js/src/jit-test/tests/basic/testContinue.js @@ -0,0 +1,11 @@ +function testContinue() { + var i; + var total = 0; + for (i = 0; i < 20; ++i) { + if (i == 11) + continue; + total++; + } + return total; +} +assertEq(testContinue(), 19); diff --git a/js/src/jit-test/tests/basic/testContinueWithLabel.js b/js/src/jit-test/tests/basic/testContinueWithLabel.js new file mode 100644 index 0000000000..b851b41de8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testContinueWithLabel.js @@ -0,0 +1,16 @@ +function testContinueWithLabel() { + var i = 0; + var j = 20; + checkiandj : + while (i < 10) { + i += 1; + checkj : + while (j > 10) { + j -= 1; + if ((j % 2) == 0) + continue checkj; + } + } + return i + j; +} +assertEq(testContinueWithLabel(), 20); diff --git a/js/src/jit-test/tests/basic/testContinueWithLabel3.js b/js/src/jit-test/tests/basic/testContinueWithLabel3.js new file mode 100644 index 0000000000..14ef74bc66 --- /dev/null +++ b/js/src/jit-test/tests/basic/testContinueWithLabel3.js @@ -0,0 +1,6 @@ +// bug 511575 comment 3 +outer: +for (var j = 0; j < 10; j++) + for (var p in {x:1}) + if (p > "q") + continue outer; diff --git a/js/src/jit-test/tests/basic/testContinueWithLabel4.js b/js/src/jit-test/tests/basic/testContinueWithLabel4.js new file mode 100644 index 0000000000..739726c7a2 --- /dev/null +++ b/js/src/jit-test/tests/basic/testContinueWithLabel4.js @@ -0,0 +1,25 @@ +// bug 511575 + +Function.prototype.X = 42; + +function ownProperties() { + var props = {}; + var r = function () {}; + + outer: + for (var a in r) { + for (var b in r) { + if (a == b) { + continue outer; + } + } + print("SHOULD NOT BE REACHED"); + props[a] = true; + } + return props; +} + +for (var i = 0; i < 12; ++i) { + print(i); + ownProperties(); +} diff --git a/js/src/jit-test/tests/basic/testConvertibleObjectEqUndefined.js b/js/src/jit-test/tests/basic/testConvertibleObjectEqUndefined.js new file mode 100644 index 0000000000..89431affe8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testConvertibleObjectEqUndefined.js @@ -0,0 +1,30 @@ +function x4(v) { return "" + v + v + v + v; } +function testConvertibleObjectEqUndefined() +{ + var compares = + [ + false, false, false, false, + undefined, undefined, undefined, undefined, + false, false, false, false, + undefined, undefined, undefined, undefined, + false, false, false, false, + undefined, undefined, undefined, undefined, + false, false, false, false, + undefined, undefined, undefined, undefined, + false, false, false, false, + undefined, undefined, undefined, undefined, + ]; + var count = 0; + var obj = { valueOf: function() { count++; return 1; } }; + var results = compares.map(function(v) { return "unwritten"; }); + + for (var i = 0, sz = compares.length; i < sz; i++) + results[i] = compares[i] == obj; + + return results.join("") + count; +} + +assertEq(testConvertibleObjectEqUndefined(), + x4(false) + x4(false) + x4(false) + x4(false) + x4(false) + x4(false) + + x4(false) + x4(false) + x4(false) + x4(false) + "20"); + diff --git a/js/src/jit-test/tests/basic/testCrossCompartmentTransparency.js b/js/src/jit-test/tests/basic/testCrossCompartmentTransparency.js new file mode 100644 index 0000000000..9745432352 --- /dev/null +++ b/js/src/jit-test/tests/basic/testCrossCompartmentTransparency.js @@ -0,0 +1,165 @@ +// |jit-test| error: done + +var g1 = newGlobal('same-compartment'); +var g2 = newGlobal(); +var proxyStr = "new Proxy({}, "+ +" { getOwnPropertyDescriptor: () =>assertEq(true,false), "+ +" ownKeys: () =>assertEq(true,false), "+ +" defineProperty: () =>assertEq(true,false), "+ +" deleteProperty: () =>assertEq(true,false), "+ +" get: () =>assertEq(true,false), "+ +" set: () =>assertEq(true,false), "+ +"}); "; +var proxy1 = g1.eval(proxyStr); +var proxy2 = g2.eval(proxyStr); + +var test = (function() { +"use strict"; +return function test(str, f, isGeneric = false) { + + var x = f(eval(str)); + assertEq(x, f(g1.eval(str))); + assertEq(x, f(g2.eval(str))); + + var threw = false; + try { + f(g1.eval("new Object()")); + } catch (e) { + assertEq(Object.prototype.toString.call(e), "[object Error]"); + threw = true; + } + assertEq(threw, !isGeneric); + threw = false; + try { + f(g2.eval("new Object()")); + } catch (e) { + assertEq(Object.prototype.toString.call(e), "[object Error]"); + threw = true; + } + assertEq(threw, !isGeneric); + threw = false; + try { + f(proxy1); + } catch (e) { + assertEq(Object.prototype.toString.call(e), "[object Error]"); + threw = true; + } + assertEq(threw, !isGeneric); + threw = false; + try { + f(proxy2); + } catch (e) { + assertEq(Object.prototype.toString.call(e), "[object Error]"); + threw = true; + } + assertEq(threw, !isGeneric); +} +})(); + +if (Boolean.prototype.toSource) { + test("new Boolean(true)", b => Boolean.prototype.toSource.call(b)); +} +test("new Boolean(true)", b => Boolean.prototype.toString.call(b)); +test("new Boolean(true)", b => Boolean.prototype.valueOf.call(b)); +if (Number.prototype.toSource) { + test("new Number(1)", n => Number.prototype.toSource.call(n)); +} +test("new Number(1)", n => Number.prototype.toString.call(n)); +test("new Number(1)", n => Number.prototype.valueOf.call(n)); +test("new Number(1)", n => Number.prototype.toFixed.call(n)); +test("new Number(1)", n => Number.prototype.toExponential.call(n)); +test("new Number(1)", n => Number.prototype.toPrecision.call(n)); +test("(function*(){yield 1})()", i => (function*(){yield})().next.call(i).toString()); +if (String.prototype.toSource) { + test("new String('one')", s => String.prototype.toSource.call(s)); +} +test("new String('one')", s => String.prototype.toString.call(s)); +test("new RegExp('1')", r => RegExp.prototype.exec.call(r, '1').toString()); +test("new RegExp('1')", r => RegExp.prototype.test.call(r, '1')); +test("new RegExp('1')", r => RegExp.prototype.compile.call(r, '1').toString()); +test("new RegExp('1')", r => assertEq("a1".search(r), 1)); +test("new RegExp('1')", r => assertEq("a1".match(r)[0], '1')); +test("new RegExp('1')", r => assertEq("a1".replace(r, 'A'), 'aA')); +test("new RegExp('1')", r => assertEq(String("a1b".split(r)), "a,b")); +test("new RegExp('1')", r => assertEq(String(new RegExp(r)), String(r))); +test("new RegExp('1')", r => assertEq(String(/x/.compile(r)), String(r))); +test("new WeakMap()", w => WeakMap.prototype.has.call(w, {})); +test("new WeakMap()", w => WeakMap.prototype.get.call(w, {})); +test("new WeakMap()", w => WeakMap.prototype.delete.call(w, {})); +test("new WeakMap()", w => WeakMap.prototype.set.call(w, {}).toString()); +test("new Map()", w => Map.prototype.has.call(w, {})); +test("new Map()", w => Map.prototype.get.call(w, {})); +test("new Map()", w => Map.prototype.delete.call(w, {})); +test("new Map()", w => Map.prototype.set.call(w, {}).toString()); +test("new Set()", w => Set.prototype.has.call(w, {})); +test("new Set()", w => Set.prototype.add.call(w, {}).toString()); +test("new Set()", w => Set.prototype.delete.call(w, {})); + +test("new Int8Array(1)", a => Int8Array.prototype.subarray.call(a).toString()); +test("new Uint8Array(1)", a => Uint8Array.prototype.subarray.call(a).toString()); +test("new Int16Array(1)", a => Int16Array.prototype.subarray.call(a).toString()); +test("new Uint16Array(1)", a => Uint16Array.prototype.subarray.call(a).toString()); +test("new Int32Array(1)", a => Int32Array.prototype.subarray.call(a).toString()); +test("new Uint32Array(1)", a => Uint32Array.prototype.subarray.call(a).toString()); +test("new Float32Array(1)", a => Float32Array.prototype.subarray.call(a).toString()); +test("new Float64Array(1)", a => Float64Array.prototype.subarray.call(a).toString()); +test("new Uint8ClampedArray(1)", a => Uint8ClampedArray.prototype.subarray.call(a).toString()); + +test("new Int8Array(1)", a => Int8Array.prototype.set.call(a, [])); +test("new Uint8Array(1)", a => Uint8Array.prototype.set.call(a, [])); +test("new Int16Array(1)", a => Int16Array.prototype.set.call(a, [])); +test("new Uint16Array(1)", a => Uint16Array.prototype.set.call(a, [])); +test("new Int32Array(1)", a => Int32Array.prototype.set.call(a, [])); +test("new Uint32Array(1)", a => Uint32Array.prototype.set.call(a, [])); +test("new Float32Array(1)", a => Float32Array.prototype.set.call(a, [])); +test("new Float64Array(1)", a => Float64Array.prototype.set.call(a, [])); +test("new Uint8ClampedArray(1)", a => Uint8ClampedArray.prototype.set.call(a, [])); + +function justDontThrow() {} +test("new Date()", d => justDontThrow(Date.prototype.getTime.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getYear.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getFullYear.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getUTCFullYear.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getMonth.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getUTCMonth.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getDate.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getUTCDate.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getDay.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getUTCDay.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getHours.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getUTCHours.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getMinutes.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getUTCMinutes.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getSeconds.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getUTCSeconds.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.getTimezoneOffset.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setTime.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setMilliseconds.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setUTCMilliseconds.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setSeconds.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setUTCSeconds.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setMinutes.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setUTCMinutes.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setHours.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setUTCHours.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setDate.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setUTCDate.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setMonth.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setUTCMonth.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setFullYear.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setUTCFullYear.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.setYear.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.toGMTString.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.toISOString.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.toLocaleString.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.toLocaleDateString.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.toLocaleTimeString.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.toTimeString.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.toDateString.call(d))); +if (Date.prototype.toSource) { + test("new Date()", d => justDontThrow(Date.prototype.toSource.call(d))); +} +test("new Date()", d => justDontThrow(Date.prototype.toString.call(d))); +test("new Date()", d => justDontThrow(Date.prototype.valueOf.call(d))); + +throw "done"; diff --git a/js/src/jit-test/tests/basic/testCrossCompartmentTransparency2.js b/js/src/jit-test/tests/basic/testCrossCompartmentTransparency2.js new file mode 100644 index 0000000000..39319bc96a --- /dev/null +++ b/js/src/jit-test/tests/basic/testCrossCompartmentTransparency2.js @@ -0,0 +1,15 @@ +var g = newGlobal(); + +var array = g.eval("new Array(1,2,3)"); +assertEq([array,array].concat().toString(), "1,2,3,1,2,3"); +assertEq(Array.isArray(array), true); + +var number = g.eval("new Number(42)"); +var bool = g.eval("new Boolean(false)"); +var string = g.eval("new String('ponies')"); +assertEq(JSON.stringify({n:number, b:bool, s:string}), "{\"n\":42,\"b\":false,\"s\":\"ponies\"}"); +assertEq(JSON.stringify({arr:array}), "{\"arr\":[1,2,3]}"); +assertEq(JSON.stringify({2:'ponies', unicorns:'not real'}, array), "{\"2\":\"ponies\"}"); +assertEq(JSON.stringify({42:true, ponies:true, unicorns:'sad'}, [number, string]), "{\"42\":true,\"ponies\":true}"); +assertEq(JSON.stringify({a:true,b:false}, undefined, number), "{\n \"a\": true,\n \"b\": false\n}"); +assertEq(JSON.stringify({a:true,b:false}, undefined, string), "{\nponies\"a\": true,\nponies\"b\": false\n}"); diff --git a/js/src/jit-test/tests/basic/testDateNow.js b/js/src/jit-test/tests/basic/testDateNow.js new file mode 100644 index 0000000000..0a186caa28 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDateNow.js @@ -0,0 +1,10 @@ +function testDateNow() { + // Accessing global.Date for the first time will change the global shape, + // so do it before the loop starts; otherwise we have to loop an extra time + // to pick things up. + var time = Date.now(); + for (var j = 0; j < 9; ++j) + time = Date.now(); + return "ok"; +} +assertEq(testDateNow(), "ok"); diff --git a/js/src/jit-test/tests/basic/testDecElem1.js b/js/src/jit-test/tests/basic/testDecElem1.js new file mode 100644 index 0000000000..6739cab40e --- /dev/null +++ b/js/src/jit-test/tests/basic/testDecElem1.js @@ -0,0 +1,7 @@ +var obj = {p: 100}; +var name = "p"; +var a = []; +for (var i = 0; i < 10; i++) + a[i] = --obj[name]; +assertEq(a.join(','), '99,98,97,96,95,94,93,92,91,90'); +assertEq(obj.p, 90); diff --git a/js/src/jit-test/tests/basic/testDecElem2.js b/js/src/jit-test/tests/basic/testDecElem2.js new file mode 100644 index 0000000000..8fe74ff50f --- /dev/null +++ b/js/src/jit-test/tests/basic/testDecElem2.js @@ -0,0 +1,11 @@ +var obj = {s: ""}; +var name = "s"; +var a = []; +for (var i = 0; i <= 13; i++) { + a[i] = 'x'; + if (i > 8) + a[i] = --obj[name]; // first recording changes obj.s from string to number +} +assertEq(a.join(','), Array(10).join('x,') + '-1,-2,-3,-4,-5'); +assertEq(obj.s, -5); + diff --git a/js/src/jit-test/tests/basic/testDecayingInnerLoop.js b/js/src/jit-test/tests/basic/testDecayingInnerLoop.js new file mode 100644 index 0000000000..92e985cd6c --- /dev/null +++ b/js/src/jit-test/tests/basic/testDecayingInnerLoop.js @@ -0,0 +1,9 @@ +function testDecayingInnerLoop() { + var i, j, k = 10; + for (i = 0; i < 5000; ++i) { + for (j = 0; j < k; ++j); + --k; + } + return i; +} +assertEq(testDecayingInnerLoop(), 5000); diff --git a/js/src/jit-test/tests/basic/testDeepBail1.js b/js/src/jit-test/tests/basic/testDeepBail1.js new file mode 100644 index 0000000000..779f96597e --- /dev/null +++ b/js/src/jit-test/tests/basic/testDeepBail1.js @@ -0,0 +1,6 @@ +function testDeepBail1() { + var y = [1,2,3]; + for (var i = 0; i < 9; i++) + "" in y; +} +testDeepBail1(); diff --git a/js/src/jit-test/tests/basic/testDeepBailFromHasInstance.js b/js/src/jit-test/tests/basic/testDeepBailFromHasInstance.js new file mode 100644 index 0000000000..6be2576838 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDeepBailFromHasInstance.js @@ -0,0 +1,12 @@ +var arr = [Math, Math, Math, Math, {}]; +var obj = {}; +var x; +var result = 'no error'; +try { + for (var i = 0; i < arr.length; i++) + x = (obj instanceof arr[i]); // last iteration throws, triggering deep bail +} catch (exc) { + result = exc.constructor.name; +} +assertEq(result, 'TypeError'); + diff --git a/js/src/jit-test/tests/basic/testDeepBailInMoreIter.js b/js/src/jit-test/tests/basic/testDeepBailInMoreIter.js new file mode 100644 index 0000000000..85c9f470f7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDeepBailInMoreIter.js @@ -0,0 +1,5 @@ +w = (function*() { yield })(); +w.next(); +for (var i = 0; i < 100; ++i) { + for (v of w) {} +} diff --git a/js/src/jit-test/tests/basic/testDeepBailWhileRecording.js b/js/src/jit-test/tests/basic/testDeepBailWhileRecording.js new file mode 100644 index 0000000000..17c1086aa1 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDeepBailWhileRecording.js @@ -0,0 +1,15 @@ +var o = {}; +var arr = [o,o,o,o,o,o,o,o,o,o,o,o,o]; +var out = []; + +const OUTER = 10; + +for (var i = 0; i < 10; ++i) { + for (var j = 0; j < arr.length; ++j) { + out.push(String.prototype.indexOf.call(arr[i], 'object')); + } +} + +assertEq(out.length, 10 * arr.length); +for (var i = 0; i < out.length; ++i) + assertEq(out[i], 1); diff --git a/js/src/jit-test/tests/basic/testDeepPropertyShadowing.js b/js/src/jit-test/tests/basic/testDeepPropertyShadowing.js new file mode 100644 index 0000000000..65dbf8d5eb --- /dev/null +++ b/js/src/jit-test/tests/basic/testDeepPropertyShadowing.js @@ -0,0 +1,17 @@ +function testDeepPropertyShadowing() +{ + function h(node) { + var x = 0; + while (node) { + x++; + node = node.parent; + } + return x; + } + var tree = {__proto__: {__proto__: {parent: null}}}; + h(tree); + h(tree); + tree.parent = {}; + assertEq(h(tree), 2); +} +testDeepPropertyShadowing(); diff --git a/js/src/jit-test/tests/basic/testDefinePropertyAcrossCompartment.js b/js/src/jit-test/tests/basic/testDefinePropertyAcrossCompartment.js new file mode 100644 index 0000000000..b997089e71 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDefinePropertyAcrossCompartment.js @@ -0,0 +1,7 @@ +var a = evalcx(''); +Object.defineProperty(a, "", ({ + get: function() {}, +})) +gc() + +// don't crash diff --git a/js/src/jit-test/tests/basic/testDenseArrayProp.js b/js/src/jit-test/tests/basic/testDenseArrayProp.js new file mode 100644 index 0000000000..6d7bdc4dc9 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDenseArrayProp.js @@ -0,0 +1,12 @@ +function testDenseArrayProp() +{ + [].__proto__.x = 1; + ({}).__proto__.x = 2; + var a = [[],[],[],({}).__proto__]; + for (var i = 0; i < a.length; ++i) + JSON.stringify(a[i].x); + delete [].__proto__.x; + delete ({}).__proto__.x; + return "ok"; +} +assertEq(testDenseArrayProp(), "ok"); diff --git a/js/src/jit-test/tests/basic/testDenseToSlowArray.js b/js/src/jit-test/tests/basic/testDenseToSlowArray.js new file mode 100644 index 0000000000..e4b6b5d2dd --- /dev/null +++ b/js/src/jit-test/tests/basic/testDenseToSlowArray.js @@ -0,0 +1,185 @@ +// test dense -> slow array transitions during the recording and on trace +// for various array functions and property accessors + +function test_set_elem() { + + function f() { + var bag = []; + for (var i = 0; i != 100; ++i) { + var a = [0]; + a[100*100] = i; + bag.push(a); + } + + for (var i = 0; i != 100; ++i) { + var a = [0]; + a[200 + i] = i; + bag.push(a); + } + return bag; + } + + var bag = f(); + + for (var i = 0; i != 100; ++i) { + var a = bag[i]; + assertEq(a.length, 100 * 100 + 1); + assertEq(a[100*100], i); + assertEq(a[0], 0); + assertEq(1 + i in a, false); + } + + for (var i = 0; i != 100; ++i) { + var a = bag[100 + i]; + assertEq(a.length, 200 + i + 1); + assertEq(a[200 + i], i); + assertEq(a[0], 0); + assertEq(1 + i in a, false); + } +} + +function test_reverse() { + + function prepare_arays() { + var bag = []; + var base_index = 245; + for (var i = 0; i != 50; ++i) { + var a = [1, 2, 3, 4, 5]; + a.length = i + base_index; + bag.push(a); + } + return bag; + } + + function test(bag) { + for (var i = 0; i != bag.length; ++i) { + var a = bag[i]; + a.reverse(); + a[0] = 1; + } + } + + var bag = prepare_arays(); + test(bag); + for (var i = 0; i != bag.length; ++i) { + var a = bag[i]; + assertEq(a[0], 1); + for (var j = 1; j <= 5; ++j) { + assertEq(a[a.length - j], j); + } + for (var j = 1; j < a.length - 5; ++j) { + assertEq(j in a, false); + } + } + +} + +function test_push() { + + function prepare_arays() { + var bag = []; + var base_index = 245; + for (var i = 0; i != 50; ++i) { + var a = [0]; + a.length = i + base_index; + bag.push(a); + } + return bag; + } + + function test(bag) { + for (var i = 0; i != bag.length; ++i) { + var a = bag[i]; + a.push(2); + a[0] = 1; + } + } + + var bag = prepare_arays(); + test(bag); + for (var i = 0; i != bag.length; ++i) { + var a = bag[i]; + assertEq(a[0], 1); + assertEq(a[a.length - 1], 2); + for (var j = 1; j < a.length - 1; ++j) { + assertEq(j in a, false); + } + } +} + +function test_unshift() { + + function prepare_arays() { + var bag = []; + var base_index = 245; + for (var i = 0; i != 50; ++i) { + var a = [0]; + a.length = i + base_index; + bag.push(a); + } + return bag; + } + + function test(bag) { + for (var i = 0; i != bag.length; ++i) { + var a = bag[i]; + a.unshift(1); + a[2] = 2; + } + } + + var bag = prepare_arays(); + test(bag); + for (var i = 0; i != bag.length; ++i) { + var a = bag[i]; + assertEq(a[0], 1); + assertEq(a[1], 0); + assertEq(a[2], 2); + for (var j = 3; j < a.length; ++j) { + assertEq(j in a, false); + } + } +} + +function test_splice() { + + function prepare_arays() { + var bag = []; + var base_index = 245; + for (var i = 0; i != 50; ++i) { + var a = [1, 2]; + a.length = i + base_index; + bag.push(a); + } + return bag; + } + + function test(bag) { + for (var i = 0; i != bag.length; ++i) { + var a = bag[i]; + a.splice(1, 0, "a", "b", "c"); + a[2] = 100; + } + } + + var bag = prepare_arays(); + test(bag); + for (var i = 0; i != bag.length; ++i) { + var a = bag[i]; + assertEq(a[0], 1); + assertEq(a[1], "a"); + assertEq(a[2], 100); + assertEq(a[3], "c"); + assertEq(a[4], 2); + for (var j = 5; j < a.length; ++j) { + assertEq(j in a, false); + } + } +} + +test_set_elem(); +test_reverse(); +test_push(); +test_unshift(); +test_splice(); + diff --git a/js/src/jit-test/tests/basic/testDestructuring.js b/js/src/jit-test/tests/basic/testDestructuring.js new file mode 100644 index 0000000000..05a267802b --- /dev/null +++ b/js/src/jit-test/tests/basic/testDestructuring.js @@ -0,0 +1,9 @@ +function testDestructuring() { + var t = 0; + for (var i = 0; i < 9; ++i) { + var [r, g, b] = [1, 1, 1]; + t += r + g + b; + } + return t +} +assertEq(testDestructuring(), (9) * 3); diff --git a/js/src/jit-test/tests/basic/testDestructuringFormalError.js b/js/src/jit-test/tests/basic/testDestructuringFormalError.js new file mode 100644 index 0000000000..1d1a8c2c03 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDestructuringFormalError.js @@ -0,0 +1,6 @@ +// |jit-test| error:TypeError +(function({ + l +}) { + eval(); +})() diff --git a/js/src/jit-test/tests/basic/testDestructuringVarInsideWith.js b/js/src/jit-test/tests/basic/testDestructuringVarInsideWith.js new file mode 100644 index 0000000000..b233c9ceb2 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDestructuringVarInsideWith.js @@ -0,0 +1,4 @@ +with ({b:1}) { + const [ b ] = []; + assertEq(b, undefined); +} diff --git a/js/src/jit-test/tests/basic/testDifferingArgc.js b/js/src/jit-test/tests/basic/testDifferingArgc.js new file mode 100644 index 0000000000..0cac5696fc --- /dev/null +++ b/js/src/jit-test/tests/basic/testDifferingArgc.js @@ -0,0 +1,18 @@ +function doTestDifferingArgc(a, b) +{ + var k = 0; + for (var i = 0; i < 10; i++) + { + k += i; + } + return k; +} +function testDifferingArgc() +{ + var x = 0; + x += doTestDifferingArgc(1, 2); + x += doTestDifferingArgc(1); + x += doTestDifferingArgc(1, 2, 3); + return x; +} +assertEq(testDifferingArgc(), 45*3); diff --git a/js/src/jit-test/tests/basic/testDivModWithIntMin.js b/js/src/jit-test/tests/basic/testDivModWithIntMin.js new file mode 100644 index 0000000000..a8ea2d2c41 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDivModWithIntMin.js @@ -0,0 +1,62 @@ +var intMin = -2147483648; +var intMax = 2147483647; +var negativeZero = -0; +var zero = 0; + +function testModNegativeZero() { + assertEq(intMin % -2147483648, -0); + assertEq(intMin % -1, -0); + assertEq(intMin % 1, -0); + assertEq(intMin % -2147483648, -0); + + assertEq(((intMin|0) % -2147483648)|0, 0); + assertEq(((intMin|0) % -1)|0, 0); + assertEq(((intMin|0) % 1)|0, 0); + assertEq(((intMin|0) % -2147483648)|0, 0); +} + +testModNegativeZero(); +testModNegativeZero(); + +function testMinModulus1() { + assertEq(intMin % -3, -2); + assertEq(intMin % 3, -2); + assertEq(intMin % 10, -8); + assertEq(intMin % 2147483647, -1); + + assertEq(((intMin|0) % -3)|0, -2); + assertEq(((intMin|0) % 3)|0, -2); + assertEq(((intMin|0) % 10)|0, -8); + assertEq(((intMin|0) % 2147483647)|0, -1); +} + +testMinModulus1(); +testMinModulus1(); + +function testMinModulus2() { + for (var i = -10; i <= 10; ++i) + assertEq(i % -2147483648, i); + assertEq(intMax % -2147483648, intMax); + + for (var i = -10; i <= 10; ++i) + assertEq(((i|0) % -2147483648)|0, i); + assertEq(((intMax|0) % -2147483648)|0, intMax); +} + +testMinModulus2(); +testMinModulus2(); + +function testDivEdgeCases() { + assertEq(intMin / -2147483648, 1); + assertEq(intMin / -1, -intMin); + assertEq(negativeZero / -2147483648, 0); + assertEq(zero / -2147483648, -0); + + assertEq(((intMin|0) / -2147483648)|0, 1); + assertEq(((intMin|0) / -1)|0, intMin); + assertEq(((negativeZero|0) / -2147483648)|0, 0); + assertEq(((zero|0) / -2147483648)|0, 0); +} + +testDivEdgeCases(); +testDivEdgeCases(); diff --git a/js/src/jit-test/tests/basic/testDivision.js b/js/src/jit-test/tests/basic/testDivision.js new file mode 100644 index 0000000000..52f3d9557a --- /dev/null +++ b/js/src/jit-test/tests/basic/testDivision.js @@ -0,0 +1,10 @@ +function testDivision() { + var a = 32768; + var b; + while (b !== 1) { + b = a / 2; + a = b; + } + return a; +} +assertEq(testDivision(), 1); diff --git a/js/src/jit-test/tests/basic/testDivisionFloat.js b/js/src/jit-test/tests/basic/testDivisionFloat.js new file mode 100644 index 0000000000..44f67659a8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDivisionFloat.js @@ -0,0 +1,10 @@ +function testDivisionFloat() { + var a = 32768.0; + var b; + while (b !== 1) { + b = a / 2.0; + a = b; + } + return a === 1.0; +} +assertEq(testDivisionFloat(), true); diff --git a/js/src/jit-test/tests/basic/testDivisionWithNegative1.js b/js/src/jit-test/tests/basic/testDivisionWithNegative1.js new file mode 100644 index 0000000000..18a3b266fa --- /dev/null +++ b/js/src/jit-test/tests/basic/testDivisionWithNegative1.js @@ -0,0 +1,6 @@ +function testDivisionWithNegative1() { + for (var i = 3; i >= 0; --i) + c = i / -1; + return 1/c; +} +assertEq(testDivisionWithNegative1(), -Infinity); diff --git a/js/src/jit-test/tests/basic/testDontClobberScannerError.js b/js/src/jit-test/tests/basic/testDontClobberScannerError.js new file mode 100644 index 0000000000..cdde939306 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDontClobberScannerError.js @@ -0,0 +1,9 @@ +var caught = false; +try { + Function("a, …", ""); +} catch(e) { + assertEq(e.toString().search("SyntaxError: malformed formal parameter") == -1, true); + assertEq(e.toString().search("SyntaxError: illegal character") == -1, false); + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/basic/testDoubleComparison.js b/js/src/jit-test/tests/basic/testDoubleComparison.js new file mode 100644 index 0000000000..1d4b3e33a5 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDoubleComparison.js @@ -0,0 +1,13 @@ +function testDoubleComparison() +{ + for (var i = 0; i < 500000; ++i) + { + switch (1 / 0) + { + case Infinity: + } + } + + return "finished"; +} +assertEq(testDoubleComparison(), "finished"); diff --git a/js/src/jit-test/tests/basic/testDoubleToStr.js b/js/src/jit-test/tests/basic/testDoubleToStr.js new file mode 100644 index 0000000000..9eea240bb6 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDoubleToStr.js @@ -0,0 +1,9 @@ +function testDoubleToStr() { + var x = 0.0; + var y = 5.5; + for (var i = 0; i < 200; i++) { + x += parseFloat(y.toString()); + } + return x; +} +assertEq(testDoubleToStr(), 5.5*200); diff --git a/js/src/jit-test/tests/basic/testDoubleZeroInSwitch1.js b/js/src/jit-test/tests/basic/testDoubleZeroInSwitch1.js new file mode 100644 index 0000000000..2b147aaf27 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDoubleZeroInSwitch1.js @@ -0,0 +1,7 @@ +var a = Math.sin(Math.PI/2); // spec does not specify precise answer here... +if (a === 1) { // ...but if a === 1 here... + switch (a) { + case 1: break; // ...then it must also match here + default: throw "FAIL"; + } +} diff --git a/js/src/jit-test/tests/basic/testDoubleZeroInSwitch2.js b/js/src/jit-test/tests/basic/testDoubleZeroInSwitch2.js new file mode 100644 index 0000000000..504d1b76db --- /dev/null +++ b/js/src/jit-test/tests/basic/testDoubleZeroInSwitch2.js @@ -0,0 +1,9 @@ +var arr = new Float32Array(1); +arr[0] = 15; +var a = arr[0]; +assertEq(a, 15); +switch (a) { + case 15: break; + default: throw "FAIL"; +} + diff --git a/js/src/jit-test/tests/basic/testDynamicLookup.js b/js/src/jit-test/tests/basic/testDynamicLookup.js new file mode 100644 index 0000000000..781c9f8a7a --- /dev/null +++ b/js/src/jit-test/tests/basic/testDynamicLookup.js @@ -0,0 +1,67 @@ +(function() { var x = 2; eval("assertEq(x, 2)"); })(); +(function() { var x = 2; (function() { assertEq(x, 2) })() })(); +(function() { var x = 2; (function() { eval("assertEq(x, 2)") })() })(); +(function() { var x = 2; (function() { (function() { assertEq(x, 2) })()})() })(); +(function() { var x = 2; (function() { (function() { eval("assertEq(x, 2)") })()})() })(); + +(function() { var x = 2; with({}) { assertEq(x, 2) } })(); +(function() { var x = 2; with({}) { (function() { assertEq(x, 2) })() } })(); +(function() { var x = 3; with({x:2}) { assertEq(x, 2) } })(); +(function() { var x = 3; with({x:2}) { (function() { assertEq(x, 2) })() } })(); +(function() { var x = 2; (function() { with({}) { assertEq(x, 2) } })() })(); +(function() { var x = 2; (function() { with({}) { (function() { assertEq(x, 2) })() } })() })(); +(function() { var x = 3; (function() { with({x:2}) { assertEq(x, 2) } })() })(); +(function() { var x = 3; (function() { with({x:2}) { (function() { assertEq(x, 2) })() } })() })(); + +(function() { if (Math) function x() {}; assertEq(typeof x, "function") })(); +(function() { if (Math) function x() {}; eval('assertEq(typeof x, "function")') })(); +(function() { if (Math) function x() {}; (function() { assertEq(typeof x, "function") })() })(); +(function() { if (Math) function x() {}; (function() { eval('assertEq(typeof x, "function")') })() })(); + +(function() { eval("var x = 2"); assertEq(x, 2) })(); +(function() { eval("var x = 2"); (function() { assertEq(x, 2) })() })(); +(function() { eval("var x = 2"); (function() { (function() { assertEq(x, 2) })() })() })(); + +(function() { var x = 2; (function() { eval('var y = 3'); assertEq(x, 2) })() })(); +(function() { var x = 2; (function() { eval('var y = 3'); (function() { assertEq(x, 2) })() })() })(); + +(function() { var x = 3; (function() { eval('var x = 2'); assertEq(x, 2) })() })(); +(function() { var x = 3; (function() { eval('var x = 2'); (function() { assertEq(x, 2) })() })() })(); + +(function() { var x = 2; eval("eval('assertEq(x, 2)')") })(); +(function() { var x = 2; (function() { eval("eval('assertEq(x, 2)')") })() })(); +(function() { var x = 2; eval("(function() { eval('assertEq(x, 2)') })()") })(); +(function() { var x = 2; (function() { eval("(function() { eval('assertEq(x, 2)') })()") })() })(); +(function() { var x = 2; (function() { eval("(function() { eval('(function() { assertEq(x, 2) })()') })()") })() })(); + +(function() { var [x] = [2]; eval('assertEq(x, 2)') })(); +(function() { var [x] = [2]; (function() { assertEq(x, 2) })() })(); +(function() { var [x] = [2]; (function() { eval('assertEq(x, 2)') })() })(); +(function() { for (var [x] = [2];;) { return (function() { return assertEq(x, 2); })() } })(); +(function() { for (var [x] = [2];;) { return (function() { return eval('assertEq(x, 2)'); })() } })(); + +(function() { var {y:x} = {y:2}; eval('assertEq(x, 2)') })(); +(function() { var {y:x} = {y:2}; (function() { assertEq(x, 2) })() })(); +(function() { var {y:x} = {y:2}; (function() { eval('assertEq(x, 2)') })() })(); +(function() { for (var {y:x} = {y:2};;) { return (function() { return assertEq(x, 2); })() } })(); +(function() { for (var {y:x} = {y:2};;) { return (function() { return eval('assertEq(x, 2)'); })() } })(); + +(function([x]) { eval('assertEq(x, 2)') })([2]); +(function([x]) { (function() { assertEq(x, 2) })() })([2]); +(function([x]) { (function() { eval('assertEq(x, 2)') })() })([2]); + +(function f() { assertEq(f.length, 0) })(); +(function f() { eval('assertEq(f.length, 0)') })(); +(function f() { (function f(x) { eval('assertEq(f.length, 1)') })() })(); +(function f() { eval("(function f(x) { eval('assertEq(f.length, 1)') })()") })(); + +(function f() { arguments = 3; function arguments() {}; assertEq(arguments, 3) })(); +(function f() { function arguments() {}; arguments = 3; assertEq(arguments, 3) })(); +(function f() { var arguments = 3; function arguments() {}; assertEq(arguments, 3) })(); +(function f() { function arguments() {}; var arguments = 3; assertEq(arguments, 3) })(); + +function f1() { assertEq(typeof f1, "function") }; f1(); +with({}) { (function() { assertEq(typeof f1, "function") })() } +if (Math) + function f2(x) {} +assertEq(f2.length, 1); diff --git a/js/src/jit-test/tests/basic/testDynamicUsage.js b/js/src/jit-test/tests/basic/testDynamicUsage.js new file mode 100644 index 0000000000..49ee874c1f --- /dev/null +++ b/js/src/jit-test/tests/basic/testDynamicUsage.js @@ -0,0 +1,82 @@ +assertEq((function() { var x = 3; return (function() { return x } )() })(), 3); +assertEq((function() { var g = function() { return x }; var x = 3; return g()})(), 3); +assertEq((function() { var x; x = 3; return (function() { return x } )() })(), 3); +assertEq((function() { x = 3; var x; return (function() { return x } )() })(), 3); +assertEq((function() { var x; var g = function() { return x }; x = 3; return g() })(), 3); + +assertEq((function() { function f() { return 3 }; assertEq(f(), 3); return (function() { return f(); })(); })(), 3); +assertEq((function() { function f() { return 3 }; assertEq(f(), 3); return eval('f()') })(), 3); +assertEq((function() { function f() { return 3 }; (function() { return f(); })(); return f() })(), 3); + +assertEq((function() { var x = 3; return eval("x") })(), 3); +assertEq((function() { var x; x = 3; return eval("x") })(), 3); +assertEq((function() { x = 3; var x; return eval("x") })(), 3); + +assertEq((function() { var x; (function() {x = 2})(); return ++x })(), 3); +assertEq((function() { var x; (function() {x = 2})(); x++; return x })(), 3); +assertEq((function() { var x; (function() {x = 4})(); return --x })(), 3); +assertEq((function() { var x; (function() {x = 4})(); x--; return x })(), 3); + +assertEq((function(x) { return (function() { return x } )() })(3), 3); +assertEq((function(x) { var x = 3; return (function() { return x } )() })(4), 3); +assertEq((function(x) { x = 3; return (function() { return x } )() })(4), 3); +assertEq((function(x) { var g = function() { return x }; x = 3; return g()})(3), 3); + +assertEq((function(x) { return eval("x") })(3), 3); +assertEq((function(x) { x = 3; return eval("x") })(4), 3); + +assertEq((function(a) { var [x,y] = a; (function() { x += y })(); return x })([1,2]), 3); +assertEq((function(a) { var [x,y] = a; x += y; return (function() { return x; })() })([1,2]), 3); +assertEq((function(a) { var [[l, x],[m, y]] = a; x += y; return (function() { return x; })() })([[0,1],[0,2]]), 3); +assertEq((function(a) { var [x,y] = a; eval('x += y'); return x })([1,2]), 3); +assertEq((function(a) { var [x,y] = a; x += y; return eval('x') })([1,2]), 3); +assertEq((function(a) { var [x,y] = a; (function() { x += y })(); return x })([1,2]), 3); +assertEq((function(a) { var [x,y] = a; x += y; return (function() { return x; })() })([1,2]), 3); +assertEq((function(a,x,y) { [x,y] = a; (function() { eval('x += y') })(); return x })([1,2]), 3); +assertEq((function(a,x,y) { [x,y] = a; x += y; return (function() { return eval('x'); })() })([1,2]), 3); + +assertEq((function() { var [x,y] = [1,2]; x += y; return (function() { return x; })() })(), 3); +assertEq((function() { var [x,y] = [1,2]; (function() { return x += y; })(); return x })(), 3); +assertEq((function() { { let [x,y] = [1,2]; x += y; return (function() { return x; })() } })(), 3); +assertEq((function() { { let [x,y] = [1,2]; (function() { return x += y; })(); return x } })(), 3); + +assertEq((function([x,y]) { (function() { x += y })(); return x })([1,2]), 3); +assertEq((function([x,y]) { x += y; return (function() { return x; })() })([1,2]), 3); +assertEq((function([[l,x],[m,y]]) { (function() { x += y })(); return x })([[0,1],[0,2]]), 3); +assertEq((function([[l,x],[m,y]]) { x += y; return (function() { return x; })() })([[0,1],[0,2]]), 3); +assertEq((function([x,y]) { (function() { eval('x += y') })(); return x })([1,2]), 3); +assertEq((function([x,y]) { x += y; return (function() { return eval('x'); })() })([1,2]), 3); +assertEq((function() { try { throw [1,2] } catch([x,y]) { eval('x += y'); return x }})(), 3); +assertEq((function() { try { throw [1,2] } catch([x,y]) { x += y; return eval('x') }})(), 3); +assertEq((function() { try { throw [1,2] } catch([x,y]) { (function() { x += y })(); return x }})(), 3); +assertEq((function() { try { throw [1,2] } catch([x,y]) { x += y; return (function() { return x; })() }})(), 3); +assertEq((function() { try { throw [1,2] } catch([x,y]) { (function() { eval('x += y') })(); return x }})(), 3); +assertEq((function() { try { throw [1,2] } catch([x,y]) { x += y; return (function() { return eval('x'); })() }})(), 3); + +assertEq((function(a) { let [x,y] = a; (function() { x += y })(); return x })([1,2]), 3); +assertEq((function(a) { let [x,y] = a; x += y; return (function() { return x; })() })([1,2]), 3); +assertEq((function(a) { { let [x,y] = a; (function() { x += y })(); return x } })([1,2]), 3); +assertEq((function(a) { { let [x,y] = a; x += y; return (function() { return x; })() } })([1,2]), 3); +assertEq((function(a) { { let [[l, x],[m, y]] = a; (function() { x += y })(); return x } })([[0,1],[0,2]]), 3); +assertEq((function(a) { { let [[l, x],[m, y]] = a; x += y; return (function() { return x; })() } })([[0,1],[0,2]]), 3); + +assertEq((function() { let x = 3; return (function() { return x })() })(), 3); +assertEq((function() { let g = function() { return x }; let x = 3; return g() })(), 3); + +assertEq((function() { { let x = 3; return (function() { return x })() } })(), 3); +assertEq((function() { { let x = 3; (function() { assertEq(x, 3) })(); return x } })(), 3); +assertEq((function() { { let x = 2; x = 3; return (function() { return x })() } })(), 3); +assertEq((function() { { let x = 1; { let x = 3; (function() { assertEq(x,3) })() } return x } })(), 1); + +assertEq((function() { try { throw 3 } catch (e) { (function(){assertEq(e,3)})(); return e } })(), 3); +assertEq((function() { try { throw 3 } catch (e) { assertEq(e, 3); return (function() { return e; })() } })(), 3); +assertEq((function() { try { throw 3 } catch (e) { (function(){eval('assertEq(e,3)')})(); return e } })(), 3); + +assertEq((function() { var x; function f() { return x } function f() { return 3 }; return f() })(), 3); +assertEq((function() { var x = 3; function f() { return 3 } function f() { return x }; return f() })(), 3); + +assertEq((function() { function f(x,y) { (function() { assertEq(f.length, 2) })(); }; return f.length })(), 2); +assertEq((function f(x,y) { (function() { assertEq(f.length, 2) })(); return f.length})(), 2); +function f1(x,y) { (function() { assertEq(f1.length, 2) })(); assertEq(f1.length, 2) }; f1(); + +String(function([]) { eval('') }); diff --git a/js/src/jit-test/tests/basic/testElemDec1.js b/js/src/jit-test/tests/basic/testElemDec1.js new file mode 100644 index 0000000000..c03ea2ae05 --- /dev/null +++ b/js/src/jit-test/tests/basic/testElemDec1.js @@ -0,0 +1,7 @@ +var obj = {p: 100}; +var name = "p"; +var a = []; +for (var i = 0; i < 10; i++) + a[i] = obj[name]--; +assertEq(a.join(','), '100,99,98,97,96,95,94,93,92,91'); +assertEq(obj.p, 90); diff --git a/js/src/jit-test/tests/basic/testElemDec2.js b/js/src/jit-test/tests/basic/testElemDec2.js new file mode 100644 index 0000000000..7dc674645f --- /dev/null +++ b/js/src/jit-test/tests/basic/testElemDec2.js @@ -0,0 +1,7 @@ +var obj = {s: ""}; +var name = "s"; +for (var i = 0; i <= 13; i++) + if (i > 8) + obj[name]--; // first recording changes obj.s from string to number +assertEq(obj.s, -5); + diff --git a/js/src/jit-test/tests/basic/testElemInc1.js b/js/src/jit-test/tests/basic/testElemInc1.js new file mode 100644 index 0000000000..c0d4f8c113 --- /dev/null +++ b/js/src/jit-test/tests/basic/testElemInc1.js @@ -0,0 +1,7 @@ +var obj = {p: 100}; +var name = "p"; +var a = []; +for (var i = 0; i < 10; i++) + a[i] = obj[name]++; +assertEq(a.join(','), '100,101,102,103,104,105,106,107,108,109'); +assertEq(obj.p, 110); diff --git a/js/src/jit-test/tests/basic/testElemInc2.js b/js/src/jit-test/tests/basic/testElemInc2.js new file mode 100644 index 0000000000..56a926b2e2 --- /dev/null +++ b/js/src/jit-test/tests/basic/testElemInc2.js @@ -0,0 +1,7 @@ +var obj = {s: ""}; +var name = "s"; +for (var i = 0; i <= 13; i++) + if (i > 8) + obj[name]++; // first recording changes obj.s from string to number +assertEq(obj.s, 5); + diff --git a/js/src/jit-test/tests/basic/testEliminatedGuardWithinAnchor.js b/js/src/jit-test/tests/basic/testEliminatedGuardWithinAnchor.js new file mode 100644 index 0000000000..25d0be96ca --- /dev/null +++ b/js/src/jit-test/tests/basic/testEliminatedGuardWithinAnchor.js @@ -0,0 +1,6 @@ +function testEliminatedGuardWithinAnchor() { + for (let i = 0; i < 5; ++i) { i / (i * i); } + return "ok"; +} + +assertEq(testEliminatedGuardWithinAnchor(), "ok"); diff --git a/js/src/jit-test/tests/basic/testEqFalseEmptyString.js b/js/src/jit-test/tests/basic/testEqFalseEmptyString.js new file mode 100644 index 0000000000..6fd70f1076 --- /dev/null +++ b/js/src/jit-test/tests/basic/testEqFalseEmptyString.js @@ -0,0 +1,6 @@ +function testEqFalseEmptyString() { + var x = []; + for (var i=0;i<5;++i) x.push(false == ""); + return x.join(","); +} +assertEq(testEqFalseEmptyString(), "true,true,true,true,true"); diff --git a/js/src/jit-test/tests/basic/testErrorInFinalizerCalledWhileUnwinding.js b/js/src/jit-test/tests/basic/testErrorInFinalizerCalledWhileUnwinding.js new file mode 100644 index 0000000000..140b75175a --- /dev/null +++ b/js/src/jit-test/tests/basic/testErrorInFinalizerCalledWhileUnwinding.js @@ -0,0 +1,31 @@ +var finalizerRun = false; +var caught = false; + +function foo(arr) { + finalizerRun = true; + return not_defined; +} + +function* gen() { + try { + yield 1; + } finally { + foo(); + } +} + +function test() { + var i_have_locals; + for (i of gen()) { + } +} + +try { + test(); +} catch(e) { + caught = true; + assertEq(''+e, "ReferenceError: not_defined is not defined"); +} + +assertEq(finalizerRun, true); +assertEq(caught, true); diff --git a/js/src/jit-test/tests/basic/testEvalInFrameEdgeCase.js b/js/src/jit-test/tests/basic/testEvalInFrameEdgeCase.js new file mode 100644 index 0000000000..d22a357572 --- /dev/null +++ b/js/src/jit-test/tests/basic/testEvalInFrameEdgeCase.js @@ -0,0 +1,11 @@ +load(libdir + "evalInFrame.js"); + +function g() { + var x = 100; + return evalInFrame(2, "x"); +} +function f() { + var x = 42; + return evalInFrame.call(null, 0, "g()"); +} +assertEq(f.call(), 42); diff --git a/js/src/jit-test/tests/basic/testEvalInFunctionCallee.js b/js/src/jit-test/tests/basic/testEvalInFunctionCallee.js new file mode 100644 index 0000000000..81f757fa62 --- /dev/null +++ b/js/src/jit-test/tests/basic/testEvalInFunctionCallee.js @@ -0,0 +1,4 @@ +function f(x,y) { + eval("assertEq(arguments.callee, f)"); +} +f(1,2); diff --git a/js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt-2.js b/js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt-2.js new file mode 100644 index 0000000000..002da3f61b --- /dev/null +++ b/js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt-2.js @@ -0,0 +1,8 @@ +function f() { + var a = [], i, N = 10; + for (i = 0; i < N; i++) + a[i] = {m: i, m: function() { return 0; }}; + assertEq(a[N - 2].m === a[N - 1].m, false); +} +f(); +f(); diff --git a/js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt-3.js b/js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt-3.js new file mode 100644 index 0000000000..573c33ef11 --- /dev/null +++ b/js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt-3.js @@ -0,0 +1,15 @@ +function f() { + var a = [], i, N = 10; + for (i = 0; i < N; i++) { + a[i] = {}; + a[i].m = function() { return 0; }; + a[i].m = function() { return 1; }; + } + assertEq(a[N - 2].m === a[N - 1].m, false); + for (i = 0; i < N; i++) { + var f = a[i].m; + assertEq(f(), 1); + } +} +f(); +f(); diff --git a/js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt-4.js b/js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt-4.js new file mode 100644 index 0000000000..8d0bc1b157 --- /dev/null +++ b/js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt-4.js @@ -0,0 +1,12 @@ +function f() { + var a = [], i, N = 10; + for (i = 0; i < N; i++) + a[i] = {m: function() { return 0; }, m: function() { return 1; }}; + assertEq(a[N - 2].m === a[N - 1].m, false); + for (i = 0; i < N; i++) { + var f = a[i].m; + assertEq(f(), 1); + } +} +f(); +f(); diff --git a/js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt.js b/js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt.js new file mode 100644 index 0000000000..0faafe2f4b --- /dev/null +++ b/js/src/jit-test/tests/basic/testExistingPropToJoinedMethodAttempt.js @@ -0,0 +1,10 @@ +function f() { + var a = [], i, N = 10; + for (i = 0; i < N; i++) + a[i] = {m: i}; + for (i = 0; i < N; i++) + a[i].m = function() { return 0; }; + assertEq(a[N - 2].m === a[N - 1].m, false); +} +f(); +f(); diff --git a/js/src/jit-test/tests/basic/testFakeDOMWeakmapKey.js b/js/src/jit-test/tests/basic/testFakeDOMWeakmapKey.js new file mode 100644 index 0000000000..80d116960d --- /dev/null +++ b/js/src/jit-test/tests/basic/testFakeDOMWeakmapKey.js @@ -0,0 +1 @@ +(new WeakMap).set(FakeDOMObject.prototype, this) diff --git a/js/src/jit-test/tests/basic/testFloatArrayIndex.js b/js/src/jit-test/tests/basic/testFloatArrayIndex.js new file mode 100644 index 0000000000..564824778d --- /dev/null +++ b/js/src/jit-test/tests/basic/testFloatArrayIndex.js @@ -0,0 +1,9 @@ +function testFloatArrayIndex() { + var a = []; + for (var i = 0; i < 10; ++i) { + a[3] = 5; + a[3.5] = 7; + } + return a[3] + "," + a[3.5]; +} +assertEq(testFloatArrayIndex(), "5,7"); diff --git a/js/src/jit-test/tests/basic/testFoldPropertyAccess.js b/js/src/jit-test/tests/basic/testFoldPropertyAccess.js new file mode 100644 index 0000000000..2ccb5e21f7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testFoldPropertyAccess.js @@ -0,0 +1,23 @@ + +var cases = [ + function (obj) { + return obj["ab"]; + }, + function (obj) { + return obj["a" + "b"]; + }, + function (obj) { + return obj[0 ? "cd" : "ab"]; + }, + function (obj) { + return obj[true ? "ab" : "cd"]; + }, + function (obj) { + return obj[(1 + 0) ? "ab" : "cd"]; + } +] + +for (var i = 0; i < cases.length; i++) { + assertEq(cases[i]({ab: 42}), 42); + assertEq(cases[i]({cd: 120}), undefined); +} diff --git a/js/src/jit-test/tests/basic/testForInLoopChangeIteratorType.js b/js/src/jit-test/tests/basic/testForInLoopChangeIteratorType.js new file mode 100644 index 0000000000..0efce83648 --- /dev/null +++ b/js/src/jit-test/tests/basic/testForInLoopChangeIteratorType.js @@ -0,0 +1,11 @@ +function testForInLoopChangeIteratorType() { + for(y in [0,1,2]) y = NaN; + (function(){ + [].__proto__.u = void 0; + for (let y in [5,6,7,8]) + y = NaN; + delete [].__proto__.u; + })() + return "ok"; +} +assertEq(testForInLoopChangeIteratorType(), "ok"); diff --git a/js/src/jit-test/tests/basic/testFunApplyMadness1.js b/js/src/jit-test/tests/basic/testFunApplyMadness1.js new file mode 100644 index 0000000000..dabc41be44 --- /dev/null +++ b/js/src/jit-test/tests/basic/testFunApplyMadness1.js @@ -0,0 +1,19 @@ +function g() { assertEq(false, true) } +var ct = 0; + +function f(b) { + var a = arguments; + if (b) + f(false); + else + g = { + apply:function(x,y) { + ++ct; + assertEq(x, null); + assertEq(typeof y[0], "boolean"); + } + }; + g.apply(null, a); +} +f(true); +assertEq(ct, 2); diff --git a/js/src/jit-test/tests/basic/testFunApplyMadness2.js b/js/src/jit-test/tests/basic/testFunApplyMadness2.js new file mode 100644 index 0000000000..22684fdd31 --- /dev/null +++ b/js/src/jit-test/tests/basic/testFunApplyMadness2.js @@ -0,0 +1,20 @@ +function g() { assertEq(false, true) } +var ct = 0; + +function f(b) { + if (b) { + arguments = [false]; + f(false); + } else { + g = { + apply:function(x,y) { + ++ct; + assertEq(x, null); + assertEq(y[0], false); + } + }; + } + g.apply(null, arguments); +} +f(true); +assertEq(ct, 2); diff --git a/js/src/jit-test/tests/basic/testFunApplyMadness400.js b/js/src/jit-test/tests/basic/testFunApplyMadness400.js new file mode 100644 index 0000000000..886d559347 --- /dev/null +++ b/js/src/jit-test/tests/basic/testFunApplyMadness400.js @@ -0,0 +1,19 @@ +function g() { assertEq(false, true) } +var max = 400; ct = 0; + +function f(b) { + if (b) { + f(b - 1); + } else { + g = { + apply:function(x,y) { + assertEq(x, null); + assertEq(y[0], ct); + ++ct; + } + }; + } + g.apply(null, arguments); +} +f(max - 1); +assertEq(ct, max); diff --git a/js/src/jit-test/tests/basic/testFunApplyMisspeculation.js b/js/src/jit-test/tests/basic/testFunApplyMisspeculation.js new file mode 100644 index 0000000000..d572d4ff20 --- /dev/null +++ b/js/src/jit-test/tests/basic/testFunApplyMisspeculation.js @@ -0,0 +1,3 @@ +var h = { apply:function() { return "ponies"; } }; +function f() { var x = 3; g = function() { return ++x }; return h.apply(null, arguments) } +assertEq(f(), "ponies"); diff --git a/js/src/jit-test/tests/basic/testFunApplyOverflow.js b/js/src/jit-test/tests/basic/testFunApplyOverflow.js new file mode 100644 index 0000000000..45be944e99 --- /dev/null +++ b/js/src/jit-test/tests/basic/testFunApplyOverflow.js @@ -0,0 +1,10 @@ +function g(x,y) { + return x + y; +} + +function f(x) { + return g.apply(null, arguments); +} + +for (var i = 0; i < 100; ++i) + assertEq(f(i, 1), i+1); diff --git a/js/src/jit-test/tests/basic/testFunctionIdentityChange.js b/js/src/jit-test/tests/basic/testFunctionIdentityChange.js new file mode 100644 index 0000000000..9f4b7dddf9 --- /dev/null +++ b/js/src/jit-test/tests/basic/testFunctionIdentityChange.js @@ -0,0 +1,16 @@ +function testFunctionIdentityChange() +{ + function a() {} + function b() {} + + var o = { a: a, b: b }; + + for (var prop in o) + { + for (var i = 0; i < 1000; i++) + o[prop](); + } + + return true; +} +assertEq(testFunctionIdentityChange(), true); diff --git a/js/src/jit-test/tests/basic/testFunctionStatementAliasLocals.js b/js/src/jit-test/tests/basic/testFunctionStatementAliasLocals.js new file mode 100644 index 0000000000..be7f528b95 --- /dev/null +++ b/js/src/jit-test/tests/basic/testFunctionStatementAliasLocals.js @@ -0,0 +1,18 @@ +function f1(b) { + var w = 3; + if (b) + function w() {} + return w; +} +assertEq(typeof f1(true), "function"); +assertEq(f1(false), 3); + +function f2(b, w) { + // Annex B doesn't apply to functions in blocks with the same name as a + // parameter. + if (b) + function w() {} + return w; +} +assertEq(typeof f2(true, 3), "number"); +assertEq(f2(false, 3), 3); diff --git a/js/src/jit-test/tests/basic/testFunctionStatementNamedArguments.js b/js/src/jit-test/tests/basic/testFunctionStatementNamedArguments.js new file mode 100644 index 0000000000..967ab3e938 --- /dev/null +++ b/js/src/jit-test/tests/basic/testFunctionStatementNamedArguments.js @@ -0,0 +1,10 @@ +var g; +function foo(b) { + if (b) + function arguments() {}; + return arguments; +} + +var a = foo(true); +assertEq(typeof a, "function"); +assertEq(a.name, "arguments"); diff --git a/js/src/jit-test/tests/basic/testGCWhileRecording.js b/js/src/jit-test/tests/basic/testGCWhileRecording.js new file mode 100644 index 0000000000..2c80203318 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGCWhileRecording.js @@ -0,0 +1,8 @@ +function test() { + for (let z = 0; z < 4; ++z) { + JSON.stringify({ x: 9 }); + gc() + } + return "pass"; +} +assertEq(test(), "pass"); diff --git a/js/src/jit-test/tests/basic/testGeneratorDeepBail.js b/js/src/jit-test/tests/basic/testGeneratorDeepBail.js new file mode 100644 index 0000000000..29abc8b1e1 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGeneratorDeepBail.js @@ -0,0 +1,11 @@ +function testGeneratorDeepBail() { + function* g() { yield 2; } + var iterables = [[1], [], [], [], g()]; + + var total = 0; + for (let i = 0; i < iterables.length; i++) + for (let j of iterables[i]) + total += j; + return total; +} +assertEq(testGeneratorDeepBail(), 3); diff --git a/js/src/jit-test/tests/basic/testGeneratorDieButScopeAlive.js b/js/src/jit-test/tests/basic/testGeneratorDieButScopeAlive.js new file mode 100644 index 0000000000..42799776f2 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGeneratorDieButScopeAlive.js @@ -0,0 +1,24 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +var hits = 0; +dbg.onDebuggerStatement = function(frame) { + ++hits; + frame.older.eval("escaped = function() { return y }"); +} + +var arr = []; +const N = 10; + +for (var i = 0; i < N; ++i) { + g.escaped = undefined; + g.eval("function h() { debugger }"); + g.eval("(function* () { var y = {p:42}; h(); yield })().next();"); + assertEq(g.eval("escaped().p"), 42); + arr.push(g.escaped); +} + +gc(); + +for (var i = 0; i < N; ++i) + arr[i](); diff --git a/js/src/jit-test/tests/basic/testGetCallObj.js b/js/src/jit-test/tests/basic/testGetCallObj.js new file mode 100644 index 0000000000..6c0902a0ae --- /dev/null +++ b/js/src/jit-test/tests/basic/testGetCallObj.js @@ -0,0 +1,11 @@ +function testGetCallObjInlined(i) { + if (i > 7) eval("1"); + return 1; +} + +function testGetCallObj() { + for (var i = 0; i < 10; ++i) + testGetCallObjInlined(i); + return "ok"; +} +assertEq(testGetCallObj(), "ok"); diff --git a/js/src/jit-test/tests/basic/testGetThis.js b/js/src/jit-test/tests/basic/testGetThis.js new file mode 100644 index 0000000000..3c2546a6b0 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGetThis.js @@ -0,0 +1,7 @@ +function testGetThis() { + for (var i = 0; i < 3; ++i) { + (function() { return this; })(); + } + return "ok"; +} +assertEq(testGetThis(), "ok"); diff --git a/js/src/jit-test/tests/basic/testGlobalAsProto.js b/js/src/jit-test/tests/basic/testGlobalAsProto.js new file mode 100644 index 0000000000..1ba24550a4 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGlobalAsProto.js @@ -0,0 +1,3 @@ +var b = Object.create(this); +for (var i = 0; i < 9; i++) + assertEq(b.i, i); diff --git a/js/src/jit-test/tests/basic/testGlobalOptimize-2.js b/js/src/jit-test/tests/basic/testGlobalOptimize-2.js new file mode 100644 index 0000000000..3aa1db6104 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGlobalOptimize-2.js @@ -0,0 +1,8 @@ +var test; +{ + let a = 5; + with ({a: 2}) { + test = (function () { return a; })(); + } +} +assertEq(test, 2); diff --git a/js/src/jit-test/tests/basic/testGlobalOptimize-3.js b/js/src/jit-test/tests/basic/testGlobalOptimize-3.js new file mode 100644 index 0000000000..ef62a70890 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGlobalOptimize-3.js @@ -0,0 +1,10 @@ +var test; +{ + with ({a: 2}) { + { + let a = 5; + test = (function () { return a; })(); + } + } +} +assertEq(test, 5); diff --git a/js/src/jit-test/tests/basic/testGlobalOptimize-4.js b/js/src/jit-test/tests/basic/testGlobalOptimize-4.js new file mode 100644 index 0000000000..30754214a4 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGlobalOptimize-4.js @@ -0,0 +1,8 @@ +var test; +{ + with ({a: 2}) { + test = (function () { return a; })(); + } + let a = 5; +} +assertEq(test, 2); diff --git a/js/src/jit-test/tests/basic/testGlobalOptimize-5.js b/js/src/jit-test/tests/basic/testGlobalOptimize-5.js new file mode 100644 index 0000000000..e0a3aecc2e --- /dev/null +++ b/js/src/jit-test/tests/basic/testGlobalOptimize-5.js @@ -0,0 +1,11 @@ +var test; +function f() { + { + let a = 5; + with ({a: 2}) { + test = (function () { return a;} )(); + } + } +} +f(); +assertEq(test, 2); diff --git a/js/src/jit-test/tests/basic/testGlobalOptimize-6.js b/js/src/jit-test/tests/basic/testGlobalOptimize-6.js new file mode 100644 index 0000000000..4bc14058e8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGlobalOptimize-6.js @@ -0,0 +1,11 @@ +var test; +function f() { + with ({a: 2}) { + { + let a = 5; + test = (function () { return a; })(); + } + } +} +f(); +assertEq(test, 5); diff --git a/js/src/jit-test/tests/basic/testGlobalProtoAccess.js b/js/src/jit-test/tests/basic/testGlobalProtoAccess.js new file mode 100644 index 0000000000..97f161289a --- /dev/null +++ b/js/src/jit-test/tests/basic/testGlobalProtoAccess.js @@ -0,0 +1,5 @@ +function testGlobalProtoAccess() { + return "ok"; +} +this.__proto__.a = 3; for (var j = 0; j < 4; ++j) { [a]; } +assertEq(testGlobalProtoAccess(), "ok"); diff --git a/js/src/jit-test/tests/basic/testGlobalShapeChangeAfterDeepBail.js b/js/src/jit-test/tests/basic/testGlobalShapeChangeAfterDeepBail.js new file mode 100644 index 0000000000..0839b370c3 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGlobalShapeChangeAfterDeepBail.js @@ -0,0 +1,15 @@ +// Complicated whitebox test for bug 487845. +function testGlobalShapeChangeAfterDeepBail() { + function f(name) { + this[name] = 1; // may change global shape + for (var i = 0; i < 4; i++) + ; // MonitorLoopEdge eventually triggers assertion + } + + // When i==3, deep-bail, then change global shape enough times to exhaust + // the array of GlobalStates. + var arr = [[], [], [], ["bug0", "bug1", "bug2", "bug3", "bug4"]]; + for (var i = 0; i < arr.length; i++) + arr[i].forEach(f); +} +testGlobalShapeChangeAfterDeepBail(); diff --git a/js/src/jit-test/tests/basic/testGroupAssignment.js b/js/src/jit-test/tests/basic/testGroupAssignment.js new file mode 100644 index 0000000000..caf72a185e --- /dev/null +++ b/js/src/jit-test/tests/basic/testGroupAssignment.js @@ -0,0 +1,17 @@ +load(libdir + "asserts.js"); + +assertDeepEq( + (function () { + var arr = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 ]; + + for (var i = 0; i < 4; ++i) { + var src = i * 8; + var dst = i * 8 + 7; + for (var j = 0; j < 4; ++j) { + [arr[dst--], arr[src++]] = [arr[src], arr[dst]]; + } + } + return arr; + })(), + [7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 23, 22, 21, 20, 19, 18, 17, 16, 31, 30, 29, 28, 27, 26, 25, 24, 32]); diff --git a/js/src/jit-test/tests/basic/testGrowDenseArray.js b/js/src/jit-test/tests/basic/testGrowDenseArray.js new file mode 100644 index 0000000000..810c12ff63 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGrowDenseArray.js @@ -0,0 +1,7 @@ +function testGrowDenseArray() { + var a = new Array(); + for (var i = 0; i < 10; ++i) + a[i] |= 5; + return a.join(","); +} +assertEq(testGrowDenseArray(), "5,5,5,5,5,5,5,5,5,5"); diff --git a/js/src/jit-test/tests/basic/testGuardCalleeSneakAttack.js b/js/src/jit-test/tests/basic/testGuardCalleeSneakAttack.js new file mode 100644 index 0000000000..87939ef992 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGuardCalleeSneakAttack.js @@ -0,0 +1,31 @@ +function loop(f, expected) { + // This is the loop that breaks us. + // At record time, f's parent is a Call object with no fp. + // At second execute time, it is a Call object with fp, + // and all the Call object's dslots are still JSVAL_VOID. + for (var i = 0; i < 9; i++) + assertEq(f(), expected); +} + +function C(bad) { + var x = bad; + function f() { + return x; // We trick TR::callProp() into emitting code that gets + // JSVAL_VOID (from the Call object's dslots) + // rather than the actual value (true or false). + } + this.m = f; + return f; +} + +var obj = { + set m(f) { + if (f()) // Call once to resolve x on the Call object, + // for shape consistency. Otherwise loop gets + // recorded twice. + loop(f, true); + } +}; + +loop(C.call(obj, false), false); +C.call(obj, true); diff --git a/js/src/jit-test/tests/basic/testGuardCalleeSneakAttack2.js b/js/src/jit-test/tests/basic/testGuardCalleeSneakAttack2.js new file mode 100644 index 0000000000..9bf3c0c383 --- /dev/null +++ b/js/src/jit-test/tests/basic/testGuardCalleeSneakAttack2.js @@ -0,0 +1,32 @@ +function loop(f, expected) { + // This is the loop that breaks us. + // At record time, f's parent is a Call object with no fp. + // At second execute time, it is a Call object with fp, + // and all the Call object's dslots are still JSVAL_VOID. + for (var i = 0; i < 9; i++) + assertEq(f(), expected); +} + +function C(bad) { + var x = bad; + function f() { + return x; // We trick TR::callProp() into emitting code that gets + // JSVAL_VOID (from the Call object's dslots) + // rather than the actual value (true or false). + } + if (bad) + void (f + "a!"); + return f; +} + +var obj = { +}; + +// Warm up and trace with C's Call object entrained but its stack frame gone. +loop(C.call(obj, false), false); + +// Sneaky access to f via a prototype method called implicitly by operator +. +Function.prototype.toString = function () { loop(this, true); return "hah"; }; + +// Fail hard if we don't handle the implicit call out of C to F.p.toString. +C.call(obj, true); diff --git a/js/src/jit-test/tests/basic/testHOTLOOPSize.js b/js/src/jit-test/tests/basic/testHOTLOOPSize.js new file mode 100644 index 0000000000..9245a7f2f5 --- /dev/null +++ b/js/src/jit-test/tests/basic/testHOTLOOPSize.js @@ -0,0 +1,4 @@ +function test8Size() { + return 8 > 1; +} +assertEq(test8Size(), true); diff --git a/js/src/jit-test/tests/basic/testHeavy.js b/js/src/jit-test/tests/basic/testHeavy.js new file mode 100644 index 0000000000..1d539fb2d4 --- /dev/null +++ b/js/src/jit-test/tests/basic/testHeavy.js @@ -0,0 +1,14 @@ +function heavyFn1(i) { + if (i == 3) { + var x = 3; + return [0, i].map(function (i) { return i + x; }); + } + return []; +} + +function testHeavy() { + for (var i = 0; i <= 3; i++) + heavyFn1(i); +} + +testHeavy(); diff --git a/js/src/jit-test/tests/basic/testHeavy2.js b/js/src/jit-test/tests/basic/testHeavy2.js new file mode 100644 index 0000000000..12da3eee5d --- /dev/null +++ b/js/src/jit-test/tests/basic/testHeavy2.js @@ -0,0 +1,20 @@ +function heavyFn1(i) { + if (i == 3) { + var x = 3; + return [0, i].map(function (i) { return i + x; }); + } + return []; +} + +function heavyFn2(i) { + if (i < 1000) + return heavyFn1(i); + return function () { return i; }; +} + +function testHeavy2() { + for (var i = 0; i <= 3; i++) + heavyFn2(i); +} + +testHeavy2(); diff --git a/js/src/jit-test/tests/basic/testHoleInDenseArray.js b/js/src/jit-test/tests/basic/testHoleInDenseArray.js new file mode 100644 index 0000000000..29523262c2 --- /dev/null +++ b/js/src/jit-test/tests/basic/testHoleInDenseArray.js @@ -0,0 +1,16 @@ +var s; + +function f(i) { + if (i > 4) /* side exit when arr[i] changes from bool to undefined (via a hole) */ + assertEq(s, undefined); + else + assertEq(s, false); + return 1; +} + +/* trailing 'true' ensures array has capacity >= 10 */ +var arr = [ false, false, false, false, false, , , , , , true ]; + +for (var i = 0; i < 10; ++i) { + (s = arr[i]) + f(i); +} diff --git a/js/src/jit-test/tests/basic/testHolePushing.js b/js/src/jit-test/tests/basic/testHolePushing.js new file mode 100644 index 0000000000..a2316130ea --- /dev/null +++ b/js/src/jit-test/tests/basic/testHolePushing.js @@ -0,0 +1,13 @@ +function testHolePushing() { + var a = ["foobar", "baz"]; + for (var i = 0; i < 5; i++) + a = [, "overwritten", "new"]; + var s = "["; + for (i = 0; i < a.length; i++) { + s += (i in a) ? a[i] : ""; + if (i != a.length - 1) + s += ","; + } + return s + "], " + (0 in a); +} +assertEq(testHolePushing(), "[,overwritten,new], false"); diff --git a/js/src/jit-test/tests/basic/testHolesAndIndexPropertiesOnThePrototype.js b/js/src/jit-test/tests/basic/testHolesAndIndexPropertiesOnThePrototype.js new file mode 100644 index 0000000000..1af2506bfa --- /dev/null +++ b/js/src/jit-test/tests/basic/testHolesAndIndexPropertiesOnThePrototype.js @@ -0,0 +1,29 @@ +function f(x,y,z) { + return x + y + z; +} + +Array.prototype[1] = 10; + +function g() { + var arr = [1, ,3,4,5,6]; + + for (var i = 0; i < 10; ++i) { + assertEq(f.apply(null, arr), 14); + } +} +g(); + +Object.prototype[1] = 20; + +function h() { + delete arguments[1]; + return f.apply(null, arguments); +} +assertEq(h(1,2,3), 24); + +function i() { + o = arguments; + delete o[1]; + return f.apply(null, o); +} +assertEq(i(1,2,3), 24); diff --git a/js/src/jit-test/tests/basic/testINITELEM.js b/js/src/jit-test/tests/basic/testINITELEM.js new file mode 100644 index 0000000000..2d7567a24d --- /dev/null +++ b/js/src/jit-test/tests/basic/testINITELEM.js @@ -0,0 +1,8 @@ +function testINITELEM() +{ + var x; + for (var i = 0; i < 10; ++i) + x = { 0: 5, 1: 5 }; + return x[0] + x[1]; +} +assertEq(testINITELEM(), 10); diff --git a/js/src/jit-test/tests/basic/testImplicitThisMiss.js b/js/src/jit-test/tests/basic/testImplicitThisMiss.js new file mode 100644 index 0000000000..8539001ef5 --- /dev/null +++ b/js/src/jit-test/tests/basic/testImplicitThisMiss.js @@ -0,0 +1,2 @@ +// |jit-test| error:TypeError +Function("Object.defineProperty(this, 'x', { configurable:true, get:function() { delete this['x'] } }); x()")(); diff --git a/js/src/jit-test/tests/basic/testIn.js b/js/src/jit-test/tests/basic/testIn.js new file mode 100644 index 0000000000..aeadab3088 --- /dev/null +++ b/js/src/jit-test/tests/basic/testIn.js @@ -0,0 +1,19 @@ +function testIn() { + var array = [3]; + var obj = { "-1": 5, "1.7": 3, "foo": 5, "1": 7 }; + var a = []; + for (let j = 0; j < 5; ++j) { + a.push("0" in array); + a.push(-1 in obj); + a.push(1.7 in obj); + a.push("foo" in obj); + a.push(1 in obj); + a.push("1" in array); + a.push(-2 in obj); + a.push(2.7 in obj); + a.push("bar" in obj); + a.push(2 in obj); + } + return a.join(","); +} +assertEq(testIn(), "true,true,true,true,true,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false"); diff --git a/js/src/jit-test/tests/basic/testIncDec.js b/js/src/jit-test/tests/basic/testIncDec.js new file mode 100644 index 0000000000..89b533517f --- /dev/null +++ b/js/src/jit-test/tests/basic/testIncDec.js @@ -0,0 +1,19 @@ +function testIncDec2(ii) { + var x = []; + for (let j=0;j<5;++j) { + ii=j; + jj=j; + var kk=j; + x.push(ii--); + x.push(jj--); + x.push(kk--); + x.push(++ii); + x.push(++jj); + x.push(++kk); + } + return x.join(","); +} +function testIncDec() { + return testIncDec2(0); +} +assertEq(testIncDec(), "0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4"); diff --git a/js/src/jit-test/tests/basic/testIncDecReadOnly.js b/js/src/jit-test/tests/basic/testIncDecReadOnly.js new file mode 100644 index 0000000000..5ff23b2495 --- /dev/null +++ b/js/src/jit-test/tests/basic/testIncDecReadOnly.js @@ -0,0 +1,22 @@ +var r; +Object.defineProperty(this, "x", {value: 0, writable: false}); + +for (var a = 0; a < 10; ++a) + r = ++x; +assertEq(x, 0); +assertEq(r, 1); + +for (var a = 0; a < 10; ++a) + r = --x; +assertEq(x, 0); +assertEq(r, -1); + +for (var a = 0; a < 10; ++a) + r = x++; +assertEq(x, 0); +assertEq(r, 0); + +for (var a = 0; a < 10; ++a) + r = x--; +assertEq(x, 0); +assertEq(r, 0); diff --git a/js/src/jit-test/tests/basic/testIncElem1.js b/js/src/jit-test/tests/basic/testIncElem1.js new file mode 100644 index 0000000000..633c327cf0 --- /dev/null +++ b/js/src/jit-test/tests/basic/testIncElem1.js @@ -0,0 +1,7 @@ +var obj = {p: 100}; +var name = "p"; +var a = []; +for (var i = 0; i < 10; i++) + a[i] = ++obj[name]; +assertEq(a.join(','), '101,102,103,104,105,106,107,108,109,110'); +assertEq(obj.p, 110); diff --git a/js/src/jit-test/tests/basic/testIncElem2.js b/js/src/jit-test/tests/basic/testIncElem2.js new file mode 100644 index 0000000000..cc2d7d08e3 --- /dev/null +++ b/js/src/jit-test/tests/basic/testIncElem2.js @@ -0,0 +1,11 @@ +var obj = {s: ""}; +var name = "s"; +var a = []; +for (var i = 0; i <= 13; i++) { + a[i] = 'x'; + if (i > 8) + a[i] = ++obj[name]; // first recording changes obj.s from string to number +} +assertEq(a.join(','), Array(10).join('x,') + '1,2,3,4,5'); +assertEq(obj.s, 5); + diff --git a/js/src/jit-test/tests/basic/testIncElem3.js b/js/src/jit-test/tests/basic/testIncElem3.js new file mode 100644 index 0000000000..922aeb9b8f --- /dev/null +++ b/js/src/jit-test/tests/basic/testIncElem3.js @@ -0,0 +1,6 @@ +var arr; +for (var j = 0; j < 18; ++j ) { + arr = [,]; + ++arr[0]; +} +assertEq(isNaN(arr[0]), true); diff --git a/js/src/jit-test/tests/basic/testIncElem4.js b/js/src/jit-test/tests/basic/testIncElem4.js new file mode 100644 index 0000000000..a3cec16611 --- /dev/null +++ b/js/src/jit-test/tests/basic/testIncElem4.js @@ -0,0 +1,10 @@ + +var counter = 0; +var x = { toString: function() { counter++; } }; +var y = {}; + +for (var i = 0; i < 50; i++) + ++y[x]; + +// :FIXME: bug 672076 +//assertEq(counter, 50); diff --git a/js/src/jit-test/tests/basic/testInitPropOverMethod.js b/js/src/jit-test/tests/basic/testInitPropOverMethod.js new file mode 100644 index 0000000000..5f70d3cd6f --- /dev/null +++ b/js/src/jit-test/tests/basic/testInitPropOverMethod.js @@ -0,0 +1,9 @@ +for (var i = 0; i < 10; i++) + x = {a: function () { return 33; }, a: 4}; + +try { + result = x.a(); +} catch (exc) { + result = "threw " + exc.name; +} +assertEq(result, "threw TypeError"); diff --git a/js/src/jit-test/tests/basic/testInitPropWithIntName.js b/js/src/jit-test/tests/basic/testInitPropWithIntName.js new file mode 100644 index 0000000000..755cd726b5 --- /dev/null +++ b/js/src/jit-test/tests/basic/testInitPropWithIntName.js @@ -0,0 +1,2 @@ +for (var j=0; j<8; ++j) + ({'0': 0}); diff --git a/js/src/jit-test/tests/basic/testInitProtoPrimitive.js b/js/src/jit-test/tests/basic/testInitProtoPrimitive.js new file mode 100644 index 0000000000..d84dd8ac22 --- /dev/null +++ b/js/src/jit-test/tests/basic/testInitProtoPrimitive.js @@ -0,0 +1,2 @@ +for (var i = 0; i < 10; i++) + "" + {__proto__: 'aaa'}; diff --git a/js/src/jit-test/tests/basic/testInitSingletons.js b/js/src/jit-test/tests/basic/testInitSingletons.js new file mode 100644 index 0000000000..82ca54c81c --- /dev/null +++ b/js/src/jit-test/tests/basic/testInitSingletons.js @@ -0,0 +1,61 @@ + +var x = [1,2.5,"three",true,false,null,[1,2,3],{a:0,b:1}]; +assertEq(String(x), "1,2.5,three,true,false,,1,2,3,[object Object]"); +assertEq(x.length, 8); +assertEq(x[7].a, 0); +assertEq(x[7].b, 1); + +var y = {a:0,a:1,a:2}; +assertEq(y.a,2); + +var z = {a:0,b:1,__proto__:{c:2,d:3}}; +assertEq(z.a,0); +assertEq(z.b,1); +assertEq(z.c,2); +assertEq(z.d,3); + +function foo() { + var q = eval("[1,2,3]"); + var r = eval("[1,2,3]"); + assertEq(q === r, false); +} +foo(); + +var q = {0x4fffffff: 0, 0x7fffffff: 1, 0xffffffff: 2}; +assertEq(q[1342177279], 0); +assertEq(q[2147483647], 1); +assertEq(q[4294967295], 2); + +try { + [1,2,3,{a:0,b:1}].foo.bar; +} catch (e) { + assertEq(/(.foo is|"bar" of) undefined/.test(e.message), true); +} + +var a = [1 + 1, 3 * 2, 6 - 5, 14 % 6, 15 / 5, 1 << 3, + 8 >> 2, 5 | 2, 5 ^ 3, ~3, -3,"a" + "b", !true, !false]; +assertEq(String(a), "2,6,1,2,3,8,2,7,6,-4,-3,ab,false,true"); +assertEq(a.length, 14); + +var b = { + a: 1 + 1, + b: 3 * 2, + c: 6 - 5, + d: 14 % 6, + e: 15 / 5, + f: 1 << 3, + g: 8 >> 2, + h: 5 | 2, + i: 5 ^ 3, + j: ~3, + k: -3, + l: "a" + "b", + m: !true, + n: !false, +} + +var char = "a".charCodeAt(0); +for (var i = 0; i < a.length; i++) { + assertEq(b[String.fromCharCode(char)], a[i]); + char++; +} diff --git a/js/src/jit-test/tests/basic/testInitSlowify.js b/js/src/jit-test/tests/basic/testInitSlowify.js new file mode 100644 index 0000000000..fb6868c25f --- /dev/null +++ b/js/src/jit-test/tests/basic/testInitSlowify.js @@ -0,0 +1,41 @@ + +var x = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,gc(), + ]; +assertEq(x.length, 500); +assertEq(x[10], 11); +assertEq(x[90], 11); + +function stringify(a) { + var b = ""; + for (var c in a) { b += c + ","; } + return b; +} + +var y = {a:1,b:2,c:3,d:4,e:gc(),f:6,g:7,h:8,i:9,j:gc(), + k:11,l:12,m:13,n:14,o:gc(),p:16,q:17,r:18,s:19,t:gc()}; + +assertEq(stringify(y), "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,"); diff --git a/js/src/jit-test/tests/basic/testInitelemCond.js b/js/src/jit-test/tests/basic/testInitelemCond.js new file mode 100644 index 0000000000..2f83c12102 --- /dev/null +++ b/js/src/jit-test/tests/basic/testInitelemCond.js @@ -0,0 +1,13 @@ + +/* Element initializers with unknown index. */ + +function foo(i) { + var x = [1,2,i == 1 ? 3 : 4,5,6]; + var y = "" + x; + if (i == 1) + assertEq(y, "1,2,3,5,6"); + else + assertEq(y, "1,2,4,5,6"); +} +for (var i = 0; i < 10; i++) + foo(i); diff --git a/js/src/jit-test/tests/basic/testInitelemWithFloatIndex.js b/js/src/jit-test/tests/basic/testInitelemWithFloatIndex.js new file mode 100644 index 0000000000..93477e7cbe --- /dev/null +++ b/js/src/jit-test/tests/basic/testInitelemWithFloatIndex.js @@ -0,0 +1,3 @@ +for (i = 0; i < 9; i++) + x = {1.5: 0}; +assertEq(x["1.5"], 0); diff --git a/js/src/jit-test/tests/basic/testInitelemWithSetter.js b/js/src/jit-test/tests/basic/testInitelemWithSetter.js new file mode 100644 index 0000000000..6753b37870 --- /dev/null +++ b/js/src/jit-test/tests/basic/testInitelemWithSetter.js @@ -0,0 +1,3 @@ +Object.prototype.__defineSetter__(1, function () { throw "fit"; }); +for (var i =0; i<9; i++) + ({1:'a'}); diff --git a/js/src/jit-test/tests/basic/testInnerMissingArgs.js b/js/src/jit-test/tests/basic/testInnerMissingArgs.js new file mode 100644 index 0000000000..d70b5d1aaa --- /dev/null +++ b/js/src/jit-test/tests/basic/testInnerMissingArgs.js @@ -0,0 +1,21 @@ +function innerTestInnerMissingArgs(a,b,c,d) +{ + if (a) { + } else { + } +} + +function doTestInnerMissingArgs(k) +{ + for (i = 0; i < 10; i++) { + innerTestInnerMissingArgs(k); + } +} + +function testInnerMissingArgs() +{ + doTestInnerMissingArgs(1); + doTestInnerMissingArgs(0); +} + +testInnerMissingArgs(); diff --git a/js/src/jit-test/tests/basic/testInnerSwitchBreak.js b/js/src/jit-test/tests/basic/testInnerSwitchBreak.js new file mode 100644 index 0000000000..4e9eafdbc3 --- /dev/null +++ b/js/src/jit-test/tests/basic/testInnerSwitchBreak.js @@ -0,0 +1,24 @@ +function innerSwitch(k) +{ + var m = 0; + + switch (k) + { + case 0: + m = 1; + break; + } + + return m; +} +function testInnerSwitchBreak() +{ + var r = new Array(5); + for (var i = 0; i < 5; i++) + { + r[i] = innerSwitch(0); + } + + return r.join(","); +} +assertEq(testInnerSwitchBreak(), "1,1,1,1,1"); diff --git a/js/src/jit-test/tests/basic/testInnerTreeMutatingUpvars.js b/js/src/jit-test/tests/basic/testInnerTreeMutatingUpvars.js new file mode 100644 index 0000000000..97502f8364 --- /dev/null +++ b/js/src/jit-test/tests/basic/testInnerTreeMutatingUpvars.js @@ -0,0 +1,17 @@ +function f() { + for (var a = 0; a < 8; ++a) { + (function () { + var x; + for (var b = 0; b < 8; ++b) { + x = 0; + (function () { + for (var i = 0; i < 1; ++i) { + x = 1; + } + })(); + x++; + } + })(); + } +} +f(); diff --git a/js/src/jit-test/tests/basic/testInt32ToId.js b/js/src/jit-test/tests/basic/testInt32ToId.js new file mode 100644 index 0000000000..3164ac5de3 --- /dev/null +++ b/js/src/jit-test/tests/basic/testInt32ToId.js @@ -0,0 +1,35 @@ +function testInt32ToId() +{ + // Ensure that a property which is a negative integer that does not fit in a + // jsval is properly detected by the 'in' operator. + var obj = { "-1073741828": 17 }; + var index = -1073741819; + var a = []; + for (var i = 0; i < 10; i++) + { + a.push(index in obj); + index--; + } + + // Ensure that a property which is a negative integer that does not fit in a + // jsval is properly *not* detected by the 'in' operator. In this case + // wrongly applying INT_TO_JSID to -2147483648 will shift off the sign bit + // (the only bit set in that number) and bitwise-or that value with 1, + // producing jsid(1) -- which actually represents "0", not "-2147483648". + // Thus 'in' will report a "-2147483648" property when none exists, because + // it thinks the request was really whether the object had property "0". + var obj2 = { 0: 17 }; + var b = []; + var index = -(1 << 28); + for (var i = 0; i < 10; i++) + { + b.push(index in obj2); + index = index - (1 << 28); + } + + return a.join(",") + b.join(","); +} + +assertEq(testInt32ToId(), + "false,false,false,false,false,false,false,false,false,true" + + "false,false,false,false,false,false,false,false,false,false"); diff --git a/js/src/jit-test/tests/basic/testIntFloor.js b/js/src/jit-test/tests/basic/testIntFloor.js new file mode 100644 index 0000000000..80b4ea741f --- /dev/null +++ b/js/src/jit-test/tests/basic/testIntFloor.js @@ -0,0 +1,8 @@ +function testIntFloor() { + var a; + for (var x = 0; x < 3; ++x) { + a = Math.floor('') + } + return a; +} +assertEq(testIntFloor(), 0) diff --git a/js/src/jit-test/tests/basic/testIntOverflow.js b/js/src/jit-test/tests/basic/testIntOverflow.js new file mode 100644 index 0000000000..cfe68983ce --- /dev/null +++ b/js/src/jit-test/tests/basic/testIntOverflow.js @@ -0,0 +1,9 @@ +function testIntOverflow() { + // int32_max - 7 + var ival = 2147483647 - 7; + for (var i = 0; i < 30; i++) { + ival += 30; + } + return (ival < 2147483647); +} +assertEq(testIntOverflow(), false); diff --git a/js/src/jit-test/tests/basic/testIntUnderflow.js b/js/src/jit-test/tests/basic/testIntUnderflow.js new file mode 100644 index 0000000000..65db00a0a7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testIntUnderflow.js @@ -0,0 +1,9 @@ +function testIntUnderflow() { + // int32_min + 8 + var ival = -2147483648 + 8; + for (var i = 0; i < 30; i++) { + ival -= 2; + } + return (ival > -2147483648); +} +assertEq(testIntUnderflow(), false); diff --git a/js/src/jit-test/tests/basic/testInterpreterReentry.js b/js/src/jit-test/tests/basic/testInterpreterReentry.js new file mode 100644 index 0000000000..d820b23336 --- /dev/null +++ b/js/src/jit-test/tests/basic/testInterpreterReentry.js @@ -0,0 +1,6 @@ +function testInterpreterReentry() { + this.__defineSetter__('x', function(){}) + for (var j = 0; j < 5; ++j) { x = 3; } + return 1; +} +assertEq(testInterpreterReentry(), 1); diff --git a/js/src/jit-test/tests/basic/testInterpreterReentry2.js b/js/src/jit-test/tests/basic/testInterpreterReentry2.js new file mode 100644 index 0000000000..030f088e1f --- /dev/null +++ b/js/src/jit-test/tests/basic/testInterpreterReentry2.js @@ -0,0 +1,10 @@ +function testInterpreterReentry2() { + var a = false; + var b = {}; + var c = false; + var d = {}; + this.__defineGetter__('e', function(){}); + for (let f in this) print(f); + return 1; +} +assertEq(testInterpreterReentry2(), 1); diff --git a/js/src/jit-test/tests/basic/testInterpreterReentry3.js b/js/src/jit-test/tests/basic/testInterpreterReentry3.js new file mode 100644 index 0000000000..5c3e7a3d0b --- /dev/null +++ b/js/src/jit-test/tests/basic/testInterpreterReentry3.js @@ -0,0 +1,6 @@ +function testInterpreterReentry3() { + for (let i=0;i<5;++i) this["y" + i] = function(){}; + this.__defineGetter__('e', function* (x2) { yield; }); + return 1; +} +assertEq(testInterpreterReentry3(), 1); diff --git a/js/src/jit-test/tests/basic/testInterpreterReentry4.js b/js/src/jit-test/tests/basic/testInterpreterReentry4.js new file mode 100644 index 0000000000..b09e5cb9a7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testInterpreterReentry4.js @@ -0,0 +1,6 @@ +function testInterpreterReentry4() { + var obj = {a:1, b:1, c:1, d:1, get e() { return 1000; } }; + for (var p in obj) + obj[p]; +} +testInterpreterReentry4(); diff --git a/js/src/jit-test/tests/basic/testInterpreterReentry5.js b/js/src/jit-test/tests/basic/testInterpreterReentry5.js new file mode 100644 index 0000000000..1c9b698ebf --- /dev/null +++ b/js/src/jit-test/tests/basic/testInterpreterReentry5.js @@ -0,0 +1,9 @@ +function testInterpreterReentry5() { + var arr = [0, 1, 2, 3, 4]; + arr.__defineGetter__("4", function() { return 1000; }); + for (var i = 0; i < 5; i++) + arr[i]; + for (var p in arr) + arr[p]; +} +testInterpreterReentry5(); diff --git a/js/src/jit-test/tests/basic/testInterpreterReentry6.js b/js/src/jit-test/tests/basic/testInterpreterReentry6.js new file mode 100644 index 0000000000..c5a6b28630 --- /dev/null +++ b/js/src/jit-test/tests/basic/testInterpreterReentry6.js @@ -0,0 +1,7 @@ +function testInterpreterReentry6() { + var obj = {a:1, b:1, c:1, d:1, set e(x) { this._e = x; }}; + for (var p in obj) + obj[p] = "grue"; + return obj._e; +} +assertEq(testInterpreterReentry6(), "grue"); diff --git a/js/src/jit-test/tests/basic/testInterpreterReentry7.js b/js/src/jit-test/tests/basic/testInterpreterReentry7.js new file mode 100644 index 0000000000..36b34c6f0c --- /dev/null +++ b/js/src/jit-test/tests/basic/testInterpreterReentry7.js @@ -0,0 +1,11 @@ +function testInterpreterReentry7() { + var arr = [0, 1, 2, 3, 4]; + arr.__defineSetter__("4", function(x) { this._4 = x; }); + for (var i = 0; i < 5; i++) + arr[i] = "grue"; + var tmp = arr._4; + for (var p in arr) + arr[p] = "bleen"; + return tmp + " " + arr._4; +} +assertEq(testInterpreterReentry7(), "grue bleen"); diff --git a/js/src/jit-test/tests/basic/testInvalidCharCodeAt.js b/js/src/jit-test/tests/basic/testInvalidCharCodeAt.js new file mode 100644 index 0000000000..748220fcd0 --- /dev/null +++ b/js/src/jit-test/tests/basic/testInvalidCharCodeAt.js @@ -0,0 +1,12 @@ +function doTestInvalidCharCodeAt(input) +{ + var q = ""; + for (var i = 0; i < 10; i++) + q += input.charCodeAt(i); + return q; +} +function testInvalidCharCodeAt() +{ + return doTestInvalidCharCodeAt(""); +} +assertEq(testInvalidCharCodeAt(), "NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN"); diff --git a/js/src/jit-test/tests/basic/testInvertNullAfterNegateNull.js b/js/src/jit-test/tests/basic/testInvertNullAfterNegateNull.js new file mode 100644 index 0000000000..7e6a12b05f --- /dev/null +++ b/js/src/jit-test/tests/basic/testInvertNullAfterNegateNull.js @@ -0,0 +1,7 @@ +function testInvertNullAfterNegateNull() +{ + for (var i = 0; i < 5; i++) !null; + for (var i = 0; i < 5; i++) -null; + return "no assertion"; +} +assertEq(testInvertNullAfterNegateNull(), "no assertion"); diff --git a/js/src/jit-test/tests/basic/testIteratorReification.js b/js/src/jit-test/tests/basic/testIteratorReification.js new file mode 100644 index 0000000000..8f89672bb2 --- /dev/null +++ b/js/src/jit-test/tests/basic/testIteratorReification.js @@ -0,0 +1 @@ +for (b in evalcx('')) {} diff --git a/js/src/jit-test/tests/basic/testLambdaCtor.js b/js/src/jit-test/tests/basic/testLambdaCtor.js new file mode 100644 index 0000000000..ea91cd9a48 --- /dev/null +++ b/js/src/jit-test/tests/basic/testLambdaCtor.js @@ -0,0 +1,13 @@ +function testLambdaCtor() { + var a = []; + for (var x = 0; x < 9; ++x) { + var f = function(){}; + a[a.length] = new f; + } + + assertEq([8].__proto__ !== a[7].__proto__, true); + + // Assert that the last f was properly constructed. + return a[8].__proto__ === f.prototype; +} +assertEq(testLambdaCtor(), true); diff --git a/js/src/jit-test/tests/basic/testLambdaInitedVar.js b/js/src/jit-test/tests/basic/testLambdaInitedVar.js new file mode 100644 index 0000000000..e37b4f9c7b --- /dev/null +++ b/js/src/jit-test/tests/basic/testLambdaInitedVar.js @@ -0,0 +1,8 @@ +function testLambdaInitedVar() { + var jQuery = function (a, b) { + return jQuery && jQuery.length; + } + return jQuery(); +} + +assertEq(testLambdaInitedVar(), 2); diff --git a/js/src/jit-test/tests/basic/testLengthInString.js b/js/src/jit-test/tests/basic/testLengthInString.js new file mode 100644 index 0000000000..5950b509f9 --- /dev/null +++ b/js/src/jit-test/tests/basic/testLengthInString.js @@ -0,0 +1,12 @@ +function testLengthInString() +{ + var s = new String(); + var res = "length" in s; + for (var i = 0; i < 5; i++) + res = res && ("length" in s); + res = res && s.hasOwnProperty("length"); + for (var i = 0; i < 5; i++) + res = res && s.hasOwnProperty("length"); + return res; +} +assertEq(testLengthInString(), true); diff --git a/js/src/jit-test/tests/basic/testLengthOnNonNativeProto.js b/js/src/jit-test/tests/basic/testLengthOnNonNativeProto.js new file mode 100644 index 0000000000..80d388f8dd --- /dev/null +++ b/js/src/jit-test/tests/basic/testLengthOnNonNativeProto.js @@ -0,0 +1,20 @@ +function testLengthOnNonNativeProto() +{ + var o = {}; + o.__proto__ = [3]; + for (var j = 0; j < 5; j++) + o[0]; + + var o2 = {}; + o2.__proto__ = []; + for (var j = 0; j < 5; j++) + o2.length; + + function foo() { } + foo.__proto__ = []; + for (var j = 0; j < 5; j++) + foo.length; + + return "no assertion"; +} +assertEq(testLengthOnNonNativeProto(), "no assertion"); diff --git a/js/src/jit-test/tests/basic/testLet.js b/js/src/jit-test/tests/basic/testLet.js new file mode 100644 index 0000000000..940dcff3dc --- /dev/null +++ b/js/src/jit-test/tests/basic/testLet.js @@ -0,0 +1,210 @@ +var otherGlobal = newGlobal(); + +function test(str, arg, result) +{ + arg = arg || 'ponies'; + if (arguments.length < 3) + result = 'ponies'; + + var fun = new Function('x', str); + + var got = `(${fun.toString()})`; + var expect = '(function anonymous(x\n) {\n' + str + '\n})'; + if (got !== expect) { + print("GOT: " + got); + print("EXPECT: " + expect); + assertEq(got, expect); + } + + // test reflection logic + Reflect.parse(got); + + var got = fun(arg); + var expect = result; + if (got !== expect) { + print("GOT:" + got); + print("EXPECT: " + expect); + assertEq(got, expect); + } +} + +function isParseError(str) +{ + var caught = false; + try { + new Function(str); + } catch(e) { + assertEq(e instanceof TypeError || e instanceof SyntaxError, true); + caught = true; + } + assertEq(caught, true); +} + +function isRuntimeParseError(str, arg) +{ + var caught = false; + try { + (new Function("x", str))(arg); + } catch(e) { + assertEq(e instanceof TypeError || e instanceof SyntaxError, true); + caught = true; + } + assertEq(caught, true); +} + +function isReferenceError(str) +{ + var caught = false; + try { + (new Function(str))(); + } catch(e) { + assertEq(e instanceof ReferenceError, true); + caught = true; + } + assertEq(caught, true); +} + +// var declarations +test('var y;return x;'); +test('var y = x;return x;'); +test('var [] = x;return x;'); +test('var [, ] = x;return x;'); +test('var [, , , , ] = x;return x;'); +test('var x = x;return x;'); +test('var y = y;return "" + y;', 'unicorns', 'undefined'); +test('var x = eval("x");return x;'); +test('var X = x + 1, y = x;return y;'); +test('var X = x + 1, [] = X, [[, , ]] = X, y = x;return y;'); +test('var [{a: X}] = x, [, {b: y}] = x;var X = X + 1, y = y + 2;return X + y;', [{a:"p"},{b:"p"}], "p1p2"); +test('var [x] = [x];return x;'); +test('var [[a, [b, c]]] = [[x, []]];return a;'); +test('var [y] = [x];return y;'); +test('var [a] = (1, [x]);return a;'); +test('var [a] = (1, x, 1, x);return a;', ['ponies']); +test('var [x, y] = [x, x + 1];return x + y;', 1, 3); +test('var [x, y, z] = [x, x + 1, x + 2];return x + y + z;', 1, 6); +test('var [[x]] = [[x]];return x;'); +test('var [x, y] = [x, x + 1];return x;'); +test('var [x, [y, z]] = [x, x + 1];return x;'); +test('var [{x: [x]}, {y1: y, z1: z}] = [x, x + 1];return x;',{x:['ponies']}); +test('if (x) {var y = x;return x;}'); +test('if (x) {y = x;var y = y;return y;}'); +test('if (x) {var z = y;var [y] = x;z += y;}return z;', ['-'], 'undefined-'); + +// let declaration in context +test('if (x) {let y;return x;}'); +test('if (x) {let x;return "" + x;}', 'unicorns', 'undefined'); +test('if (x) {let y = x;return x;}'); +test('if (x) {let y = x;return x;}'); +test('if (x) {let [] = x;return x;}'); +test('if (x) {let [, ] = x;return x;}'); +test('if (x) {let [, , , , ] = x;return x;}'); +test('if (x) {let X = x + 1, y = x;return y;}'); +test('if (x) {let X = x + 1, [] = X, [[, , ]] = X, y = x;return y;}'); +test('if (x) {let [{a: X}] = x, [, {b: Y}] = x;var XX = X + 1, YY = Y + 2;return XX + YY;}', [{a:"p"},{b:"p"}], "p1p2"); +test('if (x) {let [[a, [b, c]]] = [[x, []]];return a;}'); +test('if (x) {let [X] = [x];return X;}'); +test('if (x) {let [y] = [x];return y;}'); +test('if (x) {let [a] = (1, [x]);return a;}'); +test('if (x) {let [a] = (1, x, 1, x);return a;}', ['ponies']); +test('if (x) {let [X, y] = [x, x + 1];return X + y;}', 1, 3); +test('if (x) {let [X, y, z] = [x, x + 1, x + 2];return X + y + z;}', 1, 6); +test('if (x) {let [[X]] = [[x]];return X;}'); +test('if (x) {let [X, y] = [x, x + 1];return X;}'); +test('if (x) {let [X, [y, z]] = [x, x + 1];return X;}'); +test('if (x) {let [{x: [X]}, {y1: y, z1: z}] = [x, x + 1];return X;}',{x:['ponies']}); +test('if (x) {let y = x;try {let x = 1;throw 2;} catch (e) {return y;}}'); +test('try {let x = 1;throw 2;} catch (e) {return x;}'); +test('x.foo;{let y = x;return y;}'); +test('x.foo;if (x) {x.bar;let y = x;return y;}'); +test('if (x) {let y = x;return function () {return eval("y");}();}'); +test('return eval("let y = x; y");'); +isRuntimeParseError('if (x) {let y = x;eval("var y = 2");return y;}', 'ponies'); +test('"use strict";if (x) {let y = x;eval("var y = 2");return y;}'); +test('"use strict";if (x) {let y = x;eval("let y = 2");return y;}'); +test('"use strict";if (x) {let y = 1;return eval("let y = x;y;");}'); +test('this.y = x;if (x) {let y = 1;return this.eval("y");}'); + +// for(;;) +test('for (;;) {return x;}'); +test('for (let y = 1;;) {return x;}'); +test('for (let y = 1;; ++y) {return x;}'); +test('for (let y = 1; ++y;) {return x;}'); +test('for (let [[a, [b, c]]] = [[x, []]];;) {return a;}'); +test('var sum = 0;for (let y = x; y < 4; ++y) {sum += y;}return sum;', 1, 6); +test('var sum = 0;for (let x = 1; eval("x") < 4; ++x) {sum += eval("x");}return sum;', 1, 6); +test('for (var y = 1;;) {return x;}'); +test('for (var y = 1;; ++y) {return x;}'); +test('for (var y = 1; ++y;) {return x;}'); +test('for (var X = 1, [y, z] = x, a = x; z < 4; ++z) {return X + y;}', [2,3], 3); +test('var sum = 0;for (var y = x; y < 4; ++y) {sum += y;}return sum;', 1, 6); +test('var sum = 0;for (var X = x, y = 10; X < 4; ++X) {sum += X;}return sum;', 1, 6); +test('var sum = 0;for (var X = x; X < 4; ++X) {sum += X;}return x;', 1, 1); +test('var sum = 0;for (var X = eval("x"); X < 4; ++X) {sum += X;}return sum;', 1, 6); +test('var sum = 0;for (var X = x; eval("X") < 4; ++X) {sum += eval("X");}return sum;', 1, 6); +test('var sum = 0;for (var X = eval("x"); eval("X") < 4; ++X) {sum += eval("X");}return sum;', 1, 6); +test('for (let y = x;;) {let x;return y;}'); +test('for (let y = x;;) {let y;return x;}'); +test('for (let y;;) {let y;return x;}'); +test('for (let a = x;;) {let c = x, d = x;return c;}'); +test('for (let [a, b] = x;;) {let c = x, d = x;return c;}'); +test('for (let [a] = (1, [x]);;) {return a;}'); +test('for (let [a] = (1, x, 1, x);;) {return a;}', ['ponies']); +isParseError('for (let x = 1, x = 2;;) {}'); +isParseError('for (let [x, y] = a, {a:x} = b;;) {}'); +isParseError('for (let [x, y, x] = a;;) {}'); +isParseError('for (let [x, [y, [x]]] = a;;) {}'); + +// for(in) +test('for (let i in x) {return x;}'); +test('for (let i in x) {let y;return x;}'); +test('for (let i in x) {let i = x;return i;}'); +test('var s = "";for (let a in x) {for (let b in x) {s += a + b;}}return s;', [1,2], '00011011'); +test('var res = "";for (let i in x) {res += x[i];}return res;'); +test('var res = "";for (var i in x) {res += x[i];}return res;'); +isParseError('for ((let (x = {y: true}) x).y in eval("x")) {return eval("x");}'); +test('for (let i in x) {break;}return x;'); +test('for (let i in x) {break;}return eval("x");'); +test('a:for (let i in x) {for (let j in x) {break a;}}return x;'); +test('a:for (let i in x) {for (let j in x) {break a;}}return eval("x");'); +test('var j;for (let i in x) {j = i;break;}return j;', {ponies:true}); +isParseError('for (let [x, x] in o) {}'); +isParseError('for (let [x, y, x] in o) {}'); +isParseError('for (let [x, [y, [x]]] in o) {}'); + +// for(let ... in ...) scoping bugs (bug 1069480) +isReferenceError('for (let x in eval("x")) {return x;}', {ponies:true}, undefined); +isReferenceError('for (let x in x) {return eval("x");}', {ponies:true}, undefined); +isReferenceError('for (let x in eval("x")) {return eval("x");}', {ponies:true}, undefined); +isReferenceError('for (let x in x) {break;}return x;'); +isReferenceError('for (let x in x) {break;}return eval("x");'); +isReferenceError('for (let x in eval("throw x")) {}', undefined, undefined); + +// don't forget about switch craziness +test('var y = 3;switch (function () {return eval("y");}()) {case 3:let y;return x;default:;}'); +test('switch (x) {case 3:let y;return 3;case 4:let z;return 4;default:return x;}'); +isParseError('switch (x) {case 3:let y;return 3;case 4:let y;return 4;default:;}'); + +// TDZ checks +isReferenceError('x + 1; let x = 42;'); +isReferenceError('x = 42; let x;'); +isReferenceError('inner(); function inner() { x++; } let x;'); +isReferenceError('inner(); let x; function inner() { x++; }'); +isReferenceError('inner(); let x; function inner() { function innerer() { x++; } innerer(); }'); +isReferenceError('let x; var inner = function () { y++; }; inner(); let y;'); +isReferenceError('let x = x;'); +isReferenceError('let [x] = [x];'); +isReferenceError('let {x} = {x:x};'); +isReferenceError('switch (x) {case 3:let x;break;default:if (x === undefined) {return "ponies";}}'); +isReferenceError('let x = function() {} ? x() : function() {}'); +isReferenceError('(function() { let x = (function() { return x }()); }())'); +isReferenceError('var sum = 0;for (let x = x, y = 10; x < 4; ++x) {sum += x;}return sum;'); +isReferenceError('var sum = 0;for (let x = x; x < 4; ++x) {sum += x;}return x;'); +isReferenceError('var sum = 0;for (let x = eval("x"); x < 4; ++x) {sum += x;}return sum;'); +isReferenceError('var sum = 0;for (let x = x; eval("x") < 4; ++x) {sum += eval("x");}return sum;'); +isReferenceError('var sum = 0;for (let x = eval("x"); eval("x") < 4; ++x) {sum += eval("x");}return sum;'); +isReferenceError('for (let x = eval("throw x");;) {}'); +isReferenceError('for (let x = x + "s"; eval("throw x");) {}'); + +// redecl with function statements +isParseError('let a; function a() {}'); diff --git a/js/src/jit-test/tests/basic/testLetOverridingArgs.js b/js/src/jit-test/tests/basic/testLetOverridingArgs.js new file mode 100644 index 0000000000..fbebe7a2fc --- /dev/null +++ b/js/src/jit-test/tests/basic/testLetOverridingArgs.js @@ -0,0 +1,5 @@ +function f1() { { let arguments = 42; return arguments } } +assertEq(f1(), 42); + +function f2() { { let arguments; return arguments } } +assertEq(f2(), undefined); diff --git a/js/src/jit-test/tests/basic/testLirBufOOM.js b/js/src/jit-test/tests/basic/testLirBufOOM.js new file mode 100644 index 0000000000..f9d4e1dc92 --- /dev/null +++ b/js/src/jit-test/tests/basic/testLirBufOOM.js @@ -0,0 +1,34 @@ +function testLirBufOOM() +{ + var a = [ + "12345678901234", + "123456789012", + "1234567890123456789012345678", + "12345678901234567890123456789012345678901234567890123456", + "f", + "$", + "", + "f()", + "(\\*)", + "b()", + "()", + "(#)", + "ABCDEFGHIJK", + "ABCDEFGHIJKLM", + "ABCDEFGHIJKLMNOPQ", + "ABCDEFGH", + "(.)", + "(|)", + "()$", + "/()", + "(.)$" + ]; + + for (var j = 0; j < 200; ++j) { + var js = "" + j; + for (var i = 0; i < a.length; i++) + "".match(a[i] + js) + } + return "ok"; +} +assertEq(testLirBufOOM(), "ok"); diff --git a/js/src/jit-test/tests/basic/testLocaleCompare.js b/js/src/jit-test/tests/basic/testLocaleCompare.js new file mode 100644 index 0000000000..e9428b2c6f --- /dev/null +++ b/js/src/jit-test/tests/basic/testLocaleCompare.js @@ -0,0 +1,8 @@ +assertEq("undefined".localeCompare(), 0); +assertEq("a".localeCompare(), "a".localeCompare("undefined")); +assertEq("a".localeCompare("b"), -1); +assertEq("a".localeCompare("b", "en"), -1); +assertEq("b".localeCompare("a"), 1); +assertEq("b".localeCompare("a", "en"), 1); +assertEq("a".localeCompare("a"), 0); +assertEq("a".localeCompare("a", "en"), 0); diff --git a/js/src/jit-test/tests/basic/testLogicalNotNaN.js b/js/src/jit-test/tests/basic/testLogicalNotNaN.js new file mode 100644 index 0000000000..6bb0251e28 --- /dev/null +++ b/js/src/jit-test/tests/basic/testLogicalNotNaN.js @@ -0,0 +1,8 @@ +function testLogicalNotNaN() { + var i = 0; + var a = new Array(5); + while (i < a.length) + a[i++] = !NaN; + return a.join(); +} +assertEq(testLogicalNotNaN(), "true,true,true,true,true"); diff --git a/js/src/jit-test/tests/basic/testLongNumToString.js b/js/src/jit-test/tests/basic/testLongNumToString.js new file mode 100644 index 0000000000..def2b47a9b --- /dev/null +++ b/js/src/jit-test/tests/basic/testLongNumToString.js @@ -0,0 +1,7 @@ +function testLongNumToString() { + var s; + for (var i = 0; i < 5; i++) + s = (0x08000000).toString(2); + return s; +} +assertEq(testLongNumToString(), '1000000000000000000000000000'); diff --git a/js/src/jit-test/tests/basic/testLoopWithUndefined1.js b/js/src/jit-test/tests/basic/testLoopWithUndefined1.js new file mode 100644 index 0000000000..63c4b97a8f --- /dev/null +++ b/js/src/jit-test/tests/basic/testLoopWithUndefined1.js @@ -0,0 +1,12 @@ +function loopWithUndefined1(t, val) { + var a = new Array(6); + for (var i = 0; i < 6; i++) + a[i] = (t > val); + return a; +} +loopWithUndefined1(5.0, 2); //compile version with val=int + +function testLoopWithUndefined1() { + return loopWithUndefined1(5.0).join(","); //val=undefined +}; +assertEq(testLoopWithUndefined1(), "false,false,false,false,false,false"); diff --git a/js/src/jit-test/tests/basic/testLoopWithUndefined2.js b/js/src/jit-test/tests/basic/testLoopWithUndefined2.js new file mode 100644 index 0000000000..a6ba9dbe53 --- /dev/null +++ b/js/src/jit-test/tests/basic/testLoopWithUndefined2.js @@ -0,0 +1,20 @@ +function loopWithUndefined2(t, dostuff, val) { + var a = new Array(6); + for (var i = 0; i < 6; i++) { + if (dostuff) { + val = 1; + a[i] = (t > val); + } else { + a[i] = (val == undefined); + } + } + return a; +} +function testLoopWithUndefined2() { + var a = loopWithUndefined2(5.0, true, 2); + var b = loopWithUndefined2(5.0, true); + var c = loopWithUndefined2(5.0, false, 8); + var d = loopWithUndefined2(5.0, false); + return [a[0], b[0], c[0], d[0]].join(","); +} +assertEq(testLoopWithUndefined2(), "true,true,false,true"); diff --git a/js/src/jit-test/tests/basic/testLoopingAccumulator.js b/js/src/jit-test/tests/basic/testLoopingAccumulator.js new file mode 100644 index 0000000000..bacb29bea5 --- /dev/null +++ b/js/src/jit-test/tests/basic/testLoopingAccumulator.js @@ -0,0 +1,21 @@ +function addAccumulations(f) { + var a = f(); + var b = f(); + return a() + b(); +} + +function loopingAccumulator() { + var x = 0; + return function () { + for (var i = 0; i < 10; ++i) { + ++x; + } + return x; + } +} + +function testLoopingAccumulator() { + var x = addAccumulations(loopingAccumulator); + return x; +} +assertEq(testLoopingAccumulator(), 20); diff --git a/js/src/jit-test/tests/basic/testManyVars.js b/js/src/jit-test/tests/basic/testManyVars.js new file mode 100644 index 0000000000..a89d4539cf --- /dev/null +++ b/js/src/jit-test/tests/basic/testManyVars.js @@ -0,0 +1,13 @@ +const MANY_VARS = Math.pow(2,17); + +var code = "function f1() {\n"; +code += " var x0 = 0"; +for (var i = 1; i < MANY_VARS; i++) + code += ", x" + i + " = " + i; +code += ";\n"; +for (var i = 0; i < MANY_VARS; i += 100) + code += " assertEq(x" + i + ", " + i + ");\n"; +code += " return x80000;\n"; +code += "}\n"; +eval(code); +assertEq(f1(), 80000); diff --git a/js/src/jit-test/tests/basic/testMatchAsCondition.js b/js/src/jit-test/tests/basic/testMatchAsCondition.js new file mode 100644 index 0000000000..8cb429f0c5 --- /dev/null +++ b/js/src/jit-test/tests/basic/testMatchAsCondition.js @@ -0,0 +1,8 @@ +function testMatchAsCondition() { + var a = ['0', '0', '0', '0']; + var r = /0/; + "x".q; + for (var z = 0; z < 4; z++) + a[z].match(r) ? 1 : 2; +} +testMatchAsCondition(); diff --git a/js/src/jit-test/tests/basic/testMatchStringObject.js b/js/src/jit-test/tests/basic/testMatchStringObject.js new file mode 100644 index 0000000000..cde2da1aed --- /dev/null +++ b/js/src/jit-test/tests/basic/testMatchStringObject.js @@ -0,0 +1,8 @@ +function testMatchStringObject() { + var a = new String("foo"); + var b; + for (i = 0; i < 300; i++) + b = a.match(/bar/); + return b; +} +assertEq(testMatchStringObject(), null); diff --git a/js/src/jit-test/tests/basic/testMathClz32.js b/js/src/jit-test/tests/basic/testMathClz32.js new file mode 100644 index 0000000000..61cd1f91a2 --- /dev/null +++ b/js/src/jit-test/tests/basic/testMathClz32.js @@ -0,0 +1,38 @@ +function f() { + var x = 0; + for (var i = 1; i < 1e6; i++) { + if (i > 0) + x += Math.clz32(i); + } + return x; +} + +function g() { + var x = 0; + for (var i = 1; i < 1e6; i++) { + x += Math.clz32(i); + } + return x; +} + +function h() { + var x = 0; + for (var i = 0; i < 1e6; i++) { + x += Math.clz32(i); + } + return x; +} + +function k() { + var x = 0; + for (var i = -1000; i < 1000; i++) { + x += Math.clz32(i); + x += Math.clz32(i + 0.5); + } + return x; +} + +assertEq(f(), 13048543); +assertEq(g(), 13048543); +assertEq(h(), 13048575); +assertEq(k(), 46078); diff --git a/js/src/jit-test/tests/basic/testMathMinMax.js b/js/src/jit-test/tests/basic/testMathMinMax.js new file mode 100644 index 0000000000..4c057fa6da --- /dev/null +++ b/js/src/jit-test/tests/basic/testMathMinMax.js @@ -0,0 +1,74 @@ +for (var i = 2; i < 10; i++) { + assertEq(Math.min(i, 1), 1); + assertEq(Math.min(i, -1), -1); + assertEq(Math.min(1, i), 1); + assertEq(Math.min(-1, i), -1); + assertEq(Math.min(5, 2), 2); + assertEq(Math.min(2, 5), 2); + assertEq(Math.min(5, -2), -2); + assertEq(Math.min(-2, 5), -2); +} + +for (i = 2; i < 10; i++) { + assertEq(Math.max(i, 1), i); + assertEq(Math.max(i, -1), i); + assertEq(Math.max(1, i), i); + assertEq(Math.max(-1, i), i); + assertEq(Math.max(5, -2), 5); + assertEq(Math.max(-2, 5), 5); + assertEq(Math.max(5, 2), 5); + assertEq(Math.max(2, 5), 5); +} + +for (i = 2.1; i < 13; i += 3.17584) { + assertEq(Math.max(i, 1), i); + assertEq(Math.max(i, 1.5), i); + assertEq(Math.max(1, i), i); + assertEq(Math.max(1.5, i), i); + + assertEq(Math.max(NaN, NaN), NaN); + assertEq(Math.max(NaN, Infinity), NaN); + assertEq(Math.max(Infinity, NaN), NaN); + + assertEq(Math.max(NaN, i), NaN); + assertEq(Math.max(i, NaN), NaN); + + assertEq(Math.max(i, Infinity), Infinity); + assertEq(Math.max(Infinity, i), Infinity); + + assertEq(Math.max(i, -Infinity), i); + assertEq(Math.max(-Infinity, i), i); +} + +for (i = 2.1; i < 13; i += 3.17584) { + assertEq(Math.min(i, 1), 1); + assertEq(Math.min(i, 1.5), 1.5); + assertEq(Math.min(1, i), 1); + assertEq(Math.min(1.5, i), 1.5); + + assertEq(Math.min(NaN, NaN), NaN); + assertEq(Math.min(NaN, Infinity), NaN); + assertEq(Math.min(Infinity, NaN), NaN); + + assertEq(Math.min(NaN, i), NaN); + assertEq(Math.min(i, NaN), NaN); + + assertEq(Math.min(i, Infinity), i); + assertEq(Math.min(Infinity, i), i); + + assertEq(Math.min(i, -Infinity), -Infinity); + assertEq(Math.min(-Infinity, i), -Infinity); +} + +function isNegZero(n) { + return n === 0 && 1/n === -Infinity; +} + +for (i = 0; i < 5; i++) { + assertEq(isNegZero(Math.min(0, -0)), true); + assertEq(isNegZero(Math.min(-0, 0)), true); + assertEq(isNegZero(Math.min(-0, -0)), true); + assertEq(isNegZero(Math.max(0, -0)), false); + assertEq(isNegZero(Math.max(-0, 0)), false); + assertEq(isNegZero(Math.max(-0, -0)), true); +} diff --git a/js/src/jit-test/tests/basic/testMethodInc.js b/js/src/jit-test/tests/basic/testMethodInc.js new file mode 100644 index 0000000000..f283f84066 --- /dev/null +++ b/js/src/jit-test/tests/basic/testMethodInc.js @@ -0,0 +1,5 @@ +for (var i = 0; i < 9; i++) { + var x = {f: function() {}}; + x.f++; + assertEq(""+x.f, "NaN"); +} diff --git a/js/src/jit-test/tests/basic/testMethodInit.js b/js/src/jit-test/tests/basic/testMethodInit.js new file mode 100644 index 0000000000..64cfa4c37c --- /dev/null +++ b/js/src/jit-test/tests/basic/testMethodInit.js @@ -0,0 +1,10 @@ +function testMethodInit() { // bug 503198 + function o() { return 'o'; } + function k() { return 'k'; } + + var x; + for (var i = 0; i < 10; i++) + x = {o: o, k: k}; + return x.o() + x.k(); +} +assertEq(testMethodInit(), "ok"); diff --git a/js/src/jit-test/tests/basic/testMethodInitSafety.js b/js/src/jit-test/tests/basic/testMethodInitSafety.js new file mode 100644 index 0000000000..34177ab8f7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testMethodInitSafety.js @@ -0,0 +1,14 @@ +function testMethodInitSafety() { + function f() { return 'fail'; } + function g() { return 'ok'; } + + var s; + var arr = [f, f, f, f, g]; + //assertEq(arr.length > 9, true); + for (var i = 0; i < arr.length; i++) { + var x = {m: arr[i]}; + s = x.m(); + } + return s; +} +assertEq(testMethodInitSafety(), "ok"); diff --git a/js/src/jit-test/tests/basic/testMethodSet.js b/js/src/jit-test/tests/basic/testMethodSet.js new file mode 100644 index 0000000000..d7fcd7fc08 --- /dev/null +++ b/js/src/jit-test/tests/basic/testMethodSet.js @@ -0,0 +1,13 @@ +function testMethodSet() { // bug 503198 + function o() { return 'o'; } + function k() { return 'k'; } + + var x; + for (var i = 0; i < 10; i++) { + x = {}; + x.o = o; + x.k = k; + } + return x.o() + x.k(); +} +assertEq(testMethodSet(), "ok"); diff --git a/js/src/jit-test/tests/basic/testMethodWriteBarrier.js b/js/src/jit-test/tests/basic/testMethodWriteBarrier.js new file mode 100644 index 0000000000..86f2b17226 --- /dev/null +++ b/js/src/jit-test/tests/basic/testMethodWriteBarrier.js @@ -0,0 +1,4 @@ +var x = {p: 0.1, m: function(){}}; +x.m(); // the interpreter brands x +for (var i = 0; i < 9; i++) + x.p = 0.1; diff --git a/js/src/jit-test/tests/basic/testMethodWriteBarrier2.js b/js/src/jit-test/tests/basic/testMethodWriteBarrier2.js new file mode 100644 index 0000000000..19b387198a --- /dev/null +++ b/js/src/jit-test/tests/basic/testMethodWriteBarrier2.js @@ -0,0 +1,17 @@ +function C() { + this.m = function () {}; // JSOP_SETMETHOD +} + +var a = [new C, new C, new C, new C, new C, new C, new C, new C, new C]; +var b = [new C, new C, new C, new C, new C, new C, a[8], new C, new C]; + +var thrown = 'none'; +try { + for (var i = 0; i < 9; i++) { + a[i].m(); + b[i].m = 0.7; // MethodWriteBarrier required here + } +} catch (exc) { + thrown = exc.name; +} +assertEq(thrown, 'TypeError'); diff --git a/js/src/jit-test/tests/basic/testMethodWriteBarrier3.js b/js/src/jit-test/tests/basic/testMethodWriteBarrier3.js new file mode 100644 index 0000000000..9ae20fed9c --- /dev/null +++ b/js/src/jit-test/tests/basic/testMethodWriteBarrier3.js @@ -0,0 +1,27 @@ +function g() {} + +function h() { + for (var i = 0; i < 9; i++) + x.f = i; +} + +function j() { + x.f(); +} + +var x = {f: 0.7, g: g}; +x.g(); // interpreter brands x +h(); +print(shapeOf(x)); +x.f = function (){}; // does not change x's shape +j(); +print(shapeOf(x)); +h(); // should change x's shape + +var thrown = 'none'; +try { + j(); // should throw since x.f === 8 +} catch (exc) { + thrown = exc.name; +} +assertEq(thrown, 'TypeError'); \ No newline at end of file diff --git a/js/src/jit-test/tests/basic/testMethodWriteBarrier4.js b/js/src/jit-test/tests/basic/testMethodWriteBarrier4.js new file mode 100644 index 0000000000..f120c9450d --- /dev/null +++ b/js/src/jit-test/tests/basic/testMethodWriteBarrier4.js @@ -0,0 +1,12 @@ +var z = 0; +function f() { + this.b = function() {}; + this.b = undefined; + if (z++ > 8) + this.b(); +} + +try { + for (var i = 0; i < 10; i++) + new f(); +} catch (exc) {} diff --git a/js/src/jit-test/tests/basic/testMissingMethod.js b/js/src/jit-test/tests/basic/testMissingMethod.js new file mode 100644 index 0000000000..50ebb4bea3 --- /dev/null +++ b/js/src/jit-test/tests/basic/testMissingMethod.js @@ -0,0 +1,9 @@ +var o = {y: function () {}}; +var a = [o, o, o, o, o, o, o, o, o]; +a[7] = {}; +try { + for (var i = 0; i < 9; i++) + a[i].y(); +} catch (exc) { + assertEq(exc.name, "TypeError"); // should happen when i == 7 +} diff --git a/js/src/jit-test/tests/basic/testMissingMethod2.js b/js/src/jit-test/tests/basic/testMissingMethod2.js new file mode 100644 index 0000000000..fabfa08a60 --- /dev/null +++ b/js/src/jit-test/tests/basic/testMissingMethod2.js @@ -0,0 +1,10 @@ +var o = {y: function() {}}; +var a = [o, o, o, o, o, o, o, o, o]; +Number.prototype.y = 0; +a[7] = 0; +try { + for (var i = 0; i < 9; i++) + a[i].y(); +} catch (exc) { + assertEq(exc.name, "TypeError"); // should happen when i == 7 +} diff --git a/js/src/jit-test/tests/basic/testMissingProperties.js b/js/src/jit-test/tests/basic/testMissingProperties.js new file mode 100644 index 0000000000..71512c6f5c --- /dev/null +++ b/js/src/jit-test/tests/basic/testMissingProperties.js @@ -0,0 +1,49 @@ +function isnan(n) { return n !== n } + +function f(x) { + var sum = 0; + for (var i = 0; i < 100; ++i) + sum += x.x; + return sum; +} +var o = {}; +assertEq(isnan(f(o)), true); +o.x = 1; +assertEq(f(o), 100); +var o = {a:1, b:2}; +assertEq(isnan(f(o)), true); +o.x = 2; +assertEq(f(o), 200); + +function g(x) { + var sum = 0; + for (var i = 0; i < 100; ++i) + sum += x.x; + return sum; +} +var o = {c:1, x:1}; +assertEq(g(o), 100); +var o = {}; +assertEq(isnan(g(o)), true); + +function h(x) { + var sum = 0; + for (var i = 0; i < 100; ++i) + sum += x.x; + return sum; +} + +var proto1 = {}; +var proto2 = Object.create(proto1); +var o = Object.create(proto2); +assertEq(isnan(f(o)), true); +assertEq(isnan(g(o)), true); +assertEq(isnan(h(o)), true); +proto2.x = 2; +assertEq(f(o), 200); +assertEq(g(o), 200); +assertEq(h(o), 200); +var o = {} +assertEq(isnan(f(o)), true); +assertEq(isnan(g(o)), true); +assertEq(isnan(h(o)), true); diff --git a/js/src/jit-test/tests/basic/testModuloWithNegative1.js b/js/src/jit-test/tests/basic/testModuloWithNegative1.js new file mode 100644 index 0000000000..ed767a7a2a --- /dev/null +++ b/js/src/jit-test/tests/basic/testModuloWithNegative1.js @@ -0,0 +1,11 @@ +function testModuloWithNegative1() { + var v = 0; + for (var i = 0; i < 2; ++i) { + c = v; + v -= 1; + for (var j = 0; j < 2; ++j) + c %= -1; + } + return 1/c; +} +assertEq(testModuloWithNegative1(), -Infinity); diff --git a/js/src/jit-test/tests/basic/testModuloWithNegative2.js b/js/src/jit-test/tests/basic/testModuloWithNegative2.js new file mode 100644 index 0000000000..dfd1e3deb8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testModuloWithNegative2.js @@ -0,0 +1,7 @@ +function f(v, e) { + for (var i = 0; i < 9; i++) + v %= e; + return v; +} +f(0, 1); +assertEq(f(-2, 2), -0); diff --git a/js/src/jit-test/tests/basic/testMoreArgcThanNargs.js b/js/src/jit-test/tests/basic/testMoreArgcThanNargs.js new file mode 100644 index 0000000000..9fcda77e37 --- /dev/null +++ b/js/src/jit-test/tests/basic/testMoreArgcThanNargs.js @@ -0,0 +1,14 @@ +function doTestMoreArgcThanNargs() +{ + var x = 0; + for (var i = 0; i < 10; i++) + { + x = x + arguments[3]; + } + return x; +} +function testMoreArgcThanNargs() +{ + return doTestMoreArgcThanNargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); +} +assertEq(testMoreArgcThanNargs(), 4*10); diff --git a/js/src/jit-test/tests/basic/testMoreClosures.js b/js/src/jit-test/tests/basic/testMoreClosures.js new file mode 100644 index 0000000000..5592bcba37 --- /dev/null +++ b/js/src/jit-test/tests/basic/testMoreClosures.js @@ -0,0 +1,14 @@ +function testMoreClosures() { + var f = {}, max = 3; + + var hello = function(n) { + function howdy() { return n * n } + f.test = howdy; + }; + + for (var i = 0; i <= max; i++) + hello(i); + + return f.test(); +} +assertEq(testMoreClosures(), 9); diff --git a/js/src/jit-test/tests/basic/testMulOverflow.js b/js/src/jit-test/tests/basic/testMulOverflow.js new file mode 100644 index 0000000000..5d7a1339fc --- /dev/null +++ b/js/src/jit-test/tests/basic/testMulOverflow.js @@ -0,0 +1,6 @@ +function testMulOverflow() { + var a = []; + for (let j=0;j<5;++j) a.push(0 | ((0x60000009) * 0x60000009)); + return a.join(","); +} +assertEq(testMulOverflow(), "-1073741824,-1073741824,-1073741824,-1073741824,-1073741824"); diff --git a/js/src/jit-test/tests/basic/testMultipleArgumentsObjects.js b/js/src/jit-test/tests/basic/testMultipleArgumentsObjects.js new file mode 100644 index 0000000000..dd8285d643 --- /dev/null +++ b/js/src/jit-test/tests/basic/testMultipleArgumentsObjects.js @@ -0,0 +1,12 @@ +function testMultipleArgumentsObjects() { + var testargs = arguments; + var f = function (name, which) { + var args = [testargs, arguments]; + return args[which][0]; + }; + var arr = [0, 0, 0, 0, 1]; + for (var i = 0; i < arr.length; i++) + arr[i] = f("f", arr[i]); + return arr + ''; +} +assertEq(testMultipleArgumentsObjects(), ",,,,f"); diff --git a/js/src/jit-test/tests/basic/testMultipleFunctionRedeclarations.js b/js/src/jit-test/tests/basic/testMultipleFunctionRedeclarations.js new file mode 100644 index 0000000000..701782378f --- /dev/null +++ b/js/src/jit-test/tests/basic/testMultipleFunctionRedeclarations.js @@ -0,0 +1,44 @@ +function f1() { + assertEq(g(), 3); + function g() { return 1 } + assertEq(g(), 3); + function g() { return 2 } + assertEq(g(), 3); + function g() { return 3 } + assertEq(g(), 3); +} +f1(); + +function f2() { + assertEq(g(), 2); + var g = 3; + assertEq(g, 3); + function g() { return 1 } + function g() { return 2 } +} +f2(); + +function f3() { + assertEq(g(), 2); + var g = 3; + assertEq(g, 3); + function g() { return 1 } + var g = 4; + assertEq(g, 4); + function g() { return 2 } +} +f3(); + +function f4() { + assertEq(g(), 4); + function g() { return 1 } + assertEq(g(), 4); + function g() { return 2 } + var g = 9; + assertEq(g, 9); + function g() { return 3 } + assertEq(g, 9); + function g() { return 4 } + assertEq(g, 9); +} +f4(); diff --git a/js/src/jit-test/tests/basic/testMultiplePendingGlobalWrites.js b/js/src/jit-test/tests/basic/testMultiplePendingGlobalWrites.js new file mode 100644 index 0000000000..06d54dfbbb --- /dev/null +++ b/js/src/jit-test/tests/basic/testMultiplePendingGlobalWrites.js @@ -0,0 +1,11 @@ +var a, b; +function g(x) { + var y = x++; + return [x, y]; +} +function f() { + for(var i=0; i<20; i++) { + [a,b] = g("10"); + } +} +f(); diff --git a/js/src/jit-test/tests/basic/testNEWINIT.js b/js/src/jit-test/tests/basic/testNEWINIT.js new file mode 100644 index 0000000000..bca645b2f1 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNEWINIT.js @@ -0,0 +1,8 @@ +function testNEWINIT() +{ + var a; + for (var i = 0; i < 10; ++i) + a = [{}]; + return JSON.stringify(a); +} +assertEq(testNEWINIT(), "[{}]"); diff --git a/js/src/jit-test/tests/basic/testNEWINIT_DOUBLE.js b/js/src/jit-test/tests/basic/testNEWINIT_DOUBLE.js new file mode 100644 index 0000000000..238e5de72a --- /dev/null +++ b/js/src/jit-test/tests/basic/testNEWINIT_DOUBLE.js @@ -0,0 +1,6 @@ +function testNEWINIT_DOUBLE() +{ + for (var z = 0; z < 2; ++z) { ({ 0.1: null })} + return "ok"; +} +assertEq(testNEWINIT_DOUBLE(), "ok"); diff --git a/js/src/jit-test/tests/basic/testNativeArgsRooting.js b/js/src/jit-test/tests/basic/testNativeArgsRooting.js new file mode 100644 index 0000000000..1ce8259f2d --- /dev/null +++ b/js/src/jit-test/tests/basic/testNativeArgsRooting.js @@ -0,0 +1,14 @@ +if ('gczeal' in this) +(function () { + (eval("\ + (function () {\ + for (var y = 0; y < 16; ++y) {\ + if (y % 3 == 2) {\ + gczeal(1);\ + } else {\ + print(0 / 0);\ + }\ + }\ + });\ + "))() +})(); diff --git a/js/src/jit-test/tests/basic/testNativeLog.js b/js/src/jit-test/tests/basic/testNativeLog.js new file mode 100644 index 0000000000..5a81c79e77 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNativeLog.js @@ -0,0 +1,8 @@ +function testNativeLog() { + var a = new Array(5); + for (var i = 0; i < 5; i++) { + a[i] = Math.log(Math.pow(Math.E, 10)); + } + return a.join(","); +} +assertEq(testNativeLog(), "10,10,10,10,10"); diff --git a/js/src/jit-test/tests/basic/testNativeMax.js b/js/src/jit-test/tests/basic/testNativeMax.js new file mode 100644 index 0000000000..ef36dbe5c6 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNativeMax.js @@ -0,0 +1,20 @@ +function testNativeMax() { + var out = [], k; + for (var i = 0; i < 5; ++i) { + k = Math.max(k, i); + } + out.push(k); + + k = 0; + for (var i = 0; i < 5; ++i) { + k = Math.max(k, i); + } + out.push(k); + + for (var i = 0; i < 5; ++i) { + k = Math.max(0, -0); + } + out.push((1 / k) < 0); + return out.join(","); +} +assertEq(testNativeMax(), "NaN,4,false"); diff --git a/js/src/jit-test/tests/basic/testNativeSetter.js b/js/src/jit-test/tests/basic/testNativeSetter.js new file mode 100644 index 0000000000..79ddf56f93 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNativeSetter.js @@ -0,0 +1,8 @@ +function testNativeSetter() { + var re = /foo/; + var N = 19; + for (var i = 0; i < N; i++) + re.lastIndex = i; + assertEq(re.lastIndex, N - 1); +} +testNativeSetter(); diff --git a/js/src/jit-test/tests/basic/testNegZero1.js b/js/src/jit-test/tests/basic/testNegZero1.js new file mode 100644 index 0000000000..fe9aabdf2c --- /dev/null +++ b/js/src/jit-test/tests/basic/testNegZero1.js @@ -0,0 +1,9 @@ +function testNegZero1Helper(z) { + for (let j = 0; j < 5; ++j) { z = -z; } + return Math.atan2(0, -0) == Math.atan2(0, z); +} + +var testNegZero1 = function() { return testNegZero1Helper(0); } +testNegZero1.name = 'testNegZero1'; +testNegZero1Helper(1); +assertEq(testNegZero1(), true); diff --git a/js/src/jit-test/tests/basic/testNegativeArrayLength.js b/js/src/jit-test/tests/basic/testNegativeArrayLength.js new file mode 100644 index 0000000000..1719ceeb97 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNegativeArrayLength.js @@ -0,0 +1,10 @@ +function f() { + try { + for ( var i = 7; i > -2; i-- ) + new Array(i).join('*'); + } catch (e) { + return e instanceof RangeError; + } + return false; +} +assertEq(f(), true); diff --git a/js/src/jit-test/tests/basic/testNegativeGETELEMIndex.js b/js/src/jit-test/tests/basic/testNegativeGETELEMIndex.js new file mode 100644 index 0000000000..da7b748121 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNegativeGETELEMIndex.js @@ -0,0 +1,6 @@ +function testNegativeGETELEMIndex() +{ + for (let i=0;i<3;++i) /x/[-4]; + return "ok"; +} +assertEq(testNegativeGETELEMIndex(), "ok"); diff --git a/js/src/jit-test/tests/basic/testNestedClosures.js b/js/src/jit-test/tests/basic/testNestedClosures.js new file mode 100644 index 0000000000..445ea6e39f --- /dev/null +++ b/js/src/jit-test/tests/basic/testNestedClosures.js @@ -0,0 +1,23 @@ +function testNestedClosures() { + function f(a, b) { + function g(x, y) { + function h(m, n) { + function k(u, v) { + var s = ''; + for (var i = 0; i < 5; ++i) + s = a + ',' + b + ',' + x + ',' + y + ',' + m + ',' + n + ',' + u + ',' + v; + return s; + } + return k(m+1, n+1); + } + return h(x+1, y+1); + } + return g(a+1, b+1); + } + + var s1; + for (var i = 0; i < 5; ++i) + s1 = f(i, i+i); + return s1; +} +assertEq(testNestedClosures(), '4,8,5,9,6,10,7,11'); diff --git a/js/src/jit-test/tests/basic/testNestedDeepBail.js b/js/src/jit-test/tests/basic/testNestedDeepBail.js new file mode 100644 index 0000000000..8e59b04cda --- /dev/null +++ b/js/src/jit-test/tests/basic/testNestedDeepBail.js @@ -0,0 +1,20 @@ +var _quit; +function testNestedDeepBail() +{ + _quit = false; + function loop() { + for (var i = 0; i < 4; i++) + ; + } + loop(); + + function f() { + loop(); + _quit = true; + } + + var stk = [[1], [], [], [], []]; + while (!_quit) + stk.pop().forEach(f); +} +testNestedDeepBail(); diff --git a/js/src/jit-test/tests/basic/testNestedEscapingLambdas.js b/js/src/jit-test/tests/basic/testNestedEscapingLambdas.js new file mode 100644 index 0000000000..8b896f1936 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNestedEscapingLambdas.js @@ -0,0 +1,31 @@ +function testNestedEscapingLambdas() +{ + try { + return (function() { + var a = [], r = []; + function setTimeout(f, t) { + a.push(f); + } + + function runTimeouts() { + for (var i = 0; i < a.length; i++) + a[i](); + } + + var $foo = "#nothiddendiv"; + setTimeout(function(){ + r.push($foo); + setTimeout(function(){ + r.push($foo); + }, 100); + }, 100); + + runTimeouts(); + + return r.join(""); + })(); + } catch (e) { + return e; + } +} +assertEq(testNestedEscapingLambdas(), "#nothiddendiv#nothiddendiv"); diff --git a/js/src/jit-test/tests/basic/testNestedExitStackOuter.js b/js/src/jit-test/tests/basic/testNestedExitStackOuter.js new file mode 100644 index 0000000000..5da8a1f968 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNestedExitStackOuter.js @@ -0,0 +1,29 @@ +// Test stack reconstruction after a nested exit +function testNestedExitStackInner(j, counter) { + ++counter; + var b = 0; + for (var i = 1; i <= 9; i++) { + ++b; + var a; + // Make sure that once everything has been traced we suddenly switch to + // a different control flow the first time we run the outermost tree, + // triggering a side exit. + if (j < 9) + a = 1; + else + a = 0; + ++b; + b += a; + } + return counter + b; +} +function testNestedExitStackOuter() { + var counter = 0; + for (var j = 1; j <= 9; ++j) { + for (var k = 1; k <= 9; ++k) { + counter = testNestedExitStackInner(j, counter); + } + } + return counter; +} +//assertEq(testNestedExitStackOuter(), 81); diff --git a/js/src/jit-test/tests/basic/testNestedForIn.js b/js/src/jit-test/tests/basic/testNestedForIn.js new file mode 100644 index 0000000000..1541775f87 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNestedForIn.js @@ -0,0 +1,9 @@ +function testNestedForIn() { + var a = {x: 1, y: 2, z: 3}; + var s = ''; + for (var p1 in a) + for (var p2 in a) + s += p1 + p2 + ' '; + return s; +} +assertEq(testNestedForIn(), 'xx xy xz yx yy yz zx zy zz '); diff --git a/js/src/jit-test/tests/basic/testNeutering.js b/js/src/jit-test/tests/basic/testNeutering.js new file mode 100644 index 0000000000..fc49e3f99e --- /dev/null +++ b/js/src/jit-test/tests/basic/testNeutering.js @@ -0,0 +1,23 @@ +var ab = new ArrayBuffer(4); +var i32 = new Int32Array(ab); +i32[0] = 42; +detachArrayBuffer(ab); +assertEq(i32.length, 0); +assertEq(ab.byteLength, 0); +assertEq(i32[0], undefined); + +var ab = new ArrayBuffer(12); +var i32 = new Int32Array(ab); +i32[0] = 42; +detachArrayBuffer(ab); +assertEq(i32.length, 0); +assertEq(ab.byteLength, 0); +assertEq(i32[0], undefined); + +var ab = new ArrayBuffer(4096); +var i32 = new Int32Array(ab); +i32[0] = 42; +detachArrayBuffer(ab); +assertEq(i32.length, 0); +assertEq(ab.byteLength, 0); +assertEq(i32[0], undefined); diff --git a/js/src/jit-test/tests/basic/testNewArrayCount.js b/js/src/jit-test/tests/basic/testNewArrayCount.js new file mode 100644 index 0000000000..cb7e6d9843 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNewArrayCount.js @@ -0,0 +1,12 @@ +function testNewArrayCount() +{ + function count(a) { var n = 0; for (var p in a) n++; return n; } + var a = []; + for (var i = 0; i < 5; i++) + a = [0]; + assertEq(count(a), 1); + for (var i = 0; i < 5; i++) + a = [0, , 2]; + assertEq(count(a), 2); +} +testNewArrayCount(); diff --git a/js/src/jit-test/tests/basic/testNewArrayCount2.js b/js/src/jit-test/tests/basic/testNewArrayCount2.js new file mode 100644 index 0000000000..6318e4c25f --- /dev/null +++ b/js/src/jit-test/tests/basic/testNewArrayCount2.js @@ -0,0 +1,8 @@ +function testNewArrayCount2() { + function count(a) { var n = 0; for (var p in a) n++; return n; } + var x = 0; + for (var i = 0; i < 10; ++i) + x = count(new Array(1,2,3)); + return x; +} +assertEq(testNewArrayCount2(), 3); diff --git a/js/src/jit-test/tests/basic/testNewObject.js b/js/src/jit-test/tests/basic/testNewObject.js new file mode 100644 index 0000000000..028523c011 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNewObject.js @@ -0,0 +1,8 @@ +function testNewObject() +{ + var a = {}; + for (var i = 0; i < 10; ++i) + a = new Object(); + return a; +} +assertEq(testNewObject().__proto__, {}.__proto__); diff --git a/js/src/jit-test/tests/basic/testNewString.js b/js/src/jit-test/tests/basic/testNewString.js new file mode 100644 index 0000000000..e0f378bbc0 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNewString.js @@ -0,0 +1,21 @@ +function testNewString() +{ + var o = { toString: function() { return "string"; } }; + var r = []; + for (var i = 0; i < 5; i++) + r.push(typeof new String(o)); + for (var i = 0; i < 5; i++) + r.push(typeof new String(3)); + for (var i = 0; i < 5; i++) + r.push(typeof new String(2.5)); + for (var i = 0; i < 5; i++) + r.push(typeof new String("string")); + for (var i = 0; i < 5; i++) + r.push(typeof new String(null)); + for (var i = 0; i < 5; i++) + r.push(typeof new String(true)); + for (var i = 0; i < 5; i++) + r.push(typeof new String(undefined)); + return r.length === 35 && r.every(function(v) { return v === "object"; }); +} +assertEq(testNewString(), true); diff --git a/js/src/jit-test/tests/basic/testNewWithClone.js b/js/src/jit-test/tests/basic/testNewWithClone.js new file mode 100644 index 0000000000..ef976df585 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNewWithClone.js @@ -0,0 +1,7 @@ +with({}) { + function f() { + this.foo = "bar"; + } + o = new f(); + assertEq(o.foo, "bar"); +} diff --git a/js/src/jit-test/tests/basic/testNewWithNonNativeProto.js b/js/src/jit-test/tests/basic/testNewWithNonNativeProto.js new file mode 100644 index 0000000000..dc950efc7c --- /dev/null +++ b/js/src/jit-test/tests/basic/testNewWithNonNativeProto.js @@ -0,0 +1,9 @@ +function testNewWithNonNativeProto() +{ + function f() { } + var a = f.prototype = []; + for (var i = 0; i < 5; i++) + var o = new f(); + return Object.getPrototypeOf(o) === a && o.splice === Array.prototype.splice; +} +assertEq(testNewWithNonNativeProto(), true); diff --git a/js/src/jit-test/tests/basic/testNot.js b/js/src/jit-test/tests/basic/testNot.js new file mode 100644 index 0000000000..746ca5739c --- /dev/null +++ b/js/src/jit-test/tests/basic/testNot.js @@ -0,0 +1,8 @@ +function testNot() { + var a = new Object(), b = null, c = "foo", d = "", e = 5, f = 0, g = 5.5, h = -0, i = true, j = false, k = undefined; + var r; + for (var i = 0; i < 10; ++i) + r = [!a, !b, !c, !d, !e, !f, !g, !h, !i, !j, !k]; + return r.join(","); +} +assertEq(testNot(), "false,true,false,true,false,true,false,true,false,true,true"); diff --git a/js/src/jit-test/tests/basic/testNullCallee.js b/js/src/jit-test/tests/basic/testNullCallee.js new file mode 100644 index 0000000000..7eab7d55c9 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNullCallee.js @@ -0,0 +1,16 @@ +function testNullCallee() { + try { + function f() { + var x = new Array(5); + for (var i = 0; i < 5; i++) + x[i] = a[i].toString(); + return x.join(','); + } + f([[1],[2],[3],[4],[5]]); + f([null, null, null, null, null]); + } catch (e) { + return true; + } + return false; +} +assertEq(testNullCallee(), true); diff --git a/js/src/jit-test/tests/basic/testNullIncrement.js b/js/src/jit-test/tests/basic/testNullIncrement.js new file mode 100644 index 0000000000..b7ffd03b4c --- /dev/null +++ b/js/src/jit-test/tests/basic/testNullIncrement.js @@ -0,0 +1,14 @@ +function f() { + var n; + var k; + for (var i = 0; i < 18; ++i) { + n = null; + k = n++; + if (k) { } + } + return [k, n]; +} + +var [a, b] = f(); +assertEq(a, 0); +assertEq(b, 1); diff --git a/js/src/jit-test/tests/basic/testNullRelCmp.js b/js/src/jit-test/tests/basic/testNullRelCmp.js new file mode 100644 index 0000000000..4531ea2c82 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNullRelCmp.js @@ -0,0 +1,6 @@ +function testNullRelCmp() { + var out = []; + for(j=0;j<3;++j) { out.push(3 > null); out.push(3 < null); out.push(0 == null); out.push(3 == null); } + return out.join(","); +} +assertEq(testNullRelCmp(), "true,false,false,false,true,false,false,false,true,false,false,false"); diff --git a/js/src/jit-test/tests/basic/testNullToString.js b/js/src/jit-test/tests/basic/testNullToString.js new file mode 100644 index 0000000000..c80feb1da1 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNullToString.js @@ -0,0 +1,13 @@ +function testNullToString() +{ + var a = []; + for (var i = 0; i < 10; i++) + a.push(String(null)); + for (i = 0; i < 10; i++) { + var t = typeof a[i]; + if (t != "string") + a.push(t); + } + return a.join(","); +} +assertEq(testNullToString(), "null,null,null,null,null,null,null,null,null,null"); diff --git a/js/src/jit-test/tests/basic/testNumToString.js b/js/src/jit-test/tests/basic/testNumToString.js new file mode 100644 index 0000000000..96f3cc725f --- /dev/null +++ b/js/src/jit-test/tests/basic/testNumToString.js @@ -0,0 +1,18 @@ +function testNumToString() { + var r = []; + var d = 123456789; + for (var i = 0; i < 10; ++i) { + r = [ + d.toString(), + (-d).toString(), + d.toString(10), + (-d).toString(10), + d.toString(16), + (-d).toString(16), + d.toString(36), + (-d).toString(36) + ]; + } + return r.join(","); +} +assertEq(testNumToString(), "123456789,-123456789,123456789,-123456789,75bcd15,-75bcd15,21i3v9,-21i3v9"); diff --git a/js/src/jit-test/tests/basic/testNumberToString.js b/js/src/jit-test/tests/basic/testNumberToString.js new file mode 100644 index 0000000000..5b79616648 --- /dev/null +++ b/js/src/jit-test/tests/basic/testNumberToString.js @@ -0,0 +1,6 @@ +function testNumberToString() { + var x = new Number(0); + for (var i = 0; i < 4; i++) + x.toString(); +} +testNumberToString(); diff --git a/js/src/jit-test/tests/basic/testOOMInAutoEnterCompartment.js b/js/src/jit-test/tests/basic/testOOMInAutoEnterCompartment.js new file mode 100644 index 0000000000..ea78fd67ed --- /dev/null +++ b/js/src/jit-test/tests/basic/testOOMInAutoEnterCompartment.js @@ -0,0 +1,17 @@ +// |jit-test| slow; skip-if: (getBuildConfiguration("asan") && getBuildConfiguration("debug")) +// This test is too slow to run at all with ASan in a debug configuration + +function fatty() { + try { + fatty(); + } catch (e) { + foo(); + } +} + + +foo = evalcx("(function foo() { foo.bar() })"); +foo.bar = evalcx("(function bar() {})"); + +fatty(); + diff --git a/js/src/jit-test/tests/basic/testObjectConstructorReturningObject.js b/js/src/jit-test/tests/basic/testObjectConstructorReturningObject.js new file mode 100644 index 0000000000..c18863db64 --- /dev/null +++ b/js/src/jit-test/tests/basic/testObjectConstructorReturningObject.js @@ -0,0 +1,12 @@ +for (var i = 0; i < 12; ++i) { + var o; + + o = new Object(Object); + assertEq(o, Object); + + (function () { + x = constructor + })(); + o = new(x)(x); + assertEq(o, Object); +} diff --git a/js/src/jit-test/tests/basic/testObjectLength.js b/js/src/jit-test/tests/basic/testObjectLength.js new file mode 100644 index 0000000000..3813a6e51b --- /dev/null +++ b/js/src/jit-test/tests/basic/testObjectLength.js @@ -0,0 +1,10 @@ +function testObjectLength() +{ + var counter = 0; + var a = {}; + a.length = 10000; + for (var i = 0; i < a.length; i++) + counter++; + return counter; +} +assertEq(testObjectLength(), 10000); diff --git a/js/src/jit-test/tests/basic/testObjectOrderedCmp.js b/js/src/jit-test/tests/basic/testObjectOrderedCmp.js new file mode 100644 index 0000000000..7065ad8fc9 --- /dev/null +++ b/js/src/jit-test/tests/basic/testObjectOrderedCmp.js @@ -0,0 +1,7 @@ +function testObjectOrderedCmp() +{ + var a = new Array(5); + for(var i=0;i<5;++i) a[i] = ({} < {}); + return a.join(","); +} +assertEq(testObjectOrderedCmp(), "false,false,false,false,false"); diff --git a/js/src/jit-test/tests/basic/testObjectOrderedCmp2.js b/js/src/jit-test/tests/basic/testObjectOrderedCmp2.js new file mode 100644 index 0000000000..6790799c37 --- /dev/null +++ b/js/src/jit-test/tests/basic/testObjectOrderedCmp2.js @@ -0,0 +1,7 @@ +function testObjectOrderedCmp2() +{ + var a = new Array(5); + for(var i=0;i<5;++i) a[i] = ("" <= null); + return a.join(","); +} +assertEq(testObjectOrderedCmp2(), "true,true,true,true,true"); diff --git a/js/src/jit-test/tests/basic/testObjectToNumber.js b/js/src/jit-test/tests/basic/testObjectToNumber.js new file mode 100644 index 0000000000..d6353a6a68 --- /dev/null +++ b/js/src/jit-test/tests/basic/testObjectToNumber.js @@ -0,0 +1,8 @@ +function testObjectToNumber() { + var o = {valueOf: () => -3}; + var x = 0; + for (var i = 0; i < 10; i++) + x -= o; + return x; +} +assertEq(testObjectToNumber(), 30); diff --git a/js/src/jit-test/tests/basic/testObjectToString.js b/js/src/jit-test/tests/basic/testObjectToString.js new file mode 100644 index 0000000000..ba47d00f0b --- /dev/null +++ b/js/src/jit-test/tests/basic/testObjectToString.js @@ -0,0 +1,8 @@ +function testObjectToString() { + var o = {toString: () => "foo"}; + var s = ""; + for (var i = 0; i < 10; i++) + s += o; + return s; +} +assertEq(testObjectToString(), "foofoofoofoofoofoofoofoofoofoo"); diff --git a/js/src/jit-test/tests/basic/testObjectVsPrototype.js b/js/src/jit-test/tests/basic/testObjectVsPrototype.js new file mode 100644 index 0000000000..194b05fa78 --- /dev/null +++ b/js/src/jit-test/tests/basic/testObjectVsPrototype.js @@ -0,0 +1,12 @@ +function testObjectVsPrototype() { + function D() {} + var b = D.prototype = {x: 1}; + var d = new D; + var arr = [b, b, b, d]; + for (var i = 0; i < 4; i++) + arr[i].x = i; + + d.y = 12; + assertEq(d.x, 3); +} +testObjectVsPrototype(); diff --git a/js/src/jit-test/tests/basic/testOverOOMInFixupArity.js b/js/src/jit-test/tests/basic/testOverOOMInFixupArity.js new file mode 100644 index 0000000000..1b81d84ec0 --- /dev/null +++ b/js/src/jit-test/tests/basic/testOverOOMInFixupArity.js @@ -0,0 +1,15 @@ +function foo() { + bar(1,2,3,4,5,6,7,8,9); +} + +function bar() { + foo(1,2,3,4,5,6,7,8,9); +} + +var caught = false; +try { + foo(); +} catch (e) { + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/basic/testOverRecursed1.js b/js/src/jit-test/tests/basic/testOverRecursed1.js new file mode 100644 index 0000000000..d44da136c2 --- /dev/null +++ b/js/src/jit-test/tests/basic/testOverRecursed1.js @@ -0,0 +1,6 @@ +// |jit-test| error:InternalError + +var a = []; +var f = a.forEach.bind(a); +a.push(f); +f(f); diff --git a/js/src/jit-test/tests/basic/testOverRecursed2.js b/js/src/jit-test/tests/basic/testOverRecursed2.js new file mode 100644 index 0000000000..bcd59d8b2e --- /dev/null +++ b/js/src/jit-test/tests/basic/testOverRecursed2.js @@ -0,0 +1,7 @@ +// |jit-test| error:InternalError + +var a = []; +var sort = a.sort.bind(a); +a.push(sort); +a.push(sort); +sort(sort); diff --git a/js/src/jit-test/tests/basic/testOverRecursed3.js b/js/src/jit-test/tests/basic/testOverRecursed3.js new file mode 100644 index 0000000000..100e7e762d --- /dev/null +++ b/js/src/jit-test/tests/basic/testOverRecursed3.js @@ -0,0 +1,6 @@ +// |jit-test| error:InternalError + +var x = []; +x.push(x, x); // more than one so the sort can't be optimized away +x.toString = x.sort; +x.toString(); diff --git a/js/src/jit-test/tests/basic/testOverRecursed4.js b/js/src/jit-test/tests/basic/testOverRecursed4.js new file mode 100644 index 0000000000..e29d4bf7d8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testOverRecursed4.js @@ -0,0 +1,9 @@ +function tryItOut(code) { + f = eval("(function(){" + code + "})") + try { + f() + } catch (e) {} +} +tryItOut("x=7"); +tryItOut("\"use strict\";for(d in[x=arguments]){}"); +tryItOut("for(v in((Object.seal)(x)));x.length=Function") diff --git a/js/src/jit-test/tests/basic/testOverRecursed6.js b/js/src/jit-test/tests/basic/testOverRecursed6.js new file mode 100644 index 0000000000..7c30bc7b61 --- /dev/null +++ b/js/src/jit-test/tests/basic/testOverRecursed6.js @@ -0,0 +1,3 @@ +// |jit-test| error:InternalError + +"" + {toString: Date.prototype.toJSON}; diff --git a/js/src/jit-test/tests/basic/testOverwrittenArgumentsWithUndefined.js b/js/src/jit-test/tests/basic/testOverwrittenArgumentsWithUndefined.js new file mode 100644 index 0000000000..5f899243b7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testOverwrittenArgumentsWithUndefined.js @@ -0,0 +1,24 @@ +function f() { + var a = arguments; + eval("assertEq(arguments[0], 42)"); + eval("assertEq(arguments, a)"); + arguments = undefined; + eval("assertEq(arguments, undefined)"); + arguments = a; + eval("assertEq(arguments[0], 42)"); + eval("assertEq(arguments, a)"); +} +f(42); + +function f(z) { + var a = arguments; + eval("assertEq(arguments[0], 42)"); + eval("assertEq(arguments, a)"); + arguments = undefined; + eval("assertEq(arguments, undefined)"); + z = 17; + eval("assertEq(a[0], 17)"); + a[0] = 'ponies'; + eval("assertEq(z, 'ponies')"); +} +f(42); diff --git a/js/src/jit-test/tests/basic/testOwnPropertyWithInOperator.js b/js/src/jit-test/tests/basic/testOwnPropertyWithInOperator.js new file mode 100644 index 0000000000..2224dba2d6 --- /dev/null +++ b/js/src/jit-test/tests/basic/testOwnPropertyWithInOperator.js @@ -0,0 +1,9 @@ +function testOwnPropertyWithInOperator() +{ + var o = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6 }; + var a = []; + for (var i = 0; i < 7; i++) + a.push(i in o); + return a.join(","); +} +assertEq(testOwnPropertyWithInOperator(), "true,true,true,true,true,true,true"); diff --git a/js/src/jit-test/tests/basic/testParseInt.js b/js/src/jit-test/tests/basic/testParseInt.js new file mode 100644 index 0000000000..d3706b2f08 --- /dev/null +++ b/js/src/jit-test/tests/basic/testParseInt.js @@ -0,0 +1,48 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +function testInt(n, result) { + var x = 0; + for (var i = 0; i < 15; i++) { + assertEq(parseInt(n, 10), result); + assertEq(parseInt(n, 0), result); + assertEq(parseInt(n), result); + assertEq(parseInt(n, x), result); + + if (x % 2 == 0) + x = 10; + else + x = 0; + } +} + +function testDouble(n, result) { + var x = 0; + for (var i = 0; i < 15; i++) { + assertEq(parseInt(n, 10), result); + assertEq(parseInt(n, 0), result); + assertEq(parseInt(n), result); + assertEq(parseInt(n, x), result); + + if (x % 2 == 0) + x = 10; + else + x = 0; + } +} + +testInt(2147483647, 2147483647); +testInt(-2147483648, -2147483648); +testInt(17, 17); +testInt(-1, -1); +testInt(0, 0); + +testDouble(1e21, 1); +testDouble(-5.7, -5); +testDouble(1.7, 1); +testDouble(1.0e-6, 0); +testDouble(1.0e-7, 1); +testDouble(NaN, NaN); +testDouble(1e20, 1e20); diff --git a/js/src/jit-test/tests/basic/testPartialFlatClosure.js b/js/src/jit-test/tests/basic/testPartialFlatClosure.js new file mode 100644 index 0000000000..9998ce306b --- /dev/null +++ b/js/src/jit-test/tests/basic/testPartialFlatClosure.js @@ -0,0 +1,10 @@ +assertEq((('-r', function (s) { + function C(i) { + this.m = function () { return i * t; } + } + var t = s; + var a = []; + for (var i = 0; i < 5; i++) + a[a.length] = new C(i); + return a; +})(42))[4].m(), 168); diff --git a/js/src/jit-test/tests/basic/testPaths.js b/js/src/jit-test/tests/basic/testPaths.js new file mode 100644 index 0000000000..a2b78323ea --- /dev/null +++ b/js/src/jit-test/tests/basic/testPaths.js @@ -0,0 +1,68 @@ +// load() and snarf() (aka read()) should resolve paths relative to the current +// working directory. This is a little hard to test because the shell doesn't +// really have any (portable) notion of the current directory (and it can't +// create files to enforce an expected layout.) loadRelativeToScript() and +// readRelativeToScript() do what their names say, which is much easier to +// test. + +loaded = {} +snarfed = {} +loadRel = {} +snarfRel = {} +for (let f of ['local.js', '../basic/local.js', 'Y.js']) { + try { + load(f); + loaded[f] = true; + } catch(e) { + loaded[f] = !/can't open/.test(e); + } + + try { + snarf(f); + snarfed[f] = true; + } catch(e) { + snarfed[f] = !/can't open/.test(e); + } + + try { + readRelativeToScript(f); + snarfRel[f] = true; + } catch(e) { + snarfRel[f] = !/can't open/.test(e); + } + + try { + loadRelativeToScript(f); + loadRel[f] = true; + } catch(e) { + loadRel[f] = !/can't open/.test(e); + } +} + +// local.js in the same dir as this script, so should be found by the +// script-relative calls but not the cwd-relative ones -- unless you happen to +// be in that directory or a sibling directory. +assertEq(loadRel['local.js'], true); +assertEq(loadRel['../basic/local.js'], true); +assertEq(snarfRel['local.js'], true); +assertEq(snarfRel['../basic/local.js'], true); +var cwd = os.getenv('PWD'); +if (cwd !== undefined && !(/test.*[\/\\][^\//]+[\/\\]/.test(cwd))) { + assertEq(loaded['local.js'], false); + assertEq(loaded['../basic/local.js'], false); + assertEq(snarfed['local.js'], false); + assertEq(snarfed['../basic/local.js'], false); +} + +// Y.js is in the root of the objdir, where |make check| is normally +// run from. +assertEq(loadRel['Y.js'], false); +assertEq(snarfRel['Y.js'], false); +if (!snarfed['Y.js']) { + print("WARNING: expected to be able to find Y.js in current directory\n"); + print("(not failing because it depends on where this test was run from)\n"); +} +if (!loaded['Y.js']) { + print("WARNING: expected to be able to find Y.js in current directory\n"); + print("(not failing because it depends on where this test was run from)\n"); +} diff --git a/js/src/jit-test/tests/basic/testPrimitiveConstructorPrototype.js b/js/src/jit-test/tests/basic/testPrimitiveConstructorPrototype.js new file mode 100644 index 0000000000..f0154082cd --- /dev/null +++ b/js/src/jit-test/tests/basic/testPrimitiveConstructorPrototype.js @@ -0,0 +1,7 @@ +function testPrimitiveConstructorPrototype() { + var f = function(){}; + f.prototype = false; + for (let j=0;j<5;++j) { new f; } + return "ok"; +} +assertEq(testPrimitiveConstructorPrototype(), "ok"); diff --git a/js/src/jit-test/tests/basic/testPropagatedFunArgs.js b/js/src/jit-test/tests/basic/testPropagatedFunArgs.js new file mode 100644 index 0000000000..19052d1fe9 --- /dev/null +++ b/js/src/jit-test/tests/basic/testPropagatedFunArgs.js @@ -0,0 +1,34 @@ +function testPropagatedFunArgs() +{ + var win = this; + var res = [], q = []; + function addEventListener(name, func, flag) { + q.push(func); + } + + var pageInfo, obs; + addEventListener("load", handleLoad, true); + + var observer = { + observe: function(win, topic, data) { + // obs.removeObserver(observer, "page-info-dialog-loaded"); + handlePageInfo(); + } + }; + + function handleLoad() { + pageInfo = { toString: function() { return "pageInfo"; } }; + obs = { addObserver: function (obs, topic, data) { obs.observe(win, topic, data); } }; + obs.addObserver(observer, "page-info-dialog-loaded", false); + } + + function handlePageInfo() { + res.push(pageInfo); + function $(aId) { res.push(pageInfo); }; + var feedTab = $("feedTab"); + } + + q[0](); + return res.join(','); +} +assertEq(testPropagatedFunArgs(), "pageInfo,pageInfo"); diff --git a/js/src/jit-test/tests/basic/testProxyDefinePropertyWithMissingSetter.js b/js/src/jit-test/tests/basic/testProxyDefinePropertyWithMissingSetter.js new file mode 100644 index 0000000000..19bb715836 --- /dev/null +++ b/js/src/jit-test/tests/basic/testProxyDefinePropertyWithMissingSetter.js @@ -0,0 +1,21 @@ +// throw, don't crash + +var actual = ""; + +try { + +var x = new Proxy({}, { + defineProperty: function(target, name, desc) { + Object.defineProperty(x, name, desc) + }, +}); + +Object.defineProperty(x, "", ({ + get: function() {} +})) + +} catch (e) { + actual = '' + e; +} + +assertEq(actual, "InternalError: too much recursion"); diff --git a/js/src/jit-test/tests/basic/testProxyPrototypes.js b/js/src/jit-test/tests/basic/testProxyPrototypes.js new file mode 100644 index 0000000000..3b805e4c4d --- /dev/null +++ b/js/src/jit-test/tests/basic/testProxyPrototypes.js @@ -0,0 +1,81 @@ +"use strict" +// Helpers. +function makeAccessorProp(obj, propName, initialValue, hiddenName) { + if (!hiddenName) + hiddenName = propName + '_'; + if (initialValue) + Object.defineProperty(obj, hiddenName, { value: initialValue, writable: true, enumerable: false }); + Object.defineProperty(obj, propName, + { configurable: true, + enumerable: true, + get: function() { return this[hiddenName]; }, + set: function(x) { + Object.defineProperty(this, hiddenName, { value: x, writable: true, enumerable: false }); + } + }); +} + +// Set up a prototype with 4 properties. +var proto = {valueProp: 11, valuePropShadowed: 22}; +makeAccessorProp(proto, 'accessorProp', 33); +makeAccessorProp(proto, 'accessorPropShadowed', 44); + +// Set up a proxy that uses |proto| as a prototype. +var proxyTarget = {valuePropShadowed: 21}; +makeAccessorProp(proxyTarget, 'accessorPropShadowed', -44, 'accessorPropShadowed__'); +var proxy = wrapWithProto(proxyTarget, proto); + +// Value getters. +assertEq(proxy.valueProp, 11); +assertEq(proxy.valuePropShadowed, 21); +// Iteration, enumeration, etc. +var propNames = []; +for (var i in proxy) + propNames.push(i); +assertEq(propNames.length, 4); +assertEq('valueProp' in proxy, true); +assertEq(proxy.hasOwnProperty('valueProp'), false); +assertEq(Object.getOwnPropertyNames(proxy).indexOf('valueProp'), -1); +assertEq('valuePropShadowed' in proxy, true); +assertEq(Object.getOwnPropertyNames(proxy).indexOf('valuePropShadowed') == -1, false); +assertEq(proxy.hasOwnProperty('valuePropShadowed'), true); +// Value setters. +proxy.valuePropShadowed = 20; +proxy.valueProp = 10; +assertEq(proxyTarget.valuePropShadowed, 20); +assertEq(proxyTarget.valueProp, 10); +// Accessor getters. +assertEq(proxy.accessorProp, 33); +assertEq(proxy.accessorPropShadowed, -44); +// Accessor setters. +proxy.accessorProp = 32; +proxy.accessorPropShadowed = -43; +assertEq(proxy.accessorProp, 32); +assertEq(proxy.accessorPropShadowed, -43); +// Make sure the underlying objects look right. +assertEq(proto.accessorProp_, 33); +assertEq(proto.accessorPropShadowed_, 44); +assertEq(proto.hasOwnProperty('accessorPropShadowed__'), false); +assertEq(proxyTarget.accessorProp_, 32); +assertEq(proxyTarget.hasOwnProperty('accessorPropShadowed_'), false); +assertEq(proxyTarget.accessorPropShadowed__, -43); + +// Now, create a new object prototyped to |proxy| and make sure |proxy| behaves +// well on the prototype chain. +function Constructor() { + this.foo = 2; +} +Constructor.prototype = proxy; +var child = new Constructor(); +assertEq(child.valueProp, 10); +assertEq(child.valuePropShadowed, 20); +var childPropNames = []; +for (var i in child) + childPropNames.push(i); +assertEq(childPropNames.length, 5); +child.accessorProp = 5; +child.accessorPropShadowed = 6; +assertEq(child.accessorProp, 5); +assertEq(child.accessorPropShadowed, 6); +assertEq(child.accessorProp_, 5); +assertEq(child.accessorPropShadowed__, 6); diff --git a/js/src/jit-test/tests/basic/testPutOnEmptyArgsObject.js b/js/src/jit-test/tests/basic/testPutOnEmptyArgsObject.js new file mode 100644 index 0000000000..b230897857 --- /dev/null +++ b/js/src/jit-test/tests/basic/testPutOnEmptyArgsObject.js @@ -0,0 +1,16 @@ +var g; + +function h() { + return arguments.length; +} + +function f() { + var args = arguments; + g = function() { return h.apply(this, args); } +} + +for (var i = 0; i < 10; ++i) { + f(); +} + +assertEq(g(), 0); diff --git a/js/src/jit-test/tests/basic/testReallyDeepNestedExit.js b/js/src/jit-test/tests/basic/testReallyDeepNestedExit.js new file mode 100644 index 0000000000..f27c7315c1 --- /dev/null +++ b/js/src/jit-test/tests/basic/testReallyDeepNestedExit.js @@ -0,0 +1,38 @@ +function reallyDeepNestedExit(schedule) +{ + var c = 0, j = 0; + for (var i = 0; i < 5; i++) { + for (j = 0; j < 4; j++) { + c += (schedule[i*4 + j] == 1) ? 1 : 2; + } + } + return c; +} +function testReallyDeepNestedExit() +{ + var c = 0; + var schedule1 = new Array(5*4); + var schedule2 = new Array(5*4); + for (var i = 0; i < 5*4; i++) { + schedule1[i] = 0; + schedule2[i] = 0; + } + /** + * First innermost compile: true branch runs through. + * Second '': false branch compiles new loop edge. + * First outer compile: expect true branch. + * Second '': hit false branch. + */ + schedule1[0*4 + 3] = 1; + var schedules = [schedule1, + schedule2, + schedule1, + schedule2, + schedule2]; + + for (var i = 0; i < 5; i++) { + c += reallyDeepNestedExit(schedules[i]); + } + return c; +} +assertEq(testReallyDeepNestedExit(), 198); diff --git a/js/src/jit-test/tests/basic/testRebranding.js b/js/src/jit-test/tests/basic/testRebranding.js new file mode 100644 index 0000000000..f21fc5c192 --- /dev/null +++ b/js/src/jit-test/tests/basic/testRebranding.js @@ -0,0 +1,10 @@ +q = ""; +function g() { q += "g"; } +function h() { q += "h"; } +a = [g, g, g, g, h]; +for (i=0; i<5; i++) { f = a[i]; f(); } + +function testRebranding() { + return q; +} +assertEq(testRebranding(), "ggggh"); diff --git a/js/src/jit-test/tests/basic/testRebranding2.js b/js/src/jit-test/tests/basic/testRebranding2.js new file mode 100644 index 0000000000..7349c4fc02 --- /dev/null +++ b/js/src/jit-test/tests/basic/testRebranding2.js @@ -0,0 +1,21 @@ +delete q; +delete g; +delete h; +delete a; +delete f; + +function testRebranding2() { + // Same as testRebranding, but the object to be rebranded isn't the global. + var x = "FAIL"; + function g(){} + function h(){ x = "ok"; } + var obj = {m: g}; + var arr = [g, g, g, g, h]; + //assertEq(arr.length > 9, true); + for (var i = 0; i < 5; i++) { + obj.m = arr[i]; + obj.m(); + } + return x; +} +assertEq(testRebranding2(), "ok"); diff --git a/js/src/jit-test/tests/basic/testRegExpTest.js b/js/src/jit-test/tests/basic/testRegExpTest.js new file mode 100644 index 0000000000..d7121b9871 --- /dev/null +++ b/js/src/jit-test/tests/basic/testRegExpTest.js @@ -0,0 +1,10 @@ +// |jit-test| valgrind + +function testRegExpTest() { + var r = /abc/; + var flag = false; + for (var i = 0; i < 10; ++i) + flag = r.test("abc"); + return flag; +} +assertEq(testRegExpTest(), true); diff --git a/js/src/jit-test/tests/basic/testRegexpGet.js b/js/src/jit-test/tests/basic/testRegexpGet.js new file mode 100644 index 0000000000..c8900098fb --- /dev/null +++ b/js/src/jit-test/tests/basic/testRegexpGet.js @@ -0,0 +1,8 @@ +function testRegexpGet() { + var re = /hi/; + var a = []; + for (let i = 0; i < 5; ++i) + a.push(re.source); + return a.toString(); +} +assertEq(testRegexpGet(), "hi,hi,hi,hi,hi"); diff --git a/js/src/jit-test/tests/basic/testReplace2.js b/js/src/jit-test/tests/basic/testReplace2.js new file mode 100644 index 0000000000..20685adf2a --- /dev/null +++ b/js/src/jit-test/tests/basic/testReplace2.js @@ -0,0 +1,7 @@ +function testReplace2() { + var s = "H e l l o", s1; + for (i = 0; i < 100; ++i) + s1 = s.replace(" ", ""); + return s1; +} +assertEq(testReplace2(), "He l l o"); diff --git a/js/src/jit-test/tests/basic/testReplaceMap.js b/js/src/jit-test/tests/basic/testReplaceMap.js new file mode 100644 index 0000000000..929f52ce8e --- /dev/null +++ b/js/src/jit-test/tests/basic/testReplaceMap.js @@ -0,0 +1,27 @@ + +// String.replace on functions returning hashmap elements. + +function first() { + var arr = {a: "hello", b: "there"}; + var s = 'a|b'; + return s.replace(/[a-z]/g, function(a) { return arr[a]; }, 'g'); +} +assertEq(first(), "hello|there"); + +function second() { + var arr = {a: "hello", c: "there"}; + var s = 'a|b|c'; + return s.replace(/[a-z]/g, function(a) { return arr[a]; }, 'g'); +} +assertEq(second(), "hello|undefined|there"); + +Object.defineProperty(Object.prototype, "b", {get: function() { return "what"; }}); + +assertEq(second(), "hello|what|there"); + +function third() { + var arr = {a: "hello", b: {toString: function() { arr = {}; return "three"; }}, c: "there"}; + var s = 'a|b|c'; + return s.replace(/[a-z]/g, function(a) { return arr[a]; }, 'g'); +} +assertEq(third(), "hello|three|undefined"); diff --git a/js/src/jit-test/tests/basic/testReplaceWithLambda.js b/js/src/jit-test/tests/basic/testReplaceWithLambda.js new file mode 100644 index 0000000000..9aad5ef98b --- /dev/null +++ b/js/src/jit-test/tests/basic/testReplaceWithLambda.js @@ -0,0 +1,52 @@ +// optimized +(function(b) { + assertEq("abc".replace(/a|b/g, function(a) { return b[a] }), 'ABc'); +})({a:'A', b:'B' }); +(function() { + var b = {a:'A', b:'B' }; + assertEq("abc".replace(/a|b/g, function(a) { return b[a] }), 'ABc'); +})(); +(function() { + { + let b = {a:'A', b:'B' }; + assertEq("abc".replace(/a|b/g, function(a) { return b[a] }), 'ABc'); + } +})(); +(function() { + var b = {a:'A', b:'B' }; + (function () { + assertEq("abc".replace(/a|b/g, function(a) { return b[a] }), 'ABc'); + })(); +})(); +(function() { + { + let b = {a:'A', b:'B' }; + (function () { + assertEq("abc".replace(/a|b/g, function(a) { return b[a] }), 'ABc'); + })(); + } +})(); +(function() { + var b = {a:'A', b:'B' }; + (function () { + (function () { + assertEq("abc".replace(/a|b/g, function(a) { return b[a] }), 'ABc'); + })(); + })(); +})(); + +// not optimized: +(function() { + var b = {a:'A', b:'B' }; + with ({}) { + (function () { + assertEq("abc".replace(/a|b/g, function(a) { return b[a] }), 'ABc'); + })(); + } +})(); +(function() { + var b = {a:'A', b:'B' }; + var bad = function() { b = {a:1, b:2}; return 'X' } + Object.defineProperty(b, 'x', {get:bad}); + assertEq("xabc".replace(/x|a|b/g, function(a) { return b[a] }), 'X12c'); +})(); diff --git a/js/src/jit-test/tests/basic/testResumeOp.js b/js/src/jit-test/tests/basic/testResumeOp.js new file mode 100644 index 0000000000..2acb18f562 --- /dev/null +++ b/js/src/jit-test/tests/basic/testResumeOp.js @@ -0,0 +1,8 @@ +function testResumeOp() { + var a = [1,"2",3,"4",5,"6",7,"8",9,"10",11,"12",13,"14",15,"16"]; + var x = ""; + while (a.length > 0) + x += a.pop(); + return x; +} +assertEq(testResumeOp(), "16151413121110987654321"); diff --git a/js/src/jit-test/tests/basic/testReverseArgTypes.js b/js/src/jit-test/tests/basic/testReverseArgTypes.js new file mode 100644 index 0000000000..f36fed348f --- /dev/null +++ b/js/src/jit-test/tests/basic/testReverseArgTypes.js @@ -0,0 +1,5 @@ +function testReverseArgTypes() { + for (var j = 0; j < 4; ++j) ''.replace('', /x/); + return 1; +} +assertEq(testReverseArgTypes(), 1); diff --git a/js/src/jit-test/tests/basic/testRopeMarking.js b/js/src/jit-test/tests/basic/testRopeMarking.js new file mode 100644 index 0000000000..fcf5311416 --- /dev/null +++ b/js/src/jit-test/tests/basic/testRopeMarking.js @@ -0,0 +1,13 @@ +for (var i = 0; i < 10; ++i) { + var arr = []; + var s = "abcdefghijklmnop"; + for (var j = 0; j < 5000; ++j) { + s = "<" + s + ">"; + arr.push(s); + } + gc(); + for (var j = 0; j < 5000; ++j) { + arr[j].search("a"); + } + gc(); +} diff --git a/js/src/jit-test/tests/basic/testScriptGetter_JSOP_CALLPROP-2.js b/js/src/jit-test/tests/basic/testScriptGetter_JSOP_CALLPROP-2.js new file mode 100644 index 0000000000..f9899b1926 --- /dev/null +++ b/js/src/jit-test/tests/basic/testScriptGetter_JSOP_CALLPROP-2.js @@ -0,0 +1,13 @@ +// Test that the tracer is not confused by a.m() when a is the same shape each +// time through the loop but a.m is a scripted getter that returns different +// functions. + +function f() { return 'f'; } +function g() { return 'g'; } +var arr = [f, f, f, f, f, f, f, f, g]; +var a = {get m() { return arr[i]; }}; + +var s = ''; +for (var i = 0; i < 9; i++) + s += a.m(); +assertEq(s, 'ffffffffg'); diff --git a/js/src/jit-test/tests/basic/testScriptGetter_JSOP_CALLPROP.js b/js/src/jit-test/tests/basic/testScriptGetter_JSOP_CALLPROP.js new file mode 100644 index 0000000000..d16895e15d --- /dev/null +++ b/js/src/jit-test/tests/basic/testScriptGetter_JSOP_CALLPROP.js @@ -0,0 +1,9 @@ +var a = {_val: 'q', + get p() { return f; }}; + +function f() { return this._val; } + +var g = ''; +for (var i = 0; i < 9; i++) + g += a.p(); +assertEq(g, 'qqqqqqqqq'); diff --git a/js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETARGPROP.js b/js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETARGPROP.js new file mode 100644 index 0000000000..3a865edcf5 --- /dev/null +++ b/js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETARGPROP.js @@ -0,0 +1,7 @@ +function test(a) { + var s = ''; + for (var i = 0; i < 9; i++) + s += a.p; + assertEq(s, 'qqqqqqqqq'); +} +test({get p() { return 'q'; }}); diff --git a/js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETLOCALPROP.js b/js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETLOCALPROP.js new file mode 100644 index 0000000000..1add26e6eb --- /dev/null +++ b/js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETLOCALPROP.js @@ -0,0 +1,8 @@ +function test() { + var a = {get p() { return 'q'; }}; + var s = ''; + for (var i = 0; i < 9; i++) + s += a.p; + assertEq(s, 'qqqqqqqqq'); +} +test(); diff --git a/js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETPROP.js b/js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETPROP.js new file mode 100644 index 0000000000..963c506c48 --- /dev/null +++ b/js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETPROP.js @@ -0,0 +1,8 @@ +var a = {get p() { return 11; }}; + +function f() { return a; } + +var g = 0; +for (var i = 0; i < 9; i++) + g += f().p; +assertEq(g, 99); diff --git a/js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETTHISPROP.js b/js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETTHISPROP.js new file mode 100644 index 0000000000..b878a78efb --- /dev/null +++ b/js/src/jit-test/tests/basic/testScriptGetter_JSOP_GETTHISPROP.js @@ -0,0 +1,9 @@ +var a = { + get p() { return 11; }, + test: function () { + var s = 0; + for (var i = 0; i < 9; i++) + s += this.p; + assertEq(s, 99); + }}; +a.test(); diff --git a/js/src/jit-test/tests/basic/testSetGetterOnlyProperty.js b/js/src/jit-test/tests/basic/testSetGetterOnlyProperty.js new file mode 100644 index 0000000000..d08ea7a56b --- /dev/null +++ b/js/src/jit-test/tests/basic/testSetGetterOnlyProperty.js @@ -0,0 +1,5 @@ +var o = { get x() { return 17; } }; +for (var j = 0; j < 5; ++j) + o.x = 42; + +assertEq(true, true); diff --git a/js/src/jit-test/tests/basic/testSetPropNeitherMissNorHit.js b/js/src/jit-test/tests/basic/testSetPropNeitherMissNorHit.js new file mode 100644 index 0000000000..906a2c1473 --- /dev/null +++ b/js/src/jit-test/tests/basic/testSetPropNeitherMissNorHit.js @@ -0,0 +1,5 @@ +function testSetPropNeitherMissNorHit() { + for (var j = 0; j < 5; ++j) { if (({}).__proto__ = 1) { } } + return "ok"; +} +assertEq(testSetPropNeitherMissNorHit(), "ok"); diff --git a/js/src/jit-test/tests/basic/testSetPropertyFail.js b/js/src/jit-test/tests/basic/testSetPropertyFail.js new file mode 100644 index 0000000000..0ca6257609 --- /dev/null +++ b/js/src/jit-test/tests/basic/testSetPropertyFail.js @@ -0,0 +1,22 @@ +function test(name, fn, val) { + gc(); + var ok = {}, bad = {}; + bad.__defineSetter__(name, fn); + var arr = [ok, ok, ok, ok, ok, bad]; + + var log = ''; + try { + for (var i = 0; i < arr.length; i++) { + arr[i][name] = val; + log += '.'; + } + } catch (exc) { + log += 'E'; + } + assertEq(log, '.....E'); +} + +test("x", Function.prototype.call, null); // TypeError: Function.prototype.call called on incompatible [object Object] +test("y", Array, 0.1); // RangeError: invalid array length +test(1, Function.prototype.call, null); // TypeError: Function.prototype.call called on incompatible [object Object] +test(1, Array, 0.1); // RangeError: invalid array length diff --git a/js/src/jit-test/tests/basic/testSetProtoRegeneratesObjectShape.js b/js/src/jit-test/tests/basic/testSetProtoRegeneratesObjectShape.js new file mode 100644 index 0000000000..1c6e0da3cc --- /dev/null +++ b/js/src/jit-test/tests/basic/testSetProtoRegeneratesObjectShape.js @@ -0,0 +1,24 @@ +function testSetProtoRegeneratesObjectShape() +{ + var f = function() {}; + var g = function() {}; + g.prototype.__proto__ = {}; + + function iq(obj) + { + for (var i = 0; i < 10; ++i) + "" + obj.prototype; + } + + iq(f); + iq(f); + iq(f); + iq(f); + iq(g); + + if (shapeOf(f.prototype) === shapeOf(g.prototype)) + return "object shapes same after proto of one is changed"; + + return true; +} +assertEq(testSetProtoRegeneratesObjectShape(), true); diff --git a/js/src/jit-test/tests/basic/testSetelemWithFloatIndex.js b/js/src/jit-test/tests/basic/testSetelemWithFloatIndex.js new file mode 100644 index 0000000000..20ec897586 --- /dev/null +++ b/js/src/jit-test/tests/basic/testSetelemWithFloatIndex.js @@ -0,0 +1,4 @@ +var x, a = {}; +for (var i = 0; i < 9; i++) + x = a[-3.5] = "ok"; +assertEq(x, "ok"); diff --git a/js/src/jit-test/tests/basic/testShiftLeft.js b/js/src/jit-test/tests/basic/testShiftLeft.js new file mode 100644 index 0000000000..341b59aa52 --- /dev/null +++ b/js/src/jit-test/tests/basic/testShiftLeft.js @@ -0,0 +1,36 @@ +// |jit-test| valgrind + +/* Test the proper operation of the left shift operator. This is especially + * important on ARM as an explicit mask is required at the native instruction + * level. */ + +function testShiftLeft() +{ + var r = []; + var i = 0; + var j = 0; + + var shifts = [0,1,7,8,15,16,23,24,31]; + + /* Samples from the simple shift range. */ + for (i = 0; i < shifts.length; i++) + r[j++] = 1 << shifts[i]; + + /* Samples outside the normal shift range. */ + for (i = 0; i < shifts.length; i++) + r[j++] = 1 << (shifts[i] + 32); + + /* Samples far outside the normal shift range. */ + for (i = 0; i < shifts.length; i++) + r[j++] = 1 << (shifts[i] + 224); + for (i = 0; i < shifts.length; i++) + r[j++] = 1 << (shifts[i] + 256); + + return r.join(","); +} + +assertEq(testShiftLeft(), + "1,2,128,256,32768,65536,8388608,16777216,-2147483648,"+ + "1,2,128,256,32768,65536,8388608,16777216,-2147483648,"+ + "1,2,128,256,32768,65536,8388608,16777216,-2147483648,"+ + "1,2,128,256,32768,65536,8388608,16777216,-2147483648"); diff --git a/js/src/jit-test/tests/basic/testShiftRightArithmetic.js b/js/src/jit-test/tests/basic/testShiftRightArithmetic.js new file mode 100644 index 0000000000..6ecdcc4a90 --- /dev/null +++ b/js/src/jit-test/tests/basic/testShiftRightArithmetic.js @@ -0,0 +1,42 @@ +/* Test the proper operation of the arithmetic right shift operator. This is + * especially important on ARM as an explicit mask is required at the native + * instruction level. */ + +/* Test different combinations of literals/variables. */ +var s = 4; +var t = 100; +assertEq(42 >> s, 2); +assertEq(s >> 1, 2); +assertEq(23 >> 3, 2); +assertEq(t >> s, 6); + + +function testShiftRightArithmetic() +{ + var r = []; + var i = 0; + var j = 0; + + var shifts = [0,1,7,8,15,16,23,24,31]; + + /* Samples from the simple shift range. */ + for (i = 0; i < shifts.length; i++) + r[j++] = -2147483648 >> shifts[i]; + + /* Samples outside the normal shift range. */ + for (i = 0; i < shifts.length; i++) + r[j++] = -2147483648 >> (shifts[i] + 32); + + /* Samples far outside the normal shift range. */ + for (i = 0; i < shifts.length; i++) + r[j++] = -2147483648 >> (shifts[i] + 224); + for (i = 0; i < shifts.length; i++) + r[j++] = -2147483648 >> (shifts[i] + 256); + + return r.join(","); +} +assertEq(testShiftRightArithmetic(), + "-2147483648,-1073741824,-16777216,-8388608,-65536,-32768,-256,-128,-1,"+ + "-2147483648,-1073741824,-16777216,-8388608,-65536,-32768,-256,-128,-1,"+ + "-2147483648,-1073741824,-16777216,-8388608,-65536,-32768,-256,-128,-1,"+ + "-2147483648,-1073741824,-16777216,-8388608,-65536,-32768,-256,-128,-1"); diff --git a/js/src/jit-test/tests/basic/testShiftRightLogical.js b/js/src/jit-test/tests/basic/testShiftRightLogical.js new file mode 100644 index 0000000000..72bc56d54e --- /dev/null +++ b/js/src/jit-test/tests/basic/testShiftRightLogical.js @@ -0,0 +1,36 @@ +/* Test the proper operation of the logical right shift operator. This is + * especially important on ARM as an explicit mask is required at the native + * instruction level. */ + +function testShiftRightLogical() +{ + var r = []; + var i = 0; + var j = 0; + + var shifts = [0,1,7,8,15,16,23,24,31]; + + /* Samples from the simple shift range. */ + for (i = 0; i < shifts.length; i++) + r[j++] = -2147483648 >>> shifts[i]; + + /* Samples outside the normal shift range. */ + for (i = 0; i < shifts.length; i++) + r[j++] = -2147483648 >>> (shifts[i] + 32); + + /* Samples far outside the normal shift range. */ + for (i = 0; i < shifts.length; i++) + r[j++] = -2147483648 >>> (shifts[i] + 224); + for (i = 0; i < shifts.length; i++) + r[j++] = -2147483648 >>> (shifts[i] + 256); + + return r.join(","); +} +/* Note: Arguments to the ">>>" operator are converted to unsigned 32-bit + * integers during evaluation. As a result, -2147483648 >>> 0 evaluates to the + * unsigned interpretation of the same value, which is 2147483648. */ +assertEq(testShiftRightLogical(), + "2147483648,1073741824,16777216,8388608,65536,32768,256,128,1,"+ + "2147483648,1073741824,16777216,8388608,65536,32768,256,128,1,"+ + "2147483648,1073741824,16777216,8388608,65536,32768,256,128,1,"+ + "2147483648,1073741824,16777216,8388608,65536,32768,256,128,1"); diff --git a/js/src/jit-test/tests/basic/testSlowArrayLength.js b/js/src/jit-test/tests/basic/testSlowArrayLength.js new file mode 100644 index 0000000000..f19ec4bfad --- /dev/null +++ b/js/src/jit-test/tests/basic/testSlowArrayLength.js @@ -0,0 +1,10 @@ +function testSlowArrayLength() +{ + var counter = 0; + var a = []; + a[10000 - 1] = 0; + for (var i = 0; i < a.length; i++) + counter++; + return counter; +} +assertEq(testSlowArrayLength(), 10000); diff --git a/js/src/jit-test/tests/basic/testSlowArrayPop.js b/js/src/jit-test/tests/basic/testSlowArrayPop.js new file mode 100644 index 0000000000..f3602aa091 --- /dev/null +++ b/js/src/jit-test/tests/basic/testSlowArrayPop.js @@ -0,0 +1,12 @@ +function testSlowArrayPop() { + var a = []; + for (var i = 0; i < 9; i++) + a[i] = [0]; + a[8].__defineGetter__("0", function () { return 'xyzzy'; }); + + var last; + for (var i = 0; i < 9; i++) + last = a[i].pop(); // reenters interpreter in getter + return last; +} +assertEq(testSlowArrayPop(), 'xyzzy'); diff --git a/js/src/jit-test/tests/basic/testSlowArrayPopMultiFrame.js b/js/src/jit-test/tests/basic/testSlowArrayPopMultiFrame.js new file mode 100644 index 0000000000..a1917ff64e --- /dev/null +++ b/js/src/jit-test/tests/basic/testSlowArrayPopMultiFrame.js @@ -0,0 +1,24 @@ +// Same thing but it needs to reconstruct multiple stack frames (so, +// multiple functions called inside the loop) +function testSlowArrayPopMultiFrame() { + var a = []; + for (var i = 0; i < 9; i++) + a[i] = [0]; + a[8].__defineGetter__("0", function () { return 23; }); + + function child(a, i) { + return a[i].pop(); // reenters interpreter in getter + } + function parent(a, i) { + return child(a, i); + } + function gramps(a, i) { + return parent(a, i); + } + + var last; + for (var i = 0; i < 9; i++) + last = gramps(a, i); + return last; +} +assertEq(testSlowArrayPopMultiFrame(), 23); diff --git a/js/src/jit-test/tests/basic/testSlowArrayPopNestedTrees.js b/js/src/jit-test/tests/basic/testSlowArrayPopNestedTrees.js new file mode 100644 index 0000000000..0ad4dbaaee --- /dev/null +++ b/js/src/jit-test/tests/basic/testSlowArrayPopNestedTrees.js @@ -0,0 +1,36 @@ +// Same thing but nested trees, each reconstructing one or more stack frames +// (so, several functions with loops, such that the loops end up being +// nested though they are not lexically nested) + +function testSlowArrayPopNestedTrees() { + var a = []; + for (var i = 0; i < 9; i++) + a[i] = [0]; + a[8].__defineGetter__("0", function () { return 3.14159 }); + + function child(a, i, j, k) { + var last = 2.71828; + for (var l = 0; l < 9; l++) + if (i == 8 && j == 8 && k == 8) + last = a[l].pop(); // reenters interpreter in getter + return last; + } + function parent(a, i, j) { + var last; + for (var k = 0; k < 9; k++) + last = child(a, i, j, k); + return last; + } + function gramps(a, i) { + var last; + for (var j = 0; j < 9; j++) + last = parent(a, i, j); + return last; + } + + var last; + for (var i = 0; i < 9; i++) + last = gramps(a, i); + return last; +} +assertEq(testSlowArrayPopNestedTrees(), 3.14159); diff --git a/js/src/jit-test/tests/basic/testSlowNativeBail.js b/js/src/jit-test/tests/basic/testSlowNativeBail.js new file mode 100644 index 0000000000..07def4543b --- /dev/null +++ b/js/src/jit-test/tests/basic/testSlowNativeBail.js @@ -0,0 +1,11 @@ +function testSlowNativeBail() { + var a = ['0', '1', '2', '3', '+']; + try { + for (var i = 0; i < a.length; i++) + new RegExp(a[i]); + assertEq(true, false); + } catch (exc) { + assertEq(exc instanceof SyntaxError, true); + } +} +testSlowNativeBail(); diff --git a/js/src/jit-test/tests/basic/testSlowNativeCtor.js b/js/src/jit-test/tests/basic/testSlowNativeCtor.js new file mode 100644 index 0000000000..345546a720 --- /dev/null +++ b/js/src/jit-test/tests/basic/testSlowNativeCtor.js @@ -0,0 +1,7 @@ +delete _quit; + +function testSlowNativeCtor() { + for (var i = 0; i < 4; i++) + new Date().valueOf(); +} +testSlowNativeCtor(); diff --git a/js/src/jit-test/tests/basic/testSlowNativeWithNullThis.js b/js/src/jit-test/tests/basic/testSlowNativeWithNullThis.js new file mode 100644 index 0000000000..b90b4f10d7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testSlowNativeWithNullThis.js @@ -0,0 +1,6 @@ +x = 0 +for (a = 0; a < 3; a++) { + new ((function () { + return Float64Array + })())(x, 1) +} diff --git a/js/src/jit-test/tests/basic/testStaticEvalScope.js b/js/src/jit-test/tests/basic/testStaticEvalScope.js new file mode 100644 index 0000000000..6850f3bf4c --- /dev/null +++ b/js/src/jit-test/tests/basic/testStaticEvalScope.js @@ -0,0 +1,3 @@ +// Test that static eval scopes don't mess with statement nested scope logic in +// the frontend. +eval("if (true) { { let y; } } else {}") diff --git a/js/src/jit-test/tests/basic/testStaticsInRegExp.js b/js/src/jit-test/tests/basic/testStaticsInRegExp.js new file mode 100644 index 0000000000..16d8698744 --- /dev/null +++ b/js/src/jit-test/tests/basic/testStaticsInRegExp.js @@ -0,0 +1,8 @@ +'abcdef'.replace(/a(\w+)c/, function() { + assertEq(RegExp.lastMatch, 'abc'); + '123456'.replace(/1(\d+)3/, function() { + assertEq(RegExp.lastMatch, '123'); + }); + assertEq(RegExp.lastMatch, '123'); +}); +assertEq(RegExp.lastMatch, '123'); diff --git a/js/src/jit-test/tests/basic/testStrict.js b/js/src/jit-test/tests/basic/testStrict.js new file mode 100644 index 0000000000..583a2b065d --- /dev/null +++ b/js/src/jit-test/tests/basic/testStrict.js @@ -0,0 +1,11 @@ +function testStrict() { + var n = 10, a = []; + for (var i = 0; i < 10; ++i) { + a[0] = (n === 10); + a[1] = (n !== 10); + a[2] = (n === null); + a[3] = (n == null); + } + return a.join(","); +} +assertEq(testStrict(), "true,false,false,false"); diff --git a/js/src/jit-test/tests/basic/testString.js b/js/src/jit-test/tests/basic/testString.js new file mode 100644 index 0000000000..cb7e1e5b3a --- /dev/null +++ b/js/src/jit-test/tests/basic/testString.js @@ -0,0 +1,14 @@ +function testString() { + var q; + for (var i = 0; i <= 9; ++i) { + q = []; + q.push(String(void 0)); + q.push(String(true)); + q.push(String(5)); + q.push(String(5.5)); + q.push(String("5")); + q.push(String([5])); + } + return q.join(","); +} +assertEq(testString(), "undefined,true,5,5.5,5,5"); diff --git a/js/src/jit-test/tests/basic/testStringBufferMallocAccounting.js b/js/src/jit-test/tests/basic/testStringBufferMallocAccounting.js new file mode 100644 index 0000000000..e016f3b6bc --- /dev/null +++ b/js/src/jit-test/tests/basic/testStringBufferMallocAccounting.js @@ -0,0 +1,18 @@ +// first build a big honkin' string +str = "a"; +for (var i = 0; i < 20; ++i) + str = str + str; +str.indexOf('a'); + +var f; +f = makeFinalizeObserver(); +assertEq(finalizeCount(), 0); + +// Create another observer to make sure that we overwrite all conservative +// roots for the previous one and can observer the GC. +f = makeFinalizeObserver(); + +// if the assert fails, add more iterations +for (var i = 0; i < 80; ++i) + str.replace(/(a)/, '$1'); +//assertEq(finalizeCount(), 1); diff --git a/js/src/jit-test/tests/basic/testStringConstructorWithExtraArg.js b/js/src/jit-test/tests/basic/testStringConstructorWithExtraArg.js new file mode 100644 index 0000000000..b4986c53f9 --- /dev/null +++ b/js/src/jit-test/tests/basic/testStringConstructorWithExtraArg.js @@ -0,0 +1,6 @@ +function testStringConstructorWithExtraArg() { + for (let i = 0; i < 5; ++i) + new String(new String(), 2); + return "ok"; +} +assertEq(testStringConstructorWithExtraArg(), "ok"); diff --git a/js/src/jit-test/tests/basic/testStringIncrement.js b/js/src/jit-test/tests/basic/testStringIncrement.js new file mode 100644 index 0000000000..b0cc6775ec --- /dev/null +++ b/js/src/jit-test/tests/basic/testStringIncrement.js @@ -0,0 +1,20 @@ +var a, b; + +function f(str) { + var n; + var k; + for (var i = 0; i < 18; ++i) { + n = str; + k = n++; + if (k) { } + } + return [k, n]; +} + +[a, b] = f("10"); +assertEq(a, 10); +assertEq(b, 11); + +[a, b] = f("5"); +assertEq(a, 5); +assertEq(b, 6); diff --git a/js/src/jit-test/tests/basic/testStringLengthNoTinyId.js b/js/src/jit-test/tests/basic/testStringLengthNoTinyId.js new file mode 100644 index 0000000000..e08f5a697a --- /dev/null +++ b/js/src/jit-test/tests/basic/testStringLengthNoTinyId.js @@ -0,0 +1,64 @@ +// Second testPropagatedFunArgs test -- this is a crash-test. +(function () { + var escapee; + + function testPropagatedFunArgs() + { + const magic = 42; + + var win = this; + var res = [], q = []; + function addEventListener(name, func, flag) { + q.push(func); + } + + var pageInfo = "pageInfo", obs; + addEventListener("load", handleLoad, true); + + var observer = { + observe: function(win, topic, data) { + // obs.removeObserver(observer, "page-info-dialog-loaded"); + handlePageInfo(); + } + }; + + function handleLoad() { + //pageInfo = { toString: function() { return "pageInfo"; } }; + obs = { addObserver: function (obs, topic, data) { obs.observe(win, topic, data); } }; + obs.addObserver(observer, "page-info-dialog-loaded", false); + } + + function handlePageInfo() { + res.push(pageInfo); + function $(aId) { + function notSafe() { + return magic; + } + notSafe(); + res.push(pageInfo); + }; + var feedTab = $("feedTab"); + } + + escapee = q[0]; + return res.join(','); + } + + testPropagatedFunArgs(); + + escapee(); +})(); + +function testStringLengthNoTinyId() +{ + var x = "unset"; + var t = new String(""); + for (var i = 0; i < 5; i++) + x = t["-1"]; + + var r = "t['-1'] is " + x; + t["-1"] = "foo"; + r += " when unset, '" + t["-1"] + "' when set"; + return r; +} +assertEq(testStringLengthNoTinyId(), "t['-1'] is undefined when unset, 'foo' when set"); diff --git a/js/src/jit-test/tests/basic/testStringObjectLength.js b/js/src/jit-test/tests/basic/testStringObjectLength.js new file mode 100644 index 0000000000..d908ff63a8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testStringObjectLength.js @@ -0,0 +1,7 @@ +function testStringObjectLength() { + var x = new String("foo"), y = 0; + for (var i = 0; i < 10; ++i) + y = x.length; + return y; +} +assertEq(testStringObjectLength(), 3); diff --git a/js/src/jit-test/tests/basic/testStringToInt32.js b/js/src/jit-test/tests/basic/testStringToInt32.js new file mode 100644 index 0000000000..ca1ca349fa --- /dev/null +++ b/js/src/jit-test/tests/basic/testStringToInt32.js @@ -0,0 +1,6 @@ +function testStringToInt32() { + var s = ""; + for (let j = 0; j < 5; ++j) s += ("1e+81" ^ 3); + return s; +} +assertEq(testStringToInt32(), "33333"); diff --git a/js/src/jit-test/tests/basic/testStringToNumber.js b/js/src/jit-test/tests/basic/testStringToNumber.js new file mode 100644 index 0000000000..7f7aa57266 --- /dev/null +++ b/js/src/jit-test/tests/basic/testStringToNumber.js @@ -0,0 +1,37 @@ +enableOsiPointRegisterChecks(); + +function convertToInt(str) { + return str | 0; +} + +function convertToIntOnTrace(str) { + var z; + for (var i = 0; i < 9; ++i) { + z = str | 0; + } + return z; +} + +function convertToDouble(str) { + return str * 1.5; +} + +function convertToDoubleOnTrace(str) { + var z; + for (var i = 0; i < 9; ++i) { + z = str * 1.5; + } + return z; +} + +assertEq(convertToInt("0x10"), 16); +assertEq(convertToInt("-0x10"), 0); + +assertEq(convertToIntOnTrace("0x10"), 16); +assertEq(convertToIntOnTrace("-0x10"), 0); + +assertEq(convertToDouble("0x10"), 24); +assertEq(convertToDouble("-0x10"), NaN); + +assertEq(convertToDoubleOnTrace("0x10"), 24); +assertEq(convertToDoubleOnTrace("-0x10"), NaN); diff --git a/js/src/jit-test/tests/basic/testStringify.js b/js/src/jit-test/tests/basic/testStringify.js new file mode 100644 index 0000000000..003e4fd38a --- /dev/null +++ b/js/src/jit-test/tests/basic/testStringify.js @@ -0,0 +1,20 @@ +function testStringify() { + var t = true, f = false, u = undefined, n = 5, d = 5.5, s = "x"; + var a = []; + for (var i = 0; i < 10; ++i) { + a[0] = "" + t; + a[1] = t + ""; + a[2] = "" + f; + a[3] = f + ""; + a[4] = "" + u; + a[5] = u + ""; + a[6] = "" + n; + a[7] = n + ""; + a[8] = "" + d; + a[9] = d + ""; + a[10] = "" + s; + a[11] = s + ""; + } + return a.join(","); +} +assertEq(testStringify(), "true,true,false,false,undefined,undefined,5,5,5.5,5.5,x,x"); diff --git a/js/src/jit-test/tests/basic/testSubstring.js b/js/src/jit-test/tests/basic/testSubstring.js new file mode 100644 index 0000000000..5916c23ab0 --- /dev/null +++ b/js/src/jit-test/tests/basic/testSubstring.js @@ -0,0 +1,7 @@ +function testSubstring() { + for (var i = 0; i < 5; ++i) { + actual = "".substring(5); + } + return actual; +} +assertEq(testSubstring(), ""); diff --git a/js/src/jit-test/tests/basic/testSwitch.js b/js/src/jit-test/tests/basic/testSwitch.js new file mode 100644 index 0000000000..c2127d4a6c --- /dev/null +++ b/js/src/jit-test/tests/basic/testSwitch.js @@ -0,0 +1,25 @@ +function testSwitch() { + var x = 0; + var ret = 0; + for (var i = 0; i < 100; ++i) { + switch (x) { + case 0: + ret += 1; + break; + case 1: + ret += 2; + break; + case 2: + ret += 3; + break; + case 3: + ret += 4; + break; + default: + x = 0; + } + x++; + } + return ret; +} +assertEq(testSwitch(), 226); diff --git a/js/src/jit-test/tests/basic/testSwitchString.js b/js/src/jit-test/tests/basic/testSwitchString.js new file mode 100644 index 0000000000..323763a3f2 --- /dev/null +++ b/js/src/jit-test/tests/basic/testSwitchString.js @@ -0,0 +1,28 @@ +function testSwitchString() { + var x = "asdf"; + var ret = 0; + for (var i = 0; i < 100; ++i) { + switch (x) { + case "asdf": + x = "asd"; + ret += 1; + break; + case "asd": + x = "as"; + ret += 2; + break; + case "as": + x = "a"; + ret += 3; + break; + case "a": + x = "foo"; + ret += 4; + break; + default: + x = "asdf"; + } + } + return ret; +} +assertEq(testSwitchString(), 200); diff --git a/js/src/jit-test/tests/basic/testSwitchUndefined.js b/js/src/jit-test/tests/basic/testSwitchUndefined.js new file mode 100644 index 0000000000..44d27ca38c --- /dev/null +++ b/js/src/jit-test/tests/basic/testSwitchUndefined.js @@ -0,0 +1,15 @@ +function testSwitchUndefined() +{ + var x = undefined; + var y = 0; + for (var i = 0; i < 5; i++) + { + switch (x) + { + default: + y++; + } + } + return y; +} +assertEq(testSwitchUndefined(), 5); diff --git a/js/src/jit-test/tests/basic/testTableSwitch1.js b/js/src/jit-test/tests/basic/testTableSwitch1.js new file mode 100644 index 0000000000..db212c0de8 --- /dev/null +++ b/js/src/jit-test/tests/basic/testTableSwitch1.js @@ -0,0 +1,13 @@ +function testTableSwitch1() { + var x = 'miss'; + var i, j = 0; + for (i = 0; i < 19; i++) { + switch (x) { + case 1: case 2: case 3: case 4: case 5: throw "FAIL"; + default: j++; + } + } + assertEq(i, j); +} + +testTableSwitch1(); diff --git a/js/src/jit-test/tests/basic/testTableSwitch2.js b/js/src/jit-test/tests/basic/testTableSwitch2.js new file mode 100644 index 0000000000..8953aa2eb2 --- /dev/null +++ b/js/src/jit-test/tests/basic/testTableSwitch2.js @@ -0,0 +1,18 @@ +function testTableSwitch2() { + var arr = [2, 2, 2, 2, 2, 5, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5]; + var s = ''; + for (var i = 0; i < arr.length; i++) { + switch (arr[i]) { + case 0: case 1: case 3: case 4: + throw "FAIL"; + case 2: + s += '2'; + break; + case 5: + s += '5'; + } + } + assertEq(s, arr.join("")); +} + +testTableSwitch2(); diff --git a/js/src/jit-test/tests/basic/testThinLoopDemote.js b/js/src/jit-test/tests/basic/testThinLoopDemote.js new file mode 100644 index 0000000000..b26c460a78 --- /dev/null +++ b/js/src/jit-test/tests/basic/testThinLoopDemote.js @@ -0,0 +1,13 @@ +function testThinLoopDemote() { + function f() + { + var k = 1; + for (var n = 0; n < 4; n++) { + k = (k * 10); + } + return k; + } + f(); + return f(); +} +assertEq(testThinLoopDemote(), 10000); diff --git a/js/src/jit-test/tests/basic/testThrowWhileWrappingException.js b/js/src/jit-test/tests/basic/testThrowWhileWrappingException.js new file mode 100644 index 0000000000..51169339ab --- /dev/null +++ b/js/src/jit-test/tests/basic/testThrowWhileWrappingException.js @@ -0,0 +1,7 @@ +var caught = false; +try { + evalcx("eval(\"throw\")", Function.a) +} catch (e) { + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/basic/testThrowingObjectEqUndefined.js b/js/src/jit-test/tests/basic/testThrowingObjectEqUndefined.js new file mode 100644 index 0000000000..5104c52ee7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testThrowingObjectEqUndefined.js @@ -0,0 +1,15 @@ +function testThrowingObjectEqUndefined() +{ + try + { + var obj = { toString: function() { throw 0; } }; + for (var i = 0; i < 5; i++) + "" + (obj == undefined); + return i === 5; + } + catch (e) + { + return "" + e; + } +} +assertEq(testThrowingObjectEqUndefined(), true); diff --git a/js/src/jit-test/tests/basic/testToLocaleString.js b/js/src/jit-test/tests/basic/testToLocaleString.js new file mode 100644 index 0000000000..158e08b462 --- /dev/null +++ b/js/src/jit-test/tests/basic/testToLocaleString.js @@ -0,0 +1,2 @@ +var str = (3.14).toLocaleString(); +assertEq(str[str.length-1], "4"); \ No newline at end of file diff --git a/js/src/jit-test/tests/basic/testToStringBeforeValueOf.js b/js/src/jit-test/tests/basic/testToStringBeforeValueOf.js new file mode 100644 index 0000000000..b3550371ee --- /dev/null +++ b/js/src/jit-test/tests/basic/testToStringBeforeValueOf.js @@ -0,0 +1,9 @@ +function testToStringBeforeValueOf() +{ + var o = {toString: function() { return "s"; }, valueOf: function() { return "v"; } }; + var a = []; + for (var i = 0; i < 10; i++) + a.push(String(o)); + return a.join(","); +} +assertEq(testToStringBeforeValueOf(), "s,s,s,s,s,s,s,s,s,s"); diff --git a/js/src/jit-test/tests/basic/testToUpperToLower.js b/js/src/jit-test/tests/basic/testToUpperToLower.js new file mode 100644 index 0000000000..4bd78f3530 --- /dev/null +++ b/js/src/jit-test/tests/basic/testToUpperToLower.js @@ -0,0 +1,9 @@ +function testToUpperToLower() { + var s = "Hello", s1, s2; + for (i = 0; i < 100; ++i) { + s1 = s.toLowerCase(); + s2 = s.toUpperCase(); + } + return s1 + s2; +} +assertEq(testToUpperToLower(), "helloHELLO"); diff --git a/js/src/jit-test/tests/basic/testTruncatedMod.js b/js/src/jit-test/tests/basic/testTruncatedMod.js new file mode 100644 index 0000000000..61789417cd --- /dev/null +++ b/js/src/jit-test/tests/basic/testTruncatedMod.js @@ -0,0 +1,18 @@ +var f = function(i,j) { return i%j|0 }; +assertEq(f(10, 0), 0); +var f = function(i,j) { return i%j|0 }; +assertEq(f(0, 0), 0); +var f = function(i,j) { return i%j|0 }; +assertEq(f(-Math.pow(2,31), -1), 0); +var f = function(i,j) { return i%j|0 }; +assertEq(f(-4, 4), 0); + +var f = function(i) { return i%4|0 }; +assertEq(f(-4), 0); +var f = function(i) { return i%4|0 }; +assertEq(f(0), 0); + +var f = function(i) { return i%3|0 }; +assertEq(f(-3), 0); +var f = function(i) { return i%3|0 }; +assertEq(f(0), 0); diff --git a/js/src/jit-test/tests/basic/testTypeUnstableForIn.js b/js/src/jit-test/tests/basic/testTypeUnstableForIn.js new file mode 100644 index 0000000000..0f6b10be40 --- /dev/null +++ b/js/src/jit-test/tests/basic/testTypeUnstableForIn.js @@ -0,0 +1,10 @@ +function testTypeUnstableForIn() { + var a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]; + var x = 0; + for (var i in a) { + i = parseInt(i); + x++; + } + return x; +} +assertEq(testTypeUnstableForIn(), 16); diff --git a/js/src/jit-test/tests/basic/testTypedArrayByteRegs.js b/js/src/jit-test/tests/basic/testTypedArrayByteRegs.js new file mode 100644 index 0000000000..09c6d320ba --- /dev/null +++ b/js/src/jit-test/tests/basic/testTypedArrayByteRegs.js @@ -0,0 +1,30 @@ +// Uint8Array and Int8Array need single byte registers. +// Test for id and value having the same backing. +function f() { + var x = new Uint8Array(30); + for (var i=0; i undefined; + x[6] = t <= undefined; + x[7] = t >= undefined; + x[8] = f == undefined; + x[9] = f != undefined; + x[10] = f === undefined; + x[11] = f !== undefined; + x[12] = f < undefined; + x[13] = f > undefined; + x[14] = f <= undefined; + x[15] = f >= undefined; + } + return x.join(","); +} +assertEq(testUndefinedBooleanCmp(), "false,true,false,true,false,false,false,false,false,true,false,true,false,false,false,false"); diff --git a/js/src/jit-test/tests/basic/testUndefinedCmp.js b/js/src/jit-test/tests/basic/testUndefinedCmp.js new file mode 100644 index 0000000000..48a0dd5a10 --- /dev/null +++ b/js/src/jit-test/tests/basic/testUndefinedCmp.js @@ -0,0 +1,6 @@ +function testUndefinedCmp() { + var a = false; + for (var j = 0; j < 4; ++j) { if (undefined < false) { a = true; } } + return a; +} +assertEq(testUndefinedCmp(), false); diff --git a/js/src/jit-test/tests/basic/testUndefinedIncrement.js b/js/src/jit-test/tests/basic/testUndefinedIncrement.js new file mode 100644 index 0000000000..a42557b3b7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testUndefinedIncrement.js @@ -0,0 +1,15 @@ +function f() { + var n; + var k; + for (var i = 0; i < 18; ++i) { + n = undefined; + k = n++; + if (k) { } + } + return [k, n]; +} + +var [a, b] = f(); + +assertEq(isNaN(a), true); +assertEq(isNaN(b), true); diff --git a/js/src/jit-test/tests/basic/testUndefinedPropertyAccess.js b/js/src/jit-test/tests/basic/testUndefinedPropertyAccess.js new file mode 100644 index 0000000000..3828f326c5 --- /dev/null +++ b/js/src/jit-test/tests/basic/testUndefinedPropertyAccess.js @@ -0,0 +1,12 @@ +function testUndefinedPropertyAccess() { + var x = [1,2,3]; + var y = {}; + var a = { foo: 1 }; + y.__proto__ = x; + var z = [x, x, x, y, y, y, y, a, a, a]; + var s = ""; + for (var i = 0; i < z.length; ++i) + s += z[i].foo; + return s; +} +assertEq(testUndefinedPropertyAccess(), "undefinedundefinedundefinedundefinedundefinedundefinedundefined111"); diff --git a/js/src/jit-test/tests/basic/testUndemotableBinaryOp.js b/js/src/jit-test/tests/basic/testUndemotableBinaryOp.js new file mode 100644 index 0000000000..6fd79cda0e --- /dev/null +++ b/js/src/jit-test/tests/basic/testUndemotableBinaryOp.js @@ -0,0 +1,6 @@ +function testUndemotableBinaryOp() { + var out = []; + for (let j = 0; j < 5; ++j) { out.push(6 - ((void 0) ^ 0x80000005)); } + return out.join(","); +} +assertEq(testUndemotableBinaryOp(), "2147483649,2147483649,2147483649,2147483649,2147483649"); diff --git a/js/src/jit-test/tests/basic/testWeirdDateParse.js b/js/src/jit-test/tests/basic/testWeirdDateParse.js new file mode 100644 index 0000000000..77fdd33bf2 --- /dev/null +++ b/js/src/jit-test/tests/basic/testWeirdDateParse.js @@ -0,0 +1,38 @@ +var global = this; +function testWeirdDateParseOuter() +{ + var vDateParts = ["11", "17", "2008"]; + var out = []; + for (var vI = 0; vI < vDateParts.length; vI++) + out.push(testWeirdDateParseInner(vDateParts[vI])); + /* Mutate the global shape so we fall off trace; this causes + * additional oddity */ + global.x = Math.random(); + return out; +} +function testWeirdDateParseInner(pVal) +{ + var vR = 0; + for (var vI = 0; vI < pVal.length; vI++) { + var vC = pVal.charAt(vI); + if ((vC >= '0') && (vC <= '9')) + vR = (vR * 10) + parseInt(vC); + } + return vR; +} +function testWeirdDateParse() { + var result = []; + result.push(testWeirdDateParseInner("11")); + result.push(testWeirdDateParseInner("17")); + result.push(testWeirdDateParseInner("2008")); + result.push(testWeirdDateParseInner("11")); + result.push(testWeirdDateParseInner("17")); + result.push(testWeirdDateParseInner("2008")); + result = result.concat(testWeirdDateParseOuter()); + result = result.concat(testWeirdDateParseOuter()); + result.push(testWeirdDateParseInner("11")); + result.push(testWeirdDateParseInner("17")); + result.push(testWeirdDateParseInner("2008")); + return result.join(","); +} +assertEq(testWeirdDateParse(), "11,17,2008,11,17,2008,11,17,2008,11,17,2008,11,17,2008"); diff --git a/js/src/jit-test/tests/basic/testWeirdGetterInvocation.js b/js/src/jit-test/tests/basic/testWeirdGetterInvocation.js new file mode 100644 index 0000000000..f272f3df97 --- /dev/null +++ b/js/src/jit-test/tests/basic/testWeirdGetterInvocation.js @@ -0,0 +1,6 @@ +function getArgs() { return arguments; } +var a1 = getArgs(1); +var a2 = getArgs(1); +a1.__proto__ = a2; +delete a1[0]; +a1[0]; diff --git a/js/src/jit-test/tests/basic/testWeirdThingsInFunctionConstructor.js b/js/src/jit-test/tests/basic/testWeirdThingsInFunctionConstructor.js new file mode 100644 index 0000000000..f262f22020 --- /dev/null +++ b/js/src/jit-test/tests/basic/testWeirdThingsInFunctionConstructor.js @@ -0,0 +1,6 @@ +var f = new Function('x', 'var f = 3; if (x) function f() {}; return f'); +assertEq(f(false), 3); +assertEq(typeof f(true), "function"); + +var f = new Function('x', '"use strict"; x = 3; return arguments[0]'); +assertEq(f(42), 42); diff --git a/js/src/jit-test/tests/basic/testWhileObjectOrNull.js b/js/src/jit-test/tests/basic/testWhileObjectOrNull.js new file mode 100644 index 0000000000..51316ae8ec --- /dev/null +++ b/js/src/jit-test/tests/basic/testWhileObjectOrNull.js @@ -0,0 +1,18 @@ +function testWhileObjectOrNull() +{ + try + { + for (var i = 0; i < 3; i++) + { + var o = { p: { p: null } }; + while (o.p) + o = o.p; + } + return "pass"; + } + catch (e) + { + return "threw exception: " + e; + } +} +assertEq(testWhileObjectOrNull(), "pass"); diff --git a/js/src/jit-test/tests/basic/testWhileWithContinue.js b/js/src/jit-test/tests/basic/testWhileWithContinue.js new file mode 100644 index 0000000000..823fdd9da4 --- /dev/null +++ b/js/src/jit-test/tests/basic/testWhileWithContinue.js @@ -0,0 +1,10 @@ +// Test using 'while' with 'continue' -- the most ancient, the most powerful, +// the most rare of all coding incantations. + +var i = 0; +while (i < 12) { + ++i; + continue; +} +assertEq(i, 12); + diff --git a/js/src/jit-test/tests/basic/testWith.js b/js/src/jit-test/tests/basic/testWith.js new file mode 100644 index 0000000000..ec1a42a847 --- /dev/null +++ b/js/src/jit-test/tests/basic/testWith.js @@ -0,0 +1,8 @@ + +// basic 'with' functionality + +var o = {foo: true}; +with(o) { + foo = 10; +} +assertEq(o.foo, 10); diff --git a/js/src/jit-test/tests/basic/testWithAndShadowing.js b/js/src/jit-test/tests/basic/testWithAndShadowing.js new file mode 100644 index 0000000000..07922c8993 --- /dev/null +++ b/js/src/jit-test/tests/basic/testWithAndShadowing.js @@ -0,0 +1,14 @@ +// see bug 470795 +var o = [{},{},{i:42}] +var i; +var s = []; +for (var j = 0; j < 3; ++j) { + with (o[j]) { + for (i = 0; i < 2; ++i) { + s.push(j); + s.push(i); + } + } +} +assertEq(s.join(), '0,0,0,1,1,0,1,1,2,0,2,1'); + diff --git a/js/src/jit-test/tests/basic/test_JSOP_ARGCNT.js b/js/src/jit-test/tests/basic/test_JSOP_ARGCNT.js new file mode 100644 index 0000000000..6e558a07fe --- /dev/null +++ b/js/src/jit-test/tests/basic/test_JSOP_ARGCNT.js @@ -0,0 +1,27 @@ +function test_JSOP_ARGCNT() { + function f0() { return arguments.length; } + function f1() { return arguments.length; } + function f2() { return arguments.length; } + function f3() { return arguments.length; } + function f4() { return arguments.length; } + function f5() { return arguments.length; } + function f6() { return arguments.length; } + function f7() { return arguments.length; } + function f8() { return arguments.length; } + function f9() { return arguments.length; } + var a = []; + for (var i = 0; i < 10; i++) { + a[0] = f0('a'); + a[1] = f1('a','b'); + a[2] = f2('a','b','c'); + a[3] = f3('a','b','c','d'); + a[4] = f4('a','b','c','d','e'); + a[5] = f5('a','b','c','d','e','f'); + a[6] = f6('a','b','c','d','e','f','g'); + a[7] = f7('a','b','c','d','e','f','g','h'); + a[8] = f8('a','b','c','d','e','f','g','h','i'); + a[9] = f9('a','b','c','d','e','f','g','h','i','j'); + } + return a.join(","); +} +assertEq(test_JSOP_ARGCNT(), "1,2,3,4,5,6,7,8,9,10"); diff --git a/js/src/jit-test/tests/basic/test_JSOP_ARGSUB.js b/js/src/jit-test/tests/basic/test_JSOP_ARGSUB.js new file mode 100644 index 0000000000..1a4d27cda9 --- /dev/null +++ b/js/src/jit-test/tests/basic/test_JSOP_ARGSUB.js @@ -0,0 +1,27 @@ +function test_JSOP_ARGSUB() { + function f0() { return arguments[0]; } + function f1() { return arguments[1]; } + function f2() { return arguments[2]; } + function f3() { return arguments[3]; } + function f4() { return arguments[4]; } + function f5() { return arguments[5]; } + function f6() { return arguments[6]; } + function f7() { return arguments[7]; } + function f8() { return arguments[8]; } + function f9() { return arguments[9]; } + var a = []; + for (var i = 0; i < 10; i++) { + a[0] = f0('a'); + a[1] = f1('a','b'); + a[2] = f2('a','b','c'); + a[3] = f3('a','b','c','d'); + a[4] = f4('a','b','c','d','e'); + a[5] = f5('a','b','c','d','e','f'); + a[6] = f6('a','b','c','d','e','f','g'); + a[7] = f7('a','b','c','d','e','f','g','h'); + a[8] = f8('a','b','c','d','e','f','g','h','i'); + a[9] = f9('a','b','c','d','e','f','g','h','i','j'); + } + return a.join(""); +} +assertEq(test_JSOP_ARGSUB(), "abcdefghij"); diff --git a/js/src/jit-test/tests/basic/testif.js b/js/src/jit-test/tests/basic/testif.js new file mode 100644 index 0000000000..f7b2864e90 --- /dev/null +++ b/js/src/jit-test/tests/basic/testif.js @@ -0,0 +1,11 @@ +function testif() { + var q = 0; + for (var i = 0; i < 100; i++) { + if ((i & 1) == 0) + q++; + else + q--; + } + return q; +} +assertEq(testif(), 0); diff --git a/js/src/jit-test/tests/basic/testincops.js b/js/src/jit-test/tests/basic/testincops.js new file mode 100644 index 0000000000..85e36abe36 --- /dev/null +++ b/js/src/jit-test/tests/basic/testincops.js @@ -0,0 +1,24 @@ +var globalinc = 0; +function testincops(n) { + var i = 0, o = {p:0}, a = [0]; + n = 100; + + for (i = 0; i < n; i++); + while (i-- > 0); + for (i = 0; i < n; ++i); + while (--i >= 0); + + for (o.p = 0; o.p < n; o.p++) globalinc++; + while (o.p-- > 0) --globalinc; + for (o.p = 0; o.p < n; ++o.p) ++globalinc; + while (--o.p >= 0) globalinc--; + + ++i; // set to 0 + for (a[i] = 0; a[i] < n; a[i]++); + while (a[i]-- > 0); + for (a[i] = 0; a[i] < n; ++a[i]); + while (--a[i] >= 0); + + return [++o.p, ++a[i], globalinc].toString(); +} +assertEq(testincops(), "0,0,0"); diff --git a/js/src/jit-test/tests/basic/this-binding-with-eval.js b/js/src/jit-test/tests/basic/this-binding-with-eval.js new file mode 100644 index 0000000000..caeda02305 --- /dev/null +++ b/js/src/jit-test/tests/basic/this-binding-with-eval.js @@ -0,0 +1,51 @@ +function Test1() { + this.x = 8; + this.y = 5; + this.z = 2; + var o = {".this": {x: 1}}; + var res; + with (o) { + res = this.x + (() => this.z)() + eval("this.x + (() => this.y)()"); + } + assertEq(res, 23); +} +new Test1(); + +function Test2() { + this.x = 8; + var o = {".this": {x: 1}}; + with (o) { + return eval("() => this.x"); + } +} +var fun = new Test2(); +assertEq(fun(), 8); + +function Test3() { + this.x = 8; + var o = {".this": {x: 1}}; + with (o) { + assertEq(this.x, 8); + } +} +new Test3(); + +function test4() { + var o = {".this": {x: 1}}; + with (o) { + return () => this; + } +} +assertEq(test4()(), this); + +function test5() { + var o = {".this": {x: 1}}; + with (o) { + return this; + } +} +assertEq(test5(), this); + +var global = this; +evaluate("with({}) { assertEq(this, global); }"); +eval("with({}) { assertEq(this, global); }"); diff --git a/js/src/jit-test/tests/basic/throw-apply-too-many-args.js b/js/src/jit-test/tests/basic/throw-apply-too-many-args.js new file mode 100644 index 0000000000..21569c2895 --- /dev/null +++ b/js/src/jit-test/tests/basic/throw-apply-too-many-args.js @@ -0,0 +1,27 @@ +function g(a, b, c, d) {} +function f(a, b, c) +{ + arguments.length = getMaxArgs() + 1; + g.apply(this, arr); +} +let x = []; +x.length = getMaxArgs() + 1; +var args = [[5], [5], [5], [5], [5], [5], [5], [5], [5], [5], [5], x] +try +{ + for (var i = 0; i < args.length; i++) { arr = args[i]; f(); } + throw new Error("didn't throw"); +} +catch (e) +{ + assertEq(e instanceof RangeError, true, "wrong exception: " + e); +} +try +{ + for (var i = 0; i < args.length; i++) { arr = args[i]; f(); } + throw new Error("didn't throw"); +} +catch (e) +{ + assertEq(e instanceof RangeError, true, "wrong exception: " + e); +} diff --git a/js/src/jit-test/tests/basic/throw-exception-stack-location.js b/js/src/jit-test/tests/basic/throw-exception-stack-location.js new file mode 100644 index 0000000000..d3c5ea9dab --- /dev/null +++ b/js/src/jit-test/tests/basic/throw-exception-stack-location.js @@ -0,0 +1,49 @@ +function throwValue(value) { + throw value; +} + +// Test for-of loops keep the exception stack. +function testForOfLoop() { + function f() { + for (let _ of [null]) { + throwValue("exception-value"); + } + } + + let info = getExceptionInfo(f); + assertEq(info.exception, "exception-value"); + assertEq(info.stack.includes("throwValue"), true); +} +testForOfLoop(); + +// Test try-finally keep the exception stack. +function testFinally() { + function f() { + try { + throwValue("exception-value"); + } finally { + } + } + + let info = getExceptionInfo(f); + assertEq(info.exception, "exception-value"); + assertEq(info.stack.includes("throwValue"), true); +} +testFinally(); + +// Test try-catch-finally keep the exception stack. +function testCatchFinally() { + function f() { + try { + throw null; + } catch { + throwValue("exception-value"); + } finally { + } + } + + let info = getExceptionInfo(f); + assertEq(info.exception, "exception-value"); + assertEq(info.stack.includes("throwValue"), true); +} +testCatchFinally(); diff --git a/js/src/jit-test/tests/basic/throw-exception-stack.js b/js/src/jit-test/tests/basic/throw-exception-stack.js new file mode 100644 index 0000000000..729f354ea2 --- /dev/null +++ b/js/src/jit-test/tests/basic/throw-exception-stack.js @@ -0,0 +1,76 @@ +// Simple tests for getExceptionInfo behavior. +function testTestingFunction() { + let vals = [{}, 1, "foo", null, undefined]; + for (let v of vals) { + let thrower = () => { throw v; }; + let info = getExceptionInfo(thrower); + assertEq(info.exception, v); + assertEq(info.stack.includes("thrower@"), true); + } + + // Returns null if there was no exception. + assertEq(getExceptionInfo(() => 123), null); + + // OOM exceptions don't have a stack trace. + let info = getExceptionInfo(throwOutOfMemory); + assertEq(info.exception, "out of memory"); + assertEq(info.stack, null); +} +testTestingFunction(); + +/** + * Check that the expected number of stack traces are generated for a given + * global where 100 "throws" are generated + */ +function assertStacksCount(global, expectedStacksCount) { + global.evaluate("(" + function(_expectedStacksCount) { + let thrower = () => { throw 123; }; + for (let i = 0; i < 100; i++) { + let info = getExceptionInfo(thrower); + assertEq(info.exception, 123); + // NOTE: if this ever gets increased, update the tests above too! + if (i <= _expectedStacksCount) { + assertEq(info.stack.includes("thrower@"), true); + } else { + assertEq(info.stack, null); + } + } + } + `)(${expectedStacksCount})`); +} + +// Debuggee globals always get an exception stack. +function testDebuggee() { + let g = newGlobal({newCompartment: true}); + let dbg = new Debugger(g); + assertStacksCount(g, 100); +} +testDebuggee(); + +// Globals with trusted principals always get an exception stack. +function testTrustedPrincipals() { + let g = newGlobal({newCompartment: true, systemPrincipal: true}); + assertStacksCount(g, 100); +} +testTrustedPrincipals(); + +// In normal cases, a stack is captured only for the first 50 exceptions per realm. +function testNormal() { + let g = newGlobal(); + assertStacksCount(g, 50); +} +testNormal(); + +// Non debuggee with unlimited stacks capturing enabled should always get a stack. +function testEnableUnlimitedStacksCapturing() { + let dbg = new Debugger(); + let g = newGlobal(); + dbg.enableUnlimitedStacksCapturing(g); + assertStacksCount(g, 100); + + dbg.disableUnlimitedStacksCapturing(g); + assertStacksCount(g, 50); + + dbg.enableUnlimitedStacksCapturing(g); + assertStacksCount(g, 100); +} +testEnableUnlimitedStacksCapturing(); diff --git a/js/src/jit-test/tests/basic/timeout-check.js b/js/src/jit-test/tests/basic/timeout-check.js new file mode 100644 index 0000000000..ece69a2584 --- /dev/null +++ b/js/src/jit-test/tests/basic/timeout-check.js @@ -0,0 +1,14 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") +function f(x) { + if (x === 0) + return; + f(x - 1); + f(x - 1); + f(x - 1); + f(x - 1); + f(x - 1); + f(x - 1); +} +timeout(0.1); +f(100); +assertEq(0, 1); diff --git a/js/src/jit-test/tests/basic/track-allocation-sites.js b/js/src/jit-test/tests/basic/track-allocation-sites.js new file mode 100644 index 0000000000..fb329b7002 --- /dev/null +++ b/js/src/jit-test/tests/basic/track-allocation-sites.js @@ -0,0 +1,24 @@ +// Test that we can track allocation sites. + +enableTrackAllocations(); + +const tests = [ + { name: "object literal", object: {}, line: Error().lineNumber }, + { name: "array literal", object: [], line: Error().lineNumber }, + { name: "regexp literal", object: /(two|2)\s*problems/, line: Error().lineNumber }, + { name: "new constructor", object: new function Ctor(){}, line: Error().lineNumber }, + { name: "new Object", object: new Object(), line: Error().lineNumber }, + { name: "new Array", object: new Array(), line: Error().lineNumber }, + { name: "new Date", object: new Date(), line: Error().lineNumber } +]; + +disableTrackAllocations(); + +for (let { name, object, line } of tests) { + print("Entering test: " + name); + + let allocationSite = getAllocationMetadata(object); + print(allocationSite); + + assertEq(allocationSite.line, line); +} diff --git a/js/src/jit-test/tests/basic/transplant-dom-slot2.js b/js/src/jit-test/tests/basic/transplant-dom-slot2.js new file mode 100644 index 0000000000..c4c2e8c482 --- /dev/null +++ b/js/src/jit-test/tests/basic/transplant-dom-slot2.js @@ -0,0 +1,7 @@ +// Make sure to transplant DOM_OBJECT_SLOT2 for FakeDOMObject +let source = new FakeDOMObject(); +assertEq(source.slot, 42); +let {object: target, transplant} = transplantableObject({object: source}); +transplant(this); +assertEq(source.slot, 42); +assertEq(target.slot, 42); diff --git a/js/src/jit-test/tests/basic/trees.js b/js/src/jit-test/tests/basic/trees.js new file mode 100644 index 0000000000..7638f089a1 --- /dev/null +++ b/js/src/jit-test/tests/basic/trees.js @@ -0,0 +1,10 @@ +function trees() { + var i = 0, o = [0,0,0]; + for (i = 0; i < 100; ++i) { + if ((i & 1) == 0) o[0]++; + else if ((i & 2) == 0) o[1]++; + else o[2]++; + } + return String(o); +} +assertEq(trees(), "50,25,25"); diff --git a/js/src/jit-test/tests/basic/truncateDouble.js b/js/src/jit-test/tests/basic/truncateDouble.js new file mode 100644 index 0000000000..b5c4990768 --- /dev/null +++ b/js/src/jit-test/tests/basic/truncateDouble.js @@ -0,0 +1,10 @@ + +// check correctness of truncation of doubles slightly outside the int32_t range. + +function truncate(x) { + return x | 0; +} + +assertEq(truncate(0xffffffff), -1); +assertEq(truncate(0xffffffff + 5000.5), 4999); +assertEq(truncate(-0xffffffff - 5000.5), -4999); diff --git a/js/src/jit-test/tests/basic/truthies.js b/js/src/jit-test/tests/basic/truthies.js new file mode 100644 index 0000000000..af8e6097be --- /dev/null +++ b/js/src/jit-test/tests/basic/truthies.js @@ -0,0 +1,45 @@ +load(libdir + 'andTestHelper.js'); +load(libdir + 'orTestHelper.js'); + +function source(x) { + switch (typeof x) { + case "number": + case "boolean": + return String(x); + case "undefined": + return "(void 0)"; + case "string": + return JSON.stringify(x); + case "object": + if (x === null) { + return "null"; + } + return `(${JSON.stringify(x)})`; + default: + throw new Error("not implemented: " + typeof x); + } +} + +(function () { + var opsies = ["||", "&&"]; + var falsies = [null, undefined, false, NaN, 0, ""]; + var truthies = [{}, true, 1, 42, 1/0, -1/0, "blah"]; + var boolies = [falsies, truthies]; + + for (var op of opsies) { + for (var i in boolies) { + for (var j in boolies[i]) { + var x = source(boolies[i][j]); + for (var k in boolies) { + for (var l in boolies[k]) { + var y = source(boolies[k][l]); + var prefix = (op == "||") ? "or" : "and"; + var f = new Function("return " + prefix + "TestHelper(" + x + "," + y + ",10)"); + var expected = eval(x + op + y) ? 45 : 0; + assertEq(f(), expected); + } + } + } + } + } + })(); diff --git a/js/src/jit-test/tests/basic/typeMonitorCall.js b/js/src/jit-test/tests/basic/typeMonitorCall.js new file mode 100644 index 0000000000..d80a7dc626 --- /dev/null +++ b/js/src/jit-test/tests/basic/typeMonitorCall.js @@ -0,0 +1,19 @@ + +/* Make sure we are checking argument types when going through unknown but monomorphic call sites. */ + +function foo(x) { + return x + 10; +} + +var array = [1,2,3,4,5,6,7,"eight"]; + +/* Jump through hoops to make 'f' unknown. */ +var f = this[eval("'foo'")]; + +for (var i = 0; i < array.length; i++) { + var res = f(array[i]); + if (i != 7) + assertEq(res, i + 11); + else + assertEq(res, "eight10"); +} diff --git a/js/src/jit-test/tests/basic/typeMonitorSingleton.js b/js/src/jit-test/tests/basic/typeMonitorSingleton.js new file mode 100644 index 0000000000..be01dcaeb4 --- /dev/null +++ b/js/src/jit-test/tests/basic/typeMonitorSingleton.js @@ -0,0 +1,17 @@ +// |jit-test| error: TypeError + +var x = {f:20}; + +function foo() { + for (var i = 0; i < 10; i++) + x.f; +} +foo(); + +gc(); + +// a type barrier needs to be generated for the access on x within foo, +// even though its type set is initially empty after the GC. +x = undefined; + +foo(); diff --git a/js/src/jit-test/tests/basic/typed-array-copyWithin.js b/js/src/jit-test/tests/basic/typed-array-copyWithin.js new file mode 100644 index 0000000000..0bcc0bdd72 --- /dev/null +++ b/js/src/jit-test/tests/basic/typed-array-copyWithin.js @@ -0,0 +1,214 @@ +// Bug 1021379 - Rename typed arrays' move method to copyWithin, +// fix up to ES6 semantics +// Tests for TypedArray#copyWithin + +load(libdir + "asserts.js"); + +const constructors = [ + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array +]; + +for (var constructor of constructors) { + + assertEq(constructor.prototype.copyWithin.length, 2); + + // works with two arguments + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(0, 3), + new constructor([4, 5, 3, 4, 5])); + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(1, 3), + new constructor([1, 4, 5, 4, 5])); + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(1, 2), + new constructor([1, 3, 4, 5, 5])); + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(2, 2), + new constructor([1, 2, 3, 4, 5])); + + // works with three arguments + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(0, 3, 4), + new constructor([4, 2, 3, 4, 5])); + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(1, 3, 4), + new constructor([1, 4, 3, 4, 5])); + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(1, 2, 4), + new constructor([1, 3, 4, 4, 5])); + + // works with negative arguments + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(0, -2), + new constructor([4, 5, 3, 4, 5])); + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(0, -2, -1), + new constructor([4, 2, 3, 4, 5])); + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(-4, -3, -2), + new constructor([1, 3, 3, 4, 5])); + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(-4, -3, -1), + new constructor([1, 3, 4, 4, 5])); + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(-4, -3), + new constructor([1, 3, 4, 5, 5])); + + // throws on null/undefined values + assertThrowsInstanceOf(function() { + constructor.prototype.copyWithin.call(null, 0, 3); + }, TypeError, "Assert that copyWithin fails if this value is null"); + + assertThrowsInstanceOf(function() { + var throw42 = { valueOf: function() { throw 42; } }; + constructor.prototype.copyWithin.call(null, throw42, throw42, throw42); + }, TypeError, "Assert that copyWithin fails if this value is null"); + + assertThrowsInstanceOf(function() { + var throw42 = { valueOf: function() { throw 42; } }; + constructor.prototype.copyWithin.call(undefined, throw42, throw42, throw42); + }, TypeError, "Assert that copyWithin fails if this value is undefined"); + + assertThrowsInstanceOf(function() { + constructor.prototype.copyWithin.call(undefined, 0, 3); + }, TypeError, "Assert that copyWithin fails if this value is undefined"); + + // test with this value as string + assertThrowsInstanceOf(function() { + constructor.prototype.copyWithin.call("hello world", 0, 3); + }, TypeError, "Assert that copyWithin fails if this value is string"); + + assertThrowsInstanceOf(function() { + var throw42 = { valueOf: function() { throw 42; } }; + constructor.prototype.copyWithin.call("hello world", throw42, throw42, throw42); + }, TypeError, "Assert that copyWithin fails if this value is string"); + + // test with target > start on 2 arguments + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(3, 0), + new constructor([1, 2, 3, 1, 2])); + + // test with target > start on 3 arguments + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(3, 0, 4), + new constructor([1, 2, 3, 1, 2])); + + // test on fractional arguments + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(0.2, 3.9), + new constructor([4, 5, 3, 4, 5])); + + // test with -0 + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(-0, 3), + new constructor([4, 5, 3, 4, 5])); + + // test with arguments more than this.length + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(0, 7), + new constructor([1, 2, 3, 4, 5])); + + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(7, 0), + new constructor([1, 2, 3, 4, 5])); + + // test with arguments less than -this.length + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(-7, 0), + new constructor([1, 2, 3, 4, 5])); + + // test with arguments equal to -this.length + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(-5, 0), + new constructor([1, 2, 3, 4, 5])); + + // test on empty constructor + assertDeepEq(new constructor([]).copyWithin(0, 3), + new constructor([])); + + // test with target range being shorter than end - start + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(2, 1, 4), + new constructor([1, 2, 2, 3, 4])); + + // test overlapping ranges + arr = new constructor([1, 2, 3, 4, 5]); + arr.copyWithin(2, 1, 4); + assertDeepEq(arr.copyWithin(2, 1, 4), + new constructor([1, 2, 2, 2, 3])); + + // undefined as third argument + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(0, 3, undefined), + new constructor([4, 5, 3, 4, 5])); + + // test that this.length is never called + arr = new constructor([0, 1, 2, 3, 5]); + Object.defineProperty(arr, "length", { + get: function () { throw new Error("length accessor called"); } + }); + arr.copyWithin(1, 3); + + var large = 10000; + + // test on a large constructor + arr = new constructor(large); + assertDeepEq(arr.copyWithin(45, 900), arr); + + // test on floating point numbers + for (var i = 0; i < large; i++) { + arr[i] = Math.random(); + } + arr.copyWithin(45, 900); + + // test on constructor of objects + for (var i = 0; i < large; i++) { + arr[i] = { num: Math.random() }; + } + arr.copyWithin(45, 900); + + // test constructor length remains same + assertEq(arr.length, large); + + // test null on third argument is handled correctly + assertDeepEq(new constructor([1, 2, 3, 4, 5]).copyWithin(0, 3, null), + new constructor([1, 2, 3, 4, 5])); + + //Any argument referenced, but not provided, has the value |undefined| + var tarray = new constructor(8); + try + { + tarray.copyWithin({ valueOf: function() { throw 42; } }); + throw new Error("expected to throw"); + } + catch (e) + { + assertEq(e, 42, "should have failed converting target to index"); + } + + function detachAndConvertTo(x) { + return { valueOf() { + detachArrayBuffer(tarray.buffer); + return x; + } }; + } + + // Detaching during argument processing triggers a TypeError. + tarray = new constructor([1, 2, 3, 4, 5]); + try + { + tarray.copyWithin(0, 3, detachAndConvertTo(4)); + throw new Error("expected to throw"); + } + catch (e) + { + assertEq(e instanceof TypeError, true, + "expected throw with detached buffer during set"); + } + + // ...unless no elements are to be copied. + tarray = new constructor([1, 2, 3, 4, 5]); + assertDeepEq(tarray.copyWithin(0, 3, detachAndConvertTo(3)), + new constructor([])); + + /* // fails, unclear whether it should, disabling for now + // test with a proxy object + var handler = { + get: function(recipient, name) { + return recipient[name] + 2; + } + }; + + var p = new Proxy(new constructor([1, 2, 3, 4, 5]), handler); + + assertThrowsInstanceOf(function() { + constructor.prototype.copyWithin.call(p, 0, 3); + }, TypeError, "Assert that copyWithin fails if used with a proxy object"); + */ +} diff --git a/js/src/jit-test/tests/basic/typed-array-getprop-out-of-range.js b/js/src/jit-test/tests/basic/typed-array-getprop-out-of-range.js new file mode 100644 index 0000000000..601d9f3c55 --- /dev/null +++ b/js/src/jit-test/tests/basic/typed-array-getprop-out-of-range.js @@ -0,0 +1,11 @@ +var r = Object.prototype[0] = /a/; + +function test() +{ + for (var i = 0, sz = 9; i < sz; i++) + { + var ta = new Int8Array(); + assertEq(ta[0], undefined); + } +} +test(); diff --git a/js/src/jit-test/tests/basic/typed-array-index-out-of-range.js b/js/src/jit-test/tests/basic/typed-array-index-out-of-range.js new file mode 100644 index 0000000000..f44c7806ce --- /dev/null +++ b/js/src/jit-test/tests/basic/typed-array-index-out-of-range.js @@ -0,0 +1,169 @@ + +// Out of bounds writes on typed arrays are uneffectful for all integers. + +var x = new Int32Array(10); + +// 7.1.16 CanonicalNumericIndexString ( argument ) +function CanonicalNumericIndexString(argument) { + // Step 1. + assertEq(typeof argument, "string"); + + // Step 2. + if (argument === "-0") { + return -0; + } + + // Step 3. + var n = Number(argument); + + // Step 4. + if (String(n) !== argument) { + return undefined; + } + + // Step 5. + return n; +} + +function CanonicalIndexInRange(argument) { + return Number.isInteger(argument) && !Object.is(argument, -0) && + argument >= 0 && argument < x.length; +} + +function assertCanonicalNumericIndexString(i) { + var canonical = CanonicalNumericIndexString(i); + assertEq(canonical !== undefined, true, + `Argument ${i} is not a canonical numeric index string`); + + x[i] = 0; // Clear any previous value. + x[i] = 1; + + var expected = CanonicalIndexInRange(canonical) ? 1 : undefined; + assertEq(x[i], expected, `${i} is a canonical index string`); + + // Also test when accessing with a number instead of a string. + + x[canonical] = 0; // Clear any previous value. + x[canonical] = 2; + + // Add +0 to convert -0 to +0. + var expected = CanonicalIndexInRange(canonical + 0) ? 2 : undefined; + assertEq(x[canonical], expected, `${i} is a canonical index string`); +} + +function assertNotCanonicalNumericIndexString(i) { + assertEq(CanonicalNumericIndexString(i) === undefined, true, + `Argument ${i} is a canonical numeric index string`); + + x[i] = ""; // Clear any previous value. + x[i] = "test"; + + assertEq(x[i], "test", `${i} isn't a canonical index string`); +} + +function f() { + for (var i = -100; i < 100; i++) { + assertCanonicalNumericIndexString(String(i)); + } +} +f(); + +// INT32_MAX and UINT32_MAX are canonical numeric indices. + +assertCanonicalNumericIndexString("2147483647"); +assertCanonicalNumericIndexString("4294967295"); + +// Neither INT64_MAX nor UINT64_MAX are canonical numeric indices. + +assertNotCanonicalNumericIndexString("9223372036854775807"); +assertNotCanonicalNumericIndexString("18446744073709551615"); + +// "18446744073709552000" and "18446744073709556000" are canonical numeric indices. + +assertEq(String(18446744073709551615), "18446744073709552000"); + +assertCanonicalNumericIndexString("18446744073709552000"); +assertCanonicalNumericIndexString("18446744073709556000"); + +// Number.MAX_SAFE_INTEGER and Number.MAX_SAFE_INTEGER + 1 are canonical numeric +// indices, but Number.MAX_SAFE_INTEGER + 2 is not. + +assertEq(String(Number.MAX_SAFE_INTEGER), "9007199254740991"); + +assertCanonicalNumericIndexString("9007199254740991"); +assertCanonicalNumericIndexString("9007199254740992"); +assertNotCanonicalNumericIndexString("9007199254740993"); + +// Number.MIN_SAFE_INTEGER and Number.MIN_SAFE_INTEGER - 1 are canonical numeric +// indices, but Number.MIN_SAFE_INTEGER - 2 is not. + +assertEq(String(Number.MIN_SAFE_INTEGER), "-9007199254740991"); + +assertCanonicalNumericIndexString("-9007199254740991"); +assertCanonicalNumericIndexString("-9007199254740992"); +assertNotCanonicalNumericIndexString("-9007199254740993"); + +// -0 is a canonical numeric index. + +assertCanonicalNumericIndexString("-0"); + +// 0.1 and -0.1 are canonical numeric indices. + +assertCanonicalNumericIndexString("0.1"); +assertCanonicalNumericIndexString("-0.1"); + +// 0.10 and -0.10 aren't canonical numeric indices. + +assertNotCanonicalNumericIndexString("0.10"); +assertNotCanonicalNumericIndexString("-0.10"); + +// Number.MIN_VALUE and -Number.MIN_VALUE are canonical numeric indices. + +assertEq(String(Number.MIN_VALUE), "5e-324"); +assertEq(String(-Number.MIN_VALUE), "-5e-324"); + +assertCanonicalNumericIndexString("5e-324"); +assertCanonicalNumericIndexString("-5e-324"); + +assertNotCanonicalNumericIndexString("5E-324"); +assertNotCanonicalNumericIndexString("-5E-324"); + +// 1e2, -1e2, 1e-2, and -1e-2 aren't canonical numeric indices. + +assertNotCanonicalNumericIndexString("1e2"); +assertNotCanonicalNumericIndexString("-1e2"); +assertNotCanonicalNumericIndexString("1e+2"); +assertNotCanonicalNumericIndexString("-1e+2"); +assertNotCanonicalNumericIndexString("1e-2"); +assertNotCanonicalNumericIndexString("-1e-2"); + +assertNotCanonicalNumericIndexString("1E2"); +assertNotCanonicalNumericIndexString("-1E2"); +assertNotCanonicalNumericIndexString("1E+2"); +assertNotCanonicalNumericIndexString("-1E+2"); +assertNotCanonicalNumericIndexString("1E-2"); +assertNotCanonicalNumericIndexString("-1E-2"); + +// Number.MAX_VALUE and -Number.MAX_VALUE are canonical numeric indices. + +assertEq(String(Number.MAX_VALUE), "1.7976931348623157e+308"); +assertEq(String(-Number.MAX_VALUE), "-1.7976931348623157e+308"); + +assertCanonicalNumericIndexString("1.7976931348623157e+308"); +assertCanonicalNumericIndexString("-1.7976931348623157e+308"); + +assertNotCanonicalNumericIndexString("1.7976931348623157E+308"); +assertNotCanonicalNumericIndexString("-1.7976931348623157E+308"); + +// Infinity, -Infinity, and NaN are canonical numeric indices and are handled +// the same way as other out-of-bounds accesses. + +assertCanonicalNumericIndexString("Infinity"); +assertCanonicalNumericIndexString("-Infinity"); +assertCanonicalNumericIndexString("NaN"); + +// +Infinity, +NaN, or -NaN are not canonical numeric indices. + +assertNotCanonicalNumericIndexString("+Infinity"); +assertNotCanonicalNumericIndexString("+NaN"); +assertNotCanonicalNumericIndexString("-NaN"); diff --git a/js/src/jit-test/tests/basic/typed-array-offsets.js b/js/src/jit-test/tests/basic/typed-array-offsets.js new file mode 100644 index 0000000000..00e953edc0 --- /dev/null +++ b/js/src/jit-test/tests/basic/typed-array-offsets.js @@ -0,0 +1,11 @@ +function f(x, y) { + for (var i = 0; i < 100; i++) + assertEq(x[0], y); +} +var a = new ArrayBuffer(20); +var b = new Int32Array(a, 12, 2); +var c = new Int32Array(a, 0, 2); +b[0] = 10; +f(b, 10); +c[0] = 20; +f(c, 20); diff --git a/js/src/jit-test/tests/basic/typed-array-sealed-frozen.js b/js/src/jit-test/tests/basic/typed-array-sealed-frozen.js new file mode 100644 index 0000000000..a98d4b89c2 --- /dev/null +++ b/js/src/jit-test/tests/basic/typed-array-sealed-frozen.js @@ -0,0 +1,85 @@ +// Any copyright is dedicated to the Public Domain. +// http://creativecommons.org/licenses/publicdomain/ + +load(libdir + "asserts.js") + +const constructors = [ + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array +]; + +for (constructor of constructors) { + print("testing non-empty " + constructor.name); + let a = new constructor(10); + assertEq(Object.isExtensible(a), true); + assertEq(Object.isSealed(a), false); + assertEq(Object.isFrozen(a), false); + + // Should complain that it can't change attributes of indexed typed array properties. + assertThrowsInstanceOf(() => Object.seal(a), TypeError); + + // Should complain that it can't change attributes of indexed typed array properties. + assertThrowsInstanceOf(() => Object.freeze(a), TypeError); +} + +print(); + +for (constructor of constructors) { + print("testing zero-length " + constructor.name); + let a = new constructor(0); + assertEq(Object.isExtensible(a), true); + assertEq(Object.isSealed(a), false); + assertEq(Object.isFrozen(a), false); + + // Should not throw. + Object.seal(a); + Object.freeze(a); +} + +// isSealed and isFrozen should not try to build an array of all the +// property names of a typed array, since they're often especially large. +// This should not throw an allocation error. +let a = new Uint8Array(1 << 24); +Object.isSealed(a); +Object.isFrozen(a); + +for (constructor of constructors) { + print("testing extensibility " + constructor.name); + let a = new constructor(10); + + // New named properties should show up on typed arrays. + a.foo = "twelve"; + assertEq(a.foo, "twelve"); + + // New indexed properties should not show up on typed arrays. + a[20] = "twelve"; + assertEq(a[20], undefined); + + // Watch for especially large indexed properties. + a[-10 >>> 0] = "twelve"; + assertEq(a[-10 >>> 0], undefined); + + // Watch for really large indexed properties too. + a[Math.pow(2, 53)] = "twelve"; + assertEq(a[Math.pow(2, 53)], undefined); + + // Don't define old properties. + Object.defineProperty(a, 5, {value: 3}); + assertEq(a[5], 3); + + // Don't define new properties. + assertThrowsInstanceOf(() => Object.defineProperty(a, 20, {value: 3}), TypeError); + assertEq(a[20], undefined); + + // Don't delete indexed properties. + a[3] = 3; + delete a[3]; + assertEq(a[3], 3); +} diff --git a/js/src/jit-test/tests/basic/typedarray-selfhosted-cross-compartment.js b/js/src/jit-test/tests/basic/typedarray-selfhosted-cross-compartment.js new file mode 100644 index 0000000000..ee2ef412c6 --- /dev/null +++ b/js/src/jit-test/tests/basic/typedarray-selfhosted-cross-compartment.js @@ -0,0 +1,13 @@ +/* + * Any copyright is dedicated to the Public Domain. + * https://creativecommons.org/publicdomain/zero/1.0/ + */ + +var global = newGlobal(); +var array = new global.Int8Array(10); + +assertEq(array.find(v => v == 1), undefined) +assertEq(array.findIndex(v => v == 0), 0) + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/basic/typeof-array.js b/js/src/jit-test/tests/basic/typeof-array.js new file mode 100644 index 0000000000..d384dd973e --- /dev/null +++ b/js/src/jit-test/tests/basic/typeof-array.js @@ -0,0 +1,9 @@ + +function typeOf(o) { + assertEq(typeof o, "object"); +} + +typeOf([]); +typeOf(new Float32Array()); +typeOf(new Int32Array()); +typeOf(new ArrayBuffer()); diff --git a/js/src/jit-test/tests/basic/typeofTest.js b/js/src/jit-test/tests/basic/typeofTest.js new file mode 100644 index 0000000000..90dadbb541 --- /dev/null +++ b/js/src/jit-test/tests/basic/typeofTest.js @@ -0,0 +1,8 @@ +function typeofTest() +{ + var values = ["hi", "hi", "hi", null, 5, 5.1, true, undefined, /foo/, typeofTest, [], {}], types = []; + for (var i = 0; i < values.length; i++) + types[i] = typeof values[i]; + return types.toString(); +} +assertEq(typeofTest(), "string,string,string,object,number,number,boolean,undefined,object,function,object,object"); diff --git a/js/src/jit-test/tests/basic/unboxint.js b/js/src/jit-test/tests/basic/unboxint.js new file mode 100644 index 0000000000..1aa4312974 --- /dev/null +++ b/js/src/jit-test/tests/basic/unboxint.js @@ -0,0 +1,8 @@ +function unboxint() { + var q = 0; + var o = [4]; + for (var i = 0; i < 100; ++i) + q = o[0] << 1; + return q; +} +assertEq(unboxint(), 8); diff --git a/js/src/jit-test/tests/basic/valuetosource.js b/js/src/jit-test/tests/basic/valuetosource.js new file mode 100644 index 0000000000..739b385056 --- /dev/null +++ b/js/src/jit-test/tests/basic/valuetosource.js @@ -0,0 +1,38 @@ +// |jit-test| --disable-tosource + +const TEST_CASES = [ + [`undefined`, "(void 0)"], + [`null`, "null"], + [`true`, "true"], + [`Symbol("abc")`, `Symbol("abc")`], + [`15`, "15"], + [`-0`, "-0"], + [`"abc"`, `"abc"`], + [`(function a() { return 1; })`, `(function a() { return 1; })`], + [`[1, 2, 3]`, `[1, 2, 3]`], + [`[1, {a: 0, b: 0}, 2]`, `[1, {a:0, b:0}, 2]`], + [`({a: [1, 2, 3]})`, `({a:[1, 2, 3]})`], + [`new Error("msg", "file", 1)`, `(new Error("msg", "file", 1))`], + [`new TypeError("msg", "file", 1)`, `(new TypeError("msg", "file", 1))`], + [`new class X extends Error { + constructor() { + super("msg", "file", 1); + this.name = "X"; + } + }`, `(new X("msg", "file", 1))`], + [`/a(b)c/`, `/a(b)c/`], + [`/abc/gi`, `/abc/gi`], + [`new Boolean(false)`, `new Boolean(false)`], + [`Object(false)`, `new Boolean(false)`], + [`new String("abc")`, `new String("abc")`], + [`Object("abc")`, `new String("abc")`], + [`new Number(42)`, `new Number(42)`], + [`Object(42)`, `new Number(42)`], + [`new Date(1579447335)`, `new Date(1579447335)`], +] + +let g = newGlobal({newCompartment: true}); +for (let [actual, expected] of TEST_CASES) { + assertEq(valueToSource(eval(actual)), expected); + assertEq(valueToSource(g.eval(actual)), expected); +} diff --git a/js/src/jit-test/tests/basic/weird-scopechains.js b/js/src/jit-test/tests/basic/weird-scopechains.js new file mode 100644 index 0000000000..c992f315bb --- /dev/null +++ b/js/src/jit-test/tests/basic/weird-scopechains.js @@ -0,0 +1,31 @@ +function checkNameLookup() { + return "global"; +} + +function assertWithMessage(got, expected, message) { + assertEq(message + ": " + got, message + ": " + expected); +} + +var obj = { + checkNameLookup: function() { + return "local"; + }, + + checkThisBinding: function() { + return this.checkNameLookup(); + }, +}; + +evaluate("(" + function() { + assertWithMessage(checkNameLookup(), "local", "nameLookup"); + assertWithMessage(checkThisBinding(), "local", "thisBinding"); + + // Important: lambda needs to close over "reason", so it won't just get the + // scope of testFunc as its scope. Instead it'll get the Call object + // "reason" lives in. + var reason = " in lambda in Call"; + (function() { + assertWithMessage(checkNameLookup(), "local", "nameLookup" + reason); + assertWithMessage(checkThisBinding(), "local", "thisBinding" + reason); + })(); +} + ")()", {envChainObject: obj}); diff --git a/js/src/jit-test/tests/basic/withSourceHook.js b/js/src/jit-test/tests/basic/withSourceHook.js new file mode 100644 index 0000000000..5df79c9721 --- /dev/null +++ b/js/src/jit-test/tests/basic/withSourceHook.js @@ -0,0 +1,53 @@ +// |jit-test| skip-if: typeof withSourceHook !== 'function' + +// Check that withSourceHook passes URLs, propagates exceptions, and +// properly restores the original source hooks. + +load(libdir + 'asserts.js'); + +var log = ''; + +// Establish an outermost source hook. +withSourceHook(function (url) { + log += 'o'; + assertEq(url, 'outer'); + return '(function outer() { 3; })'; +}, function () { + log += 'O'; + // Verify that withSourceHook propagates exceptions thrown by source hooks. + assertThrowsValue(function () { + // Establish a source hook that throws. + withSourceHook(function (url) { + log += 'm'; + assertEq(url, 'middle'); + throw 'borborygmus'; // middle + }, function () { + log += 'M'; + // Establish an innermost source hook that does not throw, + // and verify that it is in force. + assertEq(withSourceHook(function (url) { + log += 'i'; + assertEq(url, 'inner'); + return '(function inner() { 1; })'; + }, function () { + log += 'I'; + return evaluate('(function inner() { 2; })', + { fileName: 'inner', sourceIsLazy: true }) + .toString(); + }), + 'function inner() { 1; }'); + // Verify that the source hook that throws has been reinstated. + evaluate('(function middle() { })', + { fileName: 'middle', sourceIsLazy: true }) + .toString(); + }); + }, 'borborygmus'); + + // Verify that the outermost source hook has been restored. + assertEq(evaluate('(function outer() { 4; })', + { fileName: 'outer', sourceIsLazy: true }) + .toString(), + 'function outer() { 3; }'); +}); + +assertEq(log, 'OMIimo'); diff --git a/js/src/jit-test/tests/basic/wrapping-dead-wrapper.js b/js/src/jit-test/tests/basic/wrapping-dead-wrapper.js new file mode 100644 index 0000000000..406fdaa172 --- /dev/null +++ b/js/src/jit-test/tests/basic/wrapping-dead-wrapper.js @@ -0,0 +1,9 @@ +// Make sure the wrapper machinery returns a dead wrapper instead of a CCW when +// attempting to wrap a dead wrapper. +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var wrapper = g1.Math; +nukeCCW(wrapper); +assertEq(isSameCompartment(wrapper, this), true); +g2.wrapper = wrapper; +g2.eval("assertEq(isSameCompartment(wrapper, this), true)"); diff --git a/js/src/jit-test/tests/basic/write-frozen-dense-strict-inlinecache.js b/js/src/jit-test/tests/basic/write-frozen-dense-strict-inlinecache.js new file mode 100644 index 0000000000..abb620c6eb --- /dev/null +++ b/js/src/jit-test/tests/basic/write-frozen-dense-strict-inlinecache.js @@ -0,0 +1,20 @@ +// |jit-test| --no-threads; --ion-eager; +setJitCompilerOption('ion.forceinlineCaches', 1); +function foo(t) { + "use strict"; + var stop; + do { + let ok = false; + stop = inIon(); + try { + t[0] = 2; + } catch(e) { + ok = true; + } + assertEq(ok, true); + } while (!stop); +} +var t = [4]; +Object.freeze(t); +foo(t); +foo(t); diff --git a/js/src/jit-test/tests/basic/write-frozen-dense-strict.js b/js/src/jit-test/tests/basic/write-frozen-dense-strict.js new file mode 100644 index 0000000000..9ee6b6c6dc --- /dev/null +++ b/js/src/jit-test/tests/basic/write-frozen-dense-strict.js @@ -0,0 +1,14 @@ +"use strict"; +var t = [4]; +var stop; +Object.freeze(t); +do { + let ok = false; + stop = inIon(); + try { + t[0] = 2; + } catch(e) { + ok = true; + } + assertEq(ok, true); +} while (!stop); diff --git a/js/src/jit-test/tests/basic/write-frozen-dense.js b/js/src/jit-test/tests/basic/write-frozen-dense.js new file mode 100644 index 0000000000..7e09c330b0 --- /dev/null +++ b/js/src/jit-test/tests/basic/write-frozen-dense.js @@ -0,0 +1,8 @@ +var t = [4]; +var stop; +Object.freeze(t); +do { + stop = inIon(); + t[0] = 2; + assertEq(t[0], 4); +} while (!stop); diff --git a/js/src/jit-test/tests/basic/write-frozen-property-strict.js b/js/src/jit-test/tests/basic/write-frozen-property-strict.js new file mode 100644 index 0000000000..c9c4027612 --- /dev/null +++ b/js/src/jit-test/tests/basic/write-frozen-property-strict.js @@ -0,0 +1,14 @@ +function foo(x) { + "use strict"; + var ok = false; + try { + x.a = 10; + } catch(e) { + ok = true; + } + assertEq(ok, true); + assertEq(x.a, 0); +} +x = {a:0,b:1}; +Object.freeze(x); +foo(x); diff --git a/js/src/jit-test/tests/basic/write-frozen-property.js b/js/src/jit-test/tests/basic/write-frozen-property.js new file mode 100644 index 0000000000..a6228fbb00 --- /dev/null +++ b/js/src/jit-test/tests/basic/write-frozen-property.js @@ -0,0 +1,7 @@ +function foo(x) { + x.a = 10; + assertEq(x.a, 0); +} +x = {a:0,b:1}; +Object.freeze(x); +foo(x); diff --git a/js/src/jit-test/tests/basic/xml-in-strict.js b/js/src/jit-test/tests/basic/xml-in-strict.js new file mode 100644 index 0000000000..0e2ddf89b5 --- /dev/null +++ b/js/src/jit-test/tests/basic/xml-in-strict.js @@ -0,0 +1,17 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +function checkSyntaxError(code) { + var error; + try { + eval(code); + } catch (e) { + error = e; + } + assertEq(error.name, 'SyntaxError'); +} + +checkSyntaxError('"use strict"; *'); +checkSyntaxError('"use strict"; @7'); diff --git a/js/src/jit-test/tests/basic/xprop.js b/js/src/jit-test/tests/basic/xprop.js new file mode 100644 index 0000000000..9fdbb66637 --- /dev/null +++ b/js/src/jit-test/tests/basic/xprop.js @@ -0,0 +1,8 @@ +function xprop() +{ + a = 0; + for (var i = 0; i < 20; i++) + a += 7; + return a; +} +assertEq(xprop(), 140); diff --git a/js/src/jit-test/tests/bigint/asIntN.js b/js/src/jit-test/tests/bigint/asIntN.js new file mode 100644 index 0000000000..392d8f63b0 --- /dev/null +++ b/js/src/jit-test/tests/bigint/asIntN.js @@ -0,0 +1,473 @@ +const tests = [ + [-0x10000000000000001n, 0, 0n], + [-0x10000000000000000n, 0, 0n], + [-0xffffffffffffffffn, 0, 0n], + [-0xfffffffffffffffen, 0, 0n], + [-0x8000000000000001n, 0, 0n], + [-0x8000000000000000n, 0, 0n], + [-0x7fffffffffffffffn, 0, 0n], + [-0x7ffffffffffffffen, 0, 0n], + [-0x100000001n, 0, 0n], + [-0x100000000n, 0, 0n], + [-0xffffffffn, 0, 0n], + [-0xfffffffen, 0, 0n], + [-0x80000001n, 0, 0n], + [-0x80000000n, 0, 0n], + [-0x7fffffffn, 0, 0n], + [-0x7ffffffen, 0, 0n], + [-9n, 0, 0n], + [-8n, 0, 0n], + [-7n, 0, 0n], + [-6n, 0, 0n], + [-5n, 0, 0n], + [-4n, 0, 0n], + [-3n, 0, 0n], + [-2n, 0, 0n], + [-1n, 0, 0n], + [0n, 0, 0n], + [1n, 0, 0n], + [2n, 0, 0n], + [3n, 0, 0n], + [4n, 0, 0n], + [5n, 0, 0n], + [6n, 0, 0n], + [7n, 0, 0n], + [8n, 0, 0n], + [9n, 0, 0n], + [0x7ffffffen, 0, 0n], + [0x7fffffffn, 0, 0n], + [0x80000000n, 0, 0n], + [0x80000001n, 0, 0n], + [0xfffffffen, 0, 0n], + [0xffffffffn, 0, 0n], + [0x100000000n, 0, 0n], + [0x100000001n, 0, 0n], + [0x7ffffffffffffffen, 0, 0n], + [0x7fffffffffffffffn, 0, 0n], + [0x8000000000000000n, 0, 0n], + [0x8000000000000001n, 0, 0n], + [0xfffffffffffffffen, 0, 0n], + [0xffffffffffffffffn, 0, 0n], + [0x10000000000000000n, 0, 0n], + [0x10000000000000001n, 0, 0n], + [-0x10000000000000001n, 1, -1n], + [-0x10000000000000000n, 1, 0n], + [-0xffffffffffffffffn, 1, -1n], + [-0xfffffffffffffffen, 1, 0n], + [-0x8000000000000001n, 1, -1n], + [-0x8000000000000000n, 1, 0n], + [-0x7fffffffffffffffn, 1, -1n], + [-0x7ffffffffffffffen, 1, 0n], + [-0x100000001n, 1, -1n], + [-0x100000000n, 1, 0n], + [-0xffffffffn, 1, -1n], + [-0xfffffffen, 1, 0n], + [-0x80000001n, 1, -1n], + [-0x80000000n, 1, 0n], + [-0x7fffffffn, 1, -1n], + [-0x7ffffffen, 1, 0n], + [-9n, 1, -1n], + [-8n, 1, 0n], + [-7n, 1, -1n], + [-6n, 1, 0n], + [-5n, 1, -1n], + [-4n, 1, 0n], + [-3n, 1, -1n], + [-2n, 1, 0n], + [-1n, 1, -1n], + [0n, 1, 0n], + [1n, 1, -1n], + [2n, 1, 0n], + [3n, 1, -1n], + [4n, 1, 0n], + [5n, 1, -1n], + [6n, 1, 0n], + [7n, 1, -1n], + [8n, 1, 0n], + [9n, 1, -1n], + [0x7ffffffen, 1, 0n], + [0x7fffffffn, 1, -1n], + [0x80000000n, 1, 0n], + [0x80000001n, 1, -1n], + [0xfffffffen, 1, 0n], + [0xffffffffn, 1, -1n], + [0x100000000n, 1, 0n], + [0x100000001n, 1, -1n], + [0x7ffffffffffffffen, 1, 0n], + [0x7fffffffffffffffn, 1, -1n], + [0x8000000000000000n, 1, 0n], + [0x8000000000000001n, 1, -1n], + [0xfffffffffffffffen, 1, 0n], + [0xffffffffffffffffn, 1, -1n], + [0x10000000000000000n, 1, 0n], + [0x10000000000000001n, 1, -1n], + [-0x10000000000000001n, 2, -1n], + [-0x10000000000000000n, 2, 0n], + [-0xffffffffffffffffn, 2, 1n], + [-0xfffffffffffffffen, 2, -2n], + [-0x8000000000000001n, 2, -1n], + [-0x8000000000000000n, 2, 0n], + [-0x7fffffffffffffffn, 2, 1n], + [-0x7ffffffffffffffen, 2, -2n], + [-0x100000001n, 2, -1n], + [-0x100000000n, 2, 0n], + [-0xffffffffn, 2, 1n], + [-0xfffffffen, 2, -2n], + [-0x80000001n, 2, -1n], + [-0x80000000n, 2, 0n], + [-0x7fffffffn, 2, 1n], + [-0x7ffffffen, 2, -2n], + [-9n, 2, -1n], + [-8n, 2, 0n], + [-7n, 2, 1n], + [-6n, 2, -2n], + [-5n, 2, -1n], + [-4n, 2, 0n], + [-3n, 2, 1n], + [-2n, 2, -2n], + [-1n, 2, -1n], + [0n, 2, 0n], + [1n, 2, 1n], + [2n, 2, -2n], + [3n, 2, -1n], + [4n, 2, 0n], + [5n, 2, 1n], + [6n, 2, -2n], + [7n, 2, -1n], + [8n, 2, 0n], + [9n, 2, 1n], + [0x7ffffffen, 2, -2n], + [0x7fffffffn, 2, -1n], + [0x80000000n, 2, 0n], + [0x80000001n, 2, 1n], + [0xfffffffen, 2, -2n], + [0xffffffffn, 2, -1n], + [0x100000000n, 2, 0n], + [0x100000001n, 2, 1n], + [0x7ffffffffffffffen, 2, -2n], + [0x7fffffffffffffffn, 2, -1n], + [0x8000000000000000n, 2, 0n], + [0x8000000000000001n, 2, 1n], + [0xfffffffffffffffen, 2, -2n], + [0xffffffffffffffffn, 2, -1n], + [0x10000000000000000n, 2, 0n], + [0x10000000000000001n, 2, 1n], + [-0x10000000000000001n, 31, -1n], + [-0x10000000000000000n, 31, 0n], + [-0xffffffffffffffffn, 31, 1n], + [-0xfffffffffffffffen, 31, 2n], + [-0x8000000000000001n, 31, -1n], + [-0x8000000000000000n, 31, 0n], + [-0x7fffffffffffffffn, 31, 1n], + [-0x7ffffffffffffffen, 31, 2n], + [-0x100000001n, 31, -1n], + [-0x100000000n, 31, 0n], + [-0xffffffffn, 31, 1n], + [-0xfffffffen, 31, 2n], + [-0x80000001n, 31, -1n], + [-0x80000000n, 31, 0n], + [-0x7fffffffn, 31, 1n], + [-0x7ffffffen, 31, 2n], + [-9n, 31, -9n], + [-8n, 31, -8n], + [-7n, 31, -7n], + [-6n, 31, -6n], + [-5n, 31, -5n], + [-4n, 31, -4n], + [-3n, 31, -3n], + [-2n, 31, -2n], + [-1n, 31, -1n], + [0n, 31, 0n], + [1n, 31, 1n], + [2n, 31, 2n], + [3n, 31, 3n], + [4n, 31, 4n], + [5n, 31, 5n], + [6n, 31, 6n], + [7n, 31, 7n], + [8n, 31, 8n], + [9n, 31, 9n], + [0x7ffffffen, 31, -2n], + [0x7fffffffn, 31, -1n], + [0x80000000n, 31, 0n], + [0x80000001n, 31, 1n], + [0xfffffffen, 31, -2n], + [0xffffffffn, 31, -1n], + [0x100000000n, 31, 0n], + [0x100000001n, 31, 1n], + [0x7ffffffffffffffen, 31, -2n], + [0x7fffffffffffffffn, 31, -1n], + [0x8000000000000000n, 31, 0n], + [0x8000000000000001n, 31, 1n], + [0xfffffffffffffffen, 31, -2n], + [0xffffffffffffffffn, 31, -1n], + [0x10000000000000000n, 31, 0n], + [0x10000000000000001n, 31, 1n], + [-0x10000000000000001n, 32, -1n], + [-0x10000000000000000n, 32, 0n], + [-0xffffffffffffffffn, 32, 1n], + [-0xfffffffffffffffen, 32, 2n], + [-0x8000000000000001n, 32, -1n], + [-0x8000000000000000n, 32, 0n], + [-0x7fffffffffffffffn, 32, 1n], + [-0x7ffffffffffffffen, 32, 2n], + [-0x100000001n, 32, -1n], + [-0x100000000n, 32, 0n], + [-0xffffffffn, 32, 1n], + [-0xfffffffen, 32, 2n], + [-0x80000001n, 32, 0x7fffffffn], + [-0x80000000n, 32, -0x80000000n], + [-0x7fffffffn, 32, -0x7fffffffn], + [-0x7ffffffen, 32, -0x7ffffffen], + [-9n, 32, -9n], + [-8n, 32, -8n], + [-7n, 32, -7n], + [-6n, 32, -6n], + [-5n, 32, -5n], + [-4n, 32, -4n], + [-3n, 32, -3n], + [-2n, 32, -2n], + [-1n, 32, -1n], + [0n, 32, 0n], + [1n, 32, 1n], + [2n, 32, 2n], + [3n, 32, 3n], + [4n, 32, 4n], + [5n, 32, 5n], + [6n, 32, 6n], + [7n, 32, 7n], + [8n, 32, 8n], + [9n, 32, 9n], + [0x7ffffffen, 32, 0x7ffffffen], + [0x7fffffffn, 32, 0x7fffffffn], + [0x80000000n, 32, -0x80000000n], + [0x80000001n, 32, -0x7fffffffn], + [0xfffffffen, 32, -2n], + [0xffffffffn, 32, -1n], + [0x100000000n, 32, 0n], + [0x100000001n, 32, 1n], + [0x7ffffffffffffffen, 32, -2n], + [0x7fffffffffffffffn, 32, -1n], + [0x8000000000000000n, 32, 0n], + [0x8000000000000001n, 32, 1n], + [0xfffffffffffffffen, 32, -2n], + [0xffffffffffffffffn, 32, -1n], + [0x10000000000000000n, 32, 0n], + [0x10000000000000001n, 32, 1n], + [-0x10000000000000001n, 33, -1n], + [-0x10000000000000000n, 33, 0n], + [-0xffffffffffffffffn, 33, 1n], + [-0xfffffffffffffffen, 33, 2n], + [-0x8000000000000001n, 33, -1n], + [-0x8000000000000000n, 33, 0n], + [-0x7fffffffffffffffn, 33, 1n], + [-0x7ffffffffffffffen, 33, 2n], + [-0x100000001n, 33, 0xffffffffn], + [-0x100000000n, 33, -0x100000000n], + [-0xffffffffn, 33, -0xffffffffn], + [-0xfffffffen, 33, -0xfffffffen], + [-0x80000001n, 33, -0x80000001n], + [-0x80000000n, 33, -0x80000000n], + [-0x7fffffffn, 33, -0x7fffffffn], + [-0x7ffffffen, 33, -0x7ffffffen], + [-9n, 33, -9n], + [-8n, 33, -8n], + [-7n, 33, -7n], + [-6n, 33, -6n], + [-5n, 33, -5n], + [-4n, 33, -4n], + [-3n, 33, -3n], + [-2n, 33, -2n], + [-1n, 33, -1n], + [0n, 33, 0n], + [1n, 33, 1n], + [2n, 33, 2n], + [3n, 33, 3n], + [4n, 33, 4n], + [5n, 33, 5n], + [6n, 33, 6n], + [7n, 33, 7n], + [8n, 33, 8n], + [9n, 33, 9n], + [0x7ffffffen, 33, 0x7ffffffen], + [0x7fffffffn, 33, 0x7fffffffn], + [0x80000000n, 33, 0x80000000n], + [0x80000001n, 33, 0x80000001n], + [0xfffffffen, 33, 0xfffffffen], + [0xffffffffn, 33, 0xffffffffn], + [0x100000000n, 33, -0x100000000n], + [0x100000001n, 33, -0xffffffffn], + [0x7ffffffffffffffen, 33, -2n], + [0x7fffffffffffffffn, 33, -1n], + [0x8000000000000000n, 33, 0n], + [0x8000000000000001n, 33, 1n], + [0xfffffffffffffffen, 33, -2n], + [0xffffffffffffffffn, 33, -1n], + [0x10000000000000000n, 33, 0n], + [0x10000000000000001n, 33, 1n], + [-0x10000000000000001n, 63, -1n], + [-0x10000000000000000n, 63, 0n], + [-0xffffffffffffffffn, 63, 1n], + [-0xfffffffffffffffen, 63, 2n], + [-0x8000000000000001n, 63, -1n], + [-0x8000000000000000n, 63, 0n], + [-0x7fffffffffffffffn, 63, 1n], + [-0x7ffffffffffffffen, 63, 2n], + [-0x100000001n, 63, -0x100000001n], + [-0x100000000n, 63, -0x100000000n], + [-0xffffffffn, 63, -0xffffffffn], + [-0xfffffffen, 63, -0xfffffffen], + [-0x80000001n, 63, -0x80000001n], + [-0x80000000n, 63, -0x80000000n], + [-0x7fffffffn, 63, -0x7fffffffn], + [-0x7ffffffen, 63, -0x7ffffffen], + [-9n, 63, -9n], + [-8n, 63, -8n], + [-7n, 63, -7n], + [-6n, 63, -6n], + [-5n, 63, -5n], + [-4n, 63, -4n], + [-3n, 63, -3n], + [-2n, 63, -2n], + [-1n, 63, -1n], + [0n, 63, 0n], + [1n, 63, 1n], + [2n, 63, 2n], + [3n, 63, 3n], + [4n, 63, 4n], + [5n, 63, 5n], + [6n, 63, 6n], + [7n, 63, 7n], + [8n, 63, 8n], + [9n, 63, 9n], + [0x7ffffffen, 63, 0x7ffffffen], + [0x7fffffffn, 63, 0x7fffffffn], + [0x80000000n, 63, 0x80000000n], + [0x80000001n, 63, 0x80000001n], + [0xfffffffen, 63, 0xfffffffen], + [0xffffffffn, 63, 0xffffffffn], + [0x100000000n, 63, 0x100000000n], + [0x100000001n, 63, 0x100000001n], + [0x7ffffffffffffffen, 63, -2n], + [0x7fffffffffffffffn, 63, -1n], + [0x8000000000000000n, 63, 0n], + [0x8000000000000001n, 63, 1n], + [0xfffffffffffffffen, 63, -2n], + [0xffffffffffffffffn, 63, -1n], + [0x10000000000000000n, 63, 0n], + [0x10000000000000001n, 63, 1n], + [-0x10000000000000001n, 64, -1n], + [-0x10000000000000000n, 64, 0n], + [-0xffffffffffffffffn, 64, 1n], + [-0xfffffffffffffffen, 64, 2n], + [-0x8000000000000001n, 64, 0x7fffffffffffffffn], + [-0x8000000000000000n, 64, -0x8000000000000000n], + [-0x7fffffffffffffffn, 64, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 64, -0x7ffffffffffffffen], + [-0x100000001n, 64, -0x100000001n], + [-0x100000000n, 64, -0x100000000n], + [-0xffffffffn, 64, -0xffffffffn], + [-0xfffffffen, 64, -0xfffffffen], + [-0x80000001n, 64, -0x80000001n], + [-0x80000000n, 64, -0x80000000n], + [-0x7fffffffn, 64, -0x7fffffffn], + [-0x7ffffffen, 64, -0x7ffffffen], + [-9n, 64, -9n], + [-8n, 64, -8n], + [-7n, 64, -7n], + [-6n, 64, -6n], + [-5n, 64, -5n], + [-4n, 64, -4n], + [-3n, 64, -3n], + [-2n, 64, -2n], + [-1n, 64, -1n], + [0n, 64, 0n], + [1n, 64, 1n], + [2n, 64, 2n], + [3n, 64, 3n], + [4n, 64, 4n], + [5n, 64, 5n], + [6n, 64, 6n], + [7n, 64, 7n], + [8n, 64, 8n], + [9n, 64, 9n], + [0x7ffffffen, 64, 0x7ffffffen], + [0x7fffffffn, 64, 0x7fffffffn], + [0x80000000n, 64, 0x80000000n], + [0x80000001n, 64, 0x80000001n], + [0xfffffffen, 64, 0xfffffffen], + [0xffffffffn, 64, 0xffffffffn], + [0x100000000n, 64, 0x100000000n], + [0x100000001n, 64, 0x100000001n], + [0x7ffffffffffffffen, 64, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 64, 0x7fffffffffffffffn], + [0x8000000000000000n, 64, -0x8000000000000000n], + [0x8000000000000001n, 64, -0x7fffffffffffffffn], + [0xfffffffffffffffen, 64, -2n], + [0xffffffffffffffffn, 64, -1n], + [0x10000000000000000n, 64, 0n], + [0x10000000000000001n, 64, 1n], + [-0x10000000000000001n, 65, 0xffffffffffffffffn], + [-0x10000000000000000n, 65, -0x10000000000000000n], + [-0xffffffffffffffffn, 65, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 65, -0xfffffffffffffffen], + [-0x8000000000000001n, 65, -0x8000000000000001n], + [-0x8000000000000000n, 65, -0x8000000000000000n], + [-0x7fffffffffffffffn, 65, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 65, -0x7ffffffffffffffen], + [-0x100000001n, 65, -0x100000001n], + [-0x100000000n, 65, -0x100000000n], + [-0xffffffffn, 65, -0xffffffffn], + [-0xfffffffen, 65, -0xfffffffen], + [-0x80000001n, 65, -0x80000001n], + [-0x80000000n, 65, -0x80000000n], + [-0x7fffffffn, 65, -0x7fffffffn], + [-0x7ffffffen, 65, -0x7ffffffen], + [-9n, 65, -9n], + [-8n, 65, -8n], + [-7n, 65, -7n], + [-6n, 65, -6n], + [-5n, 65, -5n], + [-4n, 65, -4n], + [-3n, 65, -3n], + [-2n, 65, -2n], + [-1n, 65, -1n], + [0n, 65, 0n], + [1n, 65, 1n], + [2n, 65, 2n], + [3n, 65, 3n], + [4n, 65, 4n], + [5n, 65, 5n], + [6n, 65, 6n], + [7n, 65, 7n], + [8n, 65, 8n], + [9n, 65, 9n], + [0x7ffffffen, 65, 0x7ffffffen], + [0x7fffffffn, 65, 0x7fffffffn], + [0x80000000n, 65, 0x80000000n], + [0x80000001n, 65, 0x80000001n], + [0xfffffffen, 65, 0xfffffffen], + [0xffffffffn, 65, 0xffffffffn], + [0x100000000n, 65, 0x100000000n], + [0x100000001n, 65, 0x100000001n], + [0x7ffffffffffffffen, 65, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 65, 0x7fffffffffffffffn], + [0x8000000000000000n, 65, 0x8000000000000000n], + [0x8000000000000001n, 65, 0x8000000000000001n], + [0xfffffffffffffffen, 65, 0xfffffffffffffffen], + [0xffffffffffffffffn, 65, 0xffffffffffffffffn], + [0x10000000000000000n, 65, -0x10000000000000000n], + [0x10000000000000001n, 65, -0xffffffffffffffffn], +]; + +function f(tests) { + for (let test of tests) { + let input = test[0], bits = test[1], expected = test[2]; + + assertEq(BigInt.asIntN(bits, input), expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/asIntN32.js b/js/src/jit-test/tests/bigint/asIntN32.js new file mode 100644 index 0000000000..ebc570d965 --- /dev/null +++ b/js/src/jit-test/tests/bigint/asIntN32.js @@ -0,0 +1,65 @@ +const tests = [ + [-0x10000000000000001n, -1n], + [-0x10000000000000000n, 0n], + [-0xffffffffffffffffn, 1n], + [-0xfffffffffffffffen, 2n], + [-0x8000000000000001n, -1n], + [-0x8000000000000000n, 0n], + [-0x7fffffffffffffffn, 1n], + [-0x7ffffffffffffffen, 2n], + [-0x100000001n, -1n], + [-0x100000000n, 0n], + [-0xffffffffn, 1n], + [-0xfffffffen, 2n], + [-0x80000001n, 0x7fffffffn], + [-0x80000000n, -0x80000000n], + [-0x7fffffffn, -0x7fffffffn], + [-0x7ffffffen, -0x7ffffffen], + [-9n, -9n], + [-8n, -8n], + [-7n, -7n], + [-6n, -6n], + [-5n, -5n], + [-4n, -4n], + [-3n, -3n], + [-2n, -2n], + [-1n, -1n], + [0n, 0n], + [1n, 1n], + [2n, 2n], + [3n, 3n], + [4n, 4n], + [5n, 5n], + [6n, 6n], + [7n, 7n], + [8n, 8n], + [9n, 9n], + [0x7ffffffen, 0x7ffffffen], + [0x7fffffffn, 0x7fffffffn], + [0x80000000n, -0x80000000n], + [0x80000001n, -0x7fffffffn], + [0xfffffffen, -2n], + [0xffffffffn, -1n], + [0x100000000n, 0n], + [0x100000001n, 1n], + [0x7ffffffffffffffen, -2n], + [0x7fffffffffffffffn, -1n], + [0x8000000000000000n, 0n], + [0x8000000000000001n, 1n], + [0xfffffffffffffffen, -2n], + [0xffffffffffffffffn, -1n], + [0x10000000000000000n, 0n], + [0x10000000000000001n, 1n], +]; + +function f(tests) { + for (let test of tests) { + let input = test[0], expected = test[1]; + + assertEq(BigInt.asIntN(32, input), expected); + } +} + +for (let i = 0; i < 100; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/asIntN64.js b/js/src/jit-test/tests/bigint/asIntN64.js new file mode 100644 index 0000000000..5725d32f04 --- /dev/null +++ b/js/src/jit-test/tests/bigint/asIntN64.js @@ -0,0 +1,65 @@ +const tests = [ + [-0x10000000000000001n, -1n], + [-0x10000000000000000n, 0n], + [-0xffffffffffffffffn, 1n], + [-0xfffffffffffffffen, 2n], + [-0x8000000000000001n, 0x7fffffffffffffffn], + [-0x8000000000000000n, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0x7ffffffffffffffen], + [-0x100000001n, -0x100000001n], + [-0x100000000n, -0x100000000n], + [-0xffffffffn, -0xffffffffn], + [-0xfffffffen, -0xfffffffen], + [-0x80000001n, -0x80000001n], + [-0x80000000n, -0x80000000n], + [-0x7fffffffn, -0x7fffffffn], + [-0x7ffffffen, -0x7ffffffen], + [-9n, -9n], + [-8n, -8n], + [-7n, -7n], + [-6n, -6n], + [-5n, -5n], + [-4n, -4n], + [-3n, -3n], + [-2n, -2n], + [-1n, -1n], + [0n, 0n], + [1n, 1n], + [2n, 2n], + [3n, 3n], + [4n, 4n], + [5n, 5n], + [6n, 6n], + [7n, 7n], + [8n, 8n], + [9n, 9n], + [0x7ffffffen, 0x7ffffffen], + [0x7fffffffn, 0x7fffffffn], + [0x80000000n, 0x80000000n], + [0x80000001n, 0x80000001n], + [0xfffffffen, 0xfffffffen], + [0xffffffffn, 0xffffffffn], + [0x100000000n, 0x100000000n], + [0x100000001n, 0x100000001n], + [0x7ffffffffffffffen, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0x7fffffffffffffffn], + [0x8000000000000000n, -0x8000000000000000n], + [0x8000000000000001n, -0x7fffffffffffffffn], + [0xfffffffffffffffen, -2n], + [0xffffffffffffffffn, -1n], + [0x10000000000000000n, 0n], + [0x10000000000000001n, 1n], +]; + +function f(tests) { + for (let test of tests) { + let input = test[0], expected = test[1]; + + assertEq(BigInt.asIntN(64, input), expected); + } +} + +for (let i = 0; i < 100; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/asUintN.js b/js/src/jit-test/tests/bigint/asUintN.js new file mode 100644 index 0000000000..07e1d9b6ac --- /dev/null +++ b/js/src/jit-test/tests/bigint/asUintN.js @@ -0,0 +1,473 @@ +const tests = [ + [-0x10000000000000001n, 0, 0n], + [-0x10000000000000000n, 0, 0n], + [-0xffffffffffffffffn, 0, 0n], + [-0xfffffffffffffffen, 0, 0n], + [-0x8000000000000001n, 0, 0n], + [-0x8000000000000000n, 0, 0n], + [-0x7fffffffffffffffn, 0, 0n], + [-0x7ffffffffffffffen, 0, 0n], + [-0x100000001n, 0, 0n], + [-0x100000000n, 0, 0n], + [-0xffffffffn, 0, 0n], + [-0xfffffffen, 0, 0n], + [-0x80000001n, 0, 0n], + [-0x80000000n, 0, 0n], + [-0x7fffffffn, 0, 0n], + [-0x7ffffffen, 0, 0n], + [-9n, 0, 0n], + [-8n, 0, 0n], + [-7n, 0, 0n], + [-6n, 0, 0n], + [-5n, 0, 0n], + [-4n, 0, 0n], + [-3n, 0, 0n], + [-2n, 0, 0n], + [-1n, 0, 0n], + [0n, 0, 0n], + [1n, 0, 0n], + [2n, 0, 0n], + [3n, 0, 0n], + [4n, 0, 0n], + [5n, 0, 0n], + [6n, 0, 0n], + [7n, 0, 0n], + [8n, 0, 0n], + [9n, 0, 0n], + [0x7ffffffen, 0, 0n], + [0x7fffffffn, 0, 0n], + [0x80000000n, 0, 0n], + [0x80000001n, 0, 0n], + [0xfffffffen, 0, 0n], + [0xffffffffn, 0, 0n], + [0x100000000n, 0, 0n], + [0x100000001n, 0, 0n], + [0x7ffffffffffffffen, 0, 0n], + [0x7fffffffffffffffn, 0, 0n], + [0x8000000000000000n, 0, 0n], + [0x8000000000000001n, 0, 0n], + [0xfffffffffffffffen, 0, 0n], + [0xffffffffffffffffn, 0, 0n], + [0x10000000000000000n, 0, 0n], + [0x10000000000000001n, 0, 0n], + [-0x10000000000000001n, 1, 1n], + [-0x10000000000000000n, 1, 0n], + [-0xffffffffffffffffn, 1, 1n], + [-0xfffffffffffffffen, 1, 0n], + [-0x8000000000000001n, 1, 1n], + [-0x8000000000000000n, 1, 0n], + [-0x7fffffffffffffffn, 1, 1n], + [-0x7ffffffffffffffen, 1, 0n], + [-0x100000001n, 1, 1n], + [-0x100000000n, 1, 0n], + [-0xffffffffn, 1, 1n], + [-0xfffffffen, 1, 0n], + [-0x80000001n, 1, 1n], + [-0x80000000n, 1, 0n], + [-0x7fffffffn, 1, 1n], + [-0x7ffffffen, 1, 0n], + [-9n, 1, 1n], + [-8n, 1, 0n], + [-7n, 1, 1n], + [-6n, 1, 0n], + [-5n, 1, 1n], + [-4n, 1, 0n], + [-3n, 1, 1n], + [-2n, 1, 0n], + [-1n, 1, 1n], + [0n, 1, 0n], + [1n, 1, 1n], + [2n, 1, 0n], + [3n, 1, 1n], + [4n, 1, 0n], + [5n, 1, 1n], + [6n, 1, 0n], + [7n, 1, 1n], + [8n, 1, 0n], + [9n, 1, 1n], + [0x7ffffffen, 1, 0n], + [0x7fffffffn, 1, 1n], + [0x80000000n, 1, 0n], + [0x80000001n, 1, 1n], + [0xfffffffen, 1, 0n], + [0xffffffffn, 1, 1n], + [0x100000000n, 1, 0n], + [0x100000001n, 1, 1n], + [0x7ffffffffffffffen, 1, 0n], + [0x7fffffffffffffffn, 1, 1n], + [0x8000000000000000n, 1, 0n], + [0x8000000000000001n, 1, 1n], + [0xfffffffffffffffen, 1, 0n], + [0xffffffffffffffffn, 1, 1n], + [0x10000000000000000n, 1, 0n], + [0x10000000000000001n, 1, 1n], + [-0x10000000000000001n, 2, 3n], + [-0x10000000000000000n, 2, 0n], + [-0xffffffffffffffffn, 2, 1n], + [-0xfffffffffffffffen, 2, 2n], + [-0x8000000000000001n, 2, 3n], + [-0x8000000000000000n, 2, 0n], + [-0x7fffffffffffffffn, 2, 1n], + [-0x7ffffffffffffffen, 2, 2n], + [-0x100000001n, 2, 3n], + [-0x100000000n, 2, 0n], + [-0xffffffffn, 2, 1n], + [-0xfffffffen, 2, 2n], + [-0x80000001n, 2, 3n], + [-0x80000000n, 2, 0n], + [-0x7fffffffn, 2, 1n], + [-0x7ffffffen, 2, 2n], + [-9n, 2, 3n], + [-8n, 2, 0n], + [-7n, 2, 1n], + [-6n, 2, 2n], + [-5n, 2, 3n], + [-4n, 2, 0n], + [-3n, 2, 1n], + [-2n, 2, 2n], + [-1n, 2, 3n], + [0n, 2, 0n], + [1n, 2, 1n], + [2n, 2, 2n], + [3n, 2, 3n], + [4n, 2, 0n], + [5n, 2, 1n], + [6n, 2, 2n], + [7n, 2, 3n], + [8n, 2, 0n], + [9n, 2, 1n], + [0x7ffffffen, 2, 2n], + [0x7fffffffn, 2, 3n], + [0x80000000n, 2, 0n], + [0x80000001n, 2, 1n], + [0xfffffffen, 2, 2n], + [0xffffffffn, 2, 3n], + [0x100000000n, 2, 0n], + [0x100000001n, 2, 1n], + [0x7ffffffffffffffen, 2, 2n], + [0x7fffffffffffffffn, 2, 3n], + [0x8000000000000000n, 2, 0n], + [0x8000000000000001n, 2, 1n], + [0xfffffffffffffffen, 2, 2n], + [0xffffffffffffffffn, 2, 3n], + [0x10000000000000000n, 2, 0n], + [0x10000000000000001n, 2, 1n], + [-0x10000000000000001n, 31, 0x7fffffffn], + [-0x10000000000000000n, 31, 0n], + [-0xffffffffffffffffn, 31, 1n], + [-0xfffffffffffffffen, 31, 2n], + [-0x8000000000000001n, 31, 0x7fffffffn], + [-0x8000000000000000n, 31, 0n], + [-0x7fffffffffffffffn, 31, 1n], + [-0x7ffffffffffffffen, 31, 2n], + [-0x100000001n, 31, 0x7fffffffn], + [-0x100000000n, 31, 0n], + [-0xffffffffn, 31, 1n], + [-0xfffffffen, 31, 2n], + [-0x80000001n, 31, 0x7fffffffn], + [-0x80000000n, 31, 0n], + [-0x7fffffffn, 31, 1n], + [-0x7ffffffen, 31, 2n], + [-9n, 31, 0x7ffffff7n], + [-8n, 31, 0x7ffffff8n], + [-7n, 31, 0x7ffffff9n], + [-6n, 31, 0x7ffffffan], + [-5n, 31, 0x7ffffffbn], + [-4n, 31, 0x7ffffffcn], + [-3n, 31, 0x7ffffffdn], + [-2n, 31, 0x7ffffffen], + [-1n, 31, 0x7fffffffn], + [0n, 31, 0n], + [1n, 31, 1n], + [2n, 31, 2n], + [3n, 31, 3n], + [4n, 31, 4n], + [5n, 31, 5n], + [6n, 31, 6n], + [7n, 31, 7n], + [8n, 31, 8n], + [9n, 31, 9n], + [0x7ffffffen, 31, 0x7ffffffen], + [0x7fffffffn, 31, 0x7fffffffn], + [0x80000000n, 31, 0n], + [0x80000001n, 31, 1n], + [0xfffffffen, 31, 0x7ffffffen], + [0xffffffffn, 31, 0x7fffffffn], + [0x100000000n, 31, 0n], + [0x100000001n, 31, 1n], + [0x7ffffffffffffffen, 31, 0x7ffffffen], + [0x7fffffffffffffffn, 31, 0x7fffffffn], + [0x8000000000000000n, 31, 0n], + [0x8000000000000001n, 31, 1n], + [0xfffffffffffffffen, 31, 0x7ffffffen], + [0xffffffffffffffffn, 31, 0x7fffffffn], + [0x10000000000000000n, 31, 0n], + [0x10000000000000001n, 31, 1n], + [-0x10000000000000001n, 32, 0xffffffffn], + [-0x10000000000000000n, 32, 0n], + [-0xffffffffffffffffn, 32, 1n], + [-0xfffffffffffffffen, 32, 2n], + [-0x8000000000000001n, 32, 0xffffffffn], + [-0x8000000000000000n, 32, 0n], + [-0x7fffffffffffffffn, 32, 1n], + [-0x7ffffffffffffffen, 32, 2n], + [-0x100000001n, 32, 0xffffffffn], + [-0x100000000n, 32, 0n], + [-0xffffffffn, 32, 1n], + [-0xfffffffen, 32, 2n], + [-0x80000001n, 32, 0x7fffffffn], + [-0x80000000n, 32, 0x80000000n], + [-0x7fffffffn, 32, 0x80000001n], + [-0x7ffffffen, 32, 0x80000002n], + [-9n, 32, 0xfffffff7n], + [-8n, 32, 0xfffffff8n], + [-7n, 32, 0xfffffff9n], + [-6n, 32, 0xfffffffan], + [-5n, 32, 0xfffffffbn], + [-4n, 32, 0xfffffffcn], + [-3n, 32, 0xfffffffdn], + [-2n, 32, 0xfffffffen], + [-1n, 32, 0xffffffffn], + [0n, 32, 0n], + [1n, 32, 1n], + [2n, 32, 2n], + [3n, 32, 3n], + [4n, 32, 4n], + [5n, 32, 5n], + [6n, 32, 6n], + [7n, 32, 7n], + [8n, 32, 8n], + [9n, 32, 9n], + [0x7ffffffen, 32, 0x7ffffffen], + [0x7fffffffn, 32, 0x7fffffffn], + [0x80000000n, 32, 0x80000000n], + [0x80000001n, 32, 0x80000001n], + [0xfffffffen, 32, 0xfffffffen], + [0xffffffffn, 32, 0xffffffffn], + [0x100000000n, 32, 0n], + [0x100000001n, 32, 1n], + [0x7ffffffffffffffen, 32, 0xfffffffen], + [0x7fffffffffffffffn, 32, 0xffffffffn], + [0x8000000000000000n, 32, 0n], + [0x8000000000000001n, 32, 1n], + [0xfffffffffffffffen, 32, 0xfffffffen], + [0xffffffffffffffffn, 32, 0xffffffffn], + [0x10000000000000000n, 32, 0n], + [0x10000000000000001n, 32, 1n], + [-0x10000000000000001n, 33, 0x1ffffffffn], + [-0x10000000000000000n, 33, 0n], + [-0xffffffffffffffffn, 33, 1n], + [-0xfffffffffffffffen, 33, 2n], + [-0x8000000000000001n, 33, 0x1ffffffffn], + [-0x8000000000000000n, 33, 0n], + [-0x7fffffffffffffffn, 33, 1n], + [-0x7ffffffffffffffen, 33, 2n], + [-0x100000001n, 33, 0xffffffffn], + [-0x100000000n, 33, 0x100000000n], + [-0xffffffffn, 33, 0x100000001n], + [-0xfffffffen, 33, 0x100000002n], + [-0x80000001n, 33, 0x17fffffffn], + [-0x80000000n, 33, 0x180000000n], + [-0x7fffffffn, 33, 0x180000001n], + [-0x7ffffffen, 33, 0x180000002n], + [-9n, 33, 0x1fffffff7n], + [-8n, 33, 0x1fffffff8n], + [-7n, 33, 0x1fffffff9n], + [-6n, 33, 0x1fffffffan], + [-5n, 33, 0x1fffffffbn], + [-4n, 33, 0x1fffffffcn], + [-3n, 33, 0x1fffffffdn], + [-2n, 33, 0x1fffffffen], + [-1n, 33, 0x1ffffffffn], + [0n, 33, 0n], + [1n, 33, 1n], + [2n, 33, 2n], + [3n, 33, 3n], + [4n, 33, 4n], + [5n, 33, 5n], + [6n, 33, 6n], + [7n, 33, 7n], + [8n, 33, 8n], + [9n, 33, 9n], + [0x7ffffffen, 33, 0x7ffffffen], + [0x7fffffffn, 33, 0x7fffffffn], + [0x80000000n, 33, 0x80000000n], + [0x80000001n, 33, 0x80000001n], + [0xfffffffen, 33, 0xfffffffen], + [0xffffffffn, 33, 0xffffffffn], + [0x100000000n, 33, 0x100000000n], + [0x100000001n, 33, 0x100000001n], + [0x7ffffffffffffffen, 33, 0x1fffffffen], + [0x7fffffffffffffffn, 33, 0x1ffffffffn], + [0x8000000000000000n, 33, 0n], + [0x8000000000000001n, 33, 1n], + [0xfffffffffffffffen, 33, 0x1fffffffen], + [0xffffffffffffffffn, 33, 0x1ffffffffn], + [0x10000000000000000n, 33, 0n], + [0x10000000000000001n, 33, 1n], + [-0x10000000000000001n, 63, 0x7fffffffffffffffn], + [-0x10000000000000000n, 63, 0n], + [-0xffffffffffffffffn, 63, 1n], + [-0xfffffffffffffffen, 63, 2n], + [-0x8000000000000001n, 63, 0x7fffffffffffffffn], + [-0x8000000000000000n, 63, 0n], + [-0x7fffffffffffffffn, 63, 1n], + [-0x7ffffffffffffffen, 63, 2n], + [-0x100000001n, 63, 0x7ffffffeffffffffn], + [-0x100000000n, 63, 0x7fffffff00000000n], + [-0xffffffffn, 63, 0x7fffffff00000001n], + [-0xfffffffen, 63, 0x7fffffff00000002n], + [-0x80000001n, 63, 0x7fffffff7fffffffn], + [-0x80000000n, 63, 0x7fffffff80000000n], + [-0x7fffffffn, 63, 0x7fffffff80000001n], + [-0x7ffffffen, 63, 0x7fffffff80000002n], + [-9n, 63, 0x7ffffffffffffff7n], + [-8n, 63, 0x7ffffffffffffff8n], + [-7n, 63, 0x7ffffffffffffff9n], + [-6n, 63, 0x7ffffffffffffffan], + [-5n, 63, 0x7ffffffffffffffbn], + [-4n, 63, 0x7ffffffffffffffcn], + [-3n, 63, 0x7ffffffffffffffdn], + [-2n, 63, 0x7ffffffffffffffen], + [-1n, 63, 0x7fffffffffffffffn], + [0n, 63, 0n], + [1n, 63, 1n], + [2n, 63, 2n], + [3n, 63, 3n], + [4n, 63, 4n], + [5n, 63, 5n], + [6n, 63, 6n], + [7n, 63, 7n], + [8n, 63, 8n], + [9n, 63, 9n], + [0x7ffffffen, 63, 0x7ffffffen], + [0x7fffffffn, 63, 0x7fffffffn], + [0x80000000n, 63, 0x80000000n], + [0x80000001n, 63, 0x80000001n], + [0xfffffffen, 63, 0xfffffffen], + [0xffffffffn, 63, 0xffffffffn], + [0x100000000n, 63, 0x100000000n], + [0x100000001n, 63, 0x100000001n], + [0x7ffffffffffffffen, 63, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 63, 0x7fffffffffffffffn], + [0x8000000000000000n, 63, 0n], + [0x8000000000000001n, 63, 1n], + [0xfffffffffffffffen, 63, 0x7ffffffffffffffen], + [0xffffffffffffffffn, 63, 0x7fffffffffffffffn], + [0x10000000000000000n, 63, 0n], + [0x10000000000000001n, 63, 1n], + [-0x10000000000000001n, 64, 0xffffffffffffffffn], + [-0x10000000000000000n, 64, 0n], + [-0xffffffffffffffffn, 64, 1n], + [-0xfffffffffffffffen, 64, 2n], + [-0x8000000000000001n, 64, 0x7fffffffffffffffn], + [-0x8000000000000000n, 64, 0x8000000000000000n], + [-0x7fffffffffffffffn, 64, 0x8000000000000001n], + [-0x7ffffffffffffffen, 64, 0x8000000000000002n], + [-0x100000001n, 64, 0xfffffffeffffffffn], + [-0x100000000n, 64, 0xffffffff00000000n], + [-0xffffffffn, 64, 0xffffffff00000001n], + [-0xfffffffen, 64, 0xffffffff00000002n], + [-0x80000001n, 64, 0xffffffff7fffffffn], + [-0x80000000n, 64, 0xffffffff80000000n], + [-0x7fffffffn, 64, 0xffffffff80000001n], + [-0x7ffffffen, 64, 0xffffffff80000002n], + [-9n, 64, 0xfffffffffffffff7n], + [-8n, 64, 0xfffffffffffffff8n], + [-7n, 64, 0xfffffffffffffff9n], + [-6n, 64, 0xfffffffffffffffan], + [-5n, 64, 0xfffffffffffffffbn], + [-4n, 64, 0xfffffffffffffffcn], + [-3n, 64, 0xfffffffffffffffdn], + [-2n, 64, 0xfffffffffffffffen], + [-1n, 64, 0xffffffffffffffffn], + [0n, 64, 0n], + [1n, 64, 1n], + [2n, 64, 2n], + [3n, 64, 3n], + [4n, 64, 4n], + [5n, 64, 5n], + [6n, 64, 6n], + [7n, 64, 7n], + [8n, 64, 8n], + [9n, 64, 9n], + [0x7ffffffen, 64, 0x7ffffffen], + [0x7fffffffn, 64, 0x7fffffffn], + [0x80000000n, 64, 0x80000000n], + [0x80000001n, 64, 0x80000001n], + [0xfffffffen, 64, 0xfffffffen], + [0xffffffffn, 64, 0xffffffffn], + [0x100000000n, 64, 0x100000000n], + [0x100000001n, 64, 0x100000001n], + [0x7ffffffffffffffen, 64, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 64, 0x7fffffffffffffffn], + [0x8000000000000000n, 64, 0x8000000000000000n], + [0x8000000000000001n, 64, 0x8000000000000001n], + [0xfffffffffffffffen, 64, 0xfffffffffffffffen], + [0xffffffffffffffffn, 64, 0xffffffffffffffffn], + [0x10000000000000000n, 64, 0n], + [0x10000000000000001n, 64, 1n], + [-0x10000000000000001n, 65, 0xffffffffffffffffn], + [-0x10000000000000000n, 65, 0x10000000000000000n], + [-0xffffffffffffffffn, 65, 0x10000000000000001n], + [-0xfffffffffffffffen, 65, 0x10000000000000002n], + [-0x8000000000000001n, 65, 0x17fffffffffffffffn], + [-0x8000000000000000n, 65, 0x18000000000000000n], + [-0x7fffffffffffffffn, 65, 0x18000000000000001n], + [-0x7ffffffffffffffen, 65, 0x18000000000000002n], + [-0x100000001n, 65, 0x1fffffffeffffffffn], + [-0x100000000n, 65, 0x1ffffffff00000000n], + [-0xffffffffn, 65, 0x1ffffffff00000001n], + [-0xfffffffen, 65, 0x1ffffffff00000002n], + [-0x80000001n, 65, 0x1ffffffff7fffffffn], + [-0x80000000n, 65, 0x1ffffffff80000000n], + [-0x7fffffffn, 65, 0x1ffffffff80000001n], + [-0x7ffffffen, 65, 0x1ffffffff80000002n], + [-9n, 65, 0x1fffffffffffffff7n], + [-8n, 65, 0x1fffffffffffffff8n], + [-7n, 65, 0x1fffffffffffffff9n], + [-6n, 65, 0x1fffffffffffffffan], + [-5n, 65, 0x1fffffffffffffffbn], + [-4n, 65, 0x1fffffffffffffffcn], + [-3n, 65, 0x1fffffffffffffffdn], + [-2n, 65, 0x1fffffffffffffffen], + [-1n, 65, 0x1ffffffffffffffffn], + [0n, 65, 0n], + [1n, 65, 1n], + [2n, 65, 2n], + [3n, 65, 3n], + [4n, 65, 4n], + [5n, 65, 5n], + [6n, 65, 6n], + [7n, 65, 7n], + [8n, 65, 8n], + [9n, 65, 9n], + [0x7ffffffen, 65, 0x7ffffffen], + [0x7fffffffn, 65, 0x7fffffffn], + [0x80000000n, 65, 0x80000000n], + [0x80000001n, 65, 0x80000001n], + [0xfffffffen, 65, 0xfffffffen], + [0xffffffffn, 65, 0xffffffffn], + [0x100000000n, 65, 0x100000000n], + [0x100000001n, 65, 0x100000001n], + [0x7ffffffffffffffen, 65, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 65, 0x7fffffffffffffffn], + [0x8000000000000000n, 65, 0x8000000000000000n], + [0x8000000000000001n, 65, 0x8000000000000001n], + [0xfffffffffffffffen, 65, 0xfffffffffffffffen], + [0xffffffffffffffffn, 65, 0xffffffffffffffffn], + [0x10000000000000000n, 65, 0x10000000000000000n], + [0x10000000000000001n, 65, 0x10000000000000001n], +]; + +function f(tests) { + for (let test of tests) { + let input = test[0], bits = test[1], expected = test[2]; + + assertEq(BigInt.asUintN(bits, input), expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/asUintN32.js b/js/src/jit-test/tests/bigint/asUintN32.js new file mode 100644 index 0000000000..36ea287bdd --- /dev/null +++ b/js/src/jit-test/tests/bigint/asUintN32.js @@ -0,0 +1,65 @@ +const tests = [ + [-0x10000000000000001n, 0xffffffffn], + [-0x10000000000000000n, 0n], + [-0xffffffffffffffffn, 1n], + [-0xfffffffffffffffen, 2n], + [-0x8000000000000001n, 0xffffffffn], + [-0x8000000000000000n, 0n], + [-0x7fffffffffffffffn, 1n], + [-0x7ffffffffffffffen, 2n], + [-0x100000001n, 0xffffffffn], + [-0x100000000n, 0n], + [-0xffffffffn, 1n], + [-0xfffffffen, 2n], + [-0x80000001n, 0x7fffffffn], + [-0x80000000n, 0x80000000n], + [-0x7fffffffn, 0x80000001n], + [-0x7ffffffen, 0x80000002n], + [-9n, 0xfffffff7n], + [-8n, 0xfffffff8n], + [-7n, 0xfffffff9n], + [-6n, 0xfffffffan], + [-5n, 0xfffffffbn], + [-4n, 0xfffffffcn], + [-3n, 0xfffffffdn], + [-2n, 0xfffffffen], + [-1n, 0xffffffffn], + [0n, 0n], + [1n, 1n], + [2n, 2n], + [3n, 3n], + [4n, 4n], + [5n, 5n], + [6n, 6n], + [7n, 7n], + [8n, 8n], + [9n, 9n], + [0x7ffffffen, 0x7ffffffen], + [0x7fffffffn, 0x7fffffffn], + [0x80000000n, 0x80000000n], + [0x80000001n, 0x80000001n], + [0xfffffffen, 0xfffffffen], + [0xffffffffn, 0xffffffffn], + [0x100000000n, 0n], + [0x100000001n, 1n], + [0x7ffffffffffffffen, 0xfffffffen], + [0x7fffffffffffffffn, 0xffffffffn], + [0x8000000000000000n, 0n], + [0x8000000000000001n, 1n], + [0xfffffffffffffffen, 0xfffffffen], + [0xffffffffffffffffn, 0xffffffffn], + [0x10000000000000000n, 0n], + [0x10000000000000001n, 1n], +]; + +function f(tests) { + for (let test of tests) { + let input = test[0], expected = test[1]; + + assertEq(BigInt.asUintN(32, input), expected); + } +} + +for (let i = 0; i < 100; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/asUintN64.js b/js/src/jit-test/tests/bigint/asUintN64.js new file mode 100644 index 0000000000..c0c416e9b4 --- /dev/null +++ b/js/src/jit-test/tests/bigint/asUintN64.js @@ -0,0 +1,65 @@ +const tests = [ + [-0x10000000000000001n, 0xffffffffffffffffn], + [-0x10000000000000000n, 0n], + [-0xffffffffffffffffn, 1n], + [-0xfffffffffffffffen, 2n], + [-0x8000000000000001n, 0x7fffffffffffffffn], + [-0x8000000000000000n, 0x8000000000000000n], + [-0x7fffffffffffffffn, 0x8000000000000001n], + [-0x7ffffffffffffffen, 0x8000000000000002n], + [-0x100000001n, 0xfffffffeffffffffn], + [-0x100000000n, 0xffffffff00000000n], + [-0xffffffffn, 0xffffffff00000001n], + [-0xfffffffen, 0xffffffff00000002n], + [-0x80000001n, 0xffffffff7fffffffn], + [-0x80000000n, 0xffffffff80000000n], + [-0x7fffffffn, 0xffffffff80000001n], + [-0x7ffffffen, 0xffffffff80000002n], + [-9n, 0xfffffffffffffff7n], + [-8n, 0xfffffffffffffff8n], + [-7n, 0xfffffffffffffff9n], + [-6n, 0xfffffffffffffffan], + [-5n, 0xfffffffffffffffbn], + [-4n, 0xfffffffffffffffcn], + [-3n, 0xfffffffffffffffdn], + [-2n, 0xfffffffffffffffen], + [-1n, 0xffffffffffffffffn], + [0n, 0n], + [1n, 1n], + [2n, 2n], + [3n, 3n], + [4n, 4n], + [5n, 5n], + [6n, 6n], + [7n, 7n], + [8n, 8n], + [9n, 9n], + [0x7ffffffen, 0x7ffffffen], + [0x7fffffffn, 0x7fffffffn], + [0x80000000n, 0x80000000n], + [0x80000001n, 0x80000001n], + [0xfffffffen, 0xfffffffen], + [0xffffffffn, 0xffffffffn], + [0x100000000n, 0x100000000n], + [0x100000001n, 0x100000001n], + [0x7ffffffffffffffen, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x8000000000000000n], + [0x8000000000000001n, 0x8000000000000001n], + [0xfffffffffffffffen, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0xffffffffffffffffn], + [0x10000000000000000n, 0n], + [0x10000000000000001n, 1n], +]; + +function f(tests) { + for (let test of tests) { + let input = test[0], expected = test[1]; + + assertEq(BigInt.asUintN(64, input), expected); + } +} + +for (let i = 0; i < 100; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-add.js b/js/src/jit-test/tests/bigint/bigint-add.js new file mode 100644 index 0000000000..1c679412dd --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-add.js @@ -0,0 +1,718 @@ +const tests = [ + [-0x10000000000000001n, -2n, -0x10000000000000003n], + [-0x10000000000000000n, -2n, -0x10000000000000002n], + [-0xffffffffffffffffn, -2n, -0x10000000000000001n], + [-0xfffffffffffffffen, -2n, -0x10000000000000000n], + [-0x8000000000000001n, -2n, -0x8000000000000003n], + [-0x8000000000000000n, -2n, -0x8000000000000002n], + [-0x7fffffffffffffffn, -2n, -0x8000000000000001n], + [-0x7ffffffffffffffen, -2n, -0x8000000000000000n], + [-0x100000001n, -2n, -0x100000003n], + [-0x100000000n, -2n, -0x100000002n], + [-0xffffffffn, -2n, -0x100000001n], + [-0xfffffffen, -2n, -0x100000000n], + [-0x80000001n, -2n, -0x80000003n], + [-0x80000000n, -2n, -0x80000002n], + [-0x7fffffffn, -2n, -0x80000001n], + [-0x7ffffffen, -2n, -0x80000000n], + [-2n, -2n, -4n], + [-1n, -2n, -3n], + [0n, -2n, -2n], + [1n, -2n, -1n], + [2n, -2n, 0n], + [0x7ffffffen, -2n, 0x7ffffffcn], + [0x7fffffffn, -2n, 0x7ffffffdn], + [0x80000000n, -2n, 0x7ffffffen], + [0x80000001n, -2n, 0x7fffffffn], + [0xfffffffen, -2n, 0xfffffffcn], + [0xffffffffn, -2n, 0xfffffffdn], + [0x100000000n, -2n, 0xfffffffen], + [0x100000001n, -2n, 0xffffffffn], + [0x7ffffffffffffffen, -2n, 0x7ffffffffffffffcn], + [0x7fffffffffffffffn, -2n, 0x7ffffffffffffffdn], + [0x8000000000000000n, -2n, 0x7ffffffffffffffen], + [0x8000000000000001n, -2n, 0x7fffffffffffffffn], + [0xfffffffffffffffen, -2n, 0xfffffffffffffffcn], + [0xffffffffffffffffn, -2n, 0xfffffffffffffffdn], + [0x10000000000000000n, -2n, 0xfffffffffffffffen], + [0x10000000000000001n, -2n, 0xffffffffffffffffn], + [-0x10000000000000001n, -1n, -0x10000000000000002n], + [-0x10000000000000000n, -1n, -0x10000000000000001n], + [-0xffffffffffffffffn, -1n, -0x10000000000000000n], + [-0xfffffffffffffffen, -1n, -0xffffffffffffffffn], + [-0x8000000000000001n, -1n, -0x8000000000000002n], + [-0x8000000000000000n, -1n, -0x8000000000000001n], + [-0x7fffffffffffffffn, -1n, -0x8000000000000000n], + [-0x7ffffffffffffffen, -1n, -0x7fffffffffffffffn], + [-0x100000001n, -1n, -0x100000002n], + [-0x100000000n, -1n, -0x100000001n], + [-0xffffffffn, -1n, -0x100000000n], + [-0xfffffffen, -1n, -0xffffffffn], + [-0x80000001n, -1n, -0x80000002n], + [-0x80000000n, -1n, -0x80000001n], + [-0x7fffffffn, -1n, -0x80000000n], + [-0x7ffffffen, -1n, -0x7fffffffn], + [-1n, -1n, -2n], + [0n, -1n, -1n], + [1n, -1n, 0n], + [2n, -1n, 1n], + [0x7ffffffen, -1n, 0x7ffffffdn], + [0x7fffffffn, -1n, 0x7ffffffen], + [0x80000000n, -1n, 0x7fffffffn], + [0x80000001n, -1n, 0x80000000n], + [0xfffffffen, -1n, 0xfffffffdn], + [0xffffffffn, -1n, 0xfffffffen], + [0x100000000n, -1n, 0xffffffffn], + [0x100000001n, -1n, 0x100000000n], + [0x7ffffffffffffffen, -1n, 0x7ffffffffffffffdn], + [0x7fffffffffffffffn, -1n, 0x7ffffffffffffffen], + [0x8000000000000000n, -1n, 0x7fffffffffffffffn], + [0x8000000000000001n, -1n, 0x8000000000000000n], + [0xfffffffffffffffen, -1n, 0xfffffffffffffffdn], + [0xffffffffffffffffn, -1n, 0xfffffffffffffffen], + [0x10000000000000000n, -1n, 0xffffffffffffffffn], + [0x10000000000000001n, -1n, 0x10000000000000000n], + [-0x10000000000000001n, 0n, -0x10000000000000001n], + [-0x10000000000000000n, 0n, -0x10000000000000000n], + [-0xffffffffffffffffn, 0n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 0n, -0xfffffffffffffffen], + [-0x8000000000000001n, 0n, -0x8000000000000001n], + [-0x8000000000000000n, 0n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 0n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0n, -0x7ffffffffffffffen], + [-0x100000001n, 0n, -0x100000001n], + [-0x100000000n, 0n, -0x100000000n], + [-0xffffffffn, 0n, -0xffffffffn], + [-0xfffffffen, 0n, -0xfffffffen], + [-0x80000001n, 0n, -0x80000001n], + [-0x80000000n, 0n, -0x80000000n], + [-0x7fffffffn, 0n, -0x7fffffffn], + [-0x7ffffffen, 0n, -0x7ffffffen], + [0n, 0n, 0n], + [1n, 0n, 1n], + [2n, 0n, 2n], + [0x7ffffffen, 0n, 0x7ffffffen], + [0x7fffffffn, 0n, 0x7fffffffn], + [0x80000000n, 0n, 0x80000000n], + [0x80000001n, 0n, 0x80000001n], + [0xfffffffen, 0n, 0xfffffffen], + [0xffffffffn, 0n, 0xffffffffn], + [0x100000000n, 0n, 0x100000000n], + [0x100000001n, 0n, 0x100000001n], + [0x7ffffffffffffffen, 0n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0n, 0x8000000000000000n], + [0x8000000000000001n, 0n, 0x8000000000000001n], + [0xfffffffffffffffen, 0n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0n, 0xffffffffffffffffn], + [0x10000000000000000n, 0n, 0x10000000000000000n], + [0x10000000000000001n, 0n, 0x10000000000000001n], + [-0x10000000000000001n, 1n, -0x10000000000000000n], + [-0x10000000000000000n, 1n, -0xffffffffffffffffn], + [-0xffffffffffffffffn, 1n, -0xfffffffffffffffen], + [-0xfffffffffffffffen, 1n, -0xfffffffffffffffdn], + [-0x8000000000000001n, 1n, -0x8000000000000000n], + [-0x8000000000000000n, 1n, -0x7fffffffffffffffn], + [-0x7fffffffffffffffn, 1n, -0x7ffffffffffffffen], + [-0x7ffffffffffffffen, 1n, -0x7ffffffffffffffdn], + [-0x100000001n, 1n, -0x100000000n], + [-0x100000000n, 1n, -0xffffffffn], + [-0xffffffffn, 1n, -0xfffffffen], + [-0xfffffffen, 1n, -0xfffffffdn], + [-0x80000001n, 1n, -0x80000000n], + [-0x80000000n, 1n, -0x7fffffffn], + [-0x7fffffffn, 1n, -0x7ffffffen], + [-0x7ffffffen, 1n, -0x7ffffffdn], + [1n, 1n, 2n], + [2n, 1n, 3n], + [0x7ffffffen, 1n, 0x7fffffffn], + [0x7fffffffn, 1n, 0x80000000n], + [0x80000000n, 1n, 0x80000001n], + [0x80000001n, 1n, 0x80000002n], + [0xfffffffen, 1n, 0xffffffffn], + [0xffffffffn, 1n, 0x100000000n], + [0x100000000n, 1n, 0x100000001n], + [0x100000001n, 1n, 0x100000002n], + [0x7ffffffffffffffen, 1n, 0x7fffffffffffffffn], + [0x7fffffffffffffffn, 1n, 0x8000000000000000n], + [0x8000000000000000n, 1n, 0x8000000000000001n], + [0x8000000000000001n, 1n, 0x8000000000000002n], + [0xfffffffffffffffen, 1n, 0xffffffffffffffffn], + [0xffffffffffffffffn, 1n, 0x10000000000000000n], + [0x10000000000000000n, 1n, 0x10000000000000001n], + [0x10000000000000001n, 1n, 0x10000000000000002n], + [-0x10000000000000001n, 2n, -0xffffffffffffffffn], + [-0x10000000000000000n, 2n, -0xfffffffffffffffen], + [-0xffffffffffffffffn, 2n, -0xfffffffffffffffdn], + [-0xfffffffffffffffen, 2n, -0xfffffffffffffffcn], + [-0x8000000000000001n, 2n, -0x7fffffffffffffffn], + [-0x8000000000000000n, 2n, -0x7ffffffffffffffen], + [-0x7fffffffffffffffn, 2n, -0x7ffffffffffffffdn], + [-0x7ffffffffffffffen, 2n, -0x7ffffffffffffffcn], + [-0x100000001n, 2n, -0xffffffffn], + [-0x100000000n, 2n, -0xfffffffen], + [-0xffffffffn, 2n, -0xfffffffdn], + [-0xfffffffen, 2n, -0xfffffffcn], + [-0x80000001n, 2n, -0x7fffffffn], + [-0x80000000n, 2n, -0x7ffffffen], + [-0x7fffffffn, 2n, -0x7ffffffdn], + [-0x7ffffffen, 2n, -0x7ffffffcn], + [2n, 2n, 4n], + [0x7ffffffen, 2n, 0x80000000n], + [0x7fffffffn, 2n, 0x80000001n], + [0x80000000n, 2n, 0x80000002n], + [0x80000001n, 2n, 0x80000003n], + [0xfffffffen, 2n, 0x100000000n], + [0xffffffffn, 2n, 0x100000001n], + [0x100000000n, 2n, 0x100000002n], + [0x100000001n, 2n, 0x100000003n], + [0x7ffffffffffffffen, 2n, 0x8000000000000000n], + [0x7fffffffffffffffn, 2n, 0x8000000000000001n], + [0x8000000000000000n, 2n, 0x8000000000000002n], + [0x8000000000000001n, 2n, 0x8000000000000003n], + [0xfffffffffffffffen, 2n, 0x10000000000000000n], + [0xffffffffffffffffn, 2n, 0x10000000000000001n], + [0x10000000000000000n, 2n, 0x10000000000000002n], + [0x10000000000000001n, 2n, 0x10000000000000003n], + [-0x10000000000000001n, 0x7ffffffen, -0xffffffff80000003n], + [-0x10000000000000000n, 0x7ffffffen, -0xffffffff80000002n], + [-0xffffffffffffffffn, 0x7ffffffen, -0xffffffff80000001n], + [-0xfffffffffffffffen, 0x7ffffffen, -0xffffffff80000000n], + [-0x8000000000000001n, 0x7ffffffen, -0x7fffffff80000003n], + [-0x8000000000000000n, 0x7ffffffen, -0x7fffffff80000002n], + [-0x7fffffffffffffffn, 0x7ffffffen, -0x7fffffff80000001n], + [-0x7ffffffffffffffen, 0x7ffffffen, -0x7fffffff80000000n], + [-0x100000001n, 0x7ffffffen, -0x80000003n], + [-0x100000000n, 0x7ffffffen, -0x80000002n], + [-0xffffffffn, 0x7ffffffen, -0x80000001n], + [-0xfffffffen, 0x7ffffffen, -0x80000000n], + [-0x80000001n, 0x7ffffffen, -3n], + [-0x80000000n, 0x7ffffffen, -2n], + [-0x7fffffffn, 0x7ffffffen, -1n], + [-0x7ffffffen, 0x7ffffffen, 0n], + [0x7ffffffen, 0x7ffffffen, 0xfffffffcn], + [0x7fffffffn, 0x7ffffffen, 0xfffffffdn], + [0x80000000n, 0x7ffffffen, 0xfffffffen], + [0x80000001n, 0x7ffffffen, 0xffffffffn], + [0xfffffffen, 0x7ffffffen, 0x17ffffffcn], + [0xffffffffn, 0x7ffffffen, 0x17ffffffdn], + [0x100000000n, 0x7ffffffen, 0x17ffffffen], + [0x100000001n, 0x7ffffffen, 0x17fffffffn], + [0x7ffffffffffffffen, 0x7ffffffen, 0x800000007ffffffcn], + [0x7fffffffffffffffn, 0x7ffffffen, 0x800000007ffffffdn], + [0x8000000000000000n, 0x7ffffffen, 0x800000007ffffffen], + [0x8000000000000001n, 0x7ffffffen, 0x800000007fffffffn], + [0xfffffffffffffffen, 0x7ffffffen, 0x1000000007ffffffcn], + [0xffffffffffffffffn, 0x7ffffffen, 0x1000000007ffffffdn], + [0x10000000000000000n, 0x7ffffffen, 0x1000000007ffffffen], + [0x10000000000000001n, 0x7ffffffen, 0x1000000007fffffffn], + [-0x10000000000000001n, 0x7fffffffn, -0xffffffff80000002n], + [-0x10000000000000000n, 0x7fffffffn, -0xffffffff80000001n], + [-0xffffffffffffffffn, 0x7fffffffn, -0xffffffff80000000n], + [-0xfffffffffffffffen, 0x7fffffffn, -0xffffffff7fffffffn], + [-0x8000000000000001n, 0x7fffffffn, -0x7fffffff80000002n], + [-0x8000000000000000n, 0x7fffffffn, -0x7fffffff80000001n], + [-0x7fffffffffffffffn, 0x7fffffffn, -0x7fffffff80000000n], + [-0x7ffffffffffffffen, 0x7fffffffn, -0x7fffffff7fffffffn], + [-0x100000001n, 0x7fffffffn, -0x80000002n], + [-0x100000000n, 0x7fffffffn, -0x80000001n], + [-0xffffffffn, 0x7fffffffn, -0x80000000n], + [-0xfffffffen, 0x7fffffffn, -0x7fffffffn], + [-0x80000001n, 0x7fffffffn, -2n], + [-0x80000000n, 0x7fffffffn, -1n], + [-0x7fffffffn, 0x7fffffffn, 0n], + [-0x7ffffffen, 0x7fffffffn, 1n], + [0x7fffffffn, 0x7fffffffn, 0xfffffffen], + [0x80000000n, 0x7fffffffn, 0xffffffffn], + [0x80000001n, 0x7fffffffn, 0x100000000n], + [0xfffffffen, 0x7fffffffn, 0x17ffffffdn], + [0xffffffffn, 0x7fffffffn, 0x17ffffffen], + [0x100000000n, 0x7fffffffn, 0x17fffffffn], + [0x100000001n, 0x7fffffffn, 0x180000000n], + [0x7ffffffffffffffen, 0x7fffffffn, 0x800000007ffffffdn], + [0x7fffffffffffffffn, 0x7fffffffn, 0x800000007ffffffen], + [0x8000000000000000n, 0x7fffffffn, 0x800000007fffffffn], + [0x8000000000000001n, 0x7fffffffn, 0x8000000080000000n], + [0xfffffffffffffffen, 0x7fffffffn, 0x1000000007ffffffdn], + [0xffffffffffffffffn, 0x7fffffffn, 0x1000000007ffffffen], + [0x10000000000000000n, 0x7fffffffn, 0x1000000007fffffffn], + [0x10000000000000001n, 0x7fffffffn, 0x10000000080000000n], + [-0x10000000000000001n, 0x80000000n, -0xffffffff80000001n], + [-0x10000000000000000n, 0x80000000n, -0xffffffff80000000n], + [-0xffffffffffffffffn, 0x80000000n, -0xffffffff7fffffffn], + [-0xfffffffffffffffen, 0x80000000n, -0xffffffff7ffffffen], + [-0x8000000000000001n, 0x80000000n, -0x7fffffff80000001n], + [-0x8000000000000000n, 0x80000000n, -0x7fffffff80000000n], + [-0x7fffffffffffffffn, 0x80000000n, -0x7fffffff7fffffffn], + [-0x7ffffffffffffffen, 0x80000000n, -0x7fffffff7ffffffen], + [-0x100000001n, 0x80000000n, -0x80000001n], + [-0x100000000n, 0x80000000n, -0x80000000n], + [-0xffffffffn, 0x80000000n, -0x7fffffffn], + [-0xfffffffen, 0x80000000n, -0x7ffffffen], + [-0x80000001n, 0x80000000n, -1n], + [-0x80000000n, 0x80000000n, 0n], + [-0x7fffffffn, 0x80000000n, 1n], + [-0x7ffffffen, 0x80000000n, 2n], + [0x80000000n, 0x80000000n, 0x100000000n], + [0x80000001n, 0x80000000n, 0x100000001n], + [0xfffffffen, 0x80000000n, 0x17ffffffen], + [0xffffffffn, 0x80000000n, 0x17fffffffn], + [0x100000000n, 0x80000000n, 0x180000000n], + [0x100000001n, 0x80000000n, 0x180000001n], + [0x7ffffffffffffffen, 0x80000000n, 0x800000007ffffffen], + [0x7fffffffffffffffn, 0x80000000n, 0x800000007fffffffn], + [0x8000000000000000n, 0x80000000n, 0x8000000080000000n], + [0x8000000000000001n, 0x80000000n, 0x8000000080000001n], + [0xfffffffffffffffen, 0x80000000n, 0x1000000007ffffffen], + [0xffffffffffffffffn, 0x80000000n, 0x1000000007fffffffn], + [0x10000000000000000n, 0x80000000n, 0x10000000080000000n], + [0x10000000000000001n, 0x80000000n, 0x10000000080000001n], + [-0x10000000000000001n, 0x80000001n, -0xffffffff80000000n], + [-0x10000000000000000n, 0x80000001n, -0xffffffff7fffffffn], + [-0xffffffffffffffffn, 0x80000001n, -0xffffffff7ffffffen], + [-0xfffffffffffffffen, 0x80000001n, -0xffffffff7ffffffdn], + [-0x8000000000000001n, 0x80000001n, -0x7fffffff80000000n], + [-0x8000000000000000n, 0x80000001n, -0x7fffffff7fffffffn], + [-0x7fffffffffffffffn, 0x80000001n, -0x7fffffff7ffffffen], + [-0x7ffffffffffffffen, 0x80000001n, -0x7fffffff7ffffffdn], + [-0x100000001n, 0x80000001n, -0x80000000n], + [-0x100000000n, 0x80000001n, -0x7fffffffn], + [-0xffffffffn, 0x80000001n, -0x7ffffffen], + [-0xfffffffen, 0x80000001n, -0x7ffffffdn], + [-0x80000001n, 0x80000001n, 0n], + [-0x80000000n, 0x80000001n, 1n], + [-0x7fffffffn, 0x80000001n, 2n], + [-0x7ffffffen, 0x80000001n, 3n], + [0x80000001n, 0x80000001n, 0x100000002n], + [0xfffffffen, 0x80000001n, 0x17fffffffn], + [0xffffffffn, 0x80000001n, 0x180000000n], + [0x100000000n, 0x80000001n, 0x180000001n], + [0x100000001n, 0x80000001n, 0x180000002n], + [0x7ffffffffffffffen, 0x80000001n, 0x800000007fffffffn], + [0x7fffffffffffffffn, 0x80000001n, 0x8000000080000000n], + [0x8000000000000000n, 0x80000001n, 0x8000000080000001n], + [0x8000000000000001n, 0x80000001n, 0x8000000080000002n], + [0xfffffffffffffffen, 0x80000001n, 0x1000000007fffffffn], + [0xffffffffffffffffn, 0x80000001n, 0x10000000080000000n], + [0x10000000000000000n, 0x80000001n, 0x10000000080000001n], + [0x10000000000000001n, 0x80000001n, 0x10000000080000002n], + [-0x10000000000000001n, -0x80000001n, -0x10000000080000002n], + [-0x10000000000000000n, -0x80000001n, -0x10000000080000001n], + [-0xffffffffffffffffn, -0x80000001n, -0x10000000080000000n], + [-0xfffffffffffffffen, -0x80000001n, -0x1000000007fffffffn], + [-0x8000000000000001n, -0x80000001n, -0x8000000080000002n], + [-0x8000000000000000n, -0x80000001n, -0x8000000080000001n], + [-0x7fffffffffffffffn, -0x80000001n, -0x8000000080000000n], + [-0x7ffffffffffffffen, -0x80000001n, -0x800000007fffffffn], + [-0x100000001n, -0x80000001n, -0x180000002n], + [-0x100000000n, -0x80000001n, -0x180000001n], + [-0xffffffffn, -0x80000001n, -0x180000000n], + [-0xfffffffen, -0x80000001n, -0x17fffffffn], + [-0x80000001n, -0x80000001n, -0x100000002n], + [-0x80000000n, -0x80000001n, -0x100000001n], + [-0x7fffffffn, -0x80000001n, -0x100000000n], + [-0x7ffffffen, -0x80000001n, -0xffffffffn], + [0xfffffffen, -0x80000001n, 0x7ffffffdn], + [0xffffffffn, -0x80000001n, 0x7ffffffen], + [0x100000000n, -0x80000001n, 0x7fffffffn], + [0x100000001n, -0x80000001n, 0x80000000n], + [0x7ffffffffffffffen, -0x80000001n, 0x7fffffff7ffffffdn], + [0x7fffffffffffffffn, -0x80000001n, 0x7fffffff7ffffffen], + [0x8000000000000000n, -0x80000001n, 0x7fffffff7fffffffn], + [0x8000000000000001n, -0x80000001n, 0x7fffffff80000000n], + [0xfffffffffffffffen, -0x80000001n, 0xffffffff7ffffffdn], + [0xffffffffffffffffn, -0x80000001n, 0xffffffff7ffffffen], + [0x10000000000000000n, -0x80000001n, 0xffffffff7fffffffn], + [0x10000000000000001n, -0x80000001n, 0xffffffff80000000n], + [-0x10000000000000001n, -0x80000000n, -0x10000000080000001n], + [-0x10000000000000000n, -0x80000000n, -0x10000000080000000n], + [-0xffffffffffffffffn, -0x80000000n, -0x1000000007fffffffn], + [-0xfffffffffffffffen, -0x80000000n, -0x1000000007ffffffen], + [-0x8000000000000001n, -0x80000000n, -0x8000000080000001n], + [-0x8000000000000000n, -0x80000000n, -0x8000000080000000n], + [-0x7fffffffffffffffn, -0x80000000n, -0x800000007fffffffn], + [-0x7ffffffffffffffen, -0x80000000n, -0x800000007ffffffen], + [-0x100000001n, -0x80000000n, -0x180000001n], + [-0x100000000n, -0x80000000n, -0x180000000n], + [-0xffffffffn, -0x80000000n, -0x17fffffffn], + [-0xfffffffen, -0x80000000n, -0x17ffffffen], + [-0x80000000n, -0x80000000n, -0x100000000n], + [-0x7fffffffn, -0x80000000n, -0xffffffffn], + [-0x7ffffffen, -0x80000000n, -0xfffffffen], + [0xfffffffen, -0x80000000n, 0x7ffffffen], + [0xffffffffn, -0x80000000n, 0x7fffffffn], + [0x100000000n, -0x80000000n, 0x80000000n], + [0x100000001n, -0x80000000n, 0x80000001n], + [0x7ffffffffffffffen, -0x80000000n, 0x7fffffff7ffffffen], + [0x7fffffffffffffffn, -0x80000000n, 0x7fffffff7fffffffn], + [0x8000000000000000n, -0x80000000n, 0x7fffffff80000000n], + [0x8000000000000001n, -0x80000000n, 0x7fffffff80000001n], + [0xfffffffffffffffen, -0x80000000n, 0xffffffff7ffffffen], + [0xffffffffffffffffn, -0x80000000n, 0xffffffff7fffffffn], + [0x10000000000000000n, -0x80000000n, 0xffffffff80000000n], + [0x10000000000000001n, -0x80000000n, 0xffffffff80000001n], + [-0x10000000000000001n, -0x7fffffffn, -0x10000000080000000n], + [-0x10000000000000000n, -0x7fffffffn, -0x1000000007fffffffn], + [-0xffffffffffffffffn, -0x7fffffffn, -0x1000000007ffffffen], + [-0xfffffffffffffffen, -0x7fffffffn, -0x1000000007ffffffdn], + [-0x8000000000000001n, -0x7fffffffn, -0x8000000080000000n], + [-0x8000000000000000n, -0x7fffffffn, -0x800000007fffffffn], + [-0x7fffffffffffffffn, -0x7fffffffn, -0x800000007ffffffen], + [-0x7ffffffffffffffen, -0x7fffffffn, -0x800000007ffffffdn], + [-0x100000001n, -0x7fffffffn, -0x180000000n], + [-0x100000000n, -0x7fffffffn, -0x17fffffffn], + [-0xffffffffn, -0x7fffffffn, -0x17ffffffen], + [-0xfffffffen, -0x7fffffffn, -0x17ffffffdn], + [-0x7fffffffn, -0x7fffffffn, -0xfffffffen], + [-0x7ffffffen, -0x7fffffffn, -0xfffffffdn], + [0xfffffffen, -0x7fffffffn, 0x7fffffffn], + [0xffffffffn, -0x7fffffffn, 0x80000000n], + [0x100000000n, -0x7fffffffn, 0x80000001n], + [0x100000001n, -0x7fffffffn, 0x80000002n], + [0x7ffffffffffffffen, -0x7fffffffn, 0x7fffffff7fffffffn], + [0x7fffffffffffffffn, -0x7fffffffn, 0x7fffffff80000000n], + [0x8000000000000000n, -0x7fffffffn, 0x7fffffff80000001n], + [0x8000000000000001n, -0x7fffffffn, 0x7fffffff80000002n], + [0xfffffffffffffffen, -0x7fffffffn, 0xffffffff7fffffffn], + [0xffffffffffffffffn, -0x7fffffffn, 0xffffffff80000000n], + [0x10000000000000000n, -0x7fffffffn, 0xffffffff80000001n], + [0x10000000000000001n, -0x7fffffffn, 0xffffffff80000002n], + [-0x10000000000000001n, -0x7ffffffen, -0x1000000007fffffffn], + [-0x10000000000000000n, -0x7ffffffen, -0x1000000007ffffffen], + [-0xffffffffffffffffn, -0x7ffffffen, -0x1000000007ffffffdn], + [-0xfffffffffffffffen, -0x7ffffffen, -0x1000000007ffffffcn], + [-0x8000000000000001n, -0x7ffffffen, -0x800000007fffffffn], + [-0x8000000000000000n, -0x7ffffffen, -0x800000007ffffffen], + [-0x7fffffffffffffffn, -0x7ffffffen, -0x800000007ffffffdn], + [-0x7ffffffffffffffen, -0x7ffffffen, -0x800000007ffffffcn], + [-0x100000001n, -0x7ffffffen, -0x17fffffffn], + [-0x100000000n, -0x7ffffffen, -0x17ffffffen], + [-0xffffffffn, -0x7ffffffen, -0x17ffffffdn], + [-0xfffffffen, -0x7ffffffen, -0x17ffffffcn], + [-0x7ffffffen, -0x7ffffffen, -0xfffffffcn], + [0xfffffffen, -0x7ffffffen, 0x80000000n], + [0xffffffffn, -0x7ffffffen, 0x80000001n], + [0x100000000n, -0x7ffffffen, 0x80000002n], + [0x100000001n, -0x7ffffffen, 0x80000003n], + [0x7ffffffffffffffen, -0x7ffffffen, 0x7fffffff80000000n], + [0x7fffffffffffffffn, -0x7ffffffen, 0x7fffffff80000001n], + [0x8000000000000000n, -0x7ffffffen, 0x7fffffff80000002n], + [0x8000000000000001n, -0x7ffffffen, 0x7fffffff80000003n], + [0xfffffffffffffffen, -0x7ffffffen, 0xffffffff80000000n], + [0xffffffffffffffffn, -0x7ffffffen, 0xffffffff80000001n], + [0x10000000000000000n, -0x7ffffffen, 0xffffffff80000002n], + [0x10000000000000001n, -0x7ffffffen, 0xffffffff80000003n], + [-0x10000000000000001n, 0xfffffffen, -0xffffffff00000003n], + [-0x10000000000000000n, 0xfffffffen, -0xffffffff00000002n], + [-0xffffffffffffffffn, 0xfffffffen, -0xffffffff00000001n], + [-0xfffffffffffffffen, 0xfffffffen, -0xffffffff00000000n], + [-0x8000000000000001n, 0xfffffffen, -0x7fffffff00000003n], + [-0x8000000000000000n, 0xfffffffen, -0x7fffffff00000002n], + [-0x7fffffffffffffffn, 0xfffffffen, -0x7fffffff00000001n], + [-0x7ffffffffffffffen, 0xfffffffen, -0x7fffffff00000000n], + [-0x100000001n, 0xfffffffen, -3n], + [-0x100000000n, 0xfffffffen, -2n], + [-0xffffffffn, 0xfffffffen, -1n], + [-0xfffffffen, 0xfffffffen, 0n], + [0xfffffffen, 0xfffffffen, 0x1fffffffcn], + [0xffffffffn, 0xfffffffen, 0x1fffffffdn], + [0x100000000n, 0xfffffffen, 0x1fffffffen], + [0x100000001n, 0xfffffffen, 0x1ffffffffn], + [0x7ffffffffffffffen, 0xfffffffen, 0x80000000fffffffcn], + [0x7fffffffffffffffn, 0xfffffffen, 0x80000000fffffffdn], + [0x8000000000000000n, 0xfffffffen, 0x80000000fffffffen], + [0x8000000000000001n, 0xfffffffen, 0x80000000ffffffffn], + [0xfffffffffffffffen, 0xfffffffen, 0x100000000fffffffcn], + [0xffffffffffffffffn, 0xfffffffen, 0x100000000fffffffdn], + [0x10000000000000000n, 0xfffffffen, 0x100000000fffffffen], + [0x10000000000000001n, 0xfffffffen, 0x100000000ffffffffn], + [-0x10000000000000001n, 0xffffffffn, -0xffffffff00000002n], + [-0x10000000000000000n, 0xffffffffn, -0xffffffff00000001n], + [-0xffffffffffffffffn, 0xffffffffn, -0xffffffff00000000n], + [-0xfffffffffffffffen, 0xffffffffn, -0xfffffffeffffffffn], + [-0x8000000000000001n, 0xffffffffn, -0x7fffffff00000002n], + [-0x8000000000000000n, 0xffffffffn, -0x7fffffff00000001n], + [-0x7fffffffffffffffn, 0xffffffffn, -0x7fffffff00000000n], + [-0x7ffffffffffffffen, 0xffffffffn, -0x7ffffffeffffffffn], + [-0x100000001n, 0xffffffffn, -2n], + [-0x100000000n, 0xffffffffn, -1n], + [-0xffffffffn, 0xffffffffn, 0n], + [-0xfffffffen, 0xffffffffn, 1n], + [0xffffffffn, 0xffffffffn, 0x1fffffffen], + [0x100000000n, 0xffffffffn, 0x1ffffffffn], + [0x100000001n, 0xffffffffn, 0x200000000n], + [0x7ffffffffffffffen, 0xffffffffn, 0x80000000fffffffdn], + [0x7fffffffffffffffn, 0xffffffffn, 0x80000000fffffffen], + [0x8000000000000000n, 0xffffffffn, 0x80000000ffffffffn], + [0x8000000000000001n, 0xffffffffn, 0x8000000100000000n], + [0xfffffffffffffffen, 0xffffffffn, 0x100000000fffffffdn], + [0xffffffffffffffffn, 0xffffffffn, 0x100000000fffffffen], + [0x10000000000000000n, 0xffffffffn, 0x100000000ffffffffn], + [0x10000000000000001n, 0xffffffffn, 0x10000000100000000n], + [-0x10000000000000001n, 0x100000000n, -0xffffffff00000001n], + [-0x10000000000000000n, 0x100000000n, -0xffffffff00000000n], + [-0xffffffffffffffffn, 0x100000000n, -0xfffffffeffffffffn], + [-0xfffffffffffffffen, 0x100000000n, -0xfffffffefffffffen], + [-0x8000000000000001n, 0x100000000n, -0x7fffffff00000001n], + [-0x8000000000000000n, 0x100000000n, -0x7fffffff00000000n], + [-0x7fffffffffffffffn, 0x100000000n, -0x7ffffffeffffffffn], + [-0x7ffffffffffffffen, 0x100000000n, -0x7ffffffefffffffen], + [-0x100000001n, 0x100000000n, -1n], + [-0x100000000n, 0x100000000n, 0n], + [-0xffffffffn, 0x100000000n, 1n], + [-0xfffffffen, 0x100000000n, 2n], + [0x100000000n, 0x100000000n, 0x200000000n], + [0x100000001n, 0x100000000n, 0x200000001n], + [0x7ffffffffffffffen, 0x100000000n, 0x80000000fffffffen], + [0x7fffffffffffffffn, 0x100000000n, 0x80000000ffffffffn], + [0x8000000000000000n, 0x100000000n, 0x8000000100000000n], + [0x8000000000000001n, 0x100000000n, 0x8000000100000001n], + [0xfffffffffffffffen, 0x100000000n, 0x100000000fffffffen], + [0xffffffffffffffffn, 0x100000000n, 0x100000000ffffffffn], + [0x10000000000000000n, 0x100000000n, 0x10000000100000000n], + [0x10000000000000001n, 0x100000000n, 0x10000000100000001n], + [-0x10000000000000001n, 0x100000001n, -0xffffffff00000000n], + [-0x10000000000000000n, 0x100000001n, -0xfffffffeffffffffn], + [-0xffffffffffffffffn, 0x100000001n, -0xfffffffefffffffen], + [-0xfffffffffffffffen, 0x100000001n, -0xfffffffefffffffdn], + [-0x8000000000000001n, 0x100000001n, -0x7fffffff00000000n], + [-0x8000000000000000n, 0x100000001n, -0x7ffffffeffffffffn], + [-0x7fffffffffffffffn, 0x100000001n, -0x7ffffffefffffffen], + [-0x7ffffffffffffffen, 0x100000001n, -0x7ffffffefffffffdn], + [-0x100000001n, 0x100000001n, 0n], + [-0x100000000n, 0x100000001n, 1n], + [-0xffffffffn, 0x100000001n, 2n], + [-0xfffffffen, 0x100000001n, 3n], + [0x100000001n, 0x100000001n, 0x200000002n], + [0x7ffffffffffffffen, 0x100000001n, 0x80000000ffffffffn], + [0x7fffffffffffffffn, 0x100000001n, 0x8000000100000000n], + [0x8000000000000000n, 0x100000001n, 0x8000000100000001n], + [0x8000000000000001n, 0x100000001n, 0x8000000100000002n], + [0xfffffffffffffffen, 0x100000001n, 0x100000000ffffffffn], + [0xffffffffffffffffn, 0x100000001n, 0x10000000100000000n], + [0x10000000000000000n, 0x100000001n, 0x10000000100000001n], + [0x10000000000000001n, 0x100000001n, 0x10000000100000002n], + [-0x10000000000000001n, -0x100000001n, -0x10000000100000002n], + [-0x10000000000000000n, -0x100000001n, -0x10000000100000001n], + [-0xffffffffffffffffn, -0x100000001n, -0x10000000100000000n], + [-0xfffffffffffffffen, -0x100000001n, -0x100000000ffffffffn], + [-0x8000000000000001n, -0x100000001n, -0x8000000100000002n], + [-0x8000000000000000n, -0x100000001n, -0x8000000100000001n], + [-0x7fffffffffffffffn, -0x100000001n, -0x8000000100000000n], + [-0x7ffffffffffffffen, -0x100000001n, -0x80000000ffffffffn], + [-0x100000001n, -0x100000001n, -0x200000002n], + [-0x100000000n, -0x100000001n, -0x200000001n], + [-0xffffffffn, -0x100000001n, -0x200000000n], + [-0xfffffffen, -0x100000001n, -0x1ffffffffn], + [0x7ffffffffffffffen, -0x100000001n, 0x7ffffffefffffffdn], + [0x7fffffffffffffffn, -0x100000001n, 0x7ffffffefffffffen], + [0x8000000000000000n, -0x100000001n, 0x7ffffffeffffffffn], + [0x8000000000000001n, -0x100000001n, 0x7fffffff00000000n], + [0xfffffffffffffffen, -0x100000001n, 0xfffffffefffffffdn], + [0xffffffffffffffffn, -0x100000001n, 0xfffffffefffffffen], + [0x10000000000000000n, -0x100000001n, 0xfffffffeffffffffn], + [0x10000000000000001n, -0x100000001n, 0xffffffff00000000n], + [-0x10000000000000001n, -0x100000000n, -0x10000000100000001n], + [-0x10000000000000000n, -0x100000000n, -0x10000000100000000n], + [-0xffffffffffffffffn, -0x100000000n, -0x100000000ffffffffn], + [-0xfffffffffffffffen, -0x100000000n, -0x100000000fffffffen], + [-0x8000000000000001n, -0x100000000n, -0x8000000100000001n], + [-0x8000000000000000n, -0x100000000n, -0x8000000100000000n], + [-0x7fffffffffffffffn, -0x100000000n, -0x80000000ffffffffn], + [-0x7ffffffffffffffen, -0x100000000n, -0x80000000fffffffen], + [-0x100000000n, -0x100000000n, -0x200000000n], + [-0xffffffffn, -0x100000000n, -0x1ffffffffn], + [-0xfffffffen, -0x100000000n, -0x1fffffffen], + [0x7ffffffffffffffen, -0x100000000n, 0x7ffffffefffffffen], + [0x7fffffffffffffffn, -0x100000000n, 0x7ffffffeffffffffn], + [0x8000000000000000n, -0x100000000n, 0x7fffffff00000000n], + [0x8000000000000001n, -0x100000000n, 0x7fffffff00000001n], + [0xfffffffffffffffen, -0x100000000n, 0xfffffffefffffffen], + [0xffffffffffffffffn, -0x100000000n, 0xfffffffeffffffffn], + [0x10000000000000000n, -0x100000000n, 0xffffffff00000000n], + [0x10000000000000001n, -0x100000000n, 0xffffffff00000001n], + [-0x10000000000000001n, -0xffffffffn, -0x10000000100000000n], + [-0x10000000000000000n, -0xffffffffn, -0x100000000ffffffffn], + [-0xffffffffffffffffn, -0xffffffffn, -0x100000000fffffffen], + [-0xfffffffffffffffen, -0xffffffffn, -0x100000000fffffffdn], + [-0x8000000000000001n, -0xffffffffn, -0x8000000100000000n], + [-0x8000000000000000n, -0xffffffffn, -0x80000000ffffffffn], + [-0x7fffffffffffffffn, -0xffffffffn, -0x80000000fffffffen], + [-0x7ffffffffffffffen, -0xffffffffn, -0x80000000fffffffdn], + [-0xffffffffn, -0xffffffffn, -0x1fffffffen], + [-0xfffffffen, -0xffffffffn, -0x1fffffffdn], + [0x7ffffffffffffffen, -0xffffffffn, 0x7ffffffeffffffffn], + [0x7fffffffffffffffn, -0xffffffffn, 0x7fffffff00000000n], + [0x8000000000000000n, -0xffffffffn, 0x7fffffff00000001n], + [0x8000000000000001n, -0xffffffffn, 0x7fffffff00000002n], + [0xfffffffffffffffen, -0xffffffffn, 0xfffffffeffffffffn], + [0xffffffffffffffffn, -0xffffffffn, 0xffffffff00000000n], + [0x10000000000000000n, -0xffffffffn, 0xffffffff00000001n], + [0x10000000000000001n, -0xffffffffn, 0xffffffff00000002n], + [-0x10000000000000001n, -0xfffffffen, -0x100000000ffffffffn], + [-0x10000000000000000n, -0xfffffffen, -0x100000000fffffffen], + [-0xffffffffffffffffn, -0xfffffffen, -0x100000000fffffffdn], + [-0xfffffffffffffffen, -0xfffffffen, -0x100000000fffffffcn], + [-0x8000000000000001n, -0xfffffffen, -0x80000000ffffffffn], + [-0x8000000000000000n, -0xfffffffen, -0x80000000fffffffen], + [-0x7fffffffffffffffn, -0xfffffffen, -0x80000000fffffffdn], + [-0x7ffffffffffffffen, -0xfffffffen, -0x80000000fffffffcn], + [-0xfffffffen, -0xfffffffen, -0x1fffffffcn], + [0x7ffffffffffffffen, -0xfffffffen, 0x7fffffff00000000n], + [0x7fffffffffffffffn, -0xfffffffen, 0x7fffffff00000001n], + [0x8000000000000000n, -0xfffffffen, 0x7fffffff00000002n], + [0x8000000000000001n, -0xfffffffen, 0x7fffffff00000003n], + [0xfffffffffffffffen, -0xfffffffen, 0xffffffff00000000n], + [0xffffffffffffffffn, -0xfffffffen, 0xffffffff00000001n], + [0x10000000000000000n, -0xfffffffen, 0xffffffff00000002n], + [0x10000000000000001n, -0xfffffffen, 0xffffffff00000003n], + [-0x10000000000000001n, 0x7ffffffffffffffen, -0x8000000000000003n], + [-0x10000000000000000n, 0x7ffffffffffffffen, -0x8000000000000002n], + [-0xffffffffffffffffn, 0x7ffffffffffffffen, -0x8000000000000001n], + [-0xfffffffffffffffen, 0x7ffffffffffffffen, -0x8000000000000000n], + [-0x8000000000000001n, 0x7ffffffffffffffen, -3n], + [-0x8000000000000000n, 0x7ffffffffffffffen, -2n], + [-0x7fffffffffffffffn, 0x7ffffffffffffffen, -1n], + [-0x7ffffffffffffffen, 0x7ffffffffffffffen, 0n], + [0x7ffffffffffffffen, 0x7ffffffffffffffen, 0xfffffffffffffffcn], + [0x7fffffffffffffffn, 0x7ffffffffffffffen, 0xfffffffffffffffdn], + [0x8000000000000000n, 0x7ffffffffffffffen, 0xfffffffffffffffen], + [0x8000000000000001n, 0x7ffffffffffffffen, 0xffffffffffffffffn], + [0xfffffffffffffffen, 0x7ffffffffffffffen, 0x17ffffffffffffffcn], + [0xffffffffffffffffn, 0x7ffffffffffffffen, 0x17ffffffffffffffdn], + [0x10000000000000000n, 0x7ffffffffffffffen, 0x17ffffffffffffffen], + [0x10000000000000001n, 0x7ffffffffffffffen, 0x17fffffffffffffffn], + [-0x10000000000000001n, 0x7fffffffffffffffn, -0x8000000000000002n], + [-0x10000000000000000n, 0x7fffffffffffffffn, -0x8000000000000001n], + [-0xffffffffffffffffn, 0x7fffffffffffffffn, -0x8000000000000000n], + [-0xfffffffffffffffen, 0x7fffffffffffffffn, -0x7fffffffffffffffn], + [-0x8000000000000001n, 0x7fffffffffffffffn, -2n], + [-0x8000000000000000n, 0x7fffffffffffffffn, -1n], + [-0x7fffffffffffffffn, 0x7fffffffffffffffn, 0n], + [-0x7ffffffffffffffen, 0x7fffffffffffffffn, 1n], + [0x7fffffffffffffffn, 0x7fffffffffffffffn, 0xfffffffffffffffen], + [0x8000000000000000n, 0x7fffffffffffffffn, 0xffffffffffffffffn], + [0x8000000000000001n, 0x7fffffffffffffffn, 0x10000000000000000n], + [0xfffffffffffffffen, 0x7fffffffffffffffn, 0x17ffffffffffffffdn], + [0xffffffffffffffffn, 0x7fffffffffffffffn, 0x17ffffffffffffffen], + [0x10000000000000000n, 0x7fffffffffffffffn, 0x17fffffffffffffffn], + [0x10000000000000001n, 0x7fffffffffffffffn, 0x18000000000000000n], + [-0x10000000000000001n, 0x8000000000000000n, -0x8000000000000001n], + [-0x10000000000000000n, 0x8000000000000000n, -0x8000000000000000n], + [-0xffffffffffffffffn, 0x8000000000000000n, -0x7fffffffffffffffn], + [-0xfffffffffffffffen, 0x8000000000000000n, -0x7ffffffffffffffen], + [-0x8000000000000001n, 0x8000000000000000n, -1n], + [-0x8000000000000000n, 0x8000000000000000n, 0n], + [-0x7fffffffffffffffn, 0x8000000000000000n, 1n], + [-0x7ffffffffffffffen, 0x8000000000000000n, 2n], + [0x8000000000000000n, 0x8000000000000000n, 0x10000000000000000n], + [0x8000000000000001n, 0x8000000000000000n, 0x10000000000000001n], + [0xfffffffffffffffen, 0x8000000000000000n, 0x17ffffffffffffffen], + [0xffffffffffffffffn, 0x8000000000000000n, 0x17fffffffffffffffn], + [0x10000000000000000n, 0x8000000000000000n, 0x18000000000000000n], + [0x10000000000000001n, 0x8000000000000000n, 0x18000000000000001n], + [-0x10000000000000001n, 0x8000000000000001n, -0x8000000000000000n], + [-0x10000000000000000n, 0x8000000000000001n, -0x7fffffffffffffffn], + [-0xffffffffffffffffn, 0x8000000000000001n, -0x7ffffffffffffffen], + [-0xfffffffffffffffen, 0x8000000000000001n, -0x7ffffffffffffffdn], + [-0x8000000000000001n, 0x8000000000000001n, 0n], + [-0x8000000000000000n, 0x8000000000000001n, 1n], + [-0x7fffffffffffffffn, 0x8000000000000001n, 2n], + [-0x7ffffffffffffffen, 0x8000000000000001n, 3n], + [0x8000000000000001n, 0x8000000000000001n, 0x10000000000000002n], + [0xfffffffffffffffen, 0x8000000000000001n, 0x17fffffffffffffffn], + [0xffffffffffffffffn, 0x8000000000000001n, 0x18000000000000000n], + [0x10000000000000000n, 0x8000000000000001n, 0x18000000000000001n], + [0x10000000000000001n, 0x8000000000000001n, 0x18000000000000002n], + [-0x10000000000000001n, -0x8000000000000001n, -0x18000000000000002n], + [-0x10000000000000000n, -0x8000000000000001n, -0x18000000000000001n], + [-0xffffffffffffffffn, -0x8000000000000001n, -0x18000000000000000n], + [-0xfffffffffffffffen, -0x8000000000000001n, -0x17fffffffffffffffn], + [-0x8000000000000001n, -0x8000000000000001n, -0x10000000000000002n], + [-0x8000000000000000n, -0x8000000000000001n, -0x10000000000000001n], + [-0x7fffffffffffffffn, -0x8000000000000001n, -0x10000000000000000n], + [-0x7ffffffffffffffen, -0x8000000000000001n, -0xffffffffffffffffn], + [0xfffffffffffffffen, -0x8000000000000001n, 0x7ffffffffffffffdn], + [0xffffffffffffffffn, -0x8000000000000001n, 0x7ffffffffffffffen], + [0x10000000000000000n, -0x8000000000000001n, 0x7fffffffffffffffn], + [0x10000000000000001n, -0x8000000000000001n, 0x8000000000000000n], + [-0x10000000000000001n, -0x8000000000000000n, -0x18000000000000001n], + [-0x10000000000000000n, -0x8000000000000000n, -0x18000000000000000n], + [-0xffffffffffffffffn, -0x8000000000000000n, -0x17fffffffffffffffn], + [-0xfffffffffffffffen, -0x8000000000000000n, -0x17ffffffffffffffen], + [-0x8000000000000000n, -0x8000000000000000n, -0x10000000000000000n], + [-0x7fffffffffffffffn, -0x8000000000000000n, -0xffffffffffffffffn], + [-0x7ffffffffffffffen, -0x8000000000000000n, -0xfffffffffffffffen], + [0xfffffffffffffffen, -0x8000000000000000n, 0x7ffffffffffffffen], + [0xffffffffffffffffn, -0x8000000000000000n, 0x7fffffffffffffffn], + [0x10000000000000000n, -0x8000000000000000n, 0x8000000000000000n], + [0x10000000000000001n, -0x8000000000000000n, 0x8000000000000001n], + [-0x10000000000000001n, -0x7fffffffffffffffn, -0x18000000000000000n], + [-0x10000000000000000n, -0x7fffffffffffffffn, -0x17fffffffffffffffn], + [-0xffffffffffffffffn, -0x7fffffffffffffffn, -0x17ffffffffffffffen], + [-0xfffffffffffffffen, -0x7fffffffffffffffn, -0x17ffffffffffffffdn], + [-0x7fffffffffffffffn, -0x7fffffffffffffffn, -0xfffffffffffffffen], + [-0x7ffffffffffffffen, -0x7fffffffffffffffn, -0xfffffffffffffffdn], + [0xfffffffffffffffen, -0x7fffffffffffffffn, 0x7fffffffffffffffn], + [0xffffffffffffffffn, -0x7fffffffffffffffn, 0x8000000000000000n], + [0x10000000000000000n, -0x7fffffffffffffffn, 0x8000000000000001n], + [0x10000000000000001n, -0x7fffffffffffffffn, 0x8000000000000002n], + [-0x10000000000000001n, -0x7ffffffffffffffen, -0x17fffffffffffffffn], + [-0x10000000000000000n, -0x7ffffffffffffffen, -0x17ffffffffffffffen], + [-0xffffffffffffffffn, -0x7ffffffffffffffen, -0x17ffffffffffffffdn], + [-0xfffffffffffffffen, -0x7ffffffffffffffen, -0x17ffffffffffffffcn], + [-0x7ffffffffffffffen, -0x7ffffffffffffffen, -0xfffffffffffffffcn], + [0xfffffffffffffffen, -0x7ffffffffffffffen, 0x8000000000000000n], + [0xffffffffffffffffn, -0x7ffffffffffffffen, 0x8000000000000001n], + [0x10000000000000000n, -0x7ffffffffffffffen, 0x8000000000000002n], + [0x10000000000000001n, -0x7ffffffffffffffen, 0x8000000000000003n], + [-0x10000000000000001n, 0xfffffffffffffffen, -3n], + [-0x10000000000000000n, 0xfffffffffffffffen, -2n], + [-0xffffffffffffffffn, 0xfffffffffffffffen, -1n], + [-0xfffffffffffffffen, 0xfffffffffffffffen, 0n], + [0xfffffffffffffffen, 0xfffffffffffffffen, 0x1fffffffffffffffcn], + [0xffffffffffffffffn, 0xfffffffffffffffen, 0x1fffffffffffffffdn], + [0x10000000000000000n, 0xfffffffffffffffen, 0x1fffffffffffffffen], + [0x10000000000000001n, 0xfffffffffffffffen, 0x1ffffffffffffffffn], + [-0x10000000000000001n, 0xffffffffffffffffn, -2n], + [-0x10000000000000000n, 0xffffffffffffffffn, -1n], + [-0xffffffffffffffffn, 0xffffffffffffffffn, 0n], + [-0xfffffffffffffffen, 0xffffffffffffffffn, 1n], + [0xffffffffffffffffn, 0xffffffffffffffffn, 0x1fffffffffffffffen], + [0x10000000000000000n, 0xffffffffffffffffn, 0x1ffffffffffffffffn], + [0x10000000000000001n, 0xffffffffffffffffn, 0x20000000000000000n], + [-0x10000000000000001n, 0x10000000000000000n, -1n], + [-0x10000000000000000n, 0x10000000000000000n, 0n], + [-0xffffffffffffffffn, 0x10000000000000000n, 1n], + [-0xfffffffffffffffen, 0x10000000000000000n, 2n], + [0x10000000000000000n, 0x10000000000000000n, 0x20000000000000000n], + [0x10000000000000001n, 0x10000000000000000n, 0x20000000000000001n], + [-0x10000000000000001n, 0x10000000000000001n, 0n], + [-0x10000000000000000n, 0x10000000000000001n, 1n], + [-0xffffffffffffffffn, 0x10000000000000001n, 2n], + [-0xfffffffffffffffen, 0x10000000000000001n, 3n], + [0x10000000000000001n, 0x10000000000000001n, 0x20000000000000002n], + [-0x10000000000000001n, -0x10000000000000001n, -0x20000000000000002n], + [-0x10000000000000000n, -0x10000000000000001n, -0x20000000000000001n], + [-0xffffffffffffffffn, -0x10000000000000001n, -0x20000000000000000n], + [-0xfffffffffffffffen, -0x10000000000000001n, -0x1ffffffffffffffffn], + [-0x10000000000000000n, -0x10000000000000000n, -0x20000000000000000n], + [-0xffffffffffffffffn, -0x10000000000000000n, -0x1ffffffffffffffffn], + [-0xfffffffffffffffen, -0x10000000000000000n, -0x1fffffffffffffffen], + [-0xffffffffffffffffn, -0xffffffffffffffffn, -0x1fffffffffffffffen], + [-0xfffffffffffffffen, -0xffffffffffffffffn, -0x1fffffffffffffffdn], + [-0xfffffffffffffffen, -0xfffffffffffffffen, -0x1fffffffffffffffcn], +]; + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs + rhs, expected); + assertEq(rhs + lhs, expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-and.js b/js/src/jit-test/tests/bigint/bigint-and.js new file mode 100644 index 0000000000..eb79f5e8c6 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-and.js @@ -0,0 +1,718 @@ +const tests = [ + [-0x10000000000000001n, -2n, -0x10000000000000002n], + [-0x10000000000000000n, -2n, -0x10000000000000000n], + [-0xffffffffffffffffn, -2n, -0x10000000000000000n], + [-0xfffffffffffffffen, -2n, -0xfffffffffffffffen], + [-0x8000000000000001n, -2n, -0x8000000000000002n], + [-0x8000000000000000n, -2n, -0x8000000000000000n], + [-0x7fffffffffffffffn, -2n, -0x8000000000000000n], + [-0x7ffffffffffffffen, -2n, -0x7ffffffffffffffen], + [-0x100000001n, -2n, -0x100000002n], + [-0x100000000n, -2n, -0x100000000n], + [-0xffffffffn, -2n, -0x100000000n], + [-0xfffffffen, -2n, -0xfffffffen], + [-0x80000001n, -2n, -0x80000002n], + [-0x80000000n, -2n, -0x80000000n], + [-0x7fffffffn, -2n, -0x80000000n], + [-0x7ffffffen, -2n, -0x7ffffffen], + [-2n, -2n, -2n], + [-1n, -2n, -2n], + [0n, -2n, 0n], + [1n, -2n, 0n], + [2n, -2n, 2n], + [0x7ffffffen, -2n, 0x7ffffffen], + [0x7fffffffn, -2n, 0x7ffffffen], + [0x80000000n, -2n, 0x80000000n], + [0x80000001n, -2n, 0x80000000n], + [0xfffffffen, -2n, 0xfffffffen], + [0xffffffffn, -2n, 0xfffffffen], + [0x100000000n, -2n, 0x100000000n], + [0x100000001n, -2n, 0x100000000n], + [0x7ffffffffffffffen, -2n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, -2n, 0x7ffffffffffffffen], + [0x8000000000000000n, -2n, 0x8000000000000000n], + [0x8000000000000001n, -2n, 0x8000000000000000n], + [0xfffffffffffffffen, -2n, 0xfffffffffffffffen], + [0xffffffffffffffffn, -2n, 0xfffffffffffffffen], + [0x10000000000000000n, -2n, 0x10000000000000000n], + [0x10000000000000001n, -2n, 0x10000000000000000n], + [-0x10000000000000001n, -1n, -0x10000000000000001n], + [-0x10000000000000000n, -1n, -0x10000000000000000n], + [-0xffffffffffffffffn, -1n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, -1n, -0xfffffffffffffffen], + [-0x8000000000000001n, -1n, -0x8000000000000001n], + [-0x8000000000000000n, -1n, -0x8000000000000000n], + [-0x7fffffffffffffffn, -1n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -1n, -0x7ffffffffffffffen], + [-0x100000001n, -1n, -0x100000001n], + [-0x100000000n, -1n, -0x100000000n], + [-0xffffffffn, -1n, -0xffffffffn], + [-0xfffffffen, -1n, -0xfffffffen], + [-0x80000001n, -1n, -0x80000001n], + [-0x80000000n, -1n, -0x80000000n], + [-0x7fffffffn, -1n, -0x7fffffffn], + [-0x7ffffffen, -1n, -0x7ffffffen], + [-1n, -1n, -1n], + [0n, -1n, 0n], + [1n, -1n, 1n], + [2n, -1n, 2n], + [0x7ffffffen, -1n, 0x7ffffffen], + [0x7fffffffn, -1n, 0x7fffffffn], + [0x80000000n, -1n, 0x80000000n], + [0x80000001n, -1n, 0x80000001n], + [0xfffffffen, -1n, 0xfffffffen], + [0xffffffffn, -1n, 0xffffffffn], + [0x100000000n, -1n, 0x100000000n], + [0x100000001n, -1n, 0x100000001n], + [0x7ffffffffffffffen, -1n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, -1n, 0x7fffffffffffffffn], + [0x8000000000000000n, -1n, 0x8000000000000000n], + [0x8000000000000001n, -1n, 0x8000000000000001n], + [0xfffffffffffffffen, -1n, 0xfffffffffffffffen], + [0xffffffffffffffffn, -1n, 0xffffffffffffffffn], + [0x10000000000000000n, -1n, 0x10000000000000000n], + [0x10000000000000001n, -1n, 0x10000000000000001n], + [-0x10000000000000001n, 0n, 0n], + [-0x10000000000000000n, 0n, 0n], + [-0xffffffffffffffffn, 0n, 0n], + [-0xfffffffffffffffen, 0n, 0n], + [-0x8000000000000001n, 0n, 0n], + [-0x8000000000000000n, 0n, 0n], + [-0x7fffffffffffffffn, 0n, 0n], + [-0x7ffffffffffffffen, 0n, 0n], + [-0x100000001n, 0n, 0n], + [-0x100000000n, 0n, 0n], + [-0xffffffffn, 0n, 0n], + [-0xfffffffen, 0n, 0n], + [-0x80000001n, 0n, 0n], + [-0x80000000n, 0n, 0n], + [-0x7fffffffn, 0n, 0n], + [-0x7ffffffen, 0n, 0n], + [0n, 0n, 0n], + [1n, 0n, 0n], + [2n, 0n, 0n], + [0x7ffffffen, 0n, 0n], + [0x7fffffffn, 0n, 0n], + [0x80000000n, 0n, 0n], + [0x80000001n, 0n, 0n], + [0xfffffffen, 0n, 0n], + [0xffffffffn, 0n, 0n], + [0x100000000n, 0n, 0n], + [0x100000001n, 0n, 0n], + [0x7ffffffffffffffen, 0n, 0n], + [0x7fffffffffffffffn, 0n, 0n], + [0x8000000000000000n, 0n, 0n], + [0x8000000000000001n, 0n, 0n], + [0xfffffffffffffffen, 0n, 0n], + [0xffffffffffffffffn, 0n, 0n], + [0x10000000000000000n, 0n, 0n], + [0x10000000000000001n, 0n, 0n], + [-0x10000000000000001n, 1n, 1n], + [-0x10000000000000000n, 1n, 0n], + [-0xffffffffffffffffn, 1n, 1n], + [-0xfffffffffffffffen, 1n, 0n], + [-0x8000000000000001n, 1n, 1n], + [-0x8000000000000000n, 1n, 0n], + [-0x7fffffffffffffffn, 1n, 1n], + [-0x7ffffffffffffffen, 1n, 0n], + [-0x100000001n, 1n, 1n], + [-0x100000000n, 1n, 0n], + [-0xffffffffn, 1n, 1n], + [-0xfffffffen, 1n, 0n], + [-0x80000001n, 1n, 1n], + [-0x80000000n, 1n, 0n], + [-0x7fffffffn, 1n, 1n], + [-0x7ffffffen, 1n, 0n], + [1n, 1n, 1n], + [2n, 1n, 0n], + [0x7ffffffen, 1n, 0n], + [0x7fffffffn, 1n, 1n], + [0x80000000n, 1n, 0n], + [0x80000001n, 1n, 1n], + [0xfffffffen, 1n, 0n], + [0xffffffffn, 1n, 1n], + [0x100000000n, 1n, 0n], + [0x100000001n, 1n, 1n], + [0x7ffffffffffffffen, 1n, 0n], + [0x7fffffffffffffffn, 1n, 1n], + [0x8000000000000000n, 1n, 0n], + [0x8000000000000001n, 1n, 1n], + [0xfffffffffffffffen, 1n, 0n], + [0xffffffffffffffffn, 1n, 1n], + [0x10000000000000000n, 1n, 0n], + [0x10000000000000001n, 1n, 1n], + [-0x10000000000000001n, 2n, 2n], + [-0x10000000000000000n, 2n, 0n], + [-0xffffffffffffffffn, 2n, 0n], + [-0xfffffffffffffffen, 2n, 2n], + [-0x8000000000000001n, 2n, 2n], + [-0x8000000000000000n, 2n, 0n], + [-0x7fffffffffffffffn, 2n, 0n], + [-0x7ffffffffffffffen, 2n, 2n], + [-0x100000001n, 2n, 2n], + [-0x100000000n, 2n, 0n], + [-0xffffffffn, 2n, 0n], + [-0xfffffffen, 2n, 2n], + [-0x80000001n, 2n, 2n], + [-0x80000000n, 2n, 0n], + [-0x7fffffffn, 2n, 0n], + [-0x7ffffffen, 2n, 2n], + [2n, 2n, 2n], + [0x7ffffffen, 2n, 2n], + [0x7fffffffn, 2n, 2n], + [0x80000000n, 2n, 0n], + [0x80000001n, 2n, 0n], + [0xfffffffen, 2n, 2n], + [0xffffffffn, 2n, 2n], + [0x100000000n, 2n, 0n], + [0x100000001n, 2n, 0n], + [0x7ffffffffffffffen, 2n, 2n], + [0x7fffffffffffffffn, 2n, 2n], + [0x8000000000000000n, 2n, 0n], + [0x8000000000000001n, 2n, 0n], + [0xfffffffffffffffen, 2n, 2n], + [0xffffffffffffffffn, 2n, 2n], + [0x10000000000000000n, 2n, 0n], + [0x10000000000000001n, 2n, 0n], + [-0x10000000000000001n, 0x7ffffffen, 0x7ffffffen], + [-0x10000000000000000n, 0x7ffffffen, 0n], + [-0xffffffffffffffffn, 0x7ffffffen, 0n], + [-0xfffffffffffffffen, 0x7ffffffen, 2n], + [-0x8000000000000001n, 0x7ffffffen, 0x7ffffffen], + [-0x8000000000000000n, 0x7ffffffen, 0n], + [-0x7fffffffffffffffn, 0x7ffffffen, 0n], + [-0x7ffffffffffffffen, 0x7ffffffen, 2n], + [-0x100000001n, 0x7ffffffen, 0x7ffffffen], + [-0x100000000n, 0x7ffffffen, 0n], + [-0xffffffffn, 0x7ffffffen, 0n], + [-0xfffffffen, 0x7ffffffen, 2n], + [-0x80000001n, 0x7ffffffen, 0x7ffffffen], + [-0x80000000n, 0x7ffffffen, 0n], + [-0x7fffffffn, 0x7ffffffen, 0n], + [-0x7ffffffen, 0x7ffffffen, 2n], + [0x7ffffffen, 0x7ffffffen, 0x7ffffffen], + [0x7fffffffn, 0x7ffffffen, 0x7ffffffen], + [0x80000000n, 0x7ffffffen, 0n], + [0x80000001n, 0x7ffffffen, 0n], + [0xfffffffen, 0x7ffffffen, 0x7ffffffen], + [0xffffffffn, 0x7ffffffen, 0x7ffffffen], + [0x100000000n, 0x7ffffffen, 0n], + [0x100000001n, 0x7ffffffen, 0n], + [0x7ffffffffffffffen, 0x7ffffffen, 0x7ffffffen], + [0x7fffffffffffffffn, 0x7ffffffen, 0x7ffffffen], + [0x8000000000000000n, 0x7ffffffen, 0n], + [0x8000000000000001n, 0x7ffffffen, 0n], + [0xfffffffffffffffen, 0x7ffffffen, 0x7ffffffen], + [0xffffffffffffffffn, 0x7ffffffen, 0x7ffffffen], + [0x10000000000000000n, 0x7ffffffen, 0n], + [0x10000000000000001n, 0x7ffffffen, 0n], + [-0x10000000000000001n, 0x7fffffffn, 0x7fffffffn], + [-0x10000000000000000n, 0x7fffffffn, 0n], + [-0xffffffffffffffffn, 0x7fffffffn, 1n], + [-0xfffffffffffffffen, 0x7fffffffn, 2n], + [-0x8000000000000001n, 0x7fffffffn, 0x7fffffffn], + [-0x8000000000000000n, 0x7fffffffn, 0n], + [-0x7fffffffffffffffn, 0x7fffffffn, 1n], + [-0x7ffffffffffffffen, 0x7fffffffn, 2n], + [-0x100000001n, 0x7fffffffn, 0x7fffffffn], + [-0x100000000n, 0x7fffffffn, 0n], + [-0xffffffffn, 0x7fffffffn, 1n], + [-0xfffffffen, 0x7fffffffn, 2n], + [-0x80000001n, 0x7fffffffn, 0x7fffffffn], + [-0x80000000n, 0x7fffffffn, 0n], + [-0x7fffffffn, 0x7fffffffn, 1n], + [-0x7ffffffen, 0x7fffffffn, 2n], + [0x7fffffffn, 0x7fffffffn, 0x7fffffffn], + [0x80000000n, 0x7fffffffn, 0n], + [0x80000001n, 0x7fffffffn, 1n], + [0xfffffffen, 0x7fffffffn, 0x7ffffffen], + [0xffffffffn, 0x7fffffffn, 0x7fffffffn], + [0x100000000n, 0x7fffffffn, 0n], + [0x100000001n, 0x7fffffffn, 1n], + [0x7ffffffffffffffen, 0x7fffffffn, 0x7ffffffen], + [0x7fffffffffffffffn, 0x7fffffffn, 0x7fffffffn], + [0x8000000000000000n, 0x7fffffffn, 0n], + [0x8000000000000001n, 0x7fffffffn, 1n], + [0xfffffffffffffffen, 0x7fffffffn, 0x7ffffffen], + [0xffffffffffffffffn, 0x7fffffffn, 0x7fffffffn], + [0x10000000000000000n, 0x7fffffffn, 0n], + [0x10000000000000001n, 0x7fffffffn, 1n], + [-0x10000000000000001n, 0x80000000n, 0x80000000n], + [-0x10000000000000000n, 0x80000000n, 0n], + [-0xffffffffffffffffn, 0x80000000n, 0n], + [-0xfffffffffffffffen, 0x80000000n, 0n], + [-0x8000000000000001n, 0x80000000n, 0x80000000n], + [-0x8000000000000000n, 0x80000000n, 0n], + [-0x7fffffffffffffffn, 0x80000000n, 0n], + [-0x7ffffffffffffffen, 0x80000000n, 0n], + [-0x100000001n, 0x80000000n, 0x80000000n], + [-0x100000000n, 0x80000000n, 0n], + [-0xffffffffn, 0x80000000n, 0n], + [-0xfffffffen, 0x80000000n, 0n], + [-0x80000001n, 0x80000000n, 0n], + [-0x80000000n, 0x80000000n, 0x80000000n], + [-0x7fffffffn, 0x80000000n, 0x80000000n], + [-0x7ffffffen, 0x80000000n, 0x80000000n], + [0x80000000n, 0x80000000n, 0x80000000n], + [0x80000001n, 0x80000000n, 0x80000000n], + [0xfffffffen, 0x80000000n, 0x80000000n], + [0xffffffffn, 0x80000000n, 0x80000000n], + [0x100000000n, 0x80000000n, 0n], + [0x100000001n, 0x80000000n, 0n], + [0x7ffffffffffffffen, 0x80000000n, 0x80000000n], + [0x7fffffffffffffffn, 0x80000000n, 0x80000000n], + [0x8000000000000000n, 0x80000000n, 0n], + [0x8000000000000001n, 0x80000000n, 0n], + [0xfffffffffffffffen, 0x80000000n, 0x80000000n], + [0xffffffffffffffffn, 0x80000000n, 0x80000000n], + [0x10000000000000000n, 0x80000000n, 0n], + [0x10000000000000001n, 0x80000000n, 0n], + [-0x10000000000000001n, 0x80000001n, 0x80000001n], + [-0x10000000000000000n, 0x80000001n, 0n], + [-0xffffffffffffffffn, 0x80000001n, 1n], + [-0xfffffffffffffffen, 0x80000001n, 0n], + [-0x8000000000000001n, 0x80000001n, 0x80000001n], + [-0x8000000000000000n, 0x80000001n, 0n], + [-0x7fffffffffffffffn, 0x80000001n, 1n], + [-0x7ffffffffffffffen, 0x80000001n, 0n], + [-0x100000001n, 0x80000001n, 0x80000001n], + [-0x100000000n, 0x80000001n, 0n], + [-0xffffffffn, 0x80000001n, 1n], + [-0xfffffffen, 0x80000001n, 0n], + [-0x80000001n, 0x80000001n, 1n], + [-0x80000000n, 0x80000001n, 0x80000000n], + [-0x7fffffffn, 0x80000001n, 0x80000001n], + [-0x7ffffffen, 0x80000001n, 0x80000000n], + [0x80000001n, 0x80000001n, 0x80000001n], + [0xfffffffen, 0x80000001n, 0x80000000n], + [0xffffffffn, 0x80000001n, 0x80000001n], + [0x100000000n, 0x80000001n, 0n], + [0x100000001n, 0x80000001n, 1n], + [0x7ffffffffffffffen, 0x80000001n, 0x80000000n], + [0x7fffffffffffffffn, 0x80000001n, 0x80000001n], + [0x8000000000000000n, 0x80000001n, 0n], + [0x8000000000000001n, 0x80000001n, 1n], + [0xfffffffffffffffen, 0x80000001n, 0x80000000n], + [0xffffffffffffffffn, 0x80000001n, 0x80000001n], + [0x10000000000000000n, 0x80000001n, 0n], + [0x10000000000000001n, 0x80000001n, 1n], + [-0x10000000000000001n, -0x80000001n, -0x10000000080000001n], + [-0x10000000000000000n, -0x80000001n, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x80000001n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, -0x80000001n, -0xfffffffffffffffen], + [-0x8000000000000001n, -0x80000001n, -0x8000000080000001n], + [-0x8000000000000000n, -0x80000001n, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0x80000001n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0x80000001n, -0x7ffffffffffffffen], + [-0x100000001n, -0x80000001n, -0x180000001n], + [-0x100000000n, -0x80000001n, -0x100000000n], + [-0xffffffffn, -0x80000001n, -0xffffffffn], + [-0xfffffffen, -0x80000001n, -0xfffffffen], + [-0x80000001n, -0x80000001n, -0x80000001n], + [-0x80000000n, -0x80000001n, -0x100000000n], + [-0x7fffffffn, -0x80000001n, -0xffffffffn], + [-0x7ffffffen, -0x80000001n, -0xfffffffen], + [0xfffffffen, -0x80000001n, 0x7ffffffen], + [0xffffffffn, -0x80000001n, 0x7fffffffn], + [0x100000000n, -0x80000001n, 0x100000000n], + [0x100000001n, -0x80000001n, 0x100000001n], + [0x7ffffffffffffffen, -0x80000001n, 0x7fffffff7ffffffen], + [0x7fffffffffffffffn, -0x80000001n, 0x7fffffff7fffffffn], + [0x8000000000000000n, -0x80000001n, 0x8000000000000000n], + [0x8000000000000001n, -0x80000001n, 0x8000000000000001n], + [0xfffffffffffffffen, -0x80000001n, 0xffffffff7ffffffen], + [0xffffffffffffffffn, -0x80000001n, 0xffffffff7fffffffn], + [0x10000000000000000n, -0x80000001n, 0x10000000000000000n], + [0x10000000000000001n, -0x80000001n, 0x10000000000000001n], + [-0x10000000000000001n, -0x80000000n, -0x10000000080000000n], + [-0x10000000000000000n, -0x80000000n, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x80000000n, -0x10000000000000000n], + [-0xfffffffffffffffen, -0x80000000n, -0x10000000000000000n], + [-0x8000000000000001n, -0x80000000n, -0x8000000080000000n], + [-0x8000000000000000n, -0x80000000n, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0x80000000n, -0x8000000000000000n], + [-0x7ffffffffffffffen, -0x80000000n, -0x8000000000000000n], + [-0x100000001n, -0x80000000n, -0x180000000n], + [-0x100000000n, -0x80000000n, -0x100000000n], + [-0xffffffffn, -0x80000000n, -0x100000000n], + [-0xfffffffen, -0x80000000n, -0x100000000n], + [-0x80000000n, -0x80000000n, -0x80000000n], + [-0x7fffffffn, -0x80000000n, -0x80000000n], + [-0x7ffffffen, -0x80000000n, -0x80000000n], + [0xfffffffen, -0x80000000n, 0x80000000n], + [0xffffffffn, -0x80000000n, 0x80000000n], + [0x100000000n, -0x80000000n, 0x100000000n], + [0x100000001n, -0x80000000n, 0x100000000n], + [0x7ffffffffffffffen, -0x80000000n, 0x7fffffff80000000n], + [0x7fffffffffffffffn, -0x80000000n, 0x7fffffff80000000n], + [0x8000000000000000n, -0x80000000n, 0x8000000000000000n], + [0x8000000000000001n, -0x80000000n, 0x8000000000000000n], + [0xfffffffffffffffen, -0x80000000n, 0xffffffff80000000n], + [0xffffffffffffffffn, -0x80000000n, 0xffffffff80000000n], + [0x10000000000000000n, -0x80000000n, 0x10000000000000000n], + [0x10000000000000001n, -0x80000000n, 0x10000000000000000n], + [-0x10000000000000001n, -0x7fffffffn, -0x1000000007fffffffn], + [-0x10000000000000000n, -0x7fffffffn, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x7fffffffn, -0xffffffffffffffffn], + [-0xfffffffffffffffen, -0x7fffffffn, -0x10000000000000000n], + [-0x8000000000000001n, -0x7fffffffn, -0x800000007fffffffn], + [-0x8000000000000000n, -0x7fffffffn, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0x7fffffffn, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0x7fffffffn, -0x8000000000000000n], + [-0x100000001n, -0x7fffffffn, -0x17fffffffn], + [-0x100000000n, -0x7fffffffn, -0x100000000n], + [-0xffffffffn, -0x7fffffffn, -0xffffffffn], + [-0xfffffffen, -0x7fffffffn, -0x100000000n], + [-0x7fffffffn, -0x7fffffffn, -0x7fffffffn], + [-0x7ffffffen, -0x7fffffffn, -0x80000000n], + [0xfffffffen, -0x7fffffffn, 0x80000000n], + [0xffffffffn, -0x7fffffffn, 0x80000001n], + [0x100000000n, -0x7fffffffn, 0x100000000n], + [0x100000001n, -0x7fffffffn, 0x100000001n], + [0x7ffffffffffffffen, -0x7fffffffn, 0x7fffffff80000000n], + [0x7fffffffffffffffn, -0x7fffffffn, 0x7fffffff80000001n], + [0x8000000000000000n, -0x7fffffffn, 0x8000000000000000n], + [0x8000000000000001n, -0x7fffffffn, 0x8000000000000001n], + [0xfffffffffffffffen, -0x7fffffffn, 0xffffffff80000000n], + [0xffffffffffffffffn, -0x7fffffffn, 0xffffffff80000001n], + [0x10000000000000000n, -0x7fffffffn, 0x10000000000000000n], + [0x10000000000000001n, -0x7fffffffn, 0x10000000000000001n], + [-0x10000000000000001n, -0x7ffffffen, -0x1000000007ffffffen], + [-0x10000000000000000n, -0x7ffffffen, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x7ffffffen, -0x10000000000000000n], + [-0xfffffffffffffffen, -0x7ffffffen, -0xfffffffffffffffen], + [-0x8000000000000001n, -0x7ffffffen, -0x800000007ffffffen], + [-0x8000000000000000n, -0x7ffffffen, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0x7ffffffen, -0x8000000000000000n], + [-0x7ffffffffffffffen, -0x7ffffffen, -0x7ffffffffffffffen], + [-0x100000001n, -0x7ffffffen, -0x17ffffffen], + [-0x100000000n, -0x7ffffffen, -0x100000000n], + [-0xffffffffn, -0x7ffffffen, -0x100000000n], + [-0xfffffffen, -0x7ffffffen, -0xfffffffen], + [-0x7ffffffen, -0x7ffffffen, -0x7ffffffen], + [0xfffffffen, -0x7ffffffen, 0x80000002n], + [0xffffffffn, -0x7ffffffen, 0x80000002n], + [0x100000000n, -0x7ffffffen, 0x100000000n], + [0x100000001n, -0x7ffffffen, 0x100000000n], + [0x7ffffffffffffffen, -0x7ffffffen, 0x7fffffff80000002n], + [0x7fffffffffffffffn, -0x7ffffffen, 0x7fffffff80000002n], + [0x8000000000000000n, -0x7ffffffen, 0x8000000000000000n], + [0x8000000000000001n, -0x7ffffffen, 0x8000000000000000n], + [0xfffffffffffffffen, -0x7ffffffen, 0xffffffff80000002n], + [0xffffffffffffffffn, -0x7ffffffen, 0xffffffff80000002n], + [0x10000000000000000n, -0x7ffffffen, 0x10000000000000000n], + [0x10000000000000001n, -0x7ffffffen, 0x10000000000000000n], + [-0x10000000000000001n, 0xfffffffen, 0xfffffffen], + [-0x10000000000000000n, 0xfffffffen, 0n], + [-0xffffffffffffffffn, 0xfffffffen, 0n], + [-0xfffffffffffffffen, 0xfffffffen, 2n], + [-0x8000000000000001n, 0xfffffffen, 0xfffffffen], + [-0x8000000000000000n, 0xfffffffen, 0n], + [-0x7fffffffffffffffn, 0xfffffffen, 0n], + [-0x7ffffffffffffffen, 0xfffffffen, 2n], + [-0x100000001n, 0xfffffffen, 0xfffffffen], + [-0x100000000n, 0xfffffffen, 0n], + [-0xffffffffn, 0xfffffffen, 0n], + [-0xfffffffen, 0xfffffffen, 2n], + [0xfffffffen, 0xfffffffen, 0xfffffffen], + [0xffffffffn, 0xfffffffen, 0xfffffffen], + [0x100000000n, 0xfffffffen, 0n], + [0x100000001n, 0xfffffffen, 0n], + [0x7ffffffffffffffen, 0xfffffffen, 0xfffffffen], + [0x7fffffffffffffffn, 0xfffffffen, 0xfffffffen], + [0x8000000000000000n, 0xfffffffen, 0n], + [0x8000000000000001n, 0xfffffffen, 0n], + [0xfffffffffffffffen, 0xfffffffen, 0xfffffffen], + [0xffffffffffffffffn, 0xfffffffen, 0xfffffffen], + [0x10000000000000000n, 0xfffffffen, 0n], + [0x10000000000000001n, 0xfffffffen, 0n], + [-0x10000000000000001n, 0xffffffffn, 0xffffffffn], + [-0x10000000000000000n, 0xffffffffn, 0n], + [-0xffffffffffffffffn, 0xffffffffn, 1n], + [-0xfffffffffffffffen, 0xffffffffn, 2n], + [-0x8000000000000001n, 0xffffffffn, 0xffffffffn], + [-0x8000000000000000n, 0xffffffffn, 0n], + [-0x7fffffffffffffffn, 0xffffffffn, 1n], + [-0x7ffffffffffffffen, 0xffffffffn, 2n], + [-0x100000001n, 0xffffffffn, 0xffffffffn], + [-0x100000000n, 0xffffffffn, 0n], + [-0xffffffffn, 0xffffffffn, 1n], + [-0xfffffffen, 0xffffffffn, 2n], + [0xffffffffn, 0xffffffffn, 0xffffffffn], + [0x100000000n, 0xffffffffn, 0n], + [0x100000001n, 0xffffffffn, 1n], + [0x7ffffffffffffffen, 0xffffffffn, 0xfffffffen], + [0x7fffffffffffffffn, 0xffffffffn, 0xffffffffn], + [0x8000000000000000n, 0xffffffffn, 0n], + [0x8000000000000001n, 0xffffffffn, 1n], + [0xfffffffffffffffen, 0xffffffffn, 0xfffffffen], + [0xffffffffffffffffn, 0xffffffffn, 0xffffffffn], + [0x10000000000000000n, 0xffffffffn, 0n], + [0x10000000000000001n, 0xffffffffn, 1n], + [-0x10000000000000001n, 0x100000000n, 0x100000000n], + [-0x10000000000000000n, 0x100000000n, 0n], + [-0xffffffffffffffffn, 0x100000000n, 0n], + [-0xfffffffffffffffen, 0x100000000n, 0n], + [-0x8000000000000001n, 0x100000000n, 0x100000000n], + [-0x8000000000000000n, 0x100000000n, 0n], + [-0x7fffffffffffffffn, 0x100000000n, 0n], + [-0x7ffffffffffffffen, 0x100000000n, 0n], + [-0x100000001n, 0x100000000n, 0n], + [-0x100000000n, 0x100000000n, 0x100000000n], + [-0xffffffffn, 0x100000000n, 0x100000000n], + [-0xfffffffen, 0x100000000n, 0x100000000n], + [0x100000000n, 0x100000000n, 0x100000000n], + [0x100000001n, 0x100000000n, 0x100000000n], + [0x7ffffffffffffffen, 0x100000000n, 0x100000000n], + [0x7fffffffffffffffn, 0x100000000n, 0x100000000n], + [0x8000000000000000n, 0x100000000n, 0n], + [0x8000000000000001n, 0x100000000n, 0n], + [0xfffffffffffffffen, 0x100000000n, 0x100000000n], + [0xffffffffffffffffn, 0x100000000n, 0x100000000n], + [0x10000000000000000n, 0x100000000n, 0n], + [0x10000000000000001n, 0x100000000n, 0n], + [-0x10000000000000001n, 0x100000001n, 0x100000001n], + [-0x10000000000000000n, 0x100000001n, 0n], + [-0xffffffffffffffffn, 0x100000001n, 1n], + [-0xfffffffffffffffen, 0x100000001n, 0n], + [-0x8000000000000001n, 0x100000001n, 0x100000001n], + [-0x8000000000000000n, 0x100000001n, 0n], + [-0x7fffffffffffffffn, 0x100000001n, 1n], + [-0x7ffffffffffffffen, 0x100000001n, 0n], + [-0x100000001n, 0x100000001n, 1n], + [-0x100000000n, 0x100000001n, 0x100000000n], + [-0xffffffffn, 0x100000001n, 0x100000001n], + [-0xfffffffen, 0x100000001n, 0x100000000n], + [0x100000001n, 0x100000001n, 0x100000001n], + [0x7ffffffffffffffen, 0x100000001n, 0x100000000n], + [0x7fffffffffffffffn, 0x100000001n, 0x100000001n], + [0x8000000000000000n, 0x100000001n, 0n], + [0x8000000000000001n, 0x100000001n, 1n], + [0xfffffffffffffffen, 0x100000001n, 0x100000000n], + [0xffffffffffffffffn, 0x100000001n, 0x100000001n], + [0x10000000000000000n, 0x100000001n, 0n], + [0x10000000000000001n, 0x100000001n, 1n], + [-0x10000000000000001n, -0x100000001n, -0x10000000100000001n], + [-0x10000000000000000n, -0x100000001n, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x100000001n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, -0x100000001n, -0xfffffffffffffffen], + [-0x8000000000000001n, -0x100000001n, -0x8000000100000001n], + [-0x8000000000000000n, -0x100000001n, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0x100000001n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0x100000001n, -0x7ffffffffffffffen], + [-0x100000001n, -0x100000001n, -0x100000001n], + [-0x100000000n, -0x100000001n, -0x200000000n], + [-0xffffffffn, -0x100000001n, -0x1ffffffffn], + [-0xfffffffen, -0x100000001n, -0x1fffffffen], + [0x7ffffffffffffffen, -0x100000001n, 0x7ffffffefffffffen], + [0x7fffffffffffffffn, -0x100000001n, 0x7ffffffeffffffffn], + [0x8000000000000000n, -0x100000001n, 0x8000000000000000n], + [0x8000000000000001n, -0x100000001n, 0x8000000000000001n], + [0xfffffffffffffffen, -0x100000001n, 0xfffffffefffffffen], + [0xffffffffffffffffn, -0x100000001n, 0xfffffffeffffffffn], + [0x10000000000000000n, -0x100000001n, 0x10000000000000000n], + [0x10000000000000001n, -0x100000001n, 0x10000000000000001n], + [-0x10000000000000001n, -0x100000000n, -0x10000000100000000n], + [-0x10000000000000000n, -0x100000000n, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x100000000n, -0x10000000000000000n], + [-0xfffffffffffffffen, -0x100000000n, -0x10000000000000000n], + [-0x8000000000000001n, -0x100000000n, -0x8000000100000000n], + [-0x8000000000000000n, -0x100000000n, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0x100000000n, -0x8000000000000000n], + [-0x7ffffffffffffffen, -0x100000000n, -0x8000000000000000n], + [-0x100000000n, -0x100000000n, -0x100000000n], + [-0xffffffffn, -0x100000000n, -0x100000000n], + [-0xfffffffen, -0x100000000n, -0x100000000n], + [0x7ffffffffffffffen, -0x100000000n, 0x7fffffff00000000n], + [0x7fffffffffffffffn, -0x100000000n, 0x7fffffff00000000n], + [0x8000000000000000n, -0x100000000n, 0x8000000000000000n], + [0x8000000000000001n, -0x100000000n, 0x8000000000000000n], + [0xfffffffffffffffen, -0x100000000n, 0xffffffff00000000n], + [0xffffffffffffffffn, -0x100000000n, 0xffffffff00000000n], + [0x10000000000000000n, -0x100000000n, 0x10000000000000000n], + [0x10000000000000001n, -0x100000000n, 0x10000000000000000n], + [-0x10000000000000001n, -0xffffffffn, -0x100000000ffffffffn], + [-0x10000000000000000n, -0xffffffffn, -0x10000000000000000n], + [-0xffffffffffffffffn, -0xffffffffn, -0xffffffffffffffffn], + [-0xfffffffffffffffen, -0xffffffffn, -0x10000000000000000n], + [-0x8000000000000001n, -0xffffffffn, -0x80000000ffffffffn], + [-0x8000000000000000n, -0xffffffffn, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0xffffffffn, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0xffffffffn, -0x8000000000000000n], + [-0xffffffffn, -0xffffffffn, -0xffffffffn], + [-0xfffffffen, -0xffffffffn, -0x100000000n], + [0x7ffffffffffffffen, -0xffffffffn, 0x7fffffff00000000n], + [0x7fffffffffffffffn, -0xffffffffn, 0x7fffffff00000001n], + [0x8000000000000000n, -0xffffffffn, 0x8000000000000000n], + [0x8000000000000001n, -0xffffffffn, 0x8000000000000001n], + [0xfffffffffffffffen, -0xffffffffn, 0xffffffff00000000n], + [0xffffffffffffffffn, -0xffffffffn, 0xffffffff00000001n], + [0x10000000000000000n, -0xffffffffn, 0x10000000000000000n], + [0x10000000000000001n, -0xffffffffn, 0x10000000000000001n], + [-0x10000000000000001n, -0xfffffffen, -0x100000000fffffffen], + [-0x10000000000000000n, -0xfffffffen, -0x10000000000000000n], + [-0xffffffffffffffffn, -0xfffffffen, -0x10000000000000000n], + [-0xfffffffffffffffen, -0xfffffffen, -0xfffffffffffffffen], + [-0x8000000000000001n, -0xfffffffen, -0x80000000fffffffen], + [-0x8000000000000000n, -0xfffffffen, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0xfffffffen, -0x8000000000000000n], + [-0x7ffffffffffffffen, -0xfffffffen, -0x7ffffffffffffffen], + [-0xfffffffen, -0xfffffffen, -0xfffffffen], + [0x7ffffffffffffffen, -0xfffffffen, 0x7fffffff00000002n], + [0x7fffffffffffffffn, -0xfffffffen, 0x7fffffff00000002n], + [0x8000000000000000n, -0xfffffffen, 0x8000000000000000n], + [0x8000000000000001n, -0xfffffffen, 0x8000000000000000n], + [0xfffffffffffffffen, -0xfffffffen, 0xffffffff00000002n], + [0xffffffffffffffffn, -0xfffffffen, 0xffffffff00000002n], + [0x10000000000000000n, -0xfffffffen, 0x10000000000000000n], + [0x10000000000000001n, -0xfffffffen, 0x10000000000000000n], + [-0x10000000000000001n, 0x7ffffffffffffffen, 0x7ffffffffffffffen], + [-0x10000000000000000n, 0x7ffffffffffffffen, 0n], + [-0xffffffffffffffffn, 0x7ffffffffffffffen, 0n], + [-0xfffffffffffffffen, 0x7ffffffffffffffen, 2n], + [-0x8000000000000001n, 0x7ffffffffffffffen, 0x7ffffffffffffffen], + [-0x8000000000000000n, 0x7ffffffffffffffen, 0n], + [-0x7fffffffffffffffn, 0x7ffffffffffffffen, 0n], + [-0x7ffffffffffffffen, 0x7ffffffffffffffen, 2n], + [0x7ffffffffffffffen, 0x7ffffffffffffffen, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0x7ffffffffffffffen, 0x7ffffffffffffffen], + [0x8000000000000000n, 0x7ffffffffffffffen, 0n], + [0x8000000000000001n, 0x7ffffffffffffffen, 0n], + [0xfffffffffffffffen, 0x7ffffffffffffffen, 0x7ffffffffffffffen], + [0xffffffffffffffffn, 0x7ffffffffffffffen, 0x7ffffffffffffffen], + [0x10000000000000000n, 0x7ffffffffffffffen, 0n], + [0x10000000000000001n, 0x7ffffffffffffffen, 0n], + [-0x10000000000000001n, 0x7fffffffffffffffn, 0x7fffffffffffffffn], + [-0x10000000000000000n, 0x7fffffffffffffffn, 0n], + [-0xffffffffffffffffn, 0x7fffffffffffffffn, 1n], + [-0xfffffffffffffffen, 0x7fffffffffffffffn, 2n], + [-0x8000000000000001n, 0x7fffffffffffffffn, 0x7fffffffffffffffn], + [-0x8000000000000000n, 0x7fffffffffffffffn, 0n], + [-0x7fffffffffffffffn, 0x7fffffffffffffffn, 1n], + [-0x7ffffffffffffffen, 0x7fffffffffffffffn, 2n], + [0x7fffffffffffffffn, 0x7fffffffffffffffn, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x7fffffffffffffffn, 0n], + [0x8000000000000001n, 0x7fffffffffffffffn, 1n], + [0xfffffffffffffffen, 0x7fffffffffffffffn, 0x7ffffffffffffffen], + [0xffffffffffffffffn, 0x7fffffffffffffffn, 0x7fffffffffffffffn], + [0x10000000000000000n, 0x7fffffffffffffffn, 0n], + [0x10000000000000001n, 0x7fffffffffffffffn, 1n], + [-0x10000000000000001n, 0x8000000000000000n, 0x8000000000000000n], + [-0x10000000000000000n, 0x8000000000000000n, 0n], + [-0xffffffffffffffffn, 0x8000000000000000n, 0n], + [-0xfffffffffffffffen, 0x8000000000000000n, 0n], + [-0x8000000000000001n, 0x8000000000000000n, 0n], + [-0x8000000000000000n, 0x8000000000000000n, 0x8000000000000000n], + [-0x7fffffffffffffffn, 0x8000000000000000n, 0x8000000000000000n], + [-0x7ffffffffffffffen, 0x8000000000000000n, 0x8000000000000000n], + [0x8000000000000000n, 0x8000000000000000n, 0x8000000000000000n], + [0x8000000000000001n, 0x8000000000000000n, 0x8000000000000000n], + [0xfffffffffffffffen, 0x8000000000000000n, 0x8000000000000000n], + [0xffffffffffffffffn, 0x8000000000000000n, 0x8000000000000000n], + [0x10000000000000000n, 0x8000000000000000n, 0n], + [0x10000000000000001n, 0x8000000000000000n, 0n], + [-0x10000000000000001n, 0x8000000000000001n, 0x8000000000000001n], + [-0x10000000000000000n, 0x8000000000000001n, 0n], + [-0xffffffffffffffffn, 0x8000000000000001n, 1n], + [-0xfffffffffffffffen, 0x8000000000000001n, 0n], + [-0x8000000000000001n, 0x8000000000000001n, 1n], + [-0x8000000000000000n, 0x8000000000000001n, 0x8000000000000000n], + [-0x7fffffffffffffffn, 0x8000000000000001n, 0x8000000000000001n], + [-0x7ffffffffffffffen, 0x8000000000000001n, 0x8000000000000000n], + [0x8000000000000001n, 0x8000000000000001n, 0x8000000000000001n], + [0xfffffffffffffffen, 0x8000000000000001n, 0x8000000000000000n], + [0xffffffffffffffffn, 0x8000000000000001n, 0x8000000000000001n], + [0x10000000000000000n, 0x8000000000000001n, 0n], + [0x10000000000000001n, 0x8000000000000001n, 1n], + [-0x10000000000000001n, -0x8000000000000001n, -0x18000000000000001n], + [-0x10000000000000000n, -0x8000000000000001n, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x8000000000000001n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, -0x8000000000000001n, -0xfffffffffffffffen], + [-0x8000000000000001n, -0x8000000000000001n, -0x8000000000000001n], + [-0x8000000000000000n, -0x8000000000000001n, -0x10000000000000000n], + [-0x7fffffffffffffffn, -0x8000000000000001n, -0xffffffffffffffffn], + [-0x7ffffffffffffffen, -0x8000000000000001n, -0xfffffffffffffffen], + [0xfffffffffffffffen, -0x8000000000000001n, 0x7ffffffffffffffen], + [0xffffffffffffffffn, -0x8000000000000001n, 0x7fffffffffffffffn], + [0x10000000000000000n, -0x8000000000000001n, 0x10000000000000000n], + [0x10000000000000001n, -0x8000000000000001n, 0x10000000000000001n], + [-0x10000000000000001n, -0x8000000000000000n, -0x18000000000000000n], + [-0x10000000000000000n, -0x8000000000000000n, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x8000000000000000n, -0x10000000000000000n], + [-0xfffffffffffffffen, -0x8000000000000000n, -0x10000000000000000n], + [-0x8000000000000000n, -0x8000000000000000n, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0x8000000000000000n, -0x8000000000000000n], + [-0x7ffffffffffffffen, -0x8000000000000000n, -0x8000000000000000n], + [0xfffffffffffffffen, -0x8000000000000000n, 0x8000000000000000n], + [0xffffffffffffffffn, -0x8000000000000000n, 0x8000000000000000n], + [0x10000000000000000n, -0x8000000000000000n, 0x10000000000000000n], + [0x10000000000000001n, -0x8000000000000000n, 0x10000000000000000n], + [-0x10000000000000001n, -0x7fffffffffffffffn, -0x17fffffffffffffffn], + [-0x10000000000000000n, -0x7fffffffffffffffn, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x7fffffffffffffffn, -0xffffffffffffffffn], + [-0xfffffffffffffffen, -0x7fffffffffffffffn, -0x10000000000000000n], + [-0x7fffffffffffffffn, -0x7fffffffffffffffn, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0x7fffffffffffffffn, -0x8000000000000000n], + [0xfffffffffffffffen, -0x7fffffffffffffffn, 0x8000000000000000n], + [0xffffffffffffffffn, -0x7fffffffffffffffn, 0x8000000000000001n], + [0x10000000000000000n, -0x7fffffffffffffffn, 0x10000000000000000n], + [0x10000000000000001n, -0x7fffffffffffffffn, 0x10000000000000001n], + [-0x10000000000000001n, -0x7ffffffffffffffen, -0x17ffffffffffffffen], + [-0x10000000000000000n, -0x7ffffffffffffffen, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x7ffffffffffffffen, -0x10000000000000000n], + [-0xfffffffffffffffen, -0x7ffffffffffffffen, -0xfffffffffffffffen], + [-0x7ffffffffffffffen, -0x7ffffffffffffffen, -0x7ffffffffffffffen], + [0xfffffffffffffffen, -0x7ffffffffffffffen, 0x8000000000000002n], + [0xffffffffffffffffn, -0x7ffffffffffffffen, 0x8000000000000002n], + [0x10000000000000000n, -0x7ffffffffffffffen, 0x10000000000000000n], + [0x10000000000000001n, -0x7ffffffffffffffen, 0x10000000000000000n], + [-0x10000000000000001n, 0xfffffffffffffffen, 0xfffffffffffffffen], + [-0x10000000000000000n, 0xfffffffffffffffen, 0n], + [-0xffffffffffffffffn, 0xfffffffffffffffen, 0n], + [-0xfffffffffffffffen, 0xfffffffffffffffen, 2n], + [0xfffffffffffffffen, 0xfffffffffffffffen, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0xfffffffffffffffen, 0xfffffffffffffffen], + [0x10000000000000000n, 0xfffffffffffffffen, 0n], + [0x10000000000000001n, 0xfffffffffffffffen, 0n], + [-0x10000000000000001n, 0xffffffffffffffffn, 0xffffffffffffffffn], + [-0x10000000000000000n, 0xffffffffffffffffn, 0n], + [-0xffffffffffffffffn, 0xffffffffffffffffn, 1n], + [-0xfffffffffffffffen, 0xffffffffffffffffn, 2n], + [0xffffffffffffffffn, 0xffffffffffffffffn, 0xffffffffffffffffn], + [0x10000000000000000n, 0xffffffffffffffffn, 0n], + [0x10000000000000001n, 0xffffffffffffffffn, 1n], + [-0x10000000000000001n, 0x10000000000000000n, 0n], + [-0x10000000000000000n, 0x10000000000000000n, 0x10000000000000000n], + [-0xffffffffffffffffn, 0x10000000000000000n, 0x10000000000000000n], + [-0xfffffffffffffffen, 0x10000000000000000n, 0x10000000000000000n], + [0x10000000000000000n, 0x10000000000000000n, 0x10000000000000000n], + [0x10000000000000001n, 0x10000000000000000n, 0x10000000000000000n], + [-0x10000000000000001n, 0x10000000000000001n, 1n], + [-0x10000000000000000n, 0x10000000000000001n, 0x10000000000000000n], + [-0xffffffffffffffffn, 0x10000000000000001n, 0x10000000000000001n], + [-0xfffffffffffffffen, 0x10000000000000001n, 0x10000000000000000n], + [0x10000000000000001n, 0x10000000000000001n, 0x10000000000000001n], + [-0x10000000000000001n, -0x10000000000000001n, -0x10000000000000001n], + [-0x10000000000000000n, -0x10000000000000001n, -0x20000000000000000n], + [-0xffffffffffffffffn, -0x10000000000000001n, -0x1ffffffffffffffffn], + [-0xfffffffffffffffen, -0x10000000000000001n, -0x1fffffffffffffffen], + [-0x10000000000000000n, -0x10000000000000000n, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x10000000000000000n, -0x10000000000000000n], + [-0xfffffffffffffffen, -0x10000000000000000n, -0x10000000000000000n], + [-0xffffffffffffffffn, -0xffffffffffffffffn, -0xffffffffffffffffn], + [-0xfffffffffffffffen, -0xffffffffffffffffn, -0x10000000000000000n], + [-0xfffffffffffffffen, -0xfffffffffffffffen, -0xfffffffffffffffen], +]; + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs & rhs, expected); + assertEq(rhs & lhs, expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-cmp-equality.js b/js/src/jit-test/tests/bigint/bigint-cmp-equality.js new file mode 100644 index 0000000000..cc02b499a5 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-cmp-equality.js @@ -0,0 +1,2442 @@ +const tests = [ + [-0x100000000000000000000000000000001n, -2n, false], + [-0x100000000000000000000000000000000n, -2n, false], + [-0xffffffffffffffffffffffffffffffffn, -2n, false], + [-0xfffffffffffffffffffffffffffffffen, -2n, false], + [-0x80000000000000000000000000000001n, -2n, false], + [-0x80000000000000000000000000000000n, -2n, false], + [-0x7fffffffffffffffffffffffffffffffn, -2n, false], + [-0x7ffffffffffffffffffffffffffffffen, -2n, false], + [-0x1000000000000000000000001n, -2n, false], + [-0x1000000000000000000000000n, -2n, false], + [-0xffffffffffffffffffffffffn, -2n, false], + [-0xfffffffffffffffffffffffen, -2n, false], + [-0x800000000000000000000001n, -2n, false], + [-0x800000000000000000000000n, -2n, false], + [-0x7fffffffffffffffffffffffn, -2n, false], + [-0x7ffffffffffffffffffffffen, -2n, false], + [-0x10000000000000001n, -2n, false], + [-0x10000000000000000n, -2n, false], + [-0xffffffffffffffffn, -2n, false], + [-0xfffffffffffffffen, -2n, false], + [-0x8000000000000001n, -2n, false], + [-0x8000000000000000n, -2n, false], + [-0x7fffffffffffffffn, -2n, false], + [-0x7ffffffffffffffen, -2n, false], + [-0x100000001n, -2n, false], + [-0x100000000n, -2n, false], + [-0xffffffffn, -2n, false], + [-0xfffffffen, -2n, false], + [-0x80000001n, -2n, false], + [-0x80000000n, -2n, false], + [-0x7fffffffn, -2n, false], + [-0x7ffffffen, -2n, false], + [-2n, -2n, true], + [-1n, -2n, false], + [0n, -2n, false], + [1n, -2n, false], + [2n, -2n, false], + [0x7ffffffen, -2n, false], + [0x7fffffffn, -2n, false], + [0x80000000n, -2n, false], + [0x80000001n, -2n, false], + [0xfffffffen, -2n, false], + [0xffffffffn, -2n, false], + [0x100000000n, -2n, false], + [0x100000001n, -2n, false], + [0x7ffffffffffffffen, -2n, false], + [0x7fffffffffffffffn, -2n, false], + [0x8000000000000000n, -2n, false], + [0x8000000000000001n, -2n, false], + [0xfffffffffffffffen, -2n, false], + [0xffffffffffffffffn, -2n, false], + [0x10000000000000000n, -2n, false], + [0x10000000000000001n, -2n, false], + [0x7ffffffffffffffffffffffen, -2n, false], + [0x7fffffffffffffffffffffffn, -2n, false], + [0x800000000000000000000000n, -2n, false], + [0x800000000000000000000001n, -2n, false], + [0xfffffffffffffffffffffffen, -2n, false], + [0xffffffffffffffffffffffffn, -2n, false], + [0x1000000000000000000000000n, -2n, false], + [0x1000000000000000000000001n, -2n, false], + [0x7ffffffffffffffffffffffffffffffen, -2n, false], + [0x7fffffffffffffffffffffffffffffffn, -2n, false], + [0x80000000000000000000000000000000n, -2n, false], + [0x80000000000000000000000000000001n, -2n, false], + [0xfffffffffffffffffffffffffffffffen, -2n, false], + [0xffffffffffffffffffffffffffffffffn, -2n, false], + [0x100000000000000000000000000000000n, -2n, false], + [0x100000000000000000000000000000001n, -2n, false], + [-0x100000000000000000000000000000001n, -1n, false], + [-0x100000000000000000000000000000000n, -1n, false], + [-0xffffffffffffffffffffffffffffffffn, -1n, false], + [-0xfffffffffffffffffffffffffffffffen, -1n, false], + [-0x80000000000000000000000000000001n, -1n, false], + [-0x80000000000000000000000000000000n, -1n, false], + [-0x7fffffffffffffffffffffffffffffffn, -1n, false], + [-0x7ffffffffffffffffffffffffffffffen, -1n, false], + [-0x1000000000000000000000001n, -1n, false], + [-0x1000000000000000000000000n, -1n, false], + [-0xffffffffffffffffffffffffn, -1n, false], + [-0xfffffffffffffffffffffffen, -1n, false], + [-0x800000000000000000000001n, -1n, false], + [-0x800000000000000000000000n, -1n, false], + [-0x7fffffffffffffffffffffffn, -1n, false], + [-0x7ffffffffffffffffffffffen, -1n, false], + [-0x10000000000000001n, -1n, false], + [-0x10000000000000000n, -1n, false], + [-0xffffffffffffffffn, -1n, false], + [-0xfffffffffffffffen, -1n, false], + [-0x8000000000000001n, -1n, false], + [-0x8000000000000000n, -1n, false], + [-0x7fffffffffffffffn, -1n, false], + [-0x7ffffffffffffffen, -1n, false], + [-0x100000001n, -1n, false], + [-0x100000000n, -1n, false], + [-0xffffffffn, -1n, false], + [-0xfffffffen, -1n, false], + [-0x80000001n, -1n, false], + [-0x80000000n, -1n, false], + [-0x7fffffffn, -1n, false], + [-0x7ffffffen, -1n, false], + [-1n, -1n, true], + [0n, -1n, false], + [1n, -1n, false], + [2n, -1n, false], + [0x7ffffffen, -1n, false], + [0x7fffffffn, -1n, false], + [0x80000000n, -1n, false], + [0x80000001n, -1n, false], + [0xfffffffen, -1n, false], + [0xffffffffn, -1n, false], + [0x100000000n, -1n, false], + [0x100000001n, -1n, false], + [0x7ffffffffffffffen, -1n, false], + [0x7fffffffffffffffn, -1n, false], + [0x8000000000000000n, -1n, false], + [0x8000000000000001n, -1n, false], + [0xfffffffffffffffen, -1n, false], + [0xffffffffffffffffn, -1n, false], + [0x10000000000000000n, -1n, false], + [0x10000000000000001n, -1n, false], + [0x7ffffffffffffffffffffffen, -1n, false], + [0x7fffffffffffffffffffffffn, -1n, false], + [0x800000000000000000000000n, -1n, false], + [0x800000000000000000000001n, -1n, false], + [0xfffffffffffffffffffffffen, -1n, false], + [0xffffffffffffffffffffffffn, -1n, false], + [0x1000000000000000000000000n, -1n, false], + [0x1000000000000000000000001n, -1n, false], + [0x7ffffffffffffffffffffffffffffffen, -1n, false], + [0x7fffffffffffffffffffffffffffffffn, -1n, false], + [0x80000000000000000000000000000000n, -1n, false], + [0x80000000000000000000000000000001n, -1n, false], + [0xfffffffffffffffffffffffffffffffen, -1n, false], + [0xffffffffffffffffffffffffffffffffn, -1n, false], + [0x100000000000000000000000000000000n, -1n, false], + [0x100000000000000000000000000000001n, -1n, false], + [-0x100000000000000000000000000000001n, 0n, false], + [-0x100000000000000000000000000000000n, 0n, false], + [-0xffffffffffffffffffffffffffffffffn, 0n, false], + [-0xfffffffffffffffffffffffffffffffen, 0n, false], + [-0x80000000000000000000000000000001n, 0n, false], + [-0x80000000000000000000000000000000n, 0n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0n, false], + [-0x1000000000000000000000001n, 0n, false], + [-0x1000000000000000000000000n, 0n, false], + [-0xffffffffffffffffffffffffn, 0n, false], + [-0xfffffffffffffffffffffffen, 0n, false], + [-0x800000000000000000000001n, 0n, false], + [-0x800000000000000000000000n, 0n, false], + [-0x7fffffffffffffffffffffffn, 0n, false], + [-0x7ffffffffffffffffffffffen, 0n, false], + [-0x10000000000000001n, 0n, false], + [-0x10000000000000000n, 0n, false], + [-0xffffffffffffffffn, 0n, false], + [-0xfffffffffffffffen, 0n, false], + [-0x8000000000000001n, 0n, false], + [-0x8000000000000000n, 0n, false], + [-0x7fffffffffffffffn, 0n, false], + [-0x7ffffffffffffffen, 0n, false], + [-0x100000001n, 0n, false], + [-0x100000000n, 0n, false], + [-0xffffffffn, 0n, false], + [-0xfffffffen, 0n, false], + [-0x80000001n, 0n, false], + [-0x80000000n, 0n, false], + [-0x7fffffffn, 0n, false], + [-0x7ffffffen, 0n, false], + [0n, 0n, true], + [1n, 0n, false], + [2n, 0n, false], + [0x7ffffffen, 0n, false], + [0x7fffffffn, 0n, false], + [0x80000000n, 0n, false], + [0x80000001n, 0n, false], + [0xfffffffen, 0n, false], + [0xffffffffn, 0n, false], + [0x100000000n, 0n, false], + [0x100000001n, 0n, false], + [0x7ffffffffffffffen, 0n, false], + [0x7fffffffffffffffn, 0n, false], + [0x8000000000000000n, 0n, false], + [0x8000000000000001n, 0n, false], + [0xfffffffffffffffen, 0n, false], + [0xffffffffffffffffn, 0n, false], + [0x10000000000000000n, 0n, false], + [0x10000000000000001n, 0n, false], + [0x7ffffffffffffffffffffffen, 0n, false], + [0x7fffffffffffffffffffffffn, 0n, false], + [0x800000000000000000000000n, 0n, false], + [0x800000000000000000000001n, 0n, false], + [0xfffffffffffffffffffffffen, 0n, false], + [0xffffffffffffffffffffffffn, 0n, false], + [0x1000000000000000000000000n, 0n, false], + [0x1000000000000000000000001n, 0n, false], + [0x7ffffffffffffffffffffffffffffffen, 0n, false], + [0x7fffffffffffffffffffffffffffffffn, 0n, false], + [0x80000000000000000000000000000000n, 0n, false], + [0x80000000000000000000000000000001n, 0n, false], + [0xfffffffffffffffffffffffffffffffen, 0n, false], + [0xffffffffffffffffffffffffffffffffn, 0n, false], + [0x100000000000000000000000000000000n, 0n, false], + [0x100000000000000000000000000000001n, 0n, false], + [-0x100000000000000000000000000000001n, 1n, false], + [-0x100000000000000000000000000000000n, 1n, false], + [-0xffffffffffffffffffffffffffffffffn, 1n, false], + [-0xfffffffffffffffffffffffffffffffen, 1n, false], + [-0x80000000000000000000000000000001n, 1n, false], + [-0x80000000000000000000000000000000n, 1n, false], + [-0x7fffffffffffffffffffffffffffffffn, 1n, false], + [-0x7ffffffffffffffffffffffffffffffen, 1n, false], + [-0x1000000000000000000000001n, 1n, false], + [-0x1000000000000000000000000n, 1n, false], + [-0xffffffffffffffffffffffffn, 1n, false], + [-0xfffffffffffffffffffffffen, 1n, false], + [-0x800000000000000000000001n, 1n, false], + [-0x800000000000000000000000n, 1n, false], + [-0x7fffffffffffffffffffffffn, 1n, false], + [-0x7ffffffffffffffffffffffen, 1n, false], + [-0x10000000000000001n, 1n, false], + [-0x10000000000000000n, 1n, false], + [-0xffffffffffffffffn, 1n, false], + [-0xfffffffffffffffen, 1n, false], + [-0x8000000000000001n, 1n, false], + [-0x8000000000000000n, 1n, false], + [-0x7fffffffffffffffn, 1n, false], + [-0x7ffffffffffffffen, 1n, false], + [-0x100000001n, 1n, false], + [-0x100000000n, 1n, false], + [-0xffffffffn, 1n, false], + [-0xfffffffen, 1n, false], + [-0x80000001n, 1n, false], + [-0x80000000n, 1n, false], + [-0x7fffffffn, 1n, false], + [-0x7ffffffen, 1n, false], + [1n, 1n, true], + [2n, 1n, false], + [0x7ffffffen, 1n, false], + [0x7fffffffn, 1n, false], + [0x80000000n, 1n, false], + [0x80000001n, 1n, false], + [0xfffffffen, 1n, false], + [0xffffffffn, 1n, false], + [0x100000000n, 1n, false], + [0x100000001n, 1n, false], + [0x7ffffffffffffffen, 1n, false], + [0x7fffffffffffffffn, 1n, false], + [0x8000000000000000n, 1n, false], + [0x8000000000000001n, 1n, false], + [0xfffffffffffffffen, 1n, false], + [0xffffffffffffffffn, 1n, false], + [0x10000000000000000n, 1n, false], + [0x10000000000000001n, 1n, false], + [0x7ffffffffffffffffffffffen, 1n, false], + [0x7fffffffffffffffffffffffn, 1n, false], + [0x800000000000000000000000n, 1n, false], + [0x800000000000000000000001n, 1n, false], + [0xfffffffffffffffffffffffen, 1n, false], + [0xffffffffffffffffffffffffn, 1n, false], + [0x1000000000000000000000000n, 1n, false], + [0x1000000000000000000000001n, 1n, false], + [0x7ffffffffffffffffffffffffffffffen, 1n, false], + [0x7fffffffffffffffffffffffffffffffn, 1n, false], + [0x80000000000000000000000000000000n, 1n, false], + [0x80000000000000000000000000000001n, 1n, false], + [0xfffffffffffffffffffffffffffffffen, 1n, false], + [0xffffffffffffffffffffffffffffffffn, 1n, false], + [0x100000000000000000000000000000000n, 1n, false], + [0x100000000000000000000000000000001n, 1n, false], + [-0x100000000000000000000000000000001n, 2n, false], + [-0x100000000000000000000000000000000n, 2n, false], + [-0xffffffffffffffffffffffffffffffffn, 2n, false], + [-0xfffffffffffffffffffffffffffffffen, 2n, false], + [-0x80000000000000000000000000000001n, 2n, false], + [-0x80000000000000000000000000000000n, 2n, false], + [-0x7fffffffffffffffffffffffffffffffn, 2n, false], + [-0x7ffffffffffffffffffffffffffffffen, 2n, false], + [-0x1000000000000000000000001n, 2n, false], + [-0x1000000000000000000000000n, 2n, false], + [-0xffffffffffffffffffffffffn, 2n, false], + [-0xfffffffffffffffffffffffen, 2n, false], + [-0x800000000000000000000001n, 2n, false], + [-0x800000000000000000000000n, 2n, false], + [-0x7fffffffffffffffffffffffn, 2n, false], + [-0x7ffffffffffffffffffffffen, 2n, false], + [-0x10000000000000001n, 2n, false], + [-0x10000000000000000n, 2n, false], + [-0xffffffffffffffffn, 2n, false], + [-0xfffffffffffffffen, 2n, false], + [-0x8000000000000001n, 2n, false], + [-0x8000000000000000n, 2n, false], + [-0x7fffffffffffffffn, 2n, false], + [-0x7ffffffffffffffen, 2n, false], + [-0x100000001n, 2n, false], + [-0x100000000n, 2n, false], + [-0xffffffffn, 2n, false], + [-0xfffffffen, 2n, false], + [-0x80000001n, 2n, false], + [-0x80000000n, 2n, false], + [-0x7fffffffn, 2n, false], + [-0x7ffffffen, 2n, false], + [2n, 2n, true], + [0x7ffffffen, 2n, false], + [0x7fffffffn, 2n, false], + [0x80000000n, 2n, false], + [0x80000001n, 2n, false], + [0xfffffffen, 2n, false], + [0xffffffffn, 2n, false], + [0x100000000n, 2n, false], + [0x100000001n, 2n, false], + [0x7ffffffffffffffen, 2n, false], + [0x7fffffffffffffffn, 2n, false], + [0x8000000000000000n, 2n, false], + [0x8000000000000001n, 2n, false], + [0xfffffffffffffffen, 2n, false], + [0xffffffffffffffffn, 2n, false], + [0x10000000000000000n, 2n, false], + [0x10000000000000001n, 2n, false], + [0x7ffffffffffffffffffffffen, 2n, false], + [0x7fffffffffffffffffffffffn, 2n, false], + [0x800000000000000000000000n, 2n, false], + [0x800000000000000000000001n, 2n, false], + [0xfffffffffffffffffffffffen, 2n, false], + [0xffffffffffffffffffffffffn, 2n, false], + [0x1000000000000000000000000n, 2n, false], + [0x1000000000000000000000001n, 2n, false], + [0x7ffffffffffffffffffffffffffffffen, 2n, false], + [0x7fffffffffffffffffffffffffffffffn, 2n, false], + [0x80000000000000000000000000000000n, 2n, false], + [0x80000000000000000000000000000001n, 2n, false], + [0xfffffffffffffffffffffffffffffffen, 2n, false], + [0xffffffffffffffffffffffffffffffffn, 2n, false], + [0x100000000000000000000000000000000n, 2n, false], + [0x100000000000000000000000000000001n, 2n, false], + [-0x100000000000000000000000000000001n, 0x7ffffffen, false], + [-0x100000000000000000000000000000000n, 0x7ffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, 0x7ffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, 0x7ffffffen, false], + [-0x80000000000000000000000000000001n, 0x7ffffffen, false], + [-0x80000000000000000000000000000000n, 0x7ffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x7ffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x7ffffffen, false], + [-0x1000000000000000000000001n, 0x7ffffffen, false], + [-0x1000000000000000000000000n, 0x7ffffffen, false], + [-0xffffffffffffffffffffffffn, 0x7ffffffen, false], + [-0xfffffffffffffffffffffffen, 0x7ffffffen, false], + [-0x800000000000000000000001n, 0x7ffffffen, false], + [-0x800000000000000000000000n, 0x7ffffffen, false], + [-0x7fffffffffffffffffffffffn, 0x7ffffffen, false], + [-0x7ffffffffffffffffffffffen, 0x7ffffffen, false], + [-0x10000000000000001n, 0x7ffffffen, false], + [-0x10000000000000000n, 0x7ffffffen, false], + [-0xffffffffffffffffn, 0x7ffffffen, false], + [-0xfffffffffffffffen, 0x7ffffffen, false], + [-0x8000000000000001n, 0x7ffffffen, false], + [-0x8000000000000000n, 0x7ffffffen, false], + [-0x7fffffffffffffffn, 0x7ffffffen, false], + [-0x7ffffffffffffffen, 0x7ffffffen, false], + [-0x100000001n, 0x7ffffffen, false], + [-0x100000000n, 0x7ffffffen, false], + [-0xffffffffn, 0x7ffffffen, false], + [-0xfffffffen, 0x7ffffffen, false], + [-0x80000001n, 0x7ffffffen, false], + [-0x80000000n, 0x7ffffffen, false], + [-0x7fffffffn, 0x7ffffffen, false], + [-0x7ffffffen, 0x7ffffffen, false], + [0x7ffffffen, 0x7ffffffen, true], + [0x7fffffffn, 0x7ffffffen, false], + [0x80000000n, 0x7ffffffen, false], + [0x80000001n, 0x7ffffffen, false], + [0xfffffffen, 0x7ffffffen, false], + [0xffffffffn, 0x7ffffffen, false], + [0x100000000n, 0x7ffffffen, false], + [0x100000001n, 0x7ffffffen, false], + [0x7ffffffffffffffen, 0x7ffffffen, false], + [0x7fffffffffffffffn, 0x7ffffffen, false], + [0x8000000000000000n, 0x7ffffffen, false], + [0x8000000000000001n, 0x7ffffffen, false], + [0xfffffffffffffffen, 0x7ffffffen, false], + [0xffffffffffffffffn, 0x7ffffffen, false], + [0x10000000000000000n, 0x7ffffffen, false], + [0x10000000000000001n, 0x7ffffffen, false], + [0x7ffffffffffffffffffffffen, 0x7ffffffen, false], + [0x7fffffffffffffffffffffffn, 0x7ffffffen, false], + [0x800000000000000000000000n, 0x7ffffffen, false], + [0x800000000000000000000001n, 0x7ffffffen, false], + [0xfffffffffffffffffffffffen, 0x7ffffffen, false], + [0xffffffffffffffffffffffffn, 0x7ffffffen, false], + [0x1000000000000000000000000n, 0x7ffffffen, false], + [0x1000000000000000000000001n, 0x7ffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7ffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7ffffffen, false], + [0x80000000000000000000000000000000n, 0x7ffffffen, false], + [0x80000000000000000000000000000001n, 0x7ffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0x7ffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0x7ffffffen, false], + [0x100000000000000000000000000000000n, 0x7ffffffen, false], + [0x100000000000000000000000000000001n, 0x7ffffffen, false], + [-0x100000000000000000000000000000001n, 0x7fffffffn, false], + [-0x100000000000000000000000000000000n, 0x7fffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, 0x7fffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, 0x7fffffffn, false], + [-0x80000000000000000000000000000001n, 0x7fffffffn, false], + [-0x80000000000000000000000000000000n, 0x7fffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x7fffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x7fffffffn, false], + [-0x1000000000000000000000001n, 0x7fffffffn, false], + [-0x1000000000000000000000000n, 0x7fffffffn, false], + [-0xffffffffffffffffffffffffn, 0x7fffffffn, false], + [-0xfffffffffffffffffffffffen, 0x7fffffffn, false], + [-0x800000000000000000000001n, 0x7fffffffn, false], + [-0x800000000000000000000000n, 0x7fffffffn, false], + [-0x7fffffffffffffffffffffffn, 0x7fffffffn, false], + [-0x7ffffffffffffffffffffffen, 0x7fffffffn, false], + [-0x10000000000000001n, 0x7fffffffn, false], + [-0x10000000000000000n, 0x7fffffffn, false], + [-0xffffffffffffffffn, 0x7fffffffn, false], + [-0xfffffffffffffffen, 0x7fffffffn, false], + [-0x8000000000000001n, 0x7fffffffn, false], + [-0x8000000000000000n, 0x7fffffffn, false], + [-0x7fffffffffffffffn, 0x7fffffffn, false], + [-0x7ffffffffffffffen, 0x7fffffffn, false], + [-0x100000001n, 0x7fffffffn, false], + [-0x100000000n, 0x7fffffffn, false], + [-0xffffffffn, 0x7fffffffn, false], + [-0xfffffffen, 0x7fffffffn, false], + [-0x80000001n, 0x7fffffffn, false], + [-0x80000000n, 0x7fffffffn, false], + [-0x7fffffffn, 0x7fffffffn, false], + [-0x7ffffffen, 0x7fffffffn, false], + [0x7fffffffn, 0x7fffffffn, true], + [0x80000000n, 0x7fffffffn, false], + [0x80000001n, 0x7fffffffn, false], + [0xfffffffen, 0x7fffffffn, false], + [0xffffffffn, 0x7fffffffn, false], + [0x100000000n, 0x7fffffffn, false], + [0x100000001n, 0x7fffffffn, false], + [0x7ffffffffffffffen, 0x7fffffffn, false], + [0x7fffffffffffffffn, 0x7fffffffn, false], + [0x8000000000000000n, 0x7fffffffn, false], + [0x8000000000000001n, 0x7fffffffn, false], + [0xfffffffffffffffen, 0x7fffffffn, false], + [0xffffffffffffffffn, 0x7fffffffn, false], + [0x10000000000000000n, 0x7fffffffn, false], + [0x10000000000000001n, 0x7fffffffn, false], + [0x7ffffffffffffffffffffffen, 0x7fffffffn, false], + [0x7fffffffffffffffffffffffn, 0x7fffffffn, false], + [0x800000000000000000000000n, 0x7fffffffn, false], + [0x800000000000000000000001n, 0x7fffffffn, false], + [0xfffffffffffffffffffffffen, 0x7fffffffn, false], + [0xffffffffffffffffffffffffn, 0x7fffffffn, false], + [0x1000000000000000000000000n, 0x7fffffffn, false], + [0x1000000000000000000000001n, 0x7fffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7fffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7fffffffn, false], + [0x80000000000000000000000000000000n, 0x7fffffffn, false], + [0x80000000000000000000000000000001n, 0x7fffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0x7fffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0x7fffffffn, false], + [0x100000000000000000000000000000000n, 0x7fffffffn, false], + [0x100000000000000000000000000000001n, 0x7fffffffn, false], + [-0x100000000000000000000000000000001n, 0x80000000n, false], + [-0x100000000000000000000000000000000n, 0x80000000n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x80000000n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x80000000n, false], + [-0x80000000000000000000000000000001n, 0x80000000n, false], + [-0x80000000000000000000000000000000n, 0x80000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x80000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x80000000n, false], + [-0x1000000000000000000000001n, 0x80000000n, false], + [-0x1000000000000000000000000n, 0x80000000n, false], + [-0xffffffffffffffffffffffffn, 0x80000000n, false], + [-0xfffffffffffffffffffffffen, 0x80000000n, false], + [-0x800000000000000000000001n, 0x80000000n, false], + [-0x800000000000000000000000n, 0x80000000n, false], + [-0x7fffffffffffffffffffffffn, 0x80000000n, false], + [-0x7ffffffffffffffffffffffen, 0x80000000n, false], + [-0x10000000000000001n, 0x80000000n, false], + [-0x10000000000000000n, 0x80000000n, false], + [-0xffffffffffffffffn, 0x80000000n, false], + [-0xfffffffffffffffen, 0x80000000n, false], + [-0x8000000000000001n, 0x80000000n, false], + [-0x8000000000000000n, 0x80000000n, false], + [-0x7fffffffffffffffn, 0x80000000n, false], + [-0x7ffffffffffffffen, 0x80000000n, false], + [-0x100000001n, 0x80000000n, false], + [-0x100000000n, 0x80000000n, false], + [-0xffffffffn, 0x80000000n, false], + [-0xfffffffen, 0x80000000n, false], + [-0x80000001n, 0x80000000n, false], + [-0x80000000n, 0x80000000n, false], + [-0x7fffffffn, 0x80000000n, false], + [-0x7ffffffen, 0x80000000n, false], + [0x80000000n, 0x80000000n, true], + [0x80000001n, 0x80000000n, false], + [0xfffffffen, 0x80000000n, false], + [0xffffffffn, 0x80000000n, false], + [0x100000000n, 0x80000000n, false], + [0x100000001n, 0x80000000n, false], + [0x7ffffffffffffffen, 0x80000000n, false], + [0x7fffffffffffffffn, 0x80000000n, false], + [0x8000000000000000n, 0x80000000n, false], + [0x8000000000000001n, 0x80000000n, false], + [0xfffffffffffffffen, 0x80000000n, false], + [0xffffffffffffffffn, 0x80000000n, false], + [0x10000000000000000n, 0x80000000n, false], + [0x10000000000000001n, 0x80000000n, false], + [0x7ffffffffffffffffffffffen, 0x80000000n, false], + [0x7fffffffffffffffffffffffn, 0x80000000n, false], + [0x800000000000000000000000n, 0x80000000n, false], + [0x800000000000000000000001n, 0x80000000n, false], + [0xfffffffffffffffffffffffen, 0x80000000n, false], + [0xffffffffffffffffffffffffn, 0x80000000n, false], + [0x1000000000000000000000000n, 0x80000000n, false], + [0x1000000000000000000000001n, 0x80000000n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x80000000n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x80000000n, false], + [0x80000000000000000000000000000000n, 0x80000000n, false], + [0x80000000000000000000000000000001n, 0x80000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x80000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x80000000n, false], + [0x100000000000000000000000000000000n, 0x80000000n, false], + [0x100000000000000000000000000000001n, 0x80000000n, false], + [-0x100000000000000000000000000000001n, 0x80000001n, false], + [-0x100000000000000000000000000000000n, 0x80000001n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x80000001n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x80000001n, false], + [-0x80000000000000000000000000000001n, 0x80000001n, false], + [-0x80000000000000000000000000000000n, 0x80000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x80000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x80000001n, false], + [-0x1000000000000000000000001n, 0x80000001n, false], + [-0x1000000000000000000000000n, 0x80000001n, false], + [-0xffffffffffffffffffffffffn, 0x80000001n, false], + [-0xfffffffffffffffffffffffen, 0x80000001n, false], + [-0x800000000000000000000001n, 0x80000001n, false], + [-0x800000000000000000000000n, 0x80000001n, false], + [-0x7fffffffffffffffffffffffn, 0x80000001n, false], + [-0x7ffffffffffffffffffffffen, 0x80000001n, false], + [-0x10000000000000001n, 0x80000001n, false], + [-0x10000000000000000n, 0x80000001n, false], + [-0xffffffffffffffffn, 0x80000001n, false], + [-0xfffffffffffffffen, 0x80000001n, false], + [-0x8000000000000001n, 0x80000001n, false], + [-0x8000000000000000n, 0x80000001n, false], + [-0x7fffffffffffffffn, 0x80000001n, false], + [-0x7ffffffffffffffen, 0x80000001n, false], + [-0x100000001n, 0x80000001n, false], + [-0x100000000n, 0x80000001n, false], + [-0xffffffffn, 0x80000001n, false], + [-0xfffffffen, 0x80000001n, false], + [-0x80000001n, 0x80000001n, false], + [-0x80000000n, 0x80000001n, false], + [-0x7fffffffn, 0x80000001n, false], + [-0x7ffffffen, 0x80000001n, false], + [0x80000001n, 0x80000001n, true], + [0xfffffffen, 0x80000001n, false], + [0xffffffffn, 0x80000001n, false], + [0x100000000n, 0x80000001n, false], + [0x100000001n, 0x80000001n, false], + [0x7ffffffffffffffen, 0x80000001n, false], + [0x7fffffffffffffffn, 0x80000001n, false], + [0x8000000000000000n, 0x80000001n, false], + [0x8000000000000001n, 0x80000001n, false], + [0xfffffffffffffffen, 0x80000001n, false], + [0xffffffffffffffffn, 0x80000001n, false], + [0x10000000000000000n, 0x80000001n, false], + [0x10000000000000001n, 0x80000001n, false], + [0x7ffffffffffffffffffffffen, 0x80000001n, false], + [0x7fffffffffffffffffffffffn, 0x80000001n, false], + [0x800000000000000000000000n, 0x80000001n, false], + [0x800000000000000000000001n, 0x80000001n, false], + [0xfffffffffffffffffffffffen, 0x80000001n, false], + [0xffffffffffffffffffffffffn, 0x80000001n, false], + [0x1000000000000000000000000n, 0x80000001n, false], + [0x1000000000000000000000001n, 0x80000001n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x80000001n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x80000001n, false], + [0x80000000000000000000000000000000n, 0x80000001n, false], + [0x80000000000000000000000000000001n, 0x80000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x80000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x80000001n, false], + [0x100000000000000000000000000000000n, 0x80000001n, false], + [0x100000000000000000000000000000001n, 0x80000001n, false], + [-0x100000000000000000000000000000001n, -0x80000001n, false], + [-0x100000000000000000000000000000000n, -0x80000001n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x80000001n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x80000001n, false], + [-0x80000000000000000000000000000001n, -0x80000001n, false], + [-0x80000000000000000000000000000000n, -0x80000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x80000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x80000001n, false], + [-0x1000000000000000000000001n, -0x80000001n, false], + [-0x1000000000000000000000000n, -0x80000001n, false], + [-0xffffffffffffffffffffffffn, -0x80000001n, false], + [-0xfffffffffffffffffffffffen, -0x80000001n, false], + [-0x800000000000000000000001n, -0x80000001n, false], + [-0x800000000000000000000000n, -0x80000001n, false], + [-0x7fffffffffffffffffffffffn, -0x80000001n, false], + [-0x7ffffffffffffffffffffffen, -0x80000001n, false], + [-0x10000000000000001n, -0x80000001n, false], + [-0x10000000000000000n, -0x80000001n, false], + [-0xffffffffffffffffn, -0x80000001n, false], + [-0xfffffffffffffffen, -0x80000001n, false], + [-0x8000000000000001n, -0x80000001n, false], + [-0x8000000000000000n, -0x80000001n, false], + [-0x7fffffffffffffffn, -0x80000001n, false], + [-0x7ffffffffffffffen, -0x80000001n, false], + [-0x100000001n, -0x80000001n, false], + [-0x100000000n, -0x80000001n, false], + [-0xffffffffn, -0x80000001n, false], + [-0xfffffffen, -0x80000001n, false], + [-0x80000001n, -0x80000001n, true], + [-0x80000000n, -0x80000001n, false], + [-0x7fffffffn, -0x80000001n, false], + [-0x7ffffffen, -0x80000001n, false], + [0xfffffffen, -0x80000001n, false], + [0xffffffffn, -0x80000001n, false], + [0x100000000n, -0x80000001n, false], + [0x100000001n, -0x80000001n, false], + [0x7ffffffffffffffen, -0x80000001n, false], + [0x7fffffffffffffffn, -0x80000001n, false], + [0x8000000000000000n, -0x80000001n, false], + [0x8000000000000001n, -0x80000001n, false], + [0xfffffffffffffffen, -0x80000001n, false], + [0xffffffffffffffffn, -0x80000001n, false], + [0x10000000000000000n, -0x80000001n, false], + [0x10000000000000001n, -0x80000001n, false], + [0x7ffffffffffffffffffffffen, -0x80000001n, false], + [0x7fffffffffffffffffffffffn, -0x80000001n, false], + [0x800000000000000000000000n, -0x80000001n, false], + [0x800000000000000000000001n, -0x80000001n, false], + [0xfffffffffffffffffffffffen, -0x80000001n, false], + [0xffffffffffffffffffffffffn, -0x80000001n, false], + [0x1000000000000000000000000n, -0x80000001n, false], + [0x1000000000000000000000001n, -0x80000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x80000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x80000001n, false], + [0x80000000000000000000000000000000n, -0x80000001n, false], + [0x80000000000000000000000000000001n, -0x80000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x80000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x80000001n, false], + [0x100000000000000000000000000000000n, -0x80000001n, false], + [0x100000000000000000000000000000001n, -0x80000001n, false], + [-0x100000000000000000000000000000001n, -0x80000000n, false], + [-0x100000000000000000000000000000000n, -0x80000000n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x80000000n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x80000000n, false], + [-0x80000000000000000000000000000001n, -0x80000000n, false], + [-0x80000000000000000000000000000000n, -0x80000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x80000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x80000000n, false], + [-0x1000000000000000000000001n, -0x80000000n, false], + [-0x1000000000000000000000000n, -0x80000000n, false], + [-0xffffffffffffffffffffffffn, -0x80000000n, false], + [-0xfffffffffffffffffffffffen, -0x80000000n, false], + [-0x800000000000000000000001n, -0x80000000n, false], + [-0x800000000000000000000000n, -0x80000000n, false], + [-0x7fffffffffffffffffffffffn, -0x80000000n, false], + [-0x7ffffffffffffffffffffffen, -0x80000000n, false], + [-0x10000000000000001n, -0x80000000n, false], + [-0x10000000000000000n, -0x80000000n, false], + [-0xffffffffffffffffn, -0x80000000n, false], + [-0xfffffffffffffffen, -0x80000000n, false], + [-0x8000000000000001n, -0x80000000n, false], + [-0x8000000000000000n, -0x80000000n, false], + [-0x7fffffffffffffffn, -0x80000000n, false], + [-0x7ffffffffffffffen, -0x80000000n, false], + [-0x100000001n, -0x80000000n, false], + [-0x100000000n, -0x80000000n, false], + [-0xffffffffn, -0x80000000n, false], + [-0xfffffffen, -0x80000000n, false], + [-0x80000000n, -0x80000000n, true], + [-0x7fffffffn, -0x80000000n, false], + [-0x7ffffffen, -0x80000000n, false], + [0xfffffffen, -0x80000000n, false], + [0xffffffffn, -0x80000000n, false], + [0x100000000n, -0x80000000n, false], + [0x100000001n, -0x80000000n, false], + [0x7ffffffffffffffen, -0x80000000n, false], + [0x7fffffffffffffffn, -0x80000000n, false], + [0x8000000000000000n, -0x80000000n, false], + [0x8000000000000001n, -0x80000000n, false], + [0xfffffffffffffffen, -0x80000000n, false], + [0xffffffffffffffffn, -0x80000000n, false], + [0x10000000000000000n, -0x80000000n, false], + [0x10000000000000001n, -0x80000000n, false], + [0x7ffffffffffffffffffffffen, -0x80000000n, false], + [0x7fffffffffffffffffffffffn, -0x80000000n, false], + [0x800000000000000000000000n, -0x80000000n, false], + [0x800000000000000000000001n, -0x80000000n, false], + [0xfffffffffffffffffffffffen, -0x80000000n, false], + [0xffffffffffffffffffffffffn, -0x80000000n, false], + [0x1000000000000000000000000n, -0x80000000n, false], + [0x1000000000000000000000001n, -0x80000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x80000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x80000000n, false], + [0x80000000000000000000000000000000n, -0x80000000n, false], + [0x80000000000000000000000000000001n, -0x80000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x80000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x80000000n, false], + [0x100000000000000000000000000000000n, -0x80000000n, false], + [0x100000000000000000000000000000001n, -0x80000000n, false], + [-0x100000000000000000000000000000001n, -0x7fffffffn, false], + [-0x100000000000000000000000000000000n, -0x7fffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, -0x7fffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, -0x7fffffffn, false], + [-0x80000000000000000000000000000001n, -0x7fffffffn, false], + [-0x80000000000000000000000000000000n, -0x7fffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x7fffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x7fffffffn, false], + [-0x1000000000000000000000001n, -0x7fffffffn, false], + [-0x1000000000000000000000000n, -0x7fffffffn, false], + [-0xffffffffffffffffffffffffn, -0x7fffffffn, false], + [-0xfffffffffffffffffffffffen, -0x7fffffffn, false], + [-0x800000000000000000000001n, -0x7fffffffn, false], + [-0x800000000000000000000000n, -0x7fffffffn, false], + [-0x7fffffffffffffffffffffffn, -0x7fffffffn, false], + [-0x7ffffffffffffffffffffffen, -0x7fffffffn, false], + [-0x10000000000000001n, -0x7fffffffn, false], + [-0x10000000000000000n, -0x7fffffffn, false], + [-0xffffffffffffffffn, -0x7fffffffn, false], + [-0xfffffffffffffffen, -0x7fffffffn, false], + [-0x8000000000000001n, -0x7fffffffn, false], + [-0x8000000000000000n, -0x7fffffffn, false], + [-0x7fffffffffffffffn, -0x7fffffffn, false], + [-0x7ffffffffffffffen, -0x7fffffffn, false], + [-0x100000001n, -0x7fffffffn, false], + [-0x100000000n, -0x7fffffffn, false], + [-0xffffffffn, -0x7fffffffn, false], + [-0xfffffffen, -0x7fffffffn, false], + [-0x7fffffffn, -0x7fffffffn, true], + [-0x7ffffffen, -0x7fffffffn, false], + [0xfffffffen, -0x7fffffffn, false], + [0xffffffffn, -0x7fffffffn, false], + [0x100000000n, -0x7fffffffn, false], + [0x100000001n, -0x7fffffffn, false], + [0x7ffffffffffffffen, -0x7fffffffn, false], + [0x7fffffffffffffffn, -0x7fffffffn, false], + [0x8000000000000000n, -0x7fffffffn, false], + [0x8000000000000001n, -0x7fffffffn, false], + [0xfffffffffffffffen, -0x7fffffffn, false], + [0xffffffffffffffffn, -0x7fffffffn, false], + [0x10000000000000000n, -0x7fffffffn, false], + [0x10000000000000001n, -0x7fffffffn, false], + [0x7ffffffffffffffffffffffen, -0x7fffffffn, false], + [0x7fffffffffffffffffffffffn, -0x7fffffffn, false], + [0x800000000000000000000000n, -0x7fffffffn, false], + [0x800000000000000000000001n, -0x7fffffffn, false], + [0xfffffffffffffffffffffffen, -0x7fffffffn, false], + [0xffffffffffffffffffffffffn, -0x7fffffffn, false], + [0x1000000000000000000000000n, -0x7fffffffn, false], + [0x1000000000000000000000001n, -0x7fffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7fffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7fffffffn, false], + [0x80000000000000000000000000000000n, -0x7fffffffn, false], + [0x80000000000000000000000000000001n, -0x7fffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0x7fffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0x7fffffffn, false], + [0x100000000000000000000000000000000n, -0x7fffffffn, false], + [0x100000000000000000000000000000001n, -0x7fffffffn, false], + [-0x100000000000000000000000000000001n, -0x7ffffffen, false], + [-0x100000000000000000000000000000000n, -0x7ffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, -0x7ffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, -0x7ffffffen, false], + [-0x80000000000000000000000000000001n, -0x7ffffffen, false], + [-0x80000000000000000000000000000000n, -0x7ffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x7ffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x7ffffffen, false], + [-0x1000000000000000000000001n, -0x7ffffffen, false], + [-0x1000000000000000000000000n, -0x7ffffffen, false], + [-0xffffffffffffffffffffffffn, -0x7ffffffen, false], + [-0xfffffffffffffffffffffffen, -0x7ffffffen, false], + [-0x800000000000000000000001n, -0x7ffffffen, false], + [-0x800000000000000000000000n, -0x7ffffffen, false], + [-0x7fffffffffffffffffffffffn, -0x7ffffffen, false], + [-0x7ffffffffffffffffffffffen, -0x7ffffffen, false], + [-0x10000000000000001n, -0x7ffffffen, false], + [-0x10000000000000000n, -0x7ffffffen, false], + [-0xffffffffffffffffn, -0x7ffffffen, false], + [-0xfffffffffffffffen, -0x7ffffffen, false], + [-0x8000000000000001n, -0x7ffffffen, false], + [-0x8000000000000000n, -0x7ffffffen, false], + [-0x7fffffffffffffffn, -0x7ffffffen, false], + [-0x7ffffffffffffffen, -0x7ffffffen, false], + [-0x100000001n, -0x7ffffffen, false], + [-0x100000000n, -0x7ffffffen, false], + [-0xffffffffn, -0x7ffffffen, false], + [-0xfffffffen, -0x7ffffffen, false], + [-0x7ffffffen, -0x7ffffffen, true], + [0xfffffffen, -0x7ffffffen, false], + [0xffffffffn, -0x7ffffffen, false], + [0x100000000n, -0x7ffffffen, false], + [0x100000001n, -0x7ffffffen, false], + [0x7ffffffffffffffen, -0x7ffffffen, false], + [0x7fffffffffffffffn, -0x7ffffffen, false], + [0x8000000000000000n, -0x7ffffffen, false], + [0x8000000000000001n, -0x7ffffffen, false], + [0xfffffffffffffffen, -0x7ffffffen, false], + [0xffffffffffffffffn, -0x7ffffffen, false], + [0x10000000000000000n, -0x7ffffffen, false], + [0x10000000000000001n, -0x7ffffffen, false], + [0x7ffffffffffffffffffffffen, -0x7ffffffen, false], + [0x7fffffffffffffffffffffffn, -0x7ffffffen, false], + [0x800000000000000000000000n, -0x7ffffffen, false], + [0x800000000000000000000001n, -0x7ffffffen, false], + [0xfffffffffffffffffffffffen, -0x7ffffffen, false], + [0xffffffffffffffffffffffffn, -0x7ffffffen, false], + [0x1000000000000000000000000n, -0x7ffffffen, false], + [0x1000000000000000000000001n, -0x7ffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7ffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7ffffffen, false], + [0x80000000000000000000000000000000n, -0x7ffffffen, false], + [0x80000000000000000000000000000001n, -0x7ffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0x7ffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0x7ffffffen, false], + [0x100000000000000000000000000000000n, -0x7ffffffen, false], + [0x100000000000000000000000000000001n, -0x7ffffffen, false], + [-0x100000000000000000000000000000001n, 0xfffffffen, false], + [-0x100000000000000000000000000000000n, 0xfffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, 0xfffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, 0xfffffffen, false], + [-0x80000000000000000000000000000001n, 0xfffffffen, false], + [-0x80000000000000000000000000000000n, 0xfffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, 0xfffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, 0xfffffffen, false], + [-0x1000000000000000000000001n, 0xfffffffen, false], + [-0x1000000000000000000000000n, 0xfffffffen, false], + [-0xffffffffffffffffffffffffn, 0xfffffffen, false], + [-0xfffffffffffffffffffffffen, 0xfffffffen, false], + [-0x800000000000000000000001n, 0xfffffffen, false], + [-0x800000000000000000000000n, 0xfffffffen, false], + [-0x7fffffffffffffffffffffffn, 0xfffffffen, false], + [-0x7ffffffffffffffffffffffen, 0xfffffffen, false], + [-0x10000000000000001n, 0xfffffffen, false], + [-0x10000000000000000n, 0xfffffffen, false], + [-0xffffffffffffffffn, 0xfffffffen, false], + [-0xfffffffffffffffen, 0xfffffffen, false], + [-0x8000000000000001n, 0xfffffffen, false], + [-0x8000000000000000n, 0xfffffffen, false], + [-0x7fffffffffffffffn, 0xfffffffen, false], + [-0x7ffffffffffffffen, 0xfffffffen, false], + [-0x100000001n, 0xfffffffen, false], + [-0x100000000n, 0xfffffffen, false], + [-0xffffffffn, 0xfffffffen, false], + [-0xfffffffen, 0xfffffffen, false], + [0xfffffffen, 0xfffffffen, true], + [0xffffffffn, 0xfffffffen, false], + [0x100000000n, 0xfffffffen, false], + [0x100000001n, 0xfffffffen, false], + [0x7ffffffffffffffen, 0xfffffffen, false], + [0x7fffffffffffffffn, 0xfffffffen, false], + [0x8000000000000000n, 0xfffffffen, false], + [0x8000000000000001n, 0xfffffffen, false], + [0xfffffffffffffffen, 0xfffffffen, false], + [0xffffffffffffffffn, 0xfffffffen, false], + [0x10000000000000000n, 0xfffffffen, false], + [0x10000000000000001n, 0xfffffffen, false], + [0x7ffffffffffffffffffffffen, 0xfffffffen, false], + [0x7fffffffffffffffffffffffn, 0xfffffffen, false], + [0x800000000000000000000000n, 0xfffffffen, false], + [0x800000000000000000000001n, 0xfffffffen, false], + [0xfffffffffffffffffffffffen, 0xfffffffen, false], + [0xffffffffffffffffffffffffn, 0xfffffffen, false], + [0x1000000000000000000000000n, 0xfffffffen, false], + [0x1000000000000000000000001n, 0xfffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0xfffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0xfffffffen, false], + [0x80000000000000000000000000000000n, 0xfffffffen, false], + [0x80000000000000000000000000000001n, 0xfffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0xfffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0xfffffffen, false], + [0x100000000000000000000000000000000n, 0xfffffffen, false], + [0x100000000000000000000000000000001n, 0xfffffffen, false], + [-0x100000000000000000000000000000001n, 0xffffffffn, false], + [-0x100000000000000000000000000000000n, 0xffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, 0xffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, 0xffffffffn, false], + [-0x80000000000000000000000000000001n, 0xffffffffn, false], + [-0x80000000000000000000000000000000n, 0xffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, 0xffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, 0xffffffffn, false], + [-0x1000000000000000000000001n, 0xffffffffn, false], + [-0x1000000000000000000000000n, 0xffffffffn, false], + [-0xffffffffffffffffffffffffn, 0xffffffffn, false], + [-0xfffffffffffffffffffffffen, 0xffffffffn, false], + [-0x800000000000000000000001n, 0xffffffffn, false], + [-0x800000000000000000000000n, 0xffffffffn, false], + [-0x7fffffffffffffffffffffffn, 0xffffffffn, false], + [-0x7ffffffffffffffffffffffen, 0xffffffffn, false], + [-0x10000000000000001n, 0xffffffffn, false], + [-0x10000000000000000n, 0xffffffffn, false], + [-0xffffffffffffffffn, 0xffffffffn, false], + [-0xfffffffffffffffen, 0xffffffffn, false], + [-0x8000000000000001n, 0xffffffffn, false], + [-0x8000000000000000n, 0xffffffffn, false], + [-0x7fffffffffffffffn, 0xffffffffn, false], + [-0x7ffffffffffffffen, 0xffffffffn, false], + [-0x100000001n, 0xffffffffn, false], + [-0x100000000n, 0xffffffffn, false], + [-0xffffffffn, 0xffffffffn, false], + [-0xfffffffen, 0xffffffffn, false], + [0xffffffffn, 0xffffffffn, true], + [0x100000000n, 0xffffffffn, false], + [0x100000001n, 0xffffffffn, false], + [0x7ffffffffffffffen, 0xffffffffn, false], + [0x7fffffffffffffffn, 0xffffffffn, false], + [0x8000000000000000n, 0xffffffffn, false], + [0x8000000000000001n, 0xffffffffn, false], + [0xfffffffffffffffen, 0xffffffffn, false], + [0xffffffffffffffffn, 0xffffffffn, false], + [0x10000000000000000n, 0xffffffffn, false], + [0x10000000000000001n, 0xffffffffn, false], + [0x7ffffffffffffffffffffffen, 0xffffffffn, false], + [0x7fffffffffffffffffffffffn, 0xffffffffn, false], + [0x800000000000000000000000n, 0xffffffffn, false], + [0x800000000000000000000001n, 0xffffffffn, false], + [0xfffffffffffffffffffffffen, 0xffffffffn, false], + [0xffffffffffffffffffffffffn, 0xffffffffn, false], + [0x1000000000000000000000000n, 0xffffffffn, false], + [0x1000000000000000000000001n, 0xffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, 0xffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0xffffffffn, false], + [0x80000000000000000000000000000000n, 0xffffffffn, false], + [0x80000000000000000000000000000001n, 0xffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0xffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0xffffffffn, false], + [0x100000000000000000000000000000000n, 0xffffffffn, false], + [0x100000000000000000000000000000001n, 0xffffffffn, false], + [-0x100000000000000000000000000000001n, 0x100000000n, false], + [-0x100000000000000000000000000000000n, 0x100000000n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x100000000n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x100000000n, false], + [-0x80000000000000000000000000000001n, 0x100000000n, false], + [-0x80000000000000000000000000000000n, 0x100000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x100000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x100000000n, false], + [-0x1000000000000000000000001n, 0x100000000n, false], + [-0x1000000000000000000000000n, 0x100000000n, false], + [-0xffffffffffffffffffffffffn, 0x100000000n, false], + [-0xfffffffffffffffffffffffen, 0x100000000n, false], + [-0x800000000000000000000001n, 0x100000000n, false], + [-0x800000000000000000000000n, 0x100000000n, false], + [-0x7fffffffffffffffffffffffn, 0x100000000n, false], + [-0x7ffffffffffffffffffffffen, 0x100000000n, false], + [-0x10000000000000001n, 0x100000000n, false], + [-0x10000000000000000n, 0x100000000n, false], + [-0xffffffffffffffffn, 0x100000000n, false], + [-0xfffffffffffffffen, 0x100000000n, false], + [-0x8000000000000001n, 0x100000000n, false], + [-0x8000000000000000n, 0x100000000n, false], + [-0x7fffffffffffffffn, 0x100000000n, false], + [-0x7ffffffffffffffen, 0x100000000n, false], + [-0x100000001n, 0x100000000n, false], + [-0x100000000n, 0x100000000n, false], + [-0xffffffffn, 0x100000000n, false], + [-0xfffffffen, 0x100000000n, false], + [0x100000000n, 0x100000000n, true], + [0x100000001n, 0x100000000n, false], + [0x7ffffffffffffffen, 0x100000000n, false], + [0x7fffffffffffffffn, 0x100000000n, false], + [0x8000000000000000n, 0x100000000n, false], + [0x8000000000000001n, 0x100000000n, false], + [0xfffffffffffffffen, 0x100000000n, false], + [0xffffffffffffffffn, 0x100000000n, false], + [0x10000000000000000n, 0x100000000n, false], + [0x10000000000000001n, 0x100000000n, false], + [0x7ffffffffffffffffffffffen, 0x100000000n, false], + [0x7fffffffffffffffffffffffn, 0x100000000n, false], + [0x800000000000000000000000n, 0x100000000n, false], + [0x800000000000000000000001n, 0x100000000n, false], + [0xfffffffffffffffffffffffen, 0x100000000n, false], + [0xffffffffffffffffffffffffn, 0x100000000n, false], + [0x1000000000000000000000000n, 0x100000000n, false], + [0x1000000000000000000000001n, 0x100000000n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x100000000n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x100000000n, false], + [0x80000000000000000000000000000000n, 0x100000000n, false], + [0x80000000000000000000000000000001n, 0x100000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x100000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x100000000n, false], + [0x100000000000000000000000000000000n, 0x100000000n, false], + [0x100000000000000000000000000000001n, 0x100000000n, false], + [-0x100000000000000000000000000000001n, 0x100000001n, false], + [-0x100000000000000000000000000000000n, 0x100000001n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x100000001n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x100000001n, false], + [-0x80000000000000000000000000000001n, 0x100000001n, false], + [-0x80000000000000000000000000000000n, 0x100000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x100000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x100000001n, false], + [-0x1000000000000000000000001n, 0x100000001n, false], + [-0x1000000000000000000000000n, 0x100000001n, false], + [-0xffffffffffffffffffffffffn, 0x100000001n, false], + [-0xfffffffffffffffffffffffen, 0x100000001n, false], + [-0x800000000000000000000001n, 0x100000001n, false], + [-0x800000000000000000000000n, 0x100000001n, false], + [-0x7fffffffffffffffffffffffn, 0x100000001n, false], + [-0x7ffffffffffffffffffffffen, 0x100000001n, false], + [-0x10000000000000001n, 0x100000001n, false], + [-0x10000000000000000n, 0x100000001n, false], + [-0xffffffffffffffffn, 0x100000001n, false], + [-0xfffffffffffffffen, 0x100000001n, false], + [-0x8000000000000001n, 0x100000001n, false], + [-0x8000000000000000n, 0x100000001n, false], + [-0x7fffffffffffffffn, 0x100000001n, false], + [-0x7ffffffffffffffen, 0x100000001n, false], + [-0x100000001n, 0x100000001n, false], + [-0x100000000n, 0x100000001n, false], + [-0xffffffffn, 0x100000001n, false], + [-0xfffffffen, 0x100000001n, false], + [0x100000001n, 0x100000001n, true], + [0x7ffffffffffffffen, 0x100000001n, false], + [0x7fffffffffffffffn, 0x100000001n, false], + [0x8000000000000000n, 0x100000001n, false], + [0x8000000000000001n, 0x100000001n, false], + [0xfffffffffffffffen, 0x100000001n, false], + [0xffffffffffffffffn, 0x100000001n, false], + [0x10000000000000000n, 0x100000001n, false], + [0x10000000000000001n, 0x100000001n, false], + [0x7ffffffffffffffffffffffen, 0x100000001n, false], + [0x7fffffffffffffffffffffffn, 0x100000001n, false], + [0x800000000000000000000000n, 0x100000001n, false], + [0x800000000000000000000001n, 0x100000001n, false], + [0xfffffffffffffffffffffffen, 0x100000001n, false], + [0xffffffffffffffffffffffffn, 0x100000001n, false], + [0x1000000000000000000000000n, 0x100000001n, false], + [0x1000000000000000000000001n, 0x100000001n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x100000001n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x100000001n, false], + [0x80000000000000000000000000000000n, 0x100000001n, false], + [0x80000000000000000000000000000001n, 0x100000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x100000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x100000001n, false], + [0x100000000000000000000000000000000n, 0x100000001n, false], + [0x100000000000000000000000000000001n, 0x100000001n, false], + [-0x100000000000000000000000000000001n, -0x100000001n, false], + [-0x100000000000000000000000000000000n, -0x100000001n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x100000001n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x100000001n, false], + [-0x80000000000000000000000000000001n, -0x100000001n, false], + [-0x80000000000000000000000000000000n, -0x100000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x100000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x100000001n, false], + [-0x1000000000000000000000001n, -0x100000001n, false], + [-0x1000000000000000000000000n, -0x100000001n, false], + [-0xffffffffffffffffffffffffn, -0x100000001n, false], + [-0xfffffffffffffffffffffffen, -0x100000001n, false], + [-0x800000000000000000000001n, -0x100000001n, false], + [-0x800000000000000000000000n, -0x100000001n, false], + [-0x7fffffffffffffffffffffffn, -0x100000001n, false], + [-0x7ffffffffffffffffffffffen, -0x100000001n, false], + [-0x10000000000000001n, -0x100000001n, false], + [-0x10000000000000000n, -0x100000001n, false], + [-0xffffffffffffffffn, -0x100000001n, false], + [-0xfffffffffffffffen, -0x100000001n, false], + [-0x8000000000000001n, -0x100000001n, false], + [-0x8000000000000000n, -0x100000001n, false], + [-0x7fffffffffffffffn, -0x100000001n, false], + [-0x7ffffffffffffffen, -0x100000001n, false], + [-0x100000001n, -0x100000001n, true], + [-0x100000000n, -0x100000001n, false], + [-0xffffffffn, -0x100000001n, false], + [-0xfffffffen, -0x100000001n, false], + [0x7ffffffffffffffen, -0x100000001n, false], + [0x7fffffffffffffffn, -0x100000001n, false], + [0x8000000000000000n, -0x100000001n, false], + [0x8000000000000001n, -0x100000001n, false], + [0xfffffffffffffffen, -0x100000001n, false], + [0xffffffffffffffffn, -0x100000001n, false], + [0x10000000000000000n, -0x100000001n, false], + [0x10000000000000001n, -0x100000001n, false], + [0x7ffffffffffffffffffffffen, -0x100000001n, false], + [0x7fffffffffffffffffffffffn, -0x100000001n, false], + [0x800000000000000000000000n, -0x100000001n, false], + [0x800000000000000000000001n, -0x100000001n, false], + [0xfffffffffffffffffffffffen, -0x100000001n, false], + [0xffffffffffffffffffffffffn, -0x100000001n, false], + [0x1000000000000000000000000n, -0x100000001n, false], + [0x1000000000000000000000001n, -0x100000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x100000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x100000001n, false], + [0x80000000000000000000000000000000n, -0x100000001n, false], + [0x80000000000000000000000000000001n, -0x100000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x100000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x100000001n, false], + [0x100000000000000000000000000000000n, -0x100000001n, false], + [0x100000000000000000000000000000001n, -0x100000001n, false], + [-0x100000000000000000000000000000001n, -0x100000000n, false], + [-0x100000000000000000000000000000000n, -0x100000000n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x100000000n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x100000000n, false], + [-0x80000000000000000000000000000001n, -0x100000000n, false], + [-0x80000000000000000000000000000000n, -0x100000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x100000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x100000000n, false], + [-0x1000000000000000000000001n, -0x100000000n, false], + [-0x1000000000000000000000000n, -0x100000000n, false], + [-0xffffffffffffffffffffffffn, -0x100000000n, false], + [-0xfffffffffffffffffffffffen, -0x100000000n, false], + [-0x800000000000000000000001n, -0x100000000n, false], + [-0x800000000000000000000000n, -0x100000000n, false], + [-0x7fffffffffffffffffffffffn, -0x100000000n, false], + [-0x7ffffffffffffffffffffffen, -0x100000000n, false], + [-0x10000000000000001n, -0x100000000n, false], + [-0x10000000000000000n, -0x100000000n, false], + [-0xffffffffffffffffn, -0x100000000n, false], + [-0xfffffffffffffffen, -0x100000000n, false], + [-0x8000000000000001n, -0x100000000n, false], + [-0x8000000000000000n, -0x100000000n, false], + [-0x7fffffffffffffffn, -0x100000000n, false], + [-0x7ffffffffffffffen, -0x100000000n, false], + [-0x100000000n, -0x100000000n, true], + [-0xffffffffn, -0x100000000n, false], + [-0xfffffffen, -0x100000000n, false], + [0x7ffffffffffffffen, -0x100000000n, false], + [0x7fffffffffffffffn, -0x100000000n, false], + [0x8000000000000000n, -0x100000000n, false], + [0x8000000000000001n, -0x100000000n, false], + [0xfffffffffffffffen, -0x100000000n, false], + [0xffffffffffffffffn, -0x100000000n, false], + [0x10000000000000000n, -0x100000000n, false], + [0x10000000000000001n, -0x100000000n, false], + [0x7ffffffffffffffffffffffen, -0x100000000n, false], + [0x7fffffffffffffffffffffffn, -0x100000000n, false], + [0x800000000000000000000000n, -0x100000000n, false], + [0x800000000000000000000001n, -0x100000000n, false], + [0xfffffffffffffffffffffffen, -0x100000000n, false], + [0xffffffffffffffffffffffffn, -0x100000000n, false], + [0x1000000000000000000000000n, -0x100000000n, false], + [0x1000000000000000000000001n, -0x100000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x100000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x100000000n, false], + [0x80000000000000000000000000000000n, -0x100000000n, false], + [0x80000000000000000000000000000001n, -0x100000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x100000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x100000000n, false], + [0x100000000000000000000000000000000n, -0x100000000n, false], + [0x100000000000000000000000000000001n, -0x100000000n, false], + [-0x100000000000000000000000000000001n, -0xffffffffn, false], + [-0x100000000000000000000000000000000n, -0xffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, -0xffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, -0xffffffffn, false], + [-0x80000000000000000000000000000001n, -0xffffffffn, false], + [-0x80000000000000000000000000000000n, -0xffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, -0xffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, -0xffffffffn, false], + [-0x1000000000000000000000001n, -0xffffffffn, false], + [-0x1000000000000000000000000n, -0xffffffffn, false], + [-0xffffffffffffffffffffffffn, -0xffffffffn, false], + [-0xfffffffffffffffffffffffen, -0xffffffffn, false], + [-0x800000000000000000000001n, -0xffffffffn, false], + [-0x800000000000000000000000n, -0xffffffffn, false], + [-0x7fffffffffffffffffffffffn, -0xffffffffn, false], + [-0x7ffffffffffffffffffffffen, -0xffffffffn, false], + [-0x10000000000000001n, -0xffffffffn, false], + [-0x10000000000000000n, -0xffffffffn, false], + [-0xffffffffffffffffn, -0xffffffffn, false], + [-0xfffffffffffffffen, -0xffffffffn, false], + [-0x8000000000000001n, -0xffffffffn, false], + [-0x8000000000000000n, -0xffffffffn, false], + [-0x7fffffffffffffffn, -0xffffffffn, false], + [-0x7ffffffffffffffen, -0xffffffffn, false], + [-0xffffffffn, -0xffffffffn, true], + [-0xfffffffen, -0xffffffffn, false], + [0x7ffffffffffffffen, -0xffffffffn, false], + [0x7fffffffffffffffn, -0xffffffffn, false], + [0x8000000000000000n, -0xffffffffn, false], + [0x8000000000000001n, -0xffffffffn, false], + [0xfffffffffffffffen, -0xffffffffn, false], + [0xffffffffffffffffn, -0xffffffffn, false], + [0x10000000000000000n, -0xffffffffn, false], + [0x10000000000000001n, -0xffffffffn, false], + [0x7ffffffffffffffffffffffen, -0xffffffffn, false], + [0x7fffffffffffffffffffffffn, -0xffffffffn, false], + [0x800000000000000000000000n, -0xffffffffn, false], + [0x800000000000000000000001n, -0xffffffffn, false], + [0xfffffffffffffffffffffffen, -0xffffffffn, false], + [0xffffffffffffffffffffffffn, -0xffffffffn, false], + [0x1000000000000000000000000n, -0xffffffffn, false], + [0x1000000000000000000000001n, -0xffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0xffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0xffffffffn, false], + [0x80000000000000000000000000000000n, -0xffffffffn, false], + [0x80000000000000000000000000000001n, -0xffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0xffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0xffffffffn, false], + [0x100000000000000000000000000000000n, -0xffffffffn, false], + [0x100000000000000000000000000000001n, -0xffffffffn, false], + [-0x100000000000000000000000000000001n, -0xfffffffen, false], + [-0x100000000000000000000000000000000n, -0xfffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, -0xfffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, -0xfffffffen, false], + [-0x80000000000000000000000000000001n, -0xfffffffen, false], + [-0x80000000000000000000000000000000n, -0xfffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, -0xfffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, -0xfffffffen, false], + [-0x1000000000000000000000001n, -0xfffffffen, false], + [-0x1000000000000000000000000n, -0xfffffffen, false], + [-0xffffffffffffffffffffffffn, -0xfffffffen, false], + [-0xfffffffffffffffffffffffen, -0xfffffffen, false], + [-0x800000000000000000000001n, -0xfffffffen, false], + [-0x800000000000000000000000n, -0xfffffffen, false], + [-0x7fffffffffffffffffffffffn, -0xfffffffen, false], + [-0x7ffffffffffffffffffffffen, -0xfffffffen, false], + [-0x10000000000000001n, -0xfffffffen, false], + [-0x10000000000000000n, -0xfffffffen, false], + [-0xffffffffffffffffn, -0xfffffffen, false], + [-0xfffffffffffffffen, -0xfffffffen, false], + [-0x8000000000000001n, -0xfffffffen, false], + [-0x8000000000000000n, -0xfffffffen, false], + [-0x7fffffffffffffffn, -0xfffffffen, false], + [-0x7ffffffffffffffen, -0xfffffffen, false], + [-0xfffffffen, -0xfffffffen, true], + [0x7ffffffffffffffen, -0xfffffffen, false], + [0x7fffffffffffffffn, -0xfffffffen, false], + [0x8000000000000000n, -0xfffffffen, false], + [0x8000000000000001n, -0xfffffffen, false], + [0xfffffffffffffffen, -0xfffffffen, false], + [0xffffffffffffffffn, -0xfffffffen, false], + [0x10000000000000000n, -0xfffffffen, false], + [0x10000000000000001n, -0xfffffffen, false], + [0x7ffffffffffffffffffffffen, -0xfffffffen, false], + [0x7fffffffffffffffffffffffn, -0xfffffffen, false], + [0x800000000000000000000000n, -0xfffffffen, false], + [0x800000000000000000000001n, -0xfffffffen, false], + [0xfffffffffffffffffffffffen, -0xfffffffen, false], + [0xffffffffffffffffffffffffn, -0xfffffffen, false], + [0x1000000000000000000000000n, -0xfffffffen, false], + [0x1000000000000000000000001n, -0xfffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0xfffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0xfffffffen, false], + [0x80000000000000000000000000000000n, -0xfffffffen, false], + [0x80000000000000000000000000000001n, -0xfffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0xfffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0xfffffffen, false], + [0x100000000000000000000000000000000n, -0xfffffffen, false], + [0x100000000000000000000000000000001n, -0xfffffffen, false], + [-0x100000000000000000000000000000001n, 0x7ffffffffffffffen, false], + [-0x100000000000000000000000000000000n, 0x7ffffffffffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, 0x7ffffffffffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, 0x7ffffffffffffffen, false], + [-0x80000000000000000000000000000001n, 0x7ffffffffffffffen, false], + [-0x80000000000000000000000000000000n, 0x7ffffffffffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x7ffffffffffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x7ffffffffffffffen, false], + [-0x1000000000000000000000001n, 0x7ffffffffffffffen, false], + [-0x1000000000000000000000000n, 0x7ffffffffffffffen, false], + [-0xffffffffffffffffffffffffn, 0x7ffffffffffffffen, false], + [-0xfffffffffffffffffffffffen, 0x7ffffffffffffffen, false], + [-0x800000000000000000000001n, 0x7ffffffffffffffen, false], + [-0x800000000000000000000000n, 0x7ffffffffffffffen, false], + [-0x7fffffffffffffffffffffffn, 0x7ffffffffffffffen, false], + [-0x7ffffffffffffffffffffffen, 0x7ffffffffffffffen, false], + [-0x10000000000000001n, 0x7ffffffffffffffen, false], + [-0x10000000000000000n, 0x7ffffffffffffffen, false], + [-0xffffffffffffffffn, 0x7ffffffffffffffen, false], + [-0xfffffffffffffffen, 0x7ffffffffffffffen, false], + [-0x8000000000000001n, 0x7ffffffffffffffen, false], + [-0x8000000000000000n, 0x7ffffffffffffffen, false], + [-0x7fffffffffffffffn, 0x7ffffffffffffffen, false], + [-0x7ffffffffffffffen, 0x7ffffffffffffffen, false], + [0x7ffffffffffffffen, 0x7ffffffffffffffen, true], + [0x7fffffffffffffffn, 0x7ffffffffffffffen, false], + [0x8000000000000000n, 0x7ffffffffffffffen, false], + [0x8000000000000001n, 0x7ffffffffffffffen, false], + [0xfffffffffffffffen, 0x7ffffffffffffffen, false], + [0xffffffffffffffffn, 0x7ffffffffffffffen, false], + [0x10000000000000000n, 0x7ffffffffffffffen, false], + [0x10000000000000001n, 0x7ffffffffffffffen, false], + [0x7ffffffffffffffffffffffen, 0x7ffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, 0x7ffffffffffffffen, false], + [0x800000000000000000000000n, 0x7ffffffffffffffen, false], + [0x800000000000000000000001n, 0x7ffffffffffffffen, false], + [0xfffffffffffffffffffffffen, 0x7ffffffffffffffen, false], + [0xffffffffffffffffffffffffn, 0x7ffffffffffffffen, false], + [0x1000000000000000000000000n, 0x7ffffffffffffffen, false], + [0x1000000000000000000000001n, 0x7ffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7ffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7ffffffffffffffen, false], + [0x80000000000000000000000000000000n, 0x7ffffffffffffffen, false], + [0x80000000000000000000000000000001n, 0x7ffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0x7ffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0x7ffffffffffffffen, false], + [0x100000000000000000000000000000000n, 0x7ffffffffffffffen, false], + [0x100000000000000000000000000000001n, 0x7ffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0x7fffffffffffffffn, false], + [-0x100000000000000000000000000000000n, 0x7fffffffffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, 0x7fffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, 0x7fffffffffffffffn, false], + [-0x80000000000000000000000000000001n, 0x7fffffffffffffffn, false], + [-0x80000000000000000000000000000000n, 0x7fffffffffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x7fffffffffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x7fffffffffffffffn, false], + [-0x1000000000000000000000001n, 0x7fffffffffffffffn, false], + [-0x1000000000000000000000000n, 0x7fffffffffffffffn, false], + [-0xffffffffffffffffffffffffn, 0x7fffffffffffffffn, false], + [-0xfffffffffffffffffffffffen, 0x7fffffffffffffffn, false], + [-0x800000000000000000000001n, 0x7fffffffffffffffn, false], + [-0x800000000000000000000000n, 0x7fffffffffffffffn, false], + [-0x7fffffffffffffffffffffffn, 0x7fffffffffffffffn, false], + [-0x7ffffffffffffffffffffffen, 0x7fffffffffffffffn, false], + [-0x10000000000000001n, 0x7fffffffffffffffn, false], + [-0x10000000000000000n, 0x7fffffffffffffffn, false], + [-0xffffffffffffffffn, 0x7fffffffffffffffn, false], + [-0xfffffffffffffffen, 0x7fffffffffffffffn, false], + [-0x8000000000000001n, 0x7fffffffffffffffn, false], + [-0x8000000000000000n, 0x7fffffffffffffffn, false], + [-0x7fffffffffffffffn, 0x7fffffffffffffffn, false], + [-0x7ffffffffffffffen, 0x7fffffffffffffffn, false], + [0x7fffffffffffffffn, 0x7fffffffffffffffn, true], + [0x8000000000000000n, 0x7fffffffffffffffn, false], + [0x8000000000000001n, 0x7fffffffffffffffn, false], + [0xfffffffffffffffen, 0x7fffffffffffffffn, false], + [0xffffffffffffffffn, 0x7fffffffffffffffn, false], + [0x10000000000000000n, 0x7fffffffffffffffn, false], + [0x10000000000000001n, 0x7fffffffffffffffn, false], + [0x7ffffffffffffffffffffffen, 0x7fffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, 0x7fffffffffffffffn, false], + [0x800000000000000000000000n, 0x7fffffffffffffffn, false], + [0x800000000000000000000001n, 0x7fffffffffffffffn, false], + [0xfffffffffffffffffffffffen, 0x7fffffffffffffffn, false], + [0xffffffffffffffffffffffffn, 0x7fffffffffffffffn, false], + [0x1000000000000000000000000n, 0x7fffffffffffffffn, false], + [0x1000000000000000000000001n, 0x7fffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7fffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7fffffffffffffffn, false], + [0x80000000000000000000000000000000n, 0x7fffffffffffffffn, false], + [0x80000000000000000000000000000001n, 0x7fffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0x7fffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0x7fffffffffffffffn, false], + [0x100000000000000000000000000000000n, 0x7fffffffffffffffn, false], + [0x100000000000000000000000000000001n, 0x7fffffffffffffffn, false], + [-0x100000000000000000000000000000001n, 0x8000000000000000n, false], + [-0x100000000000000000000000000000000n, 0x8000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x8000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x8000000000000000n, false], + [-0x80000000000000000000000000000001n, 0x8000000000000000n, false], + [-0x80000000000000000000000000000000n, 0x8000000000000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x8000000000000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x8000000000000000n, false], + [-0x1000000000000000000000001n, 0x8000000000000000n, false], + [-0x1000000000000000000000000n, 0x8000000000000000n, false], + [-0xffffffffffffffffffffffffn, 0x8000000000000000n, false], + [-0xfffffffffffffffffffffffen, 0x8000000000000000n, false], + [-0x800000000000000000000001n, 0x8000000000000000n, false], + [-0x800000000000000000000000n, 0x8000000000000000n, false], + [-0x7fffffffffffffffffffffffn, 0x8000000000000000n, false], + [-0x7ffffffffffffffffffffffen, 0x8000000000000000n, false], + [-0x10000000000000001n, 0x8000000000000000n, false], + [-0x10000000000000000n, 0x8000000000000000n, false], + [-0xffffffffffffffffn, 0x8000000000000000n, false], + [-0xfffffffffffffffen, 0x8000000000000000n, false], + [-0x8000000000000001n, 0x8000000000000000n, false], + [-0x8000000000000000n, 0x8000000000000000n, false], + [-0x7fffffffffffffffn, 0x8000000000000000n, false], + [-0x7ffffffffffffffen, 0x8000000000000000n, false], + [0x8000000000000000n, 0x8000000000000000n, true], + [0x8000000000000001n, 0x8000000000000000n, false], + [0xfffffffffffffffen, 0x8000000000000000n, false], + [0xffffffffffffffffn, 0x8000000000000000n, false], + [0x10000000000000000n, 0x8000000000000000n, false], + [0x10000000000000001n, 0x8000000000000000n, false], + [0x7ffffffffffffffffffffffen, 0x8000000000000000n, false], + [0x7fffffffffffffffffffffffn, 0x8000000000000000n, false], + [0x800000000000000000000000n, 0x8000000000000000n, false], + [0x800000000000000000000001n, 0x8000000000000000n, false], + [0xfffffffffffffffffffffffen, 0x8000000000000000n, false], + [0xffffffffffffffffffffffffn, 0x8000000000000000n, false], + [0x1000000000000000000000000n, 0x8000000000000000n, false], + [0x1000000000000000000000001n, 0x8000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x8000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x8000000000000000n, false], + [0x80000000000000000000000000000000n, 0x8000000000000000n, false], + [0x80000000000000000000000000000001n, 0x8000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x8000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x8000000000000000n, false], + [0x100000000000000000000000000000000n, 0x8000000000000000n, false], + [0x100000000000000000000000000000001n, 0x8000000000000000n, false], + [-0x100000000000000000000000000000001n, 0x8000000000000001n, false], + [-0x100000000000000000000000000000000n, 0x8000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x8000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x8000000000000001n, false], + [-0x80000000000000000000000000000001n, 0x8000000000000001n, false], + [-0x80000000000000000000000000000000n, 0x8000000000000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x8000000000000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x8000000000000001n, false], + [-0x1000000000000000000000001n, 0x8000000000000001n, false], + [-0x1000000000000000000000000n, 0x8000000000000001n, false], + [-0xffffffffffffffffffffffffn, 0x8000000000000001n, false], + [-0xfffffffffffffffffffffffen, 0x8000000000000001n, false], + [-0x800000000000000000000001n, 0x8000000000000001n, false], + [-0x800000000000000000000000n, 0x8000000000000001n, false], + [-0x7fffffffffffffffffffffffn, 0x8000000000000001n, false], + [-0x7ffffffffffffffffffffffen, 0x8000000000000001n, false], + [-0x10000000000000001n, 0x8000000000000001n, false], + [-0x10000000000000000n, 0x8000000000000001n, false], + [-0xffffffffffffffffn, 0x8000000000000001n, false], + [-0xfffffffffffffffen, 0x8000000000000001n, false], + [-0x8000000000000001n, 0x8000000000000001n, false], + [-0x8000000000000000n, 0x8000000000000001n, false], + [-0x7fffffffffffffffn, 0x8000000000000001n, false], + [-0x7ffffffffffffffen, 0x8000000000000001n, false], + [0x8000000000000001n, 0x8000000000000001n, true], + [0xfffffffffffffffen, 0x8000000000000001n, false], + [0xffffffffffffffffn, 0x8000000000000001n, false], + [0x10000000000000000n, 0x8000000000000001n, false], + [0x10000000000000001n, 0x8000000000000001n, false], + [0x7ffffffffffffffffffffffen, 0x8000000000000001n, false], + [0x7fffffffffffffffffffffffn, 0x8000000000000001n, false], + [0x800000000000000000000000n, 0x8000000000000001n, false], + [0x800000000000000000000001n, 0x8000000000000001n, false], + [0xfffffffffffffffffffffffen, 0x8000000000000001n, false], + [0xffffffffffffffffffffffffn, 0x8000000000000001n, false], + [0x1000000000000000000000000n, 0x8000000000000001n, false], + [0x1000000000000000000000001n, 0x8000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x8000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x8000000000000001n, false], + [0x80000000000000000000000000000000n, 0x8000000000000001n, false], + [0x80000000000000000000000000000001n, 0x8000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x8000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x8000000000000001n, false], + [0x100000000000000000000000000000000n, 0x8000000000000001n, false], + [0x100000000000000000000000000000001n, 0x8000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x8000000000000001n, false], + [-0x100000000000000000000000000000000n, -0x8000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x8000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x8000000000000001n, false], + [-0x80000000000000000000000000000001n, -0x8000000000000001n, false], + [-0x80000000000000000000000000000000n, -0x8000000000000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x8000000000000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x8000000000000001n, false], + [-0x1000000000000000000000001n, -0x8000000000000001n, false], + [-0x1000000000000000000000000n, -0x8000000000000001n, false], + [-0xffffffffffffffffffffffffn, -0x8000000000000001n, false], + [-0xfffffffffffffffffffffffen, -0x8000000000000001n, false], + [-0x800000000000000000000001n, -0x8000000000000001n, false], + [-0x800000000000000000000000n, -0x8000000000000001n, false], + [-0x7fffffffffffffffffffffffn, -0x8000000000000001n, false], + [-0x7ffffffffffffffffffffffen, -0x8000000000000001n, false], + [-0x10000000000000001n, -0x8000000000000001n, false], + [-0x10000000000000000n, -0x8000000000000001n, false], + [-0xffffffffffffffffn, -0x8000000000000001n, false], + [-0xfffffffffffffffen, -0x8000000000000001n, false], + [-0x8000000000000001n, -0x8000000000000001n, true], + [-0x8000000000000000n, -0x8000000000000001n, false], + [-0x7fffffffffffffffn, -0x8000000000000001n, false], + [-0x7ffffffffffffffen, -0x8000000000000001n, false], + [0xfffffffffffffffen, -0x8000000000000001n, false], + [0xffffffffffffffffn, -0x8000000000000001n, false], + [0x10000000000000000n, -0x8000000000000001n, false], + [0x10000000000000001n, -0x8000000000000001n, false], + [0x7ffffffffffffffffffffffen, -0x8000000000000001n, false], + [0x7fffffffffffffffffffffffn, -0x8000000000000001n, false], + [0x800000000000000000000000n, -0x8000000000000001n, false], + [0x800000000000000000000001n, -0x8000000000000001n, false], + [0xfffffffffffffffffffffffen, -0x8000000000000001n, false], + [0xffffffffffffffffffffffffn, -0x8000000000000001n, false], + [0x1000000000000000000000000n, -0x8000000000000001n, false], + [0x1000000000000000000000001n, -0x8000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x8000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x8000000000000001n, false], + [0x80000000000000000000000000000000n, -0x8000000000000001n, false], + [0x80000000000000000000000000000001n, -0x8000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x8000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x8000000000000001n, false], + [0x100000000000000000000000000000000n, -0x8000000000000001n, false], + [0x100000000000000000000000000000001n, -0x8000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x8000000000000000n, false], + [-0x100000000000000000000000000000000n, -0x8000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x8000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x8000000000000000n, false], + [-0x80000000000000000000000000000001n, -0x8000000000000000n, false], + [-0x80000000000000000000000000000000n, -0x8000000000000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x8000000000000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x8000000000000000n, false], + [-0x1000000000000000000000001n, -0x8000000000000000n, false], + [-0x1000000000000000000000000n, -0x8000000000000000n, false], + [-0xffffffffffffffffffffffffn, -0x8000000000000000n, false], + [-0xfffffffffffffffffffffffen, -0x8000000000000000n, false], + [-0x800000000000000000000001n, -0x8000000000000000n, false], + [-0x800000000000000000000000n, -0x8000000000000000n, false], + [-0x7fffffffffffffffffffffffn, -0x8000000000000000n, false], + [-0x7ffffffffffffffffffffffen, -0x8000000000000000n, false], + [-0x10000000000000001n, -0x8000000000000000n, false], + [-0x10000000000000000n, -0x8000000000000000n, false], + [-0xffffffffffffffffn, -0x8000000000000000n, false], + [-0xfffffffffffffffen, -0x8000000000000000n, false], + [-0x8000000000000000n, -0x8000000000000000n, true], + [-0x7fffffffffffffffn, -0x8000000000000000n, false], + [-0x7ffffffffffffffen, -0x8000000000000000n, false], + [0xfffffffffffffffen, -0x8000000000000000n, false], + [0xffffffffffffffffn, -0x8000000000000000n, false], + [0x10000000000000000n, -0x8000000000000000n, false], + [0x10000000000000001n, -0x8000000000000000n, false], + [0x7ffffffffffffffffffffffen, -0x8000000000000000n, false], + [0x7fffffffffffffffffffffffn, -0x8000000000000000n, false], + [0x800000000000000000000000n, -0x8000000000000000n, false], + [0x800000000000000000000001n, -0x8000000000000000n, false], + [0xfffffffffffffffffffffffen, -0x8000000000000000n, false], + [0xffffffffffffffffffffffffn, -0x8000000000000000n, false], + [0x1000000000000000000000000n, -0x8000000000000000n, false], + [0x1000000000000000000000001n, -0x8000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x8000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x8000000000000000n, false], + [0x80000000000000000000000000000000n, -0x8000000000000000n, false], + [0x80000000000000000000000000000001n, -0x8000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x8000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x8000000000000000n, false], + [0x100000000000000000000000000000000n, -0x8000000000000000n, false], + [0x100000000000000000000000000000001n, -0x8000000000000000n, false], + [-0x100000000000000000000000000000001n, -0x7fffffffffffffffn, false], + [-0x100000000000000000000000000000000n, -0x7fffffffffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, -0x7fffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, -0x7fffffffffffffffn, false], + [-0x80000000000000000000000000000001n, -0x7fffffffffffffffn, false], + [-0x80000000000000000000000000000000n, -0x7fffffffffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x7fffffffffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x7fffffffffffffffn, false], + [-0x1000000000000000000000001n, -0x7fffffffffffffffn, false], + [-0x1000000000000000000000000n, -0x7fffffffffffffffn, false], + [-0xffffffffffffffffffffffffn, -0x7fffffffffffffffn, false], + [-0xfffffffffffffffffffffffen, -0x7fffffffffffffffn, false], + [-0x800000000000000000000001n, -0x7fffffffffffffffn, false], + [-0x800000000000000000000000n, -0x7fffffffffffffffn, false], + [-0x7fffffffffffffffffffffffn, -0x7fffffffffffffffn, false], + [-0x7ffffffffffffffffffffffen, -0x7fffffffffffffffn, false], + [-0x10000000000000001n, -0x7fffffffffffffffn, false], + [-0x10000000000000000n, -0x7fffffffffffffffn, false], + [-0xffffffffffffffffn, -0x7fffffffffffffffn, false], + [-0xfffffffffffffffen, -0x7fffffffffffffffn, false], + [-0x7fffffffffffffffn, -0x7fffffffffffffffn, true], + [-0x7ffffffffffffffen, -0x7fffffffffffffffn, false], + [0xfffffffffffffffen, -0x7fffffffffffffffn, false], + [0xffffffffffffffffn, -0x7fffffffffffffffn, false], + [0x10000000000000000n, -0x7fffffffffffffffn, false], + [0x10000000000000001n, -0x7fffffffffffffffn, false], + [0x7ffffffffffffffffffffffen, -0x7fffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, -0x7fffffffffffffffn, false], + [0x800000000000000000000000n, -0x7fffffffffffffffn, false], + [0x800000000000000000000001n, -0x7fffffffffffffffn, false], + [0xfffffffffffffffffffffffen, -0x7fffffffffffffffn, false], + [0xffffffffffffffffffffffffn, -0x7fffffffffffffffn, false], + [0x1000000000000000000000000n, -0x7fffffffffffffffn, false], + [0x1000000000000000000000001n, -0x7fffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7fffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7fffffffffffffffn, false], + [0x80000000000000000000000000000000n, -0x7fffffffffffffffn, false], + [0x80000000000000000000000000000001n, -0x7fffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0x7fffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0x7fffffffffffffffn, false], + [0x100000000000000000000000000000000n, -0x7fffffffffffffffn, false], + [0x100000000000000000000000000000001n, -0x7fffffffffffffffn, false], + [-0x100000000000000000000000000000001n, -0x7ffffffffffffffen, false], + [-0x100000000000000000000000000000000n, -0x7ffffffffffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, -0x7ffffffffffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, -0x7ffffffffffffffen, false], + [-0x80000000000000000000000000000001n, -0x7ffffffffffffffen, false], + [-0x80000000000000000000000000000000n, -0x7ffffffffffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x7ffffffffffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x7ffffffffffffffen, false], + [-0x1000000000000000000000001n, -0x7ffffffffffffffen, false], + [-0x1000000000000000000000000n, -0x7ffffffffffffffen, false], + [-0xffffffffffffffffffffffffn, -0x7ffffffffffffffen, false], + [-0xfffffffffffffffffffffffen, -0x7ffffffffffffffen, false], + [-0x800000000000000000000001n, -0x7ffffffffffffffen, false], + [-0x800000000000000000000000n, -0x7ffffffffffffffen, false], + [-0x7fffffffffffffffffffffffn, -0x7ffffffffffffffen, false], + [-0x7ffffffffffffffffffffffen, -0x7ffffffffffffffen, false], + [-0x10000000000000001n, -0x7ffffffffffffffen, false], + [-0x10000000000000000n, -0x7ffffffffffffffen, false], + [-0xffffffffffffffffn, -0x7ffffffffffffffen, false], + [-0xfffffffffffffffen, -0x7ffffffffffffffen, false], + [-0x7ffffffffffffffen, -0x7ffffffffffffffen, true], + [0xfffffffffffffffen, -0x7ffffffffffffffen, false], + [0xffffffffffffffffn, -0x7ffffffffffffffen, false], + [0x10000000000000000n, -0x7ffffffffffffffen, false], + [0x10000000000000001n, -0x7ffffffffffffffen, false], + [0x7ffffffffffffffffffffffen, -0x7ffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, -0x7ffffffffffffffen, false], + [0x800000000000000000000000n, -0x7ffffffffffffffen, false], + [0x800000000000000000000001n, -0x7ffffffffffffffen, false], + [0xfffffffffffffffffffffffen, -0x7ffffffffffffffen, false], + [0xffffffffffffffffffffffffn, -0x7ffffffffffffffen, false], + [0x1000000000000000000000000n, -0x7ffffffffffffffen, false], + [0x1000000000000000000000001n, -0x7ffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7ffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7ffffffffffffffen, false], + [0x80000000000000000000000000000000n, -0x7ffffffffffffffen, false], + [0x80000000000000000000000000000001n, -0x7ffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0x7ffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0x7ffffffffffffffen, false], + [0x100000000000000000000000000000000n, -0x7ffffffffffffffen, false], + [0x100000000000000000000000000000001n, -0x7ffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0xfffffffffffffffen, false], + [-0x100000000000000000000000000000000n, 0xfffffffffffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, 0xfffffffffffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, 0xfffffffffffffffen, false], + [-0x80000000000000000000000000000001n, 0xfffffffffffffffen, false], + [-0x80000000000000000000000000000000n, 0xfffffffffffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, 0xfffffffffffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, 0xfffffffffffffffen, false], + [-0x1000000000000000000000001n, 0xfffffffffffffffen, false], + [-0x1000000000000000000000000n, 0xfffffffffffffffen, false], + [-0xffffffffffffffffffffffffn, 0xfffffffffffffffen, false], + [-0xfffffffffffffffffffffffen, 0xfffffffffffffffen, false], + [-0x800000000000000000000001n, 0xfffffffffffffffen, false], + [-0x800000000000000000000000n, 0xfffffffffffffffen, false], + [-0x7fffffffffffffffffffffffn, 0xfffffffffffffffen, false], + [-0x7ffffffffffffffffffffffen, 0xfffffffffffffffen, false], + [-0x10000000000000001n, 0xfffffffffffffffen, false], + [-0x10000000000000000n, 0xfffffffffffffffen, false], + [-0xffffffffffffffffn, 0xfffffffffffffffen, false], + [-0xfffffffffffffffen, 0xfffffffffffffffen, false], + [0xfffffffffffffffen, 0xfffffffffffffffen, true], + [0xffffffffffffffffn, 0xfffffffffffffffen, false], + [0x10000000000000000n, 0xfffffffffffffffen, false], + [0x10000000000000001n, 0xfffffffffffffffen, false], + [0x7ffffffffffffffffffffffen, 0xfffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, 0xfffffffffffffffen, false], + [0x800000000000000000000000n, 0xfffffffffffffffen, false], + [0x800000000000000000000001n, 0xfffffffffffffffen, false], + [0xfffffffffffffffffffffffen, 0xfffffffffffffffen, false], + [0xffffffffffffffffffffffffn, 0xfffffffffffffffen, false], + [0x1000000000000000000000000n, 0xfffffffffffffffen, false], + [0x1000000000000000000000001n, 0xfffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0xfffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0xfffffffffffffffen, false], + [0x80000000000000000000000000000000n, 0xfffffffffffffffen, false], + [0x80000000000000000000000000000001n, 0xfffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0xfffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0xfffffffffffffffen, false], + [0x100000000000000000000000000000000n, 0xfffffffffffffffen, false], + [0x100000000000000000000000000000001n, 0xfffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0xffffffffffffffffn, false], + [-0x100000000000000000000000000000000n, 0xffffffffffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, 0xffffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, 0xffffffffffffffffn, false], + [-0x80000000000000000000000000000001n, 0xffffffffffffffffn, false], + [-0x80000000000000000000000000000000n, 0xffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, 0xffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, 0xffffffffffffffffn, false], + [-0x1000000000000000000000001n, 0xffffffffffffffffn, false], + [-0x1000000000000000000000000n, 0xffffffffffffffffn, false], + [-0xffffffffffffffffffffffffn, 0xffffffffffffffffn, false], + [-0xfffffffffffffffffffffffen, 0xffffffffffffffffn, false], + [-0x800000000000000000000001n, 0xffffffffffffffffn, false], + [-0x800000000000000000000000n, 0xffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffn, 0xffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffen, 0xffffffffffffffffn, false], + [-0x10000000000000001n, 0xffffffffffffffffn, false], + [-0x10000000000000000n, 0xffffffffffffffffn, false], + [-0xffffffffffffffffn, 0xffffffffffffffffn, false], + [-0xfffffffffffffffen, 0xffffffffffffffffn, false], + [0xffffffffffffffffn, 0xffffffffffffffffn, true], + [0x10000000000000000n, 0xffffffffffffffffn, false], + [0x10000000000000001n, 0xffffffffffffffffn, false], + [0x7ffffffffffffffffffffffen, 0xffffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, 0xffffffffffffffffn, false], + [0x800000000000000000000000n, 0xffffffffffffffffn, false], + [0x800000000000000000000001n, 0xffffffffffffffffn, false], + [0xfffffffffffffffffffffffen, 0xffffffffffffffffn, false], + [0xffffffffffffffffffffffffn, 0xffffffffffffffffn, false], + [0x1000000000000000000000000n, 0xffffffffffffffffn, false], + [0x1000000000000000000000001n, 0xffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, 0xffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0xffffffffffffffffn, false], + [0x80000000000000000000000000000000n, 0xffffffffffffffffn, false], + [0x80000000000000000000000000000001n, 0xffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0xffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0xffffffffffffffffn, false], + [0x100000000000000000000000000000000n, 0xffffffffffffffffn, false], + [0x100000000000000000000000000000001n, 0xffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, 0x10000000000000000n, false], + [-0x100000000000000000000000000000000n, 0x10000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x10000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x10000000000000000n, false], + [-0x80000000000000000000000000000001n, 0x10000000000000000n, false], + [-0x80000000000000000000000000000000n, 0x10000000000000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x10000000000000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x10000000000000000n, false], + [-0x1000000000000000000000001n, 0x10000000000000000n, false], + [-0x1000000000000000000000000n, 0x10000000000000000n, false], + [-0xffffffffffffffffffffffffn, 0x10000000000000000n, false], + [-0xfffffffffffffffffffffffen, 0x10000000000000000n, false], + [-0x800000000000000000000001n, 0x10000000000000000n, false], + [-0x800000000000000000000000n, 0x10000000000000000n, false], + [-0x7fffffffffffffffffffffffn, 0x10000000000000000n, false], + [-0x7ffffffffffffffffffffffen, 0x10000000000000000n, false], + [-0x10000000000000001n, 0x10000000000000000n, false], + [-0x10000000000000000n, 0x10000000000000000n, false], + [-0xffffffffffffffffn, 0x10000000000000000n, false], + [-0xfffffffffffffffen, 0x10000000000000000n, false], + [0x10000000000000000n, 0x10000000000000000n, true], + [0x10000000000000001n, 0x10000000000000000n, false], + [0x7ffffffffffffffffffffffen, 0x10000000000000000n, false], + [0x7fffffffffffffffffffffffn, 0x10000000000000000n, false], + [0x800000000000000000000000n, 0x10000000000000000n, false], + [0x800000000000000000000001n, 0x10000000000000000n, false], + [0xfffffffffffffffffffffffen, 0x10000000000000000n, false], + [0xffffffffffffffffffffffffn, 0x10000000000000000n, false], + [0x1000000000000000000000000n, 0x10000000000000000n, false], + [0x1000000000000000000000001n, 0x10000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x10000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x10000000000000000n, false], + [0x80000000000000000000000000000000n, 0x10000000000000000n, false], + [0x80000000000000000000000000000001n, 0x10000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x10000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x10000000000000000n, false], + [0x100000000000000000000000000000000n, 0x10000000000000000n, false], + [0x100000000000000000000000000000001n, 0x10000000000000000n, false], + [-0x100000000000000000000000000000001n, 0x10000000000000001n, false], + [-0x100000000000000000000000000000000n, 0x10000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x10000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x10000000000000001n, false], + [-0x80000000000000000000000000000001n, 0x10000000000000001n, false], + [-0x80000000000000000000000000000000n, 0x10000000000000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x10000000000000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x10000000000000001n, false], + [-0x1000000000000000000000001n, 0x10000000000000001n, false], + [-0x1000000000000000000000000n, 0x10000000000000001n, false], + [-0xffffffffffffffffffffffffn, 0x10000000000000001n, false], + [-0xfffffffffffffffffffffffen, 0x10000000000000001n, false], + [-0x800000000000000000000001n, 0x10000000000000001n, false], + [-0x800000000000000000000000n, 0x10000000000000001n, false], + [-0x7fffffffffffffffffffffffn, 0x10000000000000001n, false], + [-0x7ffffffffffffffffffffffen, 0x10000000000000001n, false], + [-0x10000000000000001n, 0x10000000000000001n, false], + [-0x10000000000000000n, 0x10000000000000001n, false], + [-0xffffffffffffffffn, 0x10000000000000001n, false], + [-0xfffffffffffffffen, 0x10000000000000001n, false], + [0x10000000000000001n, 0x10000000000000001n, true], + [0x7ffffffffffffffffffffffen, 0x10000000000000001n, false], + [0x7fffffffffffffffffffffffn, 0x10000000000000001n, false], + [0x800000000000000000000000n, 0x10000000000000001n, false], + [0x800000000000000000000001n, 0x10000000000000001n, false], + [0xfffffffffffffffffffffffen, 0x10000000000000001n, false], + [0xffffffffffffffffffffffffn, 0x10000000000000001n, false], + [0x1000000000000000000000000n, 0x10000000000000001n, false], + [0x1000000000000000000000001n, 0x10000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x10000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x10000000000000001n, false], + [0x80000000000000000000000000000000n, 0x10000000000000001n, false], + [0x80000000000000000000000000000001n, 0x10000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x10000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x10000000000000001n, false], + [0x100000000000000000000000000000000n, 0x10000000000000001n, false], + [0x100000000000000000000000000000001n, 0x10000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x10000000000000001n, false], + [-0x100000000000000000000000000000000n, -0x10000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x10000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x10000000000000001n, false], + [-0x80000000000000000000000000000001n, -0x10000000000000001n, false], + [-0x80000000000000000000000000000000n, -0x10000000000000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x10000000000000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x10000000000000001n, false], + [-0x1000000000000000000000001n, -0x10000000000000001n, false], + [-0x1000000000000000000000000n, -0x10000000000000001n, false], + [-0xffffffffffffffffffffffffn, -0x10000000000000001n, false], + [-0xfffffffffffffffffffffffen, -0x10000000000000001n, false], + [-0x800000000000000000000001n, -0x10000000000000001n, false], + [-0x800000000000000000000000n, -0x10000000000000001n, false], + [-0x7fffffffffffffffffffffffn, -0x10000000000000001n, false], + [-0x7ffffffffffffffffffffffen, -0x10000000000000001n, false], + [-0x10000000000000001n, -0x10000000000000001n, true], + [-0x10000000000000000n, -0x10000000000000001n, false], + [-0xffffffffffffffffn, -0x10000000000000001n, false], + [-0xfffffffffffffffen, -0x10000000000000001n, false], + [0x7ffffffffffffffffffffffen, -0x10000000000000001n, false], + [0x7fffffffffffffffffffffffn, -0x10000000000000001n, false], + [0x800000000000000000000000n, -0x10000000000000001n, false], + [0x800000000000000000000001n, -0x10000000000000001n, false], + [0xfffffffffffffffffffffffen, -0x10000000000000001n, false], + [0xffffffffffffffffffffffffn, -0x10000000000000001n, false], + [0x1000000000000000000000000n, -0x10000000000000001n, false], + [0x1000000000000000000000001n, -0x10000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x10000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x10000000000000001n, false], + [0x80000000000000000000000000000000n, -0x10000000000000001n, false], + [0x80000000000000000000000000000001n, -0x10000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x10000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x10000000000000001n, false], + [0x100000000000000000000000000000000n, -0x10000000000000001n, false], + [0x100000000000000000000000000000001n, -0x10000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x10000000000000000n, false], + [-0x100000000000000000000000000000000n, -0x10000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x10000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x10000000000000000n, false], + [-0x80000000000000000000000000000001n, -0x10000000000000000n, false], + [-0x80000000000000000000000000000000n, -0x10000000000000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x10000000000000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x10000000000000000n, false], + [-0x1000000000000000000000001n, -0x10000000000000000n, false], + [-0x1000000000000000000000000n, -0x10000000000000000n, false], + [-0xffffffffffffffffffffffffn, -0x10000000000000000n, false], + [-0xfffffffffffffffffffffffen, -0x10000000000000000n, false], + [-0x800000000000000000000001n, -0x10000000000000000n, false], + [-0x800000000000000000000000n, -0x10000000000000000n, false], + [-0x7fffffffffffffffffffffffn, -0x10000000000000000n, false], + [-0x7ffffffffffffffffffffffen, -0x10000000000000000n, false], + [-0x10000000000000000n, -0x10000000000000000n, true], + [-0xffffffffffffffffn, -0x10000000000000000n, false], + [-0xfffffffffffffffen, -0x10000000000000000n, false], + [0x7ffffffffffffffffffffffen, -0x10000000000000000n, false], + [0x7fffffffffffffffffffffffn, -0x10000000000000000n, false], + [0x800000000000000000000000n, -0x10000000000000000n, false], + [0x800000000000000000000001n, -0x10000000000000000n, false], + [0xfffffffffffffffffffffffen, -0x10000000000000000n, false], + [0xffffffffffffffffffffffffn, -0x10000000000000000n, false], + [0x1000000000000000000000000n, -0x10000000000000000n, false], + [0x1000000000000000000000001n, -0x10000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x10000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x10000000000000000n, false], + [0x80000000000000000000000000000000n, -0x10000000000000000n, false], + [0x80000000000000000000000000000001n, -0x10000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x10000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x10000000000000000n, false], + [0x100000000000000000000000000000000n, -0x10000000000000000n, false], + [0x100000000000000000000000000000001n, -0x10000000000000000n, false], + [-0x100000000000000000000000000000001n, -0xffffffffffffffffn, false], + [-0x100000000000000000000000000000000n, -0xffffffffffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, -0xffffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, -0xffffffffffffffffn, false], + [-0x80000000000000000000000000000001n, -0xffffffffffffffffn, false], + [-0x80000000000000000000000000000000n, -0xffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, -0xffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, -0xffffffffffffffffn, false], + [-0x1000000000000000000000001n, -0xffffffffffffffffn, false], + [-0x1000000000000000000000000n, -0xffffffffffffffffn, false], + [-0xffffffffffffffffffffffffn, -0xffffffffffffffffn, false], + [-0xfffffffffffffffffffffffen, -0xffffffffffffffffn, false], + [-0x800000000000000000000001n, -0xffffffffffffffffn, false], + [-0x800000000000000000000000n, -0xffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffn, -0xffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffen, -0xffffffffffffffffn, false], + [-0xffffffffffffffffn, -0xffffffffffffffffn, true], + [-0xfffffffffffffffen, -0xffffffffffffffffn, false], + [0x7ffffffffffffffffffffffen, -0xffffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, -0xffffffffffffffffn, false], + [0x800000000000000000000000n, -0xffffffffffffffffn, false], + [0x800000000000000000000001n, -0xffffffffffffffffn, false], + [0xfffffffffffffffffffffffen, -0xffffffffffffffffn, false], + [0xffffffffffffffffffffffffn, -0xffffffffffffffffn, false], + [0x1000000000000000000000000n, -0xffffffffffffffffn, false], + [0x1000000000000000000000001n, -0xffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0xffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0xffffffffffffffffn, false], + [0x80000000000000000000000000000000n, -0xffffffffffffffffn, false], + [0x80000000000000000000000000000001n, -0xffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0xffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0xffffffffffffffffn, false], + [0x100000000000000000000000000000000n, -0xffffffffffffffffn, false], + [0x100000000000000000000000000000001n, -0xffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, -0xfffffffffffffffen, false], + [-0x100000000000000000000000000000000n, -0xfffffffffffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, -0xfffffffffffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, -0xfffffffffffffffen, false], + [-0x80000000000000000000000000000001n, -0xfffffffffffffffen, false], + [-0x80000000000000000000000000000000n, -0xfffffffffffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, -0xfffffffffffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, -0xfffffffffffffffen, false], + [-0x1000000000000000000000001n, -0xfffffffffffffffen, false], + [-0x1000000000000000000000000n, -0xfffffffffffffffen, false], + [-0xffffffffffffffffffffffffn, -0xfffffffffffffffen, false], + [-0xfffffffffffffffffffffffen, -0xfffffffffffffffen, false], + [-0x800000000000000000000001n, -0xfffffffffffffffen, false], + [-0x800000000000000000000000n, -0xfffffffffffffffen, false], + [-0x7fffffffffffffffffffffffn, -0xfffffffffffffffen, false], + [-0x7ffffffffffffffffffffffen, -0xfffffffffffffffen, false], + [-0xfffffffffffffffen, -0xfffffffffffffffen, true], + [0x7ffffffffffffffffffffffen, -0xfffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, -0xfffffffffffffffen, false], + [0x800000000000000000000000n, -0xfffffffffffffffen, false], + [0x800000000000000000000001n, -0xfffffffffffffffen, false], + [0xfffffffffffffffffffffffen, -0xfffffffffffffffen, false], + [0xffffffffffffffffffffffffn, -0xfffffffffffffffen, false], + [0x1000000000000000000000000n, -0xfffffffffffffffen, false], + [0x1000000000000000000000001n, -0xfffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0xfffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0xfffffffffffffffen, false], + [0x80000000000000000000000000000000n, -0xfffffffffffffffen, false], + [0x80000000000000000000000000000001n, -0xfffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0xfffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0xfffffffffffffffen, false], + [0x100000000000000000000000000000000n, -0xfffffffffffffffen, false], + [0x100000000000000000000000000000001n, -0xfffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0x7ffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000000n, 0x7ffffffffffffffffffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, false], + [-0x80000000000000000000000000000001n, 0x7ffffffffffffffffffffffen, false], + [-0x80000000000000000000000000000000n, 0x7ffffffffffffffffffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, false], + [-0x1000000000000000000000001n, 0x7ffffffffffffffffffffffen, false], + [-0x1000000000000000000000000n, 0x7ffffffffffffffffffffffen, false], + [-0xffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, false], + [-0x800000000000000000000001n, 0x7ffffffffffffffffffffffen, false], + [-0x800000000000000000000000n, 0x7ffffffffffffffffffffffen, false], + [-0x7fffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, false], + [-0x7ffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, true], + [0x7fffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, false], + [0x800000000000000000000000n, 0x7ffffffffffffffffffffffen, false], + [0x800000000000000000000001n, 0x7ffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, false], + [0x1000000000000000000000000n, 0x7ffffffffffffffffffffffen, false], + [0x1000000000000000000000001n, 0x7ffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, false], + [0x80000000000000000000000000000000n, 0x7ffffffffffffffffffffffen, false], + [0x80000000000000000000000000000001n, 0x7ffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, 0x7ffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, 0x7ffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0x7fffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000000n, 0x7fffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, false], + [-0x80000000000000000000000000000001n, 0x7fffffffffffffffffffffffn, false], + [-0x80000000000000000000000000000000n, 0x7fffffffffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, false], + [-0x1000000000000000000000001n, 0x7fffffffffffffffffffffffn, false], + [-0x1000000000000000000000000n, 0x7fffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, false], + [-0x800000000000000000000001n, 0x7fffffffffffffffffffffffn, false], + [-0x800000000000000000000000n, 0x7fffffffffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, true], + [0x800000000000000000000000n, 0x7fffffffffffffffffffffffn, false], + [0x800000000000000000000001n, 0x7fffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, false], + [0x1000000000000000000000000n, 0x7fffffffffffffffffffffffn, false], + [0x1000000000000000000000001n, 0x7fffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, false], + [0x80000000000000000000000000000000n, 0x7fffffffffffffffffffffffn, false], + [0x80000000000000000000000000000001n, 0x7fffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, 0x7fffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, 0x7fffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, 0x800000000000000000000000n, false], + [-0x100000000000000000000000000000000n, 0x800000000000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x800000000000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x800000000000000000000000n, false], + [-0x80000000000000000000000000000001n, 0x800000000000000000000000n, false], + [-0x80000000000000000000000000000000n, 0x800000000000000000000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x800000000000000000000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x800000000000000000000000n, false], + [-0x1000000000000000000000001n, 0x800000000000000000000000n, false], + [-0x1000000000000000000000000n, 0x800000000000000000000000n, false], + [-0xffffffffffffffffffffffffn, 0x800000000000000000000000n, false], + [-0xfffffffffffffffffffffffen, 0x800000000000000000000000n, false], + [-0x800000000000000000000001n, 0x800000000000000000000000n, false], + [-0x800000000000000000000000n, 0x800000000000000000000000n, false], + [-0x7fffffffffffffffffffffffn, 0x800000000000000000000000n, false], + [-0x7ffffffffffffffffffffffen, 0x800000000000000000000000n, false], + [0x800000000000000000000000n, 0x800000000000000000000000n, true], + [0x800000000000000000000001n, 0x800000000000000000000000n, false], + [0xfffffffffffffffffffffffen, 0x800000000000000000000000n, false], + [0xffffffffffffffffffffffffn, 0x800000000000000000000000n, false], + [0x1000000000000000000000000n, 0x800000000000000000000000n, false], + [0x1000000000000000000000001n, 0x800000000000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x800000000000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x800000000000000000000000n, false], + [0x80000000000000000000000000000000n, 0x800000000000000000000000n, false], + [0x80000000000000000000000000000001n, 0x800000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x800000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x800000000000000000000000n, false], + [0x100000000000000000000000000000000n, 0x800000000000000000000000n, false], + [0x100000000000000000000000000000001n, 0x800000000000000000000000n, false], + [-0x100000000000000000000000000000001n, 0x800000000000000000000001n, false], + [-0x100000000000000000000000000000000n, 0x800000000000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x800000000000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x800000000000000000000001n, false], + [-0x80000000000000000000000000000001n, 0x800000000000000000000001n, false], + [-0x80000000000000000000000000000000n, 0x800000000000000000000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x800000000000000000000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x800000000000000000000001n, false], + [-0x1000000000000000000000001n, 0x800000000000000000000001n, false], + [-0x1000000000000000000000000n, 0x800000000000000000000001n, false], + [-0xffffffffffffffffffffffffn, 0x800000000000000000000001n, false], + [-0xfffffffffffffffffffffffen, 0x800000000000000000000001n, false], + [-0x800000000000000000000001n, 0x800000000000000000000001n, false], + [-0x800000000000000000000000n, 0x800000000000000000000001n, false], + [-0x7fffffffffffffffffffffffn, 0x800000000000000000000001n, false], + [-0x7ffffffffffffffffffffffen, 0x800000000000000000000001n, false], + [0x800000000000000000000001n, 0x800000000000000000000001n, true], + [0xfffffffffffffffffffffffen, 0x800000000000000000000001n, false], + [0xffffffffffffffffffffffffn, 0x800000000000000000000001n, false], + [0x1000000000000000000000000n, 0x800000000000000000000001n, false], + [0x1000000000000000000000001n, 0x800000000000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x800000000000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x800000000000000000000001n, false], + [0x80000000000000000000000000000000n, 0x800000000000000000000001n, false], + [0x80000000000000000000000000000001n, 0x800000000000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x800000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x800000000000000000000001n, false], + [0x100000000000000000000000000000000n, 0x800000000000000000000001n, false], + [0x100000000000000000000000000000001n, 0x800000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x800000000000000000000001n, false], + [-0x100000000000000000000000000000000n, -0x800000000000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x800000000000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x800000000000000000000001n, false], + [-0x80000000000000000000000000000001n, -0x800000000000000000000001n, false], + [-0x80000000000000000000000000000000n, -0x800000000000000000000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x800000000000000000000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x800000000000000000000001n, false], + [-0x1000000000000000000000001n, -0x800000000000000000000001n, false], + [-0x1000000000000000000000000n, -0x800000000000000000000001n, false], + [-0xffffffffffffffffffffffffn, -0x800000000000000000000001n, false], + [-0xfffffffffffffffffffffffen, -0x800000000000000000000001n, false], + [-0x800000000000000000000001n, -0x800000000000000000000001n, true], + [-0x800000000000000000000000n, -0x800000000000000000000001n, false], + [-0x7fffffffffffffffffffffffn, -0x800000000000000000000001n, false], + [-0x7ffffffffffffffffffffffen, -0x800000000000000000000001n, false], + [0xfffffffffffffffffffffffen, -0x800000000000000000000001n, false], + [0xffffffffffffffffffffffffn, -0x800000000000000000000001n, false], + [0x1000000000000000000000000n, -0x800000000000000000000001n, false], + [0x1000000000000000000000001n, -0x800000000000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x800000000000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x800000000000000000000001n, false], + [0x80000000000000000000000000000000n, -0x800000000000000000000001n, false], + [0x80000000000000000000000000000001n, -0x800000000000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x800000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x800000000000000000000001n, false], + [0x100000000000000000000000000000000n, -0x800000000000000000000001n, false], + [0x100000000000000000000000000000001n, -0x800000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x800000000000000000000000n, false], + [-0x100000000000000000000000000000000n, -0x800000000000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x800000000000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x800000000000000000000000n, false], + [-0x80000000000000000000000000000001n, -0x800000000000000000000000n, false], + [-0x80000000000000000000000000000000n, -0x800000000000000000000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x800000000000000000000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x800000000000000000000000n, false], + [-0x1000000000000000000000001n, -0x800000000000000000000000n, false], + [-0x1000000000000000000000000n, -0x800000000000000000000000n, false], + [-0xffffffffffffffffffffffffn, -0x800000000000000000000000n, false], + [-0xfffffffffffffffffffffffen, -0x800000000000000000000000n, false], + [-0x800000000000000000000000n, -0x800000000000000000000000n, true], + [-0x7fffffffffffffffffffffffn, -0x800000000000000000000000n, false], + [-0x7ffffffffffffffffffffffen, -0x800000000000000000000000n, false], + [0xfffffffffffffffffffffffen, -0x800000000000000000000000n, false], + [0xffffffffffffffffffffffffn, -0x800000000000000000000000n, false], + [0x1000000000000000000000000n, -0x800000000000000000000000n, false], + [0x1000000000000000000000001n, -0x800000000000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x800000000000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x800000000000000000000000n, false], + [0x80000000000000000000000000000000n, -0x800000000000000000000000n, false], + [0x80000000000000000000000000000001n, -0x800000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x800000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x800000000000000000000000n, false], + [0x100000000000000000000000000000000n, -0x800000000000000000000000n, false], + [0x100000000000000000000000000000001n, -0x800000000000000000000000n, false], + [-0x100000000000000000000000000000001n, -0x7fffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000000n, -0x7fffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [-0x80000000000000000000000000000001n, -0x7fffffffffffffffffffffffn, false], + [-0x80000000000000000000000000000000n, -0x7fffffffffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [-0x1000000000000000000000001n, -0x7fffffffffffffffffffffffn, false], + [-0x1000000000000000000000000n, -0x7fffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [0x1000000000000000000000000n, -0x7fffffffffffffffffffffffn, false], + [0x1000000000000000000000001n, -0x7fffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [0x80000000000000000000000000000000n, -0x7fffffffffffffffffffffffn, false], + [0x80000000000000000000000000000001n, -0x7fffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, -0x7fffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, -0x7fffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, -0x7ffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000000n, -0x7ffffffffffffffffffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [-0x80000000000000000000000000000001n, -0x7ffffffffffffffffffffffen, false], + [-0x80000000000000000000000000000000n, -0x7ffffffffffffffffffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [-0x1000000000000000000000001n, -0x7ffffffffffffffffffffffen, false], + [-0x1000000000000000000000000n, -0x7ffffffffffffffffffffffen, false], + [-0xffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [-0x7ffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, true], + [0xfffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [0x1000000000000000000000000n, -0x7ffffffffffffffffffffffen, false], + [0x1000000000000000000000001n, -0x7ffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [0x80000000000000000000000000000000n, -0x7ffffffffffffffffffffffen, false], + [0x80000000000000000000000000000001n, -0x7ffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, -0x7ffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, -0x7ffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0xfffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000000n, 0xfffffffffffffffffffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, false], + [-0x80000000000000000000000000000001n, 0xfffffffffffffffffffffffen, false], + [-0x80000000000000000000000000000000n, 0xfffffffffffffffffffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, false], + [-0x1000000000000000000000001n, 0xfffffffffffffffffffffffen, false], + [-0x1000000000000000000000000n, 0xfffffffffffffffffffffffen, false], + [-0xffffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, true], + [0xffffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, false], + [0x1000000000000000000000000n, 0xfffffffffffffffffffffffen, false], + [0x1000000000000000000000001n, 0xfffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, false], + [0x80000000000000000000000000000000n, 0xfffffffffffffffffffffffen, false], + [0x80000000000000000000000000000001n, 0xfffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, 0xfffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, 0xfffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0xffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000000n, 0xffffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, false], + [-0x80000000000000000000000000000001n, 0xffffffffffffffffffffffffn, false], + [-0x80000000000000000000000000000000n, 0xffffffffffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, false], + [-0x1000000000000000000000001n, 0xffffffffffffffffffffffffn, false], + [-0x1000000000000000000000000n, 0xffffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, true], + [0x1000000000000000000000000n, 0xffffffffffffffffffffffffn, false], + [0x1000000000000000000000001n, 0xffffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000000n, 0xffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000001n, 0xffffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, 0xffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, 0xffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, 0x1000000000000000000000000n, false], + [-0x100000000000000000000000000000000n, 0x1000000000000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x1000000000000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x1000000000000000000000000n, false], + [-0x80000000000000000000000000000001n, 0x1000000000000000000000000n, false], + [-0x80000000000000000000000000000000n, 0x1000000000000000000000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x1000000000000000000000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x1000000000000000000000000n, false], + [-0x1000000000000000000000001n, 0x1000000000000000000000000n, false], + [-0x1000000000000000000000000n, 0x1000000000000000000000000n, false], + [-0xffffffffffffffffffffffffn, 0x1000000000000000000000000n, false], + [-0xfffffffffffffffffffffffen, 0x1000000000000000000000000n, false], + [0x1000000000000000000000000n, 0x1000000000000000000000000n, true], + [0x1000000000000000000000001n, 0x1000000000000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x1000000000000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x1000000000000000000000000n, false], + [0x80000000000000000000000000000000n, 0x1000000000000000000000000n, false], + [0x80000000000000000000000000000001n, 0x1000000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x1000000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x1000000000000000000000000n, false], + [0x100000000000000000000000000000000n, 0x1000000000000000000000000n, false], + [0x100000000000000000000000000000001n, 0x1000000000000000000000000n, false], + [-0x100000000000000000000000000000001n, 0x1000000000000000000000001n, false], + [-0x100000000000000000000000000000000n, 0x1000000000000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x1000000000000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x1000000000000000000000001n, false], + [-0x80000000000000000000000000000001n, 0x1000000000000000000000001n, false], + [-0x80000000000000000000000000000000n, 0x1000000000000000000000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x1000000000000000000000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x1000000000000000000000001n, false], + [-0x1000000000000000000000001n, 0x1000000000000000000000001n, false], + [-0x1000000000000000000000000n, 0x1000000000000000000000001n, false], + [-0xffffffffffffffffffffffffn, 0x1000000000000000000000001n, false], + [-0xfffffffffffffffffffffffen, 0x1000000000000000000000001n, false], + [0x1000000000000000000000001n, 0x1000000000000000000000001n, true], + [0x7ffffffffffffffffffffffffffffffen, 0x1000000000000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x1000000000000000000000001n, false], + [0x80000000000000000000000000000000n, 0x1000000000000000000000001n, false], + [0x80000000000000000000000000000001n, 0x1000000000000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x1000000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x1000000000000000000000001n, false], + [0x100000000000000000000000000000000n, 0x1000000000000000000000001n, false], + [0x100000000000000000000000000000001n, 0x1000000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x1000000000000000000000001n, false], + [-0x100000000000000000000000000000000n, -0x1000000000000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x1000000000000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x1000000000000000000000001n, false], + [-0x80000000000000000000000000000001n, -0x1000000000000000000000001n, false], + [-0x80000000000000000000000000000000n, -0x1000000000000000000000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x1000000000000000000000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x1000000000000000000000001n, false], + [-0x1000000000000000000000001n, -0x1000000000000000000000001n, true], + [-0x1000000000000000000000000n, -0x1000000000000000000000001n, false], + [-0xffffffffffffffffffffffffn, -0x1000000000000000000000001n, false], + [-0xfffffffffffffffffffffffen, -0x1000000000000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x1000000000000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x1000000000000000000000001n, false], + [0x80000000000000000000000000000000n, -0x1000000000000000000000001n, false], + [0x80000000000000000000000000000001n, -0x1000000000000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x1000000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x1000000000000000000000001n, false], + [0x100000000000000000000000000000000n, -0x1000000000000000000000001n, false], + [0x100000000000000000000000000000001n, -0x1000000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x1000000000000000000000000n, false], + [-0x100000000000000000000000000000000n, -0x1000000000000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x1000000000000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x1000000000000000000000000n, false], + [-0x80000000000000000000000000000001n, -0x1000000000000000000000000n, false], + [-0x80000000000000000000000000000000n, -0x1000000000000000000000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x1000000000000000000000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x1000000000000000000000000n, false], + [-0x1000000000000000000000000n, -0x1000000000000000000000000n, true], + [-0xffffffffffffffffffffffffn, -0x1000000000000000000000000n, false], + [-0xfffffffffffffffffffffffen, -0x1000000000000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x1000000000000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x1000000000000000000000000n, false], + [0x80000000000000000000000000000000n, -0x1000000000000000000000000n, false], + [0x80000000000000000000000000000001n, -0x1000000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x1000000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x1000000000000000000000000n, false], + [0x100000000000000000000000000000000n, -0x1000000000000000000000000n, false], + [0x100000000000000000000000000000001n, -0x1000000000000000000000000n, false], + [-0x100000000000000000000000000000001n, -0xffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000000n, -0xffffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [-0x80000000000000000000000000000001n, -0xffffffffffffffffffffffffn, false], + [-0x80000000000000000000000000000000n, -0xffffffffffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000000n, -0xffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000001n, -0xffffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, -0xffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, -0xffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, -0xfffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000000n, -0xfffffffffffffffffffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [-0x80000000000000000000000000000001n, -0xfffffffffffffffffffffffen, false], + [-0x80000000000000000000000000000000n, -0xfffffffffffffffffffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, true], + [0x7ffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [0x80000000000000000000000000000000n, -0xfffffffffffffffffffffffen, false], + [0x80000000000000000000000000000001n, -0xfffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, -0xfffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, -0xfffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0x7ffffffffffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000000n, 0x7ffffffffffffffffffffffffffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, false], + [-0x80000000000000000000000000000001n, 0x7ffffffffffffffffffffffffffffffen, false], + [-0x80000000000000000000000000000000n, 0x7ffffffffffffffffffffffffffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [0x7fffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, false], + [0x80000000000000000000000000000000n, 0x7ffffffffffffffffffffffffffffffen, false], + [0x80000000000000000000000000000001n, 0x7ffffffffffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, 0x7ffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, 0x7ffffffffffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0x7fffffffffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000000n, 0x7fffffffffffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, false], + [-0x80000000000000000000000000000001n, 0x7fffffffffffffffffffffffffffffffn, false], + [-0x80000000000000000000000000000000n, 0x7fffffffffffffffffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [0x80000000000000000000000000000000n, 0x7fffffffffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000001n, 0x7fffffffffffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, 0x7fffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, 0x7fffffffffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, 0x80000000000000000000000000000000n, false], + [-0x100000000000000000000000000000000n, 0x80000000000000000000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000000n, false], + [-0x80000000000000000000000000000001n, 0x80000000000000000000000000000000n, false], + [-0x80000000000000000000000000000000n, 0x80000000000000000000000000000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000000n, false], + [0x80000000000000000000000000000000n, 0x80000000000000000000000000000000n, true], + [0x80000000000000000000000000000001n, 0x80000000000000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000000n, false], + [0x100000000000000000000000000000000n, 0x80000000000000000000000000000000n, false], + [0x100000000000000000000000000000001n, 0x80000000000000000000000000000000n, false], + [-0x100000000000000000000000000000001n, 0x80000000000000000000000000000001n, false], + [-0x100000000000000000000000000000000n, 0x80000000000000000000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000001n, false], + [-0x80000000000000000000000000000001n, 0x80000000000000000000000000000001n, false], + [-0x80000000000000000000000000000000n, 0x80000000000000000000000000000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000001n, false], + [0x80000000000000000000000000000001n, 0x80000000000000000000000000000001n, true], + [0xfffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000001n, false], + [0x100000000000000000000000000000000n, 0x80000000000000000000000000000001n, false], + [0x100000000000000000000000000000001n, 0x80000000000000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x80000000000000000000000000000001n, false], + [-0x100000000000000000000000000000000n, -0x80000000000000000000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000001n, false], + [-0x80000000000000000000000000000001n, -0x80000000000000000000000000000001n, true], + [-0x80000000000000000000000000000000n, -0x80000000000000000000000000000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000001n, false], + [0x100000000000000000000000000000000n, -0x80000000000000000000000000000001n, false], + [0x100000000000000000000000000000001n, -0x80000000000000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x80000000000000000000000000000000n, false], + [-0x100000000000000000000000000000000n, -0x80000000000000000000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000000n, false], + [-0x80000000000000000000000000000000n, -0x80000000000000000000000000000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000000n, false], + [0x100000000000000000000000000000000n, -0x80000000000000000000000000000000n, false], + [0x100000000000000000000000000000001n, -0x80000000000000000000000000000000n, false], + [-0x100000000000000000000000000000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, true], + [0xfffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0xfffffffffffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000000n, 0xfffffffffffffffffffffffffffffffen, false], + [-0xffffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [0xffffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, 0xfffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, 0xfffffffffffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0xffffffffffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000000n, 0xffffffffffffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [0x100000000000000000000000000000000n, 0xffffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, 0xffffffffffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, 0x100000000000000000000000000000000n, false], + [-0x100000000000000000000000000000000n, 0x100000000000000000000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x100000000000000000000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x100000000000000000000000000000000n, false], + [0x100000000000000000000000000000000n, 0x100000000000000000000000000000000n, true], + [0x100000000000000000000000000000001n, 0x100000000000000000000000000000000n, false], + [-0x100000000000000000000000000000001n, 0x100000000000000000000000000000001n, false], + [-0x100000000000000000000000000000000n, 0x100000000000000000000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, 0x100000000000000000000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, 0x100000000000000000000000000000001n, false], + [0x100000000000000000000000000000001n, 0x100000000000000000000000000000001n, true], + [-0x100000000000000000000000000000001n, -0x100000000000000000000000000000001n, true], + [-0x100000000000000000000000000000000n, -0x100000000000000000000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x100000000000000000000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x100000000000000000000000000000001n, false], + [-0x100000000000000000000000000000000n, -0x100000000000000000000000000000000n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x100000000000000000000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x100000000000000000000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, true], +]; + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs == rhs, expected); + assertEq(rhs == lhs, expected); + + assertEq(lhs === rhs, expected); + assertEq(rhs === lhs, expected); + + assertEq(lhs != rhs, !expected); + assertEq(rhs != lhs, !expected); + + assertEq(lhs !== rhs, !expected); + assertEq(rhs !== lhs, !expected); + + assertEq(!expected || lhs <= rhs, true); + assertEq(!expected || rhs >= lhs, true); + } +} + +for (let i = 0; i < 5; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-cmp-relational.js b/js/src/jit-test/tests/bigint/bigint-cmp-relational.js new file mode 100644 index 0000000000..71daf29644 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-cmp-relational.js @@ -0,0 +1,4779 @@ +const tests = [ + [-0x100000000000000000000000000000001n, -2n, true], + [-0x100000000000000000000000000000000n, -2n, true], + [-0xffffffffffffffffffffffffffffffffn, -2n, true], + [-0xfffffffffffffffffffffffffffffffen, -2n, true], + [-0x80000000000000000000000000000001n, -2n, true], + [-0x80000000000000000000000000000000n, -2n, true], + [-0x7fffffffffffffffffffffffffffffffn, -2n, true], + [-0x7ffffffffffffffffffffffffffffffen, -2n, true], + [-0x1000000000000000000000001n, -2n, true], + [-0x1000000000000000000000000n, -2n, true], + [-0xffffffffffffffffffffffffn, -2n, true], + [-0xfffffffffffffffffffffffen, -2n, true], + [-0x800000000000000000000001n, -2n, true], + [-0x800000000000000000000000n, -2n, true], + [-0x7fffffffffffffffffffffffn, -2n, true], + [-0x7ffffffffffffffffffffffen, -2n, true], + [-0x10000000000000001n, -2n, true], + [-0x10000000000000000n, -2n, true], + [-0xffffffffffffffffn, -2n, true], + [-0xfffffffffffffffen, -2n, true], + [-0x8000000000000001n, -2n, true], + [-0x8000000000000000n, -2n, true], + [-0x7fffffffffffffffn, -2n, true], + [-0x7ffffffffffffffen, -2n, true], + [-0x100000001n, -2n, true], + [-0x100000000n, -2n, true], + [-0xffffffffn, -2n, true], + [-0xfffffffen, -2n, true], + [-0x80000001n, -2n, true], + [-0x80000000n, -2n, true], + [-0x7fffffffn, -2n, true], + [-0x7ffffffen, -2n, true], + [-2n, -2n, false], + [-1n, -2n, false], + [0n, -2n, false], + [1n, -2n, false], + [2n, -2n, false], + [0x7ffffffen, -2n, false], + [0x7fffffffn, -2n, false], + [0x80000000n, -2n, false], + [0x80000001n, -2n, false], + [0xfffffffen, -2n, false], + [0xffffffffn, -2n, false], + [0x100000000n, -2n, false], + [0x100000001n, -2n, false], + [0x7ffffffffffffffen, -2n, false], + [0x7fffffffffffffffn, -2n, false], + [0x8000000000000000n, -2n, false], + [0x8000000000000001n, -2n, false], + [0xfffffffffffffffen, -2n, false], + [0xffffffffffffffffn, -2n, false], + [0x10000000000000000n, -2n, false], + [0x10000000000000001n, -2n, false], + [0x7ffffffffffffffffffffffen, -2n, false], + [0x7fffffffffffffffffffffffn, -2n, false], + [0x800000000000000000000000n, -2n, false], + [0x800000000000000000000001n, -2n, false], + [0xfffffffffffffffffffffffen, -2n, false], + [0xffffffffffffffffffffffffn, -2n, false], + [0x1000000000000000000000000n, -2n, false], + [0x1000000000000000000000001n, -2n, false], + [0x7ffffffffffffffffffffffffffffffen, -2n, false], + [0x7fffffffffffffffffffffffffffffffn, -2n, false], + [0x80000000000000000000000000000000n, -2n, false], + [0x80000000000000000000000000000001n, -2n, false], + [0xfffffffffffffffffffffffffffffffen, -2n, false], + [0xffffffffffffffffffffffffffffffffn, -2n, false], + [0x100000000000000000000000000000000n, -2n, false], + [0x100000000000000000000000000000001n, -2n, false], + [-0x100000000000000000000000000000001n, -1n, true], + [-0x100000000000000000000000000000000n, -1n, true], + [-0xffffffffffffffffffffffffffffffffn, -1n, true], + [-0xfffffffffffffffffffffffffffffffen, -1n, true], + [-0x80000000000000000000000000000001n, -1n, true], + [-0x80000000000000000000000000000000n, -1n, true], + [-0x7fffffffffffffffffffffffffffffffn, -1n, true], + [-0x7ffffffffffffffffffffffffffffffen, -1n, true], + [-0x1000000000000000000000001n, -1n, true], + [-0x1000000000000000000000000n, -1n, true], + [-0xffffffffffffffffffffffffn, -1n, true], + [-0xfffffffffffffffffffffffen, -1n, true], + [-0x800000000000000000000001n, -1n, true], + [-0x800000000000000000000000n, -1n, true], + [-0x7fffffffffffffffffffffffn, -1n, true], + [-0x7ffffffffffffffffffffffen, -1n, true], + [-0x10000000000000001n, -1n, true], + [-0x10000000000000000n, -1n, true], + [-0xffffffffffffffffn, -1n, true], + [-0xfffffffffffffffen, -1n, true], + [-0x8000000000000001n, -1n, true], + [-0x8000000000000000n, -1n, true], + [-0x7fffffffffffffffn, -1n, true], + [-0x7ffffffffffffffen, -1n, true], + [-0x100000001n, -1n, true], + [-0x100000000n, -1n, true], + [-0xffffffffn, -1n, true], + [-0xfffffffen, -1n, true], + [-0x80000001n, -1n, true], + [-0x80000000n, -1n, true], + [-0x7fffffffn, -1n, true], + [-0x7ffffffen, -1n, true], + [-2n, -1n, true], + [-1n, -1n, false], + [0n, -1n, false], + [1n, -1n, false], + [2n, -1n, false], + [0x7ffffffen, -1n, false], + [0x7fffffffn, -1n, false], + [0x80000000n, -1n, false], + [0x80000001n, -1n, false], + [0xfffffffen, -1n, false], + [0xffffffffn, -1n, false], + [0x100000000n, -1n, false], + [0x100000001n, -1n, false], + [0x7ffffffffffffffen, -1n, false], + [0x7fffffffffffffffn, -1n, false], + [0x8000000000000000n, -1n, false], + [0x8000000000000001n, -1n, false], + [0xfffffffffffffffen, -1n, false], + [0xffffffffffffffffn, -1n, false], + [0x10000000000000000n, -1n, false], + [0x10000000000000001n, -1n, false], + [0x7ffffffffffffffffffffffen, -1n, false], + [0x7fffffffffffffffffffffffn, -1n, false], + [0x800000000000000000000000n, -1n, false], + [0x800000000000000000000001n, -1n, false], + [0xfffffffffffffffffffffffen, -1n, false], + [0xffffffffffffffffffffffffn, -1n, false], + [0x1000000000000000000000000n, -1n, false], + [0x1000000000000000000000001n, -1n, false], + [0x7ffffffffffffffffffffffffffffffen, -1n, false], + [0x7fffffffffffffffffffffffffffffffn, -1n, false], + [0x80000000000000000000000000000000n, -1n, false], + [0x80000000000000000000000000000001n, -1n, false], + [0xfffffffffffffffffffffffffffffffen, -1n, false], + [0xffffffffffffffffffffffffffffffffn, -1n, false], + [0x100000000000000000000000000000000n, -1n, false], + [0x100000000000000000000000000000001n, -1n, false], + [-0x100000000000000000000000000000001n, 0n, true], + [-0x100000000000000000000000000000000n, 0n, true], + [-0xffffffffffffffffffffffffffffffffn, 0n, true], + [-0xfffffffffffffffffffffffffffffffen, 0n, true], + [-0x80000000000000000000000000000001n, 0n, true], + [-0x80000000000000000000000000000000n, 0n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0n, true], + [-0x1000000000000000000000001n, 0n, true], + [-0x1000000000000000000000000n, 0n, true], + [-0xffffffffffffffffffffffffn, 0n, true], + [-0xfffffffffffffffffffffffen, 0n, true], + [-0x800000000000000000000001n, 0n, true], + [-0x800000000000000000000000n, 0n, true], + [-0x7fffffffffffffffffffffffn, 0n, true], + [-0x7ffffffffffffffffffffffen, 0n, true], + [-0x10000000000000001n, 0n, true], + [-0x10000000000000000n, 0n, true], + [-0xffffffffffffffffn, 0n, true], + [-0xfffffffffffffffen, 0n, true], + [-0x8000000000000001n, 0n, true], + [-0x8000000000000000n, 0n, true], + [-0x7fffffffffffffffn, 0n, true], + [-0x7ffffffffffffffen, 0n, true], + [-0x100000001n, 0n, true], + [-0x100000000n, 0n, true], + [-0xffffffffn, 0n, true], + [-0xfffffffen, 0n, true], + [-0x80000001n, 0n, true], + [-0x80000000n, 0n, true], + [-0x7fffffffn, 0n, true], + [-0x7ffffffen, 0n, true], + [-2n, 0n, true], + [-1n, 0n, true], + [0n, 0n, false], + [1n, 0n, false], + [2n, 0n, false], + [0x7ffffffen, 0n, false], + [0x7fffffffn, 0n, false], + [0x80000000n, 0n, false], + [0x80000001n, 0n, false], + [0xfffffffen, 0n, false], + [0xffffffffn, 0n, false], + [0x100000000n, 0n, false], + [0x100000001n, 0n, false], + [0x7ffffffffffffffen, 0n, false], + [0x7fffffffffffffffn, 0n, false], + [0x8000000000000000n, 0n, false], + [0x8000000000000001n, 0n, false], + [0xfffffffffffffffen, 0n, false], + [0xffffffffffffffffn, 0n, false], + [0x10000000000000000n, 0n, false], + [0x10000000000000001n, 0n, false], + [0x7ffffffffffffffffffffffen, 0n, false], + [0x7fffffffffffffffffffffffn, 0n, false], + [0x800000000000000000000000n, 0n, false], + [0x800000000000000000000001n, 0n, false], + [0xfffffffffffffffffffffffen, 0n, false], + [0xffffffffffffffffffffffffn, 0n, false], + [0x1000000000000000000000000n, 0n, false], + [0x1000000000000000000000001n, 0n, false], + [0x7ffffffffffffffffffffffffffffffen, 0n, false], + [0x7fffffffffffffffffffffffffffffffn, 0n, false], + [0x80000000000000000000000000000000n, 0n, false], + [0x80000000000000000000000000000001n, 0n, false], + [0xfffffffffffffffffffffffffffffffen, 0n, false], + [0xffffffffffffffffffffffffffffffffn, 0n, false], + [0x100000000000000000000000000000000n, 0n, false], + [0x100000000000000000000000000000001n, 0n, false], + [-0x100000000000000000000000000000001n, 1n, true], + [-0x100000000000000000000000000000000n, 1n, true], + [-0xffffffffffffffffffffffffffffffffn, 1n, true], + [-0xfffffffffffffffffffffffffffffffen, 1n, true], + [-0x80000000000000000000000000000001n, 1n, true], + [-0x80000000000000000000000000000000n, 1n, true], + [-0x7fffffffffffffffffffffffffffffffn, 1n, true], + [-0x7ffffffffffffffffffffffffffffffen, 1n, true], + [-0x1000000000000000000000001n, 1n, true], + [-0x1000000000000000000000000n, 1n, true], + [-0xffffffffffffffffffffffffn, 1n, true], + [-0xfffffffffffffffffffffffen, 1n, true], + [-0x800000000000000000000001n, 1n, true], + [-0x800000000000000000000000n, 1n, true], + [-0x7fffffffffffffffffffffffn, 1n, true], + [-0x7ffffffffffffffffffffffen, 1n, true], + [-0x10000000000000001n, 1n, true], + [-0x10000000000000000n, 1n, true], + [-0xffffffffffffffffn, 1n, true], + [-0xfffffffffffffffen, 1n, true], + [-0x8000000000000001n, 1n, true], + [-0x8000000000000000n, 1n, true], + [-0x7fffffffffffffffn, 1n, true], + [-0x7ffffffffffffffen, 1n, true], + [-0x100000001n, 1n, true], + [-0x100000000n, 1n, true], + [-0xffffffffn, 1n, true], + [-0xfffffffen, 1n, true], + [-0x80000001n, 1n, true], + [-0x80000000n, 1n, true], + [-0x7fffffffn, 1n, true], + [-0x7ffffffen, 1n, true], + [-2n, 1n, true], + [-1n, 1n, true], + [0n, 1n, true], + [1n, 1n, false], + [2n, 1n, false], + [0x7ffffffen, 1n, false], + [0x7fffffffn, 1n, false], + [0x80000000n, 1n, false], + [0x80000001n, 1n, false], + [0xfffffffen, 1n, false], + [0xffffffffn, 1n, false], + [0x100000000n, 1n, false], + [0x100000001n, 1n, false], + [0x7ffffffffffffffen, 1n, false], + [0x7fffffffffffffffn, 1n, false], + [0x8000000000000000n, 1n, false], + [0x8000000000000001n, 1n, false], + [0xfffffffffffffffen, 1n, false], + [0xffffffffffffffffn, 1n, false], + [0x10000000000000000n, 1n, false], + [0x10000000000000001n, 1n, false], + [0x7ffffffffffffffffffffffen, 1n, false], + [0x7fffffffffffffffffffffffn, 1n, false], + [0x800000000000000000000000n, 1n, false], + [0x800000000000000000000001n, 1n, false], + [0xfffffffffffffffffffffffen, 1n, false], + [0xffffffffffffffffffffffffn, 1n, false], + [0x1000000000000000000000000n, 1n, false], + [0x1000000000000000000000001n, 1n, false], + [0x7ffffffffffffffffffffffffffffffen, 1n, false], + [0x7fffffffffffffffffffffffffffffffn, 1n, false], + [0x80000000000000000000000000000000n, 1n, false], + [0x80000000000000000000000000000001n, 1n, false], + [0xfffffffffffffffffffffffffffffffen, 1n, false], + [0xffffffffffffffffffffffffffffffffn, 1n, false], + [0x100000000000000000000000000000000n, 1n, false], + [0x100000000000000000000000000000001n, 1n, false], + [-0x100000000000000000000000000000001n, 2n, true], + [-0x100000000000000000000000000000000n, 2n, true], + [-0xffffffffffffffffffffffffffffffffn, 2n, true], + [-0xfffffffffffffffffffffffffffffffen, 2n, true], + [-0x80000000000000000000000000000001n, 2n, true], + [-0x80000000000000000000000000000000n, 2n, true], + [-0x7fffffffffffffffffffffffffffffffn, 2n, true], + [-0x7ffffffffffffffffffffffffffffffen, 2n, true], + [-0x1000000000000000000000001n, 2n, true], + [-0x1000000000000000000000000n, 2n, true], + [-0xffffffffffffffffffffffffn, 2n, true], + [-0xfffffffffffffffffffffffen, 2n, true], + [-0x800000000000000000000001n, 2n, true], + [-0x800000000000000000000000n, 2n, true], + [-0x7fffffffffffffffffffffffn, 2n, true], + [-0x7ffffffffffffffffffffffen, 2n, true], + [-0x10000000000000001n, 2n, true], + [-0x10000000000000000n, 2n, true], + [-0xffffffffffffffffn, 2n, true], + [-0xfffffffffffffffen, 2n, true], + [-0x8000000000000001n, 2n, true], + [-0x8000000000000000n, 2n, true], + [-0x7fffffffffffffffn, 2n, true], + [-0x7ffffffffffffffen, 2n, true], + [-0x100000001n, 2n, true], + [-0x100000000n, 2n, true], + [-0xffffffffn, 2n, true], + [-0xfffffffen, 2n, true], + [-0x80000001n, 2n, true], + [-0x80000000n, 2n, true], + [-0x7fffffffn, 2n, true], + [-0x7ffffffen, 2n, true], + [-2n, 2n, true], + [-1n, 2n, true], + [0n, 2n, true], + [1n, 2n, true], + [2n, 2n, false], + [0x7ffffffen, 2n, false], + [0x7fffffffn, 2n, false], + [0x80000000n, 2n, false], + [0x80000001n, 2n, false], + [0xfffffffen, 2n, false], + [0xffffffffn, 2n, false], + [0x100000000n, 2n, false], + [0x100000001n, 2n, false], + [0x7ffffffffffffffen, 2n, false], + [0x7fffffffffffffffn, 2n, false], + [0x8000000000000000n, 2n, false], + [0x8000000000000001n, 2n, false], + [0xfffffffffffffffen, 2n, false], + [0xffffffffffffffffn, 2n, false], + [0x10000000000000000n, 2n, false], + [0x10000000000000001n, 2n, false], + [0x7ffffffffffffffffffffffen, 2n, false], + [0x7fffffffffffffffffffffffn, 2n, false], + [0x800000000000000000000000n, 2n, false], + [0x800000000000000000000001n, 2n, false], + [0xfffffffffffffffffffffffen, 2n, false], + [0xffffffffffffffffffffffffn, 2n, false], + [0x1000000000000000000000000n, 2n, false], + [0x1000000000000000000000001n, 2n, false], + [0x7ffffffffffffffffffffffffffffffen, 2n, false], + [0x7fffffffffffffffffffffffffffffffn, 2n, false], + [0x80000000000000000000000000000000n, 2n, false], + [0x80000000000000000000000000000001n, 2n, false], + [0xfffffffffffffffffffffffffffffffen, 2n, false], + [0xffffffffffffffffffffffffffffffffn, 2n, false], + [0x100000000000000000000000000000000n, 2n, false], + [0x100000000000000000000000000000001n, 2n, false], + [-0x100000000000000000000000000000001n, 0x7ffffffen, true], + [-0x100000000000000000000000000000000n, 0x7ffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, 0x7ffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, 0x7ffffffen, true], + [-0x80000000000000000000000000000001n, 0x7ffffffen, true], + [-0x80000000000000000000000000000000n, 0x7ffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x7ffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x7ffffffen, true], + [-0x1000000000000000000000001n, 0x7ffffffen, true], + [-0x1000000000000000000000000n, 0x7ffffffen, true], + [-0xffffffffffffffffffffffffn, 0x7ffffffen, true], + [-0xfffffffffffffffffffffffen, 0x7ffffffen, true], + [-0x800000000000000000000001n, 0x7ffffffen, true], + [-0x800000000000000000000000n, 0x7ffffffen, true], + [-0x7fffffffffffffffffffffffn, 0x7ffffffen, true], + [-0x7ffffffffffffffffffffffen, 0x7ffffffen, true], + [-0x10000000000000001n, 0x7ffffffen, true], + [-0x10000000000000000n, 0x7ffffffen, true], + [-0xffffffffffffffffn, 0x7ffffffen, true], + [-0xfffffffffffffffen, 0x7ffffffen, true], + [-0x8000000000000001n, 0x7ffffffen, true], + [-0x8000000000000000n, 0x7ffffffen, true], + [-0x7fffffffffffffffn, 0x7ffffffen, true], + [-0x7ffffffffffffffen, 0x7ffffffen, true], + [-0x100000001n, 0x7ffffffen, true], + [-0x100000000n, 0x7ffffffen, true], + [-0xffffffffn, 0x7ffffffen, true], + [-0xfffffffen, 0x7ffffffen, true], + [-0x80000001n, 0x7ffffffen, true], + [-0x80000000n, 0x7ffffffen, true], + [-0x7fffffffn, 0x7ffffffen, true], + [-0x7ffffffen, 0x7ffffffen, true], + [-2n, 0x7ffffffen, true], + [-1n, 0x7ffffffen, true], + [0n, 0x7ffffffen, true], + [1n, 0x7ffffffen, true], + [2n, 0x7ffffffen, true], + [0x7ffffffen, 0x7ffffffen, false], + [0x7fffffffn, 0x7ffffffen, false], + [0x80000000n, 0x7ffffffen, false], + [0x80000001n, 0x7ffffffen, false], + [0xfffffffen, 0x7ffffffen, false], + [0xffffffffn, 0x7ffffffen, false], + [0x100000000n, 0x7ffffffen, false], + [0x100000001n, 0x7ffffffen, false], + [0x7ffffffffffffffen, 0x7ffffffen, false], + [0x7fffffffffffffffn, 0x7ffffffen, false], + [0x8000000000000000n, 0x7ffffffen, false], + [0x8000000000000001n, 0x7ffffffen, false], + [0xfffffffffffffffen, 0x7ffffffen, false], + [0xffffffffffffffffn, 0x7ffffffen, false], + [0x10000000000000000n, 0x7ffffffen, false], + [0x10000000000000001n, 0x7ffffffen, false], + [0x7ffffffffffffffffffffffen, 0x7ffffffen, false], + [0x7fffffffffffffffffffffffn, 0x7ffffffen, false], + [0x800000000000000000000000n, 0x7ffffffen, false], + [0x800000000000000000000001n, 0x7ffffffen, false], + [0xfffffffffffffffffffffffen, 0x7ffffffen, false], + [0xffffffffffffffffffffffffn, 0x7ffffffen, false], + [0x1000000000000000000000000n, 0x7ffffffen, false], + [0x1000000000000000000000001n, 0x7ffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7ffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7ffffffen, false], + [0x80000000000000000000000000000000n, 0x7ffffffen, false], + [0x80000000000000000000000000000001n, 0x7ffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0x7ffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0x7ffffffen, false], + [0x100000000000000000000000000000000n, 0x7ffffffen, false], + [0x100000000000000000000000000000001n, 0x7ffffffen, false], + [-0x100000000000000000000000000000001n, 0x7fffffffn, true], + [-0x100000000000000000000000000000000n, 0x7fffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, 0x7fffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, 0x7fffffffn, true], + [-0x80000000000000000000000000000001n, 0x7fffffffn, true], + [-0x80000000000000000000000000000000n, 0x7fffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x7fffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x7fffffffn, true], + [-0x1000000000000000000000001n, 0x7fffffffn, true], + [-0x1000000000000000000000000n, 0x7fffffffn, true], + [-0xffffffffffffffffffffffffn, 0x7fffffffn, true], + [-0xfffffffffffffffffffffffen, 0x7fffffffn, true], + [-0x800000000000000000000001n, 0x7fffffffn, true], + [-0x800000000000000000000000n, 0x7fffffffn, true], + [-0x7fffffffffffffffffffffffn, 0x7fffffffn, true], + [-0x7ffffffffffffffffffffffen, 0x7fffffffn, true], + [-0x10000000000000001n, 0x7fffffffn, true], + [-0x10000000000000000n, 0x7fffffffn, true], + [-0xffffffffffffffffn, 0x7fffffffn, true], + [-0xfffffffffffffffen, 0x7fffffffn, true], + [-0x8000000000000001n, 0x7fffffffn, true], + [-0x8000000000000000n, 0x7fffffffn, true], + [-0x7fffffffffffffffn, 0x7fffffffn, true], + [-0x7ffffffffffffffen, 0x7fffffffn, true], + [-0x100000001n, 0x7fffffffn, true], + [-0x100000000n, 0x7fffffffn, true], + [-0xffffffffn, 0x7fffffffn, true], + [-0xfffffffen, 0x7fffffffn, true], + [-0x80000001n, 0x7fffffffn, true], + [-0x80000000n, 0x7fffffffn, true], + [-0x7fffffffn, 0x7fffffffn, true], + [-0x7ffffffen, 0x7fffffffn, true], + [-2n, 0x7fffffffn, true], + [-1n, 0x7fffffffn, true], + [0n, 0x7fffffffn, true], + [1n, 0x7fffffffn, true], + [2n, 0x7fffffffn, true], + [0x7ffffffen, 0x7fffffffn, true], + [0x7fffffffn, 0x7fffffffn, false], + [0x80000000n, 0x7fffffffn, false], + [0x80000001n, 0x7fffffffn, false], + [0xfffffffen, 0x7fffffffn, false], + [0xffffffffn, 0x7fffffffn, false], + [0x100000000n, 0x7fffffffn, false], + [0x100000001n, 0x7fffffffn, false], + [0x7ffffffffffffffen, 0x7fffffffn, false], + [0x7fffffffffffffffn, 0x7fffffffn, false], + [0x8000000000000000n, 0x7fffffffn, false], + [0x8000000000000001n, 0x7fffffffn, false], + [0xfffffffffffffffen, 0x7fffffffn, false], + [0xffffffffffffffffn, 0x7fffffffn, false], + [0x10000000000000000n, 0x7fffffffn, false], + [0x10000000000000001n, 0x7fffffffn, false], + [0x7ffffffffffffffffffffffen, 0x7fffffffn, false], + [0x7fffffffffffffffffffffffn, 0x7fffffffn, false], + [0x800000000000000000000000n, 0x7fffffffn, false], + [0x800000000000000000000001n, 0x7fffffffn, false], + [0xfffffffffffffffffffffffen, 0x7fffffffn, false], + [0xffffffffffffffffffffffffn, 0x7fffffffn, false], + [0x1000000000000000000000000n, 0x7fffffffn, false], + [0x1000000000000000000000001n, 0x7fffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7fffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7fffffffn, false], + [0x80000000000000000000000000000000n, 0x7fffffffn, false], + [0x80000000000000000000000000000001n, 0x7fffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0x7fffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0x7fffffffn, false], + [0x100000000000000000000000000000000n, 0x7fffffffn, false], + [0x100000000000000000000000000000001n, 0x7fffffffn, false], + [-0x100000000000000000000000000000001n, 0x80000000n, true], + [-0x100000000000000000000000000000000n, 0x80000000n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x80000000n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x80000000n, true], + [-0x80000000000000000000000000000001n, 0x80000000n, true], + [-0x80000000000000000000000000000000n, 0x80000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x80000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x80000000n, true], + [-0x1000000000000000000000001n, 0x80000000n, true], + [-0x1000000000000000000000000n, 0x80000000n, true], + [-0xffffffffffffffffffffffffn, 0x80000000n, true], + [-0xfffffffffffffffffffffffen, 0x80000000n, true], + [-0x800000000000000000000001n, 0x80000000n, true], + [-0x800000000000000000000000n, 0x80000000n, true], + [-0x7fffffffffffffffffffffffn, 0x80000000n, true], + [-0x7ffffffffffffffffffffffen, 0x80000000n, true], + [-0x10000000000000001n, 0x80000000n, true], + [-0x10000000000000000n, 0x80000000n, true], + [-0xffffffffffffffffn, 0x80000000n, true], + [-0xfffffffffffffffen, 0x80000000n, true], + [-0x8000000000000001n, 0x80000000n, true], + [-0x8000000000000000n, 0x80000000n, true], + [-0x7fffffffffffffffn, 0x80000000n, true], + [-0x7ffffffffffffffen, 0x80000000n, true], + [-0x100000001n, 0x80000000n, true], + [-0x100000000n, 0x80000000n, true], + [-0xffffffffn, 0x80000000n, true], + [-0xfffffffen, 0x80000000n, true], + [-0x80000001n, 0x80000000n, true], + [-0x80000000n, 0x80000000n, true], + [-0x7fffffffn, 0x80000000n, true], + [-0x7ffffffen, 0x80000000n, true], + [-2n, 0x80000000n, true], + [-1n, 0x80000000n, true], + [0n, 0x80000000n, true], + [1n, 0x80000000n, true], + [2n, 0x80000000n, true], + [0x7ffffffen, 0x80000000n, true], + [0x7fffffffn, 0x80000000n, true], + [0x80000000n, 0x80000000n, false], + [0x80000001n, 0x80000000n, false], + [0xfffffffen, 0x80000000n, false], + [0xffffffffn, 0x80000000n, false], + [0x100000000n, 0x80000000n, false], + [0x100000001n, 0x80000000n, false], + [0x7ffffffffffffffen, 0x80000000n, false], + [0x7fffffffffffffffn, 0x80000000n, false], + [0x8000000000000000n, 0x80000000n, false], + [0x8000000000000001n, 0x80000000n, false], + [0xfffffffffffffffen, 0x80000000n, false], + [0xffffffffffffffffn, 0x80000000n, false], + [0x10000000000000000n, 0x80000000n, false], + [0x10000000000000001n, 0x80000000n, false], + [0x7ffffffffffffffffffffffen, 0x80000000n, false], + [0x7fffffffffffffffffffffffn, 0x80000000n, false], + [0x800000000000000000000000n, 0x80000000n, false], + [0x800000000000000000000001n, 0x80000000n, false], + [0xfffffffffffffffffffffffen, 0x80000000n, false], + [0xffffffffffffffffffffffffn, 0x80000000n, false], + [0x1000000000000000000000000n, 0x80000000n, false], + [0x1000000000000000000000001n, 0x80000000n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x80000000n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x80000000n, false], + [0x80000000000000000000000000000000n, 0x80000000n, false], + [0x80000000000000000000000000000001n, 0x80000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x80000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x80000000n, false], + [0x100000000000000000000000000000000n, 0x80000000n, false], + [0x100000000000000000000000000000001n, 0x80000000n, false], + [-0x100000000000000000000000000000001n, 0x80000001n, true], + [-0x100000000000000000000000000000000n, 0x80000001n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x80000001n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x80000001n, true], + [-0x80000000000000000000000000000001n, 0x80000001n, true], + [-0x80000000000000000000000000000000n, 0x80000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x80000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x80000001n, true], + [-0x1000000000000000000000001n, 0x80000001n, true], + [-0x1000000000000000000000000n, 0x80000001n, true], + [-0xffffffffffffffffffffffffn, 0x80000001n, true], + [-0xfffffffffffffffffffffffen, 0x80000001n, true], + [-0x800000000000000000000001n, 0x80000001n, true], + [-0x800000000000000000000000n, 0x80000001n, true], + [-0x7fffffffffffffffffffffffn, 0x80000001n, true], + [-0x7ffffffffffffffffffffffen, 0x80000001n, true], + [-0x10000000000000001n, 0x80000001n, true], + [-0x10000000000000000n, 0x80000001n, true], + [-0xffffffffffffffffn, 0x80000001n, true], + [-0xfffffffffffffffen, 0x80000001n, true], + [-0x8000000000000001n, 0x80000001n, true], + [-0x8000000000000000n, 0x80000001n, true], + [-0x7fffffffffffffffn, 0x80000001n, true], + [-0x7ffffffffffffffen, 0x80000001n, true], + [-0x100000001n, 0x80000001n, true], + [-0x100000000n, 0x80000001n, true], + [-0xffffffffn, 0x80000001n, true], + [-0xfffffffen, 0x80000001n, true], + [-0x80000001n, 0x80000001n, true], + [-0x80000000n, 0x80000001n, true], + [-0x7fffffffn, 0x80000001n, true], + [-0x7ffffffen, 0x80000001n, true], + [-2n, 0x80000001n, true], + [-1n, 0x80000001n, true], + [0n, 0x80000001n, true], + [1n, 0x80000001n, true], + [2n, 0x80000001n, true], + [0x7ffffffen, 0x80000001n, true], + [0x7fffffffn, 0x80000001n, true], + [0x80000000n, 0x80000001n, true], + [0x80000001n, 0x80000001n, false], + [0xfffffffen, 0x80000001n, false], + [0xffffffffn, 0x80000001n, false], + [0x100000000n, 0x80000001n, false], + [0x100000001n, 0x80000001n, false], + [0x7ffffffffffffffen, 0x80000001n, false], + [0x7fffffffffffffffn, 0x80000001n, false], + [0x8000000000000000n, 0x80000001n, false], + [0x8000000000000001n, 0x80000001n, false], + [0xfffffffffffffffen, 0x80000001n, false], + [0xffffffffffffffffn, 0x80000001n, false], + [0x10000000000000000n, 0x80000001n, false], + [0x10000000000000001n, 0x80000001n, false], + [0x7ffffffffffffffffffffffen, 0x80000001n, false], + [0x7fffffffffffffffffffffffn, 0x80000001n, false], + [0x800000000000000000000000n, 0x80000001n, false], + [0x800000000000000000000001n, 0x80000001n, false], + [0xfffffffffffffffffffffffen, 0x80000001n, false], + [0xffffffffffffffffffffffffn, 0x80000001n, false], + [0x1000000000000000000000000n, 0x80000001n, false], + [0x1000000000000000000000001n, 0x80000001n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x80000001n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x80000001n, false], + [0x80000000000000000000000000000000n, 0x80000001n, false], + [0x80000000000000000000000000000001n, 0x80000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x80000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x80000001n, false], + [0x100000000000000000000000000000000n, 0x80000001n, false], + [0x100000000000000000000000000000001n, 0x80000001n, false], + [-0x100000000000000000000000000000001n, -0x80000001n, true], + [-0x100000000000000000000000000000000n, -0x80000001n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x80000001n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x80000001n, true], + [-0x80000000000000000000000000000001n, -0x80000001n, true], + [-0x80000000000000000000000000000000n, -0x80000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x80000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x80000001n, true], + [-0x1000000000000000000000001n, -0x80000001n, true], + [-0x1000000000000000000000000n, -0x80000001n, true], + [-0xffffffffffffffffffffffffn, -0x80000001n, true], + [-0xfffffffffffffffffffffffen, -0x80000001n, true], + [-0x800000000000000000000001n, -0x80000001n, true], + [-0x800000000000000000000000n, -0x80000001n, true], + [-0x7fffffffffffffffffffffffn, -0x80000001n, true], + [-0x7ffffffffffffffffffffffen, -0x80000001n, true], + [-0x10000000000000001n, -0x80000001n, true], + [-0x10000000000000000n, -0x80000001n, true], + [-0xffffffffffffffffn, -0x80000001n, true], + [-0xfffffffffffffffen, -0x80000001n, true], + [-0x8000000000000001n, -0x80000001n, true], + [-0x8000000000000000n, -0x80000001n, true], + [-0x7fffffffffffffffn, -0x80000001n, true], + [-0x7ffffffffffffffen, -0x80000001n, true], + [-0x100000001n, -0x80000001n, true], + [-0x100000000n, -0x80000001n, true], + [-0xffffffffn, -0x80000001n, true], + [-0xfffffffen, -0x80000001n, true], + [-0x80000001n, -0x80000001n, false], + [-0x80000000n, -0x80000001n, false], + [-0x7fffffffn, -0x80000001n, false], + [-0x7ffffffen, -0x80000001n, false], + [-2n, -0x80000001n, false], + [-1n, -0x80000001n, false], + [0n, -0x80000001n, false], + [1n, -0x80000001n, false], + [2n, -0x80000001n, false], + [0x7ffffffen, -0x80000001n, false], + [0x7fffffffn, -0x80000001n, false], + [0x80000000n, -0x80000001n, false], + [0x80000001n, -0x80000001n, false], + [0xfffffffen, -0x80000001n, false], + [0xffffffffn, -0x80000001n, false], + [0x100000000n, -0x80000001n, false], + [0x100000001n, -0x80000001n, false], + [0x7ffffffffffffffen, -0x80000001n, false], + [0x7fffffffffffffffn, -0x80000001n, false], + [0x8000000000000000n, -0x80000001n, false], + [0x8000000000000001n, -0x80000001n, false], + [0xfffffffffffffffen, -0x80000001n, false], + [0xffffffffffffffffn, -0x80000001n, false], + [0x10000000000000000n, -0x80000001n, false], + [0x10000000000000001n, -0x80000001n, false], + [0x7ffffffffffffffffffffffen, -0x80000001n, false], + [0x7fffffffffffffffffffffffn, -0x80000001n, false], + [0x800000000000000000000000n, -0x80000001n, false], + [0x800000000000000000000001n, -0x80000001n, false], + [0xfffffffffffffffffffffffen, -0x80000001n, false], + [0xffffffffffffffffffffffffn, -0x80000001n, false], + [0x1000000000000000000000000n, -0x80000001n, false], + [0x1000000000000000000000001n, -0x80000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x80000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x80000001n, false], + [0x80000000000000000000000000000000n, -0x80000001n, false], + [0x80000000000000000000000000000001n, -0x80000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x80000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x80000001n, false], + [0x100000000000000000000000000000000n, -0x80000001n, false], + [0x100000000000000000000000000000001n, -0x80000001n, false], + [-0x100000000000000000000000000000001n, -0x80000000n, true], + [-0x100000000000000000000000000000000n, -0x80000000n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x80000000n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x80000000n, true], + [-0x80000000000000000000000000000001n, -0x80000000n, true], + [-0x80000000000000000000000000000000n, -0x80000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x80000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x80000000n, true], + [-0x1000000000000000000000001n, -0x80000000n, true], + [-0x1000000000000000000000000n, -0x80000000n, true], + [-0xffffffffffffffffffffffffn, -0x80000000n, true], + [-0xfffffffffffffffffffffffen, -0x80000000n, true], + [-0x800000000000000000000001n, -0x80000000n, true], + [-0x800000000000000000000000n, -0x80000000n, true], + [-0x7fffffffffffffffffffffffn, -0x80000000n, true], + [-0x7ffffffffffffffffffffffen, -0x80000000n, true], + [-0x10000000000000001n, -0x80000000n, true], + [-0x10000000000000000n, -0x80000000n, true], + [-0xffffffffffffffffn, -0x80000000n, true], + [-0xfffffffffffffffen, -0x80000000n, true], + [-0x8000000000000001n, -0x80000000n, true], + [-0x8000000000000000n, -0x80000000n, true], + [-0x7fffffffffffffffn, -0x80000000n, true], + [-0x7ffffffffffffffen, -0x80000000n, true], + [-0x100000001n, -0x80000000n, true], + [-0x100000000n, -0x80000000n, true], + [-0xffffffffn, -0x80000000n, true], + [-0xfffffffen, -0x80000000n, true], + [-0x80000001n, -0x80000000n, true], + [-0x80000000n, -0x80000000n, false], + [-0x7fffffffn, -0x80000000n, false], + [-0x7ffffffen, -0x80000000n, false], + [-2n, -0x80000000n, false], + [-1n, -0x80000000n, false], + [0n, -0x80000000n, false], + [1n, -0x80000000n, false], + [2n, -0x80000000n, false], + [0x7ffffffen, -0x80000000n, false], + [0x7fffffffn, -0x80000000n, false], + [0x80000000n, -0x80000000n, false], + [0x80000001n, -0x80000000n, false], + [0xfffffffen, -0x80000000n, false], + [0xffffffffn, -0x80000000n, false], + [0x100000000n, -0x80000000n, false], + [0x100000001n, -0x80000000n, false], + [0x7ffffffffffffffen, -0x80000000n, false], + [0x7fffffffffffffffn, -0x80000000n, false], + [0x8000000000000000n, -0x80000000n, false], + [0x8000000000000001n, -0x80000000n, false], + [0xfffffffffffffffen, -0x80000000n, false], + [0xffffffffffffffffn, -0x80000000n, false], + [0x10000000000000000n, -0x80000000n, false], + [0x10000000000000001n, -0x80000000n, false], + [0x7ffffffffffffffffffffffen, -0x80000000n, false], + [0x7fffffffffffffffffffffffn, -0x80000000n, false], + [0x800000000000000000000000n, -0x80000000n, false], + [0x800000000000000000000001n, -0x80000000n, false], + [0xfffffffffffffffffffffffen, -0x80000000n, false], + [0xffffffffffffffffffffffffn, -0x80000000n, false], + [0x1000000000000000000000000n, -0x80000000n, false], + [0x1000000000000000000000001n, -0x80000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x80000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x80000000n, false], + [0x80000000000000000000000000000000n, -0x80000000n, false], + [0x80000000000000000000000000000001n, -0x80000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x80000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x80000000n, false], + [0x100000000000000000000000000000000n, -0x80000000n, false], + [0x100000000000000000000000000000001n, -0x80000000n, false], + [-0x100000000000000000000000000000001n, -0x7fffffffn, true], + [-0x100000000000000000000000000000000n, -0x7fffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, -0x7fffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, -0x7fffffffn, true], + [-0x80000000000000000000000000000001n, -0x7fffffffn, true], + [-0x80000000000000000000000000000000n, -0x7fffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x7fffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x7fffffffn, true], + [-0x1000000000000000000000001n, -0x7fffffffn, true], + [-0x1000000000000000000000000n, -0x7fffffffn, true], + [-0xffffffffffffffffffffffffn, -0x7fffffffn, true], + [-0xfffffffffffffffffffffffen, -0x7fffffffn, true], + [-0x800000000000000000000001n, -0x7fffffffn, true], + [-0x800000000000000000000000n, -0x7fffffffn, true], + [-0x7fffffffffffffffffffffffn, -0x7fffffffn, true], + [-0x7ffffffffffffffffffffffen, -0x7fffffffn, true], + [-0x10000000000000001n, -0x7fffffffn, true], + [-0x10000000000000000n, -0x7fffffffn, true], + [-0xffffffffffffffffn, -0x7fffffffn, true], + [-0xfffffffffffffffen, -0x7fffffffn, true], + [-0x8000000000000001n, -0x7fffffffn, true], + [-0x8000000000000000n, -0x7fffffffn, true], + [-0x7fffffffffffffffn, -0x7fffffffn, true], + [-0x7ffffffffffffffen, -0x7fffffffn, true], + [-0x100000001n, -0x7fffffffn, true], + [-0x100000000n, -0x7fffffffn, true], + [-0xffffffffn, -0x7fffffffn, true], + [-0xfffffffen, -0x7fffffffn, true], + [-0x80000001n, -0x7fffffffn, true], + [-0x80000000n, -0x7fffffffn, true], + [-0x7fffffffn, -0x7fffffffn, false], + [-0x7ffffffen, -0x7fffffffn, false], + [-2n, -0x7fffffffn, false], + [-1n, -0x7fffffffn, false], + [0n, -0x7fffffffn, false], + [1n, -0x7fffffffn, false], + [2n, -0x7fffffffn, false], + [0x7ffffffen, -0x7fffffffn, false], + [0x7fffffffn, -0x7fffffffn, false], + [0x80000000n, -0x7fffffffn, false], + [0x80000001n, -0x7fffffffn, false], + [0xfffffffen, -0x7fffffffn, false], + [0xffffffffn, -0x7fffffffn, false], + [0x100000000n, -0x7fffffffn, false], + [0x100000001n, -0x7fffffffn, false], + [0x7ffffffffffffffen, -0x7fffffffn, false], + [0x7fffffffffffffffn, -0x7fffffffn, false], + [0x8000000000000000n, -0x7fffffffn, false], + [0x8000000000000001n, -0x7fffffffn, false], + [0xfffffffffffffffen, -0x7fffffffn, false], + [0xffffffffffffffffn, -0x7fffffffn, false], + [0x10000000000000000n, -0x7fffffffn, false], + [0x10000000000000001n, -0x7fffffffn, false], + [0x7ffffffffffffffffffffffen, -0x7fffffffn, false], + [0x7fffffffffffffffffffffffn, -0x7fffffffn, false], + [0x800000000000000000000000n, -0x7fffffffn, false], + [0x800000000000000000000001n, -0x7fffffffn, false], + [0xfffffffffffffffffffffffen, -0x7fffffffn, false], + [0xffffffffffffffffffffffffn, -0x7fffffffn, false], + [0x1000000000000000000000000n, -0x7fffffffn, false], + [0x1000000000000000000000001n, -0x7fffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7fffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7fffffffn, false], + [0x80000000000000000000000000000000n, -0x7fffffffn, false], + [0x80000000000000000000000000000001n, -0x7fffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0x7fffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0x7fffffffn, false], + [0x100000000000000000000000000000000n, -0x7fffffffn, false], + [0x100000000000000000000000000000001n, -0x7fffffffn, false], + [-0x100000000000000000000000000000001n, -0x7ffffffen, true], + [-0x100000000000000000000000000000000n, -0x7ffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, -0x7ffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, -0x7ffffffen, true], + [-0x80000000000000000000000000000001n, -0x7ffffffen, true], + [-0x80000000000000000000000000000000n, -0x7ffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x7ffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x7ffffffen, true], + [-0x1000000000000000000000001n, -0x7ffffffen, true], + [-0x1000000000000000000000000n, -0x7ffffffen, true], + [-0xffffffffffffffffffffffffn, -0x7ffffffen, true], + [-0xfffffffffffffffffffffffen, -0x7ffffffen, true], + [-0x800000000000000000000001n, -0x7ffffffen, true], + [-0x800000000000000000000000n, -0x7ffffffen, true], + [-0x7fffffffffffffffffffffffn, -0x7ffffffen, true], + [-0x7ffffffffffffffffffffffen, -0x7ffffffen, true], + [-0x10000000000000001n, -0x7ffffffen, true], + [-0x10000000000000000n, -0x7ffffffen, true], + [-0xffffffffffffffffn, -0x7ffffffen, true], + [-0xfffffffffffffffen, -0x7ffffffen, true], + [-0x8000000000000001n, -0x7ffffffen, true], + [-0x8000000000000000n, -0x7ffffffen, true], + [-0x7fffffffffffffffn, -0x7ffffffen, true], + [-0x7ffffffffffffffen, -0x7ffffffen, true], + [-0x100000001n, -0x7ffffffen, true], + [-0x100000000n, -0x7ffffffen, true], + [-0xffffffffn, -0x7ffffffen, true], + [-0xfffffffen, -0x7ffffffen, true], + [-0x80000001n, -0x7ffffffen, true], + [-0x80000000n, -0x7ffffffen, true], + [-0x7fffffffn, -0x7ffffffen, true], + [-0x7ffffffen, -0x7ffffffen, false], + [-2n, -0x7ffffffen, false], + [-1n, -0x7ffffffen, false], + [0n, -0x7ffffffen, false], + [1n, -0x7ffffffen, false], + [2n, -0x7ffffffen, false], + [0x7ffffffen, -0x7ffffffen, false], + [0x7fffffffn, -0x7ffffffen, false], + [0x80000000n, -0x7ffffffen, false], + [0x80000001n, -0x7ffffffen, false], + [0xfffffffen, -0x7ffffffen, false], + [0xffffffffn, -0x7ffffffen, false], + [0x100000000n, -0x7ffffffen, false], + [0x100000001n, -0x7ffffffen, false], + [0x7ffffffffffffffen, -0x7ffffffen, false], + [0x7fffffffffffffffn, -0x7ffffffen, false], + [0x8000000000000000n, -0x7ffffffen, false], + [0x8000000000000001n, -0x7ffffffen, false], + [0xfffffffffffffffen, -0x7ffffffen, false], + [0xffffffffffffffffn, -0x7ffffffen, false], + [0x10000000000000000n, -0x7ffffffen, false], + [0x10000000000000001n, -0x7ffffffen, false], + [0x7ffffffffffffffffffffffen, -0x7ffffffen, false], + [0x7fffffffffffffffffffffffn, -0x7ffffffen, false], + [0x800000000000000000000000n, -0x7ffffffen, false], + [0x800000000000000000000001n, -0x7ffffffen, false], + [0xfffffffffffffffffffffffen, -0x7ffffffen, false], + [0xffffffffffffffffffffffffn, -0x7ffffffen, false], + [0x1000000000000000000000000n, -0x7ffffffen, false], + [0x1000000000000000000000001n, -0x7ffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7ffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7ffffffen, false], + [0x80000000000000000000000000000000n, -0x7ffffffen, false], + [0x80000000000000000000000000000001n, -0x7ffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0x7ffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0x7ffffffen, false], + [0x100000000000000000000000000000000n, -0x7ffffffen, false], + [0x100000000000000000000000000000001n, -0x7ffffffen, false], + [-0x100000000000000000000000000000001n, 0xfffffffen, true], + [-0x100000000000000000000000000000000n, 0xfffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, 0xfffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, 0xfffffffen, true], + [-0x80000000000000000000000000000001n, 0xfffffffen, true], + [-0x80000000000000000000000000000000n, 0xfffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, 0xfffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, 0xfffffffen, true], + [-0x1000000000000000000000001n, 0xfffffffen, true], + [-0x1000000000000000000000000n, 0xfffffffen, true], + [-0xffffffffffffffffffffffffn, 0xfffffffen, true], + [-0xfffffffffffffffffffffffen, 0xfffffffen, true], + [-0x800000000000000000000001n, 0xfffffffen, true], + [-0x800000000000000000000000n, 0xfffffffen, true], + [-0x7fffffffffffffffffffffffn, 0xfffffffen, true], + [-0x7ffffffffffffffffffffffen, 0xfffffffen, true], + [-0x10000000000000001n, 0xfffffffen, true], + [-0x10000000000000000n, 0xfffffffen, true], + [-0xffffffffffffffffn, 0xfffffffen, true], + [-0xfffffffffffffffen, 0xfffffffen, true], + [-0x8000000000000001n, 0xfffffffen, true], + [-0x8000000000000000n, 0xfffffffen, true], + [-0x7fffffffffffffffn, 0xfffffffen, true], + [-0x7ffffffffffffffen, 0xfffffffen, true], + [-0x100000001n, 0xfffffffen, true], + [-0x100000000n, 0xfffffffen, true], + [-0xffffffffn, 0xfffffffen, true], + [-0xfffffffen, 0xfffffffen, true], + [-0x80000001n, 0xfffffffen, true], + [-0x80000000n, 0xfffffffen, true], + [-0x7fffffffn, 0xfffffffen, true], + [-0x7ffffffen, 0xfffffffen, true], + [-2n, 0xfffffffen, true], + [-1n, 0xfffffffen, true], + [0n, 0xfffffffen, true], + [1n, 0xfffffffen, true], + [2n, 0xfffffffen, true], + [0x7ffffffen, 0xfffffffen, true], + [0x7fffffffn, 0xfffffffen, true], + [0x80000000n, 0xfffffffen, true], + [0x80000001n, 0xfffffffen, true], + [0xfffffffen, 0xfffffffen, false], + [0xffffffffn, 0xfffffffen, false], + [0x100000000n, 0xfffffffen, false], + [0x100000001n, 0xfffffffen, false], + [0x7ffffffffffffffen, 0xfffffffen, false], + [0x7fffffffffffffffn, 0xfffffffen, false], + [0x8000000000000000n, 0xfffffffen, false], + [0x8000000000000001n, 0xfffffffen, false], + [0xfffffffffffffffen, 0xfffffffen, false], + [0xffffffffffffffffn, 0xfffffffen, false], + [0x10000000000000000n, 0xfffffffen, false], + [0x10000000000000001n, 0xfffffffen, false], + [0x7ffffffffffffffffffffffen, 0xfffffffen, false], + [0x7fffffffffffffffffffffffn, 0xfffffffen, false], + [0x800000000000000000000000n, 0xfffffffen, false], + [0x800000000000000000000001n, 0xfffffffen, false], + [0xfffffffffffffffffffffffen, 0xfffffffen, false], + [0xffffffffffffffffffffffffn, 0xfffffffen, false], + [0x1000000000000000000000000n, 0xfffffffen, false], + [0x1000000000000000000000001n, 0xfffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0xfffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0xfffffffen, false], + [0x80000000000000000000000000000000n, 0xfffffffen, false], + [0x80000000000000000000000000000001n, 0xfffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0xfffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0xfffffffen, false], + [0x100000000000000000000000000000000n, 0xfffffffen, false], + [0x100000000000000000000000000000001n, 0xfffffffen, false], + [-0x100000000000000000000000000000001n, 0xffffffffn, true], + [-0x100000000000000000000000000000000n, 0xffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, 0xffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, 0xffffffffn, true], + [-0x80000000000000000000000000000001n, 0xffffffffn, true], + [-0x80000000000000000000000000000000n, 0xffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, 0xffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, 0xffffffffn, true], + [-0x1000000000000000000000001n, 0xffffffffn, true], + [-0x1000000000000000000000000n, 0xffffffffn, true], + [-0xffffffffffffffffffffffffn, 0xffffffffn, true], + [-0xfffffffffffffffffffffffen, 0xffffffffn, true], + [-0x800000000000000000000001n, 0xffffffffn, true], + [-0x800000000000000000000000n, 0xffffffffn, true], + [-0x7fffffffffffffffffffffffn, 0xffffffffn, true], + [-0x7ffffffffffffffffffffffen, 0xffffffffn, true], + [-0x10000000000000001n, 0xffffffffn, true], + [-0x10000000000000000n, 0xffffffffn, true], + [-0xffffffffffffffffn, 0xffffffffn, true], + [-0xfffffffffffffffen, 0xffffffffn, true], + [-0x8000000000000001n, 0xffffffffn, true], + [-0x8000000000000000n, 0xffffffffn, true], + [-0x7fffffffffffffffn, 0xffffffffn, true], + [-0x7ffffffffffffffen, 0xffffffffn, true], + [-0x100000001n, 0xffffffffn, true], + [-0x100000000n, 0xffffffffn, true], + [-0xffffffffn, 0xffffffffn, true], + [-0xfffffffen, 0xffffffffn, true], + [-0x80000001n, 0xffffffffn, true], + [-0x80000000n, 0xffffffffn, true], + [-0x7fffffffn, 0xffffffffn, true], + [-0x7ffffffen, 0xffffffffn, true], + [-2n, 0xffffffffn, true], + [-1n, 0xffffffffn, true], + [0n, 0xffffffffn, true], + [1n, 0xffffffffn, true], + [2n, 0xffffffffn, true], + [0x7ffffffen, 0xffffffffn, true], + [0x7fffffffn, 0xffffffffn, true], + [0x80000000n, 0xffffffffn, true], + [0x80000001n, 0xffffffffn, true], + [0xfffffffen, 0xffffffffn, true], + [0xffffffffn, 0xffffffffn, false], + [0x100000000n, 0xffffffffn, false], + [0x100000001n, 0xffffffffn, false], + [0x7ffffffffffffffen, 0xffffffffn, false], + [0x7fffffffffffffffn, 0xffffffffn, false], + [0x8000000000000000n, 0xffffffffn, false], + [0x8000000000000001n, 0xffffffffn, false], + [0xfffffffffffffffen, 0xffffffffn, false], + [0xffffffffffffffffn, 0xffffffffn, false], + [0x10000000000000000n, 0xffffffffn, false], + [0x10000000000000001n, 0xffffffffn, false], + [0x7ffffffffffffffffffffffen, 0xffffffffn, false], + [0x7fffffffffffffffffffffffn, 0xffffffffn, false], + [0x800000000000000000000000n, 0xffffffffn, false], + [0x800000000000000000000001n, 0xffffffffn, false], + [0xfffffffffffffffffffffffen, 0xffffffffn, false], + [0xffffffffffffffffffffffffn, 0xffffffffn, false], + [0x1000000000000000000000000n, 0xffffffffn, false], + [0x1000000000000000000000001n, 0xffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, 0xffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0xffffffffn, false], + [0x80000000000000000000000000000000n, 0xffffffffn, false], + [0x80000000000000000000000000000001n, 0xffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0xffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0xffffffffn, false], + [0x100000000000000000000000000000000n, 0xffffffffn, false], + [0x100000000000000000000000000000001n, 0xffffffffn, false], + [-0x100000000000000000000000000000001n, 0x100000000n, true], + [-0x100000000000000000000000000000000n, 0x100000000n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x100000000n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x100000000n, true], + [-0x80000000000000000000000000000001n, 0x100000000n, true], + [-0x80000000000000000000000000000000n, 0x100000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x100000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x100000000n, true], + [-0x1000000000000000000000001n, 0x100000000n, true], + [-0x1000000000000000000000000n, 0x100000000n, true], + [-0xffffffffffffffffffffffffn, 0x100000000n, true], + [-0xfffffffffffffffffffffffen, 0x100000000n, true], + [-0x800000000000000000000001n, 0x100000000n, true], + [-0x800000000000000000000000n, 0x100000000n, true], + [-0x7fffffffffffffffffffffffn, 0x100000000n, true], + [-0x7ffffffffffffffffffffffen, 0x100000000n, true], + [-0x10000000000000001n, 0x100000000n, true], + [-0x10000000000000000n, 0x100000000n, true], + [-0xffffffffffffffffn, 0x100000000n, true], + [-0xfffffffffffffffen, 0x100000000n, true], + [-0x8000000000000001n, 0x100000000n, true], + [-0x8000000000000000n, 0x100000000n, true], + [-0x7fffffffffffffffn, 0x100000000n, true], + [-0x7ffffffffffffffen, 0x100000000n, true], + [-0x100000001n, 0x100000000n, true], + [-0x100000000n, 0x100000000n, true], + [-0xffffffffn, 0x100000000n, true], + [-0xfffffffen, 0x100000000n, true], + [-0x80000001n, 0x100000000n, true], + [-0x80000000n, 0x100000000n, true], + [-0x7fffffffn, 0x100000000n, true], + [-0x7ffffffen, 0x100000000n, true], + [-2n, 0x100000000n, true], + [-1n, 0x100000000n, true], + [0n, 0x100000000n, true], + [1n, 0x100000000n, true], + [2n, 0x100000000n, true], + [0x7ffffffen, 0x100000000n, true], + [0x7fffffffn, 0x100000000n, true], + [0x80000000n, 0x100000000n, true], + [0x80000001n, 0x100000000n, true], + [0xfffffffen, 0x100000000n, true], + [0xffffffffn, 0x100000000n, true], + [0x100000000n, 0x100000000n, false], + [0x100000001n, 0x100000000n, false], + [0x7ffffffffffffffen, 0x100000000n, false], + [0x7fffffffffffffffn, 0x100000000n, false], + [0x8000000000000000n, 0x100000000n, false], + [0x8000000000000001n, 0x100000000n, false], + [0xfffffffffffffffen, 0x100000000n, false], + [0xffffffffffffffffn, 0x100000000n, false], + [0x10000000000000000n, 0x100000000n, false], + [0x10000000000000001n, 0x100000000n, false], + [0x7ffffffffffffffffffffffen, 0x100000000n, false], + [0x7fffffffffffffffffffffffn, 0x100000000n, false], + [0x800000000000000000000000n, 0x100000000n, false], + [0x800000000000000000000001n, 0x100000000n, false], + [0xfffffffffffffffffffffffen, 0x100000000n, false], + [0xffffffffffffffffffffffffn, 0x100000000n, false], + [0x1000000000000000000000000n, 0x100000000n, false], + [0x1000000000000000000000001n, 0x100000000n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x100000000n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x100000000n, false], + [0x80000000000000000000000000000000n, 0x100000000n, false], + [0x80000000000000000000000000000001n, 0x100000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x100000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x100000000n, false], + [0x100000000000000000000000000000000n, 0x100000000n, false], + [0x100000000000000000000000000000001n, 0x100000000n, false], + [-0x100000000000000000000000000000001n, 0x100000001n, true], + [-0x100000000000000000000000000000000n, 0x100000001n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x100000001n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x100000001n, true], + [-0x80000000000000000000000000000001n, 0x100000001n, true], + [-0x80000000000000000000000000000000n, 0x100000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x100000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x100000001n, true], + [-0x1000000000000000000000001n, 0x100000001n, true], + [-0x1000000000000000000000000n, 0x100000001n, true], + [-0xffffffffffffffffffffffffn, 0x100000001n, true], + [-0xfffffffffffffffffffffffen, 0x100000001n, true], + [-0x800000000000000000000001n, 0x100000001n, true], + [-0x800000000000000000000000n, 0x100000001n, true], + [-0x7fffffffffffffffffffffffn, 0x100000001n, true], + [-0x7ffffffffffffffffffffffen, 0x100000001n, true], + [-0x10000000000000001n, 0x100000001n, true], + [-0x10000000000000000n, 0x100000001n, true], + [-0xffffffffffffffffn, 0x100000001n, true], + [-0xfffffffffffffffen, 0x100000001n, true], + [-0x8000000000000001n, 0x100000001n, true], + [-0x8000000000000000n, 0x100000001n, true], + [-0x7fffffffffffffffn, 0x100000001n, true], + [-0x7ffffffffffffffen, 0x100000001n, true], + [-0x100000001n, 0x100000001n, true], + [-0x100000000n, 0x100000001n, true], + [-0xffffffffn, 0x100000001n, true], + [-0xfffffffen, 0x100000001n, true], + [-0x80000001n, 0x100000001n, true], + [-0x80000000n, 0x100000001n, true], + [-0x7fffffffn, 0x100000001n, true], + [-0x7ffffffen, 0x100000001n, true], + [-2n, 0x100000001n, true], + [-1n, 0x100000001n, true], + [0n, 0x100000001n, true], + [1n, 0x100000001n, true], + [2n, 0x100000001n, true], + [0x7ffffffen, 0x100000001n, true], + [0x7fffffffn, 0x100000001n, true], + [0x80000000n, 0x100000001n, true], + [0x80000001n, 0x100000001n, true], + [0xfffffffen, 0x100000001n, true], + [0xffffffffn, 0x100000001n, true], + [0x100000000n, 0x100000001n, true], + [0x100000001n, 0x100000001n, false], + [0x7ffffffffffffffen, 0x100000001n, false], + [0x7fffffffffffffffn, 0x100000001n, false], + [0x8000000000000000n, 0x100000001n, false], + [0x8000000000000001n, 0x100000001n, false], + [0xfffffffffffffffen, 0x100000001n, false], + [0xffffffffffffffffn, 0x100000001n, false], + [0x10000000000000000n, 0x100000001n, false], + [0x10000000000000001n, 0x100000001n, false], + [0x7ffffffffffffffffffffffen, 0x100000001n, false], + [0x7fffffffffffffffffffffffn, 0x100000001n, false], + [0x800000000000000000000000n, 0x100000001n, false], + [0x800000000000000000000001n, 0x100000001n, false], + [0xfffffffffffffffffffffffen, 0x100000001n, false], + [0xffffffffffffffffffffffffn, 0x100000001n, false], + [0x1000000000000000000000000n, 0x100000001n, false], + [0x1000000000000000000000001n, 0x100000001n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x100000001n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x100000001n, false], + [0x80000000000000000000000000000000n, 0x100000001n, false], + [0x80000000000000000000000000000001n, 0x100000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x100000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x100000001n, false], + [0x100000000000000000000000000000000n, 0x100000001n, false], + [0x100000000000000000000000000000001n, 0x100000001n, false], + [-0x100000000000000000000000000000001n, -0x100000001n, true], + [-0x100000000000000000000000000000000n, -0x100000001n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x100000001n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x100000001n, true], + [-0x80000000000000000000000000000001n, -0x100000001n, true], + [-0x80000000000000000000000000000000n, -0x100000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x100000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x100000001n, true], + [-0x1000000000000000000000001n, -0x100000001n, true], + [-0x1000000000000000000000000n, -0x100000001n, true], + [-0xffffffffffffffffffffffffn, -0x100000001n, true], + [-0xfffffffffffffffffffffffen, -0x100000001n, true], + [-0x800000000000000000000001n, -0x100000001n, true], + [-0x800000000000000000000000n, -0x100000001n, true], + [-0x7fffffffffffffffffffffffn, -0x100000001n, true], + [-0x7ffffffffffffffffffffffen, -0x100000001n, true], + [-0x10000000000000001n, -0x100000001n, true], + [-0x10000000000000000n, -0x100000001n, true], + [-0xffffffffffffffffn, -0x100000001n, true], + [-0xfffffffffffffffen, -0x100000001n, true], + [-0x8000000000000001n, -0x100000001n, true], + [-0x8000000000000000n, -0x100000001n, true], + [-0x7fffffffffffffffn, -0x100000001n, true], + [-0x7ffffffffffffffen, -0x100000001n, true], + [-0x100000001n, -0x100000001n, false], + [-0x100000000n, -0x100000001n, false], + [-0xffffffffn, -0x100000001n, false], + [-0xfffffffen, -0x100000001n, false], + [-0x80000001n, -0x100000001n, false], + [-0x80000000n, -0x100000001n, false], + [-0x7fffffffn, -0x100000001n, false], + [-0x7ffffffen, -0x100000001n, false], + [-2n, -0x100000001n, false], + [-1n, -0x100000001n, false], + [0n, -0x100000001n, false], + [1n, -0x100000001n, false], + [2n, -0x100000001n, false], + [0x7ffffffen, -0x100000001n, false], + [0x7fffffffn, -0x100000001n, false], + [0x80000000n, -0x100000001n, false], + [0x80000001n, -0x100000001n, false], + [0xfffffffen, -0x100000001n, false], + [0xffffffffn, -0x100000001n, false], + [0x100000000n, -0x100000001n, false], + [0x100000001n, -0x100000001n, false], + [0x7ffffffffffffffen, -0x100000001n, false], + [0x7fffffffffffffffn, -0x100000001n, false], + [0x8000000000000000n, -0x100000001n, false], + [0x8000000000000001n, -0x100000001n, false], + [0xfffffffffffffffen, -0x100000001n, false], + [0xffffffffffffffffn, -0x100000001n, false], + [0x10000000000000000n, -0x100000001n, false], + [0x10000000000000001n, -0x100000001n, false], + [0x7ffffffffffffffffffffffen, -0x100000001n, false], + [0x7fffffffffffffffffffffffn, -0x100000001n, false], + [0x800000000000000000000000n, -0x100000001n, false], + [0x800000000000000000000001n, -0x100000001n, false], + [0xfffffffffffffffffffffffen, -0x100000001n, false], + [0xffffffffffffffffffffffffn, -0x100000001n, false], + [0x1000000000000000000000000n, -0x100000001n, false], + [0x1000000000000000000000001n, -0x100000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x100000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x100000001n, false], + [0x80000000000000000000000000000000n, -0x100000001n, false], + [0x80000000000000000000000000000001n, -0x100000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x100000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x100000001n, false], + [0x100000000000000000000000000000000n, -0x100000001n, false], + [0x100000000000000000000000000000001n, -0x100000001n, false], + [-0x100000000000000000000000000000001n, -0x100000000n, true], + [-0x100000000000000000000000000000000n, -0x100000000n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x100000000n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x100000000n, true], + [-0x80000000000000000000000000000001n, -0x100000000n, true], + [-0x80000000000000000000000000000000n, -0x100000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x100000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x100000000n, true], + [-0x1000000000000000000000001n, -0x100000000n, true], + [-0x1000000000000000000000000n, -0x100000000n, true], + [-0xffffffffffffffffffffffffn, -0x100000000n, true], + [-0xfffffffffffffffffffffffen, -0x100000000n, true], + [-0x800000000000000000000001n, -0x100000000n, true], + [-0x800000000000000000000000n, -0x100000000n, true], + [-0x7fffffffffffffffffffffffn, -0x100000000n, true], + [-0x7ffffffffffffffffffffffen, -0x100000000n, true], + [-0x10000000000000001n, -0x100000000n, true], + [-0x10000000000000000n, -0x100000000n, true], + [-0xffffffffffffffffn, -0x100000000n, true], + [-0xfffffffffffffffen, -0x100000000n, true], + [-0x8000000000000001n, -0x100000000n, true], + [-0x8000000000000000n, -0x100000000n, true], + [-0x7fffffffffffffffn, -0x100000000n, true], + [-0x7ffffffffffffffen, -0x100000000n, true], + [-0x100000001n, -0x100000000n, true], + [-0x100000000n, -0x100000000n, false], + [-0xffffffffn, -0x100000000n, false], + [-0xfffffffen, -0x100000000n, false], + [-0x80000001n, -0x100000000n, false], + [-0x80000000n, -0x100000000n, false], + [-0x7fffffffn, -0x100000000n, false], + [-0x7ffffffen, -0x100000000n, false], + [-2n, -0x100000000n, false], + [-1n, -0x100000000n, false], + [0n, -0x100000000n, false], + [1n, -0x100000000n, false], + [2n, -0x100000000n, false], + [0x7ffffffen, -0x100000000n, false], + [0x7fffffffn, -0x100000000n, false], + [0x80000000n, -0x100000000n, false], + [0x80000001n, -0x100000000n, false], + [0xfffffffen, -0x100000000n, false], + [0xffffffffn, -0x100000000n, false], + [0x100000000n, -0x100000000n, false], + [0x100000001n, -0x100000000n, false], + [0x7ffffffffffffffen, -0x100000000n, false], + [0x7fffffffffffffffn, -0x100000000n, false], + [0x8000000000000000n, -0x100000000n, false], + [0x8000000000000001n, -0x100000000n, false], + [0xfffffffffffffffen, -0x100000000n, false], + [0xffffffffffffffffn, -0x100000000n, false], + [0x10000000000000000n, -0x100000000n, false], + [0x10000000000000001n, -0x100000000n, false], + [0x7ffffffffffffffffffffffen, -0x100000000n, false], + [0x7fffffffffffffffffffffffn, -0x100000000n, false], + [0x800000000000000000000000n, -0x100000000n, false], + [0x800000000000000000000001n, -0x100000000n, false], + [0xfffffffffffffffffffffffen, -0x100000000n, false], + [0xffffffffffffffffffffffffn, -0x100000000n, false], + [0x1000000000000000000000000n, -0x100000000n, false], + [0x1000000000000000000000001n, -0x100000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x100000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x100000000n, false], + [0x80000000000000000000000000000000n, -0x100000000n, false], + [0x80000000000000000000000000000001n, -0x100000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x100000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x100000000n, false], + [0x100000000000000000000000000000000n, -0x100000000n, false], + [0x100000000000000000000000000000001n, -0x100000000n, false], + [-0x100000000000000000000000000000001n, -0xffffffffn, true], + [-0x100000000000000000000000000000000n, -0xffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, -0xffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, -0xffffffffn, true], + [-0x80000000000000000000000000000001n, -0xffffffffn, true], + [-0x80000000000000000000000000000000n, -0xffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, -0xffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, -0xffffffffn, true], + [-0x1000000000000000000000001n, -0xffffffffn, true], + [-0x1000000000000000000000000n, -0xffffffffn, true], + [-0xffffffffffffffffffffffffn, -0xffffffffn, true], + [-0xfffffffffffffffffffffffen, -0xffffffffn, true], + [-0x800000000000000000000001n, -0xffffffffn, true], + [-0x800000000000000000000000n, -0xffffffffn, true], + [-0x7fffffffffffffffffffffffn, -0xffffffffn, true], + [-0x7ffffffffffffffffffffffen, -0xffffffffn, true], + [-0x10000000000000001n, -0xffffffffn, true], + [-0x10000000000000000n, -0xffffffffn, true], + [-0xffffffffffffffffn, -0xffffffffn, true], + [-0xfffffffffffffffen, -0xffffffffn, true], + [-0x8000000000000001n, -0xffffffffn, true], + [-0x8000000000000000n, -0xffffffffn, true], + [-0x7fffffffffffffffn, -0xffffffffn, true], + [-0x7ffffffffffffffen, -0xffffffffn, true], + [-0x100000001n, -0xffffffffn, true], + [-0x100000000n, -0xffffffffn, true], + [-0xffffffffn, -0xffffffffn, false], + [-0xfffffffen, -0xffffffffn, false], + [-0x80000001n, -0xffffffffn, false], + [-0x80000000n, -0xffffffffn, false], + [-0x7fffffffn, -0xffffffffn, false], + [-0x7ffffffen, -0xffffffffn, false], + [-2n, -0xffffffffn, false], + [-1n, -0xffffffffn, false], + [0n, -0xffffffffn, false], + [1n, -0xffffffffn, false], + [2n, -0xffffffffn, false], + [0x7ffffffen, -0xffffffffn, false], + [0x7fffffffn, -0xffffffffn, false], + [0x80000000n, -0xffffffffn, false], + [0x80000001n, -0xffffffffn, false], + [0xfffffffen, -0xffffffffn, false], + [0xffffffffn, -0xffffffffn, false], + [0x100000000n, -0xffffffffn, false], + [0x100000001n, -0xffffffffn, false], + [0x7ffffffffffffffen, -0xffffffffn, false], + [0x7fffffffffffffffn, -0xffffffffn, false], + [0x8000000000000000n, -0xffffffffn, false], + [0x8000000000000001n, -0xffffffffn, false], + [0xfffffffffffffffen, -0xffffffffn, false], + [0xffffffffffffffffn, -0xffffffffn, false], + [0x10000000000000000n, -0xffffffffn, false], + [0x10000000000000001n, -0xffffffffn, false], + [0x7ffffffffffffffffffffffen, -0xffffffffn, false], + [0x7fffffffffffffffffffffffn, -0xffffffffn, false], + [0x800000000000000000000000n, -0xffffffffn, false], + [0x800000000000000000000001n, -0xffffffffn, false], + [0xfffffffffffffffffffffffen, -0xffffffffn, false], + [0xffffffffffffffffffffffffn, -0xffffffffn, false], + [0x1000000000000000000000000n, -0xffffffffn, false], + [0x1000000000000000000000001n, -0xffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0xffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0xffffffffn, false], + [0x80000000000000000000000000000000n, -0xffffffffn, false], + [0x80000000000000000000000000000001n, -0xffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0xffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0xffffffffn, false], + [0x100000000000000000000000000000000n, -0xffffffffn, false], + [0x100000000000000000000000000000001n, -0xffffffffn, false], + [-0x100000000000000000000000000000001n, -0xfffffffen, true], + [-0x100000000000000000000000000000000n, -0xfffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, -0xfffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, -0xfffffffen, true], + [-0x80000000000000000000000000000001n, -0xfffffffen, true], + [-0x80000000000000000000000000000000n, -0xfffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, -0xfffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, -0xfffffffen, true], + [-0x1000000000000000000000001n, -0xfffffffen, true], + [-0x1000000000000000000000000n, -0xfffffffen, true], + [-0xffffffffffffffffffffffffn, -0xfffffffen, true], + [-0xfffffffffffffffffffffffen, -0xfffffffen, true], + [-0x800000000000000000000001n, -0xfffffffen, true], + [-0x800000000000000000000000n, -0xfffffffen, true], + [-0x7fffffffffffffffffffffffn, -0xfffffffen, true], + [-0x7ffffffffffffffffffffffen, -0xfffffffen, true], + [-0x10000000000000001n, -0xfffffffen, true], + [-0x10000000000000000n, -0xfffffffen, true], + [-0xffffffffffffffffn, -0xfffffffen, true], + [-0xfffffffffffffffen, -0xfffffffen, true], + [-0x8000000000000001n, -0xfffffffen, true], + [-0x8000000000000000n, -0xfffffffen, true], + [-0x7fffffffffffffffn, -0xfffffffen, true], + [-0x7ffffffffffffffen, -0xfffffffen, true], + [-0x100000001n, -0xfffffffen, true], + [-0x100000000n, -0xfffffffen, true], + [-0xffffffffn, -0xfffffffen, true], + [-0xfffffffen, -0xfffffffen, false], + [-0x80000001n, -0xfffffffen, false], + [-0x80000000n, -0xfffffffen, false], + [-0x7fffffffn, -0xfffffffen, false], + [-0x7ffffffen, -0xfffffffen, false], + [-2n, -0xfffffffen, false], + [-1n, -0xfffffffen, false], + [0n, -0xfffffffen, false], + [1n, -0xfffffffen, false], + [2n, -0xfffffffen, false], + [0x7ffffffen, -0xfffffffen, false], + [0x7fffffffn, -0xfffffffen, false], + [0x80000000n, -0xfffffffen, false], + [0x80000001n, -0xfffffffen, false], + [0xfffffffen, -0xfffffffen, false], + [0xffffffffn, -0xfffffffen, false], + [0x100000000n, -0xfffffffen, false], + [0x100000001n, -0xfffffffen, false], + [0x7ffffffffffffffen, -0xfffffffen, false], + [0x7fffffffffffffffn, -0xfffffffen, false], + [0x8000000000000000n, -0xfffffffen, false], + [0x8000000000000001n, -0xfffffffen, false], + [0xfffffffffffffffen, -0xfffffffen, false], + [0xffffffffffffffffn, -0xfffffffen, false], + [0x10000000000000000n, -0xfffffffen, false], + [0x10000000000000001n, -0xfffffffen, false], + [0x7ffffffffffffffffffffffen, -0xfffffffen, false], + [0x7fffffffffffffffffffffffn, -0xfffffffen, false], + [0x800000000000000000000000n, -0xfffffffen, false], + [0x800000000000000000000001n, -0xfffffffen, false], + [0xfffffffffffffffffffffffen, -0xfffffffen, false], + [0xffffffffffffffffffffffffn, -0xfffffffen, false], + [0x1000000000000000000000000n, -0xfffffffen, false], + [0x1000000000000000000000001n, -0xfffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0xfffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0xfffffffen, false], + [0x80000000000000000000000000000000n, -0xfffffffen, false], + [0x80000000000000000000000000000001n, -0xfffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0xfffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0xfffffffen, false], + [0x100000000000000000000000000000000n, -0xfffffffen, false], + [0x100000000000000000000000000000001n, -0xfffffffen, false], + [-0x100000000000000000000000000000001n, 0x7ffffffffffffffen, true], + [-0x100000000000000000000000000000000n, 0x7ffffffffffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, 0x7ffffffffffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, 0x7ffffffffffffffen, true], + [-0x80000000000000000000000000000001n, 0x7ffffffffffffffen, true], + [-0x80000000000000000000000000000000n, 0x7ffffffffffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x7ffffffffffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x7ffffffffffffffen, true], + [-0x1000000000000000000000001n, 0x7ffffffffffffffen, true], + [-0x1000000000000000000000000n, 0x7ffffffffffffffen, true], + [-0xffffffffffffffffffffffffn, 0x7ffffffffffffffen, true], + [-0xfffffffffffffffffffffffen, 0x7ffffffffffffffen, true], + [-0x800000000000000000000001n, 0x7ffffffffffffffen, true], + [-0x800000000000000000000000n, 0x7ffffffffffffffen, true], + [-0x7fffffffffffffffffffffffn, 0x7ffffffffffffffen, true], + [-0x7ffffffffffffffffffffffen, 0x7ffffffffffffffen, true], + [-0x10000000000000001n, 0x7ffffffffffffffen, true], + [-0x10000000000000000n, 0x7ffffffffffffffen, true], + [-0xffffffffffffffffn, 0x7ffffffffffffffen, true], + [-0xfffffffffffffffen, 0x7ffffffffffffffen, true], + [-0x8000000000000001n, 0x7ffffffffffffffen, true], + [-0x8000000000000000n, 0x7ffffffffffffffen, true], + [-0x7fffffffffffffffn, 0x7ffffffffffffffen, true], + [-0x7ffffffffffffffen, 0x7ffffffffffffffen, true], + [-0x100000001n, 0x7ffffffffffffffen, true], + [-0x100000000n, 0x7ffffffffffffffen, true], + [-0xffffffffn, 0x7ffffffffffffffen, true], + [-0xfffffffen, 0x7ffffffffffffffen, true], + [-0x80000001n, 0x7ffffffffffffffen, true], + [-0x80000000n, 0x7ffffffffffffffen, true], + [-0x7fffffffn, 0x7ffffffffffffffen, true], + [-0x7ffffffen, 0x7ffffffffffffffen, true], + [-2n, 0x7ffffffffffffffen, true], + [-1n, 0x7ffffffffffffffen, true], + [0n, 0x7ffffffffffffffen, true], + [1n, 0x7ffffffffffffffen, true], + [2n, 0x7ffffffffffffffen, true], + [0x7ffffffen, 0x7ffffffffffffffen, true], + [0x7fffffffn, 0x7ffffffffffffffen, true], + [0x80000000n, 0x7ffffffffffffffen, true], + [0x80000001n, 0x7ffffffffffffffen, true], + [0xfffffffen, 0x7ffffffffffffffen, true], + [0xffffffffn, 0x7ffffffffffffffen, true], + [0x100000000n, 0x7ffffffffffffffen, true], + [0x100000001n, 0x7ffffffffffffffen, true], + [0x7ffffffffffffffen, 0x7ffffffffffffffen, false], + [0x7fffffffffffffffn, 0x7ffffffffffffffen, false], + [0x8000000000000000n, 0x7ffffffffffffffen, false], + [0x8000000000000001n, 0x7ffffffffffffffen, false], + [0xfffffffffffffffen, 0x7ffffffffffffffen, false], + [0xffffffffffffffffn, 0x7ffffffffffffffen, false], + [0x10000000000000000n, 0x7ffffffffffffffen, false], + [0x10000000000000001n, 0x7ffffffffffffffen, false], + [0x7ffffffffffffffffffffffen, 0x7ffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, 0x7ffffffffffffffen, false], + [0x800000000000000000000000n, 0x7ffffffffffffffen, false], + [0x800000000000000000000001n, 0x7ffffffffffffffen, false], + [0xfffffffffffffffffffffffen, 0x7ffffffffffffffen, false], + [0xffffffffffffffffffffffffn, 0x7ffffffffffffffen, false], + [0x1000000000000000000000000n, 0x7ffffffffffffffen, false], + [0x1000000000000000000000001n, 0x7ffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7ffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7ffffffffffffffen, false], + [0x80000000000000000000000000000000n, 0x7ffffffffffffffen, false], + [0x80000000000000000000000000000001n, 0x7ffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0x7ffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0x7ffffffffffffffen, false], + [0x100000000000000000000000000000000n, 0x7ffffffffffffffen, false], + [0x100000000000000000000000000000001n, 0x7ffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0x7fffffffffffffffn, true], + [-0x100000000000000000000000000000000n, 0x7fffffffffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, 0x7fffffffffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, 0x7fffffffffffffffn, true], + [-0x80000000000000000000000000000001n, 0x7fffffffffffffffn, true], + [-0x80000000000000000000000000000000n, 0x7fffffffffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x7fffffffffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x7fffffffffffffffn, true], + [-0x1000000000000000000000001n, 0x7fffffffffffffffn, true], + [-0x1000000000000000000000000n, 0x7fffffffffffffffn, true], + [-0xffffffffffffffffffffffffn, 0x7fffffffffffffffn, true], + [-0xfffffffffffffffffffffffen, 0x7fffffffffffffffn, true], + [-0x800000000000000000000001n, 0x7fffffffffffffffn, true], + [-0x800000000000000000000000n, 0x7fffffffffffffffn, true], + [-0x7fffffffffffffffffffffffn, 0x7fffffffffffffffn, true], + [-0x7ffffffffffffffffffffffen, 0x7fffffffffffffffn, true], + [-0x10000000000000001n, 0x7fffffffffffffffn, true], + [-0x10000000000000000n, 0x7fffffffffffffffn, true], + [-0xffffffffffffffffn, 0x7fffffffffffffffn, true], + [-0xfffffffffffffffen, 0x7fffffffffffffffn, true], + [-0x8000000000000001n, 0x7fffffffffffffffn, true], + [-0x8000000000000000n, 0x7fffffffffffffffn, true], + [-0x7fffffffffffffffn, 0x7fffffffffffffffn, true], + [-0x7ffffffffffffffen, 0x7fffffffffffffffn, true], + [-0x100000001n, 0x7fffffffffffffffn, true], + [-0x100000000n, 0x7fffffffffffffffn, true], + [-0xffffffffn, 0x7fffffffffffffffn, true], + [-0xfffffffen, 0x7fffffffffffffffn, true], + [-0x80000001n, 0x7fffffffffffffffn, true], + [-0x80000000n, 0x7fffffffffffffffn, true], + [-0x7fffffffn, 0x7fffffffffffffffn, true], + [-0x7ffffffen, 0x7fffffffffffffffn, true], + [-2n, 0x7fffffffffffffffn, true], + [-1n, 0x7fffffffffffffffn, true], + [0n, 0x7fffffffffffffffn, true], + [1n, 0x7fffffffffffffffn, true], + [2n, 0x7fffffffffffffffn, true], + [0x7ffffffen, 0x7fffffffffffffffn, true], + [0x7fffffffn, 0x7fffffffffffffffn, true], + [0x80000000n, 0x7fffffffffffffffn, true], + [0x80000001n, 0x7fffffffffffffffn, true], + [0xfffffffen, 0x7fffffffffffffffn, true], + [0xffffffffn, 0x7fffffffffffffffn, true], + [0x100000000n, 0x7fffffffffffffffn, true], + [0x100000001n, 0x7fffffffffffffffn, true], + [0x7ffffffffffffffen, 0x7fffffffffffffffn, true], + [0x7fffffffffffffffn, 0x7fffffffffffffffn, false], + [0x8000000000000000n, 0x7fffffffffffffffn, false], + [0x8000000000000001n, 0x7fffffffffffffffn, false], + [0xfffffffffffffffen, 0x7fffffffffffffffn, false], + [0xffffffffffffffffn, 0x7fffffffffffffffn, false], + [0x10000000000000000n, 0x7fffffffffffffffn, false], + [0x10000000000000001n, 0x7fffffffffffffffn, false], + [0x7ffffffffffffffffffffffen, 0x7fffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, 0x7fffffffffffffffn, false], + [0x800000000000000000000000n, 0x7fffffffffffffffn, false], + [0x800000000000000000000001n, 0x7fffffffffffffffn, false], + [0xfffffffffffffffffffffffen, 0x7fffffffffffffffn, false], + [0xffffffffffffffffffffffffn, 0x7fffffffffffffffn, false], + [0x1000000000000000000000000n, 0x7fffffffffffffffn, false], + [0x1000000000000000000000001n, 0x7fffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7fffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7fffffffffffffffn, false], + [0x80000000000000000000000000000000n, 0x7fffffffffffffffn, false], + [0x80000000000000000000000000000001n, 0x7fffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0x7fffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0x7fffffffffffffffn, false], + [0x100000000000000000000000000000000n, 0x7fffffffffffffffn, false], + [0x100000000000000000000000000000001n, 0x7fffffffffffffffn, false], + [-0x100000000000000000000000000000001n, 0x8000000000000000n, true], + [-0x100000000000000000000000000000000n, 0x8000000000000000n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x8000000000000000n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x8000000000000000n, true], + [-0x80000000000000000000000000000001n, 0x8000000000000000n, true], + [-0x80000000000000000000000000000000n, 0x8000000000000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x8000000000000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x8000000000000000n, true], + [-0x1000000000000000000000001n, 0x8000000000000000n, true], + [-0x1000000000000000000000000n, 0x8000000000000000n, true], + [-0xffffffffffffffffffffffffn, 0x8000000000000000n, true], + [-0xfffffffffffffffffffffffen, 0x8000000000000000n, true], + [-0x800000000000000000000001n, 0x8000000000000000n, true], + [-0x800000000000000000000000n, 0x8000000000000000n, true], + [-0x7fffffffffffffffffffffffn, 0x8000000000000000n, true], + [-0x7ffffffffffffffffffffffen, 0x8000000000000000n, true], + [-0x10000000000000001n, 0x8000000000000000n, true], + [-0x10000000000000000n, 0x8000000000000000n, true], + [-0xffffffffffffffffn, 0x8000000000000000n, true], + [-0xfffffffffffffffen, 0x8000000000000000n, true], + [-0x8000000000000001n, 0x8000000000000000n, true], + [-0x8000000000000000n, 0x8000000000000000n, true], + [-0x7fffffffffffffffn, 0x8000000000000000n, true], + [-0x7ffffffffffffffen, 0x8000000000000000n, true], + [-0x100000001n, 0x8000000000000000n, true], + [-0x100000000n, 0x8000000000000000n, true], + [-0xffffffffn, 0x8000000000000000n, true], + [-0xfffffffen, 0x8000000000000000n, true], + [-0x80000001n, 0x8000000000000000n, true], + [-0x80000000n, 0x8000000000000000n, true], + [-0x7fffffffn, 0x8000000000000000n, true], + [-0x7ffffffen, 0x8000000000000000n, true], + [-2n, 0x8000000000000000n, true], + [-1n, 0x8000000000000000n, true], + [0n, 0x8000000000000000n, true], + [1n, 0x8000000000000000n, true], + [2n, 0x8000000000000000n, true], + [0x7ffffffen, 0x8000000000000000n, true], + [0x7fffffffn, 0x8000000000000000n, true], + [0x80000000n, 0x8000000000000000n, true], + [0x80000001n, 0x8000000000000000n, true], + [0xfffffffen, 0x8000000000000000n, true], + [0xffffffffn, 0x8000000000000000n, true], + [0x100000000n, 0x8000000000000000n, true], + [0x100000001n, 0x8000000000000000n, true], + [0x7ffffffffffffffen, 0x8000000000000000n, true], + [0x7fffffffffffffffn, 0x8000000000000000n, true], + [0x8000000000000000n, 0x8000000000000000n, false], + [0x8000000000000001n, 0x8000000000000000n, false], + [0xfffffffffffffffen, 0x8000000000000000n, false], + [0xffffffffffffffffn, 0x8000000000000000n, false], + [0x10000000000000000n, 0x8000000000000000n, false], + [0x10000000000000001n, 0x8000000000000000n, false], + [0x7ffffffffffffffffffffffen, 0x8000000000000000n, false], + [0x7fffffffffffffffffffffffn, 0x8000000000000000n, false], + [0x800000000000000000000000n, 0x8000000000000000n, false], + [0x800000000000000000000001n, 0x8000000000000000n, false], + [0xfffffffffffffffffffffffen, 0x8000000000000000n, false], + [0xffffffffffffffffffffffffn, 0x8000000000000000n, false], + [0x1000000000000000000000000n, 0x8000000000000000n, false], + [0x1000000000000000000000001n, 0x8000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x8000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x8000000000000000n, false], + [0x80000000000000000000000000000000n, 0x8000000000000000n, false], + [0x80000000000000000000000000000001n, 0x8000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x8000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x8000000000000000n, false], + [0x100000000000000000000000000000000n, 0x8000000000000000n, false], + [0x100000000000000000000000000000001n, 0x8000000000000000n, false], + [-0x100000000000000000000000000000001n, 0x8000000000000001n, true], + [-0x100000000000000000000000000000000n, 0x8000000000000001n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x8000000000000001n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x8000000000000001n, true], + [-0x80000000000000000000000000000001n, 0x8000000000000001n, true], + [-0x80000000000000000000000000000000n, 0x8000000000000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x8000000000000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x8000000000000001n, true], + [-0x1000000000000000000000001n, 0x8000000000000001n, true], + [-0x1000000000000000000000000n, 0x8000000000000001n, true], + [-0xffffffffffffffffffffffffn, 0x8000000000000001n, true], + [-0xfffffffffffffffffffffffen, 0x8000000000000001n, true], + [-0x800000000000000000000001n, 0x8000000000000001n, true], + [-0x800000000000000000000000n, 0x8000000000000001n, true], + [-0x7fffffffffffffffffffffffn, 0x8000000000000001n, true], + [-0x7ffffffffffffffffffffffen, 0x8000000000000001n, true], + [-0x10000000000000001n, 0x8000000000000001n, true], + [-0x10000000000000000n, 0x8000000000000001n, true], + [-0xffffffffffffffffn, 0x8000000000000001n, true], + [-0xfffffffffffffffen, 0x8000000000000001n, true], + [-0x8000000000000001n, 0x8000000000000001n, true], + [-0x8000000000000000n, 0x8000000000000001n, true], + [-0x7fffffffffffffffn, 0x8000000000000001n, true], + [-0x7ffffffffffffffen, 0x8000000000000001n, true], + [-0x100000001n, 0x8000000000000001n, true], + [-0x100000000n, 0x8000000000000001n, true], + [-0xffffffffn, 0x8000000000000001n, true], + [-0xfffffffen, 0x8000000000000001n, true], + [-0x80000001n, 0x8000000000000001n, true], + [-0x80000000n, 0x8000000000000001n, true], + [-0x7fffffffn, 0x8000000000000001n, true], + [-0x7ffffffen, 0x8000000000000001n, true], + [-2n, 0x8000000000000001n, true], + [-1n, 0x8000000000000001n, true], + [0n, 0x8000000000000001n, true], + [1n, 0x8000000000000001n, true], + [2n, 0x8000000000000001n, true], + [0x7ffffffen, 0x8000000000000001n, true], + [0x7fffffffn, 0x8000000000000001n, true], + [0x80000000n, 0x8000000000000001n, true], + [0x80000001n, 0x8000000000000001n, true], + [0xfffffffen, 0x8000000000000001n, true], + [0xffffffffn, 0x8000000000000001n, true], + [0x100000000n, 0x8000000000000001n, true], + [0x100000001n, 0x8000000000000001n, true], + [0x7ffffffffffffffen, 0x8000000000000001n, true], + [0x7fffffffffffffffn, 0x8000000000000001n, true], + [0x8000000000000000n, 0x8000000000000001n, true], + [0x8000000000000001n, 0x8000000000000001n, false], + [0xfffffffffffffffen, 0x8000000000000001n, false], + [0xffffffffffffffffn, 0x8000000000000001n, false], + [0x10000000000000000n, 0x8000000000000001n, false], + [0x10000000000000001n, 0x8000000000000001n, false], + [0x7ffffffffffffffffffffffen, 0x8000000000000001n, false], + [0x7fffffffffffffffffffffffn, 0x8000000000000001n, false], + [0x800000000000000000000000n, 0x8000000000000001n, false], + [0x800000000000000000000001n, 0x8000000000000001n, false], + [0xfffffffffffffffffffffffen, 0x8000000000000001n, false], + [0xffffffffffffffffffffffffn, 0x8000000000000001n, false], + [0x1000000000000000000000000n, 0x8000000000000001n, false], + [0x1000000000000000000000001n, 0x8000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x8000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x8000000000000001n, false], + [0x80000000000000000000000000000000n, 0x8000000000000001n, false], + [0x80000000000000000000000000000001n, 0x8000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x8000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x8000000000000001n, false], + [0x100000000000000000000000000000000n, 0x8000000000000001n, false], + [0x100000000000000000000000000000001n, 0x8000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x8000000000000001n, true], + [-0x100000000000000000000000000000000n, -0x8000000000000001n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x8000000000000001n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x8000000000000001n, true], + [-0x80000000000000000000000000000001n, -0x8000000000000001n, true], + [-0x80000000000000000000000000000000n, -0x8000000000000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x8000000000000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x8000000000000001n, true], + [-0x1000000000000000000000001n, -0x8000000000000001n, true], + [-0x1000000000000000000000000n, -0x8000000000000001n, true], + [-0xffffffffffffffffffffffffn, -0x8000000000000001n, true], + [-0xfffffffffffffffffffffffen, -0x8000000000000001n, true], + [-0x800000000000000000000001n, -0x8000000000000001n, true], + [-0x800000000000000000000000n, -0x8000000000000001n, true], + [-0x7fffffffffffffffffffffffn, -0x8000000000000001n, true], + [-0x7ffffffffffffffffffffffen, -0x8000000000000001n, true], + [-0x10000000000000001n, -0x8000000000000001n, true], + [-0x10000000000000000n, -0x8000000000000001n, true], + [-0xffffffffffffffffn, -0x8000000000000001n, true], + [-0xfffffffffffffffen, -0x8000000000000001n, true], + [-0x8000000000000001n, -0x8000000000000001n, false], + [-0x8000000000000000n, -0x8000000000000001n, false], + [-0x7fffffffffffffffn, -0x8000000000000001n, false], + [-0x7ffffffffffffffen, -0x8000000000000001n, false], + [-0x100000001n, -0x8000000000000001n, false], + [-0x100000000n, -0x8000000000000001n, false], + [-0xffffffffn, -0x8000000000000001n, false], + [-0xfffffffen, -0x8000000000000001n, false], + [-0x80000001n, -0x8000000000000001n, false], + [-0x80000000n, -0x8000000000000001n, false], + [-0x7fffffffn, -0x8000000000000001n, false], + [-0x7ffffffen, -0x8000000000000001n, false], + [-2n, -0x8000000000000001n, false], + [-1n, -0x8000000000000001n, false], + [0n, -0x8000000000000001n, false], + [1n, -0x8000000000000001n, false], + [2n, -0x8000000000000001n, false], + [0x7ffffffen, -0x8000000000000001n, false], + [0x7fffffffn, -0x8000000000000001n, false], + [0x80000000n, -0x8000000000000001n, false], + [0x80000001n, -0x8000000000000001n, false], + [0xfffffffen, -0x8000000000000001n, false], + [0xffffffffn, -0x8000000000000001n, false], + [0x100000000n, -0x8000000000000001n, false], + [0x100000001n, -0x8000000000000001n, false], + [0x7ffffffffffffffen, -0x8000000000000001n, false], + [0x7fffffffffffffffn, -0x8000000000000001n, false], + [0x8000000000000000n, -0x8000000000000001n, false], + [0x8000000000000001n, -0x8000000000000001n, false], + [0xfffffffffffffffen, -0x8000000000000001n, false], + [0xffffffffffffffffn, -0x8000000000000001n, false], + [0x10000000000000000n, -0x8000000000000001n, false], + [0x10000000000000001n, -0x8000000000000001n, false], + [0x7ffffffffffffffffffffffen, -0x8000000000000001n, false], + [0x7fffffffffffffffffffffffn, -0x8000000000000001n, false], + [0x800000000000000000000000n, -0x8000000000000001n, false], + [0x800000000000000000000001n, -0x8000000000000001n, false], + [0xfffffffffffffffffffffffen, -0x8000000000000001n, false], + [0xffffffffffffffffffffffffn, -0x8000000000000001n, false], + [0x1000000000000000000000000n, -0x8000000000000001n, false], + [0x1000000000000000000000001n, -0x8000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x8000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x8000000000000001n, false], + [0x80000000000000000000000000000000n, -0x8000000000000001n, false], + [0x80000000000000000000000000000001n, -0x8000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x8000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x8000000000000001n, false], + [0x100000000000000000000000000000000n, -0x8000000000000001n, false], + [0x100000000000000000000000000000001n, -0x8000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x8000000000000000n, true], + [-0x100000000000000000000000000000000n, -0x8000000000000000n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x8000000000000000n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x8000000000000000n, true], + [-0x80000000000000000000000000000001n, -0x8000000000000000n, true], + [-0x80000000000000000000000000000000n, -0x8000000000000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x8000000000000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x8000000000000000n, true], + [-0x1000000000000000000000001n, -0x8000000000000000n, true], + [-0x1000000000000000000000000n, -0x8000000000000000n, true], + [-0xffffffffffffffffffffffffn, -0x8000000000000000n, true], + [-0xfffffffffffffffffffffffen, -0x8000000000000000n, true], + [-0x800000000000000000000001n, -0x8000000000000000n, true], + [-0x800000000000000000000000n, -0x8000000000000000n, true], + [-0x7fffffffffffffffffffffffn, -0x8000000000000000n, true], + [-0x7ffffffffffffffffffffffen, -0x8000000000000000n, true], + [-0x10000000000000001n, -0x8000000000000000n, true], + [-0x10000000000000000n, -0x8000000000000000n, true], + [-0xffffffffffffffffn, -0x8000000000000000n, true], + [-0xfffffffffffffffen, -0x8000000000000000n, true], + [-0x8000000000000001n, -0x8000000000000000n, true], + [-0x8000000000000000n, -0x8000000000000000n, false], + [-0x7fffffffffffffffn, -0x8000000000000000n, false], + [-0x7ffffffffffffffen, -0x8000000000000000n, false], + [-0x100000001n, -0x8000000000000000n, false], + [-0x100000000n, -0x8000000000000000n, false], + [-0xffffffffn, -0x8000000000000000n, false], + [-0xfffffffen, -0x8000000000000000n, false], + [-0x80000001n, -0x8000000000000000n, false], + [-0x80000000n, -0x8000000000000000n, false], + [-0x7fffffffn, -0x8000000000000000n, false], + [-0x7ffffffen, -0x8000000000000000n, false], + [-2n, -0x8000000000000000n, false], + [-1n, -0x8000000000000000n, false], + [0n, -0x8000000000000000n, false], + [1n, -0x8000000000000000n, false], + [2n, -0x8000000000000000n, false], + [0x7ffffffen, -0x8000000000000000n, false], + [0x7fffffffn, -0x8000000000000000n, false], + [0x80000000n, -0x8000000000000000n, false], + [0x80000001n, -0x8000000000000000n, false], + [0xfffffffen, -0x8000000000000000n, false], + [0xffffffffn, -0x8000000000000000n, false], + [0x100000000n, -0x8000000000000000n, false], + [0x100000001n, -0x8000000000000000n, false], + [0x7ffffffffffffffen, -0x8000000000000000n, false], + [0x7fffffffffffffffn, -0x8000000000000000n, false], + [0x8000000000000000n, -0x8000000000000000n, false], + [0x8000000000000001n, -0x8000000000000000n, false], + [0xfffffffffffffffen, -0x8000000000000000n, false], + [0xffffffffffffffffn, -0x8000000000000000n, false], + [0x10000000000000000n, -0x8000000000000000n, false], + [0x10000000000000001n, -0x8000000000000000n, false], + [0x7ffffffffffffffffffffffen, -0x8000000000000000n, false], + [0x7fffffffffffffffffffffffn, -0x8000000000000000n, false], + [0x800000000000000000000000n, -0x8000000000000000n, false], + [0x800000000000000000000001n, -0x8000000000000000n, false], + [0xfffffffffffffffffffffffen, -0x8000000000000000n, false], + [0xffffffffffffffffffffffffn, -0x8000000000000000n, false], + [0x1000000000000000000000000n, -0x8000000000000000n, false], + [0x1000000000000000000000001n, -0x8000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x8000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x8000000000000000n, false], + [0x80000000000000000000000000000000n, -0x8000000000000000n, false], + [0x80000000000000000000000000000001n, -0x8000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x8000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x8000000000000000n, false], + [0x100000000000000000000000000000000n, -0x8000000000000000n, false], + [0x100000000000000000000000000000001n, -0x8000000000000000n, false], + [-0x100000000000000000000000000000001n, -0x7fffffffffffffffn, true], + [-0x100000000000000000000000000000000n, -0x7fffffffffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, -0x7fffffffffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, -0x7fffffffffffffffn, true], + [-0x80000000000000000000000000000001n, -0x7fffffffffffffffn, true], + [-0x80000000000000000000000000000000n, -0x7fffffffffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x7fffffffffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x7fffffffffffffffn, true], + [-0x1000000000000000000000001n, -0x7fffffffffffffffn, true], + [-0x1000000000000000000000000n, -0x7fffffffffffffffn, true], + [-0xffffffffffffffffffffffffn, -0x7fffffffffffffffn, true], + [-0xfffffffffffffffffffffffen, -0x7fffffffffffffffn, true], + [-0x800000000000000000000001n, -0x7fffffffffffffffn, true], + [-0x800000000000000000000000n, -0x7fffffffffffffffn, true], + [-0x7fffffffffffffffffffffffn, -0x7fffffffffffffffn, true], + [-0x7ffffffffffffffffffffffen, -0x7fffffffffffffffn, true], + [-0x10000000000000001n, -0x7fffffffffffffffn, true], + [-0x10000000000000000n, -0x7fffffffffffffffn, true], + [-0xffffffffffffffffn, -0x7fffffffffffffffn, true], + [-0xfffffffffffffffen, -0x7fffffffffffffffn, true], + [-0x8000000000000001n, -0x7fffffffffffffffn, true], + [-0x8000000000000000n, -0x7fffffffffffffffn, true], + [-0x7fffffffffffffffn, -0x7fffffffffffffffn, false], + [-0x7ffffffffffffffen, -0x7fffffffffffffffn, false], + [-0x100000001n, -0x7fffffffffffffffn, false], + [-0x100000000n, -0x7fffffffffffffffn, false], + [-0xffffffffn, -0x7fffffffffffffffn, false], + [-0xfffffffen, -0x7fffffffffffffffn, false], + [-0x80000001n, -0x7fffffffffffffffn, false], + [-0x80000000n, -0x7fffffffffffffffn, false], + [-0x7fffffffn, -0x7fffffffffffffffn, false], + [-0x7ffffffen, -0x7fffffffffffffffn, false], + [-2n, -0x7fffffffffffffffn, false], + [-1n, -0x7fffffffffffffffn, false], + [0n, -0x7fffffffffffffffn, false], + [1n, -0x7fffffffffffffffn, false], + [2n, -0x7fffffffffffffffn, false], + [0x7ffffffen, -0x7fffffffffffffffn, false], + [0x7fffffffn, -0x7fffffffffffffffn, false], + [0x80000000n, -0x7fffffffffffffffn, false], + [0x80000001n, -0x7fffffffffffffffn, false], + [0xfffffffen, -0x7fffffffffffffffn, false], + [0xffffffffn, -0x7fffffffffffffffn, false], + [0x100000000n, -0x7fffffffffffffffn, false], + [0x100000001n, -0x7fffffffffffffffn, false], + [0x7ffffffffffffffen, -0x7fffffffffffffffn, false], + [0x7fffffffffffffffn, -0x7fffffffffffffffn, false], + [0x8000000000000000n, -0x7fffffffffffffffn, false], + [0x8000000000000001n, -0x7fffffffffffffffn, false], + [0xfffffffffffffffen, -0x7fffffffffffffffn, false], + [0xffffffffffffffffn, -0x7fffffffffffffffn, false], + [0x10000000000000000n, -0x7fffffffffffffffn, false], + [0x10000000000000001n, -0x7fffffffffffffffn, false], + [0x7ffffffffffffffffffffffen, -0x7fffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, -0x7fffffffffffffffn, false], + [0x800000000000000000000000n, -0x7fffffffffffffffn, false], + [0x800000000000000000000001n, -0x7fffffffffffffffn, false], + [0xfffffffffffffffffffffffen, -0x7fffffffffffffffn, false], + [0xffffffffffffffffffffffffn, -0x7fffffffffffffffn, false], + [0x1000000000000000000000000n, -0x7fffffffffffffffn, false], + [0x1000000000000000000000001n, -0x7fffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7fffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7fffffffffffffffn, false], + [0x80000000000000000000000000000000n, -0x7fffffffffffffffn, false], + [0x80000000000000000000000000000001n, -0x7fffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0x7fffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0x7fffffffffffffffn, false], + [0x100000000000000000000000000000000n, -0x7fffffffffffffffn, false], + [0x100000000000000000000000000000001n, -0x7fffffffffffffffn, false], + [-0x100000000000000000000000000000001n, -0x7ffffffffffffffen, true], + [-0x100000000000000000000000000000000n, -0x7ffffffffffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, -0x7ffffffffffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, -0x7ffffffffffffffen, true], + [-0x80000000000000000000000000000001n, -0x7ffffffffffffffen, true], + [-0x80000000000000000000000000000000n, -0x7ffffffffffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x7ffffffffffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x7ffffffffffffffen, true], + [-0x1000000000000000000000001n, -0x7ffffffffffffffen, true], + [-0x1000000000000000000000000n, -0x7ffffffffffffffen, true], + [-0xffffffffffffffffffffffffn, -0x7ffffffffffffffen, true], + [-0xfffffffffffffffffffffffen, -0x7ffffffffffffffen, true], + [-0x800000000000000000000001n, -0x7ffffffffffffffen, true], + [-0x800000000000000000000000n, -0x7ffffffffffffffen, true], + [-0x7fffffffffffffffffffffffn, -0x7ffffffffffffffen, true], + [-0x7ffffffffffffffffffffffen, -0x7ffffffffffffffen, true], + [-0x10000000000000001n, -0x7ffffffffffffffen, true], + [-0x10000000000000000n, -0x7ffffffffffffffen, true], + [-0xffffffffffffffffn, -0x7ffffffffffffffen, true], + [-0xfffffffffffffffen, -0x7ffffffffffffffen, true], + [-0x8000000000000001n, -0x7ffffffffffffffen, true], + [-0x8000000000000000n, -0x7ffffffffffffffen, true], + [-0x7fffffffffffffffn, -0x7ffffffffffffffen, true], + [-0x7ffffffffffffffen, -0x7ffffffffffffffen, false], + [-0x100000001n, -0x7ffffffffffffffen, false], + [-0x100000000n, -0x7ffffffffffffffen, false], + [-0xffffffffn, -0x7ffffffffffffffen, false], + [-0xfffffffen, -0x7ffffffffffffffen, false], + [-0x80000001n, -0x7ffffffffffffffen, false], + [-0x80000000n, -0x7ffffffffffffffen, false], + [-0x7fffffffn, -0x7ffffffffffffffen, false], + [-0x7ffffffen, -0x7ffffffffffffffen, false], + [-2n, -0x7ffffffffffffffen, false], + [-1n, -0x7ffffffffffffffen, false], + [0n, -0x7ffffffffffffffen, false], + [1n, -0x7ffffffffffffffen, false], + [2n, -0x7ffffffffffffffen, false], + [0x7ffffffen, -0x7ffffffffffffffen, false], + [0x7fffffffn, -0x7ffffffffffffffen, false], + [0x80000000n, -0x7ffffffffffffffen, false], + [0x80000001n, -0x7ffffffffffffffen, false], + [0xfffffffen, -0x7ffffffffffffffen, false], + [0xffffffffn, -0x7ffffffffffffffen, false], + [0x100000000n, -0x7ffffffffffffffen, false], + [0x100000001n, -0x7ffffffffffffffen, false], + [0x7ffffffffffffffen, -0x7ffffffffffffffen, false], + [0x7fffffffffffffffn, -0x7ffffffffffffffen, false], + [0x8000000000000000n, -0x7ffffffffffffffen, false], + [0x8000000000000001n, -0x7ffffffffffffffen, false], + [0xfffffffffffffffen, -0x7ffffffffffffffen, false], + [0xffffffffffffffffn, -0x7ffffffffffffffen, false], + [0x10000000000000000n, -0x7ffffffffffffffen, false], + [0x10000000000000001n, -0x7ffffffffffffffen, false], + [0x7ffffffffffffffffffffffen, -0x7ffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, -0x7ffffffffffffffen, false], + [0x800000000000000000000000n, -0x7ffffffffffffffen, false], + [0x800000000000000000000001n, -0x7ffffffffffffffen, false], + [0xfffffffffffffffffffffffen, -0x7ffffffffffffffen, false], + [0xffffffffffffffffffffffffn, -0x7ffffffffffffffen, false], + [0x1000000000000000000000000n, -0x7ffffffffffffffen, false], + [0x1000000000000000000000001n, -0x7ffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7ffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7ffffffffffffffen, false], + [0x80000000000000000000000000000000n, -0x7ffffffffffffffen, false], + [0x80000000000000000000000000000001n, -0x7ffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0x7ffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0x7ffffffffffffffen, false], + [0x100000000000000000000000000000000n, -0x7ffffffffffffffen, false], + [0x100000000000000000000000000000001n, -0x7ffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0xfffffffffffffffen, true], + [-0x100000000000000000000000000000000n, 0xfffffffffffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, 0xfffffffffffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, 0xfffffffffffffffen, true], + [-0x80000000000000000000000000000001n, 0xfffffffffffffffen, true], + [-0x80000000000000000000000000000000n, 0xfffffffffffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, 0xfffffffffffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, 0xfffffffffffffffen, true], + [-0x1000000000000000000000001n, 0xfffffffffffffffen, true], + [-0x1000000000000000000000000n, 0xfffffffffffffffen, true], + [-0xffffffffffffffffffffffffn, 0xfffffffffffffffen, true], + [-0xfffffffffffffffffffffffen, 0xfffffffffffffffen, true], + [-0x800000000000000000000001n, 0xfffffffffffffffen, true], + [-0x800000000000000000000000n, 0xfffffffffffffffen, true], + [-0x7fffffffffffffffffffffffn, 0xfffffffffffffffen, true], + [-0x7ffffffffffffffffffffffen, 0xfffffffffffffffen, true], + [-0x10000000000000001n, 0xfffffffffffffffen, true], + [-0x10000000000000000n, 0xfffffffffffffffen, true], + [-0xffffffffffffffffn, 0xfffffffffffffffen, true], + [-0xfffffffffffffffen, 0xfffffffffffffffen, true], + [-0x8000000000000001n, 0xfffffffffffffffen, true], + [-0x8000000000000000n, 0xfffffffffffffffen, true], + [-0x7fffffffffffffffn, 0xfffffffffffffffen, true], + [-0x7ffffffffffffffen, 0xfffffffffffffffen, true], + [-0x100000001n, 0xfffffffffffffffen, true], + [-0x100000000n, 0xfffffffffffffffen, true], + [-0xffffffffn, 0xfffffffffffffffen, true], + [-0xfffffffen, 0xfffffffffffffffen, true], + [-0x80000001n, 0xfffffffffffffffen, true], + [-0x80000000n, 0xfffffffffffffffen, true], + [-0x7fffffffn, 0xfffffffffffffffen, true], + [-0x7ffffffen, 0xfffffffffffffffen, true], + [-2n, 0xfffffffffffffffen, true], + [-1n, 0xfffffffffffffffen, true], + [0n, 0xfffffffffffffffen, true], + [1n, 0xfffffffffffffffen, true], + [2n, 0xfffffffffffffffen, true], + [0x7ffffffen, 0xfffffffffffffffen, true], + [0x7fffffffn, 0xfffffffffffffffen, true], + [0x80000000n, 0xfffffffffffffffen, true], + [0x80000001n, 0xfffffffffffffffen, true], + [0xfffffffen, 0xfffffffffffffffen, true], + [0xffffffffn, 0xfffffffffffffffen, true], + [0x100000000n, 0xfffffffffffffffen, true], + [0x100000001n, 0xfffffffffffffffen, true], + [0x7ffffffffffffffen, 0xfffffffffffffffen, true], + [0x7fffffffffffffffn, 0xfffffffffffffffen, true], + [0x8000000000000000n, 0xfffffffffffffffen, true], + [0x8000000000000001n, 0xfffffffffffffffen, true], + [0xfffffffffffffffen, 0xfffffffffffffffen, false], + [0xffffffffffffffffn, 0xfffffffffffffffen, false], + [0x10000000000000000n, 0xfffffffffffffffen, false], + [0x10000000000000001n, 0xfffffffffffffffen, false], + [0x7ffffffffffffffffffffffen, 0xfffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, 0xfffffffffffffffen, false], + [0x800000000000000000000000n, 0xfffffffffffffffen, false], + [0x800000000000000000000001n, 0xfffffffffffffffen, false], + [0xfffffffffffffffffffffffen, 0xfffffffffffffffen, false], + [0xffffffffffffffffffffffffn, 0xfffffffffffffffen, false], + [0x1000000000000000000000000n, 0xfffffffffffffffen, false], + [0x1000000000000000000000001n, 0xfffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0xfffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0xfffffffffffffffen, false], + [0x80000000000000000000000000000000n, 0xfffffffffffffffen, false], + [0x80000000000000000000000000000001n, 0xfffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0xfffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0xfffffffffffffffen, false], + [0x100000000000000000000000000000000n, 0xfffffffffffffffen, false], + [0x100000000000000000000000000000001n, 0xfffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0xffffffffffffffffn, true], + [-0x100000000000000000000000000000000n, 0xffffffffffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, 0xffffffffffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, 0xffffffffffffffffn, true], + [-0x80000000000000000000000000000001n, 0xffffffffffffffffn, true], + [-0x80000000000000000000000000000000n, 0xffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, 0xffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, 0xffffffffffffffffn, true], + [-0x1000000000000000000000001n, 0xffffffffffffffffn, true], + [-0x1000000000000000000000000n, 0xffffffffffffffffn, true], + [-0xffffffffffffffffffffffffn, 0xffffffffffffffffn, true], + [-0xfffffffffffffffffffffffen, 0xffffffffffffffffn, true], + [-0x800000000000000000000001n, 0xffffffffffffffffn, true], + [-0x800000000000000000000000n, 0xffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffn, 0xffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffen, 0xffffffffffffffffn, true], + [-0x10000000000000001n, 0xffffffffffffffffn, true], + [-0x10000000000000000n, 0xffffffffffffffffn, true], + [-0xffffffffffffffffn, 0xffffffffffffffffn, true], + [-0xfffffffffffffffen, 0xffffffffffffffffn, true], + [-0x8000000000000001n, 0xffffffffffffffffn, true], + [-0x8000000000000000n, 0xffffffffffffffffn, true], + [-0x7fffffffffffffffn, 0xffffffffffffffffn, true], + [-0x7ffffffffffffffen, 0xffffffffffffffffn, true], + [-0x100000001n, 0xffffffffffffffffn, true], + [-0x100000000n, 0xffffffffffffffffn, true], + [-0xffffffffn, 0xffffffffffffffffn, true], + [-0xfffffffen, 0xffffffffffffffffn, true], + [-0x80000001n, 0xffffffffffffffffn, true], + [-0x80000000n, 0xffffffffffffffffn, true], + [-0x7fffffffn, 0xffffffffffffffffn, true], + [-0x7ffffffen, 0xffffffffffffffffn, true], + [-2n, 0xffffffffffffffffn, true], + [-1n, 0xffffffffffffffffn, true], + [0n, 0xffffffffffffffffn, true], + [1n, 0xffffffffffffffffn, true], + [2n, 0xffffffffffffffffn, true], + [0x7ffffffen, 0xffffffffffffffffn, true], + [0x7fffffffn, 0xffffffffffffffffn, true], + [0x80000000n, 0xffffffffffffffffn, true], + [0x80000001n, 0xffffffffffffffffn, true], + [0xfffffffen, 0xffffffffffffffffn, true], + [0xffffffffn, 0xffffffffffffffffn, true], + [0x100000000n, 0xffffffffffffffffn, true], + [0x100000001n, 0xffffffffffffffffn, true], + [0x7ffffffffffffffen, 0xffffffffffffffffn, true], + [0x7fffffffffffffffn, 0xffffffffffffffffn, true], + [0x8000000000000000n, 0xffffffffffffffffn, true], + [0x8000000000000001n, 0xffffffffffffffffn, true], + [0xfffffffffffffffen, 0xffffffffffffffffn, true], + [0xffffffffffffffffn, 0xffffffffffffffffn, false], + [0x10000000000000000n, 0xffffffffffffffffn, false], + [0x10000000000000001n, 0xffffffffffffffffn, false], + [0x7ffffffffffffffffffffffen, 0xffffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, 0xffffffffffffffffn, false], + [0x800000000000000000000000n, 0xffffffffffffffffn, false], + [0x800000000000000000000001n, 0xffffffffffffffffn, false], + [0xfffffffffffffffffffffffen, 0xffffffffffffffffn, false], + [0xffffffffffffffffffffffffn, 0xffffffffffffffffn, false], + [0x1000000000000000000000000n, 0xffffffffffffffffn, false], + [0x1000000000000000000000001n, 0xffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, 0xffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0xffffffffffffffffn, false], + [0x80000000000000000000000000000000n, 0xffffffffffffffffn, false], + [0x80000000000000000000000000000001n, 0xffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0xffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0xffffffffffffffffn, false], + [0x100000000000000000000000000000000n, 0xffffffffffffffffn, false], + [0x100000000000000000000000000000001n, 0xffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, 0x10000000000000000n, true], + [-0x100000000000000000000000000000000n, 0x10000000000000000n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x10000000000000000n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x10000000000000000n, true], + [-0x80000000000000000000000000000001n, 0x10000000000000000n, true], + [-0x80000000000000000000000000000000n, 0x10000000000000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x10000000000000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x10000000000000000n, true], + [-0x1000000000000000000000001n, 0x10000000000000000n, true], + [-0x1000000000000000000000000n, 0x10000000000000000n, true], + [-0xffffffffffffffffffffffffn, 0x10000000000000000n, true], + [-0xfffffffffffffffffffffffen, 0x10000000000000000n, true], + [-0x800000000000000000000001n, 0x10000000000000000n, true], + [-0x800000000000000000000000n, 0x10000000000000000n, true], + [-0x7fffffffffffffffffffffffn, 0x10000000000000000n, true], + [-0x7ffffffffffffffffffffffen, 0x10000000000000000n, true], + [-0x10000000000000001n, 0x10000000000000000n, true], + [-0x10000000000000000n, 0x10000000000000000n, true], + [-0xffffffffffffffffn, 0x10000000000000000n, true], + [-0xfffffffffffffffen, 0x10000000000000000n, true], + [-0x8000000000000001n, 0x10000000000000000n, true], + [-0x8000000000000000n, 0x10000000000000000n, true], + [-0x7fffffffffffffffn, 0x10000000000000000n, true], + [-0x7ffffffffffffffen, 0x10000000000000000n, true], + [-0x100000001n, 0x10000000000000000n, true], + [-0x100000000n, 0x10000000000000000n, true], + [-0xffffffffn, 0x10000000000000000n, true], + [-0xfffffffen, 0x10000000000000000n, true], + [-0x80000001n, 0x10000000000000000n, true], + [-0x80000000n, 0x10000000000000000n, true], + [-0x7fffffffn, 0x10000000000000000n, true], + [-0x7ffffffen, 0x10000000000000000n, true], + [-2n, 0x10000000000000000n, true], + [-1n, 0x10000000000000000n, true], + [0n, 0x10000000000000000n, true], + [1n, 0x10000000000000000n, true], + [2n, 0x10000000000000000n, true], + [0x7ffffffen, 0x10000000000000000n, true], + [0x7fffffffn, 0x10000000000000000n, true], + [0x80000000n, 0x10000000000000000n, true], + [0x80000001n, 0x10000000000000000n, true], + [0xfffffffen, 0x10000000000000000n, true], + [0xffffffffn, 0x10000000000000000n, true], + [0x100000000n, 0x10000000000000000n, true], + [0x100000001n, 0x10000000000000000n, true], + [0x7ffffffffffffffen, 0x10000000000000000n, true], + [0x7fffffffffffffffn, 0x10000000000000000n, true], + [0x8000000000000000n, 0x10000000000000000n, true], + [0x8000000000000001n, 0x10000000000000000n, true], + [0xfffffffffffffffen, 0x10000000000000000n, true], + [0xffffffffffffffffn, 0x10000000000000000n, true], + [0x10000000000000000n, 0x10000000000000000n, false], + [0x10000000000000001n, 0x10000000000000000n, false], + [0x7ffffffffffffffffffffffen, 0x10000000000000000n, false], + [0x7fffffffffffffffffffffffn, 0x10000000000000000n, false], + [0x800000000000000000000000n, 0x10000000000000000n, false], + [0x800000000000000000000001n, 0x10000000000000000n, false], + [0xfffffffffffffffffffffffen, 0x10000000000000000n, false], + [0xffffffffffffffffffffffffn, 0x10000000000000000n, false], + [0x1000000000000000000000000n, 0x10000000000000000n, false], + [0x1000000000000000000000001n, 0x10000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x10000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x10000000000000000n, false], + [0x80000000000000000000000000000000n, 0x10000000000000000n, false], + [0x80000000000000000000000000000001n, 0x10000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x10000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x10000000000000000n, false], + [0x100000000000000000000000000000000n, 0x10000000000000000n, false], + [0x100000000000000000000000000000001n, 0x10000000000000000n, false], + [-0x100000000000000000000000000000001n, 0x10000000000000001n, true], + [-0x100000000000000000000000000000000n, 0x10000000000000001n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x10000000000000001n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x10000000000000001n, true], + [-0x80000000000000000000000000000001n, 0x10000000000000001n, true], + [-0x80000000000000000000000000000000n, 0x10000000000000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x10000000000000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x10000000000000001n, true], + [-0x1000000000000000000000001n, 0x10000000000000001n, true], + [-0x1000000000000000000000000n, 0x10000000000000001n, true], + [-0xffffffffffffffffffffffffn, 0x10000000000000001n, true], + [-0xfffffffffffffffffffffffen, 0x10000000000000001n, true], + [-0x800000000000000000000001n, 0x10000000000000001n, true], + [-0x800000000000000000000000n, 0x10000000000000001n, true], + [-0x7fffffffffffffffffffffffn, 0x10000000000000001n, true], + [-0x7ffffffffffffffffffffffen, 0x10000000000000001n, true], + [-0x10000000000000001n, 0x10000000000000001n, true], + [-0x10000000000000000n, 0x10000000000000001n, true], + [-0xffffffffffffffffn, 0x10000000000000001n, true], + [-0xfffffffffffffffen, 0x10000000000000001n, true], + [-0x8000000000000001n, 0x10000000000000001n, true], + [-0x8000000000000000n, 0x10000000000000001n, true], + [-0x7fffffffffffffffn, 0x10000000000000001n, true], + [-0x7ffffffffffffffen, 0x10000000000000001n, true], + [-0x100000001n, 0x10000000000000001n, true], + [-0x100000000n, 0x10000000000000001n, true], + [-0xffffffffn, 0x10000000000000001n, true], + [-0xfffffffen, 0x10000000000000001n, true], + [-0x80000001n, 0x10000000000000001n, true], + [-0x80000000n, 0x10000000000000001n, true], + [-0x7fffffffn, 0x10000000000000001n, true], + [-0x7ffffffen, 0x10000000000000001n, true], + [-2n, 0x10000000000000001n, true], + [-1n, 0x10000000000000001n, true], + [0n, 0x10000000000000001n, true], + [1n, 0x10000000000000001n, true], + [2n, 0x10000000000000001n, true], + [0x7ffffffen, 0x10000000000000001n, true], + [0x7fffffffn, 0x10000000000000001n, true], + [0x80000000n, 0x10000000000000001n, true], + [0x80000001n, 0x10000000000000001n, true], + [0xfffffffen, 0x10000000000000001n, true], + [0xffffffffn, 0x10000000000000001n, true], + [0x100000000n, 0x10000000000000001n, true], + [0x100000001n, 0x10000000000000001n, true], + [0x7ffffffffffffffen, 0x10000000000000001n, true], + [0x7fffffffffffffffn, 0x10000000000000001n, true], + [0x8000000000000000n, 0x10000000000000001n, true], + [0x8000000000000001n, 0x10000000000000001n, true], + [0xfffffffffffffffen, 0x10000000000000001n, true], + [0xffffffffffffffffn, 0x10000000000000001n, true], + [0x10000000000000000n, 0x10000000000000001n, true], + [0x10000000000000001n, 0x10000000000000001n, false], + [0x7ffffffffffffffffffffffen, 0x10000000000000001n, false], + [0x7fffffffffffffffffffffffn, 0x10000000000000001n, false], + [0x800000000000000000000000n, 0x10000000000000001n, false], + [0x800000000000000000000001n, 0x10000000000000001n, false], + [0xfffffffffffffffffffffffen, 0x10000000000000001n, false], + [0xffffffffffffffffffffffffn, 0x10000000000000001n, false], + [0x1000000000000000000000000n, 0x10000000000000001n, false], + [0x1000000000000000000000001n, 0x10000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x10000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x10000000000000001n, false], + [0x80000000000000000000000000000000n, 0x10000000000000001n, false], + [0x80000000000000000000000000000001n, 0x10000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x10000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x10000000000000001n, false], + [0x100000000000000000000000000000000n, 0x10000000000000001n, false], + [0x100000000000000000000000000000001n, 0x10000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x10000000000000001n, true], + [-0x100000000000000000000000000000000n, -0x10000000000000001n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x10000000000000001n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x10000000000000001n, true], + [-0x80000000000000000000000000000001n, -0x10000000000000001n, true], + [-0x80000000000000000000000000000000n, -0x10000000000000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x10000000000000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x10000000000000001n, true], + [-0x1000000000000000000000001n, -0x10000000000000001n, true], + [-0x1000000000000000000000000n, -0x10000000000000001n, true], + [-0xffffffffffffffffffffffffn, -0x10000000000000001n, true], + [-0xfffffffffffffffffffffffen, -0x10000000000000001n, true], + [-0x800000000000000000000001n, -0x10000000000000001n, true], + [-0x800000000000000000000000n, -0x10000000000000001n, true], + [-0x7fffffffffffffffffffffffn, -0x10000000000000001n, true], + [-0x7ffffffffffffffffffffffen, -0x10000000000000001n, true], + [-0x10000000000000001n, -0x10000000000000001n, false], + [-0x10000000000000000n, -0x10000000000000001n, false], + [-0xffffffffffffffffn, -0x10000000000000001n, false], + [-0xfffffffffffffffen, -0x10000000000000001n, false], + [-0x8000000000000001n, -0x10000000000000001n, false], + [-0x8000000000000000n, -0x10000000000000001n, false], + [-0x7fffffffffffffffn, -0x10000000000000001n, false], + [-0x7ffffffffffffffen, -0x10000000000000001n, false], + [-0x100000001n, -0x10000000000000001n, false], + [-0x100000000n, -0x10000000000000001n, false], + [-0xffffffffn, -0x10000000000000001n, false], + [-0xfffffffen, -0x10000000000000001n, false], + [-0x80000001n, -0x10000000000000001n, false], + [-0x80000000n, -0x10000000000000001n, false], + [-0x7fffffffn, -0x10000000000000001n, false], + [-0x7ffffffen, -0x10000000000000001n, false], + [-2n, -0x10000000000000001n, false], + [-1n, -0x10000000000000001n, false], + [0n, -0x10000000000000001n, false], + [1n, -0x10000000000000001n, false], + [2n, -0x10000000000000001n, false], + [0x7ffffffen, -0x10000000000000001n, false], + [0x7fffffffn, -0x10000000000000001n, false], + [0x80000000n, -0x10000000000000001n, false], + [0x80000001n, -0x10000000000000001n, false], + [0xfffffffen, -0x10000000000000001n, false], + [0xffffffffn, -0x10000000000000001n, false], + [0x100000000n, -0x10000000000000001n, false], + [0x100000001n, -0x10000000000000001n, false], + [0x7ffffffffffffffen, -0x10000000000000001n, false], + [0x7fffffffffffffffn, -0x10000000000000001n, false], + [0x8000000000000000n, -0x10000000000000001n, false], + [0x8000000000000001n, -0x10000000000000001n, false], + [0xfffffffffffffffen, -0x10000000000000001n, false], + [0xffffffffffffffffn, -0x10000000000000001n, false], + [0x10000000000000000n, -0x10000000000000001n, false], + [0x10000000000000001n, -0x10000000000000001n, false], + [0x7ffffffffffffffffffffffen, -0x10000000000000001n, false], + [0x7fffffffffffffffffffffffn, -0x10000000000000001n, false], + [0x800000000000000000000000n, -0x10000000000000001n, false], + [0x800000000000000000000001n, -0x10000000000000001n, false], + [0xfffffffffffffffffffffffen, -0x10000000000000001n, false], + [0xffffffffffffffffffffffffn, -0x10000000000000001n, false], + [0x1000000000000000000000000n, -0x10000000000000001n, false], + [0x1000000000000000000000001n, -0x10000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x10000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x10000000000000001n, false], + [0x80000000000000000000000000000000n, -0x10000000000000001n, false], + [0x80000000000000000000000000000001n, -0x10000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x10000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x10000000000000001n, false], + [0x100000000000000000000000000000000n, -0x10000000000000001n, false], + [0x100000000000000000000000000000001n, -0x10000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x10000000000000000n, true], + [-0x100000000000000000000000000000000n, -0x10000000000000000n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x10000000000000000n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x10000000000000000n, true], + [-0x80000000000000000000000000000001n, -0x10000000000000000n, true], + [-0x80000000000000000000000000000000n, -0x10000000000000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x10000000000000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x10000000000000000n, true], + [-0x1000000000000000000000001n, -0x10000000000000000n, true], + [-0x1000000000000000000000000n, -0x10000000000000000n, true], + [-0xffffffffffffffffffffffffn, -0x10000000000000000n, true], + [-0xfffffffffffffffffffffffen, -0x10000000000000000n, true], + [-0x800000000000000000000001n, -0x10000000000000000n, true], + [-0x800000000000000000000000n, -0x10000000000000000n, true], + [-0x7fffffffffffffffffffffffn, -0x10000000000000000n, true], + [-0x7ffffffffffffffffffffffen, -0x10000000000000000n, true], + [-0x10000000000000001n, -0x10000000000000000n, true], + [-0x10000000000000000n, -0x10000000000000000n, false], + [-0xffffffffffffffffn, -0x10000000000000000n, false], + [-0xfffffffffffffffen, -0x10000000000000000n, false], + [-0x8000000000000001n, -0x10000000000000000n, false], + [-0x8000000000000000n, -0x10000000000000000n, false], + [-0x7fffffffffffffffn, -0x10000000000000000n, false], + [-0x7ffffffffffffffen, -0x10000000000000000n, false], + [-0x100000001n, -0x10000000000000000n, false], + [-0x100000000n, -0x10000000000000000n, false], + [-0xffffffffn, -0x10000000000000000n, false], + [-0xfffffffen, -0x10000000000000000n, false], + [-0x80000001n, -0x10000000000000000n, false], + [-0x80000000n, -0x10000000000000000n, false], + [-0x7fffffffn, -0x10000000000000000n, false], + [-0x7ffffffen, -0x10000000000000000n, false], + [-2n, -0x10000000000000000n, false], + [-1n, -0x10000000000000000n, false], + [0n, -0x10000000000000000n, false], + [1n, -0x10000000000000000n, false], + [2n, -0x10000000000000000n, false], + [0x7ffffffen, -0x10000000000000000n, false], + [0x7fffffffn, -0x10000000000000000n, false], + [0x80000000n, -0x10000000000000000n, false], + [0x80000001n, -0x10000000000000000n, false], + [0xfffffffen, -0x10000000000000000n, false], + [0xffffffffn, -0x10000000000000000n, false], + [0x100000000n, -0x10000000000000000n, false], + [0x100000001n, -0x10000000000000000n, false], + [0x7ffffffffffffffen, -0x10000000000000000n, false], + [0x7fffffffffffffffn, -0x10000000000000000n, false], + [0x8000000000000000n, -0x10000000000000000n, false], + [0x8000000000000001n, -0x10000000000000000n, false], + [0xfffffffffffffffen, -0x10000000000000000n, false], + [0xffffffffffffffffn, -0x10000000000000000n, false], + [0x10000000000000000n, -0x10000000000000000n, false], + [0x10000000000000001n, -0x10000000000000000n, false], + [0x7ffffffffffffffffffffffen, -0x10000000000000000n, false], + [0x7fffffffffffffffffffffffn, -0x10000000000000000n, false], + [0x800000000000000000000000n, -0x10000000000000000n, false], + [0x800000000000000000000001n, -0x10000000000000000n, false], + [0xfffffffffffffffffffffffen, -0x10000000000000000n, false], + [0xffffffffffffffffffffffffn, -0x10000000000000000n, false], + [0x1000000000000000000000000n, -0x10000000000000000n, false], + [0x1000000000000000000000001n, -0x10000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x10000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x10000000000000000n, false], + [0x80000000000000000000000000000000n, -0x10000000000000000n, false], + [0x80000000000000000000000000000001n, -0x10000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x10000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x10000000000000000n, false], + [0x100000000000000000000000000000000n, -0x10000000000000000n, false], + [0x100000000000000000000000000000001n, -0x10000000000000000n, false], + [-0x100000000000000000000000000000001n, -0xffffffffffffffffn, true], + [-0x100000000000000000000000000000000n, -0xffffffffffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, -0xffffffffffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, -0xffffffffffffffffn, true], + [-0x80000000000000000000000000000001n, -0xffffffffffffffffn, true], + [-0x80000000000000000000000000000000n, -0xffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, -0xffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, -0xffffffffffffffffn, true], + [-0x1000000000000000000000001n, -0xffffffffffffffffn, true], + [-0x1000000000000000000000000n, -0xffffffffffffffffn, true], + [-0xffffffffffffffffffffffffn, -0xffffffffffffffffn, true], + [-0xfffffffffffffffffffffffen, -0xffffffffffffffffn, true], + [-0x800000000000000000000001n, -0xffffffffffffffffn, true], + [-0x800000000000000000000000n, -0xffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffn, -0xffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffen, -0xffffffffffffffffn, true], + [-0x10000000000000001n, -0xffffffffffffffffn, true], + [-0x10000000000000000n, -0xffffffffffffffffn, true], + [-0xffffffffffffffffn, -0xffffffffffffffffn, false], + [-0xfffffffffffffffen, -0xffffffffffffffffn, false], + [-0x8000000000000001n, -0xffffffffffffffffn, false], + [-0x8000000000000000n, -0xffffffffffffffffn, false], + [-0x7fffffffffffffffn, -0xffffffffffffffffn, false], + [-0x7ffffffffffffffen, -0xffffffffffffffffn, false], + [-0x100000001n, -0xffffffffffffffffn, false], + [-0x100000000n, -0xffffffffffffffffn, false], + [-0xffffffffn, -0xffffffffffffffffn, false], + [-0xfffffffen, -0xffffffffffffffffn, false], + [-0x80000001n, -0xffffffffffffffffn, false], + [-0x80000000n, -0xffffffffffffffffn, false], + [-0x7fffffffn, -0xffffffffffffffffn, false], + [-0x7ffffffen, -0xffffffffffffffffn, false], + [-2n, -0xffffffffffffffffn, false], + [-1n, -0xffffffffffffffffn, false], + [0n, -0xffffffffffffffffn, false], + [1n, -0xffffffffffffffffn, false], + [2n, -0xffffffffffffffffn, false], + [0x7ffffffen, -0xffffffffffffffffn, false], + [0x7fffffffn, -0xffffffffffffffffn, false], + [0x80000000n, -0xffffffffffffffffn, false], + [0x80000001n, -0xffffffffffffffffn, false], + [0xfffffffen, -0xffffffffffffffffn, false], + [0xffffffffn, -0xffffffffffffffffn, false], + [0x100000000n, -0xffffffffffffffffn, false], + [0x100000001n, -0xffffffffffffffffn, false], + [0x7ffffffffffffffen, -0xffffffffffffffffn, false], + [0x7fffffffffffffffn, -0xffffffffffffffffn, false], + [0x8000000000000000n, -0xffffffffffffffffn, false], + [0x8000000000000001n, -0xffffffffffffffffn, false], + [0xfffffffffffffffen, -0xffffffffffffffffn, false], + [0xffffffffffffffffn, -0xffffffffffffffffn, false], + [0x10000000000000000n, -0xffffffffffffffffn, false], + [0x10000000000000001n, -0xffffffffffffffffn, false], + [0x7ffffffffffffffffffffffen, -0xffffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, -0xffffffffffffffffn, false], + [0x800000000000000000000000n, -0xffffffffffffffffn, false], + [0x800000000000000000000001n, -0xffffffffffffffffn, false], + [0xfffffffffffffffffffffffen, -0xffffffffffffffffn, false], + [0xffffffffffffffffffffffffn, -0xffffffffffffffffn, false], + [0x1000000000000000000000000n, -0xffffffffffffffffn, false], + [0x1000000000000000000000001n, -0xffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0xffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0xffffffffffffffffn, false], + [0x80000000000000000000000000000000n, -0xffffffffffffffffn, false], + [0x80000000000000000000000000000001n, -0xffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0xffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0xffffffffffffffffn, false], + [0x100000000000000000000000000000000n, -0xffffffffffffffffn, false], + [0x100000000000000000000000000000001n, -0xffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, -0xfffffffffffffffen, true], + [-0x100000000000000000000000000000000n, -0xfffffffffffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, -0xfffffffffffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, -0xfffffffffffffffen, true], + [-0x80000000000000000000000000000001n, -0xfffffffffffffffen, true], + [-0x80000000000000000000000000000000n, -0xfffffffffffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, -0xfffffffffffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, -0xfffffffffffffffen, true], + [-0x1000000000000000000000001n, -0xfffffffffffffffen, true], + [-0x1000000000000000000000000n, -0xfffffffffffffffen, true], + [-0xffffffffffffffffffffffffn, -0xfffffffffffffffen, true], + [-0xfffffffffffffffffffffffen, -0xfffffffffffffffen, true], + [-0x800000000000000000000001n, -0xfffffffffffffffen, true], + [-0x800000000000000000000000n, -0xfffffffffffffffen, true], + [-0x7fffffffffffffffffffffffn, -0xfffffffffffffffen, true], + [-0x7ffffffffffffffffffffffen, -0xfffffffffffffffen, true], + [-0x10000000000000001n, -0xfffffffffffffffen, true], + [-0x10000000000000000n, -0xfffffffffffffffen, true], + [-0xffffffffffffffffn, -0xfffffffffffffffen, true], + [-0xfffffffffffffffen, -0xfffffffffffffffen, false], + [-0x8000000000000001n, -0xfffffffffffffffen, false], + [-0x8000000000000000n, -0xfffffffffffffffen, false], + [-0x7fffffffffffffffn, -0xfffffffffffffffen, false], + [-0x7ffffffffffffffen, -0xfffffffffffffffen, false], + [-0x100000001n, -0xfffffffffffffffen, false], + [-0x100000000n, -0xfffffffffffffffen, false], + [-0xffffffffn, -0xfffffffffffffffen, false], + [-0xfffffffen, -0xfffffffffffffffen, false], + [-0x80000001n, -0xfffffffffffffffen, false], + [-0x80000000n, -0xfffffffffffffffen, false], + [-0x7fffffffn, -0xfffffffffffffffen, false], + [-0x7ffffffen, -0xfffffffffffffffen, false], + [-2n, -0xfffffffffffffffen, false], + [-1n, -0xfffffffffffffffen, false], + [0n, -0xfffffffffffffffen, false], + [1n, -0xfffffffffffffffen, false], + [2n, -0xfffffffffffffffen, false], + [0x7ffffffen, -0xfffffffffffffffen, false], + [0x7fffffffn, -0xfffffffffffffffen, false], + [0x80000000n, -0xfffffffffffffffen, false], + [0x80000001n, -0xfffffffffffffffen, false], + [0xfffffffen, -0xfffffffffffffffen, false], + [0xffffffffn, -0xfffffffffffffffen, false], + [0x100000000n, -0xfffffffffffffffen, false], + [0x100000001n, -0xfffffffffffffffen, false], + [0x7ffffffffffffffen, -0xfffffffffffffffen, false], + [0x7fffffffffffffffn, -0xfffffffffffffffen, false], + [0x8000000000000000n, -0xfffffffffffffffen, false], + [0x8000000000000001n, -0xfffffffffffffffen, false], + [0xfffffffffffffffen, -0xfffffffffffffffen, false], + [0xffffffffffffffffn, -0xfffffffffffffffen, false], + [0x10000000000000000n, -0xfffffffffffffffen, false], + [0x10000000000000001n, -0xfffffffffffffffen, false], + [0x7ffffffffffffffffffffffen, -0xfffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, -0xfffffffffffffffen, false], + [0x800000000000000000000000n, -0xfffffffffffffffen, false], + [0x800000000000000000000001n, -0xfffffffffffffffen, false], + [0xfffffffffffffffffffffffen, -0xfffffffffffffffen, false], + [0xffffffffffffffffffffffffn, -0xfffffffffffffffen, false], + [0x1000000000000000000000000n, -0xfffffffffffffffen, false], + [0x1000000000000000000000001n, -0xfffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0xfffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0xfffffffffffffffen, false], + [0x80000000000000000000000000000000n, -0xfffffffffffffffen, false], + [0x80000000000000000000000000000001n, -0xfffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0xfffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0xfffffffffffffffen, false], + [0x100000000000000000000000000000000n, -0xfffffffffffffffen, false], + [0x100000000000000000000000000000001n, -0xfffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0x7ffffffffffffffffffffffen, true], + [-0x100000000000000000000000000000000n, 0x7ffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000001n, 0x7ffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000000n, 0x7ffffffffffffffffffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, true], + [-0x1000000000000000000000001n, 0x7ffffffffffffffffffffffen, true], + [-0x1000000000000000000000000n, 0x7ffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, true], + [-0x800000000000000000000001n, 0x7ffffffffffffffffffffffen, true], + [-0x800000000000000000000000n, 0x7ffffffffffffffffffffffen, true], + [-0x7fffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, true], + [-0x7ffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, true], + [-0x10000000000000001n, 0x7ffffffffffffffffffffffen, true], + [-0x10000000000000000n, 0x7ffffffffffffffffffffffen, true], + [-0xffffffffffffffffn, 0x7ffffffffffffffffffffffen, true], + [-0xfffffffffffffffen, 0x7ffffffffffffffffffffffen, true], + [-0x8000000000000001n, 0x7ffffffffffffffffffffffen, true], + [-0x8000000000000000n, 0x7ffffffffffffffffffffffen, true], + [-0x7fffffffffffffffn, 0x7ffffffffffffffffffffffen, true], + [-0x7ffffffffffffffen, 0x7ffffffffffffffffffffffen, true], + [-0x100000001n, 0x7ffffffffffffffffffffffen, true], + [-0x100000000n, 0x7ffffffffffffffffffffffen, true], + [-0xffffffffn, 0x7ffffffffffffffffffffffen, true], + [-0xfffffffen, 0x7ffffffffffffffffffffffen, true], + [-0x80000001n, 0x7ffffffffffffffffffffffen, true], + [-0x80000000n, 0x7ffffffffffffffffffffffen, true], + [-0x7fffffffn, 0x7ffffffffffffffffffffffen, true], + [-0x7ffffffen, 0x7ffffffffffffffffffffffen, true], + [-2n, 0x7ffffffffffffffffffffffen, true], + [-1n, 0x7ffffffffffffffffffffffen, true], + [0n, 0x7ffffffffffffffffffffffen, true], + [1n, 0x7ffffffffffffffffffffffen, true], + [2n, 0x7ffffffffffffffffffffffen, true], + [0x7ffffffen, 0x7ffffffffffffffffffffffen, true], + [0x7fffffffn, 0x7ffffffffffffffffffffffen, true], + [0x80000000n, 0x7ffffffffffffffffffffffen, true], + [0x80000001n, 0x7ffffffffffffffffffffffen, true], + [0xfffffffen, 0x7ffffffffffffffffffffffen, true], + [0xffffffffn, 0x7ffffffffffffffffffffffen, true], + [0x100000000n, 0x7ffffffffffffffffffffffen, true], + [0x100000001n, 0x7ffffffffffffffffffffffen, true], + [0x7ffffffffffffffen, 0x7ffffffffffffffffffffffen, true], + [0x7fffffffffffffffn, 0x7ffffffffffffffffffffffen, true], + [0x8000000000000000n, 0x7ffffffffffffffffffffffen, true], + [0x8000000000000001n, 0x7ffffffffffffffffffffffen, true], + [0xfffffffffffffffen, 0x7ffffffffffffffffffffffen, true], + [0xffffffffffffffffn, 0x7ffffffffffffffffffffffen, true], + [0x10000000000000000n, 0x7ffffffffffffffffffffffen, true], + [0x10000000000000001n, 0x7ffffffffffffffffffffffen, true], + [0x7ffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, false], + [0x800000000000000000000000n, 0x7ffffffffffffffffffffffen, false], + [0x800000000000000000000001n, 0x7ffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, false], + [0x1000000000000000000000000n, 0x7ffffffffffffffffffffffen, false], + [0x1000000000000000000000001n, 0x7ffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, false], + [0x80000000000000000000000000000000n, 0x7ffffffffffffffffffffffen, false], + [0x80000000000000000000000000000001n, 0x7ffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, 0x7ffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, 0x7ffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0x7fffffffffffffffffffffffn, true], + [-0x100000000000000000000000000000000n, 0x7fffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000001n, 0x7fffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000000n, 0x7fffffffffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, true], + [-0x1000000000000000000000001n, 0x7fffffffffffffffffffffffn, true], + [-0x1000000000000000000000000n, 0x7fffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, true], + [-0x800000000000000000000001n, 0x7fffffffffffffffffffffffn, true], + [-0x800000000000000000000000n, 0x7fffffffffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, true], + [-0x10000000000000001n, 0x7fffffffffffffffffffffffn, true], + [-0x10000000000000000n, 0x7fffffffffffffffffffffffn, true], + [-0xffffffffffffffffn, 0x7fffffffffffffffffffffffn, true], + [-0xfffffffffffffffen, 0x7fffffffffffffffffffffffn, true], + [-0x8000000000000001n, 0x7fffffffffffffffffffffffn, true], + [-0x8000000000000000n, 0x7fffffffffffffffffffffffn, true], + [-0x7fffffffffffffffn, 0x7fffffffffffffffffffffffn, true], + [-0x7ffffffffffffffen, 0x7fffffffffffffffffffffffn, true], + [-0x100000001n, 0x7fffffffffffffffffffffffn, true], + [-0x100000000n, 0x7fffffffffffffffffffffffn, true], + [-0xffffffffn, 0x7fffffffffffffffffffffffn, true], + [-0xfffffffen, 0x7fffffffffffffffffffffffn, true], + [-0x80000001n, 0x7fffffffffffffffffffffffn, true], + [-0x80000000n, 0x7fffffffffffffffffffffffn, true], + [-0x7fffffffn, 0x7fffffffffffffffffffffffn, true], + [-0x7ffffffen, 0x7fffffffffffffffffffffffn, true], + [-2n, 0x7fffffffffffffffffffffffn, true], + [-1n, 0x7fffffffffffffffffffffffn, true], + [0n, 0x7fffffffffffffffffffffffn, true], + [1n, 0x7fffffffffffffffffffffffn, true], + [2n, 0x7fffffffffffffffffffffffn, true], + [0x7ffffffen, 0x7fffffffffffffffffffffffn, true], + [0x7fffffffn, 0x7fffffffffffffffffffffffn, true], + [0x80000000n, 0x7fffffffffffffffffffffffn, true], + [0x80000001n, 0x7fffffffffffffffffffffffn, true], + [0xfffffffen, 0x7fffffffffffffffffffffffn, true], + [0xffffffffn, 0x7fffffffffffffffffffffffn, true], + [0x100000000n, 0x7fffffffffffffffffffffffn, true], + [0x100000001n, 0x7fffffffffffffffffffffffn, true], + [0x7ffffffffffffffen, 0x7fffffffffffffffffffffffn, true], + [0x7fffffffffffffffn, 0x7fffffffffffffffffffffffn, true], + [0x8000000000000000n, 0x7fffffffffffffffffffffffn, true], + [0x8000000000000001n, 0x7fffffffffffffffffffffffn, true], + [0xfffffffffffffffen, 0x7fffffffffffffffffffffffn, true], + [0xffffffffffffffffn, 0x7fffffffffffffffffffffffn, true], + [0x10000000000000000n, 0x7fffffffffffffffffffffffn, true], + [0x10000000000000001n, 0x7fffffffffffffffffffffffn, true], + [0x7ffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, true], + [0x7fffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, false], + [0x800000000000000000000000n, 0x7fffffffffffffffffffffffn, false], + [0x800000000000000000000001n, 0x7fffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, false], + [0x1000000000000000000000000n, 0x7fffffffffffffffffffffffn, false], + [0x1000000000000000000000001n, 0x7fffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, false], + [0x80000000000000000000000000000000n, 0x7fffffffffffffffffffffffn, false], + [0x80000000000000000000000000000001n, 0x7fffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, 0x7fffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, 0x7fffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, 0x800000000000000000000000n, true], + [-0x100000000000000000000000000000000n, 0x800000000000000000000000n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x800000000000000000000000n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x800000000000000000000000n, true], + [-0x80000000000000000000000000000001n, 0x800000000000000000000000n, true], + [-0x80000000000000000000000000000000n, 0x800000000000000000000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x800000000000000000000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x800000000000000000000000n, true], + [-0x1000000000000000000000001n, 0x800000000000000000000000n, true], + [-0x1000000000000000000000000n, 0x800000000000000000000000n, true], + [-0xffffffffffffffffffffffffn, 0x800000000000000000000000n, true], + [-0xfffffffffffffffffffffffen, 0x800000000000000000000000n, true], + [-0x800000000000000000000001n, 0x800000000000000000000000n, true], + [-0x800000000000000000000000n, 0x800000000000000000000000n, true], + [-0x7fffffffffffffffffffffffn, 0x800000000000000000000000n, true], + [-0x7ffffffffffffffffffffffen, 0x800000000000000000000000n, true], + [-0x10000000000000001n, 0x800000000000000000000000n, true], + [-0x10000000000000000n, 0x800000000000000000000000n, true], + [-0xffffffffffffffffn, 0x800000000000000000000000n, true], + [-0xfffffffffffffffen, 0x800000000000000000000000n, true], + [-0x8000000000000001n, 0x800000000000000000000000n, true], + [-0x8000000000000000n, 0x800000000000000000000000n, true], + [-0x7fffffffffffffffn, 0x800000000000000000000000n, true], + [-0x7ffffffffffffffen, 0x800000000000000000000000n, true], + [-0x100000001n, 0x800000000000000000000000n, true], + [-0x100000000n, 0x800000000000000000000000n, true], + [-0xffffffffn, 0x800000000000000000000000n, true], + [-0xfffffffen, 0x800000000000000000000000n, true], + [-0x80000001n, 0x800000000000000000000000n, true], + [-0x80000000n, 0x800000000000000000000000n, true], + [-0x7fffffffn, 0x800000000000000000000000n, true], + [-0x7ffffffen, 0x800000000000000000000000n, true], + [-2n, 0x800000000000000000000000n, true], + [-1n, 0x800000000000000000000000n, true], + [0n, 0x800000000000000000000000n, true], + [1n, 0x800000000000000000000000n, true], + [2n, 0x800000000000000000000000n, true], + [0x7ffffffen, 0x800000000000000000000000n, true], + [0x7fffffffn, 0x800000000000000000000000n, true], + [0x80000000n, 0x800000000000000000000000n, true], + [0x80000001n, 0x800000000000000000000000n, true], + [0xfffffffen, 0x800000000000000000000000n, true], + [0xffffffffn, 0x800000000000000000000000n, true], + [0x100000000n, 0x800000000000000000000000n, true], + [0x100000001n, 0x800000000000000000000000n, true], + [0x7ffffffffffffffen, 0x800000000000000000000000n, true], + [0x7fffffffffffffffn, 0x800000000000000000000000n, true], + [0x8000000000000000n, 0x800000000000000000000000n, true], + [0x8000000000000001n, 0x800000000000000000000000n, true], + [0xfffffffffffffffen, 0x800000000000000000000000n, true], + [0xffffffffffffffffn, 0x800000000000000000000000n, true], + [0x10000000000000000n, 0x800000000000000000000000n, true], + [0x10000000000000001n, 0x800000000000000000000000n, true], + [0x7ffffffffffffffffffffffen, 0x800000000000000000000000n, true], + [0x7fffffffffffffffffffffffn, 0x800000000000000000000000n, true], + [0x800000000000000000000000n, 0x800000000000000000000000n, false], + [0x800000000000000000000001n, 0x800000000000000000000000n, false], + [0xfffffffffffffffffffffffen, 0x800000000000000000000000n, false], + [0xffffffffffffffffffffffffn, 0x800000000000000000000000n, false], + [0x1000000000000000000000000n, 0x800000000000000000000000n, false], + [0x1000000000000000000000001n, 0x800000000000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x800000000000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x800000000000000000000000n, false], + [0x80000000000000000000000000000000n, 0x800000000000000000000000n, false], + [0x80000000000000000000000000000001n, 0x800000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x800000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x800000000000000000000000n, false], + [0x100000000000000000000000000000000n, 0x800000000000000000000000n, false], + [0x100000000000000000000000000000001n, 0x800000000000000000000000n, false], + [-0x100000000000000000000000000000001n, 0x800000000000000000000001n, true], + [-0x100000000000000000000000000000000n, 0x800000000000000000000001n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x800000000000000000000001n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x800000000000000000000001n, true], + [-0x80000000000000000000000000000001n, 0x800000000000000000000001n, true], + [-0x80000000000000000000000000000000n, 0x800000000000000000000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x800000000000000000000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x800000000000000000000001n, true], + [-0x1000000000000000000000001n, 0x800000000000000000000001n, true], + [-0x1000000000000000000000000n, 0x800000000000000000000001n, true], + [-0xffffffffffffffffffffffffn, 0x800000000000000000000001n, true], + [-0xfffffffffffffffffffffffen, 0x800000000000000000000001n, true], + [-0x800000000000000000000001n, 0x800000000000000000000001n, true], + [-0x800000000000000000000000n, 0x800000000000000000000001n, true], + [-0x7fffffffffffffffffffffffn, 0x800000000000000000000001n, true], + [-0x7ffffffffffffffffffffffen, 0x800000000000000000000001n, true], + [-0x10000000000000001n, 0x800000000000000000000001n, true], + [-0x10000000000000000n, 0x800000000000000000000001n, true], + [-0xffffffffffffffffn, 0x800000000000000000000001n, true], + [-0xfffffffffffffffen, 0x800000000000000000000001n, true], + [-0x8000000000000001n, 0x800000000000000000000001n, true], + [-0x8000000000000000n, 0x800000000000000000000001n, true], + [-0x7fffffffffffffffn, 0x800000000000000000000001n, true], + [-0x7ffffffffffffffen, 0x800000000000000000000001n, true], + [-0x100000001n, 0x800000000000000000000001n, true], + [-0x100000000n, 0x800000000000000000000001n, true], + [-0xffffffffn, 0x800000000000000000000001n, true], + [-0xfffffffen, 0x800000000000000000000001n, true], + [-0x80000001n, 0x800000000000000000000001n, true], + [-0x80000000n, 0x800000000000000000000001n, true], + [-0x7fffffffn, 0x800000000000000000000001n, true], + [-0x7ffffffen, 0x800000000000000000000001n, true], + [-2n, 0x800000000000000000000001n, true], + [-1n, 0x800000000000000000000001n, true], + [0n, 0x800000000000000000000001n, true], + [1n, 0x800000000000000000000001n, true], + [2n, 0x800000000000000000000001n, true], + [0x7ffffffen, 0x800000000000000000000001n, true], + [0x7fffffffn, 0x800000000000000000000001n, true], + [0x80000000n, 0x800000000000000000000001n, true], + [0x80000001n, 0x800000000000000000000001n, true], + [0xfffffffen, 0x800000000000000000000001n, true], + [0xffffffffn, 0x800000000000000000000001n, true], + [0x100000000n, 0x800000000000000000000001n, true], + [0x100000001n, 0x800000000000000000000001n, true], + [0x7ffffffffffffffen, 0x800000000000000000000001n, true], + [0x7fffffffffffffffn, 0x800000000000000000000001n, true], + [0x8000000000000000n, 0x800000000000000000000001n, true], + [0x8000000000000001n, 0x800000000000000000000001n, true], + [0xfffffffffffffffen, 0x800000000000000000000001n, true], + [0xffffffffffffffffn, 0x800000000000000000000001n, true], + [0x10000000000000000n, 0x800000000000000000000001n, true], + [0x10000000000000001n, 0x800000000000000000000001n, true], + [0x7ffffffffffffffffffffffen, 0x800000000000000000000001n, true], + [0x7fffffffffffffffffffffffn, 0x800000000000000000000001n, true], + [0x800000000000000000000000n, 0x800000000000000000000001n, true], + [0x800000000000000000000001n, 0x800000000000000000000001n, false], + [0xfffffffffffffffffffffffen, 0x800000000000000000000001n, false], + [0xffffffffffffffffffffffffn, 0x800000000000000000000001n, false], + [0x1000000000000000000000000n, 0x800000000000000000000001n, false], + [0x1000000000000000000000001n, 0x800000000000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x800000000000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x800000000000000000000001n, false], + [0x80000000000000000000000000000000n, 0x800000000000000000000001n, false], + [0x80000000000000000000000000000001n, 0x800000000000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x800000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x800000000000000000000001n, false], + [0x100000000000000000000000000000000n, 0x800000000000000000000001n, false], + [0x100000000000000000000000000000001n, 0x800000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x800000000000000000000001n, true], + [-0x100000000000000000000000000000000n, -0x800000000000000000000001n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x800000000000000000000001n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x800000000000000000000001n, true], + [-0x80000000000000000000000000000001n, -0x800000000000000000000001n, true], + [-0x80000000000000000000000000000000n, -0x800000000000000000000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x800000000000000000000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x800000000000000000000001n, true], + [-0x1000000000000000000000001n, -0x800000000000000000000001n, true], + [-0x1000000000000000000000000n, -0x800000000000000000000001n, true], + [-0xffffffffffffffffffffffffn, -0x800000000000000000000001n, true], + [-0xfffffffffffffffffffffffen, -0x800000000000000000000001n, true], + [-0x800000000000000000000001n, -0x800000000000000000000001n, false], + [-0x800000000000000000000000n, -0x800000000000000000000001n, false], + [-0x7fffffffffffffffffffffffn, -0x800000000000000000000001n, false], + [-0x7ffffffffffffffffffffffen, -0x800000000000000000000001n, false], + [-0x10000000000000001n, -0x800000000000000000000001n, false], + [-0x10000000000000000n, -0x800000000000000000000001n, false], + [-0xffffffffffffffffn, -0x800000000000000000000001n, false], + [-0xfffffffffffffffen, -0x800000000000000000000001n, false], + [-0x8000000000000001n, -0x800000000000000000000001n, false], + [-0x8000000000000000n, -0x800000000000000000000001n, false], + [-0x7fffffffffffffffn, -0x800000000000000000000001n, false], + [-0x7ffffffffffffffen, -0x800000000000000000000001n, false], + [-0x100000001n, -0x800000000000000000000001n, false], + [-0x100000000n, -0x800000000000000000000001n, false], + [-0xffffffffn, -0x800000000000000000000001n, false], + [-0xfffffffen, -0x800000000000000000000001n, false], + [-0x80000001n, -0x800000000000000000000001n, false], + [-0x80000000n, -0x800000000000000000000001n, false], + [-0x7fffffffn, -0x800000000000000000000001n, false], + [-0x7ffffffen, -0x800000000000000000000001n, false], + [-2n, -0x800000000000000000000001n, false], + [-1n, -0x800000000000000000000001n, false], + [0n, -0x800000000000000000000001n, false], + [1n, -0x800000000000000000000001n, false], + [2n, -0x800000000000000000000001n, false], + [0x7ffffffen, -0x800000000000000000000001n, false], + [0x7fffffffn, -0x800000000000000000000001n, false], + [0x80000000n, -0x800000000000000000000001n, false], + [0x80000001n, -0x800000000000000000000001n, false], + [0xfffffffen, -0x800000000000000000000001n, false], + [0xffffffffn, -0x800000000000000000000001n, false], + [0x100000000n, -0x800000000000000000000001n, false], + [0x100000001n, -0x800000000000000000000001n, false], + [0x7ffffffffffffffen, -0x800000000000000000000001n, false], + [0x7fffffffffffffffn, -0x800000000000000000000001n, false], + [0x8000000000000000n, -0x800000000000000000000001n, false], + [0x8000000000000001n, -0x800000000000000000000001n, false], + [0xfffffffffffffffen, -0x800000000000000000000001n, false], + [0xffffffffffffffffn, -0x800000000000000000000001n, false], + [0x10000000000000000n, -0x800000000000000000000001n, false], + [0x10000000000000001n, -0x800000000000000000000001n, false], + [0x7ffffffffffffffffffffffen, -0x800000000000000000000001n, false], + [0x7fffffffffffffffffffffffn, -0x800000000000000000000001n, false], + [0x800000000000000000000000n, -0x800000000000000000000001n, false], + [0x800000000000000000000001n, -0x800000000000000000000001n, false], + [0xfffffffffffffffffffffffen, -0x800000000000000000000001n, false], + [0xffffffffffffffffffffffffn, -0x800000000000000000000001n, false], + [0x1000000000000000000000000n, -0x800000000000000000000001n, false], + [0x1000000000000000000000001n, -0x800000000000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x800000000000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x800000000000000000000001n, false], + [0x80000000000000000000000000000000n, -0x800000000000000000000001n, false], + [0x80000000000000000000000000000001n, -0x800000000000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x800000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x800000000000000000000001n, false], + [0x100000000000000000000000000000000n, -0x800000000000000000000001n, false], + [0x100000000000000000000000000000001n, -0x800000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x800000000000000000000000n, true], + [-0x100000000000000000000000000000000n, -0x800000000000000000000000n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x800000000000000000000000n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x800000000000000000000000n, true], + [-0x80000000000000000000000000000001n, -0x800000000000000000000000n, true], + [-0x80000000000000000000000000000000n, -0x800000000000000000000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x800000000000000000000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x800000000000000000000000n, true], + [-0x1000000000000000000000001n, -0x800000000000000000000000n, true], + [-0x1000000000000000000000000n, -0x800000000000000000000000n, true], + [-0xffffffffffffffffffffffffn, -0x800000000000000000000000n, true], + [-0xfffffffffffffffffffffffen, -0x800000000000000000000000n, true], + [-0x800000000000000000000001n, -0x800000000000000000000000n, true], + [-0x800000000000000000000000n, -0x800000000000000000000000n, false], + [-0x7fffffffffffffffffffffffn, -0x800000000000000000000000n, false], + [-0x7ffffffffffffffffffffffen, -0x800000000000000000000000n, false], + [-0x10000000000000001n, -0x800000000000000000000000n, false], + [-0x10000000000000000n, -0x800000000000000000000000n, false], + [-0xffffffffffffffffn, -0x800000000000000000000000n, false], + [-0xfffffffffffffffen, -0x800000000000000000000000n, false], + [-0x8000000000000001n, -0x800000000000000000000000n, false], + [-0x8000000000000000n, -0x800000000000000000000000n, false], + [-0x7fffffffffffffffn, -0x800000000000000000000000n, false], + [-0x7ffffffffffffffen, -0x800000000000000000000000n, false], + [-0x100000001n, -0x800000000000000000000000n, false], + [-0x100000000n, -0x800000000000000000000000n, false], + [-0xffffffffn, -0x800000000000000000000000n, false], + [-0xfffffffen, -0x800000000000000000000000n, false], + [-0x80000001n, -0x800000000000000000000000n, false], + [-0x80000000n, -0x800000000000000000000000n, false], + [-0x7fffffffn, -0x800000000000000000000000n, false], + [-0x7ffffffen, -0x800000000000000000000000n, false], + [-2n, -0x800000000000000000000000n, false], + [-1n, -0x800000000000000000000000n, false], + [0n, -0x800000000000000000000000n, false], + [1n, -0x800000000000000000000000n, false], + [2n, -0x800000000000000000000000n, false], + [0x7ffffffen, -0x800000000000000000000000n, false], + [0x7fffffffn, -0x800000000000000000000000n, false], + [0x80000000n, -0x800000000000000000000000n, false], + [0x80000001n, -0x800000000000000000000000n, false], + [0xfffffffen, -0x800000000000000000000000n, false], + [0xffffffffn, -0x800000000000000000000000n, false], + [0x100000000n, -0x800000000000000000000000n, false], + [0x100000001n, -0x800000000000000000000000n, false], + [0x7ffffffffffffffen, -0x800000000000000000000000n, false], + [0x7fffffffffffffffn, -0x800000000000000000000000n, false], + [0x8000000000000000n, -0x800000000000000000000000n, false], + [0x8000000000000001n, -0x800000000000000000000000n, false], + [0xfffffffffffffffen, -0x800000000000000000000000n, false], + [0xffffffffffffffffn, -0x800000000000000000000000n, false], + [0x10000000000000000n, -0x800000000000000000000000n, false], + [0x10000000000000001n, -0x800000000000000000000000n, false], + [0x7ffffffffffffffffffffffen, -0x800000000000000000000000n, false], + [0x7fffffffffffffffffffffffn, -0x800000000000000000000000n, false], + [0x800000000000000000000000n, -0x800000000000000000000000n, false], + [0x800000000000000000000001n, -0x800000000000000000000000n, false], + [0xfffffffffffffffffffffffen, -0x800000000000000000000000n, false], + [0xffffffffffffffffffffffffn, -0x800000000000000000000000n, false], + [0x1000000000000000000000000n, -0x800000000000000000000000n, false], + [0x1000000000000000000000001n, -0x800000000000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x800000000000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x800000000000000000000000n, false], + [0x80000000000000000000000000000000n, -0x800000000000000000000000n, false], + [0x80000000000000000000000000000001n, -0x800000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x800000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x800000000000000000000000n, false], + [0x100000000000000000000000000000000n, -0x800000000000000000000000n, false], + [0x100000000000000000000000000000001n, -0x800000000000000000000000n, false], + [-0x100000000000000000000000000000001n, -0x7fffffffffffffffffffffffn, true], + [-0x100000000000000000000000000000000n, -0x7fffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000001n, -0x7fffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000000n, -0x7fffffffffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, true], + [-0x1000000000000000000000001n, -0x7fffffffffffffffffffffffn, true], + [-0x1000000000000000000000000n, -0x7fffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, true], + [-0x800000000000000000000001n, -0x7fffffffffffffffffffffffn, true], + [-0x800000000000000000000000n, -0x7fffffffffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [-0x10000000000000001n, -0x7fffffffffffffffffffffffn, false], + [-0x10000000000000000n, -0x7fffffffffffffffffffffffn, false], + [-0xffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [-0xfffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [-0x8000000000000001n, -0x7fffffffffffffffffffffffn, false], + [-0x8000000000000000n, -0x7fffffffffffffffffffffffn, false], + [-0x7fffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [-0x7ffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [-0x100000001n, -0x7fffffffffffffffffffffffn, false], + [-0x100000000n, -0x7fffffffffffffffffffffffn, false], + [-0xffffffffn, -0x7fffffffffffffffffffffffn, false], + [-0xfffffffen, -0x7fffffffffffffffffffffffn, false], + [-0x80000001n, -0x7fffffffffffffffffffffffn, false], + [-0x80000000n, -0x7fffffffffffffffffffffffn, false], + [-0x7fffffffn, -0x7fffffffffffffffffffffffn, false], + [-0x7ffffffen, -0x7fffffffffffffffffffffffn, false], + [-2n, -0x7fffffffffffffffffffffffn, false], + [-1n, -0x7fffffffffffffffffffffffn, false], + [0n, -0x7fffffffffffffffffffffffn, false], + [1n, -0x7fffffffffffffffffffffffn, false], + [2n, -0x7fffffffffffffffffffffffn, false], + [0x7ffffffen, -0x7fffffffffffffffffffffffn, false], + [0x7fffffffn, -0x7fffffffffffffffffffffffn, false], + [0x80000000n, -0x7fffffffffffffffffffffffn, false], + [0x80000001n, -0x7fffffffffffffffffffffffn, false], + [0xfffffffen, -0x7fffffffffffffffffffffffn, false], + [0xffffffffn, -0x7fffffffffffffffffffffffn, false], + [0x100000000n, -0x7fffffffffffffffffffffffn, false], + [0x100000001n, -0x7fffffffffffffffffffffffn, false], + [0x7ffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [0x7fffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [0x8000000000000000n, -0x7fffffffffffffffffffffffn, false], + [0x8000000000000001n, -0x7fffffffffffffffffffffffn, false], + [0xfffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [0xffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [0x10000000000000000n, -0x7fffffffffffffffffffffffn, false], + [0x10000000000000001n, -0x7fffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [0x800000000000000000000000n, -0x7fffffffffffffffffffffffn, false], + [0x800000000000000000000001n, -0x7fffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [0x1000000000000000000000000n, -0x7fffffffffffffffffffffffn, false], + [0x1000000000000000000000001n, -0x7fffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [0x80000000000000000000000000000000n, -0x7fffffffffffffffffffffffn, false], + [0x80000000000000000000000000000001n, -0x7fffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, -0x7fffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, -0x7fffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, -0x7ffffffffffffffffffffffen, true], + [-0x100000000000000000000000000000000n, -0x7ffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000001n, -0x7ffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000000n, -0x7ffffffffffffffffffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, true], + [-0x1000000000000000000000001n, -0x7ffffffffffffffffffffffen, true], + [-0x1000000000000000000000000n, -0x7ffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, true], + [-0x800000000000000000000001n, -0x7ffffffffffffffffffffffen, true], + [-0x800000000000000000000000n, -0x7ffffffffffffffffffffffen, true], + [-0x7fffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, true], + [-0x7ffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [-0x10000000000000001n, -0x7ffffffffffffffffffffffen, false], + [-0x10000000000000000n, -0x7ffffffffffffffffffffffen, false], + [-0xffffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [-0xfffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [-0x8000000000000001n, -0x7ffffffffffffffffffffffen, false], + [-0x8000000000000000n, -0x7ffffffffffffffffffffffen, false], + [-0x7fffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [-0x7ffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [-0x100000001n, -0x7ffffffffffffffffffffffen, false], + [-0x100000000n, -0x7ffffffffffffffffffffffen, false], + [-0xffffffffn, -0x7ffffffffffffffffffffffen, false], + [-0xfffffffen, -0x7ffffffffffffffffffffffen, false], + [-0x80000001n, -0x7ffffffffffffffffffffffen, false], + [-0x80000000n, -0x7ffffffffffffffffffffffen, false], + [-0x7fffffffn, -0x7ffffffffffffffffffffffen, false], + [-0x7ffffffen, -0x7ffffffffffffffffffffffen, false], + [-2n, -0x7ffffffffffffffffffffffen, false], + [-1n, -0x7ffffffffffffffffffffffen, false], + [0n, -0x7ffffffffffffffffffffffen, false], + [1n, -0x7ffffffffffffffffffffffen, false], + [2n, -0x7ffffffffffffffffffffffen, false], + [0x7ffffffen, -0x7ffffffffffffffffffffffen, false], + [0x7fffffffn, -0x7ffffffffffffffffffffffen, false], + [0x80000000n, -0x7ffffffffffffffffffffffen, false], + [0x80000001n, -0x7ffffffffffffffffffffffen, false], + [0xfffffffen, -0x7ffffffffffffffffffffffen, false], + [0xffffffffn, -0x7ffffffffffffffffffffffen, false], + [0x100000000n, -0x7ffffffffffffffffffffffen, false], + [0x100000001n, -0x7ffffffffffffffffffffffen, false], + [0x7ffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [0x7fffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [0x8000000000000000n, -0x7ffffffffffffffffffffffen, false], + [0x8000000000000001n, -0x7ffffffffffffffffffffffen, false], + [0xfffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [0xffffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [0x10000000000000000n, -0x7ffffffffffffffffffffffen, false], + [0x10000000000000001n, -0x7ffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [0x800000000000000000000000n, -0x7ffffffffffffffffffffffen, false], + [0x800000000000000000000001n, -0x7ffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [0x1000000000000000000000000n, -0x7ffffffffffffffffffffffen, false], + [0x1000000000000000000000001n, -0x7ffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [0x80000000000000000000000000000000n, -0x7ffffffffffffffffffffffen, false], + [0x80000000000000000000000000000001n, -0x7ffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, -0x7ffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, -0x7ffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0xfffffffffffffffffffffffen, true], + [-0x100000000000000000000000000000000n, 0xfffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000001n, 0xfffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000000n, 0xfffffffffffffffffffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, true], + [-0x1000000000000000000000001n, 0xfffffffffffffffffffffffen, true], + [-0x1000000000000000000000000n, 0xfffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, true], + [-0x800000000000000000000001n, 0xfffffffffffffffffffffffen, true], + [-0x800000000000000000000000n, 0xfffffffffffffffffffffffen, true], + [-0x7fffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, true], + [-0x7ffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, true], + [-0x10000000000000001n, 0xfffffffffffffffffffffffen, true], + [-0x10000000000000000n, 0xfffffffffffffffffffffffen, true], + [-0xffffffffffffffffn, 0xfffffffffffffffffffffffen, true], + [-0xfffffffffffffffen, 0xfffffffffffffffffffffffen, true], + [-0x8000000000000001n, 0xfffffffffffffffffffffffen, true], + [-0x8000000000000000n, 0xfffffffffffffffffffffffen, true], + [-0x7fffffffffffffffn, 0xfffffffffffffffffffffffen, true], + [-0x7ffffffffffffffen, 0xfffffffffffffffffffffffen, true], + [-0x100000001n, 0xfffffffffffffffffffffffen, true], + [-0x100000000n, 0xfffffffffffffffffffffffen, true], + [-0xffffffffn, 0xfffffffffffffffffffffffen, true], + [-0xfffffffen, 0xfffffffffffffffffffffffen, true], + [-0x80000001n, 0xfffffffffffffffffffffffen, true], + [-0x80000000n, 0xfffffffffffffffffffffffen, true], + [-0x7fffffffn, 0xfffffffffffffffffffffffen, true], + [-0x7ffffffen, 0xfffffffffffffffffffffffen, true], + [-2n, 0xfffffffffffffffffffffffen, true], + [-1n, 0xfffffffffffffffffffffffen, true], + [0n, 0xfffffffffffffffffffffffen, true], + [1n, 0xfffffffffffffffffffffffen, true], + [2n, 0xfffffffffffffffffffffffen, true], + [0x7ffffffen, 0xfffffffffffffffffffffffen, true], + [0x7fffffffn, 0xfffffffffffffffffffffffen, true], + [0x80000000n, 0xfffffffffffffffffffffffen, true], + [0x80000001n, 0xfffffffffffffffffffffffen, true], + [0xfffffffen, 0xfffffffffffffffffffffffen, true], + [0xffffffffn, 0xfffffffffffffffffffffffen, true], + [0x100000000n, 0xfffffffffffffffffffffffen, true], + [0x100000001n, 0xfffffffffffffffffffffffen, true], + [0x7ffffffffffffffen, 0xfffffffffffffffffffffffen, true], + [0x7fffffffffffffffn, 0xfffffffffffffffffffffffen, true], + [0x8000000000000000n, 0xfffffffffffffffffffffffen, true], + [0x8000000000000001n, 0xfffffffffffffffffffffffen, true], + [0xfffffffffffffffen, 0xfffffffffffffffffffffffen, true], + [0xffffffffffffffffn, 0xfffffffffffffffffffffffen, true], + [0x10000000000000000n, 0xfffffffffffffffffffffffen, true], + [0x10000000000000001n, 0xfffffffffffffffffffffffen, true], + [0x7ffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, true], + [0x7fffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, true], + [0x800000000000000000000000n, 0xfffffffffffffffffffffffen, true], + [0x800000000000000000000001n, 0xfffffffffffffffffffffffen, true], + [0xfffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, false], + [0x1000000000000000000000000n, 0xfffffffffffffffffffffffen, false], + [0x1000000000000000000000001n, 0xfffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, false], + [0x80000000000000000000000000000000n, 0xfffffffffffffffffffffffen, false], + [0x80000000000000000000000000000001n, 0xfffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, 0xfffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, 0xfffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0xffffffffffffffffffffffffn, true], + [-0x100000000000000000000000000000000n, 0xffffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000001n, 0xffffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000000n, 0xffffffffffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, true], + [-0x1000000000000000000000001n, 0xffffffffffffffffffffffffn, true], + [-0x1000000000000000000000000n, 0xffffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, true], + [-0x800000000000000000000001n, 0xffffffffffffffffffffffffn, true], + [-0x800000000000000000000000n, 0xffffffffffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, true], + [-0x10000000000000001n, 0xffffffffffffffffffffffffn, true], + [-0x10000000000000000n, 0xffffffffffffffffffffffffn, true], + [-0xffffffffffffffffn, 0xffffffffffffffffffffffffn, true], + [-0xfffffffffffffffen, 0xffffffffffffffffffffffffn, true], + [-0x8000000000000001n, 0xffffffffffffffffffffffffn, true], + [-0x8000000000000000n, 0xffffffffffffffffffffffffn, true], + [-0x7fffffffffffffffn, 0xffffffffffffffffffffffffn, true], + [-0x7ffffffffffffffen, 0xffffffffffffffffffffffffn, true], + [-0x100000001n, 0xffffffffffffffffffffffffn, true], + [-0x100000000n, 0xffffffffffffffffffffffffn, true], + [-0xffffffffn, 0xffffffffffffffffffffffffn, true], + [-0xfffffffen, 0xffffffffffffffffffffffffn, true], + [-0x80000001n, 0xffffffffffffffffffffffffn, true], + [-0x80000000n, 0xffffffffffffffffffffffffn, true], + [-0x7fffffffn, 0xffffffffffffffffffffffffn, true], + [-0x7ffffffen, 0xffffffffffffffffffffffffn, true], + [-2n, 0xffffffffffffffffffffffffn, true], + [-1n, 0xffffffffffffffffffffffffn, true], + [0n, 0xffffffffffffffffffffffffn, true], + [1n, 0xffffffffffffffffffffffffn, true], + [2n, 0xffffffffffffffffffffffffn, true], + [0x7ffffffen, 0xffffffffffffffffffffffffn, true], + [0x7fffffffn, 0xffffffffffffffffffffffffn, true], + [0x80000000n, 0xffffffffffffffffffffffffn, true], + [0x80000001n, 0xffffffffffffffffffffffffn, true], + [0xfffffffen, 0xffffffffffffffffffffffffn, true], + [0xffffffffn, 0xffffffffffffffffffffffffn, true], + [0x100000000n, 0xffffffffffffffffffffffffn, true], + [0x100000001n, 0xffffffffffffffffffffffffn, true], + [0x7ffffffffffffffen, 0xffffffffffffffffffffffffn, true], + [0x7fffffffffffffffn, 0xffffffffffffffffffffffffn, true], + [0x8000000000000000n, 0xffffffffffffffffffffffffn, true], + [0x8000000000000001n, 0xffffffffffffffffffffffffn, true], + [0xfffffffffffffffen, 0xffffffffffffffffffffffffn, true], + [0xffffffffffffffffn, 0xffffffffffffffffffffffffn, true], + [0x10000000000000000n, 0xffffffffffffffffffffffffn, true], + [0x10000000000000001n, 0xffffffffffffffffffffffffn, true], + [0x7ffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, true], + [0x7fffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, true], + [0x800000000000000000000000n, 0xffffffffffffffffffffffffn, true], + [0x800000000000000000000001n, 0xffffffffffffffffffffffffn, true], + [0xfffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, true], + [0xffffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, false], + [0x1000000000000000000000000n, 0xffffffffffffffffffffffffn, false], + [0x1000000000000000000000001n, 0xffffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000000n, 0xffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000001n, 0xffffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, 0xffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, 0xffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, 0x1000000000000000000000000n, true], + [-0x100000000000000000000000000000000n, 0x1000000000000000000000000n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x1000000000000000000000000n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x1000000000000000000000000n, true], + [-0x80000000000000000000000000000001n, 0x1000000000000000000000000n, true], + [-0x80000000000000000000000000000000n, 0x1000000000000000000000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x1000000000000000000000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x1000000000000000000000000n, true], + [-0x1000000000000000000000001n, 0x1000000000000000000000000n, true], + [-0x1000000000000000000000000n, 0x1000000000000000000000000n, true], + [-0xffffffffffffffffffffffffn, 0x1000000000000000000000000n, true], + [-0xfffffffffffffffffffffffen, 0x1000000000000000000000000n, true], + [-0x800000000000000000000001n, 0x1000000000000000000000000n, true], + [-0x800000000000000000000000n, 0x1000000000000000000000000n, true], + [-0x7fffffffffffffffffffffffn, 0x1000000000000000000000000n, true], + [-0x7ffffffffffffffffffffffen, 0x1000000000000000000000000n, true], + [-0x10000000000000001n, 0x1000000000000000000000000n, true], + [-0x10000000000000000n, 0x1000000000000000000000000n, true], + [-0xffffffffffffffffn, 0x1000000000000000000000000n, true], + [-0xfffffffffffffffen, 0x1000000000000000000000000n, true], + [-0x8000000000000001n, 0x1000000000000000000000000n, true], + [-0x8000000000000000n, 0x1000000000000000000000000n, true], + [-0x7fffffffffffffffn, 0x1000000000000000000000000n, true], + [-0x7ffffffffffffffen, 0x1000000000000000000000000n, true], + [-0x100000001n, 0x1000000000000000000000000n, true], + [-0x100000000n, 0x1000000000000000000000000n, true], + [-0xffffffffn, 0x1000000000000000000000000n, true], + [-0xfffffffen, 0x1000000000000000000000000n, true], + [-0x80000001n, 0x1000000000000000000000000n, true], + [-0x80000000n, 0x1000000000000000000000000n, true], + [-0x7fffffffn, 0x1000000000000000000000000n, true], + [-0x7ffffffen, 0x1000000000000000000000000n, true], + [-2n, 0x1000000000000000000000000n, true], + [-1n, 0x1000000000000000000000000n, true], + [0n, 0x1000000000000000000000000n, true], + [1n, 0x1000000000000000000000000n, true], + [2n, 0x1000000000000000000000000n, true], + [0x7ffffffen, 0x1000000000000000000000000n, true], + [0x7fffffffn, 0x1000000000000000000000000n, true], + [0x80000000n, 0x1000000000000000000000000n, true], + [0x80000001n, 0x1000000000000000000000000n, true], + [0xfffffffen, 0x1000000000000000000000000n, true], + [0xffffffffn, 0x1000000000000000000000000n, true], + [0x100000000n, 0x1000000000000000000000000n, true], + [0x100000001n, 0x1000000000000000000000000n, true], + [0x7ffffffffffffffen, 0x1000000000000000000000000n, true], + [0x7fffffffffffffffn, 0x1000000000000000000000000n, true], + [0x8000000000000000n, 0x1000000000000000000000000n, true], + [0x8000000000000001n, 0x1000000000000000000000000n, true], + [0xfffffffffffffffen, 0x1000000000000000000000000n, true], + [0xffffffffffffffffn, 0x1000000000000000000000000n, true], + [0x10000000000000000n, 0x1000000000000000000000000n, true], + [0x10000000000000001n, 0x1000000000000000000000000n, true], + [0x7ffffffffffffffffffffffen, 0x1000000000000000000000000n, true], + [0x7fffffffffffffffffffffffn, 0x1000000000000000000000000n, true], + [0x800000000000000000000000n, 0x1000000000000000000000000n, true], + [0x800000000000000000000001n, 0x1000000000000000000000000n, true], + [0xfffffffffffffffffffffffen, 0x1000000000000000000000000n, true], + [0xffffffffffffffffffffffffn, 0x1000000000000000000000000n, true], + [0x1000000000000000000000000n, 0x1000000000000000000000000n, false], + [0x1000000000000000000000001n, 0x1000000000000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x1000000000000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x1000000000000000000000000n, false], + [0x80000000000000000000000000000000n, 0x1000000000000000000000000n, false], + [0x80000000000000000000000000000001n, 0x1000000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x1000000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x1000000000000000000000000n, false], + [0x100000000000000000000000000000000n, 0x1000000000000000000000000n, false], + [0x100000000000000000000000000000001n, 0x1000000000000000000000000n, false], + [-0x100000000000000000000000000000001n, 0x1000000000000000000000001n, true], + [-0x100000000000000000000000000000000n, 0x1000000000000000000000001n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x1000000000000000000000001n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x1000000000000000000000001n, true], + [-0x80000000000000000000000000000001n, 0x1000000000000000000000001n, true], + [-0x80000000000000000000000000000000n, 0x1000000000000000000000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x1000000000000000000000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x1000000000000000000000001n, true], + [-0x1000000000000000000000001n, 0x1000000000000000000000001n, true], + [-0x1000000000000000000000000n, 0x1000000000000000000000001n, true], + [-0xffffffffffffffffffffffffn, 0x1000000000000000000000001n, true], + [-0xfffffffffffffffffffffffen, 0x1000000000000000000000001n, true], + [-0x800000000000000000000001n, 0x1000000000000000000000001n, true], + [-0x800000000000000000000000n, 0x1000000000000000000000001n, true], + [-0x7fffffffffffffffffffffffn, 0x1000000000000000000000001n, true], + [-0x7ffffffffffffffffffffffen, 0x1000000000000000000000001n, true], + [-0x10000000000000001n, 0x1000000000000000000000001n, true], + [-0x10000000000000000n, 0x1000000000000000000000001n, true], + [-0xffffffffffffffffn, 0x1000000000000000000000001n, true], + [-0xfffffffffffffffen, 0x1000000000000000000000001n, true], + [-0x8000000000000001n, 0x1000000000000000000000001n, true], + [-0x8000000000000000n, 0x1000000000000000000000001n, true], + [-0x7fffffffffffffffn, 0x1000000000000000000000001n, true], + [-0x7ffffffffffffffen, 0x1000000000000000000000001n, true], + [-0x100000001n, 0x1000000000000000000000001n, true], + [-0x100000000n, 0x1000000000000000000000001n, true], + [-0xffffffffn, 0x1000000000000000000000001n, true], + [-0xfffffffen, 0x1000000000000000000000001n, true], + [-0x80000001n, 0x1000000000000000000000001n, true], + [-0x80000000n, 0x1000000000000000000000001n, true], + [-0x7fffffffn, 0x1000000000000000000000001n, true], + [-0x7ffffffen, 0x1000000000000000000000001n, true], + [-2n, 0x1000000000000000000000001n, true], + [-1n, 0x1000000000000000000000001n, true], + [0n, 0x1000000000000000000000001n, true], + [1n, 0x1000000000000000000000001n, true], + [2n, 0x1000000000000000000000001n, true], + [0x7ffffffen, 0x1000000000000000000000001n, true], + [0x7fffffffn, 0x1000000000000000000000001n, true], + [0x80000000n, 0x1000000000000000000000001n, true], + [0x80000001n, 0x1000000000000000000000001n, true], + [0xfffffffen, 0x1000000000000000000000001n, true], + [0xffffffffn, 0x1000000000000000000000001n, true], + [0x100000000n, 0x1000000000000000000000001n, true], + [0x100000001n, 0x1000000000000000000000001n, true], + [0x7ffffffffffffffen, 0x1000000000000000000000001n, true], + [0x7fffffffffffffffn, 0x1000000000000000000000001n, true], + [0x8000000000000000n, 0x1000000000000000000000001n, true], + [0x8000000000000001n, 0x1000000000000000000000001n, true], + [0xfffffffffffffffen, 0x1000000000000000000000001n, true], + [0xffffffffffffffffn, 0x1000000000000000000000001n, true], + [0x10000000000000000n, 0x1000000000000000000000001n, true], + [0x10000000000000001n, 0x1000000000000000000000001n, true], + [0x7ffffffffffffffffffffffen, 0x1000000000000000000000001n, true], + [0x7fffffffffffffffffffffffn, 0x1000000000000000000000001n, true], + [0x800000000000000000000000n, 0x1000000000000000000000001n, true], + [0x800000000000000000000001n, 0x1000000000000000000000001n, true], + [0xfffffffffffffffffffffffen, 0x1000000000000000000000001n, true], + [0xffffffffffffffffffffffffn, 0x1000000000000000000000001n, true], + [0x1000000000000000000000000n, 0x1000000000000000000000001n, true], + [0x1000000000000000000000001n, 0x1000000000000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, 0x1000000000000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, 0x1000000000000000000000001n, false], + [0x80000000000000000000000000000000n, 0x1000000000000000000000001n, false], + [0x80000000000000000000000000000001n, 0x1000000000000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x1000000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x1000000000000000000000001n, false], + [0x100000000000000000000000000000000n, 0x1000000000000000000000001n, false], + [0x100000000000000000000000000000001n, 0x1000000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x1000000000000000000000001n, true], + [-0x100000000000000000000000000000000n, -0x1000000000000000000000001n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x1000000000000000000000001n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x1000000000000000000000001n, true], + [-0x80000000000000000000000000000001n, -0x1000000000000000000000001n, true], + [-0x80000000000000000000000000000000n, -0x1000000000000000000000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x1000000000000000000000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x1000000000000000000000001n, true], + [-0x1000000000000000000000001n, -0x1000000000000000000000001n, false], + [-0x1000000000000000000000000n, -0x1000000000000000000000001n, false], + [-0xffffffffffffffffffffffffn, -0x1000000000000000000000001n, false], + [-0xfffffffffffffffffffffffen, -0x1000000000000000000000001n, false], + [-0x800000000000000000000001n, -0x1000000000000000000000001n, false], + [-0x800000000000000000000000n, -0x1000000000000000000000001n, false], + [-0x7fffffffffffffffffffffffn, -0x1000000000000000000000001n, false], + [-0x7ffffffffffffffffffffffen, -0x1000000000000000000000001n, false], + [-0x10000000000000001n, -0x1000000000000000000000001n, false], + [-0x10000000000000000n, -0x1000000000000000000000001n, false], + [-0xffffffffffffffffn, -0x1000000000000000000000001n, false], + [-0xfffffffffffffffen, -0x1000000000000000000000001n, false], + [-0x8000000000000001n, -0x1000000000000000000000001n, false], + [-0x8000000000000000n, -0x1000000000000000000000001n, false], + [-0x7fffffffffffffffn, -0x1000000000000000000000001n, false], + [-0x7ffffffffffffffen, -0x1000000000000000000000001n, false], + [-0x100000001n, -0x1000000000000000000000001n, false], + [-0x100000000n, -0x1000000000000000000000001n, false], + [-0xffffffffn, -0x1000000000000000000000001n, false], + [-0xfffffffen, -0x1000000000000000000000001n, false], + [-0x80000001n, -0x1000000000000000000000001n, false], + [-0x80000000n, -0x1000000000000000000000001n, false], + [-0x7fffffffn, -0x1000000000000000000000001n, false], + [-0x7ffffffen, -0x1000000000000000000000001n, false], + [-2n, -0x1000000000000000000000001n, false], + [-1n, -0x1000000000000000000000001n, false], + [0n, -0x1000000000000000000000001n, false], + [1n, -0x1000000000000000000000001n, false], + [2n, -0x1000000000000000000000001n, false], + [0x7ffffffen, -0x1000000000000000000000001n, false], + [0x7fffffffn, -0x1000000000000000000000001n, false], + [0x80000000n, -0x1000000000000000000000001n, false], + [0x80000001n, -0x1000000000000000000000001n, false], + [0xfffffffen, -0x1000000000000000000000001n, false], + [0xffffffffn, -0x1000000000000000000000001n, false], + [0x100000000n, -0x1000000000000000000000001n, false], + [0x100000001n, -0x1000000000000000000000001n, false], + [0x7ffffffffffffffen, -0x1000000000000000000000001n, false], + [0x7fffffffffffffffn, -0x1000000000000000000000001n, false], + [0x8000000000000000n, -0x1000000000000000000000001n, false], + [0x8000000000000001n, -0x1000000000000000000000001n, false], + [0xfffffffffffffffen, -0x1000000000000000000000001n, false], + [0xffffffffffffffffn, -0x1000000000000000000000001n, false], + [0x10000000000000000n, -0x1000000000000000000000001n, false], + [0x10000000000000001n, -0x1000000000000000000000001n, false], + [0x7ffffffffffffffffffffffen, -0x1000000000000000000000001n, false], + [0x7fffffffffffffffffffffffn, -0x1000000000000000000000001n, false], + [0x800000000000000000000000n, -0x1000000000000000000000001n, false], + [0x800000000000000000000001n, -0x1000000000000000000000001n, false], + [0xfffffffffffffffffffffffen, -0x1000000000000000000000001n, false], + [0xffffffffffffffffffffffffn, -0x1000000000000000000000001n, false], + [0x1000000000000000000000000n, -0x1000000000000000000000001n, false], + [0x1000000000000000000000001n, -0x1000000000000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x1000000000000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x1000000000000000000000001n, false], + [0x80000000000000000000000000000000n, -0x1000000000000000000000001n, false], + [0x80000000000000000000000000000001n, -0x1000000000000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x1000000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x1000000000000000000000001n, false], + [0x100000000000000000000000000000000n, -0x1000000000000000000000001n, false], + [0x100000000000000000000000000000001n, -0x1000000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x1000000000000000000000000n, true], + [-0x100000000000000000000000000000000n, -0x1000000000000000000000000n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x1000000000000000000000000n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x1000000000000000000000000n, true], + [-0x80000000000000000000000000000001n, -0x1000000000000000000000000n, true], + [-0x80000000000000000000000000000000n, -0x1000000000000000000000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x1000000000000000000000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x1000000000000000000000000n, true], + [-0x1000000000000000000000001n, -0x1000000000000000000000000n, true], + [-0x1000000000000000000000000n, -0x1000000000000000000000000n, false], + [-0xffffffffffffffffffffffffn, -0x1000000000000000000000000n, false], + [-0xfffffffffffffffffffffffen, -0x1000000000000000000000000n, false], + [-0x800000000000000000000001n, -0x1000000000000000000000000n, false], + [-0x800000000000000000000000n, -0x1000000000000000000000000n, false], + [-0x7fffffffffffffffffffffffn, -0x1000000000000000000000000n, false], + [-0x7ffffffffffffffffffffffen, -0x1000000000000000000000000n, false], + [-0x10000000000000001n, -0x1000000000000000000000000n, false], + [-0x10000000000000000n, -0x1000000000000000000000000n, false], + [-0xffffffffffffffffn, -0x1000000000000000000000000n, false], + [-0xfffffffffffffffen, -0x1000000000000000000000000n, false], + [-0x8000000000000001n, -0x1000000000000000000000000n, false], + [-0x8000000000000000n, -0x1000000000000000000000000n, false], + [-0x7fffffffffffffffn, -0x1000000000000000000000000n, false], + [-0x7ffffffffffffffen, -0x1000000000000000000000000n, false], + [-0x100000001n, -0x1000000000000000000000000n, false], + [-0x100000000n, -0x1000000000000000000000000n, false], + [-0xffffffffn, -0x1000000000000000000000000n, false], + [-0xfffffffen, -0x1000000000000000000000000n, false], + [-0x80000001n, -0x1000000000000000000000000n, false], + [-0x80000000n, -0x1000000000000000000000000n, false], + [-0x7fffffffn, -0x1000000000000000000000000n, false], + [-0x7ffffffen, -0x1000000000000000000000000n, false], + [-2n, -0x1000000000000000000000000n, false], + [-1n, -0x1000000000000000000000000n, false], + [0n, -0x1000000000000000000000000n, false], + [1n, -0x1000000000000000000000000n, false], + [2n, -0x1000000000000000000000000n, false], + [0x7ffffffen, -0x1000000000000000000000000n, false], + [0x7fffffffn, -0x1000000000000000000000000n, false], + [0x80000000n, -0x1000000000000000000000000n, false], + [0x80000001n, -0x1000000000000000000000000n, false], + [0xfffffffen, -0x1000000000000000000000000n, false], + [0xffffffffn, -0x1000000000000000000000000n, false], + [0x100000000n, -0x1000000000000000000000000n, false], + [0x100000001n, -0x1000000000000000000000000n, false], + [0x7ffffffffffffffen, -0x1000000000000000000000000n, false], + [0x7fffffffffffffffn, -0x1000000000000000000000000n, false], + [0x8000000000000000n, -0x1000000000000000000000000n, false], + [0x8000000000000001n, -0x1000000000000000000000000n, false], + [0xfffffffffffffffen, -0x1000000000000000000000000n, false], + [0xffffffffffffffffn, -0x1000000000000000000000000n, false], + [0x10000000000000000n, -0x1000000000000000000000000n, false], + [0x10000000000000001n, -0x1000000000000000000000000n, false], + [0x7ffffffffffffffffffffffen, -0x1000000000000000000000000n, false], + [0x7fffffffffffffffffffffffn, -0x1000000000000000000000000n, false], + [0x800000000000000000000000n, -0x1000000000000000000000000n, false], + [0x800000000000000000000001n, -0x1000000000000000000000000n, false], + [0xfffffffffffffffffffffffen, -0x1000000000000000000000000n, false], + [0xffffffffffffffffffffffffn, -0x1000000000000000000000000n, false], + [0x1000000000000000000000000n, -0x1000000000000000000000000n, false], + [0x1000000000000000000000001n, -0x1000000000000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x1000000000000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x1000000000000000000000000n, false], + [0x80000000000000000000000000000000n, -0x1000000000000000000000000n, false], + [0x80000000000000000000000000000001n, -0x1000000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x1000000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x1000000000000000000000000n, false], + [0x100000000000000000000000000000000n, -0x1000000000000000000000000n, false], + [0x100000000000000000000000000000001n, -0x1000000000000000000000000n, false], + [-0x100000000000000000000000000000001n, -0xffffffffffffffffffffffffn, true], + [-0x100000000000000000000000000000000n, -0xffffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000001n, -0xffffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000000n, -0xffffffffffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, true], + [-0x1000000000000000000000001n, -0xffffffffffffffffffffffffn, true], + [-0x1000000000000000000000000n, -0xffffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [-0x800000000000000000000001n, -0xffffffffffffffffffffffffn, false], + [-0x800000000000000000000000n, -0xffffffffffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [-0x10000000000000001n, -0xffffffffffffffffffffffffn, false], + [-0x10000000000000000n, -0xffffffffffffffffffffffffn, false], + [-0xffffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [-0xfffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [-0x8000000000000001n, -0xffffffffffffffffffffffffn, false], + [-0x8000000000000000n, -0xffffffffffffffffffffffffn, false], + [-0x7fffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [-0x7ffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [-0x100000001n, -0xffffffffffffffffffffffffn, false], + [-0x100000000n, -0xffffffffffffffffffffffffn, false], + [-0xffffffffn, -0xffffffffffffffffffffffffn, false], + [-0xfffffffen, -0xffffffffffffffffffffffffn, false], + [-0x80000001n, -0xffffffffffffffffffffffffn, false], + [-0x80000000n, -0xffffffffffffffffffffffffn, false], + [-0x7fffffffn, -0xffffffffffffffffffffffffn, false], + [-0x7ffffffen, -0xffffffffffffffffffffffffn, false], + [-2n, -0xffffffffffffffffffffffffn, false], + [-1n, -0xffffffffffffffffffffffffn, false], + [0n, -0xffffffffffffffffffffffffn, false], + [1n, -0xffffffffffffffffffffffffn, false], + [2n, -0xffffffffffffffffffffffffn, false], + [0x7ffffffen, -0xffffffffffffffffffffffffn, false], + [0x7fffffffn, -0xffffffffffffffffffffffffn, false], + [0x80000000n, -0xffffffffffffffffffffffffn, false], + [0x80000001n, -0xffffffffffffffffffffffffn, false], + [0xfffffffen, -0xffffffffffffffffffffffffn, false], + [0xffffffffn, -0xffffffffffffffffffffffffn, false], + [0x100000000n, -0xffffffffffffffffffffffffn, false], + [0x100000001n, -0xffffffffffffffffffffffffn, false], + [0x7ffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [0x7fffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [0x8000000000000000n, -0xffffffffffffffffffffffffn, false], + [0x8000000000000001n, -0xffffffffffffffffffffffffn, false], + [0xfffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [0xffffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [0x10000000000000000n, -0xffffffffffffffffffffffffn, false], + [0x10000000000000001n, -0xffffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [0x800000000000000000000000n, -0xffffffffffffffffffffffffn, false], + [0x800000000000000000000001n, -0xffffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [0x1000000000000000000000000n, -0xffffffffffffffffffffffffn, false], + [0x1000000000000000000000001n, -0xffffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000000n, -0xffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000001n, -0xffffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, -0xffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, -0xffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, -0xfffffffffffffffffffffffen, true], + [-0x100000000000000000000000000000000n, -0xfffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, -0xfffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000001n, -0xfffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000000n, -0xfffffffffffffffffffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, -0xfffffffffffffffffffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, true], + [-0x1000000000000000000000001n, -0xfffffffffffffffffffffffen, true], + [-0x1000000000000000000000000n, -0xfffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffn, -0xfffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [-0x800000000000000000000001n, -0xfffffffffffffffffffffffen, false], + [-0x800000000000000000000000n, -0xfffffffffffffffffffffffen, false], + [-0x7fffffffffffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [-0x7ffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [-0x10000000000000001n, -0xfffffffffffffffffffffffen, false], + [-0x10000000000000000n, -0xfffffffffffffffffffffffen, false], + [-0xffffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [-0xfffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [-0x8000000000000001n, -0xfffffffffffffffffffffffen, false], + [-0x8000000000000000n, -0xfffffffffffffffffffffffen, false], + [-0x7fffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [-0x7ffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [-0x100000001n, -0xfffffffffffffffffffffffen, false], + [-0x100000000n, -0xfffffffffffffffffffffffen, false], + [-0xffffffffn, -0xfffffffffffffffffffffffen, false], + [-0xfffffffen, -0xfffffffffffffffffffffffen, false], + [-0x80000001n, -0xfffffffffffffffffffffffen, false], + [-0x80000000n, -0xfffffffffffffffffffffffen, false], + [-0x7fffffffn, -0xfffffffffffffffffffffffen, false], + [-0x7ffffffen, -0xfffffffffffffffffffffffen, false], + [-2n, -0xfffffffffffffffffffffffen, false], + [-1n, -0xfffffffffffffffffffffffen, false], + [0n, -0xfffffffffffffffffffffffen, false], + [1n, -0xfffffffffffffffffffffffen, false], + [2n, -0xfffffffffffffffffffffffen, false], + [0x7ffffffen, -0xfffffffffffffffffffffffen, false], + [0x7fffffffn, -0xfffffffffffffffffffffffen, false], + [0x80000000n, -0xfffffffffffffffffffffffen, false], + [0x80000001n, -0xfffffffffffffffffffffffen, false], + [0xfffffffen, -0xfffffffffffffffffffffffen, false], + [0xffffffffn, -0xfffffffffffffffffffffffen, false], + [0x100000000n, -0xfffffffffffffffffffffffen, false], + [0x100000001n, -0xfffffffffffffffffffffffen, false], + [0x7ffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [0x7fffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [0x8000000000000000n, -0xfffffffffffffffffffffffen, false], + [0x8000000000000001n, -0xfffffffffffffffffffffffen, false], + [0xfffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [0xffffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [0x10000000000000000n, -0xfffffffffffffffffffffffen, false], + [0x10000000000000001n, -0xfffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [0x800000000000000000000000n, -0xfffffffffffffffffffffffen, false], + [0x800000000000000000000001n, -0xfffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [0x1000000000000000000000000n, -0xfffffffffffffffffffffffen, false], + [0x1000000000000000000000001n, -0xfffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [0x80000000000000000000000000000000n, -0xfffffffffffffffffffffffen, false], + [0x80000000000000000000000000000001n, -0xfffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0xfffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, -0xfffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, -0xfffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x100000000000000000000000000000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x1000000000000000000000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x1000000000000000000000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x800000000000000000000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x800000000000000000000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x7fffffffffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x7ffffffffffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x10000000000000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x10000000000000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0xffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [-0xfffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x8000000000000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x8000000000000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x7fffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x7ffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x100000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x100000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0xffffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [-0xfffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x80000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x80000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x7fffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [-0x7ffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [-2n, 0x7ffffffffffffffffffffffffffffffen, true], + [-1n, 0x7ffffffffffffffffffffffffffffffen, true], + [0n, 0x7ffffffffffffffffffffffffffffffen, true], + [1n, 0x7ffffffffffffffffffffffffffffffen, true], + [2n, 0x7ffffffffffffffffffffffffffffffen, true], + [0x7ffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [0x7fffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [0x80000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [0x80000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [0xfffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [0xffffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [0x100000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [0x100000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [0x7ffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [0x7fffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [0x8000000000000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [0x8000000000000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [0xfffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [0xffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [0x10000000000000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [0x10000000000000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [0x7ffffffffffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [0x7fffffffffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [0x800000000000000000000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [0x800000000000000000000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [0xfffffffffffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, true], + [0xffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, true], + [0x1000000000000000000000000n, 0x7ffffffffffffffffffffffffffffffen, true], + [0x1000000000000000000000001n, 0x7ffffffffffffffffffffffffffffffen, true], + [0x7ffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, false], + [0x80000000000000000000000000000000n, 0x7ffffffffffffffffffffffffffffffen, false], + [0x80000000000000000000000000000001n, 0x7ffffffffffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, 0x7ffffffffffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0x7ffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, 0x7ffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, 0x7ffffffffffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x100000000000000000000000000000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x1000000000000000000000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x1000000000000000000000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x800000000000000000000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x800000000000000000000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x10000000000000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x10000000000000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0xffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [-0xfffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x8000000000000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x8000000000000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x7fffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x7ffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x100000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x100000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0xffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [-0xfffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x80000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x80000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x7fffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [-0x7ffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [-2n, 0x7fffffffffffffffffffffffffffffffn, true], + [-1n, 0x7fffffffffffffffffffffffffffffffn, true], + [0n, 0x7fffffffffffffffffffffffffffffffn, true], + [1n, 0x7fffffffffffffffffffffffffffffffn, true], + [2n, 0x7fffffffffffffffffffffffffffffffn, true], + [0x7ffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [0x7fffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [0x80000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [0x80000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [0xfffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [0xffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [0x100000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [0x100000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [0x7ffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [0x7fffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [0x8000000000000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [0x8000000000000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [0xfffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [0xffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [0x10000000000000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [0x10000000000000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [0x7ffffffffffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [0x7fffffffffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [0x800000000000000000000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [0x800000000000000000000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [0xfffffffffffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [0xffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, true], + [0x1000000000000000000000000n, 0x7fffffffffffffffffffffffffffffffn, true], + [0x1000000000000000000000001n, 0x7fffffffffffffffffffffffffffffffn, true], + [0x7ffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, true], + [0x7fffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000000n, 0x7fffffffffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000001n, 0x7fffffffffffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, 0x7fffffffffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, 0x7fffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, 0x7fffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, 0x7fffffffffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, 0x80000000000000000000000000000000n, true], + [-0x100000000000000000000000000000000n, 0x80000000000000000000000000000000n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000000n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000000n, true], + [-0x80000000000000000000000000000001n, 0x80000000000000000000000000000000n, true], + [-0x80000000000000000000000000000000n, 0x80000000000000000000000000000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000000n, true], + [-0x1000000000000000000000001n, 0x80000000000000000000000000000000n, true], + [-0x1000000000000000000000000n, 0x80000000000000000000000000000000n, true], + [-0xffffffffffffffffffffffffn, 0x80000000000000000000000000000000n, true], + [-0xfffffffffffffffffffffffen, 0x80000000000000000000000000000000n, true], + [-0x800000000000000000000001n, 0x80000000000000000000000000000000n, true], + [-0x800000000000000000000000n, 0x80000000000000000000000000000000n, true], + [-0x7fffffffffffffffffffffffn, 0x80000000000000000000000000000000n, true], + [-0x7ffffffffffffffffffffffen, 0x80000000000000000000000000000000n, true], + [-0x10000000000000001n, 0x80000000000000000000000000000000n, true], + [-0x10000000000000000n, 0x80000000000000000000000000000000n, true], + [-0xffffffffffffffffn, 0x80000000000000000000000000000000n, true], + [-0xfffffffffffffffen, 0x80000000000000000000000000000000n, true], + [-0x8000000000000001n, 0x80000000000000000000000000000000n, true], + [-0x8000000000000000n, 0x80000000000000000000000000000000n, true], + [-0x7fffffffffffffffn, 0x80000000000000000000000000000000n, true], + [-0x7ffffffffffffffen, 0x80000000000000000000000000000000n, true], + [-0x100000001n, 0x80000000000000000000000000000000n, true], + [-0x100000000n, 0x80000000000000000000000000000000n, true], + [-0xffffffffn, 0x80000000000000000000000000000000n, true], + [-0xfffffffen, 0x80000000000000000000000000000000n, true], + [-0x80000001n, 0x80000000000000000000000000000000n, true], + [-0x80000000n, 0x80000000000000000000000000000000n, true], + [-0x7fffffffn, 0x80000000000000000000000000000000n, true], + [-0x7ffffffen, 0x80000000000000000000000000000000n, true], + [-2n, 0x80000000000000000000000000000000n, true], + [-1n, 0x80000000000000000000000000000000n, true], + [0n, 0x80000000000000000000000000000000n, true], + [1n, 0x80000000000000000000000000000000n, true], + [2n, 0x80000000000000000000000000000000n, true], + [0x7ffffffen, 0x80000000000000000000000000000000n, true], + [0x7fffffffn, 0x80000000000000000000000000000000n, true], + [0x80000000n, 0x80000000000000000000000000000000n, true], + [0x80000001n, 0x80000000000000000000000000000000n, true], + [0xfffffffen, 0x80000000000000000000000000000000n, true], + [0xffffffffn, 0x80000000000000000000000000000000n, true], + [0x100000000n, 0x80000000000000000000000000000000n, true], + [0x100000001n, 0x80000000000000000000000000000000n, true], + [0x7ffffffffffffffen, 0x80000000000000000000000000000000n, true], + [0x7fffffffffffffffn, 0x80000000000000000000000000000000n, true], + [0x8000000000000000n, 0x80000000000000000000000000000000n, true], + [0x8000000000000001n, 0x80000000000000000000000000000000n, true], + [0xfffffffffffffffen, 0x80000000000000000000000000000000n, true], + [0xffffffffffffffffn, 0x80000000000000000000000000000000n, true], + [0x10000000000000000n, 0x80000000000000000000000000000000n, true], + [0x10000000000000001n, 0x80000000000000000000000000000000n, true], + [0x7ffffffffffffffffffffffen, 0x80000000000000000000000000000000n, true], + [0x7fffffffffffffffffffffffn, 0x80000000000000000000000000000000n, true], + [0x800000000000000000000000n, 0x80000000000000000000000000000000n, true], + [0x800000000000000000000001n, 0x80000000000000000000000000000000n, true], + [0xfffffffffffffffffffffffen, 0x80000000000000000000000000000000n, true], + [0xffffffffffffffffffffffffn, 0x80000000000000000000000000000000n, true], + [0x1000000000000000000000000n, 0x80000000000000000000000000000000n, true], + [0x1000000000000000000000001n, 0x80000000000000000000000000000000n, true], + [0x7ffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000000n, true], + [0x7fffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000000n, true], + [0x80000000000000000000000000000000n, 0x80000000000000000000000000000000n, false], + [0x80000000000000000000000000000001n, 0x80000000000000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000000n, false], + [0x100000000000000000000000000000000n, 0x80000000000000000000000000000000n, false], + [0x100000000000000000000000000000001n, 0x80000000000000000000000000000000n, false], + [-0x100000000000000000000000000000001n, 0x80000000000000000000000000000001n, true], + [-0x100000000000000000000000000000000n, 0x80000000000000000000000000000001n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000001n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000001n, true], + [-0x80000000000000000000000000000001n, 0x80000000000000000000000000000001n, true], + [-0x80000000000000000000000000000000n, 0x80000000000000000000000000000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000001n, true], + [-0x1000000000000000000000001n, 0x80000000000000000000000000000001n, true], + [-0x1000000000000000000000000n, 0x80000000000000000000000000000001n, true], + [-0xffffffffffffffffffffffffn, 0x80000000000000000000000000000001n, true], + [-0xfffffffffffffffffffffffen, 0x80000000000000000000000000000001n, true], + [-0x800000000000000000000001n, 0x80000000000000000000000000000001n, true], + [-0x800000000000000000000000n, 0x80000000000000000000000000000001n, true], + [-0x7fffffffffffffffffffffffn, 0x80000000000000000000000000000001n, true], + [-0x7ffffffffffffffffffffffen, 0x80000000000000000000000000000001n, true], + [-0x10000000000000001n, 0x80000000000000000000000000000001n, true], + [-0x10000000000000000n, 0x80000000000000000000000000000001n, true], + [-0xffffffffffffffffn, 0x80000000000000000000000000000001n, true], + [-0xfffffffffffffffen, 0x80000000000000000000000000000001n, true], + [-0x8000000000000001n, 0x80000000000000000000000000000001n, true], + [-0x8000000000000000n, 0x80000000000000000000000000000001n, true], + [-0x7fffffffffffffffn, 0x80000000000000000000000000000001n, true], + [-0x7ffffffffffffffen, 0x80000000000000000000000000000001n, true], + [-0x100000001n, 0x80000000000000000000000000000001n, true], + [-0x100000000n, 0x80000000000000000000000000000001n, true], + [-0xffffffffn, 0x80000000000000000000000000000001n, true], + [-0xfffffffen, 0x80000000000000000000000000000001n, true], + [-0x80000001n, 0x80000000000000000000000000000001n, true], + [-0x80000000n, 0x80000000000000000000000000000001n, true], + [-0x7fffffffn, 0x80000000000000000000000000000001n, true], + [-0x7ffffffen, 0x80000000000000000000000000000001n, true], + [-2n, 0x80000000000000000000000000000001n, true], + [-1n, 0x80000000000000000000000000000001n, true], + [0n, 0x80000000000000000000000000000001n, true], + [1n, 0x80000000000000000000000000000001n, true], + [2n, 0x80000000000000000000000000000001n, true], + [0x7ffffffen, 0x80000000000000000000000000000001n, true], + [0x7fffffffn, 0x80000000000000000000000000000001n, true], + [0x80000000n, 0x80000000000000000000000000000001n, true], + [0x80000001n, 0x80000000000000000000000000000001n, true], + [0xfffffffen, 0x80000000000000000000000000000001n, true], + [0xffffffffn, 0x80000000000000000000000000000001n, true], + [0x100000000n, 0x80000000000000000000000000000001n, true], + [0x100000001n, 0x80000000000000000000000000000001n, true], + [0x7ffffffffffffffen, 0x80000000000000000000000000000001n, true], + [0x7fffffffffffffffn, 0x80000000000000000000000000000001n, true], + [0x8000000000000000n, 0x80000000000000000000000000000001n, true], + [0x8000000000000001n, 0x80000000000000000000000000000001n, true], + [0xfffffffffffffffen, 0x80000000000000000000000000000001n, true], + [0xffffffffffffffffn, 0x80000000000000000000000000000001n, true], + [0x10000000000000000n, 0x80000000000000000000000000000001n, true], + [0x10000000000000001n, 0x80000000000000000000000000000001n, true], + [0x7ffffffffffffffffffffffen, 0x80000000000000000000000000000001n, true], + [0x7fffffffffffffffffffffffn, 0x80000000000000000000000000000001n, true], + [0x800000000000000000000000n, 0x80000000000000000000000000000001n, true], + [0x800000000000000000000001n, 0x80000000000000000000000000000001n, true], + [0xfffffffffffffffffffffffen, 0x80000000000000000000000000000001n, true], + [0xffffffffffffffffffffffffn, 0x80000000000000000000000000000001n, true], + [0x1000000000000000000000000n, 0x80000000000000000000000000000001n, true], + [0x1000000000000000000000001n, 0x80000000000000000000000000000001n, true], + [0x7ffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000001n, true], + [0x7fffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000001n, true], + [0x80000000000000000000000000000000n, 0x80000000000000000000000000000001n, true], + [0x80000000000000000000000000000001n, 0x80000000000000000000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, 0x80000000000000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, 0x80000000000000000000000000000001n, false], + [0x100000000000000000000000000000000n, 0x80000000000000000000000000000001n, false], + [0x100000000000000000000000000000001n, 0x80000000000000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x80000000000000000000000000000001n, true], + [-0x100000000000000000000000000000000n, -0x80000000000000000000000000000001n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000001n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000001n, true], + [-0x80000000000000000000000000000001n, -0x80000000000000000000000000000001n, false], + [-0x80000000000000000000000000000000n, -0x80000000000000000000000000000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000001n, false], + [-0x1000000000000000000000001n, -0x80000000000000000000000000000001n, false], + [-0x1000000000000000000000000n, -0x80000000000000000000000000000001n, false], + [-0xffffffffffffffffffffffffn, -0x80000000000000000000000000000001n, false], + [-0xfffffffffffffffffffffffen, -0x80000000000000000000000000000001n, false], + [-0x800000000000000000000001n, -0x80000000000000000000000000000001n, false], + [-0x800000000000000000000000n, -0x80000000000000000000000000000001n, false], + [-0x7fffffffffffffffffffffffn, -0x80000000000000000000000000000001n, false], + [-0x7ffffffffffffffffffffffen, -0x80000000000000000000000000000001n, false], + [-0x10000000000000001n, -0x80000000000000000000000000000001n, false], + [-0x10000000000000000n, -0x80000000000000000000000000000001n, false], + [-0xffffffffffffffffn, -0x80000000000000000000000000000001n, false], + [-0xfffffffffffffffen, -0x80000000000000000000000000000001n, false], + [-0x8000000000000001n, -0x80000000000000000000000000000001n, false], + [-0x8000000000000000n, -0x80000000000000000000000000000001n, false], + [-0x7fffffffffffffffn, -0x80000000000000000000000000000001n, false], + [-0x7ffffffffffffffen, -0x80000000000000000000000000000001n, false], + [-0x100000001n, -0x80000000000000000000000000000001n, false], + [-0x100000000n, -0x80000000000000000000000000000001n, false], + [-0xffffffffn, -0x80000000000000000000000000000001n, false], + [-0xfffffffen, -0x80000000000000000000000000000001n, false], + [-0x80000001n, -0x80000000000000000000000000000001n, false], + [-0x80000000n, -0x80000000000000000000000000000001n, false], + [-0x7fffffffn, -0x80000000000000000000000000000001n, false], + [-0x7ffffffen, -0x80000000000000000000000000000001n, false], + [-2n, -0x80000000000000000000000000000001n, false], + [-1n, -0x80000000000000000000000000000001n, false], + [0n, -0x80000000000000000000000000000001n, false], + [1n, -0x80000000000000000000000000000001n, false], + [2n, -0x80000000000000000000000000000001n, false], + [0x7ffffffen, -0x80000000000000000000000000000001n, false], + [0x7fffffffn, -0x80000000000000000000000000000001n, false], + [0x80000000n, -0x80000000000000000000000000000001n, false], + [0x80000001n, -0x80000000000000000000000000000001n, false], + [0xfffffffen, -0x80000000000000000000000000000001n, false], + [0xffffffffn, -0x80000000000000000000000000000001n, false], + [0x100000000n, -0x80000000000000000000000000000001n, false], + [0x100000001n, -0x80000000000000000000000000000001n, false], + [0x7ffffffffffffffen, -0x80000000000000000000000000000001n, false], + [0x7fffffffffffffffn, -0x80000000000000000000000000000001n, false], + [0x8000000000000000n, -0x80000000000000000000000000000001n, false], + [0x8000000000000001n, -0x80000000000000000000000000000001n, false], + [0xfffffffffffffffen, -0x80000000000000000000000000000001n, false], + [0xffffffffffffffffn, -0x80000000000000000000000000000001n, false], + [0x10000000000000000n, -0x80000000000000000000000000000001n, false], + [0x10000000000000001n, -0x80000000000000000000000000000001n, false], + [0x7ffffffffffffffffffffffen, -0x80000000000000000000000000000001n, false], + [0x7fffffffffffffffffffffffn, -0x80000000000000000000000000000001n, false], + [0x800000000000000000000000n, -0x80000000000000000000000000000001n, false], + [0x800000000000000000000001n, -0x80000000000000000000000000000001n, false], + [0xfffffffffffffffffffffffen, -0x80000000000000000000000000000001n, false], + [0xffffffffffffffffffffffffn, -0x80000000000000000000000000000001n, false], + [0x1000000000000000000000000n, -0x80000000000000000000000000000001n, false], + [0x1000000000000000000000001n, -0x80000000000000000000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000001n, false], + [0x80000000000000000000000000000000n, -0x80000000000000000000000000000001n, false], + [0x80000000000000000000000000000001n, -0x80000000000000000000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000001n, false], + [0x100000000000000000000000000000000n, -0x80000000000000000000000000000001n, false], + [0x100000000000000000000000000000001n, -0x80000000000000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x80000000000000000000000000000000n, true], + [-0x100000000000000000000000000000000n, -0x80000000000000000000000000000000n, true], + [-0xffffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000000n, true], + [-0xfffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000000n, true], + [-0x80000000000000000000000000000001n, -0x80000000000000000000000000000000n, true], + [-0x80000000000000000000000000000000n, -0x80000000000000000000000000000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000000n, false], + [-0x1000000000000000000000001n, -0x80000000000000000000000000000000n, false], + [-0x1000000000000000000000000n, -0x80000000000000000000000000000000n, false], + [-0xffffffffffffffffffffffffn, -0x80000000000000000000000000000000n, false], + [-0xfffffffffffffffffffffffen, -0x80000000000000000000000000000000n, false], + [-0x800000000000000000000001n, -0x80000000000000000000000000000000n, false], + [-0x800000000000000000000000n, -0x80000000000000000000000000000000n, false], + [-0x7fffffffffffffffffffffffn, -0x80000000000000000000000000000000n, false], + [-0x7ffffffffffffffffffffffen, -0x80000000000000000000000000000000n, false], + [-0x10000000000000001n, -0x80000000000000000000000000000000n, false], + [-0x10000000000000000n, -0x80000000000000000000000000000000n, false], + [-0xffffffffffffffffn, -0x80000000000000000000000000000000n, false], + [-0xfffffffffffffffen, -0x80000000000000000000000000000000n, false], + [-0x8000000000000001n, -0x80000000000000000000000000000000n, false], + [-0x8000000000000000n, -0x80000000000000000000000000000000n, false], + [-0x7fffffffffffffffn, -0x80000000000000000000000000000000n, false], + [-0x7ffffffffffffffen, -0x80000000000000000000000000000000n, false], + [-0x100000001n, -0x80000000000000000000000000000000n, false], + [-0x100000000n, -0x80000000000000000000000000000000n, false], + [-0xffffffffn, -0x80000000000000000000000000000000n, false], + [-0xfffffffen, -0x80000000000000000000000000000000n, false], + [-0x80000001n, -0x80000000000000000000000000000000n, false], + [-0x80000000n, -0x80000000000000000000000000000000n, false], + [-0x7fffffffn, -0x80000000000000000000000000000000n, false], + [-0x7ffffffen, -0x80000000000000000000000000000000n, false], + [-2n, -0x80000000000000000000000000000000n, false], + [-1n, -0x80000000000000000000000000000000n, false], + [0n, -0x80000000000000000000000000000000n, false], + [1n, -0x80000000000000000000000000000000n, false], + [2n, -0x80000000000000000000000000000000n, false], + [0x7ffffffen, -0x80000000000000000000000000000000n, false], + [0x7fffffffn, -0x80000000000000000000000000000000n, false], + [0x80000000n, -0x80000000000000000000000000000000n, false], + [0x80000001n, -0x80000000000000000000000000000000n, false], + [0xfffffffen, -0x80000000000000000000000000000000n, false], + [0xffffffffn, -0x80000000000000000000000000000000n, false], + [0x100000000n, -0x80000000000000000000000000000000n, false], + [0x100000001n, -0x80000000000000000000000000000000n, false], + [0x7ffffffffffffffen, -0x80000000000000000000000000000000n, false], + [0x7fffffffffffffffn, -0x80000000000000000000000000000000n, false], + [0x8000000000000000n, -0x80000000000000000000000000000000n, false], + [0x8000000000000001n, -0x80000000000000000000000000000000n, false], + [0xfffffffffffffffen, -0x80000000000000000000000000000000n, false], + [0xffffffffffffffffn, -0x80000000000000000000000000000000n, false], + [0x10000000000000000n, -0x80000000000000000000000000000000n, false], + [0x10000000000000001n, -0x80000000000000000000000000000000n, false], + [0x7ffffffffffffffffffffffen, -0x80000000000000000000000000000000n, false], + [0x7fffffffffffffffffffffffn, -0x80000000000000000000000000000000n, false], + [0x800000000000000000000000n, -0x80000000000000000000000000000000n, false], + [0x800000000000000000000001n, -0x80000000000000000000000000000000n, false], + [0xfffffffffffffffffffffffen, -0x80000000000000000000000000000000n, false], + [0xffffffffffffffffffffffffn, -0x80000000000000000000000000000000n, false], + [0x1000000000000000000000000n, -0x80000000000000000000000000000000n, false], + [0x1000000000000000000000001n, -0x80000000000000000000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000000n, false], + [0x80000000000000000000000000000000n, -0x80000000000000000000000000000000n, false], + [0x80000000000000000000000000000001n, -0x80000000000000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x80000000000000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x80000000000000000000000000000000n, false], + [0x100000000000000000000000000000000n, -0x80000000000000000000000000000000n, false], + [0x100000000000000000000000000000001n, -0x80000000000000000000000000000000n, false], + [-0x100000000000000000000000000000001n, -0x7fffffffffffffffffffffffffffffffn, true], + [-0x100000000000000000000000000000000n, -0x7fffffffffffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000001n, -0x7fffffffffffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000000n, -0x7fffffffffffffffffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x1000000000000000000000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x1000000000000000000000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x800000000000000000000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x800000000000000000000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x10000000000000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x10000000000000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0xffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [-0xfffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x8000000000000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x8000000000000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x7fffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x7ffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x100000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x100000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0xffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [-0xfffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x80000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x80000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x7fffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x7ffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [-2n, -0x7fffffffffffffffffffffffffffffffn, false], + [-1n, -0x7fffffffffffffffffffffffffffffffn, false], + [0n, -0x7fffffffffffffffffffffffffffffffn, false], + [1n, -0x7fffffffffffffffffffffffffffffffn, false], + [2n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x7ffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [0x7fffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [0x80000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x80000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [0xfffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [0xffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [0x100000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x100000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x7ffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [0x7fffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [0x8000000000000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x8000000000000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [0xfffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [0xffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [0x10000000000000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x10000000000000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [0x800000000000000000000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x800000000000000000000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [0x1000000000000000000000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x1000000000000000000000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0x7fffffffffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0x7fffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, -0x7fffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, -0x7fffffffffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, -0x7ffffffffffffffffffffffffffffffen, true], + [-0x100000000000000000000000000000000n, -0x7ffffffffffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000001n, -0x7ffffffffffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000000n, -0x7ffffffffffffffffffffffffffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x1000000000000000000000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x1000000000000000000000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0xffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x800000000000000000000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x800000000000000000000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x7fffffffffffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x7ffffffffffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x10000000000000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x10000000000000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0xffffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [-0xfffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x8000000000000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x8000000000000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x7fffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x7ffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x100000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x100000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0xffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [-0xfffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x80000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x80000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x7fffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x7ffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [-2n, -0x7ffffffffffffffffffffffffffffffen, false], + [-1n, -0x7ffffffffffffffffffffffffffffffen, false], + [0n, -0x7ffffffffffffffffffffffffffffffen, false], + [1n, -0x7ffffffffffffffffffffffffffffffen, false], + [2n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x7ffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [0x7fffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [0x80000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x80000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [0xfffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [0xffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [0x100000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x100000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x7ffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [0x7fffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [0x8000000000000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x8000000000000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [0xfffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [0xffffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [0x10000000000000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x10000000000000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [0x800000000000000000000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x800000000000000000000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [0x1000000000000000000000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x1000000000000000000000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [0x80000000000000000000000000000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x80000000000000000000000000000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0x7ffffffffffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0x7ffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, -0x7ffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, -0x7ffffffffffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0xfffffffffffffffffffffffffffffffen, true], + [-0x100000000000000000000000000000000n, 0xfffffffffffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000001n, 0xfffffffffffffffffffffffffffffffen, true], + [-0x80000000000000000000000000000000n, 0xfffffffffffffffffffffffffffffffen, true], + [-0x7fffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [-0x7ffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [-0x1000000000000000000000001n, 0xfffffffffffffffffffffffffffffffen, true], + [-0x1000000000000000000000000n, 0xfffffffffffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [-0x800000000000000000000001n, 0xfffffffffffffffffffffffffffffffen, true], + [-0x800000000000000000000000n, 0xfffffffffffffffffffffffffffffffen, true], + [-0x7fffffffffffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [-0x7ffffffffffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [-0x10000000000000001n, 0xfffffffffffffffffffffffffffffffen, true], + [-0x10000000000000000n, 0xfffffffffffffffffffffffffffffffen, true], + [-0xffffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [-0xfffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [-0x8000000000000001n, 0xfffffffffffffffffffffffffffffffen, true], + [-0x8000000000000000n, 0xfffffffffffffffffffffffffffffffen, true], + [-0x7fffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [-0x7ffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [-0x100000001n, 0xfffffffffffffffffffffffffffffffen, true], + [-0x100000000n, 0xfffffffffffffffffffffffffffffffen, true], + [-0xffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [-0xfffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [-0x80000001n, 0xfffffffffffffffffffffffffffffffen, true], + [-0x80000000n, 0xfffffffffffffffffffffffffffffffen, true], + [-0x7fffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [-0x7ffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [-2n, 0xfffffffffffffffffffffffffffffffen, true], + [-1n, 0xfffffffffffffffffffffffffffffffen, true], + [0n, 0xfffffffffffffffffffffffffffffffen, true], + [1n, 0xfffffffffffffffffffffffffffffffen, true], + [2n, 0xfffffffffffffffffffffffffffffffen, true], + [0x7ffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [0x7fffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [0x80000000n, 0xfffffffffffffffffffffffffffffffen, true], + [0x80000001n, 0xfffffffffffffffffffffffffffffffen, true], + [0xfffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [0xffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [0x100000000n, 0xfffffffffffffffffffffffffffffffen, true], + [0x100000001n, 0xfffffffffffffffffffffffffffffffen, true], + [0x7ffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [0x7fffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [0x8000000000000000n, 0xfffffffffffffffffffffffffffffffen, true], + [0x8000000000000001n, 0xfffffffffffffffffffffffffffffffen, true], + [0xfffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [0xffffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [0x10000000000000000n, 0xfffffffffffffffffffffffffffffffen, true], + [0x10000000000000001n, 0xfffffffffffffffffffffffffffffffen, true], + [0x7ffffffffffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [0x7fffffffffffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [0x800000000000000000000000n, 0xfffffffffffffffffffffffffffffffen, true], + [0x800000000000000000000001n, 0xfffffffffffffffffffffffffffffffen, true], + [0xfffffffffffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [0xffffffffffffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [0x1000000000000000000000000n, 0xfffffffffffffffffffffffffffffffen, true], + [0x1000000000000000000000001n, 0xfffffffffffffffffffffffffffffffen, true], + [0x7ffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, true], + [0x7fffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, true], + [0x80000000000000000000000000000000n, 0xfffffffffffffffffffffffffffffffen, true], + [0x80000000000000000000000000000001n, 0xfffffffffffffffffffffffffffffffen, true], + [0xfffffffffffffffffffffffffffffffen, 0xfffffffffffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, 0xfffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, 0xfffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, 0xfffffffffffffffffffffffffffffffen, false], + [-0x100000000000000000000000000000001n, 0xffffffffffffffffffffffffffffffffn, true], + [-0x100000000000000000000000000000000n, 0xffffffffffffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000001n, 0xffffffffffffffffffffffffffffffffn, true], + [-0x80000000000000000000000000000000n, 0xffffffffffffffffffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [-0x1000000000000000000000001n, 0xffffffffffffffffffffffffffffffffn, true], + [-0x1000000000000000000000000n, 0xffffffffffffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [-0xfffffffffffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [-0x800000000000000000000001n, 0xffffffffffffffffffffffffffffffffn, true], + [-0x800000000000000000000000n, 0xffffffffffffffffffffffffffffffffn, true], + [-0x7fffffffffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [-0x7ffffffffffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [-0x10000000000000001n, 0xffffffffffffffffffffffffffffffffn, true], + [-0x10000000000000000n, 0xffffffffffffffffffffffffffffffffn, true], + [-0xffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [-0xfffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [-0x8000000000000001n, 0xffffffffffffffffffffffffffffffffn, true], + [-0x8000000000000000n, 0xffffffffffffffffffffffffffffffffn, true], + [-0x7fffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [-0x7ffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [-0x100000001n, 0xffffffffffffffffffffffffffffffffn, true], + [-0x100000000n, 0xffffffffffffffffffffffffffffffffn, true], + [-0xffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [-0xfffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [-0x80000001n, 0xffffffffffffffffffffffffffffffffn, true], + [-0x80000000n, 0xffffffffffffffffffffffffffffffffn, true], + [-0x7fffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [-0x7ffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [-2n, 0xffffffffffffffffffffffffffffffffn, true], + [-1n, 0xffffffffffffffffffffffffffffffffn, true], + [0n, 0xffffffffffffffffffffffffffffffffn, true], + [1n, 0xffffffffffffffffffffffffffffffffn, true], + [2n, 0xffffffffffffffffffffffffffffffffn, true], + [0x7ffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [0x7fffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [0x80000000n, 0xffffffffffffffffffffffffffffffffn, true], + [0x80000001n, 0xffffffffffffffffffffffffffffffffn, true], + [0xfffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [0xffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [0x100000000n, 0xffffffffffffffffffffffffffffffffn, true], + [0x100000001n, 0xffffffffffffffffffffffffffffffffn, true], + [0x7ffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [0x7fffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [0x8000000000000000n, 0xffffffffffffffffffffffffffffffffn, true], + [0x8000000000000001n, 0xffffffffffffffffffffffffffffffffn, true], + [0xfffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [0xffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [0x10000000000000000n, 0xffffffffffffffffffffffffffffffffn, true], + [0x10000000000000001n, 0xffffffffffffffffffffffffffffffffn, true], + [0x7ffffffffffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [0x7fffffffffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [0x800000000000000000000000n, 0xffffffffffffffffffffffffffffffffn, true], + [0x800000000000000000000001n, 0xffffffffffffffffffffffffffffffffn, true], + [0xfffffffffffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [0xffffffffffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [0x1000000000000000000000000n, 0xffffffffffffffffffffffffffffffffn, true], + [0x1000000000000000000000001n, 0xffffffffffffffffffffffffffffffffn, true], + [0x7ffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [0x7fffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, true], + [0x80000000000000000000000000000000n, 0xffffffffffffffffffffffffffffffffn, true], + [0x80000000000000000000000000000001n, 0xffffffffffffffffffffffffffffffffn, true], + [0xfffffffffffffffffffffffffffffffen, 0xffffffffffffffffffffffffffffffffn, true], + [0xffffffffffffffffffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, 0xffffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, 0xffffffffffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, 0x100000000000000000000000000000000n, true], + [-0x100000000000000000000000000000000n, 0x100000000000000000000000000000000n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x100000000000000000000000000000000n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x100000000000000000000000000000000n, true], + [-0x80000000000000000000000000000001n, 0x100000000000000000000000000000000n, true], + [-0x80000000000000000000000000000000n, 0x100000000000000000000000000000000n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x100000000000000000000000000000000n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x100000000000000000000000000000000n, true], + [-0x1000000000000000000000001n, 0x100000000000000000000000000000000n, true], + [-0x1000000000000000000000000n, 0x100000000000000000000000000000000n, true], + [-0xffffffffffffffffffffffffn, 0x100000000000000000000000000000000n, true], + [-0xfffffffffffffffffffffffen, 0x100000000000000000000000000000000n, true], + [-0x800000000000000000000001n, 0x100000000000000000000000000000000n, true], + [-0x800000000000000000000000n, 0x100000000000000000000000000000000n, true], + [-0x7fffffffffffffffffffffffn, 0x100000000000000000000000000000000n, true], + [-0x7ffffffffffffffffffffffen, 0x100000000000000000000000000000000n, true], + [-0x10000000000000001n, 0x100000000000000000000000000000000n, true], + [-0x10000000000000000n, 0x100000000000000000000000000000000n, true], + [-0xffffffffffffffffn, 0x100000000000000000000000000000000n, true], + [-0xfffffffffffffffen, 0x100000000000000000000000000000000n, true], + [-0x8000000000000001n, 0x100000000000000000000000000000000n, true], + [-0x8000000000000000n, 0x100000000000000000000000000000000n, true], + [-0x7fffffffffffffffn, 0x100000000000000000000000000000000n, true], + [-0x7ffffffffffffffen, 0x100000000000000000000000000000000n, true], + [-0x100000001n, 0x100000000000000000000000000000000n, true], + [-0x100000000n, 0x100000000000000000000000000000000n, true], + [-0xffffffffn, 0x100000000000000000000000000000000n, true], + [-0xfffffffen, 0x100000000000000000000000000000000n, true], + [-0x80000001n, 0x100000000000000000000000000000000n, true], + [-0x80000000n, 0x100000000000000000000000000000000n, true], + [-0x7fffffffn, 0x100000000000000000000000000000000n, true], + [-0x7ffffffen, 0x100000000000000000000000000000000n, true], + [-2n, 0x100000000000000000000000000000000n, true], + [-1n, 0x100000000000000000000000000000000n, true], + [0n, 0x100000000000000000000000000000000n, true], + [1n, 0x100000000000000000000000000000000n, true], + [2n, 0x100000000000000000000000000000000n, true], + [0x7ffffffen, 0x100000000000000000000000000000000n, true], + [0x7fffffffn, 0x100000000000000000000000000000000n, true], + [0x80000000n, 0x100000000000000000000000000000000n, true], + [0x80000001n, 0x100000000000000000000000000000000n, true], + [0xfffffffen, 0x100000000000000000000000000000000n, true], + [0xffffffffn, 0x100000000000000000000000000000000n, true], + [0x100000000n, 0x100000000000000000000000000000000n, true], + [0x100000001n, 0x100000000000000000000000000000000n, true], + [0x7ffffffffffffffen, 0x100000000000000000000000000000000n, true], + [0x7fffffffffffffffn, 0x100000000000000000000000000000000n, true], + [0x8000000000000000n, 0x100000000000000000000000000000000n, true], + [0x8000000000000001n, 0x100000000000000000000000000000000n, true], + [0xfffffffffffffffen, 0x100000000000000000000000000000000n, true], + [0xffffffffffffffffn, 0x100000000000000000000000000000000n, true], + [0x10000000000000000n, 0x100000000000000000000000000000000n, true], + [0x10000000000000001n, 0x100000000000000000000000000000000n, true], + [0x7ffffffffffffffffffffffen, 0x100000000000000000000000000000000n, true], + [0x7fffffffffffffffffffffffn, 0x100000000000000000000000000000000n, true], + [0x800000000000000000000000n, 0x100000000000000000000000000000000n, true], + [0x800000000000000000000001n, 0x100000000000000000000000000000000n, true], + [0xfffffffffffffffffffffffen, 0x100000000000000000000000000000000n, true], + [0xffffffffffffffffffffffffn, 0x100000000000000000000000000000000n, true], + [0x1000000000000000000000000n, 0x100000000000000000000000000000000n, true], + [0x1000000000000000000000001n, 0x100000000000000000000000000000000n, true], + [0x7ffffffffffffffffffffffffffffffen, 0x100000000000000000000000000000000n, true], + [0x7fffffffffffffffffffffffffffffffn, 0x100000000000000000000000000000000n, true], + [0x80000000000000000000000000000000n, 0x100000000000000000000000000000000n, true], + [0x80000000000000000000000000000001n, 0x100000000000000000000000000000000n, true], + [0xfffffffffffffffffffffffffffffffen, 0x100000000000000000000000000000000n, true], + [0xffffffffffffffffffffffffffffffffn, 0x100000000000000000000000000000000n, true], + [0x100000000000000000000000000000000n, 0x100000000000000000000000000000000n, false], + [0x100000000000000000000000000000001n, 0x100000000000000000000000000000000n, false], + [-0x100000000000000000000000000000001n, 0x100000000000000000000000000000001n, true], + [-0x100000000000000000000000000000000n, 0x100000000000000000000000000000001n, true], + [-0xffffffffffffffffffffffffffffffffn, 0x100000000000000000000000000000001n, true], + [-0xfffffffffffffffffffffffffffffffen, 0x100000000000000000000000000000001n, true], + [-0x80000000000000000000000000000001n, 0x100000000000000000000000000000001n, true], + [-0x80000000000000000000000000000000n, 0x100000000000000000000000000000001n, true], + [-0x7fffffffffffffffffffffffffffffffn, 0x100000000000000000000000000000001n, true], + [-0x7ffffffffffffffffffffffffffffffen, 0x100000000000000000000000000000001n, true], + [-0x1000000000000000000000001n, 0x100000000000000000000000000000001n, true], + [-0x1000000000000000000000000n, 0x100000000000000000000000000000001n, true], + [-0xffffffffffffffffffffffffn, 0x100000000000000000000000000000001n, true], + [-0xfffffffffffffffffffffffen, 0x100000000000000000000000000000001n, true], + [-0x800000000000000000000001n, 0x100000000000000000000000000000001n, true], + [-0x800000000000000000000000n, 0x100000000000000000000000000000001n, true], + [-0x7fffffffffffffffffffffffn, 0x100000000000000000000000000000001n, true], + [-0x7ffffffffffffffffffffffen, 0x100000000000000000000000000000001n, true], + [-0x10000000000000001n, 0x100000000000000000000000000000001n, true], + [-0x10000000000000000n, 0x100000000000000000000000000000001n, true], + [-0xffffffffffffffffn, 0x100000000000000000000000000000001n, true], + [-0xfffffffffffffffen, 0x100000000000000000000000000000001n, true], + [-0x8000000000000001n, 0x100000000000000000000000000000001n, true], + [-0x8000000000000000n, 0x100000000000000000000000000000001n, true], + [-0x7fffffffffffffffn, 0x100000000000000000000000000000001n, true], + [-0x7ffffffffffffffen, 0x100000000000000000000000000000001n, true], + [-0x100000001n, 0x100000000000000000000000000000001n, true], + [-0x100000000n, 0x100000000000000000000000000000001n, true], + [-0xffffffffn, 0x100000000000000000000000000000001n, true], + [-0xfffffffen, 0x100000000000000000000000000000001n, true], + [-0x80000001n, 0x100000000000000000000000000000001n, true], + [-0x80000000n, 0x100000000000000000000000000000001n, true], + [-0x7fffffffn, 0x100000000000000000000000000000001n, true], + [-0x7ffffffen, 0x100000000000000000000000000000001n, true], + [-2n, 0x100000000000000000000000000000001n, true], + [-1n, 0x100000000000000000000000000000001n, true], + [0n, 0x100000000000000000000000000000001n, true], + [1n, 0x100000000000000000000000000000001n, true], + [2n, 0x100000000000000000000000000000001n, true], + [0x7ffffffen, 0x100000000000000000000000000000001n, true], + [0x7fffffffn, 0x100000000000000000000000000000001n, true], + [0x80000000n, 0x100000000000000000000000000000001n, true], + [0x80000001n, 0x100000000000000000000000000000001n, true], + [0xfffffffen, 0x100000000000000000000000000000001n, true], + [0xffffffffn, 0x100000000000000000000000000000001n, true], + [0x100000000n, 0x100000000000000000000000000000001n, true], + [0x100000001n, 0x100000000000000000000000000000001n, true], + [0x7ffffffffffffffen, 0x100000000000000000000000000000001n, true], + [0x7fffffffffffffffn, 0x100000000000000000000000000000001n, true], + [0x8000000000000000n, 0x100000000000000000000000000000001n, true], + [0x8000000000000001n, 0x100000000000000000000000000000001n, true], + [0xfffffffffffffffen, 0x100000000000000000000000000000001n, true], + [0xffffffffffffffffn, 0x100000000000000000000000000000001n, true], + [0x10000000000000000n, 0x100000000000000000000000000000001n, true], + [0x10000000000000001n, 0x100000000000000000000000000000001n, true], + [0x7ffffffffffffffffffffffen, 0x100000000000000000000000000000001n, true], + [0x7fffffffffffffffffffffffn, 0x100000000000000000000000000000001n, true], + [0x800000000000000000000000n, 0x100000000000000000000000000000001n, true], + [0x800000000000000000000001n, 0x100000000000000000000000000000001n, true], + [0xfffffffffffffffffffffffen, 0x100000000000000000000000000000001n, true], + [0xffffffffffffffffffffffffn, 0x100000000000000000000000000000001n, true], + [0x1000000000000000000000000n, 0x100000000000000000000000000000001n, true], + [0x1000000000000000000000001n, 0x100000000000000000000000000000001n, true], + [0x7ffffffffffffffffffffffffffffffen, 0x100000000000000000000000000000001n, true], + [0x7fffffffffffffffffffffffffffffffn, 0x100000000000000000000000000000001n, true], + [0x80000000000000000000000000000000n, 0x100000000000000000000000000000001n, true], + [0x80000000000000000000000000000001n, 0x100000000000000000000000000000001n, true], + [0xfffffffffffffffffffffffffffffffen, 0x100000000000000000000000000000001n, true], + [0xffffffffffffffffffffffffffffffffn, 0x100000000000000000000000000000001n, true], + [0x100000000000000000000000000000000n, 0x100000000000000000000000000000001n, true], + [0x100000000000000000000000000000001n, 0x100000000000000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x100000000000000000000000000000001n, false], + [-0x100000000000000000000000000000000n, -0x100000000000000000000000000000001n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x100000000000000000000000000000001n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x100000000000000000000000000000001n, false], + [-0x80000000000000000000000000000001n, -0x100000000000000000000000000000001n, false], + [-0x80000000000000000000000000000000n, -0x100000000000000000000000000000001n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x100000000000000000000000000000001n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x100000000000000000000000000000001n, false], + [-0x1000000000000000000000001n, -0x100000000000000000000000000000001n, false], + [-0x1000000000000000000000000n, -0x100000000000000000000000000000001n, false], + [-0xffffffffffffffffffffffffn, -0x100000000000000000000000000000001n, false], + [-0xfffffffffffffffffffffffen, -0x100000000000000000000000000000001n, false], + [-0x800000000000000000000001n, -0x100000000000000000000000000000001n, false], + [-0x800000000000000000000000n, -0x100000000000000000000000000000001n, false], + [-0x7fffffffffffffffffffffffn, -0x100000000000000000000000000000001n, false], + [-0x7ffffffffffffffffffffffen, -0x100000000000000000000000000000001n, false], + [-0x10000000000000001n, -0x100000000000000000000000000000001n, false], + [-0x10000000000000000n, -0x100000000000000000000000000000001n, false], + [-0xffffffffffffffffn, -0x100000000000000000000000000000001n, false], + [-0xfffffffffffffffen, -0x100000000000000000000000000000001n, false], + [-0x8000000000000001n, -0x100000000000000000000000000000001n, false], + [-0x8000000000000000n, -0x100000000000000000000000000000001n, false], + [-0x7fffffffffffffffn, -0x100000000000000000000000000000001n, false], + [-0x7ffffffffffffffen, -0x100000000000000000000000000000001n, false], + [-0x100000001n, -0x100000000000000000000000000000001n, false], + [-0x100000000n, -0x100000000000000000000000000000001n, false], + [-0xffffffffn, -0x100000000000000000000000000000001n, false], + [-0xfffffffen, -0x100000000000000000000000000000001n, false], + [-0x80000001n, -0x100000000000000000000000000000001n, false], + [-0x80000000n, -0x100000000000000000000000000000001n, false], + [-0x7fffffffn, -0x100000000000000000000000000000001n, false], + [-0x7ffffffen, -0x100000000000000000000000000000001n, false], + [-2n, -0x100000000000000000000000000000001n, false], + [-1n, -0x100000000000000000000000000000001n, false], + [0n, -0x100000000000000000000000000000001n, false], + [1n, -0x100000000000000000000000000000001n, false], + [2n, -0x100000000000000000000000000000001n, false], + [0x7ffffffen, -0x100000000000000000000000000000001n, false], + [0x7fffffffn, -0x100000000000000000000000000000001n, false], + [0x80000000n, -0x100000000000000000000000000000001n, false], + [0x80000001n, -0x100000000000000000000000000000001n, false], + [0xfffffffen, -0x100000000000000000000000000000001n, false], + [0xffffffffn, -0x100000000000000000000000000000001n, false], + [0x100000000n, -0x100000000000000000000000000000001n, false], + [0x100000001n, -0x100000000000000000000000000000001n, false], + [0x7ffffffffffffffen, -0x100000000000000000000000000000001n, false], + [0x7fffffffffffffffn, -0x100000000000000000000000000000001n, false], + [0x8000000000000000n, -0x100000000000000000000000000000001n, false], + [0x8000000000000001n, -0x100000000000000000000000000000001n, false], + [0xfffffffffffffffen, -0x100000000000000000000000000000001n, false], + [0xffffffffffffffffn, -0x100000000000000000000000000000001n, false], + [0x10000000000000000n, -0x100000000000000000000000000000001n, false], + [0x10000000000000001n, -0x100000000000000000000000000000001n, false], + [0x7ffffffffffffffffffffffen, -0x100000000000000000000000000000001n, false], + [0x7fffffffffffffffffffffffn, -0x100000000000000000000000000000001n, false], + [0x800000000000000000000000n, -0x100000000000000000000000000000001n, false], + [0x800000000000000000000001n, -0x100000000000000000000000000000001n, false], + [0xfffffffffffffffffffffffen, -0x100000000000000000000000000000001n, false], + [0xffffffffffffffffffffffffn, -0x100000000000000000000000000000001n, false], + [0x1000000000000000000000000n, -0x100000000000000000000000000000001n, false], + [0x1000000000000000000000001n, -0x100000000000000000000000000000001n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x100000000000000000000000000000001n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x100000000000000000000000000000001n, false], + [0x80000000000000000000000000000000n, -0x100000000000000000000000000000001n, false], + [0x80000000000000000000000000000001n, -0x100000000000000000000000000000001n, false], + [0xfffffffffffffffffffffffffffffffen, -0x100000000000000000000000000000001n, false], + [0xffffffffffffffffffffffffffffffffn, -0x100000000000000000000000000000001n, false], + [0x100000000000000000000000000000000n, -0x100000000000000000000000000000001n, false], + [0x100000000000000000000000000000001n, -0x100000000000000000000000000000001n, false], + [-0x100000000000000000000000000000001n, -0x100000000000000000000000000000000n, true], + [-0x100000000000000000000000000000000n, -0x100000000000000000000000000000000n, false], + [-0xffffffffffffffffffffffffffffffffn, -0x100000000000000000000000000000000n, false], + [-0xfffffffffffffffffffffffffffffffen, -0x100000000000000000000000000000000n, false], + [-0x80000000000000000000000000000001n, -0x100000000000000000000000000000000n, false], + [-0x80000000000000000000000000000000n, -0x100000000000000000000000000000000n, false], + [-0x7fffffffffffffffffffffffffffffffn, -0x100000000000000000000000000000000n, false], + [-0x7ffffffffffffffffffffffffffffffen, -0x100000000000000000000000000000000n, false], + [-0x1000000000000000000000001n, -0x100000000000000000000000000000000n, false], + [-0x1000000000000000000000000n, -0x100000000000000000000000000000000n, false], + [-0xffffffffffffffffffffffffn, -0x100000000000000000000000000000000n, false], + [-0xfffffffffffffffffffffffen, -0x100000000000000000000000000000000n, false], + [-0x800000000000000000000001n, -0x100000000000000000000000000000000n, false], + [-0x800000000000000000000000n, -0x100000000000000000000000000000000n, false], + [-0x7fffffffffffffffffffffffn, -0x100000000000000000000000000000000n, false], + [-0x7ffffffffffffffffffffffen, -0x100000000000000000000000000000000n, false], + [-0x10000000000000001n, -0x100000000000000000000000000000000n, false], + [-0x10000000000000000n, -0x100000000000000000000000000000000n, false], + [-0xffffffffffffffffn, -0x100000000000000000000000000000000n, false], + [-0xfffffffffffffffen, -0x100000000000000000000000000000000n, false], + [-0x8000000000000001n, -0x100000000000000000000000000000000n, false], + [-0x8000000000000000n, -0x100000000000000000000000000000000n, false], + [-0x7fffffffffffffffn, -0x100000000000000000000000000000000n, false], + [-0x7ffffffffffffffen, -0x100000000000000000000000000000000n, false], + [-0x100000001n, -0x100000000000000000000000000000000n, false], + [-0x100000000n, -0x100000000000000000000000000000000n, false], + [-0xffffffffn, -0x100000000000000000000000000000000n, false], + [-0xfffffffen, -0x100000000000000000000000000000000n, false], + [-0x80000001n, -0x100000000000000000000000000000000n, false], + [-0x80000000n, -0x100000000000000000000000000000000n, false], + [-0x7fffffffn, -0x100000000000000000000000000000000n, false], + [-0x7ffffffen, -0x100000000000000000000000000000000n, false], + [-2n, -0x100000000000000000000000000000000n, false], + [-1n, -0x100000000000000000000000000000000n, false], + [0n, -0x100000000000000000000000000000000n, false], + [1n, -0x100000000000000000000000000000000n, false], + [2n, -0x100000000000000000000000000000000n, false], + [0x7ffffffen, -0x100000000000000000000000000000000n, false], + [0x7fffffffn, -0x100000000000000000000000000000000n, false], + [0x80000000n, -0x100000000000000000000000000000000n, false], + [0x80000001n, -0x100000000000000000000000000000000n, false], + [0xfffffffen, -0x100000000000000000000000000000000n, false], + [0xffffffffn, -0x100000000000000000000000000000000n, false], + [0x100000000n, -0x100000000000000000000000000000000n, false], + [0x100000001n, -0x100000000000000000000000000000000n, false], + [0x7ffffffffffffffen, -0x100000000000000000000000000000000n, false], + [0x7fffffffffffffffn, -0x100000000000000000000000000000000n, false], + [0x8000000000000000n, -0x100000000000000000000000000000000n, false], + [0x8000000000000001n, -0x100000000000000000000000000000000n, false], + [0xfffffffffffffffen, -0x100000000000000000000000000000000n, false], + [0xffffffffffffffffn, -0x100000000000000000000000000000000n, false], + [0x10000000000000000n, -0x100000000000000000000000000000000n, false], + [0x10000000000000001n, -0x100000000000000000000000000000000n, false], + [0x7ffffffffffffffffffffffen, -0x100000000000000000000000000000000n, false], + [0x7fffffffffffffffffffffffn, -0x100000000000000000000000000000000n, false], + [0x800000000000000000000000n, -0x100000000000000000000000000000000n, false], + [0x800000000000000000000001n, -0x100000000000000000000000000000000n, false], + [0xfffffffffffffffffffffffen, -0x100000000000000000000000000000000n, false], + [0xffffffffffffffffffffffffn, -0x100000000000000000000000000000000n, false], + [0x1000000000000000000000000n, -0x100000000000000000000000000000000n, false], + [0x1000000000000000000000001n, -0x100000000000000000000000000000000n, false], + [0x7ffffffffffffffffffffffffffffffen, -0x100000000000000000000000000000000n, false], + [0x7fffffffffffffffffffffffffffffffn, -0x100000000000000000000000000000000n, false], + [0x80000000000000000000000000000000n, -0x100000000000000000000000000000000n, false], + [0x80000000000000000000000000000001n, -0x100000000000000000000000000000000n, false], + [0xfffffffffffffffffffffffffffffffen, -0x100000000000000000000000000000000n, false], + [0xffffffffffffffffffffffffffffffffn, -0x100000000000000000000000000000000n, false], + [0x100000000000000000000000000000000n, -0x100000000000000000000000000000000n, false], + [0x100000000000000000000000000000001n, -0x100000000000000000000000000000000n, false], + [-0x100000000000000000000000000000001n, -0xffffffffffffffffffffffffffffffffn, true], + [-0x100000000000000000000000000000000n, -0xffffffffffffffffffffffffffffffffn, true], + [-0xffffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [-0x80000000000000000000000000000001n, -0xffffffffffffffffffffffffffffffffn, false], + [-0x80000000000000000000000000000000n, -0xffffffffffffffffffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [-0x1000000000000000000000001n, -0xffffffffffffffffffffffffffffffffn, false], + [-0x1000000000000000000000000n, -0xffffffffffffffffffffffffffffffffn, false], + [-0xffffffffffffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [-0xfffffffffffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [-0x800000000000000000000001n, -0xffffffffffffffffffffffffffffffffn, false], + [-0x800000000000000000000000n, -0xffffffffffffffffffffffffffffffffn, false], + [-0x7fffffffffffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [-0x7ffffffffffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [-0x10000000000000001n, -0xffffffffffffffffffffffffffffffffn, false], + [-0x10000000000000000n, -0xffffffffffffffffffffffffffffffffn, false], + [-0xffffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [-0xfffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [-0x8000000000000001n, -0xffffffffffffffffffffffffffffffffn, false], + [-0x8000000000000000n, -0xffffffffffffffffffffffffffffffffn, false], + [-0x7fffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [-0x7ffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [-0x100000001n, -0xffffffffffffffffffffffffffffffffn, false], + [-0x100000000n, -0xffffffffffffffffffffffffffffffffn, false], + [-0xffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [-0xfffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [-0x80000001n, -0xffffffffffffffffffffffffffffffffn, false], + [-0x80000000n, -0xffffffffffffffffffffffffffffffffn, false], + [-0x7fffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [-0x7ffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [-2n, -0xffffffffffffffffffffffffffffffffn, false], + [-1n, -0xffffffffffffffffffffffffffffffffn, false], + [0n, -0xffffffffffffffffffffffffffffffffn, false], + [1n, -0xffffffffffffffffffffffffffffffffn, false], + [2n, -0xffffffffffffffffffffffffffffffffn, false], + [0x7ffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [0x7fffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [0x80000000n, -0xffffffffffffffffffffffffffffffffn, false], + [0x80000001n, -0xffffffffffffffffffffffffffffffffn, false], + [0xfffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [0xffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [0x100000000n, -0xffffffffffffffffffffffffffffffffn, false], + [0x100000001n, -0xffffffffffffffffffffffffffffffffn, false], + [0x7ffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [0x7fffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [0x8000000000000000n, -0xffffffffffffffffffffffffffffffffn, false], + [0x8000000000000001n, -0xffffffffffffffffffffffffffffffffn, false], + [0xfffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [0xffffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [0x10000000000000000n, -0xffffffffffffffffffffffffffffffffn, false], + [0x10000000000000001n, -0xffffffffffffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [0x800000000000000000000000n, -0xffffffffffffffffffffffffffffffffn, false], + [0x800000000000000000000001n, -0xffffffffffffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [0x1000000000000000000000000n, -0xffffffffffffffffffffffffffffffffn, false], + [0x1000000000000000000000001n, -0xffffffffffffffffffffffffffffffffn, false], + [0x7ffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [0x7fffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000000n, -0xffffffffffffffffffffffffffffffffn, false], + [0x80000000000000000000000000000001n, -0xffffffffffffffffffffffffffffffffn, false], + [0xfffffffffffffffffffffffffffffffen, -0xffffffffffffffffffffffffffffffffn, false], + [0xffffffffffffffffffffffffffffffffn, -0xffffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000000n, -0xffffffffffffffffffffffffffffffffn, false], + [0x100000000000000000000000000000001n, -0xffffffffffffffffffffffffffffffffn, false], + [-0x100000000000000000000000000000001n, -0xfffffffffffffffffffffffffffffffen, true], + [-0x100000000000000000000000000000000n, -0xfffffffffffffffffffffffffffffffen, true], + [-0xffffffffffffffffffffffffffffffffn, -0xfffffffffffffffffffffffffffffffen, true], + [-0xfffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [-0x80000000000000000000000000000001n, -0xfffffffffffffffffffffffffffffffen, false], + [-0x80000000000000000000000000000000n, -0xfffffffffffffffffffffffffffffffen, false], + [-0x7fffffffffffffffffffffffffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [-0x7ffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [-0x1000000000000000000000001n, -0xfffffffffffffffffffffffffffffffen, false], + [-0x1000000000000000000000000n, -0xfffffffffffffffffffffffffffffffen, false], + [-0xffffffffffffffffffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [-0xfffffffffffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [-0x800000000000000000000001n, -0xfffffffffffffffffffffffffffffffen, false], + [-0x800000000000000000000000n, -0xfffffffffffffffffffffffffffffffen, false], + [-0x7fffffffffffffffffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [-0x7ffffffffffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [-0x10000000000000001n, -0xfffffffffffffffffffffffffffffffen, false], + [-0x10000000000000000n, -0xfffffffffffffffffffffffffffffffen, false], + [-0xffffffffffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [-0xfffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [-0x8000000000000001n, -0xfffffffffffffffffffffffffffffffen, false], + [-0x8000000000000000n, -0xfffffffffffffffffffffffffffffffen, false], + [-0x7fffffffffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [-0x7ffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [-0x100000001n, -0xfffffffffffffffffffffffffffffffen, false], + [-0x100000000n, -0xfffffffffffffffffffffffffffffffen, false], + [-0xffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [-0xfffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [-0x80000001n, -0xfffffffffffffffffffffffffffffffen, false], + [-0x80000000n, -0xfffffffffffffffffffffffffffffffen, false], + [-0x7fffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [-0x7ffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [-2n, -0xfffffffffffffffffffffffffffffffen, false], + [-1n, -0xfffffffffffffffffffffffffffffffen, false], + [0n, -0xfffffffffffffffffffffffffffffffen, false], + [1n, -0xfffffffffffffffffffffffffffffffen, false], + [2n, -0xfffffffffffffffffffffffffffffffen, false], + [0x7ffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [0x7fffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [0x80000000n, -0xfffffffffffffffffffffffffffffffen, false], + [0x80000001n, -0xfffffffffffffffffffffffffffffffen, false], + [0xfffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [0xffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [0x100000000n, -0xfffffffffffffffffffffffffffffffen, false], + [0x100000001n, -0xfffffffffffffffffffffffffffffffen, false], + [0x7ffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [0x7fffffffffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [0x8000000000000000n, -0xfffffffffffffffffffffffffffffffen, false], + [0x8000000000000001n, -0xfffffffffffffffffffffffffffffffen, false], + [0xfffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [0xffffffffffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [0x10000000000000000n, -0xfffffffffffffffffffffffffffffffen, false], + [0x10000000000000001n, -0xfffffffffffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [0x800000000000000000000000n, -0xfffffffffffffffffffffffffffffffen, false], + [0x800000000000000000000001n, -0xfffffffffffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [0x1000000000000000000000000n, -0xfffffffffffffffffffffffffffffffen, false], + [0x1000000000000000000000001n, -0xfffffffffffffffffffffffffffffffen, false], + [0x7ffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [0x7fffffffffffffffffffffffffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [0x80000000000000000000000000000000n, -0xfffffffffffffffffffffffffffffffen, false], + [0x80000000000000000000000000000001n, -0xfffffffffffffffffffffffffffffffen, false], + [0xfffffffffffffffffffffffffffffffen, -0xfffffffffffffffffffffffffffffffen, false], + [0xffffffffffffffffffffffffffffffffn, -0xfffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000000n, -0xfffffffffffffffffffffffffffffffen, false], + [0x100000000000000000000000000000001n, -0xfffffffffffffffffffffffffffffffen, false], +]; + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs < rhs, expected); + assertEq(lhs >= rhs, !expected); + + assertEq(rhs > lhs, expected); + assertEq(rhs <= lhs, !expected); + } +} + +for (let i = 0; i < 5; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-dec.js b/js/src/jit-test/tests/bigint/bigint-dec.js new file mode 100644 index 0000000000..09750c08bd --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-dec.js @@ -0,0 +1,51 @@ +const tests = [ + [-0x10000000000000001n, -0x10000000000000002n], + [-0x10000000000000000n, -0x10000000000000001n], + [-0xffffffffffffffffn, -0x10000000000000000n], + [-0xfffffffffffffffen, -0xffffffffffffffffn], + [-0x8000000000000001n, -0x8000000000000002n], + [-0x8000000000000000n, -0x8000000000000001n], + [-0x7fffffffffffffffn, -0x8000000000000000n], + [-0x7ffffffffffffffen, -0x7fffffffffffffffn], + [-0x100000001n, -0x100000002n], + [-0x100000000n, -0x100000001n], + [-0xffffffffn, -0x100000000n], + [-0xfffffffen, -0xffffffffn], + [-0x80000001n, -0x80000002n], + [-0x80000000n, -0x80000001n], + [-0x7fffffffn, -0x80000000n], + [-0x7ffffffen, -0x7fffffffn], + [-2n, -3n], + [-1n, -2n], + [0n, -1n], + [1n, 0n], + [2n, 1n], + [0x7ffffffen, 0x7ffffffdn], + [0x7fffffffn, 0x7ffffffen], + [0x80000000n, 0x7fffffffn], + [0x80000001n, 0x80000000n], + [0xfffffffen, 0xfffffffdn], + [0xffffffffn, 0xfffffffen], + [0x100000000n, 0xffffffffn], + [0x100000001n, 0x100000000n], + [0x7ffffffffffffffen, 0x7ffffffffffffffdn], + [0x7fffffffffffffffn, 0x7ffffffffffffffen], + [0x8000000000000000n, 0x7fffffffffffffffn], + [0x8000000000000001n, 0x8000000000000000n], + [0xfffffffffffffffen, 0xfffffffffffffffdn], + [0xffffffffffffffffn, 0xfffffffffffffffen], + [0x10000000000000000n, 0xffffffffffffffffn], + [0x10000000000000001n, 0x10000000000000000n], +]; + +function f(tests) { + for (let test of tests) { + let input = test[0], expected = test[1]; + + assertEq(--input, expected); + } +} + +for (let i = 0; i < 200; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-div-bailout.js b/js/src/jit-test/tests/bigint/bigint-div-bailout.js new file mode 100644 index 0000000000..557ae61e5f --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-div-bailout.js @@ -0,0 +1,31 @@ +// |jit-test| --ion-warmup-threshold=20 + +function testBailout() { + function f(v, r) { + for (var i = 0; i < 50; ++i) { + // Ensure DCE and LICM don't eliminate divisions when the divisor is zero. + if (i === 0) { + r(); + } + 1n / v; + 1n / v; + 1n / v; + } + } + + var result = []; + function r() { + result.push("ok"); + } + + do { + result.length = 0; + try { + f(1n, r); + f(1n, r); + f(0n, r); + } catch (e) {} + assertEq(result.length, 3); + } while (!inIon()); +} +testBailout(); diff --git a/js/src/jit-test/tests/bigint/bigint-div-by-zero.js b/js/src/jit-test/tests/bigint/bigint-div-by-zero.js new file mode 100644 index 0000000000..2b84cd45f0 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-div-by-zero.js @@ -0,0 +1,16 @@ +// Fallible BigInt division should have a resume point and its alias set +// should record that exceptions can be thrown. +function resumeAfterException(t) { + for (var i = 0; i < 2; i++) { + try { + var x = 1; + 1n / 1n; + x = 2; + 1n / t; + } catch (e) { + assertEq(x, 2); + } + } +} +resumeAfterException(1n); +resumeAfterException(0n); diff --git a/js/src/jit-test/tests/bigint/bigint-div.js b/js/src/jit-test/tests/bigint/bigint-div.js new file mode 100644 index 0000000000..4cd1516904 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-div.js @@ -0,0 +1,1346 @@ +const tests = [ + [-0x10000000000000001n, -2n, 0x8000000000000000n], + [-0x10000000000000000n, -2n, 0x8000000000000000n], + [-0xffffffffffffffffn, -2n, 0x7fffffffffffffffn], + [-0xfffffffffffffffen, -2n, 0x7fffffffffffffffn], + [-0x8000000000000001n, -2n, 0x4000000000000000n], + [-0x8000000000000000n, -2n, 0x4000000000000000n], + [-0x7fffffffffffffffn, -2n, 0x3fffffffffffffffn], + [-0x7ffffffffffffffen, -2n, 0x3fffffffffffffffn], + [-0x100000001n, -2n, 0x80000000n], + [-0x100000000n, -2n, 0x80000000n], + [-0xffffffffn, -2n, 0x7fffffffn], + [-0xfffffffen, -2n, 0x7fffffffn], + [-0x80000001n, -2n, 0x40000000n], + [-0x80000000n, -2n, 0x40000000n], + [-0x7fffffffn, -2n, 0x3fffffffn], + [-0x7ffffffen, -2n, 0x3fffffffn], + [-2n, -2n, 1n], + [-1n, -2n, 0n], + [0n, -2n, 0n], + [1n, -2n, 0n], + [2n, -2n, -1n], + [0x7ffffffen, -2n, -0x3fffffffn], + [0x7fffffffn, -2n, -0x3fffffffn], + [0x80000000n, -2n, -0x40000000n], + [0x80000001n, -2n, -0x40000000n], + [0xfffffffen, -2n, -0x7fffffffn], + [0xffffffffn, -2n, -0x7fffffffn], + [0x100000000n, -2n, -0x80000000n], + [0x100000001n, -2n, -0x80000000n], + [0x7ffffffffffffffen, -2n, -0x3fffffffffffffffn], + [0x7fffffffffffffffn, -2n, -0x3fffffffffffffffn], + [0x8000000000000000n, -2n, -0x4000000000000000n], + [0x8000000000000001n, -2n, -0x4000000000000000n], + [0xfffffffffffffffen, -2n, -0x7fffffffffffffffn], + [0xffffffffffffffffn, -2n, -0x7fffffffffffffffn], + [0x10000000000000000n, -2n, -0x8000000000000000n], + [0x10000000000000001n, -2n, -0x8000000000000000n], + [-0x10000000000000001n, -1n, 0x10000000000000001n], + [-0x10000000000000000n, -1n, 0x10000000000000000n], + [-0xffffffffffffffffn, -1n, 0xffffffffffffffffn], + [-0xfffffffffffffffen, -1n, 0xfffffffffffffffen], + [-0x8000000000000001n, -1n, 0x8000000000000001n], + [-0x8000000000000000n, -1n, 0x8000000000000000n], + [-0x7fffffffffffffffn, -1n, 0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -1n, 0x7ffffffffffffffen], + [-0x100000001n, -1n, 0x100000001n], + [-0x100000000n, -1n, 0x100000000n], + [-0xffffffffn, -1n, 0xffffffffn], + [-0xfffffffen, -1n, 0xfffffffen], + [-0x80000001n, -1n, 0x80000001n], + [-0x80000000n, -1n, 0x80000000n], + [-0x7fffffffn, -1n, 0x7fffffffn], + [-0x7ffffffen, -1n, 0x7ffffffen], + [-2n, -1n, 2n], + [-1n, -1n, 1n], + [0n, -1n, 0n], + [1n, -1n, -1n], + [2n, -1n, -2n], + [0x7ffffffen, -1n, -0x7ffffffen], + [0x7fffffffn, -1n, -0x7fffffffn], + [0x80000000n, -1n, -0x80000000n], + [0x80000001n, -1n, -0x80000001n], + [0xfffffffen, -1n, -0xfffffffen], + [0xffffffffn, -1n, -0xffffffffn], + [0x100000000n, -1n, -0x100000000n], + [0x100000001n, -1n, -0x100000001n], + [0x7ffffffffffffffen, -1n, -0x7ffffffffffffffen], + [0x7fffffffffffffffn, -1n, -0x7fffffffffffffffn], + [0x8000000000000000n, -1n, -0x8000000000000000n], + [0x8000000000000001n, -1n, -0x8000000000000001n], + [0xfffffffffffffffen, -1n, -0xfffffffffffffffen], + [0xffffffffffffffffn, -1n, -0xffffffffffffffffn], + [0x10000000000000000n, -1n, -0x10000000000000000n], + [0x10000000000000001n, -1n, -0x10000000000000001n], + [-0x10000000000000001n, 1n, -0x10000000000000001n], + [-0x10000000000000000n, 1n, -0x10000000000000000n], + [-0xffffffffffffffffn, 1n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 1n, -0xfffffffffffffffen], + [-0x8000000000000001n, 1n, -0x8000000000000001n], + [-0x8000000000000000n, 1n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 1n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 1n, -0x7ffffffffffffffen], + [-0x100000001n, 1n, -0x100000001n], + [-0x100000000n, 1n, -0x100000000n], + [-0xffffffffn, 1n, -0xffffffffn], + [-0xfffffffen, 1n, -0xfffffffen], + [-0x80000001n, 1n, -0x80000001n], + [-0x80000000n, 1n, -0x80000000n], + [-0x7fffffffn, 1n, -0x7fffffffn], + [-0x7ffffffen, 1n, -0x7ffffffen], + [-2n, 1n, -2n], + [-1n, 1n, -1n], + [0n, 1n, 0n], + [1n, 1n, 1n], + [2n, 1n, 2n], + [0x7ffffffen, 1n, 0x7ffffffen], + [0x7fffffffn, 1n, 0x7fffffffn], + [0x80000000n, 1n, 0x80000000n], + [0x80000001n, 1n, 0x80000001n], + [0xfffffffen, 1n, 0xfffffffen], + [0xffffffffn, 1n, 0xffffffffn], + [0x100000000n, 1n, 0x100000000n], + [0x100000001n, 1n, 0x100000001n], + [0x7ffffffffffffffen, 1n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 1n, 0x7fffffffffffffffn], + [0x8000000000000000n, 1n, 0x8000000000000000n], + [0x8000000000000001n, 1n, 0x8000000000000001n], + [0xfffffffffffffffen, 1n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 1n, 0xffffffffffffffffn], + [0x10000000000000000n, 1n, 0x10000000000000000n], + [0x10000000000000001n, 1n, 0x10000000000000001n], + [-0x10000000000000001n, 2n, -0x8000000000000000n], + [-0x10000000000000000n, 2n, -0x8000000000000000n], + [-0xffffffffffffffffn, 2n, -0x7fffffffffffffffn], + [-0xfffffffffffffffen, 2n, -0x7fffffffffffffffn], + [-0x8000000000000001n, 2n, -0x4000000000000000n], + [-0x8000000000000000n, 2n, -0x4000000000000000n], + [-0x7fffffffffffffffn, 2n, -0x3fffffffffffffffn], + [-0x7ffffffffffffffen, 2n, -0x3fffffffffffffffn], + [-0x100000001n, 2n, -0x80000000n], + [-0x100000000n, 2n, -0x80000000n], + [-0xffffffffn, 2n, -0x7fffffffn], + [-0xfffffffen, 2n, -0x7fffffffn], + [-0x80000001n, 2n, -0x40000000n], + [-0x80000000n, 2n, -0x40000000n], + [-0x7fffffffn, 2n, -0x3fffffffn], + [-0x7ffffffen, 2n, -0x3fffffffn], + [-2n, 2n, -1n], + [-1n, 2n, 0n], + [0n, 2n, 0n], + [1n, 2n, 0n], + [2n, 2n, 1n], + [0x7ffffffen, 2n, 0x3fffffffn], + [0x7fffffffn, 2n, 0x3fffffffn], + [0x80000000n, 2n, 0x40000000n], + [0x80000001n, 2n, 0x40000000n], + [0xfffffffen, 2n, 0x7fffffffn], + [0xffffffffn, 2n, 0x7fffffffn], + [0x100000000n, 2n, 0x80000000n], + [0x100000001n, 2n, 0x80000000n], + [0x7ffffffffffffffen, 2n, 0x3fffffffffffffffn], + [0x7fffffffffffffffn, 2n, 0x3fffffffffffffffn], + [0x8000000000000000n, 2n, 0x4000000000000000n], + [0x8000000000000001n, 2n, 0x4000000000000000n], + [0xfffffffffffffffen, 2n, 0x7fffffffffffffffn], + [0xffffffffffffffffn, 2n, 0x7fffffffffffffffn], + [0x10000000000000000n, 2n, 0x8000000000000000n], + [0x10000000000000001n, 2n, 0x8000000000000000n], + [-0x10000000000000001n, 0x7ffffffen, -0x200000008n], + [-0x10000000000000000n, 0x7ffffffen, -0x200000008n], + [-0xffffffffffffffffn, 0x7ffffffen, -0x200000008n], + [-0xfffffffffffffffen, 0x7ffffffen, -0x200000008n], + [-0x8000000000000001n, 0x7ffffffen, -0x100000004n], + [-0x8000000000000000n, 0x7ffffffen, -0x100000004n], + [-0x7fffffffffffffffn, 0x7ffffffen, -0x100000004n], + [-0x7ffffffffffffffen, 0x7ffffffen, -0x100000004n], + [-0x100000001n, 0x7ffffffen, -2n], + [-0x100000000n, 0x7ffffffen, -2n], + [-0xffffffffn, 0x7ffffffen, -2n], + [-0xfffffffen, 0x7ffffffen, -2n], + [-0x80000001n, 0x7ffffffen, -1n], + [-0x80000000n, 0x7ffffffen, -1n], + [-0x7fffffffn, 0x7ffffffen, -1n], + [-0x7ffffffen, 0x7ffffffen, -1n], + [-2n, 0x7ffffffen, 0n], + [-1n, 0x7ffffffen, 0n], + [0n, 0x7ffffffen, 0n], + [1n, 0x7ffffffen, 0n], + [2n, 0x7ffffffen, 0n], + [0x7ffffffen, 0x7ffffffen, 1n], + [0x7fffffffn, 0x7ffffffen, 1n], + [0x80000000n, 0x7ffffffen, 1n], + [0x80000001n, 0x7ffffffen, 1n], + [0xfffffffen, 0x7ffffffen, 2n], + [0xffffffffn, 0x7ffffffen, 2n], + [0x100000000n, 0x7ffffffen, 2n], + [0x100000001n, 0x7ffffffen, 2n], + [0x7ffffffffffffffen, 0x7ffffffen, 0x100000004n], + [0x7fffffffffffffffn, 0x7ffffffen, 0x100000004n], + [0x8000000000000000n, 0x7ffffffen, 0x100000004n], + [0x8000000000000001n, 0x7ffffffen, 0x100000004n], + [0xfffffffffffffffen, 0x7ffffffen, 0x200000008n], + [0xffffffffffffffffn, 0x7ffffffen, 0x200000008n], + [0x10000000000000000n, 0x7ffffffen, 0x200000008n], + [0x10000000000000001n, 0x7ffffffen, 0x200000008n], + [-0x10000000000000001n, 0x7fffffffn, -0x200000004n], + [-0x10000000000000000n, 0x7fffffffn, -0x200000004n], + [-0xffffffffffffffffn, 0x7fffffffn, -0x200000004n], + [-0xfffffffffffffffen, 0x7fffffffn, -0x200000004n], + [-0x8000000000000001n, 0x7fffffffn, -0x100000002n], + [-0x8000000000000000n, 0x7fffffffn, -0x100000002n], + [-0x7fffffffffffffffn, 0x7fffffffn, -0x100000002n], + [-0x7ffffffffffffffen, 0x7fffffffn, -0x100000002n], + [-0x100000001n, 0x7fffffffn, -2n], + [-0x100000000n, 0x7fffffffn, -2n], + [-0xffffffffn, 0x7fffffffn, -2n], + [-0xfffffffen, 0x7fffffffn, -2n], + [-0x80000001n, 0x7fffffffn, -1n], + [-0x80000000n, 0x7fffffffn, -1n], + [-0x7fffffffn, 0x7fffffffn, -1n], + [-0x7ffffffen, 0x7fffffffn, 0n], + [-2n, 0x7fffffffn, 0n], + [-1n, 0x7fffffffn, 0n], + [0n, 0x7fffffffn, 0n], + [1n, 0x7fffffffn, 0n], + [2n, 0x7fffffffn, 0n], + [0x7ffffffen, 0x7fffffffn, 0n], + [0x7fffffffn, 0x7fffffffn, 1n], + [0x80000000n, 0x7fffffffn, 1n], + [0x80000001n, 0x7fffffffn, 1n], + [0xfffffffen, 0x7fffffffn, 2n], + [0xffffffffn, 0x7fffffffn, 2n], + [0x100000000n, 0x7fffffffn, 2n], + [0x100000001n, 0x7fffffffn, 2n], + [0x7ffffffffffffffen, 0x7fffffffn, 0x100000002n], + [0x7fffffffffffffffn, 0x7fffffffn, 0x100000002n], + [0x8000000000000000n, 0x7fffffffn, 0x100000002n], + [0x8000000000000001n, 0x7fffffffn, 0x100000002n], + [0xfffffffffffffffen, 0x7fffffffn, 0x200000004n], + [0xffffffffffffffffn, 0x7fffffffn, 0x200000004n], + [0x10000000000000000n, 0x7fffffffn, 0x200000004n], + [0x10000000000000001n, 0x7fffffffn, 0x200000004n], + [-0x10000000000000001n, 0x80000000n, -0x200000000n], + [-0x10000000000000000n, 0x80000000n, -0x200000000n], + [-0xffffffffffffffffn, 0x80000000n, -0x1ffffffffn], + [-0xfffffffffffffffen, 0x80000000n, -0x1ffffffffn], + [-0x8000000000000001n, 0x80000000n, -0x100000000n], + [-0x8000000000000000n, 0x80000000n, -0x100000000n], + [-0x7fffffffffffffffn, 0x80000000n, -0xffffffffn], + [-0x7ffffffffffffffen, 0x80000000n, -0xffffffffn], + [-0x100000001n, 0x80000000n, -2n], + [-0x100000000n, 0x80000000n, -2n], + [-0xffffffffn, 0x80000000n, -1n], + [-0xfffffffen, 0x80000000n, -1n], + [-0x80000001n, 0x80000000n, -1n], + [-0x80000000n, 0x80000000n, -1n], + [-0x7fffffffn, 0x80000000n, 0n], + [-0x7ffffffen, 0x80000000n, 0n], + [-2n, 0x80000000n, 0n], + [-1n, 0x80000000n, 0n], + [0n, 0x80000000n, 0n], + [1n, 0x80000000n, 0n], + [2n, 0x80000000n, 0n], + [0x7ffffffen, 0x80000000n, 0n], + [0x7fffffffn, 0x80000000n, 0n], + [0x80000000n, 0x80000000n, 1n], + [0x80000001n, 0x80000000n, 1n], + [0xfffffffen, 0x80000000n, 1n], + [0xffffffffn, 0x80000000n, 1n], + [0x100000000n, 0x80000000n, 2n], + [0x100000001n, 0x80000000n, 2n], + [0x7ffffffffffffffen, 0x80000000n, 0xffffffffn], + [0x7fffffffffffffffn, 0x80000000n, 0xffffffffn], + [0x8000000000000000n, 0x80000000n, 0x100000000n], + [0x8000000000000001n, 0x80000000n, 0x100000000n], + [0xfffffffffffffffen, 0x80000000n, 0x1ffffffffn], + [0xffffffffffffffffn, 0x80000000n, 0x1ffffffffn], + [0x10000000000000000n, 0x80000000n, 0x200000000n], + [0x10000000000000001n, 0x80000000n, 0x200000000n], + [-0x10000000000000001n, 0x80000001n, -0x1fffffffcn], + [-0x10000000000000000n, 0x80000001n, -0x1fffffffcn], + [-0xffffffffffffffffn, 0x80000001n, -0x1fffffffcn], + [-0xfffffffffffffffen, 0x80000001n, -0x1fffffffcn], + [-0x8000000000000001n, 0x80000001n, -0xfffffffen], + [-0x8000000000000000n, 0x80000001n, -0xfffffffen], + [-0x7fffffffffffffffn, 0x80000001n, -0xfffffffen], + [-0x7ffffffffffffffen, 0x80000001n, -0xfffffffen], + [-0x100000001n, 0x80000001n, -1n], + [-0x100000000n, 0x80000001n, -1n], + [-0xffffffffn, 0x80000001n, -1n], + [-0xfffffffen, 0x80000001n, -1n], + [-0x80000001n, 0x80000001n, -1n], + [-0x80000000n, 0x80000001n, 0n], + [-0x7fffffffn, 0x80000001n, 0n], + [-0x7ffffffen, 0x80000001n, 0n], + [-2n, 0x80000001n, 0n], + [-1n, 0x80000001n, 0n], + [0n, 0x80000001n, 0n], + [1n, 0x80000001n, 0n], + [2n, 0x80000001n, 0n], + [0x7ffffffen, 0x80000001n, 0n], + [0x7fffffffn, 0x80000001n, 0n], + [0x80000000n, 0x80000001n, 0n], + [0x80000001n, 0x80000001n, 1n], + [0xfffffffen, 0x80000001n, 1n], + [0xffffffffn, 0x80000001n, 1n], + [0x100000000n, 0x80000001n, 1n], + [0x100000001n, 0x80000001n, 1n], + [0x7ffffffffffffffen, 0x80000001n, 0xfffffffen], + [0x7fffffffffffffffn, 0x80000001n, 0xfffffffen], + [0x8000000000000000n, 0x80000001n, 0xfffffffen], + [0x8000000000000001n, 0x80000001n, 0xfffffffen], + [0xfffffffffffffffen, 0x80000001n, 0x1fffffffcn], + [0xffffffffffffffffn, 0x80000001n, 0x1fffffffcn], + [0x10000000000000000n, 0x80000001n, 0x1fffffffcn], + [0x10000000000000001n, 0x80000001n, 0x1fffffffcn], + [-0x10000000000000001n, -0x80000001n, 0x1fffffffcn], + [-0x10000000000000000n, -0x80000001n, 0x1fffffffcn], + [-0xffffffffffffffffn, -0x80000001n, 0x1fffffffcn], + [-0xfffffffffffffffen, -0x80000001n, 0x1fffffffcn], + [-0x8000000000000001n, -0x80000001n, 0xfffffffen], + [-0x8000000000000000n, -0x80000001n, 0xfffffffen], + [-0x7fffffffffffffffn, -0x80000001n, 0xfffffffen], + [-0x7ffffffffffffffen, -0x80000001n, 0xfffffffen], + [-0x100000001n, -0x80000001n, 1n], + [-0x100000000n, -0x80000001n, 1n], + [-0xffffffffn, -0x80000001n, 1n], + [-0xfffffffen, -0x80000001n, 1n], + [-0x80000001n, -0x80000001n, 1n], + [-0x80000000n, -0x80000001n, 0n], + [-0x7fffffffn, -0x80000001n, 0n], + [-0x7ffffffen, -0x80000001n, 0n], + [-2n, -0x80000001n, 0n], + [-1n, -0x80000001n, 0n], + [0n, -0x80000001n, 0n], + [1n, -0x80000001n, 0n], + [2n, -0x80000001n, 0n], + [0x7ffffffen, -0x80000001n, 0n], + [0x7fffffffn, -0x80000001n, 0n], + [0x80000000n, -0x80000001n, 0n], + [0x80000001n, -0x80000001n, -1n], + [0xfffffffen, -0x80000001n, -1n], + [0xffffffffn, -0x80000001n, -1n], + [0x100000000n, -0x80000001n, -1n], + [0x100000001n, -0x80000001n, -1n], + [0x7ffffffffffffffen, -0x80000001n, -0xfffffffen], + [0x7fffffffffffffffn, -0x80000001n, -0xfffffffen], + [0x8000000000000000n, -0x80000001n, -0xfffffffen], + [0x8000000000000001n, -0x80000001n, -0xfffffffen], + [0xfffffffffffffffen, -0x80000001n, -0x1fffffffcn], + [0xffffffffffffffffn, -0x80000001n, -0x1fffffffcn], + [0x10000000000000000n, -0x80000001n, -0x1fffffffcn], + [0x10000000000000001n, -0x80000001n, -0x1fffffffcn], + [-0x10000000000000001n, -0x80000000n, 0x200000000n], + [-0x10000000000000000n, -0x80000000n, 0x200000000n], + [-0xffffffffffffffffn, -0x80000000n, 0x1ffffffffn], + [-0xfffffffffffffffen, -0x80000000n, 0x1ffffffffn], + [-0x8000000000000001n, -0x80000000n, 0x100000000n], + [-0x8000000000000000n, -0x80000000n, 0x100000000n], + [-0x7fffffffffffffffn, -0x80000000n, 0xffffffffn], + [-0x7ffffffffffffffen, -0x80000000n, 0xffffffffn], + [-0x100000001n, -0x80000000n, 2n], + [-0x100000000n, -0x80000000n, 2n], + [-0xffffffffn, -0x80000000n, 1n], + [-0xfffffffen, -0x80000000n, 1n], + [-0x80000001n, -0x80000000n, 1n], + [-0x80000000n, -0x80000000n, 1n], + [-0x7fffffffn, -0x80000000n, 0n], + [-0x7ffffffen, -0x80000000n, 0n], + [-2n, -0x80000000n, 0n], + [-1n, -0x80000000n, 0n], + [0n, -0x80000000n, 0n], + [1n, -0x80000000n, 0n], + [2n, -0x80000000n, 0n], + [0x7ffffffen, -0x80000000n, 0n], + [0x7fffffffn, -0x80000000n, 0n], + [0x80000000n, -0x80000000n, -1n], + [0x80000001n, -0x80000000n, -1n], + [0xfffffffen, -0x80000000n, -1n], + [0xffffffffn, -0x80000000n, -1n], + [0x100000000n, -0x80000000n, -2n], + [0x100000001n, -0x80000000n, -2n], + [0x7ffffffffffffffen, -0x80000000n, -0xffffffffn], + [0x7fffffffffffffffn, -0x80000000n, -0xffffffffn], + [0x8000000000000000n, -0x80000000n, -0x100000000n], + [0x8000000000000001n, -0x80000000n, -0x100000000n], + [0xfffffffffffffffen, -0x80000000n, -0x1ffffffffn], + [0xffffffffffffffffn, -0x80000000n, -0x1ffffffffn], + [0x10000000000000000n, -0x80000000n, -0x200000000n], + [0x10000000000000001n, -0x80000000n, -0x200000000n], + [-0x10000000000000001n, -0x7fffffffn, 0x200000004n], + [-0x10000000000000000n, -0x7fffffffn, 0x200000004n], + [-0xffffffffffffffffn, -0x7fffffffn, 0x200000004n], + [-0xfffffffffffffffen, -0x7fffffffn, 0x200000004n], + [-0x8000000000000001n, -0x7fffffffn, 0x100000002n], + [-0x8000000000000000n, -0x7fffffffn, 0x100000002n], + [-0x7fffffffffffffffn, -0x7fffffffn, 0x100000002n], + [-0x7ffffffffffffffen, -0x7fffffffn, 0x100000002n], + [-0x100000001n, -0x7fffffffn, 2n], + [-0x100000000n, -0x7fffffffn, 2n], + [-0xffffffffn, -0x7fffffffn, 2n], + [-0xfffffffen, -0x7fffffffn, 2n], + [-0x80000001n, -0x7fffffffn, 1n], + [-0x80000000n, -0x7fffffffn, 1n], + [-0x7fffffffn, -0x7fffffffn, 1n], + [-0x7ffffffen, -0x7fffffffn, 0n], + [-2n, -0x7fffffffn, 0n], + [-1n, -0x7fffffffn, 0n], + [0n, -0x7fffffffn, 0n], + [1n, -0x7fffffffn, 0n], + [2n, -0x7fffffffn, 0n], + [0x7ffffffen, -0x7fffffffn, 0n], + [0x7fffffffn, -0x7fffffffn, -1n], + [0x80000000n, -0x7fffffffn, -1n], + [0x80000001n, -0x7fffffffn, -1n], + [0xfffffffen, -0x7fffffffn, -2n], + [0xffffffffn, -0x7fffffffn, -2n], + [0x100000000n, -0x7fffffffn, -2n], + [0x100000001n, -0x7fffffffn, -2n], + [0x7ffffffffffffffen, -0x7fffffffn, -0x100000002n], + [0x7fffffffffffffffn, -0x7fffffffn, -0x100000002n], + [0x8000000000000000n, -0x7fffffffn, -0x100000002n], + [0x8000000000000001n, -0x7fffffffn, -0x100000002n], + [0xfffffffffffffffen, -0x7fffffffn, -0x200000004n], + [0xffffffffffffffffn, -0x7fffffffn, -0x200000004n], + [0x10000000000000000n, -0x7fffffffn, -0x200000004n], + [0x10000000000000001n, -0x7fffffffn, -0x200000004n], + [-0x10000000000000001n, -0x7ffffffen, 0x200000008n], + [-0x10000000000000000n, -0x7ffffffen, 0x200000008n], + [-0xffffffffffffffffn, -0x7ffffffen, 0x200000008n], + [-0xfffffffffffffffen, -0x7ffffffen, 0x200000008n], + [-0x8000000000000001n, -0x7ffffffen, 0x100000004n], + [-0x8000000000000000n, -0x7ffffffen, 0x100000004n], + [-0x7fffffffffffffffn, -0x7ffffffen, 0x100000004n], + [-0x7ffffffffffffffen, -0x7ffffffen, 0x100000004n], + [-0x100000001n, -0x7ffffffen, 2n], + [-0x100000000n, -0x7ffffffen, 2n], + [-0xffffffffn, -0x7ffffffen, 2n], + [-0xfffffffen, -0x7ffffffen, 2n], + [-0x80000001n, -0x7ffffffen, 1n], + [-0x80000000n, -0x7ffffffen, 1n], + [-0x7fffffffn, -0x7ffffffen, 1n], + [-0x7ffffffen, -0x7ffffffen, 1n], + [-2n, -0x7ffffffen, 0n], + [-1n, -0x7ffffffen, 0n], + [0n, -0x7ffffffen, 0n], + [1n, -0x7ffffffen, 0n], + [2n, -0x7ffffffen, 0n], + [0x7ffffffen, -0x7ffffffen, -1n], + [0x7fffffffn, -0x7ffffffen, -1n], + [0x80000000n, -0x7ffffffen, -1n], + [0x80000001n, -0x7ffffffen, -1n], + [0xfffffffen, -0x7ffffffen, -2n], + [0xffffffffn, -0x7ffffffen, -2n], + [0x100000000n, -0x7ffffffen, -2n], + [0x100000001n, -0x7ffffffen, -2n], + [0x7ffffffffffffffen, -0x7ffffffen, -0x100000004n], + [0x7fffffffffffffffn, -0x7ffffffen, -0x100000004n], + [0x8000000000000000n, -0x7ffffffen, -0x100000004n], + [0x8000000000000001n, -0x7ffffffen, -0x100000004n], + [0xfffffffffffffffen, -0x7ffffffen, -0x200000008n], + [0xffffffffffffffffn, -0x7ffffffen, -0x200000008n], + [0x10000000000000000n, -0x7ffffffen, -0x200000008n], + [0x10000000000000001n, -0x7ffffffen, -0x200000008n], + [-0x10000000000000001n, 0xfffffffen, -0x100000002n], + [-0x10000000000000000n, 0xfffffffen, -0x100000002n], + [-0xffffffffffffffffn, 0xfffffffen, -0x100000002n], + [-0xfffffffffffffffen, 0xfffffffen, -0x100000002n], + [-0x8000000000000001n, 0xfffffffen, -0x80000001n], + [-0x8000000000000000n, 0xfffffffen, -0x80000001n], + [-0x7fffffffffffffffn, 0xfffffffen, -0x80000001n], + [-0x7ffffffffffffffen, 0xfffffffen, -0x80000001n], + [-0x100000001n, 0xfffffffen, -1n], + [-0x100000000n, 0xfffffffen, -1n], + [-0xffffffffn, 0xfffffffen, -1n], + [-0xfffffffen, 0xfffffffen, -1n], + [-0x80000001n, 0xfffffffen, 0n], + [-0x80000000n, 0xfffffffen, 0n], + [-0x7fffffffn, 0xfffffffen, 0n], + [-0x7ffffffen, 0xfffffffen, 0n], + [-2n, 0xfffffffen, 0n], + [-1n, 0xfffffffen, 0n], + [0n, 0xfffffffen, 0n], + [1n, 0xfffffffen, 0n], + [2n, 0xfffffffen, 0n], + [0x7ffffffen, 0xfffffffen, 0n], + [0x7fffffffn, 0xfffffffen, 0n], + [0x80000000n, 0xfffffffen, 0n], + [0x80000001n, 0xfffffffen, 0n], + [0xfffffffen, 0xfffffffen, 1n], + [0xffffffffn, 0xfffffffen, 1n], + [0x100000000n, 0xfffffffen, 1n], + [0x100000001n, 0xfffffffen, 1n], + [0x7ffffffffffffffen, 0xfffffffen, 0x80000001n], + [0x7fffffffffffffffn, 0xfffffffen, 0x80000001n], + [0x8000000000000000n, 0xfffffffen, 0x80000001n], + [0x8000000000000001n, 0xfffffffen, 0x80000001n], + [0xfffffffffffffffen, 0xfffffffen, 0x100000002n], + [0xffffffffffffffffn, 0xfffffffen, 0x100000002n], + [0x10000000000000000n, 0xfffffffen, 0x100000002n], + [0x10000000000000001n, 0xfffffffen, 0x100000002n], + [-0x10000000000000001n, 0xffffffffn, -0x100000001n], + [-0x10000000000000000n, 0xffffffffn, -0x100000001n], + [-0xffffffffffffffffn, 0xffffffffn, -0x100000001n], + [-0xfffffffffffffffen, 0xffffffffn, -0x100000000n], + [-0x8000000000000001n, 0xffffffffn, -0x80000000n], + [-0x8000000000000000n, 0xffffffffn, -0x80000000n], + [-0x7fffffffffffffffn, 0xffffffffn, -0x80000000n], + [-0x7ffffffffffffffen, 0xffffffffn, -0x80000000n], + [-0x100000001n, 0xffffffffn, -1n], + [-0x100000000n, 0xffffffffn, -1n], + [-0xffffffffn, 0xffffffffn, -1n], + [-0xfffffffen, 0xffffffffn, 0n], + [-0x80000001n, 0xffffffffn, 0n], + [-0x80000000n, 0xffffffffn, 0n], + [-0x7fffffffn, 0xffffffffn, 0n], + [-0x7ffffffen, 0xffffffffn, 0n], + [-2n, 0xffffffffn, 0n], + [-1n, 0xffffffffn, 0n], + [0n, 0xffffffffn, 0n], + [1n, 0xffffffffn, 0n], + [2n, 0xffffffffn, 0n], + [0x7ffffffen, 0xffffffffn, 0n], + [0x7fffffffn, 0xffffffffn, 0n], + [0x80000000n, 0xffffffffn, 0n], + [0x80000001n, 0xffffffffn, 0n], + [0xfffffffen, 0xffffffffn, 0n], + [0xffffffffn, 0xffffffffn, 1n], + [0x100000000n, 0xffffffffn, 1n], + [0x100000001n, 0xffffffffn, 1n], + [0x7ffffffffffffffen, 0xffffffffn, 0x80000000n], + [0x7fffffffffffffffn, 0xffffffffn, 0x80000000n], + [0x8000000000000000n, 0xffffffffn, 0x80000000n], + [0x8000000000000001n, 0xffffffffn, 0x80000000n], + [0xfffffffffffffffen, 0xffffffffn, 0x100000000n], + [0xffffffffffffffffn, 0xffffffffn, 0x100000001n], + [0x10000000000000000n, 0xffffffffn, 0x100000001n], + [0x10000000000000001n, 0xffffffffn, 0x100000001n], + [-0x10000000000000001n, 0x100000000n, -0x100000000n], + [-0x10000000000000000n, 0x100000000n, -0x100000000n], + [-0xffffffffffffffffn, 0x100000000n, -0xffffffffn], + [-0xfffffffffffffffen, 0x100000000n, -0xffffffffn], + [-0x8000000000000001n, 0x100000000n, -0x80000000n], + [-0x8000000000000000n, 0x100000000n, -0x80000000n], + [-0x7fffffffffffffffn, 0x100000000n, -0x7fffffffn], + [-0x7ffffffffffffffen, 0x100000000n, -0x7fffffffn], + [-0x100000001n, 0x100000000n, -1n], + [-0x100000000n, 0x100000000n, -1n], + [-0xffffffffn, 0x100000000n, 0n], + [-0xfffffffen, 0x100000000n, 0n], + [-0x80000001n, 0x100000000n, 0n], + [-0x80000000n, 0x100000000n, 0n], + [-0x7fffffffn, 0x100000000n, 0n], + [-0x7ffffffen, 0x100000000n, 0n], + [-2n, 0x100000000n, 0n], + [-1n, 0x100000000n, 0n], + [0n, 0x100000000n, 0n], + [1n, 0x100000000n, 0n], + [2n, 0x100000000n, 0n], + [0x7ffffffen, 0x100000000n, 0n], + [0x7fffffffn, 0x100000000n, 0n], + [0x80000000n, 0x100000000n, 0n], + [0x80000001n, 0x100000000n, 0n], + [0xfffffffen, 0x100000000n, 0n], + [0xffffffffn, 0x100000000n, 0n], + [0x100000000n, 0x100000000n, 1n], + [0x100000001n, 0x100000000n, 1n], + [0x7ffffffffffffffen, 0x100000000n, 0x7fffffffn], + [0x7fffffffffffffffn, 0x100000000n, 0x7fffffffn], + [0x8000000000000000n, 0x100000000n, 0x80000000n], + [0x8000000000000001n, 0x100000000n, 0x80000000n], + [0xfffffffffffffffen, 0x100000000n, 0xffffffffn], + [0xffffffffffffffffn, 0x100000000n, 0xffffffffn], + [0x10000000000000000n, 0x100000000n, 0x100000000n], + [0x10000000000000001n, 0x100000000n, 0x100000000n], + [-0x10000000000000001n, 0x100000001n, -0xffffffffn], + [-0x10000000000000000n, 0x100000001n, -0xffffffffn], + [-0xffffffffffffffffn, 0x100000001n, -0xffffffffn], + [-0xfffffffffffffffen, 0x100000001n, -0xfffffffen], + [-0x8000000000000001n, 0x100000001n, -0x7fffffffn], + [-0x8000000000000000n, 0x100000001n, -0x7fffffffn], + [-0x7fffffffffffffffn, 0x100000001n, -0x7fffffffn], + [-0x7ffffffffffffffen, 0x100000001n, -0x7fffffffn], + [-0x100000001n, 0x100000001n, -1n], + [-0x100000000n, 0x100000001n, 0n], + [-0xffffffffn, 0x100000001n, 0n], + [-0xfffffffen, 0x100000001n, 0n], + [-0x80000001n, 0x100000001n, 0n], + [-0x80000000n, 0x100000001n, 0n], + [-0x7fffffffn, 0x100000001n, 0n], + [-0x7ffffffen, 0x100000001n, 0n], + [-2n, 0x100000001n, 0n], + [-1n, 0x100000001n, 0n], + [0n, 0x100000001n, 0n], + [1n, 0x100000001n, 0n], + [2n, 0x100000001n, 0n], + [0x7ffffffen, 0x100000001n, 0n], + [0x7fffffffn, 0x100000001n, 0n], + [0x80000000n, 0x100000001n, 0n], + [0x80000001n, 0x100000001n, 0n], + [0xfffffffen, 0x100000001n, 0n], + [0xffffffffn, 0x100000001n, 0n], + [0x100000000n, 0x100000001n, 0n], + [0x100000001n, 0x100000001n, 1n], + [0x7ffffffffffffffen, 0x100000001n, 0x7fffffffn], + [0x7fffffffffffffffn, 0x100000001n, 0x7fffffffn], + [0x8000000000000000n, 0x100000001n, 0x7fffffffn], + [0x8000000000000001n, 0x100000001n, 0x7fffffffn], + [0xfffffffffffffffen, 0x100000001n, 0xfffffffen], + [0xffffffffffffffffn, 0x100000001n, 0xffffffffn], + [0x10000000000000000n, 0x100000001n, 0xffffffffn], + [0x10000000000000001n, 0x100000001n, 0xffffffffn], + [-0x10000000000000001n, -0x100000001n, 0xffffffffn], + [-0x10000000000000000n, -0x100000001n, 0xffffffffn], + [-0xffffffffffffffffn, -0x100000001n, 0xffffffffn], + [-0xfffffffffffffffen, -0x100000001n, 0xfffffffen], + [-0x8000000000000001n, -0x100000001n, 0x7fffffffn], + [-0x8000000000000000n, -0x100000001n, 0x7fffffffn], + [-0x7fffffffffffffffn, -0x100000001n, 0x7fffffffn], + [-0x7ffffffffffffffen, -0x100000001n, 0x7fffffffn], + [-0x100000001n, -0x100000001n, 1n], + [-0x100000000n, -0x100000001n, 0n], + [-0xffffffffn, -0x100000001n, 0n], + [-0xfffffffen, -0x100000001n, 0n], + [-0x80000001n, -0x100000001n, 0n], + [-0x80000000n, -0x100000001n, 0n], + [-0x7fffffffn, -0x100000001n, 0n], + [-0x7ffffffen, -0x100000001n, 0n], + [-2n, -0x100000001n, 0n], + [-1n, -0x100000001n, 0n], + [0n, -0x100000001n, 0n], + [1n, -0x100000001n, 0n], + [2n, -0x100000001n, 0n], + [0x7ffffffen, -0x100000001n, 0n], + [0x7fffffffn, -0x100000001n, 0n], + [0x80000000n, -0x100000001n, 0n], + [0x80000001n, -0x100000001n, 0n], + [0xfffffffen, -0x100000001n, 0n], + [0xffffffffn, -0x100000001n, 0n], + [0x100000000n, -0x100000001n, 0n], + [0x100000001n, -0x100000001n, -1n], + [0x7ffffffffffffffen, -0x100000001n, -0x7fffffffn], + [0x7fffffffffffffffn, -0x100000001n, -0x7fffffffn], + [0x8000000000000000n, -0x100000001n, -0x7fffffffn], + [0x8000000000000001n, -0x100000001n, -0x7fffffffn], + [0xfffffffffffffffen, -0x100000001n, -0xfffffffen], + [0xffffffffffffffffn, -0x100000001n, -0xffffffffn], + [0x10000000000000000n, -0x100000001n, -0xffffffffn], + [0x10000000000000001n, -0x100000001n, -0xffffffffn], + [-0x10000000000000001n, -0x100000000n, 0x100000000n], + [-0x10000000000000000n, -0x100000000n, 0x100000000n], + [-0xffffffffffffffffn, -0x100000000n, 0xffffffffn], + [-0xfffffffffffffffen, -0x100000000n, 0xffffffffn], + [-0x8000000000000001n, -0x100000000n, 0x80000000n], + [-0x8000000000000000n, -0x100000000n, 0x80000000n], + [-0x7fffffffffffffffn, -0x100000000n, 0x7fffffffn], + [-0x7ffffffffffffffen, -0x100000000n, 0x7fffffffn], + [-0x100000001n, -0x100000000n, 1n], + [-0x100000000n, -0x100000000n, 1n], + [-0xffffffffn, -0x100000000n, 0n], + [-0xfffffffen, -0x100000000n, 0n], + [-0x80000001n, -0x100000000n, 0n], + [-0x80000000n, -0x100000000n, 0n], + [-0x7fffffffn, -0x100000000n, 0n], + [-0x7ffffffen, -0x100000000n, 0n], + [-2n, -0x100000000n, 0n], + [-1n, -0x100000000n, 0n], + [0n, -0x100000000n, 0n], + [1n, -0x100000000n, 0n], + [2n, -0x100000000n, 0n], + [0x7ffffffen, -0x100000000n, 0n], + [0x7fffffffn, -0x100000000n, 0n], + [0x80000000n, -0x100000000n, 0n], + [0x80000001n, -0x100000000n, 0n], + [0xfffffffen, -0x100000000n, 0n], + [0xffffffffn, -0x100000000n, 0n], + [0x100000000n, -0x100000000n, -1n], + [0x100000001n, -0x100000000n, -1n], + [0x7ffffffffffffffen, -0x100000000n, -0x7fffffffn], + [0x7fffffffffffffffn, -0x100000000n, -0x7fffffffn], + [0x8000000000000000n, -0x100000000n, -0x80000000n], + [0x8000000000000001n, -0x100000000n, -0x80000000n], + [0xfffffffffffffffen, -0x100000000n, -0xffffffffn], + [0xffffffffffffffffn, -0x100000000n, -0xffffffffn], + [0x10000000000000000n, -0x100000000n, -0x100000000n], + [0x10000000000000001n, -0x100000000n, -0x100000000n], + [-0x10000000000000001n, -0xffffffffn, 0x100000001n], + [-0x10000000000000000n, -0xffffffffn, 0x100000001n], + [-0xffffffffffffffffn, -0xffffffffn, 0x100000001n], + [-0xfffffffffffffffen, -0xffffffffn, 0x100000000n], + [-0x8000000000000001n, -0xffffffffn, 0x80000000n], + [-0x8000000000000000n, -0xffffffffn, 0x80000000n], + [-0x7fffffffffffffffn, -0xffffffffn, 0x80000000n], + [-0x7ffffffffffffffen, -0xffffffffn, 0x80000000n], + [-0x100000001n, -0xffffffffn, 1n], + [-0x100000000n, -0xffffffffn, 1n], + [-0xffffffffn, -0xffffffffn, 1n], + [-0xfffffffen, -0xffffffffn, 0n], + [-0x80000001n, -0xffffffffn, 0n], + [-0x80000000n, -0xffffffffn, 0n], + [-0x7fffffffn, -0xffffffffn, 0n], + [-0x7ffffffen, -0xffffffffn, 0n], + [-2n, -0xffffffffn, 0n], + [-1n, -0xffffffffn, 0n], + [0n, -0xffffffffn, 0n], + [1n, -0xffffffffn, 0n], + [2n, -0xffffffffn, 0n], + [0x7ffffffen, -0xffffffffn, 0n], + [0x7fffffffn, -0xffffffffn, 0n], + [0x80000000n, -0xffffffffn, 0n], + [0x80000001n, -0xffffffffn, 0n], + [0xfffffffen, -0xffffffffn, 0n], + [0xffffffffn, -0xffffffffn, -1n], + [0x100000000n, -0xffffffffn, -1n], + [0x100000001n, -0xffffffffn, -1n], + [0x7ffffffffffffffen, -0xffffffffn, -0x80000000n], + [0x7fffffffffffffffn, -0xffffffffn, -0x80000000n], + [0x8000000000000000n, -0xffffffffn, -0x80000000n], + [0x8000000000000001n, -0xffffffffn, -0x80000000n], + [0xfffffffffffffffen, -0xffffffffn, -0x100000000n], + [0xffffffffffffffffn, -0xffffffffn, -0x100000001n], + [0x10000000000000000n, -0xffffffffn, -0x100000001n], + [0x10000000000000001n, -0xffffffffn, -0x100000001n], + [-0x10000000000000001n, -0xfffffffen, 0x100000002n], + [-0x10000000000000000n, -0xfffffffen, 0x100000002n], + [-0xffffffffffffffffn, -0xfffffffen, 0x100000002n], + [-0xfffffffffffffffen, -0xfffffffen, 0x100000002n], + [-0x8000000000000001n, -0xfffffffen, 0x80000001n], + [-0x8000000000000000n, -0xfffffffen, 0x80000001n], + [-0x7fffffffffffffffn, -0xfffffffen, 0x80000001n], + [-0x7ffffffffffffffen, -0xfffffffen, 0x80000001n], + [-0x100000001n, -0xfffffffen, 1n], + [-0x100000000n, -0xfffffffen, 1n], + [-0xffffffffn, -0xfffffffen, 1n], + [-0xfffffffen, -0xfffffffen, 1n], + [-0x80000001n, -0xfffffffen, 0n], + [-0x80000000n, -0xfffffffen, 0n], + [-0x7fffffffn, -0xfffffffen, 0n], + [-0x7ffffffen, -0xfffffffen, 0n], + [-2n, -0xfffffffen, 0n], + [-1n, -0xfffffffen, 0n], + [0n, -0xfffffffen, 0n], + [1n, -0xfffffffen, 0n], + [2n, -0xfffffffen, 0n], + [0x7ffffffen, -0xfffffffen, 0n], + [0x7fffffffn, -0xfffffffen, 0n], + [0x80000000n, -0xfffffffen, 0n], + [0x80000001n, -0xfffffffen, 0n], + [0xfffffffen, -0xfffffffen, -1n], + [0xffffffffn, -0xfffffffen, -1n], + [0x100000000n, -0xfffffffen, -1n], + [0x100000001n, -0xfffffffen, -1n], + [0x7ffffffffffffffen, -0xfffffffen, -0x80000001n], + [0x7fffffffffffffffn, -0xfffffffen, -0x80000001n], + [0x8000000000000000n, -0xfffffffen, -0x80000001n], + [0x8000000000000001n, -0xfffffffen, -0x80000001n], + [0xfffffffffffffffen, -0xfffffffen, -0x100000002n], + [0xffffffffffffffffn, -0xfffffffen, -0x100000002n], + [0x10000000000000000n, -0xfffffffen, -0x100000002n], + [0x10000000000000001n, -0xfffffffen, -0x100000002n], + [-0x10000000000000001n, 0x7ffffffffffffffen, -2n], + [-0x10000000000000000n, 0x7ffffffffffffffen, -2n], + [-0xffffffffffffffffn, 0x7ffffffffffffffen, -2n], + [-0xfffffffffffffffen, 0x7ffffffffffffffen, -2n], + [-0x8000000000000001n, 0x7ffffffffffffffen, -1n], + [-0x8000000000000000n, 0x7ffffffffffffffen, -1n], + [-0x7fffffffffffffffn, 0x7ffffffffffffffen, -1n], + [-0x7ffffffffffffffen, 0x7ffffffffffffffen, -1n], + [-0x100000001n, 0x7ffffffffffffffen, 0n], + [-0x100000000n, 0x7ffffffffffffffen, 0n], + [-0xffffffffn, 0x7ffffffffffffffen, 0n], + [-0xfffffffen, 0x7ffffffffffffffen, 0n], + [-0x80000001n, 0x7ffffffffffffffen, 0n], + [-0x80000000n, 0x7ffffffffffffffen, 0n], + [-0x7fffffffn, 0x7ffffffffffffffen, 0n], + [-0x7ffffffen, 0x7ffffffffffffffen, 0n], + [-2n, 0x7ffffffffffffffen, 0n], + [-1n, 0x7ffffffffffffffen, 0n], + [0n, 0x7ffffffffffffffen, 0n], + [1n, 0x7ffffffffffffffen, 0n], + [2n, 0x7ffffffffffffffen, 0n], + [0x7ffffffen, 0x7ffffffffffffffen, 0n], + [0x7fffffffn, 0x7ffffffffffffffen, 0n], + [0x80000000n, 0x7ffffffffffffffen, 0n], + [0x80000001n, 0x7ffffffffffffffen, 0n], + [0xfffffffen, 0x7ffffffffffffffen, 0n], + [0xffffffffn, 0x7ffffffffffffffen, 0n], + [0x100000000n, 0x7ffffffffffffffen, 0n], + [0x100000001n, 0x7ffffffffffffffen, 0n], + [0x7ffffffffffffffen, 0x7ffffffffffffffen, 1n], + [0x7fffffffffffffffn, 0x7ffffffffffffffen, 1n], + [0x8000000000000000n, 0x7ffffffffffffffen, 1n], + [0x8000000000000001n, 0x7ffffffffffffffen, 1n], + [0xfffffffffffffffen, 0x7ffffffffffffffen, 2n], + [0xffffffffffffffffn, 0x7ffffffffffffffen, 2n], + [0x10000000000000000n, 0x7ffffffffffffffen, 2n], + [0x10000000000000001n, 0x7ffffffffffffffen, 2n], + [-0x10000000000000001n, 0x7fffffffffffffffn, -2n], + [-0x10000000000000000n, 0x7fffffffffffffffn, -2n], + [-0xffffffffffffffffn, 0x7fffffffffffffffn, -2n], + [-0xfffffffffffffffen, 0x7fffffffffffffffn, -2n], + [-0x8000000000000001n, 0x7fffffffffffffffn, -1n], + [-0x8000000000000000n, 0x7fffffffffffffffn, -1n], + [-0x7fffffffffffffffn, 0x7fffffffffffffffn, -1n], + [-0x7ffffffffffffffen, 0x7fffffffffffffffn, 0n], + [-0x100000001n, 0x7fffffffffffffffn, 0n], + [-0x100000000n, 0x7fffffffffffffffn, 0n], + [-0xffffffffn, 0x7fffffffffffffffn, 0n], + [-0xfffffffen, 0x7fffffffffffffffn, 0n], + [-0x80000001n, 0x7fffffffffffffffn, 0n], + [-0x80000000n, 0x7fffffffffffffffn, 0n], + [-0x7fffffffn, 0x7fffffffffffffffn, 0n], + [-0x7ffffffen, 0x7fffffffffffffffn, 0n], + [-2n, 0x7fffffffffffffffn, 0n], + [-1n, 0x7fffffffffffffffn, 0n], + [0n, 0x7fffffffffffffffn, 0n], + [1n, 0x7fffffffffffffffn, 0n], + [2n, 0x7fffffffffffffffn, 0n], + [0x7ffffffen, 0x7fffffffffffffffn, 0n], + [0x7fffffffn, 0x7fffffffffffffffn, 0n], + [0x80000000n, 0x7fffffffffffffffn, 0n], + [0x80000001n, 0x7fffffffffffffffn, 0n], + [0xfffffffen, 0x7fffffffffffffffn, 0n], + [0xffffffffn, 0x7fffffffffffffffn, 0n], + [0x100000000n, 0x7fffffffffffffffn, 0n], + [0x100000001n, 0x7fffffffffffffffn, 0n], + [0x7ffffffffffffffen, 0x7fffffffffffffffn, 0n], + [0x7fffffffffffffffn, 0x7fffffffffffffffn, 1n], + [0x8000000000000000n, 0x7fffffffffffffffn, 1n], + [0x8000000000000001n, 0x7fffffffffffffffn, 1n], + [0xfffffffffffffffen, 0x7fffffffffffffffn, 2n], + [0xffffffffffffffffn, 0x7fffffffffffffffn, 2n], + [0x10000000000000000n, 0x7fffffffffffffffn, 2n], + [0x10000000000000001n, 0x7fffffffffffffffn, 2n], + [-0x10000000000000001n, 0x8000000000000000n, -2n], + [-0x10000000000000000n, 0x8000000000000000n, -2n], + [-0xffffffffffffffffn, 0x8000000000000000n, -1n], + [-0xfffffffffffffffen, 0x8000000000000000n, -1n], + [-0x8000000000000001n, 0x8000000000000000n, -1n], + [-0x8000000000000000n, 0x8000000000000000n, -1n], + [-0x7fffffffffffffffn, 0x8000000000000000n, 0n], + [-0x7ffffffffffffffen, 0x8000000000000000n, 0n], + [-0x100000001n, 0x8000000000000000n, 0n], + [-0x100000000n, 0x8000000000000000n, 0n], + [-0xffffffffn, 0x8000000000000000n, 0n], + [-0xfffffffen, 0x8000000000000000n, 0n], + [-0x80000001n, 0x8000000000000000n, 0n], + [-0x80000000n, 0x8000000000000000n, 0n], + [-0x7fffffffn, 0x8000000000000000n, 0n], + [-0x7ffffffen, 0x8000000000000000n, 0n], + [-2n, 0x8000000000000000n, 0n], + [-1n, 0x8000000000000000n, 0n], + [0n, 0x8000000000000000n, 0n], + [1n, 0x8000000000000000n, 0n], + [2n, 0x8000000000000000n, 0n], + [0x7ffffffen, 0x8000000000000000n, 0n], + [0x7fffffffn, 0x8000000000000000n, 0n], + [0x80000000n, 0x8000000000000000n, 0n], + [0x80000001n, 0x8000000000000000n, 0n], + [0xfffffffen, 0x8000000000000000n, 0n], + [0xffffffffn, 0x8000000000000000n, 0n], + [0x100000000n, 0x8000000000000000n, 0n], + [0x100000001n, 0x8000000000000000n, 0n], + [0x7ffffffffffffffen, 0x8000000000000000n, 0n], + [0x7fffffffffffffffn, 0x8000000000000000n, 0n], + [0x8000000000000000n, 0x8000000000000000n, 1n], + [0x8000000000000001n, 0x8000000000000000n, 1n], + [0xfffffffffffffffen, 0x8000000000000000n, 1n], + [0xffffffffffffffffn, 0x8000000000000000n, 1n], + [0x10000000000000000n, 0x8000000000000000n, 2n], + [0x10000000000000001n, 0x8000000000000000n, 2n], + [-0x10000000000000001n, 0x8000000000000001n, -1n], + [-0x10000000000000000n, 0x8000000000000001n, -1n], + [-0xffffffffffffffffn, 0x8000000000000001n, -1n], + [-0xfffffffffffffffen, 0x8000000000000001n, -1n], + [-0x8000000000000001n, 0x8000000000000001n, -1n], + [-0x8000000000000000n, 0x8000000000000001n, 0n], + [-0x7fffffffffffffffn, 0x8000000000000001n, 0n], + [-0x7ffffffffffffffen, 0x8000000000000001n, 0n], + [-0x100000001n, 0x8000000000000001n, 0n], + [-0x100000000n, 0x8000000000000001n, 0n], + [-0xffffffffn, 0x8000000000000001n, 0n], + [-0xfffffffen, 0x8000000000000001n, 0n], + [-0x80000001n, 0x8000000000000001n, 0n], + [-0x80000000n, 0x8000000000000001n, 0n], + [-0x7fffffffn, 0x8000000000000001n, 0n], + [-0x7ffffffen, 0x8000000000000001n, 0n], + [-2n, 0x8000000000000001n, 0n], + [-1n, 0x8000000000000001n, 0n], + [0n, 0x8000000000000001n, 0n], + [1n, 0x8000000000000001n, 0n], + [2n, 0x8000000000000001n, 0n], + [0x7ffffffen, 0x8000000000000001n, 0n], + [0x7fffffffn, 0x8000000000000001n, 0n], + [0x80000000n, 0x8000000000000001n, 0n], + [0x80000001n, 0x8000000000000001n, 0n], + [0xfffffffen, 0x8000000000000001n, 0n], + [0xffffffffn, 0x8000000000000001n, 0n], + [0x100000000n, 0x8000000000000001n, 0n], + [0x100000001n, 0x8000000000000001n, 0n], + [0x7ffffffffffffffen, 0x8000000000000001n, 0n], + [0x7fffffffffffffffn, 0x8000000000000001n, 0n], + [0x8000000000000000n, 0x8000000000000001n, 0n], + [0x8000000000000001n, 0x8000000000000001n, 1n], + [0xfffffffffffffffen, 0x8000000000000001n, 1n], + [0xffffffffffffffffn, 0x8000000000000001n, 1n], + [0x10000000000000000n, 0x8000000000000001n, 1n], + [0x10000000000000001n, 0x8000000000000001n, 1n], + [-0x10000000000000001n, -0x8000000000000001n, 1n], + [-0x10000000000000000n, -0x8000000000000001n, 1n], + [-0xffffffffffffffffn, -0x8000000000000001n, 1n], + [-0xfffffffffffffffen, -0x8000000000000001n, 1n], + [-0x8000000000000001n, -0x8000000000000001n, 1n], + [-0x8000000000000000n, -0x8000000000000001n, 0n], + [-0x7fffffffffffffffn, -0x8000000000000001n, 0n], + [-0x7ffffffffffffffen, -0x8000000000000001n, 0n], + [-0x100000001n, -0x8000000000000001n, 0n], + [-0x100000000n, -0x8000000000000001n, 0n], + [-0xffffffffn, -0x8000000000000001n, 0n], + [-0xfffffffen, -0x8000000000000001n, 0n], + [-0x80000001n, -0x8000000000000001n, 0n], + [-0x80000000n, -0x8000000000000001n, 0n], + [-0x7fffffffn, -0x8000000000000001n, 0n], + [-0x7ffffffen, -0x8000000000000001n, 0n], + [-2n, -0x8000000000000001n, 0n], + [-1n, -0x8000000000000001n, 0n], + [0n, -0x8000000000000001n, 0n], + [1n, -0x8000000000000001n, 0n], + [2n, -0x8000000000000001n, 0n], + [0x7ffffffen, -0x8000000000000001n, 0n], + [0x7fffffffn, -0x8000000000000001n, 0n], + [0x80000000n, -0x8000000000000001n, 0n], + [0x80000001n, -0x8000000000000001n, 0n], + [0xfffffffen, -0x8000000000000001n, 0n], + [0xffffffffn, -0x8000000000000001n, 0n], + [0x100000000n, -0x8000000000000001n, 0n], + [0x100000001n, -0x8000000000000001n, 0n], + [0x7ffffffffffffffen, -0x8000000000000001n, 0n], + [0x7fffffffffffffffn, -0x8000000000000001n, 0n], + [0x8000000000000000n, -0x8000000000000001n, 0n], + [0x8000000000000001n, -0x8000000000000001n, -1n], + [0xfffffffffffffffen, -0x8000000000000001n, -1n], + [0xffffffffffffffffn, -0x8000000000000001n, -1n], + [0x10000000000000000n, -0x8000000000000001n, -1n], + [0x10000000000000001n, -0x8000000000000001n, -1n], + [-0x10000000000000001n, -0x8000000000000000n, 2n], + [-0x10000000000000000n, -0x8000000000000000n, 2n], + [-0xffffffffffffffffn, -0x8000000000000000n, 1n], + [-0xfffffffffffffffen, -0x8000000000000000n, 1n], + [-0x8000000000000001n, -0x8000000000000000n, 1n], + [-0x8000000000000000n, -0x8000000000000000n, 1n], + [-0x7fffffffffffffffn, -0x8000000000000000n, 0n], + [-0x7ffffffffffffffen, -0x8000000000000000n, 0n], + [-0x100000001n, -0x8000000000000000n, 0n], + [-0x100000000n, -0x8000000000000000n, 0n], + [-0xffffffffn, -0x8000000000000000n, 0n], + [-0xfffffffen, -0x8000000000000000n, 0n], + [-0x80000001n, -0x8000000000000000n, 0n], + [-0x80000000n, -0x8000000000000000n, 0n], + [-0x7fffffffn, -0x8000000000000000n, 0n], + [-0x7ffffffen, -0x8000000000000000n, 0n], + [-2n, -0x8000000000000000n, 0n], + [-1n, -0x8000000000000000n, 0n], + [0n, -0x8000000000000000n, 0n], + [1n, -0x8000000000000000n, 0n], + [2n, -0x8000000000000000n, 0n], + [0x7ffffffen, -0x8000000000000000n, 0n], + [0x7fffffffn, -0x8000000000000000n, 0n], + [0x80000000n, -0x8000000000000000n, 0n], + [0x80000001n, -0x8000000000000000n, 0n], + [0xfffffffen, -0x8000000000000000n, 0n], + [0xffffffffn, -0x8000000000000000n, 0n], + [0x100000000n, -0x8000000000000000n, 0n], + [0x100000001n, -0x8000000000000000n, 0n], + [0x7ffffffffffffffen, -0x8000000000000000n, 0n], + [0x7fffffffffffffffn, -0x8000000000000000n, 0n], + [0x8000000000000000n, -0x8000000000000000n, -1n], + [0x8000000000000001n, -0x8000000000000000n, -1n], + [0xfffffffffffffffen, -0x8000000000000000n, -1n], + [0xffffffffffffffffn, -0x8000000000000000n, -1n], + [0x10000000000000000n, -0x8000000000000000n, -2n], + [0x10000000000000001n, -0x8000000000000000n, -2n], + [-0x10000000000000001n, -0x7fffffffffffffffn, 2n], + [-0x10000000000000000n, -0x7fffffffffffffffn, 2n], + [-0xffffffffffffffffn, -0x7fffffffffffffffn, 2n], + [-0xfffffffffffffffen, -0x7fffffffffffffffn, 2n], + [-0x8000000000000001n, -0x7fffffffffffffffn, 1n], + [-0x8000000000000000n, -0x7fffffffffffffffn, 1n], + [-0x7fffffffffffffffn, -0x7fffffffffffffffn, 1n], + [-0x7ffffffffffffffen, -0x7fffffffffffffffn, 0n], + [-0x100000001n, -0x7fffffffffffffffn, 0n], + [-0x100000000n, -0x7fffffffffffffffn, 0n], + [-0xffffffffn, -0x7fffffffffffffffn, 0n], + [-0xfffffffen, -0x7fffffffffffffffn, 0n], + [-0x80000001n, -0x7fffffffffffffffn, 0n], + [-0x80000000n, -0x7fffffffffffffffn, 0n], + [-0x7fffffffn, -0x7fffffffffffffffn, 0n], + [-0x7ffffffen, -0x7fffffffffffffffn, 0n], + [-2n, -0x7fffffffffffffffn, 0n], + [-1n, -0x7fffffffffffffffn, 0n], + [0n, -0x7fffffffffffffffn, 0n], + [1n, -0x7fffffffffffffffn, 0n], + [2n, -0x7fffffffffffffffn, 0n], + [0x7ffffffen, -0x7fffffffffffffffn, 0n], + [0x7fffffffn, -0x7fffffffffffffffn, 0n], + [0x80000000n, -0x7fffffffffffffffn, 0n], + [0x80000001n, -0x7fffffffffffffffn, 0n], + [0xfffffffen, -0x7fffffffffffffffn, 0n], + [0xffffffffn, -0x7fffffffffffffffn, 0n], + [0x100000000n, -0x7fffffffffffffffn, 0n], + [0x100000001n, -0x7fffffffffffffffn, 0n], + [0x7ffffffffffffffen, -0x7fffffffffffffffn, 0n], + [0x7fffffffffffffffn, -0x7fffffffffffffffn, -1n], + [0x8000000000000000n, -0x7fffffffffffffffn, -1n], + [0x8000000000000001n, -0x7fffffffffffffffn, -1n], + [0xfffffffffffffffen, -0x7fffffffffffffffn, -2n], + [0xffffffffffffffffn, -0x7fffffffffffffffn, -2n], + [0x10000000000000000n, -0x7fffffffffffffffn, -2n], + [0x10000000000000001n, -0x7fffffffffffffffn, -2n], + [-0x10000000000000001n, -0x7ffffffffffffffen, 2n], + [-0x10000000000000000n, -0x7ffffffffffffffen, 2n], + [-0xffffffffffffffffn, -0x7ffffffffffffffen, 2n], + [-0xfffffffffffffffen, -0x7ffffffffffffffen, 2n], + [-0x8000000000000001n, -0x7ffffffffffffffen, 1n], + [-0x8000000000000000n, -0x7ffffffffffffffen, 1n], + [-0x7fffffffffffffffn, -0x7ffffffffffffffen, 1n], + [-0x7ffffffffffffffen, -0x7ffffffffffffffen, 1n], + [-0x100000001n, -0x7ffffffffffffffen, 0n], + [-0x100000000n, -0x7ffffffffffffffen, 0n], + [-0xffffffffn, -0x7ffffffffffffffen, 0n], + [-0xfffffffen, -0x7ffffffffffffffen, 0n], + [-0x80000001n, -0x7ffffffffffffffen, 0n], + [-0x80000000n, -0x7ffffffffffffffen, 0n], + [-0x7fffffffn, -0x7ffffffffffffffen, 0n], + [-0x7ffffffen, -0x7ffffffffffffffen, 0n], + [-2n, -0x7ffffffffffffffen, 0n], + [-1n, -0x7ffffffffffffffen, 0n], + [0n, -0x7ffffffffffffffen, 0n], + [1n, -0x7ffffffffffffffen, 0n], + [2n, -0x7ffffffffffffffen, 0n], + [0x7ffffffen, -0x7ffffffffffffffen, 0n], + [0x7fffffffn, -0x7ffffffffffffffen, 0n], + [0x80000000n, -0x7ffffffffffffffen, 0n], + [0x80000001n, -0x7ffffffffffffffen, 0n], + [0xfffffffen, -0x7ffffffffffffffen, 0n], + [0xffffffffn, -0x7ffffffffffffffen, 0n], + [0x100000000n, -0x7ffffffffffffffen, 0n], + [0x100000001n, -0x7ffffffffffffffen, 0n], + [0x7ffffffffffffffen, -0x7ffffffffffffffen, -1n], + [0x7fffffffffffffffn, -0x7ffffffffffffffen, -1n], + [0x8000000000000000n, -0x7ffffffffffffffen, -1n], + [0x8000000000000001n, -0x7ffffffffffffffen, -1n], + [0xfffffffffffffffen, -0x7ffffffffffffffen, -2n], + [0xffffffffffffffffn, -0x7ffffffffffffffen, -2n], + [0x10000000000000000n, -0x7ffffffffffffffen, -2n], + [0x10000000000000001n, -0x7ffffffffffffffen, -2n], + [-0x10000000000000001n, 0xfffffffffffffffen, -1n], + [-0x10000000000000000n, 0xfffffffffffffffen, -1n], + [-0xffffffffffffffffn, 0xfffffffffffffffen, -1n], + [-0xfffffffffffffffen, 0xfffffffffffffffen, -1n], + [-0x8000000000000001n, 0xfffffffffffffffen, 0n], + [-0x8000000000000000n, 0xfffffffffffffffen, 0n], + [-0x7fffffffffffffffn, 0xfffffffffffffffen, 0n], + [-0x7ffffffffffffffen, 0xfffffffffffffffen, 0n], + [-0x100000001n, 0xfffffffffffffffen, 0n], + [-0x100000000n, 0xfffffffffffffffen, 0n], + [-0xffffffffn, 0xfffffffffffffffen, 0n], + [-0xfffffffen, 0xfffffffffffffffen, 0n], + [-0x80000001n, 0xfffffffffffffffen, 0n], + [-0x80000000n, 0xfffffffffffffffen, 0n], + [-0x7fffffffn, 0xfffffffffffffffen, 0n], + [-0x7ffffffen, 0xfffffffffffffffen, 0n], + [-2n, 0xfffffffffffffffen, 0n], + [-1n, 0xfffffffffffffffen, 0n], + [0n, 0xfffffffffffffffen, 0n], + [1n, 0xfffffffffffffffen, 0n], + [2n, 0xfffffffffffffffen, 0n], + [0x7ffffffen, 0xfffffffffffffffen, 0n], + [0x7fffffffn, 0xfffffffffffffffen, 0n], + [0x80000000n, 0xfffffffffffffffen, 0n], + [0x80000001n, 0xfffffffffffffffen, 0n], + [0xfffffffen, 0xfffffffffffffffen, 0n], + [0xffffffffn, 0xfffffffffffffffen, 0n], + [0x100000000n, 0xfffffffffffffffen, 0n], + [0x100000001n, 0xfffffffffffffffen, 0n], + [0x7ffffffffffffffen, 0xfffffffffffffffen, 0n], + [0x7fffffffffffffffn, 0xfffffffffffffffen, 0n], + [0x8000000000000000n, 0xfffffffffffffffen, 0n], + [0x8000000000000001n, 0xfffffffffffffffen, 0n], + [0xfffffffffffffffen, 0xfffffffffffffffen, 1n], + [0xffffffffffffffffn, 0xfffffffffffffffen, 1n], + [0x10000000000000000n, 0xfffffffffffffffen, 1n], + [0x10000000000000001n, 0xfffffffffffffffen, 1n], + [-0x10000000000000001n, 0xffffffffffffffffn, -1n], + [-0x10000000000000000n, 0xffffffffffffffffn, -1n], + [-0xffffffffffffffffn, 0xffffffffffffffffn, -1n], + [-0xfffffffffffffffen, 0xffffffffffffffffn, 0n], + [-0x8000000000000001n, 0xffffffffffffffffn, 0n], + [-0x8000000000000000n, 0xffffffffffffffffn, 0n], + [-0x7fffffffffffffffn, 0xffffffffffffffffn, 0n], + [-0x7ffffffffffffffen, 0xffffffffffffffffn, 0n], + [-0x100000001n, 0xffffffffffffffffn, 0n], + [-0x100000000n, 0xffffffffffffffffn, 0n], + [-0xffffffffn, 0xffffffffffffffffn, 0n], + [-0xfffffffen, 0xffffffffffffffffn, 0n], + [-0x80000001n, 0xffffffffffffffffn, 0n], + [-0x80000000n, 0xffffffffffffffffn, 0n], + [-0x7fffffffn, 0xffffffffffffffffn, 0n], + [-0x7ffffffen, 0xffffffffffffffffn, 0n], + [-2n, 0xffffffffffffffffn, 0n], + [-1n, 0xffffffffffffffffn, 0n], + [0n, 0xffffffffffffffffn, 0n], + [1n, 0xffffffffffffffffn, 0n], + [2n, 0xffffffffffffffffn, 0n], + [0x7ffffffen, 0xffffffffffffffffn, 0n], + [0x7fffffffn, 0xffffffffffffffffn, 0n], + [0x80000000n, 0xffffffffffffffffn, 0n], + [0x80000001n, 0xffffffffffffffffn, 0n], + [0xfffffffen, 0xffffffffffffffffn, 0n], + [0xffffffffn, 0xffffffffffffffffn, 0n], + [0x100000000n, 0xffffffffffffffffn, 0n], + [0x100000001n, 0xffffffffffffffffn, 0n], + [0x7ffffffffffffffen, 0xffffffffffffffffn, 0n], + [0x7fffffffffffffffn, 0xffffffffffffffffn, 0n], + [0x8000000000000000n, 0xffffffffffffffffn, 0n], + [0x8000000000000001n, 0xffffffffffffffffn, 0n], + [0xfffffffffffffffen, 0xffffffffffffffffn, 0n], + [0xffffffffffffffffn, 0xffffffffffffffffn, 1n], + [0x10000000000000000n, 0xffffffffffffffffn, 1n], + [0x10000000000000001n, 0xffffffffffffffffn, 1n], + [-0x10000000000000001n, 0x10000000000000000n, -1n], + [-0x10000000000000000n, 0x10000000000000000n, -1n], + [-0xffffffffffffffffn, 0x10000000000000000n, 0n], + [-0xfffffffffffffffen, 0x10000000000000000n, 0n], + [-0x8000000000000001n, 0x10000000000000000n, 0n], + [-0x8000000000000000n, 0x10000000000000000n, 0n], + [-0x7fffffffffffffffn, 0x10000000000000000n, 0n], + [-0x7ffffffffffffffen, 0x10000000000000000n, 0n], + [-0x100000001n, 0x10000000000000000n, 0n], + [-0x100000000n, 0x10000000000000000n, 0n], + [-0xffffffffn, 0x10000000000000000n, 0n], + [-0xfffffffen, 0x10000000000000000n, 0n], + [-0x80000001n, 0x10000000000000000n, 0n], + [-0x80000000n, 0x10000000000000000n, 0n], + [-0x7fffffffn, 0x10000000000000000n, 0n], + [-0x7ffffffen, 0x10000000000000000n, 0n], + [-2n, 0x10000000000000000n, 0n], + [-1n, 0x10000000000000000n, 0n], + [0n, 0x10000000000000000n, 0n], + [1n, 0x10000000000000000n, 0n], + [2n, 0x10000000000000000n, 0n], + [0x7ffffffen, 0x10000000000000000n, 0n], + [0x7fffffffn, 0x10000000000000000n, 0n], + [0x80000000n, 0x10000000000000000n, 0n], + [0x80000001n, 0x10000000000000000n, 0n], + [0xfffffffen, 0x10000000000000000n, 0n], + [0xffffffffn, 0x10000000000000000n, 0n], + [0x100000000n, 0x10000000000000000n, 0n], + [0x100000001n, 0x10000000000000000n, 0n], + [0x7ffffffffffffffen, 0x10000000000000000n, 0n], + [0x7fffffffffffffffn, 0x10000000000000000n, 0n], + [0x8000000000000000n, 0x10000000000000000n, 0n], + [0x8000000000000001n, 0x10000000000000000n, 0n], + [0xfffffffffffffffen, 0x10000000000000000n, 0n], + [0xffffffffffffffffn, 0x10000000000000000n, 0n], + [0x10000000000000000n, 0x10000000000000000n, 1n], + [0x10000000000000001n, 0x10000000000000000n, 1n], + [-0x10000000000000001n, 0x10000000000000001n, -1n], + [-0x10000000000000000n, 0x10000000000000001n, 0n], + [-0xffffffffffffffffn, 0x10000000000000001n, 0n], + [-0xfffffffffffffffen, 0x10000000000000001n, 0n], + [-0x8000000000000001n, 0x10000000000000001n, 0n], + [-0x8000000000000000n, 0x10000000000000001n, 0n], + [-0x7fffffffffffffffn, 0x10000000000000001n, 0n], + [-0x7ffffffffffffffen, 0x10000000000000001n, 0n], + [-0x100000001n, 0x10000000000000001n, 0n], + [-0x100000000n, 0x10000000000000001n, 0n], + [-0xffffffffn, 0x10000000000000001n, 0n], + [-0xfffffffen, 0x10000000000000001n, 0n], + [-0x80000001n, 0x10000000000000001n, 0n], + [-0x80000000n, 0x10000000000000001n, 0n], + [-0x7fffffffn, 0x10000000000000001n, 0n], + [-0x7ffffffen, 0x10000000000000001n, 0n], + [-2n, 0x10000000000000001n, 0n], + [-1n, 0x10000000000000001n, 0n], + [0n, 0x10000000000000001n, 0n], + [1n, 0x10000000000000001n, 0n], + [2n, 0x10000000000000001n, 0n], + [0x7ffffffen, 0x10000000000000001n, 0n], + [0x7fffffffn, 0x10000000000000001n, 0n], + [0x80000000n, 0x10000000000000001n, 0n], + [0x80000001n, 0x10000000000000001n, 0n], + [0xfffffffen, 0x10000000000000001n, 0n], + [0xffffffffn, 0x10000000000000001n, 0n], + [0x100000000n, 0x10000000000000001n, 0n], + [0x100000001n, 0x10000000000000001n, 0n], + [0x7ffffffffffffffen, 0x10000000000000001n, 0n], + [0x7fffffffffffffffn, 0x10000000000000001n, 0n], + [0x8000000000000000n, 0x10000000000000001n, 0n], + [0x8000000000000001n, 0x10000000000000001n, 0n], + [0xfffffffffffffffen, 0x10000000000000001n, 0n], + [0xffffffffffffffffn, 0x10000000000000001n, 0n], + [0x10000000000000000n, 0x10000000000000001n, 0n], + [0x10000000000000001n, 0x10000000000000001n, 1n], + [-0x10000000000000001n, -0x10000000000000001n, 1n], + [-0x10000000000000000n, -0x10000000000000001n, 0n], + [-0xffffffffffffffffn, -0x10000000000000001n, 0n], + [-0xfffffffffffffffen, -0x10000000000000001n, 0n], + [-0x8000000000000001n, -0x10000000000000001n, 0n], + [-0x8000000000000000n, -0x10000000000000001n, 0n], + [-0x7fffffffffffffffn, -0x10000000000000001n, 0n], + [-0x7ffffffffffffffen, -0x10000000000000001n, 0n], + [-0x100000001n, -0x10000000000000001n, 0n], + [-0x100000000n, -0x10000000000000001n, 0n], + [-0xffffffffn, -0x10000000000000001n, 0n], + [-0xfffffffen, -0x10000000000000001n, 0n], + [-0x80000001n, -0x10000000000000001n, 0n], + [-0x80000000n, -0x10000000000000001n, 0n], + [-0x7fffffffn, -0x10000000000000001n, 0n], + [-0x7ffffffen, -0x10000000000000001n, 0n], + [-2n, -0x10000000000000001n, 0n], + [-1n, -0x10000000000000001n, 0n], + [0n, -0x10000000000000001n, 0n], + [1n, -0x10000000000000001n, 0n], + [2n, -0x10000000000000001n, 0n], + [0x7ffffffen, -0x10000000000000001n, 0n], + [0x7fffffffn, -0x10000000000000001n, 0n], + [0x80000000n, -0x10000000000000001n, 0n], + [0x80000001n, -0x10000000000000001n, 0n], + [0xfffffffen, -0x10000000000000001n, 0n], + [0xffffffffn, -0x10000000000000001n, 0n], + [0x100000000n, -0x10000000000000001n, 0n], + [0x100000001n, -0x10000000000000001n, 0n], + [0x7ffffffffffffffen, -0x10000000000000001n, 0n], + [0x7fffffffffffffffn, -0x10000000000000001n, 0n], + [0x8000000000000000n, -0x10000000000000001n, 0n], + [0x8000000000000001n, -0x10000000000000001n, 0n], + [0xfffffffffffffffen, -0x10000000000000001n, 0n], + [0xffffffffffffffffn, -0x10000000000000001n, 0n], + [0x10000000000000000n, -0x10000000000000001n, 0n], + [0x10000000000000001n, -0x10000000000000001n, -1n], + [-0x10000000000000001n, -0x10000000000000000n, 1n], + [-0x10000000000000000n, -0x10000000000000000n, 1n], + [-0xffffffffffffffffn, -0x10000000000000000n, 0n], + [-0xfffffffffffffffen, -0x10000000000000000n, 0n], + [-0x8000000000000001n, -0x10000000000000000n, 0n], + [-0x8000000000000000n, -0x10000000000000000n, 0n], + [-0x7fffffffffffffffn, -0x10000000000000000n, 0n], + [-0x7ffffffffffffffen, -0x10000000000000000n, 0n], + [-0x100000001n, -0x10000000000000000n, 0n], + [-0x100000000n, -0x10000000000000000n, 0n], + [-0xffffffffn, -0x10000000000000000n, 0n], + [-0xfffffffen, -0x10000000000000000n, 0n], + [-0x80000001n, -0x10000000000000000n, 0n], + [-0x80000000n, -0x10000000000000000n, 0n], + [-0x7fffffffn, -0x10000000000000000n, 0n], + [-0x7ffffffen, -0x10000000000000000n, 0n], + [-2n, -0x10000000000000000n, 0n], + [-1n, -0x10000000000000000n, 0n], + [0n, -0x10000000000000000n, 0n], + [1n, -0x10000000000000000n, 0n], + [2n, -0x10000000000000000n, 0n], + [0x7ffffffen, -0x10000000000000000n, 0n], + [0x7fffffffn, -0x10000000000000000n, 0n], + [0x80000000n, -0x10000000000000000n, 0n], + [0x80000001n, -0x10000000000000000n, 0n], + [0xfffffffen, -0x10000000000000000n, 0n], + [0xffffffffn, -0x10000000000000000n, 0n], + [0x100000000n, -0x10000000000000000n, 0n], + [0x100000001n, -0x10000000000000000n, 0n], + [0x7ffffffffffffffen, -0x10000000000000000n, 0n], + [0x7fffffffffffffffn, -0x10000000000000000n, 0n], + [0x8000000000000000n, -0x10000000000000000n, 0n], + [0x8000000000000001n, -0x10000000000000000n, 0n], + [0xfffffffffffffffen, -0x10000000000000000n, 0n], + [0xffffffffffffffffn, -0x10000000000000000n, 0n], + [0x10000000000000000n, -0x10000000000000000n, -1n], + [0x10000000000000001n, -0x10000000000000000n, -1n], + [-0x10000000000000001n, -0xffffffffffffffffn, 1n], + [-0x10000000000000000n, -0xffffffffffffffffn, 1n], + [-0xffffffffffffffffn, -0xffffffffffffffffn, 1n], + [-0xfffffffffffffffen, -0xffffffffffffffffn, 0n], + [-0x8000000000000001n, -0xffffffffffffffffn, 0n], + [-0x8000000000000000n, -0xffffffffffffffffn, 0n], + [-0x7fffffffffffffffn, -0xffffffffffffffffn, 0n], + [-0x7ffffffffffffffen, -0xffffffffffffffffn, 0n], + [-0x100000001n, -0xffffffffffffffffn, 0n], + [-0x100000000n, -0xffffffffffffffffn, 0n], + [-0xffffffffn, -0xffffffffffffffffn, 0n], + [-0xfffffffen, -0xffffffffffffffffn, 0n], + [-0x80000001n, -0xffffffffffffffffn, 0n], + [-0x80000000n, -0xffffffffffffffffn, 0n], + [-0x7fffffffn, -0xffffffffffffffffn, 0n], + [-0x7ffffffen, -0xffffffffffffffffn, 0n], + [-2n, -0xffffffffffffffffn, 0n], + [-1n, -0xffffffffffffffffn, 0n], + [0n, -0xffffffffffffffffn, 0n], + [1n, -0xffffffffffffffffn, 0n], + [2n, -0xffffffffffffffffn, 0n], + [0x7ffffffen, -0xffffffffffffffffn, 0n], + [0x7fffffffn, -0xffffffffffffffffn, 0n], + [0x80000000n, -0xffffffffffffffffn, 0n], + [0x80000001n, -0xffffffffffffffffn, 0n], + [0xfffffffen, -0xffffffffffffffffn, 0n], + [0xffffffffn, -0xffffffffffffffffn, 0n], + [0x100000000n, -0xffffffffffffffffn, 0n], + [0x100000001n, -0xffffffffffffffffn, 0n], + [0x7ffffffffffffffen, -0xffffffffffffffffn, 0n], + [0x7fffffffffffffffn, -0xffffffffffffffffn, 0n], + [0x8000000000000000n, -0xffffffffffffffffn, 0n], + [0x8000000000000001n, -0xffffffffffffffffn, 0n], + [0xfffffffffffffffen, -0xffffffffffffffffn, 0n], + [0xffffffffffffffffn, -0xffffffffffffffffn, -1n], + [0x10000000000000000n, -0xffffffffffffffffn, -1n], + [0x10000000000000001n, -0xffffffffffffffffn, -1n], + [-0x10000000000000001n, -0xfffffffffffffffen, 1n], + [-0x10000000000000000n, -0xfffffffffffffffen, 1n], + [-0xffffffffffffffffn, -0xfffffffffffffffen, 1n], + [-0xfffffffffffffffen, -0xfffffffffffffffen, 1n], + [-0x8000000000000001n, -0xfffffffffffffffen, 0n], + [-0x8000000000000000n, -0xfffffffffffffffen, 0n], + [-0x7fffffffffffffffn, -0xfffffffffffffffen, 0n], + [-0x7ffffffffffffffen, -0xfffffffffffffffen, 0n], + [-0x100000001n, -0xfffffffffffffffen, 0n], + [-0x100000000n, -0xfffffffffffffffen, 0n], + [-0xffffffffn, -0xfffffffffffffffen, 0n], + [-0xfffffffen, -0xfffffffffffffffen, 0n], + [-0x80000001n, -0xfffffffffffffffen, 0n], + [-0x80000000n, -0xfffffffffffffffen, 0n], + [-0x7fffffffn, -0xfffffffffffffffen, 0n], + [-0x7ffffffen, -0xfffffffffffffffen, 0n], + [-2n, -0xfffffffffffffffen, 0n], + [-1n, -0xfffffffffffffffen, 0n], + [0n, -0xfffffffffffffffen, 0n], + [1n, -0xfffffffffffffffen, 0n], + [2n, -0xfffffffffffffffen, 0n], + [0x7ffffffen, -0xfffffffffffffffen, 0n], + [0x7fffffffn, -0xfffffffffffffffen, 0n], + [0x80000000n, -0xfffffffffffffffen, 0n], + [0x80000001n, -0xfffffffffffffffen, 0n], + [0xfffffffen, -0xfffffffffffffffen, 0n], + [0xffffffffn, -0xfffffffffffffffen, 0n], + [0x100000000n, -0xfffffffffffffffen, 0n], + [0x100000001n, -0xfffffffffffffffen, 0n], + [0x7ffffffffffffffen, -0xfffffffffffffffen, 0n], + [0x7fffffffffffffffn, -0xfffffffffffffffen, 0n], + [0x8000000000000000n, -0xfffffffffffffffen, 0n], + [0x8000000000000001n, -0xfffffffffffffffen, 0n], + [0xfffffffffffffffen, -0xfffffffffffffffen, -1n], + [0xffffffffffffffffn, -0xfffffffffffffffen, -1n], + [0x10000000000000000n, -0xfffffffffffffffen, -1n], + [0x10000000000000001n, -0xfffffffffffffffen, -1n], +]; + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs / rhs, expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-inc.js b/js/src/jit-test/tests/bigint/bigint-inc.js new file mode 100644 index 0000000000..cb63c2e8a7 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-inc.js @@ -0,0 +1,51 @@ +const tests = [ + [-0x10000000000000001n, -0x10000000000000000n], + [-0x10000000000000000n, -0xffffffffffffffffn], + [-0xffffffffffffffffn, -0xfffffffffffffffen], + [-0xfffffffffffffffen, -0xfffffffffffffffdn], + [-0x8000000000000001n, -0x8000000000000000n], + [-0x8000000000000000n, -0x7fffffffffffffffn], + [-0x7fffffffffffffffn, -0x7ffffffffffffffen], + [-0x7ffffffffffffffen, -0x7ffffffffffffffdn], + [-0x100000001n, -0x100000000n], + [-0x100000000n, -0xffffffffn], + [-0xffffffffn, -0xfffffffen], + [-0xfffffffen, -0xfffffffdn], + [-0x80000001n, -0x80000000n], + [-0x80000000n, -0x7fffffffn], + [-0x7fffffffn, -0x7ffffffen], + [-0x7ffffffen, -0x7ffffffdn], + [-2n, -1n], + [-1n, 0n], + [0n, 1n], + [1n, 2n], + [2n, 3n], + [0x7ffffffen, 0x7fffffffn], + [0x7fffffffn, 0x80000000n], + [0x80000000n, 0x80000001n], + [0x80000001n, 0x80000002n], + [0xfffffffen, 0xffffffffn], + [0xffffffffn, 0x100000000n], + [0x100000000n, 0x100000001n], + [0x100000001n, 0x100000002n], + [0x7ffffffffffffffen, 0x7fffffffffffffffn], + [0x7fffffffffffffffn, 0x8000000000000000n], + [0x8000000000000000n, 0x8000000000000001n], + [0x8000000000000001n, 0x8000000000000002n], + [0xfffffffffffffffen, 0xffffffffffffffffn], + [0xffffffffffffffffn, 0x10000000000000000n], + [0x10000000000000000n, 0x10000000000000001n], + [0x10000000000000001n, 0x10000000000000002n], +]; + +function f(tests) { + for (let test of tests) { + let input = test[0], expected = test[1]; + + assertEq(++input, expected); + } +} + +for (let i = 0; i < 200; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-lsh.js b/js/src/jit-test/tests/bigint/bigint-lsh.js new file mode 100644 index 0000000000..dd5ea6f35d --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-lsh.js @@ -0,0 +1,894 @@ +const tests = [ + [-0x10000000000000001n, 0n, -0x10000000000000001n], + [-0x10000000000000000n, 0n, -0x10000000000000000n], + [-0xffffffffffffffffn, 0n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 0n, -0xfffffffffffffffen], + [-0x8000000000000001n, 0n, -0x8000000000000001n], + [-0x8000000000000000n, 0n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 0n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0n, -0x7ffffffffffffffen], + [-0x100000001n, 0n, -0x100000001n], + [-0x100000000n, 0n, -0x100000000n], + [-0xffffffffn, 0n, -0xffffffffn], + [-0xfffffffen, 0n, -0xfffffffen], + [-0x80000001n, 0n, -0x80000001n], + [-0x80000000n, 0n, -0x80000000n], + [-0x7fffffffn, 0n, -0x7fffffffn], + [-0x7ffffffen, 0n, -0x7ffffffen], + [-9n, 0n, -9n], + [-8n, 0n, -8n], + [-7n, 0n, -7n], + [-6n, 0n, -6n], + [-5n, 0n, -5n], + [-4n, 0n, -4n], + [-3n, 0n, -3n], + [-2n, 0n, -2n], + [-1n, 0n, -1n], + [0n, 0n, 0n], + [1n, 0n, 1n], + [2n, 0n, 2n], + [3n, 0n, 3n], + [4n, 0n, 4n], + [5n, 0n, 5n], + [6n, 0n, 6n], + [7n, 0n, 7n], + [8n, 0n, 8n], + [9n, 0n, 9n], + [0x7ffffffen, 0n, 0x7ffffffen], + [0x7fffffffn, 0n, 0x7fffffffn], + [0x80000000n, 0n, 0x80000000n], + [0x80000001n, 0n, 0x80000001n], + [0xfffffffen, 0n, 0xfffffffen], + [0xffffffffn, 0n, 0xffffffffn], + [0x100000000n, 0n, 0x100000000n], + [0x100000001n, 0n, 0x100000001n], + [0x7ffffffffffffffen, 0n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0n, 0x8000000000000000n], + [0x8000000000000001n, 0n, 0x8000000000000001n], + [0xfffffffffffffffen, 0n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0n, 0xffffffffffffffffn], + [0x10000000000000000n, 0n, 0x10000000000000000n], + [0x10000000000000001n, 0n, 0x10000000000000001n], + [-0x10000000000000001n, 1n, -0x20000000000000002n], + [-0x10000000000000000n, 1n, -0x20000000000000000n], + [-0xffffffffffffffffn, 1n, -0x1fffffffffffffffen], + [-0xfffffffffffffffen, 1n, -0x1fffffffffffffffcn], + [-0x8000000000000001n, 1n, -0x10000000000000002n], + [-0x8000000000000000n, 1n, -0x10000000000000000n], + [-0x7fffffffffffffffn, 1n, -0xfffffffffffffffen], + [-0x7ffffffffffffffen, 1n, -0xfffffffffffffffcn], + [-0x100000001n, 1n, -0x200000002n], + [-0x100000000n, 1n, -0x200000000n], + [-0xffffffffn, 1n, -0x1fffffffen], + [-0xfffffffen, 1n, -0x1fffffffcn], + [-0x80000001n, 1n, -0x100000002n], + [-0x80000000n, 1n, -0x100000000n], + [-0x7fffffffn, 1n, -0xfffffffen], + [-0x7ffffffen, 1n, -0xfffffffcn], + [-9n, 1n, -18n], + [-8n, 1n, -16n], + [-7n, 1n, -14n], + [-6n, 1n, -12n], + [-5n, 1n, -10n], + [-4n, 1n, -8n], + [-3n, 1n, -6n], + [-2n, 1n, -4n], + [-1n, 1n, -2n], + [0n, 1n, 0n], + [1n, 1n, 2n], + [2n, 1n, 4n], + [3n, 1n, 6n], + [4n, 1n, 8n], + [5n, 1n, 10n], + [6n, 1n, 12n], + [7n, 1n, 14n], + [8n, 1n, 16n], + [9n, 1n, 18n], + [0x7ffffffen, 1n, 0xfffffffcn], + [0x7fffffffn, 1n, 0xfffffffen], + [0x80000000n, 1n, 0x100000000n], + [0x80000001n, 1n, 0x100000002n], + [0xfffffffen, 1n, 0x1fffffffcn], + [0xffffffffn, 1n, 0x1fffffffen], + [0x100000000n, 1n, 0x200000000n], + [0x100000001n, 1n, 0x200000002n], + [0x7ffffffffffffffen, 1n, 0xfffffffffffffffcn], + [0x7fffffffffffffffn, 1n, 0xfffffffffffffffen], + [0x8000000000000000n, 1n, 0x10000000000000000n], + [0x8000000000000001n, 1n, 0x10000000000000002n], + [0xfffffffffffffffen, 1n, 0x1fffffffffffffffcn], + [0xffffffffffffffffn, 1n, 0x1fffffffffffffffen], + [0x10000000000000000n, 1n, 0x20000000000000000n], + [0x10000000000000001n, 1n, 0x20000000000000002n], + [-0x10000000000000001n, 2n, -0x40000000000000004n], + [-0x10000000000000000n, 2n, -0x40000000000000000n], + [-0xffffffffffffffffn, 2n, -0x3fffffffffffffffcn], + [-0xfffffffffffffffen, 2n, -0x3fffffffffffffff8n], + [-0x8000000000000001n, 2n, -0x20000000000000004n], + [-0x8000000000000000n, 2n, -0x20000000000000000n], + [-0x7fffffffffffffffn, 2n, -0x1fffffffffffffffcn], + [-0x7ffffffffffffffen, 2n, -0x1fffffffffffffff8n], + [-0x100000001n, 2n, -0x400000004n], + [-0x100000000n, 2n, -0x400000000n], + [-0xffffffffn, 2n, -0x3fffffffcn], + [-0xfffffffen, 2n, -0x3fffffff8n], + [-0x80000001n, 2n, -0x200000004n], + [-0x80000000n, 2n, -0x200000000n], + [-0x7fffffffn, 2n, -0x1fffffffcn], + [-0x7ffffffen, 2n, -0x1fffffff8n], + [-9n, 2n, -36n], + [-8n, 2n, -32n], + [-7n, 2n, -28n], + [-6n, 2n, -24n], + [-5n, 2n, -20n], + [-4n, 2n, -16n], + [-3n, 2n, -12n], + [-2n, 2n, -8n], + [-1n, 2n, -4n], + [0n, 2n, 0n], + [1n, 2n, 4n], + [2n, 2n, 8n], + [3n, 2n, 12n], + [4n, 2n, 16n], + [5n, 2n, 20n], + [6n, 2n, 24n], + [7n, 2n, 28n], + [8n, 2n, 32n], + [9n, 2n, 36n], + [0x7ffffffen, 2n, 0x1fffffff8n], + [0x7fffffffn, 2n, 0x1fffffffcn], + [0x80000000n, 2n, 0x200000000n], + [0x80000001n, 2n, 0x200000004n], + [0xfffffffen, 2n, 0x3fffffff8n], + [0xffffffffn, 2n, 0x3fffffffcn], + [0x100000000n, 2n, 0x400000000n], + [0x100000001n, 2n, 0x400000004n], + [0x7ffffffffffffffen, 2n, 0x1fffffffffffffff8n], + [0x7fffffffffffffffn, 2n, 0x1fffffffffffffffcn], + [0x8000000000000000n, 2n, 0x20000000000000000n], + [0x8000000000000001n, 2n, 0x20000000000000004n], + [0xfffffffffffffffen, 2n, 0x3fffffffffffffff8n], + [0xffffffffffffffffn, 2n, 0x3fffffffffffffffcn], + [0x10000000000000000n, 2n, 0x40000000000000000n], + [0x10000000000000001n, 2n, 0x40000000000000004n], + [-0x10000000000000001n, 3n, -0x80000000000000008n], + [-0x10000000000000000n, 3n, -0x80000000000000000n], + [-0xffffffffffffffffn, 3n, -0x7fffffffffffffff8n], + [-0xfffffffffffffffen, 3n, -0x7fffffffffffffff0n], + [-0x8000000000000001n, 3n, -0x40000000000000008n], + [-0x8000000000000000n, 3n, -0x40000000000000000n], + [-0x7fffffffffffffffn, 3n, -0x3fffffffffffffff8n], + [-0x7ffffffffffffffen, 3n, -0x3fffffffffffffff0n], + [-0x100000001n, 3n, -0x800000008n], + [-0x100000000n, 3n, -0x800000000n], + [-0xffffffffn, 3n, -0x7fffffff8n], + [-0xfffffffen, 3n, -0x7fffffff0n], + [-0x80000001n, 3n, -0x400000008n], + [-0x80000000n, 3n, -0x400000000n], + [-0x7fffffffn, 3n, -0x3fffffff8n], + [-0x7ffffffen, 3n, -0x3fffffff0n], + [-9n, 3n, -72n], + [-8n, 3n, -64n], + [-7n, 3n, -56n], + [-6n, 3n, -48n], + [-5n, 3n, -40n], + [-4n, 3n, -32n], + [-3n, 3n, -24n], + [-2n, 3n, -16n], + [-1n, 3n, -8n], + [0n, 3n, 0n], + [1n, 3n, 8n], + [2n, 3n, 16n], + [3n, 3n, 24n], + [4n, 3n, 32n], + [5n, 3n, 40n], + [6n, 3n, 48n], + [7n, 3n, 56n], + [8n, 3n, 64n], + [9n, 3n, 72n], + [0x7ffffffen, 3n, 0x3fffffff0n], + [0x7fffffffn, 3n, 0x3fffffff8n], + [0x80000000n, 3n, 0x400000000n], + [0x80000001n, 3n, 0x400000008n], + [0xfffffffen, 3n, 0x7fffffff0n], + [0xffffffffn, 3n, 0x7fffffff8n], + [0x100000000n, 3n, 0x800000000n], + [0x100000001n, 3n, 0x800000008n], + [0x7ffffffffffffffen, 3n, 0x3fffffffffffffff0n], + [0x7fffffffffffffffn, 3n, 0x3fffffffffffffff8n], + [0x8000000000000000n, 3n, 0x40000000000000000n], + [0x8000000000000001n, 3n, 0x40000000000000008n], + [0xfffffffffffffffen, 3n, 0x7fffffffffffffff0n], + [0xffffffffffffffffn, 3n, 0x7fffffffffffffff8n], + [0x10000000000000000n, 3n, 0x80000000000000000n], + [0x10000000000000001n, 3n, 0x80000000000000008n], + [-0x10000000000000001n, 4n, -0x100000000000000010n], + [-0x10000000000000000n, 4n, -0x100000000000000000n], + [-0xffffffffffffffffn, 4n, -0xffffffffffffffff0n], + [-0xfffffffffffffffen, 4n, -0xfffffffffffffffe0n], + [-0x8000000000000001n, 4n, -0x80000000000000010n], + [-0x8000000000000000n, 4n, -0x80000000000000000n], + [-0x7fffffffffffffffn, 4n, -0x7fffffffffffffff0n], + [-0x7ffffffffffffffen, 4n, -0x7ffffffffffffffe0n], + [-0x100000001n, 4n, -0x1000000010n], + [-0x100000000n, 4n, -0x1000000000n], + [-0xffffffffn, 4n, -0xffffffff0n], + [-0xfffffffen, 4n, -0xfffffffe0n], + [-0x80000001n, 4n, -0x800000010n], + [-0x80000000n, 4n, -0x800000000n], + [-0x7fffffffn, 4n, -0x7fffffff0n], + [-0x7ffffffen, 4n, -0x7ffffffe0n], + [-9n, 4n, -144n], + [-8n, 4n, -128n], + [-7n, 4n, -112n], + [-6n, 4n, -96n], + [-5n, 4n, -80n], + [-4n, 4n, -64n], + [-3n, 4n, -48n], + [-2n, 4n, -32n], + [-1n, 4n, -16n], + [0n, 4n, 0n], + [1n, 4n, 16n], + [2n, 4n, 32n], + [3n, 4n, 48n], + [4n, 4n, 64n], + [5n, 4n, 80n], + [6n, 4n, 96n], + [7n, 4n, 112n], + [8n, 4n, 128n], + [9n, 4n, 144n], + [0x7ffffffen, 4n, 0x7ffffffe0n], + [0x7fffffffn, 4n, 0x7fffffff0n], + [0x80000000n, 4n, 0x800000000n], + [0x80000001n, 4n, 0x800000010n], + [0xfffffffen, 4n, 0xfffffffe0n], + [0xffffffffn, 4n, 0xffffffff0n], + [0x100000000n, 4n, 0x1000000000n], + [0x100000001n, 4n, 0x1000000010n], + [0x7ffffffffffffffen, 4n, 0x7ffffffffffffffe0n], + [0x7fffffffffffffffn, 4n, 0x7fffffffffffffff0n], + [0x8000000000000000n, 4n, 0x80000000000000000n], + [0x8000000000000001n, 4n, 0x80000000000000010n], + [0xfffffffffffffffen, 4n, 0xfffffffffffffffe0n], + [0xffffffffffffffffn, 4n, 0xffffffffffffffff0n], + [0x10000000000000000n, 4n, 0x100000000000000000n], + [0x10000000000000001n, 4n, 0x100000000000000010n], + [-0x10000000000000001n, 31n, -0x800000000000000080000000n], + [-0x10000000000000000n, 31n, -0x800000000000000000000000n], + [-0xffffffffffffffffn, 31n, -0x7fffffffffffffff80000000n], + [-0xfffffffffffffffen, 31n, -0x7fffffffffffffff00000000n], + [-0x8000000000000001n, 31n, -0x400000000000000080000000n], + [-0x8000000000000000n, 31n, -0x400000000000000000000000n], + [-0x7fffffffffffffffn, 31n, -0x3fffffffffffffff80000000n], + [-0x7ffffffffffffffen, 31n, -0x3fffffffffffffff00000000n], + [-0x100000001n, 31n, -0x8000000080000000n], + [-0x100000000n, 31n, -0x8000000000000000n], + [-0xffffffffn, 31n, -0x7fffffff80000000n], + [-0xfffffffen, 31n, -0x7fffffff00000000n], + [-0x80000001n, 31n, -0x4000000080000000n], + [-0x80000000n, 31n, -0x4000000000000000n], + [-0x7fffffffn, 31n, -0x3fffffff80000000n], + [-0x7ffffffen, 31n, -0x3fffffff00000000n], + [-9n, 31n, -0x480000000n], + [-8n, 31n, -0x400000000n], + [-7n, 31n, -0x380000000n], + [-6n, 31n, -0x300000000n], + [-5n, 31n, -0x280000000n], + [-4n, 31n, -0x200000000n], + [-3n, 31n, -0x180000000n], + [-2n, 31n, -0x100000000n], + [-1n, 31n, -0x80000000n], + [0n, 31n, 0n], + [1n, 31n, 0x80000000n], + [2n, 31n, 0x100000000n], + [3n, 31n, 0x180000000n], + [4n, 31n, 0x200000000n], + [5n, 31n, 0x280000000n], + [6n, 31n, 0x300000000n], + [7n, 31n, 0x380000000n], + [8n, 31n, 0x400000000n], + [9n, 31n, 0x480000000n], + [0x7ffffffen, 31n, 0x3fffffff00000000n], + [0x7fffffffn, 31n, 0x3fffffff80000000n], + [0x80000000n, 31n, 0x4000000000000000n], + [0x80000001n, 31n, 0x4000000080000000n], + [0xfffffffen, 31n, 0x7fffffff00000000n], + [0xffffffffn, 31n, 0x7fffffff80000000n], + [0x100000000n, 31n, 0x8000000000000000n], + [0x100000001n, 31n, 0x8000000080000000n], + [0x7ffffffffffffffen, 31n, 0x3fffffffffffffff00000000n], + [0x7fffffffffffffffn, 31n, 0x3fffffffffffffff80000000n], + [0x8000000000000000n, 31n, 0x400000000000000000000000n], + [0x8000000000000001n, 31n, 0x400000000000000080000000n], + [0xfffffffffffffffen, 31n, 0x7fffffffffffffff00000000n], + [0xffffffffffffffffn, 31n, 0x7fffffffffffffff80000000n], + [0x10000000000000000n, 31n, 0x800000000000000000000000n], + [0x10000000000000001n, 31n, 0x800000000000000080000000n], + [-0x10000000000000001n, 32n, -0x1000000000000000100000000n], + [-0x10000000000000000n, 32n, -0x1000000000000000000000000n], + [-0xffffffffffffffffn, 32n, -0xffffffffffffffff00000000n], + [-0xfffffffffffffffen, 32n, -0xfffffffffffffffe00000000n], + [-0x8000000000000001n, 32n, -0x800000000000000100000000n], + [-0x8000000000000000n, 32n, -0x800000000000000000000000n], + [-0x7fffffffffffffffn, 32n, -0x7fffffffffffffff00000000n], + [-0x7ffffffffffffffen, 32n, -0x7ffffffffffffffe00000000n], + [-0x100000001n, 32n, -0x10000000100000000n], + [-0x100000000n, 32n, -0x10000000000000000n], + [-0xffffffffn, 32n, -0xffffffff00000000n], + [-0xfffffffen, 32n, -0xfffffffe00000000n], + [-0x80000001n, 32n, -0x8000000100000000n], + [-0x80000000n, 32n, -0x8000000000000000n], + [-0x7fffffffn, 32n, -0x7fffffff00000000n], + [-0x7ffffffen, 32n, -0x7ffffffe00000000n], + [-9n, 32n, -0x900000000n], + [-8n, 32n, -0x800000000n], + [-7n, 32n, -0x700000000n], + [-6n, 32n, -0x600000000n], + [-5n, 32n, -0x500000000n], + [-4n, 32n, -0x400000000n], + [-3n, 32n, -0x300000000n], + [-2n, 32n, -0x200000000n], + [-1n, 32n, -0x100000000n], + [0n, 32n, 0n], + [1n, 32n, 0x100000000n], + [2n, 32n, 0x200000000n], + [3n, 32n, 0x300000000n], + [4n, 32n, 0x400000000n], + [5n, 32n, 0x500000000n], + [6n, 32n, 0x600000000n], + [7n, 32n, 0x700000000n], + [8n, 32n, 0x800000000n], + [9n, 32n, 0x900000000n], + [0x7ffffffen, 32n, 0x7ffffffe00000000n], + [0x7fffffffn, 32n, 0x7fffffff00000000n], + [0x80000000n, 32n, 0x8000000000000000n], + [0x80000001n, 32n, 0x8000000100000000n], + [0xfffffffen, 32n, 0xfffffffe00000000n], + [0xffffffffn, 32n, 0xffffffff00000000n], + [0x100000000n, 32n, 0x10000000000000000n], + [0x100000001n, 32n, 0x10000000100000000n], + [0x7ffffffffffffffen, 32n, 0x7ffffffffffffffe00000000n], + [0x7fffffffffffffffn, 32n, 0x7fffffffffffffff00000000n], + [0x8000000000000000n, 32n, 0x800000000000000000000000n], + [0x8000000000000001n, 32n, 0x800000000000000100000000n], + [0xfffffffffffffffen, 32n, 0xfffffffffffffffe00000000n], + [0xffffffffffffffffn, 32n, 0xffffffffffffffff00000000n], + [0x10000000000000000n, 32n, 0x1000000000000000000000000n], + [0x10000000000000001n, 32n, 0x1000000000000000100000000n], + [-0x10000000000000001n, 63n, -0x80000000000000008000000000000000n], + [-0x10000000000000000n, 63n, -0x80000000000000000000000000000000n], + [-0xffffffffffffffffn, 63n, -0x7fffffffffffffff8000000000000000n], + [-0xfffffffffffffffen, 63n, -0x7fffffffffffffff0000000000000000n], + [-0x8000000000000001n, 63n, -0x40000000000000008000000000000000n], + [-0x8000000000000000n, 63n, -0x40000000000000000000000000000000n], + [-0x7fffffffffffffffn, 63n, -0x3fffffffffffffff8000000000000000n], + [-0x7ffffffffffffffen, 63n, -0x3fffffffffffffff0000000000000000n], + [-0x100000001n, 63n, -0x800000008000000000000000n], + [-0x100000000n, 63n, -0x800000000000000000000000n], + [-0xffffffffn, 63n, -0x7fffffff8000000000000000n], + [-0xfffffffen, 63n, -0x7fffffff0000000000000000n], + [-0x80000001n, 63n, -0x400000008000000000000000n], + [-0x80000000n, 63n, -0x400000000000000000000000n], + [-0x7fffffffn, 63n, -0x3fffffff8000000000000000n], + [-0x7ffffffen, 63n, -0x3fffffff0000000000000000n], + [-9n, 63n, -0x48000000000000000n], + [-8n, 63n, -0x40000000000000000n], + [-7n, 63n, -0x38000000000000000n], + [-6n, 63n, -0x30000000000000000n], + [-5n, 63n, -0x28000000000000000n], + [-4n, 63n, -0x20000000000000000n], + [-3n, 63n, -0x18000000000000000n], + [-2n, 63n, -0x10000000000000000n], + [-1n, 63n, -0x8000000000000000n], + [0n, 63n, 0n], + [1n, 63n, 0x8000000000000000n], + [2n, 63n, 0x10000000000000000n], + [3n, 63n, 0x18000000000000000n], + [4n, 63n, 0x20000000000000000n], + [5n, 63n, 0x28000000000000000n], + [6n, 63n, 0x30000000000000000n], + [7n, 63n, 0x38000000000000000n], + [8n, 63n, 0x40000000000000000n], + [9n, 63n, 0x48000000000000000n], + [0x7ffffffen, 63n, 0x3fffffff0000000000000000n], + [0x7fffffffn, 63n, 0x3fffffff8000000000000000n], + [0x80000000n, 63n, 0x400000000000000000000000n], + [0x80000001n, 63n, 0x400000008000000000000000n], + [0xfffffffen, 63n, 0x7fffffff0000000000000000n], + [0xffffffffn, 63n, 0x7fffffff8000000000000000n], + [0x100000000n, 63n, 0x800000000000000000000000n], + [0x100000001n, 63n, 0x800000008000000000000000n], + [0x7ffffffffffffffen, 63n, 0x3fffffffffffffff0000000000000000n], + [0x7fffffffffffffffn, 63n, 0x3fffffffffffffff8000000000000000n], + [0x8000000000000000n, 63n, 0x40000000000000000000000000000000n], + [0x8000000000000001n, 63n, 0x40000000000000008000000000000000n], + [0xfffffffffffffffen, 63n, 0x7fffffffffffffff0000000000000000n], + [0xffffffffffffffffn, 63n, 0x7fffffffffffffff8000000000000000n], + [0x10000000000000000n, 63n, 0x80000000000000000000000000000000n], + [0x10000000000000001n, 63n, 0x80000000000000008000000000000000n], + [-0x10000000000000001n, 64n, -0x100000000000000010000000000000000n], + [-0x10000000000000000n, 64n, -0x100000000000000000000000000000000n], + [-0xffffffffffffffffn, 64n, -0xffffffffffffffff0000000000000000n], + [-0xfffffffffffffffen, 64n, -0xfffffffffffffffe0000000000000000n], + [-0x8000000000000001n, 64n, -0x80000000000000010000000000000000n], + [-0x8000000000000000n, 64n, -0x80000000000000000000000000000000n], + [-0x7fffffffffffffffn, 64n, -0x7fffffffffffffff0000000000000000n], + [-0x7ffffffffffffffen, 64n, -0x7ffffffffffffffe0000000000000000n], + [-0x100000001n, 64n, -0x1000000010000000000000000n], + [-0x100000000n, 64n, -0x1000000000000000000000000n], + [-0xffffffffn, 64n, -0xffffffff0000000000000000n], + [-0xfffffffen, 64n, -0xfffffffe0000000000000000n], + [-0x80000001n, 64n, -0x800000010000000000000000n], + [-0x80000000n, 64n, -0x800000000000000000000000n], + [-0x7fffffffn, 64n, -0x7fffffff0000000000000000n], + [-0x7ffffffen, 64n, -0x7ffffffe0000000000000000n], + [-9n, 64n, -0x90000000000000000n], + [-8n, 64n, -0x80000000000000000n], + [-7n, 64n, -0x70000000000000000n], + [-6n, 64n, -0x60000000000000000n], + [-5n, 64n, -0x50000000000000000n], + [-4n, 64n, -0x40000000000000000n], + [-3n, 64n, -0x30000000000000000n], + [-2n, 64n, -0x20000000000000000n], + [-1n, 64n, -0x10000000000000000n], + [0n, 64n, 0n], + [1n, 64n, 0x10000000000000000n], + [2n, 64n, 0x20000000000000000n], + [3n, 64n, 0x30000000000000000n], + [4n, 64n, 0x40000000000000000n], + [5n, 64n, 0x50000000000000000n], + [6n, 64n, 0x60000000000000000n], + [7n, 64n, 0x70000000000000000n], + [8n, 64n, 0x80000000000000000n], + [9n, 64n, 0x90000000000000000n], + [0x7ffffffen, 64n, 0x7ffffffe0000000000000000n], + [0x7fffffffn, 64n, 0x7fffffff0000000000000000n], + [0x80000000n, 64n, 0x800000000000000000000000n], + [0x80000001n, 64n, 0x800000010000000000000000n], + [0xfffffffen, 64n, 0xfffffffe0000000000000000n], + [0xffffffffn, 64n, 0xffffffff0000000000000000n], + [0x100000000n, 64n, 0x1000000000000000000000000n], + [0x100000001n, 64n, 0x1000000010000000000000000n], + [0x7ffffffffffffffen, 64n, 0x7ffffffffffffffe0000000000000000n], + [0x7fffffffffffffffn, 64n, 0x7fffffffffffffff0000000000000000n], + [0x8000000000000000n, 64n, 0x80000000000000000000000000000000n], + [0x8000000000000001n, 64n, 0x80000000000000010000000000000000n], + [0xfffffffffffffffen, 64n, 0xfffffffffffffffe0000000000000000n], + [0xffffffffffffffffn, 64n, 0xffffffffffffffff0000000000000000n], + [0x10000000000000000n, 64n, 0x100000000000000000000000000000000n], + [0x10000000000000001n, 64n, 0x100000000000000010000000000000000n], + [-0x10000000000000001n, -1n, -0x8000000000000001n], + [-0x10000000000000000n, -1n, -0x8000000000000000n], + [-0xffffffffffffffffn, -1n, -0x8000000000000000n], + [-0xfffffffffffffffen, -1n, -0x7fffffffffffffffn], + [-0x8000000000000001n, -1n, -0x4000000000000001n], + [-0x8000000000000000n, -1n, -0x4000000000000000n], + [-0x7fffffffffffffffn, -1n, -0x4000000000000000n], + [-0x7ffffffffffffffen, -1n, -0x3fffffffffffffffn], + [-0x100000001n, -1n, -0x80000001n], + [-0x100000000n, -1n, -0x80000000n], + [-0xffffffffn, -1n, -0x80000000n], + [-0xfffffffen, -1n, -0x7fffffffn], + [-0x80000001n, -1n, -0x40000001n], + [-0x80000000n, -1n, -0x40000000n], + [-0x7fffffffn, -1n, -0x40000000n], + [-0x7ffffffen, -1n, -0x3fffffffn], + [-9n, -1n, -5n], + [-8n, -1n, -4n], + [-7n, -1n, -4n], + [-6n, -1n, -3n], + [-5n, -1n, -3n], + [-4n, -1n, -2n], + [-3n, -1n, -2n], + [-2n, -1n, -1n], + [-1n, -1n, -1n], + [0n, -1n, 0n], + [1n, -1n, 0n], + [2n, -1n, 1n], + [3n, -1n, 1n], + [4n, -1n, 2n], + [5n, -1n, 2n], + [6n, -1n, 3n], + [7n, -1n, 3n], + [8n, -1n, 4n], + [9n, -1n, 4n], + [0x7ffffffen, -1n, 0x3fffffffn], + [0x7fffffffn, -1n, 0x3fffffffn], + [0x80000000n, -1n, 0x40000000n], + [0x80000001n, -1n, 0x40000000n], + [0xfffffffen, -1n, 0x7fffffffn], + [0xffffffffn, -1n, 0x7fffffffn], + [0x100000000n, -1n, 0x80000000n], + [0x100000001n, -1n, 0x80000000n], + [0x7ffffffffffffffen, -1n, 0x3fffffffffffffffn], + [0x7fffffffffffffffn, -1n, 0x3fffffffffffffffn], + [0x8000000000000000n, -1n, 0x4000000000000000n], + [0x8000000000000001n, -1n, 0x4000000000000000n], + [0xfffffffffffffffen, -1n, 0x7fffffffffffffffn], + [0xffffffffffffffffn, -1n, 0x7fffffffffffffffn], + [0x10000000000000000n, -1n, 0x8000000000000000n], + [0x10000000000000001n, -1n, 0x8000000000000000n], + [-0x10000000000000001n, -2n, -0x4000000000000001n], + [-0x10000000000000000n, -2n, -0x4000000000000000n], + [-0xffffffffffffffffn, -2n, -0x4000000000000000n], + [-0xfffffffffffffffen, -2n, -0x4000000000000000n], + [-0x8000000000000001n, -2n, -0x2000000000000001n], + [-0x8000000000000000n, -2n, -0x2000000000000000n], + [-0x7fffffffffffffffn, -2n, -0x2000000000000000n], + [-0x7ffffffffffffffen, -2n, -0x2000000000000000n], + [-0x100000001n, -2n, -0x40000001n], + [-0x100000000n, -2n, -0x40000000n], + [-0xffffffffn, -2n, -0x40000000n], + [-0xfffffffen, -2n, -0x40000000n], + [-0x80000001n, -2n, -0x20000001n], + [-0x80000000n, -2n, -0x20000000n], + [-0x7fffffffn, -2n, -0x20000000n], + [-0x7ffffffen, -2n, -0x20000000n], + [-9n, -2n, -3n], + [-8n, -2n, -2n], + [-7n, -2n, -2n], + [-6n, -2n, -2n], + [-5n, -2n, -2n], + [-4n, -2n, -1n], + [-3n, -2n, -1n], + [-2n, -2n, -1n], + [-1n, -2n, -1n], + [0n, -2n, 0n], + [1n, -2n, 0n], + [2n, -2n, 0n], + [3n, -2n, 0n], + [4n, -2n, 1n], + [5n, -2n, 1n], + [6n, -2n, 1n], + [7n, -2n, 1n], + [8n, -2n, 2n], + [9n, -2n, 2n], + [0x7ffffffen, -2n, 0x1fffffffn], + [0x7fffffffn, -2n, 0x1fffffffn], + [0x80000000n, -2n, 0x20000000n], + [0x80000001n, -2n, 0x20000000n], + [0xfffffffen, -2n, 0x3fffffffn], + [0xffffffffn, -2n, 0x3fffffffn], + [0x100000000n, -2n, 0x40000000n], + [0x100000001n, -2n, 0x40000000n], + [0x7ffffffffffffffen, -2n, 0x1fffffffffffffffn], + [0x7fffffffffffffffn, -2n, 0x1fffffffffffffffn], + [0x8000000000000000n, -2n, 0x2000000000000000n], + [0x8000000000000001n, -2n, 0x2000000000000000n], + [0xfffffffffffffffen, -2n, 0x3fffffffffffffffn], + [0xffffffffffffffffn, -2n, 0x3fffffffffffffffn], + [0x10000000000000000n, -2n, 0x4000000000000000n], + [0x10000000000000001n, -2n, 0x4000000000000000n], + [-0x10000000000000001n, -3n, -0x2000000000000001n], + [-0x10000000000000000n, -3n, -0x2000000000000000n], + [-0xffffffffffffffffn, -3n, -0x2000000000000000n], + [-0xfffffffffffffffen, -3n, -0x2000000000000000n], + [-0x8000000000000001n, -3n, -0x1000000000000001n], + [-0x8000000000000000n, -3n, -0x1000000000000000n], + [-0x7fffffffffffffffn, -3n, -0x1000000000000000n], + [-0x7ffffffffffffffen, -3n, -0x1000000000000000n], + [-0x100000001n, -3n, -0x20000001n], + [-0x100000000n, -3n, -0x20000000n], + [-0xffffffffn, -3n, -0x20000000n], + [-0xfffffffen, -3n, -0x20000000n], + [-0x80000001n, -3n, -0x10000001n], + [-0x80000000n, -3n, -0x10000000n], + [-0x7fffffffn, -3n, -0x10000000n], + [-0x7ffffffen, -3n, -0x10000000n], + [-9n, -3n, -2n], + [-8n, -3n, -1n], + [-7n, -3n, -1n], + [-6n, -3n, -1n], + [-5n, -3n, -1n], + [-4n, -3n, -1n], + [-3n, -3n, -1n], + [-2n, -3n, -1n], + [-1n, -3n, -1n], + [0n, -3n, 0n], + [1n, -3n, 0n], + [2n, -3n, 0n], + [3n, -3n, 0n], + [4n, -3n, 0n], + [5n, -3n, 0n], + [6n, -3n, 0n], + [7n, -3n, 0n], + [8n, -3n, 1n], + [9n, -3n, 1n], + [0x7ffffffen, -3n, 0xfffffffn], + [0x7fffffffn, -3n, 0xfffffffn], + [0x80000000n, -3n, 0x10000000n], + [0x80000001n, -3n, 0x10000000n], + [0xfffffffen, -3n, 0x1fffffffn], + [0xffffffffn, -3n, 0x1fffffffn], + [0x100000000n, -3n, 0x20000000n], + [0x100000001n, -3n, 0x20000000n], + [0x7ffffffffffffffen, -3n, 0xfffffffffffffffn], + [0x7fffffffffffffffn, -3n, 0xfffffffffffffffn], + [0x8000000000000000n, -3n, 0x1000000000000000n], + [0x8000000000000001n, -3n, 0x1000000000000000n], + [0xfffffffffffffffen, -3n, 0x1fffffffffffffffn], + [0xffffffffffffffffn, -3n, 0x1fffffffffffffffn], + [0x10000000000000000n, -3n, 0x2000000000000000n], + [0x10000000000000001n, -3n, 0x2000000000000000n], + [-0x10000000000000001n, -4n, -0x1000000000000001n], + [-0x10000000000000000n, -4n, -0x1000000000000000n], + [-0xffffffffffffffffn, -4n, -0x1000000000000000n], + [-0xfffffffffffffffen, -4n, -0x1000000000000000n], + [-0x8000000000000001n, -4n, -0x800000000000001n], + [-0x8000000000000000n, -4n, -0x800000000000000n], + [-0x7fffffffffffffffn, -4n, -0x800000000000000n], + [-0x7ffffffffffffffen, -4n, -0x800000000000000n], + [-0x100000001n, -4n, -0x10000001n], + [-0x100000000n, -4n, -0x10000000n], + [-0xffffffffn, -4n, -0x10000000n], + [-0xfffffffen, -4n, -0x10000000n], + [-0x80000001n, -4n, -0x8000001n], + [-0x80000000n, -4n, -0x8000000n], + [-0x7fffffffn, -4n, -0x8000000n], + [-0x7ffffffen, -4n, -0x8000000n], + [-9n, -4n, -1n], + [-8n, -4n, -1n], + [-7n, -4n, -1n], + [-6n, -4n, -1n], + [-5n, -4n, -1n], + [-4n, -4n, -1n], + [-3n, -4n, -1n], + [-2n, -4n, -1n], + [-1n, -4n, -1n], + [0n, -4n, 0n], + [1n, -4n, 0n], + [2n, -4n, 0n], + [3n, -4n, 0n], + [4n, -4n, 0n], + [5n, -4n, 0n], + [6n, -4n, 0n], + [7n, -4n, 0n], + [8n, -4n, 0n], + [9n, -4n, 0n], + [0x7ffffffen, -4n, 0x7ffffffn], + [0x7fffffffn, -4n, 0x7ffffffn], + [0x80000000n, -4n, 0x8000000n], + [0x80000001n, -4n, 0x8000000n], + [0xfffffffen, -4n, 0xfffffffn], + [0xffffffffn, -4n, 0xfffffffn], + [0x100000000n, -4n, 0x10000000n], + [0x100000001n, -4n, 0x10000000n], + [0x7ffffffffffffffen, -4n, 0x7ffffffffffffffn], + [0x7fffffffffffffffn, -4n, 0x7ffffffffffffffn], + [0x8000000000000000n, -4n, 0x800000000000000n], + [0x8000000000000001n, -4n, 0x800000000000000n], + [0xfffffffffffffffen, -4n, 0xfffffffffffffffn], + [0xffffffffffffffffn, -4n, 0xfffffffffffffffn], + [0x10000000000000000n, -4n, 0x1000000000000000n], + [0x10000000000000001n, -4n, 0x1000000000000000n], + [-0x10000000000000001n, -31n, -0x200000001n], + [-0x10000000000000000n, -31n, -0x200000000n], + [-0xffffffffffffffffn, -31n, -0x200000000n], + [-0xfffffffffffffffen, -31n, -0x200000000n], + [-0x8000000000000001n, -31n, -0x100000001n], + [-0x8000000000000000n, -31n, -0x100000000n], + [-0x7fffffffffffffffn, -31n, -0x100000000n], + [-0x7ffffffffffffffen, -31n, -0x100000000n], + [-0x100000001n, -31n, -3n], + [-0x100000000n, -31n, -2n], + [-0xffffffffn, -31n, -2n], + [-0xfffffffen, -31n, -2n], + [-0x80000001n, -31n, -2n], + [-0x80000000n, -31n, -1n], + [-0x7fffffffn, -31n, -1n], + [-0x7ffffffen, -31n, -1n], + [-9n, -31n, -1n], + [-8n, -31n, -1n], + [-7n, -31n, -1n], + [-6n, -31n, -1n], + [-5n, -31n, -1n], + [-4n, -31n, -1n], + [-3n, -31n, -1n], + [-2n, -31n, -1n], + [-1n, -31n, -1n], + [0n, -31n, 0n], + [1n, -31n, 0n], + [2n, -31n, 0n], + [3n, -31n, 0n], + [4n, -31n, 0n], + [5n, -31n, 0n], + [6n, -31n, 0n], + [7n, -31n, 0n], + [8n, -31n, 0n], + [9n, -31n, 0n], + [0x7ffffffen, -31n, 0n], + [0x7fffffffn, -31n, 0n], + [0x80000000n, -31n, 1n], + [0x80000001n, -31n, 1n], + [0xfffffffen, -31n, 1n], + [0xffffffffn, -31n, 1n], + [0x100000000n, -31n, 2n], + [0x100000001n, -31n, 2n], + [0x7ffffffffffffffen, -31n, 0xffffffffn], + [0x7fffffffffffffffn, -31n, 0xffffffffn], + [0x8000000000000000n, -31n, 0x100000000n], + [0x8000000000000001n, -31n, 0x100000000n], + [0xfffffffffffffffen, -31n, 0x1ffffffffn], + [0xffffffffffffffffn, -31n, 0x1ffffffffn], + [0x10000000000000000n, -31n, 0x200000000n], + [0x10000000000000001n, -31n, 0x200000000n], + [-0x10000000000000001n, -32n, -0x100000001n], + [-0x10000000000000000n, -32n, -0x100000000n], + [-0xffffffffffffffffn, -32n, -0x100000000n], + [-0xfffffffffffffffen, -32n, -0x100000000n], + [-0x8000000000000001n, -32n, -0x80000001n], + [-0x8000000000000000n, -32n, -0x80000000n], + [-0x7fffffffffffffffn, -32n, -0x80000000n], + [-0x7ffffffffffffffen, -32n, -0x80000000n], + [-0x100000001n, -32n, -2n], + [-0x100000000n, -32n, -1n], + [-0xffffffffn, -32n, -1n], + [-0xfffffffen, -32n, -1n], + [-0x80000001n, -32n, -1n], + [-0x80000000n, -32n, -1n], + [-0x7fffffffn, -32n, -1n], + [-0x7ffffffen, -32n, -1n], + [-9n, -32n, -1n], + [-8n, -32n, -1n], + [-7n, -32n, -1n], + [-6n, -32n, -1n], + [-5n, -32n, -1n], + [-4n, -32n, -1n], + [-3n, -32n, -1n], + [-2n, -32n, -1n], + [-1n, -32n, -1n], + [0n, -32n, 0n], + [1n, -32n, 0n], + [2n, -32n, 0n], + [3n, -32n, 0n], + [4n, -32n, 0n], + [5n, -32n, 0n], + [6n, -32n, 0n], + [7n, -32n, 0n], + [8n, -32n, 0n], + [9n, -32n, 0n], + [0x7ffffffen, -32n, 0n], + [0x7fffffffn, -32n, 0n], + [0x80000000n, -32n, 0n], + [0x80000001n, -32n, 0n], + [0xfffffffen, -32n, 0n], + [0xffffffffn, -32n, 0n], + [0x100000000n, -32n, 1n], + [0x100000001n, -32n, 1n], + [0x7ffffffffffffffen, -32n, 0x7fffffffn], + [0x7fffffffffffffffn, -32n, 0x7fffffffn], + [0x8000000000000000n, -32n, 0x80000000n], + [0x8000000000000001n, -32n, 0x80000000n], + [0xfffffffffffffffen, -32n, 0xffffffffn], + [0xffffffffffffffffn, -32n, 0xffffffffn], + [0x10000000000000000n, -32n, 0x100000000n], + [0x10000000000000001n, -32n, 0x100000000n], + [-0x10000000000000001n, -63n, -3n], + [-0x10000000000000000n, -63n, -2n], + [-0xffffffffffffffffn, -63n, -2n], + [-0xfffffffffffffffen, -63n, -2n], + [-0x8000000000000001n, -63n, -2n], + [-0x8000000000000000n, -63n, -1n], + [-0x7fffffffffffffffn, -63n, -1n], + [-0x7ffffffffffffffen, -63n, -1n], + [-0x100000001n, -63n, -1n], + [-0x100000000n, -63n, -1n], + [-0xffffffffn, -63n, -1n], + [-0xfffffffen, -63n, -1n], + [-0x80000001n, -63n, -1n], + [-0x80000000n, -63n, -1n], + [-0x7fffffffn, -63n, -1n], + [-0x7ffffffen, -63n, -1n], + [-9n, -63n, -1n], + [-8n, -63n, -1n], + [-7n, -63n, -1n], + [-6n, -63n, -1n], + [-5n, -63n, -1n], + [-4n, -63n, -1n], + [-3n, -63n, -1n], + [-2n, -63n, -1n], + [-1n, -63n, -1n], + [0n, -63n, 0n], + [1n, -63n, 0n], + [2n, -63n, 0n], + [3n, -63n, 0n], + [4n, -63n, 0n], + [5n, -63n, 0n], + [6n, -63n, 0n], + [7n, -63n, 0n], + [8n, -63n, 0n], + [9n, -63n, 0n], + [0x7ffffffen, -63n, 0n], + [0x7fffffffn, -63n, 0n], + [0x80000000n, -63n, 0n], + [0x80000001n, -63n, 0n], + [0xfffffffen, -63n, 0n], + [0xffffffffn, -63n, 0n], + [0x100000000n, -63n, 0n], + [0x100000001n, -63n, 0n], + [0x7ffffffffffffffen, -63n, 0n], + [0x7fffffffffffffffn, -63n, 0n], + [0x8000000000000000n, -63n, 1n], + [0x8000000000000001n, -63n, 1n], + [0xfffffffffffffffen, -63n, 1n], + [0xffffffffffffffffn, -63n, 1n], + [0x10000000000000000n, -63n, 2n], + [0x10000000000000001n, -63n, 2n], + [-0x10000000000000001n, -64n, -2n], + [-0x10000000000000000n, -64n, -1n], + [-0xffffffffffffffffn, -64n, -1n], + [-0xfffffffffffffffen, -64n, -1n], + [-0x8000000000000001n, -64n, -1n], + [-0x8000000000000000n, -64n, -1n], + [-0x7fffffffffffffffn, -64n, -1n], + [-0x7ffffffffffffffen, -64n, -1n], + [-0x100000001n, -64n, -1n], + [-0x100000000n, -64n, -1n], + [-0xffffffffn, -64n, -1n], + [-0xfffffffen, -64n, -1n], + [-0x80000001n, -64n, -1n], + [-0x80000000n, -64n, -1n], + [-0x7fffffffn, -64n, -1n], + [-0x7ffffffen, -64n, -1n], + [-9n, -64n, -1n], + [-8n, -64n, -1n], + [-7n, -64n, -1n], + [-6n, -64n, -1n], + [-5n, -64n, -1n], + [-4n, -64n, -1n], + [-3n, -64n, -1n], + [-2n, -64n, -1n], + [-1n, -64n, -1n], + [0n, -64n, 0n], + [1n, -64n, 0n], + [2n, -64n, 0n], + [3n, -64n, 0n], + [4n, -64n, 0n], + [5n, -64n, 0n], + [6n, -64n, 0n], + [7n, -64n, 0n], + [8n, -64n, 0n], + [9n, -64n, 0n], + [0x7ffffffen, -64n, 0n], + [0x7fffffffn, -64n, 0n], + [0x80000000n, -64n, 0n], + [0x80000001n, -64n, 0n], + [0xfffffffen, -64n, 0n], + [0xffffffffn, -64n, 0n], + [0x100000000n, -64n, 0n], + [0x100000001n, -64n, 0n], + [0x7ffffffffffffffen, -64n, 0n], + [0x7fffffffffffffffn, -64n, 0n], + [0x8000000000000000n, -64n, 0n], + [0x8000000000000001n, -64n, 0n], + [0xfffffffffffffffen, -64n, 0n], + [0xffffffffffffffffn, -64n, 0n], + [0x10000000000000000n, -64n, 1n], + [0x10000000000000001n, -64n, 1n], +]; + +// Cases not covered above. +tests.push( + // Negative shift with sign-bit set when interpreted as pointer-sized value (32-bit). + [-1n, -0xf000_0000n, -1n], + [0n, -0xf000_0000n, 0n], + [1n, -0xf000_0000n, 0n], + + // Negative shift with sign-bit set when interpreted as pointer-sized value (64-bit). + [-1n, -0xf000_0000_0000_0000n, -1n], + [0n, -0xf000_0000_0000_0000n, 0n], + [1n, -0xf000_0000_0000_0000n, 0n], +); + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs << rhs, expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-mod-bailout.js b/js/src/jit-test/tests/bigint/bigint-mod-bailout.js new file mode 100644 index 0000000000..91deab5116 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-mod-bailout.js @@ -0,0 +1,31 @@ +// |jit-test| --ion-warmup-threshold=20 + +function testBailout() { + function f(v, r) { + for (var i = 0; i < 50; ++i) { + // Ensure DCE and LICM don't eliminate modulus when the divisor is zero. + if (i === 0) { + r(); + } + 1n % v; + 1n % v; + 1n % v; + } + } + + var result = []; + function r() { + result.push("ok"); + } + + do { + result.length = 0; + try { + f(1n, r); + f(1n, r); + f(0n, r); + } catch (e) {} + assertEq(result.length, 3); + } while (!inIon()); +} +testBailout(); diff --git a/js/src/jit-test/tests/bigint/bigint-mod-by-zero.js b/js/src/jit-test/tests/bigint/bigint-mod-by-zero.js new file mode 100644 index 0000000000..cfa56efa98 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-mod-by-zero.js @@ -0,0 +1,16 @@ +// Fallible BigInt modulus should have a resume point and its alias set +// should record that exceptions can be thrown. +function resumeAfterException(t) { + for (var i = 0; i < 2; i++) { + try { + var x = 1; + 1n % 1n; + x = 2; + 1n % t; + } catch (e) { + assertEq(x, 2); + } + } +} +resumeAfterException(1n); +resumeAfterException(0n); diff --git a/js/src/jit-test/tests/bigint/bigint-mod.js b/js/src/jit-test/tests/bigint/bigint-mod.js new file mode 100644 index 0000000000..375e9f8e68 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-mod.js @@ -0,0 +1,1346 @@ +const tests = [ + [-0x10000000000000001n, -2n, -1n], + [-0x10000000000000000n, -2n, 0n], + [-0xffffffffffffffffn, -2n, -1n], + [-0xfffffffffffffffen, -2n, 0n], + [-0x8000000000000001n, -2n, -1n], + [-0x8000000000000000n, -2n, 0n], + [-0x7fffffffffffffffn, -2n, -1n], + [-0x7ffffffffffffffen, -2n, 0n], + [-0x100000001n, -2n, -1n], + [-0x100000000n, -2n, 0n], + [-0xffffffffn, -2n, -1n], + [-0xfffffffen, -2n, 0n], + [-0x80000001n, -2n, -1n], + [-0x80000000n, -2n, 0n], + [-0x7fffffffn, -2n, -1n], + [-0x7ffffffen, -2n, 0n], + [-2n, -2n, 0n], + [-1n, -2n, -1n], + [0n, -2n, 0n], + [1n, -2n, 1n], + [2n, -2n, 0n], + [0x7ffffffen, -2n, 0n], + [0x7fffffffn, -2n, 1n], + [0x80000000n, -2n, 0n], + [0x80000001n, -2n, 1n], + [0xfffffffen, -2n, 0n], + [0xffffffffn, -2n, 1n], + [0x100000000n, -2n, 0n], + [0x100000001n, -2n, 1n], + [0x7ffffffffffffffen, -2n, 0n], + [0x7fffffffffffffffn, -2n, 1n], + [0x8000000000000000n, -2n, 0n], + [0x8000000000000001n, -2n, 1n], + [0xfffffffffffffffen, -2n, 0n], + [0xffffffffffffffffn, -2n, 1n], + [0x10000000000000000n, -2n, 0n], + [0x10000000000000001n, -2n, 1n], + [-0x10000000000000001n, -1n, 0n], + [-0x10000000000000000n, -1n, 0n], + [-0xffffffffffffffffn, -1n, 0n], + [-0xfffffffffffffffen, -1n, 0n], + [-0x8000000000000001n, -1n, 0n], + [-0x8000000000000000n, -1n, 0n], + [-0x7fffffffffffffffn, -1n, 0n], + [-0x7ffffffffffffffen, -1n, 0n], + [-0x100000001n, -1n, 0n], + [-0x100000000n, -1n, 0n], + [-0xffffffffn, -1n, 0n], + [-0xfffffffen, -1n, 0n], + [-0x80000001n, -1n, 0n], + [-0x80000000n, -1n, 0n], + [-0x7fffffffn, -1n, 0n], + [-0x7ffffffen, -1n, 0n], + [-2n, -1n, 0n], + [-1n, -1n, 0n], + [0n, -1n, 0n], + [1n, -1n, 0n], + [2n, -1n, 0n], + [0x7ffffffen, -1n, 0n], + [0x7fffffffn, -1n, 0n], + [0x80000000n, -1n, 0n], + [0x80000001n, -1n, 0n], + [0xfffffffen, -1n, 0n], + [0xffffffffn, -1n, 0n], + [0x100000000n, -1n, 0n], + [0x100000001n, -1n, 0n], + [0x7ffffffffffffffen, -1n, 0n], + [0x7fffffffffffffffn, -1n, 0n], + [0x8000000000000000n, -1n, 0n], + [0x8000000000000001n, -1n, 0n], + [0xfffffffffffffffen, -1n, 0n], + [0xffffffffffffffffn, -1n, 0n], + [0x10000000000000000n, -1n, 0n], + [0x10000000000000001n, -1n, 0n], + [-0x10000000000000001n, 1n, 0n], + [-0x10000000000000000n, 1n, 0n], + [-0xffffffffffffffffn, 1n, 0n], + [-0xfffffffffffffffen, 1n, 0n], + [-0x8000000000000001n, 1n, 0n], + [-0x8000000000000000n, 1n, 0n], + [-0x7fffffffffffffffn, 1n, 0n], + [-0x7ffffffffffffffen, 1n, 0n], + [-0x100000001n, 1n, 0n], + [-0x100000000n, 1n, 0n], + [-0xffffffffn, 1n, 0n], + [-0xfffffffen, 1n, 0n], + [-0x80000001n, 1n, 0n], + [-0x80000000n, 1n, 0n], + [-0x7fffffffn, 1n, 0n], + [-0x7ffffffen, 1n, 0n], + [-2n, 1n, 0n], + [-1n, 1n, 0n], + [0n, 1n, 0n], + [1n, 1n, 0n], + [2n, 1n, 0n], + [0x7ffffffen, 1n, 0n], + [0x7fffffffn, 1n, 0n], + [0x80000000n, 1n, 0n], + [0x80000001n, 1n, 0n], + [0xfffffffen, 1n, 0n], + [0xffffffffn, 1n, 0n], + [0x100000000n, 1n, 0n], + [0x100000001n, 1n, 0n], + [0x7ffffffffffffffen, 1n, 0n], + [0x7fffffffffffffffn, 1n, 0n], + [0x8000000000000000n, 1n, 0n], + [0x8000000000000001n, 1n, 0n], + [0xfffffffffffffffen, 1n, 0n], + [0xffffffffffffffffn, 1n, 0n], + [0x10000000000000000n, 1n, 0n], + [0x10000000000000001n, 1n, 0n], + [-0x10000000000000001n, 2n, -1n], + [-0x10000000000000000n, 2n, 0n], + [-0xffffffffffffffffn, 2n, -1n], + [-0xfffffffffffffffen, 2n, 0n], + [-0x8000000000000001n, 2n, -1n], + [-0x8000000000000000n, 2n, 0n], + [-0x7fffffffffffffffn, 2n, -1n], + [-0x7ffffffffffffffen, 2n, 0n], + [-0x100000001n, 2n, -1n], + [-0x100000000n, 2n, 0n], + [-0xffffffffn, 2n, -1n], + [-0xfffffffen, 2n, 0n], + [-0x80000001n, 2n, -1n], + [-0x80000000n, 2n, 0n], + [-0x7fffffffn, 2n, -1n], + [-0x7ffffffen, 2n, 0n], + [-2n, 2n, 0n], + [-1n, 2n, -1n], + [0n, 2n, 0n], + [1n, 2n, 1n], + [2n, 2n, 0n], + [0x7ffffffen, 2n, 0n], + [0x7fffffffn, 2n, 1n], + [0x80000000n, 2n, 0n], + [0x80000001n, 2n, 1n], + [0xfffffffen, 2n, 0n], + [0xffffffffn, 2n, 1n], + [0x100000000n, 2n, 0n], + [0x100000001n, 2n, 1n], + [0x7ffffffffffffffen, 2n, 0n], + [0x7fffffffffffffffn, 2n, 1n], + [0x8000000000000000n, 2n, 0n], + [0x8000000000000001n, 2n, 1n], + [0xfffffffffffffffen, 2n, 0n], + [0xffffffffffffffffn, 2n, 1n], + [0x10000000000000000n, 2n, 0n], + [0x10000000000000001n, 2n, 1n], + [-0x10000000000000001n, 0x7ffffffen, -17n], + [-0x10000000000000000n, 0x7ffffffen, -16n], + [-0xffffffffffffffffn, 0x7ffffffen, -15n], + [-0xfffffffffffffffen, 0x7ffffffen, -14n], + [-0x8000000000000001n, 0x7ffffffen, -9n], + [-0x8000000000000000n, 0x7ffffffen, -8n], + [-0x7fffffffffffffffn, 0x7ffffffen, -7n], + [-0x7ffffffffffffffen, 0x7ffffffen, -6n], + [-0x100000001n, 0x7ffffffen, -5n], + [-0x100000000n, 0x7ffffffen, -4n], + [-0xffffffffn, 0x7ffffffen, -3n], + [-0xfffffffen, 0x7ffffffen, -2n], + [-0x80000001n, 0x7ffffffen, -3n], + [-0x80000000n, 0x7ffffffen, -2n], + [-0x7fffffffn, 0x7ffffffen, -1n], + [-0x7ffffffen, 0x7ffffffen, 0n], + [-2n, 0x7ffffffen, -2n], + [-1n, 0x7ffffffen, -1n], + [0n, 0x7ffffffen, 0n], + [1n, 0x7ffffffen, 1n], + [2n, 0x7ffffffen, 2n], + [0x7ffffffen, 0x7ffffffen, 0n], + [0x7fffffffn, 0x7ffffffen, 1n], + [0x80000000n, 0x7ffffffen, 2n], + [0x80000001n, 0x7ffffffen, 3n], + [0xfffffffen, 0x7ffffffen, 2n], + [0xffffffffn, 0x7ffffffen, 3n], + [0x100000000n, 0x7ffffffen, 4n], + [0x100000001n, 0x7ffffffen, 5n], + [0x7ffffffffffffffen, 0x7ffffffen, 6n], + [0x7fffffffffffffffn, 0x7ffffffen, 7n], + [0x8000000000000000n, 0x7ffffffen, 8n], + [0x8000000000000001n, 0x7ffffffen, 9n], + [0xfffffffffffffffen, 0x7ffffffen, 14n], + [0xffffffffffffffffn, 0x7ffffffen, 15n], + [0x10000000000000000n, 0x7ffffffen, 16n], + [0x10000000000000001n, 0x7ffffffen, 17n], + [-0x10000000000000001n, 0x7fffffffn, -5n], + [-0x10000000000000000n, 0x7fffffffn, -4n], + [-0xffffffffffffffffn, 0x7fffffffn, -3n], + [-0xfffffffffffffffen, 0x7fffffffn, -2n], + [-0x8000000000000001n, 0x7fffffffn, -3n], + [-0x8000000000000000n, 0x7fffffffn, -2n], + [-0x7fffffffffffffffn, 0x7fffffffn, -1n], + [-0x7ffffffffffffffen, 0x7fffffffn, 0n], + [-0x100000001n, 0x7fffffffn, -3n], + [-0x100000000n, 0x7fffffffn, -2n], + [-0xffffffffn, 0x7fffffffn, -1n], + [-0xfffffffen, 0x7fffffffn, 0n], + [-0x80000001n, 0x7fffffffn, -2n], + [-0x80000000n, 0x7fffffffn, -1n], + [-0x7fffffffn, 0x7fffffffn, 0n], + [-0x7ffffffen, 0x7fffffffn, -0x7ffffffen], + [-2n, 0x7fffffffn, -2n], + [-1n, 0x7fffffffn, -1n], + [0n, 0x7fffffffn, 0n], + [1n, 0x7fffffffn, 1n], + [2n, 0x7fffffffn, 2n], + [0x7ffffffen, 0x7fffffffn, 0x7ffffffen], + [0x7fffffffn, 0x7fffffffn, 0n], + [0x80000000n, 0x7fffffffn, 1n], + [0x80000001n, 0x7fffffffn, 2n], + [0xfffffffen, 0x7fffffffn, 0n], + [0xffffffffn, 0x7fffffffn, 1n], + [0x100000000n, 0x7fffffffn, 2n], + [0x100000001n, 0x7fffffffn, 3n], + [0x7ffffffffffffffen, 0x7fffffffn, 0n], + [0x7fffffffffffffffn, 0x7fffffffn, 1n], + [0x8000000000000000n, 0x7fffffffn, 2n], + [0x8000000000000001n, 0x7fffffffn, 3n], + [0xfffffffffffffffen, 0x7fffffffn, 2n], + [0xffffffffffffffffn, 0x7fffffffn, 3n], + [0x10000000000000000n, 0x7fffffffn, 4n], + [0x10000000000000001n, 0x7fffffffn, 5n], + [-0x10000000000000001n, 0x80000000n, -1n], + [-0x10000000000000000n, 0x80000000n, 0n], + [-0xffffffffffffffffn, 0x80000000n, -0x7fffffffn], + [-0xfffffffffffffffen, 0x80000000n, -0x7ffffffen], + [-0x8000000000000001n, 0x80000000n, -1n], + [-0x8000000000000000n, 0x80000000n, 0n], + [-0x7fffffffffffffffn, 0x80000000n, -0x7fffffffn], + [-0x7ffffffffffffffen, 0x80000000n, -0x7ffffffen], + [-0x100000001n, 0x80000000n, -1n], + [-0x100000000n, 0x80000000n, 0n], + [-0xffffffffn, 0x80000000n, -0x7fffffffn], + [-0xfffffffen, 0x80000000n, -0x7ffffffen], + [-0x80000001n, 0x80000000n, -1n], + [-0x80000000n, 0x80000000n, 0n], + [-0x7fffffffn, 0x80000000n, -0x7fffffffn], + [-0x7ffffffen, 0x80000000n, -0x7ffffffen], + [-2n, 0x80000000n, -2n], + [-1n, 0x80000000n, -1n], + [0n, 0x80000000n, 0n], + [1n, 0x80000000n, 1n], + [2n, 0x80000000n, 2n], + [0x7ffffffen, 0x80000000n, 0x7ffffffen], + [0x7fffffffn, 0x80000000n, 0x7fffffffn], + [0x80000000n, 0x80000000n, 0n], + [0x80000001n, 0x80000000n, 1n], + [0xfffffffen, 0x80000000n, 0x7ffffffen], + [0xffffffffn, 0x80000000n, 0x7fffffffn], + [0x100000000n, 0x80000000n, 0n], + [0x100000001n, 0x80000000n, 1n], + [0x7ffffffffffffffen, 0x80000000n, 0x7ffffffen], + [0x7fffffffffffffffn, 0x80000000n, 0x7fffffffn], + [0x8000000000000000n, 0x80000000n, 0n], + [0x8000000000000001n, 0x80000000n, 1n], + [0xfffffffffffffffen, 0x80000000n, 0x7ffffffen], + [0xffffffffffffffffn, 0x80000000n, 0x7fffffffn], + [0x10000000000000000n, 0x80000000n, 0n], + [0x10000000000000001n, 0x80000000n, 1n], + [-0x10000000000000001n, 0x80000001n, -5n], + [-0x10000000000000000n, 0x80000001n, -4n], + [-0xffffffffffffffffn, 0x80000001n, -3n], + [-0xfffffffffffffffen, 0x80000001n, -2n], + [-0x8000000000000001n, 0x80000001n, -3n], + [-0x8000000000000000n, 0x80000001n, -2n], + [-0x7fffffffffffffffn, 0x80000001n, -1n], + [-0x7ffffffffffffffen, 0x80000001n, 0n], + [-0x100000001n, 0x80000001n, -0x80000000n], + [-0x100000000n, 0x80000001n, -0x7fffffffn], + [-0xffffffffn, 0x80000001n, -0x7ffffffen], + [-0xfffffffen, 0x80000001n, -0x7ffffffdn], + [-0x80000001n, 0x80000001n, 0n], + [-0x80000000n, 0x80000001n, -0x80000000n], + [-0x7fffffffn, 0x80000001n, -0x7fffffffn], + [-0x7ffffffen, 0x80000001n, -0x7ffffffen], + [-2n, 0x80000001n, -2n], + [-1n, 0x80000001n, -1n], + [0n, 0x80000001n, 0n], + [1n, 0x80000001n, 1n], + [2n, 0x80000001n, 2n], + [0x7ffffffen, 0x80000001n, 0x7ffffffen], + [0x7fffffffn, 0x80000001n, 0x7fffffffn], + [0x80000000n, 0x80000001n, 0x80000000n], + [0x80000001n, 0x80000001n, 0n], + [0xfffffffen, 0x80000001n, 0x7ffffffdn], + [0xffffffffn, 0x80000001n, 0x7ffffffen], + [0x100000000n, 0x80000001n, 0x7fffffffn], + [0x100000001n, 0x80000001n, 0x80000000n], + [0x7ffffffffffffffen, 0x80000001n, 0n], + [0x7fffffffffffffffn, 0x80000001n, 1n], + [0x8000000000000000n, 0x80000001n, 2n], + [0x8000000000000001n, 0x80000001n, 3n], + [0xfffffffffffffffen, 0x80000001n, 2n], + [0xffffffffffffffffn, 0x80000001n, 3n], + [0x10000000000000000n, 0x80000001n, 4n], + [0x10000000000000001n, 0x80000001n, 5n], + [-0x10000000000000001n, -0x80000001n, -5n], + [-0x10000000000000000n, -0x80000001n, -4n], + [-0xffffffffffffffffn, -0x80000001n, -3n], + [-0xfffffffffffffffen, -0x80000001n, -2n], + [-0x8000000000000001n, -0x80000001n, -3n], + [-0x8000000000000000n, -0x80000001n, -2n], + [-0x7fffffffffffffffn, -0x80000001n, -1n], + [-0x7ffffffffffffffen, -0x80000001n, 0n], + [-0x100000001n, -0x80000001n, -0x80000000n], + [-0x100000000n, -0x80000001n, -0x7fffffffn], + [-0xffffffffn, -0x80000001n, -0x7ffffffen], + [-0xfffffffen, -0x80000001n, -0x7ffffffdn], + [-0x80000001n, -0x80000001n, 0n], + [-0x80000000n, -0x80000001n, -0x80000000n], + [-0x7fffffffn, -0x80000001n, -0x7fffffffn], + [-0x7ffffffen, -0x80000001n, -0x7ffffffen], + [-2n, -0x80000001n, -2n], + [-1n, -0x80000001n, -1n], + [0n, -0x80000001n, 0n], + [1n, -0x80000001n, 1n], + [2n, -0x80000001n, 2n], + [0x7ffffffen, -0x80000001n, 0x7ffffffen], + [0x7fffffffn, -0x80000001n, 0x7fffffffn], + [0x80000000n, -0x80000001n, 0x80000000n], + [0x80000001n, -0x80000001n, 0n], + [0xfffffffen, -0x80000001n, 0x7ffffffdn], + [0xffffffffn, -0x80000001n, 0x7ffffffen], + [0x100000000n, -0x80000001n, 0x7fffffffn], + [0x100000001n, -0x80000001n, 0x80000000n], + [0x7ffffffffffffffen, -0x80000001n, 0n], + [0x7fffffffffffffffn, -0x80000001n, 1n], + [0x8000000000000000n, -0x80000001n, 2n], + [0x8000000000000001n, -0x80000001n, 3n], + [0xfffffffffffffffen, -0x80000001n, 2n], + [0xffffffffffffffffn, -0x80000001n, 3n], + [0x10000000000000000n, -0x80000001n, 4n], + [0x10000000000000001n, -0x80000001n, 5n], + [-0x10000000000000001n, -0x80000000n, -1n], + [-0x10000000000000000n, -0x80000000n, 0n], + [-0xffffffffffffffffn, -0x80000000n, -0x7fffffffn], + [-0xfffffffffffffffen, -0x80000000n, -0x7ffffffen], + [-0x8000000000000001n, -0x80000000n, -1n], + [-0x8000000000000000n, -0x80000000n, 0n], + [-0x7fffffffffffffffn, -0x80000000n, -0x7fffffffn], + [-0x7ffffffffffffffen, -0x80000000n, -0x7ffffffen], + [-0x100000001n, -0x80000000n, -1n], + [-0x100000000n, -0x80000000n, 0n], + [-0xffffffffn, -0x80000000n, -0x7fffffffn], + [-0xfffffffen, -0x80000000n, -0x7ffffffen], + [-0x80000001n, -0x80000000n, -1n], + [-0x80000000n, -0x80000000n, 0n], + [-0x7fffffffn, -0x80000000n, -0x7fffffffn], + [-0x7ffffffen, -0x80000000n, -0x7ffffffen], + [-2n, -0x80000000n, -2n], + [-1n, -0x80000000n, -1n], + [0n, -0x80000000n, 0n], + [1n, -0x80000000n, 1n], + [2n, -0x80000000n, 2n], + [0x7ffffffen, -0x80000000n, 0x7ffffffen], + [0x7fffffffn, -0x80000000n, 0x7fffffffn], + [0x80000000n, -0x80000000n, 0n], + [0x80000001n, -0x80000000n, 1n], + [0xfffffffen, -0x80000000n, 0x7ffffffen], + [0xffffffffn, -0x80000000n, 0x7fffffffn], + [0x100000000n, -0x80000000n, 0n], + [0x100000001n, -0x80000000n, 1n], + [0x7ffffffffffffffen, -0x80000000n, 0x7ffffffen], + [0x7fffffffffffffffn, -0x80000000n, 0x7fffffffn], + [0x8000000000000000n, -0x80000000n, 0n], + [0x8000000000000001n, -0x80000000n, 1n], + [0xfffffffffffffffen, -0x80000000n, 0x7ffffffen], + [0xffffffffffffffffn, -0x80000000n, 0x7fffffffn], + [0x10000000000000000n, -0x80000000n, 0n], + [0x10000000000000001n, -0x80000000n, 1n], + [-0x10000000000000001n, -0x7fffffffn, -5n], + [-0x10000000000000000n, -0x7fffffffn, -4n], + [-0xffffffffffffffffn, -0x7fffffffn, -3n], + [-0xfffffffffffffffen, -0x7fffffffn, -2n], + [-0x8000000000000001n, -0x7fffffffn, -3n], + [-0x8000000000000000n, -0x7fffffffn, -2n], + [-0x7fffffffffffffffn, -0x7fffffffn, -1n], + [-0x7ffffffffffffffen, -0x7fffffffn, 0n], + [-0x100000001n, -0x7fffffffn, -3n], + [-0x100000000n, -0x7fffffffn, -2n], + [-0xffffffffn, -0x7fffffffn, -1n], + [-0xfffffffen, -0x7fffffffn, 0n], + [-0x80000001n, -0x7fffffffn, -2n], + [-0x80000000n, -0x7fffffffn, -1n], + [-0x7fffffffn, -0x7fffffffn, 0n], + [-0x7ffffffen, -0x7fffffffn, -0x7ffffffen], + [-2n, -0x7fffffffn, -2n], + [-1n, -0x7fffffffn, -1n], + [0n, -0x7fffffffn, 0n], + [1n, -0x7fffffffn, 1n], + [2n, -0x7fffffffn, 2n], + [0x7ffffffen, -0x7fffffffn, 0x7ffffffen], + [0x7fffffffn, -0x7fffffffn, 0n], + [0x80000000n, -0x7fffffffn, 1n], + [0x80000001n, -0x7fffffffn, 2n], + [0xfffffffen, -0x7fffffffn, 0n], + [0xffffffffn, -0x7fffffffn, 1n], + [0x100000000n, -0x7fffffffn, 2n], + [0x100000001n, -0x7fffffffn, 3n], + [0x7ffffffffffffffen, -0x7fffffffn, 0n], + [0x7fffffffffffffffn, -0x7fffffffn, 1n], + [0x8000000000000000n, -0x7fffffffn, 2n], + [0x8000000000000001n, -0x7fffffffn, 3n], + [0xfffffffffffffffen, -0x7fffffffn, 2n], + [0xffffffffffffffffn, -0x7fffffffn, 3n], + [0x10000000000000000n, -0x7fffffffn, 4n], + [0x10000000000000001n, -0x7fffffffn, 5n], + [-0x10000000000000001n, -0x7ffffffen, -17n], + [-0x10000000000000000n, -0x7ffffffen, -16n], + [-0xffffffffffffffffn, -0x7ffffffen, -15n], + [-0xfffffffffffffffen, -0x7ffffffen, -14n], + [-0x8000000000000001n, -0x7ffffffen, -9n], + [-0x8000000000000000n, -0x7ffffffen, -8n], + [-0x7fffffffffffffffn, -0x7ffffffen, -7n], + [-0x7ffffffffffffffen, -0x7ffffffen, -6n], + [-0x100000001n, -0x7ffffffen, -5n], + [-0x100000000n, -0x7ffffffen, -4n], + [-0xffffffffn, -0x7ffffffen, -3n], + [-0xfffffffen, -0x7ffffffen, -2n], + [-0x80000001n, -0x7ffffffen, -3n], + [-0x80000000n, -0x7ffffffen, -2n], + [-0x7fffffffn, -0x7ffffffen, -1n], + [-0x7ffffffen, -0x7ffffffen, 0n], + [-2n, -0x7ffffffen, -2n], + [-1n, -0x7ffffffen, -1n], + [0n, -0x7ffffffen, 0n], + [1n, -0x7ffffffen, 1n], + [2n, -0x7ffffffen, 2n], + [0x7ffffffen, -0x7ffffffen, 0n], + [0x7fffffffn, -0x7ffffffen, 1n], + [0x80000000n, -0x7ffffffen, 2n], + [0x80000001n, -0x7ffffffen, 3n], + [0xfffffffen, -0x7ffffffen, 2n], + [0xffffffffn, -0x7ffffffen, 3n], + [0x100000000n, -0x7ffffffen, 4n], + [0x100000001n, -0x7ffffffen, 5n], + [0x7ffffffffffffffen, -0x7ffffffen, 6n], + [0x7fffffffffffffffn, -0x7ffffffen, 7n], + [0x8000000000000000n, -0x7ffffffen, 8n], + [0x8000000000000001n, -0x7ffffffen, 9n], + [0xfffffffffffffffen, -0x7ffffffen, 14n], + [0xffffffffffffffffn, -0x7ffffffen, 15n], + [0x10000000000000000n, -0x7ffffffen, 16n], + [0x10000000000000001n, -0x7ffffffen, 17n], + [-0x10000000000000001n, 0xfffffffen, -5n], + [-0x10000000000000000n, 0xfffffffen, -4n], + [-0xffffffffffffffffn, 0xfffffffen, -3n], + [-0xfffffffffffffffen, 0xfffffffen, -2n], + [-0x8000000000000001n, 0xfffffffen, -3n], + [-0x8000000000000000n, 0xfffffffen, -2n], + [-0x7fffffffffffffffn, 0xfffffffen, -1n], + [-0x7ffffffffffffffen, 0xfffffffen, 0n], + [-0x100000001n, 0xfffffffen, -3n], + [-0x100000000n, 0xfffffffen, -2n], + [-0xffffffffn, 0xfffffffen, -1n], + [-0xfffffffen, 0xfffffffen, 0n], + [-0x80000001n, 0xfffffffen, -0x80000001n], + [-0x80000000n, 0xfffffffen, -0x80000000n], + [-0x7fffffffn, 0xfffffffen, -0x7fffffffn], + [-0x7ffffffen, 0xfffffffen, -0x7ffffffen], + [-2n, 0xfffffffen, -2n], + [-1n, 0xfffffffen, -1n], + [0n, 0xfffffffen, 0n], + [1n, 0xfffffffen, 1n], + [2n, 0xfffffffen, 2n], + [0x7ffffffen, 0xfffffffen, 0x7ffffffen], + [0x7fffffffn, 0xfffffffen, 0x7fffffffn], + [0x80000000n, 0xfffffffen, 0x80000000n], + [0x80000001n, 0xfffffffen, 0x80000001n], + [0xfffffffen, 0xfffffffen, 0n], + [0xffffffffn, 0xfffffffen, 1n], + [0x100000000n, 0xfffffffen, 2n], + [0x100000001n, 0xfffffffen, 3n], + [0x7ffffffffffffffen, 0xfffffffen, 0n], + [0x7fffffffffffffffn, 0xfffffffen, 1n], + [0x8000000000000000n, 0xfffffffen, 2n], + [0x8000000000000001n, 0xfffffffen, 3n], + [0xfffffffffffffffen, 0xfffffffen, 2n], + [0xffffffffffffffffn, 0xfffffffen, 3n], + [0x10000000000000000n, 0xfffffffen, 4n], + [0x10000000000000001n, 0xfffffffen, 5n], + [-0x10000000000000001n, 0xffffffffn, -2n], + [-0x10000000000000000n, 0xffffffffn, -1n], + [-0xffffffffffffffffn, 0xffffffffn, 0n], + [-0xfffffffffffffffen, 0xffffffffn, -0xfffffffen], + [-0x8000000000000001n, 0xffffffffn, -0x80000001n], + [-0x8000000000000000n, 0xffffffffn, -0x80000000n], + [-0x7fffffffffffffffn, 0xffffffffn, -0x7fffffffn], + [-0x7ffffffffffffffen, 0xffffffffn, -0x7ffffffen], + [-0x100000001n, 0xffffffffn, -2n], + [-0x100000000n, 0xffffffffn, -1n], + [-0xffffffffn, 0xffffffffn, 0n], + [-0xfffffffen, 0xffffffffn, -0xfffffffen], + [-0x80000001n, 0xffffffffn, -0x80000001n], + [-0x80000000n, 0xffffffffn, -0x80000000n], + [-0x7fffffffn, 0xffffffffn, -0x7fffffffn], + [-0x7ffffffen, 0xffffffffn, -0x7ffffffen], + [-2n, 0xffffffffn, -2n], + [-1n, 0xffffffffn, -1n], + [0n, 0xffffffffn, 0n], + [1n, 0xffffffffn, 1n], + [2n, 0xffffffffn, 2n], + [0x7ffffffen, 0xffffffffn, 0x7ffffffen], + [0x7fffffffn, 0xffffffffn, 0x7fffffffn], + [0x80000000n, 0xffffffffn, 0x80000000n], + [0x80000001n, 0xffffffffn, 0x80000001n], + [0xfffffffen, 0xffffffffn, 0xfffffffen], + [0xffffffffn, 0xffffffffn, 0n], + [0x100000000n, 0xffffffffn, 1n], + [0x100000001n, 0xffffffffn, 2n], + [0x7ffffffffffffffen, 0xffffffffn, 0x7ffffffen], + [0x7fffffffffffffffn, 0xffffffffn, 0x7fffffffn], + [0x8000000000000000n, 0xffffffffn, 0x80000000n], + [0x8000000000000001n, 0xffffffffn, 0x80000001n], + [0xfffffffffffffffen, 0xffffffffn, 0xfffffffen], + [0xffffffffffffffffn, 0xffffffffn, 0n], + [0x10000000000000000n, 0xffffffffn, 1n], + [0x10000000000000001n, 0xffffffffn, 2n], + [-0x10000000000000001n, 0x100000000n, -1n], + [-0x10000000000000000n, 0x100000000n, 0n], + [-0xffffffffffffffffn, 0x100000000n, -0xffffffffn], + [-0xfffffffffffffffen, 0x100000000n, -0xfffffffen], + [-0x8000000000000001n, 0x100000000n, -1n], + [-0x8000000000000000n, 0x100000000n, 0n], + [-0x7fffffffffffffffn, 0x100000000n, -0xffffffffn], + [-0x7ffffffffffffffen, 0x100000000n, -0xfffffffen], + [-0x100000001n, 0x100000000n, -1n], + [-0x100000000n, 0x100000000n, 0n], + [-0xffffffffn, 0x100000000n, -0xffffffffn], + [-0xfffffffen, 0x100000000n, -0xfffffffen], + [-0x80000001n, 0x100000000n, -0x80000001n], + [-0x80000000n, 0x100000000n, -0x80000000n], + [-0x7fffffffn, 0x100000000n, -0x7fffffffn], + [-0x7ffffffen, 0x100000000n, -0x7ffffffen], + [-2n, 0x100000000n, -2n], + [-1n, 0x100000000n, -1n], + [0n, 0x100000000n, 0n], + [1n, 0x100000000n, 1n], + [2n, 0x100000000n, 2n], + [0x7ffffffen, 0x100000000n, 0x7ffffffen], + [0x7fffffffn, 0x100000000n, 0x7fffffffn], + [0x80000000n, 0x100000000n, 0x80000000n], + [0x80000001n, 0x100000000n, 0x80000001n], + [0xfffffffen, 0x100000000n, 0xfffffffen], + [0xffffffffn, 0x100000000n, 0xffffffffn], + [0x100000000n, 0x100000000n, 0n], + [0x100000001n, 0x100000000n, 1n], + [0x7ffffffffffffffen, 0x100000000n, 0xfffffffen], + [0x7fffffffffffffffn, 0x100000000n, 0xffffffffn], + [0x8000000000000000n, 0x100000000n, 0n], + [0x8000000000000001n, 0x100000000n, 1n], + [0xfffffffffffffffen, 0x100000000n, 0xfffffffen], + [0xffffffffffffffffn, 0x100000000n, 0xffffffffn], + [0x10000000000000000n, 0x100000000n, 0n], + [0x10000000000000001n, 0x100000000n, 1n], + [-0x10000000000000001n, 0x100000001n, -2n], + [-0x10000000000000000n, 0x100000001n, -1n], + [-0xffffffffffffffffn, 0x100000001n, 0n], + [-0xfffffffffffffffen, 0x100000001n, -0x100000000n], + [-0x8000000000000001n, 0x100000001n, -0x80000002n], + [-0x8000000000000000n, 0x100000001n, -0x80000001n], + [-0x7fffffffffffffffn, 0x100000001n, -0x80000000n], + [-0x7ffffffffffffffen, 0x100000001n, -0x7fffffffn], + [-0x100000001n, 0x100000001n, 0n], + [-0x100000000n, 0x100000001n, -0x100000000n], + [-0xffffffffn, 0x100000001n, -0xffffffffn], + [-0xfffffffen, 0x100000001n, -0xfffffffen], + [-0x80000001n, 0x100000001n, -0x80000001n], + [-0x80000000n, 0x100000001n, -0x80000000n], + [-0x7fffffffn, 0x100000001n, -0x7fffffffn], + [-0x7ffffffen, 0x100000001n, -0x7ffffffen], + [-2n, 0x100000001n, -2n], + [-1n, 0x100000001n, -1n], + [0n, 0x100000001n, 0n], + [1n, 0x100000001n, 1n], + [2n, 0x100000001n, 2n], + [0x7ffffffen, 0x100000001n, 0x7ffffffen], + [0x7fffffffn, 0x100000001n, 0x7fffffffn], + [0x80000000n, 0x100000001n, 0x80000000n], + [0x80000001n, 0x100000001n, 0x80000001n], + [0xfffffffen, 0x100000001n, 0xfffffffen], + [0xffffffffn, 0x100000001n, 0xffffffffn], + [0x100000000n, 0x100000001n, 0x100000000n], + [0x100000001n, 0x100000001n, 0n], + [0x7ffffffffffffffen, 0x100000001n, 0x7fffffffn], + [0x7fffffffffffffffn, 0x100000001n, 0x80000000n], + [0x8000000000000000n, 0x100000001n, 0x80000001n], + [0x8000000000000001n, 0x100000001n, 0x80000002n], + [0xfffffffffffffffen, 0x100000001n, 0x100000000n], + [0xffffffffffffffffn, 0x100000001n, 0n], + [0x10000000000000000n, 0x100000001n, 1n], + [0x10000000000000001n, 0x100000001n, 2n], + [-0x10000000000000001n, -0x100000001n, -2n], + [-0x10000000000000000n, -0x100000001n, -1n], + [-0xffffffffffffffffn, -0x100000001n, 0n], + [-0xfffffffffffffffen, -0x100000001n, -0x100000000n], + [-0x8000000000000001n, -0x100000001n, -0x80000002n], + [-0x8000000000000000n, -0x100000001n, -0x80000001n], + [-0x7fffffffffffffffn, -0x100000001n, -0x80000000n], + [-0x7ffffffffffffffen, -0x100000001n, -0x7fffffffn], + [-0x100000001n, -0x100000001n, 0n], + [-0x100000000n, -0x100000001n, -0x100000000n], + [-0xffffffffn, -0x100000001n, -0xffffffffn], + [-0xfffffffen, -0x100000001n, -0xfffffffen], + [-0x80000001n, -0x100000001n, -0x80000001n], + [-0x80000000n, -0x100000001n, -0x80000000n], + [-0x7fffffffn, -0x100000001n, -0x7fffffffn], + [-0x7ffffffen, -0x100000001n, -0x7ffffffen], + [-2n, -0x100000001n, -2n], + [-1n, -0x100000001n, -1n], + [0n, -0x100000001n, 0n], + [1n, -0x100000001n, 1n], + [2n, -0x100000001n, 2n], + [0x7ffffffen, -0x100000001n, 0x7ffffffen], + [0x7fffffffn, -0x100000001n, 0x7fffffffn], + [0x80000000n, -0x100000001n, 0x80000000n], + [0x80000001n, -0x100000001n, 0x80000001n], + [0xfffffffen, -0x100000001n, 0xfffffffen], + [0xffffffffn, -0x100000001n, 0xffffffffn], + [0x100000000n, -0x100000001n, 0x100000000n], + [0x100000001n, -0x100000001n, 0n], + [0x7ffffffffffffffen, -0x100000001n, 0x7fffffffn], + [0x7fffffffffffffffn, -0x100000001n, 0x80000000n], + [0x8000000000000000n, -0x100000001n, 0x80000001n], + [0x8000000000000001n, -0x100000001n, 0x80000002n], + [0xfffffffffffffffen, -0x100000001n, 0x100000000n], + [0xffffffffffffffffn, -0x100000001n, 0n], + [0x10000000000000000n, -0x100000001n, 1n], + [0x10000000000000001n, -0x100000001n, 2n], + [-0x10000000000000001n, -0x100000000n, -1n], + [-0x10000000000000000n, -0x100000000n, 0n], + [-0xffffffffffffffffn, -0x100000000n, -0xffffffffn], + [-0xfffffffffffffffen, -0x100000000n, -0xfffffffen], + [-0x8000000000000001n, -0x100000000n, -1n], + [-0x8000000000000000n, -0x100000000n, 0n], + [-0x7fffffffffffffffn, -0x100000000n, -0xffffffffn], + [-0x7ffffffffffffffen, -0x100000000n, -0xfffffffen], + [-0x100000001n, -0x100000000n, -1n], + [-0x100000000n, -0x100000000n, 0n], + [-0xffffffffn, -0x100000000n, -0xffffffffn], + [-0xfffffffen, -0x100000000n, -0xfffffffen], + [-0x80000001n, -0x100000000n, -0x80000001n], + [-0x80000000n, -0x100000000n, -0x80000000n], + [-0x7fffffffn, -0x100000000n, -0x7fffffffn], + [-0x7ffffffen, -0x100000000n, -0x7ffffffen], + [-2n, -0x100000000n, -2n], + [-1n, -0x100000000n, -1n], + [0n, -0x100000000n, 0n], + [1n, -0x100000000n, 1n], + [2n, -0x100000000n, 2n], + [0x7ffffffen, -0x100000000n, 0x7ffffffen], + [0x7fffffffn, -0x100000000n, 0x7fffffffn], + [0x80000000n, -0x100000000n, 0x80000000n], + [0x80000001n, -0x100000000n, 0x80000001n], + [0xfffffffen, -0x100000000n, 0xfffffffen], + [0xffffffffn, -0x100000000n, 0xffffffffn], + [0x100000000n, -0x100000000n, 0n], + [0x100000001n, -0x100000000n, 1n], + [0x7ffffffffffffffen, -0x100000000n, 0xfffffffen], + [0x7fffffffffffffffn, -0x100000000n, 0xffffffffn], + [0x8000000000000000n, -0x100000000n, 0n], + [0x8000000000000001n, -0x100000000n, 1n], + [0xfffffffffffffffen, -0x100000000n, 0xfffffffen], + [0xffffffffffffffffn, -0x100000000n, 0xffffffffn], + [0x10000000000000000n, -0x100000000n, 0n], + [0x10000000000000001n, -0x100000000n, 1n], + [-0x10000000000000001n, -0xffffffffn, -2n], + [-0x10000000000000000n, -0xffffffffn, -1n], + [-0xffffffffffffffffn, -0xffffffffn, 0n], + [-0xfffffffffffffffen, -0xffffffffn, -0xfffffffen], + [-0x8000000000000001n, -0xffffffffn, -0x80000001n], + [-0x8000000000000000n, -0xffffffffn, -0x80000000n], + [-0x7fffffffffffffffn, -0xffffffffn, -0x7fffffffn], + [-0x7ffffffffffffffen, -0xffffffffn, -0x7ffffffen], + [-0x100000001n, -0xffffffffn, -2n], + [-0x100000000n, -0xffffffffn, -1n], + [-0xffffffffn, -0xffffffffn, 0n], + [-0xfffffffen, -0xffffffffn, -0xfffffffen], + [-0x80000001n, -0xffffffffn, -0x80000001n], + [-0x80000000n, -0xffffffffn, -0x80000000n], + [-0x7fffffffn, -0xffffffffn, -0x7fffffffn], + [-0x7ffffffen, -0xffffffffn, -0x7ffffffen], + [-2n, -0xffffffffn, -2n], + [-1n, -0xffffffffn, -1n], + [0n, -0xffffffffn, 0n], + [1n, -0xffffffffn, 1n], + [2n, -0xffffffffn, 2n], + [0x7ffffffen, -0xffffffffn, 0x7ffffffen], + [0x7fffffffn, -0xffffffffn, 0x7fffffffn], + [0x80000000n, -0xffffffffn, 0x80000000n], + [0x80000001n, -0xffffffffn, 0x80000001n], + [0xfffffffen, -0xffffffffn, 0xfffffffen], + [0xffffffffn, -0xffffffffn, 0n], + [0x100000000n, -0xffffffffn, 1n], + [0x100000001n, -0xffffffffn, 2n], + [0x7ffffffffffffffen, -0xffffffffn, 0x7ffffffen], + [0x7fffffffffffffffn, -0xffffffffn, 0x7fffffffn], + [0x8000000000000000n, -0xffffffffn, 0x80000000n], + [0x8000000000000001n, -0xffffffffn, 0x80000001n], + [0xfffffffffffffffen, -0xffffffffn, 0xfffffffen], + [0xffffffffffffffffn, -0xffffffffn, 0n], + [0x10000000000000000n, -0xffffffffn, 1n], + [0x10000000000000001n, -0xffffffffn, 2n], + [-0x10000000000000001n, -0xfffffffen, -5n], + [-0x10000000000000000n, -0xfffffffen, -4n], + [-0xffffffffffffffffn, -0xfffffffen, -3n], + [-0xfffffffffffffffen, -0xfffffffen, -2n], + [-0x8000000000000001n, -0xfffffffen, -3n], + [-0x8000000000000000n, -0xfffffffen, -2n], + [-0x7fffffffffffffffn, -0xfffffffen, -1n], + [-0x7ffffffffffffffen, -0xfffffffen, 0n], + [-0x100000001n, -0xfffffffen, -3n], + [-0x100000000n, -0xfffffffen, -2n], + [-0xffffffffn, -0xfffffffen, -1n], + [-0xfffffffen, -0xfffffffen, 0n], + [-0x80000001n, -0xfffffffen, -0x80000001n], + [-0x80000000n, -0xfffffffen, -0x80000000n], + [-0x7fffffffn, -0xfffffffen, -0x7fffffffn], + [-0x7ffffffen, -0xfffffffen, -0x7ffffffen], + [-2n, -0xfffffffen, -2n], + [-1n, -0xfffffffen, -1n], + [0n, -0xfffffffen, 0n], + [1n, -0xfffffffen, 1n], + [2n, -0xfffffffen, 2n], + [0x7ffffffen, -0xfffffffen, 0x7ffffffen], + [0x7fffffffn, -0xfffffffen, 0x7fffffffn], + [0x80000000n, -0xfffffffen, 0x80000000n], + [0x80000001n, -0xfffffffen, 0x80000001n], + [0xfffffffen, -0xfffffffen, 0n], + [0xffffffffn, -0xfffffffen, 1n], + [0x100000000n, -0xfffffffen, 2n], + [0x100000001n, -0xfffffffen, 3n], + [0x7ffffffffffffffen, -0xfffffffen, 0n], + [0x7fffffffffffffffn, -0xfffffffen, 1n], + [0x8000000000000000n, -0xfffffffen, 2n], + [0x8000000000000001n, -0xfffffffen, 3n], + [0xfffffffffffffffen, -0xfffffffen, 2n], + [0xffffffffffffffffn, -0xfffffffen, 3n], + [0x10000000000000000n, -0xfffffffen, 4n], + [0x10000000000000001n, -0xfffffffen, 5n], + [-0x10000000000000001n, 0x7ffffffffffffffen, -5n], + [-0x10000000000000000n, 0x7ffffffffffffffen, -4n], + [-0xffffffffffffffffn, 0x7ffffffffffffffen, -3n], + [-0xfffffffffffffffen, 0x7ffffffffffffffen, -2n], + [-0x8000000000000001n, 0x7ffffffffffffffen, -3n], + [-0x8000000000000000n, 0x7ffffffffffffffen, -2n], + [-0x7fffffffffffffffn, 0x7ffffffffffffffen, -1n], + [-0x7ffffffffffffffen, 0x7ffffffffffffffen, 0n], + [-0x100000001n, 0x7ffffffffffffffen, -0x100000001n], + [-0x100000000n, 0x7ffffffffffffffen, -0x100000000n], + [-0xffffffffn, 0x7ffffffffffffffen, -0xffffffffn], + [-0xfffffffen, 0x7ffffffffffffffen, -0xfffffffen], + [-0x80000001n, 0x7ffffffffffffffen, -0x80000001n], + [-0x80000000n, 0x7ffffffffffffffen, -0x80000000n], + [-0x7fffffffn, 0x7ffffffffffffffen, -0x7fffffffn], + [-0x7ffffffen, 0x7ffffffffffffffen, -0x7ffffffen], + [-2n, 0x7ffffffffffffffen, -2n], + [-1n, 0x7ffffffffffffffen, -1n], + [0n, 0x7ffffffffffffffen, 0n], + [1n, 0x7ffffffffffffffen, 1n], + [2n, 0x7ffffffffffffffen, 2n], + [0x7ffffffen, 0x7ffffffffffffffen, 0x7ffffffen], + [0x7fffffffn, 0x7ffffffffffffffen, 0x7fffffffn], + [0x80000000n, 0x7ffffffffffffffen, 0x80000000n], + [0x80000001n, 0x7ffffffffffffffen, 0x80000001n], + [0xfffffffen, 0x7ffffffffffffffen, 0xfffffffen], + [0xffffffffn, 0x7ffffffffffffffen, 0xffffffffn], + [0x100000000n, 0x7ffffffffffffffen, 0x100000000n], + [0x100000001n, 0x7ffffffffffffffen, 0x100000001n], + [0x7ffffffffffffffen, 0x7ffffffffffffffen, 0n], + [0x7fffffffffffffffn, 0x7ffffffffffffffen, 1n], + [0x8000000000000000n, 0x7ffffffffffffffen, 2n], + [0x8000000000000001n, 0x7ffffffffffffffen, 3n], + [0xfffffffffffffffen, 0x7ffffffffffffffen, 2n], + [0xffffffffffffffffn, 0x7ffffffffffffffen, 3n], + [0x10000000000000000n, 0x7ffffffffffffffen, 4n], + [0x10000000000000001n, 0x7ffffffffffffffen, 5n], + [-0x10000000000000001n, 0x7fffffffffffffffn, -3n], + [-0x10000000000000000n, 0x7fffffffffffffffn, -2n], + [-0xffffffffffffffffn, 0x7fffffffffffffffn, -1n], + [-0xfffffffffffffffen, 0x7fffffffffffffffn, 0n], + [-0x8000000000000001n, 0x7fffffffffffffffn, -2n], + [-0x8000000000000000n, 0x7fffffffffffffffn, -1n], + [-0x7fffffffffffffffn, 0x7fffffffffffffffn, 0n], + [-0x7ffffffffffffffen, 0x7fffffffffffffffn, -0x7ffffffffffffffen], + [-0x100000001n, 0x7fffffffffffffffn, -0x100000001n], + [-0x100000000n, 0x7fffffffffffffffn, -0x100000000n], + [-0xffffffffn, 0x7fffffffffffffffn, -0xffffffffn], + [-0xfffffffen, 0x7fffffffffffffffn, -0xfffffffen], + [-0x80000001n, 0x7fffffffffffffffn, -0x80000001n], + [-0x80000000n, 0x7fffffffffffffffn, -0x80000000n], + [-0x7fffffffn, 0x7fffffffffffffffn, -0x7fffffffn], + [-0x7ffffffen, 0x7fffffffffffffffn, -0x7ffffffen], + [-2n, 0x7fffffffffffffffn, -2n], + [-1n, 0x7fffffffffffffffn, -1n], + [0n, 0x7fffffffffffffffn, 0n], + [1n, 0x7fffffffffffffffn, 1n], + [2n, 0x7fffffffffffffffn, 2n], + [0x7ffffffen, 0x7fffffffffffffffn, 0x7ffffffen], + [0x7fffffffn, 0x7fffffffffffffffn, 0x7fffffffn], + [0x80000000n, 0x7fffffffffffffffn, 0x80000000n], + [0x80000001n, 0x7fffffffffffffffn, 0x80000001n], + [0xfffffffen, 0x7fffffffffffffffn, 0xfffffffen], + [0xffffffffn, 0x7fffffffffffffffn, 0xffffffffn], + [0x100000000n, 0x7fffffffffffffffn, 0x100000000n], + [0x100000001n, 0x7fffffffffffffffn, 0x100000001n], + [0x7ffffffffffffffen, 0x7fffffffffffffffn, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0x7fffffffffffffffn, 0n], + [0x8000000000000000n, 0x7fffffffffffffffn, 1n], + [0x8000000000000001n, 0x7fffffffffffffffn, 2n], + [0xfffffffffffffffen, 0x7fffffffffffffffn, 0n], + [0xffffffffffffffffn, 0x7fffffffffffffffn, 1n], + [0x10000000000000000n, 0x7fffffffffffffffn, 2n], + [0x10000000000000001n, 0x7fffffffffffffffn, 3n], + [-0x10000000000000001n, 0x8000000000000000n, -1n], + [-0x10000000000000000n, 0x8000000000000000n, 0n], + [-0xffffffffffffffffn, 0x8000000000000000n, -0x7fffffffffffffffn], + [-0xfffffffffffffffen, 0x8000000000000000n, -0x7ffffffffffffffen], + [-0x8000000000000001n, 0x8000000000000000n, -1n], + [-0x8000000000000000n, 0x8000000000000000n, 0n], + [-0x7fffffffffffffffn, 0x8000000000000000n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0x8000000000000000n, -0x7ffffffffffffffen], + [-0x100000001n, 0x8000000000000000n, -0x100000001n], + [-0x100000000n, 0x8000000000000000n, -0x100000000n], + [-0xffffffffn, 0x8000000000000000n, -0xffffffffn], + [-0xfffffffen, 0x8000000000000000n, -0xfffffffen], + [-0x80000001n, 0x8000000000000000n, -0x80000001n], + [-0x80000000n, 0x8000000000000000n, -0x80000000n], + [-0x7fffffffn, 0x8000000000000000n, -0x7fffffffn], + [-0x7ffffffen, 0x8000000000000000n, -0x7ffffffen], + [-2n, 0x8000000000000000n, -2n], + [-1n, 0x8000000000000000n, -1n], + [0n, 0x8000000000000000n, 0n], + [1n, 0x8000000000000000n, 1n], + [2n, 0x8000000000000000n, 2n], + [0x7ffffffen, 0x8000000000000000n, 0x7ffffffen], + [0x7fffffffn, 0x8000000000000000n, 0x7fffffffn], + [0x80000000n, 0x8000000000000000n, 0x80000000n], + [0x80000001n, 0x8000000000000000n, 0x80000001n], + [0xfffffffen, 0x8000000000000000n, 0xfffffffen], + [0xffffffffn, 0x8000000000000000n, 0xffffffffn], + [0x100000000n, 0x8000000000000000n, 0x100000000n], + [0x100000001n, 0x8000000000000000n, 0x100000001n], + [0x7ffffffffffffffen, 0x8000000000000000n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0x8000000000000000n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x8000000000000000n, 0n], + [0x8000000000000001n, 0x8000000000000000n, 1n], + [0xfffffffffffffffen, 0x8000000000000000n, 0x7ffffffffffffffen], + [0xffffffffffffffffn, 0x8000000000000000n, 0x7fffffffffffffffn], + [0x10000000000000000n, 0x8000000000000000n, 0n], + [0x10000000000000001n, 0x8000000000000000n, 1n], + [-0x10000000000000001n, 0x8000000000000001n, -0x8000000000000000n], + [-0x10000000000000000n, 0x8000000000000001n, -0x7fffffffffffffffn], + [-0xffffffffffffffffn, 0x8000000000000001n, -0x7ffffffffffffffen], + [-0xfffffffffffffffen, 0x8000000000000001n, -0x7ffffffffffffffdn], + [-0x8000000000000001n, 0x8000000000000001n, 0n], + [-0x8000000000000000n, 0x8000000000000001n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 0x8000000000000001n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0x8000000000000001n, -0x7ffffffffffffffen], + [-0x100000001n, 0x8000000000000001n, -0x100000001n], + [-0x100000000n, 0x8000000000000001n, -0x100000000n], + [-0xffffffffn, 0x8000000000000001n, -0xffffffffn], + [-0xfffffffen, 0x8000000000000001n, -0xfffffffen], + [-0x80000001n, 0x8000000000000001n, -0x80000001n], + [-0x80000000n, 0x8000000000000001n, -0x80000000n], + [-0x7fffffffn, 0x8000000000000001n, -0x7fffffffn], + [-0x7ffffffen, 0x8000000000000001n, -0x7ffffffen], + [-2n, 0x8000000000000001n, -2n], + [-1n, 0x8000000000000001n, -1n], + [0n, 0x8000000000000001n, 0n], + [1n, 0x8000000000000001n, 1n], + [2n, 0x8000000000000001n, 2n], + [0x7ffffffen, 0x8000000000000001n, 0x7ffffffen], + [0x7fffffffn, 0x8000000000000001n, 0x7fffffffn], + [0x80000000n, 0x8000000000000001n, 0x80000000n], + [0x80000001n, 0x8000000000000001n, 0x80000001n], + [0xfffffffen, 0x8000000000000001n, 0xfffffffen], + [0xffffffffn, 0x8000000000000001n, 0xffffffffn], + [0x100000000n, 0x8000000000000001n, 0x100000000n], + [0x100000001n, 0x8000000000000001n, 0x100000001n], + [0x7ffffffffffffffen, 0x8000000000000001n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0x8000000000000001n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x8000000000000001n, 0x8000000000000000n], + [0x8000000000000001n, 0x8000000000000001n, 0n], + [0xfffffffffffffffen, 0x8000000000000001n, 0x7ffffffffffffffdn], + [0xffffffffffffffffn, 0x8000000000000001n, 0x7ffffffffffffffen], + [0x10000000000000000n, 0x8000000000000001n, 0x7fffffffffffffffn], + [0x10000000000000001n, 0x8000000000000001n, 0x8000000000000000n], + [-0x10000000000000001n, -0x8000000000000001n, -0x8000000000000000n], + [-0x10000000000000000n, -0x8000000000000001n, -0x7fffffffffffffffn], + [-0xffffffffffffffffn, -0x8000000000000001n, -0x7ffffffffffffffen], + [-0xfffffffffffffffen, -0x8000000000000001n, -0x7ffffffffffffffdn], + [-0x8000000000000001n, -0x8000000000000001n, 0n], + [-0x8000000000000000n, -0x8000000000000001n, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0x8000000000000001n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0x8000000000000001n, -0x7ffffffffffffffen], + [-0x100000001n, -0x8000000000000001n, -0x100000001n], + [-0x100000000n, -0x8000000000000001n, -0x100000000n], + [-0xffffffffn, -0x8000000000000001n, -0xffffffffn], + [-0xfffffffen, -0x8000000000000001n, -0xfffffffen], + [-0x80000001n, -0x8000000000000001n, -0x80000001n], + [-0x80000000n, -0x8000000000000001n, -0x80000000n], + [-0x7fffffffn, -0x8000000000000001n, -0x7fffffffn], + [-0x7ffffffen, -0x8000000000000001n, -0x7ffffffen], + [-2n, -0x8000000000000001n, -2n], + [-1n, -0x8000000000000001n, -1n], + [0n, -0x8000000000000001n, 0n], + [1n, -0x8000000000000001n, 1n], + [2n, -0x8000000000000001n, 2n], + [0x7ffffffen, -0x8000000000000001n, 0x7ffffffen], + [0x7fffffffn, -0x8000000000000001n, 0x7fffffffn], + [0x80000000n, -0x8000000000000001n, 0x80000000n], + [0x80000001n, -0x8000000000000001n, 0x80000001n], + [0xfffffffen, -0x8000000000000001n, 0xfffffffen], + [0xffffffffn, -0x8000000000000001n, 0xffffffffn], + [0x100000000n, -0x8000000000000001n, 0x100000000n], + [0x100000001n, -0x8000000000000001n, 0x100000001n], + [0x7ffffffffffffffen, -0x8000000000000001n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, -0x8000000000000001n, 0x7fffffffffffffffn], + [0x8000000000000000n, -0x8000000000000001n, 0x8000000000000000n], + [0x8000000000000001n, -0x8000000000000001n, 0n], + [0xfffffffffffffffen, -0x8000000000000001n, 0x7ffffffffffffffdn], + [0xffffffffffffffffn, -0x8000000000000001n, 0x7ffffffffffffffen], + [0x10000000000000000n, -0x8000000000000001n, 0x7fffffffffffffffn], + [0x10000000000000001n, -0x8000000000000001n, 0x8000000000000000n], + [-0x10000000000000001n, -0x8000000000000000n, -1n], + [-0x10000000000000000n, -0x8000000000000000n, 0n], + [-0xffffffffffffffffn, -0x8000000000000000n, -0x7fffffffffffffffn], + [-0xfffffffffffffffen, -0x8000000000000000n, -0x7ffffffffffffffen], + [-0x8000000000000001n, -0x8000000000000000n, -1n], + [-0x8000000000000000n, -0x8000000000000000n, 0n], + [-0x7fffffffffffffffn, -0x8000000000000000n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0x8000000000000000n, -0x7ffffffffffffffen], + [-0x100000001n, -0x8000000000000000n, -0x100000001n], + [-0x100000000n, -0x8000000000000000n, -0x100000000n], + [-0xffffffffn, -0x8000000000000000n, -0xffffffffn], + [-0xfffffffen, -0x8000000000000000n, -0xfffffffen], + [-0x80000001n, -0x8000000000000000n, -0x80000001n], + [-0x80000000n, -0x8000000000000000n, -0x80000000n], + [-0x7fffffffn, -0x8000000000000000n, -0x7fffffffn], + [-0x7ffffffen, -0x8000000000000000n, -0x7ffffffen], + [-2n, -0x8000000000000000n, -2n], + [-1n, -0x8000000000000000n, -1n], + [0n, -0x8000000000000000n, 0n], + [1n, -0x8000000000000000n, 1n], + [2n, -0x8000000000000000n, 2n], + [0x7ffffffen, -0x8000000000000000n, 0x7ffffffen], + [0x7fffffffn, -0x8000000000000000n, 0x7fffffffn], + [0x80000000n, -0x8000000000000000n, 0x80000000n], + [0x80000001n, -0x8000000000000000n, 0x80000001n], + [0xfffffffen, -0x8000000000000000n, 0xfffffffen], + [0xffffffffn, -0x8000000000000000n, 0xffffffffn], + [0x100000000n, -0x8000000000000000n, 0x100000000n], + [0x100000001n, -0x8000000000000000n, 0x100000001n], + [0x7ffffffffffffffen, -0x8000000000000000n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, -0x8000000000000000n, 0x7fffffffffffffffn], + [0x8000000000000000n, -0x8000000000000000n, 0n], + [0x8000000000000001n, -0x8000000000000000n, 1n], + [0xfffffffffffffffen, -0x8000000000000000n, 0x7ffffffffffffffen], + [0xffffffffffffffffn, -0x8000000000000000n, 0x7fffffffffffffffn], + [0x10000000000000000n, -0x8000000000000000n, 0n], + [0x10000000000000001n, -0x8000000000000000n, 1n], + [-0x10000000000000001n, -0x7fffffffffffffffn, -3n], + [-0x10000000000000000n, -0x7fffffffffffffffn, -2n], + [-0xffffffffffffffffn, -0x7fffffffffffffffn, -1n], + [-0xfffffffffffffffen, -0x7fffffffffffffffn, 0n], + [-0x8000000000000001n, -0x7fffffffffffffffn, -2n], + [-0x8000000000000000n, -0x7fffffffffffffffn, -1n], + [-0x7fffffffffffffffn, -0x7fffffffffffffffn, 0n], + [-0x7ffffffffffffffen, -0x7fffffffffffffffn, -0x7ffffffffffffffen], + [-0x100000001n, -0x7fffffffffffffffn, -0x100000001n], + [-0x100000000n, -0x7fffffffffffffffn, -0x100000000n], + [-0xffffffffn, -0x7fffffffffffffffn, -0xffffffffn], + [-0xfffffffen, -0x7fffffffffffffffn, -0xfffffffen], + [-0x80000001n, -0x7fffffffffffffffn, -0x80000001n], + [-0x80000000n, -0x7fffffffffffffffn, -0x80000000n], + [-0x7fffffffn, -0x7fffffffffffffffn, -0x7fffffffn], + [-0x7ffffffen, -0x7fffffffffffffffn, -0x7ffffffen], + [-2n, -0x7fffffffffffffffn, -2n], + [-1n, -0x7fffffffffffffffn, -1n], + [0n, -0x7fffffffffffffffn, 0n], + [1n, -0x7fffffffffffffffn, 1n], + [2n, -0x7fffffffffffffffn, 2n], + [0x7ffffffen, -0x7fffffffffffffffn, 0x7ffffffen], + [0x7fffffffn, -0x7fffffffffffffffn, 0x7fffffffn], + [0x80000000n, -0x7fffffffffffffffn, 0x80000000n], + [0x80000001n, -0x7fffffffffffffffn, 0x80000001n], + [0xfffffffen, -0x7fffffffffffffffn, 0xfffffffen], + [0xffffffffn, -0x7fffffffffffffffn, 0xffffffffn], + [0x100000000n, -0x7fffffffffffffffn, 0x100000000n], + [0x100000001n, -0x7fffffffffffffffn, 0x100000001n], + [0x7ffffffffffffffen, -0x7fffffffffffffffn, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, -0x7fffffffffffffffn, 0n], + [0x8000000000000000n, -0x7fffffffffffffffn, 1n], + [0x8000000000000001n, -0x7fffffffffffffffn, 2n], + [0xfffffffffffffffen, -0x7fffffffffffffffn, 0n], + [0xffffffffffffffffn, -0x7fffffffffffffffn, 1n], + [0x10000000000000000n, -0x7fffffffffffffffn, 2n], + [0x10000000000000001n, -0x7fffffffffffffffn, 3n], + [-0x10000000000000001n, -0x7ffffffffffffffen, -5n], + [-0x10000000000000000n, -0x7ffffffffffffffen, -4n], + [-0xffffffffffffffffn, -0x7ffffffffffffffen, -3n], + [-0xfffffffffffffffen, -0x7ffffffffffffffen, -2n], + [-0x8000000000000001n, -0x7ffffffffffffffen, -3n], + [-0x8000000000000000n, -0x7ffffffffffffffen, -2n], + [-0x7fffffffffffffffn, -0x7ffffffffffffffen, -1n], + [-0x7ffffffffffffffen, -0x7ffffffffffffffen, 0n], + [-0x100000001n, -0x7ffffffffffffffen, -0x100000001n], + [-0x100000000n, -0x7ffffffffffffffen, -0x100000000n], + [-0xffffffffn, -0x7ffffffffffffffen, -0xffffffffn], + [-0xfffffffen, -0x7ffffffffffffffen, -0xfffffffen], + [-0x80000001n, -0x7ffffffffffffffen, -0x80000001n], + [-0x80000000n, -0x7ffffffffffffffen, -0x80000000n], + [-0x7fffffffn, -0x7ffffffffffffffen, -0x7fffffffn], + [-0x7ffffffen, -0x7ffffffffffffffen, -0x7ffffffen], + [-2n, -0x7ffffffffffffffen, -2n], + [-1n, -0x7ffffffffffffffen, -1n], + [0n, -0x7ffffffffffffffen, 0n], + [1n, -0x7ffffffffffffffen, 1n], + [2n, -0x7ffffffffffffffen, 2n], + [0x7ffffffen, -0x7ffffffffffffffen, 0x7ffffffen], + [0x7fffffffn, -0x7ffffffffffffffen, 0x7fffffffn], + [0x80000000n, -0x7ffffffffffffffen, 0x80000000n], + [0x80000001n, -0x7ffffffffffffffen, 0x80000001n], + [0xfffffffen, -0x7ffffffffffffffen, 0xfffffffen], + [0xffffffffn, -0x7ffffffffffffffen, 0xffffffffn], + [0x100000000n, -0x7ffffffffffffffen, 0x100000000n], + [0x100000001n, -0x7ffffffffffffffen, 0x100000001n], + [0x7ffffffffffffffen, -0x7ffffffffffffffen, 0n], + [0x7fffffffffffffffn, -0x7ffffffffffffffen, 1n], + [0x8000000000000000n, -0x7ffffffffffffffen, 2n], + [0x8000000000000001n, -0x7ffffffffffffffen, 3n], + [0xfffffffffffffffen, -0x7ffffffffffffffen, 2n], + [0xffffffffffffffffn, -0x7ffffffffffffffen, 3n], + [0x10000000000000000n, -0x7ffffffffffffffen, 4n], + [0x10000000000000001n, -0x7ffffffffffffffen, 5n], + [-0x10000000000000001n, 0xfffffffffffffffen, -3n], + [-0x10000000000000000n, 0xfffffffffffffffen, -2n], + [-0xffffffffffffffffn, 0xfffffffffffffffen, -1n], + [-0xfffffffffffffffen, 0xfffffffffffffffen, 0n], + [-0x8000000000000001n, 0xfffffffffffffffen, -0x8000000000000001n], + [-0x8000000000000000n, 0xfffffffffffffffen, -0x8000000000000000n], + [-0x7fffffffffffffffn, 0xfffffffffffffffen, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0xfffffffffffffffen, -0x7ffffffffffffffen], + [-0x100000001n, 0xfffffffffffffffen, -0x100000001n], + [-0x100000000n, 0xfffffffffffffffen, -0x100000000n], + [-0xffffffffn, 0xfffffffffffffffen, -0xffffffffn], + [-0xfffffffen, 0xfffffffffffffffen, -0xfffffffen], + [-0x80000001n, 0xfffffffffffffffen, -0x80000001n], + [-0x80000000n, 0xfffffffffffffffen, -0x80000000n], + [-0x7fffffffn, 0xfffffffffffffffen, -0x7fffffffn], + [-0x7ffffffen, 0xfffffffffffffffen, -0x7ffffffen], + [-2n, 0xfffffffffffffffen, -2n], + [-1n, 0xfffffffffffffffen, -1n], + [0n, 0xfffffffffffffffen, 0n], + [1n, 0xfffffffffffffffen, 1n], + [2n, 0xfffffffffffffffen, 2n], + [0x7ffffffen, 0xfffffffffffffffen, 0x7ffffffen], + [0x7fffffffn, 0xfffffffffffffffen, 0x7fffffffn], + [0x80000000n, 0xfffffffffffffffen, 0x80000000n], + [0x80000001n, 0xfffffffffffffffen, 0x80000001n], + [0xfffffffen, 0xfffffffffffffffen, 0xfffffffen], + [0xffffffffn, 0xfffffffffffffffen, 0xffffffffn], + [0x100000000n, 0xfffffffffffffffen, 0x100000000n], + [0x100000001n, 0xfffffffffffffffen, 0x100000001n], + [0x7ffffffffffffffen, 0xfffffffffffffffen, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0xfffffffffffffffen, 0x7fffffffffffffffn], + [0x8000000000000000n, 0xfffffffffffffffen, 0x8000000000000000n], + [0x8000000000000001n, 0xfffffffffffffffen, 0x8000000000000001n], + [0xfffffffffffffffen, 0xfffffffffffffffen, 0n], + [0xffffffffffffffffn, 0xfffffffffffffffen, 1n], + [0x10000000000000000n, 0xfffffffffffffffen, 2n], + [0x10000000000000001n, 0xfffffffffffffffen, 3n], + [-0x10000000000000001n, 0xffffffffffffffffn, -2n], + [-0x10000000000000000n, 0xffffffffffffffffn, -1n], + [-0xffffffffffffffffn, 0xffffffffffffffffn, 0n], + [-0xfffffffffffffffen, 0xffffffffffffffffn, -0xfffffffffffffffen], + [-0x8000000000000001n, 0xffffffffffffffffn, -0x8000000000000001n], + [-0x8000000000000000n, 0xffffffffffffffffn, -0x8000000000000000n], + [-0x7fffffffffffffffn, 0xffffffffffffffffn, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0xffffffffffffffffn, -0x7ffffffffffffffen], + [-0x100000001n, 0xffffffffffffffffn, -0x100000001n], + [-0x100000000n, 0xffffffffffffffffn, -0x100000000n], + [-0xffffffffn, 0xffffffffffffffffn, -0xffffffffn], + [-0xfffffffen, 0xffffffffffffffffn, -0xfffffffen], + [-0x80000001n, 0xffffffffffffffffn, -0x80000001n], + [-0x80000000n, 0xffffffffffffffffn, -0x80000000n], + [-0x7fffffffn, 0xffffffffffffffffn, -0x7fffffffn], + [-0x7ffffffen, 0xffffffffffffffffn, -0x7ffffffen], + [-2n, 0xffffffffffffffffn, -2n], + [-1n, 0xffffffffffffffffn, -1n], + [0n, 0xffffffffffffffffn, 0n], + [1n, 0xffffffffffffffffn, 1n], + [2n, 0xffffffffffffffffn, 2n], + [0x7ffffffen, 0xffffffffffffffffn, 0x7ffffffen], + [0x7fffffffn, 0xffffffffffffffffn, 0x7fffffffn], + [0x80000000n, 0xffffffffffffffffn, 0x80000000n], + [0x80000001n, 0xffffffffffffffffn, 0x80000001n], + [0xfffffffen, 0xffffffffffffffffn, 0xfffffffen], + [0xffffffffn, 0xffffffffffffffffn, 0xffffffffn], + [0x100000000n, 0xffffffffffffffffn, 0x100000000n], + [0x100000001n, 0xffffffffffffffffn, 0x100000001n], + [0x7ffffffffffffffen, 0xffffffffffffffffn, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0xffffffffffffffffn, 0x7fffffffffffffffn], + [0x8000000000000000n, 0xffffffffffffffffn, 0x8000000000000000n], + [0x8000000000000001n, 0xffffffffffffffffn, 0x8000000000000001n], + [0xfffffffffffffffen, 0xffffffffffffffffn, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0xffffffffffffffffn, 0n], + [0x10000000000000000n, 0xffffffffffffffffn, 1n], + [0x10000000000000001n, 0xffffffffffffffffn, 2n], + [-0x10000000000000001n, 0x10000000000000000n, -1n], + [-0x10000000000000000n, 0x10000000000000000n, 0n], + [-0xffffffffffffffffn, 0x10000000000000000n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 0x10000000000000000n, -0xfffffffffffffffen], + [-0x8000000000000001n, 0x10000000000000000n, -0x8000000000000001n], + [-0x8000000000000000n, 0x10000000000000000n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 0x10000000000000000n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0x10000000000000000n, -0x7ffffffffffffffen], + [-0x100000001n, 0x10000000000000000n, -0x100000001n], + [-0x100000000n, 0x10000000000000000n, -0x100000000n], + [-0xffffffffn, 0x10000000000000000n, -0xffffffffn], + [-0xfffffffen, 0x10000000000000000n, -0xfffffffen], + [-0x80000001n, 0x10000000000000000n, -0x80000001n], + [-0x80000000n, 0x10000000000000000n, -0x80000000n], + [-0x7fffffffn, 0x10000000000000000n, -0x7fffffffn], + [-0x7ffffffen, 0x10000000000000000n, -0x7ffffffen], + [-2n, 0x10000000000000000n, -2n], + [-1n, 0x10000000000000000n, -1n], + [0n, 0x10000000000000000n, 0n], + [1n, 0x10000000000000000n, 1n], + [2n, 0x10000000000000000n, 2n], + [0x7ffffffen, 0x10000000000000000n, 0x7ffffffen], + [0x7fffffffn, 0x10000000000000000n, 0x7fffffffn], + [0x80000000n, 0x10000000000000000n, 0x80000000n], + [0x80000001n, 0x10000000000000000n, 0x80000001n], + [0xfffffffen, 0x10000000000000000n, 0xfffffffen], + [0xffffffffn, 0x10000000000000000n, 0xffffffffn], + [0x100000000n, 0x10000000000000000n, 0x100000000n], + [0x100000001n, 0x10000000000000000n, 0x100000001n], + [0x7ffffffffffffffen, 0x10000000000000000n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0x10000000000000000n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x10000000000000000n, 0x8000000000000000n], + [0x8000000000000001n, 0x10000000000000000n, 0x8000000000000001n], + [0xfffffffffffffffen, 0x10000000000000000n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0x10000000000000000n, 0xffffffffffffffffn], + [0x10000000000000000n, 0x10000000000000000n, 0n], + [0x10000000000000001n, 0x10000000000000000n, 1n], + [-0x10000000000000001n, 0x10000000000000001n, 0n], + [-0x10000000000000000n, 0x10000000000000001n, -0x10000000000000000n], + [-0xffffffffffffffffn, 0x10000000000000001n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 0x10000000000000001n, -0xfffffffffffffffen], + [-0x8000000000000001n, 0x10000000000000001n, -0x8000000000000001n], + [-0x8000000000000000n, 0x10000000000000001n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 0x10000000000000001n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0x10000000000000001n, -0x7ffffffffffffffen], + [-0x100000001n, 0x10000000000000001n, -0x100000001n], + [-0x100000000n, 0x10000000000000001n, -0x100000000n], + [-0xffffffffn, 0x10000000000000001n, -0xffffffffn], + [-0xfffffffen, 0x10000000000000001n, -0xfffffffen], + [-0x80000001n, 0x10000000000000001n, -0x80000001n], + [-0x80000000n, 0x10000000000000001n, -0x80000000n], + [-0x7fffffffn, 0x10000000000000001n, -0x7fffffffn], + [-0x7ffffffen, 0x10000000000000001n, -0x7ffffffen], + [-2n, 0x10000000000000001n, -2n], + [-1n, 0x10000000000000001n, -1n], + [0n, 0x10000000000000001n, 0n], + [1n, 0x10000000000000001n, 1n], + [2n, 0x10000000000000001n, 2n], + [0x7ffffffen, 0x10000000000000001n, 0x7ffffffen], + [0x7fffffffn, 0x10000000000000001n, 0x7fffffffn], + [0x80000000n, 0x10000000000000001n, 0x80000000n], + [0x80000001n, 0x10000000000000001n, 0x80000001n], + [0xfffffffen, 0x10000000000000001n, 0xfffffffen], + [0xffffffffn, 0x10000000000000001n, 0xffffffffn], + [0x100000000n, 0x10000000000000001n, 0x100000000n], + [0x100000001n, 0x10000000000000001n, 0x100000001n], + [0x7ffffffffffffffen, 0x10000000000000001n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0x10000000000000001n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x10000000000000001n, 0x8000000000000000n], + [0x8000000000000001n, 0x10000000000000001n, 0x8000000000000001n], + [0xfffffffffffffffen, 0x10000000000000001n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0x10000000000000001n, 0xffffffffffffffffn], + [0x10000000000000000n, 0x10000000000000001n, 0x10000000000000000n], + [0x10000000000000001n, 0x10000000000000001n, 0n], + [-0x10000000000000001n, -0x10000000000000001n, 0n], + [-0x10000000000000000n, -0x10000000000000001n, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x10000000000000001n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, -0x10000000000000001n, -0xfffffffffffffffen], + [-0x8000000000000001n, -0x10000000000000001n, -0x8000000000000001n], + [-0x8000000000000000n, -0x10000000000000001n, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0x10000000000000001n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0x10000000000000001n, -0x7ffffffffffffffen], + [-0x100000001n, -0x10000000000000001n, -0x100000001n], + [-0x100000000n, -0x10000000000000001n, -0x100000000n], + [-0xffffffffn, -0x10000000000000001n, -0xffffffffn], + [-0xfffffffen, -0x10000000000000001n, -0xfffffffen], + [-0x80000001n, -0x10000000000000001n, -0x80000001n], + [-0x80000000n, -0x10000000000000001n, -0x80000000n], + [-0x7fffffffn, -0x10000000000000001n, -0x7fffffffn], + [-0x7ffffffen, -0x10000000000000001n, -0x7ffffffen], + [-2n, -0x10000000000000001n, -2n], + [-1n, -0x10000000000000001n, -1n], + [0n, -0x10000000000000001n, 0n], + [1n, -0x10000000000000001n, 1n], + [2n, -0x10000000000000001n, 2n], + [0x7ffffffen, -0x10000000000000001n, 0x7ffffffen], + [0x7fffffffn, -0x10000000000000001n, 0x7fffffffn], + [0x80000000n, -0x10000000000000001n, 0x80000000n], + [0x80000001n, -0x10000000000000001n, 0x80000001n], + [0xfffffffen, -0x10000000000000001n, 0xfffffffen], + [0xffffffffn, -0x10000000000000001n, 0xffffffffn], + [0x100000000n, -0x10000000000000001n, 0x100000000n], + [0x100000001n, -0x10000000000000001n, 0x100000001n], + [0x7ffffffffffffffen, -0x10000000000000001n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, -0x10000000000000001n, 0x7fffffffffffffffn], + [0x8000000000000000n, -0x10000000000000001n, 0x8000000000000000n], + [0x8000000000000001n, -0x10000000000000001n, 0x8000000000000001n], + [0xfffffffffffffffen, -0x10000000000000001n, 0xfffffffffffffffen], + [0xffffffffffffffffn, -0x10000000000000001n, 0xffffffffffffffffn], + [0x10000000000000000n, -0x10000000000000001n, 0x10000000000000000n], + [0x10000000000000001n, -0x10000000000000001n, 0n], + [-0x10000000000000001n, -0x10000000000000000n, -1n], + [-0x10000000000000000n, -0x10000000000000000n, 0n], + [-0xffffffffffffffffn, -0x10000000000000000n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, -0x10000000000000000n, -0xfffffffffffffffen], + [-0x8000000000000001n, -0x10000000000000000n, -0x8000000000000001n], + [-0x8000000000000000n, -0x10000000000000000n, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0x10000000000000000n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0x10000000000000000n, -0x7ffffffffffffffen], + [-0x100000001n, -0x10000000000000000n, -0x100000001n], + [-0x100000000n, -0x10000000000000000n, -0x100000000n], + [-0xffffffffn, -0x10000000000000000n, -0xffffffffn], + [-0xfffffffen, -0x10000000000000000n, -0xfffffffen], + [-0x80000001n, -0x10000000000000000n, -0x80000001n], + [-0x80000000n, -0x10000000000000000n, -0x80000000n], + [-0x7fffffffn, -0x10000000000000000n, -0x7fffffffn], + [-0x7ffffffen, -0x10000000000000000n, -0x7ffffffen], + [-2n, -0x10000000000000000n, -2n], + [-1n, -0x10000000000000000n, -1n], + [0n, -0x10000000000000000n, 0n], + [1n, -0x10000000000000000n, 1n], + [2n, -0x10000000000000000n, 2n], + [0x7ffffffen, -0x10000000000000000n, 0x7ffffffen], + [0x7fffffffn, -0x10000000000000000n, 0x7fffffffn], + [0x80000000n, -0x10000000000000000n, 0x80000000n], + [0x80000001n, -0x10000000000000000n, 0x80000001n], + [0xfffffffen, -0x10000000000000000n, 0xfffffffen], + [0xffffffffn, -0x10000000000000000n, 0xffffffffn], + [0x100000000n, -0x10000000000000000n, 0x100000000n], + [0x100000001n, -0x10000000000000000n, 0x100000001n], + [0x7ffffffffffffffen, -0x10000000000000000n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, -0x10000000000000000n, 0x7fffffffffffffffn], + [0x8000000000000000n, -0x10000000000000000n, 0x8000000000000000n], + [0x8000000000000001n, -0x10000000000000000n, 0x8000000000000001n], + [0xfffffffffffffffen, -0x10000000000000000n, 0xfffffffffffffffen], + [0xffffffffffffffffn, -0x10000000000000000n, 0xffffffffffffffffn], + [0x10000000000000000n, -0x10000000000000000n, 0n], + [0x10000000000000001n, -0x10000000000000000n, 1n], + [-0x10000000000000001n, -0xffffffffffffffffn, -2n], + [-0x10000000000000000n, -0xffffffffffffffffn, -1n], + [-0xffffffffffffffffn, -0xffffffffffffffffn, 0n], + [-0xfffffffffffffffen, -0xffffffffffffffffn, -0xfffffffffffffffen], + [-0x8000000000000001n, -0xffffffffffffffffn, -0x8000000000000001n], + [-0x8000000000000000n, -0xffffffffffffffffn, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0xffffffffffffffffn, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0xffffffffffffffffn, -0x7ffffffffffffffen], + [-0x100000001n, -0xffffffffffffffffn, -0x100000001n], + [-0x100000000n, -0xffffffffffffffffn, -0x100000000n], + [-0xffffffffn, -0xffffffffffffffffn, -0xffffffffn], + [-0xfffffffen, -0xffffffffffffffffn, -0xfffffffen], + [-0x80000001n, -0xffffffffffffffffn, -0x80000001n], + [-0x80000000n, -0xffffffffffffffffn, -0x80000000n], + [-0x7fffffffn, -0xffffffffffffffffn, -0x7fffffffn], + [-0x7ffffffen, -0xffffffffffffffffn, -0x7ffffffen], + [-2n, -0xffffffffffffffffn, -2n], + [-1n, -0xffffffffffffffffn, -1n], + [0n, -0xffffffffffffffffn, 0n], + [1n, -0xffffffffffffffffn, 1n], + [2n, -0xffffffffffffffffn, 2n], + [0x7ffffffen, -0xffffffffffffffffn, 0x7ffffffen], + [0x7fffffffn, -0xffffffffffffffffn, 0x7fffffffn], + [0x80000000n, -0xffffffffffffffffn, 0x80000000n], + [0x80000001n, -0xffffffffffffffffn, 0x80000001n], + [0xfffffffen, -0xffffffffffffffffn, 0xfffffffen], + [0xffffffffn, -0xffffffffffffffffn, 0xffffffffn], + [0x100000000n, -0xffffffffffffffffn, 0x100000000n], + [0x100000001n, -0xffffffffffffffffn, 0x100000001n], + [0x7ffffffffffffffen, -0xffffffffffffffffn, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, -0xffffffffffffffffn, 0x7fffffffffffffffn], + [0x8000000000000000n, -0xffffffffffffffffn, 0x8000000000000000n], + [0x8000000000000001n, -0xffffffffffffffffn, 0x8000000000000001n], + [0xfffffffffffffffen, -0xffffffffffffffffn, 0xfffffffffffffffen], + [0xffffffffffffffffn, -0xffffffffffffffffn, 0n], + [0x10000000000000000n, -0xffffffffffffffffn, 1n], + [0x10000000000000001n, -0xffffffffffffffffn, 2n], + [-0x10000000000000001n, -0xfffffffffffffffen, -3n], + [-0x10000000000000000n, -0xfffffffffffffffen, -2n], + [-0xffffffffffffffffn, -0xfffffffffffffffen, -1n], + [-0xfffffffffffffffen, -0xfffffffffffffffen, 0n], + [-0x8000000000000001n, -0xfffffffffffffffen, -0x8000000000000001n], + [-0x8000000000000000n, -0xfffffffffffffffen, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0xfffffffffffffffen, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0xfffffffffffffffen, -0x7ffffffffffffffen], + [-0x100000001n, -0xfffffffffffffffen, -0x100000001n], + [-0x100000000n, -0xfffffffffffffffen, -0x100000000n], + [-0xffffffffn, -0xfffffffffffffffen, -0xffffffffn], + [-0xfffffffen, -0xfffffffffffffffen, -0xfffffffen], + [-0x80000001n, -0xfffffffffffffffen, -0x80000001n], + [-0x80000000n, -0xfffffffffffffffen, -0x80000000n], + [-0x7fffffffn, -0xfffffffffffffffen, -0x7fffffffn], + [-0x7ffffffen, -0xfffffffffffffffen, -0x7ffffffen], + [-2n, -0xfffffffffffffffen, -2n], + [-1n, -0xfffffffffffffffen, -1n], + [0n, -0xfffffffffffffffen, 0n], + [1n, -0xfffffffffffffffen, 1n], + [2n, -0xfffffffffffffffen, 2n], + [0x7ffffffen, -0xfffffffffffffffen, 0x7ffffffen], + [0x7fffffffn, -0xfffffffffffffffen, 0x7fffffffn], + [0x80000000n, -0xfffffffffffffffen, 0x80000000n], + [0x80000001n, -0xfffffffffffffffen, 0x80000001n], + [0xfffffffen, -0xfffffffffffffffen, 0xfffffffen], + [0xffffffffn, -0xfffffffffffffffen, 0xffffffffn], + [0x100000000n, -0xfffffffffffffffen, 0x100000000n], + [0x100000001n, -0xfffffffffffffffen, 0x100000001n], + [0x7ffffffffffffffen, -0xfffffffffffffffen, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, -0xfffffffffffffffen, 0x7fffffffffffffffn], + [0x8000000000000000n, -0xfffffffffffffffen, 0x8000000000000000n], + [0x8000000000000001n, -0xfffffffffffffffen, 0x8000000000000001n], + [0xfffffffffffffffen, -0xfffffffffffffffen, 0n], + [0xffffffffffffffffn, -0xfffffffffffffffen, 1n], + [0x10000000000000000n, -0xfffffffffffffffen, 2n], + [0x10000000000000001n, -0xfffffffffffffffen, 3n], +]; + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs % rhs, expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-mul.js b/js/src/jit-test/tests/bigint/bigint-mul.js new file mode 100644 index 0000000000..315c05dcf7 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-mul.js @@ -0,0 +1,1473 @@ +const tests = [ + [-0x10000000000000001n, -2n, 0x20000000000000002n], + [-0x10000000000000000n, -2n, 0x20000000000000000n], + [-0xffffffffffffffffn, -2n, 0x1fffffffffffffffen], + [-0xfffffffffffffffen, -2n, 0x1fffffffffffffffcn], + [-0x8000000000000001n, -2n, 0x10000000000000002n], + [-0x8000000000000000n, -2n, 0x10000000000000000n], + [-0x7fffffffffffffffn, -2n, 0xfffffffffffffffen], + [-0x7ffffffffffffffen, -2n, 0xfffffffffffffffcn], + [-0x100000001n, -2n, 0x200000002n], + [-0x100000000n, -2n, 0x200000000n], + [-0xffffffffn, -2n, 0x1fffffffen], + [-0xfffffffen, -2n, 0x1fffffffcn], + [-0x80000001n, -2n, 0x100000002n], + [-0x80000000n, -2n, 0x100000000n], + [-0x7fffffffn, -2n, 0xfffffffen], + [-0x7ffffffen, -2n, 0xfffffffcn], + [-0x10001n, -2n, 0x20002n], + [-0x10000n, -2n, 0x20000n], + [-0xffffn, -2n, 0x1fffen], + [-0xfffen, -2n, 0x1fffcn], + [-0x8001n, -2n, 0x10002n], + [-0x8000n, -2n, 0x10000n], + [-0x7fffn, -2n, 0xfffen], + [-0x7ffen, -2n, 0xfffcn], + [-2n, -2n, 4n], + [-1n, -2n, 2n], + [0n, -2n, 0n], + [1n, -2n, -2n], + [2n, -2n, -4n], + [0x7ffen, -2n, -0xfffcn], + [0x7fffn, -2n, -0xfffen], + [0x8000n, -2n, -0x10000n], + [0x8001n, -2n, -0x10002n], + [0xfffen, -2n, -0x1fffcn], + [0xffffn, -2n, -0x1fffen], + [0x10000n, -2n, -0x20000n], + [0x10001n, -2n, -0x20002n], + [0x7ffffffen, -2n, -0xfffffffcn], + [0x7fffffffn, -2n, -0xfffffffen], + [0x80000000n, -2n, -0x100000000n], + [0x80000001n, -2n, -0x100000002n], + [0xfffffffen, -2n, -0x1fffffffcn], + [0xffffffffn, -2n, -0x1fffffffen], + [0x100000000n, -2n, -0x200000000n], + [0x100000001n, -2n, -0x200000002n], + [0x7ffffffffffffffen, -2n, -0xfffffffffffffffcn], + [0x7fffffffffffffffn, -2n, -0xfffffffffffffffen], + [0x8000000000000000n, -2n, -0x10000000000000000n], + [0x8000000000000001n, -2n, -0x10000000000000002n], + [0xfffffffffffffffen, -2n, -0x1fffffffffffffffcn], + [0xffffffffffffffffn, -2n, -0x1fffffffffffffffen], + [0x10000000000000000n, -2n, -0x20000000000000000n], + [0x10000000000000001n, -2n, -0x20000000000000002n], + [-0x10000000000000001n, -1n, 0x10000000000000001n], + [-0x10000000000000000n, -1n, 0x10000000000000000n], + [-0xffffffffffffffffn, -1n, 0xffffffffffffffffn], + [-0xfffffffffffffffen, -1n, 0xfffffffffffffffen], + [-0x8000000000000001n, -1n, 0x8000000000000001n], + [-0x8000000000000000n, -1n, 0x8000000000000000n], + [-0x7fffffffffffffffn, -1n, 0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -1n, 0x7ffffffffffffffen], + [-0x100000001n, -1n, 0x100000001n], + [-0x100000000n, -1n, 0x100000000n], + [-0xffffffffn, -1n, 0xffffffffn], + [-0xfffffffen, -1n, 0xfffffffen], + [-0x80000001n, -1n, 0x80000001n], + [-0x80000000n, -1n, 0x80000000n], + [-0x7fffffffn, -1n, 0x7fffffffn], + [-0x7ffffffen, -1n, 0x7ffffffen], + [-0x10001n, -1n, 0x10001n], + [-0x10000n, -1n, 0x10000n], + [-0xffffn, -1n, 0xffffn], + [-0xfffen, -1n, 0xfffen], + [-0x8001n, -1n, 0x8001n], + [-0x8000n, -1n, 0x8000n], + [-0x7fffn, -1n, 0x7fffn], + [-0x7ffen, -1n, 0x7ffen], + [-1n, -1n, 1n], + [0n, -1n, 0n], + [1n, -1n, -1n], + [2n, -1n, -2n], + [0x7ffen, -1n, -0x7ffen], + [0x7fffn, -1n, -0x7fffn], + [0x8000n, -1n, -0x8000n], + [0x8001n, -1n, -0x8001n], + [0xfffen, -1n, -0xfffen], + [0xffffn, -1n, -0xffffn], + [0x10000n, -1n, -0x10000n], + [0x10001n, -1n, -0x10001n], + [0x7ffffffen, -1n, -0x7ffffffen], + [0x7fffffffn, -1n, -0x7fffffffn], + [0x80000000n, -1n, -0x80000000n], + [0x80000001n, -1n, -0x80000001n], + [0xfffffffen, -1n, -0xfffffffen], + [0xffffffffn, -1n, -0xffffffffn], + [0x100000000n, -1n, -0x100000000n], + [0x100000001n, -1n, -0x100000001n], + [0x7ffffffffffffffen, -1n, -0x7ffffffffffffffen], + [0x7fffffffffffffffn, -1n, -0x7fffffffffffffffn], + [0x8000000000000000n, -1n, -0x8000000000000000n], + [0x8000000000000001n, -1n, -0x8000000000000001n], + [0xfffffffffffffffen, -1n, -0xfffffffffffffffen], + [0xffffffffffffffffn, -1n, -0xffffffffffffffffn], + [0x10000000000000000n, -1n, -0x10000000000000000n], + [0x10000000000000001n, -1n, -0x10000000000000001n], + [-0x10000000000000001n, 0n, 0n], + [-0x10000000000000000n, 0n, 0n], + [-0xffffffffffffffffn, 0n, 0n], + [-0xfffffffffffffffen, 0n, 0n], + [-0x8000000000000001n, 0n, 0n], + [-0x8000000000000000n, 0n, 0n], + [-0x7fffffffffffffffn, 0n, 0n], + [-0x7ffffffffffffffen, 0n, 0n], + [-0x100000001n, 0n, 0n], + [-0x100000000n, 0n, 0n], + [-0xffffffffn, 0n, 0n], + [-0xfffffffen, 0n, 0n], + [-0x80000001n, 0n, 0n], + [-0x80000000n, 0n, 0n], + [-0x7fffffffn, 0n, 0n], + [-0x7ffffffen, 0n, 0n], + [-0x10001n, 0n, 0n], + [-0x10000n, 0n, 0n], + [-0xffffn, 0n, 0n], + [-0xfffen, 0n, 0n], + [-0x8001n, 0n, 0n], + [-0x8000n, 0n, 0n], + [-0x7fffn, 0n, 0n], + [-0x7ffen, 0n, 0n], + [0n, 0n, 0n], + [1n, 0n, 0n], + [2n, 0n, 0n], + [0x7ffen, 0n, 0n], + [0x7fffn, 0n, 0n], + [0x8000n, 0n, 0n], + [0x8001n, 0n, 0n], + [0xfffen, 0n, 0n], + [0xffffn, 0n, 0n], + [0x10000n, 0n, 0n], + [0x10001n, 0n, 0n], + [0x7ffffffen, 0n, 0n], + [0x7fffffffn, 0n, 0n], + [0x80000000n, 0n, 0n], + [0x80000001n, 0n, 0n], + [0xfffffffen, 0n, 0n], + [0xffffffffn, 0n, 0n], + [0x100000000n, 0n, 0n], + [0x100000001n, 0n, 0n], + [0x7ffffffffffffffen, 0n, 0n], + [0x7fffffffffffffffn, 0n, 0n], + [0x8000000000000000n, 0n, 0n], + [0x8000000000000001n, 0n, 0n], + [0xfffffffffffffffen, 0n, 0n], + [0xffffffffffffffffn, 0n, 0n], + [0x10000000000000000n, 0n, 0n], + [0x10000000000000001n, 0n, 0n], + [-0x10000000000000001n, 1n, -0x10000000000000001n], + [-0x10000000000000000n, 1n, -0x10000000000000000n], + [-0xffffffffffffffffn, 1n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 1n, -0xfffffffffffffffen], + [-0x8000000000000001n, 1n, -0x8000000000000001n], + [-0x8000000000000000n, 1n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 1n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 1n, -0x7ffffffffffffffen], + [-0x100000001n, 1n, -0x100000001n], + [-0x100000000n, 1n, -0x100000000n], + [-0xffffffffn, 1n, -0xffffffffn], + [-0xfffffffen, 1n, -0xfffffffen], + [-0x80000001n, 1n, -0x80000001n], + [-0x80000000n, 1n, -0x80000000n], + [-0x7fffffffn, 1n, -0x7fffffffn], + [-0x7ffffffen, 1n, -0x7ffffffen], + [-0x10001n, 1n, -0x10001n], + [-0x10000n, 1n, -0x10000n], + [-0xffffn, 1n, -0xffffn], + [-0xfffen, 1n, -0xfffen], + [-0x8001n, 1n, -0x8001n], + [-0x8000n, 1n, -0x8000n], + [-0x7fffn, 1n, -0x7fffn], + [-0x7ffen, 1n, -0x7ffen], + [1n, 1n, 1n], + [2n, 1n, 2n], + [0x7ffen, 1n, 0x7ffen], + [0x7fffn, 1n, 0x7fffn], + [0x8000n, 1n, 0x8000n], + [0x8001n, 1n, 0x8001n], + [0xfffen, 1n, 0xfffen], + [0xffffn, 1n, 0xffffn], + [0x10000n, 1n, 0x10000n], + [0x10001n, 1n, 0x10001n], + [0x7ffffffen, 1n, 0x7ffffffen], + [0x7fffffffn, 1n, 0x7fffffffn], + [0x80000000n, 1n, 0x80000000n], + [0x80000001n, 1n, 0x80000001n], + [0xfffffffen, 1n, 0xfffffffen], + [0xffffffffn, 1n, 0xffffffffn], + [0x100000000n, 1n, 0x100000000n], + [0x100000001n, 1n, 0x100000001n], + [0x7ffffffffffffffen, 1n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 1n, 0x7fffffffffffffffn], + [0x8000000000000000n, 1n, 0x8000000000000000n], + [0x8000000000000001n, 1n, 0x8000000000000001n], + [0xfffffffffffffffen, 1n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 1n, 0xffffffffffffffffn], + [0x10000000000000000n, 1n, 0x10000000000000000n], + [0x10000000000000001n, 1n, 0x10000000000000001n], + [-0x10000000000000001n, 2n, -0x20000000000000002n], + [-0x10000000000000000n, 2n, -0x20000000000000000n], + [-0xffffffffffffffffn, 2n, -0x1fffffffffffffffen], + [-0xfffffffffffffffen, 2n, -0x1fffffffffffffffcn], + [-0x8000000000000001n, 2n, -0x10000000000000002n], + [-0x8000000000000000n, 2n, -0x10000000000000000n], + [-0x7fffffffffffffffn, 2n, -0xfffffffffffffffen], + [-0x7ffffffffffffffen, 2n, -0xfffffffffffffffcn], + [-0x100000001n, 2n, -0x200000002n], + [-0x100000000n, 2n, -0x200000000n], + [-0xffffffffn, 2n, -0x1fffffffen], + [-0xfffffffen, 2n, -0x1fffffffcn], + [-0x80000001n, 2n, -0x100000002n], + [-0x80000000n, 2n, -0x100000000n], + [-0x7fffffffn, 2n, -0xfffffffen], + [-0x7ffffffen, 2n, -0xfffffffcn], + [-0x10001n, 2n, -0x20002n], + [-0x10000n, 2n, -0x20000n], + [-0xffffn, 2n, -0x1fffen], + [-0xfffen, 2n, -0x1fffcn], + [-0x8001n, 2n, -0x10002n], + [-0x8000n, 2n, -0x10000n], + [-0x7fffn, 2n, -0xfffen], + [-0x7ffen, 2n, -0xfffcn], + [2n, 2n, 4n], + [0x7ffen, 2n, 0xfffcn], + [0x7fffn, 2n, 0xfffen], + [0x8000n, 2n, 0x10000n], + [0x8001n, 2n, 0x10002n], + [0xfffen, 2n, 0x1fffcn], + [0xffffn, 2n, 0x1fffen], + [0x10000n, 2n, 0x20000n], + [0x10001n, 2n, 0x20002n], + [0x7ffffffen, 2n, 0xfffffffcn], + [0x7fffffffn, 2n, 0xfffffffen], + [0x80000000n, 2n, 0x100000000n], + [0x80000001n, 2n, 0x100000002n], + [0xfffffffen, 2n, 0x1fffffffcn], + [0xffffffffn, 2n, 0x1fffffffen], + [0x100000000n, 2n, 0x200000000n], + [0x100000001n, 2n, 0x200000002n], + [0x7ffffffffffffffen, 2n, 0xfffffffffffffffcn], + [0x7fffffffffffffffn, 2n, 0xfffffffffffffffen], + [0x8000000000000000n, 2n, 0x10000000000000000n], + [0x8000000000000001n, 2n, 0x10000000000000002n], + [0xfffffffffffffffen, 2n, 0x1fffffffffffffffcn], + [0xffffffffffffffffn, 2n, 0x1fffffffffffffffen], + [0x10000000000000000n, 2n, 0x20000000000000000n], + [0x10000000000000001n, 2n, 0x20000000000000002n], + [-0x10000000000000001n, 0x7ffen, -0x7ffe0000000000007ffen], + [-0x10000000000000000n, 0x7ffen, -0x7ffe0000000000000000n], + [-0xffffffffffffffffn, 0x7ffen, -0x7ffdffffffffffff8002n], + [-0xfffffffffffffffen, 0x7ffen, -0x7ffdffffffffffff0004n], + [-0x8000000000000001n, 0x7ffen, -0x3fff0000000000007ffen], + [-0x8000000000000000n, 0x7ffen, -0x3fff0000000000000000n], + [-0x7fffffffffffffffn, 0x7ffen, -0x3ffeffffffffffff8002n], + [-0x7ffffffffffffffen, 0x7ffen, -0x3ffeffffffffffff0004n], + [-0x100000001n, 0x7ffen, -0x7ffe00007ffen], + [-0x100000000n, 0x7ffen, -0x7ffe00000000n], + [-0xffffffffn, 0x7ffen, -0x7ffdffff8002n], + [-0xfffffffen, 0x7ffen, -0x7ffdffff0004n], + [-0x80000001n, 0x7ffen, -0x3fff00007ffen], + [-0x80000000n, 0x7ffen, -0x3fff00000000n], + [-0x7fffffffn, 0x7ffen, -0x3ffeffff8002n], + [-0x7ffffffen, 0x7ffen, -0x3ffeffff0004n], + [-0x10001n, 0x7ffen, -0x7ffe7ffen], + [-0x10000n, 0x7ffen, -0x7ffe0000n], + [-0xffffn, 0x7ffen, -0x7ffd8002n], + [-0xfffen, 0x7ffen, -0x7ffd0004n], + [-0x8001n, 0x7ffen, -0x3fff7ffen], + [-0x8000n, 0x7ffen, -0x3fff0000n], + [-0x7fffn, 0x7ffen, -0x3ffe8002n], + [-0x7ffen, 0x7ffen, -0x3ffe0004n], + [0x7ffen, 0x7ffen, 0x3ffe0004n], + [0x7fffn, 0x7ffen, 0x3ffe8002n], + [0x8000n, 0x7ffen, 0x3fff0000n], + [0x8001n, 0x7ffen, 0x3fff7ffen], + [0xfffen, 0x7ffen, 0x7ffd0004n], + [0xffffn, 0x7ffen, 0x7ffd8002n], + [0x10000n, 0x7ffen, 0x7ffe0000n], + [0x10001n, 0x7ffen, 0x7ffe7ffen], + [0x7ffffffen, 0x7ffen, 0x3ffeffff0004n], + [0x7fffffffn, 0x7ffen, 0x3ffeffff8002n], + [0x80000000n, 0x7ffen, 0x3fff00000000n], + [0x80000001n, 0x7ffen, 0x3fff00007ffen], + [0xfffffffen, 0x7ffen, 0x7ffdffff0004n], + [0xffffffffn, 0x7ffen, 0x7ffdffff8002n], + [0x100000000n, 0x7ffen, 0x7ffe00000000n], + [0x100000001n, 0x7ffen, 0x7ffe00007ffen], + [0x7ffffffffffffffen, 0x7ffen, 0x3ffeffffffffffff0004n], + [0x7fffffffffffffffn, 0x7ffen, 0x3ffeffffffffffff8002n], + [0x8000000000000000n, 0x7ffen, 0x3fff0000000000000000n], + [0x8000000000000001n, 0x7ffen, 0x3fff0000000000007ffen], + [0xfffffffffffffffen, 0x7ffen, 0x7ffdffffffffffff0004n], + [0xffffffffffffffffn, 0x7ffen, 0x7ffdffffffffffff8002n], + [0x10000000000000000n, 0x7ffen, 0x7ffe0000000000000000n], + [0x10000000000000001n, 0x7ffen, 0x7ffe0000000000007ffen], + [-0x10000000000000001n, 0x7fffn, -0x7fff0000000000007fffn], + [-0x10000000000000000n, 0x7fffn, -0x7fff0000000000000000n], + [-0xffffffffffffffffn, 0x7fffn, -0x7ffeffffffffffff8001n], + [-0xfffffffffffffffen, 0x7fffn, -0x7ffeffffffffffff0002n], + [-0x8000000000000001n, 0x7fffn, -0x3fff8000000000007fffn], + [-0x8000000000000000n, 0x7fffn, -0x3fff8000000000000000n], + [-0x7fffffffffffffffn, 0x7fffn, -0x3fff7fffffffffff8001n], + [-0x7ffffffffffffffen, 0x7fffn, -0x3fff7fffffffffff0002n], + [-0x100000001n, 0x7fffn, -0x7fff00007fffn], + [-0x100000000n, 0x7fffn, -0x7fff00000000n], + [-0xffffffffn, 0x7fffn, -0x7ffeffff8001n], + [-0xfffffffen, 0x7fffn, -0x7ffeffff0002n], + [-0x80000001n, 0x7fffn, -0x3fff80007fffn], + [-0x80000000n, 0x7fffn, -0x3fff80000000n], + [-0x7fffffffn, 0x7fffn, -0x3fff7fff8001n], + [-0x7ffffffen, 0x7fffn, -0x3fff7fff0002n], + [-0x10001n, 0x7fffn, -0x7fff7fffn], + [-0x10000n, 0x7fffn, -0x7fff0000n], + [-0xffffn, 0x7fffn, -0x7ffe8001n], + [-0xfffen, 0x7fffn, -0x7ffe0002n], + [-0x8001n, 0x7fffn, -0x3fffffffn], + [-0x8000n, 0x7fffn, -0x3fff8000n], + [-0x7fffn, 0x7fffn, -0x3fff0001n], + [-0x7ffen, 0x7fffn, -0x3ffe8002n], + [0x7fffn, 0x7fffn, 0x3fff0001n], + [0x8000n, 0x7fffn, 0x3fff8000n], + [0x8001n, 0x7fffn, 0x3fffffffn], + [0xfffen, 0x7fffn, 0x7ffe0002n], + [0xffffn, 0x7fffn, 0x7ffe8001n], + [0x10000n, 0x7fffn, 0x7fff0000n], + [0x10001n, 0x7fffn, 0x7fff7fffn], + [0x7ffffffen, 0x7fffn, 0x3fff7fff0002n], + [0x7fffffffn, 0x7fffn, 0x3fff7fff8001n], + [0x80000000n, 0x7fffn, 0x3fff80000000n], + [0x80000001n, 0x7fffn, 0x3fff80007fffn], + [0xfffffffen, 0x7fffn, 0x7ffeffff0002n], + [0xffffffffn, 0x7fffn, 0x7ffeffff8001n], + [0x100000000n, 0x7fffn, 0x7fff00000000n], + [0x100000001n, 0x7fffn, 0x7fff00007fffn], + [0x7ffffffffffffffen, 0x7fffn, 0x3fff7fffffffffff0002n], + [0x7fffffffffffffffn, 0x7fffn, 0x3fff7fffffffffff8001n], + [0x8000000000000000n, 0x7fffn, 0x3fff8000000000000000n], + [0x8000000000000001n, 0x7fffn, 0x3fff8000000000007fffn], + [0xfffffffffffffffen, 0x7fffn, 0x7ffeffffffffffff0002n], + [0xffffffffffffffffn, 0x7fffn, 0x7ffeffffffffffff8001n], + [0x10000000000000000n, 0x7fffn, 0x7fff0000000000000000n], + [0x10000000000000001n, 0x7fffn, 0x7fff0000000000007fffn], + [-0x10000000000000001n, 0x8000n, -0x80000000000000008000n], + [-0x10000000000000000n, 0x8000n, -0x80000000000000000000n], + [-0xffffffffffffffffn, 0x8000n, -0x7fffffffffffffff8000n], + [-0xfffffffffffffffen, 0x8000n, -0x7fffffffffffffff0000n], + [-0x8000000000000001n, 0x8000n, -0x40000000000000008000n], + [-0x8000000000000000n, 0x8000n, -0x40000000000000000000n], + [-0x7fffffffffffffffn, 0x8000n, -0x3fffffffffffffff8000n], + [-0x7ffffffffffffffen, 0x8000n, -0x3fffffffffffffff0000n], + [-0x100000001n, 0x8000n, -0x800000008000n], + [-0x100000000n, 0x8000n, -0x800000000000n], + [-0xffffffffn, 0x8000n, -0x7fffffff8000n], + [-0xfffffffen, 0x8000n, -0x7fffffff0000n], + [-0x80000001n, 0x8000n, -0x400000008000n], + [-0x80000000n, 0x8000n, -0x400000000000n], + [-0x7fffffffn, 0x8000n, -0x3fffffff8000n], + [-0x7ffffffen, 0x8000n, -0x3fffffff0000n], + [-0x10001n, 0x8000n, -0x80008000n], + [-0x10000n, 0x8000n, -0x80000000n], + [-0xffffn, 0x8000n, -0x7fff8000n], + [-0xfffen, 0x8000n, -0x7fff0000n], + [-0x8001n, 0x8000n, -0x40008000n], + [-0x8000n, 0x8000n, -0x40000000n], + [-0x7fffn, 0x8000n, -0x3fff8000n], + [-0x7ffen, 0x8000n, -0x3fff0000n], + [0x8000n, 0x8000n, 0x40000000n], + [0x8001n, 0x8000n, 0x40008000n], + [0xfffen, 0x8000n, 0x7fff0000n], + [0xffffn, 0x8000n, 0x7fff8000n], + [0x10000n, 0x8000n, 0x80000000n], + [0x10001n, 0x8000n, 0x80008000n], + [0x7ffffffen, 0x8000n, 0x3fffffff0000n], + [0x7fffffffn, 0x8000n, 0x3fffffff8000n], + [0x80000000n, 0x8000n, 0x400000000000n], + [0x80000001n, 0x8000n, 0x400000008000n], + [0xfffffffen, 0x8000n, 0x7fffffff0000n], + [0xffffffffn, 0x8000n, 0x7fffffff8000n], + [0x100000000n, 0x8000n, 0x800000000000n], + [0x100000001n, 0x8000n, 0x800000008000n], + [0x7ffffffffffffffen, 0x8000n, 0x3fffffffffffffff0000n], + [0x7fffffffffffffffn, 0x8000n, 0x3fffffffffffffff8000n], + [0x8000000000000000n, 0x8000n, 0x40000000000000000000n], + [0x8000000000000001n, 0x8000n, 0x40000000000000008000n], + [0xfffffffffffffffen, 0x8000n, 0x7fffffffffffffff0000n], + [0xffffffffffffffffn, 0x8000n, 0x7fffffffffffffff8000n], + [0x10000000000000000n, 0x8000n, 0x80000000000000000000n], + [0x10000000000000001n, 0x8000n, 0x80000000000000008000n], + [-0x10000000000000001n, 0x8001n, -0x80010000000000008001n], + [-0x10000000000000000n, 0x8001n, -0x80010000000000000000n], + [-0xffffffffffffffffn, 0x8001n, -0x8000ffffffffffff7fffn], + [-0xfffffffffffffffen, 0x8001n, -0x8000fffffffffffefffen], + [-0x8000000000000001n, 0x8001n, -0x40008000000000008001n], + [-0x8000000000000000n, 0x8001n, -0x40008000000000000000n], + [-0x7fffffffffffffffn, 0x8001n, -0x40007fffffffffff7fffn], + [-0x7ffffffffffffffen, 0x8001n, -0x40007ffffffffffefffen], + [-0x100000001n, 0x8001n, -0x800100008001n], + [-0x100000000n, 0x8001n, -0x800100000000n], + [-0xffffffffn, 0x8001n, -0x8000ffff7fffn], + [-0xfffffffen, 0x8001n, -0x8000fffefffen], + [-0x80000001n, 0x8001n, -0x400080008001n], + [-0x80000000n, 0x8001n, -0x400080000000n], + [-0x7fffffffn, 0x8001n, -0x40007fff7fffn], + [-0x7ffffffen, 0x8001n, -0x40007ffefffen], + [-0x10001n, 0x8001n, -0x80018001n], + [-0x10000n, 0x8001n, -0x80010000n], + [-0xffffn, 0x8001n, -0x80007fffn], + [-0xfffen, 0x8001n, -0x7ffffffen], + [-0x8001n, 0x8001n, -0x40010001n], + [-0x8000n, 0x8001n, -0x40008000n], + [-0x7fffn, 0x8001n, -0x3fffffffn], + [-0x7ffen, 0x8001n, -0x3fff7ffen], + [0x8001n, 0x8001n, 0x40010001n], + [0xfffen, 0x8001n, 0x7ffffffen], + [0xffffn, 0x8001n, 0x80007fffn], + [0x10000n, 0x8001n, 0x80010000n], + [0x10001n, 0x8001n, 0x80018001n], + [0x7ffffffen, 0x8001n, 0x40007ffefffen], + [0x7fffffffn, 0x8001n, 0x40007fff7fffn], + [0x80000000n, 0x8001n, 0x400080000000n], + [0x80000001n, 0x8001n, 0x400080008001n], + [0xfffffffen, 0x8001n, 0x8000fffefffen], + [0xffffffffn, 0x8001n, 0x8000ffff7fffn], + [0x100000000n, 0x8001n, 0x800100000000n], + [0x100000001n, 0x8001n, 0x800100008001n], + [0x7ffffffffffffffen, 0x8001n, 0x40007ffffffffffefffen], + [0x7fffffffffffffffn, 0x8001n, 0x40007fffffffffff7fffn], + [0x8000000000000000n, 0x8001n, 0x40008000000000000000n], + [0x8000000000000001n, 0x8001n, 0x40008000000000008001n], + [0xfffffffffffffffen, 0x8001n, 0x8000fffffffffffefffen], + [0xffffffffffffffffn, 0x8001n, 0x8000ffffffffffff7fffn], + [0x10000000000000000n, 0x8001n, 0x80010000000000000000n], + [0x10000000000000001n, 0x8001n, 0x80010000000000008001n], + [-0x10000000000000001n, -0x8001n, 0x80010000000000008001n], + [-0x10000000000000000n, -0x8001n, 0x80010000000000000000n], + [-0xffffffffffffffffn, -0x8001n, 0x8000ffffffffffff7fffn], + [-0xfffffffffffffffen, -0x8001n, 0x8000fffffffffffefffen], + [-0x8000000000000001n, -0x8001n, 0x40008000000000008001n], + [-0x8000000000000000n, -0x8001n, 0x40008000000000000000n], + [-0x7fffffffffffffffn, -0x8001n, 0x40007fffffffffff7fffn], + [-0x7ffffffffffffffen, -0x8001n, 0x40007ffffffffffefffen], + [-0x100000001n, -0x8001n, 0x800100008001n], + [-0x100000000n, -0x8001n, 0x800100000000n], + [-0xffffffffn, -0x8001n, 0x8000ffff7fffn], + [-0xfffffffen, -0x8001n, 0x8000fffefffen], + [-0x80000001n, -0x8001n, 0x400080008001n], + [-0x80000000n, -0x8001n, 0x400080000000n], + [-0x7fffffffn, -0x8001n, 0x40007fff7fffn], + [-0x7ffffffen, -0x8001n, 0x40007ffefffen], + [-0x10001n, -0x8001n, 0x80018001n], + [-0x10000n, -0x8001n, 0x80010000n], + [-0xffffn, -0x8001n, 0x80007fffn], + [-0xfffen, -0x8001n, 0x7ffffffen], + [-0x8001n, -0x8001n, 0x40010001n], + [-0x8000n, -0x8001n, 0x40008000n], + [-0x7fffn, -0x8001n, 0x3fffffffn], + [-0x7ffen, -0x8001n, 0x3fff7ffen], + [0xfffen, -0x8001n, -0x7ffffffen], + [0xffffn, -0x8001n, -0x80007fffn], + [0x10000n, -0x8001n, -0x80010000n], + [0x10001n, -0x8001n, -0x80018001n], + [0x7ffffffen, -0x8001n, -0x40007ffefffen], + [0x7fffffffn, -0x8001n, -0x40007fff7fffn], + [0x80000000n, -0x8001n, -0x400080000000n], + [0x80000001n, -0x8001n, -0x400080008001n], + [0xfffffffen, -0x8001n, -0x8000fffefffen], + [0xffffffffn, -0x8001n, -0x8000ffff7fffn], + [0x100000000n, -0x8001n, -0x800100000000n], + [0x100000001n, -0x8001n, -0x800100008001n], + [0x7ffffffffffffffen, -0x8001n, -0x40007ffffffffffefffen], + [0x7fffffffffffffffn, -0x8001n, -0x40007fffffffffff7fffn], + [0x8000000000000000n, -0x8001n, -0x40008000000000000000n], + [0x8000000000000001n, -0x8001n, -0x40008000000000008001n], + [0xfffffffffffffffen, -0x8001n, -0x8000fffffffffffefffen], + [0xffffffffffffffffn, -0x8001n, -0x8000ffffffffffff7fffn], + [0x10000000000000000n, -0x8001n, -0x80010000000000000000n], + [0x10000000000000001n, -0x8001n, -0x80010000000000008001n], + [-0x10000000000000001n, -0x8000n, 0x80000000000000008000n], + [-0x10000000000000000n, -0x8000n, 0x80000000000000000000n], + [-0xffffffffffffffffn, -0x8000n, 0x7fffffffffffffff8000n], + [-0xfffffffffffffffen, -0x8000n, 0x7fffffffffffffff0000n], + [-0x8000000000000001n, -0x8000n, 0x40000000000000008000n], + [-0x8000000000000000n, -0x8000n, 0x40000000000000000000n], + [-0x7fffffffffffffffn, -0x8000n, 0x3fffffffffffffff8000n], + [-0x7ffffffffffffffen, -0x8000n, 0x3fffffffffffffff0000n], + [-0x100000001n, -0x8000n, 0x800000008000n], + [-0x100000000n, -0x8000n, 0x800000000000n], + [-0xffffffffn, -0x8000n, 0x7fffffff8000n], + [-0xfffffffen, -0x8000n, 0x7fffffff0000n], + [-0x80000001n, -0x8000n, 0x400000008000n], + [-0x80000000n, -0x8000n, 0x400000000000n], + [-0x7fffffffn, -0x8000n, 0x3fffffff8000n], + [-0x7ffffffen, -0x8000n, 0x3fffffff0000n], + [-0x10001n, -0x8000n, 0x80008000n], + [-0x10000n, -0x8000n, 0x80000000n], + [-0xffffn, -0x8000n, 0x7fff8000n], + [-0xfffen, -0x8000n, 0x7fff0000n], + [-0x8000n, -0x8000n, 0x40000000n], + [-0x7fffn, -0x8000n, 0x3fff8000n], + [-0x7ffen, -0x8000n, 0x3fff0000n], + [0xfffen, -0x8000n, -0x7fff0000n], + [0xffffn, -0x8000n, -0x7fff8000n], + [0x10000n, -0x8000n, -0x80000000n], + [0x10001n, -0x8000n, -0x80008000n], + [0x7ffffffen, -0x8000n, -0x3fffffff0000n], + [0x7fffffffn, -0x8000n, -0x3fffffff8000n], + [0x80000000n, -0x8000n, -0x400000000000n], + [0x80000001n, -0x8000n, -0x400000008000n], + [0xfffffffen, -0x8000n, -0x7fffffff0000n], + [0xffffffffn, -0x8000n, -0x7fffffff8000n], + [0x100000000n, -0x8000n, -0x800000000000n], + [0x100000001n, -0x8000n, -0x800000008000n], + [0x7ffffffffffffffen, -0x8000n, -0x3fffffffffffffff0000n], + [0x7fffffffffffffffn, -0x8000n, -0x3fffffffffffffff8000n], + [0x8000000000000000n, -0x8000n, -0x40000000000000000000n], + [0x8000000000000001n, -0x8000n, -0x40000000000000008000n], + [0xfffffffffffffffen, -0x8000n, -0x7fffffffffffffff0000n], + [0xffffffffffffffffn, -0x8000n, -0x7fffffffffffffff8000n], + [0x10000000000000000n, -0x8000n, -0x80000000000000000000n], + [0x10000000000000001n, -0x8000n, -0x80000000000000008000n], + [-0x10000000000000001n, -0x7fffn, 0x7fff0000000000007fffn], + [-0x10000000000000000n, -0x7fffn, 0x7fff0000000000000000n], + [-0xffffffffffffffffn, -0x7fffn, 0x7ffeffffffffffff8001n], + [-0xfffffffffffffffen, -0x7fffn, 0x7ffeffffffffffff0002n], + [-0x8000000000000001n, -0x7fffn, 0x3fff8000000000007fffn], + [-0x8000000000000000n, -0x7fffn, 0x3fff8000000000000000n], + [-0x7fffffffffffffffn, -0x7fffn, 0x3fff7fffffffffff8001n], + [-0x7ffffffffffffffen, -0x7fffn, 0x3fff7fffffffffff0002n], + [-0x100000001n, -0x7fffn, 0x7fff00007fffn], + [-0x100000000n, -0x7fffn, 0x7fff00000000n], + [-0xffffffffn, -0x7fffn, 0x7ffeffff8001n], + [-0xfffffffen, -0x7fffn, 0x7ffeffff0002n], + [-0x80000001n, -0x7fffn, 0x3fff80007fffn], + [-0x80000000n, -0x7fffn, 0x3fff80000000n], + [-0x7fffffffn, -0x7fffn, 0x3fff7fff8001n], + [-0x7ffffffen, -0x7fffn, 0x3fff7fff0002n], + [-0x10001n, -0x7fffn, 0x7fff7fffn], + [-0x10000n, -0x7fffn, 0x7fff0000n], + [-0xffffn, -0x7fffn, 0x7ffe8001n], + [-0xfffen, -0x7fffn, 0x7ffe0002n], + [-0x7fffn, -0x7fffn, 0x3fff0001n], + [-0x7ffen, -0x7fffn, 0x3ffe8002n], + [0xfffen, -0x7fffn, -0x7ffe0002n], + [0xffffn, -0x7fffn, -0x7ffe8001n], + [0x10000n, -0x7fffn, -0x7fff0000n], + [0x10001n, -0x7fffn, -0x7fff7fffn], + [0x7ffffffen, -0x7fffn, -0x3fff7fff0002n], + [0x7fffffffn, -0x7fffn, -0x3fff7fff8001n], + [0x80000000n, -0x7fffn, -0x3fff80000000n], + [0x80000001n, -0x7fffn, -0x3fff80007fffn], + [0xfffffffen, -0x7fffn, -0x7ffeffff0002n], + [0xffffffffn, -0x7fffn, -0x7ffeffff8001n], + [0x100000000n, -0x7fffn, -0x7fff00000000n], + [0x100000001n, -0x7fffn, -0x7fff00007fffn], + [0x7ffffffffffffffen, -0x7fffn, -0x3fff7fffffffffff0002n], + [0x7fffffffffffffffn, -0x7fffn, -0x3fff7fffffffffff8001n], + [0x8000000000000000n, -0x7fffn, -0x3fff8000000000000000n], + [0x8000000000000001n, -0x7fffn, -0x3fff8000000000007fffn], + [0xfffffffffffffffen, -0x7fffn, -0x7ffeffffffffffff0002n], + [0xffffffffffffffffn, -0x7fffn, -0x7ffeffffffffffff8001n], + [0x10000000000000000n, -0x7fffn, -0x7fff0000000000000000n], + [0x10000000000000001n, -0x7fffn, -0x7fff0000000000007fffn], + [-0x10000000000000001n, -0x7ffen, 0x7ffe0000000000007ffen], + [-0x10000000000000000n, -0x7ffen, 0x7ffe0000000000000000n], + [-0xffffffffffffffffn, -0x7ffen, 0x7ffdffffffffffff8002n], + [-0xfffffffffffffffen, -0x7ffen, 0x7ffdffffffffffff0004n], + [-0x8000000000000001n, -0x7ffen, 0x3fff0000000000007ffen], + [-0x8000000000000000n, -0x7ffen, 0x3fff0000000000000000n], + [-0x7fffffffffffffffn, -0x7ffen, 0x3ffeffffffffffff8002n], + [-0x7ffffffffffffffen, -0x7ffen, 0x3ffeffffffffffff0004n], + [-0x100000001n, -0x7ffen, 0x7ffe00007ffen], + [-0x100000000n, -0x7ffen, 0x7ffe00000000n], + [-0xffffffffn, -0x7ffen, 0x7ffdffff8002n], + [-0xfffffffen, -0x7ffen, 0x7ffdffff0004n], + [-0x80000001n, -0x7ffen, 0x3fff00007ffen], + [-0x80000000n, -0x7ffen, 0x3fff00000000n], + [-0x7fffffffn, -0x7ffen, 0x3ffeffff8002n], + [-0x7ffffffen, -0x7ffen, 0x3ffeffff0004n], + [-0x10001n, -0x7ffen, 0x7ffe7ffen], + [-0x10000n, -0x7ffen, 0x7ffe0000n], + [-0xffffn, -0x7ffen, 0x7ffd8002n], + [-0xfffen, -0x7ffen, 0x7ffd0004n], + [-0x7ffen, -0x7ffen, 0x3ffe0004n], + [0xfffen, -0x7ffen, -0x7ffd0004n], + [0xffffn, -0x7ffen, -0x7ffd8002n], + [0x10000n, -0x7ffen, -0x7ffe0000n], + [0x10001n, -0x7ffen, -0x7ffe7ffen], + [0x7ffffffen, -0x7ffen, -0x3ffeffff0004n], + [0x7fffffffn, -0x7ffen, -0x3ffeffff8002n], + [0x80000000n, -0x7ffen, -0x3fff00000000n], + [0x80000001n, -0x7ffen, -0x3fff00007ffen], + [0xfffffffen, -0x7ffen, -0x7ffdffff0004n], + [0xffffffffn, -0x7ffen, -0x7ffdffff8002n], + [0x100000000n, -0x7ffen, -0x7ffe00000000n], + [0x100000001n, -0x7ffen, -0x7ffe00007ffen], + [0x7ffffffffffffffen, -0x7ffen, -0x3ffeffffffffffff0004n], + [0x7fffffffffffffffn, -0x7ffen, -0x3ffeffffffffffff8002n], + [0x8000000000000000n, -0x7ffen, -0x3fff0000000000000000n], + [0x8000000000000001n, -0x7ffen, -0x3fff0000000000007ffen], + [0xfffffffffffffffen, -0x7ffen, -0x7ffdffffffffffff0004n], + [0xffffffffffffffffn, -0x7ffen, -0x7ffdffffffffffff8002n], + [0x10000000000000000n, -0x7ffen, -0x7ffe0000000000000000n], + [0x10000000000000001n, -0x7ffen, -0x7ffe0000000000007ffen], + [-0x10000000000000001n, 0xfffen, -0xfffe000000000000fffen], + [-0x10000000000000000n, 0xfffen, -0xfffe0000000000000000n], + [-0xffffffffffffffffn, 0xfffen, -0xfffdffffffffffff0002n], + [-0xfffffffffffffffen, 0xfffen, -0xfffdfffffffffffe0004n], + [-0x8000000000000001n, 0xfffen, -0x7fff000000000000fffen], + [-0x8000000000000000n, 0xfffen, -0x7fff0000000000000000n], + [-0x7fffffffffffffffn, 0xfffen, -0x7ffeffffffffffff0002n], + [-0x7ffffffffffffffen, 0xfffen, -0x7ffefffffffffffe0004n], + [-0x100000001n, 0xfffen, -0xfffe0000fffen], + [-0x100000000n, 0xfffen, -0xfffe00000000n], + [-0xffffffffn, 0xfffen, -0xfffdffff0002n], + [-0xfffffffen, 0xfffen, -0xfffdfffe0004n], + [-0x80000001n, 0xfffen, -0x7fff0000fffen], + [-0x80000000n, 0xfffen, -0x7fff00000000n], + [-0x7fffffffn, 0xfffen, -0x7ffeffff0002n], + [-0x7ffffffen, 0xfffen, -0x7ffefffe0004n], + [-0x10001n, 0xfffen, -0xfffefffen], + [-0x10000n, 0xfffen, -0xfffe0000n], + [-0xffffn, 0xfffen, -0xfffd0002n], + [-0xfffen, 0xfffen, -0xfffc0004n], + [0xfffen, 0xfffen, 0xfffc0004n], + [0xffffn, 0xfffen, 0xfffd0002n], + [0x10000n, 0xfffen, 0xfffe0000n], + [0x10001n, 0xfffen, 0xfffefffen], + [0x7ffffffen, 0xfffen, 0x7ffefffe0004n], + [0x7fffffffn, 0xfffen, 0x7ffeffff0002n], + [0x80000000n, 0xfffen, 0x7fff00000000n], + [0x80000001n, 0xfffen, 0x7fff0000fffen], + [0xfffffffen, 0xfffen, 0xfffdfffe0004n], + [0xffffffffn, 0xfffen, 0xfffdffff0002n], + [0x100000000n, 0xfffen, 0xfffe00000000n], + [0x100000001n, 0xfffen, 0xfffe0000fffen], + [0x7ffffffffffffffen, 0xfffen, 0x7ffefffffffffffe0004n], + [0x7fffffffffffffffn, 0xfffen, 0x7ffeffffffffffff0002n], + [0x8000000000000000n, 0xfffen, 0x7fff0000000000000000n], + [0x8000000000000001n, 0xfffen, 0x7fff000000000000fffen], + [0xfffffffffffffffen, 0xfffen, 0xfffdfffffffffffe0004n], + [0xffffffffffffffffn, 0xfffen, 0xfffdffffffffffff0002n], + [0x10000000000000000n, 0xfffen, 0xfffe0000000000000000n], + [0x10000000000000001n, 0xfffen, 0xfffe000000000000fffen], + [-0x10000000000000001n, 0xffffn, -0xffff000000000000ffffn], + [-0x10000000000000000n, 0xffffn, -0xffff0000000000000000n], + [-0xffffffffffffffffn, 0xffffn, -0xfffeffffffffffff0001n], + [-0xfffffffffffffffen, 0xffffn, -0xfffefffffffffffe0002n], + [-0x8000000000000001n, 0xffffn, -0x7fff800000000000ffffn], + [-0x8000000000000000n, 0xffffn, -0x7fff8000000000000000n], + [-0x7fffffffffffffffn, 0xffffn, -0x7fff7fffffffffff0001n], + [-0x7ffffffffffffffen, 0xffffn, -0x7fff7ffffffffffe0002n], + [-0x100000001n, 0xffffn, -0xffff0000ffffn], + [-0x100000000n, 0xffffn, -0xffff00000000n], + [-0xffffffffn, 0xffffn, -0xfffeffff0001n], + [-0xfffffffen, 0xffffn, -0xfffefffe0002n], + [-0x80000001n, 0xffffn, -0x7fff8000ffffn], + [-0x80000000n, 0xffffn, -0x7fff80000000n], + [-0x7fffffffn, 0xffffn, -0x7fff7fff0001n], + [-0x7ffffffen, 0xffffn, -0x7fff7ffe0002n], + [-0x10001n, 0xffffn, -0xffffffffn], + [-0x10000n, 0xffffn, -0xffff0000n], + [-0xffffn, 0xffffn, -0xfffe0001n], + [-0xfffen, 0xffffn, -0xfffd0002n], + [0xffffn, 0xffffn, 0xfffe0001n], + [0x10000n, 0xffffn, 0xffff0000n], + [0x10001n, 0xffffn, 0xffffffffn], + [0x7ffffffen, 0xffffn, 0x7fff7ffe0002n], + [0x7fffffffn, 0xffffn, 0x7fff7fff0001n], + [0x80000000n, 0xffffn, 0x7fff80000000n], + [0x80000001n, 0xffffn, 0x7fff8000ffffn], + [0xfffffffen, 0xffffn, 0xfffefffe0002n], + [0xffffffffn, 0xffffn, 0xfffeffff0001n], + [0x100000000n, 0xffffn, 0xffff00000000n], + [0x100000001n, 0xffffn, 0xffff0000ffffn], + [0x7ffffffffffffffen, 0xffffn, 0x7fff7ffffffffffe0002n], + [0x7fffffffffffffffn, 0xffffn, 0x7fff7fffffffffff0001n], + [0x8000000000000000n, 0xffffn, 0x7fff8000000000000000n], + [0x8000000000000001n, 0xffffn, 0x7fff800000000000ffffn], + [0xfffffffffffffffen, 0xffffn, 0xfffefffffffffffe0002n], + [0xffffffffffffffffn, 0xffffn, 0xfffeffffffffffff0001n], + [0x10000000000000000n, 0xffffn, 0xffff0000000000000000n], + [0x10000000000000001n, 0xffffn, 0xffff000000000000ffffn], + [-0x10000000000000001n, 0x10000n, -0x100000000000000010000n], + [-0x10000000000000000n, 0x10000n, -0x100000000000000000000n], + [-0xffffffffffffffffn, 0x10000n, -0xffffffffffffffff0000n], + [-0xfffffffffffffffen, 0x10000n, -0xfffffffffffffffe0000n], + [-0x8000000000000001n, 0x10000n, -0x80000000000000010000n], + [-0x8000000000000000n, 0x10000n, -0x80000000000000000000n], + [-0x7fffffffffffffffn, 0x10000n, -0x7fffffffffffffff0000n], + [-0x7ffffffffffffffen, 0x10000n, -0x7ffffffffffffffe0000n], + [-0x100000001n, 0x10000n, -0x1000000010000n], + [-0x100000000n, 0x10000n, -0x1000000000000n], + [-0xffffffffn, 0x10000n, -0xffffffff0000n], + [-0xfffffffen, 0x10000n, -0xfffffffe0000n], + [-0x80000001n, 0x10000n, -0x800000010000n], + [-0x80000000n, 0x10000n, -0x800000000000n], + [-0x7fffffffn, 0x10000n, -0x7fffffff0000n], + [-0x7ffffffen, 0x10000n, -0x7ffffffe0000n], + [-0x10001n, 0x10000n, -0x100010000n], + [-0x10000n, 0x10000n, -0x100000000n], + [-0xffffn, 0x10000n, -0xffff0000n], + [-0xfffen, 0x10000n, -0xfffe0000n], + [0x10000n, 0x10000n, 0x100000000n], + [0x10001n, 0x10000n, 0x100010000n], + [0x7ffffffen, 0x10000n, 0x7ffffffe0000n], + [0x7fffffffn, 0x10000n, 0x7fffffff0000n], + [0x80000000n, 0x10000n, 0x800000000000n], + [0x80000001n, 0x10000n, 0x800000010000n], + [0xfffffffen, 0x10000n, 0xfffffffe0000n], + [0xffffffffn, 0x10000n, 0xffffffff0000n], + [0x100000000n, 0x10000n, 0x1000000000000n], + [0x100000001n, 0x10000n, 0x1000000010000n], + [0x7ffffffffffffffen, 0x10000n, 0x7ffffffffffffffe0000n], + [0x7fffffffffffffffn, 0x10000n, 0x7fffffffffffffff0000n], + [0x8000000000000000n, 0x10000n, 0x80000000000000000000n], + [0x8000000000000001n, 0x10000n, 0x80000000000000010000n], + [0xfffffffffffffffen, 0x10000n, 0xfffffffffffffffe0000n], + [0xffffffffffffffffn, 0x10000n, 0xffffffffffffffff0000n], + [0x10000000000000000n, 0x10000n, 0x100000000000000000000n], + [0x10000000000000001n, 0x10000n, 0x100000000000000010000n], + [-0x10000000000000001n, 0x10001n, -0x100010000000000010001n], + [-0x10000000000000000n, 0x10001n, -0x100010000000000000000n], + [-0xffffffffffffffffn, 0x10001n, -0x10000fffffffffffeffffn], + [-0xfffffffffffffffen, 0x10001n, -0x10000fffffffffffdfffen], + [-0x8000000000000001n, 0x10001n, -0x80008000000000010001n], + [-0x8000000000000000n, 0x10001n, -0x80008000000000000000n], + [-0x7fffffffffffffffn, 0x10001n, -0x80007ffffffffffeffffn], + [-0x7ffffffffffffffen, 0x10001n, -0x80007ffffffffffdfffen], + [-0x100000001n, 0x10001n, -0x1000100010001n], + [-0x100000000n, 0x10001n, -0x1000100000000n], + [-0xffffffffn, 0x10001n, -0x10000fffeffffn], + [-0xfffffffen, 0x10001n, -0x10000fffdfffen], + [-0x80000001n, 0x10001n, -0x800080010001n], + [-0x80000000n, 0x10001n, -0x800080000000n], + [-0x7fffffffn, 0x10001n, -0x80007ffeffffn], + [-0x7ffffffen, 0x10001n, -0x80007ffdfffen], + [-0x10001n, 0x10001n, -0x100020001n], + [-0x10000n, 0x10001n, -0x100010000n], + [-0xffffn, 0x10001n, -0xffffffffn], + [-0xfffen, 0x10001n, -0xfffefffen], + [0x10001n, 0x10001n, 0x100020001n], + [0x7ffffffen, 0x10001n, 0x80007ffdfffen], + [0x7fffffffn, 0x10001n, 0x80007ffeffffn], + [0x80000000n, 0x10001n, 0x800080000000n], + [0x80000001n, 0x10001n, 0x800080010001n], + [0xfffffffen, 0x10001n, 0x10000fffdfffen], + [0xffffffffn, 0x10001n, 0x10000fffeffffn], + [0x100000000n, 0x10001n, 0x1000100000000n], + [0x100000001n, 0x10001n, 0x1000100010001n], + [0x7ffffffffffffffen, 0x10001n, 0x80007ffffffffffdfffen], + [0x7fffffffffffffffn, 0x10001n, 0x80007ffffffffffeffffn], + [0x8000000000000000n, 0x10001n, 0x80008000000000000000n], + [0x8000000000000001n, 0x10001n, 0x80008000000000010001n], + [0xfffffffffffffffen, 0x10001n, 0x10000fffffffffffdfffen], + [0xffffffffffffffffn, 0x10001n, 0x10000fffffffffffeffffn], + [0x10000000000000000n, 0x10001n, 0x100010000000000000000n], + [0x10000000000000001n, 0x10001n, 0x100010000000000010001n], + [-0x10000000000000001n, -0x10001n, 0x100010000000000010001n], + [-0x10000000000000000n, -0x10001n, 0x100010000000000000000n], + [-0xffffffffffffffffn, -0x10001n, 0x10000fffffffffffeffffn], + [-0xfffffffffffffffen, -0x10001n, 0x10000fffffffffffdfffen], + [-0x8000000000000001n, -0x10001n, 0x80008000000000010001n], + [-0x8000000000000000n, -0x10001n, 0x80008000000000000000n], + [-0x7fffffffffffffffn, -0x10001n, 0x80007ffffffffffeffffn], + [-0x7ffffffffffffffen, -0x10001n, 0x80007ffffffffffdfffen], + [-0x100000001n, -0x10001n, 0x1000100010001n], + [-0x100000000n, -0x10001n, 0x1000100000000n], + [-0xffffffffn, -0x10001n, 0x10000fffeffffn], + [-0xfffffffen, -0x10001n, 0x10000fffdfffen], + [-0x80000001n, -0x10001n, 0x800080010001n], + [-0x80000000n, -0x10001n, 0x800080000000n], + [-0x7fffffffn, -0x10001n, 0x80007ffeffffn], + [-0x7ffffffen, -0x10001n, 0x80007ffdfffen], + [-0x10001n, -0x10001n, 0x100020001n], + [-0x10000n, -0x10001n, 0x100010000n], + [-0xffffn, -0x10001n, 0xffffffffn], + [-0xfffen, -0x10001n, 0xfffefffen], + [0x7ffffffen, -0x10001n, -0x80007ffdfffen], + [0x7fffffffn, -0x10001n, -0x80007ffeffffn], + [0x80000000n, -0x10001n, -0x800080000000n], + [0x80000001n, -0x10001n, -0x800080010001n], + [0xfffffffen, -0x10001n, -0x10000fffdfffen], + [0xffffffffn, -0x10001n, -0x10000fffeffffn], + [0x100000000n, -0x10001n, -0x1000100000000n], + [0x100000001n, -0x10001n, -0x1000100010001n], + [0x7ffffffffffffffen, -0x10001n, -0x80007ffffffffffdfffen], + [0x7fffffffffffffffn, -0x10001n, -0x80007ffffffffffeffffn], + [0x8000000000000000n, -0x10001n, -0x80008000000000000000n], + [0x8000000000000001n, -0x10001n, -0x80008000000000010001n], + [0xfffffffffffffffen, -0x10001n, -0x10000fffffffffffdfffen], + [0xffffffffffffffffn, -0x10001n, -0x10000fffffffffffeffffn], + [0x10000000000000000n, -0x10001n, -0x100010000000000000000n], + [0x10000000000000001n, -0x10001n, -0x100010000000000010001n], + [-0x10000000000000001n, -0x10000n, 0x100000000000000010000n], + [-0x10000000000000000n, -0x10000n, 0x100000000000000000000n], + [-0xffffffffffffffffn, -0x10000n, 0xffffffffffffffff0000n], + [-0xfffffffffffffffen, -0x10000n, 0xfffffffffffffffe0000n], + [-0x8000000000000001n, -0x10000n, 0x80000000000000010000n], + [-0x8000000000000000n, -0x10000n, 0x80000000000000000000n], + [-0x7fffffffffffffffn, -0x10000n, 0x7fffffffffffffff0000n], + [-0x7ffffffffffffffen, -0x10000n, 0x7ffffffffffffffe0000n], + [-0x100000001n, -0x10000n, 0x1000000010000n], + [-0x100000000n, -0x10000n, 0x1000000000000n], + [-0xffffffffn, -0x10000n, 0xffffffff0000n], + [-0xfffffffen, -0x10000n, 0xfffffffe0000n], + [-0x80000001n, -0x10000n, 0x800000010000n], + [-0x80000000n, -0x10000n, 0x800000000000n], + [-0x7fffffffn, -0x10000n, 0x7fffffff0000n], + [-0x7ffffffen, -0x10000n, 0x7ffffffe0000n], + [-0x10000n, -0x10000n, 0x100000000n], + [-0xffffn, -0x10000n, 0xffff0000n], + [-0xfffen, -0x10000n, 0xfffe0000n], + [0x7ffffffen, -0x10000n, -0x7ffffffe0000n], + [0x7fffffffn, -0x10000n, -0x7fffffff0000n], + [0x80000000n, -0x10000n, -0x800000000000n], + [0x80000001n, -0x10000n, -0x800000010000n], + [0xfffffffen, -0x10000n, -0xfffffffe0000n], + [0xffffffffn, -0x10000n, -0xffffffff0000n], + [0x100000000n, -0x10000n, -0x1000000000000n], + [0x100000001n, -0x10000n, -0x1000000010000n], + [0x7ffffffffffffffen, -0x10000n, -0x7ffffffffffffffe0000n], + [0x7fffffffffffffffn, -0x10000n, -0x7fffffffffffffff0000n], + [0x8000000000000000n, -0x10000n, -0x80000000000000000000n], + [0x8000000000000001n, -0x10000n, -0x80000000000000010000n], + [0xfffffffffffffffen, -0x10000n, -0xfffffffffffffffe0000n], + [0xffffffffffffffffn, -0x10000n, -0xffffffffffffffff0000n], + [0x10000000000000000n, -0x10000n, -0x100000000000000000000n], + [0x10000000000000001n, -0x10000n, -0x100000000000000010000n], + [-0x10000000000000001n, -0xffffn, 0xffff000000000000ffffn], + [-0x10000000000000000n, -0xffffn, 0xffff0000000000000000n], + [-0xffffffffffffffffn, -0xffffn, 0xfffeffffffffffff0001n], + [-0xfffffffffffffffen, -0xffffn, 0xfffefffffffffffe0002n], + [-0x8000000000000001n, -0xffffn, 0x7fff800000000000ffffn], + [-0x8000000000000000n, -0xffffn, 0x7fff8000000000000000n], + [-0x7fffffffffffffffn, -0xffffn, 0x7fff7fffffffffff0001n], + [-0x7ffffffffffffffen, -0xffffn, 0x7fff7ffffffffffe0002n], + [-0x100000001n, -0xffffn, 0xffff0000ffffn], + [-0x100000000n, -0xffffn, 0xffff00000000n], + [-0xffffffffn, -0xffffn, 0xfffeffff0001n], + [-0xfffffffen, -0xffffn, 0xfffefffe0002n], + [-0x80000001n, -0xffffn, 0x7fff8000ffffn], + [-0x80000000n, -0xffffn, 0x7fff80000000n], + [-0x7fffffffn, -0xffffn, 0x7fff7fff0001n], + [-0x7ffffffen, -0xffffn, 0x7fff7ffe0002n], + [-0xffffn, -0xffffn, 0xfffe0001n], + [-0xfffen, -0xffffn, 0xfffd0002n], + [0x7ffffffen, -0xffffn, -0x7fff7ffe0002n], + [0x7fffffffn, -0xffffn, -0x7fff7fff0001n], + [0x80000000n, -0xffffn, -0x7fff80000000n], + [0x80000001n, -0xffffn, -0x7fff8000ffffn], + [0xfffffffen, -0xffffn, -0xfffefffe0002n], + [0xffffffffn, -0xffffn, -0xfffeffff0001n], + [0x100000000n, -0xffffn, -0xffff00000000n], + [0x100000001n, -0xffffn, -0xffff0000ffffn], + [0x7ffffffffffffffen, -0xffffn, -0x7fff7ffffffffffe0002n], + [0x7fffffffffffffffn, -0xffffn, -0x7fff7fffffffffff0001n], + [0x8000000000000000n, -0xffffn, -0x7fff8000000000000000n], + [0x8000000000000001n, -0xffffn, -0x7fff800000000000ffffn], + [0xfffffffffffffffen, -0xffffn, -0xfffefffffffffffe0002n], + [0xffffffffffffffffn, -0xffffn, -0xfffeffffffffffff0001n], + [0x10000000000000000n, -0xffffn, -0xffff0000000000000000n], + [0x10000000000000001n, -0xffffn, -0xffff000000000000ffffn], + [-0x10000000000000001n, -0xfffen, 0xfffe000000000000fffen], + [-0x10000000000000000n, -0xfffen, 0xfffe0000000000000000n], + [-0xffffffffffffffffn, -0xfffen, 0xfffdffffffffffff0002n], + [-0xfffffffffffffffen, -0xfffen, 0xfffdfffffffffffe0004n], + [-0x8000000000000001n, -0xfffen, 0x7fff000000000000fffen], + [-0x8000000000000000n, -0xfffen, 0x7fff0000000000000000n], + [-0x7fffffffffffffffn, -0xfffen, 0x7ffeffffffffffff0002n], + [-0x7ffffffffffffffen, -0xfffen, 0x7ffefffffffffffe0004n], + [-0x100000001n, -0xfffen, 0xfffe0000fffen], + [-0x100000000n, -0xfffen, 0xfffe00000000n], + [-0xffffffffn, -0xfffen, 0xfffdffff0002n], + [-0xfffffffen, -0xfffen, 0xfffdfffe0004n], + [-0x80000001n, -0xfffen, 0x7fff0000fffen], + [-0x80000000n, -0xfffen, 0x7fff00000000n], + [-0x7fffffffn, -0xfffen, 0x7ffeffff0002n], + [-0x7ffffffen, -0xfffen, 0x7ffefffe0004n], + [-0xfffen, -0xfffen, 0xfffc0004n], + [0x7ffffffen, -0xfffen, -0x7ffefffe0004n], + [0x7fffffffn, -0xfffen, -0x7ffeffff0002n], + [0x80000000n, -0xfffen, -0x7fff00000000n], + [0x80000001n, -0xfffen, -0x7fff0000fffen], + [0xfffffffen, -0xfffen, -0xfffdfffe0004n], + [0xffffffffn, -0xfffen, -0xfffdffff0002n], + [0x100000000n, -0xfffen, -0xfffe00000000n], + [0x100000001n, -0xfffen, -0xfffe0000fffen], + [0x7ffffffffffffffen, -0xfffen, -0x7ffefffffffffffe0004n], + [0x7fffffffffffffffn, -0xfffen, -0x7ffeffffffffffff0002n], + [0x8000000000000000n, -0xfffen, -0x7fff0000000000000000n], + [0x8000000000000001n, -0xfffen, -0x7fff000000000000fffen], + [0xfffffffffffffffen, -0xfffen, -0xfffdfffffffffffe0004n], + [0xffffffffffffffffn, -0xfffen, -0xfffdffffffffffff0002n], + [0x10000000000000000n, -0xfffen, -0xfffe0000000000000000n], + [0x10000000000000001n, -0xfffen, -0xfffe000000000000fffen], + [-0x10000000000000001n, 0x7ffffffen, -0x7ffffffe000000007ffffffen], + [-0x10000000000000000n, 0x7ffffffen, -0x7ffffffe0000000000000000n], + [-0xffffffffffffffffn, 0x7ffffffen, -0x7ffffffdffffffff80000002n], + [-0xfffffffffffffffen, 0x7ffffffen, -0x7ffffffdffffffff00000004n], + [-0x8000000000000001n, 0x7ffffffen, -0x3fffffff000000007ffffffen], + [-0x8000000000000000n, 0x7ffffffen, -0x3fffffff0000000000000000n], + [-0x7fffffffffffffffn, 0x7ffffffen, -0x3ffffffeffffffff80000002n], + [-0x7ffffffffffffffen, 0x7ffffffen, -0x3ffffffeffffffff00000004n], + [-0x100000001n, 0x7ffffffen, -0x7ffffffe7ffffffen], + [-0x100000000n, 0x7ffffffen, -0x7ffffffe00000000n], + [-0xffffffffn, 0x7ffffffen, -0x7ffffffd80000002n], + [-0xfffffffen, 0x7ffffffen, -0x7ffffffd00000004n], + [-0x80000001n, 0x7ffffffen, -0x3fffffff7ffffffen], + [-0x80000000n, 0x7ffffffen, -0x3fffffff00000000n], + [-0x7fffffffn, 0x7ffffffen, -0x3ffffffe80000002n], + [-0x7ffffffen, 0x7ffffffen, -0x3ffffffe00000004n], + [0x7ffffffen, 0x7ffffffen, 0x3ffffffe00000004n], + [0x7fffffffn, 0x7ffffffen, 0x3ffffffe80000002n], + [0x80000000n, 0x7ffffffen, 0x3fffffff00000000n], + [0x80000001n, 0x7ffffffen, 0x3fffffff7ffffffen], + [0xfffffffen, 0x7ffffffen, 0x7ffffffd00000004n], + [0xffffffffn, 0x7ffffffen, 0x7ffffffd80000002n], + [0x100000000n, 0x7ffffffen, 0x7ffffffe00000000n], + [0x100000001n, 0x7ffffffen, 0x7ffffffe7ffffffen], + [0x7ffffffffffffffen, 0x7ffffffen, 0x3ffffffeffffffff00000004n], + [0x7fffffffffffffffn, 0x7ffffffen, 0x3ffffffeffffffff80000002n], + [0x8000000000000000n, 0x7ffffffen, 0x3fffffff0000000000000000n], + [0x8000000000000001n, 0x7ffffffen, 0x3fffffff000000007ffffffen], + [0xfffffffffffffffen, 0x7ffffffen, 0x7ffffffdffffffff00000004n], + [0xffffffffffffffffn, 0x7ffffffen, 0x7ffffffdffffffff80000002n], + [0x10000000000000000n, 0x7ffffffen, 0x7ffffffe0000000000000000n], + [0x10000000000000001n, 0x7ffffffen, 0x7ffffffe000000007ffffffen], + [-0x10000000000000001n, 0x7fffffffn, -0x7fffffff000000007fffffffn], + [-0x10000000000000000n, 0x7fffffffn, -0x7fffffff0000000000000000n], + [-0xffffffffffffffffn, 0x7fffffffn, -0x7ffffffeffffffff80000001n], + [-0xfffffffffffffffen, 0x7fffffffn, -0x7ffffffeffffffff00000002n], + [-0x8000000000000001n, 0x7fffffffn, -0x3fffffff800000007fffffffn], + [-0x8000000000000000n, 0x7fffffffn, -0x3fffffff8000000000000000n], + [-0x7fffffffffffffffn, 0x7fffffffn, -0x3fffffff7fffffff80000001n], + [-0x7ffffffffffffffen, 0x7fffffffn, -0x3fffffff7fffffff00000002n], + [-0x100000001n, 0x7fffffffn, -0x7fffffff7fffffffn], + [-0x100000000n, 0x7fffffffn, -0x7fffffff00000000n], + [-0xffffffffn, 0x7fffffffn, -0x7ffffffe80000001n], + [-0xfffffffen, 0x7fffffffn, -0x7ffffffe00000002n], + [-0x80000001n, 0x7fffffffn, -0x3fffffffffffffffn], + [-0x80000000n, 0x7fffffffn, -0x3fffffff80000000n], + [-0x7fffffffn, 0x7fffffffn, -0x3fffffff00000001n], + [-0x7ffffffen, 0x7fffffffn, -0x3ffffffe80000002n], + [0x7fffffffn, 0x7fffffffn, 0x3fffffff00000001n], + [0x80000000n, 0x7fffffffn, 0x3fffffff80000000n], + [0x80000001n, 0x7fffffffn, 0x3fffffffffffffffn], + [0xfffffffen, 0x7fffffffn, 0x7ffffffe00000002n], + [0xffffffffn, 0x7fffffffn, 0x7ffffffe80000001n], + [0x100000000n, 0x7fffffffn, 0x7fffffff00000000n], + [0x100000001n, 0x7fffffffn, 0x7fffffff7fffffffn], + [0x7ffffffffffffffen, 0x7fffffffn, 0x3fffffff7fffffff00000002n], + [0x7fffffffffffffffn, 0x7fffffffn, 0x3fffffff7fffffff80000001n], + [0x8000000000000000n, 0x7fffffffn, 0x3fffffff8000000000000000n], + [0x8000000000000001n, 0x7fffffffn, 0x3fffffff800000007fffffffn], + [0xfffffffffffffffen, 0x7fffffffn, 0x7ffffffeffffffff00000002n], + [0xffffffffffffffffn, 0x7fffffffn, 0x7ffffffeffffffff80000001n], + [0x10000000000000000n, 0x7fffffffn, 0x7fffffff0000000000000000n], + [0x10000000000000001n, 0x7fffffffn, 0x7fffffff000000007fffffffn], + [-0x10000000000000001n, 0x80000000n, -0x800000000000000080000000n], + [-0x10000000000000000n, 0x80000000n, -0x800000000000000000000000n], + [-0xffffffffffffffffn, 0x80000000n, -0x7fffffffffffffff80000000n], + [-0xfffffffffffffffen, 0x80000000n, -0x7fffffffffffffff00000000n], + [-0x8000000000000001n, 0x80000000n, -0x400000000000000080000000n], + [-0x8000000000000000n, 0x80000000n, -0x400000000000000000000000n], + [-0x7fffffffffffffffn, 0x80000000n, -0x3fffffffffffffff80000000n], + [-0x7ffffffffffffffen, 0x80000000n, -0x3fffffffffffffff00000000n], + [-0x100000001n, 0x80000000n, -0x8000000080000000n], + [-0x100000000n, 0x80000000n, -0x8000000000000000n], + [-0xffffffffn, 0x80000000n, -0x7fffffff80000000n], + [-0xfffffffen, 0x80000000n, -0x7fffffff00000000n], + [-0x80000001n, 0x80000000n, -0x4000000080000000n], + [-0x80000000n, 0x80000000n, -0x4000000000000000n], + [-0x7fffffffn, 0x80000000n, -0x3fffffff80000000n], + [-0x7ffffffen, 0x80000000n, -0x3fffffff00000000n], + [0x80000000n, 0x80000000n, 0x4000000000000000n], + [0x80000001n, 0x80000000n, 0x4000000080000000n], + [0xfffffffen, 0x80000000n, 0x7fffffff00000000n], + [0xffffffffn, 0x80000000n, 0x7fffffff80000000n], + [0x100000000n, 0x80000000n, 0x8000000000000000n], + [0x100000001n, 0x80000000n, 0x8000000080000000n], + [0x7ffffffffffffffen, 0x80000000n, 0x3fffffffffffffff00000000n], + [0x7fffffffffffffffn, 0x80000000n, 0x3fffffffffffffff80000000n], + [0x8000000000000000n, 0x80000000n, 0x400000000000000000000000n], + [0x8000000000000001n, 0x80000000n, 0x400000000000000080000000n], + [0xfffffffffffffffen, 0x80000000n, 0x7fffffffffffffff00000000n], + [0xffffffffffffffffn, 0x80000000n, 0x7fffffffffffffff80000000n], + [0x10000000000000000n, 0x80000000n, 0x800000000000000000000000n], + [0x10000000000000001n, 0x80000000n, 0x800000000000000080000000n], + [-0x10000000000000001n, 0x80000001n, -0x800000010000000080000001n], + [-0x10000000000000000n, 0x80000001n, -0x800000010000000000000000n], + [-0xffffffffffffffffn, 0x80000001n, -0x80000000ffffffff7fffffffn], + [-0xfffffffffffffffen, 0x80000001n, -0x80000000fffffffefffffffen], + [-0x8000000000000001n, 0x80000001n, -0x400000008000000080000001n], + [-0x8000000000000000n, 0x80000001n, -0x400000008000000000000000n], + [-0x7fffffffffffffffn, 0x80000001n, -0x400000007fffffff7fffffffn], + [-0x7ffffffffffffffen, 0x80000001n, -0x400000007ffffffefffffffen], + [-0x100000001n, 0x80000001n, -0x8000000180000001n], + [-0x100000000n, 0x80000001n, -0x8000000100000000n], + [-0xffffffffn, 0x80000001n, -0x800000007fffffffn], + [-0xfffffffen, 0x80000001n, -0x7ffffffffffffffen], + [-0x80000001n, 0x80000001n, -0x4000000100000001n], + [-0x80000000n, 0x80000001n, -0x4000000080000000n], + [-0x7fffffffn, 0x80000001n, -0x3fffffffffffffffn], + [-0x7ffffffen, 0x80000001n, -0x3fffffff7ffffffen], + [0x80000001n, 0x80000001n, 0x4000000100000001n], + [0xfffffffen, 0x80000001n, 0x7ffffffffffffffen], + [0xffffffffn, 0x80000001n, 0x800000007fffffffn], + [0x100000000n, 0x80000001n, 0x8000000100000000n], + [0x100000001n, 0x80000001n, 0x8000000180000001n], + [0x7ffffffffffffffen, 0x80000001n, 0x400000007ffffffefffffffen], + [0x7fffffffffffffffn, 0x80000001n, 0x400000007fffffff7fffffffn], + [0x8000000000000000n, 0x80000001n, 0x400000008000000000000000n], + [0x8000000000000001n, 0x80000001n, 0x400000008000000080000001n], + [0xfffffffffffffffen, 0x80000001n, 0x80000000fffffffefffffffen], + [0xffffffffffffffffn, 0x80000001n, 0x80000000ffffffff7fffffffn], + [0x10000000000000000n, 0x80000001n, 0x800000010000000000000000n], + [0x10000000000000001n, 0x80000001n, 0x800000010000000080000001n], + [-0x10000000000000001n, -0x80000001n, 0x800000010000000080000001n], + [-0x10000000000000000n, -0x80000001n, 0x800000010000000000000000n], + [-0xffffffffffffffffn, -0x80000001n, 0x80000000ffffffff7fffffffn], + [-0xfffffffffffffffen, -0x80000001n, 0x80000000fffffffefffffffen], + [-0x8000000000000001n, -0x80000001n, 0x400000008000000080000001n], + [-0x8000000000000000n, -0x80000001n, 0x400000008000000000000000n], + [-0x7fffffffffffffffn, -0x80000001n, 0x400000007fffffff7fffffffn], + [-0x7ffffffffffffffen, -0x80000001n, 0x400000007ffffffefffffffen], + [-0x100000001n, -0x80000001n, 0x8000000180000001n], + [-0x100000000n, -0x80000001n, 0x8000000100000000n], + [-0xffffffffn, -0x80000001n, 0x800000007fffffffn], + [-0xfffffffen, -0x80000001n, 0x7ffffffffffffffen], + [-0x80000001n, -0x80000001n, 0x4000000100000001n], + [-0x80000000n, -0x80000001n, 0x4000000080000000n], + [-0x7fffffffn, -0x80000001n, 0x3fffffffffffffffn], + [-0x7ffffffen, -0x80000001n, 0x3fffffff7ffffffen], + [0xfffffffen, -0x80000001n, -0x7ffffffffffffffen], + [0xffffffffn, -0x80000001n, -0x800000007fffffffn], + [0x100000000n, -0x80000001n, -0x8000000100000000n], + [0x100000001n, -0x80000001n, -0x8000000180000001n], + [0x7ffffffffffffffen, -0x80000001n, -0x400000007ffffffefffffffen], + [0x7fffffffffffffffn, -0x80000001n, -0x400000007fffffff7fffffffn], + [0x8000000000000000n, -0x80000001n, -0x400000008000000000000000n], + [0x8000000000000001n, -0x80000001n, -0x400000008000000080000001n], + [0xfffffffffffffffen, -0x80000001n, -0x80000000fffffffefffffffen], + [0xffffffffffffffffn, -0x80000001n, -0x80000000ffffffff7fffffffn], + [0x10000000000000000n, -0x80000001n, -0x800000010000000000000000n], + [0x10000000000000001n, -0x80000001n, -0x800000010000000080000001n], + [-0x10000000000000001n, -0x80000000n, 0x800000000000000080000000n], + [-0x10000000000000000n, -0x80000000n, 0x800000000000000000000000n], + [-0xffffffffffffffffn, -0x80000000n, 0x7fffffffffffffff80000000n], + [-0xfffffffffffffffen, -0x80000000n, 0x7fffffffffffffff00000000n], + [-0x8000000000000001n, -0x80000000n, 0x400000000000000080000000n], + [-0x8000000000000000n, -0x80000000n, 0x400000000000000000000000n], + [-0x7fffffffffffffffn, -0x80000000n, 0x3fffffffffffffff80000000n], + [-0x7ffffffffffffffen, -0x80000000n, 0x3fffffffffffffff00000000n], + [-0x100000001n, -0x80000000n, 0x8000000080000000n], + [-0x100000000n, -0x80000000n, 0x8000000000000000n], + [-0xffffffffn, -0x80000000n, 0x7fffffff80000000n], + [-0xfffffffen, -0x80000000n, 0x7fffffff00000000n], + [-0x80000000n, -0x80000000n, 0x4000000000000000n], + [-0x7fffffffn, -0x80000000n, 0x3fffffff80000000n], + [-0x7ffffffen, -0x80000000n, 0x3fffffff00000000n], + [0xfffffffen, -0x80000000n, -0x7fffffff00000000n], + [0xffffffffn, -0x80000000n, -0x7fffffff80000000n], + [0x100000000n, -0x80000000n, -0x8000000000000000n], + [0x100000001n, -0x80000000n, -0x8000000080000000n], + [0x7ffffffffffffffen, -0x80000000n, -0x3fffffffffffffff00000000n], + [0x7fffffffffffffffn, -0x80000000n, -0x3fffffffffffffff80000000n], + [0x8000000000000000n, -0x80000000n, -0x400000000000000000000000n], + [0x8000000000000001n, -0x80000000n, -0x400000000000000080000000n], + [0xfffffffffffffffen, -0x80000000n, -0x7fffffffffffffff00000000n], + [0xffffffffffffffffn, -0x80000000n, -0x7fffffffffffffff80000000n], + [0x10000000000000000n, -0x80000000n, -0x800000000000000000000000n], + [0x10000000000000001n, -0x80000000n, -0x800000000000000080000000n], + [-0x10000000000000001n, -0x7fffffffn, 0x7fffffff000000007fffffffn], + [-0x10000000000000000n, -0x7fffffffn, 0x7fffffff0000000000000000n], + [-0xffffffffffffffffn, -0x7fffffffn, 0x7ffffffeffffffff80000001n], + [-0xfffffffffffffffen, -0x7fffffffn, 0x7ffffffeffffffff00000002n], + [-0x8000000000000001n, -0x7fffffffn, 0x3fffffff800000007fffffffn], + [-0x8000000000000000n, -0x7fffffffn, 0x3fffffff8000000000000000n], + [-0x7fffffffffffffffn, -0x7fffffffn, 0x3fffffff7fffffff80000001n], + [-0x7ffffffffffffffen, -0x7fffffffn, 0x3fffffff7fffffff00000002n], + [-0x100000001n, -0x7fffffffn, 0x7fffffff7fffffffn], + [-0x100000000n, -0x7fffffffn, 0x7fffffff00000000n], + [-0xffffffffn, -0x7fffffffn, 0x7ffffffe80000001n], + [-0xfffffffen, -0x7fffffffn, 0x7ffffffe00000002n], + [-0x7fffffffn, -0x7fffffffn, 0x3fffffff00000001n], + [-0x7ffffffen, -0x7fffffffn, 0x3ffffffe80000002n], + [0xfffffffen, -0x7fffffffn, -0x7ffffffe00000002n], + [0xffffffffn, -0x7fffffffn, -0x7ffffffe80000001n], + [0x100000000n, -0x7fffffffn, -0x7fffffff00000000n], + [0x100000001n, -0x7fffffffn, -0x7fffffff7fffffffn], + [0x7ffffffffffffffen, -0x7fffffffn, -0x3fffffff7fffffff00000002n], + [0x7fffffffffffffffn, -0x7fffffffn, -0x3fffffff7fffffff80000001n], + [0x8000000000000000n, -0x7fffffffn, -0x3fffffff8000000000000000n], + [0x8000000000000001n, -0x7fffffffn, -0x3fffffff800000007fffffffn], + [0xfffffffffffffffen, -0x7fffffffn, -0x7ffffffeffffffff00000002n], + [0xffffffffffffffffn, -0x7fffffffn, -0x7ffffffeffffffff80000001n], + [0x10000000000000000n, -0x7fffffffn, -0x7fffffff0000000000000000n], + [0x10000000000000001n, -0x7fffffffn, -0x7fffffff000000007fffffffn], + [-0x10000000000000001n, -0x7ffffffen, 0x7ffffffe000000007ffffffen], + [-0x10000000000000000n, -0x7ffffffen, 0x7ffffffe0000000000000000n], + [-0xffffffffffffffffn, -0x7ffffffen, 0x7ffffffdffffffff80000002n], + [-0xfffffffffffffffen, -0x7ffffffen, 0x7ffffffdffffffff00000004n], + [-0x8000000000000001n, -0x7ffffffen, 0x3fffffff000000007ffffffen], + [-0x8000000000000000n, -0x7ffffffen, 0x3fffffff0000000000000000n], + [-0x7fffffffffffffffn, -0x7ffffffen, 0x3ffffffeffffffff80000002n], + [-0x7ffffffffffffffen, -0x7ffffffen, 0x3ffffffeffffffff00000004n], + [-0x100000001n, -0x7ffffffen, 0x7ffffffe7ffffffen], + [-0x100000000n, -0x7ffffffen, 0x7ffffffe00000000n], + [-0xffffffffn, -0x7ffffffen, 0x7ffffffd80000002n], + [-0xfffffffen, -0x7ffffffen, 0x7ffffffd00000004n], + [-0x7ffffffen, -0x7ffffffen, 0x3ffffffe00000004n], + [0xfffffffen, -0x7ffffffen, -0x7ffffffd00000004n], + [0xffffffffn, -0x7ffffffen, -0x7ffffffd80000002n], + [0x100000000n, -0x7ffffffen, -0x7ffffffe00000000n], + [0x100000001n, -0x7ffffffen, -0x7ffffffe7ffffffen], + [0x7ffffffffffffffen, -0x7ffffffen, -0x3ffffffeffffffff00000004n], + [0x7fffffffffffffffn, -0x7ffffffen, -0x3ffffffeffffffff80000002n], + [0x8000000000000000n, -0x7ffffffen, -0x3fffffff0000000000000000n], + [0x8000000000000001n, -0x7ffffffen, -0x3fffffff000000007ffffffen], + [0xfffffffffffffffen, -0x7ffffffen, -0x7ffffffdffffffff00000004n], + [0xffffffffffffffffn, -0x7ffffffen, -0x7ffffffdffffffff80000002n], + [0x10000000000000000n, -0x7ffffffen, -0x7ffffffe0000000000000000n], + [0x10000000000000001n, -0x7ffffffen, -0x7ffffffe000000007ffffffen], + [-0x10000000000000001n, 0xfffffffen, -0xfffffffe00000000fffffffen], + [-0x10000000000000000n, 0xfffffffen, -0xfffffffe0000000000000000n], + [-0xffffffffffffffffn, 0xfffffffen, -0xfffffffdffffffff00000002n], + [-0xfffffffffffffffen, 0xfffffffen, -0xfffffffdfffffffe00000004n], + [-0x8000000000000001n, 0xfffffffen, -0x7fffffff00000000fffffffen], + [-0x8000000000000000n, 0xfffffffen, -0x7fffffff0000000000000000n], + [-0x7fffffffffffffffn, 0xfffffffen, -0x7ffffffeffffffff00000002n], + [-0x7ffffffffffffffen, 0xfffffffen, -0x7ffffffefffffffe00000004n], + [-0x100000001n, 0xfffffffen, -0xfffffffefffffffen], + [-0x100000000n, 0xfffffffen, -0xfffffffe00000000n], + [-0xffffffffn, 0xfffffffen, -0xfffffffd00000002n], + [-0xfffffffen, 0xfffffffen, -0xfffffffc00000004n], + [0xfffffffen, 0xfffffffen, 0xfffffffc00000004n], + [0xffffffffn, 0xfffffffen, 0xfffffffd00000002n], + [0x100000000n, 0xfffffffen, 0xfffffffe00000000n], + [0x100000001n, 0xfffffffen, 0xfffffffefffffffen], + [0x7ffffffffffffffen, 0xfffffffen, 0x7ffffffefffffffe00000004n], + [0x7fffffffffffffffn, 0xfffffffen, 0x7ffffffeffffffff00000002n], + [0x8000000000000000n, 0xfffffffen, 0x7fffffff0000000000000000n], + [0x8000000000000001n, 0xfffffffen, 0x7fffffff00000000fffffffen], + [0xfffffffffffffffen, 0xfffffffen, 0xfffffffdfffffffe00000004n], + [0xffffffffffffffffn, 0xfffffffen, 0xfffffffdffffffff00000002n], + [0x10000000000000000n, 0xfffffffen, 0xfffffffe0000000000000000n], + [0x10000000000000001n, 0xfffffffen, 0xfffffffe00000000fffffffen], + [-0x10000000000000001n, 0xffffffffn, -0xffffffff00000000ffffffffn], + [-0x10000000000000000n, 0xffffffffn, -0xffffffff0000000000000000n], + [-0xffffffffffffffffn, 0xffffffffn, -0xfffffffeffffffff00000001n], + [-0xfffffffffffffffen, 0xffffffffn, -0xfffffffefffffffe00000002n], + [-0x8000000000000001n, 0xffffffffn, -0x7fffffff80000000ffffffffn], + [-0x8000000000000000n, 0xffffffffn, -0x7fffffff8000000000000000n], + [-0x7fffffffffffffffn, 0xffffffffn, -0x7fffffff7fffffff00000001n], + [-0x7ffffffffffffffen, 0xffffffffn, -0x7fffffff7ffffffe00000002n], + [-0x100000001n, 0xffffffffn, -0xffffffffffffffffn], + [-0x100000000n, 0xffffffffn, -0xffffffff00000000n], + [-0xffffffffn, 0xffffffffn, -0xfffffffe00000001n], + [-0xfffffffen, 0xffffffffn, -0xfffffffd00000002n], + [0xffffffffn, 0xffffffffn, 0xfffffffe00000001n], + [0x100000000n, 0xffffffffn, 0xffffffff00000000n], + [0x100000001n, 0xffffffffn, 0xffffffffffffffffn], + [0x7ffffffffffffffen, 0xffffffffn, 0x7fffffff7ffffffe00000002n], + [0x7fffffffffffffffn, 0xffffffffn, 0x7fffffff7fffffff00000001n], + [0x8000000000000000n, 0xffffffffn, 0x7fffffff8000000000000000n], + [0x8000000000000001n, 0xffffffffn, 0x7fffffff80000000ffffffffn], + [0xfffffffffffffffen, 0xffffffffn, 0xfffffffefffffffe00000002n], + [0xffffffffffffffffn, 0xffffffffn, 0xfffffffeffffffff00000001n], + [0x10000000000000000n, 0xffffffffn, 0xffffffff0000000000000000n], + [0x10000000000000001n, 0xffffffffn, 0xffffffff00000000ffffffffn], + [-0x10000000000000001n, 0x100000000n, -0x1000000000000000100000000n], + [-0x10000000000000000n, 0x100000000n, -0x1000000000000000000000000n], + [-0xffffffffffffffffn, 0x100000000n, -0xffffffffffffffff00000000n], + [-0xfffffffffffffffen, 0x100000000n, -0xfffffffffffffffe00000000n], + [-0x8000000000000001n, 0x100000000n, -0x800000000000000100000000n], + [-0x8000000000000000n, 0x100000000n, -0x800000000000000000000000n], + [-0x7fffffffffffffffn, 0x100000000n, -0x7fffffffffffffff00000000n], + [-0x7ffffffffffffffen, 0x100000000n, -0x7ffffffffffffffe00000000n], + [-0x100000001n, 0x100000000n, -0x10000000100000000n], + [-0x100000000n, 0x100000000n, -0x10000000000000000n], + [-0xffffffffn, 0x100000000n, -0xffffffff00000000n], + [-0xfffffffen, 0x100000000n, -0xfffffffe00000000n], + [0x100000000n, 0x100000000n, 0x10000000000000000n], + [0x100000001n, 0x100000000n, 0x10000000100000000n], + [0x7ffffffffffffffen, 0x100000000n, 0x7ffffffffffffffe00000000n], + [0x7fffffffffffffffn, 0x100000000n, 0x7fffffffffffffff00000000n], + [0x8000000000000000n, 0x100000000n, 0x800000000000000000000000n], + [0x8000000000000001n, 0x100000000n, 0x800000000000000100000000n], + [0xfffffffffffffffen, 0x100000000n, 0xfffffffffffffffe00000000n], + [0xffffffffffffffffn, 0x100000000n, 0xffffffffffffffff00000000n], + [0x10000000000000000n, 0x100000000n, 0x1000000000000000000000000n], + [0x10000000000000001n, 0x100000000n, 0x1000000000000000100000000n], + [-0x10000000000000001n, 0x100000001n, -0x1000000010000000100000001n], + [-0x10000000000000000n, 0x100000001n, -0x1000000010000000000000000n], + [-0xffffffffffffffffn, 0x100000001n, -0x100000000fffffffeffffffffn], + [-0xfffffffffffffffen, 0x100000001n, -0x100000000fffffffdfffffffen], + [-0x8000000000000001n, 0x100000001n, -0x800000008000000100000001n], + [-0x8000000000000000n, 0x100000001n, -0x800000008000000000000000n], + [-0x7fffffffffffffffn, 0x100000001n, -0x800000007ffffffeffffffffn], + [-0x7ffffffffffffffen, 0x100000001n, -0x800000007ffffffdfffffffen], + [-0x100000001n, 0x100000001n, -0x10000000200000001n], + [-0x100000000n, 0x100000001n, -0x10000000100000000n], + [-0xffffffffn, 0x100000001n, -0xffffffffffffffffn], + [-0xfffffffen, 0x100000001n, -0xfffffffefffffffen], + [0x100000001n, 0x100000001n, 0x10000000200000001n], + [0x7ffffffffffffffen, 0x100000001n, 0x800000007ffffffdfffffffen], + [0x7fffffffffffffffn, 0x100000001n, 0x800000007ffffffeffffffffn], + [0x8000000000000000n, 0x100000001n, 0x800000008000000000000000n], + [0x8000000000000001n, 0x100000001n, 0x800000008000000100000001n], + [0xfffffffffffffffen, 0x100000001n, 0x100000000fffffffdfffffffen], + [0xffffffffffffffffn, 0x100000001n, 0x100000000fffffffeffffffffn], + [0x10000000000000000n, 0x100000001n, 0x1000000010000000000000000n], + [0x10000000000000001n, 0x100000001n, 0x1000000010000000100000001n], + [-0x10000000000000001n, -0x100000001n, 0x1000000010000000100000001n], + [-0x10000000000000000n, -0x100000001n, 0x1000000010000000000000000n], + [-0xffffffffffffffffn, -0x100000001n, 0x100000000fffffffeffffffffn], + [-0xfffffffffffffffen, -0x100000001n, 0x100000000fffffffdfffffffen], + [-0x8000000000000001n, -0x100000001n, 0x800000008000000100000001n], + [-0x8000000000000000n, -0x100000001n, 0x800000008000000000000000n], + [-0x7fffffffffffffffn, -0x100000001n, 0x800000007ffffffeffffffffn], + [-0x7ffffffffffffffen, -0x100000001n, 0x800000007ffffffdfffffffen], + [-0x100000001n, -0x100000001n, 0x10000000200000001n], + [-0x100000000n, -0x100000001n, 0x10000000100000000n], + [-0xffffffffn, -0x100000001n, 0xffffffffffffffffn], + [-0xfffffffen, -0x100000001n, 0xfffffffefffffffen], + [0x7ffffffffffffffen, -0x100000001n, -0x800000007ffffffdfffffffen], + [0x7fffffffffffffffn, -0x100000001n, -0x800000007ffffffeffffffffn], + [0x8000000000000000n, -0x100000001n, -0x800000008000000000000000n], + [0x8000000000000001n, -0x100000001n, -0x800000008000000100000001n], + [0xfffffffffffffffen, -0x100000001n, -0x100000000fffffffdfffffffen], + [0xffffffffffffffffn, -0x100000001n, -0x100000000fffffffeffffffffn], + [0x10000000000000000n, -0x100000001n, -0x1000000010000000000000000n], + [0x10000000000000001n, -0x100000001n, -0x1000000010000000100000001n], + [-0x10000000000000001n, -0x100000000n, 0x1000000000000000100000000n], + [-0x10000000000000000n, -0x100000000n, 0x1000000000000000000000000n], + [-0xffffffffffffffffn, -0x100000000n, 0xffffffffffffffff00000000n], + [-0xfffffffffffffffen, -0x100000000n, 0xfffffffffffffffe00000000n], + [-0x8000000000000001n, -0x100000000n, 0x800000000000000100000000n], + [-0x8000000000000000n, -0x100000000n, 0x800000000000000000000000n], + [-0x7fffffffffffffffn, -0x100000000n, 0x7fffffffffffffff00000000n], + [-0x7ffffffffffffffen, -0x100000000n, 0x7ffffffffffffffe00000000n], + [-0x100000000n, -0x100000000n, 0x10000000000000000n], + [-0xffffffffn, -0x100000000n, 0xffffffff00000000n], + [-0xfffffffen, -0x100000000n, 0xfffffffe00000000n], + [0x7ffffffffffffffen, -0x100000000n, -0x7ffffffffffffffe00000000n], + [0x7fffffffffffffffn, -0x100000000n, -0x7fffffffffffffff00000000n], + [0x8000000000000000n, -0x100000000n, -0x800000000000000000000000n], + [0x8000000000000001n, -0x100000000n, -0x800000000000000100000000n], + [0xfffffffffffffffen, -0x100000000n, -0xfffffffffffffffe00000000n], + [0xffffffffffffffffn, -0x100000000n, -0xffffffffffffffff00000000n], + [0x10000000000000000n, -0x100000000n, -0x1000000000000000000000000n], + [0x10000000000000001n, -0x100000000n, -0x1000000000000000100000000n], + [-0x10000000000000001n, -0xffffffffn, 0xffffffff00000000ffffffffn], + [-0x10000000000000000n, -0xffffffffn, 0xffffffff0000000000000000n], + [-0xffffffffffffffffn, -0xffffffffn, 0xfffffffeffffffff00000001n], + [-0xfffffffffffffffen, -0xffffffffn, 0xfffffffefffffffe00000002n], + [-0x8000000000000001n, -0xffffffffn, 0x7fffffff80000000ffffffffn], + [-0x8000000000000000n, -0xffffffffn, 0x7fffffff8000000000000000n], + [-0x7fffffffffffffffn, -0xffffffffn, 0x7fffffff7fffffff00000001n], + [-0x7ffffffffffffffen, -0xffffffffn, 0x7fffffff7ffffffe00000002n], + [-0xffffffffn, -0xffffffffn, 0xfffffffe00000001n], + [-0xfffffffen, -0xffffffffn, 0xfffffffd00000002n], + [0x7ffffffffffffffen, -0xffffffffn, -0x7fffffff7ffffffe00000002n], + [0x7fffffffffffffffn, -0xffffffffn, -0x7fffffff7fffffff00000001n], + [0x8000000000000000n, -0xffffffffn, -0x7fffffff8000000000000000n], + [0x8000000000000001n, -0xffffffffn, -0x7fffffff80000000ffffffffn], + [0xfffffffffffffffen, -0xffffffffn, -0xfffffffefffffffe00000002n], + [0xffffffffffffffffn, -0xffffffffn, -0xfffffffeffffffff00000001n], + [0x10000000000000000n, -0xffffffffn, -0xffffffff0000000000000000n], + [0x10000000000000001n, -0xffffffffn, -0xffffffff00000000ffffffffn], + [-0x10000000000000001n, -0xfffffffen, 0xfffffffe00000000fffffffen], + [-0x10000000000000000n, -0xfffffffen, 0xfffffffe0000000000000000n], + [-0xffffffffffffffffn, -0xfffffffen, 0xfffffffdffffffff00000002n], + [-0xfffffffffffffffen, -0xfffffffen, 0xfffffffdfffffffe00000004n], + [-0x8000000000000001n, -0xfffffffen, 0x7fffffff00000000fffffffen], + [-0x8000000000000000n, -0xfffffffen, 0x7fffffff0000000000000000n], + [-0x7fffffffffffffffn, -0xfffffffen, 0x7ffffffeffffffff00000002n], + [-0x7ffffffffffffffen, -0xfffffffen, 0x7ffffffefffffffe00000004n], + [-0xfffffffen, -0xfffffffen, 0xfffffffc00000004n], + [0x7ffffffffffffffen, -0xfffffffen, -0x7ffffffefffffffe00000004n], + [0x7fffffffffffffffn, -0xfffffffen, -0x7ffffffeffffffff00000002n], + [0x8000000000000000n, -0xfffffffen, -0x7fffffff0000000000000000n], + [0x8000000000000001n, -0xfffffffen, -0x7fffffff00000000fffffffen], + [0xfffffffffffffffen, -0xfffffffen, -0xfffffffdfffffffe00000004n], + [0xffffffffffffffffn, -0xfffffffen, -0xfffffffdffffffff00000002n], + [0x10000000000000000n, -0xfffffffen, -0xfffffffe0000000000000000n], + [0x10000000000000001n, -0xfffffffen, -0xfffffffe00000000fffffffen], + [-0x10000000000000001n, 0x7ffffffffffffffen, -0x7ffffffffffffffe7ffffffffffffffen], + [-0x10000000000000000n, 0x7ffffffffffffffen, -0x7ffffffffffffffe0000000000000000n], + [-0xffffffffffffffffn, 0x7ffffffffffffffen, -0x7ffffffffffffffd8000000000000002n], + [-0xfffffffffffffffen, 0x7ffffffffffffffen, -0x7ffffffffffffffd0000000000000004n], + [-0x8000000000000001n, 0x7ffffffffffffffen, -0x3fffffffffffffff7ffffffffffffffen], + [-0x8000000000000000n, 0x7ffffffffffffffen, -0x3fffffffffffffff0000000000000000n], + [-0x7fffffffffffffffn, 0x7ffffffffffffffen, -0x3ffffffffffffffe8000000000000002n], + [-0x7ffffffffffffffen, 0x7ffffffffffffffen, -0x3ffffffffffffffe0000000000000004n], + [0x7ffffffffffffffen, 0x7ffffffffffffffen, 0x3ffffffffffffffe0000000000000004n], + [0x7fffffffffffffffn, 0x7ffffffffffffffen, 0x3ffffffffffffffe8000000000000002n], + [0x8000000000000000n, 0x7ffffffffffffffen, 0x3fffffffffffffff0000000000000000n], + [0x8000000000000001n, 0x7ffffffffffffffen, 0x3fffffffffffffff7ffffffffffffffen], + [0xfffffffffffffffen, 0x7ffffffffffffffen, 0x7ffffffffffffffd0000000000000004n], + [0xffffffffffffffffn, 0x7ffffffffffffffen, 0x7ffffffffffffffd8000000000000002n], + [0x10000000000000000n, 0x7ffffffffffffffen, 0x7ffffffffffffffe0000000000000000n], + [0x10000000000000001n, 0x7ffffffffffffffen, 0x7ffffffffffffffe7ffffffffffffffen], + [-0x10000000000000001n, 0x7fffffffffffffffn, -0x7fffffffffffffff7fffffffffffffffn], + [-0x10000000000000000n, 0x7fffffffffffffffn, -0x7fffffffffffffff0000000000000000n], + [-0xffffffffffffffffn, 0x7fffffffffffffffn, -0x7ffffffffffffffe8000000000000001n], + [-0xfffffffffffffffen, 0x7fffffffffffffffn, -0x7ffffffffffffffe0000000000000002n], + [-0x8000000000000001n, 0x7fffffffffffffffn, -0x3fffffffffffffffffffffffffffffffn], + [-0x8000000000000000n, 0x7fffffffffffffffn, -0x3fffffffffffffff8000000000000000n], + [-0x7fffffffffffffffn, 0x7fffffffffffffffn, -0x3fffffffffffffff0000000000000001n], + [-0x7ffffffffffffffen, 0x7fffffffffffffffn, -0x3ffffffffffffffe8000000000000002n], + [0x7fffffffffffffffn, 0x7fffffffffffffffn, 0x3fffffffffffffff0000000000000001n], + [0x8000000000000000n, 0x7fffffffffffffffn, 0x3fffffffffffffff8000000000000000n], + [0x8000000000000001n, 0x7fffffffffffffffn, 0x3fffffffffffffffffffffffffffffffn], + [0xfffffffffffffffen, 0x7fffffffffffffffn, 0x7ffffffffffffffe0000000000000002n], + [0xffffffffffffffffn, 0x7fffffffffffffffn, 0x7ffffffffffffffe8000000000000001n], + [0x10000000000000000n, 0x7fffffffffffffffn, 0x7fffffffffffffff0000000000000000n], + [0x10000000000000001n, 0x7fffffffffffffffn, 0x7fffffffffffffff7fffffffffffffffn], + [-0x10000000000000001n, 0x8000000000000000n, -0x80000000000000008000000000000000n], + [-0x10000000000000000n, 0x8000000000000000n, -0x80000000000000000000000000000000n], + [-0xffffffffffffffffn, 0x8000000000000000n, -0x7fffffffffffffff8000000000000000n], + [-0xfffffffffffffffen, 0x8000000000000000n, -0x7fffffffffffffff0000000000000000n], + [-0x8000000000000001n, 0x8000000000000000n, -0x40000000000000008000000000000000n], + [-0x8000000000000000n, 0x8000000000000000n, -0x40000000000000000000000000000000n], + [-0x7fffffffffffffffn, 0x8000000000000000n, -0x3fffffffffffffff8000000000000000n], + [-0x7ffffffffffffffen, 0x8000000000000000n, -0x3fffffffffffffff0000000000000000n], + [0x8000000000000000n, 0x8000000000000000n, 0x40000000000000000000000000000000n], + [0x8000000000000001n, 0x8000000000000000n, 0x40000000000000008000000000000000n], + [0xfffffffffffffffen, 0x8000000000000000n, 0x7fffffffffffffff0000000000000000n], + [0xffffffffffffffffn, 0x8000000000000000n, 0x7fffffffffffffff8000000000000000n], + [0x10000000000000000n, 0x8000000000000000n, 0x80000000000000000000000000000000n], + [0x10000000000000001n, 0x8000000000000000n, 0x80000000000000008000000000000000n], + [-0x10000000000000001n, 0x8000000000000001n, -0x80000000000000018000000000000001n], + [-0x10000000000000000n, 0x8000000000000001n, -0x80000000000000010000000000000000n], + [-0xffffffffffffffffn, 0x8000000000000001n, -0x80000000000000007fffffffffffffffn], + [-0xfffffffffffffffen, 0x8000000000000001n, -0x7ffffffffffffffffffffffffffffffen], + [-0x8000000000000001n, 0x8000000000000001n, -0x40000000000000010000000000000001n], + [-0x8000000000000000n, 0x8000000000000001n, -0x40000000000000008000000000000000n], + [-0x7fffffffffffffffn, 0x8000000000000001n, -0x3fffffffffffffffffffffffffffffffn], + [-0x7ffffffffffffffen, 0x8000000000000001n, -0x3fffffffffffffff7ffffffffffffffen], + [0x8000000000000001n, 0x8000000000000001n, 0x40000000000000010000000000000001n], + [0xfffffffffffffffen, 0x8000000000000001n, 0x7ffffffffffffffffffffffffffffffen], + [0xffffffffffffffffn, 0x8000000000000001n, 0x80000000000000007fffffffffffffffn], + [0x10000000000000000n, 0x8000000000000001n, 0x80000000000000010000000000000000n], + [0x10000000000000001n, 0x8000000000000001n, 0x80000000000000018000000000000001n], + [-0x10000000000000001n, -0x8000000000000001n, 0x80000000000000018000000000000001n], + [-0x10000000000000000n, -0x8000000000000001n, 0x80000000000000010000000000000000n], + [-0xffffffffffffffffn, -0x8000000000000001n, 0x80000000000000007fffffffffffffffn], + [-0xfffffffffffffffen, -0x8000000000000001n, 0x7ffffffffffffffffffffffffffffffen], + [-0x8000000000000001n, -0x8000000000000001n, 0x40000000000000010000000000000001n], + [-0x8000000000000000n, -0x8000000000000001n, 0x40000000000000008000000000000000n], + [-0x7fffffffffffffffn, -0x8000000000000001n, 0x3fffffffffffffffffffffffffffffffn], + [-0x7ffffffffffffffen, -0x8000000000000001n, 0x3fffffffffffffff7ffffffffffffffen], + [0xfffffffffffffffen, -0x8000000000000001n, -0x7ffffffffffffffffffffffffffffffen], + [0xffffffffffffffffn, -0x8000000000000001n, -0x80000000000000007fffffffffffffffn], + [0x10000000000000000n, -0x8000000000000001n, -0x80000000000000010000000000000000n], + [0x10000000000000001n, -0x8000000000000001n, -0x80000000000000018000000000000001n], + [-0x10000000000000001n, -0x8000000000000000n, 0x80000000000000008000000000000000n], + [-0x10000000000000000n, -0x8000000000000000n, 0x80000000000000000000000000000000n], + [-0xffffffffffffffffn, -0x8000000000000000n, 0x7fffffffffffffff8000000000000000n], + [-0xfffffffffffffffen, -0x8000000000000000n, 0x7fffffffffffffff0000000000000000n], + [-0x8000000000000000n, -0x8000000000000000n, 0x40000000000000000000000000000000n], + [-0x7fffffffffffffffn, -0x8000000000000000n, 0x3fffffffffffffff8000000000000000n], + [-0x7ffffffffffffffen, -0x8000000000000000n, 0x3fffffffffffffff0000000000000000n], + [0xfffffffffffffffen, -0x8000000000000000n, -0x7fffffffffffffff0000000000000000n], + [0xffffffffffffffffn, -0x8000000000000000n, -0x7fffffffffffffff8000000000000000n], + [0x10000000000000000n, -0x8000000000000000n, -0x80000000000000000000000000000000n], + [0x10000000000000001n, -0x8000000000000000n, -0x80000000000000008000000000000000n], + [-0x10000000000000001n, -0x7fffffffffffffffn, 0x7fffffffffffffff7fffffffffffffffn], + [-0x10000000000000000n, -0x7fffffffffffffffn, 0x7fffffffffffffff0000000000000000n], + [-0xffffffffffffffffn, -0x7fffffffffffffffn, 0x7ffffffffffffffe8000000000000001n], + [-0xfffffffffffffffen, -0x7fffffffffffffffn, 0x7ffffffffffffffe0000000000000002n], + [-0x7fffffffffffffffn, -0x7fffffffffffffffn, 0x3fffffffffffffff0000000000000001n], + [-0x7ffffffffffffffen, -0x7fffffffffffffffn, 0x3ffffffffffffffe8000000000000002n], + [0xfffffffffffffffen, -0x7fffffffffffffffn, -0x7ffffffffffffffe0000000000000002n], + [0xffffffffffffffffn, -0x7fffffffffffffffn, -0x7ffffffffffffffe8000000000000001n], + [0x10000000000000000n, -0x7fffffffffffffffn, -0x7fffffffffffffff0000000000000000n], + [0x10000000000000001n, -0x7fffffffffffffffn, -0x7fffffffffffffff7fffffffffffffffn], + [-0x10000000000000001n, -0x7ffffffffffffffen, 0x7ffffffffffffffe7ffffffffffffffen], + [-0x10000000000000000n, -0x7ffffffffffffffen, 0x7ffffffffffffffe0000000000000000n], + [-0xffffffffffffffffn, -0x7ffffffffffffffen, 0x7ffffffffffffffd8000000000000002n], + [-0xfffffffffffffffen, -0x7ffffffffffffffen, 0x7ffffffffffffffd0000000000000004n], + [-0x7ffffffffffffffen, -0x7ffffffffffffffen, 0x3ffffffffffffffe0000000000000004n], + [0xfffffffffffffffen, -0x7ffffffffffffffen, -0x7ffffffffffffffd0000000000000004n], + [0xffffffffffffffffn, -0x7ffffffffffffffen, -0x7ffffffffffffffd8000000000000002n], + [0x10000000000000000n, -0x7ffffffffffffffen, -0x7ffffffffffffffe0000000000000000n], + [0x10000000000000001n, -0x7ffffffffffffffen, -0x7ffffffffffffffe7ffffffffffffffen], + [-0x10000000000000001n, 0xfffffffffffffffen, -0xfffffffffffffffefffffffffffffffen], + [-0x10000000000000000n, 0xfffffffffffffffen, -0xfffffffffffffffe0000000000000000n], + [-0xffffffffffffffffn, 0xfffffffffffffffen, -0xfffffffffffffffd0000000000000002n], + [-0xfffffffffffffffen, 0xfffffffffffffffen, -0xfffffffffffffffc0000000000000004n], + [0xfffffffffffffffen, 0xfffffffffffffffen, 0xfffffffffffffffc0000000000000004n], + [0xffffffffffffffffn, 0xfffffffffffffffen, 0xfffffffffffffffd0000000000000002n], + [0x10000000000000000n, 0xfffffffffffffffen, 0xfffffffffffffffe0000000000000000n], + [0x10000000000000001n, 0xfffffffffffffffen, 0xfffffffffffffffefffffffffffffffen], + [-0x10000000000000001n, 0xffffffffffffffffn, -0xffffffffffffffffffffffffffffffffn], + [-0x10000000000000000n, 0xffffffffffffffffn, -0xffffffffffffffff0000000000000000n], + [-0xffffffffffffffffn, 0xffffffffffffffffn, -0xfffffffffffffffe0000000000000001n], + [-0xfffffffffffffffen, 0xffffffffffffffffn, -0xfffffffffffffffd0000000000000002n], + [0xffffffffffffffffn, 0xffffffffffffffffn, 0xfffffffffffffffe0000000000000001n], + [0x10000000000000000n, 0xffffffffffffffffn, 0xffffffffffffffff0000000000000000n], + [0x10000000000000001n, 0xffffffffffffffffn, 0xffffffffffffffffffffffffffffffffn], + [-0x10000000000000001n, 0x10000000000000000n, -0x100000000000000010000000000000000n], + [-0x10000000000000000n, 0x10000000000000000n, -0x100000000000000000000000000000000n], + [-0xffffffffffffffffn, 0x10000000000000000n, -0xffffffffffffffff0000000000000000n], + [-0xfffffffffffffffen, 0x10000000000000000n, -0xfffffffffffffffe0000000000000000n], + [0x10000000000000000n, 0x10000000000000000n, 0x100000000000000000000000000000000n], + [0x10000000000000001n, 0x10000000000000000n, 0x100000000000000010000000000000000n], + [-0x10000000000000001n, 0x10000000000000001n, -0x100000000000000020000000000000001n], + [-0x10000000000000000n, 0x10000000000000001n, -0x100000000000000010000000000000000n], + [-0xffffffffffffffffn, 0x10000000000000001n, -0xffffffffffffffffffffffffffffffffn], + [-0xfffffffffffffffen, 0x10000000000000001n, -0xfffffffffffffffefffffffffffffffen], + [0x10000000000000001n, 0x10000000000000001n, 0x100000000000000020000000000000001n], + [-0x10000000000000001n, -0x10000000000000001n, 0x100000000000000020000000000000001n], + [-0x10000000000000000n, -0x10000000000000001n, 0x100000000000000010000000000000000n], + [-0xffffffffffffffffn, -0x10000000000000001n, 0xffffffffffffffffffffffffffffffffn], + [-0xfffffffffffffffen, -0x10000000000000001n, 0xfffffffffffffffefffffffffffffffen], + [-0x10000000000000000n, -0x10000000000000000n, 0x100000000000000000000000000000000n], + [-0xffffffffffffffffn, -0x10000000000000000n, 0xffffffffffffffff0000000000000000n], + [-0xfffffffffffffffen, -0x10000000000000000n, 0xfffffffffffffffe0000000000000000n], + [-0xffffffffffffffffn, -0xffffffffffffffffn, 0xfffffffffffffffe0000000000000001n], + [-0xfffffffffffffffen, -0xffffffffffffffffn, 0xfffffffffffffffd0000000000000002n], + [-0xfffffffffffffffen, -0xfffffffffffffffen, 0xfffffffffffffffc0000000000000004n], +]; + +// Cases not covered above. +tests.push( + // Int32 overflow: + // + // Math.floor(2 ** (Math.log2(2147483648) / 2)) + // = Math.floor(2 ** 15.5) + // = 46340 + // + // Math.ceil(2 ** (Math.log2(2147483648) / 2)) + // = Math.ceil(2 ** 15.5) + // = 46341 + [46340n, 46340n, 2147395600n], + [46341n, 46341n, 2147488281n], + [46340n, -46340n, -2147395600n], + [46341n, -46341n, -2147488281n], + [-46340n, -46340n, 2147395600n], + [-46341n, -46341n, 2147488281n], + + // Int64 overflow + [3037000499n, 3037000499n, 9223372030926249001n], + [3037000500n, 3037000500n, 9223372037000250000n], + [3037000499n, -3037000499n, -9223372030926249001n], + [3037000500n, -3037000500n, -9223372037000250000n], + [-3037000499n, -3037000499n, 9223372030926249001n], + [-3037000500n, -3037000500n, 9223372037000250000n], +); + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs * rhs, expected); + assertEq(rhs * lhs, expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-neg.js b/js/src/jit-test/tests/bigint/bigint-neg.js new file mode 100644 index 0000000000..b3dd918be7 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-neg.js @@ -0,0 +1,51 @@ +const tests = [ + [-0x10000000000000001n, 0x10000000000000001n], + [-0x10000000000000000n, 0x10000000000000000n], + [-0xffffffffffffffffn, 0xffffffffffffffffn], + [-0xfffffffffffffffen, 0xfffffffffffffffen], + [-0x8000000000000001n, 0x8000000000000001n], + [-0x8000000000000000n, 0x8000000000000000n], + [-0x7fffffffffffffffn, 0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0x7ffffffffffffffen], + [-0x100000001n, 0x100000001n], + [-0x100000000n, 0x100000000n], + [-0xffffffffn, 0xffffffffn], + [-0xfffffffen, 0xfffffffen], + [-0x80000001n, 0x80000001n], + [-0x80000000n, 0x80000000n], + [-0x7fffffffn, 0x7fffffffn], + [-0x7ffffffen, 0x7ffffffen], + [-2n, 2n], + [-1n, 1n], + [0n, 0n], + [1n, -1n], + [2n, -2n], + [0x7ffffffen, -0x7ffffffen], + [0x7fffffffn, -0x7fffffffn], + [0x80000000n, -0x80000000n], + [0x80000001n, -0x80000001n], + [0xfffffffen, -0xfffffffen], + [0xffffffffn, -0xffffffffn], + [0x100000000n, -0x100000000n], + [0x100000001n, -0x100000001n], + [0x7ffffffffffffffen, -0x7ffffffffffffffen], + [0x7fffffffffffffffn, -0x7fffffffffffffffn], + [0x8000000000000000n, -0x8000000000000000n], + [0x8000000000000001n, -0x8000000000000001n], + [0xfffffffffffffffen, -0xfffffffffffffffen], + [0xffffffffffffffffn, -0xffffffffffffffffn], + [0x10000000000000000n, -0x10000000000000000n], + [0x10000000000000001n, -0x10000000000000001n], +]; + +function f(tests) { + for (let test of tests) { + let input = test[0], expected = test[1]; + + assertEq(-input, expected); + } +} + +for (let i = 0; i < 200; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-not.js b/js/src/jit-test/tests/bigint/bigint-not.js new file mode 100644 index 0000000000..796f7027f7 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-not.js @@ -0,0 +1,51 @@ +const tests = [ + [-0x10000000000000001n, 0x10000000000000000n], + [-0x10000000000000000n, 0xffffffffffffffffn], + [-0xffffffffffffffffn, 0xfffffffffffffffen], + [-0xfffffffffffffffen, 0xfffffffffffffffdn], + [-0x8000000000000001n, 0x8000000000000000n], + [-0x8000000000000000n, 0x7fffffffffffffffn], + [-0x7fffffffffffffffn, 0x7ffffffffffffffen], + [-0x7ffffffffffffffen, 0x7ffffffffffffffdn], + [-0x100000001n, 0x100000000n], + [-0x100000000n, 0xffffffffn], + [-0xffffffffn, 0xfffffffen], + [-0xfffffffen, 0xfffffffdn], + [-0x80000001n, 0x80000000n], + [-0x80000000n, 0x7fffffffn], + [-0x7fffffffn, 0x7ffffffen], + [-0x7ffffffen, 0x7ffffffdn], + [-2n, 1n], + [-1n, 0n], + [0n, -1n], + [1n, -2n], + [2n, -3n], + [0x7ffffffen, -0x7fffffffn], + [0x7fffffffn, -0x80000000n], + [0x80000000n, -0x80000001n], + [0x80000001n, -0x80000002n], + [0xfffffffen, -0xffffffffn], + [0xffffffffn, -0x100000000n], + [0x100000000n, -0x100000001n], + [0x100000001n, -0x100000002n], + [0x7ffffffffffffffen, -0x7fffffffffffffffn], + [0x7fffffffffffffffn, -0x8000000000000000n], + [0x8000000000000000n, -0x8000000000000001n], + [0x8000000000000001n, -0x8000000000000002n], + [0xfffffffffffffffen, -0xffffffffffffffffn], + [0xffffffffffffffffn, -0x10000000000000000n], + [0x10000000000000000n, -0x10000000000000001n], + [0x10000000000000001n, -0x10000000000000002n], +]; + +function f(tests) { + for (let test of tests) { + let input = test[0], expected = test[1]; + + assertEq(~input, expected); + } +} + +for (let i = 0; i < 200; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-or.js b/js/src/jit-test/tests/bigint/bigint-or.js new file mode 100644 index 0000000000..fae3f62b99 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-or.js @@ -0,0 +1,718 @@ +const tests = [ + [-0x10000000000000001n, -2n, -1n], + [-0x10000000000000000n, -2n, -2n], + [-0xffffffffffffffffn, -2n, -1n], + [-0xfffffffffffffffen, -2n, -2n], + [-0x8000000000000001n, -2n, -1n], + [-0x8000000000000000n, -2n, -2n], + [-0x7fffffffffffffffn, -2n, -1n], + [-0x7ffffffffffffffen, -2n, -2n], + [-0x100000001n, -2n, -1n], + [-0x100000000n, -2n, -2n], + [-0xffffffffn, -2n, -1n], + [-0xfffffffen, -2n, -2n], + [-0x80000001n, -2n, -1n], + [-0x80000000n, -2n, -2n], + [-0x7fffffffn, -2n, -1n], + [-0x7ffffffen, -2n, -2n], + [-2n, -2n, -2n], + [-1n, -2n, -1n], + [0n, -2n, -2n], + [1n, -2n, -1n], + [2n, -2n, -2n], + [0x7ffffffen, -2n, -2n], + [0x7fffffffn, -2n, -1n], + [0x80000000n, -2n, -2n], + [0x80000001n, -2n, -1n], + [0xfffffffen, -2n, -2n], + [0xffffffffn, -2n, -1n], + [0x100000000n, -2n, -2n], + [0x100000001n, -2n, -1n], + [0x7ffffffffffffffen, -2n, -2n], + [0x7fffffffffffffffn, -2n, -1n], + [0x8000000000000000n, -2n, -2n], + [0x8000000000000001n, -2n, -1n], + [0xfffffffffffffffen, -2n, -2n], + [0xffffffffffffffffn, -2n, -1n], + [0x10000000000000000n, -2n, -2n], + [0x10000000000000001n, -2n, -1n], + [-0x10000000000000001n, -1n, -1n], + [-0x10000000000000000n, -1n, -1n], + [-0xffffffffffffffffn, -1n, -1n], + [-0xfffffffffffffffen, -1n, -1n], + [-0x8000000000000001n, -1n, -1n], + [-0x8000000000000000n, -1n, -1n], + [-0x7fffffffffffffffn, -1n, -1n], + [-0x7ffffffffffffffen, -1n, -1n], + [-0x100000001n, -1n, -1n], + [-0x100000000n, -1n, -1n], + [-0xffffffffn, -1n, -1n], + [-0xfffffffen, -1n, -1n], + [-0x80000001n, -1n, -1n], + [-0x80000000n, -1n, -1n], + [-0x7fffffffn, -1n, -1n], + [-0x7ffffffen, -1n, -1n], + [-1n, -1n, -1n], + [0n, -1n, -1n], + [1n, -1n, -1n], + [2n, -1n, -1n], + [0x7ffffffen, -1n, -1n], + [0x7fffffffn, -1n, -1n], + [0x80000000n, -1n, -1n], + [0x80000001n, -1n, -1n], + [0xfffffffen, -1n, -1n], + [0xffffffffn, -1n, -1n], + [0x100000000n, -1n, -1n], + [0x100000001n, -1n, -1n], + [0x7ffffffffffffffen, -1n, -1n], + [0x7fffffffffffffffn, -1n, -1n], + [0x8000000000000000n, -1n, -1n], + [0x8000000000000001n, -1n, -1n], + [0xfffffffffffffffen, -1n, -1n], + [0xffffffffffffffffn, -1n, -1n], + [0x10000000000000000n, -1n, -1n], + [0x10000000000000001n, -1n, -1n], + [-0x10000000000000001n, 0n, -0x10000000000000001n], + [-0x10000000000000000n, 0n, -0x10000000000000000n], + [-0xffffffffffffffffn, 0n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 0n, -0xfffffffffffffffen], + [-0x8000000000000001n, 0n, -0x8000000000000001n], + [-0x8000000000000000n, 0n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 0n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0n, -0x7ffffffffffffffen], + [-0x100000001n, 0n, -0x100000001n], + [-0x100000000n, 0n, -0x100000000n], + [-0xffffffffn, 0n, -0xffffffffn], + [-0xfffffffen, 0n, -0xfffffffen], + [-0x80000001n, 0n, -0x80000001n], + [-0x80000000n, 0n, -0x80000000n], + [-0x7fffffffn, 0n, -0x7fffffffn], + [-0x7ffffffen, 0n, -0x7ffffffen], + [0n, 0n, 0n], + [1n, 0n, 1n], + [2n, 0n, 2n], + [0x7ffffffen, 0n, 0x7ffffffen], + [0x7fffffffn, 0n, 0x7fffffffn], + [0x80000000n, 0n, 0x80000000n], + [0x80000001n, 0n, 0x80000001n], + [0xfffffffen, 0n, 0xfffffffen], + [0xffffffffn, 0n, 0xffffffffn], + [0x100000000n, 0n, 0x100000000n], + [0x100000001n, 0n, 0x100000001n], + [0x7ffffffffffffffen, 0n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0n, 0x8000000000000000n], + [0x8000000000000001n, 0n, 0x8000000000000001n], + [0xfffffffffffffffen, 0n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0n, 0xffffffffffffffffn], + [0x10000000000000000n, 0n, 0x10000000000000000n], + [0x10000000000000001n, 0n, 0x10000000000000001n], + [-0x10000000000000001n, 1n, -0x10000000000000001n], + [-0x10000000000000000n, 1n, -0xffffffffffffffffn], + [-0xffffffffffffffffn, 1n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 1n, -0xfffffffffffffffdn], + [-0x8000000000000001n, 1n, -0x8000000000000001n], + [-0x8000000000000000n, 1n, -0x7fffffffffffffffn], + [-0x7fffffffffffffffn, 1n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 1n, -0x7ffffffffffffffdn], + [-0x100000001n, 1n, -0x100000001n], + [-0x100000000n, 1n, -0xffffffffn], + [-0xffffffffn, 1n, -0xffffffffn], + [-0xfffffffen, 1n, -0xfffffffdn], + [-0x80000001n, 1n, -0x80000001n], + [-0x80000000n, 1n, -0x7fffffffn], + [-0x7fffffffn, 1n, -0x7fffffffn], + [-0x7ffffffen, 1n, -0x7ffffffdn], + [1n, 1n, 1n], + [2n, 1n, 3n], + [0x7ffffffen, 1n, 0x7fffffffn], + [0x7fffffffn, 1n, 0x7fffffffn], + [0x80000000n, 1n, 0x80000001n], + [0x80000001n, 1n, 0x80000001n], + [0xfffffffen, 1n, 0xffffffffn], + [0xffffffffn, 1n, 0xffffffffn], + [0x100000000n, 1n, 0x100000001n], + [0x100000001n, 1n, 0x100000001n], + [0x7ffffffffffffffen, 1n, 0x7fffffffffffffffn], + [0x7fffffffffffffffn, 1n, 0x7fffffffffffffffn], + [0x8000000000000000n, 1n, 0x8000000000000001n], + [0x8000000000000001n, 1n, 0x8000000000000001n], + [0xfffffffffffffffen, 1n, 0xffffffffffffffffn], + [0xffffffffffffffffn, 1n, 0xffffffffffffffffn], + [0x10000000000000000n, 1n, 0x10000000000000001n], + [0x10000000000000001n, 1n, 0x10000000000000001n], + [-0x10000000000000001n, 2n, -0x10000000000000001n], + [-0x10000000000000000n, 2n, -0xfffffffffffffffen], + [-0xffffffffffffffffn, 2n, -0xfffffffffffffffdn], + [-0xfffffffffffffffen, 2n, -0xfffffffffffffffen], + [-0x8000000000000001n, 2n, -0x8000000000000001n], + [-0x8000000000000000n, 2n, -0x7ffffffffffffffen], + [-0x7fffffffffffffffn, 2n, -0x7ffffffffffffffdn], + [-0x7ffffffffffffffen, 2n, -0x7ffffffffffffffen], + [-0x100000001n, 2n, -0x100000001n], + [-0x100000000n, 2n, -0xfffffffen], + [-0xffffffffn, 2n, -0xfffffffdn], + [-0xfffffffen, 2n, -0xfffffffen], + [-0x80000001n, 2n, -0x80000001n], + [-0x80000000n, 2n, -0x7ffffffen], + [-0x7fffffffn, 2n, -0x7ffffffdn], + [-0x7ffffffen, 2n, -0x7ffffffen], + [2n, 2n, 2n], + [0x7ffffffen, 2n, 0x7ffffffen], + [0x7fffffffn, 2n, 0x7fffffffn], + [0x80000000n, 2n, 0x80000002n], + [0x80000001n, 2n, 0x80000003n], + [0xfffffffen, 2n, 0xfffffffen], + [0xffffffffn, 2n, 0xffffffffn], + [0x100000000n, 2n, 0x100000002n], + [0x100000001n, 2n, 0x100000003n], + [0x7ffffffffffffffen, 2n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 2n, 0x7fffffffffffffffn], + [0x8000000000000000n, 2n, 0x8000000000000002n], + [0x8000000000000001n, 2n, 0x8000000000000003n], + [0xfffffffffffffffen, 2n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 2n, 0xffffffffffffffffn], + [0x10000000000000000n, 2n, 0x10000000000000002n], + [0x10000000000000001n, 2n, 0x10000000000000003n], + [-0x10000000000000001n, 0x7ffffffen, -0x10000000000000001n], + [-0x10000000000000000n, 0x7ffffffen, -0xffffffff80000002n], + [-0xffffffffffffffffn, 0x7ffffffen, -0xffffffff80000001n], + [-0xfffffffffffffffen, 0x7ffffffen, -0xffffffff80000002n], + [-0x8000000000000001n, 0x7ffffffen, -0x8000000000000001n], + [-0x8000000000000000n, 0x7ffffffen, -0x7fffffff80000002n], + [-0x7fffffffffffffffn, 0x7ffffffen, -0x7fffffff80000001n], + [-0x7ffffffffffffffen, 0x7ffffffen, -0x7fffffff80000002n], + [-0x100000001n, 0x7ffffffen, -0x100000001n], + [-0x100000000n, 0x7ffffffen, -0x80000002n], + [-0xffffffffn, 0x7ffffffen, -0x80000001n], + [-0xfffffffen, 0x7ffffffen, -0x80000002n], + [-0x80000001n, 0x7ffffffen, -0x80000001n], + [-0x80000000n, 0x7ffffffen, -2n], + [-0x7fffffffn, 0x7ffffffen, -1n], + [-0x7ffffffen, 0x7ffffffen, -2n], + [0x7ffffffen, 0x7ffffffen, 0x7ffffffen], + [0x7fffffffn, 0x7ffffffen, 0x7fffffffn], + [0x80000000n, 0x7ffffffen, 0xfffffffen], + [0x80000001n, 0x7ffffffen, 0xffffffffn], + [0xfffffffen, 0x7ffffffen, 0xfffffffen], + [0xffffffffn, 0x7ffffffen, 0xffffffffn], + [0x100000000n, 0x7ffffffen, 0x17ffffffen], + [0x100000001n, 0x7ffffffen, 0x17fffffffn], + [0x7ffffffffffffffen, 0x7ffffffen, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0x7ffffffen, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x7ffffffen, 0x800000007ffffffen], + [0x8000000000000001n, 0x7ffffffen, 0x800000007fffffffn], + [0xfffffffffffffffen, 0x7ffffffen, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0x7ffffffen, 0xffffffffffffffffn], + [0x10000000000000000n, 0x7ffffffen, 0x1000000007ffffffen], + [0x10000000000000001n, 0x7ffffffen, 0x1000000007fffffffn], + [-0x10000000000000001n, 0x7fffffffn, -0x10000000000000001n], + [-0x10000000000000000n, 0x7fffffffn, -0xffffffff80000001n], + [-0xffffffffffffffffn, 0x7fffffffn, -0xffffffff80000001n], + [-0xfffffffffffffffen, 0x7fffffffn, -0xffffffff80000001n], + [-0x8000000000000001n, 0x7fffffffn, -0x8000000000000001n], + [-0x8000000000000000n, 0x7fffffffn, -0x7fffffff80000001n], + [-0x7fffffffffffffffn, 0x7fffffffn, -0x7fffffff80000001n], + [-0x7ffffffffffffffen, 0x7fffffffn, -0x7fffffff80000001n], + [-0x100000001n, 0x7fffffffn, -0x100000001n], + [-0x100000000n, 0x7fffffffn, -0x80000001n], + [-0xffffffffn, 0x7fffffffn, -0x80000001n], + [-0xfffffffen, 0x7fffffffn, -0x80000001n], + [-0x80000001n, 0x7fffffffn, -0x80000001n], + [-0x80000000n, 0x7fffffffn, -1n], + [-0x7fffffffn, 0x7fffffffn, -1n], + [-0x7ffffffen, 0x7fffffffn, -1n], + [0x7fffffffn, 0x7fffffffn, 0x7fffffffn], + [0x80000000n, 0x7fffffffn, 0xffffffffn], + [0x80000001n, 0x7fffffffn, 0xffffffffn], + [0xfffffffen, 0x7fffffffn, 0xffffffffn], + [0xffffffffn, 0x7fffffffn, 0xffffffffn], + [0x100000000n, 0x7fffffffn, 0x17fffffffn], + [0x100000001n, 0x7fffffffn, 0x17fffffffn], + [0x7ffffffffffffffen, 0x7fffffffn, 0x7fffffffffffffffn], + [0x7fffffffffffffffn, 0x7fffffffn, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x7fffffffn, 0x800000007fffffffn], + [0x8000000000000001n, 0x7fffffffn, 0x800000007fffffffn], + [0xfffffffffffffffen, 0x7fffffffn, 0xffffffffffffffffn], + [0xffffffffffffffffn, 0x7fffffffn, 0xffffffffffffffffn], + [0x10000000000000000n, 0x7fffffffn, 0x1000000007fffffffn], + [0x10000000000000001n, 0x7fffffffn, 0x1000000007fffffffn], + [-0x10000000000000001n, 0x80000000n, -0x10000000000000001n], + [-0x10000000000000000n, 0x80000000n, -0xffffffff80000000n], + [-0xffffffffffffffffn, 0x80000000n, -0xffffffff7fffffffn], + [-0xfffffffffffffffen, 0x80000000n, -0xffffffff7ffffffen], + [-0x8000000000000001n, 0x80000000n, -0x8000000000000001n], + [-0x8000000000000000n, 0x80000000n, -0x7fffffff80000000n], + [-0x7fffffffffffffffn, 0x80000000n, -0x7fffffff7fffffffn], + [-0x7ffffffffffffffen, 0x80000000n, -0x7fffffff7ffffffen], + [-0x100000001n, 0x80000000n, -0x100000001n], + [-0x100000000n, 0x80000000n, -0x80000000n], + [-0xffffffffn, 0x80000000n, -0x7fffffffn], + [-0xfffffffen, 0x80000000n, -0x7ffffffen], + [-0x80000001n, 0x80000000n, -1n], + [-0x80000000n, 0x80000000n, -0x80000000n], + [-0x7fffffffn, 0x80000000n, -0x7fffffffn], + [-0x7ffffffen, 0x80000000n, -0x7ffffffen], + [0x80000000n, 0x80000000n, 0x80000000n], + [0x80000001n, 0x80000000n, 0x80000001n], + [0xfffffffen, 0x80000000n, 0xfffffffen], + [0xffffffffn, 0x80000000n, 0xffffffffn], + [0x100000000n, 0x80000000n, 0x180000000n], + [0x100000001n, 0x80000000n, 0x180000001n], + [0x7ffffffffffffffen, 0x80000000n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0x80000000n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x80000000n, 0x8000000080000000n], + [0x8000000000000001n, 0x80000000n, 0x8000000080000001n], + [0xfffffffffffffffen, 0x80000000n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0x80000000n, 0xffffffffffffffffn], + [0x10000000000000000n, 0x80000000n, 0x10000000080000000n], + [0x10000000000000001n, 0x80000000n, 0x10000000080000001n], + [-0x10000000000000001n, 0x80000001n, -0x10000000000000001n], + [-0x10000000000000000n, 0x80000001n, -0xffffffff7fffffffn], + [-0xffffffffffffffffn, 0x80000001n, -0xffffffff7fffffffn], + [-0xfffffffffffffffen, 0x80000001n, -0xffffffff7ffffffdn], + [-0x8000000000000001n, 0x80000001n, -0x8000000000000001n], + [-0x8000000000000000n, 0x80000001n, -0x7fffffff7fffffffn], + [-0x7fffffffffffffffn, 0x80000001n, -0x7fffffff7fffffffn], + [-0x7ffffffffffffffen, 0x80000001n, -0x7fffffff7ffffffdn], + [-0x100000001n, 0x80000001n, -0x100000001n], + [-0x100000000n, 0x80000001n, -0x7fffffffn], + [-0xffffffffn, 0x80000001n, -0x7fffffffn], + [-0xfffffffen, 0x80000001n, -0x7ffffffdn], + [-0x80000001n, 0x80000001n, -1n], + [-0x80000000n, 0x80000001n, -0x7fffffffn], + [-0x7fffffffn, 0x80000001n, -0x7fffffffn], + [-0x7ffffffen, 0x80000001n, -0x7ffffffdn], + [0x80000001n, 0x80000001n, 0x80000001n], + [0xfffffffen, 0x80000001n, 0xffffffffn], + [0xffffffffn, 0x80000001n, 0xffffffffn], + [0x100000000n, 0x80000001n, 0x180000001n], + [0x100000001n, 0x80000001n, 0x180000001n], + [0x7ffffffffffffffen, 0x80000001n, 0x7fffffffffffffffn], + [0x7fffffffffffffffn, 0x80000001n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x80000001n, 0x8000000080000001n], + [0x8000000000000001n, 0x80000001n, 0x8000000080000001n], + [0xfffffffffffffffen, 0x80000001n, 0xffffffffffffffffn], + [0xffffffffffffffffn, 0x80000001n, 0xffffffffffffffffn], + [0x10000000000000000n, 0x80000001n, 0x10000000080000001n], + [0x10000000000000001n, 0x80000001n, 0x10000000080000001n], + [-0x10000000000000001n, -0x80000001n, -1n], + [-0x10000000000000000n, -0x80000001n, -0x80000001n], + [-0xffffffffffffffffn, -0x80000001n, -0x80000001n], + [-0xfffffffffffffffen, -0x80000001n, -0x80000001n], + [-0x8000000000000001n, -0x80000001n, -1n], + [-0x8000000000000000n, -0x80000001n, -0x80000001n], + [-0x7fffffffffffffffn, -0x80000001n, -0x80000001n], + [-0x7ffffffffffffffen, -0x80000001n, -0x80000001n], + [-0x100000001n, -0x80000001n, -1n], + [-0x100000000n, -0x80000001n, -0x80000001n], + [-0xffffffffn, -0x80000001n, -0x80000001n], + [-0xfffffffen, -0x80000001n, -0x80000001n], + [-0x80000001n, -0x80000001n, -0x80000001n], + [-0x80000000n, -0x80000001n, -1n], + [-0x7fffffffn, -0x80000001n, -1n], + [-0x7ffffffen, -0x80000001n, -1n], + [0xfffffffen, -0x80000001n, -1n], + [0xffffffffn, -0x80000001n, -1n], + [0x100000000n, -0x80000001n, -0x80000001n], + [0x100000001n, -0x80000001n, -0x80000001n], + [0x7ffffffffffffffen, -0x80000001n, -1n], + [0x7fffffffffffffffn, -0x80000001n, -1n], + [0x8000000000000000n, -0x80000001n, -0x80000001n], + [0x8000000000000001n, -0x80000001n, -0x80000001n], + [0xfffffffffffffffen, -0x80000001n, -1n], + [0xffffffffffffffffn, -0x80000001n, -1n], + [0x10000000000000000n, -0x80000001n, -0x80000001n], + [0x10000000000000001n, -0x80000001n, -0x80000001n], + [-0x10000000000000001n, -0x80000000n, -1n], + [-0x10000000000000000n, -0x80000000n, -0x80000000n], + [-0xffffffffffffffffn, -0x80000000n, -0x7fffffffn], + [-0xfffffffffffffffen, -0x80000000n, -0x7ffffffen], + [-0x8000000000000001n, -0x80000000n, -1n], + [-0x8000000000000000n, -0x80000000n, -0x80000000n], + [-0x7fffffffffffffffn, -0x80000000n, -0x7fffffffn], + [-0x7ffffffffffffffen, -0x80000000n, -0x7ffffffen], + [-0x100000001n, -0x80000000n, -1n], + [-0x100000000n, -0x80000000n, -0x80000000n], + [-0xffffffffn, -0x80000000n, -0x7fffffffn], + [-0xfffffffen, -0x80000000n, -0x7ffffffen], + [-0x80000000n, -0x80000000n, -0x80000000n], + [-0x7fffffffn, -0x80000000n, -0x7fffffffn], + [-0x7ffffffen, -0x80000000n, -0x7ffffffen], + [0xfffffffen, -0x80000000n, -2n], + [0xffffffffn, -0x80000000n, -1n], + [0x100000000n, -0x80000000n, -0x80000000n], + [0x100000001n, -0x80000000n, -0x7fffffffn], + [0x7ffffffffffffffen, -0x80000000n, -2n], + [0x7fffffffffffffffn, -0x80000000n, -1n], + [0x8000000000000000n, -0x80000000n, -0x80000000n], + [0x8000000000000001n, -0x80000000n, -0x7fffffffn], + [0xfffffffffffffffen, -0x80000000n, -2n], + [0xffffffffffffffffn, -0x80000000n, -1n], + [0x10000000000000000n, -0x80000000n, -0x80000000n], + [0x10000000000000001n, -0x80000000n, -0x7fffffffn], + [-0x10000000000000001n, -0x7fffffffn, -1n], + [-0x10000000000000000n, -0x7fffffffn, -0x7fffffffn], + [-0xffffffffffffffffn, -0x7fffffffn, -0x7fffffffn], + [-0xfffffffffffffffen, -0x7fffffffn, -0x7ffffffdn], + [-0x8000000000000001n, -0x7fffffffn, -1n], + [-0x8000000000000000n, -0x7fffffffn, -0x7fffffffn], + [-0x7fffffffffffffffn, -0x7fffffffn, -0x7fffffffn], + [-0x7ffffffffffffffen, -0x7fffffffn, -0x7ffffffdn], + [-0x100000001n, -0x7fffffffn, -1n], + [-0x100000000n, -0x7fffffffn, -0x7fffffffn], + [-0xffffffffn, -0x7fffffffn, -0x7fffffffn], + [-0xfffffffen, -0x7fffffffn, -0x7ffffffdn], + [-0x7fffffffn, -0x7fffffffn, -0x7fffffffn], + [-0x7ffffffen, -0x7fffffffn, -0x7ffffffdn], + [0xfffffffen, -0x7fffffffn, -1n], + [0xffffffffn, -0x7fffffffn, -1n], + [0x100000000n, -0x7fffffffn, -0x7fffffffn], + [0x100000001n, -0x7fffffffn, -0x7fffffffn], + [0x7ffffffffffffffen, -0x7fffffffn, -1n], + [0x7fffffffffffffffn, -0x7fffffffn, -1n], + [0x8000000000000000n, -0x7fffffffn, -0x7fffffffn], + [0x8000000000000001n, -0x7fffffffn, -0x7fffffffn], + [0xfffffffffffffffen, -0x7fffffffn, -1n], + [0xffffffffffffffffn, -0x7fffffffn, -1n], + [0x10000000000000000n, -0x7fffffffn, -0x7fffffffn], + [0x10000000000000001n, -0x7fffffffn, -0x7fffffffn], + [-0x10000000000000001n, -0x7ffffffen, -1n], + [-0x10000000000000000n, -0x7ffffffen, -0x7ffffffen], + [-0xffffffffffffffffn, -0x7ffffffen, -0x7ffffffdn], + [-0xfffffffffffffffen, -0x7ffffffen, -0x7ffffffen], + [-0x8000000000000001n, -0x7ffffffen, -1n], + [-0x8000000000000000n, -0x7ffffffen, -0x7ffffffen], + [-0x7fffffffffffffffn, -0x7ffffffen, -0x7ffffffdn], + [-0x7ffffffffffffffen, -0x7ffffffen, -0x7ffffffen], + [-0x100000001n, -0x7ffffffen, -1n], + [-0x100000000n, -0x7ffffffen, -0x7ffffffen], + [-0xffffffffn, -0x7ffffffen, -0x7ffffffdn], + [-0xfffffffen, -0x7ffffffen, -0x7ffffffen], + [-0x7ffffffen, -0x7ffffffen, -0x7ffffffen], + [0xfffffffen, -0x7ffffffen, -2n], + [0xffffffffn, -0x7ffffffen, -1n], + [0x100000000n, -0x7ffffffen, -0x7ffffffen], + [0x100000001n, -0x7ffffffen, -0x7ffffffdn], + [0x7ffffffffffffffen, -0x7ffffffen, -2n], + [0x7fffffffffffffffn, -0x7ffffffen, -1n], + [0x8000000000000000n, -0x7ffffffen, -0x7ffffffen], + [0x8000000000000001n, -0x7ffffffen, -0x7ffffffdn], + [0xfffffffffffffffen, -0x7ffffffen, -2n], + [0xffffffffffffffffn, -0x7ffffffen, -1n], + [0x10000000000000000n, -0x7ffffffen, -0x7ffffffen], + [0x10000000000000001n, -0x7ffffffen, -0x7ffffffdn], + [-0x10000000000000001n, 0xfffffffen, -0x10000000000000001n], + [-0x10000000000000000n, 0xfffffffen, -0xffffffff00000002n], + [-0xffffffffffffffffn, 0xfffffffen, -0xffffffff00000001n], + [-0xfffffffffffffffen, 0xfffffffen, -0xffffffff00000002n], + [-0x8000000000000001n, 0xfffffffen, -0x8000000000000001n], + [-0x8000000000000000n, 0xfffffffen, -0x7fffffff00000002n], + [-0x7fffffffffffffffn, 0xfffffffen, -0x7fffffff00000001n], + [-0x7ffffffffffffffen, 0xfffffffen, -0x7fffffff00000002n], + [-0x100000001n, 0xfffffffen, -0x100000001n], + [-0x100000000n, 0xfffffffen, -2n], + [-0xffffffffn, 0xfffffffen, -1n], + [-0xfffffffen, 0xfffffffen, -2n], + [0xfffffffen, 0xfffffffen, 0xfffffffen], + [0xffffffffn, 0xfffffffen, 0xffffffffn], + [0x100000000n, 0xfffffffen, 0x1fffffffen], + [0x100000001n, 0xfffffffen, 0x1ffffffffn], + [0x7ffffffffffffffen, 0xfffffffen, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0xfffffffen, 0x7fffffffffffffffn], + [0x8000000000000000n, 0xfffffffen, 0x80000000fffffffen], + [0x8000000000000001n, 0xfffffffen, 0x80000000ffffffffn], + [0xfffffffffffffffen, 0xfffffffen, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0xfffffffen, 0xffffffffffffffffn], + [0x10000000000000000n, 0xfffffffen, 0x100000000fffffffen], + [0x10000000000000001n, 0xfffffffen, 0x100000000ffffffffn], + [-0x10000000000000001n, 0xffffffffn, -0x10000000000000001n], + [-0x10000000000000000n, 0xffffffffn, -0xffffffff00000001n], + [-0xffffffffffffffffn, 0xffffffffn, -0xffffffff00000001n], + [-0xfffffffffffffffen, 0xffffffffn, -0xffffffff00000001n], + [-0x8000000000000001n, 0xffffffffn, -0x8000000000000001n], + [-0x8000000000000000n, 0xffffffffn, -0x7fffffff00000001n], + [-0x7fffffffffffffffn, 0xffffffffn, -0x7fffffff00000001n], + [-0x7ffffffffffffffen, 0xffffffffn, -0x7fffffff00000001n], + [-0x100000001n, 0xffffffffn, -0x100000001n], + [-0x100000000n, 0xffffffffn, -1n], + [-0xffffffffn, 0xffffffffn, -1n], + [-0xfffffffen, 0xffffffffn, -1n], + [0xffffffffn, 0xffffffffn, 0xffffffffn], + [0x100000000n, 0xffffffffn, 0x1ffffffffn], + [0x100000001n, 0xffffffffn, 0x1ffffffffn], + [0x7ffffffffffffffen, 0xffffffffn, 0x7fffffffffffffffn], + [0x7fffffffffffffffn, 0xffffffffn, 0x7fffffffffffffffn], + [0x8000000000000000n, 0xffffffffn, 0x80000000ffffffffn], + [0x8000000000000001n, 0xffffffffn, 0x80000000ffffffffn], + [0xfffffffffffffffen, 0xffffffffn, 0xffffffffffffffffn], + [0xffffffffffffffffn, 0xffffffffn, 0xffffffffffffffffn], + [0x10000000000000000n, 0xffffffffn, 0x100000000ffffffffn], + [0x10000000000000001n, 0xffffffffn, 0x100000000ffffffffn], + [-0x10000000000000001n, 0x100000000n, -0x10000000000000001n], + [-0x10000000000000000n, 0x100000000n, -0xffffffff00000000n], + [-0xffffffffffffffffn, 0x100000000n, -0xfffffffeffffffffn], + [-0xfffffffffffffffen, 0x100000000n, -0xfffffffefffffffen], + [-0x8000000000000001n, 0x100000000n, -0x8000000000000001n], + [-0x8000000000000000n, 0x100000000n, -0x7fffffff00000000n], + [-0x7fffffffffffffffn, 0x100000000n, -0x7ffffffeffffffffn], + [-0x7ffffffffffffffen, 0x100000000n, -0x7ffffffefffffffen], + [-0x100000001n, 0x100000000n, -1n], + [-0x100000000n, 0x100000000n, -0x100000000n], + [-0xffffffffn, 0x100000000n, -0xffffffffn], + [-0xfffffffen, 0x100000000n, -0xfffffffen], + [0x100000000n, 0x100000000n, 0x100000000n], + [0x100000001n, 0x100000000n, 0x100000001n], + [0x7ffffffffffffffen, 0x100000000n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0x100000000n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x100000000n, 0x8000000100000000n], + [0x8000000000000001n, 0x100000000n, 0x8000000100000001n], + [0xfffffffffffffffen, 0x100000000n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0x100000000n, 0xffffffffffffffffn], + [0x10000000000000000n, 0x100000000n, 0x10000000100000000n], + [0x10000000000000001n, 0x100000000n, 0x10000000100000001n], + [-0x10000000000000001n, 0x100000001n, -0x10000000000000001n], + [-0x10000000000000000n, 0x100000001n, -0xfffffffeffffffffn], + [-0xffffffffffffffffn, 0x100000001n, -0xfffffffeffffffffn], + [-0xfffffffffffffffen, 0x100000001n, -0xfffffffefffffffdn], + [-0x8000000000000001n, 0x100000001n, -0x8000000000000001n], + [-0x8000000000000000n, 0x100000001n, -0x7ffffffeffffffffn], + [-0x7fffffffffffffffn, 0x100000001n, -0x7ffffffeffffffffn], + [-0x7ffffffffffffffen, 0x100000001n, -0x7ffffffefffffffdn], + [-0x100000001n, 0x100000001n, -1n], + [-0x100000000n, 0x100000001n, -0xffffffffn], + [-0xffffffffn, 0x100000001n, -0xffffffffn], + [-0xfffffffen, 0x100000001n, -0xfffffffdn], + [0x100000001n, 0x100000001n, 0x100000001n], + [0x7ffffffffffffffen, 0x100000001n, 0x7fffffffffffffffn], + [0x7fffffffffffffffn, 0x100000001n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x100000001n, 0x8000000100000001n], + [0x8000000000000001n, 0x100000001n, 0x8000000100000001n], + [0xfffffffffffffffen, 0x100000001n, 0xffffffffffffffffn], + [0xffffffffffffffffn, 0x100000001n, 0xffffffffffffffffn], + [0x10000000000000000n, 0x100000001n, 0x10000000100000001n], + [0x10000000000000001n, 0x100000001n, 0x10000000100000001n], + [-0x10000000000000001n, -0x100000001n, -1n], + [-0x10000000000000000n, -0x100000001n, -0x100000001n], + [-0xffffffffffffffffn, -0x100000001n, -0x100000001n], + [-0xfffffffffffffffen, -0x100000001n, -0x100000001n], + [-0x8000000000000001n, -0x100000001n, -1n], + [-0x8000000000000000n, -0x100000001n, -0x100000001n], + [-0x7fffffffffffffffn, -0x100000001n, -0x100000001n], + [-0x7ffffffffffffffen, -0x100000001n, -0x100000001n], + [-0x100000001n, -0x100000001n, -0x100000001n], + [-0x100000000n, -0x100000001n, -1n], + [-0xffffffffn, -0x100000001n, -1n], + [-0xfffffffen, -0x100000001n, -1n], + [0x7ffffffffffffffen, -0x100000001n, -1n], + [0x7fffffffffffffffn, -0x100000001n, -1n], + [0x8000000000000000n, -0x100000001n, -0x100000001n], + [0x8000000000000001n, -0x100000001n, -0x100000001n], + [0xfffffffffffffffen, -0x100000001n, -1n], + [0xffffffffffffffffn, -0x100000001n, -1n], + [0x10000000000000000n, -0x100000001n, -0x100000001n], + [0x10000000000000001n, -0x100000001n, -0x100000001n], + [-0x10000000000000001n, -0x100000000n, -1n], + [-0x10000000000000000n, -0x100000000n, -0x100000000n], + [-0xffffffffffffffffn, -0x100000000n, -0xffffffffn], + [-0xfffffffffffffffen, -0x100000000n, -0xfffffffen], + [-0x8000000000000001n, -0x100000000n, -1n], + [-0x8000000000000000n, -0x100000000n, -0x100000000n], + [-0x7fffffffffffffffn, -0x100000000n, -0xffffffffn], + [-0x7ffffffffffffffen, -0x100000000n, -0xfffffffen], + [-0x100000000n, -0x100000000n, -0x100000000n], + [-0xffffffffn, -0x100000000n, -0xffffffffn], + [-0xfffffffen, -0x100000000n, -0xfffffffen], + [0x7ffffffffffffffen, -0x100000000n, -2n], + [0x7fffffffffffffffn, -0x100000000n, -1n], + [0x8000000000000000n, -0x100000000n, -0x100000000n], + [0x8000000000000001n, -0x100000000n, -0xffffffffn], + [0xfffffffffffffffen, -0x100000000n, -2n], + [0xffffffffffffffffn, -0x100000000n, -1n], + [0x10000000000000000n, -0x100000000n, -0x100000000n], + [0x10000000000000001n, -0x100000000n, -0xffffffffn], + [-0x10000000000000001n, -0xffffffffn, -1n], + [-0x10000000000000000n, -0xffffffffn, -0xffffffffn], + [-0xffffffffffffffffn, -0xffffffffn, -0xffffffffn], + [-0xfffffffffffffffen, -0xffffffffn, -0xfffffffdn], + [-0x8000000000000001n, -0xffffffffn, -1n], + [-0x8000000000000000n, -0xffffffffn, -0xffffffffn], + [-0x7fffffffffffffffn, -0xffffffffn, -0xffffffffn], + [-0x7ffffffffffffffen, -0xffffffffn, -0xfffffffdn], + [-0xffffffffn, -0xffffffffn, -0xffffffffn], + [-0xfffffffen, -0xffffffffn, -0xfffffffdn], + [0x7ffffffffffffffen, -0xffffffffn, -1n], + [0x7fffffffffffffffn, -0xffffffffn, -1n], + [0x8000000000000000n, -0xffffffffn, -0xffffffffn], + [0x8000000000000001n, -0xffffffffn, -0xffffffffn], + [0xfffffffffffffffen, -0xffffffffn, -1n], + [0xffffffffffffffffn, -0xffffffffn, -1n], + [0x10000000000000000n, -0xffffffffn, -0xffffffffn], + [0x10000000000000001n, -0xffffffffn, -0xffffffffn], + [-0x10000000000000001n, -0xfffffffen, -1n], + [-0x10000000000000000n, -0xfffffffen, -0xfffffffen], + [-0xffffffffffffffffn, -0xfffffffen, -0xfffffffdn], + [-0xfffffffffffffffen, -0xfffffffen, -0xfffffffen], + [-0x8000000000000001n, -0xfffffffen, -1n], + [-0x8000000000000000n, -0xfffffffen, -0xfffffffen], + [-0x7fffffffffffffffn, -0xfffffffen, -0xfffffffdn], + [-0x7ffffffffffffffen, -0xfffffffen, -0xfffffffen], + [-0xfffffffen, -0xfffffffen, -0xfffffffen], + [0x7ffffffffffffffen, -0xfffffffen, -2n], + [0x7fffffffffffffffn, -0xfffffffen, -1n], + [0x8000000000000000n, -0xfffffffen, -0xfffffffen], + [0x8000000000000001n, -0xfffffffen, -0xfffffffdn], + [0xfffffffffffffffen, -0xfffffffen, -2n], + [0xffffffffffffffffn, -0xfffffffen, -1n], + [0x10000000000000000n, -0xfffffffen, -0xfffffffen], + [0x10000000000000001n, -0xfffffffen, -0xfffffffdn], + [-0x10000000000000001n, 0x7ffffffffffffffen, -0x10000000000000001n], + [-0x10000000000000000n, 0x7ffffffffffffffen, -0x8000000000000002n], + [-0xffffffffffffffffn, 0x7ffffffffffffffen, -0x8000000000000001n], + [-0xfffffffffffffffen, 0x7ffffffffffffffen, -0x8000000000000002n], + [-0x8000000000000001n, 0x7ffffffffffffffen, -0x8000000000000001n], + [-0x8000000000000000n, 0x7ffffffffffffffen, -2n], + [-0x7fffffffffffffffn, 0x7ffffffffffffffen, -1n], + [-0x7ffffffffffffffen, 0x7ffffffffffffffen, -2n], + [0x7ffffffffffffffen, 0x7ffffffffffffffen, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0x7ffffffffffffffen, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x7ffffffffffffffen, 0xfffffffffffffffen], + [0x8000000000000001n, 0x7ffffffffffffffen, 0xffffffffffffffffn], + [0xfffffffffffffffen, 0x7ffffffffffffffen, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0x7ffffffffffffffen, 0xffffffffffffffffn], + [0x10000000000000000n, 0x7ffffffffffffffen, 0x17ffffffffffffffen], + [0x10000000000000001n, 0x7ffffffffffffffen, 0x17fffffffffffffffn], + [-0x10000000000000001n, 0x7fffffffffffffffn, -0x10000000000000001n], + [-0x10000000000000000n, 0x7fffffffffffffffn, -0x8000000000000001n], + [-0xffffffffffffffffn, 0x7fffffffffffffffn, -0x8000000000000001n], + [-0xfffffffffffffffen, 0x7fffffffffffffffn, -0x8000000000000001n], + [-0x8000000000000001n, 0x7fffffffffffffffn, -0x8000000000000001n], + [-0x8000000000000000n, 0x7fffffffffffffffn, -1n], + [-0x7fffffffffffffffn, 0x7fffffffffffffffn, -1n], + [-0x7ffffffffffffffen, 0x7fffffffffffffffn, -1n], + [0x7fffffffffffffffn, 0x7fffffffffffffffn, 0x7fffffffffffffffn], + [0x8000000000000000n, 0x7fffffffffffffffn, 0xffffffffffffffffn], + [0x8000000000000001n, 0x7fffffffffffffffn, 0xffffffffffffffffn], + [0xfffffffffffffffen, 0x7fffffffffffffffn, 0xffffffffffffffffn], + [0xffffffffffffffffn, 0x7fffffffffffffffn, 0xffffffffffffffffn], + [0x10000000000000000n, 0x7fffffffffffffffn, 0x17fffffffffffffffn], + [0x10000000000000001n, 0x7fffffffffffffffn, 0x17fffffffffffffffn], + [-0x10000000000000001n, 0x8000000000000000n, -0x10000000000000001n], + [-0x10000000000000000n, 0x8000000000000000n, -0x8000000000000000n], + [-0xffffffffffffffffn, 0x8000000000000000n, -0x7fffffffffffffffn], + [-0xfffffffffffffffen, 0x8000000000000000n, -0x7ffffffffffffffen], + [-0x8000000000000001n, 0x8000000000000000n, -1n], + [-0x8000000000000000n, 0x8000000000000000n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 0x8000000000000000n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0x8000000000000000n, -0x7ffffffffffffffen], + [0x8000000000000000n, 0x8000000000000000n, 0x8000000000000000n], + [0x8000000000000001n, 0x8000000000000000n, 0x8000000000000001n], + [0xfffffffffffffffen, 0x8000000000000000n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0x8000000000000000n, 0xffffffffffffffffn], + [0x10000000000000000n, 0x8000000000000000n, 0x18000000000000000n], + [0x10000000000000001n, 0x8000000000000000n, 0x18000000000000001n], + [-0x10000000000000001n, 0x8000000000000001n, -0x10000000000000001n], + [-0x10000000000000000n, 0x8000000000000001n, -0x7fffffffffffffffn], + [-0xffffffffffffffffn, 0x8000000000000001n, -0x7fffffffffffffffn], + [-0xfffffffffffffffen, 0x8000000000000001n, -0x7ffffffffffffffdn], + [-0x8000000000000001n, 0x8000000000000001n, -1n], + [-0x8000000000000000n, 0x8000000000000001n, -0x7fffffffffffffffn], + [-0x7fffffffffffffffn, 0x8000000000000001n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0x8000000000000001n, -0x7ffffffffffffffdn], + [0x8000000000000001n, 0x8000000000000001n, 0x8000000000000001n], + [0xfffffffffffffffen, 0x8000000000000001n, 0xffffffffffffffffn], + [0xffffffffffffffffn, 0x8000000000000001n, 0xffffffffffffffffn], + [0x10000000000000000n, 0x8000000000000001n, 0x18000000000000001n], + [0x10000000000000001n, 0x8000000000000001n, 0x18000000000000001n], + [-0x10000000000000001n, -0x8000000000000001n, -1n], + [-0x10000000000000000n, -0x8000000000000001n, -0x8000000000000001n], + [-0xffffffffffffffffn, -0x8000000000000001n, -0x8000000000000001n], + [-0xfffffffffffffffen, -0x8000000000000001n, -0x8000000000000001n], + [-0x8000000000000001n, -0x8000000000000001n, -0x8000000000000001n], + [-0x8000000000000000n, -0x8000000000000001n, -1n], + [-0x7fffffffffffffffn, -0x8000000000000001n, -1n], + [-0x7ffffffffffffffen, -0x8000000000000001n, -1n], + [0xfffffffffffffffen, -0x8000000000000001n, -1n], + [0xffffffffffffffffn, -0x8000000000000001n, -1n], + [0x10000000000000000n, -0x8000000000000001n, -0x8000000000000001n], + [0x10000000000000001n, -0x8000000000000001n, -0x8000000000000001n], + [-0x10000000000000001n, -0x8000000000000000n, -1n], + [-0x10000000000000000n, -0x8000000000000000n, -0x8000000000000000n], + [-0xffffffffffffffffn, -0x8000000000000000n, -0x7fffffffffffffffn], + [-0xfffffffffffffffen, -0x8000000000000000n, -0x7ffffffffffffffen], + [-0x8000000000000000n, -0x8000000000000000n, -0x8000000000000000n], + [-0x7fffffffffffffffn, -0x8000000000000000n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0x8000000000000000n, -0x7ffffffffffffffen], + [0xfffffffffffffffen, -0x8000000000000000n, -2n], + [0xffffffffffffffffn, -0x8000000000000000n, -1n], + [0x10000000000000000n, -0x8000000000000000n, -0x8000000000000000n], + [0x10000000000000001n, -0x8000000000000000n, -0x7fffffffffffffffn], + [-0x10000000000000001n, -0x7fffffffffffffffn, -1n], + [-0x10000000000000000n, -0x7fffffffffffffffn, -0x7fffffffffffffffn], + [-0xffffffffffffffffn, -0x7fffffffffffffffn, -0x7fffffffffffffffn], + [-0xfffffffffffffffen, -0x7fffffffffffffffn, -0x7ffffffffffffffdn], + [-0x7fffffffffffffffn, -0x7fffffffffffffffn, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0x7fffffffffffffffn, -0x7ffffffffffffffdn], + [0xfffffffffffffffen, -0x7fffffffffffffffn, -1n], + [0xffffffffffffffffn, -0x7fffffffffffffffn, -1n], + [0x10000000000000000n, -0x7fffffffffffffffn, -0x7fffffffffffffffn], + [0x10000000000000001n, -0x7fffffffffffffffn, -0x7fffffffffffffffn], + [-0x10000000000000001n, -0x7ffffffffffffffen, -1n], + [-0x10000000000000000n, -0x7ffffffffffffffen, -0x7ffffffffffffffen], + [-0xffffffffffffffffn, -0x7ffffffffffffffen, -0x7ffffffffffffffdn], + [-0xfffffffffffffffen, -0x7ffffffffffffffen, -0x7ffffffffffffffen], + [-0x7ffffffffffffffen, -0x7ffffffffffffffen, -0x7ffffffffffffffen], + [0xfffffffffffffffen, -0x7ffffffffffffffen, -2n], + [0xffffffffffffffffn, -0x7ffffffffffffffen, -1n], + [0x10000000000000000n, -0x7ffffffffffffffen, -0x7ffffffffffffffen], + [0x10000000000000001n, -0x7ffffffffffffffen, -0x7ffffffffffffffdn], + [-0x10000000000000001n, 0xfffffffffffffffen, -0x10000000000000001n], + [-0x10000000000000000n, 0xfffffffffffffffen, -2n], + [-0xffffffffffffffffn, 0xfffffffffffffffen, -1n], + [-0xfffffffffffffffen, 0xfffffffffffffffen, -2n], + [0xfffffffffffffffen, 0xfffffffffffffffen, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0xfffffffffffffffen, 0xffffffffffffffffn], + [0x10000000000000000n, 0xfffffffffffffffen, 0x1fffffffffffffffen], + [0x10000000000000001n, 0xfffffffffffffffen, 0x1ffffffffffffffffn], + [-0x10000000000000001n, 0xffffffffffffffffn, -0x10000000000000001n], + [-0x10000000000000000n, 0xffffffffffffffffn, -1n], + [-0xffffffffffffffffn, 0xffffffffffffffffn, -1n], + [-0xfffffffffffffffen, 0xffffffffffffffffn, -1n], + [0xffffffffffffffffn, 0xffffffffffffffffn, 0xffffffffffffffffn], + [0x10000000000000000n, 0xffffffffffffffffn, 0x1ffffffffffffffffn], + [0x10000000000000001n, 0xffffffffffffffffn, 0x1ffffffffffffffffn], + [-0x10000000000000001n, 0x10000000000000000n, -1n], + [-0x10000000000000000n, 0x10000000000000000n, -0x10000000000000000n], + [-0xffffffffffffffffn, 0x10000000000000000n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 0x10000000000000000n, -0xfffffffffffffffen], + [0x10000000000000000n, 0x10000000000000000n, 0x10000000000000000n], + [0x10000000000000001n, 0x10000000000000000n, 0x10000000000000001n], + [-0x10000000000000001n, 0x10000000000000001n, -1n], + [-0x10000000000000000n, 0x10000000000000001n, -0xffffffffffffffffn], + [-0xffffffffffffffffn, 0x10000000000000001n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 0x10000000000000001n, -0xfffffffffffffffdn], + [0x10000000000000001n, 0x10000000000000001n, 0x10000000000000001n], + [-0x10000000000000001n, -0x10000000000000001n, -0x10000000000000001n], + [-0x10000000000000000n, -0x10000000000000001n, -1n], + [-0xffffffffffffffffn, -0x10000000000000001n, -1n], + [-0xfffffffffffffffen, -0x10000000000000001n, -1n], + [-0x10000000000000000n, -0x10000000000000000n, -0x10000000000000000n], + [-0xffffffffffffffffn, -0x10000000000000000n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, -0x10000000000000000n, -0xfffffffffffffffen], + [-0xffffffffffffffffn, -0xffffffffffffffffn, -0xffffffffffffffffn], + [-0xfffffffffffffffen, -0xffffffffffffffffn, -0xfffffffffffffffdn], + [-0xfffffffffffffffen, -0xfffffffffffffffen, -0xfffffffffffffffen], +]; + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs | rhs, expected); + assertEq(rhs | lhs, expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-pow-bailout.js b/js/src/jit-test/tests/bigint/bigint-pow-bailout.js new file mode 100644 index 0000000000..f88f6762dd --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-pow-bailout.js @@ -0,0 +1,31 @@ +// |jit-test| --ion-warmup-threshold=20 + +function testBailout() { + function f(v, r) { + for (var i = 0; i < 50; ++i) { + // Ensure DCE and LICM don't eliminate exponentiation when the power is negative. + if (i === 0) { + r(); + } + 1n ** v; + 1n ** v; + 1n ** v; + } + } + + var result = []; + function r() { + result.push("ok"); + } + + do { + result.length = 0; + try { + f(1n, r); + f(1n, r); + f(-1n, r); + } catch (e) {} + assertEq(result.length, 3); + } while (!inIon()); +} +testBailout(); diff --git a/js/src/jit-test/tests/bigint/bigint-pow-negative-exponent.js b/js/src/jit-test/tests/bigint/bigint-pow-negative-exponent.js new file mode 100644 index 0000000000..55dd0488c3 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-pow-negative-exponent.js @@ -0,0 +1,16 @@ +// Fallible BigInt exponentiation should have a resume point and its alias set +// should record that exceptions can be thrown. +function resumeAfterException(t) { + for (var i = 0; i < 2; i++) { + try { + var x = 1; + 1n ** 1n; + x = 2; + 1n ** t; + } catch (e) { + assertEq(x, 2); + } + } +} +resumeAfterException(1n); +resumeAfterException(-1n); diff --git a/js/src/jit-test/tests/bigint/bigint-pow.js b/js/src/jit-test/tests/bigint/bigint-pow.js new file mode 100644 index 0000000000..7c0d7b5eeb --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-pow.js @@ -0,0 +1,527 @@ +const tests = [ + [-0x10000000000000001n, 0n, 1n], + [-0x10000000000000000n, 0n, 1n], + [-0xffffffffffffffffn, 0n, 1n], + [-0xfffffffffffffffen, 0n, 1n], + [-0x8000000000000001n, 0n, 1n], + [-0x8000000000000000n, 0n, 1n], + [-0x7fffffffffffffffn, 0n, 1n], + [-0x7ffffffffffffffen, 0n, 1n], + [-0x100000001n, 0n, 1n], + [-0x100000000n, 0n, 1n], + [-0xffffffffn, 0n, 1n], + [-0xfffffffen, 0n, 1n], + [-0x80000001n, 0n, 1n], + [-0x80000000n, 0n, 1n], + [-0x7fffffffn, 0n, 1n], + [-0x7ffffffen, 0n, 1n], + [-9n, 0n, 1n], + [-8n, 0n, 1n], + [-7n, 0n, 1n], + [-6n, 0n, 1n], + [-5n, 0n, 1n], + [-4n, 0n, 1n], + [-3n, 0n, 1n], + [-2n, 0n, 1n], + [-1n, 0n, 1n], + [0n, 0n, 1n], + [1n, 0n, 1n], + [2n, 0n, 1n], + [3n, 0n, 1n], + [4n, 0n, 1n], + [5n, 0n, 1n], + [6n, 0n, 1n], + [7n, 0n, 1n], + [8n, 0n, 1n], + [9n, 0n, 1n], + [0x7ffffffen, 0n, 1n], + [0x7fffffffn, 0n, 1n], + [0x80000000n, 0n, 1n], + [0x80000001n, 0n, 1n], + [0xfffffffen, 0n, 1n], + [0xffffffffn, 0n, 1n], + [0x100000000n, 0n, 1n], + [0x100000001n, 0n, 1n], + [0x7ffffffffffffffen, 0n, 1n], + [0x7fffffffffffffffn, 0n, 1n], + [0x8000000000000000n, 0n, 1n], + [0x8000000000000001n, 0n, 1n], + [0xfffffffffffffffen, 0n, 1n], + [0xffffffffffffffffn, 0n, 1n], + [0x10000000000000000n, 0n, 1n], + [0x10000000000000001n, 0n, 1n], + [-0x10000000000000001n, 1n, -0x10000000000000001n], + [-0x10000000000000000n, 1n, -0x10000000000000000n], + [-0xffffffffffffffffn, 1n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 1n, -0xfffffffffffffffen], + [-0x8000000000000001n, 1n, -0x8000000000000001n], + [-0x8000000000000000n, 1n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 1n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 1n, -0x7ffffffffffffffen], + [-0x100000001n, 1n, -0x100000001n], + [-0x100000000n, 1n, -0x100000000n], + [-0xffffffffn, 1n, -0xffffffffn], + [-0xfffffffen, 1n, -0xfffffffen], + [-0x80000001n, 1n, -0x80000001n], + [-0x80000000n, 1n, -0x80000000n], + [-0x7fffffffn, 1n, -0x7fffffffn], + [-0x7ffffffen, 1n, -0x7ffffffen], + [-9n, 1n, -9n], + [-8n, 1n, -8n], + [-7n, 1n, -7n], + [-6n, 1n, -6n], + [-5n, 1n, -5n], + [-4n, 1n, -4n], + [-3n, 1n, -3n], + [-2n, 1n, -2n], + [-1n, 1n, -1n], + [0n, 1n, 0n], + [1n, 1n, 1n], + [2n, 1n, 2n], + [3n, 1n, 3n], + [4n, 1n, 4n], + [5n, 1n, 5n], + [6n, 1n, 6n], + [7n, 1n, 7n], + [8n, 1n, 8n], + [9n, 1n, 9n], + [0x7ffffffen, 1n, 0x7ffffffen], + [0x7fffffffn, 1n, 0x7fffffffn], + [0x80000000n, 1n, 0x80000000n], + [0x80000001n, 1n, 0x80000001n], + [0xfffffffen, 1n, 0xfffffffen], + [0xffffffffn, 1n, 0xffffffffn], + [0x100000000n, 1n, 0x100000000n], + [0x100000001n, 1n, 0x100000001n], + [0x7ffffffffffffffen, 1n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 1n, 0x7fffffffffffffffn], + [0x8000000000000000n, 1n, 0x8000000000000000n], + [0x8000000000000001n, 1n, 0x8000000000000001n], + [0xfffffffffffffffen, 1n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 1n, 0xffffffffffffffffn], + [0x10000000000000000n, 1n, 0x10000000000000000n], + [0x10000000000000001n, 1n, 0x10000000000000001n], + [-0x10000000000000001n, 2n, 0x100000000000000020000000000000001n], + [-0x10000000000000000n, 2n, 0x100000000000000000000000000000000n], + [-0xffffffffffffffffn, 2n, 0xfffffffffffffffe0000000000000001n], + [-0xfffffffffffffffen, 2n, 0xfffffffffffffffc0000000000000004n], + [-0x8000000000000001n, 2n, 0x40000000000000010000000000000001n], + [-0x8000000000000000n, 2n, 0x40000000000000000000000000000000n], + [-0x7fffffffffffffffn, 2n, 0x3fffffffffffffff0000000000000001n], + [-0x7ffffffffffffffen, 2n, 0x3ffffffffffffffe0000000000000004n], + [-0x100000001n, 2n, 0x10000000200000001n], + [-0x100000000n, 2n, 0x10000000000000000n], + [-0xffffffffn, 2n, 0xfffffffe00000001n], + [-0xfffffffen, 2n, 0xfffffffc00000004n], + [-0x80000001n, 2n, 0x4000000100000001n], + [-0x80000000n, 2n, 0x4000000000000000n], + [-0x7fffffffn, 2n, 0x3fffffff00000001n], + [-0x7ffffffen, 2n, 0x3ffffffe00000004n], + [-9n, 2n, 81n], + [-8n, 2n, 64n], + [-7n, 2n, 49n], + [-6n, 2n, 36n], + [-5n, 2n, 25n], + [-4n, 2n, 16n], + [-3n, 2n, 9n], + [-2n, 2n, 4n], + [-1n, 2n, 1n], + [0n, 2n, 0n], + [1n, 2n, 1n], + [2n, 2n, 4n], + [3n, 2n, 9n], + [4n, 2n, 16n], + [5n, 2n, 25n], + [6n, 2n, 36n], + [7n, 2n, 49n], + [8n, 2n, 64n], + [9n, 2n, 81n], + [0x7ffffffen, 2n, 0x3ffffffe00000004n], + [0x7fffffffn, 2n, 0x3fffffff00000001n], + [0x80000000n, 2n, 0x4000000000000000n], + [0x80000001n, 2n, 0x4000000100000001n], + [0xfffffffen, 2n, 0xfffffffc00000004n], + [0xffffffffn, 2n, 0xfffffffe00000001n], + [0x100000000n, 2n, 0x10000000000000000n], + [0x100000001n, 2n, 0x10000000200000001n], + [0x7ffffffffffffffen, 2n, 0x3ffffffffffffffe0000000000000004n], + [0x7fffffffffffffffn, 2n, 0x3fffffffffffffff0000000000000001n], + [0x8000000000000000n, 2n, 0x40000000000000000000000000000000n], + [0x8000000000000001n, 2n, 0x40000000000000010000000000000001n], + [0xfffffffffffffffen, 2n, 0xfffffffffffffffc0000000000000004n], + [0xffffffffffffffffn, 2n, 0xfffffffffffffffe0000000000000001n], + [0x10000000000000000n, 2n, 0x100000000000000000000000000000000n], + [0x10000000000000001n, 2n, 0x100000000000000020000000000000001n], + [-0x10000000000000001n, 3n, -0x1000000000000000300000000000000030000000000000001n], + [-0x10000000000000000n, 3n, -0x1000000000000000000000000000000000000000000000000n], + [-0xffffffffffffffffn, 3n, -0xfffffffffffffffd0000000000000002ffffffffffffffffn], + [-0xfffffffffffffffen, 3n, -0xfffffffffffffffa000000000000000bfffffffffffffff8n], + [-0x8000000000000001n, 3n, -0x2000000000000000c0000000000000018000000000000001n], + [-0x8000000000000000n, 3n, -0x200000000000000000000000000000000000000000000000n], + [-0x7fffffffffffffffn, 3n, -0x1fffffffffffffff40000000000000017fffffffffffffffn], + [-0x7ffffffffffffffen, 3n, -0x1ffffffffffffffe8000000000000005fffffffffffffff8n], + [-0x100000001n, 3n, -0x1000000030000000300000001n], + [-0x100000000n, 3n, -0x1000000000000000000000000n], + [-0xffffffffn, 3n, -0xfffffffd00000002ffffffffn], + [-0xfffffffen, 3n, -0xfffffffa0000000bfffffff8n], + [-0x80000001n, 3n, -0x20000000c000000180000001n], + [-0x80000000n, 3n, -0x200000000000000000000000n], + [-0x7fffffffn, 3n, -0x1fffffff400000017fffffffn], + [-0x7ffffffen, 3n, -0x1ffffffe80000005fffffff8n], + [-9n, 3n, -729n], + [-8n, 3n, -512n], + [-7n, 3n, -343n], + [-6n, 3n, -216n], + [-5n, 3n, -125n], + [-4n, 3n, -64n], + [-3n, 3n, -27n], + [-2n, 3n, -8n], + [-1n, 3n, -1n], + [0n, 3n, 0n], + [1n, 3n, 1n], + [2n, 3n, 8n], + [3n, 3n, 27n], + [4n, 3n, 64n], + [5n, 3n, 125n], + [6n, 3n, 216n], + [7n, 3n, 343n], + [8n, 3n, 512n], + [9n, 3n, 729n], + [0x7ffffffen, 3n, 0x1ffffffe80000005fffffff8n], + [0x7fffffffn, 3n, 0x1fffffff400000017fffffffn], + [0x80000000n, 3n, 0x200000000000000000000000n], + [0x80000001n, 3n, 0x20000000c000000180000001n], + [0xfffffffen, 3n, 0xfffffffa0000000bfffffff8n], + [0xffffffffn, 3n, 0xfffffffd00000002ffffffffn], + [0x100000000n, 3n, 0x1000000000000000000000000n], + [0x100000001n, 3n, 0x1000000030000000300000001n], + [0x7ffffffffffffffen, 3n, 0x1ffffffffffffffe8000000000000005fffffffffffffff8n], + [0x7fffffffffffffffn, 3n, 0x1fffffffffffffff40000000000000017fffffffffffffffn], + [0x8000000000000000n, 3n, 0x200000000000000000000000000000000000000000000000n], + [0x8000000000000001n, 3n, 0x2000000000000000c0000000000000018000000000000001n], + [0xfffffffffffffffen, 3n, 0xfffffffffffffffa000000000000000bfffffffffffffff8n], + [0xffffffffffffffffn, 3n, 0xfffffffffffffffd0000000000000002ffffffffffffffffn], + [0x10000000000000000n, 3n, 0x1000000000000000000000000000000000000000000000000n], + [0x10000000000000001n, 3n, 0x1000000000000000300000000000000030000000000000001n], + [-0x10000000000000001n, 4n, 0x10000000000000004000000000000000600000000000000040000000000000001n], + [-0x10000000000000000n, 4n, 0x10000000000000000000000000000000000000000000000000000000000000000n], + [-0xffffffffffffffffn, 4n, 0xfffffffffffffffc0000000000000005fffffffffffffffc0000000000000001n], + [-0xfffffffffffffffen, 4n, 0xfffffffffffffff80000000000000017ffffffffffffffe00000000000000010n], + [-0x8000000000000001n, 4n, 0x1000000000000000800000000000000180000000000000020000000000000001n], + [-0x8000000000000000n, 4n, 0x1000000000000000000000000000000000000000000000000000000000000000n], + [-0x7fffffffffffffffn, 4n, 0xfffffffffffffff80000000000000017ffffffffffffffe0000000000000001n], + [-0x7ffffffffffffffen, 4n, 0xfffffffffffffff0000000000000005fffffffffffffff00000000000000010n], + [-0x100000001n, 4n, 0x100000004000000060000000400000001n], + [-0x100000000n, 4n, 0x100000000000000000000000000000000n], + [-0xffffffffn, 4n, 0xfffffffc00000005fffffffc00000001n], + [-0xfffffffen, 4n, 0xfffffff800000017ffffffe000000010n], + [-0x80000001n, 4n, 0x10000000800000018000000200000001n], + [-0x80000000n, 4n, 0x10000000000000000000000000000000n], + [-0x7fffffffn, 4n, 0xfffffff800000017ffffffe00000001n], + [-0x7ffffffen, 4n, 0xfffffff00000005fffffff000000010n], + [-9n, 4n, 0x19a1n], + [-8n, 4n, 0x1000n], + [-7n, 4n, 0x961n], + [-6n, 4n, 0x510n], + [-5n, 4n, 625n], + [-4n, 4n, 256n], + [-3n, 4n, 81n], + [-2n, 4n, 16n], + [-1n, 4n, 1n], + [0n, 4n, 0n], + [1n, 4n, 1n], + [2n, 4n, 16n], + [3n, 4n, 81n], + [4n, 4n, 256n], + [5n, 4n, 625n], + [6n, 4n, 0x510n], + [7n, 4n, 0x961n], + [8n, 4n, 0x1000n], + [9n, 4n, 0x19a1n], + [0x7ffffffen, 4n, 0xfffffff00000005fffffff000000010n], + [0x7fffffffn, 4n, 0xfffffff800000017ffffffe00000001n], + [0x80000000n, 4n, 0x10000000000000000000000000000000n], + [0x80000001n, 4n, 0x10000000800000018000000200000001n], + [0xfffffffen, 4n, 0xfffffff800000017ffffffe000000010n], + [0xffffffffn, 4n, 0xfffffffc00000005fffffffc00000001n], + [0x100000000n, 4n, 0x100000000000000000000000000000000n], + [0x100000001n, 4n, 0x100000004000000060000000400000001n], + [0x7ffffffffffffffen, 4n, 0xfffffffffffffff0000000000000005fffffffffffffff00000000000000010n], + [0x7fffffffffffffffn, 4n, 0xfffffffffffffff80000000000000017ffffffffffffffe0000000000000001n], + [0x8000000000000000n, 4n, 0x1000000000000000000000000000000000000000000000000000000000000000n], + [0x8000000000000001n, 4n, 0x1000000000000000800000000000000180000000000000020000000000000001n], + [0xfffffffffffffffen, 4n, 0xfffffffffffffff80000000000000017ffffffffffffffe00000000000000010n], + [0xffffffffffffffffn, 4n, 0xfffffffffffffffc0000000000000005fffffffffffffffc0000000000000001n], + [0x10000000000000000n, 4n, 0x10000000000000000000000000000000000000000000000000000000000000000n], + [0x10000000000000001n, 4n, 0x10000000000000004000000000000000600000000000000040000000000000001n], + [-0x10000000000000001n, 31n, -0x1000000000000001f00000000000001d1000000000000118f0000000000007ae900000000000297b700000000000b3c190000000000281fc70000000000785f550000000001339e4b0000000002a4c2a500000000050bff3b000000000869540d000000000c4b2c13000000000fce5d3d0000000011e9e1230000000011e9e123000000000fce5d3d000000000c4b2c13000000000869540d00000000050bff3b0000000002a4c2a50000000001339e4b0000000000785f550000000000281fc700000000000b3c1900000000000297b70000000000007ae9000000000000118f00000000000001d1000000000000001f0000000000000001n], + [-0x10000000000000000n, 31n, -0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0xffffffffffffffffn, 31n, -0xffffffffffffffe100000000000001d0ffffffffffffee710000000000007ae8fffffffffffd684900000000000b3c18ffffffffffd7e0390000000000785f54fffffffffecc61b50000000002a4c2a4fffffffffaf400c5000000000869540cfffffffff3b4d3ed000000000fce5d3cffffffffee161edd0000000011e9e122fffffffff031a2c3000000000c4b2c12fffffffff796abf300000000050bff3afffffffffd5b3d5b0000000001339e4affffffffff87a0ab0000000000281fc6fffffffffff4c3e700000000000297b6ffffffffffff8517000000000000118efffffffffffffe2f000000000000001effffffffffffffffn], + [-0xfffffffffffffffen, 31n, -0xffffffffffffffc20000000000000743ffffffffffff7388000000000007ae8fffffffffffad09200000000002cf063fffffffffebf01c8000000000785f54fffffffffd98c36a000000000a930a93ffffffffd7a0062800000000869540cffffffffe769a7da000000003f3974f3ffffffff70b0f6e8000000011e9e122ffffffffe063458600000000312cb04bffffffffbcb55f980000000050bff3afffffffffab67ab60000000004ce792bfffffffffc3d0558000000000281fc6ffffffffffe987ce00000000000a5edbfffffffffffc28b800000000000118efffffffffffffc5e000000000000007bfffffffffffffff80000000n], + [-0x8000000000000001n, 31n, -0x2000000000000007c0000000000000e8800000000000118f000000000000f5d200000000000a5edc000000000059e0c8000000000281fc70000000000f0beaa0000000004ce792c00000000152615280000000050bff3b0000000010d2a81a00000000312cb04c000000007e72e9e8000000011e9e1230000000023d3c246000000003f3974f4000000006259609800000000869540d000000000a17fe76000000000a930a9400000000099cf258000000000785f550000000000503f8e00000000002cf064000000000014bdb8000000000007ae9000000000000231e000000000000074400000000000000f8000000000000001n], + [-0x8000000000000000n, 31n, -0x200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0x7fffffffffffffffn, 31n, -0x1ffffffffffffff840000000000000e87fffffffffffee71000000000000f5d1fffffffffff5a124000000000059e0c7fffffffffd7e0390000000000f0bea9fffffffffb3186d40000000015261527ffffffffaf400c50000000010d2a819ffffffffced34fb4000000007e72e9e7fffffffee161edd0000000023d3c245ffffffffc0c68b0c0000000062596097ffffffff796abf3000000000a17fe75fffffffff56cf56c00000000099cf257fffffffff87a0ab0000000000503f8dffffffffffd30f9c000000000014bdb7fffffffffff8517000000000000231dfffffffffffff8bc00000000000000f7fffffffffffffffn], + [-0x7ffffffffffffffen, 31n, -0x1ffffffffffffff080000000000003a1ffffffffffff738800000000000f5d1ffffffffffeb4248000000000167831fffffffffebf01c8000000000f0bea9fffffffff6630da8000000005498549ffffffffd7a00628000000010d2a819ffffffff9da69f6800000001f9cba79ffffffff70b0f6e8000000023d3c245ffffffff818d1618000000018965825ffffffffbcb55f9800000000a17fe75ffffffffead9ead8000000002673c95fffffffffc3d0558000000000503f8dffffffffffa61f38000000000052f6dfffffffffffc28b800000000000231dfffffffffffff17800000000000003dfffffffffffffff80000000n], + [-0x100000001n, 31n, -0x10000001f000001d10000118f00007ae9000297b7000b3c1900281fc700785f5501339e4b02a4c2a5050bff3b0869540d0c4b2c130fce5d3d11e9e12311e9e1230fce5d3d0c4b2c130869540d050bff3b02a4c2a501339e4b00785f5500281fc7000b3c19000297b700007ae90000118f000001d10000001f00000001n], + [-0x100000000n, 31n, -0x100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0xffffffffn, 31n, -0xffffffe1000001d0ffffee7100007ae8fffd6849000b3c18ffd7e03900785f54fecc61b502a4c2a4faf400c50869540cf3b4d3ed0fce5d3cee161edd11e9e122f031a2c30c4b2c12f796abf3050bff3afd5b3d5b01339e4aff87a0ab00281fc6fff4c3e7000297b6ffff85170000118efffffe2f0000001effffffffn], + [-0xfffffffen, 31n, -0xffffffc200000743ffff73880007ae8fffad092002cf063febf01c80785f54fd98c36a0a930a93d7a00628869540ce769a7da3f3974f370b0f6e91e9e122e0634586312cb04bbcb55f9850bff3afab67ab604ce792bfc3d05580281fc6ffe987ce000a5edbfffc28b8000118efffffc5e0000007bfffffff80000000n], + [-0x80000001n, 31n, -0x20000007c00000e88000118f0000f5d2000a5edc0059e0c80281fc700f0beaa04ce792c1526152850bff3b10d2a81a312cb04c7e72e9e91e9e12323d3c2463f3974f462596098869540d0a17fe760a930a94099cf2580785f5500503f8e002cf0640014bdb80007ae90000231e00000744000000f80000001n], + [-0x80000000n, 31n, -0x2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0x7fffffffn, 31n, -0x1ffffff8400000e87fffee710000f5d1fff5a1240059e0c7fd7e03900f0bea9fb3186d415261527af400c510d2a819ced34fb47e72e9e6e161edd23d3c245c0c68b0c62596097796abf30a17fe75f56cf56c099cf257f87a0ab00503f8dffd30f9c0014bdb7fff85170000231dfffff8bc000000f7fffffffn], + [-0x7ffffffen, 31n, -0x1ffffff0800003a1ffff7388000f5d1ffeb42480167831febf01c80f0bea9f6630da85498549d7a006290d2a8199da69f69f9cba7970b0f6ea3d3c245818d16198965825bcb55f98a17fe75ead9ead82673c95fc3d05580503f8dffa61f380052f6dfffc28b8000231dfffff178000003dfffffff80000000n], + [-9n, 31n, -0x4d0c24c65465ae7f329f1a339n], + [-8n, 31n, -0x200000000000000000000000n], + [-7n, 31n, -0x82823c992d2be80fcb9ab7n], + [-6n, 31n, -0x118e2a5afb51580000000n], + [-5n, 31n, -0xfc6f7c40458122964dn], + [-4n, 31n, -0x4000000000000000n], + [-3n, 31n, -0x231c54b5f6a2bn], + [-2n, 31n, -0x80000000n], + [-1n, 31n, -1n], + [0n, 31n, 0n], + [1n, 31n, 1n], + [2n, 31n, 0x80000000n], + [3n, 31n, 0x231c54b5f6a2bn], + [4n, 31n, 0x4000000000000000n], + [5n, 31n, 0xfc6f7c40458122964dn], + [6n, 31n, 0x118e2a5afb51580000000n], + [7n, 31n, 0x82823c992d2be80fcb9ab7n], + [8n, 31n, 0x200000000000000000000000n], + [9n, 31n, 0x4d0c24c65465ae7f329f1a339n], + [0x7ffffffen, 31n, 0x1ffffff0800003a1ffff7388000f5d1ffeb42480167831febf01c80f0bea9f6630da85498549d7a006290d2a8199da69f69f9cba7970b0f6ea3d3c245818d16198965825bcb55f98a17fe75ead9ead82673c95fc3d05580503f8dffa61f380052f6dfffc28b8000231dfffff178000003dfffffff80000000n], + [0x7fffffffn, 31n, 0x1ffffff8400000e87fffee710000f5d1fff5a1240059e0c7fd7e03900f0bea9fb3186d415261527af400c510d2a819ced34fb47e72e9e6e161edd23d3c245c0c68b0c62596097796abf30a17fe75f56cf56c099cf257f87a0ab00503f8dffd30f9c0014bdb7fff85170000231dfffff8bc000000f7fffffffn], + [0x80000000n, 31n, 0x2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x80000001n, 31n, 0x20000007c00000e88000118f0000f5d2000a5edc0059e0c80281fc700f0beaa04ce792c1526152850bff3b10d2a81a312cb04c7e72e9e91e9e12323d3c2463f3974f462596098869540d0a17fe760a930a94099cf2580785f5500503f8e002cf0640014bdb80007ae90000231e00000744000000f80000001n], + [0xfffffffen, 31n, 0xffffffc200000743ffff73880007ae8fffad092002cf063febf01c80785f54fd98c36a0a930a93d7a00628869540ce769a7da3f3974f370b0f6e91e9e122e0634586312cb04bbcb55f9850bff3afab67ab604ce792bfc3d05580281fc6ffe987ce000a5edbfffc28b8000118efffffc5e0000007bfffffff80000000n], + [0xffffffffn, 31n, 0xffffffe1000001d0ffffee7100007ae8fffd6849000b3c18ffd7e03900785f54fecc61b502a4c2a4faf400c50869540cf3b4d3ed0fce5d3cee161edd11e9e122f031a2c30c4b2c12f796abf3050bff3afd5b3d5b01339e4aff87a0ab00281fc6fff4c3e7000297b6ffff85170000118efffffe2f0000001effffffffn], + [0x100000000n, 31n, 0x100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x100000001n, 31n, 0x10000001f000001d10000118f00007ae9000297b7000b3c1900281fc700785f5501339e4b02a4c2a5050bff3b0869540d0c4b2c130fce5d3d11e9e12311e9e1230fce5d3d0c4b2c130869540d050bff3b02a4c2a501339e4b00785f5500281fc7000b3c19000297b700007ae90000118f000001d10000001f00000001n], + [0x7ffffffffffffffen, 31n, 0x1ffffffffffffff080000000000003a1ffffffffffff738800000000000f5d1ffffffffffeb4248000000000167831fffffffffebf01c8000000000f0bea9fffffffff6630da8000000005498549ffffffffd7a00628000000010d2a819ffffffff9da69f6800000001f9cba79ffffffff70b0f6e8000000023d3c245ffffffff818d1618000000018965825ffffffffbcb55f9800000000a17fe75ffffffffead9ead8000000002673c95fffffffffc3d0558000000000503f8dffffffffffa61f38000000000052f6dfffffffffffc28b800000000000231dfffffffffffff17800000000000003dfffffffffffffff80000000n], + [0x7fffffffffffffffn, 31n, 0x1ffffffffffffff840000000000000e87fffffffffffee71000000000000f5d1fffffffffff5a124000000000059e0c7fffffffffd7e0390000000000f0bea9fffffffffb3186d40000000015261527ffffffffaf400c50000000010d2a819ffffffffced34fb4000000007e72e9e7fffffffee161edd0000000023d3c245ffffffffc0c68b0c0000000062596097ffffffff796abf3000000000a17fe75fffffffff56cf56c00000000099cf257fffffffff87a0ab0000000000503f8dffffffffffd30f9c000000000014bdb7fffffffffff8517000000000000231dfffffffffffff8bc00000000000000f7fffffffffffffffn], + [0x8000000000000000n, 31n, 0x200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x8000000000000001n, 31n, 0x2000000000000007c0000000000000e8800000000000118f000000000000f5d200000000000a5edc000000000059e0c8000000000281fc70000000000f0beaa0000000004ce792c00000000152615280000000050bff3b0000000010d2a81a00000000312cb04c000000007e72e9e8000000011e9e1230000000023d3c246000000003f3974f4000000006259609800000000869540d000000000a17fe76000000000a930a9400000000099cf258000000000785f550000000000503f8e00000000002cf064000000000014bdb8000000000007ae9000000000000231e000000000000074400000000000000f8000000000000001n], + [0xfffffffffffffffen, 31n, 0xffffffffffffffc20000000000000743ffffffffffff7388000000000007ae8fffffffffffad09200000000002cf063fffffffffebf01c8000000000785f54fffffffffd98c36a000000000a930a93ffffffffd7a0062800000000869540cffffffffe769a7da000000003f3974f3ffffffff70b0f6e8000000011e9e122ffffffffe063458600000000312cb04bffffffffbcb55f980000000050bff3afffffffffab67ab60000000004ce792bfffffffffc3d0558000000000281fc6ffffffffffe987ce00000000000a5edbfffffffffffc28b800000000000118efffffffffffffc5e000000000000007bfffffffffffffff80000000n], + [0xffffffffffffffffn, 31n, 0xffffffffffffffe100000000000001d0ffffffffffffee710000000000007ae8fffffffffffd684900000000000b3c18ffffffffffd7e0390000000000785f54fffffffffecc61b50000000002a4c2a4fffffffffaf400c5000000000869540cfffffffff3b4d3ed000000000fce5d3cffffffffee161edd0000000011e9e122fffffffff031a2c3000000000c4b2c12fffffffff796abf300000000050bff3afffffffffd5b3d5b0000000001339e4affffffffff87a0ab0000000000281fc6fffffffffff4c3e700000000000297b6ffffffffffff8517000000000000118efffffffffffffe2f000000000000001effffffffffffffffn], + [0x10000000000000000n, 31n, 0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x10000000000000001n, 31n, 0x1000000000000001f00000000000001d1000000000000118f0000000000007ae900000000000297b700000000000b3c190000000000281fc70000000000785f550000000001339e4b0000000002a4c2a500000000050bff3b000000000869540d000000000c4b2c13000000000fce5d3d0000000011e9e1230000000011e9e123000000000fce5d3d000000000c4b2c13000000000869540d00000000050bff3b0000000002a4c2a50000000001339e4b0000000000785f550000000000281fc700000000000b3c1900000000000297b70000000000007ae9000000000000118f00000000000001d1000000000000001f0000000000000001n], + [-0x10000000000000001n, 32n, 0x1000000000000002000000000000001f000000000000013600000000000008c7800000000000312a000000000000dd3d00000000000335be00000000000a07f1c0000000001abfda00000000003d860f00000000007b0c1e0000000000d7553480000000014b48020000000001c1989500000000021b83e600000000023d3c2460000000021b83e60000000001c1989500000000014b48020000000000d7553480000000007b0c1e00000000003d860f00000000001abfda00000000000a07f1c0000000000335be000000000000dd3d000000000000312a00000000000008c78000000000000136000000000000001f000000000000000200000000000000001n], + [-0x10000000000000000n, 32n, 0x100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0xffffffffffffffffn, 32n, 0xffffffffffffffe000000000000001efffffffffffffeca00000000000008c77fffffffffffced6000000000000dd3cfffffffffffcca4200000000000a07f1bfffffffffe5402600000000003d860effffffffff84f3e20000000000d755347ffffffffeb4b7fe0000000001c19894fffffffffde47c1a00000000023d3c245ffffffffde47c1a0000000001c19894fffffffffeb4b7fe0000000000d755347fffffffff84f3e200000000003d860effffffffffe5402600000000000a07f1bffffffffffcca42000000000000dd3cffffffffffffced600000000000008c77ffffffffffffeca000000000000001efffffffffffffffe00000000000000001n], + [-0xfffffffffffffffen, 32n, 0xffffffffffffffc000000000000007bfffffffffffff6500000000000008c77fffffffffff9dac00000000000374f3ffffffffffe652100000000000a07f1bfffffffffca804c0000000000f6183bfffffffffc279f10000000000d755347ffffffffd696ffc0000000007066253ffffffffef23e0d00000000023d3c245ffffffffbc8f8340000000007066253fffffffff5a5bff0000000000d755347fffffffff09e7c40000000000f6183bffffffffff2a01300000000000a07f1bffffffffff9948400000000000374f3fffffffffffe76b00000000000008c77ffffffffffffd94000000000000007bfffffffffffffff0000000000000000100000000n], + [-0x8000000000000001n, 32n, 0x1000000000000004000000000000007c00000000000009b00000000000008c7800000000000625400000000000374f4000000000019adf00000000000a07f1c000000000357fb40000000000f6183c0000000003d860f0000000000d75534800000000296900400000000070662540000000010dc1f300000000023d3c2460000000043707cc0000000007066254000000000a5a4010000000000d755348000000000f6183c0000000000f6183c0000000000d5fed00000000000a07f1c000000000066b7c00000000000374f400000000000189500000000000008c7800000000000026c000000000000007c00000000000000100000000000000001n], + [-0x8000000000000000n, 32n, 0x1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0x7fffffffffffffffn, 32n, 0xffffffffffffffc000000000000007bfffffffffffff6500000000000008c77fffffffffff9dac00000000000374f3ffffffffffe652100000000000a07f1bfffffffffca804c0000000000f6183bfffffffffc279f10000000000d755347ffffffffd696ffc0000000007066253ffffffffef23e0d00000000023d3c245ffffffffbc8f8340000000007066253fffffffff5a5bff0000000000d755347fffffffff09e7c40000000000f6183bffffffffff2a01300000000000a07f1bffffffffff9948400000000000374f3fffffffffffe76b00000000000008c77ffffffffffffd94000000000000007bfffffffffffffff00000000000000001n], + [-0x7ffffffffffffffen, 32n, 0xffffffffffffff800000000000001efffffffffffffb280000000000008c77fffffffffff3b5800000000000dd3cfffffffffff329080000000000a07f1bfffffffff9500980000000003d860efffffffffe13cf88000000000d755347ffffffffad2dff8000000001c19894fffffffff791f0680000000023d3c245ffffffff791f068000000001c19894fffffffffad2dff8000000000d755347ffffffffe13cf880000000003d860effffffffff9500980000000000a07f1bffffffffff3290800000000000dd3cffffffffffff3b580000000000008c77ffffffffffffb2800000000000001efffffffffffffff8000000000000000100000000n], + [-0x100000001n, 32n, 0x100000020000001f00000136000008c78000312a0000dd3d000335be000a07f1c01abfda003d860f007b0c1e00d75534814b480201c19895021b83e6023d3c24621b83e601c19895014b480200d75534807b0c1e003d860f001abfda000a07f1c00335be0000dd3d0000312a000008c7800001360000001f00000002000000001n], + [-0x100000000n, 32n, 0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0xffffffffn, 32n, 0xffffffe0000001efffffeca000008c77fffced60000dd3cfffcca42000a07f1bfe54026003d860eff84f3e200d755347eb4b7fe01c19894fde47c1a023d3c245de47c1a01c19894feb4b7fe00d755347f84f3e2003d860effe54026000a07f1bffcca420000dd3cffffced6000008c77ffffeca0000001efffffffe000000001n], + [-0xfffffffen, 32n, 0xffffffc0000007bfffff65000008c77fff9dac000374f3ffe6521000a07f1bfca804c00f6183bfc279f100d755347d696ffc07066253ef23e0d023d3c245bc8f83407066253f5a5bff00d755347f09e7c400f6183bff2a013000a07f1bff99484000374f3fffe76b000008c77ffffd940000007bfffffff00000000100000000n], + [-0x80000001n, 32n, 0x100000040000007c000009b000008c780006254000374f40019adf000a07f1c0357fb400f6183c03d860f00d75534829690040706625410dc1f3023d3c24643707cc070662540a5a40100d7553480f6183c00f6183c00d5fed000a07f1c0066b7c000374f40001895000008c78000026c0000007c0000001000000001n], + [-0x80000000n, 32n, 0x100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0x7fffffffn, 32n, 0xffffffc0000007bfffff65000008c77fff9dac000374f3ffe6521000a07f1bfca804c00f6183bfc279f100d755347d696ffc07066253ef23e0d023d3c245bc8f83407066253f5a5bff00d755347f09e7c400f6183bff2a013000a07f1bff99484000374f3fffe76b000008c77ffffd940000007bfffffff000000001n], + [-0x7ffffffen, 32n, 0xffffff8000001efffffb2800008c77fff3b58000dd3cfff3290800a07f1bf95009803d860efe13cf880d755347ad2dff81c19894f791f06823d3c245791f0681c19894fad2dff80d755347e13cf8803d860eff95009800a07f1bff32908000dd3cffff3b5800008c77ffffb28000001efffffff80000000100000000n], + [-9n, 32n, 0x2b56d4af8f7932278c797ebd01n], + [-8n, 32n, 0x1000000000000000000000000n], + [-7n, 32n, 0x3918fa8303c33586e913b01n], + [-6n, 32n, 0x6954fe21e3e8100000000n], + [-5n, 32n, 0x4ee2d6d415b85acef81n], + [-4n, 32n, 0x10000000000000000n], + [-3n, 32n, 0x6954fe21e3e81n], + [-2n, 32n, 0x100000000n], + [-1n, 32n, 1n], + [0n, 32n, 0n], + [1n, 32n, 1n], + [2n, 32n, 0x100000000n], + [3n, 32n, 0x6954fe21e3e81n], + [4n, 32n, 0x10000000000000000n], + [5n, 32n, 0x4ee2d6d415b85acef81n], + [6n, 32n, 0x6954fe21e3e8100000000n], + [7n, 32n, 0x3918fa8303c33586e913b01n], + [8n, 32n, 0x1000000000000000000000000n], + [9n, 32n, 0x2b56d4af8f7932278c797ebd01n], + [0x7ffffffen, 32n, 0xffffff8000001efffffb2800008c77fff3b58000dd3cfff3290800a07f1bf95009803d860efe13cf880d755347ad2dff81c19894f791f06823d3c245791f0681c19894fad2dff80d755347e13cf8803d860eff95009800a07f1bff32908000dd3cffff3b5800008c77ffffb28000001efffffff80000000100000000n], + [0x7fffffffn, 32n, 0xffffffc0000007bfffff65000008c77fff9dac000374f3ffe6521000a07f1bfca804c00f6183bfc279f100d755347d696ffc07066253ef23e0d023d3c245bc8f83407066253f5a5bff00d755347f09e7c400f6183bff2a013000a07f1bff99484000374f3fffe76b000008c77ffffd940000007bfffffff000000001n], + [0x80000000n, 32n, 0x100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x80000001n, 32n, 0x100000040000007c000009b000008c780006254000374f40019adf000a07f1c0357fb400f6183c03d860f00d75534829690040706625410dc1f3023d3c24643707cc070662540a5a40100d7553480f6183c00f6183c00d5fed000a07f1c0066b7c000374f40001895000008c78000026c0000007c0000001000000001n], + [0xfffffffen, 32n, 0xffffffc0000007bfffff65000008c77fff9dac000374f3ffe6521000a07f1bfca804c00f6183bfc279f100d755347d696ffc07066253ef23e0d023d3c245bc8f83407066253f5a5bff00d755347f09e7c400f6183bff2a013000a07f1bff99484000374f3fffe76b000008c77ffffd940000007bfffffff00000000100000000n], + [0xffffffffn, 32n, 0xffffffe0000001efffffeca000008c77fffced60000dd3cfffcca42000a07f1bfe54026003d860eff84f3e200d755347eb4b7fe01c19894fde47c1a023d3c245de47c1a01c19894feb4b7fe00d755347f84f3e2003d860effe54026000a07f1bffcca420000dd3cffffced6000008c77ffffeca0000001efffffffe000000001n], + [0x100000000n, 32n, 0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x100000001n, 32n, 0x100000020000001f00000136000008c78000312a0000dd3d000335be000a07f1c01abfda003d860f007b0c1e00d75534814b480201c19895021b83e6023d3c24621b83e601c19895014b480200d75534807b0c1e003d860f001abfda000a07f1c00335be0000dd3d0000312a000008c7800001360000001f00000002000000001n], + [0x7ffffffffffffffen, 32n, 0xffffffffffffff800000000000001efffffffffffffb280000000000008c77fffffffffff3b5800000000000dd3cfffffffffff329080000000000a07f1bfffffffff9500980000000003d860efffffffffe13cf88000000000d755347ffffffffad2dff8000000001c19894fffffffff791f0680000000023d3c245ffffffff791f068000000001c19894fffffffffad2dff8000000000d755347ffffffffe13cf880000000003d860effffffffff9500980000000000a07f1bffffffffff3290800000000000dd3cffffffffffff3b580000000000008c77ffffffffffffb2800000000000001efffffffffffffff8000000000000000100000000n], + [0x7fffffffffffffffn, 32n, 0xffffffffffffffc000000000000007bfffffffffffff6500000000000008c77fffffffffff9dac00000000000374f3ffffffffffe652100000000000a07f1bfffffffffca804c0000000000f6183bfffffffffc279f10000000000d755347ffffffffd696ffc0000000007066253ffffffffef23e0d00000000023d3c245ffffffffbc8f8340000000007066253fffffffff5a5bff0000000000d755347fffffffff09e7c40000000000f6183bffffffffff2a01300000000000a07f1bffffffffff9948400000000000374f3fffffffffffe76b00000000000008c77ffffffffffffd94000000000000007bfffffffffffffff00000000000000001n], + [0x8000000000000000n, 32n, 0x1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x8000000000000001n, 32n, 0x1000000000000004000000000000007c00000000000009b00000000000008c7800000000000625400000000000374f4000000000019adf00000000000a07f1c000000000357fb40000000000f6183c0000000003d860f0000000000d75534800000000296900400000000070662540000000010dc1f300000000023d3c2460000000043707cc0000000007066254000000000a5a4010000000000d755348000000000f6183c0000000000f6183c0000000000d5fed00000000000a07f1c000000000066b7c00000000000374f400000000000189500000000000008c7800000000000026c000000000000007c00000000000000100000000000000001n], + [0xfffffffffffffffen, 32n, 0xffffffffffffffc000000000000007bfffffffffffff6500000000000008c77fffffffffff9dac00000000000374f3ffffffffffe652100000000000a07f1bfffffffffca804c0000000000f6183bfffffffffc279f10000000000d755347ffffffffd696ffc0000000007066253ffffffffef23e0d00000000023d3c245ffffffffbc8f8340000000007066253fffffffff5a5bff0000000000d755347fffffffff09e7c40000000000f6183bffffffffff2a01300000000000a07f1bffffffffff9948400000000000374f3fffffffffffe76b00000000000008c77ffffffffffffd94000000000000007bfffffffffffffff0000000000000000100000000n], + [0xffffffffffffffffn, 32n, 0xffffffffffffffe000000000000001efffffffffffffeca00000000000008c77fffffffffffced6000000000000dd3cfffffffffffcca4200000000000a07f1bfffffffffe5402600000000003d860effffffffff84f3e20000000000d755347ffffffffeb4b7fe0000000001c19894fffffffffde47c1a00000000023d3c245ffffffffde47c1a0000000001c19894fffffffffeb4b7fe0000000000d755347fffffffff84f3e200000000003d860effffffffffe5402600000000000a07f1bffffffffffcca42000000000000dd3cffffffffffffced600000000000008c77ffffffffffffeca000000000000001efffffffffffffffe00000000000000001n], + [0x10000000000000000n, 32n, 0x100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x10000000000000001n, 32n, 0x1000000000000002000000000000001f000000000000013600000000000008c7800000000000312a000000000000dd3d00000000000335be00000000000a07f1c0000000001abfda00000000003d860f00000000007b0c1e0000000000d7553480000000014b48020000000001c1989500000000021b83e600000000023d3c2460000000021b83e60000000001c1989500000000014b48020000000000d7553480000000007b0c1e00000000003d860f00000000001abfda00000000000a07f1c0000000000335be000000000000dd3d000000000000312a00000000000008c78000000000000136000000000000001f000000000000000200000000000000001n], + [-0x10000000000000001n, 63n, -0x1000000000000003f00000000000007a10000000000009b1f00000000000916d100000000006b406f00000000040cc4310000000020fa3d8f00000000e6d7aee90000000582b449570000001dc1cd8c090000008f5ff5a2b70000026d4a7dc119000009855f4fce2700002200e6af4df900006f1402a30fc700014d3c07e92f550003994b9d6691eb0009326be79458750015c842ee953d4b002febc6734853a500621fbaec0e009b00bb53d937037585014dee83358bbb3b022c8d85593e380d036438eebe6b4d3304f4f0bf6512faad06caeb193ea83b1308bbc08e2bfcde3d0a8a52534f924a030bf2190915ea0f9d0cb764f927d821230cb764f927d821230bf2190915ea0f9d0a8a52534f924a0308bbc08e2bfcde3d06caeb193ea83b1304f4f0bf6512faad036438eebe6b4d33022c8d85593e380d014dee83358bbb3b00bb53d93703758500621fbaec0e009b002febc6734853a50015c842ee953d4b0009326be79458750003994b9d6691eb00014d3c07e92f5500006f1402a30fc700002200e6af4df9000009855f4fce270000026d4a7dc1190000008f5ff5a2b70000001dc1cd8c090000000582b4495700000000e6d7aee90000000020fa3d8f00000000040cc43100000000006b406f00000000000916d10000000000009b1f00000000000007a1000000000000003f0000000000000001n], + [-0x10000000000000000n, 63n, -0x1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0xffffffffffffffffn, 63n, -0xffffffffffffffc100000000000007a0ffffffffffff64e100000000000916d0ffffffffff94bf9100000000040cc430ffffffffdf05c27100000000e6d7aee8fffffffa7d4bb6a90000001dc1cd8c08ffffff70a00a5d490000026d4a7dc118fffff67aa0b031d900002200e6af4df8ffff90ebfd5cf03900014d3c07e92f54fffc66b462996e150009326be7945874ffea37bd116ac2b5002febc6734853a4ff9de04513f1ff6500bb53d937037584feb2117cca7444c5022c8d85593e380cfc9bc7114194b2cd04f4f0bf6512faacf93514e6c157c4ed08bbc08e2bfcde3cf575adacb06db5fd0bf2190915ea0f9cf3489b06d827dedd0cb764f927d82122f40de6f6ea15f0630a8a52534f924a02f7443f71d40321c306caeb193ea83b12fb0b0f409aed0553036438eebe6b4d32fdd3727aa6c1c7f3014dee83358bbb3aff44ac26c8fc8a7b00621fbaec0e009affd014398cb7ac5b0015c842ee953d4afff6cd94186ba78b0003994b9d6691eafffeb2c3f816d0ab00006f1402a30fc6ffffddff1950b207000009855f4fce26fffffd92b5823ee70000008f5ff5a2b6ffffffe23e3273f70000000582b44956ffffffff192851170000000020fa3d8efffffffffbf33bcf00000000006b406efffffffffff6e92f0000000000009b1efffffffffffff85f000000000000003effffffffffffffffn], + [-0xfffffffffffffffen, 63n, -0xffffffffffffff820000000000001e83fffffffffffb27080000000000916d0ffffffffff297f2200000000103310c3fffffffef82e13880000000e6d7aee8fffffff4fa976d520000007707363023fffffb850052ea48000026d4a7dc118ffffecf5416063b2000088039abd37e3fffc875feae781c80014d3c07e92f54fff8cd68c532dc2a0024c9af9e5161d3ff51bde88b5615a802febc6734853a4ff3bc08a27e3feca02ed4f64dc0dd613f5908be653a2262822c8d85593e380cf9378e228329659a13d3c2fd944beab3c9a8a7360abe27688bbc08e2bfcde3ceaeb5b5960db6bfa2fc8642457a83e739a44d836c13ef6e8cb764f927d82122e81bcdedd42be0c62a29494d3e49280bba21fb8ea0190e186caeb193ea83b12f6161e8135da0aa60d90e3baf9ad34cbee9b93d5360e3f9814dee83358bbb3afe89584d91f914f601887eebb038026bfe80a1cc65bd62d8015c842ee953d4affed9b2830d74f16000e652e759a47abfff5961fc0b685580006f1402a30fc6ffffbbfe32a1640e000026157d3f389bffffec95ac11f738000008f5ff5a2b6ffffffc47c64e7ee000000160ad1255bfffffff8c94288b8000000020fa3d8efffffffff7e6779e0000000001ad01bbffffffffffb74978000000000009b1efffffffffffff0be00000000000000fbfffffffffffffff8000000000000000n], + [-0x8000000000000001n, 63n, -0x200000000000000fc0000000000003d08000000000009b1f0000000000122da20000000001ad01bc0000000020662188000000020fa3d8f00000001cdaf5dd2000000160ad1255c000000ee0e6c6048000008f5ff5a2b7000004da94fb8232000026157d3f389c00011007357a6fc80006f1402a30fc700029a780fd25eaa000e652e759a47ac0049935f3ca2c3a8015c842ee953d4b005fd78ce690a74a01887eebb038026c05da9ec9b81bac2814dee83358bbb3b04591b0ab27c701a0d90e3baf9ad34cc27a785fb2897d5686caeb193ea83b131177811c57f9bc7a2a29494d3e49280c5f90c848af507ce8cb764f927d82123196ec9f24fb042462fc8642457a83e745452929a7c9250188bbc08e2bfcde3d0d95d6327d50762613d3c2fd944beab41b21c775f35a699822c8d85593e380d029bdd066b17767602ed4f64dc0dd6140310fdd7607004d802febc6734853a5002b9085dd2a7a960024c9af9e5161d4001cca5ceb348f580014d3c07e92f550000de2805461f8e000088039abd37e400004c2afa7e7138000026d4a7dc1190000011ebfeb456e00000077073630240000002c15a24ab80000000e6d7aee90000000041f47b1e00000000103310c400000000035a03780000000000916d1000000000001363e0000000000001e8400000000000001f8000000000000001n], + [-0x8000000000000000n, 63n, -0x200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0x7fffffffffffffffn, 63n, -0x1ffffffffffffff040000000000003d07fffffffffff64e10000000000122da1fffffffffe52fe440000000020662187fffffffdf05c27100000001cdaf5dd1ffffffe9f52edaa4000000ee0e6c6047fffff70a00a5d49000004da94fb8231ffffd9ea82c0c76400011007357a6fc7fff90ebfd5cf03900029a780fd25ea9fff19ad18a65b8540049935f3ca2c3a7fea37bd116ac2b5005fd78ce690a749fe7781144fc7fd9405da9ec9b81bac27eb2117cca7444c504591b0ab27c7019f26f1c450652cb3427a785fb2897d56793514e6c157c4ed1177811c57f9bc79d5d6b6b2c1b6d7f45f90c848af507ce73489b06d827dedd196ec9f24fb04245d0379bdba857c18c5452929a7c9250177443f71d40321c30d95d6327d507625ec2c3d026bb4154c1b21c775f35a6997dd3727aa6c1c7f3029bdd066b177675fd12b09b23f229ec0310fdd7607004d7fd014398cb7ac5b002b9085dd2a7a95ffdb365061ae9e2c001cca5ceb348f57ffeb2c3f816d0ab0000de2805461f8dffff77fc6542c81c00004c2afa7e7137ffffd92b5823ee70000011ebfeb456dffffff88f8c9cfdc0000002c15a24ab7fffffff192851170000000041f47b1dffffffffefccef3c00000000035a0377ffffffffff6e92f000000000001363dffffffffffffe17c00000000000001f7fffffffffffffffn], + [-0x7ffffffffffffffen, 63n, -0x1fffffffffffffe08000000000000f41fffffffffffb2708000000000122da1fffffffffca5fc88000000008198861fffffffef82e13880000001cdaf5dd1ffffffd3ea5db548000003b839b1811fffffb850052ea4800004da94fb8231ffffb3d505818ec80004401cd5e9bf1fffc875feae781c80029a780fd25ea9ffe335a314cb70a801264d7cf28b0e9ff51bde88b5615a805fd78ce690a749fcef02289f8ffb28176a7b26e06eb09f5908be653a226284591b0ab27c7019e4de388a0ca596689e9e17eca25f559c9a8a7360abe2769177811c57f9bc79abad6d65836dafe97e432122bd41f399a44d836c13ef6e996ec9f24fb04245a06f37b750af8319514a4a69f249405ba21fb8ea0190e18d95d6327d507625d8587a04d7682a986c871dd7cd69a65ee9b93d5360e3f9829bdd066b177675fa25613647e453d80c43f75d81c0135fe80a1cc65bd62d802b9085dd2a7a95ffb66ca0c35d3c5800732973acd23d5fff5961fc0b68558000de2805461f8dfffeeff8ca859038000130abe9f9c4dffffec95ac11f738000011ebfeb456dffffff11f1939fb8000000b056892adfffffff8c94288b8000000041f47b1dffffffffdf99de78000000000d680ddffffffffffb7497800000000001363dffffffffffffc2f800000000000007dfffffffffffffff8000000000000000n], + [-0x100000001n, 63n, -0x10000003f000007a100009b1f000916d1006b406f040cc43120fa3d8fe6d7aeee82b44974c1cd8c985ff5a5244a7dca9e5f4ff027e6afbd0d02a45d0307ecc8a09d6fc456e7aa20b7eec5291173aa735fecc954743851640837b848c05ca270fbc3603df26bdde5c64763fba1368730905b84630c22a17496348f861c33ca3a2c207461f0584e0a9132c7c956439d2bd26877339bc097dab85a8c269036470f143765953fec3dec61735e1be7ee9e6fb6e797f1c09d67df2707e99e6902a331c7e6af577e5f4fd0944a7dc1a85ff5a2d4c1cd8c0e82b44957e6d7aee920fa3d8f040cc431006b406f000916d100009b1f000007a10000003f00000001n], + [-0x100000000n, 63n, -0x1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0xffffffffn, 63n, -0xffffffc1000007a0ffff64e1000916d0ff94bf91040cc430df05c271e6d7aee37d4bb6c6c1cd8b79a00a5fb64a7db793a0b053d9e6aedee4fd5e3d7507e5960962a2a080e77e9032119aae7b72e633ea14ad533e35b58701cca0d24a55d9ff1e4689a38c5e480f93ca13857b21728be9bc5fcf060932aaa3e4df43d61be60819f4a042b646d68974dace0cdc39b34a539e513e41bc3ebfada80fb67634d06761c95eaa35ebde14d48ccd749dee8c0adf186f40d69d6544aef8173fbf02a2edc61950bb8c5f4fcbb9b5823f765ff5a2993e3273fc82b449561928511720fa3d8efbf33bcf006b406efff6e92f00009b1efffff85f0000003effffffffn], + [-0xfffffffen, 63n, -0xffffff8200001e83fffb270800916d0ff297f22103310c2f82e13966d7aeddfa976dc907362ba90053111ca7dae0e4160ebb59ab9bf43eafc55887e1fcbdc557a5d99da31fbc8e54d20f284142f2ad14e2ed19e61fa766afe7d275c62f96fd28975df491ea967a30496e8399690a3d01df1ed16ab8cb54678ff3ef10fe552a12f86b239b0cc7bfab4be5994436aee60e848c8a14aed27cb4151388938193e1aeb8a4386719e706e82d87330e5b444758fddcbc0bd76982a2cbc532a18a237d3f2531ac12002dff5a27b7c64e8040ad12554c94288ba0fa3d8ef7e6779e01ad01bbffb749780009b1efffff0be000000fbfffffff8000000000000000n], + [-0x80000001n, 63n, -0x2000000fc00003d080009b1f00122da201ad01bc2066218a0fa3d90cdaf5de80ad1264a0e6c693dff5a79194fba8477d4048a3358161082a5aa3f0fe0c3d875e3db0b3dff47d6ef514d7e8192635b612a135ccfa945b9e4d645c00d53d52154bac7954686fd01fbc2f822305c79dd9f0557ac6cc7c146eb157f78a66aabfad10f084e58fb992b46f91243923af6db22a162341edbda15136e04c5dadf1ed3eb636ec13f373e42add4f44459e6e2c30eb4963187ea0d7d0546a7919abd840efa7e980ca7dc237bfeb45e50736305015a24ac66d7aee941f47b1e103310c4035a037800916d10001363e00001e84000001f80000001n], + [-0x80000000n, 63n, -0x200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0x7fffffffn, 63n, -0x1ffffff0400003d07fff64e100122da1fe52fe4420662185f05c272cdaf5dbbf52edb920e6c575200a622394fb5c1c82c1d76b35737e87d5f8ab10fc3f97b8aaf4bb33b463f791ca9a41e508285e55a29c5da33cc3f4ecd5fcfa4eb8c5f2dfa512ebbe923d52cf46092dd0732d2147a03be3da2d57196a8cf1fe7de21fcaa5425f0d64736198f7f5697cb32886d5dcc1d091914295da4f9682a2711270327c35d714870ce33ce0dd05b0e661cb6888eb1fbb97817aed30545978a65431446fa7e4a635824005bfeb44f6f8c9d00815a24aa9928511741f47b1defccef3c035a0377ff6e92f0001363dffffe17c000001f7fffffffn], + [-0x7ffffffen, 63n, -0x1fffffe080000f41fffb27080122da1fca5fc888198860f82e13a4daf5da5ea5db90039b1397005337f14fb36070585cee4d5b2351eb112948fb5944d15f1be24e7a6ed291538e7637fa972b6fa764e39776f09933d6d175aa8a4ab43ae513ce9c91223639283a729e101b0d104618f772582b960701f79fea1f9cd7d9468f957976713d5a8f02b43ef486eb722e3b5fcc0ffe53cd7ac54284b3569ca30268766b35ce0e736c3d065cbac2b9f5c0c467d85450f86ca86c0e3e9f88e3ac120923feb447ff193a06856892a6c94288bc1f47b1ddf99de780d680ddffb74978001363dffffc2f8000007dfffffff8000000000000000n], + [-9n, 63n, -0xd0b2c448fbd1250537195f2c63386319440e403b2ad680b839n], + [-8n, 63n, -0x200000000000000000000000000000000000000000000000n], + [-7n, 63n, -0x1d1bbb69c328a67bf5a6a36fb99bb2839ba41401ac7b7n], + [-6n, 63n, -0x739237297e9885becbeea74d58000000000000000n], + [-5n, 63n, -0x4dc9a61d998642bbb1e62afa4fc47597b9fcdn], + [-4n, 63n, -0x40000000000000000000000000000000n], + [-3n, 63n, -0xe7246e52fd310b7d97dd4e9abn], + [-2n, 63n, -0x8000000000000000n], + [-1n, 63n, -1n], + [0n, 63n, 0n], + [1n, 63n, 1n], + [2n, 63n, 0x8000000000000000n], + [3n, 63n, 0xe7246e52fd310b7d97dd4e9abn], + [4n, 63n, 0x40000000000000000000000000000000n], + [5n, 63n, 0x4dc9a61d998642bbb1e62afa4fc47597b9fcdn], + [6n, 63n, 0x739237297e9885becbeea74d58000000000000000n], + [7n, 63n, 0x1d1bbb69c328a67bf5a6a36fb99bb2839ba41401ac7b7n], + [8n, 63n, 0x200000000000000000000000000000000000000000000000n], + [9n, 63n, 0xd0b2c448fbd1250537195f2c63386319440e403b2ad680b839n], + [0x7ffffffen, 63n, 0x1fffffe080000f41fffb27080122da1fca5fc888198860f82e13a4daf5da5ea5db90039b1397005337f14fb36070585cee4d5b2351eb112948fb5944d15f1be24e7a6ed291538e7637fa972b6fa764e39776f09933d6d175aa8a4ab43ae513ce9c91223639283a729e101b0d104618f772582b960701f79fea1f9cd7d9468f957976713d5a8f02b43ef486eb722e3b5fcc0ffe53cd7ac54284b3569ca30268766b35ce0e736c3d065cbac2b9f5c0c467d85450f86ca86c0e3e9f88e3ac120923feb447ff193a06856892a6c94288bc1f47b1ddf99de780d680ddffb74978001363dffffc2f8000007dfffffff8000000000000000n], + [0x7fffffffn, 63n, 0x1ffffff0400003d07fff64e100122da1fe52fe4420662185f05c272cdaf5dbbf52edb920e6c575200a622394fb5c1c82c1d76b35737e87d5f8ab10fc3f97b8aaf4bb33b463f791ca9a41e508285e55a29c5da33cc3f4ecd5fcfa4eb8c5f2dfa512ebbe923d52cf46092dd0732d2147a03be3da2d57196a8cf1fe7de21fcaa5425f0d64736198f7f5697cb32886d5dcc1d091914295da4f9682a2711270327c35d714870ce33ce0dd05b0e661cb6888eb1fbb97817aed30545978a65431446fa7e4a635824005bfeb44f6f8c9d00815a24aa9928511741f47b1defccef3c035a0377ff6e92f0001363dffffe17c000001f7fffffffn], + [0x80000000n, 63n, 0x200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x80000001n, 63n, 0x2000000fc00003d080009b1f00122da201ad01bc2066218a0fa3d90cdaf5de80ad1264a0e6c693dff5a79194fba8477d4048a3358161082a5aa3f0fe0c3d875e3db0b3dff47d6ef514d7e8192635b612a135ccfa945b9e4d645c00d53d52154bac7954686fd01fbc2f822305c79dd9f0557ac6cc7c146eb157f78a66aabfad10f084e58fb992b46f91243923af6db22a162341edbda15136e04c5dadf1ed3eb636ec13f373e42add4f44459e6e2c30eb4963187ea0d7d0546a7919abd840efa7e980ca7dc237bfeb45e50736305015a24ac66d7aee941f47b1e103310c4035a037800916d10001363e00001e84000001f80000001n], + [0xfffffffen, 63n, 0xffffff8200001e83fffb270800916d0ff297f22103310c2f82e13966d7aeddfa976dc907362ba90053111ca7dae0e4160ebb59ab9bf43eafc55887e1fcbdc557a5d99da31fbc8e54d20f284142f2ad14e2ed19e61fa766afe7d275c62f96fd28975df491ea967a30496e8399690a3d01df1ed16ab8cb54678ff3ef10fe552a12f86b239b0cc7bfab4be5994436aee60e848c8a14aed27cb4151388938193e1aeb8a4386719e706e82d87330e5b444758fddcbc0bd76982a2cbc532a18a237d3f2531ac12002dff5a27b7c64e8040ad12554c94288ba0fa3d8ef7e6779e01ad01bbffb749780009b1efffff0be000000fbfffffff8000000000000000n], + [0xffffffffn, 63n, 0xffffffc1000007a0ffff64e1000916d0ff94bf91040cc430df05c271e6d7aee37d4bb6c6c1cd8b79a00a5fb64a7db793a0b053d9e6aedee4fd5e3d7507e5960962a2a080e77e9032119aae7b72e633ea14ad533e35b58701cca0d24a55d9ff1e4689a38c5e480f93ca13857b21728be9bc5fcf060932aaa3e4df43d61be60819f4a042b646d68974dace0cdc39b34a539e513e41bc3ebfada80fb67634d06761c95eaa35ebde14d48ccd749dee8c0adf186f40d69d6544aef8173fbf02a2edc61950bb8c5f4fcbb9b5823f765ff5a2993e3273fc82b449561928511720fa3d8efbf33bcf006b406efff6e92f00009b1efffff85f0000003effffffffn], + [0x100000000n, 63n, 0x1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x100000001n, 63n, 0x10000003f000007a100009b1f000916d1006b406f040cc43120fa3d8fe6d7aeee82b44974c1cd8c985ff5a5244a7dca9e5f4ff027e6afbd0d02a45d0307ecc8a09d6fc456e7aa20b7eec5291173aa735fecc954743851640837b848c05ca270fbc3603df26bdde5c64763fba1368730905b84630c22a17496348f861c33ca3a2c207461f0584e0a9132c7c956439d2bd26877339bc097dab85a8c269036470f143765953fec3dec61735e1be7ee9e6fb6e797f1c09d67df2707e99e6902a331c7e6af577e5f4fd0944a7dc1a85ff5a2d4c1cd8c0e82b44957e6d7aee920fa3d8f040cc431006b406f000916d100009b1f000007a10000003f00000001n], + [0x7ffffffffffffffen, 63n, 0x1fffffffffffffe08000000000000f41fffffffffffb2708000000000122da1fffffffffca5fc88000000008198861fffffffef82e13880000001cdaf5dd1ffffffd3ea5db548000003b839b1811fffffb850052ea4800004da94fb8231ffffb3d505818ec80004401cd5e9bf1fffc875feae781c80029a780fd25ea9ffe335a314cb70a801264d7cf28b0e9ff51bde88b5615a805fd78ce690a749fcef02289f8ffb28176a7b26e06eb09f5908be653a226284591b0ab27c7019e4de388a0ca596689e9e17eca25f559c9a8a7360abe2769177811c57f9bc79abad6d65836dafe97e432122bd41f399a44d836c13ef6e996ec9f24fb04245a06f37b750af8319514a4a69f249405ba21fb8ea0190e18d95d6327d507625d8587a04d7682a986c871dd7cd69a65ee9b93d5360e3f9829bdd066b177675fa25613647e453d80c43f75d81c0135fe80a1cc65bd62d802b9085dd2a7a95ffb66ca0c35d3c5800732973acd23d5fff5961fc0b68558000de2805461f8dfffeeff8ca859038000130abe9f9c4dffffec95ac11f738000011ebfeb456dffffff11f1939fb8000000b056892adfffffff8c94288b8000000041f47b1dffffffffdf99de78000000000d680ddffffffffffb7497800000000001363dffffffffffffc2f800000000000007dfffffffffffffff8000000000000000n], + [0x7fffffffffffffffn, 63n, 0x1ffffffffffffff040000000000003d07fffffffffff64e10000000000122da1fffffffffe52fe440000000020662187fffffffdf05c27100000001cdaf5dd1ffffffe9f52edaa4000000ee0e6c6047fffff70a00a5d49000004da94fb8231ffffd9ea82c0c76400011007357a6fc7fff90ebfd5cf03900029a780fd25ea9fff19ad18a65b8540049935f3ca2c3a7fea37bd116ac2b5005fd78ce690a749fe7781144fc7fd9405da9ec9b81bac27eb2117cca7444c504591b0ab27c7019f26f1c450652cb3427a785fb2897d56793514e6c157c4ed1177811c57f9bc79d5d6b6b2c1b6d7f45f90c848af507ce73489b06d827dedd196ec9f24fb04245d0379bdba857c18c5452929a7c9250177443f71d40321c30d95d6327d507625ec2c3d026bb4154c1b21c775f35a6997dd3727aa6c1c7f3029bdd066b177675fd12b09b23f229ec0310fdd7607004d7fd014398cb7ac5b002b9085dd2a7a95ffdb365061ae9e2c001cca5ceb348f57ffeb2c3f816d0ab0000de2805461f8dffff77fc6542c81c00004c2afa7e7137ffffd92b5823ee70000011ebfeb456dffffff88f8c9cfdc0000002c15a24ab7fffffff192851170000000041f47b1dffffffffefccef3c00000000035a0377ffffffffff6e92f000000000001363dffffffffffffe17c00000000000001f7fffffffffffffffn], + [0x8000000000000000n, 63n, 0x200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x8000000000000001n, 63n, 0x200000000000000fc0000000000003d08000000000009b1f0000000000122da20000000001ad01bc0000000020662188000000020fa3d8f00000001cdaf5dd2000000160ad1255c000000ee0e6c6048000008f5ff5a2b7000004da94fb8232000026157d3f389c00011007357a6fc80006f1402a30fc700029a780fd25eaa000e652e759a47ac0049935f3ca2c3a8015c842ee953d4b005fd78ce690a74a01887eebb038026c05da9ec9b81bac2814dee83358bbb3b04591b0ab27c701a0d90e3baf9ad34cc27a785fb2897d5686caeb193ea83b131177811c57f9bc7a2a29494d3e49280c5f90c848af507ce8cb764f927d82123196ec9f24fb042462fc8642457a83e745452929a7c9250188bbc08e2bfcde3d0d95d6327d50762613d3c2fd944beab41b21c775f35a699822c8d85593e380d029bdd066b17767602ed4f64dc0dd6140310fdd7607004d802febc6734853a5002b9085dd2a7a960024c9af9e5161d4001cca5ceb348f580014d3c07e92f550000de2805461f8e000088039abd37e400004c2afa7e7138000026d4a7dc1190000011ebfeb456e00000077073630240000002c15a24ab80000000e6d7aee90000000041f47b1e00000000103310c400000000035a03780000000000916d1000000000001363e0000000000001e8400000000000001f8000000000000001n], + [0xfffffffffffffffen, 63n, 0xffffffffffffff820000000000001e83fffffffffffb27080000000000916d0ffffffffff297f2200000000103310c3fffffffef82e13880000000e6d7aee8fffffff4fa976d520000007707363023fffffb850052ea48000026d4a7dc118ffffecf5416063b2000088039abd37e3fffc875feae781c80014d3c07e92f54fff8cd68c532dc2a0024c9af9e5161d3ff51bde88b5615a802febc6734853a4ff3bc08a27e3feca02ed4f64dc0dd613f5908be653a2262822c8d85593e380cf9378e228329659a13d3c2fd944beab3c9a8a7360abe27688bbc08e2bfcde3ceaeb5b5960db6bfa2fc8642457a83e739a44d836c13ef6e8cb764f927d82122e81bcdedd42be0c62a29494d3e49280bba21fb8ea0190e186caeb193ea83b12f6161e8135da0aa60d90e3baf9ad34cbee9b93d5360e3f9814dee83358bbb3afe89584d91f914f601887eebb038026bfe80a1cc65bd62d8015c842ee953d4affed9b2830d74f16000e652e759a47abfff5961fc0b685580006f1402a30fc6ffffbbfe32a1640e000026157d3f389bffffec95ac11f738000008f5ff5a2b6ffffffc47c64e7ee000000160ad1255bfffffff8c94288b8000000020fa3d8efffffffff7e6779e0000000001ad01bbffffffffffb74978000000000009b1efffffffffffff0be00000000000000fbfffffffffffffff8000000000000000n], + [0xffffffffffffffffn, 63n, 0xffffffffffffffc100000000000007a0ffffffffffff64e100000000000916d0ffffffffff94bf9100000000040cc430ffffffffdf05c27100000000e6d7aee8fffffffa7d4bb6a90000001dc1cd8c08ffffff70a00a5d490000026d4a7dc118fffff67aa0b031d900002200e6af4df8ffff90ebfd5cf03900014d3c07e92f54fffc66b462996e150009326be7945874ffea37bd116ac2b5002febc6734853a4ff9de04513f1ff6500bb53d937037584feb2117cca7444c5022c8d85593e380cfc9bc7114194b2cd04f4f0bf6512faacf93514e6c157c4ed08bbc08e2bfcde3cf575adacb06db5fd0bf2190915ea0f9cf3489b06d827dedd0cb764f927d82122f40de6f6ea15f0630a8a52534f924a02f7443f71d40321c306caeb193ea83b12fb0b0f409aed0553036438eebe6b4d32fdd3727aa6c1c7f3014dee83358bbb3aff44ac26c8fc8a7b00621fbaec0e009affd014398cb7ac5b0015c842ee953d4afff6cd94186ba78b0003994b9d6691eafffeb2c3f816d0ab00006f1402a30fc6ffffddff1950b207000009855f4fce26fffffd92b5823ee70000008f5ff5a2b6ffffffe23e3273f70000000582b44956ffffffff192851170000000020fa3d8efffffffffbf33bcf00000000006b406efffffffffff6e92f0000000000009b1efffffffffffff85f000000000000003effffffffffffffffn], + [0x10000000000000000n, 63n, 0x1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x10000000000000001n, 63n, 0x1000000000000003f00000000000007a10000000000009b1f00000000000916d100000000006b406f00000000040cc4310000000020fa3d8f00000000e6d7aee90000000582b449570000001dc1cd8c090000008f5ff5a2b70000026d4a7dc119000009855f4fce2700002200e6af4df900006f1402a30fc700014d3c07e92f550003994b9d6691eb0009326be79458750015c842ee953d4b002febc6734853a500621fbaec0e009b00bb53d937037585014dee83358bbb3b022c8d85593e380d036438eebe6b4d3304f4f0bf6512faad06caeb193ea83b1308bbc08e2bfcde3d0a8a52534f924a030bf2190915ea0f9d0cb764f927d821230cb764f927d821230bf2190915ea0f9d0a8a52534f924a0308bbc08e2bfcde3d06caeb193ea83b1304f4f0bf6512faad036438eebe6b4d33022c8d85593e380d014dee83358bbb3b00bb53d93703758500621fbaec0e009b002febc6734853a50015c842ee953d4b0009326be79458750003994b9d6691eb00014d3c07e92f5500006f1402a30fc700002200e6af4df9000009855f4fce270000026d4a7dc1190000008f5ff5a2b70000001dc1cd8c090000000582b4495700000000e6d7aee90000000020fa3d8f00000000040cc43100000000006b406f00000000000916d10000000000009b1f00000000000007a1000000000000003f0000000000000001n], + [-0x10000000000000001n, 64n, 0x1000000000000004000000000000007e0000000000000a2c0000000000009b1f0000000000074574000000000047804a000000000250701c00000000107d1ec7800000006698bf840000000234481d560000000ad21c32ec0000002fcaa7363d000000bf2a9cd8f4000002b8645ff1c2000009114e9525dc00001bc500a8c3f1c0004e687a54fc140000ccbb784faea60001efaaed62995c00045b40961dd90f000920b815f565440011d7394231176200209425c6c8f30c0037a7c088ec9f3480590c67417a98540085929ae237e47e00bbfdbd8a3bb35c00f86aba76aa51950134612e17b8f2840167c6b5c657c59a018a97e023dc230c0196ec9f24fb0424618a97e023dc230c0167c6b5c657c59a0134612e17b8f28400f86aba76aa519500bbfdbd8a3bb35c0085929ae237e47e00590c67417a98540037a7c088ec9f3480209425c6c8f30c0011d73942311762000920b815f5654400045b40961dd90f0001efaaed62995c0000ccbb784faea600004e687a54fc1400001bc500a8c3f1c00009114e9525dc000002b8645ff1c2000000bf2a9cd8f40000002fcaa7363d0000000ad21c32ec0000000234481d56000000006698bf8400000000107d1ec7800000000250701c000000000047804a00000000000745740000000000009b1f0000000000000a2c000000000000007e000000000000000400000000000000001n], + [-0x10000000000000000n, 64n, 0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0xffffffffffffffffn, 64n, 0xffffffffffffffc000000000000007dfffffffffffff5d40000000000009b1efffffffffff8ba8c0000000000478049fffffffffdaf8fe400000000107d1ec77fffffff9967407c0000000234481d55fffffff52de3cd140000002fcaa7363cffffff40d563270c000002b8645ff1c1fffff6eeb16ada2400001bc500a8c3f1bfffb19785ab03ec0000ccbb784faea5fffe1055129d66a400045b40961dd90efff6df47ea0a9abc0011d73942311761ffdf6bda39370cf40037a7c088ec9f347fa6f398be8567ac0085929ae237e47dff44024275c44ca400f86aba76aa5194fecb9ed1e8470d7c0167c6b5c657c599fe75681fdc23dcf40196ec9f24fb04245e75681fdc23dcf40167c6b5c657c599fecb9ed1e8470d7c00f86aba76aa5194ff44024275c44ca40085929ae237e47dffa6f398be8567ac0037a7c088ec9f347fdf6bda39370cf40011d73942311761fff6df47ea0a9abc00045b40961dd90efffe1055129d66a40000ccbb784faea5ffffb19785ab03ec00001bc500a8c3f1bffff6eeb16ada24000002b8645ff1c1ffffff40d563270c0000002fcaa7363cfffffff52de3cd140000000234481d55ffffffff9967407c00000000107d1ec77ffffffffdaf8fe40000000000478049fffffffffff8ba8c0000000000009b1efffffffffffff5d4000000000000007dfffffffffffffffc00000000000000001n], + [-0xfffffffffffffffen, 64n, 0xffffffffffffff800000000000001f7ffffffffffffaea0000000000009b1efffffffffff1751800000000011e0127ffffffffed7c7f200000000107d1ec77fffffff32ce80f800000008d1207557ffffffa96f1e68a0000002fcaa7363cfffffe81aac64e1800000ae1917fc707ffffb7758b56d1200001bc500a8c3f1bfff632f0b5607d8000332ede13eba97fff082a894eb35200045b40961dd90effedbe8fd415357800475ce508c45d87fefb5ed1c9b867a0037a7c088ec9f347f4de7317d0acf5802164a6b88df91f7fa201213ae2265200f86aba76aa5194fd973da3d08e1af8059f1ad7195f1667f3ab40fee11ee7a0196ec9f24fb04245cead03fb847b9e8059f1ad7195f1667f65cf68f42386be00f86aba76aa5194fe880484eb88994802164a6b88df91f7fd379cc5f42b3d60037a7c088ec9f347fbed7b4726e19e800475ce508c45d87ffb6fa3f5054d5e00045b40961dd90efffc20aa253acd48000332ede13eba97fffd8cbc2d581f600001bc500a8c3f1bfffeddd62d5b44800000ae1917fc707fffffa06ab193860000002fcaa7363cffffffea5bc79a2800000008d1207557fffffffccb3a03e00000000107d1ec77ffffffffb5f1fc800000000011e0127ffffffffffc5d460000000000009b1effffffffffffeba800000000000001f7ffffffffffffffe000000000000000010000000000000000n], + [-0x8000000000000001n, 64n, 0x100000000000000800000000000001f80000000000005160000000000009b1f00000000000e8ae800000000011e012800000000128380e00000000107d1ec780000000cd317f0800000008d12075580000005690e19760000002fcaa7363d0000017e5539b1e800000ae1917fc7080000488a74a92ee00001bc500a8c3f1c0009cd0f4a9f828000332ede13eba98000f7d576b14cae00045b40961dd90f001241702beaca8800475ce508c45d880104a12e36479860037a7c088ec9f3480b218ce82f530a802164a6b88df91f805dfedec51dd9ae00f86aba76aa51950268c25c2f71e508059f1ad7195f16680c54bf011ee11860196ec9f24fb042463152fc047b84618059f1ad7195f166809a30970bdc794200f86aba76aa51950177fb7b147766b802164a6b88df91f802c8633a0bd4c2a0037a7c088ec9f348041284b8d91e61800475ce508c45d88004905c0afab2a200045b40961dd90f0003df55dac532b8000332ede13eba9800027343d2a7e0a00001bc500a8c3f1c00012229d2a4bb800000ae1917fc708000005f954e6c7a0000002fcaa7363d00000015a43865d800000008d12075580000000334c5fc200000000107d1ec78000000004a0e03800000000011e012800000000003a2ba0000000000009b1f000000000000145800000000000001f800000000000000200000000000000001n], + [-0x8000000000000000n, 64n, 0x1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0x7fffffffffffffffn, 64n, 0xffffffffffffff800000000000001f7ffffffffffffaea0000000000009b1efffffffffff1751800000000011e0127ffffffffed7c7f200000000107d1ec77fffffff32ce80f800000008d1207557ffffffa96f1e68a0000002fcaa7363cfffffe81aac64e1800000ae1917fc707ffffb7758b56d1200001bc500a8c3f1bfff632f0b5607d8000332ede13eba97fff082a894eb35200045b40961dd90effedbe8fd415357800475ce508c45d87fefb5ed1c9b867a0037a7c088ec9f347f4de7317d0acf5802164a6b88df91f7fa201213ae2265200f86aba76aa5194fd973da3d08e1af8059f1ad7195f1667f3ab40fee11ee7a0196ec9f24fb04245cead03fb847b9e8059f1ad7195f1667f65cf68f42386be00f86aba76aa5194fe880484eb88994802164a6b88df91f7fd379cc5f42b3d60037a7c088ec9f347fbed7b4726e19e800475ce508c45d87ffb6fa3f5054d5e00045b40961dd90efffc20aa253acd48000332ede13eba97fffd8cbc2d581f600001bc500a8c3f1bfffeddd62d5b44800000ae1917fc707fffffa06ab193860000002fcaa7363cffffffea5bc79a2800000008d1207557fffffffccb3a03e00000000107d1ec77ffffffffb5f1fc800000000011e0127ffffffffffc5d460000000000009b1effffffffffffeba800000000000001f7ffffffffffffffe00000000000000001n], + [-0x7ffffffffffffffen, 64n, 0xffffffffffffff000000000000007dffffffffffffd750000000000009b1effffffffffe2ea30000000000478049fffffffff6be3f900000000107d1ec77ffffffe659d01f0000000234481d55ffffffd4b78f3450000002fcaa7363cfffffd03558c9c3000002b8645ff1c1ffffdbbac5ab68900001bc500a8c3f1bffec65e16ac0fb0000ccbb784faea5fff841544a759a900045b40961dd90effdb7d1fa82a6af0011d73942311761ff7daf68e4dc33d0037a7c088ec9f347e9bce62fa159eb0085929ae237e47dfd100909d71132900f86aba76aa5194fb2e7b47a11c35f0167c6b5c657c599f9d5a07f708f73d0196ec9f24fb042459d5a07f708f73d0167c6b5c657c599fb2e7b47a11c35f00f86aba76aa5194fd100909d7113290085929ae237e47dfe9bce62fa159eb0037a7c088ec9f347f7daf68e4dc33d0011d73942311761ffdb7d1fa82a6af00045b40961dd90efff841544a759a90000ccbb784faea5fffec65e16ac0fb00001bc500a8c3f1bfffdbbac5ab689000002b8645ff1c1fffffd03558c9c30000002fcaa7363cffffffd4b78f3450000000234481d55fffffffe659d01f00000000107d1ec77ffffffff6be3f90000000000478049ffffffffffe2ea30000000000009b1effffffffffffd75000000000000007dfffffffffffffff000000000000000010000000000000000n], + [-0x100000001n, 64n, 0x100000040000007e00000a2c00009b1f000745740047804a0250701c107d1ec7e698bf8634481d60d21c331bcaa736fc2a9cdbac645ffad34e9541a100a9125a3a55c8cf78519e50ed66f49c9626f9c716073c7d4251ab87c7009acc8945ab9bc2002aeee2f3e23b8b341e1677deb2c31920b939c7e25d7a25730fab26859c048543e9c1c78c26c818b15d3e77664f528ac145f6e290f0e541b24014890d335a46daca45423a381a15f9c084961fc8b9ed636617784ffd0e7a5517d900a8cd030e952894645ff2812a9cd923caa73647d21c32ee34481d566698bf84107d1ec78250701c0047804a0007457400009b1f00000a2c0000007e00000004000000001n], + [-0x100000000n, 64n, 0x100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0xffffffffn, 64n, 0xffffffc0000007dfffff5d400009b1efff8ba8c00478049fdaf8fe4107d1ec71967407e34481d4b2de3cd43caa7357dd56329c4645fe8b0b16af5e900a8758945abd0a7784dbefb12a1c1e49614b856ea1c71f54210833c396eb4b4889392cd3f0afa46e17be6c076bcb75e7575f066e9aed431c4cd2db9ddbac99323706c443d8ba3a9c523646be93f783675ee53d77649df3ee1ded816bebd0f6c88cc0b0eb948e42d4227f6a9ea0ef5fc961be964129e335f784f603d85ab1fb100a8bae0716adcdc645ff102d563273bcaa736322de3cd1634481d559967407c107d1ec77daf8fe400478049fff8ba8c00009b1efffff5d40000007dfffffffc000000001n], + [-0xfffffffen, 64n, 0xffffff8000001f7ffffaea00009b1efff17518011e0127ed7c7f2107d1ec6b2ce8100d12075016f1e6b9caa734beaac658f9917f7e7d8b588d700a82720cb593ac5e12f3d409530e92960b979ed45c925d07bfbc59cd32e3a883a8665ff2119c382ffa40bbda910c74418f38d62d35cf0d0a5766fa8db1921e5d4641de6d4bf0fbc0cf751bf17875325619ed9ee3b386172ebdf7a5b9688ab76e8f2b576cd087b57c7509a89e9619f9b9253e0035e13c47542d59dbb00a8b1cf22d5bf29917fc10eab193b5caa736275bc79a30d1207554cb3a03e107d1ec77b5f1fc8011e0127ffc5d4600009b1effffeba8000001f7ffffffe0000000010000000000000000n], + [-0x80000001n, 64n, 0x10000008000001f8000051600009b1f000e8ae8011e0128128380e107d1ec84d317f10d12075ae90e19a5caa737bb5539bcc991800f9274aaeb300a960c2b4ad2b15e14e37ef6b5a7ee96301a7f2c32276d09c8feb639c2146899eb803050b7b138ebf7fe46164468791313f13510ffdf25b3d569384fe25281033e4ad5760ef23021fd8cd4e3fc78224d10168db1238ba7f5320f4f3ea892dc7800dd942fd090d6348aff0de29621b864dac865a5e1412ddbd2a99cf00a8d6145d2a5699917fcd0154e6ca9caa73652a43865e0d120755b34c5fc2107d1ec784a0e038011e0128003a2ba00009b1f00001458000001f80000002000000001n], + [-0x80000000n, 64n, 0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [-0x7fffffffn, 64n, 0xffffff8000001f7ffffaea00009b1efff17518011e0127ed7c7f2107d1ec6b2ce8100d12075016f1e6b9caa734beaac658f9917f7e7d8b588d700a82720cb593ac5e12f3d409530e92960b979ed45c925d07bfbc59cd32e3a883a8665ff2119c382ffa40bbda910c74418f38d62d35cf0d0a5766fa8db1921e5d4641de6d4bf0fbc0cf751bf17875325619ed9ee3b386172ebdf7a5b9688ab76e8f2b576cd087b57c7509a89e9619f9b9253e0035e13c47542d59dbb00a8b1cf22d5bf29917fc10eab193b5caa736275bc79a30d1207554cb3a03e107d1ec77b5f1fc8011e0127ffc5d4600009b1effffeba8000001f7ffffffe000000001n], + [-0x7ffffffen, 64n, 0xffffff0000007dffffd7500009b1effe2ea300478049f6be3f9107d1ec5e59d02134481d2ab78f374caa73340558cc7b645fcd7cc5ad24e00a78a4fd6b8db67847effa4abb4e995f9562ea947de841aec6cae856afd87886d97826ec85df47ed87e697de371d8ccdcb798a14c02d661989fe3dc1ed0a4a3e70bdf2c18640e1b0a2e1973ba5a9edf6a5c3e0d3b2e0fd901ab886a4e9d65f9a76420c9481a8701ef96161a634a82664784e750416adcc000a89fac85ab941645feec5558c9f2caa73611b78f34734481d54659d01f107d1ec776be3f900478049ffe2ea300009b1effffd750000007dfffffff0000000010000000000000000n], + [-9n, 64n, 0x75648e690da5a4d2eefe4588f7cfb7be364804214818a867a01n], + [-8n, 64n, 0x1000000000000000000000000000000000000000000000000n], + [-7n, 64n, 0xcbc21fe4561c8d63b78e780e1341e199417c8c0bb7601n], + [-6n, 64n, 0x2b56d4af8f7932278c797ebd010000000000000000n], + [-5n, 64n, 0x184f03e93ff9f4daa797ed6e38ed64bf6a1f01n], + [-4n, 64n, 0x100000000000000000000000000000000n], + [-3n, 64n, 0x2b56d4af8f7932278c797ebd01n], + [-2n, 64n, 0x10000000000000000n], + [-1n, 64n, 1n], + [0n, 64n, 0n], + [1n, 64n, 1n], + [2n, 64n, 0x10000000000000000n], + [3n, 64n, 0x2b56d4af8f7932278c797ebd01n], + [4n, 64n, 0x100000000000000000000000000000000n], + [5n, 64n, 0x184f03e93ff9f4daa797ed6e38ed64bf6a1f01n], + [6n, 64n, 0x2b56d4af8f7932278c797ebd010000000000000000n], + [7n, 64n, 0xcbc21fe4561c8d63b78e780e1341e199417c8c0bb7601n], + [8n, 64n, 0x1000000000000000000000000000000000000000000000000n], + [9n, 64n, 0x75648e690da5a4d2eefe4588f7cfb7be364804214818a867a01n], + [0x7ffffffen, 64n, 0xffffff0000007dffffd7500009b1effe2ea300478049f6be3f9107d1ec5e59d02134481d2ab78f374caa73340558cc7b645fcd7cc5ad24e00a78a4fd6b8db67847effa4abb4e995f9562ea947de841aec6cae856afd87886d97826ec85df47ed87e697de371d8ccdcb798a14c02d661989fe3dc1ed0a4a3e70bdf2c18640e1b0a2e1973ba5a9edf6a5c3e0d3b2e0fd901ab886a4e9d65f9a76420c9481a8701ef96161a634a82664784e750416adcc000a89fac85ab941645feec5558c9f2caa73611b78f34734481d54659d01f107d1ec776be3f900478049ffe2ea300009b1effffd750000007dfffffff0000000010000000000000000n], + [0x7fffffffn, 64n, 0xffffff8000001f7ffffaea00009b1efff17518011e0127ed7c7f2107d1ec6b2ce8100d12075016f1e6b9caa734beaac658f9917f7e7d8b588d700a82720cb593ac5e12f3d409530e92960b979ed45c925d07bfbc59cd32e3a883a8665ff2119c382ffa40bbda910c74418f38d62d35cf0d0a5766fa8db1921e5d4641de6d4bf0fbc0cf751bf17875325619ed9ee3b386172ebdf7a5b9688ab76e8f2b576cd087b57c7509a89e9619f9b9253e0035e13c47542d59dbb00a8b1cf22d5bf29917fc10eab193b5caa736275bc79a30d1207554cb3a03e107d1ec77b5f1fc8011e0127ffc5d4600009b1effffeba8000001f7ffffffe000000001n], + [0x80000000n, 64n, 0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x80000001n, 64n, 0x10000008000001f8000051600009b1f000e8ae8011e0128128380e107d1ec84d317f10d12075ae90e19a5caa737bb5539bcc991800f9274aaeb300a960c2b4ad2b15e14e37ef6b5a7ee96301a7f2c32276d09c8feb639c2146899eb803050b7b138ebf7fe46164468791313f13510ffdf25b3d569384fe25281033e4ad5760ef23021fd8cd4e3fc78224d10168db1238ba7f5320f4f3ea892dc7800dd942fd090d6348aff0de29621b864dac865a5e1412ddbd2a99cf00a8d6145d2a5699917fcd0154e6ca9caa73652a43865e0d120755b34c5fc2107d1ec784a0e038011e0128003a2ba00009b1f00001458000001f80000002000000001n], + [0xfffffffen, 64n, 0xffffff8000001f7ffffaea00009b1efff17518011e0127ed7c7f2107d1ec6b2ce8100d12075016f1e6b9caa734beaac658f9917f7e7d8b588d700a82720cb593ac5e12f3d409530e92960b979ed45c925d07bfbc59cd32e3a883a8665ff2119c382ffa40bbda910c74418f38d62d35cf0d0a5766fa8db1921e5d4641de6d4bf0fbc0cf751bf17875325619ed9ee3b386172ebdf7a5b9688ab76e8f2b576cd087b57c7509a89e9619f9b9253e0035e13c47542d59dbb00a8b1cf22d5bf29917fc10eab193b5caa736275bc79a30d1207554cb3a03e107d1ec77b5f1fc8011e0127ffc5d4600009b1effffeba8000001f7ffffffe0000000010000000000000000n], + [0xffffffffn, 64n, 0xffffffc0000007dfffff5d400009b1efff8ba8c00478049fdaf8fe4107d1ec71967407e34481d4b2de3cd43caa7357dd56329c4645fe8b0b16af5e900a8758945abd0a7784dbefb12a1c1e49614b856ea1c71f54210833c396eb4b4889392cd3f0afa46e17be6c076bcb75e7575f066e9aed431c4cd2db9ddbac99323706c443d8ba3a9c523646be93f783675ee53d77649df3ee1ded816bebd0f6c88cc0b0eb948e42d4227f6a9ea0ef5fc961be964129e335f784f603d85ab1fb100a8bae0716adcdc645ff102d563273bcaa736322de3cd1634481d559967407c107d1ec77daf8fe400478049fff8ba8c00009b1efffff5d40000007dfffffffc000000001n], + [0x100000000n, 64n, 0x100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x100000001n, 64n, 0x100000040000007e00000a2c00009b1f000745740047804a0250701c107d1ec7e698bf8634481d60d21c331bcaa736fc2a9cdbac645ffad34e9541a100a9125a3a55c8cf78519e50ed66f49c9626f9c716073c7d4251ab87c7009acc8945ab9bc2002aeee2f3e23b8b341e1677deb2c31920b939c7e25d7a25730fab26859c048543e9c1c78c26c818b15d3e77664f528ac145f6e290f0e541b24014890d335a46daca45423a381a15f9c084961fc8b9ed636617784ffd0e7a5517d900a8cd030e952894645ff2812a9cd923caa73647d21c32ee34481d566698bf84107d1ec78250701c0047804a0007457400009b1f00000a2c0000007e00000004000000001n], + [0x7ffffffffffffffen, 64n, 0xffffffffffffff000000000000007dffffffffffffd750000000000009b1effffffffffe2ea30000000000478049fffffffff6be3f900000000107d1ec77ffffffe659d01f0000000234481d55ffffffd4b78f3450000002fcaa7363cfffffd03558c9c3000002b8645ff1c1ffffdbbac5ab68900001bc500a8c3f1bffec65e16ac0fb0000ccbb784faea5fff841544a759a900045b40961dd90effdb7d1fa82a6af0011d73942311761ff7daf68e4dc33d0037a7c088ec9f347e9bce62fa159eb0085929ae237e47dfd100909d71132900f86aba76aa5194fb2e7b47a11c35f0167c6b5c657c599f9d5a07f708f73d0196ec9f24fb042459d5a07f708f73d0167c6b5c657c599fb2e7b47a11c35f00f86aba76aa5194fd100909d7113290085929ae237e47dfe9bce62fa159eb0037a7c088ec9f347f7daf68e4dc33d0011d73942311761ffdb7d1fa82a6af00045b40961dd90efff841544a759a90000ccbb784faea5fffec65e16ac0fb00001bc500a8c3f1bfffdbbac5ab689000002b8645ff1c1fffffd03558c9c30000002fcaa7363cffffffd4b78f3450000000234481d55fffffffe659d01f00000000107d1ec77ffffffff6be3f90000000000478049ffffffffffe2ea30000000000009b1effffffffffffd75000000000000007dfffffffffffffff000000000000000010000000000000000n], + [0x7fffffffffffffffn, 64n, 0xffffffffffffff800000000000001f7ffffffffffffaea0000000000009b1efffffffffff1751800000000011e0127ffffffffed7c7f200000000107d1ec77fffffff32ce80f800000008d1207557ffffffa96f1e68a0000002fcaa7363cfffffe81aac64e1800000ae1917fc707ffffb7758b56d1200001bc500a8c3f1bfff632f0b5607d8000332ede13eba97fff082a894eb35200045b40961dd90effedbe8fd415357800475ce508c45d87fefb5ed1c9b867a0037a7c088ec9f347f4de7317d0acf5802164a6b88df91f7fa201213ae2265200f86aba76aa5194fd973da3d08e1af8059f1ad7195f1667f3ab40fee11ee7a0196ec9f24fb04245cead03fb847b9e8059f1ad7195f1667f65cf68f42386be00f86aba76aa5194fe880484eb88994802164a6b88df91f7fd379cc5f42b3d60037a7c088ec9f347fbed7b4726e19e800475ce508c45d87ffb6fa3f5054d5e00045b40961dd90efffc20aa253acd48000332ede13eba97fffd8cbc2d581f600001bc500a8c3f1bfffeddd62d5b44800000ae1917fc707fffffa06ab193860000002fcaa7363cffffffea5bc79a2800000008d1207557fffffffccb3a03e00000000107d1ec77ffffffffb5f1fc800000000011e0127ffffffffffc5d460000000000009b1effffffffffffeba800000000000001f7ffffffffffffffe00000000000000001n], + [0x8000000000000000n, 64n, 0x1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x8000000000000001n, 64n, 0x100000000000000800000000000001f80000000000005160000000000009b1f00000000000e8ae800000000011e012800000000128380e00000000107d1ec780000000cd317f0800000008d12075580000005690e19760000002fcaa7363d0000017e5539b1e800000ae1917fc7080000488a74a92ee00001bc500a8c3f1c0009cd0f4a9f828000332ede13eba98000f7d576b14cae00045b40961dd90f001241702beaca8800475ce508c45d880104a12e36479860037a7c088ec9f3480b218ce82f530a802164a6b88df91f805dfedec51dd9ae00f86aba76aa51950268c25c2f71e508059f1ad7195f16680c54bf011ee11860196ec9f24fb042463152fc047b84618059f1ad7195f166809a30970bdc794200f86aba76aa51950177fb7b147766b802164a6b88df91f802c8633a0bd4c2a0037a7c088ec9f348041284b8d91e61800475ce508c45d88004905c0afab2a200045b40961dd90f0003df55dac532b8000332ede13eba9800027343d2a7e0a00001bc500a8c3f1c00012229d2a4bb800000ae1917fc708000005f954e6c7a0000002fcaa7363d00000015a43865d800000008d12075580000000334c5fc200000000107d1ec78000000004a0e03800000000011e012800000000003a2ba0000000000009b1f000000000000145800000000000001f800000000000000200000000000000001n], + [0xfffffffffffffffen, 64n, 0xffffffffffffff800000000000001f7ffffffffffffaea0000000000009b1efffffffffff1751800000000011e0127ffffffffed7c7f200000000107d1ec77fffffff32ce80f800000008d1207557ffffffa96f1e68a0000002fcaa7363cfffffe81aac64e1800000ae1917fc707ffffb7758b56d1200001bc500a8c3f1bfff632f0b5607d8000332ede13eba97fff082a894eb35200045b40961dd90effedbe8fd415357800475ce508c45d87fefb5ed1c9b867a0037a7c088ec9f347f4de7317d0acf5802164a6b88df91f7fa201213ae2265200f86aba76aa5194fd973da3d08e1af8059f1ad7195f1667f3ab40fee11ee7a0196ec9f24fb04245cead03fb847b9e8059f1ad7195f1667f65cf68f42386be00f86aba76aa5194fe880484eb88994802164a6b88df91f7fd379cc5f42b3d60037a7c088ec9f347fbed7b4726e19e800475ce508c45d87ffb6fa3f5054d5e00045b40961dd90efffc20aa253acd48000332ede13eba97fffd8cbc2d581f600001bc500a8c3f1bfffeddd62d5b44800000ae1917fc707fffffa06ab193860000002fcaa7363cffffffea5bc79a2800000008d1207557fffffffccb3a03e00000000107d1ec77ffffffffb5f1fc800000000011e0127ffffffffffc5d460000000000009b1effffffffffffeba800000000000001f7ffffffffffffffe000000000000000010000000000000000n], + [0xffffffffffffffffn, 64n, 0xffffffffffffffc000000000000007dfffffffffffff5d40000000000009b1efffffffffff8ba8c0000000000478049fffffffffdaf8fe400000000107d1ec77fffffff9967407c0000000234481d55fffffff52de3cd140000002fcaa7363cffffff40d563270c000002b8645ff1c1fffff6eeb16ada2400001bc500a8c3f1bfffb19785ab03ec0000ccbb784faea5fffe1055129d66a400045b40961dd90efff6df47ea0a9abc0011d73942311761ffdf6bda39370cf40037a7c088ec9f347fa6f398be8567ac0085929ae237e47dff44024275c44ca400f86aba76aa5194fecb9ed1e8470d7c0167c6b5c657c599fe75681fdc23dcf40196ec9f24fb04245e75681fdc23dcf40167c6b5c657c599fecb9ed1e8470d7c00f86aba76aa5194ff44024275c44ca40085929ae237e47dffa6f398be8567ac0037a7c088ec9f347fdf6bda39370cf40011d73942311761fff6df47ea0a9abc00045b40961dd90efffe1055129d66a40000ccbb784faea5ffffb19785ab03ec00001bc500a8c3f1bffff6eeb16ada24000002b8645ff1c1ffffff40d563270c0000002fcaa7363cfffffff52de3cd140000000234481d55ffffffff9967407c00000000107d1ec77ffffffffdaf8fe40000000000478049fffffffffff8ba8c0000000000009b1efffffffffffff5d4000000000000007dfffffffffffffffc00000000000000001n], + [0x10000000000000000n, 64n, 0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n], + [0x10000000000000001n, 64n, 0x1000000000000004000000000000007e0000000000000a2c0000000000009b1f0000000000074574000000000047804a000000000250701c00000000107d1ec7800000006698bf840000000234481d560000000ad21c32ec0000002fcaa7363d000000bf2a9cd8f4000002b8645ff1c2000009114e9525dc00001bc500a8c3f1c0004e687a54fc140000ccbb784faea60001efaaed62995c00045b40961dd90f000920b815f565440011d7394231176200209425c6c8f30c0037a7c088ec9f3480590c67417a98540085929ae237e47e00bbfdbd8a3bb35c00f86aba76aa51950134612e17b8f2840167c6b5c657c59a018a97e023dc230c0196ec9f24fb0424618a97e023dc230c0167c6b5c657c59a0134612e17b8f28400f86aba76aa519500bbfdbd8a3bb35c0085929ae237e47e00590c67417a98540037a7c088ec9f3480209425c6c8f30c0011d73942311762000920b815f5654400045b40961dd90f0001efaaed62995c0000ccbb784faea600004e687a54fc1400001bc500a8c3f1c00009114e9525dc000002b8645ff1c2000000bf2a9cd8f40000002fcaa7363d0000000ad21c32ec0000000234481d56000000006698bf8400000000107d1ec7800000000250701c000000000047804a00000000000745740000000000009b1f0000000000000a2c000000000000007e000000000000000400000000000000001n], +]; + +// Cases not covered above. +tests.push( + // 0 ** (2**31) + // 0 ** (2**32) + // 0 ** (2**63) + // 0 ** (2**64) + [0n, 0x7fffffffn, 0n], + [0n, 0x80000000n, 0n], + [0n, 0x80000001n, 0n], + [0n, 0xffffffffn, 0n], + [0n, 0x100000000n, 0n], + [0n, 0x100000001n, 0n], + [0n, 0x7fffffffffffffffn, 0n], + [0n, 0x8000000000000000n, 0n], + [0n, 0x8000000000000001n, 0n], + [0n, 0xffffffffffffffffn, 0n], + [0n, 0x10000000000000000n, 0n], + [0n, 0x10000000000000001n, 0n], + + // 1 ** (2**31) + // 1 ** (2**32) + // 1 ** (2**63) + // 1 ** (2**64) + [1n, 0x7fffffffn, 1n], + [1n, 0x80000000n, 1n], + [1n, 0x80000001n, 1n], + [1n, 0xffffffffn, 1n], + [1n, 0x100000000n, 1n], + [1n, 0x100000001n, 1n], + [1n, 0x7fffffffffffffffn, 1n], + [1n, 0x8000000000000000n, 1n], + [1n, 0x8000000000000001n, 1n], + [1n, 0xffffffffffffffffn, 1n], + [1n, 0x10000000000000000n, 1n], + [1n, 0x10000000000000001n, 1n], + + // -1 ** (2**31) + // -1 ** (2**32) + // -1 ** (2**63) + // -1 ** (2**64) + [-1n, 0x7fffffffn, -1n], + [-1n, 0x80000000n, 1n], + [-1n, 0x80000001n, -1n], + [-1n, 0xffffffffn, -1n], + [-1n, 0x100000000n, 1n], + [-1n, 0x100000001n, -1n], + [-1n, 0x7fffffffffffffffn, -1n], + [-1n, 0x8000000000000000n, 1n], + [-1n, 0x8000000000000001n, -1n], + [-1n, 0xffffffffffffffffn, -1n], + [-1n, 0x10000000000000000n, 1n], + [-1n, 0x10000000000000001n, -1n], +); + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs ** rhs, expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-rsh.js b/js/src/jit-test/tests/bigint/bigint-rsh.js new file mode 100644 index 0000000000..b1cda65af8 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-rsh.js @@ -0,0 +1,894 @@ +const tests = [ + [-0x10000000000000001n, 0n, -0x10000000000000001n], + [-0x10000000000000000n, 0n, -0x10000000000000000n], + [-0xffffffffffffffffn, 0n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 0n, -0xfffffffffffffffen], + [-0x8000000000000001n, 0n, -0x8000000000000001n], + [-0x8000000000000000n, 0n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 0n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0n, -0x7ffffffffffffffen], + [-0x100000001n, 0n, -0x100000001n], + [-0x100000000n, 0n, -0x100000000n], + [-0xffffffffn, 0n, -0xffffffffn], + [-0xfffffffen, 0n, -0xfffffffen], + [-0x80000001n, 0n, -0x80000001n], + [-0x80000000n, 0n, -0x80000000n], + [-0x7fffffffn, 0n, -0x7fffffffn], + [-0x7ffffffen, 0n, -0x7ffffffen], + [-9n, 0n, -9n], + [-8n, 0n, -8n], + [-7n, 0n, -7n], + [-6n, 0n, -6n], + [-5n, 0n, -5n], + [-4n, 0n, -4n], + [-3n, 0n, -3n], + [-2n, 0n, -2n], + [-1n, 0n, -1n], + [0n, 0n, 0n], + [1n, 0n, 1n], + [2n, 0n, 2n], + [3n, 0n, 3n], + [4n, 0n, 4n], + [5n, 0n, 5n], + [6n, 0n, 6n], + [7n, 0n, 7n], + [8n, 0n, 8n], + [9n, 0n, 9n], + [0x7ffffffen, 0n, 0x7ffffffen], + [0x7fffffffn, 0n, 0x7fffffffn], + [0x80000000n, 0n, 0x80000000n], + [0x80000001n, 0n, 0x80000001n], + [0xfffffffen, 0n, 0xfffffffen], + [0xffffffffn, 0n, 0xffffffffn], + [0x100000000n, 0n, 0x100000000n], + [0x100000001n, 0n, 0x100000001n], + [0x7ffffffffffffffen, 0n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0n, 0x8000000000000000n], + [0x8000000000000001n, 0n, 0x8000000000000001n], + [0xfffffffffffffffen, 0n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0n, 0xffffffffffffffffn], + [0x10000000000000000n, 0n, 0x10000000000000000n], + [0x10000000000000001n, 0n, 0x10000000000000001n], + [-0x10000000000000001n, 1n, -0x8000000000000001n], + [-0x10000000000000000n, 1n, -0x8000000000000000n], + [-0xffffffffffffffffn, 1n, -0x8000000000000000n], + [-0xfffffffffffffffen, 1n, -0x7fffffffffffffffn], + [-0x8000000000000001n, 1n, -0x4000000000000001n], + [-0x8000000000000000n, 1n, -0x4000000000000000n], + [-0x7fffffffffffffffn, 1n, -0x4000000000000000n], + [-0x7ffffffffffffffen, 1n, -0x3fffffffffffffffn], + [-0x100000001n, 1n, -0x80000001n], + [-0x100000000n, 1n, -0x80000000n], + [-0xffffffffn, 1n, -0x80000000n], + [-0xfffffffen, 1n, -0x7fffffffn], + [-0x80000001n, 1n, -0x40000001n], + [-0x80000000n, 1n, -0x40000000n], + [-0x7fffffffn, 1n, -0x40000000n], + [-0x7ffffffen, 1n, -0x3fffffffn], + [-9n, 1n, -5n], + [-8n, 1n, -4n], + [-7n, 1n, -4n], + [-6n, 1n, -3n], + [-5n, 1n, -3n], + [-4n, 1n, -2n], + [-3n, 1n, -2n], + [-2n, 1n, -1n], + [-1n, 1n, -1n], + [0n, 1n, 0n], + [1n, 1n, 0n], + [2n, 1n, 1n], + [3n, 1n, 1n], + [4n, 1n, 2n], + [5n, 1n, 2n], + [6n, 1n, 3n], + [7n, 1n, 3n], + [8n, 1n, 4n], + [9n, 1n, 4n], + [0x7ffffffen, 1n, 0x3fffffffn], + [0x7fffffffn, 1n, 0x3fffffffn], + [0x80000000n, 1n, 0x40000000n], + [0x80000001n, 1n, 0x40000000n], + [0xfffffffen, 1n, 0x7fffffffn], + [0xffffffffn, 1n, 0x7fffffffn], + [0x100000000n, 1n, 0x80000000n], + [0x100000001n, 1n, 0x80000000n], + [0x7ffffffffffffffen, 1n, 0x3fffffffffffffffn], + [0x7fffffffffffffffn, 1n, 0x3fffffffffffffffn], + [0x8000000000000000n, 1n, 0x4000000000000000n], + [0x8000000000000001n, 1n, 0x4000000000000000n], + [0xfffffffffffffffen, 1n, 0x7fffffffffffffffn], + [0xffffffffffffffffn, 1n, 0x7fffffffffffffffn], + [0x10000000000000000n, 1n, 0x8000000000000000n], + [0x10000000000000001n, 1n, 0x8000000000000000n], + [-0x10000000000000001n, 2n, -0x4000000000000001n], + [-0x10000000000000000n, 2n, -0x4000000000000000n], + [-0xffffffffffffffffn, 2n, -0x4000000000000000n], + [-0xfffffffffffffffen, 2n, -0x4000000000000000n], + [-0x8000000000000001n, 2n, -0x2000000000000001n], + [-0x8000000000000000n, 2n, -0x2000000000000000n], + [-0x7fffffffffffffffn, 2n, -0x2000000000000000n], + [-0x7ffffffffffffffen, 2n, -0x2000000000000000n], + [-0x100000001n, 2n, -0x40000001n], + [-0x100000000n, 2n, -0x40000000n], + [-0xffffffffn, 2n, -0x40000000n], + [-0xfffffffen, 2n, -0x40000000n], + [-0x80000001n, 2n, -0x20000001n], + [-0x80000000n, 2n, -0x20000000n], + [-0x7fffffffn, 2n, -0x20000000n], + [-0x7ffffffen, 2n, -0x20000000n], + [-9n, 2n, -3n], + [-8n, 2n, -2n], + [-7n, 2n, -2n], + [-6n, 2n, -2n], + [-5n, 2n, -2n], + [-4n, 2n, -1n], + [-3n, 2n, -1n], + [-2n, 2n, -1n], + [-1n, 2n, -1n], + [0n, 2n, 0n], + [1n, 2n, 0n], + [2n, 2n, 0n], + [3n, 2n, 0n], + [4n, 2n, 1n], + [5n, 2n, 1n], + [6n, 2n, 1n], + [7n, 2n, 1n], + [8n, 2n, 2n], + [9n, 2n, 2n], + [0x7ffffffen, 2n, 0x1fffffffn], + [0x7fffffffn, 2n, 0x1fffffffn], + [0x80000000n, 2n, 0x20000000n], + [0x80000001n, 2n, 0x20000000n], + [0xfffffffen, 2n, 0x3fffffffn], + [0xffffffffn, 2n, 0x3fffffffn], + [0x100000000n, 2n, 0x40000000n], + [0x100000001n, 2n, 0x40000000n], + [0x7ffffffffffffffen, 2n, 0x1fffffffffffffffn], + [0x7fffffffffffffffn, 2n, 0x1fffffffffffffffn], + [0x8000000000000000n, 2n, 0x2000000000000000n], + [0x8000000000000001n, 2n, 0x2000000000000000n], + [0xfffffffffffffffen, 2n, 0x3fffffffffffffffn], + [0xffffffffffffffffn, 2n, 0x3fffffffffffffffn], + [0x10000000000000000n, 2n, 0x4000000000000000n], + [0x10000000000000001n, 2n, 0x4000000000000000n], + [-0x10000000000000001n, 3n, -0x2000000000000001n], + [-0x10000000000000000n, 3n, -0x2000000000000000n], + [-0xffffffffffffffffn, 3n, -0x2000000000000000n], + [-0xfffffffffffffffen, 3n, -0x2000000000000000n], + [-0x8000000000000001n, 3n, -0x1000000000000001n], + [-0x8000000000000000n, 3n, -0x1000000000000000n], + [-0x7fffffffffffffffn, 3n, -0x1000000000000000n], + [-0x7ffffffffffffffen, 3n, -0x1000000000000000n], + [-0x100000001n, 3n, -0x20000001n], + [-0x100000000n, 3n, -0x20000000n], + [-0xffffffffn, 3n, -0x20000000n], + [-0xfffffffen, 3n, -0x20000000n], + [-0x80000001n, 3n, -0x10000001n], + [-0x80000000n, 3n, -0x10000000n], + [-0x7fffffffn, 3n, -0x10000000n], + [-0x7ffffffen, 3n, -0x10000000n], + [-9n, 3n, -2n], + [-8n, 3n, -1n], + [-7n, 3n, -1n], + [-6n, 3n, -1n], + [-5n, 3n, -1n], + [-4n, 3n, -1n], + [-3n, 3n, -1n], + [-2n, 3n, -1n], + [-1n, 3n, -1n], + [0n, 3n, 0n], + [1n, 3n, 0n], + [2n, 3n, 0n], + [3n, 3n, 0n], + [4n, 3n, 0n], + [5n, 3n, 0n], + [6n, 3n, 0n], + [7n, 3n, 0n], + [8n, 3n, 1n], + [9n, 3n, 1n], + [0x7ffffffen, 3n, 0xfffffffn], + [0x7fffffffn, 3n, 0xfffffffn], + [0x80000000n, 3n, 0x10000000n], + [0x80000001n, 3n, 0x10000000n], + [0xfffffffen, 3n, 0x1fffffffn], + [0xffffffffn, 3n, 0x1fffffffn], + [0x100000000n, 3n, 0x20000000n], + [0x100000001n, 3n, 0x20000000n], + [0x7ffffffffffffffen, 3n, 0xfffffffffffffffn], + [0x7fffffffffffffffn, 3n, 0xfffffffffffffffn], + [0x8000000000000000n, 3n, 0x1000000000000000n], + [0x8000000000000001n, 3n, 0x1000000000000000n], + [0xfffffffffffffffen, 3n, 0x1fffffffffffffffn], + [0xffffffffffffffffn, 3n, 0x1fffffffffffffffn], + [0x10000000000000000n, 3n, 0x2000000000000000n], + [0x10000000000000001n, 3n, 0x2000000000000000n], + [-0x10000000000000001n, 4n, -0x1000000000000001n], + [-0x10000000000000000n, 4n, -0x1000000000000000n], + [-0xffffffffffffffffn, 4n, -0x1000000000000000n], + [-0xfffffffffffffffen, 4n, -0x1000000000000000n], + [-0x8000000000000001n, 4n, -0x800000000000001n], + [-0x8000000000000000n, 4n, -0x800000000000000n], + [-0x7fffffffffffffffn, 4n, -0x800000000000000n], + [-0x7ffffffffffffffen, 4n, -0x800000000000000n], + [-0x100000001n, 4n, -0x10000001n], + [-0x100000000n, 4n, -0x10000000n], + [-0xffffffffn, 4n, -0x10000000n], + [-0xfffffffen, 4n, -0x10000000n], + [-0x80000001n, 4n, -0x8000001n], + [-0x80000000n, 4n, -0x8000000n], + [-0x7fffffffn, 4n, -0x8000000n], + [-0x7ffffffen, 4n, -0x8000000n], + [-9n, 4n, -1n], + [-8n, 4n, -1n], + [-7n, 4n, -1n], + [-6n, 4n, -1n], + [-5n, 4n, -1n], + [-4n, 4n, -1n], + [-3n, 4n, -1n], + [-2n, 4n, -1n], + [-1n, 4n, -1n], + [0n, 4n, 0n], + [1n, 4n, 0n], + [2n, 4n, 0n], + [3n, 4n, 0n], + [4n, 4n, 0n], + [5n, 4n, 0n], + [6n, 4n, 0n], + [7n, 4n, 0n], + [8n, 4n, 0n], + [9n, 4n, 0n], + [0x7ffffffen, 4n, 0x7ffffffn], + [0x7fffffffn, 4n, 0x7ffffffn], + [0x80000000n, 4n, 0x8000000n], + [0x80000001n, 4n, 0x8000000n], + [0xfffffffen, 4n, 0xfffffffn], + [0xffffffffn, 4n, 0xfffffffn], + [0x100000000n, 4n, 0x10000000n], + [0x100000001n, 4n, 0x10000000n], + [0x7ffffffffffffffen, 4n, 0x7ffffffffffffffn], + [0x7fffffffffffffffn, 4n, 0x7ffffffffffffffn], + [0x8000000000000000n, 4n, 0x800000000000000n], + [0x8000000000000001n, 4n, 0x800000000000000n], + [0xfffffffffffffffen, 4n, 0xfffffffffffffffn], + [0xffffffffffffffffn, 4n, 0xfffffffffffffffn], + [0x10000000000000000n, 4n, 0x1000000000000000n], + [0x10000000000000001n, 4n, 0x1000000000000000n], + [-0x10000000000000001n, 31n, -0x200000001n], + [-0x10000000000000000n, 31n, -0x200000000n], + [-0xffffffffffffffffn, 31n, -0x200000000n], + [-0xfffffffffffffffen, 31n, -0x200000000n], + [-0x8000000000000001n, 31n, -0x100000001n], + [-0x8000000000000000n, 31n, -0x100000000n], + [-0x7fffffffffffffffn, 31n, -0x100000000n], + [-0x7ffffffffffffffen, 31n, -0x100000000n], + [-0x100000001n, 31n, -3n], + [-0x100000000n, 31n, -2n], + [-0xffffffffn, 31n, -2n], + [-0xfffffffen, 31n, -2n], + [-0x80000001n, 31n, -2n], + [-0x80000000n, 31n, -1n], + [-0x7fffffffn, 31n, -1n], + [-0x7ffffffen, 31n, -1n], + [-9n, 31n, -1n], + [-8n, 31n, -1n], + [-7n, 31n, -1n], + [-6n, 31n, -1n], + [-5n, 31n, -1n], + [-4n, 31n, -1n], + [-3n, 31n, -1n], + [-2n, 31n, -1n], + [-1n, 31n, -1n], + [0n, 31n, 0n], + [1n, 31n, 0n], + [2n, 31n, 0n], + [3n, 31n, 0n], + [4n, 31n, 0n], + [5n, 31n, 0n], + [6n, 31n, 0n], + [7n, 31n, 0n], + [8n, 31n, 0n], + [9n, 31n, 0n], + [0x7ffffffen, 31n, 0n], + [0x7fffffffn, 31n, 0n], + [0x80000000n, 31n, 1n], + [0x80000001n, 31n, 1n], + [0xfffffffen, 31n, 1n], + [0xffffffffn, 31n, 1n], + [0x100000000n, 31n, 2n], + [0x100000001n, 31n, 2n], + [0x7ffffffffffffffen, 31n, 0xffffffffn], + [0x7fffffffffffffffn, 31n, 0xffffffffn], + [0x8000000000000000n, 31n, 0x100000000n], + [0x8000000000000001n, 31n, 0x100000000n], + [0xfffffffffffffffen, 31n, 0x1ffffffffn], + [0xffffffffffffffffn, 31n, 0x1ffffffffn], + [0x10000000000000000n, 31n, 0x200000000n], + [0x10000000000000001n, 31n, 0x200000000n], + [-0x10000000000000001n, 32n, -0x100000001n], + [-0x10000000000000000n, 32n, -0x100000000n], + [-0xffffffffffffffffn, 32n, -0x100000000n], + [-0xfffffffffffffffen, 32n, -0x100000000n], + [-0x8000000000000001n, 32n, -0x80000001n], + [-0x8000000000000000n, 32n, -0x80000000n], + [-0x7fffffffffffffffn, 32n, -0x80000000n], + [-0x7ffffffffffffffen, 32n, -0x80000000n], + [-0x100000001n, 32n, -2n], + [-0x100000000n, 32n, -1n], + [-0xffffffffn, 32n, -1n], + [-0xfffffffen, 32n, -1n], + [-0x80000001n, 32n, -1n], + [-0x80000000n, 32n, -1n], + [-0x7fffffffn, 32n, -1n], + [-0x7ffffffen, 32n, -1n], + [-9n, 32n, -1n], + [-8n, 32n, -1n], + [-7n, 32n, -1n], + [-6n, 32n, -1n], + [-5n, 32n, -1n], + [-4n, 32n, -1n], + [-3n, 32n, -1n], + [-2n, 32n, -1n], + [-1n, 32n, -1n], + [0n, 32n, 0n], + [1n, 32n, 0n], + [2n, 32n, 0n], + [3n, 32n, 0n], + [4n, 32n, 0n], + [5n, 32n, 0n], + [6n, 32n, 0n], + [7n, 32n, 0n], + [8n, 32n, 0n], + [9n, 32n, 0n], + [0x7ffffffen, 32n, 0n], + [0x7fffffffn, 32n, 0n], + [0x80000000n, 32n, 0n], + [0x80000001n, 32n, 0n], + [0xfffffffen, 32n, 0n], + [0xffffffffn, 32n, 0n], + [0x100000000n, 32n, 1n], + [0x100000001n, 32n, 1n], + [0x7ffffffffffffffen, 32n, 0x7fffffffn], + [0x7fffffffffffffffn, 32n, 0x7fffffffn], + [0x8000000000000000n, 32n, 0x80000000n], + [0x8000000000000001n, 32n, 0x80000000n], + [0xfffffffffffffffen, 32n, 0xffffffffn], + [0xffffffffffffffffn, 32n, 0xffffffffn], + [0x10000000000000000n, 32n, 0x100000000n], + [0x10000000000000001n, 32n, 0x100000000n], + [-0x10000000000000001n, 63n, -3n], + [-0x10000000000000000n, 63n, -2n], + [-0xffffffffffffffffn, 63n, -2n], + [-0xfffffffffffffffen, 63n, -2n], + [-0x8000000000000001n, 63n, -2n], + [-0x8000000000000000n, 63n, -1n], + [-0x7fffffffffffffffn, 63n, -1n], + [-0x7ffffffffffffffen, 63n, -1n], + [-0x100000001n, 63n, -1n], + [-0x100000000n, 63n, -1n], + [-0xffffffffn, 63n, -1n], + [-0xfffffffen, 63n, -1n], + [-0x80000001n, 63n, -1n], + [-0x80000000n, 63n, -1n], + [-0x7fffffffn, 63n, -1n], + [-0x7ffffffen, 63n, -1n], + [-9n, 63n, -1n], + [-8n, 63n, -1n], + [-7n, 63n, -1n], + [-6n, 63n, -1n], + [-5n, 63n, -1n], + [-4n, 63n, -1n], + [-3n, 63n, -1n], + [-2n, 63n, -1n], + [-1n, 63n, -1n], + [0n, 63n, 0n], + [1n, 63n, 0n], + [2n, 63n, 0n], + [3n, 63n, 0n], + [4n, 63n, 0n], + [5n, 63n, 0n], + [6n, 63n, 0n], + [7n, 63n, 0n], + [8n, 63n, 0n], + [9n, 63n, 0n], + [0x7ffffffen, 63n, 0n], + [0x7fffffffn, 63n, 0n], + [0x80000000n, 63n, 0n], + [0x80000001n, 63n, 0n], + [0xfffffffen, 63n, 0n], + [0xffffffffn, 63n, 0n], + [0x100000000n, 63n, 0n], + [0x100000001n, 63n, 0n], + [0x7ffffffffffffffen, 63n, 0n], + [0x7fffffffffffffffn, 63n, 0n], + [0x8000000000000000n, 63n, 1n], + [0x8000000000000001n, 63n, 1n], + [0xfffffffffffffffen, 63n, 1n], + [0xffffffffffffffffn, 63n, 1n], + [0x10000000000000000n, 63n, 2n], + [0x10000000000000001n, 63n, 2n], + [-0x10000000000000001n, 64n, -2n], + [-0x10000000000000000n, 64n, -1n], + [-0xffffffffffffffffn, 64n, -1n], + [-0xfffffffffffffffen, 64n, -1n], + [-0x8000000000000001n, 64n, -1n], + [-0x8000000000000000n, 64n, -1n], + [-0x7fffffffffffffffn, 64n, -1n], + [-0x7ffffffffffffffen, 64n, -1n], + [-0x100000001n, 64n, -1n], + [-0x100000000n, 64n, -1n], + [-0xffffffffn, 64n, -1n], + [-0xfffffffen, 64n, -1n], + [-0x80000001n, 64n, -1n], + [-0x80000000n, 64n, -1n], + [-0x7fffffffn, 64n, -1n], + [-0x7ffffffen, 64n, -1n], + [-9n, 64n, -1n], + [-8n, 64n, -1n], + [-7n, 64n, -1n], + [-6n, 64n, -1n], + [-5n, 64n, -1n], + [-4n, 64n, -1n], + [-3n, 64n, -1n], + [-2n, 64n, -1n], + [-1n, 64n, -1n], + [0n, 64n, 0n], + [1n, 64n, 0n], + [2n, 64n, 0n], + [3n, 64n, 0n], + [4n, 64n, 0n], + [5n, 64n, 0n], + [6n, 64n, 0n], + [7n, 64n, 0n], + [8n, 64n, 0n], + [9n, 64n, 0n], + [0x7ffffffen, 64n, 0n], + [0x7fffffffn, 64n, 0n], + [0x80000000n, 64n, 0n], + [0x80000001n, 64n, 0n], + [0xfffffffen, 64n, 0n], + [0xffffffffn, 64n, 0n], + [0x100000000n, 64n, 0n], + [0x100000001n, 64n, 0n], + [0x7ffffffffffffffen, 64n, 0n], + [0x7fffffffffffffffn, 64n, 0n], + [0x8000000000000000n, 64n, 0n], + [0x8000000000000001n, 64n, 0n], + [0xfffffffffffffffen, 64n, 0n], + [0xffffffffffffffffn, 64n, 0n], + [0x10000000000000000n, 64n, 1n], + [0x10000000000000001n, 64n, 1n], + [-0x10000000000000001n, -1n, -0x20000000000000002n], + [-0x10000000000000000n, -1n, -0x20000000000000000n], + [-0xffffffffffffffffn, -1n, -0x1fffffffffffffffen], + [-0xfffffffffffffffen, -1n, -0x1fffffffffffffffcn], + [-0x8000000000000001n, -1n, -0x10000000000000002n], + [-0x8000000000000000n, -1n, -0x10000000000000000n], + [-0x7fffffffffffffffn, -1n, -0xfffffffffffffffen], + [-0x7ffffffffffffffen, -1n, -0xfffffffffffffffcn], + [-0x100000001n, -1n, -0x200000002n], + [-0x100000000n, -1n, -0x200000000n], + [-0xffffffffn, -1n, -0x1fffffffen], + [-0xfffffffen, -1n, -0x1fffffffcn], + [-0x80000001n, -1n, -0x100000002n], + [-0x80000000n, -1n, -0x100000000n], + [-0x7fffffffn, -1n, -0xfffffffen], + [-0x7ffffffen, -1n, -0xfffffffcn], + [-9n, -1n, -18n], + [-8n, -1n, -16n], + [-7n, -1n, -14n], + [-6n, -1n, -12n], + [-5n, -1n, -10n], + [-4n, -1n, -8n], + [-3n, -1n, -6n], + [-2n, -1n, -4n], + [-1n, -1n, -2n], + [0n, -1n, 0n], + [1n, -1n, 2n], + [2n, -1n, 4n], + [3n, -1n, 6n], + [4n, -1n, 8n], + [5n, -1n, 10n], + [6n, -1n, 12n], + [7n, -1n, 14n], + [8n, -1n, 16n], + [9n, -1n, 18n], + [0x7ffffffen, -1n, 0xfffffffcn], + [0x7fffffffn, -1n, 0xfffffffen], + [0x80000000n, -1n, 0x100000000n], + [0x80000001n, -1n, 0x100000002n], + [0xfffffffen, -1n, 0x1fffffffcn], + [0xffffffffn, -1n, 0x1fffffffen], + [0x100000000n, -1n, 0x200000000n], + [0x100000001n, -1n, 0x200000002n], + [0x7ffffffffffffffen, -1n, 0xfffffffffffffffcn], + [0x7fffffffffffffffn, -1n, 0xfffffffffffffffen], + [0x8000000000000000n, -1n, 0x10000000000000000n], + [0x8000000000000001n, -1n, 0x10000000000000002n], + [0xfffffffffffffffen, -1n, 0x1fffffffffffffffcn], + [0xffffffffffffffffn, -1n, 0x1fffffffffffffffen], + [0x10000000000000000n, -1n, 0x20000000000000000n], + [0x10000000000000001n, -1n, 0x20000000000000002n], + [-0x10000000000000001n, -2n, -0x40000000000000004n], + [-0x10000000000000000n, -2n, -0x40000000000000000n], + [-0xffffffffffffffffn, -2n, -0x3fffffffffffffffcn], + [-0xfffffffffffffffen, -2n, -0x3fffffffffffffff8n], + [-0x8000000000000001n, -2n, -0x20000000000000004n], + [-0x8000000000000000n, -2n, -0x20000000000000000n], + [-0x7fffffffffffffffn, -2n, -0x1fffffffffffffffcn], + [-0x7ffffffffffffffen, -2n, -0x1fffffffffffffff8n], + [-0x100000001n, -2n, -0x400000004n], + [-0x100000000n, -2n, -0x400000000n], + [-0xffffffffn, -2n, -0x3fffffffcn], + [-0xfffffffen, -2n, -0x3fffffff8n], + [-0x80000001n, -2n, -0x200000004n], + [-0x80000000n, -2n, -0x200000000n], + [-0x7fffffffn, -2n, -0x1fffffffcn], + [-0x7ffffffen, -2n, -0x1fffffff8n], + [-9n, -2n, -36n], + [-8n, -2n, -32n], + [-7n, -2n, -28n], + [-6n, -2n, -24n], + [-5n, -2n, -20n], + [-4n, -2n, -16n], + [-3n, -2n, -12n], + [-2n, -2n, -8n], + [-1n, -2n, -4n], + [0n, -2n, 0n], + [1n, -2n, 4n], + [2n, -2n, 8n], + [3n, -2n, 12n], + [4n, -2n, 16n], + [5n, -2n, 20n], + [6n, -2n, 24n], + [7n, -2n, 28n], + [8n, -2n, 32n], + [9n, -2n, 36n], + [0x7ffffffen, -2n, 0x1fffffff8n], + [0x7fffffffn, -2n, 0x1fffffffcn], + [0x80000000n, -2n, 0x200000000n], + [0x80000001n, -2n, 0x200000004n], + [0xfffffffen, -2n, 0x3fffffff8n], + [0xffffffffn, -2n, 0x3fffffffcn], + [0x100000000n, -2n, 0x400000000n], + [0x100000001n, -2n, 0x400000004n], + [0x7ffffffffffffffen, -2n, 0x1fffffffffffffff8n], + [0x7fffffffffffffffn, -2n, 0x1fffffffffffffffcn], + [0x8000000000000000n, -2n, 0x20000000000000000n], + [0x8000000000000001n, -2n, 0x20000000000000004n], + [0xfffffffffffffffen, -2n, 0x3fffffffffffffff8n], + [0xffffffffffffffffn, -2n, 0x3fffffffffffffffcn], + [0x10000000000000000n, -2n, 0x40000000000000000n], + [0x10000000000000001n, -2n, 0x40000000000000004n], + [-0x10000000000000001n, -3n, -0x80000000000000008n], + [-0x10000000000000000n, -3n, -0x80000000000000000n], + [-0xffffffffffffffffn, -3n, -0x7fffffffffffffff8n], + [-0xfffffffffffffffen, -3n, -0x7fffffffffffffff0n], + [-0x8000000000000001n, -3n, -0x40000000000000008n], + [-0x8000000000000000n, -3n, -0x40000000000000000n], + [-0x7fffffffffffffffn, -3n, -0x3fffffffffffffff8n], + [-0x7ffffffffffffffen, -3n, -0x3fffffffffffffff0n], + [-0x100000001n, -3n, -0x800000008n], + [-0x100000000n, -3n, -0x800000000n], + [-0xffffffffn, -3n, -0x7fffffff8n], + [-0xfffffffen, -3n, -0x7fffffff0n], + [-0x80000001n, -3n, -0x400000008n], + [-0x80000000n, -3n, -0x400000000n], + [-0x7fffffffn, -3n, -0x3fffffff8n], + [-0x7ffffffen, -3n, -0x3fffffff0n], + [-9n, -3n, -72n], + [-8n, -3n, -64n], + [-7n, -3n, -56n], + [-6n, -3n, -48n], + [-5n, -3n, -40n], + [-4n, -3n, -32n], + [-3n, -3n, -24n], + [-2n, -3n, -16n], + [-1n, -3n, -8n], + [0n, -3n, 0n], + [1n, -3n, 8n], + [2n, -3n, 16n], + [3n, -3n, 24n], + [4n, -3n, 32n], + [5n, -3n, 40n], + [6n, -3n, 48n], + [7n, -3n, 56n], + [8n, -3n, 64n], + [9n, -3n, 72n], + [0x7ffffffen, -3n, 0x3fffffff0n], + [0x7fffffffn, -3n, 0x3fffffff8n], + [0x80000000n, -3n, 0x400000000n], + [0x80000001n, -3n, 0x400000008n], + [0xfffffffen, -3n, 0x7fffffff0n], + [0xffffffffn, -3n, 0x7fffffff8n], + [0x100000000n, -3n, 0x800000000n], + [0x100000001n, -3n, 0x800000008n], + [0x7ffffffffffffffen, -3n, 0x3fffffffffffffff0n], + [0x7fffffffffffffffn, -3n, 0x3fffffffffffffff8n], + [0x8000000000000000n, -3n, 0x40000000000000000n], + [0x8000000000000001n, -3n, 0x40000000000000008n], + [0xfffffffffffffffen, -3n, 0x7fffffffffffffff0n], + [0xffffffffffffffffn, -3n, 0x7fffffffffffffff8n], + [0x10000000000000000n, -3n, 0x80000000000000000n], + [0x10000000000000001n, -3n, 0x80000000000000008n], + [-0x10000000000000001n, -4n, -0x100000000000000010n], + [-0x10000000000000000n, -4n, -0x100000000000000000n], + [-0xffffffffffffffffn, -4n, -0xffffffffffffffff0n], + [-0xfffffffffffffffen, -4n, -0xfffffffffffffffe0n], + [-0x8000000000000001n, -4n, -0x80000000000000010n], + [-0x8000000000000000n, -4n, -0x80000000000000000n], + [-0x7fffffffffffffffn, -4n, -0x7fffffffffffffff0n], + [-0x7ffffffffffffffen, -4n, -0x7ffffffffffffffe0n], + [-0x100000001n, -4n, -0x1000000010n], + [-0x100000000n, -4n, -0x1000000000n], + [-0xffffffffn, -4n, -0xffffffff0n], + [-0xfffffffen, -4n, -0xfffffffe0n], + [-0x80000001n, -4n, -0x800000010n], + [-0x80000000n, -4n, -0x800000000n], + [-0x7fffffffn, -4n, -0x7fffffff0n], + [-0x7ffffffen, -4n, -0x7ffffffe0n], + [-9n, -4n, -144n], + [-8n, -4n, -128n], + [-7n, -4n, -112n], + [-6n, -4n, -96n], + [-5n, -4n, -80n], + [-4n, -4n, -64n], + [-3n, -4n, -48n], + [-2n, -4n, -32n], + [-1n, -4n, -16n], + [0n, -4n, 0n], + [1n, -4n, 16n], + [2n, -4n, 32n], + [3n, -4n, 48n], + [4n, -4n, 64n], + [5n, -4n, 80n], + [6n, -4n, 96n], + [7n, -4n, 112n], + [8n, -4n, 128n], + [9n, -4n, 144n], + [0x7ffffffen, -4n, 0x7ffffffe0n], + [0x7fffffffn, -4n, 0x7fffffff0n], + [0x80000000n, -4n, 0x800000000n], + [0x80000001n, -4n, 0x800000010n], + [0xfffffffen, -4n, 0xfffffffe0n], + [0xffffffffn, -4n, 0xffffffff0n], + [0x100000000n, -4n, 0x1000000000n], + [0x100000001n, -4n, 0x1000000010n], + [0x7ffffffffffffffen, -4n, 0x7ffffffffffffffe0n], + [0x7fffffffffffffffn, -4n, 0x7fffffffffffffff0n], + [0x8000000000000000n, -4n, 0x80000000000000000n], + [0x8000000000000001n, -4n, 0x80000000000000010n], + [0xfffffffffffffffen, -4n, 0xfffffffffffffffe0n], + [0xffffffffffffffffn, -4n, 0xffffffffffffffff0n], + [0x10000000000000000n, -4n, 0x100000000000000000n], + [0x10000000000000001n, -4n, 0x100000000000000010n], + [-0x10000000000000001n, -31n, -0x800000000000000080000000n], + [-0x10000000000000000n, -31n, -0x800000000000000000000000n], + [-0xffffffffffffffffn, -31n, -0x7fffffffffffffff80000000n], + [-0xfffffffffffffffen, -31n, -0x7fffffffffffffff00000000n], + [-0x8000000000000001n, -31n, -0x400000000000000080000000n], + [-0x8000000000000000n, -31n, -0x400000000000000000000000n], + [-0x7fffffffffffffffn, -31n, -0x3fffffffffffffff80000000n], + [-0x7ffffffffffffffen, -31n, -0x3fffffffffffffff00000000n], + [-0x100000001n, -31n, -0x8000000080000000n], + [-0x100000000n, -31n, -0x8000000000000000n], + [-0xffffffffn, -31n, -0x7fffffff80000000n], + [-0xfffffffen, -31n, -0x7fffffff00000000n], + [-0x80000001n, -31n, -0x4000000080000000n], + [-0x80000000n, -31n, -0x4000000000000000n], + [-0x7fffffffn, -31n, -0x3fffffff80000000n], + [-0x7ffffffen, -31n, -0x3fffffff00000000n], + [-9n, -31n, -0x480000000n], + [-8n, -31n, -0x400000000n], + [-7n, -31n, -0x380000000n], + [-6n, -31n, -0x300000000n], + [-5n, -31n, -0x280000000n], + [-4n, -31n, -0x200000000n], + [-3n, -31n, -0x180000000n], + [-2n, -31n, -0x100000000n], + [-1n, -31n, -0x80000000n], + [0n, -31n, 0n], + [1n, -31n, 0x80000000n], + [2n, -31n, 0x100000000n], + [3n, -31n, 0x180000000n], + [4n, -31n, 0x200000000n], + [5n, -31n, 0x280000000n], + [6n, -31n, 0x300000000n], + [7n, -31n, 0x380000000n], + [8n, -31n, 0x400000000n], + [9n, -31n, 0x480000000n], + [0x7ffffffen, -31n, 0x3fffffff00000000n], + [0x7fffffffn, -31n, 0x3fffffff80000000n], + [0x80000000n, -31n, 0x4000000000000000n], + [0x80000001n, -31n, 0x4000000080000000n], + [0xfffffffen, -31n, 0x7fffffff00000000n], + [0xffffffffn, -31n, 0x7fffffff80000000n], + [0x100000000n, -31n, 0x8000000000000000n], + [0x100000001n, -31n, 0x8000000080000000n], + [0x7ffffffffffffffen, -31n, 0x3fffffffffffffff00000000n], + [0x7fffffffffffffffn, -31n, 0x3fffffffffffffff80000000n], + [0x8000000000000000n, -31n, 0x400000000000000000000000n], + [0x8000000000000001n, -31n, 0x400000000000000080000000n], + [0xfffffffffffffffen, -31n, 0x7fffffffffffffff00000000n], + [0xffffffffffffffffn, -31n, 0x7fffffffffffffff80000000n], + [0x10000000000000000n, -31n, 0x800000000000000000000000n], + [0x10000000000000001n, -31n, 0x800000000000000080000000n], + [-0x10000000000000001n, -32n, -0x1000000000000000100000000n], + [-0x10000000000000000n, -32n, -0x1000000000000000000000000n], + [-0xffffffffffffffffn, -32n, -0xffffffffffffffff00000000n], + [-0xfffffffffffffffen, -32n, -0xfffffffffffffffe00000000n], + [-0x8000000000000001n, -32n, -0x800000000000000100000000n], + [-0x8000000000000000n, -32n, -0x800000000000000000000000n], + [-0x7fffffffffffffffn, -32n, -0x7fffffffffffffff00000000n], + [-0x7ffffffffffffffen, -32n, -0x7ffffffffffffffe00000000n], + [-0x100000001n, -32n, -0x10000000100000000n], + [-0x100000000n, -32n, -0x10000000000000000n], + [-0xffffffffn, -32n, -0xffffffff00000000n], + [-0xfffffffen, -32n, -0xfffffffe00000000n], + [-0x80000001n, -32n, -0x8000000100000000n], + [-0x80000000n, -32n, -0x8000000000000000n], + [-0x7fffffffn, -32n, -0x7fffffff00000000n], + [-0x7ffffffen, -32n, -0x7ffffffe00000000n], + [-9n, -32n, -0x900000000n], + [-8n, -32n, -0x800000000n], + [-7n, -32n, -0x700000000n], + [-6n, -32n, -0x600000000n], + [-5n, -32n, -0x500000000n], + [-4n, -32n, -0x400000000n], + [-3n, -32n, -0x300000000n], + [-2n, -32n, -0x200000000n], + [-1n, -32n, -0x100000000n], + [0n, -32n, 0n], + [1n, -32n, 0x100000000n], + [2n, -32n, 0x200000000n], + [3n, -32n, 0x300000000n], + [4n, -32n, 0x400000000n], + [5n, -32n, 0x500000000n], + [6n, -32n, 0x600000000n], + [7n, -32n, 0x700000000n], + [8n, -32n, 0x800000000n], + [9n, -32n, 0x900000000n], + [0x7ffffffen, -32n, 0x7ffffffe00000000n], + [0x7fffffffn, -32n, 0x7fffffff00000000n], + [0x80000000n, -32n, 0x8000000000000000n], + [0x80000001n, -32n, 0x8000000100000000n], + [0xfffffffen, -32n, 0xfffffffe00000000n], + [0xffffffffn, -32n, 0xffffffff00000000n], + [0x100000000n, -32n, 0x10000000000000000n], + [0x100000001n, -32n, 0x10000000100000000n], + [0x7ffffffffffffffen, -32n, 0x7ffffffffffffffe00000000n], + [0x7fffffffffffffffn, -32n, 0x7fffffffffffffff00000000n], + [0x8000000000000000n, -32n, 0x800000000000000000000000n], + [0x8000000000000001n, -32n, 0x800000000000000100000000n], + [0xfffffffffffffffen, -32n, 0xfffffffffffffffe00000000n], + [0xffffffffffffffffn, -32n, 0xffffffffffffffff00000000n], + [0x10000000000000000n, -32n, 0x1000000000000000000000000n], + [0x10000000000000001n, -32n, 0x1000000000000000100000000n], + [-0x10000000000000001n, -63n, -0x80000000000000008000000000000000n], + [-0x10000000000000000n, -63n, -0x80000000000000000000000000000000n], + [-0xffffffffffffffffn, -63n, -0x7fffffffffffffff8000000000000000n], + [-0xfffffffffffffffen, -63n, -0x7fffffffffffffff0000000000000000n], + [-0x8000000000000001n, -63n, -0x40000000000000008000000000000000n], + [-0x8000000000000000n, -63n, -0x40000000000000000000000000000000n], + [-0x7fffffffffffffffn, -63n, -0x3fffffffffffffff8000000000000000n], + [-0x7ffffffffffffffen, -63n, -0x3fffffffffffffff0000000000000000n], + [-0x100000001n, -63n, -0x800000008000000000000000n], + [-0x100000000n, -63n, -0x800000000000000000000000n], + [-0xffffffffn, -63n, -0x7fffffff8000000000000000n], + [-0xfffffffen, -63n, -0x7fffffff0000000000000000n], + [-0x80000001n, -63n, -0x400000008000000000000000n], + [-0x80000000n, -63n, -0x400000000000000000000000n], + [-0x7fffffffn, -63n, -0x3fffffff8000000000000000n], + [-0x7ffffffen, -63n, -0x3fffffff0000000000000000n], + [-9n, -63n, -0x48000000000000000n], + [-8n, -63n, -0x40000000000000000n], + [-7n, -63n, -0x38000000000000000n], + [-6n, -63n, -0x30000000000000000n], + [-5n, -63n, -0x28000000000000000n], + [-4n, -63n, -0x20000000000000000n], + [-3n, -63n, -0x18000000000000000n], + [-2n, -63n, -0x10000000000000000n], + [-1n, -63n, -0x8000000000000000n], + [0n, -63n, 0n], + [1n, -63n, 0x8000000000000000n], + [2n, -63n, 0x10000000000000000n], + [3n, -63n, 0x18000000000000000n], + [4n, -63n, 0x20000000000000000n], + [5n, -63n, 0x28000000000000000n], + [6n, -63n, 0x30000000000000000n], + [7n, -63n, 0x38000000000000000n], + [8n, -63n, 0x40000000000000000n], + [9n, -63n, 0x48000000000000000n], + [0x7ffffffen, -63n, 0x3fffffff0000000000000000n], + [0x7fffffffn, -63n, 0x3fffffff8000000000000000n], + [0x80000000n, -63n, 0x400000000000000000000000n], + [0x80000001n, -63n, 0x400000008000000000000000n], + [0xfffffffen, -63n, 0x7fffffff0000000000000000n], + [0xffffffffn, -63n, 0x7fffffff8000000000000000n], + [0x100000000n, -63n, 0x800000000000000000000000n], + [0x100000001n, -63n, 0x800000008000000000000000n], + [0x7ffffffffffffffen, -63n, 0x3fffffffffffffff0000000000000000n], + [0x7fffffffffffffffn, -63n, 0x3fffffffffffffff8000000000000000n], + [0x8000000000000000n, -63n, 0x40000000000000000000000000000000n], + [0x8000000000000001n, -63n, 0x40000000000000008000000000000000n], + [0xfffffffffffffffen, -63n, 0x7fffffffffffffff0000000000000000n], + [0xffffffffffffffffn, -63n, 0x7fffffffffffffff8000000000000000n], + [0x10000000000000000n, -63n, 0x80000000000000000000000000000000n], + [0x10000000000000001n, -63n, 0x80000000000000008000000000000000n], + [-0x10000000000000001n, -64n, -0x100000000000000010000000000000000n], + [-0x10000000000000000n, -64n, -0x100000000000000000000000000000000n], + [-0xffffffffffffffffn, -64n, -0xffffffffffffffff0000000000000000n], + [-0xfffffffffffffffen, -64n, -0xfffffffffffffffe0000000000000000n], + [-0x8000000000000001n, -64n, -0x80000000000000010000000000000000n], + [-0x8000000000000000n, -64n, -0x80000000000000000000000000000000n], + [-0x7fffffffffffffffn, -64n, -0x7fffffffffffffff0000000000000000n], + [-0x7ffffffffffffffen, -64n, -0x7ffffffffffffffe0000000000000000n], + [-0x100000001n, -64n, -0x1000000010000000000000000n], + [-0x100000000n, -64n, -0x1000000000000000000000000n], + [-0xffffffffn, -64n, -0xffffffff0000000000000000n], + [-0xfffffffen, -64n, -0xfffffffe0000000000000000n], + [-0x80000001n, -64n, -0x800000010000000000000000n], + [-0x80000000n, -64n, -0x800000000000000000000000n], + [-0x7fffffffn, -64n, -0x7fffffff0000000000000000n], + [-0x7ffffffen, -64n, -0x7ffffffe0000000000000000n], + [-9n, -64n, -0x90000000000000000n], + [-8n, -64n, -0x80000000000000000n], + [-7n, -64n, -0x70000000000000000n], + [-6n, -64n, -0x60000000000000000n], + [-5n, -64n, -0x50000000000000000n], + [-4n, -64n, -0x40000000000000000n], + [-3n, -64n, -0x30000000000000000n], + [-2n, -64n, -0x20000000000000000n], + [-1n, -64n, -0x10000000000000000n], + [0n, -64n, 0n], + [1n, -64n, 0x10000000000000000n], + [2n, -64n, 0x20000000000000000n], + [3n, -64n, 0x30000000000000000n], + [4n, -64n, 0x40000000000000000n], + [5n, -64n, 0x50000000000000000n], + [6n, -64n, 0x60000000000000000n], + [7n, -64n, 0x70000000000000000n], + [8n, -64n, 0x80000000000000000n], + [9n, -64n, 0x90000000000000000n], + [0x7ffffffen, -64n, 0x7ffffffe0000000000000000n], + [0x7fffffffn, -64n, 0x7fffffff0000000000000000n], + [0x80000000n, -64n, 0x800000000000000000000000n], + [0x80000001n, -64n, 0x800000010000000000000000n], + [0xfffffffen, -64n, 0xfffffffe0000000000000000n], + [0xffffffffn, -64n, 0xffffffff0000000000000000n], + [0x100000000n, -64n, 0x1000000000000000000000000n], + [0x100000001n, -64n, 0x1000000010000000000000000n], + [0x7ffffffffffffffen, -64n, 0x7ffffffffffffffe0000000000000000n], + [0x7fffffffffffffffn, -64n, 0x7fffffffffffffff0000000000000000n], + [0x8000000000000000n, -64n, 0x80000000000000000000000000000000n], + [0x8000000000000001n, -64n, 0x80000000000000010000000000000000n], + [0xfffffffffffffffen, -64n, 0xfffffffffffffffe0000000000000000n], + [0xffffffffffffffffn, -64n, 0xffffffffffffffff0000000000000000n], + [0x10000000000000000n, -64n, 0x100000000000000000000000000000000n], + [0x10000000000000001n, -64n, 0x100000000000000010000000000000000n], +]; + +// Cases not covered above. +tests.push( + // Positive shift with sign-bit set when interpreted as pointer-sized value (32-bit). + [-1n, 0xf000_0000n, -1n], + [0n, 0xf000_0000n, 0n], + [1n, 0xf000_0000n, 0n], + + // Positive shift with sign-bit set when interpreted as pointer-sized value (64-bit). + [-1n, 0xf000_0000_0000_0000n, -1n], + [0n, 0xf000_0000_0000_0000n, 0n], + [1n, 0xf000_0000_0000_0000n, 0n], +); + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs >> rhs, expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-sub.js b/js/src/jit-test/tests/bigint/bigint-sub.js new file mode 100644 index 0000000000..8608177ab2 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-sub.js @@ -0,0 +1,1383 @@ +const tests = [ + [-0x10000000000000001n, -2n, -0xffffffffffffffffn], + [-0x10000000000000000n, -2n, -0xfffffffffffffffen], + [-0xffffffffffffffffn, -2n, -0xfffffffffffffffdn], + [-0xfffffffffffffffen, -2n, -0xfffffffffffffffcn], + [-0x8000000000000001n, -2n, -0x7fffffffffffffffn], + [-0x8000000000000000n, -2n, -0x7ffffffffffffffen], + [-0x7fffffffffffffffn, -2n, -0x7ffffffffffffffdn], + [-0x7ffffffffffffffen, -2n, -0x7ffffffffffffffcn], + [-0x100000001n, -2n, -0xffffffffn], + [-0x100000000n, -2n, -0xfffffffen], + [-0xffffffffn, -2n, -0xfffffffdn], + [-0xfffffffen, -2n, -0xfffffffcn], + [-0x80000001n, -2n, -0x7fffffffn], + [-0x80000000n, -2n, -0x7ffffffen], + [-0x7fffffffn, -2n, -0x7ffffffdn], + [-0x7ffffffen, -2n, -0x7ffffffcn], + [-2n, -2n, 0n], + [-1n, -2n, 1n], + [0n, -2n, 2n], + [1n, -2n, 3n], + [2n, -2n, 4n], + [0x7ffffffen, -2n, 0x80000000n], + [0x7fffffffn, -2n, 0x80000001n], + [0x80000000n, -2n, 0x80000002n], + [0x80000001n, -2n, 0x80000003n], + [0xfffffffen, -2n, 0x100000000n], + [0xffffffffn, -2n, 0x100000001n], + [0x100000000n, -2n, 0x100000002n], + [0x100000001n, -2n, 0x100000003n], + [0x7ffffffffffffffen, -2n, 0x8000000000000000n], + [0x7fffffffffffffffn, -2n, 0x8000000000000001n], + [0x8000000000000000n, -2n, 0x8000000000000002n], + [0x8000000000000001n, -2n, 0x8000000000000003n], + [0xfffffffffffffffen, -2n, 0x10000000000000000n], + [0xffffffffffffffffn, -2n, 0x10000000000000001n], + [0x10000000000000000n, -2n, 0x10000000000000002n], + [0x10000000000000001n, -2n, 0x10000000000000003n], + [-0x10000000000000001n, -1n, -0x10000000000000000n], + [-0x10000000000000000n, -1n, -0xffffffffffffffffn], + [-0xffffffffffffffffn, -1n, -0xfffffffffffffffen], + [-0xfffffffffffffffen, -1n, -0xfffffffffffffffdn], + [-0x8000000000000001n, -1n, -0x8000000000000000n], + [-0x8000000000000000n, -1n, -0x7fffffffffffffffn], + [-0x7fffffffffffffffn, -1n, -0x7ffffffffffffffen], + [-0x7ffffffffffffffen, -1n, -0x7ffffffffffffffdn], + [-0x100000001n, -1n, -0x100000000n], + [-0x100000000n, -1n, -0xffffffffn], + [-0xffffffffn, -1n, -0xfffffffen], + [-0xfffffffen, -1n, -0xfffffffdn], + [-0x80000001n, -1n, -0x80000000n], + [-0x80000000n, -1n, -0x7fffffffn], + [-0x7fffffffn, -1n, -0x7ffffffen], + [-0x7ffffffen, -1n, -0x7ffffffdn], + [-2n, -1n, -1n], + [-1n, -1n, 0n], + [0n, -1n, 1n], + [1n, -1n, 2n], + [2n, -1n, 3n], + [0x7ffffffen, -1n, 0x7fffffffn], + [0x7fffffffn, -1n, 0x80000000n], + [0x80000000n, -1n, 0x80000001n], + [0x80000001n, -1n, 0x80000002n], + [0xfffffffen, -1n, 0xffffffffn], + [0xffffffffn, -1n, 0x100000000n], + [0x100000000n, -1n, 0x100000001n], + [0x100000001n, -1n, 0x100000002n], + [0x7ffffffffffffffen, -1n, 0x7fffffffffffffffn], + [0x7fffffffffffffffn, -1n, 0x8000000000000000n], + [0x8000000000000000n, -1n, 0x8000000000000001n], + [0x8000000000000001n, -1n, 0x8000000000000002n], + [0xfffffffffffffffen, -1n, 0xffffffffffffffffn], + [0xffffffffffffffffn, -1n, 0x10000000000000000n], + [0x10000000000000000n, -1n, 0x10000000000000001n], + [0x10000000000000001n, -1n, 0x10000000000000002n], + [-0x10000000000000001n, 0n, -0x10000000000000001n], + [-0x10000000000000000n, 0n, -0x10000000000000000n], + [-0xffffffffffffffffn, 0n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 0n, -0xfffffffffffffffen], + [-0x8000000000000001n, 0n, -0x8000000000000001n], + [-0x8000000000000000n, 0n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 0n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0n, -0x7ffffffffffffffen], + [-0x100000001n, 0n, -0x100000001n], + [-0x100000000n, 0n, -0x100000000n], + [-0xffffffffn, 0n, -0xffffffffn], + [-0xfffffffen, 0n, -0xfffffffen], + [-0x80000001n, 0n, -0x80000001n], + [-0x80000000n, 0n, -0x80000000n], + [-0x7fffffffn, 0n, -0x7fffffffn], + [-0x7ffffffen, 0n, -0x7ffffffen], + [-2n, 0n, -2n], + [-1n, 0n, -1n], + [0n, 0n, 0n], + [1n, 0n, 1n], + [2n, 0n, 2n], + [0x7ffffffen, 0n, 0x7ffffffen], + [0x7fffffffn, 0n, 0x7fffffffn], + [0x80000000n, 0n, 0x80000000n], + [0x80000001n, 0n, 0x80000001n], + [0xfffffffen, 0n, 0xfffffffen], + [0xffffffffn, 0n, 0xffffffffn], + [0x100000000n, 0n, 0x100000000n], + [0x100000001n, 0n, 0x100000001n], + [0x7ffffffffffffffen, 0n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0n, 0x8000000000000000n], + [0x8000000000000001n, 0n, 0x8000000000000001n], + [0xfffffffffffffffen, 0n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0n, 0xffffffffffffffffn], + [0x10000000000000000n, 0n, 0x10000000000000000n], + [0x10000000000000001n, 0n, 0x10000000000000001n], + [-0x10000000000000001n, 1n, -0x10000000000000002n], + [-0x10000000000000000n, 1n, -0x10000000000000001n], + [-0xffffffffffffffffn, 1n, -0x10000000000000000n], + [-0xfffffffffffffffen, 1n, -0xffffffffffffffffn], + [-0x8000000000000001n, 1n, -0x8000000000000002n], + [-0x8000000000000000n, 1n, -0x8000000000000001n], + [-0x7fffffffffffffffn, 1n, -0x8000000000000000n], + [-0x7ffffffffffffffen, 1n, -0x7fffffffffffffffn], + [-0x100000001n, 1n, -0x100000002n], + [-0x100000000n, 1n, -0x100000001n], + [-0xffffffffn, 1n, -0x100000000n], + [-0xfffffffen, 1n, -0xffffffffn], + [-0x80000001n, 1n, -0x80000002n], + [-0x80000000n, 1n, -0x80000001n], + [-0x7fffffffn, 1n, -0x80000000n], + [-0x7ffffffen, 1n, -0x7fffffffn], + [-2n, 1n, -3n], + [-1n, 1n, -2n], + [0n, 1n, -1n], + [1n, 1n, 0n], + [2n, 1n, 1n], + [0x7ffffffen, 1n, 0x7ffffffdn], + [0x7fffffffn, 1n, 0x7ffffffen], + [0x80000000n, 1n, 0x7fffffffn], + [0x80000001n, 1n, 0x80000000n], + [0xfffffffen, 1n, 0xfffffffdn], + [0xffffffffn, 1n, 0xfffffffen], + [0x100000000n, 1n, 0xffffffffn], + [0x100000001n, 1n, 0x100000000n], + [0x7ffffffffffffffen, 1n, 0x7ffffffffffffffdn], + [0x7fffffffffffffffn, 1n, 0x7ffffffffffffffen], + [0x8000000000000000n, 1n, 0x7fffffffffffffffn], + [0x8000000000000001n, 1n, 0x8000000000000000n], + [0xfffffffffffffffen, 1n, 0xfffffffffffffffdn], + [0xffffffffffffffffn, 1n, 0xfffffffffffffffen], + [0x10000000000000000n, 1n, 0xffffffffffffffffn], + [0x10000000000000001n, 1n, 0x10000000000000000n], + [-0x10000000000000001n, 2n, -0x10000000000000003n], + [-0x10000000000000000n, 2n, -0x10000000000000002n], + [-0xffffffffffffffffn, 2n, -0x10000000000000001n], + [-0xfffffffffffffffen, 2n, -0x10000000000000000n], + [-0x8000000000000001n, 2n, -0x8000000000000003n], + [-0x8000000000000000n, 2n, -0x8000000000000002n], + [-0x7fffffffffffffffn, 2n, -0x8000000000000001n], + [-0x7ffffffffffffffen, 2n, -0x8000000000000000n], + [-0x100000001n, 2n, -0x100000003n], + [-0x100000000n, 2n, -0x100000002n], + [-0xffffffffn, 2n, -0x100000001n], + [-0xfffffffen, 2n, -0x100000000n], + [-0x80000001n, 2n, -0x80000003n], + [-0x80000000n, 2n, -0x80000002n], + [-0x7fffffffn, 2n, -0x80000001n], + [-0x7ffffffen, 2n, -0x80000000n], + [-2n, 2n, -4n], + [-1n, 2n, -3n], + [0n, 2n, -2n], + [1n, 2n, -1n], + [2n, 2n, 0n], + [0x7ffffffen, 2n, 0x7ffffffcn], + [0x7fffffffn, 2n, 0x7ffffffdn], + [0x80000000n, 2n, 0x7ffffffen], + [0x80000001n, 2n, 0x7fffffffn], + [0xfffffffen, 2n, 0xfffffffcn], + [0xffffffffn, 2n, 0xfffffffdn], + [0x100000000n, 2n, 0xfffffffen], + [0x100000001n, 2n, 0xffffffffn], + [0x7ffffffffffffffen, 2n, 0x7ffffffffffffffcn], + [0x7fffffffffffffffn, 2n, 0x7ffffffffffffffdn], + [0x8000000000000000n, 2n, 0x7ffffffffffffffen], + [0x8000000000000001n, 2n, 0x7fffffffffffffffn], + [0xfffffffffffffffen, 2n, 0xfffffffffffffffcn], + [0xffffffffffffffffn, 2n, 0xfffffffffffffffdn], + [0x10000000000000000n, 2n, 0xfffffffffffffffen], + [0x10000000000000001n, 2n, 0xffffffffffffffffn], + [-0x10000000000000001n, 0x7ffffffen, -0x1000000007fffffffn], + [-0x10000000000000000n, 0x7ffffffen, -0x1000000007ffffffen], + [-0xffffffffffffffffn, 0x7ffffffen, -0x1000000007ffffffdn], + [-0xfffffffffffffffen, 0x7ffffffen, -0x1000000007ffffffcn], + [-0x8000000000000001n, 0x7ffffffen, -0x800000007fffffffn], + [-0x8000000000000000n, 0x7ffffffen, -0x800000007ffffffen], + [-0x7fffffffffffffffn, 0x7ffffffen, -0x800000007ffffffdn], + [-0x7ffffffffffffffen, 0x7ffffffen, -0x800000007ffffffcn], + [-0x100000001n, 0x7ffffffen, -0x17fffffffn], + [-0x100000000n, 0x7ffffffen, -0x17ffffffen], + [-0xffffffffn, 0x7ffffffen, -0x17ffffffdn], + [-0xfffffffen, 0x7ffffffen, -0x17ffffffcn], + [-0x80000001n, 0x7ffffffen, -0xffffffffn], + [-0x80000000n, 0x7ffffffen, -0xfffffffen], + [-0x7fffffffn, 0x7ffffffen, -0xfffffffdn], + [-0x7ffffffen, 0x7ffffffen, -0xfffffffcn], + [-2n, 0x7ffffffen, -0x80000000n], + [-1n, 0x7ffffffen, -0x7fffffffn], + [0n, 0x7ffffffen, -0x7ffffffen], + [1n, 0x7ffffffen, -0x7ffffffdn], + [2n, 0x7ffffffen, -0x7ffffffcn], + [0x7ffffffen, 0x7ffffffen, 0n], + [0x7fffffffn, 0x7ffffffen, 1n], + [0x80000000n, 0x7ffffffen, 2n], + [0x80000001n, 0x7ffffffen, 3n], + [0xfffffffen, 0x7ffffffen, 0x80000000n], + [0xffffffffn, 0x7ffffffen, 0x80000001n], + [0x100000000n, 0x7ffffffen, 0x80000002n], + [0x100000001n, 0x7ffffffen, 0x80000003n], + [0x7ffffffffffffffen, 0x7ffffffen, 0x7fffffff80000000n], + [0x7fffffffffffffffn, 0x7ffffffen, 0x7fffffff80000001n], + [0x8000000000000000n, 0x7ffffffen, 0x7fffffff80000002n], + [0x8000000000000001n, 0x7ffffffen, 0x7fffffff80000003n], + [0xfffffffffffffffen, 0x7ffffffen, 0xffffffff80000000n], + [0xffffffffffffffffn, 0x7ffffffen, 0xffffffff80000001n], + [0x10000000000000000n, 0x7ffffffen, 0xffffffff80000002n], + [0x10000000000000001n, 0x7ffffffen, 0xffffffff80000003n], + [-0x10000000000000001n, 0x7fffffffn, -0x10000000080000000n], + [-0x10000000000000000n, 0x7fffffffn, -0x1000000007fffffffn], + [-0xffffffffffffffffn, 0x7fffffffn, -0x1000000007ffffffen], + [-0xfffffffffffffffen, 0x7fffffffn, -0x1000000007ffffffdn], + [-0x8000000000000001n, 0x7fffffffn, -0x8000000080000000n], + [-0x8000000000000000n, 0x7fffffffn, -0x800000007fffffffn], + [-0x7fffffffffffffffn, 0x7fffffffn, -0x800000007ffffffen], + [-0x7ffffffffffffffen, 0x7fffffffn, -0x800000007ffffffdn], + [-0x100000001n, 0x7fffffffn, -0x180000000n], + [-0x100000000n, 0x7fffffffn, -0x17fffffffn], + [-0xffffffffn, 0x7fffffffn, -0x17ffffffen], + [-0xfffffffen, 0x7fffffffn, -0x17ffffffdn], + [-0x80000001n, 0x7fffffffn, -0x100000000n], + [-0x80000000n, 0x7fffffffn, -0xffffffffn], + [-0x7fffffffn, 0x7fffffffn, -0xfffffffen], + [-0x7ffffffen, 0x7fffffffn, -0xfffffffdn], + [-2n, 0x7fffffffn, -0x80000001n], + [-1n, 0x7fffffffn, -0x80000000n], + [0n, 0x7fffffffn, -0x7fffffffn], + [1n, 0x7fffffffn, -0x7ffffffen], + [2n, 0x7fffffffn, -0x7ffffffdn], + [0x7ffffffen, 0x7fffffffn, -1n], + [0x7fffffffn, 0x7fffffffn, 0n], + [0x80000000n, 0x7fffffffn, 1n], + [0x80000001n, 0x7fffffffn, 2n], + [0xfffffffen, 0x7fffffffn, 0x7fffffffn], + [0xffffffffn, 0x7fffffffn, 0x80000000n], + [0x100000000n, 0x7fffffffn, 0x80000001n], + [0x100000001n, 0x7fffffffn, 0x80000002n], + [0x7ffffffffffffffen, 0x7fffffffn, 0x7fffffff7fffffffn], + [0x7fffffffffffffffn, 0x7fffffffn, 0x7fffffff80000000n], + [0x8000000000000000n, 0x7fffffffn, 0x7fffffff80000001n], + [0x8000000000000001n, 0x7fffffffn, 0x7fffffff80000002n], + [0xfffffffffffffffen, 0x7fffffffn, 0xffffffff7fffffffn], + [0xffffffffffffffffn, 0x7fffffffn, 0xffffffff80000000n], + [0x10000000000000000n, 0x7fffffffn, 0xffffffff80000001n], + [0x10000000000000001n, 0x7fffffffn, 0xffffffff80000002n], + [-0x10000000000000001n, 0x80000000n, -0x10000000080000001n], + [-0x10000000000000000n, 0x80000000n, -0x10000000080000000n], + [-0xffffffffffffffffn, 0x80000000n, -0x1000000007fffffffn], + [-0xfffffffffffffffen, 0x80000000n, -0x1000000007ffffffen], + [-0x8000000000000001n, 0x80000000n, -0x8000000080000001n], + [-0x8000000000000000n, 0x80000000n, -0x8000000080000000n], + [-0x7fffffffffffffffn, 0x80000000n, -0x800000007fffffffn], + [-0x7ffffffffffffffen, 0x80000000n, -0x800000007ffffffen], + [-0x100000001n, 0x80000000n, -0x180000001n], + [-0x100000000n, 0x80000000n, -0x180000000n], + [-0xffffffffn, 0x80000000n, -0x17fffffffn], + [-0xfffffffen, 0x80000000n, -0x17ffffffen], + [-0x80000001n, 0x80000000n, -0x100000001n], + [-0x80000000n, 0x80000000n, -0x100000000n], + [-0x7fffffffn, 0x80000000n, -0xffffffffn], + [-0x7ffffffen, 0x80000000n, -0xfffffffen], + [-2n, 0x80000000n, -0x80000002n], + [-1n, 0x80000000n, -0x80000001n], + [0n, 0x80000000n, -0x80000000n], + [1n, 0x80000000n, -0x7fffffffn], + [2n, 0x80000000n, -0x7ffffffen], + [0x7ffffffen, 0x80000000n, -2n], + [0x7fffffffn, 0x80000000n, -1n], + [0x80000000n, 0x80000000n, 0n], + [0x80000001n, 0x80000000n, 1n], + [0xfffffffen, 0x80000000n, 0x7ffffffen], + [0xffffffffn, 0x80000000n, 0x7fffffffn], + [0x100000000n, 0x80000000n, 0x80000000n], + [0x100000001n, 0x80000000n, 0x80000001n], + [0x7ffffffffffffffen, 0x80000000n, 0x7fffffff7ffffffen], + [0x7fffffffffffffffn, 0x80000000n, 0x7fffffff7fffffffn], + [0x8000000000000000n, 0x80000000n, 0x7fffffff80000000n], + [0x8000000000000001n, 0x80000000n, 0x7fffffff80000001n], + [0xfffffffffffffffen, 0x80000000n, 0xffffffff7ffffffen], + [0xffffffffffffffffn, 0x80000000n, 0xffffffff7fffffffn], + [0x10000000000000000n, 0x80000000n, 0xffffffff80000000n], + [0x10000000000000001n, 0x80000000n, 0xffffffff80000001n], + [-0x10000000000000001n, 0x80000001n, -0x10000000080000002n], + [-0x10000000000000000n, 0x80000001n, -0x10000000080000001n], + [-0xffffffffffffffffn, 0x80000001n, -0x10000000080000000n], + [-0xfffffffffffffffen, 0x80000001n, -0x1000000007fffffffn], + [-0x8000000000000001n, 0x80000001n, -0x8000000080000002n], + [-0x8000000000000000n, 0x80000001n, -0x8000000080000001n], + [-0x7fffffffffffffffn, 0x80000001n, -0x8000000080000000n], + [-0x7ffffffffffffffen, 0x80000001n, -0x800000007fffffffn], + [-0x100000001n, 0x80000001n, -0x180000002n], + [-0x100000000n, 0x80000001n, -0x180000001n], + [-0xffffffffn, 0x80000001n, -0x180000000n], + [-0xfffffffen, 0x80000001n, -0x17fffffffn], + [-0x80000001n, 0x80000001n, -0x100000002n], + [-0x80000000n, 0x80000001n, -0x100000001n], + [-0x7fffffffn, 0x80000001n, -0x100000000n], + [-0x7ffffffen, 0x80000001n, -0xffffffffn], + [-2n, 0x80000001n, -0x80000003n], + [-1n, 0x80000001n, -0x80000002n], + [0n, 0x80000001n, -0x80000001n], + [1n, 0x80000001n, -0x80000000n], + [2n, 0x80000001n, -0x7fffffffn], + [0x7ffffffen, 0x80000001n, -3n], + [0x7fffffffn, 0x80000001n, -2n], + [0x80000000n, 0x80000001n, -1n], + [0x80000001n, 0x80000001n, 0n], + [0xfffffffen, 0x80000001n, 0x7ffffffdn], + [0xffffffffn, 0x80000001n, 0x7ffffffen], + [0x100000000n, 0x80000001n, 0x7fffffffn], + [0x100000001n, 0x80000001n, 0x80000000n], + [0x7ffffffffffffffen, 0x80000001n, 0x7fffffff7ffffffdn], + [0x7fffffffffffffffn, 0x80000001n, 0x7fffffff7ffffffen], + [0x8000000000000000n, 0x80000001n, 0x7fffffff7fffffffn], + [0x8000000000000001n, 0x80000001n, 0x7fffffff80000000n], + [0xfffffffffffffffen, 0x80000001n, 0xffffffff7ffffffdn], + [0xffffffffffffffffn, 0x80000001n, 0xffffffff7ffffffen], + [0x10000000000000000n, 0x80000001n, 0xffffffff7fffffffn], + [0x10000000000000001n, 0x80000001n, 0xffffffff80000000n], + [-0x10000000000000001n, -0x80000001n, -0xffffffff80000000n], + [-0x10000000000000000n, -0x80000001n, -0xffffffff7fffffffn], + [-0xffffffffffffffffn, -0x80000001n, -0xffffffff7ffffffen], + [-0xfffffffffffffffen, -0x80000001n, -0xffffffff7ffffffdn], + [-0x8000000000000001n, -0x80000001n, -0x7fffffff80000000n], + [-0x8000000000000000n, -0x80000001n, -0x7fffffff7fffffffn], + [-0x7fffffffffffffffn, -0x80000001n, -0x7fffffff7ffffffen], + [-0x7ffffffffffffffen, -0x80000001n, -0x7fffffff7ffffffdn], + [-0x100000001n, -0x80000001n, -0x80000000n], + [-0x100000000n, -0x80000001n, -0x7fffffffn], + [-0xffffffffn, -0x80000001n, -0x7ffffffen], + [-0xfffffffen, -0x80000001n, -0x7ffffffdn], + [-0x80000001n, -0x80000001n, 0n], + [-0x80000000n, -0x80000001n, 1n], + [-0x7fffffffn, -0x80000001n, 2n], + [-0x7ffffffen, -0x80000001n, 3n], + [-2n, -0x80000001n, 0x7fffffffn], + [-1n, -0x80000001n, 0x80000000n], + [0n, -0x80000001n, 0x80000001n], + [1n, -0x80000001n, 0x80000002n], + [2n, -0x80000001n, 0x80000003n], + [0x7ffffffen, -0x80000001n, 0xffffffffn], + [0x7fffffffn, -0x80000001n, 0x100000000n], + [0x80000000n, -0x80000001n, 0x100000001n], + [0x80000001n, -0x80000001n, 0x100000002n], + [0xfffffffen, -0x80000001n, 0x17fffffffn], + [0xffffffffn, -0x80000001n, 0x180000000n], + [0x100000000n, -0x80000001n, 0x180000001n], + [0x100000001n, -0x80000001n, 0x180000002n], + [0x7ffffffffffffffen, -0x80000001n, 0x800000007fffffffn], + [0x7fffffffffffffffn, -0x80000001n, 0x8000000080000000n], + [0x8000000000000000n, -0x80000001n, 0x8000000080000001n], + [0x8000000000000001n, -0x80000001n, 0x8000000080000002n], + [0xfffffffffffffffen, -0x80000001n, 0x1000000007fffffffn], + [0xffffffffffffffffn, -0x80000001n, 0x10000000080000000n], + [0x10000000000000000n, -0x80000001n, 0x10000000080000001n], + [0x10000000000000001n, -0x80000001n, 0x10000000080000002n], + [-0x10000000000000001n, -0x80000000n, -0xffffffff80000001n], + [-0x10000000000000000n, -0x80000000n, -0xffffffff80000000n], + [-0xffffffffffffffffn, -0x80000000n, -0xffffffff7fffffffn], + [-0xfffffffffffffffen, -0x80000000n, -0xffffffff7ffffffen], + [-0x8000000000000001n, -0x80000000n, -0x7fffffff80000001n], + [-0x8000000000000000n, -0x80000000n, -0x7fffffff80000000n], + [-0x7fffffffffffffffn, -0x80000000n, -0x7fffffff7fffffffn], + [-0x7ffffffffffffffen, -0x80000000n, -0x7fffffff7ffffffen], + [-0x100000001n, -0x80000000n, -0x80000001n], + [-0x100000000n, -0x80000000n, -0x80000000n], + [-0xffffffffn, -0x80000000n, -0x7fffffffn], + [-0xfffffffen, -0x80000000n, -0x7ffffffen], + [-0x80000001n, -0x80000000n, -1n], + [-0x80000000n, -0x80000000n, 0n], + [-0x7fffffffn, -0x80000000n, 1n], + [-0x7ffffffen, -0x80000000n, 2n], + [-2n, -0x80000000n, 0x7ffffffen], + [-1n, -0x80000000n, 0x7fffffffn], + [0n, -0x80000000n, 0x80000000n], + [1n, -0x80000000n, 0x80000001n], + [2n, -0x80000000n, 0x80000002n], + [0x7ffffffen, -0x80000000n, 0xfffffffen], + [0x7fffffffn, -0x80000000n, 0xffffffffn], + [0x80000000n, -0x80000000n, 0x100000000n], + [0x80000001n, -0x80000000n, 0x100000001n], + [0xfffffffen, -0x80000000n, 0x17ffffffen], + [0xffffffffn, -0x80000000n, 0x17fffffffn], + [0x100000000n, -0x80000000n, 0x180000000n], + [0x100000001n, -0x80000000n, 0x180000001n], + [0x7ffffffffffffffen, -0x80000000n, 0x800000007ffffffen], + [0x7fffffffffffffffn, -0x80000000n, 0x800000007fffffffn], + [0x8000000000000000n, -0x80000000n, 0x8000000080000000n], + [0x8000000000000001n, -0x80000000n, 0x8000000080000001n], + [0xfffffffffffffffen, -0x80000000n, 0x1000000007ffffffen], + [0xffffffffffffffffn, -0x80000000n, 0x1000000007fffffffn], + [0x10000000000000000n, -0x80000000n, 0x10000000080000000n], + [0x10000000000000001n, -0x80000000n, 0x10000000080000001n], + [-0x10000000000000001n, -0x7fffffffn, -0xffffffff80000002n], + [-0x10000000000000000n, -0x7fffffffn, -0xffffffff80000001n], + [-0xffffffffffffffffn, -0x7fffffffn, -0xffffffff80000000n], + [-0xfffffffffffffffen, -0x7fffffffn, -0xffffffff7fffffffn], + [-0x8000000000000001n, -0x7fffffffn, -0x7fffffff80000002n], + [-0x8000000000000000n, -0x7fffffffn, -0x7fffffff80000001n], + [-0x7fffffffffffffffn, -0x7fffffffn, -0x7fffffff80000000n], + [-0x7ffffffffffffffen, -0x7fffffffn, -0x7fffffff7fffffffn], + [-0x100000001n, -0x7fffffffn, -0x80000002n], + [-0x100000000n, -0x7fffffffn, -0x80000001n], + [-0xffffffffn, -0x7fffffffn, -0x80000000n], + [-0xfffffffen, -0x7fffffffn, -0x7fffffffn], + [-0x80000001n, -0x7fffffffn, -2n], + [-0x80000000n, -0x7fffffffn, -1n], + [-0x7fffffffn, -0x7fffffffn, 0n], + [-0x7ffffffen, -0x7fffffffn, 1n], + [-2n, -0x7fffffffn, 0x7ffffffdn], + [-1n, -0x7fffffffn, 0x7ffffffen], + [0n, -0x7fffffffn, 0x7fffffffn], + [1n, -0x7fffffffn, 0x80000000n], + [2n, -0x7fffffffn, 0x80000001n], + [0x7ffffffen, -0x7fffffffn, 0xfffffffdn], + [0x7fffffffn, -0x7fffffffn, 0xfffffffen], + [0x80000000n, -0x7fffffffn, 0xffffffffn], + [0x80000001n, -0x7fffffffn, 0x100000000n], + [0xfffffffen, -0x7fffffffn, 0x17ffffffdn], + [0xffffffffn, -0x7fffffffn, 0x17ffffffen], + [0x100000000n, -0x7fffffffn, 0x17fffffffn], + [0x100000001n, -0x7fffffffn, 0x180000000n], + [0x7ffffffffffffffen, -0x7fffffffn, 0x800000007ffffffdn], + [0x7fffffffffffffffn, -0x7fffffffn, 0x800000007ffffffen], + [0x8000000000000000n, -0x7fffffffn, 0x800000007fffffffn], + [0x8000000000000001n, -0x7fffffffn, 0x8000000080000000n], + [0xfffffffffffffffen, -0x7fffffffn, 0x1000000007ffffffdn], + [0xffffffffffffffffn, -0x7fffffffn, 0x1000000007ffffffen], + [0x10000000000000000n, -0x7fffffffn, 0x1000000007fffffffn], + [0x10000000000000001n, -0x7fffffffn, 0x10000000080000000n], + [-0x10000000000000001n, -0x7ffffffen, -0xffffffff80000003n], + [-0x10000000000000000n, -0x7ffffffen, -0xffffffff80000002n], + [-0xffffffffffffffffn, -0x7ffffffen, -0xffffffff80000001n], + [-0xfffffffffffffffen, -0x7ffffffen, -0xffffffff80000000n], + [-0x8000000000000001n, -0x7ffffffen, -0x7fffffff80000003n], + [-0x8000000000000000n, -0x7ffffffen, -0x7fffffff80000002n], + [-0x7fffffffffffffffn, -0x7ffffffen, -0x7fffffff80000001n], + [-0x7ffffffffffffffen, -0x7ffffffen, -0x7fffffff80000000n], + [-0x100000001n, -0x7ffffffen, -0x80000003n], + [-0x100000000n, -0x7ffffffen, -0x80000002n], + [-0xffffffffn, -0x7ffffffen, -0x80000001n], + [-0xfffffffen, -0x7ffffffen, -0x80000000n], + [-0x80000001n, -0x7ffffffen, -3n], + [-0x80000000n, -0x7ffffffen, -2n], + [-0x7fffffffn, -0x7ffffffen, -1n], + [-0x7ffffffen, -0x7ffffffen, 0n], + [-2n, -0x7ffffffen, 0x7ffffffcn], + [-1n, -0x7ffffffen, 0x7ffffffdn], + [0n, -0x7ffffffen, 0x7ffffffen], + [1n, -0x7ffffffen, 0x7fffffffn], + [2n, -0x7ffffffen, 0x80000000n], + [0x7ffffffen, -0x7ffffffen, 0xfffffffcn], + [0x7fffffffn, -0x7ffffffen, 0xfffffffdn], + [0x80000000n, -0x7ffffffen, 0xfffffffen], + [0x80000001n, -0x7ffffffen, 0xffffffffn], + [0xfffffffen, -0x7ffffffen, 0x17ffffffcn], + [0xffffffffn, -0x7ffffffen, 0x17ffffffdn], + [0x100000000n, -0x7ffffffen, 0x17ffffffen], + [0x100000001n, -0x7ffffffen, 0x17fffffffn], + [0x7ffffffffffffffen, -0x7ffffffen, 0x800000007ffffffcn], + [0x7fffffffffffffffn, -0x7ffffffen, 0x800000007ffffffdn], + [0x8000000000000000n, -0x7ffffffen, 0x800000007ffffffen], + [0x8000000000000001n, -0x7ffffffen, 0x800000007fffffffn], + [0xfffffffffffffffen, -0x7ffffffen, 0x1000000007ffffffcn], + [0xffffffffffffffffn, -0x7ffffffen, 0x1000000007ffffffdn], + [0x10000000000000000n, -0x7ffffffen, 0x1000000007ffffffen], + [0x10000000000000001n, -0x7ffffffen, 0x1000000007fffffffn], + [-0x10000000000000001n, 0xfffffffen, -0x100000000ffffffffn], + [-0x10000000000000000n, 0xfffffffen, -0x100000000fffffffen], + [-0xffffffffffffffffn, 0xfffffffen, -0x100000000fffffffdn], + [-0xfffffffffffffffen, 0xfffffffen, -0x100000000fffffffcn], + [-0x8000000000000001n, 0xfffffffen, -0x80000000ffffffffn], + [-0x8000000000000000n, 0xfffffffen, -0x80000000fffffffen], + [-0x7fffffffffffffffn, 0xfffffffen, -0x80000000fffffffdn], + [-0x7ffffffffffffffen, 0xfffffffen, -0x80000000fffffffcn], + [-0x100000001n, 0xfffffffen, -0x1ffffffffn], + [-0x100000000n, 0xfffffffen, -0x1fffffffen], + [-0xffffffffn, 0xfffffffen, -0x1fffffffdn], + [-0xfffffffen, 0xfffffffen, -0x1fffffffcn], + [-0x80000001n, 0xfffffffen, -0x17fffffffn], + [-0x80000000n, 0xfffffffen, -0x17ffffffen], + [-0x7fffffffn, 0xfffffffen, -0x17ffffffdn], + [-0x7ffffffen, 0xfffffffen, -0x17ffffffcn], + [-2n, 0xfffffffen, -0x100000000n], + [-1n, 0xfffffffen, -0xffffffffn], + [0n, 0xfffffffen, -0xfffffffen], + [1n, 0xfffffffen, -0xfffffffdn], + [2n, 0xfffffffen, -0xfffffffcn], + [0x7ffffffen, 0xfffffffen, -0x80000000n], + [0x7fffffffn, 0xfffffffen, -0x7fffffffn], + [0x80000000n, 0xfffffffen, -0x7ffffffen], + [0x80000001n, 0xfffffffen, -0x7ffffffdn], + [0xfffffffen, 0xfffffffen, 0n], + [0xffffffffn, 0xfffffffen, 1n], + [0x100000000n, 0xfffffffen, 2n], + [0x100000001n, 0xfffffffen, 3n], + [0x7ffffffffffffffen, 0xfffffffen, 0x7fffffff00000000n], + [0x7fffffffffffffffn, 0xfffffffen, 0x7fffffff00000001n], + [0x8000000000000000n, 0xfffffffen, 0x7fffffff00000002n], + [0x8000000000000001n, 0xfffffffen, 0x7fffffff00000003n], + [0xfffffffffffffffen, 0xfffffffen, 0xffffffff00000000n], + [0xffffffffffffffffn, 0xfffffffen, 0xffffffff00000001n], + [0x10000000000000000n, 0xfffffffen, 0xffffffff00000002n], + [0x10000000000000001n, 0xfffffffen, 0xffffffff00000003n], + [-0x10000000000000001n, 0xffffffffn, -0x10000000100000000n], + [-0x10000000000000000n, 0xffffffffn, -0x100000000ffffffffn], + [-0xffffffffffffffffn, 0xffffffffn, -0x100000000fffffffen], + [-0xfffffffffffffffen, 0xffffffffn, -0x100000000fffffffdn], + [-0x8000000000000001n, 0xffffffffn, -0x8000000100000000n], + [-0x8000000000000000n, 0xffffffffn, -0x80000000ffffffffn], + [-0x7fffffffffffffffn, 0xffffffffn, -0x80000000fffffffen], + [-0x7ffffffffffffffen, 0xffffffffn, -0x80000000fffffffdn], + [-0x100000001n, 0xffffffffn, -0x200000000n], + [-0x100000000n, 0xffffffffn, -0x1ffffffffn], + [-0xffffffffn, 0xffffffffn, -0x1fffffffen], + [-0xfffffffen, 0xffffffffn, -0x1fffffffdn], + [-0x80000001n, 0xffffffffn, -0x180000000n], + [-0x80000000n, 0xffffffffn, -0x17fffffffn], + [-0x7fffffffn, 0xffffffffn, -0x17ffffffen], + [-0x7ffffffen, 0xffffffffn, -0x17ffffffdn], + [-2n, 0xffffffffn, -0x100000001n], + [-1n, 0xffffffffn, -0x100000000n], + [0n, 0xffffffffn, -0xffffffffn], + [1n, 0xffffffffn, -0xfffffffen], + [2n, 0xffffffffn, -0xfffffffdn], + [0x7ffffffen, 0xffffffffn, -0x80000001n], + [0x7fffffffn, 0xffffffffn, -0x80000000n], + [0x80000000n, 0xffffffffn, -0x7fffffffn], + [0x80000001n, 0xffffffffn, -0x7ffffffen], + [0xfffffffen, 0xffffffffn, -1n], + [0xffffffffn, 0xffffffffn, 0n], + [0x100000000n, 0xffffffffn, 1n], + [0x100000001n, 0xffffffffn, 2n], + [0x7ffffffffffffffen, 0xffffffffn, 0x7ffffffeffffffffn], + [0x7fffffffffffffffn, 0xffffffffn, 0x7fffffff00000000n], + [0x8000000000000000n, 0xffffffffn, 0x7fffffff00000001n], + [0x8000000000000001n, 0xffffffffn, 0x7fffffff00000002n], + [0xfffffffffffffffen, 0xffffffffn, 0xfffffffeffffffffn], + [0xffffffffffffffffn, 0xffffffffn, 0xffffffff00000000n], + [0x10000000000000000n, 0xffffffffn, 0xffffffff00000001n], + [0x10000000000000001n, 0xffffffffn, 0xffffffff00000002n], + [-0x10000000000000001n, 0x100000000n, -0x10000000100000001n], + [-0x10000000000000000n, 0x100000000n, -0x10000000100000000n], + [-0xffffffffffffffffn, 0x100000000n, -0x100000000ffffffffn], + [-0xfffffffffffffffen, 0x100000000n, -0x100000000fffffffen], + [-0x8000000000000001n, 0x100000000n, -0x8000000100000001n], + [-0x8000000000000000n, 0x100000000n, -0x8000000100000000n], + [-0x7fffffffffffffffn, 0x100000000n, -0x80000000ffffffffn], + [-0x7ffffffffffffffen, 0x100000000n, -0x80000000fffffffen], + [-0x100000001n, 0x100000000n, -0x200000001n], + [-0x100000000n, 0x100000000n, -0x200000000n], + [-0xffffffffn, 0x100000000n, -0x1ffffffffn], + [-0xfffffffen, 0x100000000n, -0x1fffffffen], + [-0x80000001n, 0x100000000n, -0x180000001n], + [-0x80000000n, 0x100000000n, -0x180000000n], + [-0x7fffffffn, 0x100000000n, -0x17fffffffn], + [-0x7ffffffen, 0x100000000n, -0x17ffffffen], + [-2n, 0x100000000n, -0x100000002n], + [-1n, 0x100000000n, -0x100000001n], + [0n, 0x100000000n, -0x100000000n], + [1n, 0x100000000n, -0xffffffffn], + [2n, 0x100000000n, -0xfffffffen], + [0x7ffffffen, 0x100000000n, -0x80000002n], + [0x7fffffffn, 0x100000000n, -0x80000001n], + [0x80000000n, 0x100000000n, -0x80000000n], + [0x80000001n, 0x100000000n, -0x7fffffffn], + [0xfffffffen, 0x100000000n, -2n], + [0xffffffffn, 0x100000000n, -1n], + [0x100000000n, 0x100000000n, 0n], + [0x100000001n, 0x100000000n, 1n], + [0x7ffffffffffffffen, 0x100000000n, 0x7ffffffefffffffen], + [0x7fffffffffffffffn, 0x100000000n, 0x7ffffffeffffffffn], + [0x8000000000000000n, 0x100000000n, 0x7fffffff00000000n], + [0x8000000000000001n, 0x100000000n, 0x7fffffff00000001n], + [0xfffffffffffffffen, 0x100000000n, 0xfffffffefffffffen], + [0xffffffffffffffffn, 0x100000000n, 0xfffffffeffffffffn], + [0x10000000000000000n, 0x100000000n, 0xffffffff00000000n], + [0x10000000000000001n, 0x100000000n, 0xffffffff00000001n], + [-0x10000000000000001n, 0x100000001n, -0x10000000100000002n], + [-0x10000000000000000n, 0x100000001n, -0x10000000100000001n], + [-0xffffffffffffffffn, 0x100000001n, -0x10000000100000000n], + [-0xfffffffffffffffen, 0x100000001n, -0x100000000ffffffffn], + [-0x8000000000000001n, 0x100000001n, -0x8000000100000002n], + [-0x8000000000000000n, 0x100000001n, -0x8000000100000001n], + [-0x7fffffffffffffffn, 0x100000001n, -0x8000000100000000n], + [-0x7ffffffffffffffen, 0x100000001n, -0x80000000ffffffffn], + [-0x100000001n, 0x100000001n, -0x200000002n], + [-0x100000000n, 0x100000001n, -0x200000001n], + [-0xffffffffn, 0x100000001n, -0x200000000n], + [-0xfffffffen, 0x100000001n, -0x1ffffffffn], + [-0x80000001n, 0x100000001n, -0x180000002n], + [-0x80000000n, 0x100000001n, -0x180000001n], + [-0x7fffffffn, 0x100000001n, -0x180000000n], + [-0x7ffffffen, 0x100000001n, -0x17fffffffn], + [-2n, 0x100000001n, -0x100000003n], + [-1n, 0x100000001n, -0x100000002n], + [0n, 0x100000001n, -0x100000001n], + [1n, 0x100000001n, -0x100000000n], + [2n, 0x100000001n, -0xffffffffn], + [0x7ffffffen, 0x100000001n, -0x80000003n], + [0x7fffffffn, 0x100000001n, -0x80000002n], + [0x80000000n, 0x100000001n, -0x80000001n], + [0x80000001n, 0x100000001n, -0x80000000n], + [0xfffffffen, 0x100000001n, -3n], + [0xffffffffn, 0x100000001n, -2n], + [0x100000000n, 0x100000001n, -1n], + [0x100000001n, 0x100000001n, 0n], + [0x7ffffffffffffffen, 0x100000001n, 0x7ffffffefffffffdn], + [0x7fffffffffffffffn, 0x100000001n, 0x7ffffffefffffffen], + [0x8000000000000000n, 0x100000001n, 0x7ffffffeffffffffn], + [0x8000000000000001n, 0x100000001n, 0x7fffffff00000000n], + [0xfffffffffffffffen, 0x100000001n, 0xfffffffefffffffdn], + [0xffffffffffffffffn, 0x100000001n, 0xfffffffefffffffen], + [0x10000000000000000n, 0x100000001n, 0xfffffffeffffffffn], + [0x10000000000000001n, 0x100000001n, 0xffffffff00000000n], + [-0x10000000000000001n, -0x100000001n, -0xffffffff00000000n], + [-0x10000000000000000n, -0x100000001n, -0xfffffffeffffffffn], + [-0xffffffffffffffffn, -0x100000001n, -0xfffffffefffffffen], + [-0xfffffffffffffffen, -0x100000001n, -0xfffffffefffffffdn], + [-0x8000000000000001n, -0x100000001n, -0x7fffffff00000000n], + [-0x8000000000000000n, -0x100000001n, -0x7ffffffeffffffffn], + [-0x7fffffffffffffffn, -0x100000001n, -0x7ffffffefffffffen], + [-0x7ffffffffffffffen, -0x100000001n, -0x7ffffffefffffffdn], + [-0x100000001n, -0x100000001n, 0n], + [-0x100000000n, -0x100000001n, 1n], + [-0xffffffffn, -0x100000001n, 2n], + [-0xfffffffen, -0x100000001n, 3n], + [-0x80000001n, -0x100000001n, 0x80000000n], + [-0x80000000n, -0x100000001n, 0x80000001n], + [-0x7fffffffn, -0x100000001n, 0x80000002n], + [-0x7ffffffen, -0x100000001n, 0x80000003n], + [-2n, -0x100000001n, 0xffffffffn], + [-1n, -0x100000001n, 0x100000000n], + [0n, -0x100000001n, 0x100000001n], + [1n, -0x100000001n, 0x100000002n], + [2n, -0x100000001n, 0x100000003n], + [0x7ffffffen, -0x100000001n, 0x17fffffffn], + [0x7fffffffn, -0x100000001n, 0x180000000n], + [0x80000000n, -0x100000001n, 0x180000001n], + [0x80000001n, -0x100000001n, 0x180000002n], + [0xfffffffen, -0x100000001n, 0x1ffffffffn], + [0xffffffffn, -0x100000001n, 0x200000000n], + [0x100000000n, -0x100000001n, 0x200000001n], + [0x100000001n, -0x100000001n, 0x200000002n], + [0x7ffffffffffffffen, -0x100000001n, 0x80000000ffffffffn], + [0x7fffffffffffffffn, -0x100000001n, 0x8000000100000000n], + [0x8000000000000000n, -0x100000001n, 0x8000000100000001n], + [0x8000000000000001n, -0x100000001n, 0x8000000100000002n], + [0xfffffffffffffffen, -0x100000001n, 0x100000000ffffffffn], + [0xffffffffffffffffn, -0x100000001n, 0x10000000100000000n], + [0x10000000000000000n, -0x100000001n, 0x10000000100000001n], + [0x10000000000000001n, -0x100000001n, 0x10000000100000002n], + [-0x10000000000000001n, -0x100000000n, -0xffffffff00000001n], + [-0x10000000000000000n, -0x100000000n, -0xffffffff00000000n], + [-0xffffffffffffffffn, -0x100000000n, -0xfffffffeffffffffn], + [-0xfffffffffffffffen, -0x100000000n, -0xfffffffefffffffen], + [-0x8000000000000001n, -0x100000000n, -0x7fffffff00000001n], + [-0x8000000000000000n, -0x100000000n, -0x7fffffff00000000n], + [-0x7fffffffffffffffn, -0x100000000n, -0x7ffffffeffffffffn], + [-0x7ffffffffffffffen, -0x100000000n, -0x7ffffffefffffffen], + [-0x100000001n, -0x100000000n, -1n], + [-0x100000000n, -0x100000000n, 0n], + [-0xffffffffn, -0x100000000n, 1n], + [-0xfffffffen, -0x100000000n, 2n], + [-0x80000001n, -0x100000000n, 0x7fffffffn], + [-0x80000000n, -0x100000000n, 0x80000000n], + [-0x7fffffffn, -0x100000000n, 0x80000001n], + [-0x7ffffffen, -0x100000000n, 0x80000002n], + [-2n, -0x100000000n, 0xfffffffen], + [-1n, -0x100000000n, 0xffffffffn], + [0n, -0x100000000n, 0x100000000n], + [1n, -0x100000000n, 0x100000001n], + [2n, -0x100000000n, 0x100000002n], + [0x7ffffffen, -0x100000000n, 0x17ffffffen], + [0x7fffffffn, -0x100000000n, 0x17fffffffn], + [0x80000000n, -0x100000000n, 0x180000000n], + [0x80000001n, -0x100000000n, 0x180000001n], + [0xfffffffen, -0x100000000n, 0x1fffffffen], + [0xffffffffn, -0x100000000n, 0x1ffffffffn], + [0x100000000n, -0x100000000n, 0x200000000n], + [0x100000001n, -0x100000000n, 0x200000001n], + [0x7ffffffffffffffen, -0x100000000n, 0x80000000fffffffen], + [0x7fffffffffffffffn, -0x100000000n, 0x80000000ffffffffn], + [0x8000000000000000n, -0x100000000n, 0x8000000100000000n], + [0x8000000000000001n, -0x100000000n, 0x8000000100000001n], + [0xfffffffffffffffen, -0x100000000n, 0x100000000fffffffen], + [0xffffffffffffffffn, -0x100000000n, 0x100000000ffffffffn], + [0x10000000000000000n, -0x100000000n, 0x10000000100000000n], + [0x10000000000000001n, -0x100000000n, 0x10000000100000001n], + [-0x10000000000000001n, -0xffffffffn, -0xffffffff00000002n], + [-0x10000000000000000n, -0xffffffffn, -0xffffffff00000001n], + [-0xffffffffffffffffn, -0xffffffffn, -0xffffffff00000000n], + [-0xfffffffffffffffen, -0xffffffffn, -0xfffffffeffffffffn], + [-0x8000000000000001n, -0xffffffffn, -0x7fffffff00000002n], + [-0x8000000000000000n, -0xffffffffn, -0x7fffffff00000001n], + [-0x7fffffffffffffffn, -0xffffffffn, -0x7fffffff00000000n], + [-0x7ffffffffffffffen, -0xffffffffn, -0x7ffffffeffffffffn], + [-0x100000001n, -0xffffffffn, -2n], + [-0x100000000n, -0xffffffffn, -1n], + [-0xffffffffn, -0xffffffffn, 0n], + [-0xfffffffen, -0xffffffffn, 1n], + [-0x80000001n, -0xffffffffn, 0x7ffffffen], + [-0x80000000n, -0xffffffffn, 0x7fffffffn], + [-0x7fffffffn, -0xffffffffn, 0x80000000n], + [-0x7ffffffen, -0xffffffffn, 0x80000001n], + [-2n, -0xffffffffn, 0xfffffffdn], + [-1n, -0xffffffffn, 0xfffffffen], + [0n, -0xffffffffn, 0xffffffffn], + [1n, -0xffffffffn, 0x100000000n], + [2n, -0xffffffffn, 0x100000001n], + [0x7ffffffen, -0xffffffffn, 0x17ffffffdn], + [0x7fffffffn, -0xffffffffn, 0x17ffffffen], + [0x80000000n, -0xffffffffn, 0x17fffffffn], + [0x80000001n, -0xffffffffn, 0x180000000n], + [0xfffffffen, -0xffffffffn, 0x1fffffffdn], + [0xffffffffn, -0xffffffffn, 0x1fffffffen], + [0x100000000n, -0xffffffffn, 0x1ffffffffn], + [0x100000001n, -0xffffffffn, 0x200000000n], + [0x7ffffffffffffffen, -0xffffffffn, 0x80000000fffffffdn], + [0x7fffffffffffffffn, -0xffffffffn, 0x80000000fffffffen], + [0x8000000000000000n, -0xffffffffn, 0x80000000ffffffffn], + [0x8000000000000001n, -0xffffffffn, 0x8000000100000000n], + [0xfffffffffffffffen, -0xffffffffn, 0x100000000fffffffdn], + [0xffffffffffffffffn, -0xffffffffn, 0x100000000fffffffen], + [0x10000000000000000n, -0xffffffffn, 0x100000000ffffffffn], + [0x10000000000000001n, -0xffffffffn, 0x10000000100000000n], + [-0x10000000000000001n, -0xfffffffen, -0xffffffff00000003n], + [-0x10000000000000000n, -0xfffffffen, -0xffffffff00000002n], + [-0xffffffffffffffffn, -0xfffffffen, -0xffffffff00000001n], + [-0xfffffffffffffffen, -0xfffffffen, -0xffffffff00000000n], + [-0x8000000000000001n, -0xfffffffen, -0x7fffffff00000003n], + [-0x8000000000000000n, -0xfffffffen, -0x7fffffff00000002n], + [-0x7fffffffffffffffn, -0xfffffffen, -0x7fffffff00000001n], + [-0x7ffffffffffffffen, -0xfffffffen, -0x7fffffff00000000n], + [-0x100000001n, -0xfffffffen, -3n], + [-0x100000000n, -0xfffffffen, -2n], + [-0xffffffffn, -0xfffffffen, -1n], + [-0xfffffffen, -0xfffffffen, 0n], + [-0x80000001n, -0xfffffffen, 0x7ffffffdn], + [-0x80000000n, -0xfffffffen, 0x7ffffffen], + [-0x7fffffffn, -0xfffffffen, 0x7fffffffn], + [-0x7ffffffen, -0xfffffffen, 0x80000000n], + [-2n, -0xfffffffen, 0xfffffffcn], + [-1n, -0xfffffffen, 0xfffffffdn], + [0n, -0xfffffffen, 0xfffffffen], + [1n, -0xfffffffen, 0xffffffffn], + [2n, -0xfffffffen, 0x100000000n], + [0x7ffffffen, -0xfffffffen, 0x17ffffffcn], + [0x7fffffffn, -0xfffffffen, 0x17ffffffdn], + [0x80000000n, -0xfffffffen, 0x17ffffffen], + [0x80000001n, -0xfffffffen, 0x17fffffffn], + [0xfffffffen, -0xfffffffen, 0x1fffffffcn], + [0xffffffffn, -0xfffffffen, 0x1fffffffdn], + [0x100000000n, -0xfffffffen, 0x1fffffffen], + [0x100000001n, -0xfffffffen, 0x1ffffffffn], + [0x7ffffffffffffffen, -0xfffffffen, 0x80000000fffffffcn], + [0x7fffffffffffffffn, -0xfffffffen, 0x80000000fffffffdn], + [0x8000000000000000n, -0xfffffffen, 0x80000000fffffffen], + [0x8000000000000001n, -0xfffffffen, 0x80000000ffffffffn], + [0xfffffffffffffffen, -0xfffffffen, 0x100000000fffffffcn], + [0xffffffffffffffffn, -0xfffffffen, 0x100000000fffffffdn], + [0x10000000000000000n, -0xfffffffen, 0x100000000fffffffen], + [0x10000000000000001n, -0xfffffffen, 0x100000000ffffffffn], + [-0x10000000000000001n, 0x7ffffffffffffffen, -0x17fffffffffffffffn], + [-0x10000000000000000n, 0x7ffffffffffffffen, -0x17ffffffffffffffen], + [-0xffffffffffffffffn, 0x7ffffffffffffffen, -0x17ffffffffffffffdn], + [-0xfffffffffffffffen, 0x7ffffffffffffffen, -0x17ffffffffffffffcn], + [-0x8000000000000001n, 0x7ffffffffffffffen, -0xffffffffffffffffn], + [-0x8000000000000000n, 0x7ffffffffffffffen, -0xfffffffffffffffen], + [-0x7fffffffffffffffn, 0x7ffffffffffffffen, -0xfffffffffffffffdn], + [-0x7ffffffffffffffen, 0x7ffffffffffffffen, -0xfffffffffffffffcn], + [-0x100000001n, 0x7ffffffffffffffen, -0x80000000ffffffffn], + [-0x100000000n, 0x7ffffffffffffffen, -0x80000000fffffffen], + [-0xffffffffn, 0x7ffffffffffffffen, -0x80000000fffffffdn], + [-0xfffffffen, 0x7ffffffffffffffen, -0x80000000fffffffcn], + [-0x80000001n, 0x7ffffffffffffffen, -0x800000007fffffffn], + [-0x80000000n, 0x7ffffffffffffffen, -0x800000007ffffffen], + [-0x7fffffffn, 0x7ffffffffffffffen, -0x800000007ffffffdn], + [-0x7ffffffen, 0x7ffffffffffffffen, -0x800000007ffffffcn], + [-2n, 0x7ffffffffffffffen, -0x8000000000000000n], + [-1n, 0x7ffffffffffffffen, -0x7fffffffffffffffn], + [0n, 0x7ffffffffffffffen, -0x7ffffffffffffffen], + [1n, 0x7ffffffffffffffen, -0x7ffffffffffffffdn], + [2n, 0x7ffffffffffffffen, -0x7ffffffffffffffcn], + [0x7ffffffen, 0x7ffffffffffffffen, -0x7fffffff80000000n], + [0x7fffffffn, 0x7ffffffffffffffen, -0x7fffffff7fffffffn], + [0x80000000n, 0x7ffffffffffffffen, -0x7fffffff7ffffffen], + [0x80000001n, 0x7ffffffffffffffen, -0x7fffffff7ffffffdn], + [0xfffffffen, 0x7ffffffffffffffen, -0x7fffffff00000000n], + [0xffffffffn, 0x7ffffffffffffffen, -0x7ffffffeffffffffn], + [0x100000000n, 0x7ffffffffffffffen, -0x7ffffffefffffffen], + [0x100000001n, 0x7ffffffffffffffen, -0x7ffffffefffffffdn], + [0x7ffffffffffffffen, 0x7ffffffffffffffen, 0n], + [0x7fffffffffffffffn, 0x7ffffffffffffffen, 1n], + [0x8000000000000000n, 0x7ffffffffffffffen, 2n], + [0x8000000000000001n, 0x7ffffffffffffffen, 3n], + [0xfffffffffffffffen, 0x7ffffffffffffffen, 0x8000000000000000n], + [0xffffffffffffffffn, 0x7ffffffffffffffen, 0x8000000000000001n], + [0x10000000000000000n, 0x7ffffffffffffffen, 0x8000000000000002n], + [0x10000000000000001n, 0x7ffffffffffffffen, 0x8000000000000003n], + [-0x10000000000000001n, 0x7fffffffffffffffn, -0x18000000000000000n], + [-0x10000000000000000n, 0x7fffffffffffffffn, -0x17fffffffffffffffn], + [-0xffffffffffffffffn, 0x7fffffffffffffffn, -0x17ffffffffffffffen], + [-0xfffffffffffffffen, 0x7fffffffffffffffn, -0x17ffffffffffffffdn], + [-0x8000000000000001n, 0x7fffffffffffffffn, -0x10000000000000000n], + [-0x8000000000000000n, 0x7fffffffffffffffn, -0xffffffffffffffffn], + [-0x7fffffffffffffffn, 0x7fffffffffffffffn, -0xfffffffffffffffen], + [-0x7ffffffffffffffen, 0x7fffffffffffffffn, -0xfffffffffffffffdn], + [-0x100000001n, 0x7fffffffffffffffn, -0x8000000100000000n], + [-0x100000000n, 0x7fffffffffffffffn, -0x80000000ffffffffn], + [-0xffffffffn, 0x7fffffffffffffffn, -0x80000000fffffffen], + [-0xfffffffen, 0x7fffffffffffffffn, -0x80000000fffffffdn], + [-0x80000001n, 0x7fffffffffffffffn, -0x8000000080000000n], + [-0x80000000n, 0x7fffffffffffffffn, -0x800000007fffffffn], + [-0x7fffffffn, 0x7fffffffffffffffn, -0x800000007ffffffen], + [-0x7ffffffen, 0x7fffffffffffffffn, -0x800000007ffffffdn], + [-2n, 0x7fffffffffffffffn, -0x8000000000000001n], + [-1n, 0x7fffffffffffffffn, -0x8000000000000000n], + [0n, 0x7fffffffffffffffn, -0x7fffffffffffffffn], + [1n, 0x7fffffffffffffffn, -0x7ffffffffffffffen], + [2n, 0x7fffffffffffffffn, -0x7ffffffffffffffdn], + [0x7ffffffen, 0x7fffffffffffffffn, -0x7fffffff80000001n], + [0x7fffffffn, 0x7fffffffffffffffn, -0x7fffffff80000000n], + [0x80000000n, 0x7fffffffffffffffn, -0x7fffffff7fffffffn], + [0x80000001n, 0x7fffffffffffffffn, -0x7fffffff7ffffffen], + [0xfffffffen, 0x7fffffffffffffffn, -0x7fffffff00000001n], + [0xffffffffn, 0x7fffffffffffffffn, -0x7fffffff00000000n], + [0x100000000n, 0x7fffffffffffffffn, -0x7ffffffeffffffffn], + [0x100000001n, 0x7fffffffffffffffn, -0x7ffffffefffffffen], + [0x7ffffffffffffffen, 0x7fffffffffffffffn, -1n], + [0x7fffffffffffffffn, 0x7fffffffffffffffn, 0n], + [0x8000000000000000n, 0x7fffffffffffffffn, 1n], + [0x8000000000000001n, 0x7fffffffffffffffn, 2n], + [0xfffffffffffffffen, 0x7fffffffffffffffn, 0x7fffffffffffffffn], + [0xffffffffffffffffn, 0x7fffffffffffffffn, 0x8000000000000000n], + [0x10000000000000000n, 0x7fffffffffffffffn, 0x8000000000000001n], + [0x10000000000000001n, 0x7fffffffffffffffn, 0x8000000000000002n], + [-0x10000000000000001n, 0x8000000000000000n, -0x18000000000000001n], + [-0x10000000000000000n, 0x8000000000000000n, -0x18000000000000000n], + [-0xffffffffffffffffn, 0x8000000000000000n, -0x17fffffffffffffffn], + [-0xfffffffffffffffen, 0x8000000000000000n, -0x17ffffffffffffffen], + [-0x8000000000000001n, 0x8000000000000000n, -0x10000000000000001n], + [-0x8000000000000000n, 0x8000000000000000n, -0x10000000000000000n], + [-0x7fffffffffffffffn, 0x8000000000000000n, -0xffffffffffffffffn], + [-0x7ffffffffffffffen, 0x8000000000000000n, -0xfffffffffffffffen], + [-0x100000001n, 0x8000000000000000n, -0x8000000100000001n], + [-0x100000000n, 0x8000000000000000n, -0x8000000100000000n], + [-0xffffffffn, 0x8000000000000000n, -0x80000000ffffffffn], + [-0xfffffffen, 0x8000000000000000n, -0x80000000fffffffen], + [-0x80000001n, 0x8000000000000000n, -0x8000000080000001n], + [-0x80000000n, 0x8000000000000000n, -0x8000000080000000n], + [-0x7fffffffn, 0x8000000000000000n, -0x800000007fffffffn], + [-0x7ffffffen, 0x8000000000000000n, -0x800000007ffffffen], + [-2n, 0x8000000000000000n, -0x8000000000000002n], + [-1n, 0x8000000000000000n, -0x8000000000000001n], + [0n, 0x8000000000000000n, -0x8000000000000000n], + [1n, 0x8000000000000000n, -0x7fffffffffffffffn], + [2n, 0x8000000000000000n, -0x7ffffffffffffffen], + [0x7ffffffen, 0x8000000000000000n, -0x7fffffff80000002n], + [0x7fffffffn, 0x8000000000000000n, -0x7fffffff80000001n], + [0x80000000n, 0x8000000000000000n, -0x7fffffff80000000n], + [0x80000001n, 0x8000000000000000n, -0x7fffffff7fffffffn], + [0xfffffffen, 0x8000000000000000n, -0x7fffffff00000002n], + [0xffffffffn, 0x8000000000000000n, -0x7fffffff00000001n], + [0x100000000n, 0x8000000000000000n, -0x7fffffff00000000n], + [0x100000001n, 0x8000000000000000n, -0x7ffffffeffffffffn], + [0x7ffffffffffffffen, 0x8000000000000000n, -2n], + [0x7fffffffffffffffn, 0x8000000000000000n, -1n], + [0x8000000000000000n, 0x8000000000000000n, 0n], + [0x8000000000000001n, 0x8000000000000000n, 1n], + [0xfffffffffffffffen, 0x8000000000000000n, 0x7ffffffffffffffen], + [0xffffffffffffffffn, 0x8000000000000000n, 0x7fffffffffffffffn], + [0x10000000000000000n, 0x8000000000000000n, 0x8000000000000000n], + [0x10000000000000001n, 0x8000000000000000n, 0x8000000000000001n], + [-0x10000000000000001n, 0x8000000000000001n, -0x18000000000000002n], + [-0x10000000000000000n, 0x8000000000000001n, -0x18000000000000001n], + [-0xffffffffffffffffn, 0x8000000000000001n, -0x18000000000000000n], + [-0xfffffffffffffffen, 0x8000000000000001n, -0x17fffffffffffffffn], + [-0x8000000000000001n, 0x8000000000000001n, -0x10000000000000002n], + [-0x8000000000000000n, 0x8000000000000001n, -0x10000000000000001n], + [-0x7fffffffffffffffn, 0x8000000000000001n, -0x10000000000000000n], + [-0x7ffffffffffffffen, 0x8000000000000001n, -0xffffffffffffffffn], + [-0x100000001n, 0x8000000000000001n, -0x8000000100000002n], + [-0x100000000n, 0x8000000000000001n, -0x8000000100000001n], + [-0xffffffffn, 0x8000000000000001n, -0x8000000100000000n], + [-0xfffffffen, 0x8000000000000001n, -0x80000000ffffffffn], + [-0x80000001n, 0x8000000000000001n, -0x8000000080000002n], + [-0x80000000n, 0x8000000000000001n, -0x8000000080000001n], + [-0x7fffffffn, 0x8000000000000001n, -0x8000000080000000n], + [-0x7ffffffen, 0x8000000000000001n, -0x800000007fffffffn], + [-2n, 0x8000000000000001n, -0x8000000000000003n], + [-1n, 0x8000000000000001n, -0x8000000000000002n], + [0n, 0x8000000000000001n, -0x8000000000000001n], + [1n, 0x8000000000000001n, -0x8000000000000000n], + [2n, 0x8000000000000001n, -0x7fffffffffffffffn], + [0x7ffffffen, 0x8000000000000001n, -0x7fffffff80000003n], + [0x7fffffffn, 0x8000000000000001n, -0x7fffffff80000002n], + [0x80000000n, 0x8000000000000001n, -0x7fffffff80000001n], + [0x80000001n, 0x8000000000000001n, -0x7fffffff80000000n], + [0xfffffffen, 0x8000000000000001n, -0x7fffffff00000003n], + [0xffffffffn, 0x8000000000000001n, -0x7fffffff00000002n], + [0x100000000n, 0x8000000000000001n, -0x7fffffff00000001n], + [0x100000001n, 0x8000000000000001n, -0x7fffffff00000000n], + [0x7ffffffffffffffen, 0x8000000000000001n, -3n], + [0x7fffffffffffffffn, 0x8000000000000001n, -2n], + [0x8000000000000000n, 0x8000000000000001n, -1n], + [0x8000000000000001n, 0x8000000000000001n, 0n], + [0xfffffffffffffffen, 0x8000000000000001n, 0x7ffffffffffffffdn], + [0xffffffffffffffffn, 0x8000000000000001n, 0x7ffffffffffffffen], + [0x10000000000000000n, 0x8000000000000001n, 0x7fffffffffffffffn], + [0x10000000000000001n, 0x8000000000000001n, 0x8000000000000000n], + [-0x10000000000000001n, -0x8000000000000001n, -0x8000000000000000n], + [-0x10000000000000000n, -0x8000000000000001n, -0x7fffffffffffffffn], + [-0xffffffffffffffffn, -0x8000000000000001n, -0x7ffffffffffffffen], + [-0xfffffffffffffffen, -0x8000000000000001n, -0x7ffffffffffffffdn], + [-0x8000000000000001n, -0x8000000000000001n, 0n], + [-0x8000000000000000n, -0x8000000000000001n, 1n], + [-0x7fffffffffffffffn, -0x8000000000000001n, 2n], + [-0x7ffffffffffffffen, -0x8000000000000001n, 3n], + [-0x100000001n, -0x8000000000000001n, 0x7fffffff00000000n], + [-0x100000000n, -0x8000000000000001n, 0x7fffffff00000001n], + [-0xffffffffn, -0x8000000000000001n, 0x7fffffff00000002n], + [-0xfffffffen, -0x8000000000000001n, 0x7fffffff00000003n], + [-0x80000001n, -0x8000000000000001n, 0x7fffffff80000000n], + [-0x80000000n, -0x8000000000000001n, 0x7fffffff80000001n], + [-0x7fffffffn, -0x8000000000000001n, 0x7fffffff80000002n], + [-0x7ffffffen, -0x8000000000000001n, 0x7fffffff80000003n], + [-2n, -0x8000000000000001n, 0x7fffffffffffffffn], + [-1n, -0x8000000000000001n, 0x8000000000000000n], + [0n, -0x8000000000000001n, 0x8000000000000001n], + [1n, -0x8000000000000001n, 0x8000000000000002n], + [2n, -0x8000000000000001n, 0x8000000000000003n], + [0x7ffffffen, -0x8000000000000001n, 0x800000007fffffffn], + [0x7fffffffn, -0x8000000000000001n, 0x8000000080000000n], + [0x80000000n, -0x8000000000000001n, 0x8000000080000001n], + [0x80000001n, -0x8000000000000001n, 0x8000000080000002n], + [0xfffffffen, -0x8000000000000001n, 0x80000000ffffffffn], + [0xffffffffn, -0x8000000000000001n, 0x8000000100000000n], + [0x100000000n, -0x8000000000000001n, 0x8000000100000001n], + [0x100000001n, -0x8000000000000001n, 0x8000000100000002n], + [0x7ffffffffffffffen, -0x8000000000000001n, 0xffffffffffffffffn], + [0x7fffffffffffffffn, -0x8000000000000001n, 0x10000000000000000n], + [0x8000000000000000n, -0x8000000000000001n, 0x10000000000000001n], + [0x8000000000000001n, -0x8000000000000001n, 0x10000000000000002n], + [0xfffffffffffffffen, -0x8000000000000001n, 0x17fffffffffffffffn], + [0xffffffffffffffffn, -0x8000000000000001n, 0x18000000000000000n], + [0x10000000000000000n, -0x8000000000000001n, 0x18000000000000001n], + [0x10000000000000001n, -0x8000000000000001n, 0x18000000000000002n], + [-0x10000000000000001n, -0x8000000000000000n, -0x8000000000000001n], + [-0x10000000000000000n, -0x8000000000000000n, -0x8000000000000000n], + [-0xffffffffffffffffn, -0x8000000000000000n, -0x7fffffffffffffffn], + [-0xfffffffffffffffen, -0x8000000000000000n, -0x7ffffffffffffffen], + [-0x8000000000000001n, -0x8000000000000000n, -1n], + [-0x8000000000000000n, -0x8000000000000000n, 0n], + [-0x7fffffffffffffffn, -0x8000000000000000n, 1n], + [-0x7ffffffffffffffen, -0x8000000000000000n, 2n], + [-0x100000001n, -0x8000000000000000n, 0x7ffffffeffffffffn], + [-0x100000000n, -0x8000000000000000n, 0x7fffffff00000000n], + [-0xffffffffn, -0x8000000000000000n, 0x7fffffff00000001n], + [-0xfffffffen, -0x8000000000000000n, 0x7fffffff00000002n], + [-0x80000001n, -0x8000000000000000n, 0x7fffffff7fffffffn], + [-0x80000000n, -0x8000000000000000n, 0x7fffffff80000000n], + [-0x7fffffffn, -0x8000000000000000n, 0x7fffffff80000001n], + [-0x7ffffffen, -0x8000000000000000n, 0x7fffffff80000002n], + [-2n, -0x8000000000000000n, 0x7ffffffffffffffen], + [-1n, -0x8000000000000000n, 0x7fffffffffffffffn], + [0n, -0x8000000000000000n, 0x8000000000000000n], + [1n, -0x8000000000000000n, 0x8000000000000001n], + [2n, -0x8000000000000000n, 0x8000000000000002n], + [0x7ffffffen, -0x8000000000000000n, 0x800000007ffffffen], + [0x7fffffffn, -0x8000000000000000n, 0x800000007fffffffn], + [0x80000000n, -0x8000000000000000n, 0x8000000080000000n], + [0x80000001n, -0x8000000000000000n, 0x8000000080000001n], + [0xfffffffen, -0x8000000000000000n, 0x80000000fffffffen], + [0xffffffffn, -0x8000000000000000n, 0x80000000ffffffffn], + [0x100000000n, -0x8000000000000000n, 0x8000000100000000n], + [0x100000001n, -0x8000000000000000n, 0x8000000100000001n], + [0x7ffffffffffffffen, -0x8000000000000000n, 0xfffffffffffffffen], + [0x7fffffffffffffffn, -0x8000000000000000n, 0xffffffffffffffffn], + [0x8000000000000000n, -0x8000000000000000n, 0x10000000000000000n], + [0x8000000000000001n, -0x8000000000000000n, 0x10000000000000001n], + [0xfffffffffffffffen, -0x8000000000000000n, 0x17ffffffffffffffen], + [0xffffffffffffffffn, -0x8000000000000000n, 0x17fffffffffffffffn], + [0x10000000000000000n, -0x8000000000000000n, 0x18000000000000000n], + [0x10000000000000001n, -0x8000000000000000n, 0x18000000000000001n], + [-0x10000000000000001n, -0x7fffffffffffffffn, -0x8000000000000002n], + [-0x10000000000000000n, -0x7fffffffffffffffn, -0x8000000000000001n], + [-0xffffffffffffffffn, -0x7fffffffffffffffn, -0x8000000000000000n], + [-0xfffffffffffffffen, -0x7fffffffffffffffn, -0x7fffffffffffffffn], + [-0x8000000000000001n, -0x7fffffffffffffffn, -2n], + [-0x8000000000000000n, -0x7fffffffffffffffn, -1n], + [-0x7fffffffffffffffn, -0x7fffffffffffffffn, 0n], + [-0x7ffffffffffffffen, -0x7fffffffffffffffn, 1n], + [-0x100000001n, -0x7fffffffffffffffn, 0x7ffffffefffffffen], + [-0x100000000n, -0x7fffffffffffffffn, 0x7ffffffeffffffffn], + [-0xffffffffn, -0x7fffffffffffffffn, 0x7fffffff00000000n], + [-0xfffffffen, -0x7fffffffffffffffn, 0x7fffffff00000001n], + [-0x80000001n, -0x7fffffffffffffffn, 0x7fffffff7ffffffen], + [-0x80000000n, -0x7fffffffffffffffn, 0x7fffffff7fffffffn], + [-0x7fffffffn, -0x7fffffffffffffffn, 0x7fffffff80000000n], + [-0x7ffffffen, -0x7fffffffffffffffn, 0x7fffffff80000001n], + [-2n, -0x7fffffffffffffffn, 0x7ffffffffffffffdn], + [-1n, -0x7fffffffffffffffn, 0x7ffffffffffffffen], + [0n, -0x7fffffffffffffffn, 0x7fffffffffffffffn], + [1n, -0x7fffffffffffffffn, 0x8000000000000000n], + [2n, -0x7fffffffffffffffn, 0x8000000000000001n], + [0x7ffffffen, -0x7fffffffffffffffn, 0x800000007ffffffdn], + [0x7fffffffn, -0x7fffffffffffffffn, 0x800000007ffffffen], + [0x80000000n, -0x7fffffffffffffffn, 0x800000007fffffffn], + [0x80000001n, -0x7fffffffffffffffn, 0x8000000080000000n], + [0xfffffffen, -0x7fffffffffffffffn, 0x80000000fffffffdn], + [0xffffffffn, -0x7fffffffffffffffn, 0x80000000fffffffen], + [0x100000000n, -0x7fffffffffffffffn, 0x80000000ffffffffn], + [0x100000001n, -0x7fffffffffffffffn, 0x8000000100000000n], + [0x7ffffffffffffffen, -0x7fffffffffffffffn, 0xfffffffffffffffdn], + [0x7fffffffffffffffn, -0x7fffffffffffffffn, 0xfffffffffffffffen], + [0x8000000000000000n, -0x7fffffffffffffffn, 0xffffffffffffffffn], + [0x8000000000000001n, -0x7fffffffffffffffn, 0x10000000000000000n], + [0xfffffffffffffffen, -0x7fffffffffffffffn, 0x17ffffffffffffffdn], + [0xffffffffffffffffn, -0x7fffffffffffffffn, 0x17ffffffffffffffen], + [0x10000000000000000n, -0x7fffffffffffffffn, 0x17fffffffffffffffn], + [0x10000000000000001n, -0x7fffffffffffffffn, 0x18000000000000000n], + [-0x10000000000000001n, -0x7ffffffffffffffen, -0x8000000000000003n], + [-0x10000000000000000n, -0x7ffffffffffffffen, -0x8000000000000002n], + [-0xffffffffffffffffn, -0x7ffffffffffffffen, -0x8000000000000001n], + [-0xfffffffffffffffen, -0x7ffffffffffffffen, -0x8000000000000000n], + [-0x8000000000000001n, -0x7ffffffffffffffen, -3n], + [-0x8000000000000000n, -0x7ffffffffffffffen, -2n], + [-0x7fffffffffffffffn, -0x7ffffffffffffffen, -1n], + [-0x7ffffffffffffffen, -0x7ffffffffffffffen, 0n], + [-0x100000001n, -0x7ffffffffffffffen, 0x7ffffffefffffffdn], + [-0x100000000n, -0x7ffffffffffffffen, 0x7ffffffefffffffen], + [-0xffffffffn, -0x7ffffffffffffffen, 0x7ffffffeffffffffn], + [-0xfffffffen, -0x7ffffffffffffffen, 0x7fffffff00000000n], + [-0x80000001n, -0x7ffffffffffffffen, 0x7fffffff7ffffffdn], + [-0x80000000n, -0x7ffffffffffffffen, 0x7fffffff7ffffffen], + [-0x7fffffffn, -0x7ffffffffffffffen, 0x7fffffff7fffffffn], + [-0x7ffffffen, -0x7ffffffffffffffen, 0x7fffffff80000000n], + [-2n, -0x7ffffffffffffffen, 0x7ffffffffffffffcn], + [-1n, -0x7ffffffffffffffen, 0x7ffffffffffffffdn], + [0n, -0x7ffffffffffffffen, 0x7ffffffffffffffen], + [1n, -0x7ffffffffffffffen, 0x7fffffffffffffffn], + [2n, -0x7ffffffffffffffen, 0x8000000000000000n], + [0x7ffffffen, -0x7ffffffffffffffen, 0x800000007ffffffcn], + [0x7fffffffn, -0x7ffffffffffffffen, 0x800000007ffffffdn], + [0x80000000n, -0x7ffffffffffffffen, 0x800000007ffffffen], + [0x80000001n, -0x7ffffffffffffffen, 0x800000007fffffffn], + [0xfffffffen, -0x7ffffffffffffffen, 0x80000000fffffffcn], + [0xffffffffn, -0x7ffffffffffffffen, 0x80000000fffffffdn], + [0x100000000n, -0x7ffffffffffffffen, 0x80000000fffffffen], + [0x100000001n, -0x7ffffffffffffffen, 0x80000000ffffffffn], + [0x7ffffffffffffffen, -0x7ffffffffffffffen, 0xfffffffffffffffcn], + [0x7fffffffffffffffn, -0x7ffffffffffffffen, 0xfffffffffffffffdn], + [0x8000000000000000n, -0x7ffffffffffffffen, 0xfffffffffffffffen], + [0x8000000000000001n, -0x7ffffffffffffffen, 0xffffffffffffffffn], + [0xfffffffffffffffen, -0x7ffffffffffffffen, 0x17ffffffffffffffcn], + [0xffffffffffffffffn, -0x7ffffffffffffffen, 0x17ffffffffffffffdn], + [0x10000000000000000n, -0x7ffffffffffffffen, 0x17ffffffffffffffen], + [0x10000000000000001n, -0x7ffffffffffffffen, 0x17fffffffffffffffn], + [-0x10000000000000001n, 0xfffffffffffffffen, -0x1ffffffffffffffffn], + [-0x10000000000000000n, 0xfffffffffffffffen, -0x1fffffffffffffffen], + [-0xffffffffffffffffn, 0xfffffffffffffffen, -0x1fffffffffffffffdn], + [-0xfffffffffffffffen, 0xfffffffffffffffen, -0x1fffffffffffffffcn], + [-0x8000000000000001n, 0xfffffffffffffffen, -0x17fffffffffffffffn], + [-0x8000000000000000n, 0xfffffffffffffffen, -0x17ffffffffffffffen], + [-0x7fffffffffffffffn, 0xfffffffffffffffen, -0x17ffffffffffffffdn], + [-0x7ffffffffffffffen, 0xfffffffffffffffen, -0x17ffffffffffffffcn], + [-0x100000001n, 0xfffffffffffffffen, -0x100000000ffffffffn], + [-0x100000000n, 0xfffffffffffffffen, -0x100000000fffffffen], + [-0xffffffffn, 0xfffffffffffffffen, -0x100000000fffffffdn], + [-0xfffffffen, 0xfffffffffffffffen, -0x100000000fffffffcn], + [-0x80000001n, 0xfffffffffffffffen, -0x1000000007fffffffn], + [-0x80000000n, 0xfffffffffffffffen, -0x1000000007ffffffen], + [-0x7fffffffn, 0xfffffffffffffffen, -0x1000000007ffffffdn], + [-0x7ffffffen, 0xfffffffffffffffen, -0x1000000007ffffffcn], + [-2n, 0xfffffffffffffffen, -0x10000000000000000n], + [-1n, 0xfffffffffffffffen, -0xffffffffffffffffn], + [0n, 0xfffffffffffffffen, -0xfffffffffffffffen], + [1n, 0xfffffffffffffffen, -0xfffffffffffffffdn], + [2n, 0xfffffffffffffffen, -0xfffffffffffffffcn], + [0x7ffffffen, 0xfffffffffffffffen, -0xffffffff80000000n], + [0x7fffffffn, 0xfffffffffffffffen, -0xffffffff7fffffffn], + [0x80000000n, 0xfffffffffffffffen, -0xffffffff7ffffffen], + [0x80000001n, 0xfffffffffffffffen, -0xffffffff7ffffffdn], + [0xfffffffen, 0xfffffffffffffffen, -0xffffffff00000000n], + [0xffffffffn, 0xfffffffffffffffen, -0xfffffffeffffffffn], + [0x100000000n, 0xfffffffffffffffen, -0xfffffffefffffffen], + [0x100000001n, 0xfffffffffffffffen, -0xfffffffefffffffdn], + [0x7ffffffffffffffen, 0xfffffffffffffffen, -0x8000000000000000n], + [0x7fffffffffffffffn, 0xfffffffffffffffen, -0x7fffffffffffffffn], + [0x8000000000000000n, 0xfffffffffffffffen, -0x7ffffffffffffffen], + [0x8000000000000001n, 0xfffffffffffffffen, -0x7ffffffffffffffdn], + [0xfffffffffffffffen, 0xfffffffffffffffen, 0n], + [0xffffffffffffffffn, 0xfffffffffffffffen, 1n], + [0x10000000000000000n, 0xfffffffffffffffen, 2n], + [0x10000000000000001n, 0xfffffffffffffffen, 3n], + [-0x10000000000000001n, 0xffffffffffffffffn, -0x20000000000000000n], + [-0x10000000000000000n, 0xffffffffffffffffn, -0x1ffffffffffffffffn], + [-0xffffffffffffffffn, 0xffffffffffffffffn, -0x1fffffffffffffffen], + [-0xfffffffffffffffen, 0xffffffffffffffffn, -0x1fffffffffffffffdn], + [-0x8000000000000001n, 0xffffffffffffffffn, -0x18000000000000000n], + [-0x8000000000000000n, 0xffffffffffffffffn, -0x17fffffffffffffffn], + [-0x7fffffffffffffffn, 0xffffffffffffffffn, -0x17ffffffffffffffen], + [-0x7ffffffffffffffen, 0xffffffffffffffffn, -0x17ffffffffffffffdn], + [-0x100000001n, 0xffffffffffffffffn, -0x10000000100000000n], + [-0x100000000n, 0xffffffffffffffffn, -0x100000000ffffffffn], + [-0xffffffffn, 0xffffffffffffffffn, -0x100000000fffffffen], + [-0xfffffffen, 0xffffffffffffffffn, -0x100000000fffffffdn], + [-0x80000001n, 0xffffffffffffffffn, -0x10000000080000000n], + [-0x80000000n, 0xffffffffffffffffn, -0x1000000007fffffffn], + [-0x7fffffffn, 0xffffffffffffffffn, -0x1000000007ffffffen], + [-0x7ffffffen, 0xffffffffffffffffn, -0x1000000007ffffffdn], + [-2n, 0xffffffffffffffffn, -0x10000000000000001n], + [-1n, 0xffffffffffffffffn, -0x10000000000000000n], + [0n, 0xffffffffffffffffn, -0xffffffffffffffffn], + [1n, 0xffffffffffffffffn, -0xfffffffffffffffen], + [2n, 0xffffffffffffffffn, -0xfffffffffffffffdn], + [0x7ffffffen, 0xffffffffffffffffn, -0xffffffff80000001n], + [0x7fffffffn, 0xffffffffffffffffn, -0xffffffff80000000n], + [0x80000000n, 0xffffffffffffffffn, -0xffffffff7fffffffn], + [0x80000001n, 0xffffffffffffffffn, -0xffffffff7ffffffen], + [0xfffffffen, 0xffffffffffffffffn, -0xffffffff00000001n], + [0xffffffffn, 0xffffffffffffffffn, -0xffffffff00000000n], + [0x100000000n, 0xffffffffffffffffn, -0xfffffffeffffffffn], + [0x100000001n, 0xffffffffffffffffn, -0xfffffffefffffffen], + [0x7ffffffffffffffen, 0xffffffffffffffffn, -0x8000000000000001n], + [0x7fffffffffffffffn, 0xffffffffffffffffn, -0x8000000000000000n], + [0x8000000000000000n, 0xffffffffffffffffn, -0x7fffffffffffffffn], + [0x8000000000000001n, 0xffffffffffffffffn, -0x7ffffffffffffffen], + [0xfffffffffffffffen, 0xffffffffffffffffn, -1n], + [0xffffffffffffffffn, 0xffffffffffffffffn, 0n], + [0x10000000000000000n, 0xffffffffffffffffn, 1n], + [0x10000000000000001n, 0xffffffffffffffffn, 2n], + [-0x10000000000000001n, 0x10000000000000000n, -0x20000000000000001n], + [-0x10000000000000000n, 0x10000000000000000n, -0x20000000000000000n], + [-0xffffffffffffffffn, 0x10000000000000000n, -0x1ffffffffffffffffn], + [-0xfffffffffffffffen, 0x10000000000000000n, -0x1fffffffffffffffen], + [-0x8000000000000001n, 0x10000000000000000n, -0x18000000000000001n], + [-0x8000000000000000n, 0x10000000000000000n, -0x18000000000000000n], + [-0x7fffffffffffffffn, 0x10000000000000000n, -0x17fffffffffffffffn], + [-0x7ffffffffffffffen, 0x10000000000000000n, -0x17ffffffffffffffen], + [-0x100000001n, 0x10000000000000000n, -0x10000000100000001n], + [-0x100000000n, 0x10000000000000000n, -0x10000000100000000n], + [-0xffffffffn, 0x10000000000000000n, -0x100000000ffffffffn], + [-0xfffffffen, 0x10000000000000000n, -0x100000000fffffffen], + [-0x80000001n, 0x10000000000000000n, -0x10000000080000001n], + [-0x80000000n, 0x10000000000000000n, -0x10000000080000000n], + [-0x7fffffffn, 0x10000000000000000n, -0x1000000007fffffffn], + [-0x7ffffffen, 0x10000000000000000n, -0x1000000007ffffffen], + [-2n, 0x10000000000000000n, -0x10000000000000002n], + [-1n, 0x10000000000000000n, -0x10000000000000001n], + [0n, 0x10000000000000000n, -0x10000000000000000n], + [1n, 0x10000000000000000n, -0xffffffffffffffffn], + [2n, 0x10000000000000000n, -0xfffffffffffffffen], + [0x7ffffffen, 0x10000000000000000n, -0xffffffff80000002n], + [0x7fffffffn, 0x10000000000000000n, -0xffffffff80000001n], + [0x80000000n, 0x10000000000000000n, -0xffffffff80000000n], + [0x80000001n, 0x10000000000000000n, -0xffffffff7fffffffn], + [0xfffffffen, 0x10000000000000000n, -0xffffffff00000002n], + [0xffffffffn, 0x10000000000000000n, -0xffffffff00000001n], + [0x100000000n, 0x10000000000000000n, -0xffffffff00000000n], + [0x100000001n, 0x10000000000000000n, -0xfffffffeffffffffn], + [0x7ffffffffffffffen, 0x10000000000000000n, -0x8000000000000002n], + [0x7fffffffffffffffn, 0x10000000000000000n, -0x8000000000000001n], + [0x8000000000000000n, 0x10000000000000000n, -0x8000000000000000n], + [0x8000000000000001n, 0x10000000000000000n, -0x7fffffffffffffffn], + [0xfffffffffffffffen, 0x10000000000000000n, -2n], + [0xffffffffffffffffn, 0x10000000000000000n, -1n], + [0x10000000000000000n, 0x10000000000000000n, 0n], + [0x10000000000000001n, 0x10000000000000000n, 1n], + [-0x10000000000000001n, 0x10000000000000001n, -0x20000000000000002n], + [-0x10000000000000000n, 0x10000000000000001n, -0x20000000000000001n], + [-0xffffffffffffffffn, 0x10000000000000001n, -0x20000000000000000n], + [-0xfffffffffffffffen, 0x10000000000000001n, -0x1ffffffffffffffffn], + [-0x8000000000000001n, 0x10000000000000001n, -0x18000000000000002n], + [-0x8000000000000000n, 0x10000000000000001n, -0x18000000000000001n], + [-0x7fffffffffffffffn, 0x10000000000000001n, -0x18000000000000000n], + [-0x7ffffffffffffffen, 0x10000000000000001n, -0x17fffffffffffffffn], + [-0x100000001n, 0x10000000000000001n, -0x10000000100000002n], + [-0x100000000n, 0x10000000000000001n, -0x10000000100000001n], + [-0xffffffffn, 0x10000000000000001n, -0x10000000100000000n], + [-0xfffffffen, 0x10000000000000001n, -0x100000000ffffffffn], + [-0x80000001n, 0x10000000000000001n, -0x10000000080000002n], + [-0x80000000n, 0x10000000000000001n, -0x10000000080000001n], + [-0x7fffffffn, 0x10000000000000001n, -0x10000000080000000n], + [-0x7ffffffen, 0x10000000000000001n, -0x1000000007fffffffn], + [-2n, 0x10000000000000001n, -0x10000000000000003n], + [-1n, 0x10000000000000001n, -0x10000000000000002n], + [0n, 0x10000000000000001n, -0x10000000000000001n], + [1n, 0x10000000000000001n, -0x10000000000000000n], + [2n, 0x10000000000000001n, -0xffffffffffffffffn], + [0x7ffffffen, 0x10000000000000001n, -0xffffffff80000003n], + [0x7fffffffn, 0x10000000000000001n, -0xffffffff80000002n], + [0x80000000n, 0x10000000000000001n, -0xffffffff80000001n], + [0x80000001n, 0x10000000000000001n, -0xffffffff80000000n], + [0xfffffffen, 0x10000000000000001n, -0xffffffff00000003n], + [0xffffffffn, 0x10000000000000001n, -0xffffffff00000002n], + [0x100000000n, 0x10000000000000001n, -0xffffffff00000001n], + [0x100000001n, 0x10000000000000001n, -0xffffffff00000000n], + [0x7ffffffffffffffen, 0x10000000000000001n, -0x8000000000000003n], + [0x7fffffffffffffffn, 0x10000000000000001n, -0x8000000000000002n], + [0x8000000000000000n, 0x10000000000000001n, -0x8000000000000001n], + [0x8000000000000001n, 0x10000000000000001n, -0x8000000000000000n], + [0xfffffffffffffffen, 0x10000000000000001n, -3n], + [0xffffffffffffffffn, 0x10000000000000001n, -2n], + [0x10000000000000000n, 0x10000000000000001n, -1n], + [0x10000000000000001n, 0x10000000000000001n, 0n], + [-0x10000000000000001n, -0x10000000000000001n, 0n], + [-0x10000000000000000n, -0x10000000000000001n, 1n], + [-0xffffffffffffffffn, -0x10000000000000001n, 2n], + [-0xfffffffffffffffen, -0x10000000000000001n, 3n], + [-0x8000000000000001n, -0x10000000000000001n, 0x8000000000000000n], + [-0x8000000000000000n, -0x10000000000000001n, 0x8000000000000001n], + [-0x7fffffffffffffffn, -0x10000000000000001n, 0x8000000000000002n], + [-0x7ffffffffffffffen, -0x10000000000000001n, 0x8000000000000003n], + [-0x100000001n, -0x10000000000000001n, 0xffffffff00000000n], + [-0x100000000n, -0x10000000000000001n, 0xffffffff00000001n], + [-0xffffffffn, -0x10000000000000001n, 0xffffffff00000002n], + [-0xfffffffen, -0x10000000000000001n, 0xffffffff00000003n], + [-0x80000001n, -0x10000000000000001n, 0xffffffff80000000n], + [-0x80000000n, -0x10000000000000001n, 0xffffffff80000001n], + [-0x7fffffffn, -0x10000000000000001n, 0xffffffff80000002n], + [-0x7ffffffen, -0x10000000000000001n, 0xffffffff80000003n], + [-2n, -0x10000000000000001n, 0xffffffffffffffffn], + [-1n, -0x10000000000000001n, 0x10000000000000000n], + [0n, -0x10000000000000001n, 0x10000000000000001n], + [1n, -0x10000000000000001n, 0x10000000000000002n], + [2n, -0x10000000000000001n, 0x10000000000000003n], + [0x7ffffffen, -0x10000000000000001n, 0x1000000007fffffffn], + [0x7fffffffn, -0x10000000000000001n, 0x10000000080000000n], + [0x80000000n, -0x10000000000000001n, 0x10000000080000001n], + [0x80000001n, -0x10000000000000001n, 0x10000000080000002n], + [0xfffffffen, -0x10000000000000001n, 0x100000000ffffffffn], + [0xffffffffn, -0x10000000000000001n, 0x10000000100000000n], + [0x100000000n, -0x10000000000000001n, 0x10000000100000001n], + [0x100000001n, -0x10000000000000001n, 0x10000000100000002n], + [0x7ffffffffffffffen, -0x10000000000000001n, 0x17fffffffffffffffn], + [0x7fffffffffffffffn, -0x10000000000000001n, 0x18000000000000000n], + [0x8000000000000000n, -0x10000000000000001n, 0x18000000000000001n], + [0x8000000000000001n, -0x10000000000000001n, 0x18000000000000002n], + [0xfffffffffffffffen, -0x10000000000000001n, 0x1ffffffffffffffffn], + [0xffffffffffffffffn, -0x10000000000000001n, 0x20000000000000000n], + [0x10000000000000000n, -0x10000000000000001n, 0x20000000000000001n], + [0x10000000000000001n, -0x10000000000000001n, 0x20000000000000002n], + [-0x10000000000000001n, -0x10000000000000000n, -1n], + [-0x10000000000000000n, -0x10000000000000000n, 0n], + [-0xffffffffffffffffn, -0x10000000000000000n, 1n], + [-0xfffffffffffffffen, -0x10000000000000000n, 2n], + [-0x8000000000000001n, -0x10000000000000000n, 0x7fffffffffffffffn], + [-0x8000000000000000n, -0x10000000000000000n, 0x8000000000000000n], + [-0x7fffffffffffffffn, -0x10000000000000000n, 0x8000000000000001n], + [-0x7ffffffffffffffen, -0x10000000000000000n, 0x8000000000000002n], + [-0x100000001n, -0x10000000000000000n, 0xfffffffeffffffffn], + [-0x100000000n, -0x10000000000000000n, 0xffffffff00000000n], + [-0xffffffffn, -0x10000000000000000n, 0xffffffff00000001n], + [-0xfffffffen, -0x10000000000000000n, 0xffffffff00000002n], + [-0x80000001n, -0x10000000000000000n, 0xffffffff7fffffffn], + [-0x80000000n, -0x10000000000000000n, 0xffffffff80000000n], + [-0x7fffffffn, -0x10000000000000000n, 0xffffffff80000001n], + [-0x7ffffffen, -0x10000000000000000n, 0xffffffff80000002n], + [-2n, -0x10000000000000000n, 0xfffffffffffffffen], + [-1n, -0x10000000000000000n, 0xffffffffffffffffn], + [0n, -0x10000000000000000n, 0x10000000000000000n], + [1n, -0x10000000000000000n, 0x10000000000000001n], + [2n, -0x10000000000000000n, 0x10000000000000002n], + [0x7ffffffen, -0x10000000000000000n, 0x1000000007ffffffen], + [0x7fffffffn, -0x10000000000000000n, 0x1000000007fffffffn], + [0x80000000n, -0x10000000000000000n, 0x10000000080000000n], + [0x80000001n, -0x10000000000000000n, 0x10000000080000001n], + [0xfffffffen, -0x10000000000000000n, 0x100000000fffffffen], + [0xffffffffn, -0x10000000000000000n, 0x100000000ffffffffn], + [0x100000000n, -0x10000000000000000n, 0x10000000100000000n], + [0x100000001n, -0x10000000000000000n, 0x10000000100000001n], + [0x7ffffffffffffffen, -0x10000000000000000n, 0x17ffffffffffffffen], + [0x7fffffffffffffffn, -0x10000000000000000n, 0x17fffffffffffffffn], + [0x8000000000000000n, -0x10000000000000000n, 0x18000000000000000n], + [0x8000000000000001n, -0x10000000000000000n, 0x18000000000000001n], + [0xfffffffffffffffen, -0x10000000000000000n, 0x1fffffffffffffffen], + [0xffffffffffffffffn, -0x10000000000000000n, 0x1ffffffffffffffffn], + [0x10000000000000000n, -0x10000000000000000n, 0x20000000000000000n], + [0x10000000000000001n, -0x10000000000000000n, 0x20000000000000001n], + [-0x10000000000000001n, -0xffffffffffffffffn, -2n], + [-0x10000000000000000n, -0xffffffffffffffffn, -1n], + [-0xffffffffffffffffn, -0xffffffffffffffffn, 0n], + [-0xfffffffffffffffen, -0xffffffffffffffffn, 1n], + [-0x8000000000000001n, -0xffffffffffffffffn, 0x7ffffffffffffffen], + [-0x8000000000000000n, -0xffffffffffffffffn, 0x7fffffffffffffffn], + [-0x7fffffffffffffffn, -0xffffffffffffffffn, 0x8000000000000000n], + [-0x7ffffffffffffffen, -0xffffffffffffffffn, 0x8000000000000001n], + [-0x100000001n, -0xffffffffffffffffn, 0xfffffffefffffffen], + [-0x100000000n, -0xffffffffffffffffn, 0xfffffffeffffffffn], + [-0xffffffffn, -0xffffffffffffffffn, 0xffffffff00000000n], + [-0xfffffffen, -0xffffffffffffffffn, 0xffffffff00000001n], + [-0x80000001n, -0xffffffffffffffffn, 0xffffffff7ffffffen], + [-0x80000000n, -0xffffffffffffffffn, 0xffffffff7fffffffn], + [-0x7fffffffn, -0xffffffffffffffffn, 0xffffffff80000000n], + [-0x7ffffffen, -0xffffffffffffffffn, 0xffffffff80000001n], + [-2n, -0xffffffffffffffffn, 0xfffffffffffffffdn], + [-1n, -0xffffffffffffffffn, 0xfffffffffffffffen], + [0n, -0xffffffffffffffffn, 0xffffffffffffffffn], + [1n, -0xffffffffffffffffn, 0x10000000000000000n], + [2n, -0xffffffffffffffffn, 0x10000000000000001n], + [0x7ffffffen, -0xffffffffffffffffn, 0x1000000007ffffffdn], + [0x7fffffffn, -0xffffffffffffffffn, 0x1000000007ffffffen], + [0x80000000n, -0xffffffffffffffffn, 0x1000000007fffffffn], + [0x80000001n, -0xffffffffffffffffn, 0x10000000080000000n], + [0xfffffffen, -0xffffffffffffffffn, 0x100000000fffffffdn], + [0xffffffffn, -0xffffffffffffffffn, 0x100000000fffffffen], + [0x100000000n, -0xffffffffffffffffn, 0x100000000ffffffffn], + [0x100000001n, -0xffffffffffffffffn, 0x10000000100000000n], + [0x7ffffffffffffffen, -0xffffffffffffffffn, 0x17ffffffffffffffdn], + [0x7fffffffffffffffn, -0xffffffffffffffffn, 0x17ffffffffffffffen], + [0x8000000000000000n, -0xffffffffffffffffn, 0x17fffffffffffffffn], + [0x8000000000000001n, -0xffffffffffffffffn, 0x18000000000000000n], + [0xfffffffffffffffen, -0xffffffffffffffffn, 0x1fffffffffffffffdn], + [0xffffffffffffffffn, -0xffffffffffffffffn, 0x1fffffffffffffffen], + [0x10000000000000000n, -0xffffffffffffffffn, 0x1ffffffffffffffffn], + [0x10000000000000001n, -0xffffffffffffffffn, 0x20000000000000000n], + [-0x10000000000000001n, -0xfffffffffffffffen, -3n], + [-0x10000000000000000n, -0xfffffffffffffffen, -2n], + [-0xffffffffffffffffn, -0xfffffffffffffffen, -1n], + [-0xfffffffffffffffen, -0xfffffffffffffffen, 0n], + [-0x8000000000000001n, -0xfffffffffffffffen, 0x7ffffffffffffffdn], + [-0x8000000000000000n, -0xfffffffffffffffen, 0x7ffffffffffffffen], + [-0x7fffffffffffffffn, -0xfffffffffffffffen, 0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -0xfffffffffffffffen, 0x8000000000000000n], + [-0x100000001n, -0xfffffffffffffffen, 0xfffffffefffffffdn], + [-0x100000000n, -0xfffffffffffffffen, 0xfffffffefffffffen], + [-0xffffffffn, -0xfffffffffffffffen, 0xfffffffeffffffffn], + [-0xfffffffen, -0xfffffffffffffffen, 0xffffffff00000000n], + [-0x80000001n, -0xfffffffffffffffen, 0xffffffff7ffffffdn], + [-0x80000000n, -0xfffffffffffffffen, 0xffffffff7ffffffen], + [-0x7fffffffn, -0xfffffffffffffffen, 0xffffffff7fffffffn], + [-0x7ffffffen, -0xfffffffffffffffen, 0xffffffff80000000n], + [-2n, -0xfffffffffffffffen, 0xfffffffffffffffcn], + [-1n, -0xfffffffffffffffen, 0xfffffffffffffffdn], + [0n, -0xfffffffffffffffen, 0xfffffffffffffffen], + [1n, -0xfffffffffffffffen, 0xffffffffffffffffn], + [2n, -0xfffffffffffffffen, 0x10000000000000000n], + [0x7ffffffen, -0xfffffffffffffffen, 0x1000000007ffffffcn], + [0x7fffffffn, -0xfffffffffffffffen, 0x1000000007ffffffdn], + [0x80000000n, -0xfffffffffffffffen, 0x1000000007ffffffen], + [0x80000001n, -0xfffffffffffffffen, 0x1000000007fffffffn], + [0xfffffffen, -0xfffffffffffffffen, 0x100000000fffffffcn], + [0xffffffffn, -0xfffffffffffffffen, 0x100000000fffffffdn], + [0x100000000n, -0xfffffffffffffffen, 0x100000000fffffffen], + [0x100000001n, -0xfffffffffffffffen, 0x100000000ffffffffn], + [0x7ffffffffffffffen, -0xfffffffffffffffen, 0x17ffffffffffffffcn], + [0x7fffffffffffffffn, -0xfffffffffffffffen, 0x17ffffffffffffffdn], + [0x8000000000000000n, -0xfffffffffffffffen, 0x17ffffffffffffffen], + [0x8000000000000001n, -0xfffffffffffffffen, 0x17fffffffffffffffn], + [0xfffffffffffffffen, -0xfffffffffffffffen, 0x1fffffffffffffffcn], + [0xffffffffffffffffn, -0xfffffffffffffffen, 0x1fffffffffffffffdn], + [0x10000000000000000n, -0xfffffffffffffffen, 0x1fffffffffffffffen], + [0x10000000000000001n, -0xfffffffffffffffen, 0x1ffffffffffffffffn], +]; + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs - rhs, expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bigint-xor.js b/js/src/jit-test/tests/bigint/bigint-xor.js new file mode 100644 index 0000000000..38b13ce3ae --- /dev/null +++ b/js/src/jit-test/tests/bigint/bigint-xor.js @@ -0,0 +1,718 @@ +const tests = [ + [-0x10000000000000001n, -2n, 0x10000000000000001n], + [-0x10000000000000000n, -2n, 0xfffffffffffffffen], + [-0xffffffffffffffffn, -2n, 0xffffffffffffffffn], + [-0xfffffffffffffffen, -2n, 0xfffffffffffffffcn], + [-0x8000000000000001n, -2n, 0x8000000000000001n], + [-0x8000000000000000n, -2n, 0x7ffffffffffffffen], + [-0x7fffffffffffffffn, -2n, 0x7fffffffffffffffn], + [-0x7ffffffffffffffen, -2n, 0x7ffffffffffffffcn], + [-0x100000001n, -2n, 0x100000001n], + [-0x100000000n, -2n, 0xfffffffen], + [-0xffffffffn, -2n, 0xffffffffn], + [-0xfffffffen, -2n, 0xfffffffcn], + [-0x80000001n, -2n, 0x80000001n], + [-0x80000000n, -2n, 0x7ffffffen], + [-0x7fffffffn, -2n, 0x7fffffffn], + [-0x7ffffffen, -2n, 0x7ffffffcn], + [-2n, -2n, 0n], + [-1n, -2n, 1n], + [0n, -2n, -2n], + [1n, -2n, -1n], + [2n, -2n, -4n], + [0x7ffffffen, -2n, -0x80000000n], + [0x7fffffffn, -2n, -0x7fffffffn], + [0x80000000n, -2n, -0x80000002n], + [0x80000001n, -2n, -0x80000001n], + [0xfffffffen, -2n, -0x100000000n], + [0xffffffffn, -2n, -0xffffffffn], + [0x100000000n, -2n, -0x100000002n], + [0x100000001n, -2n, -0x100000001n], + [0x7ffffffffffffffen, -2n, -0x8000000000000000n], + [0x7fffffffffffffffn, -2n, -0x7fffffffffffffffn], + [0x8000000000000000n, -2n, -0x8000000000000002n], + [0x8000000000000001n, -2n, -0x8000000000000001n], + [0xfffffffffffffffen, -2n, -0x10000000000000000n], + [0xffffffffffffffffn, -2n, -0xffffffffffffffffn], + [0x10000000000000000n, -2n, -0x10000000000000002n], + [0x10000000000000001n, -2n, -0x10000000000000001n], + [-0x10000000000000001n, -1n, 0x10000000000000000n], + [-0x10000000000000000n, -1n, 0xffffffffffffffffn], + [-0xffffffffffffffffn, -1n, 0xfffffffffffffffen], + [-0xfffffffffffffffen, -1n, 0xfffffffffffffffdn], + [-0x8000000000000001n, -1n, 0x8000000000000000n], + [-0x8000000000000000n, -1n, 0x7fffffffffffffffn], + [-0x7fffffffffffffffn, -1n, 0x7ffffffffffffffen], + [-0x7ffffffffffffffen, -1n, 0x7ffffffffffffffdn], + [-0x100000001n, -1n, 0x100000000n], + [-0x100000000n, -1n, 0xffffffffn], + [-0xffffffffn, -1n, 0xfffffffen], + [-0xfffffffen, -1n, 0xfffffffdn], + [-0x80000001n, -1n, 0x80000000n], + [-0x80000000n, -1n, 0x7fffffffn], + [-0x7fffffffn, -1n, 0x7ffffffen], + [-0x7ffffffen, -1n, 0x7ffffffdn], + [-1n, -1n, 0n], + [0n, -1n, -1n], + [1n, -1n, -2n], + [2n, -1n, -3n], + [0x7ffffffen, -1n, -0x7fffffffn], + [0x7fffffffn, -1n, -0x80000000n], + [0x80000000n, -1n, -0x80000001n], + [0x80000001n, -1n, -0x80000002n], + [0xfffffffen, -1n, -0xffffffffn], + [0xffffffffn, -1n, -0x100000000n], + [0x100000000n, -1n, -0x100000001n], + [0x100000001n, -1n, -0x100000002n], + [0x7ffffffffffffffen, -1n, -0x7fffffffffffffffn], + [0x7fffffffffffffffn, -1n, -0x8000000000000000n], + [0x8000000000000000n, -1n, -0x8000000000000001n], + [0x8000000000000001n, -1n, -0x8000000000000002n], + [0xfffffffffffffffen, -1n, -0xffffffffffffffffn], + [0xffffffffffffffffn, -1n, -0x10000000000000000n], + [0x10000000000000000n, -1n, -0x10000000000000001n], + [0x10000000000000001n, -1n, -0x10000000000000002n], + [-0x10000000000000001n, 0n, -0x10000000000000001n], + [-0x10000000000000000n, 0n, -0x10000000000000000n], + [-0xffffffffffffffffn, 0n, -0xffffffffffffffffn], + [-0xfffffffffffffffen, 0n, -0xfffffffffffffffen], + [-0x8000000000000001n, 0n, -0x8000000000000001n], + [-0x8000000000000000n, 0n, -0x8000000000000000n], + [-0x7fffffffffffffffn, 0n, -0x7fffffffffffffffn], + [-0x7ffffffffffffffen, 0n, -0x7ffffffffffffffen], + [-0x100000001n, 0n, -0x100000001n], + [-0x100000000n, 0n, -0x100000000n], + [-0xffffffffn, 0n, -0xffffffffn], + [-0xfffffffen, 0n, -0xfffffffen], + [-0x80000001n, 0n, -0x80000001n], + [-0x80000000n, 0n, -0x80000000n], + [-0x7fffffffn, 0n, -0x7fffffffn], + [-0x7ffffffen, 0n, -0x7ffffffen], + [0n, 0n, 0n], + [1n, 0n, 1n], + [2n, 0n, 2n], + [0x7ffffffen, 0n, 0x7ffffffen], + [0x7fffffffn, 0n, 0x7fffffffn], + [0x80000000n, 0n, 0x80000000n], + [0x80000001n, 0n, 0x80000001n], + [0xfffffffen, 0n, 0xfffffffen], + [0xffffffffn, 0n, 0xffffffffn], + [0x100000000n, 0n, 0x100000000n], + [0x100000001n, 0n, 0x100000001n], + [0x7ffffffffffffffen, 0n, 0x7ffffffffffffffen], + [0x7fffffffffffffffn, 0n, 0x7fffffffffffffffn], + [0x8000000000000000n, 0n, 0x8000000000000000n], + [0x8000000000000001n, 0n, 0x8000000000000001n], + [0xfffffffffffffffen, 0n, 0xfffffffffffffffen], + [0xffffffffffffffffn, 0n, 0xffffffffffffffffn], + [0x10000000000000000n, 0n, 0x10000000000000000n], + [0x10000000000000001n, 0n, 0x10000000000000001n], + [-0x10000000000000001n, 1n, -0x10000000000000002n], + [-0x10000000000000000n, 1n, -0xffffffffffffffffn], + [-0xffffffffffffffffn, 1n, -0x10000000000000000n], + [-0xfffffffffffffffen, 1n, -0xfffffffffffffffdn], + [-0x8000000000000001n, 1n, -0x8000000000000002n], + [-0x8000000000000000n, 1n, -0x7fffffffffffffffn], + [-0x7fffffffffffffffn, 1n, -0x8000000000000000n], + [-0x7ffffffffffffffen, 1n, -0x7ffffffffffffffdn], + [-0x100000001n, 1n, -0x100000002n], + [-0x100000000n, 1n, -0xffffffffn], + [-0xffffffffn, 1n, -0x100000000n], + [-0xfffffffen, 1n, -0xfffffffdn], + [-0x80000001n, 1n, -0x80000002n], + [-0x80000000n, 1n, -0x7fffffffn], + [-0x7fffffffn, 1n, -0x80000000n], + [-0x7ffffffen, 1n, -0x7ffffffdn], + [1n, 1n, 0n], + [2n, 1n, 3n], + [0x7ffffffen, 1n, 0x7fffffffn], + [0x7fffffffn, 1n, 0x7ffffffen], + [0x80000000n, 1n, 0x80000001n], + [0x80000001n, 1n, 0x80000000n], + [0xfffffffen, 1n, 0xffffffffn], + [0xffffffffn, 1n, 0xfffffffen], + [0x100000000n, 1n, 0x100000001n], + [0x100000001n, 1n, 0x100000000n], + [0x7ffffffffffffffen, 1n, 0x7fffffffffffffffn], + [0x7fffffffffffffffn, 1n, 0x7ffffffffffffffen], + [0x8000000000000000n, 1n, 0x8000000000000001n], + [0x8000000000000001n, 1n, 0x8000000000000000n], + [0xfffffffffffffffen, 1n, 0xffffffffffffffffn], + [0xffffffffffffffffn, 1n, 0xfffffffffffffffen], + [0x10000000000000000n, 1n, 0x10000000000000001n], + [0x10000000000000001n, 1n, 0x10000000000000000n], + [-0x10000000000000001n, 2n, -0x10000000000000003n], + [-0x10000000000000000n, 2n, -0xfffffffffffffffen], + [-0xffffffffffffffffn, 2n, -0xfffffffffffffffdn], + [-0xfffffffffffffffen, 2n, -0x10000000000000000n], + [-0x8000000000000001n, 2n, -0x8000000000000003n], + [-0x8000000000000000n, 2n, -0x7ffffffffffffffen], + [-0x7fffffffffffffffn, 2n, -0x7ffffffffffffffdn], + [-0x7ffffffffffffffen, 2n, -0x8000000000000000n], + [-0x100000001n, 2n, -0x100000003n], + [-0x100000000n, 2n, -0xfffffffen], + [-0xffffffffn, 2n, -0xfffffffdn], + [-0xfffffffen, 2n, -0x100000000n], + [-0x80000001n, 2n, -0x80000003n], + [-0x80000000n, 2n, -0x7ffffffen], + [-0x7fffffffn, 2n, -0x7ffffffdn], + [-0x7ffffffen, 2n, -0x80000000n], + [2n, 2n, 0n], + [0x7ffffffen, 2n, 0x7ffffffcn], + [0x7fffffffn, 2n, 0x7ffffffdn], + [0x80000000n, 2n, 0x80000002n], + [0x80000001n, 2n, 0x80000003n], + [0xfffffffen, 2n, 0xfffffffcn], + [0xffffffffn, 2n, 0xfffffffdn], + [0x100000000n, 2n, 0x100000002n], + [0x100000001n, 2n, 0x100000003n], + [0x7ffffffffffffffen, 2n, 0x7ffffffffffffffcn], + [0x7fffffffffffffffn, 2n, 0x7ffffffffffffffdn], + [0x8000000000000000n, 2n, 0x8000000000000002n], + [0x8000000000000001n, 2n, 0x8000000000000003n], + [0xfffffffffffffffen, 2n, 0xfffffffffffffffcn], + [0xffffffffffffffffn, 2n, 0xfffffffffffffffdn], + [0x10000000000000000n, 2n, 0x10000000000000002n], + [0x10000000000000001n, 2n, 0x10000000000000003n], + [-0x10000000000000001n, 0x7ffffffen, -0x1000000007fffffffn], + [-0x10000000000000000n, 0x7ffffffen, -0xffffffff80000002n], + [-0xffffffffffffffffn, 0x7ffffffen, -0xffffffff80000001n], + [-0xfffffffffffffffen, 0x7ffffffen, -0xffffffff80000004n], + [-0x8000000000000001n, 0x7ffffffen, -0x800000007fffffffn], + [-0x8000000000000000n, 0x7ffffffen, -0x7fffffff80000002n], + [-0x7fffffffffffffffn, 0x7ffffffen, -0x7fffffff80000001n], + [-0x7ffffffffffffffen, 0x7ffffffen, -0x7fffffff80000004n], + [-0x100000001n, 0x7ffffffen, -0x17fffffffn], + [-0x100000000n, 0x7ffffffen, -0x80000002n], + [-0xffffffffn, 0x7ffffffen, -0x80000001n], + [-0xfffffffen, 0x7ffffffen, -0x80000004n], + [-0x80000001n, 0x7ffffffen, -0xffffffffn], + [-0x80000000n, 0x7ffffffen, -2n], + [-0x7fffffffn, 0x7ffffffen, -1n], + [-0x7ffffffen, 0x7ffffffen, -4n], + [0x7ffffffen, 0x7ffffffen, 0n], + [0x7fffffffn, 0x7ffffffen, 1n], + [0x80000000n, 0x7ffffffen, 0xfffffffen], + [0x80000001n, 0x7ffffffen, 0xffffffffn], + [0xfffffffen, 0x7ffffffen, 0x80000000n], + [0xffffffffn, 0x7ffffffen, 0x80000001n], + [0x100000000n, 0x7ffffffen, 0x17ffffffen], + [0x100000001n, 0x7ffffffen, 0x17fffffffn], + [0x7ffffffffffffffen, 0x7ffffffen, 0x7fffffff80000000n], + [0x7fffffffffffffffn, 0x7ffffffen, 0x7fffffff80000001n], + [0x8000000000000000n, 0x7ffffffen, 0x800000007ffffffen], + [0x8000000000000001n, 0x7ffffffen, 0x800000007fffffffn], + [0xfffffffffffffffen, 0x7ffffffen, 0xffffffff80000000n], + [0xffffffffffffffffn, 0x7ffffffen, 0xffffffff80000001n], + [0x10000000000000000n, 0x7ffffffen, 0x1000000007ffffffen], + [0x10000000000000001n, 0x7ffffffen, 0x1000000007fffffffn], + [-0x10000000000000001n, 0x7fffffffn, -0x10000000080000000n], + [-0x10000000000000000n, 0x7fffffffn, -0xffffffff80000001n], + [-0xffffffffffffffffn, 0x7fffffffn, -0xffffffff80000002n], + [-0xfffffffffffffffen, 0x7fffffffn, -0xffffffff80000003n], + [-0x8000000000000001n, 0x7fffffffn, -0x8000000080000000n], + [-0x8000000000000000n, 0x7fffffffn, -0x7fffffff80000001n], + [-0x7fffffffffffffffn, 0x7fffffffn, -0x7fffffff80000002n], + [-0x7ffffffffffffffen, 0x7fffffffn, -0x7fffffff80000003n], + [-0x100000001n, 0x7fffffffn, -0x180000000n], + [-0x100000000n, 0x7fffffffn, -0x80000001n], + [-0xffffffffn, 0x7fffffffn, -0x80000002n], + [-0xfffffffen, 0x7fffffffn, -0x80000003n], + [-0x80000001n, 0x7fffffffn, -0x100000000n], + [-0x80000000n, 0x7fffffffn, -1n], + [-0x7fffffffn, 0x7fffffffn, -2n], + [-0x7ffffffen, 0x7fffffffn, -3n], + [0x7fffffffn, 0x7fffffffn, 0n], + [0x80000000n, 0x7fffffffn, 0xffffffffn], + [0x80000001n, 0x7fffffffn, 0xfffffffen], + [0xfffffffen, 0x7fffffffn, 0x80000001n], + [0xffffffffn, 0x7fffffffn, 0x80000000n], + [0x100000000n, 0x7fffffffn, 0x17fffffffn], + [0x100000001n, 0x7fffffffn, 0x17ffffffen], + [0x7ffffffffffffffen, 0x7fffffffn, 0x7fffffff80000001n], + [0x7fffffffffffffffn, 0x7fffffffn, 0x7fffffff80000000n], + [0x8000000000000000n, 0x7fffffffn, 0x800000007fffffffn], + [0x8000000000000001n, 0x7fffffffn, 0x800000007ffffffen], + [0xfffffffffffffffen, 0x7fffffffn, 0xffffffff80000001n], + [0xffffffffffffffffn, 0x7fffffffn, 0xffffffff80000000n], + [0x10000000000000000n, 0x7fffffffn, 0x1000000007fffffffn], + [0x10000000000000001n, 0x7fffffffn, 0x1000000007ffffffen], + [-0x10000000000000001n, 0x80000000n, -0x10000000080000001n], + [-0x10000000000000000n, 0x80000000n, -0xffffffff80000000n], + [-0xffffffffffffffffn, 0x80000000n, -0xffffffff7fffffffn], + [-0xfffffffffffffffen, 0x80000000n, -0xffffffff7ffffffen], + [-0x8000000000000001n, 0x80000000n, -0x8000000080000001n], + [-0x8000000000000000n, 0x80000000n, -0x7fffffff80000000n], + [-0x7fffffffffffffffn, 0x80000000n, -0x7fffffff7fffffffn], + [-0x7ffffffffffffffen, 0x80000000n, -0x7fffffff7ffffffen], + [-0x100000001n, 0x80000000n, -0x180000001n], + [-0x100000000n, 0x80000000n, -0x80000000n], + [-0xffffffffn, 0x80000000n, -0x7fffffffn], + [-0xfffffffen, 0x80000000n, -0x7ffffffen], + [-0x80000001n, 0x80000000n, -1n], + [-0x80000000n, 0x80000000n, -0x100000000n], + [-0x7fffffffn, 0x80000000n, -0xffffffffn], + [-0x7ffffffen, 0x80000000n, -0xfffffffen], + [0x80000000n, 0x80000000n, 0n], + [0x80000001n, 0x80000000n, 1n], + [0xfffffffen, 0x80000000n, 0x7ffffffen], + [0xffffffffn, 0x80000000n, 0x7fffffffn], + [0x100000000n, 0x80000000n, 0x180000000n], + [0x100000001n, 0x80000000n, 0x180000001n], + [0x7ffffffffffffffen, 0x80000000n, 0x7fffffff7ffffffen], + [0x7fffffffffffffffn, 0x80000000n, 0x7fffffff7fffffffn], + [0x8000000000000000n, 0x80000000n, 0x8000000080000000n], + [0x8000000000000001n, 0x80000000n, 0x8000000080000001n], + [0xfffffffffffffffen, 0x80000000n, 0xffffffff7ffffffen], + [0xffffffffffffffffn, 0x80000000n, 0xffffffff7fffffffn], + [0x10000000000000000n, 0x80000000n, 0x10000000080000000n], + [0x10000000000000001n, 0x80000000n, 0x10000000080000001n], + [-0x10000000000000001n, 0x80000001n, -0x10000000080000002n], + [-0x10000000000000000n, 0x80000001n, -0xffffffff7fffffffn], + [-0xffffffffffffffffn, 0x80000001n, -0xffffffff80000000n], + [-0xfffffffffffffffen, 0x80000001n, -0xffffffff7ffffffdn], + [-0x8000000000000001n, 0x80000001n, -0x8000000080000002n], + [-0x8000000000000000n, 0x80000001n, -0x7fffffff7fffffffn], + [-0x7fffffffffffffffn, 0x80000001n, -0x7fffffff80000000n], + [-0x7ffffffffffffffen, 0x80000001n, -0x7fffffff7ffffffdn], + [-0x100000001n, 0x80000001n, -0x180000002n], + [-0x100000000n, 0x80000001n, -0x7fffffffn], + [-0xffffffffn, 0x80000001n, -0x80000000n], + [-0xfffffffen, 0x80000001n, -0x7ffffffdn], + [-0x80000001n, 0x80000001n, -2n], + [-0x80000000n, 0x80000001n, -0xffffffffn], + [-0x7fffffffn, 0x80000001n, -0x100000000n], + [-0x7ffffffen, 0x80000001n, -0xfffffffdn], + [0x80000001n, 0x80000001n, 0n], + [0xfffffffen, 0x80000001n, 0x7fffffffn], + [0xffffffffn, 0x80000001n, 0x7ffffffen], + [0x100000000n, 0x80000001n, 0x180000001n], + [0x100000001n, 0x80000001n, 0x180000000n], + [0x7ffffffffffffffen, 0x80000001n, 0x7fffffff7fffffffn], + [0x7fffffffffffffffn, 0x80000001n, 0x7fffffff7ffffffen], + [0x8000000000000000n, 0x80000001n, 0x8000000080000001n], + [0x8000000000000001n, 0x80000001n, 0x8000000080000000n], + [0xfffffffffffffffen, 0x80000001n, 0xffffffff7fffffffn], + [0xffffffffffffffffn, 0x80000001n, 0xffffffff7ffffffen], + [0x10000000000000000n, 0x80000001n, 0x10000000080000001n], + [0x10000000000000001n, 0x80000001n, 0x10000000080000000n], + [-0x10000000000000001n, -0x80000001n, 0x10000000080000000n], + [-0x10000000000000000n, -0x80000001n, 0xffffffff7fffffffn], + [-0xffffffffffffffffn, -0x80000001n, 0xffffffff7ffffffen], + [-0xfffffffffffffffen, -0x80000001n, 0xffffffff7ffffffdn], + [-0x8000000000000001n, -0x80000001n, 0x8000000080000000n], + [-0x8000000000000000n, -0x80000001n, 0x7fffffff7fffffffn], + [-0x7fffffffffffffffn, -0x80000001n, 0x7fffffff7ffffffen], + [-0x7ffffffffffffffen, -0x80000001n, 0x7fffffff7ffffffdn], + [-0x100000001n, -0x80000001n, 0x180000000n], + [-0x100000000n, -0x80000001n, 0x7fffffffn], + [-0xffffffffn, -0x80000001n, 0x7ffffffen], + [-0xfffffffen, -0x80000001n, 0x7ffffffdn], + [-0x80000001n, -0x80000001n, 0n], + [-0x80000000n, -0x80000001n, 0xffffffffn], + [-0x7fffffffn, -0x80000001n, 0xfffffffen], + [-0x7ffffffen, -0x80000001n, 0xfffffffdn], + [0xfffffffen, -0x80000001n, -0x7fffffffn], + [0xffffffffn, -0x80000001n, -0x80000000n], + [0x100000000n, -0x80000001n, -0x180000001n], + [0x100000001n, -0x80000001n, -0x180000002n], + [0x7ffffffffffffffen, -0x80000001n, -0x7fffffff7fffffffn], + [0x7fffffffffffffffn, -0x80000001n, -0x7fffffff80000000n], + [0x8000000000000000n, -0x80000001n, -0x8000000080000001n], + [0x8000000000000001n, -0x80000001n, -0x8000000080000002n], + [0xfffffffffffffffen, -0x80000001n, -0xffffffff7fffffffn], + [0xffffffffffffffffn, -0x80000001n, -0xffffffff80000000n], + [0x10000000000000000n, -0x80000001n, -0x10000000080000001n], + [0x10000000000000001n, -0x80000001n, -0x10000000080000002n], + [-0x10000000000000001n, -0x80000000n, 0x1000000007fffffffn], + [-0x10000000000000000n, -0x80000000n, 0xffffffff80000000n], + [-0xffffffffffffffffn, -0x80000000n, 0xffffffff80000001n], + [-0xfffffffffffffffen, -0x80000000n, 0xffffffff80000002n], + [-0x8000000000000001n, -0x80000000n, 0x800000007fffffffn], + [-0x8000000000000000n, -0x80000000n, 0x7fffffff80000000n], + [-0x7fffffffffffffffn, -0x80000000n, 0x7fffffff80000001n], + [-0x7ffffffffffffffen, -0x80000000n, 0x7fffffff80000002n], + [-0x100000001n, -0x80000000n, 0x17fffffffn], + [-0x100000000n, -0x80000000n, 0x80000000n], + [-0xffffffffn, -0x80000000n, 0x80000001n], + [-0xfffffffen, -0x80000000n, 0x80000002n], + [-0x80000000n, -0x80000000n, 0n], + [-0x7fffffffn, -0x80000000n, 1n], + [-0x7ffffffen, -0x80000000n, 2n], + [0xfffffffen, -0x80000000n, -0x80000002n], + [0xffffffffn, -0x80000000n, -0x80000001n], + [0x100000000n, -0x80000000n, -0x180000000n], + [0x100000001n, -0x80000000n, -0x17fffffffn], + [0x7ffffffffffffffen, -0x80000000n, -0x7fffffff80000002n], + [0x7fffffffffffffffn, -0x80000000n, -0x7fffffff80000001n], + [0x8000000000000000n, -0x80000000n, -0x8000000080000000n], + [0x8000000000000001n, -0x80000000n, -0x800000007fffffffn], + [0xfffffffffffffffen, -0x80000000n, -0xffffffff80000002n], + [0xffffffffffffffffn, -0x80000000n, -0xffffffff80000001n], + [0x10000000000000000n, -0x80000000n, -0x10000000080000000n], + [0x10000000000000001n, -0x80000000n, -0x1000000007fffffffn], + [-0x10000000000000001n, -0x7fffffffn, 0x1000000007ffffffen], + [-0x10000000000000000n, -0x7fffffffn, 0xffffffff80000001n], + [-0xffffffffffffffffn, -0x7fffffffn, 0xffffffff80000000n], + [-0xfffffffffffffffen, -0x7fffffffn, 0xffffffff80000003n], + [-0x8000000000000001n, -0x7fffffffn, 0x800000007ffffffen], + [-0x8000000000000000n, -0x7fffffffn, 0x7fffffff80000001n], + [-0x7fffffffffffffffn, -0x7fffffffn, 0x7fffffff80000000n], + [-0x7ffffffffffffffen, -0x7fffffffn, 0x7fffffff80000003n], + [-0x100000001n, -0x7fffffffn, 0x17ffffffen], + [-0x100000000n, -0x7fffffffn, 0x80000001n], + [-0xffffffffn, -0x7fffffffn, 0x80000000n], + [-0xfffffffen, -0x7fffffffn, 0x80000003n], + [-0x7fffffffn, -0x7fffffffn, 0n], + [-0x7ffffffen, -0x7fffffffn, 3n], + [0xfffffffen, -0x7fffffffn, -0x80000001n], + [0xffffffffn, -0x7fffffffn, -0x80000002n], + [0x100000000n, -0x7fffffffn, -0x17fffffffn], + [0x100000001n, -0x7fffffffn, -0x180000000n], + [0x7ffffffffffffffen, -0x7fffffffn, -0x7fffffff80000001n], + [0x7fffffffffffffffn, -0x7fffffffn, -0x7fffffff80000002n], + [0x8000000000000000n, -0x7fffffffn, -0x800000007fffffffn], + [0x8000000000000001n, -0x7fffffffn, -0x8000000080000000n], + [0xfffffffffffffffen, -0x7fffffffn, -0xffffffff80000001n], + [0xffffffffffffffffn, -0x7fffffffn, -0xffffffff80000002n], + [0x10000000000000000n, -0x7fffffffn, -0x1000000007fffffffn], + [0x10000000000000001n, -0x7fffffffn, -0x10000000080000000n], + [-0x10000000000000001n, -0x7ffffffen, 0x1000000007ffffffdn], + [-0x10000000000000000n, -0x7ffffffen, 0xffffffff80000002n], + [-0xffffffffffffffffn, -0x7ffffffen, 0xffffffff80000003n], + [-0xfffffffffffffffen, -0x7ffffffen, 0xffffffff80000000n], + [-0x8000000000000001n, -0x7ffffffen, 0x800000007ffffffdn], + [-0x8000000000000000n, -0x7ffffffen, 0x7fffffff80000002n], + [-0x7fffffffffffffffn, -0x7ffffffen, 0x7fffffff80000003n], + [-0x7ffffffffffffffen, -0x7ffffffen, 0x7fffffff80000000n], + [-0x100000001n, -0x7ffffffen, 0x17ffffffdn], + [-0x100000000n, -0x7ffffffen, 0x80000002n], + [-0xffffffffn, -0x7ffffffen, 0x80000003n], + [-0xfffffffen, -0x7ffffffen, 0x80000000n], + [-0x7ffffffen, -0x7ffffffen, 0n], + [0xfffffffen, -0x7ffffffen, -0x80000004n], + [0xffffffffn, -0x7ffffffen, -0x80000003n], + [0x100000000n, -0x7ffffffen, -0x17ffffffen], + [0x100000001n, -0x7ffffffen, -0x17ffffffdn], + [0x7ffffffffffffffen, -0x7ffffffen, -0x7fffffff80000004n], + [0x7fffffffffffffffn, -0x7ffffffen, -0x7fffffff80000003n], + [0x8000000000000000n, -0x7ffffffen, -0x800000007ffffffen], + [0x8000000000000001n, -0x7ffffffen, -0x800000007ffffffdn], + [0xfffffffffffffffen, -0x7ffffffen, -0xffffffff80000004n], + [0xffffffffffffffffn, -0x7ffffffen, -0xffffffff80000003n], + [0x10000000000000000n, -0x7ffffffen, -0x1000000007ffffffen], + [0x10000000000000001n, -0x7ffffffen, -0x1000000007ffffffdn], + [-0x10000000000000001n, 0xfffffffen, -0x100000000ffffffffn], + [-0x10000000000000000n, 0xfffffffen, -0xffffffff00000002n], + [-0xffffffffffffffffn, 0xfffffffen, -0xffffffff00000001n], + [-0xfffffffffffffffen, 0xfffffffen, -0xffffffff00000004n], + [-0x8000000000000001n, 0xfffffffen, -0x80000000ffffffffn], + [-0x8000000000000000n, 0xfffffffen, -0x7fffffff00000002n], + [-0x7fffffffffffffffn, 0xfffffffen, -0x7fffffff00000001n], + [-0x7ffffffffffffffen, 0xfffffffen, -0x7fffffff00000004n], + [-0x100000001n, 0xfffffffen, -0x1ffffffffn], + [-0x100000000n, 0xfffffffen, -2n], + [-0xffffffffn, 0xfffffffen, -1n], + [-0xfffffffen, 0xfffffffen, -4n], + [0xfffffffen, 0xfffffffen, 0n], + [0xffffffffn, 0xfffffffen, 1n], + [0x100000000n, 0xfffffffen, 0x1fffffffen], + [0x100000001n, 0xfffffffen, 0x1ffffffffn], + [0x7ffffffffffffffen, 0xfffffffen, 0x7fffffff00000000n], + [0x7fffffffffffffffn, 0xfffffffen, 0x7fffffff00000001n], + [0x8000000000000000n, 0xfffffffen, 0x80000000fffffffen], + [0x8000000000000001n, 0xfffffffen, 0x80000000ffffffffn], + [0xfffffffffffffffen, 0xfffffffen, 0xffffffff00000000n], + [0xffffffffffffffffn, 0xfffffffen, 0xffffffff00000001n], + [0x10000000000000000n, 0xfffffffen, 0x100000000fffffffen], + [0x10000000000000001n, 0xfffffffen, 0x100000000ffffffffn], + [-0x10000000000000001n, 0xffffffffn, -0x10000000100000000n], + [-0x10000000000000000n, 0xffffffffn, -0xffffffff00000001n], + [-0xffffffffffffffffn, 0xffffffffn, -0xffffffff00000002n], + [-0xfffffffffffffffen, 0xffffffffn, -0xffffffff00000003n], + [-0x8000000000000001n, 0xffffffffn, -0x8000000100000000n], + [-0x8000000000000000n, 0xffffffffn, -0x7fffffff00000001n], + [-0x7fffffffffffffffn, 0xffffffffn, -0x7fffffff00000002n], + [-0x7ffffffffffffffen, 0xffffffffn, -0x7fffffff00000003n], + [-0x100000001n, 0xffffffffn, -0x200000000n], + [-0x100000000n, 0xffffffffn, -1n], + [-0xffffffffn, 0xffffffffn, -2n], + [-0xfffffffen, 0xffffffffn, -3n], + [0xffffffffn, 0xffffffffn, 0n], + [0x100000000n, 0xffffffffn, 0x1ffffffffn], + [0x100000001n, 0xffffffffn, 0x1fffffffen], + [0x7ffffffffffffffen, 0xffffffffn, 0x7fffffff00000001n], + [0x7fffffffffffffffn, 0xffffffffn, 0x7fffffff00000000n], + [0x8000000000000000n, 0xffffffffn, 0x80000000ffffffffn], + [0x8000000000000001n, 0xffffffffn, 0x80000000fffffffen], + [0xfffffffffffffffen, 0xffffffffn, 0xffffffff00000001n], + [0xffffffffffffffffn, 0xffffffffn, 0xffffffff00000000n], + [0x10000000000000000n, 0xffffffffn, 0x100000000ffffffffn], + [0x10000000000000001n, 0xffffffffn, 0x100000000fffffffen], + [-0x10000000000000001n, 0x100000000n, -0x10000000100000001n], + [-0x10000000000000000n, 0x100000000n, -0xffffffff00000000n], + [-0xffffffffffffffffn, 0x100000000n, -0xfffffffeffffffffn], + [-0xfffffffffffffffen, 0x100000000n, -0xfffffffefffffffen], + [-0x8000000000000001n, 0x100000000n, -0x8000000100000001n], + [-0x8000000000000000n, 0x100000000n, -0x7fffffff00000000n], + [-0x7fffffffffffffffn, 0x100000000n, -0x7ffffffeffffffffn], + [-0x7ffffffffffffffen, 0x100000000n, -0x7ffffffefffffffen], + [-0x100000001n, 0x100000000n, -1n], + [-0x100000000n, 0x100000000n, -0x200000000n], + [-0xffffffffn, 0x100000000n, -0x1ffffffffn], + [-0xfffffffen, 0x100000000n, -0x1fffffffen], + [0x100000000n, 0x100000000n, 0n], + [0x100000001n, 0x100000000n, 1n], + [0x7ffffffffffffffen, 0x100000000n, 0x7ffffffefffffffen], + [0x7fffffffffffffffn, 0x100000000n, 0x7ffffffeffffffffn], + [0x8000000000000000n, 0x100000000n, 0x8000000100000000n], + [0x8000000000000001n, 0x100000000n, 0x8000000100000001n], + [0xfffffffffffffffen, 0x100000000n, 0xfffffffefffffffen], + [0xffffffffffffffffn, 0x100000000n, 0xfffffffeffffffffn], + [0x10000000000000000n, 0x100000000n, 0x10000000100000000n], + [0x10000000000000001n, 0x100000000n, 0x10000000100000001n], + [-0x10000000000000001n, 0x100000001n, -0x10000000100000002n], + [-0x10000000000000000n, 0x100000001n, -0xfffffffeffffffffn], + [-0xffffffffffffffffn, 0x100000001n, -0xffffffff00000000n], + [-0xfffffffffffffffen, 0x100000001n, -0xfffffffefffffffdn], + [-0x8000000000000001n, 0x100000001n, -0x8000000100000002n], + [-0x8000000000000000n, 0x100000001n, -0x7ffffffeffffffffn], + [-0x7fffffffffffffffn, 0x100000001n, -0x7fffffff00000000n], + [-0x7ffffffffffffffen, 0x100000001n, -0x7ffffffefffffffdn], + [-0x100000001n, 0x100000001n, -2n], + [-0x100000000n, 0x100000001n, -0x1ffffffffn], + [-0xffffffffn, 0x100000001n, -0x200000000n], + [-0xfffffffen, 0x100000001n, -0x1fffffffdn], + [0x100000001n, 0x100000001n, 0n], + [0x7ffffffffffffffen, 0x100000001n, 0x7ffffffeffffffffn], + [0x7fffffffffffffffn, 0x100000001n, 0x7ffffffefffffffen], + [0x8000000000000000n, 0x100000001n, 0x8000000100000001n], + [0x8000000000000001n, 0x100000001n, 0x8000000100000000n], + [0xfffffffffffffffen, 0x100000001n, 0xfffffffeffffffffn], + [0xffffffffffffffffn, 0x100000001n, 0xfffffffefffffffen], + [0x10000000000000000n, 0x100000001n, 0x10000000100000001n], + [0x10000000000000001n, 0x100000001n, 0x10000000100000000n], + [-0x10000000000000001n, -0x100000001n, 0x10000000100000000n], + [-0x10000000000000000n, -0x100000001n, 0xfffffffeffffffffn], + [-0xffffffffffffffffn, -0x100000001n, 0xfffffffefffffffen], + [-0xfffffffffffffffen, -0x100000001n, 0xfffffffefffffffdn], + [-0x8000000000000001n, -0x100000001n, 0x8000000100000000n], + [-0x8000000000000000n, -0x100000001n, 0x7ffffffeffffffffn], + [-0x7fffffffffffffffn, -0x100000001n, 0x7ffffffefffffffen], + [-0x7ffffffffffffffen, -0x100000001n, 0x7ffffffefffffffdn], + [-0x100000001n, -0x100000001n, 0n], + [-0x100000000n, -0x100000001n, 0x1ffffffffn], + [-0xffffffffn, -0x100000001n, 0x1fffffffen], + [-0xfffffffen, -0x100000001n, 0x1fffffffdn], + [0x7ffffffffffffffen, -0x100000001n, -0x7ffffffeffffffffn], + [0x7fffffffffffffffn, -0x100000001n, -0x7fffffff00000000n], + [0x8000000000000000n, -0x100000001n, -0x8000000100000001n], + [0x8000000000000001n, -0x100000001n, -0x8000000100000002n], + [0xfffffffffffffffen, -0x100000001n, -0xfffffffeffffffffn], + [0xffffffffffffffffn, -0x100000001n, -0xffffffff00000000n], + [0x10000000000000000n, -0x100000001n, -0x10000000100000001n], + [0x10000000000000001n, -0x100000001n, -0x10000000100000002n], + [-0x10000000000000001n, -0x100000000n, 0x100000000ffffffffn], + [-0x10000000000000000n, -0x100000000n, 0xffffffff00000000n], + [-0xffffffffffffffffn, -0x100000000n, 0xffffffff00000001n], + [-0xfffffffffffffffen, -0x100000000n, 0xffffffff00000002n], + [-0x8000000000000001n, -0x100000000n, 0x80000000ffffffffn], + [-0x8000000000000000n, -0x100000000n, 0x7fffffff00000000n], + [-0x7fffffffffffffffn, -0x100000000n, 0x7fffffff00000001n], + [-0x7ffffffffffffffen, -0x100000000n, 0x7fffffff00000002n], + [-0x100000000n, -0x100000000n, 0n], + [-0xffffffffn, -0x100000000n, 1n], + [-0xfffffffen, -0x100000000n, 2n], + [0x7ffffffffffffffen, -0x100000000n, -0x7fffffff00000002n], + [0x7fffffffffffffffn, -0x100000000n, -0x7fffffff00000001n], + [0x8000000000000000n, -0x100000000n, -0x8000000100000000n], + [0x8000000000000001n, -0x100000000n, -0x80000000ffffffffn], + [0xfffffffffffffffen, -0x100000000n, -0xffffffff00000002n], + [0xffffffffffffffffn, -0x100000000n, -0xffffffff00000001n], + [0x10000000000000000n, -0x100000000n, -0x10000000100000000n], + [0x10000000000000001n, -0x100000000n, -0x100000000ffffffffn], + [-0x10000000000000001n, -0xffffffffn, 0x100000000fffffffen], + [-0x10000000000000000n, -0xffffffffn, 0xffffffff00000001n], + [-0xffffffffffffffffn, -0xffffffffn, 0xffffffff00000000n], + [-0xfffffffffffffffen, -0xffffffffn, 0xffffffff00000003n], + [-0x8000000000000001n, -0xffffffffn, 0x80000000fffffffen], + [-0x8000000000000000n, -0xffffffffn, 0x7fffffff00000001n], + [-0x7fffffffffffffffn, -0xffffffffn, 0x7fffffff00000000n], + [-0x7ffffffffffffffen, -0xffffffffn, 0x7fffffff00000003n], + [-0xffffffffn, -0xffffffffn, 0n], + [-0xfffffffen, -0xffffffffn, 3n], + [0x7ffffffffffffffen, -0xffffffffn, -0x7fffffff00000001n], + [0x7fffffffffffffffn, -0xffffffffn, -0x7fffffff00000002n], + [0x8000000000000000n, -0xffffffffn, -0x80000000ffffffffn], + [0x8000000000000001n, -0xffffffffn, -0x8000000100000000n], + [0xfffffffffffffffen, -0xffffffffn, -0xffffffff00000001n], + [0xffffffffffffffffn, -0xffffffffn, -0xffffffff00000002n], + [0x10000000000000000n, -0xffffffffn, -0x100000000ffffffffn], + [0x10000000000000001n, -0xffffffffn, -0x10000000100000000n], + [-0x10000000000000001n, -0xfffffffen, 0x100000000fffffffdn], + [-0x10000000000000000n, -0xfffffffen, 0xffffffff00000002n], + [-0xffffffffffffffffn, -0xfffffffen, 0xffffffff00000003n], + [-0xfffffffffffffffen, -0xfffffffen, 0xffffffff00000000n], + [-0x8000000000000001n, -0xfffffffen, 0x80000000fffffffdn], + [-0x8000000000000000n, -0xfffffffen, 0x7fffffff00000002n], + [-0x7fffffffffffffffn, -0xfffffffen, 0x7fffffff00000003n], + [-0x7ffffffffffffffen, -0xfffffffen, 0x7fffffff00000000n], + [-0xfffffffen, -0xfffffffen, 0n], + [0x7ffffffffffffffen, -0xfffffffen, -0x7fffffff00000004n], + [0x7fffffffffffffffn, -0xfffffffen, -0x7fffffff00000003n], + [0x8000000000000000n, -0xfffffffen, -0x80000000fffffffen], + [0x8000000000000001n, -0xfffffffen, -0x80000000fffffffdn], + [0xfffffffffffffffen, -0xfffffffen, -0xffffffff00000004n], + [0xffffffffffffffffn, -0xfffffffen, -0xffffffff00000003n], + [0x10000000000000000n, -0xfffffffen, -0x100000000fffffffen], + [0x10000000000000001n, -0xfffffffen, -0x100000000fffffffdn], + [-0x10000000000000001n, 0x7ffffffffffffffen, -0x17fffffffffffffffn], + [-0x10000000000000000n, 0x7ffffffffffffffen, -0x8000000000000002n], + [-0xffffffffffffffffn, 0x7ffffffffffffffen, -0x8000000000000001n], + [-0xfffffffffffffffen, 0x7ffffffffffffffen, -0x8000000000000004n], + [-0x8000000000000001n, 0x7ffffffffffffffen, -0xffffffffffffffffn], + [-0x8000000000000000n, 0x7ffffffffffffffen, -2n], + [-0x7fffffffffffffffn, 0x7ffffffffffffffen, -1n], + [-0x7ffffffffffffffen, 0x7ffffffffffffffen, -4n], + [0x7ffffffffffffffen, 0x7ffffffffffffffen, 0n], + [0x7fffffffffffffffn, 0x7ffffffffffffffen, 1n], + [0x8000000000000000n, 0x7ffffffffffffffen, 0xfffffffffffffffen], + [0x8000000000000001n, 0x7ffffffffffffffen, 0xffffffffffffffffn], + [0xfffffffffffffffen, 0x7ffffffffffffffen, 0x8000000000000000n], + [0xffffffffffffffffn, 0x7ffffffffffffffen, 0x8000000000000001n], + [0x10000000000000000n, 0x7ffffffffffffffen, 0x17ffffffffffffffen], + [0x10000000000000001n, 0x7ffffffffffffffen, 0x17fffffffffffffffn], + [-0x10000000000000001n, 0x7fffffffffffffffn, -0x18000000000000000n], + [-0x10000000000000000n, 0x7fffffffffffffffn, -0x8000000000000001n], + [-0xffffffffffffffffn, 0x7fffffffffffffffn, -0x8000000000000002n], + [-0xfffffffffffffffen, 0x7fffffffffffffffn, -0x8000000000000003n], + [-0x8000000000000001n, 0x7fffffffffffffffn, -0x10000000000000000n], + [-0x8000000000000000n, 0x7fffffffffffffffn, -1n], + [-0x7fffffffffffffffn, 0x7fffffffffffffffn, -2n], + [-0x7ffffffffffffffen, 0x7fffffffffffffffn, -3n], + [0x7fffffffffffffffn, 0x7fffffffffffffffn, 0n], + [0x8000000000000000n, 0x7fffffffffffffffn, 0xffffffffffffffffn], + [0x8000000000000001n, 0x7fffffffffffffffn, 0xfffffffffffffffen], + [0xfffffffffffffffen, 0x7fffffffffffffffn, 0x8000000000000001n], + [0xffffffffffffffffn, 0x7fffffffffffffffn, 0x8000000000000000n], + [0x10000000000000000n, 0x7fffffffffffffffn, 0x17fffffffffffffffn], + [0x10000000000000001n, 0x7fffffffffffffffn, 0x17ffffffffffffffen], + [-0x10000000000000001n, 0x8000000000000000n, -0x18000000000000001n], + [-0x10000000000000000n, 0x8000000000000000n, -0x8000000000000000n], + [-0xffffffffffffffffn, 0x8000000000000000n, -0x7fffffffffffffffn], + [-0xfffffffffffffffen, 0x8000000000000000n, -0x7ffffffffffffffen], + [-0x8000000000000001n, 0x8000000000000000n, -1n], + [-0x8000000000000000n, 0x8000000000000000n, -0x10000000000000000n], + [-0x7fffffffffffffffn, 0x8000000000000000n, -0xffffffffffffffffn], + [-0x7ffffffffffffffen, 0x8000000000000000n, -0xfffffffffffffffen], + [0x8000000000000000n, 0x8000000000000000n, 0n], + [0x8000000000000001n, 0x8000000000000000n, 1n], + [0xfffffffffffffffen, 0x8000000000000000n, 0x7ffffffffffffffen], + [0xffffffffffffffffn, 0x8000000000000000n, 0x7fffffffffffffffn], + [0x10000000000000000n, 0x8000000000000000n, 0x18000000000000000n], + [0x10000000000000001n, 0x8000000000000000n, 0x18000000000000001n], + [-0x10000000000000001n, 0x8000000000000001n, -0x18000000000000002n], + [-0x10000000000000000n, 0x8000000000000001n, -0x7fffffffffffffffn], + [-0xffffffffffffffffn, 0x8000000000000001n, -0x8000000000000000n], + [-0xfffffffffffffffen, 0x8000000000000001n, -0x7ffffffffffffffdn], + [-0x8000000000000001n, 0x8000000000000001n, -2n], + [-0x8000000000000000n, 0x8000000000000001n, -0xffffffffffffffffn], + [-0x7fffffffffffffffn, 0x8000000000000001n, -0x10000000000000000n], + [-0x7ffffffffffffffen, 0x8000000000000001n, -0xfffffffffffffffdn], + [0x8000000000000001n, 0x8000000000000001n, 0n], + [0xfffffffffffffffen, 0x8000000000000001n, 0x7fffffffffffffffn], + [0xffffffffffffffffn, 0x8000000000000001n, 0x7ffffffffffffffen], + [0x10000000000000000n, 0x8000000000000001n, 0x18000000000000001n], + [0x10000000000000001n, 0x8000000000000001n, 0x18000000000000000n], + [-0x10000000000000001n, -0x8000000000000001n, 0x18000000000000000n], + [-0x10000000000000000n, -0x8000000000000001n, 0x7fffffffffffffffn], + [-0xffffffffffffffffn, -0x8000000000000001n, 0x7ffffffffffffffen], + [-0xfffffffffffffffen, -0x8000000000000001n, 0x7ffffffffffffffdn], + [-0x8000000000000001n, -0x8000000000000001n, 0n], + [-0x8000000000000000n, -0x8000000000000001n, 0xffffffffffffffffn], + [-0x7fffffffffffffffn, -0x8000000000000001n, 0xfffffffffffffffen], + [-0x7ffffffffffffffen, -0x8000000000000001n, 0xfffffffffffffffdn], + [0xfffffffffffffffen, -0x8000000000000001n, -0x7fffffffffffffffn], + [0xffffffffffffffffn, -0x8000000000000001n, -0x8000000000000000n], + [0x10000000000000000n, -0x8000000000000001n, -0x18000000000000001n], + [0x10000000000000001n, -0x8000000000000001n, -0x18000000000000002n], + [-0x10000000000000001n, -0x8000000000000000n, 0x17fffffffffffffffn], + [-0x10000000000000000n, -0x8000000000000000n, 0x8000000000000000n], + [-0xffffffffffffffffn, -0x8000000000000000n, 0x8000000000000001n], + [-0xfffffffffffffffen, -0x8000000000000000n, 0x8000000000000002n], + [-0x8000000000000000n, -0x8000000000000000n, 0n], + [-0x7fffffffffffffffn, -0x8000000000000000n, 1n], + [-0x7ffffffffffffffen, -0x8000000000000000n, 2n], + [0xfffffffffffffffen, -0x8000000000000000n, -0x8000000000000002n], + [0xffffffffffffffffn, -0x8000000000000000n, -0x8000000000000001n], + [0x10000000000000000n, -0x8000000000000000n, -0x18000000000000000n], + [0x10000000000000001n, -0x8000000000000000n, -0x17fffffffffffffffn], + [-0x10000000000000001n, -0x7fffffffffffffffn, 0x17ffffffffffffffen], + [-0x10000000000000000n, -0x7fffffffffffffffn, 0x8000000000000001n], + [-0xffffffffffffffffn, -0x7fffffffffffffffn, 0x8000000000000000n], + [-0xfffffffffffffffen, -0x7fffffffffffffffn, 0x8000000000000003n], + [-0x7fffffffffffffffn, -0x7fffffffffffffffn, 0n], + [-0x7ffffffffffffffen, -0x7fffffffffffffffn, 3n], + [0xfffffffffffffffen, -0x7fffffffffffffffn, -0x8000000000000001n], + [0xffffffffffffffffn, -0x7fffffffffffffffn, -0x8000000000000002n], + [0x10000000000000000n, -0x7fffffffffffffffn, -0x17fffffffffffffffn], + [0x10000000000000001n, -0x7fffffffffffffffn, -0x18000000000000000n], + [-0x10000000000000001n, -0x7ffffffffffffffen, 0x17ffffffffffffffdn], + [-0x10000000000000000n, -0x7ffffffffffffffen, 0x8000000000000002n], + [-0xffffffffffffffffn, -0x7ffffffffffffffen, 0x8000000000000003n], + [-0xfffffffffffffffen, -0x7ffffffffffffffen, 0x8000000000000000n], + [-0x7ffffffffffffffen, -0x7ffffffffffffffen, 0n], + [0xfffffffffffffffen, -0x7ffffffffffffffen, -0x8000000000000004n], + [0xffffffffffffffffn, -0x7ffffffffffffffen, -0x8000000000000003n], + [0x10000000000000000n, -0x7ffffffffffffffen, -0x17ffffffffffffffen], + [0x10000000000000001n, -0x7ffffffffffffffen, -0x17ffffffffffffffdn], + [-0x10000000000000001n, 0xfffffffffffffffen, -0x1ffffffffffffffffn], + [-0x10000000000000000n, 0xfffffffffffffffen, -2n], + [-0xffffffffffffffffn, 0xfffffffffffffffen, -1n], + [-0xfffffffffffffffen, 0xfffffffffffffffen, -4n], + [0xfffffffffffffffen, 0xfffffffffffffffen, 0n], + [0xffffffffffffffffn, 0xfffffffffffffffen, 1n], + [0x10000000000000000n, 0xfffffffffffffffen, 0x1fffffffffffffffen], + [0x10000000000000001n, 0xfffffffffffffffen, 0x1ffffffffffffffffn], + [-0x10000000000000001n, 0xffffffffffffffffn, -0x20000000000000000n], + [-0x10000000000000000n, 0xffffffffffffffffn, -1n], + [-0xffffffffffffffffn, 0xffffffffffffffffn, -2n], + [-0xfffffffffffffffen, 0xffffffffffffffffn, -3n], + [0xffffffffffffffffn, 0xffffffffffffffffn, 0n], + [0x10000000000000000n, 0xffffffffffffffffn, 0x1ffffffffffffffffn], + [0x10000000000000001n, 0xffffffffffffffffn, 0x1fffffffffffffffen], + [-0x10000000000000001n, 0x10000000000000000n, -1n], + [-0x10000000000000000n, 0x10000000000000000n, -0x20000000000000000n], + [-0xffffffffffffffffn, 0x10000000000000000n, -0x1ffffffffffffffffn], + [-0xfffffffffffffffen, 0x10000000000000000n, -0x1fffffffffffffffen], + [0x10000000000000000n, 0x10000000000000000n, 0n], + [0x10000000000000001n, 0x10000000000000000n, 1n], + [-0x10000000000000001n, 0x10000000000000001n, -2n], + [-0x10000000000000000n, 0x10000000000000001n, -0x1ffffffffffffffffn], + [-0xffffffffffffffffn, 0x10000000000000001n, -0x20000000000000000n], + [-0xfffffffffffffffen, 0x10000000000000001n, -0x1fffffffffffffffdn], + [0x10000000000000001n, 0x10000000000000001n, 0n], + [-0x10000000000000001n, -0x10000000000000001n, 0n], + [-0x10000000000000000n, -0x10000000000000001n, 0x1ffffffffffffffffn], + [-0xffffffffffffffffn, -0x10000000000000001n, 0x1fffffffffffffffen], + [-0xfffffffffffffffen, -0x10000000000000001n, 0x1fffffffffffffffdn], + [-0x10000000000000000n, -0x10000000000000000n, 0n], + [-0xffffffffffffffffn, -0x10000000000000000n, 1n], + [-0xfffffffffffffffen, -0x10000000000000000n, 2n], + [-0xffffffffffffffffn, -0xffffffffffffffffn, 0n], + [-0xfffffffffffffffen, -0xffffffffffffffffn, 3n], + [-0xfffffffffffffffen, -0xfffffffffffffffen, 0n], +]; + +function f(tests) { + for (let test of tests) { + let lhs = test[0], rhs = test[1], expected = test[2]; + + assertEq(lhs ^ rhs, expected); + assertEq(rhs ^ lhs, expected); + } +} + +for (let i = 0; i < 10; ++i) { + f(tests); +} diff --git a/js/src/jit-test/tests/bigint/bug1531269.js b/js/src/jit-test/tests/bigint/bug1531269.js new file mode 100644 index 0000000000..cf550a5f90 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bug1531269.js @@ -0,0 +1,13 @@ +var x = 0b1111n << 126n; +// octets: g f e d c b a 9 8 7 6 5 4 3 2 1 0 +assertEq(x, 0x03c0000000000000000000000000000000n); + +function tr(bits, x) { return BigInt.asUintN(bits, x); } + +// octets: g f e d c b a 9 8 7 6 5 4 3 2 1 0 +assertEq(tr(131, x), 0x03c0000000000000000000000000000000n); +assertEq(tr(130, x), 0x03c0000000000000000000000000000000n); +assertEq(tr(129, x), 0x01c0000000000000000000000000000000n); +assertEq(tr(128, x), 0x00c0000000000000000000000000000000n); +assertEq(tr(127, x), 0x0040000000000000000000000000000000n); +assertEq(tr(126, x), 0n); diff --git a/js/src/jit-test/tests/bigint/bug1551128.js b/js/src/jit-test/tests/bigint/bug1551128.js new file mode 100644 index 0000000000..50b295aec4 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bug1551128.js @@ -0,0 +1,6 @@ +load(libdir + "asserts.js"); + +assertEq(BigInt.asUintN(32, -1n), 0xffffffffn); +assertThrowsInstanceOf(() => BigInt.asUintN(2**32 - 1, -1n), RangeError); +assertThrowsInstanceOf(() => BigInt.asUintN(2**32, -1n), RangeError); +assertThrowsInstanceOf(() => BigInt.asUintN(2**53 - 1, -1n), RangeError); diff --git a/js/src/jit-test/tests/bigint/bug1580020.js b/js/src/jit-test/tests/bigint/bug1580020.js new file mode 100644 index 0000000000..52ef27dd5f --- /dev/null +++ b/js/src/jit-test/tests/bigint/bug1580020.js @@ -0,0 +1,14 @@ +// This test was designed for asan. +// +// In the deferred mode of parsing we need to ensure that the +// asmJS parser doesn't emit the deferred big int under the +// asmJS lifo alloc. +var x = -1n; +function a() { + 'use asm'; + function f() { + return (((((-1) >>> (0 + 0)) | 0) % 10000) >> (0 + 0)) | 0; + } + return f; +} +assertEq(true, a()() == x); \ No newline at end of file diff --git a/js/src/jit-test/tests/bigint/bug1679003.js b/js/src/jit-test/tests/bigint/bug1679003.js new file mode 100644 index 0000000000..aee9c0567d --- /dev/null +++ b/js/src/jit-test/tests/bigint/bug1679003.js @@ -0,0 +1,4 @@ +for (let i = 0, j = 0; i < 100; ++i) { + let x = (-0xffffffffffffffff_ffffffffffffffffn >> 0x40n); + assertEq(x, -0x10000000000000000n); +} diff --git a/js/src/jit-test/tests/bigint/bug1784435.js b/js/src/jit-test/tests/bigint/bug1784435.js new file mode 100644 index 0000000000..cda077d59f --- /dev/null +++ b/js/src/jit-test/tests/bigint/bug1784435.js @@ -0,0 +1,4 @@ +// |jit-test| error:RangeError +v2 = new Uint32Array(65537); +v4 = Object.getOwnPropertyNames(v2); +do {} while (v4 < 10n); diff --git a/js/src/jit-test/tests/bigint/bug1849099.js b/js/src/jit-test/tests/bigint/bug1849099.js new file mode 100644 index 0000000000..f61a9bfb73 --- /dev/null +++ b/js/src/jit-test/tests/bigint/bug1849099.js @@ -0,0 +1,14 @@ +// |jit-test| --fast-warmup; --no-threads + +function foo(a,b) { + a >> a + b ^ b +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + foo(10n, -1n); + try { + foo(-2147483648n); + } catch {} +} diff --git a/js/src/jit-test/tests/bug1213574.js b/js/src/jit-test/tests/bug1213574.js new file mode 100644 index 0000000000..28c0e9b544 --- /dev/null +++ b/js/src/jit-test/tests/bug1213574.js @@ -0,0 +1,16 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +var lfGlobal = newGlobal(); +lfGlobal.offThreadCompileToStencil(`{ let x; throw 42; }`); +var stencil = lfGlobal.finishOffThreadStencil(); +try { + lfGlobal.evalStencil(stencil); +} catch (e) { +} + +lfGlobal.offThreadCompileToStencil(`function f() { { let x = 42; return x; } }`); +stencil = lfGlobal.finishOffThreadStencil(); +try { + lfGlobal.evalStencil(stencil); +} catch (e) { +} diff --git a/js/src/jit-test/tests/bug1323854-2.js b/js/src/jit-test/tests/bug1323854-2.js new file mode 100644 index 0000000000..ca6ac4e7a5 --- /dev/null +++ b/js/src/jit-test/tests/bug1323854-2.js @@ -0,0 +1,14 @@ +// |jit-test| --ion-gvn=off; + +try { + var g = newGlobal(); + var dbg = new Debugger(g); + dbg.onExceptionUnwind = function(m) { + do { + m = m.older; + } while (m != null); + }; + g.eval("try { throw (function() {});} finally {}"); +} catch(e) { + +} diff --git a/js/src/jit-test/tests/bug1366925.js b/js/src/jit-test/tests/bug1366925.js new file mode 100644 index 0000000000..c213759e0e --- /dev/null +++ b/js/src/jit-test/tests/bug1366925.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +// Avoid crashing with --no-threads + +// JS shell shutdown ordering + +evalInWorker(` + var lfGlobal = newGlobal(); + lfGlobal.offThreadCompileToStencil(\`{ let x; throw 42; }\`); +`); diff --git a/js/src/jit-test/tests/bug1375074.js b/js/src/jit-test/tests/bug1375074.js new file mode 100644 index 0000000000..8bf01d9690 --- /dev/null +++ b/js/src/jit-test/tests/bug1375074.js @@ -0,0 +1,18 @@ +// This forces the VM to start creating unboxed objects and thus stresses a +// particular path into generated code for a specialized unboxed object +// constructor. + +var K = 2000; // 2000 should be plenty +var s = "["; +var i; +for ( i=0; i < K-1; i++ ) + s = s + `{"i":${i}},`; +s += `{"i":${i}}]`; +var v = JSON.parse(s); + +assertEq(v.length == K, true); + +for ( i=0; i < K; i++) { + assertEq(v[i] instanceof Object, true); + assertEq(v[i].i, i); +} diff --git a/js/src/jit-test/tests/bug1490638.js b/js/src/jit-test/tests/bug1490638.js new file mode 100644 index 0000000000..ce81629150 --- /dev/null +++ b/js/src/jit-test/tests/bug1490638.js @@ -0,0 +1,8 @@ +// |jit-test| allow-overrecursed; skip-if: helperThreadCount() === 0 + +evalInWorker(` + function f() { + f.apply([], new Array(20000)); + } + f() +`); diff --git a/js/src/jit-test/tests/bug1580246.js b/js/src/jit-test/tests/bug1580246.js new file mode 100644 index 0000000000..e6bd0173d2 --- /dev/null +++ b/js/src/jit-test/tests/bug1580246.js @@ -0,0 +1,59 @@ +load(libdir + "./asserts.js"); + +// Exercise object-literal creation. Many other tests also exercise details of +// objects created by object literals -- e.g., byteSize-of-objects.js. Here we +// simply want to hit the cases {run-once ctx, repeated ctx} x {constant, +// parameterized} x {small, large}. + +function build_large_literal(var_name, num_keys, extra) { + let s = "var " + var_name + " = {"; + for (let i = 0; i < num_keys; i++) { + s += "prop" + i + ": " + i + ","; + } + s += extra; + s += "};"; + return s; +} + +let small_singleton = {a: 1, b: 2, 0: "I'm an indexed property" }; +// Large enough to force dictionary mode -- should inhibit objliteral use in +// frontend: +eval(build_large_literal("large_singleton", 513, "")); + +let an_integer = 42; +let small_singleton_param = { a: 1, b: 2, c: an_integer }; +eval(build_large_literal("large_singleton_param", 513, "prop_int: an_integer")); + +function f(a_parameterized_integer) { + let small_templated = {a: 1, b: 2, 0: "I'm an indexed property" }; + // Large enough to force dictionary mode -- should inhibit objliteral use in + // frontend: + eval(build_large_literal("large_templated", 513, "")); + + let small_templated_param = { a: 1, b: 2, c: a_parameterized_integer }; + eval(build_large_literal("large_templated_param", 513, "prop_int: a_parameterized_integer")); + + return {small_templated, large_templated, + small_templated_param, large_templated_param}; +} + +for (let i = 0; i < 10; i++) { + let {small_templated, large_templated, + small_templated_param, large_templated_param} = f(42); + + assertDeepEq(small_templated, small_singleton); + assertDeepEq(large_templated, large_singleton); + assertDeepEq(small_templated_param, small_singleton_param); + assertDeepEq(large_templated_param, large_singleton_param); +} + +let small_lit_array = [0, 1, 2, 3]; +let large_cow_lit_array = [0, 1, 2, 3, 4, 5, 6, 7]; +assertEq(4, small_lit_array.length); +assertEq(8, large_cow_lit_array.length); +for (let i = 0; i < small_lit_array.length; i++) { + assertEq(i, small_lit_array[i]); +} +for (let i = 0; i < large_cow_lit_array.length; i++) { + assertEq(i, large_cow_lit_array[i]); +} diff --git a/js/src/jit-test/tests/bug1636306.js b/js/src/jit-test/tests/bug1636306.js new file mode 100644 index 0000000000..e39dc84f80 --- /dev/null +++ b/js/src/jit-test/tests/bug1636306.js @@ -0,0 +1,32 @@ +// |jit-test| --no-ion; skip-if: !('oomTest' in this) + +oomTest(() => { eval(` + function getCallee() { return getCallee.caller; } + + // Use trickery to get a reference to a run-once function. We avoid + // expanding the lazy inner functions in this first invocation. + let fn = function(x) { + if (x) { + // Singleton 'inner' + let _ = function() { + function inner() {} + }(); + + // Non-singleton 'inner' + for (var i = 0; i < 2; i++) { + let _ = function() { + function inner() {} + }(); + } + } + + return getCallee(); + }(false); + + // Run the lazy functions inside 'fn' this time. Run twice to check + // delazification still works after OOM failure. + for (var i = 0; i < 2; i++) { + try { fn(true); } + catch (e) { } + } +`)}); diff --git a/js/src/jit-test/tests/bug1681258.js b/js/src/jit-test/tests/bug1681258.js new file mode 100644 index 0000000000..4f15a8283e --- /dev/null +++ b/js/src/jit-test/tests/bug1681258.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !('oomTest' in this);--fast-warmup;--blinterp-warmup-threshold=10 +ignoreUnhandledRejections(); + +oomTest(async function() { + let m = parseModule(``); + moduleLink(m); + await moduleEvaluate(m); +}); diff --git a/js/src/jit-test/tests/bug1704480.js b/js/src/jit-test/tests/bug1704480.js new file mode 100644 index 0000000000..4822c39aee --- /dev/null +++ b/js/src/jit-test/tests/bug1704480.js @@ -0,0 +1,14 @@ +// |jit-test| --more-compartments +m = parseModule(` + await 0 ? b : c +`); +moduleLink(m); +moduleEvaluate(m) +d = newGlobal(); +d.e = this; +d.eval(` + Debugger(e).onExceptionUnwind = function(f) { + print(f.eval) + return f.eval("") + } +`); diff --git a/js/src/jit-test/tests/bug1742592.js b/js/src/jit-test/tests/bug1742592.js new file mode 100644 index 0000000000..b106854ead --- /dev/null +++ b/js/src/jit-test/tests/bug1742592.js @@ -0,0 +1,6 @@ +function a(b, c) { + b.formatToParts(c) +} +d = ["", "B"]; +b = new Intl.ListFormat; +a(b, d); diff --git a/js/src/jit-test/tests/bug1775005.js b/js/src/jit-test/tests/bug1775005.js new file mode 100644 index 0000000000..b1cd0ec82a --- /dev/null +++ b/js/src/jit-test/tests/bug1775005.js @@ -0,0 +1,8 @@ +try { + var n = 65536; + const lower = "a".repeat(n) + const upper = "A".repeat(n) + const pat = "^(?:" + lower + "|" + upper + "|" + upper + ")$"; + const re = RegExp(pat, "i"); + re.test(""); +} catch {} diff --git a/js/src/jit-test/tests/bug1782468-ptrdiff-veclen.js b/js/src/jit-test/tests/bug1782468-ptrdiff-veclen.js new file mode 100644 index 0000000000..b6948a38d3 --- /dev/null +++ b/js/src/jit-test/tests/bug1782468-ptrdiff-veclen.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: getBuildConfiguration("android") + +try { + a = {}; + for (b = 0; b < 24; b++) + a += a; + Function(a, a, a); + assertEq(true, false, "allocation overflow expected"); +} catch (e) { + if (getBuildConfiguration("pointer-byte-size") == 4) { + assertEq((e + "").includes("InternalError: allocation size overflow"), true); + } // else on 64-bit, it will be a SyntaxError for invalid code. +} diff --git a/js/src/jit-test/tests/bug1782558-veclen.js b/js/src/jit-test/tests/bug1782558-veclen.js new file mode 100644 index 0000000000..01ddc64287 --- /dev/null +++ b/js/src/jit-test/tests/bug1782558-veclen.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: getBuildConfiguration("pointer-byte-size") > 4 || getBuildConfiguration("android") + +// On 64-bit, this will allocate 2G temporary strings for keys while +// stringifying the Array, which takes a rather long time and doesn't have the +// potential of the problematic overflowing anyway. + +try { + let x = []; + x.length = Math.pow(2, 32) - 1; + x + 1; + assertEq(true, false, "overflow expected"); +} catch (e) { + assertEq((e + "").includes("InternalError: allocation size overflow"), true); +} diff --git a/js/src/jit-test/tests/bug1782562-toSource-veclen.js b/js/src/jit-test/tests/bug1782562-toSource-veclen.js new file mode 100644 index 0000000000..bb2c8d665f --- /dev/null +++ b/js/src/jit-test/tests/bug1782562-toSource-veclen.js @@ -0,0 +1,32 @@ +// |jit-test| skip-if: getBuildConfiguration("android") + +try { + var z = "1"; + try { + f = function (x) { + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + (function(){}); + }; + for (let i = 0; i < 99; i++) + z += z + } catch (e) {} + uneval(this); + assertEq(getBuildConfiguration("pointer-byte-size"), 8, "32-bit should OOM; 64-bit should not"); +} catch (e) { + const msg = e + ""; + assertEq(msg.includes("out of memory") || msg.includes("InternalError: allocation size overflow"), true); +} diff --git a/js/src/jit-test/tests/bug1787730.js b/js/src/jit-test/tests/bug1787730.js new file mode 100644 index 0000000000..a828527583 --- /dev/null +++ b/js/src/jit-test/tests/bug1787730.js @@ -0,0 +1,3 @@ +// |jit-test| --delazification-mode=concurrent-df+on-demand; skip-if: !('oomTest' in this) || isLcovEnabled() + +oomTest(() => evalcx(0)); diff --git a/js/src/jit-test/tests/bug1852218.js b/js/src/jit-test/tests/bug1852218.js new file mode 100644 index 0000000000..0af504eec4 --- /dev/null +++ b/js/src/jit-test/tests/bug1852218.js @@ -0,0 +1,17 @@ +// |jit-test| skip-if: getBuildConfiguration("arm64-simulator") === true +// This test times out in ARM64 simulator builds. + +function makeIonCompiledScript(n) { + let src = ""; + for (var i = 0; i < n; i++) { + src += "\n"; + } + src += "function f() {}"; + eval(src); + f(); + return f; +} + +for (var i = 0; i < 5010; i++) { + makeIonCompiledScript(i); +} diff --git a/js/src/jit-test/tests/bug765479.js b/js/src/jit-test/tests/bug765479.js new file mode 100644 index 0000000000..f8587a4e09 --- /dev/null +++ b/js/src/jit-test/tests/bug765479.js @@ -0,0 +1,6 @@ + + +function f(arr) { + return arr[0] + arr[1] + assertEq[2]; +} +var g2 = f("var b = 2;"); diff --git a/js/src/jit-test/tests/bug793385.js b/js/src/jit-test/tests/bug793385.js new file mode 100644 index 0000000000..deaa5d6c5f --- /dev/null +++ b/js/src/jit-test/tests/bug793385.js @@ -0,0 +1,12 @@ +// |jit-test| allow-oom; allow-unhandlable-oom; allow-overrecursed + +gcparam("maxBytes", gcparam("gcBytes") + 4*1024); +function f() { + var upvar = ""; + function g() { upvar += ""; } + var inner4 = f("get"), + x1,x2,x3,x4,x5,x11,x12,x13,x14,x15,x16,x17,x18, + otherGlobalSameCompartment = newGlobal("same-compartment"); + eval(''); +} +assertEq("aaa".replace(/a/g, f()), "poniesponiesponies"); diff --git a/js/src/jit-test/tests/bug825379.js b/js/src/jit-test/tests/bug825379.js new file mode 100644 index 0000000000..556b45afab --- /dev/null +++ b/js/src/jit-test/tests/bug825379.js @@ -0,0 +1,8 @@ +x = this +y = {} +y.v = ""; +[0, 0].forEach(function() { + for (p in y) { + x.eval("function* f(){yield e}") + } +}); diff --git a/js/src/jit-test/tests/bug828119.js b/js/src/jit-test/tests/bug828119.js new file mode 100644 index 0000000000..e92ef35763 --- /dev/null +++ b/js/src/jit-test/tests/bug828119.js @@ -0,0 +1,32 @@ + +function cmp_string_string(a,b) { + return a === b; +} + +assertEq(cmp_string_string("a", "a"), true); +assertEq(cmp_string_string("a", "b"), false); +assertEq(cmp_string_string("a", 1), false); + +function cmp_string_string2(a,b) { + return a === b; +} + +assertEq(cmp_string_string2("a", 1.1), false); +assertEq(cmp_string_string2("a", 2), false); +assertEq(cmp_string_string2("a", {}), false); + +function cmp_string_string3(a,b) { + return a !== b; +} + +assertEq(cmp_string_string3("a", "a"), false); +assertEq(cmp_string_string3("a", "b"), true); +assertEq(cmp_string_string3("a", 1), true); + +function cmp_string_string4(a,b) { + return a !== b; +} + +assertEq(cmp_string_string4("a", 1.1), true); +assertEq(cmp_string_string4("a", 2), true); +assertEq(cmp_string_string4("a", {}), true); diff --git a/js/src/jit-test/tests/bug830943.js b/js/src/jit-test/tests/bug830943.js new file mode 100644 index 0000000000..8018001889 --- /dev/null +++ b/js/src/jit-test/tests/bug830943.js @@ -0,0 +1,268 @@ +// |jit-test| error: Assertion failed: bad label: 2 +try { + this['Module'] = Module; +} catch (e) { + this['Module'] = Module = {}; +} +var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function'; +var ENVIRONMENT_IS_WEB = typeof window === 'object'; +var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; +var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; +if (ENVIRONMENT_IS_SHELL) { + Module['print'] = print; + Module['arguments'] = []; +} +var Runtime = { + alignMemory: function alignMemory(size, quantum) {}, +} + function SAFE_HEAP_CLEAR(dest) { + } + function SAFE_HEAP_STORE(dest, value, type, ignore) { + setValue(dest, value, type, 1); + } + function SAFE_HEAP_LOAD(dest, type, unsigned, ignore) { + try { } catch(e) {}; + var ret = getValue(dest, type, 1); + return ret; + }; + function SAFE_HEAP_LOAD1(dest, type) { + return getValue(dest, type, 1); + }; +function abort(text) { + Module.print(text + ':\n' + (new Error).stack); + throw "Assertion: " + text; +} +function assert(condition, text) { + if (!condition) { + abort('Assertion failed: ' + text); + } +} +function setValue(ptr, value, type, noSafe) { + if (type.charAt(type.length - 1) === '*') type = 'i32'; // pointers are 32-bit + if (noSafe) { + switch (type) { + case 'i32': + HEAP32[((ptr) >> 2)] = value; + } + } +} +function getValue(ptr, type, noSafe) { + if (type.charAt(type.length - 1) === '*') type = 'i32'; // pointers are 32-bit + if (noSafe) { + switch (type) { + case 'i32': + return HEAP32[((ptr) >> 2)]; + } + } +} +var ALLOC_STATIC = 2; // Cannot be freed +function allocate(slab, types, allocator, ptr) {} +var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216; +var buffer = new ArrayBuffer(TOTAL_MEMORY); +HEAP32 = new Int32Array(buffer); +STACK_ROOT = STACKTOP = Runtime.alignMemory(1); +function intArrayFromString(stringy, dontAddNull, length /* optional */ ) {} +function __ZN11btRigidBody14getMotionStateEv($this_0_20_val) { +} +function __ZN16btCollisionWorld23getCollisionObjectArrayEv($this) {} +function __ZN20btAlignedObjectArrayIP17btCollisionObjectEixEi($this_0_3_val, $n) {} +function _main($argc, $argv) { + label = 2; + while (1) switch (label) { + case 2: + var $31 = __Znwj(268); + var $32 = $31; + var $67 = __ZN17btCollisionObjectnwEj(); + var $68 = $67; + __ZN23btDiscreteDynamicsWorld12addRigidBodyEP11btRigidBody($32, $68); + var $99 = $31; + var $104 = __ZN23btDiscreteDynamicsWorld14stepSimulationEfif($32, .01666666753590107, 10, .01666666753590107); + var $106 = __ZNK16btCollisionWorld22getNumCollisionObjectsEv($99); + var $108 = __ZN16btCollisionWorld23getCollisionObjectArrayEv($99); + var $_idx6 = $108 + 12 | 0; + var $j_049_in = $106; + var $j_049 = $j_049_in - 1 | 0; + var $_idx6_val = SAFE_HEAP_LOAD($_idx6, "%class.btCollisionObject**", 0, 0); + var $109 = __ZN20btAlignedObjectArrayIP17btCollisionObjectEixEi($_idx6_val, $j_049); + var $110 = SAFE_HEAP_LOAD($109, "%class.btCollisionObject*", 0, 0); + var $111 = __ZN11btRigidBody6upcastEP17btCollisionObject($110); + var $_idx9 = $111 + 472 | 0; + var $_idx9_val = SAFE_HEAP_LOAD($_idx9, "%class.btMotionState*", 0, 0); + var $114 = __ZN11btRigidBody14getMotionStateEv($_idx9_val); + var $138 = $i_057 + 1 | 0; + var $139 = ($138 | 0) < 135; + if ($139) { + var $i_057 = $138; + break; + } + assert(0, "bad label: " + label); + } +} +Module["_main"] = _main; +function __ZN17btCollisionObjectnwEj() { + return __Z22btAlignedAllocInternalji(608); +} +function __ZNK16btCollisionWorld22getNumCollisionObjectsEv($this) {} +function __ZN11btRigidBody6upcastEP17btCollisionObject($colObj) { + label = 2; + while (1) switch (label) { + case 2: + var $_0; + return $_0; + } +} +function __ZNK9btVector33dotERKS_($this_0_0_0_val, $this_0_0_1_val, $this_0_0_2_val, $v_0_0_0_val, $v_0_0_1_val, $v_0_0_2_val) { +} +function __ZN20btAlignedObjectArrayIP11btRigidBodyEixEi($this_0_3_val, $n) {} +function __ZNK17btCollisionObject14getHitFractionEv($this_0_21_val) {} +function __ZN17btCollisionObject30getInterpolationWorldTransformEv($this) {} +function __ZNK17btCollisionObject30getInterpolationLinearVelocityEv($this) {} +function __ZNK17btCollisionObject31getInterpolationAngularVelocityEv($this) {} +function __ZN23btDiscreteDynamicsWorld28synchronizeSingleMotionStateEP11btRigidBody($this, $body) { + assertEq($body, 16); + var __stackBase__ = STACKTOP; + while (1) switch (label) { + case 2: + var $interpolatedTransform = __stackBase__; + var $4 = $body | 0; + var $7 = __ZN17btCollisionObject30getInterpolationWorldTransformEv($4); + var $8 = __ZNK17btCollisionObject30getInterpolationLinearVelocityEv($4); + var $9 = __ZNK17btCollisionObject31getInterpolationAngularVelocityEv($4); + var $10 = $this + 236 | 0; + var $11 = SAFE_HEAP_LOAD($10, "float", 0, 0); + var $_idx2 = $body + 240 | 0; + var $_idx2_val = SAFE_HEAP_LOAD($_idx2, "float", 0, 0); + var $12 = __ZNK17btCollisionObject14getHitFractionEv($_idx2_val); + var $13 = $11 * $12; + var $_idx3 = $8 | 0; + var $_idx3_val = SAFE_HEAP_LOAD($_idx3, "float", 0, 0); + var $_idx4 = $8 + 4 | 0; + var $_idx4_val = SAFE_HEAP_LOAD($_idx4, "float", 0, 0); + var $_idx5 = $8 + 8 | 0; + var $_idx5_val = SAFE_HEAP_LOAD($_idx5, "float", 0, 0); + __ZN15btTransformUtil18integrateTransformERK11btTransformRK9btVector3S5_fRS0_($7, $_idx3_val, $_idx4_val, $_idx5_val, $9, $13, $interpolatedTransform); + return; + } +} +function __ZN15btTransformUtil18integrateTransformERK11btTransformRK9btVector3S5_fRS0_($curTrans, $linvel_0_0_0_val, $linvel_0_0_1_val, $linvel_0_0_2_val, $angvel, $timeStep, $predictedTransform) { + var __stackBase__ = STACKTOP; + STACKTOP = STACKTOP + 132 | 0; + while (1) { + switch (label) { + case 2: + var $axis = __stackBase__ + 32; + var $3 = __stackBase__ + 48; + var $angvel_idx10 = $angvel | 0; + var $angvel_idx10_val = SAFE_HEAP_LOAD($angvel_idx10, "float", 0, 0); + var $angvel_idx11 = $angvel + 4 | 0; + var $angvel_idx11_val = SAFE_HEAP_LOAD($angvel_idx11, "float", 0, 0); + var $angvel_idx12 = $angvel + 8 | 0; + var $angvel_idx12_val = SAFE_HEAP_LOAD($angvel_idx12, "float", 0, 0); + var $7 = __ZNK9btVector36lengthEv($angvel_idx10_val, $angvel_idx11_val, $angvel_idx12_val); + var $8 = $7 * $timeStep; + if ($8 > .7853981852531433) {} else { + var $fAngle_0 = $7; + label = 5; + } + break; + case 5: + var $22 = $axis; + var $23 = $3; + SAFE_HEAP_STORE($22 + 12, SAFE_HEAP_LOAD1($23 + 12, "i32"), "i32", 0); + assertEq(SAFE_HEAP_LOAD1(0, "%class.btRigidBody*"), 16); + label = 7; + break; + case 6: + SAFE_HEAP_STORE($29 + 12, SAFE_HEAP_LOAD1($30 + 12, "i32"), "i32", 0); + case 7: + for (var i = __stackBase__; i < STACKTOP; i++) SAFE_HEAP_CLEAR(i); + return; + } + } +} +function __ZN23btDiscreteDynamicsWorld12addRigidBodyEP11btRigidBody($this, $body) { + SAFE_HEAP_STORE(STACKTOP, $body, "%class.btRigidBody*", 0); + assertEq(SAFE_HEAP_LOAD(0, "%class.btRigidBody*", 0, 0), 16); +} +function __ZN23btDiscreteDynamicsWorld23synchronizeMotionStatesEv($this) { + var $20 = SAFE_HEAP_LOAD(0, "%class.btRigidBody*", 0, 0); + assertEq($20, 16); + __ZN23btDiscreteDynamicsWorld28synchronizeSingleMotionStateEP11btRigidBody($this, $20); +} +function __ZN23btDiscreteDynamicsWorld14stepSimulationEfif($this, $timeStep, $maxSubSteps, $fixedTimeStep) { + label = 2; + while (1) switch (label) { + case 2: + var $numSimulationSubSteps_0; + __ZN23btDiscreteDynamicsWorld23synchronizeMotionStatesEv($this); + return $numSimulationSubSteps_0; + } +} +function __ZNK9btVector37length2Ev($this_0_0_0_val, $this_0_0_1_val, $this_0_0_2_val) { + return __ZNK9btVector33dotERKS_($this_0_0_0_val, $this_0_0_1_val, $this_0_0_2_val, $this_0_0_0_val, $this_0_0_1_val, $this_0_0_2_val); +} +function __Z6btSqrtf($y) { + return Math.sqrt($y); +} +function __ZNK9btVector36lengthEv($this_0_0_0_val, $this_0_0_1_val, $this_0_0_2_val) { + return __Z6btSqrtf(__ZNK9btVector37length2Ev($this_0_0_0_val, $this_0_0_1_val, $this_0_0_2_val)); +} +function __ZL21btAlignedAllocDefaultji($size, $alignment) { + while (1) switch (label) { + case 2: + var $1 = $size + 4 | 0; + var $2 = $alignment - 1 | 0; + var $3 = $1 + $2 | 0; + var $4 = __ZL14btAllocDefaultj($3); + var $7 = $4 + 4 | 0; + var $8 = $7; + var $9 = $alignment - $8 | 0; + var $10 = $9 & $2; + var $_sum = $10 + 4 | 0; + var $11 = $4 + $_sum | 0; + var $ret_0 = $11; + return $ret_0; + } +} +function __ZL14btAllocDefaultj($size) { + return _malloc($size); +} +function __Z22btAlignedAllocInternalji($size) { + return __ZL21btAlignedAllocDefaultji($size, 16); +} +function _malloc($bytes) { + while (1) switch (label) { + case 2: + var $189 = SAFE_HEAP_LOAD(5244020, "%struct.malloc_chunk*", 0, 0); + var $198 = $189 + 8 | 0; + var $199 = $198; + var $mem_0 = $199; + return $mem_0; + } +} +function __Znwj($size) { + while (1) switch (label) { + case 2: + var $1 = ($size | 0) == 0; + var $_size = $1 ? 1 : $size; + var $3 = _malloc($_size); + return $3; + } +} +Module.callMain = function callMain(args) { + var argc = args.length + 1; + var argv = [allocate(intArrayFromString("/bin/this.program"), 'i8', ALLOC_STATIC)]; + return Module['_main'](argc, argv, 0); +} +function run(args) { + args = args || Module['arguments']; + function doRun() { + if (Module['_main']) { + ret = Module.callMain(args); + } + } + if (Module['setStatus']) {} else { + return doRun(); + } +} +run(); diff --git a/js/src/jit-test/tests/bug847682.js b/js/src/jit-test/tests/bug847682.js new file mode 100644 index 0000000000..18c6cb49b1 --- /dev/null +++ b/js/src/jit-test/tests/bug847682.js @@ -0,0 +1,18 @@ +function computeInputVariants(len) { + var orig = ""; + var pointed = ""; + for (var i = 0; i < len; i++) { + orig += (i%10)+""; + pointed += (i%10)+"."; + } + return [orig, pointed]; +} + +function test() { + var re11 = /\./g; + for (var i=0; i < 40; i++) { + var a = computeInputVariants(i); + assertEq(a[0], a[1].replace(re11, '')) + } +} +test(); diff --git a/js/src/jit-test/tests/bug953337.js b/js/src/jit-test/tests/bug953337.js new file mode 100644 index 0000000000..a5085abdd0 --- /dev/null +++ b/js/src/jit-test/tests/bug953337.js @@ -0,0 +1,8 @@ +setJitCompilerOption("ion.warmup.trigger", 20); +Function.prototype.__proto__ = new Boolean({ get: function() {} }, {}); +function g(x, y) {} +function f() { + g.apply(this, arguments); +} +for (var i = 0; i < 130; ++i) + f(i, i*2); diff --git a/js/src/jit-test/tests/cacheir/1877684.js b/js/src/jit-test/tests/cacheir/1877684.js new file mode 100644 index 0000000000..a926db32fe --- /dev/null +++ b/js/src/jit-test/tests/cacheir/1877684.js @@ -0,0 +1,6 @@ +a = 0 +b = [ + a, + new Float64Array +] +for (c = 0; c < 10000; ++c) b[c & 1][0] = true diff --git a/js/src/jit-test/tests/cacheir/add-dense-element-non-extensible.js b/js/src/jit-test/tests/cacheir/add-dense-element-non-extensible.js new file mode 100644 index 0000000000..2958ce2283 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/add-dense-element-non-extensible.js @@ -0,0 +1,160 @@ +// Add dense elements to packed and non-packed arrays. Cover both mono- and +// polymorphic call sites. Change array to non-extensible during execution. + +function testAddDenseEmpty() { + var array = []; + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 0; i < 10; ++i) { + if (i === 5) { + Object.preventExtensions(array); + } + store(array, i); + } + + assertEq(array.length, 5); + for (var i = 0; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testAddDenseEmpty(); + +function testAddDensePacked() { + var array = [0, 1]; + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 2; i < 10; ++i) { + if (i === 5) { + Object.preventExtensions(array); + } + store(array, i); + } + + assertEq(array.length, 5); + for (var i = 0; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testAddDensePacked(); + +function testAddDenseNonPacked() { + var array = [/* hole */, 1]; + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 2; i < 10; ++i) { + if (i === 5) { + Object.preventExtensions(array); + } + store(array, i); + } + + assertEq(array.length, 5); + assertEq(0 in array, false); + for (var i = 1; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testAddDenseNonPacked(); + +function testAddDenseEmptyPoly() { + var array = []; + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 0; i < 10; ++i) { + if (i === 5) { + Object.preventExtensions(array); + } + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 5); + for (var i = 0; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testAddDenseEmptyPoly(); + +function testAddDensePackedPoly() { + var array = [0, 1]; + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 2; i < 10; ++i) { + if (i === 5) { + Object.preventExtensions(array); + } + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 5); + for (var i = 0; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testAddDensePackedPoly(); + +function testAddDenseNonPackedPoly() { + var array = [/* hole */, 1]; + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 2; i < 10; ++i) { + if (i === 5) { + Object.preventExtensions(array); + } + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 5); + assertEq(0 in array, false); + for (var i = 1; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testAddDenseNonPackedPoly(); diff --git a/js/src/jit-test/tests/cacheir/add-dense-element-non-writable-length.js b/js/src/jit-test/tests/cacheir/add-dense-element-non-writable-length.js new file mode 100644 index 0000000000..635ee07186 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/add-dense-element-non-writable-length.js @@ -0,0 +1,160 @@ +// Add dense elements to packed and non-packed arrays. Cover both mono- and +// polymorphic call sites. Change array length to non-writable during execution. + +function testAddDenseEmpty() { + var array = []; + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 0; i < 10; ++i) { + if (i === 5) { + Object.defineProperty(array, "length", {writable: false}); + } + store(array, i); + } + + assertEq(array.length, 5); + for (var i = 0; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testAddDenseEmpty(); + +function testAddDensePacked() { + var array = [0, 1]; + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 2; i < 10; ++i) { + if (i === 5) { + Object.defineProperty(array, "length", {writable: false}); + } + store(array, i); + } + + assertEq(array.length, 5); + for (var i = 0; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testAddDensePacked(); + +function testAddDenseNonPacked() { + var array = [/* hole */, 1]; + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 2; i < 10; ++i) { + if (i === 5) { + Object.defineProperty(array, "length", {writable: false}); + } + store(array, i); + } + + assertEq(array.length, 5); + assertEq(0 in array, false); + for (var i = 1; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testAddDenseNonPacked(); + +function testAddDenseEmptyPoly() { + var array = []; + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 0; i < 10; ++i) { + if (i === 5) { + Object.defineProperty(array, "length", {writable: false}); + } + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 5); + for (var i = 0; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testAddDenseEmptyPoly(); + +function testAddDensePackedPoly() { + var array = [0, 1]; + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 2; i < 10; ++i) { + if (i === 5) { + Object.defineProperty(array, "length", {writable: false}); + } + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 5); + for (var i = 0; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testAddDensePackedPoly(); + +function testAddDenseNonPackedPoly() { + var array = [/* hole */, 1]; + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 2; i < 10; ++i) { + if (i === 5) { + Object.defineProperty(array, "length", {writable: false}); + } + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 5); + assertEq(0 in array, false); + for (var i = 1; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testAddDenseNonPackedPoly(); diff --git a/js/src/jit-test/tests/cacheir/add-dense-element.js b/js/src/jit-test/tests/cacheir/add-dense-element.js new file mode 100644 index 0000000000..099e941648 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/add-dense-element.js @@ -0,0 +1,124 @@ +// Add dense elements to packed and non-packed arrays. Cover both mono- and +// polymorphic call sites. + +function testAddDenseEmpty() { + var array = []; + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 0; i < 10; ++i) { + store(array, i); + } + + assertEq(array.length, 10); + for (var i = 0; i < 10; ++i) { + assertEq(array[i], i); + } +} +testAddDenseEmpty(); + +function testAddDensePacked() { + var array = [0, 1]; + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 2; i < 10; ++i) { + store(array, i); + } + + assertEq(array.length, 10); + for (var i = 0; i < 10; ++i) { + assertEq(array[i], i); + } +} +testAddDensePacked(); + +function testAddDenseNonPacked() { + var array = [/* hole */, 1]; + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 2; i < 10; ++i) { + store(array, i); + } + + assertEq(array.length, 10); + assertEq(0 in array, false); + for (var i = 1; i < 10; ++i) { + assertEq(array[i], i); + } +} +testAddDenseNonPacked(); + +function testAddDenseEmptyPoly() { + var array = []; + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 0; i < 10; ++i) { + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 10); + for (var i = 0; i < 10; ++i) { + assertEq(array[i], i); + } +} +testAddDenseEmptyPoly(); + +function testAddDensePackedPoly() { + var array = [0, 1]; + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 2; i < 10; ++i) { + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 10); + for (var i = 0; i < 10; ++i) { + assertEq(array[i], i); + } +} +testAddDensePackedPoly(); + +function testAddDenseNonPackedPoly() { + var array = [/* hole */, 1]; + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 2; i < 10; ++i) { + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 10); + assertEq(0 in array, false); + for (var i = 1; i < 10; ++i) { + assertEq(array[i], i); + } +} +testAddDenseNonPackedPoly(); diff --git a/js/src/jit-test/tests/cacheir/add-function-prototype.js b/js/src/jit-test/tests/cacheir/add-function-prototype.js new file mode 100644 index 0000000000..e5a77d75df --- /dev/null +++ b/js/src/jit-test/tests/cacheir/add-function-prototype.js @@ -0,0 +1,55 @@ +function checkPrototype(fun, proto, resolvesPrototype) { + var desc = Object.getOwnPropertyDescriptor(fun, "prototype"); + assertEq(desc.value, proto); + assertEq(desc.configurable, !resolvesPrototype); + assertEq(desc.enumerable, !resolvesPrototype); + assertEq(desc.writable, true); +} +function addPrototype(fun, proto, resolvesPrototype) { + fun.prototype = proto; + checkPrototype(fun, proto, resolvesPrototype); +} +function test() { + for (var i=0; i<50; i++) { + addPrototype(function() {}, i, true); + addPrototype(function*() {}, i, true); + addPrototype(function async() {}, i, true); + // Builtins, arrow functions, bound functions don't have a default + // prototype property. + addPrototype(Math.abs, i, false); + addPrototype(Array.prototype.map, i, false); + addPrototype(() => 1, i, false); + addPrototype((function() {}).bind(null), i, false); + } + + // Now test this with a different IC for each function type. + for (var i=0; i<50; i++) { + var f = function() {}; + f.prototype = i; + checkPrototype(f, i, true); + + f = function*() {}; + f.prototype = i; + checkPrototype(f, i, true); + + f = function async() {}; + f.prototype = i; + checkPrototype(f, i, true); + + Math.sin.prototype = i; + checkPrototype(Math.sin, i, false); + + Array.prototype.filter.prototype = i; + checkPrototype(Array.prototype.filter, i, false); + + f = () => 1; + f.prototype = i; + checkPrototype(f, i, false); + + f = (function() {}).bind(null); + f.prototype = i; + checkPrototype(f, i, false); + } + +} +test(); diff --git a/js/src/jit-test/tests/cacheir/alloc-dense-elements.js b/js/src/jit-test/tests/cacheir/alloc-dense-elements.js new file mode 100644 index 0000000000..3013aa9ec1 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/alloc-dense-elements.js @@ -0,0 +1,9 @@ +function f() { + for (var i=0; i<100; i++) { + // Int32Array to force an IC in Ion. + var o = (i == 20) ? new Int32Array(1) : {}; + o[0] = i; + assertEq(o[0], i); + } +} +f(); diff --git a/js/src/jit-test/tests/cacheir/apply-minmax-1.js b/js/src/jit-test/tests/cacheir/apply-minmax-1.js new file mode 100644 index 0000000000..3fbf48aba0 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/apply-minmax-1.js @@ -0,0 +1,23 @@ +function testMin(arr) { + var sum = 0; + for (var i = 0; i < 50; i++) { + sum += Math.min.apply(null, arr); + } + return sum; +} + +function testMax(arr) { + var sum = 0; + for (var i = 0; i < 50; i++) { + sum += Math.max.apply(null, arr); + } + return sum; +} + +// Attach Int32MinMaxArrayResult. +assertEq(testMin([1,2,3,4,5]), 50); +assertEq(testMax([1,2,3,4,5]), 250); + +// Verify that we handle an empty list correctly. +assertEq(testMin([]), Infinity); +assertEq(testMax([]), -Infinity); diff --git a/js/src/jit-test/tests/cacheir/apply-minmax-2.js b/js/src/jit-test/tests/cacheir/apply-minmax-2.js new file mode 100644 index 0000000000..28ff687329 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/apply-minmax-2.js @@ -0,0 +1,23 @@ +function testMin(arr) { + var sum = 0; + for (var i = 0; i < 50; i++) { + sum += Math.min.apply(null, arr); + } + return sum; +} + +function testMax(arr) { + var sum = 0; + for (var i = 0; i < 50; i++) { + sum += Math.max.apply(null, arr); + } + return sum; +} + +// Attach Int32MinMaxArrayResult. +assertEq(testMin([1,2,3,4,5]), 50); +assertEq(testMax([1,2,3,4,5]), 250); + +// Verify that we handle a double element correctly. +assertEq(testMin([1,2,3.5,4,5]), 50); +assertEq(testMax([1,2,3.5,4,5]), 250); diff --git a/js/src/jit-test/tests/cacheir/apply-minmax-3.js b/js/src/jit-test/tests/cacheir/apply-minmax-3.js new file mode 100644 index 0000000000..3cfad3f958 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/apply-minmax-3.js @@ -0,0 +1,25 @@ +function testMin(arr) { + return Math.min.apply(Math, arr); +} + +function testMax(arr) { + return Math.max.apply(Math, arr); +} + +with({}) {} + +// Warp-compile. +var sum = 0; +for (var i = 0; i < 50; i++) { + sum += testMin([1, 2.5, 3]); + sum += testMax([1, 2.5, 3]); +} +assertEq(sum, 200); + +// Test min/max with no arguments. +assertEq(testMin([]), Infinity); +assertEq(testMax([]), -Infinity); + +// Test NaN. +assertEq(testMin([1,NaN]), NaN); +assertEq(testMax([1,NaN]), NaN); diff --git a/js/src/jit-test/tests/cacheir/apply-minmax-4.js b/js/src/jit-test/tests/cacheir/apply-minmax-4.js new file mode 100644 index 0000000000..fe001668f9 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/apply-minmax-4.js @@ -0,0 +1,15 @@ +function f(...rest) { + for (var i = 0; i < 100; ++i) { + rest[0] = 0; + var v = Math.max.apply(Math, rest); + + rest[0] = i; + var w = Math.max.apply(Math, rest); + + assertEq(v, 0); + assertEq(w, i); + } +} +for (var i = 0; i < 2; ++i) { + f(0, 0); +} diff --git a/js/src/jit-test/tests/cacheir/arguments-iterator-mapped.js b/js/src/jit-test/tests/cacheir/arguments-iterator-mapped.js new file mode 100644 index 0000000000..0b6024d9af --- /dev/null +++ b/js/src/jit-test/tests/cacheir/arguments-iterator-mapped.js @@ -0,0 +1,171 @@ +// Test iteration with a mapped arguments object. + +function simple() { + function f() { + var sum = 0; + for (var v of arguments) { + sum += v; + } + return sum; + } + + for (var i = 0; i < 100; ++i) { + assertEq(f(1, 2, 3), 6); + } +} +simple(); + +function spreadCall() { + function f() { + var sum = 0; + for (var v of arguments) { + sum += v; + } + return sum; + } + + function g() { + return f(...arguments); + } + + for (var i = 0; i < 100; ++i) { + assertEq(g(1, 2, 3), 6); + } +} +spreadCall(); + +function spreadArray() { + function f() { + var arr = [...arguments]; + var sum = 0; + for (var v of arr) { + sum += v; + } + return sum; + } + + for (var i = 0; i < 100; ++i) { + assertEq(f(1, 2, 3), 6); + } +} +spreadArray(); + +function reifyIterator() { + var reify = false; + function f() { + if (reify) { + // Redefining any property attributes will reify the iterator property. + Object.defineProperty(arguments, Symbol.iterator, { + writable: false + }); + } + + var sum = 0; + for (var v of arguments) { + sum += v; + } + return sum; + } + + for (var i = 0; i <= 100; ++i) { + reify = i >= 50; + assertEq(f(1, 2, 3), 6); + } +} +reifyIterator(); + +function overwriteIterator() { + var callCount = 0; + function Iterator() { + callCount += 1; + return Array.prototype[Symbol.iterator].call(this); + } + + var overwrite = false; + function f() { + if (overwrite) { + arguments[Symbol.iterator] = Iterator; + } + + var sum = 0; + for (var v of arguments) { + sum += v; + } + return sum; + } + + for (var i = 0; i <= 100; ++i) { + overwrite = i > 50; + assertEq(f(1, 2, 3), 6); + } + assertEq(callCount, 50); +} +overwriteIterator(); + +function deleteIterator() { + var remove = false; + function f() { + // Deleting Symbol.iterator won't change the shape of the arguments object. + // That's why we need to use a separate guard instruction to check if the + // iterator property was modified. + if (remove) { + delete arguments[Symbol.iterator]; + } + + var sum = 0; + for (var v of arguments) { + sum += v; + } + return sum; + } + + var error; + try { + for (var i = 0; i <= 100; ++i) { + remove = i === 100; + assertEq(f(1, 2, 3), 6); + } + } catch (e) { + error = e; + } + assertEq(error instanceof TypeError, true); +} +deleteIterator(); + +function deleteIteratorInherit() { + var callCount = 0; + function Iterator() { + callCount += 1; + return Array.prototype[Symbol.iterator].call(this); + } + + Object.prototype[Symbol.iterator] = Iterator; + + var remove = false; + function f() { + // Deleting Symbol.iterator won't change the shape of the arguments object. + // That's why we need to use a separate guard instruction to check if the + // iterator property was modified. + if (remove) { + delete arguments[Symbol.iterator]; + } + + var sum = 0; + for (var v of arguments) { + sum += v; + } + return sum; + } + + for (var i = 0; i <= 100; ++i) { + remove = i === 100; + assertEq(f(1, 2, 3), 6); + } + assertEq(callCount, 1); + + delete Object.prototype[Symbol.iterator]; +} +deleteIteratorInherit(); + +// Don't add tests below this point because |Object.prototype[Symbol.iterator]| +// was modified, which may lead to engine-wide deoptimisations. diff --git a/js/src/jit-test/tests/cacheir/arguments-iterator-unmapped.js b/js/src/jit-test/tests/cacheir/arguments-iterator-unmapped.js new file mode 100644 index 0000000000..29b2163596 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/arguments-iterator-unmapped.js @@ -0,0 +1,184 @@ +// Test iteration with an unmapped arguments object. + +function simple() { + function f() { + "use strict"; + + var sum = 0; + for (var v of arguments) { + sum += v; + } + return sum; + } + + for (var i = 0; i < 100; ++i) { + assertEq(f(1, 2, 3), 6); + } +} +simple(); + +function spreadCall() { + function f() { + var sum = 0; + for (var v of arguments) { + sum += v; + } + return sum; + } + + function g() { + "use strict"; + return f(...arguments); + } + + for (var i = 0; i < 100; ++i) { + assertEq(g(1, 2, 3), 6); + } +} +spreadCall(); + +function spreadArray() { + function f() { + "use strict"; + + var arr = [...arguments]; + var sum = 0; + for (var v of arr) { + sum += v; + } + return sum; + } + + for (var i = 0; i < 100; ++i) { + assertEq(f(1, 2, 3), 6); + } +} +spreadArray(); + +function reifyIterator() { + var reify = false; + function f() { + "use strict"; + + if (reify) { + // Redefining any property attributes will reify the iterator property. + Object.defineProperty(arguments, Symbol.iterator, { + writable: false + }); + } + + var sum = 0; + for (var v of arguments) { + sum += v; + } + return sum; + } + + for (var i = 0; i <= 100; ++i) { + reify = i >= 50; + assertEq(f(1, 2, 3), 6); + } +} +reifyIterator(); + +function overwriteIterator() { + var callCount = 0; + function Iterator() { + callCount += 1; + return Array.prototype[Symbol.iterator].call(this); + } + + var overwrite = false; + function f() { + "use strict"; + + if (overwrite) { + arguments[Symbol.iterator] = Iterator; + } + + var sum = 0; + for (var v of arguments) { + sum += v; + } + return sum; + } + + for (var i = 0; i <= 100; ++i) { + overwrite = i > 50; + assertEq(f(1, 2, 3), 6); + } + assertEq(callCount, 50); +} +overwriteIterator(); + +function deleteIterator() { + var remove = false; + function f() { + "use strict"; + + // Deleting Symbol.iterator won't change the shape of the arguments object. + // That's why we need to use a separate guard instruction to check if the + // iterator property was modified. + if (remove) { + delete arguments[Symbol.iterator]; + } + + var sum = 0; + for (var v of arguments) { + sum += v; + } + return sum; + } + + var error; + try { + for (var i = 0; i <= 100; ++i) { + remove = i === 100; + assertEq(f(1, 2, 3), 6); + } + } catch (e) { + error = e; + } + assertEq(error instanceof TypeError, true); +} +deleteIterator(); + +function deleteIteratorInherit() { + var callCount = 0; + function Iterator() { + callCount += 1; + return Array.prototype[Symbol.iterator].call(this); + } + + Object.prototype[Symbol.iterator] = Iterator; + + var remove = false; + function f() { + "use strict"; + + // Deleting Symbol.iterator won't change the shape of the arguments object. + // That's why we need to use a separate guard instruction to check if the + // iterator property was modified. + if (remove) { + delete arguments[Symbol.iterator]; + } + + var sum = 0; + for (var v of arguments) { + sum += v; + } + return sum; + } + + for (var i = 0; i <= 100; ++i) { + remove = i === 100; + assertEq(f(1, 2, 3), 6); + } + assertEq(callCount, 1); + + delete Object.prototype[Symbol.iterator]; +} +deleteIteratorInherit(); + +// Don't add tests below this point because |Object.prototype[Symbol.iterator]| +// was modified, which may lead to engine-wide deoptimisations. diff --git a/js/src/jit-test/tests/cacheir/array-slice.js b/js/src/jit-test/tests/cacheir/array-slice.js new file mode 100644 index 0000000000..2ed43926ff --- /dev/null +++ b/js/src/jit-test/tests/cacheir/array-slice.js @@ -0,0 +1,39 @@ +function packed() { + var a = [0, 1, 2, 3]; + for (var i = 0; i <= 100; ++i) { + var r = a.slice(0); + assertEq(r.length, 4); + } +} + +for (var i = 0; i < 2; ++i) { + packed(); +} + +function packedThenUnpacked() { + var a = [0, 1, 2, 3]; + var q = 0; + for (var i = 0; i <= 100; ++i) { + if (i === 100) a[10] = 0; + + var r = a.slice(0); + assertEq(r.length, i < 100 ? 4 : 11); + } +} + +for (var i = 0; i < 2; ++i) { + packedThenUnpacked(); +} + +function unpacked() { + var a = [0, 1, /* hole */ , 3]; + for (var i = 0; i <= 100; ++i) { + var r = a.slice(0); + assertEq(r.length, 4); + assertEq(2 in r, false); + } +} + +for (var i = 0; i < 2; ++i) { + unpacked(); +} diff --git a/js/src/jit-test/tests/cacheir/atomics-store-non-number-value.js b/js/src/jit-test/tests/cacheir/atomics-store-non-number-value.js new file mode 100644 index 0000000000..3165bd7940 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/atomics-store-non-number-value.js @@ -0,0 +1,123 @@ +const types = [ + "Int8", + "Int16", + "Int32", + "Uint8", + "Uint16", + "Uint32", +]; + +function convert(type, value) { + let num = Number(value); + switch (type) { + case "Int8": + return ((num | 0) << 24) >> 24; + case "Int16": + return ((num | 0) << 16) >> 16; + case "Int32": + return (num | 0); + case "Uint8": + return (num >>> 0) & 0xff; + case "Uint16": + return (num >>> 0) & 0xffff; + case "Uint32": + return (num >>> 0); + case "Uint8Clamped": { + if (Number.isNaN(num)) { + return 0; + } + let clamped = Math.max(0, Math.min(num, 255)); + let f = Math.floor(clamped); + if (clamped < f + 0.5) { + return f; + } + if (clamped > f + 0.5) { + return f + 1; + } + return f + (f & 1); + } + case "Float32": + return Math.fround(num); + case "Float64": + return num; + } + throw new Error(); +} + + +function runTest(type, initial, values) { + let expected = values.map(v => convert(type, v)); + assertEq( + expected.some(e => Object.is(e, initial)), + false, + "initial must be different from the expected values" + ); + + // Create a fresh function to ensure ICs are specific to a single TypedArray kind. + let test = Function("initial, values, expected", ` + let ta = new ${type}Array(1); + for (let i = 0; i < 200; ++i) { + ta[0] = initial; + Atomics.store(ta, 0, values[i % values.length]); + assertEq(ta[0], expected[i % expected.length]); + } + `); + test(initial, values, expected); +} + +const tests = [ + // |null| is coerced to zero. + { + initial: 1, + values: [null], + }, + + // |undefined| is coerced to zero or NaN. + { + initial: 1, + values: [undefined], + }, + + // |false| is coerced to zero and |true| is coerced to one. + { + initial: 2, + values: [false, true], + }, + + // Strings without a fractional part. + { + initial: 42, + values: [ + "0", "1", "10", "111", "128", "256", "0x7fffffff", "0xffffffff", + ], + }, + + // Strings without a fractional part, but a leading minus sign. + { + initial: 42, + values: [ + "-0", "-1", "-10", "-111", "-128", "-256", "-2147483647", "-4294967295", + ], + }, + + // Strings with a fractional number part. + { + initial: 42, + values: [ + "0.1", "1.2", "10.8", "111.9", + "-0.1", "-1.2", "-10.8", "-111.9", + ], + }, + + // Special values and strings not parseable as a number. + { + initial: 42, + values: ["Infinity", "-Infinity", "NaN", "foobar"], + }, +]; + +for (let type of types) { + for (let {initial, values} of tests) { + runTest(type, initial, values); + } +} diff --git a/js/src/jit-test/tests/cacheir/bigint-binary.js b/js/src/jit-test/tests/cacheir/bigint-binary.js new file mode 100644 index 0000000000..773178cc3c --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bigint-binary.js @@ -0,0 +1,190 @@ +var xs = [ + // Definitely heap digits. + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, +]; + +function testAdd() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = xs[xs.length - 1 - j]; + + assertEq(x + 0n, x); + assertEq(x + y, 0n); + } +} +testAdd(); + +function testSub() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = xs[xs.length - 1 - j]; + + assertEq(x - 0n, x); + assertEq(x - (-y), 0n); + } +} +testSub(); + +function testMul() { + for (var i = 0; i < 100; ++i) { + var x = xs[i % xs.length]; + + assertEq(x * 0n, 0n); + assertEq(x * 1n, x); + assertEq(x * (-1n), -x); + } +} +testMul(); + +function testDiv() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + + // Don't divide by zero. + if (j === xs.length >> 1) { + assertEq(x / 1n, 0n); + continue; + } + + assertEq(x / x, 1n); + assertEq(x / 1n, x); + } +} +testDiv(); + +function testMod() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + + // Don't divide by zero. + if (j === xs.length >> 1) { + assertEq(x / 1n, 0n); + continue; + } + + assertEq(x % x, 0n); + assertEq(x % 1n, 0n); + } +} +testMod(); + +function testPow() { + for (var i = 0; i < 100; ++i) { + var x = xs[i % xs.length]; + + assertEq(x ** 0n, 1n); + assertEq(x ** 1n, x); + } +} +testPow(); + +function testBitAnd() { + for (var i = 0; i < 100; ++i) { + var x = xs[i % xs.length]; + + assertEq(x & x, x); + assertEq(x & 0n, 0n); + } +} +testBitAnd(); + +function testBitOr() { + for (var i = 0; i < 100; ++i) { + var x = xs[i % xs.length]; + + assertEq(x | x, x); + assertEq(x | 0n, x); + } +} +testBitOr(); + +function testBitXor() { + for (var i = 0; i < 100; ++i) { + var x = xs[i % xs.length]; + + assertEq(x ^ x, 0n); + assertEq(x ^ 0n, x); + } +} +testBitXor(); + +function testLeftShift() { + for (var i = 0; i < 100; ++i) { + var x = xs[i % xs.length]; + + assertEq(x << 0n, x); + assertEq(x << 1n, x * 2n); + if (x >= 0n || !(x & 1n)) { + assertEq(x << -1n, x / 2n); + } else { + assertEq(x << -1n, (x / 2n) - 1n); + } + } +} +testLeftShift(); + +function testRightShift() { + for (var i = 0; i < 100; ++i) { + var x = xs[i % xs.length]; + + assertEq(x >> 0n, x); + if (x >= 0n || !(x & 1n)) { + assertEq(x >> 1n, x / 2n); + } else { + assertEq(x >> 1n, (x / 2n) - 1n); + } + assertEq(x >> -1n, x * 2n); + } +} +testRightShift(); diff --git a/js/src/jit-test/tests/cacheir/bigint-compare-double.js b/js/src/jit-test/tests/cacheir/bigint-compare-double.js new file mode 100644 index 0000000000..ea61e4c558 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bigint-compare-double.js @@ -0,0 +1,209 @@ +// Same test as bigint-compare-number, except that the inputs are always Double typed. + +// Test various combinations of (BigInt R Double) and ensures the result is consistent with +// (Double R⁻¹ BigInt). This test doesn't aim to cover the overall correctness of (BigInt R Double), +// but merely ensures the possible combinations are properly handled in CacheIR. + +var xs = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +function Double(x) { + // numberToDouble always returns a Double valued number. + return numberToDouble(x); +} + +// Compute the Double approximation of the BigInt values. +var ys = xs.map(x => Double(Number(x))); + +// Compute if the Double approximation of the BigInt values is exact. +// (The larger test values are all powers of two, so we can keep this function simple.) +var zs = xs.map(x => { + var isNegative = x < 0n; + if (isNegative) { + x = -x; + } + var s = x.toString(2); + if (s.length <= 53 || (s.length <= 1024 && /^1+0+$/.test(s))) { + return 0; + } + if (s.length <= 1024 && /^1+$/.test(s)) { + return isNegative ? -1 : 1; + } + if (s.length <= 1024 && /^1+0+1$/.test(s)) { + return isNegative ? 1 : -1; + } + return NaN; +}); + +function testLooseEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + assertEq(x == y, z === 0); + assertEq(y == x, z === 0); + } +} +testLooseEqual(); + +function testLooseNotEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + assertEq(x != y, z !== 0); + assertEq(y != x, z !== 0); + } +} +testLooseNotEqual(); + +function testLessThan() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + if (z === 0) { + assertEq(x < y, false); + assertEq(y < x, false); + } else if (z > 0) { + assertEq(x < y, true); + assertEq(y < x, false); + } else if (z < 0) { + assertEq(x < y, false); + assertEq(y < x, true); + } else { + assertEq(x < y, y > 0); + assertEq(y < x, y < 0); + } + } +} +testLessThan(); + +function testLessThanEquals() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + if (z === 0) { + assertEq(x <= y, true); + assertEq(y <= x, true); + } else if (z > 0) { + assertEq(x <= y, true); + assertEq(y <= x, false); + } else if (z < 0) { + assertEq(x <= y, false); + assertEq(y <= x, true); + } else { + assertEq(x <= y, y > 0); + assertEq(y <= x, y < 0); + } + } +} +testLessThanEquals(); + +function testGreaterThan() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + if (z === 0) { + assertEq(x > y, false); + assertEq(y > x, false); + } else if (z > 0) { + assertEq(x > y, false); + assertEq(y > x, true); + } else if (z < 0) { + assertEq(x > y, true); + assertEq(y > x, false); + } else { + assertEq(x > y, y < 0); + assertEq(y > x, y > 0); + } + } +} +testGreaterThan(); + +function testGreaterThanEquals() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + if (z === 0) { + assertEq(x >= y, true); + assertEq(y >= x, true); + } else if (z > 0) { + assertEq(x >= y, false); + assertEq(y >= x, true); + } else if (z < 0) { + assertEq(x >= y, true); + assertEq(y >= x, false); + } else { + assertEq(x >= y, y < 0); + assertEq(y >= x, y > 0); + } + } +} +testGreaterThanEquals(); diff --git a/js/src/jit-test/tests/cacheir/bigint-compare-int32.js b/js/src/jit-test/tests/cacheir/bigint-compare-int32.js new file mode 100644 index 0000000000..16f6a31ad0 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bigint-compare-int32.js @@ -0,0 +1,258 @@ +// Extensive test for (BigInt R Int32) comparison operations, testing the output +// is correct and consistent with (Int32 R⁻¹ BigInt). + +function gcd(a, b) { + a |= 0; + b |= 0; + while (b !== 0) { + [a, b] = [b, a % b]; + } + return Math.abs(a); +} + +const ITERATIONS = 150; + +function assertAllCombinationsTested(xs, ys, n) { + // If the array lengths are relatively prime and their product is at least + // |n| long, all possible combinations are tested at least once. Make sure + // we test each combination at least three times. + var m = 3; + + assertEq(gcd(xs.length, ys.length), 1); + assertEq(m * xs.length * ys.length <= n, true); +} + +function LessThan(xs, ys, n = ITERATIONS) { + assertAllCombinationsTested(xs, ys, n); + for (var i = 0; i < n; ++i) { + var x = xs[i % xs.length]; + var y = ys[i % ys.length]|0; // Ensure int32 typed + + assertEq(x == y, false); + assertEq(y == x, false); + + assertEq(x != y, true); + assertEq(y != x, true); + + assertEq(x < y, true); + assertEq(y < x, false); + + assertEq(x <= y, true); + assertEq(y <= x, false); + + assertEq(x > y, false); + assertEq(y > x, true); + + assertEq(x >= y, false); + assertEq(y >= x, true); + } +} + +function GreaterThan(xs, ys, n = ITERATIONS) { + assertAllCombinationsTested(xs, ys, n); + for (var i = 0; i < n; ++i) { + var x = xs[i % xs.length]; + var y = ys[i % ys.length]|0; // Ensure int32 typed + + assertEq(x == y, false); + assertEq(y == x, false); + + assertEq(x != y, true); + assertEq(y != x, true); + + assertEq(x < y, false); + assertEq(y < x, true); + + assertEq(x <= y, false); + assertEq(y <= x, true); + + assertEq(x > y, true); + assertEq(y > x, false); + + assertEq(x >= y, true); + assertEq(y >= x, false); + } +} + +function Equal(xs, ys, n = ITERATIONS) { + assertAllCombinationsTested(xs, ys, n); + for (var i = 0; i < n; ++i) { + var x = xs[i % xs.length]; + var y = ys[i % ys.length]|0; // Ensure int32 typed + + assertEq(x == y, true); + assertEq(y == x, true); + + assertEq(x != y, false); + assertEq(y != x, false); + + assertEq(x < y, false); + assertEq(y < x, false); + + assertEq(x <= y, true); + assertEq(y <= x, true); + + assertEq(x > y, false); + assertEq(y > x, false); + + assertEq(x >= y, true); + assertEq(y >= x, true); + } +} + +function test(fn) { + // Clone the test function to ensure a new function is compiled each time. + return Function(`return ${fn}`)(); +} + +const negativeInt32 = [-2147483648, -2147483647, -1]; +const zeroInt32 = [0]; +const positiveInt32 = [1, 2147483646, 2147483647]; +const zeroOrPositiveInt32 = [...zeroInt32, ...positiveInt32]; +const anyInt32 = [...negativeInt32, ...zeroInt32, ...positiveInt32]; + +// Test when the BigInt is too large to be representable as a single BigInt digit. +function testLarge() { + var xs = [ + 2n ** 32n, // exceeds single digit limit on 32-bit + 2n ** 64n, // exceeds single digit limit on 64-bit + 2n ** 96n, // not a single digit on either platform + ]; + test(GreaterThan)(xs, anyInt32); + + var xs = [ + -(2n ** 32n), // exceeds single digit limit on 32-bit + -(2n ** 64n), // exceeds single digit limit on 64-bit + -(2n ** 96n), // not a single digit on either platform + ]; + test(LessThan)(xs, anyInt32); +} +testLarge(); + +// Test when the BigInt is 0n. +function testZero() { + var xs = [ + 0n + ]; + + test(GreaterThan)(xs, negativeInt32); + test(Equal)(xs, zeroInt32); + test(LessThan)(xs, positiveInt32); +} +testZero(); + +// Test when both numbers are negative. +function testNegative() { + var xs = [ + -(2n ** 64n) - 2n, + -(2n ** 64n) - 1n, // Max negative using a single BigInt digit on 64-bit. + -(2n ** 64n), + + -(2n ** 32n) - 2n, + -(2n ** 32n) - 1n, // Max negative using a single BigInt digit on 32-bit. + -(2n ** 32n), + + -(2n ** 31n) - 1n, // One past max negative for Int32. + ]; + test(LessThan)(xs, negativeInt32); + + var xs = [ + -(2n ** 31n), // Max negative for Int32. + ]; + test(Equal)(xs, [-2147483648]); + test(LessThan)(xs, [-2147483647, -1]); + + var xs = [ + -(2n ** 31n) + 1n, + ]; + test(GreaterThan)(xs, [-2147483648]); + test(Equal)(xs, [-2147483647]); + test(LessThan)(xs, [-1]); + + var xs = [ + -1n, + ]; + test(GreaterThan)(xs, [-2147483648, -2147483647]); + test(Equal)(xs, [-1]); +} +testNegative(); + +// Test when both numbers are positive (and BigInt strictly positive). +function testPositive() { + var xs = [ + 1n, + ]; + test(GreaterThan)(xs, [0]); + test(Equal)(xs, [1]); + test(LessThan)(xs, [2147483646, 2147483647]); + + var xs = [ + 2n ** 31n - 2n, + ]; + test(GreaterThan)(xs, [0, 1]); + test(Equal)(xs, [2147483646]); + test(LessThan)(xs, [2147483647]); + + var xs = [ + 2n ** 31n - 1n, // Max positive for Int32. + ]; + test(GreaterThan)(xs, [0, 1, 2147483646]); + test(Equal)(xs, [2147483647]); + + var xs = [ + 2n ** 31n, // One past max positive for Int32. + + 2n ** 32n - 2n, + 2n ** 32n - 1n, // Max positive using a single BigInt digit on 32-bit. + 2n ** 32n, + + 2n ** 64n - 2n, + 2n ** 64n - 1n, // Max positive using a single BigInt digit on 64-bit. + 2n ** 64n, + ]; + test(GreaterThan)(xs, zeroOrPositiveInt32); +} +testPositive(); + +// Test negative BigInt and positive Int32. +function testNegativePositive() { + var xs = [ + -(2n ** 64n) - 2n, + -(2n ** 64n) - 1n, // Max negative using a single BigInt digit on 64-bit. + -(2n ** 64n), + + -(2n ** 32n) - 2n, + -(2n ** 32n) - 1n, // Max negative using a single BigInt digit on 32-bit. + -(2n ** 32n), + + -(2n ** 31n) - 1n, + -(2n ** 31n), // Max negative for Int32. + -(2n ** 31n) + 1n, + + -2n, // Extra entry to ensure assertAllCombinationsTested passes. + -1n, + ]; + test(LessThan)(xs, zeroOrPositiveInt32); +} +testNegativePositive(); + +// Test (strictly) positive BigInt and negative Int32. +function testPositiveNegative() { + var xs = [ + 1n, + + 2n ** 31n - 2n, + 2n ** 31n - 1n, // Max positive for Int32. + 2n ** 31n, + + 2n ** 32n - 2n, + 2n ** 32n - 1n, // Max positive using a single BigInt digit on 32-bit. + 2n ** 32n, + + 2n ** 64n - 2n, + 2n ** 64n - 1n, // Max positive using a single BigInt digit on 64-bit. + 2n ** 64n, + ]; + test(GreaterThan)(xs, negativeInt32); +} +testPositiveNegative(); diff --git a/js/src/jit-test/tests/cacheir/bigint-compare-null-or-undef.js b/js/src/jit-test/tests/cacheir/bigint-compare-null-or-undef.js new file mode 100644 index 0000000000..9314b88747 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bigint-compare-null-or-undef.js @@ -0,0 +1,82 @@ +// Test relational comparison when one operand is null or undefined. + +function test(xs) { + for (let i = 0; i < 200; ++i) { + let x = xs[i % xs.length]; + + // The result is equal when compared to the result with explicit ToNumber conversions. + + // Test when null-or-undefined is on the right-hand side. + assertEq(x < nullOrUndef, x < (+nullOrUndef)); + assertEq(x <= nullOrUndef, x <= (+nullOrUndef)); + assertEq(x >= nullOrUndef, x >= (+nullOrUndef)); + assertEq(x > nullOrUndef, x > (+nullOrUndef)); + + // Test when null-or-undefined is on the left-hand side. + assertEq(nullOrUndef < x, (+nullOrUndef) < x); + assertEq(nullOrUndef <= x, (+nullOrUndef) <= x); + assertEq(nullOrUndef >= x, (+nullOrUndef) >= x); + assertEq(nullOrUndef > x, (+nullOrUndef) > x); + } +} + +function runTest(inputs) { + let fNull = Function(`return ${test}`.replaceAll("nullOrUndef", "null"))(); + fNull(inputs); + + let fUndefined = Function(`return ${test}`.replaceAll("nullOrUndef", "undefined"))(); + fUndefined(inputs); +} + +// BigInt inputs +runTest([ + // Definitely heap digits. + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, +]); diff --git a/js/src/jit-test/tests/cacheir/bigint-compare-number.js b/js/src/jit-test/tests/cacheir/bigint-compare-number.js new file mode 100644 index 0000000000..9eefaf5053 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bigint-compare-number.js @@ -0,0 +1,205 @@ +// Same test as bigint-compare-double, except that the inputs are allowed to be any number, i.e. +// either Int32 or Double. + +// Test various combinations of (BigInt R Number) and ensures the result is consistent with +// (Number R⁻¹ BigInt). This test doesn't aim to cover the overall correctness of (BigInt R Number), +// but merely ensures the possible combinations are properly handled in CacheIR. + +var xs = [ + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, +]; + +// Compute the Number approximation of the BigInt values. +var ys = xs.map(x => Number(x)); + +// Compute if the Number approximation of the BigInt values is exact. +// (The larger test values are all powers of two, so we can keep this function simple.) +var zs = xs.map(x => { + var isNegative = x < 0n; + if (isNegative) { + x = -x; + } + var s = x.toString(2); + if (s.length <= 53 || (s.length <= 1024 && /^1+0+$/.test(s))) { + return 0; + } + if (s.length <= 1024 && /^1+$/.test(s)) { + return isNegative ? -1 : 1; + } + if (s.length <= 1024 && /^1+0+1$/.test(s)) { + return isNegative ? 1 : -1; + } + return NaN; +}); + +function testLooseEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + assertEq(x == y, z === 0); + assertEq(y == x, z === 0); + } +} +testLooseEqual(); + +function testLooseNotEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + assertEq(x != y, z !== 0); + assertEq(y != x, z !== 0); + } +} +testLooseNotEqual(); + +function testLessThan() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + if (z === 0) { + assertEq(x < y, false); + assertEq(y < x, false); + } else if (z > 0) { + assertEq(x < y, true); + assertEq(y < x, false); + } else if (z < 0) { + assertEq(x < y, false); + assertEq(y < x, true); + } else { + assertEq(x < y, y > 0); + assertEq(y < x, y < 0); + } + } +} +testLessThan(); + +function testLessThanEquals() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + if (z === 0) { + assertEq(x <= y, true); + assertEq(y <= x, true); + } else if (z > 0) { + assertEq(x <= y, true); + assertEq(y <= x, false); + } else if (z < 0) { + assertEq(x <= y, false); + assertEq(y <= x, true); + } else { + assertEq(x <= y, y > 0); + assertEq(y <= x, y < 0); + } + } +} +testLessThanEquals(); + +function testGreaterThan() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + if (z === 0) { + assertEq(x > y, false); + assertEq(y > x, false); + } else if (z > 0) { + assertEq(x > y, false); + assertEq(y > x, true); + } else if (z < 0) { + assertEq(x > y, true); + assertEq(y > x, false); + } else { + assertEq(x > y, y < 0); + assertEq(y > x, y > 0); + } + } +} +testGreaterThan(); + +function testGreaterThanEquals() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + if (z === 0) { + assertEq(x >= y, true); + assertEq(y >= x, true); + } else if (z > 0) { + assertEq(x >= y, false); + assertEq(y >= x, true); + } else if (z < 0) { + assertEq(x >= y, true); + assertEq(y >= x, false); + } else { + assertEq(x >= y, y < 0); + assertEq(y >= x, y > 0); + } + } +} +testGreaterThanEquals(); diff --git a/js/src/jit-test/tests/cacheir/bigint-compare-string.js b/js/src/jit-test/tests/cacheir/bigint-compare-string.js new file mode 100644 index 0000000000..c5937af6aa --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bigint-compare-string.js @@ -0,0 +1,189 @@ +// Test various combinations of (BigInt R String) and ensures the result is consistent with +// (String R⁻¹ BigInt). This test doesn't aim to cover the overall correctness of (BigInt R String), +// but merely ensures the possible combinations are properly handled in CacheIR. + +var xs = [ + // One before the minimum + -(2n ** 2000n) - 1n, + + // Definitely heap digits. + -(2n ** 2000n), + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, + 2n ** 2000n, + + // One past the maximum + (2n ** 2000n) + 1n, +]; + +function idx(i) { + return (i % (xs.length - 2)) + 1; +} + +var ys = xs.map(x => String(x)); + +function testLooseEqual() { + for (var i = 0; i < 100; ++i) { + var j = idx(i); + var x = xs[j]; + var y = ys[j]; + var u = ys[j - 1]; + var v = ys[j + 1]; + + assertEq(x == y, true); + assertEq(y == x, true); + + assertEq(x == u, false); + assertEq(u == x, false); + + assertEq(x == v, false); + assertEq(v == x, false); + } +} +testLooseEqual(); + +function testLooseNotEqual() { + for (var i = 0; i < 100; ++i) { + var j = idx(i); + var x = xs[j]; + var y = ys[j]; + var u = ys[j - 1]; + var v = ys[j + 1]; + + assertEq(x != y, false); + assertEq(y != x, false); + + assertEq(x != u, true); + assertEq(u != x, true); + + assertEq(x != v, true); + assertEq(v != x, true); + } +} +testLooseNotEqual(); + +function testLessThan() { + for (var i = 0; i < 100; ++i) { + var j = idx(i); + var x = xs[j]; + var y = ys[j]; + var u = ys[j - 1]; + var v = ys[j + 1]; + + assertEq(x < y, false); + assertEq(y < x, false); + + assertEq(x < u, false); + assertEq(u < x, true); + + assertEq(x < v, true); + assertEq(v < x, false); + } +} +testLessThan(); + +function testLessThanEquals() { + for (var i = 0; i < 100; ++i) { + var j = idx(i); + var x = xs[j]; + var y = ys[j]; + var u = ys[j - 1]; + var v = ys[j + 1]; + + assertEq(x <= y, true); + assertEq(y <= x, true); + + assertEq(x <= u, false); + assertEq(u <= x, true); + + assertEq(x <= v, true); + assertEq(v <= x, false); + } +} +testLessThanEquals(); + +function testGreaterThan() { + for (var i = 0; i < 100; ++i) { + var j = idx(i); + var x = xs[j]; + var y = ys[j]; + var u = ys[j - 1]; + var v = ys[j + 1]; + + assertEq(x > y, false); + assertEq(y > x, false); + + assertEq(x > u, true); + assertEq(u > x, false); + + assertEq(x > v, false); + assertEq(v > x, true); + } +} +testGreaterThan(); + +function testGreaterThanEquals() { + for (var i = 0; i < 100; ++i) { + var j = idx(i); + var x = xs[j]; + var y = ys[j]; + var u = ys[j - 1]; + var v = ys[j + 1]; + + assertEq(x >= y, true); + assertEq(y >= x, true); + + assertEq(x >= u, true); + assertEq(u >= x, false); + + assertEq(x >= v, false); + assertEq(v >= x, true); + } +} +testGreaterThanEquals(); diff --git a/js/src/jit-test/tests/cacheir/bigint-compare.js b/js/src/jit-test/tests/cacheir/bigint-compare.js new file mode 100644 index 0000000000..a67d2722d3 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bigint-compare.js @@ -0,0 +1,163 @@ +// Test various combinations of (BigInt R BigInt) and ensures the result is consistent with +// (BigInt R⁻¹ BigInt). This test doesn't aim to cover the overall correctness of (BigInt R BigInt), +// but merely ensures the possible combinations are properly handled in CacheIR. + +var xs = [ + // Definitely heap digits. + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, +]; + +function testLooseEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var isZero = j === xs.length >> 1; + + assertEq(x == x, true); + assertEq(x == 0n, isZero); + assertEq(0n == x, isZero); + } +} +testLooseEqual(); + +function testStrictEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var isZero = j === xs.length >> 1; + + assertEq(x === x, true); + assertEq(x === 0n, isZero); + assertEq(0n === x, isZero); + } +} +testStrictEqual(); + +function testLooseNotEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var isZero = j === xs.length >> 1; + + assertEq(x != x, false); + assertEq(x != 0n, !isZero); + assertEq(0n != x, !isZero); + } +} +testLooseNotEqual(); + +function testStrictNotEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var isZero = j === xs.length >> 1; + + assertEq(x !== x, false); + assertEq(x !== 0n, !isZero); + assertEq(0n !== x, !isZero); + } +} +testStrictNotEqual(); + +function testLessThan() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var isNegative = j < (xs.length >> 1); + var isPositive = j > (xs.length >> 1); + + assertEq(x < x, false); + assertEq(x < 0n, isNegative); + assertEq(0n < x, isPositive); + } +} +testLessThan(); + +function testLessThanEquals() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var isNegativeOrZero = j <= (xs.length >> 1); + var isPositiveOrZero = j >= (xs.length >> 1); + + assertEq(x <= x, true); + assertEq(x <= 0n, isNegativeOrZero); + assertEq(0n <= x, isPositiveOrZero); + } +} +testLessThanEquals(); + +function testGreaterThan() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var isNegative = j < (xs.length >> 1); + var isPositive = j > (xs.length >> 1); + + assertEq(x > x, false); + assertEq(x > 0n, isPositive); + assertEq(0n > x, isNegative); + } +} +testGreaterThan(); + +function testGreaterThanEquals() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var isNegativeOrZero = j <= (xs.length >> 1); + var isPositiveOrZero = j >= (xs.length >> 1); + + assertEq(x >= x, true); + assertEq(x >= 0n, isPositiveOrZero); + assertEq(0n >= x, isNegativeOrZero); + } +} +testGreaterThanEquals(); diff --git a/js/src/jit-test/tests/cacheir/bigint-tobool.js b/js/src/jit-test/tests/cacheir/bigint-tobool.js new file mode 100644 index 0000000000..806cb55731 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bigint-tobool.js @@ -0,0 +1,72 @@ +var xs = [ + // Definitely heap digits. + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483649n, + 2147483648n, + 2147483647n, + + // 2**32 + 4294967297n, + 4294967296n, + 4294967295n, + + // 2n**63n + 9223372036854775809n, + 9223372036854775808n, + 9223372036854775807n, + + // 2n**64n + 18446744073709551617n, + 18446744073709551616n, + 18446744073709551615n, + + // Definitely heap digits. + 2n ** 1000n, +]; + +function test() { + for (var i = 0; i < 100; ++i) { + var x = xs[i % xs.length]; + + // Implicit ToBool(x) + var r = x ? true : false; + assertEq(r, x !== 0n); + } +} +test(); + +function testNot() { + for (var i = 0; i < 100; ++i) { + var x = xs[i % xs.length]; + + var r = !x; + assertEq(r, x === 0n); + } +} +testNot(); diff --git a/js/src/jit-test/tests/cacheir/bigint-unary.js b/js/src/jit-test/tests/cacheir/bigint-unary.js new file mode 100644 index 0000000000..75e67a7d53 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bigint-unary.js @@ -0,0 +1,135 @@ +var xs = [ + // Definitely heap digits. + -(2n ** 1000n), + + // -(2n**64n) + -18446744073709551617n, + -18446744073709551616n, + -18446744073709551615n, + + // -(2n**63n) + -9223372036854775809n, + -9223372036854775808n, + -9223372036854775807n, + + // -(2**32) + -4294967297n, + -4294967296n, + -4294967295n, + + // -(2**31) + -2147483649n, + -2147483648n, + -2147483647n, + + -1n, + 0n, + 1n, + + // 2**31 + 2147483647n, + 2147483648n, + 2147483649n, + + // 2**32 + 4294967295n, + 4294967296n, + 4294967297n, + + // 2n**63n + 9223372036854775807n, + 9223372036854775808n, + 9223372036854775809n, + + // 2n**64n + 18446744073709551615n, + 18446744073709551616n, + 18446744073709551617n, + + // Definitely heap digits. + 2n ** 1000n, +]; + +function testNeg() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = xs[xs.length - 1 - j]; + + assertEq(-x, y); + } +} +testNeg(); + +function testBitNot() { + var ys = xs.map(x => -(x + 1n)); + + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + + assertEq(~x, y); + } +} +testBitNot(); + +function testPreInc() { + var ys = xs.map(x => x + 1n); + + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + + var r = ++x; + assertEq(x, y); + assertEq(r, y); + } +} +testPostInc(); + +function testPostInc() { + var ys = xs.map(x => x + 1n); + + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + + var r = x++; + assertEq(x, y); + assertEq(r, xs[j]); + } +} +testPostInc(); + +function testPreDec() { + var ys = xs.map(x => x - 1n); + + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + + var r = --x; + assertEq(x, y); + assertEq(r, y); + } +} +testPostDec(); + +function testPostDec() { + var ys = xs.map(x => x - 1n); + + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + + var r = x--; + assertEq(x, y); + assertEq(r, xs[j]); + } +} +testPostDec(); diff --git a/js/src/jit-test/tests/cacheir/binaryarith-mod-int32.js b/js/src/jit-test/tests/cacheir/binaryarith-mod-int32.js new file mode 100644 index 0000000000..0801606808 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/binaryarith-mod-int32.js @@ -0,0 +1,70 @@ +setJitCompilerOption("ion.forceinlineCaches", 1); + +function runTest(dividend, divisor) { + function test(dividend, divisor, expected) { + for (var i = 0; i < dividend.length; i++) { + var x = dividend[i]; + for (var j = 0; j < divisor.length; j++) { + var y = divisor[j]; + var result = x % y; + + assertEq(result, expected[i * divisor.length + j]); + } + } + } + + var f = Function(`return ${test}`)(); + + // Seed the IC to ensure we're using Int32Mod. + var ones = Array(8).fill(1); + var zeros = Array(8 * 8).fill(0); + for (var i = 0; i < 2; ++i) { + f(ones, ones, zeros); + } + + var expected = dividend.map(x => divisor.map(y => x % y)).flat(); + for (var i = 0; i < 10; ++i) { + f(dividend, divisor, expected); + } +} + +const positiveInt32 = [ + 1, 2, 3, 4, 5, 6, 7, 8, + 2**31 - 8, + 2**31 - 7, + 2**31 - 6, + 2**31 - 5, + 2**31 - 4, + 2**31 - 3, + 2**31 - 2, + 2**31 - 1, +]; + +const negativeInt32 = [ + -1, -2, -3, -4, -5, -6, -7, -8, + -(2**31 - 8), + -(2**31 - 7), + -(2**31 - 6), + -(2**31 - 5), + -(2**31 - 4), + -(2**31 - 3), + -(2**31 - 2), + -(2**31 - 1), + -(2**31), +]; + +const zero = [0]; + +const cases = [positiveInt32, zero, negativeInt32]; + +for (let a of cases) { + for (let b of cases) { + runTest(a, b); + } +} + +// Test some "interesting" cases. + +// |-2147483648 % -1| may internally compute |-2147483648 / -1|, which isn't an int32 and +// may trigger a floating point exception on some architectures. +runTest([-2147483648], [-1]); diff --git a/js/src/jit-test/tests/cacheir/binaryarith-null-undef-bool.js b/js/src/jit-test/tests/cacheir/binaryarith-null-undef-bool.js new file mode 100644 index 0000000000..140db26572 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/binaryarith-null-undef-bool.js @@ -0,0 +1,75 @@ +// Pass |null| as argument to be more robust against code folding. +function testNullWithInt32OrBool(nullVal) { + var vals = [0, 1, true, false, null]; + for (var v of vals) { + assertEq(v + nullVal, Number(v)); + assertEq(v - nullVal, Number(v)); + assertEq(v * nullVal, 0); + var res = v / nullVal; + assertEq(isNaN(res) || res === Infinity, true); + assertEq(v % nullVal, NaN); + assertEq(v ** nullVal, 1); + + assertEq(nullVal + v, Number(v)); + assertEq(nullVal - v, 0 - Number(v)); + assertEq(nullVal * v, 0); + res = nullVal / v; + assertEq(isNaN(res) || res === 0, true); + res = nullVal % v; + assertEq(isNaN(res) || res === 0, true); + res = nullVal ** v; + assertEq(res === 0 || res === 1, true); + } +} +for (var i = 0; i < 15; i++) { + testNullWithInt32OrBool(null); +} + +function testUndefinedWithOther(undefinedVal) { + var vals = [1.1, NaN, true, false, null, undefined]; + for (var v of vals) { + assertEq(v + undefinedVal, NaN); + assertEq(v - undefinedVal, NaN); + assertEq(v * undefinedVal, NaN); + assertEq(v / undefinedVal, NaN); + assertEq(v % undefinedVal, NaN); + assertEq(v ** undefinedVal, NaN); + + assertEq(undefinedVal + v, NaN); + assertEq(undefinedVal - v, NaN); + assertEq(undefinedVal * v, NaN); + assertEq(undefinedVal / v, NaN); + assertEq(undefinedVal % v, NaN); + var res = undefinedVal ** v; + if (v === false || v === null) { + assertEq(res, 1); + } else { + assertEq(res, NaN); + } + } +} +for (var i = 0; i < 15; i++) { + testUndefinedWithOther(undefined); +} + +function testBooleanWithDouble(trueVal, falseVal) { + var vals = [1.1, 2.2, 5, 6, 3.14]; + for (var v of vals) { + assertEq(v + falseVal, v); + assertEq(v - falseVal, v); + assertEq(v * falseVal, 0); + assertEq(v / falseVal, Infinity); + assertEq(v % falseVal, NaN); + assertEq(v ** falseVal, 1); + + assertEq(trueVal + v, v + 1); + assertEq(trueVal - v, 1 - v); + assertEq(trueVal * v, v); + assertEq(trueVal / v, 1 / v); + assertEq(trueVal % v, 1); + assertEq(trueVal ** v, 1); + } +} +for (var i = 0; i < 15; i++) { + testBooleanWithDouble(true, false); +} diff --git a/js/src/jit-test/tests/cacheir/binaryarith.js b/js/src/jit-test/tests/cacheir/binaryarith.js new file mode 100644 index 0000000000..1746aad963 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/binaryarith.js @@ -0,0 +1,322 @@ +setJitCompilerOption('ion.forceinlineCaches', 1); + +function warmup(fun, input_array) { + for (var index = 0; index < input_array.length; index++) { + input = input_array[index]; + input_lhs = input[0]; + input_rhs = input[1]; + output = input[2]; + for (var i = 0; i < 30; i++) { + var y = fun(input_lhs, input_rhs); + assertEq(y, output) + } + } +} + + +// Add: Int32 + Int32 Overflow +var funAdd1 = (a, b) => { return a + b; } +warmup(funAdd1, [[1,2, 3], [3,4, 7], [4294967295, 2, 4294967297]]); + +// Add: Doubles +var funAdd2 = (a, b) => { return a + b; } +warmup(funAdd2, [[1.2, 2, 3.2], [3.5, 4, 7.5], [4294967295.1, 2, 4294967297.1]]); + +// Add: Type Change Int32 -> Double +var funAdd3 = (a, b) => { return a + b; } +warmup(funAdd3, [[1, 2, 3], [3, 4, 7], [4294967295, 2, 4294967297], [1.2, 2, 3.2]]); + +//Add: String Concat +var funAdd4 = (a, b) => { return a + b; } +warmup(funAdd4, [["","a","a"], ["ab","ba","abba"], ["123","456","123456"]]) + +function D(name) { this.name = name; } +D.prototype.toString = function stringify() { + return this.name; +} +obj1 = new D('A'); + +// Add: String Object Concat +var funAdd4 = (a, b) => { return a + b; } +warmup(funAdd4, [["x", obj1, "xA"], [obj1, "bba", "Abba"]]); + +// Add: Int32 Boolean +var funAdd5 = (a, b) => { return a + b; } +warmup(funAdd5, [[true, 10, 11], [false, 1, 1], [10, true, 11], [1, false, 1], + [2147483647, true, 2147483648],[true, 2147483647, 2147483648]]); + +// Add: String Number Concat +var funAdd6 = (a, b) => { return a + b; } +warmup(funAdd6, [["x", 10, "x10"], [10, "bba", "10bba"], ["x", 1.2, "x1.2"], + [1.2, "bba", "1.2bba"]]); + +// Add: String Boolean +var funAddStrBool = (a, b) => { return a + b; } +warmup(funAddStrBool, [[true, "true", "truetrue"], [false, "true", "falsetrue"], + ["a string", true, "a stringtrue"]]); + +// Sub Int32 +var funSub1 = (a, b) => { return a - b; } +warmup(funSub1, [[7, 0, 7], [7, 8, -1], [4294967295, 2, 4294967293], [0,0,0]]); + +// Sub Double +var funSub2 = (a, b) => { return a - b; } +warmup(funSub2, [[7.5, 0, 7.5], [7, 8.125, -1.125], [4294967295.3125, 2, 4294967293.3125], [NaN,10,NaN]]); + +// Sub Int32 + Boolean +var funSub3 = (a, b) => { return a - b; } +warmup(funSub3, [[7, false, 7], [7, true, 6], [false, 1, -1], [true,1,0]]); + + + +// Mul: Int32+ Int32 Overflow +var funMul1 = (a, b) => { return a * b; } +warmup(funMul1, [[1, 2, 2], [10, 21, 210], [3, 4, 12], [2147483649, 2, 4294967298], [1073741824, 1024, 1099511627776 ]]); + +// Mul: Doubles +var funMul2 = (a, b) => { return a * b; } +warmup(funMul2, [[3/32, 32, 3], [16/64, 32, 8], [3.0, 1.0, 3], [-1, 0, -0], [0, -20, -0]]); + +// Mul: Type change Int32 -> Double +var funMul3 = (a, b) => { return a * b; } +warmup(funMul3, [[1,2, 2], [10, 21, 210], [3, 4, 12], [63/32, 32, 63], [16/64, 32, 8]]); + +// Mul: Boolean +var funMul1 = (a, b) => { return a * b; } +warmup(funMul1, [[1, true, 1], [10, false, 0], [false, 4, 0], [2147483640, true, 2147483640]]); + +//Div: Int32 +var funDiv1 = (a,b) => { return a / b;} +warmup(funDiv1,[[8, 4, 2], [16, 32, 0.5], [10, 0, Infinity], [0, 0, NaN]]); + +//Div: Double +var funDiv2 = (a,b) => { return a / b;} +warmup(funDiv2, [[8.8, 4, 2.2], [16.8, 32, 0.525], [10, 0.5, 20]]); + +//Div: Type change Int32 -> Double +var funDiv3 = (a,b) => { return a / b;} +warmup(funDiv1, [[8, 4, 2], [16, 32, 0.5], [10, 0, Infinity], [0, 0, NaN], [8.8, 4, 2.2], + [16.8, 32, 0.525], [10, 0.5, 20]]); + +//Div: Boolean w/ Int32 +var funDiv4 = (a,b) => { return a / b;} +warmup(funDiv4,[[8, true, 8], [true, 2, 0.5], [10, false, Infinity], [false, false, NaN]]); + +//Mod: Int32 +var funMod1 = (a,b) => {return a % b}; +warmup(funMod1, [[8, 4, 0], [9, 4, 1], [-1, 2, -1], [4294967297, 2, 1], + [10, -3, 1]]); + +//Mod: Double +var funMod2 = (a,b) => {return a % b}; +warmup(funMod2, [[8.5, 1, 0.5], [9.5, 0.5, 0], [-0.03125, 0.0625, -0.03125], [1.64, 1.16, 0.48]]); + +//Mod: Type change Int32 -> Double +var funMod3 = (a,b) => {return a % b}; +warmup(funMod3, [[10, 0, NaN], [8, 4, 0], [9, 4, 1], [-1, 2, -1], [4294967297, 2, 1], + [8.5, 1, 0.5], [9.5, 0.5, 0], [-0.03125, 0.0625, -0.03125], + [1.64, 1.16, 0.48]]); + +//Mod: Boolean w/ Int32 +var funMod4 = (a,b) => {return a % b}; +warmup(funMod4, [[10, false, NaN], [8, true, 0], [false, 4, 0], [true, 2, 1]]); + +//Pow: Int32 +var funPow1 = (a,b) => {return a ** b}; +warmup(funPow1, [[8, 4, 4096], [9, 4, 6561], [-1, 2, 1], [2, -10000, 0], + [-3, 3, -27]]); + +//Pow: Double +var funPow2 = (a,b) => {return a ** b}; +warmup(funPow2, [[8.5, 1, 8.5], [16, 0.5, 4], [4.5, 5, 1845.28125], [18.0625, 0.5, 4.25], + [4, -1, 0.25]]); + +//Pow: Type change Int32 -> Double +var funPow3 = (a,b) => {return a ** b}; +warmup(funPow3, [[10, 0, 1], [8, 4, 4096], [9, 4, 6561], [-1, 2, 1], [2, -10000, 0], + [8.5, 1, 8.5], [16, 0.5, 4], [4.5, 5, 1845.28125], [18.0625, 0.5, 4.25], + [4, -1, 0.25]]); + +//Pow: Boolean w/ Int32 +var funPow4 = (a,b) => {return a ** b}; +warmup(funPow4, [[10, 2, 100], [8, true, 8], [false, 4, 0], [true, 2, 1]]); + +//BitOr Int32 +var funBitOr1 = (a, b) => { return a | b; } +warmup(funBitOr1, [[1, 1, 1], [8, 1, 9], [0, 1233, 1233], [5, 0, 5], + [4294967295, 123231, -1], [2147483647, 1243524, 2147483647]]); + +//BitOr Boolean w/ Int32 +var funBitOr3 = (a, b) => { return a | b; } +warmup(funBitOr3, [[1, true, 1], [8, true, 9], [false, 1233, 1233], [5, false, 5]]); + +//BitOr null w/ Int32 +var funBitOr4 = (a, b) => { return a | b; } +warmup(funBitOr4, [[1, null, 1], [8, null, 8], [null, 1233, 1233], [5, null, 5]]); + +//BitOr undefined w/ Int32 +var funBitOr5 = (a, b) => { return a | b; } +warmup(funBitOr5, [[1, void 0, 1], [8, void 0, 8], [void 0, 1233, 1233], [5, void 0, 5]]); + +//BitXOr Int32 +var funBitXOr1 = (a, b) => { return a ^ b; } +warmup(funBitXOr1, [[1, 1, 0], [5, 1, 4], [63, 31, 32], [4294967295, 2147483647, -2147483648 ] ]); + +//BitXOr Int32 +var funBitXOr2 = (a, b) => { return a ^ b; } +warmup(funBitXOr2, [[1, true, 0], [5, true, 4], [5, false, 5], [false, 1, 1]]); + +//BitXOr Double+int32 +var funBitXOr3 = (a, b) => { return a ^ b; } +warmup(funBitXOr3, [[1.3, 1, 0], [5, 1.4, 4], [63.1, 31, 32], [4294967295.9, 2147483647, -2147483648 ] ]); + +//BitXOr Number Number +var funBitXOr4 = (a, b) => { return a ^ b; } +warmup(funBitXOr4, [[54772703898, 2890608493, 1828589047], + [-54772703898, 2890608493, -1828589045], + [18446744073709551615, 54772703898, -1061870950], //UINT64 Max + [-18446744073709551615, 54772703898, -1061870950], + [4294967295, -1, 0]]); + +//BitXOr null+int32 +var funBitXOr5 = (a, b) => { return a ^ b; } +warmup(funBitXOr5, [[1, null, 1], [5, null, 5], [5, null, 5], [null, 1, 1]]); + +//BitXOr undefined+int32 +var funBitXOr6 = (a, b) => { return a ^ b; } +warmup(funBitXOr6, [[1, void 0, 1], [5, void 0, 5], [5, void 0, 5], [void 0, 1, 1]]); + +//BitAnd Int32 +var funBitAnd1 = (a, b) => { return a & b; } +warmup(funBitAnd1, [[1,1,1], [5,1,1], [63,31,31], [4294967295,2147483647,2147483647], + [-2,10,10], [-15,-2,-16], [4,128,0]]); +//BitAnd Double w/ Int32 +var funBitAnd2 = (a, b) => { return a & b; } +warmup(funBitAnd2, [[1.2 ,1, 1], [5, 1.4, 1], [63,31.99,31], + [4294967295.98,2147483647,2147483647], + [-2.9, 10, 10], [-15,-2.9,-16], [4,128.01,0]]); + +//BitAnd Int32 + Boolean +var funBitAnd1 = (a, b) => { return a & b; } +warmup(funBitAnd1, [[1,true,1], [5,false,0], [true, 6, 0], [false, 12, 0]]); + +//BitAnd Int32 + null +var funBitAnd4 = (a, b) => { return a & b; } +warmup(funBitAnd4, [[1, null, 0], [5, null, 0], [null, 6, 0], [null, 12, 0]]); + +//BitAnd Int32 + undefined +var funBitAnd5 = (a, b) => { return a & b; } +warmup(funBitAnd5, [[1, void 0, 0], [5, void 0, 0], [void 0, 6, 0], [void 0, 12, 0]]); + +//Lsh Int32 +var funLsh1 = (a, b) => { return a << b; } +warmup(funLsh1, [[5,1,10], [1,1,2], [63,31,-2147483648], + [4294967295,2147483647,-2147483648], [-2,10,-2048], [-15,-2,1073741824], + [4,128,4], [1,10,1024], [1024,2,4096]]); + +//Lsh Boolean w/ Int32 +var funLsh2 = (a, b) => { return a << b; } +warmup(funLsh2, [[5,true,10], [true,1,2], [63,false,63], [false, 12, 0]]); + +//Lsh Number Number +var funLsh3 = (a, b) => { return a << b; } +warmup(funLsh3, [[54772703898, 1, -2123741900],[2147483658, 0, -2147483638]]); + +//Lsh Boolean w/ null +var funLsh4 = (a, b) => { return a << b; } +warmup(funLsh4, [[5, null, 5], [null, 1, 0], [63, null, 63], [null, 12, 0]]); + +//Lsh Boolean w/ undefined +var funLsh5 = (a, b) => { return a << b; } +warmup(funLsh5, [[5, void 0, 5], [void 0, 1, 0], [63, void 0, 63], [void 0, 12, 0]]); + +//Rsh Int32 +var funRsh1 = (a, b) => { return a >> b; } +warmup(funRsh1, [[1,1,0], [5,1,2], [63,31,0], [4294967295,2147483647,-1], [-2,10,-1], + [-15,-2,-1], [4,128,4], [1,10,0], [1024,2,256]]); + +//Rsh Int32 +var funRsh2 = (a, b) => { return a >> b; } +warmup(funRsh2, [[true,1,0], [1,true,0], [false, 3, 0], [3, false, 3]]); + +//Rsh Number Number +var funRsh3 = (a, b) => { return a >> b; } +warmup(funRsh3, [[54772703898, 11, -518492 ], [2147483658, 0, -2147483638]]); + +//Rsh Int32 null +var funRsh4 = (a, b) => { return a >> b; } +warmup(funRsh4, [[null, 1, 0], [1, null, 1], [null, 3, 0], [3, null, 3]]); + +//Rsh Int32 undefined +var funRsh5 = (a, b) => { return a >> b; } +warmup(funRsh5, [[void 0, 1, 0], [1, void 0, 1], [void 0, 3, 0], [3, void 0, 3]]); + +//URsh Int32 +var funURsh1 = (a, b) => { return a >>> b; } +warmup(funURsh1, [[1,1,0], [5,1,2], [63,31,0], [4294967295,2147483647,1], [-2,10,4194303], + [-15,-2,3], [4,128,4], [1,10,0], [1024,2,256], [0, -6, 0], [0, 6, 0], + [0x55005500, 2, 0x15401540]]); + +//URsh Boolean Int32 +var funURsh2 = (a, b) => { return a >>> b; } +warmup(funURsh2, [[true,1,0], [5,true,2], [63,false,63], [false, 20, 0]]); + +//URsh Int32 +var funURsh3 = (a, b) => { return a >>> b; } +warmup(funURsh3, [[4294967295, 0, 4294967295]]); + +//URsh Number Number +var funURsh4 = (a, b) => { return a >>> b; } +warmup(funURsh4, [[54772703898, 11, 1578660], [2147483658, 11, 1048576], + [4294967295, 0, 4294967295]]); + +//URsh null Int32 +var funURsh5 = (a, b) => { return a >>> b; } +warmup(funURsh5, [[null, 1, 0], [5, null, 5], [63, null, 63], [null, 20, 0]]); + +//URsh undefined Int32 +var funURsh6 = (a, b) => { return a >>> b; } +warmup(funURsh6, [[void 0, 1, 0], [5, void 0, 5], [63, void 0, 63], [void 0, 20, 0]]); + + +// Other Test cases that Have been useful: +for (var k=0; k < 30; k++) { + A="01234567"; + res ="" + for (var i = 0; i < 8; ++i) { + var v = A[7 - i]; + res+=v; + } + assertEq(res, "76543210"); +} + +// Begin OOM testing: +if (!('oomTest' in this)) + quit(); + +// Add: String Number Concat OOM test +var addOom = (a, b) => { return a + b; } + +function generate_digits(prefix, start) { + digits = [] + number = ""+start+".25"; + for (var i = 1; i < 7; i++) { + number = i + number; + digits.push([prefix, Number(number), prefix + number]); + } + return digits; +} + +// Trying to defeat dtoacache: Warm the IC with one set of digits, then actually oomTest +// using another set. +var warmup_digits = generate_digits("x", 1); +var test_digits = generate_digits("x", 2); + +function ot(digits) { + warmup(addOom, digits); +} + +// Ensure ICs are warmed +ot(warmup_digits); + +oomTest(() => { ot(test_digits); }); \ No newline at end of file diff --git a/js/src/jit-test/tests/cacheir/bind-function-specialized.js b/js/src/jit-test/tests/cacheir/bind-function-specialized.js new file mode 100644 index 0000000000..acac842a7f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bind-function-specialized.js @@ -0,0 +1,72 @@ +load(libdir + "asserts.js"); + +function testBasic() { + var g = function foo(a, b, c) { return a - b - c; }; + for (var i = 0; i < 100; i++) { + var bound1 = g.bind(null, 1); + assertEq(bound1.length, 2); + assertEq(bound1.name, "bound foo"); + var bound2 = bound1.bind(null, 2); + assertEq(bound2.length, 1); + assertEq(bound2.name, "bound bound foo"); + assertEq(bound2(9), -10); + } +} +testBasic(); + +function testBindNonCtor() { + var g = (a, b, c) => a - b - c; + for (var i = 0; i < 100; i++) { + var bound1 = g.bind(null, 1); + var bound2 = bound1.bind(null, 2); + assertEq(bound1(2, 3), -4); + assertEq(bound2(4), -5); + assertThrowsInstanceOf(() => new bound1(2, 3), TypeError); + assertThrowsInstanceOf(() => new bound2(4), TypeError); + assertEq(bound2.length, 1); + assertEq(bound2.name, "bound bound g"); + } +} +testBindNonCtor(); + +function testBindSelfHosted() { + var g = Array.prototype.map; + var arr = [1, 2, 3]; + for (var i = 0; i < 100; i++) { + var bound1 = g.bind(arr); + var bound2 = bound1.bind(null, x => x + 5); + assertEq(bound1(x => x + 3).toString(), "4,5,6"); + assertEq(bound2().toString(), "6,7,8"); + assertEq(bound2.length, 0); + assertEq(bound2.name, "bound bound map"); + } +} +testBindSelfHosted(); + +function testBoundDeletedName() { + var g = function foo(a, b, c) { return a - b - c; }; + var bound1 = g.bind(null); + var bound2 = g.bind(null); + delete bound2.name; + for (var i = 0; i < 100; i++) { + var obj = i < 50 ? bound1 : bound2; + var bound3 = obj.bind(null); + assertEq(bound3.length, 3); + assertEq(bound3.name, i < 50 ? "bound bound foo" : "bound "); + } +} +testBoundDeletedName(); + +function testWeirdProto() { + var g = function foo() { return 123; }; + var proto = {bind: Function.prototype.bind}; + Object.setPrototypeOf(g, proto); + for (var i = 0; i < 100; i++) { + var bound1 = g.bind(null); + assertEq(Object.getPrototypeOf(bound1), proto); + var bound2 = bound1.bind(null); + assertEq(Object.getPrototypeOf(bound2), proto); + assertEq(bound2(), 123); + } +} +testWeirdProto(); diff --git a/js/src/jit-test/tests/cacheir/bindname-lexical-errors.js b/js/src/jit-test/tests/cacheir/bindname-lexical-errors.js new file mode 100644 index 0000000000..d31eecdafb --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bindname-lexical-errors.js @@ -0,0 +1,26 @@ +const x = 1; +function testConst() { + for (var i = 0; i < 20; i++) { + try { + x = 2; + } catch (e) { + continue; + } + throw "Fail1"; + } + assertEq(x, 1); +} +testConst(); + +function testUninit() { + for (var i = 0; i < 20; i++) { + try { + y = 2; + } catch (e) { + continue; + } + throw "Fail2"; + } +} +testUninit(); +let y; diff --git a/js/src/jit-test/tests/cacheir/boolean-call.js b/js/src/jit-test/tests/cacheir/boolean-call.js new file mode 100644 index 0000000000..7c6d94f3d4 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/boolean-call.js @@ -0,0 +1,67 @@ +function wrapper(values) { + function test(values) { + var expected = values.map(v => !!v); + + for (var i = 0; i < 100; ++i) { + var ix = i % values.length; + var val = values[ix]; + var actual = Boolean(val); + assertEq(actual, expected[ix]); + } + } + + for (var i = 0; i < 2; ++i) { + test(values); + } +} + +function makeTest() { + // Create a copy to avoid type pollution. + return Function(`return ${wrapper}`)(); +} + +// Use a new compartment to create a wrapper. +var g = newGlobal({newCompartment: true}); + +var testValues = { + boolean: [true, false], + int32: [-2147483648, -1, 0, 1, 2147483647], + double: [-Infinity, -1.5, -1, -0.5, -0, +0, +0.5, +1, +1.5, Infinity, NaN], + string: ["", "true", "false", "0", "1", "hello"], + symbol: [Symbol(), Symbol("desc"), Symbol.iterator], + bigint: [ + -(2n ** 1000n), + -18446744073709551616n, // -(2n**64n) + -9223372036854775808n, // -(2n**63n) + -4294967296n, // -(2**32) + -2147483648n, // -(2**31) + -1n, 0n, 1n, + 2147483648n, // 2**31 + 4294967296n, // 2**32 + 9223372036854775808n, // 2n**63n + 18446744073709551616n, // 2n**64n + 2n ** 1000n, + ], + object: [{}, [], function(){}, new Proxy({}, {}), createIsHTMLDDA(), g.eval("createIsHTMLDDA()")], + null: [null], + undefined: [undefined], +}; + +for (var values of Object.values(testValues)) { + makeTest()(values); +} + +// boolean and int32 +makeTest()([].concat(testValues.boolean, testValues.int32)); + +// int32 and double +makeTest()([].concat(testValues.int32, testValues.double)); + +// null and undefined +makeTest()([].concat(testValues.null, testValues.undefined)); + +// null, undefined, and object +makeTest()([].concat(testValues.null, testValues.undefined, testValues.object)); + +// all values +makeTest()(Object.values(testValues).flat()); diff --git a/js/src/jit-test/tests/cacheir/boolean-compare-string-or-double.js b/js/src/jit-test/tests/cacheir/boolean-compare-string-or-double.js new file mode 100644 index 0000000000..13da6000f1 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/boolean-compare-string-or-double.js @@ -0,0 +1,149 @@ +// Test comparison between Boolean x {String, Double}. + +// Boolean R String <=> ToNumber(Boolean) R ToNumber(String) +// Boolean R Number <=> ToNumber(Boolean) R Number + +// The entries in the first halves of xs, ys, and zs should be loose-equal to each other. + +var xs = [ + // ToNumber(bool) == 0 + false, false, false, false, + + // ToNumber(bool) == 1 + true, true, true, true, + + // Filler + false, false, false, false, + true, true, true, true, +]; + +var ys = [ + // ToNumber(str) == 0 + "", "0", "0.0", ".0", + + // ToNumber(str) == 1 + "1", "1.0", "0x1", " 1\t\r\n", + + // ToNumber(str) != {0, 1} + // (Duplicate entries to ensure they're neither equal to |true| nor to |false|.) + "not-a-number", "NaN", "Infinity", "2", + "not-a-number", "NaN", "Infinity", "2", +]; + +function Double(x) { + // numberToDouble always returns a Double valued number. + return numberToDouble(x); +} + +var zs = [ + // = 0 + Double(0), Double(0), -0, -0, + + // = 1 + Double(1), Double(1), Double(1), Double(1), + + // != {0, 1} + // (Duplicate entries to ensure they're neither equal to |true| nor to |false|.) + NaN, Infinity, Double(2), Double(-1.5), + NaN, Infinity, Double(2), Double(-1.5), +]; + +function testLooseEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + var r = j < (xs.length >> 1); + + assertEq(x == y, r); + assertEq(y == x, r); + + assertEq(x == z, r); + assertEq(z == x, r); + } +} +testLooseEqual(); + +function testLooseNotEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + var r = j < (xs.length >> 1); + + assertEq(x != y, !r); + assertEq(y != x, !r); + + assertEq(x != z, !r); + assertEq(z != x, !r); + } +} +testLooseNotEqual(); + +function testLessThan() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + assertEq(x < y, +x < +y); + assertEq(y < x, +y < +x); + + assertEq(x < z, +x < +z); + assertEq(z < x, +z < +x); + } +} +testLessThan(); + +function testLessThanEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + assertEq(x <= y, +x <= +y); + assertEq(y <= x, +y <= +x); + + assertEq(x <= z, +x <= +z); + assertEq(z <= x, +z <= +x); + } +} +testLessThanEqual(); + +function testGreaterThan() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + assertEq(x > y, +x > +y); + assertEq(y > x, +y > +x); + + assertEq(x > z, +x > +z); + assertEq(z > x, +z > +x); + } +} +testGreaterThan(); + +function testGreaterThanEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + var z = zs[j]; + + assertEq(x >= y, +x >= +y); + assertEq(y >= x, +y >= +x); + + assertEq(x >= z, +x >= +z); + assertEq(z >= x, +z >= +x); + } +} +testGreaterThanEqual(); diff --git a/js/src/jit-test/tests/cacheir/bound-construct-derived-class-ctor.js b/js/src/jit-test/tests/cacheir/bound-construct-derived-class-ctor.js new file mode 100644 index 0000000000..321fbb47f6 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bound-construct-derived-class-ctor.js @@ -0,0 +1,46 @@ +class Base { + constructor(b) { + this.b = b; + } +} +class Derived extends Base { + constructor(a, b) { + super(b); + this.a = a; + } +} + +function testSimple() { + var boundCtor = Derived.bind(null, 1); + for (var i = 0; i < 100; i++) { + var o = new boundCtor(2); + assertEq(o.a, 1); + assertEq(o.b, 2); + + } +} +testSimple(); + +function testMegamorphic() { + var ctors = [ + function(a, b) { this.a = a; this.b = b; this.c = 1; }.bind(null, 1), + function(a, b) { this.a = a; this.b = b; this.c = 2; }.bind(null, 1), + function(a, b) { this.a = a; this.b = b; this.c = 3; }.bind(null, 1), + function(a, b) { this.a = a; this.b = b; this.c = 4; }.bind(null, 1), + function(a, b) { this.a = a; this.b = b; this.c = 5; }.bind(null, 1), + function(a, b) { this.a = a; this.b = b; this.c = 6; }.bind(null, 1), + function(a, b) { this.a = a; this.b = b; this.c = 7; }.bind(null, 1), + function(a, b) { this.a = a; this.b = b; this.c = 8; }.bind(null, 1), + function(a, b) { this.a = a; this.b = b; this.c = 9; }.bind(null, 1), + function(a, b) { this.a = a; this.b = b; this.c = 10; }.bind(null, 1), + Derived.bind(null, 1), + Derived.bind(null, 1), + ]; + for (var i = 0; i < 100; i++) { + var ctor = ctors[i % ctors.length]; + var o = new ctor(2); + assertEq(o.a, 1); + assertEq(o.b, 2); + } +} +testMegamorphic(); diff --git a/js/src/jit-test/tests/cacheir/bound-construct-hook.js b/js/src/jit-test/tests/cacheir/bound-construct-hook.js new file mode 100644 index 0000000000..6d31db4192 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bound-construct-hook.js @@ -0,0 +1,18 @@ +function test() { + // Some bound callables that we're unlikely to optimize better in CacheIR. + var boundCtor = (new Proxy(Array, {})).bind(null, 1, 2, 3); + var boundNonCtor = (new Proxy(x => x + 1, {})).bind(null, 1, 2, 3); + + for (var i = 0; i < 60; i++) { + var fun = i < 40 ? boundCtor : boundNonCtor; + var ex = null; + try { + var res = new fun(100, 101); + assertEq(JSON.stringify(res), "[1,2,3,100,101]"); + } catch (e) { + ex = e; + } + assertEq(ex === null, i < 40); + } +} +test(); diff --git a/js/src/jit-test/tests/cacheir/bound-construct-scripted.js b/js/src/jit-test/tests/cacheir/bound-construct-scripted.js new file mode 100644 index 0000000000..056a538159 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bound-construct-scripted.js @@ -0,0 +1,72 @@ +function testNewTargetGuard() { + var weirdNewTarget = function() {}; + var fun = function() { return new.target; }; + var boundFun = fun.bind(null); + for (var i = 0; i < 60; i++) { + var newTarget = i < 40 ? boundFun : weirdNewTarget; + var res = Reflect.construct(boundFun, [], newTarget); + assertEq(res, i < 40 ? fun : weirdNewTarget); + } +} +testNewTargetGuard(); + +function testPrototypeGuard() { + var fun = function() {}; + var boundFun = fun.bind(null); + var customPrototype1 = {}; + var customPrototype2 = {}; + fun.prototype = customPrototype1; + + for (var i = 0; i < 60; i++) { + if (i === 40) { + fun.prototype = customPrototype2; + } + var res = new boundFun(); + assertEq(Object.getPrototypeOf(res), i < 40 ? customPrototype1 : customPrototype2); + } +} +testPrototypeGuard(); + +function testNonObjectPrototypeGuard() { + var fun = function() {}; + var boundFun = fun.bind(null); + fun.prototype = null; + var customPrototype = {}; + + for (var i = 0; i < 60; i++) { + if (i === 40) { + fun.prototype = customPrototype; + } + var res = new boundFun(); + assertEq(Object.getPrototypeOf(res), i < 40 ? Object.prototype : customPrototype); + } +} +testNonObjectPrototypeGuard(); + +function testObjectReturnValue() { + var fun = function() { return Math; }; + var boundFun = fun.bind(null); + for (var i = 0; i < 60; i++) { + var res = new boundFun(); + assertEq(res, Math); + } +} +testObjectReturnValue(); + +function testManyArgs() { + var fun = function(a, b, c, d, e, f, g, h, i, j) { + this.values = [a, b, c, d, e, f, g, h, i, j].join(","); + }; + var boundFun1 = fun.bind(null, 1, 2); + var boundFun2 = fun.bind(null, 1, 2, 3, 4, 5, 6); + for (var i = 0; i < 60; i++) { + assertEq(new boundFun1().values, "1,2,,,,,,,,"); + assertEq(new boundFun1(10, 11, 12, 13, 14).values, "1,2,10,11,12,13,14,,,"); + assertEq(new boundFun1(10, 11, 12, 13, 14, 15, 16, 17).values, "1,2,10,11,12,13,14,15,16,17"); + + assertEq(new boundFun2().values, "1,2,3,4,5,6,,,,"); + assertEq(new boundFun2(10, 11).values, "1,2,3,4,5,6,10,11,,"); + assertEq(new boundFun2(10, 11, 12, 13, 14, 15, 16, 17).values, "1,2,3,4,5,6,10,11,12,13"); + } +} +testManyArgs(); diff --git a/js/src/jit-test/tests/cacheir/bug1345707.js b/js/src/jit-test/tests/cacheir/bug1345707.js new file mode 100644 index 0000000000..616a5e365e --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1345707.js @@ -0,0 +1,7 @@ +for (var i=0; i<10; i++) { + var o = {}; + if (i & 1) + Object.preventExtensions(o); + o[0] = i; + assertEq(0 in o, !(i & 1)); +} diff --git a/js/src/jit-test/tests/cacheir/bug1357024.js b/js/src/jit-test/tests/cacheir/bug1357024.js new file mode 100644 index 0000000000..a70f605378 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1357024.js @@ -0,0 +1,12 @@ +function f() { + var o = {}; + for (var j = 0; j < 15; j++) { + try { + o.__proto__ = o || j; + } catch(e) { + continue; + } + throw "Fail"; + } +} +f(); diff --git a/js/src/jit-test/tests/cacheir/bug1397026.js b/js/src/jit-test/tests/cacheir/bug1397026.js new file mode 100644 index 0000000000..8e2dc00339 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1397026.js @@ -0,0 +1,43 @@ +function f1() { + var o = {}; + var values = []; + for (var i = 0; i < 6; ++i) { + var desc = { + value: i, + writable: true, + configurable: true, + enumerable: true + }; + try { + Object.defineProperty(o, "p", desc); + } catch (e) { + } + if (i === 1) { + Object.defineProperty(o, "p", {configurable: false}); + } + values.push(o.p); + } + assertEq(values.toString(), "0,1,1,1,1,1"); +} +f1(); + +function f2() { + var o = {}; + for (var i = 0; i < 6; ++i) { + var desc = { + value: i, + writable: true, + configurable: true, + enumerable: true + }; + try { + Object.defineProperty(o, "p", desc); + } catch (e) { + } + assertEq(Object.getOwnPropertyDescriptor(o, "p").enumerable, true); + if (i > 0) { + Object.defineProperty(o, "p", {enumerable: false}); + } + } +} +f2(); diff --git a/js/src/jit-test/tests/cacheir/bug1414849.js b/js/src/jit-test/tests/cacheir/bug1414849.js new file mode 100644 index 0000000000..1ebe86a82a --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1414849.js @@ -0,0 +1,12 @@ +function g(s) { + for (var i = s; ; i--) { + if (s[i] !== ' ') + return; + } +} +function f() { + var s = "foo".match(/(.*)$/)[0]; + return g(s); +} +for (var i = 0; i < 10; i++) + f(); diff --git a/js/src/jit-test/tests/cacheir/bug1420910.js b/js/src/jit-test/tests/cacheir/bug1420910.js new file mode 100644 index 0000000000..41d17376dd --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1420910.js @@ -0,0 +1,35 @@ +// Testing InstanceOf IC. + +Array.prototype.sum = function() { + return this.reduce(( acc, cur ) => acc + cur, 0); +} + + +Iters = 20; + +function resultArray(fn, obj) { + res = new Array(); + for (var x = 0; x < Iters; x++) { + res.push(fn(obj) ? 1 : 0); + } + return res; +} + +// Ensure alteration of .prototype invalidates IC +function basic() {}; + +protoA = { prop1: "1"}; +basic.prototype = protoA; + +io1 = x => { return x instanceof basic; } + +var x = new basic(); +beforePrototypeModification = resultArray(io1,x).sum(); //Attach and test IC +assertEq(beforePrototypeModification,Iters); + +basic.prototype = {}; // Invalidate IC +afterPrototypeModification = resultArray(io1,x).sum(); //Test +assertEq(afterPrototypeModification,0); + +//Primitive LHS returns false. +assertEq(resultArray(io1,0).sum(),0); \ No newline at end of file diff --git a/js/src/jit-test/tests/cacheir/bug1423139.js b/js/src/jit-test/tests/cacheir/bug1423139.js new file mode 100644 index 0000000000..31ad297a49 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1423139.js @@ -0,0 +1,15 @@ +var c = 0; +for (var i = 0; i < 5; i++) { + try { + Object.defineProperty([], "length", { + configurable: true, + enumerable: true, + writable: true, + value: 0 + }); + } catch (e) { + assertEq(e instanceof TypeError, true); + c++; + } +} +assertEq(c, i); diff --git a/js/src/jit-test/tests/cacheir/bug1438727.1.js b/js/src/jit-test/tests/cacheir/bug1438727.1.js new file mode 100644 index 0000000000..683fd8ab90 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1438727.1.js @@ -0,0 +1,22 @@ +let count = 0; +function testMathyFunction(f, inputs) { + for (var j = 0; j < inputs.length; ++j) + for (var k = 0; k < inputs.length; ++k) { + let a = f(inputs[j], inputs[k]); + count += 1; + print("Number " + count + ": " + a + " (inputs "+inputs[j]+","+inputs[k]+")"); + } +} +mathy0 = function(x, y) { + return (x / (y ? x : -Number.MAX_SAFE_INTEGER) > Math.fround(+y & +0x100000000) ** Math.fround(y)) +} +testMathyFunction(mathy0, /*MARR*/ [ + [1], , , [1], + [1], , [1], , , [1], , [1], , , [1], + [1], , [1], , , [1], + [1], , [1], , [1], + [1], + [1], , -1 / 0 +]) + +testMathyFunction(mathy0, [, -Number.MAX_VALUE, Number.MIN_SAFE_INTEGER, 0x100000001, 0x07fffffff, -0x07fffffff, 0 / 0, Number.MIN_VALUE, -0x0ffffffff, Number.MAX_SAFE_INTEGER, 0x0ffffffff, -0x100000000, , 1 / 0, 0x080000000, -1 / 0, 0x100000000]) \ No newline at end of file diff --git a/js/src/jit-test/tests/cacheir/bug1438727.2.js b/js/src/jit-test/tests/cacheir/bug1438727.2.js new file mode 100644 index 0000000000..d6941f7ea9 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1438727.2.js @@ -0,0 +1,6 @@ +var lfRandom = 0; +var i = 0; +while (i < 1000) { + lfRunTypeId = 4 + (lfRandom % 2); + i++; +} diff --git a/js/src/jit-test/tests/cacheir/bug1438727.3.js b/js/src/jit-test/tests/cacheir/bug1438727.3.js new file mode 100644 index 0000000000..0cdc9fab7c --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1438727.3.js @@ -0,0 +1,16 @@ +let lfPreamble = ` +assertEq = function(a,b) { + try { print(a); print(b); } catch(exc) {} +} +`; +evaluate(lfPreamble, {}); +var a = [1, 2, 3]; +var b = [4, 5, 6]; +function testFold() { + for (var i = 0; i < 10; i++) { + var x = a[i]; + var z = b[i]; + if (((x / x) | 0) < 3) assertEq(x !== z, true); + } +} +for (var i = 0; i < 10; i++) testFold(); diff --git a/js/src/jit-test/tests/cacheir/bug1438727.4.js b/js/src/jit-test/tests/cacheir/bug1438727.4.js new file mode 100644 index 0000000000..85a9f54a84 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1438727.4.js @@ -0,0 +1,4 @@ +function f(v, e) { + for (var i = 2; i < 9; i++) v %= e; +} +f(0, 1); diff --git a/js/src/jit-test/tests/cacheir/bug1438727.js b/js/src/jit-test/tests/cacheir/bug1438727.js new file mode 100644 index 0000000000..4846195da8 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1438727.js @@ -0,0 +1,7 @@ +const handler = {} +function testArray(arr) { + let proxy = new Proxy(arr, handler) + proxy.sort((x, y) => 1 * x - y); + arr.sort((x, y) => 1 * x - y); +} +testArray([5, (this), 2, 99]); \ No newline at end of file diff --git a/js/src/jit-test/tests/cacheir/bug1439180.js b/js/src/jit-test/tests/cacheir/bug1439180.js new file mode 100644 index 0000000000..90d77f3204 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1439180.js @@ -0,0 +1,9 @@ +h = function f(x) { + x = +"NaN"; + return /I/ (~x); + } +for (var j = 0; j < 3; j++) { + try { + h(); + } catch (e) {} +} diff --git a/js/src/jit-test/tests/cacheir/bug1448136.js b/js/src/jit-test/tests/cacheir/bug1448136.js new file mode 100644 index 0000000000..e08e67d80d --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1448136.js @@ -0,0 +1,23 @@ +print = function(s) { return s.toString(); } +assertEq = function(a,b) { + try { print(a); print(b); } catch(exc) {} +} +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("(" + function() { + Debugger(parent).onExceptionUnwind = function(frame) { + frame.older + } +} + ")()") +function a() {}; +function b() {}; +for (let _ of Array(100)) + assertEq(b instanceof a, true); +function c(){}; +function d(){}; +function e(){}; +Object.defineProperty(a, Symbol.hasInstance, {value: assertEq }); +let funcs = [a, b, c, d]; +for (let f of funcs) + assertEq(e instanceof f, true); + diff --git a/js/src/jit-test/tests/cacheir/bug1451976.js b/js/src/jit-test/tests/cacheir/bug1451976.js new file mode 100644 index 0000000000..565362bc37 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1451976.js @@ -0,0 +1,11 @@ +// This test case originally failed under --enable-more-deterministic + +setJitCompilerOption("ion.forceinlineCaches", 1); +function f(y, z) { + return Math.fround(z) < ~y; +}; +var x = [2 ** 53 - 2, 0]; +for (var i = 0; i < 3; ++i) { + assertEq(f(x[0], x[1]),true); +} + diff --git a/js/src/jit-test/tests/cacheir/bug1451984.js b/js/src/jit-test/tests/cacheir/bug1451984.js new file mode 100644 index 0000000000..bfbcb109ba --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1451984.js @@ -0,0 +1,10 @@ +// This test case originally failed only with --enable-more-deterministic + +setJitCompilerOption("ion.forceinlineCaches", 1); +function f(x) { + return Math.pow(Math.fround(Math.fround()), ~(x >>> 0)); +} +assertEq(f(-1),1); +assertEq(f(-1),1); +assertEq(f(-1),1); +assertEq(f(-1),1); diff --git a/js/src/jit-test/tests/cacheir/bug1459754.js b/js/src/jit-test/tests/cacheir/bug1459754.js new file mode 100644 index 0000000000..bfbe626acc --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1459754.js @@ -0,0 +1,9 @@ +function f(x) { + this["__proto__"] = x; + let tmp = this.toString; + assertEq(x === null, tmp === void 0); +} + +for (let e of [[], null, []]) { + new f(e); +} diff --git a/js/src/jit-test/tests/cacheir/bug1462280.js b/js/src/jit-test/tests/cacheir/bug1462280.js new file mode 100644 index 0000000000..d4581ad6ac --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1462280.js @@ -0,0 +1,3 @@ +for (var i = 0; i < 2; i++) { + evaluate("var obj = {[Symbol.iterator]: Symbol.iterator};"); +} diff --git a/js/src/jit-test/tests/cacheir/bug1471361.js b/js/src/jit-test/tests/cacheir/bug1471361.js new file mode 100644 index 0000000000..d50acdf558 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1471361.js @@ -0,0 +1,13 @@ +// This is a fuzzer-found crash inducing test. +// Pass is simply not crashing. +(function () { + f = function(y) { + ~+y; + } + x = [new Number]; + for (var j = 0; j < 3; ++j) { + for (var k = 0; k < 3; ++k) { + f(x[k]); + } + } +})(); diff --git a/js/src/jit-test/tests/cacheir/bug1483183.js b/js/src/jit-test/tests/cacheir/bug1483183.js new file mode 100644 index 0000000000..ec95b52a9f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1483183.js @@ -0,0 +1,8 @@ +if (!('stackTest' in this)) + quit(); + +stackTest(new Function(` +newGlobal({ + sameZoneAs: [] +}).frame; +`)); diff --git a/js/src/jit-test/tests/cacheir/bug1488786-2.js b/js/src/jit-test/tests/cacheir/bug1488786-2.js new file mode 100644 index 0000000000..7ac42f2ce4 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1488786-2.js @@ -0,0 +1,27 @@ +setJitCompilerOption('ion.forceinlineCaches', 1); + +function protoChange() { + var o = {0: 0, 1: 0, 0x10000: 0, 0x20000: 0}; + + var tests = [1, 0, 0x10000, 0x20000]; + + function result_map(key, i) { + if (i > 5 && key == 0x20000) + return undefined; + return 0; + } + + for (var i = 0; i < 10; i++) { + for (var key of tests) { + assertEq(o[key], result_map(key, i)); + } + + if (i == 5) { + delete o[0x20000]; + } + } +} + +for (var i = 0; i < 10; i++) { + protoChange(); +} \ No newline at end of file diff --git a/js/src/jit-test/tests/cacheir/bug1488786.js b/js/src/jit-test/tests/cacheir/bug1488786.js new file mode 100644 index 0000000000..656f1f0d2e --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1488786.js @@ -0,0 +1,38 @@ +setJitCompilerOption('ion.forceinlineCaches', 1); + +var A = Array(2**18); +A[0] = "A"; +A[1] = "B"; +A[2**14] = "C"; +A[2**31-1] = "D"; +A[-1] = "E"; + +function get_thee(a,x) { + return a[x]; +} + +// Warmup IC +for (var i = 0; i < 30; i++) { + get_thee(A, i % A.length); +} + +// numberToDouble always returns a double-typed Number, so helps +// us ensure we're accessing the array with a double-typed Number index. +var y = numberToDouble(1); +var z = 2**31-1; +// Ensure we handle negative indices. +var a = -1; + +function test() { + for (var i = 0; i < 30; i++) { + assertEq(get_thee(A,y), "B"); + assertEq(get_thee(A,z), "D"); + assertEq(get_thee(A,a), "E"); + } +} +test(); + +if (!('oomTest' in this)) + quit(); + +oomTest(test); diff --git a/js/src/jit-test/tests/cacheir/bug1494537-plain.js b/js/src/jit-test/tests/cacheir/bug1494537-plain.js new file mode 100644 index 0000000000..e17cd3bd1d --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1494537-plain.js @@ -0,0 +1,123 @@ +// Version of bug1494537.js for plain objects. + +let offsets = [213, 559, 255, 515, 30, 507, 252, 329, 487, 7]; + +function update_index(i, j) { + var offset = offsets[j % offsets.length]; + return i + offset; +} + +function compute_index(initial, count) { + for (var i = 0; i < count; i++) { + initial = update_index(initial, i); + } + return initial; +} + +// This is written so that the IC added in the bug activates. +function mutate_object(obj, count, epsilon = 0) { + var index = 0; + for (var i = 0; i < count; i++) { + index = update_index(index, i); + obj[index] = i + epsilon; + } + return obj[offsets[0]+offsets[1]] === (1 + epsilon) && + obj[10] === undefined; +} + +// Monomorphizing mutate_object to ensure we get the IC chains we want +function create_variant(variant) { + var source = mutate_object.toString().replace("mutate_object", "mutate_object_"+variant); + return source; +} + +function test_basic() { + eval(create_variant("basic")); + var x = {}; + + var count = 100; + assertEq(mutate_object_basic(x, count), true); + var end = compute_index(0, count); + assertEq(x[end], count - 1); + assertEq(x[end - 1], undefined); +} + +// Ensure the IC respects frozen. +function test_frozen() { + eval(create_variant("frozen")); + var x = {}; + Object.freeze(x); + + var count = 100; + assertEq(mutate_object_frozen(x, count), false); + + var end = compute_index(0, count); + + var y = {}; + assertEq(mutate_object_frozen(y, count), true); + assertEq(y[end], count - 1); + Object.freeze(y); + + // After a mutated object is frozen, can't subsequently modify elements + assertEq(mutate_object_frozen(x, count, 10), false); + assertEq(y[end], count - 1); +} + +// Let's make sure updates to the object happen as expected. +function test_update() { + eval(create_variant("update")); + + var x = {}; + var count = 100; + assertEq(mutate_object_update(x, count), true); + var end = compute_index(0, count); + assertEq(x[end], count - 1); + assertEq(x[end - 1], undefined); + + var epsilon = 2; + mutate_object_update(x, 200, epsilon); + assertEq(x[end], count -1 + epsilon) +} + +// Elements may be non-writable, let us not write them. +function test_nonwritable() { + eval(create_variant("nonwritable")); + var x = {}; + var count = 100; + var index = compute_index(0, 10); + Object.defineProperty(x, index, {value: -10, writable: false}); + mutate_object_nonwritable(x, count); + assertEq(x[index], -10); +} + +// Random indices can get setters, let's make sure we honour those. +function test_setter() { + eval(create_variant("setter")); + var x = {}; + var count = 100; + var index = compute_index(0, 80); + var sigil = 0; + Object.defineProperty(x, index, {set(newVal) {sigil++; }}); + mutate_object_setter(x, count); + assertEq(sigil, 1); + assertEq(x[index], undefined); +} + +// Ensure indexes on the prototype don't break things. +function test_proto_indices() { + eval(create_variant("proto_indices")); + var x = {}; + var count = 100; + var index = compute_index(0, 80); + x.__proto__[index] = "hello"; + mutate_object_proto_indices(x, count); + assertEq(x.__proto__[index], "hello"); + assertEq(x[index], 79); +} + +test_basic(); +test_frozen(); +test_update(); +test_nonwritable(); +test_setter(); +test_proto_indices(); diff --git a/js/src/jit-test/tests/cacheir/bug1494537.js b/js/src/jit-test/tests/cacheir/bug1494537.js new file mode 100644 index 0000000000..7bf139819c --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1494537.js @@ -0,0 +1,125 @@ +setJitCompilerOption("ion.forceinlineCaches", 1); + +let offsets = [213, 559, 255, 515, 30, 507, 252, 329, 487, 7]; + +function update_index(i, j) { + var offset = offsets[j % offsets.length]; + return i + offset; +} + +function compute_index(initial, count) { + for (var i = 0; i < count; i++) { + initial = update_index(initial, i); + } + return initial; +} + +// This is written so that the IC added in the bug activates. +function mutate_array(array, count, epsilon = 0) { + var index = 0; + for (var i = 0; i < count; i++) { + index = update_index(index, i); + array[index] = i + epsilon; + } + return array[offsets[0]+offsets[1]] === (1 + epsilon) && + array[10] === undefined; +} + +// Monomorphizing mutate_array to ensure we get the IC chains we want +function create_variant(variant) { + var source = mutate_array.toString().replace("mutate_array", "mutate_array_"+variant); + return source; +} + +function test_basic() { + eval(create_variant("basic")); + var x = []; + + var count = 100; + assertEq(mutate_array_basic(x, count), true); + var end = compute_index(0, count); + assertEq(x[end], count - 1); + assertEq(x[end - 1], undefined); +} + +// Ensure the IC respects frozen. +function test_frozen() { + eval(create_variant("frozen")); + var x = []; + Object.freeze(x); + + var count = 100; + assertEq(mutate_array_frozen(x, count), false); + assertEq(x.length, 0); + + var end = compute_index(0, count); + + var y = []; + assertEq(mutate_array_frozen(y, count), true); + assertEq(y[end], count - 1); + Object.freeze(y); + + // After a mutated array is frozen, can't subsequently modify elements + assertEq(mutate_array_frozen(x, count, 10), false); + assertEq(y[end], count - 1); +} + +// Let's make sure updates to the array happen as expected. +function test_update() { + eval(create_variant("update")); + + var x = []; + var count = 100; + assertEq(mutate_array_update(x, count), true); + var end = compute_index(0, count); + assertEq(x[end], count - 1); + assertEq(x[end - 1], undefined); + + var epsilon = 2; + mutate_array_update(x, 200, epsilon); + assertEq(x[end], count -1 + epsilon) +} + +// Elements may be non-writable, let us not write them. +function test_nonwritable() { + eval(create_variant("nonwritable")); + var x = []; + var count = 100; + var index = compute_index(0, 10); + Object.defineProperty(x, index, {value: -10, writable: false}); + mutate_array_nonwritable(x, count); + assertEq(x[index], -10); +} + +// Random indices can get setters, let's make sure we honour those. +function test_setter() { + eval(create_variant("setter")); + var x = []; + var count = 100; + var index = compute_index(0, 80); + var sigil = 0; + Object.defineProperty(x, index, {set(newVal) {sigil++; }}); + mutate_array_setter(x, count); + assertEq(sigil, 1); + assertEq(x[index], undefined); +} + +// Ensure indexes on the prototype don't break things; +// +function test_proto_indices() { + eval(create_variant("proto_indices")); + var x = []; + var count = 100; + var index = compute_index(0, 80); + x.__proto__[index] = "hello"; + mutate_array_proto_indices(x, count); + assertEq(x.__proto__[index], "hello"); + assertEq(x[index], 79); +} + +test_basic(); +test_frozen(); +test_update(); +test_nonwritable(); +test_setter(); +test_proto_indices(); diff --git a/js/src/jit-test/tests/cacheir/bug1500255.js b/js/src/jit-test/tests/cacheir/bug1500255.js new file mode 100644 index 0000000000..41b83fc02b --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1500255.js @@ -0,0 +1,11 @@ + +setJitCompilerOption("offthread-compilation.enable", 0); +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("ion.warmup.trigger", 0); + +foo(); + +function foo() { + Array.prototype.__proto__ = null; + Array.prototype[1] = 'bar'; +} diff --git a/js/src/jit-test/tests/cacheir/bug1502143.js b/js/src/jit-test/tests/cacheir/bug1502143.js new file mode 100644 index 0000000000..2cc7bc1f55 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1502143.js @@ -0,0 +1,15 @@ + +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 100); + +main(); + +function main() { + new Uint8Array(1024).buffer; + var b = []; + b[10000] = 1; + [].concat(b) + var a2 = new Int32Array(2); + b.__proto__ = a2; + [].concat(b) +} diff --git a/js/src/jit-test/tests/cacheir/bug1502709.js b/js/src/jit-test/tests/cacheir/bug1502709.js new file mode 100644 index 0000000000..535443050d --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1502709.js @@ -0,0 +1,17 @@ + +setJitCompilerOption("baseline.warmup.trigger", 0); +main(); + +function main() { + try { + x = []; + Object.defineProperty(x, 1, {}); + y = []; + Object.defineProperty(y, 1, {}); + y.__proto__ = null; + Array.prototype.sort.apply(x, [function() {}]); + } catch (e) {} + try { + Array.prototype.sort.apply(y, [function() {}]); + } catch (e) {} +} diff --git a/js/src/jit-test/tests/cacheir/bug1509293.js b/js/src/jit-test/tests/cacheir/bug1509293.js new file mode 100644 index 0000000000..34306bc223 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1509293.js @@ -0,0 +1,2 @@ +var summary = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; +Array.prototype.push([...summary]); diff --git a/js/src/jit-test/tests/cacheir/bug1514682.js b/js/src/jit-test/tests/cacheir/bug1514682.js new file mode 100644 index 0000000000..c509700b4e --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1514682.js @@ -0,0 +1,15 @@ +function f(o, n) { + if (n) { + o[n] = true; + } else { + o.x = true; + } +} + +// Warm up object so HadElementsAccess check will trip next +var o = {}; +for (var i = 0; i < 43; ++i) { + o["x" + i] = true; +} + +f(o, "y"); diff --git a/js/src/jit-test/tests/cacheir/bug1526872.js b/js/src/jit-test/tests/cacheir/bug1526872.js new file mode 100644 index 0000000000..33d65e9443 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1526872.js @@ -0,0 +1,12 @@ + +setJitCompilerOption("offthread-compilation.enable", 0); +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("ion.warmup.trigger", 0); + +for (var i = 0; i < 5; i++) { + assertEq(foo(1n), false); +} + +function foo(x) { + return x == null || x == undefined; +} diff --git a/js/src/jit-test/tests/cacheir/bug1536228.js b/js/src/jit-test/tests/cacheir/bug1536228.js new file mode 100644 index 0000000000..2a094eb377 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1536228.js @@ -0,0 +1,40 @@ +load(libdir + "asserts.js"); + +function test() { + var plainDataProperty = { + value: 0, enumerable: true, configurable: true, writable: true + }; + var nonEnumerableProperty = { + value: 0, enumerable: false, configurable: true, writable: true + }; + var nonConfigurableProperty = { + value: 0, enumerable: true, configurable: false, writable: true + }; + var n = 5000; + for (var i = 0; i < n; ++i) { + var obj = {}; + + // Create a different shape for each object to ensure JSOP_INITELEM + // below can get into the megamorphic state. + Object.defineProperty(obj, "bar" + i, nonEnumerableProperty); + + // Plain data property, will be created through DefineDataProperty, + // which is emitted as JSOP_INITELEM. The object doesn't have a "foo" + // property, so JSOP_INITELEM can simply create a new property. + Object.defineProperty(obj, "foo", plainDataProperty); + + // Redefine as a non-data property for the last object. + var desc = (i + 1 !== n) ? plainDataProperty : nonConfigurableProperty; + Object.defineProperty(obj, "foo", desc); + + // Again JSOP_INITELEM, but this time JSOP_INITELEM can't simply add a + // property, because "foo" is already present. And for the last object, + // which has a non-configurable "foo" property, this call must throw a + // TypeError exception. + Object.defineProperty(obj, "foo", plainDataProperty); + } +} + +for (var i = 0; i < 2; ++i) { + assertThrowsInstanceOf(test, TypeError); +} diff --git a/js/src/jit-test/tests/cacheir/bug1612636.js b/js/src/jit-test/tests/cacheir/bug1612636.js new file mode 100644 index 0000000000..710889b308 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1612636.js @@ -0,0 +1,10 @@ +var concat = String.prototype.concat; +function f18(b83) { + var a11 = arguments; + if (b83) + f18(false); + g22 = {}; + g22.apply = concat; + g22.apply(null, a11); +} +f18(true); diff --git a/js/src/jit-test/tests/cacheir/bug1651732-ionic-getprop-super.js b/js/src/jit-test/tests/cacheir/bug1651732-ionic-getprop-super.js new file mode 100644 index 0000000000..a64e2aabb0 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1651732-ionic-getprop-super.js @@ -0,0 +1,28 @@ +class Base { + static a = 0; + static [Symbol.iterator] = 0; +} + +class Derived extends Base { + static m(key) { + // Attach an IC through IonGetPropSuperIC. + return super[key]; + } +} + +var key = { + value: "a", + + [Symbol.toPrimitive]() { + return this.value; + } +}; + +for (var i = 0; i < 100; ++i) { + // Change key[Symbol.toPrimitive] to return a symbol after some warm-up. + if (i > 80) { + key.value = Symbol.iterator; + } + + assertEq(Derived.m(key), 0); +} diff --git a/js/src/jit-test/tests/cacheir/bug1651732-proxy-get.js b/js/src/jit-test/tests/cacheir/bug1651732-proxy-get.js new file mode 100644 index 0000000000..9a4362f410 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1651732-proxy-get.js @@ -0,0 +1,23 @@ +// An object with a custom [Symbol.toPrimitive] function. +var key = { + value: "a", + + [Symbol.toPrimitive]() { + return this.value; + } +}; + +var target = {}; +var obj = new Proxy(target, {}); + +for (var i = 0; i < 100; ++i) { + // Change key[Symbol.toPrimitive] to return a symbol after some warm-up. + if (i > 80) { + key.value = Symbol.iterator; + } + + target[key.value] = i; + + // Attach an IC for JSOp::GetElem on proxies. + assertEq(obj[key], i); +} diff --git a/js/src/jit-test/tests/cacheir/bug1651732-proxy-has.js b/js/src/jit-test/tests/cacheir/bug1651732-proxy-has.js new file mode 100644 index 0000000000..004b5982d8 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1651732-proxy-has.js @@ -0,0 +1,24 @@ +// An object with a custom [Symbol.toPrimitive] function. +var key = { + value: "a", + + [Symbol.toPrimitive]() { + return this.value; + } +}; + +var target = { + a: 0, + [Symbol.iterator]: 0, +}; +var obj = new Proxy(target, {}); + +for (var i = 0; i < 100; ++i) { + // Change key[Symbol.toPrimitive] to return a symbol after some warm-up. + if (i > 80) { + key.value = Symbol.iterator; + } + + // Attach an IC for JSOp::In on proxies. + assertEq(key in obj, true); +} diff --git a/js/src/jit-test/tests/cacheir/bug1651732-proxy-hasOwn.js b/js/src/jit-test/tests/cacheir/bug1651732-proxy-hasOwn.js new file mode 100644 index 0000000000..90f94a4e48 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1651732-proxy-hasOwn.js @@ -0,0 +1,24 @@ +// An object with a custom [Symbol.toPrimitive] function. +var key = { + value: "a", + + [Symbol.toPrimitive]() { + return this.value; + } +}; + +var target = { + a: 0, + [Symbol.iterator]: 0, +}; +var obj = new Proxy(target, {}); + +for (var i = 0; i < 100; ++i) { + // Change key[Symbol.toPrimitive] to return a symbol after some warm-up. + if (i > 80) { + key.value = Symbol.iterator; + } + + // Attach an IC for JSOp::HasOwn on proxies. + assertEq(Object.prototype.hasOwnProperty.call(obj, key), true); +} diff --git a/js/src/jit-test/tests/cacheir/bug1651732-proxy-set.js b/js/src/jit-test/tests/cacheir/bug1651732-proxy-set.js new file mode 100644 index 0000000000..a52362a91f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1651732-proxy-set.js @@ -0,0 +1,23 @@ +// An object with a custom [Symbol.toPrimitive] function. +var key = { + value: "a", + + [Symbol.toPrimitive]() { + return this.value; + } +}; + +var target = {}; +var obj = new Proxy(target, {}); + +for (var i = 0; i < 100; ++i) { + // Change key[Symbol.toPrimitive] to return a symbol after some warm-up. + if (i > 80) { + key.value = Symbol.iterator; + } + + obj[key] = i; + + // Attach an IC for JSOp::SetElem on proxies. + assertEq(target[key.value], i); +} diff --git a/js/src/jit-test/tests/cacheir/bug1654947.js b/js/src/jit-test/tests/cacheir/bug1654947.js new file mode 100644 index 0000000000..673e5fd0c2 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1654947.js @@ -0,0 +1,11 @@ +function f() { + let g = x => (x >>> {} >>> x, x); + let arr = [0, 0xffff, undefined]; + for (let i = 0; i < 10; i++) { + for (let j = 0; j < 3; j++) { + let y = g(arr[j]); + assertEq(y, arr[j]); + } + } +} +f(); diff --git a/js/src/jit-test/tests/cacheir/bug1685684.js b/js/src/jit-test/tests/cacheir/bug1685684.js new file mode 100644 index 0000000000..06b37a852c --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1685684.js @@ -0,0 +1,8 @@ +let g = newGlobal({immutablePrototype: false}); +g.__proto__ = {}; +g.evaluate(`(function() { + for (var i = 0; i < 5; i++) { + d = eval('1'); + assertEq(d, 1); + } +})()`); diff --git a/js/src/jit-test/tests/cacheir/bug1685925-1.js b/js/src/jit-test/tests/cacheir/bug1685925-1.js new file mode 100644 index 0000000000..630b667026 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1685925-1.js @@ -0,0 +1,15 @@ +// |jit-test| error: TypeError: get length method +function f(o) { + return o.length; +} +let objects = [ + {}, + {length: 0}, + [], + {x: 0, length: 0}, + {x: 0, y: 0, length: 0}, + {x: 0, y: 0, z: 0, length: 0}, + new Uint32Array(), + Object.create(new Uint8Array()), +]; +objects.forEach(f); diff --git a/js/src/jit-test/tests/cacheir/bug1685925-2.js b/js/src/jit-test/tests/cacheir/bug1685925-2.js new file mode 100644 index 0000000000..c009a1c0ec --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1685925-2.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError: get length method +setJitCompilerOption("ic.force-megamorphic", 1); +function f(o) { + return o.length; +} +f(new Int8Array(4)); +f(Object.create(new Uint8Array())); diff --git a/js/src/jit-test/tests/cacheir/bug1713556.js b/js/src/jit-test/tests/cacheir/bug1713556.js new file mode 100644 index 0000000000..0db7a3aa25 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1713556.js @@ -0,0 +1,25 @@ +// |jit-test| skip-if: !wasmIsSupported() + +function wasmEvalText(str ) { + binary = wasmTextToBinary(str) + m = new WebAssembly.Module(binary) + return new WebAssembly.Instance(m) +} +ins = wasmEvalText(` + (func (export "get1") (param)) +`); +ins.exports.get1( + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 + ,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 + ,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 + ,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 + ,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 + ,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 + ,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 + ,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 + ,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 + ,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 + ,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 + ,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 + ,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9 +) diff --git a/js/src/jit-test/tests/cacheir/bug1757634.js b/js/src/jit-test/tests/cacheir/bug1757634.js new file mode 100644 index 0000000000..97ea3a87f4 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1757634.js @@ -0,0 +1,29 @@ +function testSmallIndex() { + var proto = Object.create(null); + var arr = []; + Object.setPrototypeOf(arr, proto); + + proto[0] = 123; + Object.freeze(proto); + + for (var i = 0; i < 20; i++) { + arr[0] = 321; + } + assertEq(arr[0], 123); +} +testSmallIndex(); + +function testLargeIndex() { + var proto = Object.create(null); + var arr = []; + Object.setPrototypeOf(arr, proto); + + proto[98765432] = 123; + Object.freeze(proto); + + for (var i = 0; i < 20; i++) { + arr[98765432] = 321; + } + assertEq(arr[98765432], 123); +} +testLargeIndex(); diff --git a/js/src/jit-test/tests/cacheir/bug1772824.js b/js/src/jit-test/tests/cacheir/bug1772824.js new file mode 100644 index 0000000000..f399a77cea --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1772824.js @@ -0,0 +1,15 @@ +function foo() { eval(); boundName += 1; } + +boundName = 0; +for (var i = 0; i < 10; i++) { + eval("var x" + i + " = 0;"); + foo(); +} + +// Redefine variable as const +evaluate(` + const boundName = 0; + for (var i = 0; i < 2; i++) { + try { foo(); } catch {} + } +`); diff --git a/js/src/jit-test/tests/cacheir/bug1785200.js b/js/src/jit-test/tests/cacheir/bug1785200.js new file mode 100644 index 0000000000..d568f6108d --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1785200.js @@ -0,0 +1,15 @@ +const target = {}; +const receiver = {}; +const id = 5; + +let count = 0; +function getter() { + count++; + assertEq(this, receiver); +} +Object.defineProperty(target, id, { get: getter }); + +for (var i = 0; i < 100; i++) { + Reflect.get(target, id, receiver); +} +assertEq(count, 100); diff --git a/js/src/jit-test/tests/cacheir/bug1788528-1.js b/js/src/jit-test/tests/cacheir/bug1788528-1.js new file mode 100644 index 0000000000..038ef1e12e --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1788528-1.js @@ -0,0 +1,15 @@ +// |jit-test| error:ReferenceError: can't access lexical declaration +function f(i) { + if (i === 19) { + g(); + } + let val = 0; + function g() { + eval(""); + val ||= 1; + } + g(); +} +for (var i = 0; i < 20; i++) { + f(i); +} diff --git a/js/src/jit-test/tests/cacheir/bug1788528-2.js b/js/src/jit-test/tests/cacheir/bug1788528-2.js new file mode 100644 index 0000000000..5f3701c3b0 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1788528-2.js @@ -0,0 +1,15 @@ +// |jit-test| error:ReferenceError: can't access lexical declaration +function f(i) { + if (i === 19) { + g(); + } + let val = 0; + function g() { + eval(""); + val = 1; + } + g(); +} +for (var i = 0; i < 20; i++) { + f(i); +} diff --git a/js/src/jit-test/tests/cacheir/bug1788528-3.js b/js/src/jit-test/tests/cacheir/bug1788528-3.js new file mode 100644 index 0000000000..52414669d4 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1788528-3.js @@ -0,0 +1,15 @@ +// |jit-test| error:ReferenceError: can't access lexical declaration +function f(i) { + if (i === 19) { + g(); + } + let val = 0; + function g() { + eval(""); + val += 1; + } + g(); +} +for (var i = 0; i < 20; i++) { + f(i); +} diff --git a/js/src/jit-test/tests/cacheir/bug1788528-4.js b/js/src/jit-test/tests/cacheir/bug1788528-4.js new file mode 100644 index 0000000000..67ab57e433 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1788528-4.js @@ -0,0 +1,15 @@ +// |jit-test| error:ReferenceError: can't access lexical declaration +function f(i) { + if (i === 19) { + g(); + } + let val = 0; + function g() { + eval(""); + val; + } + g(); +} +for (var i = 0; i < 20; i++) { + f(i); +} diff --git a/js/src/jit-test/tests/cacheir/bug1804634.js b/js/src/jit-test/tests/cacheir/bug1804634.js new file mode 100644 index 0000000000..c34e815f6b --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1804634.js @@ -0,0 +1,34 @@ +// |jit-test| --ion-instruction-reordering=off + +function inner(o) { + return o.x; +} +function outer(o) { + return inner(o); +} + +with ({}) {} + +var arr = []; +for (var i = 0; i < 3; i++) { + var obj = {x: 1}; + obj["y" + i] = 2; + arr.push(obj); +} + +// Transpile a GuardMultipleShapes with 3 shapes. +for (var i = 0; i < 2000; i++) { + assertEq(outer(arr[i % arr.length]), 1); +} + +// Bail out ten times with new shapes. +for (var i = 0; i < 10; i++) { + var obj = {x: 1}; + obj["z" + i] = 3; + assertEq(outer(obj), 1); +} + +// Trigger a recompilation. +for (var i = 0; i < 2000; i++) { + assertEq(outer(arr[i % arr.length]), 1); +} diff --git a/js/src/jit-test/tests/cacheir/bug1819486.js b/js/src/jit-test/tests/cacheir/bug1819486.js new file mode 100644 index 0000000000..6bb3e799ea --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1819486.js @@ -0,0 +1,18 @@ +class Base {} +class Derived extends Base { + constructor(a) { super(a); this.a = a; } +} +function test() { + var boundCtor = Derived.bind(); + for (var i = 0; i < 40; i++) { + new boundCtor(); + var ex = null; + try { + boundCtor(); + } catch(e) { + ex = e; + } + assertEq(ex instanceof TypeError, true); + } +} +test(); diff --git a/js/src/jit-test/tests/cacheir/bug1823212.js b/js/src/jit-test/tests/cacheir/bug1823212.js new file mode 100644 index 0000000000..951b3794cc --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1823212.js @@ -0,0 +1,13 @@ +with (newGlobal(this)) { + eval(` + function bar() {} + function foo(a) { + try { + foo(); + } catch { + bar(...arguments); + } + } + foo(); + `); +} diff --git a/js/src/jit-test/tests/cacheir/bug1834038.js b/js/src/jit-test/tests/cacheir/bug1834038.js new file mode 100644 index 0000000000..fb7581d3fc --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1834038.js @@ -0,0 +1,9 @@ +function foo() { + const v4 = []; + v4[1024] = {}; + v4.splice(0).push(0); +} + +for (let v0 = 0; v0 < 1000; v0++) { + foo(); +} diff --git a/js/src/jit-test/tests/cacheir/bug1837157.js b/js/src/jit-test/tests/cacheir/bug1837157.js new file mode 100644 index 0000000000..c468a1a259 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1837157.js @@ -0,0 +1,36 @@ +// |jit-test| --fast-warmup; --no-threads +with ({}) {} + +function foo(a) { + a.prop = 0; +} + +class A { + set prop(x) { } +} + +function newShape() { + class B extends A {} + return new B(); +} + +function triggerIonCompile() { + with ({}) {} + for (var i = 0; i < 50; i++) { + foo(initialShapes[i % initialShapes.length]) + } +} + +var initialShapes = []; +for (var i = 0; i < 8; i++) { + initialShapes.push(newShape()); +} + +triggerIonCompile(); + +for (var i = 0; i < 10; i++) { + foo(0); +} +foo(newShape()); + +triggerIonCompile(); diff --git a/js/src/jit-test/tests/cacheir/bug1842617.js b/js/src/jit-test/tests/cacheir/bug1842617.js new file mode 100644 index 0000000000..1524d5733f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1842617.js @@ -0,0 +1,30 @@ +// |jit-test| --baseline-eager + +function foo(src) { + try { + evaluate(src); + } catch {} + Math = undefined; +} + +foo(``); +foo(``); +foo(`var a = 0;`); +foo(`var b = 0;`); +foo(`var c = 0;`); +foo(`var d = 0;`); +foo(`undef();`); +foo(`{`); +foo(` + gc(); + e = 0; + gc(); +`); +foo(` + var f = 0; + gc(); + delete Math; +`); +foo(` + g = undefined; +`); diff --git a/js/src/jit-test/tests/cacheir/bug1851599.js b/js/src/jit-test/tests/cacheir/bug1851599.js new file mode 100644 index 0000000000..c960ee3f10 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1851599.js @@ -0,0 +1,44 @@ +// |jit-test| --fast-warmup; --no-threads + +function foo(phase, o1, o2) { + switch (phase) { + case 1: + return o1.x; + case 2: + return o1.x + o2.x; + } +} + +// Set `foo` as last child and `bar` as last parent. +function phase1() { + eval(` + function bar(o) { + foo(1, o); + } + with ({}) {} + for (var j = 0; j < 100; j++) { + var obj = {x: 1}; + obj["y" + (j % 10)] = 2; + bar(obj); + } + bar({y: 1, x: 2}); + `); +} +phase1(); + +// Collect `bar`. +gc(); + +// Recompile `foo` monomorphically. +with ({}) {} +for (var i = 0; i < 100; i++) { + foo(2, {x: 1}, {x: 1}); +} + +// Bail out and create a folded stub in `foo`. +// The child matches, so we use `bar` as the owning script. +for (var i = 0; i < 6; i++) { + var obj = {x: 1}; + obj["y" + i] = 2; + foo(2, {y: 1, x: 2}, obj); +} diff --git a/js/src/jit-test/tests/cacheir/bug1851911.js b/js/src/jit-test/tests/cacheir/bug1851911.js new file mode 100644 index 0000000000..c066ed9c3e --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1851911.js @@ -0,0 +1,35 @@ +// |jit-test| --fast-warmup; --no-threads; --blinterp-eager + +function foo(o) { + return o.x; +} + +function bar(n) { + with ({}) {} + class C {} + for (var i = 0; i < n; i++) { + var c = new C(); + c.x = 0; + foo(c); + } +} + +with ({}) {} + +function triggerIonCompile() { + for (var i = 0; i < 10; i++) { + bar(3); + } +} + +triggerIonCompile(); + +// Fill up shape list +for (var i = 0; i < 6; i++) { + bar(10); +} + +bar(10); +gc(); + +triggerIonCompile(); diff --git a/js/src/jit-test/tests/cacheir/bug1852893-1.js b/js/src/jit-test/tests/cacheir/bug1852893-1.js new file mode 100644 index 0000000000..150c6252ae --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1852893-1.js @@ -0,0 +1,27 @@ +// |jit-test| --fast-warmup; --no-threads; --blinterp-eager + +function foo(o) { + return foo_inner(o); +} + +function foo_inner(o) { + return o.x; +} +with ({}) {} + +for (var i = 0; i < 13; i++) { + foo({x:1, ["y" + (i % 5)]: 2}); +} + +for (var i = 0; i < 17; i++) { + foo({x: 1, ["y" + (i % 8)]: 2}); +} + +eval("for (var i = 0; i < 10; i++) foo({y: 1, x:2})") + +// Purge a stub inside a trial-inlined script. +gc(); + +for (var i = 0; i < 50; i++) { + foo({x: 1, ["y" + (i % 3)]: 2}); +} diff --git a/js/src/jit-test/tests/cacheir/bug1852893-2.js b/js/src/jit-test/tests/cacheir/bug1852893-2.js new file mode 100644 index 0000000000..daf1d2d8b9 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1852893-2.js @@ -0,0 +1,42 @@ +// |jit-test| --fast-warmup; --no-threads; --blinterp-eager + +function foo(o) { + return foo_inner(o); +} + +function foo_inner(o) { + return o.x; +} + +function bar(n) { + with ({}) {} + class C {} + for (var i = 0; i < n; i++) { + var c = new C(); + c.x = 0; + foo(c); + } +} + +with ({}) {} + +function triggerIonCompile() { + for (var i = 0; i < 10; i++) { + bar(3); + } +} + +triggerIonCompile(); + +// Fill up shape list +for (var i = 0; i < 6; i++) { + bar(10); +} + +// Overflow shape list, adding a new baseline IC. +bar(10); + +// Purge a stub inside a monomorphically-inlined script. +gc(); + +triggerIonCompile(); diff --git a/js/src/jit-test/tests/cacheir/call-any-native.js b/js/src/jit-test/tests/cacheir/call-any-native.js new file mode 100644 index 0000000000..7af6d2102c --- /dev/null +++ b/js/src/jit-test/tests/cacheir/call-any-native.js @@ -0,0 +1,59 @@ +// Test non-constructor calls + +var funcs = [Math.max, Math.min, Math.floor, Math.ceil, Math.sin, + Math.cos, Math.tan, Math.log, Math.acos, Math.asin]; + +// Calculate expected values +var expected = [Math.max(0.5, 2), Math.min(0.5, 2), + Math.floor(0.5, 2), Math.ceil(0.5, 2), + Math.sin(0.5, 2), Math.cos(0.5, 2), + Math.tan(0.5, 2), Math.log(0.5, 2), + Math.acos(0.5, 2), Math.asin(0.5, 2)]; + +// Test a polymorphic call site +for (var n = 0; n < 50; n++) { + for (var i = 0; i < funcs.length; i++) { + assertEq(funcs[i](0.5, 2), expected[i]); + } +} + +// Test a polymorphic spread call site +var spreadinput = [0.5, 2]; +for (var n = 0; n < 50; n++) { + for (var i = 0; i < funcs.length; i++) { + assertEq(funcs[i](...spreadinput), expected[i]); + } +} + +// Test constructors + +function f1(x) {this[0] = x; this.length = 3;} +function f2(x) {this[0] = x; this.length = 3;} +function f3(x) {this[0] = x; this.length = 3;} +function f4(x) {this[0] = x; this.length = 3;} +function f5(x) {this[0] = x; this.length = 3;} +function f6(x) {this[0] = x; this.length = 3;} +function f7(x) {this[0] = x; this.length = 3;} +function f8(x) {this[0] = x; this.length = 3;} +function f9(x) {this[0] = x; this.length = 3;} + +var constructors = [f1,f2,f3,f4,f5,f6,f7,f8,f9,Array]; + +// Test a polymorphic constructor site +for (var n = 0; n < 50; n++) { + for (var i = 0; i < constructors.length; i++) { + let x = new constructors[i](1,2,3); + assertEq(x.length, 3); + assertEq(x[0], 1); + } +} + +var constructorinput = [1,2,3]; +// Test a polymorphic spread constructor site +for (var n = 0; n < 50; n++) { + for (var i = 0; i < constructors.length; i++) { + let x = new constructors[i](...constructorinput); + assertEq(x.length, 3); + assertEq(x[0], 1); + } +} diff --git a/js/src/jit-test/tests/cacheir/call-bound-function-many-args.js b/js/src/jit-test/tests/cacheir/call-bound-function-many-args.js new file mode 100644 index 0000000000..1e17aa70e1 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/call-bound-function-many-args.js @@ -0,0 +1,63 @@ +function sum(...args) { + var res = 0; + for (var i = 0; i < args.length; i++) { + res += args[i]; + } + return {v: res}; +} + +function testManyArgs1() { + var bound = sum.bind(null); + for (var i = 0; i < 20; i++) { + assertEq(bound(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255).v, + 32640); + assertEq(new bound(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255).v, + 32640); + } +} +testManyArgs1(); + +function testManyArgs2() { + var bound = sum.bind(null, 1, 2, 3, 4, 5, 6); + for (var i = 0; i < 20; i++) { + assertEq(bound(7, 8, 9, 10, 11, 12).v, 78); + assertEq(bound(7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20).v, 210); + assertEq(bound(7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29).v, 435); + assertEq(new bound(7, 8, 9, 10, 11, 12).v, 78); + assertEq(new bound(7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20).v, 210); + assertEq(new bound(7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29).v, 435); + } +} +testManyArgs2(); diff --git a/js/src/jit-test/tests/cacheir/call-bound-scripted.js b/js/src/jit-test/tests/cacheir/call-bound-scripted.js new file mode 100644 index 0000000000..960ca1f8ac --- /dev/null +++ b/js/src/jit-test/tests/cacheir/call-bound-scripted.js @@ -0,0 +1,84 @@ +function testNumBoundArgsGuard() { + function f(a, b, c, d, e, f, g, h) { + return [a, b, c, d, e, f, g, h].join(","); + } + var arr = [ + f.bind(null, 1, 2, 3, 4, 5, 6), + f.bind(null, 4, 5, 6, 7, 8, 9), + f.bind(null, 1, 2), + f.bind(null, 1), + ]; + var expected = [ + "1,2,3,4,5,6,10,11", + "4,5,6,7,8,9,10,11", + "1,2,10,11,12,13,14,15", + "1,10,11,12,13,14,15,", + ]; + for (var i = 0; i < 100; i++) { + assertEq(arr[0](10, 11, 12, 13, 14, 15), expected[0]); + assertEq(arr[1](10, 11, 12, 13, 14, 15), expected[1]); + assertEq(arr[2](10, 11, 12, 13, 14, 15), expected[2]); + assertEq(arr[3](10, 11, 12, 13, 14, 15), expected[3]); + assertEq(arr[i % arr.length](10, 11, 12, 13, 14, 15), expected[i % arr.length]); + } +} +testNumBoundArgsGuard(); + +function testJSFunctionGuard() { + var arr = [ + (x => x * 0).bind(null, 1), + (x => x * 1).bind(null, 2), + (x => x * 2).bind(null, 3), + (x => x * 3).bind(null, 4), + (x => x * 4).bind(null, 5), + (x => x * 5).bind(null, 6), + (x => x * 6).bind(null, 7), + (x => x * 7).bind(null, 8), + (x => x * 8).bind(null, 9), + ]; + var boundNative = Math.abs.bind(null, -123); + var boundProxy = (new Proxy(x => x * 42, {})).bind(null, 7); + + for (var i = 0; i < 100; i++) { + var idx = i % arr.length; + var fun1 = arr[idx]; + var expected1 = idx * (idx + 1); + assertEq(fun1(), expected1); + var fun2 = i > 70 ? boundNative : fun1; + assertEq(fun2(), i > 70 ? 123 : expected1); + var fun3 = i > 70 ? boundProxy : fun1; + assertEq(fun3(), i > 70 ? 294 : expected1); + } +} +testJSFunctionGuard(); + +function testCrossRealmTarget() { + globalThis.num = "FAIL"; + + var globals = []; + for (var i = 0; i < 4; i++) { + var g = newGlobal({sameCompartmentAs: this}); + g.num = i; + globals.push(g); + } + var arr = globals.map(g => g.evaluate("(x => this.num)")); + arr = arr.map(f => Function.prototype.bind.call(f, null)); + + for (var i = 0; i < 200; i++) { + assertEq(arr[0](), 0); + var idx = i % arr.length; + assertEq(arr[idx](), idx); + } +} +testCrossRealmTarget(); + +// Bug 1819651. +function testReturnsItself() { + var fun = function() { return boundFun; }; + var boundFun = fun.bind(null); + for (var i = 0; i < 20; i++) { + assertEq(boundFun(), boundFun); + assertEq(new boundFun(), boundFun); + } +} +testReturnsItself(); diff --git a/js/src/jit-test/tests/cacheir/call-native-get-element-super.js b/js/src/jit-test/tests/cacheir/call-native-get-element-super.js new file mode 100644 index 0000000000..c19baab62c --- /dev/null +++ b/js/src/jit-test/tests/cacheir/call-native-get-element-super.js @@ -0,0 +1,44 @@ +// |jit-test| --fast-warmup; --no-threads + +const target = {}; +const receiver = {}; + +let count = 0; +function getter() { + count++; + assertEq(this, receiver); +} + +var x = Math.hypot(1,0); +var y = 2**31 - 1; +var z = -1; + +Object.defineProperty(target, x, { get: getter }); +Object.defineProperty(target, y, { get: getter }); +Object.defineProperty(target, z, { get: getter }); + +function get(id) { + return Reflect.get(target, id, receiver); +} + +function test() { + with ({}) {} + count = 0; + for (var i = 0; i < 100; i++) { + get(x); + get(y); + get(z); + } + assertEq(count, 300); +} + +// Test baseline IC / transpiled to MIR +test(); + +// Force an IC in Ion. +for (var i = 0; i < 10; i++) { + get("a"); +} + +// Test ion IC +test(); diff --git a/js/src/jit-test/tests/cacheir/ccw-missing.js b/js/src/jit-test/tests/cacheir/ccw-missing.js new file mode 100644 index 0000000000..275b998558 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/ccw-missing.js @@ -0,0 +1,4 @@ +var wrapper = evaluate("var o = {}; o", {global: newGlobal({sameZoneAs: this})}); +for (var i = 0; i < 50; i++) { + assertEq(wrapper.x, undefined); +} diff --git a/js/src/jit-test/tests/cacheir/compare-null-or-undef.js b/js/src/jit-test/tests/cacheir/compare-null-or-undef.js new file mode 100644 index 0000000000..b39eefd957 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/compare-null-or-undef.js @@ -0,0 +1,93 @@ +// Test relational comparison when one operand is null or undefined. + +function test(xs) { + for (let i = 0; i < 200; ++i) { + let x = xs[i % xs.length]; + + // The result is equal when compared to the result with explicit ToNumber conversions. + + // Test when null-or-undefined is on the right-hand side. + assertEq(x < nullOrUndef, (+x) < (+nullOrUndef)); + assertEq(x <= nullOrUndef, (+x) <= (+nullOrUndef)); + assertEq(x >= nullOrUndef, (+x) >= (+nullOrUndef)); + assertEq(x > nullOrUndef, (+x) > (+nullOrUndef)); + + // Test when null-or-undefined is on the left-hand side. + assertEq(nullOrUndef < x, (+nullOrUndef) < (+x)); + assertEq(nullOrUndef <= x, (+nullOrUndef) <= (+x)); + assertEq(nullOrUndef >= x, (+nullOrUndef) >= (+x)); + assertEq(nullOrUndef > x, (+nullOrUndef) > (+x)); + } +} + +function runTest(inputs) { + let fNull = Function(`return ${test}`.replaceAll("nullOrUndef", "null"))(); + fNull(inputs); + + let fUndefined = Function(`return ${test}`.replaceAll("nullOrUndef", "undefined"))(); + fUndefined(inputs); +} + +// Null inputs. +runTest([ + null, +]); + +// Undefined inputs. +runTest([ + undefined, +]); + +// Null or undefined inputs. +runTest([ + null, + undefined, +]); + +// Int32 inputs +runTest([ + -0x8000_0000, + -0x7fff_ffff, + -0x7fff_fffe, + -2, + -1, + 0, + 1, + 2, + 0x7fff_fffe, + 0x7fff_ffff, +]); + +// Number inputs +runTest([ + Number.NEGATIVE_INFINITY, + -Number.MAX_VALUE, + Number.MIN_SAFE_INTEGER, + -1.5, + -0.5, + -Number.EPSILON, + -Number.MIN_VALUE, + -0, + 0, + Number.MIN_VALUE, + Number.EPSILON, + 0.5, + 1.5, + Number.MAX_SAFE_INTEGER, + Number.MAX_VALUE, + Number.POSITIVE_INFINITY, + NaN, +]); + +// Boolean inputs. +runTest([ + true, false, +]); + +// String inputs +runTest([ + "", + "0", "-0", "0.0", "0e100", + "1", "1.5", "-1234", "-1e0", + "Infinity", "NaN", "not-a-number", +]); diff --git a/js/src/jit-test/tests/cacheir/compare.js b/js/src/jit-test/tests/cacheir/compare.js new file mode 100644 index 0000000000..3656a7d0ee --- /dev/null +++ b/js/src/jit-test/tests/cacheir/compare.js @@ -0,0 +1,292 @@ +setJitCompilerOption('ion.forceinlineCaches', 1); + +function warmup(fun, input_array) { + for (var index = 0; index < input_array.length; index++) { + input = input_array[index]; + input_lhs = input[0]; + input_rhs = input[1]; + output = input[2]; + for (var i = 0; i < 30; i++) { + var str = ""; + var y = fun(input_lhs, input_rhs); + if (y != output) { + str = "Computed: "+y+ ", expected: "+ output + " ( " + fun + " lhs: "+ input_lhs + " rhs: " + input_rhs +")"; + } + assertEq(str, ""); + } + } +} + + +// Int32 + Int32 +var Int32Int32Fun_GT1 = (a, b) => { return a > b; } +warmup(Int32Int32Fun_GT1, [[1,2, false], [1,1, false], [3,4, false], [4294967295, 2, true], + [NaN, 2, false], [-1000, NaN, false], [NaN, NaN, false], [10, undefined, false]]); + +var Int32Int32Fun_GTE1 = (a, b) => { return a >= b; } +warmup(Int32Int32Fun_GTE1, [[1,2, false], [1,1, true], [3,4, false], [4294967295, 2, true], + [NaN, 2, false], [-1000, NaN, false], [NaN, NaN, false], [10, undefined, false]]); + +var Int32Int32Fun_LT1 = (a, b) => { return a < b; } +warmup(Int32Int32Fun_LT1, [[1,2, true], [1,1, false], [3,4, true], [4294967295, 2, false], + [NaN, 2, false],[-1000, NaN, false], [NaN, NaN, false], [10, undefined, false]]); + +var Int32Int32Fun_LTE1 = (a, b) => { return a <= b; } +warmup(Int32Int32Fun_LTE1, [[1,2, true], [1,1, true], [3,4, true], [4294967295, 2, false], + [NaN, 2, false], [-1000, NaN, false], [NaN, NaN, false], [10, undefined, false]]); + +var Int32Int32Fun_EQ1 = (a, b) => { return a == b; } +warmup(Int32Int32Fun_EQ1, [[1,2, false], [1,1, true], [3,4, false], [4294967295, 2, false], + [NaN, 2, false], [-1000, NaN, false], [undefined, null, true], + ['0', 0, true], [new String('0'), 0, true], [10, undefined, false]]); + +var Int32Int32Fun_EQ2 = (a, b) => { return a == b; } +warmup(Int32Int32Fun_EQ2, [[1, NaN, false], [1, undefined, false], [1, null, false]]); + +var Int32Int32Fun_EQ3 = (a, b) => { return a == b; } +warmup(Int32Int32Fun_EQ3, [[{a: 1}, NaN, false], [{a: 1}, undefined, false], [{a: 1}, null, false]]); + +var Int32Int32Fun_EQ4 = (a, b) => { return a == b; } +warmup(Int32Int32Fun_EQ4, [[undefined, undefined, true], [null, null, true], [null, undefined, true], [undefined, null, true]]); + + +var Int32Int32Fun_NEQ1 = (a, b) => { return a != b; } +warmup(Int32Int32Fun_NEQ1, [[1,2, true], [1,1, false], [3,4, true], [4294967295, 2, true], + [NaN, 2, true], [-1000, NaN, true], [undefined, null, false], + ['0', 0, false], [new String('0'), 0, false], [10, undefined, true]]); + +var Int32Int32Fun_NEQ2 = (a, b) => { return a != b; } +warmup(Int32Int32Fun_NEQ2, [[1, NaN, true], [1, undefined, true], [1, null, true]]); + +var Int32Int32Fun_NEQ3 = (a, b) => { return a != b; } +warmup(Int32Int32Fun_NEQ3, [[{a: 1}, NaN, true], [{a: 1}, undefined, true], [{a: 1}, null, true]]); + +var Int32Int32Fun_NEQ4 = (a, b) => { return a != b; } +warmup(Int32Int32Fun_NEQ4, [[undefined, undefined, false], [null, null, false], [null, undefined, false], [undefined, null, false]]); + +var Int32Int32Fun_SEQ1 = (a, b) => { return a === b; } +warmup(Int32Int32Fun_SEQ1, [[1,2, false], [1,1, true], [3,4, false], [4294967295, 2, false], + [NaN, 2, false], [-1000, NaN, false], [undefined, null, false], + ['0', 0, false], [new String('0'), 0, false], [10, undefined, false]]); + +var Int32Int32Fun_SEQ2 = (a, b) => { return a === b; } +warmup(Int32Int32Fun_SEQ2, [[1, NaN, false], [1, undefined, false], [1, null, false]]); + +var Int32Int32Fun_SEQ3 = (a, b) => { return a === b; } +warmup(Int32Int32Fun_SEQ3, [[{a: 1}, NaN, false], [{a: 1}, undefined, false], [{a: 1}, null, false]]); + +var Int32Int32Fun_SEQ4 = (a, b) => { return a === b; } +warmup(Int32Int32Fun_SEQ4, [[undefined, undefined, true], [null, null, true], [null, undefined, false], [undefined, null, false] ]); + +var Int32Int32Fun_SEQ5 = (a, b) => { return a === b; } +warmup(Int32Int32Fun_SEQ5, [[1, true, false], [1, false, false], [false, 1, false], [true, 0, false], [true, true, true]]); + +var Int32Int32Fun_SNEQ1 = (a, b) => { return a !== b; } +warmup(Int32Int32Fun_SNEQ1, [[1,2, true], [1,1, false], [3,4, true], [4294967295, 2, true], + [NaN, 2, true], [-1000, NaN, true], [undefined, null, true], + ['0', 0, true], [new String('0'), 0, true], [10, undefined, true]]); + +var Int32Int32Fun_SNEQ2 = (a, b) => { return a !== b; } +warmup(Int32Int32Fun_SNEQ2, [[1, NaN, true], [1, undefined, true], [1, null, true]]); + +var Int32Int32Fun_SNEQ3 = (a, b) => { return a !== b; } +warmup(Int32Int32Fun_SNEQ3, [[{a: 1}, NaN, true], [{a: 1}, undefined, true], [{a: 1}, null, true]]); + +var Int32Int32Fun_SNEQ4 = (a, b) => { return a !== b; } +warmup(Int32Int32Fun_SNEQ4, [[undefined, undefined, false], [null, null, false], [null, undefined, true], [undefined, null, true] ]); + +var Int32Int32Fun_SNEQ5 = (a, b) => { return a !== b; } +warmup(Int32Int32Fun_SNEQ5, [[1, true, true], [1, false, true], [false, 1, true], [true, 0, true]]); + + +// Number Number +var NumberNumberFun_GT1 = (a, b) => { return a > b; } +warmup(NumberNumberFun_GT1, [[1,2, false], [1.3, 2, false], [1, 2.6, false], [1.2,2.2, false], + [1,1, false], [3,4, false], [4294967295, 2, true], + [NaN, 2, false], [-1000, NaN, false], [NaN, NaN, false], [10.2, undefined, false]]); + +var NumberNumberFun_GTE1 = (a, b) => { return a >= b; } +warmup(NumberNumberFun_GTE1, [[1,2, false], [1.3, 2, false], [1, 2.6, false], [1.2,2.2, false], + [1,1, true], [3,4, false], [4294967295, 2, true], + [NaN, 2, false], [-1000, NaN, false], [NaN, NaN, false], [10.2, undefined, false]]); + +var NumberNumberFun_LT1 = (a, b) => { return a < b; } +warmup(NumberNumberFun_LT1, [[1,2, true], [1.3, 2, true], [1, 2.6, true], [1.2,2.2, true], + [1,1, false], [3,4, true], [4294967295, 2, false], + [NaN, 2, false],[-1000, NaN, false], [NaN, NaN, false, [10.2, undefined, false]]]); + +var NumberNumberFun_LTE1 = (a, b) => { return a <= b; } +warmup(NumberNumberFun_LTE1, [[1,2, true], [1.3, 2, true], [1, 2.6, true], [1.2,2.2, true], + [1,1, true], [3,4, true], [4294967295, 2, false], + [NaN, 2, false], [-1000, NaN, false], [NaN, NaN, false], [10.2, undefined, false]]); + +var NumberNumberFun_EQ1 = (a, b) => { return a == b; } +warmup(NumberNumberFun_EQ1, [[1,2, false], [1.3, 2, false], [1, 2.6, false], [1.2,2.2, false], + [1,1, true], [3,4, false], [4294967295, 2, false], + [NaN, 2, false], [-1000, NaN, false], [undefined, null, true], + ['0', 0, true], [new String('0'), 0, true], [10.2, undefined, false]]); + +var NumberNumberFun_NEQ1 = (a, b) => { return a != b; } +warmup(NumberNumberFun_NEQ1, [[1,2, true], [1.3, 2, true], [1, 2.6, true], [1.2,2.2, true], + [1,1, false], [3,4, true], [4294967295, 2, true], + [NaN, 2, true], [-1000, NaN, true], [undefined, null, false], + ['0', 0, false], [new String('0'), 0, false], [10.2, undefined, true]]); + +var NumberNumberFun_SEQ1 = (a, b) => { return a === b; } +warmup(NumberNumberFun_SEQ1, [[1,2, false], [1.3, 2, false], [1, 2.6, false], [1.2,2.2, false], + [1,1, true], [3,4, false], [4294967295, 2, false], + [NaN, 2, false], [-1000, NaN, false], [undefined, null, false], + ['0', 0, false], [new String('0'), 0, false], [10.2, undefined, false]]); + +var NumberNumberFun_SNEQ1 = (a, b) => { return a !== b; } +warmup(NumberNumberFun_SNEQ1, [[1,2, true], [1.3, 2, true], [1, 2.6, true], [1.2,2.2, true], + [1,1, false], [3,4, true], [4294967295, 2, true], + [NaN, 2, true], [-1000, NaN, true], [undefined, null, true], + ['0', 0, true], [new String('0'), 0, true], [10.2, undefined, true]]); + +// Boolean + Int32 +var BooleanFun_GT1 = (a, b) => { return a > b; } +warmup(BooleanFun_GT1, [[1,2, false], [true, 2, false], [1,1, false], [true,true, false], [3,4, false], ]); + +var BooleanFun_GTE1 = (a, b) => { return a >= b; } +warmup(BooleanFun_GTE1, [[1,2, false], [true, 2, false], [1,1, true], [true,true, true], [3,4, false]]); + +var BooleanFun_LT1 = (a, b) => { return a < b; } +warmup(BooleanFun_LT1, [[1,2, true], [true, 2, true], [1,1, false], [true,true, false], [3,4, true]]); + +var BooleanFun_LTE1 = (a, b) => { return a <= b; } +warmup(BooleanFun_LTE1, [[1,2, true], [true, 2, true], [1,1, true], [true,true, true], [3,4, true]]); + +var BooleanFun_EQ1 = (a, b) => { return a == b; } +warmup(BooleanFun_EQ1, [[1,2, false], [true, 2, false], [1,1, true], [true,true, true], [3,4, false], + ['0', 0, true], [new String('0'), 0, true], [10, undefined, false]]); + +var BooleanFun_NEQ1 = (a, b) => { return a != b; } +warmup(BooleanFun_NEQ1, [[1,2, true], [true, 2, true], [1,1, false], [true,true, false], [3,4, true], + ['0', 0, false], [new String('0'), 0, false], [10, undefined, true]]); + +var BooleanFun_SEQ1 = (a, b) => { return a === b; } +warmup(BooleanFun_SEQ1, [[1,2, false], [true, 2, false], [1,1, true], [true,true, true], [3,4, false]]); + +var BooleanFun_SNEQ1 = (a, b) => { return a !== b; } +warmup(BooleanFun_SNEQ1, [[1,2, true], [true, 2, true], [1,1, false], [true,true, false], [3,4, true]]); + +// Undefined / Null equality. +var UndefNull_EQ1 = (a, b) => { return a == b; } +warmup(UndefNull_EQ1, [[undefined, null, true], [undefined, undefined, true], [null, undefined, true], + [null, null, true], [{a: 10}, undefined, false], [{a: 10}, null, false]]); + +var UndefNull_NEQ1 = (a, b) => { return a != b; } +warmup(UndefNull_NEQ1, [[undefined, null, false], [undefined, undefined, false], [null, undefined, false], + [null, null, false], [{a: 10}, undefined, true], [{a: 10}, null, true]]); + +var UndefNull_SEQ1 = (a, b) => { return a === b; } +warmup(UndefNull_SEQ1, [[undefined, null, false], [undefined, undefined, true], [null, undefined, false], + [null, null, true], [{a: 10}, undefined, false], [{a: 10}, null, false]]); + +var UndefNull_SNEQ1 = (a, b) => { return a !== b; } +warmup(UndefNull_SNEQ1, [[undefined, null, true], [undefined, undefined, false], [null, undefined, true], + [null, null, false], [{a: 10}, undefined, true], [{a: 10}, null, true]]); + +var typeDifference = function(a,b) { return a === b; } +warmup(typeDifference, [[1,1, true], [3,3, true], [3, typeDifference, false],[typeDifference, {}, false], + [3.2, 1, false], [0, -0, true]]); + +// String + Number +var String_Number_GT1 = (a, b) => { return a > b; } +warmup(String_Number_GT1, [["1.4",2, false], [1,"1", false], ["3",4, false], + [-1024, "-1023", false], [1.3, "1.2", true]]); + +var String_Number_GTE1 = (a, b) => { return a >= b; } +warmup(String_Number_GTE1, [["1.4",2, false], [1,"1", true], [3,"4", false], + [-1024, "-1023", false], [1.2, "1.2", true]]); + +var String_Number_LT1 = (a, b) => { return a < b; } +warmup(String_Number_LT1, [["1.4",2, true], ["1",1, false], [3,"4", true], + [-1024, "-1023", true], [1.2, "1.2", false]]); + +var String_Number_LTE1 = (a, b) => { return a <= b; } +warmup(String_Number_LTE1, [["1.4",2, true], ["1",1, true], [3,"4", true], + [-1024, "-1023", true], [1.2, "1.2", true]]); + +var String_Number_EQ1 = (a, b) => { return a == b; } +warmup(String_Number_EQ1, [["1.4",2, false], ["1",1, true], [3,"4", false], + [-1024, "-1023", false], [1.2, "1.2", true]]); + +var String_Number_NEQ1 = (a, b) => { return a != b; } +warmup(String_Number_NEQ1, [["1.4",2, true], ["1",1, false], [3,"4", true], + [-1024, "-1023", true], [1.2, "1.2", false]]); + +var String_Number_SEQ1 = (a, b) => { return a === b; } +warmup(String_Number_SEQ1, [["1.4",2, false], ["1",1, false], [3,"4", false], + [-1024, "-1023", false], [1.2, "1.2", false]]); + +var String_Number_SNEQ1 = (a, b) => { return a !== b; } +warmup(String_Number_SNEQ1, [["1.4",2, true], ["1",1, true], [3,"4", true], + [-1024, "-1023", true], [1.2, "1.2", true]]); + +// String + String +var String_String_GT1 = (a, b) => a > b; +warmup(String_String_GT1, [["", "", false], ["a", "a", false], ["aa", "aa", false], + ["a", "", true], ["", "a", false], + ["a", "b", false], ["b", "a", true], + ["a", "ab", false], ["ab", "a", true], + ]); + +var String_String_GE1 = (a, b) => a >= b; +warmup(String_String_GE1, [["", "", true], ["a", "a", true], ["aa", "aa", true], + ["a", "", true], ["", "a", false], + ["a", "b", false], ["b", "a", true], + ["a", "ab", false], ["ab", "a", true], + ]); + +var String_String_LT1 = (a, b) => a < b; +warmup(String_String_LT1, [["", "", false], ["a", "a", false], ["aa", "aa", false], + ["a", "", false], ["", "a", true], + ["a", "b", true], ["b", "a", false], + ["a", "ab", true], ["ab", "a", false], + ]); + +var String_String_LE1 = (a, b) => a <= b; +warmup(String_String_LE1, [["", "", true], ["a", "a", true], ["aa", "aa", true], + ["a", "", false], ["", "a", true], + ["a", "b", true], ["b", "a", false], + ["a", "ab", true], ["ab", "a", false], + ]); + +var String_String_EQ1 = (a, b) => a == b; +warmup(String_String_EQ1, [["", "", true], ["a", "a", true], ["aa", "aa", true], + ["a", "", false], ["", "a", false], + ["a", "b", false], ["b", "a", false], + ["a", "ab", false], ["ab", "a", false], + ]); + +var String_String_SEQ1 = (a, b) => a === b; +warmup(String_String_SEQ1, [["", "", true], ["a", "a", true], ["aa", "aa", true], + ["a", "", false], ["", "a", false], + ["a", "b", false], ["b", "a", false], + ["a", "ab", false], ["ab", "a", false], + ]); + +var String_String_NE1 = (a, b) => a != b; +warmup(String_String_NE1, [["", "", false], ["a", "a", false], ["aa", "aa", false], + ["a", "", true], ["", "a", true], + ["a", "b", true], ["b", "a", true], + ["a", "ab", true], ["ab", "a", true], + ]); + +var String_String_SNE1 = (a, b) => a !== b; +warmup(String_String_SNE1, [["", "", false], ["a", "a", false], ["aa", "aa", false], + ["a", "", true], ["", "a", true], + ["a", "b", true], ["b", "a", true], + ["a", "ab", true], ["ab", "a", true], + ]); + +// IsHTMLDDA internal slot +// https://tc39.github.io/ecma262/#sec-IsHTMLDDA-internal-slot +var IsHTMLDDA_EQ1 = (a, b) => a == b; +warmup(IsHTMLDDA_EQ1, [[createIsHTMLDDA(), null, true], + [createIsHTMLDDA(), undefined, true], + [null, createIsHTMLDDA(), true], + [undefined, createIsHTMLDDA(), true], + ]); diff --git a/js/src/jit-test/tests/cacheir/construct-bound-realm.js b/js/src/jit-test/tests/cacheir/construct-bound-realm.js new file mode 100644 index 0000000000..686fdc6c11 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/construct-bound-realm.js @@ -0,0 +1,10 @@ +function f() { + var g = newGlobal({sameCompartmentAs: this}); + g.evaluate(`function f() {}`); + var boundF = g.f.bind(null); + for (var i = 0; i < 50; i++) { + var obj = new boundF(); + assertEq(objectGlobal(obj), g); + } +} +f(); diff --git a/js/src/jit-test/tests/cacheir/dataview-non-number-value-set.js b/js/src/jit-test/tests/cacheir/dataview-non-number-value-set.js new file mode 100644 index 0000000000..38c7a998b5 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/dataview-non-number-value-set.js @@ -0,0 +1,126 @@ +const types = [ + "Int8", + "Int16", + "Int32", + "Uint8", + "Uint16", + "Uint32", + "Float32", + "Float64", +]; + +function convert(type, value) { + let num = Number(value); + switch (type) { + case "Int8": + return ((num | 0) << 24) >> 24; + case "Int16": + return ((num | 0) << 16) >> 16; + case "Int32": + return (num | 0); + case "Uint8": + return (num >>> 0) & 0xff; + case "Uint16": + return (num >>> 0) & 0xffff; + case "Uint32": + return (num >>> 0); + case "Uint8Clamped": { + if (Number.isNaN(num)) { + return 0; + } + let clamped = Math.max(0, Math.min(num, 255)); + let f = Math.floor(clamped); + if (clamped < f + 0.5) { + return f; + } + if (clamped > f + 0.5) { + return f + 1; + } + return f + (f & 1); + } + case "Float32": + return Math.fround(num); + case "Float64": + return num; + } + throw new Error(); +} + + +function runTest(type, initial, values) { + let expected = values.map(v => convert(type, v)); + assertEq( + expected.some(e => Object.is(e, initial)), + false, + "initial must be different from the expected values" + ); + + // Create a fresh function to ensure ICs are specific to a single DataView function. + let test = Function("initial, values, expected", ` + let ab = new ArrayBuffer(16); + let dv = new DataView(ab); + for (let i = 0; i < 200; ++i) { + dv.set${type}(0, initial); + dv.set${type}(0, values[i % values.length]); + assertEq(dv.get${type}(0), expected[i % expected.length]); + } + `); + test(initial, values, expected); +} + +const tests = [ + // |null| is coerced to zero. + { + initial: 1, + values: [null], + }, + + // |undefined| is coerced to zero or NaN. + { + initial: 1, + values: [undefined], + }, + + // |false| is coerced to zero and |true| is coerced to one. + { + initial: 2, + values: [false, true], + }, + + // Strings without a fractional part. + { + initial: 42, + values: [ + "0", "1", "10", "111", "128", "256", "0x7fffffff", "0xffffffff", + ], + }, + + // Strings without a fractional part, but a leading minus sign. + { + initial: 42, + values: [ + "-0", "-1", "-10", "-111", "-128", "-256", "-2147483647", "-4294967295", + ], + }, + + // Strings with a fractional number part. + { + initial: 42, + values: [ + "0.1", "1.2", "10.8", "111.9", + "-0.1", "-1.2", "-10.8", "-111.9", + ], + }, + + // Special values and strings not parseable as a number. + { + initial: 42, + values: ["Infinity", "-Infinity", "NaN", "foobar"], + }, +]; + +for (let type of types) { + for (let {initial, values} of tests) { + runTest(type, initial, values); + } +} diff --git a/js/src/jit-test/tests/cacheir/dom-call.js b/js/src/jit-test/tests/cacheir/dom-call.js new file mode 100644 index 0000000000..e796bbbadd --- /dev/null +++ b/js/src/jit-test/tests/cacheir/dom-call.js @@ -0,0 +1,29 @@ +function simple() { + var obj = new FakeDOMObject(); + for (var i = 0; i < 10; i++) { + assertEq(obj.doFoo(0, 0, 0), 3); + } +} + +function wrongThis() { + var obj = new FakeDOMObject(); + var wrong = {doFoo: obj.doFoo}; + + for (var i = 0; i < 100; i++) { + assertEq(obj.doFoo(0, 0), i <= 50 ? 2 : undefined); + if (i == 50) { + obj = wrong; + } + } +} + +function spread() { + var obj = new FakeDOMObject(); + for (var i = 0; i < 10; i++) { + assertEq(obj.doFoo(...[1, 2, 3, 4]), 4); + } +} + +simple(); +wrongThis(); +spread(); \ No newline at end of file diff --git a/js/src/jit-test/tests/cacheir/fun-apply-as-call-native-1.js b/js/src/jit-test/tests/cacheir/fun-apply-as-call-native-1.js new file mode 100644 index 0000000000..6558176f54 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/fun-apply-as-call-native-1.js @@ -0,0 +1,38 @@ +// Function.prototype.apply is inlined as Function.prototype.call when it's +// called with less than two arguments. +// +// Test monomorphic calls. + +function testThisAbsent() { + for (let i = 0; i < 200; ++i) { + let r = Math.min.apply(); + assertEq(r, Infinity); + } +} +for (let i = 0; i < 2; ++i) testThisAbsent(); + +function test0() { + for (let i = 0; i < 200; ++i) { + let r = Math.min.apply(null); + assertEq(r, Infinity); + } +} +for (let i = 0; i < 2; ++i) test0(); + +// NOTE: We don't yet inline the case when the second argument is |null|. +function test1Null() { + for (let i = 0; i < 200; ++i) { + let r = Math.min.apply(null, null); + assertEq(r, Infinity); + } +} +for (let i = 0; i < 2; ++i) test1Null(); + +// NOTE: We don't yet inline the case when the second argument is |undefined|. +function test1Undefined() { + for (let i = 0; i < 200; ++i) { + let r = Math.min.apply(null, undefined); + assertEq(r, Infinity); + } +} +for (let i = 0; i < 2; ++i) test1Undefined(); diff --git a/js/src/jit-test/tests/cacheir/fun-apply-as-call-native-2.js b/js/src/jit-test/tests/cacheir/fun-apply-as-call-native-2.js new file mode 100644 index 0000000000..b1295c99bd --- /dev/null +++ b/js/src/jit-test/tests/cacheir/fun-apply-as-call-native-2.js @@ -0,0 +1,46 @@ +// Function.prototype.apply is inlined as Function.prototype.call when it's +// called with less than two arguments. +// +// Test polymorphic calls. + +function testThisAbsent() { + let xs = [Math.min, Math.max]; + let ys = [Infinity, -Infinity]; + for (let i = 0; i < 200; ++i) { + let r = xs[i & 1].apply(); + assertEq(r, ys[i & 1]); + } +} +for (let i = 0; i < 2; ++i) testThisAbsent(); + +function test0() { + let xs = [Math.min, Math.max]; + let ys = [Infinity, -Infinity]; + for (let i = 0; i < 200; ++i) { + let r = xs[i & 1].apply(null); + assertEq(r, ys[i & 1]); + } +} +for (let i = 0; i < 2; ++i) test0(); + +// NOTE: We don't yet inline the case when the second argument is |null|. +function test1Null() { + let xs = [Math.min, Math.max]; + let ys = [Infinity, -Infinity]; + for (let i = 0; i < 200; ++i) { + let r = xs[i & 1].apply(null, null); + assertEq(r, ys[i & 1]); + } +} +for (let i = 0; i < 2; ++i) test1Null(); + +// NOTE: We don't yet inline the case when the second argument is |undefined|. +function test1Undefined() { + let xs = [Math.min, Math.max]; + let ys = [Infinity, -Infinity]; + for (let i = 0; i < 200; ++i) { + let r = xs[i & 1].apply(null, undefined); + assertEq(r, ys[i & 1]); + } +} +for (let i = 0; i < 2; ++i) test1Undefined(); diff --git a/js/src/jit-test/tests/cacheir/fun-apply-as-call-native-3.js b/js/src/jit-test/tests/cacheir/fun-apply-as-call-native-3.js new file mode 100644 index 0000000000..5d3cee4afa --- /dev/null +++ b/js/src/jit-test/tests/cacheir/fun-apply-as-call-native-3.js @@ -0,0 +1,39 @@ +// Function.prototype.apply is inlined as Function.prototype.call when it's +// called with less than two arguments. +// +// Test inlining through specialised natives. + +// NOTE: We don't inline when |apply| is called with zero arguments. +function testThisAbsent() { + for (let i = 0; i < 200; ++i) { + let r = Array.apply(); + assertEq(r.length, 0); + } +} +for (let i = 0; i < 2; ++i) testThisAbsent(); + +function test0() { + for (let i = 0; i < 200; ++i) { + let r = Array.apply(null); + assertEq(r.length, 0); + } +} +for (let i = 0; i < 2; ++i) test0(); + +// NOTE: We don't yet inline the case when the second argument is |null|. +function test1Null() { + for (let i = 0; i < 200; ++i) { + let r = Array.apply(null, null); + assertEq(r.length, 0); + } +} +for (let i = 0; i < 2; ++i) test1Null(); + +// NOTE: We don't yet inline the case when the second argument is |undefined|. +function test1Undefined() { + for (let i = 0; i < 200; ++i) { + let r = Array.apply(null, undefined); + assertEq(r.length, 0); + } +} +for (let i = 0; i < 2; ++i) test1Undefined(); diff --git a/js/src/jit-test/tests/cacheir/fun-apply-as-call-scripted-1.js b/js/src/jit-test/tests/cacheir/fun-apply-as-call-scripted-1.js new file mode 100644 index 0000000000..a0227ba81a --- /dev/null +++ b/js/src/jit-test/tests/cacheir/fun-apply-as-call-scripted-1.js @@ -0,0 +1,42 @@ +// Function.prototype.apply is inlined as Function.prototype.call when it's +// called with less than two arguments. +// +// Test monomorphic calls. + +function one() { + return 1; +} + +function testThisAbsent() { + for (let i = 0; i < 200; ++i) { + let r = one.apply(); + assertEq(r, 1); + } +} +for (let i = 0; i < 2; ++i) testThisAbsent(); + +function test0() { + for (let i = 0; i < 200; ++i) { + let r = one.apply(null); + assertEq(r, 1); + } +} +for (let i = 0; i < 2; ++i) test0(); + +// NOTE: We don't yet inline the case when the second argument is |null|. +function test1Null() { + for (let i = 0; i < 200; ++i) { + let r = one.apply(null, null); + assertEq(r, 1); + } +} +for (let i = 0; i < 2; ++i) test1Null(); + +// NOTE: We don't yet inline the case when the second argument is |undefined|. +function test1Undefined() { + for (let i = 0; i < 200; ++i) { + let r = one.apply(null, undefined); + assertEq(r, 1); + } +} +for (let i = 0; i < 2; ++i) test1Undefined(); diff --git a/js/src/jit-test/tests/cacheir/fun-apply-as-call-scripted-2.js b/js/src/jit-test/tests/cacheir/fun-apply-as-call-scripted-2.js new file mode 100644 index 0000000000..39ff35d96b --- /dev/null +++ b/js/src/jit-test/tests/cacheir/fun-apply-as-call-scripted-2.js @@ -0,0 +1,50 @@ +// Function.prototype.apply is inlined as Function.prototype.call when it's +// called with less than two arguments. +// +// Test polymorphic calls. + +function one() { + return 1; +} + +function two() { + return 2; +} + +function testThisAbsent() { + let xs = [one, two]; + for (let i = 0; i < 200; ++i) { + let r = xs[i & 1].apply(); + assertEq(r, 1 + (i & 1)); + } +} +for (let i = 0; i < 2; ++i) testThisAbsent(); + +function test0() { + let xs = [one, two]; + for (let i = 0; i < 200; ++i) { + let r = xs[i & 1].apply(null); + assertEq(r, 1 + (i & 1)); + } +} +for (let i = 0; i < 2; ++i) test0(); + +// NOTE: We don't yet inline the case when the second argument is |null|. +function test1Null() { + let xs = [one, two]; + for (let i = 0; i < 200; ++i) { + let r = xs[i & 1].apply(null, null); + assertEq(r, 1 + (i & 1)); + } +} +for (let i = 0; i < 2; ++i) test1Null(); + +// NOTE: We don't yet inline the case when the second argument is |undefined|. +function test1Undefined() { + let xs = [one, two]; + for (let i = 0; i < 200; ++i) { + let r = xs[i & 1].apply(null, undefined); + assertEq(r, 1 + (i & 1)); + } +} +for (let i = 0; i < 2; ++i) test1Undefined(); diff --git a/js/src/jit-test/tests/cacheir/fun-apply-null-undefined.js b/js/src/jit-test/tests/cacheir/fun-apply-null-undefined.js new file mode 100644 index 0000000000..b310df577b --- /dev/null +++ b/js/src/jit-test/tests/cacheir/fun-apply-null-undefined.js @@ -0,0 +1,36 @@ +function testBasic() { + var thisVal = {}; + var arr = [1, 2, 3]; + var f = function() { + assertEq(this, thisVal); + assertEq(arguments.length, 0); + return 456; + }; + for (var i = 0; i < 100; i++) { + // Scripted callee. + assertEq(f.apply(thisVal), 456); + assertEq(f.apply(thisVal), 456); + assertEq(f.apply(thisVal, null), 456); + assertEq(f.apply(thisVal, undefined), 456); + + // Native callee. + assertEq(Math.abs.apply(), NaN); + assertEq(Math.abs.apply(null), NaN); + assertEq(Math.abs.apply(null, null), NaN); + assertEq(Array.prototype.join.apply(arr), "1,2,3"); + assertEq(Array.prototype.join.apply(arr, null), "1,2,3"); + assertEq(Array.prototype.join.apply(arr, undefined), "1,2,3"); + } +} +testBasic(); + +function testUndefinedGuard() { + var f = function() { return arguments.length; } + var arr = [-5, 5]; + for (var i = 0; i < 100; i++) { + var args = i < 50 ? undefined : arr; + assertEq(f.apply(null, args), i < 50 ? 0 : 2); + assertEq(Math.abs.apply(null, args), i < 50 ? NaN : 5); + } +} +testUndefinedGuard(); diff --git a/js/src/jit-test/tests/cacheir/fun-call-apply-weird.js b/js/src/jit-test/tests/cacheir/fun-call-apply-weird.js new file mode 100644 index 0000000000..ee1fe0e531 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/fun-call-apply-weird.js @@ -0,0 +1,31 @@ +// |jit-test| --fast-warmup + +// Function with overridden call/apply (scripted). +function funOverridden1(x, y) { return x + y; } +funOverridden1.call = x => x + 1; +funOverridden1.apply = x => x + 2; + +// Function with overridden call/apply (native). +function funOverridden2(x, y) { return x + y; } +funOverridden2.call = Math.abs; +funOverridden2.apply = Math.abs; + +// Function with call/apply properties with other names. +function funOverridden3(x, y) { return x + y; } +funOverridden3.myCall = Function.prototype.call; +funOverridden3.myApply = Function.prototype.apply; + +function f() { + var arr = [1, 2]; + for (var i = 0; i < 100; i++) { + assertEq(funOverridden1.call(i, i), i + 1); + assertEq(funOverridden1.apply(i, i), i + 2); + + assertEq(funOverridden2.call(i, i), i); + assertEq(funOverridden2.apply(i, i), i); + + assertEq(funOverridden3.myCall(null, i, i), i + i); + assertEq(funOverridden3.myApply(null, arr), 3); + } +} +f(); diff --git a/js/src/jit-test/tests/cacheir/fun-call-inline-native-1.js b/js/src/jit-test/tests/cacheir/fun-call-inline-native-1.js new file mode 100644 index 0000000000..c7e6fd3183 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/fun-call-inline-native-1.js @@ -0,0 +1,59 @@ +// Test inlining natives through Function.prototype.call +// +// Math.min() is inlined when there are 1-4 arguments. + +function mathMinThisAbsent() { + for (let i = 0; i < 400; ++i) { + let r = Math.min.call(); + assertEq(r, Infinity); + } +} +for (let i = 0; i < 2; ++i) mathMinThisAbsent(); + +function mathMin0() { + for (let i = 0; i < 400; ++i) { + let r = Math.min.call(null); + assertEq(r, Infinity); + } +} +for (let i = 0; i < 2; ++i) mathMin0(); + +function mathMin1() { + for (let i = 0; i < 400; ++i) { + let r = Math.min.call(null, i); + assertEq(r, i); + } +} +for (let i = 0; i < 2; ++i) mathMin1(); + +function mathMin2() { + for (let i = 0; i < 400; ++i) { + let r = Math.min.call(null, i, i + 1); + assertEq(r, i); + } +} +for (let i = 0; i < 2; ++i) mathMin2(); + +function mathMin3() { + for (let i = 0; i < 400; ++i) { + let r = Math.min.call(null, i, i + 1, i + 2); + assertEq(r, i); + } +} +for (let i = 0; i < 2; ++i) mathMin3(); + +function mathMin4() { + for (let i = 0; i < 400; ++i) { + let r = Math.min.call(null, i, i + 1, i + 2, i + 3); + assertEq(r, i); + } +} +for (let i = 0; i < 2; ++i) mathMin4(); + +function mathMin5() { + for (let i = 0; i < 400; ++i) { + let r = Math.min.call(null, i, i + 1, i + 2, i + 3, i + 4); + assertEq(r, i); + } +} +for (let i = 0; i < 2; ++i) mathMin5(); diff --git a/js/src/jit-test/tests/cacheir/fun-call-inline-native-2.js b/js/src/jit-test/tests/cacheir/fun-call-inline-native-2.js new file mode 100644 index 0000000000..13686e1119 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/fun-call-inline-native-2.js @@ -0,0 +1,20 @@ +// Test inlining natives through Function.prototype.call + +function test(fn, expected) { + for (let i = 0; i < 400; ++i) { + let r = fn.call(null, 0, 1); + assertEq(r, expected); + } +} + +for (let i = 0; i < 2; ++i) { + let fn, expected; + if (i === 0) { + fn = Math.min; + expected = 0; + } else { + fn = Math.max; + expected = 1; + } + test(fn, expected); +} diff --git a/js/src/jit-test/tests/cacheir/fun-call-inline-native-3.js b/js/src/jit-test/tests/cacheir/fun-call-inline-native-3.js new file mode 100644 index 0000000000..5d396d426e --- /dev/null +++ b/js/src/jit-test/tests/cacheir/fun-call-inline-native-3.js @@ -0,0 +1,35 @@ +// Test inlining natives through Function.prototype.call +// +// Array() is inlined when there are 0-1 arguments. + +function arrayThisAbsent() { + for (let i = 0; i < 400; ++i) { + let r = Array.call(); + assertEq(r.length, 0); + } +} +for (let i = 0; i < 2; ++i) arrayThisAbsent(); + +function array0() { + for (let i = 0; i < 400; ++i) { + let r = Array.call(null); + assertEq(r.length, 0); + } +} +for (let i = 0; i < 2; ++i) array0(); + +function array1() { + for (let i = 0; i < 400; ++i) { + let r = Array.call(null, 5); + assertEq(r.length, 5); + } +} +for (let i = 0; i < 2; ++i) array1(); + +function array2() { + for (let i = 0; i < 400; ++i) { + let r = Array.call(null, 5, 10); + assertEq(r.length, 2); + } +} +for (let i = 0; i < 2; ++i) array2(); diff --git a/js/src/jit-test/tests/cacheir/function-length.js b/js/src/jit-test/tests/cacheir/function-length.js new file mode 100644 index 0000000000..14e852683f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/function-length.js @@ -0,0 +1,48 @@ +function interpreted() { + for (var i = 0; i < 50; i++) { + var f = function () {}; + assertEq(f.length, 0); + } + + for (var i = 0; i < 50; i++) { + var f = function (a, b) {}; + assertEq(f.length, 2); + } +} + +function bound() { + for (var i = 0; i < 50; i++) { + var f = (function () {}).bind({}); + assertEq(f.length, 0); + } + + for (var i = 0; i < 50; i++) { + var f = (function (a, b) {}).bind({}); + assertEq(f.length, 2); + } +} + +function native() { + for (var i = 0; i < 50; i++) { + // Use the interpreted function for getting the IC generated in the first place. + var f = function (a) {}; + + if (i == 15) { + f = Math.sin; + } else if (i == 20) { + f = Math.cos; + } else if (i == 25) { + f = Math.ceil; + } else if (i == 30) { + f = Math.tan; + } else if (i == 35) { + f = Math.tanh; + } + + assertEq(f.length, 1); + } +} + +interpreted(); +bound(); +native(); \ No newline at end of file diff --git a/js/src/jit-test/tests/cacheir/function-name.js b/js/src/jit-test/tests/cacheir/function-name.js new file mode 100644 index 0000000000..43b603c362 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/function-name.js @@ -0,0 +1,59 @@ +function interpreted() { + for (var i = 0; i < 50; i++) { + var f = (0, function () {}); + assertEq(f.name, ""); + } + + for (var i = 0; i < 50; i++) { + var f = function () {}; + assertEq(f.name, "f"); + } + + for (var i = 0; i < 50; i++) { + var f = function a () {}; + assertEq(f.name, "a"); + } +} + +function bound() { + for (var i = 0; i < 50; i++) { + var f = (function () {}).bind({}); + assertEq(f.name, "bound "); + } + + for (var i = 0; i < 50; i++) { + var f = (function a () {}).bind({}); + assertEq(f.name, "bound a"); + } +} + +function native() { + for (var i = 0; i < 50; i++) { + // Use the interpreted function for getting the IC generated in the first place. + var f = function () {}; + + var name = "f"; + if (i == 15) { + f = Math.sin; + name = "sin"; + } else if (i == 20) { + f = Math.cos; + name = "cos"; + } else if (i == 25) { + f = Math.ceil; + name = "ceil"; + } else if (i == 30) { + f = Math.tan; + name = "tan"; + } else if (i == 35) { + f = Math.tanh; + name = "tanh"; + } + + assertEq(f.name, name); + } +} + +interpreted(); +bound(); +native(); diff --git a/js/src/jit-test/tests/cacheir/generic-spreadcall.js b/js/src/jit-test/tests/cacheir/generic-spreadcall.js new file mode 100644 index 0000000000..bf1b053a53 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/generic-spreadcall.js @@ -0,0 +1,14 @@ +var sum = 0; + +function foo() { sum++; } + +const MAX_JIT_ARGS = 4096 / 8; +var arr = []; +for (var i = 0; i < MAX_JIT_ARGS + 1; i++) { + arr.push(1); +} + +for (var i = 0; i < 275; i++) { + foo(...arr); +} +assertEq(sum, 275); diff --git a/js/src/jit-test/tests/cacheir/getelem-undefined-null.js b/js/src/jit-test/tests/cacheir/getelem-undefined-null.js new file mode 100644 index 0000000000..0cf84155cc --- /dev/null +++ b/js/src/jit-test/tests/cacheir/getelem-undefined-null.js @@ -0,0 +1,52 @@ +function exists() { + var a = {'null': 1, 'undefined': 2}; + for (var i = 0; i < 100; i++) { + assertEq(a[null], 1); + assertEq(a[undefined], 2); + } +} + +function missing() { + var a = {}; + for (var i = 0; i < 100; i++) { + assertEq(a[null], undefined); + assertEq(a[undefined], undefined); + } +} + +function getter() { + var a = { + get null() { + return 1; + }, + get undefined() { + return 2; + } + } + for (var i = 0; i < 100; i++) { + assertEq(a[null], 1); + assertEq(a[undefined], 2); + } +} + +function primitive() { + var v = true; + for (var i = 0; i < 100; i++) { + assertEq(v[null], undefined); + assertEq(v[undefined], undefined); + } +} + +function mixed() { + var a = {'null': 'null', 'undefined': 'undefined'}; + for (var i = 0; i < 100; i++) { + var v = a[i % 2 ? null : undefined] + assertEq(a[v], i % 2 ? 'null' : 'undefined'); + } +} + +exists(); +missing() +getter(); +primitive(); +mixed(); diff --git a/js/src/jit-test/tests/cacheir/getpropsuper.js b/js/src/jit-test/tests/cacheir/getpropsuper.js new file mode 100644 index 0000000000..a2eec4646f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/getpropsuper.js @@ -0,0 +1,15 @@ +setJitCompilerOption("ion.forceinlineCaches", 1); + +function testGetPropSuper() { + class C extends class { static p = 0 } { + static m() { + return super.p; + } + } + + for (var i = 0; i < 20; ++i) { + var v = C.m(); + assertEq(v, 0); + } +} +for (var i = 0; i < 2; ++i) testGetPropSuper(); diff --git a/js/src/jit-test/tests/cacheir/getter-primitive-value.js b/js/src/jit-test/tests/cacheir/getter-primitive-value.js new file mode 100644 index 0000000000..5dd188d5e1 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/getter-primitive-value.js @@ -0,0 +1,116 @@ +function testNativeGetter() { + function test() { + var xs = [Symbol("a"), Symbol("b")]; + var ys = ["a", "b"]; + + for (var i = 0; i < 100; ++i) { + var r = xs[i & 1].description; + assertEq(r, ys[i & 1]); + } + } + for (var i = 0; i < 2; ++i) test(); +} +testNativeGetter(); + +function testScriptedGetter() { + Object.defineProperty(Symbol.prototype, "desc", { + get() { + "use strict"; + assertEq(typeof this, "symbol"); + return this.description; + } + }); + + function test() { + var xs = [Symbol("a"), Symbol("b")]; + var ys = ["a", "b"]; + + for (var i = 0; i < 100; ++i) { + var r = xs[i & 1].desc; + assertEq(r, ys[i & 1]); + } + } + for (var i = 0; i < 2; ++i) test(); +} +testScriptedGetter(); + +function testScriptedGetterNonStrict() { + Object.defineProperty(Symbol.prototype, "desc_nonstrict", { + get() { + assertEq(typeof this, "object"); + return this.description; + } + }); + + function test() { + var xs = [Symbol("a"), Symbol("b")]; + var ys = ["a", "b"]; + + for (var i = 0; i < 100; ++i) { + var r = xs[i & 1].desc_nonstrict; + assertEq(r, ys[i & 1]); + } + } + for (var i = 0; i < 2; ++i) test(); +} +testScriptedGetterNonStrict(); + +function testNativeGetterPrototype() { + Object.defineProperty(Object.prototype, "description_proto", + Object.getOwnPropertyDescriptor(Symbol.prototype, "description")); + + function test() { + var xs = [Symbol("a"), Symbol("b")]; + var ys = ["a", "b"]; + + for (var i = 0; i < 100; ++i) { + var r = xs[i & 1].description_proto; + assertEq(r, ys[i & 1]); + } + } + for (var i = 0; i < 2; ++i) test(); +} +testNativeGetterPrototype(); + +function testScriptedGetterPrototype() { + Object.defineProperty(Object.prototype, "desc_proto", { + get() { + "use strict"; + assertEq(typeof this, "symbol"); + return this.description; + } + }); + + function test() { + var xs = [Symbol("a"), Symbol("b")]; + var ys = ["a", "b"]; + + for (var i = 0; i < 100; ++i) { + var r = xs[i & 1].desc_proto; + assertEq(r, ys[i & 1]); + } + } + for (var i = 0; i < 2; ++i) test(); +} +testScriptedGetterPrototype(); + +function testScriptedGetterNonStrictPrototype() { + Object.defineProperty(Object.prototype, "desc_nonstrict_proto", { + get() { + assertEq(typeof this, "object"); + return this.description; + } + }); + + function test() { + var xs = [Symbol("a"), Symbol("b")]; + var ys = ["a", "b"]; + + for (var i = 0; i < 100; ++i) { + var r = xs[i & 1].desc_nonstrict_proto; + assertEq(r, ys[i & 1]); + } + } + for (var i = 0; i < 2; ++i) test(); +} +testScriptedGetterNonStrictPrototype(); diff --git a/js/src/jit-test/tests/cacheir/getter-setter-guards1.js b/js/src/jit-test/tests/cacheir/getter-setter-guards1.js new file mode 100644 index 0000000000..9ca64dd7da --- /dev/null +++ b/js/src/jit-test/tests/cacheir/getter-setter-guards1.js @@ -0,0 +1,64 @@ +// Objects with same shape but different getter/setter. +function testOwnProp() { + var count = 0; + var objects = [{get x() { count += 1; }, set x(v) { count += 2; }}, + {get x() { count += 3; }, set x(v) { count += 4; }}, + {get x() { count += 5; }, set x(v) { count += 6; }}]; + assertEq(shapeOf(objects[0]), shapeOf(objects[1])); + assertEq(shapeOf(objects[0]), shapeOf(objects[2])); + for (var i = 0; i < 150; i++) { + var o = objects[i % objects.length]; + o.x++; + } + assertEq(count, 1050); +} +testOwnProp(); + +// Ensure optimized TypedArray length properly deoptimizes when the getter is +// redefined. +function testTypedArrayLength() { + var ta = new Int32Array(10); + var lengthHolder = Object.getPrototypeOf(Int32Array.prototype); + for (var i = 0; i < 150; i++) { + assertEq(ta.length, i <= 100 ? 10 : (i <= 130 ? "foo" : "bar")); + assertEq(ta.byteLength, 40); + assertEq(ta.byteOffset, 0); + if (i === 100) { + var desc = Object.getOwnPropertyDescriptor(lengthHolder, "length"); + desc.get = () => "foo"; + Object.defineProperty(lengthHolder, "length", desc); + } + if (i === 130) { + var desc = Object.getOwnPropertyDescriptor(lengthHolder, "length"); + desc.get = () => "bar"; + Object.defineProperty(lengthHolder, "length", desc); + } + } +} +testTypedArrayLength(); + +// Native accessors on the global object. Redefine a few times and ensure the +// right function is called. Use |useWindowProxy: false| to allow optimizing all +// native getters. +function testGlobalProp() { + var g = newGlobal({useWindowProxy: false}); + g.evaluate("" + function test() { + var arr = [Math, Object]; + var expected = 0; + for (var i = 0; i < 150; i++) { + assertEq(timesAccessed, i <= 100 ? i + 1 : (i > 130 ? Infinity : NaN)); + if (i === 100) { + var desc = Object.getOwnPropertyDescriptor(this, "timesAccessed"); + desc.get = Math.abs; + Object.defineProperty(this, "timesAccessed", desc); + } + if (i === 130) { + var desc = Object.getOwnPropertyDescriptor(this, "timesAccessed"); + desc.get = Math.min; + Object.defineProperty(this, "timesAccessed", desc); + } + } + }); + g.evaluate("test()"); +} +testGlobalProp(); diff --git a/js/src/jit-test/tests/cacheir/getter-setter-guards2.js b/js/src/jit-test/tests/cacheir/getter-setter-guards2.js new file mode 100644 index 0000000000..1f6e79cce7 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/getter-setter-guards2.js @@ -0,0 +1,130 @@ +function testRedefineGetter() { + var callGetter = function(o) { + return o.x; + }; + + var proto = {get foo() {}, bar: 1}; + var obj = Object.create(proto); + + // Add "x" getter on the prototype. Warm up the IC. + var count1 = 0; + Object.defineProperty(proto, "x", {get: function(v) { + count1++; + }, configurable: true}); + for (var i = 0; i < 20; i++) { + callGetter(obj); + } + assertEq(count1, 20); + + // Redefine "x" with a different getter. Ensure the new getter is called. + var count2 = 0; + Object.defineProperty(proto, "x", {get: function() { + count2++; + }, configurable: true}); + for (var i = 0; i < 20; i++) { + callGetter(obj); + } + assertEq(count1, 20); + assertEq(count2, 20); +} +testRedefineGetter(); + +function testRedefineSetter() { + var callSetter = function(o) { + o.x = 1; + }; + + var proto = {get foo() {}, bar: 1}; + var obj = Object.create(proto); + + // Add "x" setter on the prototype. Warm up the IC. + var count1 = 0; + Object.defineProperty(proto, "x", {set: function(v) { + count1++; + }, configurable: true}); + for (var i = 0; i < 20; i++) { + callSetter(obj); + } + assertEq(count1, 20); + + // Redefine "x" with a different setter. Ensure the new setter is called. + var count2 = 0; + Object.defineProperty(proto, "x", {set: function() { + count2++; + }, configurable: true}); + for (var i = 0; i < 20; i++) { + callSetter(obj); + } + assertEq(count1, 20); + assertEq(count2, 20); +} +testRedefineSetter(); + +function testDeleteAdd() { + var callGetter = function(o) { + return o.x; + }; + + var proto = {get foo() {}, bar: 1}; + var obj = Object.create(proto); + + // Add "x" getter on the prototype. Warm up the IC. + var count1 = 0; + Object.defineProperty(proto, "x", {get: function() { + count1++; + }, configurable: true}); + for (var i = 0; i < 20; i++) { + callGetter(obj); + } + assertEq(count1, 20); + + // Delete the getter. + delete proto.x; + + // Add "x" back with a different getter. Ensure the new getter is called. + var count2 = 0; + Object.defineProperty(proto, "x", {get: function() { + count2++; + }, configurable: true}); + for (var i = 0; i < 20; i++) { + callGetter(obj); + } + assertEq(count1, 20); + assertEq(count2, 20); +} +testDeleteAdd(); + +function testAccessorToDataAndBack() { + var callGetter = function(o) { + return o.x; + }; + + var proto = {get foo() {}, bar: 1}; + var obj = Object.create(proto); + + // Add "x" getter on the prototype. Warm up the IC. + var count1 = 0; + Object.defineProperty(proto, "x", {get: function() { + count1++; + }, configurable: true}); + for (var i = 0; i < 20; i++) { + callGetter(obj); + } + assertEq(count1, 20); + + // Turn the getter into a data property. + Object.defineProperty(proto, "x", {configurable: true, value: 123}); + + // Turn the data property into a (different) getter. Ensure the new getter is + // called. + var count2 = 0; + Object.defineProperty(proto, "x", {get: function() { + count2++; + }, configurable: true}); + for (var i = 0; i < 20; i++) { + callGetter(obj); + } + assertEq(count1, 20); + assertEq(count2, 20); +} +testAccessorToDataAndBack(); diff --git a/js/src/jit-test/tests/cacheir/global-getter.js b/js/src/jit-test/tests/cacheir/global-getter.js new file mode 100644 index 0000000000..cd8d0b22df --- /dev/null +++ b/js/src/jit-test/tests/cacheir/global-getter.js @@ -0,0 +1,36 @@ +// Tests for |this| value passed to getters defined on the global. + +function test(useWindowProxy) { + var g = newGlobal({useWindowProxy}); + g.useWindowProxy = useWindowProxy; + g.evaluate(` + var x = 123; + Object.defineProperty(this, "getX", {get: function() { return this.x; }}); + Object.defineProperty(Object.prototype, "protoGetX", {get: function() { return this.x * 2; }}); + Object.defineProperty(this, "thisIsProxy", {get: function() { return isProxy(this); }}); + + function f() { + for (var i = 0; i < 100; i++) { + // GetGName + assertEq(getX, 123); + assertEq(protoGetX, 246); + assertEq(thisIsProxy, useWindowProxy); + // GetProp + assertEq(globalThis.getX, 123); + assertEq(globalThis.protoGetX, 246); + assertEq(globalThis.thisIsProxy, useWindowProxy); + } + } + f(); + `); +} + +for (let useWindowProxy of [true, false]) { + test(useWindowProxy); +} + +setJitCompilerOption("ic.force-megamorphic", 1); + +for (let useWindowProxy of [true, false]) { + test(useWindowProxy); +} diff --git a/js/src/jit-test/tests/cacheir/global-setter.js b/js/src/jit-test/tests/cacheir/global-setter.js new file mode 100644 index 0000000000..19703104ee --- /dev/null +++ b/js/src/jit-test/tests/cacheir/global-setter.js @@ -0,0 +1,39 @@ +// Tests for |this| value passed to setters defined on the global. + +function test(useWindowProxy) { + var g = newGlobal({useWindowProxy}); + g.useWindowProxy = useWindowProxy; + g.evaluate(` + var x = 123; + Object.defineProperty(this, "checkX", + {set: function(v) { assertEq(this.x, v); }}); + Object.defineProperty(Object.prototype, "protoCheckX", + {set: function(v) { assertEq(this.x * 2, v); }}); + Object.defineProperty(this, "checkThisIsProxy", + {set: function(v) { assertEq(isProxy(this), v); }}); + + function f() { + for (var i = 0; i < 100; i++) { + // SetGName + checkX = 123; + protoCheckX = 246; + checkThisIsProxy = useWindowProxy; + // SetProp + globalThis.checkX = 123; + globalThis.protoCheckX = 246; + globalThis.checkThisIsProxy = useWindowProxy; + } + } + f(); + `); +} + +for (let useWindowProxy of [true, false]) { + test(useWindowProxy); +} + +setJitCompilerOption("ic.force-megamorphic", 1); + +for (let useWindowProxy of [true, false]) { + test(useWindowProxy); +} diff --git a/js/src/jit-test/tests/cacheir/has-sparse.js b/js/src/jit-test/tests/cacheir/has-sparse.js new file mode 100644 index 0000000000..2b3b2c8451 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/has-sparse.js @@ -0,0 +1,58 @@ +function sparse() { + var o = {0: 0, 0x10000: 0}; + + var tests = [[1, false], [0, true], [-2, false], [0x10000, true], [0x20000, false]]; + for (var [key, has] of tests) { + assertEq(key in o, has); + assertEq(o.hasOwnProperty(key), has); + } +} + +function typedArray() { + var o = {0: 0, 0x10000: 0}; + var t = new Int32Array(0x10001) + + // Only use Int32Array after we attached the sparse stub + // in o, in t + var tests = [[1, [false, true]], + [0, [true, true]], + [-2, [false, false]], + [0x10000, [true, true]], + [0x20000, [false, false]]]; + + for (var i = 0; i < 10; i++) { + for (var [key, has] of tests) { + assertEq(key in o, has[i > 5 ? 1 : 0]); + assertEq(o.hasOwnProperty(key), has[i > 5 ? 1 : 0]); + } + + if (i == 5) + o = t; + } +} + +function protoChange() { + var o = {0: 0, 0x10000: 0}; + + var tests = [[1, [false, true]], + [0, [true, true]], + [-2, [false, false]], + [0x10000, [true, true]], + [0x20000, [false, false]]]; + + for (var i = 0; i < 10; i++) { + for (var [key, has] of tests) { + assertEq(key in o, has[i > 5 ? 1 : 0]); + // Proto change doesn't affect hasOwnProperty. + assertEq(o.hasOwnProperty(key), has[0]); + } + + if (i == 5) + o.__proto__ = [1, 1, 1, 1]; + } +} + +sparse(); +typedArray(); +protoChange(); + diff --git a/js/src/jit-test/tests/cacheir/has-undefined-null.js b/js/src/jit-test/tests/cacheir/has-undefined-null.js new file mode 100644 index 0000000000..7f0109a5c1 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/has-undefined-null.js @@ -0,0 +1,28 @@ +function exists() { + var a = {'null': 0, 'undefined': 0}; + for (var i = 0; i < 100; i++) { + assertEq(null in a, true); + assertEq(undefined in a, true); + } +} + +function missing() { + var a = {}; + for (var i = 0; i < 100; i++) { + assertEq(null in a, false); + assertEq(undefined in a, false); + } +} + +function mixed() { + var x = [{'null': 0}, {'undefined': 0}] + for (var i = 0; i < 100; i++) { + var a = x[i % 2]; + assertEq(null in a, i % 2 == 0); + assertEq(undefined in a, i % 2 == 1); + } +} + +exists(); +missing(); +mixed(); diff --git a/js/src/jit-test/tests/cacheir/has.js b/js/src/jit-test/tests/cacheir/has.js new file mode 100644 index 0000000000..9dba6330d8 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/has.js @@ -0,0 +1,66 @@ +var max = 40; +var key = "d"; +setJitCompilerOption("ion.warmup.trigger", max - 10); + +function simple() { + var array = [{a: 1}, {b: 1, a: 1}, {c: 1, a: 1}]; + for (var i = 0; i < array.length; i++) { + var x = array[i]; + assertEq("a" in x, true); + assertEq("d" in x, false); + } +} + +function megamorphic() { + var array = [{a: 1}, {b: 1, a: 1}, {c: 1, a: 1}, + {a: 1, b: 1}, {c: 1, e: 1, a: 1}, + {__proto__:{e: 1, f: 1, a: 1, g: 1}}, + {__proto__:{e: 1, f: 1, a: 1, g: 1, h: 1}}]; + for (var i = 0; i < array.length; i++) { + var x = array[i]; + assertEq("a" in x, true); + assertEq("d" in x, false); + } +} + +function protoSetProp() { + var base = {a: 1}; + var array = [{__proto__: base}, + {__proto__: base, b: 1, a: 1}, + {__proto__: base, c: 1, a: 1}]; + for (var j = 0; j < 2; j++) { + for (var i = 0; i < array.length; i++) { + var x = array[i]; + assertEq("a" in x, true); + assertEq("d" in x, (j > 0)); + } + base.d = 1; // Define property on prototype + } +} + +function protoSetElem() { + var base = {a: 1}; + var array = [{__proto__: base}, + {__proto__: base, b: 1, a: 1}, + {__proto__: base, c: 1, a: 1}]; + for (var j = 0; j < 2; j++) { + for (var i = 0; i < array.length; i++) { + var x = array[i]; + assertEq("a" in x, true); + assertEq("d" in x, (j > 0)); + } + base[key] = 1; // Define property on prototype + } +} + +function test() { + for (var i = 0; i < max; i++) { + simple(); + megamorphic(); + protoSetProp(); + protoSetElem(); + } +} + +test(); +test(); diff --git a/js/src/jit-test/tests/cacheir/hasown.js b/js/src/jit-test/tests/cacheir/hasown.js new file mode 100644 index 0000000000..5a3bf28d6d --- /dev/null +++ b/js/src/jit-test/tests/cacheir/hasown.js @@ -0,0 +1,46 @@ +var max = 40; +setJitCompilerOption("ion.warmup.trigger", max - 10); + +function simple() { + var array = [{a: 1}, {b: 1, a: 1}, {c: 1, a: 1}]; + for (var i = 0; i < array.length; i++) { + var x = array[i]; + assertEq(x.hasOwnProperty("a"), true); + assertEq(x.hasOwnProperty("d"), false); + } +} + +function megamorphic() { + var array = [{a: 1}, {b: 1, a: 1}, {c: 1, a: 1}, + {a: 1, b: 1}, {c: 1, e: 1, a: 1}, + {e: 1, f: 1, a: 1, g: 1}, + {e: 1, f: 1, a: 1, g: 1, h: 1}]; + for (var i = 0; i < array.length; i++) { + var x = array[i]; + assertEq(x.hasOwnProperty("a"), true); + assertEq(x.hasOwnProperty("d"), false); + } +} + +function key() { + var sym = Symbol(), sym2 = Symbol(); + var keys = [[sym, true], [sym2, false], + ["a", true], ["b", false], + [{}, false]]; + var obj = {[sym]: 1, a: 1}; + for (var i = 0; i < keys.length; i++) { + var [key, result] = keys[i]; + assertEq(obj.hasOwnProperty(key), result); + } +} + +function test() { + for (var i = 0; i < max; i++) { + simple(); + megamorphic(); + key(); + } +} + +test(); +test(); diff --git a/js/src/jit-test/tests/cacheir/iter-megamorphic.js b/js/src/jit-test/tests/cacheir/iter-megamorphic.js new file mode 100644 index 0000000000..8fcfe7dcd5 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/iter-megamorphic.js @@ -0,0 +1,18 @@ +function testIter(v) { + var c = 0; + for (var p in v) { + c++; + } + assertEq(c === 0 || c === 1, true); + assertEq(c === 0, v === null || v === undefined); +} +function test() { + var vals = [{a: 1}, {b: 1}, {c: 1}, {d: 1}, null, undefined, + {e: 1}, {f: 1}, {g: 1}, {h: 1}, {i: 1}]; + for (var i = 0; i < 100; i++) { + for (var v of vals) { + testIter(v); + } + } +} +test(); diff --git a/js/src/jit-test/tests/cacheir/load-typed-element-bigint.js b/js/src/jit-test/tests/cacheir/load-typed-element-bigint.js new file mode 100644 index 0000000000..926cd9026e --- /dev/null +++ b/js/src/jit-test/tests/cacheir/load-typed-element-bigint.js @@ -0,0 +1,100 @@ +// Different typed array types to ensure we emit a GetProp IC. +var xs = [ + new BigInt64Array(10), + new BigUint64Array(10), +]; + +// Load 0n value. +function loadConstantZero() { + var value = 0n; + + xs[0][0] = value; + xs[1][0] = value; + + var ys = [ + BigInt.asIntN(64, value), + BigInt.asUintN(64, value), + ]; + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + assertEq(ta[0], ys[i & 1]); + } +} +loadConstantZero(); + +// Load non-negative BigInt using inline digits. +function loadInlineDigits() { + var value = 1n; + + xs[0][0] = value; + xs[1][0] = value; + + var ys = [ + BigInt.asIntN(64, value), + BigInt.asUintN(64, value), + ]; + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + assertEq(ta[0], ys[i & 1]); + } +} +loadInlineDigits(); + +// Load negative BigInt using inline digits. +function loadInlineDigitsNegative() { + var value = -1n; + + xs[0][0] = value; + xs[1][0] = value; + + var ys = [ + BigInt.asIntN(64, value), + BigInt.asUintN(64, value), + ]; + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + assertEq(ta[0], ys[i & 1]); + } +} +loadInlineDigitsNegative(); + +// Still inline digits, but now two digits on 32-bit platforms +function loadInlineDigitsTwoDigits() { + var value = 4294967296n; + + xs[0][0] = value; + xs[1][0] = value; + + var ys = [ + BigInt.asIntN(64, value), + BigInt.asUintN(64, value), + ]; + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + assertEq(ta[0], ys[i & 1]); + } +} +loadInlineDigitsTwoDigits(); + +// Negative case of |storeInlineDigitsTwoDigits|. +function loadInlineDigitsTwoDigitsNegative() { + var value = -4294967296n; + + xs[0][0] = value; + xs[1][0] = value; + + var ys = [ + BigInt.asIntN(64, value), + BigInt.asUintN(64, value), + ]; + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + assertEq(ta[0], ys[i & 1]); + } +} +loadInlineDigitsTwoDigitsNegative(); diff --git a/js/src/jit-test/tests/cacheir/map-get-bigint.js b/js/src/jit-test/tests/cacheir/map-get-bigint.js new file mode 100644 index 0000000000..5ddbacec15 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-get-bigint.js @@ -0,0 +1,88 @@ +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i + 1])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testInlineDigitsSameSign(n) { + var xs = [1n, 2n]; + var ys = [3n, 4n]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(testInlineDigitsSameSign); + +function testInlineDigitsDifferentSign(n) { + var xs = [-1n, 2n]; + var ys = [1n, -2n]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(testInlineDigitsDifferentSign); + +function testHeapDigitsSameSign(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [heap + 1n, heap + 2n]; + var ys = [heap + 3n, heap + 4n]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(testHeapDigitsSameSign); + +function testHeapDigitsDifferentSign(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [-(heap + 1n), heap + 2n]; + var ys = [heap + 1n, -(heap + 2n)]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(testHeapDigitsDifferentSign); diff --git a/js/src/jit-test/tests/cacheir/map-get-nongcthing.js b/js/src/jit-test/tests/cacheir/map-get-nongcthing.js new file mode 100644 index 0000000000..9e36c6b871 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-get-nongcthing.js @@ -0,0 +1,116 @@ +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i + 1])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testInt32(n) { + var xs = [1, 2]; + var ys = [3, 4]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(testInt32); + +function testDouble(n) { + var xs = [Math.PI, Infinity]; + var ys = [Math.E, -Infinity]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(testDouble); + +function testZero(n) { + var xs = [0, -0]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap([0], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2); +} +runTest(testZero); + +function testNaN(n) { + var xs = [NaN, -NaN]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap([NaN], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2); +} +runTest(testNaN); + +function testUndefinedAndNull(n) { + var xs = [undefined, null]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(testUndefinedAndNull); + +function testBoolean(n) { + var xs = [true, false]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(testBoolean); diff --git a/js/src/jit-test/tests/cacheir/map-get-object.js b/js/src/jit-test/tests/cacheir/map-get-object.js new file mode 100644 index 0000000000..076c28a7b5 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-get-object.js @@ -0,0 +1,31 @@ +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i + 1])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function test(n) { + var xs = [{}, {}]; + var ys = [{}, {}]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(test); diff --git a/js/src/jit-test/tests/cacheir/map-get-string.js b/js/src/jit-test/tests/cacheir/map-get-string.js new file mode 100644 index 0000000000..1a25d09fd3 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-get-string.js @@ -0,0 +1,83 @@ +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i + 1])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testConstant(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(testConstant); + +function testConstantFatInline(n) { + var xs = ["a", "b"].map(s => s.repeat(10)); + var ys = ["c", "d"].map(s => s.repeat(10)); + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(testConstantFatInline); + +function testComputed(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + z = String.fromCharCode(z.charCodeAt(0)); + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(testComputed); + +function testRope(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map = createMap(xs.map(x => x.repeat(100)), n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3].repeat(100); + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(testRope); diff --git a/js/src/jit-test/tests/cacheir/map-get-symbol.js b/js/src/jit-test/tests/cacheir/map-get-symbol.js new file mode 100644 index 0000000000..face9e4c2b --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-get-symbol.js @@ -0,0 +1,31 @@ +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i + 1])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function test(n) { + var xs = [Symbol(), Symbol()]; + var ys = [Symbol(), Symbol()]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, N / 2 + N / 4); +} +runTest(test); diff --git a/js/src/jit-test/tests/cacheir/map-get-value.js b/js/src/jit-test/tests/cacheir/map-get-value.js new file mode 100644 index 0000000000..0b5e288a06 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-get-value.js @@ -0,0 +1,31 @@ +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i + 1])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testPolymorphic(n) { + var xs = [10, 10.5, "test", Symbol("?"), 123n, -123n, {}, []]; + var ys = [-0, NaN, "bad", Symbol("!"), 42n, -99n, {}, []]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 128; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 15]; + var v = map.get(z); + if (v !== undefined) c += v; + } + assertEq(c, (8 * 9) / 2 * 8); +} +runTest(testPolymorphic); diff --git a/js/src/jit-test/tests/cacheir/map-has-bigint.js b/js/src/jit-test/tests/cacheir/map-has-bigint.js new file mode 100644 index 0000000000..5ae51a093f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-has-bigint.js @@ -0,0 +1,84 @@ +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testInlineDigitsSameSign(n) { + var xs = [1n, 2n]; + var ys = [3n, 4n]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testInlineDigitsSameSign); + +function testInlineDigitsDifferentSign(n) { + var xs = [-1n, 2n]; + var ys = [1n, -2n]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testInlineDigitsDifferentSign); + +function testHeapDigitsSameSign(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [heap + 1n, heap + 2n]; + var ys = [heap + 3n, heap + 4n]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testHeapDigitsSameSign); + +function testHeapDigitsDifferentSign(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [-(heap + 1n), heap + 2n]; + var ys = [heap + 1n, -(heap + 2n)]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testHeapDigitsDifferentSign); diff --git a/js/src/jit-test/tests/cacheir/map-has-nongcthing.js b/js/src/jit-test/tests/cacheir/map-has-nongcthing.js new file mode 100644 index 0000000000..8fc653564f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-has-nongcthing.js @@ -0,0 +1,110 @@ +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testInt32(n) { + var xs = [1, 2]; + var ys = [3, 4]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testInt32); + +function testDouble(n) { + var xs = [Math.PI, Infinity]; + var ys = [Math.E, -Infinity]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testDouble); + +function testZero(n) { + var xs = [0, -0]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap([0], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testZero); + +function testNaN(n) { + var xs = [NaN, -NaN]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap([NaN], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testNaN); + +function testUndefinedAndNull(n) { + var xs = [undefined, null]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testUndefinedAndNull); + +function testBoolean(n) { + var xs = [true, false]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testBoolean); diff --git a/js/src/jit-test/tests/cacheir/map-has-object.js b/js/src/jit-test/tests/cacheir/map-has-object.js new file mode 100644 index 0000000000..46366586da --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-has-object.js @@ -0,0 +1,30 @@ +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function test(n) { + var xs = [{}, {}]; + var ys = [{}, {}]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(test); diff --git a/js/src/jit-test/tests/cacheir/map-has-string.js b/js/src/jit-test/tests/cacheir/map-has-string.js new file mode 100644 index 0000000000..84a139a9e2 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-has-string.js @@ -0,0 +1,79 @@ +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testConstant(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testConstant); + +function testConstantFatInline(n) { + var xs = ["a", "b"].map(s => s.repeat(10)); + var ys = ["c", "d"].map(s => s.repeat(10)); + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testConstantFatInline); + +function testComputed(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + z = String.fromCharCode(z.charCodeAt(0)); + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testComputed); + +function testRope(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map = createMap(xs.map(x => x.repeat(100)), n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3].repeat(100); + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testRope); diff --git a/js/src/jit-test/tests/cacheir/map-has-symbol.js b/js/src/jit-test/tests/cacheir/map-has-symbol.js new file mode 100644 index 0000000000..c0268a3da1 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-has-symbol.js @@ -0,0 +1,30 @@ +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function test(n) { + var xs = [Symbol(), Symbol()]; + var ys = [Symbol(), Symbol()]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(test); diff --git a/js/src/jit-test/tests/cacheir/map-has-value.js b/js/src/jit-test/tests/cacheir/map-has-value.js new file mode 100644 index 0000000000..fddb1e8b5d --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-has-value.js @@ -0,0 +1,30 @@ +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testPolymorphic(n) { + var xs = [10, 10.5, "test", Symbol("?"), 123n, -123n, {}, []]; + var ys = [-0, NaN, "bad", Symbol("!"), 42n, -99n, {}, []]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 128; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 15]; + if (map.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testPolymorphic); diff --git a/js/src/jit-test/tests/cacheir/map-size.js b/js/src/jit-test/tests/cacheir/map-size.js new file mode 100644 index 0000000000..55c8bb3e82 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/map-size.js @@ -0,0 +1,43 @@ +function testEmpty() { + let map = new Map(); + for (let i = 0; i < 100; ++i) { + assertEq(map.size, 0); + } +} +for (let i = 0; i < 2; ++i) testEmpty(); + +function testSimple() { + let map = new Map([1, 2, 3, 4].entries()); + for (let i = 0; i < 100; ++i) { + assertEq(map.size, 4); + } +} +for (let i = 0; i < 2; ++i) testSimple(); + +function testWithDelete() { + for (let i = 0; i < 100; ++i) { + let a = [1, 2, 3, 4]; + let map = new Map(a.entries()); + for (let j = 0; j < a.length; ++j) { + assertEq(map.size, a.length - j); + map.delete(j); + assertEq(map.size, a.length - j - 1); + } + assertEq(map.size, 0); + } +} +for (let i = 0; i < 2; ++i) testWithDelete(); + +function testWithSet() { + for (let i = 0; i < 100; ++i) { + let a = [1, 2, 3, 4]; + let map = new Map(); + for (let j = 0; j < a.length; ++j) { + assertEq(map.size, j); + map.set(a[j], 0); + assertEq(map.size, j + 1); + } + assertEq(map.size, a.length); + } +} +for (let i = 0; i < 2; ++i) testWithSet(); diff --git a/js/src/jit-test/tests/cacheir/math-min-max.js b/js/src/jit-test/tests/cacheir/math-min-max.js new file mode 100644 index 0000000000..b7b9fbe86a --- /dev/null +++ b/js/src/jit-test/tests/cacheir/math-min-max.js @@ -0,0 +1,180 @@ +function test1ArgInt32() { + function test(x, expected) { + assertEq(Math.max(x), expected); + assertEq(Math.min(x), expected); + } + for (var i = 0; i < 20; i++) { + test(i, i); + } + // Fail Int32 guard. + test(true, 1); + test({}, NaN); +} +test1ArgInt32(); + +function test1ArgNumber() { + function test(x, expected) { + assertEq(Math.max(x), expected); + assertEq(Math.min(x), expected); + } + for (var i = 0; i < 20; i++) { + test(3.14, 3.14); + test(-0, -0); + test(i, i); + } + // Fail Number guard. + test(true, 1); + test({}, NaN); +} +test1ArgNumber(); + +function test1ArgInt32ThenNumber() { + function test(x, expected) { + assertEq(Math.max(x), expected); + assertEq(Math.min(x), expected); + } + for (var i = 0; i < 20; i++) { + test(i, i); + } + for (var i = 0; i < 10; i++) { + test(i * 3.14, i * 3.14); + } +} +test1ArgInt32ThenNumber(); + +function test2ArgsInt32() { + function test(x, y, expectedMax, expectedMin) { + assertEq(Math.max(x, y), expectedMax); + assertEq(Math.min(x, y), expectedMin); + } + for (var i = 0; i < 20; i++) { + test(0, i, i, 0); + test(-9, -1, -1, -9); + test(0, 0, 0, 0); + } + // Fail Int32 guard. + test(0, "3", 3, 0); + test({}, 2, NaN, NaN); +} +test2ArgsInt32(); + +function test2ArgsNumber() { + function test(x, y, expectedMax, expectedMin) { + assertEq(Math.max(x, y), expectedMax); + assertEq(Math.min(x, y), expectedMin); + } + for (var i = 0; i < 20; i++) { + test(1.1, 2.2, 2.2, 1.1); + test(8, NaN, NaN, NaN); + test(NaN, 8, NaN, NaN); + test(-0, i, i, -0); + test(Infinity, -0, Infinity, -0); + test(-Infinity, Infinity, Infinity, -Infinity); + } + // Fail Number guard. + test(-0, "3", 3, -0); + test({}, 2.1, NaN, NaN); +} +test2ArgsNumber(); + +function test2ArgsInt32ThenNumber() { + function test(x, y, expectedMax, expectedMin) { + assertEq(Math.max(x, y), expectedMax); + assertEq(Math.min(x, y), expectedMin); + } + for (var i = 0; i < 20; i++) { + test(-1, i, i, -1); + } + for (var i = 0; i < 10; i++) { + test(-0, i, i, -0); + } +} +test2ArgsInt32ThenNumber(); + +function test3ArgsInt32() { + function test(a, b, c, expectedMax, expectedMin) { + assertEq(Math.max(a, b, c), expectedMax); + assertEq(Math.min(a, b, c), expectedMin); + } + for (var i = 0; i < 20; i++) { + test(30, 100, i, 100, i); + test(i, 0, -2, i, -2); + } + // Fail Int32 guard. + test(0, 1, "2", 2, 0); + test(-0, 1, 2, 2, -0); +} +test3ArgsInt32(); + +function test3ArgsNumber() { + function test(a, b, c, expectedMax, expectedMin) { + assertEq(Math.max(a, b, c), expectedMax); + assertEq(Math.min(a, b, c), expectedMin); + } + for (var i = 0; i < 20; i++) { + test(100, i, -0, 100, -0); + test(i, NaN, -1, NaN, NaN); + } + // Fail Number guard. + test(-0, "3", 1, 3, -0); + test("9", 1.1, 3, 9, 1.1); +} +test3ArgsNumber(); + +function test3ArgsInt32ThenNumber() { + function test(a, b, c, expectedMax, expectedMin) { + assertEq(Math.max(a, b, c), expectedMax); + assertEq(Math.min(a, b, c), expectedMin); + } + for (var i = 0; i < 20; i++) { + test(30, 100, i, 100, i); + } + for (var i = 0; i < 10; i++) { + test(123.4, 100, i, 123.4, i); + } +} +test3ArgsInt32ThenNumber(); + +function test4ArgsInt32() { + function test(a, b, c, d, expectedMax, expectedMin) { + assertEq(Math.max(a, b, c, d), expectedMax); + assertEq(Math.min(a, b, c, d), expectedMin); + } + for (var i = 0; i < 20; i++) { + test(30, 100, i, 0, 100, 0); + test(i, 0, -1, -2, i, -2); + } + // Fail Int32 guard. + test(0, 1, 2, "3", 3, 0); + test(-0, 1, 2, 3, 3, -0); +} +test4ArgsInt32(); + +function test4ArgsNumber() { + function test(a, b, c, d, expectedMax, expectedMin) { + assertEq(Math.max(a, b, c, d), expectedMax); + assertEq(Math.min(a, b, c, d), expectedMin); + } + for (var i = 0; i < 20; i++) { + test(3.1, 100, i, -0, 100, -0); + test(i, NaN, -1, -2, NaN, NaN); + } + // Fail Number guard. + test(-0, 1, 2, "3", 3, -0); + test("9", 1.1, 2, 3, 9, 1.1); +} +test4ArgsNumber(); + +function test4ArgsInt32ThenNumber() { + function test(a, b, c, d, expectedMax, expectedMin) { + assertEq(Math.max(a, b, c, d), expectedMax); + assertEq(Math.min(a, b, c, d), expectedMin); + } + for (var i = 0; i < 20; i++) { + test(i << 1, i - 100, -1, -2, i * 2, i - 100); + } + for (var i = 0; i < 10; i++) { + test(i * 1.1, i, -0, 0, i * 1.1, -0); + } +} +test4ArgsInt32ThenNumber(); diff --git a/js/src/jit-test/tests/cacheir/megamorphic-get-has-dense.js b/js/src/jit-test/tests/cacheir/megamorphic-get-has-dense.js new file mode 100644 index 0000000000..b6098435a1 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/megamorphic-get-has-dense.js @@ -0,0 +1,63 @@ +setJitCompilerOption("ic.force-megamorphic", 1); + +function testBasic() { + // Create various native objects with dense elements. + var objs = [[1, 2, 3], {0: 1, 1: 2, 2: 3}]; + var fun = x => x; + fun[0] = 1; + fun[1] = 2; + fun[2] = 3; + objs.push(fun); + for (var i = 0; i < 20; i++) { + var o = {}; + o["x" + i] = i; + o[0] = 1; + o[1] = 2; + if (i < 10) { + o[2] = 3; + } else { + // o[2] will be a hole. + o[3] = 4; + } + objs.push(o); + } + + // Access their dense elements. + for (var i = 0; i < 10; i++) { + for (var j = 0; j < objs.length; j++) { + var obj = objs[j]; + assertEq(obj[0], 1); + assertEq(obj[1], 2); + assertEq(obj[2], j < 13 ? 3 : undefined); + assertEq(obj[3], j >= 13 ? 4 : undefined); + assertEq(0 in obj, true); + assertEq(1 in obj, true); + assertEq(2 in obj, j < 13); + assertEq(3 in obj, j >= 13); + assertEq(Object.hasOwn(obj, 0), true); + assertEq(Object.hasOwn(obj, 1), true); + assertEq(Object.hasOwn(obj, 2), j < 13); + assertEq(Object.hasOwn(obj, 3), j >= 13); + } + } +} +testBasic(); + +function testNonNative() { + var arr = [1, 2, 3]; + var proxy = new Proxy({}, { + get(target, prop) { return 456; }, + has(target, prop) { return prop === "0"; }, + }); + for (var i = 0; i < 100; i++) { + var obj = i < 95 ? arr : proxy; + assertEq(obj[0], i < 95 ? 1 : 456); + assertEq(0 in obj, true); + assertEq(1 in obj, i < 95); + assertEq(4 in obj, false); + assertEq(Object.hasOwn(obj, 0), i < 95); + assertEq(Object.hasOwn(obj, 1), i < 95); + assertEq(Object.hasOwn(obj, 4), false); + } +} +testNonNative(); diff --git a/js/src/jit-test/tests/cacheir/new-with-non-object-prototype-failure.js b/js/src/jit-test/tests/cacheir/new-with-non-object-prototype-failure.js new file mode 100644 index 0000000000..7ecbbe36c4 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/new-with-non-object-prototype-failure.js @@ -0,0 +1,38 @@ +// Test failure when constructing a function whose |.prototype| property isn't an object. + +function Klass() { + this.prop = 1; +} + +// Save the original prototype. +const KlassPrototype = Klass.prototype; + +// Set the prototype to a non-object value. +Klass.prototype = null; + +const prototypes = [ + null, + KlassPrototype, +]; + +const N = 500; +let c = 0; + +for (let i = 0; i <= N; ++i) { + // Always perform a set to avoid a cold-code bailout. + let proto = prototypes[(i === N)|0]; + Klass.prototype = proto; + + // Create a new object. + let o = new Klass(); + + // Read a property from the new object to ensure it was correctly allocated + // and initialised. + c += o.prop; + + // The prototype defaults to %Object.prototype% when the |.prototype| + // property isn't an object. + assertEq(Object.getPrototypeOf(o), proto === null ? Object.prototype : KlassPrototype); +} + +assertEq(c, N + 1); diff --git a/js/src/jit-test/tests/cacheir/new-with-non-object-prototype.js b/js/src/jit-test/tests/cacheir/new-with-non-object-prototype.js new file mode 100644 index 0000000000..5e146db4b5 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/new-with-non-object-prototype.js @@ -0,0 +1,129 @@ +// Test constructing a function when the |.prototype| property isn't an object. + +function test(proto) { + function Klass() { + this.prop = 1; + } + Klass.prototype = proto; + + const N = 100; + + let c = 0; + for (let i = 0; i < N; ++i) { + // Create a new object. + let o = new Klass(); + + // Read a property from the new object to ensure it was correctly allocated + // and initialised. + c += o.prop; + + // The prototype defaults to %Object.prototype% when the |.prototype| + // property isn't an object. + assertEq(Object.getPrototypeOf(o), Object.prototype); + } + + assertEq(c, N); +} + +const primitivesTypes = [ + undefined, + null, + 123, + true, + "str", + Symbol(), + 123n, +]; + +for (let primitive of primitivesTypes) { + // Create a fresh function object to avoid type pollution. + let fn = Function(`return ${test}`)(); + + fn(primitive); +} + +// Repeat the test from above, but this time |Klass| is a cross-realm function. + +function testCrossRealm(proto) { + const otherGlobal = newGlobal(); + const Klass = otherGlobal.eval(` + function Klass() { + this.prop = 1; + } + Klass; + `); + Klass.prototype = proto; + + const N = 100; + + let c = 0; + for (let i = 0; i < N; ++i) { + // Create a new object. + let o = new Klass(); + + // Read a property from the new object to ensure it was correctly allocated + // and initialised. + c += o.prop; + + // The prototype defaults to %Object.prototype% when the |.prototype| + // property isn't an object. + assertEq(Object.getPrototypeOf(o), otherGlobal.Object.prototype); + } + + assertEq(c, N); +} + +for (let primitive of primitivesTypes) { + // Create a fresh function object to avoid type pollution. + let fn = Function(`return ${testCrossRealm}`)(); + + fn(primitive); +} + +// Repeat the test from above, but this time |Klass| is a cross-realm new.target. + +function testCrossRealmNewTarget(proto) { + const otherGlobal = newGlobal(); + const Klass = otherGlobal.eval(` + function Klass() {} + Klass; + `); + Klass.prototype = proto; + + class C { + constructor() { + this.prop = 1; + } + } + + class D extends C { + constructor() { + super(); + } + } + + const N = 100; + + let c = 0; + for (let i = 0; i < N; ++i) { + // Create a new object. + let o = Reflect.construct(D, [], Klass); + + // Read a property from the new object to ensure it was correctly allocated + // and initialised. + c += o.prop; + + // The prototype defaults to %Object.prototype% when the |.prototype| + // property isn't an object. + assertEq(Object.getPrototypeOf(o), otherGlobal.Object.prototype); + } + + assertEq(c, N); +} + +for (let primitive of primitivesTypes) { + // Create a fresh function object to avoid type pollution. + let fn = Function(`return ${testCrossRealmNewTarget}`)(); + + fn(primitive); +} diff --git a/js/src/jit-test/tests/cacheir/nukedCCW.js b/js/src/jit-test/tests/cacheir/nukedCCW.js new file mode 100644 index 0000000000..53a14c067f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/nukedCCW.js @@ -0,0 +1,40 @@ +function testNuke() { + var wrapper = evaluate("({a: 15, b: {c: 42}})", + {global: newGlobal({newCompartment: true, sameZoneAs: this})}); + + var i, error; + try { + for (i = 0; i < 150; i++) { + assertEq(wrapper.b.c, 42); + assertEq(wrapper.a, 15); + + if (i == 142) { + // Next access to wrapper.b should throw. + nukeCCW(wrapper); + } + } + } catch (e) { + error = e; + } + + assertEq(error.message.includes("dead object"), true); + assertEq(i, 143); +} + +function testSweep() { + var wrapper = evaluate("({a: 15, b: {c: 42}})", + {global: newGlobal({newCompartment: true})}); + var error; + nukeCCW(wrapper); + gczeal(8, 1); // Sweep zones separately + try { + // Next access to wrapper.b should throw. + wrapper.x = 4; + } catch (e) { + error = e; + } + assertEq(error.message.includes("dead object"), true); +} + +testNuke(); +testSweep(); diff --git a/js/src/jit-test/tests/cacheir/number-parseInt-double.js b/js/src/jit-test/tests/cacheir/number-parseInt-double.js new file mode 100644 index 0000000000..c4c133480b --- /dev/null +++ b/js/src/jit-test/tests/cacheir/number-parseInt-double.js @@ -0,0 +1,205 @@ +// Test inlining parseInt with a Double input. + +const doubleValues = [ + // Values around INT32_MIN. + -2147483648.5, + -2147483647.5, + -2147483646.5, + + // Negative values. + -65536.1, -65535.2, -256.3, -255.4, -100.5, -50.6, -10.7, + + // Values around zero. + -2.1, -1.1, -0, +0, 0.1, 1.1, 2.1, + + // Positive values. + 10.7, 50.6, 100.5, 255.4, 256.3, 65535.2, 65536.1, + + // Values around INT32_MAX. + 2147483645.5, + 2147483646.5, + 2147483647.5, +]; + +// Test double input without an explicit radix. +function testRadixAbsent() { + for (let i = 0; i < 200; ++i) { + let x = doubleValues[i % doubleValues.length]; + let y = x|0; + + let r = Number.parseInt(x); + assertEq(r, y); + } +} +for (let i = 0; i < 2; ++i) testRadixAbsent(); + +// Test double input with radix=10. +function testRadixTen() { + for (let i = 0; i < 200; ++i) { + let x = doubleValues[i % doubleValues.length]; + + let r = Number.parseInt(x, 10); + assertEq(r, x|0); + } +} +for (let i = 0; i < 2; ++i) testRadixTen(); + +// Test double input in the exclusive range (0, 1.0e-6). +function testBadTooSmallPositive() { + const goodValues = [ + +0, +0.5, +1.5, +2.5, +3.5, +4.5, +5.5, + -0, -1.5, -2.5, -3.5, -4.5, -5.5, + ]; + const badValues = [ + 9.999999999999997e-7, // parseInt(9.999999999999997e-7) is 9. + 1e-7, // parseInt(1e-7) is 1. + ]; + + const values = [ + ...goodValues, + ...badValues, + ]; + + for (let i = 0; i < 200; ++i) { + let xs = [goodValues, values][(i >= 150)|0]; + let x = xs[i % xs.length]; + let y; + if (0 < x && x < 1e-6) { + y = (String(x).match(/(.*)e.*/)[1])|0; + } else { + y = x|0; + } + + let r = Number.parseInt(x); + assertEq(r, y); + } +} +for (let i = 0; i < 2; ++i) testBadTooSmallPositive(); + +// Test double input in the exclusive range (-1.0e-6, -0). +function testBadTooSmallNegative() { + const goodValues = [ + +0, +0.5, +1.5, +2.5, +3.5, +4.5, +5.5, + -0, -1.5, -2.5, -3.5, -4.5, -5.5, + ]; + const badValues = [ + -9.999999999999997e-7, // parseInt(-9.999999999999997e-7) is -9. + -1e-7, // parseInt(-1e-7) is -1. + ]; + + const values = [ + ...goodValues, + ...badValues, + ]; + + for (let i = 0; i < 200; ++i) { + let xs = [goodValues, values][(i >= 150)|0]; + let x = xs[i % xs.length]; + let y; + if (-1e-6 < x && x < -0) { + y = (String(x).match(/(.*)e.*/)[1])|0; + } else { + y = x|0; + } + + let r = Number.parseInt(x); + assertEq(r, y); + } +} +for (let i = 0; i < 2; ++i) testBadTooSmallNegative(); + +// Test double input in the exclusive range (-1, -1.0e-6). +function testBadNegativeZero() { + const goodValues = [ + +0, +0.5, +1.5, +2.5, +3.5, +4.5, +5.5, + -0, -1.5, -2.5, -3.5, -4.5, -5.5, + ]; + const badValues = [ + -0.1, // parseInt(-0.1) is -0. + -0.5, // parseInt(-0.5) is -0. + -0.9, // parseInt(-0.9) is -0. + ]; + + const values = [ + ...goodValues, + ...badValues, + ]; + + for (let i = 0; i < 200; ++i) { + let xs = [goodValues, values][(i >= 150)|0]; + let x = xs[i % xs.length]; + let y; + if (-1 < x && x < 0) { + y = -0; + } else { + y = x|0; + } + + let r = Number.parseInt(x); + assertEq(r, y); + } +} +for (let i = 0; i < 2; ++i) testBadNegativeZero(); + +// Test double input with infinity values. +function testBadInfinity() { + const goodValues = [ + +0, +0.5, +1.5, +2.5, +3.5, +4.5, +5.5, + -0, -1.5, -2.5, -3.5, -4.5, -5.5, + ]; + const badValues = [ + Infinity, // parseInt(Infinity) is NaN + -Infinity, // parseInt(-Infinity) is NaN + ]; + + const values = [ + ...goodValues, + ...badValues, + ]; + + for (let i = 0; i < 200; ++i) { + let xs = [goodValues, values][(i >= 150)|0]; + let x = xs[i % xs.length]; + let y; + if (!Number.isFinite(x)) { + y = NaN; + } else { + y = x|0; + } + + let r = Number.parseInt(x); + assertEq(r, y); + } +} +for (let i = 0; i < 2; ++i) testBadInfinity(); + +// Test double input with NaN values. +function testBadNaN() { + const goodValues = [ + +0, +0.5, +1.5, +2.5, +3.5, +4.5, +5.5, + -0, -1.5, -2.5, -3.5, -4.5, -5.5, + ]; + const badValues = [ + NaN, // parseInt(NaN) is NaN + ]; + + const values = [ + ...goodValues, + ...badValues, + ]; + + for (let i = 0; i < 200; ++i) { + let xs = [goodValues, values][(i >= 150)|0]; + let x = xs[i % xs.length]; + let y; + if (!Number.isFinite(x)) { + y = NaN; + } else { + y = x|0; + } + + let r = Number.parseInt(x); + assertEq(r, y); + } +} +for (let i = 0; i < 2; ++i) testBadNaN(); diff --git a/js/src/jit-test/tests/cacheir/number-parseInt-int32.js b/js/src/jit-test/tests/cacheir/number-parseInt-int32.js new file mode 100644 index 0000000000..42def800de --- /dev/null +++ b/js/src/jit-test/tests/cacheir/number-parseInt-int32.js @@ -0,0 +1,93 @@ +// Test inlining parseInt with an Int32 input. + +const int32Values = [ + // Values around INT32_MIN. + -2147483648, + -2147483647, + -2147483646, + + // Negative values. + -65536, -65535, -256, -255, -100, -50, -10, + + // Values around zero. + -2, -1, 0, 1, 2, + + // Positive values. + 10, 50, 100, 255, 256, 65535, 65536, + + // Values around INT32_MAX. + 2147483645, + 2147483646, + 2147483647, +]; + +// Test int32 input without an explicit radix. +function testRadixAbsent() { + for (let i = 0; i < 200; ++i) { + let x = int32Values[i % int32Values.length]; + assertEq(x, x|0, "x is an int32 value"); + + let r = Number.parseInt(x); + assertEq(r, x); + } +} +for (let i = 0; i < 2; ++i) testRadixAbsent(); + +// Test int32 input with radix=10. +function testRadixTen() { + for (let i = 0; i < 200; ++i) { + let x = int32Values[i % int32Values.length]; + assertEq(x, x|0, "x is an int32 value"); + + let r = Number.parseInt(x, 10); + assertEq(r, x); + } +} +for (let i = 0; i < 2; ++i) testRadixTen(); + +// Test int32 input with radix=16. (This case isn't currently inlined.) +function testRadixSixteen() { + for (let i = 0; i < 200; ++i) { + let x = int32Values[i % int32Values.length]; + assertEq(x, x|0, "x is an int32 value"); + + let expected = Math.sign(x) * Number("0x" + Math.abs(x).toString(10)); + + let r = Number.parseInt(x, 16); + assertEq(r, expected); + } +} +for (let i = 0; i < 2; ++i) testRadixSixteen(); + +// Test with variable radix. +function testRadixVariable() { + for (let i = 0; i < 200; ++i) { + let x = int32Values[i % int32Values.length]; + assertEq(x, x|0, "x is an int32 value"); + + let radix = [10, 16][(i > 100)|0]; + + let expected = x; + if (radix === 16) { + expected = Math.sign(x) * Number("0x" + Math.abs(x).toString(10)); + } + + let r = Number.parseInt(x, radix); + assertEq(r, expected); + } +} +for (let i = 0; i < 2; ++i) testRadixVariable(); + +// Test with int32 and double inputs. +function testBadInput() { + for (let i = 0; i < 200; ++i) { + let x = int32Values[i % int32Values.length]; + assertEq(x, x|0, "x is an int32 value"); + + let y = [x, NaN][(i > 150)|0]; + + let r = Number.parseInt(y, 10); + assertEq(r, y); + } +} +for (let i = 0; i < 2; ++i) testBadInput(); diff --git a/js/src/jit-test/tests/cacheir/number-parseInt-string.js b/js/src/jit-test/tests/cacheir/number-parseInt-string.js new file mode 100644 index 0000000000..7206c14db2 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/number-parseInt-string.js @@ -0,0 +1,144 @@ +// Test inlining parseInt with a String input. + +const stringInt32Values = [ + // Values around INT32_MIN. + "-2147483648", + "-2147483647", + "-2147483646", + + // Negative values. + "-65536", "-65535", "-256", "-255", "-100", "-50", "-10", + + // Values around zero. + "-2", "-1", "0", "1", "2", + + // Positive values. + "10", "50", "100", "255", "256", "65535", "65536", + + // Values around INT32_MAX. + "2147483645", + "2147483646", + "2147483647", +]; + +const stringInt32HexValues = [ + // Values around INT32_MIN. + "-0x80000000", + "-0x7fffffff", + "-0x7ffffffe", + + // Negative values. + "-0x10000", "-0xffff", "-0x100", "-0xff", "-0x64", "-0x32", "-0xa", + + // Values around zero. + "-0x2", "-0x1", "0x0", "0x1", "0x2", + + // Positive values. + "0xa", "0x32", "0x64", "0xff", "0x100", "0xffff", "0x10000", + + // Values around INT32_MAX. + "0x7ffffffd", + "0x7ffffffe", + "0x7fffffff", +]; + +// Test string-int32 input without an explicit radix. +function testRadixAbsent() { + for (let i = 0; i < 200; ++i) { + let x = stringInt32Values[i % stringInt32Values.length]; + assertEq(+x, x|0, "x is an int32 value"); + + let r = Number.parseInt(x); + assertEq(r, +x); + } +} +for (let i = 0; i < 2; ++i) testRadixAbsent(); + +// Test string-int32 hex input without an explicit radix. +function testRadixAbsentHex() { + for (let i = 0; i < 200; ++i) { + let x = stringInt32HexValues[i % stringInt32HexValues.length]; + + // String to number conversion doesn't support negative hex-strings, so we + // have to chop off the leading minus sign manually. + let y = x; + let sign = 1; + if (x.startsWith("-")) { + y = x.slice(1); + sign = -1; + } + + assertEq((+y) * sign, ((+y) * sign)|0, "x is an int32 hex value"); + + let r = Number.parseInt(x); + assertEq(r, (+y) * sign); + } +} +for (let i = 0; i < 2; ++i) testRadixAbsentHex(); + +// Test string-int32 input with radix=10. +function testRadixTen() { + for (let i = 0; i < 200; ++i) { + let x = stringInt32Values[i % stringInt32Values.length]; + assertEq(+x, x|0, "x is an int32 value"); + + let r = Number.parseInt(x, 10); + assertEq(r, +x); + } +} +for (let i = 0; i < 2; ++i) testRadixTen(); + +// Test string-int32 input with radix=16. (This case isn't currently inlined.) +function testRadixSixteen() { + for (let i = 0; i < 200; ++i) { + let x = stringInt32Values[i % stringInt32Values.length]; + assertEq(+x, x|0, "x is an int32 value"); + + let expected = Math.sign(x) * Number("0x" + Math.abs(x).toString(10)); + + let r = Number.parseInt(x, 16); + assertEq(r, expected); + } +} +for (let i = 0; i < 2; ++i) testRadixSixteen(); + +// Test string-int32 hex input with radix=16. (This case isn't currently inlined.) +function testRadixSixteenHex() { + for (let i = 0; i < 200; ++i) { + let x = stringInt32HexValues[i % stringInt32HexValues.length]; + + // String to number conversion doesn't support negative hex-strings, so we + // have to chop off the leading minus sign manually. + let y = x; + let sign = 1; + if (x.startsWith("-")) { + y = x.slice(1); + sign = -1; + } + + assertEq((+y) * sign, ((+y) * sign)|0, "x is an int32 hex value"); + + let r = Number.parseInt(x, 16); + assertEq(r, (+y) * sign); + } +} +for (let i = 0; i < 2; ++i) testRadixSixteenHex(); + +// Test with variable radix. +function testRadixVariable() { + for (let i = 0; i < 200; ++i) { + let x = stringInt32Values[i % stringInt32Values.length]; + assertEq(+x, x|0, "x is an int32 value"); + + let radix = [10, 16][(i > 100)|0]; + + let expected = +x; + if (radix === 16) { + expected = Math.sign(+x) * Number("0x" + Math.abs(+x).toString(10)); + } + + let r = Number.parseInt(x, radix); + assertEq(r, expected); + } +} +for (let i = 0; i < 2; ++i) testRadixVariable(); diff --git a/js/src/jit-test/tests/cacheir/number-toString.js b/js/src/jit-test/tests/cacheir/number-toString.js new file mode 100644 index 0000000000..ed076a6753 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/number-toString.js @@ -0,0 +1,44 @@ +function int32() { + var n = 42; + for (var i = 0; i < 100; i++) { + assertEq(n.toString(), "42"); + } +} + +function double() { + var n = 3.14; + for (var i = 0; i < 100; i++) { + assertEq(n.toString(), "3.14"); + } +} + +function number() { + var n = 1; + for (var i = 0; i < 100; i++) { + assertEq(n.toString(), i > 50 ? "3.14" : "1"); + if (i == 50) { + n = 3.14; + } + } +} + +function obj() { + var o = new Number(42); + for (var i = 0; i < 100; i++) { + assertEq(o.toString(), "42"); + } +} + +function overwritten() { + Number.prototype.toString = () => "haha"; + var n = 42; + for (var i = 0; i < 100; i++) { + assertEq(n.toString(), "haha"); + } +} + +int32(); +double(); +number(); +obj(); +overwritten(); diff --git a/js/src/jit-test/tests/cacheir/object-addprop-hook.js b/js/src/jit-test/tests/cacheir/object-addprop-hook.js new file mode 100644 index 0000000000..f138ed0b65 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/object-addprop-hook.js @@ -0,0 +1,18 @@ +function test() { + var sym = Symbol(); + for (var i = 0; i < 100; i++) { + var obj = newObjectWithAddPropertyHook(); + assertEq(obj._propertiesAdded, 0); + obj.x = 1; + obj.y = 2; + obj.z = 3; + obj[sym] = 4; + obj[0] = 1; + obj[1234567] = 1; + assertEq(obj._propertiesAdded, 6); + assertEq(obj.x, 1); + assertEq(obj[sym], 4); + assertEq(obj[0], 1); + } +} +test(); diff --git a/js/src/jit-test/tests/cacheir/object-constructor-metadata-builder.js b/js/src/jit-test/tests/cacheir/object-constructor-metadata-builder.js new file mode 100644 index 0000000000..7568f17885 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/object-constructor-metadata-builder.js @@ -0,0 +1,14 @@ +let capture = []; + +for (let i = 0; i <= 200; ++i) { + if (i === 100) { + enableTrackAllocations(); + } + + // Create a new object through `new Object` and capture the result. + capture[i & 1] = new Object(); + + // Ensure the allocation is properly tracked when inlining `new Object` in CacheIR. + let data = getAllocationMetadata(capture[i & 1]); + assertEq(data !== null, i >= 100); +} diff --git a/js/src/jit-test/tests/cacheir/object-constructor.js b/js/src/jit-test/tests/cacheir/object-constructor.js new file mode 100644 index 0000000000..144e732a09 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/object-constructor.js @@ -0,0 +1,76 @@ +// Test various inlinable Object constructor calls. + +function callNoArgs() { + for (let i = 0; i < 100; ++i) { + let obj = Object(); + + // Creates a new empty object. + assertEq(Reflect.getPrototypeOf(obj), Object.prototype); + assertEq(Reflect.ownKeys(obj).length, 0); + } +} +for (let i = 0; i < 2; ++i) callNoArgs(); + +function constructNoArgs() { + for (let i = 0; i < 100; ++i) { + let obj = new Object(); + + // Creates a new empty object. + assertEq(Reflect.getPrototypeOf(obj), Object.prototype); + assertEq(Reflect.ownKeys(obj).length, 0); + } +} +for (let i = 0; i < 2; ++i) constructNoArgs(); + +function funCallNoArgs() { + // NB: Function.prototype.call is only inlined when the thisValue argument is present. + const thisValue = null; + + for (let i = 0; i < 100; ++i) { + let obj = Object.call(thisValue); + + // Creates a new empty object. + assertEq(Reflect.getPrototypeOf(obj), Object.prototype); + assertEq(Reflect.ownKeys(obj).length, 0); + } +} +for (let i = 0; i < 2; ++i) funCallNoArgs(); + +function callObjectArg() { + let xs = [{}, {}]; + for (let i = 0; i < 100; ++i) { + let x = xs[i & 1]; + let obj = Object(x); + + // Returns the input object. + assertEq(obj, x); + } +} +for (let i = 0; i < 2; ++i) callObjectArg(); + +function constructObjectArg() { + let xs = [{}, {}]; + for (let i = 0; i < 100; ++i) { + let x = xs[i & 1]; + let obj = new Object(x); + + // Returns the input object. + assertEq(obj, x); + } +} +for (let i = 0; i < 2; ++i) constructObjectArg(); + +function funCallObjectArg() { + // NB: Function.prototype.call is only inlined when the thisValue argument is present. + const thisValue = null; + + let xs = [{}, {}]; + for (let i = 0; i < 100; ++i) { + let x = xs[i & 1]; + let obj = Object.call(thisValue, x); + + // Returns the input object. + assertEq(obj, x); + } +} +for (let i = 0; i < 2; ++i) funCallObjectArg(); diff --git a/js/src/jit-test/tests/cacheir/object-is-prototype-of.js b/js/src/jit-test/tests/cacheir/object-is-prototype-of.js new file mode 100644 index 0000000000..1ecc441f47 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/object-is-prototype-of.js @@ -0,0 +1,41 @@ +function testPrimitive() { + for (var i = 0; i < 100; ++i) { + // Null and undefined. + assertEq(Object.prototype.isPrototypeOf(null), false); + assertEq(Object.prototype.isPrototypeOf(void 0), false); + + // Primitive wrappers. + assertEq(String.prototype.isPrototypeOf(""), false); + assertEq(Number.prototype.isPrototypeOf(0), false); + assertEq(Boolean.prototype.isPrototypeOf(true), false); + assertEq(BigInt.prototype.isPrototypeOf(0n), false); + assertEq(Symbol.prototype.isPrototypeOf(Symbol.hasInstance), false); + } +} +testPrimitive(); + +function testObject() { + for (var i = 0; i < 100; ++i) { + assertEq(Object.prototype.isPrototypeOf({}), true); + assertEq(Object.prototype.isPrototypeOf([]), true); + + assertEq(Array.prototype.isPrototypeOf({}), false); + assertEq(Array.prototype.isPrototypeOf([]), true); + } +} +testObject(); + +function testProxy() { + var proxy = new Proxy({}, new Proxy({}, { + get(t, pk, r) { + assertEq(pk, "getPrototypeOf"); + return Reflect.get(t, pk, r); + } + })); + + for (var i = 0; i < 100; ++i) { + assertEq(Object.prototype.isPrototypeOf(proxy), true); + assertEq(Array.prototype.isPrototypeOf(proxy), false); + } +} +testProxy(); diff --git a/js/src/jit-test/tests/cacheir/optimize-get-iterator-1.js b/js/src/jit-test/tests/cacheir/optimize-get-iterator-1.js new file mode 100644 index 0000000000..f22d5fab63 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/optimize-get-iterator-1.js @@ -0,0 +1,13 @@ +(() => { + let returnCalled = false; + ({}).__proto__.return = () => { + returnCalled = true; + return { value: 3, done: true }; + }; + + assertEq(returnCalled, false); + let [a,b] = [1,2,3]; + assertEq(returnCalled, true); + assertEq(a, 1); + assertEq(b, 2); +})(); diff --git a/js/src/jit-test/tests/cacheir/optimize-get-iterator-2.js b/js/src/jit-test/tests/cacheir/optimize-get-iterator-2.js new file mode 100644 index 0000000000..83c568dac0 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/optimize-get-iterator-2.js @@ -0,0 +1,17 @@ +(() => { + let returnCalled = false; + + function foo() { + ({}).__proto__.return = () => { + returnCalled = true; + return { value: 3, done: true }; + }; + return 2; + } + + assertEq(returnCalled, false); + let [a,[b=foo()]] = [1,[],3]; + assertEq(returnCalled, true); + assertEq(a, 1); + assertEq(b, 2); +})(); diff --git a/js/src/jit-test/tests/cacheir/optimize-get-iterator-3.js b/js/src/jit-test/tests/cacheir/optimize-get-iterator-3.js new file mode 100644 index 0000000000..3fe8593b54 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/optimize-get-iterator-3.js @@ -0,0 +1,13 @@ +(() => { + let nextCalled = 0; + ([])[Symbol.iterator]().__proto__.next = () => { + nextCalled++; + return {value: nextCalled, done: false}; + }; + + assertEq(nextCalled, 0); + let [a,b] = [1,2,3]; + assertEq(nextCalled, 2); + assertEq(a, 1); + assertEq(b, 2); +})(); diff --git a/js/src/jit-test/tests/cacheir/optimize-get-iterator-4.js b/js/src/jit-test/tests/cacheir/optimize-get-iterator-4.js new file mode 100644 index 0000000000..a1ee65e784 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/optimize-get-iterator-4.js @@ -0,0 +1,36 @@ +(() => { + let iterablesBase = [ + [1,2], + [1,2,3], + [1,2,3], + [3,2,1], + ]; + + let iterables = []; + for (let i = 0; i < 1000; i++) { + iterables.push([...iterablesBase[i % iterablesBase.length]]); + } + + iterables.push(new Map([[1, 3], [2,4]]).keys()); + + function testDestructuringInitialization(a) { + let [x,y] = a; + return y; + } + + function testDestructuringAssignment(a) { + let x, y; + [x,y] = a; + return y; + } + + for (let i = 0; i < iterables.length; i++) { + assertEq(testDestructuringInitialization(iterables[i]), 2); + } + + // refresh the last iterator + iterables[iterables.length - 1] = new Map([[1, 3], [2,4]]).keys(); + for (let i = 0; i < iterables.length; i++) { + assertEq(testDestructuringAssignment(iterables[i]), 2); + } +})(); diff --git a/js/src/jit-test/tests/cacheir/optimize-get-iterator-5.js b/js/src/jit-test/tests/cacheir/optimize-get-iterator-5.js new file mode 100644 index 0000000000..42aab01057 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/optimize-get-iterator-5.js @@ -0,0 +1,19 @@ +(() => { + var returnCalled = false; + Object.defineProperty(globalThis, 'x', { + get() { + return 42; + }, + set(value) { + ({}).__proto__.return = () => { + returnCalled = true; + return { value: 3, done: true }; + }; + } + }); + + [x] = [1, 2]; + + assertEq(x, 42); + assertEq(returnCalled, true); +})(); diff --git a/js/src/jit-test/tests/cacheir/optimize-get-iterator-6.js b/js/src/jit-test/tests/cacheir/optimize-get-iterator-6.js new file mode 100644 index 0000000000..059914afc1 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/optimize-get-iterator-6.js @@ -0,0 +1,7 @@ +(() => { + ({}).__proto__[1] = 2; + let [x,y] = [1]; + + assertEq(x, 1); + assertEq(y, undefined); +})(); diff --git a/js/src/jit-test/tests/cacheir/optimize-get-iterator-7.js b/js/src/jit-test/tests/cacheir/optimize-get-iterator-7.js new file mode 100644 index 0000000000..e6e7a6269e --- /dev/null +++ b/js/src/jit-test/tests/cacheir/optimize-get-iterator-7.js @@ -0,0 +1,10 @@ +setJitCompilerOption("ion.forceinlineCaches", 1); + +function f(arr) { + var [a, b] = arr; + return b; +} + +for (var i = 0; i < 10_000; ++i) { + assertEq(f([0, 1]), 1); +} diff --git a/js/src/jit-test/tests/cacheir/optimize-spread.js b/js/src/jit-test/tests/cacheir/optimize-spread.js new file mode 100644 index 0000000000..accd56ea13 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/optimize-spread.js @@ -0,0 +1,16 @@ +setJitCompilerOption("ion.forceinlineCaches", 1); + +function testOptimizeSpread() { + function f(a, b) { + return a + b; + } + function g(...rest) { + return f(...rest); + } + + for (var i = 0; i < 20; ++i) { + var v = g(1, 2); + assertEq(v, 3); + } +} +for (var i = 0; i < 2; ++i) testOptimizeSpread(); diff --git a/js/src/jit-test/tests/cacheir/parseInt-double-truncate.js b/js/src/jit-test/tests/cacheir/parseInt-double-truncate.js new file mode 100644 index 0000000000..2b989f2624 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/parseInt-double-truncate.js @@ -0,0 +1,41 @@ +// Test some double-truncation edge cases with parseInt(double). + +function testPos1() { + with({}) {} + var fun = d => parseInt(d); + for (var i = 0; i < 2000; i++) { + assertEq(fun(i + 0.5), i); + } + assertEq(fun(0xf_ffff_ffff) + 345, 68719477080); +} +testPos1(); + +function testPos2() { + with({}) {} + var fun = d => parseInt(d); + for (var i = 0; i < 2000; i++) { + assertEq(fun(i + 0.5), i); + } + assertEq(fun(0x8000_0000) + 345, 2147483993); +} +testPos2(); + +function testNeg1() { + with({}) {} + var fun = d => parseInt(d); + for (var i = 0; i < 2000; i++) { + assertEq(fun(i + 0.5), i); + } + assertEq(fun(-0xf_ffff_ffff) - 345, -68719477080); +} +testNeg1(); + +function testNeg2() { + with({}) {} + var fun = d => parseInt(d); + for (var i = 0; i < 2000; i++) { + assertEq(fun(i + 0.5), i); + } + assertEq(fun(-0x8000_0001) - 345, -2147483994); +} +testNeg2(); diff --git a/js/src/jit-test/tests/cacheir/rope-char-at.js b/js/src/jit-test/tests/cacheir/rope-char-at.js new file mode 100644 index 0000000000..6b864035d7 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/rope-char-at.js @@ -0,0 +1,20 @@ +function test(a, b, firstCharCode) { + var s = newRope(a, b); + for (var i = 0; i < s.length; i++) { + assertEq(s.charCodeAt(i), firstCharCode + i); + assertEq(s.charAt(i), String.fromCharCode(firstCharCode + i)); + } + // charAt/charCodeAt support one-level deep ropes without linearizing. + assertEq(isRope(s), true); + assertEq(isRope(a), false); + assertEq(isRope(b), false); +} +test("abcdefghijkl", "mnopqrstuvwxyz", 97); +test("a", "bcdefghijklmnopqrstuvwxyz", 97); +test("abcdefghijklmnopqrstuvwxy", "z", 97); +test("0123456789:;<=>?@ABCDEFGHIJ", "K", 48); +test("\u00fe\u00ff", "\u0100\u0101\u0102\u0103\u0104\u0105\u0106\u0107\u0108\u0109\u010A", 0xfe); +test("\u1000\u1001\u1002", "\u1003\u1004\u1005\u1006\u1007\u1008\u1009\u100A\u100B\u100C", 4096); + +// charAt/charCodeAt stubs currently fail for nested ropes. +test("ab", newRope("cdefghijklmnop", "qrstuvwxyz{|}~"), 97); diff --git a/js/src/jit-test/tests/cacheir/set-has-bigint.js b/js/src/jit-test/tests/cacheir/set-has-bigint.js new file mode 100644 index 0000000000..24c8889e99 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/set-has-bigint.js @@ -0,0 +1,84 @@ +// Return a new set, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createSet(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Set(xs); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testInlineDigitsSameSign(n) { + var xs = [1n, 2n]; + var ys = [3n, 4n]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testInlineDigitsSameSign); + +function testInlineDigitsDifferentSign(n) { + var xs = [-1n, 2n]; + var ys = [1n, -2n]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testInlineDigitsDifferentSign); + +function testHeapDigitsSameSign(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [heap + 1n, heap + 2n]; + var ys = [heap + 3n, heap + 4n]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testHeapDigitsSameSign); + +function testHeapDigitsDifferentSign(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [-(heap + 1n), heap + 2n]; + var ys = [heap + 1n, -(heap + 2n)]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testHeapDigitsDifferentSign); diff --git a/js/src/jit-test/tests/cacheir/set-has-nongcthing.js b/js/src/jit-test/tests/cacheir/set-has-nongcthing.js new file mode 100644 index 0000000000..a5a64e0333 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/set-has-nongcthing.js @@ -0,0 +1,110 @@ +// Return a new set, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createSet(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Set(xs); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testInt32(n) { + var xs = [1, 2]; + var ys = [3, 4]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testInt32); + +function testDouble(n) { + var xs = [Math.PI, Infinity]; + var ys = [Math.E, -Infinity]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testDouble); + +function testZero(n) { + var xs = [0, -0]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var set = createSet([0], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testZero); + +function testNaN(n) { + var xs = [NaN, -NaN]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var set = createSet([NaN], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testNaN); + +function testUndefinedAndNull(n) { + var xs = [undefined, null]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testUndefinedAndNull); + +function testBoolean(n) { + var xs = [true, false]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testBoolean); diff --git a/js/src/jit-test/tests/cacheir/set-has-object.js b/js/src/jit-test/tests/cacheir/set-has-object.js new file mode 100644 index 0000000000..ea1b690d70 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/set-has-object.js @@ -0,0 +1,30 @@ +// Return a new set, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createSet(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Set(xs); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function test(n) { + var xs = [{}, {}]; + var ys = [{}, {}]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(test); diff --git a/js/src/jit-test/tests/cacheir/set-has-string-gczeal.js b/js/src/jit-test/tests/cacheir/set-has-string-gczeal.js new file mode 100644 index 0000000000..9ef81634d6 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/set-has-string-gczeal.js @@ -0,0 +1,17 @@ +// Ensure string hashing works correctly under gczeal=compact. + +gczeal(14) + +function test() { + var set = new Set(); + var c = 0; + var N = 1000; + for (var i = 0; i < N; ++i) { + var k = String.fromCodePoint(i); + set.add(k); + if (set.has(k)) c++; + } + assertEq(c, N); +} + +test(); diff --git a/js/src/jit-test/tests/cacheir/set-has-string.js b/js/src/jit-test/tests/cacheir/set-has-string.js new file mode 100644 index 0000000000..eac19378c4 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/set-has-string.js @@ -0,0 +1,79 @@ +// Return a new set, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createSet(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Set(xs); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testConstant(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testConstant); + +function testConstantFatInline(n) { + var xs = ["a", "b"].map(s => s.repeat(10)); + var ys = ["c", "d"].map(s => s.repeat(10)); + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testConstantFatInline); + +function testComputed(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + z = String.fromCharCode(z.charCodeAt(0)); + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testComputed); + +function testRope(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var set = createSet(xs.map(x => x.repeat(100)), n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3].repeat(100); + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testRope); diff --git a/js/src/jit-test/tests/cacheir/set-has-symbol.js b/js/src/jit-test/tests/cacheir/set-has-symbol.js new file mode 100644 index 0000000000..35e4f11267 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/set-has-symbol.js @@ -0,0 +1,30 @@ +// Return a new set, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createSet(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Set(xs); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function test(n) { + var xs = [Symbol(), Symbol()]; + var ys = [Symbol(), Symbol()]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(test); diff --git a/js/src/jit-test/tests/cacheir/set-has-value.js b/js/src/jit-test/tests/cacheir/set-has-value.js new file mode 100644 index 0000000000..af03bf02e3 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/set-has-value.js @@ -0,0 +1,30 @@ +// Return a new set, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createSet(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Set(xs); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testPolymorphic(n) { + var xs = [10, 10.5, "test", Symbol("?"), 123n, -123n, {}, []]; + var ys = [-0, NaN, "bad", Symbol("!"), 42n, -99n, {}, []]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 128; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 15]; + if (set.has(z)) c++; + } + assertEq(c, N / 2); +} +runTest(testPolymorphic); diff --git a/js/src/jit-test/tests/cacheir/set-size.js b/js/src/jit-test/tests/cacheir/set-size.js new file mode 100644 index 0000000000..894ed83be7 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/set-size.js @@ -0,0 +1,43 @@ +function testEmpty() { + let set = new Set(); + for (let i = 0; i < 100; ++i) { + assertEq(set.size, 0); + } +} +for (let i = 0; i < 2; ++i) testEmpty(); + +function testSimple() { + let set = new Set([1, 2, 3, 4]); + for (let i = 0; i < 100; ++i) { + assertEq(set.size, 4); + } +} +for (let i = 0; i < 2; ++i) testSimple(); + +function testWithDelete() { + for (let i = 0; i < 100; ++i) { + let a = [1, 2, 3, 4]; + let set = new Set(a); + for (let j = 0; j < a.length; ++j) { + assertEq(set.size, a.length - j); + set.delete(a[j]); + assertEq(set.size, a.length - j - 1); + } + assertEq(set.size, 0); + } +} +for (let i = 0; i < 2; ++i) testWithDelete(); + +function testWithAdd() { + for (let i = 0; i < 100; ++i) { + let a = [1, 2, 3, 4]; + let set = new Set(); + for (let j = 0; j < a.length; ++j) { + assertEq(set.size, j); + set.add(a[j]); + assertEq(set.size, j + 1); + } + assertEq(set.size, a.length); + } +} +for (let i = 0; i < 2; ++i) testWithAdd(); diff --git a/js/src/jit-test/tests/cacheir/setelem-id-guard.js b/js/src/jit-test/tests/cacheir/setelem-id-guard.js new file mode 100644 index 0000000000..5f5ef82c58 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/setelem-id-guard.js @@ -0,0 +1,91 @@ +function setSlot() { + var o = {x: 1, y: 2}; + for (var i=0; i<100; i++) { + var p = (i & 1) ? "x" : "y"; + o[p] = i; + assertEq((i & 1) ? o.x : o.y, i); + } +} +setSlot(); + +function setUnboxed() { + var arr = []; + for (var i=0; i<100; i++) + arr.push({x: 1, y: 2}); + + for (var i=0; i<100; i++) { + var o = arr[i]; + var p = (i & 1) ? "x" : "y"; + o[p] = i; + assertEq((i & 1) ? o.x : o.y, i); + } +} +setUnboxed(); + +function setUnboxedExpando() { + var arr = []; + for (var i=0; i<100; i++) + arr.push({x: 1, y: 2}); + + for (var i=0; i<100; i++) { + var o = arr[i]; + o.a = 1; + o.b = 2; + var p = (i & 1) ? "a" : "b"; + o[p] = i; + o[p] = o[p] + 4; + assertEq((i & 1) ? o.a : o.b, i + 4); + } +} +setUnboxedExpando(); + +function setArrayLength() { + var arr = []; + for (var i=0; i<100; i++) { + var p = (i & 1) ? "length" : "x"; + arr[p] = i; + assertEq((i & 1) ? arr.length : arr.x, i); + } +} +setArrayLength(); + +function setter() { + var c = 0; + var o = {set x(i) { c += i; }, set y(i) { c += i + 2; }}; + for (var i=0; i<100; i++) { + var p = (i & 1) ? "x" : "y"; + o[p] = i; + } + assertEq(c, 5050); +} +setter(); + +function addSlot() { + for (var i=0; i<100; i++) { + var o = {}; + var p1 = (i & 1) ? "x" : "y"; + var p2 = (i % 3) ? "a" : "b"; + o[p1] = i; + o[p2] = i; + assertEq((i & 1) ? o.x : o.y, i); + assertEq((i % 3) ? o.a : o.b, i); + } +} +addSlot(); + +function addExpandoSlot() { + var arr = []; + for (var i=0; i<100; i++) + arr.push({c: 1, d: 2}); + + for (var i=0; i<100; i++) { + var o = arr[i]; + var p1 = (i & 1) ? "x" : "y"; + var p2 = (i % 3) ? "a" : "b"; + o[p1] = i; + o[p2] = i; + assertEq((i & 1) ? o.x : o.y, i); + assertEq((i % 3) ? o.a : o.b, i); + } +} +addExpandoSlot(); diff --git a/js/src/jit-test/tests/cacheir/setelem-undefined-null.js b/js/src/jit-test/tests/cacheir/setelem-undefined-null.js new file mode 100644 index 0000000000..894fad5fe6 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/setelem-undefined-null.js @@ -0,0 +1,50 @@ +function exists() { + var a = {'null': 0, 'undefined': 0}; + for (var i = 0; i < 100; i++) { + a[null] = i; + a[undefined] = i * 2; + assertEq(a['null'], i); + assertEq(a['undefined'], i * 2); + } +} + +function adding() { + for (var i = 0; i < 100; i++) { + var a = {}; + a[null] = i; + a[undefined] = i * 2; + assertEq(a['null'], i); + assertEq(a['undefined'], i * 2); + } +} + +function setter() { + var test = 0; + var a = { + set null(v) { + test = v; + }, + set undefined(v) { + test = v * 2; + } + } + for (var i = 0; i < 100; i++) { + a[null] = i; + assertEq(test, i); + a[undefined] = i; + assertEq(test, i * 2); + } +} + +function mixed() { + var a = {'null': void 0, 'undefined': void 0}; + for (var i = 0; i < 100; i++) { + a[i % 2 ? null : undefined] = i; + assertEq(a[i % 2 ? 'null' : 'undefined'], i) + } +} + +exists(); +adding() +setter(); +mixed(); diff --git a/js/src/jit-test/tests/cacheir/setgname-let.js b/js/src/jit-test/tests/cacheir/setgname-let.js new file mode 100644 index 0000000000..92345fb0df --- /dev/null +++ b/js/src/jit-test/tests/cacheir/setgname-let.js @@ -0,0 +1,93 @@ +let x = 2; + +function simple() { + for (var i = 0; i < 10; i++) { + x = i; + assertEq(x, i); + } +} + +function setname() { + function set(obj, v) { + with (obj) { + x = v; + } + } + + set({}, 100) + assertEq(x, 100); + set({x: 1}, 0); + assertEq(x, 100); + set({__proto__: {x: 1}}, 13); + assertEq(x, 100); +} + + +function noshadow() { + for (var i = 0; i < 20; i++) { + x = i; + assertEq(x, i); + + if (i == 10) { + globalThis.x = "haha"; + assertEq(x, 10); + } + } +} + +function uninitialized() { + for (var i = 0; i < 20; i++) { + var threw = false; + try { + undef = 2; + } catch { + threw = true; + } + assertEq(threw, true); + } +} + +function simpleStrict() { + "use strict"; + for (var i = 0; i < 10; i++) { + x = i; + assertEq(x, i); + } +} + +// No with in strict! + +function noshadowStrict() { + "use strict"; + for (var i = 0; i < 20; i++) { + x = i; + assertEq(x, i); + + if (i == 10) { + globalThis.x = "haha"; + assertEq(x, 10); + } + } +} + +function uninitializedStrict() { + for (var i = 0; i < 20; i++) { + var threw = false; + try { + undef = 2; + } catch { + threw = true; + } + assertEq(threw, true); + } +} + +simple(); +setname(); +noshadow(); +uninitialized(); +simpleStrict(); +noshadowStrict(); +uninitializedStrict(); + +let undef = 42; diff --git a/js/src/jit-test/tests/cacheir/setter-is-native.js b/js/src/jit-test/tests/cacheir/setter-is-native.js new file mode 100644 index 0000000000..28949b0640 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/setter-is-native.js @@ -0,0 +1,15 @@ +// Make sure we use an IC call. +setJitCompilerOption("ion.forceinlineCaches", 1); + +// Assume |eval| is always a native function. +var obj = Object.defineProperty({}, "prop", { + set: eval +}); + +var p; +for (let i = 0; i < 1000; ++i) { + // Call the native setter (eval). + obj.prop = `p = ${i}`; + + assertEq(p, i); +} diff --git a/js/src/jit-test/tests/cacheir/shape-teleporting-1.js b/js/src/jit-test/tests/cacheir/shape-teleporting-1.js new file mode 100644 index 0000000000..35deb8c34f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/shape-teleporting-1.js @@ -0,0 +1,128 @@ +// Receiver shadows +(function() { + function check(p) { return p.x; } + + let a = { x: "a" }; + let b = { __proto__: a }; + let c = { __proto__: b }; + let d = { __proto__: c }; + + assertEq(check(d), "a"); + assertEq(check(d), "a"); + d.x = "d"; + assertEq(check(d), "d"); +})(); + +// Intermediate proto shadows +(function() { + function check(p) { return p.x; } + + let a = { x: "a" }; + let b = { __proto__: a }; + let c = { __proto__: b }; + let d = { __proto__: c }; + + assertEq(check(d), "a"); + assertEq(check(d), "a"); + c.x = "c"; + assertEq(check(d), "c"); +})(); + +// Receiver proto changes +(function() { + function check(p) { return p.x; } + + let a = { x: "a" }; + let b = { __proto__: a }; + let c = { __proto__: b }; + let d = { __proto__: c }; + + assertEq(check(d), "a"); + assertEq(check(d), "a"); + d.__proto__ = { x: "?" }; + assertEq(check(d), "?"); +})(); + +// Intermediate proto changes +(function() { + function check(p) { return p.x; } + + let a = { x: "a" }; + let b = { __proto__: a }; + let c = { __proto__: b }; + let d = { __proto__: c }; + + assertEq(check(d), "a"); + assertEq(check(d), "a"); + c.__proto__ = { x: "?" }; + assertEq(check(d), "?"); +})(); + +// Uncacheable holder proto +(function() { + function check(p) { return p.x; } + + function Base() { this.x = "a"; } + let a = new Base; + a.__proto__ = new Object; + let b = { __proto__: a }; + let c = { __proto__: b }; + let d = { __proto__: c }; + + assertEq(check(d), "a"); + assertEq(check(d), "a"); + b.__proto__ = { x: "?" }; + assertEq(check(d), "?"); +})(); + +// Uncacheable intermediate proto +(function() { + function check(p) { return p.x; } + + function Base() { this.x = "a"; } + function Node() { } + + let a = new Base; + let b = new Node; b.__proto__ = a; + let c = { __proto__: b }; + let d = { __proto__: c }; + + assertEq(check(d), "a"); + assertEq(check(d), "a"); + b.__proto__ = { x: "?" }; + assertEq(check(d), "?"); +})(); + +// Uncacheable receiver proto +(function() { + function check(p) { return p.x; } + + function Base() { this.x = "a"; } + function Node() { } + + let a = new Base; + let b = { __proto__: a }; + let c = { __proto__: b }; + let d = new Node; d.__proto__ = c; + + assertEq(check(d), "a"); + assertEq(check(d), "a"); + d.__proto__ = { x: "?" }; + assertEq(check(d), "?"); +})(); + +// Uncacheable receiver proto (only receiver / holder) +(function() { + function check(p) { return p.x; } + + function Base() { this.x = "a"; } + function Node() { } + + let a = new Base; + let b = new Node; b.__proto__ = a; + + assertEq(check(b), "a"); + assertEq(check(b), "a"); + b.__proto__ = { x: "?" }; + assertEq(check(b), "?"); +})(); diff --git a/js/src/jit-test/tests/cacheir/shape-teleporting-2.js b/js/src/jit-test/tests/cacheir/shape-teleporting-2.js new file mode 100644 index 0000000000..1b103d7ec3 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/shape-teleporting-2.js @@ -0,0 +1,47 @@ +function A(name) { this.name = name; } +function B() { } +function C() { } + +B.prototype = A0 = new A("0"); +C.prototype = B0 = new B(); + +var A1 = new A("1"); +var A2 = new A("2"); + +var B1 = new B(); +var B2 = new B(); + +var C1 = new C(); +var C2 = new C(); + +// Object <-+- A0 <-+- B0 <-+ +// | | | +// +- A1 +- B1 +- C1 +// | | | +// +- A2 +- B2 +- C2 + +Object.setPrototypeOf(C1, B1); +Object.setPrototypeOf(C2, B2); + +Object.setPrototypeOf(B1, A1); +Object.setPrototypeOf(B2, A2); + +// Object <-+- A0 <--- B0 +// | +// +- A1 <--- B1 <--- C1 +// | +// +- A2 <--- B2 <--- C2 + + +function getName(o) { return o.name; } + +// Warm up JIT +for (var i = 0; i < 100; i++) { + getName(C1); +} + +assertEq(B1.name, "1"); +assertEq(B2.name, "2"); + +assertEq(getName(B1), "1"); +assertEq(getName(B2), "2"); diff --git a/js/src/jit-test/tests/cacheir/shape-teleporting-3.js b/js/src/jit-test/tests/cacheir/shape-teleporting-3.js new file mode 100644 index 0000000000..18349056c3 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/shape-teleporting-3.js @@ -0,0 +1,32 @@ +function test1() { + var o1 = {x: 1, y: 2, z: 3}; + var o2 = Object.create(o1); + var o3 = Object.create(o2); + o2.x = 2; // Ensure teleporting is invalidated for o1. + for (var i = 0; i < 30; i++) { + assertEq(o3.y, i > 20 ? -1 : 2); + if (i === 20) { + // Add a (second) shadowing property to o2. The property access + // above must detect this properly. + o2.y = -1; + } + } +} +test1(); + +function test2() { + var o1 = {x: 1, y: 2, z: 3}; + var o2 = Object.create(o1); + var o3 = Object.create(o2); + var o4 = Object.create(o3); + o2.x = 1; + o2.a = 2; + o3.a = 2; + for (var i = 0; i < 30; i++) { + assertEq(o4.y, i > 20 ? undefined : 2); + if (i === 20) { + o2.__proto__ = null; + } + } +} +test2(); diff --git a/js/src/jit-test/tests/cacheir/spread-minmax-1.js b/js/src/jit-test/tests/cacheir/spread-minmax-1.js new file mode 100644 index 0000000000..b1bd6e5692 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/spread-minmax-1.js @@ -0,0 +1,23 @@ +function testMin(arr) { + var sum = 0; + for (var i = 0; i < 50; i++) { + sum += Math.min(...arr); + } + return sum; +} + +function testMax(arr) { + var sum = 0; + for (var i = 0; i < 50; i++) { + sum += Math.max(...arr); + } + return sum; +} + +// Attach Int32MinMaxArrayResult. +assertEq(testMin([1,2,3,4,5]), 50); +assertEq(testMax([1,2,3,4,5]), 250); + +// Verify that we handle an empty list correctly. +assertEq(testMin([]), Infinity); +assertEq(testMax([]), -Infinity); diff --git a/js/src/jit-test/tests/cacheir/spread-minmax-2.js b/js/src/jit-test/tests/cacheir/spread-minmax-2.js new file mode 100644 index 0000000000..4cc3b0d9d6 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/spread-minmax-2.js @@ -0,0 +1,23 @@ +function testMin(arr) { + var sum = 0; + for (var i = 0; i < 50; i++) { + sum += Math.min(...arr); + } + return sum; +} + +function testMax(arr) { + var sum = 0; + for (var i = 0; i < 50; i++) { + sum += Math.max(...arr); + } + return sum; +} + +// Attach Int32MinMaxArrayResult. +assertEq(testMin([1,2,3,4,5]), 50); +assertEq(testMax([1,2,3,4,5]), 250); + +// Verify that we handle a double element correctly. +assertEq(testMin([1,2,3.5,4,5]), 50); +assertEq(testMax([1,2,3.5,4,5]), 250); diff --git a/js/src/jit-test/tests/cacheir/spread-minmax-3.js b/js/src/jit-test/tests/cacheir/spread-minmax-3.js new file mode 100644 index 0000000000..ae92e5e555 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/spread-minmax-3.js @@ -0,0 +1,25 @@ +function testMin(arr) { + return Math.min(...arr); +} + +function testMax(arr) { + return Math.max(...arr); +} + +with({}) {} + +// Warp-compile. +var sum = 0; +for (var i = 0; i < 50; i++) { + sum += testMin([1, 2.5, 3]); + sum += testMax([1, 2.5, 3]); +} +assertEq(sum, 200); + +// Test min/max with no arguments. +assertEq(testMin([]), Infinity); +assertEq(testMax([]), -Infinity); + +// Test NaN. +assertEq(testMin([1,NaN]), NaN); +assertEq(testMax([1,NaN]), NaN); diff --git a/js/src/jit-test/tests/cacheir/spread-minmax-4.js b/js/src/jit-test/tests/cacheir/spread-minmax-4.js new file mode 100644 index 0000000000..b6e57b9550 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/spread-minmax-4.js @@ -0,0 +1,15 @@ +function f(...rest) { + for (var i = 0; i < 100; ++i) { + rest[0] = 0; + var v = Math.max(...rest); + + rest[0] = i; + var w = Math.max(...rest); + + assertEq(v, 0); + assertEq(w, i); + } +} +for (var i = 0; i < 2; ++i) { + f(0, 0); +} diff --git a/js/src/jit-test/tests/cacheir/spread-minmax-5.js b/js/src/jit-test/tests/cacheir/spread-minmax-5.js new file mode 100644 index 0000000000..a787f16783 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/spread-minmax-5.js @@ -0,0 +1,12 @@ +function f() { + var arr = [[]]; + for (var i = 1; i < 101; i++) { + arr[0].push(i); + } + var res = 0; + for (var i = 0; i < 100; i++) { + res += Math.max(...arr[0]) + Math.min(...arr[0]); + } + assertEq(res, 10100); +} +f(); diff --git a/js/src/jit-test/tests/cacheir/store-dense-element-hole-non-extensible.js b/js/src/jit-test/tests/cacheir/store-dense-element-hole-non-extensible.js new file mode 100644 index 0000000000..21ad5f5164 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/store-dense-element-hole-non-extensible.js @@ -0,0 +1,55 @@ +// Store an element into a previous hole value and later add more elements +// exceeding the initialised length. Cover both mono- and polymorphic call +// sites. Change array length to non-extensible during execution. + +function testStoreDenseHole() { + var array = [/* hole */, /* hole */, /* hole */, /* hole */, ]; + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 0; i < 10; ++i) { + if (i === 5) { + Object.preventExtensions(array); + } + store(array, i); + } + + assertEq(array.length, 5); + for (var i = 0; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testStoreDenseHole(); + +function testStoreDenseHolePoly() { + var array = [/* hole */, /* hole */, /* hole */, /* hole */, ]; + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 0; i < 10; ++i) { + if (i === 5) { + Object.preventExtensions(array); + } + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 5); + for (var i = 0; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testStoreDenseHolePoly(); diff --git a/js/src/jit-test/tests/cacheir/store-dense-element-hole-non-writable-length-at-start.js b/js/src/jit-test/tests/cacheir/store-dense-element-hole-non-writable-length-at-start.js new file mode 100644 index 0000000000..513fd6bc08 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/store-dense-element-hole-non-writable-length-at-start.js @@ -0,0 +1,55 @@ +// Store an element into a previous hole value and later add more elements +// exceeding the initialised length. Cover both mono- and polymorphic call +// sites. The array has a non-writable length at the start. + +function testStoreDenseHole() { + var array = [/* hole */, /* hole */, /* hole */, /* hole */, ]; + Object.defineProperty(array, "length", { + writable: false + }); + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 0; i < 10; ++i) { + store(array, i); + } + + assertEq(array.length, 4); + for (var i = 0; i < 4; ++i) { + assertEq(array[i], i); + } + for (var i = 4; i < 10; ++i) { + assertEq(i in array, false); + } +} +testStoreDenseHole(); + +function testStoreDenseHolePoly() { + var array = [/* hole */, /* hole */, /* hole */, /* hole */, ]; + Object.defineProperty(array, "length", { + writable: false + }); + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 0; i < 10; ++i) { + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 4); + for (var i = 0; i < 4; ++i) { + assertEq(array[i], i); + } + for (var i = 4; i < 10; ++i) { + assertEq(i in array, false); + } +} +testStoreDenseHolePoly(); diff --git a/js/src/jit-test/tests/cacheir/store-dense-element-hole-non-writable-length.js b/js/src/jit-test/tests/cacheir/store-dense-element-hole-non-writable-length.js new file mode 100644 index 0000000000..468976332f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/store-dense-element-hole-non-writable-length.js @@ -0,0 +1,55 @@ +// Store an element into a previous hole value and later add more elements +// exceeding the initialised length. Cover both mono- and polymorphic call +// sites. Change array length to non-writable during execution. + +function testStoreDenseHole() { + var array = [/* hole */, /* hole */, /* hole */, /* hole */, ]; + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 0; i < 10; ++i) { + if (i === 5) { + Object.defineProperty(array, "length", {writable: false}); + } + store(array, i); + } + + assertEq(array.length, 5); + for (var i = 0; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testStoreDenseHole(); + +function testStoreDenseHolePoly() { + var array = [/* hole */, /* hole */, /* hole */, /* hole */, ]; + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 0; i < 10; ++i) { + if (i === 5) { + Object.defineProperty(array, "length", {writable: false}); + } + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 5); + for (var i = 0; i < 5; ++i) { + assertEq(array[i], i); + } + for (var i = 5; i < 10; ++i) { + assertEq(i in array, false); + } +} +testStoreDenseHolePoly(); diff --git a/js/src/jit-test/tests/cacheir/store-dense-element-hole.js b/js/src/jit-test/tests/cacheir/store-dense-element-hole.js new file mode 100644 index 0000000000..fece420056 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/store-dense-element-hole.js @@ -0,0 +1,43 @@ +// Store an element into a previous hole value and later add more elements +// exceeding the initialised length. Cover both mono- and polymorphic call +// sites. + +function testStoreDenseHole() { + var array = [/* hole */, /* hole */, /* hole */, /* hole */, ]; + + function store(ar, index) { + ar[index] = index; + } + + for (var i = 0; i < 10; ++i) { + store(array, i); + } + + assertEq(array.length, 10); + for (var i = 0; i < 10; ++i) { + assertEq(array[i], i); + } +} +testStoreDenseHole(); + +function testStoreDenseHolePoly() { + var array = [/* hole */, /* hole */, /* hole */, /* hole */, ]; + + function store(ar, index) { + ar[index] = index; + } + + var objects = [array, {}]; + + for (var i = 0; i < 10; ++i) { + for (var j = 0; j < objects.length; ++j) { + store(objects[j], i); + } + } + + assertEq(array.length, 10); + for (var i = 0; i < 10; ++i) { + assertEq(array[i], i); + } +} +testStoreDenseHolePoly(); diff --git a/js/src/jit-test/tests/cacheir/store-typed-element-bigint.js b/js/src/jit-test/tests/cacheir/store-typed-element-bigint.js new file mode 100644 index 0000000000..e46ca13f85 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/store-typed-element-bigint.js @@ -0,0 +1,131 @@ +// Different typed array types to ensure we emit a SetProp IC. +var xs = [ + new BigInt64Array(10), + new BigUint64Array(10), +]; + +// Store with 0n as rhs. +function storeConstantZero() { + var value = 0n; + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + ta[0] = value; + } + + assertEq(xs[0][0], BigInt.asIntN(64, value)); + assertEq(xs[1][0], BigInt.asUintN(64, value)); +} +storeConstantZero(); + +// Store non-negative BigInt using inline digits. +function storeInlineDigits() { + var value = 1n; + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + ta[0] = value; + } + + assertEq(xs[0][0], BigInt.asIntN(64, value)); + assertEq(xs[1][0], BigInt.asUintN(64, value)); +} +storeInlineDigits(); + +// Store negative BigInt using inline digits. +function storeInlineDigitsNegative() { + var value = -1n; + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + ta[0] = value; + } + + assertEq(xs[0][0], BigInt.asIntN(64, value)); + assertEq(xs[1][0], BigInt.asUintN(64, value)); +} +storeInlineDigitsNegative(); + +// Still inline digits, but now two digits on 32-bit platforms +function storeInlineDigitsTwoDigits() { + var value = 4294967296n; + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + ta[0] = value; + } + + assertEq(xs[0][0], BigInt.asIntN(64, value)); + assertEq(xs[1][0], BigInt.asUintN(64, value)); +} +storeInlineDigitsTwoDigits(); + +// Negative case of |storeInlineDigitsTwoDigits|. +function storeInlineDigitsTwoDigitsNegative() { + var value = -4294967296n; + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + ta[0] = value; + } + + assertEq(xs[0][0], BigInt.asIntN(64, value)); + assertEq(xs[1][0], BigInt.asUintN(64, value)); +} +storeInlineDigitsTwoDigitsNegative(); + +// Store BigInt using heap digits. +function storeHeapDigits() { + var value = 2n ** 1000n; + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + ta[0] = value; + } + + assertEq(xs[0][0], BigInt.asIntN(64, value)); + assertEq(xs[1][0], BigInt.asUintN(64, value)); +} +storeHeapDigits(); + +// Store negative BigInt using heap digits. +function storeHeapDigitsNegative() { + var value = -(2n ** 1000n); + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + ta[0] = value; + } + + assertEq(xs[0][0], BigInt.asIntN(64, value)); + assertEq(xs[1][0], BigInt.asUintN(64, value)); +} +storeHeapDigitsNegative(); + +// Store BigInt with first number requiring heap digits. +function storeFirstHeapDigits() { + var value = 2n ** 64n; + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + ta[0] = value; + } + + assertEq(xs[0][0], BigInt.asIntN(64, value)); + assertEq(xs[1][0], BigInt.asUintN(64, value)); +} +storeFirstHeapDigits(); + +// Store negative BigInt with first number requiring heap digits. +function storeFirstHeapDigitsNegative() { + var value = -(2n ** 64n); + + for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + ta[0] = value; + } + + assertEq(xs[0][0], BigInt.asIntN(64, value)); + assertEq(xs[1][0], BigInt.asUintN(64, value)); +} +storeFirstHeapDigitsNegative(); diff --git a/js/src/jit-test/tests/cacheir/store-typed-element-constant-double-rhs.js b/js/src/jit-test/tests/cacheir/store-typed-element-constant-double-rhs.js new file mode 100644 index 0000000000..a084a733f9 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/store-typed-element-constant-double-rhs.js @@ -0,0 +1,15 @@ +// Different typed array types to ensure we emit a SetProp IC. +var xs = [ + new Float32Array(10), + new Float64Array(10), +]; + +for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + + // Store with constant rhs. + ta[0] = 0.1; +} + +assertEq(xs[0][0], Math.fround(0.1)); +assertEq(xs[1][0], 0.1); diff --git a/js/src/jit-test/tests/cacheir/store-typed-element-payload-reg-rhs.js b/js/src/jit-test/tests/cacheir/store-typed-element-payload-reg-rhs.js new file mode 100644 index 0000000000..948fc74783 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/store-typed-element-payload-reg-rhs.js @@ -0,0 +1,17 @@ +// Different typed array types to ensure we emit a SetProp IC. +var xs = [ + new Float32Array(10), + new Float64Array(10), +]; + +for (var i = 0; i < 100; ++i) { + var ta = xs[i & 1]; + + var v = +ta[0]; + + // Store with payload-register rhs. + ta[0] = ~v; +} + +assertEq(xs[0][0], 0); +assertEq(xs[1][0], 0); diff --git a/js/src/jit-test/tests/cacheir/store-typed-element-payload-stack-rhs.js b/js/src/jit-test/tests/cacheir/store-typed-element-payload-stack-rhs.js new file mode 100644 index 0000000000..dcaa059864 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/store-typed-element-payload-stack-rhs.js @@ -0,0 +1,20 @@ +// Different typed array types to ensure we emit a SetProp IC. +var xs = [ + new Float32Array(10), + new Float64Array(10), +]; + +function f(ta) { + for (var k = 0;;) { + // Store with payload-stack rhs. + ta[k] = k; + break; + } +} + +for (var i = 0; i < 100; ++i) { + f(xs[i & 1]); +} + +assertEq(xs[0][0], 0); +assertEq(xs[1][0], 0); diff --git a/js/src/jit-test/tests/cacheir/string-at-oob.js b/js/src/jit-test/tests/cacheir/string-at-oob.js new file mode 100644 index 0000000000..b7e71db87f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-at-oob.js @@ -0,0 +1,151 @@ +// Test String.prototype.at with out-of-bounds indices. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const empty = []; + +const ascii = [...characters( + [0x41, 0x5A], // A..Z + [0x61, 0x7A], // a..z +)]; + +const latin1 = [...characters( + [0xC0, 0xFF], // À..ÿ +)]; + +const twoByte = [...characters( + [0x100, 0x17E], // Ā..ž +)]; + +function atomize(s) { + return Object.keys({[s]: 0})[0]; +} + +function codePoints() { + return [empty, ascii, latin1, twoByte]; +} + +function toRope(s) { + // Ropes have at least two characters. + if (s.length < 2) { + return s; + } + if (s.length === 2) { + return newRope(s[0], s[1]); + } + return newRope(s[0], s.substring(1)); +} + +function makeStrings() { + let strings = codePoints() + .map(codePoints => String.fromCodePoint(...codePoints)) + .flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + atomize(x), + ]); + return strings; +} + +function testNegativeIndexConstant() { + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.at(-1000); + assertEq(ch, undefined); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeIndexConstant(); +} + +function testNegativeIndexVariable() { + let indices = [-1000, -2000]; + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.at(indices[i & 1]); + assertEq(ch, undefined); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeIndexVariable(); +} + +function testNegativeOrValidIndex() { + let indices = [-1000, 0]; + let strings = makeStrings(); + + // Number of string kinds created in makeStrings. + const N = 4; + + let cpoints = codePoints(); + assertEq(strings.length, cpoints.length * N); + + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let index = indices[i & 1]; + let ch = str.at(index); + + let cp = cpoints[Math.trunc((i % strings.length) / N)]; + assertEq(ch, (0 <= index && index < cp.length ? String.fromCodePoint(cp[index]) : undefined)); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeOrValidIndex(); +} + +function testTooLargeIndexConstant() { + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.at(1000); + assertEq(ch, undefined); + } +} +for (let i = 0; i < 2; ++i) { + testTooLargeIndexConstant(); +} + +function testTooLargeIndexVariable() { + let indices = [1000, 2000]; + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.at(indices[i & 1]); + assertEq(ch, undefined); + } +} +for (let i = 0; i < 2; ++i) { + testTooLargeIndexVariable(); +} + +function testTooLargeOrValidIndex() { + let indices = [1000, 0]; + let strings = makeStrings(); + + // Number of string kinds created in makeStrings. + const N = 4; + + let cpoints = codePoints(); + assertEq(strings.length, cpoints.length * N); + + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let index = indices[i & 1]; + let ch = str.at(index); + + let cp = cpoints[Math.trunc((i % strings.length) / N)]; + assertEq(ch, (0 <= index && index < cp.length ? String.fromCodePoint(cp[index]) : undefined)); + } +} +for (let i = 0; i < 2; ++i) { + testTooLargeOrValidIndex(); +} diff --git a/js/src/jit-test/tests/cacheir/string-at-rope.js b/js/src/jit-test/tests/cacheir/string-at-rope.js new file mode 100644 index 0000000000..aa41fa1440 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-at-rope.js @@ -0,0 +1,80 @@ +function makeRope() { + var left = newRope("@ABCDEFGHIJKLMNO", "PQRSTUVWXYZ[\\]^_"); + var right = newRope("`abcdefghijklmno", "pqrstuvwxyz{|}~"); + var rope = newRope(left, right); + return {left, right, rope}; +} + +// Load a character from the left rope child using a constant index. The input +// to String.prototype.at is always rope. +function testLeftChildConstant() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + var ch = rope.at(0); + assertEq(ch, "@"); + } +} +for (var i = 0; i < 2; ++i) { + testLeftChildConstant(); +} + +// Load a character from the right rope child using a constant index. The input +// to String.prototype.at is always rope. +function testRightChildConstant() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + var ch = rope.at(32); + assertEq(ch, "`"); + } +} +for (var i = 0; i < 2; ++i) { + testRightChildConstant(); +} + +// Load a character from the left rope child using a variable index. The input +// to String.prototype.at is always rope. +function testLeftChildVariable() { + for (var i = 0; i < 200; ++i) { + var {left, rope} = makeRope(); + + var idx = i % left.length; + var ch = rope.at(idx); + assertEq(ch, String.fromCharCode(0x40 + idx)); + } +} +for (var i = 0; i < 2; ++i) { + testLeftChildVariable(); +} + +// Load a character from the right rope child using a variable index. The input +// to String.prototype.at is always rope. +function testRightChildVariable() { + for (var i = 0; i < 200; ++i) { + var {left, right, rope} = makeRope(); + + var idx = i % right.length; + var ch = rope.at(left.length + idx); + assertEq(ch, String.fromCharCode(0x60 + idx)); + } +} +for (var i = 0; i < 2; ++i) { + testRightChildVariable(); +} + +// Load all characters from both child ropes. This covers the case when the +// call to String.prototype.at linearizes the rope. +function testBothChildren() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + for (var j = 0; j < rope.length; ++j) { + var ch = rope.at(j); + assertEq(ch, String.fromCharCode(0x40 + j)); + } + } +} +for (var i = 0; i < 2; ++i) { + testBothChildren(); +} diff --git a/js/src/jit-test/tests/cacheir/string-at.js b/js/src/jit-test/tests/cacheir/string-at.js new file mode 100644 index 0000000000..8dfb2f779e --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-at.js @@ -0,0 +1,115 @@ +// Test String.prototype.at with negative and non-negative indices. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const empty = []; + +const ascii = [...characters( + [0x41, 0x5A], // A..Z + [0x61, 0x7A], // a..z +)]; + +const latin1 = [...characters( + [0xC0, 0xFF], // À..ÿ +)]; + +const twoByte = [...characters( + [0x100, 0x17E], // Ā..ž +)]; + +function atomize(s) { + return Object.keys({[s]: 0})[0]; +} + +function codePoints() { + return [empty, ascii, latin1, twoByte]; +} + +function toRope(s) { + // Ropes have at least two characters. + if (s.length < 2) { + return s; + } + if (s.length === 2) { + return newRope(s[0], s[1]); + } + return newRope(s[0], s.substring(1)); +} + +function makeStrings() { + let strings = codePoints() + .map(codePoints => String.fromCodePoint(...codePoints)) + .flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + atomize(x), + ]); + return strings; +} + +function testNonNegativeIndexConstant() { + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let index = 0; + let ch = str.at(index); + let expected = str.charAt(index); + if (expected === "") expected = undefined; + assertEq(ch, expected); + } +} +for (let i = 0; i < 2; ++i) { + testNonNegativeIndexConstant(); +} + +function testNonNegativeIndex() { + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let index = i & 3; + let ch = str.at(index); + let expected = str.charAt(index); + if (expected === "") expected = undefined; + assertEq(ch, expected); + } +} +for (let i = 0; i < 2; ++i) { + testNonNegativeIndex(); +} + +function testNegativeIndexConstant() { + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let index = -1; + let ch = str.at(index); + let expected = str.charAt(str.length + index); + if (expected === "") expected = undefined; + assertEq(ch, expected); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeIndexConstant(); +} + +function testNegativeIndex() { + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let index = -(i & 3) - 1; + let ch = str.at(index); + let expected = str.charAt(str.length + index); + if (expected === "") expected = undefined; + assertEq(ch, expected); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeIndex(); +} diff --git a/js/src/jit-test/tests/cacheir/string-charAt-oob.js b/js/src/jit-test/tests/cacheir/string-charAt-oob.js new file mode 100644 index 0000000000..4de28d691a --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-charAt-oob.js @@ -0,0 +1,151 @@ +// Test String.prototype.charAt with out-of-bounds indices. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const empty = []; + +const ascii = [...characters( + [0x41, 0x5A], // A..Z + [0x61, 0x7A], // a..z +)]; + +const latin1 = [...characters( + [0xC0, 0xFF], // À..ÿ +)]; + +const twoByte = [...characters( + [0x100, 0x17E], // Ā..ž +)]; + +function atomize(s) { + return Object.keys({[s]: 0})[0]; +} + +function codePoints() { + return [empty, ascii, latin1, twoByte]; +} + +function toRope(s) { + // Ropes have at least two characters. + if (s.length < 2) { + return s; + } + if (s.length === 2) { + return newRope(s[0], s[1]); + } + return newRope(s[0], s.substring(1)); +} + +function makeStrings() { + let strings = codePoints() + .map(codePoints => String.fromCodePoint(...codePoints)) + .flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + atomize(x), + ]); + return strings; +} + +function testNegativeIndexConstant() { + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.charAt(-1); + assertEq(ch, ""); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeIndexConstant(); +} + +function testNegativeIndexVariable() { + let indices = [-1, -2]; + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.charAt(indices[i & 1]); + assertEq(ch, ""); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeIndexVariable(); +} + +function testNegativeOrValidIndex() { + let indices = [-1, 0]; + let strings = makeStrings(); + + // Number of string kinds created in makeStrings. + const N = 4; + + let cpoints = codePoints(); + assertEq(strings.length, cpoints.length * N); + + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let index = indices[i & 1]; + let ch = str.charAt(index); + + let cp = cpoints[Math.trunc((i % strings.length) / N)]; + assertEq(ch, (0 <= index && index < cp.length ? String.fromCodePoint(cp[index]) : "")); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeOrValidIndex(); +} + +function testTooLargeIndexConstant() { + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.charAt(1000); + assertEq(ch, ""); + } +} +for (let i = 0; i < 2; ++i) { + testTooLargeIndexConstant(); +} + +function testTooLargeIndexVariable() { + let indices = [1000, 2000]; + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.charAt(indices[i & 1]); + assertEq(ch, ""); + } +} +for (let i = 0; i < 2; ++i) { + testTooLargeIndexVariable(); +} + +function testTooLargeOrValidIndex() { + let indices = [1000, 0]; + let strings = makeStrings(); + + // Number of string kinds created in makeStrings. + const N = 4; + + let cpoints = codePoints(); + assertEq(strings.length, cpoints.length * N); + + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let index = indices[i & 1]; + let ch = str.charAt(index); + + let cp = cpoints[Math.trunc((i % strings.length) / N)]; + assertEq(ch, (0 <= index && index < cp.length ? String.fromCodePoint(cp[index]) : "")); + } +} +for (let i = 0; i < 2; ++i) { + testTooLargeOrValidIndex(); +} diff --git a/js/src/jit-test/tests/cacheir/string-charAt-rope.js b/js/src/jit-test/tests/cacheir/string-charAt-rope.js new file mode 100644 index 0000000000..ea656e132c --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-charAt-rope.js @@ -0,0 +1,80 @@ +function makeRope() { + var left = newRope("@ABCDEFGHIJKLMNO", "PQRSTUVWXYZ[\\]^_"); + var right = newRope("`abcdefghijklmno", "pqrstuvwxyz{|}~"); + var rope = newRope(left, right); + return {left, right, rope}; +} + +// Load a character from the left rope child using a constant index. The input +// to String.prototype.charAt is always rope. +function testLeftChildConstant() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + var ch = rope.charAt(0); + assertEq(ch, "@"); + } +} +for (var i = 0; i < 2; ++i) { + testLeftChildConstant(); +} + +// Load a character from the right rope child using a constant index. The input +// to String.prototype.charAt is always rope. +function testRightChildConstant() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + var ch = rope.charAt(32); + assertEq(ch, "`"); + } +} +for (var i = 0; i < 2; ++i) { + testRightChildConstant(); +} + +// Load a character from the left rope child using a variable index. The input +// to String.prototype.charAt is always rope. +function testLeftChildVariable() { + for (var i = 0; i < 200; ++i) { + var {left, rope} = makeRope(); + + var idx = i % left.length; + var ch = rope.charAt(idx); + assertEq(ch, String.fromCharCode(0x40 + idx)); + } +} +for (var i = 0; i < 2; ++i) { + testLeftChildVariable(); +} + +// Load a character from the right rope child using a variable index. The input +// to String.prototype.charAt is always rope. +function testRightChildVariable() { + for (var i = 0; i < 200; ++i) { + var {left, right, rope} = makeRope(); + + var idx = i % right.length; + var ch = rope.charAt(left.length + idx); + assertEq(ch, String.fromCharCode(0x60 + idx)); + } +} +for (var i = 0; i < 2; ++i) { + testRightChildVariable(); +} + +// Load all characters from both child ropes. This covers the case when the +// call to String.prototype.charAt linearizes the rope. +function testBothChildren() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + for (var j = 0; j < rope.length; ++j) { + var ch = rope.charAt(j); + assertEq(ch, String.fromCharCode(0x40 + j)); + } + } +} +for (var i = 0; i < 2; ++i) { + testBothChildren(); +} diff --git a/js/src/jit-test/tests/cacheir/string-charCodeAt-oob.js b/js/src/jit-test/tests/cacheir/string-charCodeAt-oob.js new file mode 100644 index 0000000000..da9b826d94 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-charCodeAt-oob.js @@ -0,0 +1,151 @@ +// Test String.prototype.charCodeAt with out-of-bounds indices. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const empty = []; + +const ascii = [...characters( + [0x41, 0x5A], // A..Z + [0x61, 0x7A], // a..z +)]; + +const latin1 = [...characters( + [0xC0, 0xFF], // À..ÿ +)]; + +const twoByte = [...characters( + [0x100, 0x17E], // Ā..ž +)]; + +function atomize(s) { + return Object.keys({[s]: 0})[0]; +} + +function codePoints() { + return [empty, ascii, latin1, twoByte]; +} + +function toRope(s) { + // Ropes have at least two characters. + if (s.length < 2) { + return s; + } + if (s.length === 2) { + return newRope(s[0], s[1]); + } + return newRope(s[0], s.substring(1)); +} + +function makeStrings() { + let strings = codePoints() + .map(codePoints => String.fromCodePoint(...codePoints)) + .flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + atomize(x), + ]); + return strings; +} + +function testNegativeIndexConstant() { + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.charCodeAt(-1); + assertEq(ch, NaN); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeIndexConstant(); +} + +function testNegativeIndexVariable() { + let indices = [-1, -2]; + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.charCodeAt(indices[i & 1]); + assertEq(ch, NaN); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeIndexVariable(); +} + +function testNegativeOrValidIndex() { + let indices = [-1, 0]; + let strings = makeStrings(); + + // Number of string kinds created in makeStrings. + const N = 4; + + let cpoints = codePoints(); + assertEq(strings.length, cpoints.length * N); + + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let index = indices[i & 1]; + let ch = str.charCodeAt(index); + + let cp = cpoints[Math.trunc((i % strings.length) / N)]; + assertEq(ch, (0 <= index && index < cp.length ? cp[index] : NaN)); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeOrValidIndex(); +} + +function testTooLargeIndexConstant() { + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.charCodeAt(1000); + assertEq(ch, NaN); + } +} +for (let i = 0; i < 2; ++i) { + testTooLargeIndexConstant(); +} + +function testTooLargeIndexVariable() { + let indices = [1000, 2000]; + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.charCodeAt(indices[i & 1]); + assertEq(ch, NaN); + } +} +for (let i = 0; i < 2; ++i) { + testTooLargeIndexVariable(); +} + +function testTooLargeOrValidIndex() { + let indices = [1000, 0]; + let strings = makeStrings(); + + // Number of string kinds created in makeStrings. + const N = 4; + + let cpoints = codePoints(); + assertEq(strings.length, cpoints.length * N); + + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let index = indices[i & 1]; + let ch = str.charCodeAt(index); + + let cp = cpoints[Math.trunc((i % strings.length) / N)]; + assertEq(ch, (0 <= index && index < cp.length ? cp[index] : NaN)); + } +} +for (let i = 0; i < 2; ++i) { + testTooLargeOrValidIndex(); +} diff --git a/js/src/jit-test/tests/cacheir/string-charCodeAt-rope.js b/js/src/jit-test/tests/cacheir/string-charCodeAt-rope.js new file mode 100644 index 0000000000..645c023230 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-charCodeAt-rope.js @@ -0,0 +1,80 @@ +function makeRope() { + var left = newRope("@ABCDEFGHIJKLMNO", "PQRSTUVWXYZ[\\]^_"); + var right = newRope("`abcdefghijklmno", "pqrstuvwxyz{|}~"); + var rope = newRope(left, right); + return {left, right, rope}; +} + +// Load a character from the left rope child using a constant index. The input +// to String.prototype.charCodeAt is always rope. +function testLeftChildConstant() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + var ch = rope.charCodeAt(0); + assertEq(ch, 0x40); + } +} +for (var i = 0; i < 2; ++i) { + testLeftChildConstant(); +} + +// Load a character from the right rope child using a constant index. The input +// to String.prototype.charCodeAt is always rope. +function testRightChildConstant() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + var ch = rope.charCodeAt(32); + assertEq(ch, 0x60); + } +} +for (var i = 0; i < 2; ++i) { + testRightChildConstant(); +} + +// Load a character from the left rope child using a variable index. The input +// to String.prototype.charCodeAt is always rope. +function testLeftChildVariable() { + for (var i = 0; i < 200; ++i) { + var {left, rope} = makeRope(); + + var idx = i % left.length; + var ch = rope.charCodeAt(idx); + assertEq(ch, 0x40 + idx); + } +} +for (var i = 0; i < 2; ++i) { + testLeftChildVariable(); +} + +// Load a character from the right rope child using a variable index. The input +// to String.prototype.charCodeAt is always rope. +function testRightChildVariable() { + for (var i = 0; i < 200; ++i) { + var {left, right, rope} = makeRope(); + + var idx = i % right.length; + var ch = rope.charCodeAt(left.length + idx); + assertEq(ch, 0x60 + idx); + } +} +for (var i = 0; i < 2; ++i) { + testRightChildVariable(); +} + +// Load all characters from both child ropes. This covers the case when the +// call to String.prototype.charCodeAt linearizes the rope. +function testBothChildren() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + for (var j = 0; j < rope.length; ++j) { + var ch = rope.charCodeAt(j); + assertEq(ch, 0x40 + j); + } + } +} +for (var i = 0; i < 2; ++i) { + testBothChildren(); +} diff --git a/js/src/jit-test/tests/cacheir/string-codePointAt-oob.js b/js/src/jit-test/tests/cacheir/string-codePointAt-oob.js new file mode 100644 index 0000000000..f456361b5e --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-codePointAt-oob.js @@ -0,0 +1,151 @@ +// Test String.prototype.codePointAt with out-of-bounds indices. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const empty = []; + +const ascii = [...characters( + [0x41, 0x5A], // A..Z + [0x61, 0x7A], // a..z +)]; + +const latin1 = [...characters( + [0xC0, 0xFF], // À..ÿ +)]; + +const twoByte = [...characters( + [0x100, 0x17E], // Ā..ž +)]; + +function atomize(s) { + return Object.keys({[s]: 0})[0]; +} + +function codePoints() { + return [empty, ascii, latin1, twoByte]; +} + +function toRope(s) { + // Ropes have at least two characters. + if (s.length < 2) { + return s; + } + if (s.length === 2) { + return newRope(s[0], s[1]); + } + return newRope(s[0], s.substring(1)); +} + +function makeStrings() { + let strings = codePoints() + .map(codePoints => String.fromCodePoint(...codePoints)) + .flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + atomize(x), + ]); + return strings; +} + +function testNegativeIndexConstant() { + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.codePointAt(-1); + assertEq(ch, undefined); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeIndexConstant(); +} + +function testNegativeIndexVariable() { + let indices = [-1, -2]; + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.codePointAt(indices[i & 1]); + assertEq(ch, undefined); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeIndexVariable(); +} + +function testNegativeOrValidIndex() { + let indices = [-1, 0]; + let strings = makeStrings(); + + // Number of string kinds created in makeStrings. + const N = 4; + + let cpoints = codePoints(); + assertEq(strings.length, cpoints.length * N); + + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let index = indices[i & 1]; + let ch = str.codePointAt(index); + + let cp = cpoints[Math.trunc((i % strings.length) / N)]; + assertEq(ch, (0 <= index && index < cp.length ? cp[index] : undefined)); + } +} +for (let i = 0; i < 2; ++i) { + testNegativeOrValidIndex(); +} + +function testTooLargeIndexConstant() { + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.codePointAt(1000); + assertEq(ch, undefined); + } +} +for (let i = 0; i < 2; ++i) { + testTooLargeIndexConstant(); +} + +function testTooLargeIndexVariable() { + let indices = [1000, 2000]; + let strings = makeStrings(); + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let ch = str.codePointAt(indices[i & 1]); + assertEq(ch, undefined); + } +} +for (let i = 0; i < 2; ++i) { + testTooLargeIndexVariable(); +} + +function testTooLargeOrValidIndex() { + let indices = [1000, 0]; + let strings = makeStrings(); + + // Number of string kinds created in makeStrings. + const N = 4; + + let cpoints = codePoints(); + assertEq(strings.length, cpoints.length * N); + + for (let i = 0; i < 200; ++i) { + let str = strings[i % strings.length]; + let index = indices[i & 1]; + let ch = str.codePointAt(index); + + let cp = cpoints[Math.trunc((i % strings.length) / N)]; + assertEq(ch, (0 <= index && index < cp.length ? cp[index] : undefined)); + } +} +for (let i = 0; i < 2; ++i) { + testTooLargeOrValidIndex(); +} diff --git a/js/src/jit-test/tests/cacheir/string-codePointAt-rope-twobyte.js b/js/src/jit-test/tests/cacheir/string-codePointAt-rope-twobyte.js new file mode 100644 index 0000000000..adbc9995c1 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-codePointAt-rope-twobyte.js @@ -0,0 +1,88 @@ +function makeString(from) { + var codePoints = []; + for (var i = 0; i < 16; ++i) { + codePoints.push(from + i); + } + return String.fromCodePoint(...codePoints); +} + +function makeRope() { + var left = newRope(makeString(0x140), makeString(0x140 + 16)); + var right = newRope(makeString(0x160), makeString(0x160 + 16)); + var rope = newRope(left, right); + return {left, right, rope}; +} + +// Load a character from the left rope child using a constant index. The input +// to String.prototype.codePointAt is always rope. +function testLeftChildConstant() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + var ch = rope.codePointAt(0); + assertEq(ch, 0x140); + } +} +for (var i = 0; i < 2; ++i) { + testLeftChildConstant(); +} + +// Load a character from the right rope child using a constant index. The input +// to String.prototype.codePointAt is always rope. +function testRightChildConstant() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + var ch = rope.codePointAt(32); + assertEq(ch, 0x160); + } +} +for (var i = 0; i < 2; ++i) { + testRightChildConstant(); +} + +// Load a character from the left rope child using a variable index. The input +// to String.prototype.codePointAt is always rope. +function testLeftChildVariable() { + for (var i = 0; i < 200; ++i) { + var {left, rope} = makeRope(); + + var idx = i % left.length; + var ch = rope.codePointAt(idx); + assertEq(ch, 0x140 + idx); + } +} +for (var i = 0; i < 2; ++i) { + testLeftChildVariable(); +} + +// Load a character from the right rope child using a variable index. The input +// to String.prototype.codePointAt is always rope. +function testRightChildVariable() { + for (var i = 0; i < 200; ++i) { + var {left, right, rope} = makeRope(); + + var idx = i % right.length; + var ch = rope.codePointAt(left.length + idx); + assertEq(ch, 0x160 + idx); + } +} +for (var i = 0; i < 2; ++i) { + testRightChildVariable(); +} + +// Load all characters from both child ropes. This covers the case when the +// call to String.prototype.codePointAt linearizes the rope. +function testBothChildren() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + for (var j = 0; j < rope.length; ++j) { + var ch = rope.codePointAt(j); + assertEq(ch, 0x140 + j); + } + } +} +for (var i = 0; i < 2; ++i) { + testBothChildren(); +} diff --git a/js/src/jit-test/tests/cacheir/string-codePointAt-rope.js b/js/src/jit-test/tests/cacheir/string-codePointAt-rope.js new file mode 100644 index 0000000000..76e16c7ea3 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-codePointAt-rope.js @@ -0,0 +1,80 @@ +function makeRope() { + var left = newRope("@ABCDEFGHIJKLMNO", "PQRSTUVWXYZ[\\]^_"); + var right = newRope("`abcdefghijklmno", "pqrstuvwxyz{|}~"); + var rope = newRope(left, right); + return {left, right, rope}; +} + +// Load a character from the left rope child using a constant index. The input +// to String.prototype.codePointAt is always rope. +function testLeftChildConstant() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + var ch = rope.codePointAt(0); + assertEq(ch, 0x40); + } +} +for (var i = 0; i < 2; ++i) { + testLeftChildConstant(); +} + +// Load a character from the right rope child using a constant index. The input +// to String.prototype.codePointAt is always rope. +function testRightChildConstant() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + var ch = rope.codePointAt(32); + assertEq(ch, 0x60); + } +} +for (var i = 0; i < 2; ++i) { + testRightChildConstant(); +} + +// Load a character from the left rope child using a variable index. The input +// to String.prototype.codePointAt is always rope. +function testLeftChildVariable() { + for (var i = 0; i < 200; ++i) { + var {left, rope} = makeRope(); + + var idx = i % left.length; + var ch = rope.codePointAt(idx); + assertEq(ch, 0x40 + idx); + } +} +for (var i = 0; i < 2; ++i) { + testLeftChildVariable(); +} + +// Load a character from the right rope child using a variable index. The input +// to String.prototype.codePointAt is always rope. +function testRightChildVariable() { + for (var i = 0; i < 200; ++i) { + var {left, right, rope} = makeRope(); + + var idx = i % right.length; + var ch = rope.codePointAt(left.length + idx); + assertEq(ch, 0x60 + idx); + } +} +for (var i = 0; i < 2; ++i) { + testRightChildVariable(); +} + +// Load all characters from both child ropes. This covers the case when the +// call to String.prototype.codePointAt linearizes the rope. +function testBothChildren() { + for (var i = 0; i < 200; ++i) { + var {rope} = makeRope(); + + for (var j = 0; j < rope.length; ++j) { + var ch = rope.codePointAt(j); + assertEq(ch, 0x40 + j); + } + } +} +for (var i = 0; i < 2; ++i) { + testBothChildren(); +} diff --git a/js/src/jit-test/tests/cacheir/string-codePointAt-surrogate.js b/js/src/jit-test/tests/cacheir/string-codePointAt-surrogate.js new file mode 100644 index 0000000000..961953a598 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-codePointAt-surrogate.js @@ -0,0 +1,103 @@ +function testLinear() { + var s = "\u{10000}\u{10001}\u{10002}\u{10003}\u{10004}\u{10005}\u{10006}\u{10007}"; + + for (var i = 0; i < 200; ++i) { + // Iterate over all possible string indices, which includes reading + // unpaired lead surrogates. + var index = i % s.length; + + var c = s.codePointAt(index); + var e = ((index & 1) ? 0xdc00 : 0x10000) + (index >> 1); + assertEq(c, e); + } +} +for (var i = 0; i < 2; ++i) { + testLinear(); +} + +function testLinearOnlyValidCodePoints() { + var s = "\u{10000}\u{10001}\u{10002}\u{10003}\u{10004}\u{10005}\u{10006}\u{10007}"; + + for (var i = 0; i < 200; ++i) { + // Iterator over all valid code point indices. (Code points are at all even + // string indices.) + var index = (i % s.length) & ~1; + + var c = s.codePointAt(index); + var e = ((index & 1) ? 0xdc00 : 0x10000) + (index >> 1); + assertEq(c, e); + } +} +for (var i = 0; i < 2; ++i) { + testLinearOnlyValidCodePoints(); +} + +function testRope() { + var left = "\u{10000}\u{10001}\u{10002}\u{10003}\u{10004}\u{10005}\u{10006}\u{10007}"; + var right = "\u{10008}\u{10009}\u{1000A}\u{1000B}\u{1000C}\u{1000D}\u{1000E}\u{1000F}"; + + for (var i = 0; i < 200; ++i) { + var s = newRope(left, right); + + // Iterate over all possible string indices, which includes reading + // unpaired lead surrogates. + var index = i % s.length; + + var c = s.codePointAt(index); + var e = ((index & 1) ? 0xdc00 : 0x10000) + (index >> 1); + assertEq(c, e); + } +} +for (var i = 0; i < 2; ++i) { + testRope(); +} + +function testRopeOnlyValidCodePoints() { + var left = "\u{10000}\u{10001}\u{10002}\u{10003}\u{10004}\u{10005}\u{10006}\u{10007}"; + var right = "\u{10008}\u{10009}\u{1000A}\u{1000B}\u{1000C}\u{1000D}\u{1000E}\u{1000F}"; + + for (var i = 0; i < 200; ++i) { + var s = newRope(left, right); + + // Iterator over all valid code point indices. (Code points are at all even + // string indices.) + var index = (i % s.length) & ~1; + + var c = s.codePointAt(index); + var e = ((index & 1) ? 0xdc00 : 0x10000) + (index >> 1); + assertEq(c, e); + } +} +for (var i = 0; i < 2; ++i) { + testRopeOnlyValidCodePoints(); +} + +function testUnpairedLead() { + var s = "\u{d800}\u{d801}\u{d802}\u{d803}\u{d804}\u{d805}\u{d806}\u{d807}"; + + for (var i = 0; i < 200; ++i) { + var index = i % s.length; + + var c = s.codePointAt(index); + var e = 0xd800 + index; + assertEq(c, e); + } +} +for (var i = 0; i < 2; ++i) { + testUnpairedLead(); +} + +function testUnpairedTail() { + var s = "\u{dc00}\u{dc01}\u{dc02}\u{dc03}\u{dc04}\u{dc05}\u{dc06}\u{dc07}"; + + for (var i = 0; i < 200; ++i) { + var index = i % s.length; + + var c = s.codePointAt(index); + var e = 0xdc00 + index; + assertEq(c, e); + } +} +for (var i = 0; i < 2; ++i) { + testUnpairedTail(); +} diff --git a/js/src/jit-test/tests/cacheir/string-concat-null-undef.js b/js/src/jit-test/tests/cacheir/string-concat-null-undef.js new file mode 100644 index 0000000000..6ef75dc181 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-concat-null-undef.js @@ -0,0 +1,31 @@ +function test() { + var nullUndefLhs = [ + [null, "foo", "nullfoo"], + [null, "bar", "nullbar"], + [null, "123", "null123"], + [null, "", "null"], + [undefined, "abc", "undefinedabc"], + [undefined, "1", "undefined1"], + [undefined, "", "undefined"], + ["abc", "def", "abcdef"], + ]; + for (var [lhs, rhs, expected] of nullUndefLhs) { + assertEq(lhs + rhs, expected); + } + var nullUndefRhs = [ + ["foo", undefined, "fooundefined"], + ["bar", undefined, "barundefined"], + ["123", undefined, "123undefined"], + ["", undefined, "undefined"], + ["abc", null, "abcnull"], + ["1", null, "1null"], + ["", null, "null"], + ["abc", "def", "abcdef"], + ]; + for (var [lhs, rhs, expected] of nullUndefRhs) { + assertEq(lhs + rhs, expected); + } +} +test(); +test(); +test(); diff --git a/js/src/jit-test/tests/cacheir/string-fromCharCode-double.js b/js/src/jit-test/tests/cacheir/string-fromCharCode-double.js new file mode 100644 index 0000000000..4db1787148 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-fromCharCode-double.js @@ -0,0 +1,17 @@ +// Test inlining String.fromCharCode with Double instead of Int32 inputs. + +function test() { + for (let i = 0; i < 0xffff; ++i) { + let expected = String.fromCharCode(i); + + // Ensure the Double input is truncated to Int32. + assertEq(String.fromCharCode(i + 0.5), expected); + + // The input is converted using ToUint16. + assertEq(String.fromCharCode(i + 0.5 + 0x10_000), expected); + + // Test ToUint16 conversion when adding INT32_MAX + 1. + assertEq(String.fromCharCode(i + 0x8000_0000), expected); + } +} +for (let i = 0; i < 2; ++i) test(); diff --git a/js/src/jit-test/tests/cacheir/string-fromcodepoint.js b/js/src/jit-test/tests/cacheir/string-fromcodepoint.js new file mode 100644 index 0000000000..254f41fd85 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-fromcodepoint.js @@ -0,0 +1,15 @@ +function f() { + for (var i = 0x10F000; i <= 0x10FFFF + 1; ++i) { + String.fromCodePoint(i); + } +} + +for (var i = 0; i < 2; ++i) { + var err; + try { + f(); + } catch (e) { + err = e; + } + assertEq(err instanceof RangeError, true); +} diff --git a/js/src/jit-test/tests/cacheir/string-int32-arith.js b/js/src/jit-test/tests/cacheir/string-int32-arith.js new file mode 100644 index 0000000000..8f39d3e124 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-int32-arith.js @@ -0,0 +1,56 @@ +function test(zero, one) { + assertEq(10 - zero, 10); + assertEq(10 - one, 9); + assertEq(zero - 0, 0); + assertEq(one - 1, 0); + + assertEq(10 * zero, 0); + assertEq(zero * 10, 0); + assertEq(10 * one, 10); + assertEq(one * 10, 10); + + assertEq(10 / one, 10); + assertEq(one / 1, 1); + assertEq(10 % one, 0); + assertEq(one % 1, 0); + + assertEq(10 ** one, 10); + assertEq(one ** 4, 1); + + assertEq(10 & zero, 0); + assertEq(zero & 10, 0); + assertEq(10 & one, 0); + assertEq(one & 10, 0); + + assertEq(10 | zero, 10); + assertEq(zero | 10, 10); + assertEq(10 | one, 11); + assertEq(one | 10, 11); + + assertEq(10 ^ zero, 10); + assertEq(zero ^ 10, 10); + assertEq(10 ^ one, 11); + assertEq(one ^ 10, 11); + + assertEq(10 << zero, 10); + assertEq(zero << 10, 0); + assertEq(10 << one, 20); + assertEq(one << 10, 1024); + + assertEq(10 >> zero, 10); + assertEq(zero >> 10, 0); + assertEq(10 >> one, 5); + assertEq(one >> 10, 0); + + assertEq(10 >>> zero, 10); + assertEq(zero >>> 10, 0); + assertEq(10 >>> one, 5); + assertEq(one >>> 10, 0); +} + +for (var i = 0; i < 10; i++) { + test(0, 1); + test('0', '1'); + test('0x0', '0x1'); + test('0.0', '1.0'); +} diff --git a/js/src/jit-test/tests/cacheir/string-lastIndexOf.js b/js/src/jit-test/tests/cacheir/string-lastIndexOf.js new file mode 100644 index 0000000000..f281d1eac1 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-lastIndexOf.js @@ -0,0 +1,102 @@ +function testEmpty() { + var strings = [ + "", + "a", + "ab", + ]; + + for (var i = 0; i < 200; ++i) { + var str = strings[i % strings.length]; + assertEq(str.lastIndexOf(""), str.length); + } +} +testEmpty(); + +function testSingle() { + var strings = [ + "", + + "a", + "b", + + "aa", + "ab", + "ba", + "bb", + ]; + + var searchStrings = [ + "a", + "b", + ]; + + for (var i = 0; i < 200; ++i) { + var str = strings[i % strings.length]; + var searchString = searchStrings[i % searchStrings.length]; + + var j = str.length; + while (--j >= 0 && str[j] !== searchString); + + assertEq(str.lastIndexOf(searchString), j); + } +} +testSingle(); + +function testDouble() { + var strings = [ + "", + + "a", + "b", + + "aa", + "ab", + "ba", + "bb", + + "aaa", + "aab", + "aba", + "abb", + "baa", + "bab", + "bba", + "bbb", + + "aaaa", + "aaab", + "aaba", + "aabb", + "abaa", + "abab", + "abba", + "abbb", + + "baaa", + "baab", + "baba", + "babb", + "bbaa", + "bbab", + "bbba", + "bbbb", + ]; + + var searchStrings = [ + "aa", + "ab", + "ba", + "bb", + ]; + + for (var i = 0; i < 200; ++i) { + var str = strings[i % strings.length]; + var searchString = searchStrings[i % searchStrings.length]; + + var j = str.length; + while (--j >= 0 && (str[j] !== searchString[0] || str[j + 1] !== searchString[1])); + + assertEq(str.lastIndexOf(searchString), j); + } +} +testDouble(); diff --git a/js/src/jit-test/tests/cacheir/string-loadchar.js b/js/src/jit-test/tests/cacheir/string-loadchar.js new file mode 100644 index 0000000000..f89c1d8b33 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-loadchar.js @@ -0,0 +1,44 @@ +// Load Latin-1 and Two-Byte strings. +function latin1AndTwoByte() { + for (var i = 0; i <= 0x03FF; ++i) { + var s = String.fromCodePoint(i); + assertEq(s[0], s); + assertEq(s.charAt(0), s); + } +} + +for (var i = 0; i < 2; ++i) { + latin1AndTwoByte(); +} + +// Test bi-morphic loads. +function stringAndArray() { + var xs = [["\u0100"], "\u0100"]; + for (var i = 0; i < 200; ++i) { + var x = xs[i & 1]; + var s = x[0]; + assertEq(s.length, 1); + assertEq(s, "\u0100"); + } +} + +for (var i = 0; i < 2; ++i) { + stringAndArray(); +} + +function outOfBoundsFailureThenException() { + var name = "Object"; + + var j = 0; + while (true) { + // Access out-of-bounds character and then trigger an exception, + // when accessing a property on the undefined value. + name[j++].does_not_exist; + } +} + +for (var i = 0; i < 2; ++i) { + try { + outOfBoundsFailureThenException(); + } catch {} +} diff --git a/js/src/jit-test/tests/cacheir/string-number-arith.js b/js/src/jit-test/tests/cacheir/string-number-arith.js new file mode 100644 index 0000000000..ec1caf76ff --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-number-arith.js @@ -0,0 +1,32 @@ +function test(half, minusOneHalf) { + assertEq(10 - half, 9.5); + assertEq(10 - minusOneHalf, 11.5); + assertEq(half - 0, 0.5); + assertEq(minusOneHalf - 1, -2.5); + + assertEq(10 * half, 5); + assertEq(half * 10, 5); + assertEq(10 * minusOneHalf, -15); + assertEq(minusOneHalf * 10, -15); + + assertEq(10 / half, 20); + assertEq(half / 1, 0.5); + assertEq(12 / minusOneHalf, -8); + assertEq(minusOneHalf / 1, -1.5); + + assertEq(10 % half, 0); + assertEq(half % 1, 0.5); + assertEq(12 % minusOneHalf, 0); + assertEq(minusOneHalf % 1, -0.5); + + assertEq(10 ** half, Math.sqrt(10)); + assertEq(half ** 4, 0.0625); + assertEq(16 ** minusOneHalf, 0.015625); + assertEq(minusOneHalf ** 4, 5.0625); +} + +for (var i = 0; i < 10; i++) { + test(0.5, -1.5); + test("0.5", "-1.5"); + test("5e-1", "-15e-1"); +} diff --git a/js/src/jit-test/tests/cacheir/string-toString-valueOf.js b/js/src/jit-test/tests/cacheir/string-toString-valueOf.js new file mode 100644 index 0000000000..af50c50256 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/string-toString-valueOf.js @@ -0,0 +1,23 @@ +function simple(str) { + assertEq(str.toString(), "abc"); + assertEq(str.valueOf(), "abc"); +} + +function obj(str) { + var obj = new String(str); + assertEq(obj.toString(), "xyz"); + assertEq(obj.valueOf(), "xyz"); +} + +function mixed() { + for (var v of ["abc", new String("abc")]) { + assertEq(v.toString(), "abc"); + assertEq(v.valueOf(), "abc"); + } +} + +for (var i = 0; i < 100; i++) { + simple("abc"); + obj("xyz"); + mixed(); +} \ No newline at end of file diff --git a/js/src/jit-test/tests/cacheir/stub-fold-closeiter.js b/js/src/jit-test/tests/cacheir/stub-fold-closeiter.js new file mode 100644 index 0000000000..8e91d3737c --- /dev/null +++ b/js/src/jit-test/tests/cacheir/stub-fold-closeiter.js @@ -0,0 +1,25 @@ +class Iterator { + val = 0; + next() { + return { value: this.val++, done: false } + } + return() { return { value: undefined, done: true }} +} + +var arr = []; +for (var i = 0; i < 10; i++) { + class SubIter extends Iterator {} + var iterable = { + [Symbol.iterator]() { return new SubIter(); } + } + arr.push(iterable); +} + +function foo() { + for (var x of arr[i % arr.length]) { + if (x > 1) { return; } + } +} + +with ({}) {} +for (var i = 0; i < 100; i++) { foo(); } diff --git a/js/src/jit-test/tests/cacheir/symbol-loose-equal-incompatible.js b/js/src/jit-test/tests/cacheir/symbol-loose-equal-incompatible.js new file mode 100644 index 0000000000..b1232c2e2c --- /dev/null +++ b/js/src/jit-test/tests/cacheir/symbol-loose-equal-incompatible.js @@ -0,0 +1,35 @@ +// Test loose equality comparison between Symbols and String/Boolean/Int32/Double/BigInt. + +var xs = [ + Symbol(), Symbol(), Symbol(), Symbol(), + Symbol(), Symbol(), Symbol(), Symbol(), +]; + +var ys = [ + "", "test", true, false, + 123, 123.5, NaN, 456n, +]; + +function testLooseEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + + assertEq(x == y, false); + assertEq(y == x, false); + } +} +testLooseEqual(); + +function testLooseNotEqual() { + for (var i = 0; i < 100; ++i) { + var j = i % xs.length; + var x = xs[j]; + var y = ys[j]; + + assertEq(x != y, true); + assertEq(y != x, true); + } +} +testLooseNotEqual(); diff --git a/js/src/jit-test/tests/cacheir/tobool.js b/js/src/jit-test/tests/cacheir/tobool.js new file mode 100644 index 0000000000..8487703e1f --- /dev/null +++ b/js/src/jit-test/tests/cacheir/tobool.js @@ -0,0 +1,95 @@ +var success = 0; +var expected_bool = 0; +var expected_int = 0; +var expected_double = 0; +var expected_string = 0; +var expected_object = 0; +var expected_symbol = 0; + +function test_type_stable_ic() { + // Initialize as falsy where possible. + var a = undefined; // No Change, never succeeds + var b = null; // No Change, never succeeds + var c = false; // Alternate between true and false. + var d = 0; // Int32 cache checker, change int values + var e = ""; // String cache checker, change string values + var f = Symbol(); // No change, always succeed, no cache. + var g = {}; // Change objects, always succeed. + var h = -0; // Double cache checker, change double values. + + for (var i =0; i < 30; i++) { + // Switch between values to ensure the caches fire. + switch (i % 3) { + case 0: + d = 0; + e = "hi"; expected_string++; + c = true; expected_bool++; + h = 0; + break; + case 1: + d = 1; expected_int++; + e = ""; + c = false; + h = NaN; + break; + case 2: + d = 2; expected_int++; + h = 1.234; expected_double++; + g = {}; + break; + } + + if (a) { success++; } + if (b) { success++; } + if (c) { success++; } + if (d) { success++; } + if (e) { success++; } + if (f) { success++; } expected_symbol++; // Symbol succeed + if (g) { success++; } expected_object++; // Object success + if (h) { success++; } + } +} + +test_type_stable_ic(); + +assertEq(success, expected_bool + expected_double + expected_int + expected_object + expected_string + expected_symbol); + + +// Test cache failures. +function helper(fun, arg, n) +{ + var r = 0; + for (var i = 0; i < n; i++) { + r = fun(arg); + } + return r ? 1 : 0; +} + +function test_transition(fun, load, test, before, after) { + var a = helper(fun, load, 30); + var x = helper(fun, test, 5) + assertEq(a, before); + assertEq(x, after) +} + +var fun1 = (x) => { if (x) return true; else return false; }; +var fun2 = (x) => { if (x) return true; else return false; }; +var fun3 = (x) => { if (x) return true; else return false; }; +var fun4 = (x) => { if (x) return true; else return false; }; +var fun5 = (x) => { if (x) return true; else return false; }; +var fun6 = (x) => { if (x) return true; else return false; }; +var fun7 = (x) => { if (x) return true; else return false; }; +var fun8 = (x) => { if (x) return true; else return false; }; + +// NaN -> Int32 +test_transition(fun1, NaN, 1, 0, 1); +test_transition(fun2, 1, NaN, 1, 0); +// NaN -> Object / Object -> NaN +test_transition(fun3, NaN, {}, 0, 1); +test_transition(fun4, {}, NaN, 1, 0); +// Object -> null / null -> Object +test_transition(fun5, {}, null, 1, 0); +test_transition(fun6, null, {}, 0, 1); +// Symbol -> null, null -> Symbol +test_transition(fun7, Symbol('hi'), null, 1, 0); +test_transition(fun8, null, Symbol('lo'), 0, 1); \ No newline at end of file diff --git a/js/src/jit-test/tests/cacheir/topropertykey.js b/js/src/jit-test/tests/cacheir/topropertykey.js new file mode 100644 index 0000000000..69f9e1be9d --- /dev/null +++ b/js/src/jit-test/tests/cacheir/topropertykey.js @@ -0,0 +1,36 @@ +setJitCompilerOption("ion.forceinlineCaches", 1); + +function testInt32() { + var xs = [0, 0]; + var a = [0]; + + for (var i = 0; i < 20; ++i) { + var key = xs[i & 1]; + assertEq(a[key]++, i); + } +} +for (var i = 0; i < 2; ++i) testInt32(); + +function testStringInt32() { + var xs = ["0", "0"]; + var a = [0]; + + for (var i = 0; i < 20; ++i) { + var key = xs[i & 1]; + assertEq(a[key]++, i); + } +} +for (var i = 0; i < 2; ++i) testStringInt32(); + +function testString() { + var xs = ["p", "p"]; + var a = { + p: 0, + }; + + for (var i = 0; i < 20; ++i) { + var key = xs[i & 1]; + assertEq(a[key]++, i); + } +} +for (var i = 0; i < 2; ++i) testString(); diff --git a/js/src/jit-test/tests/cacheir/typed-array-intrinsics.js b/js/src/jit-test/tests/cacheir/typed-array-intrinsics.js new file mode 100644 index 0000000000..788122bc79 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/typed-array-intrinsics.js @@ -0,0 +1,93 @@ +var ab = new ArrayBuffer(128); +var uint8c = new Uint8ClampedArray(ab, 3); +var int16 = new Int16Array(ab, 2); +var int32 = new Int32Array(ab, 4); +var float32 = new Float32Array(ab, 0); +var float64 = new Float64Array(ab, 64); +var bigInt64 = new BigInt64Array(ab, 32); + +var uint8cProxy = new Proxy(uint8c, {}); +var g = newGlobal({newCompartment: true}); +var uint8cWrapped = g.evaluate("new Uint8ClampedArray(10)"); + +var TypedArrayElementSize = getSelfHostedValue("TypedArrayElementSize"); +var TypedArrayByteOffset = getSelfHostedValue("TypedArrayByteOffset"); +var IsTypedArray = getSelfHostedValue("IsTypedArray"); +var IsPossiblyWrappedTypedArray = getSelfHostedValue("IsPossiblyWrappedTypedArray"); +var TypedArrayLength = getSelfHostedValue("TypedArrayLength"); + +function testElementSize() { + function getSize(ta) { + return TypedArrayElementSize(ta); + } + assertEq(getSize(uint8c), 1); + assertEq(getSize(int16), 2); + assertEq(getSize(int32), 4); + assertEq(getSize(float32), 4); + assertEq(getSize(float64), 8); + assertEq(getSize(bigInt64), 8); +} + +function testByteOffset() { + function getOffset(ta) { + return TypedArrayByteOffset(ta); + } + assertEq(getOffset(uint8c), 3); + assertEq(getOffset(int16), 2); + assertEq(getOffset(int32), 4); + assertEq(getOffset(float32), 0); + assertEq(getOffset(float64), 64); + assertEq(getOffset(bigInt64), 32); +} + +function testIsTypedArray() { + function isTA(obj) { + return IsTypedArray(obj); + } + assertEq(isTA(uint8c), true); + assertEq(isTA(int16), true); + assertEq(isTA(int32), true); + assertEq(isTA(float32), true); + assertEq(isTA(float64), true); + assertEq(isTA(bigInt64), true); + assertEq(isTA(Math), false); + assertEq(isTA(ab), false); + assertEq(isTA(uint8cProxy), false); + assertEq(isTA(uint8cWrapped), false); +} + +function testIsPossiblyWrappedTypedArray() { + function isTA(obj) { + return IsPossiblyWrappedTypedArray(obj); + } + assertEq(isTA(uint8c), true); + assertEq(isTA(int16), true); + assertEq(isTA(int32), true); + assertEq(isTA(float32), true); + assertEq(isTA(float64), true); + assertEq(isTA(bigInt64), true); + assertEq(isTA(Math), false); + assertEq(isTA(ab), false); + assertEq(isTA(uint8cProxy), false); + assertEq(isTA(uint8cWrapped), true); +} + +function testTypedArrayLength() { + function getLength(obj) { + return TypedArrayLength(obj); + } + assertEq(getLength(uint8c), 125); + assertEq(getLength(int16), 63); + assertEq(getLength(int32), 31); + assertEq(getLength(float32), 32); + assertEq(getLength(float64), 8); + assertEq(getLength(bigInt64), 12); +} + +for (var i = 0; i < 40; i++) { + testElementSize(); + testByteOffset(); + testIsTypedArray(); + testIsPossiblyWrappedTypedArray(); + testTypedArrayLength(); +} diff --git a/js/src/jit-test/tests/cacheir/typedarray-constructor-objects.js b/js/src/jit-test/tests/cacheir/typedarray-constructor-objects.js new file mode 100644 index 0000000000..5733bc4c29 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/typedarray-constructor-objects.js @@ -0,0 +1,60 @@ +function testArrayBufferThenOther() { + var buf = new ArrayBuffer(4); + var other = [1, 2]; + for (var i = 0; i < 150; i++) { + var arg = i < 100 ? buf : other; + var ta = new Int32Array(arg); + assertEq(ta.length, arg === buf ? 1 : 2); + } +} +testArrayBufferThenOther(); + +function testSharedArrayBufferThenOther() { + if (!this.SharedArrayBuffer) { + return; + } + var buf = new SharedArrayBuffer(4); + var other = [1, 2]; + for (var i = 0; i < 150; i++) { + var arg = i < 100 ? buf : other; + var ta = new Int32Array(arg); + assertEq(ta.length, arg === buf ? 1 : 2); + } +} +testSharedArrayBufferThenOther(); + +function testArrayThenArrayBuffer() { + var arr = [1, 2, 3]; + var buf = new ArrayBuffer(5); + for (var i = 0; i < 150; i++) { + var arg = i < 100 ? arr : buf; + var ta = new Int8Array(arg); + assertEq(ta.length, arg === arr ? 3 : 5); + } +} +testArrayThenArrayBuffer(); + +function testArrayThenSharedArrayBuffer() { + if (!this.SharedArrayBuffer) { + return; + } + var arr = [1, 2, 3]; + var buf = new SharedArrayBuffer(5); + for (var i = 0; i < 150; i++) { + var arg = i < 100 ? arr : buf; + var ta = new Int8Array(arg); + assertEq(ta.length, arg === arr ? 3 : 5); + } +} +testArrayThenSharedArrayBuffer(); + +function testArrayThenWrapper() { + var arr = [1, 2, 3]; + var wrapper = newGlobal({newCompartment: true}).evaluate("[1, 2]"); + for (var i = 0; i < 150; i++) { + var arg = i < 100 ? arr : wrapper; + var ta = new Int8Array(arg); + assertEq(ta.length, arg === arr ? 3 : 2); + } +} +testArrayThenWrapper(); diff --git a/js/src/jit-test/tests/cacheir/typedarray-megamorphic-get.js b/js/src/jit-test/tests/cacheir/typedarray-megamorphic-get.js new file mode 100644 index 0000000000..e6404ae6e7 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/typedarray-megamorphic-get.js @@ -0,0 +1,53 @@ +function get(k) { + var p = {}; + p[k] = 1; + + // TypedArrays intercept any TypedArray indices (canonical numeric indices in the spec), + // so when reading |k| from |ta| we shouldn't return the inherited property |p[k]|. + var ta = new Int32Array(10); + Object.setPrototypeOf(ta, p); + + // Assume sixteen different objects trigger a transition to a megamorphic IC. + var xs = [ + ta, + + {a:0}, {b:0}, {c:0}, {d:0}, {e:0}, {f:0}, {g:0}, {h:0}, + {j:0}, {k:0}, {l:0}, {m:0}, {n:0}, {o:0}, {p:0}, + ]; + + for (var i = 0; i < 100; ++i) { + var x = xs[i & 15]; + assertEq(x[k], undefined); + } +} + +// Make sure we use a distinct function for each test. +function test(fn) { + return Function(`return ${fn};`)(); +} + +// TypedArray index representable as an Int32. +test(get)(100); +test(get)("100"); + +// TypedArray index not representable as an Int32. +test(get)(4294967296); +test(get)("4294967296"); + +// Non-finite TypedArray indices. +test(get)(Infinity); +test(get)("Infinity"); + +test(get)(-Infinity); +test(get)("-Infinity"); + +test(get)(NaN); +test(get)("NaN"); + +// TypedArray index with fractional parts. +test(get)(1.1); +test(get)("1.1"); + +// TypedArray index with exponent parts. +test(get)(1e+25); +test(get)("1e+25"); diff --git a/js/src/jit-test/tests/cacheir/typedarray-megamorphic-has.js b/js/src/jit-test/tests/cacheir/typedarray-megamorphic-has.js new file mode 100644 index 0000000000..e2348caca9 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/typedarray-megamorphic-has.js @@ -0,0 +1,53 @@ +function has(k) { + var p = {}; + p[k] = 1; + + // TypedArrays intercept any TypedArray indices (canonical numeric indices in the spec), + // so when reading |k| from |ta| we shouldn't return the inherited property |p[k]|. + var ta = new Int32Array(10); + Object.setPrototypeOf(ta, p); + + // Assume sixteen different objects trigger a transition to a megamorphic IC. + var xs = [ + ta, + + {a:0}, {b:0}, {c:0}, {d:0}, {e:0}, {f:0}, {g:0}, {h:0}, + {j:0}, {k:0}, {l:0}, {m:0}, {n:0}, {o:0}, {p:0}, + ]; + + for (var i = 0; i < 100; ++i) { + var x = xs[i & 15]; + assertEq(k in x, false); + } +} + +// Make sure we use a distinct function for each test. +function test(fn) { + return Function(`return ${fn};`)(); +} + +// TypedArray index representable as an Int32. +test(has)(100); +test(has)("100"); + +// TypedArray index not representable as an Int32. +test(has)(4294967296); +test(has)("4294967296"); + +// Non-finite TypedArray indices. +test(has)(Infinity); +test(has)("Infinity"); + +test(has)(-Infinity); +test(has)("-Infinity"); + +test(has)(NaN); +test(has)("NaN"); + +// TypedArray index with fractional parts. +test(has)(1.1); +test(has)("1.1"); + +// TypedArray index with exponent parts. +test(has)(1e+25); +test(has)("1e+25"); diff --git a/js/src/jit-test/tests/cacheir/typedarray-non-int32-index-get.js b/js/src/jit-test/tests/cacheir/typedarray-non-int32-index-get.js new file mode 100644 index 0000000000..5499c26152 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/typedarray-non-int32-index-get.js @@ -0,0 +1,37 @@ +function get(k) { + // Different typed array types to ensure we emit a GetProp IC. + var xs = [ + new Int32Array(10), + new Int16Array(10), + ]; + + // Doesn't read values from the prototype chain. + Object.prototype[k] = 1; + + for (var i = 0; i < 100; ++i) { + var x = xs[i & 1]; + assertEq(x[k], undefined); + } +} + +// Make sure we use a distinct function for each test. +function test(fn) { + return Function(`return ${fn};`)(); +} + +// Negative numbers values aren't int32 indices. +test(get)(-1); +test(get)(-2147483648); +test(get)(-2147483649); + +// Int32 indices must be less-or-equal to max-int32. +test(get)(2147483648); + +// Int32 indices must not have fractional parts. +test(get)(1.5); +test(get)(-1.5); + +// Non-finite numbers aren't int32 indices. +test(get)(NaN); +test(get)(-Infinity); +test(get)(Infinity); diff --git a/js/src/jit-test/tests/cacheir/typedarray-non-int32-index-has.js b/js/src/jit-test/tests/cacheir/typedarray-non-int32-index-has.js new file mode 100644 index 0000000000..47eda321ad --- /dev/null +++ b/js/src/jit-test/tests/cacheir/typedarray-non-int32-index-has.js @@ -0,0 +1,37 @@ +function has(k) { + // Different typed array types to ensure we emit a HasProp IC. + var xs = [ + new Int32Array(10), + new Int16Array(10), + ]; + + // Doesn't read values from the prototype chain. + Object.prototype[k] = 1; + + for (var i = 0; i < 100; ++i) { + var x = xs[i & 1]; + assertEq(k in x, false); + } +} + +// Make sure we use a distinct function for each test. +function test(fn) { + return Function(`return ${fn};`)(); +} + +// Negative numbers values aren't int32 indices. +test(has)(-1); +test(has)(-2147483648); +test(has)(-2147483649); + +// Int32 indices must be less-or-equal to max-int32. +test(has)(2147483648); + +// Int32 indices must not have fractional parts. +test(has)(1.5); +test(has)(-1.5); + +// Non-finite numbers aren't int32 indices. +test(has)(NaN); +test(has)(-Infinity); +test(has)(Infinity); diff --git a/js/src/jit-test/tests/cacheir/typedarray-non-int32-index-set.js b/js/src/jit-test/tests/cacheir/typedarray-non-int32-index-set.js new file mode 100644 index 0000000000..c3a6637516 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/typedarray-non-int32-index-set.js @@ -0,0 +1,37 @@ +function set(k) { + // Different typed array types to ensure we emit a SetProp IC. + var xs = [ + new Int32Array(10), + new Int16Array(10), + ]; + + for (var i = 0; i < 100; ++i) { + var x = xs[i & 1]; + x[k] = 0; + } + + assertEq(xs[0][k], undefined); + assertEq(xs[1][k], undefined); +} + +// Make sure we use a distinct function for each test. +function test(fn) { + return Function(`return ${fn};`)(); +} + +// Negative numbers values aren't int32 indices. +test(set)(-1); +test(set)(-2147483648); +test(set)(-2147483649); + +// Int32 indices must be less-or-equal to max-int32. +test(set)(2147483648); + +// Int32 indices must not have fractional parts. +test(set)(1.5); +test(set)(-1.5); + +// Non-finite numbers aren't int32 indices. +test(set)(NaN); +test(set)(-Infinity); +test(set)(Infinity); diff --git a/js/src/jit-test/tests/cacheir/typedarray-non-number-value-set.js b/js/src/jit-test/tests/cacheir/typedarray-non-number-value-set.js new file mode 100644 index 0000000000..f0ca0c6ac8 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/typedarray-non-number-value-set.js @@ -0,0 +1,126 @@ +const types = [ + "Int8", + "Int16", + "Int32", + "Uint8", + "Uint16", + "Uint32", + "Uint8Clamped", + "Float32", + "Float64", +]; + +function convert(type, value) { + let num = Number(value); + switch (type) { + case "Int8": + return ((num | 0) << 24) >> 24; + case "Int16": + return ((num | 0) << 16) >> 16; + case "Int32": + return (num | 0); + case "Uint8": + return (num >>> 0) & 0xff; + case "Uint16": + return (num >>> 0) & 0xffff; + case "Uint32": + return (num >>> 0); + case "Uint8Clamped": { + if (Number.isNaN(num)) { + return 0; + } + let clamped = Math.max(0, Math.min(num, 255)); + let f = Math.floor(clamped); + if (clamped < f + 0.5) { + return f; + } + if (clamped > f + 0.5) { + return f + 1; + } + return f + (f & 1); + } + case "Float32": + return Math.fround(num); + case "Float64": + return num; + } + throw new Error(); +} + + +function runTest(type, initial, values) { + let expected = values.map(v => convert(type, v)); + assertEq( + expected.some(e => Object.is(e, initial)), + false, + "initial must be different from the expected values" + ); + + // Create a fresh function to ensure ICs are specific to a single TypedArray kind. + let test = Function("initial, values, expected", ` + let ta = new ${type}Array(1); + for (let i = 0; i < 200; ++i) { + ta[0] = initial; + ta[0] = values[i % values.length]; + assertEq(ta[0], expected[i % expected.length]); + } + `); + test(initial, values, expected); +} + +const tests = [ + // |null| is coerced to zero. + { + initial: 1, + values: [null], + }, + + // |undefined| is coerced to zero or NaN. + { + initial: 1, + values: [undefined], + }, + + // |false| is coerced to zero and |true| is coerced to one. + { + initial: 2, + values: [false, true], + }, + + // Strings without a fractional part. + { + initial: 42, + values: [ + "0", "1", "10", "111", "128", "256", "0x7fffffff", "0xffffffff", + ], + }, + + // Strings without a fractional part, but a leading minus sign. + { + initial: 42, + values: [ + "-0", "-1", "-10", "-111", "-128", "-256", "-2147483647", "-4294967295", + ], + }, + + // Strings with a fractional number part. + { + initial: 42, + values: [ + "0.1", "1.2", "10.8", "111.9", + "-0.1", "-1.2", "-10.8", "-111.9", + ], + }, + + // Special values and strings not parseable as a number. + { + initial: 42, + values: ["Infinity", "-Infinity", "NaN", "foobar"], + }, +]; + +for (let type of types) { + for (let {initial, values} of tests) { + runTest(type, initial, values); + } +} diff --git a/js/src/jit-test/tests/cacheir/typeof-proxy.js b/js/src/jit-test/tests/cacheir/typeof-proxy.js new file mode 100644 index 0000000000..0f97da9e2d --- /dev/null +++ b/js/src/jit-test/tests/cacheir/typeof-proxy.js @@ -0,0 +1,19 @@ +function test() { + var funs = [function() {}, new Proxy(function() {}, {}), wrapWithProto(function() {}, null), new Proxy(createIsHTMLDDA(), {})]; + var objects = [{}, new Proxy({}, {}), wrapWithProto({}, null)]; + var undefs = [createIsHTMLDDA(), wrapWithProto(createIsHTMLDDA(), null)]; + + for (var fun of funs) { + assertEq(typeof fun, "function") + } + + for (var obj of objects) { + assertEq(typeof obj, "object"); + } + + for (var undef of undefs) { + assertEq(typeof undef, "undefined"); + } +} + +test(); diff --git a/js/src/jit-test/tests/cacheir/unaryarith-null-undef-bool.js b/js/src/jit-test/tests/cacheir/unaryarith-null-undef-bool.js new file mode 100644 index 0000000000..cb4894ea89 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/unaryarith-null-undef-bool.js @@ -0,0 +1,26 @@ +function test(input, resPos, resNeg, resToNumeric, resInc, resDec) { + assertEq(+input, resPos); + assertEq(-input, resNeg); + + var input1 = input; + assertEq(input1++, resToNumeric); + assertEq(input1, resInc); + + var input2 = input; + assertEq(++input2, resInc); + assertEq(input1, resInc); + + var input3 = input; + assertEq(input3--, resToNumeric); + assertEq(input3, resDec); + + var input4 = input; + assertEq(--input4, resDec); + assertEq(input4, resDec); +} +for (var i = 0; i < 50; i++) { + test(null, 0, -0, 0, 1, -1); + test(undefined, NaN, NaN, NaN, NaN, NaN); + test(true, 1, -1, 1, 2, 0); + test(false, 0, -0, 0, 1, -1); +} diff --git a/js/src/jit-test/tests/cacheir/unaryarith-string.js b/js/src/jit-test/tests/cacheir/unaryarith-string.js new file mode 100644 index 0000000000..853d8f7464 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/unaryarith-string.js @@ -0,0 +1,58 @@ +setJitCompilerOption('ion.forceinlineCaches', 1); + +function warmup(fun, input_array, output_array) { + assertEq(output_array.length, input_array.length); + for (var index = 0; index < input_array.length; index++) { + input = input_array[index]; + output = output_array[index]; + for (var i = 0; i < 30; i++) { + var y = fun(input); + assertEq(y, output) + } + } +} + +// Unary - operator with transition between string representations of int32 and double. +var fun_neg_int32_double = (x) => { return -x; } +var fun_neg_double_int32 = (x) => { return -x; } + +// Unary ~ operator using string representations of either int32 or double. +var fun_bitnot_int32 = (x) => { return ~x; } +var fun_bitnot_double = (x) => { return ~x; } + +// Unary ++ operator using string representations of either int32 or double. +var fun_inc_int32 = (x) => { return ++x; } +var fun_inc_double = (x) => { return ++x; } + +// Unary -- operator using string representations of either int32 or double. +var fun_dec_int32 = (x) => { return --x; } +var fun_dec_double = (x) => { return --x; } + +// Unary + operator using string representations of either int32 or double. +var fun_pos_int32 = (x) => { return +x; } +var fun_pos_double = (x) => { return +x; } + +// JSOp::ToNumeric using string representations of either int32 or double. +var fun_tonumeric_int32 = (x) => { return x++; } +var fun_tonumeric_double = (x) => { return x++; } + +warmup(fun_neg_int32_double, ["1", "2", "-3"], [-1, -2, 3]); +warmup(fun_neg_double_int32, ["0"], [-0]); + +warmup(fun_neg_double_int32, ["3", "4", "-5"], [-3, -4, 5]); +warmup(fun_neg_int32_double, ["1.2", "1.4"], [-1.2, -1.4]); + +warmup(fun_bitnot_int32, ["-1", "0"], [0, -1]); +warmup(fun_bitnot_double, ["-1.0", "0.0", "1.2", "3"], [0, -1, -2, -4]); + +warmup(fun_inc_int32, ["-1", "0"], [0, 1]); +warmup(fun_inc_double, ["-1.0", "0.0", "1.2", "3"], [0, 1, 2.2, 4]); + +warmup(fun_dec_int32, ["-1", "0"], [-2, -1]); +warmup(fun_dec_double, ["-1.0", "0.0", "1.5", "3"], [-2, -1, 0.5, 2]); + +warmup(fun_pos_int32, ["-1", "0"], [-1, 0]); +warmup(fun_pos_double, ["-1.0", "0.0", "1.2", "3"], [-1.0, 0.0, 1.2, 3]); + +warmup(fun_tonumeric_int32, ["-1", "0"], [-1, 0]); +warmup(fun_tonumeric_double, ["-1.0", "0.0", "1.2", "3"], [-1.0, 0.0, 1.2, 3]); diff --git a/js/src/jit-test/tests/cacheir/unaryarith.js b/js/src/jit-test/tests/cacheir/unaryarith.js new file mode 100644 index 0000000000..39dda5b0ee --- /dev/null +++ b/js/src/jit-test/tests/cacheir/unaryarith.js @@ -0,0 +1,62 @@ +setJitCompilerOption('ion.forceinlineCaches', 1); + +function warmup(fun, input_array, output_array) { + assertEq(output_array.length, input_array.length); + for (var index = 0; index < input_array.length; index++) { + input = input_array[index]; + output = output_array[index]; + for (var i = 0; i < 30; i++) { + var y = fun(input); + assertEq(y, output) + } + } +} + +// Unary - operator with transition between int32 and double. +var fun_neg_int32_double = (x) => { return -x; } +var fun_neg_double_int32 = (x) => { return -x; } + +// Unary ~ operator using either int32, double, null, or undefined. +var fun_bitnot_int32 = (x) => { return ~x; } +var fun_bitnot_double = (x) => { return ~x; } +var fun_bitnot_null = (x) => { return ~x; } +var fun_bitnot_undefined = (x) => { return ~x; } + +// Unary ++ operator using either int32 or double. +var fun_inc_int32 = (x) => { return ++x; } +var fun_inc_double = (x) => { return ++x; } + +// Unary -- operator using either int32 or double. +var fun_dec_int32 = (x) => { return --x; } +var fun_dec_double = (x) => { return --x; } + +// Unary + operator using either int32 or double. +var fun_pos_int32 = (x) => { return +x; } +var fun_pos_double = (x) => { return +x; } + +// JSOp::ToNumeric using either int32 or double. +var fun_tonumeric_int32 = (x) => { return x++; } +var fun_tonumeric_double = (x) => { return x++; } + +warmup(fun_neg_int32_double, [1, 2], [-1, -2]); +warmup(fun_neg_double_int32, [0], [-0]); + +warmup(fun_neg_double_int32, [3, 4], [-3, -4]); +warmup(fun_neg_int32_double, [1.2, 1.4], [-1.2, -1.4]); + +warmup(fun_bitnot_int32, [-1, 0], [0, -1]); +warmup(fun_bitnot_double, [-1.0, 0.0, 1.2, 3], [0, -1, -2, -4]); +warmup(fun_bitnot_null, [null], [-1]); +warmup(fun_bitnot_undefined, [void 0], [-1]); + +warmup(fun_inc_int32, [-1, 0], [0, 1]); +warmup(fun_inc_double, [-1.0, 0.0, 1.2, 3], [0, 1, 2.2, 4]); + +warmup(fun_dec_int32, [-1, 0], [-2, -1]); +warmup(fun_dec_double, [-1.0, 0.0, 1.5, 3], [-2, -1, 0.5, 2]); + +warmup(fun_pos_int32, [-1, 0], [-1, 0]); +warmup(fun_pos_double, [-1.0, 0.0, 1.2, 3], [-1.0, 0.0, 1.2, 3]); + +warmup(fun_tonumeric_int32, [-1, 0], [-1, 0]); +warmup(fun_tonumeric_double, [-1.0, 0.0, 1.2, 3], [-1.0, 0.0, 1.2, 3]); diff --git a/js/src/jit-test/tests/cacheir/unboxed-element-hole.js b/js/src/jit-test/tests/cacheir/unboxed-element-hole.js new file mode 100644 index 0000000000..c3afd13dab --- /dev/null +++ b/js/src/jit-test/tests/cacheir/unboxed-element-hole.js @@ -0,0 +1,41 @@ +function noElement() { + for (var i = 0; i < 1e4; i++) { + var obj = {length: 0}; + assertEq(obj[0], undefined); + } +} + +function noElementCheckPrototype() { + for (var i = 0; i < 1e4; i++) { + var obj = {length: 0}; + assertEq(obj[0], i <= 1e3 ? undefined : 1); + if (i == 1e3) { + Object.prototype[0] = 1; + } + } + delete Object.prototype[0]; +} + +function elementOnPrototype() { + Object.prototype[0] = 3; + for (var i = 0; i < 1e4; i++) { + var obj = {length: 0}; + assertEq(obj[0], 3); + } + delete Object.prototype[0]; +} + +function checkExpando() { + for (var i = 0; i < 1e4; i++) { + var obj = {length: 0}; + if (i >= 1e3) { + obj[0] = 2; + } + assertEq(obj[0], i < 1e3 ? undefined : 2); + } +} + +noElement(); +noElementCheckPrototype(); +elementOnPrototype(); +checkExpando(); diff --git a/js/src/jit-test/tests/cacheir/windowproxy.js b/js/src/jit-test/tests/cacheir/windowproxy.js new file mode 100644 index 0000000000..994af384e4 --- /dev/null +++ b/js/src/jit-test/tests/cacheir/windowproxy.js @@ -0,0 +1,32 @@ + +var g = newGlobal({ + sameZoneAs: this, + useWindowProxy: true, +}); + +g.evaluate(` + this.data = 7; + + // Getter / Setter + Object.defineProperty(this, "prop", { + get: function() { return this.data; }, + set: function(val) { this.data = val; }, + }); + + // Getter / Setter ICs + for (var i = 0; i < 20; ++i) { + this.data = i; + assertEq(prop, i); + prop = i; + assertEq(this.prop, i); + this.prop = i; + assertEq(this.data, i); + } +`); + + +// CCW of WindowProxy +for (var i = 0; i < 20; ++i) { + g.slot = i; + assertEq(g.slot, i); +} diff --git a/js/src/jit-test/tests/class/bug1169746.js b/js/src/jit-test/tests/class/bug1169746.js new file mode 100644 index 0000000000..1e63ca48f9 --- /dev/null +++ b/js/src/jit-test/tests/class/bug1169746.js @@ -0,0 +1,10 @@ +class C { } +class D extends C { } + +function f() +{ + for (var i = 0; i < 2000; ++i) + new D(); +} + +f(); diff --git a/js/src/jit-test/tests/class/bug1357506.js b/js/src/jit-test/tests/class/bug1357506.js new file mode 100644 index 0000000000..2e6f54ef38 --- /dev/null +++ b/js/src/jit-test/tests/class/bug1357506.js @@ -0,0 +1,16 @@ +// Test that constructors that abort due to asm.js do not assert due to the +// parser keeping track of the FunctionBox corresponding to the constructor. + +class a { + constructor() { + "use asm"; + } +} + +function f() { + class a { + constructor() { + "use asm"; + } + } +} diff --git a/js/src/jit-test/tests/class/bug1359622.js b/js/src/jit-test/tests/class/bug1359622.js new file mode 100644 index 0000000000..cbea4a4f7c --- /dev/null +++ b/js/src/jit-test/tests/class/bug1359622.js @@ -0,0 +1,4 @@ +var g = newGlobal({ discardSource: true }); +g.evaluate(` + unescape(class get { static staticMethod() {} }); +`); diff --git a/js/src/jit-test/tests/class/bug1473272-default-constructors.js b/js/src/jit-test/tests/class/bug1473272-default-constructors.js new file mode 100644 index 0000000000..e9bd5c1889 --- /dev/null +++ b/js/src/jit-test/tests/class/bug1473272-default-constructors.js @@ -0,0 +1,24 @@ +// Test the source location info in a derived-class default constructor. + +function W() { test(); } +class Z extends W {} // line 4 +class Y extends Z {} // line 5 + +class X extends Y {} // line 7 + +function test() { + for (let frame of new Error().stack.split('\n')) { + function lineNumber(frame) { + return +frame.match(/(\d+):\d+$/)[1]; + } + + if (frame.startsWith("Z@")) + assertEq(lineNumber(frame), 4); + if (frame.startsWith("Y@")) + assertEq(lineNumber(frame), 5); + if (frame.startsWith("X@")) + assertEq(lineNumber(frame), 7); + } +} + +new X; diff --git a/js/src/jit-test/tests/class/bug1488385.js b/js/src/jit-test/tests/class/bug1488385.js new file mode 100644 index 0000000000..46a15c0611 --- /dev/null +++ b/js/src/jit-test/tests/class/bug1488385.js @@ -0,0 +1,13 @@ +// Default class constructors should no longer be marked as self-hosted +// functions. They should be munged to appear in every respect as if they +// originated with the class definition. + +load(libdir + 'asserts.js'); + +function f() { + return f.caller.p; +} + +// Since default constructors are strict mode code, this should get: +// TypeError: access to strict mode caller function is censored +assertThrowsInstanceOf(() => new class extends f {}, TypeError); diff --git a/js/src/jit-test/tests/class/bug1567579.js b/js/src/jit-test/tests/class/bug1567579.js new file mode 100644 index 0000000000..240279ceda --- /dev/null +++ b/js/src/jit-test/tests/class/bug1567579.js @@ -0,0 +1,4 @@ +var res = "class { constructor() {} }"; +var test = eval("(" + res + ").toString()"); + +assertEq(test, res); \ No newline at end of file diff --git a/js/src/jit-test/tests/class/bug1616535.js b/js/src/jit-test/tests/class/bug1616535.js new file mode 100644 index 0000000000..feeec19e65 --- /dev/null +++ b/js/src/jit-test/tests/class/bug1616535.js @@ -0,0 +1,3 @@ +// |jit-test| error:TypeError + +class C extends (/x/) {} diff --git a/js/src/jit-test/tests/class/bug1628719.js b/js/src/jit-test/tests/class/bug1628719.js new file mode 100644 index 0000000000..76d3b97664 --- /dev/null +++ b/js/src/jit-test/tests/class/bug1628719.js @@ -0,0 +1,28 @@ +class BaseOne { + static build() { return 'BaseOne'; } +} + +class BaseTwo { + static build() { return 'BaseTwo'; } +} + +class ClassOne extends BaseOne { + constructor() { super(); } +} + +class ClassTwo extends BaseTwo { + constructor() { super(); } +} + +const ClassMap = { 1: ClassOne, 2: ClassTwo }; +const TimeLine = [2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2]; + +function run() { + for (var i = 0; i < TimeLine.length; ++i) { + var j = TimeLine[i]; + var expected = j === 1 ? 'BaseOne' : 'BaseTwo'; + var actual = ClassMap[j].build(); + assertEq(actual, expected); + } +} +run(); diff --git a/js/src/jit-test/tests/class/bug1645835.js b/js/src/jit-test/tests/class/bug1645835.js new file mode 100644 index 0000000000..3a66d94eec --- /dev/null +++ b/js/src/jit-test/tests/class/bug1645835.js @@ -0,0 +1,18 @@ +function Base() { + // Creates MNewObject, which is recoverable. An instruction which has the + // |RecoveredOnBailout| flag set mustn't have any live uses. + return {}; +} + +class C extends Base { + constructor() { + // |super()| assigns to |this|. The |this| slot mustn't be optimised away + // in case the debugger tries to read that slot. + super(); + } +} + +for (var i = 0; i < 100; i++) { + // The returned object is not used, so it can be optimised away. + new C(); +} diff --git a/js/src/jit-test/tests/class/bug1709328.js b/js/src/jit-test/tests/class/bug1709328.js new file mode 100644 index 0000000000..9ad856a5e4 --- /dev/null +++ b/js/src/jit-test/tests/class/bug1709328.js @@ -0,0 +1,18 @@ +class A0 { constructor() { this.dummy = true; } } +class A1 { constructor() { this.dummy = true; } } +class A2 { constructor() { this.dummy = true; } } +class A3 { constructor() { this.dummy = true; } } +class A4 { constructor() { this.dummy = true; } } +class A5 { constructor() { this.dummy = true; } } +class A6 { constructor() { this.dummy = true; } } +class A7 { constructor() { this.dummy = true; } } +class A8 { constructor() { this.dummy = true; } } +class A9 { constructor() { this.dummy = true; } } + +var constructors = [A1, A2, A3, A4, A5, A6, A7, A8, A9]; +for (var i = 0; i < 1000; i++) { + for (var construct of constructors) { + var h = new construct(); + assertEq(Reflect.get(h, "nonexistent", "dummy"), undefined); + } +} diff --git a/js/src/jit-test/tests/class/bug1715318.js b/js/src/jit-test/tests/class/bug1715318.js new file mode 100644 index 0000000000..6513cfeb8a --- /dev/null +++ b/js/src/jit-test/tests/class/bug1715318.js @@ -0,0 +1,18 @@ +// |jit-test| --no-threads; --fast-warmup +function f() { + // A non-constructor with a null .prototype. + let arrow = _ => null; + arrow.prototype = null; + + // Warm up. + for (var i = 0; i < 100; i++) {} + + try { + class C1 extends arrow {} + throw "Fail"; + } catch (e) { + assertEq(e instanceof TypeError, true); + } +} +f(); +f(); diff --git a/js/src/jit-test/tests/class/bug1720032-1.js b/js/src/jit-test/tests/class/bug1720032-1.js new file mode 100644 index 0000000000..34e936c69b --- /dev/null +++ b/js/src/jit-test/tests/class/bug1720032-1.js @@ -0,0 +1,29 @@ +// |jit-test| skip-if: getBuildConfiguration("osx") && getBuildConfiguration("arm64") +load(libdir + "asserts.js"); +function main() { + class Base {} + + class Derived extends Base { + constructor() { + super(); + + let v = 0xffff; + + try { + // Ensure this statement doesn't get DCE'ed. + v &= 0xff; + + // Returning a primitive value throws. + return 0; + } catch {} + + assertEq(v, 255); + } + } + + for (let i = 0; i < 15; i++) { + assertThrowsInstanceOf(() => new Derived(), TypeError); + } +} +main(); +main(); diff --git a/js/src/jit-test/tests/class/bug1720032-2.js b/js/src/jit-test/tests/class/bug1720032-2.js new file mode 100644 index 0000000000..7ca7a8df06 --- /dev/null +++ b/js/src/jit-test/tests/class/bug1720032-2.js @@ -0,0 +1,27 @@ +function main() { + class Base {} + + class Derived extends Base { + constructor() { + let v = 0xffff; + + try { + // Ensure this statement doesn't get DCE'ed. + v &= 0xff; + + // Accessing |this| throws when |super()| wasn't yet called. + this; + } catch {} + + assertEq(v, 255); + + super(); + } + } + + for (let i = 0; i < 15; i++) { + new Derived(); + } +} +main(); +main(); diff --git a/js/src/jit-test/tests/class/bug1720032-3.js b/js/src/jit-test/tests/class/bug1720032-3.js new file mode 100644 index 0000000000..e087e8e0f8 --- /dev/null +++ b/js/src/jit-test/tests/class/bug1720032-3.js @@ -0,0 +1,27 @@ +function main() { + class Base {} + + class Derived extends Base { + constructor() { + super(); + + let v = 0xffff; + + try { + // Ensure this statement doesn't get DCE'ed. + v &= 0xff; + + // Calling |super()| twice throws an error. + super(); + } catch {} + + assertEq(v, 255); + } + } + + for (let i = 0; i < 15; i++) { + new Derived(); + } +} +main(); +main(); diff --git a/js/src/jit-test/tests/class/bug1727281.js b/js/src/jit-test/tests/class/bug1727281.js new file mode 100644 index 0000000000..e17bec8612 --- /dev/null +++ b/js/src/jit-test/tests/class/bug1727281.js @@ -0,0 +1,4 @@ +// No assertion. +var a = { + 0: class { #$() {} } +}; diff --git a/js/src/jit-test/tests/class/checkreturn-catch-return-finally-super-arrow.js b/js/src/jit-test/tests/class/checkreturn-catch-return-finally-super-arrow.js new file mode 100644 index 0000000000..4a9d22955a --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-catch-return-finally-super-arrow.js @@ -0,0 +1,22 @@ +class C extends class {} { + constructor() { + var f = () => super(); + + try { + throw null; + } catch { + return; + } finally { + f(); + } + } +} + +function test() { + for (var i = 0; i < 100; ++i) { + // No error. + new C(); + } +} + +test(); diff --git a/js/src/jit-test/tests/class/checkreturn-catch-return-finally-super.js b/js/src/jit-test/tests/class/checkreturn-catch-return-finally-super.js new file mode 100644 index 0000000000..534d8e3046 --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-catch-return-finally-super.js @@ -0,0 +1,20 @@ +class C extends class {} { + constructor() { + try { + throw null; + } catch { + return; + } finally { + super(); + } + } +} + +function test() { + for (var i = 0; i < 100; ++i) { + // No error. + new C(); + } +} + +test(); diff --git a/js/src/jit-test/tests/class/checkreturn-catch-return.js b/js/src/jit-test/tests/class/checkreturn-catch-return.js new file mode 100644 index 0000000000..9794dc23b1 --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-catch-return.js @@ -0,0 +1,21 @@ +load(libdir + "asserts.js"); + +class C extends class {} { + constructor() { + super(); + + try { + return 0; + } catch { + return; + } + } +} + +function test() { + for (var i = 0; i < 100; ++i) { + assertThrowsInstanceOf(() => new C(), TypeError); + } +} + +test(); diff --git a/js/src/jit-test/tests/class/checkreturn-catch-super-arrow.js b/js/src/jit-test/tests/class/checkreturn-catch-super-arrow.js new file mode 100644 index 0000000000..0645c51e23 --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-catch-super-arrow.js @@ -0,0 +1,21 @@ +load(libdir + "asserts.js"); + +class C extends class {} { + constructor() { + var f = () => super(); + + try { + return 0; + } catch { + f(); + } + } +} + +function test() { + for (var i = 0; i < 100; ++i) { + assertThrowsInstanceOf(() => new C(), TypeError); + } +} + +test(); diff --git a/js/src/jit-test/tests/class/checkreturn-catch-super.js b/js/src/jit-test/tests/class/checkreturn-catch-super.js new file mode 100644 index 0000000000..e06270a527 --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-catch-super.js @@ -0,0 +1,19 @@ +load(libdir + "asserts.js"); + +class C extends class {} { + constructor() { + try { + return 0; + } catch { + super(); + } + } +} + +function test() { + for (var i = 0; i < 100; ++i) { + assertThrowsInstanceOf(() => new C(), TypeError); + } +} + +test(); diff --git a/js/src/jit-test/tests/class/checkreturn-finally-super-arrow.js b/js/src/jit-test/tests/class/checkreturn-finally-super-arrow.js new file mode 100644 index 0000000000..91d43a3507 --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-finally-super-arrow.js @@ -0,0 +1,20 @@ +class C extends class {} { + constructor() { + var f = () => super(); + + try { + return; + } finally { + f(); + } + } +} + +function test() { + for (var i = 0; i < 100; ++i) { + // No error. + new C(); + } +} + +test(); diff --git a/js/src/jit-test/tests/class/checkreturn-finally-super.js b/js/src/jit-test/tests/class/checkreturn-finally-super.js new file mode 100644 index 0000000000..805b9af50f --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-finally-super.js @@ -0,0 +1,18 @@ +class C extends class {} { + constructor() { + try { + return; + } finally { + super(); + } + } +} + +function test() { + for (var i = 0; i < 100; ++i) { + // No error. + new C(); + } +} + +test(); diff --git a/js/src/jit-test/tests/class/checkreturn-for-condition.js b/js/src/jit-test/tests/class/checkreturn-for-condition.js new file mode 100644 index 0000000000..e654056a15 --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-for-condition.js @@ -0,0 +1,68 @@ +load(libdir + "asserts.js"); + +function testReturn() { + class C extends class {} { + constructor(n) { + for (let i = 0; i < n; ++i) { + return; + } + assertEq(true, false, "unreachable"); + } + } + + for (var i = 0; i < 100; ++i) { + assertThrowsInstanceOf(() => new C(1), ReferenceError); + } +} +testReturn(); + +function testReturnSuper() { + class C extends class {} { + constructor(n) { + super(); + for (let i = 0; i < n; ++i) { + return; + } + assertEq(true, false, "unreachable"); + } + } + + for (var i = 0; i < 100; ++i) { + // No error. + new C(1); + } +} +testReturnSuper(); + +function testReturnPrimitive() { + class C extends class {} { + constructor(n) { + for (let i = 0; i < n; ++i) { + return 0; + } + assertEq(true, false, "unreachable"); + } + } + + for (var i = 0; i < 100; ++i) { + assertThrowsInstanceOf(() => new C(1), TypeError); + } +} +testReturnPrimitive(); + +function testReturnPrimitiveSuper() { + class C extends class {} { + constructor(n) { + super(); + for (let i = 0; i < n; ++i) { + return 0; + } + assertEq(true, false, "unreachable"); + } + } + + for (var i = 0; i < 100; ++i) { + assertThrowsInstanceOf(() => new C(1), TypeError); + } +} +testReturnPrimitiveSuper(); diff --git a/js/src/jit-test/tests/class/checkreturn-for-of-arrow.js b/js/src/jit-test/tests/class/checkreturn-for-of-arrow.js new file mode 100644 index 0000000000..4358bb1778 --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-for-of-arrow.js @@ -0,0 +1,29 @@ +var iter = { + [Symbol.iterator]() { return this; }, + next() { return {done: false}; }, + return() { + // Calls |super()|. + this.f(); + + return {done: true}; + }, +}; + +class C extends class {} { + constructor() { + iter.f = () => super(); + + for (var k of iter) { + return; + } + } +} + +function test() { + for (var i = 0; i < 100; ++i) { + // No error. + new C(); + } +} + +test(); diff --git a/js/src/jit-test/tests/class/checkreturn-for-of.js b/js/src/jit-test/tests/class/checkreturn-for-of.js new file mode 100644 index 0000000000..2c06fd4ea0 --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-for-of.js @@ -0,0 +1,27 @@ +load(libdir + "asserts.js"); + +var error = {}; + +var iter = { + [Symbol.iterator]() { return this; }, + next() { return {done: false}; }, + return() { throw error; }, +}; + +class C extends class {} { + constructor() { + super(); + + for (var k of iter) { + return 0; + } + } +} + +function test() { + for (var i = 0; i < 100; ++i) { + assertThrowsValue(() => new C(), error); + } +} + +test(); diff --git a/js/src/jit-test/tests/class/checkreturn-for.js b/js/src/jit-test/tests/class/checkreturn-for.js new file mode 100644 index 0000000000..c1efd30540 --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-for.js @@ -0,0 +1,68 @@ +load(libdir + "asserts.js"); + +function testReturn() { + class C extends class {} { + constructor() { + for (;;) { + return; + } + assertEq(true, false, "unreachable"); + } + } + + for (var i = 0; i < 100; ++i) { + assertThrowsInstanceOf(() => new C(), ReferenceError); + } +} +testReturn(); + +function testReturnSuper() { + class C extends class {} { + constructor() { + super(); + for (;;) { + return; + } + assertEq(true, false, "unreachable"); + } + } + + for (var i = 0; i < 100; ++i) { + // No error. + new C(); + } +} +testReturnSuper(); + +function testReturnPrimitive() { + class C extends class {} { + constructor() { + for (;;) { + return 0; + } + assertEq(true, false, "unreachable"); + } + } + + for (var i = 0; i < 100; ++i) { + assertThrowsInstanceOf(() => new C(), TypeError); + } +} +testReturnPrimitive(); + +function testReturnPrimitiveSuper() { + class C extends class {} { + constructor() { + super(); + for (;;) { + return 0; + } + assertEq(true, false, "unreachable"); + } + } + + for (var i = 0; i < 100; ++i) { + assertThrowsInstanceOf(() => new C(), TypeError); + } +} +testReturnPrimitiveSuper(); diff --git a/js/src/jit-test/tests/class/checkreturn-optimized-out.js b/js/src/jit-test/tests/class/checkreturn-optimized-out.js new file mode 100644 index 0000000000..10025c9c27 --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-optimized-out.js @@ -0,0 +1,23 @@ +function h() {} + +class Base {} + +class C extends Base { + constructor(cond) { + if (cond) { + // Never entered. + for (var i = 0; i < args.length; ++i) h(); + } + super(); + } +} + +function f() { + for (var i = 0; i < 10; i++) { + var x = new C(false); + } +} + +for (var i = 0; i < 3; i++) { + f(); +} diff --git a/js/src/jit-test/tests/class/checkreturn-source-location.js b/js/src/jit-test/tests/class/checkreturn-source-location.js new file mode 100644 index 0000000000..3bdc83c36d --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-source-location.js @@ -0,0 +1,19 @@ +// Test source location for missing-super-call check at the end of a derived class constructor. +class A {}; +class B extends A { + constructor(x) { + if (x === null) { + throw "fail"; + } + } +}; +let ex; +try { + new B(); +} catch (e) { + ex = e; +} +assertEq(ex instanceof ReferenceError, true); +// The closing '}' of B's constructor. +assertEq(ex.lineNumber, 8); +assertEq(ex.columnNumber, 5); diff --git a/js/src/jit-test/tests/class/checkreturn-while.js b/js/src/jit-test/tests/class/checkreturn-while.js new file mode 100644 index 0000000000..426e7effdc --- /dev/null +++ b/js/src/jit-test/tests/class/checkreturn-while.js @@ -0,0 +1,68 @@ +load(libdir + "asserts.js"); + +function testReturn() { + class C extends class {} { + constructor() { + while (true) { + return; + } + assertEq(true, false, "unreachable"); + } + } + + for (var i = 0; i < 100; ++i) { + assertThrowsInstanceOf(() => new C(), ReferenceError); + } +} +testReturn(); + +function testReturnSuper() { + class C extends class {} { + constructor() { + super(); + while (true) { + return; + } + assertEq(true, false, "unreachable"); + } + } + + for (var i = 0; i < 100; ++i) { + // No error. + new C(); + } +} +testReturnSuper(); + +function testReturnPrimitive() { + class C extends class {} { + constructor() { + while (true) { + return 0; + } + assertEq(true, false, "unreachable"); + } + } + + for (var i = 0; i < 100; ++i) { + assertThrowsInstanceOf(() => new C(), TypeError); + } +} +testReturnPrimitive(); + +function testReturnPrimitiveSuper() { + class C extends class {} { + constructor() { + super(); + while (true) { + return 0; + } + assertEq(true, false, "unreachable"); + } + } + + for (var i = 0; i < 100; ++i) { + assertThrowsInstanceOf(() => new C(), TypeError); + } +} +testReturnPrimitiveSuper(); diff --git a/js/src/jit-test/tests/class/class-static-01.js b/js/src/jit-test/tests/class/class-static-01.js new file mode 100644 index 0000000000..ee41def1fb --- /dev/null +++ b/js/src/jit-test/tests/class/class-static-01.js @@ -0,0 +1,172 @@ +// |jit-test| +load(libdir + "asserts.js"); + +// Parse +class A { + static { } +}; + +// Run +var ran = false; +class B { + static { + ran = true; + } +}; + +assertEq(ran, true); + +// Can access static assigned before. +var res; +class C { + static x = 10; + static { + res = this.x; + } +}; + +assertEq(res, 10); + +// Multiple static blocks +class D { + static { } + static { } +}; + +class D1 { + static { } static { } +}; + +// Blocks run in order. +class E { + static { + res = 10; + } + static { + assertEq(res, 10); + res = 14; + } +} + +assertEq(res, 14); + + +// Can use static to access private state. +let accessor; +class F { + #x = 10 + static { + accessor = (o) => o.#x; + } +} + +let f = new F; +assertEq(accessor(f), 10); + +class G { + static { + this.a = 10; + } +} +assertEq(G.a, 10); + +// Can use the super-keyword to access a static method in super class. +class H { + static a() { return 101; } +} + +class I extends H { + static { + res = super.a(); + } +} + +assertEq(res, 101); + +// Can add a property to a class from within a static +class J { + static { + this.x = 12; + } +} + +assertEq(J.x, 12); + + +function assertThrowsSyntaxError(str) { + assertThrowsInstanceOf(() => eval(str), SyntaxError); // Direct Eval + assertThrowsInstanceOf(() => (1, eval)(str), SyntaxError); // Indirect Eval + assertThrowsInstanceOf(() => Function(str), SyntaxError); // Function +} + +assertThrowsSyntaxError(` +class X { + static { + arguments; + } +} +`) + + +assertThrowsSyntaxError(` +class X extends class {} { + static { + super(); // can't call super in a static block + } +} +`) + +assertThrowsSyntaxError(` +class X { + static { + return 10; // Can't return in a static block + } +} +`) + +assertThrowsSyntaxError(` +class X { + static { + await 10; // Can't await in a static block + } +} +`) + +// Can't await inside a static block, even if we're inside an async function. +// +// The error message here is not good `SyntaxError: await is a reserved identifier`, +// but can be fixed later. s +assertThrowsSyntaxError(` +async function f() { + class X { + static { + await 10; // Can't await in a static block + } + } +} +`) + + +assertThrowsSyntaxError(` +class X { + static { + yield 10; // Can't yield in a static block + } +} +`) + + +assertThrowsSyntaxError(` +function* gen() { + class X { + static { + yield 10; // Can't yield in a static block, even inside a generator + } + } +} +`) + +// Incomplete should throw a sensible error. +assertThrowsSyntaxError(` +class A { static { this.x +`) \ No newline at end of file diff --git a/js/src/jit-test/tests/class/class-static-02.js b/js/src/jit-test/tests/class/class-static-02.js new file mode 100644 index 0000000000..e096ec86d1 --- /dev/null +++ b/js/src/jit-test/tests/class/class-static-02.js @@ -0,0 +1,10 @@ +// |jit-test| + +Reflect.parse(`class A { + static { print('hi'); } +}`) + +Reflect.parse(`class A { + static x = 10; + static { this.x++ } +}`); \ No newline at end of file diff --git a/js/src/jit-test/tests/class/class-static-03.js b/js/src/jit-test/tests/class/class-static-03.js new file mode 100644 index 0000000000..816e63d923 --- /dev/null +++ b/js/src/jit-test/tests/class/class-static-03.js @@ -0,0 +1,15 @@ +// |jit-test| + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +dbg.onDebuggerStatement = function (frame) { + var e = frame.eval("this.y = 13"); + return undefined; +}; + +g.eval("class A { static x = 10; static { debugger; } }; a = A;"); +assertEq(g.a.x, 10); +assertEq(g.a.y, 13); + diff --git a/js/src/jit-test/tests/class/classconstructor.js b/js/src/jit-test/tests/class/classconstructor.js new file mode 100644 index 0000000000..2d926b48ca --- /dev/null +++ b/js/src/jit-test/tests/class/classconstructor.js @@ -0,0 +1,27 @@ +function customconstructor() { + class X { + constructor() {} + a() {} + }; + + assertEq(Object.getOwnPropertyDescriptor(X, "prototype").configurable, false); + assertEq(Object.getOwnPropertyDescriptor(X.prototype, "constructor").enumerable, false); +} + +function defaultconstructor() { + class X { + a() {} + }; + + assertEq(Object.getOwnPropertyDescriptor(X, "prototype").configurable, false); + assertEq(Object.getOwnPropertyDescriptor(X.prototype, "constructor").enumerable, false); +} + +function run() { + for (var i = 0; i < 100; i++) { + customconstructor(); + defaultconstructor(); + } +} + +run(); diff --git a/js/src/jit-test/tests/class/compProp.js b/js/src/jit-test/tests/class/compProp.js new file mode 100644 index 0000000000..f98727c718 --- /dev/null +++ b/js/src/jit-test/tests/class/compProp.js @@ -0,0 +1,15 @@ +load(libdir + "asserts.js"); + +function f(tag) { return {[tag]: 1}; } +a = []; +for (var i = 0; i < 2000; i++) + a[i] = f("first"); + +for (var i = 0; i < 2000; i++) + assertEq(a[i].first, 1); + +for (var i = 0; i < 2000; i++) + a[i] = f("second"); + +for (var i = 0; i < 2000; i++) + assertEq(a[i].second, 1); diff --git a/js/src/jit-test/tests/class/default-constructor-position.js b/js/src/jit-test/tests/class/default-constructor-position.js new file mode 100644 index 0000000000..02b6efefd0 --- /dev/null +++ b/js/src/jit-test/tests/class/default-constructor-position.js @@ -0,0 +1,68 @@ +// Test default class constructors have reasonable lineno/column values + +const source = ` + /* GeneralParser::synthesizeConstructor */ class A { + } + + /* GeneralParser::synthesizeConstructor (derived) */ class B extends A { + } + + /* GeneralParser::synthesizeConstructor */ class C { + field = "default value"; + } + + /* GeneralParser::synthesizeConstructor (derived) */ class D extends A { + field = "default value"; + } +`; + +// Use the Debugger API to introspect the line / column. +let d = new Debugger(); +let g = newGlobal({newCompartment: true}) +let gw = d.addDebuggee(g); + +g.evaluate(source); + +function getStartLine(name) { + return gw.makeDebuggeeValue(g.eval(name)).script.startLine; +} + +function getStartColumn(name) { + return gw.makeDebuggeeValue(g.eval(name)).script.startColumn; +} + +function getSourceStart(name) { + return gw.makeDebuggeeValue(g.eval(name)).script.sourceStart; +} + +function getSourceLength(name) { + return gw.makeDebuggeeValue(g.eval(name)).script.sourceLength; +} + +// Compute the expected line/column from source. +matches = ""; +lineno = 0; +for (text of source.split("\n")) { + lineno++; + + column = text.indexOf("class"); + if (column < 0) { + continue; + } + + className = text[column + 6]; + matches += className; + + // Check lineno/column. + assertEq(getStartLine(className), lineno); + assertEq(getStartColumn(className), column + 1); + + // Check sourceStart/sourceEnd. + offset = source.indexOf("class " + className) + length = source.substring(offset).indexOf("}") + 1 + assertEq(getSourceStart(className), offset) + assertEq(getSourceLength(className), length) +} + +// Sanity check to did actual matches +assertEq(matches, "ABCD"); diff --git a/js/src/jit-test/tests/class/methDefn.js b/js/src/jit-test/tests/class/methDefn.js new file mode 100644 index 0000000000..f8a6d883a4 --- /dev/null +++ b/js/src/jit-test/tests/class/methDefn.js @@ -0,0 +1,15 @@ +load(libdir + "asserts.js"); + +function f(tag) { return {[tag](){return 1;}}; } +a = []; +for (var i = 0; i < 2000; i++) + a[i] = f("first"); + +for (var i = 0; i < 2000; i++) + assertEq(a[i].first(), 1); + +for (var i = 0; i < 2000; i++) + a[i] = f("second"); + +for (var i = 0; i < 2000; i++) + assertEq(a[i].second(), 1); diff --git a/js/src/jit-test/tests/class/regress-merge-descriptors-simple.js b/js/src/jit-test/tests/class/regress-merge-descriptors-simple.js new file mode 100644 index 0000000000..57ea9a9f3a --- /dev/null +++ b/js/src/jit-test/tests/class/regress-merge-descriptors-simple.js @@ -0,0 +1,37 @@ +// Copyright 2008 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +var extend = function (d, b) { + function foo() { this.constructor = d; } + foo.prototype = b.prototype; + d.prototype = new foo(); +}; + +var Car = (function (Super) { + var Car = function () {} + extend(Car, Super); +}(Object)); diff --git a/js/src/jit-test/tests/class/regress-merge-descriptors.js b/js/src/jit-test/tests/class/regress-merge-descriptors.js new file mode 100644 index 0000000000..f56adcabd2 --- /dev/null +++ b/js/src/jit-test/tests/class/regress-merge-descriptors.js @@ -0,0 +1,92 @@ +// Copyright 2013 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +var extend = function (d, b) { + function __() { this.constructor = d; } + __.prototype = b.prototype; + d.prototype = new __(); +}; + +var Car = (function (Super) { + var Car = function () { + var self = this; + + Super.call(self); + + Object.defineProperties(self, { + "make": { + enumerable: true, + configurable: true, + get: function () { + return "Ford"; + } + } + }); + + self.copy = function () { + throw new Error("Meant to be overriden"); + }; + + return self; + }; + + extend(Car, Super); + + return Car; +}(Object)); + + +var SuperCar = ((function (Super) { + var SuperCar = function (make) { + var self = this; + + Super.call(self); + + + Object.defineProperties(self, { + "make": { + enumerable: true, + configurable: true, + get: function () { + return make; + } + } + }); + + // Convert self.copy from DATA_CONSTANT to DATA. + self.copy = function () { }; + + return self; + }; + extend(SuperCar, Super); + return SuperCar; +})(Car)); + +assertEq("Ford", new Car().make); +assertEq("Bugatti", new SuperCar("Bugatti").make); +assertEq("Lambo", new SuperCar("Lambo").make); +assertEq("Shelby", new SuperCar("Shelby").make); diff --git a/js/src/jit-test/tests/class/relazify-constructor.js b/js/src/jit-test/tests/class/relazify-constructor.js new file mode 100644 index 0000000000..2066898886 --- /dev/null +++ b/js/src/jit-test/tests/class/relazify-constructor.js @@ -0,0 +1,22 @@ +class WithConstructor { + constructor() {} +} + +class DefaultConstructor { +} + +class WithConstructorDerived extends DefaultConstructor { + constructor() { + super() + } +} + +class DefaultConstructorDerived extends DefaultConstructor { +} + +relazifyFunctions(); + +let a = new WithConstructor; +let b = new DefaultConstructor; +let c = new WithConstructorDerived; +let d = new DefaultConstructorDerived; diff --git a/js/src/jit-test/tests/class/super-base-is-null-get-elem.js b/js/src/jit-test/tests/class/super-base-is-null-get-elem.js new file mode 100644 index 0000000000..3bb052af54 --- /dev/null +++ b/js/src/jit-test/tests/class/super-base-is-null-get-elem.js @@ -0,0 +1,12 @@ +class NullProto { + static m(key) { + try { + return super[key]; + } catch {} + } +} +Object.setPrototypeOf(NullProto, null); + +for (var i = 0; i < 100; ++i) { + NullProto.m(i); +} diff --git a/js/src/jit-test/tests/class/super-base-is-null-get-prop.js b/js/src/jit-test/tests/class/super-base-is-null-get-prop.js new file mode 100644 index 0000000000..eff5a290ee --- /dev/null +++ b/js/src/jit-test/tests/class/super-base-is-null-get-prop.js @@ -0,0 +1,12 @@ +class NullProto { + static m() { + try { + return super.p; + } catch {} + } +} +Object.setPrototypeOf(NullProto, null); + +for (var i = 0; i < 100; ++i) { + NullProto.m(); +} diff --git a/js/src/jit-test/tests/class/super-base-is-null-set-elem.js b/js/src/jit-test/tests/class/super-base-is-null-set-elem.js new file mode 100644 index 0000000000..226760f9db --- /dev/null +++ b/js/src/jit-test/tests/class/super-base-is-null-set-elem.js @@ -0,0 +1,12 @@ +class NullProto { + static m(key) { + try { + super[key] = 0; + } catch {} + } +} +Object.setPrototypeOf(NullProto, null); + +for (var i = 0; i < 100; ++i) { + NullProto.m(i); +} diff --git a/js/src/jit-test/tests/class/super-base-is-null-set-prop.js b/js/src/jit-test/tests/class/super-base-is-null-set-prop.js new file mode 100644 index 0000000000..a3b734eef2 --- /dev/null +++ b/js/src/jit-test/tests/class/super-base-is-null-set-prop.js @@ -0,0 +1,12 @@ +class NullProto { + static m() { + try { + super.p = 0; + } catch {} + } +} +Object.setPrototypeOf(NullProto, null); + +for (var i = 0; i < 100; ++i) { + NullProto.m(); +} diff --git a/js/src/jit-test/tests/class/super-in-nested-eval.js b/js/src/jit-test/tests/class/super-in-nested-eval.js new file mode 100644 index 0000000000..8786de4ba7 --- /dev/null +++ b/js/src/jit-test/tests/class/super-in-nested-eval.js @@ -0,0 +1,34 @@ +// |jit-test| allow-overrecursed + +// Test super() and super.foo() calls in deeply nested eval. + +class C { + constructor(x) { this.x = x; } + foo() { this.x++; } +} +class D extends C { + constructor(depth) { + var d = depth; + var callsuper = 'super(depth); super.foo();'; + var s = "var q; if (d-- > 0) { eval(s) } else { eval(callsuper); }"; + eval(s); + } +} + +const MAX_DEPTH = 250; + +// These values should work. +var depths = [0, 1, 10, 200, MAX_DEPTH]; +for (var d of depths) { + var o = new D(d); + assertEq(o.x, d + 1); +} + +// This should fail. +var ex; +try { + new D(MAX_DEPTH + 1); +} catch(e) { + ex = e; +} +assertEq(ex instanceof InternalError, true); diff --git a/js/src/jit-test/tests/class/super-this-env.js b/js/src/jit-test/tests/class/super-this-env.js new file mode 100644 index 0000000000..9faca9b745 --- /dev/null +++ b/js/src/jit-test/tests/class/super-this-env.js @@ -0,0 +1,34 @@ +for (let forceFullParse of [true, false]) { + assertEq(Object.prototype.toString, evaluate(`{ + class C extends Object { + f() { + let x = "toString"; + return () => super[x]; + } + } + + (new C).f()() + }`, { forceFullParse })); + + assertEq(Object.prototype.toString, evaluate(`{ + class C extends Object { + f() { + let x = "toString"; + return () => eval("super[x]"); + } + } + + (new C).f()() + }`, { forceFullParse })); + + assertEq(Object.prototype.toString, evaluate(`{ + class C extends Object { + f() { + let x = "toString"; + return () => eval("() => super[x]"); + } + } + + (new C).f()()() + }`, { forceFullParse })); +} diff --git a/js/src/jit-test/tests/class/superElemMegamorphic.js b/js/src/jit-test/tests/class/superElemMegamorphic.js new file mode 100644 index 0000000000..8601cc472a --- /dev/null +++ b/js/src/jit-test/tests/class/superElemMegamorphic.js @@ -0,0 +1,33 @@ +class C { }; +C.prototype.a = "a"; +C.prototype.b = "b"; +C.prototype.c = "c"; +C.prototype.d = "d"; +C.prototype.e = "e"; +C.prototype.f = "f"; +C.prototype.g = "g"; +C.prototype.h = "h"; +C.prototype.i = "i"; +C.prototype.j = "j"; +C.prototype.k = "k"; +C.prototype.l = "l"; +C.prototype.m = "m"; +C.prototype.n = "n"; +C.prototype.o = "o"; +C.prototype.p = "p"; +C.prototype.q = "q"; +C.prototype.r = "r"; + +class D extends C { + foo(p) { + return super[p]; + } +} + +var d = new D(); + +for (let i = 0; i < 20; ++i) { + for (let p in C.prototype) { + assertEq(p, d.foo(p)); + } +} diff --git a/js/src/jit-test/tests/class/superProp.js b/js/src/jit-test/tests/class/superProp.js new file mode 100644 index 0000000000..37b85ab652 --- /dev/null +++ b/js/src/jit-test/tests/class/superProp.js @@ -0,0 +1,62 @@ +var g_get_this = "get_this"; +var g_prop_this = "prop_this"; + +class Base +{ + get get_prop() { return 7; } + get get_this() { return this; } + prop_call() { return 11; } + prop_this() { return this.x; } +} +Base.prototype.prop_proto = 5; +Base.prototype.x = (-1); +Base.prototype[0] = 100; +Base.prototype[1] = 101; +Base.prototype[2] = 102; + +class Derived extends Base +{ + get get_prop() { throw "Bad"; } + get get_this() { throw "Bad"; } + prop_call() { throw "Bad"; } + prop_this() { throw "Bad"; } + + do_test_getprop() + { + this.x = 13; + + assertEq(super.prop_proto, 5); + + assertEq(super.get_prop, 7); + assertEq(super.get_this, this); + + assertEq(super.prop_call(), 11); + assertEq(super.prop_this(), 13); + } + + do_test_getelem() + { + this.x = 13; + + assertEq(super[g_get_this], this); + + assertEq(super[g_prop_this](), 13); + assertEq(super[0], 100); + assertEq(super[1], 101); + assertEq(super[2], 102); + } +} +Derived.prototype.prop_proto = (-1); +Derived.prototype.x = (-2); +Derived.prototype[0] = (-3); +Derived.prototype[1] = (-4); +Derived.prototype[2] = (-5); + +for (var i = 0; i < 20; ++i) { + let t = new Derived(); + + for (var j = 0; j < 20; ++j) { + t.do_test_getprop(); + t.do_test_getelem(); + } +} diff --git a/js/src/jit-test/tests/class/superPropMegamorphic.js b/js/src/jit-test/tests/class/superPropMegamorphic.js new file mode 100644 index 0000000000..489f6ececb --- /dev/null +++ b/js/src/jit-test/tests/class/superPropMegamorphic.js @@ -0,0 +1,42 @@ +// Test GETPROP_SUPER with megamorphic variation +const NCLASS = 20; + +var g_prop = "prop"; +var g_THIS = "THIS"; + +// Define array of base classes with a data property and a getter property. +let C = []; +for (let i = 0; i < NCLASS; ++i) { + let klass = class { + get THIS() { return this; } + }; + klass.prototype.prop = i; + + C.push(klass); +} + +// Derive class using super property access +class D extends C[0] { + get prop() { return super.prop; } + get elem() { return super[g_prop]; } + + get prop_this() { return super.THIS; } + get elem_this() { return super[g_THIS]; } +} + +let d = new D(); + +for (var j = 0; j < 4; ++j) { + for (var i = 0; i < 15; ++i) { + // Change base class by overriding [[HomeObject]].[[Prototype]] + Object.setPrototypeOf(D.prototype, C[j].prototype); + + // Check we get property of correct class + assertEq(d.prop, j); + assertEq(d.elem, j); + + // Check super getter gets |this| of object not base class + assertEq(d.prop_this, d); + assertEq(d.elem_this, d); + } +} diff --git a/js/src/jit-test/tests/class/superPropProxy.js b/js/src/jit-test/tests/class/superPropProxy.js new file mode 100644 index 0000000000..fe0e5369a4 --- /dev/null +++ b/js/src/jit-test/tests/class/superPropProxy.js @@ -0,0 +1,23 @@ +// Define constructor with a proxy as prototype +let hook = { get: function(target, name, receiver) { return receiver; } } +let Base = function() { } +Base.prototype = new Proxy(Base.prototype, hook); + +class Derived extends Base { + test() { + // Check proxy receiver is |this|, rather than Base.[[Prototype]] + assertEq(super.x, this); + } + + test_elem() { + // Check proxy receiver is |this|, rather than Base.[[Prototype]] + assertEq(super[0], this); + } +} + +let d = new Derived(); + +for (let i = 0; i < 20; ++i) { + d.test(); + d.test_elem(); +} diff --git a/js/src/jit-test/tests/class/superSetPropThrow.js b/js/src/jit-test/tests/class/superSetPropThrow.js new file mode 100644 index 0000000000..c3b16ac8af --- /dev/null +++ b/js/src/jit-test/tests/class/superSetPropThrow.js @@ -0,0 +1,64 @@ +var g_foo = "foo"; +var g_bar = "bar"; + +// Define base class with a read-only and a writable data property +class Base +{ +} +Object.defineProperty(Base.prototype, "foo", { value: "Base", writable: true }); +Object.defineProperty(Base.prototype, "bar", { value: "Base", writable: false }); + +// Test various cases that should throw during SETPROP_SUPER +class Derived extends Base +{ + // ECMA-2018 9.1.9.1, step 4.a + testReadonly() { + super.bar = "Derived"; + } + testReadonlyElem() { + super[g_bar] = "Derived"; + } + + // ECMA-2018 9.1.9.1, step 4.b + testPrimitiveReceiver() { + super.foo = "Derived"; + } + testPrimitiveReceiverElem() { + super[g_foo] = "Derived"; + } + + // ECMA-2018 9.1.9.1, step 4.d.i + testAccessorShadow() { + Object.defineProperty(this, "foo", { get: function() { } }); + super.foo = "Derived"; + } + testAccessorShadowElem() { + Object.defineProperty(this, "foo", { get: function() { } }); + super[g_foo] = "Derived"; + } + + // ECMA-2018 9.1.9.1, step 4.d.ii + testReadonlyShadow() { + Object.defineProperty(this, "foo", { writable: false }); + super.foo = "Derived"; + } + testReadonlyShadowElem() { + Object.defineProperty(this, "foo", { writable: false }); + super[g_foo] = "Derived"; + } +} + +for (let i = 0; i < 10; ++i) { + var cnt = 0; + + try { new Derived().testReadonly(); } catch(e) { cnt++; } + try { new Derived().testReadonlyElem(); } catch(e) { cnt++; } + try { Derived.prototype.testPrimitiveReceiver.call(null); } catch(e) { cnt++; } + try { Derived.prototype.testPrimitiveReceiverElem.call(null); } catch(e) { cnt++; } + try { new Derived().testAccessorShadow(); } catch(e) { cnt++; } + try { new Derived().testAccessorShadowElem(); } catch(e) { cnt++; } + try { new Derived().testReadonlyShadow(); } catch(e) { cnt++; } + try { new Derived().testReadonlyShadowElem(); } catch(e) { cnt++; } + + assertEq(cnt, 8); +} diff --git a/js/src/jit-test/tests/class/superSetProperty.js b/js/src/jit-test/tests/class/superSetProperty.js new file mode 100644 index 0000000000..6e136cb58b --- /dev/null +++ b/js/src/jit-test/tests/class/superSetProperty.js @@ -0,0 +1,67 @@ + +class Base +{ + set setter(val) { + this.set_val = val; + this.set_this = this; + } +} +Base.prototype.prop = "Base"; + +class Derived extends Base +{ + set setter(val) { super.setter = val; } + setelem(pname, val) { super[pname] = val; } +} + +// Test SETPROP_SUPER invoke setters correctly +function testSetterChain() { + let d = new Derived(); + + for (let i = 0; i < 10; ++i) + { + d.setter = i; + assertEq(d.set_val, i); + assertEq(d.set_this, d); + } +} +function testSetterChainElem() { + let d = new Derived(); + + for (let i = 0; i < 10; ++i) + { + d.setelem("setter", i); + assertEq(d.set_val, i); + assertEq(d.set_this, d); + } +} + +// Test that SETPROP_SUPER modifies |this| and not home object +function testSuperSetProp() { + let d = new Derived(); + + for (let i = 0; i < 10; ++i) + { + d.prop = i; + assertEq(d.prop, i); + assertEq(d.hasOwnProperty("prop"), true); + assertEq(Derived.prototype.prop, "Base"); + } +} +function testSuperSetPropElem() { + let d = new Derived(); + + for (let i = 0; i < 10; ++i) + { + d.setelem("prop", i); + assertEq(d.prop, i); + assertEq(d.hasOwnProperty("prop"), true); + assertEq(Derived.prototype.prop, "Base"); + } +} + +testSetterChain(); +testSetterChainElem(); + +testSuperSetProp(); +testSuperSetPropElem(); diff --git a/js/src/jit-test/tests/class/this-check-after-scalar-replacement-in-derived-class-constructor.js b/js/src/jit-test/tests/class/this-check-after-scalar-replacement-in-derived-class-constructor.js new file mode 100644 index 0000000000..257e723f05 --- /dev/null +++ b/js/src/jit-test/tests/class/this-check-after-scalar-replacement-in-derived-class-constructor.js @@ -0,0 +1,29 @@ +// Create a derived class with a default class constructor. +class C extends class {} {} + +// The default constructor of a derived class is small enough to be inlinable. +assertEq(isSmallFunction(C), true); + +// Bound functions have a configurable "prototype" property. +const BF = function(){}.bind(); + +function testBoundFunction() { + for (let i = 0; i <= 1000; ++i) { + let newTarget = i < 1000 ? C : BF; + Reflect.construct(C, [], newTarget); + } +} + +for (let i = 0; i < 2; ++i) testBoundFunction(); + +// Proxy have a configurable "prototype" property. +const P = new Proxy(function(){}, {}); + +function testProxy() { + for (let i = 0; i <= 1000; ++i) { + let newTarget = i < 1000 ? C : P; + Reflect.construct(C, [], newTarget); + } +} + +for (let i = 0; i < 2; ++i) testProxy(); diff --git a/js/src/jit-test/tests/class/throwOnCallConstructor.js b/js/src/jit-test/tests/class/throwOnCallConstructor.js new file mode 100644 index 0000000000..2bde725702 --- /dev/null +++ b/js/src/jit-test/tests/class/throwOnCallConstructor.js @@ -0,0 +1,77 @@ +// Count constructor calls +var cnt = 0; +class Base { constructor() { ++cnt; } } + +// Force |JSFunction->hasScript()| +new Base(); +assertEq(cnt, 1); + +// Calling a ClassConstructor must throw +(function() { + function f() { Base(); } + try { f() } catch (e) {} + try { f() } catch (e) {} + assertEq(cnt, 1); +})(); + +// Spread-calling a ClassConstructor must throw +(function() { + function f() { Base(...[]); } + try { f() } catch (e) {} + try { f() } catch (e) {} + assertEq(cnt, 1); +})(); + +// Function.prototype.call must throw on ClassConstructor +(function() { + function f() { Base.call(null); } + try { f() } catch (e) {} + try { f() } catch (e) {} + assertEq(cnt, 1); +})(); + +// Function.prototype.apply must throw on ClassConstructor +(function() { + function f() { Base.apply(null, []); } + try { f() } catch (e) {} + try { f() } catch (e) {} + assertEq(cnt, 1); +})(); + +// Getter must throw if it is a ClassConstructor +(function() { + var o = {}; + Object.defineProperty(o, "prop", { get: Base }); + function f() { o.prop }; + try { f() } catch (e) {} + try { f() } catch (e) {} + assertEq(cnt, 1); +})(); + +// Setter must throw if it is a ClassConstructor +(function() { + var o = {}; + Object.defineProperty(o, "prop", { set: Base }); + function f() { o.prop = 1 }; + try { f() } catch (e) {} + try { f() } catch (e) {} + assertEq(cnt, 1); +})(); + +// Proxy apply must throw if it is a ClassConstructor +(function() { + var o = new Proxy(function() { }, { apply: Base }); + function f() { o() }; + try { f() } catch (e) {} + try { f() } catch (e) {} + assertEq(cnt, 1); +})(); + +// Proxy get must throw if it is a ClassConstructor +(function() { + var o = new Proxy({}, { get: Base }); + function f() { o.x } + try { f() } catch (e) {} + try { f() } catch (e) {} + assertEq(cnt, 1); +})(); diff --git a/js/src/jit-test/tests/closures/bug496922.js b/js/src/jit-test/tests/closures/bug496922.js new file mode 100644 index 0000000000..a0aeca1d26 --- /dev/null +++ b/js/src/jit-test/tests/closures/bug496922.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '0,0,1,1,2,2,3,3,'; + +v = 0 +{ +let f = function() { + for (let x = 0; x < 4; ++x) { + v >> x; + (function() { + for (let y = 0; y < 2; ++y) { + appendToActual(x) + } + })() + } +}; +(function() {})() + f(v) +} + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/bug540131-2.js b/js/src/jit-test/tests/closures/bug540131-2.js new file mode 100644 index 0000000000..ebd3e0203a --- /dev/null +++ b/js/src/jit-test/tests/closures/bug540131-2.js @@ -0,0 +1,13 @@ +// |jit-test| error: TypeError +(function() { + for (let z in [true]) { + (new(eval("for(l in[0,0,0,0]){}")) + (((function f(a, b) { + if (a.length == b) { + return (z) + } + f(a, b + 1) + })([,,], 0)), [])) + } +})() + diff --git a/js/src/jit-test/tests/closures/bug540131.js b/js/src/jit-test/tests/closures/bug540131.js new file mode 100644 index 0000000000..4584ac350a --- /dev/null +++ b/js/src/jit-test/tests/closures/bug540131.js @@ -0,0 +1,5 @@ +try { + (function() { + { let x = (eval("for(y in[0,0,0,0]){}")); } + })() +} catch(e) {} diff --git a/js/src/jit-test/tests/closures/bug540242.js b/js/src/jit-test/tests/closures/bug540242.js new file mode 100644 index 0000000000..56c1a5a314 --- /dev/null +++ b/js/src/jit-test/tests/closures/bug540242.js @@ -0,0 +1,17 @@ +for (j = 0; j < 1; j++) { + var f = eval("\ + (function() {\ + for (var a = 0; a < 8; ++a) {\ + if (a % 3 == 2) {\ + eval(\"\ + for(b in[0,0,0,0]) {\ + print()\ + }\ + \")\ + }\ + gc()\ + }\ + })\ + "); + f() +} diff --git a/js/src/jit-test/tests/closures/bug540243.js b/js/src/jit-test/tests/closures/bug540243.js new file mode 100644 index 0000000000..67b65c6346 --- /dev/null +++ b/js/src/jit-test/tests/closures/bug540243.js @@ -0,0 +1,10 @@ +for (a of (eval("\ + (function() {\ + return function*() {\ + yield ((function() {\ + return d\ + })())\ + } ();\ + var d = []\ + })\ +"))()); diff --git a/js/src/jit-test/tests/closures/bug540528.js b/js/src/jit-test/tests/closures/bug540528.js new file mode 100644 index 0000000000..419d33eb5f --- /dev/null +++ b/js/src/jit-test/tests/closures/bug540528.js @@ -0,0 +1,4 @@ +(function() { + var a + eval("for(b in[0,0,0,0]){}[a=0]") +})() diff --git a/js/src/jit-test/tests/closures/bug541239.js b/js/src/jit-test/tests/closures/bug541239.js new file mode 100644 index 0000000000..389aa9d28f --- /dev/null +++ b/js/src/jit-test/tests/closures/bug541239.js @@ -0,0 +1,16 @@ +function m() { + var d = 73; + + return (eval("\n\ + (function() {\n\ + return function*() {\n\ + yield ((function() {\n\ + print(d);\n\ + return d\n\ + })())\n\ + } ();\n\ + })\n\ + "))(); +} + +m().next(); diff --git a/js/src/jit-test/tests/closures/bug543565.js b/js/src/jit-test/tests/closures/bug543565.js new file mode 100644 index 0000000000..828688b3a8 --- /dev/null +++ b/js/src/jit-test/tests/closures/bug543565.js @@ -0,0 +1,7 @@ +function C() { + var k = 3; + this.x = function () { return k; }; + for (var i = 0; i < 9; i++) + ; +} +new C; diff --git a/js/src/jit-test/tests/closures/bug684178.js b/js/src/jit-test/tests/closures/bug684178.js new file mode 100644 index 0000000000..34a59c5fb4 --- /dev/null +++ b/js/src/jit-test/tests/closures/bug684178.js @@ -0,0 +1,9 @@ +var obj = {}; +(function() { + if (obj) { + function f() { obj.x = 1; } + obj.m = function() { f(); }; + } +})(); +obj.m(); +assertEq(obj.x, 1); diff --git a/js/src/jit-test/tests/closures/bug684489.js b/js/src/jit-test/tests/closures/bug684489.js new file mode 100644 index 0000000000..ab44d5850f --- /dev/null +++ b/js/src/jit-test/tests/closures/bug684489.js @@ -0,0 +1,2 @@ +"use strict"; +eval("var x = {}; ({p: function() { x.m; }}).p();"); diff --git a/js/src/jit-test/tests/closures/closure-pluseq.js b/js/src/jit-test/tests/closures/closure-pluseq.js new file mode 100644 index 0000000000..ccf5c82709 --- /dev/null +++ b/js/src/jit-test/tests/closures/closure-pluseq.js @@ -0,0 +1,31 @@ +actual = ''; +expected = '3,6,9,12,15,18,'; + +function slice(a, b) +{ + //return { x: a + ':' + b }; + return b; +} + +function f() +{ + var length = 20; + var index = 0; + + function get3() { + //appendToActual("get3 " + index); + if (length - index < 3) + return null; + return slice(index, index += 3); + } + + var bytes = null; + while (bytes = get3()) { + appendToActual(bytes); + } +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/closure-pluseq2.js b/js/src/jit-test/tests/closures/closure-pluseq2.js new file mode 100644 index 0000000000..bab2df6d8a --- /dev/null +++ b/js/src/jit-test/tests/closures/closure-pluseq2.js @@ -0,0 +1,30 @@ +actual = ''; +expected = '3,6,9,12,15,18,'; + +function slice(a, b) +{ + //return { x: a + ':' + b }; + return b; +} + +function f(index) +{ + var length = 20; + + function get3() { + //appendToActual("get3 " + index); + if (length - index < 3) + return null; + return slice(index, index += 3); + } + + var bytes = null; + while (bytes = get3()) { + appendToActual(bytes); + } +} + +f(0); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/closure-plusplus.js b/js/src/jit-test/tests/closures/closure-plusplus.js new file mode 100644 index 0000000000..c6f35352d8 --- /dev/null +++ b/js/src/jit-test/tests/closures/closure-plusplus.js @@ -0,0 +1,31 @@ +actual = ''; +expected = '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,'; + +function slice(a, b) +{ + //return { x: a + ':' + b }; + return b; +} + +function f() +{ + var length = 20; + var index = 0; + + function get3() { + //appendToActual("get3 " + index); + if (length - index < 3) + return null; + return slice(index, ++index); + } + + var bytes = null; + while (bytes = get3()) { + appendToActual(bytes); + } +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/closure-tests.js b/js/src/jit-test/tests/closures/closure-tests.js new file mode 100644 index 0000000000..4ec09e9f79 --- /dev/null +++ b/js/src/jit-test/tests/closures/closure-tests.js @@ -0,0 +1,6 @@ +actual = ''; +expected = ''; + + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/flat-closure-1.js b/js/src/jit-test/tests/closures/flat-closure-1.js new file mode 100644 index 0000000000..3ac9b5ad11 --- /dev/null +++ b/js/src/jit-test/tests/closures/flat-closure-1.js @@ -0,0 +1,18 @@ +actual = ''; +expected = '0,1,2,3,4,'; + +function g(a) { +} + +function f(y) { + var q; + q = function() { appendToActual(y); }; + q(); +} + +for (var i = 0; i < 5; ++i) { + f(i); + } + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/flat-closure-7.js b/js/src/jit-test/tests/closures/flat-closure-7.js new file mode 100644 index 0000000000..5e2a7be3b7 --- /dev/null +++ b/js/src/jit-test/tests/closures/flat-closure-7.js @@ -0,0 +1,15 @@ +actual = ''; +expected = '0 0 0 0 0 0 0 0 0,'; + + var o = []; + for (var a = 0; a < 9; ++a) { + var unused = 0; + let zero = 0; + for (var ee = 0; ee < 1; ++ee) { + o.push((function () { return zero; })()); + } + } + appendToActual(o.join(" ")); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/flat-closure-8.js b/js/src/jit-test/tests/closures/flat-closure-8.js new file mode 100644 index 0000000000..fb719b0f2a --- /dev/null +++ b/js/src/jit-test/tests/closures/flat-closure-8.js @@ -0,0 +1,19 @@ +actual = ''; +expected = 'nocrash,'; + +function b(a) { +} + +function f(y) { + function q() { b(y); }; + q(); +} + +for (var i = 0; i < 1000; ++i) { + f(i); + } + +appendToActual('nocrash') + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/lambda-inner-heavy.js b/js/src/jit-test/tests/closures/lambda-inner-heavy.js new file mode 100644 index 0000000000..eba73cb645 --- /dev/null +++ b/js/src/jit-test/tests/closures/lambda-inner-heavy.js @@ -0,0 +1,32 @@ +actual = ''; +expected = '0,0,0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,'; + +function g(a) { + a(); +} + +function n() { +} + +function f(y) { + for (var i = 0; i < 7; ++i) { + var q; + q = function() { + appendToActual(y); + + var m = 1; + var z = function() { + appendToActual(m); + } + m = 2; + }; + g(q); + } +} + +for (var i = 0; i < 5; ++i) { + f(i); + } + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/lambda-light-returned.js b/js/src/jit-test/tests/closures/lambda-light-returned.js new file mode 100644 index 0000000000..75541baab8 --- /dev/null +++ b/js/src/jit-test/tests/closures/lambda-light-returned.js @@ -0,0 +1,25 @@ +actual = ''; +expected = '1,'; + +function createCounter() { + var i = 0; + + var counter = function() { + return ++i; + } + + return counter; +} + +function f() { + var counter; + for (var i = 0; i < 100; ++i) { + counter = createCounter(); + } + appendToActual(counter()); +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/lambda-light.js b/js/src/jit-test/tests/closures/lambda-light.js new file mode 100644 index 0000000000..933da605ee --- /dev/null +++ b/js/src/jit-test/tests/closures/lambda-light.js @@ -0,0 +1,19 @@ +actual = ''; +expected = '10,'; + +function f(x) { + { + let x2 = 10; + for (var i = 0; i < 5; ++i) { + var g = function () { + appendToActual(x2); + }; + } + g(); + } +} + +f(1); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/lambda.js b/js/src/jit-test/tests/closures/lambda.js new file mode 100644 index 0000000000..7a90fdf77f --- /dev/null +++ b/js/src/jit-test/tests/closures/lambda.js @@ -0,0 +1,22 @@ +function f() { + var k = 0; + + var g = function() { + return ++k; + } + + return g; +} + +function h() { + for (var i = 0; i < 10; ++i) { + var vf = f(); + assertEq(vf(), 1); + assertEq(vf(), 2); + for (var j = 0; j < 10; ++j) { + assertEq(vf(), j + 3); + } + } +} + +h(); diff --git a/js/src/jit-test/tests/closures/lambdafc.js b/js/src/jit-test/tests/closures/lambdafc.js new file mode 100644 index 0000000000..03fc5ed2c0 --- /dev/null +++ b/js/src/jit-test/tests/closures/lambdafc.js @@ -0,0 +1,25 @@ +actual = ''; +expected = '99,'; + +function g(p) { + appendToActual(p()); +} + +function d(k) { + return function() { return k; } +} + +function f(k) { + var p; + + for (var i = 0; i < 1000; ++i) { + p = d(k); + } + + g(p); +} + +f(99); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/name-both-hvy.js b/js/src/jit-test/tests/closures/name-both-hvy.js new file mode 100644 index 0000000000..6943e64d60 --- /dev/null +++ b/js/src/jit-test/tests/closures/name-both-hvy.js @@ -0,0 +1,28 @@ +actual = ''; +expected = ''; + +// do not crash + +function q() { +} + +function f() { + var j = 12; + + function g() { + eval(""); // makes |g| heavyweight + for (var i = 0; i < 3; ++i) { + j; + } + } + + j = 13; + q(g); // escaping |g| makes |f| heavyweight + g(); + j = 14; +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/name-inactive-missing.js b/js/src/jit-test/tests/closures/name-inactive-missing.js new file mode 100644 index 0000000000..a0f68486a7 --- /dev/null +++ b/js/src/jit-test/tests/closures/name-inactive-missing.js @@ -0,0 +1,14 @@ +// |jit-test| error: ReferenceError + +function f(k) { + function g(j) { + return j + q; + } + return g; +} + +g = f(10); +var ans = ''; +for (var i = 0; i < 5; ++i) { + ans += g(i) + ','; +} diff --git a/js/src/jit-test/tests/closures/name.js b/js/src/jit-test/tests/closures/name.js new file mode 100644 index 0000000000..498083f941 --- /dev/null +++ b/js/src/jit-test/tests/closures/name.js @@ -0,0 +1,25 @@ +actual = ''; +expected = '2,5,'; + +function loop(f) { + var p; + for (var i = 0; i < 10; ++i) { + p = f(); + } + return p; +} + +function f(i, k) { + var g = function() { return k; } + + k = 2; + appendToActual(loop(g)); + k = 5; + appendToActual(loop(g)); +} + +f(0, 0); + + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/name2.js b/js/src/jit-test/tests/closures/name2.js new file mode 100644 index 0000000000..127b097dc0 --- /dev/null +++ b/js/src/jit-test/tests/closures/name2.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '0,1,2,3,4,'; + +function loop(f) { + var p; + for (var i = 0; i < 10; ++i) { + p = f(); + } + return p; +} + +function f(j, k) { + var g = function() { return k; } + + for (k = 0; k < 5; ++k) { + appendToActual(loop(g)); + } +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/name2a.js b/js/src/jit-test/tests/closures/name2a.js new file mode 100644 index 0000000000..34f1d0ea41 --- /dev/null +++ b/js/src/jit-test/tests/closures/name2a.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '0,1,2,3,4,'; + +function loop(f) { + var p; + for (var i = 0; i < 10; ++i) { + p = f(1, 2, 3); + } + return p; +} + +function f(j, k) { + var g = function(a, b, c) { return k; } + + for (k = 0; k < 5; ++k) { + appendToActual(loop(g)); + } +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/name2b.js b/js/src/jit-test/tests/closures/name2b.js new file mode 100644 index 0000000000..b07b02b057 --- /dev/null +++ b/js/src/jit-test/tests/closures/name2b.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '0,1,2,3,4,'; + +function loop(f) { + var p; + for (var i = 0; i < 10; ++i) { + p = f(1, 2, 3); + } + return p; +} + +function f(j, k) { + var g = function(a, b, c) { return k; } + + for (k = 0; k < 5; ++k) { + appendToActual(loop(g)); + } +} + +f(1); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/name3.js b/js/src/jit-test/tests/closures/name3.js new file mode 100644 index 0000000000..228dfaac41 --- /dev/null +++ b/js/src/jit-test/tests/closures/name3.js @@ -0,0 +1,24 @@ +actual = ''; +expected = '0,1,2,3,4,'; + +function loop(f) { + var p; + for (var i = 0; i < 10; ++i) { + p = f(); + } + return p; +} + +function f(j, k) { + var g = function() { return k; } + + k = j; + appendToActual(loop(g)); +} + +for (var i = 0; i < 5; ++i) { + f(i); +} + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/name4.js b/js/src/jit-test/tests/closures/name4.js new file mode 100644 index 0000000000..596028e593 --- /dev/null +++ b/js/src/jit-test/tests/closures/name4.js @@ -0,0 +1,22 @@ +actual = ''; +expected = 'undefined,'; + +function loop(f) { + var p; + for (var i = 0; i < 10; ++i) { + p = f(); + } + return p; +} + +function make(k, j) { + var g = function() { return k; } + k = j; + return g; +} + +var f = make(); +appendToActual(loop(f)); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/namedLambda.js b/js/src/jit-test/tests/closures/namedLambda.js new file mode 100644 index 0000000000..4be0c44c4c --- /dev/null +++ b/js/src/jit-test/tests/closures/namedLambda.js @@ -0,0 +1,17 @@ +// This just tests that named lambdas don't crash in the tracer. + +var f = function ff() { + var k = 0; + var counter = function q() { + return ++k; + } + return counter; +} + +function g() { + for (var i = 0; i < 10; ++i) { + f(); + } +} + +g(); diff --git a/js/src/jit-test/tests/closures/nameinc-loop-2.js b/js/src/jit-test/tests/closures/nameinc-loop-2.js new file mode 100644 index 0000000000..1753f26899 --- /dev/null +++ b/js/src/jit-test/tests/closures/nameinc-loop-2.js @@ -0,0 +1,26 @@ +actual = ''; +expected = '1,2,3,4,5,5,undefined,1,2,3,4,5,5,undefined,1,2,3,4,5,5,undefined,1,2,3,4,5,5,undefined,1,2,3,4,5,5,undefined,'; + +var f = function() { + var p = 0; + + function g() { + for (var i = 0; i < 5; ++i) { + p++; + appendToActual(p); + } + } + + g(); + + appendToActual(p); +} + +for (var i = 0; i < 5; ++i) { + f(); + appendToActual(); +} + + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/nameinc-loop-3.js b/js/src/jit-test/tests/closures/nameinc-loop-3.js new file mode 100644 index 0000000000..08a7d56ff2 --- /dev/null +++ b/js/src/jit-test/tests/closures/nameinc-loop-3.js @@ -0,0 +1,33 @@ +actual = ''; +expected = 'g 1 0,g 2 -1,g 3 -2,g 4 -3,g 5 -4,h 5 -5,f 5,undefined,g 1 0,g 2 -1,g 3 -2,g 4 -3,g 5 -4,h 5 -5,f 5,undefined,g 1 0,g 2 -1,g 3 -2,g 4 -3,g 5 -4,h 5 -5,f 5,undefined,g 1 0,g 2 -1,g 3 -2,g 4 -3,g 5 -4,h 5 -5,f 5,undefined,g 1 0,g 2 -1,g 3 -2,g 4 -3,g 5 -4,h 5 -5,f 5,undefined,'; + +var f = function() { + var p = 0; + + function h() { + var q = 0; + + function g() { + for (var i = 0; i < 5; ++i) { + p++; + appendToActual('g ' + p + ' ' + q); + q--; + } + } + g(); + appendToActual('h ' + p + ' ' + q); + } + + h(); + + appendToActual('f ' + p); +} + +for (var i = 0; i < 5; ++i) { + f(); + appendToActual(); +} + + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/nameinc-loop-missing-2.js b/js/src/jit-test/tests/closures/nameinc-loop-missing-2.js new file mode 100644 index 0000000000..c37b3cc659 --- /dev/null +++ b/js/src/jit-test/tests/closures/nameinc-loop-missing-2.js @@ -0,0 +1,19 @@ +// |jit-test| error: ReferenceError + +for (var i = 0; i < 10; ++i) { + var f = function() { + var p = 0; + + function g() { + for (var i = 0; i < 5; ++i) { + x += 5; + } + } + + g(); + + print(p); + } + f(); +} + diff --git a/js/src/jit-test/tests/closures/nameinc-loop-missing.js b/js/src/jit-test/tests/closures/nameinc-loop-missing.js new file mode 100644 index 0000000000..72eae0e40d --- /dev/null +++ b/js/src/jit-test/tests/closures/nameinc-loop-missing.js @@ -0,0 +1,21 @@ +// |jit-test| error: ReferenceError + +for (var i = 0; i < 10; ++i) { + var f = function() { + var p = 0; + + function g() { + for (var i = 0; i < 5; ++i) { + p++; + x++; + print(p); + } + } + + g(); + + print(p); + } + f(); +} + diff --git a/js/src/jit-test/tests/closures/nameinc-loop.js b/js/src/jit-test/tests/closures/nameinc-loop.js new file mode 100644 index 0000000000..33c89d12e5 --- /dev/null +++ b/js/src/jit-test/tests/closures/nameinc-loop.js @@ -0,0 +1,24 @@ +actual = ''; +expected = '1,2,3,4,5,5,1,2,3,4,5,5,1,2,3,4,5,5,1,2,3,4,5,5,1,2,3,4,5,5,1,2,3,4,5,5,1,2,3,4,5,5,1,2,3,4,5,5,1,2,3,4,5,5,1,2,3,4,5,5,'; + +for (var i = 0; i < 10; ++i) { + var f = function() { + var p = 0; + + function g() { + for (var i = 0; i < 5; ++i) { + p++; + appendToActual(p); + } + } + + g(); + + appendToActual(p); + } + f(); +} + + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/nameinc.js b/js/src/jit-test/tests/closures/nameinc.js new file mode 100644 index 0000000000..6909908913 --- /dev/null +++ b/js/src/jit-test/tests/closures/nameinc.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '5,'; + +function f() { + var p = 0; + + function g() { + for (var i = 0; i < 5; ++i) { + p++; + } + } + + g(); + + appendToActual(p); +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/set-outer-trace-1.js b/js/src/jit-test/tests/closures/set-outer-trace-1.js new file mode 100644 index 0000000000..034a0e1974 --- /dev/null +++ b/js/src/jit-test/tests/closures/set-outer-trace-1.js @@ -0,0 +1,24 @@ +actual = ''; +expected = '10,19,128,337,646,1055,1564,2173,2882,3691,4600,'; + +function f() { + var x = 10; + + var g = function(p) { + for (var i = 0; i < 10; ++i) { + x = p + i; + } + } + + for (var i = 0; i < 10; ++i) { + appendToActual(x); + g(100 * i + x); + } + + appendToActual(x); +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/set-outer-trace-2.js b/js/src/jit-test/tests/closures/set-outer-trace-2.js new file mode 100644 index 0000000000..49b98aa9e4 --- /dev/null +++ b/js/src/jit-test/tests/closures/set-outer-trace-2.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '10,19,100199,2001001999,30020010019999,400300200100199999,5004003002001001999999,60050040030020010019999999,700600500400300200100199999999,8007006005004003002001001999999999,90080070060050040030020010019999999999,'; + +function f() { + var x = 10; + + var g = function(p) { + for (var i = 0; i < 10; ++i) + x = p + i + ''; + } + + for (var i = 0; i < 10; ++i) { + appendToActual(x); + g(100 * i + x); + } + + appendToActual(x); +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/set-outer-trace-3.js b/js/src/jit-test/tests/closures/set-outer-trace-3.js new file mode 100644 index 0000000000..458968fb38 --- /dev/null +++ b/js/src/jit-test/tests/closures/set-outer-trace-3.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '10.5,19.5,128.5,337.5,646.5,1055.5,1564.5,2173.5,2882.5,3691.5,4600.5,'; + +function f() { + var x = 10.5; + + var g = function(p) { + for (var i = 0; i < 10; ++i) + x = p + i; + } + + for (var i = 0; i < 10; ++i) { + appendToActual(x); + g(100 * i + x); + } + + appendToActual(x); +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/set-outer-trace-4.js b/js/src/jit-test/tests/closures/set-outer-trace-4.js new file mode 100644 index 0000000000..c15f3c2e16 --- /dev/null +++ b/js/src/jit-test/tests/closures/set-outer-trace-4.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '10,19,1000028,3000037,6000046,10000055,15000064,21000073,28000082,36000091,45000100,'; + +function f() { + var x = 10; + + var g = function(p) { + for (var i = 0; i < 10; ++i) + x = p + i; + } + + for (var i = 0; i < 10; ++i) { + appendToActual(x); + g(1000000 * i + x); + } + + appendToActual(x); +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/set-outer-trace.js b/js/src/jit-test/tests/closures/set-outer-trace.js new file mode 100644 index 0000000000..f3eb8b8f5d --- /dev/null +++ b/js/src/jit-test/tests/closures/set-outer-trace.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '10,20,30,40,50,60,70,80,90,100,110,'; + +function f() { + var x = 10; + + var g = function(p) { + for (var i = 0; i < 10; ++i) + x++; + } + + for (var i = 0; i < 10; ++i) { + appendToActual(x); + g(100 * i + x); + } + + appendToActual(x); +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/setname-1.js b/js/src/jit-test/tests/closures/setname-1.js new file mode 100644 index 0000000000..63e3be3f4a --- /dev/null +++ b/js/src/jit-test/tests/closures/setname-1.js @@ -0,0 +1,26 @@ +actual = ''; +expected = '4,4,4,4,4,'; + +function f() { + var k = 0; + + function g() { + for (var i = 0; i < 5; ++i) { + k = i; + } + } + + function h() { + for (var i = 0; i < 5; ++i) { + appendToActual(k); + } + } + + g(); + h(); +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/setname-closure-2.js b/js/src/jit-test/tests/closures/setname-closure-2.js new file mode 100644 index 0000000000..b5e30ab2c4 --- /dev/null +++ b/js/src/jit-test/tests/closures/setname-closure-2.js @@ -0,0 +1,27 @@ +actual = ''; +expected = '16,'; + +var f = function() { + var p = 1; + + function g() { + for (var i = 0; i < 5; ++i) { + p = i * i; + } + } + + function h() { + appendToActual(p); + } + + return [g, h]; +}; + +var [ g,h ] = f(); +for (var i = 0; i < 5; ++i) { + g(); +} +h(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/setname-closure.js b/js/src/jit-test/tests/closures/setname-closure.js new file mode 100644 index 0000000000..fd450dd843 --- /dev/null +++ b/js/src/jit-test/tests/closures/setname-closure.js @@ -0,0 +1,25 @@ +actual = ''; +expected = '2,4,8,16,32,undefined,64,128,256,512,1024,undefined,2048,4096,8192,16384,32768,undefined,65536,131072,262144,524288,1048576,undefined,2097152,4194304,8388608,16777216,33554432,undefined,'; + +var f = function() { + var p = 1; + + function g() { + for (var i = 0; i < 5; ++i) { + p = p * 2; + appendToActual(p); + } + } + + return g; +} + +var g = f(); +for (var i = 0; i < 5; ++i) { + g(); + appendToActual(); +} + + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/setname-inner-heavy.js b/js/src/jit-test/tests/closures/setname-inner-heavy.js new file mode 100644 index 0000000000..cf66c61d39 --- /dev/null +++ b/js/src/jit-test/tests/closures/setname-inner-heavy.js @@ -0,0 +1,18 @@ +actual = ''; +expected = 'undefined,'; + +function f() { + (eval("\ + (function () {\ + for (var z = 0; z < 2; ++z) {\ + x = ''\ + }\ + })\ + "))(); +} +this.__defineSetter__("x", eval) +f() +appendToActual(x); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/setname-loop-2.js b/js/src/jit-test/tests/closures/setname-loop-2.js new file mode 100644 index 0000000000..82adb07fd9 --- /dev/null +++ b/js/src/jit-test/tests/closures/setname-loop-2.js @@ -0,0 +1,29 @@ +actual = ''; +expected = '2,4,8,16,32,32,undefined,2,4,8,16,32,32,undefined,2,4,8,16,32,32,undefined,2,4,8,16,32,32,undefined,2,4,8,16,32,32,undefined,'; + +var f = function() { + var p = 1; + + function h() { + function g() { + for (var i = 0; i < 5; ++i) { + p = p * 2; + appendToActual(p); + } + } + g(); + } + + h(); + + appendToActual(p); +} + +for (var i = 0; i < 5; ++i) { + f(); + appendToActual(); +} + + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/setname-loop.js b/js/src/jit-test/tests/closures/setname-loop.js new file mode 100644 index 0000000000..5aa3b17d01 --- /dev/null +++ b/js/src/jit-test/tests/closures/setname-loop.js @@ -0,0 +1,26 @@ +actual = ''; +expected = '2,4,8,16,32,32,undefined,2,4,8,16,32,32,undefined,2,4,8,16,32,32,undefined,2,4,8,16,32,32,undefined,2,4,8,16,32,32,undefined,'; + +var f = function() { + var p = 1; + + function g() { + for (var i = 0; i < 5; ++i) { + p = p * 2; + appendToActual(p); + } + } + + g(); + + appendToActual(p); +} + +for (var i = 0; i < 5; ++i) { + f(); + appendToActual(); +} + + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/setname-no-pop.js b/js/src/jit-test/tests/closures/setname-no-pop.js new file mode 100644 index 0000000000..c07d81b8a9 --- /dev/null +++ b/js/src/jit-test/tests/closures/setname-no-pop.js @@ -0,0 +1,16 @@ +actual = ''; +expected = ''; + +(function () { + var y; + (eval("(function () {\ + for (var x = 0; x < 3; ++x) {\ + ''.replace(/a/, (y = 3))\ + }\ + });\ + "))() +})() + + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t001.js b/js/src/jit-test/tests/closures/t001.js new file mode 100644 index 0000000000..33530045a4 --- /dev/null +++ b/js/src/jit-test/tests/closures/t001.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '4,4,4,'; + +function k(f_arg) { + for (var i = 0; i < 5; ++i) { + f_arg(i); + } +} + +function t() { + var x = 1; + k(function (i) { x = i; }); + appendToActual(x); +} + +t(); +t(); +t(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t002.js b/js/src/jit-test/tests/closures/t002.js new file mode 100644 index 0000000000..77e8178381 --- /dev/null +++ b/js/src/jit-test/tests/closures/t002.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '54,54,54,'; + +function k(a, f_arg, b, c) { + for (var i = 0; i < 5; ++i) { + f_arg(i + a); + } +} + +function t() { + var x = 1; + k(50, function (i) { x = i; }, 100, 200); + appendToActual(x); +} + +t(); +t(); +t(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t003.js b/js/src/jit-test/tests/closures/t003.js new file mode 100644 index 0000000000..4cbf6cf34b --- /dev/null +++ b/js/src/jit-test/tests/closures/t003.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '54,54,54,'; + +function k(a, b, f_arg, c) { + for (var i = 0; i < 5; ++i) { + f_arg(i + a); + } +} + +function t(a, b) { + var x = 1; + k(50, 100, function (i) { x = i; }, 200); + appendToActual(x); +} + +t(1); +t(2, 3); +t(4, 5, 6); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t004.js b/js/src/jit-test/tests/closures/t004.js new file mode 100644 index 0000000000..de430eb6b3 --- /dev/null +++ b/js/src/jit-test/tests/closures/t004.js @@ -0,0 +1,21 @@ +actual = ''; +expected = 'NaN,60,74,'; + +function k(a, b, f_arg, c) { + for (var i = 0; i < 5; ++i) { + f_arg(i + a); + } +} + +function t(a, b) { + var x = 1; + k(50, 100, function (i) { x = i + a * b; }, 100, 200); + appendToActual(x); +} + +t(1); +t(2, 3); +t(4, 5, 6); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t005.js b/js/src/jit-test/tests/closures/t005.js new file mode 100644 index 0000000000..a5be41fe82 --- /dev/null +++ b/js/src/jit-test/tests/closures/t005.js @@ -0,0 +1,24 @@ +actual = ''; +expected = '4,'; + +function k(f_arg) { + for (var i = 0; i < 5; ++i) { + f_arg(i); + } +} + +function t() { + var x = 1; + + function u() { + k(function (i) { x = i; }); + appendToActual(x); + } + + u(); +} + +t(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t006.js b/js/src/jit-test/tests/closures/t006.js new file mode 100644 index 0000000000..67052744d4 --- /dev/null +++ b/js/src/jit-test/tests/closures/t006.js @@ -0,0 +1,22 @@ +actual = ''; +expected = '2,'; + +function k(f_arg) { + (function() { + for (var i = 0; i < 10; ++i) { + f_arg(); + } + })(); +} + +function t() { + var x = 1; + k(function () { x = 2; }); + appendToActual(x); +} + +t(); + + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t007.js b/js/src/jit-test/tests/closures/t007.js new file mode 100644 index 0000000000..1d745a3b5a --- /dev/null +++ b/js/src/jit-test/tests/closures/t007.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '0,1,2,3,4,5,6,7,8,9,'; + +function k(f_arg) { + for (var i = 0; i < 10; ++i) { + f_arg(i); + } +} + +function t() { + var x = 1; + k(function (i) { x = i; }); + appendToActual(i); +} + +for (var i = 0; i < 10; ++i) { + t(); +} + + + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t008.js b/js/src/jit-test/tests/closures/t008.js new file mode 100644 index 0000000000..2e5f833d7d --- /dev/null +++ b/js/src/jit-test/tests/closures/t008.js @@ -0,0 +1,26 @@ +actual = ''; +expected = '900,'; + +function k(f_arg) { + for (var i = 0; i < 10; ++i) { + f_arg(i); + } +} + +function t() { + var x = 1; + k(function (i) { x = i; }); + return x; +} + +var ans = 0; +for (var j = 0; j < 10; ++j) { + for (var i = 0; i < 10; ++i) { + ans += t(); + } +} +appendToActual(ans); + + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t009.js b/js/src/jit-test/tests/closures/t009.js new file mode 100644 index 0000000000..02acc9a98e --- /dev/null +++ b/js/src/jit-test/tests/closures/t009.js @@ -0,0 +1,18 @@ +actual = ''; +expected = '4,'; + +function k(f_arg) { + for (var i = 0; i < 5; ++i) { + f_arg(i); + } +} + +function t(x) { + k(function (i) { x = i; }); + appendToActual(x); +} + +t(1); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t010.js b/js/src/jit-test/tests/closures/t010.js new file mode 100644 index 0000000000..be45e78ec4 --- /dev/null +++ b/js/src/jit-test/tests/closures/t010.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '101,'; + +function looper(f) { + for (var i = 0; i < 10; ++i) { + for (var j = 0; j < 10; ++j) { + f(); + } + } +} + +function tester() { + var x = 1; + looper(function() { ++x; }); + return x; +} + +appendToActual(tester()); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t011.js b/js/src/jit-test/tests/closures/t011.js new file mode 100644 index 0000000000..3ac9b5ad11 --- /dev/null +++ b/js/src/jit-test/tests/closures/t011.js @@ -0,0 +1,18 @@ +actual = ''; +expected = '0,1,2,3,4,'; + +function g(a) { +} + +function f(y) { + var q; + q = function() { appendToActual(y); }; + q(); +} + +for (var i = 0; i < 5; ++i) { + f(i); + } + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t012.js b/js/src/jit-test/tests/closures/t012.js new file mode 100644 index 0000000000..95936a7683 --- /dev/null +++ b/js/src/jit-test/tests/closures/t012.js @@ -0,0 +1,19 @@ +actual = ''; +expected = '0,1,2,3,4,'; + +function g(a) { + a(); +} + +function f(y) { + var q; + q = function() { appendToActual(y); }; + g(q); +} + +for (var i = 0; i < 5; ++i) { + f(i); + } + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t013.js b/js/src/jit-test/tests/closures/t013.js new file mode 100644 index 0000000000..6a06af8b34 --- /dev/null +++ b/js/src/jit-test/tests/closures/t013.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '0,0,0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,'; + +function g(a) { + a(); +} + +function f(y) { + for (var i = 0; i < 7; ++i) { + var q; + q = function() { appendToActual(y); }; + g(q); + } +} + +for (var i = 0; i < 5; ++i) { + f(i); + } + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t014.js b/js/src/jit-test/tests/closures/t014.js new file mode 100644 index 0000000000..9e2b96b215 --- /dev/null +++ b/js/src/jit-test/tests/closures/t014.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '0,0,0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,'; + +function g(a) { + a(); +} + +function f(y) { + var q; + q = function() { appendToActual(y); }; + for (var i = 0; i < 7; ++i) { + g(q); + } +} + +for (var i = 0; i < 5; ++i) { + f(i); + } + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t015.js b/js/src/jit-test/tests/closures/t015.js new file mode 100644 index 0000000000..2d5005c858 --- /dev/null +++ b/js/src/jit-test/tests/closures/t015.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '0,1,2,3,4,'; + +function g(a) { + a(); +} + +function f(y) { + var q; + for (var i = 0; i < 7; ++i) { + q = function() { appendToActual(y); }; + } + g(q); +} + +for (var i = 0; i < 5; ++i) { + f(i); + } + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t016.js b/js/src/jit-test/tests/closures/t016.js new file mode 100644 index 0000000000..1eac8c17d4 --- /dev/null +++ b/js/src/jit-test/tests/closures/t016.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,'; + +function g(a) { + for (var i = 0; i < 3; ++i) { + a(); + } +} + +function f(y) { + var q; + for (var i = 0; i < 7; ++i) { + q = function() { appendToActual(y); }; + } + g(q); +} + +for (var i = 0; i < 5; ++i) { + f(i); + } + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t017.js b/js/src/jit-test/tests/closures/t017.js new file mode 100644 index 0000000000..92acf013de --- /dev/null +++ b/js/src/jit-test/tests/closures/t017.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,'; + +function g(a) { + for (var i = 0; i < 3; ++i) { + a(); + } +} + +function f(y) { + var q; + for (var i = 0; i < 7; ++i) { + q = function() { appendToActual(y); }; + g(q); + } +} + +for (var i = 0; i < 5; ++i) { + f(i); + } + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t020.js b/js/src/jit-test/tests/closures/t020.js new file mode 100644 index 0000000000..30c8b463df --- /dev/null +++ b/js/src/jit-test/tests/closures/t020.js @@ -0,0 +1,17 @@ +actual = ''; +expected = '0,0,1,1,2,2,3,3,'; + +{ let f = function() { + for (let x = 0; x < 4; ++x) { + (function() { + for (let y = 0; y < 2; ++y) { + appendToActual(x); + } + })() + } +}; + f(0) +} + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t021.js b/js/src/jit-test/tests/closures/t021.js new file mode 100644 index 0000000000..62052383b1 --- /dev/null +++ b/js/src/jit-test/tests/closures/t021.js @@ -0,0 +1,18 @@ +actual = ''; +expected = 'nocrash,'; + +var v = {}; + +function a() { + var o = 3; + v.f = function() { return o; }; +} + +for (i = 0; i < 6; i++) + new a; + + +appendToActual('nocrash') + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t022.js b/js/src/jit-test/tests/closures/t022.js new file mode 100644 index 0000000000..20d73babbe --- /dev/null +++ b/js/src/jit-test/tests/closures/t022.js @@ -0,0 +1,24 @@ +actual = ''; +expected = 'nocrash,'; + +function jQuery(a, c) { +} +jQuery.fn = {}; +(function() { + var e = +["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"]; + for (var i = 0; i < e.length; i++) { + new function() { + var o = e[i]; + jQuery.fn[o] = function(f) { + return this.bind(o, f); + } + }; + } +})(); + + +appendToActual('nocrash') + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t023.js b/js/src/jit-test/tests/closures/t023.js new file mode 100644 index 0000000000..0cddac3752 --- /dev/null +++ b/js/src/jit-test/tests/closures/t023.js @@ -0,0 +1,17 @@ +actual = ''; +expected = '0,1,2,0,1,2,'; + +for (var a = 0; a < 2; ++a) { + for (var b = 0; b < 3; ++b) { + (function (x) { + (function () { + for (var c = 0; c < 1; ++c) { + appendToActual(x); + } + })(); + })(b); + } +} + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t024.js b/js/src/jit-test/tests/closures/t024.js new file mode 100644 index 0000000000..fc874c63d8 --- /dev/null +++ b/js/src/jit-test/tests/closures/t024.js @@ -0,0 +1,19 @@ +actual = ''; +expected = '787878,'; + +var q = []; +for (var a = 0; a < 3; ++a) { + (function () { + for (var b = 7; b < 9; ++b) { + (function () { + for (var c = 0; c < 1; ++c) { + q.push(b); + } + })(); + } + })(); +} +appendToActual(q.join("")); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t025.js b/js/src/jit-test/tests/closures/t025.js new file mode 100644 index 0000000000..5adb253b55 --- /dev/null +++ b/js/src/jit-test/tests/closures/t025.js @@ -0,0 +1,26 @@ +actual = ''; +expected = '2,5,'; + +function loop(f) { + var p; + for (var i = 0; i < 1000; ++i) { + p = f(); + } + return p; +} + +function f(k) { + function g() { + return k; + } + + k = 2; + appendToActual(loop(g)); + k = 5; + appendToActual(loop(g)); +} + +f(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t026.js b/js/src/jit-test/tests/closures/t026.js new file mode 100644 index 0000000000..12063a7501 --- /dev/null +++ b/js/src/jit-test/tests/closures/t026.js @@ -0,0 +1,22 @@ +actual = ''; +expected = '101,nocrash,'; + +function looper(f) { + for (var i = 0; i < 10; ++i) { + for (var j = 0; j < 10; ++j) { + f(); + } + } +} + +function tester() { + var x = 1; + looper(function() { ++x; }); + return x; +} + +appendToActual(tester()); +appendToActual("nocrash"); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t027.js b/js/src/jit-test/tests/closures/t027.js new file mode 100644 index 0000000000..423fb52a02 --- /dev/null +++ b/js/src/jit-test/tests/closures/t027.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '99,'; + +function looper(f) { + for (var i = 0; i < 10; ++i) { + for (var j = 0; j < 10; ++j) { + f(10*i + j); + } + } +} + +function tester() { + var x = 1; + looper(function(y) { x = y; }); + return x; +} + +appendToActual(tester()); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t028.js b/js/src/jit-test/tests/closures/t028.js new file mode 100644 index 0000000000..b1a6d3a62d --- /dev/null +++ b/js/src/jit-test/tests/closures/t028.js @@ -0,0 +1,23 @@ +actual = ''; +expected = 'undefined,'; + +function looper(f) { + for (var i = 0; i < 10; ++i) { + for (var j = 0; j < 10; ++j) { + f(); + } + } +} + +function tester() { + var x = 1; + function f() { + return x; + } + looper(f); +} + +appendToActual(tester()); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t029.js b/js/src/jit-test/tests/closures/t029.js new file mode 100644 index 0000000000..be45e78ec4 --- /dev/null +++ b/js/src/jit-test/tests/closures/t029.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '101,'; + +function looper(f) { + for (var i = 0; i < 10; ++i) { + for (var j = 0; j < 10; ++j) { + f(); + } + } +} + +function tester() { + var x = 1; + looper(function() { ++x; }); + return x; +} + +appendToActual(tester()); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t030.js b/js/src/jit-test/tests/closures/t030.js new file mode 100644 index 0000000000..e0b2b643a1 --- /dev/null +++ b/js/src/jit-test/tests/closures/t030.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '2,'; + +function looper(f) { + for (var i = 0; i < 10; ++i) { + for (var j = 0; j < 10; ++j) { + f(); + } + } +} + +function tester() { + var x = 1; + looper(function() { x = 2; }); + return x; +} + +appendToActual(tester()); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t031.js b/js/src/jit-test/tests/closures/t031.js new file mode 100644 index 0000000000..33530045a4 --- /dev/null +++ b/js/src/jit-test/tests/closures/t031.js @@ -0,0 +1,21 @@ +actual = ''; +expected = '4,4,4,'; + +function k(f_arg) { + for (var i = 0; i < 5; ++i) { + f_arg(i); + } +} + +function t() { + var x = 1; + k(function (i) { x = i; }); + appendToActual(x); +} + +t(); +t(); +t(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t032.js b/js/src/jit-test/tests/closures/t032.js new file mode 100644 index 0000000000..a5be41fe82 --- /dev/null +++ b/js/src/jit-test/tests/closures/t032.js @@ -0,0 +1,24 @@ +actual = ''; +expected = '4,'; + +function k(f_arg) { + for (var i = 0; i < 5; ++i) { + f_arg(i); + } +} + +function t() { + var x = 1; + + function u() { + k(function (i) { x = i; }); + appendToActual(x); + } + + u(); +} + +t(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t033.js b/js/src/jit-test/tests/closures/t033.js new file mode 100644 index 0000000000..e030fbf3c2 --- /dev/null +++ b/js/src/jit-test/tests/closures/t033.js @@ -0,0 +1,19 @@ +actual = ''; +expected = '2,'; + +function k(f_arg) { + for (var i = 0; i < 100; ++i) { + f_arg(); + } +} + +function t() { + var x = 1; + k(function () { x = 2; }); + appendToActual(x); +} + +t(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t034.js b/js/src/jit-test/tests/closures/t034.js new file mode 100644 index 0000000000..060101ed09 --- /dev/null +++ b/js/src/jit-test/tests/closures/t034.js @@ -0,0 +1,20 @@ +actual = ''; +expected = ''; + +function k(f_arg) { + for (var i = 0; i < 10; ++i) { + f_arg(i); + } +} + +function t() { + var x = 1; + k(function (i) { x = i; }); +} + +for (var i = 0; i < 100; ++i) { + t(); +} + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t035.js b/js/src/jit-test/tests/closures/t035.js new file mode 100644 index 0000000000..02acc9a98e --- /dev/null +++ b/js/src/jit-test/tests/closures/t035.js @@ -0,0 +1,18 @@ +actual = ''; +expected = '4,'; + +function k(f_arg) { + for (var i = 0; i < 5; ++i) { + f_arg(i); + } +} + +function t(x) { + k(function (i) { x = i; }); + appendToActual(x); +} + +t(1); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t036.js b/js/src/jit-test/tests/closures/t036.js new file mode 100644 index 0000000000..9e26baff51 --- /dev/null +++ b/js/src/jit-test/tests/closures/t036.js @@ -0,0 +1,24 @@ +actual = ''; +expected = '77,77,'; + +var o = { + x: 11, + y: 13 +}; + +function g() { + with (o) { + var x = 77; + for (var i = 0; i < 5; ++i) { + var f = function() { appendToActual(x); } + } + f(); + } + + f(); +} + +g(); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/t037.js b/js/src/jit-test/tests/closures/t037.js new file mode 100644 index 0000000000..0350c51403 --- /dev/null +++ b/js/src/jit-test/tests/closures/t037.js @@ -0,0 +1,14 @@ +actual = ''; +expected = '7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,'; + +function heavy(s, t, u) {return eval(s)} + +for (var i = 0; i < 5; ++i) { + var flat = heavy("(function () {var x = t * t; return function(){return x + u}})()", 2, 3); + for (var j = 0; j < 5; ++j) { + appendToActual(flat()); + } + } + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/test-inner-imports.js b/js/src/jit-test/tests/closures/test-inner-imports.js new file mode 100644 index 0000000000..8e7e8d05fc --- /dev/null +++ b/js/src/jit-test/tests/closures/test-inner-imports.js @@ -0,0 +1,22 @@ +actual = ''; +expected = '0,0,2,2,4,4,6,6,8,8,'; + +function g(b) { + for (var i = 0; i < 10; ++i) { + } +} + +function f(xa_arg) { + var xa = xa_arg; + for (var i = 0; i < 5; ++i) { + var j = i + xa[i]; + appendToActual(j); + g(); + appendToActual(j); + } +} + +f([ 0, 1, 2, 3, 4 ]); + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/closures/upvar-nest.js b/js/src/jit-test/tests/closures/upvar-nest.js new file mode 100644 index 0000000000..13800111ce --- /dev/null +++ b/js/src/jit-test/tests/closures/upvar-nest.js @@ -0,0 +1,24 @@ +actual = ''; +expected = '0 0 1 1 2 2 3 3,0 0 1 1 2 2 3 3,0 0 1 1 2 2 3 3,0 0 1 1 2 2 3 3,0 0 1 1 2 2 3 3,1 2 2 3 3 4 4 5,1 2 2 3 3 4 4 5,1 2 2 3 3 4 4 5,1 2 2 3 3 4 4 5,1 2 2 3 3 4 4 5,2 4 3 5 4 6 5 7,2 4 3 5 4 6 5 7,2 4 3 5 4 6 5 7,2 4 3 5 4 6 5 7,2 4 3 5 4 6 5 7,3 6 4 7 5 8 6 9,3 6 4 7 5 8 6 9,3 6 4 7 5 8 6 9,3 6 4 7 5 8 6 9,3 6 4 7 5 8 6 9,4 8 5 9 6 10 7 11,4 8 5 9 6 10 7 11,4 8 5 9 6 10 7 11,4 8 5 9 6 10 7 11,4 8 5 9 6 10 7 11,'; + +function f(a, b) { + function g(x, y) { + function h(m, n) { + function k(u, v) { + for (var i = 0; i < 5; ++i) { + appendToActual(a + ' ' + b + ' ' + x + ' ' + y + ' ' + m + ' ' + n + ' ' + u + ' ' + v); + } + } + k(m+1, n+1); + } + h(x+1, y+1); + } + g(a+1, b+1); +} + +for (var i = 0; i < 5; ++i) { + f(i, i+i); +} + + +assertEq(actual, expected) diff --git a/js/src/jit-test/tests/collections/Array-of-1.js b/js/src/jit-test/tests/collections/Array-of-1.js new file mode 100644 index 0000000000..8dc5b7337a --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-1.js @@ -0,0 +1,15 @@ +// Array.of makes real arrays. + +function check(a) { + assertEq(Object.getPrototypeOf(a), Array.prototype); + assertEq(Array.isArray(a), true); + a[9] = 9; + assertEq(a.length, 10); +} + +check(Array.of()); +check(Array.of(0)); +check(Array.of(0, 1, 2)); + +var f = Array.of; +check(f()); diff --git a/js/src/jit-test/tests/collections/Array-of-2.js b/js/src/jit-test/tests/collections/Array-of-2.js new file mode 100644 index 0000000000..26836eaaf3 --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-2.js @@ -0,0 +1,14 @@ +// Array.of basics + +load(libdir + "asserts.js"); + +var a = Array.of(); +assertEq(a.length, 0); + +a = Array.of(undefined, null, 3.14, []); +assertDeepEq(a, [undefined, null, 3.14, []]); + +a = []; +for (var i = 0; i < 1000; i++) + a[i] = i; +assertDeepEq(Array.of.apply({}, a), a); diff --git a/js/src/jit-test/tests/collections/Array-of-3.js b/js/src/jit-test/tests/collections/Array-of-3.js new file mode 100644 index 0000000000..e2bcbff7a1 --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-3.js @@ -0,0 +1,8 @@ +// Array.of does not leave holes + +load(libdir + "asserts.js"); + +assertDeepEq(Array.of(undefined), [undefined]); +assertDeepEq(Array.of(undefined, undefined), [undefined, undefined]); +assertDeepEq(Array.of.apply(this, [,,undefined]), [undefined, undefined, undefined]); +assertDeepEq(Array.of.apply(this, Array(4)), [undefined, undefined, undefined, undefined]); diff --git a/js/src/jit-test/tests/collections/Array-of-4.js b/js/src/jit-test/tests/collections/Array-of-4.js new file mode 100644 index 0000000000..0bb1c8b8f4 --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-4.js @@ -0,0 +1,13 @@ +// Array.of does not trigger prototype setters. +// (It defines elements rather than assigning to them.) + +var status = "pass"; +Object.defineProperty(Array.prototype, "0", {set: v => status = "FAIL 1"}); +assertEq(Array.of(1)[0], 1); +assertEq(status, "pass"); + +function Bag() {} +Bag.of = Array.of; +Object.defineProperty(Bag.prototype, "0", {set: v => status = "FAIL 2"}); +assertEq(Bag.of(1)[0], 1); +assertEq(status, "pass"); diff --git a/js/src/jit-test/tests/collections/Array-of-cross-compartment.js b/js/src/jit-test/tests/collections/Array-of-cross-compartment.js new file mode 100644 index 0000000000..5872a98fd5 --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-cross-compartment.js @@ -0,0 +1,10 @@ +// Array.of returns an object in the target compartment, not the caller's compartment. +// This rules out implementations along the lines of (...args) => args. + +var g = newGlobal(); +var ga = g.Array.of(1, 2, 3); +assertEq(ga instanceof g.Array, true); + +g.Array.of = Array.of; +var a = g.Array.of(1, 2, 3); // this-value is a wrapper of g.Array, which IsConstructor, so we call it +assertEq(ga instanceof g.Array, true); // it produces a g.Array instance diff --git a/js/src/jit-test/tests/collections/Array-of-generic-1.js b/js/src/jit-test/tests/collections/Array-of-generic-1.js new file mode 100644 index 0000000000..090a8f97c2 --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-generic-1.js @@ -0,0 +1,25 @@ +// Array.of can be transplanted to other classes. + +load(libdir + "asserts.js"); + +var hits = 0; +function Bag() { + hits++; +} +Bag.of = Array.of; + +hits = 0; +var actual = Bag.of("zero", "one"); +assertEq(hits, 1); + +var expected = new Bag; +expected[0] = "zero"; +expected[1] = "one"; +expected.length = 2; +assertDeepEq(actual, expected); + +hits = 0; +actual = Array.of.call(Bag, "zero", "one"); +assertEq(hits, 1); +assertDeepEq(actual, expected); + diff --git a/js/src/jit-test/tests/collections/Array-of-generic-2.js b/js/src/jit-test/tests/collections/Array-of-generic-2.js new file mode 100644 index 0000000000..203e58b008 --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-generic-2.js @@ -0,0 +1,11 @@ +// Array.of passes the number of arguments to the constructor it calls. + +var hits = 0; +function Herd(n) { + assertEq(arguments.length, 1); + assertEq(n, 5); + hits++; +} +Herd.of = Array.of; +Herd.of("sheep", "cattle", "elephants", "whales", "seals"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/collections/Array-of-generic-3.js b/js/src/jit-test/tests/collections/Array-of-generic-3.js new file mode 100644 index 0000000000..3f5b2c3c56 --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-generic-3.js @@ -0,0 +1,7 @@ +// |jit-test| error:TypeError +// Array.of can be transplanted to builtin constructors. + +load(libdir + "asserts.js"); + +Uint8Array.of = Array.of; +assertDeepEq(new Uint8Array.of(0x12, 0x34, 0x5678, 0x9abcdef), new Uint8Array([0x12, 0x34, 0x78, 0xef])); diff --git a/js/src/jit-test/tests/collections/Array-of-length-setter-2.js b/js/src/jit-test/tests/collections/Array-of-length-setter-2.js new file mode 100644 index 0000000000..4dc95549ef --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-length-setter-2.js @@ -0,0 +1,13 @@ +// Array.of does a strict assignment to the new object's .length. +// The assignment is strict even if the code we're calling from is not strict. + +load(libdir + "asserts.js"); + +function Empty() {} +Empty.of = Array.of; +Object.defineProperty(Empty.prototype, "length", {get: () => 0}); + +var nothing = new Empty; +nothing.length = 2; // no exception; this is not a strict mode assignment + +assertThrowsInstanceOf(() => Empty.of(), TypeError); diff --git a/js/src/jit-test/tests/collections/Array-of-length-setter.js b/js/src/jit-test/tests/collections/Array-of-length-setter.js new file mode 100644 index 0000000000..e3d97f412f --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-length-setter.js @@ -0,0 +1,26 @@ +// Array.of calls a "length" setter if one is present. + +var hits = 0; +var lastObj = null, lastVal = undefined; +function setter(v) { + hits++; + lastObj = this; + lastVal = v; +} + +// when the setter is on the new object +function Pack() { + Object.defineProperty(this, "length", {set: setter}); +} +Pack.of = Array.of; +var pack = Pack.of("wolves", "cards", "cigarettes", "lies"); +assertEq(lastObj, pack); +assertEq(lastVal, 4); + +// when the setter is on the new object's prototype +function Bevy() {} +Object.defineProperty(Bevy.prototype, "length", {set: setter}); +Bevy.of = Array.of; +var bevy = Bevy.of("quail"); +assertEq(lastObj, bevy); +assertEq(lastVal, 1); diff --git a/js/src/jit-test/tests/collections/Array-of-nonconfigurable-1.js b/js/src/jit-test/tests/collections/Array-of-nonconfigurable-1.js new file mode 100644 index 0000000000..d516a1a40c --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-nonconfigurable-1.js @@ -0,0 +1,8 @@ +// If Array.of tries to overwrite a non-configurable property, it throws a TypeError. + +load(libdir + "asserts.js"); + +function C() { + Object.defineProperty(this, 0, {value: "v", configurable: false}); +} +assertThrowsInstanceOf(() => Array.of.call(C, 1, 2, 3), TypeError); diff --git a/js/src/jit-test/tests/collections/Array-of-nonconfigurable-2.js b/js/src/jit-test/tests/collections/Array-of-nonconfigurable-2.js new file mode 100644 index 0000000000..f5c783714a --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-nonconfigurable-2.js @@ -0,0 +1,16 @@ +// Array.of does not overwrite non-configurable properties. + +load(libdir + "asserts.js"); + +var obj; +function C() { + obj = this; + Object.defineProperty(this, 0, {value: "v", configurable: false}); +} +try { Array.of.call(C, 1); } catch (e) {} +assertDeepEq(Object.getOwnPropertyDescriptor(obj, 0), { + value: "v", + writable: false, + enumerable: false, + configurable: false +}); diff --git a/js/src/jit-test/tests/collections/Array-of-ordering.js b/js/src/jit-test/tests/collections/Array-of-ordering.js new file mode 100644 index 0000000000..5906e1b498 --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-ordering.js @@ -0,0 +1,32 @@ +// Order of Array.of operations. + +load(libdir + "asserts.js"); + +var log; + +var dstdata = []; +var dst = new Proxy(dstdata, { + defineProperty: function (t, name, desc) { + log.push(["def", name, desc.value]); + return true; + }, + set: function (t, name, value) { + log.push(["set", name, value]); + return true; + } +}); + +function Troop() { + return dst; +} +Troop.of = Array.of; + +log = []; +assertEq(Troop.of("monkeys", "baboons", "kangaroos"), dst); +assertDeepEq(log, [ + ["def", "0", "monkeys"], + ["def", "1", "baboons"], + ["def", "2", "kangaroos"], + ["set", "length", 3] +]); + diff --git a/js/src/jit-test/tests/collections/Array-of-surfaces.js b/js/src/jit-test/tests/collections/Array-of-surfaces.js new file mode 100644 index 0000000000..88edfacdb2 --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-surfaces.js @@ -0,0 +1,14 @@ +// Check superficial features of Array.of. + +load(libdir + "asserts.js"); + +var desc = Object.getOwnPropertyDescriptor(Array, "of"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, false); +assertEq(desc.writable, true); +assertEq(Array.of.length, 0); +assertThrowsInstanceOf(() => new Array.of(), TypeError); // not a constructor + +// When the this-value passed in is not a constructor, the result is an array. +for (let v of [undefined, null, false, "cow"]) + assertEq(Array.isArray(Array.of.call(v)), true); diff --git a/js/src/jit-test/tests/collections/Map-Set-moving-gc.js b/js/src/jit-test/tests/collections/Map-Set-moving-gc.js new file mode 100644 index 0000000000..e603756dc3 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-Set-moving-gc.js @@ -0,0 +1,16 @@ +var m = new Map; +var s = new Set; + +var A = []; +for (var i = 0; i < 1024; ++i) { + var key = {i:i}; + m.set(key, i); + s.add(key); + A.push(key); +} +gc(); +for (var i in A) { + var key = A[i]; + assertEq(m.has(key), true); + assertEq(s.has(key), true); +} diff --git a/js/src/jit-test/tests/collections/Map-clear-1.js b/js/src/jit-test/tests/collections/Map-clear-1.js new file mode 100644 index 0000000000..68b08cdb22 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-clear-1.js @@ -0,0 +1,8 @@ +// Clearing an empty Map has no effect. + +var m = new Map(); +for (var i = 0; i < 2; i++) { + m.clear(); + assertEq(m.size, 0); + assertEq(m.has(undefined), false); +} diff --git a/js/src/jit-test/tests/collections/Map-clear-2.js b/js/src/jit-test/tests/collections/Map-clear-2.js new file mode 100644 index 0000000000..f9358b6f0c --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-clear-2.js @@ -0,0 +1,17 @@ +// Clearing a Map removes its entries; the Map remains usable afterwards. + +var m = new Map([["a", "b"], ["b", "c"]]); +assertEq(m.size, 2); +m.clear(); +assertEq(m.size, 0); +assertEq(m.has("a"), false); +assertEq(m.get("a"), undefined); +assertEq(m.delete("a"), false); +assertEq(m.has("b"), false); +for (var pair of m) + throw "FAIL"; // shouldn't be any pairs + +m.set("c", "d"); +assertEq(m.size, 1); +assertEq(m.has("a"), false); +assertEq(m.has("b"), false); diff --git a/js/src/jit-test/tests/collections/Map-clear-3.js b/js/src/jit-test/tests/collections/Map-clear-3.js new file mode 100644 index 0000000000..902a4cf292 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-clear-3.js @@ -0,0 +1,10 @@ +// Clearing a Map with a nontrivial number of elements works. + +var m = new Map(); +for (var i = 0; i < 100; i++) + m.set(i, i); +assertEq(m.size, i); +m.clear(); +assertEq(m.size, 0); +m.set("a", 1); +assertEq(m.get("a"), 1); diff --git a/js/src/jit-test/tests/collections/Map-clear-4.js b/js/src/jit-test/tests/collections/Map-clear-4.js new file mode 100644 index 0000000000..2925c801f8 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-clear-4.js @@ -0,0 +1,10 @@ +// Clearing a Map after deleting some entries works. + +var m = new Map([["a", 1], ["b", 2], ["c", 3], ["d", 4]]); +for (var [k, v] of m) + if (k !== "c") + m.delete(k); +m.clear(); +assertEq(m.size, 0); +assertEq(m.has("c"), false); +assertEq(m.has("d"), false); diff --git a/js/src/jit-test/tests/collections/Map-clear-5.js b/js/src/jit-test/tests/collections/Map-clear-5.js new file mode 100644 index 0000000000..74fcdd4ebe --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-clear-5.js @@ -0,0 +1,14 @@ +// Map.clear is unaffected by deleting/monkeypatching Map.prototype.{delete,iterator}. + +var data = [["a", 1], ["b", 2]]; +var m1 = new Map(data), m2 = new Map(data); + +delete Map.prototype.delete; +delete Map.prototype.iterator; +m1.clear(); +assertEq(m1.size, 0); + +Map.prototype.delete = function () { throw "FAIL"; }; +Map.prototype.iterator = function () { throw "FAIL"; }; +m2.clear(); +assertEq(m2.size, 0); diff --git a/js/src/jit-test/tests/collections/Map-clear-6.js b/js/src/jit-test/tests/collections/Map-clear-6.js new file mode 100644 index 0000000000..4df7388f59 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-clear-6.js @@ -0,0 +1,6 @@ +// Clearing a Map doesn't affect expando properties. + +var m = new Map(); +m.x = 3; +m.clear(); +assertEq(m.x, 3); diff --git a/js/src/jit-test/tests/collections/Map-clear-iterators-1.js b/js/src/jit-test/tests/collections/Map-clear-iterators-1.js new file mode 100644 index 0000000000..0372929fb9 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-clear-iterators-1.js @@ -0,0 +1,23 @@ +// A Map iterator does not visit entries removed by clear(). + +load(libdir + "iteration.js"); + +var m = new Map(); +var it = m[Symbol.iterator](); +m.clear(); +assertIteratorDone(it, undefined); + +m = new Map([["a", 1], ["b", 2], ["c", 3], ["d", 4]]); +it = m[Symbol.iterator](); +assertIteratorNext(it, ["a", 1]); +m.clear(); +assertIteratorDone(it, undefined); + +var log = ""; +m = new Map([["a", 1], ["b", 2], ["c", 3], ["d", 4]]); +for (var [k, v] of m) { + log += k + v; + if (k == "b") + m.clear(); +} +assertEq(log, "a1b2"); diff --git a/js/src/jit-test/tests/collections/Map-clear-iterators-2.js b/js/src/jit-test/tests/collections/Map-clear-iterators-2.js new file mode 100644 index 0000000000..a64b5f11cb --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-clear-iterators-2.js @@ -0,0 +1,12 @@ +// A Map iterator continues to visit entries added after a clear(). + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var m = new Map([["a", 1]]); +var it = m[Symbol.iterator](); +assertIteratorNext(it, ["a", 1]); +m.clear(); +m.set("b", 2); +assertIteratorNext(it, ["b", 2]); +assertIteratorDone(it, undefined); diff --git a/js/src/jit-test/tests/collections/Map-constructor-1.js b/js/src/jit-test/tests/collections/Map-constructor-1.js new file mode 100644 index 0000000000..b1a55967dc --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-constructor-1.js @@ -0,0 +1,14 @@ +// The Map constructor creates an empty Map by default. + +load(libdir + "asserts.js"); + +var m = new Map(); +assertEq(m.size, 0); +m = new Map(undefined); +assertEq(m.size, 0); +m = new Map(null); +assertEq(m.size, 0); + +assertThrowsInstanceOf(() => Map(), TypeError); +assertThrowsInstanceOf(() => Map(undefined), TypeError); +assertThrowsInstanceOf(() => Map(null), TypeError); diff --git a/js/src/jit-test/tests/collections/Map-constructor-2.js b/js/src/jit-test/tests/collections/Map-constructor-2.js new file mode 100644 index 0000000000..b80a171d84 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-constructor-2.js @@ -0,0 +1,6 @@ +// The Map constructor can take an argument that is an array of pairs. + +var arr = [["zero", 0], ["one", 1], ["two", 2]]; +var m = new Map(arr); +for (var [k, v] of arr) + assertEq(m.get(k), v); diff --git a/js/src/jit-test/tests/collections/Map-constructor-3.js b/js/src/jit-test/tests/collections/Map-constructor-3.js new file mode 100644 index 0000000000..601a76188e --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-constructor-3.js @@ -0,0 +1,9 @@ +// Map can take an argument that is an array of singleton arrays. + +var arr = [["a"], ["b"], ["c"]]; +var m = new Map(arr); +assertEq(m.size, 3); +for (var [k, _] of arr) { + assertEq(m.has(k), true); + assertEq(m.get(k), undefined); +} diff --git a/js/src/jit-test/tests/collections/Map-constructor-4.js b/js/src/jit-test/tests/collections/Map-constructor-4.js new file mode 100644 index 0000000000..22c2c416be --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-constructor-4.js @@ -0,0 +1,6 @@ +// new Map(x) throws if x is not iterable (unless x is undefined). + +load(libdir + "asserts.js"); +var nonIterables = [true, 1, -0, 3.14, NaN, {}, Math, this]; +for (let k of nonIterables) + assertThrowsInstanceOf(function () { new Map(k); }, TypeError); diff --git a/js/src/jit-test/tests/collections/Map-constructor-5.js b/js/src/jit-test/tests/collections/Map-constructor-5.js new file mode 100644 index 0000000000..98d1a03ba4 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-constructor-5.js @@ -0,0 +1,15 @@ +// new Map(arr) throws if arr contains holes (or undefined values). + +load(libdir + "asserts.js"); +assertThrowsInstanceOf(function () { new Map([undefined]); }, TypeError); +assertThrowsInstanceOf(function () { new Map([null]); }, TypeError); +assertThrowsInstanceOf(function () { new Map([[0, 0], [1, 1], , [3, 3]]); }, TypeError); +assertThrowsInstanceOf(function () { new Map([[0, 0], [1, 1], ,]); }, TypeError); + +// new Map(iterable) throws if iterable doesn't have array-like objects + +assertThrowsInstanceOf(function () { new Map([1, 2, 3]); }, TypeError); +assertThrowsInstanceOf(function () { + let s = new Set([1, 2, "abc"]); + new Map(s); +}, TypeError); diff --git a/js/src/jit-test/tests/collections/Map-constructor-duplicates.js b/js/src/jit-test/tests/collections/Map-constructor-duplicates.js new file mode 100644 index 0000000000..125081bf87 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-constructor-duplicates.js @@ -0,0 +1,8 @@ +// When the argument to Map contains a key multiple times, the last value is retained. + +var arg = [["zero", 7], ["one", 1], ["two", 4], ["zero", 8], ["two", 2], ["zero", 0]]; +var m = new Map(arg); +assertEq(m.get("zero"), 0); +assertEq(m.get("one"), 1); +assertEq(m.get("two"), 2); +assertEq(m.size, 3); diff --git a/js/src/jit-test/tests/collections/Map-constructor-generator-1.js b/js/src/jit-test/tests/collections/Map-constructor-generator-1.js new file mode 100644 index 0000000000..7bda266328 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-constructor-generator-1.js @@ -0,0 +1,19 @@ +// The argument to Map can be a generator. + +var done = false; +function* data(n) { + var s = ''; + for (var i = 0; i < n; i++) { + yield [s, i]; + s += '.'; + } + done = true; +} + +var m = new Map(data(50)); +assertEq(done, true); // the constructor consumes the argument +assertEq(m.size, 50); +assertEq(m.get(""), 0); +assertEq(m.get("....."), 5); +assertEq(m.get(Array(49+1).join(".")), 49); +assertEq(m.has(undefined), false); diff --git a/js/src/jit-test/tests/collections/Map-constructor-generator-3.js b/js/src/jit-test/tests/collections/Map-constructor-generator-3.js new file mode 100644 index 0000000000..3d555a0747 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-constructor-generator-3.js @@ -0,0 +1,7 @@ +// The argument to Map may be a generator-iterator that produces no values. + +function* none() { + if (0) yield 0; +} +var m = new Map(none()); +assertEq(m.size, 0); diff --git a/js/src/jit-test/tests/collections/Map-constructor-generator-exception.js b/js/src/jit-test/tests/collections/Map-constructor-generator-exception.js new file mode 100644 index 0000000000..4c9089bdf2 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-constructor-generator-exception.js @@ -0,0 +1,12 @@ +// Iterating over the argument to Map can throw. The exception is propagated. + +load(libdir + "asserts.js"); + +function* data2() { + yield [{}, "XR22/Z"]; + yield [{}, "23D-BN"]; + throw "oops"; +} + +var it = data2(); +assertThrowsValue(function () { new Map(it); }, "oops"); diff --git a/js/src/jit-test/tests/collections/Map-constructor-set.js b/js/src/jit-test/tests/collections/Map-constructor-set.js new file mode 100644 index 0000000000..2b6e241525 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-constructor-set.js @@ -0,0 +1,204 @@ +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var k1 = {}; +var v1 = 42; +var k2 = {}; +var v2 = 42; +var k3 = {}; +var v3 = 43; +var k4 = {}; +var v4 = 44; + +function test_patched() { + let orig = Map.prototype.set; + + // If adder is modified, constructor should call it. + var called = false; + + Map.prototype.set = function(k, v) { + assertEq(k, k1); + assertEq(v, v1); + orig.call(this, k2, v2); + called = true; + }; + + var arr = [[k1, v1]]; + + var m = new Map(arr); + + assertEq(called, true); + assertEq(m.size, 1); + assertEq(m.has(k1), false); + assertEq(m.has(k2), true); + assertEq(m.get(k1), undefined); + assertEq(m.get(k2), v2); + + Map.prototype.set = orig; +} + +function test_proxy1() { + let orig = Map.prototype.set; + + // If adder is modified, constructor should call it. + var called = false; + + Map.prototype.set = new Proxy(function(k, v) { + assertEq(k, k1); + assertEq(v, v1); + orig.call(this, k2, v2); + called = true; + }, {}); + + var arr = [[k1, v1]]; + + var m = new Map(arr); + + assertEq(called, true); + assertEq(m.size, 1); + assertEq(m.has(k1), false); + assertEq(m.has(k2), true); + assertEq(m.get(k1), undefined); + assertEq(m.get(k2), v2); + + Map.prototype.set = orig; +} + +function test_proxy2() { + let orig = Map.prototype.set; + + // If adder is modified, constructor should call it. + var called = false; + + Map.prototype.set = new Proxy(function() { + }, { + apply: function(target, that, args) { + var [k, v] = args; + assertEq(k, k1); + assertEq(v, v1); + orig.call(that, k2, v2); + called = true; + } + }); + + var arr = [[k1, v1]]; + + var m = new Map(arr); + + assertEq(called, true); + assertEq(m.size, 1); + assertEq(m.has(k1), false); + assertEq(m.has(k2), true); + assertEq(m.get(k1), undefined); + assertEq(m.get(k2), v2); + + Map.prototype.set = orig; +} + +function test_change1() { + let orig = Map.prototype.set; + + // Change to adder in GetIterator(..) call should be ignored. + var called = false; + var modified = false; + + var arr = [[k1, v1]]; + + var proxy_arr = new Proxy(arr, { + get: function(target, name) { + if (name == Symbol.iterator) { + modified = true; + Map.prototype.set = function() { + called = true; + }; + } + return target[name]; + } + }); + + var m = new Map(proxy_arr); + + assertEq(modified, true); + assertEq(called, false); + assertEq(m.size, 1); + assertEq(m.has(k1), true); + assertEq(m.has(k2), false); + assertEq(m.get(k1), v1); + assertEq(m.get(k2), undefined); + + Map.prototype.set = orig; +} + +function test_change2() { + let orig = Map.prototype.set; + + // Change to adder in adder(...) call should be ignored. + var called = false; + var count = 0; + + Map.prototype.set = function(k, v) { + if (count == 0) { + assertEq(k, k1); + assertEq(v, v1); + orig.call(this, k3, v3); + Map.prototype.set = function() { + called = true; + }; + count = 1; + } else { + assertEq(k, k2); + assertEq(v, v2); + orig.call(this, k4, v4); + count = 2; + } + }; + + var arr = [[k1, v1], [k2, v2]]; + + var m = new Map(arr); + + assertEq(called, false); + assertEq(count, 2); + assertEq(m.size, 2); + assertEq(m.has(k1), false); + assertEq(m.has(k2), false); + assertEq(m.has(k3), true); + assertEq(m.has(k4), true); + assertEq(m.get(k1), undefined); + assertEq(m.get(k2), undefined); + assertEq(m.get(k3), v3); + assertEq(m.get(k4), v4); + + Map.prototype.set = orig; +} + +function test_error() { + let orig = Map.prototype.set; + + var arr = [[k1, v1]]; + + // Map should throw TypeError if adder is not callable. + Map.prototype.set = null; + assertThrowsInstanceOf(() => new Map(arr), TypeError); + Map.prototype.set = {}; + assertThrowsInstanceOf(() => new Map(arr), TypeError); + + // Map should propagate error thrown by adder. + Map.prototype.set = function() { + throw SyntaxError(); + }; + assertThrowsInstanceOf(() => new Map(arr), SyntaxError); + + Map.prototype.set = orig; +} + +function test() { + test_patched(); + test_proxy1(); + test_proxy2(); + test_change1(); + test_change2(); + test_error(); +} + +test(); diff --git a/js/src/jit-test/tests/collections/Map-delete-size.js b/js/src/jit-test/tests/collections/Map-delete-size.js new file mode 100644 index 0000000000..c2537e0dc1 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-delete-size.js @@ -0,0 +1,14 @@ +// map.delete(k) decrements the map size iff an entry was actually removed. + +var m = new Map(); +m.delete(3); +assertEq(m.size, 0); +m.set({}, 'ok'); +m.set(Math, 'ok'); +assertEq(m.size, 2); +m.delete({}); +assertEq(m.size, 2); +m.delete(Math); +assertEq(m.size, 1); +m.delete(Math); +assertEq(m.size, 1); diff --git a/js/src/jit-test/tests/collections/Map-delete.js b/js/src/jit-test/tests/collections/Map-delete.js new file mode 100644 index 0000000000..d200eb873f --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-delete.js @@ -0,0 +1,18 @@ +// Map.prototype.delete works whether the key is present or not. + +var m = new Map; +var key = {}; + +// when the map is new +assertEq(m.delete(key), false); +assertEq(m.has(key), false); + +// when the key is present +assertEq(m.set(key, 'x'), m); +assertEq(m.delete(key), true); +assertEq(m.has(key), false); +assertEq(m.get(key), undefined); + +// when the key has already been deleted +assertEq(m.delete(key), false); +assertEq(m.has(key), false); diff --git a/js/src/jit-test/tests/collections/Map-forEach.js b/js/src/jit-test/tests/collections/Map-forEach.js new file mode 100644 index 0000000000..6db15f4c31 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-forEach.js @@ -0,0 +1,58 @@ +/* test Map.prototype.forEach */ + +load(libdir + 'asserts.js'); +load(libdir + 'iteration.js'); + +// testing success conditions of Map.prototype.forEach + +var testMap = new Map(); + +function callback(value, key, map) { + testMap.set(key, value); + assertEq(map.has(key), true); + assertEq(map.get(key), value); +} + +var initialMap = new Map([['a', 1], ['b', 2.3], [false, undefined]]); +initialMap.forEach(callback); + +// test that both the Maps are equal and are in same order +var iterator = initialMap[Symbol.iterator](); +var count = 0; +for (var [k, v] of testMap) { + assertEq(initialMap.has(k), true); + assertEq(initialMap.get(k), testMap.get(k)); + assertIteratorNext(iterator, [k, testMap.get(k)]); + count++; +} + +//check both the Maps we have are equal in size +assertEq(initialMap.size, testMap.size); +assertEq(initialMap.size, count); + +var x = { abc: 'test'}; +function callback2(value, key, map) { + assertEq(x, this); +} +initialMap = new Map([['a', 1]]); +initialMap.forEach(callback2, x); + +// testing failure conditions of Map.prototype.forEach + +var s = new Set([1, 2, 3]); +assertThrowsInstanceOf(function() { + Map.prototype.forEach.call(s, callback); +}, TypeError, "Map.prototype.forEach should raise TypeError if not used on a Map"); + +var fn = 2; +assertThrowsInstanceOf(function() { + initialMap.forEach(fn); +}, TypeError, "Map.prototype.forEach should raise TypeError if callback is not a function"); + +// testing that Map#forEach uses internal next() function. + +var m = new Map([["one", 1]]); +Object.getPrototypeOf(m[Symbol.iterator]()).next = function () { throw "FAIL"; }; +assertThrowsValue(function () { + m.forEach(function () { throw Math; }); +}, Math, "Map.prototype.forEach should use intrinsic next method."); diff --git a/js/src/jit-test/tests/collections/Map-gc-4.js b/js/src/jit-test/tests/collections/Map-gc-4.js new file mode 100644 index 0000000000..5597ec1bbf --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-gc-4.js @@ -0,0 +1,15 @@ +// Bug 770954. + +gczeal(4); +var s = new Set; +s.add(-0); +s.add(0); +assertEq(s.delete(-0), true); +assertEq(s.has(0), (false )); +assertEq(s.has(-0), false); +var m = new Map; +m.set(-0, 'x'); +assertEq(m.has(0), true); +assertEq(m.get(0), 'x'); +assertEq(m.has(-0), true); +assertEq(m.delete(-0), true); diff --git a/js/src/jit-test/tests/collections/Map-get.js b/js/src/jit-test/tests/collections/Map-get.js new file mode 100644 index 0000000000..62bfbcabe3 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-get.js @@ -0,0 +1,41 @@ +// Map.prototype.get and .has basically work +var m = new Map; + +function rope() { + var s = "s"; + for (var i = 0; i < 16; i++) + s += s; + return s; +} + +var keys = [undefined, null, true, false, + 0, 1, 65535, 65536, 2147483647, 2147483648, 4294967295, 4294967296, + -1, -65536, -2147483648, + 0.5, Math.sqrt(81), Math.PI, + Number.MAX_VALUE, -Number.MAX_VALUE, Number.MIN_VALUE, -Number.MIN_VALUE, + NaN, Infinity, -Infinity, + "", "\0", "a", "ab", "abcdefg", rope(), + {}, [], /a*b/, Object.prototype, Object]; + +for (var i = 0; i < keys.length; i++) { + // without being set + var key = keys[i]; + assertEq(m.has(key), false); + assertEq(m.get(key), undefined); + + // after being set + var v = {}; + assertEq(m.set(key, v), m); + assertEq(m.has(key), true); + assertEq(m.get(key), v); + + // after being deleted + assertEq(m.delete(key), true); + assertEq(m.has(key), false); + assertEq(m.get(key), undefined); + + m.set(key, v); +} + +for (var i = 0; i < keys.length; i++) + assertEq(m.has(keys[i]), true); diff --git a/js/src/jit-test/tests/collections/Map-iterator-1.js b/js/src/jit-test/tests/collections/Map-iterator-1.js new file mode 100644 index 0000000000..5e9d685737 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-1.js @@ -0,0 +1,11 @@ +// for-of can be used to iterate over a Map twice. + +var map = new Map([['a', 0], ['b', 1], ['c', 2]]); +var log = ''; + +for (let i = 0; i < 2; i++) { + for (let [k, v] of map) + log += k + v; + log += ';' +} +assertEq(log, 'a0b1c2;a0b1c2;'); diff --git a/js/src/jit-test/tests/collections/Map-iterator-2.js b/js/src/jit-test/tests/collections/Map-iterator-2.js new file mode 100644 index 0000000000..8a648a273a --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-2.js @@ -0,0 +1,11 @@ +// Nested for-of loops can iterate over a Map. + +var map = new Map([['a', 0], ['b', 1]]); +var log = ''; +for (let [k0, v0] of map) { + log += k0 + v0 + ':' + for (let [k1, v1] of map) + log += k1 + v1; + log += ';' +}; +assertEq(log, 'a0:a0b1;b1:a0b1;'); diff --git a/js/src/jit-test/tests/collections/Map-iterator-add-1.js b/js/src/jit-test/tests/collections/Map-iterator-add-1.js new file mode 100644 index 0000000000..495ad62882 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-add-1.js @@ -0,0 +1,15 @@ +// map.iterator() is live: entries added during iteration are visited. + +var map = new Map(); +function force(k) { + if (!map.has(k) && k >= 0) + map.set(k, k - 1); +} +force(5); +var log = ''; +for (let [k, v] of map) { + log += k + ';'; + force(v); +} +assertEq(log, '5;4;3;2;1;0;'); +assertEq(map.size, 6); diff --git a/js/src/jit-test/tests/collections/Map-iterator-add-2.js b/js/src/jit-test/tests/collections/Map-iterator-add-2.js new file mode 100644 index 0000000000..fce3dac6ed --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-add-2.js @@ -0,0 +1,10 @@ +// A Map iterator does not iterate over new entries added after it throws StopIteration. + +load(libdir + "iteration.js"); + +var map = new Map(); +var iter0 = map[Symbol.iterator](), iter1 = map[Symbol.iterator](); +assertIteratorDone(iter0, undefined); // closes iter0 +map.set(1, 2); +assertIteratorDone(iter0, undefined); // already closed +assertIteratorNext(iter1, [1, 2]); // was not yet closed diff --git a/js/src/jit-test/tests/collections/Map-iterator-add-remove.js b/js/src/jit-test/tests/collections/Map-iterator-add-remove.js new file mode 100644 index 0000000000..b71bfd18cf --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-add-remove.js @@ -0,0 +1,14 @@ +// Removing and re-adding entries while an iterator is live causes the iterator to visit them again. + +var map = new Map([['a', 1]]); +var n = 5; +for (let [k, v] of map) { + assertEq(k, 'a'); + assertEq(v, 1); + if (n === 0) + break; + map.delete('a'); + map.set('a', 1); + n--; +} +assertEq(n, 0); diff --git a/js/src/jit-test/tests/collections/Map-iterator-already-done.js b/js/src/jit-test/tests/collections/Map-iterator-already-done.js new file mode 100644 index 0000000000..3e3db75436 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-already-done.js @@ -0,0 +1,12 @@ +let a = new Map(); +for (let i = 0; i < 1000; i++) + a.set(i, i); + +function f() { + let iter = a.entries(); + while (!iter.next().done) {} + iter.next(); +} + +for (let i = 0; i < 10; i++) + f(); diff --git a/js/src/jit-test/tests/collections/Map-iterator-order.js b/js/src/jit-test/tests/collections/Map-iterator-order.js new file mode 100644 index 0000000000..55eb30360d --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-order.js @@ -0,0 +1,15 @@ +// Map iterators produces entries in the order they were inserted. + +load(libdir + "eqArrayHelper.js"); + +var map = new Map(); +for (var i = 7; i !== 1; i = i * 7 % 1117) + map.set("" + i, i); +assertEq(map.size, 557); + +i = 7; +for (var pair of map) { + assertEqArray(pair, ["" + i, i]); + i = i * 7 % 1117; +} +assertEq(i, 1); diff --git a/js/src/jit-test/tests/collections/Map-iterator-pairs-1.js b/js/src/jit-test/tests/collections/Map-iterator-pairs-1.js new file mode 100644 index 0000000000..2a8e49d89b --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-pairs-1.js @@ -0,0 +1,17 @@ +// mapiter.next() returns an actual array. + +load(libdir + "iteration.js"); + +var key = {}; +var map = new Map([[key, 'value']]); +var entry = map[Symbol.iterator]().next().value; +assertEq(Array.isArray(entry), true); +assertEq(Object.getPrototypeOf(entry), Array.prototype); +assertEq(Object.isExtensible(entry), true); + +assertEq(entry.length, 2); +var names = Object.getOwnPropertyNames(entry).sort(); +assertEq(names.length, 3); +assertEq(names.join(","), "0,1,length"); +assertEq(entry[0], key); +assertEq(entry[1], 'value'); diff --git a/js/src/jit-test/tests/collections/Map-iterator-pairs-2.js b/js/src/jit-test/tests/collections/Map-iterator-pairs-2.js new file mode 100644 index 0000000000..4d4e66f00c --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-pairs-2.js @@ -0,0 +1,13 @@ +// mapiter.next() returns a fresh array each time. + +load(libdir + "iteration.js"); + +var map = new Map([['a', 1], ['b', 2]]); +var iter = map[Symbol.iterator](); +var a = iter.next(), b = iter.next(); +assertIteratorResult(a, ['a', 1], false); +assertIteratorResult(b, ['b', 2], false); +assertEq(a.value !== b.value, true); +var a1 = map[Symbol.iterator](); +assertIteratorNext(a1, ['a', 1]); +assertEq(a.value !== a1.value, true); diff --git a/js/src/jit-test/tests/collections/Map-iterator-pairs-3.js b/js/src/jit-test/tests/collections/Map-iterator-pairs-3.js new file mode 100644 index 0000000000..738215b791 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-pairs-3.js @@ -0,0 +1,13 @@ +// Modifying an array returned by mapiter.next() does not modify the Map. + +load(libdir + "iteration.js"); + +var map = new Map([['a', 1]]); +var res = map[Symbol.iterator]().next(); +assertIteratorResult(res, ['a', 1], false); +res.value[0] = 'b'; +res.value[1] = 2; +assertIteratorResult(res, ['b', 2], false); +assertEq(map.get('a'), 1); +assertEq(map.has('b'), false); +assertEq(map.size, 1); diff --git a/js/src/jit-test/tests/collections/Map-iterator-proxies-1.js b/js/src/jit-test/tests/collections/Map-iterator-proxies-1.js new file mode 100644 index 0000000000..545d80b6ac --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-proxies-1.js @@ -0,0 +1,8 @@ +// for-of works on a cross-compartment wrapper of a Map. + +var g = newGlobal(); +var mw = g.eval("new Map([['a', 1], ['b', 2]])"); +var log = ''; +for (let [k, v] of mw) + log += k + v; +assertEq(log, "a1b2"); diff --git a/js/src/jit-test/tests/collections/Map-iterator-proxies-2.js b/js/src/jit-test/tests/collections/Map-iterator-proxies-2.js new file mode 100644 index 0000000000..9b1c8bb985 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-proxies-2.js @@ -0,0 +1,21 @@ +// map.iterator() and iter.next() are non-generic but work on cross-compartment wrappers. + +load(libdir + "asserts.js"); +load(libdir + "eqArrayHelper.js"); +load(libdir + "iteration.js"); + +var g = newGlobal(); + +var iterator_fn = Map.prototype[Symbol.iterator]; +assertThrowsInstanceOf(function () { iterator_fn.call({}); }, TypeError); +assertThrowsInstanceOf(function () { iterator_fn.call(new Set()); }, TypeError); +var mapw = g.eval("new Map([['x', 1], ['y', 2]])"); +assertEqArray(iterator_fn.call(mapw).next().value, ["x", 1]); + +var next_fn = (new Map())[Symbol.iterator]().next; +assertThrowsInstanceOf(function () { next_fn.call({}); }, TypeError); +assertThrowsInstanceOf(function () { next_fn.call((new Set())[Symbol.iterator]()); }, TypeError); +var iterw = mapw[Symbol.iterator](); +assertEqArray(next_fn.call(iterw).value, ["x", 1]); +assertEqArray(next_fn.call(iterw).value, ["y", 2]); +assertEq(next_fn.call(iterw).done, true); diff --git a/js/src/jit-test/tests/collections/Map-iterator-remove-1.js b/js/src/jit-test/tests/collections/Map-iterator-remove-1.js new file mode 100644 index 0000000000..d138a4423d --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-remove-1.js @@ -0,0 +1,40 @@ +// A map iterator can cope with removing the current entry. + +function test(pairs) { + print(JSON.stringify(pairs)); + var map = new Map(pairs); + + var all_keys = ''; + var false_keys = ''; + for (let [k, v] of map) { + all_keys += k; + if (!v) + false_keys += k; + } + + var log = ''; + for (let [k, remove] of map) { + log += k; + if (remove) + map.delete(k); + } + assertEq(log, all_keys); + + var remaining_keys = [...map].map(([k]) => k).join(''); + assertEq(remaining_keys, false_keys); +} + +// removing the only entry +test([['a', true]]); + +// removing the first entry +test([['a', true], ['b', false], ['c', false]]); + +// removing a middle entry +test([['a', false], ['b', true], ['c', false]]); + +// removing the last entry +test([['a', false], ['b', false], ['c', true]]); + +// removing all entries +test([['a', true], ['b', true], ['c', true]]); diff --git a/js/src/jit-test/tests/collections/Map-iterator-remove-2.js b/js/src/jit-test/tests/collections/Map-iterator-remove-2.js new file mode 100644 index 0000000000..d49efa1c88 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-remove-2.js @@ -0,0 +1,13 @@ +// A map iterator can cope with removing the next entry. + +load(libdir + "iteration.js"); + +var map = new Map([['a', 0], ['b', 1], ['c', 2], ['d', 3]]); +var iter = map[Symbol.iterator](); +var log = ''; +for (let [k, v] of iter) { + log += k + v; + if (k === 'b') + map.delete('c'); +} +assertEq(log, 'a0b1d3'); diff --git a/js/src/jit-test/tests/collections/Map-iterator-remove-3.js b/js/src/jit-test/tests/collections/Map-iterator-remove-3.js new file mode 100644 index 0000000000..0b17dcfec8 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-remove-3.js @@ -0,0 +1,13 @@ +// A map iterator can cope with removing the next entry, then the current entry. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var map = new Map([['a', 0], ['b', 1], ['c', 2], ['d', 3]]); +var iter = map[Symbol.iterator](); +assertIteratorNext(iter, ['a', 0]); +assertIteratorNext(iter, ['b', 1]); +map.delete('c'); +map.delete('b'); +assertIteratorNext(iter, ['d', 3]); +assertIteratorDone(iter, undefined); diff --git a/js/src/jit-test/tests/collections/Map-iterator-remove-4.js b/js/src/jit-test/tests/collections/Map-iterator-remove-4.js new file mode 100644 index 0000000000..7739000137 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-remove-4.js @@ -0,0 +1,31 @@ +// Multiple live iterators on the same Map can cope with removing entries. + +load(libdir + "iteration.js"); + +// Make a map. +var map = new Map(); +var SIZE = 7; +for (var j = 0; j < SIZE; j++) + map.set(j, j); + +// Make lots of iterators pointing to entry 2 of the map. +var NITERS = 5; +var iters = []; +for (var i = 0; i < NITERS; i++) { + var iter = map[Symbol.iterator](); + assertIteratorNext(iter, [0, 0]); + assertIteratorNext(iter, [1, 1]); + iters[i] = iter; +} + +// Remove half of the map entries. +for (var j = 0; j < SIZE; j += 2) + map.delete(j); + +// Make sure all the iterators still work. +for (var i = 0; i < NITERS; i++) { + var iter = iters[i]; + for (var j = 3; j < SIZE; j += 2) + assertIteratorNext(iter, [j, j]); + assertIteratorDone(iter, undefined); +} diff --git a/js/src/jit-test/tests/collections/Map-iterator-remove-5.js b/js/src/jit-test/tests/collections/Map-iterator-remove-5.js new file mode 100644 index 0000000000..d5e3c26b2e --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-remove-5.js @@ -0,0 +1,22 @@ +// Removing a Map entry already visited by an iterator does not cause any +// entries to be skipped. + +var map = new Map(); +for (var i = 0; i < 20; i++) + map.set(String.fromCharCode('A'.charCodeAt(0) + i), i); + +var log = ''; +for (var [k, v] of map) { + log += k; + if (v % 5 === 4) { + // Delete all entries preceding this one. + for (let [k1, v1] of map) { + if (k1 === k) + break; + map.delete(k1); + } + } +} +assertEq(log, 'ABCDEFGHIJKLMNOPQRST'); +assertEq(map.size, 1); // Only the last entry remains. +assertEq(map.get('T'), 19); diff --git a/js/src/jit-test/tests/collections/Map-iterator-remove-6.js b/js/src/jit-test/tests/collections/Map-iterator-remove-6.js new file mode 100644 index 0000000000..9fc6f1e56e --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterator-remove-6.js @@ -0,0 +1,21 @@ +// Removing many Map entries does not cause a live iterator to skip any of the +// entries that were not removed. (Compacting a Map must not be observable to +// script.) + +load(libdir + "iteration.js"); + +var map = new Map(); +for (var i = 0; i < 32; i++) + map.set(i, i); +var iter = map[Symbol.iterator](); +assertIteratorNext(iter, [0, 0]); +for (var i = 0; i < 30; i++) + map.delete(i); +assertEq(map.size, 2); +for (var i = 32; i < 100; i++) + map.set(i, i); // eventually triggers compaction + +for (var i = 30; i < 100; i++) + assertIteratorNext(iter, [i, i]); + +assertIteratorDone(iter, undefined); diff --git a/js/src/jit-test/tests/collections/Map-iterators-3.js b/js/src/jit-test/tests/collections/Map-iterators-3.js new file mode 100644 index 0000000000..d1aac03f84 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-iterators-3.js @@ -0,0 +1,10 @@ +// A closed Map iterator does not visit new entries added after a clear(). + +load(libdir + "iteration.js"); + +var m = new Map(); +var it = m[Symbol.iterator](); +assertIteratorDone(it, undefined); // close the iterator +m.clear(); +m.set("a", 1); +assertIteratorDone(it, undefined); // iterator still closed diff --git a/js/src/jit-test/tests/collections/Map-scale.js b/js/src/jit-test/tests/collections/Map-scale.js new file mode 100644 index 0000000000..a456d1d34d --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-scale.js @@ -0,0 +1,8 @@ +// Maps can hold at least 64K values. + +var N = 1 << 16; +var m = new Map; +for (var i = 0; i < N; i++) + assertEq(m.set(i, i), m); +for (var i = 0; i < N; i++) + assertEq(m.get(i), i); diff --git a/js/src/jit-test/tests/collections/Map-set-returns-this.js b/js/src/jit-test/tests/collections/Map-set-returns-this.js new file mode 100644 index 0000000000..2120b09a35 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-set-returns-this.js @@ -0,0 +1,7 @@ +// Bug 1031632 - Map.prototype.set, WeakMap.prototype.set and +// Set.prototype.add should be chainable + +var m = new Map(); +assertEq(m.set('oof', 'RAB'), m); +var a = m.set('foo', 'BAR').get('foo'); +assertEq(a, 'BAR'); diff --git a/js/src/jit-test/tests/collections/Map-set-size.js b/js/src/jit-test/tests/collections/Map-set-size.js new file mode 100644 index 0000000000..3c4a13c85e --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-set-size.js @@ -0,0 +1,14 @@ +// map.set(k, v) increments the map size iff map didn't already have an entry for k. + +var m = new Map(); +m.set('a', 0); +assertEq(m.size, 1); +m.set('a', 0); +assertEq(m.size, 1); +m.set('a', undefined); +assertEq(m.size, 1); + +m.set('b', 2); +assertEq(m.size, 2); +m.set('a', 1); +assertEq(m.size, 2); diff --git a/js/src/jit-test/tests/collections/Map-set-undefined.js b/js/src/jit-test/tests/collections/Map-set-undefined.js new file mode 100644 index 0000000000..44ad134a99 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-set-undefined.js @@ -0,0 +1,15 @@ +// Setting a Map key to undefined, or a missing argument, isn't the same as deleting it. + +var m = new Map; +m.set(42, undefined); +assertEq(m.has(42), true); +assertEq(m.get(42), undefined); + +m.set(42, "wrong"); +m.set(42); +assertEq(m.has(42), true); +assertEq(m.get(42), undefined); + +m.set(); +assertEq(m.has(undefined), true); +assertEq(m.get(undefined), undefined); diff --git a/js/src/jit-test/tests/collections/Map-size.js b/js/src/jit-test/tests/collections/Map-size.js new file mode 100644 index 0000000000..12cb6e7358 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-size.js @@ -0,0 +1,6 @@ +// Each Map has its own size. + +var m1 = new Map(), m2 = new Map(); +m1.set("x", 3); +assertEq(m1.size, 1); +assertEq(m2.size, 0); diff --git a/js/src/jit-test/tests/collections/Map-surfaces-1.js b/js/src/jit-test/tests/collections/Map-surfaces-1.js new file mode 100644 index 0000000000..827dd7b1ef --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-surfaces-1.js @@ -0,0 +1,48 @@ +// Map surfaces + +load(libdir + "iteration.js"); + +var desc = Object.getOwnPropertyDescriptor(this, "Map"); +assertEq(desc.enumerable, false); +assertEq(desc.configurable, true); +assertEq(desc.writable, true); + +assertEq(typeof Map, 'function'); +assertEq(Object.keys(Map).length, 0); +assertEq(Map.length, 0); +assertEq(Map.name, "Map"); + +assertEq(Object.getPrototypeOf(Map.prototype), Object.prototype); +assertEq(Object.prototype.toString.call(Map.prototype), "[object Map]"); +assertEq(Object.prototype.toString.call(new Map()), "[object Map]"); +assertEq(Object.keys(Map.prototype).join(), ""); +assertEq(Map.prototype.constructor, Map); + +function checkMethod(name, arity) { + var desc = Object.getOwnPropertyDescriptor(Map.prototype, name); + assertEq(desc.enumerable, false); + assertEq(desc.configurable, true); + assertEq(desc.writable, true); + assertEq(typeof desc.value, 'function'); + assertEq(desc.value.name, name); + assertEq(desc.value.length, arity); +} + +checkMethod("get", 1); +checkMethod("has", 1); +checkMethod("set", 2); +checkMethod("delete", 1); +checkMethod("keys", 0); +checkMethod("values", 0); +checkMethod("entries", 0); + +var desc = Object.getOwnPropertyDescriptor(Map.prototype, "size"); +assertEq(desc.enumerable, false); +assertEq(desc.configurable, true); +assertEq(typeof desc.get, 'function'); +assertEq(desc.get.length, 0); +assertEq(desc.set, undefined); +checkMethod("clear", 0); + +// Map.prototype[@@iterator] and .entries are the same function object. +assertEq(Map.prototype[Symbol.iterator], Map.prototype.entries); diff --git a/js/src/jit-test/tests/collections/Map-surfaces-2.js b/js/src/jit-test/tests/collections/Map-surfaces-2.js new file mode 100644 index 0000000000..7fb638b623 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-surfaces-2.js @@ -0,0 +1,29 @@ +// Map methods throw when passed a this-value that isn't a Map. + +load(libdir + "asserts.js"); + +function testcase(obj, fn, ...args) { + assertEq(typeof fn, "function"); + assertThrowsInstanceOf(function () { fn.apply(obj, args); }, TypeError); +} + +var Map_size_getter = Object.getOwnPropertyDescriptor(Map.prototype, "size").get; + +function test(obj) { + testcase(obj, Map.prototype.get, "x"); + testcase(obj, Map.prototype.has, "x"); + testcase(obj, Map.prototype.set, "x", 1); + testcase(obj, Map.prototype.delete, "x"); + testcase(obj, Map.prototype.clear); + testcase(obj, Map.prototype.keys); + testcase(obj, Map.prototype.values); + testcase(obj, Map.prototype.entries); + testcase(obj, Map_size_getter); +} + +test(Map.prototype); +test(Object.create(new Map)); +test(new Set()); +test({}); +test(null); +test(undefined); diff --git a/js/src/jit-test/tests/collections/Map-surfaces-3.js b/js/src/jit-test/tests/collections/Map-surfaces-3.js new file mode 100644 index 0000000000..41e072c91b --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-surfaces-3.js @@ -0,0 +1,14 @@ +// Map methods work when arguments are omitted. + +var m = new Map; +assertEq(m.has(), false); +assertEq(m.get(), undefined); +assertEq(m.delete(), false); +assertEq(m.has(), false); +assertEq(m.get(), undefined); +assertEq(m.set(), m); +assertEq(m.has(), true); +assertEq(m.get(), undefined); +assertEq(m.delete(), true); +assertEq(m.has(), false); +assertEq(m.get(), undefined); diff --git a/js/src/jit-test/tests/collections/Map-values-1.js b/js/src/jit-test/tests/collections/Map-values-1.js new file mode 100644 index 0000000000..8a31b59076 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-values-1.js @@ -0,0 +1,14 @@ +// map.keys(), .values(), and .entries() on an empty map produce empty iterators. + +var m = new Map(); +var ki = m.keys(), vi = m.values(), ei = m.entries(); +var p = Object.getPrototypeOf(ki) +assertEq(Object.getPrototypeOf(vi), p); +assertEq(Object.getPrototypeOf(ei), p); + +for (let k of ki) + throw "FAIL"; +for (let v of vi) + throw "FAIL"; +for (let [k, v] of ei) + throw "FAIL"; diff --git a/js/src/jit-test/tests/collections/Map-values-2.js b/js/src/jit-test/tests/collections/Map-values-2.js new file mode 100644 index 0000000000..d3bd192e39 --- /dev/null +++ b/js/src/jit-test/tests/collections/Map-values-2.js @@ -0,0 +1,18 @@ +// map.keys() and map.values() return iterators over the key or the value, +// respectively, of each key-value pair in the map. + +load(libdir + "iteration.js"); + +var data = [["one", 1], ["two", 2], ["three", 3], ["four", 4]]; +var m = new Map(data); + +var ki = m.keys(); +assertIteratorNext(ki, "one"); +assertIteratorNext(ki, "two"); +assertIteratorNext(ki, "three"); +assertIteratorNext(ki, "four"); +assertIteratorDone(ki, undefined); + +assertDeepEq([...m.keys()], ["one", "two", "three", "four"]); +assertDeepEq([...m.values()], [1, 2, 3, 4]); +assertDeepEq([...m.entries()], data); diff --git a/js/src/jit-test/tests/collections/Set-add-returns-this.js b/js/src/jit-test/tests/collections/Set-add-returns-this.js new file mode 100644 index 0000000000..88806b8d87 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-add-returns-this.js @@ -0,0 +1,7 @@ +// Bug 1031632 - Map.prototype.set, WeakMap.prototype.set and +// Set.prototype.add should be chainable + +var s = new Set(); +assertEq(s.add('BAR'), s); +var b = s.add('foo').has('foo'); +assertEq(b, true); diff --git a/js/src/jit-test/tests/collections/Set-add-size.js b/js/src/jit-test/tests/collections/Set-add-size.js new file mode 100644 index 0000000000..dfd131db67 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-add-size.js @@ -0,0 +1,11 @@ +// set.add(v) increments set.size iff the set did not already contain v. + +var s = new Set(); +for (var i = 0; i < 10; i++) { + assertEq(s.size, i); + s.add(i); +} +for (var i = 0; i < 10; i++) { + assertEq(s.size, 10); + s.add(i); +} diff --git a/js/src/jit-test/tests/collections/Set-clear-1.js b/js/src/jit-test/tests/collections/Set-clear-1.js new file mode 100644 index 0000000000..ce6bc19526 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-clear-1.js @@ -0,0 +1,8 @@ +// Clearing an empty Set has no effect. + +var s = new Set(); +for (var i = 0; i < 2; i++) { + s.clear(); + assertEq(s.size, 0); + assertEq(s.has(undefined), false); +} diff --git a/js/src/jit-test/tests/collections/Set-clear-2.js b/js/src/jit-test/tests/collections/Set-clear-2.js new file mode 100644 index 0000000000..f3bbd77da0 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-clear-2.js @@ -0,0 +1,16 @@ +// Clearing a Set removes its elements; the Set remains usable afterwards. + +var s = new Set(["x", "y", "z", "z", "y"]); +assertEq(s.size, 3); +s.clear(); +assertEq(s.size, 0); +assertEq(s.has("x"), false); +assertEq(s.delete("x"), false); +assertEq(s.has("z"), false); +for (var v of s) + throw "FAIL"; // shouldn't be any elements + +s.add("y"); +assertEq(s.size, 1); +assertEq(s.has("x"), false); +assertEq(s.has("z"), false); diff --git a/js/src/jit-test/tests/collections/Set-clear-3.js b/js/src/jit-test/tests/collections/Set-clear-3.js new file mode 100644 index 0000000000..0fe138212e --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-clear-3.js @@ -0,0 +1,10 @@ +// Clearing a Set with a nontrivial number of elements works. + +var s = new Set(); +for (var i = 0; i < 100; i++) + s.add(i); +assertEq(s.size, i); +s.clear(); +assertEq(s.size, 0); +s.add(12); +assertEq(s.has(12), true); diff --git a/js/src/jit-test/tests/collections/Set-clear-4.js b/js/src/jit-test/tests/collections/Set-clear-4.js new file mode 100644 index 0000000000..5551a07abe --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-clear-4.js @@ -0,0 +1,10 @@ +// Clearing a Set after deleting some entries works. + +var s = new Set(["a", "b", "c", "d"]); +for (var v of s) + if (v !== "c") + s.delete(v); +s.clear(); +assertEq(s.size, 0); +assertEq(s.has("c"), false); +assertEq(s.has("d"), false); diff --git a/js/src/jit-test/tests/collections/Set-clear-5.js b/js/src/jit-test/tests/collections/Set-clear-5.js new file mode 100644 index 0000000000..48c5bf8688 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-clear-5.js @@ -0,0 +1,14 @@ +// Set.clear is unaffected by deleting/monkeypatching Set.prototype.{delete,iterator}. + +var data = ["a", 1, {}]; +var s1 = new Set(data), s2 = new Set(data); + +delete Set.prototype.delete; +delete Set.prototype.iterator; +s1.clear(); +assertEq(s1.size, 0); + +Set.prototype.delete = function () { throw "FAIL"; }; +Set.prototype.iterator = function () { throw "FAIL"; }; +s2.clear(); +assertEq(s2.size, 0); diff --git a/js/src/jit-test/tests/collections/Set-clear-6.js b/js/src/jit-test/tests/collections/Set-clear-6.js new file mode 100644 index 0000000000..5c8cfce006 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-clear-6.js @@ -0,0 +1,6 @@ +// Clearing a Set doesn't affect expando properties. + +var s = new Set(); +s.x = 3; +s.clear(); +assertEq(s.x, 3); diff --git a/js/src/jit-test/tests/collections/Set-clear-iterators-1.js b/js/src/jit-test/tests/collections/Set-clear-iterators-1.js new file mode 100644 index 0000000000..b5198ed64a --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-clear-iterators-1.js @@ -0,0 +1,23 @@ +// A Set iterator does not visit entries removed by clear(). + +load(libdir + "iteration.js"); + +var s = new Set(); +var it = s[Symbol.iterator](); +s.clear(); +assertIteratorDone(it, undefined); + +s = new Set(["a", "b", "c", "d"]); +it = s[Symbol.iterator](); +assertIteratorNext(it, "a"); +s.clear(); +assertIteratorDone(it, undefined); + +var log = ""; +s = new Set(["a", "b", "c", "d"]); +for (var v of s) { + log += v; + if (v == "b") + s.clear(); +} +assertEq(log, "ab"); diff --git a/js/src/jit-test/tests/collections/Set-clear-iterators-2.js b/js/src/jit-test/tests/collections/Set-clear-iterators-2.js new file mode 100644 index 0000000000..3b80d42c33 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-clear-iterators-2.js @@ -0,0 +1,11 @@ +// A Set iterator continues to visit entries added after a clear(). + +load(libdir + "iteration.js"); + +var s = new Set(["a"]); +var it = s[Symbol.iterator](); +assertIteratorNext(it, "a"); +s.clear(); +s.add("b"); +assertIteratorNext(it, "b"); +assertIteratorDone(it, undefined); diff --git a/js/src/jit-test/tests/collections/Set-clear-iterators-3.js b/js/src/jit-test/tests/collections/Set-clear-iterators-3.js new file mode 100644 index 0000000000..c814d4ca9a --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-clear-iterators-3.js @@ -0,0 +1,10 @@ +// A closed Set iterator does not visit new entries added after a clear(). + +load(libdir + "iteration.js"); + +var s = new Set(); +var it = s[Symbol.iterator](); +assertIteratorDone(it, undefined); // close the iterator +s.clear(); +s.add("a"); +assertIteratorDone(it, undefined); diff --git a/js/src/jit-test/tests/collections/Set-constructor-1.js b/js/src/jit-test/tests/collections/Set-constructor-1.js new file mode 100644 index 0000000000..eab36af909 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-constructor-1.js @@ -0,0 +1,14 @@ +// The Set constructor creates an empty Set by default. + +load(libdir + "asserts.js"); + +var s = new Set(); +assertEq(s.size, 0); +s = new Set(undefined); +assertEq(s.size, 0); +s = new Set(null); +assertEq(s.size, 0); + +assertThrowsInstanceOf(() => Set(), TypeError); +assertThrowsInstanceOf(() => Set(undefined), TypeError); +assertThrowsInstanceOf(() => Set(null), TypeError); diff --git a/js/src/jit-test/tests/collections/Set-constructor-2.js b/js/src/jit-test/tests/collections/Set-constructor-2.js new file mode 100644 index 0000000000..43fffba8e8 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-constructor-2.js @@ -0,0 +1,18 @@ +// The Set constructor can take an argument that is an array. + +var s = new Set([]); +assertEq(s.size, 0); +assertEq(s.has(undefined), false); + +s = new Set(["one", "two", "three"]); +assertEq(s.size, 3); +assertEq(s.has("one"), true); +assertEq(s.has("eleventeen"), false); + +var a = [{}, {}, {}]; +s = new Set(a); +assertEq(s.size, 3); +for (let obj of a) + assertEq(s.has(obj), true); +assertEq(s.has({}), false); +assertEq(s.has("three"), false); diff --git a/js/src/jit-test/tests/collections/Set-constructor-3.js b/js/src/jit-test/tests/collections/Set-constructor-3.js new file mode 100644 index 0000000000..07bcd1a1dd --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-constructor-3.js @@ -0,0 +1,12 @@ +// The argument to Set may contain a value multiple times. Duplicates are discarded. + +var s = new Set(["testing", "testing", 123]); +assertEq(s.size, 2); + +var values = [undefined, null, false, NaN, 0, -0, 6.022e23, -Infinity, "", "xyzzy", {}, Math.sin]; +for (let v of values) { + var a = [v, {}, {}, {}, v, {}, v, v]; + s = new Set(a); + assertEq(s.size, 5); + assertEq(s.has(v), true); +} diff --git a/js/src/jit-test/tests/collections/Set-constructor-add.js b/js/src/jit-test/tests/collections/Set-constructor-add.js new file mode 100644 index 0000000000..8604c1386a --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-constructor-add.js @@ -0,0 +1,183 @@ +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var k1 = {}; +var k2 = {}; +var k3 = {}; +var k4 = {}; + +function test_patched() { + let orig = Set.prototype.add; + + // If adder is modified, constructor should call it. + var called = false; + + Set.prototype.add = function(k, v) { + assertEq(k, k1); + orig.call(this, k2); + called = true; + }; + + var arr = [k1]; + + var m = new Set(arr); + + assertEq(called, true); + assertEq(m.size, 1); + assertEq(m.has(k1), false); + assertEq(m.has(k2), true); + + Set.prototype.add = orig; +} + +function test_proxy1() { + let orig = Set.prototype.add; + + // If adder is modified, constructor should call it. + var called = false; + + Set.prototype.add = new Proxy(function(k, v) { + assertEq(k, k1); + orig.call(this, k2); + called = true; + }, {}); + + var arr = [k1]; + + var m = new Set(arr); + + assertEq(called, true); + assertEq(m.size, 1); + assertEq(m.has(k1), false); + assertEq(m.has(k2), true); + + Set.prototype.add = orig; +} + +function test_proxy2() { + let orig = Set.prototype.add; + + // If adder is modified, constructor should call it. + var called = false; + + Set.prototype.add = new Proxy(function() { + }, { + apply: function(target, that, args) { + var [k, v] = args; + assertEq(k, k1); + orig.call(that, k2); + called = true; + } + }); + + var arr = [k1]; + + var m = new Set(arr); + + assertEq(called, true); + assertEq(m.size, 1); + assertEq(m.has(k1), false); + assertEq(m.has(k2), true); + + Set.prototype.add = orig; +} + +function test_change1() { + let orig = Set.prototype.add; + + // Change to adder in GetIterator(..) call should be ignored. + var called = false; + var modified = false; + + var arr = [k1]; + + var proxy_arr = new Proxy(arr, { + get: function(target, name) { + if (name == Symbol.iterator) { + modified = true; + Set.prototype.add = function() { + called = true; + }; + } + return target[name]; + } + }); + + var m = new Set(proxy_arr); + + assertEq(modified, true); + assertEq(called, false); + assertEq(m.size, 1); + assertEq(m.has(k1), true); + assertEq(m.has(k2), false); + + Set.prototype.add = orig; +} + +function test_change2() { + let orig = Set.prototype.add; + + // Change to adder in adder(...) call should be ignored. + var called = false; + var count = 0; + + Set.prototype.add = function(k, v) { + if (count == 0) { + assertEq(k, k1); + orig.call(this, k3); + Set.prototype.add = function() { + called = true; + }; + count = 1; + } else { + assertEq(k, k2); + orig.call(this, k4); + count = 2; + } + }; + + var arr = [k1, k2]; + + var m = new Set(arr); + + assertEq(called, false); + assertEq(count, 2); + assertEq(m.size, 2); + assertEq(m.has(k1), false); + assertEq(m.has(k2), false); + assertEq(m.has(k3), true); + assertEq(m.has(k4), true); + + Set.prototype.add = orig; +} + +function test_error() { + let orig = Set.prototype.add; + + var arr = [k1]; + + // Set should throw TypeError if adder is not callable. + Set.prototype.add = null; + assertThrowsInstanceOf(() => new Set(arr), TypeError); + Set.prototype.add = {}; + assertThrowsInstanceOf(() => new Set(arr), TypeError); + + // Set should propagate error thrown by adder. + Set.prototype.add = function() { + throw SyntaxError(); + }; + assertThrowsInstanceOf(() => new Set(arr), SyntaxError); + + Set.prototype.add = orig; +} + +function test() { + test_patched(); + test_proxy1(); + test_proxy2(); + test_change1(); + test_change2(); + test_error(); +} + +test(); diff --git a/js/src/jit-test/tests/collections/Set-constructor-generator-1.js b/js/src/jit-test/tests/collections/Set-constructor-generator-1.js new file mode 100644 index 0000000000..c9c760f7ef --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-constructor-generator-1.js @@ -0,0 +1,12 @@ +// The argument to Set can be a generator. + +function* hexData(n) { + for (var i = 0; i < n; i++) + yield i.toString(16); +} + +var s = new Set(hexData(256)); +assertEq(s.size, 256); +assertEq(s.has("0"), true); +assertEq(s.has(0), false); +assertEq(s.has("ff"), true); diff --git a/js/src/jit-test/tests/collections/Set-delete-size.js b/js/src/jit-test/tests/collections/Set-delete-size.js new file mode 100644 index 0000000000..524978b817 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-delete-size.js @@ -0,0 +1,15 @@ +// set.delete(v) decrements set.size iff the set contained v. + +var s = new Set(); +for (var i = 0; i < 10; i++) + s.add(i); + +for (var i = 10; i > 0; i--) { + assertEq(s.size, i); + assertEq(s.delete(i), false); + assertEq(s.size, i); + assertEq(s.delete(i - 1), true); + assertEq(s.size, i - 1); + assertEq(s.delete(i - 1), false); + assertEq(s.size, i - 1); +} diff --git a/js/src/jit-test/tests/collections/Set-forEach.js b/js/src/jit-test/tests/collections/Set-forEach.js new file mode 100644 index 0000000000..35ba036bcf --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-forEach.js @@ -0,0 +1,49 @@ +/* test Set.prototype.forEach */ + +load(libdir + 'asserts.js'); +load(libdir + 'iteration.js'); + +// testing success conditions of Set.prototype.forEach + +var testSet = new Set(); + +function callback(value, key, set) { + assertEq(value, key); + testSet.add(value); + assertEq(set.has(key), true); +} + +var initialSet = new Set(['a', 1, undefined]); +initialSet.forEach(callback); + +// test that both the Sets are equal and are in same order +var iterator = initialSet[Symbol.iterator](); +var count = 0; +for (var v of testSet) { + assertEq(initialSet.has(v), true); + assertIteratorNext(iterator, v); + count++; +} + +//check both the Sets we have are equal in size +assertEq(initialSet.size, testSet.size); +assertEq(initialSet.size, count); + +var x = { abc: 'test'}; +function callback2(value, key, set) { + assertEq(x, this); +} +initialSet = new Set(['a']); +initialSet.forEach(callback2, x); + +// testing failure conditions of Set.prototype.forEach + +var m = new Map([['a', 1], ['b', 2.3], ['c', undefined]]); +assertThrowsInstanceOf(function() { + Set.prototype.forEach.call(m, callback); +}, TypeError, "Set.prototype.forEach should raise TypeError if not a used on a Set"); + +var fn = 2; +assertThrowsInstanceOf(function() { + initialSet.forEach(fn); +}, TypeError, "Set.prototype.forEach should raise TypeError if callback is not a function"); diff --git a/js/src/jit-test/tests/collections/Set-iterator-1.js b/js/src/jit-test/tests/collections/Set-iterator-1.js new file mode 100644 index 0000000000..c0bd8fc5a3 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-1.js @@ -0,0 +1,11 @@ +// for-of can be used to iterate over a Set twice. + +var set = new Set(['a', 'b', 'c']); +var log = ''; + +for (let i = 0; i < 2; i++) { + for (let x of set) + log += x; + log += ';' +} +assertEq(log, 'abc;abc;'); diff --git a/js/src/jit-test/tests/collections/Set-iterator-2.js b/js/src/jit-test/tests/collections/Set-iterator-2.js new file mode 100644 index 0000000000..32737a285e --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-2.js @@ -0,0 +1,11 @@ +// Nested for-of loops can iterate over a Set. + +var map = new Set(['a', 'b']); +var log = ''; +for (let x of map) { + log += x + ':' + for (let y of map) + log += y; + log += ';' +}; +assertEq(log, 'a:ab;b:ab;'); diff --git a/js/src/jit-test/tests/collections/Set-iterator-3.js b/js/src/jit-test/tests/collections/Set-iterator-3.js new file mode 100644 index 0000000000..c337acb2f6 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-3.js @@ -0,0 +1,11 @@ +// Iterating over a set of objects yields those exact objects. + +var arr = [{}, {}, {}, [], /xyz/, new Date]; +var set = new Set(arr); +assertEq(set.size, arr.length); + +var i = 0; +for (var x of set) + assertEq(x, arr[i++]); +assertEq(i, arr.length); + diff --git a/js/src/jit-test/tests/collections/Set-iterator-add-1.js b/js/src/jit-test/tests/collections/Set-iterator-add-1.js new file mode 100644 index 0000000000..9f07929239 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-add-1.js @@ -0,0 +1,11 @@ +// set.iterator() is live: entries added during iteration are visited. + +var set = new Set([5]); +var log = ''; +for (let x of set) { + log += x + ';'; + if (x > 0) + set.add(x - 1); +} +assertEq(log, '5;4;3;2;1;0;'); +assertEq(set.size, 6); diff --git a/js/src/jit-test/tests/collections/Set-iterator-add-2.js b/js/src/jit-test/tests/collections/Set-iterator-add-2.js new file mode 100644 index 0000000000..211614a4cf --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-add-2.js @@ -0,0 +1,10 @@ +// A Set iterator does not iterate over new entries added after it throws StopIteration. + +load(libdir + "iteration.js"); + +var set = new Set(); +var iter0 = set[Symbol.iterator](), iter1 = set[Symbol.iterator](); +assertIteratorDone(iter0, undefined); // closes iter0 +set.add("x"); +assertIteratorDone(iter0, undefined); // already closed +assertIteratorNext(iter1, "x"); // was not yet closed diff --git a/js/src/jit-test/tests/collections/Set-iterator-add-remove.js b/js/src/jit-test/tests/collections/Set-iterator-add-remove.js new file mode 100644 index 0000000000..b0d3518daf --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-add-remove.js @@ -0,0 +1,13 @@ +// Removing and re-adding entries while an iterator is live causes the iterator to visit them again. + +var set = new Set(['a']); +var n = 5; +for (let v of set) { + assertEq(v, 'a'); + if (n === 0) + break; + set.delete('a'); + set.add('a'); + n--; +} +assertEq(n, 0); diff --git a/js/src/jit-test/tests/collections/Set-iterator-gc-2.js b/js/src/jit-test/tests/collections/Set-iterator-gc-2.js new file mode 100644 index 0000000000..41979b86a8 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-gc-2.js @@ -0,0 +1,8 @@ +// GC-ing during a for-of loop doesn't crash. + +var i = 0; +for (var x of new Set(Object.getOwnPropertyNames(this))) { + gc(); + if (++i >= 20) + break; +} diff --git a/js/src/jit-test/tests/collections/Set-iterator-gc-3.js b/js/src/jit-test/tests/collections/Set-iterator-gc-3.js new file mode 100644 index 0000000000..88c428b006 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-gc-3.js @@ -0,0 +1,20 @@ +// GC in nested for-loops is safe. + +var x; +for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + for (x of new Set([1])) + gc(); diff --git a/js/src/jit-test/tests/collections/Set-iterator-order.js b/js/src/jit-test/tests/collections/Set-iterator-order.js new file mode 100644 index 0000000000..3ac8425076 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-order.js @@ -0,0 +1,14 @@ +// Set iterators produces entries in the order they were inserted. + +var set = new Set(); +var i; +for (i = 7; i !== 1; i = i * 7 % 1117) + set.add(i); +assertEq(set.size, 557); + +i = 7; +for (var v of set) { + assertEq(v, i); + i = i * 7 % 1117; +} +assertEq(i, 1); diff --git a/js/src/jit-test/tests/collections/Set-iterator-proxies-1.js b/js/src/jit-test/tests/collections/Set-iterator-proxies-1.js new file mode 100644 index 0000000000..c3d041d088 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-proxies-1.js @@ -0,0 +1,8 @@ +// for-of works on a cross-compartment wrapper of a Set. + +var g = newGlobal(); +var mw = g.eval("new Set(['a', 'b', 1, 2])"); +var log = ''; +for (let x of mw) + log += x; +assertEq(log, "ab12"); diff --git a/js/src/jit-test/tests/collections/Set-iterator-proxies-2.js b/js/src/jit-test/tests/collections/Set-iterator-proxies-2.js new file mode 100644 index 0000000000..75e4565148 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-proxies-2.js @@ -0,0 +1,20 @@ +// map.iterator() and iter.next() are non-generic but work on cross-compartment wrappers. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var g = newGlobal(); + +var iterator_fn = Set.prototype[Symbol.iterator]; +assertThrowsInstanceOf(function () { iterator_fn.call({}); }, TypeError); +assertThrowsInstanceOf(function () { iterator_fn.call(new Map()); }, TypeError); +var setw = g.eval("new Set(['x', 'y'])"); +assertIteratorNext(iterator_fn.call(setw), "x"); + +var next_fn = (new Set())[Symbol.iterator]().next; +assertThrowsInstanceOf(function () { next_fn.call({}); }, TypeError); +assertThrowsInstanceOf(function () { next_fn.call((new Map())[Symbol.iterator]()); }, TypeError); +var iterw = setw[Symbol.iterator](); +assertIteratorResult(next_fn.call(iterw), "x", false); +assertIteratorResult(next_fn.call(iterw), "y", false); +assertIteratorResult(next_fn.call(iterw), undefined, true); diff --git a/js/src/jit-test/tests/collections/Set-iterator-remove-1.js b/js/src/jit-test/tests/collections/Set-iterator-remove-1.js new file mode 100644 index 0000000000..31ac12f1ac --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-remove-1.js @@ -0,0 +1,26 @@ +// A set iterator can cope with removing the current entry. + +function test(letters, toRemove) { + var set = new Set(letters); + toRemove = new Set(toRemove); + + var leftovers = [...set].filter(x => !toRemove.has(x)).join(""); + + var log = ""; + for (let x of set) { + log += x; + if (toRemove.has(x)) + set.delete(x); + } + assertEq(log, letters); + + var remaining = [...set].join(""); + assertEq(remaining, leftovers); +} + +test('a', 'a'); // removing the only entry +test('abc', 'a'); // removing the first entry +test('abc', 'b'); // removing a middle entry +test('abc', 'c'); // removing the last entry +test('abc', 'abc') // removing all entries + diff --git a/js/src/jit-test/tests/collections/Set-iterator-remove-2.js b/js/src/jit-test/tests/collections/Set-iterator-remove-2.js new file mode 100644 index 0000000000..e78d8a182f --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-remove-2.js @@ -0,0 +1,13 @@ +// A map iterator can cope with removing the next entry. + +load(libdir + "iteration.js"); + +var set = new Set("abcd"); +var iter = set[Symbol.iterator](); +var log = ""; +for (let x of iter) { + log += x; + if (x === "b") + set.delete("c"); +} +assertEq(log, "abd"); diff --git a/js/src/jit-test/tests/collections/Set-iterator-remove-3.js b/js/src/jit-test/tests/collections/Set-iterator-remove-3.js new file mode 100644 index 0000000000..fd9f498833 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-remove-3.js @@ -0,0 +1,12 @@ +// A set iterator can cope with removing the next entry, then the current entry. + +load(libdir + "iteration.js"); + +var set = new Set("abcd"); +var iter = set[Symbol.iterator](); +assertIteratorNext(iter, "a"); +assertIteratorNext(iter, "b"); +set.delete("c"); +set.delete("b"); +assertIteratorNext(iter, "d"); +assertIteratorDone(iter, undefined); diff --git a/js/src/jit-test/tests/collections/Set-iterator-remove-4.js b/js/src/jit-test/tests/collections/Set-iterator-remove-4.js new file mode 100644 index 0000000000..78f3b66e64 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-remove-4.js @@ -0,0 +1,31 @@ +// Multiple live iterators on the same Set can cope with removing entries. + +load(libdir + "iteration.js"); + +// Make a set. +var set = new Set(); +var SIZE = 7; +for (var j = 0; j < SIZE; j++) + set.add(j); + +// Make lots of iterators pointing to entry 2 of the set. +var NITERS = 5; +var iters = []; +for (var i = 0; i < NITERS; i++) { + var iter = set[Symbol.iterator](); + assertIteratorNext(iter, 0); + assertIteratorNext(iter, 1); + iters[i] = iter; +} + +// Remove half of the set entries. +for (var j = 0; j < SIZE; j += 2) + set.delete(j); + +// Make sure all the iterators still work. +for (var i = 0; i < NITERS; i++) { + var iter = iters[i]; + for (var j = 3; j < SIZE; j += 2) + assertIteratorNext(iter, j); + assertIteratorDone(iter, undefined); +} diff --git a/js/src/jit-test/tests/collections/Set-iterator-remove-5.js b/js/src/jit-test/tests/collections/Set-iterator-remove-5.js new file mode 100644 index 0000000000..378accc3ac --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-remove-5.js @@ -0,0 +1,22 @@ +// Removing a Set entry already visited by an iterator does not cause any +// entries to be skipped. + +var str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; +var set = new Set(str); + +var log = ''; +var i = 0; +for (var x of set) { + log += x; + if (i++ % 5 === 0) { + // Delete all entries preceding this one. + for (let y of set) { + if (y === x) + break; + set.delete(y); + } + } +} +assertEq(log, str); +assertEq(set.size, 1); // Elements 0 to 24 are removed, leaving only 25 (Z). +assertEq(set.has('Z'), true); diff --git a/js/src/jit-test/tests/collections/Set-iterator-remove-6.js b/js/src/jit-test/tests/collections/Set-iterator-remove-6.js new file mode 100644 index 0000000000..923ae631c0 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-iterator-remove-6.js @@ -0,0 +1,20 @@ +// Removing many Set entries does not cause a live iterator to skip any of the +// entries that were not removed. (Compacting a Set must not be observable to +// script.) + +load(libdir + "iteration.js"); + +var set = new Set(); +for (var i = 0; i < 32; i++) + set.add(i); +var iter = set[Symbol.iterator](); +assertIteratorNext(iter, 0); +for (var i = 0; i < 30; i++) + set.delete(i); +assertEq(set.size, 2); +for (var i = 32; i < 100; i++) + set.add(i); // eventually triggers compaction + +for (var i = 30; i < 100; i++) + assertIteratorNext(iter, i); +assertIteratorDone(iter, undefined); diff --git a/js/src/jit-test/tests/collections/Set-scale.js b/js/src/jit-test/tests/collections/Set-scale.js new file mode 100644 index 0000000000..5c5af2a5a8 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-scale.js @@ -0,0 +1,8 @@ +// Sets can hold at least 64K values. + +var N = 1 << 16; +var s = new Set; +for (var i = 0; i < N; i++) + assertEq(s.add(i), s); +for (var i = 0; i < N; i++) + assertEq(s.has(i), true); diff --git a/js/src/jit-test/tests/collections/Set-size.js b/js/src/jit-test/tests/collections/Set-size.js new file mode 100644 index 0000000000..7aca1d3b75 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-size.js @@ -0,0 +1,7 @@ +// Each Set has its own size. + +var s1 = new Set(), s2 = new Set(); +for (var i = 0; i < 30; i++) + s1.add(i); +assertEq(s1.size, 30); +assertEq(s2.size, 0); diff --git a/js/src/jit-test/tests/collections/Set-surfaces-1.js b/js/src/jit-test/tests/collections/Set-surfaces-1.js new file mode 100644 index 0000000000..cd8573868c --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-surfaces-1.js @@ -0,0 +1,47 @@ +// Set surfaces + +load(libdir + "iteration.js"); + +var desc = Object.getOwnPropertyDescriptor(this, "Set"); +assertEq(desc.enumerable, false); +assertEq(desc.configurable, true); +assertEq(desc.writable, true); + +assertEq(typeof Set, 'function'); +assertEq(Object.keys(Set).length, 0); +assertEq(Set.length, 0); +assertEq(Set.name, "Set"); + +assertEq(Object.getPrototypeOf(Set.prototype), Object.prototype); +assertEq(Object.prototype.toString.call(Set.prototype), "[object Set]"); +assertEq(Object.prototype.toString.call(new Set()), "[object Set]"); +assertEq(Object.keys(Set.prototype).join(), ""); +assertEq(Set.prototype.constructor, Set); + +function checkMethod(name, arity) { + var desc = Object.getOwnPropertyDescriptor(Set.prototype, name); + assertEq(desc.enumerable, false); + assertEq(desc.configurable, true); + assertEq(desc.writable, true); + assertEq(typeof desc.value, 'function'); + assertEq(desc.value.name, name); + assertEq(desc.value.length, arity); +} + +checkMethod("has", 1); +checkMethod("add", 1); +checkMethod("delete", 1); +checkMethod("values", 0); +checkMethod("entries", 0); + +var desc = Object.getOwnPropertyDescriptor(Set.prototype, "size"); +assertEq(desc.enumerable, false); +assertEq(desc.configurable, true); +assertEq(typeof desc.get, 'function'); +assertEq(desc.get.length, 0); +assertEq(desc.set, undefined); +checkMethod("clear", 0); + +// Set.prototype.keys, .values, and .iterator are the same function object +assertEq(Set.prototype.keys, Set.prototype.values); +assertEq(Set.prototype[Symbol.iterator], Set.prototype.values); diff --git a/js/src/jit-test/tests/collections/Set-surfaces-2.js b/js/src/jit-test/tests/collections/Set-surfaces-2.js new file mode 100644 index 0000000000..3d43b0da1c --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-surfaces-2.js @@ -0,0 +1,28 @@ +// Set methods throw when passed a this-value that isn't a Set. + +load(libdir + "asserts.js"); + +function testcase(obj, fn, ...args) { + assertEq(typeof fn, "function"); + assertThrowsInstanceOf(function () { fn.apply(obj, args); }, TypeError); +} + +var Set_size_getter = Object.getOwnPropertyDescriptor(Set.prototype, "size").get; + +function test(obj) { + testcase(obj, Set.prototype.has, 12); + testcase(obj, Set.prototype.add, 12); + testcase(obj, Set.prototype.delete, 12); + testcase(obj, Set.prototype.clear); + testcase(obj, Set.prototype.keys); + testcase(obj, Set.prototype.values); + testcase(obj, Set.prototype.entries); + testcase(obj, Set_size_getter); +} + +test(Set.prototype); +test(Object.create(new Set)); +test(new Map()); +test({}); +test(null); +test(undefined); diff --git a/js/src/jit-test/tests/collections/Set-surfaces-3.js b/js/src/jit-test/tests/collections/Set-surfaces-3.js new file mode 100644 index 0000000000..b487b7b22f --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-surfaces-3.js @@ -0,0 +1,10 @@ +// Set methods work when arguments are omitted. + +var s = new Set; +assertEq(s.has(), false); +assertEq(s.delete(), false); +assertEq(s.has(), false); +assertEq(s.add(), s); +assertEq(s.has(), true); +assertEq(s.delete(), true); +assertEq(s.has(), false); diff --git a/js/src/jit-test/tests/collections/Set-values-1.js b/js/src/jit-test/tests/collections/Set-values-1.js new file mode 100644 index 0000000000..31acf42d07 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-values-1.js @@ -0,0 +1,14 @@ +// set.keys(), .values(), and .entries() on an empty set produce empty iterators + +var s = new Set(); +var ki = s.keys(), vi = s.values(), ei = s.entries(); +var p = Object.getPrototypeOf(ki); +assertEq(Object.getPrototypeOf(vi), p); +assertEq(Object.getPrototypeOf(ei), p); + +for (let k of ki) + throw "FAIL"; +for (let v of vi) + throw "FAIL"; +for (let [k, v] of ei) + throw "FAIL"; diff --git a/js/src/jit-test/tests/collections/Set-values-2.js b/js/src/jit-test/tests/collections/Set-values-2.js new file mode 100644 index 0000000000..2367c4df91 --- /dev/null +++ b/js/src/jit-test/tests/collections/Set-values-2.js @@ -0,0 +1,18 @@ +// set.keys() and set.values() return iterators over the elements +// and set.entries() returns an iterator that yields pairs [e, e]. + +load(libdir + "iteration.js"); + +var data = [1, 2, 3, 4]; +var s = new Set(data); + +var ki = s.keys(); +assertIteratorNext(ki, 1); +assertIteratorNext(ki, 2); +assertIteratorNext(ki, 3); +assertIteratorNext(ki, 4); +assertIteratorDone(ki, undefined); + +assertDeepEq([...s.keys()], data); +assertDeepEq([...s.values()], data); +assertDeepEq([...s.entries()], [[1, 1], [2, 2], [3, 3], [4, 4]]); diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-1.js b/js/src/jit-test/tests/collections/WeakMap-constructor-1.js new file mode 100644 index 0000000000..ab73feb51c --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-1.js @@ -0,0 +1,11 @@ +// The WeakMap constructor creates an empty WeakMap by default. + +load(libdir + "asserts.js"); + +new WeakMap(); +new WeakMap(undefined); +new WeakMap(null); + +assertThrowsInstanceOf(() => WeakMap(), TypeError); +assertThrowsInstanceOf(() => WeakMap(undefined), TypeError); +assertThrowsInstanceOf(() => WeakMap(null), TypeError); diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-2.js b/js/src/jit-test/tests/collections/WeakMap-constructor-2.js new file mode 100644 index 0000000000..4c64d9e9ff --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-2.js @@ -0,0 +1,37 @@ +// The WeakMap constructor can take an argument that is an array of pairs. + +var k1 = {}; +var v1 = 42; +var k2 = {}; +var v2 = 43; +var k3 = {}; + +var arr = [[k1, v1], [k2, v2]]; + +var m = new WeakMap(arr); + +assertEq(m.has(k1), true); +assertEq(m.has(k2), true); +assertEq(m.has(k3), false); +assertEq(m.get(k1), v1); +assertEq(m.get(k2), v2); +assertEq(m.get(k3), undefined); + +var arraylike1 = { + 0: k1, + 1: v1 +}; +var arraylike2 = { + 0: k2, + 1: v2 +}; +arr = [arraylike1, arraylike2]; + +m = new WeakMap(arr); + +assertEq(m.has(k1), true); +assertEq(m.has(k2), true); +assertEq(m.has(k3), false); +assertEq(m.get(k1), v1); +assertEq(m.get(k2), v2); +assertEq(m.get(k3), undefined); diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-3.js b/js/src/jit-test/tests/collections/WeakMap-constructor-3.js new file mode 100644 index 0000000000..ab18a2151e --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-3.js @@ -0,0 +1,35 @@ +// WeakMap can take an argument that is an array of singleton arrays. + +var k1 = {}; +var k2 = {}; +var k3 = {}; + +var arr = [[k1], [k2]]; + +var m = new WeakMap(arr); + +assertEq(m.has(k1), true); +assertEq(m.has(k2), true); +assertEq(m.has(k3), false); +assertEq(m.get(k1), undefined); +assertEq(m.get(k2), undefined); +assertEq(m.get(k3), undefined); + +var arraylike1 = { + 0: k1, + 1: undefined +}; +var arraylike2 = { + 0: k2, +}; + +arr = [arraylike1, arraylike2]; + +m = new WeakMap(arr); + +assertEq(m.has(k1), true); +assertEq(m.has(k2), true); +assertEq(m.has(k3), false); +assertEq(m.get(k1), undefined); +assertEq(m.get(k2), undefined); +assertEq(m.get(k3), undefined); diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-4.js b/js/src/jit-test/tests/collections/WeakMap-constructor-4.js new file mode 100644 index 0000000000..6b87d66f59 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-4.js @@ -0,0 +1,6 @@ +// new WeakMap(x) throws if x is not iterable (unless x is undefined). + +load(libdir + "asserts.js"); +var nonIterables = [true, 1, -0, 3.14, NaN, {}, Math, this]; +for (let k of nonIterables) + assertThrowsInstanceOf(function () { new WeakMap(k); }, TypeError); diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-5.js b/js/src/jit-test/tests/collections/WeakMap-constructor-5.js new file mode 100644 index 0000000000..3ef7300bea --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-5.js @@ -0,0 +1,23 @@ +// new WeakMap(arr) throws if arr contains holes (or undefined values). + +load(libdir + "asserts.js"); + +var k1 = {}; +var v1 = 42; +var k2 = {}; +var v2 = 43; +var k3 = {}; +var v3 = {}; + +assertThrowsInstanceOf(function () { new WeakMap([undefined]); }, TypeError); +assertThrowsInstanceOf(function () { new WeakMap([null]); }, TypeError); +assertThrowsInstanceOf(function () { new WeakMap([[k1, v1], [k2, v2], , [k3, k3]]); }, TypeError); +assertThrowsInstanceOf(function () { new WeakMap([[k1, v1], [k2, v2], ,]); }, TypeError); + +// new WeakMap(iterable) throws if iterable doesn't have array-like objects + +assertThrowsInstanceOf(function () { new WeakMap([1, 2, 3]); }, TypeError); +assertThrowsInstanceOf(function () { + let s = new Set([1, 2, "abc"]); + new WeakMap(s); +}, TypeError); diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-arraylike-exception.js b/js/src/jit-test/tests/collections/WeakMap-constructor-arraylike-exception.js new file mode 100644 index 0000000000..bbb1b43bdd --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-arraylike-exception.js @@ -0,0 +1,23 @@ +// WeakMap constructor should propagate exception while getting key and value. + +load(libdir + "asserts.js"); + +var k1 = {}; +var v1 = 42; + +var error_thrower_0 = { + get 0() { + throw new Error; + }, + 1: v1 +}; +assertThrowsInstanceOf(() => new WeakMap([error_thrower_0]), Error); + +var error_thrower_1 = { + 0: k1, + get 1() { + throw new Error; + } +}; +assertThrowsInstanceOf(() => new WeakMap([error_thrower_1]), Error); + diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-duplicates.js b/js/src/jit-test/tests/collections/WeakMap-constructor-duplicates.js new file mode 100644 index 0000000000..5e5f3a58e9 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-duplicates.js @@ -0,0 +1,27 @@ +// When the argument to WeakMap contains a key multiple times, the last value +// is retained. + +var k1 = {}; +var v1 = 42; +var k2 = {}; +var v2 = 43; +var k3 = {}; +var v3 = 44; +var k4 = {}; + +var wrong1 = 8; +var wrong2 = 9; +var wrong3 = 10; + +var arr = [[k1, wrong1], [k2, v2], [k3, wrong2], [k1, wrong3], [k3, v3], [k1, v1]]; + +var m = new WeakMap(arr); + +assertEq(m.has(k1), true); +assertEq(m.has(k2), true); +assertEq(m.has(k3), true); +assertEq(m.has(k4), false); +assertEq(m.get(k1), v1); +assertEq(m.get(k2), v2); +assertEq(m.get(k3), v3); +assertEq(m.get(k4), undefined); diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-generator-1.js b/js/src/jit-test/tests/collections/WeakMap-constructor-generator-1.js new file mode 100644 index 0000000000..4b03c2ab82 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-generator-1.js @@ -0,0 +1,25 @@ +// The argument to WeakMap can be a generator. + +var k1 = {}; +var v1 = 42; +var k2 = {}; +var v2 = 43; +var k3 = {}; + +var done = false; + +function* data() { + yield [k1, v1]; + yield [k2, v2]; + done = true; +}; + +m = new WeakMap(data()); + +assertEq(done, true); // the constructor consumes the argument +assertEq(m.has(k1), true); +assertEq(m.has(k2), true); +assertEq(m.has(k3), false); +assertEq(m.get(k1), v1); +assertEq(m.get(k2), v2); +assertEq(m.get(k3), undefined); diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-generator-3.js b/js/src/jit-test/tests/collections/WeakMap-constructor-generator-3.js new file mode 100644 index 0000000000..a860a61d65 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-generator-3.js @@ -0,0 +1,6 @@ +// The argument to WeakMap may be a generator-iterator that produces no values. + +function* none() { + if (0) yield 0; +} +new WeakMap(none()); diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-generator-exception.js b/js/src/jit-test/tests/collections/WeakMap-constructor-generator-exception.js new file mode 100644 index 0000000000..996b8e7c73 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-generator-exception.js @@ -0,0 +1,13 @@ +// Iterating over the argument to WeakMap can throw. The exception is +// propagated. + +load(libdir + "asserts.js"); + +function* data() { + yield [{}, "XR22/Z"]; + yield [{}, "23D-BN"]; + throw "oops"; +} + +var it2 = data(); +assertThrowsValue(() => new WeakMap(it2), "oops"); diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-iterable.js b/js/src/jit-test/tests/collections/WeakMap-constructor-iterable.js new file mode 100644 index 0000000000..f5eac8e30d --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-iterable.js @@ -0,0 +1,28 @@ +// The argument to WeakMap can be a iterable object. + +load(libdir + "iteration.js"); + +var k1 = {}; +var v1 = 42; +var k2 = {}; +var v2 = 43; +var k3 = {}; + +var done = false; + +var iterable = {}; +iterable[Symbol.iterator] = function*() { + yield [k1, v1]; + yield [k2, v2]; + done = true; +}; +var m = new WeakMap(iterable); + +assertEq(done, true); // the constructor consumes the argument +assertEq(m.has(k1), true); +assertEq(m.has(k2), true); +assertEq(m.has(k3), false); +assertEq(m.get(k1), v1); +assertEq(m.get(k2), v2); +assertEq(m.get(k3), undefined); + diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-non-iterable.js b/js/src/jit-test/tests/collections/WeakMap-constructor-non-iterable.js new file mode 100644 index 0000000000..427818d775 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-non-iterable.js @@ -0,0 +1,13 @@ +// WeakMap should throw if argument is not iterable object. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var non_iterable1 = {}; +non_iterable1[Symbol.iterator] = {}; +assertThrowsInstanceOf(() => new WeakMap(non_iterable1), TypeError); + +var non_iterable2 = {}; +non_iterable2[Symbol.iterator] = function() { +}; +assertThrowsInstanceOf(() => new WeakMap(non_iterable2), TypeError); diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-nonnull.js b/js/src/jit-test/tests/collections/WeakMap-constructor-nonnull.js new file mode 100644 index 0000000000..5cae35a38f --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-nonnull.js @@ -0,0 +1,11 @@ +// WeakMap constructor should throw when key is nonnull. + +load(libdir + "asserts.js"); + +var v1 = 42; + +var primitive = 10; +assertThrowsInstanceOf(() => new WeakMap([[primitive, v1]]), TypeError); + +var empty_array = []; +assertThrowsInstanceOf(() => new WeakMap([empty_array]), TypeError); diff --git a/js/src/jit-test/tests/collections/WeakMap-constructor-set.js b/js/src/jit-test/tests/collections/WeakMap-constructor-set.js new file mode 100644 index 0000000000..4026f824c3 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-constructor-set.js @@ -0,0 +1,199 @@ +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var k1 = {}; +var v1 = 42; +var k2 = {}; +var v2 = 42; +var k3 = {}; +var v3 = 43; +var k4 = {}; +var v4 = 44; + +function test_patched() { + let orig = WeakMap.prototype.set; + + // If adder is modified, constructor should call it. + var called = false; + + WeakMap.prototype.set = function(k, v) { + assertEq(k, k1); + assertEq(v, v1); + orig.call(this, k2, v2); + called = true; + }; + + var arr = [[k1, v1]]; + + var m = new WeakMap(arr); + + assertEq(called, true); + assertEq(m.has(k1), false); + assertEq(m.has(k2), true); + assertEq(m.get(k1), undefined); + assertEq(m.get(k2), v2); + + WeakMap.prototype.set = orig; +} + +function test_proxy1() { + let orig = WeakMap.prototype.set; + + // If adder is modified, constructor should call it. + var called = false; + + WeakMap.prototype.set = new Proxy(function(k, v) { + assertEq(k, k1); + assertEq(v, v1); + orig.call(this, k2, v2); + called = true; + }, {}); + + var arr = [[k1, v1]]; + + var m = new WeakMap(arr); + + assertEq(called, true); + assertEq(m.has(k1), false); + assertEq(m.has(k2), true); + assertEq(m.get(k1), undefined); + assertEq(m.get(k2), v2); + + WeakMap.prototype.set = orig; +} + +function test_proxy2() { + let orig = WeakMap.prototype.set; + + // If adder is modified, constructor should call it. + var called = false; + + WeakMap.prototype.set = new Proxy(function() { + }, { + apply: function(target, that, args) { + var [k, v] = args; + assertEq(k, k1); + assertEq(v, v1); + orig.call(that, k2, v2); + called = true; + } + }); + + var arr = [[k1, v1]]; + + var m = new WeakMap(arr); + + assertEq(called, true); + assertEq(m.has(k1), false); + assertEq(m.has(k2), true); + assertEq(m.get(k1), undefined); + assertEq(m.get(k2), v2); + + WeakMap.prototype.set = orig; +} + +function test_change1() { + let orig = WeakMap.prototype.set; + + // Change to adder in GetIterator(..) call should be ignored. + var called = false; + var modified = false; + + var arr = [[k1, v1]]; + + var proxy_arr = new Proxy(arr, { + get: function(target, name) { + if (name == Symbol.iterator) { + modified = true; + WeakMap.prototype.set = function() { + called = true; + }; + } + return target[name]; + } + }); + + var m = new WeakMap(proxy_arr); + + assertEq(modified, true); + assertEq(called, false); + assertEq(m.has(k1), true); + assertEq(m.has(k2), false); + assertEq(m.get(k1), v1); + assertEq(m.get(k2), undefined); + + WeakMap.prototype.set = orig; +} + +function test_change2() { + let orig = WeakMap.prototype.set; + + // Change to adder in adder(...) call should be ignored. + var called = false; + var count = 0; + + WeakMap.prototype.set = function(k, v) { + if (count == 0) { + assertEq(k, k1); + assertEq(v, v1); + orig.call(this, k3, v3); + WeakMap.prototype.set = function() { + called = true; + }; + count = 1; + } else { + assertEq(k, k2); + assertEq(v, v2); + orig.call(this, k4, v4); + count = 2; + } + }; + + var arr = [[k1, v1], [k2, v2]]; + + var m = new WeakMap(arr); + + assertEq(called, false); + assertEq(count, 2); + assertEq(m.has(k1), false); + assertEq(m.has(k2), false); + assertEq(m.has(k3), true); + assertEq(m.has(k4), true); + assertEq(m.get(k1), undefined); + assertEq(m.get(k2), undefined); + assertEq(m.get(k3), v3); + assertEq(m.get(k4), v4); + + WeakMap.prototype.set = orig; +} + +function test_error() { + let orig = WeakMap.prototype.set; + + var arr = [[k1, v1]]; + + // WeakMap should throw TypeError if adder is not callable. + WeakMap.prototype.set = null; + assertThrowsInstanceOf(() => new WeakMap(arr), TypeError); + WeakMap.prototype.set = {}; + assertThrowsInstanceOf(() => new WeakMap(arr), TypeError); + + // WeakMap should propagate error thrown by adder. + WeakMap.prototype.set = function() { + throw SyntaxError(); + }; + assertThrowsInstanceOf(() => new WeakMap(arr), SyntaxError); + + WeakMap.prototype.set = orig; +} + +function test() { + test_patched(); + test_proxy1(); + test_proxy2(); + test_change1(); + test_change2(); + test_error(); +} + +test(); diff --git a/js/src/jit-test/tests/collections/WeakMap-moving-gc.js b/js/src/jit-test/tests/collections/WeakMap-moving-gc.js new file mode 100644 index 0000000000..1bb29428b8 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-moving-gc.js @@ -0,0 +1,12 @@ +var wm = new WeakMap; +var A = []; +for (var i = 0; i < 1024; ++i) { + var key = {i:i}; + wm.set(key, i); + A.push(key); +} +gc(); +for (var i in A) { + var key = A[i]; + assertEq(wm.has(key), true); +} diff --git a/js/src/jit-test/tests/collections/WeakMap-set-returns-this.js b/js/src/jit-test/tests/collections/WeakMap-set-returns-this.js new file mode 100644 index 0000000000..f62c75fa1a --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-set-returns-this.js @@ -0,0 +1,9 @@ +// Bug 1031632 - Map.prototype.set, WeakMap.prototype.set and +// Set.prototype.add should be chainable + +var wm = new WeakMap(); +var bar = {}; +assertEq(wm.set(bar, 'BAR'), wm); +var foo = {}; +var a = wm.set(foo, 'FOO').get(foo); +assertEq(a, 'FOO'); diff --git a/js/src/jit-test/tests/collections/WeakMap-surfaces.js b/js/src/jit-test/tests/collections/WeakMap-surfaces.js new file mode 100644 index 0000000000..662bb39e33 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakMap-surfaces.js @@ -0,0 +1,32 @@ +// WeakMap surfaces + +var desc = Object.getOwnPropertyDescriptor(this, "WeakMap"); +assertEq(desc.enumerable, false); +assertEq(desc.configurable, true); +assertEq(desc.writable, true); + +assertEq(typeof WeakMap, 'function'); +assertEq(Object.keys(WeakMap).length, 0); +assertEq(WeakMap.length, 0); +assertEq(WeakMap.name, "WeakMap"); + +assertEq(Object.getPrototypeOf(WeakMap.prototype), Object.prototype); +assertEq(Object.prototype.toString.call(WeakMap.prototype), "[object WeakMap]"); +assertEq(Object.prototype.toString.call(new WeakMap()), "[object WeakMap]"); +assertEq(Object.keys(WeakMap.prototype).join(), ""); +assertEq(WeakMap.prototype.constructor, WeakMap); + +function checkMethod(name, arity) { + var desc = Object.getOwnPropertyDescriptor(WeakMap.prototype, name); + assertEq(desc.enumerable, false); + assertEq(desc.configurable, true); + assertEq(desc.writable, true); + assertEq(typeof desc.value, 'function'); + assertEq(desc.value.name, name); + assertEq(desc.value.length, arity); +} + +checkMethod("get", 1); +checkMethod("has", 1); +checkMethod("set", 2); +checkMethod("delete", 1); diff --git a/js/src/jit-test/tests/collections/WeakSet-add-returns-this.js b/js/src/jit-test/tests/collections/WeakSet-add-returns-this.js new file mode 100644 index 0000000000..eb9c40e407 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakSet-add-returns-this.js @@ -0,0 +1,9 @@ +var ws = new WeakSet(); +var bar = {}; +assertEq(ws.add(bar), ws); +var foo = {}; +var a = ws.add(foo); +assertEq(a, ws); +assertEq(a.has(bar), true); +assertEq(a.has(foo), true); +assertEq(WeakSet.prototype.add.call(ws, {}), ws); diff --git a/js/src/jit-test/tests/collections/WeakSet-constructor-1.js b/js/src/jit-test/tests/collections/WeakSet-constructor-1.js new file mode 100644 index 0000000000..ce03f22de9 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakSet-constructor-1.js @@ -0,0 +1,11 @@ +// The WeakSet constructor creates an empty WeakSet by default. + +load(libdir + "asserts.js"); + +new WeakSet(); +new WeakSet(undefined); +new WeakSet(null); + +assertThrowsInstanceOf(() => WeakSet(), TypeError); +assertThrowsInstanceOf(() => WeakSet(undefined), TypeError); +assertThrowsInstanceOf(() => WeakSet(null), TypeError); diff --git a/js/src/jit-test/tests/collections/WeakSet-constructor-add.js b/js/src/jit-test/tests/collections/WeakSet-constructor-add.js new file mode 100644 index 0000000000..b883e074f1 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakSet-constructor-add.js @@ -0,0 +1,178 @@ +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var k1 = {}; +var k2 = {}; +var k3 = {}; +var k4 = {}; + +function test_patched() { + let orig = WeakSet.prototype.add; + + // If adder is modified, constructor should call it. + var called = false; + + WeakSet.prototype.add = function(k, v) { + assertEq(k, k1); + orig.call(this, k2); + called = true; + }; + + var arr = [k1]; + + var m = new WeakSet(arr); + + assertEq(called, true); + assertEq(m.has(k1), false); + assertEq(m.has(k2), true); + + WeakSet.prototype.add = orig; +} + +function test_proxy1() { + let orig = WeakSet.prototype.add; + + // If adder is modified, constructor should call it. + var called = false; + + WeakSet.prototype.add = new Proxy(function(k, v) { + assertEq(k, k1); + orig.call(this, k2); + called = true; + }, {}); + + var arr = [k1]; + + var m = new WeakSet(arr); + + assertEq(called, true); + assertEq(m.has(k1), false); + assertEq(m.has(k2), true); + + WeakSet.prototype.add = orig; +} + +function test_proxy2() { + let orig = WeakSet.prototype.add; + + // If adder is modified, constructor should call it. + var called = false; + + WeakSet.prototype.add = new Proxy(function() { + }, { + apply: function(target, that, args) { + var [k, v] = args; + assertEq(k, k1); + orig.call(that, k2); + called = true; + } + }); + + var arr = [k1]; + + var m = new WeakSet(arr); + + assertEq(called, true); + assertEq(m.has(k1), false); + assertEq(m.has(k2), true); + + WeakSet.prototype.add = orig; +} + +function test_change1() { + let orig = WeakSet.prototype.add; + + // Change to adder in GetIterator(..) call should be ignored. + var called = false; + var modified = false; + + var arr = [k1]; + + var proxy_arr = new Proxy(arr, { + get: function(target, name) { + if (name == Symbol.iterator) { + modified = true; + WeakSet.prototype.add = function() { + called = true; + }; + } + return target[name]; + } + }); + + var m = new WeakSet(proxy_arr); + + assertEq(modified, true); + assertEq(called, false); + assertEq(m.has(k1), true); + assertEq(m.has(k2), false); + + WeakSet.prototype.add = orig; +} + +function test_change2() { + let orig = WeakSet.prototype.add; + + // Change to adder in adder(...) call should be ignored. + var called = false; + var count = 0; + + WeakSet.prototype.add = function(k, v) { + if (count == 0) { + assertEq(k, k1); + orig.call(this, k3); + WeakSet.prototype.add = function() { + called = true; + }; + count = 1; + } else { + assertEq(k, k2); + orig.call(this, k4); + count = 2; + } + }; + + var arr = [k1, k2]; + + var m = new WeakSet(arr); + + assertEq(called, false); + assertEq(count, 2); + assertEq(m.has(k1), false); + assertEq(m.has(k2), false); + assertEq(m.has(k3), true); + assertEq(m.has(k4), true); + + WeakSet.prototype.add = orig; +} + +function test_error() { + let orig = WeakSet.prototype.add; + + var arr = [k1]; + + // WeakSet should throw TypeError if adder is not callable. + WeakSet.prototype.add = null; + assertThrowsInstanceOf(() => new WeakSet(arr), TypeError); + WeakSet.prototype.add = {}; + assertThrowsInstanceOf(() => new WeakSet(arr), TypeError); + + // WeakSet should propagate error thrown by adder. + WeakSet.prototype.add = function() { + throw SyntaxError(); + }; + assertThrowsInstanceOf(() => new WeakSet(arr), SyntaxError); + + WeakSet.prototype.add = orig; +} + +function test() { + test_patched(); + test_proxy1(); + test_proxy2(); + test_change1(); + test_change2(); + test_error(); +} + +test(); diff --git a/js/src/jit-test/tests/collections/WeakSet-constructor.js b/js/src/jit-test/tests/collections/WeakSet-constructor.js new file mode 100644 index 0000000000..a89e8fc0c8 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakSet-constructor.js @@ -0,0 +1,9 @@ +var list = [Number, Function]; + +var ws = new WeakSet(list); +assertEq(ws.has(Number), true); +assertEq(ws.has(Function), true); + +ws = new WeakSet(new Set(list)); +assertEq(ws.has(Number), true); +assertEq(ws.has(Function), true); diff --git a/js/src/jit-test/tests/collections/WeakSet-delete.js b/js/src/jit-test/tests/collections/WeakSet-delete.js new file mode 100644 index 0000000000..0309ad7131 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakSet-delete.js @@ -0,0 +1,32 @@ +var ws = new WeakSet; + +// Delete on empty +assertEq(ws.delete({}), false); + +// Delete existing +var value = {}; +ws.add(value); +assertEq(ws.has(value), true); +assertEq(ws.delete(value), true); +assertEq(ws.has(value), false); + +// Delete non-empty +for (var i = 0; i < 10; i++) + ws.add({}); +assertEq(ws.add(value), ws); +assertEq(ws.has(value), true); +assertEq(ws.delete(value), true); +assertEq(ws.has(value), false); +assertEq(ws.delete(value), false); +assertEq(ws.has(value), false); + +// Delete primitive +assertEq(ws.delete(15), false); + +// Delete with cross-compartment WeakSet +ws = new (newGlobal().WeakSet); +WeakSet.prototype.add.call(ws, value); +assertEq(WeakSet.prototype.has.call(ws, value), true); +assertEq(WeakSet.prototype.delete.call(ws, value), true); +assertEq(WeakSet.prototype.has.call(ws, value), false); +assertEq(WeakSet.prototype.delete.call(ws, value), false); diff --git a/js/src/jit-test/tests/collections/WeakSet-error.js b/js/src/jit-test/tests/collections/WeakSet-error.js new file mode 100644 index 0000000000..4125aaba79 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakSet-error.js @@ -0,0 +1,22 @@ +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +function testMethod(name) { + var method = WeakSet.prototype[name]; + + assertThrowsInstanceOf(function() { method.call(1); }, TypeError); + assertThrowsInstanceOf(function() { method.call({}); }, TypeError); + assertThrowsInstanceOf(function() { method.call(new WeakMap); }, TypeError); + assertThrowsInstanceOf(function() { method.call(WeakSet.prototype); }, TypeError); +} + +testMethod("has"); +testMethod("add"); +testMethod("delete"); +testMethod("clear"); + +assertThrowsInstanceOf(function() { var ws = new WeakSet(); ws.add(1); }, TypeError); +assertThrowsInstanceOf(function() { new WeakSet({[Symbol.iterator]: 2}) }, TypeError); +assertEq(typeof [][Symbol.iterator], "function"); + +assertThrowsInstanceOf(function() { WeakSet(); }, TypeError); diff --git a/js/src/jit-test/tests/collections/WeakSet-moving-gc.js b/js/src/jit-test/tests/collections/WeakSet-moving-gc.js new file mode 100644 index 0000000000..e5ae87bc75 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakSet-moving-gc.js @@ -0,0 +1,12 @@ +var ws = new WeakSet; +var A = []; +for (var i = 0; i < 1024; ++i) { + var value = {}; + ws.add(value); + A.push(value); +} +gc(); +for (i = 0; i < A.length; A++) { + value = A[i]; + assertEq(ws.has(value), true); +} diff --git a/js/src/jit-test/tests/collections/WeakSet-surface.js b/js/src/jit-test/tests/collections/WeakSet-surface.js new file mode 100644 index 0000000000..b72a7d0306 --- /dev/null +++ b/js/src/jit-test/tests/collections/WeakSet-surface.js @@ -0,0 +1,31 @@ +// WeakSet surfaces + +var desc = Object.getOwnPropertyDescriptor(this, "WeakSet"); +assertEq(desc.enumerable, false); +assertEq(desc.configurable, true); +assertEq(desc.writable, true); + +assertEq(typeof WeakSet, 'function'); +assertEq(Object.keys(WeakSet).length, 0); +assertEq(WeakSet.length, 0); +assertEq(WeakSet.name, "WeakSet"); + +assertEq(Object.getPrototypeOf(WeakSet.prototype), Object.prototype); +assertEq(Object.prototype.toString.call(WeakSet.prototype), "[object WeakSet]"); +assertEq(Object.prototype.toString.call(new WeakSet), "[object WeakSet]"); +assertEq(Object.keys(WeakSet.prototype).length, 0); +assertEq(WeakSet.prototype.constructor, WeakSet); + +function checkMethod(name, arity) { + var desc = Object.getOwnPropertyDescriptor(WeakSet.prototype, name); + assertEq(desc.enumerable, false); + assertEq(desc.configurable, true); + assertEq(desc.writable, true); + assertEq(typeof desc.value, 'function'); + assertEq(desc.value.name, name); + assertEq(desc.value.length, arity); +} + +checkMethod("has", 1); +checkMethod("add", 1); +checkMethod("delete", 1); diff --git a/js/src/jit-test/tests/collections/bug-1381423.js b/js/src/jit-test/tests/collections/bug-1381423.js new file mode 100644 index 0000000000..59b29d3f01 --- /dev/null +++ b/js/src/jit-test/tests/collections/bug-1381423.js @@ -0,0 +1,5 @@ +var s = new Set(Array(1000).fill(0).map((v, k) => k + 1)); +do { + var n = [...s].length; + assertEq(n, 1000); +} while (!inIon()); diff --git a/js/src/jit-test/tests/collections/bug-1863391-1.js b/js/src/jit-test/tests/collections/bug-1863391-1.js new file mode 100644 index 0000000000..e3c8914975 --- /dev/null +++ b/js/src/jit-test/tests/collections/bug-1863391-1.js @@ -0,0 +1,8 @@ +// |jit-test| --enable-symbols-as-weakmap-keys; skip-if: helperThreadCount() === 0 || getBuildConfiguration("release_or_beta") +evalInWorker(` + a = new WeakMap + b = Symbol + a.set(b ) + c = b.hasInstance; + a.get(c) +`); diff --git a/js/src/jit-test/tests/collections/bug-1863391-2.js b/js/src/jit-test/tests/collections/bug-1863391-2.js new file mode 100644 index 0000000000..5174f5ff16 --- /dev/null +++ b/js/src/jit-test/tests/collections/bug-1863391-2.js @@ -0,0 +1,6 @@ +// |jit-test| --enable-symbols-as-weakmap-keys; skip-if: helperThreadCount() === 0 || getBuildConfiguration("release_or_beta") +evalInWorker(` + a = new WeakMap + b = Symbol.hasInstance; + a.set(b, 2); +`); diff --git a/js/src/jit-test/tests/collections/bug-1866636.js b/js/src/jit-test/tests/collections/bug-1866636.js new file mode 100644 index 0000000000..b535ecd2f6 --- /dev/null +++ b/js/src/jit-test/tests/collections/bug-1866636.js @@ -0,0 +1,10 @@ +// |jit-test| --enable-symbols-as-weakmap-keys; skip-if: getBuildConfiguration("release_or_beta") +b = new WeakMap(); +c = Symbol(); +b.set(c); +c = gczeal(10); +for (i=0; i<1000; ++i) { + try { + x; + } catch {} +} diff --git a/js/src/jit-test/tests/collections/bug-743101.js b/js/src/jit-test/tests/collections/bug-743101.js new file mode 100644 index 0000000000..5328306690 --- /dev/null +++ b/js/src/jit-test/tests/collections/bug-743101.js @@ -0,0 +1,7 @@ +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +for (var cls of [Map, Set]) { + var getter = Object.getOwnPropertyDescriptor(cls.prototype, "size").get; + assertThrowsInstanceOf(function () { getter.apply(g, []); }, g.TypeError); +} diff --git a/js/src/jit-test/tests/collections/constructor-errors.js b/js/src/jit-test/tests/collections/constructor-errors.js new file mode 100644 index 0000000000..6a145180f1 --- /dev/null +++ b/js/src/jit-test/tests/collections/constructor-errors.js @@ -0,0 +1,19 @@ +// The Set constructor throws TypeError when passed a non-iterable argument. + +load(libdir + "asserts.js"); + +var misc = [ + {}, {x: 1}, Math, isNaN, + Object.create(null), + true, 0, 3.1416, + new Boolean(true), new Number(0), + {iterator: function () { return undefined; }}, + {iterator: function () { return null; }}, + {iterator: function () { return true; }}, + {iterator: function () { return 17; }}, +]; + +for (var v of misc) { + assertThrowsInstanceOf(function () { new Set(v); }, TypeError); + assertThrowsInstanceOf(function () { new Map(v); }, TypeError); +} diff --git a/js/src/jit-test/tests/collections/for-in.js b/js/src/jit-test/tests/collections/for-in.js new file mode 100644 index 0000000000..b46de15e21 --- /dev/null +++ b/js/src/jit-test/tests/collections/for-in.js @@ -0,0 +1,25 @@ +// for-in loops on Maps and Sets enumerate properties. + +var test = function test(obj) { + assertEq(Object.keys(obj).length, 0); + + var i = 0, v; + for (v in obj) + i++; + assertEq(i, 0); + + obj.ownProp = 1; + assertEq(Object.keys(obj).join(), "ownProp"); + + for (v in obj) + i++; + assertEq(i, 1); + assertEq(v, "ownProp"); + + delete obj.ownProp; +}; + +test(Map.prototype); +test(new Map); +test(Set.prototype); +test(new Set); diff --git a/js/src/jit-test/tests/collections/iterator-1.js b/js/src/jit-test/tests/collections/iterator-1.js new file mode 100644 index 0000000000..9624bae792 --- /dev/null +++ b/js/src/jit-test/tests/collections/iterator-1.js @@ -0,0 +1,13 @@ +// collection.iterator() returns an iterator object. + +load(libdir + "iteration.js"); + +function test(obj, name) { + var iter = obj[Symbol.iterator](); + assertEq(typeof iter, "object"); + assertEq(iter.toString(), "[object " + obj.constructor.name + " Iterator]"); +} + +test([]); +test(new Map); +test(new Set); diff --git a/js/src/jit-test/tests/collections/iterator-2.js b/js/src/jit-test/tests/collections/iterator-2.js new file mode 100644 index 0000000000..923a9b79b4 --- /dev/null +++ b/js/src/jit-test/tests/collections/iterator-2.js @@ -0,0 +1,12 @@ +// for-of on an empty collection does not execute the loop body or modify the loop variable. + +function test(empty) { + var x = 'unchanged'; + for (x of empty) + throw fit; + assertEq(x, 'unchanged'); +} + +test([]); +test(new Map); +test(new Set); \ No newline at end of file diff --git a/js/src/jit-test/tests/collections/iterator-noSuchMethod.js b/js/src/jit-test/tests/collections/iterator-noSuchMethod.js new file mode 100644 index 0000000000..f79d3fa317 --- /dev/null +++ b/js/src/jit-test/tests/collections/iterator-noSuchMethod.js @@ -0,0 +1,24 @@ +// __noSuchMethod__ is totally non-standard and evil, but in this one weird case +// below we don't actually use it. So this test is bog-standard ES6, not +// SpiderMonkey-specific. +// +// In ES6: +// Accessing 1[Symbol.iterator]() throws a TypeError calling |undefined|. +// In SpiderMonkey: +// Accessing 1[Symbol.iterator]() does *not* invoke __noSuchMethod__ looked up +// on 1 (or on an implicitly boxed 1), because 1 is a primitive value. +// SpiderMonkey then does exactly the ES6 thing here and throws a TypeError +// calling |undefined|. + +Object.prototype.__noSuchMethod__ = {}; + +try +{ + var [x] = 1; + throw new Error("didn't throw"); +} +catch (e) +{ + assertEq(e instanceof TypeError, true, + "expected TypeError, got " + e); +} diff --git a/js/src/jit-test/tests/collections/iterator-proto-1.js b/js/src/jit-test/tests/collections/iterator-proto-1.js new file mode 100644 index 0000000000..c9827a5746 --- /dev/null +++ b/js/src/jit-test/tests/collections/iterator-proto-1.js @@ -0,0 +1,18 @@ +// All iterators of the same collection type share their immediate prototype. +// Those prototype objects in turn inherit directly from %IteratorPrototype%. + +load(libdir + "iteration.js"); + +// Get %IteratorPrototype%. +var iterProto = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + +function test(obj0, obj1) { + var iter0 = obj0[Symbol.iterator](), iter1 = obj1[Symbol.iterator](); + var proto = Object.getPrototypeOf(iter0); + assertEq(Object.getPrototypeOf(iter1), proto); + assertEq(Object.getPrototypeOf(proto), iterProto); +} + +test([], [1]); +test(new Map(), new Map([[1, 1]])); +test(new Set(), new Set([1])); diff --git a/js/src/jit-test/tests/collections/iterator-proto-2.js b/js/src/jit-test/tests/collections/iterator-proto-2.js new file mode 100644 index 0000000000..d6d5ba7d7f --- /dev/null +++ b/js/src/jit-test/tests/collections/iterator-proto-2.js @@ -0,0 +1,13 @@ +// Iterators of different collection types have different prototypes. + +load(libdir + "iteration.js"); + +var aproto = Object.getPrototypeOf(Array()[Symbol.iterator]()); +var mproto = Object.getPrototypeOf((new Map())[Symbol.iterator]()); +var sproto = Object.getPrototypeOf((new Set())[Symbol.iterator]()); +assertEq(aproto !== mproto, true); +assertEq(aproto !== sproto, true); +assertEq(mproto !== sproto, true); +assertEq(aproto.next !== mproto.next, true); +assertEq(aproto.next !== sproto.next, true); +assertEq(mproto.next !== sproto.next, true); diff --git a/js/src/jit-test/tests/collections/iterator-proto-surfaces.js b/js/src/jit-test/tests/collections/iterator-proto-surfaces.js new file mode 100644 index 0000000000..e39ae777fb --- /dev/null +++ b/js/src/jit-test/tests/collections/iterator-proto-surfaces.js @@ -0,0 +1,39 @@ +// Iterator prototype surfaces. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var iterProto = null; + +function test(constructor) { + var iter = new constructor()[Symbol.iterator](); + assertDeepEq(Reflect.ownKeys(iter), []); + + // Iterator prototypes only have a .next and @@toStringTag property. + var proto1 = Object.getPrototypeOf(iter); + assertDeepEq(Reflect.ownKeys(proto1), ['next', Symbol.toStringTag]); + + var desc = Object.getOwnPropertyDescriptor(proto1, 'next'); + assertEq(desc.configurable, true); + assertEq(desc.enumerable, false); + assertEq(desc.writable, true); + + // %IteratorPrototype% + var proto2 = Object.getPrototypeOf(proto1); + assertEq(Object.getPrototypeOf(proto2), Object.prototype); + assertEq(Object.prototype.toString.call(proto2), "[object Object]"); + + assertDeepEq(Reflect.ownKeys(proto2), [Symbol.iterator]); + assertEq(proto2[Symbol.iterator](), proto2); + + // Check there's a single %IteratorPrototype% object. + if (iterProto === null) + iterProto = proto2; + else + assertEq(iterProto, proto2); +} + +test(Array); +test(String); +test(Map); +test(Set); diff --git a/js/src/jit-test/tests/collections/key-equality-0.js b/js/src/jit-test/tests/collections/key-equality-0.js new file mode 100644 index 0000000000..7f9da8c2bd --- /dev/null +++ b/js/src/jit-test/tests/collections/key-equality-0.js @@ -0,0 +1,43 @@ +// -0 is treated as the same key as +0. + +var s = new Set; +s.add(-0); +assertEq(s.has(0), true); +assertEq(s.has(-0), true); + +assertEq(s.delete(0), true); +assertEq(s.has(-0), false); +assertEq(s.has(0), false); + +s.add(0); +assertEq(s.has(0), true); +assertEq(s.has(-0), true); +assertEq(s.delete(-0), true); +assertEq(s.has(-0), false); +assertEq(s.has(0), false); + +var m = new Map; +m.set(-0, 'x'); +assertEq(m.has(0), true); +assertEq(m.get(0), 'x'); +assertEq(m.has(-0), true); +assertEq(m.get(-0), 'x'); + +assertEq(m.delete(0), true); +assertEq(m.has(-0), false); +assertEq(m.get(-0), undefined); +assertEq(m.has(0), false); +assertEq(m.get(0), undefined); + +m.set(-0, 'x'); +m.set(0, 'y'); +assertEq(m.has(0), true); +assertEq(m.get(0), 'y'); +assertEq(m.has(-0), true); +assertEq(m.get(-0), 'y'); + +assertEq(m.delete(-0), true); +assertEq(m.has(0), false); +assertEq(m.get(0), undefined); +assertEq(m.has(-0), false); +assertEq(m.get(-0), undefined); diff --git a/js/src/jit-test/tests/collections/key-equality-1.js b/js/src/jit-test/tests/collections/key-equality-1.js new file mode 100644 index 0000000000..501c882ff8 --- /dev/null +++ b/js/src/jit-test/tests/collections/key-equality-1.js @@ -0,0 +1,28 @@ +// Different representations of the same number or string are treated as the same Map key. + +var m = new Map; +var test = function test(a, b) { + m.set(a, 'secret'); + assertEq(m.get(b), 'secret'); + m.set(b, 'password'); + assertEq(m.get(a), 'password'); + + assertEq(a, b); +}; + +// Float and integer representations of the same number are the same key. +test(9, Math.sqrt(81)); + +// Ordinary strings and ropes are the same key. +var a = Array(1001).join('x'); +var b = Array(501).join('x') + Array(501).join('x'); +test(a, b); + +// Two structurally different ropes with the same characters are the same key. +a = ""; +b = ""; +for (var i = 0; i < 10; i++) { + a = Array(501).join('x') + a; + b = b + Array(501).join('x'); +} +test(a, b); diff --git a/js/src/jit-test/tests/collections/key-equality-2.js b/js/src/jit-test/tests/collections/key-equality-2.js new file mode 100644 index 0000000000..25605b29ba --- /dev/null +++ b/js/src/jit-test/tests/collections/key-equality-2.js @@ -0,0 +1,11 @@ +// Number keys are distinct from string keys that would name the same property. + +var s = new Set; + +s.add(17); +assertEq(s.has("17"), false); +assertEq(s.has(17), true); +s.add("17"); +assertEq(s.delete(17), true); +assertEq(s.has("17"), true); +assertEq(s.has(17), false); diff --git a/js/src/jit-test/tests/collections/key-equality-NaN.js b/js/src/jit-test/tests/collections/key-equality-NaN.js new file mode 100644 index 0000000000..f26dc07605 --- /dev/null +++ b/js/src/jit-test/tests/collections/key-equality-NaN.js @@ -0,0 +1,15 @@ +// NaN is equal to itself for the purpose of key lookups. + +var m = new Map; +m.set(NaN, "ok"); +assertEq(m.has(NaN), true); +assertEq(m.get(NaN), "ok"); +assertEq(m.delete(NaN), true); +assertEq(m.has(NaN), false); +assertEq(m.get(NaN), undefined); + +var s = new Set; +s.add(NaN); +assertEq(s.has(NaN), true); +assertEq(s.delete(NaN), true); +assertEq(s.has(NaN), false); diff --git a/js/src/jit-test/tests/coverage/bug1203695.js b/js/src/jit-test/tests/coverage/bug1203695.js new file mode 100644 index 0000000000..5a8a091d6a --- /dev/null +++ b/js/src/jit-test/tests/coverage/bug1203695.js @@ -0,0 +1,15 @@ +// |jit-test| --code-coverage + +var lfcode = new Array(); +lfcode.push = loadFile; +lfcode.push(")"); +lfcode.push(` +assertThrowsInstanceOf(function () {}, TypeError); +var g = newGlobal(); +`); +getLcovInfo(g); +function loadFile(lfVarx) { + try { + evaluate(lfVarx, { noScriptRval : true, compileAndGo : true }); + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/coverage/bug1206247.js b/js/src/jit-test/tests/coverage/bug1206247.js new file mode 100644 index 0000000000..f6b954df76 --- /dev/null +++ b/js/src/jit-test/tests/coverage/bug1206247.js @@ -0,0 +1,6 @@ +// |jit-test| --code-coverage + +evaluate("", { + fileName: null +}); +getLcovInfo(); diff --git a/js/src/jit-test/tests/coverage/bug1214548.js b/js/src/jit-test/tests/coverage/bug1214548.js new file mode 100644 index 0000000000..b54cd80169 --- /dev/null +++ b/js/src/jit-test/tests/coverage/bug1214548.js @@ -0,0 +1,12 @@ +// |jit-test| --code-coverage + +if (!('oomTest' in this)) + quit(); + +oomTest(() => { + var g = newGlobal({sameZoneAs: this}); + g.eval("\ + function f(){}; \ + getLcovInfo(); \ + "); +}); diff --git a/js/src/jit-test/tests/coverage/bug1274048.js b/js/src/jit-test/tests/coverage/bug1274048.js new file mode 100644 index 0000000000..526a2c9142 --- /dev/null +++ b/js/src/jit-test/tests/coverage/bug1274048.js @@ -0,0 +1,10 @@ +// |jit-test| --code-coverage + +function h() { + return 1; +} +function g() { + switch (h()) {} +} +g(); +getLcovInfo(); diff --git a/js/src/jit-test/tests/coverage/bug1304569-switch-case.js b/js/src/jit-test/tests/coverage/bug1304569-switch-case.js new file mode 100644 index 0000000000..d243c7fddc --- /dev/null +++ b/js/src/jit-test/tests/coverage/bug1304569-switch-case.js @@ -0,0 +1,14 @@ +// |jit-test| --code-coverage + +s = newGlobal() +evalcx("\ + switch (0) {\ + default: break;\ + case 1:\ + this.s += this.s;\ + g(h(\"\", 2));\ + break;\ + break\ + }\ +", s) +evalcx("getLcovInfo()", s) diff --git a/js/src/jit-test/tests/coverage/getLcovInfo_twice.js b/js/src/jit-test/tests/coverage/getLcovInfo_twice.js new file mode 100644 index 0000000000..dd78513729 --- /dev/null +++ b/js/src/jit-test/tests/coverage/getLcovInfo_twice.js @@ -0,0 +1,4 @@ +// |jit-test| --code-coverage + +getLcovInfo(); +getLcovInfo(); diff --git a/js/src/jit-test/tests/coverage/lcov-enabled-1.js b/js/src/jit-test/tests/coverage/lcov-enabled-1.js new file mode 100644 index 0000000000..0bbb53f2fe --- /dev/null +++ b/js/src/jit-test/tests/coverage/lcov-enabled-1.js @@ -0,0 +1,5 @@ +// |jit-test| --code-coverage + +// Use the `--code-coverage` shell argument must enable JS code-coverage support +// for the process. +assertEq(isLcovEnabled(), true); diff --git a/js/src/jit-test/tests/coverage/lcov-enabled-2.js b/js/src/jit-test/tests/coverage/lcov-enabled-2.js new file mode 100644 index 0000000000..133d167e3d --- /dev/null +++ b/js/src/jit-test/tests/coverage/lcov-enabled-2.js @@ -0,0 +1,7 @@ + +// Setting the `JS_CODE_COVERAGE_OUTPUT_DIR` for will also enable coverage for +// the process. + +if (os.getenv("JS_CODE_COVERAGE_OUTPUT_DIR")) { + assertEq(isLcovEnabled(), true); +} diff --git a/js/src/jit-test/tests/coverage/off-thread-01.js b/js/src/jit-test/tests/coverage/off-thread-01.js new file mode 100644 index 0000000000..ab9172cf92 --- /dev/null +++ b/js/src/jit-test/tests/coverage/off-thread-01.js @@ -0,0 +1,23 @@ +// |jit-test| --code-coverage; --no-ion; skip-if: helperThreadCount() === 0 + +assertEq(isLcovEnabled(), true); + +offThreadCompileToStencil(` + let hitCount = 0; + function offThreadFun() { + hitCount += 1; + } + + offThreadFun(); + offThreadFun(); + offThreadFun(); + offThreadFun(); +`); +var stencil = finishOffThreadStencil(); +evalStencil(stencil); +assertEq(hitCount, 4); + +let report = getLcovInfo(); + +const expected = "FNDA:4,offThreadFun"; +assertEq(report.includes(expected), true); diff --git a/js/src/jit-test/tests/coverage/off-thread-02.js b/js/src/jit-test/tests/coverage/off-thread-02.js new file mode 100644 index 0000000000..18d43f9d0c --- /dev/null +++ b/js/src/jit-test/tests/coverage/off-thread-02.js @@ -0,0 +1,25 @@ +// |jit-test| --code-coverage; --no-ion; skip-if: helperThreadCount() === 0 + +assertEq(isLcovEnabled(), true); + +offThreadCompileModuleToStencil(` + globalThis.hitCount = 0; + function offThreadFun() { + globalThis.hitCount += 1; + } + + offThreadFun(); + offThreadFun(); + offThreadFun(); + offThreadFun(); +`); +let stencil = finishOffThreadStencil(); +let mod = instantiateModuleStencil(stencil); +moduleLink(mod); +moduleEvaluate(mod); +assertEq(hitCount, 4); + +const expected = "FNDA:4,offThreadFun"; + +let report = getLcovInfo(); +assertEq(report.includes(expected), true); diff --git a/js/src/jit-test/tests/coverage/simple.js b/js/src/jit-test/tests/coverage/simple.js new file mode 100644 index 0000000000..cdb8197201 --- /dev/null +++ b/js/src/jit-test/tests/coverage/simple.js @@ -0,0 +1,596 @@ +// |jit-test| --code-coverage + +// Currently the Jit integration has a few issues, let's keep this test +// case deterministic. +// +// - Baseline OSR increments the loop header twice. +// - Ion is not updating any counter yet. +// +if (getJitCompilerOptions()["ion.warmup.trigger"] != 30) + setJitCompilerOption("ion.warmup.trigger", 30); +if (getJitCompilerOptions()["baseline.warmup.trigger"] != 10) + setJitCompilerOption("baseline.warmup.trigger", 10); + +/* + * These test cases are annotated with the output produced by LCOV [1]. Comment + * starting with // without any spaces are used as a reference for the code + * coverage output. Any "$" in these line comments are replaced by the current + * line number, and any "%" are replaced with the current function name (defined + * by the FN key). + * + * [1] http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php + */ +function checkLcov(fun) { + var keys = [ "TN", "SF", "FN", "FNDA", "FNF", "FNH", "BRDA", "BRF", "BRH", "DA", "LF", "LH" ]; + function startsWithKey(s) { + for (k of keys) { + if (s.startsWith(k)) + return true; + } + return false; + }; + + // Extract the body of the function, as the code to be executed. + var source = fun.toString(); + source = source.slice(source.indexOf('{') + 1, source.lastIndexOf('}')); + + // Extract comment starting with the previous keys, as a reference of the + // output expected from getLcovInfo. + var lcovRef = []; + var currLine = 0; + var currFun = ""; + for (var line of source.split('\n')) { + currLine++; + for (var comment of line.split("//").slice(1)) { + if (!startsWithKey(comment)) + continue; + comment = comment.trim(); + if (comment.startsWith("FN:")) + currFun = comment.split(',')[1]; + comment = comment.replace('$', currLine); + comment = comment.replace('%', currFun); + lcovRef.push(comment); + } + } + + // Evaluate the code, and generate the Lcov result from the execution. + // Enabling LCov disables lazy parsing, as we rely on the ZoneCellIter to + // emulate the behaviour of the finalizer. + var g = newGlobal(); + g.eval(source); + var lcovResRaw = getLcovInfo(g); + + // Check that all the lines are present the result. + var lcovRes = lcovResRaw.split('\n'); + for (ref of lcovRef) { + if (lcovRes.indexOf(ref) == -1) { + print("Cannot find `" + ref + "` in the following Lcov result:\n", lcovResRaw); + print("In the following source:\n", source); + assertEq(true, false); + } + } +} + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + ",".split(','); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:1 + //LH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + function f() { //FN:$,f + ",".split(','); //DA:$,0 + } + ",".split(','); //DA:$,1 + //FNF:2 + //FNH:1 + //LF:2 + //LH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + function f() { //FN:$,f //FNDA:1,% + ",".split(','); //DA:$,1 + } + f(); //DA:$,1 + //FNF:2 + //FNH:2 + //LF:2 + //LH:2 +}); + +checkLcov(function () { ','.split(','); //FN:$,top-level //FNDA:1,% //DA:$,1 + //FNF:1 + //FNH:1 + //LF:1 + //LH:1 +}); + +checkLcov(function () { function f() { ','.split(','); } //FN:$,top-level //FNDA:1,% //FN:$,f //FNDA:1,f //DA:$,1 + f(); //DA:$,1 + //FNF:2 + //FNH:2 + //LF:2 + //LH:2 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + if (l.length == 3) //DA:$,1 //BRDA:$,0,0,1 //BRDA:$,0,1,0 + l.push(''); //DA:$,0 + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:4 + //LH:3 + //BRF:2 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + if (l.length == 2) //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,1 + l.push(''); //DA:$,1 + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:4 + //LH:4 + //BRF:2 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + if (l.length == 3) //DA:$,1 //BRDA:$,0,0,1 //BRDA:$,0,1,0 + l.push(''); //DA:$,0 + else + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:4 + //LH:3 + //BRF:2 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + if (l.length == 2) //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,1 + l.push(''); //DA:$,1 + else + l.pop(); //DA:$,0 + //FNF:1 + //FNH:1 + //LF:4 + //LH:3 + //BRF:2 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + if (l.length == 2) //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,1 + l.push(''); //DA:$,1 + else { + if (l.length == 1) //DA:$,0 //BRDA:$,1,0,- //BRDA:$,1,1,- + l.pop(); //DA:$,0 + } + //FNF:1 + //FNH:1 + //LF:5 + //LH:3 + //BRF:4 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + function f(i) { //FN:$,f //FNDA:2,% + var x = 0; //DA:$,2 + while (i--) { // Currently OSR wrongly count the loop header twice. + // So instead of DA:$,12 , we have DA:$,13 . + x += i; //DA:$,10 + x = x / 2; //DA:$,10 + } + return x; //DA:$,2 + //BRF:2 + //BRH:2 + } + + f(5); //DA:$,1 + f(5); //DA:$,1 + //FNF:2 + //FNH:2 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + try { //DA:$,1 + var l = ",".split(','); //DA:$,1 + if (l.length == 2) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,1 + l.push(''); //DA:$,1 + throw l; //DA:$,1 + } + l.pop(); //DA:$,0 + } catch (x) { //DA:$,1 + x.pop(); //DA:$,1 + } + //FNF:1 + //FNH:1 + //LF:8 + //LH:7 + //BRF:2 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + try { //DA:$,1 + try { //DA:$,1 + if (l.length == 2) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,1 + l.push(''); //DA:$,1 + throw l; //DA:$,1 + } + l.pop(); //DA:$,0 + } finally { //DA:$,1 + l.pop(); //DA:$,1 + } + } catch (x) { //DA:$,1 + } + //FNF:1 + //FNH:1 + //LF:10 + //LH:9 + //BRF:4 + //BRH:2 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + function f() { //FN:$,f //FNDA:1,% + throw 1; //DA:$,1 + f(); //DA:$,0 + } + var l = ",".split(','); //DA:$,1 + try { //DA:$,1 + f(); //DA:$,1 + f(); //DA:$,0 + } catch (x) { //DA:$,1 + } + //FNF:2 + //FNH:2 + //LF:7 + //LH:5 + //BRF:0 + //BRH:0 +}); + +// Test TableSwitch opcode +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,0 //BRDA:$,0,2,1 //BRDA:$,0,3,0 //BRDA:$,0,4,0 + case 0: + l.push('0'); //DA:$,0 + break; + case 1: + l.push('1'); //DA:$,0 + break; + case 2: + l.push('2'); //DA:$,1 + break; + case 3: + l.push('3'); //DA:$,0 + break; + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:4 + //BRF:5 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,0 //BRDA:$,0,2,1 //BRDA:$,0,3,0 //BRDA:$,0,4,0 + case 0: + l.push('0'); //DA:$,0 + case 1: + l.push('1'); //DA:$,0 + case 2: + l.push('2'); //DA:$,1 + case 3: + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:5 + //BRF:5 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + // Branches are ordered, and starting at 0 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,1 //BRDA:$,0,1,0 //BRDA:$,0,2,0 //BRDA:$,0,3,0 //BRDA:$,0,4,0 + case 5: + l.push('5'); //DA:$,0 + case 4: + l.push('4'); //DA:$,0 + case 3: + l.push('3'); //DA:$,0 + case 2: + l.push('2'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:4 + //BRF:5 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,1 //BRDA:$,0,1,0 //BRDA:$,0,2,0 + case 2: + l.push('2'); //DA:$,1 + case 5: + l.push('5'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:5 + //LH:5 + //BRF:3 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,1 //BRDA:$,0,2,0 + case 3: + l.push('1'); //DA:$,0 + case 5: + l.push('5'); //DA:$,0 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:5 + //LH:3 + //BRF:3 + //BRH:1 +}); + +// Unfortunately the differences between switch implementations leaks in the +// code coverage reports. +checkLcov(function () { //FN:$,top-level //FNDA:1,% + function f(a) { //FN:$,f //FNDA:2,% + return a; //DA:$,2 + } + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 + case f(-42): //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,1 + l.push('1'); //DA:$,0 + case f(51): //DA:$,1 //BRDA:$,1,0,0 //BRDA:$,1,1,1 + l.push('5'); //DA:$,0 + } + l.pop(); //DA:$,1 + //FNF:2 + //FNH:2 + //LF:8 + //LH:6 + //BRF:4 + //BRH:2 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,1 //BRDA:$,0,2,0 //BRDA:$,0,3,0 + case 0: + case 1: + l.push('0'); //DA:$,0 + l.push('1'); //DA:$,0 + case 2: + l.push('2'); //DA:$,1 + case 3: + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:5 + //BRF:4 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,0 //BRDA:$,0,2,1 //BRDA:$,0,3,0 + case 0: + l.push('0'); //DA:$,0 + case 1: + l.push('1'); //DA:$,0 + case 2: + case 3: + l.push('2'); //DA:$,1 + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:5 + //BRF:4 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,0 //BRDA:$,0,2,1 //BRDA:$,0,3,0 + case 0: + l.push('0'); //DA:$,0 + case 1: + default: + l.push('1'); //DA:$,0 + case 2: + l.push('2'); //DA:$,1 + case 3: + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:5 + //BRF:4 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,0 //BRDA:$,0,2,1 //BRDA:$,0,3,0 + case 0: + l.push('0'); //DA:$,0 + case 1: + l.push('1'); //DA:$,0 + default: + case 2: + l.push('2'); //DA:$,1 + case 3: + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:5 + //BRF:4 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,0 //BRDA:$,0,2,1 //BRDA:$,0,3,0 //BRDA:$,0,4,0 + case 0: + l.push('0'); //DA:$,0 + case 1: + l.push('1'); //DA:$,0 + default: + l.push('default'); //DA:$,0 + case 2: + l.push('2'); //DA:$,1 + case 3: + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:8 + //LH:5 + //BRF:5 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,0 //BRDA:$,0,2,1 //BRDA:$,0,3,0 + case 0: + l.push('0'); //DA:$,0 + case 1: + l.push('1'); //DA:$,0 + default: + l.push('2'); //DA:$,1 + case 3: + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:5 + //BRF:4 + //BRH:1 +}); + +checkLcov(function () { //FN:$,top-level //FNDA:1,% + var l = ','.split(','); //DA:$,1 + if (l.length === 45) { //DA:$,1 //BRDA:$,0,0,1 //BRDA:$,0,1,0 + switch (l[0]) { //DA:$,0 //BRDA:$,1,0,- //BRDA:$,1,1,- + case ',': + l.push('0'); //DA:$,0 + default: + l.push('1'); //DA:$,0 + } + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:6 + //LH:3 + //BRF:4 + //BRH:1 +}); + +// These tests are not included in ../debug/Script-getOffsetsCoverage-01.js +// because we're specifically testing a feature of Lcov output that +// Debugger.Script doesn't have (the aggregation of hits that are on the +// same line but in different functions). +{ + checkLcov(function () { //FN:$,top-level //FNDA:1,% + function f() { return 0; } var l = f(); //DA:$,2 + //FNF:2 + //FNH:2 + //LF:1 + //LH:1 + }); + + // A single line has two functions on it, and both hit. + checkLcov(function () { //FN:$,top-level //FNDA:1,% + function f() { return 0; } function g() { return 1; } //DA:$,2 + var v = f() + g(); //DA:$,1 + //FNF:3 + //FNH:3 + //LF:2 + //LH:2 + }); + + // A line has both function code and toplevel code, and only one of them hits. + checkLcov(function () { //FN:$,top-level //FNDA:1,% + if (1 === 2) //DA:$,1 + throw "0 hits here"; function f() { return "1 hit here"; } //DA:$,1 + f(); //DA:$,1 + //FNF:2 + //FNH:2 + //LF:3 + //LH:3 + }); +} + +// These tests are not included in ../debug/Script-getOffsetsCoverage-01.js +// because they are testing behaviour of --code-coverage. +{ + // Test function names + checkLcov(function () { + //FN:1,top-level + //FNDA:1,top-level + + var x = function() {}; //FN:$,x + let y = function() {}; //FN:$,y + + let z = { + z_method() { }, //FN:$,z_method + get z_prop() { }, //FN:$,get z_prop + } + }); +} + +// If you add a test case here, do the same in +// jit-test/tests/debug/Script-getOffsetsCoverage-01.js diff --git a/js/src/jit-test/tests/ctypes/AddressOfField.js b/js/src/jit-test/tests/ctypes/AddressOfField.js new file mode 100644 index 0000000000..52f4d1cd17 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/AddressOfField.js @@ -0,0 +1,12 @@ +load(libdir + 'asserts.js'); + +function test() { + let strcut = ctypes.StructType("a", [ { "x": ctypes.int32_t, } ])(); + for (let arg of [1, undefined, null, false, {}, [], Symbol("foo")]) { + assertThrowsInstanceOf(() => { struct.addressOfField(arg); }, + Error); + } +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-length-abi.js b/js/src/jit-test/tests/ctypes/argument-length-abi.js new file mode 100644 index 0000000000..16179765ce --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-length-abi.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !this.ctypes || !ctypes.default_abi.toSource + +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.default_abi.toSource(1); }, + "ABI.prototype.toSource takes no arguments"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-length-array.js b/js/src/jit-test/tests/ctypes/argument-length-array.js new file mode 100644 index 0000000000..5afbcc46eb --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-length-array.js @@ -0,0 +1,15 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.ArrayType(); }, + "ArrayType takes one or two arguments"); + assertTypeErrorMessage(() => { ctypes.int32_t.array(10)(1, 2); }, + "size defined ArrayType constructor takes at most one argument"); + assertTypeErrorMessage(() => { ctypes.int32_t.array()(1, 2); }, + "size undefined ArrayType constructor takes one argument"); + assertTypeErrorMessage(() => { ctypes.int32_t.array(10)().addressOfElement(); }, + "ArrayType.prototype.addressOfElement takes one argument"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-length-cdata.js b/js/src/jit-test/tests/ctypes/argument-length-cdata.js new file mode 100644 index 0000000000..2dc6ff8cd0 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-length-cdata.js @@ -0,0 +1,18 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.int32_t(0).address(1); }, + "CData.prototype.address takes no arguments"); + assertTypeErrorMessage(() => { ctypes.char.array(10)().readString(1); }, + "CData.prototype.readString takes no arguments"); + assertTypeErrorMessage(() => { ctypes.char.array(10)().readStringReplaceMalformed(1); }, + "CData.prototype.readStringReplaceMalformed takes no arguments"); + + if (ctypes.int32_t.prototype.toSource) { + assertTypeErrorMessage(() => { ctypes.int32_t(0).toSource(1); }, + "CData.prototype.toSource takes no arguments"); + } +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-length-ctypes.js b/js/src/jit-test/tests/ctypes/argument-length-ctypes.js new file mode 100644 index 0000000000..84b0b9ea54 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-length-ctypes.js @@ -0,0 +1,11 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.cast(); }, + "ctypes.cast takes two arguments"); + assertTypeErrorMessage(() => { ctypes.getRuntime(); }, + "ctypes.getRuntime takes one argument"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-length-finalizer.js b/js/src/jit-test/tests/ctypes/argument-length-finalizer.js new file mode 100644 index 0000000000..70e15bf8f0 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-length-finalizer.js @@ -0,0 +1,16 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.CDataFinalizer(1); }, + "CDataFinalizer constructor takes two arguments"); + + let fin = ctypes.CDataFinalizer(ctypes.int32_t(0), ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, [ctypes.int32_t]).ptr(x => x)); + assertTypeErrorMessage(() => { fin.forget(1); }, + "CDataFinalizer.prototype.forget takes no arguments"); + assertTypeErrorMessage(() => { fin.dispose(1); }, + "CDataFinalizer.prototype.dispose takes no arguments"); + fin.forget(); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-length-function.js b/js/src/jit-test/tests/ctypes/argument-length-function.js new file mode 100644 index 0000000000..2d26596620 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-length-function.js @@ -0,0 +1,11 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.FunctionType(); }, + "FunctionType takes two or three arguments"); + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.void_t, []).ptr({}, 1); }, + "FunctionType constructor takes one argument"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-length-int64.js b/js/src/jit-test/tests/ctypes/argument-length-int64.js new file mode 100644 index 0000000000..7e2efe839f --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-length-int64.js @@ -0,0 +1,40 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.Int64(1).toString(1, 2); }, + "Int64.prototype.toString takes at most one argument"); + if (ctypes.Int64.prototype.toSource) { + assertTypeErrorMessage(() => { ctypes.Int64(1).toSource(1); }, + "Int64.prototype.toSource takes no arguments"); + } + assertTypeErrorMessage(() => { ctypes.Int64(); }, + "Int64 constructor takes one argument"); + assertTypeErrorMessage(() => { ctypes.Int64.compare(); }, + "Int64.compare takes two arguments"); + assertTypeErrorMessage(() => { ctypes.Int64.lo(); }, + "Int64.lo takes one argument"); + assertTypeErrorMessage(() => { ctypes.Int64.hi(); }, + "Int64.hi takes one argument"); + assertTypeErrorMessage(() => { ctypes.Int64.join(); }, + "Int64.join takes two arguments"); + + assertTypeErrorMessage(() => { ctypes.UInt64(1).toString(1, 2); }, + "UInt64.prototype.toString takes at most one argument"); + if (ctypes.UInt64.prototype.toSource) { + assertTypeErrorMessage(() => { ctypes.UInt64(1).toSource(1); }, + "UInt64.prototype.toSource takes no arguments"); + } + assertTypeErrorMessage(() => { ctypes.UInt64(); }, + "UInt64 constructor takes one argument"); + assertTypeErrorMessage(() => { ctypes.UInt64.compare(); }, + "UInt64.compare takes two arguments"); + assertTypeErrorMessage(() => { ctypes.UInt64.lo(); }, + "UInt64.lo takes one argument"); + assertTypeErrorMessage(() => { ctypes.UInt64.hi(); }, + "UInt64.hi takes one argument"); + assertTypeErrorMessage(() => { ctypes.UInt64.join(); }, + "UInt64.join takes two arguments"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-length-pointer.js b/js/src/jit-test/tests/ctypes/argument-length-pointer.js new file mode 100644 index 0000000000..8ac404aaf7 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-length-pointer.js @@ -0,0 +1,11 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.PointerType(); }, + "PointerType takes one argument"); + assertTypeErrorMessage(() => { ctypes.int32_t.ptr(1, 2, 3, 4); }, + "PointerType constructor takes 0, 1, 2, or 3 arguments"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-length-primitive.js b/js/src/jit-test/tests/ctypes/argument-length-primitive.js new file mode 100644 index 0000000000..161ebd880c --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-length-primitive.js @@ -0,0 +1,11 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.int32_t(1, 2, 3); }, + "CType constructor takes at most one argument"); + assertTypeErrorMessage(() => { ctypes.int32_t.array(1, 2); }, + "CType.prototype.array takes at most one argument"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-length-struct.js b/js/src/jit-test/tests/ctypes/argument-length-struct.js new file mode 100644 index 0000000000..0e8efbb6ab --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-length-struct.js @@ -0,0 +1,17 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.StructType(); }, + "StructType takes one or two arguments"); + assertTypeErrorMessage(() => { ctypes.StructType("a").define(); }, + "StructType.prototype.define takes one argument"); + assertTypeErrorMessage(() => { ctypes.StructType("a", [])(1, 2, 3); }, + "StructType constructor takes at most one argument"); + assertTypeErrorMessage(() => { ctypes.StructType("a", [ {"x": ctypes.int32_t }, {"y": ctypes.int32_t }, {"z": ctypes.int32_t }])(1, 2); }, + "StructType constructor takes 0, 1, or 3 arguments"); + assertTypeErrorMessage(() => { ctypes.StructType("a", [ {"x": ctypes.int32_t } ])().addressOfField(); }, + "StructType.prototype.addressOfField takes one argument"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-type-array.js b/js/src/jit-test/tests/ctypes/argument-type-array.js new file mode 100644 index 0000000000..e78578d86b --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-type-array.js @@ -0,0 +1,17 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.int32_t.array({}); }, + "argument of CType.prototype.array must be a nonnegative integer"); + assertTypeErrorMessage(() => { ctypes.ArrayType(1); }, + "first argument of ArrayType must be a CType"); + assertTypeErrorMessage(() => { ctypes.ArrayType(ctypes.int32_t, {}); }, + "second argument of ArrayType must be a nonnegative integer"); + assertTypeErrorMessage(() => { ctypes.char.array()({}); }, + "argument of size undefined ArrayType constructor must be an array object or integer"); + assertTypeErrorMessage(() => { ctypes.char.array()(false); }, + "argument of size undefined ArrayType constructor must be an array object or integer"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-type-ctypes.js b/js/src/jit-test/tests/ctypes/argument-type-ctypes.js new file mode 100644 index 0000000000..168c8fb746 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-type-ctypes.js @@ -0,0 +1,13 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.cast(1, 2); }, + "first argument of ctypes.cast must be a CData"); + assertTypeErrorMessage(() => { ctypes.cast(ctypes.int32_t(0), 2); }, + "second argument of ctypes.cast must be a CType"); + assertTypeErrorMessage(() => { ctypes.getRuntime(1); }, + "argument of ctypes.getRuntime must be a CType"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-type-function.js b/js/src/jit-test/tests/ctypes/argument-type-function.js new file mode 100644 index 0000000000..a341415f1d --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-type-function.js @@ -0,0 +1,9 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, 1); }, + "third argument of FunctionType must be an array"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-type-int64.js b/js/src/jit-test/tests/ctypes/argument-type-int64.js new file mode 100644 index 0000000000..e147b98a48 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-type-int64.js @@ -0,0 +1,28 @@ +load(libdir + 'asserts.js'); + +function test() { + assertRangeErrorMessage(() => { ctypes.Int64(0).toString("a"); }, + "argument of Int64.prototype.toString must be an integer at least 2 and no greater than 36"); + assertTypeErrorMessage(() => { ctypes.Int64.compare(1, 2); }, + "first argument of Int64.compare must be a Int64"); + assertTypeErrorMessage(() => { ctypes.Int64.compare(ctypes.Int64(0), 2); }, + "second argument of Int64.compare must be a Int64"); + assertTypeErrorMessage(() => { ctypes.Int64.lo(1); }, + "argument of Int64.lo must be a Int64"); + assertTypeErrorMessage(() => { ctypes.Int64.hi(1); }, + "argument of Int64.hi must be a Int64"); + + assertRangeErrorMessage(() => { ctypes.UInt64(0).toString("a"); }, + "argument of UInt64.prototype.toString must be an integer at least 2 and no greater than 36"); + assertTypeErrorMessage(() => { ctypes.UInt64.compare(1, 2); }, + "first argument of UInt64.compare must be a UInt64"); + assertTypeErrorMessage(() => { ctypes.UInt64.compare(ctypes.UInt64(0), 2); }, + "second argument of UInt64.compare must be a UInt64"); + assertTypeErrorMessage(() => { ctypes.UInt64.lo(1); }, + "argument of UInt64.lo must be a UInt64"); + assertTypeErrorMessage(() => { ctypes.UInt64.hi(1); }, + "argument of UInt64.hi must be a UInt64"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-type-pointer.js b/js/src/jit-test/tests/ctypes/argument-type-pointer.js new file mode 100644 index 0000000000..80f96ad905 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-type-pointer.js @@ -0,0 +1,9 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.PointerType({}); }, + "argument of PointerType must be a CType"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/argument-type-struct.js b/js/src/jit-test/tests/ctypes/argument-type-struct.js new file mode 100644 index 0000000000..703c0f059f --- /dev/null +++ b/js/src/jit-test/tests/ctypes/argument-type-struct.js @@ -0,0 +1,17 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.StructType(1); }, + "first argument of StructType must be a string"); + assertTypeErrorMessage(() => { ctypes.StructType("a", 1); }, + "second argument of StructType must be an array"); + assertTypeErrorMessage(() => { ctypes.StructType("a").define(1); }, + "argument of StructType.prototype.define must be an array"); + assertTypeErrorMessage(() => { ctypes.StructType("a").define({}); }, + "argument of StructType.prototype.define must be an array"); + assertTypeErrorMessage(() => { ctypes.StructType("a", [{x:ctypes.int32_t}])().addressOfField(1); }, + "argument of StructType.prototype.addressOfField must be a string"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/array-index.js b/js/src/jit-test/tests/ctypes/array-index.js new file mode 100644 index 0000000000..e70add1a06 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/array-index.js @@ -0,0 +1,29 @@ +load(libdir + 'asserts.js'); + +function test() { + let a = ctypes.int32_t.array(10)(); + assertTypeErrorMessage(() => { let x = a[-1]; }, + "the string \"-1\" is not a valid array index"); + assertTypeErrorMessage(() => { a[-1] = 1; }, + "the string \"-1\" is not a valid array index"); + assertTypeErrorMessage(() => { a.addressOfElement(-1); }, + "the number -1 is not a valid array index"); + + assertRangeErrorMessage(() => { let x = a[10]; }, + "array index 10 is out of bounds for array of length 10"); + assertRangeErrorMessage(() => { a[10] = 1; }, + "array index 10 is out of bounds for array of length 10"); + assertRangeErrorMessage(() => { a.addressOfElement(10); }, + "array index 10 is out of bounds for array of length 10"); + + let obj = { + toSource() { + throw 1; + } + }; + assertTypeErrorMessage(() => { a.addressOfElement(obj); }, + "<> is not a valid array index"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/bug1155985.js b/js/src/jit-test/tests/ctypes/bug1155985.js new file mode 100644 index 0000000000..54c24d4bad --- /dev/null +++ b/js/src/jit-test/tests/ctypes/bug1155985.js @@ -0,0 +1,14 @@ +function test() { + for (let i = 0; i < 100; i++) { + let test_struct = ctypes.StructType("test_struct", [{ "x": ctypes.int32_t }, + { "bar": ctypes.uint32_t }]); + + try { + new test_struct("foo", "x"); + } catch (e) { + } + } +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/cast.js b/js/src/jit-test/tests/ctypes/cast.js new file mode 100644 index 0000000000..c483d3793f --- /dev/null +++ b/js/src/jit-test/tests/ctypes/cast.js @@ -0,0 +1,12 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.cast(ctypes.int32_t(0), ctypes.StructType("foo")); }, + "target type foo has undefined size"); + + assertTypeErrorMessage(() => { ctypes.cast(ctypes.int32_t(0), ctypes.StructType("foo", [ { x: ctypes.int32_t }, { y: ctypes.int32_t } ])); }, + "target type foo has larger size than source type ctypes.int32_t (8 > 4)"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/construct.js b/js/src/jit-test/tests/ctypes/construct.js new file mode 100644 index 0000000000..cfabdf24dc --- /dev/null +++ b/js/src/jit-test/tests/ctypes/construct.js @@ -0,0 +1,11 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.void_t(); }, + "cannot construct from void_t"); + assertTypeErrorMessage(() => { ctypes.CType(); }, + "cannot construct from abstract type"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/conversion-array.js b/js/src/jit-test/tests/ctypes/conversion-array.js new file mode 100644 index 0000000000..cb6e2ce0b8 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/conversion-array.js @@ -0,0 +1,36 @@ +// Type conversion error should report its type. + +load(libdir + 'asserts.js'); + +function test() { + // constructor + assertTypeErrorMessage(() => { ctypes.int32_t.array()("foo"); }, + "can't convert the string \"foo\" to the type ctypes.int32_t.array()"); + assertTypeErrorMessage(() => { ctypes.int32_t.array(10)("foo"); }, + "can't convert the string \"foo\" to the type ctypes.int32_t.array(10)"); + assertTypeErrorMessage(() => { ctypes.char.array(2)("foo"); }, + "length of the string \"foo\" does not fit in the length of the type ctypes.char.array(2) (expected 2 or lower, got 3)"); + assertTypeErrorMessage(() => { ctypes.char16_t.array(2)("foo"); }, + "length of the string \"foo\" does not fit in the length of the type ctypes.char16_t.array(2) (expected 2 or lower, got 3)"); + assertTypeErrorMessage(() => { ctypes.int8_t.array(2)(new ArrayBuffer(8)); }, + "length of the array buffer ({}) does not match to the length of the type ctypes.int8_t.array(2) (expected 2, got 8)"); + assertTypeErrorMessage(() => { ctypes.int8_t.array(2)(new Int8Array(8)); }, + "length of the typed array ({0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0}) does not match to the length of the type ctypes.int8_t.array(2) (expected 2, got 8)"); + + // elem setter + assertTypeErrorMessage(() => { ctypes.int32_t.array(10)()[0] = "foo"; }, + "can't convert the string \"foo\" to element 0 of the type ctypes.int32_t.array(10)"); + assertTypeErrorMessage(() => { ctypes.int32_t.array(10)()[1] = "foo"; }, + "can't convert the string \"foo\" to element 1 of the type ctypes.int32_t.array(10)"); + + // value setter + assertTypeErrorMessage(() => { ctypes.int32_t.array(1)().value = ["foo"]; }, + "can't convert the string \"foo\" to element 0 of the type ctypes.int32_t.array(1)"); + assertTypeErrorMessage(() => { ctypes.int32_t.array(1)().value = [2, "foo"]; }, + "length of the array [2, \"foo\"] does not match to the length of the type ctypes.int32_t.array(1) (expected 1, got 2)"); + assertTypeErrorMessage(() => { ctypes.int32_t.array(2)().value = [2, "foo"]; }, + "can't convert the string \"foo\" to element 1 of the type ctypes.int32_t.array(2)"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/conversion-error.js b/js/src/jit-test/tests/ctypes/conversion-error.js new file mode 100644 index 0000000000..a6823fe5ce --- /dev/null +++ b/js/src/jit-test/tests/ctypes/conversion-error.js @@ -0,0 +1,14 @@ +load(libdir + 'asserts.js'); + +function test() { + let obj = { + toSource() { + throw 1; + } + }; + assertTypeErrorMessage(() => { ctypes.double().value = obj; }, + "can't convert <> to the type double"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/conversion-finalizer.js b/js/src/jit-test/tests/ctypes/conversion-finalizer.js new file mode 100644 index 0000000000..ff36c4981d --- /dev/null +++ b/js/src/jit-test/tests/ctypes/conversion-finalizer.js @@ -0,0 +1,63 @@ +// |jit-test| skip-if: getBuildConfiguration("arm") || getBuildConfiguration("arm64") +// skip on arm, arm64 due to bug 1511615 +load(libdir + 'asserts.js'); + +function test() { + // non object + assertTypeErrorMessage(() => { ctypes.CDataFinalizer(0, "foo"); }, + "expected _a CData object_ of a function pointer type, got the string \"foo\""); + // non CData object + assertTypeErrorMessage(() => { ctypes.CDataFinalizer(0, ["foo"]); }, + "expected a _CData_ object of a function pointer type, got the array [\"foo\"]"); + + // a CData which is not a pointer + assertTypeErrorMessage(() => { ctypes.CDataFinalizer(0, ctypes.int32_t(0)); }, + "expected a CData object of a function _pointer_ type, got ctypes.int32_t(0)"); + // a pointer CData which is not a function + assertTypeErrorMessage(() => { ctypes.CDataFinalizer(0, ctypes.int32_t.ptr(0)); }, + "expected a CData object of a _function_ pointer type, got ctypes.int32_t.ptr(ctypes.UInt64(\"0x0\"))"); + + // null function + let func_type = ctypes.FunctionType(ctypes.default_abi, ctypes.voidptr_t, + [ctypes.int32_t, ctypes.int32_t]).ptr; + let f0 = func_type(0); + assertTypeErrorMessage(() => { ctypes.CDataFinalizer(0, f0); }, + "expected a CData object of a _non-NULL_ function pointer type, got ctypes.FunctionType(ctypes.default_abi, ctypes.voidptr_t, [ctypes.int32_t, ctypes.int32_t]).ptr(ctypes.UInt64(\"0x0\"))"); + + // a function with 2 arguments + let f1 = func_type(x => x); + assertTypeErrorMessage(() => { ctypes.CDataFinalizer(0, f1); }, + "expected a function accepting exactly one argument, got ctypes.FunctionType(ctypes.default_abi, ctypes.voidptr_t, [ctypes.int32_t, ctypes.int32_t])"); + + // non CData in argument 1 + let func_type2 = ctypes.FunctionType(ctypes.default_abi, ctypes.voidptr_t, + [ctypes.int32_t.ptr]).ptr; + let f2 = func_type2(x => x); + assertTypeErrorMessage(() => { ctypes.CDataFinalizer(0, f2); }, + "can't convert the number 0 to the type of argument 1 of ctypes.FunctionType(ctypes.default_abi, ctypes.voidptr_t, [ctypes.int32_t.ptr]).ptr"); + + // wrong struct in argument 1 + let test_struct = ctypes.StructType("test_struct", [{ "x": ctypes.int32_t }]); + let func_type3 = ctypes.FunctionType(ctypes.default_abi, ctypes.voidptr_t, + [test_struct]).ptr; + let f3 = func_type3(x => x); + assertTypeErrorMessage(() => { ctypes.CDataFinalizer({ "x": "foo" }, f3); }, + "can't convert the string \"foo\" to the 'x' field (int32_t) of test_struct at argument 1 of ctypes.FunctionType(ctypes.default_abi, ctypes.voidptr_t, [test_struct]).ptr"); + + // different size in argument 1 + let func_type4 = ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, + [ctypes.int32_t]).ptr; + let f4 = func_type4(x => x); + assertTypeErrorMessage(() => { ctypes.CDataFinalizer(ctypes.int16_t(0), f4); }, + "expected an object with the same size as argument 1 of ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, [ctypes.int32_t]).ptr, got ctypes.int16_t(0)"); + + let fin = ctypes.CDataFinalizer(ctypes.int32_t(0), f4); + fin.dispose(); + assertTypeErrorMessage(() => { ctypes.int32_t(0).value = fin; }, + "attempting to convert an empty CDataFinalizer"); + assertTypeErrorMessage(() => { f4(fin); }, + /attempting to convert an empty CDataFinalizer at argument 1 of ctypes\.FunctionType\(ctypes\.default_abi, ctypes\.int32_t, \[ctypes\.int32_t\]\)\.ptr\(ctypes\.UInt64\(\"[x0-9A-Fa-f]+\"\)\)/); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/conversion-function.js b/js/src/jit-test/tests/ctypes/conversion-function.js new file mode 100644 index 0000000000..cd90f1b606 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/conversion-function.js @@ -0,0 +1,33 @@ +// Type conversion error should report its type. + +load(libdir + 'asserts.js'); + +function test() { + // Note: js shell cannot handle the exception in return value. + + // primitive + let func_type = ctypes.FunctionType(ctypes.default_abi, ctypes.voidptr_t, + [ctypes.int32_t]).ptr; + let f1 = func_type(function() {}); + assertTypeErrorMessage(() => { f1("foo"); }, + /can't pass the string "foo" to argument 1 of ctypes\.FunctionType\(ctypes\.default_abi, ctypes\.voidptr_t, \[ctypes\.int32_t\]\)\.ptr\(ctypes\.UInt64\("[x0-9A-Fa-f]+"\)\)/); + + // struct + let test_struct = ctypes.StructType("test_struct", [{ "x": ctypes.int32_t }]); + let func_type2 = ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, + [test_struct]).ptr; + let f2 = func_type2(function() {}); + assertTypeErrorMessage(() => { f2({ "x": "foo" }); }, + /can't convert the string \"foo\" to the 'x' field \(int32_t\) of test_struct at argument 1 of ctypes\.FunctionType\(ctypes\.default_abi, ctypes.int32_t, \[test_struct\]\)\.ptr\(ctypes\.UInt64\(\"[x0-9A-Fa-f]+\"\)\)/); + assertTypeErrorMessage(() => { f2({ "x": "foo", "y": "bar" }); }, + /property count of the object \(\{x:\"foo\", y:\"bar\"\}\) does not match to field count of the type test_struct \(expected 1, got 2\) at argument 1 of ctypes\.FunctionType\(ctypes\.default_abi, ctypes\.int32_t, \[test_struct\]\)\.ptr\(ctypes\.UInt64\(\"[x0-9A-Fa-f]+\"\)\)/); + assertTypeErrorMessage(() => { f2({ 0: "foo" }); }, + /property name the number 0 of the object \(\{0:\"foo\"\}\) is not a string at argument 1 of ctypes\.FunctionType\(ctypes\.default_abi, ctypes\.int32_t, \[test_struct\]\)\.ptr\(ctypes\.UInt64\(\"[x0-9A-Fa-f]+\"\)\)/); + + // error sentinel + assertTypeErrorMessage(() => { func_type(function() {}, null, "foo"); }, + "can't convert the string \"foo\" to the return type of ctypes.FunctionType(ctypes.default_abi, ctypes.voidptr_t, [ctypes.int32_t])"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/conversion-int64.js b/js/src/jit-test/tests/ctypes/conversion-int64.js new file mode 100644 index 0000000000..89a14fef9e --- /dev/null +++ b/js/src/jit-test/tests/ctypes/conversion-int64.js @@ -0,0 +1,20 @@ +load(libdir + 'asserts.js'); + +function test() { + assertRangeErrorMessage(() => { ctypes.Int64("0xfffffffffffffffffffffff"); }, + "the string \"0xfffffffffffffffffffffff\" does not fit in the type int64"); + assertTypeErrorMessage(() => { ctypes.Int64.join("foo", 0); }, + "can't pass the string \"foo\" to argument 1 of Int64.join"); + assertTypeErrorMessage(() => { ctypes.Int64.join(0, "foo"); }, + "can't pass the string \"foo\" to argument 2 of Int64.join"); + + assertRangeErrorMessage(() => { ctypes.UInt64("0xfffffffffffffffffffffff"); }, + "the string \"0xfffffffffffffffffffffff\" does not fit in the type uint64"); + assertTypeErrorMessage(() => { ctypes.UInt64.join("foo", 0); }, + "can't pass the string \"foo\" to argument 1 of UInt64.join"); + assertTypeErrorMessage(() => { ctypes.UInt64.join(0, "foo"); }, + "can't pass the string \"foo\" to argument 2 of UInt64.join"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/conversion-native-function.js b/js/src/jit-test/tests/ctypes/conversion-native-function.js new file mode 100644 index 0000000000..b005596c2c --- /dev/null +++ b/js/src/jit-test/tests/ctypes/conversion-native-function.js @@ -0,0 +1,37 @@ +// Type conversion error for native function should report its name and type +// in C style. + +load(libdir + 'asserts.js'); + +function test() { + let lib; + try { + lib = ctypes.open(ctypes.libraryName("m")); + } catch (e) { + } + if (!lib) + return; + + let func = lib.declare("hypot", + ctypes.default_abi, + ctypes.double, + ctypes.double, ctypes.double); + assertTypeErrorMessage(() => { func(1, "xyzzy"); }, + "can't pass the string \"xyzzy\" to argument 2 of double hypot(double, double)"); + + // test C style source for various types + let test_struct = ctypes.StructType("test_struct", [{ "x": ctypes.int32_t }]); + let test_func = ctypes.FunctionType(ctypes.default_abi, ctypes.voidptr_t, + [ctypes.int32_t]).ptr; + func = lib.declare("hypot", + ctypes.default_abi, + ctypes.double, + ctypes.double, ctypes.int32_t.ptr.ptr.ptr.array(), + test_struct, test_struct.ptr.ptr, + test_func, test_func.ptr.ptr.ptr, "..."); + assertTypeErrorMessage(() => { func("xyzzy", 1, 2, 3, 4, 5); }, + "can't pass the string \"xyzzy\" to argument 1 of double hypot(double, int32_t****, struct test_struct, struct test_struct**, void* (*)(int32_t), void* (****)(int32_t), ...)"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/conversion-pointer.js b/js/src/jit-test/tests/ctypes/conversion-pointer.js new file mode 100644 index 0000000000..d2583b8789 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/conversion-pointer.js @@ -0,0 +1,29 @@ +// Type conversion error should report its type. + +load(libdir + 'asserts.js'); + +function test() { + let test_struct = ctypes.StructType("test_struct", [{ "x": ctypes.int32_t }]); + let struct_val = test_struct(); + + // constructor + assertTypeErrorMessage(() => { ctypes.int32_t.ptr("foo"); }, + "can't convert the string \"foo\" to the type ctypes.int32_t.ptr"); + + // value setter + assertTypeErrorMessage(() => { test_struct.ptr().value = "foo"; }, + "can't convert the string \"foo\" to the type test_struct.ptr"); + assertTypeErrorMessage(() => { test_struct.ptr().value = {}; }, + "can't convert the object ({}) to the type test_struct.ptr"); + assertTypeErrorMessage(() => { test_struct.ptr().value = [1, 2]; }, + "can't convert the array [1, 2] to the type test_struct.ptr"); + assertTypeErrorMessage(() => { test_struct.ptr().value = new Int8Array([1, 2]); }, + "can't convert the typed array ({0:1, 1:2}) to the type test_struct.ptr"); + + // contents setter + assertTypeErrorMessage(() => { ctypes.int32_t().address().contents = {}; }, + "can't convert the object ({}) to the type int32_t"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/conversion-primitive.js b/js/src/jit-test/tests/ctypes/conversion-primitive.js new file mode 100644 index 0000000000..38512f9c45 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/conversion-primitive.js @@ -0,0 +1,44 @@ +// Type conversion error should report its type. + +load(libdir + 'asserts.js'); + +function test() { + // constructor + assertTypeErrorMessage(() => { ctypes.int32_t("foo"); }, + "can't convert the string \"foo\" to the type int32_t"); + assertTypeErrorMessage(() => { ctypes.int32_t(null); }, + "can't convert null to the type int32_t"); + assertTypeErrorMessage(() => { ctypes.int32_t(undefined); }, + "can't convert undefined to the type int32_t"); + assertTypeErrorMessage(() => { ctypes.int32_t({}); }, + "can't convert the object ({}) to the type int32_t"); + assertTypeErrorMessage(() => { ctypes.int32_t([]); }, + "can't convert the array [] to the type int32_t"); + assertTypeErrorMessage(() => { ctypes.int32_t(new Int8Array([])); }, + "can't convert the typed array ({}) to the type int32_t"); + assertTypeErrorMessage(() => { ctypes.int32_t(ctypes.int32_t); }, + "can't convert ctypes.int32_t to the type int32_t"); + assertRangeErrorMessage(() => { ctypes.int32_t("0xfffffffffffffffffffffff"); }, + "the string \"0xfffffffffffffffffffffff\" does not fit in the type int32_t"); + if (typeof Symbol === "function") { + assertTypeErrorMessage(() => { ctypes.int32_t(Symbol.iterator); }, + "can't convert Symbol.iterator to the type int32_t"); + assertTypeErrorMessage(() => { ctypes.int32_t(Symbol("foo")); }, + "can't convert Symbol(\"foo\") to the type int32_t"); + } + + // value setter + let test_struct = ctypes.StructType("test_struct", [{ "x": ctypes.int32_t }]); + let struct_val = test_struct(); + assertTypeErrorMessage(() => { ctypes.bool().value = struct_val; }, + "can't convert test_struct(0) to the type boolean"); + assertTypeErrorMessage(() => { ctypes.char16_t().value = struct_val; }, + "can't convert test_struct(0) to the type char16_t"); + assertTypeErrorMessage(() => { ctypes.int8_t().value = struct_val; }, + "can't convert test_struct(0) to the type int8_t"); + assertTypeErrorMessage(() => { ctypes.double().value = struct_val; }, + "can't convert test_struct(0) to the type double"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/conversion-struct.js b/js/src/jit-test/tests/ctypes/conversion-struct.js new file mode 100644 index 0000000000..f5e43ffa56 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/conversion-struct.js @@ -0,0 +1,36 @@ +// Type conversion error should report its type. + +load(libdir + 'asserts.js'); + +function test() { + let test_struct = ctypes.StructType("test_struct", [{ "x": ctypes.int32_t }, + { "bar": ctypes.int32_t }]); + + // constructor + assertTypeErrorMessage(() => { new test_struct("foo"); }, + "can't convert the string \"foo\" to the type test_struct"); + assertTypeErrorMessage(() => { new test_struct("foo", "x"); }, + "can't convert the string \"foo\" to the 'x' field (int32_t) of test_struct"); + assertTypeErrorMessage(() => { new test_struct({ "x": "foo", "bar": 1 }); }, + "can't convert the string \"foo\" to the 'x' field (int32_t) of test_struct"); + assertTypeErrorMessage(() => { new test_struct({ 0: 1, "bar": 1 }); }, + "property name the number 0 of the object ({0:1, bar:1}) is not a string"); + + // field setter + let struct_val = test_struct(); + assertTypeErrorMessage(() => { struct_val.x = "foo"; }, + "can't convert the string \"foo\" to the 'x' field (int32_t) of test_struct"); + assertTypeErrorMessage(() => { struct_val.bar = "foo"; }, + "can't convert the string \"foo\" to the 'bar' field (int32_t) of test_struct"); + + // value setter + assertTypeErrorMessage(() => { struct_val.value = { "x": "foo" }; }, + "property count of the object ({x:\"foo\"}) does not match to field count of the type test_struct (expected 2, got 1)"); + assertTypeErrorMessage(() => { struct_val.value = { "x": "foo", "bar": 1 }; }, + "can't convert the string \"foo\" to the 'x' field (int32_t) of test_struct"); + assertTypeErrorMessage(() => { struct_val.value = "foo"; }, + "can't convert the string \"foo\" to the type test_struct"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/conversion-to-number.js b/js/src/jit-test/tests/ctypes/conversion-to-number.js new file mode 100644 index 0000000000..6a334ecf3a --- /dev/null +++ b/js/src/jit-test/tests/ctypes/conversion-to-number.js @@ -0,0 +1,98 @@ +// Type conversion to number should use ECMA-style semantics. + +load(libdir + 'asserts.js'); + +function test() { + function checkValue(type, provided, expected) { + assertEq(ctypes[type](provided).value, expected, + `ctypes.${type}(${provided}) contains unexpected value`); + } + + function checkCantConvert(type, value) { + var ctor = ctypes[type]; + assertTypeErrorMessage(() => ctor(value), + /can't convert the number/); + } + + let testInt8 = checkValue.bind(undefined, "int8_t"); + let testInt8Throws = checkCantConvert.bind(undefined, "int8_t"); + testInt8(1e100, 0); + testInt8Throws(-129); + testInt8(-128, -128); + testInt8(-1, -1); + testInt8(0, 0); + testInt8(1, 1); + testInt8(127, 127); + testInt8Throws(128); + + let testUint8 = checkValue.bind(undefined, "uint8_t"); + let testUint8Throws = checkCantConvert.bind(undefined, "uint8_t"); + testUint8(1e100, 0); + testUint8Throws(-1); + testUint8(0, 0); + testUint8(1, 1); + testUint8(127, 127); + testUint8(128, 128); + testUint8(255, 255); + testUint8Throws(256); + + let testInt16 = checkValue.bind(undefined, "int16_t"); + let testInt16Throws = checkCantConvert.bind(undefined, "int16_t"); + testInt16(1e100, 0); + testInt16Throws(-32769); + testInt16(-32768, -32768); + testInt16(-1, -1); + testInt16(0, 0); + testInt16(1, 1); + testInt16(32767, 32767); + testInt16Throws(32768); + + let testUint16 = checkValue.bind(undefined, "uint16_t"); + let testUint16Throws = checkCantConvert.bind(undefined, "uint16_t"); + testUint16(1e100, 0); + testUint16Throws(-1); + testUint16(0, 0); + testUint16(1, 1); + testUint16(32767, 32767); + testUint16(32768, 32768); + testUint16(65535, 65535); + testUint16Throws(65536); + + let testInt32 = checkValue.bind(undefined, "int32_t"); + let testInt32Throws = checkCantConvert.bind(undefined, "int32_t"); + testInt32(1e100, 0); + // This probably should pass, but right now doubles fall into a different + // code path where no error occurs. ctypes is probably/hopefully declining in + // use now, so just don't bother with this test. + //testInt32Throws(-2147483649); + testInt32(-2147483648, -2147483648); + testInt32(-1, -1); + testInt32(0, 0); + testInt32(1, 1); + testInt32(2147483647, 2147483647); + // This probably should pass, but right now doubles fall into a different + // code path where no error occurs. ctypes is probably/hopefully declining in + // use now, so just don't bother with this test. + //testInt32Throws(2147483648); + + let testUint32 = checkValue.bind(undefined, "uint32_t"); + let testUint32Throws = checkCantConvert.bind(undefined, "uint32_t"); + testUint32(1e100, 0); + testUint32Throws(-1); + // This probably should pass, but right now doubles fall into a different + // code path where no error occurs. ctypes is probably/hopefully declining in + // use now, so just don't bother with this test. + //testUint32Throws(-1 * Math.cos(Math.PI)); // -1.0 encoded as a double + testUint32(0, 0); + testUint32(1, 1); + testUint32(2147483647, 2147483647); + testUint32(2147483648, 2147483648); + testUint32(4294967295, 4294967295); + // This probably should pass, but right now doubles fall into a different + // code path where no error occurs. ctypes is probably/hopefully declining in + // use now, so just don't bother with this test. + //testUint32Throws(4294967296); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/conversion-to-primitive.js b/js/src/jit-test/tests/ctypes/conversion-to-primitive.js new file mode 100644 index 0000000000..cdb9a4a051 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/conversion-to-primitive.js @@ -0,0 +1,20 @@ +// Accessing `value` property of non primitive type should report its type. + +load(libdir + 'asserts.js'); + +function test() { + let test_struct = ctypes.StructType("test_struct", [{ "x": ctypes.voidptr_t }]); + assertTypeErrorMessage(() => test_struct().value, + ".value only works on character and numeric types, not `test_struct`"); + + let test_array = ctypes.ArrayType(test_struct); + assertTypeErrorMessage(() => test_array(10).value, + ".value only works on character and numeric types, not `test_struct.array(10)`"); + + let test_pointer = ctypes.PointerType(test_struct); + assertTypeErrorMessage(() => test_pointer(10).value, + ".value only works on character and numeric types, not `test_struct.ptr`"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/function-definition.js b/js/src/jit-test/tests/ctypes/function-definition.js new file mode 100644 index 0000000000..5882ba8891 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/function-definition.js @@ -0,0 +1,47 @@ +load(libdir + 'asserts.js'); + +function test() { + assertRangeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, []).ptr(x=>1)(1); }, + "number of arguments does not match declaration of ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t) (expected 0, got 1)"); + + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, [1]); }, + "the type of argument 1 is not a ctypes type (got the number 1)"); + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, [ctypes.void_t]); }, + "the type of argument 1 cannot be void or function (got ctypes.void)"); + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, [ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, [])]); }, + "the type of argument 1 cannot be void or function (got ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t))"); + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, [ctypes.StructType("a")]); }, + "the type of argument 1 must have defined size (got ctypes.StructType(\"a\"))"); + + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, [])(); }, + "cannot construct from FunctionType; use FunctionType.ptr instead"); + + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, 1, []); }, + "return type is not a ctypes type (got the number 1)"); + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t.array(), []); }, + "return type cannot be an array or function (got ctypes.int32_t.array())"); + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, []), []); }, + "return type cannot be an array or function (got ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t))"); + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.StructType("a"), []); }, + "return type must have defined size (got ctypes.StructType(\"a\"))"); + + let lib; + try { + lib = ctypes.open(ctypes.libraryName("m")); + } catch (e) { + } + if (!lib) + return; + + let func = lib.declare("hypot", + ctypes.default_abi, + ctypes.double, + ctypes.double, "..."); + assertRangeErrorMessage(() => { func(); }, + "number of arguments does not match declaration of double hypot(double, ...) (expected 1 or more, got 0)"); + assertTypeErrorMessage(() => { func(1, 2); }, + "variadic argument 2 must be a CData object (got the number 2)"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/incompatible-abi.js b/js/src/jit-test/tests/ctypes/incompatible-abi.js new file mode 100644 index 0000000000..9b7f6569b7 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/incompatible-abi.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !this.ctypes || !ctypes.default_abi.toSource + +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.default_abi.toSource.call(1); }, + "ABI.prototype.toSource called on incompatible object, got the number 1"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/incompatible-array.js b/js/src/jit-test/tests/ctypes/incompatible-array.js new file mode 100644 index 0000000000..968da01098 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/incompatible-array.js @@ -0,0 +1,13 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.int32_t.array.call(1); }, + "CType.prototype.array called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { ctypes.int32_t.array(10)().addressOfElement.call(1); }, + "ArrayType.prototype.addressOfElement called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { ctypes.int32_t.array(10)().addressOfElement.call(ctypes.int32_t(0)); }, + "ArrayType.prototype.addressOfElement called on non-ArrayType CData, got ctypes.int32_t(0)"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/incompatible-cdata.js b/js/src/jit-test/tests/ctypes/incompatible-cdata.js new file mode 100644 index 0000000000..e0349be673 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/incompatible-cdata.js @@ -0,0 +1,27 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.int32_t(0).address.call(1); }, + "CData.prototype.address called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { ctypes.char.array(10)("abc").readString.call(1); }, + "CData.prototype.readString called on incompatible object, got the number 1"); + + assertTypeErrorMessage(() => { ctypes.char.array(10)("abc").readStringReplaceMalformed.call(1); }, + "CData.prototype.readStringReplaceMalformed called on incompatible object, got the number 1"); + + if (ctypes.int32_t.prototype.toSource) { + assertTypeErrorMessage(() => { ctypes.int32_t(0).toSource.call(1); }, + "CData.prototype.toSource called on incompatible object, got the number 1"); + } + + let p = Object.getPrototypeOf(ctypes.int32_t()); + let o = {}; + Object.setPrototypeOf(o, p); + assertTypeErrorMessage(() => { o.readString(); }, + "CData.prototype.readString called on incompatible object, got <>"); + assertTypeErrorMessage(() => { o.readStringReplaceMalformed(); }, + "CData.prototype.readStringReplaceMalformed called on incompatible object, got <>"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/incompatible-ctype.js b/js/src/jit-test/tests/ctypes/incompatible-ctype.js new file mode 100644 index 0000000000..7e14c1d615 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/incompatible-ctype.js @@ -0,0 +1,13 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.int32_t.toString.call(1); }, + "CType.prototype.toString called on incompatible object, got the number 1"); + if (ctypes.int32_t.prototype.toSource) { + assertTypeErrorMessage(() => { ctypes.int32_t.toSource.call(1); }, + "CType.prototype.toSource called on incompatible object, got the number 1"); + } +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/incompatible-finalizer.js b/js/src/jit-test/tests/ctypes/incompatible-finalizer.js new file mode 100644 index 0000000000..b4b0dab7f4 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/incompatible-finalizer.js @@ -0,0 +1,26 @@ +load(libdir + 'asserts.js'); + +function test() { + let fin = ctypes.CDataFinalizer(ctypes.int32_t(0), ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, [ctypes.int32_t]).ptr(x => x)); + if (fin.toSource) { + assertTypeErrorMessage(() => { fin.toSource.call(1); }, + "CDataFinalizer.prototype.toSource called on incompatible object, got the number 1"); + } + assertTypeErrorMessage(() => { fin.toString.call(1); }, + "CDataFinalizer.prototype.toString called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { fin.forget.call(1); }, + "CDataFinalizer.prototype.forget called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { fin.dispose.call(1); }, + "CDataFinalizer.prototype.dispose called on incompatible object, got the number 1"); + fin.forget(); + + assertTypeErrorMessage(() => { fin.readString(); }, + "CDataFinalizer.prototype.readString called on empty CDataFinalizer"); + assertTypeErrorMessage(() => { fin.dispose(); }, + "CDataFinalizer.prototype.dispose called on empty CDataFinalizer"); + assertTypeErrorMessage(() => { fin.forget(); }, + "CDataFinalizer.prototype.forget called on empty CDataFinalizer"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/incompatible-function.js b/js/src/jit-test/tests/ctypes/incompatible-function.js new file mode 100644 index 0000000000..cd31cc5e70 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/incompatible-function.js @@ -0,0 +1,13 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.void_t).call.call(1); }, + "Function.prototype.call called on incompatible number"); + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.void_t).call.call(ctypes.int32_t(0)); }, + "FunctionType.prototype.call called on non-PointerType CData, got ctypes.int32_t(0)"); + assertTypeErrorMessage(() => { ctypes.FunctionType(ctypes.default_abi, ctypes.void_t).call.call(ctypes.int32_t.ptr(0)); }, + "FunctionType.prototype.call called on non-FunctionType pointer, got ctypes.int32_t.ptr(ctypes.UInt64(\"0x0\"))"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/incompatible-int64.js b/js/src/jit-test/tests/ctypes/incompatible-int64.js new file mode 100644 index 0000000000..b2f7a3889c --- /dev/null +++ b/js/src/jit-test/tests/ctypes/incompatible-int64.js @@ -0,0 +1,28 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.Int64(0).toString.call(1); }, + "Int64.prototype.toString called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { ctypes.Int64(0).toString.call(ctypes.int32_t(0)); }, + "Int64.prototype.toString called on non-Int64 CData"); + if (ctypes.Int64.prototype.toSource) { + assertTypeErrorMessage(() => { ctypes.Int64(0).toSource.call(1); }, + "Int64.prototype.toSource called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { ctypes.Int64(0).toSource.call(ctypes.int32_t(0)); }, + "Int64.prototype.toSource called on non-Int64 CData"); + } + + assertTypeErrorMessage(() => { ctypes.UInt64(0).toString.call(1); }, + "UInt64.prototype.toString called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { ctypes.UInt64(0).toString.call(ctypes.int32_t(0)); }, + "UInt64.prototype.toString called on non-UInt64 CData"); + if (ctypes.UInt64.prototype.toSource) { + assertTypeErrorMessage(() => { ctypes.UInt64(0).toSource.call(1); }, + "UInt64.prototype.toSource called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { ctypes.UInt64(0).toSource.call(ctypes.int32_t(0)); }, + "UInt64.prototype.toSource called on non-UInt64 CData"); + } +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/incompatible-pointer.js b/js/src/jit-test/tests/ctypes/incompatible-pointer.js new file mode 100644 index 0000000000..414974dd89 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/incompatible-pointer.js @@ -0,0 +1,19 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.int32_t.ptr(0).isNull.call(1); }, + "PointerType.prototype.isNull called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { ctypes.int32_t.ptr(0).isNull.call({}); }, + "PointerType.prototype.isNull called on incompatible object, got the object ({})"); + assertTypeErrorMessage(() => { ctypes.int32_t.ptr(0).increment.call(1); }, + "PointerType.prototype.increment called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { ctypes.int32_t.ptr(0).increment.call(ctypes.int32_t(0)); }, + "PointerType.prototype.increment called on non-PointerType CData, got ctypes.int32_t(0)"); + assertTypeErrorMessage(() => { ctypes.int32_t.ptr(0).decrement.call(1); }, + "PointerType.prototype.decrement called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { ctypes.int32_t.ptr(0).decrement.call(ctypes.int32_t(0)); }, + "PointerType.prototype.decrement called on non-PointerType CData, got ctypes.int32_t(0)"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/incompatible-struct.js b/js/src/jit-test/tests/ctypes/incompatible-struct.js new file mode 100644 index 0000000000..ccd212978a --- /dev/null +++ b/js/src/jit-test/tests/ctypes/incompatible-struct.js @@ -0,0 +1,31 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.StructType("a").define.call(1); }, + "StructType.prototype.define called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { ctypes.StructType("a").define.call(ctypes.int32_t); }, + "StructType.prototype.define called on non-StructType, got ctypes.int32_t"); + + let p = Object.getPrototypeOf(ctypes.StructType("a", [ { "x": ctypes.int32_t, } ])()); + let o = {}; + Object.setPrototypeOf(o, p); + assertTypeErrorMessage(() => { let a = o.x; }, + "StructType property getter called on incompatible object, got <>"); + assertTypeErrorMessage(() => { o.x = 1; }, + "StructType property setter called on incompatible object, got <>"); + + o = ctypes.int32_t(0); + Object.setPrototypeOf(o, p); + assertTypeErrorMessage(() => { let a = o.x; }, + "StructType property getter called on non-StructType CData, got ctypes.int32_t(0)"); + assertTypeErrorMessage(() => { o.x = 1; }, + "StructType property setter called on non-StructType CData, got ctypes.int32_t(0)"); + + assertTypeErrorMessage(() => { ctypes.StructType("a", [])().addressOfField.call(1); }, + "StructType.prototype.addressOfField called on incompatible object, got the number 1"); + assertTypeErrorMessage(() => { ctypes.StructType("a", [])().addressOfField.call(ctypes.int32_t(0)); }, + "StructType.prototype.addressOfField called on non-StructType CData, got ctypes.int32_t(0)"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/pointer.js b/js/src/jit-test/tests/ctypes/pointer.js new file mode 100644 index 0000000000..da0685f07b --- /dev/null +++ b/js/src/jit-test/tests/ctypes/pointer.js @@ -0,0 +1,31 @@ +load(libdir + 'asserts.js'); + +function test() { + let p = ctypes.StructType("foo").ptr(0); + + assertTypeErrorMessage(() => { p.increment(); }, + "cannot modify pointer of undefined size foo.ptr(ctypes.UInt64(\"0x0\"))"); + assertTypeErrorMessage(() => { p.decrement(); }, + "cannot modify pointer of undefined size foo.ptr(ctypes.UInt64(\"0x0\"))"); + + assertTypeErrorMessage(() => { let a = p.contents; }, + "cannot get contents of pointer of undefined size foo.ptr(ctypes.UInt64(\"0x0\"))"); + assertTypeErrorMessage(() => { p.contents = 1; }, + "cannot set contents of pointer of undefined size foo.ptr(ctypes.UInt64(\"0x0\"))"); + + let p2 = ctypes.int32_t.ptr(0); + assertTypeErrorMessage(() => { let a = p2.contents; }, + "cannot read contents of null pointer ctypes.int32_t.ptr(ctypes.UInt64(\"0x0\"))"); + assertTypeErrorMessage(() => { p2.contents = 1; }, + "cannot write contents to null pointer ctypes.int32_t.ptr(ctypes.UInt64(\"0x0\"))"); + assertTypeErrorMessage(() => { p2.readString(); }, + "cannot read contents of null pointer ctypes.int32_t.ptr(ctypes.UInt64(\"0x0\"))"); + + assertTypeErrorMessage(() => { ctypes.int32_t(0).readString(); }, + "expected PointerType or ArrayType, got ctypes.int32_t(0)"); + assertTypeErrorMessage(() => { ctypes.int32_t(0).address().readString(); }, + /base type ctypes\.int32_t\.ptr\(ctypes\.UInt64\(\"[x0-9A-Fa-f]+\"\)\) is not an 8-bit or 16-bit integer or character type/); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/size-overflow-array.js b/js/src/jit-test/tests/ctypes/size-overflow-array.js new file mode 100644 index 0000000000..8b51faec52 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/size-overflow-array.js @@ -0,0 +1,18 @@ +load(libdir + 'asserts.js'); + +function test() { + if (getBuildConfiguration("pointer-byte-size") == 4) { + let big_array = ctypes.int32_t.array(0xfffffff); + assertRangeErrorMessage(() => { big_array.array(0xfffffff); }, + "array size does not fit in size_t"); + } else if (getBuildConfiguration("pointer-byte-size") == 8) { + let big_array = ctypes.int32_t.array(0xfffffff); + assertRangeErrorMessage(() => { big_array.array(0xfffffff); }, + "array size does not fit in JavaScript number"); + assertRangeErrorMessage(() => { big_array.array(0xfffffffff); }, + "array size does not fit in size_t"); + } +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/size-overflow-struct.js b/js/src/jit-test/tests/ctypes/size-overflow-struct.js new file mode 100644 index 0000000000..d3a25f0c95 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/size-overflow-struct.js @@ -0,0 +1,24 @@ +load(libdir + 'asserts.js'); + +function test() { + if (getBuildConfiguration("pointer-byte-size") == 4) { + let big_array = ctypes.int32_t.array(0xfffffff); + assertRangeErrorMessage(() => { ctypes.StructType("x", [{a: big_array}, + {b: big_array}, + {c: big_array}, + {d: big_array}, + {e: big_array}]); }, + "struct size does not fit in size_t"); + } else if (getBuildConfiguration("pointer-byte-size") == 8) { + let big_array = ctypes.int32_t.array(0xfffffffffffffff); + assertRangeErrorMessage(() => { ctypes.StructType("x", [{a: big_array}, + {b: big_array}, + {c: big_array}, + {d: big_array}, + {e: big_array}]); }, + "struct size does not fit in size_t"); + } +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/struct-field.js b/js/src/jit-test/tests/ctypes/struct-field.js new file mode 100644 index 0000000000..2b2089e430 --- /dev/null +++ b/js/src/jit-test/tests/ctypes/struct-field.js @@ -0,0 +1,21 @@ +load(libdir + 'asserts.js'); + +function test() { + assertTypeErrorMessage(() => { ctypes.StructType("a", [ 1 ]); }, + "struct field descriptors require a valid name and type (got the number 1)"); + assertTypeErrorMessage(() => { ctypes.StructType("a", [ { x: 1, y: 2 } ]); }, + "struct field descriptors must contain one property (got the object ({x:1, y:2}) with 2 properties)"); + assertTypeErrorMessage(() => { ctypes.StructType("a", [ { 1: 1 } ]); }, + "the number 1 is not a valid name of struct field descriptors"); + assertTypeErrorMessage(() => { ctypes.StructType("a", [ { "x": 1 } ]); }, + "the number 1 is not a valid type of struct field descriptors for 'x' field"); + assertTypeErrorMessage(() => { ctypes.StructType("a", [ { "x": ctypes.StructType("b") } ]); }, + "struct field type must have defined and nonzero size (got ctypes.StructType(\"b\") for 'x' field)"); + assertTypeErrorMessage(() => { ctypes.StructType("a", [ { "x": ctypes.int32_t, }, { "x": ctypes.int32_t } ]); }, + "struct fields must have unique names, 'x' field appears twice"); + assertTypeErrorMessage(() => { ctypes.StructType("a", [ { "x": ctypes.int32_t, } ])().addressOfField("z"); }, + "ctypes.StructType(\"a\", [{ \"x\": ctypes.int32_t }]) does not have a field named 'z'"); +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/ctypes/typedarrays.js b/js/src/jit-test/tests/ctypes/typedarrays.js new file mode 100644 index 0000000000..4595e8fe1f --- /dev/null +++ b/js/src/jit-test/tests/ctypes/typedarrays.js @@ -0,0 +1,102 @@ +load(libdir + 'asserts.js'); + +function typedArrayMatchesString(ta, str, uptoStringLength = false) { + if (ta.length != str.length && !uptoStringLength) + return false; + for (let i = 0; i < str.length; i++) { + if (ta[i] != str.charCodeAt(i)) + return false; + } + return true; +} + +function test() { + + // Check that {signed,unsigned} -> {Int*Array, Uint*Array} for string types. + + const shortU8 = ctypes.unsigned_char.array(10)("abc\0\0\0\0\0\0\0").readTypedArray(); + assertEq(shortU8 instanceof Uint8Array, true); + assertEq(typedArrayMatchesString(shortU8, "abc\0\0\0\0\0\0\0"), true); + + const shortI8 = ctypes.signed_char.array(10)("abc\0\0\0\0\0\0\0").readTypedArray(); + assertEq(shortI8 instanceof Int8Array, true); + assertEq(typedArrayMatchesString(shortI8, "abc\0\0\0\0\0\0\0"), true); + + const shortU16 = ctypes.char16_t.array(10)("千").readTypedArray(); + assertEq(shortU16 instanceof Uint16Array, true); + assertEq(typedArrayMatchesString(shortU16, "千", 'ignore zero-padding, please'), true); + + // ...and for (other) numeric types. + + const I16 = ctypes.int16_t.array(10)().readTypedArray(); + assertEq(I16 instanceof Int16Array, true); + + const U32 = ctypes.uint32_t.array(10)().readTypedArray(); + assertEq(U32 instanceof Uint32Array, true); + + const I32 = ctypes.int32_t.array(10)().readTypedArray(); + assertEq(I32 instanceof Int32Array, true); + + // Check that pointers without associated length get truncated to strlen(). + + const unsignedCharArray = ctypes.unsigned_char.array(10)("abc\0\0\0"); + const shortU8cs = unsignedCharArray.addressOfElement(0).readTypedArray(); + assertEq(shortU8cs instanceof Uint8Array, true); + assertEq(shortU8cs.length, 3); + assertEq(typedArrayMatchesString(shortU8cs, "abc", 'stop at NUL, please'), true); + + const signedCharArray = ctypes.signed_char.array(10)("abc\0\0\0"); + const shortI8cs = signedCharArray.addressOfElement(0).readTypedArray(); + assertEq(shortI8cs instanceof Int8Array, true); + assertEq(shortI8cs.length, 3); + assertEq(typedArrayMatchesString(shortI8cs, "abc", 'stop at NUL, please'), true); + + const char16Array = ctypes.char16_t.array(10)("千\0"); + const shortU16cs = char16Array.addressOfElement(0).readTypedArray(); + assertEq(shortU16cs instanceof Uint16Array, true); + assertEq(shortU16cs.length, 1); + assertEq(typedArrayMatchesString(shortU16cs, "千", 'ignore zero-padding, please'), true); + + // Other types should just fail if the length is not known. + + assertTypeErrorMessage(() => { ctypes.int32_t.array(3)().addressOfElement(0).readTypedArray(); }, + /base type .* is not an 8-bit or 16-bit integer or character type/); + assertTypeErrorMessage(() => { ctypes.float.array(3)().addressOfElement(0).readTypedArray(); }, + /base type .* is not an 8-bit or 16-bit integer or character type/); + assertTypeErrorMessage(() => { ctypes.double.array(3)().addressOfElement(0).readTypedArray(); }, + /base type .* is not an 8-bit or 16-bit integer or character type/); + // char16_t is unsigned, so this is not a string type. + assertTypeErrorMessage(() => { ctypes.int16_t.array(3)().addressOfElement(0).readTypedArray(); }, + /base type .* is not an 8-bit or 16-bit integer or character type/); + + // Wide string -> bytes -> UTF-8 encoded string in typed array + + const input2 = "千千千千千千千千千千千千千千千千千千千千千千千千千"; + const encoded = ctypes.char.array(input2.length * 3)(input2).readTypedArray(); + // Each 千 character is encoded as 3 bytes. + assertEq(encoded.length, input2.length * 3); + + // Wide string -> char16_t -> 16-bit encoded string in typed array + + const encoded16 = ctypes.char16_t.array(input2.length)(input2).readTypedArray(); + assertEq(encoded16.length, input2.length); + + // Floats + + const floats = ctypes.float.array(3)([10, 20, 30]).readTypedArray(); + assertEq(floats instanceof Float32Array, true); + assertEq(floats.toString(), "10,20,30"); + + const doubles = ctypes.double.array(3)([10, 20, 30]).readTypedArray(); + assertEq(doubles instanceof Float64Array, true); + assertEq(doubles.toString(), "10,20,30"); + + // Invalid + + assertTypeErrorMessage(() => { ctypes.int64_t.array(3)([10, 20, 30]).readTypedArray() }, + /base type ctypes.int64_t.array.*is not compatible with a typed array element type/); + +} + +if (typeof ctypes === "object") + test(); diff --git a/js/src/jit-test/tests/dataview/create-out-of-bounds-ccw.js b/js/src/jit-test/tests/dataview/create-out-of-bounds-ccw.js new file mode 100644 index 0000000000..11ca180064 --- /dev/null +++ b/js/src/jit-test/tests/dataview/create-out-of-bounds-ccw.js @@ -0,0 +1,23 @@ +// |jit-test| --enable-arraybuffer-resizable; skip-if: !ArrayBuffer.prototype.resize + +// RangeError is from the correct global when resizable ArrayBuffer gets out-of-bounds. + +let g = newGlobal(); + +let rab = new g.ArrayBuffer(10, {maxByteLength: 10}); + +let newTarget = Object.defineProperty(function(){}.bind(), "prototype", { + get() { + rab.resize(0); + return DataView.prototype; + } +}); + +let err; +try { + Reflect.construct(DataView, [rab, 10], newTarget); +} catch (e) { + err = e; +} + +assertEq(err instanceof RangeError, true); diff --git a/js/src/jit-test/tests/dataview/nan-canonicalization.js b/js/src/jit-test/tests/dataview/nan-canonicalization.js new file mode 100644 index 0000000000..3e5d724cae --- /dev/null +++ b/js/src/jit-test/tests/dataview/nan-canonicalization.js @@ -0,0 +1,168 @@ +// Test NaN canonicalisation when reading from a DataView. + +load(libdir + "dataview.js"); + +// Float32 +function testF32() { + function writeBE(ui32, value) { + let ui8 = new Uint8Array(ui32.buffer); + + ui8[0] = (value >> 24) & 0xff; + ui8[1] = (value >> 16) & 0xff; + ui8[2] = (value >> 8) & 0xff; + ui8[3] = (value >> 0) & 0xff; + } + + function writeLE(ui32, value) { + let ui8 = new Uint8Array(ui32.buffer); + + ui8[0] = (value >> 0) & 0xff; + ui8[1] = (value >> 8) & 0xff; + ui8[2] = (value >> 16) & 0xff; + ui8[3] = (value >> 24) & 0xff; + } + + // Smallest and largest SNaNs and QNaNs, with and without sign-bit set. + const NaNs = [ + 0x7F80_0001, 0x7FBF_FFFF, 0x7FC0_0000, 0x7FFF_FFFF, + 0xFF80_0001, 0xFFBF_FFFF, 0xFFC0_0000, 0xFFFF_FFFF, + ]; + + const canonicalNaN = new Uint32Array(new Float32Array([NaN]).buffer)[0]; + + // Load from array so that Ion doesn't treat as constants. + const True = [true, 1]; + const False = [false, 0]; + + function f() { + let src_ui32 = new Uint32Array(1); + + let dst_f32 = new Float32Array(1); + let dst_ui32 = new Uint32Array(dst_f32.buffer); + + let dv = new DataView(src_ui32.buffer); + + for (let i = 0; i < 100; ++i) { + let nan = NaNs[i % NaNs.length]; + + // Write to typed array, implicitly using native endian. + src_ui32[0] = nan; + dst_f32[0] = dv.getFloat32(0, nativeIsLittleEndian); + assertEq(dst_ui32[0], canonicalNaN); + + // Write and read using big endian. |isLittleEndian| parameter is absent. + writeBE(src_ui32, nan); + dst_f32[0] = dv.getFloat32(0); + assertEq(dst_ui32[0], canonicalNaN); + + // Write and read using big endian. |isLittleEndian| parameter is a constant. + writeBE(src_ui32, nan); + dst_f32[0] = dv.getFloat32(0, false); + assertEq(dst_ui32[0], canonicalNaN); + + // Write and read using little endian. |isLittleEndian| parameter is a constant. + writeLE(src_ui32, nan); + dst_f32[0] = dv.getFloat32(0, true); + assertEq(dst_ui32[0], canonicalNaN); + + // Write and read using big endian. + writeBE(src_ui32, nan); + dst_f32[0] = dv.getFloat32(0, False[i & 1]); + assertEq(dst_ui32[0], canonicalNaN); + + // Write and read using little endian. + writeLE(src_ui32, nan); + dst_f32[0] = dv.getFloat32(0, True[i & 1]); + assertEq(dst_ui32[0], canonicalNaN); + } + } + + for (let i = 0; i < 2; ++i) f(); +} +testF32(); + +// Float64 +function testF64() { + function writeBE(ui64, value) { + let ui8 = new Uint8Array(ui64.buffer); + + ui8[0] = Number((value >> 56n) & 0xffn); + ui8[1] = Number((value >> 48n) & 0xffn); + ui8[2] = Number((value >> 40n) & 0xffn); + ui8[3] = Number((value >> 32n) & 0xffn); + ui8[4] = Number((value >> 24n) & 0xffn); + ui8[5] = Number((value >> 16n) & 0xffn); + ui8[6] = Number((value >> 8n) & 0xffn); + ui8[7] = Number((value >> 0n) & 0xffn); + } + + function writeLE(ui64, value) { + let ui8 = new Uint8Array(ui64.buffer); + + ui8[0] = Number((value >> 0n) & 0xffn); + ui8[1] = Number((value >> 8n) & 0xffn); + ui8[2] = Number((value >> 16n) & 0xffn); + ui8[3] = Number((value >> 24n) & 0xffn); + ui8[4] = Number((value >> 32n) & 0xffn); + ui8[5] = Number((value >> 40n) & 0xffn); + ui8[6] = Number((value >> 48n) & 0xffn); + ui8[7] = Number((value >> 56n) & 0xffn); + } + + // Smallest and largest SNaNs and QNaNs, with and without sign-bit set. + const NaNs = [ + 0x7FF0_0000_0000_0001n, 0x7FF7_FFFF_FFFF_FFFFn, 0x7FF8_0000_0000_0000n, 0x7FFF_FFFF_FFFF_FFFFn, + 0xFFF0_0000_0000_0001n, 0xFFF7_FFFF_FFFF_FFFFn, 0xFFF8_0000_0000_0000n, 0xFFFF_FFFF_FFFF_FFFFn, + ]; + + const canonicalNaN = new BigUint64Array(new Float64Array([NaN]).buffer)[0]; + + // Load from array so that Ion doesn't treat as constants. + const True = [true, 1]; + const False = [false, 0]; + + function f() { + let src_ui64 = new BigUint64Array(1); + + let dst_f64 = new Float64Array(1); + let dst_ui64 = new BigUint64Array(dst_f64.buffer); + + let dv = new DataView(src_ui64.buffer); + + for (let i = 0; i < 100; ++i) { + let nan = NaNs[i % NaNs.length]; + + src_ui64[0] = nan; + dst_f64[0] = dv.getFloat64(0, nativeIsLittleEndian); + assertEq(dst_ui64[0], canonicalNaN); + + // Write and read using big endian. |isLittleEndian| parameter is absent. + writeBE(src_ui64, nan); + dst_f64[0] = dv.getFloat64(0); + assertEq(dst_ui64[0], canonicalNaN); + + // Write and read using big endian. |isLittleEndian| parameter is a constant. + writeBE(src_ui64, nan); + dst_f64[0] = dv.getFloat64(0, false); + assertEq(dst_ui64[0], canonicalNaN); + + // Write and read using little endian. |isLittleEndian| parameter is a constant. + writeLE(src_ui64, nan); + dst_f64[0] = dv.getFloat64(0, true); + assertEq(dst_ui64[0], canonicalNaN); + + // Write and read using big endian. + writeBE(src_ui64, nan); + dst_f64[0] = dv.getFloat64(0, False[i & 1]); + assertEq(dst_ui64[0], canonicalNaN); + + // Write and read using little endian. + writeLE(src_ui64, nan); + dst_f64[0] = dv.getFloat64(0, True[i & 1]); + assertEq(dst_ui64[0], canonicalNaN); + } + } + + for (let i = 0; i < 2; ++i) f(); +} +testF64(); diff --git a/js/src/jit-test/tests/dataview/out-of-bounds-access.js b/js/src/jit-test/tests/dataview/out-of-bounds-access.js new file mode 100644 index 0000000000..53451228d0 --- /dev/null +++ b/js/src/jit-test/tests/dataview/out-of-bounds-access.js @@ -0,0 +1,61 @@ +// Out-of-bounds accesses are detected when inlining DataView. + +function testRead() { + const xs = [0x11_22_33_44, 0x55_66_77_88]; + + let dv = new DataView(new ArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2)); + dv.setInt32(0 * Int32Array.BYTES_PER_ELEMENT, xs[0], true); + dv.setInt32(1 * Int32Array.BYTES_PER_ELEMENT, xs[1], true); + + function f(dv, q) { + for (let i = 0; i <= 1000; ++i) { + // Perform an out-of-bounds read in the last iteration. + let k = (i & 1) * Int32Array.BYTES_PER_ELEMENT + (i === 1000 && q == 2 ? 7 : 0); + + let v = dv.getInt32(k, true); + assertEq(v, xs[i & 1]); + } + } + + try { + for (var i = 0; i <= 2; ++i) { + f(dv, i); + } + } catch (e) { + assertEq(e instanceof RangeError, true, e.message); + assertEq(i, 2); + } +} +testRead(); + +function testWrite() { + const xs = [0x11_22_33_44, 0x55_66_77_88]; + + let dv = new DataView(new ArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2)); + let ui8 = new Uint8Array(dv.buffer); + + function f(dv, q) { + for (let i = 0; i <= 1000; ++i) { + // Perform an out-of-bounds read in the last iteration. + let k = (i & 1) * Int32Array.BYTES_PER_ELEMENT + (i === 1000 && q == 2 ? 7 : 0); + let x = xs[i & 1]; + + dv.setInt32(k, x); + + assertEq(ui8[0 + (i & 1) * Int32Array.BYTES_PER_ELEMENT], (x >> 24) & 0xff); + assertEq(ui8[1 + (i & 1) * Int32Array.BYTES_PER_ELEMENT], (x >> 16) & 0xff); + assertEq(ui8[2 + (i & 1) * Int32Array.BYTES_PER_ELEMENT], (x >> 8) & 0xff); + assertEq(ui8[3 + (i & 1) * Int32Array.BYTES_PER_ELEMENT], (x >> 0) & 0xff); + } + } + + try { + for (var i = 0; i <= 2; ++i) { + f(dv, i); + } + } catch (e) { + assertEq(e instanceof RangeError, true, e.message); + assertEq(i, 2); + } +} +testWrite(); diff --git a/js/src/jit-test/tests/dataview/read-aligned.js b/js/src/jit-test/tests/dataview/read-aligned.js new file mode 100644 index 0000000000..005cc76dbe --- /dev/null +++ b/js/src/jit-test/tests/dataview/read-aligned.js @@ -0,0 +1,52 @@ +// Test aligned read access. + +load(libdir + "dataview.js"); + +// Create a new test function for each scalar type. +function createRead(data) { + const name = typeName(data.type); + const offset = 0; + + return Function("data", ` + const {values, littleEndian, bigEndian} = data; + + // Load from array so that Ion doesn't treat as constants. + const True = [true, 1]; + const False = [false, 0]; + + const ab = new ArrayBuffer(${data.values.length * data.type.BYTES_PER_ELEMENT + offset}); + const dv = new DataView(ab); + + new ${data.type.name}(ab, 0, ${data.values.length}).set(values); + + new Uint8Array(ab).copyWithin(${offset}, 0); + + for (let i = 0; i < 100; ++i) { + let j = i % values.length; + let index = j * ${data.type.BYTES_PER_ELEMENT} + ${offset}; + + let v1 = dv.get${name}(index); + assertEq(v1, bigEndian[j]); + + let v2 = dv.get${name}(index, true); + assertEq(v2, littleEndian[j]); + + let v3 = dv.get${name}(index, false); + assertEq(v3, bigEndian[j]); + + let v4 = dv.get${name}(index, True[i & 1]); + assertEq(v4, littleEndian[j]); + + let v5 = dv.get${name}(index, False[i & 1]); + assertEq(v5, bigEndian[j]); + } + `); +} + +for (let data of createTestData()) { + let f = createRead(data); + + for (let i = 0; i < 2; ++i) { + f(data); + } +} diff --git a/js/src/jit-test/tests/dataview/read-unaligned.js b/js/src/jit-test/tests/dataview/read-unaligned.js new file mode 100644 index 0000000000..2e653ba8c4 --- /dev/null +++ b/js/src/jit-test/tests/dataview/read-unaligned.js @@ -0,0 +1,52 @@ +// Test unaligned read access. + +load(libdir + "dataview.js"); + +// Create a new test function for each scalar type. +function createRead(data) { + const name = typeName(data.type); + const offset = 1; + + return Function("data", ` + const {values, littleEndian, bigEndian} = data; + + // Load from array so that Ion doesn't treat as constants. + const True = [true, 1]; + const False = [false, 0]; + + const ab = new ArrayBuffer(${data.values.length * data.type.BYTES_PER_ELEMENT + offset}); + const dv = new DataView(ab); + + new ${data.type.name}(ab, 0, ${data.values.length}).set(values); + + new Uint8Array(ab).copyWithin(${offset}, 0); + + for (let i = 0; i < 100; ++i) { + let j = i % values.length; + let index = j * ${data.type.BYTES_PER_ELEMENT} + ${offset}; + + let v1 = dv.get${name}(index); + assertEq(v1, bigEndian[j]); + + let v2 = dv.get${name}(index, true); + assertEq(v2, littleEndian[j]); + + let v3 = dv.get${name}(index, false); + assertEq(v3, bigEndian[j]); + + let v4 = dv.get${name}(index, True[i & 1]); + assertEq(v4, littleEndian[j]); + + let v5 = dv.get${name}(index, False[i & 1]); + assertEq(v5, bigEndian[j]); + } + `); +} + +for (let data of createTestData()) { + let f = createRead(data); + + for (let i = 0; i < 2; ++i) { + f(data); + } +} diff --git a/js/src/jit-test/tests/dataview/throws-on-detached.js b/js/src/jit-test/tests/dataview/throws-on-detached.js new file mode 100644 index 0000000000..fb06a3c34c --- /dev/null +++ b/js/src/jit-test/tests/dataview/throws-on-detached.js @@ -0,0 +1,43 @@ +// TypeError is thrown when the underlying ArrayBuffer is detached. + +function testByteOffset() { + var ab = new ArrayBuffer(10); + var dv = new DataView(ab, 4, 0); + + var q = 0; + var error; + try { + for (var i = 0; i <= 200; ++i) { + if (i === 200) { + detachArrayBuffer(ab); + } + q += dv.byteOffset; + } + } catch (e) { + error = e; + } + assertEq(q, 4 * 200); + assertEq(error instanceof TypeError, true); +} +testByteOffset(); + +function testByteLength() { + var ab = new ArrayBuffer(10); + var dv = new DataView(ab, 4, 6); + + var q = 0; + var error; + try { + for (var i = 0; i <= 200; ++i) { + if (i === 200) { + detachArrayBuffer(ab); + } + q += dv.byteLength; + } + } catch (e) { + error = e; + } + assertEq(q, 6 * 200); + assertEq(error instanceof TypeError, true); +} +testByteLength(); diff --git a/js/src/jit-test/tests/dataview/write-aligned.js b/js/src/jit-test/tests/dataview/write-aligned.js new file mode 100644 index 0000000000..f7d014780f --- /dev/null +++ b/js/src/jit-test/tests/dataview/write-aligned.js @@ -0,0 +1,70 @@ +// Test aligned write access. + +load(libdir + "dataview.js"); + +// Create a new test function for each scalar type. +function createWrite(data) { + const name = typeName(data.type); + const offset = 0; + + return Function("data", ` + const {values, littleEndian, bigEndian} = data; + + // Load from array so that Ion doesn't treat as constants. + const True = [true, 1]; + const False = [false, 0]; + + const src = new ${data.type.name}(values); + + const ab = new ArrayBuffer(${data.type.BYTES_PER_ELEMENT + offset}); + const dv = new DataView(ab); + + const srcUint8 = new Uint8Array(src.buffer); + const dstUint8 = new Uint8Array(ab); + + function assertSameContents(idx, msg) { + for (let i = 0; i < ${data.type.BYTES_PER_ELEMENT}; ++i) { + assertEq(dstUint8[i + ${offset}], srcUint8[i + idx * ${data.type.BYTES_PER_ELEMENT}]); + } + } + + for (let i = 0; i < 100; ++i) { + let j = i % values.length; + + // Skip over NaNs to avoid false-negatives due to NaN canonicalisation. + if (${name === "Float32" || name === "Float64"}) { + if (Number.isNaN(bigEndian[j]) || Number.isNaN(littleEndian[j])) { + continue; + } + } + + dstUint8.fill(0); + dv.set${name}(${offset}, bigEndian[j]); + assertSameContents(j, "default"); + + dstUint8.fill(0); + dv.set${name}(${offset}, littleEndian[j], true); + assertSameContents(j, "little"); + + dstUint8.fill(0); + dv.set${name}(${offset}, bigEndian[j], false); + assertSameContents(j, "big"); + + dstUint8.fill(0); + dv.set${name}(${offset}, littleEndian[j], True[i & 1]); + assertSameContents(j, "little, dynamic"); + + dstUint8.fill(0); + dv.set${name}(${offset}, bigEndian[j], False[i & 1]); + assertSameContents(j, "big, dynamic"); + } + `); +} + +for (let data of createTestData()) { + let f = createWrite(data); + + for (let i = 0; i < 2; ++i) { + f(data); + } +} diff --git a/js/src/jit-test/tests/dataview/write-unaligned.js b/js/src/jit-test/tests/dataview/write-unaligned.js new file mode 100644 index 0000000000..e8d0b262f4 --- /dev/null +++ b/js/src/jit-test/tests/dataview/write-unaligned.js @@ -0,0 +1,70 @@ +// Test unaligned write access. + +load(libdir + "dataview.js"); + +// Create a new test function for each scalar type. +function createWrite(data) { + const name = typeName(data.type); + const offset = 1; + + return Function("data", ` + const {values, littleEndian, bigEndian} = data; + + // Load from array so that Ion doesn't treat as constants. + const True = [true, 1]; + const False = [false, 0]; + + const src = new ${data.type.name}(values); + + const ab = new ArrayBuffer(${data.type.BYTES_PER_ELEMENT + offset}); + const dv = new DataView(ab); + + const srcUint8 = new Uint8Array(src.buffer); + const dstUint8 = new Uint8Array(ab); + + function assertSameContents(idx, msg) { + for (let i = 0; i < ${data.type.BYTES_PER_ELEMENT}; ++i) { + assertEq(dstUint8[i + ${offset}], srcUint8[i + idx * ${data.type.BYTES_PER_ELEMENT}]); + } + } + + for (let i = 0; i < 100; ++i) { + let j = i % values.length; + + // Skip over NaNs to avoid false-negatives due to NaN canonicalisation. + if (${name === "Float32" || name === "Float64"}) { + if (Number.isNaN(bigEndian[j]) || Number.isNaN(littleEndian[j])) { + continue; + } + } + + dstUint8.fill(0); + dv.set${name}(${offset}, bigEndian[j]); + assertSameContents(j, "default"); + + dstUint8.fill(0); + dv.set${name}(${offset}, littleEndian[j], true); + assertSameContents(j, "little"); + + dstUint8.fill(0); + dv.set${name}(${offset}, bigEndian[j], false); + assertSameContents(j, "big"); + + dstUint8.fill(0); + dv.set${name}(${offset}, littleEndian[j], True[i & 1]); + assertSameContents(j, "little, dynamic"); + + dstUint8.fill(0); + dv.set${name}(${offset}, bigEndian[j], False[i & 1]); + assertSameContents(j, "big, dynamic"); + } + `); +} + +for (let data of createTestData()) { + let f = createWrite(data); + + for (let i = 0; i < 2; ++i) { + f(data); + } +} diff --git a/js/src/jit-test/tests/debug/DebuggeeWouldRun-01.js b/js/src/jit-test/tests/debug/DebuggeeWouldRun-01.js new file mode 100644 index 0000000000..315e3dcf4f --- /dev/null +++ b/js/src/jit-test/tests/debug/DebuggeeWouldRun-01.js @@ -0,0 +1,7 @@ +// Bug 1250190: Shouldn't crash. |jit-test| exitstatus: 3 + +g = newGlobal(); +var dbg = Debugger(g) +dbg.onNewPromise = () => g.makeFakePromise(); +g.makeFakePromise(); + diff --git a/js/src/jit-test/tests/debug/DebuggeeWouldRun-02.js b/js/src/jit-test/tests/debug/DebuggeeWouldRun-02.js new file mode 100644 index 0000000000..290effcb98 --- /dev/null +++ b/js/src/jit-test/tests/debug/DebuggeeWouldRun-02.js @@ -0,0 +1,7 @@ +// Bug 1250190: Shouldn't crash. |jit-test| exitstatus: 3 + +var g = newGlobal(); +var dbg = Debugger(g) +dbg.onNewGlobalObject = () => g.newGlobal(); +g.newGlobal(); +print("yo"); diff --git a/js/src/jit-test/tests/debug/DebuggeeWouldRun-03.js b/js/src/jit-test/tests/debug/DebuggeeWouldRun-03.js new file mode 100644 index 0000000000..e6c522c485 --- /dev/null +++ b/js/src/jit-test/tests/debug/DebuggeeWouldRun-03.js @@ -0,0 +1,9 @@ +// Bug 1250190: Shouldn't crash. |jit-test| error: yadda + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onNewGlobalObject = function () { + dbg.onNewGlobalObject = function () { throw "yadda"; }; + newGlobal({newCompartment: true}); +} +newGlobal({newCompartment: true}); diff --git a/js/src/jit-test/tests/debug/DebuggeeWouldRun-04.js b/js/src/jit-test/tests/debug/DebuggeeWouldRun-04.js new file mode 100644 index 0000000000..684f3f8e7e --- /dev/null +++ b/js/src/jit-test/tests/debug/DebuggeeWouldRun-04.js @@ -0,0 +1,9 @@ +// Bug 1250190: Shouldn't crash. |jit-test| error: yadda + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onNewScript = function () { + dbg.onNewScript = function () { throw "yadda"; }; + g.Function("noodles;"); +} +g.Function("poodles;"); diff --git a/js/src/jit-test/tests/debug/Debugger-add-Debugger-prototype.js b/js/src/jit-test/tests/debug/Debugger-add-Debugger-prototype.js new file mode 100644 index 0000000000..4af5eee474 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-add-Debugger-prototype.js @@ -0,0 +1,6 @@ +load(libdir + "asserts.js"); + +assertThrowsInstanceOf(function () { + var dbg = new Debugger(); + dbg.addDebuggee(Debugger.Object.prototype); +}, TypeError); diff --git a/js/src/jit-test/tests/debug/Debugger-adoptDebuggeeValue.js b/js/src/jit-test/tests/debug/Debugger-adoptDebuggeeValue.js new file mode 100644 index 0000000000..4d10062acb --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-adoptDebuggeeValue.js @@ -0,0 +1,39 @@ +// simplest possible test of Debugger.adoptDebuggeeValue + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); + +var dbg1 = new Debugger(); +var gDO1 = dbg1.addDebuggee(g); +var obj1 = gDO1.executeInGlobal("({})").return; + +var dbg2 = Debugger(g); +var gDO2 = dbg2.addDebuggee(g); +var obj2 = gDO2.executeInGlobal("({})").return; + +assertThrowsInstanceOf(function () { + obj1.defineProperty("foo", { + configurable: true, + enumerable: true, + value: obj2, + writable: true + }); +}, Error); + +let obj3 = dbg1.adoptDebuggeeValue(obj2); + +obj1.defineProperty("foo", { + configurable: true, + enumerable: true, + value: obj3, + writable: true +}); + +assertThrowsInstanceOf(function () { + dbg1.adoptDebuggeeValue({}); +}, TypeError); + +assertThrowsInstanceOf(function () { + dbg1.adoptDebuggeeValue(Debugger.Object.prototype); +}, TypeError); diff --git a/js/src/jit-test/tests/debug/Debugger-adoptFrame.js b/js/src/jit-test/tests/debug/Debugger-adoptFrame.js new file mode 100644 index 0000000000..f5a911fe6c --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-adoptFrame.js @@ -0,0 +1,81 @@ +// validate the common behavior of of Debugger.adoptFrame + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); + +const dbg1 = new Debugger(); +const gDO1 = dbg1.addDebuggee(g); + +let suspendedFrame; +dbg1.onDebuggerStatement = function() { + // Test working with an onStack frame. + const frame1 = dbg1.getNewestFrame(); + + const dbg = new Debugger(); + assertErrorMessage( + () => dbg.adoptFrame(frame1), + Error, + "Debugger.Frame's global is not a debuggee" + ); + + dbg.addDebuggee(g); + + const frame2 = dbg.adoptFrame(frame1); + + assertMatchingFrame(frame1, frame2); + + suspendedFrame = frame1; +}; +const generator = g.eval(` +function* fn() { + debugger; + yield; +} +fn(); +`); +generator.next(); + +(function() { + // Test working with a suspended generator frame. + const dbg = new Debugger(); + assertErrorMessage( + () => dbg.adoptFrame(suspendedFrame), + Error, + "Debugger.Frame's global is not a debuggee" + ); + + dbg.addDebuggee(g); + + const frame2 = dbg.adoptFrame(suspendedFrame); + + assertMatchingFrame(frame2, suspendedFrame); +})(); + +generator.next(); +const deadFrame = suspendedFrame; + +(function() { + // Test working with a dead frame. + const dbg = new Debugger(); + + // This doesn't throw because the dead frame doesn't have any + // debuggee-specific data associated with it anymore. + dbg.adoptFrame(deadFrame); + + dbg.addDebuggee(g); + + const frame2 = dbg.adoptFrame(deadFrame); + + assertMatchingFrame(frame2, deadFrame); +})(); + +function assertMatchingFrame(frame1, frame2) { + assertEq(frame2.onStack, frame1.onStack); + assertEq(frame2.terminated, frame1.terminated); + + if (!frame2.terminated) { + assertEq(frame2.type, frame1.type); + assertEq(frame2.offset, frame1.offset); + } +} diff --git a/js/src/jit-test/tests/debug/Debugger-allowUnobservedAsmJS-01.js b/js/src/jit-test/tests/debug/Debugger-allowUnobservedAsmJS-01.js new file mode 100644 index 0000000000..51f9d033d5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-allowUnobservedAsmJS-01.js @@ -0,0 +1,26 @@ +load(libdir + "asm.js"); + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("dbg = new Debugger(parent);"); + +// Initial state is to inhibit asm.js. +assertEq(g.dbg.allowUnobservedAsmJS, false); + +var asmFunStr = USE_ASM + 'function f() {} return f'; + +// With asm.js inhibited, asm.js should fail with a type error about the +// debugger being on. +assertAsmTypeFail(asmFunStr); + +// With asm.js uninhibited, asm.js linking should work. +g.dbg.allowUnobservedAsmJS = true; +assertEq(asmLink(asmCompile(asmFunStr))(), undefined); + +// Toggling back should inhibit again. +g.dbg.allowUnobservedAsmJS = false; +assertAsmTypeFail(asmFunStr); + +// Removing the global should lift the inhibition. +g.dbg.removeDebuggee(this); +assertEq(asmLink(asmCompile(asmFunStr))(), undefined); diff --git a/js/src/jit-test/tests/debug/Debugger-allowUnobservedAsmJS-02.js b/js/src/jit-test/tests/debug/Debugger-allowUnobservedAsmJS-02.js new file mode 100644 index 0000000000..bcd59e5e7a --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-allowUnobservedAsmJS-02.js @@ -0,0 +1,26 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// Debugger.allowUnobservedAsmJS with off-thread parsing. + +load(libdir + "asm.js"); + + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("dbg = new Debugger(parent);"); + +assertEq(g.dbg.allowUnobservedAsmJS, false); + +enableLastWarning(); + +var asmFunStr = USE_ASM + 'function f() {} return f'; +offThreadCompileToStencil("(function() {" + asmFunStr + "})"); +var stencil = finishOffThreadStencil(); +evalStencil(stencil); + +var msg = getLastWarning().message; +assertEq(msg === "asm.js type error: Asm.js optimizer disabled by debugger" || + msg === "asm.js type error: Asm.js optimizer disabled because no suitable wasm compiler is available" || + msg === "asm.js type error: Asm.js optimizer disabled by 'asmjs' runtime option" || + msg === "asm.js type error: Asm.js optimizer disabled because the compiler is disabled or unavailable", + true); diff --git a/js/src/jit-test/tests/debug/Debugger-clearAllBreakpoints-01.js b/js/src/jit-test/tests/debug/Debugger-clearAllBreakpoints-01.js new file mode 100644 index 0000000000..ea5489a699 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-clearAllBreakpoints-01.js @@ -0,0 +1,29 @@ +// clearAllBreakpoints clears breakpoints for the current Debugger object only. + +var g = newGlobal({newCompartment: true}); + +var hits = 0; +function attach(i) { + var dbg = Debugger(g); + var handler = { + hit: function (frame) { + hits++; + dbg.clearAllBreakpoints(); + } + }; + + dbg.onDebuggerStatement = function (frame) { + var s = frame.script; + var offs = s.getLineOffsets(g.line0 + 3); + for (var i = 0; i < offs.length; i++) + s.setBreakpoint(offs[i], handler); + }; +} +for (var i = 0; i < 4; i++) + attach(i); + +g.eval("var line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "for (var i = 0; i < 7; i++)\n" + // line0 + 2 + " Math.sin(0);\n"); // line0 + 3 +assertEq(hits, 4); diff --git a/js/src/jit-test/tests/debug/Debugger-clearAllBreakpoints-02.js b/js/src/jit-test/tests/debug/Debugger-clearAllBreakpoints-02.js new file mode 100644 index 0000000000..2040329425 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-clearAllBreakpoints-02.js @@ -0,0 +1,31 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() +// clearAllBreakpoints should clear breakpoints for WASM scripts. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval(` + var wasm = wasmTextToBinary( + '(module (func (nop) (nop)) (export "test" (func 0)))'); + var m = new WebAssembly.Instance(new WebAssembly.Module(wasm)); +`); +var wasmScript = dbg.findScripts().filter(s => s.format == 'wasm')[0]; +var offsets = wasmScript.getPossibleBreakpointOffsets(); + +let count = 0; +wasmScript.setBreakpoint(offsets[0], { + hit: () => { + count++; + }, +}); + +g.m.exports.test(); +assertEq(count, 1); + +g.m.exports.test(); +assertEq(count, 2); + +dbg.clearAllBreakpoints(); + +g.m.exports.test(); +assertEq(count, 2); diff --git a/js/src/jit-test/tests/debug/Debugger-ctor-01.js b/js/src/jit-test/tests/debug/Debugger-ctor-01.js new file mode 100644 index 0000000000..72a5409bb0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-ctor-01.js @@ -0,0 +1,21 @@ +load(libdir + 'asserts.js'); + +// Debugger rejects arguments that aren't cross-compartment wrappers. +assertThrowsInstanceOf(function () { Debugger(null); }, TypeError); +assertThrowsInstanceOf(function () { Debugger(true); }, TypeError); +assertThrowsInstanceOf(function () { Debugger(42); }, TypeError); +assertThrowsInstanceOf(function () { Debugger("bad"); }, TypeError); +assertThrowsInstanceOf(function () { Debugger(function () {}); }, TypeError); +assertThrowsInstanceOf(function () { Debugger(this); }, TypeError); +assertThrowsInstanceOf(function () { new Debugger(null); }, TypeError); +assertThrowsInstanceOf(function () { new Debugger(true); }, TypeError); +assertThrowsInstanceOf(function () { new Debugger(42); }, TypeError); +assertThrowsInstanceOf(function () { new Debugger("bad"); }, TypeError); +assertThrowsInstanceOf(function () { new Debugger(function () {}); }, TypeError); +assertThrowsInstanceOf(function () { new Debugger(this); }, TypeError); + +// From the main compartment, creating a Debugger on a sandbox compartment. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +assertEq(dbg instanceof Debugger, true); +assertEq(Object.getPrototypeOf(dbg), Debugger.prototype); diff --git a/js/src/jit-test/tests/debug/Debugger-ctor-02.js b/js/src/jit-test/tests/debug/Debugger-ctor-02.js new file mode 100644 index 0000000000..f1e4afdba9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-ctor-02.js @@ -0,0 +1,13 @@ +// Test creating a Debugger in a sandbox, debugging the initial global. + +load(libdir + 'asserts.js'); + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.eval("var dbg = new Debugger(debuggeeGlobal);"); +assertEq(g.eval("dbg instanceof Debugger"), true); + +// The Debugger constructor from this compartment will not accept as its argument +// an Object from this compartment. Shenanigans won't fool the membrane. +g.parent = this; +assertThrowsInstanceOf(function () { g.eval("parent.Debugger(parent.Object())"); }, TypeError); diff --git a/js/src/jit-test/tests/debug/Debugger-ctor-03.js b/js/src/jit-test/tests/debug/Debugger-ctor-03.js new file mode 100644 index 0000000000..f2245e7c9a --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-ctor-03.js @@ -0,0 +1,19 @@ +// If the debuggee cannot be put into debug mode, throw. + +// Run this test only if this compartment can't be put into debug mode. +var canEnable = true; +if (typeof setDebugMode === 'function') { + try { + setDebugMode(true); + } catch (exc) { + canEnable = false; + } +} + +if (!canEnable) { + var g = newGlobal(); + g.libdir = libdir; + g.eval("load(libdir + 'asserts.js');"); + g.parent = this; + g.eval("assertThrowsInstanceOf(function () { new Debugger(parent); }, Error);"); +} diff --git a/js/src/jit-test/tests/debug/Debugger-ctor-04.js b/js/src/jit-test/tests/debug/Debugger-ctor-04.js new file mode 100644 index 0000000000..4ecc619bd4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-ctor-04.js @@ -0,0 +1,5 @@ +// Repeated Debugger() arguments are ignored. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g, g, g); +assertEq(dbg.getDebuggees().length, 1); diff --git a/js/src/jit-test/tests/debug/Debugger-ctor-05.js b/js/src/jit-test/tests/debug/Debugger-ctor-05.js new file mode 100644 index 0000000000..3b5e3127c7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-ctor-05.js @@ -0,0 +1,8 @@ +// Redundant non-global Debugger() arguments are ignored. + +var g = newGlobal({newCompartment: true}); +g.eval("var a = {}, b = {};"); +var dbg = Debugger(g.a, g.b); +var arr = dbg.getDebuggees(); +assertEq(arr.length, 1); +assertEq(arr[0], dbg.addDebuggee(g)); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-01.js b/js/src/jit-test/tests/debug/Debugger-debuggees-01.js new file mode 100644 index 0000000000..b8a22c029c --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-01.js @@ -0,0 +1,5 @@ +// A Debugger object created with no argument initially has no debuggees. +var dbg = new Debugger; +var debuggees = dbg.getDebuggees(); +assertEq(Array.isArray(debuggees), true); +assertEq(debuggees.length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-02.js b/js/src/jit-test/tests/debug/Debugger-debuggees-02.js new file mode 100644 index 0000000000..cc220edba3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-02.js @@ -0,0 +1,10 @@ +// The array returned by getDebuggees is just a snapshot, not live. +var dbg = new Debugger; +var a1 = dbg.getDebuggees(); +var g = newGlobal({newCompartment: true}); +var gw = dbg.addDebuggee(g); +assertEq(gw instanceof Debugger.Object, true); +var a2 = dbg.getDebuggees(); +assertEq(a2.length, 1); +assertEq(a2[0], gw); +assertEq(a1.length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-03.js b/js/src/jit-test/tests/debug/Debugger-debuggees-03.js new file mode 100644 index 0000000000..a792eed138 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-03.js @@ -0,0 +1,34 @@ +// Debugger hooks fire based on debuggees. + +var g1 = newGlobal({newCompartment: true}); +g1.eval("var g2 = newGlobal('same-compartment')"); +var g2 = g1.g2; +g1.eval("function f() { debugger; g2.g(); }"); +g2.eval("function g() { debugger; }"); + +var log; +var dbg = new Debugger; +dbg.onDebuggerStatement = function (frame) { log += frame.callee.name; }; + +// No debuggees: onDebuggerStatement is not called. +log = ''; +g1.f(); +assertEq(log, ''); + +// Add a debuggee and check that the handler is called. +var g1w = dbg.addDebuggee(g1); +log = ''; +g1.f(); +assertEq(log, 'f'); + +// Two debuggees, two onDebuggerStatement calls. +dbg.addDebuggee(g2); +log = ''; +g1.f(); +assertEq(log, 'fg'); + +// After a debuggee is removed, it no longer calls hooks. +assertEq(dbg.removeDebuggee(g1w), undefined); +log = ''; +g1.f(); +assertEq(log, 'g'); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-04.js b/js/src/jit-test/tests/debug/Debugger-debuggees-04.js new file mode 100644 index 0000000000..9f4714f86e --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-04.js @@ -0,0 +1,26 @@ +// hasDebuggee tests. + +var g1 = newGlobal({newCompartment: true}), g1w; +g1.eval("var g2 = newGlobal('same-compartment')"); +var g2 = g1.g2; +var g1w, g2w; + +var dbg = new Debugger; +function checkHas(hasg1, hasg2) { + assertEq(dbg.hasDebuggee(g1), hasg1); + if (typeof g1w === 'object') + assertEq(dbg.hasDebuggee(g1w), hasg1); + assertEq(dbg.hasDebuggee(g2), hasg2); + if (typeof g2w === 'object') + assertEq(dbg.hasDebuggee(g2w), hasg2); +} + +checkHas(false, false); +g1w = dbg.addDebuggee(g1); +checkHas(true, false); +g2w = dbg.addDebuggee(g2); +checkHas(true, true); +dbg.removeDebuggee(g1w); +checkHas(false, true); +dbg.removeDebuggee(g2); +checkHas(false, false); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-05.js b/js/src/jit-test/tests/debug/Debugger-debuggees-05.js new file mode 100644 index 0000000000..14ed9337f3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-05.js @@ -0,0 +1,8 @@ +// addDebuggee returns different Debugger.Object wrappers for different Debugger objects. + +var g = newGlobal({newCompartment: true}); +var dbg1 = new Debugger; +var gw1 = dbg1.addDebuggee(g); +var dbg2 = new Debugger; +var gw2 = dbg2.addDebuggee(g); +assertEq(gw1 !== gw2, true); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-06.js b/js/src/jit-test/tests/debug/Debugger-debuggees-06.js new file mode 100644 index 0000000000..264f32c980 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-06.js @@ -0,0 +1,27 @@ +// {has,add,remove}Debuggee throw a TypeError if the argument is invalid. + +load(libdir + "asserts.js"); + +var dbg = new Debugger; + +function check(val) { + assertThrowsInstanceOf(function () { dbg.hasDebuggee(val); }, TypeError); + assertThrowsInstanceOf(function () { dbg.addDebuggee(val); }, TypeError); + assertThrowsInstanceOf(function () { dbg.removeDebuggee(val); }, TypeError); +} + +// Primitive values are invalid. +check(undefined); +check(null); +check(false); +check(1); +check(NaN); +check("ok"); +check(Symbol("ok")); + +// A Debugger.Object that belongs to a different Debugger object is invalid. +var g = newGlobal({newCompartment: true}); +var dbg2 = new Debugger; +var w = dbg2.addDebuggee(g); +assertEq(w instanceof Debugger.Object, true); +check(w); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-08.js b/js/src/jit-test/tests/debug/Debugger-debuggees-08.js new file mode 100644 index 0000000000..4793e49eaf --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-08.js @@ -0,0 +1,25 @@ +// Adding a debuggee more than once is redundant. + +var dbg = new Debugger; +var g = newGlobal({newCompartment: true}); +var w = dbg.addDebuggee(g); +assertEq(w instanceof Debugger.Object, true); + +function usual() { + assertEq(dbg.hasDebuggee(g), true); + assertEq(dbg.hasDebuggee(w), true); + var arr = dbg.getDebuggees(); + assertEq(arr.length, 1); + assertEq(arr[0], w); +} + +usual(); +assertEq(dbg.addDebuggee(g), w); +usual(); +assertEq(dbg.addDebuggee(w), w); +usual(); + +// Removing the debuggee once is enough. +assertEq(dbg.removeDebuggee(g), undefined); +assertEq(dbg.hasDebuggee(g), false); +assertEq(dbg.getDebuggees().length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-09.js b/js/src/jit-test/tests/debug/Debugger-debuggees-09.js new file mode 100644 index 0000000000..bb7fb046a7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-09.js @@ -0,0 +1,21 @@ +// If hasDebuggee(x) is false, removeDebuggee(x) does nothing. + +var dbg = new Debugger; + +function check(obj) { + // If obj is something we could never debug, hasDebuggee(obj) is false. + assertEq(dbg.hasDebuggee(obj), false); + + // If hasDebuggee(x) is false, removeDebuggee(x) does nothing. + assertEq(dbg.removeDebuggee(obj), undefined); +} + +// global objects which happen not to be debuggees at the moment +var g1 = newGlobal('same-compartment'); +check(g1); + +// objects in a compartment that is already debugging us +var g2 = newGlobal({newCompartment: true}); +g2.parent = this; +g2.eval("var dbg = new Debugger(parent);"); +check(g2); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-10.js b/js/src/jit-test/tests/debug/Debugger-debuggees-10.js new file mode 100644 index 0000000000..7e5c369bc0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-10.js @@ -0,0 +1,18 @@ +// Allow diamonds in the graph of the compartment "debugs" relation. +var program = newGlobal({newCompartment: true}); +var d1 = newGlobal({newCompartment: true}); +d1.top = this; +var d2 = newGlobal({newCompartment: true}); +d2.top = this; +var dbg = new Debugger(d1, d2); +d1.eval("var dbg = new Debugger(top.program)"); +d2.eval("var dbg = new Debugger(top.program)"); + +// mess with the edges a little bit -- all this should be fine, no cycles +d1.dbg.removeDebuggee(program); +d1.dbg.addDebuggee(program); +dbg.addDebuggee(program); +d1.dbg.addDebuggee(d2); +dbg.removeDebuggee(d2); +dbg.addDebuggee(d2); + diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-11.js b/js/src/jit-test/tests/debug/Debugger-debuggees-11.js new file mode 100644 index 0000000000..d1ca587e2b --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-11.js @@ -0,0 +1,22 @@ +// Don't allow cycles in the graph of the compartment "debugs" relation. + +load(libdir + "asserts.js"); + +// trivial cycles +var dbg = new Debugger; +assertThrowsInstanceOf(function () { dbg.addDebuggee(this); }, TypeError); +assertThrowsInstanceOf(function () { new Debugger(this); }, TypeError); + +// cycles of length 2 +var d1 = newGlobal({newCompartment: true}); +d1.top = this; +d1.eval("var dbg = new Debugger(top)"); +assertThrowsInstanceOf(function () { dbg.addDebuggee(d1); }, TypeError); +assertThrowsInstanceOf(function () { new Debugger(d1); }, TypeError); + +// cycles of length 3 +var d2 = newGlobal({newCompartment: true}); +d2.top = this; +d2.eval("var dbg = new Debugger(top.d1)"); +assertThrowsInstanceOf(function () { dbg.addDebuggee(d2); }, TypeError); +assertThrowsInstanceOf(function () { new Debugger(d2); }, TypeError); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-12.js b/js/src/jit-test/tests/debug/Debugger-debuggees-12.js new file mode 100644 index 0000000000..b77e9cff59 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-12.js @@ -0,0 +1,10 @@ +// Events in a non-debuggee are ignored, even if a debuggee is in the same compartment. +var g1 = newGlobal({newCompartment: true}); +var g2 = g1.eval("newGlobal('same-compartment')"); +var dbg = new Debugger(g1); +var hits = 0; +dbg.onDebuggerStatement = function () { hits++; }; +g1.eval("debugger;"); +assertEq(hits, 1); +g2.eval("debugger;"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-13.js b/js/src/jit-test/tests/debug/Debugger-debuggees-13.js new file mode 100644 index 0000000000..6030bda3cc --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-13.js @@ -0,0 +1,9 @@ +// Removing a debuggee does not detach the debugger from a compartment if another debuggee is in it. +var g1 = newGlobal({newCompartment: true}); +var g2 = g1.eval("newGlobal('same-compartment')"); +var dbg = new Debugger(g1, g2); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { hits++; }; +dbg.removeDebuggee(g1); +g2.eval("debugger;"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-14.js b/js/src/jit-test/tests/debug/Debugger-debuggees-14.js new file mode 100644 index 0000000000..491a116c09 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-14.js @@ -0,0 +1,8 @@ +// Adding a debuggee in a compartment that is already in debug mode works +// even if a script from that compartment is on the stack. + +var g = newGlobal({newCompartment: true}); +var dbg1 = Debugger(g); +var dbg2 = Debugger(); +g.parent = this; +g.eval("parent.dbg2.addDebuggee(this);"); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-15.js b/js/src/jit-test/tests/debug/Debugger-debuggees-15.js new file mode 100644 index 0000000000..d20972e1ce --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-15.js @@ -0,0 +1,7 @@ +// Debugger mode can be disabled for a compartment even if it has scripts running. +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +g.parent = this; +var n = 2; +g.eval("parent.dbg.removeDebuggee(this); parent.n += 2"); +assertEq(n, 4); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-16.js b/js/src/jit-test/tests/debug/Debugger-debuggees-16.js new file mode 100644 index 0000000000..eebe99ba96 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-16.js @@ -0,0 +1,30 @@ +// GC can turn off debug mode in a compartment. + +var dbgs = []; +var nonDebugGlobals = []; +var f = gc; +for (var i = 0; i < 4; i++) { + // Create two globals, one debuggee. + var g1 = newGlobal({newCompartment: true}); + var g2 = g1.eval("newGlobal('same-compartment')"); + var dbg = Debugger(g1); + dbg.onDebuggerStatement = function () {}; + + // Thread a chain of functions through the non-debuggee globals. + g2.eval("function f() { return g() + 1; }"); + g2.g = f; + f = g2.f; + + // Root the Debugger objects and non-debuggee globals. + dbgs[i] = dbg; + nonDebugGlobals[i] = g2; +} + +// Call the chain of functions. At the end of the chain is gc. This will +// collect (some or all of) the debuggee globals, leaving non-debuggee +// globals. It should disable debug mode in those debuggee compartments. +nonDebugGlobals[nonDebugGlobals.length - 1].f(); + +gc(); +nonDebugGlobals[0].g = function () { return 0; } +assertEq(nonDebugGlobals[nonDebugGlobals.length - 1].f(), nonDebugGlobals.length); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-17.js b/js/src/jit-test/tests/debug/Debugger-debuggees-17.js new file mode 100644 index 0000000000..bb1ec664e5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-17.js @@ -0,0 +1,26 @@ +// addDebuggee, hasDebuggee, and removeDebuggee all throw if presented with +// objects that are not valid global object designators. + +load(libdir + 'asserts.js'); + +var dbg = new Debugger; + +function check(bad) { + print("check(" + JSON.stringify(bad) + ")"); + assertThrowsInstanceOf(function () { dbg.addDebuggee(bad); }, TypeError); + assertEq(dbg.getDebuggees().length, 0); + assertThrowsInstanceOf(function () { dbg.hasDebuggee(bad); }, TypeError); + assertThrowsInstanceOf(function () { dbg.removeDebuggee(bad); }, TypeError); +} + +var g = newGlobal({newCompartment: true}); +check(g.Object()); +check(g.Object); +check(g.Function("")); + +// A Debugger.Object belonging to a different Debugger is not a valid way +// to designate a global, even if its referent is a global. +var g2 = newGlobal({newCompartment: true}); +var dbg2 = new Debugger; +var d2g2 = dbg2.addDebuggee(g2); +check(d2g2); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-18.js b/js/src/jit-test/tests/debug/Debugger-debuggees-18.js new file mode 100644 index 0000000000..a4aa94ed54 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-18.js @@ -0,0 +1,114 @@ +// Debugger.prototype.{addDebuggee,hasDebuggee,removeDebuggee} recognize globals +// regardless of how they are specified. + +var dbg = new Debugger; + +// Assert that dbg's debuggees are exactly the set passed as arguments. +// The arguments are assumed to be Debugger.Object instances referring to +// globals without wrappers --- which is the sort returned by addDebuggee. +function assertDebuggees(...expected) { + print("assertDebuggees([" + expected.map((g) => g.toSource()) + "])"); + var debuggees = dbg.getDebuggees(); + assertEq(expected.length, debuggees.length); + for (let g of expected) + assertEq(debuggees.indexOf(g) != -1, true); +} + +var g1 = newGlobal({newCompartment: true}); g1.toSource = function () { return "[global g1]"; }; +var g2 = newGlobal({newCompartment: true}); g2.toSource = function () { return "[global g2]"; }; + +assertDebuggees(); + +// Produce every possible way to designate g1, for us to play with. +// Globals can be designated by any of the following: +// +// - "CCW": a Cross-Compartment Wrapper (CCW) of a global object +// - "D.O": a Debugger.Object whose referent is a global object +// - "D.O of CCW": a Debugger.Object whose referent is a CCW of a +// global object, where the CCW can be securely unwrapped +// +// There's no direct "G", since globals are always in their own +// compartments, never the debugger's; if we ever viewed them directly, +// that would be a compartment violation. + +// "dg1" means "Debugger.Object referring (directly) to g1". +var dg1 = dbg.addDebuggee(g1); +dg1.toSource = function() { return "[Debugger.Object for global g1]"; }; +assertEq(dg1.unwrap(), dg1); +assertDebuggees(dg1); + +// We need to add g2 as a debuggee; that's the only way to get a D.O referring +// to it without a wrapper. +var dg2 = dbg.addDebuggee(g2); +dg2.toSource = function() { return "[Debugger.Object for global g2]"; }; +assertEq(dg2.unwrap(), dg2); +assertDebuggees(dg1, dg2); + +// "dwg1" means "Debugger.Object referring to CCW of g1". +var dwg1 = dg2.makeDebuggeeValue(g1); +assertEq(dwg1.unwrap(), dg1.makeDebuggeeValue(g1)); +dwg1.toSource = function() { return "[Debugger.Object for CCW of WindowProxy of g1]"; }; + +assertDebuggees(dg1, dg2); +assertEq(dbg.removeDebuggee(g1), undefined); +assertEq(dbg.removeDebuggee(g2), undefined); +assertDebuggees(); + +// Systematically cover all the single-global possibilities: +// +// | added as | designated as | addDebuggee | hasDebuggee | removeDebuggee | +// |-------------+---------------+-------------+-------------+----------------| +// | (not added) | CCW | X | X | X | +// | | D.O | X | X | X | +// | | D.O of CCW | X | X | X | +// |-------------+---------------+-------------+-------------+----------------| +// | CCW | CCW | X | X | X | +// | | D.O | X | X | X | +// | | D.O of CCW | X | X | X | +// |-------------+---------------+-------------+-------------+----------------| +// | D.O | CCW | X | X | X | +// | | D.O | X | X | X | +// | | D.O of CCW | X | X | X | +// |-------------+---------------+-------------+-------------+----------------| +// | D.O of CCW | CCW | X | X | X | +// | | D.O | X | X | X | +// | | D.O of CCW | X | X | X | + +// Cover the "(not added)" section of the table, other than "addDebuggee": +assertEq(dbg.hasDebuggee(g1), false); +assertEq(dbg.hasDebuggee(dg1), false); +assertEq(dbg.hasDebuggee(dwg1), false); + +assertEq(dbg.removeDebuggee(g1), undefined); assertDebuggees(); +assertEq(dbg.removeDebuggee(dg1), undefined); assertDebuggees(); +assertEq(dbg.removeDebuggee(dwg1), undefined); assertDebuggees(); + +// Try all operations adding the debuggee using |addAs|, and operating on it +// using |designateAs|, thereby covering one row of the table (outside the '(not +// added)' section), and one case in the '(not added)', 'designated as' section. +// +// |Direct| should be the Debugger.Object referring directly to the debuggee +// global, for checking the results from addDebuggee and getDebuggees. +function combo(addAs, designateAs, direct) { + print("combo(" + JSON.stringify(addAs) + ", " + JSON.stringify(designateAs) + ")"); + assertDebuggees(); + assertEq(dbg.addDebuggee(addAs), direct); + assertDebuggees(direct); + assertEq(dbg.addDebuggee(designateAs), direct); + assertDebuggees(direct); + assertEq(dbg.hasDebuggee(designateAs), true); + assertEq(dbg.removeDebuggee(designateAs), undefined); + assertDebuggees(); +} + +combo(g1, g1, dg1); +combo(dg1, g1, dg1); +combo(dwg1, g1, dg1); + +combo(g1, dg1, dg1); +combo(dg1, dg1, dg1); +combo(dwg1, dg1, dg1); + +combo(g1, dwg1, dg1); +combo(dg1, dwg1, dg1); +combo(dwg1, dwg1, dg1); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-19.js b/js/src/jit-test/tests/debug/Debugger-debuggees-19.js new file mode 100644 index 0000000000..7883a8a076 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-19.js @@ -0,0 +1,49 @@ +// removeAllDebuggees removes all the debuggees. + +var dbg = new Debugger; + +// If we eval in a debuggee, log which debuggee it was. +var log; +dbg.onEnterFrame = function (frame) { + log += 'e'; + // frame.environment in all evals below is the global lexical env. + log += frame.environment.parent.object.label; +}; + +var g1 = newGlobal({newCompartment: true}); +log = ''; +g1.eval('Math'); +assertEq(log, ''); // not yet a debuggee + +var g1w = dbg.addDebuggee(g1); +assertEq(g1w instanceof Debugger.Object, true); +g1w.label = 'g1'; +log = ''; +g1.eval('Math'); // now a debuggee +assertEq(log, 'eg1'); + +var g2 = newGlobal({newCompartment: true}); +log = ''; +g1.eval('Math'); // debuggee +g2.eval('Math'); // not a debuggee +assertEq(log, 'eg1'); + +var g2w = dbg.addDebuggee(g2); +assertEq(g2w instanceof Debugger.Object, true); +g2w.label = 'g2'; +log = ''; +g1.eval('Math'); // debuggee +g2.eval('this'); // debuggee +assertEq(log, 'eg1eg2'); + +var a1 = dbg.getDebuggees(); +assertEq(a1.length, 2); + +assertEq(dbg.removeAllDebuggees(), undefined); +var a2 = dbg.getDebuggees(); +assertEq(a2.length, 0); + +log = ''; +g1.eval('Math'); // no longer a debuggee +g2.eval('this'); // no longer a debuggee +assertEq(log, ''); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-20.js b/js/src/jit-test/tests/debug/Debugger-debuggees-20.js new file mode 100644 index 0000000000..8cc27d0fca --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-20.js @@ -0,0 +1,30 @@ +// addAllGlobalsAsDebuggees adds all the globals as debuggees. + +var g1 = newGlobal({newCompartment: true}); // Created before the Debugger; debuggee. +var g2 = newGlobal({newCompartment: true}); // Created before the Debugger; not debuggee. + +var dbg = new Debugger; + +var g3 = newGlobal({newCompartment: true}); // Created after the Debugger; debuggee. +var g4 = newGlobal({newCompartment: true}); // Created after the Debugger; not debuggee. + +var g1w = dbg.addDebuggee(g1); +var g3w = dbg.addDebuggee(g3); +assertEq(dbg.addAllGlobalsAsDebuggees(), undefined); + +// Get Debugger.Objects viewing the WindowProxies from their own compartments. +assertEq(g1w.makeDebuggeeValue(g1), g3w.makeDebuggeeValue(g1).unwrap()); +assertEq(g3w.makeDebuggeeValue(g3), g1w.makeDebuggeeValue(g3).unwrap()); + +var g2w = g1w.makeDebuggeeValue(g2).unwrap(); +var g4w = g1w.makeDebuggeeValue(g4).unwrap(); + +var thisw = g1w.makeDebuggeeValue(this).unwrap(); + +// Check that they're all there. +assertEq(dbg.hasDebuggee(g1w), true); +assertEq(dbg.hasDebuggee(g2w), true); +assertEq(dbg.hasDebuggee(g3w), true); +assertEq(dbg.hasDebuggee(g4w), true); +// The debugger's global is not a debuggee. +assertEq(dbg.hasDebuggee(thisw), false); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-21.js b/js/src/jit-test/tests/debug/Debugger-debuggees-21.js new file mode 100644 index 0000000000..fb5f1b849d --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-21.js @@ -0,0 +1,12 @@ +// Errors adding globals in addAllGlobalsAsDebuggees should be reported. + +// The exception that might be thrown in this test reflects our inability +// to change compartments to debug mode while they have frames on the +// stack. If we run this test with --debugjit, it won't throw an error at +// all, since all compartments are already in debug mode. So, pass if the +// script completes normally, or throws an appropriate exception. +try { + newGlobal().eval("(new Debugger).addAllGlobalsAsDebuggees();"); +} catch (ex) { + assertEq(!!(''+ex).match(/can't start debugging: a debuggee script is on the stack/), true); +} diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-22.js b/js/src/jit-test/tests/debug/Debugger-debuggees-22.js new file mode 100644 index 0000000000..4191fb0e61 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-22.js @@ -0,0 +1,24 @@ +// Adding a debuggee allowed with scripts on stack. + +var g = newGlobal({newCompartment: true}); +g.dbg = new Debugger; + +g.eval("" + function f(d) { + g(d); + if (d) + assertEq(dbg.hasDebuggee(this), true); +}); + +g.eval("" + function g(d) { + if (!d) + return; + + dbg.addDebuggee(this); +}); + +g.eval("(" + function test() { + f(false); + f(false); + f(true); + f(true); +} + ")();"); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-23.js b/js/src/jit-test/tests/debug/Debugger-debuggees-23.js new file mode 100644 index 0000000000..fabdc3761e --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-23.js @@ -0,0 +1,107 @@ +// Adding a debuggee allowed with scripts on stack from stranger places. + +// Test CCW. +(function testCCW() { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + g.dbg = dbg; + g.GLOBAL = g; + + g.turnOnDebugger = function () { + dbg.addDebuggee(g); + }; + + g.eval("" + function f(d) { + turnOnDebugger(); + assertEq(dbg.hasDebuggee(GLOBAL), true); + }); + + g.eval("(" + function test() { + f(false); + f(false); + f(true); + f(true); + } + ")();"); +})(); + +// Test getter. +(function testGetter() { + var g = newGlobal({newCompartment: true}); + g.dbg = new Debugger; + g.GLOBAL = g; + + g.eval("" + function f(obj) { + obj.foo; + assertEq(dbg.hasDebuggee(GLOBAL), true); + }); + + g.eval("(" + function test() { + f({ get foo() { dbg.addDebuggee(GLOBAL); } }); + } + ")();"); +})(); + +// Test setter. +(function testSetter() { + var g = newGlobal({newCompartment: true}); + g.dbg = new Debugger; + g.GLOBAL = g; + + g.eval("" + function f(obj) { + obj.foo = 42; + assertEq(dbg.hasDebuggee(GLOBAL), true); + }); + + g.eval("(" + function test() { + f({ set foo(v) { dbg.addDebuggee(GLOBAL); } }); + } + ")();"); +})(); + +// Test toString. +(function testToString() { + var g = newGlobal({newCompartment: true}); + g.dbg = new Debugger; + g.GLOBAL = g; + + g.eval("" + function f(obj) { + obj + ""; + assertEq(dbg.hasDebuggee(GLOBAL), true); + }); + + g.eval("(" + function test() { + f({ toString: function () { dbg.addDebuggee(GLOBAL); }}); + } + ")();"); +})(); + +// Test valueOf. +(function testValueOf() { + var g = newGlobal({newCompartment: true}); + g.dbg = new Debugger; + g.GLOBAL = g; + + g.eval("" + function f(obj) { + obj + ""; + assertEq(dbg.hasDebuggee(GLOBAL), true); + }); + + g.eval("(" + function test() { + f({ valueOf: function () { dbg.addDebuggee(GLOBAL); }}); + } + ")();"); +})(); + +// Test proxy trap. +(function testProxyTrap() { + var g = newGlobal({newCompartment: true}); + g.dbg = new Debugger; + g.GLOBAL = g; + + g.eval("" + function f(proxy) { + proxy["foo"]; + assertEq(dbg.hasDebuggee(GLOBAL), true); + }); + + g.eval("(" + function test() { + var handler = { get: function () { dbg.addDebuggee(GLOBAL); } }; + var proxy = new Proxy({}, handler); + f(proxy); + } + ")();"); +})(); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-24.js b/js/src/jit-test/tests/debug/Debugger-debuggees-24.js new file mode 100644 index 0000000000..9243c247d1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-24.js @@ -0,0 +1,55 @@ +// Turning debugger on for a particular global with on-stack scripts shouldn't +// make other globals' scripts observable. + +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var g3 = newGlobal({newCompartment: true}); + +g1.eval("" + function f() { + var name = "f"; + g(); + return name; +}); +g2.eval("" + function g() { + var name = "g"; + h(); + return name; +}); +g3.eval("" + function h() { + var name = "h"; + toggle(); + return name; +}); + +g1.g = g2.g; +g2.h = g3.h; + +function name(f) { + return f.environment.getVariable("name"); +} + +var dbg = new Debugger; +g3.toggle = function () { + var frame; + + // Only f should be visible. + dbg.addDebuggee(g1); + frame = dbg.getNewestFrame(); + assertEq(name(frame), "f"); + + // Now h should also be visible. + dbg.addDebuggee(g3); + frame = dbg.getNewestFrame(); + assertEq(name(frame), "h"); + assertEq(name(frame.older), "f"); + + // Finally everything should be visible. + dbg.addDebuggee(g2); + frame = dbg.getNewestFrame(); + assertEq(name(frame), "h"); + assertEq(name(frame.older), "g"); + assertEq(name(frame.older.older), "f"); +}; + +g1.eval("(" + function () { f(); } + ")();"); + diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-25.js b/js/src/jit-test/tests/debug/Debugger-debuggees-25.js new file mode 100644 index 0000000000..f066e5a3ef --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-25.js @@ -0,0 +1,48 @@ +// Turning debugger off global at a time. + +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var g3 = newGlobal({newCompartment: true}); + +g1.eval("" + function f() { + var name = "f"; + g(); + return name; +}); +g2.eval("" + function g() { + var name = "g"; + h(); + return name; +}); +g3.eval("" + function h() { + var name = "h"; + toggle(); + return name; +}); + +g1.g = g2.g; +g2.h = g3.h; + +function name(f) { + return f.environment.getVariable("name"); +} + +var dbg = new Debugger; +g3.toggle = function () { + var frame; + + // Add all globals. + dbg.addDebuggee(g1); + dbg.addDebuggee(g3); + dbg.addDebuggee(g2); + + // Remove one at a time. + dbg.removeDebuggee(g3); + assertEq(name(dbg.getNewestFrame()), "g"); + dbg.removeDebuggee(g2); + assertEq(name(dbg.getNewestFrame()), "f"); + dbg.removeDebuggee(g1); +}; + +g1.eval("(" + function () { f(); } + ")();"); + diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-26.js b/js/src/jit-test/tests/debug/Debugger-debuggees-26.js new file mode 100644 index 0000000000..d2e7f610b1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-26.js @@ -0,0 +1,34 @@ +// Ion can bail in-place when throwing exceptions with debug mode toggled on. + +load(libdir + "jitopts.js"); + +if (!jitTogglesMatch(Opts_Ion2NoOffthreadCompilation)) + quit(); + +withJitOptions(Opts_Ion2NoOffthreadCompilation, function () { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + + g.toggle = function toggle(x, d) { + if (d) { + dbg.addDebuggee(g); + var frame = dbg.getNewestFrame().older; + assertEq(frame.callee.name, "f"); + assertEq(frame.implementation, "ion"); + throw 42; + } + }; + + g.eval("" + function f(x, d) { g(x, d); }); + g.eval("" + function g(x, d) { toggle(x, d); }); + + try { + g.eval("(" + function test() { + for (var i = 0; i < 5; i++) + f(42, false); + f(42, true); + } + ")();"); + } catch (exc) { + assertEq(exc, 42); + } +}); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-27.js b/js/src/jit-test/tests/debug/Debugger-debuggees-27.js new file mode 100644 index 0000000000..7046b68385 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-27.js @@ -0,0 +1,19 @@ +// Test that we can OSR with the same script on the stack multiple times. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; + +g.toggle = function toggle() { + dbg.addDebuggee(g); + var frame = dbg.getNewestFrame(); +} + +g.eval("" + function f(x) { + if (x == 0) { + toggle(); + return; + } + f(x - 1); +}); + +g.eval("f(3);"); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-28.js b/js/src/jit-test/tests/debug/Debugger-debuggees-28.js new file mode 100644 index 0000000000..a5c11201cb --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-28.js @@ -0,0 +1,109 @@ +// Test that on->off->on and off->on->off toggles don't crash. + +function addRemove(dbg, g) { + dbg.addDebuggee(g); + var f = dbg.getNewestFrame(); + while (f) + f = f.older; + dbg.removeDebuggee(g); +} + +function removeAdd(dbg, g) { + dbg.removeDebuggee(g); + dbg.addDebuggee(g); + var f = dbg.getNewestFrame(); + while (f) + f = f.older; +} + +function newGlobalDebuggerPair(toggleSeq) { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + + if (toggleSeq == removeAdd) + dbg.addDebuggee(g); + + g.eval("" + function f() { return g(); }); + g.eval("" + function g() { return h(); }); + g.eval("line0 = Error().lineNumber;"); + g.eval("" + function h() { + for (var i = 0; i < 100; i++) + interruptIf(i == 95); + debugger; + return i; + }); + + setInterruptCallback(function () { return true; }); + + return [g, dbg]; +} + +function testInterrupt(toggleSeq) { + var [g, dbg] = newGlobalDebuggerPair(toggleSeq); + + setInterruptCallback(function () { + toggleSeq(dbg, g); + return true; + }); + + assertEq(g.f(), 100); +} + +function testPrologue(toggleSeq) { + var [g, dbg] = newGlobalDebuggerPair(toggleSeq); + + dbg.onEnterFrame = function (f) { + if (f.callee && f.callee.name == "h") + toggleSeq(dbg, g); + }; + + assertEq(g.f(), 100); +} + +function testEpilogue(toggleSeq) { + var [g, dbg] = newGlobalDebuggerPair(toggleSeq); + + dbg.onEnterFrame = function (f) { + if (f.callee && f.callee.name == "h") { + f.onPop = function () { + toggleSeq(dbg, g); + }; + } + }; + + assertEq(g.f(), 100); +} + +function testTrap(toggleSeq) { + var [g, dbg] = newGlobalDebuggerPair(toggleSeq); + + dbg.onEnterFrame = function (f) { + if (f.callee && f.callee.name == "h") { + var offs = f.script.getLineOffsets(g.line0 + 2); + assertEq(offs.length > 0, true); + f.script.setBreakpoint(offs[0], { hit: function () { + toggleSeq(dbg, g); + }}); + } + }; + + assertEq(g.f(), 100); +} + +function testDebugger(toggleSeq) { + var [g, dbg] = newGlobalDebuggerPair(toggleSeq); + + dbg.onDebuggerStatement = function () { + toggleSeq(dbg, g); + }; + + assertEq(g.f(), 100); +} + +testInterrupt(addRemove); +testInterrupt(removeAdd); + +testPrologue(removeAdd); +testEpilogue(removeAdd); +testTrap(removeAdd); +testDebugger(removeAdd); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-29.js b/js/src/jit-test/tests/debug/Debugger-debuggees-29.js new file mode 100644 index 0000000000..fb05edc884 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-29.js @@ -0,0 +1,6 @@ +// Debugger.prototype.addDebuggee should not accept invisible-to-debugger globals. +load(libdir + 'asserts.js'); + +var g = newGlobal({ newCompartment: true, invisibleToDebugger: true }); + +assertThrowsInstanceOf(() => { new Debugger(g); }, TypeError); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-30.js b/js/src/jit-test/tests/debug/Debugger-debuggees-30.js new file mode 100644 index 0000000000..2287c38d8b --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-30.js @@ -0,0 +1,32 @@ +// Debugger and debuggees must be in different compartments. + +load(libdir + "asserts.js"); + +function testConstructor() { + var g = newGlobal({sameCompartmentAs: this}); + assertTypeErrorMessage(() => new Debugger(g), + "Debugger: argument must be an object from a different compartment"); +} +testConstructor(); + +function testAddDebuggee() { + var g = newGlobal({sameCompartmentAs: this}); + var dbg = new Debugger(); + assertTypeErrorMessage(() => dbg.addDebuggee(this), + "debugger and debuggee must be in different compartments"); +} +testAddDebuggee(); + +function testAddAllGlobalsAsDebuggees() { + var g1 = newGlobal({sameCompartmentAs: this}); + var g2 = newGlobal({newCompartment: true}); + var g3 = newGlobal({sameCompartmentAs: g2}); + var g4 = newGlobal({newCompartment: true, sameZoneAs: this}); + var dbg = new Debugger(); + dbg.addAllGlobalsAsDebuggees(); + assertEq(dbg.hasDebuggee(g1), false); + assertEq(dbg.hasDebuggee(g2), true); + assertEq(dbg.hasDebuggee(g3), true); + assertEq(dbg.hasDebuggee(g4), true); +} +testAddAllGlobalsAsDebuggees(); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-31.js b/js/src/jit-test/tests/debug/Debugger-debuggees-31.js new file mode 100644 index 0000000000..0eb7f65212 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-31.js @@ -0,0 +1,30 @@ +// |jit-test| skip-if: !hasFunction["gczeal"] +// Removing and adding debuggees during an incremental sweep should not confuse +// the generatorFrames map. + +// Let any ongoing incremental GC finish, and then clear any ambient zeal +// settings established by the harness (the JS_GC_ZEAL env var, shell arguments, +// etc.) +gczeal(0); + +let g = newGlobal({newCompartment: true}); +g.eval('function* f() { yield 123; }'); + +let dbg = Debugger(g); +dbg.onEnterFrame = frame => { + dbg.removeDebuggee(g); + dbg.addDebuggee(g); +}; + +// Select GCZeal mode 10 (IncrementalMultipleSlices: Incremental GC in many +// slices) and use long slices, to make sure that the debuggee removal occurs +// during a slice. +gczeal(10, 0); +gcslice(1); +while (gcstate() !== "NotAcctive" && gcstate() !== "Sweep") { + gcslice(1000); +} + +let genObj = g.f(); +genObj.return(); +assertEq(gcstate(), "Sweep"); diff --git a/js/src/jit-test/tests/debug/Debugger-debuggees-32.js b/js/src/jit-test/tests/debug/Debugger-debuggees-32.js new file mode 100644 index 0000000000..4d5bab9e1a --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-32.js @@ -0,0 +1,13 @@ +let g = newGlobal({newCompartment: true}); +g.eval('function* f() { yield 123; }'); + +let dbg = Debugger(g); +let genObj = g.f(); + +dbg.onEnterFrame = frame => { + frame.onStep = () => {}; + dbg.removeDebuggee(g); + dbg.addDebuggee(g); +}; + +genObj.return(); diff --git a/js/src/jit-test/tests/debug/Debugger-findAllGlobals-01.js b/js/src/jit-test/tests/debug/Debugger-findAllGlobals-01.js new file mode 100644 index 0000000000..7400ef9ea1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findAllGlobals-01.js @@ -0,0 +1,24 @@ +// Debugger.prototype.findAllGlobals surface. + +load(libdir + 'asserts.js'); + +var dbg = new Debugger; +var d = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(dbg), 'findAllGlobals'); +assertEq(d.configurable, true); +assertEq(d.enumerable, false); +assertEq(d.writable, true); +assertEq(typeof d.value, 'function'); +assertEq(dbg.findAllGlobals.length, 0); +assertEq(dbg.findAllGlobals.name, 'findAllGlobals'); + +// findAllGlobals can only be applied to real Debugger instances. +assertThrowsInstanceOf(function() { + Debugger.prototype.findAllGlobals.call(Debugger.prototype); + }, + TypeError); +var a = dbg.findAllGlobals(); +assertEq(a instanceof Array, true); +assertEq(a.length > 0, true); +for (g of a) { + assertEq(g instanceof Debugger.Object, true); +} diff --git a/js/src/jit-test/tests/debug/Debugger-findAllGlobals-02.js b/js/src/jit-test/tests/debug/Debugger-findAllGlobals-02.js new file mode 100644 index 0000000000..a44516128a --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findAllGlobals-02.js @@ -0,0 +1,26 @@ +// Debugger.prototype.findAllGlobals finds ALL the globals! + +var g1 = newGlobal({newCompartment: true}); // Created before the Debugger; debuggee. +var g2 = newGlobal({newCompartment: true}); // Created before the Debugger; not debuggee. + +var dbg = new Debugger; + +var g3 = newGlobal({newCompartment: true}); // Created after the Debugger; debuggee. +var g4 = newGlobal({newCompartment: true}); // Created after the Debugger; not debuggee. + +var g1w = dbg.addDebuggee(g1); +var g3w = dbg.addDebuggee(g3); + +var a = dbg.findAllGlobals(); + +// Get Debugger.Objects around global objects +var g2w = dbg.makeGlobalObjectReference(g2); +var g4w = dbg.makeGlobalObjectReference(g4); +var thisw = dbg.makeGlobalObjectReference(this); + +// Check that they're all there. +assertEq(a.indexOf(g1w) != -1, true); +assertEq(a.indexOf(g2w) != -1, true); +assertEq(a.indexOf(g3w) != -1, true); +assertEq(a.indexOf(g4w) != -1, true); +assertEq(a.indexOf(thisw) != -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-01.js b/js/src/jit-test/tests/debug/Debugger-findObjects-01.js new file mode 100644 index 0000000000..4ed43310a9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-01.js @@ -0,0 +1,4 @@ +// In a debugger with no debuggees, findObjects should return no objects. + +var dbg = new Debugger; +assertEq(dbg.findObjects().length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-02.js b/js/src/jit-test/tests/debug/Debugger-findObjects-02.js new file mode 100644 index 0000000000..b3bdbbf519 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-02.js @@ -0,0 +1,18 @@ +// In a debuggee with live objects, findObjects finds those objects. + +var g = newGlobal({newCompartment: true}); + +let defObject = v => g.eval(`this.${v} = { toString: () => "[object ${v}]" }`); +defObject("a"); +defObject("b"); +defObject("c"); + +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +var aw = gw.makeDebuggeeValue(g.a); +var bw = gw.makeDebuggeeValue(g.b); +var cw = gw.makeDebuggeeValue(g.c); + +assertEq(dbg.findObjects().indexOf(aw) != -1, true); +assertEq(dbg.findObjects().indexOf(bw) != -1, true); +assertEq(dbg.findObjects().indexOf(cw) != -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-03.js b/js/src/jit-test/tests/debug/Debugger-findObjects-03.js new file mode 100644 index 0000000000..0daf850754 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-03.js @@ -0,0 +1,12 @@ +// findObjects' result includes objects referenced by other objects. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval('this.a = { b: {} };'); + +var bw = gw.makeDebuggeeValue(g.a.b); + +var objects = dbg.findObjects(); +assertEq(objects.indexOf(bw) != -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-04.js b/js/src/jit-test/tests/debug/Debugger-findObjects-04.js new file mode 100644 index 0000000000..ac62575637 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-04.js @@ -0,0 +1,16 @@ +// findObjects' result includes objects captured by closures. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval(` + this.f = (function () { + let a = { foo: () => {} }; + return () => a; + }()); +`); + +let objects = dbg.findObjects(); +let aw = gw.makeDebuggeeValue(g.f()); +assertEq(objects.indexOf(aw) != -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-05.js b/js/src/jit-test/tests/debug/Debugger-findObjects-05.js new file mode 100644 index 0000000000..7d581ca98c --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-05.js @@ -0,0 +1,10 @@ +// findObjects' result doesn't include any duplicates. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +dbg.addDebuggee(g); + +let objects = dbg.findObjects(); +let set = new Set(objects); + +assertEq(objects.length, set.size); diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-06.js b/js/src/jit-test/tests/debug/Debugger-findObjects-06.js new file mode 100644 index 0000000000..2f8d5a11f6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-06.js @@ -0,0 +1,14 @@ +// In a debugger with multiple debuggees, findObjects finds objects from all debuggees. + +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var g1w = dbg.addDebuggee(g1); +var g2w = dbg.addDebuggee(g2); + +g1.eval('this.a = {};'); +g2.eval('this.b = {};'); + +var objects = dbg.findObjects(); +assertEq(objects.indexOf(g1w.makeDebuggeeValue(g1.a)) != -1, true); +assertEq(objects.indexOf(g2w.makeDebuggeeValue(g2.b)) != -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-07.js b/js/src/jit-test/tests/debug/Debugger-findObjects-07.js new file mode 100644 index 0000000000..5d4549cc0e --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-07.js @@ -0,0 +1,22 @@ +// findObjects can filter objects by class name. + +var g = newGlobal({newCompartment: true}); + +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval('this.re = /foo/;'); +g.eval('this.d = new Date();'); + +var rew = gw.makeDebuggeeValue(g.re); +var dw = gw.makeDebuggeeValue(g.d); + +var objects; + +objects = dbg.findObjects({ class: "RegExp" }); +assertEq(objects.indexOf(rew) != -1, true); +assertEq(objects.indexOf(dw) == -1, true); + +objects = dbg.findObjects({ class: "Date" }); +assertEq(objects.indexOf(dw) != -1, true); +assertEq(objects.indexOf(rew) == -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-08.js b/js/src/jit-test/tests/debug/Debugger-findObjects-08.js new file mode 100644 index 0000000000..fd6ceb1031 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-08.js @@ -0,0 +1,12 @@ +// Passing bad query properties to Debugger.prototype.findScripts throws. + +load(libdir + 'asserts.js'); + +var dbg = new Debugger(); +var g = newGlobal(); + +assertThrowsInstanceOf(() => dbg.findObjects({ class: null }), TypeError); +assertThrowsInstanceOf(() => dbg.findObjects({ class: true }), TypeError); +assertThrowsInstanceOf(() => dbg.findObjects({ class: 1337 }), TypeError); +assertThrowsInstanceOf(() => dbg.findObjects({ class: /re/ }), TypeError); +assertThrowsInstanceOf(() => dbg.findObjects({ class: {} }), TypeError); diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-09.js b/js/src/jit-test/tests/debug/Debugger-findObjects-09.js new file mode 100644 index 0000000000..4d95d3abf9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-09.js @@ -0,0 +1,9 @@ +// We don't return objects where our query's class name is the prefix of the +// object's class name and vice versa. + +var dbg = new Debugger(); +var g = newGlobal({newCompartment: true}); +var gw = dbg.addDebuggee(g); + +assertEq(dbg.findObjects({ class: "Objec" }).length, 0); +assertEq(dbg.findObjects({ class: "Objectttttt" }).length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-10.js b/js/src/jit-test/tests/debug/Debugger-findObjects-10.js new file mode 100644 index 0000000000..d490dac26c --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-10.js @@ -0,0 +1,5 @@ +// Debugger.prototype.findObjects should not expose internal JSFunction objects. + +var g = newGlobal({newCompartment: true}); +g.eval(`function f() { return function() {}; }`); +new Debugger(g).findObjects(); diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-11.js b/js/src/jit-test/tests/debug/Debugger-findObjects-11.js new file mode 100644 index 0000000000..8c50a95ed6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-11.js @@ -0,0 +1,7 @@ +// This shouldn't segfault. + +var g = newGlobal({newCompartment: true}); +g.eval(`function f() { return function() { + function g() {} +}; }`); +new Debugger(g).findObjects(); diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-fuzzing.js b/js/src/jit-test/tests/debug/Debugger-findObjects-fuzzing.js new file mode 100644 index 0000000000..251fea5fc9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-fuzzing.js @@ -0,0 +1,7 @@ +// |jit-test| --fuzzing-safe +// Debugger.findObjects returns an empty array with --fuzzing-safe + +var g = newGlobal({newCompartment: true}); +g.evaluate("arr = [1, 2, 3].map(x => x + 1)"); +var dbg = new Debugger(g); +assertEq(dbg.findObjects().length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-01.js b/js/src/jit-test/tests/debug/Debugger-findScripts-01.js new file mode 100644 index 0000000000..e39691605b --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-01.js @@ -0,0 +1,4 @@ +// In a debugger with no debuggees, findScripts should return no scripts. + +var dbg = new Debugger; +assertEq(dbg.findScripts().length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-02.js b/js/src/jit-test/tests/debug/Debugger-findScripts-02.js new file mode 100644 index 0000000000..5a2b7cbfbf --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-02.js @@ -0,0 +1,16 @@ +// In a debuggee with functions, findScripts finds those functions' scripts. + +var g = newGlobal({newCompartment: true}); +g.eval('function f(){}'); +g.eval('function g(){}'); +g.eval('function h(){}'); + +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +var fw = gw.makeDebuggeeValue(g.f); +var gw = gw.makeDebuggeeValue(g.g); +var hw = gw.makeDebuggeeValue(g.h); + +assertEq(dbg.findScripts().indexOf(fw.script) != -1, true); +assertEq(dbg.findScripts().indexOf(gw.script) != -1, true); +assertEq(dbg.findScripts().indexOf(hw.script) != -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-03.js b/js/src/jit-test/tests/debug/Debugger-findScripts-03.js new file mode 100644 index 0000000000..2bc9d84de8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-03.js @@ -0,0 +1,16 @@ +// While eval code is running, findScripts returns its script. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +g.check = function () { + log += 'c'; + var frame = dbg.getNewestFrame(); + assertEq(frame.type, "eval"); + assertEq(dbg.findScripts().indexOf(frame.script) != -1, true); +}; + +log = ''; +g.eval('check()'); +assertEq(log, 'c'); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-04.js b/js/src/jit-test/tests/debug/Debugger-findScripts-04.js new file mode 100644 index 0000000000..8d81d5174e --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-04.js @@ -0,0 +1,27 @@ +// Within a series of evals and calls, all their frames' scripts appear in findScripts' result. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +g.check = function () { + log += 'c'; + var scripts = dbg.findScripts(); + + var innerEvalFrame = dbg.getNewestFrame(); + assertEq(innerEvalFrame.type, "eval"); + assertEq(scripts.indexOf(innerEvalFrame.script) != -1, true); + + var callFrame = innerEvalFrame.older; + assertEq(callFrame.type, "call"); + assertEq(scripts.indexOf(callFrame.script) != -1, true); + + var outerEvalFrame = callFrame.older; + assertEq(outerEvalFrame.type, "eval"); + assertEq(scripts.indexOf(outerEvalFrame.script) != -1, true); + assertEq(innerEvalFrame != outerEvalFrame, true); +}; + +g.eval('function f() { eval("check();") }'); +log = ''; +g.eval('f();'); +assertEq(log, 'c'); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-05.js b/js/src/jit-test/tests/debug/Debugger-findScripts-05.js new file mode 100644 index 0000000000..b82dfda34b --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-05.js @@ -0,0 +1,18 @@ +// findScripts' result includes scripts for nested functions. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +var log; + +g.eval('function f() { return function g() { return function h() { return "Squee!"; } } }'); +var fw = gw.makeDebuggeeValue(g.f); +var gw = gw.makeDebuggeeValue(g.f()); +var hw = gw.makeDebuggeeValue(g.f()()); + +assertEq(fw.script != gw.script, true); +assertEq(fw.script != hw.script, true); + +var scripts = dbg.findScripts(); +assertEq(scripts.indexOf(fw.script) != -1, true); +assertEq(scripts.indexOf(gw.script) != -1, true); +assertEq(scripts.indexOf(hw.script) != -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-06.js b/js/src/jit-test/tests/debug/Debugger-findScripts-06.js new file mode 100644 index 0000000000..129aa48423 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-06.js @@ -0,0 +1,13 @@ +// In a debugger with multiple debuggees, findScripts finds scripts across all debuggees. +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var g1w = dbg.addDebuggee(g1); +var g2w = dbg.addDebuggee(g2); + +g1.eval('function f() {}'); +g2.eval('function g() {}'); + +var scripts = dbg.findScripts(); +assertEq(scripts.indexOf(g1w.makeDebuggeeValue(g1.f).script) != -1, true); +assertEq(scripts.indexOf(g2w.makeDebuggeeValue(g2.g).script) != -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-07.js b/js/src/jit-test/tests/debug/Debugger-findScripts-07.js new file mode 100644 index 0000000000..47132b1f13 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-07.js @@ -0,0 +1,33 @@ +// findScripts can filter scripts by global. +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var g3 = newGlobal({newCompartment: true}); + +var dbg = new Debugger(); +var g1w = dbg.addDebuggee(g1); +var g2w = dbg.addDebuggee(g2); + +g1.eval('function f() {}'); +g2.eval('function g() {}'); +g2.eval('function h() {}'); +var g1fw = g1w.makeDebuggeeValue(g1.f); +var g2gw = g2w.makeDebuggeeValue(g2.g); + +var scripts; + +scripts = dbg.findScripts({}); +assertEq(scripts.indexOf(g1fw.script) != -1, true); +assertEq(scripts.indexOf(g2gw.script) != -1, true); + +scripts = dbg.findScripts({global: g1}); +assertEq(scripts.indexOf(g1fw.script) != -1, true); +assertEq(scripts.indexOf(g2gw.script) != -1, false); + +scripts = dbg.findScripts({global: g2}); +assertEq(scripts.indexOf(g1fw.script) != -1, false); +assertEq(scripts.indexOf(g2gw.script) != -1, true); + +scripts = dbg.findScripts({global: g3}); +// findScripts should only return debuggee scripts, and g3 isn't a +// debuggee, so this should be completely empty. +assertEq(scripts.length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-08-script2 b/js/src/jit-test/tests/debug/Debugger-findScripts-08-script2 new file mode 100644 index 0000000000..40b3aafff5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-08-script2 @@ -0,0 +1,3 @@ +// -*- mode: js2 -*- +g1.eval('function g1g() {}'); +g2.eval('function g2g() {}'); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-08.js b/js/src/jit-test/tests/debug/Debugger-findScripts-08.js new file mode 100644 index 0000000000..08b75b0216 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-08.js @@ -0,0 +1,81 @@ +// Debugger.prototype.findScripts can filter scripts by URL. +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var g3 = newGlobal({newCompartment: true}); + +// Define some functions whose url will be this test file. +g1.eval('function g1f() {}'); +g2.eval('function g2f() {}'); + +// Define some functions whose url will be a different file. +url2 = scriptdir + "Debugger-findScripts-08-script2"; +load(url2); + +var dbg = new Debugger(); +var g1w = dbg.addDebuggee(g1); +var g2w = dbg.addDebuggee(g2); +var g3w = dbg.addDebuggee(g3); + +var g1fw = g1w.makeDebuggeeValue(g1.g1f); +var g1gw = g1w.makeDebuggeeValue(g1.g1g); +var g2fw = g2w.makeDebuggeeValue(g2.g2f); +var g2gw = g2w.makeDebuggeeValue(g2.g2g); + +// Find the url of this file. +url = g1fw.script.url; + +var scripts; + +scripts = dbg.findScripts({}); +assertEq(scripts.indexOf(g1fw.script) != -1, true); +assertEq(scripts.indexOf(g1gw.script) != -1, true); +assertEq(scripts.indexOf(g2fw.script) != -1, true); +assertEq(scripts.indexOf(g2gw.script) != -1, true); + +scripts = dbg.findScripts({url:url}); +assertEq(scripts.indexOf(g1fw.script) != -1, true); +assertEq(scripts.indexOf(g1gw.script) != -1, false); +assertEq(scripts.indexOf(g2fw.script) != -1, true); +assertEq(scripts.indexOf(g2gw.script) != -1, false); + +scripts = dbg.findScripts({url:url2}); +assertEq(scripts.indexOf(g1fw.script) != -1, false); +assertEq(scripts.indexOf(g1gw.script) != -1, true); +assertEq(scripts.indexOf(g2fw.script) != -1, false); +assertEq(scripts.indexOf(g2gw.script) != -1, true); + +scripts = dbg.findScripts({url:url, global:g1}); +assertEq(scripts.indexOf(g1fw.script) != -1, true); +assertEq(scripts.indexOf(g1gw.script) != -1, false); +assertEq(scripts.indexOf(g2fw.script) != -1, false); +assertEq(scripts.indexOf(g2gw.script) != -1, false); + +scripts = dbg.findScripts({url:url2, global:g1}); +assertEq(scripts.indexOf(g1fw.script) != -1, false); +assertEq(scripts.indexOf(g1gw.script) != -1, true); +assertEq(scripts.indexOf(g2fw.script) != -1, false); +assertEq(scripts.indexOf(g2gw.script) != -1, false); + +scripts = dbg.findScripts({url:url, global:g2}); +assertEq(scripts.indexOf(g1fw.script) != -1, false); +assertEq(scripts.indexOf(g1gw.script) != -1, false); +assertEq(scripts.indexOf(g2fw.script) != -1, true); +assertEq(scripts.indexOf(g2gw.script) != -1, false); + +scripts = dbg.findScripts({url:url2, global:g2}); +assertEq(scripts.indexOf(g1fw.script) != -1, false); +assertEq(scripts.indexOf(g1gw.script) != -1, false); +assertEq(scripts.indexOf(g2fw.script) != -1, false); +assertEq(scripts.indexOf(g2gw.script) != -1, true); + +scripts = dbg.findScripts({url:"xlerb"}); // "XLERB"??? +assertEq(scripts.indexOf(g1fw.script) != -1, false); +assertEq(scripts.indexOf(g1gw.script) != -1, false); +assertEq(scripts.indexOf(g2fw.script) != -1, false); +assertEq(scripts.indexOf(g2gw.script) != -1, false); + +scripts = dbg.findScripts({url:url, global:g3}); +assertEq(scripts.indexOf(g1fw.script) != -1, false); +assertEq(scripts.indexOf(g1gw.script) != -1, false); +assertEq(scripts.indexOf(g2fw.script) != -1, false); +assertEq(scripts.indexOf(g2gw.script) != -1, false); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-09.js b/js/src/jit-test/tests/debug/Debugger-findScripts-09.js new file mode 100644 index 0000000000..b485415e9f --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-09.js @@ -0,0 +1,45 @@ +// Passing bad query properties to Debugger.prototype.findScripts throws. +load(libdir + 'asserts.js'); + +var dbg = new Debugger(); +var g = newGlobal(); +assertEq(dbg.findScripts().length, 0); +assertEq(dbg.findScripts({}).length, 0); + +assertEq(dbg.findScripts({global:g}).length, 0); +assertThrowsInstanceOf(function () { dbg.findScripts({global:null}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({global:true}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({global:4}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({global:"I must have fruit!"}); }, TypeError); + +assertEq(dbg.findScripts({url:""}).length, 0); +assertThrowsInstanceOf(function () { dbg.findScripts({url:null}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({url:true}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({url:4}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({url:{}}); }, TypeError); + +assertEq(dbg.findScripts({url:"", line:1}).length, 0); +assertEq(dbg.findScripts({url:"", line:numberToDouble(2)}).length, 0); + +// A 'line' property without a 'url' property is verboten. +assertThrowsInstanceOf(function () { dbg.findScripts({line:1}); }, TypeError); + +assertThrowsInstanceOf(function () { dbg.findScripts({url:"",line:null}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({url:"",line:{}}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({url:"",line:true}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({url:"",line:""}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({url:"",line:0}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({url:"",line:-1}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({url:"",line:1.5}); }, TypeError); + +// Values of any type for 'innermost' are accepted. +assertEq(dbg.findScripts({url:"", line:1, innermost:true}).length, 0); +assertEq(dbg.findScripts({url:"", line:1, innermost:1}).length, 0); +assertEq(dbg.findScripts({url:"", line:1, innermost:"yes"}).length, 0); +assertEq(dbg.findScripts({url:"", line:1, innermost:{}}).length, 0); +assertEq(dbg.findScripts({url:"", line:1, innermost:[]}).length, 0); + +// An 'innermost' property without 'url' and 'line' properties is verboten. +assertThrowsInstanceOf(function () { dbg.findScripts({innermost:true}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({innermost:true, line:1}); }, TypeError); +assertThrowsInstanceOf(function () { dbg.findScripts({innermost:true, url:"foo"}); }, TypeError); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-10.js b/js/src/jit-test/tests/debug/Debugger-findScripts-10.js new file mode 100644 index 0000000000..f8ab68dda7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-10.js @@ -0,0 +1,13 @@ +// Specifying a non-debuggee global in a Debugger.prototype.findScripts query should +// cause the query to return no scripts. + +var g1 = newGlobal({newCompartment: true}); +g1.eval('function f(){}'); + +var g2 = newGlobal({newCompartment: true}); +g2.eval('function g(){}'); + +var dbg = new Debugger(g1); +assertEq(dbg.findScripts({global:g1}).length > 0, true); +assertEq(dbg.findScripts({global:g2}).length, 0); +assertEq(dbg.findScripts({global:this}).length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-11-script2 b/js/src/jit-test/tests/debug/Debugger-findScripts-11-script2 new file mode 100644 index 0000000000..7a170645e8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-11-script2 @@ -0,0 +1,18 @@ +// -*- mode: js2 -*- +// Line numbers in this file are checked in Debugger-findScripts-11.js. + +// line 3 + +var x = ""; +function f() { + x += "the map"; // line 8 + return function g() { + return "to me what you have stolen"; // line 10 + }; +} + +function h(x, y) { + if (x == 0) return y+1; // line 15 + if (y == 0) return h(x-1, 1); + return h(x-1, h(x, y-1)); +} diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-11.js b/js/src/jit-test/tests/debug/Debugger-findScripts-11.js new file mode 100644 index 0000000000..4cf9a54a88 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-11.js @@ -0,0 +1,36 @@ +// Debugger.prototype.findScripts can filter scripts by line number. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +var scriptname = scriptdir + 'Debugger-findScripts-11-script2'; +g.load(scriptname); + +var gfw = gw.makeDebuggeeValue(g.f); +var ggw = gw.makeDebuggeeValue(g.f()); +var ghw = gw.makeDebuggeeValue(g.h); + +// Specifying a line outside of all functions screens out all function scripts. +assertEq(dbg.findScripts({url:scriptname, line:3}).indexOf(gfw.script) != -1, false); +assertEq(dbg.findScripts({url:scriptname, line:3}).indexOf(ggw.script) != -1, false); +assertEq(dbg.findScripts({url:scriptname, line:3}).indexOf(ghw.script) != -1, false); + +// Specifying a different url screens out scripts, even when global and line match. +assertEq(dbg.findScripts({url:"xlerb", line:8}).indexOf(gfw.script) != -1, false); +assertEq(dbg.findScripts({url:"xlerb", line:8}).indexOf(ggw.script) != -1, false); +assertEq(dbg.findScripts({url:"xlerb", line:8}).indexOf(ghw.script) != -1, false); + +// A line number within a function selects that function's script. +assertEq(dbg.findScripts({url:scriptname, line:8}).indexOf(gfw.script) != -1, true); +assertEq(dbg.findScripts({url:scriptname, line:8}).indexOf(ggw.script) != -1, false); +assertEq(dbg.findScripts({url:scriptname, line:8}).indexOf(ghw.script) != -1, false); + +// A line number within a nested function selects all enclosing functions' scripts. +assertEq(dbg.findScripts({url:scriptname, line:10}).indexOf(gfw.script) != -1, true); +assertEq(dbg.findScripts({url:scriptname, line:10}).indexOf(ggw.script) != -1, true); +assertEq(dbg.findScripts({url:scriptname, line:10}).indexOf(ghw.script) != -1, false); + +// A line number in a non-nested function selects that function. +assertEq(dbg.findScripts({url:scriptname, line:15}).indexOf(gfw.script) != -1, false); +assertEq(dbg.findScripts({url:scriptname, line:15}).indexOf(ggw.script) != -1, false); +assertEq(dbg.findScripts({url:scriptname, line:15}).indexOf(ghw.script) != -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-12-script1 b/js/src/jit-test/tests/debug/Debugger-findScripts-12-script1 new file mode 100644 index 0000000000..f9f484e970 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-12-script1 @@ -0,0 +1,19 @@ +// -*- mode: js2 -*- +// Script for Debugger-findScripts-12.js to load. +// Line numbers in this script are cited in the test. + +function f() { + // line 6 + function ff() { + return "my wuv, I want you always beside me"; // line 8 + }; + ff.global = this; + return ff; +}; + +function g() { + return "to Oz"; // line 15 +} + +f.global = this; +g.global = this; diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-12-script2 b/js/src/jit-test/tests/debug/Debugger-findScripts-12-script2 new file mode 100644 index 0000000000..3350c8ed29 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-12-script2 @@ -0,0 +1,19 @@ +// -*- mode: js2 -*- +// Script for Debugger-findScripts-12.js to load. +// Line numbers in this script are cited in the test, and must align with ...-script1. + +function h() { + // line 6 + function hh() { + return "on investment"; // line 8 + }; + hh.global = this; + return hh; +}; + +function i() { + return "to innocence"; // line 15 +} + +h.global = this; +i.global = this; diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-12.js b/js/src/jit-test/tests/debug/Debugger-findScripts-12.js new file mode 100644 index 0000000000..912e3d3301 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-12.js @@ -0,0 +1,129 @@ +// Debugger.prototype.findScripts can filter by global, url, and line number. + +// Two scripts, with different functions at the same line numbers. +var url1 = scriptdir + 'Debugger-findScripts-12-script1'; +var url2 = scriptdir + 'Debugger-findScripts-12-script2'; + +// Three globals: two with code, one with nothing. +var g1 = newGlobal({newCompartment: true}); +g1.toSource = () => "[global g1]"; +g1.load(url1); +g1.load(url2); +var g2 = newGlobal({newCompartment: true}); +g2.toSource = () => "[global g2]"; +g2.load(url1); +g2.load(url2); +var g3 = newGlobal({newCompartment: true}); + +var dbg = new Debugger(g1, g2, g3); + +function script(func) { + var gw = dbg.addDebuggee(func.global); + var script = gw.makeDebuggeeValue(func).script; + script.toString = function () { + return "[Debugger.Script for " + func.name + " in " + JSON.stringify(func.global) + "]"; + }; + return script; +} + +// The function scripts we know of. There may be random eval scripts involved, but +// we don't care about those. +var allScripts = ([g1.f, g1.f(), g1.g, g1.h, g1.h(), g1.i, + g2.f, g2.f(), g2.g, g2.h, g2.h(), g2.i].map(script)); + +// Search for scripts using |query|, expecting no members of allScripts +// except those given in |expected| in the result. If |expected| is +// omitted, expect no members of allScripts at all. +function queryExpectOnly(query, expected) { + print(); + print("queryExpectOnly(" + JSON.stringify(query) + ")"); + var scripts = dbg.findScripts(query); + var present = allScripts.filter(function (s) { return scripts.indexOf(s) != -1; }); + if (expected) { + expected = expected.map(script); + expected.forEach(function (s) { + if (present.indexOf(s) == -1) + assertEq(s + " not present", "is present"); + }); + present.forEach(function (s) { + if (expected.indexOf(s) == -1) + assertEq(s + " is present", "not present"); + }); + } else { + assertEq(present.length, 0); + } +} + +// We have twelve functions: two globals, each with two urls, each +// defining three functions. Show that all the different combinations of +// query parameters select what they should. + +// There are gaps in the pattern: +// - You can only filter by line if you're also filtering by url. +// - You can't ask for only the innermost scripts unless you're filtering by line. + +// Filtering by global, url, and line produces one function, or two +// where they are nested. +queryExpectOnly({ global:g1, url:url1, line: 6 }, [g1.f ]); +queryExpectOnly({ global:g1, url:url1, line: 8 }, [g1.f, g1.f()]); +queryExpectOnly({ global:g1, url:url1, line: 15 }, [g1.g ]); +queryExpectOnly({ global:g1, url:url2, line: 6 }, [g1.h ]); +queryExpectOnly({ global:g1, url:url2, line: 8 }, [g1.h, g1.h()]); +queryExpectOnly({ global:g1, url:url2, line: 15 }, [g1.i ]); +queryExpectOnly({ global:g2, url:url1, line: 6 }, [g2.f ]); +queryExpectOnly({ global:g2, url:url1, line: 8 }, [g2.f, g2.f()]); +queryExpectOnly({ global:g2, url:url1, line: 15 }, [g2.g ]); +queryExpectOnly({ global:g2, url:url2, line: 6 }, [g2.h ]); +queryExpectOnly({ global:g2, url:url2, line: 8 }, [g2.h, g2.h()]); +queryExpectOnly({ global:g2, url:url2, line: 15 }, [g2.i ]); + +// Filtering by global, url, and line, and requesting only the innermost +// function at each point, should produce only one function. +queryExpectOnly({ global:g1, url:url1, line: 6, innermost: true }, [g1.f ]); +queryExpectOnly({ global:g1, url:url1, line: 8, innermost: true }, [g1.f()]); +queryExpectOnly({ global:g1, url:url1, line: 15, innermost: true }, [g1.g ]); +queryExpectOnly({ global:g1, url:url2, line: 6, innermost: true }, [g1.h ]); +queryExpectOnly({ global:g1, url:url2, line: 8, innermost: true }, [g1.h()]); +queryExpectOnly({ global:g1, url:url2, line: 15, innermost: true }, [g1.i ]); +queryExpectOnly({ global:g2, url:url1, line: 6, innermost: true }, [g2.f ]); +queryExpectOnly({ global:g2, url:url1, line: 8, innermost: true }, [g2.f()]); +queryExpectOnly({ global:g2, url:url1, line: 15, innermost: true }, [g2.g ]); +queryExpectOnly({ global:g2, url:url2, line: 6, innermost: true }, [g2.h ]); +queryExpectOnly({ global:g2, url:url2, line: 8, innermost: true }, [g2.h()]); +queryExpectOnly({ global:g2, url:url2, line: 15, innermost: true }, [g2.i ]); + +// Filtering by url and global should produce sets of three scripts. +queryExpectOnly({ global:g1, url:url1 }, [g1.f, g1.f(), g1.g]); +queryExpectOnly({ global:g1, url:url2 }, [g1.h, g1.h(), g1.i]); +queryExpectOnly({ global:g2, url:url1 }, [g2.f, g2.f(), g2.g]); +queryExpectOnly({ global:g2, url:url2 }, [g2.h, g2.h(), g2.i]); + +// Filtering by url and line, innermost-only, should produce sets of two scripts, +// or four where there are nested functions. +queryExpectOnly({ url:url1, line: 6 }, [g1.f, g2.f ]); +queryExpectOnly({ url:url1, line: 8 }, [g1.f, g1.f(), g2.f, g2.f()]); +queryExpectOnly({ url:url1, line:15 }, [g1.g, g2.g ]); +queryExpectOnly({ url:url2, line: 6 }, [g1.h, g2.h ]); +queryExpectOnly({ url:url2, line: 8 }, [g1.h, g1.h(), g2.h, g2.h()]); +queryExpectOnly({ url:url2, line:15 }, [g1.i, g2.i ]); + +// Filtering by url and line, and requesting only the innermost scripts, +// should always produce pairs of scripts. +queryExpectOnly({ url:url1, line: 6, innermost: true }, [g1.f, g2.f ]); +queryExpectOnly({ url:url1, line: 8, innermost: true }, [g1.f(), g2.f()]); +queryExpectOnly({ url:url1, line:15, innermost: true }, [g1.g, g2.g ]); +queryExpectOnly({ url:url2, line: 6, innermost: true }, [g1.h, g2.h ]); +queryExpectOnly({ url:url2, line: 8, innermost: true }, [g1.h(), g2.h()]); +queryExpectOnly({ url:url2, line:15, innermost: true }, [g1.i, g2.i ]); + +// Filtering by global only should produce sets of six scripts. +queryExpectOnly({ global:g1 }, [g1.f, g1.f(), g1.g, g1.h, g1.h(), g1.i]); +queryExpectOnly({ global:g2 }, [g2.f, g2.f(), g2.g, g2.h, g2.h(), g2.i]); + +// Filtering by url should produce sets of six scripts. +queryExpectOnly({ url:url1 }, [g1.f, g1.f(), g1.g, g2.f, g2.f(), g2.g]); +queryExpectOnly({ url:url2 }, [g1.h, g1.h(), g1.i, g2.h, g2.h(), g2.i]); + +// Filtering by no axes should produce all twelve scripts. +queryExpectOnly({}, [g1.f, g1.f(), g1.g, g1.h, g1.h(), g1.i, + g2.f, g2.f(), g2.g, g2.h, g2.h(), g2.i]); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-14.js b/js/src/jit-test/tests/debug/Debugger-findScripts-14.js new file mode 100644 index 0000000000..f02a1b4e11 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-14.js @@ -0,0 +1,30 @@ +// Debugger.prototype.findScripts can find the innermost script at a given +// source location. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +function script(f) { + return gw.makeDebuggeeValue(f).script; +} + +function arrayIsOnly(array, element) { + return array.length == 1 && array[0] === element; +} + +url = scriptdir + 'Debugger-findScripts-14.script1'; +g.load(url); + +var scripts; + +// When we're doing 'innermost' queries, we don't have to worry about finding +// random eval scripts: we should get exactly one script, for the function +// covering that line. +scripts = dbg.findScripts({url:url, line:4, innermost:true}); +assertEq(arrayIsOnly(scripts, script(g.f)), true); + +scripts = dbg.findScripts({url:url, line:6, innermost:true}); +assertEq(arrayIsOnly(scripts, script(g.f())), true); + +scripts = dbg.findScripts({url:url, line:8, innermost:true}); +assertEq(arrayIsOnly(scripts, script(g.f()())), true); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-14.script1 b/js/src/jit-test/tests/debug/Debugger-findScripts-14.script1 new file mode 100644 index 0000000000..00da459fc1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-14.script1 @@ -0,0 +1,12 @@ +// -*- mode:js2 -*- + +function f() { + var x = 1; // line 4 + return function g() { + var y = 2; // line 6 + return function h() { + var z = 3; // line 8 + return x+y+z; + }; + }; +} diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-15.js b/js/src/jit-test/tests/debug/Debugger-findScripts-15.js new file mode 100644 index 0000000000..d9cd8fb966 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-15.js @@ -0,0 +1,9 @@ +// findScripts finds non-compile-and-go scripts + +var g = newGlobal({newCompartment: true}); +g.evaluate("function f(x) { return x + 1; }"); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var s = dbg.findScripts(); +var fw = gw.getOwnPropertyDescriptor("f").value; +assertEq(s.indexOf(fw.script) !== -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-16.js b/js/src/jit-test/tests/debug/Debugger-findScripts-16.js new file mode 100644 index 0000000000..9d735d9186 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-16.js @@ -0,0 +1,12 @@ +// Bug 744731 - findScripts() finds active debugger executeInGlobal scripts. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + hits++; + assertEq(dbg.findScripts().indexOf(dbg.getNewestFrame().script) !== -1, true); +}; +gw.executeInGlobal("debugger;"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-17.js b/js/src/jit-test/tests/debug/Debugger-findScripts-17.js new file mode 100644 index 0000000000..3c1fc56937 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-17.js @@ -0,0 +1,15 @@ +// Bug 744731 - findScripts() finds active debugger frame.eval scripts. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + dbg.onDebuggerStatement = function (frame) { + hits++; + assertEq(dbg.findScripts().indexOf(dbg.getNewestFrame().script) !== -1, true); + }; + frame.eval("debugger;"); +}; +g.eval("debugger;"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-18.js b/js/src/jit-test/tests/debug/Debugger-findScripts-18.js new file mode 100644 index 0000000000..ea5ee0d318 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-18.js @@ -0,0 +1,46 @@ +// In a debuggee with multiple scripts with varying displayURLs (aka //# +// sourceURL), findScripts can filter by displayURL. + +var g = newGlobal({newCompartment: true}); + +g.eval("function f(){} //# sourceURL=f.js"); +g.eval("function g(){} //# sourceURL=g.js"); +g.eval("function h(){}"); + +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +var fw = gw.makeDebuggeeValue(g.f); +var ggw = gw.makeDebuggeeValue(g.g); +var hw = gw.makeDebuggeeValue(g.h); + +var fScripts = dbg.findScripts({ displayURL: "f.js" }); +assertEq(fScripts.indexOf(fw.script) != -1, true); +assertEq(fScripts.indexOf(ggw.script), -1); +assertEq(fScripts.indexOf(hw.script), -1); + + +fScripts = dbg.findScripts({ displayURL: "f.js", + line: 1 }); +assertEq(fScripts.indexOf(fw.script) != -1, true); +assertEq(fScripts.indexOf(ggw.script), -1); +assertEq(fScripts.indexOf(hw.script), -1); + +var gScripts = dbg.findScripts({ displayURL: "g.js" }); +assertEq(gScripts.indexOf(ggw.script) != -1, true); +assertEq(gScripts.indexOf(fw.script), -1); +assertEq(gScripts.indexOf(hw.script), -1); + +var allScripts = dbg.findScripts(); +assertEq(allScripts.indexOf(fw.script) != -1, true); +assertEq(allScripts.indexOf(ggw.script) != -1, true); +assertEq(allScripts.indexOf(hw.script) != -1, true); + +try { + dbg.findScripts({ displayURL: 3 }); + // Should never get here because the above line should throw + // JSMSG_UNEXPECTED_TYPE. + assertEq(true, false); +} catch(e) { + assertEq(e.name, "TypeError"); + assertEq(e.message.includes("displayURL"), true); +} diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-19.js b/js/src/jit-test/tests/debug/Debugger-findScripts-19.js new file mode 100644 index 0000000000..46021a0bbc --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-19.js @@ -0,0 +1,5 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +try { g.eval('function drag(ev) {'); } catch (ex) { } +for (s of dbg.findScripts()) + s.lineCount; diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-20.js b/js/src/jit-test/tests/debug/Debugger-findScripts-20.js new file mode 100644 index 0000000000..04c73c0972 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-20.js @@ -0,0 +1,20 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval('function f(){}'); + +var o = gw.makeDebuggeeValue(g.f); + +var allScripts = dbg.findScripts(); +var scripts = dbg.findScripts({ + source: o.script.source +}); +assertEq(scripts.length, allScripts.length); +assertEq(scripts.indexOf(o.script) !== -1, true); + +scripts = dbg.findScripts({ + source: o.script.source, + line: 1 +}); +assertEq(scripts.indexOf(o.script) !== -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-22.js b/js/src/jit-test/tests/debug/Debugger-findScripts-22.js new file mode 100644 index 0000000000..9f2884a325 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-22.js @@ -0,0 +1,8 @@ +// Bug 1239813: Don't let compartments get GC'd while findScripts is holding +// them in its ScriptQuery's hash set. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +dbg.addDebuggee(g); +g = newGlobal({sameZoneAs: g.Math}); +dbg.findScripts({get source() { gc(); return undefined; }}); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-23.js b/js/src/jit-test/tests/debug/Debugger-findScripts-23.js new file mode 100644 index 0000000000..bb45365a69 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-23.js @@ -0,0 +1,21 @@ +// |jit-test| skip-if: isLcovEnabled() + +// If a script is (re)lazified, findScripts should not delazify it. + +var dbg = new Debugger(); + +var g = newGlobal({newCompartment: true}); +g.eval('function f(){}'); +assertEq(g.eval('isLazyFunction(f)'), true); + +dbg.addDebuggee(g); +dbg.findScripts(); +assertEq(g.eval('isLazyFunction(f)'), true); + +dbg.removeAllDebuggees(); +relazifyFunctions(); +assertEq(g.eval('isLazyFunction(f)'), true); + +dbg.addDebuggee(g); +var scripts = dbg.findScripts(); +assertEq(g.eval('isLazyFunction(f)'), true); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-24.js b/js/src/jit-test/tests/debug/Debugger-findScripts-24.js new file mode 100644 index 0000000000..54b37d811f --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-24.js @@ -0,0 +1,35 @@ +// findScripts should reject Debugger.Source objects from other Debuggers. + +load(libdir + 'asserts.js'); + +var g = newGlobal({newCompartment: true}); +g.evaluate(`function f() { print("earth/heart/hater"); }`, + { lineNumber: 1800 }); + +var dbg1 = new Debugger; +var gDO1 = dbg1.addDebuggee(g); +var fDO1 = gDO1.getOwnPropertyDescriptor('f').value; +assertEq(fDO1.script.source instanceof Debugger.Source, true); + +var dbg2 = new Debugger; +var gDO2 = dbg2.addDebuggee(g); +var fDO2 = gDO2.getOwnPropertyDescriptor('f').value; +assertEq(fDO2.script.source instanceof Debugger.Source, true); + +assertEq(fDO1.script.source !== fDO2.script.source, true); + +// findScripts should reject Debugger.Source objects that don't belong to the +// Debugger it's being invoked on. +assertThrowsInstanceOf(() => dbg1.findScripts({ source: fDO2.script.source }), + TypeError); +assertThrowsInstanceOf(() => dbg2.findScripts({ source: fDO1.script.source }), + TypeError); + +// findScripts should reject Debugger.Source.prototype. +assertThrowsInstanceOf(() => dbg1.findScripts({ source: Debugger.Source.prototype }), + TypeError); + +// These should not throw, and should return something, but we're not going to +// be picky about exactly what, given findScript's sensitivity to GC. +dbg1.findScripts({ source: fDO1.script.source }); +dbg2.findScripts({ source: fDO2.script.source }); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-25.js b/js/src/jit-test/tests/debug/Debugger-findScripts-25.js new file mode 100644 index 0000000000..3985b78c53 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-25.js @@ -0,0 +1,14 @@ +// In a debugger with multiple debuggees, findScripts finds scripts across all debuggees. +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var g1w = dbg.addDebuggee(g1); +var g2w = dbg.addDebuggee(g2); + +// Add eval() to make functions non-relazifiable. +g1.eval('function f() { eval(""); }'); +g2.eval('function g() { eval(""); }'); + +var scripts = dbg.findScripts(); +assertEq(scripts.indexOf(g1w.makeDebuggeeValue(g1.f).script) != -1, true); +assertEq(scripts.indexOf(g2w.makeDebuggeeValue(g2.g).script) != -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-26.js b/js/src/jit-test/tests/debug/Debugger-findScripts-26.js new file mode 100644 index 0000000000..1c1510aa4f --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-26.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: !('oomTest' in this) +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval(` +function f() { + function inner() { + var x; + } +} +`); + +let url = thisFilename(); +let line = 4; + +oomTest(() => { dbg.findScripts({url, line}) }); +oomTest(() => { dbg.findScripts({url, line, innermost: true}) }); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-27.js b/js/src/jit-test/tests/debug/Debugger-findScripts-27.js new file mode 100644 index 0000000000..2a6513011b --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-27.js @@ -0,0 +1,22 @@ +// |jit-test| skip-if: isLcovEnabled() +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval(` +function f() { + function inner() { + var x; + } +} +`); + +// GC will collect top-level script of the eval +gc(); +gc(); + +let url = thisFilename(); +let line = 4; + +// Function `f` and `inner` should still match +assertEq(dbg.findScripts({url, line}).length, 2); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-28.js b/js/src/jit-test/tests/debug/Debugger-findScripts-28.js new file mode 100644 index 0000000000..30097bac3d --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-28.js @@ -0,0 +1,26 @@ +// |jit-test| skip-if: isLcovEnabled() +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval(` +function f() { + function inner() { + var x; + } + function asm_mod() { + "use asm"; + function mtd() {} + return { mtd: mtd } + } +} +`); + +gc(); +gc(); + +let url = thisFilename(); +let line = 4; + +// Function `f` and `inner` should still match +assertEq(dbg.findScripts({url, line}).length, 2); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-29.js b/js/src/jit-test/tests/debug/Debugger-findScripts-29.js new file mode 100644 index 0000000000..c0a4d5e604 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-29.js @@ -0,0 +1,21 @@ +// |jit-test| skip-if: isLcovEnabled() + +// If the specified line is the next line after the function, +// the function shouldn't match. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval(` +function f() { +} +`); + +gc(); +gc(); + +let url = thisFilename(); + +assertEq(dbg.findScripts({url, line: 3}).length, 1); +assertEq(dbg.findScripts({url, line: 4}).length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-30.js b/js/src/jit-test/tests/debug/Debugger-findScripts-30.js new file mode 100644 index 0000000000..01b7a624c2 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-30.js @@ -0,0 +1,21 @@ +// |jit-test| skip-if: isLcovEnabled() + +// If the specified line is the next line after the function, +// the function shouldn't match. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval(` +var a = x => x + +1; +`); + +gc(); +gc(); + +let url = thisFilename(); + +assertEq(dbg.findScripts({url, line: 3}).length, 1); +assertEq(dbg.findScripts({url, line: 4}).length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-31.js b/js/src/jit-test/tests/debug/Debugger-findScripts-31.js new file mode 100644 index 0000000000..6be8a2d2fd --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-31.js @@ -0,0 +1,21 @@ +// |jit-test| skip-if: isLcovEnabled() + +// If the specified line is the next line after the function, +// the function shouldn't match. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval(` +var a = x => (x + 1 +); +`); + +gc(); +gc(); + +let url = thisFilename(); + +assertEq(dbg.findScripts({url, line: 3}).length, 1); +assertEq(dbg.findScripts({url, line: 4}).length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-delazify.js b/js/src/jit-test/tests/debug/Debugger-findScripts-delazify.js new file mode 100644 index 0000000000..554b5dd2c8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-delazify.js @@ -0,0 +1,485 @@ +// |jit-test| skip-if: isLcovEnabled() + +// findScript should try to avoid delazifying unnecessarily. + +function newTestcase(code) { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger(); + var gw = dbg.addDebuggee(g); + + var lines = code.split('\n'); + // Returns the line number of the line with "<= line". + // + 1 for 1-origin. + var line = lines.findIndex(x => x.includes("<= line")) + 1; + + g.eval(code); + + // Functions are relazified, and the top-level script is dropped. + relazifyFunctions(); + + return [dbg, g, line]; +} + +var url = thisFilename(); +var dbg, g, line, scripts; + +// If the specified line is inside the function body, only the function should +// be delazified. +[dbg, g, line] = newTestcase(` +function f1() { +} +function f2() { +// <= line +} +function f3() { +} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 1); +assertEq(scripts.map(s => s.displayName).sort().join(","), "f2"); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), false); +assertEq(g.eval(`isLazyFunction(f3)`), true); + +// If the functions starts at the specified line, the function shouldn't be +// the first function to delazify. +[dbg, g, line] = newTestcase(` +function f1() { +} +function f2() { +} +function f3() { // <= line +} +function f4() { +} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 1); +assertEq(scripts.map(s => s.displayName).sort().join(","), "f3"); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +// f2 is delazified because f3 cannot be the first function to delazify. +assertEq(g.eval(`isLazyFunction(f2)`), false); +assertEq(g.eval(`isLazyFunction(f3)`), false); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +// Multiple functions in the specified line, and one of them starts before +// the specified line. +// All functions should be returned, and others shouldn't be delazified. +[dbg, g, line] = newTestcase(` +function f1() {} +function f2() { +} function f3() {} function f4() {} function f5() { // <= line +} +function f6() {} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(f4)`), true); +assertEq(g.eval(`isLazyFunction(f5)`), true); +assertEq(g.eval(`isLazyFunction(f6)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 4); +assertEq(scripts.map(s => s.displayName).sort().join(","), "f2,f3,f4,f5"); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), false); +assertEq(g.eval(`isLazyFunction(f3)`), false); +assertEq(g.eval(`isLazyFunction(f4)`), false); +assertEq(g.eval(`isLazyFunction(f5)`), false); +assertEq(g.eval(`isLazyFunction(f6)`), true); + +// The same rule should apply to inner functions. +[dbg, g, line] = newTestcase(` +function f1() {} +function f2() { + function g1() { + } + function g2() { + function h1() {} + function h2() { + } function h3() {} function h4() {} function h5() { // <= line + } + function h6() {} + + return [h1, h2, h3, h4, h5, h6]; + } + function g3() { + } + + return [g1, g2, g3]; +} +function f3() {} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 6); +assertEq(scripts.map(s => s.displayName).sort().join(","), "f2,g2,h2,h3,h4,h5"); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), false); +assertEq(g.eval(`isLazyFunction(f3)`), true); +g.eval(`var [g1, g2, g3] = f2();`); +assertEq(g.eval(`isLazyFunction(g1)`), true); +assertEq(g.eval(`isLazyFunction(g2)`), false); +assertEq(g.eval(`isLazyFunction(g3)`), true); +g.eval(`var [h1, h2, h3, h4, h5, h6] = g2();`); +assertEq(g.eval(`isLazyFunction(h1)`), true); +assertEq(g.eval(`isLazyFunction(h2)`), false); +assertEq(g.eval(`isLazyFunction(h3)`), false); +assertEq(g.eval(`isLazyFunction(h4)`), false); +assertEq(g.eval(`isLazyFunction(h5)`), false); +assertEq(g.eval(`isLazyFunction(h6)`), true); + +// The same rule should apply to functions inside parameter expression. +[dbg, g, line] = newTestcase(` +function f1( + a = function g1() {}, + b = function g2() { + }, c = function g3() {}, d = function g4() { // <= line + }, + e = function g5() {}, +) { + return [a, b, c, d, e]; +} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 4); +assertEq(scripts.map(s => s.displayName).sort().join(","), "f1,g2,g3,g4"); + +assertEq(g.eval(`isLazyFunction(f1)`), false); + +g.eval(`var [g1, g2, g3, g4, g5] = f1();`); + +assertEq(g.eval(`isLazyFunction(g1)`), true); +assertEq(g.eval(`isLazyFunction(g2)`), false); +assertEq(g.eval(`isLazyFunction(g3)`), false); +assertEq(g.eval(`isLazyFunction(g4)`), false); +assertEq(g.eval(`isLazyFunction(g5)`), true); + +// The same should apply to function inside method with computed property. +[dbg, g, line] = newTestcase(` +var f1, f2, f3; +var O = { + [(f1 = () => 0, "m1")]() { + }, + [(f2 = () => 0, "m2")](p2) { // <= line + }, + [(f3 = () => 0, "m3")]() { + }, +} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(O.m2)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(O.m1)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(O.m3)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 2); +assertEq(scripts.map(s => s.displayName).sort().join(","), "f2,"); +// Use parameterNames because displayName isn't set for computed property. +assertEq(scripts.map(s => `${s.displayName}(${s.parameterNames.join(",")})`) + .sort().join(","), "f2(),undefined(p2)"); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +// m1 is delazified because f2 cannot be the first function to delazify. +assertEq(g.eval(`isLazyFunction(O.m1)`), false); +assertEq(g.eval(`isLazyFunction(f2)`), false); +assertEq(g.eval(`isLazyFunction(O.m2)`), false); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(O.m3)`), true); + +[dbg, g, line] = newTestcase(` +var f1, f2, f3; +var O = { + [(f1 = () => 0, "m1")]() { + }, + [(f2 = () => 0 + + 1, "m2")](p2) { // <= line + }, + [(f3 = () => 0, "m3")]() { + }, +} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(O.m1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(O.m2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(O.m3)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 2); +assertEq(scripts.map(s => `${s.displayName}(${s.parameterNames.join(",")})`) + .sort().join(","), "f2(),undefined(p2)"); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(O.m1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), false); +assertEq(g.eval(`isLazyFunction(O.m2)`), false); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(O.m3)`), true); + +// Class constructor shouldn't be delazified even if methods match. +[dbg, g, line] = newTestcase(` +// Use variable to access across eval. +var C = class { + constructor() { + } + m1() {} + m2() { + } m3() {} m4() { // <= line + } + m5() {} +} +`); + +assertEq(g.eval(`isLazyFunction(C)`), true); +assertEq(g.eval(`isLazyFunction(C.prototype.m1)`), true); +assertEq(g.eval(`isLazyFunction(C.prototype.m2)`), true); +assertEq(g.eval(`isLazyFunction(C.prototype.m3)`), true); +assertEq(g.eval(`isLazyFunction(C.prototype.m4)`), true); +assertEq(g.eval(`isLazyFunction(C.prototype.m5)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 3); +assertEq(scripts.map(s => s.displayName).sort().join(","), "m2,m3,m4"); + +assertEq(g.eval(`isLazyFunction(C)`), true); +assertEq(g.eval(`isLazyFunction(C.prototype.m1)`), true); +assertEq(g.eval(`isLazyFunction(C.prototype.m2)`), false); +assertEq(g.eval(`isLazyFunction(C.prototype.m3)`), false); +assertEq(g.eval(`isLazyFunction(C.prototype.m4)`), false); +assertEq(g.eval(`isLazyFunction(C.prototype.m5)`), true); + +// If the line is placed before sourceStart, the function shouldn't match, +// and the function shouldn't be delazified. +[dbg, g, line] = newTestcase(` +function f1() { +} +function f2() { +} +function +// <= line +f3() { +} +function f4() { +} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 0); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +// f2 is delazified because it's the first function before the specified line. +assertEq(g.eval(`isLazyFunction(f2)`), false); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +[dbg, g, line] = newTestcase(` +function f1() { +} +function f2() { +} +function f3 +// <= line +() { +} +function f4() { +} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 0); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +// f2 is delazified because it's the first function before the specified line. +assertEq(g.eval(`isLazyFunction(f2)`), false); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +[dbg, g, line] = newTestcase(` +function f1() { +} +function f2() { +} +function f3 +( // <= line +) { +} +function f4() { +} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 1); +assertEq(scripts.map(s => s.displayName).sort().join(","), "f3"); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +// f2 is delazified because it's the first function _before_ the specified line. +assertEq(g.eval(`isLazyFunction(f2)`), false); +assertEq(g.eval(`isLazyFunction(f3)`), false); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +[dbg, g, line] = newTestcase(` +function f1() { +} +function f2() { +} +function f3 +( +// <= line +) { +} +function f4() { +} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 1); +assertEq(scripts.map(s => s.displayName).sort().join(","), "f3"); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), false); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +// If the specified line is the next line after the function ends, +// nothing should match, but the function should be delazified. +[dbg, g, line] = newTestcase(` +function f1() { +} +function f2() { +} +// <= line +function f3() { +} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 0); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), false); +assertEq(g.eval(`isLazyFunction(f3)`), true); + +// The matching non-lazy script should prevent the previous function's +// delazification. +[dbg, g, line] = newTestcase(` +function f1() { +} +function f2() { +} +function f3() { + // <= line +} +function f4() { +} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +// Delazify f3. +g.eval(`f3()`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), false); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 1); +assertEq(scripts.map(s => s.displayName).sort().join(","), "f3"); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), false); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +// The non-matching non-lazy script should prevent the previous function's +// delazification. +[dbg, g, line] = newTestcase(` +function f1() { +} +function f2() { +} +function f3() { +} +// <= line +function f4() { +} +`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), true); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +// Delazify f3. +g.eval(`f3()`); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), false); +assertEq(g.eval(`isLazyFunction(f4)`), true); + +scripts = dbg.findScripts({url, line}); +assertEq(scripts.length, 0); + +assertEq(g.eval(`isLazyFunction(f1)`), true); +assertEq(g.eval(`isLazyFunction(f2)`), true); +assertEq(g.eval(`isLazyFunction(f3)`), false); +assertEq(g.eval(`isLazyFunction(f4)`), true); diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-ghost.js b/js/src/jit-test/tests/debug/Debugger-findScripts-ghost.js new file mode 100644 index 0000000000..c20e5ac1cc --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-ghost.js @@ -0,0 +1,37 @@ +// |jit-test| skip-if: isLcovEnabled() + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval(` +function f( + a = ( + b = ( + c = function g() { + }, + ) => { + }, + d = ( + e = ( + f = ( + ) => { + }, + ) => { + }, + ) => { + }, + ) => { + }, +) { +} +`); + +// Debugger shouldn't find ghost functions. +var allScripts = dbg.findScripts(); +assertEq(allScripts.filter(s => s.startLine == 2).length, 1); // function f +assertEq(allScripts.filter(s => s.startLine == 3).length, 1); // a = ... +assertEq(allScripts.filter(s => s.startLine == 4).length, 1); // b = ... +assertEq(allScripts.filter(s => s.startLine == 5).length, 1); // function g +assertEq(allScripts.filter(s => s.startLine == 9).length, 1); // d = ... +assertEq(allScripts.filter(s => s.startLine == 10).length, 1); // e = ... +assertEq(allScripts.filter(s => s.startLine == 11).length, 1); // f = ... diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-optimized-out.js b/js/src/jit-test/tests/debug/Debugger-findScripts-optimized-out.js new file mode 100644 index 0000000000..1c38bbbf4e --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-optimized-out.js @@ -0,0 +1,31 @@ +// Accessing Debugger.Script's properties which triggers delazification can +// fail if the function for the script is optimized out. +// It shouldn't crash but just throw an error. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +g.eval(` +function enclosing() { + (function g1() {}); + (function* g2() {}); + (async function g3() {}); + (async function* g4() {}); + () => {}; + async () => {}; +} +`); + +for (const s of dbg.findScripts()) { + if (!s.displayName) { + continue; + } + + try { + s.lineCount; // don't assert + } catch (exc) { + // If that didn't throw, it's fine. If it did, check the message. + assertEq(exc.message, "function is optimized out"); + } +} diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-uncompleted-01.js b/js/src/jit-test/tests/debug/Debugger-findScripts-uncompleted-01.js new file mode 100644 index 0000000000..4a7e9139ce --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-uncompleted-01.js @@ -0,0 +1,54 @@ +// |jit-test| skip-if: isLcovEnabled() + +// Uncompleted scripts and their inner scripts shouldn't be found in +// findScripts. + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +let message = ""; +try { + g.eval(` +(function nonLazyOuter() { + (function nonLazyInner() { + function lazy1() { + function lazy2() { + } + } + })(); +})(); + +(function uncompletedNonLazy() { + function lazyInUncompleted1() { + function lazyInUncompleted2() { + } + } + // LazyScripts for above 2 functions are created when parsing, + // and JSScript for uncompletedNonLazy is created at the beginning of + // compiling it, but it doesn't get code() since the following switch-case + // throws error while emitting bytecode. + switch (1) { + ${"case 1:".repeat(2**16+1)} + } +})(); +`); +} catch (e) { + message = e.message; +} + +assertEq(message.includes("too many switch cases"), true, + "Error for switch-case should be thrown," + + "in order to test the case that uncompleted script is created"); + +for (var script of dbg.findScripts()) { + // Since all of above scripts can be GCed, we cannot check the set of + // found scripts. + if (script.displayName) { + assertEq(script.displayName != "uncompletedNonLazy", true, + "Uncompiled script shouldn't be found"); + assertEq(script.displayName != "lazyInUncompleted1", true, + "Scripts inside uncompiled script shouldn't be found"); + assertEq(script.displayName != "lazyInUncompleted2", true, + "Scripts inside uncompiled script shouldn't be found"); + } +} diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-uncompleted-02.js b/js/src/jit-test/tests/debug/Debugger-findScripts-uncompleted-02.js new file mode 100644 index 0000000000..c1201a5c6f --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-uncompleted-02.js @@ -0,0 +1,49 @@ +// Uncompleted scripts shouldn't be found in findScripts. + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +let message = ""; +try { + g.eval(` +(function nonLazyOuter() { + (function nonLazyInner() { + function lazy1() { + function lazy2() { + } + } + })(); +})(); + +(function uncompletedNonLazy() { + (function completedNonLazy() { + function lazyInCompleted1() { + function lazyInCompleted2() { + } + } + })(); + // completedNonLazy and its inner scripts can be exposed to debugger since + // the compilation for completedNonLazy finishes, even if the enclosing + // uncompletedNonLazy fails to compile. + switch (1) { + ${"case 1:".repeat(2**16+1)} + } +})(); +`); +} catch (e) { + message = e.message; +} + +assertEq(message.includes("too many switch cases"), true, + "Error for switch-case should be thrown," + + "in order to test the case that uncompleted script is created"); + +let actualNames = []; +for (var script of dbg.findScripts()) { + // Since all of above scripts can be GCed, we cannot check the set of + // found scripts. + if (script.displayName) { + assertEq(script.displayName != "uncompletedNonLazy", true, + "Uncompiled script shouldn't be found"); + } +} diff --git a/js/src/jit-test/tests/debug/Debugger-findSourceURLs.js b/js/src/jit-test/tests/debug/Debugger-findSourceURLs.js new file mode 100644 index 0000000000..d00ade6325 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findSourceURLs.js @@ -0,0 +1,18 @@ +// findSourceURLs should return all URLs compiled in debuggee realms, +// except when a shrinking GC has occurred. + +let g = newGlobal({newCompartment: true}); +let startNumber = gcparam("gcNumber"); +g.evaluate("function foo() {}", { fileName: "foo.js" }); +g.evaluate("function bar() {}", { fileName: "bar.js" }); +g.evaluate("function baz() {}", { fileName: "baz.js" }); + +let dbg = new Debugger(g); +let urls = dbg.findSourceURLs(); + +let endNumber = gcparam("gcNumber"); +if (startNumber == endNumber) { + assertEq(urls.includes("foo.js"), true); + assertEq(urls.includes("bar.js"), true); + assertEq(urls.includes("baz.js"), true); +} diff --git a/js/src/jit-test/tests/debug/Debugger-findSources-01.js b/js/src/jit-test/tests/debug/Debugger-findSources-01.js new file mode 100644 index 0000000000..4cac711e52 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findSources-01.js @@ -0,0 +1,4 @@ +// In a debugger with no debuggees, findSources should return no scripts. + +const dbg = new Debugger; +assertEq(dbg.findSources().length, 0); diff --git a/js/src/jit-test/tests/debug/Debugger-findSources-02.js b/js/src/jit-test/tests/debug/Debugger-findSources-02.js new file mode 100644 index 0000000000..532d39da12 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findSources-02.js @@ -0,0 +1,15 @@ +// In a debugger with scripts, findSources finds the script source. + +const g = newGlobal({newCompartment: true}); +// Declare a function in order to keep the script source alive across GC. +g.evaluate(`function fa() {}`, { fileName: "a.js" }); +g.evaluate(`function fb() {}`, { fileName: "b.js" }); +g.evaluate(`function fc() {}`, { fileName: "c.js" }); + +const dbg = new Debugger(); +const gw = dbg.addDebuggee(g); + +const sources = dbg.findSources(); +assertEq(sources.filter(s => s.url == "a.js").length, 1); +assertEq(sources.filter(s => s.url == "b.js").length, 1); +assertEq(sources.filter(s => s.url == "c.js").length, 1); diff --git a/js/src/jit-test/tests/debug/Debugger-findSources-03.js b/js/src/jit-test/tests/debug/Debugger-findSources-03.js new file mode 100644 index 0000000000..9cda3a432a --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findSources-03.js @@ -0,0 +1,19 @@ +// In a debugger with multiple debuggees, findSources finds script sources across all debuggees. + +const g1 = newGlobal({newCompartment: true}); +const g2 = newGlobal({newCompartment: true}); +// Declare a function in order to keep the script source alive across GC. +g1.evaluate(`function fa() {}`, { fileName: "a.js" }); +g1.evaluate(`function fb() {}`, { fileName: "b.js" }); +g2.evaluate(`function fc() {}`, { fileName: "c.js" }); +g2.evaluate(`function fd() {}`, { fileName: "d.js" }); + +const dbg = new Debugger(); +const g1w = dbg.addDebuggee(g1); +const g2w = dbg.addDebuggee(g2); + +const sources = dbg.findSources(); +assertEq(dbg.findSources().filter(s => s.url == "a.js").length, 1); +assertEq(dbg.findSources().filter(s => s.url == "b.js").length, 1); +assertEq(dbg.findSources().filter(s => s.url == "c.js").length, 1); +assertEq(dbg.findSources().filter(s => s.url == "d.js").length, 1); diff --git a/js/src/jit-test/tests/debug/Debugger-getNewestFrame-01.js b/js/src/jit-test/tests/debug/Debugger-getNewestFrame-01.js new file mode 100644 index 0000000000..b1cd194a53 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-getNewestFrame-01.js @@ -0,0 +1,20 @@ +// getNewestFrame basics. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +assertEq(dbg.getNewestFrame(), null); + +var global = this; +var frame; +function f() { + frame = dbg.getNewestFrame(); + assertEq(frame instanceof Debugger.Frame, true); + assertEq(frame.type, "eval"); + assertEq(frame.older, null); +} +g.h = this; +g.eval("h.f()"); +assertEq(frame.onStack, false); +assertThrowsInstanceOf(function () { frame.older; }, Error); diff --git a/js/src/jit-test/tests/debug/Debugger-getNewestFrame-02.js b/js/src/jit-test/tests/debug/Debugger-getNewestFrame-02.js new file mode 100644 index 0000000000..799159af32 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-getNewestFrame-02.js @@ -0,0 +1,20 @@ +// Hooks and Debugger.prototype.getNewestFrame produce the same Frame object. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +var savedFrame, savedCallee; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame, savedFrame); + assertEq(frame.onStack, true); + assertEq(frame.callee, savedCallee); + hits++; +}; +g.h = function () { + savedFrame = dbg.getNewestFrame(); + savedCallee = savedFrame.callee; + assertEq(savedCallee.name, "f"); +}; +g.eval("function f() { h(); debugger; }"); +g.f(); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Debugger-getNewestFrame-03.js b/js/src/jit-test/tests/debug/Debugger-getNewestFrame-03.js new file mode 100644 index 0000000000..b9396e2f92 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-getNewestFrame-03.js @@ -0,0 +1,9 @@ +// Debugger.prototype.getNewestFrame() ignores dummy frames. +// See bug 678086. + +var g = newGlobal({newCompartment: true}); +g.f = function () { return dbg.getNewestFrame(); }; +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var fw = gw.getOwnPropertyDescriptor("f").value; +assertEq(fw.call().return, null); diff --git a/js/src/jit-test/tests/debug/Debugger-getNewestFrame-generators-01.js b/js/src/jit-test/tests/debug/Debugger-getNewestFrame-generators-01.js new file mode 100644 index 0000000000..908bd4f2f3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-getNewestFrame-generators-01.js @@ -0,0 +1,49 @@ +// Generator/async frames can be created and revived by calling Debugger.getNewestFrame(). +// +// Modified copy of Frame-older-generators-01.js. + +let g = newGlobal({newCompartment: true}); +g.eval(` + function* gen() { + f(); + yield 1; + f(); + } + function* genDefaults(x=f()) { + f(); + } + async function af() { + f(); + await 1; + f(); + } + async function afDefaults(x=f()) { + await 1; + f(); + } +`); + +function test(expected, code) { + let dbg = Debugger(g); + let hits = 0; + let genFrame = null; + g.f = () => { + hits++; + let frame = dbg.getNewestFrame(); + if (genFrame === null) { + genFrame = frame; + } else { + assertEq(frame, genFrame); + } + assertEq(genFrame.callee.name, expected); + } + + g.eval(code); + assertEq(hits, 2); + dbg.removeDebuggee(g); +} + +test("gen", "for (var x of gen()) {}"); +test("genDefaults", "for (var x of genDefaults()) {}"); +test("af", "af(); drainJobQueue();"); +test("afDefaults", "afDefaults(); drainJobQueue();") diff --git a/js/src/jit-test/tests/debug/Debugger-isCompilableUnit.js b/js/src/jit-test/tests/debug/Debugger-isCompilableUnit.js new file mode 100644 index 0000000000..dbfde0ef46 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-isCompilableUnit.js @@ -0,0 +1,58 @@ +load(libdir + "asserts.js"); + +const bad_types = [ + 2112, + {geddy: "lee"}, + () => 1, + [], + Array +] + +// We only accept strings around here! +for (var badType of bad_types) { + assertThrowsInstanceOf(() => { + Debugger.isCompilableUnit(badType); + }, TypeError); +} + +const compilable_units = [ + "wubba-lubba-dub-dub", + "'Get Schwifty!'", + "1 + 2", + "function f(x) {}", + "function x(...f,) {", // statements with bad syntax are always compilable + "let x = 100", + ";;;;;;;;", + "", + " ", + "\n", + "let x", +] + +const non_compilable_units = [ + "function f(x) {", + "(...d) =>", + "{geddy:", + "{", + "[1, 2", + "[", + "1 +", + "let x =", + "3 ==", +] + +for (var code of compilable_units) { + assertEq(Debugger.isCompilableUnit(code), true); +} + +for (var code of non_compilable_units) { + assertEq(Debugger.isCompilableUnit(code), false); +} + +// Supplying no arguments should throw a type error +assertThrowsInstanceOf(() => { + Debugger.isCompilableUnit(); +}, TypeError); + +// Supplying extra arguments should be fine +assertEq(Debugger.isCompilableUnit("", 1, 2, 3, 4, {}, []), true); diff --git a/js/src/jit-test/tests/debug/Debugger-multi-01.js b/js/src/jit-test/tests/debug/Debugger-multi-01.js new file mode 100644 index 0000000000..c986accdbb --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-multi-01.js @@ -0,0 +1,31 @@ +// When there are multiple debuggers, their hooks are called in order. + +var g = newGlobal({newCompartment: true}); +var log; +var arr = []; + +function addDebug(msg) { + var dbg = new Debugger(g); + dbg.onDebuggerStatement = function (stack) { log += msg; }; + arr.push(dbg); +} + +addDebug('a'); +addDebug('b'); +addDebug('c'); + +log = ''; +assertEq(g.eval("debugger; 0;"), 0); +assertEq(log, 'abc'); + +// Calling debugger hooks continues, even if one returns a resumption value +// other than undefined. + +arr[0].onDebuggerStatement = function (stack) { + log += 'a'; + return {return: 1}; +}; + +log = ''; +assertEq(g.eval("debugger; 0;"), 1); +assertEq(log, 'abc'); diff --git a/js/src/jit-test/tests/debug/Debugger-multi-02.js b/js/src/jit-test/tests/debug/Debugger-multi-02.js new file mode 100644 index 0000000000..bff152b0df --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-multi-02.js @@ -0,0 +1,32 @@ +// Test adding hooks during dispatch. The behavior is deterministic and "nice", +// but mainly what we are checking here is that we do not crash due to +// modifying a data structure while we're iterating over it. + +var g = newGlobal({newCompartment: true}); +var n = 0; +var hits; + +function addDebugger() { + var dbg = new Debugger(g); + dbg.onDebuggerStatement = function (stack) { + hits++; + addDebugger(); + }; +} + +addDebugger(); // now there is one enabled Debugger +hits = 0; +g.eval("debugger;"); // after this there are two +assertEq(hits, 1); + +hits = 0; +g.eval("debugger;"); // after this there are four +assertEq(hits, 2); + +hits = 0; +g.eval("debugger;"); // after this there are eight +assertEq(hits, 4); + +hits = 0; +g.eval("debugger;"); +assertEq(hits, 8); diff --git a/js/src/jit-test/tests/debug/Debugger-multi-03.js b/js/src/jit-test/tests/debug/Debugger-multi-03.js new file mode 100644 index 0000000000..cd89fdead1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-multi-03.js @@ -0,0 +1,21 @@ +// Q: But who shall debug the debuggers? A: jimb + +var log = ''; + +function addDebug(g, id) { + var debuggerGlobal = newGlobal({newCompartment: true}); + debuggerGlobal.debuggee = g; + debuggerGlobal.id = id; + debuggerGlobal.print = function (s) { log += s; }; + debuggerGlobal.eval( + 'var dbg = new Debugger(debuggee);\n' + + 'dbg.onDebuggerStatement = function () { print(id); debugger; print(id); };\n'); + return debuggerGlobal; +} + +var base = newGlobal({newCompartment: true}); +var top = base; +for (var i = 0; i < 8; i++) // why have 2 debuggers when you can have 8 + top = addDebug(top, i); +base.eval("debugger;"); +assertEq(log, '0123456776543210'); diff --git a/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-01.js b/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-01.js new file mode 100644 index 0000000000..b2f0b779cf --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-01.js @@ -0,0 +1,45 @@ +// If debugger.onEnterFrame returns {return:val}, the frame returns. + +var g = newGlobal({newCompartment: true}); +g.set = false; +g.eval("function f() {\n" + + " set = true;\n" + + " return 'fail';\n" + + "}\n"); +g.eval("function g() { return 'g ' + f(); }"); +g.eval("function h() { return 'h ' + g(); }"); + +var dbg = Debugger(g); +var savedFrame; +dbg.onEnterFrame = function (frame) { + savedFrame = frame; + return {return: "pass"}; +}; + +// Call g.f as a function. +savedFrame = undefined; +assertEq(g.f(), "pass"); +assertEq(savedFrame.onStack, false); +assertEq(g.set, false); + +// Call g.f as a constructor. +savedFrame = undefined; +var r = new g.f; +assertEq(typeof r, "object"); +assertEq(savedFrame.onStack, false); +assertEq(g.set, false); + +var count = 0; +dbg.onEnterFrame = function (frame) { + count++; + if (count == 3) { + savedFrame = frame; + return {return: "pass"}; + } + return undefined; +}; +g.set = false; +savedFrame = undefined; +assertEq(g.h(), "h g pass"); +assertEq(savedFrame.onStack, false); +assertEq(g.set, false); diff --git a/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-02.js b/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-02.js new file mode 100644 index 0000000000..9a8778b9cc --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-02.js @@ -0,0 +1,28 @@ +// If debugger.onEnterFrame returns {throw:val}, an exception is thrown in the debuggee. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +g.set = false; +g.eval("function f() {\n" + + " set = true;\n" + + " return 'fail';\n" + + "}\n"); + +var dbg = Debugger(g); +var savedFrame; +dbg.onEnterFrame = function (frame) { + savedFrame = frame; + return {throw: "pass"}; +}; + +savedFrame = undefined; +assertThrowsValue(g.f, "pass"); +assertEq(savedFrame.onStack, false); +assertEq(g.set, false); + +savedFrame = undefined; +assertThrowsValue(function () { new g.f; }, "pass"); +assertEq(savedFrame.onStack, false); +assertEq(g.set, false); + diff --git a/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-03.js b/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-03.js new file mode 100644 index 0000000000..0da20925b0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-03.js @@ -0,0 +1,26 @@ +// If debugger.onEnterFrame returns null, the debuggee is terminated immediately. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +g.set = false; + +var dbg = Debugger(g); +var savedFrame; +dbg.onDebuggerStatement = function (frame) { + var innerSavedFrame; + dbg.onEnterFrame = function (frame) { + innerSavedFrame = frame; + return null; + }; + // Using frame.eval lets us catch termination. + assertEq(frame.eval("set = true;"), null); + assertEq(innerSavedFrame.onStack, false); + savedFrame = frame; + return { return: "pass" }; +}; + +savedFrame = undefined; +assertEq(g.eval("debugger;"), "pass"); +assertEq(savedFrame.onStack, false); +assertEq(g.set, false); diff --git a/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-04.js b/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-04.js new file mode 100644 index 0000000000..fae18adff7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-04.js @@ -0,0 +1,16 @@ +// If debugger.onEnterFrame returns undefined, the frame should continue execution. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +var savedFrame; +dbg.onEnterFrame = function (frame) { + hits++; + savedFrame = frame; + return undefined; +}; + +savedFrame = undefined; +assertEq(g.eval("'pass';"), "pass"); +assertEq(savedFrame.onStack, false); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-05.js b/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-05.js new file mode 100644 index 0000000000..8885aa0d80 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-05.js @@ -0,0 +1,98 @@ +// Exercise the call to ScriptDebugPrologue in js_InternalInterpret. + +// This may change, but as of this writing, inline caches (ICs) are +// disabled in debug mode, and those are the only users of the out-of-line entry +// points for JIT code (arityCheckEntry, argsCheckEntry, fastEntry); debug +// mode uses only invokeEntry. This means most of the bytecode tails in +// js_InternalInterpret that might call ScriptPrologue or ScriptEpilogue are +// unreachable in debug mode: they're only called from the out-of-line entry +// points. +// +// The exception is REJOIN_THIS_PROTOTYPE, which can be reached reliably if you +// add a JS_GC call to stubs::GetPropNoCache. JIT code calls that stub to +// retrieve the 'prototype' property of a function called as a constructor, if +// TI can't establish the exact identity of that prototype's value at compile +// time. Thus the preoccupation with constructors here. + +load(libdir + "asserts.js"); + +var debuggee = newGlobal({newCompartment: true}); +var dbg = Debugger(debuggee); +var hits, savedFrame; + +// Allow the constructor to return normally. +dbg.onEnterFrame = function (frame) { + hits++; + if (frame.constructing) { + savedFrame = frame; + assertEq(savedFrame.onStack, true); + return undefined; + } + return undefined; +}; +hits = 0; +debuggee.hits = 0; +savedFrame = undefined; +assertEq(typeof debuggee.eval("function f(){ hits++; } f.prototype = {}; new f;"), "object"); +assertEq(hits, 2); +assertEq(savedFrame.onStack, false); +assertEq(debuggee.hits, 1); + +// Force an early return from the constructor. +dbg.onEnterFrame = function (frame) { + hits++; + if (frame.constructing) { + savedFrame = frame; + assertEq(savedFrame.onStack, true); + return { return: "pass" }; + } + return undefined; +}; +hits = 0; +debuggee.hits = 0; +savedFrame = undefined; +assertEq(typeof debuggee.eval("function f(){ hits++; } f.prototype = {}; new f;"), "object"); +assertEq(hits, 2); +assertEq(savedFrame.onStack, false); +assertEq(debuggee.hits, 0); + +// Force the constructor to throw an exception. +dbg.onEnterFrame = function (frame) { + hits++; + if (frame.constructing) { + savedFrame = frame; + assertEq(savedFrame.onStack, true); + return { throw: "pass" }; + } + return undefined; +}; +hits = 0; +debuggee.hits = 0; +savedFrame = undefined; +assertThrowsValue(function () { + debuggee.eval("function f(){ hits++ } f.prototype = {}; new f;"); + }, "pass"); +assertEq(hits, 2); +assertEq(savedFrame.onStack, false); +assertEq(debuggee.hits, 0); + +// Ensure that forcing an early return only returns from one JS call. +debuggee.eval("function g() { var result = new f; g_hits++; return result; }"); +dbg.onEnterFrame = function (frame) { + hits++; + if (frame.constructing) { + savedFrame = frame; + assertEq(savedFrame.onStack, true); + return { return: "pass" }; + } + return undefined; +}; +hits = 0; +debuggee.hits = 0; +debuggee.g_hits = 0; +savedFrame = undefined; +assertEq(typeof debuggee.eval("g();"), "object"); +assertEq(hits, 3); +assertEq(savedFrame.onStack, false); +assertEq(debuggee.hits, 0); +assertEq(debuggee.g_hits, 1); diff --git a/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-06.js b/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-06.js new file mode 100644 index 0000000000..c515475e9d --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-06.js @@ -0,0 +1,31 @@ +// |jit-test| error:all-jobs-completed-successfully +// Verifiy that onEnterFrame's force-return queues the promise microtask +// to run in the debuggee's job queue, not the debugger's +// AutoDebuggerJobQueueInterruption. + +let g = newGlobal({ newCompartment: true }); +g.eval(` + async function asyncFn(x) { + await Promise.resolve(); + } + function enterDebuggee(){} +`); +const dbg = new Debugger(g); + +(async function() { + let it = g.asyncFn(); + + // Force-return when the await resumes. + dbg.onEnterFrame = () => { + dbg.onEnterFrame = undefined; + return { return: "exit" }; + }; + + const result = await it; + assertEq(result, "exit"); + // If execution here is resumed from the debugger's queue, this call will + // trigger DebuggeeWouldRun exception. + g.enterDebuggee(); + + throw "all-jobs-completed-successfully"; +})(); diff --git a/js/src/jit-test/tests/debug/Debugger-onNativeCall-01.js b/js/src/jit-test/tests/debug/Debugger-onNativeCall-01.js new file mode 100644 index 0000000000..d21b6d1e5f --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNativeCall-01.js @@ -0,0 +1,74 @@ +// Test that the onNativeCall hook is called when expected. + +load(libdir + 'eqArrayHelper.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var gdbg = dbg.addDebuggee(g); + +g.eval(` +const x = []; +Object.defineProperty(x, "a", { + get: print, + set: print, +}); +function f() { + x.a++; + x.push(4); +} +`); + +for (let i = 0; i < 5; i++) { + g.f(); +} + +const rv = []; +dbg.onNativeCall = (callee, reason) => { rv.push(callee.name, reason); }; + +var dbg2 = Debugger(g); +var gdbg2 = dbg2.addDebuggee(g); + +const fscript = gdbg.getOwnPropertyDescriptor('f').value.script; + +for (let i = 0; i < 5; i++) { + // The onNativeCall hook is called when doing global evaluations. + rv.length = 0; + gdbg.executeInGlobal(`f()`); + assertEqArray(rv, ["print", "get", "print", "set", "push", "call"]); + + // The onNativeCall hook is called when doing frame evaluations. + let handlerCalled = false; + const handler = { + hit(frame) { + fscript.clearBreakpoint(handler); + rv.length = 0; + frame.eval(`f()`); + assertEqArray(rv, ["print", "get", "print", "set", "push", "call"]); + handlerCalled = true; + }, + }; + fscript.setBreakpoint(fscript.mainOffset, handler); + g.f(); + assertEq(handlerCalled, true); + + // The onNativeCall hook is also called when not in a debugger evaluation. + rv.length = 0; + g.f(); + assertEqArray(rv, ["print", "get", "print", "set", "push", "call"]); + + // The onNativeCall hook is *not* called when in a debugger evaluation + // associated with a different debugger using exclusiveDebuggerOnEval. + rv.length = 0; + dbg2.exclusiveDebuggerOnEval = true; + assertEq(dbg2.exclusiveDebuggerOnEval, true); + gdbg2.executeInGlobal(`f()`); + assertEqArray(rv, []); + + // The onNativeCall hook is called when that same distinct debugger + // doesn't have the exclusiveDebuggerOnEval flag set to true + rv.length = 0; + dbg2.exclusiveDebuggerOnEval = false; + assertEq(dbg2.exclusiveDebuggerOnEval, false); + gdbg2.executeInGlobal(`f()`); + assertEqArray(rv, ["print", "get", "print", "set", "push", "call"]); +} diff --git a/js/src/jit-test/tests/debug/Debugger-onNativeCall-02.js b/js/src/jit-test/tests/debug/Debugger-onNativeCall-02.js new file mode 100644 index 0000000000..9e372d179a --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNativeCall-02.js @@ -0,0 +1,61 @@ +// Test that the onNativeCall hook can control the call's behavior. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var gdbg = dbg.addDebuggee(g); + +g.eval(` +var x = []; +Object.defineProperty(x, "a", { + get: print, + set: print, +}); +var rv; +function f() { + x.a++; + try { + rv = x.push(4); + } catch (e) { + throw "rethrowing"; + } +} +`); + +for (let i = 0; i < 5; i++) { + g.f(); +} + +for (let i = 0; i < 5; i++) { + // Test terminating execution. + dbg.onNativeCall = (callee, reason) => { + return null; + }; + const len = g.x.length; + let v = gdbg.executeInGlobal(`f()`); + assertEq(v, null); + assertEq(g.x.length, len); + + // Test throwing an exception. + dbg.onNativeCall = (callee, reason) => { + return { throw: "throwing" }; + }; + v = gdbg.executeInGlobal(`f()`); + assertEq(v.throw, "throwing"); + + // Test throwing an exception #2. + dbg.onNativeCall = (callee, reason) => { + if (callee.name == "push") { + return { throw: "throwing" }; + } + }; + v = gdbg.executeInGlobal(`f()`); + assertEq(v.throw, "rethrowing"); + + // Test returning a different value from the native. + dbg.onNativeCall = (callee, reason) => { + return { return: "value" }; + }; + v = gdbg.executeInGlobal(`f()`); + assertEq(v.return, undefined); + assertEq(g.rv, "value"); +} diff --git a/js/src/jit-test/tests/debug/Debugger-onNativeCall-03.js b/js/src/jit-test/tests/debug/Debugger-onNativeCall-03.js new file mode 100644 index 0000000000..7e9c0b280a --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNativeCall-03.js @@ -0,0 +1,30 @@ +// Test onNativeCall's behavior when used with self-hosted functions. + +load(libdir + 'eqArrayHelper.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var gdbg = dbg.addDebuggee(g); + +const rv = []; + +dbg.onEnterFrame = f => { + rv.push("EnterFrame"); +}; + +dbg.onNativeCall = f => { + rv.push(f.displayName); +}; + +gdbg.executeInGlobal(` + var x = [1,3,2]; + x.sort((a, b) => {print(a)}); +`); + +assertEqArray(rv, [ + "EnterFrame", "sort", + "ArraySortCompare/<", + "EnterFrame", "print", + "ArraySortCompare/<", + "EnterFrame", "print", +]); diff --git a/js/src/jit-test/tests/debug/Debugger-onNativeCall-04.js b/js/src/jit-test/tests/debug/Debugger-onNativeCall-04.js new file mode 100644 index 0000000000..d3ee1377bf --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNativeCall-04.js @@ -0,0 +1,26 @@ +// Test that onNativeCall behaves correctly when a debugger eval might enter the +// JIT via OSR. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var gdbg = dbg.addDebuggee(g); + +g.eval(` +const x = []; +function f() { + for (let i = 0; i < 5; i++) { + x.push(i); + } +} +`); + +let numCalls = 0; +dbg.onNativeCall = callee => { assertEq(callee.name, "push"); numCalls++; }; + +var dbg2 = Debugger(g); + +for (let i = 0; i < 5; i++) { + numCalls = 0; + gdbg.executeInGlobal(`f()`); + assertEq(numCalls, 5); +} diff --git a/js/src/jit-test/tests/debug/Debugger-onNativeCall-05.js b/js/src/jit-test/tests/debug/Debugger-onNativeCall-05.js new file mode 100644 index 0000000000..0b66cd666d --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNativeCall-05.js @@ -0,0 +1,26 @@ +// Test that the onNativeCall hook cannot return a primitive value. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var gdbg = dbg.addDebuggee(g); + +// Returning the callee accidentally is a common mistake when implementing C++ +// methods, but the debugger should not trip any checks if it does this on +// purpose. +dbg.onNativeCall = (callee, reason) => { + return {return: callee}; +}; +v = gdbg.executeInGlobal("new Object") +assertEq(v.return, gdbg.makeDebuggeeValue(g.Object)); + +// Returning a primitive should cause the hook to throw. +dbg.onNativeCall = (callee, reason) => { + return {return: "primitive"}; +}; +v = gdbg.executeInGlobal("new Object") +assertEq(v.throw.proto, gdbg.makeDebuggeeValue(g.Error.prototype)) + +// A no-op hook shouldn't break any checks. +dbg.onNativeCall = (callee, reason) => { }; +v = gdbg.executeInGlobal("new Object") +assertEq("return" in v, true); diff --git a/js/src/jit-test/tests/debug/Debugger-onNativeCall-06.js b/js/src/jit-test/tests/debug/Debugger-onNativeCall-06.js new file mode 100644 index 0000000000..94e3eb4d74 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNativeCall-06.js @@ -0,0 +1,70 @@ +// Test that the onNativeCall hook is called when native function is +// called inside self-hosted JS. + +load(libdir + 'eqArrayHelper.js'); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(); +var gdbg = dbg.addDebuggee(g); + +let rv = []; +dbg.onNativeCall = (callee, reason) => { + rv.push(callee.name); +}; + +gdbg.executeInGlobal(` +// Built-in native function. +[1, 2, 3].map(Array.prototype.push, Array.prototype); + +// Self-hosted function. +[1, 2, 3].map(String.prototype.padStart, ""); + +// Other native function. +[1, 2, 3].map(dateNow); + +// Self-hosted function called internally. +"abc".match(/a./); +`); +assertEqArray(rv, [ + "map", "get [Symbol.species]", "push", "push", "push", + "map", "get [Symbol.species]", "padStart", "padStart", "padStart", + "map", "get [Symbol.species]", "dateNow", "dateNow", "dateNow", + "match", "[Symbol.match]", +]); + +rv = []; +gdbg.executeInGlobal(` +// Nested getters called internally inside self-hosted. +const r = /a./; +r.foo = 10; +"abc".match(r); + +// Setter inside self-hosted JS. +// Hook "A.length = k" in Array.from. +var ctor = function() { + let obj = {}; + Object.defineProperty(obj, "length", { set: Array.prototype.join }); + return obj; +}; +var a = [1, 2, 3]; +a[Symbol.iterator] = null; +void Array.from.call(ctor, a); +`); +assertEqArray(rv, [ + "match", "[Symbol.match]", + "get flags", + "get hasIndices", "get global", "get ignoreCase", "get multiline", + "get dotAll", "get unicode", "get unicodeSets", "get sticky", + "call", "from", "defineProperty", "join", +]); + +rv = []; +gdbg.executeInGlobal(` +var origExec = RegExp.prototype.exec; +RegExp.prototype.exec = dateNow; +try { + (/a.b/).test("abc"); +} catch (e) {} // Throws not-object-or-null. +RegExp.prototype.exec = origExec; +`); +assertEqArray(rv, ["test", "dateNow"]); diff --git a/js/src/jit-test/tests/debug/Debugger-onNativeCall-07.js b/js/src/jit-test/tests/debug/Debugger-onNativeCall-07.js new file mode 100644 index 0000000000..6b41158436 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNativeCall-07.js @@ -0,0 +1,33 @@ +// Test that the onNativeCall hook is called when native function is +// called inside self-hosted JS with Function.prototype.{call,apply}. + +load(libdir + 'eqArrayHelper.js'); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(); +var gdbg = dbg.addDebuggee(g); + +const rv = []; +dbg.onNativeCall = (callee, reason) => { + rv.push(callee.name); +}; + +gdbg.executeInGlobal(` +// Directly call. +dateNow.call(); +dateNow.apply(); + +// Call via bind. +Function.prototype.call.bind(Function.prototype.call)(dateNow); +Function.prototype.apply.bind(Function.prototype.apply)(dateNow); + +// Call via std_Function_apply +Reflect.apply(dateNow, null, []); +`); +assertEqArray(rv, [ + "call", "dateNow", + "apply", "dateNow", + "bind", "bound call", "call", "call", "dateNow", + "bind", "bound apply", "apply", "apply", "dateNow", + "apply", "dateNow", +]); diff --git a/js/src/jit-test/tests/debug/Debugger-onNativeCall-08.js b/js/src/jit-test/tests/debug/Debugger-onNativeCall-08.js new file mode 100644 index 0000000000..a47a73747a --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNativeCall-08.js @@ -0,0 +1,22 @@ +// Test that the onNativeCall hook is called when native function is +// called inside self-hosted JS as part of iteration. + +load(libdir + 'eqArrayHelper.js'); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(); +var gdbg = dbg.addDebuggee(g); + +const rv = []; +dbg.onNativeCall = (callee, reason) => { + rv.push(callee.name); +}; + +gdbg.executeInGlobal(` +Array.from([1, 2, 3]); +`); +assertEqArray(rv, [ + "from", + "values", + "next", "next", "next", "next", +]); diff --git a/js/src/jit-test/tests/debug/Debugger-onNativeCall-09.js b/js/src/jit-test/tests/debug/Debugger-onNativeCall-09.js new file mode 100644 index 0000000000..fdf33100df --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNativeCall-09.js @@ -0,0 +1,27 @@ +// Test that the onNativeCall hook is called when native function is +// called via DebuggerObject.apply DebuggerObject.call + +load(libdir + "eqArrayHelper.js"); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(); +var gdbg = dbg.addDebuggee(g); + +g.eval(` +function f() { + Array.from([1, 2]); +} +`); +const fdbgObj = gdbg.getOwnPropertyDescriptor("f").value; + +let rv = []; +dbg.onNativeCall = (callee, reason) => { + rv.push(callee.name); +}; + +fdbgObj.call(); +assertEqArray(rv, ["from", "values", "next", "next", "next"]); + +rv = []; +fdbgObj.apply(); +assertEqArray(rv, ["from", "values", "next", "next", "next"]); diff --git a/js/src/jit-test/tests/debug/Debugger-onNativeCall-10.js b/js/src/jit-test/tests/debug/Debugger-onNativeCall-10.js new file mode 100644 index 0000000000..bb8c36ca67 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNativeCall-10.js @@ -0,0 +1,95 @@ +// Test that the onNativeCall get additional info +// when using inspectNativeCallArguments + +load(libdir + "asserts.js"); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(); +var gdbg = dbg.addDebuggee(g); + +g.eval(` +var x = [1]; +var callArg = () => true; +function f() { + x.push(42, 26); + x.find(callArg); + x.toString.call(2); + new Function("code"); +} +`); + +let rv = []; +dbg.onNativeCall = (callee, reason, object, args) => { + rv.push({ + name: callee.name, + cls: object?.class || null, + args: args ? args.unsafeDereference().map(a => a.unsafeDereference ? a.unsafeDereference() : a) : null, + }); +}; + +g.f(); + +// Trace without native arguments +assertEq(dbg.inspectNativeCallArguments, false); +assertEq(rv.length, 5); +assertDeepEq(rv, [ + { + name: "push", + cls: null, + args: null, + }, + { + name: "find", + cls: null, + args: null, + }, + { + name: "call", + cls: null, + args: null, + }, + { + name: "toString", + cls: null, + args: null, + }, + { + name: "Function", + cls:null, + args:null, + }, +]); + +// Trace with native arguments +rv = []; +dbg.inspectNativeCallArguments = true; +assertEq(dbg.inspectNativeCallArguments, true); +g.f(); +assertEq(rv.length, 5); +assertDeepEq(rv, [ + { + name: "push", + cls: "Array", + args: [42, 26], + }, + { + name: "find", + cls: "Array", + args: [g.callArg], + }, + { + name: "call", + cls: "Function", + args: [2], + }, + { + name: "toString", + cls: null, + args: [], + }, + { + name: "Function", + cls: null, + args:["code"], + }, +]); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-01.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-01.js new file mode 100644 index 0000000000..736d29ad03 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-01.js @@ -0,0 +1,64 @@ +// Debugger.prototype.onNewGlobalObject surfaces. + +load(libdir + 'asserts.js'); + +var dbg = new Debugger; + +function f() { } +function g() { } + +assertEq(Object.getOwnPropertyDescriptor(dbg, 'onNewGlobalObject'), undefined); + +var d = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(dbg), 'onNewGlobalObject'); +assertEq(d.enumerable, false); +assertEq(d.configurable, true); +assertEq(typeof d.get, "function"); +assertEq(typeof d.set, "function"); + +assertEq(dbg.onNewGlobalObject, undefined); + +assertThrowsInstanceOf(function () { dbg.onNewGlobalObject = ''; }, TypeError); +assertEq(dbg.onNewGlobalObject, undefined); + +assertThrowsInstanceOf(function () { dbg.onNewGlobalObject = false; }, TypeError); +assertEq(dbg.onNewGlobalObject, undefined); + +assertThrowsInstanceOf(function () { dbg.onNewGlobalObject = 0; }, TypeError); +assertEq(dbg.onNewGlobalObject, undefined); + +assertThrowsInstanceOf(function () { dbg.onNewGlobalObject = Math.PI; }, TypeError); +assertEq(dbg.onNewGlobalObject, undefined); + +assertThrowsInstanceOf(function () { dbg.onNewGlobalObject = null; }, TypeError); +assertEq(dbg.onNewGlobalObject, undefined); + +assertThrowsInstanceOf(function () { dbg.onNewGlobalObject = {}; }, TypeError); +assertEq(dbg.onNewGlobalObject, undefined); + +// But any function, even a useless one, is okay. How fair is that? +dbg.onNewGlobalObject = f; +assertEq(dbg.onNewGlobalObject, f); + +dbg.onNewGlobalObject = undefined; +assertEq(dbg.onNewGlobalObject, undefined); + +var dbg2 = new Debugger; +assertEq(dbg.onNewGlobalObject, undefined); +assertEq(dbg2.onNewGlobalObject, undefined); + +dbg.onNewGlobalObject = f; +assertEq(dbg.onNewGlobalObject, f); +assertEq(dbg2.onNewGlobalObject, undefined); + +dbg2.onNewGlobalObject = g; +assertEq(dbg.onNewGlobalObject, f); +assertEq(dbg2.onNewGlobalObject, g); + +dbg.onNewGlobalObject = undefined; +assertEq(dbg.onNewGlobalObject, undefined); +assertEq(dbg2.onNewGlobalObject, g); + +// You shouldn't be able to apply the accessor to the prototype. +assertThrowsInstanceOf(function () { + Debugger.prototype.onNewGlobalObject = function () { }; + }, TypeError); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-02.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-02.js new file mode 100644 index 0000000000..c8c3d74add --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-02.js @@ -0,0 +1,23 @@ +// onNewGlobalObject handlers fire, until they are removed. + +var dbg = new Debugger; +var log; + +log = ''; +newGlobal(); +assertEq(log, ''); + +dbg.onNewGlobalObject = function (global) { + log += 'n'; + assertEq(global.seen, undefined); + global.seen = true; +}; + +log = ''; +newGlobal(); +assertEq(log, 'n'); + +log = ''; +dbg.onNewGlobalObject = undefined; +newGlobal(); +assertEq(log, ''); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-03.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-03.js new file mode 100644 index 0000000000..76a3649a2f --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-03.js @@ -0,0 +1,40 @@ +// onNewGlobalObject handlers on different Debugger instances are independent. + +var dbg1 = new Debugger; +var log1; +function h1(global) { + log1 += 'n'; + assertEq(global.seen, undefined); + global.seen = true; +} + +var dbg2 = new Debugger; +var log2; +function h2(global) { + log2 += 'n'; + assertEq(global.seen, undefined); + global.seen = true; +} + +log1 = log2 = ''; +newGlobal(); +assertEq(log1, ''); +assertEq(log2, ''); + +log1 = log2 = ''; +dbg1.onNewGlobalObject = h1; +newGlobal(); +assertEq(log1, 'n'); +assertEq(log2, ''); + +log1 = log2 = ''; +dbg2.onNewGlobalObject = h2; +newGlobal(); +assertEq(log1, 'n'); +assertEq(log2, 'n'); + +log1 = log2 = ''; +dbg1.onNewGlobalObject = undefined; +newGlobal(); +assertEq(log1, ''); +assertEq(log2, 'n'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-04.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-04.js new file mode 100644 index 0000000000..6e02d19bdc --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-04.js @@ -0,0 +1,14 @@ +// onNewGlobalObject handlers only fire on enabled Debuggers. + +var dbg = new Debugger; +var log; + +dbg.onNewGlobalObject = function (global) { + log += 'n'; + assertEq(global.seen, undefined); + global.seen = true; +}; + +log = ''; +newGlobal(); +assertEq(log, 'n'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-05.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-05.js new file mode 100644 index 0000000000..4ec3edc198 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-05.js @@ -0,0 +1,13 @@ +// An onNewGlobalObject handler can disable itself. + +var dbg = new Debugger; +var log; + +dbg.onNewGlobalObject = function (global) { + log += 'n'; + dbg.onNewGlobalObject = undefined; +}; + +log = ''; +newGlobal(); +assertEq(log, 'n'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-06.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-06.js new file mode 100644 index 0000000000..f58f4e7ee1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-06.js @@ -0,0 +1,20 @@ +// One Debugger's onNewGlobalObject handler can disable another Debugger's handler. + +var dbg1 = new Debugger; +var dbg2 = new Debugger; +var dbg3 = new Debugger; +var log; +var hit; + +function handler(global) { + hit++; + log += hit; + if (hit == 2) + dbg1.onNewGlobalObject = dbg2.onNewGlobalObject = dbg3.onNewGlobalObject = undefined; +}; + +log = ''; +hit = 0; +dbg1.onNewGlobalObject = dbg2.onNewGlobalObject = dbg3.onNewGlobalObject = handler; +newGlobal(); +assertEq(log, '12'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-07.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-07.js new file mode 100644 index 0000000000..eb79ea4fcc --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-07.js @@ -0,0 +1,18 @@ +// One Debugger's onNewGlobalObject handler can disable other Debuggers. + +var dbg1 = new Debugger; +var dbg2 = new Debugger; +var dbg3 = new Debugger; +var log; +var hit; + +function handler(global) { + hit++; + log += hit; +}; + +log = ''; +hit = 0; +dbg1.onNewGlobalObject = dbg2.onNewGlobalObject = dbg3.onNewGlobalObject = handler; +newGlobal(); +assertEq(log, '123'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-08.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-08.js new file mode 100644 index 0000000000..f981e8ae06 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-08.js @@ -0,0 +1,26 @@ +// Creating a global within an onNewGlobalObject handler causes a recursive handler invocation. +// +// This isn't really desirable behavior, as presumably a global created while a +// handler is running is one the debugger is creating for its own purposes and +// should not be observed, but if this behavior changes, we sure want to know. + +var dbg = new Debugger; +var log; +var depth; + +dbg.onNewGlobalObject = function (global) { + log += '('; depth++; + + assertEq(global.seen, undefined); + global.seen = true; + + if (depth < 3) + newGlobal(); + + log += ')'; depth--; +}; + +log = ''; +depth = 0; +newGlobal(); +assertEq(log, '((()))'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-09.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-09.js new file mode 100644 index 0000000000..1c4f029720 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-09.js @@ -0,0 +1,34 @@ +// Resumption values from onNewGlobalObject handlers are disallowed. + +load(libdir + 'asserts.js'); + +var dbg = new Debugger; +var log; + +dbg.onNewGlobalObject = function (g) { log += 'n'; return undefined; }; +log = ''; +assertEq(typeof newGlobal(), "object"); +assertEq(log, 'n'); + +dbg.uncaughtExceptionHook = function (ex) { assertEq(/disallowed/.test(ex), true); log += 'u'; } +dbg.onNewGlobalObject = function (g) { log += 'n'; return { return: "snoo" }; }; +log = ''; +assertEq(typeof newGlobal(), "object"); +assertEq(log, 'nu'); + +dbg.onNewGlobalObject = function (g) { log += 'n'; return { throw: "snoo" }; }; +log = ''; +assertEq(typeof newGlobal(), "object"); +assertEq(log, 'nu'); + +dbg.onNewGlobalObject = function (g) { log += 'n'; return null; }; +log = ''; +assertEq(typeof newGlobal(), "object"); +assertEq(log, 'nu'); + +dbg.uncaughtExceptionHook = function (ex) { assertEq(/foopy/.test(ex), true); log += 'u'; } +dbg.onNewGlobalObject = function (g) { log += 'n'; throw "foopy"; }; +log = ''; +assertEq(typeof newGlobal(), "object"); +assertEq(log, 'nu'); + diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-10.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-10.js new file mode 100644 index 0000000000..ce90ed541a --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-10.js @@ -0,0 +1,27 @@ +// An earlier onNewGlobalObject handler returning a 'throw' resumption +// value causes later handlers not to run. + +load(libdir + 'asserts.js'); + +var dbg1 = new Debugger; +var dbg2 = new Debugger; +var dbg3 = new Debugger; +var log; +var count; + +dbg1.onNewGlobalObject = dbg2.onNewGlobalObject = dbg3.onNewGlobalObject = function (global) { + count++; + log += count; + if (count == 2) + return { throw: "snoo" }; + return undefined; +}; +dbg2.uncaughtExceptionHook = function (exn) { + assertEq(/disallowed/.test(exn), true); + log += 'u'; +}; + +log = ''; +count = 0; +assertEq(typeof newGlobal(), "object"); +assertEq(log, '12u3'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-11.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-11.js new file mode 100644 index 0000000000..33345980dd --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-11.js @@ -0,0 +1,31 @@ +// Resumption values other than |undefined| from uncaughtExceptionHook from +// onNewGlobalObject handlers are ignored (other than cancelling further hooks). + +load(libdir + 'asserts.js'); + +var dbg = new Debugger; +var log; + +dbg.onNewGlobalObject = function () { + log += 'n'; + throw 'party'; +}; + +dbg.uncaughtExceptionHook = function (ex) { + log += 'u'; + assertEq(ex, 'party'); + return { throw: 'fit' }; +}; + +log = ''; +assertEq(typeof newGlobal(), 'object'); +assertEq(log, 'nu'); + +dbg.uncaughtExceptionHook = function (ex) { + log += 'u'; + assertEq(ex, 'party'); +}; + +log = ''; +assertEq(typeof newGlobal(), 'object'); +assertEq(log, 'nu'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-12.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-12.js new file mode 100644 index 0000000000..591d28f64d --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-12.js @@ -0,0 +1,25 @@ +// Resumption values from uncaughtExceptionHook from onNewGlobalObject +// handlers do not affect the dispatch of the event to other Debugger instances. + +load(libdir + 'asserts.js'); + +var dbg1 = new Debugger; +var dbg2 = new Debugger; +var dbg3 = new Debugger; +var log; + +dbg1.onNewGlobalObject = dbg2.onNewGlobalObject = dbg3.onNewGlobalObject = function () { + log += 'n'; + throw 'party'; +}; + +dbg1.uncaughtExceptionHook = dbg2.uncaughtExceptionHook = dbg3.uncaughtExceptionHook = +function (ex) { + log += 'u'; + assertEq(ex, 'party'); + return { throw: 'fit' }; +}; + +log = ''; +assertEq(typeof newGlobal(), 'object'); +assertEq(log, 'nununu'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-13.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-13.js new file mode 100644 index 0000000000..86cb252c8c --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-13.js @@ -0,0 +1,18 @@ +// onNewGlobalObject handlers receive the correct Debugger.Object instances. + +var dbg = new Debugger; + +var gw = null; +dbg.onNewGlobalObject = function (global) { + assertEq(arguments.length, 1); + assertEq(this, dbg); + gw = global; +}; +var g = newGlobal({newCompartment: true}); +assertEq(typeof gw, 'object'); +assertEq(dbg.addDebuggee(g), gw); + +// The Debugger.Objects passed to onNewGlobalObject are the global itself +// without any cross-compartment wrappers. +// NOTE: They also ignore any WindowProxy that may be associated with global. +assertEq(gw.unwrap(), gw); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-14.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-14.js new file mode 100644 index 0000000000..dfb04bafa6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-14.js @@ -0,0 +1,17 @@ +// Globals passed to onNewGlobalObject handers are ready for use immediately. + +var dbg = new Debugger; +var log = ''; +dbg.onNewGlobalObject = function (global) { + log += 'n'; + var gw = dbg.addDebuggee(global); + gw.defineProperty('x', { value: -1 }); + // Check that the global's magic lazy properties are working. + assertEq(gw.executeInGlobalWithBindings('Math.atan2(y,x)', { y: 0 }).return, Math.PI); + // Check that the global's prototype is hooked up. + assertEq(gw.executeInGlobalWithBindings('y.toString()', { y: gw }).return, "[object global]"); +}; + +newGlobal({newCompartment: true}); + +assertEq(log, 'n'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-15.js b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-15.js new file mode 100644 index 0000000000..e6035dd8e3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-15.js @@ -0,0 +1,25 @@ +// Globals marked as invisibleToDebugger behave appropriately. + +load(libdir + "asserts.js"); + +var dbg = new Debugger; +var log = ''; +dbg.onNewGlobalObject = function (global) { + log += 'n'; +} + +assertEq(typeof newGlobal(), "object"); +assertEq(typeof newGlobal({invisibleToDebugger: false}), "object"); +assertEq(log, 'nn'); + +log = ''; +assertEq(typeof newGlobal({newCompartment: true, invisibleToDebugger: true}), "object"); +assertEq(log, ''); + +assertThrowsInstanceOf(() => dbg.addDebuggee(newGlobal({newCompartment: true, invisibleToDebugger: true})), + Error); + +var glob = newGlobal({newCompartment: true, invisibleToDebugger: true}); +dbg.addAllGlobalsAsDebuggees(); +dbg.onDebuggerStatement = function (frame) { assertEq(true, false); }; +glob.eval('debugger'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewPromise-01.js b/js/src/jit-test/tests/debug/Debugger-onNewPromise-01.js new file mode 100644 index 0000000000..9788e027c9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewPromise-01.js @@ -0,0 +1,13 @@ +// Test that the onNewPromise hook gets called when promises are allocated in +// the scope of debuggee globals. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + + +let promisesFound = []; +dbg.onNewPromise = p => { promisesFound.push(p); }; + +let p1 = new g.Promise(function (){}); +assertEq(promisesFound.indexOf(gw.makeDebuggeeValue(p1)) != -1, true); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewPromise-02.js b/js/src/jit-test/tests/debug/Debugger-onNewPromise-02.js new file mode 100644 index 0000000000..61cb8f03ef --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewPromise-02.js @@ -0,0 +1,24 @@ +// onNewPromise handlers fire, until they are removed. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +log = ''; +new g.Promise(function (){}); +assertEq(log, ''); + +dbg.onNewPromise = function (promise) { + log += 'n'; + assertEq(promise.seen, undefined); + promise.seen = true; +}; + +log = ''; +new g.Promise(function (){}); +assertEq(log, 'n'); + +log = ''; +dbg.onNewPromise = undefined; +new g.Promise(function (){}); +assertEq(log, ''); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewPromise-03.js b/js/src/jit-test/tests/debug/Debugger-onNewPromise-03.js new file mode 100644 index 0000000000..38890ae957 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewPromise-03.js @@ -0,0 +1,41 @@ +// onNewPromise handlers on different Debugger instances are independent. + +var g = newGlobal({newCompartment: true}); +var dbg1 = new Debugger(g); +var log1; +function h1(promise) { + log1 += 'n'; + assertEq(promise.seen, undefined); + promise.seen = true; +} + +var dbg2 = new Debugger(g); +var log2; +function h2(promise) { + log2 += 'n'; + assertEq(promise.seen, undefined); + promise.seen = true; +} + +log1 = log2 = ''; +new g.Promise(function (){}); +assertEq(log1, ''); +assertEq(log2, ''); + +log1 = log2 = ''; +dbg1.onNewPromise = h1; +new g.Promise(function (){}); +assertEq(log1, 'n'); +assertEq(log2, ''); + +log1 = log2 = ''; +dbg2.onNewPromise = h2; +new g.Promise(function (){}); +assertEq(log1, 'n'); +assertEq(log2, 'n'); + +log1 = log2 = ''; +dbg1.onNewPromise = undefined; +new g.Promise(function (){}); +assertEq(log1, ''); +assertEq(log2, 'n'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewPromise-04.js b/js/src/jit-test/tests/debug/Debugger-onNewPromise-04.js new file mode 100644 index 0000000000..298ccedd80 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewPromise-04.js @@ -0,0 +1,14 @@ +// An onNewPromise handler can disable itself. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +dbg.onNewPromise = function (promise) { + log += 'n'; + dbg.onNewPromise = undefined; +}; + +log = ''; +new g.Promise(function (){}); +new g.Promise(function (){}); +assertEq(log, 'n'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewPromise-05.js b/js/src/jit-test/tests/debug/Debugger-onNewPromise-05.js new file mode 100644 index 0000000000..08762de687 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewPromise-05.js @@ -0,0 +1,24 @@ +// Creating a promise within an onNewPromise handler causes a recursive handler +// invocation. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +var log; +var depth; + +dbg.onNewPromise = function (promise) { + log += '('; depth++; + + assertEq(promise.seen, undefined); + promise.seen = true; + + if (depth < 3) + gw.executeInGlobal(`new Promise(_=>{})`); + + log += ')'; depth--; +}; + +log = ''; +depth = 0; +new g.Promise(function (){}); +assertEq(log, '((()))'); diff --git a/js/src/jit-test/tests/debug/Debugger-onNewPromise-06.js b/js/src/jit-test/tests/debug/Debugger-onNewPromise-06.js new file mode 100644 index 0000000000..0e24cdf372 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewPromise-06.js @@ -0,0 +1,35 @@ +// Resumption values from onNewPromise handlers are disallowed. + +load(libdir + 'asserts.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +dbg.onNewPromise = function (g) { log += 'n'; return undefined; }; +log = ''; +assertEq(typeof new g.Promise(function (){}), "object"); +assertEq(log, 'n'); + +dbg.uncaughtExceptionHook = function (ex) { assertEq(/disallowed/.test(ex), true); log += 'u'; } +dbg.onNewPromise = function (g) { log += 'n'; return { return: "snoo" }; }; +log = ''; +assertEq(typeof new g.Promise(function (){}), "object"); +assertEq(log, 'nu'); + +dbg.onNewPromise = function (g) { log += 'n'; return { throw: "snoo" }; }; +log = ''; +assertEq(typeof new g.Promise(function (){}), "object"); +assertEq(log, 'nu'); + +dbg.onNewPromise = function (g) { log += 'n'; return null; }; +log = ''; +assertEq(typeof new g.Promise(function (){}), "object"); +assertEq(log, 'nu'); + +dbg.uncaughtExceptionHook = function (ex) { assertEq(/foopy/.test(ex), true); log += 'u'; } +dbg.onNewPromise = function (g) { log += 'n'; throw "foopy"; }; +log = ''; +assertEq(typeof new g.Promise(function (){}), "object"); +assertEq(log, 'nu'); + diff --git a/js/src/jit-test/tests/debug/Debugger-onNewPromise-07.js b/js/src/jit-test/tests/debug/Debugger-onNewPromise-07.js new file mode 100644 index 0000000000..4ef41cc67c --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onNewPromise-07.js @@ -0,0 +1,13 @@ +// Errors in onNewPromise handlers are reported correctly, and don't mess up the +// promise creation. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +let e; +dbg.uncaughtExceptionHook = ee => { e = ee; }; +dbg.onNewPromise = () => { throw new Error("woops!"); }; + +assertEq(typeof new g.Promise(function (){}), "object"); +assertEq(!!e, true); +assertEq(!!e.message.match(/woops/), true); diff --git a/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-01.js b/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-01.js new file mode 100644 index 0000000000..84f8323997 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-01.js @@ -0,0 +1,18 @@ +// Test that the onPromiseSettled hook gets called when a promise settles. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +let log = ""; +let pw; +dbg.onPromiseSettled = pw_ => { + pw = pw_; + log += "s"; +}; + +let p = new g.Promise(function (){}); +g.settlePromiseNow(p); + +assertEq(log, "s"); +assertEq(pw, gw.makeDebuggeeValue(p)); diff --git a/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-02.js b/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-02.js new file mode 100644 index 0000000000..b78cbccf11 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-02.js @@ -0,0 +1,24 @@ +// onPromiseSettled handlers fire, until they are removed. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +log = ''; +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log, ''); + +dbg.onPromiseSettled = function (promise) { + log += 's'; + assertEq(promise.seen, undefined); + promise.seen = true; +}; + +log = ''; +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log, 's'); + +log = ''; +dbg.onPromiseSettled = undefined; +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log, ''); diff --git a/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-03.js b/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-03.js new file mode 100644 index 0000000000..2f11252480 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-03.js @@ -0,0 +1,40 @@ +// onPromiseSettled handlers on different Debugger instances are independent. +var g = newGlobal({newCompartment: true}); +var dbg1 = new Debugger(g); +var log1; +function h1(promise) { + log1 += 's'; + assertEq(promise.seen, undefined); + promise.seen = true; +} + +var dbg2 = new Debugger(g); +var log2; +function h2(promise) { + log2 += 's'; + assertEq(promise.seen, undefined); + promise.seen = true; +} + +log1 = log2 = ''; +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log1, ''); +assertEq(log2, ''); + +log1 = log2 = ''; +dbg1.onPromiseSettled = h1; +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log1, 's'); +assertEq(log2, ''); + +log1 = log2 = ''; +dbg2.onPromiseSettled = h2; +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log1, 's'); +assertEq(log2, 's'); + +log1 = log2 = ''; +dbg1.onPromiseSettled = undefined; +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log1, ''); +assertEq(log2, 's'); diff --git a/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-04.js b/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-04.js new file mode 100644 index 0000000000..6a5297223a --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-04.js @@ -0,0 +1,14 @@ +// An onPromiseSettled handler can disable itself. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +dbg.onPromiseSettled = function (promise) { + log += 's'; + dbg.onPromiseSettled = undefined; +}; + +log = ''; +g.settlePromiseNow(new g.Promise(function (){})); +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log, 's'); diff --git a/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-05.js b/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-05.js new file mode 100644 index 0000000000..8c99684619 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-05.js @@ -0,0 +1,25 @@ +// Settling a promise within an onPromiseSettled handler causes a recursive +// handler invocation. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +var log; +var depth; + +dbg.onPromiseSettled = function (promise) { + log += '('; depth++; + + assertEq(promise.seen, undefined); + promise.seen = true; + + if (depth < 3) { + gw.executeInGlobal(`settlePromiseNow(new Promise(_=>{}));`); + } + log += ')'; depth--; +}; + +log = ''; +depth = 0; +g.settlePromiseNow(new g.Promise(_=>{})); +assertEq(log, '((()))'); diff --git a/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-06.js b/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-06.js new file mode 100644 index 0000000000..4ed8947ab8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-onPromiseSettled-06.js @@ -0,0 +1,35 @@ +// Resumption values from onPromiseSettled handlers are disallowed. + +load(libdir + 'asserts.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +dbg.onPromiseSettled = function (g) { log += 's'; return undefined; }; +log = ''; +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log, 's'); + +dbg.uncaughtExceptionHook = function (ex) { assertEq(/disallowed/.test(ex), true); log += 'u'; } +dbg.onPromiseSettled = function (g) { log += 's'; return { return: "snoo" }; }; +log = ''; +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log, 'su'); + +dbg.onPromiseSettled = function (g) { log += 's'; return { throw: "snoo" }; }; +log = ''; +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log, 'su'); + +dbg.onPromiseSettled = function (g) { log += 's'; return null; }; +log = ''; +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log, 'su'); + +dbg.uncaughtExceptionHook = function (ex) { assertEq(/foopy/.test(ex), true); log += 'u'; } +dbg.onPromiseSettled = function (g) { log += 's'; throw "foopy"; }; +log = ''; +g.settlePromiseNow(new g.Promise(function (){})); +assertEq(log, 'su'); + diff --git a/js/src/jit-test/tests/debug/Environment-01.js b/js/src/jit-test/tests/debug/Environment-01.js new file mode 100644 index 0000000000..40f3b03570 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-01.js @@ -0,0 +1,23 @@ +// A live Environment can observe the new variables introduced by ES5 non-strict direct eval. + +var g = newGlobal({newCompartment: true}); +g.eval("var x = 'global'; function f(s) { h(); eval(s); h(); }"); +g.eval("function h() { debugger; }"); +var dbg = Debugger(g); +var env = undefined; +var hits = 0; +dbg.onDebuggerStatement = function (hframe) { + if (env === undefined) { + // First debugger statement. + env = hframe.older.environment; + assertEq(env.find("x") !== env, true); + assertEq(env.names().indexOf("x"), -1); + } else { + // Second debugger statement, post-eval. + assertEq(env.find("x"), env); + assertEq(env.names().indexOf("x") >= 0, true); + } + hits++; +}; +g.f("var x = 'local';"); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Environment-02.js b/js/src/jit-test/tests/debug/Environment-02.js new file mode 100644 index 0000000000..77af721a29 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-02.js @@ -0,0 +1,20 @@ +// The last Environment on the environment chain always has .type == "object" and .object === the global object. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +g.eval("function h() { debugger; }"); +var hits = 0; +dbg.onDebuggerStatement = function (hframe) { + var env = hframe.older.environment; + while (env.parent) + env = env.parent; + assertEq(env.type, "object"); + assertEq(env.object, gw); + hits++; +}; + +g.eval("h();"); +g.eval("(function () { h(); return []; })();"); +g.eval("with (Math) { h(-2 * PI); }"); +assertEq(hits, 3); diff --git a/js/src/jit-test/tests/debug/Environment-03.js b/js/src/jit-test/tests/debug/Environment-03.js new file mode 100644 index 0000000000..812ee21cbb --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-03.js @@ -0,0 +1,10 @@ +// Test that getting a function's environment can unlazify scripts. + +var g = newGlobal({newCompartment: true}); +g.eval('function f() { }'); +var dbg = new Debugger; +var gw = dbg.makeGlobalObjectReference(g); +var fw = gw.getOwnPropertyDescriptor('f').value; +gc(); +dbg.addDebuggee(g); +var fenv = fw.environment; diff --git a/js/src/jit-test/tests/debug/Environment-Function-prototype.js b/js/src/jit-test/tests/debug/Environment-Function-prototype.js new file mode 100644 index 0000000000..97e54f62fc --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-Function-prototype.js @@ -0,0 +1,7 @@ +// Don't crash when getting the Debugger.Environment of a frame inside +// Function.prototype. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onEnterFrame = function (frame) { frame.environment; }; +g.Function.prototype(); diff --git a/js/src/jit-test/tests/debug/Environment-bug-1431461.js b/js/src/jit-test/tests/debug/Environment-bug-1431461.js new file mode 100644 index 0000000000..188f3ee5a7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-bug-1431461.js @@ -0,0 +1,26 @@ +// Check that duplicate bindings are not created for let/const variables. + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +g.eval(` +function f(x, y=x) { + let z = "Z"; + debugger; + return x + y + z; +} +`); + +let hits = 0; +let names = []; + +dbg.onDebuggerStatement = frame => { + hits++; + for (let env = frame.environment; env.type !== "object"; env = env.parent) { + names.push(...env.names()); + } +}; + +assertEq(g.f("X", "Y"), "XYZ"); +assertEq(hits, 1); +assertEq(names.sort().join(", "), "arguments, x, y, z"); diff --git a/js/src/jit-test/tests/debug/Environment-calleeScript-01.js b/js/src/jit-test/tests/debug/Environment-calleeScript-01.js new file mode 100644 index 0000000000..a5417b9070 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-calleeScript-01.js @@ -0,0 +1,48 @@ +// Debugger.Environment.prototype.calleeScript reveals the script of function +// environments. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +function check(code, expectedType, expectedCallee) { + print("check(" + JSON.stringify(code) + ")"); + var hits; + dbg.onDebuggerStatement = function (frame) { + hits++; + var env = frame.environment; + assertEq(env.type, expectedType); + assertEq(env.calleeScript, expectedCallee ? expectedCallee.script : null); + }; + hits = 0; + g.eval(code); + assertEq(hits, 1); +} + +check('debugger;', 'declarative', null); +check('with({}) { debugger; };', 'with', null); +check('{ let x=1; debugger; };', 'declarative', null); + +g.eval('function f() { debugger; }'); +check('f()', 'declarative', gw.makeDebuggeeValue(g.f)); + +g.eval('function g() { h(); }'); +g.eval('function h() { debugger; }'); +check('g()', 'declarative', gw.makeDebuggeeValue(g.h)); + +// All evals get a lexical scope. +check('"use strict"; eval("debugger");', 'declarative', null); +g.eval('function j() { "use strict"; eval("debugger;"); }'); +check('j()', 'declarative', null); + +// All evals get a lexical scope. +check('eval("debugger");', 'declarative', null); + +g.eval('function* m() { debugger; yield true; }'); +check('m().next();', 'declarative', gw.makeDebuggeeValue(g.m)); + +g.eval('function n() { { let x = 1; debugger; } }'); +check('n()', 'declarative', null); + +g.eval('function* o() { debugger; yield true; }'); +check('o().next();', 'declarative', gw.makeDebuggeeValue(g.o)); diff --git a/js/src/jit-test/tests/debug/Environment-calleeScript-02.js b/js/src/jit-test/tests/debug/Environment-calleeScript-02.js new file mode 100644 index 0000000000..d518c4b8a0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-calleeScript-02.js @@ -0,0 +1,25 @@ +// Debugger.Environment.prototype.calleeScript gets the right script. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +g.eval('function f(x) { return function (y) { eval(""); debugger; return x + y; } }'); +g.eval('var g = f(2);'); +g.eval('var h = f(3);'); + +function check(fun, label) { + print("check(" + label + ")"); + var hits; + dbg.onDebuggerStatement = function (frame) { + hits++; + var env = frame.environment; + assertEq(env.calleeScript, gw.makeDebuggeeValue(fun).script); + }; + hits = 0; + fun(); + assertEq(hits, 1); +} + +check(g.g, 'g.g'); +check(g.h, 'g.h'); diff --git a/js/src/jit-test/tests/debug/Environment-calleeScript-03.js b/js/src/jit-test/tests/debug/Environment-calleeScript-03.js new file mode 100644 index 0000000000..f21522b4cc --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-calleeScript-03.js @@ -0,0 +1,25 @@ +// Environments of different instances of the same generator have the same +// calleeScript. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +function check(gen, label) { + print("check(" + label + ")"); + var hits; + dbg.onDebuggerStatement = function (frame) { + hits++; + var env = frame.environment; + assertEq(env.calleeScript, gw.makeDebuggeeValue(g.f).script); + }; + hits = 0; + gen.next(); + assertEq(hits, 1); +} + +g.eval('function* f(x) { debugger; yield x; }'); +g.eval('var g = f(2);'); +g.eval('var h = f(3);'); +check(g.g, 'g.g'); +check(g.h, 'g.h'); diff --git a/js/src/jit-test/tests/debug/Environment-find-01.js b/js/src/jit-test/tests/debug/Environment-find-01.js new file mode 100644 index 0000000000..abce77df16 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-find-01.js @@ -0,0 +1,19 @@ +// find sees that vars are hoisted out of with statements. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.environment.find("x").type, "with"); + hits++; +}; + +assertEq(g.eval("(function () {\n" + + " function g() { x = 1; }\n" + + " with ({x: 2}) {\n" + + " var x;\n" + + " debugger;\n" + + " return x;\n" + + " }\n" + + "})();"), 2); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Environment-find-02.js b/js/src/jit-test/tests/debug/Environment-find-02.js new file mode 100644 index 0000000000..c8ab45b786 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-find-02.js @@ -0,0 +1,18 @@ +// env.find() finds nonenumerable names in the global environment. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +g.h = function () { + var env = dbg.getNewestFrame().environment; + var last = env; + while (last.parent) + last = last.parent; + + assertEq(env.find("Array"), last); + hits++; +}; + +g.eval("h();"); +g.eval("(function () { h(); })();"); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Environment-find-03.js b/js/src/jit-test/tests/debug/Environment-find-03.js new file mode 100644 index 0000000000..3800e247d8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-find-03.js @@ -0,0 +1,20 @@ +// env.find() finds nonenumerable properties in with statements. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +g.h = function () { + var frame = dbg.getNewestFrame(); + var target = frame.eval("obj").return; + var env = frame.environment.find("PI"); + assertEq(env.object, target); + hits++; +}; + +g.obj = g.Math; +g.eval("with (obj) h();"); +g.eval("with (Math) { let x = 12; h(); }"); +g.eval("obj = {};\n" + + "Object.defineProperty(obj, 'PI', {enumerable: false, value: 'Marlowe'});\n" + + "with (obj) h();\n"); +assertEq(hits, 3); diff --git a/js/src/jit-test/tests/debug/Environment-find-04.js b/js/src/jit-test/tests/debug/Environment-find-04.js new file mode 100644 index 0000000000..24a714e252 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-find-04.js @@ -0,0 +1,21 @@ +// env.find throws a TypeError if the argument is not an identifier. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +g.h = function () { + var env = dbg.getNewestFrame().environment; + assertThrowsInstanceOf(function () { env.find(); }, TypeError); + assertThrowsInstanceOf(function () { env.find(""); }, TypeError); + assertThrowsInstanceOf(function () { env.find(" "); }, TypeError); + assertThrowsInstanceOf(function () { env.find(0); }, TypeError); + assertThrowsInstanceOf(function () { env.find("0"); }, TypeError); + assertThrowsInstanceOf(function () { env.find("0xc"); }, TypeError); + assertThrowsInstanceOf(function () { env.find("Anna Karenina"); }, TypeError); + hits++; +}; +g.eval("h();"); +g.eval("with ([1]) h();"); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Environment-find-05.js b/js/src/jit-test/tests/debug/Environment-find-05.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/js/src/jit-test/tests/debug/Environment-find-06.js b/js/src/jit-test/tests/debug/Environment-find-06.js new file mode 100644 index 0000000000..b34321647e --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-find-06.js @@ -0,0 +1,47 @@ +// Environment.prototype.find finds bindings that are function arguments, 'let' +// bindings, or FunctionExpression names. + +var g = newGlobal({newCompartment: true}); +g.eval("function h() { debugger; }"); + +var dbg = new Debugger(g); + +function test1(code) { + var hits = 0; + dbg.onDebuggerStatement = function (frame) { + var env = frame.older.environment.find('X'); + assertEq(env.names().indexOf('X') !== -1, true); + assertEq(env.type, 'declarative'); + assertEq(env.parent !== null, true); + hits++; + }; + g.eval(code); + assertEq(hits, 1); +} + +var manyNames = ''; +for (var i = 0; i < 2048; i++) + manyNames += 'x' + i + ', '; +manyNames += 'X'; + +function test2(code) { + print(code + " : one"); + test1(code.replace('@@', 'X')); + print(code + " : many"); + test1(code.replace('@@', manyNames)); +} + +test2('function f(@@) { h(); } f(1);'); +test2('function f(@@) { h(); } f();'); +test2('function f(@@) { return function g() { h(X); }; } f(1)();'); +test2('function f(@@) { return function g() { h(X); }; } f()();'); + +test2(' { let @@ = 0; h(); }'); +test2('function f(a, b, c) { let @@ = 0; h(); } f(1, 2, 3);'); +test2(' { let @@ = 0; { let y = 0; h(); } }'); +test2('function f() { let @@ = 0; { let y = 0; h(); } } f();'); +test2(' { for (let @@ = 0; X < 1; X++) h(); }'); +test2('function f() { for (let @@ = 0; X < 1; X++) h(); } f();'); + +test1('(function X() { h(); })();'); +test1('(function X(a, b, c) { h(); })(1, 2, 3);'); diff --git a/js/src/jit-test/tests/debug/Environment-find-07.js b/js/src/jit-test/tests/debug/Environment-find-07.js new file mode 100644 index 0000000000..a6b2def550 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-find-07.js @@ -0,0 +1,22 @@ +// We can find into and from optimized out scopes. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +dbg.addDebuggee(g); + +g.eval("" + function f() { + var x = 42; + function g() { } + g(); +}); + +dbg.onEnterFrame = function (f) { + if (f.callee && (f.callee.name === "g")) { + genv = f.environment.parent; + assertEq(genv.optimizedOut, true); + assertEq(genv.find("f").type, "object"); + assertEq(f.environment.find("x"), genv); + } +} + +g.f(); diff --git a/js/src/jit-test/tests/debug/Environment-gc-01.js b/js/src/jit-test/tests/debug/Environment-gc-01.js new file mode 100644 index 0000000000..ec6804cacb --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-gc-01.js @@ -0,0 +1,19 @@ +// An Environment keeps its referent alive. + +var g = newGlobal({newCompartment: true}); +g.eval("function f(x) { return 2 * x; }"); +var dbg = Debugger(g); +var env; +dbg.onEnterFrame = function (frame) { env = frame.environment; }; +assertEq(g.f(22), 44); +dbg.onEnterFrame = undefined; + +assertEq(env.find("x"), env); +assertEq(env.names().join(","), "arguments,x"); + +gc(); +g.gc(g); +gc(env); + +assertEq(env.find("x"), env); +assertEq(env.names().join(","), "arguments,x"); diff --git a/js/src/jit-test/tests/debug/Environment-gc-02.js b/js/src/jit-test/tests/debug/Environment-gc-02.js new file mode 100644 index 0000000000..0ed5a0d103 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-gc-02.js @@ -0,0 +1,28 @@ +// A closure's .environment keeps the lexical environment alive even if the closure is destroyed. + +var N = 4; +var g = newGlobal({newCompartment: true}); +g.eval("function add(a) { return function (b) { return eval('a + b'); }; }"); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var aw = gw.getOwnPropertyDescriptor("add").value; + +// Create N closures and collect environments. +var arr = []; +for (var i = 0; i < N; i++) + arr[i] = aw.call(null, i).return.environment; + +// Test that they work now. +function check() { + for (var i = 0; i < N; i++) { + assertEq(arr[i].find("b"), null); + assertEq(arr[i].find("a"), arr[i]); + } +} +check(); + +// Test that they work after gc. +gc(); +gc({}); +g.gc(g); +check(); diff --git a/js/src/jit-test/tests/debug/Environment-gc-03.js b/js/src/jit-test/tests/debug/Environment-gc-03.js new file mode 100644 index 0000000000..3243ec65ba --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-gc-03.js @@ -0,0 +1,21 @@ +// Test that block scopes cannot be resurrected by onStep. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function(frame) { + frame.onStep = (function() { + frame.environment; + }); +}; + +g.eval("debugger; for (let i = 0; i < 1; i++) (function(){});"); + +// If the last freshened block scope was incorrectly resurrected by onStep +// above, GCing will assert. +gc(); + +g.eval("debugger; { let i = 0; (function(){ i = 42; }); }"); +gc(); + +g.eval("debugger; try { throw 42; } catch (e) { };"); +gc(); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-01.js b/js/src/jit-test/tests/debug/Environment-getVariable-01.js new file mode 100644 index 0000000000..9b3bbd9e1c --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-01.js @@ -0,0 +1,14 @@ +// Environment.prototype.getVariable does not see variables bound in enclosing scopes. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.environment.getVariable("x"), 13); + assertEq(frame.environment.getVariable("k"), undefined); + assertEq(frame.environment.find("k").getVariable("k"), 3); + hits++; +}; +g.eval("var k = 3; function f(x) { debugger; }"); +g.f(13); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-02.js b/js/src/jit-test/tests/debug/Environment-getVariable-02.js new file mode 100644 index 0000000000..9d76a03957 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-02.js @@ -0,0 +1,18 @@ +// getVariable works in function scopes. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var lexicalEnv = frame.environment; + var varEnv = lexicalEnv.parent; + assertEq(varEnv.getVariable("a"), 1); + assertEq(varEnv.getVariable("b"), 2); + assertEq(varEnv.getVariable("c"), 3); + assertEq(varEnv.getVariable("d"), 7); + assertEq(lexicalEnv.getVariable("e"), 8); + hits++; +}; +g.eval("function f(a, [b, c]) { var d = a + b + c + 1; let e = d + 1; debugger; }"); +g.f(1, [2, 3]); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-03.js b/js/src/jit-test/tests/debug/Environment-getVariable-03.js new file mode 100644 index 0000000000..9475d1cce3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-03.js @@ -0,0 +1,21 @@ +// getVariable sees bindings in let-block scopes. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var log = ''; +dbg.onDebuggerStatement = function (frame) { + log += frame.environment.getVariable("x"); +}; +g.eval("function f() {\n" + + " let x = 'a';\n" + + " debugger;\n" + + " for (let x = 0; x < 2; x++)\n" + + " if (x === 0)\n" + + " debugger;\n" + + " else {\n" + + " let x = 'b'; debugger;\n" + + " }\n" + + "}\n"); +g.f(); +g.eval("{ let x = 'd'; debugger; }"); +assertEq(log, 'a0bd'); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-04.js b/js/src/jit-test/tests/debug/Environment-getVariable-04.js new file mode 100644 index 0000000000..850446f577 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-04.js @@ -0,0 +1,12 @@ +// getVariable sees variables in function scopes added by non-strict direct eval. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var v; +dbg.onDebuggerStatement = function (frame) { + v = frame.environment.getVariable("x"); +}; + +g.eval("function f(s) { eval(s); debugger; }"); +g.f("var x = 'Q';"); +assertEq(v, 'Q'); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-05.js b/js/src/jit-test/tests/debug/Environment-getVariable-05.js new file mode 100644 index 0000000000..cfed91d86c --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-05.js @@ -0,0 +1,10 @@ +// getVariable sees global variables. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var log = ''; +dbg.onDebuggerStatement = function (frame) { + log += frame.environment.parent.getVariable("x") + frame.environment.parent.getVariable("y"); +}; +g.eval("var x = 'a'; this.y = 'b'; debugger;"); +assertEq(log, 'ab'); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-06.js b/js/src/jit-test/tests/debug/Environment-getVariable-06.js new file mode 100644 index 0000000000..898d0df333 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-06.js @@ -0,0 +1,12 @@ +// getVariable sees properties inherited from the global object's prototype chain. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var log = ''; +dbg.onDebuggerStatement = function (frame) { + log += frame.environment.parent.getVariable("x") + frame.environment.parent.getVariable("y"); +}; +g.eval("Object.getPrototypeOf(this).x = 'a';\n" + + "Object.prototype.y = 'b';\n" + + "debugger;\n"); +assertEq(log, 'ab'); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-07.js b/js/src/jit-test/tests/debug/Environment-getVariable-07.js new file mode 100644 index 0000000000..9f48d3208e --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-07.js @@ -0,0 +1,10 @@ +// getVariable can get properties from with-block scopes. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var v; +dbg.onDebuggerStatement = function (frame) { + v = frame.environment.getVariable("x"); +}; +g.eval("var x = 1; { let x = 2; with ({x: 3}) { debugger; } }"); +assertEq(v, 3); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-08.js b/js/src/jit-test/tests/debug/Environment-getVariable-08.js new file mode 100644 index 0000000000..ca77d582a1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-08.js @@ -0,0 +1,10 @@ +// getVariable sees properties inherited from a with-object's prototype chain. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var v; +dbg.onDebuggerStatement = function (frame) { + v = frame.environment.getVariable("x"); +}; +g.eval("var x = 1; { let x = 2; with (Object.create({x: 3})) { debugger; } }"); +assertEq(v, 3); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-09.js b/js/src/jit-test/tests/debug/Environment-getVariable-09.js new file mode 100644 index 0000000000..5e2136b9d7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-09.js @@ -0,0 +1,13 @@ +// getVariable works on ancestors of frame.environment. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var log = ''; +dbg.onDebuggerStatement = function (frame) { + for (var env = frame.environment; env; env = env.parent) { + if (env.find("x") === env) + log += env.getVariable("x"); + } +}; +g.eval("var x = 1; { let x = 2; with (Object.create({x: 3})) { debugger; } }"); +assertEq(log, "321"); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-10.js b/js/src/jit-test/tests/debug/Environment-getVariable-10.js new file mode 100644 index 0000000000..57273cc628 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-10.js @@ -0,0 +1,27 @@ +// getVariable works on a heavyweight environment after control leaves its scope. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var envs = []; +dbg.onDebuggerStatement = function (frame) { + envs.push(frame.environment); +}; +g.eval("var f;\n" + + "for (var x = 0; x < 3; x++) {\n" + + " (function (x) {\n" + + " for (var y = 0; y < 3; y++) {\n" + + " (function (z) {\n" + + " eval(z); // force heavyweight\n" + + " debugger;\n" + + " })(x + y);\n" + + " }\n" + + " })(x);\n" + + "}"); + +var i = 0; +for (var x = 0; x < 3; x++) { + for (var y = 0; y < 3; y++) { + var e = envs[i++]; + assertEq(e.getVariable("z"), x + y); + } +} diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-11.js b/js/src/jit-test/tests/debug/Environment-getVariable-11.js new file mode 100644 index 0000000000..23dcdc5fe8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-11.js @@ -0,0 +1,15 @@ +// The value returned by getVariable can be a Debugger.Object. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var a = frame.environment.parent.getVariable('Math'); + assertEq(a instanceof Debugger.Object, true); + var b = gw.getOwnPropertyDescriptor('Math').value; + assertEq(a, b); + hits++; +}; +g.eval("debugger;"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-12.js b/js/src/jit-test/tests/debug/Environment-getVariable-12.js new file mode 100644 index 0000000000..d31bd3b1b4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-12.js @@ -0,0 +1,61 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + hits++; + assertEq(frame.environment.parent.getVariable('y'), true); +}; + +g.eval("var g;" + + "function f(x) {" + + " { let y = x; " + + " if (x)" + + " g = function() { eval('debugger') };" + + " else" + + " g();" + + " }" + + "}" + + "f(true);" + + "f(false);"); +assertEq(hits, 1); + +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + hits++; + assertEq(frame.environment.parent.getVariable('y'), 1); + assertEq(frame.environment.parent.names().indexOf('z'), -1); +}; + +g.eval("var g;" + + "{ let y = 1; " + + " g = function () { eval(''); debugger; };" + + " { let z = 2; " + + " g();" + + " }"+ + "}"); +assertEq(hits, 1); + +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + hits++; + var e = frame.older.environment.parent; + assertEq(e.getVariable('z'), true); + e = e.parent; + assertEq(e.getVariable('y'), true); +}; + +g.eval("var g;" + + "function h() { eval(''); debugger; };" + + "for (var x of [true, false]) {" + + " { let y = x; " + + " { let z = x; " + + " if (x)" + + " g = function () { print(z); h() };" + + " else" + + " g();" + + " }" + + " }" + + "}"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-13.js b/js/src/jit-test/tests/debug/Environment-getVariable-13.js new file mode 100644 index 0000000000..37d5e90afc --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-13.js @@ -0,0 +1,50 @@ +// Tests that we can use debug scopes with Ion frames. +// +// Unfortunately these tests are brittle. They depend on opaque JIT heuristics +// kicking in. + +load(libdir + "jitopts.js"); + +// GCs can invalidate JIT code and cause this test to fail. +gczeal(0); + +if (!jitTogglesMatch(Opts_Ion2NoOffthreadCompilation)) + quit(0); + +withJitOptions(Opts_Ion2NoOffthreadCompilation, function () { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + + // Note that this *depends* on CCW scripted functions being opaque to Ion + // optimization and not deoptimizing the frames below the call to toggle. + g.toggle = function toggle(d) { + if (d) { + dbg.addDebuggee(g); + var frame = dbg.getNewestFrame(); + assertEq(frame.implementation, "ion"); + // g is heavyweight but its call object is optimized out, because its + // arguments and locals are unaliased. + // + // Calling frame.environment here should make a fake debug scope that + // gets things directly from the frame. Calling frame.arguments doesn't + // go through the scope object and reads directly off the frame. Assert + // that the two are equal. + assertEq(frame.environment.getVariable("x"), frame.arguments[1]); + } + }; + + g.eval("" + function f(d, x) { g(d, x); }); + g.eval("" + function g(d, x) { + for (var i = 0; i < 100; i++); + function inner() { i = 42; }; + toggle(d); + // Use x so it doesn't get optimized out. + x++; + }); + + g.eval("(" + function test() { + for (i = 0; i < 15; i++) + f(false, 42); + f(true, 42); + } + ")();"); +}); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-14.js b/js/src/jit-test/tests/debug/Environment-getVariable-14.js new file mode 100644 index 0000000000..2eff1690ff --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-14.js @@ -0,0 +1,18 @@ +// Debugger.Environment can reflect optimized out function scopes + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +dbg.addDebuggee(g); + +g.eval("" + function f() { + var x = 42; + function g() { } + g(); +}); + +dbg.onEnterFrame = function (f) { + if (f.callee && (f.callee.name === "g")) + assertEq(f.environment.parent.getVariable("x").optimizedOut, true); +} + +g.f(); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-15.js b/js/src/jit-test/tests/debug/Environment-getVariable-15.js new file mode 100644 index 0000000000..f0495cda17 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-15.js @@ -0,0 +1,31 @@ +// Don't hand out internal function objects via Debugger.Environment.prototype.getVariable. + +// When the real scope chain object holding the binding for 'f' in 'function f() +// { ... }' is optimized out because it's never used, we whip up fake scope +// chain objects for Debugger to use, if it looks. However, the value of the +// variable f will be an internal function object, not a live function object, +// since the latter was not recorded. Internal function objects should not be +// exposed via Debugger. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +dbg.onDebuggerStatement = function (frame) { + var g_call_env = frame.older.environment; // g's locals + var g_decl_env = g_call_env.parent; // 'function g' binding + var f_call_env = g_decl_env.parent; // f's locals + var f_decl_env = f_call_env.parent; // 'function f' binding + assertEq(f_decl_env.getVariable('f').optimizedOut, true); +} + +g.evaluate(` + + function h() { debugger; } + (function f() { + return function g() { + h(); + return 1; + } + })()(); + + `); diff --git a/js/src/jit-test/tests/debug/Environment-getVariable-WouldRun.js b/js/src/jit-test/tests/debug/Environment-getVariable-WouldRun.js new file mode 100644 index 0000000000..c6bf3a8cb7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-getVariable-WouldRun.js @@ -0,0 +1,17 @@ +// getVariable that would trigger a getter does not crash or explode. +// It should throw WouldRunDebuggee, but that isn't implemented yet. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertThrowsInstanceOf(function () { + frame.environment.parent.parent.getVariable("x"); + }, Error); + hits++; +}; +g.eval("Object.defineProperty(this, 'x', {get: function () { throw new Error('fail'); }});\n" + + "debugger;"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Environment-identity-01.js b/js/src/jit-test/tests/debug/Environment-identity-01.js new file mode 100644 index 0000000000..7d0c5b134d --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-identity-01.js @@ -0,0 +1,40 @@ +// The value of frame.environment is the same Environment object at different +// times within a single visit to a scope. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +g.eval("function h() { debugger; }"); +var hits, env; +dbg.onDebuggerStatement = function (hframe) { + var frame = hframe.older; + var e = frame.environment; + + // frame.environment is at least cached from one moment to the next. + assertEq(e, frame.environment); + + // frame.environment is cached from statement to statement within a call frame. + if (env === undefined) + env = e; + else + assertEq(e, env); + + hits++; +}; + +hits = 0; +env = undefined; +g.eval("function f() { (function () { var i = 0; h(); var j = 2; h(); })(); }"); +g.f(); +assertEq(hits, 2); + +hits = 0; +env = undefined; +g.eval("function f2() { { let i = 0; h(); let j = 2; h(); } }"); +g.f2(); +assertEq(hits, 2); + +hits = 0; +env = undefined; +g.eval("function f3() { { let i; for (i = 0; i < 2; i++) h(); } }"); +g.f3(); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Environment-identity-02.js b/js/src/jit-test/tests/debug/Environment-identity-02.js new file mode 100644 index 0000000000..a48f8b93bf --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-identity-02.js @@ -0,0 +1,29 @@ +// frame.environment is different for different activations of a scope. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +g.eval("function h() { debugger; }"); +var arr; +dbg.onDebuggerStatement = function (hframe) { + var e = hframe.older.environment; + assertEq(arr.indexOf(e), -1); + arr.push(e); +}; + +function test(code, expectedHits) { + arr = []; + g.eval(code); + assertEq(arr.length, expectedHits); +} + +// two separate calls to a function +test("(function () { var f = function (a) { h(); return a; }; f(1); f(2); })();", 2); + +// recursive calls to a function +test("(function f(n) { h(); return n < 2 ? 1 : n * f(n - 1); })(3);", 3); + +// separate visits to a block in the same call frame +test("(function () { for (var i = 0; i < 3; i++) { let j = i * 4; h(); }})();", 3); + +// two strict direct eval calls in the same function scope +test("(function () { 'use strict'; for (var i = 0; i < 3; i++) eval('h();'); })();", 3); diff --git a/js/src/jit-test/tests/debug/Environment-identity-03.js b/js/src/jit-test/tests/debug/Environment-identity-03.js new file mode 100644 index 0000000000..50d01955da --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-identity-03.js @@ -0,0 +1,108 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") +// +// Two Environments nested in the same runtime scope share the correct tail of their parent chains. + +// The compiler must be allowed to elide empty scopes and so forth, so this +// test does not check the number of unshared Environments. Instead, each test +// case identifies the expected innermost shared scope by the name of a +// variable in it. + +var g = newGlobal({newCompartment: true}); +g.eval("function h() { debugger; }"); +var dbg = Debugger(g); +var hits, name, shared, unshared; +dbg.onDebuggerStatement = function (hframe) { + var frame = hframe.older; + + // Find name in frame.environment. + var env, child = null; + for (env = frame.environment; env !== null; env = env.parent) { + if (env.names().indexOf(name) != -1) + break; + child = env; + } + assertEq(env !== null, true, "expected '" + name + "' to be in scope"); + assertEq(env, frame.environment.find(name), + "env.find should find the same frame as the written out search"); + + if (hits === 0) { + // First hit. + shared = env; + unshared = child; + } else { + // Subsequent hit. + assertEq(env, shared, "the environment containing '" + name + "' should be shared"); + assertEq(child === null || unshared === null || unshared !== child, true, + "environments nested within the one containing '" + name + "' should not be shared"); + } + hits++; +}; + +function test(sharedName, expectedHits, code) { + hits = 0; + name = sharedName; + shared = unshared = undefined; + g.eval(code); + assertEq(hits, expectedHits); +} + +// Basic test cases. +// +// (The stray "a = b" assignments in these tests are to inhibit the flat closure +// optimization, which Environments expose. There's nothing really wrong with +// the optimization or with the debugger exposing it, but that's not what we +// want to test here.) + +test("q", 2, "let q = function (a) { h(); }; q(1); q(2);"); +test("a", 2, "q = function (a) { (function (b) { h(); a = b; })(2); h(); }; q(1);"); +test("a", 2, "q = function (a) { h(); return function (b) { h(); a = b; }; }; q(1)(2);"); +test("n", 3, "q = function (n) { for (var i = 0; i < n; i++) { { let j = i; h(); } } }; q(3);"); + +// A function with long dynamic and static chains. +var N = 80; + +var code = "function f" + N + "(a" + N + ") {\neval('a0 + a1'); h();\n}\n"; +for (var i = N; --i >= 0;) { + var call = "f" + (i + 1) + "(a" + i + " - 1);\n"; + code = ("function f" + i + "(a" + i + ") {\n" + + code + + call + + "if (a" + i + " === 0) " + call + + "}\n"); +} + +g.eval(code); +test("a0", 2, "f0(0);"); +test("a17", 2, "f0(17);"); +test("a" + (N-2), 2, "f0(" + (N-2) + ");"); +test("a" + (N-1), 2, "f0(" + (N-1) + ");"); + +// A function with a short dynamic chain and a long static chain. +N = 60; + +function DeepStaticShallowDynamic(i, n) { + var code = "function f" + i + "(a" + i + ") {\n"; + if (i >= n) + code += "eval('a1 + a2'); h();\n"; + else + code += "return " + DeepStaticShallowDynamic(i+1, n) + ";\n"; + code += "}"; + return code; +} +g.eval(DeepStaticShallowDynamic(1, N)); + +function* range(start, stop) { + for (var i = start; i < stop; i++) + yield i; +} + +function DSSDsplit(s) { + return ("var mid = f1" + [...range(0, s)].map((i) => "(" + i + ")").join("") + ";\n" + + "mid" + [...range(s, N)].map((i) => "(" + i + ")").join("") + ";\n" + + "mid" + [...range(s, N)].map((i) => "(" + i + ")").join("") + ";\n"); +} + +test("a1", 2, DSSDsplit(1)); +test("a17", 2, DSSDsplit(17)); +test("a" + (N-2), 2, DSSDsplit(N-2)); +test("a" + (N-1), 2, DSSDsplit(N-1)); diff --git a/js/src/jit-test/tests/debug/Environment-identity-04.js b/js/src/jit-test/tests/debug/Environment-identity-04.js new file mode 100644 index 0000000000..607b871817 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-identity-04.js @@ -0,0 +1,19 @@ +// Observably different visits to the same with-statement produce distinct Environments. + +var g = newGlobal({newCompartment: true}); +g.eval("function f(a, obj) { with (obj) return function () { return a; }; }"); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + // Even though the two visits to the with-statement have the same target + // object, Math, the environments are observably different. + var f1 = frame.eval("f(1, Math);").return; + var f2 = frame.eval("f(2, Math);").return; + assertEq(f1.environment !== f2.environment, true); + assertEq(f1.object, f2.object); + assertEq(f1.call().return, 1); + assertEq(f2.call().return, 2); + hits++; +}; +g.eval("debugger;"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Environment-identity-05.js b/js/src/jit-test/tests/debug/Environment-identity-05.js new file mode 100644 index 0000000000..d72b5e76f3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-identity-05.js @@ -0,0 +1,19 @@ +// Tests that freshened blocks behave correctly in Debugger. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var log = ''; +var oldEnv = null; +dbg.onDebuggerStatement = function (frame) { + if (!oldEnv) { + oldEnv = frame.environment; + } else { + // Block has been freshened by |for (let ...)|, should be different + // identity. + log += (oldEnv === frame.environment); + } + log += frame.environment.getVariable("x"); +}; +g.eval("for (let x = 0; x < 2; x++) { eval(\"\"); debugger; }"); +gc(); +assertEq(log, "0false1"); diff --git a/js/src/jit-test/tests/debug/Environment-inspectable-01.js b/js/src/jit-test/tests/debug/Environment-inspectable-01.js new file mode 100644 index 0000000000..7ced83aa41 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-inspectable-01.js @@ -0,0 +1,80 @@ +// Environments are only inspectable while their globals are debuggees. + +load(libdir + 'asserts.js'); + +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +g2.g1 = g1; +g1.g2 = g2; + +g1.eval('function f(xf) { return function h(xh) { eval(""); debugger; } }'); +g1.eval('var h = f("value of xf");'); + +// To ensure that xk gets located on the heap, and thus outlives its stack frame, we +// store a function that captures it here. Kind of a kludge. +g2.eval('var capture;'); +g2.eval('function k(xk) { capture = function () { return xk; }; g1.h("value of xh"); }'); + +var dbg = new Debugger; +dbg.addDebuggee(g1); +dbg.addDebuggee(g2); + +dbg.onDebuggerStatement = debuggerHandler; + +var log = ''; + +g1.eval('g2.k("value of xk");'); + +var he, ke, ee; + +function debuggerHandler(frame) { + log += 'd'; + + assertEq(frame.type, 'call'); + he = frame.environment; + + assertEq(frame.older.type, 'call'); + ke = frame.older.environment; + + assertEq(frame.older.older.type, 'eval'); + ee = frame.older.older.environment; + + assertEq(he.inspectable, true); + assertEq(he.getVariable('xh'), 'value of xh'); + assertEq(he.parent.parent.getVariable('xf'), 'value of xf'); + assertEq(ke.inspectable, true); + assertEq(ke.getVariable('xk'), 'value of xk'); + assertEq(ee.inspectable, true); + assertEq(ee.type, 'declarative'); + assertEq(ee.parent.type, 'object'); + + dbg.removeDebuggee(g2); + + assertEq(he.inspectable, true); + assertEq(he.type, 'declarative'); + assertEq(ke.inspectable, false); + assertThrowsInstanceOf(() => ke.getVariable('xk'), Error); + assertEq(ee.inspectable, true); + assertEq(ee.type, 'declarative'); + assertEq(ee.parent.type, 'object'); + + dbg.removeDebuggee(g1); + + assertEq(he.inspectable, false); + assertThrowsInstanceOf(() => he.getVariable('xh'), Error); + assertEq(ke.inspectable, false); + assertThrowsInstanceOf(() => ke.getVariable('xk'), Error); + assertEq(ee.inspectable, false); + assertThrowsInstanceOf(() => ee.type, Error); +} + +assertEq(log, 'd'); + +dbg.addDebuggee(g2); + +assertEq(he.inspectable, false); +assertThrowsInstanceOf(() => he.getVariable('xh'), Error); +assertEq(ke.inspectable, true); +assertEq(ke.getVariable('xk'), 'value of xk'); +assertEq(ee.inspectable, false); +assertThrowsInstanceOf(() => ee.type, Error); diff --git a/js/src/jit-test/tests/debug/Environment-module-01.js b/js/src/jit-test/tests/debug/Environment-module-01.js new file mode 100644 index 0000000000..b0e64089bf --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-module-01.js @@ -0,0 +1,26 @@ +// Debug environments for module environments should include variables that are +// are not closed over or exported. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onEnterFrame = function (frame) { + if (!frame.older) { + return; + } + const env = frame.older.environment; + assertEq(env.names().join(','), "foo,y,x,z"); + assertEq(env.getVariable('x'), 0); + assertEq(env.getVariable('y'), 1); + assertEq(env.getVariable('z'), 2); + env.setVariable('x', 3); + assertEq(env.getVariable('x'), 3); +}; +const m = g.parseModule(` + var x = 0; + export var y = 1; + const z = 2; + foo(); + function foo() {} +`); +moduleLink(m); +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/debug/Environment-module-02.js b/js/src/jit-test/tests/debug/Environment-module-02.js new file mode 100644 index 0000000000..d88dbc6223 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-module-02.js @@ -0,0 +1,30 @@ +// Debug environments for module environments should be able to access closed +// over variables after the module script has executed. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); + +const m = g.parseModule(` + var x = 42; + export function foo() { return x; } + foo(); +`); +moduleLink(m); + +let fooFunction; +dbg.onEnterFrame = function (frame) { + fooFunction = frame.callee; +}; + +moduleEvaluate(m); +assertEq(fooFunction instanceof Debugger.Object, true); + +dbg.onEnterFrame = function (frame) { + const env = frame.environment.parent; + assertEq(env.names().join(','), "foo,x"); + assertEq(env.getVariable('x'), 42); + env.setVariable('x', 3); + assertEq(env.getVariable('x'), 3); +}; + +fooFunction.call(); diff --git a/js/src/jit-test/tests/debug/Environment-module-tla-env-after-pop.js b/js/src/jit-test/tests/debug/Environment-module-tla-env-after-pop.js new file mode 100644 index 0000000000..4d4d408d9e --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-module-tla-env-after-pop.js @@ -0,0 +1,54 @@ +// Accessing the variables in the snapshot after popping the module +// should work until the module's top-level script's evaluation finishes. + +var g = newGlobal({newCompartment: true}); +g.eval(` +var accessVarInSnapshot = null; +`); +g.eval(` +var resolve; +var p = new Promise(r => resolve = r); +`); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.environment.getVariable("x"), 10); + frame.eval("accessVarInSnapshot = function() { return ++x }"); + assertEq(gw.executeInGlobal("accessVarInSnapshot()").return, 11); +}; +const m = g.parseModule(` + let x = 10; + await 20; + debugger; + await p; +`); +moduleLink(m); + +// Run until `await p`. +moduleEvaluate(m); + +drainJobQueue(); + +assertEq(g.accessVarInSnapshot !== null, true); + +// At this point, the module's top-level script's evaluation isn't yet finished, +// and the module's ScriptSlot is still alive. +// Accessing the snapshot should work. +assertEq(g.accessVarInSnapshot(), 12); + +// Continue the module's top-level script's evaluation. +g.eval(` +resolve(); +`); + +drainJobQueue(); + +// At this point, the module's ScriptSlot is cleared and accessing the +// snapshot doesn't work. +try { + g.accessVarInSnapshot(); + // the above should throw. + assertEq(true, false); +} catch (e) { + assertEq(e+"", "ReferenceError: x is not defined"); +} diff --git a/js/src/jit-test/tests/debug/Environment-module-tla-env.js b/js/src/jit-test/tests/debug/Environment-module-tla-env.js new file mode 100644 index 0000000000..f75829d446 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-module-tla-env.js @@ -0,0 +1,16 @@ +// Taking frame snapshot after await should not crash. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + // Create DebugEnvironmentProxy. + frame.environment; +}; +const m = g.parseModule(` + var x = 0; + debugger; + await 10; + debugger; +`); +moduleLink(m); +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/debug/Environment-module-tla.js b/js/src/jit-test/tests/debug/Environment-module-tla.js new file mode 100644 index 0000000000..c66ab8070e --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-module-tla.js @@ -0,0 +1,25 @@ +// Debug environments for module environments should include variables that are +// are not closed over or exported, even after top-level-await. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + const env = frame.environment; + assertEq(env.names().join(','), "y,x,z"); + assertEq(env.getVariable('x'), 0); + assertEq(env.getVariable('y'), 1); + assertEq(env.getVariable('z'), 2); +}; +const m = g.parseModule(` + var x = 0; + export var y = 1; + const z = 2; + debugger; + await 10; + debugger; + await 10; + debugger; +`); +moduleLink(m); +moduleEvaluate(m); +drainJobQueue(); diff --git a/js/src/jit-test/tests/debug/Environment-names-01.js b/js/src/jit-test/tests/debug/Environment-names-01.js new file mode 100644 index 0000000000..be053fe6e0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-names-01.js @@ -0,0 +1,19 @@ +// env.names() lists nonenumerable names in with-statement environments. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +g.h = function () { + var env = dbg.getNewestFrame().environment; + var names = env.names(); + assertEq(names.indexOf("a") !== -1, true); + + // FIXME: Bug 748592 - proxies don't correctly propagate JSITER_HIDDEN + //assertEq(names.indexOf("b") !== -1, true); + //assertEq(names.indexOf("isPrototypeOf") !== -1, true); + hits++; +}; +g.eval("var obj = {a: 1};\n" + + "Object.defineProperty(obj, 'b', {value: 2});\n" + + "with (obj) h();"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Environment-names-02.js b/js/src/jit-test/tests/debug/Environment-names-02.js new file mode 100644 index 0000000000..9dd87f49a3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-names-02.js @@ -0,0 +1,34 @@ +// env.names() on object environments ignores property names that are not identifiers. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var withNames, globalNames; +g.h = function () { + var env = dbg.getNewestFrame().environment; + withNames = env.names(); + while (env.parent !== null) + env = env.parent; + globalNames = env.names(); +}; + +g.eval("" + + function fill(obj) { + obj.sanityCheck = 1; + obj["0xcafe"] = 2; + obj[" "] = 3; + obj[""] = 4; + obj[0] = 5; + obj[Symbol.for("moon")] = 6; + return obj; + }) +g.eval("fill(this);\n" + + "with (fill({})) h();"); + +for (var names of [withNames, globalNames]) { + assertEq(names.indexOf("sanityCheck") !== -1, true); + assertEq(names.indexOf("0xcafe"), -1); + assertEq(names.indexOf(" "), -1); + assertEq(names.indexOf(""), -1); + assertEq(names.indexOf("0"), -1); + assertEq(names.indexOf(Symbol.for("moon")), -1); +} diff --git a/js/src/jit-test/tests/debug/Environment-names-03.js b/js/src/jit-test/tests/debug/Environment-names-03.js new file mode 100644 index 0000000000..cffc7cb461 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-names-03.js @@ -0,0 +1,22 @@ +// Optimized out scopes should have working names(). + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +dbg.addDebuggee(g); + +g.eval("" + function f() { + var x = 42; + function g() { } + g(); +}); + +dbg.onEnterFrame = function (f) { + if (f.callee && (f.callee.name === "g")) { + var names = f.environment.parent.names(); + assertEq(names.indexOf("x") !== -1, true); + assertEq(names.indexOf("g") !== -1, true); + assertEq(names.length, 3); // x,g,arguments + } +} + +g.f(); diff --git a/js/src/jit-test/tests/debug/Environment-nondebuggee.js b/js/src/jit-test/tests/debug/Environment-nondebuggee.js new file mode 100644 index 0000000000..32c36a8b84 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-nondebuggee.js @@ -0,0 +1,40 @@ +// Using an environment that is not a debuggee should throw. + +load(libdir + 'asserts.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +let gw = dbg.addDebuggee(g); +var log; + +function check(env) { + assertEq(env.inspectable, false); + assertThrowsInstanceOf(() => env.type, Error); + assertThrowsInstanceOf(() => env.object, Error); + assertThrowsInstanceOf(() => env.parent, Error); + assertThrowsInstanceOf(() => env.calleeScript, Error); + + assertThrowsInstanceOf(() => env.names(), Error); + assertThrowsInstanceOf(() => env.find('x'), Error); + assertThrowsInstanceOf(() => env.getVariable('x'), Error); + assertThrowsInstanceOf(() => env.setVariable('x'), Error); +} + +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + + let env = frame.environment; + dbg.removeDebuggee(g); + check(env); +} + +log = ''; +g.eval('let x = 42; debugger;'); +assertEq(log, 'd'); + +dbg.addDebuggee(g); +g.eval('function f() { }'); +let env = gw.getOwnPropertyDescriptor('f').value.environment; +assertEq(env.type, 'declarative'); +dbg.removeDebuggee(g); +check(env); diff --git a/js/src/jit-test/tests/debug/Environment-object-01.js b/js/src/jit-test/tests/debug/Environment-object-01.js new file mode 100644 index 0000000000..c8f434bbb1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-object-01.js @@ -0,0 +1,9 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +dbg.onDebuggerStatement = (frame) => { + assertEq(frame.environment.parent.type, "with"); + assertEq(frame.environment.parent.parent.type, "object"); + assertEq(frame.environment.parent.parent.object.getOwnPropertyDescriptor("x").value, 42); +} +g.evalReturningScope("x = 42; debugger;"); diff --git a/js/src/jit-test/tests/debug/Environment-optimizedOut-01.js b/js/src/jit-test/tests/debug/Environment-optimizedOut-01.js new file mode 100644 index 0000000000..964148af9a --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-optimizedOut-01.js @@ -0,0 +1,44 @@ +// Optimized out scopes should be considered optimizedOut. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +dbg.addDebuggee(g); + +g.eval("" + function f() { + var x = 42; + { + let y = 43; + (function () { })(); + } +}); + +dbg.onEnterFrame = function (f) { + if (f.callee && (f.callee.name === undefined)) { + blockenv = f.environment.parent; + assertEq(blockenv.optimizedOut, true); + assertEq(blockenv.inspectable, true); + assertEq(blockenv.type, "declarative"); + assertEq(blockenv.calleeScript, null); + assertEq(blockenv.names().indexOf("y") !== -1, true); + + funenv = blockenv.parent; + assertEq(funenv.optimizedOut, true); + assertEq(funenv.inspectable, true); + assertEq(funenv.type, "declarative"); + assertEq(funenv.calleeScript, f.older.script); + assertEq(funenv.names().indexOf("x") !== -1, true); + + globalenv = funenv.parent.parent; + assertEq(globalenv.optimizedOut, false); + assertEq(globalenv.inspectable, true); + assertEq(globalenv.type, "object"); + assertEq(globalenv.calleeScript, null); + + dbg.removeDebuggee(g); + + assertEq(blockenv.inspectable, false); + assertEq(funenv.inspectable, false); + } +} + +g.f(); diff --git a/js/src/jit-test/tests/debug/Environment-parent-01.js b/js/src/jit-test/tests/debug/Environment-parent-01.js new file mode 100644 index 0000000000..e50f0cc82d --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-parent-01.js @@ -0,0 +1,18 @@ +// The objects on the environment chain are all Debugger.Environment objects. +// The environment chain ends in null. + +var g = newGlobal({newCompartment: true}) +g.eval("function f(a) { return function (b) { return function (c) { h(); return a + b + c; }; }; }"); +var dbg = Debugger(g); +var hits = 0; +g.h = function () { + var n = 0; + for (var env = dbg.getNewestFrame().environment; env !== null; env = env.parent) { + n++; + assertEq(env instanceof Debugger.Environment, true); + } + assertEq(n >= 4, true); + hits++; +}; +assertEq(g.f(5)(7)(9), 21); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Environment-scopeKind-01.js b/js/src/jit-test/tests/debug/Environment-scopeKind-01.js new file mode 100644 index 0000000000..729573f730 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-scopeKind-01.js @@ -0,0 +1,26 @@ +// Environment.prototype.scopeKind produces expected values. + +load(libdir + 'eqArrayHelper.js'); + +var g = newGlobal({ newCompartment: true }); +var dbg = Debugger(g); + +function getScopeKinds(text) { + const kinds = []; + dbg.onDebuggerStatement = frame => { + let env = frame.environment; + while (env) { + kinds.push(env.scopeKind); + env = env.parent; + } + }; + g.eval(text); + return kinds; +} + +assertEqArray(getScopeKinds("function f(x) { debugger; }; f()"), + ["function", "global", null]); +assertEqArray(getScopeKinds("function f(x) { let y = 0; debugger; }; f()"), + ["function lexical", "function", "global", null]); +assertEqArray(getScopeKinds("function f(x) { let y = 0; with(x) { debugger; } } f({})"), + [null, "function lexical", "function", "global", null]); diff --git a/js/src/jit-test/tests/debug/Environment-selfhosted-builtins.js b/js/src/jit-test/tests/debug/Environment-selfhosted-builtins.js new file mode 100644 index 0000000000..1026a486f4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-selfhosted-builtins.js @@ -0,0 +1,15 @@ +// The environment of self-hosted builtins is not exposed to the debugger and +// instead is reported as |undefined| just like native builtins. + +let g = newGlobal({newCompartment: true}); + +let dbg = new Debugger(); +let gw = dbg.addDebuggee(g); + +// Array is a known native builtin function. +let nativeBuiltin = gw.makeDebuggeeValue(g.Array); +assertEq(nativeBuiltin.environment, undefined); + +// Array.prototype[@@iterator] is a known self-hosted builtin function. +let selfhostedBuiltin = gw.makeDebuggeeValue(g.Array.prototype[Symbol.iterator]); +assertEq(selfhostedBuiltin.environment, undefined); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-01.js b/js/src/jit-test/tests/debug/Environment-setVariable-01.js new file mode 100644 index 0000000000..ed67774f79 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-01.js @@ -0,0 +1,9 @@ +// Environment.prototype.setVariable can set global variables. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + frame.environment.parent.setVariable("x", 2); +}; +g.eval("var x = 1; debugger;"); +assertEq(g.x, 2); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-02.js b/js/src/jit-test/tests/debug/Environment-setVariable-02.js new file mode 100644 index 0000000000..7fb7f5e02e --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-02.js @@ -0,0 +1,10 @@ +// The argument to setVariable can be a Debugger.Object. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +dbg.onDebuggerStatement = function (frame) { + frame.environment.parent.setVariable("x", gw); +}; +g.eval("var x = 1; debugger;"); +assertEq(g.x, g); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-03.js b/js/src/jit-test/tests/debug/Environment-setVariable-03.js new file mode 100644 index 0000000000..3fe0dee4d8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-03.js @@ -0,0 +1,16 @@ +// setVariable cannot create new global variables. +// (Other kinds of environment are tested in Environment-variables.js.) + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertThrowsInstanceOf(function () { frame.environment.setVariable("x", 7); }, TypeError); + hits++; +}; +g.eval("debugger"); +assertEq("x" in g, false); +assertEq(hits, 1); + diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-04.js b/js/src/jit-test/tests/debug/Environment-setVariable-04.js new file mode 100644 index 0000000000..d4b2347c79 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-04.js @@ -0,0 +1,10 @@ +// setVariable can set variables and arguments in functions. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + frame.environment.setVariable("a", 100); + frame.environment.setVariable("b", 200); +}; +g.eval("function f(a) { var b = a + 1; debugger; return a + b; }"); +assertEq(g.f(1), 300); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-05.js b/js/src/jit-test/tests/debug/Environment-setVariable-05.js new file mode 100644 index 0000000000..d78edad3bf --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-05.js @@ -0,0 +1,14 @@ +// setVariable can change the types of variables and arguments in functions. + +var g = newGlobal({newCompartment: true}); +g.eval("function f(a) { var b = a + 1; debugger; return a + b; }"); +for (var i = 0; i < 20; i++) + assertEq(g.f(i), 2 * i + 1); + +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + frame.environment.setVariable("a", "xyz"); + frame.environment.setVariable("b", "zy"); +}; +for (var i = 0; i < 10; i++) + assertEq(g.f(i), "xyzzy"); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-06.js b/js/src/jit-test/tests/debug/Environment-setVariable-06.js new file mode 100644 index 0000000000..9b235dfe7a --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-06.js @@ -0,0 +1,9 @@ +// setVariable on an argument works as expected with non-strict 'arguments'. + +var g = newGlobal({newCompartment: true}); +g.eval("function f(a) { debugger; return arguments[0]; }"); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + frame.environment.setVariable("a", 2); +}; +assertEq(g.f(1), 2); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-07.js b/js/src/jit-test/tests/debug/Environment-setVariable-07.js new file mode 100644 index 0000000000..2b58885335 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-07.js @@ -0,0 +1,14 @@ +// setVariable works on let-bindings. + +var g = newGlobal({newCompartment: true}); +function test(code, val) { + g.eval("function f() { " + code + " }"); + var dbg = new Debugger(g); + dbg.onDebuggerStatement = function (frame) { + frame.environment.setVariable("a", val); + }; + assertEq(g.f(), val); +} + +test("let a = 1; debugger; return a;", "xyzzy"); +test("{ let a = 1; debugger; return a; }", "plugh"); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-08.js b/js/src/jit-test/tests/debug/Environment-setVariable-08.js new file mode 100644 index 0000000000..35de70975b --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-08.js @@ -0,0 +1,29 @@ +// setVariable throws if no binding exists. + +load(libdir + "asserts.js"); + +function test(code) { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger(g); + var hits = 0; + dbg.onDebuggerStatement = function (frame) { + var env = frame.older.environment; + assertThrowsInstanceOf(function () { env.setVariable("y", 2); }, Error); + hits++; + }; + g.eval("var y = 0; function d() { debugger; }"); + + assertEq(g.eval(code), 0); + + assertEq(g.y, 0); + assertEq(hits, 1); +} + +// local scope of non-heavyweight function +test("function f() { var x = 1; d(); return y; } f();"); + +// block scope +test("function h(x) { if (x) { let x = 1; d(); return y; } } h(3);"); + +// strict eval scope +test("'use strict'; eval('d(); y;');"); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-10.js b/js/src/jit-test/tests/debug/Environment-setVariable-10.js new file mode 100644 index 0000000000..2ba46b06b3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-10.js @@ -0,0 +1,32 @@ +// setVariable works on non-innermost environments. + +// (The debuggee code here is a bit convoluted to defeat optimizations that +// could make obj.b a null closure or obj.i a flat closure--that is, a function +// that gets a frozen copy of i instead of a reference to the runtime +// environment that contains it. setVariable does not currently detect this +// flat closure case.) + +var g = newGlobal({newCompartment: true}); +g.eval("function d() { debugger; }\n" + + "var i = 'FAIL';\n" + + "function a() {\n" + + " var obj = {b: function (i) { d(obj); return i; },\n" + + " i: function () { return i; }};\n" + + " var i = 'FAIL2';\n" + + " return obj;\n" + + "}\n"); + +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + var x = 0; + for (var env = frame.older.environment; env; env = env.parent) { + if (env.getVariable("i") !== undefined) + env.setVariable("i", x++); + } +}; + +var obj = g.a(); +var r = obj.b('FAIL3'); +assertEq(r, 0); +assertEq(obj.i(), 1); +assertEq(g.i, 2); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-11.js b/js/src/jit-test/tests/debug/Environment-setVariable-11.js new file mode 100644 index 0000000000..d2030159d1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-11.js @@ -0,0 +1,16 @@ +// setVariable cannot modify the binding for a FunctionExpression's name. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var env = frame.environment.find("f"); + assertEq(env.getVariable("f"), frame.callee); + assertThrowsInstanceOf(function () { env.setVariable("f", 0) }, TypeError); + assertThrowsInstanceOf(function () { env.setVariable("f", frame.callee) }, TypeError); + hits++; +}; +g.eval("(function f() { eval(\"\"); debugger; })();"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-12.js b/js/src/jit-test/tests/debug/Environment-setVariable-12.js new file mode 100644 index 0000000000..6806ad9196 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-12.js @@ -0,0 +1,21 @@ +// setVariable can create a new property on a with block's bindings object, if +// it is shadowing an existing property on the prototype chain. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + var env = frame.environment.find("x"); + env.setVariable("x", 2); +}; +g.eval("var obj1 = {x: 1}, obj2 = Object.create(obj1), z; with (obj2) { debugger; z = x; }"); +assertEq(g.obj1.x, 1); +assertEq(g.obj2.x, 2); +assertEq(g.z, 2); + +// The property created by setVariable is like the one created by ordinary +// assignment in a with-block. +var desc = Object.getOwnPropertyDescriptor(g.obj2, "x"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, true); +assertEq(desc.writable, true); +assertEq(desc.value, 2); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-13.js b/js/src/jit-test/tests/debug/Environment-setVariable-13.js new file mode 100644 index 0000000000..9e9f1653b6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-13.js @@ -0,0 +1,20 @@ +// Debugger.Environment should throw trying to setVariable on optimized out scope. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +dbg.addDebuggee(g); + +g.eval("" + function f() { + var x = 42; + function g() { } + g(); +}); + +dbg.onEnterFrame = function (f) { + if (f.callee && (f.callee.name === "g")) + assertThrowsInstanceOf(function () { f.environment.parent.setVariable("x", 43) }, ReferenceError); +} + +g.f(); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-14.js b/js/src/jit-test/tests/debug/Environment-setVariable-14.js new file mode 100644 index 0000000000..a346a37c6a --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-14.js @@ -0,0 +1,31 @@ +// Debugger.Environment should throw trying to setVariable on a const binding. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +dbg.addDebuggee(g); + +g.eval("" + function unaliased() { + const x = 42; + assertEq(x, 42); +}); + +g.eval("" + function aliased() { + const x = 42; + assertEq(x, 42); + return () => x; +}); + +dbg.onEnterFrame = (frame) => { + frame.onStep = () => { + if (frame.environment.getVariable("x") === 42) { + assertThrowsInstanceOf(() => frame.environment.setVariable("x", 43), TypeError); + assertEq(frame.environment.getVariable("x"), 42); + } + }; +}; + +g.unaliased(); + +g.aliased(); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-15.js b/js/src/jit-test/tests/debug/Environment-setVariable-15.js new file mode 100644 index 0000000000..abb8a9687c --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-15.js @@ -0,0 +1,34 @@ +// Debugger.Environment should throw trying to setVariable on a const binding. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +dbg.addDebuggee(g); + +dbg.onEnterFrame = (frame) => { + frame.onStep = () => { + if (frame.environment.getVariable("x") === 42) { + assertThrowsInstanceOf(() => frame.environment.setVariable("x", 43), TypeError); + assertEq(frame.environment.getVariable("x"), 42); + } + }; +}; + +const unaliased = g.parseModule(` + const x = 42; + assertEq(x, 42); +`); +moduleLink(unaliased); +moduleEvaluate(unaliased); + +const aliased = g.parseModule(` + const x = 42; + assertEq(x, 42); + + function closedOver() { + return x; + } +`); +moduleLink(aliased); +moduleEvaluate(aliased); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-16.js b/js/src/jit-test/tests/debug/Environment-setVariable-16.js new file mode 100644 index 0000000000..3b95a2d290 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-16.js @@ -0,0 +1,16 @@ +(function () { + const otherDebugger = newGlobal({ sameZoneAs: this }).Debugger; + const dbg = otherDebugger(this); + + const env = dbg.getNewestFrame().callee.environment; + var ran = false; + try { + env.setVariable("tdz_variable", 10); + ran = true; + } catch (e) { } + assertEq(ran, false); +})(); + +// We shouldn't crash when initializing this. +let tdz_variable = 10; + diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-17.js b/js/src/jit-test/tests/debug/Environment-setVariable-17.js new file mode 100644 index 0000000000..bb09157b7d --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-17.js @@ -0,0 +1,17 @@ +function f() { + (function () { + const otherDebugger = newGlobal({ sameZoneAs: this }).Debugger; + const dbg = otherDebugger(this); + + const env = dbg.getNewestFrame().callee.environment; + var ran = false; + try { + env.setVariable("tdz_variable", 10); + ran = true; + } catch (e) { } + assertEq(ran, false); + })(); + + let tdz_variable = 10; +} +f(); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-18.js b/js/src/jit-test/tests/debug/Environment-setVariable-18.js new file mode 100644 index 0000000000..85339d96a9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-18.js @@ -0,0 +1,24 @@ +function f() { + (function () { + const otherDebugger = newGlobal({ sameZoneAs: this }).Debugger; + const dbg = otherDebugger(this); + + const env = dbg.getNewestFrame().callee.environment; + var ran = false; + try { + // this should throw, as tdz_variable is still in the tdz at + // this point. + env.setVariable("tdz_variable", 10); + ran = true; + } catch (e) { } + assertEq(ran, false); + })(); + + function bar() { + return tdz_variable; + } + + + let tdz_variable = 10; +} +f(); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-19.js b/js/src/jit-test/tests/debug/Environment-setVariable-19.js new file mode 100644 index 0000000000..ed6f142364 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-19.js @@ -0,0 +1,22 @@ +// Access on non-syntactic lexical environment's binding. + +var g = newGlobal(); +g.evaluate(` +(function () { + const otherDebugger = newGlobal({ sameZoneAs: this }).Debugger; + const dbg = otherDebugger(this); + + const env = dbg.getNewestFrame().callee.environment; + var ran = false; + try { + env.setVariable("tdz_variable", 10); + ran = true; + } catch (e) { } + assertEq(ran, false); +})(); + +// We shouldn't crash when initializing this. +let tdz_variable = 10; +`, { + envChainObject: {}, +}); diff --git a/js/src/jit-test/tests/debug/Environment-setVariable-WouldRun.js b/js/src/jit-test/tests/debug/Environment-setVariable-WouldRun.js new file mode 100644 index 0000000000..a9d97dfacc --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-setVariable-WouldRun.js @@ -0,0 +1,23 @@ +// setVariable triggering a setter throws WouldRunDebuggee. + +load(libdir + "asserts.js"); + +function test(code) { + var g = newGlobal({newCompartment: true}); + g.eval("function d() { debugger; }"); + var dbg = Debugger(g); + var hits = 0; + dbg.onDebuggerStatement = function (frame) { + var env = frame.older.environment.find("x"); + assertThrowsInstanceOf( + () => env.setVariable("x", 0), + Debugger.DebuggeeWouldRun); + hits++; + }; + g.eval(code); + assertEq(hits, 1); +} + +test("Object.defineProperty(this, 'x', {set: function (v) {}}); d();"); +test("Object.defineProperty(Object.prototype, 'x', {set: function (v) {}}); d();"); +test("with ({set x(v) {}}) eval(d());"); diff --git a/js/src/jit-test/tests/debug/Environment-type-01.js b/js/src/jit-test/tests/debug/Environment-type-01.js new file mode 100644 index 0000000000..39b339cb39 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-type-01.js @@ -0,0 +1,29 @@ +// env.type is 'object' in global environments and with-blocks, and 'declarative' otherwise. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +function test(code, expected) { + var actual = ''; + g.h = function () { actual += dbg.getNewestFrame().environment.type; } + g.eval(code); + assertEq(actual, expected); +} + +test("h();", 'declarative'); +test("(function (s) { eval(s); })('var v = h();')", 'declarative'); +test("(function (s) { h(); })();", 'declarative'); +test("{let x = 1, y = 2; h();}", 'declarative'); +test("with({x: 1, y: 2}) h();", 'with'); +test("(function (s) { with ({x: 1, y: 2}) h(); })();", 'with'); +test("{ let x = 1; h(); }", 'declarative'); +test("for (let x = 0; x < 1; x++) h();", 'declarative'); +test("for (let x in h()) ;", 'declarative'); +test("for (let x in {a:1}) h();", 'declarative'); +test("try { throw new Error; } catch (x) { h(x) }", 'declarative'); +test("'use strict'; eval('var z = 1; h();');", 'declarative'); + +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.eval("h(), 2 + 2;").return, 4); +} +test("debugger;", 'declarative'); +test("(function f() { debugger; })();", 'declarative'); diff --git a/js/src/jit-test/tests/debug/Environment-unscopables.js b/js/src/jit-test/tests/debug/Environment-unscopables.js new file mode 100644 index 0000000000..d738fc11b3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-unscopables.js @@ -0,0 +1,37 @@ +// An Environment for a `with` statement does not observe bindings ruled out by @@unscopables. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval(` + let x = 'global'; + function f() { + let obj = { + x: 'obj', + y: 'obj', + [Symbol.unscopables]: {x: 1}, + }; + with (obj) + debugger; + } +`); +let dbg = Debugger(g); +let hits = 0; +dbg.onDebuggerStatement = function (frame) { + let env = frame.environment; + + assertEq(env.find("x") !== env, true); + assertEq(env.names().indexOf("x"), -1); + assertEq(env.getVariable("x"), undefined); + assertThrowsInstanceOf(() => env.setVariable("x", 7), TypeError); + + assertEq(env.find("y") === env, true); + assertEq(env.getVariable("y"), "obj"); + env.setVariable("y", 8); + + assertEq(frame.eval("x").return, "global"); + assertEq(frame.eval("y").return, 8); + hits++; +}; +g.f(); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Environment-variables.js b/js/src/jit-test/tests/debug/Environment-variables.js new file mode 100644 index 0000000000..7a9b7072c4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Environment-variables.js @@ -0,0 +1,85 @@ +// Comprehensive test of get/setVariable on many kinds of environments and +// bindings. + +load(libdir + "asserts.js"); + +var cases = [ + // global bindings and bindings on the global prototype chain + "x = VAL; @@", + "var x = VAL; @@", + "Object.prototype.x = VAL; @@", + + // let and catch bindings + "let x = VAL; @@", + "{ let x = VAL; @@ }", + "try { throw VAL; } catch (x) { @@ }", + "try { throw VAL; } catch (x) { @@ }", + "for (let x of [VAL]) { @@ }", + "switch (0) { default: let x = VAL; @@ }", + + // arguments + "function f(x) { @@ } f(VAL);", + "function f([w, x]) { @@ } f([0, VAL]);", + "function f({v: x}) { @@ } f({v: VAL});", + "function f([w, {v: x}]) { @@ } f([0, {v: VAL}]);", + + // bindings in functions + "function f() { var x = VAL; @@ } f();", + "function f() { let x = VAL; @@ } f();", + "function f() { function x() {} x = VAL; @@ } f();", + + // dynamic bindings + "function f(s) { eval(s); @@ } f('var x = VAL');", + "var x = VAL; function f(s) { eval('var x = 0;'); eval(s); @@ } f('delete x;');", + "function f(obj) { with (obj) { @@ } } f({x: VAL});", + "function f(obj) { with (obj) { @@ } } f(Object.create({x: VAL}));", + "function f(b) { if (b) { function x(){} } x = VAL; @@ } f(1);", +]; + +var nextval = 1000; + +function test(code, debugStmts, followupStmts) { + var val = nextval++; + var hits = 0; + + var g = newGlobal({newCompartment: true}); + g.eval("function debugMe() { var x = 'wrong-x'; eval(\"\"); debugger; }"); + g.capture = null; + + var dbg = Debugger(g); + dbg.onDebuggerStatement = function (frame) { + if (frame.callee !== null && frame.callee.name == 'debugMe') + frame = frame.older; + var env = frame.environment.find("x"); + assertEq(env.getVariable("x"), val) + assertEq(env.setVariable("x", 'ok'), undefined); + assertEq(env.getVariable("x"), 'ok'); + + // setVariable cannot create new variables. + assertThrowsInstanceOf(function () { env.setVariable("newVar", 0); }, TypeError); + hits++; + }; + + code = code.replace("@@", debugStmts); + if (followupStmts !== undefined) + code += " " + followupStmts; + code = code.replace(/VAL/g, String(val)); + g.eval(code); + assertEq(hits, 1); +} + +for (var s of cases) { + // Test triggering the debugger right in the scope in which x is bound. + test(s, "eval(\"\"); debugger; assertEq(x, 'ok');"); + + // Test calling a function that triggers the debugger. + test(s, "debugMe(); assertEq(x, 'ok');"); + + // Test triggering the debugger from a scope nested in x's scope. + test(s, "{ let y = 'irrelevant'; (function (z) { { let zz = y; eval(\"\"); debugger; } })(); } assertEq(x, 'ok');"), + + // Test closing over the variable and triggering the debugger later, after + // leaving the variable's scope. + test(s, "capture = {dbg: function () { eval(\"\"); debugger; }, get x() { return x; }};", + "assertEq(capture.x, VAL); capture.dbg(); assertEq(capture.x, 'ok');"); +} diff --git a/js/src/jit-test/tests/debug/Frame-01.js b/js/src/jit-test/tests/debug/Frame-01.js new file mode 100644 index 0000000000..9619fab8f0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-01.js @@ -0,0 +1,34 @@ +// Test .type fields of topmost stack frame passed to onDebuggerStatement. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var expected, hits; +dbg.onDebuggerStatement = function (f) { + assertEq(Object.getPrototypeOf(f), Debugger.Frame.prototype); + assertEq(f.type, expected.type); + assertEq(f.script.isGeneratorFunction, expected.generator); + assertEq(f.constructing, expected.constructing); + hits++; +}; + +function test(code, expectobj, expectedHits) { + expected = expectobj; + hits = 0; + g.evaluate(code); + assertEq(hits, arguments.length < 3 ? 1 : expectedHits); +} + +test("debugger;", {type: "global", generator: false, constructing: false}); +test("(function () { debugger; })();", {type: "call", generator: false, constructing: false}); +test("new function() { debugger; };", {type: "call", generator: false, constructing: true}); +test("new function () { (function() { debugger; })(); }", {type: "call", generator: false, constructing: false}); +test("eval('debugger;');", {type: "eval", generator: false, constructing: false}); +test("this.eval('debugger;'); // indirect eval", {type: "eval", generator: false, constructing: false}); +test("(function () { eval('debugger;'); })();", {type: "eval", generator: false, constructing: false}); +test("new function () { eval('debugger'); }", {type: "eval", generator: false, constructing: false}); +test("function* gen() { debugger; yield 1; debugger; }\n" + + "for (var x of gen()) {}\n", + {type: "call", generator: true, constructing: false}, 2); +test("var iter = (function* stargen() { debugger; yield 1; debugger; })();\n" + + "iter.next(); iter.next();", + {type: "call", generator: true, constructing: false}, 2); diff --git a/js/src/jit-test/tests/debug/Frame-02.js b/js/src/jit-test/tests/debug/Frame-02.js new file mode 100644 index 0000000000..dddb1e7024 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-02.js @@ -0,0 +1,24 @@ +// When the debugger is triggered twice from the same stack frame, the same +// Debugger.Frame object is passed to the hook both times. + +var g = newGlobal({newCompartment: true}); +var hits, frame; +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (f) { + if (hits++ == 0) + frame = f; + else + assertEq(f, frame); +}; + +hits = 0; +g.evaluate("debugger; debugger;"); +assertEq(hits, 2); + +hits = 0; +g.evaluate("function f() { debugger; debugger; } f();"); +assertEq(hits, 2); + +hits = 0; +g.evaluate("eval('debugger; debugger;');"); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Frame-03.js b/js/src/jit-test/tests/debug/Frame-03.js new file mode 100644 index 0000000000..19a300084a --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-03.js @@ -0,0 +1,19 @@ +// When the debugger is triggered from different stack frames that happen to +// occupy the same memory, it delivers different Debugger.Frame objects. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits; +var a = []; +dbg.onDebuggerStatement = function (frame) { + for (var i = 0; i < a.length; i++) + assertEq(a[i] === frame, false); + a.push(frame); + hits++; +}; + +g.eval("function f() { debugger; }"); +g.eval("function h() { debugger; f(); }"); +hits = 0; +g.eval("for (var i = 0; i < 4; i++) h();"); +assertEq(hits, 8); diff --git a/js/src/jit-test/tests/debug/Frame-arguments-01.js b/js/src/jit-test/tests/debug/Frame-arguments-01.js new file mode 100644 index 0000000000..29a68b7cf4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-arguments-01.js @@ -0,0 +1,41 @@ +// Frame.prototype.arguments with primitive values + +var g = newGlobal({newCompartment: true}); +g.args = null; +var dbg = new Debugger(g); +var hits; +var v; +dbg.onDebuggerStatement = function (frame) { + hits++; + var args = frame.arguments; + assertEq(args instanceof Array, true); + assertEq(Array.isArray(args), false); + assertEq(args, frame.arguments); + assertEq(args.length, g.args.length); + for (var i = 0; i < args.length; i++) + assertEq(args[i], g.args[i]); +}; + +// no formal parameters +g.eval("function f() { debugger; }"); + +hits = 0; +g.eval("args = []; f();"); +g.eval("this.f();"); +g.eval("var world = Symbol('world'); " + + "args = ['hello', world, 3.14, true, false, null, undefined]; " + + "f('hello', world, 3.14, true, false, null, undefined);"); +g.eval("f.apply(undefined, args);"); +g.eval("args = [-0, NaN, -1/0]; this.f(-0, NaN, -1/0);"); +assertEq(hits, 5); + +// with formal parameters +g.eval("function f(a, b) { debugger; }"); + +hits = 0; +g.eval("args = []; f();"); +g.eval("this.f();"); +g.eval("args = ['a', 'b']; f('a', 'b');"); +g.eval("this.f('a', 'b');"); +g.eval("f.bind(null, 'a')('b');"); +assertEq(hits, 5); diff --git a/js/src/jit-test/tests/debug/Frame-arguments-02.js b/js/src/jit-test/tests/debug/Frame-arguments-02.js new file mode 100644 index 0000000000..145ec824d8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-arguments-02.js @@ -0,0 +1,19 @@ +// Object arguments. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var args = frame.arguments; + assertEq(args, frame.arguments); + assertEq(args instanceof Array, true); + assertEq(args.length, 2); + assertEq(args[0] instanceof Debugger.Object, true); + assertEq(args[0].class, args[1]); + hits++; +}; + +g.eval("function f(obj, cls) { debugger; }"); +g.eval("f({}, 'Object');"); +g.eval("f(Date, 'Function');"); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Frame-arguments-03.js b/js/src/jit-test/tests/debug/Frame-arguments-03.js new file mode 100644 index 0000000000..b2d36eb0b5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-arguments-03.js @@ -0,0 +1,34 @@ +// Destructuring arguments. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var args = frame.arguments; + assertEq(args[0], 1); + assertEq(args.length, 4); + + assertEq(args[1] instanceof Debugger.Object, true); + assertEq(args[1].class, "Array"); + var getprop = frame.eval("(function (p) { return this[p]; })").return; + assertEq(getprop instanceof Debugger.Object, true); + assertEq(getprop.apply(args[1], ["length"]).return, 2); + assertEq(getprop.apply(args[1], [0]).return, 2); + assertEq(getprop.apply(args[1], [1]).return, 3); + + assertEq(args[2] instanceof Debugger.Object, true); + assertEq(args[2].class, "Object"); + var x = getprop.apply(args[2], ["x"]).return; + assertEq(x.class, "Array"); + assertEq(getprop.apply(x, ["0"]).return, 4); + assertEq(getprop.apply(args[2], ["z"]).return, 5); + + assertEq(args[3] instanceof Debugger.Object, true); + assertEq(args[3].class, "Object"); + assertEq(getprop.apply(args[3], ["q"]).return, 6); + hits++; +}; + +g.eval("function f(a, [b, c], {x: [y], z: w}, {q}) { debugger; }"); +g.eval("f(1, [2, 3], {x: [4], z: 5}, {q: 6});"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Frame-arguments-04.js b/js/src/jit-test/tests/debug/Frame-arguments-04.js new file mode 100644 index 0000000000..21db3560aa --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-arguments-04.js @@ -0,0 +1,18 @@ +// frame.arguments works for all live frames + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + for (var i = 0; i <= 4; i++) { + assertEq(frame.arguments.length, 1); + assertEq(frame.arguments[0], i); + frame = frame.older; + } + assertEq(frame, null); + hits++; +}; + +g.eval("function f(n) { if (n == 0) debugger; else f(n - 1); }"); +g.f(4); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Frame-arguments-05.js b/js/src/jit-test/tests/debug/Frame-arguments-05.js new file mode 100644 index 0000000000..bc34809b11 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-arguments-05.js @@ -0,0 +1,19 @@ +// frame.arguments is "live" (it reflects assignments to arguments). + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log = ''; +var args; +dbg.onDebuggerStatement = function (frame) { + if (args === undefined) + args = frame.arguments; + else + assertEq(frame.arguments, args); + log += args[0]; + assertEq(frame.eval("x = '0';").return, '0'); + log += args[0]; +}; + +g.eval("function f(x) { x = '2'; debugger; x = '3'; debugger; }"); +g.f("1"); +assertEq(log, "2030"); diff --git a/js/src/jit-test/tests/debug/Frame-arguments-06.js b/js/src/jit-test/tests/debug/Frame-arguments-06.js new file mode 100644 index 0000000000..ade1b6ac8f --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-arguments-06.js @@ -0,0 +1,38 @@ +// Test extracting frame.arguments element getters and calling them in +// various awkward ways. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +var fframe, farguments, fgetter; +dbg.onDebuggerStatement = function (frame) { + if (hits === 0) { + fframe = frame; + farguments = frame.arguments; + fgetter = Object.getOwnPropertyDescriptor(farguments, "0").get; + assertEq(fgetter instanceof Function, true); + + // Calling the getter without an appropriate this-object + // fails, but shouldn't assert or crash. + assertThrowsInstanceOf(function () { fgetter.call(Math); }, TypeError); + } else { + // Since fframe is still on the stack, fgetter can be applied to it. + assertEq(fframe.onStack, true); + assertEq(fgetter.call(farguments), 100); + + // Since h was called without arguments, there is no argument 0. + assertEq(fgetter.call(frame.arguments), undefined); + } + hits++; +}; + +g.eval("function h() { debugger; }"); +g.eval("function f(x) { debugger; h(); }"); +g.f(100); +assertEq(hits, 2); + +// Now that fframe is no longer live, trying to get its arguments should throw. +assertEq(fframe.onStack, false); +assertThrowsInstanceOf(function () { fgetter.call(farguments); }, Error); diff --git a/js/src/jit-test/tests/debug/Frame-arguments-07.js b/js/src/jit-test/tests/debug/Frame-arguments-07.js new file mode 100644 index 0000000000..a73e4e97ed --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-arguments-07.js @@ -0,0 +1,24 @@ +// When argument[x] is assigned, where x > callee.length, frame.arguments reflects the change. + +var g = newGlobal({newCompartment: true}); +g.eval("function f(a, b) {\n" + + " for (var i = 0; i < arguments.length; i++)\n" + + " arguments[i] = i;\n" + + " eval(\"\");\n" + + " debugger;\n" + + "}\n"); + +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var argc = frame.eval("arguments.length").return; + var args = frame.arguments; + assertEq(args.length, argc); + for (var i = 0; i < argc; i++) + assertEq(args[i], i); + hits++; +} + +g.f(9); +g.f(9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Frame-asyncPromise-01.js b/js/src/jit-test/tests/debug/Frame-asyncPromise-01.js new file mode 100644 index 0000000000..d8ac80a6ce --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-asyncPromise-01.js @@ -0,0 +1,72 @@ +// Testing the promise property on async function frames. + +load(libdir + 'asserts.js'); + +var g = newGlobal({ newCompartment: true }); +var dbg = Debugger(g); +g.eval(` +async function f() { + debugger; + await Promise.resolve(); + debugger; +} +`); + +let frame; +const promises = []; +dbg.onEnterFrame = function(f) { + frame = f; + promises.push(["start", frame.asyncPromise]); + + dbg.onEnterFrame = function(f) { + assertEq(f, frame); + promises.push(["resume", frame.asyncPromise]); + }; + + frame.onPop = function() { + promises.push(["suspend", frame.asyncPromise]); + + frame.onPop = function() { + promises.push(["finish", frame.asyncPromise]); + }; + }; + + dbg.onDebuggerStatement = function(f) { + assertEq(f, frame); + promises.push(["dbg", frame.asyncPromise]); + }; +}; + +(async () => { + const resultPromise = g.f(); + + const framePromise = frame.asyncPromise; + assertEq(framePromise instanceof Debugger.Object, true); + assertEq(framePromise.unsafeDereference(), resultPromise); + + assertEq(promises.length, 3); + assertEq(promises[0][0], "start"); + assertEq(promises[0][1], null); + + assertEq(promises[1][0], "dbg"); + assertEq(promises[1][1], framePromise); + + assertEq(promises[2][0], "suspend"); + assertEq(promises[2][1], framePromise); + + await resultPromise; + + // Frame has terminated, so accessing the property throws. + assertThrowsInstanceOf(() => frame.asyncPromise, Error); + + assertEq(promises.length, 6); + + assertEq(promises[3][0], "resume"); + assertEq(promises[3][1], framePromise); + + assertEq(promises[4][0], "dbg"); + assertEq(promises[4][1], framePromise); + + assertEq(promises[5][0], "finish"); + assertEq(promises[5][1], framePromise); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-asyncPromise-02.js b/js/src/jit-test/tests/debug/Frame-asyncPromise-02.js new file mode 100644 index 0000000000..c65d13f9c5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-asyncPromise-02.js @@ -0,0 +1,26 @@ +// Test the promise property on normal function frames. + +load(libdir + 'asserts.js'); + +var g = newGlobal({ newCompartment: true }); +var dbg = Debugger(g); +g.eval(` +function f() { + debugger; +} +`); + +let frame; +const promises = []; +dbg.onDebuggerStatement = function(f) { + frame = f; + promises.push(frame.asyncPromise); +}; + +const resultPromise = g.f(); + +// Frame has terminated, so accessing the property throws. +assertThrowsInstanceOf(() => frame.asyncPromise, Error); + +assertEq(promises.length, 1); +assertEq(promises[0], undefined); diff --git a/js/src/jit-test/tests/debug/Frame-asyncPromise-03.js b/js/src/jit-test/tests/debug/Frame-asyncPromise-03.js new file mode 100644 index 0000000000..8dee273c28 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-asyncPromise-03.js @@ -0,0 +1,39 @@ +// Test the promise property on generator function frames. + +load(libdir + 'asserts.js'); + +var g = newGlobal({ newCompartment: true }); +var dbg = Debugger(g); +g.eval(` +function* f() { + debugger; + yield; + debugger; +} +`); + +let frame; +const promises = []; +dbg.onDebuggerStatement = function(f) { + frame = f; + promises.push(frame.asyncPromise); +}; + +const it = g.f(); + +assertEq(promises.length, 0); + +it.next(); + +assertEq(frame.asyncPromise, undefined); + +assertEq(promises.length, 1); +assertEq(promises[0], undefined); + +it.next(); + +// Frame has terminated, so accessing the property throws. +assertThrowsInstanceOf(() => frame.asyncPromise, Error); + +assertEq(promises.length, 2); +assertEq(promises[1], undefined); diff --git a/js/src/jit-test/tests/debug/Frame-asyncPromise-04.js b/js/src/jit-test/tests/debug/Frame-asyncPromise-04.js new file mode 100644 index 0000000000..1d2a6bf55f --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-asyncPromise-04.js @@ -0,0 +1,104 @@ +// Test the promise property on async generator function frames. + +load(libdir + 'asserts.js'); + +var g = newGlobal({ newCompartment: true }); +var dbg = Debugger(g); +g.eval(` +async function* f() { + debugger; + yield 42; + debugger; + return 50 +} +`); + +let frame; +const promises = []; +dbg.onEnterFrame = function(f) { + frame = f; + promises.push(["enter", frame.asyncPromise]); + + frame.onPop = function() { + promises.push(["leave", frame.asyncPromise]); + }; + + dbg.onDebuggerStatement = function(f) { + assertEq(f, frame); + promises.push(["dbg", frame.asyncPromise]); + }; +}; + + +(async () => { + const it = g.f(); + + // Promise is null until initial iteration. + assertEq(frame.asyncPromise, null); + + assertEq(promises.length, 2); + assertEq(promises[0][0], "enter"); + assertEq(promises[0][1], null); + + assertEq(promises[1][0], "leave"); + assertEq(promises[1][1], null); + + + const result1Promise = it.next(); + + const frameIt1Promise = frame.asyncPromise; + assertEq(frameIt1Promise instanceof Debugger.Object, true); + assertEq(frameIt1Promise.unsafeDereference(), result1Promise); + + assertEq(promises.length, 5); + assertEq(promises[2][0], "enter"); + assertEq(promises[2][1], frameIt1Promise); + + assertEq(promises[3][0], "dbg"); + assertEq(promises[3][1], frameIt1Promise); + + assertEq(promises[4][0], "leave"); + assertEq(promises[4][1], frameIt1Promise); + + await result1Promise; + + // Iteration step has fully completed, so promise state has been cleared. + assertEq(frame.asyncPromise, null); + + assertEq(promises.length, 7); + assertEq(promises[5][0], "enter"); + assertEq(promises[5][1], frameIt1Promise); + + assertEq(promises[6][0], "leave"); + assertEq(promises[6][1], frameIt1Promise); + + + const result2Promise = it.next(); + + const frameIt2Promise = frame.asyncPromise; + assertEq(frameIt2Promise instanceof Debugger.Object, true); + assertEq(frameIt2Promise.unsafeDereference(), result2Promise); + assertEq(frameIt1Promise !== frameIt2Promise, true); + + assertEq(promises.length, 10); + assertEq(promises[7][0], "enter"); + assertEq(promises[7][1], frameIt2Promise); + + assertEq(promises[8][0], "dbg"); + assertEq(promises[8][1], frameIt2Promise); + + assertEq(promises[9][0], "leave"); + assertEq(promises[9][1], frameIt2Promise); + + await result2Promise; + + // Frame has terminated, so accessing the property throws. + assertThrowsInstanceOf(() => frame.asyncPromise, Error); + + assertEq(promises.length, 12); + assertEq(promises[10][0], "enter"); + assertEq(promises[10][1], frameIt2Promise); + + assertEq(promises[11][0], "leave"); + assertEq(promises[11][1], frameIt2Promise); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-callee-01.js b/js/src/jit-test/tests/debug/Frame-callee-01.js new file mode 100644 index 0000000000..05daf85784 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-callee-01.js @@ -0,0 +1,26 @@ +// Frame.prototype.callee for a normal function frame. + +load(libdir + "asserts.js"); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +g.eval(` +function f() {} +`); + +const fObj = dbg.makeGlobalObjectReference(g).makeDebuggeeValue(g.f); +let frame; +let callee; +dbg.onEnterFrame = function(f) { + frame = f; + callee = frame.callee; +}; + +g.f(); + +assertEq(frame instanceof Debugger.Frame, true); +assertEq(callee instanceof Debugger.Object, true); +assertEq(callee, fObj); + +// The frame has finished evaluating, so the callee is no longer accessible. +assertThrowsInstanceOf(() => frame.callee, Error); diff --git a/js/src/jit-test/tests/debug/Frame-callee-02.js b/js/src/jit-test/tests/debug/Frame-callee-02.js new file mode 100644 index 0000000000..ca1c979cca --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-callee-02.js @@ -0,0 +1,37 @@ +// Frame.prototype.callee for a generator function frame. + +load(libdir + "asserts.js"); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +g.eval(` +function* f() {} +`); + +const fObj = dbg.makeGlobalObjectReference(g).makeDebuggeeValue(g.f); +let frame; +let callee; +dbg.onEnterFrame = function(f) { + frame = f; + callee = frame.callee; +}; + +const it = g.f(); + +assertEq(frame instanceof Debugger.Frame, true); +assertEq(callee instanceof Debugger.Object, true); +assertEq(callee, fObj); +assertEq(frame.callee, callee); + +const lastFrame = frame; +const lastCallee = callee; +frame = null; +callee = null; + +it.next(); + +assertEq(frame, lastFrame); +assertEq(callee, lastCallee); + +// The frame has finished evaluating, so the callee is no longer accessible. +assertThrowsInstanceOf(() => frame.callee, Error); diff --git a/js/src/jit-test/tests/debug/Frame-callee-03.js b/js/src/jit-test/tests/debug/Frame-callee-03.js new file mode 100644 index 0000000000..fc0f6f51eb --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-callee-03.js @@ -0,0 +1,37 @@ +// Frame.prototype.callee for an async function frame. + +load(libdir + "asserts.js"); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +g.eval(` +async function f() { await Promise.resolve(); } +`); + +const fObj = dbg.makeGlobalObjectReference(g).makeDebuggeeValue(g.f); +let frame; +let callee; +dbg.onEnterFrame = function(f) { + frame = f; + callee = frame.callee; +}; + +const promise = g.f(); + +assertEq(frame instanceof Debugger.Frame, true); +assertEq(callee instanceof Debugger.Object, true); +assertEq(callee, fObj); +assertEq(frame.callee, callee); + +const lastFrame = frame; +const lastCallee = callee; +frame = null; +callee = null; + +promise.then(() => { + assertEq(frame, lastFrame); + assertEq(callee, lastCallee); + + // The frame has finished evaluating, so the callee is no longer accessible. + assertThrowsInstanceOf(() => frame.callee, Error); +}); diff --git a/js/src/jit-test/tests/debug/Frame-callee-04.js b/js/src/jit-test/tests/debug/Frame-callee-04.js new file mode 100644 index 0000000000..a260b7d9e6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-callee-04.js @@ -0,0 +1,47 @@ +// Frame.prototype.callee for an async generator function frame. + +load(libdir + "asserts.js"); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +g.eval(` +async function* f() { await Promise.resolve(); } +`); + +const fObj = dbg.makeGlobalObjectReference(g).makeDebuggeeValue(g.f); +let frame; +let callee; +dbg.onEnterFrame = function(f) { + frame = f; + callee = frame.callee; +}; + +const it = g.f(); + +assertEq(frame instanceof Debugger.Frame, true); +assertEq(callee instanceof Debugger.Object, true); +assertEq(callee, fObj); +assertEq(frame.callee, callee); + +let lastFrame = frame; +let lastCallee = callee; +frame = null; +callee = null; + +const promise = it.next(); + +assertEq(callee, fObj); +assertEq(frame.callee, callee); + +lastFrame = frame; +lastCallee = callee; +frame = null; +callee = null; + +promise.then(() => { + assertEq(frame, lastFrame); + assertEq(callee, lastCallee); + + // The frame has finished evaluating, so the callee is no longer accessible. + assertThrowsInstanceOf(() => frame.callee, Error); +}); diff --git a/js/src/jit-test/tests/debug/Frame-constructing-01.js b/js/src/jit-test/tests/debug/Frame-constructing-01.js new file mode 100644 index 0000000000..c17a454512 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-constructing-01.js @@ -0,0 +1,27 @@ +// Debugger.Frame.prototype.constructing on a generator. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); + +g.eval(` +function* f() {} +`); + +let frame; +dbg.onEnterFrame = function(f) { + frame = f; + assertEq(frame.constructing, false); +}; + +const it = g.f(); + +assertEq(frame.constructing, false); +frame = null; + +it.next(); + +assertEq(!!frame, true); +// Throws because the frame has terminated. +assertThrowsInstanceOf(() => frame.constructing, Error); diff --git a/js/src/jit-test/tests/debug/Frame-constructing-02.js b/js/src/jit-test/tests/debug/Frame-constructing-02.js new file mode 100644 index 0000000000..b1c0c846a7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-constructing-02.js @@ -0,0 +1,31 @@ +// Debugger.Frame.prototype.constructing on an async function. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); + +g.eval(` +async function f() { + await Promise.resolve(); +} +`); + +let frame; +dbg.onEnterFrame = function(f) { + frame = f; + assertEq(frame.constructing, false); +}; + +(async () => { + const promise = g.f(); + + assertEq(frame.constructing, false); + frame = null; + + await promise; + + assertEq(!!frame, true); + // Throws because the frame has terminated. + assertThrowsInstanceOf(() => frame.constructing, Error); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-constructing-03.js b/js/src/jit-test/tests/debug/Frame-constructing-03.js new file mode 100644 index 0000000000..4569314131 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-constructing-03.js @@ -0,0 +1,35 @@ +// Debugger.Frame.prototype.constructing on an async generator. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); + +g.eval(` +async function* f() { + await Promise.resolve(); +} +`); + +let frame; +dbg.onEnterFrame = function(f) { + frame = f; + assertEq(frame.constructing, false); +}; + +(async () => { + const it = g.f(); + + assertEq(frame.constructing, false); + frame = null; + + const promise = it.next(); + + assertEq(!!frame, true); + assertEq(frame.constructing, false); + + await promise; + + // Throws because the frame has terminated. + assertThrowsInstanceOf(() => frame.constructing, Error); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-environment-01.js b/js/src/jit-test/tests/debug/Frame-environment-01.js new file mode 100644 index 0000000000..1168732e29 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-environment-01.js @@ -0,0 +1,13 @@ +// frame.environment is a Debugger.Environment object + +var g = newGlobal({newCompartment: true}) +var dbg = Debugger(g); +g.h = function () { + assertEq(dbg.getNewestFrame().environment instanceof Debugger.Environment, true); +}; + +g.eval("h()"); +g.evaluate("h()"); +g.eval("eval('h()')"); +g.eval("function f() { h(); }"); +g.f(); diff --git a/js/src/jit-test/tests/debug/Frame-environment-02.js b/js/src/jit-test/tests/debug/Frame-environment-02.js new file mode 100644 index 0000000000..76283711be --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-environment-02.js @@ -0,0 +1,12 @@ +// dbg.getNewestFrame().environment works. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +g.h = function () { + var env = dbg.getNewestFrame().environment.parent; + assertEq(env instanceof Debugger.Environment, true); + assertEq(env.object, gw); + assertEq(env.parent, null); +}; +g.eval("h()"); diff --git a/js/src/jit-test/tests/debug/Frame-environment-03.js b/js/src/jit-test/tests/debug/Frame-environment-03.js new file mode 100644 index 0000000000..71f176260c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-environment-03.js @@ -0,0 +1,11 @@ +// If !frame.onStack, frame.environment throws. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var frame; +g.h = function () { frame = dbg.getNewestFrame(); }; +g.eval("h();"); +assertEq(frame.onStack, false); +assertThrowsInstanceOf(function () { frame.environment; }, Error); diff --git a/js/src/jit-test/tests/debug/Frame-environment-04.js b/js/src/jit-test/tests/debug/Frame-environment-04.js new file mode 100644 index 0000000000..280b8a7c49 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-environment-04.js @@ -0,0 +1,12 @@ +// frame.environment can be called from the onEnterFrame hook. + +var g = newGlobal({newCompartment: true}); +g.eval("function f(x) { return 2 * x; }"); +var dbg = Debugger(g); +var hits = 0; +dbg.onEnterFrame = function (frame) { + assertEq(frame.environment.names().join(","), "arguments,x"); + hits++; +}; +assertEq(g.f(22), 44); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Frame-environment-05.js b/js/src/jit-test/tests/debug/Frame-environment-05.js new file mode 100644 index 0000000000..e39140b438 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-environment-05.js @@ -0,0 +1,9 @@ +// Test that Debugger.Frame.prototype.environment works at all pcs of a script +// with an aliased block scope. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + frame.onStep = (function () { frame.environment; }); +}; +g.eval("debugger; for (let i of [1,2,3]) print(i);"); diff --git a/js/src/jit-test/tests/debug/Frame-environment-06.js b/js/src/jit-test/tests/debug/Frame-environment-06.js new file mode 100644 index 0000000000..6faea6ad52 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-environment-06.js @@ -0,0 +1,105 @@ +// |jit-test| error:all-jobs-completed-successfully +// Test that Debugger.Frame.prototype.environment works on suspended +// async function. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +g.eval(` +var resolveTop; +var resolveBlock; +var resolveLoop; +var resolveCatch; + +async function f() { + var promises = { + top: new Promise(r => { resolveTop = r; }), + block: new Promise(r => { resolveBlock = r; }), + loop: new Promise(r => { resolveLoop = r; }), + catch: new Promise(r => { resolveCatch = r; }), + }; + + var value = 42; + Promise.resolve().then(resolveTop); + await promises.top; + { + let block = "block"; + Promise.resolve().then(resolveBlock); + await promises.block; + } + for (let loop of ["loop"]) { + Promise.resolve().then(resolveLoop); + await promises.loop; + } + try { + throw "err"; + } catch (err) { + Promise.resolve().then(resolveCatch); + await promises.catch; + } + return value; +} +`); + +const waitForOnPop = frame => new Promise(r => { + assertEq(frame.onPop, undefined); + frame.onPop = () => { + frame.onPop = undefined; + r(); + }; +}); + +let frame; +dbg.onEnterFrame = f => { + frame = f; + dbg.onEnterFrame = undefined; +}; + +(async () => { + const promise = g.f(); + + assertEq(!!frame, true); + assertEq( + JSON.stringify(frame.environment.names()), + JSON.stringify(["arguments", "promises", "value"]) + ); + assertEq(frame.environment.getVariable("value"), 42); + + frame.environment.setVariable("value", 43); + + assertEq(frame.environment.getVariable("value"), 43); + + await waitForOnPop(frame); + + assertEq( + JSON.stringify(frame.environment.names()), + JSON.stringify(["block"]) + ); + assertEq(frame.environment.getVariable("block"), "block"); + + await waitForOnPop(frame); + + assertEq( + JSON.stringify(frame.environment.names()), + JSON.stringify(["loop"]) + ); + assertEq(frame.environment.getVariable("loop"), "loop"); + + await waitForOnPop(frame); + + assertEq( + JSON.stringify(frame.environment.names()), + JSON.stringify(["err"]) + ); + assertEq(frame.environment.getVariable("err"), "err"); + + const result = await promise; + + assertEq(result, 43); + + assertThrowsInstanceOf(() => frame.environment, Error); + + throw "all-jobs-completed-successfully"; +})(); diff --git a/js/src/jit-test/tests/debug/Frame-environment-07.js b/js/src/jit-test/tests/debug/Frame-environment-07.js new file mode 100644 index 0000000000..5e51ba79af --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-environment-07.js @@ -0,0 +1,83 @@ +// Test that Debugger.Frame.prototype.environment works on suspended generators. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +g.eval(` +function* f() { + var value = 42; + yield; + { + let block = "block"; + yield; + } + for (let loop of ["loop"]) { + yield; + } + try { + throw "err"; + } catch (err) { + yield; + } + return value; +} +`); + +let frame; +dbg.onEnterFrame = f => { + frame = f; + dbg.onEnterFrame = undefined; +}; + +const it = g.f(); + +assertEq(!!frame, true); + +let result = it.next(); + +assertEq(result.done, false); +assertEq(result.value, undefined); + +assertEq( + JSON.stringify(frame.environment.names()), + JSON.stringify(["arguments", "value"]) +); + +assertEq(frame.environment.getVariable("value"), 42); + +frame.environment.setVariable("value", 43); + +assertEq(frame.environment.getVariable("value"), 43); + +result = it.next(); + +assertEq( + JSON.stringify(frame.environment.names()), + JSON.stringify(["block"]) +); +assertEq(frame.environment.getVariable("block"), "block"); + +result = it.next(); + +assertEq( + JSON.stringify(frame.environment.names()), + JSON.stringify(["loop"]) +); +assertEq(frame.environment.getVariable("loop"), "loop"); + +result = it.next(); + +assertEq( + JSON.stringify(frame.environment.names()), + JSON.stringify(["err"]) +); +assertEq(frame.environment.getVariable("err"), "err"); + +result = it.next(); + +assertEq(result.done, true); +assertEq(result.value, 43); + +assertThrowsInstanceOf(() => frame.environment, Error); diff --git a/js/src/jit-test/tests/debug/Frame-environment-08.js b/js/src/jit-test/tests/debug/Frame-environment-08.js new file mode 100644 index 0000000000..f4d10d0547 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-environment-08.js @@ -0,0 +1,108 @@ +// |jit-test| error:all-jobs-completed-successfully +// Test that Debugger.Frame.prototype.environment works on suspended +// async generators. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +g.eval(` +var resolveTop; +var resolveBlock; +var resolveLoop; +var resolveCatch; + +async function* f() { + var promises = { + top: new Promise(r => { resolveTop = r; }), + block: new Promise(r => { resolveBlock = r; }), + loop: new Promise(r => { resolveLoop = r; }), + catch: new Promise(r => { resolveCatch = r; }), + }; + + var value = 42; + await promises.top; + { + let block = "block"; + await promises.block; + } + for (let loop of ["loop"]) { + await promises.loop; + } + try { + throw "err"; + } catch (err) { + await promises.catch; + } + return value; +} +`); + +const waitForOnPop = frame => new Promise(r => { + assertEq(frame.onPop, undefined); + frame.onPop = () => { + frame.onPop = undefined; + r(); + }; +}); + +let frame; +dbg.onEnterFrame = f => { + frame = f; + dbg.onEnterFrame = undefined; +}; + +(async () => { + const it = g.f(); + + assertEq(!!frame, true); + + let promise = it.next(); + + assertEq( + JSON.stringify(frame.environment.names()), + JSON.stringify(["arguments", "promises", "value"]) + ); + + //FIXME assertEq(frame.environment.getVariable("value"), 42); + + frame.environment.setVariable("value", 43); + + g.resolveTop(); + await waitForOnPop(frame); + + assertEq( + JSON.stringify(frame.environment.names()), + JSON.stringify(["block"]) + ); + assertEq(frame.environment.getVariable("block"), "block"); + + g.resolveBlock(); + await waitForOnPop(frame); + + assertEq( + JSON.stringify(frame.environment.names()), + JSON.stringify(["loop"]) + ); + assertEq(frame.environment.getVariable("loop"), "loop"); + + g.resolveLoop(); + await waitForOnPop(frame); + + assertEq( + JSON.stringify(frame.environment.names()), + JSON.stringify(["err"]) + ); + assertEq(frame.environment.getVariable("err"), "err"); + + g.resolveCatch(); + const result = await promise; + + assertEq(result.done, true); + //FIXME assertEq(result.value, 43); + + assertThrowsInstanceOf(() => frame.environment, Error); + + throw "all-jobs-completed-successfully"; +})(); diff --git a/js/src/jit-test/tests/debug/Frame-eval-01.js b/js/src/jit-test/tests/debug/Frame-eval-01.js new file mode 100644 index 0000000000..ae1a63cdb7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-01.js @@ -0,0 +1,8 @@ +// simplest possible test of Debugger.Frame.prototype.eval + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var c; +dbg.onDebuggerStatement = function (frame) { c = frame.eval("2 + 2"); }; +g.eval("debugger;"); +assertEq(c.return, 4); diff --git a/js/src/jit-test/tests/debug/Frame-eval-02.js b/js/src/jit-test/tests/debug/Frame-eval-02.js new file mode 100644 index 0000000000..79b5ff8a15 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-02.js @@ -0,0 +1,10 @@ +// frame.eval() throws if frame is not live + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var f; +dbg.onDebuggerStatement = function (frame) { f = frame; }; +g.eval("debugger;"); +assertThrowsInstanceOf(function () { f.eval("2 + 2"); }, Error); diff --git a/js/src/jit-test/tests/debug/Frame-eval-03.js b/js/src/jit-test/tests/debug/Frame-eval-03.js new file mode 100644 index 0000000000..9b640b7c13 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-03.js @@ -0,0 +1,19 @@ +// Test eval-ing names in a topmost script frame + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.eval("a").return, 2); + assertEq(frame.eval("c").return, 4); + var exc = frame.eval("d").throw; + assertEq(exc instanceof Debugger.Object, true); + assertEq(exc.proto, frame.eval("ReferenceError.prototype").return); + hits++; +}; +g.eval("function f(a, b) { var c = a + b; debugger; eval('debugger;'); }"); +g.eval("f(2, 2);"); +g.eval("var a = 2, b = 2, c = a + b; debugger;"); +assertEq(hits, 3); diff --git a/js/src/jit-test/tests/debug/Frame-eval-04.js b/js/src/jit-test/tests/debug/Frame-eval-04.js new file mode 100644 index 0000000000..83ec7945eb --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-04.js @@ -0,0 +1,11 @@ +// frame.eval SyntaxErrors are reflected, not thrown + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var exc, SEp; +dbg.onDebuggerStatement = function (frame) { + exc = frame.eval("#$@!").throw; + SEp = frame.eval("SyntaxError.prototype").return; +}; +g.eval("debugger;"); +assertEq(exc.proto, SEp); diff --git a/js/src/jit-test/tests/debug/Frame-eval-05.js b/js/src/jit-test/tests/debug/Frame-eval-05.js new file mode 100644 index 0000000000..44fdf77701 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-05.js @@ -0,0 +1,14 @@ +// var declarations in strict frame.eval do not modify the frame + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var cv; +dbg.onDebuggerStatement = function (frame) { + cv = frame.eval("'use strict'; var a = 2; h();"); +}; +g.a = 1; +g.eval("function f(s) { function h() { return a; } eval(s); debugger; } "); +g.eval("f('0');"); +assertEq(cv.return, 1); +g.eval("f('var a = 3;');"); +assertEq(cv.return, 3); diff --git a/js/src/jit-test/tests/debug/Frame-eval-06.js b/js/src/jit-test/tests/debug/Frame-eval-06.js new file mode 100644 index 0000000000..811ea8a926 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-06.js @@ -0,0 +1,19 @@ +// frame.eval throws if frame is a generator frame that isn't currently on the stack + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +g.eval("function* gen(a) { debugger; yield a; }"); +g.eval("function test() { debugger; }"); +var dbg = new Debugger(g); +var genframe; +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + if (frame.callee.name == 'gen') + genframe = frame; + else + assertThrowsInstanceOf(function () { genframe.eval("a"); }, Error); + hits++; +}; +g.eval("var it = gen(42); assertEq(it.next().value, 42); test();"); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Frame-eval-07.js b/js/src/jit-test/tests/debug/Frame-eval-07.js new file mode 100644 index 0000000000..6770a40f32 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-07.js @@ -0,0 +1,31 @@ +// test frame.eval in non-top frames + +var g = newGlobal({newCompartment: true}); +var N = g.N = 12; // must be even +assertEq(N % 2, 0); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var n = frame.eval("n").return; + if (n === 0) { + for (var i = 0; i <= N; i++) { + assertEq(frame.type, 'call'); + assertEq(frame.callee.name, i % 2 === 0 ? 'even' : 'odd'); + assertEq(frame.eval("n").return, i); + frame = frame.older; + } + assertEq(frame.type, 'call'); + assertEq(frame.callee.name, undefined); + frame = frame.older; + assertEq(frame.type, 'eval'); + hits++; + } +}; + +var result = g.eval("(" + function () { + function odd(n) { return n > 0 && !even(n - 1); } + function even(n) { debugger; return n == 0 || !odd(n - 1); } + return even(N); + } + ")();"); +assertEq(result, true); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Frame-eval-08.js b/js/src/jit-test/tests/debug/Frame-eval-08.js new file mode 100644 index 0000000000..a6a12a5375 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-08.js @@ -0,0 +1,23 @@ +// The arguments can escape from a function via a debugging hook. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +// capture arguments object and test function +var args, testfn; +dbg.onDebuggerStatement = function (frame) { + args = frame.eval("arguments").return; + testfn = frame.eval("test").return; +}; +g.eval("function f() { debugger; }"); +g.eval("var test = " + function test(args) { + assertEq(args.length, 3); + assertEq(args[0], this); + assertEq(args[1], f); + assertEq(args[2].toString(), "[object Object]"); + return 42; + } + ";"); +g.eval("f(this, f, {});"); + +var cv = testfn.apply(null, [args]); +assertEq(cv.return, 42); diff --git a/js/src/jit-test/tests/debug/Frame-eval-09.js b/js/src/jit-test/tests/debug/Frame-eval-09.js new file mode 100644 index 0000000000..cb7c0b8ca7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-09.js @@ -0,0 +1,21 @@ +// assigning to local variables in frame.eval code + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + frame.eval("outerarg = 1; outervar = 2; innerarg = 3; innervar = 4;"); +}; + +var result = g.eval("(" + function outer(outerarg) { + var outervar = 200; + function inner(innerarg) { + var innervar = 400; + eval(""); + debugger; + return innerarg + innervar; + } + var innersum = inner(300); + return outerarg + outervar + innersum; + } + ")(100)"); + +assertEq(result, 10); diff --git a/js/src/jit-test/tests/debug/Frame-eval-10.js b/js/src/jit-test/tests/debug/Frame-eval-10.js new file mode 100644 index 0000000000..7605aefd58 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-10.js @@ -0,0 +1,13 @@ +// frame.eval returns null if the eval code fails with an uncatchable error. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + if (hits++ === 0) + assertEq(frame.eval("debugger;"), null); + else + return null; +}; +assertEq(g.eval("debugger; 'ok';"), "ok"); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Frame-eval-11.js b/js/src/jit-test/tests/debug/Frame-eval-11.js new file mode 100644 index 0000000000..4e76a1a5b9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-11.js @@ -0,0 +1,15 @@ +// The arguments can escape from a function via a debugging hook. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +// capture arguments object and test function +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.older.eval('arguments[0]').return, 'ponies'); + hits++; +}; +g.eval("function g() { debugger; }"); +g.eval("function f() { g(); }"); +g.eval("f('ponies')"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Frame-eval-12.js b/js/src/jit-test/tests/debug/Frame-eval-12.js new file mode 100644 index 0000000000..498e7a07a2 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-12.js @@ -0,0 +1,13 @@ +// The arguments can escape from a function via a debugging hook. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +// capture arguments object and test function +dbg.onDebuggerStatement = function (frame) { + var args = frame.older.environment.parent.getVariable('arguments'); + assertEq(args.missingArguments, true); +}; +g.eval("function h() { debugger; }"); +g.eval("function f() { var x = 0; return function() { x++; h() } }"); +g.eval("f('ponies')()"); diff --git a/js/src/jit-test/tests/debug/Frame-eval-13.js b/js/src/jit-test/tests/debug/Frame-eval-13.js new file mode 100644 index 0000000000..8aebc4f1cf --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-13.js @@ -0,0 +1,13 @@ +// The debugger may add new bindings into existing scopes + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function(frame) { + assertEq(frame.eval("var x = 3; x").return, 3); + hits++; +} +var hits = 0; +g.eval("(function() { debugger; })()"); +assertEq(hits, 1); +g.eval("(function() { var x = 4; debugger; })()"); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Frame-eval-14.js b/js/src/jit-test/tests/debug/Frame-eval-14.js new file mode 100644 index 0000000000..7a0cfc2aa3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-14.js @@ -0,0 +1,26 @@ +// Test the corner case of accessing an unaliased variable of a block +// while the block is not live. + +var g = newGlobal({newCompartment: true}); +g.eval("function h() { debugger }"); +g.eval("function f() { { let x = 1, y; (function() { y = 0 })(); h() } }"); +g.eval("var surprise = null"); + +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +dbg.onDebuggerStatement = function(hFrame) { + var fFrame = hFrame.older; + assertEq(fFrame.environment.getVariable('x'), 1); + assertEq(fFrame.environment.getVariable('y'), 0); + fFrame.eval("surprise = function() { return ++x }"); + assertEq(gw.executeInGlobal("surprise()").return, 2); +} +g.f(); +assertEq(g.surprise !== null, true); + +// Either succeed or throw an error about 'x' not being live +try { + assertEq(g.surprise(), 3); +} catch (e) { + assertEq(e+'', 'Error: x is not live'); +} diff --git a/js/src/jit-test/tests/debug/Frame-eval-15.js b/js/src/jit-test/tests/debug/Frame-eval-15.js new file mode 100644 index 0000000000..3a452305cc --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-15.js @@ -0,0 +1,13 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval("function h() { debugger }"); +g.eval("function f() { h() }"); +g.blah = 42; +dbg.onDebuggerStatement = function(frame) { + frame.older.eval("var blah = 43"); + frame.older.eval("blah = 44"); + assertEq(frame.older.environment.getVariable("blah"), 44); +} +g.f(); +assertEq(g.blah, 42); diff --git a/js/src/jit-test/tests/debug/Frame-eval-16.js b/js/src/jit-test/tests/debug/Frame-eval-16.js new file mode 100644 index 0000000000..da1c73b3ad --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-16.js @@ -0,0 +1,31 @@ +// eval correctly handles optional custom url option +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var count = 0; + +function testUrl (options, expected) { + count++; + dbg.onDebuggerStatement = function (frame) { + dbg.onNewScript = function (script) { + dbg.onNewScript = undefined; + assertEq(script.url, expected); + count--; + }; + frame.eval("", options); + }; + g.eval("debugger;"); +} + + +testUrl(undefined, "debugger eval code"); +testUrl(null, "debugger eval code"); +testUrl({ url: undefined }, "debugger eval code"); +testUrl({ url: null }, "null"); +testUrl({ url: 5 }, "5"); +testUrl({ url: "" }, ""); +testUrl({ url: "test" }, "test"); +testUrl({ url: "Ðëßþ" }, "Ðëßþ"); +testUrl({ url: "тест" }, "тест"); +testUrl({ url: "テスト" }, "テスト"); +testUrl({ url: "\u{1F9EA}" }, "\u{1F9EA}"); +assertEq(count, 0); diff --git a/js/src/jit-test/tests/debug/Frame-eval-17.js b/js/src/jit-test/tests/debug/Frame-eval-17.js new file mode 100644 index 0000000000..22fb095505 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-17.js @@ -0,0 +1,24 @@ +// eval correctly handles optional lineNumber option +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var count = 0; + +function testLineNumber (options, expected) { + count++; + dbg.onDebuggerStatement = function (frame) { + dbg.onNewScript = function (script) { + dbg.onNewScript = undefined; + assertEq(script.startLine, expected); + count--; + }; + frame.eval("", options); + }; + g.eval("debugger;"); +} + + +testLineNumber(undefined, 1); +testLineNumber({}, 1); +testLineNumber({ lineNumber: undefined }, 1); +testLineNumber({ lineNumber: 5 }, 5); +assertEq(count, 0); diff --git a/js/src/jit-test/tests/debug/Frame-eval-18.js b/js/src/jit-test/tests/debug/Frame-eval-18.js new file mode 100644 index 0000000000..3cde24eb28 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-18.js @@ -0,0 +1,12 @@ +// yield is not allowed in eval in a star generator. + +load(libdir + 'asserts.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +dbg.onDebuggerStatement = function (frame) { + assertThrowsInstanceOf(function() { frame.eval('yield 10;') }, SyntaxError); +}; + +g.eval("(function*g(){ debugger; })()"); diff --git a/js/src/jit-test/tests/debug/Frame-eval-19.js b/js/src/jit-test/tests/debug/Frame-eval-19.js new file mode 100644 index 0000000000..950113f8c0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-19.js @@ -0,0 +1,34 @@ +// Eval-in-frame of optimized frames to break out of an infinite loop. + +load(libdir + "jitopts.js"); + +if (!jitTogglesMatch(Opts_IonEagerNoOffthreadCompilation)) + quit(0); + +withJitOptions(Opts_IonEagerNoOffthreadCompilation, function () { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + + g.eval("" + function f(d) { g(d); }); + g.eval("" + function g(d) { h(d); }); + g.eval("" + function h(d) { + var i = 0; + while (d) + interruptIf(d && i++ == 4000); + }); + + setInterruptCallback(function () { + dbg.addDebuggee(g); + var frame = dbg.getNewestFrame(); + if (frame.callee.name != "h" || frame.implementation != "ion") + return true; + frame.eval("d = false;"); + return true; + }); + + g.eval("(" + function () { + for (i = 0; i < 5; i++) + f(false); + f(true); + } + ")();"); +}); diff --git a/js/src/jit-test/tests/debug/Frame-eval-20.js b/js/src/jit-test/tests/debug/Frame-eval-20.js new file mode 100644 index 0000000000..dde786f8ef --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-20.js @@ -0,0 +1,48 @@ +// |jit-test| --ion-osr=off + +// Eval-in-frame with different type on non-youngest Ion frame. + +load(libdir + "jitopts.js"); + +if (!jitTogglesMatch(Opts_Ion2NoOffthreadCompilation)) + quit(0); + +withJitOptions(Opts_Ion2NoOffthreadCompilation, function () { + function test(shadow) { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + + // Note that we depend on CCW scripted functions being opaque to Ion + // optimization for this test. + g.h = function h(d) { + if (d) { + dbg.addDebuggee(g); + var f = dbg.getNewestFrame().older; + assertEq(f.implementation, "ion"); + assertEq(f.environment.getVariable("foo"), 42); + + // EIF of a different type too. + f.eval((shadow ? "var " : "") + "foo = 'string of 42'"); + g.expected = shadow ? 42 : "string of 42"; + } + } + + g.eval("" + function f(d) { + var foo = 42; + g(d); + return foo; + }); + g.eval("" + function g(d) { + h(d); + }); + + g.eval("(" + function () { + for (i = 0; i < 5; i++) + f(false); + assertEq(f(true), "string of 42"); + } + ")();"); + } + + test(false); + test(true); +}); diff --git a/js/src/jit-test/tests/debug/Frame-eval-21.js b/js/src/jit-test/tests/debug/Frame-eval-21.js new file mode 100644 index 0000000000..a1fdc8b810 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-21.js @@ -0,0 +1,33 @@ +// Eval-in-frame with different type on baseline frame with let-scoping + +load(libdir + "jitopts.js"); + +if (!jitTogglesMatch(Opts_BaselineEager)) + quit(0); + +withJitOptions(Opts_BaselineEager, function () { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + + g.h = function h(d) { + if (d) { + dbg.addDebuggee(g); + var f = dbg.getNewestFrame().older; + assertEq(f.implementation, "baseline"); + assertEq(f.environment.getVariable("foo"), 42); + f.eval("foo = 'string of 42'"); + } + } + + g.eval("" + function f(d) { + if (d) { + let foo = 42; + g(d); + return foo; + } + }); + + g.eval("" + function g(d) { h(d); }); + + g.eval("(" + function () { assertEq(f(true), "string of 42"); } + ")();"); +}); diff --git a/js/src/jit-test/tests/debug/Frame-eval-22.js b/js/src/jit-test/tests/debug/Frame-eval-22.js new file mode 100644 index 0000000000..2a9f081feb --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-22.js @@ -0,0 +1,32 @@ +// Debugger.Frame preserves Ion frame identity + +load(libdir + "jitopts.js"); + +if (!jitTogglesMatch(Opts_Ion2NoOffthreadCompilation)) + quit(); + +withJitOptions(Opts_Ion2NoOffthreadCompilation, function () { + var g = newGlobal({newCompartment: true}); + var dbg1 = new Debugger; + var dbg2 = new Debugger; + + g.toggle = function toggle(x, d) { + if (d) { + dbg1.addDebuggee(g); + dbg2.addDebuggee(g); + var frame1 = dbg1.getNewestFrame(); + assertEq(frame1.environment.getVariable("x"), x); + assertEq(frame1.implementation, "ion"); + frame1.environment.setVariable("x", "not 42"); + assertEq(dbg2.getNewestFrame().environment.getVariable("x"), "not 42"); + } + }; + + g.eval("" + function f(x, d) { toggle(x, d); }); + + g.eval("(" + function test() { + for (var i = 0; i < 5; i++) + f(42, false); + f(42, true); + } + ")();"); +}); diff --git a/js/src/jit-test/tests/debug/Frame-eval-23.js b/js/src/jit-test/tests/debug/Frame-eval-23.js new file mode 100644 index 0000000000..ae30791809 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-23.js @@ -0,0 +1,37 @@ +// Debugger.Frame preserves Ion frame mutations after removing debuggee. + +load(libdir + "jitopts.js"); + +if (!jitTogglesMatch(Opts_Ion2NoOffthreadCompilation)) + quit(); + +withJitOptions(Opts_Ion2NoOffthreadCompilation, function () { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + + g.toggle = function toggle(x, d) { + if (d) { + dbg.addDebuggee(g); + var frame = dbg.getNewestFrame().older; + assertEq(frame.callee.name, "f"); + assertEq(frame.environment.getVariable("x"), x); + assertEq(frame.implementation, "ion"); + frame.environment.setVariable("x", "not 42"); + dbg.removeDebuggee(g); + } + }; + + g.eval("" + function f(x, d) { + g(x, d); + if (d) + assertEq(x, "not 42"); + }); + + g.eval("" + function g(x, d) { toggle(x, d); }); + + g.eval("(" + function test() { + for (var i = 0; i < 5; i++) + f(42, false); + f(42, true); + } + ")();"); +}); diff --git a/js/src/jit-test/tests/debug/Frame-eval-24.js b/js/src/jit-test/tests/debug/Frame-eval-24.js new file mode 100644 index 0000000000..e3a9096d10 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-24.js @@ -0,0 +1,25 @@ +// Make sure the getVariable/setVariable/eval functions work correctly with +// unaliased locals. +var g = newGlobal({newCompartment: true}); +g.eval(` +function g() { debugger; }; +function f(arg) { + var y = arg - 3; + var a1 = 1; + var a2 = 1; + var b = arg + 9; + var z = function() { return a1 + a2; }; + g(); + return y * b; // To prevent the JIT from optimizing out y and b. +};`); + +var dbg = new Debugger(g); + +dbg.onDebuggerStatement = function handleDebugger(frame) { + assertEq(frame.older.eval("y + b").return, 26); + assertEq(frame.older.environment.getVariable("y"), 7); + frame.older.environment.setVariable("b", 4); + assertEq(frame.older.eval("y + b").return, 11); +}; + +g.f(10); diff --git a/js/src/jit-test/tests/debug/Frame-eval-25.js b/js/src/jit-test/tests/debug/Frame-eval-25.js new file mode 100644 index 0000000000..cc91b28587 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-25.js @@ -0,0 +1,25 @@ +// Make sure we can recover missing arguments even when it gets assigned to +// another slot. + +load(libdir + "asserts.js"); +load(libdir + "evalInFrame.js"); + +function h() { + evalInFrame(1, "a.push(0)"); +} + +function f() { + var a = arguments; + h(); +} + +assertThrowsInstanceOf(f, TypeError); + +function g() { + { + let a = arguments; + h(); + } +} + +assertThrowsInstanceOf(g, TypeError); diff --git a/js/src/jit-test/tests/debug/Frame-eval-26.js b/js/src/jit-test/tests/debug/Frame-eval-26.js new file mode 100644 index 0000000000..5a15c305e8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-26.js @@ -0,0 +1,16 @@ +// Bug 1026477: Defining functions with D.F.p.eval works, even if there's +// already a non-aliased var binding for the identifier. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + frame.older.eval('function f() { }'); +}; + +// When the compiler sees the 'debugger' statement, it marks all variables as +// aliased, but we want to test the case where f is in a stack frame slot, so we +// put the 'debugger' statement in a separate function, and use frame.older to +// get back to the anonymous function's frame. +g.eval('function q() { debugger; }'); +assertEq(typeof g.eval('(function () { var f = 42; q(); return f; })();'), + "function"); diff --git a/js/src/jit-test/tests/debug/Frame-eval-27.js b/js/src/jit-test/tests/debug/Frame-eval-27.js new file mode 100644 index 0000000000..38553c1967 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-27.js @@ -0,0 +1,13 @@ +// Bug 1026477: Defining functions with D.F.p.eval works, even if there's +// already a var binding for the identifier. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + frame.eval('function f() { }'); +}; + +// When the compiler sees the 'debugger' statement, it marks all variables as +// aliased, so f will live in a Call object. +assertEq(typeof g.eval('(function () { var f = 42; debugger; return f;})();'), + "function"); diff --git a/js/src/jit-test/tests/debug/Frame-eval-28.js b/js/src/jit-test/tests/debug/Frame-eval-28.js new file mode 100644 index 0000000000..2f7a15a029 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-28.js @@ -0,0 +1,12 @@ +// Test that strict Debugger.Frame.eval has a correct static scope. +"use strict"; +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onEnterFrame = function(f) { + hits++; + if (hits > 2) + return; + f.eval("42"); +}; +g.eval("42"); diff --git a/js/src/jit-test/tests/debug/Frame-eval-29.js b/js/src/jit-test/tests/debug/Frame-eval-29.js new file mode 100644 index 0000000000..73a3e735e0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-29.js @@ -0,0 +1,59 @@ +// Test reading and setting values on "hollow" debug scopes. In testGet and +// testSet below, f and g *must* be called from a non-heavyweight lambda to +// trigger the creation of the "hollow" debug scopes for the missing scopes. +// +// The reason is that a direct call to f or g that accesses a in testGet or +// testSet's frame is actually recoverable. The Debugger can synthesize a scope +// based on the frame. By contorting through a lambda, it becomes unsound to +// synthesize a scope based on the lambda function's frame. Since f and g are +// accessing a, which is itself free inside the lambda, the Debugger has no way +// to tell if the on-stack testGet or testSet frame is the frame that *would +// have* allocated a scope for the lambda, *had the lambda been heavyweight*. +// +// More concretely, if the inner lambda were returned from testGet and testSet, +// then called from a different invocation of testGet or testSet, it becomes +// obvious that it is incorrect to synthesize a scope based on the frame of +// that different invocation. + +load(libdir + "evalInFrame.js"); + +function f() { + // Eval one frame up. Nothing aliases a. + evalInFrame(1, "print(a)"); +} + +function g() { + evalInFrame(1, "a = 43"); +} + +function testGet() { + { + let a = 42; + (function () { f(); })(); + } +} + +function testSet() { + { + let a = 42; + (function () { g(); })(); + } +} + +var log = ""; + +try { + testGet(); +} catch (e) { + // Throws due to a having been optimized out. + log += "g"; +} + +try { + testSet(); +} catch (e) { + // Throws due to a having been optimized out. + log += "s"; +} + +assertEq(log, "gs"); diff --git a/js/src/jit-test/tests/debug/Frame-eval-30.js b/js/src/jit-test/tests/debug/Frame-eval-30.js new file mode 100644 index 0000000000..f99912c452 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-30.js @@ -0,0 +1,19 @@ +// Test that Debugger.Frame.eval correctly throws on redeclaration. + +load(libdir + "evalInFrame.js"); + +let x; + +function f() { + evalInFrame(1, "var x;"); +} + +var log = ""; + +try { + f(); +} catch (e) { + log += "e"; +} + +assertEq(log, "e"); diff --git a/js/src/jit-test/tests/debug/Frame-eval-31.js b/js/src/jit-test/tests/debug/Frame-eval-31.js new file mode 100644 index 0000000000..bef94a046a --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-31.js @@ -0,0 +1,9 @@ +// evalInFrame with non-syntactic scopes. + +load(libdir + "asserts.js"); +load(libdir + "evalInFrame.js"); + +evalReturningScope(` + var x = 42; + assertEq(evalInFrame(0, "x"), 42); +`); diff --git a/js/src/jit-test/tests/debug/Frame-eval-32.js b/js/src/jit-test/tests/debug/Frame-eval-32.js new file mode 100644 index 0000000000..9a5309d6aa --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-32.js @@ -0,0 +1,8 @@ +// |jit-test| error: ReferenceError + +// Test the TDZ works for glbao lexicals through Debugger environments in +// compound assignments. +load(libdir + "evalInFrame.js"); + +evalInFrame(0, "x |= 0"); +let x; diff --git a/js/src/jit-test/tests/debug/Frame-eval-33.js b/js/src/jit-test/tests/debug/Frame-eval-33.js new file mode 100644 index 0000000000..d5d3f94804 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-33.js @@ -0,0 +1,39 @@ +load(libdir + "evalInFrame.js"); + +// Test that computing the implicit 'this' in calls for D.F.eval is as if it +// were a pasted-in eval. + +var G = this; + +function globalFun(check, expectedThis) { + if (check) + assertEq(this, expectedThis); + return this; +} +var expectedGlobalFunThis = globalFun(false); +evalInFrame(0, "globalFun(true, expectedGlobalFunThis)"); + +(function testInnerFun() { + function innerFun(check, expectedThis) { + if (check) + assertEq(this, expectedThis); + return this; + } + var expectedInnerFunThis = innerFun(false); + evalInFrame(0, "innerFun(true, expectedInnerFunThis)"); + return [innerFun, expectedInnerFunThis]; // To prevent the JIT from optimizing out vars. +})(); + +(function testWith() { + var o = { + withFun: function withFun(check, expectedThis) { + if (check) + assertEq(this, expectedThis); + return this; + } + }; + with (o) { + var expectedWithFunThis = withFun(false); + evalInFrame(0, "withFun(true, expectedWithFunThis)"); + } +})(); diff --git a/js/src/jit-test/tests/debug/Frame-eval-stack.js b/js/src/jit-test/tests/debug/Frame-eval-stack.js new file mode 100644 index 0000000000..71f7c74789 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-eval-stack.js @@ -0,0 +1,19 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval("function h() { debugger; }"); +g.eval("function g() { h() }"); +g.eval("function f() { var blah = 333; g() }"); + +dbg.onDebuggerStatement = function(frame) { + frame = frame.older; + g.trace = frame.older.eval("(new Error()).stack;").return; +} +g.f(); + +assertEq(typeof g.trace, "string"); + +var frames = g.trace.split("\n"); +assertEq(frames[0].includes("eval code"), true); +assertEq(frames[1].startsWith("f@"), true); +assertEq(frames[2].startsWith("@"), true); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-01.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-01.js new file mode 100644 index 0000000000..792d4b1867 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-01.js @@ -0,0 +1,35 @@ +// evalWithBindings basics + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.evalWithBindings("x", {x: 2}).return, 2); + assertEq(frame.evalWithBindings("x + y", {x: 2}).return, 5); + hits++; +}; + +// in global code +g.y = 3; +g.eval("debugger;"); + +// in function code +g.y = "fail"; +g.eval("function f(y) { debugger; }"); +g.f(3); + +// in direct eval code +g.eval("function f() { var y = 3; eval('debugger;'); }"); +g.f(); + +// in strict eval code with var +g.eval("function f() { 'use strict'; eval('var y = 3; debugger;'); }"); +g.f(); + +// in a with block +g.eval("with ({y: 3}) { debugger; }"); + +// shadowing +g.eval("{ let x = 50, y = 3; debugger; }"); + +assertEq(hits, 6); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-02.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-02.js new file mode 100644 index 0000000000..debb901b4d --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-02.js @@ -0,0 +1,21 @@ +// evalWithBindings to call a method of a debuggee value + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var global = dbg.addDebuggee(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var obj = frame.arguments[0]; + var expected = frame.arguments[1]; + assertEq(frame.evalWithBindings("obj.toString()", {obj: obj}).return, expected); + hits++; +}; + +g.eval("function f(obj, expected) { debugger; }"); + +g.eval("f(new Number(-0), '0');"); +g.eval("f(new String('ok'), 'ok');"); +g.eval("f(Symbol('still ok'), 'Symbol(still ok)');"); +g.eval("f(Object(Symbol('still ok')), 'Symbol(still ok)');"); +g.eval("f({toString: function () { return f; }}, f);"); +assertEq(hits, 5); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-03.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-03.js new file mode 100644 index 0000000000..91ebbf5a13 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-03.js @@ -0,0 +1,16 @@ +// arguments works in evalWithBindings (it does not interpose a function scope) +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var global = dbg.addDebuggee(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var argc = frame.arguments.length; + assertEq(argc, 8); + assertEq(frame.evalWithBindings("arguments[prop]", {prop: "length"}).return, argc); + for (var i = 0; i < argc; i++) + assertEq(frame.evalWithBindings("arguments[i]", {i: i}).return, frame.arguments[i]); + hits++; +}; +g.eval("function f() { debugger; }"); +g.eval("f(undefined, -0, NaN, '\uffff', Symbol('alpha'), Array.prototype, Math, f);"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-04.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-04.js new file mode 100644 index 0000000000..0de428c563 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-04.js @@ -0,0 +1,17 @@ +// evalWithBindings works on non-top frames. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var f1; +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.older.evalWithBindings("q + r", {r: 3}).return, 5); + + // frame.older.older is in the same function as frame, but a different activation of it + assertEq(frame.older.older.evalWithBindings("q + r", {r: 3}).return, 6); + hits++; +}; + +g.eval("function f1(q) { if (q == 1) debugger; else f2(2); }"); +g.eval("function f2(arg) { var q = arg; f1(1); }"); +g.f1(3); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-05.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-05.js new file mode 100644 index 0000000000..7f9466fc33 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-05.js @@ -0,0 +1,12 @@ +// evalWithBindings code can assign to the bindings. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.evalWithBindings("for (i = 0; i < 5; i++) {} i;", {i: 10}).return, 5); + hits++; +}; + +g.eval("debugger;"); +assertEq("i" in g, false); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-06.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-06.js new file mode 100644 index 0000000000..42f1a42b5e --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-06.js @@ -0,0 +1,9 @@ +// In evalWithBindings code, assignment to any name not in the bindings works just as in eval. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.evalWithBindings("y = z; x = w;", {z: 2, w: 3}).return, 3); +}; +g.eval("function f(x) { debugger; assertEq(x, 3); }"); +g.eval("var y = 0; f(0);"); +assertEq(g.y, 2); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-07.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-07.js new file mode 100644 index 0000000000..a98b7650cb --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-07.js @@ -0,0 +1,16 @@ +// var statements in strict evalWithBindings code behave like strict eval. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.evalWithBindings("var i = a*a + b*b; i === 25;", {a: 3, b: 4}).return, true); + hits++; +}; +g.eval("'use strict'; debugger;"); +assertEq(hits, 1); +assertEq("i" in g, false); + +g.eval("function die() { throw fit; }"); +g.eval("Object.defineProperty(this, 'i', {get: die, set: die});"); +g.eval("'use strict'; debugger;"); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-08.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-08.js new file mode 100644 index 0000000000..3785d5a2a1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-08.js @@ -0,0 +1,13 @@ +// evalWithBindings ignores non-enumerable and non-own properties. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.evalWithBindings("toString + constructor + length", []).return, 112233); + var obj = Object.create({constructor: "FAIL"}, {length: {value: "fail"}}); + assertEq(frame.evalWithBindings("toString + constructor + length", obj).return, 112233); + hits++; +}; +g.eval("function f() { var toString = 111111, constructor = 1111, length = 11; debugger; }"); +g.f(); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-09.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-09.js new file mode 100644 index 0000000000..c697903193 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-09.js @@ -0,0 +1,27 @@ +// evalWithBindings code is debuggee code, so it can trip the debugger. It nests! +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var f1; +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + f1 = frame; + + // This trips the onExceptionUnwind hook. + var x = frame.evalWithBindings("wrongSpeling", {rightSpelling: 2}).throw; + + assertEq(frame.evalWithBindings("exc.name", {exc: x}).return, "ReferenceError"); + hits++; +}; +dbg.onExceptionUnwind = function (frame, exc) { + assertEq(frame !== f1, true); + + // f1's environment does not contain the binding for the first evalWithBindings call. + assertEq(f1.eval("rightSpelling").return, "dependent"); + assertEq(f1.evalWithBindings("n + rightSpelling", {n: "in"}).return, "independent"); + + // frame's environment does contain the binding. + assertEq(frame.eval("rightSpelling").return, 2); + assertEq(frame.evalWithBindings("rightSpelling + three", {three: 3}).return, 5); + hits++; +}; +g.eval("(function () { var rightSpelling = 'dependent'; debugger; })();"); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-10.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-10.js new file mode 100644 index 0000000000..005b5bf48b --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-10.js @@ -0,0 +1,16 @@ +// Direct eval code under evalWithBindings sees both the bindings and the enclosing scope. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var code = + "assertEq(a, 1234);\n" + + "assertEq(b, null);\n" + + "assertEq(c, 'ok');\n"; + assertEq(frame.evalWithBindings("eval(s)", {s: code, a: 1234}).return, undefined); + hits++; +}; +g.eval("function f(b) { var c = 'ok'; debugger; }"); +g.f(null); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-11.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-11.js new file mode 100644 index 0000000000..4d17304053 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-11.js @@ -0,0 +1,18 @@ +// var statements in non-strict evalWithBindings code behave like non-strict direct eval. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.evalWithBindings("var i = v; 42;", { v: 'inner' }).return, 42); +}; + +g.i = 'outer'; +log = ''; +assertEq(g.eval('debugger; i;'), 'inner'); +assertEq(log, 'd'); + +g.j = 'outer'; +log = ''; +assertEq(g.eval('debugger; j;'), 'outer'); +assertEq(log, 'd'); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-12.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-12.js new file mode 100644 index 0000000000..18193c0226 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-12.js @@ -0,0 +1,31 @@ +// evalWithBindings correctly handles optional custom url option +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var count = 0; + +function testUrl (options, expected) { + count++; + dbg.onDebuggerStatement = function (frame) { + dbg.onNewScript = function (script) { + dbg.onNewScript = undefined; + assertEq(script.url, expected); + count--; + }; + frame.evalWithBindings("", {}, options); + }; + g.eval("debugger;"); +} + + +testUrl(undefined, "debugger eval code"); +testUrl(null, "debugger eval code"); +testUrl({ url: undefined }, "debugger eval code"); +testUrl({ url: null }, "null"); +testUrl({ url: 5 }, "5"); +testUrl({ url: "" }, ""); +testUrl({ url: "test" }, "test"); +testUrl({ url: "Ðëßþ" }, "Ðëßþ"); +testUrl({ url: "тест" }, "тест"); +testUrl({ url: "テスト" }, "テスト"); +testUrl({ url: "\u{1F9EA}" }, "\u{1F9EA}"); +assertEq(count, 0); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-13.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-13.js new file mode 100644 index 0000000000..37cf30026f --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-13.js @@ -0,0 +1,24 @@ +// evalWithBindings correctly handles optional lineNumber option +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var count = 0; + +function testLineNumber (options, expected) { + count++; + dbg.onDebuggerStatement = function (frame) { + dbg.onNewScript = function (script) { + dbg.onNewScript = undefined; + assertEq(script.startLine, expected); + count--; + }; + frame.evalWithBindings("", {}, options); + }; + g.eval("debugger;"); +} + + +testLineNumber(undefined, 1); +testLineNumber({}, 1); +testLineNumber({ lineNumber: undefined }, 1); +testLineNumber({ lineNumber: 5 }, 5); +assertEq(count, 0); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-14.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-14.js new file mode 100644 index 0000000000..2875cd63b0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-14.js @@ -0,0 +1,20 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +// We're going to need to eval with a thrown exception from inside +// onExceptionUnwind, so guard against infinite recursion. +var exceptionCount = 0; +dbg.onDebuggerStatement = function (frame) { + var x = frame.evalWithBindings("throw 'haha'", { rightSpelling: 4 }).throw; + assertEq(x, "haha"); +}; +dbg.onExceptionUnwind = function (frame, exc) { + ++exceptionCount; + if (exceptionCount == 1) { + var y = frame.evalWithBindings("throw 'haha2'", { rightSpelling: 2 }).throw; + assertEq(y, "haha2"); + } else { + assertEq(frame.evalWithBindings("rightSpelling + three", { three : 3 }).return, 5); + } +}; +g.eval("(function () { var rightSpelling = 7; debugger; })();"); +assertEq(exceptionCount, 2); diff --git a/js/src/jit-test/tests/debug/Frame-evalWithBindings-15.js b/js/src/jit-test/tests/debug/Frame-evalWithBindings-15.js new file mode 100644 index 0000000000..98aba48d14 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-evalWithBindings-15.js @@ -0,0 +1,15 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +dbg.onDebuggerStatement = function (frame) { + // The bindings object is unused but adds another environment on the + // environment chain. Make sure 'this' computes the right value in light of + // this. + assertEq(frame.evalWithBindings(`this === foo;`, { bar: 42 }).return, true); + assertEq(frame.evalWithBindings(`eval('this') === foo;`, { bar: 42 }).return, true); +}; + +g.eval(` +var foo = { bar: function() { debugger; } }; +foo.bar(); +`); diff --git a/js/src/jit-test/tests/debug/Frame-identity-01.js b/js/src/jit-test/tests/debug/Frame-identity-01.js new file mode 100644 index 0000000000..de16e680be --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-identity-01.js @@ -0,0 +1,19 @@ +// Check that {return:} resumption kills the current stack frame. + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.eval("(" + function () { + var dbg = new Debugger(debuggeeGlobal); + var prev = null; + dbg.onDebuggerStatement = function (frame) { + assertEq(frame === prev, false); + if (prev) + assertEq(prev.onStack, false); + prev = frame; + return {return: frame.arguments[0]}; + }; + } + ")();"); + +function f(i) { debugger; } +for (var i = 0; i < 10; i++) + assertEq(f(i), i); diff --git a/js/src/jit-test/tests/debug/Frame-identity-02.js b/js/src/jit-test/tests/debug/Frame-identity-02.js new file mode 100644 index 0000000000..d3f1b94b9c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-identity-02.js @@ -0,0 +1,21 @@ +// Check that {throw:} resumption kills the current stack frame. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.eval("(" + function () { + var dbg = new Debugger(debuggeeGlobal); + var prev = null; + dbg.onDebuggerStatement = function (frame) { + assertEq(frame === prev, false); + if (prev) + assertEq(prev.onStack, false); + prev = frame; + return {throw: debuggeeGlobal.i}; + }; + } + ")();"); + +function f() { debugger; } +for (var i = 0; i < 10; i++) + assertThrowsValue(f, i); diff --git a/js/src/jit-test/tests/debug/Frame-identity-03.js b/js/src/jit-test/tests/debug/Frame-identity-03.js new file mode 100644 index 0000000000..fad88e01c4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-identity-03.js @@ -0,0 +1,49 @@ +// Test that we create new Debugger.Frames and reuse old ones correctly with recursion. + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.eval("(" + function () { + function id(f) { + return ("id" in f) ? f.id : (f.id = nextid++); + } + + var dbg = new Debugger(debuggeeGlobal); + dbg.onDebuggerStatement = function (frame) { + var a = []; + for (; frame; frame = frame.older) + a.push(frame); + var s = ''; + while (a.length) + s += id(a.pop()); + results.push(s); + }; + } + ")();"); + +function cons(a, b) { + debugger; + return [a, b]; +} + +function tree(n) { + if (n < 2) + return n; + return cons(tree(n - 1), tree(n - 2)); +} + +g.eval("results = []; nextid = 0;"); +debugger; +assertEq(g.results.join(","), "0"); +assertEq(g.nextid, 1); + +g.eval("results = [];"); +tree(2); +assertEq(g.results.join(","), "012"); // 0=global, 1=tree, 2=cons + +g.eval("results = []; nextid = 1;"); +tree(3); +assertEq(g.results.join(","), "0123,014"); //0=global, 1=tree(3), 2=tree(2), 3=cons, 4=cons + +g.eval("results = []; nextid = 1;"); +tree(4); +// 0=global, 1=tree(4), 2=tree(3), 3=tree(2), 4=cons, tree(1), 5=cons, 6=tree(2), 7=cons, 8=cons +assertEq(g.results.join(","), "01234,0125,0167,018"); diff --git a/js/src/jit-test/tests/debug/Frame-identity-04.js b/js/src/jit-test/tests/debug/Frame-identity-04.js new file mode 100644 index 0000000000..79d0a9f24c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-identity-04.js @@ -0,0 +1,20 @@ +// Test that on-stack Debugger.Frames are not GC'd even if they are only reachable +// from the js::Debugger::frames table. + +var g = newGlobal({newCompartment: true}); +g.eval("function f(n) { if (n) f(n - 1); debugger; }"); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + if (hits === 0) { + for (; frame; frame = frame.older) + frame.seen = true; + } else { + for (; frame; frame = frame.older) + assertEq(frame.seen, true); + } + gc(); + hits++; +}; +g.f(20); +assertEq(hits, 21); diff --git a/js/src/jit-test/tests/debug/Frame-identity-05.js b/js/src/jit-test/tests/debug/Frame-identity-05.js new file mode 100644 index 0000000000..ee92cf9c41 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-identity-05.js @@ -0,0 +1,20 @@ +// Suspended generators keep their associated Debugger.Frames gc-alive. + +var g = newGlobal({newCompartment: true}); +g.eval("function* f() { debugger; yield 1; debugger; }"); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + if (hits === 0) + frame.seen = true; + else + assertEq(frame.seen, true); + gc(); + hits++; +}; +var it = g.f(); +gc(); +assertEq(it.next().value, 1); +gc(); +assertEq(it.next().done, true); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Frame-identity-06.js b/js/src/jit-test/tests/debug/Frame-identity-06.js new file mode 100644 index 0000000000..04eb16b386 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-identity-06.js @@ -0,0 +1,45 @@ +// Debugger.Frames for async functions are not GC'd while they're suspended. +// The awaited promise keeps the generator alive, via its reaction lists. + +var g = newGlobal({newCompartment: true}); +g.eval(` + // Create a few promises. + var promises = [], resolvers = []; + for (let i = 0; i < 3; i++) + promises.push(new Promise(r => { resolvers.push(r); })); + + async function f() { + debugger; + for (let p of promises) { + await p; + debugger; + } + } +`); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + if (hits === 0) + frame.seen = true; + else + assertEq(frame.seen, true); + hits++; +}; + +let done = false; +g.f().then(_ => { done = true; }); +gc(); +drainJobQueue(); +gc(); + +// Resolve the promises one by one. +for (let [i, resolve] of g.resolvers.entries()) { + assertEq(hits, 1 + i); + assertEq(done, false); + resolve("x"); + gc(); + drainJobQueue(); + gc(); +} +assertEq(hits, 1 + g.resolvers.length); +assertEq(done, true); diff --git a/js/src/jit-test/tests/debug/Frame-identity-07.js b/js/src/jit-test/tests/debug/Frame-identity-07.js new file mode 100644 index 0000000000..fa7a835992 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-identity-07.js @@ -0,0 +1,52 @@ +// Distinct generator calls result in distinct Debugger.Frames. + +let g = newGlobal({newCompartment: true}); +g.eval(` + function* count(n) { + if (n > 0) { + for (let x of count(n - 1)) + yield x; + yield n; + } + } +`); + +let log = ""; +let dbg = Debugger(g); +let nextId = 0; +function mark(frame) { + if (frame.id === undefined) + frame.id = nextId++; +} +dbg.onEnterFrame = frame => { + mark(frame); + log += frame.id + "["; + frame.onPop = completion => { + mark(frame); + log += "]" + frame.id; + }; +}; + + +let j = 0; +for (let k of g.count(5)) { + assertEq(k, ++j); + log += " "; +} + +assertEq(log, + // Calling a generator function just returns a generator object + // without running the body at all; hence "0[]0". However, this call + // does evaluate default argument values, if any, so we do report an + // onEnterFrame / onPop for it. + "0[]0" + + // Demanding the first value from the top generator forces + // SpiderMonkey to create all five generator objects (the empty "n[]n" + // pairs) and then demand a value from them (the longer "n[...]n" + // substrings). + "0[1[]11[2[]22[3[]33[4[]44[5[]55[]5]4]3]2]1]0 " + + "0[1[2[3[4[]4]3]2]1]0 " + + "0[1[2[3[]3]2]1]0 " + + "0[1[2[]2]1]0 " + + "0[1[]1]0 " + + "0[]0"); diff --git a/js/src/jit-test/tests/debug/Frame-implementation-01.js b/js/src/jit-test/tests/debug/Frame-implementation-01.js new file mode 100644 index 0000000000..d41ff3a49b --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-implementation-01.js @@ -0,0 +1,46 @@ +// |jit-test| skip-if: getBuildConfiguration('pbl') +// Debugger.Frames of all implementations. + +load(libdir + "jitopts.js"); + +function testFrameImpl(jitopts, assertFrameImpl) { + if (!jitTogglesMatch(jitopts)) + return; + + withJitOptions(jitopts, function () { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + + g.toggle = function toggle(d) { + if (d) { + dbg.addDebuggee(g); + var frame = dbg.getNewestFrame(); + // We only care about the f and g frames. + for (var i = 0; i < 2; i++) { + assertFrameImpl(frame); + frame = frame.older; + } + } + }; + + g.eval("" + function f(d) { g(d); }); + g.eval("" + function g(d) { toggle(d); }); + + g.eval("(" + function test() { + for (var i = 0; i < 5; i++) + f(false); + f(true); + } + ")();"); + }); +} + +[[Opts_BaselineEager, + function (f) { assertEq(f.implementation, "baseline"); }], + // Note that the Ion case *depends* on CCW scripted functions being opaque to + // Ion optimization and not deoptimizing the frames below the call to toggle. + [Opts_Ion2NoOffthreadCompilation, + function (f) { assertEq(f.implementation, "ion"); }], + [Opts_NoJits, + function (f) { assertEq(f.implementation, "interpreter"); }]].forEach(function ([opts, fn]) { + testFrameImpl(opts, fn); + }); diff --git a/js/src/jit-test/tests/debug/Frame-implementation-02.js b/js/src/jit-test/tests/debug/Frame-implementation-02.js new file mode 100644 index 0000000000..ebcd65835f --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-implementation-02.js @@ -0,0 +1,51 @@ +// Test that Ion frames are invalidated by turning on Debugger. Invalidation +// is unobservable, but we know that Ion scripts cannot handle Debugger +// handlers, so we test for the handlers being called. + +load(libdir + "jitopts.js"); + +if (!jitTogglesMatch(Opts_Ion2NoOffthreadCompilation)) + quit(); + +withJitOptions(Opts_Ion2NoOffthreadCompilation, function () { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + var onPopExecuted = false; + var breakpointHit = false; + + g.toggle = function toggle(d) { + if (d) { + dbg.addDebuggee(g); + + var frame1 = dbg.getNewestFrame(); + assertEq(frame1.implementation, "ion"); + frame1.onPop = function () { + onPopExecuted = true; + }; + + var frame2 = frame1.older; + assertEq(frame2.implementation, "ion"); + // Offset of |print(42 + 42)| + var offset = frame2.script.getLineOffsets(3)[0]; + frame2.script.setBreakpoint(offset, { hit: function (fr) { + assertEq(fr.implementation != "ion", true); + breakpointHit = true; + }}); + } + }; + + g.eval("" + function f(d) { + g(d); + print(42 + 42); + }); + g.eval("" + function g(d) { toggle(d); }); + + g.eval("(" + function test() { + for (var i = 0; i < 5; i++) + f(false); + f(true); + } + ")();"); + + assertEq(onPopExecuted, true); + assertEq(breakpointHit, true); +}); diff --git a/js/src/jit-test/tests/debug/Frame-newTargetEval-01.js b/js/src/jit-test/tests/debug/Frame-newTargetEval-01.js new file mode 100644 index 0000000000..69978dcb8b --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-newTargetEval-01.js @@ -0,0 +1,40 @@ +// Test that new.target is acceptably usable in RematerializedFrames. + +gczeal(0); + +load(libdir + "jitopts.js"); + +if (!jitTogglesMatch(Opts_Ion2NoOffthreadCompilation)) + quit(); + +withJitOptions(Opts_Ion2NoOffthreadCompilation, function () { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + + g.toggle = function toggle(d, expected) { + if (d) { + dbg.addDebuggee(g); + + var frame = dbg.getNewestFrame(); + assertEq(frame.implementation, "ion"); + assertEq(frame.constructing, true); + + // CONGRATS IF THIS FAILS! You, proud saviour, have made new.target parse + // in debug frame evals (presumably by hooking up static scope walks). + // Uncomment the assert below for efaust's undying gratitude. + // Note that we use .name here because of CCW nonsense. + assertEq(frame.eval('new.target').throw.unsafeDereference().name, "SyntaxError"); + // assertEq(frame.eval('new.target').value.unsafeDereference(), expected); + } + }; + + g.eval("" + function f(d) { new g(d, g, 15); }); + + g.eval("" + function g(d, expected) { toggle(d, expected); }); + + g.eval("(" + function test() { + for (var i = 0; i < 5; i++) + f(false); + f(true); + } + ")();"); +}); diff --git a/js/src/jit-test/tests/debug/Frame-newTargetEval-02.js b/js/src/jit-test/tests/debug/Frame-newTargetEval-02.js new file mode 100644 index 0000000000..89a20d4e39 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-newTargetEval-02.js @@ -0,0 +1,43 @@ +// Test that new.target is acceptably usable in RematerializedFrames. + +gczeal(0); + +load(libdir + "jitopts.js"); + +if (!jitTogglesMatch(Opts_Ion2NoOffthreadCompilation)) + quit(); + +withJitOptions(Opts_Ion2NoOffthreadCompilation, function () { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + + g.toggle = function toggle(d, expected) { + if (d) { + dbg.addDebuggee(g); + + var frame = dbg.getNewestFrame(); + assertEq(frame.implementation, "ion"); + + // the arrow function will not be constructing, even though it has a + // new.target value. + assertEq(frame.constructing, false); + + // CONGRATS IF THIS FAILS! You, proud saviour, have made new.target parse + // in debug frame evals (presumably by hooking up static scope walks). + // Uncomment the assert below for efaust's undying gratitude. + // Note that we use .name here because of CCW nonsense. + assertEq(frame.eval('new.target').throw.unsafeDereference().name, "SyntaxError"); + // assertEq(frame.eval('new.target').return.unsafeDereference(), expected); + } + }; + + g.eval("" + function f(d) { new g(d, g, 15); }); + + g.eval("" + function g(d, expected) { (() => toggle(d, expected))(); }); + + g.eval("(" + function test() { + for (var i = 0; i < 5; i++) + f(false); + f(true); + } + ")();"); +}); diff --git a/js/src/jit-test/tests/debug/Frame-newTargetOverflow-01.js b/js/src/jit-test/tests/debug/Frame-newTargetOverflow-01.js new file mode 100644 index 0000000000..2e2b48f10c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-newTargetOverflow-01.js @@ -0,0 +1,41 @@ +// Test that Ion frames are invalidated by turning on Debugger. Invalidation +// is unobservable, but we know that Ion scripts cannot handle Debugger +// handlers, so we test for the handlers being called. + +load(libdir + "jitopts.js"); + +if (!jitTogglesMatch(Opts_Ion2NoOffthreadCompilation)) + quit(); + +// GCs can invalidate JIT code and cause this test to fail. +if ('gczeal' in this) + gczeal(0); + +withJitOptions(Opts_Ion2NoOffthreadCompilation, function () { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + + g.toggle = function toggle(d) { + if (d) { + dbg.addDebuggee(g); + + var frame = dbg.getNewestFrame(); + assertEq(frame.implementation, "ion"); + assertEq(frame.constructing, true); + + // overflow args are read from the parent's frame + // ensure we have the right offset to read from those. + assertEq(frame.arguments[1], 15); + } + }; + + g.eval("" + function f(d) { new g(d, 15); }); + + g.eval("" + function g(d) { toggle(d); }); + + g.eval("(" + function test() { + for (var i = 0; i < 5; i++) + f(false); + f(true); + } + ")();"); +}); diff --git a/js/src/jit-test/tests/debug/Frame-offset-01.js b/js/src/jit-test/tests/debug/Frame-offset-01.js new file mode 100644 index 0000000000..69f7f3ae5a --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-offset-01.js @@ -0,0 +1,11 @@ +// frame.offset throws if !frame.onStack. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var f; +dbg.onDebuggerStatement = function (frame) { f = frame; }; +g.eval("debugger;"); +assertEq(f.onStack, false); +assertThrowsInstanceOf(function () { f.offset; }, Error); diff --git a/js/src/jit-test/tests/debug/Frame-offset-02.js b/js/src/jit-test/tests/debug/Frame-offset-02.js new file mode 100644 index 0000000000..d11945cc5c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-offset-02.js @@ -0,0 +1,16 @@ +// frame.offset gives different values at different points in a script. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var s = undefined, a = [] +dbg.onDebuggerStatement = function (frame) { + if (s === undefined) + s = frame.script; + else + assertEq(s, frame.script); + assertEq(frame.offset !== undefined, true); + assertEq(a.indexOf(frame.offset), -1); + a.push(frame.offset); +}; +g.eval("debugger; debugger; debugger;"); +assertEq(a.length, 3); diff --git a/js/src/jit-test/tests/debug/Frame-offset-03.js b/js/src/jit-test/tests/debug/Frame-offset-03.js new file mode 100644 index 0000000000..4428e4e481 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-offset-03.js @@ -0,0 +1,71 @@ +// frame.offset works in generators. + +load(libdir + "asserts.js"); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +g.eval(` +function* f() { + yield 11; + yield 21; + yield 31; +} +`); + +const ranges = []; +let script; +let frame; +dbg.onEnterFrame = function(f) { + if (frame) { + assertEq(f, frame); + assertEq(f.script, script); + } else { + frame = f; + script = f.script; + assertEq(frame instanceof Debugger.Frame, true); + assertEq(script instanceof Debugger.Script, true); + } + + const range = [script.getOffsetMetadata(frame.offset).lineNumber, null]; + ranges.push(range); + f.onPop = () => { + range[1] = script.getOffsetMetadata(frame.offset).lineNumber; + }; +}; + +const it = g.f(); + +assertEq(ranges.length, 1); +assertEq(ranges[0][0], 2); +assertEq(ranges[0][1], 2); +assertEq(script.getOffsetMetadata(frame.offset).lineNumber, 2); + +it.next(); + +assertEq(ranges.length, 2); +assertEq(ranges[1][0], 2); +assertEq(ranges[1][1], 3); +assertEq(script.getOffsetMetadata(frame.offset).lineNumber, 3); + +it.next(); + +assertEq(ranges.length, 3); +assertEq(ranges[2][0], 3); +assertEq(ranges[2][1], 4); +assertEq(script.getOffsetMetadata(frame.offset).lineNumber, 4); + +it.next(); + +assertEq(ranges.length, 4); +assertEq(ranges[3][0], 4); +assertEq(ranges[3][1], 5); +assertEq(script.getOffsetMetadata(frame.offset).lineNumber, 5); + +it.next(); + +assertEq(ranges.length, 5); +assertEq(ranges[4][0], 5); +assertEq(ranges[4][1], 6); + +// The frame has finished evaluating, so the callee is no longer accessible. +assertThrowsInstanceOf(() => frame.offset, Error); diff --git a/js/src/jit-test/tests/debug/Frame-offset-04.js b/js/src/jit-test/tests/debug/Frame-offset-04.js new file mode 100644 index 0000000000..01523b563a --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-offset-04.js @@ -0,0 +1,50 @@ +// frame.offset works in async fns. + +load(libdir + "asserts.js"); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +g.eval(` +async function f() { + await Promise.resolve(); +} +`); + +const ranges = []; +let script; +let frame; +dbg.onEnterFrame = function(f) { + if (frame) { + assertEq(f, frame); + assertEq(f.script, script); + } else { + frame = f; + script = f.script; + assertEq(frame instanceof Debugger.Frame, true); + assertEq(script instanceof Debugger.Script, true); + } + + const range = [script.getOffsetMetadata(frame.offset).lineNumber, null]; + ranges.push(range); + f.onPop = () => { + range[1] = script.getOffsetMetadata(frame.offset).lineNumber; + }; +}; + +(async () => { + const promise = g.f(); + + assertEq(ranges.length, 1); + assertEq(ranges[0][0], 2); + assertEq(ranges[0][1], 3); + assertEq(script.getOffsetMetadata(frame.offset).lineNumber, 3); + + await promise; + + assertEq(ranges.length, 2); + assertEq(ranges[1][0], 3); + assertEq(ranges[1][1], 4); + + // The frame has finished evaluating, so the callee is no longer accessible. + assertThrowsInstanceOf(() => frame.offset, Error); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-offset-05.js b/js/src/jit-test/tests/debug/Frame-offset-05.js new file mode 100644 index 0000000000..92ca181e82 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-offset-05.js @@ -0,0 +1,94 @@ +// frame.offset works in async generator fns. +load(libdir + "asserts.js"); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +g.eval(` +async function* f() { + yield 11; + yield 21; + yield 31; +} +`); + +const ranges = []; +let script; +let frame; +dbg.onEnterFrame = function(f) { + if (frame) { + assertEq(f, frame); + assertEq(f.script, script); + } else { + frame = f; + script = f.script; + assertEq(frame instanceof Debugger.Frame, true); + assertEq(script instanceof Debugger.Script, true); + } + + const range = [script.getOffsetMetadata(frame.offset).lineNumber, null]; + ranges.push(range); + f.onPop = () => { + range[1] = script.getOffsetMetadata(frame.offset).lineNumber; + }; +}; + +(async () => { + let promise; + const it = g.f(); + + assertEq(ranges.length, 1); + assertEq(ranges[0][0], 2); + assertEq(ranges[0][1], 2); + assertEq(script.getOffsetMetadata(frame.offset).lineNumber, 2); + + promise = it.next(); + + assertEq(ranges.length, 2); + assertEq(ranges[1][0], 2); + assertEq(ranges[1][1], 3); + assertEq(script.getOffsetMetadata(frame.offset).lineNumber, 3); + + await promise; + + assertEq(ranges.length, 3); + assertEq(ranges[2][0], 3); + assertEq(ranges[2][1], 3); + assertEq(script.getOffsetMetadata(frame.offset).lineNumber, 3); + + promise = it.next(); + + assertEq(ranges.length, 4); + assertEq(ranges[3][0], 3); + assertEq(ranges[3][1], 4); + assertEq(script.getOffsetMetadata(frame.offset).lineNumber, 4); + + await promise; + + assertEq(ranges.length, 5); + assertEq(ranges[4][0], 4); + assertEq(ranges[4][1], 4); + assertEq(script.getOffsetMetadata(frame.offset).lineNumber, 4); + + promise = it.next(); + + assertEq(ranges.length, 6); + assertEq(ranges[5][0], 4); + assertEq(ranges[5][1], 5); + assertEq(script.getOffsetMetadata(frame.offset).lineNumber, 5); + + await promise; + + assertEq(ranges.length, 7); + assertEq(ranges[6][0], 5); + assertEq(ranges[6][1], 5); + assertEq(script.getOffsetMetadata(frame.offset).lineNumber, 5); + + promise = it.next(); + + assertEq(ranges.length, 8); + assertEq(ranges[7][0], 5); + assertEq(ranges[7][1], 6); + + // The frame has finished evaluating, so the callee is no longer accessible. + assertThrowsInstanceOf(() => frame.offset, Error); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-older-01.js b/js/src/jit-test/tests/debug/Frame-older-01.js new file mode 100644 index 0000000000..750c6614b8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-older-01.js @@ -0,0 +1,19 @@ +// Basic call chain. + +var g = newGlobal({newCompartment: true}); +var result = null; +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + var a = []; + assertEq(frame === frame.older, false); + for (; frame; frame = frame.older) + a.push(frame.type === 'call' ? frame.callee.name : frame.type); + a.reverse(); + result = a.join(", "); +}; + +g.eval("function first() { return second(); }"); +g.eval("function second() { return eval('third()'); }"); +g.eval("function third() { debugger; }"); +g.evaluate("first();"); +assertEq(result, "global, first, second, eval, third"); diff --git a/js/src/jit-test/tests/debug/Frame-older-02.js b/js/src/jit-test/tests/debug/Frame-older-02.js new file mode 100644 index 0000000000..c5f772e46c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-older-02.js @@ -0,0 +1,34 @@ +// An explicit async stack should interrupt a Debugger.Frame chain. + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +let done = false; +dbg.onDebuggerStatement = function (frame) { + // The frame has no "older" frame because the explicit async stack + // attached to the async function takes priority over the real + // parent frame that is tracked in the frame iterator. + assertEq(!!frame.older, false); + + done = true; +}; + +g.eval(` +let draining = false; +async function run() { + await Promise.resolve(); + + // Make sure that the test is running within "drainJobQueue()". + assertEq(draining, true); + debugger; +} + +(function main() { + run(); + + // Force resumption of the "run" function. + draining = true; + drainJobQueue(); + draining = false; +})(); +`); +assertEq(done, true); diff --git a/js/src/jit-test/tests/debug/Frame-older-generators-01.js b/js/src/jit-test/tests/debug/Frame-older-generators-01.js new file mode 100644 index 0000000000..f79f485faf --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-older-generators-01.js @@ -0,0 +1,53 @@ +// Generator/async frames can be created by following .older. +// +// The goal here is to get some test coverage creating generator Frame objects +// at some time other than when firing onEnterFrame. Here they're created after +// the initial yield. + +let g = newGlobal({newCompartment: true}); +g.eval(` + function f() { + debugger; + } + function* gen() { + f(); + yield 1; + f(); + } + function* genDefaults(x=f()) { + f(); + } + async function af() { + f(); + await 1; + f(); + } + async function afDefaults(x=f()) { + await 1; + f(); + } +`); + +function test(expected, code) { + let dbg = Debugger(g); + let hits = 0; + let genFrame = null; + dbg.onDebuggerStatement = frame => { + hits++; + assertEq(frame.callee.name, "f"); + if (genFrame === null) { + genFrame = frame.older; + } else { + assertEq(frame.older, genFrame); + } + assertEq(genFrame.callee.name, expected); + }; + g.eval(code); + assertEq(hits, 2); + dbg.removeDebuggee(g); +} + +test("gen", "for (var x of gen()) {}"); +test("genDefaults", "for (var x of genDefaults()) {}"); +test("af", "af(); drainJobQueue();"); +test("afDefaults", "afDefaults(); drainJobQueue();") diff --git a/js/src/jit-test/tests/debug/Frame-older-generators-02.js b/js/src/jit-test/tests/debug/Frame-older-generators-02.js new file mode 100644 index 0000000000..f677bf64a8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-older-generators-02.js @@ -0,0 +1,50 @@ +// Like Frame-older-generators-01.js, but attach the debugger on the fly. +// +// (That is, check that it works even if the debugger never received +// onNewGenerator for the generator, because it wasn't attached at the time.) + +let g = newGlobal({newCompartment: true}); +g.eval(` + function f() { + attach(); + debugger; + } + function* gen() { + f(); + yield 1; + f(); + } + async function af() { + f(); + await 1; + f(); + } +`); + +function test(expected, code) { + let dbg; + let hits = 0; + let genFrame = null; + + g.attach = () => { + if (dbg === undefined) { + dbg = Debugger(g); + dbg.onDebuggerStatement = frame => { + hits++; + assertEq(frame.callee.name, "f"); + if (genFrame === null) { + genFrame = frame.older; + } else { + assertEq(frame.older, genFrame); + } + assertEq(genFrame.callee.name, expected); + }; + } + }; + g.eval(code); + assertEq(hits, 2); + dbg.removeDebuggee(g); +} + +test("gen", "for (var x of gen()) {}"); +test("af", "af(); drainJobQueue();"); diff --git a/js/src/jit-test/tests/debug/Frame-older-generators-03.js b/js/src/jit-test/tests/debug/Frame-older-generators-03.js new file mode 100644 index 0000000000..128898b206 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-older-generators-03.js @@ -0,0 +1,24 @@ +// Test that Debugger.Frame.prototype.older works on suspended generators. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +g.eval(` +function* f() {} +`); + +let frame; +dbg.onEnterFrame = f => { + frame = f; + dbg.onEnterFrame = undefined; +}; + +const it = g.f(); + +assertEq(frame.older, null); + +it.next(); + +assertThrowsInstanceOf(() => frame.older, Error); diff --git a/js/src/jit-test/tests/debug/Frame-older-generators-04.js b/js/src/jit-test/tests/debug/Frame-older-generators-04.js new file mode 100644 index 0000000000..405e08bed5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-older-generators-04.js @@ -0,0 +1,28 @@ +// Test that Debugger.Frame.prototype.older works on suspended async functions. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +g.eval(` +async function f() { + await Promise.resolve(); +} +`); + +let frame; +dbg.onEnterFrame = f => { + frame = f; + dbg.onEnterFrame = undefined; +}; + +(async () => { + const promise = g.f(); + + assertEq(frame.older, null); + + await promise; + + assertThrowsInstanceOf(() => frame.older, Error); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-older-generators-05.js b/js/src/jit-test/tests/debug/Frame-older-generators-05.js new file mode 100644 index 0000000000..61267a8443 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-older-generators-05.js @@ -0,0 +1,32 @@ +// Test that Debugger.Frame.prototype.older works on suspended async generators. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +g.eval(` +async function* f() { + await Promise.resolve(); +} +`); + +let frame; +dbg.onEnterFrame = f => { + frame = f; + dbg.onEnterFrame = undefined; +}; + +(async () => { + const it = g.f(); + + assertEq(frame.older, null); + + const promise = it.next(); + + assertEq(frame.older, null); + + await promise; + + assertThrowsInstanceOf(() => frame.older, Error); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-olderSavedFrame-01.js b/js/src/jit-test/tests/debug/Frame-olderSavedFrame-01.js new file mode 100644 index 0000000000..018e6130ea --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-olderSavedFrame-01.js @@ -0,0 +1,40 @@ +// An explicit async stack should be available via olderSavedFrame. +// This test makes sure that "main" shows up as an async saved frame +// instead of "older", even though "drainJobQueue()" is running inside of +// "main()" directly. + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +let done = false; +dbg.onDebuggerStatement = function (frame) { + // This frame has an "olderSavedFrame" because "run()" is an async function + // and those have explicit async stacks attached to them. + const parent = frame.olderSavedFrame; + assertEq(typeof parent.source, "string"); + assertEq(parent.line, 12); + assertEq(parent.column, 3); + assertEq(parent.asyncCause, "async"); + assertEq(parent.functionDisplayName, "main"); + done = true; +}; + +g.eval(` +let draining = false; +async function run() { + await Promise.resolve(); + + // Make sure that the test is running within "drainJobQueue()". + assertEq(draining, true); + debugger; +} + +(function main() { + run(); + + // Force resumption of the "run" function. + draining = true; + drainJobQueue(); + draining = false; +})(); +`); +assertEq(done, true); diff --git a/js/src/jit-test/tests/debug/Frame-olderSavedFrame-02.js b/js/src/jit-test/tests/debug/Frame-olderSavedFrame-02.js new file mode 100644 index 0000000000..ae774b8784 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-olderSavedFrame-02.js @@ -0,0 +1,32 @@ +// An explicit async stack should be available via olderSavedFrame. +// This test makes sure that "main" shows up as an async saved frame properly +// when the promise is resumed normally outside "main()". + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +let done = false; +dbg.onDebuggerStatement = function (frame) { + // This frame has an "olderSavedFrame" because "run()" is an async function + // and those have explicit async stacks attached to them. + const parent = frame.olderSavedFrame; + assertEq(typeof parent.source, "string"); + assertEq(parent.line, 9); + assertEq(parent.column, 3); + assertEq(parent.asyncCause, "async"); + assertEq(parent.functionDisplayName, "main"); + done = true; +}; + +g.eval(` +let draining = false; +async function run() { + await Promise.resolve(); + debugger; +} + +(function main() { + run(); +})(); +drainJobQueue(); +`); +assertEq(done, true); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-01.js b/js/src/jit-test/tests/debug/Frame-onPop-01.js new file mode 100644 index 0000000000..2b9f227e3d --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-01.js @@ -0,0 +1,29 @@ +// When multiple frames have onPop handlers, they are called in the correct order. +var g = newGlobal({newCompartment: true}); +g.eval("function f() { debugger; }"); +g.eval("function g() { f(); }"); +g.eval("function h() { g(); }"); +g.eval("function i() { h(); }"); + +var dbg = new Debugger(g); +var log; +function logger(frame, mark) { + return function (completion) { + assertEq(this, frame); + assertEq('return' in completion, true); + log += mark; + }; +} +dbg.onEnterFrame = function handleEnter(f) { + log += "(" + f.callee.name; + // Note that this establishes a distinct function object as each + // frame's onPop handler. Thus, a pass proves that each frame is + // remembering its handler separately. + f.onPop = logger(f, f.callee.name + ")"); +}; +dbg.onDebuggerStatement = function handleDebugger(f) { + log += 'd'; +}; +log = ''; +g.i(); +assertEq(log, "(i(h(g(fdf)g)h)i)"); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-02.js b/js/src/jit-test/tests/debug/Frame-onPop-02.js new file mode 100644 index 0000000000..11179f64b9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-02.js @@ -0,0 +1,20 @@ +// Clearing a frame's onPop handler works. +var g = newGlobal({newCompartment: true}); +g.eval("function f() { debugger; }"); +var dbg = new Debugger(g); + +var log; +dbg.onEnterFrame = function handleEnter(f) { + log += "("; + f.onPop = function handlePop() { + assertEq("handlePop was called", "handlePop should never be called"); + }; +}; +dbg.onDebuggerStatement = function handleDebugger(f) { + log += "d"; + assertEq(typeof f.onPop, "function"); + f.onPop = undefined; +}; +log = ''; +g.f(); +assertEq(log, "(d"); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-03.js b/js/src/jit-test/tests/debug/Frame-onPop-03.js new file mode 100644 index 0000000000..e2a2034921 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-03.js @@ -0,0 +1,32 @@ +// When an exception is propagated out of multiple frames, their onPop +// and onExceptionUnwind handlers are called in the correct order. +var g = newGlobal({newCompartment: true}); +g.eval("function f() { throw 'mud'; }"); +g.eval("function g() { f(); }"); +g.eval("function h() { g(); }"); +g.eval("function i() { h(); }"); + +var dbg = new Debugger(g); +var log; +function makePopHandler(label) { + return function handlePop(completion) { + log += label; + assertEq(completion.throw, "mud"); + }; +} +dbg.onEnterFrame = function handleEnter(f) { + log += "(" + f.callee.name; + f.onPop = makePopHandler(")" + f.callee.name); +}; +dbg.onExceptionUnwind = function handleExceptionUnwind(f, x) { + assertEq(x, 'mud'); + log += "u" + f.callee.name; +}; +log = ''; +try { + g.i(); +} catch (x) { + log += 'c'; + assertEq(x, "mud"); +} +assertEq(log, "(i(h(g(fuf)fug)guh)hui)ic"); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-04.js b/js/src/jit-test/tests/debug/Frame-onPop-04.js new file mode 100644 index 0000000000..3915fce278 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-04.js @@ -0,0 +1,30 @@ +// When a termination is propagated out of multiple frames, their onPop +// handlers are called in the correct order, and no onExceptionUnwind +// handlers are called. +var g = newGlobal({newCompartment: true}); +g.eval("function f() { terminate(); }"); +g.eval("function g() { f(); }"); +g.eval("function h() { g(); }"); +g.eval("function i() { h(); }"); + +var dbg = new Debugger(g); +var log; +var count = 0; +function makePopHandler(label, resumption) { + return function handlePop(completion) { + log += label; + assertEq(completion, null); + return resumption; + }; +} +dbg.onEnterFrame = function handleEnter(f) { + log += "(" + f.callee.name; + f.onPop = makePopHandler(f.callee.name + ")", + count++ == 0 ? { return: 'king' } : undefined); +}; +dbg.onExceptionUnwind = function handleExceptionUnwind(f, x) { + log += 'u'; +}; +log = ''; +assertEq(g.i(), 'king'); +assertEq(log, "(i(h(g(ff)g)h)i)"); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-05.js b/js/src/jit-test/tests/debug/Frame-onPop-05.js new file mode 100644 index 0000000000..6e73c0e1ce --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-05.js @@ -0,0 +1,25 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +g.debuggerGlobal = this; +var log; + +dbg.onEnterFrame = function handleEnter(f) { + log += '('; + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c.throw, "election"); + }; +}; +dbg.onExceptionUnwind = function handleExceptionUnwind(f, x) { + log += 'u'; + assertEq(x, "election"); +}; + +log = ''; +try { + g.eval("try { throw 'election'; } finally { debuggerGlobal.log += 'f'; }"); +} catch (x) { + log += 'c'; + assertEq(x, 'election'); +} +assertEq(log, '(ufu)c'); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-06.js b/js/src/jit-test/tests/debug/Frame-onPop-06.js new file mode 100644 index 0000000000..05e8474564 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-06.js @@ -0,0 +1,20 @@ +// dbg.getNewestFrame in an onPop handler returns the frame being popped. + +var g = newGlobal({newCompartment: true}); +g.eval("function f() { debugger; }"); +g.eval("function g() { f(); }"); +g.eval("function h() { g(); }"); +g.eval("function i() { h(); }"); + +var dbg = new Debugger(g); +var log; +dbg.onEnterFrame = function handleEnter(f) { + log += "(" + f.callee.name; + f.onPop = function handlePop(c) { + log += ")" + f.callee.name; + assertEq(dbg.getNewestFrame(), this); + }; +}; +log = ''; +g.i(); +assertEq(log, "(i(h(g(f)f)g)h)i"); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-08.js b/js/src/jit-test/tests/debug/Frame-onPop-08.js new file mode 100644 index 0000000000..2d7f63576d --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-08.js @@ -0,0 +1,16 @@ +// Setting onPop handlers from a 'debugger' statement handler works. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +dbg.onDebuggerStatement = function handleDebugger(frame) { + assertEq(frame.type, "eval"); + log += 'd'; + frame.onPop = function handlePop(c) { + log += ')'; + }; +}; + +log = ''; +g.eval('debugger;'); +assertEq(log, 'd)'); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-09.js b/js/src/jit-test/tests/debug/Frame-onPop-09.js new file mode 100644 index 0000000000..2147a76905 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-09.js @@ -0,0 +1,23 @@ +// Setting onPop handlers from an onExceptionUnwind handler works. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +dbg.onExceptionUnwind = function handleUnwind(frame) { + log += 'u'; + assertEq(frame.type, "eval"); + frame.onPop = function handleCallPop(c) { + log += ')'; + assertEq(c.throw, 'up'); + }; +}; + +log = ""; +try { + g.eval("throw 'up';"); + log += '-'; +} catch (x) { + log += 'c'; + assertEq(x, 'up'); +} +assertEq(log, 'u)c'); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-10.js b/js/src/jit-test/tests/debug/Frame-onPop-10.js new file mode 100644 index 0000000000..091bf076e4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-10.js @@ -0,0 +1,22 @@ +// Setting onPop handlers from an onStep handler works. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +dbg.onDebuggerStatement = function handleDebugger(frame) { + log += 'd'; + assertEq(frame.type, "eval"); + frame.onStep = function handleStep() { + log += 's'; + this.onStep = undefined; + this.onPop = function handlePop() { + log += ')'; + }; + }; +}; + +log = ""; +g.flag = false; +g.eval('debugger; flag = true'); +assertEq(log, 'ds)'); +assertEq(g.flag, true); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-11.js b/js/src/jit-test/tests/debug/Frame-onPop-11.js new file mode 100644 index 0000000000..36b58cd6dc --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-11.js @@ -0,0 +1,23 @@ +// Setting onPop handlers from breakpoint handlers works. +var g = newGlobal({newCompartment: true}); +g.eval("function f(){ return 'to normalcy'; }"); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +var log; + +// Set a breakpoint at the start of g.f +var gf = gw.makeDebuggeeValue(g.f); +var fStartOffset = gf.script.getLineOffsets(gf.script.startLine)[0]; +gf.script.setBreakpoint(fStartOffset, { + hit: function handleHit(frame) { + log += 'b'; + frame.onPop = function handlePop(c) { + log += ')'; + assertEq(c.return, "to normalcy"); + }; + } +}); + +log = ""; +assertEq(g.f(), "to normalcy"); +assertEq(log, "b)"); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-12.js b/js/src/jit-test/tests/debug/Frame-onPop-12.js new file mode 100644 index 0000000000..6fef64d635 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-12.js @@ -0,0 +1,21 @@ +// Setting an onPop handler from an onPop handler doesn't throw, but the +// new handler doesn't fire. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +dbg.onDebuggerStatement = function handleDebugger(frame) { + log += 'd'; + assertEq(frame.type, "eval"); + frame.onPop = function firstHandlePop(c) { + log +=')'; + assertEq(c.return, 'on investment'); + this.onPop = function secondHandlePop(c) { + assertEq("secondHandlePop was called", "secondHandlePop should never be called"); + }; + }; +}; + +log = ""; +g.eval("debugger; 'on investment';"); +assertEq(log, 'd)'); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-13.js b/js/src/jit-test/tests/debug/Frame-onPop-13.js new file mode 100644 index 0000000000..2fe0f79ddf --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-13.js @@ -0,0 +1,37 @@ +// One can set onPop handlers on some frames but not others. +var g = newGlobal({newCompartment: true}); +g.eval("function f(n) { if (n > 0) f(n-1); else debugger; }"); +var dbg = new Debugger(g); +var log; + +Debugger.Frame.prototype.nthOlder = function nthOlder(n) { + var f = this; + while (n-- > 0) + f = f.older; + return f; +}; + +dbg.onEnterFrame = function handleEnter(f) { + log += "(" + f.arguments[0]; +}; + +function makePopHandler(n) { + return function handlePop(c) { + log += ")" + this.arguments[0]; + assertEq(this.arguments[0], n); + }; +} + +dbg.onDebuggerStatement = function handleDebugger(f) { + // Set onPop handers on some frames, and leave others alone. Vary the + // spacing. + f.nthOlder(2).onPop = makePopHandler(2); + f.nthOlder(3).onPop = makePopHandler(3); + f.nthOlder(5).onPop = makePopHandler(5); + f.nthOlder(8).onPop = makePopHandler(8); + f.nthOlder(13).onPop = makePopHandler(13); +}; + +log = ''; +g.f(20); +assertEq(log, "(20(19(18(17(16(15(14(13(12(11(10(9(8(7(6(5(4(3(2(1(0)2)3)5)8)13"); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-14.js b/js/src/jit-test/tests/debug/Frame-onPop-14.js new file mode 100644 index 0000000000..671f63d4bb --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-14.js @@ -0,0 +1,25 @@ +// A frame's onPop handler is called only once, even if it is for a function +// called from a loop. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +var count; +dbg.onDebuggerStatement = function handleDebug(frame) { + log += 'd'; + assertEq(frame.type, "call"); + count++; + if (count == 10) { + frame.onPop = function handlePop(c) { + log += ')' + this.arguments[0]; + assertEq(c.return, "snifter"); + }; + } +}; + +g.eval("function f(n) { debugger; return 'snifter'; }"); +log = ''; +count = 0; +g.eval("for (i = 0; i < 20; i++) f(i);"); +assertEq(count, 20); +assertEq(log, "dddddddddd)9dddddddddd"); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-15.js b/js/src/jit-test/tests/debug/Frame-onPop-15.js new file mode 100644 index 0000000000..6b76723cb2 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-15.js @@ -0,0 +1,31 @@ +// Each resumption of a generator gets the same Frame; its onPop handler +// fires each time the generator yields. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +var seenFrame = null; +dbg.onDebuggerStatement = function handleDebugger(frame) { + log += 'd'; + assertEq(frame.type, "call"); + + if (seenFrame === null) { + seenFrame = frame; + } else { + assertEq(seenFrame, frame); + } + + let i = frame.eval('i').return; + if (i % 3 == 0) { + frame.onPop = function handlePop(c) { + assertEq(this, seenFrame); + log += ')' + i; + }; + } +}; + +g.eval("function* g() { for (var i = 0; i < 10; i++) { debugger; yield i; } }"); +log =''; +assertEq(g.eval("var t = 0; for (j of g()) t += j; t;"), 45); +assertEq(log, "d)0d)0d)0d)3d)3d)3d)6d)6d)6d)9)9"); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-16.js b/js/src/jit-test/tests/debug/Frame-onPop-16.js new file mode 100644 index 0000000000..dfb765d1e7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-16.js @@ -0,0 +1,18 @@ +// onPop handlers fire even on frames that make tail calls. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +g.eval('function f(n) { if (n > 0) f(n-1); else debugger; }'); + +dbg.onEnterFrame = function handleEnter(frame) { + log += '('; + frame.onPop = function handlePop(c) { + log += ')'; + assertEq(typeof c == "object" && 'return' in c, true); + }; +}; + +log = ''; +g.f(10); +assertEq(log, "((((((((((()))))))))))"); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-17.js b/js/src/jit-test/tests/debug/Frame-onPop-17.js new file mode 100644 index 0000000000..f37bcb3cd5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-17.js @@ -0,0 +1,41 @@ +// onPop surfaces. +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +// Assigning a bogus value to Debugger.Frame.prototype.onPop raises a TypeError. +function test(badValue) { + print("store " + JSON.stringify(badValue) + " in Debugger.Frame.prototype.onPop"); + + var log; + dbg.onDebuggerStatement = function handleDebugger(frame) { + log += "d"; + assertThrowsInstanceOf(function () { frame.onPop = badValue; }, TypeError); + }; + + log = ""; + g.eval("debugger"); + assertEq(log, "d"); +} + +test(null); +test(false); +test(1); +test("stringy"); +test(Symbol("symbolic")); +test({}); +test([]); + +// Getting and setting the prototype's onPop is an error. +assertThrowsInstanceOf(function () { Debugger.Frame.prototype.onPop; }, TypeError); +assertThrowsInstanceOf( + function () { Debugger.Frame.prototype.onPop = function () {}; }, + TypeError); + +// The getters and setters correctly check the type of their 'this' argument. +var descriptor = Object.getOwnPropertyDescriptor(Debugger.Frame.prototype, 'onPop'); +assertEq(descriptor.configurable, true); +assertEq(descriptor.enumerable, false); +assertThrowsInstanceOf(function () { descriptor.get.call({}); }, TypeError); +assertThrowsInstanceOf(function () { descriptor.set.call({}, function() {}); }, TypeError); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-18.js b/js/src/jit-test/tests/debug/Frame-onPop-18.js new file mode 100644 index 0000000000..2fd37c27bb --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-18.js @@ -0,0 +1,22 @@ +// A garbage collection in the debugger compartment does not disturb onPop +// handlers. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +dbg.onEnterFrame = function handleEnter(frame) { + log += '('; + frame.onPop = function handlePop(completion) { + log += ')'; + }; +}; + +dbg.onDebuggerStatement = function handleDebugger (frame) { + log += 'd'; + // GC in the debugger's compartment only. + gc(dbg); +}; + +log = ''; +assertEq(g.eval('debugger; 42;'), 42); +assertEq(log, '(d)'); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-19.js b/js/src/jit-test/tests/debug/Frame-onPop-19.js new file mode 100644 index 0000000000..27c8a9b131 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-19.js @@ -0,0 +1,16 @@ +// A garbage collection in the debuggee compartment does not disturb onPop +// handlers. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +dbg.onEnterFrame = function handleEnter(frame) { + log += '('; + frame.onPop = function handlePop(completion) { + log += ')'; + }; +}; + +log = ''; +assertEq(g.eval('gc(this); 42;'), 42); +assertEq(log, '()'); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-20.js b/js/src/jit-test/tests/debug/Frame-onPop-20.js new file mode 100644 index 0000000000..2702c48048 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-20.js @@ -0,0 +1,15 @@ +// A global garbage collection does not disturb onPop handlers. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; + +dbg.onEnterFrame = function handleEnter(frame) { + log += '('; + frame.onPop = function handlePop(completion) { + log += ')'; + }; +}; + +log = ''; +assertEq(g.eval('gc(); 42;'), 42); +assertEq(log, '()'); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-21.js b/js/src/jit-test/tests/debug/Frame-onPop-21.js new file mode 100644 index 0000000000..c7d52f974c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-21.js @@ -0,0 +1,30 @@ +// frame.eval works from an onPop handler. +var g = newGlobal({newCompartment: true}); +g.eval('function f(a,b) { var x = "entablature", y; debugger; return x+y+a+b; }'); + +var dbg = new Debugger(g); +var log; + +dbg.onDebuggerStatement = function handleDebugger(frame) { + log += 'd'; + frame.onPop = handlePop; +}; + +function handlePop(c) { + log += ')'; + + // Arguments must be live. + assertEq(this.eval('a').return, 'frieze'); + assertEq(this.eval('b = "architrave"').return, 'architrave'); + assertEq(this.eval('arguments[1]').return, 'architrave'); + assertEq(this.eval('b').return, 'architrave'); + + // function-scope variables must be live. + assertEq(this.eval('x').return, 'entablature'); + assertEq(this.eval('y = "cornice"').return, 'cornice'); + assertEq(this.eval('y').return, 'cornice'); +} + +log = ''; +g.eval('f("frieze", "stylobate")'); +assertEq(log, 'd)'); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-23.js b/js/src/jit-test/tests/debug/Frame-onPop-23.js new file mode 100644 index 0000000000..894250ef5b --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-23.js @@ -0,0 +1,34 @@ +// Check that the line number reported at an onPop stop makes sense, +// even when it happens on an "artificial" instruction. + +var g = newGlobal({newCompartment: true}); + +// This bit of code arranges for the line number of the "artificial" +// instruction to be something nonsensical -- the middle of a loop +// which cannot be entered. +g.eval(`function f() { + debugger; // +0 + if(false) { // +1 + for(var b=0; b<0; b++) { // +2 + c = 2; // +3 + } // +4 + } // +5 +} // +6 +`); + +var dbg = Debugger(g); + +let debugLine; +let foundLine; + +dbg.onDebuggerStatement = function(frame) { + debugLine = frame.script.getOffsetLocation(frame.offset).lineNumber; + frame.onPop = function(c) { + foundLine = this.script.getOffsetLocation(this.offset).lineNumber; + }; +}; + +g.eval("f();\n"); + +// The stop should happen on the closing brace of the function. +assertEq(foundLine == debugLine + 6, true); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-after-debugger-return.js b/js/src/jit-test/tests/debug/Frame-onPop-after-debugger-return.js new file mode 100644 index 0000000000..ddd117bf83 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-after-debugger-return.js @@ -0,0 +1,11 @@ +// Bug 744730. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (f) { return {return: 1234}; }; +var hit = false; +dbg.onEnterFrame = function (f) { + f.onPop = function () { hit = true}; +}; +g.eval("debugger;"); +assertEq(hit, true); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-assign-function.js b/js/src/jit-test/tests/debug/Frame-onPop-assign-function.js new file mode 100644 index 0000000000..1994248d90 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-assign-function.js @@ -0,0 +1,48 @@ +// Changing onPop while the function is dead is allowed. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +let steps = new Set(); +dbg.onDebuggerStatement = function(frame) { + // Setting 'onPop' while alive is allowed. + steps.add("debugger 1"); + assertEq(frame.onStack, true); + frame.onPop = function() { + steps.add("onpop 1"); + }; + + dbg.onDebuggerStatement = function() { + // Clear the 'onPop' while dead. + steps.add("debugger 2"); + assertEq(frame.onStack, false); + + // Clearing 'onPop' while dead is allowed. + frame.onPop = undefined; + + // Setting 'onPop' while dead is allowed. + frame.onPop = function() { + steps.add("onpop 2"); + }; + }; +}; + +g.eval( + ` + function myGen() { + debugger; + } + + const g = myGen(); + + debugger; + ` +); + +assertDeepEq(Array.from(steps), [ + "debugger 1", + "onpop 1", + "debugger 2", +]); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-assign-generator.js b/js/src/jit-test/tests/debug/Frame-onPop-assign-generator.js new file mode 100644 index 0000000000..14a7a2a162 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-assign-generator.js @@ -0,0 +1,68 @@ +// Changing onPop while the generator is suspended/dead is allowed. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +let steps = new Set(); +dbg.onDebuggerStatement = function(frame) { + // Setting 'onStep' while alive is allowed. + steps.add("debugger 1"); + assertEq(frame.onStack, true); + frame.onPop = function() { + steps.add("onpop 1"); + }; + + dbg.onDebuggerStatement = function() { + // Clear the 'onPop' while suspended. + steps.add("debugger 2"); + assertEq(frame.onStack, false); + + // Clearing 'onPop' while suspended is allowed. + frame.onPop = undefined; + + // Setting 'onPop' while suspended is allowed. + frame.onPop = function() { + steps.add("onpop 2"); + }; + + dbg.onDebuggerStatement = function() { + steps.add("debugger 3"); + assertEq(frame.onStack, false); + + // Clearing 'onPop' while dead is allowed. + frame.onPop = undefined; + + // Setting 'onPop' while dead is allowed. + frame.onPop = function() { + steps.add("onpop 3"); + }; + }; + }; +}; + +g.eval( + ` + function* myGen() { + debugger; + yield; + } + + const g = myGen(); + g.next(); + + debugger; + g.next(); + + debugger; + ` +); + +assertDeepEq(Array.from(steps), [ + "debugger 1", + "onpop 1", + "debugger 2", + "onpop 2", + "debugger 3", +]); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-async-01.js b/js/src/jit-test/tests/debug/Frame-onPop-async-01.js new file mode 100644 index 0000000000..8d491f3f7f --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-async-01.js @@ -0,0 +1,39 @@ +// When an async function awaits, if Frame.onPop processes microtasks, +// the async function itself will not run. It'll run later. +// +// This is a reentrancy test, like Frame-onPop-generators-03. + +let g = newGlobal({newCompartment: true}); +g.log = ""; +g.eval(` + async function f() { + log += "1"; + debugger; + log += "2"; + await Promise.resolve(3); + log += "3"; + return "ok"; + } +`); + +let dbg = Debugger(g); +dbg.onDebuggerStatement = frame => { + frame.onPop = completion => { + // What we are really testing is that when onPop is called, we have not + // yet thrown this async function activation back into the hopper. + g.log += 'A'; + drainJobQueue(); + g.log += 'B'; + + frame.onPop = completion => { + g.log += 'C'; + }; + }; +}; + +let status = "FAIL - g.f() did not resolve"; +g.f().then(value => { status = value; }); +assertEq(g.log, "12AB"); +drainJobQueue(); +assertEq(g.log, "12AB3C"); +assertEq(status, "ok"); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-async-02.js b/js/src/jit-test/tests/debug/Frame-onPop-async-02.js new file mode 100644 index 0000000000..8e579b588b --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-async-02.js @@ -0,0 +1,36 @@ +// |jit-test| error:all-jobs-completed-successfully + +load(libdir + 'match.js'); +load(libdir + 'match-debugger.js'); +const { Pattern } = Match; +const { OBJECT_WITH_EXACTLY: EXACT } = Pattern; + +let g = newGlobal({newCompartment: true}); +let dbg = Debugger(g); +const log = []; +g.capture = function () { + dbg.getNewestFrame().onPop = completion => { + log.push(completion); + }; +}; + +g.eval(` + async function f() { + capture(); + await Promise.resolve(3); + return "ok"; + } +`); + + +const promise = g.f(); +promise.then(value => { + assertEq(value, "ok"); + + Pattern([ + EXACT({ return: new DebuggerObjectPattern("Promise"), await:true }), + EXACT({ return: new DebuggerObjectPattern("Promise") }), + ]).assert(log); + + throw "all-jobs-completed-successfully"; +}); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-async-generators-01.js b/js/src/jit-test/tests/debug/Frame-onPop-async-generators-01.js new file mode 100644 index 0000000000..0c2cc27f8c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-async-generators-01.js @@ -0,0 +1,53 @@ +// |jit-test| error:all-jobs-completed-successfully + +load(libdir + "asserts.js"); +load(libdir + 'match.js'); +load(libdir + 'match-debugger.js'); +const { Pattern } = Match; +const { OBJECT_WITH_EXACTLY: EXACT } = Pattern; + +let g = newGlobal({newCompartment: true}); +let dbg = Debugger(g); +const log = []; +g.capture = function () { + dbg.getNewestFrame().onPop = completion => { + log.push(completion); + }; +}; + +g.eval(` + async function* asyncgen() { + capture(); + await Promise.resolve(1); + yield 2; + await Promise.resolve(3); + yield 4; + return "ok"; + } +`); + +async function collect() { + let items = []; + for await (let item of g.asyncgen()) { + items.push(item); + } + return items; +} + +collect().then(value => { + assertDeepEq(value, [2, 4]); + + Pattern([ + EXACT({ return: new DebuggerObjectPattern("Promise"), await: true }), + EXACT({ return: 2, await: true }), + EXACT({ return: 2, yield: true }), + EXACT({ return: new DebuggerObjectPattern("Promise"), await: true }), + EXACT({ return: 4, await: true }), + EXACT({ return: 4, yield: true }), + EXACT({ return: "ok", await: true }), + EXACT({ return: "ok" }), + ]).assert(log); + + throw "all-jobs-completed-successfully"; +}); + diff --git a/js/src/jit-test/tests/debug/Frame-onPop-dead-frame.js b/js/src/jit-test/tests/debug/Frame-onPop-dead-frame.js new file mode 100644 index 0000000000..52c6f2ab79 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-dead-frame.js @@ -0,0 +1,28 @@ +// Don't crash trying to fire a dead frame's onPop handler. + +var g = newGlobal({newCompartment: true}); +g.eval('function f() { debugger; }'); + +var log = ''; + +// Create two Debuggers debugging the same global `g`. Both will put onPop +// handlers on the same frame. +var dbg1 = Debugger(g); +dbg1.onDebuggerStatement = frame1 => { + frame1.onPop = completion => { + log += 'A'; + dbg2.removeDebuggee(g); // kills frame2, so frame2.onPop should not fire + log += 'B'; + }; +}; + +var dbg2 = Debugger(g); +dbg2.onDebuggerStatement = frame2 => { + frame2.onPop = completion => { + log += 'C'; + }; +}; + +g.f(); + +assertEq(log, 'AB'); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-error-error.js b/js/src/jit-test/tests/debug/Frame-onPop-error-error.js new file mode 100644 index 0000000000..fc6c18b6d4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-error-error.js @@ -0,0 +1,60 @@ +// |jit-test| error: TestComplete +// onPop can request a termination when stopped for a termination + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +// We use Debugger.Frame.prototype.eval and ignore the outer 'eval' frame so we +// can catch the termination. + +function test(type, provocation) { + // Help people figure out which 'test' call failed. + print("type: " + JSON.stringify(type)); + print("provocation: " + JSON.stringify(provocation)); + + var log; + dbg.onEnterFrame = function handleFirstFrame(f) { + log += 'f'; + dbg.onDebuggerStatement = function handleDebugger(f) { + log += 'd'; + return null; + }; + + dbg.onEnterFrame = function handleSecondFrame(f) { + log += 'e'; + assertEq(f.type, 'eval'); + + dbg.onEnterFrame = function handleThirdFrame(f) { + log += '('; + assertEq(f.type, type); + + dbg.onEnterFrame = function handleExtraFrames(f) { + // This should never be called. + assertEq(false, true); + }; + + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c, null); + return null; + }; + }; + }; + + assertEq(f.eval(provocation), null); + }; + + log = ''; + // This causes handleFirstFrame to be called. + assertEq(typeof g.eval('eval'), 'function'); + assertEq(log, 'fe(d)'); + + print(); +} + +g.eval('function f() { debugger; return \'termination fail\'; }'); +test('call', 'f();'); +test('call', 'new f;'); +test('eval', 'eval(\'debugger; \\\'termination fail\\\';\');'); +test('global', 'evaluate(\'debugger; \\\'termination fail\\\';\');'); +throw 'TestComplete'; diff --git a/js/src/jit-test/tests/debug/Frame-onPop-error-return.js b/js/src/jit-test/tests/debug/Frame-onPop-error-return.js new file mode 100644 index 0000000000..d8abdebd70 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-error-return.js @@ -0,0 +1,47 @@ +// |jit-test| error: TestComplete +// onPop can change a termination into a normal return. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +function test(type, provocation) { + var log; + var wasConstructing; + + // Help people figure out which 'test' call failed. + print("type: " + JSON.stringify(type)); + print("provocation: " + JSON.stringify(provocation)); + + dbg.onDebuggerStatement = function handleDebuggerStatement(f) { + log += 'd'; + return null; + }; + + dbg.onEnterFrame = function handleEnterFrame(f) { + log += '('; + assertEq(f.type, type); + wasConstructing = f.constructing; + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c, null); + return { return: 'favor' }; + }; + }; + + log = ''; + var result = provocation(); + if (wasConstructing) + assertEq(typeof result, "object"); + else + assertEq(result, 'favor'); + assertEq(log, "(d)"); + + print(); +} + +g.eval("function f() { debugger; return 'termination fail'; }"); +test("call", g.f); +test("call", function () { return new g.f; }); +test("eval", function () { return g.eval("debugger; \'termination fail\';"); }); +test("global", function () { return g.evaluate("debugger; \'termination fail\';"); }); +throw 'TestComplete'; diff --git a/js/src/jit-test/tests/debug/Frame-onPop-error-scope-unwind-01.js b/js/src/jit-test/tests/debug/Frame-onPop-error-scope-unwind-01.js new file mode 100644 index 0000000000..c4c6ee0f73 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-error-scope-unwind-01.js @@ -0,0 +1,33 @@ +// Tests that exception handling works with block scopes. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var correct; +dbg.onEnterFrame = function (f) { + if (f.callee && f.callee.name == "f") { + f.onPop = function() { + // The scope at the point of onPop is at the point of popping (the + // noSuchFn call). + correct = (f.environment.getVariable("e") === 42 && + f.environment.getVariable("outer") === undefined); + }; + } +}; +g.eval("" + function f() { + var outer = 43; + try { + eval(""); + throw 42; + } catch (e) { + noSuchFn(e); + } +}); + + +try { + g.eval("f();"); +} catch (e) { + // The above is expected to throw. +} + +assertEq(correct, true); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-error-scope-unwind-02.js b/js/src/jit-test/tests/debug/Frame-onPop-error-scope-unwind-02.js new file mode 100644 index 0000000000..935c4173a0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-error-scope-unwind-02.js @@ -0,0 +1,36 @@ +// Tests that exception handling works with block scopes. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var correct; +dbg.onEnterFrame = function (f) { + if (f.callee && f.callee.name == "f") { + f.onPop = function() { + // The scope at the point of onPop is at the point of popping (the + // noSuchFn call). + correct = (f.environment.getVariable("e") === 42 && + f.environment.getVariable("outer") === undefined); + }; + } +}; +g.eval("" + function f() { + var outer = 43; + // Surround with a loop to insert a loop trynote. + for (;;) { + try { + eval(""); + throw 42; + } catch (e) { + noSuchFn(e); + } + } +}); + + +try { + g.eval("f();"); +} catch (e) { + // The above is expected to throw. +} + +assertEq(correct, true); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-error-throw.js b/js/src/jit-test/tests/debug/Frame-onPop-error-throw.js new file mode 100644 index 0000000000..0f96865ead --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-error-throw.js @@ -0,0 +1,42 @@ +// |jit-test| error: TestComplete +// onPop can change a termination into a throw. + +load(libdir + "asserts.js"); +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +function test(type, provocation) { + var log; + + // Help people figure out which 'test' call failed. + print("type: " + JSON.stringify(type)); + print("provocation: " + JSON.stringify(provocation)); + + dbg.onDebuggerStatement = function handleDebuggerStatement(f) { + log += 'd'; + return null; + }; + + dbg.onEnterFrame = function handleEnterFrame(f) { + log += '('; + assertEq(f.type, type); + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c, null); + return { throw: 'snow' }; + }; + }; + + log = ''; + assertThrowsValue(provocation, 'snow'); + assertEq(log, "(d)"); + + print(); +} + +g.eval("function f() { debugger; return 'termination fail'; }"); +test("call", g.f); +test("call", function () { return new g.f; }); +test("eval", function () { return g.eval("debugger; \'termination fail\';"); }); +test("global", function () { return g.evaluate("debugger; \'termination fail\';"); }); +throw 'TestComplete'; diff --git a/js/src/jit-test/tests/debug/Frame-onPop-error.js b/js/src/jit-test/tests/debug/Frame-onPop-error.js new file mode 100644 index 0000000000..777bf70c97 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-error.js @@ -0,0 +1,59 @@ +// |jit-test| error: TestComplete +// onPop fires when frames are terminated. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +// We use Debugger.Frame.prototype.eval and ignore the outer 'eval' frame so we +// can catch the termination. + +function test(type, provocation) { + // Help people figure out which 'test' call failed. + print("type: " + JSON.stringify(type)); + print("provocation: " + JSON.stringify(provocation)); + + var log; + dbg.onEnterFrame = function handleFirstFrame(f) { + log += 'f'; + dbg.onDebuggerStatement = function handleDebugger(f) { + log += 'd'; + return null; + }; + + dbg.onEnterFrame = function handleSecondFrame(f) { + log += 'e'; + assertEq(f.type, 'eval'); + + dbg.onEnterFrame = function handleThirdFrame(f) { + log += '('; + assertEq(f.type, type); + + dbg.onEnterFrame = function handleExtraFrames(f) { + // This should never be called. + assertEq(false, true); + }; + + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c, null); + }; + }; + }; + + assertEq(f.eval(provocation), null); + }; + + log = ''; + // This causes handleFirstFrame to be called. + assertEq(typeof g.eval('eval'), 'function'); + assertEq(log, 'fe(d)'); + + print(); +} + +g.eval('function f() { debugger; return \'termination fail\'; }'); +test('call', 'f();'); +test('call', 'new f;'); +test('eval', 'eval(\'debugger; \\\'termination fail\\\';\');'); +test('global', 'evaluate(\'debugger; \\\'termination fail\\\';\');'); +throw 'TestComplete'; diff --git a/js/src/jit-test/tests/debug/Frame-onPop-generator-resumption-01.js b/js/src/jit-test/tests/debug/Frame-onPop-generator-resumption-01.js new file mode 100644 index 0000000000..617baceb7b --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-generator-resumption-01.js @@ -0,0 +1,14 @@ +// A generator is left closed after frame.onPop returns a {return:} resumption value. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +dbg.onDebuggerStatement = frame => { + frame.onPop = completion => ({return: "ok"}); +}; +g.eval("function* g() { for (var i = 0; i < 10; i++) { debugger; yield i; } }"); +var it = g.g(); +var result = it.next(); +assertEq(result.value, "ok"); +assertEq(result.done, true); +assertEq(it.next().value, undefined); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-generators-01.js b/js/src/jit-test/tests/debug/Frame-onPop-generators-01.js new file mode 100644 index 0000000000..6f64bdd6a4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-generators-01.js @@ -0,0 +1,20 @@ +// Returning {throw:} from an onPop handler when yielding works. +// It closes the generator-iterator. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +dbg.onDebuggerStatement = function handleDebugger(frame) { + frame.onPop = function (c) { + return {throw: "fit"}; + }; +}; +g.eval("function* g() { for (var i = 0; i < 10; i++) { debugger; yield i; } }"); +g.eval("var it = g();"); +var rv = gw.executeInGlobal("it.next();"); +assertEq(rv.throw, "fit"); + +dbg.enabled = false; +assertEq(g.it.next().value, undefined); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-generators-02.js b/js/src/jit-test/tests/debug/Frame-onPop-generators-02.js new file mode 100644 index 0000000000..8b1ea96e60 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-generators-02.js @@ -0,0 +1,19 @@ +// |jit-test| error: fit + +// Throwing an exception from an onPop handler when yielding terminates the debuggee +// but does not close the generator-iterator. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +dbg.onDebuggerStatement = function handleDebugger(frame) { + frame.onPop = function (c) { + throw "fit"; + }; +}; +g.eval("function* g() { for (var i = 0; i < 10; i++) { debugger; yield i; } }"); +g.eval("var it = g();"); +assertEq(gw.executeInGlobal("it.next();"), null); + +dbg.enabled = false; +assertEq(g.it.next().value, 1); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-generators-03.js b/js/src/jit-test/tests/debug/Frame-onPop-generators-03.js new file mode 100644 index 0000000000..cb7b43a08a --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-generators-03.js @@ -0,0 +1,42 @@ +// onPop fires while the [[GeneratorState]] is still "executing". +// +// This test checks that Debugger doesn't accidentally make it possible to +// reenter a generator frame that's on the stack. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval('function* f() { debugger; yield 1; debugger; yield 2; debugger; }'); +let dbg = Debugger(g); +let genObj = g.f(); + +let hits = 0; +dbg.onDebuggerStatement = frame => { + frame.onPop = completion => { + dbg.removeDebuggee(g); // avoid the DebuggeeWouldRun exception + hits++; + if (hits < 3) { + // We're yielding. Calling .return(), .next(), or .throw() on a + // generator that's currently on the stack fails with a TypeError. + assertThrowsInstanceOf(() => genObj.next(), g.TypeError); + assertThrowsInstanceOf(() => genObj.throw("fit"), g.TypeError); + assertThrowsInstanceOf(() => genObj.return(), g.TypeError); + } else { + // This time we're returning. The generator has already been + // closed, so its methods work but are basically no-ops. + let result = genObj.next(); + assertEq(result.done, true); + assertEq(result.value, undefined); + + assertThrowsValue(() => genObj.throw("fit"), "fit"); + + result = genObj.return(); + assertEq(result.done, true); + assertEq(result.value, undefined); + } + dbg.addDebuggee(g); + }; +}; + +for (let x of genObj) {} +assertEq(hits, 3); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-generators-04.js b/js/src/jit-test/tests/debug/Frame-onPop-generators-04.js new file mode 100644 index 0000000000..8e4ea689e6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-generators-04.js @@ -0,0 +1,26 @@ +// Terminating a generator from the onPop callback for its initial yield +// leaves the Frame in a sane but inactive state. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval("function* f(x) { yield x; }"); +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); + +let genFrame = null; +dbg.onDebuggerStatement = frame => { + dbg.onEnterFrame = frame => { + if (frame.callee == gw.getOwnPropertyDescriptor("f").value) { + genFrame = frame; + frame.onPop = completion => null; + } + }; + assertEq(frame.eval("f(0);"), null); +}; + +g.eval("debugger;"); + +assertEq(genFrame instanceof Debugger.Frame, true); +assertEq(genFrame.onStack, false); +assertThrowsInstanceOf(() => genFrame.callee, Error); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-generators-05.js b/js/src/jit-test/tests/debug/Frame-onPop-generators-05.js new file mode 100644 index 0000000000..09d66d7c84 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-generators-05.js @@ -0,0 +1,29 @@ +// In .onPop for the "initial yield" of a generator, while the generator frame +// is on the stack, the generator object's .next() method throws. + +let g = newGlobal({newCompartment: true}); +g.eval(` + function* f() { + return "ok"; + } +`); + +let hits = 0; +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); +dbg.onEnterFrame = frame => { + dbg.onEnterFrame = undefined; // Trigger only once. + frame.onPop = completion => { + // Initial yield. + let genObj = completion.return; + assertEq(genObj.class, "Generator"); + let result = frame.evalWithBindings("genObj.next()", {genObj}); + assertEq(result.throw.class, "TypeError"); + assertEq(result.throw.getProperty("message").return, + "already executing generator"); + hits++; + }; +}; + +g.f(); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-generators-06.js b/js/src/jit-test/tests/debug/Frame-onPop-generators-06.js new file mode 100644 index 0000000000..993e2e11bb --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-generators-06.js @@ -0,0 +1,28 @@ +load(libdir + "asserts.js"); +load(libdir + 'match.js'); +load(libdir + 'match-debugger.js'); +const { Pattern } = Match; +const { OBJECT_WITH_EXACTLY: EXACT } = Pattern; + +let g = newGlobal({newCompartment: true}); +let dbg = Debugger(g); +const log = []; +g.capture = function () { + dbg.getNewestFrame().onPop = completion => { + log.push(completion); + }; +}; + +g.eval(` + function* f() { + capture(); + yield 3; + return "ok"; + } +`); + +assertDeepEq([... g.f()], [3]); +Pattern([ + EXACT({ return: new DebuggerObjectPattern("Object", { value: 3, done: false }), yield: true }), + EXACT({ return: new DebuggerObjectPattern("Object", { value: "ok", done: true }) }), +]).assert(log); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-generators-07.js b/js/src/jit-test/tests/debug/Frame-onPop-generators-07.js new file mode 100644 index 0000000000..7872b345e6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-generators-07.js @@ -0,0 +1,40 @@ +// Completion values for generators report yields and initial yields. + +load(libdir + "asserts.js"); +load(libdir + 'match.js'); +load(libdir + 'match-debugger.js'); +const { Pattern } = Match; +const { OBJECT_WITH_EXACTLY: X } = Pattern; + +const g = newGlobal({ newCompartment: true }); +g.eval(` + function* f() { + yield "yielding"; + return "returning"; + } +`); + +const dbg = new Debugger(g); +const completions = []; +dbg.onEnterFrame = frame => { + frame.onPop = completion => { + completions.push(completion); + }; +}; + +assertDeepEq([... g.f()], ["yielding"]); +print(JSON.stringify(completions)); +Pattern([ + X({ + return: new DebuggerObjectPattern("Generator", {}), + yield: true, + initial: true + }), + X({ + return: new DebuggerObjectPattern("Object", { value: "yielding", done: false }), + yield: true + }), + X({ + return: new DebuggerObjectPattern("Object", { value: "returning", done: true }) + }), +]).assert(completions); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-generators-08.js b/js/src/jit-test/tests/debug/Frame-onPop-generators-08.js new file mode 100644 index 0000000000..75238ee17c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-generators-08.js @@ -0,0 +1,16 @@ +// Creating a new generator frame after the generator is closed. + +var g = newGlobal({ newCompartment: true }); +g.eval("function* gen(x) { debugger; }"); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = frame => { + frame.onPop = completion => { + assertEq(frame.callee.name, "gen"); + assertEq(frame.eval("x").return, 3); + var f2 = (new Debugger(g)).getNewestFrame(); + assertEq(f2.callee.name, "gen"); + assertEq(f2.eval("x").return, 3); + }; +}; +g.gen(3).next(); + diff --git a/js/src/jit-test/tests/debug/Frame-onPop-multiple-01.js b/js/src/jit-test/tests/debug/Frame-onPop-multiple-01.js new file mode 100644 index 0000000000..e5280bae6b --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-multiple-01.js @@ -0,0 +1,106 @@ +// Multiple debuggers all get their onPop handlers called. + +function completionsEqual(c1, c2) { + if (c1 && c2) { + if (c1.throw) + return c1.throw === c2.throw; + else + return c1.return === c2.return; + } + return c1 === c2; +} + +function completionString(c) { + if (c == null) + return 'x'; + if (c.return) + return 'r' + c.return; + if (c.throw) + return 't' + c.throw; + return '?'; +} + +var g = newGlobal({newCompartment: true}); // poor thing +g.eval('function f() { debugger; return "1"; }'); + +// A list of the debuggers' Debugger.Frame instances. When it's all over, +// we test that they are all marked as no longer live. +var frames = []; + +// We start off the test via Debugger.Frame.prototype.eval, so if we end +// with a termination, we still catch it, instead of aborting the whole +// test. (Debugger.Object.prototype.executeInGlobal would simplify this...) +var dbg0 = new Debugger(g); +dbg0.onEnterFrame = function handleOriginalEnter(frame) { + dbg0.log += '('; + dbg0.onEnterFrame = undefined; + + assertEq(frame.onStack, true); + frames.push(frame); + + var dbgs = []; + var log; + + // Create a separate debugger to carry out each item in sequence. + for (let i = 0; i < 9; i++) { + // Each debugger's handlers close over a distinct 'dbg', but + // that's the only distinction between them. Otherwise, they're + // driven entirely by global data, so the order in which events are + // dispatched to them shouldn't matter. + let dbg = new Debugger(g); + dbgs.push(dbg); + + dbg.onDebuggerStatement = function handleDebuggerStatement(f) { + log += 'd'; + assertEq(f.onStack, true); + frames.push(f); + }; + + // First expect the 'eval'... + dbg.onEnterFrame = function handleEnterEval(f) { + log += 'e'; + assertEq(f.type, 'eval'); + assertEq(f.onStack, true); + frames.push(f); + + // Then expect the call. + dbg.onEnterFrame = function handleEnterCall(f) { + log += '('; + assertEq(f.type, 'call'); + assertEq(f.onStack, true); + frames.push(f); + + // Don't expect any further frames. + dbg.onEnterFrame = function handleExtraEnter(f) { + log += 'z'; + }; + + f.onPop = function handlePop(c) { + log += ')'; + assertEq(this.onStack, true); + assertEq(completionsEqual(c, { return: '1' }), true); + frames.push(this); + + // Check that this debugger is in the list, and then remove it. + var i = dbgs.indexOf(dbg); + assertEq(i != -1, true); + dbgs.splice(i,1); + }; + }; + }; + } + + log = ''; + assertEq(completionsEqual(frame.eval('f()'), { return: '1' }), true); + assertEq(log, "eeeeeeeee(((((((((ddddddddd)))))))))"); + + dbg0.log += '.'; +}; + +dbg0.log = ''; +g.eval('eval'); +assertEq(dbg0.log, '(.'); + +// Check that all Debugger.Frame instances we ran into are now marked as dead. +for (var i = 0; i < frames.length; i++) + assertEq(frames[i].onStack, false); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-multiple-02.js b/js/src/jit-test/tests/debug/Frame-onPop-multiple-02.js new file mode 100644 index 0000000000..6ab1283c9f --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-multiple-02.js @@ -0,0 +1,36 @@ +// One Debugger's onPop handler can remove another Debugger's onPop handler. +var g = newGlobal({newCompartment: true}); +var dbg1 = new Debugger(g); +var dbg2 = new Debugger(g); + +var log; +var frames = []; +var firstPop = true; + +function handleEnter(frame) { + log += '('; + frames.push(frame); + frame.onPop = function handlePop(completion) { + log += ')'; + assertEq(completion.return, 42); + if (firstPop) { + // We can't say which frame's onPop handler will get called first. + if (this == frames[0]) + frames[1].onPop = undefined; + else + frames[0].onPop = undefined; + gc(); + } else { + assertEq("second pop handler was called", + "second pop handler should not be called"); + } + firstPop = false; + }; +}; + +dbg1.onEnterFrame = handleEnter; +dbg2.onEnterFrame = handleEnter; + +log = ''; +assertEq(g.eval('40 + 2'), 42); +assertEq(log, '(()'); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-multiple-04.js b/js/src/jit-test/tests/debug/Frame-onPop-multiple-04.js new file mode 100644 index 0000000000..451359ce7e --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-multiple-04.js @@ -0,0 +1,27 @@ +// If one Debugger's onPop handler causes another Debugger to create a +// Debugger.Frame instance referring to the same frame, that frame still +// gets marked as not live after all the onPop handlers have run. +var g = newGlobal({newCompartment: true}); +var dbg1 = new Debugger(g); +var dbg2 = new Debugger(g); + +var log; +var frame2; + +dbg1.onEnterFrame = function handleEnter(frame) { + log += '('; + frame.onPop = function handlerPop1(c) { + log += ')'; + frame2 = dbg2.getNewestFrame(); + assertEq(frame2.onStack, true); + frame2.onPop = function handlePop2(c) { + assertEq("late frame's onPop handler ran", + "late frame's onPop handler should not run"); + }; + }; +}; + +log = ''; +assertEq(g.eval('40 + 2'), 42); +assertEq(log, '()'); +assertEq(frame2.onStack, false); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-return-error.js b/js/src/jit-test/tests/debug/Frame-onPop-return-error.js new file mode 100644 index 0000000000..d01134f63e --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-return-error.js @@ -0,0 +1,59 @@ +// |jit-test| error: TestComplete +// onPop can change a normal return into a termination. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +// We use Debugger.Frame.prototype.eval and ignore the outer 'eval' frame so we +// can catch the termination. + +function test(type, provocation) { + // Help people figure out which 'test' call failed. + print("type: " + JSON.stringify(type)); + print("provocation: " + JSON.stringify(provocation)); + + var log; + dbg.onEnterFrame = function handleFirstFrame(f) { + log += 'f'; + dbg.onDebuggerStatement = function handleDebugger(f) { + log += 'd'; + }; + + dbg.onEnterFrame = function handleSecondFrame(f) { + log += 'e'; + assertEq(f.type, 'eval'); + + dbg.onEnterFrame = function handleThirdFrame(f) { + log += '('; + assertEq(f.type, type); + + dbg.onEnterFrame = function handleExtraFrames(f) { + // This should never be called. + assertEq(false, true); + }; + + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c.return, 'compliment'); + return null; + }; + }; + }; + + assertEq(f.eval(provocation), null); + }; + + log = ''; + // This causes handleFirstFrame to be called. + assertEq(typeof g.eval('eval'), 'function'); + assertEq(log, 'fe(d)'); + + print(); +} + +g.eval('function f() { debugger; return \'compliment\'; }'); +test('call', 'f();'); +test('call', 'new f;'); +test('eval', 'eval(\'debugger; \\\'compliment\\\';\');'); +test('global', 'evaluate(\'debugger; \\\'compliment\\\';\');'); +throw 'TestComplete'; diff --git a/js/src/jit-test/tests/debug/Frame-onPop-return-return.js b/js/src/jit-test/tests/debug/Frame-onPop-return-return.js new file mode 100644 index 0000000000..f8c8240b88 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-return-return.js @@ -0,0 +1,46 @@ +// |jit-test| error: TestComplete +// onPop can change a normal return into a normal return of a different value. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +function test(type, provocation) { + var log; + var wasConstructing; + + // Help people figure out which 'test' call failed. + print("type: " + JSON.stringify(type)); + print("provocation: " + JSON.stringify(provocation)); + + dbg.onDebuggerStatement = function handleDebuggerStatement(f) { + log += 'd'; + }; + + dbg.onEnterFrame = function handleEnterFrame(f) { + log += '('; + assertEq(f.type, type); + wasConstructing = f.constructing; + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c.return, 'compliment'); + return { return: 'favor' }; + }; + }; + + log = ''; + var result = provocation(); + if (wasConstructing) + assertEq(typeof result, "object"); + else + assertEq(result, 'favor'); + assertEq(log, "(d)"); + + print(); +} + +g.eval("function f() { debugger; return 'compliment'; }"); +test("call", g.f); +test("call", function () { return new g.f; }); +test("eval", function () { return g.eval("debugger; \'compliment\';"); }); +test("global", function () { return g.evaluate("debugger; \'compliment\';"); }); +throw 'TestComplete'; diff --git a/js/src/jit-test/tests/debug/Frame-onPop-return-throw.js b/js/src/jit-test/tests/debug/Frame-onPop-return-throw.js new file mode 100644 index 0000000000..369f316119 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-return-throw.js @@ -0,0 +1,41 @@ +// |jit-test| error: TestComplete +// onPop can change a normal return into a throw. + +load(libdir + "asserts.js"); +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +function test(type, provocation) { + var log; + + // Help people figure out which 'test' call failed. + print("type: " + JSON.stringify(type)); + print("provocation: " + JSON.stringify(provocation)); + + dbg.onDebuggerStatement = function handleDebuggerStatement(f) { + log += 'd'; + }; + + dbg.onEnterFrame = function handleEnterFrame(f) { + log += '('; + assertEq(f.type, type); + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c.return, 'compliment'); + return { throw: 'snow' }; + }; + }; + + log = ''; + assertThrowsValue(provocation, 'snow'); + assertEq(log, "(d)"); + + print(); +} + +g.eval("function f() { debugger; return 'compliment'; }"); +test("call", g.f); +test("call", function () { return new g.f; }); +test("eval", function () { return g.eval("debugger; \'compliment\';"); }); +test("global", function () { return g.evaluate("debugger; \'compliment\';"); }); +throw 'TestComplete'; diff --git a/js/src/jit-test/tests/debug/Frame-onPop-return.js b/js/src/jit-test/tests/debug/Frame-onPop-return.js new file mode 100644 index 0000000000..e1288d8d3a --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-return.js @@ -0,0 +1,45 @@ +// |jit-test| error: TestComplete +// onPop fires when frames return normally. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +function test(type, provocation) { + var log; + var wasConstructing; + + // Help people figure out which 'test' call failed. + print("type: " + JSON.stringify(type)); + print("provocation: " + JSON.stringify(provocation)); + + dbg.onDebuggerStatement = function handleDebuggerStatement(f) { + log += 'd'; + }; + + dbg.onEnterFrame = function handleEnterFrame(f) { + log += '('; + assertEq(f.type, type); + wasConstructing = f.constructing; + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c.return, 'compliment'); + }; + }; + + log = ''; + var result = provocation(); + if (wasConstructing) + assertEq(typeof result, "object"); + else + assertEq(result, 'compliment'); + assertEq(log, "(d)"); + + print(); +} + +g.eval("function f() { debugger; return 'compliment'; }"); +test("call", g.f); +test("call", function () { return new g.f; }); +test("eval", function () { return g.eval("debugger; \'compliment\';"); }); +test("global", function () { return g.evaluate("debugger; \'compliment\';"); }); +throw 'TestComplete'; diff --git a/js/src/jit-test/tests/debug/Frame-onPop-source-location.js b/js/src/jit-test/tests/debug/Frame-onPop-source-location.js new file mode 100644 index 0000000000..fef9df7770 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-source-location.js @@ -0,0 +1,58 @@ +// Ensure onPop hook for the final return/yield uses the correct source location +// (closing '}' of the function body). + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onEnterFrame = frame => { + if (frame.type === "global") { + return; + } + frame.onPop = c => { + if (c.yield !== true) { + const data = frame.script.getOffsetMetadata(frame.offset); + g.log.push(`pop(${data.lineNumber}:${data.columnNumber})`); + } + }; +}; +g.evaluate(` // line 1 +this.log = []; // 2 +function A() { // 3 + log.push("A"); // 4 + if (log === null) { // 5 + throw "fail"; // 6 + } // 7 +} // 8 +function* B() { // 9 + log.push("B"); // 10 + if (log === null) { // 11 + throw "fail"; // 12 + } // 13 +} // 14 +async function C() { // 15 + log.push("C"); // 16 + if (log === null) { // 17 + throw "fail"; // 18 + } // 19 +} // 20 +let D = async () => { // 21 + log.push("D"); // 22 + if (log === null) { // 23 + throw "fail"; // 24 + } // 25 +}; // 26 +class E extends class {} { // 27 + constructor() { // 28 + log.push("E"); // 29 + super(); // 30 + if (log === null) { // 31 + throw "fail"; // 32 + } // 33 + } // 34 +} // 35 +A(); +for (let x of B()) {} +C(); +D(); +new E(); +`); +assertEq(g.log.join(","), "A,pop(8:1),B,pop(14:1),C,pop(20:1),D,pop(26:1),E,pop(27:17),pop(34:5)"); diff --git a/js/src/jit-test/tests/debug/Frame-onPop-throw-error.js b/js/src/jit-test/tests/debug/Frame-onPop-throw-error.js new file mode 100644 index 0000000000..83dee69686 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-throw-error.js @@ -0,0 +1,59 @@ +// |jit-test| error: TestComplete +// onPop can change a throw into a termination. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +// We use Debugger.Frame.prototype.eval and ignore the outer 'eval' frame so we +// can catch the termination. + +function test(type, provocation) { + // Help people figure out which 'test' call failed. + print("type: " + JSON.stringify(type)); + print("provocation: " + JSON.stringify(provocation)); + + var log; + dbg.onEnterFrame = function handleFirstFrame(f) { + log += 'f'; + dbg.onDebuggerStatement = function handleDebugger(f) { + log += 'd'; + }; + + dbg.onEnterFrame = function handleSecondFrame(f) { + log += 'e'; + assertEq(f.type, 'eval'); + + dbg.onEnterFrame = function handleThirdFrame(f) { + log += '('; + assertEq(f.type, type); + + dbg.onEnterFrame = function handleExtraFrames(f) { + // This should never be called. + assertEq(false, true); + }; + + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c.throw, 'mud'); + return null; + }; + }; + }; + + assertEq(f.eval(provocation), null); + }; + + log = ''; + // This causes handleFirstFrame to be called. + assertEq(typeof g.eval('eval'), 'function'); + assertEq(log, 'fe(d)'); + + print(); +} + +g.eval('function f() { debugger; throw \'mud\'; }'); +test('call', 'f();'); +test('call', 'new f;'); +test('eval', 'eval(\'debugger; throw \\\'mud\\\';\');'); +test('global', 'evaluate(\'debugger; throw \\\'mud\\\';\');'); +throw 'TestComplete'; diff --git a/js/src/jit-test/tests/debug/Frame-onPop-throw-return.js b/js/src/jit-test/tests/debug/Frame-onPop-throw-return.js new file mode 100644 index 0000000000..a7c323d5f2 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-throw-return.js @@ -0,0 +1,46 @@ +// |jit-test| error: TestComplete +// onPop can change a throw into a normal return. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +function test(type, provocation) { + var log; + var wasConstructing; + + // Help people figure out which 'test' call failed. + print("type: " + JSON.stringify(type)); + print("provocation: " + JSON.stringify(provocation)); + + dbg.onDebuggerStatement = function handleDebuggerStatement(f) { + log += 'd'; + }; + + dbg.onEnterFrame = function handleEnterFrame(f) { + log += '('; + assertEq(f.type, type); + wasConstructing = f.constructing; + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c.throw, 'mud'); + return { return: 'favor' }; + }; + }; + + log = ''; + var result = provocation(); + if (wasConstructing) + assertEq(typeof result, "object"); + else + assertEq(result, 'favor'); + assertEq(log, "(d)"); + + print(); +} + +g.eval("function f() { debugger; throw 'mud'; }"); +test("call", g.f); +test("call", function () { return new g.f; }); +test("eval", function () { return g.eval("debugger; throw \'mud\';"); }); +test("global", function () { return g.evaluate("debugger; throw \'mud\';"); }); +throw 'TestComplete'; diff --git a/js/src/jit-test/tests/debug/Frame-onPop-throw-throw.js b/js/src/jit-test/tests/debug/Frame-onPop-throw-throw.js new file mode 100644 index 0000000000..5562b1f44c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-throw-throw.js @@ -0,0 +1,41 @@ +// |jit-test| error: TestComplete +// onPop can change a throw into a throw of a different value. + +load(libdir + "asserts.js"); +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +function test(type, provocation) { + var log; + + // Help people figure out which 'test' call failed. + print("type: " + JSON.stringify(type)); + print("provocation: " + JSON.stringify(provocation)); + + dbg.onDebuggerStatement = function handleDebuggerStatement(f) { + log += 'd'; + }; + + dbg.onEnterFrame = function handleEnterFrame(f) { + log += '('; + assertEq(f.type, type); + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c.throw, 'mud'); + return { throw: 'snow' }; + }; + }; + + log = ''; + assertThrowsValue(provocation, 'snow'); + assertEq(log, "(d)"); + + print(); +} + +g.eval("function f() { debugger; throw 'mud'; }"); +test("call", g.f); +test("call", function () { return new g.f; }); +test("eval", function () { return g.eval("debugger; throw \'mud\';"); }); +test("global", function () { return g.evaluate("debugger; throw \'mud\';"); }); +throw 'TestComplete'; diff --git a/js/src/jit-test/tests/debug/Frame-onPop-throw.js b/js/src/jit-test/tests/debug/Frame-onPop-throw.js new file mode 100644 index 0000000000..8e481a8736 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onPop-throw.js @@ -0,0 +1,40 @@ +// |jit-test| error: TestComplete +// onPop fires when frames throw an exception. + +load(libdir + "asserts.js"); +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +function test(type, provocation) { + var log; + + // Help people figure out which 'test' call failed. + print("type: " + JSON.stringify(type)); + print("provocation: " + JSON.stringify(provocation)); + + dbg.onDebuggerStatement = function handleDebuggerStatement(f) { + log += 'd'; + }; + + dbg.onEnterFrame = function handleEnterFrame(f) { + log += '('; + assertEq(f.type, type); + f.onPop = function handlePop(c) { + log += ')'; + assertEq(c.throw, 'mud'); + }; + }; + + log = ''; + assertThrowsValue(provocation, 'mud'); + assertEq(log, "(d)"); + + print(); +} + +g.eval("function f() { debugger; throw 'mud'; }"); +test("call", g.f); +test("call", function () { return new g.f; }); +test("eval", function () { return g.eval("debugger; throw \'mud\';"); }); +test("global", function () { return g.evaluate("debugger; throw \'mud\';"); }); +throw 'TestComplete'; diff --git a/js/src/jit-test/tests/debug/Frame-onStack-01.js b/js/src/jit-test/tests/debug/Frame-onStack-01.js new file mode 100644 index 0000000000..3e69a0a8b3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStack-01.js @@ -0,0 +1,41 @@ +// Debugger.Frame.prototype.onStack is true for frames on the stack and false for +// frames that have returned + +var desc = Object.getOwnPropertyDescriptor(Debugger.Frame.prototype, "live"); +assertEq(typeof desc.get, "function"); +assertEq(desc.set, undefined); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, false); + +var loc; + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.eval("var hits = 0;"); +g.eval("(" + function () { + var a = []; + var dbg = Debugger(debuggeeGlobal); + dbg.onDebuggerStatement = function (frame) { + var loc = debuggeeGlobal.loc; + a[loc] = frame; + for (var i = 0; i < a.length; i++) { + assertEq(a[i] === frame, i === loc); + assertEq(!!(a[i] && a[i].onStack), i >= loc); + } + hits++; + }; + } + ")()"); + +function f(n) { + loc = n; debugger; + if (n !== 0) { + f(n - 1); + loc = n; debugger; + eval("f(n - 1);"); + loc = n; debugger; + } +} + +f(4); +assertEq(g.hits, 16 + 8*3 + 4*3 + 2*3 + 1*3); + diff --git a/js/src/jit-test/tests/debug/Frame-onStack-02.js b/js/src/jit-test/tests/debug/Frame-onStack-02.js new file mode 100644 index 0000000000..be21f1e18a --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStack-02.js @@ -0,0 +1,32 @@ +// Debugger.Frame.prototype.onStack is false for frames that have thrown or been thrown through + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.eval("var finalCheck;"); +g.eval("(" + function () { + var a = []; + var dbg = Debugger(debuggeeGlobal); + dbg.onDebuggerStatement = function (frame) { + a.push(frame); + for (var i = 0; i < a.length; i++) + assertEq(a[i].onStack, true); + }; + finalCheck = function (n) { + assertEq(a.length, n); + for (var i = 0; i < n; i++) + assertEq(a[i].onStack, false); + }; + } + ")()"); + +function f(n) { + debugger; + if (--n > 0) + f(n); + else + throw "fit"; +} + +assertThrowsValue(function () { f(10); }, "fit"); +g.finalCheck(10); diff --git a/js/src/jit-test/tests/debug/Frame-onStack-03.js b/js/src/jit-test/tests/debug/Frame-onStack-03.js new file mode 100644 index 0000000000..af872782d5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStack-03.js @@ -0,0 +1,25 @@ +// frame properties throw if !frame.onStack + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var f; +Debugger(g).onDebuggerStatement = function (frame) { + assertEq(frame.onStack, true); + assertEq(frame.type, "call"); + assertEq(frame.this instanceof Object, true); + assertEq(frame.older instanceof Debugger.Frame, true); + assertEq(frame.callee instanceof Debugger.Object, true); + assertEq(frame.constructing, false); + assertEq(frame.arguments.length, 0); + f = frame; +}; + +g.eval("(function () { debugger; }).call({});"); +assertEq(f.onStack, false); +assertThrowsInstanceOf(function () { f.type; }, Error); +assertThrowsInstanceOf(function () { f.this; }, Error); +assertThrowsInstanceOf(function () { f.older; }, Error); +assertThrowsInstanceOf(function () { f.callee; }, Error); +assertThrowsInstanceOf(function () { f.constructing; }, Error); +assertThrowsInstanceOf(function () { f.arguments; }, Error); diff --git a/js/src/jit-test/tests/debug/Frame-onStack-04.js b/js/src/jit-test/tests/debug/Frame-onStack-04.js new file mode 100644 index 0000000000..cc9a132091 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStack-04.js @@ -0,0 +1,31 @@ +// frame.onStack is false for frames discarded during uncatchable error unwinding. + +load(libdir + 'asserts.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +var snapshot; +dbg.onDebuggerStatement = function (frame) { + var stack = []; + for (var f = frame; f; f = f.older) { + if (f.type === "call" && f.script !== null) + stack.push(f); + } + snapshot = stack; + if (hits++ === 0) + assertEq(frame.eval("x();"), null); + else + return null; +}; + +g.eval("function z() { debugger; }"); +g.eval("function y() { z(); }"); +g.eval("function x() { y(); }"); +assertEq(g.eval("debugger; 'ok';"), "ok"); +assertEq(hits, 2); +assertEq(snapshot.length, 3); +for (var i = 0; i < snapshot.length; i++) { + assertEq(snapshot[i].onStack, false); + assertThrowsInstanceOf(() => frame.script, Error); +} diff --git a/js/src/jit-test/tests/debug/Frame-onStack-05.js b/js/src/jit-test/tests/debug/Frame-onStack-05.js new file mode 100644 index 0000000000..7e8ce8c68d --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStack-05.js @@ -0,0 +1,33 @@ +// frame.onStack is false for frames removed after their compartments stopped being debuggees. + +load(libdir + 'asserts.js'); + +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var dbg = Debugger(g1, g2); +var hits = 0; +var snapshot = []; +dbg.onDebuggerStatement = function (frame) { + if (hits++ === 0) { + assertEq(frame.eval("x();"), null); + } else { + for (var f = frame; f; f = f.older) { + if (f.type === "call" && f.script !== null) + snapshot.push(f); + } + dbg.removeDebuggee(g2); + return null; + } +}; + +g1.eval("function z() { debugger; }"); +g2.z = g1.z; +g2.eval("function y() { z(); }"); +g2.eval("function x() { y(); }"); +assertEq(g2.eval("debugger; 'ok';"), "ok"); +assertEq(hits, 2); +assertEq(snapshot.length, 3); +for (var i = 0; i < snapshot.length; i++) { + assertEq(snapshot[i].onStack, false); + assertThrowsInstanceOf(() => frame.script, Error); +} diff --git a/js/src/jit-test/tests/debug/Frame-onStack-06.js b/js/src/jit-test/tests/debug/Frame-onStack-06.js new file mode 100644 index 0000000000..8316da9b9e --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStack-06.js @@ -0,0 +1,26 @@ +// frame.onStack is false for generator frames after they return. + +let g = newGlobal({newCompartment: true}); +g.eval("function* f() { debugger; }"); + +let dbg = Debugger(g); +let savedFrame; + +dbg.onDebuggerStatement = frame => { + savedFrame = frame; + assertEq(frame.callee.name, "f"); + assertEq(frame.onStack, true); + frame.onPop = function() { + assertEq(frame.onStack, true); + }; +}; +g.f().next(); + +assertEq(savedFrame.onStack, false); +try { + savedFrame.older; + throw new Error("expected exception, none thrown"); +} catch (exc) { + assertEq(exc.message, "Debugger.Frame is not on stack or suspended"); +} + diff --git a/js/src/jit-test/tests/debug/Frame-onStack-07.js b/js/src/jit-test/tests/debug/Frame-onStack-07.js new file mode 100644 index 0000000000..055a7d41b2 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStack-07.js @@ -0,0 +1,56 @@ +// frame.onStack is false for generator frames popped due to exception or termination. + +load(libdir + "/asserts.js"); + +function test(when, what) { + let g = newGlobal({newCompartment: true}); + g.eval("function* f(x) { yield x; }"); + + let dbg = new Debugger; + let gw = dbg.addDebuggee(g); + let fw = gw.getOwnPropertyDescriptor("f").value; + + let t = 0; + let poppedFrame; + + function tick(frame) { + if (frame.callee == fw) { + if (t == when) { + poppedFrame = frame; + dbg.onEnterFrame = undefined; + frame.onPop = undefined; + return what; + } + t++; + } + return undefined; + } + + dbg.onDebuggerStatement = frame => { + dbg.onEnterFrame = frame => { + frame.onPop = function() { + return tick(this); + }; + return tick(frame); + }; + let result = frame.eval("for (let _ of f(0)) {}"); + if (result && "stack" in result) { + result.stack = true; + } + assertDeepEq(result, what); + }; + g.eval("debugger;"); + + assertEq(t, when); + assertEq(poppedFrame.onStack, false); + assertErrorMessage(() => poppedFrame.older, + Error, + "Debugger.Frame is not on stack or suspended"); +} + +for (let when = 0; when < 6; when++) { + for (let what of [null, {throw: "fit", stack: true}]) { + test(when, what); + } +} + diff --git a/js/src/jit-test/tests/debug/Frame-onStep-01.js b/js/src/jit-test/tests/debug/Frame-onStep-01.js new file mode 100644 index 0000000000..dcab3c6add --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-01.js @@ -0,0 +1,24 @@ +// Simple Debugger.Frame.prototype.onStep test. +// Test that onStep fires often enough to see all four values of a. + +var g = newGlobal({newCompartment: true}); +g.a = 0; +g.eval("function f() {\n" + + " a += 2;\n" + + " a += 2;\n" + + " a += 2;\n" + + " return a;\n" + + "}\n"); + +var dbg = Debugger(g); +var seen = [0, 0, 0, 0, 0, 0, 0]; +dbg.onEnterFrame = function (frame) { + frame.onStep = function () { + assertEq(arguments.length, 0); + assertEq(this, frame); + seen[g.a] = 1; + }; +} + +g.f(); +assertEq(seen.join(""), "1010101"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-02.js b/js/src/jit-test/tests/debug/Frame-onStep-02.js new file mode 100644 index 0000000000..ed30f041a0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-02.js @@ -0,0 +1,27 @@ +// Setting frame.onStep to undefined turns off single-stepping. + +var g = newGlobal({newCompartment: true}); +g.a = 0; +g.eval("function f() {\n" + + " a++;\n" + + " a++;\n" + + " a++;\n" + + " a++;\n" + + " return a;\n" + + "}\n"); + +var dbg = Debugger(g); +var seen = [0, 0, 0, 0, 0]; +dbg.onEnterFrame = function (frame) { + seen[g.a] = 1; + frame.onStep = function () { + seen[g.a] = 1; + if (g.a === 2) { + frame.onStep = undefined; + assertEq(frame.onStep, undefined); + } + }; +} + +g.f(); +assertEq(seen.join(","), "1,1,1,0,0"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-03.js b/js/src/jit-test/tests/debug/Frame-onStep-03.js new file mode 100644 index 0000000000..0451604abd --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-03.js @@ -0,0 +1,28 @@ +// Setting onStep does not affect later calls to the same function. +// (onStep is per-frame, not per-function.) + +var g = newGlobal({newCompartment: true}); +g.a = 1; +g.eval("function f(a) {\n" + + " var x = 2 * a;\n" + + " return x * x;\n" + + "}\n"); + +var dbg = Debugger(g); +var log = ''; +dbg.onEnterFrame = function (frame) { + log += '+'; + frame.onStep = function () { + if (log.charAt(log.length - 1) != 's') + log += 's'; + }; +}; + +g.f(1); +log += '|'; +g.f(2); +log += '|'; +dbg.onEnterFrame = undefined; +g.f(3); + +assertEq(log, '+s|+s|'); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-04.js b/js/src/jit-test/tests/debug/Frame-onStep-04.js new file mode 100644 index 0000000000..fb2d6f49e4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-04.js @@ -0,0 +1,34 @@ +// When a recursive function has many frames on the stack, onStep may be set or +// not independently on each frame. + +var g = newGlobal({newCompartment: true}); +g.eval("function f(x) {\n" + + " if (x > 0)\n" + + " f(x - 1);\n" + + " else\n" + + " debugger;\n" + + " return x;\n" + + "}"); + +var dbg = Debugger(g); +var seen = [0, 0, 0, 0, 0, 0, 0, 0]; +function step() { + seen[this.arguments[0]] = 1; +} +dbg.onEnterFrame = function (frame) { + // Turn on stepping for even-numbered frames. + var x = frame.arguments[0]; + if (x % 2 === 0) + frame.onStep = step; +}; +dbg.onDebuggerStatement = function (frame) { + // This is called with 8 call frames on the stack, 7 down to 0. + // At this point we should have seen all the even-numbered frames. + assertEq(seen.join(""), "10101010"); + + // Now reset seen to see which frames fire onStep on the way out. + seen = [0, 0, 0, 0, 0, 0, 0, 0]; +}; + +g.f(7); +assertEq(seen.join(""), "10101010"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-05.js b/js/src/jit-test/tests/debug/Frame-onStep-05.js new file mode 100644 index 0000000000..c5e5b146f1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-05.js @@ -0,0 +1,14 @@ +// Upon returning to a frame with an onStep hook, the hook is called before the +// next line. + +var g = newGlobal({newCompartment: true}); +g.log = ''; +g.eval("function f() { debugger; }"); + +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + frame.older.onStep = function () { g.log += 's'; }; +}; +g.eval("f();\n" + + "log += 'x';\n"); +assertEq(g.log.charAt(0), 's'); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-06.js b/js/src/jit-test/tests/debug/Frame-onStep-06.js new file mode 100644 index 0000000000..ba5d7ea773 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-06.js @@ -0,0 +1,58 @@ +// After returning from an implicit toString call, the calling frame's onStep +// hook fires. + +var g = newGlobal({newCompartment: true}); +g.eval("var originalX = {toString: function () { debugger; log += 'x'; return 1; }};\n"); + +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + g.log += 'd'; + frame.older.onStep = function () { + if (!g.log.match(/[sy]$/)) + g.log += 's'; + }; +}; + +// expr is an expression that will trigger an implicit toString call. +function check(expr) { + g.log = ''; + g.x = g.originalX; + g.eval(expr + ";\n" + + "log += 'y';\n"); + assertEq(g.log, 'dxsy'); +} + +check("'' + x"); +check("0 + x"); +check("0 - x"); +check("0 * x"); +check("0 / x"); +check("0 % x"); +check("+x"); +check("x in {}"); +check("x++"); +check("++x"); +check("x--"); +check("--x"); +check("x < 0"); +check("x > 0"); +check("x >= 0"); +check("x <= 0"); +check("x == 0"); +check("x != 0"); +check("x & 1"); +check("x | 1"); +check("x ^ 1"); +check("~x"); +check("x << 1"); +check("x >> 1"); +check("x >>> 1"); + +g.eval("var getter = { get x() { debugger; return log += 'x'; } }"); +check("getter.x"); + +g.eval("var setter = { set x(v) { debugger; return log += 'x'; } }"); +check("setter.x = 1"); + +g.eval("Object.defineProperty(this, 'thisgetter', { get: function() { debugger; log += 'x'; }});"); +check("thisgetter"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-07.js b/js/src/jit-test/tests/debug/Frame-onStep-07.js new file mode 100644 index 0000000000..de8ce4e7c0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-07.js @@ -0,0 +1,23 @@ +// The tracejit does not interfere with frame.onStep. +// +// The function f() writes 'L' to the log in a loop. If we enable stepping and +// write an 's' each time frame.onStep is called, any two Ls should have at +// least one 's' between them. + +var g = newGlobal({newCompartment: true}); +g.N = 11; +g.log = ''; +g.eval("function f() {\n" + + " for (var i = 0; i <= N; i++)\n" + + " log += 'L';\n" + + "}\n"); +g.f(); +assertEq(/LL/.exec(g.log) !== null, true); + +var dbg = Debugger(g); +dbg.onEnterFrame = function (frame) { + frame.onStep = function () { g.log += 's'; }; +}; +g.log = ''; +g.f(); +assertEq(/LL/.exec(g.log), null); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-08.js b/js/src/jit-test/tests/debug/Frame-onStep-08.js new file mode 100644 index 0000000000..857c94a50e --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-08.js @@ -0,0 +1,29 @@ +// frame.onStep can coexist with breakpoints. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var log = ''; +dbg.onEnterFrame = function (frame) { + var handler = {hit: function () { log += 'B'; }}; + var lines = frame.script.getAllOffsets(); + for (var line in lines) { + line = Number(line); + var offs = lines[line]; + for (var i = 0; i < offs.length; i++) + frame.script.setBreakpoint(offs[i], handler); + } + + frame.onStep = function () { log += 's'; }; +}; + +g.eval("one = 1;\n" + + "two = 2;\n" + + "three = 3;\n" + + "four = 4;\n"); +assertEq(g.four, 4); + +// Breakpoints hit on all four lines, plus the final line. +assertEq(log.replace(/[^B]/g, ''), 'BBBBB'); + +// onStep was called between each pair of breakpoints. +assertEq(/BB/.exec(log), null); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-09.js b/js/src/jit-test/tests/debug/Frame-onStep-09.js new file mode 100644 index 0000000000..1204ac21a9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-09.js @@ -0,0 +1,24 @@ +// After an implicit toString call throws an exception, the calling frame's +// onStep hook fires. + +var g = newGlobal({newCompartment: true}); +g.eval("var x = {toString: function () { debugger; log += 'x'; throw 'mud'; }};"); + +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + g.log += 'd'; + frame.older.onStep = function () { + if (!g.log.match(/[sy]$/)) + g.log += 's'; + }; +}; + +g.log = ''; +g.eval("try { x + ''; } catch (x) { }\n" + + "log += 'y';\n"); +assertEq(g.log, "dxsy"); + +g.log = ''; +g.eval("try { '' + x; } catch (x) { }\n" + + "log += 'y';\n"); +assertEq(g.log, "dxsy"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-10.js b/js/src/jit-test/tests/debug/Frame-onStep-10.js new file mode 100644 index 0000000000..758f64f1a3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-10.js @@ -0,0 +1,28 @@ +// Throwing and catching an error in an onStep handler shouldn't interfere +// with throwing and catching in the debuggee. + +var g = newGlobal({newCompartment: true}); +g.eval("function f() { debugger; throw 'mud'; }"); + +var dbg = Debugger(g); +var stepped = false; +dbg.onDebuggerStatement = function (frame) { + frame.older.onStep = function () { + stepped = true; + try { + throw 'snow'; + } catch (x) { + assertEq(x, 'snow'); + } + }; +}; + +stepped = false; +g.eval("var caught;\n" + + "try {\n" + + " f();\n" + + "} catch (x) {\n" + + " caught = x;\n" + + "}\n"); +assertEq(stepped, true); +assertEq(g.caught, 'mud'); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-11.js b/js/src/jit-test/tests/debug/Frame-onStep-11.js new file mode 100644 index 0000000000..15dd847379 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-11.js @@ -0,0 +1,36 @@ +// Stepping out of a finally should not appear to +// step backward to some earlier statement. + +var g = newGlobal({newCompartment: true}); +g.eval(`function f() { + debugger; // +0 + var x = 0; // +1 + try { // +2 + x = 1; // +3 + throw 'something'; // +4 + } catch (e) { // +5 + x = 2; // +6 + } finally { // +7 + x = 3; // +8 + } // +9 + x = 4; // +10 + }`); // +11 + +var dbg = Debugger(g); + +let foundLines = ''; + +dbg.onDebuggerStatement = function(frame) { + let debugLine = frame.script.getOffsetLocation(frame.offset).lineNumber; + frame.onStep = function() { + // Only record a stop when the offset is an entry point. + let foundLine = this.script.getOffsetLocation(this.offset).lineNumber; + if (foundLine != debugLine && this.script.getLineOffsets(foundLine).indexOf(this.offset) >= 0) { + foundLines += "," + (foundLine - debugLine); + } + }; +}; + +g.f(); + +assertEq(foundLines, ",1,2,3,4,5,6,7,8,10,11"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-12.js b/js/src/jit-test/tests/debug/Frame-onStep-12.js new file mode 100644 index 0000000000..c751c278a5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-12.js @@ -0,0 +1,118 @@ +// Check that stepping doesn't make it look like unreachable code is running. + +// Because our script source notes record only those bytecode offsets +// at which source positions change, the default behavior in the +// absence of a source note is to attribute a bytecode instruction to +// the same source location as the preceding instruction. When control +// flows from the preceding bytecode to the one we're emitting, that's +// usually plausible. But successors in the bytecode stream are not +// necessarily successors in the control flow graph. If the preceding +// bytecode was a back edge of a loop, or the jump at the end of a +// 'then' clause, its source position can be completely unrelated to +// that of its successor. +// +// We try to avoid showing such nonsense offsets to the user by +// requiring breakpoints and single-stepping to stop only at a line's +// entry points, as reported by Debugger.Script.prototype.getLineOffsets; +// and then ensuring that those entry points are all offsets mentioned +// explicitly in the source notes, and hence deliberately attributed +// to the given bytecode. +// +// This bit of JavaScript compiles to bytecode ending in a branch +// instruction whose source position is the body of an unreachable +// loop. The first instruction of the bytecode we emit following it +// will inherit this nonsense position, if we have not explicitly +// emitted a source note for said instruction. +// +// This test steps across such code and verifies that control never +// appears to enter the unreachable loop. + +var bitOfCode = `debugger; // +0 + if(false) { // +1 + for(var b=0; b<0; b++) { // +2 + c = 2 // +3 + } // +4 + }`; // +5 + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); + +g.eval("function nothing() { }\n"); + +var log = ''; +dbg.onDebuggerStatement = function(frame) { + let debugLine = frame.script.getOffsetLocation(frame.offset).lineNumber; + frame.onStep = function() { + let foundLine = this.script.getOffsetLocation(this.offset).lineNumber; + if (this.script.getLineOffsets(foundLine).indexOf(this.offset) >= 0) { + log += (foundLine - debugLine).toString(16); + } + }; +}; + +function testOne(name, body, expected) { + print(name); + log = ''; + g.eval(`function ${name} () { ${body} }`); + g.eval(`${name}();`); + assertEq(log, expected); +} + + + +// Test the instructions at the end of a "try". +testOne("testTryFinally", + `try { + ${bitOfCode} + } finally { // +6 + } // +7 + nothing(); // +8 + `, "1689"); + +// The same but without a finally clause. +testOne("testTryCatch", + `try { + ${bitOfCode} + } catch (e) { // +6 + } // +7 + nothing(); // +8 + `, "189"); + +// Test the instructions at the end of a "catch". +testOne("testCatchFinally", + `try { + throw new TypeError(); + } catch (e) { + ${bitOfCode} + } finally { // +6 + } // +7 + nothing(); // +8 + `, "1689"); + +// Test the instruction at the end of a "finally" clause. +testOne("testFinally", + `try { + } finally { + ${bitOfCode} + } // +6 + nothing(); // +7 + `, "178"); + +// Test the instruction at the end of a "then" clause. +testOne("testThen", + `if (1 === 1) { + ${bitOfCode} + } else { // +6 + } // +7 + nothing(); // +8 + `, "189"); + +// Test the instructions leaving a switch block. +testOne("testSwitch", + `var x = 5; + switch (x) { + case 5: + ${bitOfCode} + } // +6 + nothing(); // +7 + `, "178"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-13.js b/js/src/jit-test/tests/debug/Frame-onStep-13.js new file mode 100644 index 0000000000..b2d4a3c1b1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-13.js @@ -0,0 +1,29 @@ +// Stepping over a not-taken "if" that is at the end of the function +// should move to the end of the function, not somewhere in the body +// of the "if". + +var g = newGlobal({newCompartment: true}); +g.eval(`function f() { // 1 + var a,c; // 2 + debugger; // 3 + if(false) { // 4 + for(var b=0; b<0; b++) { // 5 + c = 2; // 6 + } // 7 + } // 8 +} // 9 +`); + +var dbg = Debugger(g); +var badStep = false; + +dbg.onDebuggerStatement = function(frame) { + let debugLine = frame.script.getOffsetLocation(frame.offset).lineNumber; + assertEq(debugLine, 3); + frame.onStep = function() { + let foundLine = this.script.getOffsetLocation(this.offset).lineNumber; + assertEq(foundLine <= 4 || foundLine >= 8, true); + }; +}; + +g.eval("f();\n"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-14.js b/js/src/jit-test/tests/debug/Frame-onStep-14.js new file mode 100644 index 0000000000..a7139adb09 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-14.js @@ -0,0 +1,46 @@ +// Test how stepping interacts with switch statements. + +var g = newGlobal({newCompartment: true}); + +g.eval('function bob() { return "bob"; }'); + +// Stepping into a sparse switch should not stop on literal cases. +evaluate(`function lit(x) { // 1 + debugger; // 2 + switch(x) { // 3 + case "nope": // 4 + break; // 5 + case "bob": // 6 + break; // 7 + } // 8 +}`, {lineNumber: 1, global: g}); + +// Stepping into a sparse switch should stop on non-literal cases. +evaluate(`function nonlit(x) { // 1 + debugger; // 2 + switch(x) { // 3 + case bob(): // 4 + break; // 5 + } // 6 +}`, {lineNumber: 1, global: g}); + +var dbg = Debugger(g); +var badStep = false; + +function test(s, okLine) { + dbg.onDebuggerStatement = function(frame) { + frame.onStep = function() { + let thisLine = this.script.getOffsetLocation(this.offset).lineNumber; + // The stop at line 3 is the switch. + if (thisLine > 3) { + assertEq(thisLine, okLine) + frame.onStep = undefined; + } + }; + }; + g.eval(s); +} + +test("lit('bob');", 7); + +test("nonlit('bob');", 4); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-15.js b/js/src/jit-test/tests/debug/Frame-onStep-15.js new file mode 100644 index 0000000000..819b0e4b6c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-15.js @@ -0,0 +1,43 @@ +// Test how stepping interacts with for(;;) statements. + +let g = newGlobal({newCompartment: true}); + +// We want a for(;;) loop whose body is evaluated at least once, to +// see whether the loop head is hit a second time. +g.eval(`function f() { + let x = 0; + debugger; // +0 + for(;;) { // +1 + if (x++ == 1) break; // +2 + } // +3 + debugger; // +4 +}`); + +let dbg = Debugger(g); + +function test(s, expected) { + let result = ''; + + dbg.onDebuggerStatement = function(frame) { + // On the second debugger statement, we're done. + dbg.onDebuggerStatement = function(frame) { + frame.onStep = undefined; + }; + + let debugLine = frame.script.getOffsetLocation(frame.offset).lineNumber; + frame.onStep = function() { + // Only examine stops at entry points for the line. + let lineNo = this.script.getOffsetLocation(this.offset).lineNumber; + if (this.script.getLineOffsets(lineNo).indexOf(this.offset) < 0) { + return undefined; + } + + let delta = this.script.getOffsetLocation(this.offset).lineNumber - debugLine; + result += delta; + }; + }; + g.eval(s); + assertEq(result, expected); +} + +test('f()', '2124'); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-16.js b/js/src/jit-test/tests/debug/Frame-onStep-16.js new file mode 100644 index 0000000000..33e31fe0ff --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-16.js @@ -0,0 +1,34 @@ +// Stepping through a function with a return statement should pause on +// the closing brace of the function. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var log; + +function test(fnStr) { + log = ''; + g.eval(fnStr); + + dbg.onDebuggerStatement = function(frame) { + frame.onStep = function() { + let {lineNumber, isEntryPoint} = frame.script.getOffsetLocation(frame.offset); + if (isEntryPoint) { + log += lineNumber + ' '; + } + }; + }; + + g.eval("f(23);"); +} + +test("function f(x) {\n" + // 1 + " debugger;\n" + // 2 + " return 23 + x;\n" + // 3 + "}\n"); // 4 +assertEq(log, '3 3 4 '); + +test("function f(x) {\n" + // 1 + " debugger;\n" + // 2 + " return;\n" + // 3 + "}\n"); // 4 +assertEq(log, '3 4 '); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-17.js b/js/src/jit-test/tests/debug/Frame-onStep-17.js new file mode 100644 index 0000000000..a73bd2187c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-17.js @@ -0,0 +1,35 @@ +// Test how stepping interacts with for-in/of statements. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var log; +var previous; + +dbg.onDebuggerStatement = function (frame) { + let debugLine = frame.script.getOffsetLocation(frame.offset).lineNumber; + log = ''; + previous = ''; + frame.onStep = function() { + let foundLine = this.script.getOffsetLocation(this.offset).lineNumber; + if (this.script.getLineOffsets(foundLine).indexOf(this.offset) >= 0) { + let thisline = (foundLine - debugLine).toString(16); + if (thisline !== previous) { + log += thisline; + previous = thisline; + } + } + }; +}; + +function testOne(decl, loopKind) { + let body = "var array = [2, 4, 6];\ndebugger;\nfor (" + decl + " iter " + + loopKind + " array) {\n print(iter);\n}\n"; + g.eval(body); + assertEq(log, "12121214"); +} + +for (let decl of ["", "var", "let"]) { + testOne(decl, "in"); + testOne(decl, "of"); +} diff --git a/js/src/jit-test/tests/debug/Frame-onStep-18.js b/js/src/jit-test/tests/debug/Frame-onStep-18.js new file mode 100644 index 0000000000..0484a45cf7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-18.js @@ -0,0 +1,22 @@ +// Regression test for bug 1370648. + +let g = newGlobal({newCompartment: true}); + +let dbg = Debugger(g); +let lines = [0, 0, 0, 0, 0]; +dbg.onDebuggerStatement = function (frame) { + let dLine = frame.script.getOffsetLocation(frame.offset).lineNumber; + lines[0] = 1; + frame.onStep = function () { + lines[frame.script.getOffsetLocation(this.offset).lineNumber - dLine] = 1; + }; +} + +let s = ` + debugger; // 0 + if (1 !== 1) { // 1 + print("dead code!?"); // 2 + } // 3 +`; +g.eval(s); +assertEq(lines.join(""), "11001"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-19.js b/js/src/jit-test/tests/debug/Frame-onStep-19.js new file mode 100644 index 0000000000..019c026a8e --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-19.js @@ -0,0 +1,41 @@ +// Stepping should ignore nested function declarations. + +// Nested functions are hoisted to the top of the function body, +// so technically the first thing that happens when you call the outer function +// is that each inner function is created and bound to a local variable. +// But users don't actually want to see that happen when they're stepping. +// It's super confusing. + +load(libdir + "stepping.js"); + +testStepping( + `\ + (function() { // line 1 + let x = 1; // line 2 + funcb("funcb"); // line 3 + function funcb(msg) { // line 4 + console.log(msg) + } + }) // line 7 + `, + [1, 2, 3, 7]); + +// Stopping at the ClassDeclaration on line 8 is fine. For that matter, +// stopping on line 5 wouldn't be so bad if we did it after line 3 and before +// line 8; alas, the actual order of execution is 5, 2, 3, 8... which is too +// confusing. +testStepping( + `\ + function f() { // 1 + var x = 0; // 2 + a(); // 3 + + function a() { // 5 + x += 1; // 6 + } // 7 + class Car {} // 8 + return x; // 9 + } // 10 + f + `, + [1, 2, 3, 8, 9, 10]); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-20.js b/js/src/jit-test/tests/debug/Frame-onStep-20.js new file mode 100644 index 0000000000..e070037c36 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-20.js @@ -0,0 +1,41 @@ +// Stepping should always pause in a frame between two function calls. + +let g = newGlobal({newCompartment: true}); +g.evaluate(` + class X { + constructor() { this._p = 0; } + m() { return this; } + get p() { return this._p; } + set p(value) { this._p = value; } + } + let x = new X; + + function f() { return 1; } + function inc(x) { return x + 1; } +`); + +let dbg = Debugger(g); + +// `code` is a snippet of JS that performs two JS calls. +function test(code) { + let hits = 0; + let log = ""; + dbg.onEnterFrame = frame => { + if (hits++ === 0) + frame.onStep = () => { log += "s"; }; + else + log += "E"; + }; + + g.eval(code); + assertEq(log.includes("EE"), false, "should have received onStep between onEnterFrame events"); + assertEq(log.match(/^s+Es+Es*$/) !== null, true, + "should get two calls, with steps before, between, and possibly after"); +} + +test("f(); f();"); +test("f() + f()"); +test("inc(f())"); +test("x.m().m()"); +test("new X().m()"); +test("x.p = x.p"); // getter, then setter diff --git a/js/src/jit-test/tests/debug/Frame-onStep-assign-function.js b/js/src/jit-test/tests/debug/Frame-onStep-assign-function.js new file mode 100644 index 0000000000..5125359292 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-assign-function.js @@ -0,0 +1,49 @@ +// Changing onStep while the function is dead is allowed. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +let steps = new Set(); +dbg.onDebuggerStatement = function(frame) { + // Setting 'onStep' while alive is allowed. + steps.add("debugger 1"); + assertEq(frame.onStack, true); + frame.onStep = function() { + steps.add("onstep 1"); + }; + + dbg.onDebuggerStatement = function() { + // Clear the 'onStep' while dead. + steps.add("debugger 2"); + assertEq(frame.onStack, false); + + // Clearing 'onStep' while dead is allowed. + frame.onStep = undefined; + + // Setting 'onStep' while dead is allowed. + frame.onStep = function() { + steps.add("onstep 2"); + }; + }; +}; + +g.eval( + ` + function myGen() { + debugger; + print("make sure we have a place to step to inside the frame"); + } + + const g = myGen(); + + debugger; + ` +); + +assertDeepEq(Array.from(steps), [ + "debugger 1", + "onstep 1", + "debugger 2", +]); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-assign-generator.js b/js/src/jit-test/tests/debug/Frame-onStep-assign-generator.js new file mode 100644 index 0000000000..2a733f3a83 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-assign-generator.js @@ -0,0 +1,68 @@ +// Changing onStep while the generator is suspended/dead is allowed. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +let steps = new Set(); +dbg.onDebuggerStatement = function(frame) { + // Setting 'onStep' while alive is allowed. + steps.add("debugger 1"); + assertEq(frame.onStack, true); + frame.onStep = function() { + steps.add("onstep 1"); + }; + + dbg.onDebuggerStatement = function() { + // Clear the 'onStep' while suspended. + steps.add("debugger 2"); + assertEq(frame.onStack, false); + + // Clearing 'onStep' while suspended is allowed. + frame.onStep = undefined; + + // Setting 'onStep' while suspended is allowed. + frame.onStep = function() { + steps.add("onstep 2"); + }; + + dbg.onDebuggerStatement = function() { + steps.add("debugger 3"); + assertEq(frame.onStack, false); + + // Clearing 'onStep' while dead is allowed. + frame.onStep = undefined; + + // Setting 'onStep' while dead is allowed. + frame.onStep = function() { + steps.add("onstep 3"); + }; + }; + }; +}; + +g.eval( + ` + function* myGen() { + debugger; + yield; + } + + const g = myGen(); + g.next(); + + debugger; + g.next(); + + debugger; + ` +); + +assertDeepEq(Array.from(steps), [ + "debugger 1", + "onstep 1", + "debugger 2", + "onstep 2", + "debugger 3", +]); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-async-01.js b/js/src/jit-test/tests/debug/Frame-onStep-async-01.js new file mode 100644 index 0000000000..48ccd366fa --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-async-01.js @@ -0,0 +1,35 @@ +// Stepping works across `await` in async functions. + +// Set up debuggee. +var g = newGlobal({newCompartment: true}); +g.log = ""; +g.eval(` // line 1 +async function aloop() { // 2 + for (let i = 0; i < 3; i++) { // 3 + await i; // 4 + log += " "; // 5 + } // 6 + log += "^"; // 7 +} // 8 +`); + +// Set up debugger. +let previousLine = -1; +let dbg = new Debugger(g); +dbg.onEnterFrame = frame => { + frame.onStep = function () { + assertEq(this, frame); + let line = frame.script.getOffsetLocation(frame.offset).lineNumber; + if (previousLine != line) { + g.log += line; // We stepped to a new line. + previousLine = line; + } + }; + dbg.onEnterFrame = undefined; +}; + +// Run. +g.aloop(); +drainJobQueue(); + +assertEq(g.log, "2345 345 345 37^8"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-async-02.js b/js/src/jit-test/tests/debug/Frame-onStep-async-02.js new file mode 100644 index 0000000000..33dcdf9ba0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-async-02.js @@ -0,0 +1,87 @@ +// With enough hackery, stepping in and out of async functions can be made to +// work as users expect. +// +// This test exercises the common case when we have syntactically `await +// $ASYNC_FN($ARGS)` so that the calls nest as if they were synchronous +// calls. It works, but there's a problem. +// +// onStep fires in extra places that end users would find very confusing--see +// the comment marked (!) below. As a result, Debugger API consumers must do +// some extra work to skip pausing there. This test is a proof of concept that +// shows what sort of effort is needed. It maintains a single `asyncStack` and +// skips the onStep hook if we're not running the function at top of the async +// stack. Real debuggers would have to maintain multiple async stacks. + +// Set up debuggee. +var g = newGlobal({newCompartment: true}); +g.eval(`\ +async function outer() { // line 1 + return (await inner()) + (await inner()) + "!"; // 2 +} // 3 +async function inner() { // 4 + return (await leaf()) + (await leaf()); // 5 +} // 6 +async function leaf() { // 7 + return (await Promise.resolve("m")); // 8 +} // 9 +`); + +// Set up debugger. +let previousLine = -1; +let dbg = new Debugger(g); +let log = ""; +let asyncStack = []; + +dbg.onEnterFrame = frame => { + assertEq(frame.type, "call"); + + // If we're entering this frame for the first time, push it to the async + // stack. + if (!frame.seen) { + frame.seen = true; + asyncStack.push(frame); + log += "("; + } + + frame.onStep = () => { + // When stepping, we sometimes pause at opcodes in older frames (!) + // where all that's happening is async function administrivia. + // + // For example, the first time `leaf()` yields, `inner()` and + // `outer()` are still on the stack; they haven't awaited yet because + // control has not returned from `leaf()` to them yet. So stepping will + // hop from line 8 to line 5 to line 2 as we unwind the stack, then + // resume on line 8. + // + // Anyway: skip that noise. + if (frame !== asyncStack[asyncStack.length - 1]) + return; + + let line = frame.script.getOffsetLocation(frame.offset).lineNumber; + if (previousLine != line) { + log += line; // We stepped to a new line. + previousLine = line; + } + }; + + frame.onPop = completion => { + // Popping the frame. But async function frames are popped multiple + // times: for the "initial suspend", at each await, and on return. The + // debugger offers no easy way to distinguish them (bug 1470558). + // For now there's an "await" property, but bug 1470558 may come up + // with a different solution, so don't rely on it! + if (!completion.await) { + // Returning (not awaiting or at initial suspend). + assertEq(asyncStack.pop(), frame); + log += ")"; + } + }; +}; + +// Run. +let result; +g.outer().then(v => { result = v; }); +drainJobQueue(); + +assertEq(result, "mmmm!"); +assertEq(log, "(12(45(789)5(789)56)2(45(789)5(789)56)23)"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-async-03.js b/js/src/jit-test/tests/debug/Frame-onStep-async-03.js new file mode 100644 index 0000000000..ecbd0ddf2c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-async-03.js @@ -0,0 +1,18 @@ +// Bug 1501666: assertions about the script's step mode count must take +// suspended calls into account. This should not crash. + +var g = newGlobal({ newCompartment: true }); +g.eval(` + async function f(y) { + await true; + await true; + }; +`); + +g.f(); +g.f(); + +var dbg = Debugger(g); +dbg.onEnterFrame = function(frame) { + frame.onStep = function() {} +} diff --git a/js/src/jit-test/tests/debug/Frame-onStep-async-gc-01.js b/js/src/jit-test/tests/debug/Frame-onStep-async-gc-01.js new file mode 100644 index 0000000000..6ff59d6ce8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-async-gc-01.js @@ -0,0 +1,28 @@ +// An onStep handler on a suspended async function frame keeps a Debugger alive. + +let g = newGlobal({newCompartment: true}); +g.eval(` + async function f() { + debugger; + await Promise.resolve(0); + return 'ok'; + } +`); + +let dbg = Debugger(g); +let hit = false; +dbg.onDebuggerStatement = frame => { + frame.onPop = completion => { + frame.onStep = () => { hit = true; }; + frame.onPop = undefined; + }; + dbg.onDebuggerStatement = undefined; + dbg = null; +}; + +g.f(); +assertEq(dbg, null); +gc(); +assertEq(hit, false); +drainJobQueue(); +assertEq(hit, true); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-generator-resumption-01.js b/js/src/jit-test/tests/debug/Frame-onStep-generator-resumption-01.js new file mode 100644 index 0000000000..ad61ccd9e4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-generator-resumption-01.js @@ -0,0 +1,42 @@ +// The debugger can't force return from a generator before the initial yield. + +let g = newGlobal({newCompartment: true}); +g.eval(` + function* f() { + yield 1; + } +`); + +let dbg = new Debugger(g); +let steps = 0; +let uncaughtErrorsReported = 0; +dbg.onEnterFrame = frame => { + assertEq(frame.callee.name, "f"); + dbg.onEnterFrame = undefined; + frame.onStep = () => { + steps++; + + // This test case never resumes the generator after the initial + // yield. Therefore the initial yield has not happened yet. So this + // force-return will be an error. + return {return: "ponies"}; + }; + + // Having an onPop hook exercises some assertions that don't happen + // otherwise. + frame.onPop = completion => {}; +}; + +dbg.uncaughtExceptionHook = (reason) => { + // When onEnterFrame returns an invalid resumption value, + // the error is reported here. + assertEq(reason instanceof TypeError, true); + uncaughtErrorsReported++; + return undefined; // Cancel the force-return. Let the debuggee continue. +}; + +let result = g.f(); +assertEq(result instanceof g.f, true); + +assertEq(steps > 0, true); +assertEq(uncaughtErrorsReported, steps); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-generator-resumption-02.js b/js/src/jit-test/tests/debug/Frame-onStep-generator-resumption-02.js new file mode 100644 index 0000000000..25f9186c77 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-generator-resumption-02.js @@ -0,0 +1,78 @@ +// Like Frame-onStep-generator-resumption-01.js, but bail out by throwing. + +let g = newGlobal({newCompartment: true}); +g.eval(` + function* f() { + yield 1; + } +`); + +// Try force-returning from one of the instructions in `f` before the initial +// yield. In detail: +// +// * This test calls `g.f()` under the Debugger. +// * It uses the Debugger to step `ttl` times. +// If we reach the initial yield before stepping the `ttl`th time, we're done. +// * Otherwise, the test tries to force-return from `f`. +// * That's an error, so the uncaughtExceptionHook is called. +// * The uncaughtExceptionHook returns a `throw` completion value. +// +// Returns `true` if we reached the initial yield, false otherwise. +// +// Note that this function is called in a loop so that every possible relevant +// value of `ttl` is tried once. +function test(ttl) { + let dbg = new Debugger(g); + let exiting = false; // we ran out of time-to-live and have forced return + let done = false; // we reached the initial yield without forced return + let reported = false; // a TypeError was reported. + + dbg.onEnterFrame = frame => { + assertEq(frame.callee.name, "f"); + dbg.onEnterFrame = undefined; + frame.onStep = () => { + if (ttl == 0) { + exiting = true; + // This test case never resumes the generator after the initial + // yield. Therefore the initial yield has not happened yet. So this + // force-return will be an error. + return {return: "ponies"}; + } + ttl--; + }; + frame.onPop = completion => { + if (!exiting) + done = true; + }; + }; + + dbg.uncaughtExceptionHook = (exc) => { + // When onStep returns an invalid resumption value, + // the error is reported here. + assertEq(exc instanceof TypeError, true); + reported = true; + return {throw: "FAIL"}; // Bail out of the test. + }; + + let result; + let caught = undefined; + try { + result = g.f(); + } catch (exc) { + caught = exc; + } + + if (done) { + assertEq(reported, false); + assertEq(result instanceof g.f, true); + assertEq(caught, undefined); + } else { + assertEq(reported, true); + assertEq(caught, "FAIL"); + } + + dbg.enabled = false; + return done; +} + +for (let ttl = 0; !test(ttl); ttl++) {} diff --git a/js/src/jit-test/tests/debug/Frame-onStep-generator-resumption-03.js b/js/src/jit-test/tests/debug/Frame-onStep-generator-resumption-03.js new file mode 100644 index 0000000000..3b2e8d2b3a --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-generator-resumption-03.js @@ -0,0 +1,49 @@ +// Don't crash on {return:} from onStep in a generator, before the initial suspend. + +// This test tries to force-return from each bytecode instruction in a +// generator, up to the initial suspend. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.values = [1, 2, 3]; +g.eval(`function* f(arr=values) { yield* arr; }`); + +let dbg = Debugger(g); + +function test(ttl) { + let hits = 0; + dbg.onEnterFrame = frame => { + assertEq(frame.callee.name, "f"); + frame.onStep = () => { + if (--ttl === 0) + return {return: 123}; + }; + }; + dbg.uncaughtExceptionHook = exc => { + return {throw: "debugger error: " + exc}; + }; + + let val = undefined; + let caught = undefined; + try { + val = g.f(); + } catch (exc) { + caught = exc; + } + + if (val === undefined) { + // Tried to force-return before the initial suspend. + assertEq(caught, "debugger error: TypeError: can't force return from a generator before the initial yield"); + assertEq(ttl, 0); + return "pass"; + } else { + // Reached the initial suspend without forcing a return. + assertEq(typeof val, "object"); + assertEq(val instanceof g.f, true); + assertEq(ttl, 1); + return "done"; + } +} + +for (let i = 1; test(i) === "pass"; i++) {} diff --git a/js/src/jit-test/tests/debug/Frame-onStep-generators-01.js b/js/src/jit-test/tests/debug/Frame-onStep-generators-01.js new file mode 100644 index 0000000000..935a37a2df --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-generators-01.js @@ -0,0 +1,31 @@ +// Stepping into the `.next()` method of a generator works as expected. + +let g = newGlobal({newCompartment: true}); +g.eval(`\ +function* nums() { // line 1 + yield 1; // 2 + yield 2; // 3 +} // 4 +function f() { // 5 + let gen = nums(); // 6 + gen.next(); // 7 + gen.next(); // 8 + gen.next(); // 9 +} // 10 +`); + +let log = []; +let previousLine = -1; +let dbg = new Debugger(g); +dbg.onEnterFrame = frame => { + frame.onStep = () => { + let line = frame.script.getOffsetLocation(frame.offset).lineNumber; + if (previousLine != line) { // We stepped to a new line. + log.push(line); + previousLine = line; + } + }; +}; + +g.f(); +assertEq(log.join(" "), "5 6 1 6 7 1 2 7 8 2 3 8 9 3 4 9 10"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-generators-02.js b/js/src/jit-test/tests/debug/Frame-onStep-generators-02.js new file mode 100644 index 0000000000..3e1fa6a433 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-generators-02.js @@ -0,0 +1,44 @@ +// Stepping into the `.throw()` method of a generator with no relevant catch block. +// +// The debugger fires onEnterFrame and then frame.onPop for the generator frame when +// `gen.throw()` is called. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval(`\ +function* z() { // line 1 + yield 1; // 2 + yield 2; // 3 +} // 4 +function f() { // 5 + let gen = z(); // 6 + gen.next(); // 7 + gen.throw("fit"); // 8 +} // 9 +`); + +let log = ""; +let previousLine = -1; +let dbg = new Debugger(g); +dbg.onEnterFrame = frame => { + log += frame.callee.name + "{"; + frame.onStep = () => { + let line = frame.script.getOffsetLocation(frame.offset).lineNumber; + if (previousLine != line) { // We stepped to a new line. + log += line; + previousLine = line; + } + }; + frame.onPop = completion => { + if ("throw" in completion) + log += "!"; + log += "}"; + } +}; + +assertThrowsValue(() => g.f(), "fit"); +// z{1} is the initial generator setup. +// z{12} is the first .next() call, running to `yield 1` on line 2 +// The final `z{2!}` is for the .throw() call. +assertEq(log, "f{56z{1}67z{12}78z{2!}!}"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-generators-03.js b/js/src/jit-test/tests/debug/Frame-onStep-generators-03.js new file mode 100644 index 0000000000..b9f6f5e5fd --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-generators-03.js @@ -0,0 +1,45 @@ +// Stepping into the `.throw()` method of a generator with a relevant catch block. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval(`\ +function* z() { // line 1 + try { // 2 + yield 1; // 3 + } catch (exc) { // 4 + yield 2; // 5 + } // 6 +} // 7 +function f() { // 8 + let gen = z(); // 9 + gen.next(); // 10 + gen.throw("fit"); // 11 +} // 12 +`); + +let log = []; +let previousLine = -1; +let dbg = new Debugger(g); +dbg.onEnterFrame = frame => { + log.push(frame.callee.name + " in"); + frame.onStep = () => { + let line = frame.script.getOffsetLocation(frame.offset).lineNumber; + if (previousLine != line) { // We stepped to a new line. + log.push(line); + previousLine = line; + } + }; + frame.onPop = completion => { + log.push(frame.callee.name + " out"); + }; +}; + +g.f(); +assertEq( + log.join(", "), + "f in, 8, 9, z in, 1, z out, " + + "9, 10, z in, 1, 2, 3, z out, " + + "10, 11, z in, 3, 2, 4, 5, z out, " + // not sure why we hit line 2 here, source notes bug maybe + "11, 12, f out" +); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-generators-04.js b/js/src/jit-test/tests/debug/Frame-onStep-generators-04.js new file mode 100644 index 0000000000..6ce6548409 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-generators-04.js @@ -0,0 +1,36 @@ +// Stepping works across `yield` in generators. + +// Set up debuggee. +var g = newGlobal({newCompartment: true}); +g.log = ""; +g.eval(` +function* range(stop) { // line 2 + for (let i = 0; i < stop; i++) { // 3 + yield i; // 4 + log += " "; // 5 + } // 6 + log += "^"; // 7 +} // 8 +`); + +// Set up debugger. +let previousLine = -1; +let dbg = new Debugger(g); +dbg.onEnterFrame = frame => { + frame.onStep = function () { + assertEq(this, frame); + let line = frame.script.getOffsetLocation(frame.offset).lineNumber; + if (previousLine != line) { + g.log += line; // We stepped to a new line. + previousLine = line; + } + }; + dbg.onEnterFrame = undefined; +}; + +// Run. +for (let value of g.range(3)) { + g.log += "*"; +} + +assertEq(g.log, "234*5 34*5 34*5 37^8"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-generators-05.js b/js/src/jit-test/tests/debug/Frame-onStep-generators-05.js new file mode 100644 index 0000000000..b4996ab217 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-generators-05.js @@ -0,0 +1,14 @@ +// GC'ing a Debugger.Frame and its AbstractGeneratorObject adjusts the script's +// stepper count. + +let g = newGlobal({newCompartment: true}); +g.eval(`function* f() {}`); +for (let i = 0; i < 2; i++) { + let dbg = new Debugger(g); + dbg.onEnterFrame = frame => { + frame.onStep = () => {}; + }; + g.f(); + dbg.onEnterFrame = undefined; + gc(); +} diff --git a/js/src/jit-test/tests/debug/Frame-onStep-generators-defaults.js b/js/src/jit-test/tests/debug/Frame-onStep-generators-defaults.js new file mode 100644 index 0000000000..ea32cc0094 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-generators-defaults.js @@ -0,0 +1,35 @@ +// onStep works during the evaluation of default parameter values in generators. +// +// (They're evaluated at a weird time in the generator life cycle, before the +// generator object is created.) + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval(`\ + function f1() {} // line 1 + function f2() {} // 2 + function f3() {} // 3 + // 4 + function* gen( // 5 + name, // 6 + schema = f1(), // 7 + timeToLive = f2(), // 8 + lucidity = f3() // 9 + ) { // 10 + } // 11 +`); + +let dbg = Debugger(g); +let log = []; +dbg.onEnterFrame = frame => { + frame.onStep = () => { + let line = frame.script.getOffsetLocation(frame.offset).lineNumber; + if (log.length == 0 || line != log[log.length - 1]) { + log.push(line); + } + }; +}; + +g.gen(0); +assertDeepEq(log, [5, 7, 1, 8, 2, 9, 3, 10]); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-generators-gc-01.js b/js/src/jit-test/tests/debug/Frame-onStep-generators-gc-01.js new file mode 100644 index 0000000000..54a77260f3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-generators-gc-01.js @@ -0,0 +1,84 @@ +// onStep hooks on suspended Frames can keep Debuggers alive, even chaining them. + +// The path through the heap we're building and testing here is: +// gen0 (generator object) -> frame1 (suspended Frame with .onStep) -> dbg1 (Debugger object) +// -> gen1 -> frame2 -> dbg2 +// where everything after `gen1` is otherwise unreachable, and the edges +// `frame1 -> dbg1` and `frames2 -> dbg2` are due to the .onStep handlers, not +// strong refrences. +// +// There is no easy way to thread an event through this whole path; when we +// call gen0.next(), it will fire frame1.onStep(), but from there, making sure +// gen1.next() is called requires some minor heroics (see the WeakMap below). + +var gen0; + +var hits2 = 0; +var resuming2 = false; + +function onStep2() { + if (resuming2) { + hits2++; + resuming2 = false; + } +} + +function setup() { + let g1 = newGlobal({newCompartment: true}); + g1.eval(` + function* gf1() { + debugger; + yield 1; + return 'done'; + } + `); + gen0 = g1.gf1(); + + let g2 = newGlobal({newCompartment: true}); + g2.eval(` + function* gf2() { debugger; yield 1; return 'done'; } + + var resuming1 = false; + + function makeOnStepHook1(dbg1) { + // We use this WeakMap as a weak reference from frame1.onStep to dbg1. + var weak = new WeakMap(); + weak.set(dbg1, {}); + return () => { + if (resuming1) { + var dbg1Arr = nondeterministicGetWeakMapKeys(weak); + assertEq(dbg1Arr.length, 1); + dbg1Arr[0].gen1.next(); + resuming1 = false; + } + }; + } + + function test(g1, gen0) { + let dbg1 = Debugger(g1); + dbg1.onDebuggerStatement = frame1 => { + frame1.onStep = makeOnStepHook1(dbg1); + dbg1.onDebuggerStatement = undefined; + }; + gen0.next(); // run to yield point, creating frame1 and setting its onStep hook + resuming1 = true; + dbg1.gen1 = gf2(); + return dbg1.gen1; + } + `); + + let dbg2 = Debugger(g2); + dbg2.onDebuggerStatement = frame2 => { + frame2.onStep = onStep2; + dbg2.onDebuggerStatement = undefined; + }; + var gen1 = g2.test(g1, gen0); + gen1.next(); // run to yield point, creating frame2 and setting its onStep hook + resuming2 = true; +} + +setup(); +gc(); +assertEq(hits2, 0); +gen0.next(); // fires frame1.onStep, which calls gen1.next(), which fires frame2.onStep +assertEq(hits2, 1); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-iterators.js b/js/src/jit-test/tests/debug/Frame-onStep-iterators.js new file mode 100644 index 0000000000..2437abaab1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-iterators.js @@ -0,0 +1,20 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var log; +var a = []; + +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + frame.onStep = function () { + // This handler must not wipe out the debuggee's value in JSContext::iterValue. + log += 's'; + // This will use JSContext::iterValue in the debugger. + for (let i of a) + log += 'i'; + }; +}; + +log = ''; +g.eval("debugger; for (let i of [1,2,3]) print(i);"); +assertEq(!!log.match(/^ds*$/), true); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-lines-01.js b/js/src/jit-test/tests/debug/Frame-onStep-lines-01.js new file mode 100644 index 0000000000..a32a0535da --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-lines-01.js @@ -0,0 +1,78 @@ +// Test that a frame's onStep handler gets called at least once on each line of a function. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +// When we hit a 'debugger' statement, set offsets to the frame's script's +// table of line offsets --- a sparse array indexed by line number. Begin +// single-stepping the current frame; for each source line we hit, delete +// the line's entry in offsets. Thus, at the end, offsets is an array with +// an element for each line we did not reach. +var doSingleStep = true; +var offsets; +dbg.onDebuggerStatement = function (frame) { + var script = frame.script; + offsets = script.getAllOffsets(); + print("debugger line: " + script.getOffsetLocation(frame.offset).lineNumber); + print("original lines: " + JSON.stringify(Object.keys(offsets))); + if (doSingleStep) { + frame.onStep = function onStepHandler() { + var line = script.getOffsetLocation(this.offset).lineNumber; + delete offsets[line]; + }; + } +}; + +g.eval( + 'function t(a, b, c) { \n' + + ' debugger; \n' + + ' var x = a; \n' + + ' x += b; \n' + + ' if (x < 10) \n' + + ' x -= c; \n' + + ' return x; \n' + + '} \n' + ); + +// This should stop at every line but the first of the function. +g.eval('t(1,2,3)'); +assertEq(Object.keys(offsets).length, 1); + +// This should stop at every line but the first of the function, and the +// body of the 'if'. +g.eval('t(10,20,30)'); +assertEq(Object.keys(offsets).length, 2); + +// This shouldn't stop at all. It's the frame that's in single-step mode, +// not the script, so the prior execution of t in single-step mode should +// have no effect on this one. +doSingleStep = false; +g.eval('t(0, 0, 0)'); +assertEq(Object.keys(offsets).length, 7); +doSingleStep = true; + +// Single-step in an eval frame. This should reach every line but the +// first. +g.eval( + 'debugger; \n' + + 'var a=1, b=2, c=3; \n' + + 'var x = a; \n' + + 'x += b; \n' + + 'if (x < 10) \n' + + ' x -= c; \n' + ); +print("final lines: " + JSON.stringify(Object.keys(offsets))); +assertEq(Object.keys(offsets).length, 1); + +// Single-step in a global code frame. This should reach every line but the +// first. +g.evaluate( + 'debugger; \n' + + 'var a=1, b=2, c=3; \n' + + 'var x = a; \n' + + 'x += b; \n' + + 'if (x < 10) \n' + + ' x -= c; \n' + ); +print("final lines: " + JSON.stringify(Object.keys(offsets))); +assertEq(Object.keys(offsets).length, 1); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-resumption-01.js b/js/src/jit-test/tests/debug/Frame-onStep-resumption-01.js new file mode 100644 index 0000000000..9fe94fb21f --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-resumption-01.js @@ -0,0 +1,14 @@ +// If frame.onStep returns {return:val}, the frame returns. + +var g = newGlobal({newCompartment: true}); +g.eval("function f(x) {\n" + + " var a = x * x;\n" + + " return a;\n" + + "}\n"); + +var dbg = Debugger(g); +dbg.onEnterFrame = function (frame) { + frame.onStep = function () { return {return: "pass"}; }; +}; + +assertEq(g.f(4), "pass"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-resumption-02.js b/js/src/jit-test/tests/debug/Frame-onStep-resumption-02.js new file mode 100644 index 0000000000..852160b03c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-resumption-02.js @@ -0,0 +1,17 @@ +// If frame.onStep returns {throw:}, an exception is thrown in the debuggee. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +g.eval("function h() { debugger; }\n" + + "function f() {\n" + + " h();\n" + + " return 'fail';\n" + + "}\n"); + +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + frame.older.onStep = function () { return {throw: "pass"}; }; +}; + +assertThrowsValue(g.f, "pass"); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-resumption-03.js b/js/src/jit-test/tests/debug/Frame-onStep-resumption-03.js new file mode 100644 index 0000000000..ab3ecdd855 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-resumption-03.js @@ -0,0 +1,19 @@ +// If frame.onStep returns null, the debuggee terminates. + +var g = newGlobal({newCompartment: true}); +g.eval("function h() { debugger; }"); + +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + hits++; + if (hits == 1) { + var rv = frame.eval("h();\n" + + "throw 'fail';\n"); + assertEq(rv, null); + } else { + frame.older.onStep = function () { return null; }; + } +}; +g.h(); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-resumption-04.js b/js/src/jit-test/tests/debug/Frame-onStep-resumption-04.js new file mode 100644 index 0000000000..d557152a14 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-resumption-04.js @@ -0,0 +1,31 @@ +// If frame.onStep returns null, debuggee catch and finally blocks are skipped. + +var g = newGlobal({newCompartment: true}); +g.eval("function h() { debugger; }"); + +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + hits++; + if (hits == 1) { + var rv = frame.eval("try {\n" + + " h();\n" + + " throw 'fail';\n" + + "} catch (exc) {\n" + + " caught = exc;\n" + + "} finally {\n" + + " finallyHit = true;\n" + + "}\n"); + assertEq(rv, null); + } else { + frame.older.onStep = function () { + this.onStep = undefined; + return null; + }; + } +}; + +g.h(); +assertEq(hits, 2); +assertEq("caught" in g, false); +assertEq("finallyHit" in g, false); diff --git a/js/src/jit-test/tests/debug/Frame-onStep-resumption-05.js b/js/src/jit-test/tests/debug/Frame-onStep-resumption-05.js new file mode 100644 index 0000000000..f49e68051f --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-resumption-05.js @@ -0,0 +1,55 @@ +// Test that invoking the interrupt callback counts as a step. + +function testResumptionVal(resumptionVal, turnOffDebugMode) { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + g.log = ""; + g.resumptionVal = resumptionVal; + + setInterruptCallback(function () { + g.log += "i"; + dbg.addDebuggee(g); + var frame = dbg.getNewestFrame(); + frame.onStep = function () { + g.log += "s"; + frame.onStep = undefined; + + if (turnOffDebugMode) + dbg.removeDebuggee(g); + + return resumptionVal; + }; + return true; + }); + + try { + return g.eval("(" + function f() { + log += "f"; + invokeInterruptCallback(function (interruptRv) { + log += "r"; + assertEq(interruptRv, resumptionVal == undefined); + }); + log += "a"; + return 42; + } + ")();"); + } finally { + assertEq(g.log, resumptionVal == undefined ? "fisra" : "fisr"); + } +} + +assertEq(testResumptionVal(undefined), 42); +assertEq(testResumptionVal({ return: "not 42" }), "not 42"); +try { + testResumptionVal({ throw: "thrown 42" }); +} catch (e) { + assertEq(e, "thrown 42"); +} + +assertEq(testResumptionVal(undefined, true), 42); +assertEq(testResumptionVal({ return: "not 42" }, true), "not 42"); + +try { + testResumptionVal({ throw: "thrown 42" }, true); +} catch (e) { + assertEq(e, "thrown 42"); +} diff --git a/js/src/jit-test/tests/debug/Frame-onStep-resumption-06.js b/js/src/jit-test/tests/debug/Frame-onStep-resumption-06.js new file mode 100644 index 0000000000..3170c0319c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-resumption-06.js @@ -0,0 +1,31 @@ +// |jit-test| error:all-jobs-completed-successfully +// Verifiy that onStep's force-return queues the promise microtask to run in +// the debuggee's job queue, not the debugger's +// AutoDebuggerJobQueueInterruption. + +let g = newGlobal({ newCompartment: true }); +g.eval(` + async function asyncFn(x) { + await Promise.resolve(); + } + function enterDebuggee(){} +`); +const dbg = new Debugger(g); + +(async function() { + let it = g.asyncFn(); + + // Force-return when the await resumes and steps. + dbg.onEnterFrame = frame => { + dbg.onEnterFrame = undefined; + frame.onStep = () => ({ return: "exit" }); + }; + + const result = await it; + assertEq(result, "exit"); + // If execution here is resumed from the debugger's queue, this call will + // trigger DebuggeeWouldRun exception. + g.enterDebuggee(); + + throw "all-jobs-completed-successfully"; +})(); diff --git a/js/src/jit-test/tests/debug/Frame-script-01.js b/js/src/jit-test/tests/debug/Frame-script-01.js new file mode 100644 index 0000000000..9246f42d69 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-script-01.js @@ -0,0 +1,25 @@ +// Frame.prototype.script for eval frames. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +// Apply |f| to each frame that is |skip| frames up from each frame that +// executes a 'debugger' statement when evaluating |code| in the global g. +function ApplyToFrameScript(code, skip, f) { + dbg.onDebuggerStatement = function (frame) { + while (skip-- > 0) + frame = frame.older; + assertEq(frame.type, "eval"); + f(frame.script); + }; + g.eval(code); +} + +ApplyToFrameScript('debugger;', 0, + function (script) { + assertEq(script instanceof Debugger.Script, true); + }); +ApplyToFrameScript("(function () { eval('debugger;'); })();", 0, + function (script) { + assertEq(script instanceof Debugger.Script, true); + }); diff --git a/js/src/jit-test/tests/debug/Frame-script-02.js b/js/src/jit-test/tests/debug/Frame-script-02.js new file mode 100644 index 0000000000..3b5bf12c63 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-script-02.js @@ -0,0 +1,27 @@ +// Frame.prototype.script for call frames. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +// Apply |f| to each frame that is |skip| frames up from each frame that +// executes a 'debugger' statement when evaluating |code| in the global g. +function ApplyToFrameScript(code, skip, f) { + dbg.onDebuggerStatement = function (frame) { + while (skip-- > 0) + frame = frame.older; + assertEq(frame.type, "call"); + f(frame.script); + }; + g.eval(code); +} + +ApplyToFrameScript('(function () { debugger; })();', 0, + function (script) { + assertEq(script instanceof Debugger.Script, true); + }); + +// This would be nice, once we can get host call frames: +// ApplyToFrameScript("(function () { debugger; }).call(null);", 1, +// function (script) { +// assertEq(script, null); +// }); diff --git a/js/src/jit-test/tests/debug/Frame-script-03.js b/js/src/jit-test/tests/debug/Frame-script-03.js new file mode 100644 index 0000000000..c29de59e25 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-script-03.js @@ -0,0 +1,8 @@ +// frame.script can create a Debugger.Script for a JS_Evaluate* script. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var s; +dbg.onDebuggerStatement = function (frame) { s = frame.script; }; +g.evaluate("debugger;"); +assertEq(s instanceof Debugger.Script, true); diff --git a/js/src/jit-test/tests/debug/Frame-script-04.js b/js/src/jit-test/tests/debug/Frame-script-04.js new file mode 100644 index 0000000000..8f0f953b1d --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-script-04.js @@ -0,0 +1,35 @@ +// Frame.prototype.script for generator frames. + +load(libdir + "asserts.js"); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +g.eval(` +function* f() {} +`); + +let frame; +let script; +dbg.onEnterFrame = function(f) { + frame = f; + script = frame.script; +}; + +const it = g.f(); + +assertEq(frame instanceof Debugger.Frame, true); +assertEq(script instanceof Debugger.Script, true); +assertEq(frame.script, script); + +const lastFrame = frame; +const lastScript = script; +frame = null; +script = null; + +it.next(); + +assertEq(frame, lastFrame); +assertEq(script, lastScript); + +// The frame has finished evaluating, so the script is no longer accessible. +assertThrowsInstanceOf(() => frame.script, Error); diff --git a/js/src/jit-test/tests/debug/Frame-script-05.js b/js/src/jit-test/tests/debug/Frame-script-05.js new file mode 100644 index 0000000000..7c1094f01d --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-script-05.js @@ -0,0 +1,37 @@ +// Frame.prototype.script for async function frames. + +load(libdir + "asserts.js"); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +g.eval(` +async function f() { + await Promise.resolve() +} +`); + +let frame; +let script; +dbg.onEnterFrame = function(f) { + frame = f; + script = frame.script; +}; + +const promise = g.f(); + +assertEq(frame instanceof Debugger.Frame, true); +assertEq(script instanceof Debugger.Script, true); +assertEq(frame.script, script); + +const lastFrame = frame; +const lastScript = script; +frame = null; +script = null; + +promise.then(() => { + assertEq(frame, lastFrame); + assertEq(script, lastScript); + + // The frame has finished evaluating, so the script is no longer accessible. + assertThrowsInstanceOf(() => frame.script, Error); +}); diff --git a/js/src/jit-test/tests/debug/Frame-script-06.js b/js/src/jit-test/tests/debug/Frame-script-06.js new file mode 100644 index 0000000000..a01000347a --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-script-06.js @@ -0,0 +1,48 @@ +// Frame.prototype.script for async generator frames. + +load(libdir + "asserts.js"); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +g.eval(` +async function* f() { + await Promise.resolve(); +} +`); + +let frame; +let script; +dbg.onEnterFrame = function(f) { + frame = f; + script = frame.script; +}; + +const it = g.f(); + +assertEq(frame instanceof Debugger.Frame, true); +assertEq(script instanceof Debugger.Script, true); +assertEq(frame.script, script); + +let lastFrame = frame; +let lastScript = script; +frame = null; +script = null; + +let promise = it.next(); + +assertEq(frame, lastFrame); +assertEq(script, lastScript); +assertEq(frame.script, script); + +lastFrame = frame; +lastScript = script; +frame = null; +script = null; + +promise.then(() => { + assertEq(frame, lastFrame); + assertEq(script, lastScript); + + // The frame has finished evaluating, so the script is no longer accessible. + assertThrowsInstanceOf(() => frame.script, Error); +}); diff --git a/js/src/jit-test/tests/debug/Frame-script-environment-nondebuggee.js b/js/src/jit-test/tests/debug/Frame-script-environment-nondebuggee.js new file mode 100644 index 0000000000..2d11b00c3b --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-script-environment-nondebuggee.js @@ -0,0 +1,32 @@ +// The script and environment of a non-debuggee frame are inaccessible. + +load(libdir + 'asserts.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; + +var log; +dbg.onDebuggerStatement = function (frame) { + log += frame.type; + // Initially, 'frame' is a debuggee frame, and we should be able to see its script and environment. + assertEq(frame.script instanceof Debugger.Script, true); + assertEq(frame.environment instanceof Debugger.Environment, true); + + // If we make g no longer a debuggee, then trying to touch the frame at + // all should throw. + dbg.removeDebuggee(g); + assertThrowsInstanceOf(() => frame.script, Error); + assertThrowsInstanceOf(() => frame.environment, Error); +} + +g.eval('function f() { debugger; }'); + +log = ''; +dbg.addDebuggee(g); +g.f(); +assertEq(log, 'call'); + +log = ''; +dbg.addDebuggee(g); +g.eval('debugger;'); +assertEq(log, 'eval'); diff --git a/js/src/jit-test/tests/debug/Frame-terminated-01.js b/js/src/jit-test/tests/debug/Frame-terminated-01.js new file mode 100644 index 0000000000..d1b3de79e0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-terminated-01.js @@ -0,0 +1,19 @@ +// Check `.terminated` functionality for normal functions. + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +g.eval(` +function f(){} +`); + +let frame; +dbg.onEnterFrame = function(f) { + frame = f; + assertEq(frame.terminated, false); +}; + +g.f(); + +assertEq(frame instanceof Debugger.Frame, true); +assertEq(frame.terminated, true); diff --git a/js/src/jit-test/tests/debug/Frame-terminated-02.js b/js/src/jit-test/tests/debug/Frame-terminated-02.js new file mode 100644 index 0000000000..86323db5cb --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-terminated-02.js @@ -0,0 +1,27 @@ +// Check `.terminated` functionality for async functions. + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +g.eval(` +async function f(){ + await Promise.resolve(); +} +`); + +let frame; +dbg.onEnterFrame = function(f) { + frame = f; + assertEq(frame.terminated, false); +}; + +(async () => { + const promise = g.f(); + + assertEq(frame instanceof Debugger.Frame, true); + assertEq(frame.terminated, false); + + await promise; + + assertEq(frame.terminated, true); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-terminated-03.js b/js/src/jit-test/tests/debug/Frame-terminated-03.js new file mode 100644 index 0000000000..c5ca4febda --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-terminated-03.js @@ -0,0 +1,23 @@ +// Check `.terminated` functionality for generator functions. + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +g.eval(` +function* f(){} +`); + +let frame; +dbg.onEnterFrame = function(f) { + frame = f; + assertEq(frame.terminated, false); +}; + +const it = g.f(); + +assertEq(frame instanceof Debugger.Frame, true); +assertEq(frame.terminated, false); + +it.next(); + +assertEq(frame.terminated, true); diff --git a/js/src/jit-test/tests/debug/Frame-terminated-04.js b/js/src/jit-test/tests/debug/Frame-terminated-04.js new file mode 100644 index 0000000000..74d00c8a5b --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-terminated-04.js @@ -0,0 +1,31 @@ +// Check `.terminated` functionality for async generator functions. + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +g.eval(` +async function* f(){ + await Promise.resolve(); +} +`); + +let frame; +dbg.onEnterFrame = function(f) { + frame = f; + assertEq(frame.terminated, false); +}; + +(async () => { + const it = g.f(); + + assertEq(frame instanceof Debugger.Frame, true); + assertEq(frame.terminated, false); + + const promise = it.next(); + + assertEq(frame.terminated, false); + + await promise; + + assertEq(frame.terminated, true); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-this-01.js b/js/src/jit-test/tests/debug/Frame-this-01.js new file mode 100644 index 0000000000..147276624e --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-01.js @@ -0,0 +1,24 @@ +// Frame.prototype.this in strict-mode functions, with primitive values + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + hits++; + assertEq(frame.this, g.v); +}; + +g.eval("function f() { 'use strict'; debugger; }"); + +g.eval("Boolean.prototype.f = f; v = true; v.f();"); +g.eval("f.call(v);"); +g.eval("Number.prototype.f = f; v = 3.14; v.f();"); +g.eval("f.call(v);"); +g.eval("String.prototype.f = f; v = 'hello'; v.f();"); +g.eval("f.call(v);"); +g.eval("Symbol.prototype.f = f; v = Symbol('world'); v.f();"); +g.eval("f.call(v);"); +g.eval("v = undefined; f.call(v);"); +g.eval("v = null; f.call(v);"); + +assertEq(hits, 10); diff --git a/js/src/jit-test/tests/debug/Frame-this-02.js b/js/src/jit-test/tests/debug/Frame-this-02.js new file mode 100644 index 0000000000..a94ba5cc69 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-02.js @@ -0,0 +1,17 @@ +// Frame.prototype.this in strict direct eval frames + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + hits++; + assertEq(frame.this, g.v); +}; + +g.eval("function f() { 'use strict'; eval('debugger;'); }"); + +g.eval("Boolean.prototype.f = f; v = true; v.f();"); +g.eval("f.call(v);"); +g.eval("v = null; f.call(v);"); + +assertEq(hits, 3); diff --git a/js/src/jit-test/tests/debug/Frame-this-03.js b/js/src/jit-test/tests/debug/Frame-this-03.js new file mode 100644 index 0000000000..18f8663479 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-03.js @@ -0,0 +1,29 @@ +// Frame.prototype.this in non-strict-mode functions, with primitive values + +function classOf(obj) { + return Object.prototype.toString.call(obj).match(/^\[object (.*)\]$/)[1]; +} + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + hits++; + assertEq(frame.this instanceof Debugger.Object, true); + assertEq(frame.this.class, g.v == null ? classOf(g) : classOf(Object(g.v))); +}; + +g.eval("function f() { debugger; }"); + +g.eval("Boolean.prototype.f = f; v = true; v.f();"); +g.eval("f.call(v);"); +g.eval("Number.prototype.f = f; v = 3.14; v.f();"); +g.eval("f.call(v);"); +g.eval("String.prototype.f = f; v = 'hello'; v.f();"); +g.eval("f.call(v);"); +g.eval("Symbol.prototype.f = f; v = Symbol('world'); v.f();"); +g.eval("f.call(v);"); +g.eval("v = undefined; f.call(v);"); +g.eval("v = null; f.call(v);"); + +assertEq(hits, 10); diff --git a/js/src/jit-test/tests/debug/Frame-this-04.js b/js/src/jit-test/tests/debug/Frame-this-04.js new file mode 100644 index 0000000000..9111ac13ff --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-04.js @@ -0,0 +1,25 @@ +// Debugger.Frame.prototype.this in functions, with object values + +function classOf(obj) { + return Object.prototype.toString.call(obj).match(/^\[object (.*)\]$/)[1]; +} + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + hits++; + assertEq(frame.this instanceof Debugger.Object, true); + assertEq(frame.this.class, classOf(Object(g.v))); +}; + +g.eval("function f() { debugger; }"); + +g.eval("v = {}; f.call(v);"); +g.eval("v.f = f; v.f();"); +g.eval("v = new Date; f.call(v);"); +g.eval("v.f = f; v.f();"); +g.eval("v = []; f.call(v);"); +g.eval("Object.prototype.f = f; v.f();"); +g.eval("v = this; f();"); +assertEq(hits, 7); diff --git a/js/src/jit-test/tests/debug/Frame-this-05.js b/js/src/jit-test/tests/debug/Frame-this-05.js new file mode 100644 index 0000000000..3c38f10bca --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-05.js @@ -0,0 +1,23 @@ +// Frame.this and evalInFrame in the global scope. +var g = newGlobal({newCompartment: true}); +g.eval("x = 4; this['.this'] = 222;"); +var dbg = new Debugger(g); +var res; +dbg.onDebuggerStatement = function (frame) { + res = frame.eval("this.x").return; + res += frame.this.unsafeDereference().x; +}; +g.eval("debugger;"); +assertEq(res, 8); + +// And inside eval. +g.eval("x = 3; eval('debugger')"); +assertEq(res, 6); +g.eval("x = 2; eval('eval(\\'debugger\\')')"); +assertEq(res, 4); + +// And inside arrow functions. +g.eval("x = 1; (() => { debugger; })()"); +assertEq(res, 2); +g.eval("x = 5; (() => { eval('debugger'); })()"); +assertEq(res, 10); diff --git a/js/src/jit-test/tests/debug/Frame-this-06.js b/js/src/jit-test/tests/debug/Frame-this-06.js new file mode 100644 index 0000000000..d38398645f --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-06.js @@ -0,0 +1,22 @@ +// Frame.this and evalInFrame with missing this, strict and non-strict. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var evalThis, frameThis; +dbg.onEnterFrame = function (frame) { + if (frame.type === "eval") + return; + assertEq(frame.type, "call"); + evalThis = frame.eval("this"); + frameThis = frame.this; +}; + +// Strict, this is primitive. +g.eval("var foo = function() { 'use strict'; }; foo.call(33);"); +assertEq(evalThis.return, 33); +assertEq(frameThis, 33); + +// Non-strict, this has to be boxed. +g.eval("var bar = function() { }; bar.call(22);"); +assertEq(typeof evalThis.return, "object"); +assertEq(evalThis.return.unsafeDereference().valueOf(), 22); +assertEq(frameThis.unsafeDereference().valueOf(), 22); diff --git a/js/src/jit-test/tests/debug/Frame-this-07.js b/js/src/jit-test/tests/debug/Frame-this-07.js new file mode 100644 index 0000000000..50d938f46c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-07.js @@ -0,0 +1,19 @@ +// Frame.this can be marked as optimized-out in some cases. Here we call an +// arrow function but its enclosing function is no longer live, so it's +// impossible to recover its missing 'this' binding. +var g = newGlobal({newCompartment: true}); +g.eval("x = 4"); +g.eval("var foo = function() { return () => 1; }; var arrow = foo.call(3);"); +var dbg = new Debugger(g); +var log = ""; +dbg.onEnterFrame = function (frame) { + if (frame.type === "eval") + return; + assertEq(frame.type, "call"); + assertEq(frame.this.optimizedOut, true); + frame.eval("try { print(this.x); } catch(e) { exc = e; }"); + assertEq(typeof g.exc, "object"); + log += "d"; +}; +g.eval("arrow();"); +assertEq(log, "d"); diff --git a/js/src/jit-test/tests/debug/Frame-this-08.js b/js/src/jit-test/tests/debug/Frame-this-08.js new file mode 100644 index 0000000000..4346115865 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-08.js @@ -0,0 +1,16 @@ +// Frame.this and evalInFrame in arrow function that uses 'this'. +var g = newGlobal({newCompartment: true}); +g.eval("x = 4"); +g.eval("var foo = function() { 'use strict'; return () => this; }; var arrow = foo.call(3);"); +var dbg = new Debugger(g); +var hits = 0; +dbg.onEnterFrame = function (frame) { + if (frame.type === "eval") + return; + hits++; + assertEq(frame.type, "call"); + assertEq(frame.this, 3); + assertEq(frame.eval("this + 1").return, 4); +}; +g.eval("arrow();"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Frame-this-09.js b/js/src/jit-test/tests/debug/Frame-this-09.js new file mode 100644 index 0000000000..3ff6cc2a96 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-09.js @@ -0,0 +1,45 @@ +// Ensure |Frame.this| returns the right value even if we're still in the +// script's prologue, before JSOP_FUNCTIONTHIS. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onEnterFrame = function (frame) { + if (frame.type === 'eval') + return; + hits++; + + var frameThis = frame.this; + if (frameThis !== null && typeof frameThis === "object") + g.gotThis = frameThis.unsafeDereference(); + else + g.gotThis = frameThis; + + assertEq(frame.this, frameThis, "getter should not return a different object"); +}; + +// Strict mode, function uses |this|. +g.eval("function strictfun() { 'use strict'; return this; }"); +g.eval("strictfun.call(Math); assertEq(gotThis, Math);"); +g.eval("strictfun.call(true); assertEq(gotThis, true);"); +g.eval("strictfun.call(); assertEq(gotThis, undefined);"); + +// Strict mode, function doesn't use |this|. +g.eval("function strictfunNoThis() { 'use strict'; }"); +g.eval("strictfunNoThis.call(Math); assertEq(gotThis, Math);"); +g.eval("strictfunNoThis.call(true); assertEq(gotThis, true);"); +g.eval("strictfunNoThis.call(null); assertEq(gotThis, null);"); + +// Non-strict mode (primitive |this| is boxed), function uses |this|. +g.eval("function nonstrictfun() { return this; }"); +g.eval("nonstrictfun.call(Math); assertEq(gotThis, Math);"); +g.eval("nonstrictfun.call(null); assertEq(gotThis, this);"); +g.eval("nonstrictfun.call(); assertEq(gotThis, this);"); + +// Non-strict mode (primitive |this| is boxed), function doesn't use |this|. +g.eval("function nonstrictfunNoThis() {}"); +g.eval("nonstrictfunNoThis.call(Math); assertEq(gotThis, Math);"); +g.eval("nonstrictfunNoThis.call(null); assertEq(gotThis, this);"); +g.eval("nonstrictfunNoThis.call(); assertEq(gotThis, this);"); + +assertEq(hits, 12); diff --git a/js/src/jit-test/tests/debug/Frame-this-10.js b/js/src/jit-test/tests/debug/Frame-this-10.js new file mode 100644 index 0000000000..5ca65a0c93 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-10.js @@ -0,0 +1,42 @@ +// Check the Frame.this getter always returns the same object for a given frame. +// Primitive this-values should not be boxed multiple times. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var framesEntered = 0; +var framesPopped = 0; +var numSteps = 0; +dbg.onEnterFrame = function (frame) { + if (frame.type === 'eval') + return; + framesEntered++; + + var frameThis = frame.this; + assertEq(frame.this, frameThis); + + frame.onPop = function() { + framesPopped++; + assertEq(frame.this, frameThis); + }; + + frame.onStep = function() { + numSteps++; + assertEq(frame.this, frameThis); + } + + g.gotThis = frameThis.unsafeDereference(); +}; + +g.eval("function nonstrictfun() { return this; }"); +g.eval("nonstrictfun.call(Math); assertEq(gotThis, Math);"); +g.eval("nonstrictfun.call(true); assertEq(gotThis.valueOf(), true);"); +g.eval("nonstrictfun.call(); assertEq(gotThis, this);"); + +g.eval("function nonstrictfunNoThis() { return 1; }"); +g.eval("nonstrictfunNoThis.call(Math); assertEq(gotThis, Math);"); +g.eval("nonstrictfunNoThis.call(true); assertEq(gotThis.valueOf(), true);"); +g.eval("nonstrictfunNoThis.call(); assertEq(gotThis, this);"); + +assertEq(framesEntered, 6); +assertEq(framesPopped, 6); +assertEq(numSteps > 15, true); diff --git a/js/src/jit-test/tests/debug/Frame-this-11.js b/js/src/jit-test/tests/debug/Frame-this-11.js new file mode 100644 index 0000000000..9e137dba87 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-11.js @@ -0,0 +1,46 @@ +// Ensure evalInFrame("this") returns the right value even if we're still in the +// script's prologue, before JSOP_FUNCTIONTHIS. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onEnterFrame = function (frame) { + if (frame.type === 'eval') + return; + hits++; + + var frameThis = frame.eval('this').return; + if (frameThis !== null && typeof frameThis === "object") + g.gotThis = frameThis.unsafeDereference(); + else + g.gotThis = frameThis; + + assertEq(frame.this, frameThis); + assertEq(frame.eval('this').return, frameThis); +}; + +// Strict mode, function uses |this|. +g.eval("function strictfun() { 'use strict'; return this; }"); +g.eval("strictfun.call(Math); assertEq(gotThis, Math);"); +g.eval("strictfun.call(true); assertEq(gotThis, true);"); +g.eval("strictfun.call(); assertEq(gotThis, undefined);"); + +// Strict mode, function doesn't use |this|. +g.eval("function strictfunNoThis() { 'use strict'; }"); +g.eval("strictfunNoThis.call(Math); assertEq(gotThis, Math);"); +g.eval("strictfunNoThis.call(true); assertEq(gotThis, true);"); +g.eval("strictfunNoThis.call(null); assertEq(gotThis, null);"); + +// Non-strict mode (primitive |this| is boxed), function uses |this|. +g.eval("function nonstrictfun() { return this; }"); +g.eval("nonstrictfun.call(Math); assertEq(gotThis, Math);"); +g.eval("nonstrictfun.call(null); assertEq(gotThis, this);"); +g.eval("nonstrictfun.call(); assertEq(gotThis, this);"); + +// Non-strict mode (primitive |this| is boxed), function doesn't use |this|. +g.eval("function nonstrictfunNoThis() {}"); +g.eval("nonstrictfunNoThis.call(Math); assertEq(gotThis, Math);"); +g.eval("nonstrictfunNoThis.call(null); assertEq(gotThis, this);"); +g.eval("nonstrictfunNoThis.call(); assertEq(gotThis, this);"); + +assertEq(hits, 12); diff --git a/js/src/jit-test/tests/debug/Frame-this-12.js b/js/src/jit-test/tests/debug/Frame-this-12.js new file mode 100644 index 0000000000..3db0c4a8d6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-12.js @@ -0,0 +1,42 @@ +// Check evalInFrame("this") always returns the same object for a given frame. +// Primitive this-values should not be boxed multiple times. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var framesEntered = 0; +var framesPopped = 0; +var numSteps = 0; +dbg.onEnterFrame = function (frame) { + if (frame.type === 'eval') + return; + framesEntered++; + + var frameThis = frame.eval('this').return; + + frame.onPop = function() { + framesPopped++; + assertEq(frame.eval('this').return, frameThis); + }; + + frame.onStep = function() { + numSteps++; + assertEq(frame.eval('this').return, frameThis); + } + + g.gotThis = frameThis.unsafeDereference(); + assertEq(frame.this, frameThis); +}; + +g.eval("function nonstrictfun() { return this; }"); +g.eval("nonstrictfun.call(Math); assertEq(gotThis, Math);"); +g.eval("nonstrictfun.call(true); assertEq(gotThis.valueOf(), true);"); +g.eval("nonstrictfun.call(); assertEq(gotThis, this);"); + +g.eval("function nonstrictfunNoThis() { return 1; }"); +g.eval("nonstrictfunNoThis.call(Math); assertEq(gotThis, Math);"); +g.eval("nonstrictfunNoThis.call(true); assertEq(gotThis.valueOf(), true);"); +g.eval("nonstrictfunNoThis.call(); assertEq(gotThis, this);"); + +assertEq(framesEntered, 6); +assertEq(framesPopped, 6); +assertEq(numSteps > 15, true); diff --git a/js/src/jit-test/tests/debug/Frame-this-13.js b/js/src/jit-test/tests/debug/Frame-this-13.js new file mode 100644 index 0000000000..4200cecc45 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-13.js @@ -0,0 +1,26 @@ +// Test that Debugger.Frame.prototype.this works on normal functions. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(); +const gDO = dbg.addDebuggee(g); + +g.eval(` +var context = {}; +var f = function() { + return this; +}.bind(context); +`); + +let frame; +dbg.onEnterFrame = f => { + frame = f; + assertEq(frame.this, gDO.makeDebuggeeValue(g.context)); + dbg.onEnterFrame = undefined; +}; + +g.f(); + +assertEq(!!frame, true); +assertThrowsInstanceOf(() => frame.this, Error); diff --git a/js/src/jit-test/tests/debug/Frame-this-14.js b/js/src/jit-test/tests/debug/Frame-this-14.js new file mode 100644 index 0000000000..a47b203ea1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-14.js @@ -0,0 +1,31 @@ +// Test that Debugger.Frame.prototype.this works on a suspended generator +// function. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(); +const gDO = dbg.addDebuggee(g); + +g.eval(` +var context = {}; +var f = function*() { + return this; +}.bind(context); +`); + +let frame; +dbg.onEnterFrame = f => { + frame = f; + assertEq(frame.this, gDO.makeDebuggeeValue(g.context)); + dbg.onEnterFrame = undefined; +}; + +const it = g.f(); + +assertEq(!!frame, true); +assertEq(frame.this, gDO.makeDebuggeeValue(g.context)); + +it.next(); + +assertThrowsInstanceOf(() => frame.this, Error); diff --git a/js/src/jit-test/tests/debug/Frame-this-15.js b/js/src/jit-test/tests/debug/Frame-this-15.js new file mode 100644 index 0000000000..350fa508a9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-15.js @@ -0,0 +1,34 @@ +// Test that Debugger.Frame.prototype.this works on a suspended async +// function. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(); +const gDO = dbg.addDebuggee(g); + +g.eval(` +var context = {}; +var f = async function() { + await Promise.resolve(); + return this; +}.bind(context); +`); + +let frame; +dbg.onEnterFrame = f => { + frame = f; + assertEq(frame.this, gDO.makeDebuggeeValue(g.context)); + dbg.onEnterFrame = undefined; +}; + +(async () => { + const promise = g.f(); + + assertEq(!!frame, true); + assertEq(frame.this, gDO.makeDebuggeeValue(g.context)); + + await promise; + + assertThrowsInstanceOf(() => frame.this, Error); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-this-16.js b/js/src/jit-test/tests/debug/Frame-this-16.js new file mode 100644 index 0000000000..43aec1f2c5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-this-16.js @@ -0,0 +1,38 @@ +// Test that Debugger.Frame.prototype.this works on a suspended async +// generator function. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(); +const gDO = dbg.addDebuggee(g); + +g.eval(` +var context = {}; +var f = async function*() { + await Promise.resolve(); + return this; +}.bind(context); +`); + +let frame; +dbg.onEnterFrame = f => { + frame = f; + assertEq(frame.this, gDO.makeDebuggeeValue(g.context)); + dbg.onEnterFrame = undefined; +}; + +(async () => { + const it = g.f(); + + assertEq(!!frame, true); + assertEq(frame.this, gDO.makeDebuggeeValue(g.context)); + + const promise = it.next(); + + assertEq(frame.this, gDO.makeDebuggeeValue(g.context)); + + await promise; + + assertThrowsInstanceOf(() => frame.this, Error); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-type-01.js b/js/src/jit-test/tests/debug/Frame-type-01.js new file mode 100644 index 0000000000..b17338874c --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-type-01.js @@ -0,0 +1,22 @@ +// Debugger.Frame.prototype.type on a normal function. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); + +g.eval(` +function f() {} +`); + +let frame; +dbg.onEnterFrame = function(f) { + frame = f; + assertEq(frame.type, "call"); +}; + +g.f(); + +assertEq(!!frame, true); +// Throws because the frame has terminated. +assertThrowsInstanceOf(() => frame.type, Error); diff --git a/js/src/jit-test/tests/debug/Frame-type-02.js b/js/src/jit-test/tests/debug/Frame-type-02.js new file mode 100644 index 0000000000..07e32ae29a --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-type-02.js @@ -0,0 +1,27 @@ +// Debugger.Frame.prototype.type on a generator. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); + +g.eval(` +function* f() {} +`); + +let frame; +dbg.onEnterFrame = function(f) { + frame = f; + assertEq(frame.type, "call"); +}; + +const it = g.f(); + +assertEq(frame.type, "call"); +frame = null; + +it.next(); + +assertEq(!!frame, true); +// Throws because the frame has terminated. +assertThrowsInstanceOf(() => frame.type, Error); diff --git a/js/src/jit-test/tests/debug/Frame-type-03.js b/js/src/jit-test/tests/debug/Frame-type-03.js new file mode 100644 index 0000000000..38dc37d1c3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-type-03.js @@ -0,0 +1,31 @@ +// Debugger.Frame.prototype.type on an async function. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); + +g.eval(` +async function f() { + await Promise.resolve(); +} +`); + +let frame; +dbg.onEnterFrame = function(f) { + frame = f; + assertEq(frame.type, "call"); +}; + +(async () => { + const promise = g.f(); + + assertEq(frame.type, "call"); + frame = null; + + await promise; + + assertEq(!!frame, true); + // Throws because the frame has terminated. + assertThrowsInstanceOf(() => frame.type, Error); +})(); diff --git a/js/src/jit-test/tests/debug/Frame-type-04.js b/js/src/jit-test/tests/debug/Frame-type-04.js new file mode 100644 index 0000000000..4c4a65b5e9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-type-04.js @@ -0,0 +1,35 @@ +// Debugger.Frame.prototype.type on an async generator. + +load(libdir + "asserts.js"); + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); + +g.eval(` +async function* f() { + await Promise.resolve(); +} +`); + +let frame; +dbg.onEnterFrame = function(f) { + frame = f; + assertEq(frame.type, "call"); +}; + +(async () => { + const it = g.f(); + + assertEq(frame.type, "call"); + frame = null; + + const promise = it.next(); + + assertEq(!!frame, true); + assertEq(frame.type, "call"); + + await promise; + + // Throws because the frame has terminated. + assertThrowsInstanceOf(() => frame.type, Error); +})(); diff --git a/js/src/jit-test/tests/debug/Memory-01.js b/js/src/jit-test/tests/debug/Memory-01.js new file mode 100644 index 0000000000..7dc00b9ee8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-01.js @@ -0,0 +1,6 @@ +assertEq(typeof Debugger.Memory, "function"); +let dbg = new Debugger; +assertEq(dbg.memory instanceof Debugger.Memory, true); + +load(libdir + "asserts.js"); +assertThrowsInstanceOf(() => new Debugger.Memory, TypeError); diff --git a/js/src/jit-test/tests/debug/Memory-allocationSamplingProbability-01.js b/js/src/jit-test/tests/debug/Memory-allocationSamplingProbability-01.js new file mode 100644 index 0000000000..3dbd7be9d9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-allocationSamplingProbability-01.js @@ -0,0 +1,45 @@ +// Test that setting Debugger.Memory.prototype.allocationSamplingProbability to +// a bad number throws. + +load(libdir + "asserts.js"); + +const root = newGlobal({newCompartment: true}); + +const dbg = new Debugger(); +const wrappedRoot = dbg.addDebuggee(root); + +var mem = dbg.memory; + +// Out of range, negative +assertThrowsInstanceOf(() => mem.allocationSamplingProbability = -Number.MAX_VALUE, + TypeError); +assertThrowsInstanceOf(() => mem.allocationSamplingProbability = -1, + TypeError); +assertThrowsInstanceOf(() => mem.allocationSamplingProbability = -Number.MIN_VALUE, + TypeError); + +// In range +mem.allocationSamplingProbability = -0.0; +mem.allocationSamplingProbability = 0.0; +mem.allocationSamplingProbability = Number.MIN_VALUE; +mem.allocationSamplingProbability = 1 / 3; +mem.allocationSamplingProbability = .5; +mem.allocationSamplingProbability = 2 / 3; +mem.allocationSamplingProbability = 1 - Math.pow(2, -53); +mem.allocationSamplingProbability = 1; + +// Out of range, positive +assertThrowsInstanceOf(() => mem.allocationSamplingProbability = 1 + Number.EPSILON, + TypeError); +assertThrowsInstanceOf(() => mem.allocationSamplingProbability = 2, + TypeError); +assertThrowsInstanceOf(() => mem.allocationSamplingProbability = Number.MAX_VALUE, + TypeError); + +// Out of range, non-finite +assertThrowsInstanceOf(() => mem.allocationSamplingProbability = -Infinity, + TypeError); +assertThrowsInstanceOf(() => mem.allocationSamplingProbability = Infinity, + TypeError); +assertThrowsInstanceOf(() => mem.allocationSamplingProbability = NaN, + TypeError); diff --git a/js/src/jit-test/tests/debug/Memory-allocationSamplingProbability-02.js b/js/src/jit-test/tests/debug/Memory-allocationSamplingProbability-02.js new file mode 100644 index 0000000000..bbd2582a68 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-allocationSamplingProbability-02.js @@ -0,0 +1,36 @@ +// Test that we only sample about allocationSamplingProbability * 100 percent of +// allocations. + +const root = newGlobal({newCompartment: true}); + +const dbg = new Debugger(); +const wrappedRoot = dbg.addDebuggee(root); + +root.eval(` + objs = []; + objs.push(new Object); +`); + +root.eval("" + function makeSomeAllocations() { + for (var i = 0; i < 100; i++) { + objs.push(new Object); + } +}); + +function measure(P, expected) { + root.setSavedStacksRNGState(Number.MAX_SAFE_INTEGER - 1); + dbg.memory.allocationSamplingProbability = P; + root.makeSomeAllocations(); + assertEq(dbg.memory.drainAllocationsLog().length, expected); +} + +dbg.memory.trackingAllocationSites = true; + +// These are the sample counts that were correct when this test was last +// updated; changes to SpiderMonkey may occasionally cause changes +// here. Anything that is within a plausible range for the given sampling +// probability is fine. +measure(0.0, 0); +measure(1.0, 100); +measure(0.1, 11); +measure(0.5, 49); diff --git a/js/src/jit-test/tests/debug/Memory-allocationsLogOverflowed-01.js b/js/src/jit-test/tests/debug/Memory-allocationsLogOverflowed-01.js new file mode 100644 index 0000000000..5e7176db34 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-allocationsLogOverflowed-01.js @@ -0,0 +1,24 @@ +// Test basic usage of `Debugger.Memory.prototype.allocationsLogOverflowed`. + +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(root); +dbg.memory.trackingAllocationSites = true; +dbg.memory.maxAllocationsLogLength = 1; + +root.eval("(" + function immediate() { + // Allocate more than the max log length. + this.objs = [{}, {}, {}, {}]; +} + "());"); + +// The log should have overflowed. +assertEq(dbg.memory.allocationsLogOverflowed, true); + +// Once drained, the flag should be reset. +const allocs = dbg.memory.drainAllocationsLog(); +assertEq(dbg.memory.allocationsLogOverflowed, false); + +// If we keep allocations under the max log length, then we shouldn't have +// overflowed. +dbg.memory.maxAllocationsLogLength = 10000; +root.eval("this.objs = [{}, {}, {}, {}];"); +assertEq(dbg.memory.allocationsLogOverflowed, false); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-01.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-01.js new file mode 100644 index 0000000000..8b7599c73d --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-01.js @@ -0,0 +1,31 @@ +// Test basic usage of drainAllocationsLog() + +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const wrappedRoot = dbg.addDebuggee(root) +dbg.memory.trackingAllocationSites = true; + +root.eval("(" + function immediate() { + this.tests = [ + {x: 1}, + [], + /(two|2)\s*problems/, + new function Ctor(){}, + new Object(), + new Array(), + new Date(), + ]; +} + "());"); + +const allocs = dbg.memory.drainAllocationsLog(); +print(allocs.join("\n--------------------------------------------------------------------------\n")); +print("Total number of allocations logged: " + allocs.length); + +let idx = -1; +for (let object of root.tests) { + let wrappedObject = wrappedRoot.makeDebuggeeValue(object); + let allocSite = wrappedObject.allocationSite; + let newIdx = allocs.map(x => x.frame).indexOf(allocSite); + assertEq(newIdx > idx, true); + idx = newIdx; +} diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-02.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-02.js new file mode 100644 index 0000000000..e9d56bf103 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-02.js @@ -0,0 +1,14 @@ +// Test that drainAllocationsLog fails when we aren't trackingAllocationSites. + +load(libdir + 'asserts.js'); + +const root = newGlobal(); +const dbg = new Debugger(); + +dbg.memory.trackingAllocationSites = true; +root.eval("this.alloc1 = {}"); +dbg.memory.trackingAllocationSites = false; +root.eval("this.alloc2 = {};"); + +assertThrowsInstanceOf(() => dbg.memory.drainAllocationsLog(), + Error); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-03.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-03.js new file mode 100644 index 0000000000..fb0ba5e0d5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-03.js @@ -0,0 +1,24 @@ +// Test when there are more allocations than the maximum log length. + +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +dbg.addDebuggee(root) + +dbg.memory.maxAllocationsLogLength = 3; +dbg.memory.trackingAllocationSites = true; + +root.eval([ + "this.alloc1 = {};", // line 1 + "this.alloc2 = {};", // line 2 + "this.alloc3 = {};", // line 3 + "this.alloc4 = {};", // line 4 +].join("\n")); + +const allocs = dbg.memory.drainAllocationsLog(); + +// Should have stayed at the maximum length. +assertEq(allocs.length, 3); +// Should have kept the most recent allocation. +assertEq(allocs[2].frame.line, 4); +// Should have thrown away the oldest allocation. +assertEq(allocs.map(x => x.frame.line).indexOf(1), -1); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-04.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-04.js new file mode 100644 index 0000000000..1a0c55f276 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-04.js @@ -0,0 +1,21 @@ +// Test that when we shorten the maximum log length, we won't get a longer log +// than that new maximum afterwards. + +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +dbg.addDebuggee(root) + +dbg.memory.trackingAllocationSites = true; + +root.eval([ + "this.alloc1 = {};", // line 1 + "this.alloc2 = {};", // line 2 + "this.alloc3 = {};", // line 3 + "this.alloc4 = {};", // line 4 +].join("\n")); + +dbg.memory.maxAllocationsLogLength = 1; +const allocs = dbg.memory.drainAllocationsLog(); + +// Should have trimmed down to the new maximum length. +assertEq(allocs.length, 1); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-05.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-05.js new file mode 100644 index 0000000000..59f9094d9b --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-05.js @@ -0,0 +1,9 @@ +// Test an empty allocation log. + +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +dbg.addDebuggee(root) + +dbg.memory.trackingAllocationSites = true; +const allocs = dbg.memory.drainAllocationsLog(); +assertEq(allocs.length, 0); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-06.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-06.js new file mode 100644 index 0000000000..e112cd8c0e --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-06.js @@ -0,0 +1,23 @@ +// Test doing a GC while we have a non-empty log. + +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +dbg.addDebuggee(root) +dbg.memory.trackingAllocationSites = true; + +root.eval("(" + function immediate() { + this.tests = [ + ({}), + [], + /(two|2)\s*problems/, + new function Ctor(){}, + new Object(), + new Array(), + new Date(), + ]; +} + "());"); + +gc(); + +const allocs = dbg.memory.drainAllocationsLog(); +assertEq(allocs.length >= root.tests.length, true); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-07.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-07.js new file mode 100644 index 0000000000..21ffb3aaf6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-07.js @@ -0,0 +1,10 @@ +// Test retrieving the log when allocation tracking hasn't ever been enabled. + +load(libdir + 'asserts.js'); + +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +dbg.addDebuggee(root) + +assertThrowsInstanceOf(() => dbg.memory.drainAllocationsLog(), + Error); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-08.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-08.js new file mode 100644 index 0000000000..78803b9aa7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-08.js @@ -0,0 +1,30 @@ +// Test retrieving the log multiple times. + +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +dbg.addDebuggee(root) + +root.eval([ + "this.allocs = [];", + "this.doFirstAlloc = " + function () { + this.allocs.push({}); this.firstAllocLine = Error().lineNumber; + }, + "this.doSecondAlloc = " + function () { + this.allocs.push(new Object()); this.secondAllocLine = Error().lineNumber; + } +].join("\n")); + +dbg.memory.trackingAllocationSites = true; + +root.doFirstAlloc(); +let allocs1 = dbg.memory.drainAllocationsLog(); +root.doSecondAlloc(); +let allocs2 = dbg.memory.drainAllocationsLog(); + +let allocs1Lines = allocs1.filter(x => !!x.frame).map(x => x.frame.line); +assertEq(allocs1Lines.indexOf(root.firstAllocLine) != -1, true); +assertEq(allocs1Lines.indexOf(root.secondAllocLine) == -1, true); + +let allocs2Lines = allocs2.filter(x => !!x.frame).map(x => x.frame.line); +assertEq(allocs2Lines.indexOf(root.secondAllocLine) != -1, true); +assertEq(allocs2Lines.indexOf(root.firstAllocLine) == -1, true); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-09.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-09.js new file mode 100644 index 0000000000..62834fcc1b --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-09.js @@ -0,0 +1,20 @@ +// Test logs that contain allocations from many debuggee compartments. + +const dbg = new Debugger(); + +const root1 = newGlobal({newCompartment: true}); +const root2 = newGlobal({newCompartment: true}); +const root3 = newGlobal({newCompartment: true}); + +dbg.addDebuggee(root1); +dbg.addDebuggee(root2); +dbg.addDebuggee(root3); + +dbg.memory.trackingAllocationSites = true; + +root1.eval("this.alloc = {}"); +root2.eval("this.alloc = {}"); +root3.eval("this.alloc = {}"); + +const allocs = dbg.memory.drainAllocationsLog(); +assertEq(allocs.length >= 3, true); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-10.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-10.js new file mode 100644 index 0000000000..0bcad27a33 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-10.js @@ -0,0 +1,21 @@ +// Test logs that contain allocations from debuggee compartments added as we are +// logging. + +const dbg = new Debugger(); + +dbg.memory.trackingAllocationSites = true; + +const root1 = newGlobal({newCompartment: true}); +dbg.addDebuggee(root1); +root1.eval("this.alloc = {}"); + +const root2 = newGlobal({newCompartment: true}); +dbg.addDebuggee(root2); +root2.eval("this.alloc = {}"); + +const root3 = newGlobal({newCompartment: true}); +dbg.addDebuggee(root3); +root3.eval("this.alloc = {}"); + +const allocs = dbg.memory.drainAllocationsLog(); +assertEq(allocs.length >= 3, true); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-11.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-11.js new file mode 100644 index 0000000000..7e5d567a81 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-11.js @@ -0,0 +1,25 @@ +// Test logs that shouldn't contain allocations from debuggee compartments +// removed as we are logging. + +const dbg = new Debugger(); + +const root1 = newGlobal({newCompartment: true}); +dbg.addDebuggee(root1); +const root2 = newGlobal({newCompartment: true}); +dbg.addDebuggee(root2); +const root3 = newGlobal({newCompartment: true}); +dbg.addDebuggee(root3); + +dbg.memory.trackingAllocationSites = true; + +dbg.removeDebuggee(root1); +root1.eval("this.alloc = {}"); + +dbg.removeDebuggee(root2); +root2.eval("this.alloc = {}"); + +dbg.removeDebuggee(root3); +root3.eval("this.alloc = {}"); + +const allocs = dbg.memory.drainAllocationsLog(); +assertEq(allocs.length, 0); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-13.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-13.js new file mode 100644 index 0000000000..4f486c06ef --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-13.js @@ -0,0 +1,16 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// Test that we don't crash while logging allocations and there is +// off-main-thread compilation. OMT compilation will allocate functions and +// regexps, but we just punt on measuring that accurately. + +const root = newGlobal({newCompartment: true}); +root.eval("this.dbg = new Debugger()"); +root.dbg.addDebuggee(this); +root.dbg.memory.trackingAllocationSites = true; + +offThreadCompileToStencil( + "function foo() {\n" + + " print('hello world');\n" + + "}" +); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-14.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-14.js new file mode 100644 index 0000000000..39b2674c31 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-14.js @@ -0,0 +1,47 @@ +// Test that drainAllocationsLog returns some timestamps. + +load(libdir + 'asserts.js'); + +var allocTimes = []; + +allocTimes.push(timeSinceCreation()); + +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(root); + +dbg.memory.trackingAllocationSites = true; +root.eval("this.alloc1 = {}"); +allocTimes.push(timeSinceCreation()); +root.eval("this.alloc2 = {}"); +allocTimes.push(timeSinceCreation()); +root.eval("this.alloc3 = {}"); +allocTimes.push(timeSinceCreation()); +root.eval("this.alloc4 = {}"); +allocTimes.push(timeSinceCreation()); + +allocs = dbg.memory.drainAllocationsLog(); +assertEq(allocs.length >= 4, true); +assertEq(allocs[0].timestamp >= allocTimes[0], true); +var seenAlloc = 0; +var lastIndexSeenAllocIncremented = 0; +for (i = 1; i < allocs.length; ++i) { + assertEq(allocs[i].timestamp >= allocs[i - 1].timestamp, true); + // It isn't possible to exactly correlate the entries in the + // allocs array with the entries in allocTimes, because we can't + // control exactly how many allocations are done during the course + // of a given eval. However, we can assume that there is some + // allocation recorded after each entry in allocTimes. So, we + // track the allocTimes entry we've passed, and then after the + // loop assert that we've seen them all. We also assert that a + // non-zero number of allocations has happened since the last seen + // increment. + while (seenAlloc < allocTimes.length + && allocs[i].timestamp >= allocTimes[seenAlloc]) { + assertEq(i - lastIndexSeenAllocIncremented > 0, true); + lastIndexSeenAllocIncremented = i; + ++seenAlloc; + } +} +// There should be one entry left in allocTimes, because we recorded a +// time after the last possible allocation in the array. +assertEq(seenAlloc, allocTimes.length -1); diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-15.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-15.js new file mode 100644 index 0000000000..d8af3c9319 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-15.js @@ -0,0 +1,30 @@ +// Test drainAllocationsLog() and [[Class]] names. +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const wrappedRoot = dbg.addDebuggee(root) + +root.eval( + ` + this.tests = [ + { expected: "Object", test: () => new Object }, + { expected: "Array", test: () => [] }, + { expected: "Date", test: () => new Date }, + { expected: "RegExp", test: () => /problems/ }, + { expected: "Int8Array", test: () => new Int8Array }, + { expected: "Promise", test: () => new Promise(function (){})}, + ]; + ` +); + + +for (let { expected, test } of root.tests) { + print(expected); + + dbg.memory.trackingAllocationSites = true; + test(); + let allocs = dbg.memory.drainAllocationsLog(); + dbg.memory.trackingAllocationSites = false; + + assertEq(allocs.some(a => a.class === expected), true); +} + diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-17.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-17.js new file mode 100644 index 0000000000..b0faf83641 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-17.js @@ -0,0 +1,55 @@ +// Test drainAllocationsLog() and byte sizes. + +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const wrappedRoot = dbg.addDebuggee(root); + +root.eval( + ` + function AsmModule(stdlib, foreign, heap) { + "use asm"; + + function test() { + return 5|0; + } + + return { test: test }; + } + const buf = new ArrayBuffer(1024*8); + + function Ctor() {} + this.tests = [ + { name: "new UInt8Array(256)", fn: () => new Uint8Array(256) }, + { name: "arguments", fn: function () { return arguments; } }, + { name: "asm.js module", fn: () => AsmModule(this, {}, buf) }, + { name: "/2manyproblemz/g", fn: () => /2manyproblemz/g }, + { name: "iterator", fn: () => [1,2,3][Symbol.iterator]() }, + { name: "Error()", fn: () => Error() }, + { name: "new Ctor", fn: () => new Ctor }, + { name: "{}", fn: () => ({}) }, + { name: "new Date", fn: () => new Date }, + { name: "[1,2,3]", fn: () => [1,2,3] }, + ]; + ` +); + +for (let { name, fn } of root.tests) { + print("Test: " + name); + + dbg.memory.trackingAllocationSites = true; + + fn(); + + let entries = dbg.memory.drainAllocationsLog(); + + for (let {size} of entries) { + print(" " + size + " bytes"); + // We should get some kind of byte size. We aren't testing that in depth + // here, it is tested pretty thoroughly in + // js/src/jit-test/tests/heap-analysis/byteSize-of-object.js. + assertEq(typeof size, "number"); + assertEq(size > 0, true); + } + + dbg.memory.trackingAllocationSites = false; +} diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-18.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-18.js new file mode 100644 index 0000000000..6ab17714e6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-18.js @@ -0,0 +1,31 @@ +// |jit-test| skip-if: !('gczeal' in this) + +// Test drainAllocationsLog() entries' inNursery flag. + +gczeal(0); + +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const wrappedRoot = dbg.addDebuggee(root); + +dbg.memory.trackingAllocationSites = true; + +root.eval( + ` + for (let i = 0; i < 10; i++) + allocationMarker({ nursery: true }); + + for (let i = 0; i < 10; i++) + allocationMarker({ nursery: false }); + ` +); + +let entries = dbg.memory.drainAllocationsLog().filter(e => e.class == "AllocationMarker"); + +assertEq(entries.length, 20); + +for (let i = 0; i < 10; i++) + assertEq(entries[i].inNursery, true); + +for (let i = 10; i < 20; i++) + assertEq(entries[i].inNursery, false); diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-01.js b/js/src/jit-test/tests/debug/Memory-takeCensus-01.js new file mode 100644 index 0000000000..d5972a5ec6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-takeCensus-01.js @@ -0,0 +1,23 @@ +// Debugger.Memory.prototype.takeCensus returns a value of an appropriate shape. + +var dbg = new Debugger; + +function checkProperties(census) { + assertEq(typeof census, 'object'); + for (prop of Object.getOwnPropertyNames(census)) { + var desc = Object.getOwnPropertyDescriptor(census, prop); + assertEq(desc.enumerable, true); + assertEq(desc.configurable, true); + assertEq(desc.writable, true); + if (typeof desc.value === 'object') + checkProperties(desc.value); + else + assertEq(typeof desc.value, 'number'); + } +} + +checkProperties(dbg.memory.takeCensus()); + +var g = newGlobal({newCompartment: true}); +dbg.addDebuggee(g); +checkProperties(dbg.memory.takeCensus()); diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-02.js b/js/src/jit-test/tests/debug/Memory-takeCensus-02.js new file mode 100644 index 0000000000..0ab49cb2de --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-takeCensus-02.js @@ -0,0 +1,49 @@ +// Debugger.Memory.prototype.takeCensus behaves plausibly as we allocate objects. + +// Exact object counts vary in ways we can't predict. For example, +// BaselineScripts can hold onto "template objects", which exist only to hold +// the shape and type for newly created objects. When BaselineScripts are +// discarded, these template objects go with them. +// +// So instead of expecting precise counts, we expect counts that are at least as +// many as we would expect given the object graph we've built. + +load(libdir + 'census.js'); + +// A Debugger with no debuggees had better not find anything. +var dbg = new Debugger; +var census0 = dbg.memory.takeCensus(); +Census.walkCensus(census0, "census0", Census.assertAllZeros); + +function newGlobalWithDefs() { + var g = newGlobal({newCompartment: true}); + g.eval(` + function times(n, fn) { + var a=[]; + for (var i = 0; i ({}));'); +g.eval('var rxs = times(200, () => /foo/);'); +g.eval('var ars = times(400, () => []);'); +g.eval('var fns = times(800, () => () => {});'); + +var census1 = dbg.memory.takeCensus(); +Census.walkCensus(census1, "census1", + Census.assertAllNotLessThan( + { 'objects': + { 'Object': { count: 100 }, + 'RegExp': { count: 200 }, + 'Array': { count: 400 }, + 'Function': { count: 800 } + } + })); diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-03.js b/js/src/jit-test/tests/debug/Memory-takeCensus-03.js new file mode 100644 index 0000000000..4284f642d8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-takeCensus-03.js @@ -0,0 +1,26 @@ +// Debugger.Memory.prototype.takeCensus behaves plausibly as we add and remove debuggees. + +load(libdir + 'census.js'); + +var dbg = new Debugger; + +var census0 = dbg.memory.takeCensus(); +Census.walkCensus(census0, "census0", Census.assertAllZeros); + +var g1 = newGlobal({newCompartment: true}); +dbg.addDebuggee(g1); +var census1 = dbg.memory.takeCensus(); +Census.walkCensus(census1, "census1", Census.assertAllNotLessThan(census0)); + +var g2 = newGlobal({newCompartment: true}); +dbg.addDebuggee(g2); +var census2 = dbg.memory.takeCensus(); +Census.walkCensus(census2, "census2", Census.assertAllNotLessThan(census1), new Set(["bytes"])); + +dbg.removeDebuggee(g2); +var census3 = dbg.memory.takeCensus(); +Census.walkCensus(census3, "census3", Census.assertAllEqual(census1), new Set(["bytes"])); + +dbg.removeDebuggee(g1); +var census4 = dbg.memory.takeCensus(); +Census.walkCensus(census4, "census4", Census.assertAllEqual(census0)); diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-04.js b/js/src/jit-test/tests/debug/Memory-takeCensus-04.js new file mode 100644 index 0000000000..33fbeaa163 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-takeCensus-04.js @@ -0,0 +1,27 @@ +// Test that Debugger.Memory.prototype.takeCensus finds GC roots that are on the +// stack. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval(` + function withAllocationMarkerOnStack(f) { + (function () { + var onStack = allocationMarker(); + f(); + return onStack; // To prevent the JIT from optimizing out onStack. + }()) + } +`); + +assertEq("AllocationMarker" in dbg.memory.takeCensus().objects, false, + "There shouldn't exist any allocation markers in the census."); + +var allocationMarkerCount; +g.withAllocationMarkerOnStack(() => { + allocationMarkerCount = dbg.memory.takeCensus().objects.AllocationMarker.count; +}); + +assertEq(allocationMarkerCount, 1, + "Should have one allocation marker in the census, because there " + + "was one on the stack."); diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-05.js b/js/src/jit-test/tests/debug/Memory-takeCensus-05.js new file mode 100644 index 0000000000..4cd99158c1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-takeCensus-05.js @@ -0,0 +1,14 @@ +// Test that Debugger.Memory.prototype.takeCensus finds cross compartment +// wrapper GC roots. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +assertEq("AllocationMarker" in dbg.memory.takeCensus().objects, false, + "There shouldn't exist any allocation markers in the census."); + +this.ccw = g.allocationMarker(); + +assertEq(dbg.memory.takeCensus().objects.AllocationMarker.count, 1, + "Should have one allocation marker in the census, because there " + + "is one cross-compartment wrapper referring to it."); diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-06.js b/js/src/jit-test/tests/debug/Memory-takeCensus-06.js new file mode 100644 index 0000000000..02f8de30be --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-takeCensus-06.js @@ -0,0 +1,108 @@ +// Check Debugger.Memory.prototype.takeCensus handling of 'breakdown' argument. + +load(libdir + 'match.js'); +var Pattern = Match.Pattern; + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +Pattern({ count: Pattern.NATURAL, + bytes: Pattern.NATURAL }) + .assert(dbg.memory.takeCensus({ breakdown: { by: 'count' } })); + +let census = dbg.memory.takeCensus({ breakdown: { by: 'count', count: false, bytes: false } }); +assertEq('count' in census, false); +assertEq('bytes' in census, false); + +census = dbg.memory.takeCensus({ breakdown: { by: 'count', count: true, bytes: false } }); +assertEq('count' in census, true); +assertEq('bytes' in census, false); + +census = dbg.memory.takeCensus({ breakdown: { by: 'count', count: false, bytes: true } }); +assertEq('count' in census, false); +assertEq('bytes' in census, true); + +census = dbg.memory.takeCensus({ breakdown: { by: 'count', count: true, bytes: true } }); +assertEq('count' in census, true); +assertEq('bytes' in census, true); + + +// Pattern doesn't mind objects with extra properties, so we'll restrict this +// list to the object classes we're pretty sure are going to stick around for +// the forseeable future. +Pattern({ + Function: { count: Pattern.NATURAL }, + Object: { count: Pattern.NATURAL }, + DebuggerPrototype: { count: Pattern.NATURAL }, + global: { count: Pattern.NATURAL }, + }) + .assert(dbg.memory.takeCensus({ breakdown: { by: 'objectClass' } })); + +Pattern({ + objects: { count: Pattern.NATURAL }, + scripts: { count: Pattern.NATURAL }, + strings: { count: Pattern.NATURAL }, + other: { count: Pattern.NATURAL } + }) + .assert(dbg.memory.takeCensus({ breakdown: { by: 'coarseType' } })); + +// As for { by: 'objectClass' }, restrict our pattern to the types +// we predict will stick around for a long time. +Pattern({ + JSString: { count: Pattern.NATURAL }, + 'js::Shape': { count: Pattern.NATURAL }, + JSObject: { count: Pattern.NATURAL }, + }) + .assert(dbg.memory.takeCensus({ breakdown: { by: 'internalType' } })); + + +// Nested breakdowns. + +let coarse_type_pattern = { + objects: { count: Pattern.NATURAL }, + scripts: { count: Pattern.NATURAL }, + strings: { count: Pattern.NATURAL }, + other: { count: Pattern.NATURAL } +}; + +Pattern({ + JSString: coarse_type_pattern, + 'js::Shape': coarse_type_pattern, + JSObject: coarse_type_pattern, + }) + .assert(dbg.memory.takeCensus({ + breakdown: { by: 'internalType', + then: { by: 'coarseType' } + } + })); + +Pattern({ + Function: { count: Pattern.NATURAL }, + Object: { count: Pattern.NATURAL }, + DebuggerPrototype: { count: Pattern.NATURAL }, + global: { count: Pattern.NATURAL }, + other: coarse_type_pattern + }) + .assert(dbg.memory.takeCensus({ + breakdown: { + by: 'objectClass', + then: { by: 'count' }, + other: { by: 'coarseType' } + } + })); + +Pattern({ + objects: { count: Pattern.NATURAL, label: "object" }, + scripts: { count: Pattern.NATURAL, label: "scripts" }, + strings: { count: Pattern.NATURAL, label: "strings" }, + other: { count: Pattern.NATURAL, label: "other" } + }) + .assert(dbg.memory.takeCensus({ + breakdown: { + by: 'coarseType', + objects: { by: 'count', label: 'object' }, + scripts: { by: 'count', label: 'scripts' }, + strings: { by: 'count', label: 'strings' }, + other: { by: 'count', label: 'other' } + } + })); diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-07.js b/js/src/jit-test/tests/debug/Memory-takeCensus-07.js new file mode 100644 index 0000000000..985a47c96e --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-takeCensus-07.js @@ -0,0 +1,75 @@ +// Debugger.Memory.prototype.takeCensus breakdown: check error handling on +// property gets. + +load(libdir + 'asserts.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +assertThrowsValue(() => { + dbg.memory.takeCensus({ + breakdown: { get by() { throw "ಠ_ಠ" } } + }); +}, "ಠ_ಠ"); + + + +assertThrowsValue(() => { + dbg.memory.takeCensus({ + breakdown: { by: 'count', get count() { throw "ಠ_ಠ" } } + }); +}, "ಠ_ಠ"); + +assertThrowsValue(() => { + dbg.memory.takeCensus({ + breakdown: { by: 'count', get bytes() { throw "ಠ_ಠ" } } + }); +}, "ಠ_ಠ"); + + + +assertThrowsValue(() => { + dbg.memory.takeCensus({ + breakdown: { by: 'objectClass', get then() { throw "ಠ_ಠ" } } + }); +}, "ಠ_ಠ"); + +assertThrowsValue(() => { + dbg.memory.takeCensus({ + breakdown: { by: 'objectClass', get other() { throw "ಠ_ಠ" } } + }); +}, "ಠ_ಠ"); + + + +assertThrowsValue(() => { + dbg.memory.takeCensus({ + breakdown: { by: 'coarseType', get objects() { throw "ಠ_ಠ" } } + }); +}, "ಠ_ಠ"); + +assertThrowsValue(() => { + dbg.memory.takeCensus({ + breakdown: { by: 'coarseType', get scripts() { throw "ಠ_ಠ" } } + }); +}, "ಠ_ಠ"); + +assertThrowsValue(() => { + dbg.memory.takeCensus({ + breakdown: { by: 'coarseType', get strings() { throw "ಠ_ಠ" } } + }); +}, "ಠ_ಠ"); + +assertThrowsValue(() => { + dbg.memory.takeCensus({ + breakdown: { by: 'coarseType', get other() { throw "ಠ_ಠ" } } + }); +}, "ಠ_ಠ"); + + + +assertThrowsValue(() => { + dbg.memory.takeCensus({ + breakdown: { by: 'internalType', get then() { throw "ಠ_ಠ" } } + }); +}, "ಠ_ಠ"); diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-08.js b/js/src/jit-test/tests/debug/Memory-takeCensus-08.js new file mode 100644 index 0000000000..8b8e21f81c --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-takeCensus-08.js @@ -0,0 +1,73 @@ +// Debugger.Memory.prototype.takeCensus: test by: 'count' breakdown + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +g.eval(` + var stuff = []; + function add(n, c) { + for (let i = 0; i < n; i++) + stuff.push(c()); + } + + let count = 0; + + function obj() { return { count: count++ }; } + obj.factor = 1; + + // This creates a closure (a function JSObject) that has captured + // a Call object. So each call creates two items. + function fun() { let v = count; return () => { return v; } } + fun.factor = 2; + + function str() { return 'perambulator' + count++; } + str.factor = 1; + + // Eval a fresh text each time, allocating: + // - a fresh ScriptSourceObject + // - a new JSScripts, not an eval cache hits + // - a fresh prototype object + // - a fresh Call object, since the eval makes 'ev' heavyweight + // - the new function itself + function ev() { + return eval(\`(function () { return \${ count++ } })\`); + } + ev.factor = 5; + + // A new object (1) with a new shape (2) with a new atom (3) + function shape() { return { [ 'theobroma' + count++ ]: count }; } + shape.factor = 3; + `); + +let baseline = 0; +function countIncreasedByAtLeast(n) { + let oldBaseline = baseline; + + // Since a census counts only reachable objects, one might assume that calling + // GC here would have no effect on the census results. But GC also throws away + // JIT code and any objects it might be holding (template objects, say); + // takeCensus reaches those. Shake everything loose that we can, to make the + // census approximate reachability a bit more closely, and make our results a + // bit more predictable. + gc(g, 'shrinking'); + + baseline = dbg.memory.takeCensus({ breakdown: { by: 'count' } }).count; + return baseline >= oldBaseline + n; +} + +countIncreasedByAtLeast(0); + +g.add(100, g.obj); +assertEq(countIncreasedByAtLeast(g.obj.factor * 100), true); + +g.add(100, g.fun); +assertEq(countIncreasedByAtLeast(g.fun.factor * 100), true); + +g.add(100, g.str); +assertEq(countIncreasedByAtLeast(g.str.factor * 100), true); + +g.add(100, g.ev); +assertEq(countIncreasedByAtLeast(g.ev.factor * 100), true); + +g.add(100, g.shape); +assertEq(countIncreasedByAtLeast(g.shape.factor * 100), true); diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-09.js b/js/src/jit-test/tests/debug/Memory-takeCensus-09.js new file mode 100644 index 0000000000..ff4823ee7a --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-takeCensus-09.js @@ -0,0 +1,74 @@ +// Debugger.Memory.prototype.takeCensus: by: allocationStack breakdown + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.evaluate(` + var log = []; + function f() { log.push(allocationMarker()); } + function g() { f(); } + function h() { f(); } + `, + { fileName: "Rockford", lineNumber: 1000 }); + +// Create one allocationMarker with tracking turned off, +// so it will have no associated stack. +g.f(); + +dbg.memory.allocationSamplingProbability = 1; +dbg.memory.trackingAllocationSites = true; + +for ([f, n] of [[g.f, 20], [g.g, 10], [g.h, 5]]) + for (let i = 0; i < n; i++) + f(); // all allocations of allocationMarker occur with this line as the + // oldest stack frame. + +let census = dbg.memory.takeCensus({ breakdown: { by: 'objectClass', + then: { by: 'allocationStack', + then: { by: 'count', + label: 'haz stack' + }, + noStack: { by: 'count', + label: 'no haz stack' + } + } + } + }); + +let map = census.AllocationMarker; +assertEq(map instanceof Map, true); + +// Gather the stacks we are expecting to appear as keys, and +// check that there are no unexpected keys. +let stacks = { }; + +map.forEach((v, k) => { + if (k === 'noStack') { + // No need to save this key. + } else if (k.functionDisplayName === 'f' && + k.parent.functionDisplayName === null) { + stacks.f = k; + } else if (k.functionDisplayName === 'f' && + k.parent.functionDisplayName === 'g' && + k.parent.parent.functionDisplayName === null) { + stacks.fg = k; + } else if (k.functionDisplayName === 'f' && + k.parent.functionDisplayName === 'h' && + k.parent.parent.functionDisplayName === null) { + stacks.fh = k; + } else { + assertEq(true, false); + } +}); + +assertEq(map.get('noStack').label, 'no haz stack'); +assertEq(map.get('noStack').count, 1); + +assertEq(map.get(stacks.f).label, 'haz stack'); +assertEq(map.get(stacks.f).count, 20); + +assertEq(map.get(stacks.fg).label, 'haz stack'); +assertEq(map.get(stacks.fg).count, 10); + +assertEq(map.get(stacks.fh).label, 'haz stack'); +assertEq(map.get(stacks.fh).count, 5); diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-10.js b/js/src/jit-test/tests/debug/Memory-takeCensus-10.js new file mode 100644 index 0000000000..9a03009fee --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-takeCensus-10.js @@ -0,0 +1,60 @@ +// Check counts produced by takeCensus. +// +// Note that tracking allocation sites adds unique IDs to objects which +// increases their size, making it hard to test reported sizes exactly. + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +let sizeOfAM = byteSize(allocationMarker()); + +// Allocate a single allocation marker, and check that we can find it. +g.eval('var hold = allocationMarker();'); +let census = dbg.memory.takeCensus({ breakdown: { by: 'objectClass' } }); +assertEq(census.AllocationMarker.count, 1); +assertEq(census.AllocationMarker.bytes, sizeOfAM); + +g.evaluate(` + var objs = []; + function fnerd() { + objs.push(allocationMarker()); + for (let i = 0; i < 10; i++) + objs.push(allocationMarker()); + } + `, + { fileName: 'J. Edgar Hoover', lineNumber: 2000 }); + +dbg.memory.allocationSamplingProbability = 1; +dbg.memory.trackingAllocationSites = true; + +g.hold = null; +g.fnerd(); + +census = dbg.memory.takeCensus({ + breakdown: { by: 'objectClass', + then: { by: 'allocationStack' } + } +}); + +let seen = 0; +census.AllocationMarker.forEach((v, k) => { + assertEq(k.functionDisplayName, 'fnerd'); + assertEq(k.source, 'J. Edgar Hoover'); + switch (k.line) { + case 2003: + assertEq(v.count, 1); + assertEq(v.bytes >= sizeOfAM, true); + seen++; + break; + + case 2005: + assertEq(v.count, 10); + assertEq(v.bytes >= 10 * sizeOfAM, true); + seen++; + break; + + default: assertEq(true, false); + } +}); + +assertEq(seen, 2); diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-11.js b/js/src/jit-test/tests/debug/Memory-takeCensus-11.js new file mode 100644 index 0000000000..50388ef784 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-takeCensus-11.js @@ -0,0 +1,62 @@ +// |jit-test| skip-if: isLcovEnabled() + +// NOTE: Code coverage keeps top-level script alive even if normally it would be +// GC'd. Skip this test in that case. + +// Check byte counts produced by takeCensus. + +const g = newGlobal({newCompartment: true }); +g.evaluate("setJitCompilerOption('ion.warmup.trigger', 1000)", + { + forceFullParse: true, + }); + +const dbg = new Debugger(g); + +g.evaluate("function one() {}", + { + fileName: "one.js", + forceFullParse: true, + }); +g.evaluate(`function two1() {} + function two2() {}`, + { + fileName: "two.js", + forceFullParse: true, + }); +g.evaluate(`function three1() {} + function three2() {} + function three3() {}`, + { + fileName: "three.js", + forceFullParse: true, + }); + +const report = dbg.memory.takeCensus({ + breakdown: { + by: "coarseType", + scripts: { + by: "filename", + then: { by: "count", count: true, bytes: false }, + noFilename: { + by: "internalType", + then: { by: "count", count: true, bytes: false } + } + }, + + // Not really interested in these, but they're here for completeness. + objects: { by: "count", count: true, byte: false }, + strings: { by: "count", count: true, byte: false }, + other: { by: "count", count: true, byte: false }, + } +}); + +print(JSON.stringify(report, null, 4)); + +assertEq(report.scripts["one.js"].count, 1); +assertEq(report.scripts["two.js"].count, 2); +assertEq(report.scripts["three.js"].count, 3); + +const noFilename = report.scripts.noFilename; +assertEq(!!noFilename, true); +assertEq(typeof noFilename, "object"); diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-12.js b/js/src/jit-test/tests/debug/Memory-takeCensus-12.js new file mode 100644 index 0000000000..cb4f64ebc5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-takeCensus-12.js @@ -0,0 +1,61 @@ +// Sanity test that we can accumulate matching individuals in a bucket. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +var bucket = { by: "bucket" }; +var count = { by: "count", count: true, bytes: false }; + +var all = dbg.memory.takeCensus({ breakdown: bucket }); +var allCount = dbg.memory.takeCensus({ breakdown: count }).count; + +var coarse = dbg.memory.takeCensus({ + breakdown: { + by: "coarseType", + objects: bucket, + strings: bucket, + scripts: bucket, + other: bucket + } +}); +var coarseCount = dbg.memory.takeCensus({ + breakdown: { + by: "coarseType", + objects: count, + strings: count, + scripts: count, + other: count + } +}); + +assertEq(all.length > 0, true); +assertEq(all.length, allCount); + +assertEq(coarse.objects.length > 0, true); +assertEq(coarseCount.objects.count, coarse.objects.length); + +assertEq(coarse.strings.length > 0, true); +assertEq(coarseCount.strings.count, coarse.strings.length); + +assertEq(coarse.scripts.length > 0, true); +assertEq(coarseCount.scripts.count, coarse.scripts.length); + +assertEq(coarse.other.length > 0, true); +assertEq(coarseCount.other.count, coarse.other.length); + +assertEq(all.length >= coarse.objects.length, true); +assertEq(all.length >= coarse.strings.length, true); +assertEq(all.length >= coarse.scripts.length, true); +assertEq(all.length >= coarse.other.length, true); + +function assertIsIdentifier(id) { + assertEq(id, Math.floor(id)); + assertEq(id > 0, true); + assertEq(id <= Math.pow(2, 48), true); +} + +all.forEach(assertIsIdentifier); +coarse.objects.forEach(assertIsIdentifier); +coarse.strings.forEach(assertIsIdentifier); +coarse.scripts.forEach(assertIsIdentifier); +coarse.other.forEach(assertIsIdentifier); diff --git a/js/src/jit-test/tests/debug/Memory-trackingAllocationSites-01.js b/js/src/jit-test/tests/debug/Memory-trackingAllocationSites-01.js new file mode 100644 index 0000000000..46c0e1c34b --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-trackingAllocationSites-01.js @@ -0,0 +1,37 @@ +// Test that we can track allocation sites by setting +// Debugger.Memory.prototype.trackingAllocationSites to true and then get the +// allocation site via Debugger.Object.prototype.allocationSite. + +const root = newGlobal({newCompartment: true}); + +const dbg = new Debugger(); +const wrappedRoot = dbg.addDebuggee(root); + +assertEq(dbg.memory.trackingAllocationSites, false); +dbg.memory.trackingAllocationSites = true; +assertEq(dbg.memory.trackingAllocationSites, true); + +root.eval("(" + function immediate() { + this.tests = [ + { name: "object literal", object: ({}), line: Error().lineNumber }, + { name: "array literal", object: [], line: Error().lineNumber }, + { name: "regexp literal", object: /(two|2)\s*problems/, line: Error().lineNumber }, + { name: "new constructor", object: new function Ctor(){}, line: Error().lineNumber }, + { name: "new Object", object: new Object(), line: Error().lineNumber }, + { name: "new Array", object: new Array(), line: Error().lineNumber }, + { name: "new Date", object: new Date(), line: Error().lineNumber } + ]; +} + "());"); + +dbg.memory.trackingAllocationSites = false; +assertEq(dbg.memory.trackingAllocationSites, false); + +for (let { name, object, line } of root.tests) { + print("Entering test: " + name); + + let wrappedObject = wrappedRoot.makeDebuggeeValue(object); + let allocationSite = wrappedObject.allocationSite; + print("Allocation site: " + allocationSite); + + assertEq(allocationSite.line, line); +} diff --git a/js/src/jit-test/tests/debug/Memory-trackingAllocationSites-02.js b/js/src/jit-test/tests/debug/Memory-trackingAllocationSites-02.js new file mode 100644 index 0000000000..5fa91f002a --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-trackingAllocationSites-02.js @@ -0,0 +1,19 @@ +// Test that we don't get allocation sites when nobody has asked for them. + +const root = newGlobal({newCompartment: true}); + +const dbg = new Debugger(); +const wrappedRoot = dbg.addDebuggee(root); + +dbg.memory.trackingAllocationSites = true; +root.eval("this.obj = {};"); +dbg.memory.trackingAllocationSites = false; +root.eval("this.obj2 = {};"); + +let wrappedObj = wrappedRoot.makeDebuggeeValue(root.obj); +let allocationSite = wrappedObj.allocationSite; +assertEq(allocationSite != null && typeof allocationSite == "object", true); + +let wrappedObj2 = wrappedRoot.makeDebuggeeValue(root.obj2); +let allocationSite2 = wrappedObj2.allocationSite; +assertEq(allocationSite2, null); diff --git a/js/src/jit-test/tests/debug/Memory-trackingAllocationSites-03.js b/js/src/jit-test/tests/debug/Memory-trackingAllocationSites-03.js new file mode 100644 index 0000000000..62205b8249 --- /dev/null +++ b/js/src/jit-test/tests/debug/Memory-trackingAllocationSites-03.js @@ -0,0 +1,76 @@ +// Test that multiple Debuggers behave reasonably. + +load(libdir + "asserts.js"); + +let dbg1, dbg2, root1, root2; + +function isTrackingAllocations(global, dbgObj) { + const site = dbgObj.makeDebuggeeValue(global.eval("({})")).allocationSite; + if (site) { + assertEq(typeof site, "object"); + } + return !!site; +} + +function test(name, fn) { + print(); + print(name); + + // Reset state. + root1 = newGlobal({newCompartment: true}); + root2 = newGlobal({newCompartment: true}); + dbg1 = new Debugger; + dbg2 = new Debugger; + + // Run the test. + fn(); + + print(" OK"); +} + +test("Can track allocations even if a different debugger is already tracking " + + "them.", + () => { + let d1r1 = dbg1.addDebuggee(root1); + let d2r1 = dbg2.addDebuggee(root1); + dbg1.memory.trackingAllocationSites = true; + dbg2.memory.trackingAllocationSites = true; + assertEq(isTrackingAllocations(root1, d1r1), true); + assertEq(isTrackingAllocations(root1, d2r1), true); + }); + +test("Removing root1 as a debuggee from all debuggers should disable the " + + "allocation hook.", + () => { + dbg1.memory.trackingAllocationSites = true; + let d1r1 = dbg1.addDebuggee(root1); + dbg1.removeAllDebuggees(); + assertEq(isTrackingAllocations(root1, d1r1), false); + }); + +test("Adding a new debuggee to a debugger that is tracking allocations should " + + "enable the hook for the new debuggee.", + () => { + dbg1.memory.trackingAllocationSites = true; + let d1r1 = dbg1.addDebuggee(root1); + assertEq(isTrackingAllocations(root1, d1r1), true); + }); + +test("Setting trackingAllocationSites to true should throw if the debugger " + + "cannot install the allocation hooks for *every* debuggee.", + () => { + let d1r1 = dbg1.addDebuggee(root1); + let d1r2 = dbg1.addDebuggee(root2); + + // Can't install allocation hooks for root2 with this set. + root2.enableShellAllocationMetadataBuilder(); + + assertThrowsInstanceOf(() => dbg1.memory.trackingAllocationSites = true, + Error); + + // And after it throws, its trackingAllocationSites accessor should reflect that + // allocation site tracking is still disabled in that Debugger. + assertEq(dbg1.memory.trackingAllocationSites, false); + assertEq(isTrackingAllocations(root1, d1r1), false); + assertEq(isTrackingAllocations(root2, d1r2), false); + }); diff --git a/js/src/jit-test/tests/debug/Object-01.js b/js/src/jit-test/tests/debug/Object-01.js new file mode 100644 index 0000000000..fa28890c1c --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-01.js @@ -0,0 +1,17 @@ +// Debugger.Object basics + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.arguments[0], frame.callee); + assertEq(Object.getPrototypeOf(frame.arguments[0]), Debugger.Object.prototype); + assertEq(frame.arguments[0] instanceof Debugger.Object, true); + assertEq(frame.arguments[0] !== frame.arguments[1], true); + assertEq(Object.getPrototypeOf(frame.arguments[1]), Debugger.Object.prototype); + assertEq(frame.arguments[1] instanceof Debugger.Object, true); + hits++; +}; + +g.eval("var obj = {}; function f(a, b) { debugger; } f(f, obj);"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Object-02.js b/js/src/jit-test/tests/debug/Object-02.js new file mode 100644 index 0000000000..b5111cb8bd --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-02.js @@ -0,0 +1,13 @@ +// Debugger.Object referents can be transparent wrappers of objects in the debugger compartment. + +var g = newGlobal({newCompartment: true}); +g.f = function (a, b) { return a + "/" + b; }; +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var f = frame.eval("f").return; + assertEq(f.call(null, "a", "b").return, "a/b"); + hits++; +}; +g.eval("debugger;"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Object-apply-01.js b/js/src/jit-test/tests/debug/Object-apply-01.js new file mode 100644 index 0000000000..4abc32bfe1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-apply-01.js @@ -0,0 +1,59 @@ +// tests calling script functions via Debugger.Object.prototype.apply/call + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +g.eval("function f() { debugger; }"); +var dbg = new Debugger(g); + +var hits = 0; +function test(usingApply) { + dbg.onDebuggerStatement = function (frame) { + var fn = frame.arguments[0]; + var cv = usingApply ? fn.apply(null, [9, 16]) : fn.call(null, 9, 16); + assertEq(Object.keys(cv).join(","), "return"); + assertEq(Object.getPrototypeOf(cv), Object.prototype); + assertEq(cv.return, 25); + + cv = usingApply ? fn.apply(null, ["hello ", "world"]) : fn.call(null, "hello ", "world"); + assertEq(Object.keys(cv).join(","), "return"); + assertEq(cv.return, "hello world"); + + // Handle more or less arguments. + assertEq((usingApply ? fn.apply(null, [1, 5, 100]) : fn.call(null, 1, 5, 100)).return, 6); + assertEq((usingApply ? fn.apply(null, []) : fn.call(null)).return, NaN); + assertEq((usingApply ? fn.apply() : fn.call()).return, NaN); + + // Throw if a this-value or argument is an object but not a Debugger.Object. + assertThrowsInstanceOf(function () { usingApply ? fn.apply({}, []) : fn.call({}); }, + TypeError); + assertThrowsInstanceOf(function () { usingApply ? fn.apply(null, [{}]) : fn.call(null, {}); }, + TypeError); + hits++; + }; + g.eval("f(function (a, b) { return a + b; });"); + + // The callee receives the right arguments even if more arguments are provided + // than the callee's .length. + dbg.onDebuggerStatement = function (frame) { + assertEq((usingApply ? frame.arguments[0].apply(null, ['one', 'two']) + : frame.arguments[0].call(null, 'one', 'two')).return, + 2); + hits++; + }; + g.eval("f(function () { return arguments.length; });"); + + // Exceptions are reported as {throw,stack} completion values. + dbg.onDebuggerStatement = function (frame) { + var lose = frame.arguments[0]; + var cv = usingApply ? lose.apply(null, []) : lose.call(null); + assertEq(Object.keys(cv).join(","), "throw,stack"); + assertEq(cv.throw, frame.callee); + hits++; + }; + g.eval("f(function lose() { throw f; });"); +} + +test(true); +test(false); +assertEq(hits, 6); diff --git a/js/src/jit-test/tests/debug/Object-apply-02.js b/js/src/jit-test/tests/debug/Object-apply-02.js new file mode 100644 index 0000000000..18ce4468a2 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-apply-02.js @@ -0,0 +1,58 @@ +// tests calling native functions via Debugger.Object.prototype.apply/call + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +g.eval("function f() { debugger; }"); +var dbg = new Debugger(g); + +function test(usingApply) { + dbg.onDebuggerStatement = function (frame) { + var max = frame.arguments[0]; + var cv = usingApply ? max.apply(null, [9, 16]) : max.call(null, 9, 16); + assertEq(cv.return, 16); + + cv = usingApply ? max.apply() : max.call(); + assertEq(cv.return, -1/0); + + cv = usingApply ? max.apply(null, [2, 5, 3, 8, 1, 9, 4, 6, 7]) + : max.call(null, 2, 5, 3, 8, 1, 9, 4, 6, 7); + assertEq(cv.return, 9); + + // second argument to apply must be an array + assertThrowsInstanceOf(function () { max.apply(null, 12); }, TypeError); + }; + g.eval("f(Math.max);"); + + dbg.onDebuggerStatement = function (frame) { + var push = frame.arguments[0]; + var arr = frame.arguments[1]; + var cv; + + cv = usingApply ? push.apply(arr, [0, 1, 2]) : push.call(arr, 0, 1, 2); + assertEq(cv.return, 3); + + cv = usingApply ? push.apply(arr, [arr]) : push.call(arr, arr); + assertEq(cv.return, 4); + + cv = usingApply ? push.apply(arr) : push.call(arr); + assertEq(cv.return, 4); + + // You can apply Array.prototype.push to a string; it does ToObject on + // it. But as the length property on String objects is non-writable, + // attempting to increase the length will throw a TypeError. + cv = usingApply + ? push.apply("hello", ["world"]) + : push.call("hello", "world"); + assertEq("throw" in cv, true); + var ex = cv.throw; + assertEq(frame.evalWithBindings("ex instanceof TypeError", { ex: ex }).return, true); + }; + g.eval("var a = []; f(Array.prototype.push, a);"); + assertEq(g.a.length, 4); + assertEq(g.a.slice(0, 3).join(","), "0,1,2"); + assertEq(g.a[3], g.a); +} + +test(true); +test(false); diff --git a/js/src/jit-test/tests/debug/Object-apply-03.js b/js/src/jit-test/tests/debug/Object-apply-03.js new file mode 100644 index 0000000000..f23cc46518 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-apply-03.js @@ -0,0 +1,21 @@ +// reentering the debugger several times via onDebuggerStatement and apply/call on a single stack + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); + +function test(usingApply) { + dbg.onDebuggerStatement = function (frame) { + var n = frame.arguments[0]; + if (n > 1) { + var result = usingApply ? frame.callee.apply(null, [n - 1]) + : frame.callee.call(null, n - 1); + result.return *= n; + return result; + } + }; + g.eval("function fac(n) { debugger; return 1; }"); + assertEq(g.fac(5), 5 * 4 * 3 * 2 * 1); +} + +test(true); +test(false); diff --git a/js/src/jit-test/tests/debug/Object-apply-04.js b/js/src/jit-test/tests/debug/Object-apply-04.js new file mode 100644 index 0000000000..04115344b2 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-apply-04.js @@ -0,0 +1,15 @@ +// Debugger.Object.prototype.apply/call works with function proxies + +var g = newGlobal({newCompartment: true}); +g.eval("function f() { debugger; }"); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var proxy = frame.arguments[0]; + assertEq(proxy.name, undefined); + assertEq(proxy.apply(null, [33]).return, 34); + assertEq(proxy.call(null, 33).return, 34); + hits++; +}; +g.eval("f(new Proxy(function (arg) { return arg + 1; }, {}));"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Object-asEnvironment-01.js b/js/src/jit-test/tests/debug/Object-asEnvironment-01.js new file mode 100644 index 0000000000..39bfe4dabf --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-asEnvironment-01.js @@ -0,0 +1,15 @@ +// Tests D.O.asEnvironment() returning the global lexical scope. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +g.evaluate(` + var x = 42; + let y = "foo" +`); + +var globalLexical = gw.asEnvironment(); +assertEq(globalLexical.names().length, 1); +assertEq(globalLexical.getVariable("y"), "foo"); +assertEq(globalLexical.parent.getVariable("x"), 42); diff --git a/js/src/jit-test/tests/debug/Object-boundTargetFunction-01.js b/js/src/jit-test/tests/debug/Object-boundTargetFunction-01.js new file mode 100644 index 0000000000..f87a0abc13 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-boundTargetFunction-01.js @@ -0,0 +1,26 @@ +// Smoke tests for bound function things. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var arrw = gw.executeInGlobal("var arr = []; arr;").return; +var pushw = gw.executeInGlobal("var push = arr.push.bind(arr); push;").return; +assertEq(pushw.isBoundFunction, true); +assertEq(pushw.boundThis, arrw); +assertEq(pushw.boundArguments.length, 0); + +var arr2 = gw.executeInGlobal("var arr2 = []; arr2").return; +assertEq(pushw.call(arr2, "tuesday").return, 1); +g.eval("assertEq(arr.length, 1);"); +g.eval("assertEq(arr[0], 'tuesday');"); +g.eval("assertEq(arr2.length, 0);"); + +g.eval("push = arr.push.bind(arr, 1, 'seven', {x: 'q'});"); +pushw = gw.getOwnPropertyDescriptor("push").value; +assertEq(pushw.isBoundFunction, true); +var args = pushw.boundArguments; +assertEq(args.length, 3); +assertEq(args[0], 1); +assertEq(args[1], 'seven'); +assertEq(args[2] instanceof Debugger.Object, true); +assertEq(args[2].getOwnPropertyDescriptor("x").value, "q"); diff --git a/js/src/jit-test/tests/debug/Object-boundTargetFunction-02.js b/js/src/jit-test/tests/debug/Object-boundTargetFunction-02.js new file mode 100644 index 0000000000..e86d010efd --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-boundTargetFunction-02.js @@ -0,0 +1,25 @@ +// Test that bound function accessors work on: +// - an ordinary non-bound function; +// - a native function; +// - and an object that isn't a function at all. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var fw = gw.executeInGlobal("function f() {}; f").return; +assertEq(fw.isBoundFunction, false); +assertEq(fw.boundThis, undefined); +assertEq(fw.boundArguments, undefined); +assertEq(fw.boundTargetFunction, undefined); + +var nw = gw.executeInGlobal("var n = Math.max; n").return; +assertEq(nw.isBoundFunction, false); +assertEq(nw.boundThis, undefined); +assertEq(fw.boundArguments, undefined); +assertEq(nw.boundTargetFunction, undefined); + +var ow = gw.executeInGlobal("var o = {}; o").return; +assertEq(ow.isBoundFunction, false); +assertEq(ow.boundThis, undefined); +assertEq(fw.boundArguments, undefined); +assertEq(ow.boundTargetFunction, undefined); diff --git a/js/src/jit-test/tests/debug/Object-boundTargetFunction-03.js b/js/src/jit-test/tests/debug/Object-boundTargetFunction-03.js new file mode 100644 index 0000000000..2fb45f3822 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-boundTargetFunction-03.js @@ -0,0 +1,20 @@ +// Test that inspecting a bound function that was bound again does the right +// thing. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +var expr = "function f() { return this; }; var bf = f.bind(1, 2).bind(3, 4); bf"; +var bfw = gw.executeInGlobal(expr).return; + +assertEq(bfw.isBoundFunction, true); +assertEq(bfw.boundThis, 3); +var args = bfw.boundArguments; +assertEq(args.length, 1); +assertEq(args[0], 4); + +assertEq(bfw.boundTargetFunction.isBoundFunction, true); +assertEq(bfw.boundTargetFunction.boundThis, 1); +args = bfw.boundTargetFunction.boundArguments; +assertEq(args.length, 1); +assertEq(args[0], 2); diff --git a/js/src/jit-test/tests/debug/Object-callable.js b/js/src/jit-test/tests/debug/Object-callable.js new file mode 100644 index 0000000000..31130b0175 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-callable.js @@ -0,0 +1,18 @@ +// Test Debugger.Object.prototype.callable. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.arguments[0].callable, frame.arguments[1]); + hits++; +}; + +g.eval("function f(obj, iscallable) { debugger; }"); + +g.eval("f({}, false);"); +g.eval("f(Function.prototype, true);"); +g.eval("f(f, true);"); +g.eval("f(new Proxy({}, {}), false);"); +g.eval("f(new Proxy(f, {}), true);"); +assertEq(hits, 5); diff --git a/js/src/jit-test/tests/debug/Object-class.js b/js/src/jit-test/tests/debug/Object-class.js new file mode 100644 index 0000000000..ee64998190 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-class.js @@ -0,0 +1,26 @@ +// Basic tests for Debugger.Object.prototype.class. +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +g.eval('function f() { debugger; }'); + +dbg.onDebuggerStatement = function (frame) { + var arr = frame.arguments; + assertEq(arr[0].class, "Object"); + assertEq(arr[1].class, "Array"); + assertEq(arr[2].class, "Function"); + assertEq(arr[3].class, "Date"); + assertEq(arr[4].class, "Object"); + assertEq(arr[5].class, "Function"); + assertEq(arr[6].class, "Object"); + hits++; +}; +g.f(Object.prototype, [], eval, new Date, + new Proxy({}, {}), new Proxy(eval, {}), new Proxy(new Date, {})); +assertEq(hits, 1); + +// Debugger.Object.prototype.class should see through cross-compartment +// wrappers. +g.eval('f(Object.prototype, [], eval, new Date,\ + new Proxy({}, {}), new Proxy(f, {}), new Proxy(new Date, {}));'); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Object-createSource.js b/js/src/jit-test/tests/debug/Object-createSource.js new file mode 100644 index 0000000000..53f1c28c1b --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-createSource.js @@ -0,0 +1,20 @@ +// createSource creates new sources. + +let g = newGlobal({ newCompartment: true }); +let dbg = new Debugger(g); +let gdbg = dbg.addDebuggee(g); + +let source = gdbg.createSource({ + text: "x = 3", + url: "foo.js", + startLine: 3, + startColumn: 43, + sourceMapURL: "sourceMapURL", + isScriptElement: true, +}); +assertEq(source.text, "x = 3"); +assertEq(source.url, "foo.js"); +assertEq(source.startLine, 3); +assertEq(source.startColumn, 43); +assertEq(source.sourceMapURL, "sourceMapURL"); +assertEq(source.introductionType, "inlineScript"); diff --git a/js/src/jit-test/tests/debug/Object-defineProperties-01.js b/js/src/jit-test/tests/debug/Object-defineProperties-01.js new file mode 100644 index 0000000000..36bf55c7a7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperties-01.js @@ -0,0 +1,46 @@ +// Debug.Object.prototype.defineProperties. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +var descProps = ['configurable', 'enumerable', 'writable', 'value', 'get', 'set']; +function test(objexpr, descs) { + g.eval("obj = (" + objexpr + ");"); + var gobjw = gw.getOwnPropertyDescriptor("obj").value; + gobjw.defineProperties(descs); + + var indirectEval = eval; + var obj = indirectEval("(" + objexpr + ");"); + Object.defineProperties(obj, descs); + + var ids = Object.keys(descs); + for (var i = 0; i < ids.length; i++) { + var actual = gobjw.getOwnPropertyDescriptor(ids[i]); + var expected = Object.getOwnPropertyDescriptor(obj, ids[i]); + assertEq(Object.getPrototypeOf(actual), Object.prototype); + assertEq(actual.configurable, expected.configurable); + assertEq(actual.enumerable, expected.enumerable); + for (var j = 0; j < descProps; j++) { + var prop = descProps[j]; + assertEq(prop in actual, prop in expected); + assertEq(actual[prop], expected[prop]); + } + } +} + +test("{}", {}); +test("/abc/", {}); + +g.eval("var aglobal = newGlobal('same-compartment');"); +var aglobal = newGlobal('same-compartment'); +test("aglobal", {}); + +var adescs = {a: {enumerable: true, writable: true, value: 0}}; +test("{}", adescs); +test("{a: 1}", adescs); + +var arrdescs = [{value: 'a'}, {value: 'b'}, , {value: 'd'}]; +test("{}", arrdescs); +test("[]", arrdescs); +test("[0, 1, 2, 3]", arrdescs); diff --git a/js/src/jit-test/tests/debug/Object-defineProperties-02.js b/js/src/jit-test/tests/debug/Object-defineProperties-02.js new file mode 100644 index 0000000000..1383781004 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperties-02.js @@ -0,0 +1,33 @@ +// Exceptions thrown by obj.defineProperties are copied into the debugger compartment. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +function test(objexpr, descs) { + var exca, excb; + + g.eval("obj = (" + objexpr + ");"); + var gobjw = gw.getOwnPropertyDescriptor("obj").value; + try { + gobjw.defineProperties(descs); + } catch (exc) { + exca = exc; + } + + var indirectEval = eval; + var obj = indirectEval("(" + objexpr + ");"); + try { + Object.defineProperties(obj, descs); + } catch (exc) { + excb = exc; + } + + assertEq(Object.getPrototypeOf(exca), Object.getPrototypeOf(excb)); + assertEq(exca.message, excb.message); + assertEq(typeof exca.fileName, "string"); + assertEq(typeof exca.stack, "string"); +} + +test("Object.create(null, {p: {value: 1}})", {p: {value: 2}}); +test("({})", {x: {get: 'bad'}}); diff --git a/js/src/jit-test/tests/debug/Object-defineProperties-03.js b/js/src/jit-test/tests/debug/Object-defineProperties-03.js new file mode 100644 index 0000000000..ad5b5c0f3f --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperties-03.js @@ -0,0 +1,20 @@ +// obj.defineProperties can define accessor properties. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +g.value = undefined; +g.eval("function gf() { return 12; }\n" + + "function sf(v) { value = v; }\n"); +var gfw = gw.getOwnPropertyDescriptor("gf").value; +var sfw = gw.getOwnPropertyDescriptor("sf").value; +gw.defineProperties({x: {configurable: true, get: gfw, set: sfw}}); +assertEq(g.x, 12); +g.x = 'ok'; +assertEq(g.value, 'ok'); + +var desc = g.Object.getOwnPropertyDescriptor(g, "x"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, false); +assertEq(desc.get, g.gf); +assertEq(desc.set, g.sf); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-01.js b/js/src/jit-test/tests/debug/Object-defineProperty-01.js new file mode 100644 index 0000000000..91330694b9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-01.js @@ -0,0 +1,12 @@ +// obj.defineProperty can define simple data properties. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gobj = dbg.addDebuggee(g); +gobj.defineProperty("x", {configurable: true, enumerable: true, writable: true, value: 'ok'}); +assertEq(g.x, 'ok'); + +var desc = g.Object.getOwnPropertyDescriptor(g, "x"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, true); +assertEq(desc.writable, true); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-02.js b/js/src/jit-test/tests/debug/Object-defineProperty-02.js new file mode 100644 index 0000000000..e72fd7f2bb --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-02.js @@ -0,0 +1,10 @@ +// obj.defineProperty can define a data property with object value. + +var g = newGlobal({newCompartment: true}); +g.eval("var a = {};"); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var desc = gw.getOwnPropertyDescriptor("a"); +assertEq(desc.value instanceof Debugger.Object, true); +gw.defineProperty("b", desc); +assertEq(g.a, g.b); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-03.js b/js/src/jit-test/tests/debug/Object-defineProperty-03.js new file mode 100644 index 0000000000..04a2aa8174 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-03.js @@ -0,0 +1,21 @@ +// defineProperty can set array elements + +var g = newGlobal({newCompartment: true}); +g.a = g.Array(0, 1, 2); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var aw = gw.getOwnPropertyDescriptor("a").value; + +aw.defineProperty(0, {value: 'ok0'}); // by number +assertEq(g.a[0], 'ok0'); +var desc = g.Object.getOwnPropertyDescriptor(g.a, "0"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, true); +assertEq(desc.writable, true); + +aw.defineProperty("1", {value: 'ok1'}); // by string +assertEq(g.a[1], 'ok1'); +desc = g.Object.getOwnPropertyDescriptor(g.a, "1"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, true); +assertEq(desc.writable, true); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-04.js b/js/src/jit-test/tests/debug/Object-defineProperty-04.js new file mode 100644 index 0000000000..023a0cbf83 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-04.js @@ -0,0 +1,9 @@ +// defineProperty can add array elements, bumping length + +var g = newGlobal({newCompartment: true}); +g.a = g.Array(0, 1, 2); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var aw = gw.getOwnPropertyDescriptor("a").value; +aw.defineProperty(3, {configurable: true, enumerable: true, writable: true, value: 3}); +assertEq(g.a.length, 4); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-05.js b/js/src/jit-test/tests/debug/Object-defineProperty-05.js new file mode 100644 index 0000000000..be494faaf5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-05.js @@ -0,0 +1,20 @@ +// defineProperty can define accessor properties. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +g.value = undefined; +g.eval("function gf() { return 12; }\n" + + "function sf(v) { value = v; }\n"); +var gfw = gw.getOwnPropertyDescriptor("gf").value; +var sfw = gw.getOwnPropertyDescriptor("sf").value; +gw.defineProperty("x", {configurable: true, get: gfw, set: sfw}); +assertEq(g.x, 12); +g.x = 'ok'; +assertEq(g.value, 'ok'); + +var desc = g.Object.getOwnPropertyDescriptor(g, "x"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, false); +assertEq(desc.get, g.gf); +assertEq(desc.set, g.sf); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-06.js b/js/src/jit-test/tests/debug/Object-defineProperty-06.js new file mode 100644 index 0000000000..0739746bd7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-06.js @@ -0,0 +1,21 @@ +// obj.defineProperty with vague descriptors works like Object.defineProperty + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +gw.defineProperty("p", {configurable: true, enumerable: true}); +assertEq(g.p, undefined); +var desc = g.Object.getOwnPropertyDescriptor(g, "p"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, true); +assertEq(desc.value, undefined); +assertEq(desc.writable, false); + +gw.defineProperty("q", {}); +assertEq(g.q, undefined); +var desc = g.Object.getOwnPropertyDescriptor(g, "q"); +assertEq(desc.configurable, false); +assertEq(desc.enumerable, false); +assertEq(desc.value, undefined); +assertEq(desc.writable, false); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-07.js b/js/src/jit-test/tests/debug/Object-defineProperty-07.js new file mode 100644 index 0000000000..8565c47357 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-07.js @@ -0,0 +1,10 @@ +// obj.defineProperty throws if a value, getter, or setter is not a debuggee value. + +load(libdir + "asserts.js"); +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gobj = dbg.addDebuggee(g); +assertThrowsInstanceOf(function () { gobj.defineProperty('x', {value: {}}); }, TypeError); +assertThrowsInstanceOf(function () { gobj.defineProperty('x', {get: Number}); }, TypeError); +assertThrowsInstanceOf(function () { gobj.defineProperty('x', {get: gobj, set: Number}) }, + TypeError); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-08.js b/js/src/jit-test/tests/debug/Object-defineProperty-08.js new file mode 100644 index 0000000000..fb694719e3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-08.js @@ -0,0 +1,10 @@ +// obj.defineProperty throws if a value, getter, or setter is in a different compartment than obj + +load(libdir + "asserts.js"); +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var g1w = dbg.addDebuggee(g1); +var g2w = dbg.addDebuggee(g2); +assertThrowsInstanceOf(function () { g1w.defineProperty('x', {value: g2w}); }, TypeError); +assertThrowsInstanceOf(function () { g1w.defineProperty('x', {get: g1w, set: g2w}); }, TypeError); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-09.js b/js/src/jit-test/tests/debug/Object-defineProperty-09.js new file mode 100644 index 0000000000..dc69e4fde1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-09.js @@ -0,0 +1,24 @@ +// defineProperty can't re-define non-configurable properties. +// Also: when defineProperty throws, the exception is native to the debugger +// compartment, not a wrapper. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +gw.defineProperty("p", {value: 1}); +g.p = 4; +assertEq(g.p, 1); + +var threw; +try { + gw.defineProperty("p", {value: 2}); + threw = false; +} catch (exc) { + threw = true; + assertEq(exc instanceof TypeError, true); + assertEq(typeof exc.message, "string"); + assertEq(typeof exc.stack, "string"); +} +assertEq(threw, true); + +assertEq(g.p, 1); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-10.js b/js/src/jit-test/tests/debug/Object-defineProperty-10.js new file mode 100644 index 0000000000..3e4f9930c5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-10.js @@ -0,0 +1,10 @@ +// defineProperty can make a non-configurable writable property non-writable + +load(libdir + "asserts.js"); +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +gw.defineProperty("p", {writable: true, value: 1}); +gw.defineProperty("p", {writable: false}); +g.p = 4; +assertEq(g.p, 1); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-11.js b/js/src/jit-test/tests/debug/Object-defineProperty-11.js new file mode 100644 index 0000000000..03ed7d651e --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-11.js @@ -0,0 +1,16 @@ +// obj.defineProperty works when obj's referent is a wrapper. + +var x = {}; +var g = newGlobal({newCompartment: true}); +g.x = x; +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var xw = gw.getOwnPropertyDescriptor("x").value; +xw.defineProperty("p", {configurable: true, enumerable: true, writable: true, value: gw}); +assertEq(x.p, g); + +var desc = Object.getOwnPropertyDescriptor(x, "p"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, true); +assertEq(desc.writable, true); +assertEq(desc.value, g); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-12.js b/js/src/jit-test/tests/debug/Object-defineProperty-12.js new file mode 100644 index 0000000000..821617711d --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-12.js @@ -0,0 +1,18 @@ +// obj.defineProperty redefining an existing property leaves unspecified attributes unchanged. + +var g = newGlobal({newCompartment: true}); +g.p = 1; +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +gw.defineProperty("p", {value: 2}); +assertEq(g.p, 2); + +var desc = Object.getOwnPropertyDescriptor(g, "p"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, true); +assertEq(desc.writable, true); +assertEq(desc.value, 2); + +g.p = 3; +assertEq(g.p, 3); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-13.js b/js/src/jit-test/tests/debug/Object-defineProperty-13.js new file mode 100644 index 0000000000..3bfd554c14 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-13.js @@ -0,0 +1,16 @@ +// defineProperty throws if a getter or setter is neither undefined nor callable. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +for (let v of [null, false, 'bad', 0, 2.76, {}]) { + assertThrowsInstanceOf(function () { + gw.defineProperty("p", {configurable: true, get: v}); + }, TypeError); + assertThrowsInstanceOf(function () { + gw.defineProperty("p", {configurable: true, set: v}); + }, TypeError); +} diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-14.js b/js/src/jit-test/tests/debug/Object-defineProperty-14.js new file mode 100644 index 0000000000..5a6deda121 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-14.js @@ -0,0 +1,15 @@ +// defineProperty accepts undefined for desc.get/set. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +gw.defineProperty("p", {get: undefined, set: undefined}); + +var desc = g.eval("Object.getOwnPropertyDescriptor(this, 'p')"); +assertEq("get" in desc, true); +assertEq("set" in desc, true); +assertEq(desc.get, undefined); +assertEq(desc.set, undefined); diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-non-primitive-key.js b/js/src/jit-test/tests/debug/Object-defineProperty-non-primitive-key.js new file mode 100644 index 0000000000..c3c503968f --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-non-primitive-key.js @@ -0,0 +1,41 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var gw = dbg.addDebuggee(g); + +g.eval(` + var obj = { + p: 0, + [Symbol.iterator]: 0, + }; +`); + +// Return |key| as an object. +function toObject(key) { + return { + [Symbol.toPrimitive]() { + return key; + } + }; +} + +let obj = gw.getProperty("obj").return; + +for (let key of obj.getOwnPropertyNames()) { + let keyObject = toObject(key); + + obj.defineProperty(key, {value: 1}); + assertEq(g.obj[key], 1); + + obj.defineProperty(keyObject, {value: 1}); + assertEq(g.obj[key], 1); +} + +for (let key of obj.getOwnPropertySymbols()) { + let keyObject = toObject(key); + + obj.defineProperty(key, {value: 1}); + assertEq(g.obj[key], 1); + + obj.defineProperty(keyObject, {value: 1}); + assertEq(g.obj[key], 1); +} diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-surfaces-01.js b/js/src/jit-test/tests/debug/Object-defineProperty-surfaces-01.js new file mode 100644 index 0000000000..8cf9d85200 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-surfaces-01.js @@ -0,0 +1,8 @@ +// Debugger.Object.prototype.defineProperty with too few arguments throws. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +assertThrowsInstanceOf(function () { gw.defineProperty("x"); }, TypeError); diff --git a/js/src/jit-test/tests/debug/Object-deleteProperty-01.js b/js/src/jit-test/tests/debug/Object-deleteProperty-01.js new file mode 100644 index 0000000000..65a465b75e --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-deleteProperty-01.js @@ -0,0 +1,17 @@ +// Basic deleteProperty tests. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +assertEq(gw.deleteProperty("no such property"), true); + +g.Object.defineProperty(g, "p", {configurable: true, value: 0}); +assertEq(gw.deleteProperty("p"), true); + +g[0] = 0; +assertEq(gw.deleteProperty(0), true); +assertEq("0" in g, false); + +assertEq(gw.deleteProperty(), false); // can't delete g.undefined +assertEq(g.undefined, undefined); diff --git a/js/src/jit-test/tests/debug/Object-deleteProperty-error-01.js b/js/src/jit-test/tests/debug/Object-deleteProperty-error-01.js new file mode 100644 index 0000000000..38827c908d --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-deleteProperty-error-01.js @@ -0,0 +1,16 @@ +// Don't crash when a scripted proxy handler throws Error.prototype. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + try { + frame.arguments[0].deleteProperty("x"); + } catch (exc) { + return; + } + throw new Error("deleteProperty should throw"); +}; + +g.eval("function h(obj) { debugger; }"); +g.eval("h(new Proxy({}, { deleteProperty() { throw Error.prototype; }}));"); + diff --git a/js/src/jit-test/tests/debug/Object-deleteProperty-error-02.js b/js/src/jit-test/tests/debug/Object-deleteProperty-error-02.js new file mode 100644 index 0000000000..e685b93f46 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-deleteProperty-error-02.js @@ -0,0 +1,19 @@ +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + try { + frame.arguments[0].deleteProperty("x"); + } catch (exc) { + assertEq(exc instanceof Debugger.DebuggeeWouldRun, true); + return; + } + throw new Error("deleteProperty should throw"); +}; + +g.evaluate("function h(obj) { debugger; } \n" + + "h(new Proxy({}, \n" + + " { deleteProperty: function () { \n" + + " var e = new ReferenceError('diaf', 'fail'); \n" + + " throw e; \n" + + " } \n" + + " }));"); diff --git a/js/src/jit-test/tests/debug/Object-deleteProperty-non-primitive-key.js b/js/src/jit-test/tests/debug/Object-deleteProperty-non-primitive-key.js new file mode 100644 index 0000000000..83a10b89eb --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-deleteProperty-non-primitive-key.js @@ -0,0 +1,49 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var gw = dbg.addDebuggee(g); + +g.eval(` + var obj = { + p: 0, + [Symbol.iterator]: 0, + }; +`); + +// Return |key| as an object. +function toObject(key) { + return { + [Symbol.toPrimitive]() { + return key; + } + }; +} + +let obj = gw.getProperty("obj").return; + +for (let key of obj.getOwnPropertyNames()) { + let keyObject = toObject(key); + + g.obj[key] = 1; + assertEq(g.obj[key], 1); + assertEq(obj.deleteProperty(key), true); + assertEq(g.obj[key], undefined); + + g.obj[key] = 1; + assertEq(g.obj[key], 1); + assertEq(obj.deleteProperty(keyObject), true); + assertEq(g.obj[key], undefined); +} + +for (let key of obj.getOwnPropertySymbols()) { + let keyObject = toObject(key); + + g.obj[key] = 1; + assertEq(g.obj[key], 1); + assertEq(obj.deleteProperty(key), true); + assertEq(g.obj[key], undefined); + + g.obj[key] = 1; + assertEq(g.obj[key], 1); + assertEq(obj.deleteProperty(keyObject), true); + assertEq(g.obj[key], undefined); +} diff --git a/js/src/jit-test/tests/debug/Object-displayName-01.js b/js/src/jit-test/tests/debug/Object-displayName-01.js new file mode 100644 index 0000000000..2a316f9d38 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-displayName-01.js @@ -0,0 +1,21 @@ +// Debugger.Object.prototype.displayName + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var name; +dbg.onDebuggerStatement = function (frame) { name = frame.callee.displayName; }; + +g.eval("(function f() { debugger; })();"); +assertEq(name, "f"); +g.eval("(function () { debugger; })();"); +assertEq(name, undefined); +g.eval("Function('debugger;')();"); +assertEq(name, "anonymous"); +g.eval("var f = function() { debugger; }; f()"); +assertEq(name, "f"); +g.eval("var a = {}; a.f = function() { debugger; }; a.f()"); +assertEq(name, "a.f"); +g.eval("(async function grondo() { debugger; })();"); +assertEq(name, "grondo"); +g.eval("(async function* estux() { debugger; })().next();"); +assertEq(name, "estux"); diff --git a/js/src/jit-test/tests/debug/Object-displayName-02.js b/js/src/jit-test/tests/debug/Object-displayName-02.js new file mode 100644 index 0000000000..3e5cfe3df9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-displayName-02.js @@ -0,0 +1,16 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gDO = dbg.addDebuggee(g); + +function check(expr, expected) { + let completion = gDO.executeInGlobal(expr); + assertEq(!completion.throw, true); + + let func = completion.return; + assertEq(func.displayName, expected); +} + +check("(function foo(){})", "foo"); +check("Map.prototype.set", "set"); +check("Object.getOwnPropertyDescriptor(Map.prototype, 'size').get", "get size"); +check("Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get", "get flags"); diff --git a/js/src/jit-test/tests/debug/Object-environment-01.js b/js/src/jit-test/tests/debug/Object-environment-01.js new file mode 100644 index 0000000000..ea74761708 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-environment-01.js @@ -0,0 +1,17 @@ +// obj.environment is undefined when the referent is not a JS function. + +var g = newGlobal({newCompartment: true}) +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +assertEq(gw.environment, undefined); + +g.eval("var r = /x/;"); +var rw = gw.getOwnPropertyDescriptor("r").value; +assertEq(rw.class, "RegExp"); +assertEq(rw.environment, undefined); + +// Native function. +var fw = gw.getOwnPropertyDescriptor("parseInt").value; +assertEq(fw.class, "Function"); +assertEq(fw.environment, undefined); + diff --git a/js/src/jit-test/tests/debug/Object-environment-02.js b/js/src/jit-test/tests/debug/Object-environment-02.js new file mode 100644 index 0000000000..d499e1ca2c --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-environment-02.js @@ -0,0 +1,22 @@ +// The .environment of a function Debugger.Object is an Environment object. + +var g = newGlobal({newCompartment: true}) +var dbg = new Debugger; +var gDO = dbg.addDebuggee(g); + +function check(expr) { + print("checking " + JSON.stringify(expr)); + let completion = gDO.executeInGlobal(expr); + if (completion.throw) + throw completion.throw.unsafeDereference(); + assertEq(completion.return.environment instanceof Debugger.Environment, true); +} + +g.eval('function j(a) { }'); + +check('j'); +check('(() => { })'); +check('(function f() { })'); +check('(function* g() { })'); +check('(async function m() { })'); +check('(async function* n() { })'); diff --git a/js/src/jit-test/tests/debug/Object-errorLineNumber-errorColumnNumber.js b/js/src/jit-test/tests/debug/Object-errorLineNumber-errorColumnNumber.js new file mode 100644 index 0000000000..54bf562708 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-errorLineNumber-errorColumnNumber.js @@ -0,0 +1,59 @@ +// Debugger.Object.prototype.{errorLineNumber,errorColumnNumber} return the +// line number and column number associated with some error object. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +var syntaxError = gw.executeInGlobal("\nlet a, a;").throw; +assertEq(syntaxError.errorLineNumber, 2); +assertEq(syntaxError.errorColumnNumber, 8); + +var typeError = gw.executeInGlobal("\n1 + f();").throw; +assertEq(typeError.errorLineNumber, 2); +assertEq(typeError.errorColumnNumber, 5); + +var typeError2 = gw.executeInGlobal("\nconsole.log(1, f());").throw; +assertEq(typeError2.errorLineNumber, 2); +assertEq(typeError2.errorColumnNumber, 16); + +// Custom errors have no line/column numbers . +var customError = gw.executeInGlobal("\nthrow 1;").throw; +assertEq(customError.errorLineNumber, undefined); +assertEq(customError.errorColumnNumber, undefined); + +customError = gw.executeInGlobal("\nthrow { errorLineNumber: 10, errorColumnNumber: 20 };").throw; +assertEq(customError.errorLineNumber, undefined); +assertEq(customError.errorColumnNumber, undefined); + +customError = gw.executeInGlobal("\nthrow { lineNumber: 10, columnNumber: 20 };").throw; +assertEq(customError.errorLineNumber, undefined); +assertEq(customError.errorColumnNumber, undefined); + +// Ensure that the method works across globals. +g.eval(`var g = newGlobal({newCompartment: true}); + g.eval('var err; \\n' + + 'try {\\n' + + ' f();\\n' + + '} catch (e) {\\n' + + ' err = e;\\n' + + '}'); + var err2 = g.err;`); +var otherGlobalError = gw.executeInGlobal("throw err2").throw; +assertEq(otherGlobalError.errorLineNumber, 3); +assertEq(otherGlobalError.errorColumnNumber, 3); + +// Ensure that non-error objects return undefined. +const Args = [ + "1", + "'blah'", + "({})", + "[]", + "() => 1" +] + +for (let arg of Args) { + let nonError = gw.executeInGlobal(`${arg}`).return; + assertEq(nonError.errorLineNumber, undefined); + assertEq(nonError.errorColumnNumber, undefined); +} diff --git a/js/src/jit-test/tests/debug/Object-executeInGlobal-01.js b/js/src/jit-test/tests/debug/Object-executeInGlobal-01.js new file mode 100644 index 0000000000..af2fa3600f --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-executeInGlobal-01.js @@ -0,0 +1,13 @@ +// Debugger.Object.prototype.executeInGlobal basics + +var g = newGlobal({newCompartment: true}); +var h = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var hw = dbg.addDebuggee(h); + +g.y = "Bitte Orca"; +h.y = "Visiter"; +var y = "W H O K I L L"; +assertEq(gw.executeInGlobal('y').return, "Bitte Orca"); +assertEq(hw.executeInGlobal('y').return, "Visiter"); diff --git a/js/src/jit-test/tests/debug/Object-executeInGlobal-02.js b/js/src/jit-test/tests/debug/Object-executeInGlobal-02.js new file mode 100644 index 0000000000..8a2592837f --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-executeInGlobal-02.js @@ -0,0 +1,20 @@ +// Debugger.Object.prototype.executeInGlobal argument validation + +load(libdir + 'asserts.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +var gobj = gw.makeDebuggeeValue(g.eval("({})")); + +assertThrowsInstanceOf(function () { gw.executeInGlobal(); }, TypeError); +assertThrowsInstanceOf(function () { gw.executeInGlobal(10); }, TypeError); +assertThrowsInstanceOf(function () { gobj.executeInGlobal('42'); }, TypeError); +assertEq(gw.executeInGlobal('42').return, 42); + +assertThrowsInstanceOf(function () { gw.executeInGlobalWithBindings(); }, TypeError); +assertThrowsInstanceOf(function () { gw.executeInGlobalWithBindings('42'); }, TypeError); +assertThrowsInstanceOf(function () { gw.executeInGlobalWithBindings(10, 1729); }, TypeError); +assertThrowsInstanceOf(function () { gw.executeInGlobalWithBindings('42', 1729); }, TypeError); +assertThrowsInstanceOf(function () { gobj.executeInGlobalWithBindings('42', {}); }, TypeError); +assertEq(gw.executeInGlobalWithBindings('42', {}).return, 42); diff --git a/js/src/jit-test/tests/debug/Object-executeInGlobal-03.js b/js/src/jit-test/tests/debug/Object-executeInGlobal-03.js new file mode 100644 index 0000000000..1d2edd4ccc --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-executeInGlobal-03.js @@ -0,0 +1,19 @@ +// Debugger.Object.prototype.executeInGlobal: closures capturing the global + +var g = newGlobal({newCompartment: true}); +var h = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var hw = dbg.addDebuggee(h); + +g.x = "W H O K I L L"; +h.x = "No Color"; +var c1 = gw.executeInGlobal('(function () { return x; })').return; +var c2 = hw.executeInGlobal('(function () { return x; })').return; +var c3 = gw.executeInGlobalWithBindings('(function () { return x + y; })', { y:" In Rainbows" }).return; +var c4 = hw.executeInGlobalWithBindings('(function () { return x + y; })', { y:" In Rainbows" }).return; + +assertEq(c1.call(null).return, "W H O K I L L"); +assertEq(c2.call(null).return, "No Color"); +assertEq(c3.call(null).return, "W H O K I L L In Rainbows"); +assertEq(c4.call(null).return, "No Color In Rainbows"); diff --git a/js/src/jit-test/tests/debug/Object-executeInGlobal-04.js b/js/src/jit-test/tests/debug/Object-executeInGlobal-04.js new file mode 100644 index 0000000000..cf53e8a67f --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-executeInGlobal-04.js @@ -0,0 +1,55 @@ +// Debugger.Object.prototype.executeInGlobal: nested evals + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +assertEq(gw.executeInGlobal("eval('\"Awake\"');").return, "Awake"); + +// Evaluating non-strict-mode code uses the given global as its variable +// environment. +g.x = "Swing Lo Magellan"; +g.y = "The Milk-Eyed Mender"; +assertEq(gw.executeInGlobal("eval('var x = \"A Brief History of Love\"');\n" + + "var y = 'Merriweather Post Pavilion';" + + "x;").return, + "A Brief History of Love"); +assertEq(g.x, "A Brief History of Love"); +assertEq(g.y, "Merriweather Post Pavilion"); + +// As above, but notice that we still create bindings on the global, even +// when we've interposed a new environment via 'withBindings'. +g.x = "Swing Lo Magellan"; +g.y = "The Milk-Eyed Mender"; +assertEq(gw.executeInGlobalWithBindings("eval('var x = d1;'); var y = d2; x;", + { d1: "A Brief History of Love", + d2: "Merriweather Post Pavilion" }).return, + "A Brief History of Love"); +assertEq(g.x, "A Brief History of Love"); +assertEq(g.y, "Merriweather Post Pavilion"); + + +// Strict mode code variants of the above: + +// Strict mode still lets us create bindings on the global as this is +// equivalent to executing statements at the global level. But note that +// setting strict mode means that nested evals get their own call objects. +g.x = "Swing Lo Magellan"; +g.y = "The Milk-Eyed Mender"; +assertEq(gw.executeInGlobal("\'use strict\';\n" + + "eval('var x = \"A Brief History of Love\"');\n" + + "var y = \"Merriweather Post Pavilion\";" + + "x;").return, + "Swing Lo Magellan"); +assertEq(g.x, "Swing Lo Magellan"); +assertEq(g.y, "Merriweather Post Pavilion"); + +// Introducing a bindings object shouldn't change this behavior. +g.x = "Swing Lo Magellan"; +g.y = "The Milk-Eyed Mender"; +assertEq(gw.executeInGlobalWithBindings("'use strict'; eval('var x = d1;'); var y = d2; x;", + { d1: "A Brief History of Love", + d2: "Merriweather Post Pavilion" }).return, + "Swing Lo Magellan"); +assertEq(g.x, "Swing Lo Magellan"); +assertEq(g.y, "Merriweather Post Pavilion"); diff --git a/js/src/jit-test/tests/debug/Object-executeInGlobal-05.js b/js/src/jit-test/tests/debug/Object-executeInGlobal-05.js new file mode 100644 index 0000000000..899a6cf1eb --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-executeInGlobal-05.js @@ -0,0 +1,21 @@ +// Debugger.Object.prototype.executeInGlobal throws when asked to evaluate in a CCW of a global. + +load(libdir + 'asserts.js'); + +var dbg = new Debugger(); + +var g1 = newGlobal({newCompartment: true}); +var dg1 = dbg.addDebuggee(g1); + +var g2 = newGlobal({newCompartment: true}); +var dg2 = dbg.addDebuggee(g2); + +// Generate a Debugger.Object viewing g2 from g1's compartment. +var dg1wg2 = dg1.makeDebuggeeValue(g2); +assertEq(dg1wg2.unwrap(), dg2.makeDebuggeeValue(g2)); +assertThrowsInstanceOf(function () { dg1wg2.executeInGlobal('1'); }, TypeError); +assertThrowsInstanceOf(function () { dg1wg2.executeInGlobalWithBindings('x', { x: 1 }); }, TypeError); + +// These, however, should not throw. +assertEq(dg1.executeInGlobal('1729').return, 1729); +assertEq(dg1.executeInGlobalWithBindings('x', { x: 1729 }).return, 1729); diff --git a/js/src/jit-test/tests/debug/Object-executeInGlobal-06.js b/js/src/jit-test/tests/debug/Object-executeInGlobal-06.js new file mode 100644 index 0000000000..37fdf4db5c --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-executeInGlobal-06.js @@ -0,0 +1,8 @@ +// Debugger.Object.prototype.executeInGlobal sets 'this' to the global. + +var dbg = new Debugger; +var g1 = newGlobal({newCompartment: true}); +var g1w = dbg.addDebuggee(g1); + +assertEq(g1w.executeInGlobal('this').return, g1w.makeDebuggeeValue(g1)); +assertEq(g1w.executeInGlobalWithBindings('this', { x:42 }).return, g1w.makeDebuggeeValue(g1)); diff --git a/js/src/jit-test/tests/debug/Object-executeInGlobal-07.js b/js/src/jit-test/tests/debug/Object-executeInGlobal-07.js new file mode 100644 index 0000000000..c7cdf8f8de --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-executeInGlobal-07.js @@ -0,0 +1,29 @@ +// executeInGlobal correctly handles optional custom url option +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var debuggee = dbg.getDebuggees()[0]; +var count = 0; + +function testUrl (options, expected) { + count++; + dbg.onNewScript = function(script){ + dbg.onNewScript = undefined; + assertEq(script.url, expected); + count--; + }; + debuggee.executeInGlobal("", options); +} + + +testUrl(undefined, "debugger eval code"); +testUrl(null, "debugger eval code"); +testUrl({ url: undefined }, "debugger eval code"); +testUrl({ url: null }, "null"); +testUrl({ url: 5 }, "5"); +testUrl({ url: "" }, ""); +testUrl({ url: "test" }, "test"); +testUrl({ url: "Ðëßþ" }, "Ðëßþ"); +testUrl({ url: "тест" }, "тест"); +testUrl({ url: "テスト" }, "テスト"); +testUrl({ url: "\u{1F9EA}" }, "\u{1F9EA}"); +assertEq(count, 0); diff --git a/js/src/jit-test/tests/debug/Object-executeInGlobal-08.js b/js/src/jit-test/tests/debug/Object-executeInGlobal-08.js new file mode 100644 index 0000000000..3c3819f2d3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-executeInGlobal-08.js @@ -0,0 +1,22 @@ +// executeInGlobal correctly handles optional lineNumber option +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var debuggee = dbg.getDebuggees()[0]; +var count = 0; + +function testLineNumber (options, expected) { + count++; + dbg.onNewScript = function(script){ + dbg.onNewScript = undefined; + assertEq(script.startLine, expected); + count--; + }; + debuggee.executeInGlobal("", options); +} + + +testLineNumber(undefined, 1); +testLineNumber({}, 1); +testLineNumber({ lineNumber: undefined }, 1); +testLineNumber({ lineNumber: 5 }, 5); +assertEq(count, 0); diff --git a/js/src/jit-test/tests/debug/Object-executeInGlobal-09.js b/js/src/jit-test/tests/debug/Object-executeInGlobal-09.js new file mode 100644 index 0000000000..a4df6d5517 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-executeInGlobal-09.js @@ -0,0 +1,9 @@ +// The frame created for executeInGlobal is never marked as a 'FUNCTION' frame. + +(function () { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + var gw = dbg.addDebuggee(g); + gw.executeInGlobalWithBindings("eval('Math')",{}).return +})(); + diff --git a/js/src/jit-test/tests/debug/Object-executeInGlobal-10.js b/js/src/jit-test/tests/debug/Object-executeInGlobal-10.js new file mode 100644 index 0000000000..0120bcc1dd --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-executeInGlobal-10.js @@ -0,0 +1,13 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +// executeInGlobal should be able to introduce and persist lexical bindings. +assertEq(gw.executeInGlobal(`let x = 42; x;`).return, 42); +assertEq(gw.executeInGlobal(`x;`).return, 42); + +// By contrast, Debugger.Frame.eval is like direct eval, and shouldn't be able +// to introduce new lexical bindings. +dbg.onDebuggerStatement = function (frame) { frame.eval(`let y = 84;`); }; +g.eval(`debugger;`); +assertEq(!!gw.executeInGlobal(`y;`).throw, true); diff --git a/js/src/jit-test/tests/debug/Object-executeInGlobal-11.js b/js/src/jit-test/tests/debug/Object-executeInGlobal-11.js new file mode 100644 index 0000000000..166f067f88 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-executeInGlobal-11.js @@ -0,0 +1,29 @@ +// executeInGlobalWithBindings correctly handles optional custom url option +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var debuggee = dbg.getDebuggees()[0]; +var count = 0; + +function testUrl (options, expected) { + count++; + dbg.onNewScript = function(script){ + dbg.onNewScript = undefined; + assertEq(script.url, expected); + count--; + }; + debuggee.executeInGlobalWithBindings("", {}, options); +} + + +testUrl(undefined, "debugger eval code"); +testUrl(null, "debugger eval code"); +testUrl({ url: undefined }, "debugger eval code"); +testUrl({ url: null }, "null"); +testUrl({ url: 5 }, "5"); +testUrl({ url: "" }, ""); +testUrl({ url: "test" }, "test"); +testUrl({ url: "Ðëßþ" }, "Ðëßþ"); +testUrl({ url: "тест" }, "тест"); +testUrl({ url: "テスト" }, "テスト"); +testUrl({ url: "\u{1F9EA}" }, "\u{1F9EA}"); +assertEq(count, 0); diff --git a/js/src/jit-test/tests/debug/Object-forceLexicalInitializationByName.js b/js/src/jit-test/tests/debug/Object-forceLexicalInitializationByName.js new file mode 100644 index 0000000000..7550d15ef0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-forceLexicalInitializationByName.js @@ -0,0 +1,61 @@ +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +let errorOne, errorTwo; + +function evalErrorStr(global, evalString) { + try { + global.evaluate(evalString); + return undefined; + } catch (e) { + return e.toString(); + } +} + + +assertEq(evalErrorStr(g, "let y = IDONTEXIST;"), "ReferenceError: IDONTEXIST is not defined"); +assertEq(evalErrorStr(g, "y = 1;"), + "ReferenceError: can't access lexical declaration 'y' before initialization"); + +// Here we flip the uninitialized binding to undfined. +assertEq(gw.forceLexicalInitializationByName("y"), true); +assertEq(g.evaluate("y"), undefined); +g.evaluate("y = 1;"); +assertEq(g.evaluate("y"), 1); + +// Ensure that bogus bindings return false, but otherwise trigger no error or +// side effect. +assertEq(gw.forceLexicalInitializationByName("idontexist"), false); +assertEq(evalErrorStr(g, "idontexist"), "ReferenceError: idontexist is not defined"); + +// Ensure that ropes (non-atoms) behave properly +assertEq(gw.forceLexicalInitializationByName(("foo" + "bar" + "bop" + "zopple" + 2 + 3).slice(1)), + false); +assertEq(evalErrorStr(g, "let oobarbopzopple23 = IDONTEXIST;"), "ReferenceError: IDONTEXIST is not defined"); +assertEq(gw.forceLexicalInitializationByName(("foo" + "bar" + "bop" + "zopple" + 2 + 3).slice(1)), + true); +assertEq(g.evaluate("oobarbopzopple23"), undefined); + +// Ensure that only strings are accepted by forceLexicalInitializationByName +const bad_types = [ + 2112, + {geddy: "lee"}, + () => 1, + [], + Array, + "'1'", // non-identifier +] + +for (var badType of bad_types) { + assertThrowsInstanceOf(() => { + gw.forceLexicalInitializationByName(badType); + }, TypeError); +} + +// Finally, supplying no arguments should throw a type error +assertThrowsInstanceOf(() => { + Debugger.isCompilableUnit(); +}, TypeError); diff --git a/js/src/jit-test/tests/debug/Object-gc-01.js b/js/src/jit-test/tests/debug/Object-gc-01.js new file mode 100644 index 0000000000..5dbb01057c --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-gc-01.js @@ -0,0 +1,14 @@ +// Debugger.Objects keep their referents alive. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var arr = []; +dbg.onDebuggerStatement = function (frame) { arr.push(frame.eval("[]").return); }; +g.eval("for (var i = 0; i < 10; i++) debugger;"); +assertEq(arr.length, 10); + +gc(); + +for (var i = 0; i < arr.length; i++) + assertEq(arr[i].class, "Array"); + diff --git a/js/src/jit-test/tests/debug/Object-getErrorMessageName.js b/js/src/jit-test/tests/debug/Object-getErrorMessageName.js new file mode 100644 index 0000000000..11c98d93e5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getErrorMessageName.js @@ -0,0 +1,29 @@ +// Debugger.Object.prototype.getErrorMessageName returns the error message name +// associated with some error object. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +assertEq(gw.executeInGlobal("(42).toString(0)").throw.errorMessageName, "JSMSG_BAD_RADIX"); + +// Custom errors have no error message name. +assertEq(gw.executeInGlobal("throw new Error()").throw.errorMessageName, undefined); + +// Ensure that the method works across globals. +g.eval(`var g = newGlobal({newCompartment: true}); + g.eval('var err; try { (42).toString(0); } catch (e) { err = e; }'); + var err2 = g.err;`); +assertEq(gw.executeInGlobal("throw err2").throw.errorMessageName, "JSMSG_BAD_RADIX"); + +// Ensure that non-error objects return undefined. +const Args = [ + "1", + "'blah'", + "({})", + "[]", + "() => 1" +] + +for (let arg of Args) + assertEq(gw.executeInGlobal(`${arg}`).return.errorMessageName, undefined); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPrivateProperties.js b/js/src/jit-test/tests/debug/Object-getOwnPrivateProperties.js new file mode 100644 index 0000000000..5be0d23fc7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPrivateProperties.js @@ -0,0 +1,44 @@ +// private fields + +var g = newGlobal({ newCompartment: true }); +var dbg = Debugger(); +var gobj = dbg.addDebuggee(g); + +g.eval(` +class MyClass { + constructor() { + this.publicProperty = 1; + this.publicSymbol = Symbol("public"); + this[this.publicSymbol] = 2; + this.#privateProperty1 = 3; + this.#privateProperty2 = 4; + } + static #privateStatic1 + static #privateStatic2 + #privateProperty1 + #privateProperty2 + #privateMethod() {} + publicMethod(){} +} +obj = new MyClass(); +klass = MyClass`); + +var privatePropertiesSymbolsDescriptions = gobj + .getOwnPropertyDescriptor("obj") + .value.getOwnPrivateProperties() + .map(sym => sym.description); + +assertEq( + JSON.stringify(privatePropertiesSymbolsDescriptions), + JSON.stringify([`#privateProperty1`, `#privateProperty2`]) +); + +var classPrivatePropertiesSymbolsDescriptions = gobj + .getOwnPropertyDescriptor("klass") + .value.getOwnPrivateProperties() + .map(sym => sym.description); + +assertEq( + JSON.stringify(classPrivatePropertiesSymbolsDescriptions), + JSON.stringify([`#privateStatic1`, `#privateStatic2`]) +); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-01.js b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-01.js new file mode 100644 index 0000000000..a39faeb2f2 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-01.js @@ -0,0 +1,59 @@ +// getOwnPropertyDescriptor works with simple data properties. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits; +var expected; +dbg.onDebuggerStatement = function (frame) { + var args = frame.arguments; + var obj = args[0], id = args[1]; + var desc = obj.getOwnPropertyDescriptor(id); + if (expected === undefined) { + assertEq(desc, undefined); + } else { + assertEq(desc instanceof Object, true); + assertEq(desc.enumerable, expected.enumerable); + assertEq(desc.configurable, expected.configurable); + assertEq(desc.hasOwnProperty("value"), true); + assertEq(desc.value, expected.value); + assertEq(desc.writable, expected.writable === undefined ? true : expected.writable); + assertEq("get" in desc, false); + assertEq("set" in desc, false); + } + hits++; +}; + +g.eval("function f(obj, id) { debugger; }"); + +function test(obj, id, desc) { + expected = desc; + hits = 0; + g.f(obj, id); + assertEq(hits, 1); +} + +var obj = g.eval("({a: 1, ' ': undefined, '0': 0})"); +test(obj, "a", {value: 1, enumerable: true, configurable: true}); +test(obj, " ", {value: undefined, enumerable: true, configurable: true}); +test(obj, "b", undefined); +test(obj, "0", {value: 0, enumerable: true, configurable: true}); +test(obj, 0, {value: 0, enumerable: true, configurable: true}); + +var arr = g.eval("[7,,]"); +test(arr, 'length', {value: 2, enumerable: false, configurable: false}); +test(arr, 0, {value: 7, enumerable: true, configurable: true}); +test(arr, "0", {value: 7, enumerable: true, configurable: true}); +test(arr, 1, undefined); +test(arr, "1", undefined); +test(arr, 2, undefined); +test(arr, "2", undefined); +test(arr, "argelfraster", undefined); + +var re = g.eval("/erwe/"); +test(re, 'lastIndex', {value: 0, enumerable: false, configurable: false}); + +// String objects have a well-behaved resolve hook. +var str = g.eval("new String('hello world')"); +test(str, 'length', {value: 11, enumerable: false, configurable: false, writable: false}); +test(str, 0, {value: 'h', enumerable: true, configurable: false, writable: false}); +test(str, "0", {value: 'h', enumerable: true, configurable: false, writable: false}); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-02.js b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-02.js new file mode 100644 index 0000000000..7f5368d263 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-02.js @@ -0,0 +1,8 @@ +// Property values that are objects are reflected as Debugger.Objects. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(); +var gobj = dbg.addDebuggee(g); +g.self = g; +var desc = gobj.getOwnPropertyDescriptor("self"); +assertEq(desc.value, gobj.makeDebuggeeValue(g)); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-03.js b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-03.js new file mode 100644 index 0000000000..9a30d63d17 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-03.js @@ -0,0 +1,22 @@ +// obj.getOwnPropertyDescriptor works on global objects. + +var g = newGlobal({newCompartment: true}); +g.eval("var v;"); +this.eval("var v;"); + +var dbg = Debugger(); +var obj = dbg.addDebuggee(g); + +function test(name) { + var desc = obj.getOwnPropertyDescriptor(name); + assertEq(desc instanceof Object, true); + var expected = Object.getOwnPropertyDescriptor(this, name); + assertEq(Object.prototype.toString.call(desc), Object.prototype.toString.call(expected)); + assertEq(desc.enumerable, expected.enumerable); + assertEq(desc.configurable, expected.configurable); + assertEq(desc.writable, expected.writable); + assertEq(desc.value, expected.value); +} + +test("Infinity"); +test("v"); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-04.js b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-04.js new file mode 100644 index 0000000000..a24528bec6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-04.js @@ -0,0 +1,18 @@ +// obj.getOwnPropertyDescriptor works on accessor properties. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gdo = dbg.addDebuggee(g); + +g.called = false; +g.eval("var a = {get x() { called = true; }};"); + +var desc = gdo.getOwnPropertyDescriptor("a").value.getOwnPropertyDescriptor("x"); +assertEq(g.called, false); +assertEq(desc.enumerable, true); +assertEq(desc.configurable, true); +assertEq("value" in desc, false); +assertEq("writable" in desc, false); +assertEq(desc.get instanceof Debugger.Object, true); +assertEq(desc.get.class, "Function"); +assertEq(desc.set, undefined); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-05.js b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-05.js new file mode 100644 index 0000000000..b2223076e1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-05.js @@ -0,0 +1,17 @@ +// obj.getOwnPropertyDescriptor presents getters and setters as Debugger.Object objects. + +var g = newGlobal({newCompartment: true}); +g.S = function foreignFunction(v) {}; +g.eval("var a = {};\n" + + "function G() {}\n" + + "Object.defineProperty(a, 'p', {get: G, set: S})"); + +var dbg = new Debugger; +var gdo = dbg.addDebuggee(g); +var desc = gdo.getOwnPropertyDescriptor("a").value.getOwnPropertyDescriptor("p"); +assertEq(desc.enumerable, false); +assertEq(desc.configurable, false); +assertEq("value" in desc, false); +assertEq("writable" in desc, false); +assertEq(desc.get, gdo.getOwnPropertyDescriptor("G").value); +assertEq(desc.set, gdo.getOwnPropertyDescriptor("S").value); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-06.js b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-06.js new file mode 100644 index 0000000000..b0d9facb7e --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-06.js @@ -0,0 +1,29 @@ +// obj.getOwnPropertyDescriptor works when obj is a transparent cross-compartment wrapper. + +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +g1.next = g2; + +// This test is a little hard to follow, especially the !== assertions. +// +// Bottom line: the value of a property of g1 can only be an object in g1's +// compartment, so any Debugger.Objects obtained by calling +// g1obj.getOwnPropertyDescriptor should all have referents in g1's +// compartment. + +var dbg = new Debugger; +var g1obj = dbg.addDebuggee(g1); +var g2obj = dbg.addDebuggee(g2); +var wobj = g1obj.getOwnPropertyDescriptor("next").value; +assertEq(wobj instanceof Debugger.Object, true); +assertEq(wobj !== g2obj, true); // referents are in two different compartments + +g2.x = "ok"; +assertEq(wobj.getOwnPropertyDescriptor("x").value, "ok"); + +g1.g2min = g2.min = g2.Math.min; +g2.eval("Object.defineProperty(this, 'y', {get: min});"); +assertEq(g2.y, Infinity); +var wmin = wobj.getOwnPropertyDescriptor("y").get; +assertEq(wmin !== g2obj.getOwnPropertyDescriptor("min").value, true); // as above +assertEq(wmin, g1obj.getOwnPropertyDescriptor("g2min").value); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-non-primitive-key.js b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-non-primitive-key.js new file mode 100644 index 0000000000..71b177aa63 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-non-primitive-key.js @@ -0,0 +1,37 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var gw = dbg.addDebuggee(g); + +g.eval(` + var obj = { + p: 1, + [Symbol.iterator]: 2, + }; +`); + +// Return |key| as an object. +function toObject(key) { + return { + [Symbol.toPrimitive]() { + return key; + } + }; +} + +let obj = gw.getProperty("obj").return; + +for (let key of obj.getOwnPropertyNames()) { + let keyObject = toObject(key); + let value = g.obj[key]; + + assertEq(obj.getOwnPropertyDescriptor(key).value, value); + assertEq(obj.getOwnPropertyDescriptor(keyObject).value, value); +} + +for (let key of obj.getOwnPropertySymbols()) { + let keyObject = toObject(key); + let value = g.obj[key]; + + assertEq(obj.getOwnPropertyDescriptor(key).value, value); + assertEq(obj.getOwnPropertyDescriptor(keyObject).value, value); +} diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-surfaces-01.js b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-surfaces-01.js new file mode 100644 index 0000000000..b0b89f7623 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-surfaces-01.js @@ -0,0 +1,14 @@ +// The argument to Debugger.Object.prototype.getOwnPropertyDescriptor can be omitted. + +var g = newGlobal({newCompartment: true}); +g.eval("var obj = {};"); + +var dbg = Debugger(g); +var obj; +dbg.onDebuggerStatement = function (frame) { obj = frame.eval("obj").return; }; +g.eval("debugger;"); + +assertEq(obj.getOwnPropertyDescriptor(), undefined); +g.obj.undefined = 17; +var desc = obj.getOwnPropertyDescriptor(); +assertEq(desc.value, 17); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-surfaces-02.js b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-surfaces-02.js new file mode 100644 index 0000000000..00ff44ea4f --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-surfaces-02.js @@ -0,0 +1,14 @@ +// The argument to Debugger.Object.prototype.getOwnPropertyDescriptor can be an object. +var g = newGlobal({newCompartment: true}); +g.eval("var obj = {};"); + +var dbg = Debugger(g); +var obj; +dbg.onDebuggerStatement = function (frame) { obj = frame.eval("obj").return; }; +g.eval("debugger;"); + +var nameobj = {toString: function () { return 'x'; }}; +assertEq(obj.getOwnPropertyDescriptor(nameobj), undefined); +g.obj.x = 17; +var desc = obj.getOwnPropertyDescriptor(nameobj); +assertEq(desc.value, 17); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertyNames-01.js b/js/src/jit-test/tests/debug/Object-getOwnPropertyNames-01.js new file mode 100644 index 0000000000..b4ceb76f14 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertyNames-01.js @@ -0,0 +1,33 @@ +// Basic getOwnPropertyNames tests. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(); +var gobj = dbg.addDebuggee(g); + +function test(code) { + code = "(" + code + ");"; + var expected = Object.getOwnPropertyNames(eval(code)); + g.eval("obj = " + code); + var actual = gobj.getOwnPropertyDescriptor("obj").value.getOwnPropertyNames(); + assertEq(JSON.stringify(actual.sort()), JSON.stringify(expected.sort())); +} + +test("{}"); +test("{a: 0, b: 1}"); +test("{'name with space': 0}"); +test("{get x() {}, set y(v) {}}"); +test("{get x() { throw 'fit'; }}"); +test("Object.create({a: 1})"); +test("Object.create({get a() {}, set a(v) {}})"); +test("(function () { var x = {a: 0, b: 1}; delete a; return x; })()"); +test("Object.create(null, {x: {value: 0}})"); +test("[]"); +test("[0, 1, 2]"); +test("[,,,,,]"); +test("/a*a/"); +test("function () {}"); +test("(function () {\n" + + " var x = {};\n" + + " x[Symbol()] = 1; x[Symbol.for('moon')] = 2; x[Symbol.iterator] = 3;\n" + + " return x;\n" + + "})()"); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertyNames-02.js b/js/src/jit-test/tests/debug/Object-getOwnPropertyNames-02.js new file mode 100644 index 0000000000..df06f55760 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertyNames-02.js @@ -0,0 +1,11 @@ +// obj.getOwnPropertyNames() works when obj's referent is itself a cross-compartment wrapper. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(); +var gobj = dbg.addDebuggee(g); +g.p = {xyzzy: 8}; // makes a cross-compartment wrapper +g.p[Symbol.for("plugh")] = 9; +var wp = gobj.getOwnPropertyDescriptor("p").value; +var names = wp.getOwnPropertyNames(); +assertEq(names.length, 1); +assertEq(names[0], "xyzzy"); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertyNamesLength.js b/js/src/jit-test/tests/debug/Object-getOwnPropertyNamesLength.js new file mode 100644 index 0000000000..0fe3ced1ba --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertyNamesLength.js @@ -0,0 +1,41 @@ +// Basic getOwnPropertyNamesLength tests. + +var g = newGlobal({ newCompartment: true }); +var dbg = Debugger(); +var gobj = dbg.addDebuggee(g); + +function testGetOwnPropertyLength(code) { + code = `(${code});`; + const expected = Object.getOwnPropertyNames(eval(code)).length; + g.eval(`obj = ${code}`); + const length = gobj + .getOwnPropertyDescriptor("obj") + .value.getOwnPropertyNamesLength(); + assertEq(length, expected, `Expected result for: ${code}`); +} + +testGetOwnPropertyLength("{}"); +testGetOwnPropertyLength("{a: 0, b: 1}"); +testGetOwnPropertyLength("{'name with space': 0}"); +testGetOwnPropertyLength("{get x() {}, set y(v) {}}"); +testGetOwnPropertyLength("{get x() { throw 'fit'; }}"); +testGetOwnPropertyLength("Object.create({a: 1})"); +testGetOwnPropertyLength("Object.create({get a() {}, set a(v) {}})"); +testGetOwnPropertyLength( + "(function () { var x = {a: 0, b: 1}; delete a; return x; })()" +); +testGetOwnPropertyLength("Object.create(null, {x: {value: 0}})"); +testGetOwnPropertyLength("[]"); +testGetOwnPropertyLength("[0, 1, 2]"); +testGetOwnPropertyLength("[,,,,,]"); +testGetOwnPropertyLength("/a*a/"); +testGetOwnPropertyLength("function () {}"); +testGetOwnPropertyLength( + `(function () { + var x = {}; + x[Symbol()] = 1; + x[Symbol.for('moon')] = 2; + x[Symbol.iterator] = 3; + return x; + })()` +); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertySymbols-01.js b/js/src/jit-test/tests/debug/Object-getOwnPropertySymbols-01.js new file mode 100644 index 0000000000..3e16f3e2e3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertySymbols-01.js @@ -0,0 +1,33 @@ +// Basic getOwnPropertSymbols tests. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(); +var gobj = dbg.addDebuggee(g); + +function test(code) { + code = "(" + code + ");"; + var expected = Object.getOwnPropertySymbols(eval(code)); + g.eval("obj = " + code); + var actual = gobj.getOwnPropertyDescriptor("obj").value.getOwnPropertySymbols(); + + assertEq(JSON.stringify(actual.map((x) => x.toString()).sort()), + JSON.stringify(expected.map((x) => x.toString()).sort())); +} + +test("{}"); +test("Array.prototype"); // Symbol.iterator +test("Object.create(null)"); +test("(function() {let x = Symbol(); let o = {}; o[x] = 1; return o;})()"); +test("(function() {let x = Symbol('foo'); let o = {}; o[x] = 1; return o;})()"); +test("(function() {let x = Symbol('foo'); let y = Symbol('bar'); \ + let o = {}; o[x] = 1; o[y] = 2; return o;})()"); +test("(function() {let x = Symbol('foo with spaces'); \ + let o = {}; o[x] = 1; return o;})()"); +test("(function() {let x = Symbol('foo'); \ + let o = function(){}; o[x] = 1; return o;})()"); +test("(function() {let x = Symbol('foo'); \ + let o = Object.create(null); o[x] = 1; return o;})()"); +test("(function() {let x = Symbol('foo'); \ + let o = new Array(); o[x] = 1; return o;})()"); +test("(function() {let x = Symbol('foo'); \ + let o = {}; o[x] = 1; delete o[x]; return o;})()"); diff --git a/js/src/jit-test/tests/debug/Object-getOwnPropertySymbols-02.js b/js/src/jit-test/tests/debug/Object-getOwnPropertySymbols-02.js new file mode 100644 index 0000000000..7f85caa941 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getOwnPropertySymbols-02.js @@ -0,0 +1,12 @@ +// obj.getOwnPropertySymbols() works when obj's referent is itself a cross-compartment wrapper. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(); +var gobj = dbg.addDebuggee(g); +g.p = {xyzzy: 8}; // makes a cross-compartment wrapper +var sym = Symbol("plugh"); +g.p[sym] = 9; +var wp = gobj.getOwnPropertyDescriptor("p").value; +var names = wp.getOwnPropertySymbols(); +assertEq(names.length, 1); +assertEq(names[0], sym); diff --git a/js/src/jit-test/tests/debug/Object-getPromiseReactions-01.js b/js/src/jit-test/tests/debug/Object-getPromiseReactions-01.js new file mode 100644 index 0000000000..ab56984960 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getPromiseReactions-01.js @@ -0,0 +1,25 @@ +// Debugger.Object.prototype.getPromiseReactions throws on non-promises, but +// works on wrappers of promises. + +load(libdir + 'asserts.js'); +load(libdir + 'array-compare.js'); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger; +var DOg = dbg.addDebuggee(g); + +assertThrowsInstanceOf(() => DOg.getPromiseReactions(), TypeError); + +// Try retrieving an empty reaction list from an actual promise. +g.eval(`var p = Promise.resolve();`); +var DOgp = DOg.makeDebuggeeValue(g.p); +assertEq(true, arraysEqual(DOgp.getPromiseReactions(), [])); + +// Try a Debugger.Object of a cross-compartment wrapper of a promise. This +// should still work: the promise accessors generally do checked unwraps of +// their arguments. +var g2 = newGlobal({ newCompartment: true }); +DOg2 = dbg.addDebuggee(g2); +var DOg2gp = DOg2.makeDebuggeeValue(g.p); +assertEq(DOgp, DOg2gp.unwrap()); +assertEq(true, arraysEqual(DOg2gp.getPromiseReactions(), [])); diff --git a/js/src/jit-test/tests/debug/Object-getPromiseReactions-02.js b/js/src/jit-test/tests/debug/Object-getPromiseReactions-02.js new file mode 100644 index 0000000000..9922dd3389 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getPromiseReactions-02.js @@ -0,0 +1,49 @@ +// Debugger.Object.protoype.getPromiseReactions reports directly resolved promises. + +load(libdir + 'array-compare.js'); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger; +var DOg = dbg.addDebuggee(g); + +g.eval(` + var pResolve, pReject; + var p = new Promise((resolve, reject) => { pResolve = resolve; pReject = reject }); + var p2 = new Promise((resolve, reject) => { resolve(p); }); + var p3 = new Promise((resolve, reject) => { resolve(p); }); + var p4 = new Promise((resolve, reject) => { resolve(p2); }); +`); + +var [DOp, DOp2, DOp3, DOp4] = [g.p, g.p2, g.p3, g.p4].map(p => DOg.makeDebuggeeValue(p)); + +// Since the standard resolving functions enqueue a job to do the `then` call, +// none of the reactions should be visible yet. +assertEq(true, arraysEqual(DOp.getPromiseReactions(), [])); +assertEq(true, arraysEqual(DOp2.getPromiseReactions(), [])); +assertEq(true, arraysEqual(DOp3.getPromiseReactions(), [])); +assertEq(true, arraysEqual(DOp4.getPromiseReactions(), [])); + +// This should let them all appear in place. +drainJobQueue(); + +assertEq(true, arraysEqual(DOp.getPromiseReactions(), [DOp2, DOp3])); +assertEq(true, arraysEqual(DOp2.getPromiseReactions(), [DOp4])); +assertEq(true, arraysEqual(DOp3.getPromiseReactions(), [])); +assertEq(true, arraysEqual(DOp4.getPromiseReactions(), [])); + +// Resolving the initial promise should kick off its reactions, but propagating +// that the rest of the way requires microtasks. +g.pResolve(42); + +assertEq(true, arraysEqual(DOp.getPromiseReactions(), [])); +assertEq(true, arraysEqual(DOp2.getPromiseReactions(), [DOp4])); +assertEq(true, arraysEqual(DOp3.getPromiseReactions(), [])); +assertEq(true, arraysEqual(DOp4.getPromiseReactions(), [])); + +// Let the propagation complete. +drainJobQueue(); + +assertEq(true, arraysEqual(DOp.getPromiseReactions(), [])); +assertEq(true, arraysEqual(DOp2.getPromiseReactions(), [])); +assertEq(true, arraysEqual(DOp3.getPromiseReactions(), [])); +assertEq(true, arraysEqual(DOp4.getPromiseReactions(), [])); diff --git a/js/src/jit-test/tests/debug/Object-getPromiseReactions-03.js b/js/src/jit-test/tests/debug/Object-getPromiseReactions-03.js new file mode 100644 index 0000000000..81d639efb7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getPromiseReactions-03.js @@ -0,0 +1,41 @@ +// Debugger.Object.prototype.getPromiseReactions reports reaction records +// created with `then` and `catch`. + +load(libdir + 'match.js'); +load(libdir + 'match-debugger.js'); + +const { Pattern } = Match; +const { OBJECT_WITH_EXACTLY: EXACT } = Pattern; +function EQ(v) { + return new DebuggerIdentical(v); +} + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger; +var DOg = dbg.addDebuggee(g); + +g.eval(` + function identity(v) { return v; } + function thrower(e) { throw e; } + function fib(n) { if (n <= 1) return 1; else return fib(n-1) + fib(n-2); } + function triangle(n) { return (n+1) * n / 2; } + + var pResolve, pReject; + var p = new Promise((resolve, reject) => { pResolve = resolve; pReject = reject }); + var p2 = p.then(identity, thrower); + var p3 = p.then(fib); + var p4 = p.catch(triangle); +`); + +var [DOidentity, DOthrower, DOfib, DOtriangle, DOp, DOp2, DOp3, DOp4] = + [g.identity, g.thrower, g.fib, g.triangle, g.p, g.p2, g.p3, g.p4].map(p => DOg.makeDebuggeeValue(p)); + +Match.Pattern([ + EXACT({ resolve: EQ(DOidentity), reject: EQ(DOthrower), result: EQ(DOp2) }), + EXACT({ resolve: EQ(DOfib), result: EQ(DOp3) }), + EXACT({ reject: EQ(DOtriangle), result: EQ(DOp4) }) +]).assert(DOp.getPromiseReactions(), + "promiseReactions doesn't return expected reaction list"); + +g.pResolve(3); +assertEq(DOp.getPromiseReactions().length, 0); diff --git a/js/src/jit-test/tests/debug/Object-getPromiseReactions-04.js b/js/src/jit-test/tests/debug/Object-getPromiseReactions-04.js new file mode 100644 index 0000000000..47278c7d6e --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getPromiseReactions-04.js @@ -0,0 +1,48 @@ +// Debugger.Object.prototype.getPromiseReactions reports reaction records +// created by `await` expressions in async functions. + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger; +const DOg = dbg.addDebuggee(g); + +g.eval(` + var pResolve, pReject; + var p0 = new Promise((resolve, reject) => { pResolve = resolve; pReject = reject }); + + // In this case, promiseReactions encounters a Debugger.Frame we had already + // associated with the generator, when we hit the debugger statement. + async function f1() { debugger; await p0; } + + // In this case, promiseReactions must construct the Debugger.Frame itself, + // since it is the first to encounter the generator. + async function f2() { await p0; debugger; } +`); + +let DFf1, DFf2; +dbg.onDebuggerStatement = (frame) => { + DFf1 = frame; + dbg.onDebuggerStatement = (frame) => { + DFf2 = frame; + dbg.onDebuggerStatement = () => { throw "Shouldn't fire twice"; }; + }; +}; + +g.eval(`var p1 = f1();`); +assertEq(DFf1.callee.name, "f1"); + +g.eval(`var p2 = f2();`); +assertEq(DFf2, undefined); + +const [DOp0, DOp1, DOp2] = + [g.p0, g.p1, g.p2].map(p => DOg.makeDebuggeeValue(p)); + +const reactions = DOp0.getPromiseReactions(); +assertEq(reactions.length, 2); +assertEq(reactions[0], DFf1); +assertEq(true, reactions[1] instanceof Debugger.Frame); + +// Let f2 run until it hits its debugger statement. +g.pResolve(42); +drainJobQueue(); +assertEq(DFf2.terminated, true); +assertEq(reactions[1], DFf2); diff --git a/js/src/jit-test/tests/debug/Object-getPromiseReactions-05.js b/js/src/jit-test/tests/debug/Object-getPromiseReactions-05.js new file mode 100644 index 0000000000..89fc1fe70b --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getPromiseReactions-05.js @@ -0,0 +1,48 @@ +// Debugger.Object.prototype.getPromiseReactions reports reaction records +// created by `await` expressions in async generators. + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger; +const DOg = dbg.addDebuggee(g); + +g.eval(` + var pResolve, pReject; + var p0 = new Promise((resolve, reject) => { pResolve = resolve; pReject = reject }); + + // In this case, promiseReactions encounters a Debugger.Frame we had already + // associated with the generator, when we hit the debugger statement. + async function* f1() { debugger; await p0; } + + // In this case, promiseReactions must construct the Debugger.Frame itself, + // since it is the first to encounter the generator. + async function* f2() { await p0; debugger; } +`); + +let DFf1, DFf2; +dbg.onDebuggerStatement = (frame) => { + DFf1 = frame; + dbg.onDebuggerStatement = (frame) => { + DFf2 = frame; + dbg.onDebuggerStatement = () => { throw "Shouldn't fire twice"; }; + }; +}; + +g.eval(`var p1 = f1().next();`); +assertEq(DFf1.callee.name, "f1"); + +g.eval(`var p2 = f2().next();`); +assertEq(DFf2, undefined); + +const [DOp0, DOp1, DOp2] = + [g.p0, g.p1, g.p2].map(p => DOg.makeDebuggeeValue(p)); + +const reactions = DOp0.getPromiseReactions(); +assertEq(reactions.length, 2); +assertEq(reactions[0], DFf1); +assertEq(true, reactions[1] instanceof Debugger.Frame); + +// Let f2 run until it hits its debugger statement. +g.pResolve(42); +drainJobQueue(); +assertEq(DFf2.terminated, true); +assertEq(reactions[1], DFf2); diff --git a/js/src/jit-test/tests/debug/Object-getPromiseReactions-06.js b/js/src/jit-test/tests/debug/Object-getPromiseReactions-06.js new file mode 100644 index 0000000000..99d0bba872 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getPromiseReactions-06.js @@ -0,0 +1,43 @@ +// Debugger.Object.prototype.getPromiseReactions should handle reaction records +// that are cross-compartment with their promises. + +var dbg = new Debugger; + +var g1 = newGlobal({ newCompartment: true }); +var DOg1 = dbg.addDebuggee(g1); + +var g2 = newGlobal({ newCompartment: true }); +var DOg2 = dbg.addDebuggee(g2); + +g1.eval(` + var pResolve, pReject; + var p = new Promise((resolve, reject) => { pResolve = resolve; pReject = reject }); +`); + +g2.p = g1.p; +g2.eval(` + var p2 = new Promise((resolve, reject) => { resolve(p); }); +`); + +const DOp = DOg1.makeDebuggeeValue(g1.p); +const DOp2 = DOg2.makeDebuggeeValue(g2.p2); + +// Since the standard resolving functions enqueue a job to do the `then` call, +// we need to drain the queue before p2 will appear on p1's reaction list. +drainJobQueue(); + +const reactions = DOp.getPromiseReactions(); +assertEq(true, Array.isArray(reactions)); +assertEq(reactions.length, 1); +assertEq(typeof reactions[0], "object"); +assertEq(true, reactions[0].resolve instanceof Debugger.Object); +assertEq(true, reactions[0].resolve.callable); +assertEq(true, reactions[0].reject instanceof Debugger.Object); +assertEq(true, reactions[0].reject.callable); + +// Unfortunately, this is not p2; it's the promise returned by the internal call +// to `then` that attached the reaction record to p. See bug 1603575 for ideas +// about how to actually retrieve p2. +assertEq(true, reactions[0].result instanceof Debugger.Object); +assertEq(reactions[0].result.class, "Promise"); +assertEq(true, reactions[0].result !== DOp2); diff --git a/js/src/jit-test/tests/debug/Object-getProperty-01.js b/js/src/jit-test/tests/debug/Object-getProperty-01.js new file mode 100644 index 0000000000..378611b7e2 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getProperty-01.js @@ -0,0 +1,122 @@ +// tests calling script functions via Debugger.Object.prototype.getProperty +"use strict"; + +var global = newGlobal({newCompartment: true}); +var dbg = new Debugger(global); +dbg.onDebuggerStatement = onDebuggerStatement; + +global.eval(` +const normalObj = { }; +const abruptObj = { }; +const sym = Symbol("a symbol key"); + +const arr = [1, 2, 3]; +const obj = { + get stringNormal(){ + return "a value"; + }, + get stringAbrupt() { + throw "a value"; + }, + get objectNormal() { + return normalObj; + }, + get objectAbrupt() { + throw abruptObj; + }, + get context() { + return this; + }, + + 1234: "number key", + [sym]: "symbol key", + stringProp: "a value", + objectProp: {}, + method() { + return "a value"; + }, + undefined: "undefined value", +}; +const propObj = obj.objectProp; +const methodObj = obj.method; + +const objChild = Object.create(obj); + +const proxyChild = new Proxy(obj, {}); + +debugger; +`); + +function onDebuggerStatement(frame) { + const { environment } = frame; + const arr = environment.getVariable("arr"); + const obj = environment.getVariable("obj"); + const objChild = environment.getVariable("objChild"); + const proxyChild = environment.getVariable("proxyChild"); + + const sym = environment.getVariable("sym"); + const normalObj = environment.getVariable("normalObj"); + const abruptObj = environment.getVariable("abruptObj"); + const propObj = environment.getVariable("propObj"); + const methodObj = environment.getVariable("methodObj"); + + assertEq(arr.getProperty(1).return, 2); + assertEq(arr.getProperty("1").return, 2); + + assertEq(obj.getProperty().return, "undefined value"); + + assertEq(obj.getProperty("missing").return, undefined); + + assertEq(obj.getProperty("stringNormal").return, "a value"); + assertEq(obj.getProperty("stringAbrupt").throw, "a value"); + + assertEq(obj.getProperty("objectNormal").return, normalObj); + assertEq(obj.getProperty("objectAbrupt").throw, abruptObj); + + assertEq(obj.getProperty("context").return, obj); + + assertEq(obj.getProperty(1234).return, "number key"); + assertEq(obj.getProperty(sym).return, "symbol key"); + assertEq(obj.getProperty("stringProp").return, "a value"); + assertEq(obj.getProperty("objectProp").return, propObj); + + assertEq(obj.getProperty("method").return, methodObj); + + assertEq(objChild.getProperty().return, "undefined value"); + + assertEq(objChild.getProperty("missing").return, undefined); + + assertEq(objChild.getProperty("stringNormal").return, "a value"); + assertEq(objChild.getProperty("stringAbrupt").throw, "a value"); + + assertEq(objChild.getProperty("objectNormal").return, normalObj); + assertEq(objChild.getProperty("objectAbrupt").throw, abruptObj); + + assertEq(objChild.getProperty("context").return, objChild); + + assertEq(objChild.getProperty(1234).return, "number key"); + assertEq(objChild.getProperty(sym).return, "symbol key"); + assertEq(objChild.getProperty("stringProp").return, "a value"); + assertEq(objChild.getProperty("objectProp").return, propObj); + + assertEq(objChild.getProperty("method").return, methodObj); + + assertEq(proxyChild.getProperty().return, "undefined value"); + + assertEq(proxyChild.getProperty("missing").return, undefined); + + assertEq(proxyChild.getProperty("stringNormal").return, "a value"); + assertEq(proxyChild.getProperty("stringAbrupt").throw, "a value"); + + assertEq(proxyChild.getProperty("objectNormal").return, normalObj); + assertEq(proxyChild.getProperty("objectAbrupt").throw, abruptObj); + + assertEq(proxyChild.getProperty("context").return, proxyChild); + + assertEq(proxyChild.getProperty(1234).return, "number key"); + assertEq(proxyChild.getProperty(sym).return, "symbol key"); + assertEq(proxyChild.getProperty("stringProp").return, "a value"); + assertEq(proxyChild.getProperty("objectProp").return, propObj); + + assertEq(proxyChild.getProperty("method").return, methodObj); +}; diff --git a/js/src/jit-test/tests/debug/Object-getProperty-02.js b/js/src/jit-test/tests/debug/Object-getProperty-02.js new file mode 100644 index 0000000000..cb38cb5a26 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getProperty-02.js @@ -0,0 +1,35 @@ +// tests calling script functions via Debugger.Object.prototype.getProperty +// to see if they trigger debugger traps +"use strict"; + +var global = newGlobal({newCompartment: true}); +var dbg = new Debugger(global); +dbg.onDebuggerStatement = onDebuggerStatement; + +let obj; +global.eval(` +const obj = { + get prop() { + debugger; + return 42; + } +}; + +debugger; +`); + + +function onDebuggerStatement(frame) { + dbg.onDebuggerStatement = onDebuggerStatementGetter; + + obj = frame.environment.getVariable("obj"); +} + +let debuggerRan = false; + +assertEq(obj.getProperty("prop").return, 42); +assertEq(debuggerRan, true); + +function onDebuggerStatementGetter(frame) { + debuggerRan = true; +} diff --git a/js/src/jit-test/tests/debug/Object-getProperty-03.js b/js/src/jit-test/tests/debug/Object-getProperty-03.js new file mode 100644 index 0000000000..a70b7f6e47 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getProperty-03.js @@ -0,0 +1,46 @@ +// tests calling script functions via Debugger.Object.prototype.getProperty +// with different receiver objects. +"use strict"; +load(libdir + "/asserts.js"); + +var global = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var globalDO = dbg.addDebuggee(global); +var windowProxyDO = globalDO.makeDebuggeeValue(global); +dbg.onDebuggerStatement = onDebuggerStatement; + +global.eval(` +const sloppy = { + get getter() { return this; }, +}; +const strict = { + get getter() { "use strict"; return this; }, +}; +debugger; +`); + +function onDebuggerStatement(frame) { + const { environment } = frame; + const sloppy = environment.getVariable("sloppy"); + const strict = environment.getVariable("strict"); + + assertEq(sloppy.getProperty("getter").return, sloppy); + assertEq(sloppy.getProperty("getter", sloppy).return, sloppy); + assertEq(sloppy.getProperty("getter", strict).return, strict); + assertEq(sloppy.getProperty("getter", 1).return.class, "Number"); + assertEq(sloppy.getProperty("getter", true).return.class, "Boolean"); + assertEq(sloppy.getProperty("getter", null).return, windowProxyDO); + assertEq(sloppy.getProperty("getter", undefined).return, windowProxyDO); + assertErrorMessage(() => sloppy.getProperty("getter", {}), TypeError, + "Debugger: expected Debugger.Object, got Object"); + + assertEq(strict.getProperty("getter").return, strict); + assertEq(strict.getProperty("getter", sloppy).return, sloppy); + assertEq(strict.getProperty("getter", strict).return, strict); + assertEq(strict.getProperty("getter", 1).return, 1); + assertEq(strict.getProperty("getter", true).return, true); + assertEq(strict.getProperty("getter", null).return, null); + assertEq(strict.getProperty("getter", undefined).return, undefined); + assertErrorMessage(() => strict.getProperty("getter", {}), TypeError, + "Debugger: expected Debugger.Object, got Object"); +}; diff --git a/js/src/jit-test/tests/debug/Object-getProperty-non-primitive-key.js b/js/src/jit-test/tests/debug/Object-getProperty-non-primitive-key.js new file mode 100644 index 0000000000..649764322e --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-getProperty-non-primitive-key.js @@ -0,0 +1,37 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var gw = dbg.addDebuggee(g); + +g.eval(` + var obj = { + p: 1, + [Symbol.iterator]: 2, + }; +`); + +// Return |key| as an object. +function toObject(key) { + return { + [Symbol.toPrimitive]() { + return key; + } + }; +} + +let obj = gw.getProperty("obj").return; + +for (let key of obj.getOwnPropertyNames()) { + let keyObject = toObject(key); + let value = g.obj[key]; + + assertEq(obj.getProperty(key).return, value); + assertEq(obj.getProperty(keyObject).return, value); +} + +for (let key of obj.getOwnPropertySymbols()) { + let keyObject = toObject(key); + let value = g.obj[key]; + + assertEq(obj.getProperty(key).return, value); + assertEq(obj.getProperty(keyObject).return, value); +} diff --git a/js/src/jit-test/tests/debug/Object-identity-01.js b/js/src/jit-test/tests/debug/Object-identity-01.js new file mode 100644 index 0000000000..2eaaa8ab12 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-identity-01.js @@ -0,0 +1,10 @@ +// Two references to the same object get the same Debugger.Object wrapper. +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.arguments[0], frame.arguments[1]); + hits++; +}; +g.eval("var obj = {}; function f(a, b) { debugger; } f(obj, obj);"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Object-identity-02.js b/js/src/jit-test/tests/debug/Object-identity-02.js new file mode 100644 index 0000000000..f488c25b3e --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-identity-02.js @@ -0,0 +1,10 @@ +// Different objects get different Debugger.Object wrappers. +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.arguments[0] === frame.arguments[1], false); + hits++; +}; +g.eval("function f(a, b) { debugger; } f({}, {});"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Object-identity-03.js b/js/src/jit-test/tests/debug/Object-identity-03.js new file mode 100644 index 0000000000..0e2af5220b --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-identity-03.js @@ -0,0 +1,25 @@ +// The same object gets the same Debugger.Object wrapper at different times, if the difference would be observable. + +var N = 12; + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var wrappers = []; + +dbg.onDebuggerStatement = function (frame) { wrappers.push(frame.arguments[0]); }; +g.eval("var originals = []; function f(x) { originals.push(x); debugger; }"); +for (var i = 0; i < N; i++) + g.eval("f({});"); +assertEq(wrappers.length, N); + +for (var i = 0; i < N; i++) + for (var j = i + 1; j < N; j++) + assertEq(wrappers[i] === wrappers[j], false); + +gc(); + +dbg.onDebuggerStatement = function (frame) { assertEq(frame.arguments[0], wrappers.pop()); }; +g.eval("function h(x) { debugger; }"); +for (var i = 0; i < N; i++) + g.eval("h(originals.pop());"); +assertEq(wrappers.length, 0); diff --git a/js/src/jit-test/tests/debug/Object-isArrowFunction.js b/js/src/jit-test/tests/debug/Object-isArrowFunction.js new file mode 100644 index 0000000000..6d7bd531b6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-isArrowFunction.js @@ -0,0 +1,24 @@ +// Debugger.Object.prototype.isArrowFunction recognizes arrow functions. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gDO = dbg.addDebuggee(g); +var hits = 0; + +function checkIsArrow(shouldBe, expr) { + print(expr); + assertEq(gDO.executeInGlobal(expr).return.isArrowFunction, shouldBe); +} + +checkIsArrow(true, '() => { }'); +checkIsArrow(true, '(a) => { bleh; }'); +checkIsArrow(false, 'Object.getPrototypeOf(() => { })'); +checkIsArrow(false, '(function () { })'); +checkIsArrow(false, 'function f() { } f'); +checkIsArrow((void 0), '({})'); +checkIsArrow(false, 'Math.atan2'); +checkIsArrow(false, 'Function.prototype'); +checkIsArrow(false, 'Function("")'); +checkIsArrow(false, 'new Function("")'); +checkIsArrow(false, '(async function f () {})'); +checkIsArrow(true, '(async () => { })'); diff --git a/js/src/jit-test/tests/debug/Object-isClassConstructor.js b/js/src/jit-test/tests/debug/Object-isClassConstructor.js new file mode 100644 index 0000000000..342e9d1a52 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-isClassConstructor.js @@ -0,0 +1,21 @@ +// Debugger.Object.prototype.isClassConstructor recognizes ES6 classes. + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(); +var gDO = dbg.addDebuggee(g); +var hits = 0; + +function checkIsClassConstructor(shouldBe, expr) { + print(expr); + assertEq(gDO.executeInGlobal(expr).return.isClassConstructor, shouldBe); +} + +checkIsClassConstructor(true, "class MyClass{}; MyClass;"); +checkIsClassConstructor(false, "class MyClass2{}; MyClass2.constructor;"); +checkIsClassConstructor( + false, + "class MyClass3{}; Object.getPrototypeOf(MyClass3)" +); +checkIsClassConstructor(false, "(a) => { bleh; }"); +checkIsClassConstructor(false, "(async function f () {})"); +checkIsClassConstructor(void 0, "({})"); diff --git a/js/src/jit-test/tests/debug/Object-isSameNative-01.js b/js/src/jit-test/tests/debug/Object-isSameNative-01.js new file mode 100644 index 0000000000..9359062cd6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-isSameNative-01.js @@ -0,0 +1,9 @@ +// Test that isSameNative will accept a CCW as an argument. + +var g = newGlobal({ newCompartment: true }); +var dbg = Debugger(); +var gdbg = dbg.addDebuggee(g); + +var g2 = newGlobal({ newCompartment: true }); + +assertEq(gdbg.getProperty("print").return.isSameNative(g2.print), true); diff --git a/js/src/jit-test/tests/debug/Object-isSameNative.js b/js/src/jit-test/tests/debug/Object-isSameNative.js new file mode 100644 index 0000000000..0b26144f21 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-isSameNative.js @@ -0,0 +1,49 @@ +// Test that the onNativeCall hook is called when expected. + +load(libdir + 'eqArrayHelper.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var gdbg = dbg.addDebuggee(g); + +assertEq(gdbg.getProperty("print").return.isSameNative(print), true); +assertEq(gdbg.getProperty("print").return.isSameNative(newGlobal), false); + +g.eval(` +const x = []; +Object.defineProperty(x, "a", { + get: print, + set: print, +}); +function f() { + x.a++; + x.length = 0; + x.push(4, 5, 6); + x.sort(print); +} +`); + +const comparisons = [ + print, + Array.prototype.push, + Array.prototype.sort, // Note: self-hosted + newGlobal +]; + +const rv = []; +dbg.onNativeCall = (callee, reason) => { + for (const fn of comparisons) { + if (callee.isSameNative(fn)) { + rv.push(fn.name); + } + } +} + +for (let i = 0; i < 5; i++) { + rv.length = 0; + gdbg.executeInGlobal(`f()`); + assertEqArray(rv, [ + "print", "print", "push", + "sort", "print", "print", + ]); +} diff --git a/js/src/jit-test/tests/debug/Object-makeDebuggeeValue-01.js b/js/src/jit-test/tests/debug/Object-makeDebuggeeValue-01.js new file mode 100644 index 0000000000..4b281421d4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-makeDebuggeeValue-01.js @@ -0,0 +1,42 @@ +// Debugger.Object.prototype.makeDebuggeeValue creates only one +// Debugger.Object instance for each debuggee object. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval("var x = { 'now playing': 'Joy Division' };"); +g.eval("var y = { 'mood': 'bleak' };"); + +wx = gw.makeDebuggeeValue(g.x); +assertEq(wx, gw.makeDebuggeeValue(g.x)); +assertEq(wx === g.x, false); +assertEq("now playing" in wx, false); +assertEq(wx.getOwnPropertyNames().indexOf("now playing"), 0); +wx.commentary = "deconstruction"; +assertEq("deconstruction" in g.x, false); + +wy = gw.makeDebuggeeValue(g.y); +assertEq(wy === wx, false); +wy.commentary = "reconstruction"; +assertEq(wx.commentary, "deconstruction"); + +// Separate debuggers get separate Debugger.Object instances, but both +// instances' referents are the same underlying object. +var dbg2 = new Debugger(); +var gw2 = dbg2.addDebuggee(g); +w2x = gw2.makeDebuggeeValue(g.x); +assertEq(wx === w2x, false); +w2x.defineProperty("breadcrumb", { value: "pumpernickel" }); +assertEq(wx.getOwnPropertyDescriptor("breadcrumb").value, "pumpernickel"); + +// Non-objects are already debuggee values. +assertEq(gw.makeDebuggeeValue("foonting turlingdromes"), "foonting turlingdromes"); +assertEq(gw.makeDebuggeeValue(true), true); +assertEq(gw.makeDebuggeeValue(false), false); +assertEq(gw.makeDebuggeeValue(null), null); +assertEq(gw.makeDebuggeeValue(1729), 1729); +assertEq(gw.makeDebuggeeValue(Math.PI), Math.PI); +assertEq(gw.makeDebuggeeValue(undefined), undefined); +var s = g.eval("Symbol('Stavromula Beta')"); +assertEq(gw.makeDebuggeeValue(s), s); diff --git a/js/src/jit-test/tests/debug/Object-makeDebuggeeValue-02.js b/js/src/jit-test/tests/debug/Object-makeDebuggeeValue-02.js new file mode 100644 index 0000000000..23c493ea43 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-makeDebuggeeValue-02.js @@ -0,0 +1,12 @@ +// Debugger.Object.prototype.makeDebuggeeValue returns the object wrapped +// the same way as Debugger.Frame.prototype.eval, etc. +var g = newGlobal({newCompartment: true}); +g.eval("function f() { debugger; }"); +var dbg = Debugger(); +var gw = dbg.addDebuggee(g); +var jsonw; +dbg.onDebuggerStatement = function (frame) { + jsonw = frame.eval("JSON").return; +}; +g.eval("debugger;"); +assertEq(gw.makeDebuggeeValue(g.JSON), jsonw); diff --git a/js/src/jit-test/tests/debug/Object-name-01.js b/js/src/jit-test/tests/debug/Object-name-01.js new file mode 100644 index 0000000000..5159720de9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-name-01.js @@ -0,0 +1,17 @@ +// Debugger.Object.prototype.name + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var name; +dbg.onDebuggerStatement = function (frame) { name = frame.callee.name; }; + +g.eval("(function f() { debugger; })();"); +assertEq(name, "f"); +g.eval("(function () { debugger; })();"); +assertEq(name, undefined); +g.eval("Function('debugger;')();"); +assertEq(name, "anonymous"); +g.eval("(async function grondo() { debugger; })();"); +assertEq(name, "grondo"); +g.eval("(async function* estux() { debugger; })().next();"); +assertEq(name, "estux"); diff --git a/js/src/jit-test/tests/debug/Object-name-02.js b/js/src/jit-test/tests/debug/Object-name-02.js new file mode 100644 index 0000000000..b9ae25ca88 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-name-02.js @@ -0,0 +1,16 @@ +// The .name of a non-function object is undefined. + +var g = newGlobal({newCompartment: true}); +var hits = 0; +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.arguments[0].name, undefined); + hits++; +}; +g.eval("function f(nonfunction) { debugger; }"); + +g.eval("f({});"); +g.eval("f(/a*/);"); +g.eval("f({name: 'bad'});"); +g.eval("f(new Proxy({}, {}));"); +assertEq(hits, 4); diff --git a/js/src/jit-test/tests/debug/Object-name-03.js b/js/src/jit-test/tests/debug/Object-name-03.js new file mode 100644 index 0000000000..3ce08918c5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-name-03.js @@ -0,0 +1,49 @@ +// Test `name` and `displayName` getters on a bound function Debugger.Object. + +var g = newGlobal({newCompartment: true}); +var hits = 0; +var dbg = new Debugger(g); + +var nameResults = []; +var displayNameResults = []; +dbg.onDebuggerStatement = function (frame) { + nameResults.push(frame.arguments[0].name); + displayNameResults.push(frame.arguments[0].displayName); +}; +g.eval(` +function f(val) { debugger; } + +function foo() {}; +let bound1 = foo.bind(null); +let bound2 = bound1.bind(); +let bound3 = bound2.bind(); +f(bound1); +f(bound2); +f(bound3); + +// Change bound1.name to "bar". +Object.defineProperty(bound1, "name", {value: "bar", configurable: true, writable: true}); +f(bound1); + +// Change bound1.name to 123. Not a string so now "bound" will be returned. +bound1.name = 123; +f(bound1); + +// Delete bound2.name so now "bound" will be used. +delete bound2.name; +f(bound2); + +// Binding a native function. +f(print.bind().bind().bind()); +`) + +for (let res of [nameResults, displayNameResults]) { + assertEq(res.length, 7); + assertEq(res[0], "bound foo"); + assertEq(res[1], "bound bound foo"); + assertEq(res[2], "bound bound bound foo"); + assertEq(res[3], "bar"); + assertEq(res[4], "bound"); + assertEq(res[5], "bound"); + assertEq(res[6], "bound bound bound print"); +} diff --git a/js/src/jit-test/tests/debug/Object-name-04.js b/js/src/jit-test/tests/debug/Object-name-04.js new file mode 100644 index 0000000000..5e5198d19e --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-name-04.js @@ -0,0 +1,16 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gDO = dbg.addDebuggee(g); + +function check(expr, expected) { + let completion = gDO.executeInGlobal(expr); + assertEq(!completion.throw, true); + + let func = completion.return; + assertEq(func.name, expected); +} + +check("(function foo(){})", "foo"); +check("Map.prototype.set", "set"); +check("Object.getOwnPropertyDescriptor(Map.prototype, 'size').get", "get size"); +check("Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get", "get flags"); diff --git a/js/src/jit-test/tests/debug/Object-parameterNames.js b/js/src/jit-test/tests/debug/Object-parameterNames.js new file mode 100644 index 0000000000..3e3c504714 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-parameterNames.js @@ -0,0 +1,32 @@ +load(libdir + 'array-compare.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gDO = dbg.addDebuggee(g); +var hits = 0; + +function check(expr, expected) { + print("checking " + JSON.stringify(expr)); + + let completion = gDO.executeInGlobal(expr); + if (completion.throw) + throw completion.throw.unsafeDereference(); + + let fn = completion.return; + if (expected === undefined) + assertEq(fn.parameterNames, undefined); + else + assertEq(arraysEqual(fn.parameterNames, expected), true); +} + +check('(function () {})', []); +check('(function (x) {})', ["x"]); +check('(function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) {})', + ["a","b","c","d","e","f","g","h","i","j","k","l","m", + "n","o","p","q","r","s","t","u","v","w","x","y","z"]); +check('(function (a, [b, c], {d, e:f}) { })', + ["a", undefined, undefined]); +check('({a:1})', undefined); +check('Math.atan2', [undefined, undefined]); +check('(async function (a, b, c) {})', ["a", "b", "c"]); +check('(async function* (d, e, f) {})', ["d", "e", "f"]); diff --git a/js/src/jit-test/tests/debug/Object-preventExtensions-01.js b/js/src/jit-test/tests/debug/Object-preventExtensions-01.js new file mode 100644 index 0000000000..d5339e2d3d --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-preventExtensions-01.js @@ -0,0 +1,17 @@ +// Basic preventExtensions test. + +var g = newGlobal({newCompartment: true}); +var obj = g.eval("({x: 1})"); +assertEq(g.Object.isExtensible(obj), true); + +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var objw = gw.makeDebuggeeValue(obj); +assertEq(objw.isExtensible(), true); + +assertEq(objw.preventExtensions(), undefined); +assertEq(g.Object.isExtensible(obj), false); +assertEq(objw.isExtensible(), false); + +// Calling preventExtensions again has no effect. +assertEq(objw.preventExtensions(), undefined); diff --git a/js/src/jit-test/tests/debug/Object-promiseDependentPromises-realms.js b/js/src/jit-test/tests/debug/Object-promiseDependentPromises-realms.js new file mode 100644 index 0000000000..537421f6a0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-promiseDependentPromises-realms.js @@ -0,0 +1,17 @@ +// Bug 1475669 - Cross-compartment dependent promises. + +// Create a promise in realm 1. +let g1 = newGlobal({newCompartment: true}); +let p1 = new g1.Promise((_resolve, _reject) => {}); + +// Add a dependent promise in realm 2. +let g2 = newGlobal({newCompartment: true}); +let p2 = g2.Promise.prototype.then.call(p1, g2.eval(`value => {}`)); + +// Use debugger to find p2 from p1. +let dbg = new Debugger; +let g1w = dbg.addDebuggee(g1); +let g2w = dbg.addDebuggee(g2); +let dependents = g1w.makeDebuggeeValue(p1).promiseDependentPromises; +assertEq(dependents.length, 1); +assertEq(dependents[0], g2w.makeDebuggeeValue(p2)); diff --git a/js/src/jit-test/tests/debug/Object-proto.js b/js/src/jit-test/tests/debug/Object-proto.js new file mode 100644 index 0000000000..065810a0b4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-proto.js @@ -0,0 +1,23 @@ +// Debugger.Object.prototype.proto +var g = newGlobal({newCompartment: true}); +var dbgeval = function () { + var dbg = new Debugger(g); + var hits = 0; + g.eval("function f() { debugger; }"); + var lastval; + dbg.onDebuggerStatement = function (frame) { lastval = frame.arguments[0]; }; + return function dbgeval(s) { + g.eval("f(" + s + ");"); + return lastval; + }; + }(); + +var Op = dbgeval("Object.prototype"); +assertEq(Op.proto, null); +assertEq(dbgeval("({})").proto, Op); + +var Ap = dbgeval("[]").proto; +assertEq(Ap, dbgeval("Array.prototype")); +assertEq(Ap.proto, Op); + +assertEq(dbgeval("Object").proto, dbgeval("Function.prototype")); diff --git a/js/src/jit-test/tests/debug/Object-proxy.js b/js/src/jit-test/tests/debug/Object-proxy.js new file mode 100644 index 0000000000..c32233c9c7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-proxy.js @@ -0,0 +1,44 @@ +// Debugger.Object.prototype.isProxy recognizes (scripted) proxies. +// Debugger.Object.prototype.proxyTarget exposes the [[Proxytarget]] of a proxy. +// Debugger.Object.prototype.proxyHandler exposes the [[ProxyHandler]] of a proxy. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gDO = dbg.addDebuggee(g); + +g.eval('var target = [1,2,3];'); +g.eval('var handler = {has: ()=>false};'); +g.eval('var proxy = new Proxy(target, handler);'); +g.eval('var proxyProxy = new Proxy(proxy, proxy);'); +g.eval('var revoker = Proxy.revocable(target, handler);'); +g.eval('var revocable = revoker.proxy;'); + +var target = gDO.getOwnPropertyDescriptor('target').value; +var handler = gDO.getOwnPropertyDescriptor('handler').value; +var proxy = gDO.getOwnPropertyDescriptor('proxy').value; +var proxyProxy = gDO.getOwnPropertyDescriptor('proxyProxy').value; +var revocable = gDO.getOwnPropertyDescriptor('revocable').value; + +assertEq(target.isProxy, false); +assertEq(target.proxyTarget, undefined); +assertEq(target.proxyHandler, undefined); + +assertEq(handler.isProxy, false); +assertEq(handler.proxyTarget, undefined); +assertEq(handler.proxyHandler, undefined); + +assertEq(proxy.isProxy, true); +assertEq(proxy.proxyTarget, target); +assertEq(proxy.proxyHandler, handler); + +assertEq(proxyProxy.isProxy, true); +assertEq(proxyProxy.proxyTarget, proxy); +assertEq(proxyProxy.proxyHandler, proxy); + +assertEq(revocable.isProxy, true); +assertEq(revocable.proxyTarget, target); +assertEq(revocable.proxyHandler, handler); +g.eval('revoker.revoke();'); +assertEq(revocable.isProxy, true); +assertEq(revocable.proxyTarget, null); +assertEq(revocable.proxyHandler, null); diff --git a/js/src/jit-test/tests/debug/Object-script-AsmJSNative.js b/js/src/jit-test/tests/debug/Object-script-AsmJSNative.js new file mode 100644 index 0000000000..3854f7f03d --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-script-AsmJSNative.js @@ -0,0 +1,15 @@ +function test(stdlib, foreign) { + "use asm" + function f(y) { + y = +y; + } + return f; +}; +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval(` + var dbg = new Debugger(); + var parentw = dbg.addDebuggee(parent); + var testw = parentw.makeDebuggeeValue(parent.test); + var scriptw = testw.script; +`); diff --git a/js/src/jit-test/tests/debug/Object-script-environment-nondebuggee.js b/js/src/jit-test/tests/debug/Object-script-environment-nondebuggee.js new file mode 100644 index 0000000000..3e77bc89d5 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-script-environment-nondebuggee.js @@ -0,0 +1,24 @@ +// The script and environment of a non-debuggee function are null. + +var g = newGlobal({newCompartment: true}); +g.eval('function f() { return "from f"; }'); + +var dbg = new Debugger; +var gw = dbg.makeGlobalObjectReference(g); +var fw = gw.getOwnPropertyDescriptor('f').value; + +// g is not a debuggee, so we can't fetch f's script or environment. +assertEq(fw.script, null); +assertEq(fw.environment, null); + +// If we add g as a debuggee, we can fetch f's script and environment. +dbg.addDebuggee(g); +var fscript = fw.script; +var fenv = fw.environment; +assertEq(fscript instanceof Debugger.Script, true); +assertEq(fenv instanceof Debugger.Environment, true); + +// Removing g as a debuggee makes the script and environment inaccessible again. +dbg.removeDebuggee(g); +assertEq(fw.script, null); +assertEq(fw.environment, null); diff --git a/js/src/jit-test/tests/debug/Object-script-lazy.js b/js/src/jit-test/tests/debug/Object-script-lazy.js new file mode 100644 index 0000000000..68af0e2973 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-script-lazy.js @@ -0,0 +1,57 @@ +// Asking for the script of a Debugger.Object should work, even when lazy +// functions are involved. + +// Note that we never hand out the scripts of non-debuggee functions, and +// putting a compartment in debug mode automatically de-lazifies all its +// functions. (This ensures that findScripts works, too.) +// +// So here we create a reference to a non-debuggee function, verify that we +// can't access its interesting properties, make it a debuggee, and verify +// that everything becomes available. + +// Create functions f, g in a non-debuggee compartment. +var g1 = newGlobal({newCompartment: true}); +g1.eval('function f() { return "from f"; }'); +g1.eval('function g() { return "from g"; }'); +g1.eval('this.h = f.bind(g, 42, "foo");'); + +// Create a debuggee compartment with CCWs referring to f and g. +var g2 = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var g2w = dbg.addDebuggee(g2); +g2.f = g1.f; +g2.g = g1.g; +g2.h = g1.h; + +// At this point, g1.f should still be a lazy function. Unwrapping a D.O +// referring to g2's CCW of f should yield a D.O referring to f directly. +// Asking for that second D.O's script should yield null, because it's not +// a debuggee. +var fDO = g2w.getOwnPropertyDescriptor('f').value; +assertEq(fDO.unwrap().class, "Function"); +assertEq(fDO.unwrap().script, null); + +// Similarly for g1.g, and asking for its parameter names. +var gDO = g2w.getOwnPropertyDescriptor('g').value; +assertEq(gDO.unwrap().parameterNames, undefined); + +// Similarly for g1.h, and asking for its bound function properties. +var hDO = g2w.getOwnPropertyDescriptor('h').value; +assertEq(hDO.unwrap().class, "BoundFunctionObject"); +assertEq(hDO.unwrap().isBoundFunction, true); +assertEq(hDO.unwrap().isArrowFunction, undefined); +assertEq(hDO.unwrap().boundTargetFunction, undefined); +assertEq(hDO.unwrap().boundThis, undefined); +assertEq(hDO.unwrap().boundArguments, undefined); + +// Add g1 as a debuggee, and verify that we can get everything. +dbg.addDebuggee(g1); +assertEq(fDO.unwrap().script instanceof Debugger.Script, true); +assertEq(gDO.unwrap().parameterNames instanceof Array, true); +assertEq(hDO.unwrap().isBoundFunction, true); +assertEq(hDO.unwrap().isArrowFunction, undefined); +assertEq(hDO.unwrap().boundTargetFunction, fDO.unwrap()); +assertEq(hDO.unwrap().boundThis, gDO.unwrap()); +assertEq(hDO.unwrap().boundArguments.length, 2); +assertEq(hDO.unwrap().boundArguments[0], 42); +assertEq(hDO.unwrap().boundArguments[1], "foo"); diff --git a/js/src/jit-test/tests/debug/Object-script.js b/js/src/jit-test/tests/debug/Object-script.js new file mode 100644 index 0000000000..fbaa0232fa --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-script.js @@ -0,0 +1,25 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gDO = dbg.addDebuggee(g); + +function check(expr, expected) { + print("checking " + JSON.stringify(expr) + ", expecting " + + (expected ? "script" : "no script")); + + let completion = gDO.executeInGlobal(expr); + if (completion.throw) + throw completion.throw.unsafeDereference(); + + let val = completion.return; + if (expected) + assertEq(val.script instanceof Debugger.Script, true); + else + assertEq(val.script, undefined); +} + +check('(function g(){})', true); +check('(function* h() {})', true); +check('(async function j() {})', true); +check('(async function* k() {})', true); +check('({})', false); +check('Math.atan2', false); diff --git a/js/src/jit-test/tests/debug/Object-seal-01.js b/js/src/jit-test/tests/debug/Object-seal-01.js new file mode 100644 index 0000000000..f8190f4ecc --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-seal-01.js @@ -0,0 +1,63 @@ +// Basic tests for obj.{seal,freeze,preventExtensions,isSealed,isFrozen,isExtensible}. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +g.eval("function compareObjects() {\n" + + " assertEq(Object.isExtensible(x), Object.isExtensible(y));\n" + + " var xnames = Object.getOwnPropertyNames(x).sort();\n" + + " var ynames = Object.getOwnPropertyNames(y).sort();\n" + + " assertEq(xnames.length, ynames.length);\n" + + " for (var i = 0; i < xnames.length; i++) {\n" + + " assertEq(xnames[i], ynames[i]);\n" + + " var name = xnames[i];\n" + + " var xd = Object.getOwnPropertyDescriptor(x, name);\n" + + " var yd = Object.getOwnPropertyDescriptor(y, name);\n" + + " assertEq(xd.configurable, yd.configurable, code + '.' + name + ' .configurable');\n" + + " assertEq(xd.enumerable, yd.enumerable, code + '.' + name + ' .enumerable');\n" + + " assertEq(xd.writable, yd.writable, code + '.' + name + ' .writable');\n" + + " }\n" + + "}\n"); + +function test(code) { + g.code = code; + g.eval("x = (" + code + ");"); + g.eval("y = (" + code + ");"); + var xw = gw.getOwnPropertyDescriptor("x").value; + + function check() { + // The Debugger.Object seal/freeze/preventExtensions methods + // had the same effect as the corresponding ES5 Object methods. + g.compareObjects(); + + // The Debugger.Object introspection methods agree with the ES5 Object methods. + assertEq(xw.isExtensible(), g.Object.isExtensible(g.x), code + ' isExtensible'); + assertEq(xw.isSealed(), g.Object.isSealed(g.x), code + ' isSealed'); + assertEq(xw.isFrozen(), g.Object.isFrozen(g.x), code + ' isFrozen'); + } + + check(); + + xw.preventExtensions(); + assertEq(g.Object.isExtensible(g.x), false, code + ' preventExtensions'); + g.Object.preventExtensions(g.y); + check(); + + xw.seal(); + assertEq(g.Object.isSealed(g.x), true, code + ' seal'); + g.Object.seal(g.y); + check(); + + xw.freeze(); + assertEq(g.Object.isFrozen(g.x), true, code + ' freeze'); + g.Object.freeze(g.y); + check(); +} + +test("{}"); +test("{a: [1], get b() { return -1; }}"); +test("Object.create(null, {x: {value: 3}, y: {get: Math.min}})"); +test("[]"); +test("[,,,,,]"); +test("[0, 1, 2]"); diff --git a/js/src/jit-test/tests/debug/Object-setProperty-01.js b/js/src/jit-test/tests/debug/Object-setProperty-01.js new file mode 100644 index 0000000000..cde5f68e54 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-setProperty-01.js @@ -0,0 +1,185 @@ +// tests calling script functions via Debugger.Object.prototype.setProperty +"use strict"; + +var global = newGlobal({newCompartment: true}); +var dbg = new Debugger(global); +dbg.onDebuggerStatement = onDebuggerStatement; + +global.eval(` +const sym = Symbol("a symbol key"); + +const arr = []; +const obj = { + set stringNormal(value) { + this._stringNormal = value; + }, + set stringAbrupt(value) { + throw value; + }, + + set objectNormal(value) { + this._objectNormal = value; + }, + set objectAbrupt(value) { + throw value; + }, + + set context(value) { + this._context = this; + }, + + set 1234(value) { + this._1234 = value; + }, + + set [sym](value) { + this._sym = value; + }, + + get getterOnly() {}, + readOnly: "", + + stringProp: "", + objProp: {}, +}; +Object.defineProperty(obj, "readOnly", { writable: false }); + +const objChild = Object.create(obj); +const proxyChild = new Proxy(obj, {}); + +const testObj = { }; +const testChildObj = { }; +const testProxyObj = { }; + +debugger; +`); + +function onDebuggerStatement(frame) { + const { environment } = frame; + const sym = environment.getVariable("sym"); + const arr = environment.getVariable("arr"); + const obj = environment.getVariable("obj"); + const objChild = environment.getVariable("objChild"); + const proxyChild = environment.getVariable("proxyChild"); + + assertEq(arr.setProperty(1, "index 1").return, true); + assertEq(arr.getProperty(1).return, "index 1"); + assertEq(arr.getProperty("1").return, "index 1"); + assertEq(arr.getProperty(0).return, undefined); + assertEq(arr.getProperty("length").return, 2); + + assertEq(arr.setProperty("2", "index 2").return, true); + assertEq(arr.getProperty(2).return, "index 2"); + assertEq(arr.getProperty("2").return, "index 2"); + assertEq(arr.getProperty(0).return, undefined); + assertEq(arr.getProperty("length").return, 3); + + const testObj = environment.getVariable("testObj"); + assertEq(obj.setProperty("undefined", 123).return, true); + assertEq(obj.getProperty("undefined").return, 123); + assertEq(obj.setProperty().return, true); + assertEq(obj.getProperty("undefined").return, undefined); + + assertEq(obj.setProperty("missing", 42).return, true); + assertEq(obj.getProperty("missing").return, 42); + + assertEq(obj.setProperty("stringNormal", "a normal value").return, true); + assertEq(obj.getProperty("_stringNormal").return, "a normal value"); + assertEq(obj.setProperty("stringAbrupt", "an abrupt value").throw, "an abrupt value"); + + assertEq(obj.setProperty("objectNormal", testObj).return, true); + assertEq(obj.getProperty("_objectNormal").return, testObj); + assertEq(obj.setProperty("objectAbrupt", testObj).throw, testObj); + + assertEq(obj.setProperty("context", "a value").return, true); + assertEq(obj.getProperty("_context").return, obj); + + assertEq(obj.setProperty(1234, "number value").return, true); + assertEq(obj.getProperty("_1234").return, "number value"); + + assertEq(obj.setProperty(sym, "symbol value").return, true); + assertEq(obj.getProperty("_sym").return, "symbol value"); + + assertEq(obj.setProperty("getterOnly", "a value").return, false); + assertEq(obj.setProperty("readOnly", "a value").return, false); + + assertEq(obj.setProperty("stringProp", "a normal value").return, true); + assertEq(obj.getProperty("stringProp").return, "a normal value"); + + assertEq(obj.setProperty("objectProp", testObj).return, true); + assertEq(obj.getProperty("objectProp").return, testObj); + + const testChildObj = environment.getVariable("testChildObj"); + assertEq(objChild.setProperty("undefined", 123).return, true); + assertEq(objChild.getProperty("undefined").return, 123); + assertEq(objChild.setProperty().return, true); + assertEq(objChild.getProperty("undefined").return, undefined); + + assertEq(objChild.setProperty("missing", 42).return, true); + assertEq(objChild.getProperty("missing").return, 42); + + assertEq(objChild.setProperty("stringNormal", "a normal child value").return, true); + assertEq(objChild.getProperty("_stringNormal").return, "a normal child value"); + + assertEq(objChild.setProperty("stringAbrupt", "an abrupt child value").throw, "an abrupt child value"); + + assertEq(objChild.setProperty("objectNormal", testChildObj).return, true); + assertEq(objChild.getProperty("_objectNormal").return, testChildObj); + + assertEq(objChild.setProperty("objectAbrupt", testChildObj).throw, testChildObj); + + assertEq(objChild.setProperty("context", "a value").return, true); + assertEq(objChild.getProperty("_context").return, objChild); + + assertEq(objChild.setProperty(1234, "number value").return, true); + assertEq(objChild.getProperty("_1234").return, "number value"); + + assertEq(objChild.setProperty(sym, "symbol value").return, true); + assertEq(objChild.getProperty("_sym").return, "symbol value"); + + assertEq(objChild.setProperty("getterOnly", "a value").return, false); + assertEq(objChild.setProperty("readOnly", "a value").return, false); + + assertEq(objChild.setProperty("stringProp", "a normal child value").return, true); + assertEq(objChild.getProperty("stringProp").return, "a normal child value"); + + assertEq(objChild.setProperty("objectProp", testChildObj).return, true); + assertEq(objChild.getProperty("objectProp").return, testChildObj); + + const testProxyObj = environment.getVariable("testProxyObj"); + assertEq(proxyChild.setProperty("undefined", 123).return, true); + assertEq(proxyChild.getProperty("undefined").return, 123); + assertEq(proxyChild.setProperty().return, true); + assertEq(proxyChild.getProperty("undefined").return, undefined); + + assertEq(proxyChild.setProperty("missing", 42).return, true); + assertEq(proxyChild.getProperty("missing").return, 42); + + assertEq(proxyChild.setProperty("stringNormal", "a normal child value").return, true); + assertEq(proxyChild.getProperty("_stringNormal").return, "a normal child value"); + + assertEq(proxyChild.setProperty("stringAbrupt", "an abrupt child value").throw, "an abrupt child value"); + + assertEq(proxyChild.setProperty("objectNormal", testProxyObj).return, true); + assertEq(proxyChild.getProperty("_objectNormal").return, testProxyObj); + + assertEq(proxyChild.setProperty("objectAbrupt", testProxyObj).throw, testProxyObj); + + assertEq(proxyChild.setProperty("context", "a value").return, true); + assertEq(proxyChild.getProperty("_context").return, proxyChild); + + assertEq(proxyChild.setProperty(1234, "number value").return, true); + assertEq(proxyChild.getProperty("_1234").return, "number value"); + + assertEq(proxyChild.setProperty(sym, "symbol value").return, true); + assertEq(proxyChild.getProperty("_sym").return, "symbol value"); + + assertEq(proxyChild.setProperty("getterOnly", "a value").return, false); + assertEq(proxyChild.setProperty("readOnly", "a value").return, false); + + assertEq(proxyChild.setProperty("stringProp", "a normal child value").return, true); + assertEq(proxyChild.getProperty("stringProp").return, "a normal child value"); + + assertEq(proxyChild.setProperty("objectProp", testProxyObj).return, true); + assertEq(proxyChild.getProperty("objectProp").return, testProxyObj); +}; diff --git a/js/src/jit-test/tests/debug/Object-setProperty-02.js b/js/src/jit-test/tests/debug/Object-setProperty-02.js new file mode 100644 index 0000000000..42b61f8190 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-setProperty-02.js @@ -0,0 +1,36 @@ +// tests calling script functions via Debugger.Object.prototype.setProperty +// to see if they trigger debugger traps +"use strict"; + +var global = newGlobal({newCompartment: true}); +var dbg = new Debugger(global); +dbg.onDebuggerStatement = onDebuggerStatement; + +let obj; +global.eval(` +const obj = { + set prop(val) { + debugger; + this._prop = val; + } +}; + +debugger; +`); + + +function onDebuggerStatement(frame) { + dbg.onDebuggerStatement = onDebuggerStatementGetter; + + obj = frame.environment.getVariable("obj"); +} + +let debuggerRan = false; + +assertEq(obj.setProperty("prop", 42).return, true); +assertEq(obj.getProperty("_prop").return, 42); +assertEq(debuggerRan, true); + +function onDebuggerStatementGetter(frame) { + debuggerRan = true; +} diff --git a/js/src/jit-test/tests/debug/Object-setProperty-03.js b/js/src/jit-test/tests/debug/Object-setProperty-03.js new file mode 100644 index 0000000000..002553c477 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-setProperty-03.js @@ -0,0 +1,67 @@ +// tests calling script functions via Debugger.Object.prototype.setProperty +// with different receiver objects. +"use strict"; +load(libdir + "/asserts.js"); + +var global = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var globalDO = dbg.addDebuggee(global); +var windowProxyDO = globalDO.makeDebuggeeValue(global); +dbg.onDebuggerStatement = onDebuggerStatement; + +global.eval(` +let receiver; +function check(value, thisVal) { + receiver = thisVal; + if (value !== "value") throw "Unexpected value"; +} +const sloppy = { + set setter(value) { check(value, this); }, +}; +const strict = { + set setter(value) { "use strict"; check(value, this); }, +}; +debugger; +`); + +function onDebuggerStatement(frame) { + const { environment } = frame; + const sloppy = environment.getVariable("sloppy"); + const strict = environment.getVariable("strict"); + const receiver = () => environment.getVariable("receiver"); + const value = "value"; + + assertEq(sloppy.setProperty("setter", value).return, true); + assertEq(receiver(), sloppy); + assertEq(sloppy.setProperty("setter", value, sloppy).return, true); + assertEq(receiver(), sloppy); + assertEq(sloppy.setProperty("setter", value, strict).return, true); + assertEq(receiver(), strict); + assertEq(sloppy.setProperty("setter", value, 1).return, true); + assertEq(receiver().class, "Number"); + assertEq(sloppy.setProperty("setter", value, true).return, true); + assertEq(receiver().class, "Boolean"); + assertEq(sloppy.setProperty("setter", value, null).return, true); + assertEq(receiver(), windowProxyDO); + assertEq(sloppy.setProperty("setter", value, undefined).return, true); + assertEq(receiver(), windowProxyDO); + assertErrorMessage(() => sloppy.setProperty("setter", value, {}), TypeError, + "Debugger: expected Debugger.Object, got Object"); + + assertEq(strict.setProperty("setter", value).return, true); + assertEq(receiver(), strict); + assertEq(strict.setProperty("setter", value, sloppy).return, true); + assertEq(receiver(), sloppy); + assertEq(strict.setProperty("setter", value, strict).return, true); + assertEq(receiver(), strict); + assertEq(strict.setProperty("setter", value, 1).return, true); + assertEq(receiver(), 1); + assertEq(strict.setProperty("setter", value, true).return, true); + assertEq(receiver(), true); + assertEq(strict.setProperty("setter", value, null).return, true); + assertEq(receiver(), null); + assertEq(strict.setProperty("setter", value, undefined).return, true); + assertEq(receiver(), undefined); + assertErrorMessage(() => strict.setProperty("setter", value, {}), TypeError, + "Debugger: expected Debugger.Object, got Object"); +}; diff --git a/js/src/jit-test/tests/debug/Object-setProperty-non-primitive-key.js b/js/src/jit-test/tests/debug/Object-setProperty-non-primitive-key.js new file mode 100644 index 0000000000..e6aaa138a4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-setProperty-non-primitive-key.js @@ -0,0 +1,49 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var gw = dbg.addDebuggee(g); + +g.eval(` + var obj = { + p: 0, + [Symbol.iterator]: 0, + }; +`); + +// Return |key| as an object. +function toObject(key) { + return { + [Symbol.toPrimitive]() { + return key; + } + }; +} + +let obj = gw.getProperty("obj").return; + +for (let key of obj.getOwnPropertyNames()) { + let keyObject = toObject(key); + + g.obj[key] = 1; + assertEq(g.obj[key], 1); + assertEq(obj.setProperty(key, 2).return, true); + assertEq(g.obj[key], 2); + + g.obj[key] = 1; + assertEq(g.obj[key], 1); + assertEq(obj.setProperty(keyObject, 2).return, true); + assertEq(g.obj[key], 2); +} + +for (let key of obj.getOwnPropertySymbols()) { + let keyObject = toObject(key); + + g.obj[key] = 1; + assertEq(g.obj[key], 1); + assertEq(obj.setProperty(key, 2).return, true); + assertEq(g.obj[key], 2); + + g.obj[key] = 1; + assertEq(g.obj[key], 1); + assertEq(obj.setProperty(keyObject, 2).return, true); + assertEq(g.obj[key], 2); +} diff --git a/js/src/jit-test/tests/debug/Object-unsafeDereference-01.js b/js/src/jit-test/tests/debug/Object-unsafeDereference-01.js new file mode 100644 index 0000000000..daac3555e2 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-unsafeDereference-01.js @@ -0,0 +1,10 @@ +// Debugger.Object.prototype.unsafeDereference returns the referent directly. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +assertEq(gw.getOwnPropertyDescriptor('Math').value.unsafeDereference(), g.Math); + +g.eval('var obj = {}'); +assertEq(gw.getOwnPropertyDescriptor('obj').value.unsafeDereference(), g.obj); diff --git a/js/src/jit-test/tests/debug/Object-unwrap-01.js b/js/src/jit-test/tests/debug/Object-unwrap-01.js new file mode 100644 index 0000000000..345723e0e8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-unwrap-01.js @@ -0,0 +1,23 @@ +// Check Debugger.Object.prototype.unwrap surfaces. + +load(libdir + 'asserts.js'); + +var dbg = new Debugger(); +var g = newGlobal({newCompartment: true}); +var gw = dbg.addDebuggee(g); + +assertEq(Object.getOwnPropertyDescriptor(gw, 'unwrap'), undefined); +var d = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(gw), 'unwrap'); +assertEq(d.enumerable, false); +assertEq(d.configurable, true); +assertEq(d.writable, true); + +assertEq(typeof gw.unwrap, "function"); +assertEq(gw.unwrap.length, 0); +assertEq(gw.unwrap.name, "unwrap"); + +// It can be called. +gw.unwrap(); + +// You shouldn't be able to apply the accessor to the prototype. +assertThrowsInstanceOf(function () { Debugger.Object.prototype.unwrap(); }, TypeError); diff --git a/js/src/jit-test/tests/debug/Object-unwrap-02.js b/js/src/jit-test/tests/debug/Object-unwrap-02.js new file mode 100644 index 0000000000..3d65db2fe7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-unwrap-02.js @@ -0,0 +1,21 @@ +// Debugger.Object.prototype.unwrap unwraps Debugger.Objects referring to +// cross-compartment wrappers. + +var dbg = new Debugger(); + +var g1 = newGlobal({newCompartment: true}); +var dg1 = dbg.addDebuggee(g1); +assertEq(dg1.unwrap(), dg1); + +var g2 = newGlobal({newCompartment: true}); +var dg2 = dbg.addDebuggee(g2); + +var dg1g2 = dg1.makeDebuggeeValue(g2); +assertEq(dg1g2.unwrap(), dg2.makeDebuggeeValue(g2)); + +// Try an ordinary object, not a global. +var g2o = g2.Object(); +var dg2o = dg2.makeDebuggeeValue(g2o); +var dg1g2o = dg1.makeDebuggeeValue(g2o); +assertEq(dg1g2o.unwrap(), dg2o); +assertEq(dg1g2o.unwrap().unwrap(), dg2o); diff --git a/js/src/jit-test/tests/debug/Object-unwrap-03.js b/js/src/jit-test/tests/debug/Object-unwrap-03.js new file mode 100644 index 0000000000..d6c9180be6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-unwrap-03.js @@ -0,0 +1,15 @@ +// Debugger.Object.prototype.unwrap should not let us see things in +// invisible-to-Debugger compartments. + +load(libdir + 'asserts.js'); + +var g = newGlobal({ newCompartment: true, invisibleToDebugger: true }); + +var dbg = new Debugger; + +// Create a wrapper in our compartment for the global. +// Note that makeGlobalObjectReference won't do: it tries to dereference as far +// as it can go. +var /* yo */ DOwg = dbg.makeGlobalObjectReference(this).makeDebuggeeValue(g); + +assertThrowsInstanceOf(() => DOwg.unwrap(), Error); diff --git a/js/src/jit-test/tests/debug/Promise-race-dependent-promises.js b/js/src/jit-test/tests/debug/Promise-race-dependent-promises.js new file mode 100644 index 0000000000..196d29aeae --- /dev/null +++ b/js/src/jit-test/tests/debug/Promise-race-dependent-promises.js @@ -0,0 +1,46 @@ +// Promise.race(...) may add a dummy PromiseReaction which is only used for the +// debugger. +// +// See BlockOnPromise when called from PerformPromiseRace for when this dummy +// reaction is created. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +function test(withFastPath) { + g.eval(` + function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; + } + + var {promise: alwaysPending} = newPromiseCapability(); + + if (!${withFastPath}) { + // Disable the BlockOnPromise fast path by giving |alwaysPending| a + // non-default "then" function property. This will ensure the dummy + // reaction is created. + alwaysPending.then = function() {}; + } + + var result = Promise.race([alwaysPending]); + `); + + var alwaysPending = gw.makeDebuggeeValue(g.alwaysPending); + var result = gw.makeDebuggeeValue(g.result); + + assertEq(alwaysPending.promiseDependentPromises.length, 1); + assertEq(alwaysPending.promiseDependentPromises[0], result); + + assertEq(result.promiseDependentPromises.length, 0); +} + +// No dummy reaction created when the fast path is taken. +test(true); + +// Dummy reaction is created when we can't take the fast path. +test(false); diff --git a/js/src/jit-test/tests/debug/RematerializedFrame-retval.js b/js/src/jit-test/tests/debug/RematerializedFrame-retval.js new file mode 100644 index 0000000000..f426d6e5f0 --- /dev/null +++ b/js/src/jit-test/tests/debug/RematerializedFrame-retval.js @@ -0,0 +1,39 @@ +// |jit-test| slow; error: InternalError; --baseline-eager; --ion-eager +// Make sure that return values we store in RematerializedFrames via resumption +// values get propagated to the BaselineFrames we build from them. +// +// Test case from bug 1285939; there's another in bug 1282518, but this one +// takes less time to run, when it doesn't crash. + +var lfLogBuffer = ` +function testResumptionVal(resumptionVal, turnOffDebugMode) { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + setInterruptCallback(function () { + dbg.addDebuggee(g); + var frame = dbg.getNewestFrame(); + frame.onStep = function () { + frame.onStep = undefined; + return resumptionVal; + }; + return true; + }); + try { + return g.eval("(" + function f() { + invokeInterruptCallback(function (interruptRv) { + f({ valueOf: function () { dbg.g(dbg); }}); + }); + } + ")();"); + } finally { } +} +assertEq(testResumptionVal({ return: "not 42" }), "not 42"); +`; +loadFile(lfLogBuffer); +function loadFile(lfVarx) { + try { + let m = parseModule(lfVarx); + moduleLink(m); + moduleEvaluate(m); + } catch (lfVare) {} +} + diff --git a/js/src/jit-test/tests/debug/Script-01.js b/js/src/jit-test/tests/debug/Script-01.js new file mode 100644 index 0000000000..c88d6bc3e2 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-01.js @@ -0,0 +1,70 @@ +// We get the same Debugger.Script object instance each time we ask. + +var global = newGlobal({newCompartment: true}); +global.eval('function f() { debugger; }'); +global.eval('function g() { debugger; }'); + +var debug = new Debugger(global); + +function evalAndNoteScripts(prog) { + var scripts = {}; + debug.onDebuggerStatement = function(frame) { + if (frame.type == "call") + assertEq(frame.script, frame.callee.script); + scripts.frame = frame.script; + if (frame.arguments[0]) + scripts.argument = frame.arguments[0].script; + }; + global.eval(prog); + return scripts; +} + +// If we create a frame for a function and pass it as a value, those should +// both yield the same Debugger.Script instance. +var scripts = evalAndNoteScripts('f(f)'); +assertEq(scripts.frame, scripts.argument); +var fScript = scripts.argument; + +// If we call a second time, we should still get the same instance. +scripts = evalAndNoteScripts('f(f)'); +assertEq(scripts.frame, fScript); +assertEq(scripts.argument, fScript); + +// If we call with a different argument, we should get a different Debugger.Script. +scripts = evalAndNoteScripts('f(g)'); +assertEq(scripts.frame !== scripts.argument, true); +assertEq(scripts.frame, fScript); +var gScript = scripts.argument; + +// See if we can get g via the frame. +scripts = evalAndNoteScripts('g(f)'); +assertEq(scripts.frame !== scripts.argument, true); +assertEq(scripts.frame, gScript); +assertEq(scripts.argument, fScript); + +// Different closures made from the same 'function' expression should yield +// the same script. +global.eval('function gen1(x) { return function clo(y) { return x+y; }; }'); +global.eval('var clo1 = gen1(42);'); +global.eval('var clo2 = gen1("smoot");'); +var scripts1 = evalAndNoteScripts('f(clo1)'); +var scripts2 = evalAndNoteScripts('f(clo2)'); +assertEq(scripts1.argument, scripts2.argument); + +// Different closures made from the same 'function' declaration should yield +// the same script. +global.eval('function gen2(x) { function clo(y) { return x+y; }; return clo; }'); +global.eval('var clo1 = gen2(42);'); +global.eval('var clo2 = gen2("smoot");'); +var scripts1 = evalAndNoteScripts('f(clo1)'); +var scripts2 = evalAndNoteScripts('f(clo2)'); +assertEq(scripts1.argument, scripts2.argument); + +// Different closures made from the same 'function' statement should yield +// the same script. +global.eval('function gen3(x) { if (true) { function clo(y) { return x+y; }; return clo; } }'); +global.eval('var clo1 = gen3(42);'); +global.eval('var clo2 = gen3("smoot");'); +var scripts1 = evalAndNoteScripts('f(clo1)'); +var scripts2 = evalAndNoteScripts('f(clo2)'); +assertEq(scripts1.argument, scripts2.argument); diff --git a/js/src/jit-test/tests/debug/Script-02.js b/js/src/jit-test/tests/debug/Script-02.js new file mode 100644 index 0000000000..071dc465ae --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-02.js @@ -0,0 +1,6 @@ +// Debugger.Script throws when applied as a constructor. + +load(libdir + 'asserts.js'); + +assertThrowsInstanceOf(function() { Debugger.Script(); }, TypeError); +assertThrowsInstanceOf(function() { new Debugger.Script(); }, TypeError); diff --git a/js/src/jit-test/tests/debug/Script-clearBreakpoint-01.js b/js/src/jit-test/tests/debug/Script-clearBreakpoint-01.js new file mode 100644 index 0000000000..631e9b0a29 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-clearBreakpoint-01.js @@ -0,0 +1,19 @@ +// A breakpoint handler may clear itself. + +var g = newGlobal({newCompartment: true}); +var bphits = 0; +var handler = {hit: function (frame) { frame.script.clearBreakpoint(this); bphits++; }}; +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var offs = frame.script.getLineOffsets(g.line0 + 3); + for (var i = 0; i < offs.length; i++) + frame.script.setBreakpoint(offs[i], handler); + hits++; +}; +g.eval("var line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "for (var i = 0; i < 4; i++)\n" + // line0 + 2 + " result = 'ok';\n"); // line0 + 3 +assertEq(hits, 1); +assertEq(bphits, 1); diff --git a/js/src/jit-test/tests/debug/Script-clearBreakpoint-02.js b/js/src/jit-test/tests/debug/Script-clearBreakpoint-02.js new file mode 100644 index 0000000000..2de4eb210e --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-clearBreakpoint-02.js @@ -0,0 +1,26 @@ +// A breakpoint cleared during dispatch does not fire. +// (Breakpoint dispatch is well-behaved even when breakpoint handlers clear other breakpoints.) + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var log = ''; +dbg.onDebuggerStatement = function (frame) { + var s = frame.script; + function handler(i) { + if (i === 1) + return function () { log += i; s.clearBreakpoint(h[1]); s.clearBreakpoint(h[2]); }; + return function () { log += i; }; + } + var offs = s.getLineOffsets(g.line0 + 2); + var h = []; + for (var i = 0; i < 4; i++) { + h[i] = {hit: handler(i)}; + for (var j = 0; j < offs.length; j++) + s.setBreakpoint(offs[j], h[i]); + } +}; + +g.eval("var line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "result = 'ok';\n"); // line0 + 2 +assertEq(log, '013'); diff --git a/js/src/jit-test/tests/debug/Script-clearBreakpoint-03.js b/js/src/jit-test/tests/debug/Script-clearBreakpoint-03.js new file mode 100644 index 0000000000..c80939786e --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-clearBreakpoint-03.js @@ -0,0 +1,25 @@ +// Clearing a breakpoint by handler can clear multiple breakpoints. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var s; +dbg.onDebuggerStatement = function (frame) { + s = frame.eval("f").return.script; +}; +g.eval("var line0 = Error().lineNumber;\n" + + "function f(a, b) {\n" + // line0 + 1 + " return a + b;\n" + // line0 + 2 + "}\n" + + "debugger;\n"); + +var hits = 0; +var handler = {hit: function (frame) { hits++; s.clearBreakpoint(handler); }}; +var offs = s.getLineOffsets(g.line0 + 2); +for (var i = 0; i < 4; i++) { + for (var j = 0; j < offs.length; j++) + s.setBreakpoint(offs[j], handler); +} + +assertEq(g.f(2, 2), 4); +assertEq(hits, 1); +assertEq(s.getBreakpoints().length, 0); diff --git a/js/src/jit-test/tests/debug/Script-clearBreakpoint-04.js b/js/src/jit-test/tests/debug/Script-clearBreakpoint-04.js new file mode 100644 index 0000000000..b1da7b4095 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-clearBreakpoint-04.js @@ -0,0 +1,28 @@ +// clearBreakpoint clears breakpoints for the current Debugger object only. + +var g = newGlobal({newCompartment: true}); + +var hits = 0; +var handler = { + hit: function (frame) { + hits++; + frame.script.clearBreakpoint(handler); + } +}; + +function attach(i) { + var dbg = Debugger(g); + dbg.onDebuggerStatement = function (frame) { + var s = frame.script; + var offs = s.getLineOffsets(g.line0 + 2); + for (var i = 0; i < offs.length; i++) + s.setBreakpoint(offs[i], handler); + }; +} +for (var i = 0; i < 4; i++) + attach(i); + +g.eval("var line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "Math.sin(0);\n"); // line0 + 2 +assertEq(hits, 4); diff --git a/js/src/jit-test/tests/debug/Script-displayName-01.js b/js/src/jit-test/tests/debug/Script-displayName-01.js new file mode 100644 index 0000000000..02056f7542 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-displayName-01.js @@ -0,0 +1,17 @@ +// Debugger.Script.prototype.displayName + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var name; +dbg.onDebuggerStatement = f => { name = f.callee.script.displayName; }; + +g.eval("(function f() { debugger; })();"); +assertEq(name, "f"); +g.eval("(function () { debugger; })();"); +assertEq(name, undefined); +g.eval("Function('debugger;')();"); +assertEq(name, "anonymous"); +g.eval("var f = function() { debugger; }; f()"); +assertEq(name, "f"); +g.eval("var a = {}; a.f = function() { debugger; }; a.f()"); +assertEq(name, "a.f"); diff --git a/js/src/jit-test/tests/debug/Script-format-01.js b/js/src/jit-test/tests/debug/Script-format-01.js new file mode 100644 index 0000000000..24db07dc72 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-format-01.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() + +// Tests that JavaScript scripts have a "js" format and wasm scripts have a +// "wasm" format. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +var gotScript; +dbg.onNewScript = (script) => { + gotScript = script; +}; + +g.eval(`(() => {})()`); +assertEq(gotScript.format, "js"); + +g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func) (export "" (func 0)))')));`); +assertEq(gotScript.format, "wasm"); diff --git a/js/src/jit-test/tests/debug/Script-gc-01.js b/js/src/jit-test/tests/debug/Script-gc-01.js new file mode 100644 index 0000000000..f328008b15 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-gc-01.js @@ -0,0 +1,26 @@ +// Debugger.Script instances with live referents stay alive. + +var N = 4; +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var i; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.script instanceof Debugger.Script, true); + frame.script.id = i; +}; + +g.eval('var arr = [];') +for (i = 0; i < N; i++) // loop to defeat conservative GC + g.eval("arr.push(function () { debugger }); arr[arr.length - 1]();"); + +gc(); + +var hits; +dbg.onDebuggerStatement = function (frame) { + hits++; + assertEq(frame.script.id, i); +}; +hits = 0; +for (i = 0; i < N; i++) + g.arr[i](); +assertEq(hits, N); diff --git a/js/src/jit-test/tests/debug/Script-gc-02.js b/js/src/jit-test/tests/debug/Script-gc-02.js new file mode 100644 index 0000000000..c805e2c66e --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-gc-02.js @@ -0,0 +1,14 @@ +// Debugger.Scripts keep their referents alive. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var arr = []; +dbg.onDebuggerStatement = function (frame) { arr.push(frame.script); }; +g.eval("for (var i = 0; i < 10; i++) Function('debugger;')();"); +assertEq(arr.length, 10); + +gc(); + +for (var i = 0; i < arr.length; i++) + assertEq(arr[i].lineCount, 4); + diff --git a/js/src/jit-test/tests/debug/Script-gc-03.js b/js/src/jit-test/tests/debug/Script-gc-03.js new file mode 100644 index 0000000000..ab53203239 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-gc-03.js @@ -0,0 +1,15 @@ +// Referents of Debugger.Scripts in other compartments always survive per-compartment GC. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var arr = []; +dbg.onDebuggerStatement = function (frame) { arr.push(frame.script); }; +g.eval("for (var i = 0; i < 100; i++) Function('debugger;')();"); +assertEq(arr.length, 100); + +gc(g); + +for (var i = 0; i < arr.length; i++) + assertEq(arr[i].lineCount, 4); + +gc(); diff --git a/js/src/jit-test/tests/debug/Script-getAllColumnOffsets.js b/js/src/jit-test/tests/debug/Script-getAllColumnOffsets.js new file mode 100644 index 0000000000..63e31c1c30 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getAllColumnOffsets.js @@ -0,0 +1,183 @@ +load(libdir + "assert-offset-columns.js"); + +// getColumnOffsets correctly places the various parts of a ForStatement. +assertOffsetColumns( + "function f(n) { for (var i = 0; i < n; ++i) hits.push('.'); hits.push('!'); }", + " ^ ^ ^ ^ ^ ^ ^ ^ ^", + // 0 1 2 3 4 5 6 7 8 + "0 1 2 4 5 . 3 1 2 4 5 . 3 1 2 4 5 . 3 1 2 6 7 ! 8" +); + +// getColumnOffsets correctly places multiple variable declarations. +assertOffsetColumns( + "function f(n){var w0,x1=3,y2=4,z3=9}", + " ^ ^ ^^" +); + +// getColumnOffsets correctly places comma separated expressions. +assertOffsetColumns( + "function f(n){print(n),print(n),print(n)}", + " ^ ^^ ^ ^ ^ ^ ^", + // 0 12 3 4 5 6 7 + "0 2 1 3 4 3 5 6 5 7" +); + +// getColumnOffsets correctly places object properties. +assertOffsetColumns( + // Should hit each property in the object. + "function f(n){var o={a:1,b:2,c:3}}", + " ^^ ^ ^ ^" +); + +// getColumnOffsets correctly places array properties. +assertOffsetColumns( + // Should hit each item in the array. + "function f(n){var a=[1,2,n]}", + " ^ ^ ^" +); + +// getColumnOffsets correctly places function calls. +assertOffsetColumns( + "function ppppp() { return 1; }\n" + + "function f(){ 1 && ppppp(ppppp()) && new Error() }", + " ^ ^ ^ ^ ^", + // 0 1 2 3 4 + "0 2 1 3 4" +); + +// getColumnOffsets correctly places the various parts of a SwitchStatement. +assertOffsetColumns( + "function f(n) { switch(n) { default: print(n); } }", + " ^ ^ ^^ ^", + // 0 1 23 4 + "0 1 3 2 4" +); + +// getColumnOffsets correctly places the various parts of a BreakStatement. +assertOffsetColumns( + "function f(n) { do { print(n); if (n === 3) { break; } } while(false); }", + " ^ ^ ^^ ^ ^ ^ ^", + // 0 1 23 4 5 6 7 + "0 1 3 2 4 5 7" +); + +// If the loop condition is unreachable, we currently don't report its offset. +assertOffsetColumns( + "function f(n) { do { print(n); break; } while(false); }", + " ^ ^ ^^ ^ ^", + // 0 1 23 4 5 + "0 1 3 2 4 5" +); + +// getColumnOffsets correctly places the various parts of a ContinueStatement. +assertOffsetColumns( + "function f(n) { do { print(n); continue; } while(false); }", + " ^ ^ ^^ ^ ^ ^", + // 0 1 23 4 5 6 + "0 1 3 2 4 5 6" +); + +// getColumnOffsets correctly places the various parts of a WithStatement. +assertOffsetColumns( + "function f(n) { with({}) { print(n); } }", + " ^ ^ ^^ ^", + // 0 1 23 4 + "0 1 3 2 4" +); + +// getColumnOffsets correctly places the various parts of a IfStatement. +assertOffsetColumns( + "function f(n) { if (n == 3) print(n); }", + " ^ ^ ^^ ^", + // 0 1 23 4 + "0 1 3 2 4" +); + +// getColumnOffsets correctly places the various parts of a IfStatement +// with an if/else +assertOffsetColumns( + "function f(n) { if (n == 2); else if (n === 3) print(n); }", + " ^ ^ ^ ^^ ^", + // 0 1 2 34 5 + "0 1 2 4 3 5" +); + +// getColumnOffsets correctly places the various parts of a DoWhileStatement. +assertOffsetColumns( + "function f(n) { do { print(n); } while(false); }", + " ^ ^ ^^ ^ ^", + // 0 1 23 4 5 + "0 1 3 2 4 5" +); + +// getColumnOffsets correctly places the part of normal ::Dot node with identifier root. +assertOffsetColumns( + "var args = [];\n" + + "var obj = { base: { a(){ return { b(){} }; } } };\n" + + "function f(n) { obj.base.a().b(...args); }", + " ^ ^ ^ ^ ^ ^", + // 0 1 2 3 4 5 + "0 1 4 2 5" +); + +// getColumnOffsets correctly places the part of normal ::Dot node with "this" root. +assertOffsetColumns( + "var args = [];\n" + + "var obj = { base: { a(){ return { b(){} }; } } };\n" + + "var f = function() { this.base.a().b(...args); }.bind(obj);", + " ^ ^ ^ ^ ^ ^", + // 0 1 2 3 4 5 + "0 1 4 2 5" +); + +// getColumnOffsets correctly places the part of normal ::Dot node with "super" base. +assertOffsetColumns( + "var args = [];\n" + + "var obj = { base: { a(){ return { b(){} }; } } };\n" + + "var f = { __proto__: obj, f(n) { super.base.a().b(...args); } }.f;", + " ^ ^ ^ ^ ^ ^", + // 0 1 2 3 4 5 + "0 1 4 2 5" +); + +// getColumnOffsets correctly places the part of normal ::Dot node with other base. +assertOffsetColumns( + "var args = [];\n" + + "var obj = { base: { a(){ return { b(){} }; } } };\n" + + "function f(n) { (0, obj).base.a().b(...args); }", + " ^ ^ ^ ^ ^ ^ ^", + // 0 1 2 3 4 5 6 + "0 1 2 5 3 6" +); + +// getColumnOffsets correctly places the part of folded ::Elem node. +assertOffsetColumns( + "var args = [];\n" + + "var obj = { base: { a(){ return { b(){} }; } } };\n" + + // Constant folding makes the static string behave like a dot access. + "function f(n) { obj.base['a']()['b'](...args); }", + " ^ ^ ^ ^ ^ ^", + // 0 1 2 3 4 5 + "0 1 4 2 5" +); + +// getColumnOffsets correctly places the part of computed ::Elem node. +assertOffsetColumns( + "var args = [], a = 'a', b = 'b';\n" + + "var obj = { base: { a(){ return { b(){} }; } } };\n" + + "function f(n) { obj.base[a]()[b](...args); }", + " ^ ^ ^^ ^ ^", + // 0 1 23 4 5 + "0 1 4 2 5" +); + +// getColumnOffsets correctly places the evaluation of ...args when +// OptimizeSpreadCall fails. +assertOffsetColumns( + "var args = [,];\n" + + "var obj = { base: { a(){ return { b(){} }; } } };\n" + + "function f(n) { obj.base.a().b(...args); }", + " ^ ^ ^ ^ ^ ^", + // 0 1 2 3 4 5 + "0 1 4 3 2 5" +); diff --git a/js/src/jit-test/tests/debug/Script-getBreakpoints-01.js b/js/src/jit-test/tests/debug/Script-getBreakpoints-01.js new file mode 100644 index 0000000000..ac143588fb --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getBreakpoints-01.js @@ -0,0 +1,40 @@ +// Basic Script.prototype.getBreakpoints tests. + +var g = newGlobal({newCompartment: true}); +g.eval("var line0 = Error().lineNumber;\n" + + "function f(x) {\n" + // line0 + 1 + " if (x < 0)\n" + // line0 + 2 + " return -x;\n" + // line0 + 3 + " return x;\n" + + "}"); + +var s; +var offsets = []; +var handlers = []; +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + s = frame.eval("f").return.script; + var off; + + for (var i = 0; i < 3; i++) { + var off = s.getLineOffsets(g.line0 + 2 + i)[0]; + assertEq(typeof off, 'number'); + handlers[i] = {}; + s.setBreakpoint(off, handlers[i]); + offsets[i] = off; + } +}; +g.eval("debugger;"); + +// getBreakpoints without an offset gets all breakpoints in the script. +var bps = s.getBreakpoints(); +assertEq(bps.length, handlers.length); +for (var i = 0; i < bps.length; i++) + assertEq(bps.indexOf(handlers[i]) !== -1, true); + +// getBreakpoints with an offset finds only breakpoints at that offset. +for (var i = 0; i < offsets.length; i++) { + var bps = s.getBreakpoints(offsets[i]); + assertEq(bps.length, 1); + assertEq(bps[0], handlers[i]); +} diff --git a/js/src/jit-test/tests/debug/Script-getBreakpoints-02.js b/js/src/jit-test/tests/debug/Script-getBreakpoints-02.js new file mode 100644 index 0000000000..ead429889e --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getBreakpoints-02.js @@ -0,0 +1,42 @@ +// Script.prototype.getBreakpoints returns breakpoints for the current Debugger object only. + +var g = newGlobal({newCompartment: true}); + +var debuggers = []; +var hits = 0; +function attach(g, i) { + var dbg = Debugger(g); + dbg.onDebuggerStatement = function (frame) { + var s = frame.script; + var offs = s.getLineOffsets(g.line0 + 2); + var hitAny = false; + var handler = { + hit: function (frame) { + assertEq(this, handler); + assertEq(frame.script, s); + var bps = s.getBreakpoints(); + assertEq(bps.length, offs.length); + for (var i = 0; i < bps.length; i++) + assertEq(bps[i], handler); + + if (!hitAny) { + hitAny = true; + hits++; + } + } + }; + for (var i = 0; i < offs.length; i++) + s.setBreakpoint(offs[i], handler); + hits++; + }; + debuggers[i] = dbg; +} + +for (var i = 0; i < 3; i++) + attach(g, i); +g.done = false; +g.eval("var line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "done = true;\n"); // line0 + 2 +assertEq(hits, 6); +assertEq(g.done, true); diff --git a/js/src/jit-test/tests/debug/Script-getChildScripts-01.js b/js/src/jit-test/tests/debug/Script-getChildScripts-01.js new file mode 100644 index 0000000000..99f9cf5b36 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getChildScripts-01.js @@ -0,0 +1,40 @@ +// Basic getChildScripts tests. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; +function note(s) { + assertEq(s instanceof Debugger.Script, true); + log += 'S'; + var c = s.getChildScripts(); + if (c.length > 0) { + log += '['; + for (var i = 0; i < c.length; i++) + note(c[i]); + log += ']'; + } +} +dbg.onDebuggerStatement = function (frame) { note(frame.script); }; + +function test(code, expected) { + log = ''; + g.eval(code); + assertEq(log, expected); +} + +test("debugger;", + "S"); +test("function f() {} debugger;", + "S[S]"); +test("function g() { function h() { function k() {} return k; } return h; } debugger;", + "S[S[S[S]]]"); +test("function q() {} function qq() {} debugger;", + "S[SS]"); +test("[0].map(function id(a) { return a; }); debugger;", + "S[S]"); +test("Function('return 2+2;')(); debugger;", + "S"); +test("var obj = {get x() { return 0; }, set x(v) {}}; debugger;", + "S[SS]"); +test("function* qux(n) { for (var i = 0; i < n; i++) yield i; } debugger;", + "S[S]"); diff --git a/js/src/jit-test/tests/debug/Script-getChildScripts-02.js b/js/src/jit-test/tests/debug/Script-getChildScripts-02.js new file mode 100644 index 0000000000..4a8982aeea --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getChildScripts-02.js @@ -0,0 +1,20 @@ +// getChildScripts returns scripts in source order. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var scripts = []; +var cs; +dbg.onDebuggerStatement = function (frame) { + scripts.push(frame.script); + if (scripts.length === 1) + cs = frame.script.getChildScripts(); +}; + +g.eval("function f() { debugger; }\n" + + "var g = function () { debugger; }\n" + + "debugger; f(); g();"); + +assertEq(scripts.length, 3); +assertEq(cs.length, 2); +assertEq(cs[0], scripts[1]); +assertEq(cs[1], scripts[2]); diff --git a/js/src/jit-test/tests/debug/Script-getChildScripts-03.js b/js/src/jit-test/tests/debug/Script-getChildScripts-03.js new file mode 100644 index 0000000000..09e5cba32c --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getChildScripts-03.js @@ -0,0 +1,16 @@ +// getChildScripts on a direct eval script returns the right scripts. +// (A bug had it also returning the script for the calling function.) + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var arr = frame.script.getChildScripts(); + assertEq(arr.length, 1); + assertEq(arr[0], frame.eval("h").return.script); + hits++; +}; + +g.eval("function f(s) { eval(s); }"); +g.f("debugger; function h(a) { return a + 1; }"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Script-getChildScripts-04.js b/js/src/jit-test/tests/debug/Script-getChildScripts-04.js new file mode 100644 index 0000000000..fc47247137 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getChildScripts-04.js @@ -0,0 +1,15 @@ +// script.getChildScripts() works correctly during the newScript hook. +// (A bug had it including the script for the calling function.) + +var g = newGlobal({newCompartment: true}); +g.eval("function h(a) { eval(a); }"); + +var dbg = Debugger(g); +var arr, kscript; +dbg.onNewScript = function (script) { arr = script.getChildScripts(); }; +dbg.onDebuggerStatement = function (frame) { kscript = frame.callee.script; }; + +g.h("function k(a) { debugger; return a + 1; } k(-1);"); +assertEq(kscript instanceof Debugger.Script, true); +assertEq(arr.length, 1); +assertEq(arr[0], kscript); diff --git a/js/src/jit-test/tests/debug/Script-getChildScripts-05.js b/js/src/jit-test/tests/debug/Script-getChildScripts-05.js new file mode 100644 index 0000000000..594e8db435 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getChildScripts-05.js @@ -0,0 +1,16 @@ +// Test that lazy inner functions inside eval are tagged properly so we don't +// incorrectly do NAME -> GNAME optimization. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onNewScript = function delazify(script, global) { + // Force delazification of inner functions. + script.getChildScripts(); +}; + +g.eval("" + function f() { + var $; + eval('var obj={foo:1}; $=function() { assertEq(obj.foo, 1); }'); + return $; +}); +g.eval("f()();"); diff --git a/js/src/jit-test/tests/debug/Script-getEffectfulOffsets.js b/js/src/jit-test/tests/debug/Script-getEffectfulOffsets.js new file mode 100644 index 0000000000..2221b7e6cd --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getEffectfulOffsets.js @@ -0,0 +1,67 @@ +// Check that Script.getEffectfulOffsets behaves sensibly. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var numEffectfulOperations; + +function onNewScript(script) { + script.getChildScripts().forEach(onNewScript); + numEffectfulOperations += script.getEffectfulOffsets().length; +} +dbg.onNewScript = onNewScript; + +function test(code, expected) { + numEffectfulOperations = 0; + g.eval(` +function f(a, b, c) { +${code} +} +`); + assertEq(numEffectfulOperations, expected); +} + +const base = 1; +test("", base); + +test("a.f = 0", base + 1); +test("a.f++", base + 1); +test("return a.f", base + 0); +test("a[b] = 0", base + 1); +test("a[b]++", base + 1); +test("return a[b]", base + 0); +test("a = 0", base + 0); +test("d = 0", base + 1); +test("with (a) { b = 0; }", base + 7); +test("let o = {}; ({x: o.x} = { x: 10 })", base + 1); +test("var x", base + 0); + +// d is not closed over, and "let d = 0;" uses InitLexical, +// which is non-effectful. +test(` +let d = 10; +`, base + 0); + +// d is closed over, and "let d = 0;" uses InitAliasedLexical with hops == 0, +// which is non-effectful. +test(` +let d = 10; +function g() { + d; +} +`, base + 0); + +// Private accessor uses InitAliasedLexical with hops == 1, +// which is currently marked as effectful. +// Please fix this test if it's marked as non-effectful in the future. +test(` +class B { + set #x(x) {} +} +`, base + 1); + +test(` +class B { + get #x() {} + set #x(x) {} +} +`, base + 2); diff --git a/js/src/jit-test/tests/debug/Script-getLineOffsets-01.js b/js/src/jit-test/tests/debug/Script-getLineOffsets-01.js new file mode 100644 index 0000000000..4bd1c47eaa --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getLineOffsets-01.js @@ -0,0 +1,13 @@ +// getLineOffsets on a line that is definitely outside a script returns an empty array. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var offs = frame.script.getLineOffsets(g.line0 + 2); + assertEq(Array.isArray(offs), true); + assertEq(offs.length, 0); + hits++; +}; +g.eval("var line0 = Error().lineNumber; debugger;"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Script-getLineOffsets-02.js b/js/src/jit-test/tests/debug/Script-getLineOffsets-02.js new file mode 100644 index 0000000000..7fab0c9fb8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getLineOffsets-02.js @@ -0,0 +1,33 @@ +// getLineOffsets correctly places the various parts of a ForStatement. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + function handler(line) { + return {hit: function (frame) { g.log += "" + line; }}; + } + + var s = frame.eval("f").return.script; + for (var line = 2; line <= 6; line++) { + var offs = s.getLineOffsets(g.line0 + line); + var h = handler(line); + for (var i = 0; i < offs.length; i++) { + assertEq(s.getOffsetLocation(offs[i]).lineNumber, g.line0 + line); + s.setBreakpoint(offs[i], h); + } + } +}; + +g.log = ''; +g.eval("var line0 = Error().lineNumber;\n" + + "function f(n) {\n" + // line0 + 1 + " for (var i = 0;\n" + // line0 + 2 + " i < n;\n" + // line0 + 3 + " i++)\n" + // line0 + 4 + " log += '.';\n" + // line0 + 5 + " log += '!';\n" + // line0 + 6 + "}\n" + + "debugger;\n"); +assertEq(g.log, ""); +g.f(3); +assertEq(g.log, "235.435.435.436!"); diff --git a/js/src/jit-test/tests/debug/Script-getLineOffsets-03.js b/js/src/jit-test/tests/debug/Script-getLineOffsets-03.js new file mode 100644 index 0000000000..62302f5a56 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getLineOffsets-03.js @@ -0,0 +1,36 @@ +// getLineOffsets treats one-line compound statements as having only one entry-point. +// (A breakpoint on a line that only executes once will only hit once.) + +var g = newGlobal({newCompartment: true}); +g.line0 = null; +var dbg = Debugger(g); +var log; +dbg.onDebuggerStatement = function (frame) { + var s = frame.script; + var lineno = g.line0 + 2; + var offs = s.getLineOffsets(lineno); + for (var i = 0; i < offs.length; i++) { + assertEq(s.getOffsetLocation(offs[i]).lineNumber, lineno); + s.setBreakpoint(offs[i], {hit: function () { log += 'B'; }}); + } + log += 'A'; +}; + +function test(s) { + log = ''; + g.eval("line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + s); // line0 + 2 + assertEq(log, 'AB'); +} + +g.i = 0; +g.j = 0; +test("{i++; i--; i++; i--; }"); +test("if (i === 0) i++; else i--;"); +test("while (i < 5) i++;"); +test("do --i; while (i > 0);"); +test("for (i = 0; i < 5; i++) j++;"); +test("for (var x in [0, 1, 2]) j++;"); +test("switch (i) { case 0: j = 0; case 1: j = 1; case 2: j = 2; default: j = i; }"); +test("switch (i) { case 'A': j = 0; case 'B': j = 1; case 'C': j = 2; default: j = i; }"); diff --git a/js/src/jit-test/tests/debug/Script-getLineOffsets-04.js b/js/src/jit-test/tests/debug/Script-getLineOffsets-04.js new file mode 100644 index 0000000000..9e828b8af6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getLineOffsets-04.js @@ -0,0 +1,53 @@ +// getLineOffsets works with instructions reachable only by breaking out of a loop or switch. + +var g = newGlobal({newCompartment: true}); +g.line0 = null; +var dbg = Debugger(g); +var where; +dbg.onDebuggerStatement = function (frame) { + var s = frame.eval("f").return.script; + var lineno = g.line0 + where; + var offs = s.getLineOffsets(lineno); + for (var i = 0; i < offs.length; i++) { + assertEq(s.getOffsetLocation(offs[i]).lineNumber, lineno); + s.setBreakpoint(offs[i], {hit: function () { g.log += 'B'; }}); + } + g.log += 'A'; +}; + +function test(s) { + var count = (s.split(/\n/).length - 1); // number of newlines in s + g.log = ''; + where = 3 + count + 1; + g.eval("line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "function f(i) {\n" + // line0 + 2 + s + // line0 + 3 ... line0 + where - 2 + " log += '?';\n" + // line0 + where - 1 + " log += '!';\n" + // line0 + where + "}\n"); + g.f(0); + assertEq(g.log, 'A?B!'); +} + +test("i = 128;\n" + + "for (;;) {\n" + + " var x = i - 10;;\n" + + " if (x < 0)\n" + + " break;\n" + + " i >>= 2;\n" + + "}\n"); + +test("while (true)\n" + + " if (++i === 2) break;\n"); + +test("do {\n" + + " if (++i === 2) break;\n" + + "} while (true);\n"); + +test("switch (i) {\n" + + " case 2: return 7;\n" + + " case 1: return 8;\n" + + " case 0: break;\n" + + " default: return -i;\n" + + "}\n"); diff --git a/js/src/jit-test/tests/debug/Script-getLineOffsets-05.js b/js/src/jit-test/tests/debug/Script-getLineOffsets-05.js new file mode 100644 index 0000000000..0a030ad87e --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getLineOffsets-05.js @@ -0,0 +1,65 @@ +// getLineOffsets identifies multiple ways to land on a line. + +var g = newGlobal({newCompartment: true}); +g.line0 = null; +var dbg = Debugger(g); +var where; +dbg.onDebuggerStatement = function (frame) { + var s = frame.script, lineno, offs; + + lineno = g.line0 + where; + offs = s.getLineOffsets(lineno); + for (var i = 0; i < offs.length; i++) { + assertEq(s.getOffsetLocation(offs[i]).lineNumber, lineno); + s.setBreakpoint(offs[i], {hit: function () { g.log += 'B'; }}); + } + + lineno++; + offs = s.getLineOffsets(lineno); + for (var i = 0; i < offs.length; i++) { + assertEq(s.getOffsetLocation(offs[i]).lineNumber, lineno); + s.setBreakpoint(offs[i], {hit: function () { g.log += 'C'; }}); + } + + g.log += 'A'; +}; + +function test(s) { + assertEq(s.charAt(s.length - 1), '\n'); + var count = (s.split(/\n/).length - 1); // number of lines in s + g.log = ''; + where = 1 + count; + g.eval("line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + s + // line0 + 2 ... line0 + where + "log += 'D';\n"); + assertEq(g.log, 'AB!CD'); +} + +// if-statement with yes and no paths on a single line +g.i = 0; +test("if (i === 0)\n" + + " log += '!'; else log += 'X';\n"); +test("if (i === 2)\n" + + " log += 'X'; else log += '!';\n"); + +// break to a line that has code inside and outside the loop +g.i = 2; +test("while (1) {\n" + + " if (i === 2) break;\n" + + " log += 'X'; } log += '!';\n"); + +// leaving a while loop by failing the test, when the last line has stuff both inside and outside the loop +g.i = 0; +test("while (i > 0) {\n" + + " if (i === 70) log += 'X';\n" + + " --i; } log += '!';\n"); + +// multiple case-labels on the same line +g.i = 0; +test("switch (i) {\n" + + " case 0: case 1: log += '!'; break; }\n"); +test("switch ('' + i) {\n" + + " case '0': case '1': log += '!'; break; }\n"); +test("switch (i) {\n" + + " case 'ok' + i: case i - i: log += '!'; break; }\n"); diff --git a/js/src/jit-test/tests/debug/Script-getLineOffsets-06.js b/js/src/jit-test/tests/debug/Script-getLineOffsets-06.js new file mode 100644 index 0000000000..f5fccaed56 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getLineOffsets-06.js @@ -0,0 +1,99 @@ +// getLineOffsets works with extended instructions, such as JSOP_GOTOX. + +var g = newGlobal({newCompartment: true}); +g.line0 = null; +var dbg = Debugger(g); +var where; +dbg.onDebuggerStatement = function (frame) { + var s = frame.script; + var offs; + var lineno = g.line0 + where; + offs = s.getLineOffsets(lineno); + for (var i = 0; i < offs.length; i++) { + assertEq(s.getOffsetLocation(offs[i]).lineNumber, lineno); + s.setBreakpoint(offs[i], {hit: function (frame) { g.log += 'B'; }}); + } + g.log += 'A'; +}; + +function test(s) { + assertEq(s.charAt(s.length - 1) !== '\n', true); + var count = s.split(/\n/).length; // number of lines in s + g.i = 0; + g.log = ''; + where = 1 + count; + g.eval("line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + s + // line0 + 2 ... line0 + where + " log += 'C';\n"); + assertEq(g.log, 'ABC'); +} + +function repeat(s) { + return Array((1 << 14) + 1).join(s); // 16K copies of s +} +var long_expr = "i" + repeat(" + i"); +var long_throw_stmt = "throw " + long_expr + ";\n"; + +// long break (JSOP_GOTOX) +test("for (;;) {\n" + + " if (i === 0)\n" + + " break;\n" + + " " + long_throw_stmt + + "}"); + +// long continue (JSOP_GOTOX) +test("do {\n" + + " if (i === 0)\n" + + " continue;\n" + + " " + long_throw_stmt + + "} while (i !== 0);"); + +// long if consequent (JSOP_IFEQX) +test("if (i === 2) {\n" + + " " + long_throw_stmt + + "}"); + +// long catch-block with finally (JSOP_GOSUBX) +test("try {\n" + + " i = 0;\n" + + "} catch (exc) {\n" + + " throw " + long_expr + ";\n" + + "} finally {\n" + + " i = 1;\n" + + "}"); + +// long case (JSOP_TABLESWITCHX) +test("switch (i) {\n" + + " default:\n" + + " case 1: " + long_throw_stmt + + " case 0: i++; }"); + +test("switch (i) {\n" + + " case 1: case 2: case 3: " + long_throw_stmt + + " default: i++; }"); + +// long case (JSOP_LOOKUPSWITCHX) +test("switch ('' + i) {\n" + + " default:\n" + + " case '1': " + long_throw_stmt + + " case '0': i++; }"); + +test("switch (i) {\n" + + " case '1': case '2': case '3': " + long_throw_stmt + + " default: i++; }"); + +// long case or case-expression (JSOP_CASEX) +test("switch (i) {\n" + + " case i + 1 - i:\n" + + " default:\n" + + " " + long_throw_stmt + + " case i + i:\n" + + " i++; break; }"); + +// long case when JSOP_CASE is used (JSOP_DEFAULTX) +test("switch (i) {\n" + + " case i + 1 - i:\n" + + " " + long_throw_stmt + + " default:\n" + + " i++; break; }"); diff --git a/js/src/jit-test/tests/debug/Script-getLineOffsets-07.js b/js/src/jit-test/tests/debug/Script-getLineOffsets-07.js new file mode 100644 index 0000000000..5ecf311615 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getLineOffsets-07.js @@ -0,0 +1,19 @@ +// Lazy scripts should correctly report line offsets + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); + +g.eval("// Header comment\n" + // <- line 6 in this file + "\n" + + "\n" + + "function f(n) {\n" + // <- line 9 in this file + " var foo = '!';\n" + + "}"); + +dbg.addDebuggee(g); +var scripts = dbg.findScripts(); +for (var i = 0; i < scripts.length; i++) { + // Nothing should have offsets for the deffun on line 9 if lazy scripts + // correctly update the position. + assertEq(scripts[i].getLineOffsets(9).length, 0); +} diff --git a/js/src/jit-test/tests/debug/Script-getLineOffsets-08.js b/js/src/jit-test/tests/debug/Script-getLineOffsets-08.js new file mode 100644 index 0000000000..b51b0e09f8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getLineOffsets-08.js @@ -0,0 +1,25 @@ +// A "while" or a "for" loop should have a single entry point. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +dbg.onDebuggerStatement = function(frame) { + var s = frame.eval('f').return.script; + + // There should be just a single entry point for the first line of + // the function. See below to understand the "+2". + assertEq(s.getLineOffsets(g.line0 + 2).length, 1); +}; + + +function test(code) { + g.eval('var line0 = Error().lineNumber;\n' + + 'function f() {\n' + // line0 + 1 + code + '\n' + // line0 + 2 -- see above + '}\n' + + 'debugger;'); +} + +test('while (false)\n;'); +test('for (;false;)\n;'); +test('for (;;) break;\n;'); diff --git a/js/src/jit-test/tests/debug/Script-getOffsetLine-01.js b/js/src/jit-test/tests/debug/Script-getOffsetLine-01.js new file mode 100644 index 0000000000..65a1f50c53 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getOffsetLine-01.js @@ -0,0 +1,25 @@ +// Basic getOffsetLocation test, using Error.lineNumber as the gold standard. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits; +dbg.onDebuggerStatement = function (frame) { + var knownLine = frame.eval("line").return; + assertEq(frame.script.getOffsetLocation(frame.offset).lineNumber, knownLine); + hits++; +}; + +hits = 0; +g.eval("var line = new Error().lineNumber; debugger;"); +assertEq(hits, 1); + +hits = 0; +g.eval("var s = 2 + 2;\n" + + "s += 2;\n" + + "line = new Error().lineNumber; debugger;\n" + + "s += 2;\n" + + "s += 2;\n" + + "line = new Error().lineNumber; debugger;\n" + + "s += 2;\n" + + "assertEq(s, 12);\n"); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/Script-getOffsetLine-02.js b/js/src/jit-test/tests/debug/Script-getOffsetLine-02.js new file mode 100644 index 0000000000..d118e0e2db --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getOffsetLine-02.js @@ -0,0 +1,19 @@ +// Frame.script/offset and Script.getOffsetLocation work in non-top frames. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + var a = []; + for (; frame.type == "call"; frame = frame.older) + a.push(frame.script.getOffsetLocation(frame.offset).lineNumber - g.line0); + assertEq(a.join(","), "1,2,3,4"); + hits++; +}; +g.eval("var line0 = Error().lineNumber;\n" + + "function f0() { debugger; }\n" + + "function f1() { f0(); }\n" + + "function f2() { f1(); }\n" + + "function f3() { f2(); }\n" + + "f3();\n"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Script-getOffsetLocation.js b/js/src/jit-test/tests/debug/Script-getOffsetLocation.js new file mode 100644 index 0000000000..3df02f6fc1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getOffsetLocation.js @@ -0,0 +1,37 @@ +// getOffsetLocation agrees with getAllColumnOffsets + +var global = newGlobal({newCompartment: true}); +Debugger(global).onDebuggerStatement = function (frame) { + var script = frame.script; + var byOffset = []; + script.getAllColumnOffsets().forEach(function (entry) { + var {lineNumber, columnNumber, offset} = entry; + byOffset[offset] = {lineNumber, columnNumber}; + }); + + frame.onStep = function() { + var offset = frame.offset; + var location = script.getOffsetLocation(offset); + if (location.isEntryPoint) { + assertEq(location.lineNumber, byOffset[offset].lineNumber); + assertEq(location.columnNumber, byOffset[offset].columnNumber); + } else { + assertEq(byOffset[offset], undefined); + } + }; +}; + +function test(body) { + print("Test: " + body); + global.eval(`function f(n) { debugger; ${body} }`); + global.f(3); +} + +test("for (var i = 0; i < n; ++i) ;"); +test("var w0,x1=3,y2=4,z3=9"); +test("print(n),print(n),print(n)"); +test("var o={a:1,b:2,c:3}"); +test("var a=[1,2,n]"); + +global.eval("function ppppp() { return 1; }"); +test("1 && ppppp(ppppp()) && new Error()"); diff --git a/js/src/jit-test/tests/debug/Script-getOffsetMetadata.js b/js/src/jit-test/tests/debug/Script-getOffsetMetadata.js new file mode 100644 index 0000000000..0f265ff0dc --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getOffsetMetadata.js @@ -0,0 +1,36 @@ +var global = newGlobal({newCompartment: true}); +var dbg = Debugger(global); +dbg.onDebuggerStatement = function(frame) { + const bps = frame.script.getPossibleBreakpoints(); + + const stepBps = []; + frame.onStep = function() { + assertOffset(this); + }; + + assertOffset(frame); + + function assertOffset(frame) { + const meta = frame.script.getOffsetMetadata(frame.offset); + + if (meta.isBreakpoint) { + assertEq(frame.offset, bps[0].offset); + const expectedData = bps.shift(); + + assertEq(meta.lineNumber, expectedData.lineNumber); + assertEq(meta.columnNumber, expectedData.columnNumber); + assertEq(meta.isStepStart, expectedData.isStepStart); + } else { + assertEq(meta.isStepStart, false); + } + }; +}; + +global.eval(` + function a() { return "str"; } + debugger; + + console.log("42" + a()); + a(); + a() + a(); +`); diff --git a/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-01.js b/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-01.js new file mode 100644 index 0000000000..7757d4fbf4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-01.js @@ -0,0 +1,501 @@ +// Currently the Jit integration has a few issues, let's keep this test +// case deterministic. +// +// - Baseline OSR increments the loop header twice. +// - Ion is not updating any counter yet. +// +if (getJitCompilerOptions()["ion.warmup.trigger"] != 30) + setJitCompilerOption("ion.warmup.trigger", 30); +if (getJitCompilerOptions()["baseline.warmup.trigger"] != 10) + setJitCompilerOption("baseline.warmup.trigger", 10); + +/* + * These test cases are annotated with the output produced by LCOV [1]. Comment + * starting with // without any spaces are used as a reference for the code + * coverage output. Any "$" in these line comments are replaced by the current + * line number, and any "%" are replaced with the current function name (defined + * by the FN key). + * + * [1] http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php + */ +function checkGetOffsetsCoverage(fun) { + var keys = [ "TN", "SF", "FN", "FNDA", "FNF", "FNH", "BRDA", "BRF", "BRH", "DA", "LF", "LH" ]; + function startsWithKey(s) { + for (k of keys) { + if (s.startsWith(k)) + return true; + } + return false; + }; + + // Extract the body of the function, as the code to be executed. + var source = fun.toString(); + source = source.slice(source.indexOf('{') + 1, source.lastIndexOf('}')); + + // Extract comment starting with the previous keys, as a reference. + var lcovRef = []; + var currLine = 0; + var currFun = [{name: "top-level", braces: 1}]; + for (var line of source.split('\n')) { + currLine++; + + for (var comment of line.split("//").slice(1)) { + if (!startsWithKey(comment)) + continue; + comment = comment.trim(); + if (comment.startsWith("FN:")) + currFun.push({ name: comment.split(',')[1], braces: 0 }); + var name = currFun[currFun.length - 1].name; + if (!comment.startsWith("DA:")) + continue; + comment = { + offset: null, + lineNumber: currLine, + columnNumber: null, + count: comment.split(",")[1] | 0, + script: (name == "top-level" ? undefined : name) + }; + lcovRef.push(comment); + } + + var deltaBraces = line.split('{').length - line.split('}').length; + currFun[currFun.length - 1].braces += deltaBraces; + if (currFun[currFun.length - 1].braces == 0) + currFun.pop(); + } + + // Create a new global and instrument it with a debugger, to find all scripts, + // created in the current global. + var g = newGlobal({newCompartment: true}); + var dbg = Debugger(g); + dbg.collectCoverageInfo = true; + + var topLevel = null; + dbg.onNewScript = function (s) { + topLevel = s; + dbg.onNewScript = function () {}; + }; + + // Evaluate the code, and collect the hit counts for each scripts / lines. + g.eval(source); + + var coverageRes = []; + function collectCoverage(s) { + var res = s.getOffsetsCoverage(); + if (res == null) + res = [{ + offset: null, + lineNumber: null, + columnNumber: null, + script: s.displayName, + count: 0 + }]; + else { + res.map(function (e) { + e.script = s.displayName; + return e; + }); + } + coverageRes.push(res); + s.getChildScripts().forEach(collectCoverage); + }; + collectCoverage(topLevel); + coverageRes = [].concat(...coverageRes); + + // Check that all the lines are present the result. + function match(ref) { + return function (entry) { + return ref.lineNumber == entry.lineNumber && ref.script == entry.script; + } + } + function ppObj(entry) { + var str = "{"; + for (var k in entry) { + if (entry[k] != null) + str += " '" + k + "': " + entry[k] + ","; + } + str += "}"; + return str; + } + for (ref of lcovRef) { + var res = coverageRes.find(match(ref)); + if (!res) { + // getOffsetsCoverage returns null if we have no result for the + // script. We added a fake entry with an undefined lineNumber, which is + // used to match against the modified reference. + var missRef = Object.create(ref); + missRef.lineNumber = null; + res = coverageRes.find(match(missRef)); + } + + if (!res || res.count != ref.count) { + print("Cannot find `" + ppObj(ref) + "` in the following results:\n", coverageRes.map(ppObj).join("\n")); + print("In the following source:\n", source); + assertEq(true, false); + } + } +} + +checkGetOffsetsCoverage(function () { //FN:$,top-level + ",".split(','); //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + function f() { //FN:$,f + ",".split(','); //DA:$,0 + } + ",".split(','); //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + function f() { //FN:$,f + ",".split(','); //DA:$,1 + } + f(); //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { ','.split(','); //FN:$,top-level //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { function f() { ','.split(','); } //FN:$,top-level //FN:$,f //DA:$,1 + f(); //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + if (l.length == 3) //DA:$,1 + l.push(''); //DA:$,0 + l.pop(); //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + if (l.length == 2) //DA:$,1 + l.push(''); //DA:$,1 + l.pop(); //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + var l = ",".split(','); //DA:$,1 + if (l.length == 3) //DA:$,1 + l.push(''); //DA:$,0 + else + l.pop(); //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + var l = ",".split(','); //DA:$,1 + if (l.length == 2) //DA:$,1 + l.push(''); //DA:$,1 + else + l.pop(); //DA:$,0 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + var l = ",".split(','); //DA:$,1 + if (l.length == 2) //DA:$,1 + l.push(''); //DA:$,1 + else { + if (l.length == 1) //DA:$,0 + l.pop(); //DA:$,0 + } +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + function f(i) { //FN:$,f + var x = 0; //DA:$,2 + while (i--) { // Currently OSR wrongly count the loop header twice. + // So instead of DA:$,12 , we have DA:$,13 . + x += i; //DA:$,10 + x = x / 2; //DA:$,10 + } + return x; //DA:$,2 + } + + f(5); //DA:$,1 + f(5); //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + try { //DA:$,1 + var l = ",".split(','); //DA:$,1 + if (l.length == 2) { //DA:$,1 + l.push(''); //DA:$,1 + throw l; //DA:$,1 + } + l.pop(); //DA:$,0 + } catch (x) { //DA:$,1 + x.pop(); //DA:$,1 + } +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + var l = ",".split(','); //DA:$,1 + try { //DA:$,1 + try { //DA:$,1 + if (l.length == 2) { //DA:$,1 + l.push(''); //DA:$,1 + throw l; //DA:$,1 + } + l.pop(); //DA:$,0 + } finally { //DA:$,1 + l.pop(); //DA:$,1 + } + } catch (x) { //DA:$,1 + } +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + function f() { //FN:$,f + throw 1; //DA:$,1 + f(); //DA:$,0 + } + var l = ",".split(','); //DA:$,1 + try { //DA:$,1 + f(); //DA:$,1 + f(); //DA:$,0 + } catch (x) { //DA:$,1 + } +}); + + +// Test TableSwitch opcode +checkGetOffsetsCoverage(function () { //FN:$,top-level + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 + case 0: + l.push('0'); //DA:$,0 + break; + case 1: + l.push('1'); //DA:$,0 + break; + case 2: + l.push('2'); //DA:$,1 + break; + case 3: + l.push('3'); //DA:$,0 + break; + } + l.pop(); //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 + case 0: + l.push('0'); //DA:$,0 + case 1: + l.push('1'); //DA:$,0 + case 2: + l.push('2'); //DA:$,1 + case 3: + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 + case 5: + l.push('5'); //DA:$,0 + case 4: + l.push('4'); //DA:$,0 + case 3: + l.push('3'); //DA:$,0 + case 2: + l.push('2'); //DA:$,1 + } + l.pop(); //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 + case 2: + l.push('2'); //DA:$,1 + case 5: + l.push('5'); //DA:$,1 + } + l.pop(); //DA:$,1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 + case 3: + l.push('1'); //DA:$,0 + case 5: + l.push('5'); //DA:$,0 + } + l.pop(); //DA:$,1 +}); + +// Unfortunately the differences between switch implementations leaks in the +// code coverage reports. +checkGetOffsetsCoverage(function () { //FN:$,top-level + function f(a) { //FN:$,f + return a; //DA:$,2 + } + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 + case f(-42): //DA:$,1 + l.push('1'); //DA:$,0 + case f(51): //DA:$,1 + l.push('5'); //DA:$,0 + } + l.pop(); //DA:$,1 +}); + + +checkGetOffsetsCoverage(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,1 //BRDA:$,0,2,0 //BRDA:$,0,3,0 + case 0: + case 1: + l.push('0'); //DA:$,0 + l.push('1'); //DA:$,0 + case 2: + l.push('2'); //DA:$,1 + case 3: + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:5 + //BRF:4 + //BRH:1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,0 //BRDA:$,0,2,1 //BRDA:$,0,3,0 + case 0: + l.push('0'); //DA:$,0 + case 1: + l.push('1'); //DA:$,0 + case 2: + case 3: + l.push('2'); //DA:$,1 + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:5 + //BRF:4 + //BRH:1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,0 //BRDA:$,0,2,1 //BRDA:$,0,3,0 + case 0: + l.push('0'); //DA:$,0 + case 1: + default: + l.push('1'); //DA:$,0 + case 2: + l.push('2'); //DA:$,1 + case 3: + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:5 + //BRF:4 + //BRH:1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,0 //BRDA:$,0,2,1 //BRDA:$,0,3,0 + case 0: + l.push('0'); //DA:$,0 + case 1: + l.push('1'); //DA:$,0 + default: + case 2: + l.push('2'); //DA:$,1 + case 3: + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:5 + //BRF:4 + //BRH:1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,0 //BRDA:$,0,2,1 //BRDA:$,0,3,0 //BRDA:$,0,4,0 + case 0: + l.push('0'); //DA:$,0 + case 1: + l.push('1'); //DA:$,0 + default: + l.push('default'); //DA:$,0 + case 2: + l.push('2'); //DA:$,1 + case 3: + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:8 + //LH:5 + //BRF:5 + //BRH:1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level //FNDA:1,% + var l = ",".split(','); //DA:$,1 + switch (l.length) { //DA:$,1 //BRDA:$,0,0,0 //BRDA:$,0,1,0 //BRDA:$,0,2,0 //BRDA:$,0,3,1 + case 0: + l.push('0'); //DA:$,0 + case 1: + l.push('1'); //DA:$,0 + default: + l.push('2'); //DA:$,1 + case 3: + l.push('3'); //DA:$,1 + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:7 + //LH:5 + //BRF:4 + //BRH:1 +}); + +checkGetOffsetsCoverage(function () { //FN:$,top-level //FNDA:1,% + var l = ','.split(','); //DA:$,1 + if (l.length === 45) { //DA:$,1 //BRDA:$,0,0,1 //BRDA:$,0,1,0 + switch (l[0]) { //DA:$,0 //BRDA:$,1,0,- //BRDA:$,1,1,- + case ',': + l.push('0'); //DA:$,0 + default: + l.push('1'); //DA:$,0 + } + } + l.pop(); //DA:$,1 + //FNF:1 + //FNH:1 + //LF:6 + //LH:3 + //BRF:4 + //BRH:1 +}); + +// If you add a test case here, do the same in +// jit-test/tests/coverage/simple.js diff --git a/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-02.js b/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-02.js new file mode 100644 index 0000000000..f2973086ce --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-02.js @@ -0,0 +1,41 @@ +// |jit-test| --ion-pruning=off; skip-if: isLcovEnabled() + +// This script check that when we enable / disable the code coverage collection, +// then we have different results for the getOffsetsCoverage methods. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var coverageInfo = []; +var num = 20; +function loop(i) { + var n = 0; + for (n = 0; n < i; n++) + debugger; +} +g.eval(loop.toString()); + +dbg.onDebuggerStatement = function (f) { + // Collect coverage info each time we hit a debugger statement. + coverageInfo.push(f.callee.script.getOffsetsCoverage()); +}; + +coverageInfo = []; +dbg.collectCoverageInfo = false; +g.eval("loop(" + num + ");"); +assertEq(coverageInfo.length, num); +assertEq(coverageInfo[0], null); +assertEq(coverageInfo[num - 1], null); + +coverageInfo = []; +dbg.collectCoverageInfo = true; +g.eval("loop(" + num + ");"); +assertEq(coverageInfo.length, num); +assertEq(!coverageInfo[0], false); +assertEq(!coverageInfo[num - 1], false); + +coverageInfo = []; +dbg.collectCoverageInfo = false; +g.eval("loop(" + num + ");"); +assertEq(coverageInfo.length, num); +assertEq(coverageInfo[0], null); +assertEq(coverageInfo[num - 1], null); diff --git a/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-03.js b/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-03.js new file mode 100644 index 0000000000..8bbafb9838 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-03.js @@ -0,0 +1,21 @@ +// |jit-test| error: Error: can't start debugging: a debuggee script is on the stack + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +function loop(i) { + var n = 0; + for (n = 0; n < i; n++) + debugger; +} +g.eval(loop.toString()); + +var countDown = 20; +dbg.onDebuggerStatement = function (f) { + // Should throw an error. + if (countDown > 0 && --countDown == 0) { + dbg.collectCoverageInfo = !dbg.collectCoverageInfo; + } +}; + +dbg.collectCoverageInfo = false; +g.eval("loop("+ (2 * countDown) +");"); diff --git a/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-04.js b/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-04.js new file mode 100644 index 0000000000..22bff85eab --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-04.js @@ -0,0 +1,22 @@ +// |jit-test| error: Error: can't start debugging: a debuggee script is on the stack + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); + +function loop(i) { + var n = 0; + for (n = 0; n < i; n++) + debugger; +} +g.eval(loop.toString()); + +var countDown = 20; +dbg.onDebuggerStatement = function (f) { + // Should throw an error. + if (countDown > 0 && --countDown == 0) { + dbg.collectCoverageInfo = !dbg.collectCoverageInfo; + } +}; + +dbg.collectCoverageInfo = true; +g.eval("loop("+ (2 * countDown) +");"); diff --git a/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-05.js b/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-05.js new file mode 100644 index 0000000000..3072fbc00e --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-05.js @@ -0,0 +1,24 @@ +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +function f(x) { + while (x) { + interruptIf(true); + x -= 1; + } +} +g.eval(f.toString()); + +// Toogle the debugger while the function f is running. +setInterruptCallback(toogleDebugger); +function toogleDebugger() { + dbg.enabled = !dbg.enabled; + return true; +} + +dbg.collectCoverageInfo = false; +dbg.enabled = false; +g.eval("f(10);"); + +dbg.collectCoverageInfo = true; +dbg.enabled = false; +g.eval("f(10);"); diff --git a/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-bug1233178.js b/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-bug1233178.js new file mode 100644 index 0000000000..70753c8533 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getOffsetsCoverage-bug1233178.js @@ -0,0 +1,13 @@ +gczeal(2); +g = newGlobal({newCompartment: true}); +dbg = Debugger(g); +function loop() { + for (var i = 0; i < 10; i++) + debugger; +} +g.eval(loop.toString()); +dbg.onDebuggerStatement = function(f) { + f.script.getOffsetsCoverage(); +} +dbg.collectCoverageInfo = true; +g.eval("loop")(); diff --git a/js/src/jit-test/tests/debug/Script-getPossibleBreakpoints-02.js b/js/src/jit-test/tests/debug/Script-getPossibleBreakpoints-02.js new file mode 100644 index 0000000000..b2e0d03a9c --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getPossibleBreakpoints-02.js @@ -0,0 +1,87 @@ + +var global = newGlobal({newCompartment: true}); +var dbg = Debugger(global); +dbg.onDebuggerStatement = onDebuggerStatement; + +global.eval(` + debugger; + function f() { + var o = {}; // 4 + + o.a; o.a; o.a; o.a; // 6 + o.a; o.a; // 7 + o.a; o.a; o.a; // 8 + o.a; // 9 + } // 10 +`); + +function onDebuggerStatement(frame) { + const fScript = frame.script.getChildScripts()[0]; + + const allBreakpoints = fScript.getPossibleBreakpoints(); + assertEq(allBreakpoints.length, 12); + + assertBPCount({ line: 4 }, 1); + assertBPCount({ line: 5 }, 0); + assertBPCount({ line: 6 }, 4); + assertBPCount({ line: 7 }, 2); + assertBPCount({ line: 8 }, 3); + assertBPCount({ line: 9 }, 1); + assertBPCount({ line: 10 }, 1); + + assertBPCount({ line: 6, minColumn: 8 }, 3); + assertBPCount({ line: 6, maxColumn: 17 }, 3); + assertBPCount({ line: 6, minColumn: 8, maxColumn: 17 }, 2); + assertBPError({ line: 1, minLine: 1 }, "line", "not allowed alongside 'minLine'/'maxLine'"); + assertBPError({ line: 1, maxLine: 1 }, "line", "not allowed alongside 'minLine'/'maxLine'"); + assertBPError({ line: "1" }, "line", "not an integer"); + + assertBPCount({ minLine: 9 }, 2); + assertBPCount({ minLine: 9, minColumn: 1 }, 2); + assertBPCount({ minLine: 9, minColumn: 9 }, 1); + assertBPError({ minLine: "1" }, "minLine", "not an integer"); + assertBPError({ minColumn: 2 }, "minColumn", "not allowed without 'line' or 'minLine'"); + assertBPError({ minLine: 1, minColumn: "2" }, "minColumn", "not a positive integer"); + assertBPError({ minLine: 1, minColumn: 0 }, "minColumn", "not a positive integer"); + assertBPError({ minLine: 1, minColumn: -1 }, "minColumn", "not a positive integer"); + + assertBPCount({ maxLine: 7 }, 5); + assertBPCount({ maxLine: 7, maxColumn: 1 }, 5); + assertBPCount({ maxLine: 7, maxColumn: 9 }, 6); + assertBPError({ maxLine: "1" }, "maxLine", "not an integer"); + assertBPError({ maxColumn: 2 }, "maxColumn", "not allowed without 'line' or 'maxLine'"); + assertBPError({ maxLine: 1, maxColumn: "2" }, "maxColumn", "not a positive integer"); + assertBPError({ maxLine: 1, maxColumn: 0 }, "maxColumn", "not a positive integer"); + assertBPError({ maxLine: 1, maxColumn: -1 }, "maxColumn", "not a positive integer"); + + assertBPCount({ minLine: 6, maxLine: 8 }, 6); + assertBPCount({ minLine: 6, minColumn: 9, maxLine: 8 }, 5); + assertBPCount({ minLine: 6, maxLine: 8, maxColumn: 9 }, 7); + assertBPCount({ minLine: 6, minColumn: 9, maxLine: 8, maxColumn: 9 }, 6); + + assertBPCount({ + minOffset: fScript.getPossibleBreakpoints({ line: 6 })[3].offset, + }, 8); + assertBPError({ minOffset: "1" }, "minOffset", "not an integer"); + assertBPCount({ + maxOffset: fScript.getPossibleBreakpoints({ line: 6 })[3].offset, + }, 4); + assertBPError({ maxOffset: "1" }, "maxOffset", "not an integer"); + assertBPCount({ + minOffset: fScript.getPossibleBreakpoints({ line: 6 })[2].offset, + maxOffset: fScript.getPossibleBreakpoints({ line: 7 })[1].offset, + }, 3); + + function assertBPError(query, field, message) { + try { + fScript.getPossibleBreakpoints(query); + assertEq(false, true); + } catch (err) { + assertEq(err.message, `getPossibleBreakpoints' '${field}' is ${message}`); + } + } + + function assertBPCount(query, count) { + assertEq(fScript.getPossibleBreakpoints(query).length, count); + } +}; diff --git a/js/src/jit-test/tests/debug/Script-getPossibleBreakpoints.js b/js/src/jit-test/tests/debug/Script-getPossibleBreakpoints.js new file mode 100644 index 0000000000..0277b65189 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-getPossibleBreakpoints.js @@ -0,0 +1,384 @@ +// simple ExpressionStatement +assertBreakpoints(` + /*S*/a; + /*S*/obj.prop; +`); + +// ExpressionStatement with calls +assertBreakpoints(` + /*S*/a(); + /*S*/obj./*B*/prop(); +`); + +// calls with many args +assertBreakpoints(` + /*S*/a/*B*/(1); + /*S*/a/*B*/(1,2); + /*S*/a/*B*/(1,2,3); +`); + + +// ExpressionStatement with nested expression calls. +assertBreakpoints(` + "45"; + /*S*/"45" + /*B*/a(); + /*S*/b() + "45"; + + /*S*/"45" + o./*B*/a(); + /*S*/o./*B*/b() + "45"; + /*S*/"45" + o./*B*/a() + o./*B*/b(); + /*S*/o./*B*/b() + "45" + o./*B*/a(); + /*S*/o./*B*/b() + o./*B*/a() + "45"; +`); + +// var VariableStatement initializers +assertBreakpoints(` + var foo1 = /*S*/"" + o.a + "" + /*B*/b(), + foo2 = /*S*/"45", + foo3 = /*S*/"45" + /*B*/a(), + foo4 = /*S*/b() + "45", + foo5 = /*S*/"45" + /*B*/a() + /*B*/b(), + foo6 = /*S*/b() + "45" + /*B*/a(), + foo7 = /*S*/b() + /*B*/a() + "45", + foo8 = /*S*/"45" + o./*B*/a(), + foo9 = /*S*/o./*B*/b() + "45", + foo10 = /*S*/"45" + o./*B*/a() + o./*B*/b(), + foo11 = /*S*/o./*B*/b() + "45" + o./*B*/a(), + foo12 = /*S*/o./*B*/b() + o./*B*/a() + "45"; +`); + +// let VariableStatement initializers +assertBreakpoints(` + let foo1 = /*S*/"" + o.a + "" + /*B*/b(), + foo2 = /*S*/"45", + foo3 = /*S*/"45" + /*B*/a(), + foo4 = /*S*/b() + "45", + foo5 = /*S*/"45" + /*B*/a() + /*B*/b(), + foo6 = /*S*/b() + "45" + /*B*/a(), + foo7 = /*S*/b() + /*B*/a() + "45", + foo8 = /*S*/"45" + o./*B*/a(), + foo9 = /*S*/o./*B*/b() + "45", + foo10 = /*S*/"45" + o./*B*/a() + o./*B*/b(), + foo11 = /*S*/o./*B*/b() + "45" + o./*B*/a(), + foo12 = /*S*/o./*B*/b() + o./*B*/a() + "45"; +`); + +// const VariableStatement initializers +assertBreakpoints(` + const foo1 = /*S*/"" + o.a + "" + /*B*/b(), + foo2 = /*S*/"45", + foo3 = /*S*/"45" + /*B*/a(), + foo4 = /*S*/b() + "45", + foo5 = /*S*/"45" + /*B*/a() + /*B*/b(), + foo6 = /*S*/b() + "45" + /*B*/a(), + foo7 = /*S*/b() + /*B*/a() + "45", + foo8 = /*S*/"45" + o./*B*/a(), + foo9 = /*S*/o./*B*/b() + "45", + foo10 = /*S*/"45" + o./*B*/a() + o./*B*/b(), + foo11 = /*S*/o./*B*/b() + "45" + o./*B*/a(), + foo12 = /*S*/o./*B*/b() + o./*B*/a() + "45"; +`); + +// EmptyStatement +assertBreakpoints(` + ; + ; + ; + /*S*/a(); +`); + +// IfStatement +assertBreakpoints(` + if (/*S*/a) {} + if (/*S*/a()) {} + if (/*S*/obj.prop) {} + if (/*S*/obj./*B*/prop()) {} + if (/*S*/"42" + a) {} + if (/*S*/"42" + /*B*/a()) {} + if (/*S*/"42" + obj.prop) {} + if (/*S*/"42" + obj./*B*/prop()) {} +`); + +// DoWhile +assertBreakpoints(` + do { + /*S*/fn(); + } while(/*S*/a) + do { + /*S*/fn(); + } while(/*S*/"42" + /*B*/a()); +`); + +// While +assertBreakpoints(` + while(/*S*/a) { + /*S*/fn(); + } + while(/*S*/"42" + /*B*/a()) { + /*S*/fn(); + } +`); + +// ForExpr +assertBreakpoints(` + for (/*S*/b = 42; /*S*/c; /*S*/d) /*S*/fn(); + for (var b = /*S*/42; /*S*/c; /*S*/d) /*S*/fn(); + for (let b = /*S*/42; /*S*/c; /*S*/d) /*S*/fn(); + for (const b = /*S*/42; /*S*/c; /*S*/d) /*S*/fn(); + for (b in /*S*/d) /*S*/fn(); + for (var b in /*S*/d) /*S*/fn(); + for (let b in /*S*/d) /*S*/fn(); + for (const b in /*S*/d) /*S*/fn(); + for (b of /*S*/d) /*S*/fn(); + for (var b of /*S*/d) /*S*/fn(); + for (let b of /*S*/d) /*S*/fn(); + for (const b of /*S*/d) /*S*/fn(); +`); + +// SwitchStatement +assertBreakpoints(` + switch (/*S*/d) { + case 42: + /*S*/fn(); + } +`); + +// ContinueStatement +assertBreakpoints(` + while (/*S*/a) { + /*S*/continue; + } +`); + +// BreakStatement +assertBreakpoints(` + while (/*S*/a) { + /*S*/break; + } +`); + +// ReturnStatement +assertBreakpoints(` + /*S*/return a + /*B*/b(); +`); + +// WithStatement +assertBreakpoints(` + with (/*S*/a) { + /*S*/fn(); + } +`); + +// ThrowStatement +assertBreakpoints(` + /*S*/throw /*B*/fn(); + /*S*/throw "42" + /*B*/fn(); +`); + +// DebuggerStatement +assertBreakpoints(` + /*S*/debugger; + /*S*/debugger; +`); + +// BlockStatent wrapper +assertBreakpoints(` + { + /*S*/a(); + } +`); + +// ClassDeclaration +assertBreakpoints(` + class Foo2 {} + /*S*/class Foo extends ("" + o.a + /*B*/a() + /*B*/b()) { } +`); + +// Misc examples +assertBreakpoints(` + /*S*/void /*B*/a(); +`); +assertBreakpoints(` + /*S*/a() + /*B*/b(); +`); +assertBreakpoints(` + for ( + var i = /*S*/0; + /*S*/i < n; // 4 + /*S*/++i + ) { + /*S*/console./*B*/log("omg"); + } +`); +assertBreakpoints(` + function * gen(){ + var foo = ( + (/*S*/console./*B*/log('before', /*B*/a())), + (yield console./*B*/log('mid', /*B*/b())), + (console./*B*/log('after', /*B*/a())) + ); + var foo2 = /*S*/a() + /*B*/b(); + /*S*/console./*B*/log(foo); + /*B*/} + var i = /*S*/0; + for (var foo of /*S*/gen()) { + /*S*/console./*B*/log(i++); + } +`); +assertBreakpoints(` + var fn = /*S*/() => { + /*S*/console./*B*/log("fn"); + /*S*/return /*B*/new Proxy({ prop: 42 }, { + deleteProperty() { + /*S*/console./*B*/log("delete"); + /*B*/} + }); + /*B*/}; +`); +assertBreakpoints(` + var fn = /*S*/async (arg) => { + /*S*/console./*B*/log("fn"); + /*B*/}; +`); +assertBreakpoints(` + var fn = /*S*/arg => { + /*S*/console./*B*/log("fn"); + /*B*/}; +`); +assertBreakpoints(` + var fn = /*S*/async arg => { + /*S*/console./*B*/log("fn"); + /*B*/}; +`); +assertBreakpoints(` + var fn = /*S*/(arg) => /*S*/console./*B*/log("fn"); + var fn = /*S*/async (arg) => /*S*/console./*B*/log("fn"); + var fn = /*S*/arg => /*S*/console./*B*/log("fn"); + var fn = /*S*/async arg => /*S*/console./*B*/log("fn"); +`); +assertBreakpoints(` + if ((/*S*/delete /*B*/fn().prop) + /*B*/b()) { + /*S*/console./*B*/log("foo"); + } +`); +assertBreakpoints(` + for (var j = /*S*/0; (/*S*/o.a) < 3; (/*S*/j++, /*B*/a(), /*B*/b())) { + /*S*/console./*B*/log(i); + } +`); +assertBreakpoints(` + function fn2( + [a, b] = (/*B*/a(), /*B*/b()) + ) { + /*S*/a(); + /*S*/b(); + /*B*/} + + ({ a, b } = (/*S*/a(), /*B*/b())); +`); +assertBreakpoints(` + /*S*/o.a + "42" + /*B*/a() + /*B*/b(); +`); +assertBreakpoints(` + /*S*/a(); + /*S*/o./*B*/a(/*B*/b()); +`); +assertBreakpoints(` + (/*S*/{}[obj.a] = 42 + /*B*/a()); +`); +assertBreakpoints(` + var { + foo = o.a + } = /*S*/{}; +`); +assertBreakpoints(` + var ack = /*S*/[ + o.a, + o.b, + /*B*/a(), + /*B*/a(), + /*B*/a(), + /*B*/a(), + /*B*/a(), + /*B*/a(), + /*B*/a(), + ]; +`); + +function assertBreakpoints(expected) { + const input = expected.replace(/\/\*[BS]\*\//g, ""); + + var global = newGlobal({ newCompartment: true }); + var dbg = Debugger(global); + dbg.onDebuggerStatement = function(frame) { + const fScript = frame.environment.parent.getVariable("f").script; + + let positions = []; + (function recurse(script) { + const bps = script.getPossibleBreakpoints(); + const offsets = script.getPossibleBreakpointOffsets(); + + assertEq(offsets.length, bps.length); + for (let i = 0; i < bps.length; i++) { + assertEq(offsets[i], bps[i].offset); + } + + positions = positions.concat(bps); + script.getChildScripts().forEach(recurse); + })(fScript); + + const result = annotateOffsets(input, positions); + assertEq(result, expected + "/*B*/"); + }; + + global.eval(`function f(){${input}} debugger;`); +} + +function annotateOffsets(code, positions) { + const offsetLookup = createOffsetLookup(code); + + positions = positions.slice(); + positions.sort((a, b) => { + const lineDiff = a.lineNumber - b.lineNumber; + return lineDiff === 0 ? a.columnNumber - b.columnNumber : lineDiff; + }); + positions.reverse(); + + let output = ""; + let last = code.length; + for (const { lineNumber, columnNumber, isStepStart } of positions) { + const offset = offsetLookup(lineNumber, columnNumber); + + output = + "/*" + + (isStepStart ? "S" : "B") + + "*/" + + code.slice(offset, last) + + output; + last = offset; + } + return code.slice(0, last) + output; +} + +function createOffsetLookup(code) { + const lines = code.split(/(\r?\n|\r|\u2028|\u2029)/g); + const lineOffsets = []; + + let count = 0; + for (const [i, str] of lines.entries()) { + if (i % 2 === 0) { + lineOffsets[i / 2] = count; + } + count += str.length; + } + + return function(line, column) { + // Lines from getAllColumnOffsets are 1-based. + line = line - 1; + + if (!lineOffsets.hasOwnProperty(line)) { + throw new Error("Unknown line " + line + " column " + column); + } + return lineOffsets[line] + column - 1; + }; +} diff --git a/js/src/jit-test/tests/debug/Script-global-01.js b/js/src/jit-test/tests/debug/Script-global-01.js new file mode 100644 index 0000000000..fb2d131e35 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-global-01.js @@ -0,0 +1,18 @@ +// Debugger.Script.prototype.script returns the global the script runs in. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +var log = ''; +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.global, gw); +} + +g.eval('debugger;'); +assertEq(log, 'd'); + +g.eval('function f() { debugger; }'); +g.f(); +assertEq(log, 'dd'); diff --git a/js/src/jit-test/tests/debug/Script-global-02.js b/js/src/jit-test/tests/debug/Script-global-02.js new file mode 100644 index 0000000000..9d5e1fda32 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-global-02.js @@ -0,0 +1,36 @@ +// Debugger.Script.prototype.script returns the global the script runs in. +// Multi-global version. + +var dbg = new Debugger; + +var g1 = newGlobal({newCompartment: true}); +var g1w = dbg.addDebuggee(g1); + +var g2 = newGlobal({newCompartment: true}); +var g2w = dbg.addDebuggee(g2); + +var g3 = newGlobal({newCompartment: true}); +var g3w = dbg.addDebuggee(g3); + +var log = ''; +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.global, g1w); + assertEq(frame.older.script.global, g2w); + assertEq(frame.older.older.script.global, g3w); + assertEq(frame.older.older.older.script.global, g1w); +} + +g1.eval('function f() { debugger; }'); + +g2.g1 = g1; +g2.eval('function g() { g1.f(); }'); + +g3.g2 = g2; +g3.eval('function h() { g2.g(); }'); + +g1.g3 = g3; +g1.eval('function i() { g3.h(); }'); + +g1.i(); +assertEq(log, 'd'); diff --git a/js/src/jit-test/tests/debug/Script-isFunction.js b/js/src/jit-test/tests/debug/Script-isFunction.js new file mode 100644 index 0000000000..5f68d54b19 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-isFunction.js @@ -0,0 +1,25 @@ +// Script.isFunction should do what it is supposed to do. + +const g = newGlobal({newCompartment: true}); +const dbg = new Debugger; +dbg.addDebuggee(g); + +let gNumFunctionScripts = 0; +function countFunctionScripts(script) { + if (script.isFunction) { + gNumFunctionScripts++; + } + return script.getChildScripts().forEach(countFunctionScripts); +} + +dbg.onNewScript = countFunctionScripts; + +g.eval(` +function f() { + function f2() {} +} +async function g() {} +function* h() {} +`); + +assertEq(gNumFunctionScripts, 4); diff --git a/js/src/jit-test/tests/debug/Script-isInCatchScope.js b/js/src/jit-test/tests/debug/Script-isInCatchScope.js new file mode 100644 index 0000000000..c5d3cfe12e --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-isInCatchScope.js @@ -0,0 +1,68 @@ +// Test if isInCatchScope properly detects catch blocks. + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +function test(string, mustBeCaught) { + let index = 0; + dbg.onExceptionUnwind = function (frame) { + let willBeCaught = false; + do { + if (frame.script.isInCatchScope(frame.offset)) { + willBeCaught = true; + break; + } + frame = frame.older; + } while (frame != null); + assertEq(willBeCaught, mustBeCaught[index++]); + }; + + try { + g.eval(string); + } catch (ex) {} + assertEq(index, mustBeCaught.length); +} + +// Should correctly detect catch blocks +test("throw new Error();", [false]); +test("try { throw new Error(); } catch (e) {}", [true]); +test("try { throw new Error(); } finally {}", [false, false]); +test("try { throw new Error(); } catch (e) {} finally {}", [true]); + +// Source of the exception shouldn't matter +test("(null)();", [false]); +test("try { (null)(); } catch (e) {}", [true]); +test("try { (null)(); } finally {}", [false, false]); +test("try { (null)(); } catch (e) {} finally {}", [true]); + +// Should correctly detect catch blocks in functions +test("function f() { throw new Error(); } f();", [false, false]); +test("function f() { try { throw new Error(); } catch (e) {} } f();", [true]); +test("function f() { try { throw new Error(); } finally {} } f();", [false, false, false]); +test("function f() { try { throw new Error(); } catch (e) {} finally {} } f();", [true]); + +// Should correctly detect catch blocks in evals +test("eval('throw new Error();')", [false, false]); +test("eval('try { throw new Error(); } catch (e) {}');", [true]); +test("eval('try { throw new Error(); } finally {}');", [false, false, false]); +test("eval('try { throw new Error(); } catch (e) {} finally {}');", [true]); + +// Should correctly detect rethrows +test("try { throw new Error(); } catch (e) { throw e; }", [true, false]); +test("try { try { throw new Error(); } catch (e) { throw e; } } catch (e) {}", [true, true]); +test("try { try { throw new Error(); } finally {} } catch (e) {}", [true, true]); +test("function f() { try { throw new Error(); } catch (e) { throw e; } } f();", [true, false, false]); +test("function f() { try { try { throw new Error(); } catch (e) { throw e; } } catch (e) {} } f();", [true, true]); +test("function f() { try { try { throw new Error(); } finally {} } catch (e) {} } f();", [true, true]); +test("eval('try { throw new Error(); } catch (e) { throw e; }')", [true, false, false]); +test("eval('try { try { throw new Error(); } catch (e) { throw e; } } catch (e) {}')", [true, true]); + +// Should correctly detect catch blocks across frame boundaries +test("function f() { throw new Error(); } try { f(); } catch (e) {}", [true, true]); +test("function f() { throw new Error(); } try { f(); } catch (e) { throw e; }", [true, true, false]); +test("try { eval('throw new Error()'); } catch (e) {}", [true, true]); +test("try { eval('throw new Error()'); } catch (e) { throw e; }", [true, true, false]); + +// Should correctly detect catch blocks just before and just after throws +test("throw new Error; try {} catch (e) {}", [false]); +test("try {} catch (e) {} throw new Error();", [false]); diff --git a/js/src/jit-test/tests/debug/Script-isModule-01.js b/js/src/jit-test/tests/debug/Script-isModule-01.js new file mode 100644 index 0000000000..85cae24ac3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-isModule-01.js @@ -0,0 +1,13 @@ +// Debugger.Object.prototype.isModule + +const g = newGlobal({newCompartment: true}); +const dbg = Debugger(g); +let count = 0; +dbg.onNewScript = function (script) { + count += 1; + assertEq(script.isModule, true); +}; +const m = g.parseModule(""); +moduleLink(m); +moduleEvaluate(m); +assertEq(count, 1); diff --git a/js/src/jit-test/tests/debug/Script-isModule-02.js b/js/src/jit-test/tests/debug/Script-isModule-02.js new file mode 100644 index 0000000000..c469f11ec8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-isModule-02.js @@ -0,0 +1,11 @@ +// Debugger.Object.prototype.isModule + +const g = newGlobal({newCompartment: true}); +const dbg = Debugger(g); +let count = 0; +dbg.onNewScript = function (script) { + count += 1; + assertEq(script.isModule, false); +}; +const m = g.eval(""); +assertEq(count, 1); diff --git a/js/src/jit-test/tests/debug/Script-isModule-03.js b/js/src/jit-test/tests/debug/Script-isModule-03.js new file mode 100644 index 0000000000..23c8fbb1a3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-isModule-03.js @@ -0,0 +1,18 @@ +// Debugger.Object.prototype.isModule + +const g = newGlobal({newCompartment: true}); +const dbg = Debugger(g); +let count = 0; +dbg.onNewScript = function (script) { + count += 1; + assertEq(script.isModule, true); + + dbg.onNewScript = function (script) { + count += 1; + assertEq(script.isModule, false); + }; +}; +const m = g.parseModule("eval('')"); +moduleLink(m); +moduleEvaluate(m); +assertEq(count, 2); diff --git a/js/src/jit-test/tests/debug/Script-isModule-04.js b/js/src/jit-test/tests/debug/Script-isModule-04.js new file mode 100644 index 0000000000..a46557c09a --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-isModule-04.js @@ -0,0 +1,19 @@ +// Debugger.Object.prototype.isModule + +const g = newGlobal({newCompartment: true}); +const dbg = Debugger(g); +let count = 0; +dbg.onNewScript = function (script) { + count += 1; + assertEq(script.isModule, true); +}; +dbg.onDebuggerStatement = function (frame) { + const { script } = frame; + + assertEq(script.isModule, false); +}; +const m = g.parseModule("(function(){ debugger; })()"); +moduleLink(m); +moduleEvaluate(m); + +assertEq(count, 1); diff --git a/js/src/jit-test/tests/debug/Script-lineCount.js b/js/src/jit-test/tests/debug/Script-lineCount.js new file mode 100644 index 0000000000..1eeb28013d --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-lineCount.js @@ -0,0 +1,23 @@ +// Test Script.lineCount. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); + +function test(scriptText, expectedLineCount) { + let found = false; + + dbg.onNewScript = function(script, global) { + assertEq(script.lineCount, expectedLineCount); + found = true; + }; + + g.evaluate(scriptText); + assertEq(found, true); +} + +src = 'var a = (function(){\n' + // 0 + 'var b = 9;\n' + // 1 + 'console.log("x", b);\n'+ // 2 + 'return b;\n' + // 3 + '})();'; // 4 +test(src, 5); diff --git a/js/src/jit-test/tests/debug/Script-mainOffset-01.js b/js/src/jit-test/tests/debug/Script-mainOffset-01.js new file mode 100644 index 0000000000..ae958a523b --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-mainOffset-01.js @@ -0,0 +1,20 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2; js-indent-level: 2 -*- */ +// The main offset of a script should be hit before it performs any actions. + +var g = newGlobal({newCompartment: true}); +g.eval("var n = 0; function foo() { n = 1; }"); +var dbg = Debugger(g); + +var hits = 0; +function breakpointHit(frame) { + hits++; + assertEq(frame.eval("n").return, 0); +} + +dbg.onDebuggerStatement = function (frame) { + var script = frame.eval("foo").return.script; + script.setBreakpoint(script.mainOffset, { hit: breakpointHit }); +}; +g.eval("debugger; foo()"); +assertEq(g.eval("n"), 1); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/Script-parameterNames.js b/js/src/jit-test/tests/debug/Script-parameterNames.js new file mode 100644 index 0000000000..1557a97e22 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-parameterNames.js @@ -0,0 +1,36 @@ +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gDO = dbg.addDebuggee(g); + +function check(expr, expected) { + let completion = gDO.executeInGlobal(expr); + if (completion.throw) + throw completion.throw.unsafeDereference(); + + let fn = completion.return; + if (expected === undefined) + assertEq(fn.script.parameterNames, undefined); + else + assertDeepEq(fn.script.parameterNames, expected); +} + +check('(function () {})', []); +check('(function (x) {})', ["x"]); +check('(function (x = 1) {})', ["x"]); +check('(function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) {})', + ["a","b","c","d","e","f","g","h","i","j","k","l","m", + "n","o","p","q","r","s","t","u","v","w","x","y","z"]); +check('(function (a, [b, c], {d, e:f}) { })', + ["a", undefined, undefined]); +check('(async function (a, b, c) {})', ["a", "b", "c"]); +check('(async function* (d, e, f) {})', ["d", "e", "f"]); + +// Non-function scripts have |undefined| parameterNames. +var log = []; +dbg.onEnterFrame = function(frame) { + log.push(frame.script.parameterNames); +}; +g.evaluate("function foo(a, b) { return eval('1'); }; foo();"); +assertDeepEq(log, [undefined, ["a", "b"], undefined]); // global, function, eval diff --git a/js/src/jit-test/tests/debug/Script-selfhosted-builtins.js b/js/src/jit-test/tests/debug/Script-selfhosted-builtins.js new file mode 100644 index 0000000000..ff981f5400 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-selfhosted-builtins.js @@ -0,0 +1,15 @@ +// The script of self-hosted builtins is not exposed to the debugger and +// instead is reported as |undefined| just like native builtins. + +let g = newGlobal({newCompartment: true}); + +let dbg = new Debugger(); +let gw = dbg.addDebuggee(g); + +// Array is a known native builtin function. +let nativeBuiltin = gw.makeDebuggeeValue(g.Array); +assertEq(nativeBuiltin.script, undefined); + +// Array.prototype[@@iterator] is a known self-hosted builtin function. +let selfhostedBuiltin = gw.makeDebuggeeValue(g.Array.prototype[Symbol.iterator]); +assertEq(selfhostedBuiltin.script, undefined); diff --git a/js/src/jit-test/tests/debug/Script-source-01.js b/js/src/jit-test/tests/debug/Script-source-01.js new file mode 100644 index 0000000000..d50d53e583 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-source-01.js @@ -0,0 +1,26 @@ +/* + * Script.prototype.source should be an object. Moreover, it should be the + * same object for each child script within the same debugger. + */ +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +let count = 0; +dbg.onNewScript = function (script) { + assertEq(typeof script.source, "object"); + function traverse(script) { + ++count; + script.getChildScripts().forEach(function (child) { + assertEq(child.source, script.source); + traverse(child); + }); + } + traverse(script); +} + +g.eval("2 * 3"); +g.eval("function f() {}"); +g.eval("function f() { function g() {} }"); +g.eval("eval('2 * 3')"); +g.eval("new Function('2 * 3')"); +assertEq(count, 10); diff --git a/js/src/jit-test/tests/debug/Script-source-02.js b/js/src/jit-test/tests/debug/Script-source-02.js new file mode 100644 index 0000000000..43bb375d22 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-source-02.js @@ -0,0 +1,16 @@ +/* + * Script.prototype.source should be the same object for both the top-level + * script and the script of functions accessed as debuggee values on the global + */ +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(); +let gw = dbg.addDebuggee(g); + +let count = 0; +dbg.onDebuggerStatement = function (frame) { + ++count; + assertEq(frame.script.source, gw.makeDebuggeeValue(g.f).script.source); +} + +g.eval("function f() {}; debugger;"); +assertEq(count, 1); diff --git a/js/src/jit-test/tests/debug/Script-source-03.js b/js/src/jit-test/tests/debug/Script-source-03.js new file mode 100644 index 0000000000..ed42967d7c --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-source-03.js @@ -0,0 +1,22 @@ +/* + * Script.prototype.source should be a different object for the same script + * within different debuggers. + */ +let g = newGlobal({newCompartment: true}); +let dbg1 = new Debugger(g); +let dbg2 = new Debugger(g); + +var count = 0; +var source; +function test(script) { + ++count; + if (!source) + source = script.source; + else + assertEq(script.source != source, true); +}; +dbg1.onNewScript = test; +dbg2.onNewScript = test; + +g.eval("2 * 3"); +assertEq(count, 2); diff --git a/js/src/jit-test/tests/debug/Script-sourceStart-01.js b/js/src/jit-test/tests/debug/Script-sourceStart-01.js new file mode 100644 index 0000000000..d5399a2b7d --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-sourceStart-01.js @@ -0,0 +1,22 @@ +/* + * Script.prototype.sourceStart and Script.prototype.sourceLength should both be + * a number. + */ +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +var count = 0; +function test(string, range) { + dbg.onNewScript = function (script) { + ++count; + assertEq(script.sourceStart, range[0]); + assertEq(script.sourceLength, range[1]); + }; + + g.eval(string); +}; + +test("", [0, 0]); +test("2 * 3", [0, 5]); +test("2\n*\n3", [0, 5]); +assertEq(count, 3); diff --git a/js/src/jit-test/tests/debug/Script-sourceStart-02.js b/js/src/jit-test/tests/debug/Script-sourceStart-02.js new file mode 100644 index 0000000000..784388b1ce --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-sourceStart-02.js @@ -0,0 +1,32 @@ +/* + * For function statements, Script.prototype.sourceStart and + * Script.prototype.sourceLength should comprise both the opening '(' and the + * closing '}'. + */ +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +function test(string, ranges) { + var index = 0; + dbg.onNewScript = function (script) { + function traverse(script) { + script.getChildScripts().forEach(function (script) { + assertEq(script.sourceStart, ranges[index][0]); + assertEq(script.sourceLength, ranges[index][1]); + ++index; + traverse(script); + }); + } + traverse(script); + }; + + g.eval(string); + assertEq(index, ranges.length); +}; + +test("function f() {}", [[10, 5]]); +test("function f() { function g() {} }", [[10, 22], [25, 5]]); +test("function f() { function g() { function h() {} } }", [[10, 39], [25, 22], [40, 5]]); +test("function f() { if (true) function g() {} }", [[10, 32], [35, 5]]); +test("var o = { get p () {} }", [[16, 5]]); +test("var o = { set p (x) {} }", [[16, 6]]); diff --git a/js/src/jit-test/tests/debug/Script-sourceStart-03.js b/js/src/jit-test/tests/debug/Script-sourceStart-03.js new file mode 100644 index 0000000000..073c31f2db --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-sourceStart-03.js @@ -0,0 +1,35 @@ +/* + * For arrow functions, Script.prototype.sourceStart and + * Script.prototype.sourceLength should comprise the entire function expression + * (including arguments) + */ +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +function test(string, ranges) { + var index = 0; + dbg.onNewScript = function (script) { + function traverse(script) { + script.getChildScripts().forEach(function (script) { + assertEq(script.sourceStart, ranges[index][0]); + assertEq(script.sourceLength, ranges[index][1]); + ++index; + traverse(script); + }); + } + traverse(script); + }; + + g.eval(string); + + /* + * In some configurations certain child scripts are listed twice, so we + * cannot rely on index always having the exact same value + */ + assertEq(0 < index && index <= ranges.length, true); +}; + +test("() => {}", [[0, 8]]); +test("(x, y) => { x * y }", [[0, 19]]); +test("x => x * x", [[0, 10]]); +test("x => x => x * x", [[0, 15], [5, 10], [5, 10]]); diff --git a/js/src/jit-test/tests/debug/Script-sourceStart-04.js b/js/src/jit-test/tests/debug/Script-sourceStart-04.js new file mode 100644 index 0000000000..de03a2f582 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-sourceStart-04.js @@ -0,0 +1,25 @@ +/* + * For eval and Function constructors, Script.prototype.sourceStart and + * Script.prototype.sourceLength should comprise the entire script (excluding + * arguments in the case of Function constructors) + */ +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +var count = 0; +function test(string, range) { + dbg.onNewScript = function (script) { + ++count; + if (count % 2 == 0) { + assertEq(script.sourceStart, range[0]); + assertEq(script.sourceLength, range[1]); + } + } + + g.eval(string); +} + +test("eval('2 * 3')", [0, 5]); +test("new Function('2 * 3')", [0, 31]); +test("new Function('x', 'x * x')", [0, 32]); +assertEq(count, 6); diff --git a/js/src/jit-test/tests/debug/Script-startColumn.js b/js/src/jit-test/tests/debug/Script-startColumn.js new file mode 100644 index 0000000000..d61e9d0d29 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-startColumn.js @@ -0,0 +1,101 @@ +// Script.prototype.startColumn returns the correct column for all scripts. + +const g = newGlobal({newCompartment: true, useWindowProxy: true}); +const dbg = Debugger(g); +const gw = dbg.addDebuggee(g); + +function test(f, expected) { + const fw = gw.makeDebuggeeValue(f); + assertEq(fw.callable, true); + assertEq(fw.script.startColumn, expected); +} + +g.eval(` +function f1() { } +`); +test(g.f1, 12); + +g.eval(` +var f2 = function({ a, b, c }, d, e, ...more) { }; +`); +test(g.f2, 18); + +g.eval(` +var f3 = function *() { }; +`); +test(g.f3, 20); + +g.eval(` +var f4 = async function + () { }; +`); +test(g.f4, 3); + +g.eval(` +var f5 = (a, b) => a + b; +`); +test(g.f5, 10); + +g.eval(` +var f6 = a => a + 1; +`); +test(g.f6, 10); + +g.eval(` +var MyClass = class { + method() { } +}; +var myInstance = new MyClass(); +`); +test(g.myInstance.method, 11); +test(g.myInstance.constructor, 15); + +const g2 = newGlobal({newCompartment: true, useWindowProxy: true}); +const dbg2 = Debugger(g2); +const g2Wrapped = dbg2.addDebuggee(g2); +g2.evaluate(` +function f7() { } +`, { + forceFullParse: true, +}); +const f7w = g2Wrapped.makeDebuggeeValue(g2.f7); +assertEq(f7w.callable, true); +assertEq(f7w.script.startColumn, 12); + +g.eval(` +function f8() { + return function f8Inner() { } +} +`); +test(g.f8, 12); +test(g.f8(), 28); + +g.eval(` +var f9 = new Function(\"\"); +`); +test(g.f9, 1); + +let hit = 0; +let column; +dbg.onDebuggerStatement = function (frame) { + column = frame.script.startColumn; + hit += 1; +}; + +g.eval(` debugger;`); +assertEq(column, 1); +assertEq(hit, 1); + +const location = { fileName: "column.js", lineNumber: 1, columnNumber: 1 }; +hit = 0; +g.evaluate(` debugger;`, location); +assertEq(column, 1); +assertEq(hit, 1); + +g.evaluate(`var f10 = function () { };`, location); +test(g.f10, 20); + +g.evaluate(` +var f11 = function () { }; +`, location); +test(g.f11, 20); diff --git a/js/src/jit-test/tests/debug/Script-startLine.js b/js/src/jit-test/tests/debug/Script-startLine.js new file mode 100644 index 0000000000..baf27427e1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-startLine.js @@ -0,0 +1,63 @@ +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var start, count; +dbg.onDebuggerStatement = function (frame) { + assertEq(start, undefined); + start = frame.script.startLine; + count = frame.script.lineCount; + assertEq(typeof frame.script.url, 'string'); +}; + +function test(f, manualCount) { + start = count = g.first = g.last = undefined; + f(); + if (manualCount) + g.last = g.first + manualCount - 1; + assertEq(start, g.first); + assertEq(count, g.last + 1 - g.first); + print(start, count); +} + +test(function () { + g.eval("first = Error().lineNumber;\n" + + "debugger;\n" + + "last = Error().lineNumber;"); +}); + +test(function () { + g.evaluate("first = Error().lineNumber;\n" + + "debugger;\n" + + Array(17000).join("\n") + + "last = Error().lineNumber;"); +}); + +test(function () { + g.eval("function f1() { first = Error().lineNumber\n" + + " debugger;\n" + + " last = Error().lineNumber; }\n" + + "f1();"); +}); + +g.eval("function f2() {\n" + + " eval('first = Error().lineNumber\\n\\ndebugger;\\n\\nlast = Error().lineNumber;');\n" + + "}\n"); +test(g.f2); +test(g.f2); + +// Having a last = Error().lineNumber forces a setline srcnote, so test a +// function that ends with newline srcnotes. +g.eval("/* Any copyright is dedicated to the Public Domain.\n" + + " http://creativecommons.org/publicdomain/zero/1.0/ */\n" + + "\n" + + "function secondCall() { first = Error().lineNumber;\n" + + " debugger;\n" + + " // Comment\n" + + " eval(\"42;\");\n" + + " function foo() {}\n" + + " if (true) {\n" + + " foo();\n" + + // The "missing" newline here is a trick to make a newline + // source note come at the end. A real newline between the two + // closing braces causes a setline note instead. + " } }"); +test(g.secondCall, 8); diff --git a/js/src/jit-test/tests/debug/Script-url.js b/js/src/jit-test/tests/debug/Script-url.js new file mode 100644 index 0000000000..0bfe398963 --- /dev/null +++ b/js/src/jit-test/tests/debug/Script-url.js @@ -0,0 +1,10 @@ +// Script.prototype.url can be a string or null. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +for (var fileName of ['file:///var/foo.js', null]) { + g.evaluate("function f(x) { return 2*x; }", {fileName: fileName}); + var fw = gw.getOwnPropertyDescriptor('f').value; + assertEq(fw.script.url, fileName); +} diff --git a/js/src/jit-test/tests/debug/Source-displayURL-deprecated.js b/js/src/jit-test/tests/debug/Source-displayURL-deprecated.js new file mode 100644 index 0000000000..efa92eddd8 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-displayURL-deprecated.js @@ -0,0 +1,26 @@ +/* -*- js-indent-level: 4; indent-tabs-mode: nil -*- */ +// Source.prototype.displayURL can be a string or null. + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); + +function getDisplayURL() { + let fw = gw.makeDebuggeeValue(g.f); + return fw.script.source.displayURL; +} + +// Comment pragmas +g.evaluate('function f() {}\n' + + '//@ sourceURL=file:///var/quux.js'); +assertEq(getDisplayURL(), 'file:///var/quux.js'); + +g.evaluate('function f() {}\n' + + '/*//@ sourceURL=file:///var/quux.js*/'); +assertEq(getDisplayURL(), 'file:///var/quux.js'); + +g.evaluate('function f() {}\n' + + '/*\n' + + '//@ sourceURL=file:///var/quux.js\n' + + '*/'); +assertEq(getDisplayURL(), 'file:///var/quux.js'); diff --git a/js/src/jit-test/tests/debug/Source-displayURL-disable.js b/js/src/jit-test/tests/debug/Source-displayURL-disable.js new file mode 100644 index 0000000000..3ac2dd3fff --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-displayURL-disable.js @@ -0,0 +1,14 @@ +// |jit-test| --no-source-pragmas + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); +let source; +dbg.onDebuggerStatement = function (frame) { + source = frame.script.source; +}; + +g.eval(` + debugger; + //# sourceURL=file.js +`); +assertEq(source.displayURL, null); diff --git a/js/src/jit-test/tests/debug/Source-displayURL.js b/js/src/jit-test/tests/debug/Source-displayURL.js new file mode 100644 index 0000000000..c182631da0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-displayURL.js @@ -0,0 +1,91 @@ +/* -*- js-indent-level: 4; indent-tabs-mode: nil -*- */ +// Source.prototype.displayURL can be a string or null. + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); + +function getDisplayURL() { + let fw = gw.makeDebuggeeValue(g.f); + return fw.script.source.displayURL; +} + +// Without a source url +g.evaluate("function f(x) { return 2*x; }"); +assertEq(getDisplayURL(), null); + +// With a source url +g.evaluate("function f(x) { return 2*x; }", {displayURL: 'file:///var/foo.js'}); +assertEq(getDisplayURL(), 'file:///var/foo.js'); + +// Nested functions +let fired = false; +dbg.onDebuggerStatement = function (frame) { + fired = true; + assertEq(frame.script.source.displayURL, 'file:///var/bar.js'); +}; +g.evaluate('(function () { (function () { debugger; })(); })();', + {displayURL: 'file:///var/bar.js'}); +assertEq(fired, true); + +// Comment pragmas +g.evaluate('function f() {}\n' + + '//# sourceURL=file:///var/quux.js'); +assertEq(getDisplayURL(), 'file:///var/quux.js'); + +g.evaluate('function f() {}\n' + + '/*//# sourceURL=file:///var/quux.js*/'); +assertEq(getDisplayURL(), 'file:///var/quux.js'); + +g.evaluate('function f() {}\n' + + '/*\n' + + '//# sourceURL=file:///var/quux.js\n' + + '*/'); +assertEq(getDisplayURL(), 'file:///var/quux.js'); + +// Spaces are disallowed by the URL spec (they should have been +// percent-encoded). +g.evaluate('function f() {}\n' + + '//# sourceURL=http://example.com/has illegal spaces'); +assertEq(getDisplayURL(), 'http://example.com/has'); + +// When the URL is missing, we don't set the sourceMapURL and we don't skip the +// next line of input. +g.evaluate('function f() {}\n' + + '//# sourceURL=\n' + + 'function z() {}'); +assertEq(getDisplayURL(), null); +assertEq('z' in g, true); + +// The last comment pragma we see should be the one which sets the displayURL. +g.evaluate('function f() {}\n' + + '//# sourceURL=http://example.com/foo.js\n' + + '//# sourceURL=http://example.com/bar.js'); +assertEq(getDisplayURL(), 'http://example.com/bar.js'); + +// With both a comment and the evaluate option. +g.evaluate('function f() {}\n' + + '//# sourceURL=http://example.com/foo.js', + {displayURL: 'http://example.com/bar.js'}); +assertEq(getDisplayURL(), 'http://example.com/foo.js'); + + +// Bug 981987 reported that we hadn't set sourceURL yet when firing onNewScript +// from the Function constructor. +var capturedScript; +var capturedDisplayURL; +var capturedSourceMapURL; +dbg.onNewScript = function (script) { + capturedScript = script; + capturedDisplayURL = script.source.displayURL; + capturedSourceMapURL = script.source.sourceMapURL; + dbg.onNewScript = undefined; +}; +var fun = gw.makeDebuggeeValue(g.Function('//# sourceURL=munge.js\n//# sourceMappingURL=grunge.map\n')); +assertEq(capturedScript, fun.script); + +assertEq(capturedDisplayURL, fun.script.source.displayURL); +assertEq(capturedDisplayURL, 'munge.js'); + +assertEq(capturedSourceMapURL, fun.script.source.sourceMapURL); +assertEq(capturedSourceMapURL, 'grunge.map'); diff --git a/js/src/jit-test/tests/debug/Source-element-01.js b/js/src/jit-test/tests/debug/Source-element-01.js new file mode 100644 index 0000000000..38c92280b4 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-element-01.js @@ -0,0 +1,6 @@ +// Specifying an owning element in a cross-global evaluation shouldn't crash. +// That is, when 'evaluate' switches compartments, it should properly wrap +// the CompileOptions members that will become cross-compartment +// references. + +evaluate('42 + 1729', { global: newGlobal(), element: {} }); diff --git a/js/src/jit-test/tests/debug/Source-elementAttributeName.js b/js/src/jit-test/tests/debug/Source-elementAttributeName.js new file mode 100644 index 0000000000..5e14a6857e --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-elementAttributeName.js @@ -0,0 +1,11 @@ +// Source.prototype.elementAttributeName can be a string or undefined. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +g.evaluate("function f(x) { return 2*x; }", {elementAttributeName: "src"}); +var fw = gw.getOwnPropertyDescriptor('f').value; +assertEq(fw.script.source.elementAttributeName, "src"); +g.evaluate("function f(x) { return 2*x; }"); +var fw = gw.getOwnPropertyDescriptor('f').value; +assertEq(fw.script.source.elementAttributeName, undefined); diff --git a/js/src/jit-test/tests/debug/Source-introductionScript-01.js b/js/src/jit-test/tests/debug/Source-introductionScript-01.js new file mode 100644 index 0000000000..29dfeb0c83 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-introductionScript-01.js @@ -0,0 +1,118 @@ +// Dynamically generated sources should have their introduction script and +// offset set correctly. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gDO = dbg.addDebuggee(g); +var log; + +// Direct eval, while the frame is live. +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + var source = frame.script.source; + var introducer = frame.older; + assertEq(source.introductionScript, introducer.script); + assertEq(source.introductionOffset, introducer.offset); +}; +log = ''; +g.eval('\n\neval("\\n\\ndebugger;");'); +assertEq(log, 'd'); + +// Direct eval, after the frame has been popped. +var introducer, introduced; +dbg.onDebuggerStatement = function (frame) { + log += 'de1'; + introducer = frame.script; + dbg.onDebuggerStatement = function (frame) { + log += 'de2'; + introduced = frame.script.source; + }; +}; +log = ''; +g.evaluate('debugger; eval("\\n\\ndebugger;");', { lineNumber: 1812 }); +assertEq(log, 'de1de2'); +assertEq(introduced.introductionScript, introducer); +assertEq(introducer.getOffsetLocation(introduced.introductionOffset).lineNumber, 1812); + +// Indirect eval, while the frame is live. +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + var source = frame.script.source; + var introducer = frame.older; + assertEq(source.introductionScript, introducer.script); + assertEq(source.introductionOffset, introducer.offset); +}; +log = ''; +g.eval('\n\n(0,eval)("\\n\\ndebugger;");'); +assertEq(log, 'd'); + +// Indirect eval, after the frame has been popped. +var introducer, introduced; +dbg.onDebuggerStatement = function (frame) { + log += 'de1'; + introducer = frame.script; + dbg.onDebuggerStatement = function (frame) { + log += 'de2'; + introduced = frame.script.source; + }; +}; +log = ''; +g.evaluate('debugger; (0,eval)("\\n\\ndebugger;");', { lineNumber: 1066 }); +assertEq(log, 'de1de2'); +assertEq(introduced.introductionScript, introducer); +assertEq(introducer.getOffsetLocation(introduced.introductionOffset).lineNumber, 1066); + +// Function constructor. +dbg.onDebuggerStatement = function (frame) { + log += 'o'; + var outerScript = frame.script; + var outerOffset = frame.offset; + dbg.onDebuggerStatement = function (frame) { + log += 'i'; + var source = frame.script.source; + assertEq(source.introductionScript, outerScript); + assertEq(outerScript.getOffsetLocation(source.introductionOffset).lineNumber, + outerScript.getOffsetLocation(outerOffset).lineNumber); + }; +}; +log = ''; +g.eval('\n\n\ndebugger; Function("debugger;")()'); +assertEq(log, 'oi'); + +// Function constructor, after the the introduction call's frame has been +// popped. +var introducer; +dbg.onDebuggerStatement = function (frame) { + log += 'F2'; + introducer = frame.script; +}; +log = ''; +var fDO = gDO.executeInGlobal('debugger; Function("origami;")', { lineNumber: 1685 }).return; +var source = fDO.script.source; +assertEq(log, 'F2'); +assertEq(source.introductionScript, introducer); +assertEq(introducer.getOffsetLocation(source.introductionOffset).lineNumber, 1685); + +// If the introduction script is in a different global from the script it +// introduced, we don't record it. +dbg.onDebuggerStatement = function (frame) { + log += 'x'; + var source = frame.script.source; + assertEq(source.introductionScript, undefined); + assertEq(source.introductionOffset, undefined); +}; +log = ''; +g.eval('debugger;'); // introduction script is this top-level script +assertEq(log, 'x'); + +// If the code is introduced by a function that doesn't provide +// introduction information, that shouldn't be a problem. +dbg.onDebuggerStatement = function (frame) { + log += 'x'; + var source = frame.script.source; + assertEq(source.introductionScript, undefined); + assertEq(source.introductionOffset, undefined); +}; +log = ''; +g.eval('evaluate("debugger;", { lineNumber: 1729 });'); +assertEq(log, 'x'); diff --git a/js/src/jit-test/tests/debug/Source-introductionScript-02.js b/js/src/jit-test/tests/debug/Source-introductionScript-02.js new file mode 100644 index 0000000000..45b0f61cb7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-introductionScript-02.js @@ -0,0 +1,44 @@ +// Calls to 'eval', etc. by JS primitives get attributed to the point of +// the primitive's call. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gDO = dbg.addDebuggee(g); +var log = ''; + +function outerHandler(frame) { + log += 'o'; + var outerScript = frame.script; + + dbg.onDebuggerStatement = function (frame) { + log += 'i'; + var source = frame.script.source; + var introScript = source.introductionScript; + assertEq(introScript, outerScript); + assertEq(introScript.getOffsetLocation(source.introductionOffset).lineNumber, 1234); + }; +}; + +log = ''; +dbg.onDebuggerStatement = outerHandler; +g.evaluate('debugger; ["debugger;"].map(eval)', { lineNumber: 1234 }); +assertEq(log, 'oi'); + +log = ''; +dbg.onDebuggerStatement = outerHandler; +g.evaluate('debugger; "debugger;".replace(/.*/, eval);', + { lineNumber: 1234 }); +assertEq(log, 'oi'); + + +// If the call takes place in another global, however, we don't record the +// introduction script. +log = ''; +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.introductionScript, undefined); + assertEq(frame.script.source.introductionOffset, undefined); +}; +["debugger;"].map(g.eval); +"debugger;".replace(/.*/, g.eval); +assertEq(log, 'dd'); diff --git a/js/src/jit-test/tests/debug/Source-introductionScript-03.js b/js/src/jit-test/tests/debug/Source-introductionScript-03.js new file mode 100644 index 0000000000..7488309df1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-introductionScript-03.js @@ -0,0 +1,32 @@ +// We don't record introduction scripts in a different global from the +// introduced script, even if they're both debuggees. + +var dbg = new Debugger; + +var g1 = newGlobal({newCompartment: true}); +g1.g1 = g1; +var g1DO = dbg.addDebuggee(g1); + +var g2 = newGlobal({newCompartment: true}); +g2.g1 = g1; + +var log = ''; +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.introductionScript, undefined); + assertEq(frame.script.source.introductionOffset, undefined); +}; + +g2.eval('g1.eval("debugger;");'); +assertEq(log, 'd'); + +// Just for sanity: when it's not cross-global, we do note the introducer. +log = ''; +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.introductionScript instanceof Debugger.Script, true); + assertEq(typeof frame.script.source.introductionOffset, "number"); +}; +// Exactly as above, but with g1 instead of g2. +g1.eval('g1.eval("debugger;");'); +assertEq(log, 'd'); diff --git a/js/src/jit-test/tests/debug/Source-introductionType-data b/js/src/jit-test/tests/debug/Source-introductionType-data new file mode 100644 index 0000000000..eab7469213 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-introductionType-data @@ -0,0 +1 @@ +debugger; diff --git a/js/src/jit-test/tests/debug/Source-introductionType.js b/js/src/jit-test/tests/debug/Source-introductionType.js new file mode 100644 index 0000000000..f06baa04c3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-introductionType.js @@ -0,0 +1,121 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// Check that scripts' introduction types are properly marked. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gDO = dbg.addDebuggee(g); +var log; + +// (Indirect) eval. +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.introductionType, 'eval'); +}; +log = ''; +g.eval('debugger;'); +assertEq(log, 'd'); + +// Function constructor. +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.introductionType, 'Function'); +}; +log = ''; +g.Function('debugger;')(); +assertEq(log, 'd'); + +// GeneratorFunction constructor. +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.introductionType, 'GeneratorFunction'); +}; +log = ''; +g.eval('(function*() {})').constructor('debugger;')().next(); +assertEq(log, 'd'); + +// Shell 'evaluate' function +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.introductionType, "js shell evaluate"); +}; +log = ''; +g.evaluate('debugger;'); +assertEq(log, 'd'); + +// Shell 'load' function +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.introductionType, "js shell load"); +}; +log = ''; +g.load(scriptdir + 'Source-introductionType-data'); +assertEq(log, 'd'); + +// Shell 'run' function +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.introductionType, "js shell run"); +}; +log = ''; +g.run(scriptdir + 'Source-introductionType-data'); +assertEq(log, 'd'); + +// Shell 'offThreadCompileToStencil' function. +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.introductionType, + "js shell offThreadCompileToStencil"); +}; +log = ''; +g.offThreadCompileToStencil('debugger;'); +var stencil = g.finishOffThreadStencil(); +g.evalStencil(stencil); +assertEq(log, 'd'); + +// Debugger.Frame.prototype.eval +dbg.onDebuggerStatement = function (frame) { + log += 'o'; + dbg.onDebuggerStatement = innerHandler; + frame.eval('debugger'); + function innerHandler(frame) { + log += 'i'; + assertEq(frame.script.source.introductionType, "debugger eval"); + } +}; +log = ''; +g.eval('debugger;'); +assertEq(log, 'oi'); + +// Debugger.Frame.prototype.evalWithBindings +dbg.onDebuggerStatement = function (frame) { + log += 'o'; + dbg.onDebuggerStatement = innerHandler; + frame.evalWithBindings('debugger', { x: 42 }); + function innerHandler(frame) { + log += 'i'; + assertEq(frame.script.source.introductionType, "debugger eval"); + } +}; +log = ''; +g.eval('debugger;'); +assertEq(log, 'oi'); + +// Debugger.Object.executeInGlobal +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.introductionType, "debugger eval"); +}; +log = ''; +gDO.executeInGlobal('debugger;'); +assertEq(log, 'd'); + +// Debugger.Object.executeInGlobalWithBindings +dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.introductionType, "debugger eval"); +}; +log = ''; +gDO.executeInGlobalWithBindings('debugger;', { x: 42 }); +assertEq(log, 'd'); + diff --git a/js/src/jit-test/tests/debug/Source-invisible.js b/js/src/jit-test/tests/debug/Source-invisible.js new file mode 100644 index 0000000000..5c84fa880b --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-invisible.js @@ -0,0 +1,10 @@ +// Looking at ScriptSourceObjects in invisible-to-debugger compartments is okay. + +var gi = newGlobal({ newCompartment: true, invisibleToDebugger: true }); + +var gv = newGlobal({newCompartment: true}); +gi.evaluate('function f() {}', {global: gv}); + +var dbg = new Debugger; +var gvw = dbg.addDebuggee(gv); +gvw.getOwnPropertyDescriptor('f').value.script.source; diff --git a/js/src/jit-test/tests/debug/Source-reparse.js b/js/src/jit-test/tests/debug/Source-reparse.js new file mode 100644 index 0000000000..53700abe05 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-reparse.js @@ -0,0 +1,50 @@ +// reparsing a source should produce equivalent scripts and avoid invoking the +// onNewScript hook. + +const g = newGlobal({newCompartment: true}); +const dbg = new Debugger; +dbg.addDebuggee(g); + +let globalScript; +dbg.onNewScript = script => { globalScript = script }; + +// Leave `g()` on the first line so we can check that `columnNumber` is passed to the +// reparsed script (`columnNumber` is only used to offset breakpoint column on the first +// line of the script). +g.evaluate(`g(); +function f() { + for (var i = 0; i < 10; i++) { + g(); + } +} + +function g() { + return 3; +} + +f(); +`, { + fileName: "foobar.js", + lineNumber: 3, + columnNumber: 42, +}); + +let onNewScriptCalls = 0; +dbg.onNewScript = script => { onNewScriptCalls++; }; + +const reparsedScript = globalScript.source.reparse(); + +assertEq(onNewScriptCalls, 0); + +assertEq(reparsedScript.url, "foobar.js"); +assertEq(reparsedScript.startLine, 3); +assertEq(reparsedScript.startColumn, 42); + +// Test for the same breakpoint positions in the original and reparsed script. +function getBreakpointPositions(script) { + const offsets = script.getPossibleBreakpoints(); + const str = offsets.map(({ lineNumber, columnNumber }) => `${lineNumber}:${columnNumber}`).toString(); + const childPositions = script.getChildScripts().map(getBreakpointPositions); + return str + childPositions.toString(); +} +assertEq(getBreakpointPositions(globalScript), getBreakpointPositions(reparsedScript)); diff --git a/js/src/jit-test/tests/debug/Source-sourceMapURL-deprecated.js b/js/src/jit-test/tests/debug/Source-sourceMapURL-deprecated.js new file mode 100644 index 0000000000..f25f652a04 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-sourceMapURL-deprecated.js @@ -0,0 +1,82 @@ +// Source.prototype.sourceMapURL can be a string or null. + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); + +function getSourceMapURL() { + let fw = gw.makeDebuggeeValue(g.f); + return fw.script.source.sourceMapURL; +} + +function setSourceMapURL(url) { + let fw = gw.makeDebuggeeValue(g.f); + fw.script.source.sourceMapURL = url; +} + +// Without a source map +g.evaluate("function f(x) { return 2*x; }"); +assertEq(getSourceMapURL(), null); + +// With a source map +g.evaluate("function f(x) { return 2*x; }", {sourceMapURL: 'file:///var/foo.js.map'}); +assertEq(getSourceMapURL(), 'file:///var/foo.js.map'); + +// Nested functions +let fired = false; +dbg.onDebuggerStatement = function (frame) { + fired = true; + assertEq(frame.script.source.sourceMapURL, 'file:///var/bar.js.map'); +}; +g.evaluate('(function () { (function () { debugger; })(); })();', + {sourceMapURL: 'file:///var/bar.js.map'}); +assertEq(fired, true); + +// Comment pragmas +g.evaluate('function f() {}\n' + + '//@ sourceMappingURL=file:///var/quux.js.map'); +assertEq(getSourceMapURL(), 'file:///var/quux.js.map'); + +g.evaluate('function f() {}\n' + + '/*//@ sourceMappingURL=file:///var/quux.js.map*/'); +assertEq(getSourceMapURL(), 'file:///var/quux.js.map'); + +g.evaluate('function f() {}\n' + + '/*\n' + + '//@ sourceMappingURL=file:///var/quux.js.map\n' + + '*/'); +assertEq(getSourceMapURL(), 'file:///var/quux.js.map'); + +// Spaces are disallowed by the URL spec (they should have been +// percent-encoded). +g.evaluate('function f() {}\n' + + '//@ sourceMappingURL=http://example.com/has illegal spaces.map'); +assertEq(getSourceMapURL(), 'http://example.com/has'); + +// When the URL is missing, we don't set the sourceMapURL and we don't skip the +// next line of input. +g.evaluate('function f() {}\n' + + '//@ sourceMappingURL=\n' + + 'function z() {}'); +assertEq(getSourceMapURL(), null); +assertEq('z' in g, true); + +// The last comment pragma we see should be the one which sets the source map's +// URL. +g.evaluate('function f() {}\n' + + '//@ sourceMappingURL=http://example.com/foo.js.map\n' + + '//@ sourceMappingURL=http://example.com/bar.js.map'); +assertEq(getSourceMapURL(), 'http://example.com/bar.js.map'); + +// With both a comment and the evaluate option. +g.evaluate('function f() {}\n' + + '//@ sourceMappingURL=http://example.com/foo.js.map', + {sourceMapURL: 'http://example.com/bar.js.map'}); +assertEq(getSourceMapURL(), 'http://example.com/foo.js.map'); + +// Make sure setting the sourceMapURL manually works +setSourceMapURL('baz.js.map'); +assertEq(getSourceMapURL(), 'baz.js.map'); + +setSourceMapURL(''); +assertEq(getSourceMapURL(), 'baz.js.map'); diff --git a/js/src/jit-test/tests/debug/Source-sourceMapURL-disable.js b/js/src/jit-test/tests/debug/Source-sourceMapURL-disable.js new file mode 100644 index 0000000000..0e103d7df3 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-sourceMapURL-disable.js @@ -0,0 +1,14 @@ +// |jit-test| --no-source-pragmas + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); +let source; +dbg.onDebuggerStatement = function (frame) { + source = frame.script.source; +}; + +g.eval(` + debugger; + //# sourceMappingURL=file.js +`); +assertEq(source.sourceMapURL, null); diff --git a/js/src/jit-test/tests/debug/Source-sourceMapURL.js b/js/src/jit-test/tests/debug/Source-sourceMapURL.js new file mode 100644 index 0000000000..449b44cebd --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-sourceMapURL.js @@ -0,0 +1,82 @@ +// Source.prototype.sourceMapURL can be a string or null. + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); + +function getSourceMapURL() { + let fw = gw.makeDebuggeeValue(g.f); + return fw.script.source.sourceMapURL; +} + +function setSourceMapURL(url) { + let fw = gw.makeDebuggeeValue(g.f); + fw.script.source.sourceMapURL = url; +} + +// Without a source map +g.evaluate("function f(x) { return 2*x; }"); +assertEq(getSourceMapURL(), null); + +// With a source map +g.evaluate("function f(x) { return 2*x; }", {sourceMapURL: 'file:///var/foo.js.map'}); +assertEq(getSourceMapURL(), 'file:///var/foo.js.map'); + +// Nested functions +let fired = false; +dbg.onDebuggerStatement = function (frame) { + fired = true; + assertEq(frame.script.source.sourceMapURL, 'file:///var/bar.js.map'); +}; +g.evaluate('(function () { (function () { debugger; })(); })();', + {sourceMapURL: 'file:///var/bar.js.map'}); +assertEq(fired, true); + +// Comment pragmas +g.evaluate('function f() {}\n' + + '//# sourceMappingURL=file:///var/quux.js.map'); +assertEq(getSourceMapURL(), 'file:///var/quux.js.map'); + +g.evaluate('function f() {}\n' + + '/*//# sourceMappingURL=file:///var/quux.js.map*/'); +assertEq(getSourceMapURL(), 'file:///var/quux.js.map'); + +g.evaluate('function f() {}\n' + + '/*\n' + + '//# sourceMappingURL=file:///var/quux.js.map\n' + + '*/'); +assertEq(getSourceMapURL(), 'file:///var/quux.js.map'); + +// Spaces are disallowed by the URL spec (they should have been +// percent-encoded). +g.evaluate('function f() {}\n' + + '//# sourceMappingURL=http://example.com/has illegal spaces.map'); +assertEq(getSourceMapURL(), 'http://example.com/has'); + +// When the URL is missing, we don't set the sourceMapURL and we don't skip the +// next line of input. +g.evaluate('function f() {}\n' + + '//# sourceMappingURL=\n' + + 'function z() {}'); +assertEq(getSourceMapURL(), null); +assertEq('z' in g, true); + +// The last comment pragma we see should be the one which sets the source map's +// URL. +g.evaluate('function f() {}\n' + + '//# sourceMappingURL=http://example.com/foo.js.map\n' + + '//# sourceMappingURL=http://example.com/bar.js.map'); +assertEq(getSourceMapURL(), 'http://example.com/bar.js.map'); + +// With both a comment and the evaluate option. +g.evaluate('function f() {}\n' + + '//# sourceMappingURL=http://example.com/foo.js.map', + {sourceMapURL: 'http://example.com/bar.js.map'}); +assertEq(getSourceMapURL(), 'http://example.com/foo.js.map'); + +// Make sure setting the sourceMapURL manually works +setSourceMapURL('baz.js.map'); +assertEq(getSourceMapURL(), 'baz.js.map'); + +setSourceMapURL(''); +assertEq(getSourceMapURL(), 'baz.js.map'); diff --git a/js/src/jit-test/tests/debug/Source-startLine-startColumn.js b/js/src/jit-test/tests/debug/Source-startLine-startColumn.js new file mode 100644 index 0000000000..50ca279424 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-startLine-startColumn.js @@ -0,0 +1,13 @@ +// Source.prototype.startLine reflects the start line and start column supplied when parsing. + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +g.evaluate("function f(x) {}"); +var fw = gw.getOwnPropertyDescriptor("f").value; +assertEq(fw.script.source.startLine, 1); +assertEq(fw.script.source.startColumn, 1); +g.evaluate("function g(x) {}", { lineNumber: 10, columnNumber: 5 }); +var gw = gw.getOwnPropertyDescriptor("g").value; +assertEq(gw.script.source.startLine, 10); +assertEq(gw.script.source.startColumn, 5); diff --git a/js/src/jit-test/tests/debug/Source-surfaces.js b/js/src/jit-test/tests/debug/Source-surfaces.js new file mode 100644 index 0000000000..f2b3e81d9d --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-surfaces.js @@ -0,0 +1,33 @@ +// Debugger.Source.prototype + +load(libdir + 'asserts.js'); + +assertThrowsInstanceOf(function () { + Debugger.Source.prototype.text.call(42) +}, TypeError); +assertThrowsInstanceOf(function () { + Debugger.Source.prototype.text.call({}) +}, TypeError); +assertThrowsInstanceOf(function () { + Debugger.Source.prototype.text.call(Debugger.Source.prototype) +}, TypeError); + +assertThrowsInstanceOf(function () { + Debugger.Source.prototype.element.call(42) +}, TypeError); +assertThrowsInstanceOf(function () { + Debugger.Source.prototype.element.call({}) +}, TypeError); +assertThrowsInstanceOf(function () { + Debugger.Source.prototype.element.call(Debugger.Source.prototype) +}, TypeError); + +assertThrowsInstanceOf(function () { + Debugger.Source.prototype.elementAttributeName.call(42) +}, TypeError); +assertThrowsInstanceOf(function () { + Debugger.Source.prototype.elementAttributeName.call({}) +}, TypeError); +assertThrowsInstanceOf(function () { + Debugger.Source.prototype.elementAttributeName.call(Debugger.Source.prototype) +}, TypeError); diff --git a/js/src/jit-test/tests/debug/Source-text-01.js b/js/src/jit-test/tests/debug/Source-text-01.js new file mode 100644 index 0000000000..799ccf36e0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-text-01.js @@ -0,0 +1,26 @@ +/* + * Debugger.Source.prototype.text should return a string. Moreover, it + * should be the same string for each child script sharing that + * Debugger.Source. + */ +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +var count = 0; +dbg.onNewScript = function (script) { + var text = script.source.text; + assertEq(typeof text, "string"); + function traverse(script) { + ++count; + script.getChildScripts().forEach(function (script) { + assertEq(script.source.text, text); + traverse(script); + }); + }; + traverse(script); +} + +g.eval("2 * 3"); +g.eval("function f() {}"); +g.eval("function f() { function g() {} }"); +assertEq(count, 6); diff --git a/js/src/jit-test/tests/debug/Source-text-02.js b/js/src/jit-test/tests/debug/Source-text-02.js new file mode 100644 index 0000000000..0216395ed7 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-text-02.js @@ -0,0 +1,30 @@ +// Nested compilation units (say, an eval with in an eval) should have the +// correct sources attributed to them. +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +var text; +var count = 0; +dbg.onNewScript = function (script) { + ++count; + if (count % 2 == 0) + assertEq(script.source.text, text); +} + +g.eval("eval('" + (text = "") + "')"); +g.eval("eval('" + (text = "2 * 3") + "')"); + +// `new Function(${string})` generates source wrapped with `function anonymous(args) {${string}}` +text = "function anonymous(\n) {\n\n}"; +g.eval("new Function('')"); + +text = "function anonymous(a,b\n) {\nc\n}"; +g.eval("new Function('a', 'b', 'c')"); + +text = "function anonymous(d\n,e\n) {\nf\n}"; +g.eval("new Function('d\\n', 'e', 'f')"); + +evaluate("", { global: g }); +text = "2 * 3"; +evaluate("2 * 3", { global: g }); +assertEq(count, 12); diff --git a/js/src/jit-test/tests/debug/Source-text-lazy.js b/js/src/jit-test/tests/debug/Source-text-lazy.js new file mode 100644 index 0000000000..b6bf3e2423 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-text-lazy.js @@ -0,0 +1,38 @@ +// |jit-test| skip-if: typeof withSourceHook !== 'function' +// withSourceHook isn't defined if you pass the shell the --fuzzing-safe +// option. Skip this test silently, to avoid spurious failures. + +/* + * Debugger.Source.prototype.text should correctly retrieve the source for + * code compiled with CompileOptions::LAZY_SOURCE. + */ + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +function test(source) { + // To ensure that we're getting the value the source hook returns, make + // it differ from the actual source. + let frobbed = source.replace(/debugger/, 'reggubed'); + let log = ''; + + withSourceHook(function (url) { + log += 's'; + assertEq(url, "BanalBivalve.jsm"); + return frobbed; + }, () => { + dbg.onDebuggerStatement = function (frame) { + log += 'd'; + assertEq(frame.script.source.text, frobbed); + } + + g.evaluate(source, { fileName: "BanalBivalve.jsm", + sourceIsLazy: true }); + }); + + assertEq(log, 'ds'); +} + +test("debugger; // Ignominious Iguana"); +test("(function () { debugger; /* Meretricious Marmoset */})();"); +test("(() => { debugger; })(); // Gaunt Gibbon"); diff --git a/js/src/jit-test/tests/debug/Source-url-01.js b/js/src/jit-test/tests/debug/Source-url-01.js new file mode 100644 index 0000000000..4a020aa756 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-url-01.js @@ -0,0 +1,10 @@ +// Source.prototype.url returns a synthesized URL for eval code. + +var g = newGlobal({newCompartment: true}); +g.eval('function double() { return 2*x }'); + +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +var fw = gw.getOwnPropertyDescriptor('double').value; +assertEq(!!fw.script.source.url.match(/Source-url-01.js line [0-9]+ > eval/), true); diff --git a/js/src/jit-test/tests/debug/Source-url-02.js b/js/src/jit-test/tests/debug/Source-url-02.js new file mode 100644 index 0000000000..9d20155b59 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-url-02.js @@ -0,0 +1,11 @@ +// Source.prototype.url returns a synthesized URL for Function code. + +var g = newGlobal({newCompartment: true}); +g.eval('var double = Function("x", "return 2*x;");'); + +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +var fw = gw.getOwnPropertyDescriptor('double').value; +print(fw.script.source.url); +assertEq(!!fw.script.source.url.match(/Source-url-02.js .* > Function/), true); diff --git a/js/src/jit-test/tests/debug/Source-url.js b/js/src/jit-test/tests/debug/Source-url.js new file mode 100644 index 0000000000..b37f609cf6 --- /dev/null +++ b/js/src/jit-test/tests/debug/Source-url.js @@ -0,0 +1,10 @@ +// Source.prototype.url can be a string or null. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +for (var fileName of ['file:///var/foo.js', null]) { + g.evaluate("function f(x) { return 2*x; }", {fileName: fileName}); + var fw = gw.getOwnPropertyDescriptor('f').value; + assertEq(fw.script.source.url, fileName); +} diff --git a/js/src/jit-test/tests/debug/async-stack.js b/js/src/jit-test/tests/debug/async-stack.js new file mode 100644 index 0000000000..015fc54c78 --- /dev/null +++ b/js/src/jit-test/tests/debug/async-stack.js @@ -0,0 +1,35 @@ +// |jit-test| --async-stacks-capture-debuggee-only + +const g = newGlobal({newCompartment: true}); + +const code = ` +var stack = ""; + +async function Async() { + await 1; + stack = new Error().stack; +} + +function Sync() { + Async(); +} + +Sync(); +`; + +g.eval(code); +drainJobQueue(); +assertEq(g.stack.includes("Sync"), false); + +let dbg = new Debugger(); +dbg.enableAsyncStack(g); + +g.eval(code); +drainJobQueue(); +assertEq(g.stack.includes("Sync"), true); + +dbg.disableAsyncStack(g); + +g.eval(code); +drainJobQueue(); +assertEq(g.stack.includes("Sync"), false); diff --git a/js/src/jit-test/tests/debug/breakpoint-01.js b/js/src/jit-test/tests/debug/breakpoint-01.js new file mode 100644 index 0000000000..3adde6b977 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-01.js @@ -0,0 +1,22 @@ +// Basic breakpoint test. + +var g = newGlobal({newCompartment: true}); +g.s = ''; +var handler = { + hit: function (frame) { + assertEq(this, handler); + g.s += '1'; + } +}; +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + g.s += '0'; + var line0 = frame.script.getOffsetLocation(frame.offset).lineNumber; + var offs = frame.script.getLineOffsets(line0 + 2); + for (var i = 0; i < offs.length; i++) + frame.script.setBreakpoint(offs[i], handler); +}; +g.eval("debugger;\n" + + "s += 'a';\n" + // line0 + 1 + "s += 'b';\n"); // line0 + 2 +assertEq(g.s, "0a1b"); diff --git a/js/src/jit-test/tests/debug/breakpoint-02.js b/js/src/jit-test/tests/debug/breakpoint-02.js new file mode 100644 index 0000000000..45dd420515 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-02.js @@ -0,0 +1,15 @@ +// Setting a breakpoint in a non-debuggee Script is an error. + +load(libdir + "asserts.js"); + +var g1 = newGlobal({newCompartment: true}); +var g2 = g1.eval("newGlobal('same-compartment')"); +g2.eval("function f() { return 2; }"); +g1.f = g2.f; + +var dbg = Debugger(g1); +var s; +dbg.onDebuggerStatement = function (frame) { s = frame.eval("f").return.script; }; +g1.eval("debugger;"); + +assertThrowsInstanceOf(function () { s.setBreakpoint(0, {}); }, Error); diff --git a/js/src/jit-test/tests/debug/breakpoint-03.js b/js/src/jit-test/tests/debug/breakpoint-03.js new file mode 100644 index 0000000000..ce582cb214 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-03.js @@ -0,0 +1,16 @@ +// Setting a breakpoint in a script we are no longer debugging is an error. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(); +var gobj = dbg.addDebuggee(g); +g.eval("function f() { return 2; }"); + +var s; +dbg.onDebuggerStatement = function (frame) { s = frame.eval("f").return.script; }; +g.eval("debugger;"); +s.setBreakpoint(0, {}); // ok + +dbg.removeDebuggee(gobj); +assertThrowsInstanceOf(function () { s.setBreakpoint(0, {}); }, Error); diff --git a/js/src/jit-test/tests/debug/breakpoint-04.js b/js/src/jit-test/tests/debug/breakpoint-04.js new file mode 100644 index 0000000000..f5c0c957b3 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-04.js @@ -0,0 +1,30 @@ +// Hitting a breakpoint with no hit method does nothing. + +var g = newGlobal({newCompartment: true}); +g.s = ''; +g.eval("var line0 = Error().lineNumber;\n" + + "function f() {\n" + // line0 + 1 + " debugger;\n" + // line0 + 2 + " s += 'x';\n" + // line0 + 3 + "}\n") +var dbg = Debugger(g); +var bp = []; +dbg.onDebuggerStatement = function (frame) { + g.s += 'D'; + var arr = frame.script.getLineOffsets(g.line0 + 3); + for (var i = 0; i < arr.length; i++) { + var obj = {}; + bp[i] = obj; + frame.script.setBreakpoint(arr[i], obj); + } +}; + +g.f(); +assertEq(g.s, "Dx"); + +dbg.onDebuggerStatement = undefined; + +for (var i = 0; i < bp.length; i++) + bp[i].hit = function () { g.s += 'B'; }; +g.f(); +assertEq(g.s, "DxBx"); diff --git a/js/src/jit-test/tests/debug/breakpoint-05.js b/js/src/jit-test/tests/debug/breakpoint-05.js new file mode 100644 index 0000000000..61ae53eb4e --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-05.js @@ -0,0 +1,19 @@ +// If the offset parameter to setBreakpoint is invalid, throw an error. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame) { + // We assume at least one offset between 0 and frame.offset is invalid. + assertThrowsInstanceOf( + function () { + for (var i = 0; i < frame.offset; i++) + frame.script.setBreakpoint(i, {}); + }, + Error); + hits++; +}; +g.eval("x = 256; debugger;"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/breakpoint-06.js b/js/src/jit-test/tests/debug/breakpoint-06.js new file mode 100644 index 0000000000..897220d40a --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-06.js @@ -0,0 +1,20 @@ +// The argument to a breakpoint hit method is a frame. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onDebuggerStatement = function (frame1) { + function hit(frame2) { + assertEq(frame2, frame1); + hits++; + } + var s = frame1.script; + var offs = s.getLineOffsets(g.line0 + 2); + for (var i = 0; i < offs.length; i++) + s.setBreakpoint(offs[i], {hit: hit}); +}; +g.eval("var line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "x = 1;\n"); // line0 + 2 +assertEq(hits, 1); +assertEq(g.x, 1); diff --git a/js/src/jit-test/tests/debug/breakpoint-07.js b/js/src/jit-test/tests/debug/breakpoint-07.js new file mode 100644 index 0000000000..01ff27a339 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-07.js @@ -0,0 +1,30 @@ +// Code runs fine if do-nothing breakpoints are set on every line. + +var g = newGlobal({newCompartment: true}); +var src = ("var line0 = Error().lineNumber;\n" + + "function gcd(a, b) {\n" + // line0 + 1 + " if (a > b)\n" + // line0 + 2 + " return gcd(b, a);\n" + // line0 + 3 + " var c = b % a;\n" + // line0 + 4 + " if (c === 0)\n" + // line0 + 5 + " return a;\n" + // line0 + 6 + " return gcd(c, a);\n" + // line0 + 7 + "}\n"); // line0 + 8 +g.eval(src); + +var dbg = Debugger(g); +var hits = 0 ; +dbg.onDebuggerStatement = function (frame) { + var s = frame.eval("gcd").return.script; + var offs; + for (var lineno = g.line0 + 2; (offs = s.getLineOffsets(lineno)).length > 0; lineno++) { + for (var i = 0; i < offs.length; i++) + s.setBreakpoint(offs[i], {hit: function (f) { hits++; }}); + } + assertEq(lineno > g.line0 + 7, true); + assertEq(lineno <= g.line0 + 9, true); +}; + +g.eval("debugger;"); +assertEq(g.gcd(31 * 7 * 5 * 3 * 2, 11 * 3 * 3 * 2), 6); +assertEq(hits >= 18, true); diff --git a/js/src/jit-test/tests/debug/breakpoint-08.js b/js/src/jit-test/tests/debug/breakpoint-08.js new file mode 100644 index 0000000000..ae0e905503 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-08.js @@ -0,0 +1,31 @@ +// Breakpoints are dropped from eval scripts when they finish executing. +// (The eval cache doesn't cache breakpoints.) + +var g = newGlobal({newCompartment: true}); + +g.line0 = undefined; +g.eval("function f() {\n" + + " return eval(s);\n" + + "}\n"); +g.s = ("line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "result = 'ok';\n"); // line0 + 2 + +var dbg = Debugger(g); +var hits = 0, bphits = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.type, 'eval'); + assertEq(frame.script.getBreakpoints().length, 0); + var h = {hit: function (frame) { bphits++; }}; + var offs = frame.script.getLineOffsets(g.line0 + 2); + for (var i = 0; i < offs.length; i++) + frame.script.setBreakpoint(offs[i], h); + hits++; +}; + +for (var i = 0; i < 3; i++) { + assertEq(g.f(), 'ok'); + assertEq(g.result, 'ok'); +} +assertEq(hits, 3); +assertEq(bphits, 3); diff --git a/js/src/jit-test/tests/debug/breakpoint-09.js b/js/src/jit-test/tests/debug/breakpoint-09.js new file mode 100644 index 0000000000..45aee69985 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-09.js @@ -0,0 +1,13 @@ +// Setting a breakpoint in an eval script that is not on the stack. Bug 746973. +// We don't assert that the breakpoint actually hits because that depends on +// the eval cache, an implementation detail. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +g.eval("function f() { return eval('2+2'); }"); +var s; +dbg.onNewScript = function (script) { s = script; }; +g.f(); +for (var offset of s.getLineOffsets(s.startLine)) + s.setBreakpoint(offset, {hit: function () {}}); +assertEq(g.f(), 4); diff --git a/js/src/jit-test/tests/debug/breakpoint-10.js b/js/src/jit-test/tests/debug/breakpoint-10.js new file mode 100644 index 0000000000..65665ae173 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-10.js @@ -0,0 +1,19 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +var fscript = null; +dbg.onNewScript = function(script) { + dbg.onNewScript = undefined; + fscript = script.getChildScripts()[0]; +} + +g.eval("function f(x) { arguments[0] = 3; return x }"); +assertEq(fscript !== null, true); + +fscript.setBreakpoint(0, {hit:function(frame) { + assertEq(frame.eval('x').return, 1); + assertEq(frame.arguments[0], 1); + return {return:42}; +}}); + +assertEq(g.f(1), 42); diff --git a/js/src/jit-test/tests/debug/breakpoint-11.js b/js/src/jit-test/tests/debug/breakpoint-11.js new file mode 100644 index 0000000000..4dce2e95b4 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-11.js @@ -0,0 +1,38 @@ +// Setting a breakpoint in a generator function works, and we can +// traverse the stack and evaluate expressions in the context of older +// generator frames. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + function hit(frame) { + frame.older.eval("q += 16"); + } + + var s = frame.script; + var offs = s.getLineOffsets(g.line0 + 9); + for (var i = 0; i < offs.length; i++) + s.setBreakpoint(offs[i], {hit: hit}); +}; + +g.eval("line0 = Error().lineNumber;\n" + + "function* g(x) {\n" + // + 1 + " var q = 10;\n" + // + 2 + " yield* x;\n" + // + 3 + " return q;\n" + // + 4 + "}\n" + // + 5 + "function* range(n) {\n" + // + 6 + " debugger;\n" + // + 7 + " for (var i = 0; i < n; i++)\n" + // + 8 + " yield i;\n" + // + 9 <-- breakpoint + " return;\n" + // so that line 9 only has the yield + "}"); + +g.eval("var iter = g(range(2))"); +g.eval("var first = iter.next().value"); +g.eval("var second = iter.next().value"); +g.eval("var third = iter.next().value"); + +assertEq(g.first, 0); +assertEq(g.second, 1); +assertEq(g.third, 42); diff --git a/js/src/jit-test/tests/debug/breakpoint-12.js b/js/src/jit-test/tests/debug/breakpoint-12.js new file mode 100644 index 0000000000..96770c8f26 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-12.js @@ -0,0 +1,78 @@ +// Removing a global as a debuggee forgets all its breakpoints. + + +var dbgA = new Debugger; +var logA = ''; + +var dbgB = new Debugger; +var logB = ''; + +var g1 = newGlobal({newCompartment: true}); +g1.eval('function g1f() { print("Weltuntergang"); }'); +var DOAg1 = dbgA.addDebuggee(g1); +var DOAg1f = DOAg1.getOwnPropertyDescriptor('g1f').value; +DOAg1f.script.setBreakpoint(0, { hit: () => { logA += '1'; } }); + +var DOBg1 = dbgB.addDebuggee(g1); +var DOBg1f = DOBg1.getOwnPropertyDescriptor('g1f').value; +DOBg1f.script.setBreakpoint(0, { hit: () => { logB += '1'; } }); + + +var g2 = newGlobal({newCompartment: true}); +g2.eval('function g2f() { print("Mokushi"); }'); + +var DOAg2 = dbgA.addDebuggee(g2); +var DOAg2f = DOAg2.getOwnPropertyDescriptor('g2f').value; +DOAg2f.script.setBreakpoint(0, { hit: () => { logA += '2'; } }); + +var DOBg2 = dbgB.addDebuggee(g2); +var DOBg2f = DOBg2.getOwnPropertyDescriptor('g2f').value; +DOBg2f.script.setBreakpoint(0, { hit: () => { logB += '2'; } }); + +assertEq(logA, ''); +assertEq(logB, ''); +g1.g1f(); +g2.g2f(); +assertEq(logA, '12'); +assertEq(logB, '12'); +logA = logB = ''; + +// Removing a global as a debuggee should make its breakpoint not hit. +dbgA.removeDebuggee(g2); +dbgB.removeDebuggee(g1); +assertEq(logA, ''); +assertEq(logB, ''); +g1.g1f(); +g2.g2f(); +assertEq(logA, '1'); +assertEq(logB, '2'); +logA = logB = ''; + +// Adding the global back as a debuggee should not resurrect its breakpoints. +dbgA.addDebuggee(g2); +dbgB.addDebuggee(g1); +assertEq(logA, ''); +assertEq(logB, ''); +g1.g1f(); +g2.g2f(); +assertEq(logA, '1'); +assertEq(logB, '2'); +logA = logB = ''; + +// But, we can set them again, and it all works. +DOAg2f.script.setBreakpoint(0, { hit: () => { logA += '2'; } }); +assertEq(logA, ''); +assertEq(logB, ''); +g2.g2f(); +g1.g1f(); +assertEq(logA, '21'); +assertEq(logB, '2'); +logA = logB = ''; + +DOBg1f.script.setBreakpoint(0, { hit: () => { logB += '1'; } }); +assertEq(logA, ''); +assertEq(logB, ''); +g2.g2f(); +g1.g1f(); +assertEq(logA, '21'); +assertEq(logB, '21'); diff --git a/js/src/jit-test/tests/debug/breakpoint-13.js b/js/src/jit-test/tests/debug/breakpoint-13.js new file mode 100644 index 0000000000..d839195ce4 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-13.js @@ -0,0 +1,13 @@ +// Breakpoints should be hit on scripts gotten not via Debugger.Frame. + +var g = newGlobal({newCompartment: true}); +g.eval("function f(x) { return x + 1; }"); +// Warm up so f gets OSRed into the jits. +g.eval("for (var i = 0; i < 10000; i++) f(i);"); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var fw = gw.getOwnPropertyDescriptor("f").value; +var hits = 0; +fw.script.setBreakpoint(0, { hit: function(frame) { hits++; } }); +g.eval("f(42);"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/breakpoint-14.js b/js/src/jit-test/tests/debug/breakpoint-14.js new file mode 100644 index 0000000000..48ee53594d --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-14.js @@ -0,0 +1,14 @@ +// Breakpoints should be hit on scripts gotten not via Debugger.Frame. + +var g = newGlobal({newCompartment: true}); +g.eval("function f(x) { return x + 1; }"); +g.eval("function g(x) { f(x); }"); +// Warm up so f gets OSRed into the jits and g inlines f. +g.eval("for (var i = 0; i < 10000; i++) g(i);"); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var fw = gw.getOwnPropertyDescriptor("f").value; +var hits = 0; +fw.script.setBreakpoint(0, { hit: function(frame) { hits++; } }); +g.eval("g(42);"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/breakpoint-await.js b/js/src/jit-test/tests/debug/breakpoint-await.js new file mode 100644 index 0000000000..9a648cab01 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-await.js @@ -0,0 +1,47 @@ +if (typeof disassemble !== "function") { + quit(); +} + +const g = newGlobal({ newCompartment: true }); +g.eval(` +async function func() { + await 10; +} +async function * func2() { + await 10; +} +var func_dis = disassemble(func); +var func2_dis = disassemble(func2); +`); +const d = new Debugger(); +const dg = d.addDebuggee(g); +const script = dg.makeDebuggeeValue(g.func).script; +const script2 = dg.makeDebuggeeValue(g.func2).script; + +function getOffsets(code) { + let CanSkipAwait_offset = -1; + let Await_offset = -1; + let m; + for (const line of code.split("\n")) { + m = line.match(/(\d+):\s+\d+\s+CanSkipAwait\s/); + if (m) { + CanSkipAwait_offset = parseInt(m[1], 10); + } + + m = line.match(/(\d+):\s+\d+\s+Await\s/); + if (m) { + Await_offset = parseInt(m[1], 10); + } + } + assertEq(CanSkipAwait_offset !== -1, true); + assertEq(Await_offset !== -1, true); + return [CanSkipAwait_offset, Await_offset]; +} + +let [CanSkipAwait_offset, Await_offset] = getOffsets(g.func_dis); +assertEq(script.getEffectfulOffsets().includes(CanSkipAwait_offset), true); +assertEq(script.getEffectfulOffsets().includes(Await_offset), true); + +[CanSkipAwait_offset, Await_offset] = getOffsets(g.func2_dis); +assertEq(script2.getEffectfulOffsets().includes(CanSkipAwait_offset), true); +assertEq(script2.getEffectfulOffsets().includes(Await_offset), true); diff --git a/js/src/jit-test/tests/debug/breakpoint-dot-generator.js b/js/src/jit-test/tests/debug/breakpoint-dot-generator.js new file mode 100644 index 0000000000..85ad7ac2e1 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-dot-generator.js @@ -0,0 +1,35 @@ +const g = newGlobal({ newCompartment: true }); +g.eval(` +function* func() { +} +`); +const d = new Debugger(); +const dg = d.addDebuggee(g); +const script = dg.makeDebuggeeValue(g.func).script; + +// The following test assumes the above `func` function has the following +// bytecode sequences: +// +// 00000: Generator # GENERATOR +// 00001: SetAliasedVar ".generator" # GENERATOR +// 00006: InitialYield 0 # RVAL GENERATOR RESUMEKIND + +// Setting a breakpoint at `SetAliasedVar ".generator"` should be disallow. +let caught = false; +try { + script.setBreakpoint(1, {}); +} catch (e) { + caught = true; + assertEq(e.message.includes("not allowed"), true); +} + +assertEq(caught, true); + +// Setting breakpoints to other opcodes should be allowed. +script.setBreakpoint(0, {}); +script.setBreakpoint(6, {}); + +// Offset 1 shouldn't be exposed. +assertEq(script.getPossibleBreakpoints().some(p => p.offset == 1), false); +assertEq(script.getAllColumnOffsets().some(p => p.offset == 1), false); +assertEq(script.getEffectfulOffsets().includes(1), false); diff --git a/js/src/jit-test/tests/debug/breakpoint-gc-01.js b/js/src/jit-test/tests/debug/breakpoint-gc-01.js new file mode 100644 index 0000000000..2cbfe66fb4 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-gc-01.js @@ -0,0 +1,25 @@ +// Handlers for breakpoints in an eval script are live as long as the script is on the stack. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var log = ''; +dbg.onDebuggerStatement = function (frame) { + function handler(i) { + return {hit: function () { log += '' + i; }}; + } + + var s = frame.script; + var offs = s.getLineOffsets(g.line0 + 2); + for (var i = 0; i < 7; i++) { + var h = handler(i); + for (var j = 0; j < offs.length; j++) + s.setBreakpoint(offs[j], h); + } + gc(); +}; + + +g.eval("var line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "x = 1;\n"); // line0 + 2 +assertEq(log, '0123456'); diff --git a/js/src/jit-test/tests/debug/breakpoint-gc-02.js b/js/src/jit-test/tests/debug/breakpoint-gc-02.js new file mode 100644 index 0000000000..89c447ae67 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-gc-02.js @@ -0,0 +1,28 @@ +// A Debugger with live breakpoints is live. + +var g = newGlobal({newCompartment: true}); +g.eval("var line0 = Error().lineNumber;\n" + + "function f() {\n" + // line0 + 1 + " return 2;\n" + // line0 + 2 + "}\n"); + +var N = 4; +var hits = 0; +for (var i = 0; i < N; i++) { + var dbg = Debugger(g); + dbg.onDebuggerStatement = function (frame) { + var handler = {hit: function () { hits++; }}; + var s = frame.eval("f").return.script; + var offs = s.getLineOffsets(g.line0 + 2); + for (var j = 0; j < offs.length; j++) + s.setBreakpoint(offs[j], handler); + }; + g.eval('debugger;'); + dbg.onDebuggerStatement = undefined; + dbg = null; +} + +gc(); + +assertEq(g.f(), 2); +assertEq(hits, N); diff --git a/js/src/jit-test/tests/debug/breakpoint-gc-04.js b/js/src/jit-test/tests/debug/breakpoint-gc-04.js new file mode 100644 index 0000000000..38c7d14975 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-gc-04.js @@ -0,0 +1,23 @@ +// Enabled debuggers keep breakpoint handlers alive. + +var g = newGlobal({newCompartment: true}); +g.eval("var line0 = Error().lineNumber;\n" + + "function f() {\n" + // line0 + 1 + " return 2;\n" + // line0 + 2 + "}\n"); +var N = 4; +var hits = 0; +for (var i = 0; i < N; i++) { + var dbg = Debugger(g); + dbg.onDebuggerStatement = function (frame) { + var handler = {hit: function () { hits++; }}; + var s = frame.eval("f").return.script; + var offs = s.getLineOffsets(g.line0 + 2); + for (var j = 0; j < offs.length; j++) + s.setBreakpoint(offs[j], handler); + }; +} +g.eval('debugger;'); +gc({}); +assertEq(g.f(), 2); +assertEq(hits, N); diff --git a/js/src/jit-test/tests/debug/breakpoint-gc-05.js b/js/src/jit-test/tests/debug/breakpoint-gc-05.js new file mode 100644 index 0000000000..41e4e2aaaf --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-gc-05.js @@ -0,0 +1,25 @@ +// Disabled debuggers keep breakpoint handlers alive. + +var g = newGlobal({newCompartment: true}); +g.eval("var line0 = Error().lineNumber;\n" + + "function f() {\n" + // line0 + 1 + " return 2;\n" + // line0 + 2 + "}\n"); +var N = 4; +var hits = 0; +for (var i = 0; i < N; i++) { + var dbg = Debugger(g); + dbg.onDebuggerStatement = function (frame) { + var handler = {hit: function () { hits++; }}; + var s = frame.eval("f").return.script; + var offs = s.getLineOffsets(g.line0 + 2); + for (var j = 0; j < offs.length; j++) + s.setBreakpoint(offs[j], handler); + }; +} +g.eval('debugger;'); +dbg.enabled = false; +gc({}); +dbg.enabled = true; +assertEq(g.f(), 2); +assertEq(hits, N); diff --git a/js/src/jit-test/tests/debug/breakpoint-multi-01.js b/js/src/jit-test/tests/debug/breakpoint-multi-01.js new file mode 100644 index 0000000000..88f52aedf5 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-multi-01.js @@ -0,0 +1,28 @@ +// A single Debugger object can set multiple breakpoints at an instruction. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var log = ''; +dbg.onDebuggerStatement = function (frame) { + log += 'D'; + function handler(i) { + return {hit: function (frame) { log += '' + i; }}; + } + var f = frame.eval("f").return; + var s = f.script; + var offs = s.getLineOffsets(g.line0 + 2); + for (var i = 0; i < 10; i++) { + var bp = handler(i); + for (var j = 0; j < offs.length; j++) + s.setBreakpoint(offs[j], bp); + } + assertEq(f.call().return, 42); + log += 'X'; +}; + +g.eval("var line0 = Error().lineNumber;\n" + + "function f() {\n" + // line0 + 1 + " return 42;\n" + // line0 + 2 + "}\n" + + "debugger;\n"); +assertEq(log, 'D0123456789X'); diff --git a/js/src/jit-test/tests/debug/breakpoint-multi-02.js b/js/src/jit-test/tests/debug/breakpoint-multi-02.js new file mode 100644 index 0000000000..b8d9b51d95 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-multi-02.js @@ -0,0 +1,42 @@ +// After clearing one breakpoint, another breakpoint at the same instruction still works. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var script = null; +var handlers = []; +dbg.onDebuggerStatement = function (frame) { + function handler(i) { + return {hit: function (frame) { g.log += '' + i; }}; + } + var f = frame.eval("f").return; + var s = f.script; + if (script === null) + script = s; + else + assertEq(s, script); + + var offs = s.getLineOffsets(g.line0 + 3); + for (var i = 0; i < 3; i++) { + handlers[i] = handler(i); + for (var j = 0; j < offs.length; j++) + s.setBreakpoint(offs[j], handlers[i]); + } +}; + +g.eval("var line0 = Error().lineNumber;\n" + + "function f() {\n" + // line0 + 1 + " log += 'x';\n" + // line0 + 2 + " log += 'y';\n" + // line0 + 3 + "}\n" + + "debugger;\n"); +assertEq(handlers.length, 3); + +g.log = ''; +g.f(); +assertEq(g.log, 'x012y'); + +script.clearBreakpoint(handlers[0]); + +g.log = ''; +g.f(); +assertEq(g.log, 'x12y'); diff --git a/js/src/jit-test/tests/debug/breakpoint-multi-03.js b/js/src/jit-test/tests/debug/breakpoint-multi-03.js new file mode 100644 index 0000000000..930123bbc6 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-multi-03.js @@ -0,0 +1,27 @@ +// Multiple Debugger objects can set breakpoints at the same instruction. + +var g = newGlobal({newCompartment: true}); +function attach(g, i) { + var dbg = Debugger(g); + dbg.onDebuggerStatement = function (frame) { + var s = frame.eval("f").return.script; + var offs = s.getLineOffsets(g.line0 + 3); + for (var j = 0; j < offs.length; j++) + s.setBreakpoint(offs[j], {hit: function () { g.log += "" + i; }}); + }; +} + +g.eval("var line0 = Error().lineNumber;\n" + + "function f() {\n" + // line0 + 1 + " log += 'a';\n" + // line0 + 2 + " log += 'b';\n" + // line0 + 3 + "}\n"); + +for (var i = 0; i < 3; i++) + attach(g, i); + +g.log = ''; +g.eval('debugger;'); +g.log += 'x'; +g.f(); +assertEq(g.log, 'xa012b'); diff --git a/js/src/jit-test/tests/debug/breakpoint-multi-04.js b/js/src/jit-test/tests/debug/breakpoint-multi-04.js new file mode 100644 index 0000000000..fa407a0e17 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-multi-04.js @@ -0,0 +1,48 @@ +// After clearing one breakpoint, another breakpoint from a different Debugger object at the same instruction still works. + +function test(which) { + var g = newGlobal({newCompartment: true}); + g.eval("var line0 = Error().lineNumber;\n" + + "function f() {\n" + // line0 + 1 + " return " + which + ";\n" + // line0 + 2 + "}\n"); + + var log; + var scripts = []; + var handlers = []; + function addDebugger(g, i) { + var dbg = Debugger(g); + dbg.onDebuggerStatement = function (frame) { + var s = frame.eval("f").return.script; + scripts[i] = s; + var offs = s.getLineOffsets(g.line0 + 2); + var handler = {hit: function (frame) { log += '' + i; } }; + s.setBreakpoint(0, handler); + handlers[i] = handler; + }; + } + + var expected = ''; + for (var i = 0; i < 3; i++) { + addDebugger(g, i); + if (i !== which) + expected += '' + i; + } + g.eval('debugger;'); + + for (var i = 0; i < 3; i++) + assertEq(scripts[i].getBreakpoints()[0], handlers[i]); + + log = ''; + g.f(); + assertEq(log, '012'); + + scripts[which].clearAllBreakpoints(); + + log = ''; + g.f(); + assertEq(log, expected); +} + +for (var j = 0; j < 3; j++) + test(j); diff --git a/js/src/jit-test/tests/debug/breakpoint-noncng.js b/js/src/jit-test/tests/debug/breakpoint-noncng.js new file mode 100644 index 0000000000..2ce779cbd7 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-noncng.js @@ -0,0 +1,20 @@ +// Breakpoints work in non-compile-and-go code. Bug 738479. + +var g = newGlobal({newCompartment: true}); +g.s = ''; +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +g.evaluate( + "function f() {\n" + // fscript.startLine + " s += 'a';\n" + // fscript.startLine + 1 + " s += 'b';\n" + // fscript.startLine + 2 + "}\n"); + +var fscript = gw.makeDebuggeeValue(g.f).script; +var handler = {hit: function (frame) { g.s += '1'; }}; +for (var pc of fscript.getLineOffsets(fscript.startLine + 2)) + fscript.setBreakpoint(pc, handler); + +g.f(); + +assertEq(g.s, "a1b"); diff --git a/js/src/jit-test/tests/debug/breakpoint-oom-01.js b/js/src/jit-test/tests/debug/breakpoint-oom-01.js new file mode 100644 index 0000000000..4fd709ccd0 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-oom-01.js @@ -0,0 +1,41 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// Test for OOM hitting a breakpoint in a generator. +// +// (The purpose is to test OOM-handling in the code that creates the +// Debugger.Frame object and associates it with the generator object.) + +let g = newGlobal({newCompartment: true}); +g.eval(`\ + function* gen(x) { // line 1 + x++; // 2 + yield x; // 3 + } // 4 +`); + +let dbg = new Debugger; + +// On OOM in the debugger, propagate it to the debuggee. +dbg.uncaughtExceptionHook = exc => exc === "out of memory" ? {throw: exc} : null; + +let gw = dbg.addDebuggee(g); +let script = gw.makeDebuggeeValue(g.gen).script; +let hits = 0; +let handler = { + hit(frame) { + hits++; + print("x=", frame.environment.getVariable("x")); + } +}; +for (let offset of script.getLineOffsets(2)) + script.setBreakpoint(offset, handler); + +let result; +oomTest(() => { + hits = 0; + result = g.gen(1).next(); +}, false); +assertEq(hits, 1); +assertEq(result.done, false); +assertEq(result.value, 2); + diff --git a/js/src/jit-test/tests/debug/breakpoint-resume-01.js b/js/src/jit-test/tests/debug/breakpoint-resume-01.js new file mode 100644 index 0000000000..ce73b53810 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-resume-01.js @@ -0,0 +1,25 @@ +// A breakpoint handler hit method can return {throw: exc} to throw an exception. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + function hit(frame) { + return {throw: frame.eval("new Error('PASS')").return}; + } + + var s = frame.script; + var offs = s.getLineOffsets(g.line0 + 3); + for (var i = 0; i < offs.length; i++) + s.setBreakpoint(offs[i], {hit: hit}); +}; + +g.s = null; +g.eval("line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "try {\n" + // line0 + 2 + " s = 'FAIL';\n" + // line0 + 3 + "} catch (exc) {\n" + + " assertEq(exc.constructor, Error);\n" + + " s = exc.message;\n" + + "}\n"); +assertEq(g.s, 'PASS'); diff --git a/js/src/jit-test/tests/debug/breakpoint-resume-02.js b/js/src/jit-test/tests/debug/breakpoint-resume-02.js new file mode 100644 index 0000000000..966851fa3d --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-resume-02.js @@ -0,0 +1,34 @@ +// A breakpoint handler hit method can return null to raise an uncatchable error. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + g.log += 'D'; + + function hit(frame) { + g.log += 'H'; + return null; + } + + var f = frame.eval("f").return; + var s = f.script; + var offs = s.getLineOffsets(g.line0 + 3); + for (var i = 0; i < offs.length; i++) + s.setBreakpoint(offs[i], {hit: hit}); + + var rv = f.call(); + assertEq(rv, null); + g.log += 'X'; +}; + +g.log = ''; +g.eval("line0 = Error().lineNumber;\n" + + "function f() {\n" + // line0 + 1 + " try {\n" + // line0 + 2 + " log += '3';\n" + // line0 + 3 + " } catch (exc) {\n" + + " log += '5';\n" + + " }\n" + + "}\n" + + "debugger;\n"); +assertEq(g.log, 'DHX'); diff --git a/js/src/jit-test/tests/debug/breakpoint-resume-03.js b/js/src/jit-test/tests/debug/breakpoint-resume-03.js new file mode 100644 index 0000000000..84222bf198 --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-resume-03.js @@ -0,0 +1,30 @@ +// A breakpoint handler hit method can return {return: val} to force the frame to return. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + g.log += 'D'; + + function hit(frame) { + g.log += 'H'; + return {return: 'ok'}; + } + + var f = frame.eval("f").return; + var s = f.script; + var offs = s.getLineOffsets(g.line0 + 2); + for (var i = 0; i < offs.length; i++) + s.setBreakpoint(offs[i], {hit: hit}); + + var rv = f.call(); + assertEq(rv.return, 'ok'); + g.log += 'X'; +}; + +g.log = ''; +g.eval("line0 = Error().lineNumber;\n" + + "function f() {\n" + // line0 + 1 + " log += '2';\n" + // line0 + 2 + "}\n" + + "debugger;\n"); +assertEq(g.log, 'DHX'); diff --git a/js/src/jit-test/tests/debug/breakpoint-resume-04.js b/js/src/jit-test/tests/debug/breakpoint-resume-04.js new file mode 100644 index 0000000000..4fed89170f --- /dev/null +++ b/js/src/jit-test/tests/debug/breakpoint-resume-04.js @@ -0,0 +1,37 @@ +// |jit-test| error:all-jobs-completed-successfully +// Verifiy that a breakpoints force-return queues the promise microtask to run +// in the debuggee's job queue, not the debugger's +// AutoDebuggerJobQueueInterruption. + +let g = newGlobal({ newCompartment: true }); +g.eval(` + async function asyncFn(x) { + await Promise.resolve(); + debugger; + } + function enterDebuggee(){} +`); +const dbg = new Debugger(g); + +(async function() { + let it = g.asyncFn(); + + // Force-return when the await resumes and steps. + dbg.onEnterFrame = frame => { + dbg.onEnterFrame = undefined; + const bps = frame.script.getPossibleBreakpoints({ line: 4 }); + assertEq(bps.length, 1); + frame.script.setBreakpoint(bps[0].offset, { + hit: () => ({ return: "exit" }) + }); + }; + + const result = await it; + assertEq(result, "exit"); + // If execution here is resumed from the debugger's queue, this call will + // trigger DebuggeeWouldRun exception. + g.enterDebuggee(); + + + throw "all-jobs-completed-successfully"; +})(); diff --git a/js/src/jit-test/tests/debug/bug-1102549.js b/js/src/jit-test/tests/debug/bug-1102549.js new file mode 100644 index 0000000000..fbe38d9ae4 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1102549.js @@ -0,0 +1,9 @@ +// |jit-test| error: log is not defined + +if (!this.Promise) + throw new Error('log is not defined'); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onPromiseSettled = function (g) { log += 's'; throw "foopy"; }; +g.settlePromiseNow(new g.Promise(function (){})); diff --git a/js/src/jit-test/tests/debug/bug-1103386.js b/js/src/jit-test/tests/debug/bug-1103386.js new file mode 100644 index 0000000000..3db8e10a7b --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1103386.js @@ -0,0 +1,10 @@ +load(libdir + "immutable-prototype.js"); + +// Random chosen test: js/src/jit-test/tests/auto-regress/bug700295.js +if (globalPrototypeChainIsMutable()) { + __proto__ = null; + Object.prototype.__proto__ = this; +} + +// Random chosen test: js/src/jit-test/tests/debug/Memory-takeCensus-05.js +Debugger(newGlobal({newCompartment: true})).memory.takeCensus(); diff --git a/js/src/jit-test/tests/debug/bug-1103813.js b/js/src/jit-test/tests/debug/bug-1103813.js new file mode 100644 index 0000000000..0e060b32d8 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1103813.js @@ -0,0 +1,7 @@ +// Random chosen test: js/src/jit-test/tests/debug/Source-invisible.js +newGlobal({ + newCompartment: true, + invisibleToDebugger: true +}) +// Random chosen test: js/src/jit-test/tests/debug/Debugger-findObjects-05.js +x = (new Debugger).findObjects() diff --git a/js/src/jit-test/tests/debug/bug-1103817.js b/js/src/jit-test/tests/debug/bug-1103817.js new file mode 100644 index 0000000000..f571b6f603 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1103817.js @@ -0,0 +1,5 @@ +// Random chosen test: js/src/jit-test/tests/debug/Source-introductionScript-04.js +x = (new Debugger).addDebuggee(newGlobal({newCompartment: true})); +print(x.getOwnPropertyDescriptor('Function').value.proto.script); +// Random chosen test: js/src/jit-test/tests/debug/Memory-takeCensus-03.js +(new Debugger).memory.takeCensus(); diff --git a/js/src/jit-test/tests/debug/bug-1110327.js b/js/src/jit-test/tests/debug/bug-1110327.js new file mode 100644 index 0000000000..e45d88884f --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1110327.js @@ -0,0 +1,5 @@ +// Randomly chosen test: js/src/jit-test/tests/debug/Debugger-debuggees-10.js +x = newGlobal({newCompartment: true}) +x.t = this +// Randomly chosen test: js/src/jit-test/tests/debug/Debugger-findObjects-06.js +Debugger(x).findObjects() diff --git a/js/src/jit-test/tests/debug/bug-1136806.js b/js/src/jit-test/tests/debug/bug-1136806.js new file mode 100644 index 0000000000..104e79b1ee --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1136806.js @@ -0,0 +1,7 @@ +// |jit-test| allow-unhandlable-oom; allow-oom + +if (typeof oomAfterAllocations == "function") { + Debugger() + oomAfterAllocations(6) + Debugger() +} diff --git a/js/src/jit-test/tests/debug/bug-1192401.js b/js/src/jit-test/tests/debug/bug-1192401.js new file mode 100644 index 0000000000..d55d22b8e5 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1192401.js @@ -0,0 +1,6 @@ +// |jit-test| --more-compartments +const dbg = new Debugger(); +const g = evalcx("lazy"); +dbg.addDebuggee(g); +dbg.memory.trackingAllocationSites = true; +g.eval("this.alloc = {}"); diff --git a/js/src/jit-test/tests/debug/bug-1238610.js b/js/src/jit-test/tests/debug/bug-1238610.js new file mode 100644 index 0000000000..91562443bd --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1238610.js @@ -0,0 +1,22 @@ +// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this) || helperThreadCount() === 0 + +lfcode = new Array(); +dbg = Debugger(); +dbg.onEnterFrame = function() {}; +g = newGlobal(); +lfcode.push(` + oomAfterAllocations(100); + new Number(); + dbg.addDebuggee(g); +`) +file = lfcode.shift(); +loadFile(file); +function loadFile(lfVarx) { + lfGlobal = newGlobal() + for (lfLocal in this) + if (!(lfLocal in lfGlobal)) + lfGlobal[lfLocal] = this[lfLocal] + offThreadCompileToStencil(lfVarx); + var stencil = lfGlobal.finishOffThreadStencil(); + lfGlobal.evalStencil(stencil); +} diff --git a/js/src/jit-test/tests/debug/bug-1240090.js b/js/src/jit-test/tests/debug/bug-1240090.js new file mode 100644 index 0000000000..3b9ea3d08e --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1240090.js @@ -0,0 +1,23 @@ +gczeal(2); +g = newGlobal({newCompartment: true}); +dbg = Debugger(g); +dbg.onNewScript = function() { return function() { return this; } }; +schedulegc(10); +g.evaluate("function one() {}", { forceFullParse: true }); +g.evaluate(` + function target () {} + function two2() {} + `, { forceFullParse: true }); +g.evaluate(` + function three1() {} + function three2() {} + function three3() {} + `, { forceFullParse: true }); +dbg.memory.takeCensus({ + breakdown: { + by: "coarseType", + scripts: { + by: "filename" + } + } +}); diff --git a/js/src/jit-test/tests/debug/bug-1248162.js b/js/src/jit-test/tests/debug/bug-1248162.js new file mode 100644 index 0000000000..825b3376e4 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1248162.js @@ -0,0 +1,11 @@ +// |jit-test| allow-oom; skip-if: !('oomTest' in this) + +// Adapted from randomly chosen test: js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-01.js +for (var i = 0; i < 9; ++i) { + var dbg = new Debugger; + dbg.onNewGlobalObject = function() {}; +} +// jsfunfuzz-generated +oomTest(function() { + newGlobal({sameZoneAs: this}); +}) diff --git a/js/src/jit-test/tests/debug/bug-1260725.js b/js/src/jit-test/tests/debug/bug-1260725.js new file mode 100644 index 0000000000..ce1c263f6a --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1260725.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var dbg = new Debugger; +dbg.onNewGlobalObject = function(global) { + dbg.memory.takeCensus({}); +}; +oomTest(function() { + newGlobal({sameZoneAs: this}) +}); diff --git a/js/src/jit-test/tests/debug/bug-1260728.js b/js/src/jit-test/tests/debug/bug-1260728.js new file mode 100644 index 0000000000..fbccb448e7 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1260728.js @@ -0,0 +1,12 @@ +// |jit-test| error:Error + +var g = newGlobal(); +var dbg = new Debugger(g); +dbg.onNewScript = function(script) { + fscript = script.getChildScripts()[0]; +} +g.eval("function f(x) { arguments[0] = 3; return x }"); +fscript.setBreakpoint(0, {hit:function(frame) { + assertEq(frame.eval("assertEq(arguments, undefined)").return, 1); +}}); +assertEq(g.f(1), 42); diff --git a/js/src/jit-test/tests/debug/bug-1385844-2.js b/js/src/jit-test/tests/debug/bug-1385844-2.js new file mode 100644 index 0000000000..50d070b41e --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1385844-2.js @@ -0,0 +1,39 @@ +// Frame invalidatation should not follow 'debugger eval prev' links. +// This should not fail a 'frame.isDebuggee()' assertion. +// This version of the test requires only a single Debugger, and a single +// debuggee global. + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); + +g.eval(` + function f() { debugger; } +`); +g.observeAll = observeAll; + +dbg.onDebuggerStatement = first; +g.eval(`debugger;`); + +var saved; +function first(frame) { + saved = frame; + dbg.onDebuggerStatement = second; + saved.eval(`f()`); +} + +function second() { + saved.eval(`observeAll()`); +} + +function observeAll() { + // Setting this hook causes `Debugger::updateExecutionObservabilityOfFrames` + // to walk the stack looking for frames running in `g` and marking them as + // debuggees. It should ignore 'debugger eval prev' links; if it does not, the + // traversal will jump from the frame for `second`'s eval directly to `saved`, + // the frame for the `g.eval` call. In particular, it will not visit the frame + // for the eval in `first`, which was never marked as a debuggee. (Simply + // being created for a `Debugger.Frame.prototype.eval` call doesn't + // necessarily mark you as a debuggee, if your behavior doesn't need to be + // observed.) + dbg.onEnterFrame = function () { }; +} diff --git a/js/src/jit-test/tests/debug/bug-1385844.js b/js/src/jit-test/tests/debug/bug-1385844.js new file mode 100644 index 0000000000..3f40803a07 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1385844.js @@ -0,0 +1,24 @@ +// Frame invalidatation should not follow 'debugger eval prev' links. +// This should not fail a 'frame.isDebuggee()' assertion. + +var g1 = this; + +var h = newGlobal({ newCompartment: true }); +h.parent = g1; +h.eval(` + var hdbg = new Debugger(parent); + function j() { + hdbg.onEnterFrame = function(frame) {}; + } +`); + +var g2 = newGlobal({ newCompartment: true }); +g2.j = h.j; + +var dbg = new Debugger(g2); +var g2DO = dbg.addDebuggee(g2); + +dbg.onDebuggerStatement = function(f) { + f.eval('j()'); +}; +g2.eval('debugger'); diff --git a/js/src/jit-test/tests/debug/bug-1444604-reduced.js b/js/src/jit-test/tests/debug/bug-1444604-reduced.js new file mode 100644 index 0000000000..6e84fef194 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1444604-reduced.js @@ -0,0 +1,27 @@ +// LiveSavedFrameCache should not be confused by eval-in-frame-prev links. + +const g = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const gDO = dbg.addDebuggee(g); + +g.evaluate(` + function inner() { debugger; } + function outer() { inner(); } +`); + +dbg.onDebuggerStatement = function handler(frame) { + // Capture the JS stack, putting frames for handler, inner, and outer in the + // cache. Perform all captures in g's compartment, to avoid flushing the cache + // for compartment mismatches. + frame.eval('print(`in inner: ${saveStack()}`)'); + + // Carry out a capture in outer's context, following the eval-in-frame prev + // link and thus skipping over inner, removing it from the cache. + frame.older.eval('print(`in outer: ${saveStack()}`)'); + + // Capture again. inner's hasCachedSavedFrame bit should be set, but its entry + // has been flushed. + frame.eval('print(`in inner: ${saveStack()}`)'); +}; + +g.outer(); diff --git a/js/src/jit-test/tests/debug/bug-1444604.js b/js/src/jit-test/tests/debug/bug-1444604.js new file mode 100644 index 0000000000..d5906791db --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1444604.js @@ -0,0 +1,16 @@ +// Fuzz test: LiveSavedFrameCache should not be confused by eval-in-frame-prev links. +// See bug-144604-reduced.js for a more direct version. + +var evalInFrame = (function (global) { + var dbgGlobal = newGlobal({newCompartment: true}); + var dbg = new dbgGlobal.Debugger(); + return function evalInFrame(upCount, code) { + dbg.addDebuggee(global); + var frame = dbg.getNewestFrame().older; + for (var i = 0; i < upCount; i++) { + } + var completion = frame.eval(code); + }; +})(this); +enableTrackAllocations(); +evalInFrame(1, "print(a)"); diff --git a/js/src/jit-test/tests/debug/bug-1477084.js b/js/src/jit-test/tests/debug/bug-1477084.js new file mode 100644 index 0000000000..2e45a8cc05 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1477084.js @@ -0,0 +1,30 @@ +// Don't assert trying to force return before the initial yield of an async function. + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.parentExc = new Error("pants"); +g.eval(` + var dbg = new Debugger; + var pw = dbg.addDebuggee(parent); + var hits = 0; + dbg.onExceptionUnwind = function (frame) { + dbg.onExceptionUnwind = undefined; + return {return: undefined}; + }; + dbg.uncaughtExceptionHook = exc => { + hits++; + assertEq(exc instanceof TypeError, true); + assertEq(/force return.*before the initial yield/.test(exc.message), true); + return {throw: pw.makeDebuggeeValue(parentExc)}; + }; +`); + +async function* method({ x: callbackfn = unresolvableReference }) {} +try { + method(); +} catch (exc) { + g.dbg.enabled = false; + assertEq(exc, g.parentExc); +} + +assertEq(g.hits, 1); diff --git a/js/src/jit-test/tests/debug/bug-1564012.js b/js/src/jit-test/tests/debug/bug-1564012.js new file mode 100644 index 0000000000..b51f9e16fc --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1564012.js @@ -0,0 +1,8 @@ +fullcompartmentchecks(true); +var g = newGlobal({ + newCompartment: true +}); +g.eval("function*f(){debugger;yield}"); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function(frame) {}; +g.f().next(); diff --git a/js/src/jit-test/tests/debug/bug-1565275.js b/js/src/jit-test/tests/debug/bug-1565275.js new file mode 100644 index 0000000000..242bce3a85 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1565275.js @@ -0,0 +1,19 @@ +// |jit-test| skip-if: !('oomTest' in this) + +Object.defineProperty(this, "fuzzutils", { + value: { + evaluate: function() {}, + } +}); +var g = newGlobal({ + newCompartment: true +}); +g.parent = this; +g.eval("(" + function() { + var dbg = Debugger(parent); + dbg.onEnterFrame = function(frame) { + frame.onStep = function() {} + } +} + ")()"); +fuzzutils.evaluate(); +oomTest(new Function(), {expectExceptionOnFailure: false}); diff --git a/js/src/jit-test/tests/debug/bug-1572391.js b/js/src/jit-test/tests/debug/bug-1572391.js new file mode 100644 index 0000000000..816173a154 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1572391.js @@ -0,0 +1,15 @@ +g = newGlobal({ newCompartment: true }); +dbg = Debugger(g); +dbg.onDebuggerStatement = function(frame) { + frame.older +} + +g.eval(` + function* countdown(recur) { + if (recur) + yield* countdown(false); + debugger; + } +`); + +g.countdown(true).next() diff --git a/js/src/jit-test/tests/debug/bug-1576862-2.js b/js/src/jit-test/tests/debug/bug-1576862-2.js new file mode 100644 index 0000000000..6f7c31e98a --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1576862-2.js @@ -0,0 +1,23 @@ +// |jit-test| skip-if: !('stackTest' in this) +// Failure to rewrap an exception in Completion::fromJSResult should be propagated. + +var dbgGlobal = newGlobal({ newCompartment: true }); +var dbg = new dbgGlobal.Debugger(); +dbg.addDebuggee(this); + +function test() { + // Make this call's stack frame a debuggee, to ensure that + // slowPathOnLeaveFrame runs when this frame exits. That calls + // Completion::fromJSResult to capture this frame's completion value. + dbg.getNewestFrame(); + + // Throw from the non-debuggee compartment, to force Completion::fromJSResult + // to rewrap the exception. + dbgGlobal.assertEq(1,2); +} + +stackTest(test, { + // When the bug is fixed, the failure to rewrap the exception turns the throw + // into a termination, so we won't get an exception. + expectExceptionOnFailure: false +}); diff --git a/js/src/jit-test/tests/debug/bug-1584195.js b/js/src/jit-test/tests/debug/bug-1584195.js new file mode 100644 index 0000000000..93aca7291d --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1584195.js @@ -0,0 +1,31 @@ +// |jit-test| skip-if: !('gczeal' in this) +// Bug 1584195: Debugger.Frame finalizer should't try to apply +// IsAboutToBeFinalized to cells of other alloc kinds, whose arenas may have +// been turned over to fresh allocations. + +try { + evaluate(` + var g9 = newGlobal({newCompartment: true}); + g9.parent = this; + g9.eval(\` + var dbg = new Debugger(parent); + dbg.onEnterFrame = frame => {}; + \`); + function lfPromise(x) { + return new Promise(resolve => {}); + } + async function lfAsync() { + await lfPromise(); + } lfAsync(); + `); + gczeal(20, 2); + evaluate(` + async function lfAsync() {} lfAsync(); + `); + gczeal(12, 7); + drainJobQueue(); + evaluate(` + new { ... v22 => { + `); +} catch (exc) {} +evaluate(""); diff --git a/js/src/jit-test/tests/debug/bug-725733.js b/js/src/jit-test/tests/debug/bug-725733.js new file mode 100644 index 0000000000..d518ceb74b --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-725733.js @@ -0,0 +1,9 @@ +// |jit-test| +// Adding a debuggee must leave its scripts in a safe state. + +var g = newGlobal({newCompartment: true}); +g.eval( + "function f(x) { return {q: x}; }\n" + + "var n = f('').q;\n"); +var dbg = new Debugger(g); +g.eval("f(0)"); diff --git a/js/src/jit-test/tests/debug/bug-800586.js b/js/src/jit-test/tests/debug/bug-800586.js new file mode 100644 index 0000000000..06cc33300a --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-800586.js @@ -0,0 +1,7 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +dbg.onDebuggerStatement = function (f) { + gw.executeInGlobal("eval('var x = \"A Brief History of Love\"');\n") +}; +g.eval('debugger'); diff --git a/js/src/jit-test/tests/debug/bug-826669.js b/js/src/jit-test/tests/debug/bug-826669.js new file mode 100644 index 0000000000..21b50441ff --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-826669.js @@ -0,0 +1,7 @@ +gczeal(9, 2) +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var g1w = dbg.addDebuggee(g1); +g1.eval('function f() {}'); +scripts = dbg.findScripts({}); diff --git a/js/src/jit-test/tests/debug/bug-858170.js b/js/src/jit-test/tests/debug/bug-858170.js new file mode 100644 index 0000000000..f3e1a334bc --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-858170.js @@ -0,0 +1,7 @@ +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onNewScript = function (s) { + throw new Error(); +}; +dbg.uncaughtExceptionHook = function () {} +g.eval("2 * 3"); diff --git a/js/src/jit-test/tests/debug/bug-876654.js b/js/src/jit-test/tests/debug/bug-876654.js new file mode 100644 index 0000000000..08514695a5 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-876654.js @@ -0,0 +1,13 @@ +// |jit-test| +// Exercise finding a DebuggerSource cross compartment wrapper in +// Compartment::findOutgoingEdges() + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); +dbg.onNewScript = function (script) { + var text = script.source.text; +} +g.eval("function f() { function g() {} }"); +gczeal(9, 1) +var a = {} +var b = {} diff --git a/js/src/jit-test/tests/debug/bug1001372.js b/js/src/jit-test/tests/debug/bug1001372.js new file mode 100644 index 0000000000..77511754be --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1001372.js @@ -0,0 +1,21 @@ +var lfcode = new Array(); +lfcode.push = loadFile; +lfcode.push(""); +lfcode.push(""); +lfcode.push("3"); +lfcode.push(""); +lfcode.push(""); +lfcode.push(""); +lfcode.push(""); +lfcode.push("4"); +lfcode.push(""); +lfcode.push("0"); +lfcode.push("gczeal(2);"); +lfcode.push("\ + var g = newGlobal({newCompartment: true});\ + g.parent = this;\ + g.eval('new Debugger(parent).onExceptionUnwind = function() {};');\ + "); +function loadFile(lfVarx) { + evaluate(lfVarx); +} diff --git a/js/src/jit-test/tests/debug/bug1002797.js b/js/src/jit-test/tests/debug/bug1002797.js new file mode 100644 index 0000000000..f7cbcfccf7 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1002797.js @@ -0,0 +1,15 @@ +var lfcode = new Array(); +lfcode.push(""); +lfcode.push("0"); +lfcode.push("newGlobal(\"1\").eval(\"(new Debugger).addAllGlobalsAsDebuggees();\");\n"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file) +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) != ".js" && lfVarx.length != 1) { + evaluate(lfVarx); + } else if (!isNaN(lfVarx)) {} + } catch (lfVare) { } +} diff --git a/js/src/jit-test/tests/debug/bug1004447.js b/js/src/jit-test/tests/debug/bug1004447.js new file mode 100644 index 0000000000..18ee6757f5 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1004447.js @@ -0,0 +1,23 @@ +// Tests that earlier try notes don't interfere with later exception handling. + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.eval("(" + function () { + dbg = new Debugger(debuggeeGlobal); +} + ")();"); +var myObj = { p1: 'a', } +try { + with(myObj) { + do { + throw value; + } while(false); + } +} catch(e) { + // The above is expected to throw. +} + +try { + if(!(p1 === 1)) { } +} catch (e) { + // The above is expected to throw. +} diff --git a/js/src/jit-test/tests/debug/bug1006205.js b/js/src/jit-test/tests/debug/bug1006205.js new file mode 100644 index 0000000000..dc899523a1 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1006205.js @@ -0,0 +1,20 @@ +var lfcode = new Array(); +lfcode.push = loadFile; +lfcode.push("\ +var g = newGlobal({newCompartment: true});\ +g.debuggeeGlobal = this;\ +g.eval(\"(\" + function () {\ + dbg = new Debugger(debuggeeGlobal);\ + } + \")();\");\ +"); +lfcode.push("gc();"); +lfcode.push("\ +var g = newGlobal({newCompartment: true});\ +g.debuggeeGlobal = this;\ +g.eval(\"(\" + function () {\ + dbg = new Debugger(debuggeeGlobal);\ +} + \")();\");\ +"); +function loadFile(lfVarx) { +function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); +} diff --git a/js/src/jit-test/tests/debug/bug1006473.js b/js/src/jit-test/tests/debug/bug1006473.js new file mode 100644 index 0000000000..9eeefc2625 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1006473.js @@ -0,0 +1,19 @@ +// |jit-test| error: ReferenceError + +var lfcode = new Array(); +lfcode.push("gczeal(4);"); +lfcode.push("setJitCompilerOption('ion.warmup.trigger', 30);"); +lfcode.push("\ +var g = newGlobal({newCompartment: true});\ +g.parent = this;\ +g.eval('function f(frame, exc) { f2 = function () { return exc; }; exc = 123; }');\ +g.eval('new Debugger(parent).onExceptionUnwind = f;');\ +var obj = int8 ('oops');\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file) +} +function loadFile(lfVarx) { + evaluate(lfVarx); +} diff --git a/js/src/jit-test/tests/debug/bug1106164.js b/js/src/jit-test/tests/debug/bug1106164.js new file mode 100644 index 0000000000..7075134dda --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1106164.js @@ -0,0 +1,17 @@ +// |jit-test| error: ReferenceError +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () { };"); +evaluate("\ + var tokenCodes = {};\ + tokenCodes.continue = 0;\ + var arr = [\ + (0.E87 ), \ + ];\ + for(var reportCompare in tokenCodes) {\ + for(var p1 in arr) {\ + if(arr[j . arr ++ ] === p) {\ + }\ + }\ + }\ +", { noScriptRval : true, isRunOnce: true }); diff --git a/js/src/jit-test/tests/debug/bug1106719.js b/js/src/jit-test/tests/debug/bug1106719.js new file mode 100644 index 0000000000..dfc3d8d367 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1106719.js @@ -0,0 +1,12 @@ +// |jit-test| allow-oom; allow-unhandlable-oom; allow-overrecursed; skip-if: getBuildConfiguration("android") +// Disabled on Android due to harness problems (Bug 1532654) + +g = newGlobal({newCompartment: true}) +g.parent = this +g.eval("Debugger(parent).onExceptionUnwind=(function(){})") +gcparam("maxBytes", gcparam("gcBytes")) +function f() { + f() + y(arguments) +} +f() diff --git a/js/src/jit-test/tests/debug/bug1107525.js b/js/src/jit-test/tests/debug/bug1107525.js new file mode 100644 index 0000000000..35a5eb466f --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1107525.js @@ -0,0 +1,9 @@ +// |jit-test| error: InternalError +enableGeckoProfiling(); +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () { hits++; };"); +function f() { + var x = f(); +} +f(); diff --git a/js/src/jit-test/tests/debug/bug1107913.js b/js/src/jit-test/tests/debug/bug1107913.js new file mode 100644 index 0000000000..b1ba03ba2a --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1107913.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError + +var g = newGlobal(); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () {};"); +Object.preventExtensions(this); +evaluate("function testcase() { }", { noScriptRval : true, isRunOnce: true }); diff --git a/js/src/jit-test/tests/debug/bug1108159.js b/js/src/jit-test/tests/debug/bug1108159.js new file mode 100644 index 0000000000..916b759f88 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1108159.js @@ -0,0 +1,13 @@ +// |jit-test| slow; skip-if: helperThreadCount() === 0 + +var s = ''; +for (var i = 0; i < 70000; i++) + { + s += 'function x' + i + '() { x' + i + '(); }\n'; +} +evaluate(s); +var g = newGlobal({newCompartment: true}); +(new Debugger).addDebuggee(g); +g.offThreadCompileToStencil('debugger;',{}); +var stencil = finishOffThreadStencil(); +g.evalStencil(stencil); diff --git a/js/src/jit-test/tests/debug/bug1108556.js b/js/src/jit-test/tests/debug/bug1108556.js new file mode 100644 index 0000000000..181dbc2f99 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1108556.js @@ -0,0 +1,10 @@ +// |jit-test| error: ReferenceError + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () { hits++; };"); +evaluate('\ +var fe="v";\ +for (i=0; String.fromCharCode(0x004E); i++)\ + fe += fe;\ +', { isRunOnce: true }); diff --git a/js/src/jit-test/tests/debug/bug1109328.js b/js/src/jit-test/tests/debug/bug1109328.js new file mode 100644 index 0000000000..8bbadace22 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1109328.js @@ -0,0 +1,8 @@ +try { + gcslice(0)(""()); +} catch (e) {} +g = newGlobal({newCompartment: true}) +g.parent = this +g.eval("Debugger(parent).onExceptionUnwind=(function(){})"); +gcparam("maxBytes", gcparam("maxBytes") - 8); +gc(); diff --git a/js/src/jit-test/tests/debug/bug1109915.js b/js/src/jit-test/tests/debug/bug1109915.js new file mode 100644 index 0000000000..be93d8cd68 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1109915.js @@ -0,0 +1,17 @@ +var evalInFrame = (function (global) { + var dbgGlobal = newGlobal({newCompartment: true}); + var dbg = new dbgGlobal.Debugger(); + return function evalInFrame(upCount, code) { + dbg.addDebuggee(global); + var frame = dbg.getNewestFrame().older; + var completion = frame.eval(code); + }; +})(this); +function g1(x, args) {} +function f1(x, y, o) { + for (var i=0; i<50; i++) { + o.apply(evalInFrame(0, "x"), x); + } +} +var o1 = {apply: g1}; +assertEq(f1(3, 5, o1), undefined); diff --git a/js/src/jit-test/tests/debug/bug1109964.js b/js/src/jit-test/tests/debug/bug1109964.js new file mode 100644 index 0000000000..82b2760680 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1109964.js @@ -0,0 +1,10 @@ +var dbgGlobal = newGlobal({newCompartment: true}); +var dbg = new dbgGlobal.Debugger(); +dbg.addDebuggee(this); +function f() { + var a = arguments; + a[1]; + dbg.getNewestFrame().eval("a"); +} +f(); + diff --git a/js/src/jit-test/tests/debug/bug1111199.js b/js/src/jit-test/tests/debug/bug1111199.js new file mode 100644 index 0000000000..b7aa78d04c --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1111199.js @@ -0,0 +1,17 @@ +g = newGlobal({newCompartment: true}) +g.parent = this +g.eval("Debugger(parent).onExceptionUnwind=(function(){})") +try { +function f(code) { + n = parseInt('', 0); + return g("try{}catch(e){}", n) +} +function g(s, n) { + s2 = s + s + d = (n - (function () { + return "" + this.id + eval.id; + } )().abstract) / 2 + m = g(s2, d) +} +f("switch(''){default:break;}") +} catch(exc1) {} diff --git a/js/src/jit-test/tests/debug/bug1114587.js b/js/src/jit-test/tests/debug/bug1114587.js new file mode 100644 index 0000000000..538419b038 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1114587.js @@ -0,0 +1,26 @@ +// |jit-test| error: TypeError +var lfcode = new Array(); +lfcode.push(""); +lfcode.push(""); +lfcode.push("\ +var g = newGlobal();\ +g.debuggeeGlobal = this;\ +g.eval('(' + function () {\ + dbg = new Debugger(debuggeeGlobal);\ + dbg.onExceptionUnwind = function (frame, exc) {\ + var s = '!';\ + for (var f = frame; f; f = f.older)\ + s += f.callee.name;\ + };\ + } + ')();');\ +Debugger(17) = this;\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file) +} +function loadFile(lfVarx) { + if (lfVarx.substr(-3) != ".js" && lfVarx.length != 1) { + function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); + } +} diff --git a/js/src/jit-test/tests/debug/bug1116103.js b/js/src/jit-test/tests/debug/bug1116103.js new file mode 100644 index 0000000000..63703e77a2 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1116103.js @@ -0,0 +1,11 @@ +// |jit-test| error: ReferenceError + +evaluate(` + var g = newGlobal({newCompartment: true}); + g.parent = this; + g.eval('new Debugger(parent).onExceptionUnwind = function() {};'); +`) +{ + while (x && 0) {} + let x +} diff --git a/js/src/jit-test/tests/debug/bug1118878.js b/js/src/jit-test/tests/debug/bug1118878.js new file mode 100644 index 0000000000..26dcc68382 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1118878.js @@ -0,0 +1,11 @@ + +var evalInFrame = (function (global) { + var dbgGlobal = newGlobal({newCompartment: true}); + var dbg = new dbgGlobal.Debugger(); + return function evalInFrame(upCount, code) { + dbg.addDebuggee(global); + var frame = dbg.getNewestFrame().older; + var completion = frame.eval(code); + }; +})(this); +evaluate("for (var k in 'xxx') (function g() { Math.atan2(42); evalInFrame((0), (''), true); })();", { noScriptRval : true, isRunOnce : true }); diff --git a/js/src/jit-test/tests/debug/bug1121083.js b/js/src/jit-test/tests/debug/bug1121083.js new file mode 100644 index 0000000000..1c6d65a163 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1121083.js @@ -0,0 +1,15 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") + +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("Debugger(parent).onExceptionUnwind = function () {};"); + +function f(x) { + if (x === 0) { + return; + } + f(x - 1); + f(x - 1); +} +timeout(0.00001); +f(100); diff --git a/js/src/jit-test/tests/debug/bug1130768.js b/js/src/jit-test/tests/debug/bug1130768.js new file mode 100644 index 0000000000..64f1a7c0cc --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1130768.js @@ -0,0 +1,12 @@ +// |jit-test| error:foo +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("(" + function() { + var dbg = new Debugger(parent); + count = 0; + dbg.onExceptionUnwind = function(frame) { + frame.onPop = function() { if (count++ < 30) frame.eval("x = 3"); }; + }; +} + ")()"); +Object.defineProperty(this, "x", {set: [].map}); +throw "foo"; diff --git a/js/src/jit-test/tests/debug/bug1133196.js b/js/src/jit-test/tests/debug/bug1133196.js new file mode 100644 index 0000000000..60d963a8bc --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1133196.js @@ -0,0 +1,16 @@ +// |jit-test| error: TypeError + +var g = newGlobal(); +g.parent = this; +g.eval("(" + function() { + var dbg = new Debugger(parent); + dbg.onExceptionUnwind = function(frame) { + frame.older.onStep = function() {} + }; +} + ")()"); +function f() { + (function inner(arr) { + inner(arr.map); + })([]); +} +f(); diff --git a/js/src/jit-test/tests/debug/bug1147939.js b/js/src/jit-test/tests/debug/bug1147939.js new file mode 100644 index 0000000000..a2bd2cf798 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1147939.js @@ -0,0 +1,8 @@ +// |jit-test| error: TypeError +var g = newGlobal(); +g.debuggeeGlobal = this; +g.eval("(" + function () { + dbg = new Debugger(debuggeeGlobal); + dbg.onExceptionUnwind = Map; +} + ")();"); +throw new Error("oops"); diff --git a/js/src/jit-test/tests/debug/bug1148917.js b/js/src/jit-test/tests/debug/bug1148917.js new file mode 100644 index 0000000000..2645f913f3 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1148917.js @@ -0,0 +1,14 @@ +// |jit-test| error: Error + +var g = newGlobal(); +g.eval('function f(a) { evaluate("f(" + " - 1);", {newContext: true}); }'); +var dbg = new Debugger(g); +var frames = []; +dbg.onEnterFrame = function (frame) { + if (frames.length == 3) + return; + frames.push(frame); + for (var f of frames) + f.eval('a').return +}; +g.f(); diff --git a/js/src/jit-test/tests/debug/bug1160182.js b/js/src/jit-test/tests/debug/bug1160182.js new file mode 100644 index 0000000000..d4471a42f2 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1160182.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: isLcovEnabled() + +var g = newGlobal({newCompartment: true}); +g.eval("(" + function() { + var o = {get x() {}}; + this.method = Object.getOwnPropertyDescriptor(o, "x").get; + assertEq(isLazyFunction(method), true); +} + ")()"); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +var scripts = dbg.findScripts(); +var methodv = gw.makeDebuggeeValue(g.method); +assertEq(scripts.indexOf(methodv.script) != -1, true); diff --git a/js/src/jit-test/tests/debug/bug1161332.js b/js/src/jit-test/tests/debug/bug1161332.js new file mode 100644 index 0000000000..2b8f371495 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1161332.js @@ -0,0 +1,16 @@ +// |jit-test| error: Error + +var g = newGlobal(); +g.eval('function f(a) { if (a == 1) debugger; evaluate("f(" + a + " - 1);"); }'); +var N = 2; +var dbg = new Debugger(g); +var frames = []; +dbg.onEnterFrame = function (frame) { + frames.push(frame); + frame.onPop = function () { assertEq(frame.onPop, frame.onPop); }; +}; +dbg.onDebuggerStatement = function (frame) { + for (var f of frames) + f.eval('a').return; +}; +evaluate("g.f(N);"); diff --git a/js/src/jit-test/tests/debug/bug1188334.js b/js/src/jit-test/tests/debug/bug1188334.js new file mode 100644 index 0000000000..546fe71aa6 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1188334.js @@ -0,0 +1,18 @@ +var evalInFrame = (function (global) { + var dbgGlobal = newGlobal({newCompartment: true}); + var dbg = new dbgGlobal.Debugger(); + return function evalInFrame(upCount, code) { + dbg.addDebuggee(global); + var frame = dbg.getNewestFrame().older; + var completion = frame.eval(code); + }; +})(this); +function* f() { + { + let {} = "xxx"; + yield evalInFrame(0, "x"); + } +} +var gen = f(); +gen.next() + diff --git a/js/src/jit-test/tests/debug/bug1191499.js b/js/src/jit-test/tests/debug/bug1191499.js new file mode 100644 index 0000000000..4cd59267f9 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1191499.js @@ -0,0 +1,17 @@ + +setJitCompilerOption('ion.warmup.trigger', 2); +setJitCompilerOption('offthread-compilation.enable', 0); +var g = newGlobal({newCompartment: true}); +var dbg2 = new Debugger; +g.toggle = function toggle(x, d) { + if (d) { + dbg2.addDebuggee(g); + dbg2.getNewestFrame().environment.getVariable("x"); + } +}; +g.eval("" + function f(x, d) { toggle(++arguments, d); }); +g.eval("(" + function test() { + for (var i = 0; i < 30; i++) + f(42, false); + f(42, true); +} + ")();"); diff --git a/js/src/jit-test/tests/debug/bug1216261.js b/js/src/jit-test/tests/debug/bug1216261.js new file mode 100644 index 0000000000..0d98327256 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1216261.js @@ -0,0 +1,12 @@ +// |jit-test| exitstatus: 3; skip-if: !('oomAfterAllocations' in this) + +var g = newGlobal(); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function(frame) { + oomAfterAllocations(5); + // OOMs here, and possibly again in the error reporter when trying to + // report the OOM, so the shell just exits with code 3. + frame.older.eval("escaped = function() { return y }"); +} +g.eval("function h() { debugger }"); +g.eval("(function () { var y = {p:42}; h(); yield })().next();"); diff --git a/js/src/jit-test/tests/debug/bug1219905.js b/js/src/jit-test/tests/debug/bug1219905.js new file mode 100644 index 0000000000..5ed51a2423 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1219905.js @@ -0,0 +1,11 @@ +// |jit-test| allow-oom; skip-if: !('oomTest' in this) + +// We need allow-oom here because the debugger reports an uncaught exception if +// it hits OOM calling the exception unwind hook. This causes the shell to exit +// with the OOM reason. + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function() {}"); +let finished = false; +oomTest(() => l, false); diff --git a/js/src/jit-test/tests/debug/bug1221378.js b/js/src/jit-test/tests/debug/bug1221378.js new file mode 100644 index 0000000000..d8e6781dff --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1221378.js @@ -0,0 +1,11 @@ +// Bug 1221378: allocating an array from within the object metadata callback +// shouldn't cause re-entrant resolution of lazy prototypes. + +// To test for this regression, we need some way to make the code that collects +// metadata about object allocations allocate an Array. Presently, +// enableShellObjectMetadataCallback installs a callback that does this, but if +// that hook gets removed (in production there's only ever one callback we +// actually use), then the ability to make whatever metadata collection code +// remains allocate an Array will cover this regression. For example, it could +// be a flag that one can only set in debug builds from TestingFunctions.cpp. +newGlobal().eval('enableShellAllocationMetadataBuilder(); Array'); diff --git a/js/src/jit-test/tests/debug/bug1232655.js b/js/src/jit-test/tests/debug/bug1232655.js new file mode 100644 index 0000000000..c849465b4e --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1232655.js @@ -0,0 +1,5 @@ +g = newGlobal({newCompartment: true}); +g.log = ""; +Debugger(g).onDebuggerStatement = frame => frame.eval("log += this.Math.toString();"); +g.eval("(function() { with ({}) debugger })()"); +assertEq(g.log, "[object Math]"); diff --git a/js/src/jit-test/tests/debug/bug1240546.js b/js/src/jit-test/tests/debug/bug1240546.js new file mode 100644 index 0000000000..6d548d8b92 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1240546.js @@ -0,0 +1,9 @@ +// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this) + +var g = newGlobal(); +g.debuggeeGlobal = this; +g.eval("(" + function() { + oomAfterAllocations(100); + var dbg = Debugger(debuggeeGlobal); + dbg.onEnterFrame = function(frame) {} +} + ")()"); diff --git a/js/src/jit-test/tests/debug/bug1240803.js b/js/src/jit-test/tests/debug/bug1240803.js new file mode 100644 index 0000000000..ab1e0fb641 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1240803.js @@ -0,0 +1,20 @@ +// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this) + +(function() { + g = newGlobal({newCompartment: true}) + dbg = new Debugger + g.toggle = function(d) { + if (d) { + dbg.addDebuggee(g); + dbg.getNewestFrame(); + oomAfterAllocations(2); + setBreakpoint; + } + } + g.eval("" + function f(d) { return toggle(d); }) + g.eval("(" + function() { + f(false); + f(true); + } + ")()") +})(); + diff --git a/js/src/jit-test/tests/debug/bug1242111.js b/js/src/jit-test/tests/debug/bug1242111.js new file mode 100644 index 0000000000..dae0efcdab --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1242111.js @@ -0,0 +1,8 @@ +// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this) + +var g = newGlobal(); +g.debuggeeGlobal = []; +g.eval("(" + function() { + oomAfterAllocations(57); + Debugger(debuggeeGlobal).onEnterFrame = function() {} +} + ")()"); diff --git a/js/src/jit-test/tests/debug/bug1242798.js b/js/src/jit-test/tests/debug/bug1242798.js new file mode 100644 index 0000000000..38a4780a9d --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1242798.js @@ -0,0 +1,14 @@ + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +g.eval("" + function f(c) { + if (c == 0) + return; + if (c == 2) + debugger; + f(c-1); + for (var i = 0; i < 100; i++) + Debugger += newGlobal('#15: myObj.parseFloat !== parseFloat'); +}); +dbg.onDebuggerStatement = function (frame) {}; +g.eval("f(2)"); diff --git a/js/src/jit-test/tests/debug/bug1245862.js b/js/src/jit-test/tests/debug/bug1245862.js new file mode 100644 index 0000000000..274903bc40 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1245862.js @@ -0,0 +1,22 @@ +// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this) + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +g.h = function h(d) { + if (d) { + dbg.addDebuggee(g); + var f = dbg.getNewestFrame().older; + f.st_p1((oomAfterAllocations(10)) + "foo = 'string of 42'"); + } +} +g.eval("" + function f(d) { + g(d); +}); +g.eval("" + function g(d) { + h(d); +}); +g.eval("(" + function () { + for (i = 0; i < 5; i++) + f(false); + assertEq(f(true), "string of 42"); +} + ")();"); diff --git a/js/src/jit-test/tests/debug/bug1246605.js b/js/src/jit-test/tests/debug/bug1246605.js new file mode 100644 index 0000000000..5bf873ee5f --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1246605.js @@ -0,0 +1,13 @@ +g = newGlobal({newCompartment: true}); +dbg = Debugger(g); +dbg.onNewScript = function(script) { fscript = script.getChildScripts()[0]; } +g.eval("function f() { arguments[0]; }"); +var hitBreakpoint = false; +fscript.setBreakpoint(0, { + hit: function() { + getBacktrace({ args: 1 }); + hitBreakpoint = true; + } +}); +g.f(""); +assertEq(hitBreakpoint, true); diff --git a/js/src/jit-test/tests/debug/bug1251919.js b/js/src/jit-test/tests/debug/bug1251919.js new file mode 100644 index 0000000000..79fd05f890 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1251919.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// jsfunfuzz-generated +fullcompartmentchecks(true); +// Adapted from randomly chosen test: js/src/jit-test/tests/debug/bug-1248162.js +var dbg = new Debugger; +dbg.onNewGlobalObject = function() {}; +oomTest(function() { + newGlobal({sameZoneAs: this}); +}) diff --git a/js/src/jit-test/tests/debug/bug1252453.js b/js/src/jit-test/tests/debug/bug1252453.js new file mode 100644 index 0000000000..626d9be624 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1252453.js @@ -0,0 +1,21 @@ +// |jit-test| --no-threads + +lfcode = new Array(); +gczeal(8,2); +lfcode.push(` +const root = newGlobal(); +const dbg = new Debugger; +const wrappedRoot = dbg.addDebuggee(root); +dbg.memory.trackingAllocationSites = 1; +root.eval("(" + function immediate() { '_' << foo } + "())"); +`); +file = lfcode.shift(); +loadFile(file); +function loadFile(lfVarx) { + try { + function newFunc(x) { return Function(x)(); } + newFunc(lfVarx)(); + } catch (lfVare) { + print(lfVare) + } +} diff --git a/js/src/jit-test/tests/debug/bug1252464.js b/js/src/jit-test/tests/debug/bug1252464.js new file mode 100644 index 0000000000..e93e5ec32f --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1252464.js @@ -0,0 +1,15 @@ +// |jit-test| error: ReferenceError + +g = newGlobal({newCompartment: true}); +dbg = Debugger(g); +hits = 0; +dbg.onNewScript = function () { return hits++; }; +assertEq(g.eval("eval('2 + 3')"), 5); +this.gczeal(hits,1); +dbg = Debugger(g); +g.h = function () { + var env = dbg.getNewestFrame().environment; + dbg = 0; + assertThrowsInstanceOf; +} +g.eval("h()"); diff --git a/js/src/jit-test/tests/debug/bug1253246.js b/js/src/jit-test/tests/debug/bug1253246.js new file mode 100644 index 0000000000..c7ab843419 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1253246.js @@ -0,0 +1,5 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +dbg.onDebuggerStatement = (frame) => { frame.eval("c = 42;"); }; +g.evalReturningScope("'use strict'; debugger;"); diff --git a/js/src/jit-test/tests/debug/bug1254123.js b/js/src/jit-test/tests/debug/bug1254123.js new file mode 100644 index 0000000000..72f36ef3ec --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1254123.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: !('oomTest' in this) + +evaluate(` +function ERROR(msg) { + throw new Error("boom"); +} +for (var i = 0; i < 9; ++ i) { + var dbg = new Debugger; + dbg.onNewGlobalObject = ERROR; +} +oomTest(function() { + newGlobal({sameZoneAs: this}); +}) +`); diff --git a/js/src/jit-test/tests/debug/bug1254190.js b/js/src/jit-test/tests/debug/bug1254190.js new file mode 100644 index 0000000000..3d3572b469 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1254190.js @@ -0,0 +1,12 @@ +// |jit-test| slow; skip-if: !('oomTest' in this); allow-oom + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onNewScript = function (s) { + log += dbg.findScripts({ source: s.source }).length; +} +log = ""; +oomTest(() => { + var static = newGlobal({sameZoneAs: this}); + g.eval("(function() {})()"); +}); diff --git a/js/src/jit-test/tests/debug/bug1254578.js b/js/src/jit-test/tests/debug/bug1254578.js new file mode 100644 index 0000000000..f36bcef601 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1254578.js @@ -0,0 +1,19 @@ +// |jit-test| slow; skip-if: !('oomTest' in this) + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.eval("(" + function() { + dbg = new Debugger(debuggeeGlobal); + dbg.onExceptionUnwind = function(frame, exc) { + var s = '!'; + for (var f = frame; f; f = f.older) + debuggeeGlobal.log += s; + }; +} + ")();"); +var dbg = new Debugger; +dbg.onNewGlobalObject = function(global) { + get.seen = true; +}; +oomTest(function() { + newGlobal({sameZoneAs: this}) +}); diff --git a/js/src/jit-test/tests/debug/bug1257045.js b/js/src/jit-test/tests/debug/bug1257045.js new file mode 100644 index 0000000000..15b33288c8 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1257045.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() + +fullcompartmentchecks(true); +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onNewScript = (function(script) { + s = script; +}) +g.eval(`new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func) (export "" (func 0)))')));`); +s.source; diff --git a/js/src/jit-test/tests/debug/bug1263899.js b/js/src/jit-test/tests/debug/bug1263899.js new file mode 100644 index 0000000000..5392b89603 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1263899.js @@ -0,0 +1,30 @@ +try { + evaluate(` + function runTestCase() $ERROR() + function $ERROR() { + throw Error + } + Object.defineProperty(this, "x", { value: 0 }); + setJitCompilerOption("baseline.warmup.trigger", 0); + setJitCompilerOption("ion.warmup.trigger", 0) + `) + evaluate(`function f() {} f(x)`) + runTestCase() +} catch (exc) {} +evaluate(` + g = newGlobal({newCompartment: true}) + g.parent = this + g.eval("(" + function() { + Debugger(parent).onExceptionUnwind = function(frame) { + frame.older + } + } + ")()") + try { $ERROR() } catch(e){} +`) +try { +evaluate(` + x ^= null; + if (x = 1) + $ERROR() +`); +} catch(e) {} diff --git a/js/src/jit-test/tests/debug/bug1264961.js b/js/src/jit-test/tests/debug/bug1264961.js new file mode 100644 index 0000000000..c43a29504d --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1264961.js @@ -0,0 +1,23 @@ +// |jit-test| slow; skip-if: !('oomTest' in this) + +loadFile(` + var o = {} + var global = this; + var p = new Proxy(o, { + "deleteProperty": function (await , key) { + var g = newGlobal({sameZoneAs: this}); + g.parent = global; + g.eval("var dbg = new Debugger(parent); dbg.onEnterFrame = function(frame) {};"); + } + }) + for (var i=0; i<100; i++); + assertEq(delete p.foo, true); +`); +function loadFile(lfVarx) { + var k = 0; + oomTest(function() { + // In practice a crash occurs before iteration 4000. + if (k++ <= 4000) + eval(lfVarx); + }, {expectExceptionOnFailure: false}); +} diff --git a/js/src/jit-test/tests/debug/bug1266434.js b/js/src/jit-test/tests/debug/bug1266434.js new file mode 100644 index 0000000000..34a59dac26 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1266434.js @@ -0,0 +1,8 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var g = newGlobal({newCompartment: true}); +g.evaluate("function f(x) { return x + 1; }"); +var gw = dbg.addDebuggee(g); +gczeal(2, 1); +var s = dbg.findScripts(); +gczeal(0); diff --git a/js/src/jit-test/tests/debug/bug1272908.js b/js/src/jit-test/tests/debug/bug1272908.js new file mode 100644 index 0000000000..b1e1c5aeaf --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1272908.js @@ -0,0 +1,19 @@ +// |jit-test| slow; skip-if: !('oomTest' in this) + +// Adapted from randomly chosen test: js/src/jit-test/tests/modules/bug-1233915.js +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("(" + function() { + Debugger(parent).onExceptionUnwind = function(frame) { + frame.eval("") + } } + ")()"); +// Adapted from randomly chosen test: js/src/jit-test/tests/debug/bug1254123.js +function ERROR(msg) { + throw new Error("boom"); +} +var dbg = new Debugger; +dbg.onNewGlobalObject = ERROR; +oomTest(function() { + newGlobal({sameZoneAs: this}); +}) + diff --git a/js/src/jit-test/tests/debug/bug1275001.js b/js/src/jit-test/tests/debug/bug1275001.js new file mode 100644 index 0000000000..52e3a1fc0d --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1275001.js @@ -0,0 +1,30 @@ + +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("(" + function() { + Debugger(parent).onExceptionUnwind = function(frame) { + frame.older + } +} + ")()") +function check_one(expected, f, err) { + try { + f() + } catch (ex) { + s = ex.message; + assertEq(s.includes("undefined"), true); + } +} +ieval = eval +function check(expr, expected = expr) { + var end, err + for ([end, err] of[[".random_prop", ` is undefined` ]]) + statement = "o = {};" + expr + end; + cases = [ + function() { return ieval("var undef;" + statement); }, + Function(statement) + ] + for (f of cases) + check_one(expected, f, err) +} +check("undef"); +check("o.b"); diff --git a/js/src/jit-test/tests/debug/bug1282741.js b/js/src/jit-test/tests/debug/bug1282741.js new file mode 100644 index 0000000000..9e75495f58 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1282741.js @@ -0,0 +1,28 @@ + +function removeAdd(dbg, g) { + dbg.removeDebuggee(g); + dbg.addDebuggee(g); + switch (dbg.removeDebuggee(g)) {} +} +function newGlobalDebuggerPair(toggleSeq) { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + dbg.addDebuggee(g); + g.eval("" + function f() { + for (var i = 0; i < 100; i++) interruptIf(i == 95); + }); + setInterruptCallback(function() { + return true; + }); + return [g, dbg]; +} +function testEpilogue(toggleSeq) { + var [g, dbg] = newGlobalDebuggerPair(toggleSeq); + dbg.onEnterFrame = function(f) { + f.onPop = function() { + toggleSeq(dbg, g); + } + }; + g.f() +} +testEpilogue(removeAdd); diff --git a/js/src/jit-test/tests/debug/bug1299121.js b/js/src/jit-test/tests/debug/bug1299121.js new file mode 100644 index 0000000000..95df524cb0 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1299121.js @@ -0,0 +1,10 @@ +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("(" + function() { + var dbg = new Debugger(parent); + dbg.onExceptionUnwind = function(frame) { + frame.eval("h = 3"); + }; +} + ")()"); +g = function h() { } +g(); diff --git a/js/src/jit-test/tests/debug/bug1300517.js b/js/src/jit-test/tests/debug/bug1300517.js new file mode 100644 index 0000000000..7ea07a0c74 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1300517.js @@ -0,0 +1,12 @@ +// |jit-test| error: ReferenceError +g = newGlobal({newCompartment: true}); +g.log *= ""; +Debugger(g).onDebuggerStatement = frame => frame.eval("log += this.Math.toString();"); +let forceException = g.eval(` + (class extends class {} { + constructor() { + debugger; + } + }) +`); +new forceException; diff --git a/js/src/jit-test/tests/debug/bug1300528.js b/js/src/jit-test/tests/debug/bug1300528.js new file mode 100644 index 0000000000..b555c96cdb --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1300528.js @@ -0,0 +1,34 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +load(libdir + "asserts.js"); + +function BigInteger(a, b, c) {} +function montConvert(x) { + var r = new BigInteger(null); + return r; +} +var ba = new Array(); +a = new BigInteger(ba); +g = montConvert(a); +var lfGlobal = newGlobal({newCompartment: true}); +for (lfLocal in this) { + if (!(lfLocal in lfGlobal)) { + lfGlobal[lfLocal] = this[lfLocal]; + } +} +lfGlobal.offThreadCompileToStencil(` + var dbg = new Debugger(g); + dbg.onEnterFrame = function (frame) { + var frameThis = frame.this; + } +`); +var stencil = lfGlobal.finishOffThreadStencil(); +lfGlobal.evalStencil(stencil); +assertThrowsInstanceOf(test, ReferenceError); +function test() { + function check(fun, msg, todo) { + success = fun(); + } + check(() => Object.getPrototypeOf(view) == Object.getPrototypeOf(simple)); + typeof this; +} diff --git a/js/src/jit-test/tests/debug/bug1302432.js b/js/src/jit-test/tests/debug/bug1302432.js new file mode 100644 index 0000000000..2cd5678993 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1302432.js @@ -0,0 +1,11 @@ +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption('ion.warmup.trigger', 0); +gczeal(7, 1); +var dbgGlobal = newGlobal({newCompartment: true}); +var dbg = new dbgGlobal.Debugger(); +dbg.addDebuggee(this); +function f(x, await = () => Array.isArray(revocable.proxy), ...get) { + dbg.getNewestFrame().older.eval("print(a)"); +} +function a() {} +for (var i = 0; i < 10; i++) f(); diff --git a/js/src/jit-test/tests/debug/bug1304553.js b/js/src/jit-test/tests/debug/bug1304553.js new file mode 100644 index 0000000000..2ac24954e3 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1304553.js @@ -0,0 +1,21 @@ +var dbgGlobal = newGlobal({newCompartment: true}); +var dbg = new dbgGlobal.Debugger(); +dbg.addDebuggee(this); +function evalInFrame() { + var frame = dbg.getNewestFrame().older.older; + frame.eval("1"); +}; +var actual = ''; +try { + function f() { + evalInFrame(); + } +} catch (e) {} +let m = parseModule(` + actual = ''; + for (var i = 0; i < 1; ++i) + f(i); + actual; + `); +moduleLink(m); +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/debug/bug1308578.js b/js/src/jit-test/tests/debug/bug1308578.js new file mode 100644 index 0000000000..20df304eac --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1308578.js @@ -0,0 +1,10 @@ +// |jit-test| error: ReferenceError + +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () {}"); +a = new class extends Array { + constructor() { + for (;; ([] = p)) {} + } +} diff --git a/js/src/jit-test/tests/debug/bug1330339.js b/js/src/jit-test/tests/debug/bug1330339.js new file mode 100644 index 0000000000..4654a93fae --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1330339.js @@ -0,0 +1,36 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; error: TestComplete + +if (!wasmDebuggingEnabled()) + throw "TestComplete"; + +let module = new WebAssembly.Module(wasmTextToBinary(` + (module + (import "global" "func" (func)) + (func (export "test") + call 0 ;; calls the import, which is func #0 + ) + ) +`)); + +let imports = { + global: { + func: function () { + let g = newGlobal({newCompartment: true}); + let dbg = new Debugger(g); + dbg.onExceptionUnwind = function (frame) { + frame.older; + }; + g.eval("throw new Error();"); + } + } +}; +let instance = new WebAssembly.Instance(module, imports); + +try { + instance.exports.test(); + assertEq(false, true); +} catch (e) { + assertEq(e.constructor.name, 'Error'); +} + +throw "TestComplete"; diff --git a/js/src/jit-test/tests/debug/bug1330489-sps.js b/js/src/jit-test/tests/debug/bug1330489-sps.js new file mode 100644 index 0000000000..1114f40425 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1330489-sps.js @@ -0,0 +1,44 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; error: TestComplete + +load(libdir + "asserts.js"); + +if (!wasmDebuggingEnabled()) + throw "TestComplete"; + +// Single-step profiling currently only works in the ARM simulator +if (!getBuildConfiguration("arm-simulator")) + throw "TestComplete"; + +enableGeckoProfiling(); +enableSingleStepProfiling(); + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("Debugger(parent).onExceptionUnwind = function () {};"); + +let module = new WebAssembly.Module(wasmTextToBinary(` + (module + (import "a" "b" (func $imp (result i32))) + (memory 1 1) + (table 2 2 funcref) + (elem (i32.const 0) $imp $def) + (func $def (result i32) (i32.load (i32.const 0))) + (type $v2i (func (result i32))) + (func $call (param i32) (result i32) (call_indirect (type $v2i) (local.get 0))) + (export "call" (func $call)) + ) +`)); + +let instance = new WebAssembly.Instance(module, { + a: { b: function () { throw "test"; } } +}); + +try { + instance.exports.call(0); + assertEq(false, true); +} catch (e) { + assertEq(e, "test"); +} + +disableGeckoProfiling(); +throw "TestComplete"; diff --git a/js/src/jit-test/tests/debug/bug1330489.js b/js/src/jit-test/tests/debug/bug1330489.js new file mode 100644 index 0000000000..cf8d55e9dd --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1330489.js @@ -0,0 +1,36 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; error: TestComplete + +load(libdir + "asserts.js"); + +if (!wasmDebuggingEnabled()) + throw "TestComplete"; + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("Debugger(parent).onExceptionUnwind = function () {};"); + +let module = new WebAssembly.Module(wasmTextToBinary(` + (module + (import "a" "b" (func $imp (result i32))) + (memory 1 1) + (table 2 2 funcref) + (elem (i32.const 0) $imp $def) + (func $def (result i32) (i32.load (i32.const 0))) + (type $v2i (func (result i32))) + (func $call (param i32) (result i32) (call_indirect (type $v2i) (local.get 0))) + (export "call" (func $call)) + ) +`)); + +let instance = new WebAssembly.Instance(module, { + a: { b: function () { throw "test"; } } +}); + +try { + instance.exports.call(0); + assertEq(false, true); +} catch (e) { + assertEq(e, "test"); +} + +throw "TestComplete"; diff --git a/js/src/jit-test/tests/debug/bug1330491.js b/js/src/jit-test/tests/debug/bug1330491.js new file mode 100644 index 0000000000..7fff829ab0 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1330491.js @@ -0,0 +1,21 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; error: TestComplete + +if (!wasmDebuggingEnabled()) + throw "TestComplete"; + +(function createShortLivedDebugger() { + var g = newGlobal({newCompartment: true}); + g.debuggeeGlobal = this; + g.eval("(" + function () { + dbg = new Debugger(debuggeeGlobal); + } + ")();"); +})(); + +let module = new WebAssembly.Module(wasmTextToBinary('(module (func))')); +new WebAssembly.Instance(module); + +gcslice(1000000); + +new WebAssembly.Instance(module); + +throw "TestComplete"; diff --git a/js/src/jit-test/tests/debug/bug1331064.js b/js/src/jit-test/tests/debug/bug1331064.js new file mode 100644 index 0000000000..4ade2305b1 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1331064.js @@ -0,0 +1,19 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; exitstatus: 3; skip-if: !wasmDebuggingEnabled() + +load(libdir + "asserts.js"); + +var g = newGlobal(); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () { some_error; };"); + +var module = new WebAssembly.Module(wasmTextToBinary(` +(module + (import $imp "a" "b" (result i32)) + (func $call (result i32) (call 0)) + (export "call" $call) +)`)); + +var instance = new WebAssembly.Instance(module, { a: { b: () => { + some_other_error; +}}}); +instance.exports.call(); diff --git a/js/src/jit-test/tests/debug/bug1331592.js b/js/src/jit-test/tests/debug/bug1331592.js new file mode 100644 index 0000000000..6282083de2 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1331592.js @@ -0,0 +1,28 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; error: TestComplete + +if (!wasmDebuggingEnabled()) + throw "TestComplete"; + +var module = new WebAssembly.Module(wasmTextToBinary(` + (module + (import "global" "func" (func (result i32))) + (func (export "func_0") (result i32) + call 0 ;; calls the import, which is func #0 + ) + ) +`)); + +var dbg; +(function (global) { + var dbgGlobal = newGlobal({newCompartment: true}); + dbg = new dbgGlobal.Debugger(); + dbg.addDebuggee(global); +})(this); + +var instance = new WebAssembly.Instance(module, { global: { func: () => { + var frame = dbg.getNewestFrame().older; + frame.eval("some_error"); +}}}); +instance.exports.func_0(); + +throw "TestComplete"; diff --git a/js/src/jit-test/tests/debug/bug1332493.js b/js/src/jit-test/tests/debug/bug1332493.js new file mode 100644 index 0000000000..5b3ce5dda2 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1332493.js @@ -0,0 +1,14 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; exitstatus: 3; skip-if: !wasmDebuggingEnabled() +// Checking in debug frame is initialized properly during stack overflow. + +var dbg; +(function () { dbg = new (newGlobal().Debugger)(this); })(); + +var m = new WebAssembly.Module(wasmTextToBinary(`(module + (import "a" "b" (result f64)) + ;; function that allocated large space for locals on the stack + (func (export "f") ${Array(200).join("(param f64)")} (result f64) (call 0)) +)`)); +var f = () => i.exports.f(); +var i = new WebAssembly.Instance(m, {a: {b: f}}); +f(); diff --git a/js/src/jit-test/tests/debug/bug1343579.js b/js/src/jit-test/tests/debug/bug1343579.js new file mode 100644 index 0000000000..3cefa8b056 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1343579.js @@ -0,0 +1,26 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() +// Checking if Debugger.Script.isInCatchScope return false for wasm. + +load(libdir + "wasm.js"); + +var results; +wasmRunWithDebugger( + '(module (memory 1) ' + + '(func $func0 i32.const 1000000 i32.load drop) ' + + '(func (export "test") call $func0))', + undefined, + function ({dbg, wasmScript}) { + results = []; + dbg.onExceptionUnwind = function (frame, value) { + if (frame.type != 'wasmcall') return; + var result = wasmScript.isInCatchScope(frame.offset); + results.push(result); + }; + }, + function ({error}) { + assertEq(error !== undefined, true); + assertEq(results.length, 2); + assertEq(results[0], false); + assertEq(results[1], false); + } +); diff --git a/js/src/jit-test/tests/debug/bug1351059.js b/js/src/jit-test/tests/debug/bug1351059.js new file mode 100644 index 0000000000..c21595e6f3 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1351059.js @@ -0,0 +1,22 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() + +// Tests that onEnterFrame events are enabled when Debugger callbacks set +// before Instance creation. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.onEnterFrameCalled = false; +g.eval(` + var dbg = new Debugger(parent); + dbg.onEnterFrame = frame => { + onEnterFrameCalled = true; + }; +`); +var i = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` + (module (func (export "f"))) +`))); +i.exports.f(); + +assertEq(g.onEnterFrameCalled, true); diff --git a/js/src/jit-test/tests/debug/bug1353356.js b/js/src/jit-test/tests/debug/bug1353356.js new file mode 100644 index 0000000000..3641f835da --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1353356.js @@ -0,0 +1,65 @@ +// |jit-test| allow-oom; --fuzzing-safe + +var lfLogBuffer = ` +//corefuzz-dcd-endofdata +//corefuzz-dcd-endofdata +//corefuzz-dcd-endofdata + setJitCompilerOption("ion.warmup.trigger", 4); + var g = newGlobal(); + g.debuggeeGlobal = this; + g.eval("(" + function () { + dbg = new Debugger(debuggeeGlobal); + dbg.onExceptionUnwind = function (frame, exc) { + var s = '!'; + for (var f = frame; f; f = f.older) + debuggeeGlobal.log += s; + }; + } + ")();"); + j('Number.prototype.toString.call([])'); +//corefuzz-dcd-endofdata +//corefuzz-dcd-endofdata +//corefuzz-dcd-endofdata +//corefuzz-dcd-selectmode 4 +//corefuzz-dcd-endofdata +} +//corefuzz-dcd-endofdata +//corefuzz-dcd-selectmode 5 +//corefuzz-dcd-endofdata +oomTest(() => i({ + new : (true ), + thisprops: true +})); +`; +lfLogBuffer = lfLogBuffer.split('\n'); +var lfRunTypeId = -1; +var lfCodeBuffer = ""; +while (true) { + var line = lfLogBuffer.shift(); + if (line == null) { + break; + } else if (line == "//corefuzz-dcd-endofdata") { + loadFile(lfCodeBuffer); + lfCodeBuffer = ""; + loadFile(line); + } else { + lfCodeBuffer += line + "\n"; + } +} +if (lfCodeBuffer) loadFile(lfCodeBuffer); +function loadFile(lfVarx) { + try { + if (lfVarx.indexOf("//corefuzz-dcd-selectmode ") === 0) { + lfRunTypeId = parseInt(lfVarx.split(" ")[1]) % 6; + } else { + switch (lfRunTypeId) { + case 4: + oomTest(function() { + let m = parseModule(lfVarx); + }); + break; + default: + evaluate(lfVarx); + } + } + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/debug/bug1363233.js b/js/src/jit-test/tests/debug/bug1363233.js new file mode 100644 index 0000000000..feacc65aff --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1363233.js @@ -0,0 +1,14 @@ +// |jit-test| error: SyntaxError; +g = newGlobal({newCompartment: true}); +dbg = new Debugger; +setInterruptCallback(function () { + dbg.addDebuggee(g); + dbg.getNewestFrame(); + return true; +}); +g.eval("" + function f() { + for (var i = 0; i < 1; evaluate("class h { constructor() {} }")) { + interruptIf(1); + } +}); +g.f(); diff --git a/js/src/jit-test/tests/debug/bug1368736.js b/js/src/jit-test/tests/debug/bug1368736.js new file mode 100644 index 0000000000..f4495822e2 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1368736.js @@ -0,0 +1,19 @@ +g = newGlobal({newCompartment: true}); +hits = 0; +Debugger(g).onDebuggerStatement = function(frame) { + // Set a breakpoint at the JSOP_AFTERYIELD op. + frame.script.setBreakpoint(120, {hit: function() { hits++; }}); +} +g.eval(` +function* range() { + eval(""); + debugger; + for (var i = 0; i < 3; i++) { + yield i; + } +} +var iter = range(); +for (var i = 0; i < 3; i++) + assertEq(iter.next().value, i); +`); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/bug1370905.js b/js/src/jit-test/tests/debug/bug1370905.js new file mode 100644 index 0000000000..8f8143132e --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1370905.js @@ -0,0 +1,15 @@ +// |jit-test| allow-oom; skip-if: !('oomTest' in this) + +function x() { + var global = newGlobal({sameZoneAs: this}); + global.eval('function f() { debugger; }'); + var debug = new Debugger(global); + var foo; + debug.onDebuggerStatement = function(frame) { + foo = frame.arguments[0]; + return null; + }; + global.eval('f(0)'); +} + +oomTest(x, false); diff --git a/js/src/jit-test/tests/debug/bug1375447.js b/js/src/jit-test/tests/debug/bug1375447.js new file mode 100644 index 0000000000..5801a150ed --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1375447.js @@ -0,0 +1,18 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +g.eval(` +var line0 = Error().lineNumber; +function f() { + try { + throw 4; + } catch(e) {} +} +`); +var script = gw.getOwnPropertyDescriptor("f").value.script; +var handler = { + hit: function() {} +}; +var offs = script.getLineOffsets(g.line0 + 4); +for (var i = 0; i < offs.length; i++) script.setBreakpoint(offs[i], handler); +assertEq(g.f(), undefined); diff --git a/js/src/jit-test/tests/debug/bug1385843.js b/js/src/jit-test/tests/debug/bug1385843.js new file mode 100644 index 0000000000..cc34a54488 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1385843.js @@ -0,0 +1,21 @@ +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.count = 0; +g.eval("(" + function() { + var dbg = new Debugger(parent); + dbg.onEnterFrame = function(frame) { + if (count === 5) + dbg.onEnterFrame = undefined; + count++; + var ex = frame.eval("this").throw.unsafeDereference(); + assertEq(ex.message.includes("call super constructor"), true); + } +} + ")()"); +class Foo1 {}; +class Foo2 extends Foo1 { + constructor() { + super(); + } +}; +new Foo2(); +assertEq(g.count, 6); diff --git a/js/src/jit-test/tests/debug/bug1397049.js b/js/src/jit-test/tests/debug/bug1397049.js new file mode 100644 index 0000000000..484fc2a178 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1397049.js @@ -0,0 +1,40 @@ +// Run debugger in its own global +let g = newGlobal({newCompartment: true}); +g.target = this; +g.evaluate(` + let d = new Debugger; + let gw = d.addDebuggee(target); + + d.onDebuggerStatement = function(frame) + { + frame = frame.older; + + let res = frame.eval("this"); + assertEq(res.return, frame.this); + + res = frame.evalWithBindings("this", {x:42}); + assertEq(res.return, frame.this); + } +`); + +// Debugger statement affects parse so hide in another function +function brk() { debugger; } + +function f1() { + var temp = "string"; + brk(); +} + +function f2() { + let temp = "string"; + brk(); +} + +function f3() { + const temp = "string"; + brk(); +} + +f1.call({}); +f2.call({}); +f3.call({}); diff --git a/js/src/jit-test/tests/debug/bug1397385.js b/js/src/jit-test/tests/debug/bug1397385.js new file mode 100644 index 0000000000..eea2c0c01e --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1397385.js @@ -0,0 +1,16 @@ +var g = newGlobal({newCompartment: true}); + +g.evaluate(` + function testInnerFun(defaultArg = 1) { + function innerFun(expectedThis) { return this; } + h(); + return innerFun; // To prevent the JIT from optimizing out innerFun. + } +`); + +g.h = function () { + var res = (new Debugger(g)).getNewestFrame().eval('assertEq(innerFun(), this)'); + assertEq("return" in res, true); +} + +g.testInnerFun(); diff --git a/js/src/jit-test/tests/debug/bug1404710.js b/js/src/jit-test/tests/debug/bug1404710.js new file mode 100644 index 0000000000..78a8bbb5b8 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1404710.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('stackTest' in this) +stackTest(new Function(` + var g = newGlobal(); + var dbg = new Debugger(g); + dbg.onDebuggerStatement = function (frame) { + frame.evalWithBindings("x", {x: 2}).return; + }; + g.eval("function f(y) { debugger; }"); + g.f(3); +`), false); diff --git a/js/src/jit-test/tests/debug/bug1406437.js b/js/src/jit-test/tests/debug/bug1406437.js new file mode 100644 index 0000000000..004c634e6e --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1406437.js @@ -0,0 +1,5 @@ +var g = newGlobal({newCompartment: true}); +evaluate('function f() {}', {global: g}); +var dbg = new Debugger; +var dg = dbg.addDebuggee(g); +dg.getOwnPropertyDescriptor('f').value.script.source; diff --git a/js/src/jit-test/tests/debug/bug1417961.js b/js/src/jit-test/tests/debug/bug1417961.js new file mode 100644 index 0000000000..a10f709f71 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1417961.js @@ -0,0 +1,31 @@ +var evalInFrame = (function evalInFrame(global) { + var dbgGlobal = newGlobal({newCompartment: true}); + var dbg = new dbgGlobal.Debugger(); + return function evalInFrame(upCount, code) { + dbg.addDebuggee(global); + var frame = dbg.getNewestFrame().older; + for (var i = 0; i < upCount; i++) + frame = frame.older; + var completion = frame.eval(code); + if (completion.throw) + throw 1; + }; +})(this); +function f() { + for (var i = 0; i < 10; - i) + g(); +} +function h() { + evalInFrame(0, "a.push(1)"); + evalInFrame(1, "a.push(2)"); +} +function g() { + h(); +} +try { + f(); +} catch(e) {} +var a = []; +for (var i = 0; i < 3; i++) + g(); +assertEq(a.length, 6); diff --git a/js/src/jit-test/tests/debug/bug1432764.js b/js/src/jit-test/tests/debug/bug1432764.js new file mode 100644 index 0000000000..e4f7a507fb --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1432764.js @@ -0,0 +1,16 @@ +// |jit-test| error: uncaught exception +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval(` + Debugger(parent).onExceptionUnwind = function(frame) { frame.older }; +`); + +var handler = { + has: function(tgt, key) { if (key == 'throw') { throw null; } } +}; + +var proxy = new Proxy({}, handler); + +for (let k of ['foo', 'throw']) { + k in proxy; +} diff --git a/js/src/jit-test/tests/debug/bug1434391.js b/js/src/jit-test/tests/debug/bug1434391.js new file mode 100644 index 0000000000..86efe7970b --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1434391.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +oomTest(function () { + assertEq(gw.executeInGlobal("(42).toString(0)").throw.errorMessageName, "JSMSG_BAD_RADIX"); +}); diff --git a/js/src/jit-test/tests/debug/bug1437537.js b/js/src/jit-test/tests/debug/bug1437537.js new file mode 100644 index 0000000000..ecee9b120c --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1437537.js @@ -0,0 +1,18 @@ +// Don't assert when pausing for onStep at JSOP_EXCEPTION. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +let f = g.Function(`try { throw new Error; } catch (e) { return 'natural'; }`); + +let limit = -1; +dbg.onEnterFrame = function (frame) { + frame.onStep = function () { + if (this.offset > limit) { + limit = this.offset; + return { return: 'forced' }; + } + }; +}; + +while (f() === 'forced') { +} diff --git a/js/src/jit-test/tests/debug/bug1480390.js b/js/src/jit-test/tests/debug/bug1480390.js new file mode 100644 index 0000000000..7ad90c67cd --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1480390.js @@ -0,0 +1,35 @@ +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () {};"); + +function* wrapNoThrow() { + let iter = { + [Symbol.iterator]() { + return this; + }, + next() { + return { value: 10, done: false }; + }, + return() { return "invalid return value" } + }; + for (const i of iter) + yield i; +} + +function foo() { + for (var i of [1,2,3]) { + for (var j of [4,5,6]) { + try { + for (const i of wrapNoThrow()) break; + } catch (e) {} + } + for (var j of [7,8,9]) { + } + } +} + +for (var i = 0; i < 10; i++) { + try { + foo(); + } catch(e) {} +} diff --git a/js/src/jit-test/tests/debug/bug1488163.js b/js/src/jit-test/tests/debug/bug1488163.js new file mode 100644 index 0000000000..9fe9d783fb --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1488163.js @@ -0,0 +1,17 @@ +async function f() { + // Enough variables that SM will eventually decide to create a lookup table + // for this scope. + var q0, q1, q2, q3, q4, q5, q6, q7, q8, q9; +} + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval(` + var dbg = new Debugger(parent); + dbg.onEnterFrame = frame => {}; +`); + +// Fragile: Trigger Shape::hashify() for the shape of the environment in f +// under a call to GetGeneratorObjectForFrame from the Debugger. +for (let i = 0; i < 3; i++) + f(); diff --git a/js/src/jit-test/tests/debug/bug1516958.js b/js/src/jit-test/tests/debug/bug1516958.js new file mode 100644 index 0000000000..24ba0b50ef --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1516958.js @@ -0,0 +1,3 @@ +(new (newGlobal({newCompartment:true}).Debugger)(this)).memory.trackingAllocationSites = true; +nukeAllCCWs(); +new Date(); diff --git a/js/src/jit-test/tests/debug/bug1557343-2.js b/js/src/jit-test/tests/debug/bug1557343-2.js new file mode 100644 index 0000000000..7eb340ff6d --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1557343-2.js @@ -0,0 +1,30 @@ +// |jit-test| --no-ggc +// Don't crash when two Debugger.Frames refer to the same generator script, and +// then one returns. + +var g = newGlobal({ newCompartment: true }); +g.eval(` + function* gen() { + debugger; + yield 1; + } + + function use_gen() { + var gen1 = gen(); + var gen2 = gen(); + + gen1.next(); + gen2.next(); + + gen1.next(); + gen2.next(); + } +`); + +var dbg = new Debugger(g); +var frame; +dbg.onDebuggerStatement = f => { + frame = f; +}; + +g.use_gen(); diff --git a/js/src/jit-test/tests/debug/bug1557343.js b/js/src/jit-test/tests/debug/bug1557343.js new file mode 100644 index 0000000000..964a6d8f15 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1557343.js @@ -0,0 +1,25 @@ +// |jit-test| --no-ggc + +var g = newGlobal({ newCompartment: true }); +g.eval(` + function* g3() { + debugger; + } + + function next() { + g3().next(); + } + + function ggg() { + gc(gc); + } +`); + +var dbg = new Debugger(g); +var frame; +dbg.onDebuggerStatement = f => { + frame = f; +}; + +g.next(); +g.ggg(); diff --git a/js/src/jit-test/tests/debug/bug1563051.js b/js/src/jit-test/tests/debug/bug1563051.js new file mode 100644 index 0000000000..cf3b40019a --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1563051.js @@ -0,0 +1,11 @@ +// |jit-test| error:123 +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +dbg.addDebuggee(g); +dbg.onEnterFrame = function(frame) { + frame.onPop = function() { + dbg.removeDebuggee(g); + throw 123; + } +} +g.eval("(function() {})()"); diff --git a/js/src/jit-test/tests/debug/bug1586762.js b/js/src/jit-test/tests/debug/bug1586762.js new file mode 100644 index 0000000000..416073f756 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1586762.js @@ -0,0 +1,9 @@ +setJitCompilerOption("baseline.warmup.trigger", 0); +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +dbg.addDebuggee(g); +g.eval("" + function f() { return 7; }); +dbg.onEnterFrame = function() { + dbg.removeDebuggee(g); +} +assertEq(g.f(), 7); diff --git a/js/src/jit-test/tests/debug/bug1591342.js b/js/src/jit-test/tests/debug/bug1591342.js new file mode 100644 index 0000000000..37c7b9944b --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1591342.js @@ -0,0 +1,13 @@ +// |jit-test| error: Permission denied to access object + +// jsfunfuzz-generated +newGlobal({ sameCompartmentAs: this }); +nukeAllCCWs(); +// Adapted from randomly chosen testcase: js/src/jit-test/tests/debug/clear-old-analyses-02.js +var g = newGlobal({ + newCompartment: true +}); +var dbg = Debugger(); +gw = dbg.addDebuggee(g); +g.eval("" + function fib() {}); +gw.makeDebuggeeValue(g.fib).script.setBreakpoint(0, {}); diff --git a/js/src/jit-test/tests/debug/bug1602392.js b/js/src/jit-test/tests/debug/bug1602392.js new file mode 100644 index 0000000000..e3e71bfc63 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1602392.js @@ -0,0 +1,19 @@ +// |jit-test| error:ReferenceError: iter is not defined +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () {};"); +function* f1() { + for (const x of iter) { + yield x; + } +} +function f2() { + for (var i of [1, 2, 3]) { + for (var j of [4, 5, 6]) { + for (const k of f1()) { + break; + } + } + } +} +f2(); diff --git a/js/src/jit-test/tests/debug/bug1644699-terminated-generator.js b/js/src/jit-test/tests/debug/bug1644699-terminated-generator.js new file mode 100644 index 0000000000..dc87ecda8c --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1644699-terminated-generator.js @@ -0,0 +1,79 @@ +// |jit-test| exitstatus:6 +// Ensure that a frame terminated due to an interrupt in the generator +// builtin will properly be treated as terminated. + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); +g.eval(` +var done = false; +async function* f() { + await null; + await null; + await null; + await null; + done = true; +} +`); + +dbg.onEnterFrame = f => { + frame = f; + dbg.onEnterFrame = undefined; +}; + +setInterruptCallback(function() { + const stack = saveStack(); + + // We want to explicitly terminate inside the AsyncGeneratorNext builtin + // when it tries to resume execution at the 'await' in the async generator. + // Terminating inside AsyncGeneratorNext causes the generator to be closed, + // and for this test case we specifically need that to happen without + // entering the async generator frame because we're aiming to trigger the + // case where DebugAPI::onLeaveFrame does not having the opportunity to + // clean up the generator information associated with the Debugger.Frame. + if ( + stack.parent && + stack.parent.source === "self-hosted" && + stack.parent.functionDisplayName === "AsyncGeneratorNext" && + stack.parent.parent && + stack.parent.parent.source === stack.source && + stack.parent.parent.line === DRAIN_QUEUE_LINE + ) { + return false; + } + + // Keep interrupting until we find the right place. + interruptIf(true); + return true; +}); + +// Run the async generator and suspend at the first await. +const it = g.f(); +let promise = it.next(); + +// Queue the interrupt so that it will start trying to terminate inside the +// generator builtin. +interruptIf(true); + +// Explicitly drain the queue to run the async generator to completion. +const DRAIN_QUEUE_LINE = saveStack().line + 1; +drainJobQueue(); + +let threw = false; +try { + // In the original testcase for this bug, this call would cause + // an assertion failure because the generator was closed. + frame.environment; +} catch (err) { + threw = true; +} +assertEq(threw, true); + +// The frame here still has a GeneratorInfo datastructure because the +// termination interrupt will cause the generator to be closed without +// clearing that data. The frame must still be treated as terminated in +// this case in order for the Debugger API to behave consistently. +assertEq(frame.terminated, true); + +// We should never reach the end of the async generator because it will +// have been terminated. +assertEq(g.done, false); diff --git a/js/src/jit-test/tests/debug/bug1645358.js b/js/src/jit-test/tests/debug/bug1645358.js new file mode 100644 index 0000000000..6232542400 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1645358.js @@ -0,0 +1,6 @@ +// |jit-test| error:TypeError: can't redefine +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +nukeAllCCWs(); +gw.defineProperty("undefined", {value: -1}); diff --git a/js/src/jit-test/tests/debug/bug1647309.js b/js/src/jit-test/tests/debug/bug1647309.js new file mode 100644 index 0000000000..e4ffcfc349 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1647309.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: !('oomTest' in this) + +const g = newGlobal({ newCompartment: true }); +const dbg = new Debugger(g); + +// Define async generator in debuggee compartment. +g.eval("async function* f() { }"); + +// Use onEnterFrame hook to create generatorFrames entry. +dbg.onEnterFrame = () => {}; + +// Trigger failure in AsyncGeneratorNext. +ignoreUnhandledRejections(); +oomTest(function() { g.f().next(); }); + +// Trigger DebugAPI::onSingleStep to check generatorFrames. +dbg.onDebuggerStatement = frame => { frame.onStep = () => {}; } +g.eval("debugger"); diff --git a/js/src/jit-test/tests/debug/bug1675755-forceLexicalInitializationByName.js b/js/src/jit-test/tests/debug/bug1675755-forceLexicalInitializationByName.js new file mode 100644 index 0000000000..14b1af27fc --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1675755-forceLexicalInitializationByName.js @@ -0,0 +1,38 @@ +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +let errorOne, errorTwo; + +function evalErrorStr(global, evalString) { + try { + global.evaluate(evalString); + return undefined; + } catch (e) { + return e.toString(); + } +} + + +assertEq(evalErrorStr(g, "let y = IDONTEXIST;"), "ReferenceError: IDONTEXIST is not defined"); +assertEq(evalErrorStr(g, "y = 1;"), + "ReferenceError: can't access lexical declaration 'y' before initialization"); + +const LINEAR_SEARCHES_MAX = 3; +const SHAPE_CACHE_MIN_ENTRIES = 3; + +// Give the lexical enough properties so that it isBigEnoughForAShapeTable(). +for (i in [...Array(SHAPE_CACHE_MIN_ENTRIES)]) + gw.executeInGlobal(`let x${i} = 1`); + +// Search for y just enough times to cause the next search to trigger +// Shape::cachify(). +for (i in [...Array(LINEAR_SEARCHES_MAX - 1)]) + gw.executeInGlobal("y"); + +// Here we flip the uninitialized binding to undefined. But in the process, we +// will do the lookup on y that will trigger Shape::cachify. Verify that it +// happens in the correct compartment. +assertEq(gw.forceLexicalInitializationByName("y"), true); diff --git a/js/src/jit-test/tests/debug/bug1684821.js b/js/src/jit-test/tests/debug/bug1684821.js new file mode 100644 index 0000000000..dfbefd9962 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1684821.js @@ -0,0 +1,26 @@ +let g = newGlobal({newCompartment: true}); +let d = new Debugger(g); + +d.onDebuggerStatement = function (frame) { + frame.environment; +}; + +g.evaluate(` + function * foo() { + // Force CallObject + LexicalEnvironmentObject + let x; + let y = () => x; + + // Force DebuggerEnvironment + debugger; + + // Force suspend and frame snapshot + yield; + + // Popping this frame will trigger a second snapshot + } +`) + +let x = g.foo(); +x.next(); +x.next(); diff --git a/js/src/jit-test/tests/debug/bug1688622-createSource.js b/js/src/jit-test/tests/debug/bug1688622-createSource.js new file mode 100644 index 0000000000..917d543555 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1688622-createSource.js @@ -0,0 +1,8 @@ +// Test calling createSource on a non-debuggee global. +for (const global of Debugger().findAllGlobals()) { + try { + global.createSource(13); + } catch (e) { + assertEq(e.message, "Debugger.Object is not a debuggee global"); + } +} diff --git a/js/src/jit-test/tests/debug/bug1701859.js b/js/src/jit-test/tests/debug/bug1701859.js new file mode 100644 index 0000000000..1dc8af5685 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1701859.js @@ -0,0 +1,20 @@ +// |jit-test| --fast-warmup +var dbgGlobal1 = newGlobal({ newCompartment: true }); +for (var i = 0; i < 25; ++i) { + try { + var dbg = new dbgGlobal1.Debugger; + dbg.addDebuggee(this); + dbg.collectCoverageInfo = true; + + var dbgGlobal2 = newGlobal({ newCompartment: true }); + dbgGlobal2.debuggeeGlobal = this; + dbgGlobal2.eval("(" + function () { new Debugger(debuggeeGlobal); } + ")();"); + + dbg.removeDebuggee(this); + dbg = null; + + if ((i % 10) === 0) { + gc(); + } + } catch (ex) {} +} diff --git a/js/src/jit-test/tests/debug/bug1703760.js b/js/src/jit-test/tests/debug/bug1703760.js new file mode 100644 index 0000000000..4eec3f8d27 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1703760.js @@ -0,0 +1,18 @@ +let g = newGlobal({newCompartment: true}); + +Debugger(g).onEnterFrame = function(fr) { + fr.eval("") +}; + +gczeal(11); +gczeal(9, 9); + +g.eval(` + var count = 0; + function inner() { + if (++count < 20) { + inner(); + } + } + inner(); +`); diff --git a/js/src/jit-test/tests/debug/bug1756592-2.js b/js/src/jit-test/tests/debug/bug1756592-2.js new file mode 100644 index 0000000000..726866a731 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1756592-2.js @@ -0,0 +1,25 @@ +// |jit-test| --fast-warmup; --no-threads + +let g = newGlobal({ newCompartment: true}); +let d = new Debugger; +g.eval("function foo() { invokeInterruptCallback(() => {}) }"); +g.eval("function bar() { foo(); }"); + +// Warp-compile. +with ({}) {} +setInterruptCallback(function() { return true; }); +for (var i = 0; i < 100; i++) { + g.bar(); +} + +// Trigger a forced return from an inlined frame +setInterruptCallback(function() { + d.addDebuggee(g) + d.getNewestFrame().onStep = function() { + d.removeDebuggee(g); + return { return: 0 }; + } + return true +}); + +g.bar(); diff --git a/js/src/jit-test/tests/debug/bug1756592.js b/js/src/jit-test/tests/debug/bug1756592.js new file mode 100644 index 0000000000..bd10a26930 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1756592.js @@ -0,0 +1,20 @@ +let g = newGlobal({ newCompartment: true}); +let d = new Debugger; +g.eval("function foo() { invokeInterruptCallback(() => {}) }"); + +// Warp-compile. +setInterruptCallback(function() { return true; }); +for (var i = 0; i < 20; i++) { + g.foo(); +} + +setInterruptCallback(function() { + d.addDebuggee(g) + d.getNewestFrame().onStep = function() { + d.removeDebuggee(g); + return { return: 42 }; + } + return true +}); + +assertEq(g.foo(), 42); diff --git a/js/src/jit-test/tests/debug/bug1768660.js b/js/src/jit-test/tests/debug/bug1768660.js new file mode 100644 index 0000000000..2ec0743625 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1768660.js @@ -0,0 +1,10 @@ +a = newGlobal({newCompartment: true}); +a.parent = this; +a.eval("Debugger(parent).onExceptionUnwind=function(){}"); +(function() { + try {} finally { + try { + throw 9; + } catch {} + } +})() diff --git a/js/src/jit-test/tests/debug/bug1812979.js b/js/src/jit-test/tests/debug/bug1812979.js new file mode 100644 index 0000000000..e6be4d0597 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1812979.js @@ -0,0 +1,14 @@ +// |jit-test| --fast-warmup; --no-threads +function foo(n) { + with ({}) {} + if (n == 9) { + enableTrackAllocations(); + var g = newGlobal({newCompartment: true}); + var dbg = g.Debugger(this); + dbg.getNewestFrame().older; + } +} +for (var i = 0; i < 10; i++) { + for (var j = 0; j < 20; j++) {} + foo(i); +} diff --git a/js/src/jit-test/tests/debug/bug1814020.js b/js/src/jit-test/tests/debug/bug1814020.js new file mode 100644 index 0000000000..7036616347 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1814020.js @@ -0,0 +1,26 @@ +const dbg = newGlobal({ sameZoneAs: this }).Debugger(this); + +async function* inspectingGenerator() { + await undefined; + + const frame = dbg.getNewestFrame(); + const asyncPromise = frame.asyncPromise; + assertEq(asyncPromise.getPromiseReactions().length, 0); +} + +async function* emptyGenerator() {} + +const gen = inspectingGenerator(); +const inspectingGenPromise = gen.next(); + +const emptyGen = emptyGenerator(); +// Close generator. +emptyGen.next(); + +// Creates a reaction record on the inspectingGenPromise which points to the +// closed emptyGen generator. +emptyGen.return(inspectingGenPromise); + +// Execute the inspectingGenerator() code after `await`, which gets the +// promise reactions (potentially including the closed emptyGen generator) +drainJobQueue(); \ No newline at end of file diff --git a/js/src/jit-test/tests/debug/bug1817933.js b/js/src/jit-test/tests/debug/bug1817933.js new file mode 100644 index 0000000000..4d7813f314 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1817933.js @@ -0,0 +1,16 @@ +var g = newGlobal({"newCompartment": true}); +const dbg = new g.Debugger(this); + +with ({x: 3}) { + function foo(n) { + () => {n} + + if (n < 20) { + foo(n+1); + } else { + dbg.getNewestFrame().eval("var x = 23;"); + } + +x + } + foo(0); +} diff --git a/js/src/jit-test/tests/debug/bug1847360.js b/js/src/jit-test/tests/debug/bug1847360.js new file mode 100644 index 0000000000..89d1d73afe --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1847360.js @@ -0,0 +1,18 @@ +try { + g = newGlobal({ newCompartment: true }); + g.z = this; + g.eval( + "(" + + function () { + Debugger(z).onExceptionUnwind = function (y) { + y.eval("f=0"); + }; + } + + ")()" + ); + (function f() { + x; + })(); +} catch (e) { + assertEq(e instanceof ReferenceError, true); +} diff --git a/js/src/jit-test/tests/debug/bug1851135.js b/js/src/jit-test/tests/debug/bug1851135.js new file mode 100644 index 0000000000..5e1787ab69 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1851135.js @@ -0,0 +1,13 @@ +// |jit-test| --fast-warmup; --no-threads + +function foo() { + let x = {}; + + for (let i = 0; i < 100; i++) { + for (let j = 0; j < 100; j++) {} + } + const g = this.newGlobal({sameZoneAs: this}); + const dbg = g.Debugger(this); + dbg.getNewestFrame().eval("x = foo;"); +} +foo(); diff --git a/js/src/jit-test/tests/debug/bug1878466.js b/js/src/jit-test/tests/debug/bug1878466.js new file mode 100644 index 0000000000..dc8fdfa74d --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1878466.js @@ -0,0 +1,14 @@ +var g = newGlobal({newCompartment: true}); +g.eval("x = Object.create({}, {y: {value: 1}});"); +var dbg = new Debugger(); +var dobj = dbg.addDebuggee(g); +var v = dobj.getOwnPropertyDescriptor("x").value; +var ex; +try { + v.defineProperties({y: {value: 2}}); +} catch (e) { + ex = e; +} +nukeAllCCWs(); +assertEq(ex instanceof TypeError, true); +assertEq(ex.stack, ""); // Nuked stack CCW. diff --git a/js/src/jit-test/tests/debug/bug1878511.js b/js/src/jit-test/tests/debug/bug1878511.js new file mode 100644 index 0000000000..f9143b9961 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1878511.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this) +var c = 0; +var dbg = new Debugger(); +oomTest(function () { + if (c++ <= 20) { + newGlobal({newCompartment: true}); + } +}); +dbg.addAllGlobalsAsDebuggees(); diff --git a/js/src/jit-test/tests/debug/bug911065.js b/js/src/jit-test/tests/debug/bug911065.js new file mode 100644 index 0000000000..bec87b9344 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug911065.js @@ -0,0 +1,34 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +g.eval(` // 1 +var line0 = Error().lineNumber; // 2 +function f() { // 3 + for (var x of [0]) { // 4 + if (true == false) // 5 + return false; // 6, aka line0 + 4 + } // 7 + return true; // 8 +} // 9 +`); // 10 + +if (g.dis) + g.dis(g.f); + +var script = gw.getOwnPropertyDescriptor("f").value.script; + +print("Debugger's view:"); +print("----------------"); +for (var i = script.startLine; i <= script.startLine + script.lineCount; i++) { + print("Line " + i + ": " + JSON.stringify(script.getLineOffsets(i))); +} + +var hits = 0; +var handler = {hit: function () { hits++; }}; +var offs = script.getLineOffsets(g.line0 + 4); +for (var i = 0; i < offs.length; i++) + script.setBreakpoint(offs[i], handler); + +assertEq(g.f(), true); +assertEq(hits, 0); diff --git a/js/src/jit-test/tests/debug/bug967039.js b/js/src/jit-test/tests/debug/bug967039.js new file mode 100644 index 0000000000..fc86902c64 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug967039.js @@ -0,0 +1,6 @@ +var g1 = newGlobal({newCompartment: true}); +var dbg = Debugger(g1); +g1.dbg = dbg; +g1.eval("function foo() { dbg.removeDebuggee(this); }"); +g1.eval("function f() { try { throw 3; } catch(e) { foo(); } }\n"); +g1.f(); diff --git a/js/src/jit-test/tests/debug/bug973566.js b/js/src/jit-test/tests/debug/bug973566.js new file mode 100644 index 0000000000..5417235d93 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug973566.js @@ -0,0 +1,7 @@ +Object.prototype[1] = 'peek'; +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onEnterFrame = function (frame) { + var lines = frame.script.getAllOffsets(); +}; +g.eval("1;"); diff --git a/js/src/jit-test/tests/debug/bug980585.js b/js/src/jit-test/tests/debug/bug980585.js new file mode 100644 index 0000000000..30d8c44e52 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug980585.js @@ -0,0 +1,10 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +try { + g.eval("function f() { [1].map(function () {}); const x = 42; x = 43; } f();"); +} catch (e) { + // Ignore the syntax error. +} + +dbg.findScripts(); diff --git a/js/src/jit-test/tests/debug/bug999655.js b/js/src/jit-test/tests/debug/bug999655.js new file mode 100644 index 0000000000..756ef8d0b3 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug999655.js @@ -0,0 +1,11 @@ + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onNewScript = function(script) { + fscript = script.getChildScripts()[0]; +} +g.eval("function f(x) { arguments[0] = 3; return x }"); +fscript.setBreakpoint(0, {hit:function(frame) { + assertEq(frame.arguments[0], 1); +}}); +g.f(1); diff --git a/js/src/jit-test/tests/debug/class-01.js b/js/src/jit-test/tests/debug/class-01.js new file mode 100644 index 0000000000..66f390bd4e --- /dev/null +++ b/js/src/jit-test/tests/debug/class-01.js @@ -0,0 +1,20 @@ +// |jit-test| error: TypeError + +let g = newGlobal(); +let dbg = Debugger(g); + +let forceException = g.eval(` + (class extends class {} { + // Calling this will throw for using |this| uninitialized. + constructor() { } + }) +`); + +dbg.onExceptionUnwind = function() { + return { + // Force the return of an illegal value. + return: 1 + } +} + +new forceException; diff --git a/js/src/jit-test/tests/debug/class-02.js b/js/src/jit-test/tests/debug/class-02.js new file mode 100644 index 0000000000..3821eea26e --- /dev/null +++ b/js/src/jit-test/tests/debug/class-02.js @@ -0,0 +1,20 @@ +// |jit-test| error: TypeError + +let g = newGlobal(); +let dbg = Debugger(g); + +let forceException = g.eval(` + (class extends class {} { + // Calling this will return a primitive immediately. + constructor() { return {}; } + }) +`); + +dbg.onEnterFrame = function() { + return { + // Force the return of an illegal value. + return: 1 + } +} + +new forceException; diff --git a/js/src/jit-test/tests/debug/class-03.js b/js/src/jit-test/tests/debug/class-03.js new file mode 100644 index 0000000000..da1a4f4345 --- /dev/null +++ b/js/src/jit-test/tests/debug/class-03.js @@ -0,0 +1,23 @@ +// |jit-test| error: TypeError + +let g = newGlobal(); +let dbg = Debugger(g); + +let forceException = g.eval(` + (class extends class {} { + // Calling this will return a primitive immediately. + constructor() { + debugger; + return {}; + } + }) +`); + +dbg.onDebuggerStatement = function() { + return { + // Force the return of an illegal value. + return: 1 + } +} + +new forceException; diff --git a/js/src/jit-test/tests/debug/class-04.js b/js/src/jit-test/tests/debug/class-04.js new file mode 100644 index 0000000000..5f772e4d38 --- /dev/null +++ b/js/src/jit-test/tests/debug/class-04.js @@ -0,0 +1,22 @@ +// |jit-test| error: TypeError + +let g = newGlobal(); +let dbg = Debugger(g); + +let forceException = g.eval(` + (class extends class {} { + // Calling this will return a primitive on return. + constructor() { return {}; } + }) +`); + +dbg.onEnterFrame = function(f) { + f.onPop = function() { + return { + // Force the return of an illegal value. + return: 1 + } + } +} + +new forceException; diff --git a/js/src/jit-test/tests/debug/class-05.js b/js/src/jit-test/tests/debug/class-05.js new file mode 100644 index 0000000000..4af7c23f83 --- /dev/null +++ b/js/src/jit-test/tests/debug/class-05.js @@ -0,0 +1,31 @@ +// |jit-test| error: TypeError + +let g = newGlobal(); +let dbg = Debugger(g); + +let forceException = g.eval(` + (class extends class {} { + // Calling this will return a primitive immediately. + constructor() { + debugger; + return {}; + } + }) +`); + +let handler = { + hit() { + return { + // Force the return of an illegal value. + return: 1 + } + } +}; + +dbg.onDebuggerStatement = function(frame) { + var line0 = frame.script.getOffsetLocation(frame.offset).lineNumber; + var offs = frame.script.getLineOffsets(line0 + 1); + frame.script.setBreakpoint(offs[0], handler); +} + +new forceException; diff --git a/js/src/jit-test/tests/debug/class-06.js b/js/src/jit-test/tests/debug/class-06.js new file mode 100644 index 0000000000..fc6ebdbaa9 --- /dev/null +++ b/js/src/jit-test/tests/debug/class-06.js @@ -0,0 +1,22 @@ +// |jit-test| error: TypeError + +let g = newGlobal(); +let dbg = Debugger(g); + +let forceException = g.eval(` + (class extends class {} { + // Calling this will return a primitive immediately. + constructor() { return {}; } + }) +`); + +dbg.onEnterFrame = function(f) { + f.onStep = function() { + return { + // Force the return of an illegal value. + return: 1 + } + } +} + +new forceException; diff --git a/js/src/jit-test/tests/debug/class-07.js b/js/src/jit-test/tests/debug/class-07.js new file mode 100644 index 0000000000..a6a69cb79f --- /dev/null +++ b/js/src/jit-test/tests/debug/class-07.js @@ -0,0 +1,21 @@ +// |jit-test| error: ReferenceError + +let g = newGlobal({newCompartment: true}); +let dbg = Debugger(g); + +let forceException = g.eval(` + (class extends class {} { + // Calling this will return a primitive immediately. + constructor() { return {}; } + }) +`); + +dbg.onEnterFrame = function() { + return { + // Force the return undefined, which will throw for returning + // while |this| is still undefined. + return: undefined + } +} +print("break here"); +new forceException; diff --git a/js/src/jit-test/tests/debug/class-08.js b/js/src/jit-test/tests/debug/class-08.js new file mode 100644 index 0000000000..000f9ae67c --- /dev/null +++ b/js/src/jit-test/tests/debug/class-08.js @@ -0,0 +1,13 @@ +let g = newGlobal({newCompartment: true}); +let dbg = Debugger(g); +dbg.onDebuggerStatement = function() { + // Force the constructor to return undefined, which should be replaced with + // |this| if the latter has been initialized. + return { return: undefined }; +} + +assertEq(g.eval(` + new (class extends class {} { + constructor() { super(); this.foo = 42; debugger; } + }) +`).foo, 42); diff --git a/js/src/jit-test/tests/debug/class-default-constructor-01.js b/js/src/jit-test/tests/debug/class-default-constructor-01.js new file mode 100644 index 0000000000..3cfdc50221 --- /dev/null +++ b/js/src/jit-test/tests/debug/class-default-constructor-01.js @@ -0,0 +1,33 @@ +// We should be able to retrieve the script of a class's default constructor. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gDO = dbg.addDebuggee(g); + +// Class definitions go in the global's lexical environment, so we can't use +// getOwnPropertyDescriptor or g.X to retrieve their constructor. +// +// Derived clasess use a different script, so check those too. +gDO.executeInGlobal(` // 1729 + class X {}; // 1730 + // 1731 + // 1732 + class Y extends X {}; // 1733 +`, { lineNumber: 1729 }); + +function check(name, text, startLine) { + print(`checking ${name}`); + var desc = gDO.executeInGlobal(name).return; + assertEq(desc.class, 'Function'); + assertEq(desc.name, name); + var script = desc.script; + assertEq(script instanceof Debugger.Script, true, + "default constructor's script should be available"); + assertEq(script.startLine, startLine, + "default constructor's starting line should be set"); + var source = script.source; + assertEq(source.text.substr(script.sourceStart, script.sourceLength), text); +} + +check('X', 'class X {}', 1730); +check('Y', 'class Y extends X {}', 1733); diff --git a/js/src/jit-test/tests/debug/class-derived-default-constructor-1.js b/js/src/jit-test/tests/debug/class-derived-default-constructor-1.js new file mode 100644 index 0000000000..baabc338b6 --- /dev/null +++ b/js/src/jit-test/tests/debug/class-derived-default-constructor-1.js @@ -0,0 +1,36 @@ +const g = newGlobal({newCompartment: true}); +g.eval(` + class Base {} + class Derived extends Base {} + this.Derived = Derived; +`); + +const dbg = new Debugger(g); +const gw = dbg.addDebuggee(g); + +let calleeCount = 0; + +dbg.onEnterFrame = frame => { + // Ignore any other callees. + if (frame.callee !== gw.makeDebuggeeValue(g.Derived)) { + return; + } + + calleeCount++; + + const names = frame.environment.names(); + + // Set all variables to |null|. This mustn't affect the implicit rest-argument + // of the default derived class constructor, otherwise we'll crash when + // passing the rest-argument to the super spread-call. + frame.onStep = () => { + names.forEach(name => { + frame.environment.setVariable(name, null); + }); + }; +}; + +new g.Derived(); + +// |Derived| should be called at most once. +assertEq(calleeCount, 1); diff --git a/js/src/jit-test/tests/debug/class-derived-default-constructor-2.js b/js/src/jit-test/tests/debug/class-derived-default-constructor-2.js new file mode 100644 index 0000000000..ba850941bd --- /dev/null +++ b/js/src/jit-test/tests/debug/class-derived-default-constructor-2.js @@ -0,0 +1,39 @@ +const g = newGlobal({newCompartment: true}); +g.eval(` + class Base {} + class Derived extends Base {} + this.Derived = Derived; +`); + +const dbg = new Debugger(g); +const gw = dbg.addDebuggee(g); + +let calleeCount = 0; + +dbg.onEnterFrame = frame => { + // Ignore any other callees. + if (frame.callee !== gw.makeDebuggeeValue(g.Derived)) { + return; + } + + calleeCount++; + + const names = frame.environment.names(); + + // Add a hole to all variables. This mustn't affect the implicit rest-argument + // of the default derived class constructor, otherwise we'll crash when + // passing the rest-argument to the super spread-call. + frame.onStep = () => { + names.forEach(name => { + var args = frame.environment.getVariable(name); + if (args && args.deleteProperty) { + args.deleteProperty(0); + } + }); + }; +}; + +new g.Derived(1, 2); + +// |Derived| should be called at most once. +assertEq(calleeCount, 1); diff --git a/js/src/jit-test/tests/debug/class-derived-default-constructor-3.js b/js/src/jit-test/tests/debug/class-derived-default-constructor-3.js new file mode 100644 index 0000000000..69a49b718d --- /dev/null +++ b/js/src/jit-test/tests/debug/class-derived-default-constructor-3.js @@ -0,0 +1,30 @@ +const g = newGlobal({newCompartment: true}); +g.eval(` + class Base {} + class Derived extends Base {} + this.Derived = Derived; +`); + +const dbg = new Debugger(g); +const gw = dbg.addDebuggee(g); + +let calleeCount = 0; + +dbg.onEnterFrame = frame => { + // Ignore any other callees. + if (frame.callee !== gw.makeDebuggeeValue(g.Derived)) { + return; + } + + calleeCount++; + + // The implicit rest-argument has the non-identifier name ".args", therefore + // we have to elide from the parameter names array. + assertEq(frame.callee.parameterNames.length, 1); + assertEq(frame.callee.parameterNames[0], undefined); +}; + +new g.Derived(); + +// |Derived| should be called at most once. +assertEq(calleeCount, 1); diff --git a/js/src/jit-test/tests/debug/clear-old-analyses-01.js b/js/src/jit-test/tests/debug/clear-old-analyses-01.js new file mode 100644 index 0000000000..4b580563ce --- /dev/null +++ b/js/src/jit-test/tests/debug/clear-old-analyses-01.js @@ -0,0 +1,38 @@ +// |jit-test| error:AllDone +// When we enter debug mode in a compartment, we must throw away all +// analyses in that compartment (debug mode affects the results of +// analysis, so they become out of date). This is true even when we would +// otherwise be retaining jit code and its related data structures for +// animation timing. + +if (typeof gcPreserveCode != "function") + throw('AllDone'); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; + +g.eval("" + + function fib(n) { + var a = 0, b = 1; + while (n-- > 0) + b = b+a, a = b-a; + return b; + }); + +g.fib(20); // Cause g.fib to be jitted. This creates an analysis with + // debug mode off. + +gcPreserveCode(); // Tell the gc to preserve JIT code and analyses by + // default. A recent call to js::NotifyAnimationActivity + // could have a similar effect in real life. + +dbg.addDebuggee(g); // Put g in debug mode. This triggers a GC which must + // clear all analyses. In the original buggy code, we also + // release all of g's scripts' JIT code, leading to a + // recompilation the next time it was called. + +g.fib(20); // Run g.fib again, causing it to be re-jitted. If the + // original analysis is still present, JM will assert, + // because it is not in debug mode. + +throw('AllDone'); diff --git a/js/src/jit-test/tests/debug/clear-old-analyses-02.js b/js/src/jit-test/tests/debug/clear-old-analyses-02.js new file mode 100644 index 0000000000..4a963ec8a5 --- /dev/null +++ b/js/src/jit-test/tests/debug/clear-old-analyses-02.js @@ -0,0 +1,39 @@ +// |jit-test| error:AllDone +// When we leave debug mode in a compartment, we must throw away all +// analyses in that compartment (debug mode affects the results of +// analysis, so they become out of date). We cannot skip this step when +// there are debuggee frames on the stack. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval("" + + function fib(n) { + var a = 0, b = 1; + while (n-- > 0) + b = b+a, a = b-a; + return b; + }); + + +// Cause g.fib to be jitted. This creates an analysis with debug mode on. +g.fib(20); + +// Setting a breakpoint in g.f causes us to throw away the jit code, but +// not the analysis. +gw.makeDebuggeeValue(g.fib).script.setBreakpoint(0, { hit: function (f) { } }); + +// Take g out of debug mode, with debuggee code on the stack. In older +// code, this would not trigger a cleansing GC, so the script will +// retain its analysis. +dbg.onDebuggerStatement = function (f) { + dbg.removeDebuggee(g); +}; +g.eval('debugger'); + +// Run g.fib again, causing it to be re-jitted. If the original analysis is +// still present, JM will assert, because it is not in debug mode. +g.fib(20); + +throw('AllDone'); diff --git a/js/src/jit-test/tests/debug/dispatch-01.js b/js/src/jit-test/tests/debug/dispatch-01.js new file mode 100644 index 0000000000..a1f062c3f9 --- /dev/null +++ b/js/src/jit-test/tests/debug/dispatch-01.js @@ -0,0 +1,22 @@ +// Test removing hooks during dispatch. + +var g = newGlobal({newCompartment: true}); +var log = ''; + +function addDebug(n) { + for (var i = 0; i < n; i++) { + var dbg = new Debugger(g); + dbg.num = i; + dbg.onDebuggerStatement = function (stack) { + log += this.num + ', '; + this.enabled = false; + this.onDebuggerStatement = undefined; + gc(); + }; + } + dbg = null; +} + +addDebug(10); +g.eval("debugger;"); +assertEq(log, '0, 1, 2, 3, 4, 5, 6, 7, 8, 9, '); diff --git a/js/src/jit-test/tests/debug/envChain_frame-eval-relazify.js b/js/src/jit-test/tests/debug/envChain_frame-eval-relazify.js new file mode 100644 index 0000000000..bcdc108b9a --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_frame-eval-relazify.js @@ -0,0 +1,41 @@ +// |jit-test| skip-if: isLcovEnabled() + +function func(doEval) { + if (doEval) { + const dbg = this.newGlobal({sameZoneAs: {}}).Debugger({}); + dbg.getNewestFrame().eval(` + function reaction() { + // Access global variable to walk through the environment chain. + return Map; + }; + Promise.resolve(1).then(reaction); +`); + } +} + +assertEq(isLazyFunction(func), true); +assertEq(isRelazifiableFunction(func), false); + +// Delazify here. +func(false); + +// Delazified function should be marked relazifiable. +assertEq(isLazyFunction(func), false); +assertEq(isRelazifiableFunction(func), true); + +// Perform Frame.prototype.eval +func(true); + +// Frame.prototype.eval should mark the enclosing script non-relazifiable. +assertEq(isLazyFunction(func), false); +assertEq(isRelazifiableFunction(func), false); + +// This shouldn't relazify `func`. +relazifyFunctions(); +relazifyFunctions(); + +assertEq(isLazyFunction(func), false); +assertEq(isRelazifiableFunction(func), false); + +// Execute the inner function to make sure the enclosing script is not lazy. +drainJobQueue(); diff --git a/js/src/jit-test/tests/debug/envChain_frame-eval-with-eval.js b/js/src/jit-test/tests/debug/envChain_frame-eval-with-eval.js new file mode 100644 index 0000000000..166231aff8 --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_frame-eval-with-eval.js @@ -0,0 +1,74 @@ +// Verify the environment chain for Debugger.Frame described in +// js/src/vm/EnvironmentObject.h. + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); + +dbg.onEnterFrame = frame => { + if (frame.script.displayName !== "target") { + return; + } + dbg.onEnterFrame = () => {}; + + const envs = JSON.parse(frame.eval(` +// Put direct eval to de-optimize lexical. +eval(""); +var qualified = 10; +unqualified = 20; +let lexical = 30; +this.prop = 40; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + qualified: !!Object.getOwnPropertyDescriptor(env, "qualified"), + unqualified: !!Object.getOwnPropertyDescriptor(env, "unqualified"), + lexical: !!Object.getOwnPropertyDescriptor(env, "lexical"), + prop: !!Object.getOwnPropertyDescriptor(env, "prop"), + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify(envs); +`).return); + + assertEq(envs.length, 4); + + let i = 0, env; + + env = envs[i]; i++; + assertEq(env.type, "BlockLexicalEnvironmentObject"); + assertEq(env.qualified, false); + assertEq(env.unqualified, false); + assertEq(env.lexical, true, "lexical must live in the BlockLexicalEnvironmentObject"); + assertEq(env.prop, false); + + env = envs[i]; i++; + assertEq(env.type, "[DebugProxy] CallObject"); + assertEq(env.qualified, true, "qualified var must live in the CallObject"); + assertEq(env.unqualified, false); + assertEq(env.lexical, false); + assertEq(env.prop, false); + + env = envs[i]; i++; + assertEq(env.type, "[DebugProxy] GlobalLexicalEnvironmentObject"); + assertEq(env.qualified, false); + assertEq(env.unqualified, false); + assertEq(env.lexical, false); + assertEq(env.prop, false); + + env = envs[i]; i++; + assertEq(env.type, "*global*"); + assertEq(env.qualified, false); + assertEq(env.unqualified, true, "unqualified name must live in the global"); + assertEq(env.lexical, false); + assertEq(env.prop, true, "this property must live in the global"); +}; + +g.eval(` +function target() { +} +target(); +`); diff --git a/js/src/jit-test/tests/debug/envChain_frame-eval.js b/js/src/jit-test/tests/debug/envChain_frame-eval.js new file mode 100644 index 0000000000..ac2a70f97b --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_frame-eval.js @@ -0,0 +1,67 @@ +// Verify the environment chain for Debugger.Frame described in +// js/src/vm/EnvironmentObject.h. + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); + +dbg.onEnterFrame = frame => { + if (frame.script.displayName !== "target") { + return; + } + dbg.onEnterFrame = () => {}; + + const envs = JSON.parse(frame.eval(` +var qualified = 10; +unqualified = 20; +let lexical = 30; +this.prop = 40; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + qualified: !!Object.getOwnPropertyDescriptor(env, "qualified"), + unqualified: !!Object.getOwnPropertyDescriptor(env, "unqualified"), + lexical: !!Object.getOwnPropertyDescriptor(env, "lexical"), + prop: !!Object.getOwnPropertyDescriptor(env, "prop"), + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify(envs); +`).return); + + assertEq(envs.length, 3); + + let i = 0, env; + + // NOTE: lexical is optimized and uses frame slot. + + env = envs[i]; i++; + assertEq(env.type, "[DebugProxy] CallObject"); + assertEq(env.qualified, true, "qualified var must live in the CallObject"); + assertEq(env.unqualified, false); + assertEq(env.lexical, false); + assertEq(env.prop, false); + + env = envs[i]; i++; + assertEq(env.type, "[DebugProxy] GlobalLexicalEnvironmentObject"); + assertEq(env.qualified, false); + assertEq(env.unqualified, false); + assertEq(env.lexical, false); + assertEq(env.prop, false); + + env = envs[i]; i++; + assertEq(env.type, "*global*"); + assertEq(env.qualified, false); + assertEq(env.unqualified, true, "unqualified name must live in the global"); + assertEq(env.lexical, false); + assertEq(env.prop, true, "this property must live in the global"); +}; + +g.eval(` +function target() { +} +target(); +`); diff --git a/js/src/jit-test/tests/debug/envChain_frame-evalWithBindings-with-eval.js b/js/src/jit-test/tests/debug/envChain_frame-evalWithBindings-with-eval.js new file mode 100644 index 0000000000..271809f93d --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_frame-evalWithBindings-with-eval.js @@ -0,0 +1,159 @@ +// Verify the environment chain for Debugger.Frame described in +// js/src/vm/EnvironmentObject.h. + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); + +dbg.onEnterFrame = frame => { + if (frame.script.displayName !== "target") { + return; + } + dbg.onEnterFrame = () => {}; + + const bindings = { + bindings_prop: 50, + + bindings_prop_var: 61, + bindings_prop_lexical: 71, + bindings_prop_unqualified: 81, + }; + + const {envs, vars} = JSON.parse(frame.evalWithBindings(` +// Put direct eval to de-optimize lexical. +eval(""); +var qualified = 10; +unqualified = 20; +let lexical = 30; +this.prop = 40; + +var bindings_prop_var = 60; +let bindings_prop_lexical = 70; +bindings_prop_unqualified = 80; + +const vars = { + bindings_prop_var, + bindings_prop_lexical, + bindings_prop_unqualified, +}; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + qualified: !!Object.getOwnPropertyDescriptor(env, "qualified"), + unqualified: !!Object.getOwnPropertyDescriptor(env, "unqualified"), + lexical: !!Object.getOwnPropertyDescriptor(env, "lexical"), + prop: !!Object.getOwnPropertyDescriptor(env, "prop"), + bindings_prop: !!Object.getOwnPropertyDescriptor(env, "bindings_prop"), + + bindings_prop_var: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_var"), + bindings_prop_var_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_var")?.value, + bindings_prop_lexical: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical"), + bindings_prop_lexical_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical")?.value, + bindings_prop_unqualified: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_unqualified"), + bindings_prop_unqualified_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_unqualified")?.value, + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify({envs, vars}); +`, bindings).return); + + assertEq(vars.bindings_prop_var, 60, + "qualified var should read the value set by the declaration"); + assertEq(vars.bindings_prop_lexical, 70, + "lexical should read the value set by the declaration"); + assertEq(vars.bindings_prop_unqualified, 80, + "unqualified name should read the value set by the assignment"); + + assertEq(bindings.bindings_prop_var, 61, + "the original bindings property must not be overwritten for var"); + assertEq(bindings.bindings_prop_lexical, 71, + "the original bindings property must not be overwritten for lexical"); + assertEq(bindings.bindings_prop_unqualified, 81, + "the original bindings property must not be overwritten for unqualified"); + + assertEq(envs.length, 5); + + let i = 0, env; + + env = envs[i]; i++; + assertEq(env.type, "BlockLexicalEnvironmentObject"); + assertEq(env.qualified, false); + assertEq(env.unqualified, false); + assertEq(env.lexical, true, "lexical must live in the BlockLexicalEnvironmentObject"); + assertEq(env.prop, false); + + assertEq(env.bindings_prop_var, false); + assertEq(env.bindings_prop_lexical, true, + "lexical must live in the BlockLexicalEnvironmentObject even if it conflicts with the bindings object property"); + assertEq(env.bindings_prop_lexical_value, 70); + assertEq(env.bindings_prop_unqualified, false); + + env = envs[i]; i++; + assertEq(env.type, "WithEnvironmentObject"); + assertEq(env.qualified, false); + assertEq(env.unqualified, false); + assertEq(env.lexical, false); + assertEq(env.prop, false); + assertEq(env.bindings_prop, true, "bindings property must live in the with env for bindings"); + + assertEq(env.bindings_prop_var, true, + "bindings property must live in the with env for bindings"); + assertEq(env.bindings_prop_var_value, 60, + "bindings property must be overwritten for var"); + assertEq(env.bindings_prop_lexical, true, + "bindings property must live in the with env for bindings"); + assertEq(env.bindings_prop_lexical_value, 71, + "bindings property must not be overwritten for lexical"); + assertEq(env.bindings_prop_unqualified, true, + "bindings property must live in the with env for bindings"); + assertEq(env.bindings_prop_unqualified_value, 80, + "bindings property must not be overwritten for unqualified"); + + env = envs[i]; i++; + assertEq(env.type, "[DebugProxy] CallObject"); + assertEq(env.qualified, true, "qualified var must live in the CallObject"); + assertEq(env.unqualified, false); + assertEq(env.lexical, false); + assertEq(env.prop, false); + assertEq(env.bindings_prop, false); + + assertEq(env.bindings_prop_var, true, + "qualified var binding must be created in the CallObject even if it conflicts with the bindings object property"); + assertEq(env.bindings_prop_var_value, undefined, + "qualified var value must not be set if it conflicts with the bindings object property"); + assertEq(env.bindings_prop_lexical, false); + assertEq(env.bindings_prop_unqualified, false); + + env = envs[i]; i++; + assertEq(env.type, "[DebugProxy] GlobalLexicalEnvironmentObject"); + assertEq(env.qualified, false); + assertEq(env.unqualified, false); + assertEq(env.lexical, false); + assertEq(env.prop, false); + assertEq(env.bindings_prop, false); + + assertEq(env.bindings_prop_var, false); + assertEq(env.bindings_prop_lexical, false); + assertEq(env.bindings_prop_unqualified, false); + + env = envs[i]; i++; + assertEq(env.type, "*global*"); + assertEq(env.qualified, false); + assertEq(env.unqualified, true, "unqualified name must live in the global"); + assertEq(env.lexical, false); + assertEq(env.prop, true, "this property must live in the global"); + assertEq(env.bindings_prop, false); + + assertEq(env.bindings_prop_var, false); + assertEq(env.bindings_prop_lexical, false); + assertEq(env.bindings_prop_unqualified, false); +}; + +g.eval(` +function target() { +} +target(); +`); diff --git a/js/src/jit-test/tests/debug/envChain_frame-evalWithBindings.js b/js/src/jit-test/tests/debug/envChain_frame-evalWithBindings.js new file mode 100644 index 0000000000..192ffddb0a --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_frame-evalWithBindings.js @@ -0,0 +1,147 @@ +// Verify the environment chain for Debugger.Frame described in +// js/src/vm/EnvironmentObject.h. + +const g = newGlobal({ newCompartment: true }); +const dbg = Debugger(g); + +dbg.onEnterFrame = frame => { + if (frame.script.displayName !== "target") { + return; + } + dbg.onEnterFrame = () => {}; + + const bindings = { + bindings_prop: 50, + + bindings_prop_var: 61, + bindings_prop_lexical: 71, + bindings_prop_unqualified: 81, + }; + + const {envs, vars} = JSON.parse(frame.evalWithBindings(` +var qualified = 10; +unqualified = 20; +let lexical = 30; +this.prop = 40; + +var bindings_prop_var = 60; +let bindings_prop_lexical = 70; +bindings_prop_unqualified = 80; + +const vars = { + bindings_prop_var, + bindings_prop_lexical, + bindings_prop_unqualified, +}; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + qualified: !!Object.getOwnPropertyDescriptor(env, "qualified"), + unqualified: !!Object.getOwnPropertyDescriptor(env, "unqualified"), + lexical: !!Object.getOwnPropertyDescriptor(env, "lexical"), + prop: !!Object.getOwnPropertyDescriptor(env, "prop"), + bindings_prop: !!Object.getOwnPropertyDescriptor(env, "bindings_prop"), + + bindings_prop_var: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_var"), + bindings_prop_var_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_var")?.value, + bindings_prop_lexical: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical"), + bindings_prop_lexical_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical")?.value, + bindings_prop_unqualified: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_unqualified"), + bindings_prop_unqualified_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_unqualified")?.value, + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify({envs, vars}); +`, bindings).return); + + assertEq(vars.bindings_prop_var, 60, + "qualified var should read the value set by the declaration"); + assertEq(vars.bindings_prop_lexical, 70, + "lexical should read the value set by the declaration"); + assertEq(vars.bindings_prop_unqualified, 80, + "unqualified name should read the value set by the assignment"); + + assertEq(bindings.bindings_prop_var, 61, + "the original bindings property must not be overwritten for var"); + assertEq(bindings.bindings_prop_lexical, 71, + "the original bindings property must not be overwritten for lexical"); + assertEq(bindings.bindings_prop_unqualified, 81, + "the original bindings property must not be overwritten for unqualified"); + + assertEq(envs.length, 4); + + let i = 0, env; + + // NOTE: lexical is optimized and uses frame slot, even if it conflicts with + // bindings object properties. + + env = envs[i]; i++; + assertEq(env.type, "WithEnvironmentObject"); + assertEq(env.qualified, false); + assertEq(env.unqualified, false); + assertEq(env.lexical, false); + assertEq(env.prop, false); + assertEq(env.bindings_prop, true, "bindings property must live in the with env for bindings"); + + assertEq(env.bindings_prop_var, true, + "bindings property must live in the with env for bindings"); + assertEq(env.bindings_prop_var_value, 60, + "bindings property must be overwritten for var"); + assertEq(env.bindings_prop_lexical, true, + "bindings property must live in the with env for bindings"); + assertEq(env.bindings_prop_lexical_value, 71, + "bindings property must not be overwritten for lexical"); + assertEq(env.bindings_prop_unqualified, true, + "bindings property must live in the with env for bindings"); + assertEq(env.bindings_prop_unqualified_value, 80, + "bindings property must be overwritten for unqualified"); + + env = envs[i]; i++; + assertEq(env.type, "[DebugProxy] CallObject"); + assertEq(env.qualified, true, "qualified var must live in the CallObject"); + assertEq(env.unqualified, false); + assertEq(env.lexical, false); + assertEq(env.prop, false); + assertEq(env.bindings_prop, false); + + assertEq(env.bindings_prop_var, true, + "qualified var binding must be created in the CallObject even if it conflicts with the bindings object property"); + assertEq(env.bindings_prop_var_value, undefined, + "qualified var value must not be set if it conflicts with the bindings object property"); + assertEq(env.bindings_prop_lexical, false); + assertEq(env.bindings_prop_unqualified, false); + + env = envs[i]; i++; + assertEq(env.type, "[DebugProxy] GlobalLexicalEnvironmentObject"); + assertEq(env.qualified, false); + assertEq(env.unqualified, false); + assertEq(env.lexical, false); + assertEq(env.prop, false); + assertEq(env.bindings_prop, false); + + assertEq(env.bindings_prop_var, false); + assertEq(env.bindings_prop_lexical, false); + assertEq(env.bindings_prop_unqualified, false); + + env = envs[i]; i++; + assertEq(env.type, "*global*"); + assertEq(env.qualified, false); + assertEq(env.unqualified, true, "unqualified name must live in the global"); + assertEq(env.lexical, false); + assertEq(env.prop, true, "this property must live in the global"); + assertEq(env.bindings_prop, false); + + assertEq(env.bindings_prop_var, false); + assertEq(env.bindings_prop_lexical, false); + assertEq(env.bindings_prop_unqualified, false); +}; + +g.eval(` +function target() { +} +target(); +`); diff --git a/js/src/jit-test/tests/debug/envChain_object-executeInGlobal.js b/js/src/jit-test/tests/debug/envChain_object-executeInGlobal.js new file mode 100644 index 0000000000..224e36d046 --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_object-executeInGlobal.js @@ -0,0 +1,46 @@ +// Verify the environment chain for Debugger.Object described in +// js/src/vm/EnvironmentObject.h. + +const g = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const gw = dbg.addDebuggee(g); + +const envs = JSON.parse(gw.executeInGlobal(` +var qualified = 10; +unqualified = 20; +let lexical = 30; +this.prop = 40; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + qualified: !!Object.getOwnPropertyDescriptor(env, "qualified"), + unqualified: !!Object.getOwnPropertyDescriptor(env, "unqualified"), + lexical: !!Object.getOwnPropertyDescriptor(env, "lexical"), + prop: !!Object.getOwnPropertyDescriptor(env, "prop"), + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify(envs); +`).return); + +assertEq(envs.length, 2); + +let i = 0, env; + +env = envs[i]; i++; +assertEq(env.type, "GlobalLexicalEnvironmentObject"); +assertEq(env.qualified, false); +assertEq(env.unqualified, false); +assertEq(env.lexical, true, "lexical must live in the GlobalLexicalEnvironmentObject"); +assertEq(env.prop, false); + +env = envs[i]; i++; +assertEq(env.type, "*global*"); +assertEq(env.qualified, true, "qualified var must live in the global"); +assertEq(env.unqualified, true, "unqualified name must live in the global"); +assertEq(env.lexical, false); +assertEq(env.prop, true, "this property must live in the global"); diff --git a/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-empty.js b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-empty.js new file mode 100644 index 0000000000..8e89d51dd7 --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-empty.js @@ -0,0 +1,51 @@ +// Verify the environment chain for Debugger.Object described in +// js/src/vm/EnvironmentObject.h. + +// Passing empty bindings shouldn't create WithEnvironmentObject. + +const g = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const gw = dbg.addDebuggee(g); + +const bindings = {}; + +const envs = JSON.parse(gw.executeInGlobalWithBindings(` +var qualified = 10; +unqualified = 20; +let lexical = 30; +this.prop = 40; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + qualified: !!Object.getOwnPropertyDescriptor(env, "qualified"), + unqualified: !!Object.getOwnPropertyDescriptor(env, "unqualified"), + lexical: !!Object.getOwnPropertyDescriptor(env, "lexical"), + prop: !!Object.getOwnPropertyDescriptor(env, "prop"), + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify(envs); +`, bindings).return); + +assertEq(envs.length, 2, + "WithEnvironmentObject shouldn't be created if there's no binding"); + +let i = 0, env; + +env = envs[i]; i++; +assertEq(env.type, "GlobalLexicalEnvironmentObject"); +assertEq(env.qualified, false); +assertEq(env.unqualified, false); +assertEq(env.lexical, true, "lexical must live in the GlobalLexicalEnvironmentObject"); +assertEq(env.prop, false); + +env = envs[i]; i++; +assertEq(env.type, "*global*"); +assertEq(env.qualified, true, "qualified var must live in the global"); +assertEq(env.unqualified, true, "unqualified name must live in the global"); +assertEq(env.lexical, false); +assertEq(env.prop, true, "this property must live in the global"); diff --git a/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-existing-bindings.js b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-existing-bindings.js new file mode 100644 index 0000000000..f7f14108e1 --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-existing-bindings.js @@ -0,0 +1,103 @@ +// Verify the environment chain for Debugger.Object described in +// js/src/vm/EnvironmentObject.h. + +// WithEnvironmentObject shouldn't contain bindings conflicts with existing +// globals. + +const g = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const gw = dbg.addDebuggee(g); + +const bindings = { + bindings_prop: 50, + + bindings_prop_var: 61, + bindings_prop_lexical: 71, + bindings_prop_unqualified: 81, +}; + +gw.executeInGlobal(` +var bindings_prop_var = 60; +let bindings_prop_lexical = 70; +bindings_prop_unqualified = 80; +`); + +const {envs, vars} = JSON.parse(gw.executeInGlobalWithBindings(` +const vars = { + bindings_prop, + bindings_prop_var, + bindings_prop_lexical, + bindings_prop_unqualified, +}; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + bindings_prop: !!Object.getOwnPropertyDescriptor(env, "bindings_prop"), + + bindings_prop_var: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_var"), + bindings_prop_var_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_var")?.value, + bindings_prop_lexical: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical"), + bindings_prop_lexical_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical")?.value, + bindings_prop_unqualified: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_unqualified"), + bindings_prop_unqualified_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_unqualified")?.value, + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify({envs, vars}); +`, bindings).return); + +assertEq(vars.bindings_prop, 50, + "qualified var should read the value set by the declaration"); +assertEq(vars.bindings_prop_var, 60, + "qualified var should read the value set by the declaration"); +assertEq(vars.bindings_prop_lexical, 70, + "lexical should read the value set by the declaration"); +assertEq(vars.bindings_prop_unqualified, 80, + "unqualified name should read the value set by the assignment"); + +assertEq(bindings.bindings_prop_var, 61, + "the original bindings property must not be overwritten for var"); +assertEq(bindings.bindings_prop_lexical, 71, + "the original bindings property must not be overwritten for lexical"); +assertEq(bindings.bindings_prop_unqualified, 81, + "the original bindings property must not be overwritten for unqualified"); + +assertEq(envs.length, 3); + +let i = 0, env; + +env = envs[i]; i++; +assertEq(env.type, "WithEnvironmentObject"); +assertEq(env.bindings_prop, true, "bindings property must live in the with env for bindings"); + +assertEq(env.bindings_prop_var, false, + "bindings property must not live in the with env for bindings if it conflicts with existing global"); +assertEq(env.bindings_prop_lexical, false, + "bindings property must not live in the with env for bindings if it conflicts with existing global"); +assertEq(env.bindings_prop_unqualified, false, + "bindings property must not live in the with env for bindings if it conflicts with existing global"); +assertEq(env.bindings_prop_unqualified, false, + "bindings property must not live in the with env for bindings if it conflicts with existing global"); + +env = envs[i]; i++; +assertEq(env.type, "GlobalLexicalEnvironmentObject"); +assertEq(env.bindings_prop, false); + +assertEq(env.bindings_prop_var, false); +assertEq(env.bindings_prop_lexical, true); +assertEq(env.bindings_prop_lexical_value, 70); +assertEq(env.bindings_prop_unqualified, false); + +env = envs[i]; i++; +assertEq(env.type, "*global*"); +assertEq(env.bindings_prop, false); + +assertEq(env.bindings_prop_var, true); +assertEq(env.bindings_prop_var_value, 60); +assertEq(env.bindings_prop_lexical, false); +assertEq(env.bindings_prop_unqualified, true); +assertEq(env.bindings_prop_unqualified_value, 80); diff --git a/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-inner.js b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-inner.js new file mode 100644 index 0000000000..80966210ad --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-inner.js @@ -0,0 +1,137 @@ +// Verify the environment chain for Debugger.Object described in +// js/src/vm/EnvironmentObject.h. + +const g = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const gw = dbg.addDebuggee(g); + +const bindings = { + bindings_prop: 50, + + bindings_prop_var: 61, + bindings_prop_lexical: 71, + bindings_prop_lexical2: 71, + bindings_prop_unqualified: 81, +}; + +const {envs, vars} = JSON.parse(gw.executeInGlobalWithBindings(` +var qualified = 10; +unqualified = 20; +let lexical = 30; +this.prop = 40; + +var bindings_prop_var = 60; +let bindings_prop_lexical = 70; +let bindings_prop_lexical2; +bindings_prop_lexical2 = 70; +bindings_prop_unqualified = 80; + +const vars = { + bindings_prop_var, + bindings_prop_lexical, + bindings_prop_lexical2, + bindings_prop_unqualified, +}; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + qualified: !!Object.getOwnPropertyDescriptor(env, "qualified"), + unqualified: !!Object.getOwnPropertyDescriptor(env, "unqualified"), + lexical: !!Object.getOwnPropertyDescriptor(env, "lexical"), + prop: !!Object.getOwnPropertyDescriptor(env, "prop"), + bindings_prop: !!Object.getOwnPropertyDescriptor(env, "bindings_prop"), + + bindings_prop_var: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_var"), + bindings_prop_var_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_var")?.value, + bindings_prop_lexical: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical"), + bindings_prop_lexical_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical")?.value, + bindings_prop_lexical2: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical2"), + bindings_prop_lexical2_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical2")?.value, + bindings_prop_unqualified: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_unqualified"), + bindings_prop_unqualified_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_unqualified")?.value, + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify({envs, vars}); +`, bindings, { + useInnerBindings: true, +}).return); + +assertEq(vars.bindings_prop_var, 60, + "qualified var should read the value set by the declaration"); +assertEq(vars.bindings_prop_lexical, 71, + "lexical is shadowed by extra bindings"); +assertEq(vars.bindings_prop_lexical2, 70, + "lexical is shadowed by extra bindings"); +assertEq(vars.bindings_prop_unqualified, 80, + "unqualified name is shadowed by extra bindings"); + +assertEq(bindings.bindings_prop_var, 61, + "the original bindings property must not be overwritten for var"); +assertEq(bindings.bindings_prop_lexical, 71, + "the original bindings property must not be overwritten for lexical"); +assertEq(bindings.bindings_prop_lexical2, 71, + "the original bindings property must not be overwritten for lexical"); +assertEq(bindings.bindings_prop_unqualified, 81, + "the original bindings property must not be overwritten for unqualified"); + +assertEq(envs.length, 3); + +let i = 0, env; + +env = envs[i]; i++; +assertEq(env.type, "WithEnvironmentObject"); +assertEq(env.qualified, false); +assertEq(env.unqualified, false); +assertEq(env.lexical, false); +assertEq(env.prop, false); +assertEq(env.bindings_prop, true, "bindings property must live in the with env for bindings"); + +assertEq(env.bindings_prop_var, true, + "bindings property must live in the with env for bindings"); +assertEq(env.bindings_prop_lexical, true, + "bindings property must live in the with env for bindings"); +assertEq(env.bindings_prop_lexical2, true, + "bindings property must live in the with env for bindings"); +assertEq(env.bindings_prop_unqualified, true, + "bindings property must live in the with env for bindings"); +assertEq(env.bindings_prop_unqualified_value, 80, + "bindings property must be overwritten for unqualified"); + +env = envs[i]; i++; +assertEq(env.type, "GlobalLexicalEnvironmentObject"); +assertEq(env.qualified, false); +assertEq(env.unqualified, false); +assertEq(env.lexical, true, "lexical must live in the GlobalLexicalEnvironmentObject"); +assertEq(env.prop, false); +assertEq(env.bindings_prop, false); + +assertEq(env.bindings_prop_var, false); +assertEq(env.bindings_prop_lexical, true, + "lexical must live in the GlobalLexicalEnvironmentObject even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_lexical_value, 70); +assertEq(env.bindings_prop_lexical2, true, + "lexical must live in the GlobalLexicalEnvironmentObject even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_lexical2_value, undefined, + "lexical must be shadowed"); +assertEq(env.bindings_prop_unqualified, false); + +env = envs[i]; i++; +assertEq(env.type, "*global*"); +assertEq(env.qualified, true, "qualified var must live in the global"); +assertEq(env.unqualified, true, "unqualified name must live in the global"); +assertEq(env.lexical, false); +assertEq(env.prop, true, "this property must live in the global"); +assertEq(env.bindings_prop, false); + +assertEq(env.bindings_prop_var, true, + "qualified var binding must be created in the global even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_var_value, undefined, + "qualified var must be shadowed"); +assertEq(env.bindings_prop_lexical, false); +assertEq(env.bindings_prop_lexical2, false); +assertEq(env.bindings_prop_unqualified, false); diff --git a/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-no-use-eval.js b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-no-use-eval.js new file mode 100644 index 0000000000..4b004a5e35 --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-no-use-eval.js @@ -0,0 +1,63 @@ +// Verify the environment chain for Debugger.Object described in +// js/src/vm/EnvironmentObject.h. + +// WithEnvironmentObject should be created if the script has direct eval, +// even if no binding is used outside of direct eval. + +const g = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const gw = dbg.addDebuggee(g); + +const bindings = { + bindings_prop: 61, +}; + +const envs = JSON.parse(gw.executeInGlobalWithBindings(` +eval(''); +var qualified = 10; +unqualified = 20; +let lexical = 30; +this.prop = 40; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + qualified: !!Object.getOwnPropertyDescriptor(env, "qualified"), + unqualified: !!Object.getOwnPropertyDescriptor(env, "unqualified"), + lexical: !!Object.getOwnPropertyDescriptor(env, "lexical"), + prop: !!Object.getOwnPropertyDescriptor(env, "prop"), + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify(envs); +`, bindings).return); + +assertEq(envs.length, 3, + "WithEnvironmentObject should be created if the script has direct " + + "eval, even if no binding is used outside of direct eval"); + +let i = 0, env; + +env = envs[i]; i++; +assertEq(env.type, "WithEnvironmentObject"); +assertEq(env.qualified, false); +assertEq(env.unqualified, false); +assertEq(env.lexical, false); +assertEq(env.prop, false); + +env = envs[i]; i++; +assertEq(env.type, "GlobalLexicalEnvironmentObject"); +assertEq(env.qualified, false); +assertEq(env.unqualified, false); +assertEq(env.lexical, true, "lexical must live in the GlobalLexicalEnvironmentObject"); +assertEq(env.prop, false); + +env = envs[i]; i++; +assertEq(env.type, "*global*"); +assertEq(env.qualified, true, "qualified var must live in the global"); +assertEq(env.unqualified, true, "unqualified name must live in the global"); +assertEq(env.lexical, false); +assertEq(env.prop, true, "this property must live in the global"); diff --git a/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-no-use.js b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-no-use.js new file mode 100644 index 0000000000..b71d906b51 --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-no-use.js @@ -0,0 +1,54 @@ +// Verify the environment chain for Debugger.Object described in +// js/src/vm/EnvironmentObject.h. + +// WithEnvironmentObject shouldn't be created if no binding is used. + +const g = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const gw = dbg.addDebuggee(g); + +const bindings = { + bindings_prop: 61, +}; + +const envs = JSON.parse(gw.executeInGlobalWithBindings(` +var qualified = 10; +unqualified = 20; +let lexical = 30; +this.prop = 40; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + qualified: !!Object.getOwnPropertyDescriptor(env, "qualified"), + unqualified: !!Object.getOwnPropertyDescriptor(env, "unqualified"), + lexical: !!Object.getOwnPropertyDescriptor(env, "lexical"), + prop: !!Object.getOwnPropertyDescriptor(env, "prop"), + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify(envs); +`, bindings).return); + +assertEq(envs.length, 2, + "WithEnvironmentObject shouldn't be created if no binding is " + + "used"); + +let i = 0, env; + +env = envs[i]; i++; +assertEq(env.type, "GlobalLexicalEnvironmentObject"); +assertEq(env.qualified, false); +assertEq(env.unqualified, false); +assertEq(env.lexical, true, "lexical must live in the GlobalLexicalEnvironmentObject"); +assertEq(env.prop, false); + +env = envs[i]; i++; +assertEq(env.type, "*global*"); +assertEq(env.qualified, true, "qualified var must live in the global"); +assertEq(env.unqualified, true, "unqualified name must live in the global"); +assertEq(env.lexical, false); +assertEq(env.prop, true, "this property must live in the global"); diff --git a/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-shadow-only-eval.js b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-shadow-only-eval.js new file mode 100644 index 0000000000..c89d19a04c --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-shadow-only-eval.js @@ -0,0 +1,88 @@ +// Verify the environment chain for Debugger.Object described in +// js/src/vm/EnvironmentObject.h. + +// WithEnvironmentObject shouldn't be created if if all bindings are shadowed, +// even if the script has direct eval. + +const g = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const gw = dbg.addDebuggee(g); + +const bindings = { + bindings_prop_var: 61, + bindings_prop_lexical: 71, + bindings_prop_lexical2: 71, +}; + +const {envs, vars} = JSON.parse(gw.executeInGlobalWithBindings(` +eval(''); +var bindings_prop_var = 60; +let bindings_prop_lexical = 70; +let bindings_prop_lexical2; +bindings_prop_lexical2 = 70; + +const vars = { + bindings_prop_var, + bindings_prop_lexical, + bindings_prop_lexical2, +}; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + + bindings_prop_var: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_var"), + bindings_prop_var_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_var")?.value, + bindings_prop_lexical: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical"), + bindings_prop_lexical_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical")?.value, + bindings_prop_lexical2: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical2"), + bindings_prop_lexical2_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical2")?.value, + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify({envs, vars}); +`, bindings).return); + +assertEq(vars.bindings_prop_var, 60, + "qualified var should read the value set by the declaration"); +assertEq(vars.bindings_prop_lexical, 70, + "lexical should read the value set by the declaration"); +assertEq(vars.bindings_prop_lexical2, 70, + "lexical should read the value set by the assignment"); + +assertEq(bindings.bindings_prop_var, 61, + "the original bindings property must not be overwritten for var"); +assertEq(bindings.bindings_prop_lexical, 71, + "the original bindings property must not be overwritten for lexical"); +assertEq(bindings.bindings_prop_lexical2, 71, + "the original bindings property must not be overwritten for lexical"); + +assertEq(envs.length, 2, + "WithEnvironmentObject shouldn't be created if if all bindings are " + + "shadowed, even if the script has direct eval"); + +let i = 0, env; + +env = envs[i]; i++; +assertEq(env.type, "GlobalLexicalEnvironmentObject"); +assertEq(env.bindings_prop_var, false); +assertEq(env.bindings_prop_lexical, true, + "lexical must live in the GlobalLexicalEnvironmentObject even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_lexical_value, 70); +assertEq(env.bindings_prop_lexical2, true, + "lexical must live in the GlobalLexicalEnvironmentObject even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_lexical2_value, 70, + "lexical value must be set by the assignment even if it conflicts with the bindings object property"); + +env = envs[i]; i++; +assertEq(env.type, "*global*"); + +assertEq(env.bindings_prop_var, true, + "qualified var binding must be created in the global even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_var_value, 60, + "qualified var value must be set even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_lexical, false); +assertEq(env.bindings_prop_lexical2, false); diff --git a/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-shadow-only.js b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-shadow-only.js new file mode 100644 index 0000000000..5291396bb1 --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings-shadow-only.js @@ -0,0 +1,86 @@ +// Verify the environment chain for Debugger.Object described in +// js/src/vm/EnvironmentObject.h. + +// WithEnvironmentObject shouldn't be created if all bindings are shadowed. + +const g = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const gw = dbg.addDebuggee(g); + +const bindings = { + bindings_prop_var: 61, + bindings_prop_lexical: 71, + bindings_prop_lexical2: 71, +}; + +const {envs, vars} = JSON.parse(gw.executeInGlobalWithBindings(` +var bindings_prop_var = 60; +let bindings_prop_lexical = 70; +let bindings_prop_lexical2; +bindings_prop_lexical2 = 70; + +const vars = { + bindings_prop_var, + bindings_prop_lexical, + bindings_prop_lexical2, +}; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + + bindings_prop_var: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_var"), + bindings_prop_var_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_var")?.value, + bindings_prop_lexical: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical"), + bindings_prop_lexical_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical")?.value, + bindings_prop_lexical2: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical2"), + bindings_prop_lexical2_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical2")?.value, + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify({envs, vars}); +`, bindings).return); + +assertEq(vars.bindings_prop_var, 60, + "qualified var should read the value set by the declaration"); +assertEq(vars.bindings_prop_lexical, 70, + "lexical should read the value set by the declaration"); +assertEq(vars.bindings_prop_lexical2, 70, + "lexical should read the value set by the assignment"); + +assertEq(bindings.bindings_prop_var, 61, + "the original bindings property must not be overwritten for var"); +assertEq(bindings.bindings_prop_lexical, 71, + "the original bindings property must not be overwritten for lexical"); +assertEq(bindings.bindings_prop_lexical2, 71, + "the original bindings property must not be overwritten for lexical"); + +assertEq(envs.length, 2, + "WithEnvironmentObject shouldn't be created if all bindings are " + + "shadowed"); + +let i = 0, env; + +env = envs[i]; i++; +assertEq(env.type, "GlobalLexicalEnvironmentObject"); +assertEq(env.bindings_prop_var, false); +assertEq(env.bindings_prop_lexical, true, + "lexical must live in the GlobalLexicalEnvironmentObject even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_lexical_value, 70); +assertEq(env.bindings_prop_lexical2, true, + "lexical must live in the GlobalLexicalEnvironmentObject even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_lexical2_value, 70, + "lexical value must be set by the assignment even if it conflicts with the bindings object property"); + +env = envs[i]; i++; +assertEq(env.type, "*global*"); + +assertEq(env.bindings_prop_var, true, + "qualified var binding must be created in the global even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_var_value, 60, + "qualified var value must be set even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_lexical, false); +assertEq(env.bindings_prop_lexical2, false); diff --git a/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings.js b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings.js new file mode 100644 index 0000000000..056b70e206 --- /dev/null +++ b/js/src/jit-test/tests/debug/envChain_object-executeInGlobalWithBindings.js @@ -0,0 +1,135 @@ +// Verify the environment chain for Debugger.Object described in +// js/src/vm/EnvironmentObject.h. + +const g = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +const gw = dbg.addDebuggee(g); + +const bindings = { + bindings_prop: 50, + + bindings_prop_var: 61, + bindings_prop_lexical: 71, + bindings_prop_lexical2: 71, + bindings_prop_unqualified: 81, +}; + +const {envs, vars} = JSON.parse(gw.executeInGlobalWithBindings(` +var qualified = 10; +unqualified = 20; +let lexical = 30; +this.prop = 40; + +var bindings_prop_var = 60; +let bindings_prop_lexical = 70; +let bindings_prop_lexical2; +bindings_prop_lexical2 = 70; +bindings_prop_unqualified = 80; + +const vars = { + bindings_prop_var, + bindings_prop_lexical, + bindings_prop_lexical2, + bindings_prop_unqualified, +}; + +const envs = []; +let env = getInnerMostEnvironmentObject(); +while (env) { + envs.push({ + type: getEnvironmentObjectType(env) || "*global*", + qualified: !!Object.getOwnPropertyDescriptor(env, "qualified"), + unqualified: !!Object.getOwnPropertyDescriptor(env, "unqualified"), + lexical: !!Object.getOwnPropertyDescriptor(env, "lexical"), + prop: !!Object.getOwnPropertyDescriptor(env, "prop"), + bindings_prop: !!Object.getOwnPropertyDescriptor(env, "bindings_prop"), + + bindings_prop_var: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_var"), + bindings_prop_var_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_var")?.value, + bindings_prop_lexical: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical"), + bindings_prop_lexical_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical")?.value, + bindings_prop_lexical2: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical2"), + bindings_prop_lexical2_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_lexical2")?.value, + bindings_prop_unqualified: !!Object.getOwnPropertyDescriptor(env, "bindings_prop_unqualified"), + bindings_prop_unqualified_value: Object.getOwnPropertyDescriptor(env, "bindings_prop_unqualified")?.value, + }); + + env = getEnclosingEnvironmentObject(env); +} +JSON.stringify({envs, vars}); +`, bindings).return); + +assertEq(vars.bindings_prop_var, 60, + "qualified var should read the value set by the declaration"); +assertEq(vars.bindings_prop_lexical, 70, + "lexical should read the value set by the declaration"); +assertEq(vars.bindings_prop_lexical2, 70, + "lexical should read the value set by the assignment"); +assertEq(vars.bindings_prop_unqualified, 80, + "unqualified name should read the value set by the assignment"); + +assertEq(bindings.bindings_prop_var, 61, + "the original bindings property must not be overwritten for var"); +assertEq(bindings.bindings_prop_lexical, 71, + "the original bindings property must not be overwritten for lexical"); +assertEq(bindings.bindings_prop_lexical2, 71, + "the original bindings property must not be overwritten for lexical"); +assertEq(bindings.bindings_prop_unqualified, 81, + "the original bindings property must not be overwritten for unqualified"); + +assertEq(envs.length, 3); + +let i = 0, env; + +env = envs[i]; i++; +assertEq(env.type, "WithEnvironmentObject"); +assertEq(env.qualified, false); +assertEq(env.unqualified, false); +assertEq(env.lexical, false); +assertEq(env.prop, false); +assertEq(env.bindings_prop, true, "bindings property must live in the with env for bindings"); + +assertEq(env.bindings_prop_var, false, + "bindings property must not live in the with env for bindings if it conflicts with global"); +assertEq(env.bindings_prop_lexical, false, + "bindings property must not live in the with env for bindings if it conflicts with global"); +assertEq(env.bindings_prop_lexical2, false, + "bindings property must not live in the with env for bindings if it conflicts with global"); +assertEq(env.bindings_prop_unqualified, true, + "bindings property must live in the with env for bindings"); +assertEq(env.bindings_prop_unqualified_value, 80, + "bindings property must be overwritten for unqualified"); + +env = envs[i]; i++; +assertEq(env.type, "GlobalLexicalEnvironmentObject"); +assertEq(env.qualified, false); +assertEq(env.unqualified, false); +assertEq(env.lexical, true, "lexical must live in the GlobalLexicalEnvironmentObject"); +assertEq(env.prop, false); +assertEq(env.bindings_prop, false); + +assertEq(env.bindings_prop_var, false); +assertEq(env.bindings_prop_lexical, true, + "lexical must live in the GlobalLexicalEnvironmentObject even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_lexical_value, 70); +assertEq(env.bindings_prop_lexical2, true, + "lexical must live in the GlobalLexicalEnvironmentObject even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_lexical2_value, 70, + "lexical value must be set by the assignment even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_unqualified, false); + +env = envs[i]; i++; +assertEq(env.type, "*global*"); +assertEq(env.qualified, true, "qualified var must live in the global"); +assertEq(env.unqualified, true, "unqualified name must live in the global"); +assertEq(env.lexical, false); +assertEq(env.prop, true, "this property must live in the global"); +assertEq(env.bindings_prop, false); + +assertEq(env.bindings_prop_var, true, + "qualified var binding must be created in the global even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_var_value, 60, + "qualified var value must be set even if it conflicts with the bindings object property"); +assertEq(env.bindings_prop_lexical, false); +assertEq(env.bindings_prop_lexical2, false); +assertEq(env.bindings_prop_unqualified, false); diff --git a/js/src/jit-test/tests/debug/error-cause-copied.js b/js/src/jit-test/tests/debug/error-cause-copied.js new file mode 100644 index 0000000000..b36c8de164 --- /dev/null +++ b/js/src/jit-test/tests/debug/error-cause-copied.js @@ -0,0 +1,50 @@ +// Test that the ErrorCopier copies the optional "cause" property of error objects. + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); +let hits = 0; +dbg.onDebuggerStatement = function (frame) { + hits++; + + // Use |getVariable()| so we can easily throw our custom error from the + // with-statement scope. + let caught; + try { + frame.environment.getVariable("x"); + } catch (e) { + caught = e; + } + + // The ErrorCopier copied error, so |caught| isn't equal to |g.error|. + assertEq(caught !== g.error, true); + + // Ensure the "cause" property is correctly copied. + assertEq(caught.cause, g.cause); +}; + +// The error must be same-compartment with the debugger compartment for the +// ErrorCopier. +g.eval(` + var cause = new Object(); + var error = new Error("", {cause}); +`); + +// Scope must be outside of debugger compartment to avoid triggering a +// DebuggeeWouldRun error. +let scope = { + get x() { + throw g.error; + } +}; + +g.eval(` + function f(scope) { + with (scope) { + debugger; + } + } +`); + +g.f(scope); + +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/error-cause-not-copied-when-redefined-to-accessor.js b/js/src/jit-test/tests/debug/error-cause-not-copied-when-redefined-to-accessor.js new file mode 100644 index 0000000000..a5f089217e --- /dev/null +++ b/js/src/jit-test/tests/debug/error-cause-not-copied-when-redefined-to-accessor.js @@ -0,0 +1,35 @@ +// Test that the ErrorCopier doesn't copy the optional "cause" property when it +// has been redefined to an accessor property. + +var g = newGlobal({newCompartment: true}); + +var obj = g.eval(` +new Proxy({}, { + isExtensible() { + // Create an error object with an initial cause. + let error = new Error("message", {cause: "initial cause"}); + + // Ensure the "cause" property is correctly installed. + assertEq(error.cause, "initial cause"); + + // Redefine the "cause" data property to an accessor property. + Object.defineProperty(error, "cause", { get() {} }); + + // Throw the error. + throw error; + } +}); +`); + +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); +var objw = gw.makeDebuggeeValue(obj); + +var err; +try { + objw.isExtensible(); +} catch (e) { + err = e; +} + +assertEq(err.cause, undefined); diff --git a/js/src/jit-test/tests/debug/exclusive.js b/js/src/jit-test/tests/debug/exclusive.js new file mode 100644 index 0000000000..f49ce78267 --- /dev/null +++ b/js/src/jit-test/tests/debug/exclusive.js @@ -0,0 +1,24 @@ +var g = newGlobal({ newCompartment: true }); +var dbg = Debugger(g); +dbg.onEnterFrame = function () { }; +var success = false; +try { + dbg.collectCoverageInfo = true; + success = true; +} catch (e) { + assertEq(/onEnterFrame and collectCoverageInfo cannot be active at the same time/.test(e.message), true); +} +assertEq(success, false); + +dbg.onEnterFrame = undefined; +dbg.collectCoverageInfo = true; + +try { + dbg.onEnterFrame = function () { }; + success = true; +} catch (e) { + assertEq(/onEnterFrame and collectCoverageInfo cannot be active at the same time/.test(e.message), true); +} +assertEq(success, false); +dbg.collectCoverageInfo = false; +dbg.onEnterFrame = function () { }; diff --git a/js/src/jit-test/tests/debug/execution-observability-01.js b/js/src/jit-test/tests/debug/execution-observability-01.js new file mode 100644 index 0000000000..1f6dd13f04 --- /dev/null +++ b/js/src/jit-test/tests/debug/execution-observability-01.js @@ -0,0 +1,22 @@ +// For perf reasons we don't recompile all a debuggee global's scripts when +// Debugger no longer needs to observe all execution for that global. Test that +// things don't crash if we try to run a script with a BaselineScript that was +// compiled with debug instrumentation when the global is no longer a debuggee. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var counter = 0; +dbg.onDebuggerStatement = function (frame) { + counter++; + if (counter == 15) + dbg.onDebuggerStatement = undefined; +}; + +g.eval("" + function f() { + { + let inner = 42; + debugger; + inner++; + } +}); +g.eval("for (var i = 0; i < 20; i++) f()"); diff --git a/js/src/jit-test/tests/debug/execution-observability-02.js b/js/src/jit-test/tests/debug/execution-observability-02.js new file mode 100644 index 0000000000..61d943812f --- /dev/null +++ b/js/src/jit-test/tests/debug/execution-observability-02.js @@ -0,0 +1,15 @@ +// Test that baseline frames are marked as debuggee when resuming from +// throwing. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +var hits = 0; +dbg.onEnterFrame = function (f) { hits++; }; + +try { + g.eval("for (c in (function*() { yield })()) h"); +} catch (e) { +} + +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/execution-observability-03.js b/js/src/jit-test/tests/debug/execution-observability-03.js new file mode 100644 index 0000000000..d330571ec9 --- /dev/null +++ b/js/src/jit-test/tests/debug/execution-observability-03.js @@ -0,0 +1,17 @@ +// Tests that bare callVMs (in the delprop below) are patched correctly. + +var o = {}; +var global = this; +var p = new Proxy(o, { + "deleteProperty": function (target, key) { + var g = newGlobal({newCompartment: true}); + g.parent = global; + g.eval("var dbg = new Debugger(parent); dbg.onEnterFrame = function(frame) {};"); + return true; + } +}); +function test() { + for (var i=0; i<100; i++) {} + assertEq(delete p.foo, true); +} +test(); diff --git a/js/src/jit-test/tests/debug/execution-observability-04.js b/js/src/jit-test/tests/debug/execution-observability-04.js new file mode 100644 index 0000000000..0e91e54371 --- /dev/null +++ b/js/src/jit-test/tests/debug/execution-observability-04.js @@ -0,0 +1,21 @@ +// Test that we can do debug mode OSR from the interrupt handler. + +var global = this; +var hits = 0; +setInterruptCallback(function() { + print("Interrupt!"); + hits++; + var g = newGlobal({newCompartment: true}); + g.parent = global; + g.eval("var dbg = new Debugger(parent); dbg.onEnterFrame = function(frame) {};"); + return true; +}); + +function f(x) { + if (x > 200) + return; + interruptIf(x == 100); + f(x + 1); +} +f(0); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/execution-observability-05.js b/js/src/jit-test/tests/debug/execution-observability-05.js new file mode 100644 index 0000000000..1ba39f54c1 --- /dev/null +++ b/js/src/jit-test/tests/debug/execution-observability-05.js @@ -0,0 +1,23 @@ +// Test that we can do debug mode OSR from the interrupt handler through an +// on->off->on cycle. + +var global = this; +var hits = 0; +setInterruptCallback(function() { + print("Interrupt!"); + hits++; + var g = newGlobal({newCompartment: true}); + g.parent = global; + g.eval("var dbg = new Debugger(parent); dbg.onEnterFrame = function(frame) {};"); + g.eval("dbg.removeDebuggee(parent);"); + return true; +}); + +function f(x) { + if (x > 200) + return; + interruptIf(x == 100); + f(x + 1); +} +f(0); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/execution-observability-06.js b/js/src/jit-test/tests/debug/execution-observability-06.js new file mode 100644 index 0000000000..fbc3913002 --- /dev/null +++ b/js/src/jit-test/tests/debug/execution-observability-06.js @@ -0,0 +1,24 @@ +// Test that OSR respect debuggeeness. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval("" + function f(c) { + if (c == 0) + return; + if (c == 2) + debugger; + f(c-1); + acc = 0; + for (var i = 0; i < 100; i++) + acc += i; +}); + +var log = ""; +dbg.onDebuggerStatement = function (frame) { + frame.onPop = function f() { log += "p"; } +}; + +g.eval("f(2)"); + +assertEq(log, "p"); diff --git a/js/src/jit-test/tests/debug/gc-01.js b/js/src/jit-test/tests/debug/gc-01.js new file mode 100644 index 0000000000..949c74b576 --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-01.js @@ -0,0 +1,20 @@ +// Debuggers with enabled hooks should not be GC'd even if they are otherwise +// unreachable. + +var g = newGlobal({newCompartment: true}); +var actual = 0; +var expected = 0; + +function f() { + for (var i = 0; i < 20; i++) { + var dbg = new Debugger(g); + dbg.num = i; + dbg.onDebuggerStatement = function (stack) { actual += this.num; }; + expected += i; + } +} + +f(); +gc(); gc(); gc(); +g.eval("debugger;"); +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/debug/gc-02.js b/js/src/jit-test/tests/debug/gc-02.js new file mode 100644 index 0000000000..0bc05f2d72 --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-02.js @@ -0,0 +1,28 @@ +// Dispatching an event to a debugger must keep enough of it gc-alive to avoid +// crashing. + +var g = newGlobal({newCompartment: true}); +var hits; + +function addDebug() { + // The loop is here to defeat the conservative GC. :-\ + for (var i = 0; i < 4; i++) { + var dbg = new Debugger(g); + dbg.onDebuggerStatement = function (stack) { + hits++; + this.enabled = false; + this.onDebuggerStatement = undefined; + gc(); + }; + if (i > 0) { + dbg.enabled = false; + dbg.onDebuggerStatement = undefined; + dbg = null; + } + } +} + +addDebug(); +hits = 0; +g.eval("debugger;"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/gc-03.js b/js/src/jit-test/tests/debug/gc-03.js new file mode 100644 index 0000000000..9c1b7c5f21 --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-03.js @@ -0,0 +1,24 @@ +// Storing a property on a Debugger.Object protects it from GC as long as the +// referent is alive. + +var g = newGlobal({newCompartment: true}); +var N = g.N = 3; +var dbg = Debugger(g); + +var i = 0; +dbg.onDebuggerStatement = function (frame) { + frame.arguments[0].id = i++; +}; +g.eval("function f(x) { debugger; }"); +g.eval("var arr = [], j; for (j = 0; j < N; j++) arr[j] = {};"); +g.eval("for (j = 0; j < N; j++) f(arr[j]);"); +assertEq(i, N); + +gc(); gc(); + +i = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.arguments[0].id, i++) +} +g.eval("for (j = 0; j < N; j++) f(arr[j]);"); +assertEq(i, N); diff --git a/js/src/jit-test/tests/debug/gc-04.js b/js/src/jit-test/tests/debug/gc-04.js new file mode 100644 index 0000000000..206be25f47 --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-04.js @@ -0,0 +1,25 @@ +// Storing a Debugger.Object as a key in a WeakMap protects it from GC as long as +// the referent is alive. + +var g = newGlobal({newCompartment: true}); +var N = g.N = 10; +var dbg = Debugger(g); +var cache = new WeakMap; + +var i = 0; +dbg.onDebuggerStatement = function (frame) { + cache.set(frame.arguments[0], i++); +}; +g.eval("function f(x) { debugger; }"); +g.eval("var arr = [], j; for (j = 0; j < N; j++) arr[j] = {};"); +g.eval("for (j = 0; j < N; j++) f(arr[j]);"); +assertEq(i, N); + +gc(); gc(); + +i = 0; +dbg.onDebuggerStatement = function (frame) { + assertEq(cache.get(frame.arguments[0]), i++) +}; +g.eval("for (j = 0; j < N; j++) f(arr[j]);"); +assertEq(i, N); diff --git a/js/src/jit-test/tests/debug/gc-05.js b/js/src/jit-test/tests/debug/gc-05.js new file mode 100644 index 0000000000..e42b2a7272 --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-05.js @@ -0,0 +1,41 @@ +// If a Debugger survives its debuggee, its object cache must still be swept. + +var g2arr = []; // non-debuggee globals +var xarr = []; // debuggee objects + +var N = 4, M = 4; +for (var i = 0; i < N; i++) { + var g1 = newGlobal({newCompartment: true}); + g1.M = M; + var dbg = new Debugger(g1); + var g2 = g1.eval("newGlobal('same-compartment')"); + g1.x = g2.eval("x = {};"); + + dbg.onDebuggerStatement = function (frame) { xarr.push(frame.eval("x").return); }; + g1.eval("debugger;"); + g2arr.push(g2); + + g1 = null; + gc(); +} + +// At least some of the debuggees have probably been collected at this +// point. It is nondeterministic, though. +assertEq(g2arr.length, N); +assertEq(xarr.length, N); + +// Try to make g2arr[i].eval eventually allocate a new object in the same +// location as a previously gc'd object. If the object caches are not being +// swept, the pointer coincidence will cause a Debugger.Object to be erroneously +// reused. +for (var i = 0; i < N; i++) { + var obj = xarr[i]; + for (j = 0; j < M; j++) { + assertEq(obj instanceof Debugger.Object, true); + g2arr[i].eval("x = x.prop = {};"); + obj = obj.getOwnPropertyDescriptor("prop").value;; + assertEq("seen" in obj, false); + obj.seen = true; + gc(); + } +} diff --git a/js/src/jit-test/tests/debug/gc-06.js b/js/src/jit-test/tests/debug/gc-06.js new file mode 100644 index 0000000000..16aaf12bd0 --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-06.js @@ -0,0 +1,6 @@ +// Debugger objects do not keep debuggee globals live. +var dbg = new Debugger; +for (var i = 0; i < 10; i++) + dbg.addDebuggee(newGlobal({newCompartment: true})); +gc(); +assertEq(dbg.getDebuggees().length < 10, true); diff --git a/js/src/jit-test/tests/debug/gc-07.js b/js/src/jit-test/tests/debug/gc-07.js new file mode 100644 index 0000000000..46000d82e1 --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-07.js @@ -0,0 +1,9 @@ +// Don't assert with dead Debugger.Object and live cross-compartment wrapper of referent. +var g = newGlobal({newCompartment: true}); +for (var j = 0; j < 4; j++) { + var dbg = new Debugger; + dbg.addDebuggee(g); + dbg.enabled = false; + dbg = null; + gc(); gc(); +} diff --git a/js/src/jit-test/tests/debug/gc-08.js b/js/src/jit-test/tests/debug/gc-08.js new file mode 100644 index 0000000000..68e323c821 --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-08.js @@ -0,0 +1,22 @@ +// Debuggers with enabled onExceptionUnwind hooks should not be GC'd even if +// they are otherwise unreachable. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var actual = 0; +var expected = 0; + +function f() { + for (var i = 0; i < 20; i++) { + var dbg = new Debugger(g); + dbg.num = i; + dbg.onExceptionUnwind = function (stack, exc) { actual += this.num; }; + expected += i; + } +} + +f(); +gc(); +assertThrowsValue(function () { g.eval("throw 'fit';"); }, "fit"); +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/debug/gc-09.2.js b/js/src/jit-test/tests/debug/gc-09.2.js new file mode 100644 index 0000000000..0049e32db8 --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-09.2.js @@ -0,0 +1,16 @@ +// Bug 717104 - Unreachable debuggee globals should not keep their debuggers +// alive. The loop is to defeat conservative stack scanning; if the same stack +// locations are used each time through the loop, at least three of the +// debuggers should be collected. +// +// This is a slight modification of gc-09.js, which contains a cycle. + +for (var i = 0; i < 4; i++) { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger(g); + dbg.onDebuggerStatement = function () { throw "FAIL"; }; + dbg.o = makeFinalizeObserver(); +} + +gc(); +assertEq(finalizeCount() > 0, true); diff --git a/js/src/jit-test/tests/debug/gc-09.js b/js/src/jit-test/tests/debug/gc-09.js new file mode 100644 index 0000000000..0357a07862 --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-09.js @@ -0,0 +1,15 @@ +// Bug 717104 - Unreachable debuggee globals should not keep their debuggers +// alive. The loop is to defeat conservative stack scanning; if the same stack +// locations are used each time through the loop, at least three of the +// debuggers should be collected. + +for (var i = 0; i < 4; i++) { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger(g); + dbg.onDebuggerStatement = function () { throw "FAIL"; }; + dbg.o = makeFinalizeObserver(); + dbg.loop = g; // make a cycle of strong references with dbg and g +} + +gc(); +assertEq(finalizeCount() > 0, true); diff --git a/js/src/jit-test/tests/debug/gc-10.js b/js/src/jit-test/tests/debug/gc-10.js new file mode 100644 index 0000000000..9a3fb00b3d --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-10.js @@ -0,0 +1,28 @@ +// Debugger.Frame objects should not be GC'd when doing so would have observable +// effects. + +var g = newGlobal({ newCompartment: true }); + +var log = ''; +var saved; + +new Debugger(g).onDebuggerStatement = function (frame) { + + // Having a live onDebuggerStatement hook will (correctly) cause a Debugger to + // be retained, even if it is otherwise unreachable. + this.onDebuggerStatement = undefined; + + // Give this Debugger.Frame an observable effect. It should not be GC'd. + frame.onPop = function () { + log += 'p'; + } +} + +g.parent = this; + +g.eval(` + debugger; + gc(); +`); + +assertEq(log, 'p'); diff --git a/js/src/jit-test/tests/debug/gc-compartment-01.js b/js/src/jit-test/tests/debug/gc-compartment-01.js new file mode 100644 index 0000000000..b5d7bc09ab --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-compartment-01.js @@ -0,0 +1,6 @@ +// A debugger can survive per-compartment GC. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +gc(g); +gc(this); diff --git a/js/src/jit-test/tests/debug/gc-compartment-02.js b/js/src/jit-test/tests/debug/gc-compartment-02.js new file mode 100644 index 0000000000..97cbc8c419 --- /dev/null +++ b/js/src/jit-test/tests/debug/gc-compartment-02.js @@ -0,0 +1,13 @@ +// Referents of Debugger.Objects in other compartments always survive per-compartment GC. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var arr = []; +dbg.onDebuggerStatement = function (frame) { arr.push(frame.eval("[]").return); }; +g.eval("for (var i = 0; i < 10; i++) debugger;"); +assertEq(arr.length, 10); + +gc(g); + +for (var i = 0; i < arr.length; i++) + assertEq(arr[i].class, "Array"); diff --git a/js/src/jit-test/tests/debug/initarrayelem-hole-value.js b/js/src/jit-test/tests/debug/initarrayelem-hole-value.js new file mode 100644 index 0000000000..65629e862c --- /dev/null +++ b/js/src/jit-test/tests/debug/initarrayelem-hole-value.js @@ -0,0 +1,12 @@ +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.evaluate(`var dbg = new Debugger(parent); dbg.onEnterFrame = function(){};`); + +function f() { + for (var i = 0; i < 10; i++) { + var arr = [1, 2, , i]; + assertEq(2 in arr, false); + assertEq(3 in arr, true); + } +} +f(); diff --git a/js/src/jit-test/tests/debug/inspect-wrapped-promise.js b/js/src/jit-test/tests/debug/inspect-wrapped-promise.js new file mode 100644 index 0000000000..2c7a862f2f --- /dev/null +++ b/js/src/jit-test/tests/debug/inspect-wrapped-promise.js @@ -0,0 +1,87 @@ +load(libdir + "asserts.js"); + +ignoreUnhandledRejections(); + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(); +let gw = dbg.addDebuggee(g); + +g.promise1 = new Promise(() => {}); +g.promise2 = Promise.resolve(42); +g.promise3 = Promise.reject(42); +g.promise4 = new Object(); +g.promise5 = Promise.prototype; + +let promiseDO1 = gw.getOwnPropertyDescriptor('promise1').value; +let promiseDO2 = gw.getOwnPropertyDescriptor('promise2').value; +let promiseDO3 = gw.getOwnPropertyDescriptor('promise3').value; +let promiseDO4 = gw.getOwnPropertyDescriptor('promise4').value; +let promiseDO5 = gw.getOwnPropertyDescriptor('promise5').value; + +assertEq(promiseDO1.isPromise, true); +assertEq(promiseDO2.isPromise, true); +assertEq(promiseDO3.isPromise, true); +assertEq(promiseDO4.isPromise, false); +assertEq(promiseDO5.isPromise, false); + +assertEq(promiseDO1.promiseState, "pending"); +assertEq(promiseDO2.promiseState, "fulfilled"); +assertEq(promiseDO3.promiseState, "rejected"); +assertThrowsInstanceOf(function () { promiseDO4.promiseState }, TypeError); +assertThrowsInstanceOf(function () { promiseDO5.promiseState }, TypeError); + +assertThrowsInstanceOf(function () { promiseDO1.promiseValue }, TypeError); +assertEq(promiseDO2.promiseValue, 42); +assertThrowsInstanceOf(function () { promiseDO3.promiseValue }, TypeError); +assertThrowsInstanceOf(function () { promiseDO4.promiseValue }, TypeError); +assertThrowsInstanceOf(function () { promiseDO5.promiseValue }, TypeError); + +assertThrowsInstanceOf(function () { promiseDO1.promiseReason }, TypeError); +assertThrowsInstanceOf(function () { promiseDO2.promiseReason }, TypeError); +assertEq(promiseDO3.promiseReason, 42); +assertThrowsInstanceOf(function () { promiseDO4.promiseReason }, TypeError); +assertThrowsInstanceOf(function () { promiseDO5.promiseReason }, TypeError); + +// Depending on whether async stacks are activated, this can be null, which +// has typeof null. +assertEq(typeof promiseDO1.promiseAllocationSite === "object", true); +assertEq(typeof promiseDO2.promiseAllocationSite === "object", true); +assertEq(typeof promiseDO3.promiseAllocationSite === "object", true); +assertThrowsInstanceOf(function () { promiseDO4.promiseAllocationSite }, TypeError); +assertThrowsInstanceOf(function () { promiseDO5.promiseAllocationSite }, TypeError); + +// Depending on whether async stacks are activated, this can be null, which +// has typeof null. +assertThrowsInstanceOf(function () { promiseDO1.promiseResolutionSite }, TypeError); +assertEq(typeof promiseDO2.promiseResolutionSite === "object", true); +assertEq(typeof promiseDO3.promiseResolutionSite === "object", true); +assertThrowsInstanceOf(function () { promiseDO4.promiseResolutionSite }, TypeError); +assertThrowsInstanceOf(function () { promiseDO5.promiseResolutionSite }, TypeError); + +assertEq(promiseDO1.promiseID, 1); +assertEq(promiseDO2.promiseID, 2); +assertEq(promiseDO3.promiseID, 3); +assertThrowsInstanceOf(function () { promiseDO4.promiseID }, TypeError); +assertThrowsInstanceOf(function () { promiseDO5.promiseID }, TypeError); + +assertEq(typeof promiseDO1.promiseDependentPromises, "object"); +assertEq(typeof promiseDO2.promiseDependentPromises, "object"); +assertEq(typeof promiseDO3.promiseDependentPromises, "object"); +assertThrowsInstanceOf(function () { promiseDO4.promiseDependentPromises }, TypeError); +assertThrowsInstanceOf(function () { promiseDO5.promiseDependentPromises }, TypeError); + +assertEq(promiseDO1.promiseDependentPromises.length, 0); +assertEq(promiseDO2.promiseDependentPromises.length, 0); +assertEq(promiseDO3.promiseDependentPromises.length, 0); + +assertEq(typeof promiseDO1.promiseLifetime, "number"); +assertEq(typeof promiseDO2.promiseLifetime, "number"); +assertEq(typeof promiseDO3.promiseLifetime, "number"); +assertThrowsInstanceOf(function () { promiseDO4.promiseLifetime }, TypeError); +assertThrowsInstanceOf(function () { promiseDO5.promiseLifetime }, TypeError); + +assertThrowsInstanceOf(function () { promiseDO1.promiseTimeToResolution }, TypeError); +assertEq(typeof promiseDO2.promiseTimeToResolution, "number"); +assertEq(typeof promiseDO3.promiseTimeToResolution, "number"); +assertThrowsInstanceOf(function () { promiseDO4.promiseTimeToResolution }, TypeError); +assertThrowsInstanceOf(function () { promiseDO5.promiseTimeToResolution }, TypeError); diff --git a/js/src/jit-test/tests/debug/isAsyncFunction-isGeneratorFunction.js b/js/src/jit-test/tests/debug/isAsyncFunction-isGeneratorFunction.js new file mode 100644 index 0000000000..fd2df0277b --- /dev/null +++ b/js/src/jit-test/tests/debug/isAsyncFunction-isGeneratorFunction.js @@ -0,0 +1,57 @@ +// Debugger.Script.prototype.isAsyncFunction, Debugger.Object.prototype.isAsyncFunction, +// Debugger.Script.prototype.isGeneratorFunction, Debugger.Object.prototype.isGeneratorFunction + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gDO = dbg.addDebuggee(g); +g.non_debuggee = function non_debuggee () {} + +function checkExpr(expr, { isAsync, isGenerator }) +{ + print("Evaluating: " + JSON.stringify(expr)); + let completion = gDO.executeInGlobal(expr); + if (completion.throw) + throw completion.throw.unsafeDereference(); + + let fn = completion.return; + assertEq(fn.isAsyncFunction, isAsync); + assertEq(fn.isGeneratorFunction, isGenerator); + + // The Debugger.Object and its Debugger.Script should always agree. + if (fn.script) { + assertEq(fn.isAsyncFunction, fn.script.isAsyncFunction); + assertEq(fn.isGeneratorFunction, fn.script.isGeneratorFunction); + } +} + +checkExpr('({})', { isAsync: undefined, isGenerator: undefined }); +checkExpr('non_debuggee', { isAsync: undefined, isGenerator: undefined }); +checkExpr('(function(){})', { isAsync: false, isGenerator: false }); +checkExpr('(function*(){})', { isAsync: false, isGenerator: true }); +checkExpr('(async function snerf(){})', { isAsync: true, isGenerator: false }); +checkExpr('(async function* omlu(){})', { isAsync: true, isGenerator: true }); + +checkExpr('new Function("1+2")', { isAsync: false, isGenerator: false }); +checkExpr('Object.getPrototypeOf(function*(){}).constructor("1+2")', + { isAsync: false, isGenerator: true }); +checkExpr('Object.getPrototypeOf(async function(){}).constructor("1+2")', + { isAsync: true, isGenerator: false }); +checkExpr('Object.getPrototypeOf(async function*(){}).constructor("1+2")', + { isAsync: true, isGenerator: true }); + +// Check eval scripts. +function checkFrame(expr, type) +{ + var log = ''; + dbg.onDebuggerStatement = function(frame) { + log += 'd'; + assertEq(frame.type, type); + assertEq(frame.script.isAsyncFunction, false); + assertEq(frame.script.isGeneratorFunction, false); + } + gDO.executeInGlobal(expr); + assertEq(log, 'd'); +} + +checkFrame('debugger;', 'global'); +checkFrame('eval("debugger;")', 'eval'); diff --git a/js/src/jit-test/tests/debug/isError.js b/js/src/jit-test/tests/debug/isError.js new file mode 100644 index 0000000000..253d2c76d4 --- /dev/null +++ b/js/src/jit-test/tests/debug/isError.js @@ -0,0 +1,19 @@ +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(); +let gw = dbg.addDebuggee(g); + +g.error1 = new Error() +g.error2 = new g.Error() +g.error3 = new g.TypeError(); + +let error1DO = gw.getOwnPropertyDescriptor('error1').value; +let error2DO = gw.getOwnPropertyDescriptor('error2').value; +let error3DO = gw.getOwnPropertyDescriptor('error3').value; + +assertEq(error1DO.isError, true); +assertEq(error2DO.isError, true); +assertEq(error3DO.isError, true); + +g.nonError = new Array(); +let nonErrorDO = gw.getOwnPropertyDescriptor('nonError').value; +assertEq(nonErrorDO.isError, false); diff --git a/js/src/jit-test/tests/debug/job-queue-01.js b/js/src/jit-test/tests/debug/job-queue-01.js new file mode 100644 index 0000000000..259d0c2baf --- /dev/null +++ b/js/src/jit-test/tests/debug/job-queue-01.js @@ -0,0 +1,122 @@ +// Debuggee promise reaction jobs should not run from debugger callbacks. +// This covers: +// - onDebuggerStatement +// - onStep +// - onEnterFrame +// - onPop +// - onExceptionUnwind +// - breakpoint handlers +// - uncaughtExceptionHook + +var g = newGlobal({ newCompartment: true }); +g.parent = this; +var dbg = new Debugger; +var gDO = dbg.addDebuggee(g); +var log = ''; + +// Exercise the promise machinery: resolve a promise and drain the job queue (or +// in HTML terms, perform a microtask checkpoint). When called from a debugger +// hook, the debuggee's microtasks should not run. +function exercise(name) { + log += `${name}-handler`; + Promise.resolve(42).then(v => { + assertEq(v, 42); + log += `${name}-react`; + }); + log += `(`; + drainJobQueue(); + log += `)`; + + // This should be run by the implicit microtask checkpoint after each Debugger + // hook call. + Promise.resolve(42).then(v => { + assertEq(v, 42); + log += `(${name}-tail)`; + }); +} + +dbg.onDebuggerStatement = function (frame) { + exercise('debugger'); + + frame.onStep = function () { + this.onStep = undefined; + exercise('step'); + }; + + dbg.onEnterFrame = function (frame) { + dbg.onEnterFrame = undefined; + frame.onPop = function(completion) { + assertEq(completion.return, 'recompense'); + exercise('pop'); + } + + exercise('enter'); + } + + dbg.onExceptionUnwind = function(frame, value) { + dbg.onExceptionUnwind = undefined; + assertEq(value, 'recidivism'); + exercise('exception'); + return { return: 'recompense' }; + }; + + // Set a breakpoint on entry to g.breakpoint_here. + const script = gDO.getOwnPropertyDescriptor('breakpoint_here').value.script; + const handler = { + hit(frame) { + script.clearAllBreakpoints(); + exercise('bp'); + } + }; + script.setBreakpoint(0, handler); + + dbg.uncaughtExceptionHook = function (ex) { + assertEq(ex, 'turncoat'); + exercise('uncaught'); + }; + + // Throw an uncaught exception from the Debugger handler. This should reach + // uncaughtExceptionHook, but shouldn't affect the debuggee. + throw 'turncoat'; +}; + +g.eval(` + function breakpoint_here() { + throw 'recidivism'; + } + + parent.log += 'eval('; + + // DebuggeeWouldRun detection may prevent this callback from running at all if + // bug 1145201 is present. SpiderMonkey will try to run the promise reaction + // job from the Debugger hook's microtask checkpoint, triggering + // DebuggeeWouldRun. This is a little difficult to observe, since the callback + // never even begins execution. But it should cause the 'then' promise to be + // rejected, which the shell will report (if the assertEq(log, ...) doesn't + // kill the test first). + + Promise.resolve(84).then(function(v) { + assertEq(v, 84); + parent.log += 'eval-react'; + }); + debugger; + parent.log += '...'; + breakpoint_here(); + parent.log += ')'; +`); + +log += 'main-drain(' +drainJobQueue(); +log += ')'; + +assertEq(log, `eval(\ +debugger-handler(debugger-react)\ +uncaught-handler((debugger-tail)uncaught-react)(uncaught-tail)\ +step-handler(step-react)(step-tail)\ +...\ +enter-handler(enter-react)(enter-tail)\ +bp-handler(bp-react)(bp-tail)\ +exception-handler(exception-react)(exception-tail)\ +pop-handler(pop-react)(pop-tail)\ +)\ +main-drain(eval-react)`); diff --git a/js/src/jit-test/tests/debug/job-queue-02.js b/js/src/jit-test/tests/debug/job-queue-02.js new file mode 100644 index 0000000000..5f09a818af --- /dev/null +++ b/js/src/jit-test/tests/debug/job-queue-02.js @@ -0,0 +1,82 @@ +// |jit-test| error: "async tests completed successfully" +// Test that the shell's job queue doesn't skip calls to JS::JobQueueMayNotBeEmpty. + +// For expressions like `await 1`, or `await P` for some already-resolved +// promise P, there's no need to suspend the async call to determine the +// expression's value. Suspension and resumption are expensive, so it would be +// nice if we could avoid them. +// +// But of course, even when the value is known, the act of suspension itself is +// visible: an async call's first suspension returns to its (synchronous) +// caller; subsequent suspensions let other jobs run. So in general, we can't +// short-circuit such `await` expressions. +// +// However, if an async call has been resumed from the job queue (that is, this +// isn't the initial execution, with a synchronous caller expecting a promise of +// the call's final return value), and there are no other jobs following that, +// then the `await`'s reaction job would run immediately following this job --- +// which *is* indistinguishable from skipping the suspension altogether. +// +// A JS::JobQueue implementation may call JS::JobQueueIsEmpty to indicate to the +// engine that the currently running job is the last job in the queue, so this +// optimization may be considered (there are further conditions that must be met +// as well). If the JobQueue calls JobQueueIsEmpty, then it must also call +// JS::JobQueueMayNotBeEmpty when jobs are enqueued, to indicate when the +// opportunity has passed. + +var log = ''; +async function f(label, k) { + log += label + '1'; + await 1; + log += label + '2'; + await 1; + log += label + '3'; + + return k(); +} + +// Call `f` with `label` and `k`. If `skippable` is true, exercise the path that +// skips the suspension and resumption; otherwise exercise the +// non-short-circuited path. +function test(skippable, label, k) { + var resolve; + (new Promise(r => { resolve = r; })) + .then(v => { log += v + 't'; }); + assertEq(log, ''); + f(label, k); + // job queue now: f(label)'s first await's continuation + assertEq(log, label + '1'); + + if (!skippable) { + resolve('p'); + assertEq(log, label + '1'); + // job queue now: f(label)'s first await's continuation, explicit promise's reaction + } + + // Resuming f(label) will reach the second await, which should skip suspension + // or not, depending on whether we resolved that promise. +} + +// SpiderMonkey's internal 'queue is empty' flag is initially false, even though +// the queue is initially empty, because we don't yet know whether the embedding +// is going to participate in the optimization by calling +// JS::JobQueueMayNotBeEmpty and JS::JobQueueIsEmpty. But since the shell uses +// SpiderMonkey's internal job queue implementation, this call to +// `drainJobQueue` calls `JS::JobQueueIsEmpty`, and we are ready to play. +Promise.resolve(42).then(v => assertEq(v, 42)); +drainJobQueue(); + +log = ''; +test(true, 'b', continuation1); + +function continuation1() { + assertEq(log, 'b1b2b3'); + + log = ''; + test(false, 'c', continuation2); +} + +function continuation2() { + assertEq(log, 'c1c2ptc3'); + throw "async tests completed successfully"; // proof that we actually finished +} diff --git a/js/src/jit-test/tests/debug/job-queue-03.js b/js/src/jit-test/tests/debug/job-queue-03.js new file mode 100644 index 0000000000..7e3ce27ea4 --- /dev/null +++ b/js/src/jit-test/tests/debug/job-queue-03.js @@ -0,0 +1,173 @@ +// Multiple debuggers get their job queues drained after each hook. +// This covers: +// - onDebuggerStatement +// - onStep +// - onEnterFrame +// - onPop +// - onExceptionUnwind +// - breakpoint handlers +// - uncaughtExceptionHook + +const g = newGlobal({ newCompartment: true }); +g.parent = this; + +var log = ''; +let expected_throws = 0; + +function setup(global, label) { + const dbg = new Debugger; + dbg.gDO = dbg.addDebuggee(global); + dbg.log = ''; + + dbg.onDebuggerStatement = function (frame) { + // Exercise the promise machinery: resolve a promise and perform a microtask + // checkpoint. When called from a debugger hook, the debuggee's microtasks + // should not run. + function exercise(name) { + dbg.log += name + ','; + log += `${label}-${name}-handler\n`; + Promise.resolve(42).then(v => { + assertEq(v, 42); + log += `${label}-${name}-tail\n`; + }); + } + + exercise('debugger'); + + frame.onStep = function () { + this.onStep = undefined; + exercise('step'); + }; + + dbg.onEnterFrame = function (frame) { + dbg.onEnterFrame = undefined; + frame.onPop = function(completion) { + assertEq(completion.return, 'escutcheon'); + exercise('pop'); + } + + exercise('enter'); + } + + expected_throws++; + dbg.onExceptionUnwind = function(frame, value) { + dbg.onExceptionUnwind = undefined; + assertEq(value, 'myrmidon'); + exercise('exception'); + if (--expected_throws > 0) { + return undefined; + } else { + return { return: 'escutcheon' }; + } + }; + + // Set a breakpoint on entry to g.breakpoint_here. + const script = dbg.gDO.getOwnPropertyDescriptor('breakpoint_here').value.script; + const handler = { + hit(frame) { + script.clearAllBreakpoints(); + exercise('bp'); + } + }; + script.setBreakpoint(0, handler); + + dbg.uncaughtExceptionHook = function (ex) { + assertEq(ex, 'turncoat'); + exercise('uncaught'); + }; + + // Throw an uncaught exception from the Debugger handler. This should reach + // uncaughtExceptionHook, but shouldn't affect the debuggee. + throw 'turncoat'; + }; + + return dbg; +} + +const dbg1 = setup(g, '1'); +const dbg2 = setup(g, '2'); +const dbg3 = setup(g, '3'); + +g.eval(` + function breakpoint_here() { + throw 'myrmidon'; + } + + parent.log += 'eval-start\\n'; + + // DebuggeeWouldRun detection may prevent this callback from running at all if + // bug 1145201 is present. SpiderMonkey will try to run the promise reaction + // job from the Debugger hook's microtask checkpoint, triggering + // DebuggeeWouldRun. This is a little difficult to observe, since the callback + // never even begins execution. But it should cause the 'then' promise to be + // rejected, which the shell will report (if the assertEq(log, ...) doesn't + // kill the test first). + + Promise.resolve(84).then(function(v) { + assertEq(v, 84); + parent.log += 'eval-react'; + }); + debugger; + parent.log += 'stuff to step over\\n'; + breakpoint_here(); + parent.log += 'eval-end\\n'; +`); + +log += 'main-drain\n' +drainJobQueue(); +log += 'main-drain-done\n'; + +const regex = new RegExp(`eval-start +.-debugger-handler +.-uncaught-handler +.-debugger-tail +.-uncaught-tail +.-debugger-handler +.-uncaught-handler +.-debugger-tail +.-uncaught-tail +.-debugger-handler +.-uncaught-handler +.-debugger-tail +.-uncaught-tail +.-step-handler +.-step-tail +.-step-handler +.-step-tail +.-step-handler +.-step-tail +stuff to step over +.-enter-handler +.-enter-tail +.-enter-handler +.-enter-tail +.-enter-handler +.-enter-tail +.-bp-handler +.-bp-tail +.-bp-handler +.-bp-tail +.-bp-handler +.-bp-tail +.-exception-handler +.-exception-tail +.-exception-handler +.-exception-tail +.-exception-handler +.-exception-tail +.-pop-handler +.-pop-tail +.-pop-handler +.-pop-tail +.-pop-handler +.-pop-tail +eval-end +main-drain +eval-reactmain-drain-done +`); + +assertEq(!!log.match(regex), true) + +assertEq(dbg1.log, 'debugger,uncaught,step,enter,bp,exception,pop,'); +assertEq(dbg2.log, 'debugger,uncaught,step,enter,bp,exception,pop,'); +assertEq(dbg3.log, 'debugger,uncaught,step,enter,bp,exception,pop,'); diff --git a/js/src/jit-test/tests/debug/job-queue-04.js b/js/src/jit-test/tests/debug/job-queue-04.js new file mode 100644 index 0000000000..76cf241e8d --- /dev/null +++ b/js/src/jit-test/tests/debug/job-queue-04.js @@ -0,0 +1,24 @@ +// |jit-test| skip-if: !('oomTest' in this) +// Bug 1527862: Don't assert that the Debugger drained its job queue unless we +// actually saved the debuggee's queue. + +// Put a job in the queue. +Promise.resolve(42).then(() => {}); + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +dbg.onNewScript = script => {}; + +// Cause an OOM while initializing the AutoDebuggerJobQueueInterruption, so that +// the destructor is run on an uninitialized instance. +// +// A properly initialized AutoDebuggerJobQueueInterruption asserts that the +// debugger left its job queue entry, before restoring the debuggee's job queue +// that it saved when it was initialized. But if OOM interrupts initialization, +// the job queue left on the JSContext is still the debuggee's, which we have no +// reason to expect is empty, so we shouldn't make any assertions about its +// state. The assertion must be conditional on proper initialization (and use +// the correct condition). +oomTest(() => { + g.eval("(function() {})"); +}, {expectExceptionOnFailure: false}); diff --git a/js/src/jit-test/tests/debug/makeGlobalObjectReference-01.js b/js/src/jit-test/tests/debug/makeGlobalObjectReference-01.js new file mode 100644 index 0000000000..922b8c108c --- /dev/null +++ b/js/src/jit-test/tests/debug/makeGlobalObjectReference-01.js @@ -0,0 +1,26 @@ +// Debugger.prototype.makeGlobalObjectReference returns a D.O for a global +// without adding it as a debuggee. + +let g1 = newGlobal({newCompartment: true}); +let dbg = new Debugger; +assertEq(dbg.hasDebuggee(g1), false); + +let g1w = dbg.makeGlobalObjectReference(g1); +assertEq(dbg.hasDebuggee(g1), false); +assertEq(g1w.unsafeDereference(), g1); +assertEq(g1, g1w.makeDebuggeeValue(g1).unsafeDereference()); + +assertEq(dbg.addDebuggee(g1w), g1w); +assertEq(dbg.hasDebuggee(g1), true); +assertEq(dbg.hasDebuggee(g1w), true); +assertEq(g1w.unsafeDereference(), g1); +assertEq(g1, g1w.makeDebuggeeValue(g1).unsafeDereference()); + +// makeGlobalObjectReference dereferences CCWs. +let g2 = newGlobal({newCompartment: true}); +g2.g1 = g1; +let g2w = dbg.addDebuggee(g2); +let g2g1w = g2w.getOwnPropertyDescriptor('g1').value; +assertEq(g2g1w !== g1w, true); +assertEq(g2g1w.unwrap(), g1w.makeDebuggeeValue(g1)); +assertEq(dbg.makeGlobalObjectReference(g2g1w), g1w); diff --git a/js/src/jit-test/tests/debug/makeGlobalObjectReference-02.js b/js/src/jit-test/tests/debug/makeGlobalObjectReference-02.js new file mode 100644 index 0000000000..a3db8e45e4 --- /dev/null +++ b/js/src/jit-test/tests/debug/makeGlobalObjectReference-02.js @@ -0,0 +1,13 @@ +// Debugger.prototype.makeGlobalObjectReference only accepts actual global objects. + +load(libdir + 'asserts.js'); + +var dbg = new Debugger; + +assertThrowsInstanceOf(() => dbg.makeGlobalObjectReference(true), TypeError); +assertThrowsInstanceOf(() => dbg.makeGlobalObjectReference("foo"), TypeError); +assertThrowsInstanceOf(() => dbg.makeGlobalObjectReference(12), TypeError); +assertThrowsInstanceOf(() => dbg.makeGlobalObjectReference(undefined), TypeError); +assertThrowsInstanceOf(() => dbg.makeGlobalObjectReference(null), TypeError); +assertThrowsInstanceOf(() => dbg.makeGlobalObjectReference({ xlerb: "sbot" }), TypeError); +assertEq(dbg.makeGlobalObjectReference(this) instanceof Debugger.Object, true); diff --git a/js/src/jit-test/tests/debug/makeGlobalObjectReference-03.js b/js/src/jit-test/tests/debug/makeGlobalObjectReference-03.js new file mode 100644 index 0000000000..b20cadb8ec --- /dev/null +++ b/js/src/jit-test/tests/debug/makeGlobalObjectReference-03.js @@ -0,0 +1,8 @@ +// Debugger.prototype.makeGlobalObjectReference should not accept invisible-to-debugger globals. +load(libdir + 'asserts.js'); + +var g = newGlobal({ newCompartment: true, invisibleToDebugger: true }); + +assertThrowsInstanceOf(function () { + (new Debugger).makeGlobalObjectReference(g) +}, TypeError); diff --git a/js/src/jit-test/tests/debug/noExecute-01.js b/js/src/jit-test/tests/debug/noExecute-01.js new file mode 100644 index 0000000000..09f6ba41a7 --- /dev/null +++ b/js/src/jit-test/tests/debug/noExecute-01.js @@ -0,0 +1,29 @@ +// Tests that NX disallows debuggee execution for all the hooks. + +load(libdir + "asserts.js"); +load(libdir + "debuggerNXHelper.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +// Attempts to call g.f without going through an invocation function should +// throw. +g.eval(` + function f() { } + var o = { + get p() { }, + set p(x) { } + }; + `); + +var handlers = [() => { g.f(); }, + () => { g.o.p } , + () => { g.o.p = 42; }]; + +function testHook(hookName) { + for (var h of handlers) { + assertThrowsInstanceOf(h, Debugger.DebuggeeWouldRun); + } +} + +testDebuggerHooksNX(dbg, g, testHook); diff --git a/js/src/jit-test/tests/debug/noExecute-02.js b/js/src/jit-test/tests/debug/noExecute-02.js new file mode 100644 index 0000000000..d1565b0c3f --- /dev/null +++ b/js/src/jit-test/tests/debug/noExecute-02.js @@ -0,0 +1,39 @@ +// Tests that invocation functions work. + +load(libdir + "asserts.js"); +load(libdir + "debuggerNXHelper.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval(` + function d() { debugger; } + function f() { return 42; } + var o = { + get p() { return 42; }, + set p(x) { } + }; + `); + +var strs = ["f();", "o.p", "o.p = 42"]; + +var fw; +dbg.onDebuggerStatement = (frame) => { + fw = frame.arguments[0]; +}; +gw.executeInGlobal("d(f)"); +dbg.onDebuggerStatement = undefined; + +function testHook(hookName) { + var newestFrame = dbg.getNewestFrame(); + for (var s of strs) { + if (newestFrame) { + assertEq(newestFrame.eval(s).return, 42); + } + assertEq(gw.executeInGlobal(s).return, 42); + assertEq(fw.apply(null).return, 42); + } +} + +testDebuggerHooksNX(dbg, g, testHook); diff --git a/js/src/jit-test/tests/debug/noExecute-03.js b/js/src/jit-test/tests/debug/noExecute-03.js new file mode 100644 index 0000000000..7b8f138503 --- /dev/null +++ b/js/src/jit-test/tests/debug/noExecute-03.js @@ -0,0 +1,28 @@ +// Tests that invocation functions work outside of Debugger code. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +var gw = dbg.addDebuggee(g); + +g.eval(` + function f() { debugger; return 42; } + function f2() { return 42; } + var o = { + get p() { return 42; }, + set p(x) { } + }; + `); + +var strs = ["f(f2);", "o.p", "o.p = 42"]; + +var f2w; +dbg.onDebuggerStatement = (frame) => { + f2w = frame.arguments[0]; +}; + +for (var s of strs) { + assertEq(gw.executeInGlobal(s).return, 42); +} +assertEq(f2w.apply(null).return, 42); diff --git a/js/src/jit-test/tests/debug/noExecute-04.js b/js/src/jit-test/tests/debug/noExecute-04.js new file mode 100644 index 0000000000..628a425bad --- /dev/null +++ b/js/src/jit-test/tests/debug/noExecute-04.js @@ -0,0 +1,39 @@ +// Tests that NX works through the enabled toggle and adding/removing the +// global. + +load(libdir + "asserts.js"); +load(libdir + "debuggerNXHelper.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval(` + function f() { } + var o = { + get p() { }, + set p(x) { } + }; + `); + +var handlers = [() => { g.f(); }, + () => { g.o.p } , + () => { g.o.p = 42; }]; + +function testHookEnabled(hookName, trigger) { + for (var h of handlers) { + assertThrowsInstanceOf(h, Debugger.DebuggeeWouldRun); + } +} + +function testHookRemoval(hookName, trigger) { + for (var h of handlers) { + assertThrowsInstanceOf(h, Debugger.DebuggeeWouldRun); + dbg.removeDebuggee(g); + h(); + dbg.addDebuggee(g); + assertThrowsInstanceOf(h, Debugger.DebuggeeWouldRun); + } +} + +testDebuggerHooksNX(dbg, g, testHookEnabled); +testDebuggerHooksNX(dbg, g, testHookRemoval); diff --git a/js/src/jit-test/tests/debug/noExecute-05.js b/js/src/jit-test/tests/debug/noExecute-05.js new file mode 100644 index 0000000000..3bbed22263 --- /dev/null +++ b/js/src/jit-test/tests/debug/noExecute-05.js @@ -0,0 +1,43 @@ +// Tests that NX disallows debuggee execution for all debuggees. + +load(libdir + "asserts.js"); +load(libdir + "debuggerNXHelper.js"); + +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var dbg = new Debugger; + +dbg.addDebuggee(g1); +dbg.addDebuggee(g2); + +g1.eval(` + function f() { } + var o = { + get p() { }, + set p(x) { } + }; + `); + +g2.eval(` + function f() { } + var o = { + get p() { }, + set p(x) { } + }; + `); + +var handlers = [() => { g1.f(); }, + () => { g1.o.p } , + () => { g1.o.p = 42; }, + () => { g2.f(); }, + () => { g2.o.p } , + () => { g2.o.p = 42; } ]; + +function testHook(hookName) { + for (var h of handlers) { + assertThrowsInstanceOf(h, Debugger.DebuggeeWouldRun); + } +} + +testDebuggerHooksNX(dbg, g1, testHook); +testDebuggerHooksNX(dbg, g2, testHook); diff --git a/js/src/jit-test/tests/debug/noExecute-06.js b/js/src/jit-test/tests/debug/noExecute-06.js new file mode 100644 index 0000000000..43186c9e2d --- /dev/null +++ b/js/src/jit-test/tests/debug/noExecute-06.js @@ -0,0 +1,81 @@ +// Tests that NX disallows debuggee execution for multiple debuggers and +// multiple debuggees. + +load(libdir + "asserts.js"); +load(libdir + "debuggerNXHelper.js"); + +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var dbg1 = new Debugger; +var dbg2 = new Debugger; + +g1w1 = dbg1.addDebuggee(g1); + +g1w2 = dbg2.addDebuggee(g1); +g2w = dbg2.addDebuggee(g2); + +g1.eval(` + function d(f) { debugger; return f; } + function f() { return 42; } + var o = { + get p() { return 42; }, + set p(x) { } + }; + `); + +g2.eval(` + function d(f) { debugger; return f; } + function f() { return 42; } + var o = { + get p() { return 42; }, + set p(x) { } + }; + `); + +var strs = ["f();", "o.p", "o.p = 42"]; + +var fw1; +dbg1.onDebuggerStatement = (frame) => { + fw1 = frame.arguments[0]; +} +g1.eval('d(f)'); +dbg1.onDebuggerStatement = undefined; +var fw2; +dbg2.onDebuggerStatement = (frame) => { + fw2 = frame.arguments[0]; +} +g2.eval('d(f)'); +dbg2.onDebuggerStatement = undefined; + +function testHook(hookName) { + var newestG1Frame = dbg1.getNewestFrame(); + if (hookName != 'onNewGlobalObject' && + hookName != 'onNewScript' && + hookName != 'onNewPromise' && + hookName != 'onPromiseSettled') + { + var newestG2Frame = dbg2.getNewestFrame(); + } + + for (var s of strs) { + // When this hook is called, g1 has been locked twice, so even invocation + // functions do not work. + assertEq(g1w1.executeInGlobal(s).throw.unsafeDereference() instanceof Debugger.DebuggeeWouldRun, true); + assertEq(g1w2.executeInGlobal(s).throw.unsafeDereference() instanceof Debugger.DebuggeeWouldRun, true); + if (newestG1Frame) { + assertEq(newestG1Frame.eval(s).throw.unsafeDereference() instanceof Debugger.DebuggeeWouldRun, true); + } + assertEq(fw1.apply(null).throw.unsafeDereference() instanceof Debugger.DebuggeeWouldRun, true); + + // But g2 has only been locked once and so should work. + assertEq(g2w.executeInGlobal(s).throw, undefined); + if (newestG2Frame) { + assertEq(newestG2Frame.eval(s).throw, undefined); + } + assertEq(fw2.apply(null).return, 42); + } +} + +testDebuggerHooksNX(dbg1, g1, () => { + testDebuggerHooksNX(dbg2, g2, testHook); +}); diff --git a/js/src/jit-test/tests/debug/noExecute-07.js b/js/src/jit-test/tests/debug/noExecute-07.js new file mode 100644 index 0000000000..a5b4247351 --- /dev/null +++ b/js/src/jit-test/tests/debug/noExecute-07.js @@ -0,0 +1,36 @@ +// Tests provenance of Debugger.DebuggeeWouldRun errors. + +load(libdir + "asserts.js"); +load(libdir + "debuggerNXHelper.js"); + +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var g3 = newGlobal({newCompartment: true}); +var dbg = new Debugger(g1); + +g3.eval(`var dbg = new Debugger`); +var g1w = g3.dbg.addDebuggee(g1); +g3.dbg.addDebuggee(g2); + +g1.eval(`function f() {}`); + +function testHook(hookName) { + // The stack is like so: + // g1 -> dbg (locks g1) -> g2 -> g3.dbg (locks g1 and g2) + // + // The DebuggeeWouldRun error is always allocated in the topmost locked + // Debugger's compartment. + + // If we try to run script in g1 without going through one of g3.dbg's + // invocation functions, we should get an error allocated in + // g3.Debugger.DebuggeeWouldRun. + assertThrowsInstanceOf(() => { g1.eval(`f()`); }, g3.Debugger.DebuggeeWouldRun); + + // If we try to run script in g1 via one of g3.dbg's invocation functions, + // we should get an error allocated in Debugger.DebuggeeWouldRun. + assertEq(g1w.executeInGlobal(`f()`).throw.unsafeDereference() instanceof Debugger.DebuggeeWouldRun, true); +} + +testDebuggerHooksNX(dbg, g1, () => { + testDebuggerHooksNX(g3.dbg, g2, testHook); +}); diff --git a/js/src/jit-test/tests/debug/onDebuggerStatement-01.js b/js/src/jit-test/tests/debug/onDebuggerStatement-01.js new file mode 100644 index 0000000000..bc5b39f94d --- /dev/null +++ b/js/src/jit-test/tests/debug/onDebuggerStatement-01.js @@ -0,0 +1,7 @@ +var g = newGlobal({newCompartment: true}); +g.log = ''; + +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (stack) { g.log += '!'; }; +assertEq(g.eval("log += '1'; debugger; log += '2'; 3;"), 3); +assertEq(g.log, '1!2'); diff --git a/js/src/jit-test/tests/debug/onDebuggerStatement-02.js b/js/src/jit-test/tests/debug/onDebuggerStatement-02.js new file mode 100644 index 0000000000..3ed64830c0 --- /dev/null +++ b/js/src/jit-test/tests/debug/onDebuggerStatement-02.js @@ -0,0 +1,22 @@ +// Activity in the debugger compartment should not trigger debug hooks. + +var g = newGlobal({newCompartment: true}); +var hit = false; + +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (stack) { hit = true; }; + +debugger; +assertEq(hit, false, "raw debugger statement in debugger compartment should not hit"); + +g.f = function () { debugger; }; +g.eval("f();"); +assertEq(hit, false, "debugger statement in debugger compartment function should not hit"); + +g.outerEval = eval; +g.eval("outerEval('debugger;');"); +assertEq(hit, false, "debugger statement in debugger compartment eval code should not hit"); + +var g2 = newGlobal({newCompartment: true}); +g2.eval("debugger;"); +assertEq(hit, false, "debugger statement in unrelated non-debuggee compartment should not hit"); diff --git a/js/src/jit-test/tests/debug/onDebuggerStatement-03.js b/js/src/jit-test/tests/debug/onDebuggerStatement-03.js new file mode 100644 index 0000000000..5350952477 --- /dev/null +++ b/js/src/jit-test/tests/debug/onDebuggerStatement-03.js @@ -0,0 +1,13 @@ +// A debugger statement in an onDebuggerStatement hook should not reenter. + +var g = newGlobal({newCompartment: true}); +var calls = 0; + +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (stack) { + calls++; + debugger; +}; + +assertEq(g.eval("debugger; 7;"), 7); +assertEq(calls, 1); diff --git a/js/src/jit-test/tests/debug/onDebuggerStatement-04.js b/js/src/jit-test/tests/debug/onDebuggerStatement-04.js new file mode 100644 index 0000000000..306f7919e5 --- /dev/null +++ b/js/src/jit-test/tests/debug/onDebuggerStatement-04.js @@ -0,0 +1,10 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + var code = "assertEq(c, 'ok');\n"; + assertEq(frame.evalWithBindings("eval(s)", {s: code, a: 1234}).return, undefined); +}; +g.eval("function first() { return second(); }"); +g.eval("function second() { return eval('third()'); }"); +g.eval("function third() { debugger; }"); +g.evaluate("first();"); diff --git a/js/src/jit-test/tests/debug/onDebuggerStatement-05.js b/js/src/jit-test/tests/debug/onDebuggerStatement-05.js new file mode 100644 index 0000000000..1f6dd13f04 --- /dev/null +++ b/js/src/jit-test/tests/debug/onDebuggerStatement-05.js @@ -0,0 +1,22 @@ +// For perf reasons we don't recompile all a debuggee global's scripts when +// Debugger no longer needs to observe all execution for that global. Test that +// things don't crash if we try to run a script with a BaselineScript that was +// compiled with debug instrumentation when the global is no longer a debuggee. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var counter = 0; +dbg.onDebuggerStatement = function (frame) { + counter++; + if (counter == 15) + dbg.onDebuggerStatement = undefined; +}; + +g.eval("" + function f() { + { + let inner = 42; + debugger; + inner++; + } +}); +g.eval("for (var i = 0; i < 20; i++) f()"); diff --git a/js/src/jit-test/tests/debug/onDebuggerStatement-async-generator-resumption-01.js b/js/src/jit-test/tests/debug/onDebuggerStatement-async-generator-resumption-01.js new file mode 100644 index 0000000000..20a9ecf964 --- /dev/null +++ b/js/src/jit-test/tests/debug/onDebuggerStatement-async-generator-resumption-01.js @@ -0,0 +1,60 @@ +// A Debugger can {return:} from onDebuggerStatement in an async generator. +// A resolved promise for a {value: _, done: true} object is returned. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval(` + async function* f(x) { + debugger; // when==0 to force return here + await x; + yield 1; + debugger; // when==1 to force return here + } +`); + +let exc = null; +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); +function test(when) { + let hits = 0; + let outcome = "FAIL"; + dbg.onDebuggerStatement = frame => { + if (hits++ == when) + return {return: "ponies"}; + }; + + let iter = g.f(0); + + // At the initial suspend. + assertEq(hits, 0); + iter.next().then(result => { + // At the yield point, unless we already force-returned from the first + // debugger statement. + assertEq(hits, 1); + if (when == 0) + return result; + assertEq(result.value, 1); + assertEq(result.done, false); + return iter.next(); + }).then(result => { + // After forced return. + assertEq(hits, when + 1); + assertEq(result.value, "ponies"); + assertEq(result.done, true); + outcome = "pass"; + }).catch(e => { + // An assertion failed. + exc = e; + }); + + assertEq(hits, 1); + drainJobQueue(); + if (exc !== null) + throw exc; + assertEq(outcome, "pass"); +} + +for (let i = 0; i < 2; i++) { + test(i); +} diff --git a/js/src/jit-test/tests/debug/onDebuggerStatement-async-resumption-01.js b/js/src/jit-test/tests/debug/onDebuggerStatement-async-resumption-01.js new file mode 100644 index 0000000000..e8607217f6 --- /dev/null +++ b/js/src/jit-test/tests/debug/onDebuggerStatement-async-resumption-01.js @@ -0,0 +1,34 @@ +// A Debugger can {return:} from onDebuggerStatement in an async function. +// The async function's promise is resolved with the returned value. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval(` + async function f(x) { + debugger; // when==0 to force return here + await x; + debugger; // when==1 to force return here + } +`); + +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); +function test(when, what, expected) { + let hits = 0; + let result = "FAIL"; + dbg.onDebuggerStatement = frame => { + if (hits++ == when) + return {return: gw.makeDebuggeeValue(what)}; + }; + g.f(0).then(x => { result = x; }); + assertEq(hits, 1); + drainJobQueue(); + assertEq(hits, when + 1); + assertEq(result, expected); +} + +for (let i = 0; i < 2; i++) { + test(i, "ok", "ok"); + test(i, g.Promise.resolve(37), 37); +} diff --git a/js/src/jit-test/tests/debug/onDebuggerStatement-async-resumption-02.js b/js/src/jit-test/tests/debug/onDebuggerStatement-async-resumption-02.js new file mode 100644 index 0000000000..67ff8fdf65 --- /dev/null +++ b/js/src/jit-test/tests/debug/onDebuggerStatement-async-resumption-02.js @@ -0,0 +1,31 @@ +// |jit-test| error:all-jobs-completed-successfully +// Verifiy that onDebuggerStatement's force-return queues the promise +// microtask to run in the debuggee's job queue, not the debugger's +// AutoDebuggerJobQueueInterruption. + +let g = newGlobal({ newCompartment: true }); +g.eval(` + async function asyncFn(x) { + await Promise.resolve(); + debugger; + } + function enterDebuggee(){} +`); +const dbg = new Debugger(g); + +(async function() { + let it = g.asyncFn(); + + // Force-return when the debugger runs after await resume. + dbg.onDebuggerStatement = () => { + return { return: "exit" }; + }; + + const result = await it; + assertEq(result, "exit"); + // If execution here is resumed from the debugger's queue, this call will + // trigger DebuggeeWouldRun exception. + g.enterDebuggee(); + + throw "all-jobs-completed-successfully"; +})(); diff --git a/js/src/jit-test/tests/debug/onDebuggerStatement-generator-resumption-01.js b/js/src/jit-test/tests/debug/onDebuggerStatement-generator-resumption-01.js new file mode 100644 index 0000000000..c4e1ade96e --- /dev/null +++ b/js/src/jit-test/tests/debug/onDebuggerStatement-generator-resumption-01.js @@ -0,0 +1,32 @@ +// A Debugger can {return:} from onDebuggerStatement in a generator. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval(` + function* f1() { + debugger; + yield 1; + } + + function* f2() { + yield 1; + debugger; + yield 2; + } +`); + +let dbg = Debugger(g); +dbg.onDebuggerStatement = frame => ({return: "Ronja"}); + +let genObj = g.f1(); +assertDeepEq(genObj.next(), {value: "Ronja", done: true}); +// Forced return closes the generator. Closed generators behave like this: +assertDeepEq(genObj.next(), {value: undefined, done: true}); + +// It works the same after resuming from a yield. +genObj = g.f2(); +assertDeepEq(genObj.next(), {value: 1, done: false}); +assertDeepEq(genObj.next(), {value: "Ronja", done: true}); +assertDeepEq(genObj.next(), {value: undefined, done: true}); // closed + diff --git a/js/src/jit-test/tests/debug/onEnterFrame-01.js b/js/src/jit-test/tests/debug/onEnterFrame-01.js new file mode 100644 index 0000000000..e9df9131e9 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-01.js @@ -0,0 +1,29 @@ +// Basic enterFrame hook tests. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var type; +dbg.onEnterFrame = function (frame) { + try { + assertEq(frame instanceof Debugger.Frame, true); + assertEq(frame.onStack, true); + type = frame.type; + } catch (exc) { + type = "Exception thrown: " + exc; + } +}; + +function test(f, expected) { + type = undefined; + f(); + assertEq(type, expected); +} + +// eval triggers the hook +test(function () { g.eval("function h() { return 1; }"); }, "eval"); + +// function calls trigger it +test(function () { assertEq(g.h(), 1); }, "call"); + +// global scripts trigger it +test(function () { g.evaluate("var x = 5;"); assertEq(g.x, 5); }, "global"); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-02.js b/js/src/jit-test/tests/debug/onEnterFrame-02.js new file mode 100644 index 0000000000..efb6cf8e9a --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-02.js @@ -0,0 +1,22 @@ +// enterFrame test with recursive debuggee function. + +var g = newGlobal({newCompartment: true}); +var N = g.N = 9; +g.eval("function f(i) { if (i < N) f(i + 1); }"); + +var dbg = Debugger(g); +var arr = []; +dbg.onEnterFrame = function (frame) { + var i; + for (i = 0; i < arr.length; i++) + assertEq(frame !== arr[i], true); + arr[i] = frame; + + // Check that the whole stack is as expected. + var j = i; + for (; frame; frame = frame.older) + assertEq(arr[j--], frame); +}; + +g.f(0); +assertEq(arr.length, N + 1); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-03.js b/js/src/jit-test/tests/debug/onEnterFrame-03.js new file mode 100644 index 0000000000..dcb78e971c --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-03.js @@ -0,0 +1,23 @@ +// frame.eval works in the enterFrame hook. +// It triggers the enterFrame hook again, recursively. (!) + +var g = newGlobal({newCompartment: true}); +g.a = "."; + +var dbg = Debugger(g); +var nestCount = 0, N = 9; +var log = ""; +dbg.onEnterFrame = function (frame) { + assertEq(frame.type, "eval"); + if (nestCount < N) { + log += '('; + nestCount++; + var a = frame.eval("a").return; + log += a; + nestCount--; + log += ')'; + } +}; + +assertEq(g.eval("a"), "."); +assertEq(log, Array(N + 1).join("(") + Array(N + 1).join(".)")); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-05.js b/js/src/jit-test/tests/debug/onEnterFrame-05.js new file mode 100644 index 0000000000..c78e92e2c3 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-05.js @@ -0,0 +1,15 @@ +// The tracejit does not prevent onEnterFrame from being called. + +var g = newGlobal({newCompartment: true}); +g.eval("function f() { return 1; }\n"); +var N = g.N = 11; +g.eval("function h() {\n" + + " for (var i = 0; i < N; i += f()) {}\n" + + "}"); +g.h(); // record loop + +var dbg = Debugger(g); +var log = ''; +dbg.onEnterFrame = function (frame) { log += frame.callee.name; }; +g.h(); +assertEq(log, 'h' + Array(N + 1).join('f')); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-06.js b/js/src/jit-test/tests/debug/onEnterFrame-06.js new file mode 100644 index 0000000000..de3b10799a --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-06.js @@ -0,0 +1,19 @@ +// The tracejit does not prevent onEnterFrame from being called after entering +// a debuggee compartment from a non-debuggee compartment. + +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var dbg = Debugger(g1, g2); +dbg.removeDebuggee(g2); // turn off debug mode in g2 + +g1.eval("function f() { return 1; }\n"); +var N = g1.N = 11; +g1.eval("function h() {\n" + + " for (var i = 0; i < N; i += f()) {}\n" + + "}"); +g1.h(); // record loop + +var log = ''; +dbg.onEnterFrame = function (frame) { log += frame.callee.name; }; +g1.h(); +assertEq(log, 'h' + Array(N + 1).join('f')); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-07.js b/js/src/jit-test/tests/debug/onEnterFrame-07.js new file mode 100644 index 0000000000..52e95c3892 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-07.js @@ -0,0 +1,15 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var visibleFrames = 0; +dbg.onEnterFrame = function (frame) { + print("> " + frame.script.url); + visibleFrames++; +} + +g.eval("(" + function iife() { + [1].forEach(function noop() {}); + for (let x of [1]) {} +} + ")()"); + +// 1 for eval, 1 for iife(), 1 for noop() +assertEq(visibleFrames, 3); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-01.js b/js/src/jit-test/tests/debug/onEnterFrame-async-01.js new file mode 100644 index 0000000000..299516264e --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-01.js @@ -0,0 +1,32 @@ +// async functions fire onEnterFrame each time they resume, like generators + +let g = newGlobal({newCompartment: true}); +g.eval(` + async function timeout(n) { + for (let i = 0; i < n; i++) { + await Promise.resolve(i); + } + } + async function job() { + let racer = timeout(5); + await timeout(3); + await racer; + } +`); + +let dbg = Debugger(g); +let log = ""; +let nicknames = ["job", "t5", "t3"]; +dbg.onEnterFrame = frame => { + if (!("nickname" in frame)) + frame.nickname = nicknames.shift() || "FAIL"; + log += "(" + frame.nickname; + frame.onPop = completion => { log += ")"; }; +}; + +g.job(); +drainJobQueue(); +assertEq(log, + "(job(t5)(t3))" + + "(t5)(t3)".repeat(3) + + "(t5)(job)(t5)(job)"); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-01.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-01.js new file mode 100644 index 0000000000..1f4612147a --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-01.js @@ -0,0 +1,35 @@ +// A Debugger can {return:} from the first onEnterFrame for an async function. +// (The exact behavior is undocumented; we're testing that it doesn't crash.) + +ignoreUnhandledRejections(); + +let g = newGlobal({newCompartment: true}); +g.hit2 = false; +g.eval(`async function f(x) { await x; return "ponies"; }`); + +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); +let hits = 0; +let resumption = undefined; +dbg.onEnterFrame = frame => { + if (frame.type == "call" && frame.callee.name === "f") { + frame.onPop = completion => { + assertEq(completion.return.isPromise, true); + hits++; + }; + + // If we force-return a generator object here, the caller will receive + // a promise object resolved with that generator. + resumption = frame.eval(`(function* f2() { hit2 = true; })()`); + assertEq(resumption.return.class, "Generator"); + return resumption; + } +}; + +let p = g.f(0); +assertEq(hits, 1); +assertEq(g.hit2, false); +let pw = gw.makeDebuggeeValue(p); +assertEq(pw.isPromise, true); +assertEq(pw.promiseState, "fulfilled"); +assertEq(pw.promiseValue, resumption.return); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-02.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-02.js new file mode 100644 index 0000000000..15986741be --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-02.js @@ -0,0 +1,35 @@ +// A Debugger can {throw:} from onEnterFrame in an async function. +// The resulting promise (if any) is rejected with the thrown error value. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval(` + async function f() { await 1; } + var err = new TypeError("object too hairy"); +`); + +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); +let errw = gw.makeDebuggeeValue(g.err); + +// Repeat the test for each onEnterFrame event. +// It fires up to two times: +// - when the async function g.f is called; +// - when we resume after the await to run to the end. +for (let when = 0; when < 2; when++) { + let hits = 0; + dbg.onEnterFrame = frame => { + return hits++ < when ? undefined : {throw: errw}; + }; + + let result = undefined; + g.f() + .then(value => { result = {returned: value}; }) + .catch(err => { result = {threw: err}; }); + + drainJobQueue(); + + assertEq(hits, when + 1); + assertDeepEq(result, {threw: g.err}); +} diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-03.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-03.js new file mode 100644 index 0000000000..6567a61d67 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-03.js @@ -0,0 +1,29 @@ +// A Debugger can {return:} from onEnterFrame at any resume point in an async function. +// The async function's promise is resolved with the returned value. + +let g = newGlobal({newCompartment: true}); +g.eval(`async function f(x) { await x; }`); + +let dbg = new Debugger(g); +function test(when) { + let hits = 0; + dbg.onEnterFrame = frame => { + if (frame.type == "call" && frame.callee.name === "f") { + if (hits++ == when) { + return {return: "exit"}; + } + } + }; + + let result = undefined; + let finished = false; + g.f("hello").then(value => { result = value; finished = true; }); + drainJobQueue(); + assertEq(finished, true); + assertEq(hits, when + 1); + assertEq(result, "exit"); +} + +// onEnterFrame with hits==0 is not a resume point; {return:} behaves differently there +// (see onEnterFrame-async-resumption-02.js). +test(1); // force return from first resume point, immediately after the await instruction diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-04.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-04.js new file mode 100644 index 0000000000..9f67d1f286 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-04.js @@ -0,0 +1,36 @@ +// Returning {throw:} from onEnterFrame when resuming inside a try block in an +// async function causes control to jump to the catch block. + +let g = newGlobal({newCompartment: true}); +g.eval(` + async function af() { + try { + return await Promise.resolve("fail"); + } catch (exc) { + assertEq(exc, "fit"); + return "ok"; + } + } +`) + +let dbg = new Debugger(g); +dbg.onEnterFrame = frame => { + if (!("hits" in frame)) { + frame.hits = 1; + } else if (++frame.hits === 2) { + // First hit happens when g.af() is called; + // second hit is resuming at the `await` inside the try block. + return {throw: "fit"}; + } +}; + +let p = g.af(); +let hits = 0; +p.then(value => { + result = value; + hits++; +}); +drainJobQueue(); +assertEq(hits, 1); +assertEq(result, "ok"); + diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-05.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-05.js new file mode 100644 index 0000000000..a0d9887c80 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-05.js @@ -0,0 +1,41 @@ +// A Debugger can't force-return from the first onEnterFrame for an async generator. + +ignoreUnhandledRejections(); + +let g = newGlobal({newCompartment: true}); +g.eval(`async function* f(x) { await x; return "ponies"; }`); + +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); +let log = ""; +let completion = undefined; +let resumption = undefined; +dbg.uncaughtExceptionHook = exc => { + log += "2"; + assertEq(exc.message, "can't force return from a generator before the initial yield"); + assertEq(exc.constructor, TypeError); + return undefined; // Squelch the error and let the debuggee continue. +}; +dbg.onEnterFrame = frame => { + if (frame.type == "call" && frame.callee.name === "f") { + frame.onPop = c => { + // We get here after the uncaughtExcpetionHook fires + // and the debuggee frame has run to the first await. + completion = c; + assertEq(completion.return.class, "AsyncGenerator"); + assertEq(completion.return !== resumption.return, true); + log += "3"; + }; + + // Try force-returning an actual object of the expected type. + dbg.onEnterFrame = undefined; // don't recurse + resumption = frame.eval('f(0)'); + assertEq(resumption.return.class, "AsyncGenerator"); + log += "1"; + return resumption; + } +}; + +let it = g.f(0); +assertEq(log, "123"); +assertEq(gw.makeDebuggeeValue(it), completion.return); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-06.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-06.js new file mode 100644 index 0000000000..e7ecab1754 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-06.js @@ -0,0 +1,49 @@ +// A Debugger can {return:} from the first onEnterFrame for an async function. +// (The exact behavior is undocumented; we're testing that it doesn't crash.) + +ignoreUnhandledRejections(); + +let g = newGlobal({newCompartment: true}); +g.eval(`async function f(x) { await x; return "ponies"; }`); +g.eval(`async function f2(x) { await x; return "moar ponies"; }`); + +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); +let hits = 0; +let resumption = undefined; +let savedAsyncGen = undefined; +dbg.onEnterFrame = frame => { + if (frame.type == "call" && frame.callee.name === "f2") { + frame.onPop = completion => { + if (savedAsyncGen === undefined) { + savedAsyncGen = completion.return; + } + }; + } + if (frame.type == "call" && frame.callee.name === "f") { + frame.onPop = completion => { + hits++; + }; + + return {return: savedAsyncGen}; + } +}; + +let p2 = g.f2(0); +let p = g.f(0); + +assertEq(hits, 1); + +drainJobQueue(); + +assertEq(hits, 1); + +let pw2 = gw.makeDebuggeeValue(p2); +assertEq(pw2.isPromise, true); +assertEq(pw2.promiseState, "fulfilled"); +assertEq(pw2.promiseValue, "moar ponies"); + +let pw = gw.makeDebuggeeValue(p); +assertEq(pw.isPromise, true); +assertEq(pw.promiseState, "fulfilled"); +assertEq(pw.promiseValue, "moar ponies"); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-07.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-07.js new file mode 100644 index 0000000000..578d93ff99 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-07.js @@ -0,0 +1,62 @@ +// A Debugger can't force-return from the first onEnterFrame for an async generator. + +ignoreUnhandledRejections(); + +let g = newGlobal({newCompartment: true}); +g.eval(`async function* f(x) { await x; return "ponies"; }`); + +let dbg = new Debugger; +dbg.uncaughtExceptionHook = exc => {}; // ignore errors +let gw = dbg.addDebuggee(g); +let hits = 0; +let resumption = undefined; + +dbg.onEnterFrame = frame => { + dbg.onEnterFrame = undefined; + assertEq(frame.type, "call"); + assertEq(frame.callee.name, "f"); + frame.onPop = completion => { + hits++; + }; + + // Try to force-return. It's too early. This results in a call to the + // uncaughtExceptionHook but is otherwise ignored. + return {return: "rainbows"}; +}; +let it = g.f(0); // onPop #1: the initial yield +assertEq(hits, 1); +let p = it.next(); // onPop #2: await x +assertEq(hits, 2); +drainJobQueue(); // onPop #3: return "ponies", #4: the final yield +assertEq(hits, 4); + +let pw = gw.makeDebuggeeValue(p); +assertEq(pw.isPromise, true); +assertEq(pw.promiseState, "fulfilled"); +assertEq(pw.promiseValue.getProperty("value").return, "ponies"); +assertEq(pw.promiseValue.getProperty("done").return, true); + +// ---- + +g.eval(`async function* f2(x) { await x; return "moar ponies"; }`); + +let savedAsyncGen = undefined; +dbg.onEnterFrame = frame => { + dbg.onEnterFrame = undefined; + assertEq(frame.type, "call"); + assertEq(frame.callee.name, "f2"); + frame.onPop = completion => { + if (savedAsyncGen === undefined) { + savedAsyncGen = completion.return; + } + }; +}; +let it2 = g.f2(123); +let p2 = it2.next(); +drainJobQueue(); + +let pw2 = gw.makeDebuggeeValue(p2); +assertEq(pw2.isPromise, true); +assertEq(pw2.promiseState, "fulfilled"); +assertEq(pw2.promiseValue.getProperty("value").return, "moar ponies"); +assertEq(pw2.promiseValue.getProperty("done").return, true); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-08.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-08.js new file mode 100644 index 0000000000..f9760da7b7 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-08.js @@ -0,0 +1,53 @@ +// Terminate execution from within the onPop handler, the result promise will +// never be resolved. + +load(libdir + "array-compare.js"); + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +let log = []; +g.log = log; + +g.eval(` + async function f() { + log.push("START"); + await 0; + log.push("MIDDLE"); + await 0; + log.push("END"); + } +`); + +const expectedTick1 = ["START"]; +const expectedTickN = [ + "START", + "enter: f", + "MIDDLE", + "pop: f", +]; + +Promise.resolve(0) +.then(() => assertEq(arraysEqual(log, expectedTick1), true)) +.then(() => assertEq(arraysEqual(log, expectedTickN), true)) +.then(() => assertEq(arraysEqual(log, expectedTickN), true)) +.then(() => assertEq(arraysEqual(log, expectedTickN), true)) +.then(() => assertEq(arraysEqual(log, expectedTickN), true)) +.catch(e => { + // Quit with non-zero exit code to ensure a test suite error is shown, + // even when this function is called within promise handlers which normally + // swallow any exceptions. + print("Error: " + e + "\nstack:\n" + e.stack); + quit(1); +}); + +g.f(); + +dbg.onEnterFrame = frame => { + log.push(`enter: ${frame.callee.name}`); + + frame.onPop = () => { + log.push(`pop: ${frame.callee.name}`); + return null; // Terminate execution. + }; +}; diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-09.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-09.js new file mode 100644 index 0000000000..4992ced2aa --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-09.js @@ -0,0 +1,63 @@ +// Resume execution of async generator when initially yielding. + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(); +let gw = dbg.addDebuggee(g); + +g.eval(` + async function* f() { + await 123; + return "ponies"; + } +`); + +let counter = 0; +let thenCalled = false; +dbg.onEnterFrame = frame => { + frame.onPop = completion => { + if (counter++ === 0) { + let genObj = completion.return.unsafeDereference(); + + // The following call enqueues the request before it becomes + // suspendedStart, that breaks the assumption in the spec, + // and there's no correct interpretation. + genObj.next().then(() => { + thenCalled = true; + }); + } + }; +}; + +let it = g.f(); + +assertEq(counter, 1); + +let caught = false; +try { + // The async generator is already in the invalid state, and the following + // call fails. + it.next(); +} catch (e) { + caught = true; +} +assertEq(caught, true); + +caught = false; +try { + it.throw(); +} catch (e) { + caught = true; +} +assertEq(caught, true); + +caught = false; +try { + it.return(); +} catch (e) { + caught = true; +} +assertEq(caught, true); + +drainJobQueue(); + +assertEq(thenCalled, false); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-10.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-10.js new file mode 100644 index 0000000000..3dfeb112c2 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-10.js @@ -0,0 +1,24 @@ +// Resolve async function promise when initially awaiting. + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(); +let gw = dbg.addDebuggee(g); + +g.eval(` + var resolve; + var p = new Promise(r => { + resolve = r; + }); + + async function f() { + await p; + } +`); + +dbg.onEnterFrame = frame => { + frame.onPop = completion => { + g.resolve(0); + drainJobQueue(); + }; +}; +g.f(); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-11.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-11.js new file mode 100644 index 0000000000..32adf64d85 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-11.js @@ -0,0 +1,28 @@ +// If the async function's promise is already resolved, any attempt to return +// a differerent return value gets ignored. + +let g = newGlobal({newCompartment: true}); +g.eval(` + async function f() { + throw "ok"; + } +`); + +let dbg = new Debugger(g); + +let hits = 0; +dbg.onEnterFrame = frame => { + frame.onPop = () => { + hits += 1; + + // Normal functions can override the return value, but async functions + // have already resolved their promise, so this return request will get + // ignored. + return {return: "FAIL"}; + }; +}; + +g.f().catch(x => { + assertEq(hits, 1); + assertEq(x, "ok"); +}); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-12.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-12.js new file mode 100644 index 0000000000..28ad0c4c44 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-12.js @@ -0,0 +1,28 @@ +// If the async function's promise is already resolved, any attempt to return +// a differerent return value gets ignored. + +let g = newGlobal({newCompartment: true}); +g.eval(` + async function f() { + return "ok"; + } +`); + +let dbg = new Debugger(g); + +let hits = 0; +dbg.onEnterFrame = frame => { + frame.onPop = () => { + hits += 1; + + // Normal functions can override the return value, but async functions + // have already resolved their promise, so this return request will get + // ignored. + return {return: "FAIL"}; + }; +}; + +g.f().then(x => { + assertEq(hits, 1); + assertEq(x, "ok"); +}); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-13.js b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-13.js new file mode 100644 index 0000000000..f9e856a74c --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-resumption-13.js @@ -0,0 +1,21 @@ +// An onPop handler can return its input argument for async generators. The +// debugger correctly adjusts the state of the async generator object. + +let g = newGlobal({newCompartment: true}); +g.eval(` + async function* f() {} +`); + +let hits = 0; +let dbg = new Debugger(g); +dbg.onEnterFrame = frame => { + frame.onPop = completion => { + hits++; + return completion; + }; +}; + +let it = g.f(); +let p = it.next(); + +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-tryskipawait-01.js b/js/src/jit-test/tests/debug/onEnterFrame-async-tryskipawait-01.js new file mode 100644 index 0000000000..84bc5b63f7 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-tryskipawait-01.js @@ -0,0 +1,41 @@ +// CanSkipAwait with resolved Promises when attaching onEnterFrame +// after the initial call into the async function. + +load(libdir + "array-compare.js"); + +let g = newGlobal({ newCompartment: true }); +let dbg = new Debugger(g); + +let log = []; +g.log = log; + +g.eval(` + async function f() { + log.push("START"); + await Promise.resolve(0); + log.push("MIDDLE"); + await Promise.resolve(0); + log.push("END"); + } +`); + +function neverCalled(e) { + // Quit with non-zero exit code to ensure a test suite error is shown, + // even when this function is called within promise handlers which normally + // swallow any exceptions. + print("Error: " + e + "\nstack:\n" + e.stack); + quit(1); +} + +g.f().then(() => { + assertEq(arraysEqual(log, [ + "START", + "enter: f", + "MIDDLE", + "END", + ]), true); +}).catch(neverCalled); + +dbg.onEnterFrame = frame => { + log.push(`enter: ${frame.callee.name}`); +}; diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-tryskipawait-02.js b/js/src/jit-test/tests/debug/onEnterFrame-async-tryskipawait-02.js new file mode 100644 index 0000000000..a99b96a480 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-tryskipawait-02.js @@ -0,0 +1,41 @@ +// CanSkipAwait with primitive values when attaching onEnterFrame +// after the initial call into the async function. + +load(libdir + "array-compare.js"); + +let g = newGlobal({ newCompartment: true }); +let dbg = new Debugger(g); + +let log = []; +g.log = log; + +g.eval(` + async function f() { + log.push("START"); + await 0; + log.push("MIDDLE"); + await 0; + log.push("END"); + } +`); + +function neverCalled(e) { + // Quit with non-zero exit code to ensure a test suite error is shown, + // even when this function is called within promise handlers which normally + // swallow any exceptions. + print("Error: " + e + "\nstack:\n" + e.stack); + quit(1); +} + +g.f().then(() => { + assertEq(arraysEqual(log, [ + "START", + "enter: f", + "MIDDLE", + "END", + ]), true); +}).catch(neverCalled); + +dbg.onEnterFrame = frame => { + log.push(`enter: ${frame.callee.name}`); +}; diff --git a/js/src/jit-test/tests/debug/onEnterFrame-async-tryskipawait-03.js b/js/src/jit-test/tests/debug/onEnterFrame-async-tryskipawait-03.js new file mode 100644 index 0000000000..cff1edd115 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-async-tryskipawait-03.js @@ -0,0 +1,42 @@ +// CanSkipAwait with plain objects when attaching onEnterFrame +// after the initial call into the async function. + +load(libdir + "array-compare.js"); + +let g = newGlobal({ newCompartment: true }); +let dbg = new Debugger(g); + +let log = []; +g.log = log; + +g.eval(` + async function f() { + log.push("START"); + await {}; + log.push("MIDDLE"); + await {}; + log.push("END"); + } +`); + +function neverCalled(e) { + // Quit with non-zero exit code to ensure a test suite error is shown, + // even when this function is called within promise handlers which normally + // swallow any exceptions. + print("Error: " + e + "\nstack:\n" + e.stack); + quit(1); +} + +g.f().then(() => { + assertEq(arraysEqual(log, [ + "START", + "enter: f", + "MIDDLE", + "enter: f", // Await not optimised away in JSOP_TRYSKIPAWAIT! + "END", + ]), true); +}).catch(neverCalled); + +dbg.onEnterFrame = frame => { + log.push(`enter: ${frame.callee.name}`); +}; diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-01.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-01.js new file mode 100644 index 0000000000..6f94496eaf --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-01.js @@ -0,0 +1,82 @@ +// Frame properties and methods work in generator-resuming onEnterFrame events. +// Also tests onPop events, for good measure. + +let g = newGlobal({newCompartment: true}); +g.eval(`\ + function* gen(lo, hi) { + var a = 1/2; + yield a; + yield a * a; + } +`); +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); + +let hits = 0; +let savedScript = null; +let savedEnv = null; +let savedOffsets = new Set; + +function check(frame) { + assertEq(frame.type, "call"); + assertEq(frame.constructing, false); + assertEq(frame.callee, gw.makeDebuggeeValue(g.gen)); + + // `arguments` elements don't work in resumed generator frames, + // because generators don't keep the arguments around. + // However, some of this is initialized when the frame.arguments object is + // created, so if they are created during the first onEnterFrame or onPop + // event, the properties exist, and those events can also see the values. + assertEq(frame.arguments.length, args.length); + for (var i = 0; i < args.length; i++) { + assertEq(frame.arguments.hasOwnProperty(i), true); + + if (hits < 2) + assertEq(frame.arguments[i], gw.makeDebuggeeValue(args[i]), `arguments[${i}]`); + else + assertEq(frame.arguments[i], undefined); + } + + if (savedEnv === null) { + savedEnv = frame.environment; + assertEq(savedScript, null); + savedScript = frame.script; + } else { + assertEq(frame.environment, savedEnv); + assertEq(frame.script, savedScript); + } + let a_expected = hits < 3 ? undefined : 1/2; + assertEq(savedEnv.getVariable("a"), a_expected); + + assertEq(frame.onStack, true); + + let pc = frame.offset; + assertEq(savedOffsets.has(pc), false); + savedOffsets.add(pc); + + assertEq(frame.older, null); + assertEq(frame.this, gw.makeDebuggeeValue(g)); + assertEq(typeof frame.implementation, "string"); + + // And the moment of truth: + assertEq(frame.eval("2 + 2").return, 4); + assertEq(frame.eval("a").return, a_expected); + assertEq(frame.eval("if (a !== undefined) { assertEq(a < (lo + hi) / 2, true); } 7;").return, 7); +} + +dbg.onEnterFrame = frame => { + if (frame.type === "eval") + return; + check(frame); + hits++; + frame.onPop = completion => { + check(frame); + hits++; + }; +}; + +// g.gen ignores the arguments passed to it, but we use them to test +// frame.arguments. +let args = [0, 10, g, dbg]; +for (let v of g.gen(...args)) {} +assertEq(hits, 8); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-02.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-02.js new file mode 100644 index 0000000000..5aa49a580d --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-02.js @@ -0,0 +1,27 @@ +// onEnterFrame fires after the [[GeneratorState]] is set to "executing". +// +// This test checks that Debugger doesn't accidentally make it possible to +// reenter a generator frame that's already on the stack. (Also tests a fun +// corner case in baseline debug-mode OSR.) + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval('function* f() { yield 1; yield 2; }'); +let dbg = Debugger(g); +let genObj = null; +let hits = 0; +dbg.onEnterFrame = frame => { + // The first time onEnterFrame fires, there is no generator object, so + // there's nothing to test. The generator object doesn't exist until + // JSOP_GENERATOR is reached, right before the initial yield. + if (genObj !== null) { + dbg.removeDebuggee(g); // avoid the DebuggeeWouldRun exception + assertThrowsInstanceOf(() => genObj.next(), g.TypeError); + dbg.addDebuggee(g); + hits++; + } +}; +genObj = g.f(); +for (let x of genObj) {} +assertEq(hits, 3); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-03.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-03.js new file mode 100644 index 0000000000..ac8adce373 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-03.js @@ -0,0 +1,25 @@ +// If onEnterFrame terminates a generator, the Frame is left in a sane but inactive state. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval("function* f(x) { yield x; }"); +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); + +let genFrame = null; +dbg.onDebuggerStatement = frame => { + dbg.onEnterFrame = frame => { + if (frame.callee == gw.getOwnPropertyDescriptor("f").value) { + genFrame = frame; + return null; + } + }; + assertEq(frame.eval("f(0);"), null); +}; + +g.eval("debugger;"); + +assertEq(genFrame instanceof Debugger.Frame, true); +assertEq(genFrame.onStack, false); +assertThrowsInstanceOf(() => genFrame.callee, Error); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-04.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-04.js new file mode 100644 index 0000000000..00f9d0f3b4 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-04.js @@ -0,0 +1,44 @@ +// When a generator frame is resumed, the onEnterFrame fires again. +// The same Frame object is passed. + +let g = newGlobal({newCompartment: true}); +g.eval(` + function* easyMode() {} + + function* f() { yield* "XYZ"; } + function* hardMode() { + for (let c1 of "AB") + for (let c2 of f()) + yield c1 + c2; + } +`); + +function test(mode, expected) { + let dbg = new Debugger(g); + let nextid = 1; + dbg.onEnterFrame = frame => { + if (frame.type == "call") { + if (!("id" in frame)) + frame.id = nextid++; + g.log += frame.id + "("; + + frame.onPop = rv => { + g.log += ")"; + }; + } + }; + + g.log = ""; + g.eval(` + for (let x of ${mode}()) + log += x; + `); + assertEq(g.log, expected); + dbg.removeDebuggee(g); +} + +// We fire onEnterFrame for the initial activation when a generator is first +// called, even though the initial yield happens before any body code. This is +// weird but at least it's consistent. +test("easyMode", "1()1()"); +test("hardMode", "1()1(2()2())AX1(2())AY1(2())AZ1(2()3()3())BX1(3())BY1(3())BZ1(3())"); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-05.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-05.js new file mode 100644 index 0000000000..cacb1b825b --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-05.js @@ -0,0 +1,34 @@ +// When resuming a generator triggers one Debugger's onEnterFrame handler, +// all Debuggers' Debugger.Frames become usable at once. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval(` + function* f() { + yield 1; + } +`); +let dbg1 = new Debugger(g); +let dbg2 = new Debugger(g); + +let hits = 0; +let savedFrame1; +let savedFrame2; +dbg1.onEnterFrame = frame => { + if (savedFrame1 === undefined) { + savedFrame1 = frame; + savedFrame2 = dbg2.getNewestFrame(); + } else { + hits++; + assertEq(savedFrame1, frame); + for (let f of [savedFrame2, savedFrame1]) { + assertEq(f.type, "call"); + assertEq(f.callee.name, "f"); + } + } +}; + +let values = [...g.f()]; +assertEq(hits, 2); +assertDeepEq(values, [1]); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-06.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-06.js new file mode 100644 index 0000000000..a19fdf7787 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-06.js @@ -0,0 +1,24 @@ +// Bug 1561935. Test interaction between debug traps for step mode and +// DebugAfterYield. + +let g = newGlobal({newCompartment: true}); +g.eval('function* f() { yield 1; yield 2; }'); +let dbg = Debugger(g); +let genObj = null; +let hits = 0; +dbg.onEnterFrame = frame => { + // The first time onEnterFrame fires, there is no generator object, so + // there's nothing to test. The generator object doesn't exist until + // JSOP_GENERATOR is reached, right before the initial yield. + if (genObj === null) { + // Trigger step mode. + frame.onStep = function() {}; + } else { + dbg.removeDebuggee(g); + dbg.addDebuggee(g); + hits++; + } +}; +genObj = g.f(); +for (let x of genObj) {} +assertEq(hits, 3); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-07.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-07.js new file mode 100644 index 0000000000..d6ac18d993 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-07.js @@ -0,0 +1,23 @@ +// Bug 1561935. Test interaction between debug traps for step mode and +// DebugAfterYield. + +let g = newGlobal({newCompartment: true}); +g.eval('function* f() { yield 1; yield 2; }'); +let dbg = Debugger(g); +let genObj = null; +let hits = 0; +dbg.onEnterFrame = frame => { + // The first time onEnterFrame fires, there is no generator object, so + // there's nothing to test. The generator object doesn't exist until + // JSOP_GENERATOR is reached, right before the initial yield. + if (genObj === null) { + // Trigger step mode. + frame.onStep = function() {}; + } else { + dbg.removeDebuggee(g); + hits++; + } +}; +genObj = g.f(); +for (let x of genObj) {} +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-08.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-08.js new file mode 100644 index 0000000000..493b718155 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-08.js @@ -0,0 +1,17 @@ +// Bug 1556033. Test behavior of onEnterFrame "return" completion +// values during explicit .throw() calls. + +let g = newGlobal({newCompartment: true}); +g.eval(`function* f(x) { }`); +let dbg = new Debugger(g); + +let it = g.f(); + +dbg.onEnterFrame = () => ({ return: "exit" }); +const result = it.throw(); +assertEq(result.value, "exit"); +assertEq(result.done, true); + +const result2 = it.next(); +assertEq(result2.value, undefined); +assertEq(result2.done, true); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-09.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-09.js new file mode 100644 index 0000000000..20bee8d35a --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-09.js @@ -0,0 +1,17 @@ +// Bug 1556033. Test behavior of onEnterFrame "return" completion +// values during explicit .return() calls. + +let g = newGlobal({newCompartment: true}); +g.eval(`function* f(x) { }`); +let dbg = new Debugger(g); + +let it = g.f(); + +dbg.onEnterFrame = () => ({ return: "exit" }); +const result = it.return(); +assertEq(result.value, "exit"); +assertEq(result.done, true); + +const result2 = it.next(); +assertEq(result2.value, undefined); +assertEq(result2.done, true); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-10.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-10.js new file mode 100644 index 0000000000..32546dc4d1 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-10.js @@ -0,0 +1,17 @@ +// Bug 1556033. Test behavior of onEnterFrame "return" completion +// values during explicit .next() calls. + +let g = newGlobal({newCompartment: true}); +g.eval(`function* f(x) { }`); +let dbg = new Debugger(g); + +let it = g.f(); + +dbg.onEnterFrame = () => ({ return: "exit" }); +const result = it.next(); +assertEq(result.value, "exit"); +assertEq(result.done, true); + +const result2 = it.next(); +assertEq(result2.value, undefined); +assertEq(result2.done, true); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-01.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-01.js new file mode 100644 index 0000000000..e768b91777 --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-01.js @@ -0,0 +1,36 @@ +// A debugger can {throw:} from onEnterFrame at any resume point in a generator. +// It closes the generator. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.eval(` + function* f() { yield 1; } + var exn = new TypeError("object too hairy"); +`); + +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); + +// Repeat the test for each onEnterFrame event. +// It fires up to three times: +// - when the generator g.f is called; +// - when we enter it to run to `yield 1`; +// - when we resume after the yield to run to the end. +for (let i = 0; i < 3; i++) { + let hits = 0; + dbg.onEnterFrame = frame => { + return hits++ < i ? undefined : {throw: gw.makeDebuggeeValue(g.exn)}; + }; + let genObj; + assertThrowsValue( + () => { + genObj = g.f(); + for (let x of genObj) {} + }, + g.exn + ); + assertEq(hits, i + 1); + if (hits > 1) + assertEq(genObj.next().done, true); +} diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-02.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-02.js new file mode 100644 index 0000000000..fa1a8f233b --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-02.js @@ -0,0 +1,39 @@ +// A Debugger can {return:} from onEnterFrame at any resume point in a generator. +// Force-returning closes the generator. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.values = [1, 2, 3]; +g.eval(`function* f() { yield* values; }`); + +let dbg = Debugger(g); + +// onEnterFrame will fire up to 5 times. +// - once for the initial call to g.f(); +// - four times at resume points: +// - initial resume at the top of the generator body +// - resume after yielding 1 +// - resume after yielding 2 +// - resume after yielding 3 (this resumption will run to the end). +// This test ignores the initial call and focuses on resume points. +for (let i = 1; i < 5; i++) { + let hits = 0; + dbg.onEnterFrame = frame => { + return hits++ < i ? undefined : {return: "we're done here"}; + }; + + let genObj = g.f(); + let actual = []; + while (true) { + let r = genObj.next(); + if (r.done) { + assertDeepEq(r, {value: "we're done here", done: true}); + break; + } + actual.push(r.value); + } + assertEq(hits, i + 1); + assertDeepEq(actual, g.values.slice(0, i - 1)); + assertDeepEq(genObj.next(), {value: undefined, done: true}); +} diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-03.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-03.js new file mode 100644 index 0000000000..b5461f2b8c --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-03.js @@ -0,0 +1,35 @@ +// Returning {throw:} from onEnterFrame when resuming inside a try block in a +// generator causes control to jump to the catch block. + +let g = newGlobal({newCompartment: true}); +g.eval(` + function* gen() { + try { + yield 0; + return "fail"; + } catch (exc) { + assertEq(exc, "fit"); + return "ok"; + } + } +`) + +let dbg = new Debugger(g); +let hits = 0; +dbg.onEnterFrame = frame => { + assertEq(frame.callee.name, "gen"); + if (++hits == 3) { + // First hit is when calling gen(); + // second hit is resuming at the implicit initial yield; + // third hit is resuming inside the try block. + return {throw: "fit"}; + } +}; + +let it = g.gen(); +let result = it.next(); +assertEq(result.done, false); +assertEq(result.value, 0); +result = it.next(); +assertEq(result.done, true); +assertEq(result.value, "ok"); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-04.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-04.js new file mode 100644 index 0000000000..969cb0c70b --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-04.js @@ -0,0 +1,34 @@ +// Returning {throw:} from onEnterFrame when resuming inside a try block in a +// generator causes control to jump to the finally block. + +let g = newGlobal({newCompartment: true}); +g.eval(` + function* gen() { + try { + yield 0; + return "fail"; + } finally { + return "ok"; // preempts exception unwinding + } + } +`) + +let dbg = new Debugger(g); +dbg.onEnterFrame = frame => { + if (!("hits" in frame)) { + frame.hits = 1; + } else if (++frame.hits == 3) { + // First hit is when calling gen(); + // second hit is resuming at the implicit initial yield; + // third hit is resuming inside the try block. + return {throw: "fit"}; + } +}; + +let it = g.gen(); +let result = it.next(); +assertEq(result.done, false); +assertEq(result.value, 0); +result = it.next(); +assertEq(result.done, true); +assertEq(result.value, "ok"); diff --git a/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-05.js b/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-05.js new file mode 100644 index 0000000000..f1f5a3860a --- /dev/null +++ b/js/src/jit-test/tests/debug/onEnterFrame-generator-resumption-05.js @@ -0,0 +1,22 @@ +// {return:} from the initial onEnterFrame for a generator is an error. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +g.values = [1, 2, 3]; +g.eval(`function* f(arr=values) { yield* arr; }`); + +let dbg = Debugger(g); + +let hits = 0; +dbg.onEnterFrame = frame => { + assertEq(frame.callee.name, "f"); + hits++; + return {return: 123}; +}; +dbg.uncaughtExceptionHook = exc => { + assertEq(exc instanceof TypeError, true); + return {throw: "REJECTED"}; +} +assertThrowsValue(g.f, "REJECTED"); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-01.js b/js/src/jit-test/tests/debug/onExceptionUnwind-01.js new file mode 100644 index 0000000000..ac2734c5e8 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-01.js @@ -0,0 +1,24 @@ +// Basic onExceptionUnwind hook test. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hit = false; +dbg.onExceptionUnwind = function (frame, exc) { + // onExceptionUnwind is called multiple times as the stack is unwound. + // Only check the first hit. + assertEq(arguments.length, 2); + assertEq(frame instanceof Debugger.Frame, true); + if (!hit) { + assertEq(exc, 101); + assertEq(frame.type, "call"); + assertEq(frame.callee.name, "f"); + assertEq(frame.older.type, "eval"); + hit = true; + } +}; + +g.eval("function f() { throw 101; }"); +assertThrowsValue(function () { g.eval("f();"); }, 101); +assertEq(hit, true); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-02.js b/js/src/jit-test/tests/debug/onExceptionUnwind-02.js new file mode 100644 index 0000000000..b66f32316c --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-02.js @@ -0,0 +1,47 @@ +// The onExceptionUnwind hook is called multiple times as the stack unwinds. + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.dbg = null; +g.eval("(" + function () { + dbg = new Debugger(debuggeeGlobal); + dbg.onExceptionUnwind = function (frame, exc) { + assertEq(frame instanceof Debugger.Frame, true); + assertEq(exc instanceof Debugger.Object, true); + var s = '!'; + for (var f = frame; f; f = f.older) + if (f.type === "call") + s += f.callee.name; + s += ', '; + debuggeeGlobal.log += s; + }; + } + ")();"); + +var log; + +function k() { + throw new Error("oops"); // hook call 1 +} + +function j() { + k(); // hook call 2 + log += 'j-unreached, '; +} + +function h() { + j(); // hook call 3 + log += 'h-unreached, '; +} + +function f() { + try { + h(); // hook call 4 + } catch (exc) { + log += 'f-catch'; + } +} + +log = ''; +f(); +g.dbg.enabled = false; +assertEq(log, '!kjhf, !jhf, !hf, !f, f-catch'); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-03.js b/js/src/jit-test/tests/debug/onExceptionUnwind-03.js new file mode 100644 index 0000000000..aa77b473fd --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-03.js @@ -0,0 +1,57 @@ +// The onExceptionUnwind hook is called multiple times as the stack unwinds. + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.dbg = null; +g.eval("(" + function () { + dbg = new Debugger(debuggeeGlobal); + dbg.onExceptionUnwind = function (frame, exc) { + assertEq(frame instanceof Debugger.Frame, true); + assertEq(exc instanceof Debugger.Object, true); + var s = '!'; + for (var f = frame; f; f = f.older) + if (f.type === "call") + s += f.callee.name; + s += ', '; + debuggeeGlobal.log += s; + }; + } + ")();"); + +var log; + +function k() { + try { + throw new Error("oops"); // hook call 1 + } finally { + log += 'k-finally, '; + } // hook call 2 +} + +function j() { + k(); // hook call 3 + log += 'j-unreached, '; +} + +function h() { + try { + j(); // hook call 4 + log += 'h-unreached, '; + } catch (exc) { + log += 'h-catch, '; + throw exc; // hook call 5 + } +} + +function f() { + try { + h(); // hook call 6 + } catch (exc) { + log += 'f-catch, '; + } + log += 'f-after, '; +} + +log = ''; +f(); +g.dbg.enabled = false; +assertEq(log, '!kjhf, k-finally, !kjhf, !jhf, !hf, h-catch, !hf, !f, f-catch, f-after, '); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-04.js b/js/src/jit-test/tests/debug/onExceptionUnwind-04.js new file mode 100644 index 0000000000..678d0bf4bb --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-04.js @@ -0,0 +1,17 @@ +// onExceptionUnwind is not called for exceptions thrown and handled in the debugger. +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +g.log = ''; +dbg.onDebuggerStatement = function (frame) { + try { + throw new Error("oops"); + } catch (exc) { + g.log += exc.message; + } +}; +dbg.onExceptionUnwind = function (frame) { + g.log += 'BAD'; +}; + +g.eval("debugger; log += ' ok';"); +assertEq(g.log, 'oops ok'); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-05.js b/js/src/jit-test/tests/debug/onExceptionUnwind-05.js new file mode 100644 index 0000000000..6138e89634 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-05.js @@ -0,0 +1,12 @@ +// onExceptionUnwind returning undefined does not affect the thrown exception. + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () {};"); + +var obj = new Error("oops"); +try { + throw obj; +} catch (exc) { + assertEq(exc, obj); +} diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-06.js b/js/src/jit-test/tests/debug/onExceptionUnwind-06.js new file mode 100644 index 0000000000..19dd33d02a --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-06.js @@ -0,0 +1,13 @@ +// onExceptionUnwind assigning to argv[1] does not affect the thrown exception. + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("function f(frame, exc) { f2 = function () { return exc; }; exc = 123; }"); +g.eval("new Debugger(parent).onExceptionUnwind = f;"); + +var obj = new Error("oops"); +try { + throw obj; +} catch (exc) { + assertEq(exc, obj); +} diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-07.js b/js/src/jit-test/tests/debug/onExceptionUnwind-07.js new file mode 100644 index 0000000000..c34e687d35 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-07.js @@ -0,0 +1,15 @@ +// Unwinding due to uncatchable errors does not trigger onExceptionUnwind. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits = 0; +dbg.onExceptionUnwind = function (frame, value) { hits = 'BAD'; }; +dbg.onDebuggerStatement = function (frame) { + if (hits++ === 0) + assertEq(frame.eval("debugger;"), null); + else + return null; +} + +assertEq(g.eval("debugger; 2"), 2); +assertEq(hits, 2); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-08.js b/js/src/jit-test/tests/debug/onExceptionUnwind-08.js new file mode 100644 index 0000000000..de804c5e3f --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-08.js @@ -0,0 +1,18 @@ +// Ensure that uncaught exceptions thrown in onExceptionUnwind do not +// propagate outward into debuggee execution. +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var frame; +dbg.onExceptionUnwind = function (f, x) { + frame = f; + assertEq(frame.onStack, true); + throw 'unhandled'; +}; +dbg.onDebuggerStatement = function(f) { + assertEq(f.eval('throw 42').throw, 42); + assertEq(frame.onStack, false); +}; +g.eval('debugger'); + +// Don't fail just because we reported an uncaught exception. +quit(0); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-09.js b/js/src/jit-test/tests/debug/onExceptionUnwind-09.js new file mode 100644 index 0000000000..b220ce8c51 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-09.js @@ -0,0 +1,15 @@ +// Ensure that ScriptDebugEpilogue gets called when onExceptionUnwind +// terminates execution. +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var frame; +dbg.onExceptionUnwind = function (f, x) { + frame = f; + assertEq(frame.onStack, true); + return null; +}; +dbg.onDebuggerStatement = function(f) { + assertEq(f.eval('throw 42'), null); + assertEq(frame.onStack, false); +}; +g.eval('debugger'); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-10.js b/js/src/jit-test/tests/debug/onExceptionUnwind-10.js new file mode 100644 index 0000000000..18f23e57b5 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-10.js @@ -0,0 +1,16 @@ +// Ensure that ScriptDebugEpilogue gets called when onExceptionUnwind +// terminates execution. +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var frame; +dbg.onExceptionUnwind = function (f, x) { + frame = f; + assertEq(frame.type, 'eval'); + assertEq(frame.onStack, true); + terminate(); +}; +dbg.onDebuggerStatement = function(f) { + assertEq(f.eval('throw 42'), null); + assertEq(frame.onStack, false); +}; +g.eval('debugger'); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-12.js b/js/src/jit-test/tests/debug/onExceptionUnwind-12.js new file mode 100644 index 0000000000..c11bf74217 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-12.js @@ -0,0 +1,14 @@ +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.hits = 0; +g.eval("new Debugger(parent).onExceptionUnwind = function () { hits++; };"); +function f() { + var x = f(); +} +try { + f(); +} catch (e) { + assertEq(e instanceof InternalError, true); +} finally { + assertEq(g.hits, 0); +} diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-13.js b/js/src/jit-test/tests/debug/onExceptionUnwind-13.js new file mode 100644 index 0000000000..ec12fa2a18 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-13.js @@ -0,0 +1,16 @@ +// |jit-test| error: 4 +// +// Test that we can handle doing debug mode OSR from onExceptionUnwind when +// settling on a pc without a Baseline ICEntry. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onExceptionUnwind = function () {}; + +g.eval("" + function f(y) { + if (y > 0) { + throw 4; + } +}); +g.eval("f(0)"); +g.eval("f(1)"); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-14.js b/js/src/jit-test/tests/debug/onExceptionUnwind-14.js new file mode 100644 index 0000000000..0322469283 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-14.js @@ -0,0 +1,23 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval("" + function f() { + throw 42; +}); + +g.eval("" + function g() { + throw new Error("42"); +}); + +// Call the functions once. This will compile them in Ion under --ion-eager. +g.eval("try { f(); } catch (e) { }"); +g.eval("try { g(); } catch (e) { }"); + +// Now set an onExceptionUnwind hook so that the Ion-compiled functions will +// try to bail out. The tail of the bytecode for f and g looks like 'throw; +// retrval', with 'retrval' being unreachable. Since 'throw' is resumeAfter, +// bailing out for debug mode will attempt to resume at 'retrval'. Test that +// this case is handled. +dbg.onExceptionUnwind = function f() { }; +g.eval("try { f(); } catch (e) { }"); +g.eval("try { g(); } catch (e) { }"); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-15.js b/js/src/jit-test/tests/debug/onExceptionUnwind-15.js new file mode 100644 index 0000000000..4e4361abe8 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-15.js @@ -0,0 +1,25 @@ +// Test that Ion->Baseline in-place debug mode bailout can recover the iterator +// from the snapshot in a for-of loop. + +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("Debugger(parent).onExceptionUnwind=(function() {})"); +function* throwInNext() { + yield 1; + yield 2; + yield 3; + throw 42; +} + +function f() { + for (var o of throwInNext()); +} + +var log = ""; +try { + f(); +} catch (e) { + log += e; +} + +assertEq(log, "42"); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-16.js b/js/src/jit-test/tests/debug/onExceptionUnwind-16.js new file mode 100644 index 0000000000..ece3e02c1b --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-16.js @@ -0,0 +1,54 @@ +// Test behavior of isInCatchScope on frame from loop iterator + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hit = false; +dbg.onExceptionUnwind = function (frame, exc) { + // onExceptionUnwind is called multiple times as the stack is unwound. + // Only check the first hit. + assertEq(frame instanceof Debugger.Frame, true); + assertEq(exc, 16); + if (!hit) { + hit = true; + { + assertEq(frame.type, "call"); + assertEq(frame.callee.name, "foo"); + assertEq(frame.older.type, "call"); + const { lineNumber, columnNumber } = frame.script.getOffsetMetadata(frame.offset); + assertEq(lineNumber, 3); + assertEq(columnNumber, 5); + + const isInCatchScope = frame.script.isInCatchScope(frame.offset); + assertEq(isInCatchScope, false); + } + + { + const { older } = frame; + assertEq(older.type, "call"); + assertEq(older.callee.name, "f"); + assertEq(older.type, "call"); + const { lineNumber, columnNumber } = older.script.getOffsetMetadata(older.offset); + assertEq(lineNumber, 7); + assertEq(columnNumber, 5); + + const isInCatchScope = older.script.isInCatchScope(older.offset); + assertEq(isInCatchScope, false); + } + } +}; + +g.eval( +`function f() { + function foo() { + throw 16; // <= first frame on exception is here + } + + for (const _ of [1]) { + foo(); // <= second frame, "older" is here + } +} +`); +assertThrowsValue(function () { g.eval("f();"); }, 16); +assertEq(hit, true); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-17.js b/js/src/jit-test/tests/debug/onExceptionUnwind-17.js new file mode 100644 index 0000000000..5f2e9bf4fe --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-17.js @@ -0,0 +1,58 @@ +// Test behavior of isInCatchScope on frame from loop iterator + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hit = false; +dbg.onExceptionUnwind = function (frame, exc) { + // onExceptionUnwind is called multiple times as the stack is unwound. + // Only check the first hit. + assertEq(frame instanceof Debugger.Frame, true); + assertEq(exc, 16); + if (!hit) { + hit = true; + { + assertEq(frame.type, "call"); + assertEq(frame.callee.name, "foo"); + assertEq(frame.older.type, "call"); + const { lineNumber, columnNumber } = frame.script.getOffsetMetadata(frame.offset); + assertEq(lineNumber, 3); + assertEq(columnNumber, 5); + + const isInCatchScope = frame.script.isInCatchScope(frame.offset); + assertEq(isInCatchScope, false); + } + + { + const { older } = frame; + assertEq(older.type, "call"); + assertEq(older.callee.name, "f"); + assertEq(older.type, "call"); + const { lineNumber, columnNumber } = older.script.getOffsetMetadata(older.offset); + assertEq(lineNumber, 8); + assertEq(columnNumber, 7); + + const isInCatchScope = older.script.isInCatchScope(older.offset); + assertEq(isInCatchScope, true); + } + } +}; + +g.eval( +`function f() { + function foo() { + throw 16; // <= first frame on exception is here + } + + try { + for (const _ of [1]) { + foo(); // <= second frame, "older" is here + } + } catch (e) { + throw e; + } +} +`); +assertThrowsValue(function () { g.eval("f();"); }, 16); +assertEq(hit, true); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-18.js b/js/src/jit-test/tests/debug/onExceptionUnwind-18.js new file mode 100644 index 0000000000..5f402dd904 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-18.js @@ -0,0 +1,58 @@ +// Test behavior of isInCatchScope on frame from loop iterator + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hit = false; +dbg.onExceptionUnwind = function (frame, exc) { + // onExceptionUnwind is called multiple times as the stack is unwound. + // Only check the first hit. + assertEq(frame instanceof Debugger.Frame, true); + assertEq(exc, 16); + if (!hit) { + hit = true; + { + assertEq(frame.type, "call"); + assertEq(frame.callee.name, "foo"); + assertEq(frame.older.type, "call"); + const { lineNumber, columnNumber } = frame.script.getOffsetMetadata(frame.offset); + assertEq(lineNumber, 3); + assertEq(columnNumber, 5); + + const isInCatchScope = frame.script.isInCatchScope(frame.offset); + assertEq(isInCatchScope, false); + } + + { + const { older } = frame; + assertEq(older.type, "call"); + assertEq(older.callee.name, "f"); + assertEq(older.type, "call"); + const { lineNumber, columnNumber } = older.script.getOffsetMetadata(older.offset); + assertEq(lineNumber, 8); + assertEq(columnNumber, 7); + + const isInCatchScope = older.script.isInCatchScope(older.offset); + assertEq(isInCatchScope, true); + } + } +}; + +g.eval( +`function f() { + function foo() { + throw 16; // <= first frame on exception is here + } + + for (const _ of [1]) { + try { + foo(); // <= second frame, "older" is here + } catch (e) { + throw e; + } + } +} +`); +assertThrowsValue(function () { g.eval("f();"); }, 16); +assertEq(hit, true); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-generators-01.js b/js/src/jit-test/tests/debug/onExceptionUnwind-generators-01.js new file mode 100644 index 0000000000..ec6b846df1 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-generators-01.js @@ -0,0 +1,39 @@ +// Generator/async frames can be created and revived by the onExceptionUnwind hook. +// +// Modified copy of Frame-older-generators-01.js. + +let g = newGlobal({newCompartment: true}); +g.eval(` + function* gen() { + try { throw new Error("bad"); } catch { } + yield 1; + try { throw new Error("bad"); } catch { } + } + async function af() { + try { throw new Error("bad"); } catch { } + await 1; + try { throw new Error("bad"); } catch { } + } +`); + +function test(expected, code) { + let dbg = Debugger(g); + let hits = 0; + let genFrame = null; + dbg.onExceptionUnwind = frame => { + hits++; + if (genFrame === null) { + genFrame = frame; + } else { + assertEq(frame, genFrame); + } + assertEq(genFrame.callee.name, expected); + } + + g.eval(code); + assertEq(hits, 2); + dbg.removeDebuggee(g); +} + +test("gen", "for (var x of gen()) {}"); +test("af", "af(); drainJobQueue();"); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-01.js b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-01.js new file mode 100644 index 0000000000..cccc444d79 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-01.js @@ -0,0 +1,9 @@ +// Check that an onExceptionUnwind hook can force a frame to return a value early. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onExceptionUnwind = function (frame, exc) { + return { return:"sproon" }; +}; +g.eval("function f() { throw 'ksnife'; }"); +assertEq(g.f(), "sproon"); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-02.js b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-02.js new file mode 100644 index 0000000000..9faaa886c6 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-02.js @@ -0,0 +1,10 @@ +// Check that if an onExceptionUnwind hook forces a constructor frame to +// return a primitive value, it still gets wrapped up in an object. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onExceptionUnwind = function (frame, exc) { + return { return:"sproon" }; +}; +g.eval("function f() { throw 'ksnife'; }"); +assertEq(typeof new g.f, "object"); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-03.js b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-03.js new file mode 100644 index 0000000000..f18290f15f --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-03.js @@ -0,0 +1,11 @@ +// Check that an onExceptionUnwind hook can force a frame to throw a different exception. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onExceptionUnwind = function (frame, exc) { + return { throw:"sproon" }; +}; +g.eval("function f() { throw 'ksnife'; }"); +assertThrowsValue(g.f, "sproon"); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-04.js b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-04.js new file mode 100644 index 0000000000..3b5f777952 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-04.js @@ -0,0 +1,17 @@ +// Check that an onExceptionUnwind hook can force a frame to terminate. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +g.eval("function f() { throw 'ksnife'; }"); +var log = ''; +dbg.onDebuggerStatement = function (frame) { + log += 'd1'; + assertEq(frame.eval("f();"), null); + log += 'd2'; +}; +dbg.onExceptionUnwind = function (frame, exc) { + log += 'u'; + return null; +}; +g.eval("debugger;"); +assertEq(log, "d1ud2"); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-05.js b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-05.js new file mode 100644 index 0000000000..00fe2aae44 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-05.js @@ -0,0 +1,32 @@ +// Make sure that stacks in completion values are not lost when an exception +// unwind hook returns undefined. + +let g = newGlobal({ newCompartment: true }); +g.eval(` + function foo() { + bar(); + } + function bar() { + throw new Error(); + } +`); + +let dbg = Debugger(g); +let unwindHits = 0, popHits = 0; +dbg.onExceptionUnwind = frame => { + unwindHits++; + return undefined; +} +dbg.onEnterFrame = frame => { + frame.onPop = completion => { + assertEq(completion.stack.functionDisplayName, "bar"); + popHits++; + }; +}; + +try { + g.eval("foo()"); +} catch (e) {} +assertEq(unwindHits, 3); +assertEq(popHits, 3); +dbg.removeDebuggee(g); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-async-02.js b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-async-02.js new file mode 100644 index 0000000000..00a05d545a --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-async-02.js @@ -0,0 +1,31 @@ +// |jit-test| error:all-jobs-completed-successfully +// Verifiy that onExceptionUnwind's force-return queues the promise +// microtask to run in the debuggee's job queue, not the debugger's +// AutoDebuggerJobQueueInterruption. + +let g = newGlobal({ newCompartment: true }); +g.eval(` + async function asyncFn(x) { + await Promise.resolve(); + throw new Error(); + } + function enterDebuggee(){} +`); +const dbg = new Debugger(g); + +(async function() { + let it = g.asyncFn(); + + // Force-return when the exception throws after await resume. + dbg.onExceptionUnwind = () => { + return { return: "exit" }; + }; + + const result = await it; + assertEq(result, "exit"); + // If execution here is resumed from the debugger's queue, this call will + // trigger DebuggeeWouldRun exception. + g.enterDebuggee(); + + throw "all-jobs-completed-successfully"; +})(); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-async.js b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-async.js new file mode 100644 index 0000000000..1c74d56c89 --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-async.js @@ -0,0 +1,35 @@ +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); + +g.eval(` +async function f() { + return e; +} +`); + +// Just continue +dbg.onExceptionUnwind = function(frame) { + return undefined; +}; +g.eval(` +var E; +f().catch(e => { exc = e }); +drainJobQueue(); +assertEq(exc instanceof ReferenceError, true); +`); + +// Return with resumption value. +dbg.onExceptionUnwind = function(frame) { + return { + return: 10 + }; +}; +var val = g.eval(` +var val; +f().then(v => { val = v }); +drainJobQueue(); +val; +`); +assertEq(val, 10); diff --git a/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-generator.js b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-generator.js new file mode 100644 index 0000000000..5824016c6c --- /dev/null +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-generator.js @@ -0,0 +1,52 @@ +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); + +g.eval(` +function* f() { + e; +} +`); + +// To continue testing after uncaught exception, remember the exception and +// return normal completion. +var currentFrame; +var uncaughtException; +dbg.uncaughtExceptionHook = function(e) { + uncaughtException = e; + return { + return: "uncaught" + }; +}; +function testUncaughtException() { + uncaughtException = undefined; + var obj = g.eval(`f().next()`); + assertEq(obj.done, true); + assertEq(obj.value, 'uncaught'); + assertEq(uncaughtException instanceof TypeError, true); +} + +// Just continue +dbg.onExceptionUnwind = function(frame) { + return undefined; +}; +assertThrowsInstanceOf(() => g.eval(`f().next();`), g.ReferenceError); + +// Forced early return +dbg.onExceptionUnwind = function(frame) { + currentFrame = frame; + return { + return: "foo" + }; +}; +var obj = g.eval(`f().next()`); +assertEq(obj.done, true); +assertEq(obj.value, "foo"); + +// Bad resumption value +dbg.onExceptionUnwind = function(frame) { + currentFrame = frame; + return {declaim: "gadzooks"}; +}; +testUncaughtException(); diff --git a/js/src/jit-test/tests/debug/onNewScript-01.js b/js/src/jit-test/tests/debug/onNewScript-01.js new file mode 100644 index 0000000000..c43f32b999 --- /dev/null +++ b/js/src/jit-test/tests/debug/onNewScript-01.js @@ -0,0 +1,37 @@ +// Basic newScript hook tests. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var seen = new WeakMap(); +var hits = 0; +dbg.onNewScript = function (s) { + // Exceptions thrown from onNewScript are swept under the rug, but they + // will at least prevent hits from being the expected number. + assertEq(s instanceof Debugger.Script, true); + assertEq(!seen.has(s), true); + seen.set(s, true); + hits++; +}; + +dbg.uncaughtExceptionHook = function () { hits = -999; }; + +// eval code +hits = 0; +assertEq(g.eval("2 + 2"), 4); +assertEq(hits, 1); + +hits = 0; +assertEq(g.eval("eval('2 + 3')"), 5); +assertEq(hits, 2); + +// global code +hits = 0; +g.evaluate("3 + 4"); +assertEq(hits, 1); + +// function code +hits = 0; +var fn = g.Function("a", "return 5 + a;"); +assertEq(hits, 1); +assertEq(fn(8), 13); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/onNewScript-02.js b/js/src/jit-test/tests/debug/onNewScript-02.js new file mode 100644 index 0000000000..7cf1ea00f8 --- /dev/null +++ b/js/src/jit-test/tests/debug/onNewScript-02.js @@ -0,0 +1,59 @@ +// Creating a new script with any number of subscripts triggers the newScript hook exactly once. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var seen = new WeakMap(); +var hits; +dbg.onNewScript = function (s) { + assertEq(s instanceof Debugger.Script, true); + assertEq(!seen.has(s), true); + seen.set(s, true); + hits++; +}; + +dbg.uncaughtExceptionHook = function () { hits = -999; }; + +function test(f) { + hits = 0; + f(); + assertEq(hits, 1); +} + +// eval declaring a function +test(function () { g.eval("function A(m, n) { return m===0?n+1:n===0?A(m-1,1):A(m-1,A(m,n-1)); }"); }); + +// evaluate declaring a function +test(function () { g.eval("function g(a, b) { return b===0?a:g(b,a%b); }"); }); + +// eval declaring multiple functions +test(function () { + g.eval("function e(i) { return i===0||o(i-1); }\n" + + "function o(i) { return i!==0&&e(i-1); }\n"); +}); + +// eval declaring nested functions +test(function () { g.eval("function plus(x) { return function plusx(y) { return x + y; }; }"); }); + +// eval with a function-expression +test(function () { g.eval("[3].map(function (i) { return -i; });"); }); + +// eval with getters and setters +test(function () { g.eval("var obj = {get x() { return 1; }, set x(v) { print(v); }};"); }); + +// Function with nested functions +test(function () { return g.Function("a", "b", "return b - a;"); }); + +// eval declaring a star generator +test(function () { g.eval("function* sg(n) { for (var i=0;i") + assertEq(s.getChildScripts().length, 1); +}; + +global.eval('offThreadCompileToStencil("function inner() { \\\"use asm\\\"; function xxx() {} return xxx; }");'); +global.eval('var stencil = finishOffThreadStencil();'); +global.eval('evalStencil(stencil);'); diff --git a/js/src/jit-test/tests/debug/onNewScript-wasm-01.js b/js/src/jit-test/tests/debug/onNewScript-wasm-01.js new file mode 100644 index 0000000000..d169da6285 --- /dev/null +++ b/js/src/jit-test/tests/debug/onNewScript-wasm-01.js @@ -0,0 +1,33 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() +// Draining the job queue from an onNewScript hook reporting a streamed wasm +// module should not deadlock. + +ignoreUnhandledRejections(); + +try { + WebAssembly.compileStreaming(); + // Avoid mixing the test's jobs with the debuggee's, so that + // automated checks can make sure AutoSaveJobQueue only + // suspends debuggee work. + drainJobQueue(); +} catch (err) { + assertEq(String(err).indexOf("not supported with --no-threads") !== -1, true); + quit(); +} + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); + +var source = new g.Uint8Array(wasmTextToBinary('(module (func unreachable))')); +g.source = source; + +var dbg = new Debugger(g); +dbg.allowWasmBinarySource = true; +dbg.onNewScript = function (s, g) { + drainJobQueue(); +}; + +g.eval('WebAssembly.instantiateStreaming(source);'); + +drainJobQueue(); diff --git a/js/src/jit-test/tests/debug/onNewScript-wasm-02.js b/js/src/jit-test/tests/debug/onNewScript-wasm-02.js new file mode 100644 index 0000000000..3586fe4c2e --- /dev/null +++ b/js/src/jit-test/tests/debug/onNewScript-wasm-02.js @@ -0,0 +1,41 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() +// Draining the job queue from an onNewScript hook reporting a streamed wasm +// module should not deadlock. + +ignoreUnhandledRejections(); + +try { + WebAssembly.compileStreaming(); + // Avoid mixing the test's jobs with the debuggee's, so that + // automated checks can make sure AutoSaveJobQueue only + // suspends debuggee work. + drainJobQueue(); +} catch (err) { + assertEq(String(err).indexOf("not supported with --no-threads") !== -1, true); + quit(); +} + +var g = newGlobal({newCompartment: true}); + +var source = new g.Uint8Array(wasmTextToBinary('(module (func unreachable))')); +g.source = source; + +var dbg = new Debugger(g); +dbg.allowWasmBinarySource = true; +dbg.onNewScript = function (s, g) { + drainJobQueue(); +}; + +// For the old code to deadlock, OffThreadPromiseRuntimeState::internalDrain +// needs to get two Dispatchables at once when it swaps queues. A call to +// instantiateStreaming enqueues a job that will kick off a helper thread, so to +// make sure that two helper threads have had time to complete and enqueue their +// Dispatchables, we put a delay in the job queue after the helper thread +// launches. +g.eval(` + WebAssembly.instantiateStreaming(source); + WebAssembly.instantiateStreaming(source); + Promise.resolve().then(() => sleep(0.1)); +`); + +drainJobQueue(); diff --git a/js/src/jit-test/tests/debug/optimized-out-01.js b/js/src/jit-test/tests/debug/optimized-out-01.js new file mode 100644 index 0000000000..cb0210dcbf --- /dev/null +++ b/js/src/jit-test/tests/debug/optimized-out-01.js @@ -0,0 +1,47 @@ +// Tests that we can reflect optimized out values. +// +// Unfortunately these tests are brittle. They depend on opaque JIT heuristics +// kicking in. + +// Use gczeal 0 to keep CGC from invalidating Ion code and causing test failures. +gczeal(0); + +load(libdir + "jitopts.js"); + +if (!jitTogglesMatch(Opts_Ion2NoOffthreadCompilation)) + quit(0); + +withJitOptions(Opts_Ion2NoOffthreadCompilation, function () { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + + // Note that this *depends* on CCW scripted functions being opaque to Ion + // optimization and not deoptimizing the frames below the call to toggle. + g.toggle = function toggle(d) { + if (d) { + dbg.addDebuggee(g); + var frame = dbg.getNewestFrame(); + assertEq(frame.implementation, "ion"); + // x is unused and should be elided. + assertEq(frame.environment.getVariable("x").optimizedOut, true); + assertEq(frame.arguments[1].optimizedOut, true); + } + }; + + g.eval("" + function f(d, x) { + "use strict"; + eval("g(d, x)"); // `eval` to avoid inlining g. + }); + + g.eval("" + function g(d, x) { + "use strict"; + for (var i = 0; i < 100; i++); + toggle(d); + }); + + g.eval("(" + function test() { + for (i = 0; i < 15; i++) + f(false, 42); + f(true, 42); + } + ")();"); +}); diff --git a/js/src/jit-test/tests/debug/optimized-out-02.js b/js/src/jit-test/tests/debug/optimized-out-02.js new file mode 100644 index 0000000000..c7690cca7a --- /dev/null +++ b/js/src/jit-test/tests/debug/optimized-out-02.js @@ -0,0 +1,38 @@ +// Test that prevUpToDate on frames are cleared. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval(` +function outer(unaliasedArg) { + var unaliasedVar = unaliasedArg + 42; + var aliasedVar = unaliasedArg; + + inner(); + return unaliasedVar; // To prevent the JIT from optimizing out unaliasedVar. + + function inner() { + aliasedVar++; + } +} +`); + +var log = ""; +for (var script of dbg.findScripts()) { + if (script.displayName === "inner") { + script.setBreakpoint(0, { hit: function(frame) { + // Force updateLiveScopes. + var outerEnv = frame.environment; + + // Get the environment of outer's frame on the stack, so that we may + // recover unaliased bindings in the debug scope. + outerEnv = frame.older.environment; + log += outerEnv.getVariable('unaliasedArg'); // 42 + log += outerEnv.getVariable('unaliasedVar'); // 84 + log += outerEnv.getVariable('aliasedVar'); // 42 + }}); + } +} + +g.outer(42); +assertEq(log, "428442"); diff --git a/js/src/jit-test/tests/debug/optimized-out-03.js b/js/src/jit-test/tests/debug/optimized-out-03.js new file mode 100644 index 0000000000..7bf757c058 --- /dev/null +++ b/js/src/jit-test/tests/debug/optimized-out-03.js @@ -0,0 +1,48 @@ +// Test that eval-in-frame throws on accessing optimized out values. + +// Use gczeal 0 to keep CGC from invalidating Ion code and causing test failures. +gczeal(0); + +load(libdir + "jitopts.js"); + +if (!jitTogglesMatch(Opts_IonEagerNoOffthreadCompilation)) + quit(0); + +withJitOptions(Opts_IonEagerNoOffthreadCompilation, function() { + var dbgGlobal = newGlobal({newCompartment: true}); + var dbg = new dbgGlobal.Debugger(); + dbg.addDebuggee(this); + + var warmedUp = false; + function check() { + if (warmedUp) { + var a = dbg.getNewestFrame().older.eval("a") + assertEq(a.throw.unsafeDereference().toString(), + "Error: variable 'a' has been optimized out"); + } + } + + // Test optimized-out binding in function scope. + function testFunctionScope() { + var a = 1; + for (var i = 0; i < 1; i++) { check(); } + } + + // Test optimized-out binding in block scope. + function testBlockScope() { + { + let a = 1; + for (var i = 0; i < 1; i++) { check(); } + } + } + + with({}) {} + + testFunctionScope(); + testBlockScope(); + + warmedUp = true; + + testFunctionScope(); + testBlockScope(); +}); diff --git a/js/src/jit-test/tests/debug/optimized-out-arrow-this.js b/js/src/jit-test/tests/debug/optimized-out-arrow-this.js new file mode 100644 index 0000000000..adc1702fa1 --- /dev/null +++ b/js/src/jit-test/tests/debug/optimized-out-arrow-this.js @@ -0,0 +1,38 @@ +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval(` +function f() { + // |this| in arrow-functions refers to the |this| binding in outer functions. + // So when |frame.eval("this")| is executed, the outer |this| binding should + // be returned, unless it has been optimised out. + (() => {})(); + + // Ensure a |this| binding is created for |f|. + return this; +} +`); + +var errors = []; + +function enterFrame(frame) { + // Disable the handler so we don't call it recursively through |frame.eval|. + dbg.onEnterFrame = undefined; + + // Store the error when resolving |this| was unsuccessful. + var r = frame.eval("this"); + if (r.throw) { + errors.push(r.throw); + } + + // Re-enable the handler. + dbg.onEnterFrame = enterFrame; +}; + +dbg.onEnterFrame = enterFrame; + +g.f(); + +assertEq(errors.length, 1); +assertEq(errors[0].unsafeDereference().toString(), + "Error: variable 'this' has been optimized out"); diff --git a/js/src/jit-test/tests/debug/private-methods-eval-in-frame.js b/js/src/jit-test/tests/debug/private-methods-eval-in-frame.js new file mode 100644 index 0000000000..5122cfa56b --- /dev/null +++ b/js/src/jit-test/tests/debug/private-methods-eval-in-frame.js @@ -0,0 +1,218 @@ +load(libdir + 'evalInFrame.js'); + +class B { + #priv() { + return 12; + } + + #privF = () => { return 12; } + + callPriv() { + return this.#priv(); + } + + callPrivF() { + return this.#privF(); + } + + #val = 'constructed'; + set #x(x) { + this.#val = x + ' haha'; + } + get #x() { + return this.#val; + } + + ef(str) { + return evalInFrame(0, str); + } + + layerEf(str) { + // Nested functions here result in computeEffectiveScope traversing + // more than one environment, necessitating more hops. + function tester(o) { + let a = 10; + function interior(o) { + let b = a; + return evalInFrame(0, str.replace("this", "o")); + }; + return interior(o); + } + return tester(this); + } + + moreLayerEf(str) { + // Nested functions here result in computeEffectiveScope traversing + // more than one environment, necessitating more hops. + function tester(o) { + let a = 0; + function interior(o) { + let b = a; + return (() => { + let k = o; + let replace = str.replace("this", "k"); + print(replace); + return evalInFrame(b, replace); + })(); + }; + return interior(o); + } + return tester(this); + } + + callFunc(f) { + return f(); + } + + static #smethod() { + return 14; + } + + static #unusedmethod() { + return 19; + } + + static get #unusedgetter() { + return 10; + } + + static setter = undefined; + static set #unusedsetter(x) { this.setter = x } + + + static f() { + return this.#smethod(); + } + + static seval(str) { + return eval(str); + } + + static sef(str) { + return evalInFrame(0, str); + } + + + static sLayerEf(str) { + // Nested functions here result in computeEffectiveScope traversing + // more than one environment, necessitating more hops. + function tester(o) { + let a = 10; + function interior(o) { + if (a == 10) { + let b = 10 - a; + return evalInFrame(b, str.replace("this", "o")); + } + }; + return interior(o); + } + return tester(this); + } + + +} + +var b = new B(); + +assertEq(b.ef("this.callPriv()"), 12); +assertEq(b.ef("this.callPrivF()"), 12); + +// Private fields don't need brand checking and should succeed. +assertEq(b.ef("this.#val"), 'constructed') + +// PrivF is a field, not a method, and so isn't brand checked like a method. +assertEq(b.ef(`this.callFunc(() => { return this.#privF() })`), 12); +assertEq(b.ef(`this.#privF()`), 12); + +// Accesors are stored like fields, and so successfully execute, as they don't +// need brand checking. +assertEq(b.ef(`this.#x = 'Bye'; this.#x`), 'Bye haha'); +assertEq(b.ef(`var x = () => { this.#x = 'Hi'; return this.#x}; x()`), 'Hi haha'); + + +// // Private methods require very special brand checking. +assertEq(b.ef(`this.#priv()`), 12); +assertEq(b.ef(`let hello; +let f = () => { + hello = this.#priv(); + assertEq(hello, 12); +}; +f(); +hello`), 12); +assertEq(b.layerEf(`this.#priv()`), 12); +assertEq(b.moreLayerEf(`this.#priv()`), 12); + +if ('dis' in this) { + // Ensure disassembly of GetAliasedDebugVar wroks. + assertEq(b.ef(`dis(); this.#priv()`), 12); +} + +assertEq(b.ef(`var x = () => { return this.#priv(); }; x()`), 12); +assertEq(b.ef(`function x(o) { function y(o) { return o.#priv(); }; return y(o); } x(this)`), 12); + +assertEq(b.ef("B.#smethod()"), 14) +assertEq(b.ef("B.#unusedmethod()"), 19); +assertEq(b.ef("B.#unusedgetter"), 10); + +b.ef("B.#unusedsetter = 19"); +assertEq(B.setter, 19); + +assertEq(B.f(), 14); +assertEq(B.sef(`this.#smethod()`), 14); +assertEq(B.sLayerEf(`this.#smethod()`), 14); +assertEq(B.sef("this.#unusedmethod()"), 19); +assertEq(B.sef("this.#unusedgetter"), 10); + + +B.sef("this.#unusedsetter = 13"); +assertEq(B.setter, 13); + +// Test case variant from Arai. +class C { + #priv() { + return 12; + } + + efInFunction(str) { + return (() => { + let self = this; + return evalInFrame(0, str); + })(); + } +} +c = new C; +assertEq(c.efInFunction(`self.#priv()`), 12); + +// JIT testing +assertEq(b.ef(` +let result; +let f = () => { + result = this.#priv(); + assertEq(result, 12); +}; +for (let i = 0; i < 1000; i++) { + f(); +} +result +`), 12); + +assertEq(b.ef("function f(o) { return o.callPriv() }; for (let i = 0; i < 1000; i++) { f(this); } f(this)"), 12); +assertEq(b.ef("function f(o) { return o.callPrivF() }; for (let i = 0; i < 1000; i++) { f(this); } f(this)"), 12); +assertEq(b.ef(`function x(o) { function y(o) { return o.#priv(); }; return y(o); } x(this)`), 12); + +assertEq(B.sef(`function f(o) { return o.#smethod() }; for (let i = 0; i < 1000; i ++) { f(this); }; f(this)`), 14); + +assertEq(b.ef(` +var x = () => { + return (() => { + return (() => { + let a; + return (() => { + let b = a; + return this.#priv(); + })(); + })(); + })(); +}; +x() +`), 12); \ No newline at end of file diff --git a/js/src/jit-test/tests/debug/prologueFailure-01.js b/js/src/jit-test/tests/debug/prologueFailure-01.js new file mode 100644 index 0000000000..369941e432 --- /dev/null +++ b/js/src/jit-test/tests/debug/prologueFailure-01.js @@ -0,0 +1,32 @@ +g = newGlobal({newCompartment: true}); +g.parent = this; + +function installHook() { + let calledTimes = 0; + function hook() { + calledTimes++; + + // Allow the new.target.prototype get to throw. + if (calledTimes === 1) + return undefined; + + return { + return: undefined + }; + } + + Debugger(parent).onExceptionUnwind = hook; +} + + +g.eval("(" + installHook + ")()"); + +var handler = { + get(t, p) { + throw new TypeError; + } +}; + + +var f = new Proxy(function(){}, handler); +new f(); diff --git a/js/src/jit-test/tests/debug/prologueFailure-02.js b/js/src/jit-test/tests/debug/prologueFailure-02.js new file mode 100644 index 0000000000..54bde11d05 --- /dev/null +++ b/js/src/jit-test/tests/debug/prologueFailure-02.js @@ -0,0 +1,49 @@ +g = newGlobal({newCompartment: true}); +g.parent = this; + +function installHook() { + let calledTimes = 0; + function hook(frame) { + calledTimes++; + switch (calledTimes) { + case 1: + // Proxy get trap + assertEq(frame.type, "call"); + assertEq(frame.script.displayName.includes("get"), true); + break; + case 2: + // wrapper function. There is no entry for notRun + assertEq(frame.type, "call"); + assertEq(frame.script.displayName.includes("wrapper"), true); + break; + case 3: + assertEq(frame.type, "global"); + // Force the top-level to return cleanly, so that we can tell + // assertion failures from the intended throwing. + return { return: undefined }; + + default: + // that's the whole chain. + assertEq(false, true); + } + } + + Debugger(parent).onExceptionUnwind = hook; +} + + +g.eval("(" + installHook + ")()"); + +var handler = { + get(t, p) { + throw new TypeError; + } +}; + +function notRun() {} + +function wrapper() { + var f = new Proxy(notRun, handler); + new f(); +} +wrapper(); diff --git a/js/src/jit-test/tests/debug/prologueFailure-03.js b/js/src/jit-test/tests/debug/prologueFailure-03.js new file mode 100644 index 0000000000..d404428c0a --- /dev/null +++ b/js/src/jit-test/tests/debug/prologueFailure-03.js @@ -0,0 +1,26 @@ +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("(" + function() { + let calledTimes = 0; + Debugger(parent).onExceptionUnwind = function(frame) { + switch (calledTimes++) { + case 0: + assertEq(frame.older.type, "global"); + break; + case 1: + // Force toplevel to return placidly so that we can tell assertions + // from the throwing in the test. + assertEq(frame.older, null); + return { return: undefined }; + default: + assertEq(false, true); + } + } +} + ")()"); + +var handler = { + get() { + r; + } +}; +new(new Proxy(function() {}, handler)); diff --git a/js/src/jit-test/tests/debug/relazify-debugee-script-01.js b/js/src/jit-test/tests/debug/relazify-debugee-script-01.js new file mode 100644 index 0000000000..1a16046b8b --- /dev/null +++ b/js/src/jit-test/tests/debug/relazify-debugee-script-01.js @@ -0,0 +1,14 @@ +var g = newGlobal({ newCompartment: true }); +var dbg = Debugger(g); + +dbg.collectCoverageInfo = true; + +g.eval(` + function fn() {} + fn(); +`); + +dbg = null; +gc(); + +relazifyFunctions(); diff --git a/js/src/jit-test/tests/debug/resumption-01.js b/js/src/jit-test/tests/debug/resumption-01.js new file mode 100644 index 0000000000..7fc9857ac7 --- /dev/null +++ b/js/src/jit-test/tests/debug/resumption-01.js @@ -0,0 +1,12 @@ +// Simple {throw:} resumption. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (stack) { return {throw: "oops"}; }; + +assertThrowsValue(function () { g.eval("debugger;"); }, "oops"); + +g.eval("function f() { debugger; }"); +assertThrowsValue(function () { g.f(); }, "oops"); diff --git a/js/src/jit-test/tests/debug/resumption-02.js b/js/src/jit-test/tests/debug/resumption-02.js new file mode 100644 index 0000000000..1762d61767 --- /dev/null +++ b/js/src/jit-test/tests/debug/resumption-02.js @@ -0,0 +1,9 @@ +// Simple {return:} resumption. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (stack) { return {return: 1234}; }; + +assertEq(g.eval("debugger; false;"), 1234); +g.eval("function f() { debugger; return 'bad'; }"); +assertEq(g.f(), 1234); diff --git a/js/src/jit-test/tests/debug/resumption-03.js b/js/src/jit-test/tests/debug/resumption-03.js new file mode 100644 index 0000000000..f48992ced6 --- /dev/null +++ b/js/src/jit-test/tests/debug/resumption-03.js @@ -0,0 +1,35 @@ +// Returning and throwing objects. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.eval("(" + function () { + var how, what; + var dbg = new Debugger(debuggeeGlobal); + dbg.onDebuggerStatement = function (frame) { + if (frame.callee.name === "configure") { + how = frame.arguments[0]; + what = frame.arguments[1]; + } else { + var resume = {}; + resume[how] = what; + return resume; + } + }; + } + ")();"); + +function configure(how, what) { debugger; } +function fire() { debugger; } + +var d = new Date; +configure('return', d); +assertEq(fire(), d); +configure('return', Math); +assertEq(fire(), Math); + +var x = new Error('oh no what are you doing'); +configure('throw', x); +assertThrowsValue(fire, x); +configure('throw', parseInt); +assertThrowsValue(fire, parseInt); diff --git a/js/src/jit-test/tests/debug/resumption-05.js b/js/src/jit-test/tests/debug/resumption-05.js new file mode 100644 index 0000000000..9c3f7cd54a --- /dev/null +++ b/js/src/jit-test/tests/debug/resumption-05.js @@ -0,0 +1,35 @@ +// null resumption value means terminate the debuggee + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.eval("(" + function () { + var dbg = new Debugger(debuggeeGlobal); + dbg.onDebuggerStatement = function (frame) { + if (frame.callee === null) { + // The first debugger statement below. + debuggeeGlobal.log += "1"; + var cv = frame.eval("f();"); + assertEq(cv, null); + debuggeeGlobal.log += "2"; + } else { + // The second debugger statement. + debuggeeGlobal.log += "3"; + assertEq(frame.callee.name, "f"); + return null; + } + }; + } + ")()"); + +var log = ""; +debugger; + +function f() { + log += "4"; + try { + debugger; // the debugger terminates us here + } finally { + log += "5"; // this should not execute + } +} + +assertEq(log, "1432"); diff --git a/js/src/jit-test/tests/debug/resumption-07.js b/js/src/jit-test/tests/debug/resumption-07.js new file mode 100644 index 0000000000..2ba239e81a --- /dev/null +++ b/js/src/jit-test/tests/debug/resumption-07.js @@ -0,0 +1,34 @@ +// Return resumption values to non-debuggee frames. + +load(libdir + 'asserts.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; + +var log; + +function handlerWithResumption(resumption) { + return function (frame) { + log += 'd'; + dbg.removeDebuggee(g); + return resumption; + }; +} + +log = ''; +dbg.onDebuggerStatement = handlerWithResumption(undefined); +dbg.addDebuggee(g); +assertEq(g.eval('debugger; 42;'), 42); +assertEq(log, 'd'); + +log = ''; +dbg.onDebuggerStatement = handlerWithResumption({ return: 1729 }); +dbg.addDebuggee(g); +assertEq(g.eval('debugger; 42;'), 1729); +assertEq(log, 'd'); + +log = ''; +dbg.onDebuggerStatement = handlerWithResumption(null); +dbg.addDebuggee(g); +assertEq(g.evaluate('debugger; 42;', { catchTermination: true }), 'terminated'); +assertEq(log, 'd'); diff --git a/js/src/jit-test/tests/debug/resumption-08.js b/js/src/jit-test/tests/debug/resumption-08.js new file mode 100644 index 0000000000..044029584e --- /dev/null +++ b/js/src/jit-test/tests/debug/resumption-08.js @@ -0,0 +1,93 @@ +// Check whether we respect resumption values when toggling debug mode on->off +// from various points with live scripts on the stack. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; + +function reset() { + dbg.onEnterFrame = undefined; + dbg.onDebuggerStatement = undefined; + dbg.addDebuggee(g); + g.eval("(" + function test() { + for (i = 0; i < 5; i++) + f(42); + } + ")();"); +} + +g.eval("" + function f(d) { + return g(d); +}); + +g.eval("" + function g(d) { + debugger; + return d; +}); + +function testResumptionValues(handlerSetter) { + // Test normal return. + reset(); + handlerSetter(undefined); + assertEq(g.eval("(" + function test() { return f(42); } + ")();"), 42); + + // Test forced return. + reset(); + handlerSetter({ return: "not 42" }); + assertEq(g.eval("(" + function test() { return f(42); } + ")();"), "not 42"); + + // Test throw. + reset(); + handlerSetter({ throw: "thrown 42" }); + try { + g.eval("(" + function test() { return f(42); } + ")();");; + } catch (e) { + assertEq(e, "thrown 42"); + } +} + +// Turn off from within the prologue. +testResumptionValues(function (resumptionVal) { + dbg.onEnterFrame = function (frame) { + if (frame.older) { + if (frame.older.older) { + dbg.removeDebuggee(g); + return resumptionVal; + } + } + }; +}); + +// Turn off from within the epilogue. +testResumptionValues(function (resumptionVal) { + dbg.onEnterFrame = function (frame) { + if (frame.older) { + if (frame.older.older) { + frame.onPop = function () { + dbg.removeDebuggee(g); + return resumptionVal; + }; + } + } + }; +}); + +// Turn off from within debugger statement handler. +testResumptionValues(function (resumptionVal) { + dbg.onDebuggerStatement = function (frame) { + dbg.removeDebuggee(g); + return resumptionVal; + }; +}); + +// Turn off from within debug trap handler. +testResumptionValues(function (resumptionVal) { + dbg.onEnterFrame = function (frame) { + if (frame.older) { + if (frame.older.older) { + frame.onStep = function () { + dbg.removeDebuggee(g); + return resumptionVal; + } + } + } + }; +}); diff --git a/js/src/jit-test/tests/debug/resumption-09.js b/js/src/jit-test/tests/debug/resumption-09.js new file mode 100644 index 0000000000..5a04a32aea --- /dev/null +++ b/js/src/jit-test/tests/debug/resumption-09.js @@ -0,0 +1,41 @@ +// Test exception stack behavior when reusing completion values as resumption +// values. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +g.eval(` + function foo() { + bar(); + } + function bar() { + debugger; + } + function baz() { + throw new Error(); + } +`); + +var dbg = Debugger(g); +dbg.onDebuggerStatement = frame => { + return frame.eval("baz()"); +}; + +let popHits = 0; +dbg.onEnterFrame = frame => { + frame.onPop = completion => { + popHits++; + // Resumption values ignore any 'stack' property, and the script location of + // the place where the hook was called will be used when throwing. + if (popHits <= 2) { + assertEq(completion.stack.functionDisplayName, "baz"); + } else { + assertEq(completion.stack.functionDisplayName, "bar"); + } + }; +}; + +try { + g.eval("foo()"); +} catch (e) {} +assertEq(popHits, 5); diff --git a/js/src/jit-test/tests/debug/resumption-error-01.js b/js/src/jit-test/tests/debug/resumption-error-01.js new file mode 100644 index 0000000000..65cf81abb5 --- /dev/null +++ b/js/src/jit-test/tests/debug/resumption-error-01.js @@ -0,0 +1,7 @@ +// A resumption value can't have both {return:} and {throw:} properties. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = stack => ({return: 1, throw: 2}); +dbg.uncaughtExceptionHook = exc => ({return: "corrected"}); +assertEq(g.eval("debugger; false;"), "corrected"); diff --git a/js/src/jit-test/tests/debug/resumption-error-02.js b/js/src/jit-test/tests/debug/resumption-error-02.js new file mode 100644 index 0000000000..0b943d900e --- /dev/null +++ b/js/src/jit-test/tests/debug/resumption-error-02.js @@ -0,0 +1,16 @@ +// Error handling if parsing a resumption value throws. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var rv; +dbg.onDebuggerStatement = stack => rv; +dbg.uncaughtExceptionHook = function (exc) { + assertEq(exc, "BANG"); + return {return: "recovered"}; +}; + +rv = {get throw() { throw "BANG"; }}; +assertEq(g.eval("debugger; false;"), "recovered"); + +rv = new Proxy({}, {has() { throw "BANG"; }}); +assertEq(g.eval("debugger; false;"), "recovered"); diff --git a/js/src/jit-test/tests/debug/save-queue-resets-draining.js b/js/src/jit-test/tests/debug/save-queue-resets-draining.js new file mode 100644 index 0000000000..3d63c09bf8 --- /dev/null +++ b/js/src/jit-test/tests/debug/save-queue-resets-draining.js @@ -0,0 +1,18 @@ +// The draining state is reset when saving the job queue. + +let g = newGlobal({newCompartment: true}); + +let dbg = new Debugger(); +let gw = dbg.addDebuggee(g); + +dbg.onDebuggerStatement = frame => { + // Enqueue a new job from within the debugger while executing another job + // from outside of the debugger. + enqueueJob(function() {}); +}; + +g.eval(` + enqueueJob(function() { + debugger; + }); +`); diff --git a/js/src/jit-test/tests/debug/setter-argc.js b/js/src/jit-test/tests/debug/setter-argc.js new file mode 100644 index 0000000000..f56195d00d --- /dev/null +++ b/js/src/jit-test/tests/debug/setter-argc.js @@ -0,0 +1,52 @@ +// Check that setters throw TypeError when passed no arguments, instead of crashing. + +function check(obj) { + let proto = Object.getPrototypeOf(obj); + let props = Object.getOwnPropertyNames(proto); + for (let prop of props) { + let desc = Object.getOwnPropertyDescriptor(proto, prop); + if (desc.set) { + print("bleah: " + JSON.stringify(prop)); + assertEq(typeof desc.set, 'function'); + try { + desc.set.call(obj); + assertEq("should have thrown TypeError", false); + } catch (e) { + assertEq(e instanceof TypeError, true); + } + } + } +} + +var dbg = new Debugger; +var g = newGlobal({newCompartment: true}); +var gw = dbg.addDebuggee(g); + +// Debugger +check(dbg); + +// Debugger.Memory +check(dbg.memory); + +// Debugger.Object +g.eval('function f() { debugger; }'); +var fw = gw.getOwnPropertyDescriptor('f').value; +check(fw); + +// Debugger.Script +check(fw.script); + +// Debugger.Source +check(fw.script.source); + +// Debugger.Environment +check(fw.environment); + +// Debugger.Frame +var log = ''; +dbg.onDebuggerStatement = function(frame) { + log += 'd'; + check(frame); +} +g.eval('f()'); +assertEq(log, 'd'); diff --git a/js/src/jit-test/tests/debug/surfaces-01.js b/js/src/jit-test/tests/debug/surfaces-01.js new file mode 100644 index 0000000000..0907916a4d --- /dev/null +++ b/js/src/jit-test/tests/debug/surfaces-01.js @@ -0,0 +1,17 @@ +// Check superficial characteristics of functions and properties (not functionality). + +function checkFunction(obj, name, nargs) { + var desc = Object.getOwnPropertyDescriptor(obj, name); + assertEq(desc.configurable, true, name + " should be configurable"); + assertEq(desc.writable, true, name + " should be writable"); + assertEq(desc.enumerable, false, name + " should be non-enumerable"); + assertEq(desc.value, obj[name]); // well obviously + assertEq(typeof desc.value, 'function', name + " should be a function"); + assertEq(desc.value.length, nargs, name + " should have .length === " + nargs); +} + +checkFunction(this, "Debugger", 1); + +assertEq(Debugger.prototype.constructor, Debugger); +assertEq(Object.prototype.toString.call(Debugger.prototype), "[object Debugger]"); +assertEq(Object.getPrototypeOf(Debugger.prototype), Object.prototype); diff --git a/js/src/jit-test/tests/debug/surfaces-02.js b/js/src/jit-test/tests/debug/surfaces-02.js new file mode 100644 index 0000000000..66e95d0ec9 --- /dev/null +++ b/js/src/jit-test/tests/debug/surfaces-02.js @@ -0,0 +1,31 @@ +// Debugger.prototype.onDebuggerStatement + +load(libdir + 'asserts.js'); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +gc(); // don't assert marking debug hooks +assertEq(dbg.onDebuggerStatement, undefined); + +function f() {} + +assertThrowsInstanceOf(function () { dbg.onDebuggerStatement = null; }, TypeError); +assertThrowsInstanceOf(function () { dbg.onDebuggerStatement = "bad"; }, TypeError); +assertThrowsInstanceOf(function () { dbg.onDebuggerStatement = {}; }, TypeError); +dbg.onDebuggerStatement = f; +assertEq(dbg.onDebuggerStatement, f); + +assertEq(Object.getOwnPropertyNames(dbg).length, 0); +var desc = Object.getOwnPropertyDescriptor(Debugger.prototype, "onDebuggerStatement"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, false); + +assertThrowsInstanceOf(function () { desc.get(); }, TypeError); +assertThrowsInstanceOf(function () { desc.get.call(undefined); }, TypeError); +assertThrowsInstanceOf(function () { desc.get.call(Debugger.prototype); }, TypeError); +assertEq(desc.get.call(dbg), f); + +assertThrowsInstanceOf(function () { desc.set(); }, TypeError); +assertThrowsInstanceOf(function () { desc.set.call(dbg); }, TypeError); +assertThrowsInstanceOf(function () { desc.set.call({}, f); }, TypeError); +assertThrowsInstanceOf(function () { desc.set.call(Debugger.prototype, f); }, TypeError); diff --git a/js/src/jit-test/tests/debug/surfaces-03.js b/js/src/jit-test/tests/debug/surfaces-03.js new file mode 100644 index 0000000000..0c440c6836 --- /dev/null +++ b/js/src/jit-test/tests/debug/surfaces-03.js @@ -0,0 +1,19 @@ +// dumb basics of uncaughtExceptionHook + +load(libdir + 'asserts.js'); + +var desc = Object.getOwnPropertyDescriptor(Debugger.prototype, "uncaughtExceptionHook"); +assertEq(typeof desc.get, 'function'); +assertEq(typeof desc.set, 'function'); + +assertThrowsInstanceOf(function () { Debugger.prototype.uncaughtExceptionHook = null; }, TypeError); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +assertEq(desc.get.call(dbg), null); +assertThrowsInstanceOf(function () { dbg.uncaughtExceptionHook = []; }, TypeError); +assertThrowsInstanceOf(function () { dbg.uncaughtExceptionHook = 3; }, TypeError); +dbg.uncaughtExceptionHook = Math.sin; +assertEq(dbg.uncaughtExceptionHook, Math.sin); +dbg.uncaughtExceptionHook = null; +assertEq(dbg.uncaughtExceptionHook, null); diff --git a/js/src/jit-test/tests/debug/surfaces-offsets.js b/js/src/jit-test/tests/debug/surfaces-offsets.js new file mode 100644 index 0000000000..418361a924 --- /dev/null +++ b/js/src/jit-test/tests/debug/surfaces-offsets.js @@ -0,0 +1,37 @@ +// Invalid offsets result in exceptions, not bogus results. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +var hits; +dbg.onDebuggerStatement = function (frame) { + assertEq(frame.script.getOffsetLocation(frame.offset).lineNumber, g.line); + assertThrowsInstanceOf(function () { frame.script.getOffsetLocation(String(frame.offset)).lineNumber; }, Error); + assertThrowsInstanceOf(function () { frame.script.getOffsetLocation(Object(frame.offset)).lineNumber; }, Error); + + assertThrowsInstanceOf(function () { frame.script.getOffsetLocation(-1).lineNumber; }, Error); + assertThrowsInstanceOf(function () { frame.script.getOffsetLocation(1000000).lineNumber; }, Error); + assertThrowsInstanceOf(function () { frame.script.getOffsetLocation(0.25).lineNumber; }, Error); + assertThrowsInstanceOf(function () { frame.script.getOffsetLocation(+Infinity).lineNumber; }, Error); + assertThrowsInstanceOf(function () { frame.script.getOffsetLocation(-Infinity).lineNumber; }, Error); + assertThrowsInstanceOf(function () { frame.script.getOffsetLocation(NaN).lineNumber; }, Error); + + assertThrowsInstanceOf(function () { frame.script.getOffsetLocation(false).lineNumber; }, Error); + assertThrowsInstanceOf(function () { frame.script.getOffsetLocation(true).lineNumber; }, Error); + assertThrowsInstanceOf(function () { frame.script.getOffsetLocation(undefined).lineNumber; }, Error); + assertThrowsInstanceOf(function () { frame.script.getOffsetLocation().lineNumber; }, Error); + + // We assume that at least one whole number between 0 and frame.offset is invalid. + assertThrowsInstanceOf( + function () { + for (var i = 0; i < frame.offset; i++) + frame.script.getOffsetLocation(i).lineNumber; + }, + Error); + + hits++; +}; + +hits = 0; +g.eval("var line = new Error().lineNumber; debugger;"); diff --git a/js/src/jit-test/tests/debug/testEarlyReturnOnCall.js b/js/src/jit-test/tests/debug/testEarlyReturnOnCall.js new file mode 100644 index 0000000000..f783f5a1f0 --- /dev/null +++ b/js/src/jit-test/tests/debug/testEarlyReturnOnCall.js @@ -0,0 +1,24 @@ +var g = newGlobal({newCompartment: true}); +g.eval("var success = false"); +g.eval("function ponies() {}"); +g.eval("function foo() { ponies(); success = false }"); + +var dbg = new Debugger(g); +dbg.onEnterFrame = function(frame) { + // The goal here is force an early return on the 'call' instruction, + // which should be the 3rd step (callgname, undefined, call) + var step = 0; + frame.onStep = function() { + ++step; + if (step == 2) { + g.success = true; + return; + } + if (step == 3) + return { return: undefined } + } + frame.onPop = function() { new Error(); /* boom */ } +} + +g.foo(); +assertEq(g.success, true); diff --git a/js/src/jit-test/tests/debug/throw-exception-stack-location-async.js b/js/src/jit-test/tests/debug/throw-exception-stack-location-async.js new file mode 100644 index 0000000000..ece117cb0b --- /dev/null +++ b/js/src/jit-test/tests/debug/throw-exception-stack-location-async.js @@ -0,0 +1,25 @@ +ignoreUnhandledRejections(); + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(); +let gw = dbg.addDebuggee(g); + +g.eval(` +function throwValue(value) { + throw value; +} + +async function f() { + throwValue("exception-value"); +} + +this.promise = f(); +`); + +let promise = gw.makeDebuggeeValue(g.f()); + +assertEq(promise.isPromise, true); +assertEq(promise.promiseState, "rejected"); +if (promise.promiseResolutionSite !== null) { + assertEq(promise.promiseResolutionSite.toString().includes("throwValue"), true); +} diff --git a/js/src/jit-test/tests/debug/uncaughtExceptionHook-01.js b/js/src/jit-test/tests/debug/uncaughtExceptionHook-01.js new file mode 100644 index 0000000000..2303e2339f --- /dev/null +++ b/js/src/jit-test/tests/debug/uncaughtExceptionHook-01.js @@ -0,0 +1,19 @@ +// Uncaught exceptions in the debugger itself are delivered to the +// uncaughtExceptionHook. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log; +dbg.onDebuggerStatement = function () { + log += 'x'; + throw new TypeError("fail"); +}; +dbg.uncaughtExceptionHook = function (exc) { + assertEq(this, dbg); + assertEq(exc instanceof TypeError, true); + log += '!'; +}; + +log = ''; +g.eval("debugger"); +assertEq(log, 'x!'); diff --git a/js/src/jit-test/tests/debug/uncaughtExceptionHook-02.js b/js/src/jit-test/tests/debug/uncaughtExceptionHook-02.js new file mode 100644 index 0000000000..ee58b40182 --- /dev/null +++ b/js/src/jit-test/tests/debug/uncaughtExceptionHook-02.js @@ -0,0 +1,12 @@ +// Returning a bad resumption value causes an exception that is reported to the +// uncaughtExceptionHook. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function () { return {oops: "bad resumption value"}; }; +dbg.uncaughtExceptionHook = function (exc) { + assertEq(exc instanceof TypeError, true); + return {return: "pass"}; +}; + +assertEq(g.eval("debugger"), "pass"); diff --git a/js/src/jit-test/tests/debug/uncaughtExceptionHook-03.js b/js/src/jit-test/tests/debug/uncaughtExceptionHook-03.js new file mode 100644 index 0000000000..0924c8f023 --- /dev/null +++ b/js/src/jit-test/tests/debug/uncaughtExceptionHook-03.js @@ -0,0 +1,34 @@ +// |jit-test| error: ReferenceError +// If uncaughtExceptionHook is absent, the debuggee is terminated. + +var g = newGlobal({newCompartment: true}); +g.debuggeeGlobal = this; +g.eval("(" + function () { + var dbg = Debugger(debuggeeGlobal); + dbg.onDebuggerStatement = function (frame) { + if (frame.callee === null) { + debuggeeGlobal.log += '1'; + var cv = frame.eval("f();"); + debuggeeGlobal.log += '2'; + assertEq(cv, null); + } else { + assertEq(frame.callee.name, "f"); + debuggeeGlobal.log += '3'; + throw new ReferenceError("oops"); + } + }; + } + ")();"); + +function onerror(msg) { +} + +var log = ''; +debugger; +function f() { + try { + debugger; + } finally { + log += 'x'; + } +} +assertEq(log, '132'); diff --git a/js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-01.js b/js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-01.js new file mode 100644 index 0000000000..5ef62b6f6d --- /dev/null +++ b/js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-01.js @@ -0,0 +1,25 @@ +// uncaughtExceptionHook returns a resumption value. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var rv; +dbg.onDebuggerStatement = function () { throw 15; }; +dbg.uncaughtExceptionHook = function (exc) { + assertEq(exc, 15); + return rv; +}; + +// case 1: undefined +rv = undefined; +g.eval("debugger"); + +// case 2: throw +rv = {throw: 57}; +var result; +assertThrowsValue(function () { g.eval("debugger"); }, 57); + +// case 3: return +rv = {return: 42}; +assertEq(g.eval("debugger;"), 42); diff --git a/js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-02.js b/js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-02.js new file mode 100644 index 0000000000..3ba7070a7b --- /dev/null +++ b/js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-02.js @@ -0,0 +1,25 @@ +// uncaughtExceptionHook resumption value other than undefined does not cause +// further hooks to be skipped. + +var g = newGlobal({newCompartment: true}); +var log; + +function makeDebug(g, name) { + var dbg = new Debugger(g); + dbg.onDebuggerStatement = function (frame) { + log += name; + throw new Error(name); + }; + dbg.uncaughtExceptionHook = function (exc) { + assertEq(exc.message, name); + return name == "2" ? {return: 42} : undefined; + }; +} + +var arr = []; +for (var i = 0; i < 6; i++) + arr[i] = makeDebug(g, "" + i); + +log = ''; +assertEq(g.eval("debugger;"), 42); +assertEq(log, "012345"); diff --git a/js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-03.js b/js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-03.js new file mode 100644 index 0000000000..7835271e3c --- /dev/null +++ b/js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-03.js @@ -0,0 +1,12 @@ +// After an onExceptionUnwind hook throws, if uncaughtExceptionHook returns +// undefined, the original exception continues to propagate. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +var log = ''; +dbg.onExceptionUnwind = function () { log += "1"; throw new Error("oops"); }; +dbg.uncaughtExceptionHook = function () { log += "2"; }; + +g.eval("var x = new Error('oops');"); +g.eval("try { throw x; } catch (exc) { assertEq(exc, x); }"); +assertEq(log, "12"); diff --git a/js/src/jit-test/tests/debug/wasm-01.js b/js/src/jit-test/tests/debug/wasm-01.js new file mode 100644 index 0000000000..1d9396aa1b --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-01.js @@ -0,0 +1,32 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() + +// Tests that wasm module scripts are available via findScripts. + +var g = newGlobal({newCompartment: true}); +g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func) (export "" (func 0)))')));`); + +function isWasm(script) { return script.format === "wasm"; } + +var dbg = new Debugger(g); +var foundScripts1 = dbg.findScripts().filter(isWasm); +assertEq(foundScripts1.length, 1); +var found = foundScripts1[0]; + +// Add another module, we should be able to find it via findScripts. +g.eval(`o2 = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func) (export "a" (func 0)))')));`); +var foundScripts2 = dbg.findScripts().filter(isWasm); +assertEq(foundScripts2.length, 2); + +// The first module should be in the list as wrapping the same wasm module +// twice gets the same Debugger.Script. +assertEq(foundScripts2.indexOf(found) !== -1, true); + +// The two modules are distinct. +assertEq(foundScripts2[0] !== foundScripts2[1], true); + +// We should be able to find the same script via its source. +for (var ws of foundScripts2) { + var scriptsFromSource = dbg.findScripts({ source: ws.source }); + assertEq(scriptsFromSource.length, 1); + assertEq(scriptsFromSource[0], ws); +} diff --git a/js/src/jit-test/tests/debug/wasm-02.js b/js/src/jit-test/tests/debug/wasm-02.js new file mode 100644 index 0000000000..c0f3c52f3a --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-02.js @@ -0,0 +1,21 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() + +// Tests that wasm module scripts are available via onNewScript. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +var gotScript; +dbg.onNewScript = (script) => { + gotScript = script; +} + +g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func) (export "" (func 0)))')));`); +assertEq(gotScript.format, "wasm"); + +var gotScript2 = gotScript; +g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func) (export "a" (func 0)))')));`); +assertEq(gotScript.format, "wasm"); + +// The two wasm Debugger.Scripts are distinct. +assertEq(gotScript !== gotScript2, true); diff --git a/js/src/jit-test/tests/debug/wasm-03.js b/js/src/jit-test/tests/debug/wasm-03.js new file mode 100644 index 0000000000..47a6dd0a7e --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-03.js @@ -0,0 +1,34 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() + +// Tests that wasm module scripts have synthesized sources. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +var s; +dbg.onNewScript = (script) => { + s = script; +} + +g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func) (export "" (func 0)))')));`); +assertEq(s.format, "wasm"); + +var source = s.source; + +assertEq(s.source, source); +assertEq(source.introductionType, "wasm"); +assertEq(source.introductionScript, s); +// Wasm sources shouldn't be considered source mapped. +assertEq(!source.sourceMapURL, true); +assertThrowsInstanceOf(() => source.sourceMapURL = 'foo', Error); +// We must have some text. +assertEq(!!source.text, true); + +// TODOshu: Wasm is moving very fast and what we return for these values is +// currently not interesting to test. Instead, test that they do not throw. +source.url; +source.displayURL; +source.introductionOffset; +source.elementAttributeName; diff --git a/js/src/jit-test/tests/debug/wasm-04.js b/js/src/jit-test/tests/debug/wasm-04.js new file mode 100644 index 0000000000..3d18e6ce1b --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-04.js @@ -0,0 +1,27 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() + +// Tests that wasm module scripts throw for everything except text. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +var s; +dbg.onNewScript = (script) => { + s = script; +} + +g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func) (export "" (func 0)))')));`); +assertEq(s.format, "wasm"); + +assertThrowsInstanceOf(() => s.displayName, Error); +assertThrowsInstanceOf(() => s.parameterNames, Error); +assertThrowsInstanceOf(() => s.url, Error); +assertThrowsInstanceOf(() => s.sourceStart, Error); +assertThrowsInstanceOf(() => s.sourceLength, Error); +assertThrowsInstanceOf(() => s.global, Error); +assertThrowsInstanceOf(() => s.getChildScripts(), Error); +assertThrowsInstanceOf(() => s.getAllOffsets(), Error); +assertThrowsInstanceOf(() => s.getBreakpoint(0), Error); +assertThrowsInstanceOf(() => s.getOffsetsCoverage(), Error); diff --git a/js/src/jit-test/tests/debug/wasm-06-onEnterFrame-null.js b/js/src/jit-test/tests/debug/wasm-06-onEnterFrame-null.js new file mode 100644 index 0000000000..b4afd9753f --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-06-onEnterFrame-null.js @@ -0,0 +1,17 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; exitstatus: 3; skip-if: !wasmDebuggingEnabled() +// Checking resumption values for 'null' at onEnterFrame. + +load(libdir + "asserts.js"); + +var g = newGlobal(''); +var dbg = new Debugger(); +dbg.addDebuggee(g); +sandbox.eval(` +var wasm = wasmTextToBinary('(module (func (nop)) (export "test" 0))'); +var m = new WebAssembly.Instance(new WebAssembly.Module(wasm));`); +dbg.onEnterFrame = function (frame) { + if (frame.type !== "wasmcall") return; + return null; +}; +g.eval("m.exports.test()"); +assertEq(false, true); diff --git a/js/src/jit-test/tests/debug/wasm-06-onPop-null.js b/js/src/jit-test/tests/debug/wasm-06-onPop-null.js new file mode 100644 index 0000000000..76bfb146ef --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-06-onPop-null.js @@ -0,0 +1,19 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; exitstatus: 3; skip-if: !wasmDebuggingEnabled() +// Checking resumption values for 'null' at frame's onPop. + +load(libdir + "asserts.js"); + +var g = newGlobal(''); +var dbg = new Debugger(); +dbg.addDebuggee(g); +sandbox.eval(` +var wasm = wasmTextToBinary('(module (func (nop)) (export "test" 0))'); +var m = new WebAssembly.Instance(new WebAssembly.Module(wasm));`); +dbg.onEnterFrame = function (frame) { + if (frame.type !== "wasmcall") return; + frame.onPop = function () { + return null; + }; +}; +g.eval("m.exports.test()"); +assertEq(false, true); diff --git a/js/src/jit-test/tests/debug/wasm-06.js b/js/src/jit-test/tests/debug/wasm-06.js new file mode 100644 index 0000000000..d8a8aa8b18 --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-06.js @@ -0,0 +1,332 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; error: TestComplete; skip-if: !wasmDebuggingEnabled() +// Tests that wasm module scripts raises onEnterFrame and onLeaveFrame events. + +load(libdir + "asserts.js"); + +function runWasmWithDebugger(wast, lib, init, done) { + let g = newGlobal({newCompartment: true}); + let dbg = new Debugger(g); + + g.eval(` +var wasm = wasmTextToBinary('${wast}'); +var lib = ${lib || 'undefined'}; +var m = new WebAssembly.Instance(new WebAssembly.Module(wasm), lib);`); + + init(dbg, g); + let result = undefined, error = undefined; + try { + result = g.eval("m.exports.test()"); + } catch (ex) { + error = ex; + } + done(dbg, result, error, g); +} + +// Checking if onEnterFrame is fired for wasm frames and verifying the content +// of the frame and environment properties. +var onEnterFrameCalled, onLeaveFrameCalled, onExceptionUnwindCalled, testComplete; +runWasmWithDebugger( + '(module (func (result i32) (i32.const 42)) (export "test" (func 0)))', undefined, + function (dbg) { + var wasmScript = dbg.findScripts().filter(s => s.format == 'wasm')[0]; + assertEq(!!wasmScript, true); + onEnterFrameCalled = 0; + onLeaveFrameCalled = 0; + testComplete = false; + var evalFrame; + dbg.onEnterFrame = function (frame) { + if (frame.type !== 'wasmcall') { + if (frame.type === 'eval') + evalFrame = frame; + return; + } + + onEnterFrameCalled++; + + assertEq(frame.script, wasmScript); + assertEq(frame.older, evalFrame); + assertEq(frame.type, 'wasmcall'); + + let env = frame.environment; + assertEq(env instanceof Object, true); + assertEq(env.inspectable, true); + assertEq(env.parent !== null, true); + assertEq(env.type, 'declarative'); + assertEq(env.calleeScript, null); + assertEq(Array.isArray(env.names()), true); + assertEq(env.names().length, 0); + + frame.onPop = function() { + onLeaveFrameCalled++; + testComplete = true; + }; + }; + }, + function (dbg, result, error) { + assertEq(testComplete, true); + assertEq(onEnterFrameCalled, 1); + assertEq(onLeaveFrameCalled, 1); + assertEq(result, 42); + assertEq(error, undefined); + } +); + +// Checking the dbg.getNewestFrame() and frame.older. +runWasmWithDebugger( + '(module (import "env" "ex" (func $fn1)) (func $fn2 (call $fn1)) (export "test" (func $fn2)))', + '{env: { ex: () => { }}}', + function (dbg) { + onEnterFrameCalled = 0; + onLeaveFrameCalled = 0; + testComplete = false; + var evalFrame, wasmFrame; + dbg.onEnterFrame = function (frame) { + onEnterFrameCalled++; + + assertEq(dbg.getNewestFrame(), frame); + + switch (frame.type) { + case 'eval': + evalFrame = frame; + break; + case 'wasmcall': + wasmFrame = frame; + break; + case 'call': + assertEq(frame.older, wasmFrame); + assertEq(frame.older.older, evalFrame); + assertEq(frame.older.older.older, null); + testComplete = true; + break; + } + + frame.onPop = function() { + onLeaveFrameCalled++; + }; + }; + }, + function (dbg, result, error) { + assertEq(testComplete, true); + assertEq(onEnterFrameCalled, 3); + assertEq(onLeaveFrameCalled, 3); + assertEq(error, undefined); + } +); + +// Checking if we can enumerate frames and find 'wasmcall' one. +runWasmWithDebugger( + '(module (import "env" "ex" (func $fn1)) (func $fn2 (call $fn1)) (export "test" (func $fn2)))', + '{env: { ex: () => { debugger; }}}', + function (dbg) { + testComplete = false; + dbg.onDebuggerStatement = function (frame) { + assertEq(frame.type, 'call'); + assertEq(frame.older.type, 'wasmcall'); + assertEq(frame.older.older.type, 'eval'); + assertEq(frame.older.older.older, null); + testComplete = true; + } + }, + function (dbg, result, error) { + assertEq(testComplete, true); + assertEq(error, undefined); + } +); + +// Checking if onPop works without onEnterFrame handler. +runWasmWithDebugger( + '(module (import "env" "ex" (func $fn1)) (func $fn2 (call $fn1)) (export "test" (func $fn2)))', + '{env: { ex: () => { debugger; }}}', + function (dbg) { + onLeaveFrameCalled = 0; + dbg.onDebuggerStatement = function (frame) { + if (!frame.older || frame.older.type != 'wasmcall') + return; + frame.older.onPop = function () { + onLeaveFrameCalled++; + }; + } + }, + function (dbg, result, error) { + assertEq(onLeaveFrameCalled, 1); + assertEq(error, undefined); + } +); + +// Checking if function return values are not changed. +runWasmWithDebugger( + '(module (func (result f64) (f64.const 0.42)) (export "test" (func 0)))', undefined, + function (dbg) { + dbg.onEnterFrame = function (frame) { + dbg.onPop = function () {}; + }; + }, + function (dbg, result, error) { + assertEq(result, 0.42); + assertEq(error, undefined); + } +); +runWasmWithDebugger( + '(module (func (result f32) (f32.const 4.25)) (export "test" (func 0)))', undefined, + function (dbg) { + dbg.onEnterFrame = function (frame) { + dbg.onPop = function () {}; + }; + }, + function (dbg, result, error) { + assertEq(result, 4.25); + assertEq(error, undefined); + } +); + +// Checking if onEnterFrame/onExceptionUnwind work during exceptions -- +// `unreachable` causes wasm to throw WebAssembly.RuntimeError exception. +runWasmWithDebugger( + '(module (func (unreachable)) (export "test" (func 0)))', undefined, + function (dbg) { + onEnterFrameCalled = 0; + onLeaveFrameCalled = 0; + onExceptionUnwindCalled = 0; + dbg.onEnterFrame = function (frame) { + if (frame.type !== "wasmcall") return; + onEnterFrameCalled++; + frame.onPop = function() { + onLeaveFrameCalled++; + }; + }; + dbg.onExceptionUnwind = function (frame) { + if (frame.type !== "wasmcall") return; + onExceptionUnwindCalled++; + }; + }, + function (dbg, result, error, g) { + assertEq(onEnterFrameCalled, 1); + assertEq(onLeaveFrameCalled, 1); + assertEq(onExceptionUnwindCalled, 1); + assertEq(error instanceof g.WebAssembly.RuntimeError, true); + } +); + +// Checking if onEnterFrame/onExceptionUnwind work during exceptions +// originated in the JavaScript import call. +runWasmWithDebugger( + '(module (import "env" "ex" (func $fn1)) (func $fn2 (call $fn1)) (export "test" (func $fn2)))', + '{env: { ex: () => { throw new Error(); }}}', + function (dbg) { + onEnterFrameCalled = 0; + onLeaveFrameCalled = 0; + onExceptionUnwindCalled = 0; + dbg.onEnterFrame = function (frame) { + if (frame.type !== "wasmcall") return; + onEnterFrameCalled++; + frame.onPop = function() { + onLeaveFrameCalled++; + }; + }; + dbg.onExceptionUnwind = function (frame) { + if (frame.type !== "wasmcall") return; + onExceptionUnwindCalled++; + }; + }, + function (dbg, result, error, g) { + assertEq(onEnterFrameCalled, 1); + assertEq(onLeaveFrameCalled, 1); + assertEq(onExceptionUnwindCalled, 1); + assertEq(error instanceof g.Error, true); + } +); + +// Checking throwing in the handler. +runWasmWithDebugger( + '(module (func (unreachable)) (export "test" (func 0)))', undefined, + function (dbg) { + dbg.uncaughtExceptionHook = function (value) { + assertEq(value instanceof Error, true); + return {throw: 'test'}; + }; + dbg.onEnterFrame = function (frame) { + if (frame.type !== "wasmcall") return; + throw new Error(); + }; + }, + function (dbg, result, error) { + assertEq(error, 'test'); + } +); +runWasmWithDebugger( + '(module (func (unreachable)) (export "test" (func 0)))', undefined, + function (dbg) { + dbg.uncaughtExceptionHook = function (value) { + assertEq(value instanceof Error, true); + return {throw: 'test'}; + }; + dbg.onEnterFrame = function (frame) { + if (frame.type !== "wasmcall") return; + frame.onPop = function () { + throw new Error(); + } + }; + }, + function (dbg, result, error) { + assertEq(error, 'test'); + } +); + +// Checking resumption values for JS_THROW. +runWasmWithDebugger( + '(module (func (nop)) (export "test" (func 0)))', undefined, + function (dbg, g) { + dbg.onEnterFrame = function (frame) { + if (frame.type !== "wasmcall") return; + return {throw: 'test'}; + }; + }, + function (dbg, result, error, g) { + assertEq(error, 'test'); + } +); +runWasmWithDebugger( + '(module (func (nop)) (export "test" (func 0)))', undefined, + function (dbg, g) { + dbg.onEnterFrame = function (frame) { + if (frame.type !== "wasmcall") return; + frame.onPop = function () { + return {throw: 'test'}; + } + }; + }, + function (dbg, result, error, g) { + assertEq(error, 'test'); + } +); + +// Checking resumption values for JS_RETURN (not implemented by wasm baseline). +runWasmWithDebugger( + '(module (func (unreachable)) (export "test" (func 0)))', undefined, + function (dbg) { + dbg.onEnterFrame = function (frame) { + if (frame.type !== "wasmcall") return; + return {return: 2}; + }; + }, + function (dbg, result, error) { + assertEq(result, undefined, 'NYI: result == 2, if JS_RETURN is implemented'); + assertEq(error != undefined, true, 'NYI: error == undefined, if JS_RETURN is implemented'); + } +); +runWasmWithDebugger( + '(module (func (unreachable)) (export "test" (func 0)))', undefined, + function (dbg) { + dbg.onEnterFrame = function (frame) { + if (frame.type !== "wasmcall") return; + frame.onPop = function () { + return {return: 2}; + } + }; + }, + function (dbg, result, error) { + assertEq(result, undefined, 'NYI: result == 2, if JS_RETURN is implemented'); + assertEq(error != undefined, true, 'NYI: error == undefined, if JS_RETURN is implemented'); + } +); +throw "TestComplete"; diff --git a/js/src/jit-test/tests/debug/wasm-07.js b/js/src/jit-test/tests/debug/wasm-07.js new file mode 100644 index 0000000000..a6977198e8 --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-07.js @@ -0,0 +1,39 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() + +// Checking existence of all frame.offset references during onEnterFrame, +// onLeaveFrame and onStep events in the source code, and that we can +// potentially resolve offset back to the line/column. + +load(libdir + "wasm.js"); + +var offsets; +wasmRunWithDebugger( + '(module (func (nop) (nop)) (export "test" (func 0)))', + undefined, + function ({dbg}) { + offsets = []; + dbg.onEnterFrame = function (frame) { + if (frame.type != 'wasmcall') { + return; + } + offsets.push(frame.offset); + frame.onStep = function () { + offsets.push(frame.offset); + }; + frame.onPop = function () { + offsets.push(frame.offset); + }; + }; + }, + function ({wasmScript, error}) { + assertEq(error, undefined); + assertEq(offsets.length, 4); + offsets.forEach(offset => { + var loc = wasmScript.getOffsetLocation(offset); + assertEq(loc.isEntryPoint, true); + assertEq(loc.lineNumber > 0, true); + assertEq(loc.columnNumber > 0, true); + assertEq(wasmScript.getLineOffsets(loc.lineNumber).length, 1); + }); + } +); diff --git a/js/src/jit-test/tests/debug/wasm-08.js b/js/src/jit-test/tests/debug/wasm-08.js new file mode 100644 index 0000000000..ca22566273 --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-08.js @@ -0,0 +1,121 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() +// Checking if we destroying work registers by breakpoint/step handler. + +load(libdir + "wasm.js"); + +// Running the following code compiled from C snippet: +// +// signed func0(signed n) { +// double a = 1; float b = 0; signed c = 1; long long d = 1; +// for (;n > 0; n--) { +// a *= c; b += c; c++; d <<= 1; +// } +// return (signed)a + (signed)b + c + (signed)d; +// } +// +var onStepCalled; +wasmRunWithDebugger( + `(module + (func $func0 (param $var0 i32) (result i32) + (local $var1 i32) (local $var2 i64) (local $var3 f64) (local $var4 f32) + (local $var5 f64) (local $var6 i32) (local $var7 i32) (local $var8 i32) + i32.const 1 + local.set $var1 + i32.const 0 + local.set $var7 + i32.const 1 + local.set $var6 + i32.const 1 + local.set $var8 + block $label0 + local.get $var0 + i32.const 1 + i32.lt_s + br_if $label0 + local.get $var0 + i32.const 1 + i32.add + local.set $var1 + f32.const 0 + local.set $var4 + i64.const 1 + local.set $var2 + f64.const 1 + local.set $var3 + i32.const 1 + local.set $var0 + f64.const 1 + local.set $var5 + block + loop $label1 + local.get $var2 + i64.const 1 + i64.shl + local.set $var2 + local.get $var5 + local.get $var3 + f64.mul + local.set $var5 + local.get $var4 + local.get $var0 + f32.convert_i32_s + f32.add + local.set $var4 + local.get $var3 + f64.const 1 + f64.add + local.set $var3 + local.get $var0 + i32.const 1 + i32.add + local.tee $var6 + local.set $var0 + local.get $var1 + i32.const -1 + i32.add + local.tee $var1 + i32.const 1 + i32.gt_s + br_if $label1 + end $label1 + end + local.get $var2 + i32.wrap_i64 + local.set $var1 + local.get $var4 + i32.trunc_f32_s + local.set $var7 + local.get $var5 + i32.trunc_f64_s + local.set $var8 + end $label0 + local.get $var7 + local.get $var8 + i32.add + local.get $var6 + i32.add + local.get $var1 + i32.add + return + ) + (func (export "test") (result i32) (call $func0 (i32.const 4))) +)`.split('\n').join(' '), + undefined, + function ({dbg}) { + onStepCalled = []; + dbg.onEnterFrame = function (frame) { + if (frame.type != 'wasmcall') return; + frame.onStep = function () { + onStepCalled.push(frame.offset); + }; + }; + }, + function ({result, error}) { + assertEq(result, /* func0(4) = */ 55); + assertEq(error, undefined); + // The number below reflects amount of wasm operators executed during + // the run of the test function, which runs $func0(4). It can change + // when the code above and/or meaning of wasm operators will change. + assertEq(onStepCalled.length, 85); + } +); diff --git a/js/src/jit-test/tests/debug/wasm-09.js b/js/src/jit-test/tests/debug/wasm-09.js new file mode 100644 index 0000000000..c01a696d0a --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-09.js @@ -0,0 +1,32 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() +// Tests debugEnabled state of wasm when allowUnobservedWasm == true. + +load(libdir + "asserts.js"); + +// Checking that there are no offsets are present in a wasm instance script for +// which debug mode was not enabled. +function getWasmScriptWithoutAllowUnobservedWasm(wast) { + var sandbox = newGlobal({newCompartment: true}); + var dbg = new Debugger(); + dbg.allowUnobservedWasm = true; + dbg.addDebuggee(sandbox); + sandbox.eval(` + var wasm = wasmTextToBinary('${wast}'); + var m = new WebAssembly.Instance(new WebAssembly.Module(wasm)); + `); + // Attaching after wasm instance is created. + var wasmScript = dbg.findScripts().filter(s => s.format == 'wasm')[0]; + return wasmScript; +} + +var wasmScript1 = getWasmScriptWithoutAllowUnobservedWasm('(module (func (nop)))'); +var wasmLines1 = wasmScript1.source.text.split('\n'); +assertEq(wasmScript1.startLine, 1); +assertEq(wasmScript1.lineCount, 0); +assertEq(wasmLines1.every((l, n) => wasmScript1.getLineOffsets(n + 1).length == 0), true); + +// Checking that we must not resolve any location for any offset in a wasm +// instance which debug mode was not enabled. +var wasmScript2 = getWasmScriptWithoutAllowUnobservedWasm('(module (func (nop)))'); +for (var i = wasmTextToBinary('(module (func (nop)))').length - 1; i >= 0; i--) + assertThrowsInstanceOf(() => wasmScript2.getOffsetLocation(i), Error); diff --git a/js/src/jit-test/tests/debug/wasm-10.js b/js/src/jit-test/tests/debug/wasm-10.js new file mode 100644 index 0000000000..0dc7623980 --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-10.js @@ -0,0 +1,77 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() +// Tests that wasm module scripts has inspectable locals. + +load(libdir + "wasm.js"); +load(libdir + 'eqArrayHelper.js'); + +function monitorLocalValues(wast, lib, expected) { + function setupFrame(frame) { + var locals = {}; + framesLocals.push(locals); + frame.environment.names().forEach(n => { + locals[n] = [frame.environment.getVariable(n)]; + }); + frame.onStep = function () { + frame.environment.names().forEach(n => { + var prevValues = locals[n]; + if (!prevValues) + locals[n] = prevValues = [void 0]; + var value = frame.environment.getVariable(n); + if (prevValues[prevValues.length - 1] !== value) + prevValues.push(value); + }); + } + } + var framesLocals = []; + wasmRunWithDebugger(wast, lib, + function ({dbg}) { + dbg.onEnterFrame = function(frame) { + if (frame.type == "wasmcall") + setupFrame(frame); + } + }, + function ({error}) { + assertEq(error, undefined); + } + ); + assertEq(framesLocals.length, expected.length); + for (var i = 0; i < framesLocals.length; i++) { + var frameLocals = framesLocals[i]; + var expectedLocals = expected[i]; + var localsNames = Object.keys(frameLocals); + assertEq(localsNames.length, Object.keys(expectedLocals).length); + localsNames.forEach(n => { + assertEqArray(frameLocals[n], expectedLocals[n]); + }); + } +} + +monitorLocalValues( + '(module (func (nop) (nop)) (export "test" (func 0)))', + undefined, + [{}] +); +monitorLocalValues( + '(module (func (export "test") (local i32) (i32.const 1) (local.set 0)))', + undefined, + [{var0: [0, 1]}] +); +monitorLocalValues( + '(module (func (export "test") (local f32) (f32.const 1.5) (local.set 0)))', + undefined, + [{var0: [0, 1.5]}] +); +monitorLocalValues( + '(module (func (export "test") (local f64) (f64.const 42.25) (local.set 0)))', + undefined, + [{var0: [0, 42.25]}] +); +monitorLocalValues( + `(module + (func (param i32) (result i32) (local.get 0) (i32.const 2) (i32.add)) + (func (param i32) (local i32) (local.get 0) (call 0) (local.set 1)) + (func (export "test") (i32.const 1) (call 1)) +)`.replace(/\n/g, " "), + undefined, + [{}, {var0: [1], var1: [0, 3]}, {var0: [1]}] +); diff --git a/js/src/jit-test/tests/debug/wasm-11.js b/js/src/jit-test/tests/debug/wasm-11.js new file mode 100644 index 0000000000..6fd073c0d2 --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-11.js @@ -0,0 +1,33 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() + +// Test single-stepping where the TLS register can be evicted by a non-trivial +// function body. + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval(` + var dbg = new Debugger(parent); +`); + +var i = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` + (module + (func (export "f2") + i64.const 0 + i64.const 0 + i32.const 0 + select + drop + ) + ) +`))); + +g.eval(` + var calledOnStep = 0; + dbg.onEnterFrame = frame => { + if (frame.type === "wasmcall") + frame.onStep = () => { calledOnStep++ } + }; +`); + +i.exports.f2(); +assertEq(g.calledOnStep, 2); diff --git a/js/src/jit-test/tests/debug/wasm-12.js b/js/src/jit-test/tests/debug/wasm-12.js new file mode 100644 index 0000000000..6c645f3f7f --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-12.js @@ -0,0 +1,25 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() + +// Tests that wasm module scripts have special URLs. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +g.eval(` +function initWasm(s) { return new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(s))); } +o1 = initWasm('(module (func) (export "" (func 0)))'); +o2 = initWasm('(module (func) (func) (export "" (func 1)))'); +`); + +function isWasm(script) { return script.format === "wasm"; } + +function isValidWasmURL(url) { + // The URLs will have the following format: + // wasm: [ ":"] <64-bit-hash> + return /^wasm:(?:[^:]*:)*?[0-9a-f]{16}$/.test(url); +} + +var foundScripts = dbg.findScripts().filter(isWasm); +assertEq(foundScripts.length, 2); +assertEq(isValidWasmURL(foundScripts[0].source.url), true); +assertEq(isValidWasmURL(foundScripts[1].source.url), true); +assertEq(foundScripts[0].source.url != foundScripts[1].source.url, true); diff --git a/js/src/jit-test/tests/debug/wasm-13.js b/js/src/jit-test/tests/debug/wasm-13.js new file mode 100644 index 0000000000..6c80a337ab --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-13.js @@ -0,0 +1,116 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() +// Tests that wasm module scripts has inspectable globals and memory. + +load(libdir + "wasm.js"); +load(libdir + 'eqArrayHelper.js'); + +function monitorGlobalValues(wast, lib, expected) { + function setupFrame(frame) { + var globals = {}; + framesGlobals.push(globals); + // Environment with globals follow function scope enviroment + var globalEnv = frame.environment.parent; + globalEnv.names().forEach(n => { + globals[n] = [globalEnv.getVariable(n)]; + }); + frame.onStep = function () { + var globalEnv = frame.environment.parent; + globalEnv.names().forEach(n => { + var prevValues = globals[n]; + if (!prevValues) + globals[n] = prevValues = [void 0]; + var value = globalEnv.getVariable(n); + if (prevValues[prevValues.length - 1] !== value) + prevValues.push(value); + }); + } + } + var framesGlobals = []; + wasmRunWithDebugger(wast, lib, + function ({dbg}) { + dbg.onEnterFrame = function(frame) { + if (frame.type == "wasmcall") + setupFrame(frame); + } + }, + function ({error}) { + assertEq(error, undefined); + } + ); + assertEq(framesGlobals.length, expected.length); + for (var i = 0; i < framesGlobals.length; i++) { + var frameGlobals = framesGlobals[i]; + var expectedGlobals = expected[i]; + var globalsNames = Object.keys(frameGlobals); + assertEq(globalsNames.length, Object.keys(expectedGlobals).length); + globalsNames.forEach(n => { + if (typeof expectedGlobals[n][0] === "function") { + // expectedGlobals are assert functions + expectedGlobals[n].forEach((assertFn, i) => { + assertFn(frameGlobals[n][i]); + }); + return; + } + assertEqArray(frameGlobals[n], expectedGlobals[n]); + }); + } +} + +monitorGlobalValues( + '(module (func (export "test") (nop)))', + undefined, + [{}] +); +monitorGlobalValues( + '(module (memory (export "memory") 1 1) (func (export "test") (nop) (nop)))', + undefined, + [{ + memory0: [ + function (actual) { + var bufferProp = actual.proto.getOwnPropertyDescriptor("buffer"); + assertEq(!!bufferProp, true, "wasm memory buffer property"); + var buffer = bufferProp.get.call(actual).return; + var bufferLengthProp = buffer.proto.getOwnPropertyDescriptor("byteLength"); + var bufferLength = bufferLengthProp.get.call(buffer).return; + assertEq(bufferLength, 65536, "wasm memory size"); + } + ] + }] +); +monitorGlobalValues( + `(module\ + (global i32 (i32.const 1))(global i64 (i64.const 2))(global f32 (f32.const 3.5))(global f64 (f64.const 42.25))\ + (global externref (ref.null extern))\ + (func (export "test") (nop)))`, + undefined, + [(function () { + let x = { + global0: [1], + global1: [2], + global2: [3.5], + global3: [42.25], + global4: [ function (x) { assertEq(x.optimizedOut, true); } ], + }; + return x; + })()] +); +monitorGlobalValues( + `(module (global (mut i32) (i32.const 1))(global (mut i64) (i64.const 2))\ + (global (mut f32) (f32.const 3.5))(global (mut f64) (f64.const 42.25))\ + (global (mut externref) (ref.null extern))\ + (func (export "test")\ + (i32.const 2)(global.set 0)(i64.const 1)(global.set 1)\ + (f32.const 42.25)(global.set 2)(f64.const 3.5)(global.set 3)\ + (ref.null extern)(global.set 4)))`, + undefined, + [(function () { + let x = { + global0: [1, 2], + global1: [2, 1], + global2: [3.5, 42.25], + global3: [42.25, 3.5], + global4: [ function (x) { assertEq(x.optimizedOut, true); } ], + }; + return x; + })()] +) diff --git a/js/src/jit-test/tests/debug/wasm-14.js b/js/src/jit-test/tests/debug/wasm-14.js new file mode 100644 index 0000000000..023c16dca4 --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-14.js @@ -0,0 +1,91 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-function-references --wasm-gc; skip-if: !wasmDebuggingEnabled() || !wasmGcEnabled(); skip-if: true +// An extension of wasm-10.js, testing that wasm GC objects are inspectable in locals. + +// As of bug 1825098, this test is disabled. (skip-if: true) +// See https://bugzilla.mozilla.org/show_bug.cgi?id=1836320 + +load(libdir + "wasm.js"); + +function monitorLocalValues(wast, lib, expected) { + function setupFrame(frame) { + var locals = {}; + framesLocals.push(locals); + frame.environment.names().forEach(n => { + locals[n] = [frame.environment.getVariable(n)]; + }); + frame.onStep = function () { + frame.environment.names().forEach(n => { + var prevValues = locals[n]; + if (!prevValues) { + locals[n] = prevValues = [void 0]; + } + var value = frame.environment.getVariable(n); + if (prevValues[prevValues.length - 1] !== value) { + prevValues.push(value); + } + }); + } + } + var framesLocals = []; + wasmRunWithDebugger(wast, lib, + function ({dbg}) { + dbg.onEnterFrame = function(frame) { + if (frame.type == "wasmcall") { + setupFrame(frame); + } + } + }, + function ({error}) { + assertEq(error, undefined); + } + ); + assertEq(framesLocals.length, expected.length); + for (var i = 0; i < framesLocals.length; i++) { + var frameLocals = framesLocals[i]; + var expectedLocals = expected[i]; + var localsNames = Object.keys(frameLocals); + assertEq(localsNames.length, Object.keys(expectedLocals).length); + for (const n of localsNames) { + const actualValues = frameLocals[n]; + const expectedValues = expectedLocals[n]; + for (let j = 0; j < expectedValues.length; j++) { + const actual = actualValues[j]; + const expected = expectedValues[j]; + if (expected === null) { + assertEq(actual, null, `values differed at index ${j}`); + } else { + for (const key of Object.keys(expected)) { + const actualField = actual.getProperty(key).return; + const expectedField = expected[key]; + assertEq(actualField, expectedField, `values differed for key "${key}"`); + } + } + } + } + } +} + +monitorLocalValues( + `(module + (type (struct i32 i64)) + (func (export "test") + (local (ref null 0)) + (local.set 0 (struct.new 0 (i32.const 1) (i64.const 2))) + ) +)`, + undefined, + [{var0: [null, {0: 1, 1: 2n}]}] +); +monitorLocalValues( + `(module + (type (array i32)) + (func (export "test") + (local (ref null 0)) + (i64.const 3) + (local.set 0 (array.new 0 (i32.const 123) (i32.const 2))) + drop + ) +)`, + undefined, + [{var0: [null, {length: 2, 0: 123, 1: 123}]}] +); diff --git a/js/src/jit-test/tests/debug/wasm-15.js b/js/src/jit-test/tests/debug/wasm-15.js new file mode 100644 index 0000000000..90b1fbea3b --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-15.js @@ -0,0 +1,91 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() || !wasmTailCallsEnabled() + +// Tests that wasm module scripts raises onEnterFrame and onLeaveFrame events in +// wasm return calls. + +load(libdir + "wasm.js"); + +// Checking if enter/leave frame at return_call. +var onEnterFrameCalled, onLeaveFrameCalled, onStepCalled; +wasmRunWithDebugger( + '(module (func) (func (return_call 0)) (func (call 1)) (export "test" (func 2)))', + undefined, + function ({dbg}) { + onEnterFrameCalled = 0; + onLeaveFrameCalled = 0; + onStepCalled = []; + dbg.onEnterFrame = function (frame) { + if (frame.type != 'wasmcall') return; + onEnterFrameCalled++; + frame.onStep = function () { + onStepCalled.push(frame.offset); + }; + frame.onPop = function () { + onLeaveFrameCalled++; + }; + }; + }, + function ({error}) { + assertEq(error, undefined); + assertEq(onEnterFrameCalled, 3); + assertEq(onLeaveFrameCalled, 3); + assertEq(onStepCalled.length, 4); + assertEq(onStepCalled[0] > 0, true); + } +); + +// Checking if enter/leave frame at return_call_indirect. +wasmRunWithDebugger( + '(module (func) (func (return_call_indirect (i32.const 0))) (func (call 1)) (table 1 1 funcref) (elem (i32.const 0) 0) (export "test" (func 2)))', + undefined, + function ({dbg}) { + onEnterFrameCalled = 0; + onLeaveFrameCalled = 0; + onStepCalled = []; + dbg.onEnterFrame = function (frame) { + if (frame.type != 'wasmcall') return; + onEnterFrameCalled++; + frame.onStep = function () { + onStepCalled.push(frame.offset); + }; + frame.onPop = function () { + onLeaveFrameCalled++; + }; + }; + }, + function ({error}) { + assertEq(error, undefined); + assertEq(onEnterFrameCalled, 3); + assertEq(onLeaveFrameCalled, 3); + assertEq(onStepCalled.length, 4); + assertEq(onStepCalled[0] > 0, true); + } +); + +// Checking if enter/leave frame at return_call_ref. +wasmFunctionReferencesEnabled() && wasmRunWithDebugger( + '(module (type $t (func)) (elem declare func 0) (func) (func (return_call_ref $t (ref.func 0))) (func (call 1)) (export "test" (func 2)))', + undefined, + function ({dbg}) { + onEnterFrameCalled = 0; + onLeaveFrameCalled = 0; + onStepCalled = []; + dbg.onEnterFrame = function (frame) { + if (frame.type != 'wasmcall') return; + onEnterFrameCalled++; + frame.onStep = function () { + onStepCalled.push(frame.offset); + }; + frame.onPop = function () { + onLeaveFrameCalled++; + }; + }; + }, + function ({error}) { + assertEq(error, undefined); + assertEq(onEnterFrameCalled, 3); + assertEq(onLeaveFrameCalled, 3); + assertEq(onStepCalled.length, 5); + assertEq(onStepCalled[0] > 0, true); + } +); diff --git a/js/src/jit-test/tests/debug/wasm-binary-sources.js b/js/src/jit-test/tests/debug/wasm-binary-sources.js new file mode 100644 index 0000000000..4ed5b9fb50 --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-binary-sources.js @@ -0,0 +1,32 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() + +// Tests that wasm module scripts have access to binary sources. + +load(libdir + "asserts.js"); +load(libdir + "array-compare.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +var s; +dbg.onNewScript = (script) => { + s = script; +} + +g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func) (export "" (func 0)))')));`); +assertEq(s.format, "wasm"); + +var source = s.source; + +// The text is never generated with the native Debugger API. +assertEq(source.text.includes('module'), false); + +g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func) (export "" (func 0)))')));`); +assertEq(s.format, "wasm"); + +var source2 = s.source; + +// The text is predefined if wasm binary sources are enabled. +assertEq(source2.text, '[debugger missing wasm binary-to-text conversion]'); +// The binary contains Uint8Array which is equal to wasm bytecode; +arraysEqual(source2.binary, wasmTextToBinary('(module (func) (export "" (func 0)))')); diff --git a/js/src/jit-test/tests/debug/wasm-breakpoint.js b/js/src/jit-test/tests/debug/wasm-breakpoint.js new file mode 100644 index 0000000000..5af3424433 --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-breakpoint.js @@ -0,0 +1,191 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() +// Tests that wasm module scripts handles basic breakpoint operations. + +load(libdir + "wasm.js"); + +function runTest(wast, initFunc, doneFunc) { + let g = newGlobal({newCompartment: true}); + let dbg = new Debugger(g); + + g.eval(` +var b = wasmTextToBinary('${wast}'); +var m = new WebAssembly.Instance(new WebAssembly.Module(b)); +`); + + var wasmScript = dbg.findScripts().filter(s => s.format == 'wasm')[0]; + var breakpoints = wasmScript.getPossibleBreakpointOffsets(); + + initFunc({ + dbg, + wasmScript, + g, + breakpoints, + }); + + let result, error; + try { + result = g.eval("m.exports.test()"); + } catch (ex) { + error = ex; + } + + doneFunc({ + dbg, + result, + error, + wasmScript, + g + }); +} + + +var onBreakpointCalled; + +// Checking if we can stop at specified breakpoint. +runTest( + '(module (func (nop) (nop)) (export "test" (func 0)))', + function ({wasmScript, breakpoints}) { + print(`${JSON.stringify(breakpoints)}`); + assertEq(breakpoints.length, 2); + assertEq(breakpoints[0] > 0, true); + // Checking if breakpoints offsets are in ascending order. + assertEq(breakpoints[0] < breakpoints[1], true); + onBreakpointCalled = 0; + breakpoints.forEach(function (offset) { + wasmScript.setBreakpoint(offset, { + hit: (frame) => { + assertEq(frame.offset, offset); + onBreakpointCalled++; + } + }); + }); + }, + function ({dbg, error}) { + assertEq(error, undefined); + assertEq(onBreakpointCalled, 2); + } +); + +// Checking if we can remove breakpoint one by one. +runTest( + '(module (func (nop) (nop)) (export "test" (func 0)))', + function ({wasmScript, breakpoints}) { + onBreakpointCalled = 0; + var handlers = []; + breakpoints.forEach(function (offset, i) { + wasmScript.setBreakpoint(offset, handlers[i] = { + hit: (frame) => { + assertEq(frame.offset, breakpoints[0]); + onBreakpointCalled++; + // Removing all handlers. + handlers.forEach(h => wasmScript.clearBreakpoint(h)); + } + }); + }); + }, + function ({error}) { + assertEq(error, undefined); + assertEq(onBreakpointCalled, 1); + } +); + +// Checking if we can remove breakpoint one by one from a breakpoint handler. +runTest( + '(module (func (nop) (nop)) (export "test" (func 0)))', + function ({wasmScript, breakpoints}) { + onBreakpointCalled = 0; + var handlers = []; + breakpoints.forEach(function (offset, i) { + wasmScript.setBreakpoint(offset, handlers[i] = { + hit: (frame) => { + assertEq(frame.offset, breakpoints[0]); + onBreakpointCalled++; + // Removing all handlers. + handlers.forEach(h => wasmScript.clearBreakpoint(h)); + } + }); + }); + }, + function ({error}) { + assertEq(error, undefined); + assertEq(onBreakpointCalled, 1); + } +); + +// Checking if we can remove breakpoint one by one from onEnterFrame, +// but onStep will still work. +var onStepCalled; +runTest( + '(module (func (nop) (nop)) (export "test" (func 0)))', + function ({dbg, wasmScript, breakpoints}) { + onBreakpointCalled = 0; + onStepCalled = []; + var handlers = []; + breakpoints.forEach(function (offset, i) { + wasmScript.setBreakpoint(offset, handlers[i] = { + hit: (frame) => { + assertEq(false, true); + onBreakpointCalled++; + } + }); + }); + dbg.onEnterFrame = function (frame) { + if (frame.type != 'wasmcall') return; + frame.onStep = function () { + onStepCalled.push(frame.offset); + }; + + // Removing all handlers. + handlers.forEach(h => wasmScript.clearBreakpoint(h)); + }; + }, + function ({error}) { + assertEq(error, undefined); + assertEq(onBreakpointCalled, 0); + assertEq(onStepCalled.length, 2); + } +); + +// Checking if we can remove all breakpoints. +runTest( + '(module (func (nop) (nop)) (export "test" (func 0)))', + function ({wasmScript, breakpoints}) { + onBreakpointCalled = 0; + breakpoints.forEach(function (offset, i) { + wasmScript.setBreakpoint(offset, { + hit: (frame) => { + assertEq(frame.offset, breakpoints[0]); + onBreakpointCalled++; + // Removing all handlers. + wasmScript.clearAllBreakpoints(); + } + }); + }); + }, + function ({error}) { + assertEq(error, undefined); + assertEq(onBreakpointCalled, 1); + } +); + +// Checking if breakpoints are removed after debugger has been detached. +runTest( + '(module (func (nop) (nop)) (export "test" (func 0)))', + function ({dbg, wasmScript, g, breakpoints}) { + onBreakpointCalled = 0; + breakpoints.forEach(function (offset, i) { + wasmScript.setBreakpoint(offset, { + hit: (frame) => { + onBreakpointCalled++; + } + }); + }); + dbg.onEnterFrame = function (frame) { + dbg.removeDebuggee(g); + }; + }, + function ({error}) { + assertEq(error, undefined); + assertEq(onBreakpointCalled, 0); + } +); diff --git a/js/src/jit-test/tests/debug/wasm-get-return.js b/js/src/jit-test/tests/debug/wasm-get-return.js new file mode 100644 index 0000000000..233d8cf5da --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-get-return.js @@ -0,0 +1,62 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() +// Tests that wasm frame opPop event can access function resumption value. + +load(libdir + "wasm.js"); +load(libdir + 'eqArrayHelper.js'); + +function monitorFrameOnPopReturns(wast, expected) { + var values = []; + wasmRunWithDebugger( + wast, + undefined, + function ({dbg}) { + dbg.onEnterFrame = function (frame) { + if (frame.type != 'wasmcall') return; + frame.onPop = function (value) { + values.push(value.return); + }; + }; + }, + function ({error}) { + assertEq(error, undefined); + } + ); + assertEqArray(values, expected); +} + +monitorFrameOnPopReturns( + `(module (func (export "test")))`, + [undefined]); +monitorFrameOnPopReturns( + `(module (func (export "test") (result i32) (i32.const 42)))`, + [42]); +monitorFrameOnPopReturns( + `(module (func (export "test") (result f32) (f32.const 0.5)))`, + [0.5]); +monitorFrameOnPopReturns( + `(module (func (export "test") (result f64) (f64.const -42.75)))`, + [-42.75]); +monitorFrameOnPopReturns( + `(module (func (result i64) (i64.const 2)) (func (export "test") (call 0) (drop)))`, + [2, undefined]); + +// Checking if throwing frame has right resumption value. +var throwCount = 0; +wasmRunWithDebugger( + '(module (func (unreachable)) (func (export "test") (result i32) (call 0) (i32.const 1)))', + undefined, + function ({dbg, g}) { + dbg.onEnterFrame = function (frame) { + if (frame.type != 'wasmcall') return; + frame.onPop = function (value) { + if ('throw' in value) + throwCount++; + }; + }; + }, + function ({error}) { + assertEq(error != undefined, true); + assertEq(throwCount, 2); + } +); + diff --git a/js/src/jit-test/tests/debug/wasm-getAllColumnOffsets.js b/js/src/jit-test/tests/debug/wasm-getAllColumnOffsets.js new file mode 100644 index 0000000000..05b032397e --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-getAllColumnOffsets.js @@ -0,0 +1,41 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() + +// Tests that wasm module scripts have column and line to bytecode offset +// information when source text is generated. + +load(libdir + "asserts.js"); + +// Checking if experimental format generates internal source map to binary file +// by querying debugger scripts getAllColumnOffsets. +function getAllOffsets(wast) { + var sandbox = newGlobal({newCompartment: true}); + var dbg = new Debugger(); + dbg.addDebuggee(sandbox); + dbg.allowWasmBinarySource = true; + sandbox.eval(` + var wasm = wasmTextToBinary('${wast}'); + var m = new WebAssembly.Instance(new WebAssembly.Module(wasm)); + `); + var wasmScript = dbg.findScripts().filter(s => s.format == 'wasm')[0]; + return wasmScript.getAllColumnOffsets(); +} + +var offsets1 = getAllOffsets('(module \ + (func (nop)) \ + (func (drop (f32.sqrt (f32.add (f32.const 1.0) (f32.const 2.0))))) \ +)'); + +// There shall be total 5 lines with single and unique offset per line. +var usedOffsets = Object.create(null), + usedLines = Object.create(null); +assertEq(offsets1.length, 5); + +offsets1.forEach(({offset, lineNumber, columnNumber}) => { + assertEq(offset > 0, true); + assertEq(lineNumber > 0, true); + assertEq(columnNumber > 0, true); + usedOffsets[offset] = true; + usedLines[lineNumber] = true; +}); +assertEq(Object.keys(usedOffsets).length, 5); +assertEq(Object.keys(usedLines).length, 5); diff --git a/js/src/jit-test/tests/debug/wasm-jseval.js b/js/src/jit-test/tests/debug/wasm-jseval.js new file mode 100644 index 0000000000..9b23d9ac6c --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-jseval.js @@ -0,0 +1,53 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() +// Tests that JS can be evaluated on wasm module scripts frames. + +load(libdir + "wasm.js"); + +wasmRunWithDebugger( + '(module (memory 1 1)\ + (global (mut f64) (f64.const 0.5))\ + (global f32 (f32.const 3.5))\ + (func (param i32) (local f64) \ + nop \ + f64.const 1.0 \ + local.tee 1 \ + global.set 0 \ + nop) \ + (export "test" (func 0))\ + (data (i32.const 0) "Abc\\x2A"))', + undefined, + function ({dbg}) { + dbg.onEnterFrame = function (frame) { + if (frame.type != 'wasmcall') return; + + var memoryContent = frame.eval('new DataView(memory0.buffer).getUint8(3)').return; + assertEq(memoryContent, 42, 'valid memory content is expected (0x2A)'); + + var global1AndParamSum = frame.eval('global1 + var0').return; + assertEq(global1AndParamSum, 3.5); + + var stepNumber = 0; + frame.onStep = function () { + switch (stepNumber) { + case 0: // before nop + assertEq(frame.offset, 65); + assertEq(frame.eval('global0').return, 0.5); + assertEq(frame.eval('var1').return, 0.0); + break; + case 2: // after local.tee $var1 + assertEq(frame.offset, 79); + assertEq(frame.eval('var1').return, 1.0); + break; + case 3: // after global.set $global0 + assertEq(frame.offset, 80); + assertEq(frame.eval('global0').return, 1.0); + break; + } + stepNumber++; + }; + }; + }, + function ({error}) { + assertEq(error, undefined); + } +); diff --git a/js/src/jit-test/tests/debug/wasm-onExceptionUnwind-gc.js b/js/src/jit-test/tests/debug/wasm-onExceptionUnwind-gc.js new file mode 100644 index 0000000000..efe672f399 --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-onExceptionUnwind-gc.js @@ -0,0 +1,48 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() + +var sandbox = newGlobal({newCompartment: true}); +var dbg = new Debugger(sandbox); +var counter = 0; +dbg.onExceptionUnwind = (frame, value) => { + if (frame.type !== "wasmcall") + return; + if (++counter != 2) + return; + gc(); +}; + +sandbox.innerCode = wasmTextToBinary(`(module + (import "imports" "tbl" (table 1 funcref)) + (import "imports" "setNull" (func $setNull)) + (func $trap + call $setNull + unreachable + ) + (elem (i32.const 0) $trap) +)`); +sandbox.outerCode = wasmTextToBinary(`(module + (import "imports" "tbl" (table 1 funcref)) + (type $v2v (func)) + (func (export "run") + i32.const 0 + call_indirect (type $v2v) + ) +)`); + +sandbox.eval(` +(function() { + +var tbl = new WebAssembly.Table({initial:1, element:"funcref"}); +function setNull() { tbl.set(0, null) } +new WebAssembly.Instance(new WebAssembly.Module(innerCode), {imports:{tbl,setNull}}); +var outer = new WebAssembly.Instance(new WebAssembly.Module(outerCode), {imports:{tbl}}); +var caught; +try { + outer.exports.run(); +} catch (e) { + caught = e; +} +assertEq(caught instanceof WebAssembly.RuntimeError, true); + +})(); +`); diff --git a/js/src/jit-test/tests/debug/wasm-responseurls.js b/js/src/jit-test/tests/debug/wasm-responseurls.js new file mode 100644 index 0000000000..bc00b8e605 --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-responseurls.js @@ -0,0 +1,40 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() +// Tests that wasm module can accept URL and sourceMapURL from response +// when instantiateStreaming is used. + +ignoreUnhandledRejections(); + +try { + WebAssembly.compileStreaming(); + // Avoid mixing the test's jobs with the debuggee's, so that + // automated checks can make sure AutoSaveJobQueue only + // suspends debuggee work. + drainJobQueue(); +} catch (err) { + assertEq(String(err).indexOf("not supported with --no-threads") !== -1, true); + quit(); +} + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); + +var source = new g.Uint8Array(wasmTextToBinary('(module (func unreachable))')); +source.url = "http://example.org/test.wasm"; +source.sourceMappingURL = "http://example.org/test.wasm.map"; +g.source = source; + +var gotUrl, gotSourceMapURL; +var dbg = new Debugger(g); +dbg.allowWasmBinarySource = true; +dbg.onNewScript = function (s, g) { + gotUrl = s.source.url; + gotSourceMapURL = s.source.sourceMapURL; +}; + +g.eval('WebAssembly.instantiateStreaming(source);'); + +drainJobQueue(); + +assertEq(gotUrl, "http://example.org/test.wasm"); +assertEq(gotSourceMapURL, "http://example.org/test.wasm.map"); diff --git a/js/src/jit-test/tests/debug/wasm-sourceMappingURL.js b/js/src/jit-test/tests/debug/wasm-sourceMappingURL.js new file mode 100644 index 0000000000..7f7f245faf --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-sourceMappingURL.js @@ -0,0 +1,72 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() + +// Tests that wasm module sourceMappingURL section is parsed. + +load(libdir + "asserts.js"); +load(libdir + "wasm-binary.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +var gotScript; +dbg.allowWasmBinarySource = true; +dbg.onNewScript = (script) => { + gotScript = script; +} + +function toU8(array) { + for (let b of array) + assertEq(b < 256, true); + return Uint8Array.from(array); +} + +function varU32(u32) { + assertEq(u32 >= 0, true); + assertEq(u32 < Math.pow(2,32), true); + var bytes = []; + do { + var byte = u32 & 0x7f; + u32 >>>= 7; + if (u32 != 0) + byte |= 0x80; + bytes.push(byte); + } while (u32 != 0); + return bytes; +} + +function string(name) { + var nameBytes = name.split('').map(c => { + var code = c.charCodeAt(0); + assertEq(code < 128, true); // TODO + return code; + }); + return varU32(nameBytes.length).concat(nameBytes); +} + +function appendSourceMappingURL(wasmBytes, url) { + if (!url) + return wasmBytes; + var payload = [...string('sourceMappingURL'), ...string(url)]; + return Uint8Array.from([...wasmBytes, userDefinedId, payload.length, ...payload]); +} +g.toWasm = (wast, url) => appendSourceMappingURL(wasmTextToBinary(wast), url); + +// The sourceMappingURL section is not present +g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(toWasm('(module (func) (export "" (func 0)))')));`); +assertEq(gotScript.format, "wasm"); +assertEq(gotScript.source.sourceMapURL, null); + +// The sourceMappingURL section is present +g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(toWasm('(module (func) (export "a" (func 0)))', 'http://example.org/test')));`); +assertEq(gotScript.format, "wasm"); +assertEq(gotScript.source.sourceMapURL, 'http://example.org/test'); + +// The sourceMapURL is read-only for wasm +assertThrowsInstanceOf(() => gotScript.source.sourceMapURL = 'foo', Error); + +// The sourceMappingURL section is present, and is still available when wasm +// binary source is disabled. +dbg.allowWasmBinarySource = false; +g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(toWasm('(module (func) (export "a" (func 0)))', 'http://example.org/test2')));`); +assertEq(gotScript.format, "wasm"); +assertEq(gotScript.source.sourceMapURL, 'http://example.org/test2'); diff --git a/js/src/jit-test/tests/debug/wasm-step.js b/js/src/jit-test/tests/debug/wasm-step.js new file mode 100644 index 0000000000..ff6f4c6065 --- /dev/null +++ b/js/src/jit-test/tests/debug/wasm-step.js @@ -0,0 +1,64 @@ +// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() + +// Tests that wasm module scripts raises onEnterFrame and onLeaveFrame events. + +load(libdir + "wasm.js"); + +// Checking if we stop at every wasm instruction during step. +var onEnterFrameCalled, onLeaveFrameCalled, onStepCalled; +wasmRunWithDebugger( + '(module (func (nop) (nop)) (export "test" (func 0)))', + undefined, + function ({dbg}) { + onEnterFrameCalled = 0; + onLeaveFrameCalled = 0; + onStepCalled = []; + dbg.onEnterFrame = function (frame) { + if (frame.type != 'wasmcall') return; + onEnterFrameCalled++; + frame.onStep = function () { + onStepCalled.push(frame.offset); + }; + frame.onPop = function () { + onLeaveFrameCalled++; + }; + }; + }, + function ({error}) { + assertEq(error, undefined); + assertEq(onEnterFrameCalled, 1); + assertEq(onLeaveFrameCalled, 1); + assertEq(onStepCalled.length, 2); + assertEq(onStepCalled[0] > 0, true); + // The onStepCalled offsets are in ascending order. + assertEq(onStepCalled[0] < onStepCalled[1], true); + } +); + +// Checking if step mode was disabled after debugger has been detached. +wasmRunWithDebugger( + '(module (func (nop) (nop)) (export "test" (func 0)))', + undefined, + function ({dbg, g}) { + onEnterFrameCalled = 0; + onLeaveFrameCalled = 0; + onStepCalled = []; + dbg.onEnterFrame = function (frame) { + if (frame.type != 'wasmcall') return; + onEnterFrameCalled++; + frame.onStep = function () { + onStepCalled.push(frame.offset); + }; + frame.onPop = function () { + onLeaveFrameCalled++; + }; + dbg.removeDebuggee(g); + }; + }, + function ({error}) { + assertEq(error, undefined); + assertEq(onEnterFrameCalled, 1); + assertEq(onLeaveFrameCalled, 0); + assertEq(onStepCalled.length, 0); + } +); diff --git a/js/src/jit-test/tests/decorators/accessor-decorators.js b/js/src/jit-test/tests/decorators/accessor-decorators.js new file mode 100644 index 0000000000..33e9c8a728 --- /dev/null +++ b/js/src/jit-test/tests/decorators/accessor-decorators.js @@ -0,0 +1,189 @@ +// |jit-test| skip-if: !getBuildConfiguration("decorators") + +load(libdir + "asserts.js"); + +let dec1Called = false; + +// This explicitly tests the case where undefined is returned. +function dec(value, context) { + dec1Called = true; + // return undefined +} + +function decorate_getter(value, context) { + return { + get: function() { + return 2 * value.get.call(this); + } + }; +} + +function decorate_setter(value, context) { + return { + set: function(x) { + return value.set.call(this, 2*x); + } + }; +} + +function decorate_initializer(value, context) { + return { + init: function(initialValue) { + return 2 * initialValue; + } + }; +} + +function checkDecoratorContext(kind, isPrivate, isStatic, name) { + return (value, context) => { + assertEq(typeof value, "object"); + assertEq(typeof value.get, "function"); + assertEq(typeof value.set, "function"); + assertEq(context.kind, kind); + assertEq(typeof context.access, "object"); + assertEq(context.private, isPrivate); + assertEq(context.static, isStatic); + assertEq(context.name, name); + if (isStatic) { + assertEq(typeof context.addInitializer, "undefined"); + } else { + assertEq(typeof context.addInitializer, "function"); + } + // return undefined + } +} + +class C { + @dec accessor x = 1; + @decorate_getter accessor x2 = 1; + @decorate_setter @decorate_getter accessor x3 = 1; + @decorate_initializer accessor x4 = 1; + @decorate_initializer @decorate_initializer accessor x5 = 1; + @decorate_setter @decorate_getter @decorate_initializer accessor x6 = 1; + @checkDecoratorContext("accessor", true, false, "x8 accessor storage") accessor x8 = 1; + @checkDecoratorContext("accessor", true, true, "x9 accessor storage") static accessor x9 = 1; + @checkDecoratorContext("accessor", true, false, "#x10 accessor storage") accessor #x10 = 1; +} + +let c = new C(); +assertEq(dec1Called, true); +assertEq(c.x, 1); +c.x = 2; +assertEq(c.x, 2); +assertEq(c.x2, 2); +assertEq(c.x3, 2); +c.x3 = 4; +assertEq(c.x3, 16); +assertEq(c.x4, 2); +assertEq(c.x5, 4); +assertEq(c.x6, 4); +c.x6 = 4; +assertEq(c.x6, 16); + +class D { + @decorate_initializer accessor #x = 1; + @decorate_getter accessor #x2 = 1; + @decorate_setter @decorate_getter accessor #x3 = 1; + + getX() { + return this.#x; + } + + setX(v) { + this.#x = v; + } + + getX2() { + return this.#x2; + } + + setX2(v) { + this.#x2 = v; + } + + getX3() { + return this.#x3; + } + + setX3(v) { + this.#x3 = v; + } +} + +let d = new D(); +assertEq(d.getX(), 2); +d.setX(4); +assertEq(d.getX(), 4); +assertEq(d.getX2(), 2); +d.setX2(4); +assertEq(d.getX2(), 8); +assertEq(d.getX3(), 2); +d.setX3(4); +assertEq(d.getX3(), 16); + +class E { + @decorate_getter static accessor x = 1; +} + +assertEq(E.x, 2); +E.x = 2; +assertEq(E.x, 4); + +class F { + @decorate_getter static accessor #x = 1; + + getX() { + return F.#x; + } + + setX(v) { + F.#x = v; + } +} +let f = new F(); +assertEq(f.getX(), 2); +f.setX(4); +assertEq(f.getX(), 8); + +assertThrowsInstanceOf(() => { + class G { + @(() => { return "hello!"; }) accessor x; + } +}, TypeError), "Returning a value other than undefined or a callable throws."; + +assertThrowsInstanceOf(() => { + class G { + @(() => { return {get: "hello!"}; }) accessor x; + } +}, TypeError), "Returning a value other than undefined or a callable throws."; + +assertThrowsInstanceOf(() => { + class G { + @(() => { return {set: "hello!"}; }) accessor x; + } +}, TypeError), "Returning a value other than undefined or a callable throws."; + +assertThrowsInstanceOf(() => { + class G { + @(() => { return {init: "hello!"}; }) accessor x; + } +}, TypeError), "Returning a value other than undefined or a callable throws."; + +const decoratorOrder = []; +function makeOrderedDecorator(order) { + return function (value, context) { + decoratorOrder.push(order); + return value; + } +} + +class H { + @makeOrderedDecorator(1) @makeOrderedDecorator(2) @makeOrderedDecorator(3) + accessor x = 1; +} + +let h = new H(); +assertEq(decoratorOrder.length, 3); +assertEq(decoratorOrder[0], 3); +assertEq(decoratorOrder[1], 2); +assertEq(decoratorOrder[2], 1); diff --git a/js/src/jit-test/tests/decorators/accessors.js b/js/src/jit-test/tests/decorators/accessors.js new file mode 100644 index 0000000000..660c6e79df --- /dev/null +++ b/js/src/jit-test/tests/decorators/accessors.js @@ -0,0 +1,86 @@ +// |jit-test| skip-if: !getBuildConfiguration("decorators") + +load(libdir + "asserts.js"); + +function assertAccessorDescriptor(object, name) { + var desc = Object.getOwnPropertyDescriptor(object, name); + assertEq(desc.configurable, true, "The value of `desc.configurable` is `true`"); + assertEq(desc.enumerable, false, "The value of `desc.enumerable` is `false`"); + assertEq(typeof desc.get, 'function', "`typeof desc.get` is `'function'`"); + assertEq(typeof desc.set, 'function', "`typeof desc.set` is `'function'`"); + assertEq( + 'prototype' in desc.get, + false, + "The result of `'prototype' in desc.get` is `false`" + ); + assertEq( + 'prototype' in desc.set, + false, + "The result of `'prototype' in desc.set` is `false`" + ); +} + +class C { + accessor x; +} + +assertAccessorDescriptor(C.prototype, 'x'); + +let c = new C(); +assertEq(c.x, undefined, "The value of `c.x` is `undefined` after construction"); +c.x = 2; +assertEq(c.x, 2, "The value of `c.x` is `2`, after executing `c.x = 2;`"); + +class D { + accessor x = 1; +} + +assertAccessorDescriptor(D.prototype, 'x'); + +let d = new D(); +assertEq(d.x, 1, "The value of `d.x` is `1` after construction"); +d.x = 2; +assertEq(d.x, 2, "The value of `d.x` is `2`, after executing `d.x = 2;`"); + +class E { + accessor #x = 1; + + getX() { + return this.#x; + } + + setX(v) { + this.#x = v; + } +} + +let e = new E(); +assertEq(e.getX(), 1, "The value of `e.x` is `1` after construction"); +e.setX(2); +assertEq(e.getX(), 2, "The value of `e.x` is `2`, after executing `e.setX(2);`"); + +class F { + static accessor x = 1; +} + +assertEq(F.x, 1, "The value of `F.x` is `1` after construction"); +F.x = 2; +assertEq(F.x, 2, "The value of `F.x` is `2`, after executing `F.x = 2;`"); + +assertAccessorDescriptor(F, 'x'); + +class G { + static accessor #x = 1; + + getX() { + return G.#x; + } + + setX(v) { + G.#x = v; + } +} +g = new G(); +assertEq(g.getX(), 1, "The value of `g.getX()` is `1` after construction"); +g.setX(2); +assertEq(g.getX(), 2, "The value of `g.getX()` is `2`, after executing `g.setX(2)`"); diff --git a/js/src/jit-test/tests/decorators/addInitializer.js b/js/src/jit-test/tests/decorators/addInitializer.js new file mode 100644 index 0000000000..334de8f721 --- /dev/null +++ b/js/src/jit-test/tests/decorators/addInitializer.js @@ -0,0 +1,39 @@ +// |jit-test| skip-if: !getBuildConfiguration("decorators") +load(libdir + "asserts.js"); + +let extraInitializerCalled = {}; + +function checkDecoratorContext(kind, isPrivate, isStatic, name) { + return function (value, context) { + if (kind == "field") { + assertEq(value, undefined); + } else if (kind == "accessor") { + assertEq(typeof value, "object"); + assertEq(typeof value.get, "function"); + assertEq(typeof value.set, "function"); + } + assertEq(context.kind, kind); + assertEq(typeof context.access, "object"); + assertEq(context.private, isPrivate); + assertEq(context.static, isStatic); + assertEq(context.name, name); + assertEq(typeof context.addInitializer, "function"); + context.addInitializer(() => {extraInitializerCalled[context.name] = true;}); + // return undefined + } +} + +class C { + @checkDecoratorContext("field", false, false, "x") x; + @checkDecoratorContext("accessor", true, false, "y accessor storage") accessor y; + @checkDecoratorContext("method", false, false, "f") f() {}; + @checkDecoratorContext("method", false, false, 1) 1() {}; + @checkDecoratorContext("method", false, false, 2) 2n() {}; +} + +let c = new C(); +assertEq(extraInitializerCalled["x"], true); +assertEq(extraInitializerCalled["y accessor storage"], true); +assertEq(extraInitializerCalled["f"], true); +assertEq(extraInitializerCalled["1"], true); +assertEq(extraInitializerCalled["2"], true); diff --git a/js/src/jit-test/tests/decorators/class-decorators.js b/js/src/jit-test/tests/decorators/class-decorators.js new file mode 100644 index 0000000000..f9b120ff45 --- /dev/null +++ b/js/src/jit-test/tests/decorators/class-decorators.js @@ -0,0 +1,101 @@ +// |jit-test| skip-if: !getBuildConfiguration("decorators") + +load(libdir + "asserts.js"); + +let dec1Called = false; + +// This explicitly tests the case where undefined is returned. +function dec1(value, context) { + dec1Called = true; + // returns undefined +} + +function dec2(value, context) { + return class extends value { + constructor(...args) { + super(...args); + } + + x2 = true; + } +} + +function checkDecoratorContext(name) { + return function (value, context) { + assertEq(typeof value, "function"); + assertEq(context.kind, "class"); + assertEq(context.name, name); + assertEq(typeof context.addInitializer, "undefined"); + // return undefined + } +} + +@dec1 class C1 {}; +assertEq(dec1Called, true); + +@dec2 class C2 { + x1 = true; +} + +let c2 = new C2(); +assertEq(c2.x1, true); +assertEq(c2.x2, true); + +let c3 = new @dec2 class { + x1 = true; +} + +assertEq(c3.x1, true); +assertEq(c3.x2, true); + +@checkDecoratorContext("D") class D {} +let d2 = new @checkDecoratorContext(undefined) class {}; + +class E { + static #dec1(value, context) { + return class extends value { + constructor(...args) { + super(...args); + } + + x2 = true; + } + } + static { + this.F = @E.#dec1 class { + x1 = true; + } + } +} + +let f = new E.F(); +assertEq(f.x1, true); +assertEq(f.x2, true); + +assertThrowsInstanceOf(() => { + @(() => { return "hello!"; }) class G {} +}, TypeError), "Returning a value other than undefined or a callable throws."; + +assertThrowsInstanceOf(() => { + class G { + static #dec1() {} + static { + @G.#dec1 class G {} + } + } +}, ReferenceError), "can't access lexical declaration 'G' before initialization"; + +const decoratorOrder = []; +function makeOrderedDecorator(order) { + return function (value, context) { + decoratorOrder.push(order); + return value; + } +} + +@makeOrderedDecorator(1) @makeOrderedDecorator(2) @makeOrderedDecorator(3) +class H {} +assertEq(decoratorOrder.length, 3); +assertEq(decoratorOrder[0], 3); +assertEq(decoratorOrder[1], 2); +assertEq(decoratorOrder[2], 1); diff --git a/js/src/jit-test/tests/decorators/decorator-this.js b/js/src/jit-test/tests/decorators/decorator-this.js new file mode 100644 index 0000000000..b545729ca4 --- /dev/null +++ b/js/src/jit-test/tests/decorators/decorator-this.js @@ -0,0 +1,36 @@ +// |jit-test| skip-if: !getBuildConfiguration("decorators") + +load(libdir + "asserts.js"); + +let globalDecCalled = false; +function globalDec(value, context) { + globalDecCalled = true; + assertEq(this, globalThis); +} + +// Forward declare c to be able to check it inside of C when running decorators. +let c; +let classDecCalled = false; +class C { + classDec(value, context) { + classDecCalled = true; + // At this point, `this` is an instance of C + assertEq(c, this); + return function(initialValue) { + // At this point, `this` is an instance of D + assertEq(this instanceof D, true); + return initialValue; + } + } +} + +c = new C(); + +class D { + @globalDec x1; + @c.classDec x2; +} + +let d = new D(); +assertEq(globalDecCalled, true); +assertEq(classDecCalled, true); diff --git a/js/src/jit-test/tests/decorators/field-decorators.js b/js/src/jit-test/tests/decorators/field-decorators.js new file mode 100644 index 0000000000..7b02f35ef9 --- /dev/null +++ b/js/src/jit-test/tests/decorators/field-decorators.js @@ -0,0 +1,104 @@ +// |jit-test| skip-if: !getBuildConfiguration("decorators") + +load(libdir + "asserts.js"); + +let dec1Called = false; +let dec2Called = false; + +// This explicitly tests the case where undefined is returned. +function dec1(value, context) { + dec1Called = true; + // returns undefined +} + +function dec2(value, context) { + dec2Called = true; + return (initialValue) => 2; +} + +function dec3(value, context) { + return (initialValue) => initialValue*2; +} + +function checkDecoratorContext(kind, isPrivate, isStatic, name) { + return (value, context) => { + assertEq(value, undefined); + assertEq(context.kind, kind); + assertEq(typeof context.access, "object"); + assertEq(context.private, isPrivate); + assertEq(context.static, isStatic); + assertEq(context.name, name); + if (isStatic) { + assertEq(typeof context.addInitializer, "undefined"); + } else { + assertEq(typeof context.addInitializer, "function"); + } + } +} + +class C { + @dec1 x; + @dec1 x2 = 1; + @checkDecoratorContext("field", false, false, "x3") x3; + @checkDecoratorContext("field", false, true, "x4") static x4; + @checkDecoratorContext("field", true, false, "#x5") #x5; + @dec2 x6; + @dec3 x7 = 1; + @dec2 @dec3 x8 = 1; + @dec2 static x9; + @dec2 #x10; + getX10 = () => { + return this.#x10; + }; + @dec3 #x11 = 2; + getX11 = () => { + return this.#x11; + }; + @dec1 42 = 1; + @dec2 [43]; + @dec2 static #x12 = 1; + getX12() { + return C.#x12; + } +} + + +let c = new C(); +assertEq(dec1Called, true); +assertEq(c.x2, 1); +assertEq(dec2Called, true); +assertEq(c.x6, 2); +assertEq(c.x7, 2); +assertEq(c.x8, 2); +assertEq(C.x9, 2); +assertEq(c.getX10(), 2); +assertEq(c.getX11(), 4); +assertEq(c[42], 1); +assertEq(c[43], 2); +assertEq(c.getX12(), 2); + +assertThrowsInstanceOf(() => { + class D { + @(() => { return "hello!"; }) f(x) { return x; } + } +}, TypeError), "Returning a value other than undefined or a callable throws."; + +const decoratorOrder = []; +function makeOrderedDecorator(order) { + return function (value, context) { + decoratorOrder.push(order); + return value; + } +} + +class D { + @makeOrderedDecorator(1) @makeOrderedDecorator(2) @makeOrderedDecorator(3) + x = 1; +} + +let d = new D(); +assertEq(decoratorOrder.length, 3); +assertEq(decoratorOrder[0], 3); +assertEq(decoratorOrder[1], 2); +assertEq(decoratorOrder[2], 1); +assertEq(d.x, 1); diff --git a/js/src/jit-test/tests/decorators/getter-setter-decorators.js b/js/src/jit-test/tests/decorators/getter-setter-decorators.js new file mode 100644 index 0000000000..e3c370f500 --- /dev/null +++ b/js/src/jit-test/tests/decorators/getter-setter-decorators.js @@ -0,0 +1,68 @@ +// |jit-test| skip-if: !getBuildConfiguration("decorators") + +load(libdir + "asserts.js"); + +let dec1Called = false; + +// This explicitly tests the case where undefined is returned. +function dec(value, context) { + dec1Called = true; + // return undefined +} + +function decorate_getter(value, context) { + return function() { + return 2 * value.call(this); + } +} + +function decorate_setter(value, context) { + return function(x) { + return value.call(this, 2*x); + } +} + +function checkDecoratorContext(kind, isPrivate, isStatic, name) { + return (value, context) => { + assertEq(typeof value.call, "function"); + assertEq(context.kind, kind); + assertEq(typeof context.access, "object"); + assertEq(context.private, isPrivate); + assertEq(context.static, isStatic); + assertEq(context.name, name); + if (isStatic) { + assertEq(typeof context.addInitializer, "undefined"); + } else { + assertEq(typeof context.addInitializer, "function"); + } + } +} + +class C { + setter5Value; + + @dec get getter1() { return "unmodified"; } + @checkDecoratorContext("getter", false, false, "getter2") get getter2() { } + @checkDecoratorContext("getter", false, true, "getter3") static get getter3() { } + @checkDecoratorContext("getter", true, false, "#getter4") get #getter4() { } + @decorate_getter get getter5() { return 1; } + + @dec set setter1(value) { } + @checkDecoratorContext("setter", false, false, "setter2") set setter2(value) { } + @checkDecoratorContext("setter", false, true, "setter3") static set setter3(value) { } + @checkDecoratorContext("setter", true, false, "#setter4") set #setter4(value) { } + @decorate_setter set setter5(value) { this.setter5Value = value; } +} + +let c = new C(); +assertEq(dec1Called, true); +assertEq(c.getter1, "unmodified"); +assertEq(c.getter5, 2); +c.setter5 = 1; +assertEq(c.setter5Value, 2); + +assertThrowsInstanceOf(() => { + class D { + @(() => { return "hello!"; }) get f() { return "unmodified"; } + } +}, TypeError), "Returning a value other than undefined or a callable throws."; diff --git a/js/src/jit-test/tests/decorators/method-decorators.js b/js/src/jit-test/tests/decorators/method-decorators.js new file mode 100644 index 0000000000..59708aa70b --- /dev/null +++ b/js/src/jit-test/tests/decorators/method-decorators.js @@ -0,0 +1,122 @@ +// |jit-test| skip-if: !getBuildConfiguration("decorators") + +load(libdir + "asserts.js"); + +let dec1Called = false; + +// This explicitly tests the case where undefined is returned. +function dec1(value, context) { + dec1Called = true; + // return undefined +} + +function dec2(value, context) { + return (x) => "replaced: " + x; +} + +function dec3(value, context) { + return (x) => "decorated: " + value.call(this, x); +} + +let decorators = { + "dec4": (value, context) => { + return (x) => "decorated: " + x; + }, + "more": { + "deeply": { + "nested": { + "dec5": (value, context) => { + return (x) => "decorated: " + x; + } + } + } + } +}; + +function dec6(arg) { + return (value, context) => { + return (x) => arg + " decorated: " + value.call(this, x); + } +} + +function checkDecoratorContext(kind, isPrivate, isStatic, name) { + return (value, context) => { + assertEq(typeof value.call, "function"); + assertEq(context.kind, kind); + assertEq(typeof context.access, "object"); + assertEq(context.private, isPrivate); + assertEq(context.static, isStatic); + assertEq(context.name, name); + if (isStatic) { + assertEq(typeof context.addInitializer, "undefined"); + } else { + assertEq(typeof context.addInitializer, "function"); + } + } +} + +class C { + @dec1 f1(x) { return "called with: " + x; } + @dec2 f2(x) { return "called with: " + x; } + @dec1 @dec2 f3(x) { return "called with: " + x; } + @dec1 @dec2 @dec3 f4(x) { return "called with: " + x; } + @decorators.dec4 f5(x) { return "called with: " + x; } + @decorators.more.deeply.nested.dec5 f6(x) { return "called with: " + x; } + @(() => { }) f7(x) { return "called with: " + x; } + @((value, context) => { return (x) => "decorated: " + x; }) f8(x) { return "called with: " + x; } + @dec6("hello!") f9(x) { return "called with: " + x; } + + static dec7(value, context) { return function(x) { return "replaced: " + x; } } + static #dec8(value, context) { return function(x) { return "replaced: " + x; } } + + static { + this.D = class { + @C.dec7 static f10(x) { return "called with: " + x; } + @C.#dec8 static f11(x) { return "called with: " + x; } + } + } + + @checkDecoratorContext("method", false, false, "f12") f12(x) { return x; } + @checkDecoratorContext("method", false, true, "f13") static f13(x) { return x; } + @checkDecoratorContext("method", true, false, "#f14") #f14(x) { return x; } +} + +let c = new C(); +assertEq(dec1Called, true); +assertEq(c.f1("value"), "called with: value"); +assertEq(c.f2("value"), "replaced: value"); +assertEq(c.f3("value"), "replaced: value"); +assertEq(c.f4("value"), "replaced: value"); +assertEq(c.f5("value"), "decorated: value"); +assertEq(c.f6("value"), "decorated: value"); +assertEq(c.f7("value"), "called with: value"); +assertEq(c.f8("value"), "decorated: value"); +assertEq(c.f9("value"), "hello! decorated: called with: value"); +assertEq(C.D.f10("value"), "replaced: value"); +assertEq(C.D.f11("value"), "replaced: value"); + +assertThrowsInstanceOf(() => { + class D { + @(() => { return "hello!"; }) f(x) { return x; } + } +}, TypeError), "Returning a value other than undefined or a callable throws."; + +const decoratorOrder = []; +function makeOrderedDecorator(order) { + return function (value, context) { + decoratorOrder.push(order); + return value; + } +} + +class E { + @makeOrderedDecorator(1) @makeOrderedDecorator(2) @makeOrderedDecorator(3) + f(x) { return x; } +} + +let e = new E(); +assertEq(e.f("value"), "value"); +assertEq(decoratorOrder.length, 3); +assertEq(decoratorOrder[0], 3); +assertEq(decoratorOrder[1], 2); +assertEq(decoratorOrder[2], 1); diff --git a/js/src/jit-test/tests/decorators/syntax.js b/js/src/jit-test/tests/decorators/syntax.js new file mode 100644 index 0000000000..635e30bf7b --- /dev/null +++ b/js/src/jit-test/tests/decorators/syntax.js @@ -0,0 +1,172 @@ +// |jit-test| skip-if: !getBuildConfiguration("decorators") + +load(libdir + "asserts.js"); + +Reflect.parse("class c {@dec1 field = false;}"); +Reflect.parse("class c {@dec1 @dec2 @dec3 field = false;}"); +Reflect.parse("class c {@dec1 @dec2 @dec3('a') static field = false;}"); +Reflect.parse("class c {@dec1 method() {};}"); +Reflect.parse("class c {@dec1 @dec2 @dec3 method() {};}"); +Reflect.parse("class c {@dec1 @dec2 @dec3 static method() {};}"); +Reflect.parse("class c {@dec1 @dec2('a') @dec3 method(...args) {};}"); +Reflect.parse("class c {@((a, b, c) => {}) method(a, b) {};}"); +Reflect.parse("class c {@((a, b, c) => {}) @dec2('a', 'b') @dec3 method(a, b) {};}"); +Reflect.parse("@dec1 class c {}"); +Reflect.parse("@dec1 @dec2 @dec3 class c {}"); +Reflect.parse("@dec1('a') @(() => {}) @dec3 class c {}"); +Reflect.parse("@dec1('a') @(() => {}) @dec3 class c {@((a, b, c) => {}) @dec2('a', 'b') @dec3 method(a, b) {};}"); +Reflect.parse("x = @dec class { #x }"); +Reflect.parse("x = (class A { }, @dec class { })"); +Reflect.parse("@dec1 class A extends @dec2 class B extends @dec3 class {} {} {}"); +Reflect.parse("class c {@dec1.dec2.dec3 method() {};}"); +Reflect.parse("class c {@dec1 @dec2.dec3.dec4 @dec5 method() {};}"); +Reflect.parse("class c {@dec1('a') @dec2.dec3.dec4 @dec5 method() {};}"); +Reflect.parse("class c {@dec1('a') @dec2.dec3.dec4('b', 'c') @dec5 method() {};}"); +Reflect.parse("class c {@dec1('a') @dec2.dec3.dec4('b', 'c') @dec5.dec6 method() {};}"); +Reflect.parse("@dec1.dec2 class c {}"); +Reflect.parse("@dec1.dec2 @dec3.dec4 @dec5 class c {}"); +Reflect.parse("@dec1.dec2('a') @(() => {}) @dec4 class c {}"); +Reflect.parse("@dec1.dec2('a') @(() => {}) @dec4 class c {@((a, b, c) => {}) @dec5.dec6('a', 'b') @dec7 method(a, b) {};}"); +Reflect.parse("class c {accessor field = false;}"); +Reflect.parse("class c {static accessor field = false;}"); +Reflect.parse("class c {@dec1 @dec2 accessor field = false;}"); +Reflect.parse("class c {@dec1 @dec2 @dec3 static accessor field = false;}"); +Reflect.parse("let accessor = false;"); +Reflect.parse("class accessor {accessor = false;}"); +Reflect.parse("class c {accessor = false;}"); +Reflect.parse("class c {accessor\n= false;}"); +Reflect.parse("class c {accessor\nfield = false;}"); +Reflect.parse("class C {accessor\n foo() {}}"); +Reflect.parse("class c {accessor; }"); +Reflect.parse("class c {accessor\nset field(a) {}}"); +Reflect.parse("class c {accessor\nasync field(a) {}}"); +Reflect.parse("class c {accessor\n* field(a) {}}"); +Reflect.parse("{accessor, field(a)}"); +Reflect.parse("class c {static accessor x = 1;}"); +Reflect.parse("class c {accessor #y = 2;}"); +Reflect.parse("class c {static dec1(){}; static {@c.dec1 class d{@c.dec1 field}}}"); +Reflect.parse("class c {static #dec1(){}; static {@c.#dec1 class d{@c.#dec1 field}}}"); +Reflect.parse("class c {@as field = false;}"); +Reflect.parse("class c {@accessor field = false;}"); +Reflect.parse("class c {@assert field = false;}"); +Reflect.parse("class c {@async field = false;}"); +Reflect.parse("class c {@await field = false;}"); +Reflect.parse("class c {@each field = false;}"); +Reflect.parse("class c {@from field = false;}"); +Reflect.parse("class c {@get field = false;}"); +Reflect.parse("class c {@meta field = false;}"); +Reflect.parse("class c {@of field = false;}"); +Reflect.parse("class c {@set field = false;}"); +Reflect.parse("class c {@target field = false;}"); + +assertThrowsInstanceOf(() => Reflect.parse("class c {@ method() {};}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@((a, b, c => {}) method(a, b) {};}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@dec1 static @dec2 method(a, b) {};}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("@dec1 let x = 1"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("@dec1 f(a) {}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("@dec1 () => {}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("@class class { x; }"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("@for class { x; }"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@dec1. method() {};}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("@dec1. class c {method() {};}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("@dec1.(a) class c {method() {};}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {accessor method() {};}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {accessor @dec1 field = false;}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {accessor, }"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("({ accessor field: 10 })"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("({ accessor foo });"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("({ accessor foo = 10 } = {});"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {async accessor foo() {}}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {accessor set field(a) {}}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {accessor *field(a) {}}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {accessor *field(a) {}}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@dec[0] x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@new dec() x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@super x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@super() x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@super.dec() x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@import \"decorator\" x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@dec`template` x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@import.meta.url x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@new.target x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@obj.first?.second x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@class x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@function() x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@{} x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@[] x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@\"string\" x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@`string` x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@/[a-z]+/ x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@true x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@1n x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@this x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@null x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@... x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@let x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@static x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@yield x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@if x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@enum x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@implements x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@foo().bar.prop x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@foo.bar().prop x}"), SyntaxError); +assertThrowsInstanceOf(() => Reflect.parse("class c {@foo.bar().prop() x}"), SyntaxError); + +// assert we have the right syntax tree +const syntax = Reflect.parse("class c {}"); +assertEq(syntax.type, "Program"); +assertEq(syntax.body.length, 1); +assertEq(syntax.body[0].type, "ClassStatement"); +assertEq(syntax.body[0].id.type, "Identifier"); +assertEq(syntax.body[0].id.name, "c"); +assertEq(syntax.body[0].decorators, null); + +// assert decrorators on a class +const syntax2 = Reflect.parse("@dec @dec2 class c {}"); +assertEq(syntax2.type, "Program"); +assertEq(syntax2.body.length, 1); +assertEq(syntax2.body[0].decorators.type, "SequenceExpression"); +assertEq(syntax2.body[0].decorators.expressions.length, 2); +assertEq(syntax2.body[0].decorators.expressions[0].type, "Identifier"); +assertEq(syntax2.body[0].decorators.expressions[0].name, "dec"); +assertEq(syntax2.body[0].decorators.expressions[1].type, "Identifier"); +assertEq(syntax2.body[0].decorators.expressions[1].name, "dec2"); + +// assert decorators on class fields +const syntax3 = Reflect.parse("class c {@dec1 @dec2 field = false;}"); +assertEq(syntax3.type, "Program"); +assertEq(syntax3.body.length, 1); +assertEq(syntax3.body[0].decorators, null); +assertEq(syntax3.body[0].body[0].type, "ClassField"); +assertEq(syntax3.body[0].body[0].decorators.type, "SequenceExpression"); +assertEq(syntax3.body[0].body[0].decorators.expressions.length, 2); +assertEq(syntax3.body[0].body[0].decorators.expressions[0].type, "Identifier"); +assertEq(syntax3.body[0].body[0].decorators.expressions[0].name, "dec1"); +assertEq(syntax3.body[0].body[0].decorators.expressions[1].type, "Identifier"); +assertEq(syntax3.body[0].body[0].decorators.expressions[1].name, "dec2"); + +// assert decorators on accessors +const syntax4 = Reflect.parse("class c {@dec1 @dec2 accessor field = false;}"); +assertEq(syntax3.type, "Program"); +assertEq(syntax3.body.length, 1); +assertEq(syntax3.body[0].decorators, null); +assertEq(syntax3.body[0].body[0].type, "ClassField"); +assertEq(syntax3.body[0].body[0].decorators.type, "SequenceExpression"); +assertEq(syntax3.body[0].body[0].decorators.expressions.length, 2); +assertEq(syntax3.body[0].body[0].decorators.expressions[0].type, "Identifier"); +assertEq(syntax3.body[0].body[0].decorators.expressions[0].name, "dec1"); +assertEq(syntax3.body[0].body[0].decorators.expressions[1].type, "Identifier"); +assertEq(syntax3.body[0].body[0].decorators.expressions[1].name, "dec2"); + +// assert decorators on methods +const syntax5 = Reflect.parse("class c {@dec1 @dec2 method() {};}"); +assertEq(syntax5.type, "Program"); +assertEq(syntax5.body.length, 1); +assertEq(syntax5.body[0].decorators, null); +assertEq(syntax5.body[0].body[0].type, "ClassMethod"); +assertEq(syntax5.body[0].body[0].decorators.type, "SequenceExpression"); +assertEq(syntax5.body[0].body[0].decorators.expressions.length, 2); +assertEq(syntax5.body[0].body[0].decorators.expressions[0].type, "Identifier"); +assertEq(syntax5.body[0].body[0].decorators.expressions[0].name, "dec1"); +assertEq(syntax5.body[0].body[0].decorators.expressions[1].type, "Identifier"); +assertEq(syntax5.body[0].body[0].decorators.expressions[1].name, "dec2"); diff --git a/js/src/jit-test/tests/environments/bug1671563-strict.js b/js/src/jit-test/tests/environments/bug1671563-strict.js new file mode 100644 index 0000000000..5b9e8112ee --- /dev/null +++ b/js/src/jit-test/tests/environments/bug1671563-strict.js @@ -0,0 +1,25 @@ +// A `var` is `undefined` on entering a function body in strict mode too. + +"use strict"; + +load(libdir + "asserts.js"); + +function f(a = class C{}) { + var x; + return x; +} +assertEq(f(), undefined); + +function* g1(a = class C {}) { + var x; + assertEq(x, undefined); +} +g1().next(); + +function* g2(a = class C {}) { + x; + let x; +} +assertThrowsInstanceOf(() => g2().next(), ReferenceError); + + diff --git a/js/src/jit-test/tests/environments/bug1671563.js b/js/src/jit-test/tests/environments/bug1671563.js new file mode 100644 index 0000000000..29a24fbcd9 --- /dev/null +++ b/js/src/jit-test/tests/environments/bug1671563.js @@ -0,0 +1,24 @@ +// The value of a `var` on entering a function is `undefined`, even if a +// default expression uses the same stack slot for something else. + +load(libdir + "asserts.js"); + +function f(a = class C{}) { + var x; + return x; +} +assertEq(f(), undefined); + +function* g1(a = class C {}) { + var x; + assertEq(x, undefined); +} +g1().next(); + +function* g2(a = class C {}) { + x; + let x; +} +assertThrowsInstanceOf(() => g2().next(), ReferenceError); + + diff --git a/js/src/jit-test/tests/environments/bug1671762.js b/js/src/jit-test/tests/environments/bug1671762.js new file mode 100644 index 0000000000..3d7a452474 --- /dev/null +++ b/js/src/jit-test/tests/environments/bug1671762.js @@ -0,0 +1,20 @@ +(function() { + var v00, v01, v02, v03, v04, v05, v06, v07, v08, v09, v0a, v0b, v0c, v0d, v0e, v0f; + var v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v1a, v1b, v1c, v1d, v1e, v1f; + var v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v2a, v2b, v2c, v2d, v2e, v2f; + var v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v3a, v3b, v3c, v3d, v3e, v3f; + var v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v4a, v4b, v4c, v4d, v4e, v4f; + var v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v5a, v5b, v5c, v5d, v5e, v5f; + var v60, v61, v62, v63, v64, v65, v66, v67, v68, v69, v6a, v6b, v6c, v6d, v6e, v6f; + var v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v7a, v7b, v7c, v7d, v7e, v7f; + try { a1; } catch {} finally {} + var v80, v81, v82, v83, v84, v85, v86, v87, v88, v89, v8a, v8b, v8c, v8d, v8e, v8f; + var v90, v91, v92, v93, v94, v95, v96, v97, v98, v99, v9a, v9b, v9c, v9d, v9e, v9f; + var va0, va1, va2, va3, va4, va5, va6, va7, va8, va9, vaa, vab, vac, vad, vae, vaf; + var vb0, vb1, vb2, vb3, vb4, vb5, vb6, vb7, vb8, vb9, vba, vbb, vbc, vbd, vbe, vbf; + var vc0, vc1, vc2, vc3, vc4, vc5, vc6, vc7, vc8, vc9, vca, vcb, vcc, vcd, vce, vcf; + var vd0, vd1, vd2, vd3, vd4, vd5, vd6, vd7, vd8, vd9, vda, vdb, vdc, vdd, vde, vdf; + var ve0, ve1, ve2, ve3, ve4, ve5, ve6, ve7, ve8, ve9, vea, veb, vec, ved, vee, vef; + var vf0, vf1, vf2, vf3, vf4, vf5, vf6, vf7, vf8, vf9, vfa, vfb, vfc, vfd, vfe, vff; + var v100; +})(); diff --git a/js/src/jit-test/tests/environments/bug1710089.js b/js/src/jit-test/tests/environments/bug1710089.js new file mode 100644 index 0000000000..3bd78a14d3 --- /dev/null +++ b/js/src/jit-test/tests/environments/bug1710089.js @@ -0,0 +1,38 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") + +// Recursion depth reduced to allow PBL with debug build (hence larger +// frames) to work. +var iters = 75; + +// Generate a deeply nested version of: +// function outer() { +// var top_level_var = 42; +// var x3 = 0; +// function f2() { +// var x2 = x3; +// function f1() { +// var x1 = x2; +// function f0() { +// var x0 = x1; +// return top_level_var + x0; +// } +// return f0(); +// } +// return f1(); +// } +// return f2(); +// } + +var src = "return top_level_var + x0; " + +for (var i = 0; i < iters; i++) { + var def = "var x" + i + " = x" + (i+1) + "; "; + src = "function f" + i + "() { " + def + src + "} return f" + i + "();" +} +src = "var x" + iters + " = 0;" + src; +src = "var top_level_var = 42; " + src; + +var outer = Function(src); +for (var i = 0; i < 2; i++) { + assertEq(outer(), 42); +} diff --git a/js/src/jit-test/tests/environments/delete-global-var.js b/js/src/jit-test/tests/environments/delete-global-var.js new file mode 100644 index 0000000000..03b128affe --- /dev/null +++ b/js/src/jit-test/tests/environments/delete-global-var.js @@ -0,0 +1,13 @@ +let assert = assertEq; + +this.x = "OK"; +this.y = "FAIL"; + +for (let i = 0; i < 50; i++) { + assert(x, "OK"); + if (i === 40) { + this.x = "FAIL"; + delete this.x; + this.x = "OK"; + } +} diff --git a/js/src/jit-test/tests/environments/evaluate_envChainObject.js b/js/src/jit-test/tests/environments/evaluate_envChainObject.js new file mode 100644 index 0000000000..d6edb1f43c --- /dev/null +++ b/js/src/jit-test/tests/environments/evaluate_envChainObject.js @@ -0,0 +1,32 @@ +load(libdir + "asserts.js"); + +// Test with envChainObject in current global. +{ + let global = newGlobal(); + let envChainObject = { a: "test1" }; + assertEq(evaluate("a", { global, envChainObject }), "test1"); +} + +// Test with envChainObject in target global. +{ + let global = newGlobal(); + var envChainObject = global.evaluate('({a: "test2"})'); + assertEq(envChainObject.a, "test2"); + assertEq(evaluate("a", { global, envChainObject }), "test2"); +} + +// Unqualified variables objects are not allowed. + +if (!isProxy(evalcx(""))) { + // if --more-compartments option is not give, evalcx returns sandbox, + // which is unqualified variables object. + assertThrowsInstanceOf(() => { + evaluate("10", { envChainObject: evalcx("") }); + }, Error); +} + +// evalReturningScope returns NonSyntacticVariablesObject, which is unqualified +// variables object. +assertThrowsInstanceOf(() => { + evaluate("10", { envChainObject: evalReturningScope("1") }); +}, Error); diff --git a/js/src/jit-test/tests/environments/lexical-shadows-global-var.js b/js/src/jit-test/tests/environments/lexical-shadows-global-var.js new file mode 100644 index 0000000000..9a8a8792b6 --- /dev/null +++ b/js/src/jit-test/tests/environments/lexical-shadows-global-var.js @@ -0,0 +1,9 @@ +this.x = "OK"; + +for (var i = 0; i < 50; i++) { + assertEq(x, "OK"); + if (i === 40) { + this.x = "FAIL"; + evaluate("let x = 'OK';"); + } +} diff --git a/js/src/jit-test/tests/environments/replace-global-var-with-getter.js b/js/src/jit-test/tests/environments/replace-global-var-with-getter.js new file mode 100644 index 0000000000..f79948933a --- /dev/null +++ b/js/src/jit-test/tests/environments/replace-global-var-with-getter.js @@ -0,0 +1,13 @@ +let assert = assertEq; + +this.x = "OK"; + +for (let i = 0; i < 50; i++) { + assert(x, "OK"); + if (i === 40) { + this.x = "FAIL"; + Object.defineProperty(this, "x", { + get() { return "OK"; } + }); + } +} diff --git a/js/src/jit-test/tests/environments/strict-eval-bindings.js b/js/src/jit-test/tests/environments/strict-eval-bindings.js new file mode 100644 index 0000000000..8e60574d6b --- /dev/null +++ b/js/src/jit-test/tests/environments/strict-eval-bindings.js @@ -0,0 +1,221 @@ +// |jit-test| skip-if: !('disassemble' in this) +// Strict direct eval supports static binding of identifiers. + +"use strict"; + +// Check that a script contains a particular bytecode sequence. +// +// `actual` is the output of the `disassemble()` shell builtin. +// `expected` is a semicolon-separated string of opcodes. +// Can include regular expression syntax, e.g. "GetLocal .* x$" +// to match a GetLocal instruction with ` x` at the end of the line. +// `message` is a string to include in the error message if the test fails. +// +function assertBytecode(actual, expected, message) { + // Grab the opcode name and everything after to the end of the line. This + // intentionally includes the expression stack, as that is what makes the + // `GetLocal .* y$` trick work. The disassemble() output is like this: + // + // 00016: 10 GetLocal 0 # x y + // + let actualOps = + actual.split('\n') + .map(s => /^\d{5}: +\d+ +(.*)$/.exec(s)?.[1]) + .filter(x => x !== undefined); + + // Turn the expectations into regular expressions. + let expectedOps = + expected.split(';') + .map(s => { + s = s.trim(); + // If the op is a single word, like `Dup`, add `\b` to rule out + // similarly named ops like `Dup2`. + if (/^\w+$/.test(s)) { + s += "\\b"; + } + return new RegExp("^" + s); + }); + + // The condition on this for-loop is saying, "continue as long as the range + // [i..i+expectedOps.length] is entirely within in the actualOps array". + // Hence the rare use of `<=` in a for-loop! + for (let i = 0; i + expectedOps.length <= actualOps.length; i++) { + if (expectedOps.every((expectRegExp, j) => expectRegExp.test(actualOps[i + j]))) { + // Found a complete match. + return; + } + } + throw new Error(`Assertion failed: ${message}\nexpected ${uneval(expected)}, got:\n${actual}`); +} + + +// --- Tests + +var bytecode; + +// `var`s in strict eval code are statically bound as locals. +eval(` + var pet = "ostrich"; + bytecode = disassemble(); + pet +`); +assertEq(globalThis.hasOwnProperty('pet'), false); +assertBytecode(bytecode, 'String "ostrich"; SetLocal; Pop', + "`pet` is stored in a stack local"); +assertBytecode(bytecode, "GetLocal; SetRval; RetRval", + "`pet` is loaded from the local at the end of the eval code"); + +// Same for top-level `function`s. +eval(` + function banana() { return "potassium"; } + bytecode = disassemble(); +`); +assertEq(globalThis.hasOwnProperty('banana'), false); +assertBytecode(bytecode, 'Lambda .* banana; SetLocal; Pop', + "`banana` is stored in a stack local"); + +// Same for let/const. +eval(` + let a = "ushiko-san"; + const b = "umao-san"; + bytecode = disassemble(); + [a, b] +`); +assertBytecode(bytecode, 'String "ushiko-san"; InitLexical; Pop', + "`let a` is stored in a stack local"); +assertBytecode(bytecode, 'String "umao-san"; InitLexical; Pop', + "`const b` is stored in a stack local"); +assertBytecode(bytecode, 'GetLocal .* a$; InitElemArray; GetLocal .* b$; InitElemArray', + "lexical variables are loaded from stack locals"); + +// Same for arguments and locals in functions declared in strict eval code. +let g = eval(` + function f(a) { + let x = 'x'; + function g(b) { + let y = "wye"; + return [f, a, x, g, b, y]; + } + return g; + } + f(); +`); +bytecode = disassemble(g); +assertBytecode(bytecode, 'GetAliasedVar "f"', + "closed-over eval-scope `function` is accessed via aliased op"); +assertBytecode(bytecode, 'GetAliasedVar "a"', + "closed-over argument is accessed via aliased op"); +assertBytecode(bytecode, 'GetAliasedVar "x"', + "closed-over local `let` variable is accessed via aliased op"); +assertBytecode(bytecode, 'GetAliasedVar "g"', + "closed-over local `function` is accessed via aliased op"); +assertBytecode(bytecode, 'GetArg .* b$', + "non-closed-over arguments are optimized"); +assertBytecode(bytecode, 'GetLocal .* y$', + "non-closed-over locals are optimized"); + +// Closed-over bindings declared in strict eval code are statically bound. +var fac = eval(` + bytecode = disassemble(); + function fac(x) { return x <= 1 ? 1 : x * fac(x - 1); } + fac +`); +assertBytecode(bytecode, 'SetAliasedVar "fac"', + "strict eval code accesses closed-over top-level function using aliased ops"); +assertBytecode(disassemble(fac), 'GetAliasedVar "fac"', + "function in strict eval accesses itself using aliased ops"); + +// References to `this` in an enclosing method are statically bound. +let obj = { + m(s) { return eval(s); } +}; +let result = obj.m(` + bytecode = disassemble(); + this; +`); +assertEq(result, obj); +assertBytecode(bytecode, 'GetAliasedVar ".this"', + "strict eval in a method can access `this` using aliased ops"); + +// Same for `arguments`. +function fn_with_args() { + return eval(` + bytecode = disassemble(); + arguments[0]; + `); +} +assertEq(fn_with_args(117), 117); +assertBytecode(bytecode, 'GetAliasedVar "arguments"', + "strict eval in a function can access `arguments` using aliased ops"); + +// The frontend can emit GName ops in strict eval. +result = eval(` + bytecode = disassemble(); + fn_with_args; +`); +assertEq(result, fn_with_args); +assertBytecode(bytecode, 'GetGName "fn_with_args"', + "strict eval code can optimize access to globals"); + +// Even within a function. +function test_globals_in_function() { + result = eval(` + bytecode = disassemble(); + fn_with_args; + `); + assertEq(result, fn_with_args); + assertBytecode(bytecode, 'GetGName "fn_with_args"', + "strict eval code in a function can optimize access to globals"); +} +test_globals_in_function(); + +// Nested eval is no obstacle. +{ + let outer = "outer"; + const f = function (code, a, b) { + return eval(code); + }; + let result = f(` + eval("bytecode = disassemble();\\n" + + "outer += a + b;\\n"); + `, 3, 4); + assertEq(outer, "outer7"); + assertBytecode(bytecode, 'GetAliasedVar "outer"', + "access to outer bindings is optimized even through nested strict evals"); + assertBytecode(bytecode, 'GetAliasedVar "a"', + "access to outer bindings is optimized even through nested strict evals"); + assertBytecode(bytecode, 'SetAliasedVar "outer"', + "assignment to outer bindings is optimized even through nested strict evals"); +} + +// Assignment to an outer const is handled correctly. +{ + const doNotSetMe = "i already have a value, thx"; + let f = eval(`() => { doNotSetMe = 34; }`); + assertBytecode(disassemble(f), 'ThrowSetConst "doNotSetMe"', + "assignment to outer const in strict eval code emits ThrowSetConst"); +} + +// OK, there are other scopes but let's just do one more: the +// computed-property-name scope. +{ + let stashed; + (class C { + [( + eval(` + var secret = () => C; + stashed = () => secret; + `), + "method" + )]() { + return "ok"; + } + }); + + bytecode = disassemble(stashed()); + assertBytecode(bytecode, 'GetAliasedVar "C"', + "access to class name uses aliased ops"); + let C = stashed()(); + assertEq(new C().method(), "ok"); +} + diff --git a/js/src/jit-test/tests/errors/bug1745907.js b/js/src/jit-test/tests/errors/bug1745907.js new file mode 100644 index 0000000000..8e5ed634bf --- /dev/null +++ b/js/src/jit-test/tests/errors/bug1745907.js @@ -0,0 +1,12 @@ +var global; + +function foo() { + var x = BigInt(-1.7e+308); + try { + global = BigInt.asUintN(100000000, x); + } catch {} +} +for (var i = 0; i < 100; i++) { + foo() +} +assertEq(global, undefined) diff --git a/js/src/jit-test/tests/errors/bug1802100.js b/js/src/jit-test/tests/errors/bug1802100.js new file mode 100644 index 0000000000..2b0a1bd1f8 --- /dev/null +++ b/js/src/jit-test/tests/errors/bug1802100.js @@ -0,0 +1,17 @@ +// |jit-test| exitstatus: 3 + +// Throw an object as an exception from the interrupt handler. +setInterruptCallback(function() { + throw {}; +}); + +// Cause a second exception while trying to report the first exception. +Object.prototype[Symbol.toPrimitive] = function () { return {} } + +// Trigger an interrupt in the prologue of a baseline function. +function b() { + var c; + interruptIf(true); + b(); +} +b(); diff --git a/js/src/jit-test/tests/errors/bug1810711.js b/js/src/jit-test/tests/errors/bug1810711.js new file mode 100644 index 0000000000..ef04251a05 --- /dev/null +++ b/js/src/jit-test/tests/errors/bug1810711.js @@ -0,0 +1,11 @@ +var g = newGlobal({newCompartment: true}); + +try { + undef() +} catch (err) { + const handler = { "getPrototypeOf": (x) => () => x }; + const proxy = new g.Proxy(err, handler); + try { + proxy.stack + } catch {} +} diff --git a/js/src/jit-test/tests/errors/bug1837366.js b/js/src/jit-test/tests/errors/bug1837366.js new file mode 100644 index 0000000000..0d021a0efb --- /dev/null +++ b/js/src/jit-test/tests/errors/bug1837366.js @@ -0,0 +1,8 @@ +function foo() { + try { + foo(); + /a/.exec(); + } catch (e) { + } +} +foo(); diff --git a/js/src/jit-test/tests/errors/error-report.js b/js/src/jit-test/tests/errors/error-report.js new file mode 100644 index 0000000000..978c25f9b8 --- /dev/null +++ b/js/src/jit-test/tests/errors/error-report.js @@ -0,0 +1,51 @@ +{ + // Plain-old Error object + let error = new Error("foobar"); + + let report = createErrorReport(error); + assertEq(report.toStringResult, "Error: foobar"); + assertEq(report.name, "Error"); + assertEq(report.message, "foobar"); +} + +{ + // Error object with overwritten properties + let error = new Error("foobar"); + error.name = "MyError"; + error.message = "here"; + + let report = createErrorReport(error); + assertEq(report.toStringResult, "MyError: here"); + assertEq(report.name, "Error"); + assertEq(report.message, "here"); +} + +{ + // Plain object, which doesn't quack (enough) like an Error + let obj = {name: "foo", message: "bar"}; + + let report = createErrorReport(obj); + assertEq(report.toStringResult, "uncaught exception: [object Object]"); + assertEq(report.name, ""); + assertEq(report.message, "uncaught exception: [object Object]"); +} + +{ + // Duck-typed error object + let obj = {name: "foo", message: "bar", fileName: "test", lineNumber: 0}; + + let report = createErrorReport(obj); + assertEq(report.toStringResult, "foo: bar"); + assertEq(report.name, ""); + assertEq(report.message, "foo: bar"); +} + +{ + // toString failure + let obj = {toString() { throw "haha"; }}; + + let report = createErrorReport(obj); + assertEq(report.toStringResult, "uncaught exception: unknown (can't convert to string)"); + assertEq(report.name, ""); + assertEq(report.message, "uncaught exception: unknown (can't convert to string)"); +} diff --git a/js/src/jit-test/tests/errors/error-sourceURL-disable.js b/js/src/jit-test/tests/errors/error-sourceURL-disable.js new file mode 100644 index 0000000000..d9c17876fa --- /dev/null +++ b/js/src/jit-test/tests/errors/error-sourceURL-disable.js @@ -0,0 +1,8 @@ +// |jit-test| --no-source-pragmas + +const stack = evaluate(` + new Error('test').stack; + //# sourceURL=file.js +`, { fileName: "test.js"}); + +assertEq(stack.split("\n")[0], "@test.js:2:3"); diff --git a/js/src/jit-test/tests/errors/overrecursed-double-fault-1.js b/js/src/jit-test/tests/errors/overrecursed-double-fault-1.js new file mode 100644 index 0000000000..98cd8bbeca --- /dev/null +++ b/js/src/jit-test/tests/errors/overrecursed-double-fault-1.js @@ -0,0 +1,8 @@ +// |jit-test| slow; allow-overrecursed; allow-unhandlable-oom; skip-if: getBuildConfiguration("android") +// Disabled on Android due to harness problems (Bug 1532654) + +enableShellAllocationMetadataBuilder(); +function a() { + a(); +} +new a; diff --git a/js/src/jit-test/tests/fields/access.js b/js/src/jit-test/tests/fields/access.js new file mode 100644 index 0000000000..e24ddefaef --- /dev/null +++ b/js/src/jit-test/tests/fields/access.js @@ -0,0 +1,9 @@ +class C { + x = 5; +} + +c = new C(); +assertEq(5, c.x); + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/basic.js b/js/src/jit-test/tests/fields/basic.js new file mode 100644 index 0000000000..af8d0f860c --- /dev/null +++ b/js/src/jit-test/tests/fields/basic.js @@ -0,0 +1,7 @@ +class C { + x; + y = 2; +} + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/bug1540787.js b/js/src/jit-test/tests/fields/bug1540787.js new file mode 100644 index 0000000000..2b57e31373 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1540787.js @@ -0,0 +1,4 @@ +class C { + x = 1; + constructor() {}; +} diff --git a/js/src/jit-test/tests/fields/bug1540789.js b/js/src/jit-test/tests/fields/bug1540789.js new file mode 100644 index 0000000000..67beb177ac --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1540789.js @@ -0,0 +1,3 @@ +class C { + y = () => this.x; +} diff --git a/js/src/jit-test/tests/fields/bug1540798.js b/js/src/jit-test/tests/fields/bug1540798.js new file mode 100644 index 0000000000..9c6b61205c --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1540798.js @@ -0,0 +1,14 @@ +try { evaluate(` +class constructor { get; } // Long line is long +// Long line XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +test(); +function test() { + try { + x; + } catch (v) { + gc(); + } +} +test(); +`); } catch(exc) {} +constructor.toString(); diff --git a/js/src/jit-test/tests/fields/bug1547129.js b/js/src/jit-test/tests/fields/bug1547129.js new file mode 100644 index 0000000000..a543d58846 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1547129.js @@ -0,0 +1,19 @@ +load(libdir + "asserts.js"); + +new class foo extends Array { + e = function() {} +} + +source = `new class bar extends Promise { e = function() {} }`; +// Calling the Promise constructor with empty args fails with TypeError. +assertThrowsInstanceOf(() => eval(source), TypeError); + +class Base { + constructor() { + return new Proxy({}, {}); + } +} + +new class prox extends Base { + e = function () {} +} diff --git a/js/src/jit-test/tests/fields/bug1547130.js b/js/src/jit-test/tests/fields/bug1547130.js new file mode 100644 index 0000000000..a87d545e62 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1547130.js @@ -0,0 +1 @@ +[ class { i32a = [ i32a ] = c27 } ] && class { c27 = [ c27 ] = c27 } diff --git a/js/src/jit-test/tests/fields/bug1547133.js b/js/src/jit-test/tests/fields/bug1547133.js new file mode 100644 index 0000000000..31e9aa48f2 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1547133.js @@ -0,0 +1,3 @@ +class C47 { + static method(s = class { [y75] = 42; }) {} +} diff --git a/js/src/jit-test/tests/fields/bug1547136.js b/js/src/jit-test/tests/fields/bug1547136.js new file mode 100644 index 0000000000..979ec0885d --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1547136.js @@ -0,0 +1 @@ +try {} catch ([ c = class { ["s"] }]) {} diff --git a/js/src/jit-test/tests/fields/bug1547467.js b/js/src/jit-test/tests/fields/bug1547467.js new file mode 100644 index 0000000000..b3578bb0fd --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1547467.js @@ -0,0 +1,17 @@ +load(libdir + "asserts.js"); + +assertThrowsInstanceOf(() => { + class foo extends null { + constructor(a = class bar extends bar {}) {} + } + new foo(); + }, + ReferenceError +) + +class B { } +class C extends B { + constructor(a = class D { [super()] = 5; }) { + } +} +new C() diff --git a/js/src/jit-test/tests/fields/bug1547915.js b/js/src/jit-test/tests/fields/bug1547915.js new file mode 100644 index 0000000000..e589ebd260 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1547915.js @@ -0,0 +1,4 @@ +load(libdir + "asserts.js"); + +source = `#_\\u200C`; +assertThrowsInstanceOf(() => eval(source), SyntaxError); diff --git a/js/src/jit-test/tests/fields/bug1551454.js b/js/src/jit-test/tests/fields/bug1551454.js new file mode 100644 index 0000000000..5bb77af46d --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1551454.js @@ -0,0 +1,12 @@ +class C { + 1 = eval(); +} +new C(); + +class D { + 1.5 = eval(); +} +new D(); + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/bug1551454_2.js b/js/src/jit-test/tests/fields/bug1551454_2.js new file mode 100644 index 0000000000..ad92b36d50 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1551454_2.js @@ -0,0 +1,6 @@ +let f = 1; +class X { f=f; } +assertEq(new X().f, 1); + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/bug1552022.js b/js/src/jit-test/tests/fields/bug1552022.js new file mode 100644 index 0000000000..86a0f75cf5 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1552022.js @@ -0,0 +1,22 @@ +load(libdir + "eqArrayHelper.js"); + +let expected = []; +class B { + constructor(...args) { + assertEqArray(expected, args); + } +} + +class C extends B { + asdf = 2; +} + +expected = []; +new C(); +expected = [1]; +new C(1); +expected = [1, 2]; +new C(1, 2); + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/bug1552229.js b/js/src/jit-test/tests/fields/bug1552229.js new file mode 100644 index 0000000000..e9374ff057 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1552229.js @@ -0,0 +1,15 @@ +let i = 0; +function f(x) { + assertEq(++i, x); + return x; +} +class C{ + [f(1)](){} + [f(2)] = "hi"; + [f(3)](){} + [f(4)] = "hi"; +} +new C(); + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/bug1552875.js b/js/src/jit-test/tests/fields/bug1552875.js new file mode 100644 index 0000000000..4e44e83945 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1552875.js @@ -0,0 +1,13 @@ +class C { + x = function(){}; + 0 = function(){}; + ["y" + 0] = function(){}; +} + +let c = new C(); +assertEq(c["x"].name, "x"); +assertEq(c[0].name, "0"); +assertEq(c["y0"].name, "y0"); + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/bug1555979.js b/js/src/jit-test/tests/fields/bug1555979.js new file mode 100644 index 0000000000..1612bf128d --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1555979.js @@ -0,0 +1,8 @@ +(function() { + "use asm"; + function f() { + class X { + constructor() {}; + } + } +})(); diff --git a/js/src/jit-test/tests/fields/bug1562146.js b/js/src/jit-test/tests/fields/bug1562146.js new file mode 100644 index 0000000000..74a62a00e6 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1562146.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('disassemble' in this) +/*********************************************************************** +************************************************************************ +*****************************************************/ +class z { + m +} +gcslice(0); +gc(); +if (typeof disassemble === 'function') +disassemble('-r'); diff --git a/js/src/jit-test/tests/fields/bug1571289.js b/js/src/jit-test/tests/fields/bug1571289.js new file mode 100644 index 0000000000..8ae8c38d36 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1571289.js @@ -0,0 +1,6 @@ +class C66 { + 0 = class { + static set name(x) {} + }; +} +new C66(); diff --git a/js/src/jit-test/tests/fields/bug1664550.js b/js/src/jit-test/tests/fields/bug1664550.js new file mode 100644 index 0000000000..57c0836594 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1664550.js @@ -0,0 +1,13 @@ +class OverrideBase { + constructor(o30) { + return o30; + } +}; + +class A3 extends OverrideBase { + get #m() {} +} + +var obj = {}; +Object.seal(obj); +new A3(obj); diff --git a/js/src/jit-test/tests/fields/bug1683784.js b/js/src/jit-test/tests/fields/bug1683784.js new file mode 100644 index 0000000000..c496bd0e5b --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1683784.js @@ -0,0 +1,10 @@ +class C { + #x() { } + constructor() { this.#x = 1; } +} + +try { + new C +} catch (e) { + assertEq(e.message, "cannot assign to private method"); +} diff --git a/js/src/jit-test/tests/fields/bug1702420.js b/js/src/jit-test/tests/fields/bug1702420.js new file mode 100644 index 0000000000..9212911448 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1702420.js @@ -0,0 +1,11 @@ +// |jit-test| --more-compartments + +a = newGlobal() +b = a.Debugger(this) +function c() { + b.getNewestFrame().eval("") +} +c() +d = class { + #e +} \ No newline at end of file diff --git a/js/src/jit-test/tests/fields/bug1702423.js b/js/src/jit-test/tests/fields/bug1702423.js new file mode 100644 index 0000000000..fe9ab49910 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1702423.js @@ -0,0 +1,6 @@ +// Bug 1702423 + +for (let a of []); +b = class { + static [1] // Computed field name 1, no initializer. +} diff --git a/js/src/jit-test/tests/fields/bug1702424.js b/js/src/jit-test/tests/fields/bug1702424.js new file mode 100644 index 0000000000..34136cad94 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1702424.js @@ -0,0 +1,249 @@ +load(libdir + "asserts.js"); + +// Ensure BytecodeGeneration respects stack depth assertions: Private Methods +class a { + b + // original test case below. + #c() { + d.#c ^= 'x' + } + + // Operator list: + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators + // + // Compound Assignments + t() { + d.#c = 'x'; + d.#c += 'x'; + d.#c -= 'x'; + d.#c *= 'x'; + d.#c /= 'x'; + d.#c %= 'x'; + d.#c **= 'x'; + d.#c <<= 'x'; + d.#c >>= 'x'; + d.#c >>>= 'x'; + + d.#c &= 'x'; + d.#c ^= 'x'; + d.#c |= 'x'; + + } + + // Compound Logical Assignments + e() { + d.#c &&= 'x'; + d.#c ??= 'x'; + d.#c ||= 'x'; + } + + // Destructruring assignment. + ds() { + [d.#c, b] = [1, 2]; + } + + // Increment/Decrement + incDec() { + d.#c++; + d.#c--; + ++d.#c; + --d.#c; + } +} + +class b { + b + // original test case below. + #c = 10; + + // Operator list: + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators + // + // Compound Assignments + t() { + d.#c = 'x'; + d.#c += 'x'; + d.#c -= 'x'; + d.#c *= 'x'; + d.#c /= 'x'; + d.#c %= 'x'; + d.#c **= 'x'; + d.#c <<= 'x'; + d.#c >>= 'x'; + d.#c >>>= 'x'; + + d.#c &= 'x'; + d.#c ^= 'x'; + d.#c |= 'x'; + + } + + // Compound Logical Assignments + e() { + d.#c &&= 'x'; + d.#c ??= 'x'; + d.#c ||= 'x'; + } + + // Destructruring assignment. + ds() { + [d.#c, b] = [1, 2]; + } + + + // Increment/Decrement + incDec() { + d.#c++; + d.#c--; + ++d.#c; + --d.#c; + } +} + +// Ensure we correctly throw for all compound private method assignments +class LiveTest { + #c() { } + + test(lambdas) { + for (let func of lambdas) { + assertThrowsInstanceOf(() => func(this), Error); + } + } + + // Operator list: + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators + // + // Compound Assignments + compound() { + let tests = [ + (d) => d.#c = 'x', + (d) => d.#c += 'x', + (d) => d.#c -= 'x', + (d) => d.#c *= 'x', + (d) => d.#c /= 'x', + (d) => d.#c %= 'x', + (d) => d.#c **= 'x', + (d) => d.#c <<= 'x', + (d) => d.#c >>= 'x', + (d) => d.#c >>>= 'x', + (d) => d.#c &= 'x', + (d) => d.#c ^= 'x', + (d) => d.#c |= 'x', + ]; + + this.test(tests); + } + + // Compound Logical Assignments + compoundLogical() { + let tests = [ + (d) => d.#c &&= 'x', + ] + this.test(tests); + // These don't throw because they don't + // process the assignment. + this.#c ??= 'x'; + this.#c ||= 'x'; + } + + // Destructruring assignment. + destructuring() { + let tests = [ + (d) => [d.#c, b] = [1, 2], + ] + this.test(tests); + } + + + // Increment/Decrement + incDec() { + let tests = [ + (d) => d.#c++, + (d) => d.#c--, + (d) => ++d.#c, + (d) => --d.#c, + ]; + this.test(tests); + } +} + +var l = new LiveTest; +l.compound(); +l.compoundLogical(); +l.destructuring(); +l.incDec(); + +// Ensure we correctly throw for all compound private method assignments +class LiveTestField { + #c = 0; + + // Operator list: + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators + // + // Compound Assignments + compound() { + assertEq(this.#c = 1, 1); + assertEq(this.#c += 1, 2); + assertEq(this.#c -= 1, 1); + assertEq(this.#c *= 2, 2); + assertEq(this.#c /= 2, 1); + assertEq(this.#c %= 1, 0); + this.#c = 1; + assertEq(this.#c **= 1, 1); + assertEq(this.#c <<= 1, 2); + assertEq(this.#c >>= 1, 1); + assertEq(this.#c >>>= 1, 0); + assertEq(this.#c &= 2, 0); + assertEq(this.#c ^= 2, 2); + assertEq(this.#c |= 1, 3); + } + + // Compound Logical Assignments + compoundLogical() { + this.#c = undefined; + this.#c ||= 10; + assertEq(this.#c, 10); + this.#c ||= 15; + assertEq(this.#c, 10); + + this.#c = false; + this.#c &&= 10; + assertEq(this.#c, false); + this.#c = 10; + this.#c &&= 15; + assertEq(this.#c, 15); + + this.#c = null; + this.#c ??= 10; + assertEq(this.#c, 10); + + this.#c ??= 15 + assertEq(this.#c, 10); + } + + // Destructruring assignment. + destructuring() { + [this.#c, b] = [1, 2]; + + assertEq(this.#c, 1); + } + + + // Increment/Decrement + incDec() { + this.#c = 0; + assertEq(++this.#c, 1); + assertEq(--this.#c, 0); + this.#c++; + assertEq(this.#c, 1); + this.#c--; + assertEq(this.#c, 0); + + } +} + +var k = new LiveTestField; +k.compound(); +k.compoundLogical() +k.destructuring() +k.incDec(); \ No newline at end of file diff --git a/js/src/jit-test/tests/fields/bug1703782.js b/js/src/jit-test/tests/fields/bug1703782.js new file mode 100644 index 0000000000..20ef1a3586 --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1703782.js @@ -0,0 +1,11 @@ +// Bug 1703782 - Assertion failure: this->is(), at vm/JSObject.h:467 +var g7 = newGlobal({ newCompartment: true }); +g7.parent = this; +g7.eval(` + Debugger(parent).onEnterFrame = function(frame) { + let v = frame.environment.getVariable('var0'); + }; +`); +class C144252 { + static #x; +} diff --git a/js/src/jit-test/tests/fields/bug1706923.js b/js/src/jit-test/tests/fields/bug1706923.js new file mode 100644 index 0000000000..0d0c855efe --- /dev/null +++ b/js/src/jit-test/tests/fields/bug1706923.js @@ -0,0 +1,28 @@ +var error = undefined; +try { + eval(`class a { + static #x() { } + [b.#x] + }`); +} catch (e) { + error = e; +} + +assertEq(error instanceof ReferenceError, true); + +var error = undefined; +try { + eval(`class Base {}; + + class B extends Base { + static #x() { } + [Base.#x] = 1; + constructor() { + super(); + } + }`); +} catch (e) { + error = e; +} + +assertEq(error instanceof TypeError, true); diff --git a/js/src/jit-test/tests/fields/ergonomic-1.js b/js/src/jit-test/tests/fields/ergonomic-1.js new file mode 100644 index 0000000000..7aa75ab30b --- /dev/null +++ b/js/src/jit-test/tests/fields/ergonomic-1.js @@ -0,0 +1,69 @@ +class Base { + constructor(o) { + return o; + } +} + +class A extends Base { + #x = 12; + #y = 13; + static has(o) { + return A.evalStr(o, '#x in o'); + } + + static evalStr(o, str) { + return eval(str); + } +} + +var obj = {}; +assertEq(A.has(obj), false); +new A(obj); +assertEq(A.has(obj), true); + +A.evalStr(obj, `#x in o in o`) // 'false' in o + +function assertSyntaxError(functionText) { + let threw = false; + let exception = undefined; + try { + A.evalStr({}, functionText) + } catch (e) { + exception = e; + threw = true; + } + assertEq(threw, true); + assertEq(exception instanceof SyntaxError, true); +} + +assertSyntaxError(`#x`); +assertSyntaxError(`#x == undefined`); +assertSyntaxError(`1 + #x in o`) +assertSyntaxError(`#z in o`); + +assertSyntaxError(`for (#x in o) { return 1;}`) +assertSyntaxError(`!#x in o`) +assertSyntaxError(`+#x in o`) +assertSyntaxError(`-#x in o`) +assertSyntaxError(`~#x in o`) +assertSyntaxError(`void #x in o`) +assertSyntaxError(`typeof #x in o`) +assertSyntaxError(`++#x in o`) +assertSyntaxError(`--#x in o`) + +assertSyntaxError(`#x in #y in o`) +assertSyntaxError(`{} instanceof #x in o`) +assertSyntaxError(`10 > #x in o`) +var threw = true +try { + eval(`class Async { + #x; + async func(o) { + await #x in o; + } + }`); + threw = false; +} catch (e) { + assertEq(e instanceof SyntaxError, true); +} +assertEq(threw, true); diff --git a/js/src/jit-test/tests/fields/error.js b/js/src/jit-test/tests/fields/error.js new file mode 100644 index 0000000000..4c164b2bbc --- /dev/null +++ b/js/src/jit-test/tests/fields/error.js @@ -0,0 +1,116 @@ +load(libdir + 'asserts.js'); + +let source = `class C { + x = +}`; +assertErrorMessage(() => Function(source), SyntaxError, /./); + +source = `class C { + -2; + -2 = 2; +}`; +assertErrorMessage(() => Function(source), SyntaxError, /./); + +source = `class C { + x += 2; +}`; +assertErrorMessage(() => Function(source), SyntaxError, /./); + +source = `class C { + #2; +}`; +assertErrorMessage(() => Function(source), SyntaxError, /./); + +source = `class C { + #["h" + "i"]; +}`; +assertErrorMessage(() => Function(source), SyntaxError, /./); + +source = `class C { + #"hi"; +}`; +assertErrorMessage(() => Function(source), SyntaxError, /./); + +source = `class C { + constructor; +}`; +assertErrorMessage(() => Function(source), SyntaxError, /./); + +source = `class C { + "constructor"; +}`; +assertErrorMessage(() => Function(source), SyntaxError, /./); + +source = `class C { + x = arguments; +}`; +assertErrorMessage(() => Function(source), SyntaxError, /./); + +source = `class C { + x = super(); +}`; +assertErrorMessage(() => Function(source), SyntaxError, /./); + +source = `function f() { +class C { + #"should still throw error during lazy parse"; +} +}`; +assertErrorMessage(() => Function(source), SyntaxError, /./); + +source = `#outside;`; +assertErrorMessage(() => eval(source), SyntaxError, /./); + +source = `class C { + x = super(); +}`; +assertErrorMessage(() => Function(source), SyntaxError, /./); + +source = `class C { + x = sper(); +}`; +eval(source); + + +// The following test cases fail to parse because ASI does not happen if the +// next token might be valid, even if it leads to a SyntaxError further down +// the road. + +source = `class C { + x = 0 + ["computedMethodName"](){} +}`; +assertThrowsInstanceOf(() => Function(source), SyntaxError); + +source = `class C { + x = 0 + *f(){} +}`; +assertThrowsInstanceOf(() => Function(source), SyntaxError); + + +// The following test cases fail to parse because ASI doesn't happen without a +// newline. + +source = `class C { x y }`; +assertThrowsInstanceOf(() => Function(source), SyntaxError); + +source = `class C { if var } // identifiers that look like keywords`; +assertThrowsInstanceOf(() => Function(source), SyntaxError); + +source = `class C { x = 1 y }`; +assertThrowsInstanceOf(() => Function(source), SyntaxError); + +source = `class C { x async f() {} }`; +assertThrowsInstanceOf(() => Function(source), SyntaxError); + +source = `class C { x static f() {} }`; +assertThrowsInstanceOf(() => Function(source), SyntaxError); + +source = `class C { field1 static field2 }`; +assertThrowsInstanceOf(() => Function(source), SyntaxError); + +source = `class C { x get f() {} }`; +assertThrowsInstanceOf(() => Function(source), SyntaxError); + +if (typeof reportCompare === 'function') reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/field-initializer-position.js b/js/src/jit-test/tests/fields/field-initializer-position.js new file mode 100644 index 0000000000..7944642f28 --- /dev/null +++ b/js/src/jit-test/tests/fields/field-initializer-position.js @@ -0,0 +1,52 @@ +// Test class field initializers have reasonable lineno/column values + +gczeal(0); + +// Use the Debugger API to introspect the line / column. +let d = new Debugger(); +let g = newGlobal({newCompartment: true}) +let gw = d.addDebuggee(g); + +let source = ` + let A = "A"; + let B = "B"; + + class C { + // START----v + 'field_str'; + 'field_str_with_init' = 1; + [A]; + [B] = 2; + static x; + static y = 3; + static [A + "static"]; + static [B + "static"] = 4; + // END + } +`; + +let NumInitializers = 8; + +// Compute (1-based) line number of 'START' and 'END' markers. +let START = source.split('\n').findIndex(x => x.includes("START")) + 1; +let END = source.split('\n').findIndex(x => x.includes("END")) + 1; +assertEq(END - START - 1, NumInitializers); + +// Use debugger to locate internal field-initializer scripts. +g.evaluate(source); +let scripts = d.findScripts() + .filter(script => (script.startLine >= START && + script.startLine <= END)); +scripts.sort((x, y) => (x.sourceStart - y.sourceStart)) + +for (var i = 0; i < NumInitializers; ++i) { + let script = scripts[i]; + let lineText = source.split('\n')[START + i]; + + // Check the initializer lambda has expected line/column + assertEq(script.startLine, START + 1 + i); + assertEq(script.startColumn, 21); + + // Check that source length matches expectations. + assertEq(script.startColumn + script.sourceLength + ';'.length, lineText.length + 1); +} diff --git a/js/src/jit-test/tests/fields/field_types.js b/js/src/jit-test/tests/fields/field_types.js new file mode 100644 index 0000000000..f93991c321 --- /dev/null +++ b/js/src/jit-test/tests/fields/field_types.js @@ -0,0 +1,43 @@ +class C { + [Math.sqrt(16)]; + [Math.sqrt(8)] = 5 + 2; + "hi"; + "bye" = {}; + 2 = 2; + 0x101 = 2; + 0o101 = 2; + 0b101 = 2; + NaN = 0; // actually the field called "NaN", not the number + Infinity = 50; // actually the field called "Infinity", not the number + // all the keywords below are proper fields (?!?) + with = 0; + //static = 0; // doesn't work yet + async = 0; + get = 0; + set = 0; + export = 0; + function = 0; +} + +let obj = new C(); +assertEq(Math.sqrt(16) in obj, true); +assertEq(obj[Math.sqrt(16)], undefined); +assertEq(obj[Math.sqrt(8)], 7); +assertEq("hi" in obj, true); +assertEq(obj["hi"], undefined); +assertEq(typeof obj["bye"], "object"); +assertEq(obj[2], 2); +assertEq(obj[0x101], 2); +assertEq(obj[0o101], 2); +assertEq(obj[0b101], 2); +assertEq(obj.NaN, 0); +assertEq(obj.Infinity, 50); +assertEq(obj.with, 0); +assertEq(obj.async, 0); +assertEq(obj.get, 0); +assertEq(obj.set, 0); +assertEq(obj.export, 0); +assertEq(obj.function, 0); + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/initprop.js b/js/src/jit-test/tests/fields/initprop.js new file mode 100644 index 0000000000..fd18d5a48d --- /dev/null +++ b/js/src/jit-test/tests/fields/initprop.js @@ -0,0 +1,25 @@ +let called = false +class base { + set x(arg) { + called = true; + } + get x() { + called = true; + return 0; + } +} + +class c extends base { + x = 2; +} +assertEq(new c().x, 2); + +class d extends base { + ["x"] = 2; +} +assertEq(new d().x, 2); + +assertEq(called, false); + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/ion-private-idempotent.js b/js/src/jit-test/tests/fields/ion-private-idempotent.js new file mode 100644 index 0000000000..139735d62d --- /dev/null +++ b/js/src/jit-test/tests/fields/ion-private-idempotent.js @@ -0,0 +1,31 @@ +var acc = 0; +const loopCount = 100; + +class A { + #x = 1; + static loopRead(o) { + for (var i = 0; i < loopCount; i++) { + // If this getelem were hoisted out of the loop, + // we need the IC that is attached to that to + // correctly throw if .#x is not in o. + var b = o.#x; + acc += 1; + } + } +}; + +// Two non-A objects, because we're concerned not about the first +// attempt to read .#x from a non A, but the second, because if +// we attach the wrong IC, we'll attach an IC that provides +// regular object semantics, which would be to return undefined. +var array = [new A, new A, new A, {}, {}]; +for (var e of array) { + acc = 0; + try { + A.loopRead(e); + assertEq(acc, loopCount); + } catch (e) { + assertEq(e instanceof TypeError, true); + assertEq(acc, 0); + } +} diff --git a/js/src/jit-test/tests/fields/literal.js b/js/src/jit-test/tests/fields/literal.js new file mode 100644 index 0000000000..d8b46bd0a9 --- /dev/null +++ b/js/src/jit-test/tests/fields/literal.js @@ -0,0 +1,45 @@ +load(libdir + "asserts.js"); + +source = `var y = { + x; +}`; +assertErrorMessage(() => eval(source), SyntaxError, /./); + +// This is legal, and is equivalent to `var y = { x: x };` +// source = `var y = { +// x +// }`; +// assertThrowsInstanceOf(() => eval(source), SyntaxError); + +source = `var y = { + #x; +}`; +assertErrorMessage(() => eval(source), SyntaxError, /./); + +source = `var y = { + #x +}`; +assertThrowsInstanceOf(() => eval(source), SyntaxError); + +source = `var y = { + x = 2; +}`; +assertErrorMessage(() => eval(source), SyntaxError, /./); + +source = `var y = { + x = 2 +}`; +assertErrorMessage(() => eval(source), SyntaxError, /./); + +source = `var y = { + #x = 2; +}`; +assertErrorMessage(() => eval(source), SyntaxError, /./); + +source = `var y = { + #x = 2 +}`; +assertErrorMessage(() => eval(source), SyntaxError, /./); + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/mixed_methods.js b/js/src/jit-test/tests/fields/mixed_methods.js new file mode 100644 index 0000000000..ae66cd9129 --- /dev/null +++ b/js/src/jit-test/tests/fields/mixed_methods.js @@ -0,0 +1,9 @@ +class C { + x; + y(){} + z = 2; + w(){}; +} + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/multi-line-name.js b/js/src/jit-test/tests/fields/multi-line-name.js new file mode 100644 index 0000000000..4697703a32 --- /dev/null +++ b/js/src/jit-test/tests/fields/multi-line-name.js @@ -0,0 +1,15 @@ +// Test that multi-line property names don't trip up source location asserts. + +class C { + 'line \ + continuation'; + + 'line \ + continuation with init' = 1; + + [1 + + "bar"]; + + [2 + + "baz"] = 2; +} diff --git a/js/src/jit-test/tests/fields/private-error-location.js b/js/src/jit-test/tests/fields/private-error-location.js new file mode 100644 index 0000000000..7c784c6fb9 --- /dev/null +++ b/js/src/jit-test/tests/fields/private-error-location.js @@ -0,0 +1,10 @@ +// Bug 1770609 - Ensure the line number reported is correctly the source of the +// syntax error, not just the first observation of the name. +try { + eval(`class A { #declared; } + m.#declared;`) +} catch (e) { + assertEq(e instanceof SyntaxError, true) + assertEq(e.lineNumber, 2); +} + diff --git a/js/src/jit-test/tests/fields/private-eval-in-frame.js b/js/src/jit-test/tests/fields/private-eval-in-frame.js new file mode 100644 index 0000000000..b0f2591e98 --- /dev/null +++ b/js/src/jit-test/tests/fields/private-eval-in-frame.js @@ -0,0 +1,14 @@ +load(libdir + 'asserts.js'); +load(libdir + 'evalInFrame.js'); + +class B { + #x = 12; + x = 'his'; + ef(str) { + return evalInFrame(0, str); + } +} + +var b = new B(); +assertEq(b.ef(`this.x`), 'his'); +assertEq(b.ef(`this.#x`), 12); \ No newline at end of file diff --git a/js/src/jit-test/tests/fields/private-field-basics.js b/js/src/jit-test/tests/fields/private-field-basics.js new file mode 100644 index 0000000000..b138190607 --- /dev/null +++ b/js/src/jit-test/tests/fields/private-field-basics.js @@ -0,0 +1,257 @@ +class A { + #x = 10 + + x() { + return this.#x; + } + ix() { + this.#x++; + } + static readx(o) { + return o.#x; + } + static optionalx(o) { + return o?.#x; + } + + static orEqual(o, v) { + o.#x ||= v; + return o.#x; + } + + setX(v) { + this.#x = v; + } + + compoundInc() { + this.#x += 1; + return this.#x; + } + + compoundDec() { + this.#x -= 1; + return this.#x; + } + + #y = () => 'hi'; + invoke() { + return this.#y(); + } + + static #z = 'static'; + gz() { + return A.#z; + } + + sz(o) { + A.#z = o; + } + + static sgz() { + return this.#z; + } + + static ssz(o) { + this.#z = o; + } + + static six(o) { + o.#x++; + } + + static dix(o) { + o.#x--; + } +}; + +for (var i = 0; i < 1000; i++) { + var a = new A(); + assertEq(a.x(), 10); + a.ix(); + assertEq(a.x(), 11); + assertEq(A.readx(a), 11); + assertEq(a.compoundInc(), 12); + assertEq(A.orEqual(a, 13), 12); + a.setX(null); + assertEq(A.orEqual(a, 12), 12); + assertEq(a.compoundDec(), 11); + assertEq(a.invoke(), 'hi'); + assertEq(a.gz(), 'static'); + assertEq(A.sgz(), 'static'); + A.ssz(i); + assertEq(A.sgz(), i); + a.sz(i + 1); + assertEq(A.sgz(), i + 1); + A.ssz('static'); // reset for next iteration! + + assertEq(A.optionalx(a), 11); + assertEq(A.optionalx(null), undefined); + try { + A.optionalx({}); // Should throw type error + assertEq(0, 1); + } catch (TypeError) { + } +} + +function assertThrows(fun, errorType) { + try { + fun(); + throw 'Expected error, but none was thrown'; + } catch (e) { + if (!(e instanceof errorType)) { + throw 'Wrong error type thrown'; + } + } +} + +function testTypeErrors(v) { + assertThrows(() => A.readx(v), TypeError); // Read value + assertThrows(() => A.six(v), TypeError); // increment + assertThrows(() => A.dix(v), TypeError); // decrement +} + +testTypeErrors(undefined); // Undefined +testTypeErrors({}); // Random object +testTypeErrors(1); // Random primitive + +assertThrows( + () => eval('class B extends class { #x; } { g() { return super.#x; } }'), + SyntaxError); // Access super.#private +assertThrows( + () => eval('class C { #x = 10; static #x = 14; }'), + SyntaxError); // Duplicate name declaration. +assertThrows( + () => eval('delete this.#x'), + SyntaxError); // deleting a private field in non-strict mode. + +class B extends class { + constructor(o) { + return o; + } +} +{ + #x = 12; + static gx(o) { + return o.#x; + } + static sx(o) { + o.#x++; + } +} + +var bn = new B(1); +var bu = new B(undefined); + +// Test we can read an outer classes private fields. +class Outer { + #outer = 3; + test() { + let outerThis = this; + class Inner { + #inner = 2; + test() { + return outerThis.#outer; + } + } + return new Inner().test(); + } +} + +var o = new Outer; +assertEq(o.test(), 3); + +// IC tests: + +var alreadyConstructedB = new B(); +assertEq(B.gx(alreadyConstructedB), 12); + +function initIC(o) { + new B(o); +} +var array = []; +// warm up init IC +for (var i = 1; i < 1000; i++) { + var newB = {}; + initIC(newB); +} + +// Successfully catch double initialization type error. +assertThrows(() => initIC(alreadyConstructedB), TypeError); +// Do it again, to make sure we didn't attach a stub that is invalid. +assertThrows(() => initIC(alreadyConstructedB), TypeError); + +// Test getters work, and ICs can't be tricked. Setup an array of +// +// [B, B, B, B, ..., {}, {}] +// +// Then test that as we execute the sudden appearance of {} doesn't +// trick our ICs into setting or getting anything -- do it twice +// to make sure that we didn't get a stub that is invalid. +var elements = []; +for (var i = 0; i < 99; i++) { + elements.push(new B); +} +elements.push({}); +elements.push({}); + +function getterCheck(e) { + assertEq(B.gx(e), 12); +} + +function setterCheck(e) { + B.sx(e); +} + +var checksPassed = 0; +try { + for (var e of elements) { + getterCheck(e); + checksPassed++; + } + throw `Shouldn't arrive here`; +} catch (e) { + if (!(e instanceof TypeError)) { + throw e; + } + // All but last element should have done the right thing. + assertEq(checksPassed, elements.length - 2); +} + +checksPassed = 0; +try { + for (var e of elements) { + setterCheck(e); + checksPassed++; + } + throw `Shouldn't arrive here`; +} catch (e) { + if (!(e instanceof TypeError)) { + throw e; + } + // All but last element should have done the right thing. + assertEq(checksPassed, elements.length - 2); +} + +// Verify setter did the thing, but throws in the correct places +for (var index in elements) { + if (index < elements.length - 2) { + assertEq(B.gx(elements[index]), 13); + } else { + assertThrows(() => { + B.gx(elements[index]); + }, TypeError); + } +} + +// Megamorphic Cache Testing: +for (var i = 0; i < 100; i++) { + var inputs = [{ a: 1 }, { b: 2 }, { c: 3 }, { d: 4 }, { e: 5 }, new Proxy({}, {})]; + for (var o of inputs) { + assertThrows(() => B.gx(o), TypeError); + assertThrows(() => B.sx(o), TypeError); + new B(o); + assertEq(B.gx(o), 12); + B.sx(o); + assertEq(B.gx(o), 13); + } +} diff --git a/js/src/jit-test/tests/fields/private-field-destructuring.js b/js/src/jit-test/tests/fields/private-field-destructuring.js new file mode 100644 index 0000000000..82aa032a8c --- /dev/null +++ b/js/src/jit-test/tests/fields/private-field-destructuring.js @@ -0,0 +1,41 @@ +function assertThrows(fun, errorType) { + try { + fun(); + throw 'Expected error, but none was thrown'; + } catch (e) { + if (!(e instanceof errorType)) { + throw 'Wrong error type thrown'; + } + } +} + +class A { + #a; + #b; + #c; + #d; + #e; + static destructure(o, x) { + [o.#a, o.#b, o.#c, o.#d, ...o.#e] = x; + } + + static get(o) { + return {a: o.#a, b: o.#b, c: o.#c, d: o.#d, e: o.#e}; + } +}; + +for (var i = 0; i < 1000; i++) { + var a = new A(); + A.destructure(a, [1, 2, 3, 4, 5]); + var res = A.get(a); + assertEq(res.a, 1); + assertEq(res.b, 2); + assertEq(res.c, 3); + assertEq(res.d, 4); + assertEq(res.e.length, 1); + assertEq(res.e[0], 5); + + var obj = {}; + assertThrows(() => A.destructure(obj, [1, 2, 3, 4, 5]), TypeError); + assertThrows(() => A.get(obj), TypeError); +} \ No newline at end of file diff --git a/js/src/jit-test/tests/fields/private-field-details.js b/js/src/jit-test/tests/fields/private-field-details.js new file mode 100644 index 0000000000..1d746c33c8 --- /dev/null +++ b/js/src/jit-test/tests/fields/private-field-details.js @@ -0,0 +1,39 @@ +var shouldBeThis; + +class A { + #nullReturn = false; + constructor(nullReturn) { + this.#nullReturn = nullReturn; + } + + #calls = 0; + + #z = + () => { + assertEq(this, shouldBeThis); + this.#calls++; + + // To test the second optional below. + if (this.#nullReturn && this.#calls == 2) { + return null; + } + + return this; + } + + static chainTest(o) { + o?.#z().#z()?.#z(); + } +}; + +for (var i = 0; i < 1000; i++) { + var a = new A(); + shouldBeThis = a; + + A.chainTest(a); + A.chainTest(null); + + var b = new A(true); + shouldBeThis = b; + A.chainTest(b); +} diff --git a/js/src/jit-test/tests/fields/private-field-error-messages.js b/js/src/jit-test/tests/fields/private-field-error-messages.js new file mode 100644 index 0000000000..4f7bfe0ae2 --- /dev/null +++ b/js/src/jit-test/tests/fields/private-field-error-messages.js @@ -0,0 +1,39 @@ +load(libdir + "asserts.js"); + +class C { + #f = 1; + static test() { + assertTypeErrorMessage( + () => [].#f, + "can't access private field or method: object is not the right class" + ); + assertTypeErrorMessage( + () => "ok".#f, + "can't access private field or method: object is not the right class" + ); + assertTypeErrorMessage( + () => { [].#f = 3; }, + "can't set private field: object is not the right class" + ); + assertTypeErrorMessage( + () => { [].#f += 3; }, + "can't set private field: object is not the right class" + ); + assertTypeErrorMessage( + () => { [].#f++; }, + "can't set private field: object is not the right class" + ); + + assertTypeErrorMessage( + () => "".#f, + "can't access private field or method: object is not the right class" + ); + assertTypeErrorMessage( + () => { "".#f = 3; }, + "can't set private field: object is not the right class" + ); + } +} + +C.test(); + diff --git a/js/src/jit-test/tests/fields/private-field-symbol-debugger-access.js b/js/src/jit-test/tests/fields/private-field-symbol-debugger-access.js new file mode 100644 index 0000000000..cd960a3be1 --- /dev/null +++ b/js/src/jit-test/tests/fields/private-field-symbol-debugger-access.js @@ -0,0 +1,37 @@ +// Make a new global to debug +const global = newGlobal({ newCompartment: true }); + +// Create an object in that global with a private field. +global.eval("\nclass MyClass {\n #privateProperty1\n }\nobj = new MyClass();"); + +// Debug said global. +const debug = Debugger(); +const globalDebugObject = debug.addDebuggee(global); + +// Leak the private name symbol backing the private field. +var otherGlobalObj = globalDebugObject.getOwnPropertyDescriptor("obj").value +var privateSymbol = otherGlobalObj.getOwnPrivateProperties()[0] + +// Create a different proxy. +var p = new Proxy({}, {}); + +// Try to look up the leaked private symbol on the new proxy. +// This crashes, as it violates the assumption baked into the proxy code +// that all accesses are scripted, and thus creation and symbol management +// invariants are correctly observed. +fail = false; +try { + p[privateSymbol] = 1; + fail = true; +} catch (e) { + assertEq(e instanceof TypeError, true); +} +assertEq(fail, false); + +try { + p[privateSymbol]; + fail = true; +} catch (e) { + assertEq(e instanceof TypeError, true); +} +assertEq(fail, false); diff --git a/js/src/jit-test/tests/fields/private-method-static.js b/js/src/jit-test/tests/fields/private-method-static.js new file mode 100644 index 0000000000..17b5f1e130 --- /dev/null +++ b/js/src/jit-test/tests/fields/private-method-static.js @@ -0,0 +1,28 @@ + +class B { + static #smethod() { + return 14; + } + + static f() { + return this.#smethod(); + } +} +assertEq(B.f(), 14); + + + +class OuterStatic { + static #outerMethod() { return "ok"; } + + static test() { + class Inner { + #innerMethod() { } + static test(outer) { + return outer.#outerMethod(); + } + } + return Inner.test(this); + } +} +assertEq(OuterStatic.test(), "ok"); \ No newline at end of file diff --git a/js/src/jit-test/tests/fields/private-proxy-oom.js b/js/src/jit-test/tests/fields/private-proxy-oom.js new file mode 100644 index 0000000000..dd5200d9a6 --- /dev/null +++ b/js/src/jit-test/tests/fields/private-proxy-oom.js @@ -0,0 +1,48 @@ +// |jit-test| skip-if: !('oomTest' in this); +// Check for proxy expando OOM issues. + +function assertThrowsTypeError(f) { + assertThrowsInstanceOf(f, TypeError); +} + + +function testing() { + var target = {}; + var p1 = new Proxy(target, {}); + var p2 = new Proxy(target, {}); + + class A extends class { + constructor(o) { + return o; + } + } + { + #field = 10; + static gf(o) { + return o.#field; + } + static sf(o) { + o.#field = 15; + } + } + + // Verify field handling on the proxy we install it on. + new A(p1); + assertEq(A.gf(p1), 10); + A.sf(p1) + assertEq(A.gf(p1), 15); + + // Should't be on the target + assertThrowsTypeError(() => A.gf(target)); + + // Can't set the field, doesn't exist + assertThrowsTypeError(() => A.sf(p2)); + + // Definitely can't get the field, doesn't exist. + assertThrowsTypeError(() => A.gf(p2)); + + // Still should't be on the target. + assertThrowsTypeError(() => A.gf(target)); +} + +oomTest(testing); \ No newline at end of file diff --git a/js/src/jit-test/tests/fields/private-reflect-01.js b/js/src/jit-test/tests/fields/private-reflect-01.js new file mode 100644 index 0000000000..79d5b95b83 --- /dev/null +++ b/js/src/jit-test/tests/fields/private-reflect-01.js @@ -0,0 +1,56 @@ +function rp(x) { + return Reflect.parse(x); +}; + +rp(`( + class { + static #m = 'test262'; + } + )`); + +rp(`( + class { + static #m = 'test262'; + constructor() { + #m in {}; + } + } +)`); + +rp(`( + class { + #m = 'test262'; + } + )`); + +rp(`( + class { + #m = 'test262'; + gm() { + this.#m++; + this.#m--; + this.#m?.x; + o[this.#m]; + return this.#m; + } + sm() { + this.#m = 12; + } + } + )`); + +rp(`( + class { + static #m = 'test262'; + static gm() { + this.#m++; + this.#m--; + this.#m?.x; + o[this.#m]; + return this.#m; + } + static sm() { + this.#m = 12; + } + } + )`); diff --git a/js/src/jit-test/tests/fields/private-right-side-1.js b/js/src/jit-test/tests/fields/private-right-side-1.js new file mode 100644 index 0000000000..5be84db09d --- /dev/null +++ b/js/src/jit-test/tests/fields/private-right-side-1.js @@ -0,0 +1,18 @@ +let hit = false; + +function f() { + hit = true; +} + +class C { + #f = 1; + static m(x) { + x.#f = f(); // f() should be called before the brand check for x.#f + } +} + +try { + C.m({}); // throws a TypeError +} catch { } + +assertEq(hit, true); diff --git a/js/src/jit-test/tests/fields/private-right-side-2.js b/js/src/jit-test/tests/fields/private-right-side-2.js new file mode 100644 index 0000000000..08958ff303 --- /dev/null +++ b/js/src/jit-test/tests/fields/private-right-side-2.js @@ -0,0 +1,13 @@ +class B { + constructor(obj) { return obj; } +} + +class C extends B { + #f = 1; + static m(obj) { + obj.#f = new C(obj); // ok, obj.#f brand check happens after RHS is evaluated + assertEq(obj.#f, obj); + } +} + +C.m({}); diff --git a/js/src/jit-test/tests/fields/private-throwing-initializer.js b/js/src/jit-test/tests/fields/private-throwing-initializer.js new file mode 100644 index 0000000000..b3e67d6cd6 --- /dev/null +++ b/js/src/jit-test/tests/fields/private-throwing-initializer.js @@ -0,0 +1,62 @@ +// Ensure private fields are stamped in order and that +// we can successfully partially initialize objects. + +class Base { + constructor(o) { + return o; + } +} + +let constructorThrow = false; + +function maybeThrow() { + if (constructorThrow) { + throw 'fail' + } + return 'sometimes' +} + +class A extends Base { + constructor(o) { + super(o); + constructorThrow = !constructorThrow; + } + + #x = 'always'; + #y = maybeThrow(); + + static gx(o) { + return o.#x; + } + + static gy(o) { + return o.#y; + } +}; + +var obj1 = {}; +var obj2 = {}; + +new A(obj1); + +var threw = true; +try { + new A(obj2); + threw = false; +} catch (e) { + assertEq(e, 'fail'); +} +assertEq(threw, true); + +A.gx(obj1) +A.gx(obj2); // Both objects get x; +A.gy(obj1); // obj1 gets y + +try { + A.gy(obj2); // shouldn't have x. + threw = false; +} catch (e) { + assertEq(e instanceof TypeError, true); +} + +assertEq(threw, true); diff --git a/js/src/jit-test/tests/fields/quirks.js b/js/src/jit-test/tests/fields/quirks.js new file mode 100644 index 0000000000..4f8dfa9f75 --- /dev/null +++ b/js/src/jit-test/tests/fields/quirks.js @@ -0,0 +1,17 @@ +class C { + x;;;; + y + ; +} + +class D { + x = 5; + y = (this.x += 1) + 2; +} + +let val = new D(); +assertEq(6, val.x); +assertEq(8, val.y); + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/fields/super.js b/js/src/jit-test/tests/fields/super.js new file mode 100644 index 0000000000..5031271ab2 --- /dev/null +++ b/js/src/jit-test/tests/fields/super.js @@ -0,0 +1,76 @@ +class Base { +} + +class C extends Base { + field; +} +let c = new C(); +assertEq(true, "field" in c); + +var D = class extends Base { + field; +}; +let d = new D(); +assertEq(true, "field" in d); + +class E extends Base { + field; + constructor() { + super(); + } +}; +let e = new E(); +assertEq(true, "field" in e); + +class F extends Base { + constructor() { + super(); + } + field; +}; +let f = new F(); +assertEq(true, "field" in f); + +class G extends Base { + field2 = 2; + constructor() { + super(); + } + field3 = 3; +}; +let g = new G(); +assertEq(2, g.field2); +assertEq(3, g.field3); + +class H extends Base { + field = 2; + constructor() { + eval("super()"); + } +}; +let h = new H(); +assertEq(2, h.field); + +class I extends Base { + field = 2; + constructor() { + class Tmp { + field = 10; + [super()]; + } + } +}; +let i = new I(); +assertEq(2, i.field); + +class J extends Base { + field = 2; + constructor() { + class Tmp { + field = 10; + [super()](){} + } + } +}; +let j = new J(); +assertEq(2, j.field); diff --git a/js/src/jit-test/tests/fields/superproperty.js b/js/src/jit-test/tests/fields/superproperty.js new file mode 100644 index 0000000000..406df449d6 --- /dev/null +++ b/js/src/jit-test/tests/fields/superproperty.js @@ -0,0 +1,31 @@ +// SuperProperty syntax is allowed in fields. + +class Base { + get accessor() { + return this.constructor.name; + } + method() { + return this.constructor.name; + } +} + +class Derived extends Base { + constructor() { + super(); + } + get accessor() { + throw new Error("don't call this"); + } + method() { + throw new Error("don't call this"); + } + field1 = super.accessor; + field2 = super.method(); +} + +assertEq(new Derived().field1, "Derived"); +assertEq(new Derived().field2, "Derived"); + +if (typeof reportCompare === "function") { + reportCompare(true, true); +} diff --git a/js/src/jit-test/tests/fields/transplant.js b/js/src/jit-test/tests/fields/transplant.js new file mode 100644 index 0000000000..1c21281017 --- /dev/null +++ b/js/src/jit-test/tests/fields/transplant.js @@ -0,0 +1,48 @@ +class Base { + constructor(o) { + return o; + } +} + +class A extends Base { + #x = 10; + static gx(o) { + return o.#x + } + static sx(o, v) { + o.#x = v; + } +} + +function transplantTest(transplantOptions, global) { + var {object, transplant} = transplantableObject(transplantOptions); + + new A(object); + assertEq(A.gx(object), 10); + A.sx(object, 15); + assertEq(A.gx(object), 15); + + transplant(global); + + assertEq(A.gx(object), 15); + A.sx(object, 29); + assertEq(A.gx(object), 29); +} + +// Structure helpfully provided by bug1403679.js +const thisGlobal = this; +const otherGlobalSameCompartment = newGlobal({sameCompartmentAs: thisGlobal}); +const otherGlobalNewCompartment = newGlobal({newCompartment: true}); + +const globals = + [thisGlobal, otherGlobalSameCompartment, otherGlobalNewCompartment]; + +function testWithOptions(fn) { + for (let global of globals) { + for (let options of [{}, {proxy: true}, {object: new FakeDOMObject()}, ]) { + fn(options, global); + } + } +} + +testWithOptions(transplantTest) \ No newline at end of file diff --git a/js/src/jit-test/tests/for-of/arguments-1.js b/js/src/jit-test/tests/for-of/arguments-1.js new file mode 100644 index 0000000000..fddb047e1e --- /dev/null +++ b/js/src/jit-test/tests/for-of/arguments-1.js @@ -0,0 +1,21 @@ +// for-of can iterate arguments objects. + +load(libdir + "iteration.js"); + +// Arguments objects do not have a .@@iterator() method by default. +// Install one on Object.prototype. +Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; + +var s; +function test() { + for (var v of arguments) + s += v; +} + +s = ''; +test(); +assertEq(s, ''); + +s = ''; +test('x', 'y'); +assertEq(s, 'xy'); diff --git a/js/src/jit-test/tests/for-of/arguments-2.js b/js/src/jit-test/tests/for-of/arguments-2.js new file mode 100644 index 0000000000..65abd6ddc5 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arguments-2.js @@ -0,0 +1,14 @@ +// for-of can iterate arguments objects after returning. + +load(libdir + "iteration.js"); + +function f() { + return arguments; +} + +var s = ''; +var args = f('a', 'b', 'c'); +Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; +for (var v of args) + s += v; +assertEq(s, 'abc'); diff --git a/js/src/jit-test/tests/for-of/arguments-3.js b/js/src/jit-test/tests/for-of/arguments-3.js new file mode 100644 index 0000000000..7c5b0488f6 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arguments-3.js @@ -0,0 +1,20 @@ +// for-of can iterate strict arguments objects. + +load(libdir + "iteration.js"); + +Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; + +var s; +function test() { + "use strict"; + for (var v of arguments) + s += v; +} + +s = ''; +test(); +assertEq(s, ''); + +s = ''; +test('a', 'b'); +assertEq(s, 'ab'); diff --git a/js/src/jit-test/tests/for-of/arguments-4.js b/js/src/jit-test/tests/for-of/arguments-4.js new file mode 100644 index 0000000000..79b836d084 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arguments-4.js @@ -0,0 +1,19 @@ +// for-of can iterate arguments objects for other active frames. + +load(libdir + "iteration.js"); + +Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; + +var s; +function g(obj) { + for (var v of obj) + s += v; +} + +function f() { + g(arguments); +} + +s = ''; +f(1, 2, 3); +assertEq(s, '123'); diff --git a/js/src/jit-test/tests/for-of/arguments-5.js b/js/src/jit-test/tests/for-of/arguments-5.js new file mode 100644 index 0000000000..37272d3a78 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arguments-5.js @@ -0,0 +1,20 @@ +// for-of can iterate strict arguments objects in non-strict code. + +load(libdir + "iteration.js"); + +Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; + +var s; +function g(obj) { + for (var v of obj) + s += v; +} + +function f() { + "use strict"; + g(arguments); +} + +s = ''; +f(1, 2, 3); +assertEq(s, '123'); diff --git a/js/src/jit-test/tests/for-of/arguments-6.js b/js/src/jit-test/tests/for-of/arguments-6.js new file mode 100644 index 0000000000..b8129561d2 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arguments-6.js @@ -0,0 +1,16 @@ +// Changing arguments.length affects a for-of loop iterating over arguments. + +load(libdir + "iteration.js"); + +Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; + +var s; +function f() { + arguments.length = 2; + for (var v of arguments) + s += v; +} + +s = ''; +f('a', 'b', 'c', 'd', 'e'); +assertEq(s, 'ab'); diff --git a/js/src/jit-test/tests/for-of/arguments-7.js b/js/src/jit-test/tests/for-of/arguments-7.js new file mode 100644 index 0000000000..cf58c2ba50 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arguments-7.js @@ -0,0 +1,17 @@ +// Changing arguments.length during a for-of loop iterating over arguments affects the loop. + +load(libdir + "iteration.js"); + +Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; + +var s; +function f() { + for (var v of arguments) { + s += v; + arguments.length--; + } +} + +s = ''; +f('a', 'b', 'c', 'd', 'e'); +assertEq(s, 'abc'); diff --git a/js/src/jit-test/tests/for-of/array-holes-1.js b/js/src/jit-test/tests/for-of/array-holes-1.js new file mode 100644 index 0000000000..3d86122192 --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-holes-1.js @@ -0,0 +1,10 @@ +// for-of does not skip Array holes. The value at a hole is undefined. + +var a = [0, , 2, 3]; +var log = []; +for (var x of a) { + assertEq(x, a[log.length]); + log.push(x); +} +assertEq(log[1], undefined); +assertEq(log.join(), "0,,2,3"); diff --git a/js/src/jit-test/tests/for-of/array-holes-2.js b/js/src/jit-test/tests/for-of/array-holes-2.js new file mode 100644 index 0000000000..cc37aedf2a --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-holes-2.js @@ -0,0 +1,8 @@ +// for-of consults Object.prototype when it encounters a hole. + +Object.prototype[1] = 'peek'; +var log = []; +for (var x of [0, , 2, 3]) + log.push(x); +assertEq(log[1], 'peek'); +assertEq(log.join(), "0,peek,2,3"); diff --git a/js/src/jit-test/tests/for-of/array-holes-3.js b/js/src/jit-test/tests/for-of/array-holes-3.js new file mode 100644 index 0000000000..9b4d087bde --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-holes-3.js @@ -0,0 +1,8 @@ +// for-of consults Array.prototype when it encounters a hole. + +Array.prototype[1] = 'peek'; +var log = []; +for (var x of [0, , 2, 3]) + log.push(x); +assertEq(log[1], 'peek'); +assertEq(log.join(), "0,peek,2,3"); diff --git a/js/src/jit-test/tests/for-of/array-holes-4.js b/js/src/jit-test/tests/for-of/array-holes-4.js new file mode 100644 index 0000000000..e4a8770260 --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-holes-4.js @@ -0,0 +1,13 @@ +// for-of on an Array consults the prototype chain when it encounters a hole. + +load(libdir + "iteration.js"); + +var m = {1: 'peek'}; +var a = [0, , 2, 3]; +a.__proto__ = m; +var log = []; +Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; +for (var x of a) + log.push(x); +assertEq(log[1], 'peek'); +assertEq(log.join(), "0,peek,2,3"); diff --git a/js/src/jit-test/tests/for-of/array-holes-5.js b/js/src/jit-test/tests/for-of/array-holes-5.js new file mode 100644 index 0000000000..3f70ed123b --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-holes-5.js @@ -0,0 +1,6 @@ +// for-of does not skip trailing holes; the value is undefined. + +var log = ""; +for (var x of [1, 2, 3,,]) + log += x; +assertEq(log, "123undefined"); diff --git a/js/src/jit-test/tests/for-of/array-holes-6.js b/js/src/jit-test/tests/for-of/array-holes-6.js new file mode 100644 index 0000000000..2b4703fbce --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-holes-6.js @@ -0,0 +1,8 @@ +// for-of visits each hole in an array full of holes. + +var n = 0; +for (var x of Array(5)) { + assertEq(x, undefined); + n++; +} +assertEq(n, 5); diff --git a/js/src/jit-test/tests/for-of/array-holes-slow.js b/js/src/jit-test/tests/for-of/array-holes-slow.js new file mode 100644 index 0000000000..7478ee6ac4 --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-holes-slow.js @@ -0,0 +1,13 @@ +// for-of on a slow Array consults the prototype chain when it encounters a hole. + +var a = [0, , , 3]; +a.slow = true; +Object.prototype[1] = 'peek1'; +Array.prototype[2] = 'peek2'; + +var log = []; +for (var x of a) + log.push(x); +assertEq(log[1], 'peek1'); +assertEq(log[2], 'peek2'); +assertEq(log.join(), "0,peek1,peek2,3"); diff --git a/js/src/jit-test/tests/for-of/array-iterator-changing.js b/js/src/jit-test/tests/for-of/array-iterator-changing.js new file mode 100644 index 0000000000..43a7aa40bf --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-iterator-changing.js @@ -0,0 +1,29 @@ +// Array iterators reflect changes to elements of the underlying array. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var arr = [0, 1, 2]; +var it = arr[Symbol.iterator](); +arr[0] = 1000; +arr[2] = 2000; +assertIteratorNext(it, 1000); +assertIteratorNext(it, 1); +assertIteratorNext(it, 2000); +assertIteratorDone(it, undefined); + +// test that .keys() and .entries() have the same behaviour + +arr = [0, 1, 2]; +var ki = arr.keys(); +var ei = arr.entries(); +arr[0] = 1000; +arr[2] = 2000; +assertIteratorNext(ki, 0); +assertIteratorNext(ei, [0, 1000]); +assertIteratorNext(ki, 1); +assertIteratorNext(ei, [1, 1]); +assertIteratorNext(ki, 2); +assertIteratorNext(ei, [2, 2000]); +assertIteratorDone(ki, undefined); +assertIteratorDone(ei, undefined); diff --git a/js/src/jit-test/tests/for-of/array-iterator-empty.js b/js/src/jit-test/tests/for-of/array-iterator-empty.js new file mode 100644 index 0000000000..5b448befae --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-iterator-empty.js @@ -0,0 +1,11 @@ +// Array.keys() and .entries() on an empty array produce empty iterators + +var arr = []; +var ki = arr.keys(), ei = arr.entries(); +var p = Object.getPrototypeOf(ki); +assertEq(Object.getPrototypeOf(ei), p); + +for (let k of ki) + throw "FAIL"; +for (let [k, v] of ei) + throw "FAIL"; diff --git a/js/src/jit-test/tests/for-of/array-iterator-generic.js b/js/src/jit-test/tests/for-of/array-iterator-generic.js new file mode 100644 index 0000000000..8e19bf8370 --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-iterator-generic.js @@ -0,0 +1,33 @@ +// Array.prototype.iterator is generic. +// That is, it can be applied to arraylike objects and strings, not just arrays. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +function test(obj) { + var it = Array.prototype[Symbol.iterator].call(obj); + var ki = Array.prototype.keys.call(obj); + var ei = Array.prototype.entries.call(obj); + for (var i = 0; i < (obj.length >>> 0); i++) { + assertIteratorNext(it, obj[i]); + assertIteratorNext(ki, i); + assertIteratorNext(ei, [i, obj[i]]); + } + assertIteratorDone(it, undefined); + assertIteratorDone(ki, undefined); + assertIteratorDone(ei, undefined); +} + +test({length: 0}); +test({length: 0, 0: 'x', 1: 'y'}); +test({length: 2, 0: 'x', 1: 'y'}); +test(Object.create(['x', 'y', 'z'])); +test(Object.create({length: 2, 0: 'x', 1: 'y'})); +test(""); +test("ponies"); + +// Perverse length values. +test({length: "011", 9: 9, 10: 10, 11: 11}); +test({length: -0}); +test({length: 2.7, 0: 0, 1: 1, 2: 2}); +test({length: {valueOf: function () { return 3; }}, 0: 0, 1: 1, 2: 2}); diff --git a/js/src/jit-test/tests/for-of/array-iterator-growing-1.js b/js/src/jit-test/tests/for-of/array-iterator-growing-1.js new file mode 100644 index 0000000000..73637a4da4 --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-iterator-growing-1.js @@ -0,0 +1,26 @@ +// If an array with an active iterator is lengthened, the iterator visits the new elements. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var arr = [0, 1]; +var it = arr[Symbol.iterator](); +var ki = arr.keys(); +var ei = arr.entries(); +assertIteratorNext(it, 0); +assertIteratorNext(ki, 0); +assertIteratorNext(ei, [0, 0]); +assertIteratorNext(it, 1); +assertIteratorNext(ki, 1); +assertIteratorNext(ei, [1, 1]); +arr[2] = 2; +arr.length = 4; +assertIteratorNext(it, 2); +assertIteratorNext(ki, 2); +assertIteratorNext(ei, [2, 2]); +assertIteratorNext(it, undefined); +assertIteratorNext(ki, 3); +assertIteratorNext(ei, [3, undefined]); +assertIteratorDone(it, undefined); +assertIteratorDone(ki, undefined); +assertIteratorDone(ei, undefined); diff --git a/js/src/jit-test/tests/for-of/array-iterator-keys-entries.js b/js/src/jit-test/tests/for-of/array-iterator-keys-entries.js new file mode 100644 index 0000000000..e3315488da --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-iterator-keys-entries.js @@ -0,0 +1,16 @@ +// array.keys() returns an iterator over the index of elements +// and array.entries() returns an iterator that yields pairs [index, element]. + +load(libdir + "iteration.js"); + +var data = [1, 2, 3, "abc"]; + +var ki = data.keys(); +for (var i = 0; i < data.length; i++) + assertIteratorResult(ki.next(), i, false); +assertIteratorDone(ki, undefined); + +var ei = data.entries(); +for (var i = 0; i < data.length; i++) + assertIteratorResult(ei.next(), [i, data[i]], false); +assertIteratorDone(ei, undefined); diff --git a/js/src/jit-test/tests/for-of/array-iterator-null.js b/js/src/jit-test/tests/for-of/array-iterator-null.js new file mode 100644 index 0000000000..6382f0701e --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-iterator-null.js @@ -0,0 +1,11 @@ +// Array.prototype.iterator applied to undefined or null throws directly. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +for (var v of [undefined, null]) { + // ES6 draft 2013-09-05 section 22.1.5.1. + assertThrowsInstanceOf(function () { Array.prototype[Symbol.iterator].call(v); }, TypeError); + assertThrowsInstanceOf(function () { Array.prototype.keys.call(v); }, TypeError); + assertThrowsInstanceOf(function () { Array.prototype.entries.call(v); }, TypeError); +} diff --git a/js/src/jit-test/tests/for-of/array-iterator-proxy.js b/js/src/jit-test/tests/for-of/array-iterator-proxy.js new file mode 100644 index 0000000000..f410b5fc66 --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-iterator-proxy.js @@ -0,0 +1,47 @@ +// An array iterator for a proxy calls the traps in a predictable order. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var s = ''; + +var handler = { + get: function (recipient, name) { + if (name == 'length') { + s += 'L'; + return 2; + } else { + s += name; + return name; + } + } +}; + +var it = Array.prototype[Symbol.iterator].call(new Proxy([0, 1], handler)); + +assertIteratorNext(it, "0"); +s += ' '; +assertIteratorNext(it, "1"); +s += ' '; +assertIteratorDone(it, undefined); +assertEq(s, "L0 L1 L"); + +s = ''; +var ki = Array.prototype.keys.call(new Proxy([0, 1], handler)); + +assertIteratorNext(ki, 0); +s += ' '; +assertIteratorNext(ki, 1); +s += ' '; +assertIteratorDone(ki, undefined); +assertEq(s, "L L L"); + +s = ''; +var ei = Array.prototype.entries.call(new Proxy([0, 1], handler)); + +assertIteratorNext(ei, [0, "0"]); +s += ' '; +assertIteratorNext(ei, [1, "1"]); +s += ' '; +assertIteratorDone(ei, undefined); +assertEq(s, "L0 L1 L"); diff --git a/js/src/jit-test/tests/for-of/array-iterator-shrinking.js b/js/src/jit-test/tests/for-of/array-iterator-shrinking.js new file mode 100644 index 0000000000..3963129dde --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-iterator-shrinking.js @@ -0,0 +1,20 @@ +// If an array is truncated to the left of an iterator it, it.next() returns { done: true }. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var arr = [0, 1, 2]; +var it = arr[Symbol.iterator](); +var ki = arr.keys(); +var ei = arr.entries(); + +assertIteratorNext(it, 0); +assertIteratorNext(it, 1); +assertIteratorNext(ki, 0); +assertIteratorNext(ki, 1); +assertIteratorNext(ei, [0, 0]); +assertIteratorNext(ei, [1, 1]); +arr.length = 1; +assertIteratorDone(it, undefined); +assertIteratorDone(ki, undefined); +assertIteratorDone(ei, undefined); diff --git a/js/src/jit-test/tests/for-of/array-iterator-surfaces-1.js b/js/src/jit-test/tests/for-of/array-iterator-surfaces-1.js new file mode 100644 index 0000000000..6757acb3e5 --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-iterator-surfaces-1.js @@ -0,0 +1,17 @@ +// Superficial tests of the Array.prototype[@@iterator] builtin function and its workalikes. + +load(libdir + "iteration.js"); + +var constructors = [Array, String, Uint8Array, Uint8ClampedArray]; +for (var c of constructors) { + assertEq(c.prototype[Symbol.iterator].length, 0); + + var loc = (c === Array || c === String) + ? c.prototype + : Object.getPrototypeOf(c.prototype); + + var desc = Object.getOwnPropertyDescriptor(loc, Symbol.iterator); + assertEq(desc.configurable, true); + assertEq(desc.enumerable, false); + assertEq(desc.writable, true); +} diff --git a/js/src/jit-test/tests/for-of/array-iterator-surfaces-2.js b/js/src/jit-test/tests/for-of/array-iterator-surfaces-2.js new file mode 100644 index 0000000000..a58ebef379 --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-iterator-surfaces-2.js @@ -0,0 +1,31 @@ +// Superficial tests for iterators created by Array.prototype.iterator + +load(libdir + "iteration.js"); + +var proto = Object.getPrototypeOf([][Symbol.iterator]()); +var iterProto = Object.getPrototypeOf(proto); +proto = Object.getPrototypeOf([].keys()); +assertEq(Object.getPrototypeOf(proto), iterProto); +proto = Object.getPrototypeOf([].entries()); +assertEq(Object.getPrototypeOf(proto), iterProto); + +function check(it) { + assertEq(typeof it, 'object'); + assertEq(Object.getPrototypeOf(it), proto); + assertEq(Object.getOwnPropertyNames(it).length, 0); + assertEq(it[Symbol.iterator](), it); + + // for-in enumerates the iterator's properties. + it.x = 0; + var s = ''; + for (var p in it) + s += p + '.'; + assertEq(s, 'x.'); +} + +check([][Symbol.iterator]()); +check(Array.prototype[Symbol.iterator].call({})); +check([].keys()); +check(Array.prototype.keys.call({})); +check([].entries()); +check(Array.prototype.entries.call({})); diff --git a/js/src/jit-test/tests/for-of/array-jit.js b/js/src/jit-test/tests/for-of/array-jit.js new file mode 100644 index 0000000000..3f139cc2bd --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-jit.js @@ -0,0 +1,6 @@ +var arr = [1, 2, 3]; +var y = 0; +for (var i = 0; i < 10; i++) + for (var x of arr) + y += x; +assertEq(y, 60); diff --git a/js/src/jit-test/tests/for-of/array-prototype.js b/js/src/jit-test/tests/for-of/array-prototype.js new file mode 100644 index 0000000000..074420e871 --- /dev/null +++ b/js/src/jit-test/tests/for-of/array-prototype.js @@ -0,0 +1,11 @@ +// for-of works on Array.prototype. + +var v; +for (v of Array.prototype) + throw "FAIL"; + +var s = ''; +Array.prototype.push('a', 'b'); +for (v of Array.prototype) + s += v; +assertEq(s, 'ab'); diff --git a/js/src/jit-test/tests/for-of/arrays-1.js b/js/src/jit-test/tests/for-of/arrays-1.js new file mode 100644 index 0000000000..b75a78d191 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-1.js @@ -0,0 +1,7 @@ +// for-of works on arrays. + +var a = ['a', 'b', 'c']; +var s = ''; +for (var v of a) + s += v; +assertEq(s, 'abc'); diff --git a/js/src/jit-test/tests/for-of/arrays-2.js b/js/src/jit-test/tests/for-of/arrays-2.js new file mode 100644 index 0000000000..df20f92232 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-2.js @@ -0,0 +1,10 @@ +// A for-of loop over an array does not take a snapshot of the array elements. +// Instead, each time the loop needs an element from the array, it gets its current value. + +var a = [3, 5, 5, 4, 0, 5]; +var s = ''; +for (var i of a) { + s += i; + a[i] = 'X'; +} +assertEq(s, '355X0X'); diff --git a/js/src/jit-test/tests/for-of/arrays-3.js b/js/src/jit-test/tests/for-of/arrays-3.js new file mode 100644 index 0000000000..b0dedbcc10 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-3.js @@ -0,0 +1,9 @@ +// Two for-of loops on the same array get distinct iterators. + +var a = [1, 2, 3]; +var s = ''; +for (var x of a) + s += x; +for (var y of a) + s += y; +assertEq(s, '123123'); diff --git a/js/src/jit-test/tests/for-of/arrays-4.js b/js/src/jit-test/tests/for-of/arrays-4.js new file mode 100644 index 0000000000..8567f2b60e --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-4.js @@ -0,0 +1,8 @@ +// Nested for-of loops on the same array get distinct iterators. + +var a = [1, 2, 3]; +var s = ''; +for (var x of a) + for (var y of a) + s += '' + x + y + ','; +assertEq(s, '11,12,13,21,22,23,31,32,33,'); diff --git a/js/src/jit-test/tests/for-of/arrays-5.js b/js/src/jit-test/tests/for-of/arrays-5.js new file mode 100644 index 0000000000..266eb1d948 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-5.js @@ -0,0 +1,4 @@ +// for-of on an empty array does nothing. + +for (var x of []) + fail(); diff --git a/js/src/jit-test/tests/for-of/arrays-growing-1.js b/js/src/jit-test/tests/for-of/arrays-growing-1.js new file mode 100644 index 0000000000..4b5c19e1ea --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-growing-1.js @@ -0,0 +1,10 @@ +// A for-of loop over an array continues to the end if the array grows during iteration. + +var a = [0, 1, 1, 0, 1, 0, 0]; +var s = ''; +for (var v of a) { + s += v; + if (v === 1) + a.push(2); +} +assertEq(s, '0110100222'); diff --git a/js/src/jit-test/tests/for-of/arrays-growing-2.js b/js/src/jit-test/tests/for-of/arrays-growing-2.js new file mode 100644 index 0000000000..e9867714ce --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-growing-2.js @@ -0,0 +1,10 @@ +// Inserting values in an array does not change the next index of an existing iterator. + +var a = [1, 2, 3, 4]; +var s = ''; +for (var v of a) { + s += v; + if (s.length === 2) + a.unshift('x'); +} +assertEq(s, '12234'); diff --git a/js/src/jit-test/tests/for-of/arrays-shrinking-1.js b/js/src/jit-test/tests/for-of/arrays-shrinking-1.js new file mode 100644 index 0000000000..b7210c29c0 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-shrinking-1.js @@ -0,0 +1,13 @@ +// A for-of loop over an array stops at the new end of the array if it shrinks during iteration. + +function ispal(arr) { + for (var v of arr) { + if (v !== arr.pop()) + return false; + } + return true; +} + +assertEq(ispal([1, 2, 3, 4, 3, 2, 1]), true); +assertEq(ispal([1, 2, 3, 3, 2, 1]), true); +assertEq(ispal([1, 2, 3, 4, 2, 1]), false); diff --git a/js/src/jit-test/tests/for-of/arrays-shrinking-2.js b/js/src/jit-test/tests/for-of/arrays-shrinking-2.js new file mode 100644 index 0000000000..86c77303d0 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-shrinking-2.js @@ -0,0 +1,9 @@ +// Using shift to cut values out of an array does not change the next index of an existing iterator. + +var a = [1, 2, 3, 4, 5, 6, 7, 8]; +var s = ''; +for (var v of a) { + s += v; + a.shift(); +} +assertEq(s, '1357'); diff --git a/js/src/jit-test/tests/for-of/arrays-slow-1.js b/js/src/jit-test/tests/for-of/arrays-slow-1.js new file mode 100644 index 0000000000..cab5a49a09 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-slow-1.js @@ -0,0 +1,8 @@ +// for-of works on slow arrays. + +var a = ['a', 'b', 'c']; +a.slow = true; +var log = ''; +for (var x of a) + log += x; +assertEq(log, 'abc'); diff --git a/js/src/jit-test/tests/for-of/arrays-slow-2.js b/js/src/jit-test/tests/for-of/arrays-slow-2.js new file mode 100644 index 0000000000..dc4cf4fa79 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-slow-2.js @@ -0,0 +1,10 @@ +// Two for-of loops on the same slow array get distinct iterators. + +var a = [1, 2, 3]; +a.slow = true; +var s = ''; +for (var x of a) + s += x; +for (var y of a) + s += y; +assertEq(s, '123123'); diff --git a/js/src/jit-test/tests/for-of/arrays-slow-3.js b/js/src/jit-test/tests/for-of/arrays-slow-3.js new file mode 100644 index 0000000000..8a00fd51b0 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-slow-3.js @@ -0,0 +1,9 @@ +// Nested for-of loops on the same slow array get distinct iterators. + +var a = [1, 2, 3]; +a.slow = true; +var s = ''; +for (var x of a) + for (var y of a) + s += '' + x + y + ','; +assertEq(s, '11,12,13,21,22,23,31,32,33,'); diff --git a/js/src/jit-test/tests/for-of/arrays-slow-4.js b/js/src/jit-test/tests/for-of/arrays-slow-4.js new file mode 100644 index 0000000000..d2bceef876 --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-slow-4.js @@ -0,0 +1,6 @@ +// for-of on an empty slow array does nothing. + +var a = []; +a.slow = true; +for (var x of a) + fail(); diff --git a/js/src/jit-test/tests/for-of/arrays-slow-5.js b/js/src/jit-test/tests/for-of/arrays-slow-5.js new file mode 100644 index 0000000000..36173e352b --- /dev/null +++ b/js/src/jit-test/tests/for-of/arrays-slow-5.js @@ -0,0 +1,10 @@ +// Slowifying an array while it is being iterated does not affect iteration. + +var a = [9, 8, 7, 6, 5, 4, 3]; +var log = ''; +for (var x of a) { + log += x; + if (x === 6) + a.slow = true; +} +assertEq(log, "9876543"); diff --git a/js/src/jit-test/tests/for-of/break-1.js b/js/src/jit-test/tests/for-of/break-1.js new file mode 100644 index 0000000000..1a1e528eb8 --- /dev/null +++ b/js/src/jit-test/tests/for-of/break-1.js @@ -0,0 +1,9 @@ +// A break statement leaves a for-of loop. + +var log = ''; +for (var x of ['a', 'b', 'c']) { + log += x; + if (x === 'b') + break; +} +assertEq(log, "ab"); diff --git a/js/src/jit-test/tests/for-of/break-2.js b/js/src/jit-test/tests/for-of/break-2.js new file mode 100644 index 0000000000..4eea55bfac --- /dev/null +++ b/js/src/jit-test/tests/for-of/break-2.js @@ -0,0 +1,10 @@ +// A break statement leaves only a single for-of loop. + +var log = ''; +for (var x of [1, 2, 3]) { + for (var y of ['.', ':']) { + log += x + y; + break; + } +} +assertEq(log, "1.2.3."); diff --git a/js/src/jit-test/tests/for-of/break-3.js b/js/src/jit-test/tests/for-of/break-3.js new file mode 100644 index 0000000000..f5f873197f --- /dev/null +++ b/js/src/jit-test/tests/for-of/break-3.js @@ -0,0 +1,12 @@ +// A labeled break statement can leave multiple for-loops + +var log = ''; +for (var i = 0; i < 3; i++) { + a: for (var x of [1, 2, 3]) { + for (var y of ['.', ':']) { + log += x + y; + break a; + } + } +} +assertEq(log, "1.1.1."); diff --git a/js/src/jit-test/tests/for-of/bug-1331444.js b/js/src/jit-test/tests/for-of/bug-1331444.js new file mode 100644 index 0000000000..9770c584bc --- /dev/null +++ b/js/src/jit-test/tests/for-of/bug-1331444.js @@ -0,0 +1,7 @@ +// |jit-test| error: ReferenceError + +symbols = [Symbol]; +for (comparator of[, ]) + for (a of symbols) + for (;;) + expect; diff --git a/js/src/jit-test/tests/for-of/bug-1341339.js b/js/src/jit-test/tests/for-of/bug-1341339.js new file mode 100644 index 0000000000..cd5f5ff90c --- /dev/null +++ b/js/src/jit-test/tests/for-of/bug-1341339.js @@ -0,0 +1,9 @@ +let m = parseModule(` +function* values() {} +var iterator = values(); +for (var i=0; i < 10000; ++i) { + for (var x of iterator) {} +} +`); +moduleLink(m); +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/for-of/bug-728079-js17-1.js b/js/src/jit-test/tests/for-of/bug-728079-js17-1.js new file mode 100644 index 0000000000..1bc920dab9 --- /dev/null +++ b/js/src/jit-test/tests/for-of/bug-728079-js17-1.js @@ -0,0 +1,21 @@ +// for-of does not trigger the JS 1.7 for-in destructuring special case. + +var data = [[1, 2, 3], [4, 5, 6, 7]]; + +function test(vars, expr, result) { + var s = ''; + eval("for (" + vars + " of data) s += (" + expr + ") + ';';"); + assertEq(s, result); +} + +for (var prefix of ["var ", "let ", ""]) { + test(prefix + "[a, b, c]", + "a + ',' + b + ',' + c", + "1,2,3;4,5,6;"); +} + +test("var [a]", "a", "1;4;"); +test("var {length: len}", "len", "3;4;"); +test("var {length}", "length", "3;4;"); +test("{}", "0", "0;0;"); + diff --git a/js/src/jit-test/tests/for-of/bug-728079-js17-4.js b/js/src/jit-test/tests/for-of/bug-728079-js17-4.js new file mode 100644 index 0000000000..3c3917f905 --- /dev/null +++ b/js/src/jit-test/tests/for-of/bug-728079-js17-4.js @@ -0,0 +1,3 @@ +// Test case from bug 785989 comment 3. + +Reflect.parse("for (let [a, b] of c) ;"); diff --git a/js/src/jit-test/tests/for-of/bug1519700.js b/js/src/jit-test/tests/for-of/bug1519700.js new file mode 100644 index 0000000000..84302c6143 --- /dev/null +++ b/js/src/jit-test/tests/for-of/bug1519700.js @@ -0,0 +1,23 @@ +function* wrapNoThrow() { + let iter = { + [Symbol.iterator]() { + return this; + }, + next() { + return {}; + }, + return () {} + }; + for (const i of iter) + yield i; +} +function foo() { + l2: for (j of wrapNoThrow()) { + for (i of [1, 2, 3]) + break l2; + return false; + } +} +try { + foo(); +} catch {} diff --git a/js/src/jit-test/tests/for-of/bug1773496.js b/js/src/jit-test/tests/for-of/bug1773496.js new file mode 100644 index 0000000000..91ec0b4c8c --- /dev/null +++ b/js/src/jit-test/tests/for-of/bug1773496.js @@ -0,0 +1,47 @@ +var shouldBail = false; +function foo() { + if (shouldBail) { + bailout(); + return 0; + } + for (var i = 0; i < 1000; i++) {} + return { value: undefined, done: true } +} + +const iterable = { + [Symbol.iterator]() { + return { + i: 0, + next() { + return { value: this.i++, done: false } + }, + return() { + return foo(); + } + }; + } +} + +function closeIter() { + with ({}) {} + for (var x of iterable) { + if (x == 2) { + break; + } + } +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + closeIter(); +} + +shouldBail = true; + +caught = false; +try { + closeIter(); +} catch { + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/for-of/completion.js b/js/src/jit-test/tests/for-of/completion.js new file mode 100644 index 0000000000..91dc96e571 --- /dev/null +++ b/js/src/jit-test/tests/for-of/completion.js @@ -0,0 +1,6 @@ +// The completion value of a for-of loop is the completion value of the +// last evaluation of the body, or undefined. + +assertEq(eval("for (let x of [1, 2, 3]) { x }"), 3); +assertEq(eval("for (let x of [1, 2, 3]) { x * 2 }"), 6); +assertEq(eval("for (let x of []) { x }"), undefined); diff --git a/js/src/jit-test/tests/for-of/decompiler.js b/js/src/jit-test/tests/for-of/decompiler.js new file mode 100644 index 0000000000..98e124b3eb --- /dev/null +++ b/js/src/jit-test/tests/for-of/decompiler.js @@ -0,0 +1,28 @@ +// The decompiler correctly handles for-of loops. + +function tokens(code) { + var arr = []; + var s = code.replace(/\w+|[^\s]/g, function (tok) { arr.push(tok); return ""; }); + assertEq(s.trim(), "", "tokens() should find all tokens in code: " + JSON.stringify(code)); + return arr; +} + +function test(code) { + var before = "function f() { " + code + " }"; + var after = eval("(" + before + ")").toString(); + assertEq(tokens(before).join(" "), tokens(after).join(" "), "decompiler failed to round-trip"); +} + +// statements +test("for (a of b) { f(a); }"); +test("for (a of b) { f(a); g(a); }"); + +// for-of with "in" operator nearby +test("for (a of b in c ? c : c.items()) { f(a); }"); + +// destructuring +test("for ([a, b] of c) { a.m(b); }"); + +// for-let-of +test("for (let a of b) { f(a); }"); +test("for (let [a, b] of c) { a.m(b); }"); diff --git a/js/src/jit-test/tests/for-of/generators-1.js b/js/src/jit-test/tests/for-of/generators-1.js new file mode 100644 index 0000000000..417465a508 --- /dev/null +++ b/js/src/jit-test/tests/for-of/generators-1.js @@ -0,0 +1,11 @@ +// for-of works with generators. + +function* range(n) { + for (var i = 0; i < n; i++) + yield i; +} + +var s = ''; +for (var a of range(4)) + s += a; +assertEq(s, '0123'); diff --git a/js/src/jit-test/tests/for-of/generators-2.js b/js/src/jit-test/tests/for-of/generators-2.js new file mode 100644 index 0000000000..e142b206de --- /dev/null +++ b/js/src/jit-test/tests/for-of/generators-2.js @@ -0,0 +1,15 @@ +// Generator-iterators are consumed the first time they are iterated. + +function* range(n) { + for (var i = 0; i < n; i++) + yield i; +} + +var r = range(10); +var i = 0; +for (var x of r) + assertEq(x, i++); +assertEq(i, 10); +for (var y of r) + throw "FAIL"; +assertEq(y, undefined); diff --git a/js/src/jit-test/tests/for-of/generators-3.js b/js/src/jit-test/tests/for-of/generators-3.js new file mode 100644 index 0000000000..6472f4df29 --- /dev/null +++ b/js/src/jit-test/tests/for-of/generators-3.js @@ -0,0 +1,18 @@ +// Nested for-of loops can use the same generator-iterator. + +function* range(n) { + for (var i = 0; i < n; i++) + yield i; +} + +var r = range(10); +for (var a of r) + for (var b of r) + for (var c of r) + for (var d of r) + ; + +assertEq(a, 0); +assertEq(b, 1); +assertEq(c, 2); +assertEq(d, 9); diff --git a/js/src/jit-test/tests/for-of/generators-5.js b/js/src/jit-test/tests/for-of/generators-5.js new file mode 100644 index 0000000000..4ce7166249 --- /dev/null +++ b/js/src/jit-test/tests/for-of/generators-5.js @@ -0,0 +1,20 @@ +// Breaking out of a for-of loop over a generator-iterator closes the generator. + +load(libdir + "iteration.js"); + +function* range(n) { + for (var i = 0; i < n; i++) + yield i; +} + +var r = range(10); +var s = ''; +for (var x of r) { + s += x; + if (x == 4) + break; +} +s += '/'; +for (var y of r) + s += y; +assertEq(s, '01234/'); diff --git a/js/src/jit-test/tests/for-of/iterclose-dynamic-slot-throw.js b/js/src/jit-test/tests/for-of/iterclose-dynamic-slot-throw.js new file mode 100644 index 0000000000..5f91160da2 --- /dev/null +++ b/js/src/jit-test/tests/for-of/iterclose-dynamic-slot-throw.js @@ -0,0 +1,55 @@ +var counter = 0; +const iterable = { + [Symbol.iterator]() { + return { + i: 0, + + // Force the return method into a dynamic slot. + x0: 0, x1: 0, x2: 0, x3: 0, x4: 0, x5: 0, x6: 0, x7: 0, x8: 0, + x9: 0, x10: 0, x11: 0, x12: 0, x13: 0, x14: 0, x15: 0, x16: 0, + x17: 0, x18: 0, x19: 0, x20: 0, x21: 0, x22: 0, x23: 0, x24: 0, + + next() { + return { value: this.i++, done: false } + }, + return() { + counter += 1; + return { value: undefined, done: true }; + } + }; + } +} + +function closeIter(o) { + for (var x of o) { + if (x == 2) { + throw "good"; + } + } +} + +function test() { + with ({}) {} + counter = 0; + for (var i = 0; i < 100; i++) { + var caught = "bad"; + try { + closeIter(iterable) + } catch (e) { + caught = e; + } + assertEq(caught, "good"); + } + assertEq(counter, 100) +} + +with ({}) {} + +test(); + +// Force an IC in Ion. +try { + closeIter([1,2,3]); +} catch {} + +test(); diff --git a/js/src/jit-test/tests/for-of/iterclose-dynamic-slot.js b/js/src/jit-test/tests/for-of/iterclose-dynamic-slot.js new file mode 100644 index 0000000000..170d60999d --- /dev/null +++ b/js/src/jit-test/tests/for-of/iterclose-dynamic-slot.js @@ -0,0 +1,47 @@ +var counter = 0; +const iterable = { + [Symbol.iterator]() { + return { + i: 0, + + // Force the return method into a dynamic slot. + x0: 0, x1: 0, x2: 0, x3: 0, x4: 0, x5: 0, x6: 0, x7: 0, x8: 0, + x9: 0, x10: 0, x11: 0, x12: 0, x13: 0, x14: 0, x15: 0, x16: 0, + x17: 0, x18: 0, x19: 0, x20: 0, x21: 0, x22: 0, x23: 0, x24: 0, + + next() { + return { value: this.i++, done: false } + }, + return() { + counter += 1; + return { value: undefined, done: true }; + } + }; + } +} + +function closeIter(o) { + for (var x of o) { + if (x == 2) { + break; + } + } +} + +function test() { + with ({}) {} + counter = 0; + for (var i = 0; i < 100; i++) { + closeIter(iterable) + } + assertEq(counter, 100) +} + +with ({}) {} + +test(); + +// Force an IC in Ion. +closeIter([1,2,3]); + +test(); diff --git a/js/src/jit-test/tests/for-of/iterclose-extra-args-throw.js b/js/src/jit-test/tests/for-of/iterclose-extra-args-throw.js new file mode 100644 index 0000000000..3f7346ca2f --- /dev/null +++ b/js/src/jit-test/tests/for-of/iterclose-extra-args-throw.js @@ -0,0 +1,49 @@ +const iterable = { + [Symbol.iterator]() { + return { + i: 0, + next() { + return { value: this.i++, done: false } + }, + return(a, b, c, d) { + assertEq(a, undefined); + assertEq(b, undefined); + assertEq(c, undefined); + assertEq(d, undefined); + return { value: "return", done: true }; + } + }; + } +} + +function closeIter(o) { + for (var x of o) { + if (x == 2) { + throw "good"; + } + } +} + +function test() { + with ({}) {} + for (var i = 0; i < 100; i++) { + var caught = "bad"; + try { + closeIter(iterable) + } catch (e) { + caught = e; + } + assertEq(caught, "good"); + } +} + +with ({}) {} + +test(); + +// Force an IC in Ion. +try { + closeIter([1,2,3,4,5]); +} catch {} + +test(); diff --git a/js/src/jit-test/tests/for-of/iterclose-extra-args.js b/js/src/jit-test/tests/for-of/iterclose-extra-args.js new file mode 100644 index 0000000000..e0564d14d6 --- /dev/null +++ b/js/src/jit-test/tests/for-of/iterclose-extra-args.js @@ -0,0 +1,41 @@ +const iterable = { + [Symbol.iterator]() { + return { + i: 0, + next() { + return { value: this.i++, done: false } + }, + return(a, b, c, d) { + assertEq(a, undefined); + assertEq(b, undefined); + assertEq(c, undefined); + assertEq(d, undefined); + return { value: "return", done: true }; + } + }; + } +} + +function closeIter(o) { + for (var x of o) { + if (x == 2) { + break; + } + } +} + +function test() { + with ({}) {} + for (var i = 0; i < 100; i++) { + closeIter(iterable) + } +} + +with ({}) {} + +test(); + +// Force an IC in Ion. +closeIter([1,2,3,4,5]); + +test(); diff --git a/js/src/jit-test/tests/for-of/iterclose-generator-throw.js b/js/src/jit-test/tests/for-of/iterclose-generator-throw.js new file mode 100644 index 0000000000..f380b9796d --- /dev/null +++ b/js/src/jit-test/tests/for-of/iterclose-generator-throw.js @@ -0,0 +1,46 @@ +var finallyCount = 0; + +function* gen(o) { + try { + yield 1; + yield 2; + yield 3; + } finally { + finallyCount++; + } +} + +function closeIter(o) { + for (var x of o) { + if (x == 2) { + throw "good" + } + } +} + +function test() { + with ({}) {} + finallyCount = 0; + + for (var i = 0; i < 100; i++) { + var caught = "bad"; + try { + closeIter(gen()); + } catch (e) { + caught = e; + } + assertEq(caught, "good"); + } + assertEq(finallyCount, 100); +} + +with ({}) {} + +test(); + +// Force an IC in Ion. +try { + closeIter([1,2,3,4,5]); +} catch {} + +test(); diff --git a/js/src/jit-test/tests/for-of/iterclose-generator.js b/js/src/jit-test/tests/for-of/iterclose-generator.js new file mode 100644 index 0000000000..3068e7c8ed --- /dev/null +++ b/js/src/jit-test/tests/for-of/iterclose-generator.js @@ -0,0 +1,38 @@ +var finallyCount = 0; + +function* gen(o) { + try { + yield 1; + yield 2; + yield 3; + } finally { + finallyCount++; + } +} + +function closeIter(o) { + for (var x of o) { + if (x == 2) { + break; + } + } +} + +function test() { + with ({}) {} + finallyCount = 0; + + for (var i = 0; i < 100; i++) { + closeIter(gen()); + } + assertEq(finallyCount, 100); +} + +with ({}) {} + +test(); + +// Force an IC in Ion. +closeIter([1,2,3,4,5]); + +test(); diff --git a/js/src/jit-test/tests/for-of/iterclose-invalid-return-throw.js b/js/src/jit-test/tests/for-of/iterclose-invalid-return-throw.js new file mode 100644 index 0000000000..599b6479fa --- /dev/null +++ b/js/src/jit-test/tests/for-of/iterclose-invalid-return-throw.js @@ -0,0 +1,48 @@ +var returnInvalid = false; + +const iterable = { + [Symbol.iterator]() { + return { + i: 0, + next() { + return { value: this.i++, done: false } + }, + return() { + return returnInvalid ? undefined : { value: "return", done: true }; + } + }; + } +} + +function closeIter(o) { + for (var x of o) { + if (x == 2) { + throw "good"; + } + } +} + +function test() { + with ({}) {} + for (var i = 0; i < 1000; i++) { + returnInvalid = i % 10 == 0; + var caught = "bad"; + try { + closeIter(iterable); + } catch (e) { + caught = e; + } + assertEq(caught, "good"); + } +} + +with ({}) {} + +test(); + +// Force an IC in Ion. +try { + closeIter([1,2,3,4,5]); +} catch {} + +test(); diff --git a/js/src/jit-test/tests/for-of/iterclose-invalid-return.js b/js/src/jit-test/tests/for-of/iterclose-invalid-return.js new file mode 100644 index 0000000000..bda448edc7 --- /dev/null +++ b/js/src/jit-test/tests/for-of/iterclose-invalid-return.js @@ -0,0 +1,46 @@ +var returnInvalid = false; + +const iterable = { + [Symbol.iterator]() { + return { + i: 0, + next() { + return { value: this.i++, done: false } + }, + return() { + return returnInvalid ? undefined : { value: "return", done: true }; + } + }; + } +} + +function closeIter(o) { + for (var x of o) { + if (x == 2) { + break; + } + } +} + +function test() { + with ({}) {} + for (var i = 0; i < 1000; i++) { + returnInvalid = i % 10 == 0; + var caught = false; + try { + closeIter(iterable); + } catch { + caught = true; + } + assertEq(caught, returnInvalid); + } +} + +with ({}) {} + +test(); + +// Force an IC in Ion. +closeIter([1,2,3,4,5]); + +test(); diff --git a/js/src/jit-test/tests/for-of/iterclose-invalidate-with-catch.js b/js/src/jit-test/tests/for-of/iterclose-invalidate-with-catch.js new file mode 100644 index 0000000000..5f5cdd7645 --- /dev/null +++ b/js/src/jit-test/tests/for-of/iterclose-invalidate-with-catch.js @@ -0,0 +1,54 @@ +var invalidate = false; +var caught = false; + +const iterable = { + [Symbol.iterator]() { + return { + i: 0, + next() { + return { value: this.i++, done: false } + }, + return() { + if (invalidate) { + // Invalidate Ion scripts. + gc(closeIter, 'shrinking'); + return undefined; + } + return { value: "return", done: true }; + } + }; + } +} + +function closeIter(o) { + try { + for (var x of o) { + if (x == 2) { + break; + } + } + } catch(e) { + caught = true; + } +} + +function test() { + with ({}) {} + for (var i = 0; i < 100; i++) { + closeIter(iterable); + } + invalidate = true; + closeIter(iterable); + assertEq(caught, true); + invalidate = false; + caught = false; +} + +with ({}) {} + +test(); + +// Force an IC in Ion. +closeIter([1,2,3,4,5]); + +test(); diff --git a/js/src/jit-test/tests/for-of/iterclose-invalidate-with-finally.js b/js/src/jit-test/tests/for-of/iterclose-invalidate-with-finally.js new file mode 100644 index 0000000000..fde21bd6b9 --- /dev/null +++ b/js/src/jit-test/tests/for-of/iterclose-invalidate-with-finally.js @@ -0,0 +1,55 @@ +var invalidate = false; +var finallyCount = 0; + +const iterable = { + [Symbol.iterator]() { + return { + i: 0, + next() { + return { value: this.i++, done: false } + }, + return() { + if (invalidate) { + // Invalidate Ion scripts. + gc(closeIter, 'shrinking'); + return undefined; + } + return { value: "return", done: true }; + } + }; + } +} + +function closeIter(o) { + try { + for (var x of o) { + if (x == 2) { + break; + } + } + } finally { + finallyCount++; + } +} + +function test() { + with ({}) {} + for (var i = 0; i < 100; i++) { + closeIter(iterable); + } + invalidate = true; + try { + closeIter(iterable); + } catch {} + invalidate = false; +} + +with ({}) {} + +test(); + +// Force an IC in Ion. +closeIter([1,2,3,4,5]); + +test(); +assertEq(finallyCount, 203); diff --git a/js/src/jit-test/tests/for-of/iterclose-invalidate.js b/js/src/jit-test/tests/for-of/iterclose-invalidate.js new file mode 100644 index 0000000000..ac23362924 --- /dev/null +++ b/js/src/jit-test/tests/for-of/iterclose-invalidate.js @@ -0,0 +1,53 @@ +var returnInvalid = false; + +const iterable = { + [Symbol.iterator]() { + return { + i: 0, + next() { + return { value: this.i++, done: false } + }, + return() { + if (returnInvalid) { + // Invalidate Ion scripts. + gc(closeIter, 'shrinking'); + return undefined; + } + return { value: "return", done: true }; + } + }; + } +} + +function closeIter(o) { + for (var x of o) { + if (x == 2) { + break; + } + } +} + +function test() { + with ({}) {} + for (var i = 0; i < 100; i++) { + closeIter(iterable); + } + returnInvalid = true; + var caught = false; + try { + closeIter(iterable); + } catch { + caught = true; + } + assertEq(caught, true); + returnInvalid = false; +} + +with ({}) {} + +test(); + +// Force an IC in Ion. +closeIter([1,2,3,4,5]); + +test(); diff --git a/js/src/jit-test/tests/for-of/manual-advance.js b/js/src/jit-test/tests/for-of/manual-advance.js new file mode 100644 index 0000000000..b4059251db --- /dev/null +++ b/js/src/jit-test/tests/for-of/manual-advance.js @@ -0,0 +1,15 @@ +// Manually advancing the iterator. + +load(libdir + 'iteration.js'); + +function* g(n) { for (var i=0; i= 0; ) + yield this[i]; +}; + +var s = ''; +for (var v of ['a', 'b', 'c', 'd']) + s += v; +assertEq(s, 'dcba'); diff --git a/js/src/jit-test/tests/for-of/semantics-04.js b/js/src/jit-test/tests/for-of/semantics-04.js new file mode 100644 index 0000000000..df7036de7a --- /dev/null +++ b/js/src/jit-test/tests/for-of/semantics-04.js @@ -0,0 +1,17 @@ +// Giving an Array an own .iterator property affects for-of. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var a = []; +a[Symbol.iterator] = function* () { + yield 'o'; + yield 'k'; +}; +var s = ''; +for (var v of a) + s += v; +assertEq(s, 'ok'); + +a[Symbol.iterator] = undefined; +assertThrowsInstanceOf(function () { for (var v of a) ; }, TypeError); diff --git a/js/src/jit-test/tests/for-of/semantics-05.js b/js/src/jit-test/tests/for-of/semantics-05.js new file mode 100644 index 0000000000..be5bd7f6e2 --- /dev/null +++ b/js/src/jit-test/tests/for-of/semantics-05.js @@ -0,0 +1,8 @@ +// Deleting String.prototype.iterator makes for-of stop working on strings. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +delete String.prototype[Symbol.iterator]; +assertThrowsInstanceOf(function () { for (var v of "abc") ; }, TypeError); +assertThrowsInstanceOf(function () { for (var v of new String("abc")) ; }, TypeError); diff --git a/js/src/jit-test/tests/for-of/semantics-06.js b/js/src/jit-test/tests/for-of/semantics-06.js new file mode 100644 index 0000000000..1ff3d9570e --- /dev/null +++ b/js/src/jit-test/tests/for-of/semantics-06.js @@ -0,0 +1,8 @@ +// Deleting the .next method makes for-of stop working on arrays. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var iterProto = Object.getPrototypeOf([][Symbol.iterator]()); +delete iterProto.next; +assertThrowsInstanceOf(function () { for (var v of []) ; }, TypeError); diff --git a/js/src/jit-test/tests/for-of/semantics-07.js b/js/src/jit-test/tests/for-of/semantics-07.js new file mode 100644 index 0000000000..e89cf1f053 --- /dev/null +++ b/js/src/jit-test/tests/for-of/semantics-07.js @@ -0,0 +1,15 @@ +// Deleting the .next method of an iterator in the middle of a for-of loop +// doesn't cause a TypeError at the next iteration. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var iterProto = Object.getPrototypeOf([][Symbol.iterator]()); +var s = ''; +for (var v of ['duck', 'duck', 'duck', 'goose', 'and now you\'re it']) { + s += v; + if (v === 'goose') + delete iterProto.next; + s += '.'; +} +assertEq(s, 'duck.duck.duck.goose.and now you\'re it.'); diff --git a/js/src/jit-test/tests/for-of/semantics-08.js b/js/src/jit-test/tests/for-of/semantics-08.js new file mode 100644 index 0000000000..11b96fd12b --- /dev/null +++ b/js/src/jit-test/tests/for-of/semantics-08.js @@ -0,0 +1,12 @@ +// Results from another compartment are correctly interpreted by for-of. + +load(libdir + "iteration.js"); + +var g = newGlobal(); +g.eval(` + var obj = {}; + obj[Symbol.iterator] = function () { return this; }; + obj.next = function () { return { done: true }; }; +`); +for (x of g.obj) + throw 'FAIL'; diff --git a/js/src/jit-test/tests/for-of/semantics-09.js b/js/src/jit-test/tests/for-of/semantics-09.js new file mode 100644 index 0000000000..3efa0b3a9f --- /dev/null +++ b/js/src/jit-test/tests/for-of/semantics-09.js @@ -0,0 +1,25 @@ +// The LHS of a for-of loop is not evaluated until after the .next() method returns. + +var s; +function f() { + s += 'f'; + return {}; +} + +// Test 1: .next() throws StopIteration right away. f is never called. +s = ''; +for (f().x of []) + s += '.'; +assertEq(s, ''); + +// Test 2: check proper interleaving of f calls, iterator.next() calls, and the loop body. +function* g() { + s += 'g'; + yield 0; + s += 'g'; + yield 1; + s += 'g'; +} +for (f().x of g()) + s += '.'; +assertEq(s, 'gf.gf.g'); diff --git a/js/src/jit-test/tests/for-of/semantics-10.js b/js/src/jit-test/tests/for-of/semantics-10.js new file mode 100644 index 0000000000..03f6bc3cfc --- /dev/null +++ b/js/src/jit-test/tests/for-of/semantics-10.js @@ -0,0 +1,31 @@ +// The LHS of a for-loop is not bound to a particular scope until after the .next() method returns. + +var obj = {}; + +// Test 1 +function* g() { + obj.x = 0; + yield 1; +} +var x = 2, n = 0; +with (obj) { + for (x of g()) // g().next() inserts a binding for x on obj + n++; +} +assertEq(x, 2); +assertEq(obj.x, 1); +assertEq(n, 1); + +// Test 2 +function* h() { + delete obj.x; + yield 3; +} +n = 0; +with (obj) { + for (x of h()) // h().next() deletes the binding for x on obj + n++; +} +assertEq(x, 3); +assertEq("x" in obj, false); +assertEq(n, 1); diff --git a/js/src/jit-test/tests/for-of/semantics-11.js b/js/src/jit-test/tests/for-of/semantics-11.js new file mode 100644 index 0000000000..f806478bef --- /dev/null +++ b/js/src/jit-test/tests/for-of/semantics-11.js @@ -0,0 +1,43 @@ +// for-of on a proxy causes a predictable sequence of trap calls. + +load(libdir + "iteration.js"); + +var s = ''; + +var i = 0; +var next_fn = new Proxy(function() {}, { + apply() { + s += "n"; + if (i == 3) + return { value: undefined, done: true }; + return { value: i++, done: false }; + } +}); + +var it = new Proxy({}, { + get(target, property, receiver) { + assertEq(property, "next"); + s += "N"; + return next_fn; + } +}); + +var iterator_fn = new Proxy(function() {}, { + apply() { + s += 'i'; + return it; + } +}); + +var obj = new Proxy({}, { + get: function (receiver, name) { + assertEq(name, Symbol.iterator); + s += "I"; + return iterator_fn; + } +}); + +for (var v of obj) + s += v; + +assertEq(s, 'IiNn0n1n2n'); diff --git a/js/src/jit-test/tests/for-of/string-iterator-generic.js b/js/src/jit-test/tests/for-of/string-iterator-generic.js new file mode 100644 index 0000000000..e1573dd179 --- /dev/null +++ b/js/src/jit-test/tests/for-of/string-iterator-generic.js @@ -0,0 +1,25 @@ +// String.prototype.iterator is generic. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); +load(libdir + "string.js"); + +function test(obj) { + var it = String.prototype[Symbol.iterator].call(obj); + var s = String(obj); + for (var i = 0, length = s.length; i < length;) { + var r = s[i++]; + if (isHighSurrogate(r) && i < length && isLowSurrogate(s[i])) { + r += s[i++]; + } + assertIteratorNext(it, r); + } + assertIteratorDone(it, undefined); +} + +test({toString: () => ""}); +test({toString: () => "xyz"}); +test({toString: () => "\ud808\udf45"}); +test({valueOf: () => ""}); +test({valueOf: () => "xyz"}); +test({valueOf: () => "\ud808\udf45"}); diff --git a/js/src/jit-test/tests/for-of/string-iterator-surfaces.js b/js/src/jit-test/tests/for-of/string-iterator-surfaces.js new file mode 100644 index 0000000000..293f1b8b3c --- /dev/null +++ b/js/src/jit-test/tests/for-of/string-iterator-surfaces.js @@ -0,0 +1,83 @@ +// String.prototype[@@iterator] and StringIterator.prototype surface tests + +load(libdir + "array-compare.js"); +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +function assertDataDescriptor(actual, expected) { + assertEq(actual.value, expected.value); + assertEq(actual.writable, expected.writable); + assertEq(actual.enumerable, expected.enumerable); + assertEq(actual.configurable, expected.configurable); +} + +function isConstructor(o) { + try { + new (new Proxy(o, {construct: () => ({})})); + return true; + } catch(e) { + return false; + } +} + +function assertBuiltinFunction(o, name, arity) { + var fn = o[name]; + assertDataDescriptor(Object.getOwnPropertyDescriptor(o, name), { + value: fn, + writable: true, + enumerable: false, + configurable: true, + }); + + assertEq(typeof fn, "function"); + assertEq(Object.getPrototypeOf(fn), Function.prototype); + assertEq(isConstructor(fn), false); + + assertEq(arraysEqual(Object.getOwnPropertyNames(fn).sort(), ["length", "name"].sort()), true); + + assertDataDescriptor(Object.getOwnPropertyDescriptor(fn, "length"), { + value: arity, + writable: false, + enumerable: false, + configurable: true + }); + + var functionName = typeof name === "symbol" + ? String(name).replace(/^Symbol\((.+)\)$/, "[$1]") + : name; + assertDataDescriptor(Object.getOwnPropertyDescriptor(fn, "name"), { + value: functionName, + writable: false, + enumerable: false, + configurable: true + }); +} + + +// String.prototype[@@iterator] is a built-in function +assertBuiltinFunction(String.prototype, Symbol.iterator, 0); + +// Test StringIterator.prototype surface +var iter = ""[Symbol.iterator](); +var iterProto = Object.getPrototypeOf(iter); + +// StringIterator.prototype inherits from %IteratorPrototype%. Check it's the +// same object as %ArrayIteratorPrototype%'s proto. +assertEq(Object.getPrototypeOf(iterProto), + Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +// Own properties for StringIterator.prototype: "next" +assertEq(arraysEqual(Object.getOwnPropertyNames(iterProto).sort(), ["next"]), true); + +// StringIterator.prototype.next is a built-in function +assertBuiltinFunction(iterProto, "next", 0); + +// StringIterator.prototype[@@iterator] is generic and returns |this| +for (var v of [void 0, null, true, false, "", 0, 1, {}, [], iter, iterProto]) { + assertEq(iterProto[Symbol.iterator].call(v), v); +} + +// StringIterator.prototype.next is not generic +for (var v of [void 0, null, true, false, "", 0, 1, {}, [], iterProto]) { + assertThrowsInstanceOf(() => iterProto.next.call(v), TypeError); +} diff --git a/js/src/jit-test/tests/for-of/strings.js b/js/src/jit-test/tests/for-of/strings.js new file mode 100644 index 0000000000..1dab295b01 --- /dev/null +++ b/js/src/jit-test/tests/for-of/strings.js @@ -0,0 +1,47 @@ +// for-of works on strings and String objects. + +load(libdir + "string.js"); + +function test(s, expectedCodePoints) { + var copy = ''; + var codepoints = 0; + var singleHighSurrogate = false; + for (var v of s) { + assertEq(typeof v, 'string'); + assertEq(v.length, isSurrogatePair(v) ? 2 : 1); + assertEq(false, singleHighSurrogate && isLowSurrogate(v)); + copy += v; + codepoints += 1; + singleHighSurrogate = !isSurrogatePair(v) && isHighSurrogate(v); + } + assertEq(copy, String(s)); + assertEq(codepoints, expectedCodePoints); +} + +test('', 0); +test('abc', 3); +test('a \0 \ufffe \ufeff', 7); + +// Non-BMP characters are generally passed to JS in UTF-16, as surrogate pairs. +// ES6 requires that such pairs be treated as a single code point in for-of. +test('\ud808\udf45', 1); + +// Also test invalid surrogate pairs: +// (1) High surrogate not followed by low surrogate +test('\ud808', 1); +test('\ud808\u0000', 2); +// (2) Low surrogate not preceded by high surrogate +test('\udf45', 1); +test('\u0000\udf45', 2); +// (3) Low surrogate followed by high surrogate +test('\udf45\ud808', 2); + +test(new String(''), 0); +test(new String('abc'), 3); +test(new String('a \0 \ufffe \ufeff'), 7); +test(new String('\ud808\udf45'), 1); +test(new String('\ud808'), 1); +test(new String('\ud808\u0000'), 2); +test(new String('\udf45'), 1); +test(new String('\u0000\udf45'), 2); +test(new String('\udf45\ud808'), 2); diff --git a/js/src/jit-test/tests/for-of/syntax-1.js b/js/src/jit-test/tests/for-of/syntax-1.js new file mode 100644 index 0000000000..7cc393ec12 --- /dev/null +++ b/js/src/jit-test/tests/for-of/syntax-1.js @@ -0,0 +1,20 @@ +// We correctly reject bogus for-of loop syntax. + +load(libdir + "asserts.js"); + +function assertSyntaxError(code) { + assertThrowsInstanceOf(function () { Function(code); }, SyntaxError, "Function:" + code); + assertThrowsInstanceOf(function () { eval(code); }, SyntaxError, "eval:" + code); + var ieval = eval; + assertThrowsInstanceOf(function () { ieval(code); }, SyntaxError, "indirect eval:" + code); +} + +function test(badForHead) { + assertSyntaxError(badForHead + " {}"); // apply directly to forHead + assertSyntaxError("[0 " + badForHead + "];"); +} + +var a, b, c; +test("for (a in b of c)"); +test("for (a of b of c)"); +test("for (let {a: 1} of b)"); diff --git a/js/src/jit-test/tests/for-of/syntax-2.js b/js/src/jit-test/tests/for-of/syntax-2.js new file mode 100644 index 0000000000..2241a39214 --- /dev/null +++ b/js/src/jit-test/tests/for-of/syntax-2.js @@ -0,0 +1,7 @@ +// "of" is not a keyword. + +var of; + +Function("var of;"); + +function of(of) {} diff --git a/js/src/jit-test/tests/for-of/syntax-3.js b/js/src/jit-test/tests/for-of/syntax-3.js new file mode 100644 index 0000000000..01b7cce1c1 --- /dev/null +++ b/js/src/jit-test/tests/for-of/syntax-3.js @@ -0,0 +1,19 @@ +// For-of can't have initializers. + +load(libdir + 'asserts.js'); + +function assertSyntaxError(str) { + assertThrowsInstanceOf(function () { return Function(str); }, SyntaxError); +} + +assertSyntaxError("for (var x = 1 of []) {}"); +assertSyntaxError("for (var [x] = 1 of []) {}"); +assertSyntaxError("for (var {x} = 1 of []) {}"); + +assertSyntaxError("for (let x = 1 of []) {}"); +assertSyntaxError("for (let [x] = 1 of []) {}"); +assertSyntaxError("for (let {x} = 1 of []) {}"); + +assertSyntaxError("for (const x = 1 of []) {}"); +assertSyntaxError("for (const [x] = 1 of []) {}"); +assertSyntaxError("for (const {x} = 1 of []) {}"); diff --git a/js/src/jit-test/tests/for-of/syntax-4.js b/js/src/jit-test/tests/for-of/syntax-4.js new file mode 100644 index 0000000000..a6c3214840 --- /dev/null +++ b/js/src/jit-test/tests/for-of/syntax-4.js @@ -0,0 +1,19 @@ +// The right-hand-side of a for-of is an assignment expression. + +load(libdir + 'asserts.js'); + +function assertSyntaxError(str) { + assertThrowsInstanceOf(function () { return Function(str); }, SyntaxError); +} + +assertSyntaxError("for (var x of 1, 2) {}"); +assertSyntaxError("for (var [x] of 1, 2) {}"); +assertSyntaxError("for (var {x} of 1, 2) {}"); + +assertSyntaxError("for (let x of 1, 2) {}"); +assertSyntaxError("for (let [x] of 1, 2) {}"); +assertSyntaxError("for (let {x} of 1, 2) {}"); + +assertSyntaxError("for (const x of 1, 2) {}"); +assertSyntaxError("for (const [x] of 1, 2) {}"); +assertSyntaxError("for (const {x} of 1, 2) {}"); diff --git a/js/src/jit-test/tests/for-of/throw-during-break.js b/js/src/jit-test/tests/for-of/throw-during-break.js new file mode 100644 index 0000000000..352f6017df --- /dev/null +++ b/js/src/jit-test/tests/for-of/throw-during-break.js @@ -0,0 +1,42 @@ +var whoCaught = "nobody" + +function* wrapNoThrow() { + let iter = { + [Symbol.iterator]() { + return this; + }, + next() { + return { value: 10, done: false }; + }, + return() { throw "nonsense"; } + }; + for (const i of iter) + yield i; + } +function foo() { + try { + l2: + for (j of wrapNoThrow()) { + try { + for (i of [1,2,3]) { + try { + break l2; + } catch(e) { + whoCaught = "inner" + } + } + } catch (e) { + whoCaught = "inner2" + } + } + } catch (e) { + whoCaught = "correct" + } +} + +try { + foo(); +} catch (e) { whoCaught = "outer" } + + +assertEq(whoCaught, "correct"); diff --git a/js/src/jit-test/tests/for-of/throw-during-nested-break.js b/js/src/jit-test/tests/for-of/throw-during-nested-break.js new file mode 100644 index 0000000000..64e2d182b2 --- /dev/null +++ b/js/src/jit-test/tests/for-of/throw-during-nested-break.js @@ -0,0 +1,29 @@ +var progress = ""; + +function* wrapNoThrow() { + let iter = { + [Symbol.iterator]() { return this; }, + next() { return { value: 10, iter: false }; }, + return() { progress += " throw"; throw "nonsense"; } + }; + for (const i of iter) + yield i; +} + +function foo() { + try { + var badIter = wrapNoThrow(); + loop: for (var i of badIter) { + progress += "outerloop"; + try { + for (i of [1,2,3]) { + progress += " innerloop"; + break loop; + } + } catch (e) { progress += " BAD CATCH"; } + } + } catch (e) { progress += " goodcatch"; } +} + +foo(); +assertEq(progress, "outerloop innerloop throw goodcatch"); diff --git a/js/src/jit-test/tests/for-of/throw.js b/js/src/jit-test/tests/for-of/throw.js new file mode 100644 index 0000000000..2576ce1356 --- /dev/null +++ b/js/src/jit-test/tests/for-of/throw.js @@ -0,0 +1,20 @@ +// Control can exit a for-of loop via throw. + +function f() { + for (var a of [1, 2, 3]) { + for (var b of [1, 2, 3]) { + for (var c of [1, 2, 3]) { + if (a !== b && b !== c && c !== a) + throw [a, b, c]; + } + } + } +} + +var x = null; +try { + f(); +} catch (exc) { + x = exc.join(""); +} +assertEq(x, "123"); diff --git a/js/src/jit-test/tests/for-of/typedarrays-1.js b/js/src/jit-test/tests/for-of/typedarrays-1.js new file mode 100644 index 0000000000..d6b7f50383 --- /dev/null +++ b/js/src/jit-test/tests/for-of/typedarrays-1.js @@ -0,0 +1,7 @@ +// for-of can iterate over typed arrays. + +var a = new Int8Array([0, 1, -7, 3]) +var s = ''; +for (var v of a) + s += v + ','; +assertEq(s, '0,1,-7,3,'); diff --git a/js/src/jit-test/tests/for-of/typedarrays-2.js b/js/src/jit-test/tests/for-of/typedarrays-2.js new file mode 100644 index 0000000000..dddc8aab73 --- /dev/null +++ b/js/src/jit-test/tests/for-of/typedarrays-2.js @@ -0,0 +1,11 @@ +// The body of a for-of loop does not run if the target is an empty typed array. + +for (x of new Int16Array(0)) + throw "FAIL"; +for (x of new Float32Array(0)) + throw "FAIL"; + +var a = new Int8Array([0, 1, 2, 3]).subarray(2, 2); +assertEq(a.length, 0); +for (v of a) + throw "FAIL"; diff --git a/js/src/jit-test/tests/for-of/typedarrays-3.js b/js/src/jit-test/tests/for-of/typedarrays-3.js new file mode 100644 index 0000000000..beb205d48e --- /dev/null +++ b/js/src/jit-test/tests/for-of/typedarrays-3.js @@ -0,0 +1,4 @@ +// Destructuring does not occur when the target of for-of is an empty typed array. + +for (var [[x]] of new Int32Array(0)) + throw "FAIL"; diff --git a/js/src/jit-test/tests/for-of/typedarrays-4.js b/js/src/jit-test/tests/for-of/typedarrays-4.js new file mode 100644 index 0000000000..ec2f8ffb54 --- /dev/null +++ b/js/src/jit-test/tests/for-of/typedarrays-4.js @@ -0,0 +1,7 @@ +// for-of throws if the target is a typed array prototype object. + +load(libdir + "asserts.js"); +assertThrowsInstanceOf(function () { + for (var v of Int8Array.prototype) + throw "FAIL"; +}, TypeError); diff --git a/js/src/jit-test/tests/for-of/typedarrays-5.js b/js/src/jit-test/tests/for-of/typedarrays-5.js new file mode 100644 index 0000000000..6ba70e1210 --- /dev/null +++ b/js/src/jit-test/tests/for-of/typedarrays-5.js @@ -0,0 +1,7 @@ +// for-of throws if the target is an ArrayBuffer. + +load(libdir + "asserts.js"); +assertThrowsInstanceOf(function () { + for (var v of new Int8Array([0, 1, 2, 3]).buffer) + throw "FAIL"; +}, TypeError); diff --git a/js/src/jit-test/tests/for-of/typedarrays-6.js b/js/src/jit-test/tests/for-of/typedarrays-6.js new file mode 100644 index 0000000000..90853f30fe --- /dev/null +++ b/js/src/jit-test/tests/for-of/typedarrays-6.js @@ -0,0 +1,9 @@ +// for-of can iterate over float typed arrays containing infinities or NaNs. + +var values = [Infinity, -Infinity, -0, NaN]; +for (var C of [Float32Array, Float64Array]) { + var i = 0; + for (var v of new C(values)) + assertEq(v, values[i++]); + assertEq(i, values.length); +} diff --git a/js/src/jit-test/tests/for-of/value-done-access.js b/js/src/jit-test/tests/for-of/value-done-access.js new file mode 100644 index 0000000000..49028a7746 --- /dev/null +++ b/js/src/jit-test/tests/for-of/value-done-access.js @@ -0,0 +1,23 @@ +// Test that each yield* loop just checks "done", and "value" is only +// fetched once at the end. + +load(libdir + 'iteration.js'); + +var log = ""; + +function Iter(val, count) { + function next() { + return { + get done() { log += "d"; return count-- == 0; }, + get value() { log += "v"; return val; } + } + } + + this[Symbol.iterator] = function() { return this; }; + this.next = next; +} + +for (var x of new Iter(42, 5)) + assertEq(x, 42); + +assertEq(log, "dvdvdvdvdvd"); diff --git a/js/src/jit-test/tests/for-of/wrapper-1.js b/js/src/jit-test/tests/for-of/wrapper-1.js new file mode 100644 index 0000000000..90adb11b08 --- /dev/null +++ b/js/src/jit-test/tests/for-of/wrapper-1.js @@ -0,0 +1,7 @@ +// for-of works on cross-compartment wrappers of Arrays. + +var g = newGlobal(); +var s = ''; +for (var x of g.Array(1, 1, 2, 3, 5)) + s += x; +assertEq(s, '11235'); diff --git a/js/src/jit-test/tests/function/bug-1751660.js b/js/src/jit-test/tests/function/bug-1751660.js new file mode 100644 index 0000000000..98317e7878 --- /dev/null +++ b/js/src/jit-test/tests/function/bug-1751660.js @@ -0,0 +1,26 @@ +function foo() {} + +function bar(o) { + function nested() { + with (o) { + return Object(...arguments); + } + } + + // We need an arbitrary IC before the OSR loop. + foo(); + + // Trigger on-stack-replacement. + for(let i = 0; i < 100; i++) {} + + // Make the call. + return nested(); +} + +// Trigger OSR compilation. +for (var i = 0; i < 5; i++) { + bar({}); +} + +// Call passing in the function itself. +print(bar(bar)); diff --git a/js/src/jit-test/tests/function/function-displayName-computed.js b/js/src/jit-test/tests/function/function-displayName-computed.js new file mode 100644 index 0000000000..d2f1a77eb8 --- /dev/null +++ b/js/src/jit-test/tests/function/function-displayName-computed.js @@ -0,0 +1,74 @@ +// |jit-test| skip-if: isLcovEnabled() +// Guessed Atoms tests. +// Test String literals +var obj = { + ["func"]: function() {return function() {} }, + ["arrowFunc"]: ()=>{return function() {} }, + ["method"]() {return function() {} }, + ["nonAnonymousFunc"]: function F() {return function() {} }, + get ["getter"]() {return function() {} }, +}; + + +assertEq(displayName(obj.func()), "func/<"); +assertEq(displayName(obj.arrowFunc()), "arrowFunc/<"); +assertEq(displayName(obj.method()), "method/<"); +assertEq(displayName(obj.nonAnonymousFunc()), "F/<"); + +// We don't support guessed name for accessor +assertEq(displayName(obj.getter), ""); + +let dummy = class { + ["func"]() {return function() {} } + ["arrowFunc"] = ()=>{return function() {} }; + ["method"]() {return function() {} } + get ["getter"]() {return function() {} } +}; + +dum = new dummy(); +assertEq(displayName(dum.func()), "func/<"); +// We don't support guessed name for class field with computed name +assertEq(displayName(dum.arrowFunc()), "dummy{return function() {}}, + [7] () {return function() {}}, + [8]: class {}, + [9]: function F() {return function() {}}, + [10]: class C{}, + get [11]() {return function() {}}, +}; +assertEq(displayName(objN[1]()), "1/<"); +assertEq(displayName(objN[5]()), "5/<"); +assertEq(displayName(objN[7]()), "7/<"); +assertEq(displayName(objN[8]), "8"); +assertEq(displayName(objN[9]()), "F/<"); +assertEq(displayName(objN[10]), "C"); +// We don't support guessed name for accessor +assertEq(displayName(objN[11]), "objN/<"); + +let foo = class { + [1] () {return function() {} } + [5] = ()=>{return function() {} }; + [7] () {return function() {} } + get [11]() {return function() {} } +}; + +f = new foo(); + +assertEq(displayName(f[1]()), "1/<"); +// We don't support guessed name for class field with computed name +assertEq(displayName(f[5]()), "foo {}; +var asyncArrowFn = () => {}; +`); + +assertFunctionName(arrowFn, undefined); +assertFunctionName(asyncArrowFn, undefined); + + +// asm.js functions. +eval(` +function asm() { + "use asm"; + function f(){ return 0|0; } + return {f: f}; +} +`); + +assertFunctionName(asm, "asm"); +assertFunctionName(asm().f, "f"); +} + +var g = newGlobal({ discardSource: true }); +g.evaluate(test.toString() + "test()"); diff --git a/js/src/jit-test/tests/function/function-toString-discard-source.js b/js/src/jit-test/tests/function/function-toString-discard-source.js new file mode 100644 index 0000000000..3bd183c538 --- /dev/null +++ b/js/src/jit-test/tests/function/function-toString-discard-source.js @@ -0,0 +1,213 @@ +// The Function.prototype.toString() representation of sourceless functions +// must match the NativeFunction syntax. + +function test() { +// Greatly (!) simplified patterns for the PropertyName production. +var propertyName = [ + // PropertyName :: LiteralPropertyName :: IdentifierName + "\\w+", + + // PropertyName :: LiteralPropertyName :: StringLiteral + "(?:'[^']*')", + "(?:\"[^\"]*\")", + + // PropertyName :: LiteralPropertyName :: NumericLiteral + "\\d+", + + // PropertyName :: ComputedPropertyName + "(?:\\[[^\\]]+\\])", +].join("|") + +var nativeCode = RegExp([ + "^", "function", ("(?:" + propertyName + ")?"), "\\(", "\\)", "\\{", "\\[native code\\]", "\\}", "$" +].join("\\s*")); + +function reportMatch(pattern, str) { + assertEq(pattern.test(str), true); +} + +// Function declarations. + +eval(` +function funDecl() {} +function* genDecl() {} +async function asyncFunDecl() {} +async function* asyncGenDecl() {} +`); + +reportMatch(nativeCode, funDecl.toString()); +reportMatch(nativeCode, genDecl.toString()); +reportMatch(nativeCode, asyncFunDecl.toString()); +reportMatch(nativeCode, asyncGenDecl.toString()); + + +// Named function expressions. + +eval(` +var funExpr = function fn() {}; +var genExpr = function* fn() {}; +var asyncFunExpr = async function fn() {}; +var asyncGenExpr = async function* fn() {}; +`); + +reportMatch(nativeCode, funExpr.toString()); +reportMatch(nativeCode, genExpr.toString()); +reportMatch(nativeCode, asyncFunExpr.toString()); +reportMatch(nativeCode, asyncGenExpr.toString()); + + +// Anonymous function expressions. + +eval(` +var funExprAnon = function() {}; +var genExprAnon = function*() {}; +var asyncFunExprAnon = async function() {}; +var asyncGenExprAnon = async function*() {}; +`); + +reportMatch(nativeCode, funExprAnon.toString()); +reportMatch(nativeCode, genExprAnon.toString()); +reportMatch(nativeCode, asyncFunExprAnon.toString()); +reportMatch(nativeCode, asyncGenExprAnon.toString()); + + +// Class declarations and expressions (implicit constructor). +eval(` +class classDecl {} +var classExpr = class C {}; +var classExprAnon = class {}; + +this.classDecl = classDecl; +`); + +reportMatch(nativeCode, classDecl.toString()); +reportMatch(nativeCode, classExpr.toString()); +reportMatch(nativeCode, classExprAnon.toString()); + + +// Class declarations and expressions (explicit constructor). +eval(` +class classDecl { constructor() {} } +var classExpr = class C { constructor() {} }; +var classExprAnon = class { constructor() {} }; + +this.classDecl = classDecl; +`); + +reportMatch(nativeCode, classDecl.toString()); +reportMatch(nativeCode, classExpr.toString()); +reportMatch(nativeCode, classExprAnon.toString()); + + +// Method definitions (identifier names). +eval(` +var obj = { + m() {}, + *gm() {}, + async am() {}, + async* agm() {}, + get x() {}, + set x(_) {}, +}; +`); + +reportMatch(nativeCode, obj.m.toString()); +reportMatch(nativeCode, obj.gm.toString()); +reportMatch(nativeCode, obj.am.toString()); +reportMatch(nativeCode, obj.agm.toString()); +reportMatch(nativeCode, Object.getOwnPropertyDescriptor(obj, "x").get.toString()); +reportMatch(nativeCode, Object.getOwnPropertyDescriptor(obj, "x").set.toString()); + + +// Method definitions (string names). +eval(` +var obj = { + "foo m"() {}, + * "foo gm"() {}, + async "foo am"() {}, + async* "foo agm"() {}, + get "foo x"() {}, + set "foo x"(_) {}, +}; +`); + +reportMatch(nativeCode, obj["foo m"].toString()); +reportMatch(nativeCode, obj["foo gm"].toString()); +reportMatch(nativeCode, obj["foo am"].toString()); +reportMatch(nativeCode, obj["foo agm"].toString()); +reportMatch(nativeCode, Object.getOwnPropertyDescriptor(obj, "foo x").get.toString()); +reportMatch(nativeCode, Object.getOwnPropertyDescriptor(obj, "foo x").set.toString()); + + +// Method definitions (number names). +eval(` +var obj = { + 100() {}, + *200() {}, + async 300() {}, + async* 400() {}, + get 500() {}, + set 500(_) {}, +}; +`); + +reportMatch(nativeCode, obj[100].toString()); +reportMatch(nativeCode, obj[200].toString()); +reportMatch(nativeCode, obj[300].toString()); +reportMatch(nativeCode, obj[400].toString()); +reportMatch(nativeCode, Object.getOwnPropertyDescriptor(obj, 500).get.toString()); +reportMatch(nativeCode, Object.getOwnPropertyDescriptor(obj, 500).set.toString()); + + +// Method definitions (computed property names). + +var sym1 = Symbol(); +var sym2 = Symbol("desc"); +var sym3 = Symbol.for("reg-sym"); +var sym4 = Symbol.match; +var sym5 = Symbol(); + +eval(` +var obj = { + [sym1]() {}, + *[sym2]() {}, + async [sym3]() {}, + async* [sym4]() {}, + get [sym5]() {}, + set [sym5](_) {}, +}; +`); + +reportMatch(nativeCode, obj[sym1].toString()); +reportMatch(nativeCode, obj[sym2].toString()); +reportMatch(nativeCode, obj[sym3].toString()); +reportMatch(nativeCode, obj[sym4].toString()); +reportMatch(nativeCode, Object.getOwnPropertyDescriptor(obj, sym5).get.toString()); +reportMatch(nativeCode, Object.getOwnPropertyDescriptor(obj, sym5).set.toString()); + + +// Arrow functions. +eval(` +var arrowFn = () => {}; +var asyncArrowFn = () => {}; +`); + +reportMatch(nativeCode, arrowFn.toString()); +reportMatch(nativeCode, asyncArrowFn.toString()); + + +// asm.js functions. +eval(` +function asm() { + "use asm"; + function f(){ return 0|0; } + return {f: f}; +} +`); + +reportMatch(nativeCode, asm.toString()); +reportMatch(nativeCode, asm().f.toString()); +} + +var g = newGlobal({ discardSource: true }); +g.evaluate(test.toString() + "test()"); diff --git a/js/src/jit-test/tests/function/function-toString-lazy-name.js b/js/src/jit-test/tests/function/function-toString-lazy-name.js new file mode 100644 index 0000000000..088cd26e39 --- /dev/null +++ b/js/src/jit-test/tests/function/function-toString-lazy-name.js @@ -0,0 +1,7 @@ +assertEq(Map.prototype.set.toString().includes("function set()"), true); +assertEq(Object.getOwnPropertyDescriptor(Map.prototype, 'size').get.toString().includes("function size()"), true); +assertEq(Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get.toString().includes("function flags()"), true); + +assertEq(Map.prototype.set.toSource().includes("function set()"), true); +assertEq(Object.getOwnPropertyDescriptor(Map.prototype, 'size').get.toSource().includes("function get size()"), true); +assertEq(Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get.toSource().includes("function get flags()"), true); diff --git a/js/src/jit-test/tests/fuses/cross-realm.js b/js/src/jit-test/tests/fuses/cross-realm.js new file mode 100644 index 0000000000..0b9c6541b9 --- /dev/null +++ b/js/src/jit-test/tests/fuses/cross-realm.js @@ -0,0 +1,57 @@ +// |jit-test| + +function f(x) { + let [a, b, c] = x; + return a + b + c; +} + +function intact(name) { + let state = getFuseState(); + if (!(name in state)) { + throw "No such fuse " + name; + } + return state[name].intact +} + +let didIt = false; +([])[Symbol.iterator]().__proto__['return'] = () => { didIt = true; return { done: true, value: undefined } }; +assertEq(intact("ArrayIteratorPrototypeHasNoReturnProperty"), false); + +assertEq(f([1, 2, 3, 0]), 6); +assertEq(didIt, true); + +didIt = false; +g = newGlobal(); +g.evaluate(f.toString()); +// Passing in an array from this realm should mean that the return is triggered. +g.long = [1, 2, 3, 0]; +g.evaluate("assertEq(f(long),6)") +g.evaluate(intact.toString()); +// ensure fuse isn't popped inside g. +g.evaluate(`assertEq(intact("ArrayIteratorPrototypeHasNoReturnProperty"), true)`) +assertEq(didIt, true); + +didIt = false; +g = newGlobal(); +g.evaluate(f.toString()); +// Passing in an array from this realm should mean that the return is triggered. +g.long = [1, 2, 3, 0]; + +// Warm up this global's f. +g.evaluate(` +for (let i = 0; i < 100; i++) { + assertEq(f([1, 2, 3, 0]), 6); +} +`); + +assertEq(didIt, false); +g.evaluate("assertEq(f(long), 6)"); +assertEq(didIt, true); + +delete Array.prototype[Symbol.iterator] +let success = false; +try { f([1, 2, 3, 4]); success = true } catch (e) { } +assertEq(success, false); + +try { g.evaluate("assertEq(f(long), 6)"); success = true } catch (e) { } +assertEq(success, false); diff --git a/js/src/jit-test/tests/fuses/htmldda-1.js b/js/src/jit-test/tests/fuses/htmldda-1.js new file mode 100644 index 0000000000..f64e7efb44 --- /dev/null +++ b/js/src/jit-test/tests/fuses/htmldda-1.js @@ -0,0 +1,29 @@ +function f(x, y, z, a, b, c) { + let sum = 0; + sum += x == undefined ? 1 : 0; + sum += y == undefined ? 1 : 0; + sum += z == undefined ? 1 : 0; + sum += a == undefined ? 1 : 0; + sum += b == undefined ? 1 : 0; + sum += c == undefined ? 1 : 0; + return sum; +} + +let iters = 500; +function test(x) { + let count = 0; + let [y, z, a, b, c] = [{}, {}, {}, {}, {}]; + for (let i = 0; i < iters; i++) { + count += f(x, y, z, a, b, c) ? 1 : 0; + } + return count; +} + +let count = test({}); +assertEq(count, 0); + +// pop fuse, and run test again. +x = createIsHTMLDDA(); +count = test(x); + +assertEq(count, iters); diff --git a/js/src/jit-test/tests/fuses/popped-getiter.js b/js/src/jit-test/tests/fuses/popped-getiter.js new file mode 100644 index 0000000000..05964585ea --- /dev/null +++ b/js/src/jit-test/tests/fuses/popped-getiter.js @@ -0,0 +1,11 @@ +// This will pop the getiter fuse. +Array.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; + +function f() { + [] = [] +} + +// We should nevertheless be able to pass this loop without crashing. +for (let i = 0; i < 100; i++) { + f(); +} diff --git a/js/src/jit-test/tests/gc/bug-1004457.js b/js/src/jit-test/tests/gc/bug-1004457.js new file mode 100644 index 0000000000..80e1150f34 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1004457.js @@ -0,0 +1,3 @@ +var argObj = (function () { return arguments })(); +gczeal(4); +delete argObj.callee; diff --git a/js/src/jit-test/tests/gc/bug-1016016.js b/js/src/jit-test/tests/gc/bug-1016016.js new file mode 100644 index 0000000000..7fb6e64d12 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1016016.js @@ -0,0 +1,16 @@ +// |jit-test| error:ReferenceError +toPrinted(this.reason); +function toPrinted(value) { + return value = String(value); +} +var lfcode = new Array(); +lfcode.push = loadFile; +lfcode.push("enableTrackAllocations();"); +lfcode.push("\ +gczeal(9, 2);\ +newGlobal();\ +''.addDebuggee(g1);\ +"); +function loadFile(lfVarx) { + evaluate(lfVarx, { noScriptRval : true, isRunOnce : true }); +} diff --git a/js/src/jit-test/tests/gc/bug-1017141.js b/js/src/jit-test/tests/gc/bug-1017141.js new file mode 100644 index 0000000000..9c4533924c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1017141.js @@ -0,0 +1,25 @@ +var min = gcparam('minEmptyChunkCount'); +var max = gcparam('maxEmptyChunkCount'); + +gcparam('minEmptyChunkCount', 10); +gcparam('maxEmptyChunkCount', 20); +assertEq(gcparam('minEmptyChunkCount'), 10); +assertEq(gcparam('maxEmptyChunkCount'), 20); +gc(); + +/* We maintain the invariant that maxEmptyChunkCount >= minEmptyChunkCount. */ +gcparam('minEmptyChunkCount', 30); +assertEq(gcparam('minEmptyChunkCount'), 30); +assertEq(gcparam('maxEmptyChunkCount'), 30); +gc(); + +gcparam('maxEmptyChunkCount', 5); +assertEq(gcparam('minEmptyChunkCount'), 5); +assertEq(gcparam('maxEmptyChunkCount'), 5); +gc(); + +gcparam('minEmptyChunkCount', min); +gcparam('maxEmptyChunkCount', max); +assertEq(gcparam('minEmptyChunkCount'), min); +assertEq(gcparam('maxEmptyChunkCount'), max); +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1028863.js b/js/src/jit-test/tests/gc/bug-1028863.js new file mode 100644 index 0000000000..699c02fb75 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1028863.js @@ -0,0 +1,3 @@ +function writeTestCaseResult( expect, actual, string ) {} +schedulegc(10); +if (saveStack() == 3) done = true; diff --git a/js/src/jit-test/tests/gc/bug-1032206.js b/js/src/jit-test/tests/gc/bug-1032206.js new file mode 100644 index 0000000000..c58cc53a8d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1032206.js @@ -0,0 +1,3 @@ +gczeal(4); +var symbols = [Symbol(), Symbol("comet"), Symbol.for("moon"), Symbol.iterator, 0]; +for (var a of symbols) {} diff --git a/js/src/jit-test/tests/gc/bug-1035371.js b/js/src/jit-test/tests/gc/bug-1035371.js new file mode 100644 index 0000000000..b42a74656d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1035371.js @@ -0,0 +1,4 @@ +x = function() {}; +y = new WeakMap; +selectforgc({});; +y.set(x, Symbol()); diff --git a/js/src/jit-test/tests/gc/bug-1039516.js b/js/src/jit-test/tests/gc/bug-1039516.js new file mode 100644 index 0000000000..15f2a994d9 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1039516.js @@ -0,0 +1,6 @@ +gczeal(9); +Symbol.for("a"); +gcslice(1); +var a = Symbol.for("a"); +gcslice(); +print(Symbol.keyFor(a)); diff --git a/js/src/jit-test/tests/gc/bug-1053676.js b/js/src/jit-test/tests/gc/bug-1053676.js new file mode 100644 index 0000000000..bebada5767 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1053676.js @@ -0,0 +1,11 @@ +// |jit-test| --ion-eager + +var x +(function() { + x +}()); +verifyprebarriers(); +x = x * 0 +x = Symbol(); +gc(); +evalcx("x=1", this); diff --git a/js/src/jit-test/tests/gc/bug-1055219.js b/js/src/jit-test/tests/gc/bug-1055219.js new file mode 100644 index 0000000000..421aa55ae3 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1055219.js @@ -0,0 +1,5 @@ +gczeal(13); +function A() {}; +A.prototype = []; +function B() {}; +B.prototype = new A(); diff --git a/js/src/jit-test/tests/gc/bug-1070638.js b/js/src/jit-test/tests/gc/bug-1070638.js new file mode 100644 index 0000000000..23793765cf --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1070638.js @@ -0,0 +1,20 @@ +function m() { + for (var j = 0; j < 99; ++j) { + for (var k = 0; k < 99; ++k) { + try { + undefined()() + } catch (e) {} + } + } +} +m() +m() +m() +m() +for (var j = 0; j < 99; ++j) { + for (var k = 0; k < 99; ++k) { + try { + gcslice(1)() + } catch (e) {} + } +} diff --git a/js/src/jit-test/tests/gc/bug-1075546.js b/js/src/jit-test/tests/gc/bug-1075546.js new file mode 100644 index 0000000000..b9fdb510b6 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1075546.js @@ -0,0 +1,30 @@ +for (var i = 0; i < 200; ++i) { + Object.getOwnPropertyNames(undefined + ""); +} +function p(s) { + for (var i = 0; i < s.length; i++) { + s.charCodeAt(i); + } +} +function m(f) { + var a = []; + for (var j = 0; j < 700; ++j) { + try { + f() + } catch (e) { + a.push(e.toString()); + } + } + p(JSON.stringify(a)); +} +f = Function("\ + function f() {\ + functionf\n{}\ + }\ + m(f);\ +"); +f(); +f(); +for (var x = 0; x < 99; x++) { + newGlobal() +} diff --git a/js/src/jit-test/tests/gc/bug-1104162.js b/js/src/jit-test/tests/gc/bug-1104162.js new file mode 100644 index 0000000000..33af69cda0 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1104162.js @@ -0,0 +1,7 @@ +gczeal(11); +g = newGlobal({newCompartment: true}) +g.eval("undefined;function f(){}") +Debugger(g).onDebuggerStatement = function(x) { + x.eval("f").return.script.setBreakpoint(0, {}) +} +g.eval("debugger") diff --git a/js/src/jit-test/tests/gc/bug-1108007.js b/js/src/jit-test/tests/gc/bug-1108007.js new file mode 100644 index 0000000000..35daaefc91 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1108007.js @@ -0,0 +1,23 @@ +// |jit-test| --no-threads; --no-ion; --no-baseline; skip-if: !('gczeal' in this) + +gczeal(2); +(function() { + evaluate(cacheEntry((function() { + return "(new String(\"\"))" + })()), Object.create({ global: newGlobal({ cloneSingletons: true }) }, { + saveIncrementalBytecode: { + value: true + } + })) +})(); +[[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0]]; diff --git a/js/src/jit-test/tests/gc/bug-1108836.js b/js/src/jit-test/tests/gc/bug-1108836.js new file mode 100644 index 0000000000..e8d32b3e3c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1108836.js @@ -0,0 +1,9 @@ +const root = newGlobal(); +var g = newGlobal(); +for (var indexI = 0; indexI <= 65535; indexI++) { + eval("/*var " + String.fromCharCode(indexI) + "xx = 1*/"); +} +for (var i = 0; i < 100; ++i) { + gc(); + gcslice(1000000); +} diff --git a/js/src/jit-test/tests/gc/bug-1109913.js b/js/src/jit-test/tests/gc/bug-1109913.js new file mode 100644 index 0000000000..c84db18c4b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1109913.js @@ -0,0 +1,7 @@ +// |jit-test| allow-oom; allow-unhandlable-oom + +gcparam("maxBytes", gcparam("gcBytes")); +eval(` + gczeal(2, 1); + newGlobal(); +`); diff --git a/js/src/jit-test/tests/gc/bug-1109922.js b/js/src/jit-test/tests/gc/bug-1109922.js new file mode 100644 index 0000000000..8bd5c52da7 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1109922.js @@ -0,0 +1,6 @@ +if (this.hasOwnProperty("Intl")) { + gczeal(14); + b = {}; + b.__proto__ = evalcx("lazy"); + (function m(b) {})(b.Intl.Collator(0)) +} diff --git a/js/src/jit-test/tests/gc/bug-1123648.js b/js/src/jit-test/tests/gc/bug-1123648.js new file mode 100644 index 0000000000..54226949a0 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1123648.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('ctypes' in this) + +gczeal(14, 1); +ctypes.FunctionType(ctypes.default_abi, ctypes.void_t, []).ptr; diff --git a/js/src/jit-test/tests/gc/bug-1124563.js b/js/src/jit-test/tests/gc/bug-1124563.js new file mode 100644 index 0000000000..73599025b8 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1124563.js @@ -0,0 +1,4 @@ +try { + gc(0, 'shrinking')({x: 0}) +} catch (e) {} +eval("({x: 0, x: 0})[{x: 0}]") diff --git a/js/src/jit-test/tests/gc/bug-1124653.js b/js/src/jit-test/tests/gc/bug-1124653.js new file mode 100644 index 0000000000..8dca8dc330 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1124653.js @@ -0,0 +1,5 @@ +var o = {}; +gczeal(14); +for (var i = 0; i < 200; i++) { + with (o) { } +} diff --git a/js/src/jit-test/tests/gc/bug-1136597.js b/js/src/jit-test/tests/gc/bug-1136597.js new file mode 100644 index 0000000000..075933acf8 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1136597.js @@ -0,0 +1,25 @@ +// |jit-test| error:ReferenceError +var evalInFrame = (function (global) { + var dbgGlobal = newGlobal({newCompartment: true}); + var dbg = new dbgGlobal.Debugger(); + return function evalInFrame(upCount, code) { + dbg.addDebuggee(global); + }; +})(this); +var gTestcases = new Array(); +var gTc = gTestcases.length; +function TestCase() { + return gTestcases[gTc++] = this; +} +function checkCollation(extensionCoValue, usageValue) { + var collator = new Intl.Collator(["de-DE"]); + collator.resolvedOptions().collation; +} +checkCollation(undefined, "sort"); +checkCollation(); +for ( addpow = 0; addpow < 33; addpow++ ) { + new TestCase(); +} +evalInFrame(0, "i(true)", true); +gc(3, 'shrinking') +eval("gc(); h = g1"); diff --git a/js/src/jit-test/tests/gc/bug-1137341.js b/js/src/jit-test/tests/gc/bug-1137341.js new file mode 100644 index 0000000000..baac2d7bb0 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1137341.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +gczeal(0); +gc(); + +schedulezone(this); +startgc(0, "shrinking"); +var g = newGlobal(); +g.offThreadCompileToStencil('debugger;', {}); +var stencil = g.finishOffThreadStencil(); +g.evalStencil(stencil); diff --git a/js/src/jit-test/tests/gc/bug-1143706.js b/js/src/jit-test/tests/gc/bug-1143706.js new file mode 100644 index 0000000000..2ae7930cb4 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1143706.js @@ -0,0 +1,2 @@ +gczeal(14, 1); +var g = newGlobal(); diff --git a/js/src/jit-test/tests/gc/bug-1144738.js b/js/src/jit-test/tests/gc/bug-1144738.js new file mode 100644 index 0000000000..ef121faaf8 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1144738.js @@ -0,0 +1,32 @@ +// |jit-test| error: ReferenceError; --fuzzing-safe; --thread-count=1; --ion-eager +const ALL_TESTS = [ + "CONTEXT_OBJECT_PROPERTY_DOT_REFERENCE_IS_FUNCTION", + ]; +function r(keyword, tests) { + function Reserved(keyword, tests) { + this.keyword = keyword; + if (tests) + this.tests = tests; + else + this.tests = ALL_TESTS; + } + return new Reserved(keyword, tests); +} +for (var i = 2; i >= 0; i--) { + gc(); + gczeal(14, 17); + [ + r("break"), + r("case"), + r("catch"), + r("continue"), + ]; + [ + r("true"), + r("null"), + r("each"), + r("let") + ]; +} +Failure; + diff --git a/js/src/jit-test/tests/gc/bug-1146696.js b/js/src/jit-test/tests/gc/bug-1146696.js new file mode 100644 index 0000000000..02df084673 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1146696.js @@ -0,0 +1,21 @@ +// |jit-test| --no-ggc; allow-oom; allow-unhandlable-oom +gc(); +dbg1 = new Debugger(); +root2 = newGlobal({newCompartment: true}); +dbg1.memory.onGarbageCollection = function(){} +dbg1.addDebuggee(root2); +for (var j = 0; j < 9999; ++j) { + try { + a + } catch (e) {} +} +gcparam("maxBytes", gcparam("gcBytes") + 8000); +function g(i) { + if (i == 0) + return; + var x = ""; + function f() {} + eval(''); + g(i - 1); +} +g(100); diff --git a/js/src/jit-test/tests/gc/bug-1148383.js b/js/src/jit-test/tests/gc/bug-1148383.js new file mode 100644 index 0000000000..486e6e0ba5 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1148383.js @@ -0,0 +1,17 @@ +// This testcase tests setting object metadata for objects created from JIT +// code. +opts = getJitCompilerOptions(); +if (!opts['ion.enable'] || !opts['baseline.enable']) + quit(); + +function TestCase() {} +function reportCompare () { + var output = ""; + var testcase = new TestCase(); + testcase.reason = output; +} +reportCompare(); +gczeal(4, 1000); +enableShellAllocationMetadataBuilder(); +for (var i = 0; i < 10000; ++i) + reportCompare(); diff --git a/js/src/jit-test/tests/gc/bug-1155455.js b/js/src/jit-test/tests/gc/bug-1155455.js new file mode 100644 index 0000000000..c9b8040884 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1155455.js @@ -0,0 +1,16 @@ +// |jit-test| error: TypeError; skip-if: !('gczeal' in this) +var g = newGlobal(); +gczeal(10, 2) +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame1) { + function hit(frame2) { + return hit[0] = "mutated"; + } + var s = frame1.script; + var offs = s.getLineOffsets(g.line0 + 2); + for (var i = 0; i < offs.length; i++) + s.setBreakpoint(offs[i], {hit: hit}); + return; +}; +var lfGlobal = newGlobal(); +g.eval("var line0 = Error().lineNumber;\n debugger;\nx = 1;\n"); diff --git a/js/src/jit-test/tests/gc/bug-1157577.js b/js/src/jit-test/tests/gc/bug-1157577.js new file mode 100644 index 0000000000..2ec7556ea3 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1157577.js @@ -0,0 +1,4 @@ +x = evalcx(''); +gcslice(10); +for (var p in x) {} + diff --git a/js/src/jit-test/tests/gc/bug-1161303.js b/js/src/jit-test/tests/gc/bug-1161303.js new file mode 100644 index 0000000000..872f137632 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1161303.js @@ -0,0 +1,7 @@ +function f(x) { + for (var i = 0; i < 100000; i++ ) { + [(x, 2)]; + try { g(); } catch (t) {} + } +} +f(2); diff --git a/js/src/jit-test/tests/gc/bug-1161968.js b/js/src/jit-test/tests/gc/bug-1161968.js new file mode 100644 index 0000000000..5f83aa510c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1161968.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('gczeal' in this) + +// This test case is a simplified version of debug/Source-invisible.js. + +gczeal(2,21); + +var gi = newGlobal(); + +var gv = newGlobal(); +gi.evaluate('function f() {}', {global: gv}); + +var dbg = new Debugger; diff --git a/js/src/jit-test/tests/gc/bug-1165966.js b/js/src/jit-test/tests/gc/bug-1165966.js new file mode 100644 index 0000000000..79c58274cd --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1165966.js @@ -0,0 +1,6 @@ +// |jit-test| --no-ion; skip-if: !('oomTest' in this) + +var g = newGlobal(); +oomTest(function() { + Debugger(g); +}); diff --git a/js/src/jit-test/tests/gc/bug-1171909.js b/js/src/jit-test/tests/gc/bug-1171909.js new file mode 100644 index 0000000000..755c6ff89d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1171909.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest((function(x) { assertEq(x + y + ex, 25); })); diff --git a/js/src/jit-test/tests/gc/bug-1175755.js b/js/src/jit-test/tests/gc/bug-1175755.js new file mode 100644 index 0000000000..1b6960fb8c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1175755.js @@ -0,0 +1,6 @@ +// |jit-test| allow-oom; allow-unhandlable-oom; skip-if: !('oomAfterAllocations' in this) + +setGCCallback({ + action: "majorGC", +}); +oomAfterAllocations(50); diff --git a/js/src/jit-test/tests/gc/bug-1177778.js b/js/src/jit-test/tests/gc/bug-1177778.js new file mode 100644 index 0000000000..155763f3a2 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1177778.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: !('setGCCallback' in this) + +setGCCallback({ + action: "majorGC", + phases: "both" +}); +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +g.eval("function h() { debugger; }"); +dbg.onDebuggerStatement = function(hframe) { + var env = hframe.older.environment; +}; +g.eval("h();"); + diff --git a/js/src/jit-test/tests/gc/bug-1191576.js b/js/src/jit-test/tests/gc/bug-1191576.js new file mode 100644 index 0000000000..6346905256 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1191576.js @@ -0,0 +1,14 @@ +// |jit-test| allow-oom; skip-if: !('gczeal' in this && 'oomAfterAllocations' in this) + +var lfcode = new Array(); +gczeal(14); +loadFile(` +for (let e of Object.values(newGlobal())) { + if (oomAfterAllocations(100)) + continue; +} +`); +function loadFile(lfVarx) { + for (lfLocal in this) {} + evaluate(lfVarx); +} diff --git a/js/src/jit-test/tests/gc/bug-1206677.js b/js/src/jit-test/tests/gc/bug-1206677.js new file mode 100644 index 0000000000..a0d2ff3a1f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1206677.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0 + +var lfGlobal = newGlobal(); +for (lfLocal in this) { + if (!(lfLocal in lfGlobal)) { + lfGlobal[lfLocal] = this[lfLocal]; + } +} +const script = 'oomTest(() => getBacktrace({args: true, locals: "123795", thisprops: true}));'; +lfGlobal.offThreadCompileToStencil(script); +var stencil = lfGlobal.finishOffThreadStencil(); +lfGlobal.evalStencil(stencil); diff --git a/js/src/jit-test/tests/gc/bug-1208994.js b/js/src/jit-test/tests/gc/bug-1208994.js new file mode 100644 index 0000000000..12c24f62af --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1208994.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => getBacktrace({args: oomTest[load+1], locals: true, thisprops: true})); diff --git a/js/src/jit-test/tests/gc/bug-1209001.js b/js/src/jit-test/tests/gc/bug-1209001.js new file mode 100644 index 0000000000..a737224d0d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1209001.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => parseModule('import v from "mod";')); diff --git a/js/src/jit-test/tests/gc/bug-1210607.js b/js/src/jit-test/tests/gc/bug-1210607.js new file mode 100644 index 0000000000..15312c810a --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1210607.js @@ -0,0 +1,6 @@ +// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this) + +var g = newGlobal({newCompartment: true}); +x = Debugger(g); +selectforgc(g); +oomAfterAllocations(1); diff --git a/js/src/jit-test/tests/gc/bug-1214006.js b/js/src/jit-test/tests/gc/bug-1214006.js new file mode 100644 index 0000000000..ed2c6468dc --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1214006.js @@ -0,0 +1,7 @@ +// |jit-test| allow-oom; skip-if: !('oomTest' in this) + +function f() { + eval("(function() y)()"); +} +oomTest(f); +fullcompartmentchecks(true); diff --git a/js/src/jit-test/tests/gc/bug-1214781.js b/js/src/jit-test/tests/gc/bug-1214781.js new file mode 100644 index 0000000000..d18845812c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1214781.js @@ -0,0 +1,7 @@ +// |jit-test| allow-oom; skip-if: !('oomTest' in this) + +try { + gcparam("maxBytes", gcparam("gcBytes")); + newGlobal(""); +} catch (e) {}; +oomTest(function() {}) diff --git a/js/src/jit-test/tests/gc/bug-1214846.js b/js/src/jit-test/tests/gc/bug-1214846.js new file mode 100644 index 0000000000..23b5b9fe94 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1214846.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0 + +enableGeckoProfiling(); +var s = newGlobal(); +s.offThreadCompileToStencil('oomTest(() => {});'); +var stencil = s.finishOffThreadStencil(); +s.evalStencil(stencil); diff --git a/js/src/jit-test/tests/gc/bug-1215363-1.js b/js/src/jit-test/tests/gc/bug-1215363-1.js new file mode 100644 index 0000000000..3ed21e1f9a --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1215363-1.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => parseModule(10)); diff --git a/js/src/jit-test/tests/gc/bug-1215363-2.js b/js/src/jit-test/tests/gc/bug-1215363-2.js new file mode 100644 index 0000000000..4b51a5a96d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1215363-2.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var lfcode = new Array(); +oomTest((function(x) { + assertEq(...Object); +})); diff --git a/js/src/jit-test/tests/gc/bug-1215363-3.js b/js/src/jit-test/tests/gc/bug-1215363-3.js new file mode 100644 index 0000000000..33495af2e1 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1215363-3.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var lfcode = new Array(); +oomTest(() => getBacktrace({})); diff --git a/js/src/jit-test/tests/gc/bug-1215678.js b/js/src/jit-test/tests/gc/bug-1215678.js new file mode 100644 index 0000000000..8a9723776b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1215678.js @@ -0,0 +1,10 @@ +// |jit-test| error: ReferenceError +if (!('oomTest' in this)) + a; + +enableShellAllocationMetadataBuilder() +oomTest(() => { + newGlobal() +}) +gczeal(9, 1); +a; diff --git a/js/src/jit-test/tests/gc/bug-1216607.js b/js/src/jit-test/tests/gc/bug-1216607.js new file mode 100644 index 0000000000..1afac7faab --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1216607.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: !('oomTest' in this) + +enableGeckoProfilingWithSlowAssertions(); +try { +(function() { + while (n--) { + } +})(); +} catch(exc1) {} +function arrayProtoOutOfRange() { + function f(obj) {} + function test() { + for (var i = 0; i < 1000; i++) + var r = f(i % 2 ? a : b); + } + test(); +} +oomTest(arrayProtoOutOfRange); diff --git a/js/src/jit-test/tests/gc/bug-1218900-2.js b/js/src/jit-test/tests/gc/bug-1218900-2.js new file mode 100644 index 0000000000..6e99475266 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1218900-2.js @@ -0,0 +1,3 @@ +// |jit-test| error: Error +startTimingMutator(); +startTimingMutator(); diff --git a/js/src/jit-test/tests/gc/bug-1218900.js b/js/src/jit-test/tests/gc/bug-1218900.js new file mode 100644 index 0000000000..a3bc82bd2b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1218900.js @@ -0,0 +1,8 @@ +// |jit-test| --fuzzing-safe +readline = function() {}; +Function.prototype.toString = function() { + for (var i = 0; i < 2; i++) { + this() + } +}; +getBacktrace({thisprops: true}); diff --git a/js/src/jit-test/tests/gc/bug-1221359.js b/js/src/jit-test/tests/gc/bug-1221359.js new file mode 100644 index 0000000000..dcbafeb446 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1221359.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => getBacktrace({ + locals: true, + thisprops: true +})); diff --git a/js/src/jit-test/tests/gc/bug-1221747.js b/js/src/jit-test/tests/gc/bug-1221747.js new file mode 100644 index 0000000000..5ff33dd64e --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1221747.js @@ -0,0 +1,6 @@ +// |jit-test| --dump-bytecode; skip-if: !('oomTest' in this) + +function f() { + eval("(function() {})()"); +} +oomTest(f); diff --git a/js/src/jit-test/tests/gc/bug-1223021.js b/js/src/jit-test/tests/gc/bug-1223021.js new file mode 100644 index 0000000000..bbc40aa1fb --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1223021.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function f() { + return this === null; +}; + +function g() { + if (!f.apply(9)) {} +} + +oomTest(g); diff --git a/js/src/jit-test/tests/gc/bug-1224710.js b/js/src/jit-test/tests/gc/bug-1224710.js new file mode 100644 index 0000000000..9cb9aa7cd3 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1224710.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(function() { + eval("\ + function g() {\ + \"use asm\";\ + function f(d) {\ + d = +d;\ + print(.0 + d);\ + }\ + }\ + ") +}) diff --git a/js/src/jit-test/tests/gc/bug-1226896.js b/js/src/jit-test/tests/gc/bug-1226896.js new file mode 100644 index 0000000000..0b8c513cc8 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1226896.js @@ -0,0 +1,6 @@ +// |jit-test| --ion-pruning=on; skip-if: !('oomTest' in this) + +oomTest(() => { + var g = newGlobal({sameZoneAs: this}); + g.eval("(function() {})()"); +}); diff --git a/js/src/jit-test/tests/gc/bug-1231386.js b/js/src/jit-test/tests/gc/bug-1231386.js new file mode 100644 index 0000000000..c2dc55b734 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1231386.js @@ -0,0 +1,18 @@ +// |jit-test| slow; skip-if: !('oomTest' in this) + +function f1() {} +function f2() {} +r = [function() {}, function() {}, [], function() {}, f1, function() {}, f2]; +l = [0]; +function f3() { + return { + a: 0 + }; +} +var x = f3(); +var h = newGlobal({newCompartment: true}); +var dbg = new Debugger; +dbg.addDebuggee(h); +oomTest(() => getBacktrace({ + thisprops: gc() +})); diff --git a/js/src/jit-test/tests/gc/bug-1232386.js b/js/src/jit-test/tests/gc/bug-1232386.js new file mode 100644 index 0000000000..82a33a7ec4 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1232386.js @@ -0,0 +1,10 @@ +// |jit-test| allow-oom; skip-if: !('oomTest' in this) + +var dbg = new Debugger; +dbg.onNewGlobalObject = function(global) { + global.seen = true; +}; + +oomTest(function() { + newGlobal({sameZoneAs: this}) +}); diff --git a/js/src/jit-test/tests/gc/bug-1234410.js b/js/src/jit-test/tests/gc/bug-1234410.js new file mode 100644 index 0000000000..fe400f8013 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1234410.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this) + +enableGeckoProfiling(); +oomTest(() => { + try { + for (var quit of oomTest.gcparam("//").ArrayBuffer(1)) {} + } catch (e) {} +}); + diff --git a/js/src/jit-test/tests/gc/bug-1236473.js b/js/src/jit-test/tests/gc/bug-1236473.js new file mode 100644 index 0000000000..0051e789a6 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1236473.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => { + offThreadCompileToStencil(`try {} catch (NaN) {}`); + var stencil = finishOffThreadStencil(); + evalStencil(stencil); +}); diff --git a/js/src/jit-test/tests/gc/bug-1237153.js b/js/src/jit-test/tests/gc/bug-1237153.js new file mode 100644 index 0000000000..bdb0b011f2 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1237153.js @@ -0,0 +1,2 @@ +// |jit-test| error: Error +gcparam("sliceTimeBudgetMS", -1); diff --git a/js/src/jit-test/tests/gc/bug-1238548.js b/js/src/jit-test/tests/gc/bug-1238548.js new file mode 100644 index 0000000000..4f2e1e51d9 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1238548.js @@ -0,0 +1,2 @@ +// |jit-test| error: Error +gcparam("highFrequencySmallHeapGrowth", 1); diff --git a/js/src/jit-test/tests/gc/bug-1238555.js b/js/src/jit-test/tests/gc/bug-1238555.js new file mode 100644 index 0000000000..4b9963292e --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1238555.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest( + function x() { + try { + eval('let ') + } catch (ex) { + (function() {})() + } + } +); diff --git a/js/src/jit-test/tests/gc/bug-1238575-2.js b/js/src/jit-test/tests/gc/bug-1238575-2.js new file mode 100644 index 0000000000..9fe011efa1 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1238575-2.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => evalInWorker("1")); diff --git a/js/src/jit-test/tests/gc/bug-1238575.js b/js/src/jit-test/tests/gc/bug-1238575.js new file mode 100644 index 0000000000..8e6a629d9f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1238575.js @@ -0,0 +1,5 @@ +// |jit-test| allow-oom; allow-unhandlable-oom; skip-if: !('oomAfterAllocations' in this) + +oomAfterAllocations(5) +gcslice(11); +evalInWorker("1"); diff --git a/js/src/jit-test/tests/gc/bug-1238582.js b/js/src/jit-test/tests/gc/bug-1238582.js new file mode 100644 index 0000000000..b5dad7a64d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1238582.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => { let a = [2147483651]; [a[0], a[undefined]].sort(); }); diff --git a/js/src/jit-test/tests/gc/bug-1240503.js b/js/src/jit-test/tests/gc/bug-1240503.js new file mode 100644 index 0000000000..167752962b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1240503.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function arrayProtoOutOfRange() { + for (let [] = () => r, get;;) + var r = f(i % 2 ? a : b); +} +oomTest(arrayProtoOutOfRange); diff --git a/js/src/jit-test/tests/gc/bug-1240527.js b/js/src/jit-test/tests/gc/bug-1240527.js new file mode 100644 index 0000000000..ca4e0e3eb6 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1240527.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: helperThreadCount() === 0 || !('oomTest' in this) + +offThreadCompileToStencil(` + oomTest(() => "".search(/d/)); + fullcompartmentchecks(3); +`); +var stencil = finishOffThreadStencil(); +evalStencil(stencil); diff --git a/js/src/jit-test/tests/gc/bug-1241731.js b/js/src/jit-test/tests/gc/bug-1241731.js new file mode 100644 index 0000000000..015c7f3e67 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1241731.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => serialize(0, [{}])); diff --git a/js/src/jit-test/tests/gc/bug-1242812.js b/js/src/jit-test/tests/gc/bug-1242812.js new file mode 100644 index 0000000000..df4ae09998 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1242812.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var lfcode = new Array(); +oomTest(() => { let a = [2147483651]; [-1, 0, 1, 31, 32].sort(); }); diff --git a/js/src/jit-test/tests/gc/bug-1245520.js b/js/src/jit-test/tests/gc/bug-1245520.js new file mode 100644 index 0000000000..1f59c3dbab --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1245520.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var t = {}; +oomTest(() => serialize(t)); diff --git a/js/src/jit-test/tests/gc/bug-1246593.js b/js/src/jit-test/tests/gc/bug-1246593.js new file mode 100644 index 0000000000..4d90bbb24b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1246593.js @@ -0,0 +1,4 @@ +length = 10000; +array = Array(); +for (i = length;i > -100000; i--) + array[i] = {}; diff --git a/js/src/jit-test/tests/gc/bug-1252329.js b/js/src/jit-test/tests/gc/bug-1252329.js new file mode 100644 index 0000000000..8f5b1ce282 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1252329.js @@ -0,0 +1,32 @@ +// |jit-test| allow-oom; skip-if: helperThreadCount() == 0 || !('oomAfterAllocations' in this) + +var lfcode = new Array(); +lfcode.push("5"); +lfcode.push(` +gczeal(8, 2); +try { + [new String, y] +} catch (e) {} +oomAfterAllocations(50); +try { + (5).replace(r, () => {}); +} catch (x) {} +`); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file) +} +function loadFile(lfVarx) { + if (lfVarx.substr(-3) != ".js" && lfVarx.length != 1) { + switch (lfRunTypeId) { + case 5: + var lfGlobal = newGlobal(); + for (lfLocal in this) {} + lfGlobal.offThreadCompileToStencil(lfVarx); + var stencil = lfGlobal.finishOffThreadStencil(); + lfGlobal.evalStencil(stencil); + } + } else if (!isNaN(lfVarx)) { + lfRunTypeId = parseInt(lfVarx); + } +} diff --git a/js/src/jit-test/tests/gc/bug-1253124.js b/js/src/jit-test/tests/gc/bug-1253124.js new file mode 100644 index 0000000000..6949605b00 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1253124.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('oomTest' in this) + +for (let i = 0; i < 10; i++) + toPrimitive = Date.prototype[Symbol.toPrimitive]; +assertThrowsInstanceOf(() => 0); +obj = {}; +oomTest(() => assertThrowsInstanceOf(() => toPrimitive.call(obj, "boolean"))); +function assertThrowsInstanceOf(f) { + f(); +} diff --git a/js/src/jit-test/tests/gc/bug-1254108.js b/js/src/jit-test/tests/gc/bug-1254108.js new file mode 100644 index 0000000000..bf18e798ae --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1254108.js @@ -0,0 +1,5 @@ +|jit-test| error: Error +function testChangeParam(key) { + gcparam(key, 0x22222222); +} +testChangeParam("lowFrequencyHeapGrowth"); diff --git a/js/src/jit-test/tests/gc/bug-1258407.js b/js/src/jit-test/tests/gc/bug-1258407.js new file mode 100644 index 0000000000..9338c981f2 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1258407.js @@ -0,0 +1,10 @@ +|jit-test| error: Error +gcparam("lowFrequencyHeapGrowth", 0.1); +gcparam("lowFrequencyHeapGrowth", 2); +let ok = false; +try { + gcparam("lowFrequencyHeapGrowth", 0x22222222); +} catch (e) { + ok = true; +} +assertEq(ok, true); diff --git a/js/src/jit-test/tests/gc/bug-1259306.js b/js/src/jit-test/tests/gc/bug-1259306.js new file mode 100644 index 0000000000..fba5f71b6a --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1259306.js @@ -0,0 +1,19 @@ +// |jit-test| skip-if: !('oomTest' in this) + +let runCount = 0; +oomTest(() => { + if (runCount < 5) { + let lfGlobal = newGlobal(); + var lfVarx = ` + gczeal(8, 1); + try { + (5).replace(r, () => {}); + } catch (x) {} + gczeal(0); + `; + lfGlobal.offThreadCompileToStencil(lfVarx); + var stencil = lfGlobal.finishOffThreadStencil(); + lfGlobal.evalStencil(stencil); + runCount++; + } +}); diff --git a/js/src/jit-test/tests/gc/bug-1259490.js b/js/src/jit-test/tests/gc/bug-1259490.js new file mode 100644 index 0000000000..d349bf27d4 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1259490.js @@ -0,0 +1,13 @@ +try { eval("3 ** 4") } catch (e) { + if (!(e instanceof SyntaxError)) + throw e; + quit(); +} +eval(` + +gczeal(8); +for (var k = 0; k < 99; ++k) { + String(-(0 ** (Object | 0 * Object))) +} + +`) diff --git a/js/src/jit-test/tests/gc/bug-1261329.js b/js/src/jit-test/tests/gc/bug-1261329.js new file mode 100644 index 0000000000..afa1db2c3d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1261329.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this) + +print = function() {} +function k() { return dissrc(print); } +function j() { return k(); } +function h() { return j(); } +function f() { return h(); } +f(); +oomTest(() => f()) diff --git a/js/src/jit-test/tests/gc/bug-1263862.js b/js/src/jit-test/tests/gc/bug-1263862.js new file mode 100644 index 0000000000..955805047a --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1263862.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function loadFile(lfVarx) { + oomTest(() => eval(lfVarx)); +} +for (var i = 0; i < 10; ++i) { + loadFile(`"use strict"; const s = () => s;`); +} diff --git a/js/src/jit-test/tests/gc/bug-1263871.js b/js/src/jit-test/tests/gc/bug-1263871.js new file mode 100644 index 0000000000..6680affedf --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1263871.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !('oomTest' in this) + +lfLogBuffer = `this[''] = function() {}`; +loadFile(lfLogBuffer); +loadFile(lfLogBuffer); +function loadFile(lfVarx) { + return oomTest(function() { return parseModule(lfVarx); }); +} diff --git a/js/src/jit-test/tests/gc/bug-1263884.js b/js/src/jit-test/tests/gc/bug-1263884.js new file mode 100644 index 0000000000..949945e0a4 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1263884.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(function() { + eval(` + var argObj = function () { return arguments }() + for (var p in argObj); + delete argObj.callee; + `); +}); diff --git a/js/src/jit-test/tests/gc/bug-1271110.js b/js/src/jit-test/tests/gc/bug-1271110.js new file mode 100644 index 0000000000..12d1617c57 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1271110.js @@ -0,0 +1,38 @@ +// |jit-test| skip-if: !('oomTest' in this) + +gczeal(0); + +var x1 = []; +var x2 = []; +var x3 = []; +var x4 = []; +(function() { + var gns = Object.getOwnPropertyNames(this); + for (var i = 0; i < 49; ++i) { + var gn = gns[i]; + var g = this[gn]; + if (typeof g == "function") { + var hns = Object.getOwnPropertyNames(gn); + for (var j = 0; j < hns.length; ++j) { + x1.push(""); + x1.push(""); + x2.push(""); + x2.push(""); + x3.push(""); + x3.push(""); + x4.push(""); + x4.push(""); + } + } + } +})(); +try { + __proto__ = function(){}; +} catch (e) { + "" + e; +} +startgc(9222); +Function("\ + (function() {})();\ + oomTest(Debugger.Script);\ +")(); diff --git a/js/src/jit-test/tests/gc/bug-1276631.js b/js/src/jit-test/tests/gc/bug-1276631.js new file mode 100644 index 0000000000..f80e7f0210 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1276631.js @@ -0,0 +1,17 @@ +gczeal(15,5); +try { + foobar(); +} catch (e) {} +function newFunc(x) { + new Function(x)(); +}; +loadFile(` + try { gczeal(10, 2)() } catch (e) {} +`); +function loadFile(lfVarx) { + function newFunc(x) { + new Function(x)(); + }; + newFunc(lfVarx); + if (helperThreadCount() && getJitCompilerOptions()["offthread-compilation.enable"]) {} +} diff --git a/js/src/jit-test/tests/gc/bug-1278832.js b/js/src/jit-test/tests/gc/bug-1278832.js new file mode 100644 index 0000000000..aa9e269b3d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1278832.js @@ -0,0 +1,12 @@ +function assertThrowsInstanceOf() {} +gczeal(15) +try { + gczeal(10, 2) +} catch (Atomics) {} +for (define of[__defineSetter__]) { + let nonCallable = [{}] + for (let value of nonCallable) assertThrowsInstanceOf(TypeError) + key = { + [Symbol]() {} + } +} diff --git a/js/src/jit-test/tests/gc/bug-1280588.js b/js/src/jit-test/tests/gc/bug-1280588.js new file mode 100644 index 0000000000..a6b2c4f075 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1280588.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var x = []; +oomTest(() => setGCCallback({ action: "minorGC" })); +oomTest(() => setGCCallback({ action: "majorGC" })); diff --git a/js/src/jit-test/tests/gc/bug-1280889.js b/js/src/jit-test/tests/gc/bug-1280889.js new file mode 100644 index 0000000000..3af1ee3e08 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1280889.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +evalInWorker(` + function f() { + fullcompartmentchecks(f); + } + try { f(); } catch(e) {} +`); diff --git a/js/src/jit-test/tests/gc/bug-1282986.js b/js/src/jit-test/tests/gc/bug-1282986.js new file mode 100644 index 0000000000..934cea5b61 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1282986.js @@ -0,0 +1,16 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var lfLogBuffer = ` +evalInWorker(\` + try { oomAfterAllocations(2); } catch(e) {} + \`); +`; +loadFile(""); +loadFile(lfLogBuffer); +function loadFile(lfVarx) { + oomTest(function() { + let m = parseModule(lfVarx); + moduleLink(m); + moduleEvaluate(m); + }); +} diff --git a/js/src/jit-test/tests/gc/bug-1286244.js b/js/src/jit-test/tests/gc/bug-1286244.js new file mode 100644 index 0000000000..a973192109 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1286244.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !getBuildConfiguration("has-gczeal") || helperThreadCount() === 0 + +// This will fail with --no-threads. +verifyprebarriers(); +var lfGlobal = newGlobal(); +lfGlobal.offThreadCompileToStencil(` + version(185); +`); diff --git a/js/src/jit-test/tests/gc/bug-1287399.js b/js/src/jit-test/tests/gc/bug-1287399.js new file mode 100644 index 0000000000..c7e6b8f44d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1287399.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: typeof gczeal !== 'function' || helperThreadCount() === 0 + +var lfGlobal = newGlobal(); +gczeal(4); +for (lfLocal in this) {} +lfGlobal.offThreadCompileToStencil(` + var desc = { + value: 'bar', + value: false, + }; +`); diff --git a/js/src/jit-test/tests/gc/bug-1287869.js b/js/src/jit-test/tests/gc/bug-1287869.js new file mode 100644 index 0000000000..dc04345ccf --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1287869.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('gczeal' in this) + +gczeal(16); +let a = []; +for (let i = 0; i < 1000; i++) + a.push({x: i}); +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1292564.js b/js/src/jit-test/tests/gc/bug-1292564.js new file mode 100644 index 0000000000..f292e1682c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1292564.js @@ -0,0 +1,9 @@ +// |jit-test| allow-oom; skip-if: !('oomTest' in this) + +oomTest(() => { + let global = newGlobal({sameZoneAs: this}); + Debugger(global).onDebuggerStatement = function (frame) { + frame.eval("f") + } + global.eval("debugger") +}, false); diff --git a/js/src/jit-test/tests/gc/bug-1293127.js b/js/src/jit-test/tests/gc/bug-1293127.js new file mode 100644 index 0000000000..195798bf76 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1293127.js @@ -0,0 +1,11 @@ +// Test that we can create 700 cross compartment wrappers to nursery objects +// without triggering a minor GC. +gczeal(0); +let g = newGlobal({newCompartment: true}); +evalcx("function f(x) { return {x: x}; }", g); +gc(); +let initial = gcparam("gcNumber"); +for (let i = 0; i < 700; i++) + g.f(i); +let final = gcparam("gcNumber"); +assertEq(final, initial); diff --git a/js/src/jit-test/tests/gc/bug-1294241.js b/js/src/jit-test/tests/gc/bug-1294241.js new file mode 100644 index 0000000000..62c1acf62e --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1294241.js @@ -0,0 +1,13 @@ +if (helperThreadCount() == 0) + quit(); + +ignoreUnhandledRejections(); + +gczeal(9); +function rejectionTracker(state) {} +setPromiseRejectionTrackerCallback(rejectionTracker) + lfGlobal = newGlobal(); +offThreadCompileToStencil(`new Promise(()=>rej)`); +var stencil = lfGlobal.finishOffThreadStencil(); +lfGlobal.evalStencil(stencil); +for (lfLocal in this); diff --git a/js/src/jit-test/tests/gc/bug-1298356.js b/js/src/jit-test/tests/gc/bug-1298356.js new file mode 100644 index 0000000000..4c8a213125 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1298356.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +/x/; +oomTest(function(){ + offThreadCompileToStencil(''); +}) diff --git a/js/src/jit-test/tests/gc/bug-1301377.js b/js/src/jit-test/tests/gc/bug-1301377.js new file mode 100644 index 0000000000..2843e264da --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1301377.js @@ -0,0 +1,12 @@ +var lfLogBuffer = ` + gczeal(14); + enableGeckoProfiling(); + gczeal(15,3); + var s = ""; + for (let i = 0; i != 30; i+=2) {} + readGeckoProfilingStack(s, "c0d1c0d1c0d1c0d1c0d1c0d1c0d1c0"); +`; +loadFile(lfLogBuffer); +function loadFile(lfVarx) { + evaluate(lfVarx); +} diff --git a/js/src/jit-test/tests/gc/bug-1301496.js b/js/src/jit-test/tests/gc/bug-1301496.js new file mode 100644 index 0000000000..e3aa0544f6 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1301496.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +gczeal(0); +startgc(1, 'shrinking'); +offThreadCompileToStencil(""); +// Adapted from randomly chosen test: js/src/jit-test/tests/parser/bug-1263355-13.js +gczeal(9); +newGlobal(); diff --git a/js/src/jit-test/tests/gc/bug-1303015.js b/js/src/jit-test/tests/gc/bug-1303015.js new file mode 100644 index 0000000000..d5b5e3a5bd --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1303015.js @@ -0,0 +1,12 @@ +// |jit-test| slow; skip-if: !('oomTest' in this) + +var x = ``.split(); +oomTest(function() { + var lfGlobal = newGlobal({sameZoneAs: this}); + for (lfLocal in this) { + if (!(lfLocal in lfGlobal)) { + lfGlobal[lfLocal] = this[lfLocal]; + } + } +}); + diff --git a/js/src/jit-test/tests/gc/bug-1305220.js b/js/src/jit-test/tests/gc/bug-1305220.js new file mode 100644 index 0000000000..b6dad199a9 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1305220.js @@ -0,0 +1,22 @@ +// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this) + +s = newGlobal(); +evalcx("\ + gczeal(10, 2);\ + k = {\ + [Symbol]() {}\ + };\ +", s); +gczeal(0); +evalcx("\ + var g = newGlobal();\ + b = new Debugger;\ + g.h = function() {\ + g.oomAfterAllocations(1);\ + };\ + g.eval(\"\" + function f() { return g(); });\ + g.eval(\"\" + function g() { return h(); });\ + g.eval(\"(\" + function() {\ + f();\ + } + \")()\");\ +", s); diff --git a/js/src/jit-test/tests/gc/bug-1308048.js b/js/src/jit-test/tests/gc/bug-1308048.js new file mode 100644 index 0000000000..7de26784b4 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1308048.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +m = 'x'; +for (var i = 0; i < 10; i++) + m += m; +offThreadCompileToStencil("", ({elementAttributeName: m})); +var n = newGlobal(); +gczeal(2,1); +var stencil = n.finishOffThreadStencil(); +n.evalStencil(stencil); diff --git a/js/src/jit-test/tests/gc/bug-1310589.js b/js/src/jit-test/tests/gc/bug-1310589.js new file mode 100644 index 0000000000..2907c3c440 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1310589.js @@ -0,0 +1,298 @@ +// |jit-test| skip-if: !('oomTest' in this) + +a = o = s = r = [] +o2 = s2 = r2 = g2 = f2 = m2 = Map +e2 = Set +v2 = b2 = new ArrayBuffer +t2 = new Uint8ClampedArray +minorgc() +x = /x/ +for (var i = 0; i < 4; ++i) { + function f1() {} +} +Object.defineProperty(a, 12, {}).push(1); +toString = (function() { return a.reverse(); }) +oomTest(Date.prototype.toJSON) +function f1000(){} +function f1001(){} +function f1002(){} +function f1003(){} +function f1004(){} +function f1005(){} +function f1006(){} +function f1007(){} +function f1008(){} +function f1009(){} +function f1010(){} +function f1011(){} +function f1012(){} +function f1013(){} +function f1014(){} +function f1015(){} +function f1016(){} +function f1017(){} +function f1018(){} +function f1019(){} +function f1020(){} +function f1021(){} +function f1022(){} +function f1023(){} +function f1024(){} +function f1025(){} +function f1026(){} +function f1027(){} +function f1028(){} +function f1029(){} +function f1030(){} +function f1031(){} +function f1032(){} +function f1033(){} +function f1034(){} +function f1035(){} +function f1036(){} +function f1037(){} +function f1038(){} +function f1039(){} +function f1040(){} +function f1041(){} +function f1042(){} +function f1043(){} +function f1044(){} +function f1045(){} +function f1046(){} +function f1047(){} +function f1048(){} +function f1049(){} +function f1050(){} +function f1051(){} +function f1052(){} +function f1053(){} +function f1054(){} +function f1055(){} +function f1056(){} +function f1057(){} +function f1058(){} +function f1059(){} +function f1060(){} +function f1061(){} +function f1062(){} +function f1063(){} +function f1064(){} +function f1065(){} +function f1066(){} +function f1067(){} +function f1068(){} +function f1069(){} +function f1070(){} +function f1071(){} +function f1072(){} +function f1073(){} +function f1074(){} +function f1075(){} +function f1076(){} +function f1077(){} +function f1078(){} +function f1079(){} +function f1080(){} +function f1081(){} +function f1082(){} +function f1083(){} +function f1084(){} +function f1085(){} +function f1086(){} +function f1087(){} +function f1088(){} +function f1089(){} +function f1090(){} +function f1091(){} +function f1092(){} +function f1093(){} +function f1094(){} +function f1095(){} +function f1096(){} +function f1097(){} +function f1098(){} +function f1099(){} +function f1100(){} +function f1101(){} +function f1102(){} +function f1103(){} +function f1104(){} +function f1105(){} +function f1106(){} +function f1107(){} +function f1108(){} +function f1109(){} +function f1110(){} +function f1111(){} +function f1112(){} +function f1113(){} +function f1114(){} +function f1115(){} +function f1116(){} +function f1117(){} +function f1118(){} +function f1119(){} +function f1120(){} +function f1121(){} +function f1122(){} +function f1123(){} +function f1124(){} +function f1125(){} +function f1126(){} +function f1127(){} +function f1128(){} +function f1129(){} +function f1130(){} +function f1131(){} +function f1132(){} +function f1133(){} +function f1134(){} +function f1135(){} +function f1136(){} +function f1137(){} +function f1138(){} +function f1139(){} +function f1140(){} +function f1141(){} +function f1142(){} +function f1143(){} +function f1144(){} +function f1145(){} +function f1146(){} +function f1147(){} +function f1148(){} +function f1149(){} +function f1150(){} +function f1151(){} +function f1152(){} +function f1153(){} +function f1154(){} +function f1155(){} +function f1156(){} +function f1157(){} +function f1158(){} +function f1159(){} +function f1160(){} +function f1161(){} +function f1162(){} +function f1163(){} +function f1164(){} +function f1165(){} +function f1166(){} +function f1167(){} +function f1168(){} +function f1169(){} +function f1170(){} +function f1171(){} +function f1172(){} +function f1173(){} +function f1174(){} +function f1175(){} +function f1176(){} +function f1177(){} +function f1178(){} +function f1179(){} +function f1180(){} +function f1181(){} +function f1182(){} +function f1183(){} +function f1184(){} +function f1185(){} +function f1186(){} +function f1187(){} +function f1188(){} +function f1189(){} +function f1190(){} +function f1191(){} +function f1192(){} +function f1193(){} +function f1194(){} +function f1195(){} +function f1196(){} +function f1197(){} +function f1198(){} +function f1199(){} +function f1200(){} +function f1201(){} +function f1202(){} +function f1203(){} +function f1204(){} +function f1205(){} +function f1206(){} +function f1207(){} +function f1208(){} +function f1209(){} +function f1210(){} +function f1211(){} +function f1212(){} +function f1213(){} +function f1214(){} +function f1215(){} +function f1216(){} +function f1217(){} +function f1218(){} +function f1219(){} +function f1220(){} +function f1221(){} +function f1222(){} +function f1223(){} +function f1224(){} +function f1225(){} +function f1226(){} +function f1227(){} +function f1228(){} +function f1229(){} +function f1230(){} +function f1231(){} +function f1232(){} +function f1233(){} +function f1234(){} +function f1235(){} +function f1236(){} +function f1237(){} +function f1238(){} +function f1239(){} +function f1240(){} +function f1241(){} +function f1242(){} +function f1243(){} +function f1244(){} +function f1245(){} +function f1246(){} +function f1247(){} +function f1248(){} +function f1249(){} +function f1250(){} +function f1251(){} +function f1252(){} +function f1253(){} +function f1254(){} +function f1255(){} +function f1256(){} +function f1257(){} +function f1258(){} +function f1259(){} +function f1260(){} +function f1261(){} +function f1262(){} +function f1263(){} +function f1264(){} +function f1265(){} +function f1266(){} +function f1267(){} +function f1268(){} +function f1269(){} +function f1270(){} +function f1271(){} +function f1272(){} +function f1273(){} +function f1274(){} +function f1275(){} +function f1276(){} +function f1277(){} +function f1278(){} +function f1279(){} +function f1280(){} +function f1281(){} +function f1282(){} diff --git a/js/src/jit-test/tests/gc/bug-1311060.js b/js/src/jit-test/tests/gc/bug-1311060.js new file mode 100644 index 0000000000..6237a4575d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1311060.js @@ -0,0 +1,2 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +evalInWorker(`schedulezone("s1");`); diff --git a/js/src/jit-test/tests/gc/bug-1313347.js b/js/src/jit-test/tests/gc/bug-1313347.js new file mode 100644 index 0000000000..c5f684f7a6 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1313347.js @@ -0,0 +1,5 @@ +let tenured = {}; +gc(); +for (let i = 0; i < 100000; i++) { + tenured[i/2] = {}; +} diff --git a/js/src/jit-test/tests/gc/bug-1315946.js b/js/src/jit-test/tests/gc/bug-1315946.js new file mode 100644 index 0000000000..a0668d00b5 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1315946.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// Don't run a full oomTest because it takes ages - a few iterations are +// sufficient to trigger the bug. +let i = 0; + +oomTest(Function(` + if (i < 10) { + i++; + gczeal(15,1); + foo; + } +`)); diff --git a/js/src/jit-test/tests/gc/bug-1321597.js b/js/src/jit-test/tests/gc/bug-1321597.js new file mode 100644 index 0000000000..d5d96ddab6 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1321597.js @@ -0,0 +1,6 @@ +gczeal(9,3); +function test(s, okLine) { }; +var dbg = new Debugger; +dbg.onNewGlobalObject = function(global) {}; +x = evalcx(test()); +shortestPaths(["\$4"], { start: this, maxNumPaths: 5 }); diff --git a/js/src/jit-test/tests/gc/bug-1322420.js b/js/src/jit-test/tests/gc/bug-1322420.js new file mode 100644 index 0000000000..97edeb964a --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1322420.js @@ -0,0 +1,8 @@ +"use strict"; +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({newCompartment: true}); +var dbg = new Debugger(); +dbg.addDebuggee(g1); +g1.eval('function f() {}'); +gczeal(9, 1); +dbg.findScripts({}); diff --git a/js/src/jit-test/tests/gc/bug-1322648.js b/js/src/jit-test/tests/gc/bug-1322648.js new file mode 100644 index 0000000000..bb6279f525 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1322648.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +gczeal(0); +print = function(s) {} +startgc(1); +offThreadCompileToStencil(""); +gczeal(10, 3); +for (var count = 0; count < 20; count++) { + print(count); +} diff --git a/js/src/jit-test/tests/gc/bug-1323868.js b/js/src/jit-test/tests/gc/bug-1323868.js new file mode 100644 index 0000000000..1d37a19ba0 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1323868.js @@ -0,0 +1,6 @@ +// |jit-test| allow-oom; skip-if: helperThreadCount() === 0 + +gczeal(0); +startgc(8301); +offThreadCompileToStencil("(({a,b,c}))"); +gcparam("maxBytes", gcparam("gcBytes")); diff --git a/js/src/jit-test/tests/gc/bug-1324512.js b/js/src/jit-test/tests/gc/bug-1324512.js new file mode 100644 index 0000000000..9366b2c277 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1324512.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +evalInWorker(` + if (!('gczeal' in this)) + quit(); + try { + gczeal(2,1); + throw new Error(); + } catch (e) { + assertEq("" + e, "Error"); + } +`); diff --git a/js/src/jit-test/tests/gc/bug-1325551.js b/js/src/jit-test/tests/gc/bug-1325551.js new file mode 100644 index 0000000000..700f61daf8 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1325551.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('oomTest' in this) + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger; +let gw = dbg.addDebuggee(g); +g.eval("function f(){}"); +oomTest(() => { + gw.makeDebuggeeValue(g.f).script.source.sourceMapURL = 'a'; +}); + diff --git a/js/src/jit-test/tests/gc/bug-1328251.js b/js/src/jit-test/tests/gc/bug-1328251.js new file mode 100644 index 0000000000..5e492af8fe --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1328251.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +evalInWorker(` + if (!('gczeal' in this)) + quit(); + gczeal(2); + for (let i = 0; i < 30; i++) { + var a = [1, 2, 3]; + a.indexOf(1); + relazifyFunctions(); } +`); diff --git a/js/src/jit-test/tests/gc/bug-1332773.js b/js/src/jit-test/tests/gc/bug-1332773.js new file mode 100644 index 0000000000..77445bc2eb --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1332773.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +evalInWorker(` +var gTestcases = new Array(); +typeof document != "object" || !document.location.href.match(/jsreftest.html/); +gczeal(4, 10); +f = ([a = class target extends b {}, b] = [void 0]) => {}; +f() +`) diff --git a/js/src/jit-test/tests/gc/bug-1337414.js b/js/src/jit-test/tests/gc/bug-1337414.js new file mode 100644 index 0000000000..9e647a810c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1337414.js @@ -0,0 +1,46 @@ +var lfLogBuffer = ` +gczeal(15,10); +try { + a = [] + gczeal(2, 2)() +} catch (e) {} +a.every(function() {}) +//corefuzz-dcd-endofdata +//corefuzz-dcd-selectmode 5 +`; +lfLogBuffer = lfLogBuffer.split('\n'); +lfPreamble = ` +`; +var lfCodeBuffer = ""; +var lfRunTypeLimit = 7; +var lfOffThreadGlobal = newGlobal(); +try {} catch (lfVare5) {} +var lfAccumulatedCode = lfPreamble; +while (true) { + var line = lfLogBuffer.shift(); + if (line == null) { + break; + } else if (line == "//corefuzz-dcd-endofdata") { + loadFile(lfCodeBuffer); + } else if (line.indexOf("//corefuzz-dcd-selectmode ") === 0) { + loadFile(line); + } else { + lfCodeBuffer += line + "\n"; + } +} +if (lfCodeBuffer) loadFile(lfCodeBuffer); +function loadFile(lfVarx) { + try { + if (lfVarx.indexOf("//corefuzz-dcd-selectmode ") === 0) { + lfRunTypeId = parseInt(lfVarx.split(" ")[1]) % lfRunTypeLimit; + } else { + switch (lfRunTypeId) { + case 5: + evalInWorker(lfAccumulatedCode); + evaluate(lfVarx); + } + } + } catch (lfVare) { + lfAccumulatedCode += "try { evaluate(`\n" + lfVarx + "\n`); } catch(exc) {}\n"; + } +} diff --git a/js/src/jit-test/tests/gc/bug-1338383.js b/js/src/jit-test/tests/gc/bug-1338383.js new file mode 100644 index 0000000000..930566492d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1338383.js @@ -0,0 +1,17 @@ +// |jit-test| error: InternalError + +if (helperThreadCount() === 0) + throw InternalError(); + +var lfOffThreadGlobal = newGlobal(); +enableShellAllocationMetadataBuilder() +lfOffThreadGlobal.offThreadCompileToStencil(` + if ("gczeal" in this) + gczeal(8, 1) + function recurse(x) { + recurse(x + 1); + }; + recurse(0); +`); +var stencil = lfOffThreadGlobal.finishOffThreadStencil(); +lfOffThreadGlobal.evalStencil(stencil); diff --git a/js/src/jit-test/tests/gc/bug-1340010.js b/js/src/jit-test/tests/gc/bug-1340010.js new file mode 100644 index 0000000000..30c3cb08b9 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1340010.js @@ -0,0 +1,22 @@ +// |jit-test| skip-if: helperThreadCount() === 0 || !('deterministicgc' in this) +gczeal(0); + +gc(); +function weighted(wa) { + var a = []; + for (var i = 0; i < 30; ++i) { + for (var j = 0; j < 20; ++j) { + a.push(0); + } + } + return a; +} +var statementMakers = weighted(); +if (typeof oomTest == "function") { + statementMakers = statementMakers.concat([function (d, b) { + return "oomTest(" + makeFunction(d - 1, b) + ")"; + }, ]); +} +deterministicgc(true); +startgc(9469, "shrinking"); +offThreadCompileToStencil(""); diff --git a/js/src/jit-test/tests/gc/bug-1342261.js b/js/src/jit-test/tests/gc/bug-1342261.js new file mode 100644 index 0000000000..bcf4c586ba --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1342261.js @@ -0,0 +1,7 @@ +// With --baseline-eager, create a cross-compartment wrapper IC referring to a +// target in an otherwise-doomed compartment. + +fullcompartmentchecks(true); +newGlobal({ + sameZoneAs: [] +}).z; diff --git a/js/src/jit-test/tests/gc/bug-1354480.js b/js/src/jit-test/tests/gc/bug-1354480.js new file mode 100644 index 0000000000..c80ec01f9f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1354480.js @@ -0,0 +1,10 @@ +// |jit-test| error: TypeError +test = "function f(a) { return a } f`a$b`"; +evalWithCache(test, {}); +dbg = new Debugger(); +gczeal(9, 1); +dbg.findScripts('January 0 0 is invalid'); +function evalWithCache(code, ctx) { + ctx.global = newGlobal(); + evaluate(code, ctx) +} diff --git a/js/src/jit-test/tests/gc/bug-1357022.js b/js/src/jit-test/tests/gc/bug-1357022.js new file mode 100644 index 0000000000..f7665f2d4b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1357022.js @@ -0,0 +1,6 @@ +const root3 = newGlobal({newCompartment: true}); +function test(constructor) { + if (!nukeCCW(root3.load)) {} +} +test(Map); +test(Set); diff --git a/js/src/jit-test/tests/gc/bug-1359252.js b/js/src/jit-test/tests/gc/bug-1359252.js new file mode 100644 index 0000000000..9359ec1a75 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1359252.js @@ -0,0 +1,7 @@ +gczeal(4); +setJitCompilerOption("ion.warmup.trigger", 1); +function h() { + for ([a, b] in { z: 9 }) {} +} +for (var j = 0; j < 10; j++) + h(); diff --git a/js/src/jit-test/tests/gc/bug-1370069.js b/js/src/jit-test/tests/gc/bug-1370069.js new file mode 100644 index 0000000000..7117a22175 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1370069.js @@ -0,0 +1,6 @@ +// |jit-test| error:ReferenceError +try { + eval("}"); +} catch (exc) {} +gczeal(17, 1); +6.900653737167637, (yield); diff --git a/js/src/jit-test/tests/gc/bug-1371908.js b/js/src/jit-test/tests/gc/bug-1371908.js new file mode 100644 index 0000000000..e669f6b63a --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1371908.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +gczeal(0); +offThreadCompileToStencil(""); +startgc(0); +var stencil = finishOffThreadStencil(); +evalStencil(stencil); diff --git a/js/src/jit-test/tests/gc/bug-1374797.js b/js/src/jit-test/tests/gc/bug-1374797.js new file mode 100644 index 0000000000..f22b06e278 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1374797.js @@ -0,0 +1,27 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// Exercise triggering GC of atoms zone while off-thread parsing is happening. + +gczeal(0); + +// Reduce some GC parameters so that we can trigger a GC more easily. +gcparam('lowFrequencyHeapGrowth', 120); +gcparam('highFrequencyLargeHeapGrowth', 120); +gcparam('highFrequencySmallHeapGrowth', 120); +gcparam('allocationThreshold', 1); +gc(); + +// Start an off-thread parse. +offThreadCompileToStencil("print('Finished')"); + +// Allocate lots of atoms, parsing occasionally. +for (let i = 0; i < 10; i++) { + print(i); + for (let j = 0; j < 10000; j++) + Symbol.for(i + 10 * j); + eval(`${i}`); +} + +// Finish the off-thread parse. +var stencil = finishOffThreadStencil(); +evalStencil(stencil); diff --git a/js/src/jit-test/tests/gc/bug-1382431.js b/js/src/jit-test/tests/gc/bug-1382431.js new file mode 100644 index 0000000000..86fb418121 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1382431.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +var fe = "vv"; +for (i = 0; i < 24; i++) fe += fe; +offThreadCompileToStencil(fe, {}); diff --git a/js/src/jit-test/tests/gc/bug-1384047.js b/js/src/jit-test/tests/gc/bug-1384047.js new file mode 100644 index 0000000000..4ec6a5272d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1384047.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('oomTest' in this) + +newGlobal(); +evalcx("oomTest(newGlobal);", newGlobal()); diff --git a/js/src/jit-test/tests/gc/bug-1388701.js b/js/src/jit-test/tests/gc/bug-1388701.js new file mode 100644 index 0000000000..8f0a6292c8 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1388701.js @@ -0,0 +1,18 @@ +load(libdir + "asserts.js"); + +// This is out of range +assertErrorMessage( + () => gcparam('maxNurseryBytes', 0), + Error, + "Parameter value out of range"); + +assertErrorMessage( + () => gcparam('maxNurseryBytes', 5), + Error, + "Parameter value out of range"); + +// this is okay +gcparam('maxNurseryBytes', 1024*1024); +assertEq(gcparam('maxNurseryBytes'), 1024*1024); +gc(); + diff --git a/js/src/jit-test/tests/gc/bug-1390087.js b/js/src/jit-test/tests/gc/bug-1390087.js new file mode 100644 index 0000000000..4d77467ca0 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1390087.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +setGCCallback({ + action: "majorGC" +}); +gcparam("allocationThreshold", 1); +offThreadCompileToStencil(""); +for (let i = 0; i < 40000; i++) + Symbol.for(i); +eval(0); diff --git a/js/src/jit-test/tests/gc/bug-1399889.js b/js/src/jit-test/tests/gc/bug-1399889.js new file mode 100644 index 0000000000..356c682273 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1399889.js @@ -0,0 +1,4 @@ +gczeal(7, 1); +enableShellAllocationMetadataBuilder(); +var testMap = new Map(); +for (var [k, v] of testMap) {} diff --git a/js/src/jit-test/tests/gc/bug-1401141.js b/js/src/jit-test/tests/gc/bug-1401141.js new file mode 100644 index 0000000000..6ed1bea611 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1401141.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('gczeal' in this) || helperThreadCount() === 0 + +gczeal(15,1); +setGCCallback({ + action: "majorGC", +}); +gcslice(3); +var lfGlobal = newGlobal(); +lfGlobal.offThreadCompileToStencil(""); + diff --git a/js/src/jit-test/tests/gc/bug-1411302.js b/js/src/jit-test/tests/gc/bug-1411302.js new file mode 100644 index 0000000000..20c051edd9 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1411302.js @@ -0,0 +1,17 @@ +// |jit-test| skip-if: !('oomTest' in this) + +let lfPreamble = ` + value:{ +`; +try { + evaluate(""); + evalInWorker(""); +} catch (exc) {} +try { + evalInWorker(""); +} catch (exc) {} +try { + oomTest(function() { + eval("function testDeepBail1() {"); + }); +} catch (exc) {} diff --git a/js/src/jit-test/tests/gc/bug-1413914.js b/js/src/jit-test/tests/gc/bug-1413914.js new file mode 100644 index 0000000000..20f90d90b4 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1413914.js @@ -0,0 +1,4 @@ +let a = grayRoot(); +a[0] = {}; +gczeal(18); +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1430752.js b/js/src/jit-test/tests/gc/bug-1430752.js new file mode 100644 index 0000000000..cb4986140f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1430752.js @@ -0,0 +1,2 @@ +gczeal(18); +gcslice(3); diff --git a/js/src/jit-test/tests/gc/bug-1435295.js b/js/src/jit-test/tests/gc/bug-1435295.js new file mode 100644 index 0000000000..01214a6214 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1435295.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: helperThreadCount() === 0 || !('oomTest' in this) + +oomTest(new Function(`function execOffThread(source) { + offThreadCompileModuleToStencil(source); + var stencil = finishOffThreadStencil(); + return instantiateModuleStencil(stencil); +} +b = execOffThread("[1, 2, 3]") +`)); diff --git a/js/src/jit-test/tests/gc/bug-1435321.js b/js/src/jit-test/tests/gc/bug-1435321.js new file mode 100644 index 0000000000..f8c0172d24 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1435321.js @@ -0,0 +1,30 @@ +// Check that corresponding parameters are updated to ensure that invariants are +// preserved when updating various GC parameters. + +gcparam('highFrequencyLargeHeapGrowth', 200); +gcparam('highFrequencySmallHeapGrowth', 400); +assertEq(gcparam('highFrequencyLargeHeapGrowth'), 200); +assertEq(gcparam('highFrequencySmallHeapGrowth'), 400); + +gcparam('highFrequencySmallHeapGrowth', 150); +assertEq(gcparam('highFrequencyLargeHeapGrowth'), 150); +assertEq(gcparam('highFrequencySmallHeapGrowth'), 150); + +gcparam('highFrequencyLargeHeapGrowth', 300); +assertEq(gcparam('highFrequencyLargeHeapGrowth'), 300); +assertEq(gcparam('highFrequencySmallHeapGrowth'), 300); + +// The following parameters are stored in bytes but specified/retrieved in MiB. + +gcparam('smallHeapSizeMax', 200); +gcparam('largeHeapSizeMin', 500); +assertEq(gcparam('smallHeapSizeMax'), 200); +assertEq(gcparam('largeHeapSizeMin'), 500); + +gcparam('largeHeapSizeMin', 100); +assertEq(gcparam('smallHeapSizeMax'), 99); +assertEq(gcparam('largeHeapSizeMin'), 100); + +gcparam('smallHeapSizeMax', 300); +assertEq(gcparam('smallHeapSizeMax'), 300); +assertEq(gcparam('largeHeapSizeMin'), 300); diff --git a/js/src/jit-test/tests/gc/bug-1439284.js b/js/src/jit-test/tests/gc/bug-1439284.js new file mode 100644 index 0000000000..4e6bcd11b0 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1439284.js @@ -0,0 +1,16 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +gcparam('allocationThreshold', 1); +setGCCallback({ + action: "majorGC", +}); +offThreadCompileToStencil(('Boolean.prototype.toString.call(new String())')); +for (let i = 0; i < 10; i++) { + for (let j = 0; j < 10000; j++) Symbol.for(i + 10 * j); +} +try { + var stencil = finishOffThreadStencil(); + evalStencil(stencil); +} catch (e) { + assertEq(e.constructor, TypeError); +} diff --git a/js/src/jit-test/tests/gc/bug-1449887.js b/js/src/jit-test/tests/gc/bug-1449887.js new file mode 100644 index 0000000000..ef7fa45c7f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1449887.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(function() { x, 0, { z: function() {} } }); diff --git a/js/src/jit-test/tests/gc/bug-1456508.js b/js/src/jit-test/tests/gc/bug-1456508.js new file mode 100644 index 0000000000..3a6c5be85a --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1456508.js @@ -0,0 +1,4 @@ +// |jit-test| error: ReferenceError +gczeal(11, 5); +gczeal(22, 9); +grayRoot().map = wm; diff --git a/js/src/jit-test/tests/gc/bug-1456536.js b/js/src/jit-test/tests/gc/bug-1456536.js new file mode 100644 index 0000000000..adfe3f0c9b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1456536.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(new Function(`let a = grayRoot();`)); diff --git a/js/src/jit-test/tests/gc/bug-1459568.js b/js/src/jit-test/tests/gc/bug-1459568.js new file mode 100644 index 0000000000..57affab64f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1459568.js @@ -0,0 +1,7 @@ +gczeal(0); +setMarkStackLimit(1); +gczeal(18, 1); +grayRoot()[0] = "foo"; +grayRoot()[1] = {}; +grayRoot().x = 0; +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1459860.js b/js/src/jit-test/tests/gc/bug-1459860.js new file mode 100644 index 0000000000..d474995d4e --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1459860.js @@ -0,0 +1,8 @@ +// |jit-test| allow-overrecursed; skip-if: helperThreadCount() === 0 +function eval(source) { + offThreadCompileModuleToStencil(source); + let get = (eval("function w(){}") ++); +}; +gczeal(21, 10); +gczeal(11, 8); +eval(""); diff --git a/js/src/jit-test/tests/gc/bug-1461319.js b/js/src/jit-test/tests/gc/bug-1461319.js new file mode 100644 index 0000000000..46f9ad50cd --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1461319.js @@ -0,0 +1,7 @@ +// |jit-test| error: InternalError +gczeal(14); +var g = newGlobal({newCompartment: true}); +g.eval('function f(a) { evaluate("f(" + " - 1);", {newContext: true}); }'); +var dbg = new Debugger(g); +dbg.onEnterFrame = function(frame) {}; +g.f(); diff --git a/js/src/jit-test/tests/gc/bug-1461448.js b/js/src/jit-test/tests/gc/bug-1461448.js new file mode 100644 index 0000000000..b9f4d8dd0c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1461448.js @@ -0,0 +1,40 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +gczeal(0); + +let lfPreamble = ` + var lfOffThreadGlobal = newGlobal({newCompartment: true}); + for (lfLocal in this) + try {} catch(lfVare5) {} +`; +evaluate(lfPreamble); +evaluate(` + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + var gw = dbg.addDebuggee(g); + for (lfLocal in this) + if (!(lfLocal in lfOffThreadGlobal)) + try { + lfOffThreadGlobal[lfLocal] = this[lfLocal]; + } catch(lfVare5) {} + var g = newGlobal({newCompartment: true}); + var gw = dbg.addDebuggee(g); +`); +lfOffThreadGlobal.offThreadCompileToStencil(` + setMarkStackLimit(1); + grayRoot()[0] = "foo"; +`); +var stencil = lfOffThreadGlobal.finishOffThreadStencil(); +lfOffThreadGlobal.evalStencil(stencil); +eval(` + var lfOffThreadGlobal = newGlobal({newCompartment: true}); + try { evaluate(\` + gczeal(18, 1); + grayRoot()[0] = "foo"; + let inst = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + \\\`(module + (memory (export "memory") 1 1) + )\\\` + ))); +\`); } catch(exc) {} +`); diff --git a/js/src/jit-test/tests/gc/bug-1462337.js b/js/src/jit-test/tests/gc/bug-1462337.js new file mode 100644 index 0000000000..84a5392a1f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1462337.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(function() { + grayRoot().x = Object.create((obj[name]++)); +}); +oomTest(function() { + gczeal(9); + gcslice(new.target); +}); diff --git a/js/src/jit-test/tests/gc/bug-1464872.js b/js/src/jit-test/tests/gc/bug-1464872.js new file mode 100644 index 0000000000..adf8c4f8c1 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1464872.js @@ -0,0 +1,16 @@ +gczeal(0); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onEnterFrame = function(frame) {}; + +var g2 = newGlobal({newCompartment: true}); +g2[g] = g; +g2.evaluate("grayRoot()") +g2 = undefined; + +g = undefined; +dbg = undefined; + +gc(); +startgc(100000); diff --git a/js/src/jit-test/tests/gc/bug-1468792.js b/js/src/jit-test/tests/gc/bug-1468792.js new file mode 100644 index 0000000000..9049aca721 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1468792.js @@ -0,0 +1,18 @@ +// |jit-test| error: ReferenceError + +loadFile(` + gczeal(2,9); + evaluate(\` + reportCompare(expect, actual, summary); + \`); +`); +function loadFile(lfVarx) { + try { + evaluate(lfVarx); + } catch (lfVare) {} +} +eval("(function(){({6953421313:0})})")(); +function f() { + x[6953421313] = "a"; +} +f(); diff --git a/js/src/jit-test/tests/gc/bug-1472734.js b/js/src/jit-test/tests/gc/bug-1472734.js new file mode 100644 index 0000000000..f88f3af1c6 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1472734.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0 + +try { + oomTest(function() { + eval(` + function eval(source) { + offThreadCompileModuleToStencil(source); + minorgc(); + } + eval(""); + `); + }); +} catch (exc) {} diff --git a/js/src/jit-test/tests/gc/bug-1478943.js b/js/src/jit-test/tests/gc/bug-1478943.js new file mode 100644 index 0000000000..c736f11ab4 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1478943.js @@ -0,0 +1,3 @@ +gczeal(0); +setMarkStackLimit(1); +startgc(1); diff --git a/js/src/jit-test/tests/gc/bug-1490042.js b/js/src/jit-test/tests/gc/bug-1490042.js new file mode 100644 index 0000000000..b043f25486 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1490042.js @@ -0,0 +1,31 @@ +// |jit-test| --no-ion; --no-baseline; --no-blinterp; skip-if: !('gcstate' in this && 'oomAfterAllocations' in this) + +gczeal(0); + +// Create a bunch of ObjectGroups with TypeNewScript attached. +const count = 1000; +let c = []; +let a = []; +for (let i = 0; i < count; i++) { + c[i] = function() { this.a = 1; this.b = 0; this.c = 2; }; + a[i] = new c[i]; +} + +// Start an incremental GC and run until we're about to sweep objects. +assertEq(gcstate(), "NotActive"); +gczeal(21); +startgc(1); + +// Run incremental slices with simulated OOM set up to provoke OOM when sweeping +// types. +assertEq(gcstate(), "Sweep"); +gczeal(10); +unsetgczeal(20); +while (gcstate() == "Sweep") { + oomAfterAllocations(2); + gcslice(1); + resetOOMFailure(); +} + +// Ensure our type information stays alive. +let x = c.length + a.length; diff --git a/js/src/jit-test/tests/gc/bug-1491326.js b/js/src/jit-test/tests/gc/bug-1491326.js new file mode 100644 index 0000000000..b750177d87 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1491326.js @@ -0,0 +1,9 @@ +// |jit-test| --fuzzing-safe + +if (!('oomTest' in this)) + quit(); + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function() {}"); +oomTest(() => l, (true)); diff --git a/js/src/jit-test/tests/gc/bug-1498177.js b/js/src/jit-test/tests/gc/bug-1498177.js new file mode 100644 index 0000000000..d423d47dcb --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1498177.js @@ -0,0 +1,17 @@ + +let a, b; +for (i=0; i < 300000; i++) { + let c = { a: a, b: b }; + a = b; + b = c; +} + +gc(); + +// GCRuntime::setLargeHeapSizeMinBytes will change the low value to be one +// byte lower than the high value (if necessary). But this blew up later +// when the values were mistakingly cast to float then compared, rather than +// kept as size_t. +gcparam('largeHeapSizeMin', 99); + + diff --git a/js/src/jit-test/tests/gc/bug-1505622.js b/js/src/jit-test/tests/gc/bug-1505622.js new file mode 100644 index 0000000000..3f6f83c076 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1505622.js @@ -0,0 +1,54 @@ +// Test that we don't repeatedly trigger last-ditch GCs. + +// Turn of any zeal which will disrupt GC number checks. +gczeal(0); + +function allocUntilFail() { + gc(null, 'shrinking'); + + const initialSize = gcparam("gcBytes"); + const initialMaxSize = gcparam("maxBytes"); + const initGCNumber = gcparam("majorGCNumber"); + + // Set a small heap limit. + gcparam("maxBytes", initialSize + 16 * 1024); + + let error; + try { + let a = []; + while (true) { + a.push(Symbol()); // Symbols are tenured. + } + } catch(err) { + error = err; + } + + const finalGCNumber = gcparam("majorGCNumber"); + + // Resetore heap limit. + gcparam("maxBytes", initialMaxSize); + + gc(); + assertEq(error, "out of memory"); + return finalGCNumber - initGCNumber; +} + +// Set the time limit for skipping last ditch GCs to 5 seconds. +gcparam("minLastDitchGCPeriod", 5); +assertEq(gcparam("minLastDitchGCPeriod"), 5); + +// Allocate up to the heap limit. This triggers a last ditch GC. +let gcCount = allocUntilFail(); +assertEq(gcCount, 1) + +// Allocate up to the limit again. The second time we fail without +// triggering a GC. +gcCount = allocUntilFail(); +assertEq(gcCount, 0) + +// Wait for time limit to expire. +sleep(6); + +// Check we trigger a GC again. +gcCount = allocUntilFail(); +assertEq(gcCount, 1) diff --git a/js/src/jit-test/tests/gc/bug-1513991.js b/js/src/jit-test/tests/gc/bug-1513991.js new file mode 100644 index 0000000000..c694b04b39 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1513991.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +evalInWorker(` +var sym4 = Symbol.match; +function test(makeNonArray) {} +function basicSweeping() {} +var wm1 = new WeakMap(); +wm1.set(basicSweeping, sym4); +startgc(100000, 'shrinking'); +`); diff --git a/js/src/jit-test/tests/gc/bug-1514927.js b/js/src/jit-test/tests/gc/bug-1514927.js new file mode 100644 index 0000000000..8f2f1ef52b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1514927.js @@ -0,0 +1,6 @@ +gczeal(0); +var x = newGlobal(); +x.evaluate("grayRoot()"); +x = 0; +setMarkStackLimit(4); +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1515993.js b/js/src/jit-test/tests/gc/bug-1515993.js new file mode 100644 index 0000000000..8b87000918 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1515993.js @@ -0,0 +1,15 @@ +ignoreUnhandledRejections(); + +function checkGetOffsetsCoverage() { + var g = newGlobal({newCompartment: true}); + var dbg = Debugger(g); + var topLevel; + dbg.onNewScript = function(s) { + topLevel = s; + }; + g.eval(`import(() => 1)`); + topLevel.getChildScripts(); +} +checkGetOffsetsCoverage(); +gczeal(14, 10); +Object.defineProperty(this, "fuzzutils", {}); diff --git a/js/src/jit-test/tests/gc/bug-1517158.js b/js/src/jit-test/tests/gc/bug-1517158.js new file mode 100644 index 0000000000..6ffd8ea40a --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1517158.js @@ -0,0 +1,21 @@ +gczeal(0); + +(function() { + var g = newGlobal({newCompartment: true}); + g.debuggeeGlobal = this; + g.eval("(" + function() { + dbg = new Debugger(debuggeeGlobal); + dbg.onExceptionUnwind = function(frame, exc) { + var s = '!'; + for (var f = frame; f; f = f.older) + if (f.type === "call") + s += f.callee.name; + }; + } + ")();"); + try { + h(); + } catch (e) {} + g.dbg.enabled = false; +})(); +// jsfunfuzz-generated +startgc(114496726); diff --git a/js/src/jit-test/tests/gc/bug-1520778.js b/js/src/jit-test/tests/gc/bug-1520778.js new file mode 100644 index 0000000000..df72248983 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1520778.js @@ -0,0 +1,18 @@ +// |jit-test| error: ReferenceError +gczeal(0); +setMarkStackLimit(1); +var g = newGlobal({ + newCompartment: true +}); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +dbg.onDebuggerStatement = function(frame) { + frame.environment.parent.getVariable('y') +}; +g.eval(` + let y = 1; + g = function () { debugger; }; + g(); +`); +gczeal(9, 10); +f4(); diff --git a/js/src/jit-test/tests/gc/bug-1530643.js b/js/src/jit-test/tests/gc/bug-1530643.js new file mode 100644 index 0000000000..c85e6267c6 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1530643.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomAtAllocation' in this); error: Error + +const THREAD_TYPE_WORKER = 10; + +// OOM testing of worker threads is disallowed because it's not thread safe. +oomAtAllocation(11, THREAD_TYPE_WORKER); diff --git a/js/src/jit-test/tests/gc/bug-1531018.js b/js/src/jit-test/tests/gc/bug-1531018.js new file mode 100644 index 0000000000..efca854197 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1531018.js @@ -0,0 +1,3 @@ +gczeal(14,1); +const one = BigInt(1); +new Map([[one, 42]]).has(one); diff --git a/js/src/jit-test/tests/gc/bug-1531626.js b/js/src/jit-test/tests/gc/bug-1531626.js new file mode 100644 index 0000000000..bf003e96cc --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1531626.js @@ -0,0 +1,61 @@ +// Test that setting the nursery size works as expected. +// +// It's an error to set the minimum size greater than the maximum +// size. Parameter values are rounded to the nearest legal nursery +// size. + +load(libdir + "asserts.js"); + +const chunkSizeKB = gcparam('chunkBytes') / 1024; +const pageSizeKB = gcparam('systemPageSizeKB'); + +const testSizesKB = [128, 129, 255, 256, 516, 1023, 1024, 3*1024, 4*1024+1, 16*1024]; + +// Valid maximum sizes must be >= 1MB. +const testMaxSizesKB = testSizesKB.filter(x => x >= 1024); + +for (let max of testMaxSizesKB) { + // Don't test minimums greater than the maximum. + for (let min of testSizesKB.filter(x => x <= max)) { + setMinMax(min, max); + } +} + +// The above loops raised the nursery size. Now reduce it to ensure that +// forcibly-reducing it works correctly. +setMinMax(256, 1024); + +// Try invalid configurations. +const badSizesKB = [ 0, 1, 129 * 1024]; +function assertParamOutOfRange(f) { + assertErrorMessage(f, Object, "Parameter value out of range"); +} +for (let size of badSizesKB) { + assertParamOutOfRange(() => gcparam('minNurseryBytes', size * 1024)); + assertParamOutOfRange(() => gcparam('maxNurseryBytes', size * 1024)); +} + +function setMinMax(min, max) { + gcparam('minNurseryBytes', min * 1024); + gcparam('maxNurseryBytes', max * 1024); + assertEq(gcparam('minNurseryBytes'), nearestLegalSize(min) * 1024); + assertEq(gcparam('maxNurseryBytes'), nearestLegalSize(max) * 1024); + allocateSomeThings(); + gc(); +} + +function allocateSomeThings() { + for (let i = 0; i < 1000; i++) { + let obj = { an: 'object', with: 'fields' }; + } +} + +function nearestLegalSize(sizeKB) { + let step = sizeKB >= chunkSizeKB ? chunkSizeKB : pageSizeKB; + return round(sizeKB, step); +} + +function round(x, y) { + x += y / 2; + return x - (x % y); +} diff --git a/js/src/jit-test/tests/gc/bug-1532376.js b/js/src/jit-test/tests/gc/bug-1532376.js new file mode 100644 index 0000000000..c523ba06b8 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1532376.js @@ -0,0 +1,10 @@ +"use strict"; +function __f_276() { + this.getNameReallyHard = () => eval("eval('(() => this.name)()')") +} +for (var __v_1377 = 0; __v_1377 < 10000; __v_1377++) { + var __v_1378 = new __f_276(); + try { + __v_1376[__getRandomProperty()]; + } catch (e) {} +__v_1378.getNameReallyHard()} diff --git a/js/src/jit-test/tests/gc/bug-1540670.js b/js/src/jit-test/tests/gc/bug-1540670.js new file mode 100644 index 0000000000..4b271a4fee --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1540670.js @@ -0,0 +1,17 @@ +// Adapted from a fuzz test, the origianl test was: +// +// gcparam('minNurseryBytes', 0); +// gczeal(4); +// +// And would trick the GC into a state where the nursery had been setup but +// thought that it was disabled. + +load(libdir + "asserts.js"); + +assertErrorMessage( + () => gcparam('minNurseryBytes', 0), + Error, + "Parameter value out of range"); + +gczeal(4); + diff --git a/js/src/jit-test/tests/gc/bug-1542279.js b/js/src/jit-test/tests/gc/bug-1542279.js new file mode 100644 index 0000000000..0efdc32ce2 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1542279.js @@ -0,0 +1,13 @@ + +load(libdir + "asserts.js"); + +assertErrorMessage( + () => gcparam('maxNurseryBytes', 2 ** 32 - 1), + Error, + "Parameter value out of range"); +gc() + +gcparam('minNurseryBytes', 32*1024); +gcparam('maxNurseryBytes', 64*1024); +gc() + diff --git a/js/src/jit-test/tests/gc/bug-1542982.js b/js/src/jit-test/tests/gc/bug-1542982.js new file mode 100644 index 0000000000..feeb8522c2 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1542982.js @@ -0,0 +1,20 @@ + +load(libdir + "asserts.js"); + +assertErrorMessage( + () => gcparam('minNurseryBytes', 0), + Error, + "Parameter value out of range"); + +assertErrorMessage( + () => gcparam('maxNurseryBytes', 256*1024*1024), + Error, + "Parameter value out of range"); + +// This is both bigger than the maximum and out of range. but there's no way +// to test out of range without testing bigger than the maximum. +assertErrorMessage( + () => gcparam('minNurseryBytes', 256*1024*1024), + Error, + "Parameter value out of range"); + diff --git a/js/src/jit-test/tests/gc/bug-1543014.js b/js/src/jit-test/tests/gc/bug-1543014.js new file mode 100644 index 0000000000..9f91ad3526 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1543014.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +gczeal(0); +evalInWorker(` + var sym4 = Symbol.match; + function basicSweeping() {}; + var wm1 = new WeakMap(); + wm1.set(basicSweeping, sym4); + startgc(100000, 'shrinking'); +`); +gczeal(2); +var d1 = newGlobal({}); diff --git a/js/src/jit-test/tests/gc/bug-1543589.js b/js/src/jit-test/tests/gc/bug-1543589.js new file mode 100644 index 0000000000..c8c8d6da14 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1543589.js @@ -0,0 +1,16 @@ +// |jit-test| skip-if: getBuildConfiguration("arm64-simulator") === true +// This test times out in ARM64 simulator builds. + +gczeal(0); +gcparam('maxNurseryBytes', 16 * 1024 * 1024); +gcparam('minNurseryBytes', 16 * 1024 * 1024); + +let a = []; +for (var i = 0; i < 20000; i++) { + a.push(import("nonexistent.js")); + Symbol(); +} + +for (let p of a) { + p.catch(() => {}); +} diff --git a/js/src/jit-test/tests/gc/bug-1556155.js b/js/src/jit-test/tests/gc/bug-1556155.js new file mode 100644 index 0000000000..3c0dd11251 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1556155.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) +a = []; +minorgc(); +Object.defineProperty(a, 12, {}).push(1); +toString = (function() { return a.reverse(); }); +oomTest(Date.prototype.toJSON); +oomTest(Date.prototype.toJSON); diff --git a/js/src/jit-test/tests/gc/bug-1557928.js b/js/src/jit-test/tests/gc/bug-1557928.js new file mode 100644 index 0000000000..7746d353fb --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1557928.js @@ -0,0 +1,19 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +lfOffThreadGlobal = g; +lfOffThreadGlobal.offThreadCompileToStencil(` + grayRoot()[0] = "foo"; + `); +var stencil = lfOffThreadGlobal.finishOffThreadStencil(); +lfOffThreadGlobal.evalStencil(stencil); +var g = newGlobal({newCompartment: true}); +var gw = dbg.addDebuggee(g); +lfOffThreadGlobal = null; +gc(); +schedulezone(this); +schedulezone('atoms'); +gc('zone'); + diff --git a/js/src/jit-test/tests/gc/bug-1565272.js b/js/src/jit-test/tests/gc/bug-1565272.js new file mode 100644 index 0000000000..9d491c9f59 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1565272.js @@ -0,0 +1,20 @@ +// |jit-test| --fuzzing-safe; --ion-offthread-compile=off; --ion-warmup-threshold=10; skip-if: (getBuildConfiguration("android") && getBuildConfiguration("debug") && getBuildConfiguration("arm64")) + +// Test that Nursery::disable() waits for poisoning to finish before +// discarding and re-poisoning its chunks. + +for(var i = 0; i < 100; i++) { + try { + evalInWorker(` + function testOneSize(current_size) { + var eval_string = 'obj = {'; + for (var current = 0; current <= current_size; ++current) + eval_string += 'k' + current + ':' + current + ',' + } + testOneSize(1023); + testOneSize(1024); + gczeal(4); + `); + } catch (exc) {} +} + diff --git a/js/src/jit-test/tests/gc/bug-1568119.js b/js/src/jit-test/tests/gc/bug-1568119.js new file mode 100644 index 0000000000..1aed85c325 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1568119.js @@ -0,0 +1,21 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function allocateSomeStuff() { + return {a: "a fish", b: [1, 2, 3]}; +} + +oomTest(() => { + // Run a minor GC with a small nursery. + gcparam('minNurseryBytes', 256 * 1024); + gcparam('maxNurseryBytes', 256 * 1024); + allocateSomeStuff(); + minorgc(); + + // Run a minor GC with a larger nursery to get it to attempt to grow and + // fail the allocation there. + gcparam('maxNurseryBytes', 1024 * 1024); + gcparam('minNurseryBytes', 1024 * 1024); + allocateSomeStuff(); + minorgc(); +}); + diff --git a/js/src/jit-test/tests/gc/bug-1568740.js b/js/src/jit-test/tests/gc/bug-1568740.js new file mode 100644 index 0000000000..6cc003cb94 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1568740.js @@ -0,0 +1,20 @@ +gczeal(0); + +function setAndTest(param, value) { + gcparam(param, value); + assertEq(gcparam(param), value); +} + + +// Set a large nursery size. +setAndTest("maxNurseryBytes", 1024*1024); +setAndTest("minNurseryBytes", 1024*1024); +minorgc(); +assertEq(gcparam("nurseryBytes"), 1024*1024); + +// Force it to shrink by more then one half. +setAndTest("minNurseryBytes", 64*1024); +setAndTest("maxNurseryBytes", 64*1024); +minorgc(); +assertEq(gcparam("nurseryBytes"), 64*1024); + diff --git a/js/src/jit-test/tests/gc/bug-1569840.js b/js/src/jit-test/tests/gc/bug-1569840.js new file mode 100644 index 0000000000..70d28add73 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1569840.js @@ -0,0 +1,9 @@ + +gczeal(0); + +gcparam("maxNurseryBytes", 1024*1024); +gcparam("minNurseryBytes", 1024*1024); +var obj = { foo: 'bar', baz: [1, 2, 3]}; +minorgc(); +assertEq(gcparam("nurseryBytes"), 1024*1024); + diff --git a/js/src/jit-test/tests/gc/bug-1571439.js b/js/src/jit-test/tests/gc/bug-1571439.js new file mode 100644 index 0000000000..ebaa8e80d2 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1571439.js @@ -0,0 +1,24 @@ +// |jit-test| --ion-offthread-compile=off; --blinterp-warmup-threshold=1; error:TypeError + +gcparam("maxBytes", 1024*1024); +function complex(aReal, aImag) { + this.r35 = aReal; + gczeal(4, 10); + this.square = function() { + return new complex(this.r35 * this.r35 - this.i14 * this.i14, 2 * this.r35 * this.i14); + } +} +function mandelbrotValueOO(aC, aIterMax) { + let Z90 = new complex(0.0, 0.0); + Z90 = Z90.square().add(aC); +} +const width = 60; +const height = 60; +const max_iters = 50; +for (let img_x = 0; img_x < width; img_x++) { + for (let img_y = 0; img_y < height; img_y++) { + let C57 = new complex(-2 + (img_x / width) * 3, -1.5 + (img_y / height) * 3); + var res = mandelbrotValueOO(C57, max_iters); + } +} + diff --git a/js/src/jit-test/tests/gc/bug-1573458.js b/js/src/jit-test/tests/gc/bug-1573458.js new file mode 100644 index 0000000000..f33b57eac5 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1573458.js @@ -0,0 +1,4 @@ +gczeal(0); +setGCCallback({action: "enterNullRealm"}); +gczeal(2, 1); +Symbol(); diff --git a/js/src/jit-test/tests/gc/bug-1574877.js b/js/src/jit-test/tests/gc/bug-1574877.js new file mode 100644 index 0000000000..e53746bcb0 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1574877.js @@ -0,0 +1,17 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function parseModule(source) { + offThreadCompileModuleToStencil(source); + var stencil = finishOffThreadStencil(); + return instantiateModuleStencil(stencil); +} +function loadFile(lfVarx) { + oomTest(function() { + parseModule(lfVarx); + }); +} +loadFile(` + expect = new class prototype extends Object { + a43 = function () {} + } +`); diff --git a/js/src/jit-test/tests/gc/bug-1578462.js b/js/src/jit-test/tests/gc/bug-1578462.js new file mode 100644 index 0000000000..da3644511a --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1578462.js @@ -0,0 +1,59 @@ +// |jit-test| skip-if: !hasFunction["gczeal"] + +// Check that incoming CCW edges are marked gray in a zone GC if the +// source is gray. + +// Set up a new compartment with a gray object wrapper to this +// compartment. +function createOtherCompartment() { + let t = {}; + addMarkObservers([t]); + let g = newGlobal({newCompartment: true}); + g.t = t; + g.eval(`grayRoot().push(t);`); + g.t = null; + t = null; + return g; +} + +function startGCMarking() { + startgc(1); + while (gcstate() === "Prepare") { + gcslice(1); + } +} + +gczeal(0); + +let g = createOtherCompartment(); + +// The target should be gray in a full GC... +gc(); +assertEq(getMarks()[0], "gray"); + +// and subsequently gray in a zone GC of only this compartment. +gc(this); +assertEq(getMarks()[0], "gray"); + +// If a barrier marks the gray wrapper black after the start of the +// GC, the target ends up black. +schedulezone(this); +startGCMarking() +assertEq(getMarks()[0], "unmarked"); +g.eval(`grayRoot()`); // Barrier marks gray roots black. +assertEq(getMarks()[0], "black"); +finishgc(); + +// A full collection resets the wrapper to gray. +gc(); +assertEq(getMarks()[0], "gray"); + +// If a barrier marks the gray wrapper black after the target has +// already been marked gray, the target ends up black. +gczeal(25); // Yield during gray marking. +schedulezone(this); +startGCMarking(); +assertEq(getMarks()[0], "gray"); +g.eval(`grayRoot()`); // Barrier marks gray roots black. +assertEq(getMarks()[0], "black"); +finishgc(); diff --git a/js/src/jit-test/tests/gc/bug-1579025.js b/js/src/jit-test/tests/gc/bug-1579025.js new file mode 100644 index 0000000000..c11e7fdf1e --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1579025.js @@ -0,0 +1,58 @@ +// Test that a zone GC collects the selected zones. + +function waitForState(state) { + while (gcstate() !== state && gcstate() !== "NotActive") { + gcslice(100); + } +} + +gczeal(0); +gc(); + +let z1 = this; +let z2 = newGlobal({newCompartment: true}); + +// Initially nothing is being collected. + +assertEq(gcstate(), "NotActive"); +assertEq(gcstate(z1), "NoGC"); +assertEq(gcstate(z2), "NoGC"); + +// No zones selected => full GC. + +startgc(1); + +// It's non-deterministic whether we see the prepare state or not. +waitForState("Mark"); + +assertEq(gcstate(), "Mark"); +assertEq(gcstate(z1), "MarkBlackOnly"); +assertEq(gcstate(z2), "MarkBlackOnly"); +finishgc(); + +// Use of schedulezone() => zone GC. + +schedulezone(z1); +startgc(1); +waitForState("Mark"); +assertEq(gcstate(), "Mark"); +assertEq(gcstate(z1), "MarkBlackOnly"); +assertEq(gcstate(z2), "NoGC"); +finishgc(); + +schedulezone(z2); +startgc(1); +waitForState("Mark"); +assertEq(gcstate(), "Mark"); +assertEq(gcstate(z1), "NoGC"); +assertEq(gcstate(z2), "MarkBlackOnly"); +finishgc(); + +schedulezone(z1); +schedulezone(z2); +startgc(1); +waitForState("Mark"); +assertEq(gcstate(), "Mark"); +assertEq(gcstate(z1), "MarkBlackOnly"); +assertEq(gcstate(z2), "MarkBlackOnly"); +finishgc(); diff --git a/js/src/jit-test/tests/gc/bug-1585159.js b/js/src/jit-test/tests/gc/bug-1585159.js new file mode 100644 index 0000000000..077dee8832 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1585159.js @@ -0,0 +1,11 @@ + +// Set a nursery size larger than the current nursery size. +gcparam("minNurseryBytes", 1024 * 1024); +gcparam("maxBytes", gcparam("gcBytes") + 4096); + +// Allocate something in the nursery. +let obj = {'foo': 38, 'bar': "A string"}; + +// Trigger a last-ditch GC. +print(gc(0, "last-ditch")); + diff --git a/js/src/jit-test/tests/gc/bug-1590176.js b/js/src/jit-test/tests/gc/bug-1590176.js new file mode 100644 index 0000000000..db446d56ae --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1590176.js @@ -0,0 +1,13 @@ +// Create function clones in a separate Zone so that the GC can relazify them. +let g = newGlobal({newCompartment: true}); +g.evaluate(` + function factory() { + return function() { }; + } +`); + +// Delazify, Relazify, Delazify +g.factory()(); +finishgc(); +startgc(0, 'shrinking'); +g.factory()(); diff --git a/js/src/jit-test/tests/gc/bug-1590904.js b/js/src/jit-test/tests/gc/bug-1590904.js new file mode 100644 index 0000000000..4bfad2c9d4 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1590904.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !getBuildConfiguration("has-gczeal") +gczeal(0); +gczeal(20); +startgc(1); +gczeal(10); +while (gcstate() == "Sweep") {} diff --git a/js/src/jit-test/tests/gc/bug-1592487.js b/js/src/jit-test/tests/gc/bug-1592487.js new file mode 100644 index 0000000000..6f3343836f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1592487.js @@ -0,0 +1,28 @@ +try {} catch (e) {} +try {} catch (e) {} +try { + (function() { + (function() {}); + }) +} catch (e) {} +try { + t; +} catch (e) {} +try {} catch (e) {} +try { + try { + setMarkStackLimit(1); + } catch (e) {} +} catch (e) {} +try { + (function() { + ""(function() {}); + }) +} catch (e) {} +try { + for (t of Number) { + (function() { + (function() {}); + }) + } +} catch (e) {} diff --git a/js/src/jit-test/tests/gc/bug-1593975.js b/js/src/jit-test/tests/gc/bug-1593975.js new file mode 100644 index 0000000000..69ebcafb94 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1593975.js @@ -0,0 +1,21 @@ +// |jit-test| error: ReferenceError +function runtest(func) { + func(); +} +const g1 = newGlobal({ + newCompartment: true +}); +function transplantMarking() { + const vals = {}; + vals.map = new WeakMap(); + enqueueMark(vals.map); + enqueueMark("yield"); + enqueueMark("enter-weak-marking-mode"); +} +if (this.enqueueMark) { + enqueueMark("enter-weak-marking-mode"); + runtest(transplantMarking); + egc = 60; + gcslice(egc * 100); +} +x(); diff --git a/js/src/jit-test/tests/gc/bug-1597970.js b/js/src/jit-test/tests/gc/bug-1597970.js new file mode 100644 index 0000000000..5b384a399f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1597970.js @@ -0,0 +1,5 @@ +enableShellAllocationMetadataBuilder(); +evaluate(` + gczeal(9,3); + new FinalizationRegistry(function() {}); +`); diff --git a/js/src/jit-test/tests/gc/bug-1600238.js b/js/src/jit-test/tests/gc/bug-1600238.js new file mode 100644 index 0000000000..6b6aeb85ac --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1600238.js @@ -0,0 +1,21 @@ +gczeal(0); +newGlobal(); +nukeAllCCWs(); +function f() { + global = newGlobal({ + newCompartment: true + }); + try { + return global.eval("new FinalizationRegistry(function(){})"); + } catch (e) { + if (e instanceof TypeError && e.message.includes('dead')) { + // Creating a new CCW to the global fails with + // --more-compartments option. + quit(); + } + throw e; + } +} +r = f(); +r.register({}, {}, {}); +startgc(); diff --git a/js/src/jit-test/tests/gc/bug-1602741.js b/js/src/jit-test/tests/gc/bug-1602741.js new file mode 100644 index 0000000000..5f1cc7eca8 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1602741.js @@ -0,0 +1,24 @@ +// Test that drainJobQueue() drains all jobs, including those queued +// by FinalizationRegistry callbacks. + +let finalizeRan = false; +let promiseRan = false; + +let fr = new FinalizationRegistry(() => { + finalizeRan = true; + Promise.resolve().then(() => { + promiseRan = true; + }); +}); + +fr.register({}, {}); + +gc(); + +assertEq(finalizeRan, false); +assertEq(promiseRan, false); + +drainJobQueue(); + +assertEq(finalizeRan, true); +assertEq(promiseRan, true); diff --git a/js/src/jit-test/tests/gc/bug-1603330.js b/js/src/jit-test/tests/gc/bug-1603330.js new file mode 100644 index 0000000000..888ae40a07 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1603330.js @@ -0,0 +1,16 @@ +// Allocate the object in the function to prevent marked as a singleton so the +// object won't be kept alive by IC stub. +function allocObj() { return {}; } + +let wr; +{ + let obj = allocObj(); + wr = new WeakRef(obj); +} + +assertEq(wr.deref() !== undefined, true); + +clearKeptObjects(); +gc(); + +assertEq(wr.deref(), undefined); diff --git a/js/src/jit-test/tests/gc/bug-1603917.js b/js/src/jit-test/tests/gc/bug-1603917.js new file mode 100644 index 0000000000..c1b58f9a28 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1603917.js @@ -0,0 +1,2 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +evalInWorker("new WeakRef({});"); diff --git a/js/src/jit-test/tests/gc/bug-1605348.js b/js/src/jit-test/tests/gc/bug-1605348.js new file mode 100644 index 0000000000..f55b13af32 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1605348.js @@ -0,0 +1,5 @@ +fullcompartmentchecks(true); +var g37 = newGlobal({ + newCompartment: true +}); +new g37.WeakRef({}); diff --git a/js/src/jit-test/tests/gc/bug-1605633.js b/js/src/jit-test/tests/gc/bug-1605633.js new file mode 100644 index 0000000000..87f5668886 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1605633.js @@ -0,0 +1,12 @@ +newGlobal(); +nukeAllCCWs(); +var g28 = newGlobal({ + newCompartment: true +}); +try { + let wr6 = new g28.WeakRef(newGlobal()); + new WeakRef(wr6); +} catch (e) { + assertEq(e.message == "can't access dead object", true); +} + diff --git a/js/src/jit-test/tests/gc/bug-1607495.js b/js/src/jit-test/tests/gc/bug-1607495.js new file mode 100644 index 0000000000..a1701afd3d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1607495.js @@ -0,0 +1,8 @@ +// |jit-test| slow; + +gczeal(14, 2); +var g32 = newGlobal(); +let wr6 = new g32.WeakRef(newGlobal({ + newCompartment: true +})); +let wr7 = new WeakRef(wr6); diff --git a/js/src/jit-test/tests/gc/bug-1607665.js b/js/src/jit-test/tests/gc/bug-1607665.js new file mode 100644 index 0000000000..a54a4e0455 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1607665.js @@ -0,0 +1,9 @@ +var ta = new BigInt64Array(12); + +var s = ""; +for (var i = 0; i < ta.length; ++i) { + var x = ta[i]; + s += x; +} + +assertEq(s, "000000000000"); diff --git a/js/src/jit-test/tests/gc/bug-1607687.js b/js/src/jit-test/tests/gc/bug-1607687.js new file mode 100644 index 0000000000..dd7bde2ad1 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1607687.js @@ -0,0 +1,4 @@ +var limit = 1 << 16; +var m = new Map; +for (var i = 1n; i < limit; i++) + m.set(i, i); diff --git a/js/src/jit-test/tests/gc/bug-1608355.js b/js/src/jit-test/tests/gc/bug-1608355.js new file mode 100644 index 0000000000..359292aabc --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1608355.js @@ -0,0 +1,7 @@ +try { + enableShellAllocationMetadataBuilder(); + gczeal(11); + gczeal(22); + grayRoot() = 0; +} catch (e) {} +newGlobal(); diff --git a/js/src/jit-test/tests/gc/bug-1610621.js b/js/src/jit-test/tests/gc/bug-1610621.js new file mode 100644 index 0000000000..8db61cb264 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1610621.js @@ -0,0 +1 @@ +assertEq(clearKeptObjects(), undefined); diff --git a/js/src/jit-test/tests/gc/bug-1620195.js b/js/src/jit-test/tests/gc/bug-1620195.js new file mode 100644 index 0000000000..7ee5540e26 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1620195.js @@ -0,0 +1,15 @@ +var g99 = newGlobal({}); +nukeAllCCWs(); +let group = new FinalizationRegistry(x90 => 0); +let other = newGlobal({ + newCompartment: true +}); + +try { + group.register(evalcx('({})', other), 1); +} catch (e) { + // With the args --more-compartments evalcx will throw. + assertEq(e.message == "can't access dead object" || + e.message == "Invalid scope argument to evalcx", + true); +} diff --git a/js/src/jit-test/tests/gc/bug-1620196.js b/js/src/jit-test/tests/gc/bug-1620196.js new file mode 100644 index 0000000000..34fda22c80 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1620196.js @@ -0,0 +1,7 @@ +gczeal(4); +let heldValues = []; +registry = new FinalizationRegistry(value => { + heldValues.push(value); +}); +registry.register({}, 42); +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1620209.js b/js/src/jit-test/tests/gc/bug-1620209.js new file mode 100644 index 0000000000..a7d7f61374 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1620209.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +verifyprebarriers(); +offThreadCompileToStencil(''); +var dbg = new Debugger(); +var objects = dbg.findObjects(); diff --git a/js/src/jit-test/tests/gc/bug-1620213.js b/js/src/jit-test/tests/gc/bug-1620213.js new file mode 100644 index 0000000000..bd83bec70f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1620213.js @@ -0,0 +1,5 @@ +// |jit-test| slow; + +for (var i = 0; i < 32768; i++) { + new ArrayBuffer(1024*1024); +} diff --git a/js/src/jit-test/tests/gc/bug-1620221.js b/js/src/jit-test/tests/gc/bug-1620221.js new file mode 100644 index 0000000000..d363dab3dd --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1620221.js @@ -0,0 +1,23 @@ +function testStepping(script, expected) { + let g = newGlobal({newCompartment: true}); + let f = g.eval(script); + let log = []; + function maybePause(frame) { + let line = frame.script.getOffsetLocation(frame.offset).lineNumber; + log.push(line); + } + let dbg = new Debugger(g); + dbg.onEnterFrame = frame => { + maybePause(frame); + }; + f(); +} +var g7 = newGlobal({newCompartment: true}); +g7.parent = this; +g7.eval(` + Debugger(parent).onEnterFrame = function(frame) { + let v = frame.environment.getVariable('var0'); + }; +`); +testStepping("(function() {})"); +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1628440.js b/js/src/jit-test/tests/gc/bug-1628440.js new file mode 100644 index 0000000000..e128fcb7ac --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1628440.js @@ -0,0 +1,9 @@ +// |jit-test| error: ReferenceError +gczeal(10, 2); +let cleanup = function(iter) {} +let key = {"k": "this is my key"}; +let fg = new FinalizationRegistry(cleanup); +let object = {}; +fg.register(object, {}, key); +let success = fg.unregister(key); +throw new ReferenceError(); diff --git a/js/src/jit-test/tests/gc/bug-1643913.js b/js/src/jit-test/tests/gc/bug-1643913.js new file mode 100644 index 0000000000..1f83a9a0a3 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1643913.js @@ -0,0 +1,36 @@ +gczeal(0); + +for (let p of [false, true]) { + f(p); + + // Run an incremental GC to completion. + startgc(1); + while (gcstate() !== 'NotActive') { + gcslice(10000, { dontStart: true }); + } +} + +function ccwToObject() { + return evalcx('({})', newGlobal({newCompartment: true})); +} + +function ccwToRegistry() { + return evalcx('new FinalizationRegistry(value => {})', + newGlobal({newCompartment: true})); +} + +function f(p) { + let registry = ccwToRegistry(); + let target = ccwToObject(); + registry.register(target, undefined); + + // Add a CCW from registry to target zone or vice versa to control + // the order the zones are swept in. + if (p) { + registry.ptr = target; + } else { + target.ptr = registry; + } + + gc(); +} diff --git a/js/src/jit-test/tests/gc/bug-1644985-2.js b/js/src/jit-test/tests/gc/bug-1644985-2.js new file mode 100644 index 0000000000..fbb00b59de --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1644985-2.js @@ -0,0 +1,4 @@ +let fr = new FinalizationRegistry(x => 1); +fr.register(evalcx('({})', newGlobal({newCompartment: true}))); +nukeAllCCWs(); +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1644985.js b/js/src/jit-test/tests/gc/bug-1644985.js new file mode 100644 index 0000000000..aac0e99277 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1644985.js @@ -0,0 +1,4 @@ +let wr = new WeakRef(evalcx('({})', newGlobal({newCompartment: true}))); +nukeAllCCWs(); +clearKeptObjects(); +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1647747-debugger-weakmark.js b/js/src/jit-test/tests/gc/bug-1647747-debugger-weakmark.js new file mode 100644 index 0000000000..4eb4944c27 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1647747-debugger-weakmark.js @@ -0,0 +1,17 @@ +var g27 = newGlobal({newCompartment: true}); +g27.debuggeeGlobal = this; +g27.eval(` + dbg = new Debugger(debuggeeGlobal); + dbg.onExceptionUnwind = function (frame, exc) {}; +`); +s45 = newGlobal({newCompartment: true}); +try { + evalcx(` + function h(h) {} + h.valueOf=g; + `, s45); +} catch (x) {} +try { + evalcx("throw h", s45) +} catch (x) {} +gcslice(100000); diff --git a/js/src/jit-test/tests/gc/bug-1648901.js b/js/src/jit-test/tests/gc/bug-1648901.js new file mode 100644 index 0000000000..13e4895068 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1648901.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('gczeal' in this) + +gczeal(15); +enableShellAllocationMetadataBuilder(); +var registry = new FinalizationRegistry(x => 0); +gczeal(9, 3); +registry.register({}, 1, {}); diff --git a/js/src/jit-test/tests/gc/bug-1651345.js b/js/src/jit-test/tests/gc/bug-1651345.js new file mode 100644 index 0000000000..54187c5d55 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1651345.js @@ -0,0 +1,7 @@ +function main() { + const v3 = {get:Object}; + const v5 = Object.defineProperty(Object,0,v3); + addMarkObservers(Object) + gc(); +} +main(); diff --git a/js/src/jit-test/tests/gc/bug-1652425.js b/js/src/jit-test/tests/gc/bug-1652425.js new file mode 100644 index 0000000000..fec591948c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1652425.js @@ -0,0 +1,11 @@ +// |jit-test| error: Error + +function varying(mapColor, keyColor) { + enqueueMark(`set-color-${keyColor}`); + enqueueMark("yield"); + startgc(100000); +} +for (const mapColor of ['gray', 'black']) { + for (const keyColor of ['gray', 'black', 'unmarked']) + varying(mapColor, keyColor); +} diff --git a/js/src/jit-test/tests/gc/bug-1652492.js b/js/src/jit-test/tests/gc/bug-1652492.js new file mode 100644 index 0000000000..a64f541a12 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1652492.js @@ -0,0 +1,17 @@ +function f1() { + arr = f2; + var p = arr[(gczeal(9))|0]; +} +f2 = f1; +f2(); +try { + function allocObj() { return {}; } + { + let obj = allocObj(); + wr = new WeakRef(obj); + } + clearKeptObjects(); +(new obj); +} catch(exc) {} +let obj = allocObj(); +wr = new WeakRef(obj); diff --git a/js/src/jit-test/tests/gc/bug-1654186.js b/js/src/jit-test/tests/gc/bug-1654186.js new file mode 100644 index 0000000000..562938d8f8 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1654186.js @@ -0,0 +1,8 @@ +// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this) + +gczeal(14, 5); +var g = newGlobal(); +g.eval("(" + function() { + oomAfterAllocations(100); +} + ")()"); +f.x(""); diff --git a/js/src/jit-test/tests/gc/bug-1655917.js b/js/src/jit-test/tests/gc/bug-1655917.js new file mode 100644 index 0000000000..5805958ed7 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1655917.js @@ -0,0 +1,10 @@ +var g = newGlobal({ newCompartment: true }); +g.eval(` + var obj = {}; + var ref = new WeakRef(obj); + Promise.resolve().then(() => { + assertEq(ref.deref(), obj); + }); +`); +nukeCCW(g.ref); +drainJobQueue(); diff --git a/js/src/jit-test/tests/gc/bug-1657554.js b/js/src/jit-test/tests/gc/bug-1657554.js new file mode 100644 index 0000000000..f751d442b9 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1657554.js @@ -0,0 +1,2 @@ +// |jit-test| skip-if: !('oomTest' in this) +oomTest(() => eval("new WeakRef({});")); diff --git a/js/src/jit-test/tests/gc/bug-1660293.js b/js/src/jit-test/tests/gc/bug-1660293.js new file mode 100644 index 0000000000..a2c953c11f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1660293.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('oomAfterAllocations' in this) + +try { +function varying(mapColor, keyColor) { + enqueueMark(`set-color-${keyColor}`); + enqueueMark("yield"); + startgc(100000); +} +for (const mapColor of ['gray', 'black']) + varying(mapColor, 0x7fff); +} catch (exc) {} +oomAfterAllocations(100); diff --git a/js/src/jit-test/tests/gc/bug-1667336.js b/js/src/jit-test/tests/gc/bug-1667336.js new file mode 100644 index 0000000000..57742f0e5e --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1667336.js @@ -0,0 +1,17 @@ +// |jit-test| slow; --ion-offthread-compile=off; skip-if: helperThreadCount() === 0 + +var g = newGlobal(); +gczeal(9, 1); +gczeal(11, 2); +g.offThreadCompileToStencil(""); +setJitCompilerOption("offthread-compilation.enable", 1); + +for (let i = 0 ; i < 3000; i++) { + loadFile(); +} + +function loadFile() { + try { + x; + } catch(exc) {} +} diff --git a/js/src/jit-test/tests/gc/bug-1671125.js b/js/src/jit-test/tests/gc/bug-1671125.js new file mode 100644 index 0000000000..74944ea350 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1671125.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +verifyprebarriers() +evalInWorker(` + Object.defineProperty(this, "x", {}); +`); diff --git a/js/src/jit-test/tests/gc/bug-1688749.js b/js/src/jit-test/tests/gc/bug-1688749.js new file mode 100644 index 0000000000..1135646d64 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1688749.js @@ -0,0 +1,160 @@ +function f(x) { + Math.round == Math.round(); +} +function g(f, y) { + for (var k = 0; k < 9999; ++k) { + f() + } +} +g(f, [ + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + /x/, + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + createIsHTMLDDA(), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), + new Boolean(false), +]); +for (var k = 0; k < 99999; ++k) { + f() +} diff --git a/js/src/jit-test/tests/gc/bug-1689039.js b/js/src/jit-test/tests/gc/bug-1689039.js new file mode 100644 index 0000000000..4bfe9bd140 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1689039.js @@ -0,0 +1,232 @@ +// |jit-test| skip-if: !('oomAfterAllocations' in this) + +gczeal(7); +for (let i = 0; i < 9999; ++i) { + undefined + "y"; +} +function f(x) { + x.replace(/ /g, " "); + x.replace(/ /g, " "); +} +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +f(" "); +oomAfterAllocations(1); diff --git a/js/src/jit-test/tests/gc/bug-1689794.js b/js/src/jit-test/tests/gc/bug-1689794.js new file mode 100644 index 0000000000..159016edb8 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1689794.js @@ -0,0 +1,22 @@ +// |jit-test| error: Error; --cpu-count=2; --fast-warmup + +function main() { + new main; +} +try { main(); } catch(exc) {} +evaluate(` + function main() { + function v0(v1,v2) { + try { + let v3 = v0(); + } catch(v28) { + eval(\` + v13(v11,RegExp); + \`); + } + } + new Promise(v0); + } + main(); + gczeal(7,1); +`); diff --git a/js/src/jit-test/tests/gc/bug-1691901.js b/js/src/jit-test/tests/gc/bug-1691901.js new file mode 100644 index 0000000000..c9bb02e7aa --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1691901.js @@ -0,0 +1,4 @@ +gczeal(0); +enableShellAllocationMetadataBuilder(); +setMarkStackLimit(1); +Function('gc()'.replace(/x/))(); diff --git a/js/src/jit-test/tests/gc/bug-1692221.js b/js/src/jit-test/tests/gc/bug-1692221.js new file mode 100644 index 0000000000..6300788ad9 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1692221.js @@ -0,0 +1,39 @@ +// |jit-test| allow-oom; skip-if: !('oomAtAllocation' in this) + +// Test TenuredChunk::decommitFreeArenasWithoutUnlocking updates chunk +// metadata correctly. The data is checked by assertions so this test is about +// exercising the code in question. + +function allocateGarbage() { + gc(); + for (let j = 0; j < 100000; j++) { + Symbol(); + } +} + +function collectUntilDecommit() { + startgc(1); + while (gcstate() != "NotActive" && gcstate() != "Decommit") { + gcslice(1000); + } +} + +function triggerSyncDecommit() { + reportLargeAllocationFailure(1); +} + +gczeal(0); + +// Normally we skip decommit if GCs are happening frequently. Disable that for +// this test +gcparam("highFrequencyTimeLimit", 0); + +allocateGarbage(); +collectUntilDecommit(); +triggerSyncDecommit(); + +allocateGarbage(); +collectUntilDecommit(); +oomAtAllocation(10); +triggerSyncDecommit(); +resetOOMFailure(); diff --git a/js/src/jit-test/tests/gc/bug-1695861.js b/js/src/jit-test/tests/gc/bug-1695861.js new file mode 100644 index 0000000000..6bb2a6a877 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1695861.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +evalInWorker(` + verifyprebarriers(); + Number + 1 >> 2; +`) diff --git a/js/src/jit-test/tests/gc/bug-1696880.js b/js/src/jit-test/tests/gc/bug-1696880.js new file mode 100644 index 0000000000..cb4890503d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1696880.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +gczeal(0); +gczeal(4); +function a(b) { + c = cacheEntry(b); + evaluate(c, { + saveIncrementalBytecode: true + }); + return c; +} +offThreadDecodeStencil(a("")); diff --git a/js/src/jit-test/tests/gc/bug-1696886.js b/js/src/jit-test/tests/gc/bug-1696886.js new file mode 100644 index 0000000000..76b97ab90a --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1696886.js @@ -0,0 +1,9 @@ +gczeal(0); +try { evaluate(` + for (let v3 = 0; v3 < 256; v3++) + x1 = this.__defineSetter__("x", function(z69) { }) + const v9 = {}; + const v10 = v9[gczeal(4)]; +`); } catch(exc) {} +for (let v3 = 0; v3 < 256; v3++) + x1 = this.__defineSetter__("x", function(z69) {}) diff --git a/js/src/jit-test/tests/gc/bug-1698543.js b/js/src/jit-test/tests/gc/bug-1698543.js new file mode 100644 index 0000000000..865607d12b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1698543.js @@ -0,0 +1,34 @@ +// |jit-test| allow-overrecursed; skip-if: !getJitCompilerOptions()['blinterp.enable'] + +foo = ""; + +doit(` + // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + function u() { broken( + // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + // XXXXXXXXXXXXXXXXXXXXXXXXXXX +`); + +gczeal(4); + +doit(""); + +unescape(foo); + +function doit(x) { + try { + evaluate(x); + } catch (e) { + if (e instanceof SyntaxError) + doit(x); + } + try { + x = x.replace(/!/g, ""); + } catch (e) {} + foo += x + " "; +} diff --git a/js/src/jit-test/tests/gc/bug-1699364.js b/js/src/jit-test/tests/gc/bug-1699364.js new file mode 100644 index 0000000000..20542b7123 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1699364.js @@ -0,0 +1,6 @@ +// |jit-test| allow-overrecursed; skip-if: !getJitCompilerOptions()['blinterp.enable'] + +gczeal(4); +for (let i = 0; i < 1000; i++) { + "".padStart(10000).startsWith(); +} diff --git a/js/src/jit-test/tests/gc/bug-1714530.js b/js/src/jit-test/tests/gc/bug-1714530.js new file mode 100644 index 0000000000..ed8adcaf6e --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1714530.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: typeof Intl === 'undefined' + +gczeal(0); // Prevent timeouts with certain gczeal values. + +for (i = 0; i < 10000; i++, bailAfter(10)) { + if (hasOwnProperty) { + Intl.DateTimeFormat(0, {}).format(); + } +} diff --git a/js/src/jit-test/tests/gc/bug-1723840.js b/js/src/jit-test/tests/gc/bug-1723840.js new file mode 100644 index 0000000000..95bd7fd2df --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1723840.js @@ -0,0 +1,12 @@ +gczeal(0); +gcstress = 1; +Object.defineProperty(this, "", { + value: eval +}); +gczeal(11); +gczeal(6, 5); +const a = { b: 7 }; +const c = [a, ""]; +const d = [c]; +new WeakMap(d); + diff --git a/js/src/jit-test/tests/gc/bug-1723841.js b/js/src/jit-test/tests/gc/bug-1723841.js new file mode 100644 index 0000000000..97ceccd70b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1723841.js @@ -0,0 +1,7 @@ +gczeal(0); +m0 = new WeakMap; +o = {}; +s = ''; +m0.set(o,s); +verifyprebarriers(); +startgc(''); diff --git a/js/src/jit-test/tests/gc/bug-1736310.js b/js/src/jit-test/tests/gc/bug-1736310.js new file mode 100644 index 0000000000..da0d83188d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1736310.js @@ -0,0 +1,16 @@ +gczeal(9, 10); +function a() { + var b = new Int32Array(buffer); + function c(d) { + b[5] = d; + } + return c; +} +b = new Int32Array(6); +var buffer = b.buffer; +a()({ + valueOf() { + detachArrayBuffer(buffer); + } +}) + diff --git a/js/src/jit-test/tests/gc/bug-1739972.js b/js/src/jit-test/tests/gc/bug-1739972.js new file mode 100644 index 0000000000..7094635c8d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1739972.js @@ -0,0 +1,5 @@ +enableShellAllocationMetadataBuilder(); +a = newGlobal(); +a.evaluate("function x() {}"); +for (i = 0; i < 20; ++i) + new a.x; diff --git a/js/src/jit-test/tests/gc/bug-1744979.js b/js/src/jit-test/tests/gc/bug-1744979.js new file mode 100644 index 0000000000..ada98946f7 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1744979.js @@ -0,0 +1,3 @@ +gczeal(14, 3); +Array(4294967).sort(); +reportLargeAllocationFailure(1); diff --git a/js/src/jit-test/tests/gc/bug-1749298.js b/js/src/jit-test/tests/gc/bug-1749298.js new file mode 100644 index 0000000000..7fa184501f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1749298.js @@ -0,0 +1,17 @@ +// Test that a finalization registry target that is reachable from its global +// does not keep the global alive indefinitely. + +let global = newGlobal({newCompartment: true}); +global.eval(` + this.target = {}; // Target is reachable from global. + this.registry = new FinalizationRegistry(() => assertEq(0, 1)); + registry.register(target, 'held'); + this.finalizeObserver = makeFinalizeObserver(); +`); + +assertEq(finalizeCount(), 0); + +global = undefined; +gc(); + +assertEq(finalizeCount(), 1); diff --git a/js/src/jit-test/tests/gc/bug-1755257.js b/js/src/jit-test/tests/gc/bug-1755257.js new file mode 100644 index 0000000000..052d2cc427 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1755257.js @@ -0,0 +1 @@ +new FinalizationRegistry(a => 1).register(newGlobal({newCompartment: true})) diff --git a/js/src/jit-test/tests/gc/bug-1755874.js b/js/src/jit-test/tests/gc/bug-1755874.js new file mode 100644 index 0000000000..b1a1cdfe31 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1755874.js @@ -0,0 +1,4 @@ +fullcompartmentchecks(true); +let a = new FinalizationRegistry(b => {}); +let c = newGlobal({newCompartment: true}); +a.register(c); diff --git a/js/src/jit-test/tests/gc/bug-1756590.js b/js/src/jit-test/tests/gc/bug-1756590.js new file mode 100644 index 0000000000..5a5cadc1d9 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1756590.js @@ -0,0 +1,19 @@ +// |jit-test| error: Error + +function asyncGC(...targets) { + var finalizationRegistry = new FinalizationRegistry(() => {}); + for (let target of targets) { + finalizationRegistry.register(target, 'target'); + } + return Promise.resolve('tick').then(() => asyncGCDeref()).then(() => { + finalizationRegistry.cleanupSome(name => { names.push(name); }); + }); +} +const root = newGlobal({newCompartment: true}); +const dbg = new Debugger(); +dbg.each = asyncGC; +const wrappedRoot = dbg.each (root) +gczeal(14,10); +evaluate(` + var StructType = class {}; +`); diff --git a/js/src/jit-test/tests/gc/bug-1757573.js b/js/src/jit-test/tests/gc/bug-1757573.js new file mode 100644 index 0000000000..9a83cd0755 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1757573.js @@ -0,0 +1,7 @@ +new FinalizationRegistry(a => {}); +b = newGlobal({newCompartment: true}); +b.eval(` + c = {}; + d = new WeakRef(c); +`); +nukeCCW(b.d); diff --git a/js/src/jit-test/tests/gc/bug-1762771.js b/js/src/jit-test/tests/gc/bug-1762771.js new file mode 100644 index 0000000000..6a81910ec2 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1762771.js @@ -0,0 +1,9 @@ +if (this.enqueueMark) { + gczeal(0); + enqueueMark('set-color-gray'); + enqueueMark('set-color-black'); + enqueueMark(newGlobal()); + enqueueMark('set-color-gray'); + newGlobal(); + startgc(); +} diff --git a/js/src/jit-test/tests/gc/bug-1766648-markQueue.js b/js/src/jit-test/tests/gc/bug-1766648-markQueue.js new file mode 100644 index 0000000000..bd5cb693e2 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1766648-markQueue.js @@ -0,0 +1,12 @@ +if (this.enqueueMark) { + enqueueMark('set-color-gray'); + enqueueMark('set-color-black'); + enqueueMark(newGlobal()); + enqueueMark('set-color-gray'); + enqueueMark('set-color-black'); + enqueueMark(newGlobal()); + enqueueMark('set-color-gray'); + enqueueMark('set-color-black'); + enqueueMark(newGlobal()); + gc(); +} diff --git a/js/src/jit-test/tests/gc/bug-1766656.js b/js/src/jit-test/tests/gc/bug-1766656.js new file mode 100644 index 0000000000..7096f6b274 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1766656.js @@ -0,0 +1,17 @@ +// |jit-test| error: Error + +const thisGlobal = this; +const otherGlobalSameCompartment = newGlobal({sameCompartmentAs: thisGlobal}); +const globals = [thisGlobal, otherGlobalSameCompartment, undefined]; +function testProperties(global, count) { + let {object: source, transplant} = transplantableObject(); + for (let i9 = 0; i9 < count; i9++) { + source[(0) + i9] = i9; + } + transplant(global); +} +for (let global of globals) { + for (let count of [0, 10, 30]) { + testProperties(global, count); + } +} diff --git a/js/src/jit-test/tests/gc/bug-1768813.js b/js/src/jit-test/tests/gc/bug-1768813.js new file mode 100644 index 0000000000..1bbe0f53aa --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1768813.js @@ -0,0 +1,19 @@ +gczeal(0); + +function f() { + let global = newGlobal({newCompartment: true}); + global.a = Debugger(newGlobal({newCompartment: true})); + global.evaluate("grayRoot()"); +} + +function g(i) { + const str = " ".padStart(10000, " "); + str.startsWith("1"); + if (i > 0) { + g(i - 1); + } +} + +f(); +gczeal(11,3); +g(1000); diff --git a/js/src/jit-test/tests/gc/bug-1770266.js b/js/src/jit-test/tests/gc/bug-1770266.js new file mode 100644 index 0000000000..b417e09d2f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1770266.js @@ -0,0 +1,2 @@ +new FinalizationRegistry(() => 0).register(newGlobal({newCompartment: true})); +recomputeWrappers(); diff --git a/js/src/jit-test/tests/gc/bug-1779833.js b/js/src/jit-test/tests/gc/bug-1779833.js new file mode 100644 index 0000000000..7b2f132046 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1779833.js @@ -0,0 +1,20 @@ +// This failed when run under ASAN. + +let size = 6; + +let map = new Map(); +assertEq(isNurseryAllocated(map), true); +for (let i = 0; i < size; i++) { + map.set(i, {}); +} + +for (let i = 0; i < size - 1; i++) { + map.delete(i); +} + +for (let i = 0; i < size - 1; i++) { + map.set(i, {}); +} + +map = undefined; +minorgc(); diff --git a/js/src/jit-test/tests/gc/bug-1787351.js b/js/src/jit-test/tests/gc/bug-1787351.js new file mode 100644 index 0000000000..28542b8bf1 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1787351.js @@ -0,0 +1 @@ +// |jit-test| --gc-zeal=15 diff --git a/js/src/jit-test/tests/gc/bug-1791363.js b/js/src/jit-test/tests/gc/bug-1791363.js new file mode 100644 index 0000000000..8024679582 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1791363.js @@ -0,0 +1,13 @@ +// |jit-test| allow-unhandlable-oom; skip-if: (getBuildConfiguration("android") && getBuildConfiguration("debug")) + +gczeal(0); +if (!this.enqueueMark) { + quit(); +} + +enqueueMark('set-color-gray'); +enqueueMark(newGlobal()); +enqueueMark('set-color-black'); +enqueueMark(newGlobal()); +setMarkStackLimit(1); +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1791975.js b/js/src/jit-test/tests/gc/bug-1791975.js new file mode 100644 index 0000000000..a194a92dd0 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1791975.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !('oomAtAllocation' in this) + +gczeal(10, 10); +try { + throw 0; +} catch { + for (let i = 1; i < 20 ; i++) { + oomAtAllocation(i); + try { + newGlobal(); + } catch {} + } +} diff --git a/js/src/jit-test/tests/gc/bug-1792338.js b/js/src/jit-test/tests/gc/bug-1792338.js new file mode 100644 index 0000000000..8f02c8c7d6 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1792338.js @@ -0,0 +1,14 @@ +// |jit-test| allow-unhandlable-oom; skip-if: (getBuildConfiguration("android") && getBuildConfiguration("debug")) + +gczeal(0); +if (!this.enqueueMark) { + quit(); +} + +enqueueMark('set-color-gray'); +enqueueMark(newGlobal({newCompartment: true})); +enqueueMark('set-color-black'); +enqueueMark({}); +setMarkStackLimit(1); +gc(); +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1796901.js b/js/src/jit-test/tests/gc/bug-1796901.js new file mode 100644 index 0000000000..081b5b8e6e --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1796901.js @@ -0,0 +1,4 @@ +// |jit-test| --no-threads +gcslice(0); +evalcx("lazy"); +abortgc(); diff --git a/js/src/jit-test/tests/gc/bug-1799678.js b/js/src/jit-test/tests/gc/bug-1799678.js new file mode 100644 index 0000000000..a1423355ad --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1799678.js @@ -0,0 +1,21 @@ +gczeal(0); +setMarkStackLimit(1); +loadFile(` + function wasmEvalText(str, imports) { + let binary = wasmTextToBinary(str); + m = new WebAssembly.Module(binary); + return new WebAssembly.Instance(m, imports); + } + let WasmFuncrefValues = [ + wasmEvalText(\`(module (func (export "")))\`).exports[''], + ]; + g1 = newGlobal({newCompartment: true}); + gczeal(10,10); +`); +for (let i = 0; i < 1000; ++i) + loadFile("}"); +function loadFile(lfVarx) { + try { + evaluate(lfVarx); + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/gc/bug-1802308.js b/js/src/jit-test/tests/gc/bug-1802308.js new file mode 100644 index 0000000000..91e482dc4b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1802308.js @@ -0,0 +1,8 @@ +function test() { + for (var i = 0; i < 10; i++) + /0|[1-9][0-9]*/.test(""); +}; +test(); +test(); +gczeal(4); +enableShellAllocationMetadataBuilder(); diff --git a/js/src/jit-test/tests/gc/bug-1802478.js b/js/src/jit-test/tests/gc/bug-1802478.js new file mode 100644 index 0000000000..05559c3f6f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1802478.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('oomAfterAllocations' in this) + +enableTrackAllocations(); +for (a of "x") { + gczeal(2, 1); +} +oomAfterAllocations(1); +try { + newString(); +} catch (x) {} diff --git a/js/src/jit-test/tests/gc/bug-1803233.js b/js/src/jit-test/tests/gc/bug-1803233.js new file mode 100644 index 0000000000..14e37f0065 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1803233.js @@ -0,0 +1,5 @@ +// |jit-test| allow-oom; allow-unhandlable-oom + +gczeal(10, 1); +gcparam("maxBytes", gcparam("gcBytes")); +newGlobal(); diff --git a/js/src/jit-test/tests/gc/bug-1804629-2.js b/js/src/jit-test/tests/gc/bug-1804629-2.js new file mode 100644 index 0000000000..fc7c75573b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1804629-2.js @@ -0,0 +1,5 @@ +gczeal(0); +enableShellAllocationMetadataBuilder(); +setMarkStackLimit(1); +grayRoot()[1] = {}; +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1804629.js b/js/src/jit-test/tests/gc/bug-1804629.js new file mode 100644 index 0000000000..6ed62eec8c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1804629.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('gczeal' in this); error: ReferenceError + +gczeal(0); +setMarkStackLimit(1); +gczeal(4); +a; diff --git a/js/src/jit-test/tests/gc/bug-1804637.js b/js/src/jit-test/tests/gc/bug-1804637.js new file mode 100644 index 0000000000..1f136b1965 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1804637.js @@ -0,0 +1,8 @@ +// |jit-test| error: ReferenceError + +gczeal(0); +enqueueMark('set-color-gray'); +enqueueMark({}); +gczeal(9); +gczeal(11, 2); +a; diff --git a/js/src/jit-test/tests/gc/bug-1806976.js b/js/src/jit-test/tests/gc/bug-1806976.js new file mode 100644 index 0000000000..9b3dab46cd --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1806976.js @@ -0,0 +1,5 @@ +gczeal(4); +evaluate(` + for (x = 1; x < 2; ++x) + gcparam("maxHelperThreads", 1) +`); diff --git a/js/src/jit-test/tests/gc/bug-1817598.js b/js/src/jit-test/tests/gc/bug-1817598.js new file mode 100644 index 0000000000..b13c3a74cc --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1817598.js @@ -0,0 +1,3 @@ +const v2 = this.blackRoot(); +v2[1000n] = 1000n; +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1820543.js b/js/src/jit-test/tests/gc/bug-1820543.js new file mode 100644 index 0000000000..0ef5f9915e --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1820543.js @@ -0,0 +1,16 @@ +gczeal(0); + +const v1 = ("DEB1").startsWith("DEB1"); +function f2(a3, a4, a5, a6) { + return ({"constructor":this,"b":a3,"__proto__":this}).newGlobal(f2); +} +f2.newCompartment = v1; +with (f2()) { + function f11(a12, a13) { + return "DEB1"; + } + const v15 = new FinalizationRegistry(f11); + v15.register(f2); +} +this.reportLargeAllocationFailure(); +gc() diff --git a/js/src/jit-test/tests/gc/bug-1822995.js b/js/src/jit-test/tests/gc/bug-1822995.js new file mode 100644 index 0000000000..5822b3a5ac --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1822995.js @@ -0,0 +1,19 @@ +function f0(a1, a2, a3) { + try { + a2(a1, a2); + } catch(e5) { + const v7 = new Set(); + const v8 = v7.add(); + function f9(a10, a11) { + a11.sameZoneAs = v8; + return this; + } + f9(v8, f9).newGlobal(f9).blackRoot(a1); + } + return a2; +} +const v17 = this.wrapWithProto(f0, this); +const v19 = Proxy.revocable(f0, v17); +v19.proxy(v17, v17); +v19.proxy(v19, v17); +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1825671.js b/js/src/jit-test/tests/gc/bug-1825671.js new file mode 100644 index 0000000000..b8ab1b1cbe --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1825671.js @@ -0,0 +1,12 @@ +let newTarget = Object.defineProperty(function () {}.bind(), "prototype", { + get() { + throw 0; + } +}); + +try { + Reflect.construct(FinalizationRegistry, [ 1 ], newTarget); +} catch (n) { + assertEq(n === 0, false); + assertEq(n instanceof TypeError, true); +} diff --git a/js/src/jit-test/tests/gc/bug-1825936.js b/js/src/jit-test/tests/gc/bug-1825936.js new file mode 100644 index 0000000000..6d87cc4667 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1825936.js @@ -0,0 +1,24 @@ +let src = ` +function f0() { + return f0; +} +const v10 = f0.bind(); +v10.sameZoneAs = f0; +const v37 = this.newGlobal(v10); + +try { + v37.moduleEvaluate(); +} catch(e48) { + this.grayRoot(); + const v59 = new FinalizationRegistry(FinalizationRegistry); + v59.register(e48, v59, e48); + v59.register(f0, v59, e48); +} +this.nukeAllCCWs(); +`; + +gczeal(0); +let global = newGlobal(); +global.eval(src); +global = undefined; +gc(); diff --git a/js/src/jit-test/tests/gc/bug-1828396.js b/js/src/jit-test/tests/gc/bug-1828396.js new file mode 100644 index 0000000000..465377f027 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1828396.js @@ -0,0 +1,16 @@ +a = ` + fullcompartmentchecks(true); + oomTest(Debugger) +`.split('\n') +c = ""; +while (true) { + d = a.shift() + if (d == null) break; + c += d + e(c); + function e(f) { + try { + evaluate(f); + } catch {} + } +} diff --git a/js/src/jit-test/tests/gc/bug-1830921.js b/js/src/jit-test/tests/gc/bug-1830921.js new file mode 100644 index 0000000000..fa4e8aee0f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1830921.js @@ -0,0 +1,15 @@ +gczeal(4); +x = [0, 0, 0, 0, 0]; +for (let i = 0; i < 5; ++i) { + for (let j = 0; j < x[i]; ++j) {} +} +gczeal(0); +let y = []; +for (let k = 0; k < 9999; ++k) { + try { + throw z; + } catch (e) { + y.push("" + e); + } +} +print(y); diff --git a/js/src/jit-test/tests/gc/bug-1834711.js b/js/src/jit-test/tests/gc/bug-1834711.js new file mode 100644 index 0000000000..3708593b34 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1834711.js @@ -0,0 +1,9 @@ +const global1 = newGlobal({"newCompartment": false}); +const global2 = newGlobal({"newCompartment": true}); + +global1.nukeAllCCWs(); + +const {object, transplant} = this.transplantableObject(global1); + +global2.firstGlobalInCompartment(object); +transplant(global1); diff --git a/js/src/jit-test/tests/gc/bug-1838154.js b/js/src/jit-test/tests/gc/bug-1838154.js new file mode 100644 index 0000000000..4d426c6805 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1838154.js @@ -0,0 +1,2 @@ +gczeal(4) +minorgc(true) diff --git a/js/src/jit-test/tests/gc/bug-1839062.js b/js/src/jit-test/tests/gc/bug-1839062.js new file mode 100644 index 0000000000..6068983c07 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1839062.js @@ -0,0 +1,5 @@ +// |jit-test| --ion-offthread-compile=off; --baseline-eager +gczeal(4); +a = new BigInt64Array(2); +for (x=1;x<100;++x) + a[0]; diff --git a/js/src/jit-test/tests/gc/bug-1845248.js b/js/src/jit-test/tests/gc/bug-1845248.js new file mode 100644 index 0000000000..b1ae597536 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1845248.js @@ -0,0 +1,16 @@ +for (let v1 = 0; v1 < 10; v1++) { } + +for (let v5 = 0; v5 < 5; v5++) { + function f6(a7, a8, a9, a10) { + try { a8(a10, a9); } catch (e) {} + try { new a8(v5, a9, v5, a8); } catch (e) {} + gc(); + + const o15 = { + __proto__: a7, + }; + + for (let v20 = 0; v20 < 150; v20++) { } + } + f6(f6, f6, f6); +} diff --git a/js/src/jit-test/tests/gc/bug-1851619.js b/js/src/jit-test/tests/gc/bug-1851619.js new file mode 100644 index 0000000000..110bf302bd --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1851619.js @@ -0,0 +1,13 @@ +// |jit-test| slow; exitstatus: 3 +// Bug 1851619: Shouldn't crash. + +// This test triggers a stack overflow, then calls a finalization registry +// cleanup callback that previously used data that had already been discarded. +enableShellAllocationMetadataBuilder(); +var registry = new FinalizationRegistry(()=>{ +}); +registry.register({}, 1, {}); +function recurse(obj) { + recurse(obj); +} +recurse(); diff --git a/js/src/jit-test/tests/gc/bug-1852063.js b/js/src/jit-test/tests/gc/bug-1852063.js new file mode 100644 index 0000000000..7c464f6ed6 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1852063.js @@ -0,0 +1,32 @@ +// |jit-test| --fast-warmup + +gczeal(0); + +// Create a gray function. +grayRoot()[0] = (obj) => obj.x; + +function foo(obj, skip) { + if (!skip) + return grayRoot()[0](obj); +} + +with ({}) {} + +// Set up `foo` to inline the gray function when we hit the threshold. +for (var i = 0; i < 6; i++) { + foo({x:1}, false); + foo({y:1, x:2}, false); +} + +// Start a gc, yielding after marking gray roots. +gczeal(25); +startgc(1); + +// Trigger inlining, being careful not to call and mark the gray function. +// This adds the gray function to cellsToAssertNotGray. +for (var i = 0; i < 10; i++) { + foo({x:1}, true); +} + +// Finish the gc and process the delayed gray checks list. +finishgc(); diff --git a/js/src/jit-test/tests/gc/bug-1852729.js b/js/src/jit-test/tests/gc/bug-1852729.js new file mode 100644 index 0000000000..460fe6b774 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1852729.js @@ -0,0 +1,5 @@ +const g = newGlobal({newCompartment: true}); +const domObj = this.transplantableObject().object; +const bar = new g.WeakRef(domObj); +bar.deref(); +this.nukeAllCCWs(); diff --git a/js/src/jit-test/tests/gc/bug-1856739.js b/js/src/jit-test/tests/gc/bug-1856739.js new file mode 100644 index 0000000000..c12f0d834d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1856739.js @@ -0,0 +1 @@ +var s = "SetIsInlinableLargeFunction".substring(1); gc(); diff --git a/js/src/jit-test/tests/gc/bug-1865597.js b/js/src/jit-test/tests/gc/bug-1865597.js new file mode 100644 index 0000000000..4bc7ff3a4d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1865597.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => { + gcparam('parallelMarkingEnabled', false); + assertEq(gcparam('parallelMarkingEnabled'), 0); + gcparam('parallelMarkingEnabled', true); + assertEq(gcparam('parallelMarkingEnabled'), 1); + gcparam('parallelMarkingEnabled', false); + assertEq(gcparam('parallelMarkingEnabled'), 0); +}); diff --git a/js/src/jit-test/tests/gc/bug-1867453.js b/js/src/jit-test/tests/gc/bug-1867453.js new file mode 100644 index 0000000000..a2e6cf6530 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1867453.js @@ -0,0 +1,13 @@ +gczeal(0); +gcparam("minNurseryBytes", 256 * 1024); +gcparam("maxNurseryBytes", 256 * 1024); +gc(); + +let initialCount = gcparam("minorGCNumber"); + +let array = new Array(500000); +array.fill(0); +let keys = Object.keys(array); + +let count = gcparam("minorGCNumber") - initialCount; +assertEq(count <= 3, true); diff --git a/js/src/jit-test/tests/gc/bug-1871186.js b/js/src/jit-test/tests/gc/bug-1871186.js new file mode 100644 index 0000000000..fc4620fa65 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1871186.js @@ -0,0 +1,10 @@ +// |jit-test| --blinterp-eager; skip-if: !('oomTest' in this) + +gc(); +function f(x) { + new Uint8Array(x); +} +f(0); +oomTest(function () { + f(2048); +}); diff --git a/js/src/jit-test/tests/gc/bug-1872524.js b/js/src/jit-test/tests/gc/bug-1872524.js new file mode 100644 index 0000000000..877a773a1f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1872524.js @@ -0,0 +1,17 @@ +// Attempt to break invariant that smallHeapIncrementalLimit >= +// largeHeapIncrementalLimit and check that it is maintained. + +function checkInvariant() { + return gcparam("smallHeapIncrementalLimit") >= + gcparam("largeHeapIncrementalLimit"); +} + +assertEq(checkInvariant(), true); + +const smallLimit = gcparam("smallHeapIncrementalLimit"); +gcparam("largeHeapIncrementalLimit", smallLimit + 1); +assertEq(checkInvariant(), true); + +const largeLimit = gcparam("largeHeapIncrementalLimit"); +gcparam("smallHeapIncrementalLimit", largeLimit - 1); +assertEq(checkInvariant(), true); diff --git a/js/src/jit-test/tests/gc/bug-1877406.js b/js/src/jit-test/tests/gc/bug-1877406.js new file mode 100644 index 0000000000..bcb26ed062 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1877406.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this); --fuzzing-safe + +oomTest(Debugger); +oomTest(Debugger); +async function* f() {} +f().return(); +dumpHeap(f); diff --git a/js/src/jit-test/tests/gc/bug-1880444.js b/js/src/jit-test/tests/gc/bug-1880444.js new file mode 100644 index 0000000000..d7e644310f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1880444.js @@ -0,0 +1,10 @@ +// |jit-test| --more-compartments; error:ReferenceError + +gczeal(19, 5) +evaluate(` + a = newGlobal() + Debugger(a).onDebuggerStatement = function () { b }; + a.eval("var line0 = Error().lineNumber\\ndebugger\\n" ) +`); +gczeal(15); +gczeal(10, 2)(); diff --git a/js/src/jit-test/tests/gc/bug-787703.js b/js/src/jit-test/tests/gc/bug-787703.js new file mode 100644 index 0000000000..bbc01bae73 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-787703.js @@ -0,0 +1,7 @@ +// |jit-test| slow; + +eval(" function x() {}" + Array(241).join(" ")); +for (var i = 0; i < 100; i++) { + gczeal(4, 2); + String(x); +} diff --git a/js/src/jit-test/tests/gc/bug-820186.js b/js/src/jit-test/tests/gc/bug-820186.js new file mode 100644 index 0000000000..cced86e208 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-820186.js @@ -0,0 +1,297 @@ +// |jit-test| slow; + +function randomRecursion() { + var y = "" + if (rnd(2)) { + var x = 2; + "{" + x + "}"; + randomRecursion(); + randomRecursion(); + return [""]; + } + return [""]; +} + +function thisFunctionIsNeverCalled() { +} + +function testOne() { + ox = newGlobal(); + var code = randomRecursion()[rnd(3)]; +} + +initRnd(); +gczeal(10, 3); + +for (var count = 0; count < 20; count++) { + print(count); + testOne() +} + +// ========================================================================================== + +// this program is a JavaScript version of Mersenne Twister, with concealment and encapsulation in class, +// an almost straight conversion from the original program, mt19937ar.c, +// translated by y. okada on July 17, 2006. +// Changes by Jesse Ruderman: added "var" keyword in a few spots; added export_mta etc; pasted into fuzz.js. +// in this program, procedure descriptions and comments of original source code were not removed. +// lines commented with //c// were originally descriptions of c procedure. and a few following lines are appropriate JavaScript descriptions. +// lines commented with /* and */ are original comments. +// lines commented with // are additional comments in this JavaScript version. +// before using this version, create at least one instance of MersenneTwister19937 class, and initialize the each state, given below in c comments, of all the instances. +/* + A C-program for MT19937, with initialization improved 2002/1/26. + Coded by Takuji Nishimura and Makoto Matsumoto. + + Before using, initialize the state by using init_genrand(seed) + or init_by_array(init_key, key_length). + + Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + Any feedback is very welcome. + http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html + email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) +*/ + +function MersenneTwister19937() +{ + /* Period parameters */ + //c//#define N 624 + //c//#define M 397 + //c//#define MATRIX_A 0x9908b0dfUL /* constant vector a */ + //c//#define UPPER_MASK 0x80000000UL /* most significant w-r bits */ + //c//#define LOWER_MASK 0x7fffffffUL /* least significant r bits */ + var N = 624; + var M = 397; + var MATRIX_A = 0x9908b0df; /* constant vector a */ + var UPPER_MASK = 0x80000000; /* most significant w-r bits */ + var LOWER_MASK = 0x7fffffff; /* least significant r bits */ + //c//static unsigned long mt[N]; /* the array for the state vector */ + //c//static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */ + var mt = new Array(N); /* the array for the state vector */ + var mti = N+1; /* mti==N+1 means mt[N] is not initialized */ + + function unsigned32 (n1) // returns a 32-bits unsiged integer from an operand to which applied a bit operator. + { + return n1 < 0 ? (n1 ^ UPPER_MASK) + UPPER_MASK : n1; + } + + function subtraction32 (n1, n2) // emulates lowerflow of a c 32-bits unsiged integer variable, instead of the operator -. these both arguments must be non-negative integers expressible using unsigned 32 bits. + { + return n1 < n2 ? unsigned32((0x100000000 - (n2 - n1)) & 0xffffffff) : n1 - n2; + } + + function addition32 (n1, n2) // emulates overflow of a c 32-bits unsiged integer variable, instead of the operator +. these both arguments must be non-negative integers expressible using unsigned 32 bits. + { + return unsigned32((n1 + n2) & 0xffffffff) + } + + function multiplication32 (n1, n2) // emulates overflow of a c 32-bits unsiged integer variable, instead of the operator *. these both arguments must be non-negative integers expressible using unsigned 32 bits. + { + var sum = 0; + for (var i = 0; i < 32; ++i){ + if ((n1 >>> i) & 0x1){ + sum = addition32(sum, unsigned32(n2 << i)); + } + } + return sum; + } + + /* initializes mt[N] with a seed */ + //c//void init_genrand(unsigned long s) + this.init_genrand = function (s) + { + //c//mt[0]= s & 0xffffffff; + mt[0]= unsigned32(s & 0xffffffff); + for (mti=1; mti> 30)) + mti); + addition32(multiplication32(1812433253, unsigned32(mt[mti-1] ^ (mt[mti-1] >>> 30))), mti); + /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ + /* In the previous versions, MSBs of the seed affect */ + /* only MSBs of the array mt[]. */ + /* 2002/01/09 modified by Makoto Matsumoto */ + //c//mt[mti] &= 0xffffffff; + mt[mti] = unsigned32(mt[mti] & 0xffffffff); + /* for >32 bit machines */ + } + } + + /* initialize by an array with array-length */ + /* init_key is the array for initializing keys */ + /* key_length is its length */ + /* slight change for C++, 2004/2/26 */ + //c//void init_by_array(unsigned long init_key[], int key_length) + this.init_by_array = function (init_key, key_length) + { + //c//int i, j, k; + var i, j, k; + //c//init_genrand(19650218); + this.init_genrand(19650218); + i=1; j=0; + k = (N>key_length ? N : key_length); + for (; k; k--) { + //c//mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525)) + //c// + init_key[j] + j; /* non linear */ + mt[i] = addition32(addition32(unsigned32(mt[i] ^ multiplication32(unsigned32(mt[i-1] ^ (mt[i-1] >>> 30)), 1664525)), init_key[j]), j); + mt[i] = + //c//mt[i] &= 0xffffffff; /* for WORDSIZE > 32 machines */ + unsigned32(mt[i] & 0xffffffff); + i++; j++; + if (i>=N) { mt[0] = mt[N-1]; i=1; } + if (j>=key_length) j=0; + } + for (k=N-1; k; k--) { + //c//mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941)) + //c//- i; /* non linear */ + mt[i] = subtraction32(unsigned32((dbg=mt[i]) ^ multiplication32(unsigned32(mt[i-1] ^ (mt[i-1] >>> 30)), 1566083941)), i); + //c//mt[i] &= 0xffffffff; /* for WORDSIZE > 32 machines */ + mt[i] = unsigned32(mt[i] & 0xffffffff); + i++; + if (i>=N) { mt[0] = mt[N-1]; i=1; } + } + mt[0] = 0x80000000; /* MSB is 1; assuring non-zero initial array */ + } + + this.export_state = function() { return [mt, mti]; }; + this.import_state = function(s) { mt = s[0]; mti = s[1]; }; + this.export_mta = function() { return mt; }; + this.import_mta = function(_mta) { mt = _mta }; + this.export_mti = function() { return mti; }; + this.import_mti = function(_mti) { mti = _mti; } + + /* generates a random number on [0,0xffffffff]-interval */ + //c//unsigned long genrand_int32(void) + this.genrand_int32 = function () + { + //c//unsigned long y; + //c//static unsigned long mag01[2]={0x0UL, MATRIX_A}; + var y; + var mag01 = new Array(0x0, MATRIX_A); + /* mag01[x] = x * MATRIX_A for x=0,1 */ + + if (mti >= N) { /* generate N words at one time */ + //c//int kk; + var kk; + + if (mti == N+1) /* if init_genrand() has not been called, */ + //c//init_genrand(5489); /* a default initial seed is used */ + this.init_genrand(5489); /* a default initial seed is used */ + + for (kk=0;kk> 1) ^ mag01[y & 0x1]; + y = unsigned32((mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK)); + mt[kk] = unsigned32(mt[kk+M] ^ (y >>> 1) ^ mag01[y & 0x1]); + } + for (;kk> 1) ^ mag01[y & 0x1]; + y = unsigned32((mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK)); + mt[kk] = unsigned32(mt[kk+(M-N)] ^ (y >>> 1) ^ mag01[y & 0x1]); + } + //c//y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK); + //c//mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1]; + y = unsigned32((mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK)); + mt[N-1] = unsigned32(mt[M-1] ^ (y >>> 1) ^ mag01[y & 0x1]); + mti = 0; + } + + y = mt[mti++]; + + /* Tempering */ + //c//y ^= (y >> 11); + //c//y ^= (y << 7) & 0x9d2c5680; + //c//y ^= (y << 15) & 0xefc60000; + //c//y ^= (y >> 18); + y = unsigned32(y ^ (y >>> 11)); + y = unsigned32(y ^ ((y << 7) & 0x9d2c5680)); + y = unsigned32(y ^ ((y << 15) & 0xefc60000)); + y = unsigned32(y ^ (y >>> 18)); + + return y; + } + + /* generates a random number on [0,0x7fffffff]-interval */ + //c//long genrand_int31(void) + this.genrand_int31 = function () + { + //c//return (genrand_int32()>>1); + return (this.genrand_int32()>>>1); + } + + /* generates a random number on [0,1]-real-interval */ + //c//double genrand_real1(void) + this.genrand_real1 = function () + { + //c//return genrand_int32()*(1.0/4294967295.0); + return this.genrand_int32()*(1.0/4294967295.0); + /* divided by 2^32-1 */ + } + + /* generates a random number on [0,1)-real-interval */ + //c//double genrand_real2(void) + this.genrand_real2 = function () + { + //c//return genrand_int32()*(1.0/4294967296.0); + return this.genrand_int32()*(1.0/4294967296.0); + /* divided by 2^32 */ + } + + /* generates a random number on (0,1)-real-interval */ + //c//double genrand_real3(void) + this.genrand_real3 = function () + { + //c//return ((genrand_int32()) + 0.5)*(1.0/4294967296.0); + return ((this.genrand_int32()) + 0.5)*(1.0/4294967296.0); + /* divided by 2^32 */ + } + + /* generates a random number on [0,1) with 53-bit resolution*/ + //c//double genrand_res53(void) + this.genrand_res53 = function () + { + //c//unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6; + var a=this.genrand_int32()>>>5, b=this.genrand_int32()>>>6; + return(a*67108864.0+b)*(1.0/9007199254740992.0); + } + /* These real versions are due to Isaku Wada, 2002/01/09 added */ +} + +function initRnd() { + var fuzzMT = new MersenneTwister19937; + var fuzzSeed = 53; + fuzzMT.init_genrand(fuzzSeed); + rnd = function (n) { var v = Math.floor(fuzzMT.genrand_real2() * n); return v; }; + rnd.rndReal = function() { return fuzzMT.genrand_real2(); }; + rnd.fuzzMT = fuzzMT; +} diff --git a/js/src/jit-test/tests/gc/bug-821551.js b/js/src/jit-test/tests/gc/bug-821551.js new file mode 100644 index 0000000000..44a6df7138 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-821551.js @@ -0,0 +1,14 @@ +function g() { + z = newGlobal(''); + return function(code) { + evalcx(code, z) + } +} +f = g(); +f("\ + for (var x = 0; x < 1; ++x) {\ + a = x;\ + }\ +"); +f("a in eval"); + diff --git a/js/src/jit-test/tests/gc/bug-824321.js b/js/src/jit-test/tests/gc/bug-824321.js new file mode 100644 index 0000000000..424e2db0ce --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-824321.js @@ -0,0 +1,3 @@ +x = "\udada\udada"; +gc(); + diff --git a/js/src/jit-test/tests/gc/bug-825326.js b/js/src/jit-test/tests/gc/bug-825326.js new file mode 100644 index 0000000000..1579f1d291 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-825326.js @@ -0,0 +1,18 @@ +// |jit-test| + +try { + a = [] + r = /x/ + gczeal(10, 2)() +} catch (e) {} +try { + (function() { + r(function() { + eval() + }) + })() +} catch (e) {} +try { + s +} catch (e) {} +a.every(function() {}) diff --git a/js/src/jit-test/tests/gc/bug-832103.js b/js/src/jit-test/tests/gc/bug-832103.js new file mode 100644 index 0000000000..9ada62e40f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-832103.js @@ -0,0 +1,27 @@ +//|jit-test| error:TypeError +RegExp("").exec() +Object.defineProperty(this, "x", { + get: function() { + return new Array + } +}) +Object.defineProperty(this, "y", { + get: function() { + return [function() {}, 0, 0, 0, 0, 0, 0] + } +}) +r = RegExp(""); +String(undefined) +with({ + b: gczeal(9, 2) +}); +r = /()/; +y.sort(function(j) { + if (j) { + a = + new + Array + } else { + x.v() + } +}) diff --git a/js/src/jit-test/tests/gc/bug-880816.js b/js/src/jit-test/tests/gc/bug-880816.js new file mode 100644 index 0000000000..7d7e9e622d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-880816.js @@ -0,0 +1,30 @@ +var lfcode = new Array(); +lfcode.push("const baz = 'bar';"); +lfcode.push("2"); +lfcode.push("{ function foo() {} }"); +lfcode.push("evaluate('\ +var INVALIDATE_MODES = INVALIDATE_MODE_STRINGS.map(s => ({mode: s}));\ +function range(n, m) {}\ +function seq_scan(array, f) {}\ +function assertStructuralEq(e1, e2) {}\ +for (var i = 0, l = a.length; i < l; i++) {}\ +');"); +lfcode.push("for (var x of new Set(Object.getOwnPropertyNames(this))) {}"); +var lfRunTypeId = -1; +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file) +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") {} + if (!isNaN(lfVarx)) { + lfRunTypeId = parseInt(lfVarx); + } else { + switch (lfRunTypeId) { + case 2: new Function(lfVarx)(); break; + default: evaluate(lfVarx); break; + } + } + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/gc/bug-880886.js b/js/src/jit-test/tests/gc/bug-880886.js new file mode 100644 index 0000000000..2f83a2c637 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-880886.js @@ -0,0 +1,10 @@ +// |jit-test| error: too much recursion + +function testUniqueness(asmJSModule) { + var f = asmJSModule(); +} +function lambda() { + var x = function inner() { "use asm"; function g() {} return g }; + return lambda(); +} +testUniqueness(lambda); diff --git a/js/src/jit-test/tests/gc/bug-886551-1.js b/js/src/jit-test/tests/gc/bug-886551-1.js new file mode 100644 index 0000000000..b3f2bcd45f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-886551-1.js @@ -0,0 +1,8 @@ +if (this.hasOwnProperty('Intl')) { + gc(); + gcslice(1); + var thisValues = [ "x" ]; + thisValues.forEach(function (value) { + var format = Intl.DateTimeFormat.call(value); + }); +} diff --git a/js/src/jit-test/tests/gc/bug-886551-2.js b/js/src/jit-test/tests/gc/bug-886551-2.js new file mode 100644 index 0000000000..9381c867d5 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-886551-2.js @@ -0,0 +1,7 @@ +gc(); +gcslice(1); +function isClone(a, b) { + var rmemory = new WeakMap(); + rmemory.set(a,b); +} +isClone([]); diff --git a/js/src/jit-test/tests/gc/bug-886560.js b/js/src/jit-test/tests/gc/bug-886560.js new file mode 100644 index 0000000000..c506b05d04 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-886560.js @@ -0,0 +1,11 @@ +// |jit-test| error: x is not defined + +// enableShellAllocationMetadataBuilder ignores its argument, because we don't +// permit metadata callbacks to run JS any more, so this test may be +// unnecessary. We'll preserve its structure just in case. +enableShellAllocationMetadataBuilder(function(obj) { + var res = {}; + return res; + }); +gczeal(4); +x(); diff --git a/js/src/jit-test/tests/gc/bug-886630.js b/js/src/jit-test/tests/gc/bug-886630.js new file mode 100644 index 0000000000..d794cfac17 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-886630.js @@ -0,0 +1,109 @@ +function errorToString(e) { + try {} catch (e2) {} +} +Object.getOwnPropertyNames(this); +if (false) { + for (let x of constructors) + print(x); +} +var tryRunning = tryRunningDirectly; +function unlikelyToHang(code) { + var codeL = code.replace(/\s/g, " "); + return true && code.indexOf("infloop") == -1 && !(codeL.match(/const.*for/)) // can be an infinite loop: function() { const x = 1; for(x in ({a1:1})) dumpln(3); } + && !(codeL.match(/for.*const/)) // can be an infinite loop: for (x in ...); const x; + && !(codeL.match(/for.*in.*uneval/)) // can be slow to loop through the huge string uneval(this), for example + && !(codeL.match(/for.*for.*for/)) // nested for loops (including for..in, etc) can take a while + && !(codeL.match(/for.*for.*gc/)) +} +function whatToTestSpidermonkeyTrunk(code) { + var codeL = code.replace(/\s/g, " "); + return { + allowParse: true, + allowExec: unlikelyToHang(code), + allowIter: true, + expectConsistentOutput: true && code.indexOf("Date") == -1 // time marches on + && code.indexOf("random") == -1 && code.indexOf("dumpObject") == -1 // shows heap addresses + && code.indexOf("oomAfterAllocations") == -1 && code.indexOf("ParallelArray") == -1, + expectConsistentOutputAcrossIter: true && code.indexOf("options") == -1 // options() is per-cx, and the js shell doesn't create a new cx for each sandbox/compartment + , + expectConsistentOutputAcrossJITs: true && code.indexOf("'strict") == -1 // bug 743425 + && code.indexOf("preventExtensions") == -1 // bug 887521 + && !(codeL.match(/\/.*[\u0000\u0080-\uffff]/)) // doesn't stay valid utf-8 after going through python (?) + }; +} +function tryRunningDirectly(f, code, wtt) { + try { + eval(code); + } catch (e) {} + try { + var rv = f(); + tryIteration(rv); + } catch (runError) { + var err = errorToString(runError); + } + tryEnsureSanity(); +} +var realEval = eval; +var realMath = Math; +var realFunction = Function; +var realGC = gc; +function tryEnsureSanity() { + try { + delete this.Math; + delete this.Function; + delete this.gc; + this.Math = realMath; + this.eval = realEval; + this.Function = realFunction; + this.gc = realGC; + } catch (e) {} +} +function tryIteration(rv) { + try { + var iterCount = 0; + for /* each */ + ( /* let */ iterValue in rv) + print("Iterating succeeded, iterCount == " + iterCount); + } catch (iterError) {} +} +function failsToCompileInTry(code) { + try { + new Function(" try { " + code + " } catch(e) { }"); + } catch (e) {} +} +function tryItOut(code) { + if (count % 1000 == 0) { + gc(); + } + var wtt = whatToTestSpidermonkeyTrunk(code); + code = code.replace(/\/\*DUPTRY\d+\*\//, function(k) { + var n = parseInt(k.substr(8), 10); + print(n); + return strTimes("try{}catch(e){}", n); + }) + try { + f = new Function(code); + } catch (compileError) {} + if (code.indexOf("\n") == -1 && code.indexOf("\r") == -1 && code.indexOf("\f") == -1 && code.indexOf("\0") == -1 && code.indexOf("\u2028") == -1 && code.indexOf("\u2029") == -1 && code.indexOf("<--") == -1 && code.indexOf("-->") == -1 && code.indexOf("//") == -1) { + var nCode = code; + if (nCode.indexOf("return") != -1 || nCode.indexOf("yield") != -1 || nCode.indexOf("const") != -1 || failsToCompileInTry(nCode)) nCode = "(function(){" + nCode + "})()" + } + tryRunning(f, code, false); +} +var count = 0; +tryItOut(""); +count = 2 +tryItOut(""); +tryItOut(""); +tryItOut("o") +tryItOut("") +tryItOut("") +tryItOut("\ + with((/ /-7))\ + {\ + for(let mjcpxc=0;mjcpxc<9;++mjcpxc)\ + {\ + e=mjcpxc;\ + yield/x/\ + }}") + diff --git a/js/src/jit-test/tests/gc/bug-889682-1.js b/js/src/jit-test/tests/gc/bug-889682-1.js new file mode 100644 index 0000000000..75b3f4089b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-889682-1.js @@ -0,0 +1,13 @@ +// |jit-test| error:TypeError +gc(); +var recursiveFunctions = [{ + text: "(function(){if(a){}g()})" +}]; +(function testAllRecursiveFunctions() { + for (var i = 0; i < recursiveFunctions.length; ++i) { + var a = recursiveFunctions[i]; + eval(a.text.replace(/@/g, "")) + } +})(); +gcslice(2869); +Function("v={c:[{x:[[]],N:{x:[{}[d]]}}]}=minorgc(true)")() diff --git a/js/src/jit-test/tests/gc/bug-889682-2.js b/js/src/jit-test/tests/gc/bug-889682-2.js new file mode 100644 index 0000000000..efc47337a2 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-889682-2.js @@ -0,0 +1,14 @@ +// |jit-test| error:TypeError +(function(){}) +gc(); +var recursiveFunctions = [{ + text: "(function(){if(a){}g()})" +}]; +(function testAllRecursiveFunctions() { + for (var i = 0; i < recursiveFunctions.length; ++i) { + var a = recursiveFunctions[i]; + eval(a.text.replace(/@/g, "")) + } +})(); +gcslice(2869); +Function("v={c:[{x:[[]],N:{x:[{}[d]]}}]}=minorgc(true)")() diff --git a/js/src/jit-test/tests/gc/bug-889682-3.js b/js/src/jit-test/tests/gc/bug-889682-3.js new file mode 100644 index 0000000000..601c8300a4 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-889682-3.js @@ -0,0 +1,14 @@ +// |jit-test| error:TypeError +function f(){} +gc(); +var recursiveFunctions = [{ + text: "(function(){if(a){}g()})" +}]; +(function testAllRecursiveFunctions() { + for (var i = 0; i < recursiveFunctions.length; ++i) { + var a = recursiveFunctions[i]; + eval(a.text.replace(/@/g, "")) + } +})(); +gcslice(2869); +Function("v={c:[{x:[[]],N:{x:[{}[d]]}}]}=minorgc(true)")() diff --git a/js/src/jit-test/tests/gc/bug-891773.js b/js/src/jit-test/tests/gc/bug-891773.js new file mode 100644 index 0000000000..c5cb237782 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-891773.js @@ -0,0 +1,14 @@ +x = newGlobal() +Int32Array = x.Int32Array +x.p = new ArrayBuffer() +schedulegc(29); +(function(stdlib, n, heap) { + "use asm" + var Int32ArrayView = new stdlib.Int32Array(heap) + function f() { + Int32ArrayView[1] + } + return f +})(this, { + f: new Function +}, new ArrayBuffer()) diff --git a/js/src/jit-test/tests/gc/bug-906236.js b/js/src/jit-test/tests/gc/bug-906236.js new file mode 100644 index 0000000000..7566bda428 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-906236.js @@ -0,0 +1,9 @@ +// |jit-test| error: too much recursion +(function() { + (function f(x) { + return x * f(x - 1); + with({}) + var r = "" + })() +})() + diff --git a/js/src/jit-test/tests/gc/bug-906241.js b/js/src/jit-test/tests/gc/bug-906241.js new file mode 100644 index 0000000000..ccbc73e594 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-906241.js @@ -0,0 +1,9 @@ +// |jit-test| error: InternalError: too much recursion +for (let y in []); +(function f(x) { + new Float64Array(new ArrayBuffer()); + { + f(x) + function t() {} + } +})(); diff --git a/js/src/jit-test/tests/gc/bug-912813.js b/js/src/jit-test/tests/gc/bug-912813.js new file mode 100644 index 0000000000..1babaac28e --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-912813.js @@ -0,0 +1,7 @@ +// |jit-test| slow +gczeal(9, 1) +for (var a = 0; a < 1; a++) { + newGlobal({ + sameZoneAs: {} + }) +} diff --git a/js/src/jit-test/tests/gc/bug-913224.js b/js/src/jit-test/tests/gc/bug-913224.js new file mode 100644 index 0000000000..815164d764 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-913224.js @@ -0,0 +1 @@ +dumpHeap(); diff --git a/js/src/jit-test/tests/gc/bug-913715.js b/js/src/jit-test/tests/gc/bug-913715.js new file mode 100644 index 0000000000..3a05cf5881 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-913715.js @@ -0,0 +1,31 @@ +try { + (function() { + Object.defineProperty(this, "x", { + get: function() { + Object.defineProperty(this, "y", { + configurable: true, + get: function() { + return Proxy(this.y) + } + }); + x; + } + }) + })() + x +} catch (e) {} +try { + x +} catch (e) {} +try { + x +} catch (e) {} +try { + y +} catch (e) {} +try { + y +} catch (e) {} +try { + y +} catch (e) {} diff --git a/js/src/jit-test/tests/gc/bug-919536.js b/js/src/jit-test/tests/gc/bug-919536.js new file mode 100644 index 0000000000..0c07b4b598 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-919536.js @@ -0,0 +1,17 @@ +if ("gczeal" in this) { + gczeal(2, 1000); + + var a = new Array(10 * 1000); + + var i = a.length; + while (i-- != 0) { + switch (i % 3) { + case 0: + a[i] = { }; + break; + } + } + + gc(); +} + diff --git a/js/src/jit-test/tests/gc/bug-924690.js b/js/src/jit-test/tests/gc/bug-924690.js new file mode 100644 index 0000000000..e7fdc981ba --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-924690.js @@ -0,0 +1,25 @@ +x = [] +try { + (function() { + schedulegc(1); + ((function() { + return { + y: function() { + u() = [] + } + } + })()) + })() + watch.call(x, "valueOf", function() {}) + gc() +} catch (e) { print(e); } +try { + (function() { + x.valueOf = + (function() { + y(); + }) + })() + x + 2 + print('foo') +} catch (e) { print(e); } diff --git a/js/src/jit-test/tests/gc/bug-935022.js b/js/src/jit-test/tests/gc/bug-935022.js new file mode 100644 index 0000000000..2ebe148911 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-935022.js @@ -0,0 +1,4 @@ +function callback(obj) {} +enableShellAllocationMetadataBuilder(); +gczeal(7); +var statusitems = []; diff --git a/js/src/jit-test/tests/gc/bug-939499.js b/js/src/jit-test/tests/gc/bug-939499.js new file mode 100644 index 0000000000..a54d78cab9 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-939499.js @@ -0,0 +1,4 @@ +gczeal(0); +gc(); +verifyprebarriers(); +setMarkStackLimit(5); diff --git a/js/src/jit-test/tests/gc/bug-945275.js b/js/src/jit-test/tests/gc/bug-945275.js new file mode 100644 index 0000000000..26cdb23d3c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-945275.js @@ -0,0 +1,11 @@ +function TestCase(n) { + this.name = undefined; + this.description = undefined; +} +gczeal(7,1); +eval("\ +function reportCompare() { return new TestCase; };\ +reportCompare();\ +Object.defineProperty(Object.prototype, 'name', {});\ +reportCompare();\ +"); diff --git a/js/src/jit-test/tests/gc/bug-945280.js b/js/src/jit-test/tests/gc/bug-945280.js new file mode 100644 index 0000000000..3546c864d9 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-945280.js @@ -0,0 +1,4 @@ +gczeal(7,1); +enableShellAllocationMetadataBuilder(); +gczeal(false); +var statusitems = []; diff --git a/js/src/jit-test/tests/gc/bug-945285.js b/js/src/jit-test/tests/gc/bug-945285.js new file mode 100644 index 0000000000..7544d86c04 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-945285.js @@ -0,0 +1,3 @@ +gczeal(11); +function callback(obj) {} +enableShellAllocationMetadataBuilder(); diff --git a/js/src/jit-test/tests/gc/bug-950927.js b/js/src/jit-test/tests/gc/bug-950927.js new file mode 100644 index 0000000000..23096c483b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-950927.js @@ -0,0 +1,31 @@ +var lfcode = new Array(); +lfcode.push("\ +var optionNames = options().split(',');\ + for (var i = 0; i < optionNames.length; i++) {}\ +"); +lfcode.push("gczeal(7,5);"); +lfcode.push("4"); +lfcode.push("\ +var S = new Array();\ +var x = 1;\ +for ( var i = 8; i >= 0; i-- ) {\ + S[0] += ' ';\ + S[0] += ',';\ +}\ +eval(S);\ +"); +var lfRunTypeId = -1; +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file) +} +function loadFile(lfVarx) { + if (lfVarx.substr(-3) != ".js" && lfVarx.length != 1) { + switch (lfRunTypeId) { + case 4: eval("(function() { " + lfVarx + " })();"); break; + default: evaluate(lfVarx, { noScriptRval : true }); break; + } + } else if (!isNaN(lfVarx)) { + lfRunTypeId = parseInt(lfVarx); + } +} diff --git a/js/src/jit-test/tests/gc/bug-952819.js b/js/src/jit-test/tests/gc/bug-952819.js new file mode 100644 index 0000000000..3b118a2dc3 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-952819.js @@ -0,0 +1,3 @@ +verifypostbarriers() +verifyprebarriers() +verifypostbarriers() diff --git a/js/src/jit-test/tests/gc/bug-956324.js b/js/src/jit-test/tests/gc/bug-956324.js new file mode 100644 index 0000000000..711fff9516 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-956324.js @@ -0,0 +1,28 @@ +var g = newGlobal({newCompartment: true}); +g.eval("function f() {\n" + + " debugger;\n" + + "}\n") + +var dbg = new Debugger(g); +var handler = {}; +dbg.onDebuggerStatement = function (frame) { + frame.script.setBreakpoint(0, {}); +}; + +// create breakpoint +g.f() + +// drop our references to things +handler = undefined; +dbg.onDebuggerStatement = undefined; + +dbg.removeAllDebuggees(); + +gc(); + +//create garbage to trigger a minor GC +var x; +for (var i = 0; i < 100; ++i) + x = {}; + +gc(); diff --git a/js/src/jit-test/tests/gc/bug-957110.js b/js/src/jit-test/tests/gc/bug-957110.js new file mode 100644 index 0000000000..372e15915f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-957110.js @@ -0,0 +1,7 @@ +// |jit-test| allow-unhandlable-oom +gczeal(7,1); +try { +gcparam("maxBytes", gcparam("gcBytes") + 4*1024); +newGlobal("same-compartment"); +} catch(exc1) {} +gczeal(1); diff --git a/js/src/jit-test/tests/gc/bug-957114.js b/js/src/jit-test/tests/gc/bug-957114.js new file mode 100644 index 0000000000..5c61c8210b --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-957114.js @@ -0,0 +1,13 @@ +gczeal(7,1); +function TestCase(n) { + this.name = ''; + this.description = ''; + this.expect = ''; + this.actual = ''; + this.reason = ''; + this.passed = ''; +} +function test() { return new TestCase; } +test(); +Object.defineProperty(Object.prototype, "name", {}); +test(); diff --git a/js/src/jit-test/tests/gc/bug-961741.js b/js/src/jit-test/tests/gc/bug-961741.js new file mode 100644 index 0000000000..c4c7823636 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-961741.js @@ -0,0 +1,5 @@ +function r() { + for (var x in undefined) {} +} +enableShellAllocationMetadataBuilder(); +r(); diff --git a/js/src/jit-test/tests/gc/bug-961877.js b/js/src/jit-test/tests/gc/bug-961877.js new file mode 100644 index 0000000000..37b146feaf --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-961877.js @@ -0,0 +1,14 @@ +g = Function("", "for (var i = 0; i < 0; ++i) { eval('this.arg'+0 +'=arg'+0); }"); +Math.abs(undefined); +gczeal(2,300); +evaluate("\ +var toFloat32 = (function() {\ + var f32 = new Float32Array(1);\ + function f(x) { return f32[0] = x; }\ + return f;\ +})();\ +for (var i = 0; i < 64; ++i) {\ + var p = Math.pow(2, i) + 1;\ + g(toFloat32(p));\ + toFloat32(-p);\ +}"); diff --git a/js/src/jit-test/tests/gc/bug-969012.js b/js/src/jit-test/tests/gc/bug-969012.js new file mode 100644 index 0000000000..ed03f66a73 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-969012.js @@ -0,0 +1,60 @@ +function testClosureCreationAndInvocation() { + var a = 'foobar'; + function makeaddv(vvvv) { + var z = -4 * vvvv; + var y = -3 * vvvv; + var x = -2 * vvvv; + var w = -1 * vvvv; + var v = 0 * vvvv; + var u = 1 * vvvv; + var t = 2 * vvvv; + var s = 3 * vvvv; + var r = 4 * vvvv; + var q = 5 * vvvv; + var p = 6 * vvvv; + var o = 7 * vvvv; + var n = 8 * vvvv; + var m = 9 * vvvv; + var l = 10 * vvvv; + var k = 11 * vvvv; + var j = 12 * vvvv; + var i = 13 * vvvv; + var h = 14 * vvvv; + var g = 15 * vvvv; + var f = 16 * vvvv; + var e = 17 * vvvv; + var d = 18 * vvvv; + var c = 19 * vvvv; + var b = 20 * vvvv; + var a = 21 * vvvv; + return function (x) { + switch (x) { + case 0: return a; case 1: return b; + case 2: return c; case 3: return d; + case 4: return e; case 5: return f; + case 6: return g; case 7: return h; + case 8: return i; case 9: return j; + case 10: return k; case 11: return l; + case 12: return m; case 13: return n; + case 14: return o; case 15: return p; + case 16: return q; case 17: return r; + case 18: return s; case 19: return t; + case 20: return u; case 21: return v; + case 22: return w; case 23: return x; + case 24: return y; case 25: return z; + } + }; + } + var a = Array(); + for (var i = 0; i < 26; ++i) { + a.push(makeaddv(Math.random())); + } + return a; +} + +var a = testClosureCreationAndInvocation(); +for (var i = 0; i < 26; ++i) { + print(a[i](i)); +} + + diff --git a/js/src/jit-test/tests/gc/bug-978353.js b/js/src/jit-test/tests/gc/bug-978353.js new file mode 100644 index 0000000000..44635209fe --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-978353.js @@ -0,0 +1,6 @@ +var arr = new Float64Array(2); +function test(m) { + arr[1] = m; +} +for(var i=0; i<20000; ++i, Array('x')) + test(0); diff --git a/js/src/jit-test/tests/gc/bug-978802.js b/js/src/jit-test/tests/gc/bug-978802.js new file mode 100644 index 0000000000..1e13b76e0e --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-978802.js @@ -0,0 +1,17 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => { + try { + var max = 400; + function f(b) { + if (b) { + f(b - 1); + } else { + g = {}; + } + g.apply(null, arguments); + } + f(max - 1); + } catch(exc0) {} + f(); +}); diff --git a/js/src/jit-test/tests/gc/bug-981289.js b/js/src/jit-test/tests/gc/bug-981289.js new file mode 100644 index 0000000000..edba3fc974 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-981289.js @@ -0,0 +1,8 @@ +gcPreserveCode(); +function test() { + for (var i=0; i<20; i++) { + arguments.x = {}; + gc(); + } +} +test(); diff --git a/js/src/jit-test/tests/gc/bug-981295.js b/js/src/jit-test/tests/gc/bug-981295.js new file mode 100644 index 0000000000..0f570bf73d --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-981295.js @@ -0,0 +1,9 @@ +var NotEarlyErrorString = "NotEarlyError"; +var NotEarlyError = new Error(NotEarlyErrorString); +var juneDate = new Date(2000, 5, 20, 0, 0, 0, 0); +for (var i = 0; i < function(x) { return myObj(Date.prototype.toString.apply(x)); }; void i) { + eval(a.text.replace(/@/g, "")) +} +gcslice(2601); +function testcase() {} +new Uint16Array(testcase); diff --git a/js/src/jit-test/tests/gc/bug-985732.js b/js/src/jit-test/tests/gc/bug-985732.js new file mode 100644 index 0000000000..eb560f1878 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-985732.js @@ -0,0 +1,84 @@ +// |jit-test| error: expected is not defined +function testx() { +function compareArray(aExpected, aActual) {} + for (var i = 0; i < expected.length; i++) {} +var supportsArrayIndexGettersOnArrays = undefined; +function fnSupportsArrayIndexGettersOnArrays() {} +var supportsArrayIndexGettersOnObjects = undefined; +function fnSupportsArrayIndexGettersOnObjects() {} +function ConvertToFileUrl(pathStr) { +} +function fnExists() {} +var __globalObject = Function("return this;")(); +function fnGlobalObject() {} +function fnSupportsStrict() { + eval('with ({}) {}'); +} +function dataPropertyAttributesAreCorrect(obj, configurable) {} +function accessorPropertyAttributesAreCorrect(obj, configurable) {} +var NotEarlyErrorString = "NotEarlyError"; +var EarlyErrorRePat = "^((?!" + NotEarlyErrorString + ").)*$"; +var NotEarlyError = new Error(NotEarlyErrorString); +function Test262Error(message) {}; +function testFailed(message) {} +function testPrint(message) {} +function $PRINT(message) {} +function $INCLUDE(message) { } +function $ERROR(message) {} +function $FAIL(message) {} +function getPrecision(num) {} +var prec; +function isEqual(num1, num2) {} +function ToInteger(p) {} +var HoursPerDay = 24; +var MinutesPerHour = 60; +var SecondsPerMinute = 60; +var msPerDay = 86400000; +var msPerSecond = 1000; +var msPerMinute = 60000; +var msPerHour = 3600000; +var date_1899_end = -2208988800001; +var date_1900_start = -2208988800000; +var date_1969_end = -1; +var date_1970_start = 0; +var date_1999_end = 946684799999; +var date_2000_start = 946684800000; +var date_2099_end = 4102444799999; +var date_2100_start = 4102444800000; +var $LocalTZ, + $DST_start_month, + $DST_start_sunday, + $DST_start_hour, + $DST_start_minutes, + $DST_end_month, + $DST_end_sunday, + $DST_end_hour, + $DST_end_minutes; +function Day(t) {} +function TimeWithinDay(t) {} +function DaysInYear(y){} +function DayFromYear(y) {} +function TimeFromYear(y){} +function YearFromTime(t) {} +function InLeapYear(t){} +function DayWithinYear(t) {} +function MonthFromTime(t){} +function DateFromTime(t) {} +function WeekDay(t) {} +var LocalTZA = $LocalTZ*msPerHour; +function DaysInMonth(m, leap) {} +function GetSundayInMonth(t, m, count){} +function DaylightSavingTA(t) {} +function LocalTime(t){} +function UTC(t) {} +function HourFromTime(t){} +function MinFromTime(t){} +function SecFromTime(t){} +function msFromTime(t){} +function MakeTime(hour, min, sec, ms){} +function MakeDay(year, month, date) {} +function MakeDate( day, time ) {} +function TimeClip(time) {} +function ConstructDate(year, month, date, hours, minutes, seconds, ms){} +function runTestCase(testcase) {} +} testx(); diff --git a/js/src/jit-test/tests/gc/bug-993768.js b/js/src/jit-test/tests/gc/bug-993768.js new file mode 100644 index 0000000000..2fc05fb5b8 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-993768.js @@ -0,0 +1,13 @@ +var SECTION = ""; +gcPreserveCode() +gczeal(9, 1000); +function test() { + var f32 = new Float32Array(10); + f32[0] = 5; + var i = 0; + for (var j = 0; j < 10000; ++j) { + f32[i + 1] = f32[i] - 1; + SECTION += 1; + } +} +test(); diff --git a/js/src/jit-test/tests/gc/bug1116306.js b/js/src/jit-test/tests/gc/bug1116306.js new file mode 100644 index 0000000000..5a9718f19c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1116306.js @@ -0,0 +1,8 @@ +const dbg = new Debugger(); +const g = newGlobal({newCompartment: true}); +dbg.addDebuggee(g); +dbg.memory.trackingAllocationSites = true; +g.eval("this.alloc = {}"); +verifyprebarriers(); +schedulegc(3); +dbg.memory.drainAllocationsLog(); diff --git a/js/src/jit-test/tests/gc/bug1146213.js b/js/src/jit-test/tests/gc/bug1146213.js new file mode 100644 index 0000000000..1a7859a6e4 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1146213.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !(getBuildConfiguration("has-gczeal")) || helperThreadCount() === 0 +setGCCallback({ + action: "majorGC", +}); +schedulezone(this) +gcslice(3) +var lfGlobal = newGlobal(); +lfGlobal.offThreadCompileToStencil(""); +var stencil = lfGlobal.finishOffThreadStencil(); +lfGlobal.evalStencil(stencil); diff --git a/js/src/jit-test/tests/gc/bug1191756.js b/js/src/jit-test/tests/gc/bug1191756.js new file mode 100644 index 0000000000..ebc82341e9 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1191756.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: typeof 'oomAtAllocation' === 'undefined' + +function fn(i) { + if (i == 3) + return ["isFinite"].map(function (i) {}); + return []; +} + +try { + fn(0); + fn(1); + fn(2); + oomAtAllocation(50); + fn(3); +} catch(e) { + // Ignore oom +} + diff --git a/js/src/jit-test/tests/gc/bug1246607.js b/js/src/jit-test/tests/gc/bug1246607.js new file mode 100644 index 0000000000..1fbe9e5208 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1246607.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: typeof oomTest !== 'function' || typeof Intl !== 'object' + +oomTest(() => { + try { + new Intl.DateTimeFormat; + x1 = 0; + } catch (e) { + switch (1) { + case 0: + let s; + case 1: + x; + } + } +}) diff --git a/js/src/jit-test/tests/gc/bug1282113.js b/js/src/jit-test/tests/gc/bug1282113.js new file mode 100644 index 0000000000..88d128a0ff --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1282113.js @@ -0,0 +1,6 @@ +Object.getOwnPropertyNames(this); +setGCCallback({ + action: "majorGC", + phases: "begin" +}); +selectforgc(this); diff --git a/js/src/jit-test/tests/gc/bug1283169.js b/js/src/jit-test/tests/gc/bug1283169.js new file mode 100644 index 0000000000..721293dbd4 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1283169.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +gczeal(0); +startgc(45); +offThreadCompileToStencil("print(1)"); diff --git a/js/src/jit-test/tests/gc/bug1285186.js b/js/src/jit-test/tests/gc/bug1285186.js new file mode 100644 index 0000000000..f0974c6de9 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1285186.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +gczeal(10); +newGlobal(); +offThreadCompileToStencil("let x = 1;"); +abortgc(); diff --git a/js/src/jit-test/tests/gc/bug1285490.js b/js/src/jit-test/tests/gc/bug1285490.js new file mode 100644 index 0000000000..7cd457d30c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1285490.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +gczeal(4); +offThreadCompileToStencil("let x = 1;"); diff --git a/js/src/jit-test/tests/gc/bug1287063.js b/js/src/jit-test/tests/gc/bug1287063.js new file mode 100644 index 0000000000..66c2f69390 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1287063.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +schedulezone(""); +offThreadCompileToStencil(""); diff --git a/js/src/jit-test/tests/gc/bug1326343-gcstats.js b/js/src/jit-test/tests/gc/bug1326343-gcstats.js new file mode 100644 index 0000000000..f29306af4c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1326343-gcstats.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +setJitCompilerOption('baseline.warmup.trigger', 4); +oomTest((function () { + gcslice(0); +})) diff --git a/js/src/jit-test/tests/gc/bug1335642.js b/js/src/jit-test/tests/gc/bug1335642.js new file mode 100644 index 0000000000..6e7779ae04 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1335642.js @@ -0,0 +1,6 @@ +var g = newGlobal(); +var b = g.eval(` +var b = /foo2/; +Object.defineProperty(b, "source", { get: () => {}}); +`); +new RegExp(b).source; diff --git a/js/src/jit-test/tests/gc/bug1335643.js b/js/src/jit-test/tests/gc/bug1335643.js new file mode 100644 index 0000000000..5ee61b0603 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1335643.js @@ -0,0 +1,5 @@ +low = high = newGlobal({}) +high.low = low +high.eval("function a() { return saveStack(1, low) }") +set = eval("high.a()") +serialize(set) diff --git a/js/src/jit-test/tests/gc/bug1336866.js b/js/src/jit-test/tests/gc/bug1336866.js new file mode 100644 index 0000000000..5a665e55fd --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1336866.js @@ -0,0 +1 @@ +JSON.stringify(this); diff --git a/js/src/jit-test/tests/gc/bug1337324.js b/js/src/jit-test/tests/gc/bug1337324.js new file mode 100644 index 0000000000..eaf4c080f0 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1337324.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) +oomTest(function () { + offThreadCompileModuleToStencil(''); + var stencil = finishOffThreadStencil(); + instantiateModuleStencil(stencil); +}); diff --git a/js/src/jit-test/tests/gc/bug1471949.js b/js/src/jit-test/tests/gc/bug1471949.js new file mode 100644 index 0000000000..5f0f10f4df --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1471949.js @@ -0,0 +1,5 @@ +// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this) + +gczeal(15); +oomAfterAllocations(5); +gcslice(11); diff --git a/js/src/jit-test/tests/gc/bug1511412.js b/js/src/jit-test/tests/gc/bug1511412.js new file mode 100644 index 0000000000..0a2d6893cd --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1511412.js @@ -0,0 +1,17 @@ +Object.defineProperty(this, "fuzzutils", { + value: { + orig_evaluate: evaluate, + evaluate: function(c, o) { + if (!o) { + o = {}; + } + o.catchTermination = true; + return fuzzutils.orig_evaluate(c, o); + }, + } + }); + gczeal(21, 10); + fuzzutils.evaluate(` +enableShellAllocationMetadataBuilder(); +function test() {} +`); diff --git a/js/src/jit-test/tests/gc/bug1532289.js b/js/src/jit-test/tests/gc/bug1532289.js new file mode 100644 index 0000000000..131867c415 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1532289.js @@ -0,0 +1,11 @@ +// |jit-test| --ion-warmup-threshold=0; --ion-offthread-compile=off; skip-if: !getJitCompilerOptions()['baseline.enable'] + +// gczeal mode causes test to run too slowly with --no-baseline +gczeal(4,40); + +var x; +var y = false; + +function f(v) { x = v; while (y) {} } + +for (var z=1; z < 1e5; z++) { f(BigInt(z)); } diff --git a/js/src/jit-test/tests/gc/bug1600017.js b/js/src/jit-test/tests/gc/bug1600017.js new file mode 100644 index 0000000000..c7a748009f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1600017.js @@ -0,0 +1,21 @@ +var registry = new FinalizationRegistry(x => { + if (target1 === null) { + return; + } + + target1 = null; + + gc(); + + print("targets:", [...x]); // consume +}); + +var target1 = {}; +registry.register(target1, "target1"); + +var target2 = {}; +registry.register(target2, "target2"); + +target2 = null; + +gc(); diff --git a/js/src/jit-test/tests/gc/bug1600488-1.js b/js/src/jit-test/tests/gc/bug1600488-1.js new file mode 100644 index 0000000000..a0fb8e5ee5 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1600488-1.js @@ -0,0 +1,14 @@ +const token = {}; +let cleanedUpValue; +const finalizationRegistry = new FinalizationRegistry(value => { + cleanedUpValue = value; +}); +{ + let object = {}; + finalizationRegistry.register(object, token, token); + object = undefined; +} +gc(); +finalizationRegistry.cleanupSome(); +assertEq(cleanedUpValue, token); +assertEq(finalizationRegistry.unregister(token), false); diff --git a/js/src/jit-test/tests/gc/bug1600488-2.js b/js/src/jit-test/tests/gc/bug1600488-2.js new file mode 100644 index 0000000000..c7de44f1a0 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1600488-2.js @@ -0,0 +1,14 @@ +const token = {}; +let iterated; +const finalizationRegistry = new FinalizationRegistry(items => { + iterated = items.next().value; +}); +{ + let object = {}; + finalizationRegistry.register(object, token, token); + object = undefined; +} +gc(); +assertEq(finalizationRegistry.unregister(token), true); +finalizationRegistry.cleanupSome(); +assertEq(iterated, undefined); diff --git a/js/src/jit-test/tests/gc/bug1698557.js b/js/src/jit-test/tests/gc/bug1698557.js new file mode 100644 index 0000000000..2fa2302fe3 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1698557.js @@ -0,0 +1,6 @@ +fullcompartmentchecks(true); +let g = newGlobal({sameZoneAs: this}); +for (let i = 0; i < 20; i++) { + g.Object.prototype.toString; +} +gc(); diff --git a/js/src/jit-test/tests/gc/bug1704451.js b/js/src/jit-test/tests/gc/bug1704451.js new file mode 100644 index 0000000000..d4b4d14995 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1704451.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('gczeal' in this) + +enableShellAllocationMetadataBuilder(); +gczeal(9,1); +var o86 = {x76: 1, y86: 2}; +var snapshot = createShapeSnapshot(o86); diff --git a/js/src/jit-test/tests/gc/bug1709537.js b/js/src/jit-test/tests/gc/bug1709537.js new file mode 100644 index 0000000000..77f3fd1d5c --- /dev/null +++ b/js/src/jit-test/tests/gc/bug1709537.js @@ -0,0 +1,9 @@ +function f() { + var obj = []; + for (var count = 20000; count > 15900; count--) { + obj[count] = 2; + } + assertEq(Object.getOwnPropertyNames(obj).length, 4101); +} +gczeal(4); +f(); diff --git a/js/src/jit-test/tests/gc/bug888463.js b/js/src/jit-test/tests/gc/bug888463.js new file mode 100644 index 0000000000..cd7e170d28 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug888463.js @@ -0,0 +1,66 @@ +var sjcl = { + hash: {}, +}; +sjcl.bitArray = { + concat: function (a, b) { + var c = a[a.length - 1], + d = sjcl.bitArray.getPartial(c); + return d === 32 ? a.concat(b) : sjcl.bitArray.P(b, d, c | 0, a.slice(0, a.length - 1)) + }, + getPartial: function (a) { + return Math.round(a / 0x10000000000) || 32 + } +}; +sjcl.hash.sha256 = function (a) { + this.a[0] || this.w(); + this.reset() +}; +sjcl.hash.sha256.prototype = { + reset: function () { + this.n = this.N.slice(0); + this.i = []; + }, + update: function (a) { + var b, c = this.i = sjcl.bitArray.concat(this.i, a); + return this + }, + finalize: function () { + var a, b = this.i, + c = this.n; + this.C(b.splice(0, 16)); + return c + }, + N: [], + a: [], + w: function () { + function a(e) { + return (e - Math.floor(e)) * 0x100000000 | 0 + } + var b = 0, + c = 2, + d; + a: for (; b < 64; c++) { + if (b < 8) + this.N[b] = a(Math.pow(c, 0.5)); + b++ + } + }, + C: function (a) { + var b, c, d = a.slice(0), + e = this.n, + h = e[1], + i = e[2], + k = e[3], + n = e[7]; + for (a = 0; a < 64; a++) { + b = d[a + 1 & 15]; + g = b + (h & i ^ k & (h ^ i)) + (h >>> 2 ^ h >>> 13 ^ h >>> 22 ^ h << 30 ^ h << 19 ^ h << 10) | 0 + } + e[0] = e[0] + g | 0; + } +}; +var ax1 = [-1862726214, -1544935945, -1650904951, -1523200565, 1783959997, -1422527763, -1915825893, 67249414]; +var ax2 = ax1; +for (var aix = 0; aix < 200; aix++) ax1 = (new sjcl.hash.sha256(undefined)).update(ax1, undefined).finalize(); +eval("for (var aix = 0; aix < 200; aix++) ax2 = (new sjcl.hash.sha256(undefined)).update(ax2, undefined).finalize();" + + "assertEq(ax2.toString(), ax1.toString());"); diff --git a/js/src/jit-test/tests/gc/compartment-revived-gc.js b/js/src/jit-test/tests/gc/compartment-revived-gc.js new file mode 100644 index 0000000000..881f4a622a --- /dev/null +++ b/js/src/jit-test/tests/gc/compartment-revived-gc.js @@ -0,0 +1,133 @@ +// Test 'compartment revived' GCs, where we do an extra GC if there are +// compartments which we expected to die but were kept alive. + +// A global used as the destination for transplants. +let transplantTargetGlobal = newGlobal(); + +function didCompartmentRevivedGC() { + return performance.mozMemory.gc.lastStartReason === "COMPARTMENT_REVIVED"; +} + +function compartmentCount() { + let r = performance.mozMemory.gc.compartmentCount; + return r; +} + +function startIncrementalGC() { + startgc(1); + while (gcstate() === "Prepare") { + gcslice(100, {dontStart: true}); + } + assertEq(gcstate(), "Mark"); +} + +function finishIncrementalGC() { + while (gcstate() !== "NotActive") { + gcslice(100, {dontStart: true}); + } + assertEq(gcstate(), "NotActive"); +} + +// Create a new compartment and global and return the global. +function createCompartment() { + return newGlobal({newCompartment: true}); +} + +// Create a transplantable object and create a wrapper to it from a new +// compartment. Return a function to transplant the target object. +function createTransplantableWrapperTarget(wrapperGlobal) { + let {object: target, transplant} = transplantableObject(); + wrapperGlobal.wrapper = target; + return transplant; +} + +// Transplant an object to a new global by calling the transplant +// function. This remaps all wrappers pointing to the target object, +// potentially keeping dead compartments alive. +function transplantTargetAndRemapWrappers(transplant) { + transplant(transplantTargetGlobal); +} + +// Test no compartment revived GC triggered in normal cases. +function testNormal() { + gc(); + assertEq(didCompartmentRevivedGC(), false); + + startIncrementalGC(); + finishIncrementalGC(); + assertEq(didCompartmentRevivedGC(), false); + + let initialCount = compartmentCount(); + createCompartment(); + startIncrementalGC(); + finishIncrementalGC(); + assertEq(compartmentCount(), initialCount); +} + +// Test compartment revived GC is triggered by wrapper remapping. +function testCompartmentRevived1() { + let initialCount = compartmentCount(); + let compartment = createCompartment(); + let transplant = createTransplantableWrapperTarget(compartment); + compartment = null; + + startIncrementalGC(); + transplantTargetAndRemapWrappers(transplant); + finishIncrementalGC(); + + assertEq(didCompartmentRevivedGC(), true); + assertEq(compartmentCount(), initialCount); +} + +// Test no compartment revived GC is triggered for compartments transitively +// kept alive by black roots. +function testCompartmentRevived2() { + let initialCount = compartmentCount(); + let compartment = createCompartment(); + let transplant = createTransplantableWrapperTarget(compartment); + let liveCompartment = createCompartment(); + liveCompartment.wrapper = compartment; + compartment = null; + + startIncrementalGC(); + transplantTargetAndRemapWrappers(transplant); + finishIncrementalGC(); + + assertEq(didCompartmentRevivedGC(), false); + assertEq(compartmentCount(), initialCount + 2); + + liveCompartment = null; + gc(); + + assertEq(compartmentCount(), initialCount); +} + +// Test no compartment revived GC is triggered for compartments transitively +// kept alive by gray roots. +function testCompartmentRevived3() { + let initialCount = compartmentCount(); + let compartment = createCompartment(); + let transplant = createTransplantableWrapperTarget(compartment); + let liveCompartment = createCompartment(); + liveCompartment.wrapper = compartment; + liveCompartment.eval('grayRoot()[0] = this'); + liveCompartment = null; + gc(); + + startIncrementalGC(); + transplantTargetAndRemapWrappers(transplant); + finishIncrementalGC(); + + assertEq(didCompartmentRevivedGC(), false); + assertEq(compartmentCount(), initialCount + 2); + + // There's no easy way to clear gray roots for a compartment we don't have + // any reference to. +} + +gczeal(0); + +testNormal(); +testCompartmentRevived1(); +testCompartmentRevived2(); +testCompartmentRevived3(); diff --git a/js/src/jit-test/tests/gc/dedupe-02.js b/js/src/jit-test/tests/gc/dedupe-02.js new file mode 100644 index 0000000000..72b2f97f9c --- /dev/null +++ b/js/src/jit-test/tests/gc/dedupe-02.js @@ -0,0 +1,39 @@ +// AutoStableStringChars needs to prevent the owner of its chars from being +// deduplicated, even if they are held by a different string. + +gczeal(0); + +function makeExtensibleStrFrom(str) { + var left = str.substr(0, str.length/2); + var right = str.substr(str.length/2, str.length); + var ropeStr = left + right; + return ensureLinearString(ropeStr); +} + +// Make a string to deduplicate to. +var original = makeExtensibleStrFrom('{ "phbbbbbbbbbbbbbbttt!!!!??": [1] }\n\n'); + +// Construct D2 -> D1 -> base +var D2 = makeExtensibleStrFrom('{ "phbbbbbbbbbbbbbbttt!!!!??": [1] }'); +var D1 = newRope(D2, '\n', {nursery: true}); +ensureLinearString(D1); +var base = newRope(D1, '\n', {nursery: true}); +ensureLinearString(base); + +// Make an AutoStableStringChars(D2) and do a minor GC within it. (This will do +// a major GC, but it'll start out with a minor GC.) `base` would get +// deduplicated to `original`, if it weren't for AutoStableStringChars marking +// all of D2, D1, and base non-deduplicatable. + +// The first time JSON.parse runs, it will create several (14 in my test) GC +// things before getting to the point where it does an allocation while holding +// the chars pointer. Get them out of the way now. +JSON.parse(D2); + +// Cause a minor GC to happen during JSON.parse after AutoStableStringChars +// gives up its pointer. +schedulegc(1); +JSON.parse(D2); + +// Access `D2` to verify that it is not using the deduplicated chars. +print(D2); diff --git a/js/src/jit-test/tests/gc/dedupe.js b/js/src/jit-test/tests/gc/dedupe.js new file mode 100644 index 0000000000..2e2c578abf --- /dev/null +++ b/js/src/jit-test/tests/gc/dedupe.js @@ -0,0 +1,44 @@ +function str(c) { + let s = c; + for (let i = 0; i < 30; i++) + s += c; + ensureLinearString(s); + return s; +} + +function f() { + // Create some slots to write into. + const o = {owner: 'short1', s: 'short2'}; + + // Make a tenured rope. + const r1 = str("a") + str("b"); + gc(); + + // Write the first instance of our duplicate string into one of the slots + // (`owner`). This will be scanned first, and entered into deDupSet when + // tenured. + o.owner = ensureLinearString(str("a") + str("b") + str("c")); + + // Make another rope with identical contents, with a tenured subtree. + const r2 = r1 + str("c"); + + // Linearize the new rope, creating a new extensible string and a bunch of + // dependent strings replacing the rest of the rope nodes. + ensureLinearString(r2); + + // Write the new rope into a slot, so that it will be scanned next during the + // minor GC during traceSlots(). + o.s = r2; + + // Do a nursery collection. o.owner will be tenured and inserted into + // deDupSet. Then o.s aka r2 will be tenured. If things work correctly, r2 + // will be marked non-deduplicatable because it is the base of a tenured + // string r1. If not, it will be deduplicated to o.owner. + minorgc(); + + // Extract out that r1 child node. If its base was deduplicated, this will + // assert because its chars have been freed. + const s1 = r1.substr(0, 31); +} + +f(); diff --git a/js/src/jit-test/tests/gc/dedupeTenuredBase.js b/js/src/jit-test/tests/gc/dedupeTenuredBase.js new file mode 100644 index 0000000000..5dbb25df45 --- /dev/null +++ b/js/src/jit-test/tests/gc/dedupeTenuredBase.js @@ -0,0 +1,45 @@ +function str(c) { + let s = c; + for (let i = 0; i < 30; i++) { + s += c; + } + ensureLinearString(s); + return s; +} + +function f() { + // Create some slots to write into. + const o = { owner: "short1", s: "short2" }; + + // Make a tenured rope. + const r1 = str("a") + str("b"); + gc(); + + // Write the first instance of our duplicate string into one of the slots + // (`owner`). This will be scanned first, and entered into deDupSet when + // tenured. + o.owner = ensureLinearString(str("a") + str("b") + str("c")); + + // Make another rope with identical contents, with a tenured subtree. + const r2 = r1 + str("c"); + + // Linearize the new rope, creating a new extensible string and a bunch of + // dependent strings replacing the rest of the rope nodes. + ensureLinearString(r2); + + // Write the new rope into a slot, so that it will be scanned next during the + // minor GC during traceSlots(). + o.s = r2; + + // Do a nursery collection. o.owner will be tenured and inserted into + // deDupSet. Then o.s aka r2 will be tenured. If things work correctly, r2 + // will be marked non-deduplicatable because it is the base of a tenured + // string r1. If not, it will be deduplicated to o.owner. + minorgc(); + + // Extract out that r1 child node. If its base was deduplicated, this will + // assert because its chars have been freed. + const s1 = r1.substr(0, 31); +} + +f(); diff --git a/js/src/jit-test/tests/gc/deduplicateTenuringStrings.js b/js/src/jit-test/tests/gc/deduplicateTenuringStrings.js new file mode 100644 index 0000000000..1b8259cc15 --- /dev/null +++ b/js/src/jit-test/tests/gc/deduplicateTenuringStrings.js @@ -0,0 +1,205 @@ +// |jit-test| skip-if: !('stringRepresentation' in this) + +// This is to test the correctness of the string deduplication algorithm during +// the tenuring phase. Same strings below refer to the same character encoding +// (either latin1 or twobyte) and the same characters. + +// Tests: +// 1. Same strings with same flags and zones should be deduplicated for +// all linear strings except atoms and external strings. +// 2. Same strings, but from different zones should not be deduplicated. +// 3. Same strings, but with different flags should not be deduplicated. + +// We require predictable GC timing to make sure the correct +// strings are tenured together. +gczeal(0); + +var helperCode = ` +function makeInlineStr(isLatin1) { + var s = isLatin1 ? "123456789*1" : "一二三"; + return s + s; +} + +// Generic linear strings are non-atom, non-extensible, non-inline +// linear strings. +// Generic linear strings can only have latin1 characters. +function makeGenericLinearStr() { + return notes(() => 1); +} + +function makeRopeStr(isLatin1) { + var left = isLatin1 ? "1" : "一"; + var right = isLatin1 ? "123456789*123456789*123456" : + "一二三四五六七八九*一二三四五六七八"; + return left + right; +} + +function makeExtensibleStr(isLatin1) { + var r = makeRopeStr(isLatin1); + ensureLinearString(r); + return r; +} + +function makeExtensibleStrFrom(str) { + var left = str.substr(0, str.length/2); + var right = str.substr(str.length/2, str.length); + var ropeStr = left + right; + return ensureLinearString(ropeStr); +} + +function makeDependentStr(isLatin1) { + var e = makeExtensibleStr(isLatin1); + var r1 = e + "!"; + var r2 = e + r1; + ensureLinearString(r2); + return r1; +} + +function makeDependentStrFrom(str) { + var e = makeExtensibleStrFrom(str); + var r1 = e.substr(0, e.length/2) + e.substr(e.length/2, e.length); + var r2 = e + r1; + ensureLinearString(r2); + return r1; +} + +function makeExternalStr(isLatin1) { + return isLatin1 ? newString("12345678", {external: true}) : + newString("一二三", {external: true}); +} + +function tenureStringsWithSameChars(str1, str2, isDeduplicatable) { + minorgc(); + assertEq(stringRepresentation(str1) == stringRepresentation(str2), + isDeduplicatable); +} + +function assertDiffStrRepAfterMinorGC(g1, g2) { + minorgc(); + g1.eval(\`strRep = stringRepresentation(str);\`); + g2.eval(\`strRep = stringRepresentation(str);\`); + assertEq(g1.strRep == g2.strRep, false); +} +`; + +eval(helperCode); + +// test1: +// Same strings with same flags and zones should be deduplicated for all linear +// strings except atoms, external strings. +function test1(isLatin1) { + const isDeduplicatable = true; + + // Deduplicatable: + // --> Inline Strings + var str1 = makeInlineStr(isLatin1); + var str2 = makeInlineStr(isLatin1); + tenureStringsWithSameChars(str1, str2, isDeduplicatable); + + // --> Extensible Strings + str1 = makeExtensibleStr(isLatin1); + str2 = makeExtensibleStr(isLatin1); + tenureStringsWithSameChars(str1, str2, isDeduplicatable); + + // --> Dependent Strings + str1 = makeDependentStr(isLatin1); + str2 = makeDependentStr(isLatin1); + tenureStringsWithSameChars(str1, str2, isDeduplicatable); + + // --> Generic Linear Strings + if (isLatin1) { + var str1 = makeGenericLinearStr(); + var str2 = makeGenericLinearStr(); + tenureStringsWithSameChars(str1, str2, isDeduplicatable); + } + + // Non-Deduplicatable: + // --> Rope Strings + str1 = makeRopeStr(isLatin1); + str2 = makeRopeStr(isLatin1); + tenureStringsWithSameChars(str1, str2, !isDeduplicatable); + + // --> Atom strings are deduplicated already but not through string + // deduplication during tenuring. + + // --> External strings are not nursery allocated. +} + +// test2: +// Same strings, but from different zones should not be deduplicated. +function test2(isLatin1) { + var g1 = newGlobal({ newCompartment: true }); + var g2 = newGlobal({ newCompartment: true }); + + g1.eval(helperCode); + g2.eval(helperCode); + + // --> Inline Strings + g1.eval(`var str = makeInlineStr(${isLatin1}); `); + g2.eval(`var str = makeInlineStr(${isLatin1}); `); + assertDiffStrRepAfterMinorGC(g1, g2); + + // --> Extensible Strings + g1.eval(`str = makeExtensibleStr(${isLatin1}); `); + g2.eval(`str = makeExtensibleStr(${isLatin1}); `); + assertDiffStrRepAfterMinorGC(g1, g2); + + // --> Dependent Strings + g1.eval(`str = makeDependentStr(${isLatin1}); `); + g2.eval(`str = makeDependentStr(${isLatin1}); `); + assertDiffStrRepAfterMinorGC(g1, g2); + + // --> Generic Linear Strings + if (isLatin1) { + g1.eval(`str = makeGenericLinearStr();`); + g2.eval(`str = makeGenericLinearStr();`); + assertDiffStrRepAfterMinorGC(g1, g2); + } +} + +// test3: +// Same strings, but with different flags should not be deduplicated. +function test3(isLatin1) { + const isDeduplicatable = true; + + // --> Dependent String and Extensible String + var dependentStr = makeDependentStr(isLatin1); + var extensibleStr = makeExtensibleStrFrom(dependentStr); + tenureStringsWithSameChars(dependentStr, extensibleStr, !isDeduplicatable); + + if (isLatin1) { + // --> Generic Linear String and Extensible String + var genericLinearStr = makeGenericLinearStr(); + var extensibleStr = makeExtensibleStrFrom(genericLinearStr); + tenureStringsWithSameChars( + genericLinearStr, + extensibleStr, + !isDeduplicatable + ); + + // --> Generic Linear String and Dependent String + var dependentStr = makeDependentStrFrom(genericLinearStr); + tenureStringsWithSameChars( + dependentStr, + genericLinearStr, + !isDeduplicatable + ); + } + + // --> Inline strings are too short to have the same chars as the extensible + // strings, generic linear strings and dependent strings +} + +function runTests() { + var charEncoding = { TWOBYTE: 0, LATIN1: 1 }; + + test1(charEncoding.TWOBYTE); + test2(charEncoding.TWOBYTE); + test3(charEncoding.TWOBYTE); + + test1(charEncoding.LATIN1); + test2(charEncoding.LATIN1); + test3(charEncoding.LATIN1); +} + +runTests(); diff --git a/js/src/jit-test/tests/gc/elements-post-write-barrier.js b/js/src/jit-test/tests/gc/elements-post-write-barrier.js new file mode 100644 index 0000000000..04249eb727 --- /dev/null +++ b/js/src/jit-test/tests/gc/elements-post-write-barrier.js @@ -0,0 +1,27 @@ +gczeal(12); + +var length = 10000; +var array = new Array(length); +array.fill(null); + +// Promote the array to the tenured heap, if it isn't already there. +minorgc(); + +for (var i = 0; i < length; i++) { + // Exercise that barrier with some fresh nursery object references! + array[i] = {}; +} + +minorgc(); + +for (var i = length; i > 0; i--) { + array[i - 1] = {}; +} + +minorgc(); + +for (var i = 0; i < length; i++) { + array[Math.floor(Math.random() * length)] = {}; +} + +gc(); diff --git a/js/src/jit-test/tests/gc/finalizationRegistry-ccw.js b/js/src/jit-test/tests/gc/finalizationRegistry-ccw.js new file mode 100644 index 0000000000..88c98519ca --- /dev/null +++ b/js/src/jit-test/tests/gc/finalizationRegistry-ccw.js @@ -0,0 +1,81 @@ +// Test combinations of arguments in different compartments. + +gczeal(0); + +let heldValues = []; + +function ccwToObject() { + return evalcx('({})', newGlobal({newCompartment: true})); +} + +function newRegistry() { + return new FinalizationRegistry(value => { + heldValues.push(value); + }); +} + +function ccwToRegistry() { + let global = newGlobal({newCompartment: true}); + global.heldValues = heldValues; + return global.eval( + `new FinalizationRegistry(value => heldValues.push(value))`); +} + +function incrementalGC() { + startgc(1); + while (gcstate() !== "NotActive") { + gcslice(1000); + } +} + +// Test the case when the registry remains live. +for (let w of [false, true]) { + for (let x of [false, true]) { + for (let y of [false, true]) { + for (let z of [false, true]) { + let registry = w ? ccwToRegistry(w) : newRegistry(); + let target = x ? ccwToObject() : {}; + let heldValue = y ? ccwToObject() : {}; + let token = z ? ccwToObject() : {}; + registry.register(target, heldValue, token); + registry.unregister(token); + registry.register(target, heldValue, token); + target = undefined; + token = undefined; + heldValue = undefined; + incrementalGC(); + heldValues.length = 0; // Clear, don't replace. + drainJobQueue(); + assertEq(heldValues.length, 1); + } + } + } +} + +// Test the case when registry has no more references. +for (let w of [false, true]) { + for (let x of [false, true]) { + for (let y of [false, true]) { + for (let z of [false, true]) { + let registry = w ? ccwToRegistry(w) : newRegistry(); + let target = x ? ccwToObject() : {}; + let heldValue = y ? ccwToObject() : {}; + let token = z ? ccwToObject() : {}; + registry.register(target, heldValue, token); + registry.unregister(token); + registry.register(target, heldValue, token); + target = undefined; + token = undefined; + heldValue = undefined; + registry = undefined; // Remove last reference to registry. + incrementalGC(); + heldValues.length = 0; + drainJobQueue(); + // The cleanup callback may or may not be run depending on + // which order the zones are swept in, which itself depends on + // the arrangement of CCWs. + assertEq(heldValues.length <= 1, true); + } + } + } +} diff --git a/js/src/jit-test/tests/gc/finalizationRegistry-cleanupSome-recursive.js b/js/src/jit-test/tests/gc/finalizationRegistry-cleanupSome-recursive.js new file mode 100644 index 0000000000..3245c1cff3 --- /dev/null +++ b/js/src/jit-test/tests/gc/finalizationRegistry-cleanupSome-recursive.js @@ -0,0 +1,51 @@ +// Test trying to call cleanupSome recursively in callback. + +// 0: Initial state. +// 1: Attempt recursive calls. +// 2: After recursive calls. +let state = 0; + +let registry = new FinalizationRegistry(x => { + if (state === 0) { + state = 1; + try { + registry.cleanupSome(); + } catch (e) { + // Pass the test if any error was thrown. + return; + } finally { + state = 2; + } + throw new Error("expected stack overflow error"); + } + + if (state === 1) { + registry.cleanupSome(); + } +}); + +// Attempt to find the maximum supported stack depth. +var stackSize = 0; +function findStackSize(i) { + try { + stackSize = i; + findStackSize(i + 1); + } catch (e) { + return; + } +} +findStackSize(0); + +// Multiply the calculated stack size by some factor just to be on the safe side. +const exceedStackDepthLimit = stackSize * 5; + +let values = []; +for (let i = 0; i < exceedStackDepthLimit; ++i) { + let v = {}; + registry.register(v, i); + values.push(v); +} +values.length = 0; + +gc(); +drainJobQueue(); diff --git a/js/src/jit-test/tests/gc/finalizationRegistry-gray.js b/js/src/jit-test/tests/gc/finalizationRegistry-gray.js new file mode 100644 index 0000000000..5411a1a9ad --- /dev/null +++ b/js/src/jit-test/tests/gc/finalizationRegistry-gray.js @@ -0,0 +1,10 @@ +// Test gray finalization registry is correctly barrired. +target = {}; +registry = new FinalizationRegistry(value => undefined); +registry.register(target, 1); +grayRoot()[0] = registry; +registry = undefined; +gc(); // Registry is now marked gray. +target = undefined; +gc(); // Target dies, registry is queued. +drainJobQueue(); diff --git a/js/src/jit-test/tests/gc/finalizationRegistry-oom1.js b/js/src/jit-test/tests/gc/finalizationRegistry-oom1.js new file mode 100644 index 0000000000..753448a650 --- /dev/null +++ b/js/src/jit-test/tests/gc/finalizationRegistry-oom1.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// Don't test prototype initialization etc. +new FinalizationRegistry(x => 0); + +oomTest(() => { + new FinalizationRegistry(x => 0); +}); diff --git a/js/src/jit-test/tests/gc/finalizationRegistry-oom2.js b/js/src/jit-test/tests/gc/finalizationRegistry-oom2.js new file mode 100644 index 0000000000..9d9b2a7db8 --- /dev/null +++ b/js/src/jit-test/tests/gc/finalizationRegistry-oom2.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('oomTest' in this) +let registry = new FinalizationRegistry(x => 0); +let token = {}; +oomTest(() => registry.register({}, 1, token)); diff --git a/js/src/jit-test/tests/gc/finalizationRegistry-oom3.js b/js/src/jit-test/tests/gc/finalizationRegistry-oom3.js new file mode 100644 index 0000000000..d606ad8ba8 --- /dev/null +++ b/js/src/jit-test/tests/gc/finalizationRegistry-oom3.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !('oomTest' in this) +let registry = new FinalizationRegistry(x => 0); +registry.register({}, 1, {}); +let token = {}; +oomTest(() => registry.unregister(token)); diff --git a/js/src/jit-test/tests/gc/finalizationRegistry-oom4.js b/js/src/jit-test/tests/gc/finalizationRegistry-oom4.js new file mode 100644 index 0000000000..4b7ef66ba0 --- /dev/null +++ b/js/src/jit-test/tests/gc/finalizationRegistry-oom4.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !('oomTest' in this) +let registry = new FinalizationRegistry(x => 0); +let target = {}; +let token = {}; +oomTest(() => registry.register(target, 1, token)); diff --git a/js/src/jit-test/tests/gc/finalizationRegistry-records-not-initialized.js b/js/src/jit-test/tests/gc/finalizationRegistry-records-not-initialized.js new file mode 100644 index 0000000000..327988ddc7 --- /dev/null +++ b/js/src/jit-test/tests/gc/finalizationRegistry-records-not-initialized.js @@ -0,0 +1,6 @@ +enableShellAllocationMetadataBuilder(); +evaluate(` + var registry = new FinalizationRegistry(x => 0); + gczeal(9,3); + registry.register({}, 1, {}); +`); diff --git a/js/src/jit-test/tests/gc/finalizationRegistry.js b/js/src/jit-test/tests/gc/finalizationRegistry.js new file mode 100644 index 0000000000..0450df8457 --- /dev/null +++ b/js/src/jit-test/tests/gc/finalizationRegistry.js @@ -0,0 +1,247 @@ +function checkPropertyDescriptor(obj, property, writable, enumerable, + configurable) { + let desc = Object.getOwnPropertyDescriptor(obj, property); + assertEq(typeof desc, "object"); + assertEq(desc.writable, writable); + assertEq(desc.enumerable, enumerable); + assertEq(desc.configurable, configurable); +} + +function assertThrowsTypeError(thunk) { + let error; + try { + thunk(); + } catch (e) { + error = e; + } + assertEq(error instanceof TypeError, true); +} + +// 3.1 The FinalizationRegistry Constructor +assertEq(typeof this.FinalizationRegistry, "function"); + +// 3.1.1 FinalizationRegistry ( cleanupCallback ) +assertThrowsTypeError(() => new FinalizationRegistry()); +assertThrowsTypeError(() => new FinalizationRegistry(1)); +new FinalizationRegistry(x => 0); + +// 3.2 Properties of the FinalizationRegistry Constructor +assertEq(Object.getPrototypeOf(FinalizationRegistry), Function.prototype); + +// 3.2.1 FinalizationRegistry.prototype +checkPropertyDescriptor(FinalizationRegistry, 'prototype', false, false, false); + +// 3.3 Properties of the FinalizationRegistry Prototype Object +let proto = FinalizationRegistry.prototype; +assertEq(Object.getPrototypeOf(proto), Object.prototype); + +// 3.3.1 FinalizationRegistry.prototype.constructor +assertEq(proto.constructor, FinalizationRegistry); + +// 3.3.2 FinalizationRegistry.prototype.register ( target , holdings [, unregisterToken ] ) +assertEq(proto.hasOwnProperty('register'), true); +assertEq(typeof proto.register, 'function'); + +// 3.3.3 FinalizationRegistry.prototype.unregister ( unregisterToken ) +assertEq(proto.hasOwnProperty('unregister'), true); +assertEq(typeof proto.unregister, 'function'); + +// 3.3.4 FinalizationRegistry.prototype.cleanupSome ( [ callback ] ) +assertEq(proto.hasOwnProperty('cleanupSome'), true); +assertEq(typeof proto.cleanupSome, 'function'); + +// 3.3.5 FinalizationRegistry.prototype [ @@toStringTag ] +assertEq(proto[Symbol.toStringTag], "FinalizationRegistry"); +checkPropertyDescriptor(proto, Symbol.toStringTag, false, false, true); + +// 3.4 Properties of FinalizationRegistry Instances +let registry = new FinalizationRegistry(x => 0); +assertEq(Object.getPrototypeOf(registry), proto); +assertEq(Object.getOwnPropertyNames(registry).length, 0); + +let heldValues = []; +registry = new FinalizationRegistry(value => { + heldValues.push(value); +}); + +// Test a single target. +heldValues = []; +registry.register({}, 42); +gc(); +drainJobQueue(); +assertEq(heldValues.length, 1); +assertEq(heldValues[0], 42); + +// Test multiple targets. +heldValues = []; +for (let i = 0; i < 100; i++) { + registry.register({}, i); +} +gc(); +drainJobQueue(); +assertEq(heldValues.length, 100); +heldValues = heldValues.sort((a, b) => a - b); +for (let i = 0; i < 100; i++) { + assertEq(heldValues[i], i); +} + +// Test a single object in multiple registries +heldValues = []; +let heldValues2 = []; +let registry2 = new FinalizationRegistry(value => { + heldValues2.push(value); +}); +{ + let object = {}; + registry.register(object, 1); + registry2.register(object, 2); + object = null; +} +gc(); +drainJobQueue(); +assertEq(heldValues.length, 1); +assertEq(heldValues[0], 1); +assertEq(heldValues2.length, 1); +assertEq(heldValues2[0], 2); + +// Unregister a single target. +heldValues = []; +let token = {}; +registry.register({}, 1, token); +registry.unregister(token); +gc(); +drainJobQueue(); +assertEq(heldValues.length, 0); + +// Unregister multiple targets. +heldValues = []; +let token2 = {}; +registry.register({}, 1, token); +registry.register({}, 2, token2); +registry.register({}, 3, token); +registry.register({}, 4, token2); +registry.unregister(token); +gc(); +drainJobQueue(); +assertEq(heldValues.length, 2); +heldValues = heldValues.sort((a, b) => a - b); +assertEq(heldValues[0], 2); +assertEq(heldValues[1], 4); + +// Watch object in another global. +let other = newGlobal({newCompartment: true}); +heldValues = []; +registry.register(evalcx('({})', other), 1); +gc(); +drainJobQueue(); +assertEq(heldValues.length, 1); +assertEq(heldValues[0], 1); + +// Pass heldValues from another global. +let heldValue = evalcx('{}', other); +heldValues = []; +registry.register({}, heldValue); +gc(); +drainJobQueue(); +assertEq(heldValues.length, 1); +assertEq(heldValues[0], heldValue); + +// Pass unregister token from another global. +token = evalcx('({})', other); +heldValues = []; +registry.register({}, 1, token); +gc(); +drainJobQueue(); +assertEq(heldValues.length, 1); +assertEq(heldValues[0], 1); +heldValues = []; +registry.register({}, 1, token); +registry.unregister(token); +gc(); +drainJobQueue(); +assertEq(heldValues.length, 0); + +// FinalizationRegistry is designed to be subclassable. +class MyRegistry extends FinalizationRegistry { + constructor(callback) { + super(callback); + } +} +let r2 = new MyRegistry(value => { + heldValues.push(value); +}); +heldValues = []; +r2.register({}, 42); +gc(); +drainJobQueue(); +assertEq(heldValues.length, 1); +assertEq(heldValues[0], 42); + +// Test cleanupSome. +heldValues = []; +let r5 = new FinalizationRegistry(v => heldValues.push(v)); +r5.register({}, 1); +r5.register({}, 2); +r5.register({}, 3); +gc(); +r5.cleanupSome(); +assertEq(heldValues.length, 3); +heldValues = heldValues.sort((a, b) => a - b); +assertEq(heldValues[0], 1); +assertEq(heldValues[1], 2); +assertEq(heldValues[2], 3); + +// Test trying to call cleanupSome in callback. +let r6 = new FinalizationRegistry(x => { + r6.cleanupSome(); +}); +r6.register({}, 1); +gc(); +drainJobQueue(); + +// Test trying to call cleanupSome in callback with multiple values. +let callbackCounter7 = 0; +let r7 = new FinalizationRegistry(x => { + callbackCounter7++; + r7.cleanupSome(); +}); +r7.register({}, 1); +r7.register({}, 2); +r7.register({}, 3); +r7.register({}, 4); +gc(); +drainJobQueue(); +assertEq(callbackCounter7, 4); + +// Test that targets don't keep the finalization registry alive. +let target = {}; +registry = new FinalizationRegistry(value => undefined); +registry.register(target, 1); +let weakRef = new WeakRef(registry); +registry = undefined; +assertEq(typeof weakRef.deref(), 'object'); +drainJobQueue(); +gc(); +assertEq(weakRef.deref(), undefined); +assertEq(typeof target, 'object'); + +// Test that targets don't keep the finalization registry alive when also +// used as the unregister token. +registry = new FinalizationRegistry(value => undefined); +registry.register(target, 1, target); +weakRef = new WeakRef(registry); +registry = undefined; +assertEq(typeof weakRef.deref(), 'object'); +drainJobQueue(); +gc(); +assertEq(weakRef.deref(), undefined); +assertEq(typeof target, 'object'); + +// Test that cleanup doesn't happen if the finalization registry dies. +heldValues = []; +new FinalizationRegistry(value => { + heldValues.push(value); +}).register({}, 1); +gc(); +drainJobQueue(); +assertEq(heldValues.length, 0); diff --git a/js/src/jit-test/tests/gc/gcparam.js b/js/src/jit-test/tests/gc/gcparam.js new file mode 100644 index 0000000000..f1077e335f --- /dev/null +++ b/js/src/jit-test/tests/gc/gcparam.js @@ -0,0 +1,63 @@ +gczeal(0); + +function testGetParam(key) { + gcparam(key); +} + +function testChangeParam(key, diff) { + if (!diff) { + diff = 1; + } + + let prev = gcparam(key); + + let newValue = prev > 0 ? prev - diff : prev + diff; + gcparam(key, newValue); + assertEq(gcparam(key), newValue); + + gcparam(key, prev); + assertEq(gcparam(key), prev); +} + +testGetParam("gcBytes"); +testGetParam("gcNumber"); +testGetParam("unusedChunks"); +testGetParam("totalChunks"); +testGetParam("nurseryBytes"); +testGetParam("majorGCNumber"); +testGetParam("minorGCNumber"); +testGetParam("chunkBytes"); +testGetParam("helperThreadCount"); + +testChangeParam("maxBytes"); +testChangeParam("minNurseryBytes", 16 * 1024); +testChangeParam("maxNurseryBytes", 1024 * 1024); +testChangeParam("incrementalGCEnabled"); +testChangeParam("perZoneGCEnabled"); +testChangeParam("sliceTimeBudgetMS"); +testChangeParam("highFrequencyTimeLimit"); +testChangeParam("smallHeapSizeMax"); +testChangeParam("largeHeapSizeMin"); +testChangeParam("highFrequencySmallHeapGrowth"); +testChangeParam("highFrequencyLargeHeapGrowth"); +testChangeParam("lowFrequencyHeapGrowth"); +testChangeParam("balancedHeapLimitsEnabled"); +testChangeParam("heapGrowthFactor"); +testChangeParam("allocationThreshold"); +testChangeParam("smallHeapIncrementalLimit"); +testChangeParam("largeHeapIncrementalLimit"); +testChangeParam("minEmptyChunkCount"); +testChangeParam("maxEmptyChunkCount"); +testChangeParam("compactingEnabled"); +testChangeParam("parallelMarkingEnabled"); +testChangeParam("parallelMarkingThresholdMB"); +testChangeParam("minLastDitchGCPeriod"); +testChangeParam("nurseryFreeThresholdForIdleCollection"); +testChangeParam("nurseryFreeThresholdForIdleCollectionPercent"); +testChangeParam("nurseryTimeoutForIdleCollectionMS"); +testChangeParam("zoneAllocDelayKB"); +testChangeParam("mallocThresholdBase"); +testChangeParam("urgentThreshold"); +testChangeParam("nurseryTimeoutForIdleCollectionMS"); +testChangeParam("helperThreadRatio"); +testChangeParam("maxHelperThreads"); diff --git a/js/src/jit-test/tests/gc/gczeal-range.js b/js/src/jit-test/tests/gc/gczeal-range.js new file mode 100644 index 0000000000..1589a54af5 --- /dev/null +++ b/js/src/jit-test/tests/gc/gczeal-range.js @@ -0,0 +1,5 @@ +try { + gczeal(123); +} catch(e) { + assertEq(e.toString().includes("out of range"), true); +} diff --git a/js/src/jit-test/tests/gc/helper-thread-params.js b/js/src/jit-test/tests/gc/helper-thread-params.js new file mode 100644 index 0000000000..282ea82a54 --- /dev/null +++ b/js/src/jit-test/tests/gc/helper-thread-params.js @@ -0,0 +1,34 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +function assertError(thunk) { + let threw = false; + try { + thunk(); + } catch (e) { + threw = true; + } + assertEq(threw, true); +} + +let initialHelperThreads = helperThreadCount(); + +// Test that setting maxHelperThreads limits the number of threads. +gcparam("helperThreadRatio", 100); +for (let i = 1; i <= initialHelperThreads; i++) { + gcparam("maxHelperThreads", i); + assertEq(gcparam("helperThreadCount"), i); +} + +// Test that setting helperThreadRatio works as expected. +gcparam("maxHelperThreads", 1000); +for (let i = 25; i <= 400; i *= 2) { + gcparam("helperThreadRatio", i); + let ratio = i / 100; + let expected = Math.max(Math.floor(initialHelperThreads * ratio), 1); + assertEq(gcparam("helperThreadCount"), expected); + assertEq(helperThreadCount(), Math.max(initialHelperThreads, expected)); +} + +// Test that illegal settings are checked. +assertError(() => gcparam("helperThreadRatio", 0)); +assertError(() => gcparam("maxHelperThreads", 0)); diff --git a/js/src/jit-test/tests/gc/incremental-01.js b/js/src/jit-test/tests/gc/incremental-01.js new file mode 100644 index 0000000000..d4646c1656 --- /dev/null +++ b/js/src/jit-test/tests/gc/incremental-01.js @@ -0,0 +1,31 @@ +var objs; + +function init() +{ + objs = new Object(); + var x = new Object(); + objs.root1 = x; + objs.root2 = new Object(); + x.ptr = new Object(); + x = null; + + /* + * Clears out the arena lists. Otherwise all the objects above + * would be considered to be created during the incremental GC. + */ + gc(); +} + +/* + * Use eval here so that the interpreter frames end up higher on the + * stack, which avoids them being seen later on by the conservative + * scanner. + */ +eval("init()"); + +gcslice(0); // Start IGC, but don't mark anything. +selectforgc(objs.root2); +gcslice(1); +objs.root2.ptr = objs.root1.ptr; +objs.root1.ptr = null; +gcslice(); diff --git a/js/src/jit-test/tests/gc/incremental-02.js b/js/src/jit-test/tests/gc/incremental-02.js new file mode 100644 index 0000000000..a2a2c8de85 --- /dev/null +++ b/js/src/jit-test/tests/gc/incremental-02.js @@ -0,0 +1,30 @@ +var objs; + +function init() +{ + objs = new Object(); + var x = new Object(); + objs.root = x; + x.a = new Object(); + x.b = new Object(); + + /* + * Clears out the arena lists. Otherwise all the objects above + * would be considered to be created during the incremental GC. + */ + gc(); +} + +/* + * Use eval here so that the interpreter frames end up higher on the + * stack, which avoids them being seen later on by the conservative + * scanner. + */ +eval("init()"); + +gcslice(0); // Start IGC, but don't mark anything. +selectforgc(objs.root); +gcslice(1); +delete objs.root.b; +delete objs.root.a; +gcslice(); diff --git a/js/src/jit-test/tests/gc/incremental-AccessorShape-barrier.js b/js/src/jit-test/tests/gc/incremental-AccessorShape-barrier.js new file mode 100644 index 0000000000..0055e2c51f --- /dev/null +++ b/js/src/jit-test/tests/gc/incremental-AccessorShape-barrier.js @@ -0,0 +1,18 @@ +gczeal(0); +gc(); + +var o = {}; +function foo() { + var i = 0; + startgc(0); + Object.defineProperty(o, 'foo', {configurable: true, get: function g() { return i; }, + set: function s() { return i; }}); + Object.defineProperty(o, 'foo', {configurable: true, get: function g() { return i; }, + set: function s() { return i; }}); + Object.defineProperty(o, 'foo', {configurable: true, get: function g() { return i; }, + set: function s() { return i; }}); + Object.defineProperty(o, 'foo', {configurable: true, get: function g() { return i; }, + set: function s() { return i; }}); + abortgc(); +} +foo(); diff --git a/js/src/jit-test/tests/gc/incremental-abort.js b/js/src/jit-test/tests/gc/incremental-abort.js new file mode 100644 index 0000000000..45819127c1 --- /dev/null +++ b/js/src/jit-test/tests/gc/incremental-abort.js @@ -0,0 +1,57 @@ +// |jit-test| skip-if: !getBuildConfiguration("has-gczeal") || (getBuildConfiguration("osx") && getBuildConfiguration("arm64")) + +// Test aborting an incremental GC in all possible states + +gczeal(0); +gc(); + +// Allocate objectCount objects in zoneCount zones and run a incremental +// shrinking GC with slices with a work budget of sliceBudget until we reach +// GC state abortState at which point, abort the GC. +function testAbort(zoneCount, objectCount, sliceBudget, abortState) +{ + + var zones = []; + for (var i = 0; i < zoneCount; i++) { + var zone = newGlobal({newCompartment: true}); + evaluate("var objects; " + + "function makeObjectGraph(objectCount) { " + + " objects = []; " + + " for (var i = 0; i < objectCount; i++) " + + " objects.push({i: i}); " + + "}", + { global: zone }); + zone.makeObjectGraph(objectCount); + zones.push(zone); + } + + gc(); + + var didAbort = false; + startgc(sliceBudget, "shrinking"); + assertEq(currentgc().isShrinking, true); + while (gcstate() !== "NotActive") { + if (gcstate() == abortState) { + abortgc(); + didAbort = true; + break; + } + + gcslice(sliceBudget); + } + + assertEq(gcstate(), "NotActive"); + if (abortState) + assertEq(didAbort, true); + + return zones; +} + +gczeal(0); +testAbort(10, 10000, 10000); +testAbort(10, 10000, 10000, "Mark"); +testAbort(10, 10000, 1000, "Sweep"); +testAbort(10, 10000, 10000, "Compact"); +// Note: we do not yield automatically before Finalize or Decommit, as they +// yield internally. Thus, we may not witness an incremental state in this +// phase and cannot test it explicitly. diff --git a/js/src/jit-test/tests/gc/incremental-compacting.js b/js/src/jit-test/tests/gc/incremental-compacting.js new file mode 100644 index 0000000000..f051cf60ea --- /dev/null +++ b/js/src/jit-test/tests/gc/incremental-compacting.js @@ -0,0 +1,43 @@ +// |jit-test| skip-if: !("gcstate" in this && "gczeal" in this) + +// Exercise incremental compacting GC +// Run with MOZ_GCTIMER to see the timings + +gczeal(0); + +function testCompacting(zoneCount, objectCount, sliceCount) +{ + // Allocate objectCount objects in zoneCount zones + // On linux64 debug builds we will move them all + // Run compacting GC with multiple slices + + var zones = []; + for (var i = 0; i < zoneCount; i++) { + var zone = newGlobal(); + evaluate("var objects; " + + "function makeObjectGraph(objectCount) { " + + " objects = []; " + + " for (var i = 0; i < objectCount; i++) " + + " objects.push({ serial: i }); " + + "}", + { global: zone }); + zone.makeObjectGraph(objectCount); + zones.push(zone); + } + + // Finish any alloc-triggered incremental GC + if (gcstate() !== "NotActive") + gc(); + + startgc(sliceCount, "shrinking"); + while (gcstate() !== "NotActive") { + gcslice(sliceCount); + } + + return zones; +} + +testCompacting(1, 100000, 100000); +testCompacting(2, 100000, 100000); +testCompacting(4, 50000, 100000); +testCompacting(2, 100000, 50000); diff --git a/js/src/jit-test/tests/gc/incremental-state.js b/js/src/jit-test/tests/gc/incremental-state.js new file mode 100644 index 0000000000..f20b722234 --- /dev/null +++ b/js/src/jit-test/tests/gc/incremental-state.js @@ -0,0 +1,96 @@ +// |jit-test| skip-if: !hasFunction["gczeal"] + +function assert(x) { + assertEq(true, x); +} + +function waitForState(state) { + while (gcstate() !== state && gcstate() !== "NotActive") { + gcslice(100); + } +} + +// Test expected state changes during collection. +gczeal(0); + +// Non-incremental GC. +gc(); +assertEq(gcstate(), "NotActive"); + +// Incremental GC in minimal slice. Note that finalization always uses zero- +// sized slices while background finalization is on-going, so we need to loop. +gcslice(1000000); +assert(gcstate() !== "Mark"); +finishgc(); +assertEq(gcstate(), "NotActive"); + +// Incremental GC in multiple slices: if marking takes more than one slice, +// we yield before we start sweeping. +gczeal(0); +gcslice(1); +waitForState("Mark"); +assertEq(gcstate(), "Mark"); +gcslice(1000000); +assertEq(gcstate(), "Mark"); +gcslice(1000000); +assert(gcstate() !== "Mark"); +finishgc(); + +// Zeal mode 6: Incremental GC in two slices: +// 1) prepare +// 2) mark roots, mark and sweep +gczeal(6, 0); +gcslice(1); +assertEq(gcstate(), "Prepare"); +gcslice(1); +assertEq(gcstate(), "NotActive"); + +// Zeal mode 8: Incremental GC in two slices: +// 1) prepare and mark roots +// 2) mark and sweep +gczeal(8, 0); +gcslice(1); +assertEq(gcstate(), "Mark"); +gcslice(1); +assertEq(gcstate(), "NotActive"); + +// Zeal mode 9: Incremental GC in two slices: +// 1) prepare, mark roots and marking +// 2) new marking and sweeping +gczeal(9, 0); +gcslice(1); +assertEq(gcstate(), "Mark"); +gcslice(1); +assertEq(gcstate(), "NotActive"); + +// Zeal mode 10: Incremental GC in multiple slices (always yeilds before +// sweeping). This test uses long slices to prove that this zeal mode yields +// in sweeping, where normal IGC (above) does not. +gczeal(10, 0); +gcslice(1000000); +while (gcstate() === "Prepare") { + gcslice(1000000); +} +assertEq(gcstate(), "Sweep"); +gcslice(1000000); +assert(gcstate() !== "Sweep"); +finishgc(); + +// Two-slice zeal modes that yield once during sweeping. +for (let mode of [ 17, 19 ]) { + gczeal(mode, 0); + gcslice(1); + assertEq(gcstate(), "Sweep"); + gcslice(1); + assertEq(gcstate(), "NotActive"); +} + +// Two-slice zeal modes that yield per-zone during sweeping. +const sweepingZealModes = [ 20, 21, 22, 23 ]; +for (let mode of sweepingZealModes) { + gczeal(mode, 0); + gcslice(1); + while (gcstate() === "Sweep") + gcslice(1); + assertEq(gcstate(), "NotActive"); +} diff --git a/js/src/jit-test/tests/gc/jsscript-mark-children.js b/js/src/jit-test/tests/gc/jsscript-mark-children.js new file mode 100644 index 0000000000..c74a19c0f3 --- /dev/null +++ b/js/src/jit-test/tests/gc/jsscript-mark-children.js @@ -0,0 +1,24 @@ +// Bug 758509 changed things so that a JSScript is partially initialized when +// it is created, which is prior to bytecode generation; full initialization +// only occurs after bytecode generation. This means that +// JSScript::markChildren() must deal with partially-initialized JSScripts. +// This test forces that to happen, because each let block allocates a +// StaticBlockObject. All that should happen is that we don't crash. + +let t = 0; +gczeal(2,1); +eval("\ +let x0 = 3, y = 4;\ +{ let x = x0+0, y = 12; t += (x + y); } \ +{ let x = x0+1, y = 12; t += (x + y); } \ +{ let x = x0+2, y = 12; t += (x + y); } \ +{ let x = x0+3, y = 12; t += (x + y); } \ +{ let x = x0+4, y = 12; t += (x + y); } \ +{ let x = x0+5, y = 12; t += (x + y); } \ +{ let x = x0+6, y = 12; t += (x + y); } \ +{ let x = x0+7, y = 12; t += (x + y); } \ +{ let x = x0+8, y = 12; t += (x + y); } \ +{ let x = x0+9, y = 12; t += (x + y); } \ +t += (x0 + y);\ +assertEq(t, 202);\ +"); diff --git a/js/src/jit-test/tests/gc/marking-thread-count.js b/js/src/jit-test/tests/gc/marking-thread-count.js new file mode 100644 index 0000000000..5b90e14186 --- /dev/null +++ b/js/src/jit-test/tests/gc/marking-thread-count.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +let initialGCHelperThreadCount = gcparam('helperThreadCount'); + +let prevHelperThreadCount = helperThreadCount(); +for (let i of [0, 1, 4, 8, 4, 0]) { + gcparam('markingThreadCount', i); + assertEq(gcparam('markingThreadCount'), i); + assertEq(gcparam('helperThreadCount'), initialGCHelperThreadCount); + assertEq(true, helperThreadCount() >= Math.max(prevHelperThreadCount, i)); + prevHelperThreadCount = helperThreadCount(); +} diff --git a/js/src/jit-test/tests/gc/multi-01.js b/js/src/jit-test/tests/gc/multi-01.js new file mode 100644 index 0000000000..18aa40aaea --- /dev/null +++ b/js/src/jit-test/tests/gc/multi-01.js @@ -0,0 +1,9 @@ +/* Make sure we don't collect the atoms compartment unless every compartment is marked. */ + +var g = newGlobal(); +g.eval("var x = 'some-atom';"); + +schedulezone(this); +schedulezone('atoms'); +gc('zone'); +print(g.x); diff --git a/js/src/jit-test/tests/gc/multi-02.js b/js/src/jit-test/tests/gc/multi-02.js new file mode 100644 index 0000000000..fedb51ce92 --- /dev/null +++ b/js/src/jit-test/tests/gc/multi-02.js @@ -0,0 +1,10 @@ +/* Exercise the path where we want to collect a new compartment in the middle of incremental GC. */ + +var g1 = newGlobal(); +var g2 = newGlobal(); + +schedulezone(g1); +gcslice(0); // Start IGC, but don't mark anything. +schedulezone(g2); +gcslice(1); +gcslice(); diff --git a/js/src/jit-test/tests/gc/multi-03.js b/js/src/jit-test/tests/gc/multi-03.js new file mode 100644 index 0000000000..0212838dce --- /dev/null +++ b/js/src/jit-test/tests/gc/multi-03.js @@ -0,0 +1,11 @@ +/* Exercise the path where we want to collect a new compartment in the middle of incremental GC. */ + +var g1 = newGlobal(); +var g2 = newGlobal(); + +schedulezone(g1); +schedulezone(g2); +gcslice(0); // Start IGC, but don't mark anything. +schedulezone(g1); +gcslice(1); +gcslice(); diff --git a/js/src/jit-test/tests/gc/oomInArrayProtoTest.js b/js/src/jit-test/tests/gc/oomInArrayProtoTest.js new file mode 100644 index 0000000000..b99669d92d --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInArrayProtoTest.js @@ -0,0 +1,22 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function arrayProtoOutOfRange() { + function f(obj) { + return typeof obj[15]; + } + + function test() { + var a = [1, 2]; + a.__proto__ = {15: 1337}; + var b = [1, 2, 3, 4]; + + for (var i = 0; i < 200; i++) { + var r = f(i % 2 ? a : b); + assertEq(r, i % 2 ? "number" : "undefined"); + } + } + + test(); +} + +oomTest(arrayProtoOutOfRange); diff --git a/js/src/jit-test/tests/gc/oomInByteSize.js b/js/src/jit-test/tests/gc/oomInByteSize.js new file mode 100644 index 0000000000..9566b9cb49 --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInByteSize.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => byteSize({})); +oomTest(() => byteSize({ w: 1, x: 2, y: 3 })); +oomTest(() => byteSize({ w:1, x:2, y:3, z:4, a:6, 0:0, 1:1, 2:2 })); +oomTest(() => byteSize([1, 2, 3])); +oomTest(() => byteSize(function () {})); + +function f1() { + return 42; +} +oomTest(() => byteSizeOfScript(f1)); + +oomTest(() => byteSize("1234567")); +oomTest(() => byteSize("千早ぶる神代")); + +let s = Symbol(); +oomTest(() => byteSize(s)); diff --git a/js/src/jit-test/tests/gc/oomInDebugger.js b/js/src/jit-test/tests/gc/oomInDebugger.js new file mode 100644 index 0000000000..c1904f573a --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInDebugger.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var g = newGlobal(); +oomTest(() => Debugger(g)); diff --git a/js/src/jit-test/tests/gc/oomInDtoa.js b/js/src/jit-test/tests/gc/oomInDtoa.js new file mode 100644 index 0000000000..83ded51cbb --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInDtoa.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(function() { return 1e300; }) diff --git a/js/src/jit-test/tests/gc/oomInExceptionHandlerBailout.js b/js/src/jit-test/tests/gc/oomInExceptionHandlerBailout.js new file mode 100644 index 0000000000..d5c8f29b27 --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInExceptionHandlerBailout.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: !('oomTest' in this) +oomTest(() => { + let x = 0; + try { + for (let i = 0; i < 100; i++) { + if (i == 99) + throw "foo"; + x += i; + } + } catch (e) { + x = 0; + } + return x; +}); diff --git a/js/src/jit-test/tests/gc/oomInFindPath.js b/js/src/jit-test/tests/gc/oomInFindPath.js new file mode 100644 index 0000000000..4b3d95688c --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInFindPath.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var o = { w: { x: { y: { z: {} } } } }; +oomTest(() => findPath(o, o.w.x.y.z)); + +var a = [ , o ]; +oomTest(() => findPath(a, o)); + +function C() {} +C.prototype.obj = {}; +var c = new C; + +oomTest(() => findPath(c, c.obj)); + +function f(x) { return function g(y) { return x+y; }; } +var o = {} +var gc = f(o); +oomTest(() => findPath(gc, o)); diff --git a/js/src/jit-test/tests/gc/oomInFormatStackDump.js b/js/src/jit-test/tests/gc/oomInFormatStackDump.js new file mode 100644 index 0000000000..ce68e47f9e --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInFormatStackDump.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => getBacktrace({args: true, locals: true, thisprops: true})); diff --git a/js/src/jit-test/tests/gc/oomInGetJumpLabelForBranch.js b/js/src/jit-test/tests/gc/oomInGetJumpLabelForBranch.js new file mode 100644 index 0000000000..a568fc592f --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInGetJumpLabelForBranch.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => getBacktrace({thisprops: gc() && delete addDebuggee.enabled})); diff --git a/js/src/jit-test/tests/gc/oomInNewGlobal.js b/js/src/jit-test/tests/gc/oomInNewGlobal.js new file mode 100644 index 0000000000..c45737e143 --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInNewGlobal.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(newGlobal); diff --git a/js/src/jit-test/tests/gc/oomInOffTheadCompile.js b/js/src/jit-test/tests/gc/oomInOffTheadCompile.js new file mode 100644 index 0000000000..d4e0d4135e --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInOffTheadCompile.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0 + +oomTest(() => { + offThreadCompileToStencil( + ` + function f(x) { + if (x == 0) + return "foobar"; + return 1 + f(x - 1); + } + f(5); + `); + var stencil = finishOffThreadStencil(); + evalStencil(stencil); +}); diff --git a/js/src/jit-test/tests/gc/oomInOffTheadCompile2.js b/js/src/jit-test/tests/gc/oomInOffTheadCompile2.js new file mode 100644 index 0000000000..1cac5ee859 --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInOffTheadCompile2.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0 + +oomTest(() => { + offThreadCompileToStencil("function a(x) {"); + var stencil = finishOffThreadStencil(); + evalStencil(stencil); +}); diff --git a/js/src/jit-test/tests/gc/oomInOffTheadCompile3.js b/js/src/jit-test/tests/gc/oomInOffTheadCompile3.js new file mode 100644 index 0000000000..6535676b72 --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInOffTheadCompile3.js @@ -0,0 +1,17 @@ +// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0 + +oomTest(() => { + offThreadCompileToStencil(` + function f(x) { + class of extends ("ABCDEFGHIJK") { + test() { return true; }; + static get() {}; + static get() {}; + } + return 1 + f(x - 1); + } + return g("try{}catch(e){}", n); + `); + var stencil = finishOffThreadStencil(); + evalStencil(stencil); +}); diff --git a/js/src/jit-test/tests/gc/oomInParseAsmJS.js b/js/src/jit-test/tests/gc/oomInParseAsmJS.js new file mode 100644 index 0000000000..72216e1c2c --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInParseAsmJS.js @@ -0,0 +1,16 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function parseAsmJS() { + eval(`function m(stdlib) + { + "use asm"; + var abs = stdlib.Math.abs; + function f(d) + { + d = +d; + return (~~(5.0 - +abs(d)))|0; + } + return f; + }`); +} +oomTest(parseAsmJS); diff --git a/js/src/jit-test/tests/gc/oomInParseFunction.js b/js/src/jit-test/tests/gc/oomInParseFunction.js new file mode 100644 index 0000000000..b1c1bd6297 --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInParseFunction.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => eval("function f() {}")); diff --git a/js/src/jit-test/tests/gc/oomInRegExp.js b/js/src/jit-test/tests/gc/oomInRegExp.js new file mode 100644 index 0000000000..b58f0ac50d --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInRegExp.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => assertEq("foobar\xff5baz\u1200".search(/bar\u0178\d/i), 3)); +oomTest(() => assertEq((/(?!(?!(?!6)[\Wc]))/i).test(), false)); +oomTest(() => assertEq((/bar\u0178\d/i).exec("foobar\xff5baz\u1200") != null, true)); diff --git a/js/src/jit-test/tests/gc/oomInRegExp2.js b/js/src/jit-test/tests/gc/oomInRegExp2.js new file mode 100644 index 0000000000..c35075b375 --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInRegExp2.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => assertEq("foobar\xff5baz\u1200".search(/bar\u0178\d/i), 3), {keepFailing: true}); +oomTest(() => assertEq((/(?!(?!(?!6)[\Wc]))/i).test(), false), {keepFailing: true}); +oomTest(() => assertEq((/bar\u0178\d/i).exec("foobar\xff5baz\u1200") != null, true), {keepFailing: true}); diff --git a/js/src/jit-test/tests/gc/oomInRegExpAlternativeGeneration.js b/js/src/jit-test/tests/gc/oomInRegExpAlternativeGeneration.js new file mode 100644 index 0000000000..b2a8ea7588 --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInRegExpAlternativeGeneration.js @@ -0,0 +1,16 @@ +// |jit-test| allow-oom; allow-unhandlable-oom +// Bug 1234402 +// Unhandlable OOM in AlternativeGeneration::AlternativeGeneration. + +if (typeof oomAfterAllocations == "function" && helperThreadCount() > 0) { + offThreadCompileToStencil(` +[null, "", ""].forEach(function(locales) { +try { +Intl.NumberFormat(locales) +} catch (e) {} +oomAfterAllocations(100); +}) +`); + var stencil = finishOffThreadStencil(); + evalStencil(stencil); +} diff --git a/js/src/jit-test/tests/gc/oomInWeakMap.js b/js/src/jit-test/tests/gc/oomInWeakMap.js new file mode 100644 index 0000000000..522dc24738 --- /dev/null +++ b/js/src/jit-test/tests/gc/oomInWeakMap.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(function () { + eval(`var wm = new WeakMap(); + wm.set({}, 'FOO').get(false);`); +}); diff --git a/js/src/jit-test/tests/gc/pretenure-array-long-lived.js b/js/src/jit-test/tests/gc/pretenure-array-long-lived.js new file mode 100644 index 0000000000..77ea7c0efc --- /dev/null +++ b/js/src/jit-test/tests/gc/pretenure-array-long-lived.js @@ -0,0 +1,17 @@ +// Allocate many long-lived objects and check that we pretenure them. + +load(libdir + "pretenure.js"); + +setupPretenureTest(); + +allocateArrays(nurseryCount, true); // Warm up. + +let { minor, major } = runTestAndCountCollections( + () => allocateArrays(tenuredCount, true) +); + +// Check that after the warm up period we 'only' do major GCs (we allow one +// nursery collection). +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor <= 1, true); +assertEq(major >= 5, true); diff --git a/js/src/jit-test/tests/gc/pretenure-array-long-then-short-lived.js b/js/src/jit-test/tests/gc/pretenure-array-long-then-short-lived.js new file mode 100644 index 0000000000..3f7b30507b --- /dev/null +++ b/js/src/jit-test/tests/gc/pretenure-array-long-then-short-lived.js @@ -0,0 +1,28 @@ +// Allocate many objects, changing the lifetime from long-lived to short lived +// and check that we recover. + +load(libdir + "pretenure.js"); + +setupPretenureTest(); + +// Phase 1: long lived. + +allocateArrays(nurseryCount, true); +let { minor, major } = runTestAndCountCollections( + () => allocateArrays(tenuredCount, true) +); + +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor <= 1, true); +assertEq(major >= 5, true); + +// Phase 2: short lived. + +allocateArrays(tenuredCount, false); +({ minor, major } = runTestAndCountCollections( + () => allocateArrays(nurseryCount * 5, false) +)); + +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor >= 5, true); +assertEq(major == 0, true); diff --git a/js/src/jit-test/tests/gc/pretenure-array-short-lived.js b/js/src/jit-test/tests/gc/pretenure-array-short-lived.js new file mode 100644 index 0000000000..6a7c814c02 --- /dev/null +++ b/js/src/jit-test/tests/gc/pretenure-array-short-lived.js @@ -0,0 +1,16 @@ +// Allocate many short-lived objects and check that we don't pretenure them. + +load(libdir + "pretenure.js"); + +setupPretenureTest(); + +allocateArrays(nurseryCount, false); // Warm up. + +let { minor, major } = runTestAndCountCollections( + () => allocateArrays(nurseryCount * 5, false) +); + +// Check that after the warm up period we only do minor GCs. +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor >= 5, true); +assertEq(major == 0, true); diff --git a/js/src/jit-test/tests/gc/pretenure-array-short-then-long-lived.js b/js/src/jit-test/tests/gc/pretenure-array-short-then-long-lived.js new file mode 100644 index 0000000000..1cef28c89c --- /dev/null +++ b/js/src/jit-test/tests/gc/pretenure-array-short-then-long-lived.js @@ -0,0 +1,28 @@ +// Allocate many objects, changing the lifetime from short-lived to long-lived +// and check that we recover. + +load(libdir + "pretenure.js"); + +setupPretenureTest(); + +// Phase 1: short lived. + +allocateArrays(nurseryCount, false); +let { minor, major } = runTestAndCountCollections( + () => allocateArrays(tenuredCount, false) +); + +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor >= 5, true); +assertEq(major == 0, true); + +// Phase 2: long lived. + +allocateArrays(tenuredCount, true); +({ minor, major } = runTestAndCountCollections( + () => allocateArrays(tenuredCount * 5, true) +)); + +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor <= 1, true); +assertEq(major >= 5, true); diff --git a/js/src/jit-test/tests/gc/pretenure-object-long-lived.js b/js/src/jit-test/tests/gc/pretenure-object-long-lived.js new file mode 100644 index 0000000000..4b741e3ebe --- /dev/null +++ b/js/src/jit-test/tests/gc/pretenure-object-long-lived.js @@ -0,0 +1,17 @@ +// Allocate many long-lived objects and check that we pretenure them. + +load(libdir + "pretenure.js"); + +setupPretenureTest(); + +allocateObjects(nurseryCount, true); // Warm up. + +let { minor, major } = runTestAndCountCollections( + () => allocateObjects(tenuredCount, true) +); + +// Check that after the warm up period we 'only' do major GCs (we allow one +// nursery collection). +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor <= 1, true); +assertEq(major >= 5, true); diff --git a/js/src/jit-test/tests/gc/pretenure-object-long-then-short-lived.js b/js/src/jit-test/tests/gc/pretenure-object-long-then-short-lived.js new file mode 100644 index 0000000000..280ce3a5bd --- /dev/null +++ b/js/src/jit-test/tests/gc/pretenure-object-long-then-short-lived.js @@ -0,0 +1,28 @@ +// Allocate many objects, changing the lifetime from long-lived to short lived +// and check that we recover. + +load(libdir + "pretenure.js"); + +setupPretenureTest(); + +// Phase 1: long lived. + +allocateObjects(nurseryCount, true); +let { minor, major } = runTestAndCountCollections( + () => allocateObjects(tenuredCount, true) +); + +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor <= 1, true); +assertEq(major >= 5, true); + +// Phase 2: short lived. + +allocateObjects(tenuredCount, false); +({ minor, major } = runTestAndCountCollections( + () => allocateObjects(nurseryCount * 5, false) +)); + +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor >= 5, true); +assertEq(major == 0, true); diff --git a/js/src/jit-test/tests/gc/pretenure-object-short-lived.js b/js/src/jit-test/tests/gc/pretenure-object-short-lived.js new file mode 100644 index 0000000000..0e7dc3b65b --- /dev/null +++ b/js/src/jit-test/tests/gc/pretenure-object-short-lived.js @@ -0,0 +1,16 @@ +// Allocate many short-lived objects and check that we don't pretenure them. + +load(libdir + "pretenure.js"); + +setupPretenureTest(); + +allocateObjects(nurseryCount, false); // Warm up. + +let { minor, major } = runTestAndCountCollections( + () => allocateObjects(nurseryCount * 5, false) +); + +// Check that after the warm up period we only do minor GCs. +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor >= 5, true); +assertEq(major == 0, true); diff --git a/js/src/jit-test/tests/gc/pretenure-object-short-then-long-lived.js b/js/src/jit-test/tests/gc/pretenure-object-short-then-long-lived.js new file mode 100644 index 0000000000..0de2440594 --- /dev/null +++ b/js/src/jit-test/tests/gc/pretenure-object-short-then-long-lived.js @@ -0,0 +1,28 @@ +// Allocate many objects, changing the lifetime from short-lived to long-lived +// and check that we recover. + +load(libdir + "pretenure.js"); + +setupPretenureTest(); + +// Phase 1: short lived. + +allocateObjects(nurseryCount, false); +let { minor, major } = runTestAndCountCollections( + () => allocateObjects(tenuredCount, false) +); + +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor >= 5, true); +assertEq(major == 0, true); + +// Phase 2: long lived. + +allocateObjects(tenuredCount, true); +({ minor, major } = runTestAndCountCollections( + () => allocateObjects(tenuredCount * 5, true) +)); + +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor <= 1, true); +assertEq(major >= 5, true); diff --git a/js/src/jit-test/tests/gc/pretenuring.js b/js/src/jit-test/tests/gc/pretenuring.js new file mode 100644 index 0000000000..6f20706e9b --- /dev/null +++ b/js/src/jit-test/tests/gc/pretenuring.js @@ -0,0 +1,50 @@ +// Test nursery string allocation and pretenuring. + +gczeal(0); + +gcparam("minNurseryBytes", 4096 * 1024); +gcparam("maxNurseryBytes", 4096 * 1024); +gc(); + +// String allocation in the nursery is initially enabled. +assertEq(nurseryStringsEnabled(), true); + +// Literal strings are atoms (which are always tenured). +assertEq(isNurseryAllocated("foo"), false); + +// The result of Number.toString is nursery allocated. +assertEq(isNurseryAllocated((1234).toString()), true); + +// Ropes are nursery allocated. +let s = "bar"; +assertEq(isNurseryAllocated("foo" + s), true); + +// Dependent strings are nursery allocated. +assertEq(isNurseryAllocated("foobar".substr(1)), true); + +// The testing function 'newString' allows control over which heap is used. +assertEq(isNurseryAllocated(newString("foobar", { tenured: true })), false); +assertEq(isNurseryAllocated(newString("foobar", { tenured: false })), true); + +// Allocating lots of strings which survive nursery collection disables +// allocating strings in the nursery. +let a = []; +for (let i = 1; i < 500000; i++) { + a.push(i.toString()); +} +gc(); +assertEq(nurseryStringsEnabled(), false); +a = undefined; + +// When a large number of tenured strings die very soon after allocation, +// pretenuring for that zone is reset and nursery allocation enabled again. + +gc(); +assertEq(nurseryStringsEnabled(), false); +let initGCNumber = gcparam('majorGCNumber'); +while (!nurseryStringsEnabled() && gcparam('majorGCNumber') < initGCNumber + 3) { + for (let i = 1; i < 100000; i++) { + a = i.toString(); + } +} +assertEq(nurseryStringsEnabled(), true); diff --git a/js/src/jit-test/tests/gc/regress-1711413.js b/js/src/jit-test/tests/gc/regress-1711413.js new file mode 100644 index 0000000000..8261c47f7f --- /dev/null +++ b/js/src/jit-test/tests/gc/regress-1711413.js @@ -0,0 +1,6 @@ +// Required --no-threads to crash. + +enableShellAllocationMetadataBuilder(); +newGlobal({newCompartment:true}); +gcslice(1); +nukeAllCCWs(); diff --git a/js/src/jit-test/tests/gc/str-atom-dedupe.js b/js/src/jit-test/tests/gc/str-atom-dedupe.js new file mode 100644 index 0000000000..587f879db5 --- /dev/null +++ b/js/src/jit-test/tests/gc/str-atom-dedupe.js @@ -0,0 +1,16 @@ +// Create Latin1 string + atom. +var latin1S = "foo".repeat(50); +var obj = {}; +obj[latin1S] = 3; +assertEq(obj[latin1S], 3); + +// Create a TwoByte version, ensure it's in the StringToAtomCache. +var twoByteS = newString(latin1S, {twoByte: true}); +assertEq(obj[twoByteS], 3); + +// Create a dependent TwoByte string. +var depTwoByteS = twoByteS.slice(1); + +// Deduplication shouldn't get confused about Latin1 atom vs TwoByte strings. +minorgc(); +assertEq(obj["f" + depTwoByteS], 3); diff --git a/js/src/jit-test/tests/gc/test-root-arrays.js b/js/src/jit-test/tests/gc/test-root-arrays.js new file mode 100644 index 0000000000..2c6015f19c --- /dev/null +++ b/js/src/jit-test/tests/gc/test-root-arrays.js @@ -0,0 +1,10 @@ +gczeal(0); +let objects = [{}, {}, {}]; +blackRoot()[0] = objects[0]; +grayRoot()[0] = objects[1]; +addMarkObservers(objects); +objects = undefined; +gc(); +assertEq(getMarks()[0], "black"); +assertEq(getMarks()[1], "gray"); +assertEq(getMarks()[2], "dead"); diff --git a/js/src/jit-test/tests/gc/weak-marking-01.js b/js/src/jit-test/tests/gc/weak-marking-01.js new file mode 100644 index 0000000000..a132398510 --- /dev/null +++ b/js/src/jit-test/tests/gc/weak-marking-01.js @@ -0,0 +1,220 @@ +// These tests will be using object literals as keys, and we want some of them +// to be dead after being inserted into a WeakMap. That means we must wrap +// everything in functions because it seems like the toplevel script hangs onto +// its object literals. + +gczeal(0); +gcparam('minNurseryBytes', 1024 * 1024); +gcparam('maxNurseryBytes', 1024 * 1024); + +function startIncrementalGC() { + startgc(1, 'shrinking'); + while (gcstate() === "Prepare") { + gcslice(1); + } +} + +function syncIncrementalGC() { + startIncrementalGC(); + finishgc(); +} + +// All reachable keys should be found, and the rest should be swept. +function basicSweeping() { + gc(); + + var wm1 = new WeakMap(); + wm1.set({'name': 'obj1'}, {'name': 'val1'}); + var hold = {'name': 'obj2'}; + wm1.set(hold, {'name': 'val2'}); + wm1.set({'name': 'obj3'}, {'name': 'val3'}); + + syncIncrementalGC(); + + assertEq(wm1.get(hold).name, 'val2'); + assertEq(nondeterministicGetWeakMapKeys(wm1).length, 1); +} + +basicSweeping(); + +// Keep values alive even when they are only referenced by (live) WeakMap values. +function weakGraph() { + gc(); + + var wm1 = new WeakMap(); + var obj1 = {'name': 'obj1'}; + var obj2 = {'name': 'obj2'}; + var obj3 = {'name': 'obj3'}; + var obj4 = {'name': 'obj4'}; + var clear = {'name': ''}; // Make the interpreter forget about the last obj created + + wm1.set(obj2, obj3); + wm1.set(obj3, obj1); + wm1.set(obj4, obj1); // This edge will be cleared + obj1 = obj3 = obj4 = undefined; + + syncIncrementalGC(); + + assertEq(obj2.name, "obj2"); + assertEq(wm1.get(obj2).name, "obj3"); + assertEq(wm1.get(wm1.get(obj2)).name, "obj1"); + print(nondeterministicGetWeakMapKeys(wm1).map(o => o.name).join(",")); + assertEq(nondeterministicGetWeakMapKeys(wm1).length, 2); +} + +weakGraph(); + +// ...but the weakmap itself has to stay alive, too. +function deadWeakMap() { + gc(); + + var wm1 = new WeakMap(); + var obj1 = makeFinalizeObserver(); + var obj2 = {'name': 'obj2'}; + var obj3 = {'name': 'obj3'}; + var obj4 = {'name': 'obj4'}; + var clear = {'name': ''}; // Make the interpreter forget about the last obj created + + wm1.set(obj2, obj3); + wm1.set(obj3, obj1); + wm1.set(obj4, obj1); // This edge will be cleared + var initialCount = finalizeCount(); + obj1 = obj3 = obj4 = undefined; + wm1 = undefined; + + syncIncrementalGC(); + + assertEq(obj2.name, "obj2"); + assertEq(finalizeCount(), initialCount + 1); +} + +deadWeakMap(); + +// WeakMaps do not strongly reference their keys or values. (WeakMaps hold a +// collection of (strong) references to *edges* from keys to values. If the +// WeakMap is not live, then its edges are of course not live either. An edge +// holds neither its key nor its value live; it just holds a strong ref from +// the key to the value. So if the key is live, the value is live too, but the +// edge itself has no references to anything.) +function deadKeys() { + gc(); + + var wm1 = new WeakMap(); + var obj1 = makeFinalizeObserver(); + var obj2 = {'name': 'obj2'}; + var obj3 = makeFinalizeObserver(); + var clear = {}; // Make the interpreter forget about the last obj created + + wm1.set(obj1, obj1); + wm1.set(obj3, obj2); + obj1 = obj3 = undefined; + var initialCount = finalizeCount(); + + syncIncrementalGC(); + + assertEq(finalizeCount(), initialCount + 2); + assertEq(nondeterministicGetWeakMapKeys(wm1).length, 0); +} + +deadKeys(); + +// The weakKeys table has to grow if it encounters enough new unmarked weakmap +// keys. Trigger this to happen during weakmap marking. +// +// There's some trickiness involved in getting it to test the right thing, +// because if a key is marked before the weakmap, then it won't get entered +// into the weakKeys table. This chains through multiple weakmap layers to +// ensure that the objects can't get marked before the weakmaps. +function weakKeysRealloc() { + gc(); + + var wm1 = new WeakMap; + var wm2 = new WeakMap; + var wm3 = new WeakMap; + var obj1 = {'name': 'obj1'}; + var obj2 = {'name': 'obj2'}; + wm1.set(obj1, wm2); + wm2.set(obj2, wm3); + for (var i = 0; i < 10000; i++) { + wm3.set(Object.create(null), wm2); + } + wm3.set(Object.create(null), makeFinalizeObserver()); + + wm2 = undefined; + wm3 = undefined; + obj2 = undefined; + + var initialCount = finalizeCount(); + syncIncrementalGC(); + assertEq(finalizeCount(), initialCount + 1); +} + +weakKeysRealloc(); + +// The weakKeys table is populated during regular marking. When a key is later +// deleted, both it and its delegate should be removed from weakKeys. +// Otherwise, it will hold its value live if it gets marked, and our table +// traversals will include non-keys, etc. +function deletedKeys() { + gc(); + + var wm = new WeakMap; + var g = newGlobal(); + + for (var i = 0; i < 1000; i++) + wm.set(g.Object.create(null), i); + + startIncrementalGC(); + + for (var key of nondeterministicGetWeakMapKeys(wm)) { + if (wm.get(key) % 2) + wm.delete(key); + } + + gc(); +} + +deletedKeys(); + +// Test adding keys during incremental GC. +function incrementalAdds() { + gc(); + + var initialCount = finalizeCount(); + + var wm1 = new WeakMap; + var wm2 = new WeakMap; + var wm3 = new WeakMap; + var obj1 = {'name': 'obj1'}; + var obj2 = {'name': 'obj2'}; + wm1.set(obj1, wm2); + wm2.set(obj2, wm3); + for (var i = 0; i < 10000; i++) { + wm3.set(Object.create(null), wm2); + } + wm3.set(Object.create(null), makeFinalizeObserver()); + obj2 = undefined; + + var obj3 = []; + startIncrementalGC(); + var M = 10; + var N = 800; + for (var j = 0; j < M; j++) { + for (var i = 0; i < N; i++) + wm3.set(Object.create(null), makeFinalizeObserver()); // Should be swept + for (var i = 0; i < N; i++) { + obj3.push({'name': 'obj3'}); + wm1.set(obj3[obj3.length - 1], makeFinalizeObserver()); // Should not be swept + } + gcslice(); + } + + wm2 = undefined; + wm3 = undefined; + + gc(); + print("initialCount = " + initialCount); + assertEq(finalizeCount(), initialCount + 1 + M * N); +} + +incrementalAdds(); diff --git a/js/src/jit-test/tests/gc/weak-marking-02.js b/js/src/jit-test/tests/gc/weak-marking-02.js new file mode 100644 index 0000000000..b29da74496 --- /dev/null +++ b/js/src/jit-test/tests/gc/weak-marking-02.js @@ -0,0 +1,338 @@ +// |jit-test| allow-unhandlable-oom + +// These tests will be using object literals as keys, and we want some of them +// to be dead after being inserted into a WeakMap. That means we must wrap +// everything in functions because it seems like the toplevel script hangs onto +// its object literals. + +// Cross-compartment WeakMap keys work by storing a cross-compartment wrapper +// in the WeakMap, and the actual "delegate" object in the target compartment +// is the thing whose liveness is checked. + +gczeal(0); + +var g2 = newGlobal({newCompartment: true}); +g2.eval('function genObj(name) { return {"name": name} }'); + +function basicSweeping() { + var wm1 = new WeakMap(); + wm1.set({'name': 'obj1'}, {'name': 'val1'}); + var hold = g2.genObj('obj2'); + wm1.set(hold, {'name': 'val2'}); + wm1.set({'name': 'obj3'}, {'name': 'val3'}); + var obj4 = g2.genObj('obj4'); + wm1.set(obj4, {'name': 'val3'}); + obj4 = undefined; + + startgc(100000, 'shrinking'); + gcslice(); + assertEq(wm1.get(hold).name, 'val2'); + assertEq(nondeterministicGetWeakMapKeys(wm1).length, 1); +} + +basicSweeping(); + +// Same, but behind an additional WM layer, to avoid ordering problems (not +// that I've checked that basicSweeping even has any problems.) + +function basicSweeping2() { + var wm1 = new WeakMap(); + wm1.set({'name': 'obj1'}, {'name': 'val1'}); + var hold = g2.genObj('obj2'); + wm1.set(hold, {'name': 'val2'}); + wm1.set({'name': 'obj3'}, {'name': 'val3'}); + var obj4 = g2.genObj('obj4'); + wm1.set(obj4, {'name': 'val3'}); + obj4 = undefined; + + var base1 = {'name': 'base1'}; + var base2 = {'name': 'base2'}; + var wm_base1 = new WeakMap(); + var wm_base2 = new WeakMap(); + wm_base1.set(base1, wm_base2); + wm_base2.set(base2, wm1); + wm1 = wm_base2 = undefined; + + startgc(100000, 'shrinking'); + gcslice(); + + assertEq(nondeterministicGetWeakMapKeys(wm_base1).length, 1); + wm_base2 = wm_base1.get(base1); + assertEq(nondeterministicGetWeakMapKeys(wm_base2).length, 1); + assertEq(nondeterministicGetWeakMapKeys(wm_base1)[0], base1); + assertEq(nondeterministicGetWeakMapKeys(wm_base2)[0], base2); + wm_base2 = wm_base1.get(base1); + wm1 = wm_base2.get(base2); + assertEq(wm1.get(hold).name, 'val2'); + assertEq(nondeterministicGetWeakMapKeys(wm1).length, 1); +} + +basicSweeping2(); + +// Scatter the weakmap, the keys, and the values among different compartments. + +function tripleZoneMarking() { + var g1 = newGlobal({newCompartment: true}); + var g2 = newGlobal({newCompartment: true}); + var g3 = newGlobal({newCompartment: true}); + + var wm = g1.eval("new WeakMap()"); + var key = g2.eval("({'name': 'obj1'})"); + var value = g3.eval("({'name': 'val1'})"); + g1 = g2 = g3 = undefined; + wm.set(key, value); + + // Make all of it only reachable via a weakmap in the main test compartment, + // so that all of this happens during weak marking mode. Use the weakmap as + // its own key, so we know that the weakmap will get traced before the key + // and therefore will populate the weakKeys table and all of that jazz. + var base_wm = new WeakMap(); + base_wm.set(base_wm, [ wm, key ]); + + wm = key = value = undefined; + + startgc(100000, 'shrinking'); + gcslice(); + + var keys = nondeterministicGetWeakMapKeys(base_wm); + assertEq(keys.length, 1); + var [ wm, key ] = base_wm.get(keys[0]); + assertEq(key.name, "obj1"); + value = wm.get(key); + assertEq(value.name, "val1"); +} + +tripleZoneMarking(); + +// Same as above, but this time use enqueueMark to enforce ordering. + +function tripleZoneMarking2() { + var g1 = newGlobal(); + var g2 = newGlobal(); + var g3 = newGlobal(); + + var wm = g1.eval("wm = new WeakMap()"); + var key = g2.eval("key = ({'name': 'obj1'})"); + var value = g3.eval("({'name': 'val1'})"); + wm.set(key, value); + + enqueueMark("enter-weak-marking-mode"); + g1.eval("enqueueMark(wm)"); // weakmap + g2.eval("enqueueMark(key)"); // delegate + g1.wm = g2.key = undefined; + g1 = g2 = g3 = undefined; + wm = key = value = undefined; + + gc(); + + var [ dummy, weakmap, keywrapper ] = getMarkQueue(); + assertEq(keywrapper.name, "obj1"); + value = weakmap.get(keywrapper); + assertEq(value.name, "val1"); + + clearMarkQueue(); +} + +if (this.enqueueMark) + tripleZoneMarking2(); + +function enbugger() { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + g.eval("function debuggee_f() { return 1; }"); + g.eval("function debuggee_g() { return 1; }"); + dbg.addDebuggee(g); + var [ s ] = dbg.findScripts({global: g}).filter(s => s.displayName == "debuggee_f"); + var [ s2 ] = dbg.findScripts({global: g}).filter(s => s.displayName == "debuggee_g"); + g.eval("debuggee_f = null"); + gc(); + dbg.removeAllDebuggees(); + gc(); + assertEq(s.displayName, "debuggee_f"); + + var wm = new WeakMap; + var obj = Object.create(null); + var obj2 = Object.create(null); + wm.set(obj, s); + wm.set(obj2, obj); + wm.set(s2, obj2); + s = s2 = obj = obj2 = null; + + gc(); +} + +enbugger(); + +// Want to test: zone edges +// Make map with cross-zone delegate. Collect the zones one at a time. +function zone_edges() { + var g3 = newGlobal(); + g3.eval('function genObj(name) { return {"name": name} }'); + + var wm1 = new WeakMap(); + var hold = g2.genObj('obj1'); + var others = [g2.genObj('key2'), g2.genObj('key3')]; + wm1.set(hold, {'name': g3.genObj('val1'), 'others': others}); + others = null; + + var m = new Map; + m.set(m, hold); + hold = null; + + const zones = [ this, g2, g3 ]; + for (let zonebits = 0; zonebits < 2 ** zones.length; zonebits++) { + for (let z in zones) { + if (zonebits & (1 << z)) + schedulezone(zones[z]); + } + startgc(1); + wm1.set(wm1.get(m.get(m)).others[0], g2.genObj('val2')); + gcslice(1000000); + wm1.set(wm1.get(m.get(m)).others[1], g2.genObj('val3')); + gc(); + assertEq(wm1.get(m.get(m)).name.name, 'val1'); + assertEq(wm1.get(m.get(m)).others[0].name, 'key2'); + assertEq(wm1.get(wm1.get(m.get(m)).others[0]).name, 'val2'); + assertEq(wm1.get(m.get(m)).others[1].name, 'key3'); + assertEq(wm1.get(wm1.get(m.get(m)).others[1]).name, 'val3'); + assertEq(nondeterministicGetWeakMapKeys(wm1).length, 3); + } + + // Do it again, with nuking. + const wm2 = g2.eval("new WeakMap"); + wm2.set(wm1.get(m.get(m)).others[0], Object.create(null)); + for (let zonebits = 0; zonebits < 2 ** zones.length; zonebits++) { + for (let z in zones) { + if (zonebits & (1 << z)) + schedulezone(zones[z]); + } + startgc(1); + wm1.set(wm1.get(m.get(m)).others[0], g2.genObj('val2')); + gcslice(1000000); + wm1.set(wm1.get(m.get(m)).others[1], g2.genObj('val3')); + nukeCCW(wm1.get(wm1.get(m.get(m)).others[0])); + nukeCCW(wm1.get(wm1.get(m.get(m)).others[1])); + gc(); + assertEq(wm1.get(m.get(m)).name.name, 'val1'); + assertEq(wm1.get(m.get(m)).others[0].name, 'key2'); + assertEq(wm1.get(m.get(m)).others[1].name, 'key3'); + assertEq(nondeterministicGetWeakMapKeys(wm1).length, 3); + } +} + +zone_edges(); + +// Stress test: lots of cross-zone and same-zone cross-compartment edges, and +// exercise the barriers. +function stress(opt) { + printErr(JSON.stringify(opt)); + + var g1 = this; + var g2 = newGlobal({sameZoneAs: g1}); + var g3 = newGlobal(); + + var globals = g1.globals = g2.globals = g3.globals = [ g1, g2, g3 ]; + g1.name = 'main'; + g2.name = 'same-zone'; + g3.name = 'other-zone'; + g1.names = g2.names = g3.names = [ g1.name, g2.name, g3.name ]; + + // Basic setup: + // + // Three different globals, each with a weakmap and an object. Each global's + // weakmap contains all 3 objects (1 from each global) as keys. Internally, + // that means that each weakmap will contain one local object and two + // cross-compartment wrappers. + // + // Now duplicate that 3 times. The first weakmap will be unmodified. The + // second weakmap will have its keys updated to different values. The third + // weakmap will have its keys deleted. + + for (const i in globals) { + const g = globals[i]; + g.eval('function genObj(name) { return {"name": name} }'); + g.eval("weakmap0 = new WeakMap()"); + g.eval("weakmap1 = new WeakMap()"); + g.eval("weakmap2 = new WeakMap()"); + g.eval(`obj = genObj('global-${names[i]}-object')`); + for (const j in [0, 1, 2]) { + g.eval(`weakmap${j}.set(genObj('global-${names[i]}-key}'), genObj("value"))`); + } + } + + for (const i in globals) { + const g = globals[i]; + for (const j in globals) { + for (const k in [0, 1, 2]) { + g.eval(`weakmap${k}.set(globals[${j}].obj, genObj('value-${i}-${j}'))`); + } + } + } + + // Construct object keys to retrieve the weakmaps with. + for (const g of globals) { + g.eval(`plain = genObj("plain")`); + g.eval(`update = genObj("update")`); + g.eval(`remove = genObj("remove")`); + } + + // Put the weakmaps in another WeakMap. + for (const g of globals) { + g.eval(`weakmaps = new WeakMap(); + weakmaps.set(plain, weakmap0); + weakmaps.set(update, weakmap1); + weakmaps.set(remove, weakmap2);`); + } + + // Eliminate the edges from the global to the object being used as a key. But + // assuming we want the key to be live (nothing else points to it), hide it + // behind another weakmap layer. + for (const g of globals) { + if (opt.live) { + g.eval("keyholder = genObj('key-holder')"); + g.eval("weakmaps.set(keyholder, obj)"); + } + g.eval("obj = null"); + } + + // If we want a layer of indirection, remove the edges from the globals to + // their weakmaps. But note that the original purpose of this test *wants* + // the weakmaps themselves to be visited early, so that gcWeakKeys will be + // populated with not-yet-marked keys and the barriers will need to update + // entries there. + if (opt.indirect) { + for (const g of globals) { + g.eval("weakmap0 = weakmap1 = weakmap2 = null"); + } + } + + // Start an incremental GC. TODO: need a zeal mode to yield before entering + // weak marking mode. + startgc(1); + + // Do the mutations. + if (opt.live) { + for (const g of globals) { + g.eval("weakmaps.get(update).set(weakmaps.get(keyholder), genObj('val'))"); + g.eval("weakmaps.get(remove).delete(weakmaps.get(keyholder))"); + } + } + + if (opt.nuke) { + for (const g of globals) { + if (g.name != 'main') + g.eval("nukeAllCCWs()"); + } + } + + // Finish the GC. + gc(); +} + +for (const live of [true, false]) { + for (const indirect of [true, false]) { + for (const nuke of [true, false]) { + stress({live, indirect, nuke}); + } + } +} diff --git a/js/src/jit-test/tests/gc/weak-marking-03.js b/js/src/jit-test/tests/gc/weak-marking-03.js new file mode 100644 index 0000000000..f1f7c85c1b --- /dev/null +++ b/js/src/jit-test/tests/gc/weak-marking-03.js @@ -0,0 +1,696 @@ +// |jit-test| allow-unhandlable-oom + +// weakmap marking tests that use the testing mark queue to force an ordering +// of marking. + +// We are carefully controlling the sequence of GC events. +gczeal(0); + +// If a command-line parameter is given, use it as a substring restriction on +// the tests to run. +var testRestriction = scriptArgs[0]; +printErr(`testRestriction is ${testRestriction || '(run all tests)'}`); + +function runtest(func) { + if (testRestriction && ! func.name.includes(testRestriction)) { + print("\Skipping " + func.name); + } else { + print("\nRunning " + func.name); + func(); + } +} + +function reportMarks(prefix = "") { + const marks = getMarks(); + const current = currentgc(); + const markstr = marks.join("/"); + print(`${prefix}[${current.incrementalState}/${current.sweepGroup}@${current.queuePos}] ${markstr}`); + return markstr; +} + +function startGCMarking() { + startgc(100000); + while (gcstate() === "Prepare") { + gcslice(100000); + } +} + +function purgeKey() { + const m = new WeakMap(); + const vals = {}; + vals.key = Object.create(null); + vals.val = Object.create(null); + m.set(vals.key, vals.val); + + minorgc(); + + addMarkObservers([m, vals.key, vals.val]); + + enqueueMark(m); + enqueueMark("yield"); + + enqueueMark(vals.key); + enqueueMark("yield"); + + vals.key = vals.val = null; + + startGCMarking(); + // getMarks() returns map/key/value + assertEq(getMarks().join("/"), "black/unmarked/unmarked", + "marked the map black"); + + gcslice(100000); + assertEq(getMarks().join("/"), "black/black/unmarked", + "key is now marked"); + + // Trigger purgeWeakKey: the key is in weakkeys (because it was unmarked when + // the map was marked), and now we're removing it. + m.delete(nondeterministicGetWeakMapKeys(m)[0]); + + finishgc(); // Finish the GC + assertEq(getMarks().join("/"), "black/black/black", + "at end, value is marked too"); + + clearMarkQueue(); + clearMarkObservers(); +} + +if (this.enqueueMark) + runtest(purgeKey); + +function removeKey() { + reportMarks("removeKey start: "); + + const m = new WeakMap(); + const vals = {}; + vals.key = Object.create(null); + vals.val = Object.create(null); + m.set(vals.key, vals.val); + + minorgc(); + + addMarkObservers([m, vals.key, vals.val]); + + enqueueMark(m); + enqueueMark("yield"); + + startGCMarking(); + reportMarks("first: "); + var marks = getMarks(); + assertEq(marks[0], "black", "map is black"); + assertEq(marks[1], "unmarked", "key not marked yet"); + assertEq(marks[2], "unmarked", "value not marked yet"); + m.delete(vals.key); + + finishgc(); // Finish the GC + reportMarks("done: "); + marks = getMarks(); + assertEq(marks[0], "black", "map is black"); + assertEq(marks[1], "black", "key is black"); + assertEq(marks[2], "black", "value is black"); + + // Do it again, but this time, remove all other roots. + m.set(vals.key, vals.val); + vals.key = vals.val = null; + startgc(10000); + while (gcstate() !== "Mark") { + gcslice(100000); + } + marks = getMarks(); + assertEq(marks[0], "black", "map is black"); + assertEq(marks[1], "unmarked", "key not marked yet"); + assertEq(marks[2], "unmarked", "value not marked yet"); + + // This was meant to test the weakmap deletion barrier, which would remove + // the key from weakkeys. Unfortunately, JS-exposed WeakMaps now have a read + // barrier on lookup that marks the key, and deletion requires a lookup. + m.delete(nondeterministicGetWeakMapKeys(m)[0]); + + finishgc(); + marks = getMarks(); + assertEq(marks[0], "black", "map is black"); + assertEq(marks[1], "black", "key was blackened by lookup read barrier during deletion"); + assertEq(marks[2], "black", "value is black because map and key are black"); + + clearMarkQueue(); + clearMarkObservers(); +} + +if (this.enqueueMark) + runtest(removeKey); + +// Test: +// 1. mark the map +// - that inserts the delegate into weakKeys +// 2. nuke the CCW key +// - removes the delegate from weakKeys +// 3. mark the key +// 4. enter weak marking mode +// +// The problem it's attempting to recreate is that entering weak marking mode +// will no longer mark the value, because there's no delegate to trigger it, +// and the key was not added to weakKeys (because at the time the map was +// scanned, the key had a delegate, so it was added to weakKeys instead.) +function nukeMarking() { + const g1 = newGlobal({newCompartment: true}); + + const vals = {}; + vals.map = new WeakMap(); + vals.key = g1.eval("Object.create(null)"); + vals.val = Object.create(null); + vals.map.set(vals.key, vals.val); + vals.val = null; + gc(); + + // Set up the sequence of marking events. + enqueueMark(vals.map); + enqueueMark("yield"); + // We will nuke the key's delegate here. + enqueueMark(vals.key); + enqueueMark("enter-weak-marking-mode"); + + // Okay, run through the GC now. + startgc(1000000); + while (gcstate() !== "Mark") { + gcslice(100000); + } + assertEq(gcstate(), "Mark", "expected to yield after marking map"); + // We should have marked the map and then yielded back here. + nukeCCW(vals.key); + // Finish up the GC. + gcslice(); + + clearMarkQueue(); +} + +if (this.enqueueMark) + runtest(nukeMarking); + +// Similar to the above, but trying to get a different failure: +// - start marking +// - find a map, add its key to ephemeronEdges +// - nuke the key (and all other CCWs between the key -> delegate zones) +// - when sweeping, we will no longer have any edges between the key +// and delegate zones. So they will be placed in separate sweep groups. +// - for this test, the delegate zone must be swept after the key zone +// - make sure we don't try to mark back in the key zone (due to an +// ephemeron edge) while sweeping the delegate zone. In a DEBUG build, +// this would assert. +function nukeMarkingSweepGroups() { + // Create g1 before host, because that will result in the right zone + // ordering to trigger the bug. + const g1 = newGlobal({newCompartment: true}); + const host = newGlobal({newCompartment: true}); + host.g1 = g1; + host.eval(` + const vals = {}; + vals.map = new WeakMap(); + vals.key = g1.eval("Object.create(null)"); + vals.val = Object.create(null); + vals.map.set(vals.key, vals.val); + vals.val = null; + gc(); + + // Set up the sequence of marking events. + enqueueMark(vals.map); + enqueueMark("yield"); + // We will nuke the key's delegate here. + enqueueMark(vals.key); + enqueueMark("enter-weak-marking-mode"); + + // Okay, run through the GC now. + startgc(1); + while (gcstate() === "Prepare") { + gcslice(100000); + } + assertEq(gcstate(), "Mark", "expected to yield after marking map"); + // We should have marked the map and then yielded back here. + nukeAllCCWs(); + // Finish up the GC. + while (gcstate() === "Mark") { + gcslice(1000); + } + gcslice(); + + clearMarkQueue(); + `); +} + +if (this.enqueueMark) + runtest(nukeMarkingSweepGroups); + +function transplantMarking() { + const g1 = newGlobal({newCompartment: true}); + + const vals = {}; + vals.map = new WeakMap(); + let {object, transplant} = transplantableObject(); + vals.key = object; + object = null; + vals.val = Object.create(null); + vals.map.set(vals.key, vals.val); + vals.val = null; + gc(); + + // Set up the sequence of marking events. + enqueueMark(vals.map); + enqueueMark("yield"); + // We will transplant the key here. + enqueueMark(vals.key); + enqueueMark("enter-weak-marking-mode"); + + // Okay, run through the GC now. + startgc(1000000); + while (gcstate() !== "Mark") { + gcslice(100000); + } + assertEq(gcstate(), "Mark", "expected to yield after marking map"); + // We should have marked the map and then yielded back here. + transplant(g1); + // Finish up the GC. + gcslice(); + + clearMarkQueue(); +} + +if (this.enqueueMark) + runtest(transplantMarking); + +// 1. Mark the map +// => add delegate to weakKeys +// 2. Mark the delegate black +// => do nothing because we are not in weak marking mode +// 3. Mark the key gray +// => mark value gray, not that we really care +// 4. Enter weak marking mode +// => black delegate darkens the key from gray to black +function grayMarkingMapFirst() { + const g = newGlobal({newCompartment: true}); + const vals = {}; + vals.map = new WeakMap(); + vals.key = g.eval("Object.create(null)"); + vals.val = Object.create(null); + vals.map.set(vals.key, vals.val); + + g.delegate = vals.key; + g.eval("dummy = Object.create(null)"); + g.eval("grayRoot().push(delegate, dummy)"); + addMarkObservers([vals.map, vals.key]); + g.addMarkObservers([vals.key, g.dummy]); + addMarkObservers([vals.val]); + + gc(); + + enqueueMark(vals.map); + enqueueMark("yield"); // checkpoint 1 + + g.enqueueMark(vals.key); + enqueueMark("yield"); // checkpoint 2 + + vals.val = null; + vals.key = null; + g.delegate = null; + g.dummy = null; + + const showmarks = () => { + print("[map,key,delegate,graydummy,value] marked " + JSON.stringify(getMarks())); + }; + + print("Starting incremental GC"); + startGCMarking(); + // Checkpoint 1, after marking map + showmarks(); + var marks = getMarks(); + assertEq(marks[0], "black", "map is black"); + assertEq(marks[1], "unmarked", "key is not marked yet"); + assertEq(marks[2], "unmarked", "delegate is not marked yet"); + + gcslice(100000); + // Checkpoint 2, after marking delegate + showmarks(); + marks = getMarks(); + assertEq(marks[0], "black", "map is black"); + assertEq(marks[1], "unmarked", "key is not marked yet"); + assertEq(marks[2], "black", "delegate is black"); + + gcslice(); + // GC complete. Key was marked black (b/c of delegate), then gray marking saw + // it was already black and skipped it. + showmarks(); + marks = getMarks(); + assertEq(marks[0], "black", "map is black"); + assertEq(marks[1], "black", "delegate marked key black because of weakmap"); + assertEq(marks[2], "black", "delegate is still black"); + assertEq(marks[3], "gray", "basic gray marking is working"); + assertEq(marks[4], "black", "black map + black delegate => black value"); + + clearMarkQueue(); + clearMarkObservers(); + grayRoot().length = 0; + g.eval("grayRoot().length = 0"); +} + +if (this.enqueueMark) + runtest(grayMarkingMapFirst); + +function grayMarkingMapLast() { + const g = newGlobal({newCompartment: true}); + const vals = {}; + vals.map = new WeakMap(); + vals.key = g.eval("Object.create(null)"); + vals.val = Object.create(null); + vals.map.set(vals.key, vals.val); + + vals.map2 = new WeakMap(); + vals.key2 = g.eval("Object.create(null)"); + vals.val2 = Object.create(null); + vals.map2.set(vals.key2, vals.val2); + + g.delegate = vals.key; + g.eval("grayRoot().push(delegate)"); + addMarkObservers([vals.map, vals.key]); + g.addMarkObservers([vals.key]); + addMarkObservers([vals.val]); + + grayRoot().push(vals.key2); + addMarkObservers([vals.map2, vals.key2]); + g.addMarkObservers([vals.key2]); + addMarkObservers([vals.val2]); + + const labels = ["map", "key", "delegate", "value", "map2", "key2", "delegate2", "value2"]; + + gc(); + + g.enqueueMark(vals.key); + g.enqueueMark(vals.key2); + enqueueMark("yield"); // checkpoint 1 + + vals.val = null; + vals.key = null; + g.delegate = null; + + vals.map2 = null; // Important! Second map is never marked, keeps nothing alive. + vals.key2 = null; + vals.val2 = null; + g.delegate2 = null; + + const labeledMarks = () => { + const info = {}; + const marks = getMarks(); + for (let i = 0; i < labels.length; i++) + info[labels[i]] = marks[i]; + return info; + }; + + const showmarks = () => { + print("Marks:"); + for (const [label, mark] of Object.entries(labeledMarks())) + print(` ${label}: ${mark}`); + }; + + print("Starting incremental GC"); + startGCMarking(); + // Checkpoint 1, after marking key + showmarks(); + var marks = labeledMarks(); + assertEq(marks.map, "unmarked", "map is unmarked"); + assertEq(marks.key, "unmarked", "key is not marked yet"); + assertEq(marks.delegate, "black", "delegate is black"); + assertEq(marks.map2, "unmarked", "map2 is unmarked"); + assertEq(marks.key2, "unmarked", "key2 is not marked yet"); + assertEq(marks.delegate2, "black", "delegate2 is black"); + + gcslice(); + // GC complete. When entering weak marking mode, black delegate propagated to + // key. + showmarks(); + marks = labeledMarks(); + assertEq(marks.map, "black", "map is black"); + assertEq(marks.key, "black", "delegate marked key black because of weakmap"); + assertEq(marks.delegate, "black", "delegate is still black"); + assertEq(marks.value, "black", "black map + black delegate => black value"); + assertEq(marks.map2, "dead", "map2 is dead"); + assertEq(marks.key2, "gray", "key2 marked gray, map2 had no effect"); + assertEq(marks.delegate2, "black", "delegate artificially marked black via mark queue"); + assertEq(marks.value2, "dead", "dead map + black delegate => dead value"); + + clearMarkQueue(); + clearMarkObservers(); + grayRoot().length = 0; + g.eval("grayRoot().length = 0"); + + return vals; // To prevent the JIT from optimizing out vals. +} + +if (this.enqueueMark) + runtest(grayMarkingMapLast); + +function grayMapKey() { + const vals = {}; + vals.m = new WeakMap(); + vals.key = Object.create(null); + vals.val = Object.create(null); + vals.m.set(vals.key, vals.val); + + // Maps are allocated black, so we won't be able to mark it gray during the + // first GC. + gc(); + + addMarkObservers([vals.m, vals.key, vals.val]); + + // Wait until we can mark gray (ie, sweeping). Mark the map gray and yield. + // This should happen all in one slice. + enqueueMark("set-color-gray"); + enqueueMark(vals.m); + enqueueMark("unset-color"); + enqueueMark("yield"); + + // Make the weakmap no longer reachable from the roots, so we can mark it + // gray. + vals.m = null; + + enqueueMark(vals.key); + enqueueMark("yield"); + + vals.key = vals.val = null; + + startGCMarking(); + assertEq(getMarks().join("/"), "gray/unmarked/unmarked", + "marked the map gray"); + + gcslice(100000); + assertEq(getMarks().join("/"), "gray/black/unmarked", + "key is now marked black"); + + finishgc(); // Finish the GC + + assertEq(getMarks().join("/"), "gray/black/gray", + "at end: black/gray => gray"); + + clearMarkQueue(); + clearMarkObservers(); +} + +if (this.enqueueMark) + runtest(grayMapKey); + +function grayKeyMap() { + const vals = {}; + vals.m = new WeakMap(); + vals.key = Object.create(null); + vals.val = Object.create(null); + vals.m.set(vals.key, vals.val); + + addMarkObservers([vals.m, vals.key, vals.val]); + + enqueueMark(vals.key); + enqueueMark("yield"); + + // Wait until we are gray marking. + enqueueMark("set-color-gray"); + enqueueMark(vals.m); + enqueueMark("unset-color"); + enqueueMark("yield"); + + enqueueMark("set-color-black"); + enqueueMark(vals.m); + enqueueMark("unset-color"); + + // Make the weakmap no longer reachable from the roots, so we can mark it + // gray. + vals.m = null; + + vals.key = vals.val = null; + + // Only mark this zone, to avoid interference from other tests that may have + // created additional zones. + schedulezone(vals); + + startGCMarking(); + // getMarks() returns map/key/value + reportMarks("1: "); + assertEq(getMarks().join("/"), "unmarked/black/unmarked", + "marked key black"); + + // We always yield before sweeping (in the absence of zeal), so we will see + // the unmarked state another time. + gcslice(100000); + reportMarks("2: "); + assertEq(getMarks().join("/"), "unmarked/black/unmarked", + "marked key black, yield before sweeping"); + + gcslice(100000); + reportMarks("3: "); + assertEq(getMarks().join("/"), "gray/black/gray", + "marked the map gray, which marked the value when map scanned"); + + finishgc(); // Finish the GC + reportMarks("4: "); + assertEq(getMarks().join("/"), "black/black/black", + "further marked the map black, so value should also be blackened"); + + clearMarkQueue(); + clearMarkObservers(); +} + +if (this.enqueueMark) + runtest(grayKeyMap); + +// Cause a key to be marked black *during gray marking*, by first marking a +// delegate black, then marking the map and key gray. When the key is scanned, +// it should be seen to be a CCW of a black delegate and so should itself be +// marked black. +// +// The bad behavior being prevented is: +// +// 1. You wrap an object in a CCW and use it as a weakmap key to some +// information. +// 2. You keep a strong reference to the object (in its compartment). +// 3. The only references to the CCW are gray, and are in fact part of a cycle. +// 4. The CC runs and discards the CCW. +// 5. You look up the object in the weakmap again. This creates a new wrapper +// to use as a key. It is not in the weakmap, so the information you stored +// before is not found. (It may have even been collected, if you had no +// other references to it.) +// +function blackDuringGray() { + const g = newGlobal({newCompartment: true}); + const vals = {}; + vals.map = new WeakMap(); + vals.key = g.eval("Object.create(null)"); + vals.val = Object.create(null); + vals.map.set(vals.key, vals.val); + + g.delegate = vals.key; + addMarkObservers([vals.map, vals.key]); + g.addMarkObservers([vals.key]); + addMarkObservers([vals.val]); + // Mark observers: map, key, delegate, value + + gc(); + + g.enqueueMark(vals.key); // Mark the delegate black + enqueueMark("yield"); // checkpoint 1 + + // Mark the map gray. This will scan through all entries, find our key, and + // mark it black because its delegate is black. + enqueueMark("set-color-gray"); + enqueueMark(vals.map); // Mark the map gray + + vals.map = null; + vals.val = null; + vals.key = null; + g.delegate = null; + + const showmarks = () => { + print("[map,key,delegate,value] marked " + JSON.stringify(getMarks())); + }; + + print("Starting incremental GC"); + startGCMarking(); + // Checkpoint 1, after marking delegate black + showmarks(); + var marks = getMarks(); + assertEq(marks[0], "unmarked", "map is not marked yet"); + assertEq(marks[1], "unmarked", "key is not marked yet"); + assertEq(marks[2], "black", "delegate is black"); + assertEq(marks[3], "unmarked", "values is not marked yet"); + + finishgc(); + showmarks(); + marks = getMarks(); + assertEq(marks[0], "gray", "map is gray"); + assertEq(marks[1], "gray", "gray map + black delegate should mark key gray"); + assertEq(marks[2], "black", "delegate is still black"); + assertEq(marks[3], "gray", "gray map + gray key => gray value"); + + clearMarkQueue(); + clearMarkObservers(); + grayRoot().length = 0; + g.eval("grayRoot().length = 0"); +} + +if (this.enqueueMark) + runtest(blackDuringGray); + +// Same as above, except relying on the implicit edge from delegate -> key. +function blackDuringGrayImplicit() { + const g = newGlobal({newCompartment: true}); + const vals = {}; + vals.map = new WeakMap(); + vals.key = g.eval("Object.create(null)"); + vals.val = Object.create(null); + vals.map.set(vals.key, vals.val); + + g.delegate = vals.key; + addMarkObservers([vals.map, vals.key]); + g.addMarkObservers([vals.key]); + addMarkObservers([vals.val]); + // Mark observers: map, key, delegate, value + + gc(); + + // Mark the map gray. This will scan through all entries, find our key, and + // add implicit edges from delegate -> key and delegate -> value. + enqueueMark("set-color-gray"); + enqueueMark(vals.map); // Mark the map gray + enqueueMark("yield"); // checkpoint 1 + + enqueueMark("set-color-black"); + g.enqueueMark(vals.key); // Mark the delegate black, propagating to key. + + vals.map = null; + vals.val = null; + vals.key = null; + g.delegate = null; + + const showmarks = () => { + print("[map,key,delegate,value] marked " + JSON.stringify(getMarks())); + }; + + print("Starting incremental GC"); + startGCMarking(); + // Checkpoint 1, after marking map gray + showmarks(); + var marks = getMarks(); + assertEq(marks[0], "gray", "map is gray"); + assertEq(marks[1], "unmarked", "key is not marked yet"); + assertEq(marks[2], "unmarked", "delegate is not marked yet"); + assertEq(marks[3], "unmarked", "value is not marked yet"); + + finishgc(); + showmarks(); + marks = getMarks(); + assertEq(marks[0], "gray", "map is gray"); + assertEq(marks[1], "gray", "gray map + black delegate should mark key gray"); + assertEq(marks[2], "black", "delegate is black"); + assertEq(marks[3], "gray", "gray map + gray key => gray value via delegate -> value"); + + clearMarkQueue(); + clearMarkObservers(); + grayRoot().length = 0; + g.eval("grayRoot().length = 0"); +} + +if (this.enqueueMark) + runtest(blackDuringGrayImplicit); diff --git a/js/src/jit-test/tests/gc/weak-marking-varying.js b/js/src/jit-test/tests/gc/weak-marking-varying.js new file mode 100644 index 0000000000..76dc39dfb2 --- /dev/null +++ b/js/src/jit-test/tests/gc/weak-marking-varying.js @@ -0,0 +1,90 @@ +// |jit-test| allow-unhandlable-oom + +// Crash test. Try lots of different combinations of mark colors and +// sequencing, and rely on the in-code asserts to detect problems. + +// This test requires precise control over GC timing. The SM(cgc) job will fail +// without this, because startgc() asserts if an incremental GC is already in +// progress. +gczeal(0); + +function global(where) { + if (where == 'same-realm') + return globalThis; + if (where == 'same-compartment') + return newGlobal(); + if (where == 'same-zone') + newGlobal({sameZoneAs: {}}); + return newGlobal({newCompartment: true}); +} + +function varying(mapColor, keyColor, delegateColor, order, where) { + const vals = {}; + const g = global(where); + + vals.m = new WeakMap(); + vals.key = g.eval("Object.create(null)"); + vals.val = Object.create(null); + vals.m.set(vals.key, vals.val); + + addMarkObservers([vals.m, vals.key]); + g.delegate = vals.key; + g.eval('addMarkObservers([delegate])'); + g.delegate = null; + addMarkObservers([vals.val]); + + for (const action of order) { + if (action == 'key' && ['black', 'gray'].includes(keyColor)) { + enqueueMark(`set-color-${keyColor}`); + enqueueMark(vals.key); + enqueueMark("unset-color"); + enqueueMark("yield"); + } else if (action == 'map' && ['black', 'gray'].includes(mapColor)) { + enqueueMark(`set-color-${mapColor}`); + enqueueMark(vals.m); + enqueueMark("drain"); + enqueueMark("unset-color"); + enqueueMark("yield"); + } else if (action == 'delegate' && ['black', 'gray'].includes(delegateColor)) { + g.delegate = vals.key; + g.eval(`enqueueMark("set-color-${delegateColor}")`); + g.eval('enqueueMark(delegate)'); + g.eval('enqueueMark("unset-color")'); + g.eval('enqueueMark("yield")'); + g.delegate = null; + } + } + + vals.m = vals.key = vals.val = null; + + if (delegateColor == 'uncollected') + schedulezone({}); + startgc(100000); + print(' ' + getMarks().join("/")); + gcslice(100000); + print(' ' + getMarks().join("/")); + finishgc(); + print(' ' + getMarks().join("/")); + + clearMarkQueue(); + clearMarkObservers(); +} + +if (this.enqueueMark) { + for (const mapColor of ['gray', 'black']) { + for (const keyColor of ['gray', 'black', 'unmarked']) { + for (const delegateColor of ['gray', 'black', 'unmarked', 'uncollected']) { + for (const order of [['map', 'key'], + ['key', 'map'], + ['map', 'delegate'], + ['delegate', 'map']]) + { + for (const where of ['same-realm', 'same-compartment', 'same-zone', 'other-zone']) { + print(`\nRunning variant map/key/delegate=${mapColor}/${keyColor}/${delegateColor}, key is ${where}, order: ${order.join(" ")}`); + varying(mapColor, keyColor, delegateColor, order, where); + } + } + } + } + } +} diff --git a/js/src/jit-test/tests/gc/weakRef_in_promise.js b/js/src/jit-test/tests/gc/weakRef_in_promise.js new file mode 100644 index 0000000000..2448ebcd8a --- /dev/null +++ b/js/src/jit-test/tests/gc/weakRef_in_promise.js @@ -0,0 +1,18 @@ +// https://github.com/tc39/proposal-weakrefs/issues/39 +// Weakref should keep the target until the end of current Job, that includes +// microtask(Promise). +let wr; +{ + let obj = {}; + wr = new WeakRef(obj); + obj = null; +} +// obj is out of block scope now, should be GCed. + +gc(); + +assertEq(undefined == wr.deref(), false); +Promise.resolve().then(() => { + assertEq(undefined == wr.deref(), false); +}); + diff --git a/js/src/jit-test/tests/gc/weakRefs-basic.js b/js/src/jit-test/tests/gc/weakRefs-basic.js new file mode 100644 index 0000000000..6900ae0c52 --- /dev/null +++ b/js/src/jit-test/tests/gc/weakRefs-basic.js @@ -0,0 +1,81 @@ +assertEq('WeakRef' in this, true); + +function checkPropertyDescriptor(obj, property, writable, enumerable, + configurable) { + let desc = Object.getOwnPropertyDescriptor(obj, property); + assertEq(typeof desc, "object"); + assertEq(desc.writable, writable); + assertEq(desc.enumerable, enumerable); + assertEq(desc.configurable, configurable); +} + +function assertThrowsTypeError(thunk) { + let error; + try { + thunk(); + } catch (e) { + error = e; + } + assertEq(error instanceof TypeError, true); +} + +assertEq(typeof this.WeakRef, "function"); + +// https://tc39.es/proposal-weakrefs/ + +// 1.1.1.1 +// If NewTarget is undefined, throw a TypeError exception. +assertThrowsTypeError(() => new WeakRef()); + +// 1.1.1.2 +// If Type(target) is not Object, throw a TypeError exception. +assertThrowsTypeError(() => new WeakRef(1)); +assertThrowsTypeError(() => new WeakRef(true)); +assertThrowsTypeError(() => new WeakRef("string")); +assertThrowsTypeError(() => new WeakRef(Symbol())); +assertThrowsTypeError(() => new WeakRef(null)); +assertThrowsTypeError(() => new WeakRef(undefined)); +new WeakRef({}); + +// 1.2 +// The WeakRef constructor has a [[Prototype]] internal slot whose value is the +// intrinsic object %FunctionPrototype%. +assertEq(Object.getPrototypeOf(WeakRef), Function.prototype); + +// 1.2.1 +// The initial value of WeakRef.prototype is the intrinsic %WeakRefPrototype% +// object. +// This property has the attributes { [[Writable]]: false, [[Enumerable]]: false +// , [[Configurable]]: false }. +checkPropertyDescriptor(WeakRef, 'prototype', false, false, false); + +// 1.3 +// The WeakRef prototype object has a [[Prototype]] internal slot whose value is +// the intrinsic object %ObjectPrototype%. +let proto = WeakRef.prototype; +assertEq(Object.getPrototypeOf(proto), Object.prototype); + +// 1.3.1 +// The initial value of WeakRef.prototype.constructor is the intrinsic object +// %WeakRef%. +assertEq(proto.constructor, WeakRef); + +// 1.3.2 +// WeakRef.prototype.deref () +assertEq(proto.hasOwnProperty('deref'), true); +assertEq(typeof proto.deref, 'function'); + +// 1.3.3 +// The initial value of the @@toStringTag property is the String value +// "WeakRef". +// This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, +// [[Configurable]]: true }. +assertEq(proto[Symbol.toStringTag], "WeakRef"); +checkPropertyDescriptor(proto, Symbol.toStringTag, false, false, true); + +// 1.4 +// WeakRef instances are ordinary objects that inherit properties from the +// WeakRef prototype +let weakRef = new WeakRef({}); +assertEq(Object.getPrototypeOf(weakRef), proto); + diff --git a/js/src/jit-test/tests/gc/weakRefs.js b/js/src/jit-test/tests/gc/weakRefs.js new file mode 100644 index 0000000000..e052aa779b --- /dev/null +++ b/js/src/jit-test/tests/gc/weakRefs.js @@ -0,0 +1,122 @@ +// https://tc39.es/ecma262/#sec-addtokeptobjects +// When the abstract operation AddToKeptObjects is called with a target object +// reference, it adds the target to an identity Set that will point strongly at +// the target until the end of the current Job. +// +// https://tc39.es/proposal-weakrefs/#sec-weakref-invariants +// When WeakRef.prototype.deref is called, the referent (if it's not already +// dead) is kept alive so that subsequent, synchronous accesses also return the +// object. + +function testSameCompartmentWeakRef( + targetReachable, + weakRefReachable) { + + let target = {}; + + let weakref = new WeakRef(target); + assertEq(weakref.deref(), target); + + if (!targetReachable) { + target = undefined; + } + + if (!weakRefReachable) { + weakRef = undefined; + } + + clearKeptObjects(); + gc(); + + if (weakRefReachable) { + if (targetReachable) { + assertEq(weakref.deref(), target); + } else { + assertEq(weakref.deref(), undefined); + } + } +} + +let serial = 0; + +function testCrossCompartmentWeakRef( + targetReachable, + weakRefReachable, + collectTargetZone, + collectWeakRefZone, + sameZone) { + + gc(); + + let id = serial++; + let global = newGlobal(sameZone ? {sameZoneAs: this} : {newCompartment: true}); + global.eval('var target = {};'); + global.target.id = id; + + let weakref = new WeakRef(global.target); + assertEq(weakref.deref(), global.target); + + if (!targetReachable) { + global.target = undefined; + } + + if (!weakRefReachable) { + weakRef = undefined; + } + + if (collectTargetZone || collectWeakRefZone) { + clearKeptObjects(); + + if (collectTargetZone) { + schedulezone(global); + } + if (collectWeakRefZone) { + schedulezone(this); + } + + // Incremental GC so we use sweep groups. Shrinking GC to test updating + // pointers. + startgc(1, 'shrinking'); + while (gcstate() !== 'NotActive') { + gcslice(1000, {dontStart: true}); + } + } + + if (!(collectWeakRefZone && !weakRefReachable)) { + if (collectTargetZone && !targetReachable) { + assertEq(weakref.deref(), undefined); + } else if (targetReachable) { + assertEq(weakref.deref(), global.target); + } else { + // Target is not strongly reachable but hasn't been collected yet. We + // can get it back through deref() but must check it based on properties. + assertEq(weakref.deref() !== undefined, true); + assertEq(weakref.deref().id, id); + } + } +} + +gczeal(0); + +for (let targetReachable of [true, false]) { + for (let weakRefReachable of [true, false]) { + testSameCompartmentWeakRef(targetReachable, weakRefReachable); + } +} + +for (let targetReachable of [true, false]) { + for (let weakRefReachable of [true, false]) { + for (let collectTargetZone of [true, false]) { + for (let collectWeakRefZone of [true, false]) { + for (let sameZone of [true, false]) { + if (sameZone && (collectTargetZone != collectWeakRefZone)) { + continue; + } + + testCrossCompartmentWeakRef(targetReachable, weakRefReachable, + collectTargetZone, collectWeakRefZone, sameZone); + } + } + } + } +} diff --git a/js/src/jit-test/tests/gc/weakmap-expose.js b/js/src/jit-test/tests/gc/weakmap-expose.js new file mode 100644 index 0000000000..45ebc7d5a9 --- /dev/null +++ b/js/src/jit-test/tests/gc/weakmap-expose.js @@ -0,0 +1,43 @@ +// Test that WeakMap.get() doesn't return a gray GC thing. + +function checkNotGray(value) { + // Assigning a gray GC thing to an object propery will assert. + let test = {}; + test.property = value; +} + +// 1. Make a black WeakMap with a gray key and gray value. + +gczeal(0); + +let key = {}; +let value = {}; + +let map = new WeakMap(); +map.set(key, value); + +let gray = grayRoot(); +gray.key = key; + +addMarkObservers([map, key, value]); + +gray = null; +key = null; +value = null; + +gc(); + +let marks = getMarks(); +assertEq(marks[0], "black"); +assertEq(marks[1], "gray"); +assertEq(marks[2], "gray"); + +// 2. Get our key back, which will expose it and mark it black. + +key = nondeterministicGetWeakMapKeys(map)[0]; +checkNotGray(key); + +// 3. Look up the value in the map and check it's not gray. + +value = map.get(key); +checkNotGray(value); diff --git a/js/src/jit-test/tests/gc/weakmap-nursery-value.js b/js/src/jit-test/tests/gc/weakmap-nursery-value.js new file mode 100644 index 0000000000..9c61b56632 --- /dev/null +++ b/js/src/jit-test/tests/gc/weakmap-nursery-value.js @@ -0,0 +1,35 @@ +// Bug 1715471 + +// This test relies on triggering GC at precise points. GC zeal modes +// interfere with this. +gczeal(0); + +// This test requires enqueueMark, which is only available in a debugging +// build. +if (!this.enqueueMark) quit(0); + +var wm = new WeakMap(); + +// Force materialization of the map struct. Otherwise it would be allocated +// black during the incremental GC when we do wm.set. +wm.set({}, {}); + +var tenuredKey = Object.create(null); +gc(); // Tenure the WeakMap and key. + +// Enter the GC, since otherwise the minor GC at the beginning would tenure our +// value before it had a chance to be entered into the ephemeron edge list. +startgc(1); +while (gcstate() === "Prepare") gcslice(1); + +// Create a WeakMap entry with a value in the nursery. +var nurseryValue = Object.create(null); +wm.set(tenuredKey, nurseryValue); + +// We want to mark the weakmap first, before the key or value are marked, so +// that the tenuredKey -> nurseryValue edge will be added to the ephemeron edge +// table. +enqueueMark(wm); + +gcslice(1000); +minorgc(); diff --git a/js/src/jit-test/tests/gc/weakmark-remap.js b/js/src/jit-test/tests/gc/weakmark-remap.js new file mode 100644 index 0000000000..f3e8e8f995 --- /dev/null +++ b/js/src/jit-test/tests/gc/weakmark-remap.js @@ -0,0 +1,16 @@ +g1 = newGlobal({ sameZoneAs: this }); + +// Turn on the object metadata builder because it will create internal weakmap +// entries for all objects created from here on. +enableShellAllocationMetadataBuilder(); + +// Construct a CCW for g1.Object, which will internally create the object +// metadata table and add an entry to it. +g1.Object; + +// Begin an incremental GC +gczeal(0); +startgc(1); + +// Call a scary function that does weird stuff. +recomputeWrappers(); diff --git a/js/src/jit-test/tests/gc/weakmark-remap2.js b/js/src/jit-test/tests/gc/weakmark-remap2.js new file mode 100644 index 0000000000..19e7338b5d --- /dev/null +++ b/js/src/jit-test/tests/gc/weakmark-remap2.js @@ -0,0 +1,21 @@ +gczeal(0); + +var g1 = newGlobal({ sameZoneAs: this }); + +// Turn on the object metadata builder because it will create internal weakmap +// entries for all objects created from here on. +enableShellAllocationMetadataBuilder(); + +// Construct a pair of error objects. Perhaps this fills out the metadata table? +new Error(); +new Error(); + +// Construct a CCW for g1.Object, which will internally create the object +// metadata table and add an entry to it. +try { g1.Object } catch(e) { } + +// Begin an incremental GC +startgc(1); + +// Call a scary function that does weird stuff. +recomputeWrappers(); diff --git a/js/src/jit-test/tests/generators/bug1098947.js b/js/src/jit-test/tests/generators/bug1098947.js new file mode 100644 index 0000000000..2a1d5af774 --- /dev/null +++ b/js/src/jit-test/tests/generators/bug1098947.js @@ -0,0 +1,11 @@ +function* f() { + try { + let foo = 3; + for (var i=0; i<50; i++) + yield i + foo; + } catch(e) {} +} +var it = f(); +for (var i=0; i<40; i++) + it.next(); +it.return(); diff --git a/js/src/jit-test/tests/generators/bug1462353.js b/js/src/jit-test/tests/generators/bug1462353.js new file mode 100644 index 0000000000..9140a38339 --- /dev/null +++ b/js/src/jit-test/tests/generators/bug1462353.js @@ -0,0 +1,11 @@ +class Base {} +class Derived extends Base { + constructor() { + var fun = async() => { + for (var i = 0; i < 20; i++) {} // Trigger OSR. + super(); + }; + fun(); + } +} +d = new Derived(); diff --git a/js/src/jit-test/tests/generators/bug1491331.js b/js/src/jit-test/tests/generators/bug1491331.js new file mode 100644 index 0000000000..2fe3770234 --- /dev/null +++ b/js/src/jit-test/tests/generators/bug1491331.js @@ -0,0 +1,11 @@ +let g = newGlobal({newCompartment: true}); +g.eval('function* f() { yield 123; }'); + +let dbg = Debugger(g); +dbg.onEnterFrame = frame => { + dbg.removeDebuggee(g); + dbg.addDebuggee(g); +}; + +let genObj = g.f(); +genObj.return(); diff --git a/js/src/jit-test/tests/generators/bug1501722.js b/js/src/jit-test/tests/generators/bug1501722.js new file mode 100644 index 0000000000..9ff2724a9f --- /dev/null +++ b/js/src/jit-test/tests/generators/bug1501722.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !('oomTest' in this) + +ignoreUnhandledRejections(); + +(function () { + g = newGlobal({newCompartment: true}); + g.parent = this; + g.eval("(function() { var dbg = Debugger(parent); dbg.onEnterFrame = function() {} } )") + ``; + oomTest(async function() {}, {expectExceptionOnFailure: false}); +})() diff --git a/js/src/jit-test/tests/generators/bug1542660-2.js b/js/src/jit-test/tests/generators/bug1542660-2.js new file mode 100644 index 0000000000..60fc3edcf6 --- /dev/null +++ b/js/src/jit-test/tests/generators/bug1542660-2.js @@ -0,0 +1,111 @@ +// |jit-test| skip-if: !('gc' in this) || !('clearKeptObjects' in this) +// In generators, when we exit a lexical scope, its non-aliased bindings go away; +// they don't keep their last values gc-alive. + +let cases = [ + function* onNormalExitFromFunction_VarBinding() { + var tmp = yield 1; + consumeValue(tmp); + }, + + function* onNormalExitFromFunction_LetBinding() { + let tmp = yield 1; + consumeValue(tmp); + }, + + function* onNormalExitFromBlock() { + if (typeof onNormalExitFromBlock === 'function') { + let tmp = yield 1; + consumeValue(tmp); + } + yield 2; + }, + + function* onNormalExitFromCStyleForLet() { + for (let tmp = yield 1; tmp !== null; tmp = null) { + consumeValue(tmp); + } + yield 2; + }, + + function* onNormalExitFromForLetOf() { + for (let tmp of [yield 1]) { + consumeValue(tmp); + } + yield 2; + }, + + function* onNormalExitFromForConstOf() { + for (const tmp of [yield 1]) { + consumeValue(tmp); + } + yield 2; + }, + + function* onNormalExitFromForConstDestructuringOf() { + for (const {a, b, c, d} of [yield 1]) { + consumeValue(a); + } + yield 2; + }, + + function* onNormalExitFromForConstArrayDestructuringOf() { + for (const [x] of [[yield 1]]) { + consumeValue(x); + } + yield 2; + }, + + function* onNormalExitFromBlockInLoop() { + for (var i = 0; i < 2; i++) { + if (i == 0) { + let tmp = yield 1; + consumeValue(tmp); + } else { + yield 2; + } + } + }, + + function* onBreakFromBlock() { + x: { + let tmp = yield 1; + consumeValue(tmp); + break x; + } + yield 2; + }, + + function* onExitFromCatchBlock() { + try { + throw yield 1; + } catch (exc) { + consumeValue(exc); + } + yield 2; + }, +]; + +var consumeValue; + +function runTest(g) { + consumeValue = eval("_ => {}"); + + let generator = g(); + let result = generator.next(); + assertEq(result.done, false); + assertEq(result.value, 1); + let object = {}; + let weakRef = new WeakRef(object); + result = generator.next(object); + assertEq(result.value, result.done ? undefined : 2); + + object = null; + clearKeptObjects(); + gc(); + assertEq(weakRef.deref(), undefined); +} + +for (let g of cases) { + runTest(g); +} diff --git a/js/src/jit-test/tests/generators/bug1542660.js b/js/src/jit-test/tests/generators/bug1542660.js new file mode 100644 index 0000000000..b3f3ea4554 --- /dev/null +++ b/js/src/jit-test/tests/generators/bug1542660.js @@ -0,0 +1,53 @@ +// |jit-test| skip-if: !('gc' in this) || !('clearKeptObjects' in this) +// Locals in async functions should not keep objects alive after going out of scope. +// Test by Mathieu Hofman. + +let nextId = 0; + +let weakRef; +let savedCallback; + +const tests = [ + function() { + let object = { id: ++nextId }; + console.log(`created object ${object.id}`); + savedCallback = () => {}; + weakRef = new WeakRef(object); + }, + async function() { + let object = { id: ++nextId }; + console.log(`created object ${object.id}`); + savedCallback = () => {}; + weakRef = new WeakRef(object); + }, + async function() { + function* gen() { + { + let object = { id: ++nextId }; + console.log(`created object ${object.id}`); + // Yielding here stores the local variable `object` in the generator + // object. + yield 1; + weakRef = new WeakRef(object); + } + // Yielding here should clear it. + yield 2; + } + let iter = gen(); + assertEq(iter.next().value, 1); + assertEq(iter.next().value, 2); + savedCallback = iter; // Keep the generator alive for GC. + } +]; + +(async () => { + for (const test of tests) { + await test(); + assertEq(!!weakRef.deref(), true); + clearKeptObjects(); + gc(); + if (weakRef.deref()) { + throw new Error(`object ${nextId} was not collected`); + } + } +})(); diff --git a/js/src/jit-test/tests/generators/bug1664463.js b/js/src/jit-test/tests/generators/bug1664463.js new file mode 100644 index 0000000000..a6a45b4907 --- /dev/null +++ b/js/src/jit-test/tests/generators/bug1664463.js @@ -0,0 +1,31 @@ +// |jit-test| skip-if: !('gc' in this) || !('drainJobQueue' in this) +// Test that an unused local in an async function is not kept alive by a closure +// (bug 1412202). Based on a test case by Andy Wingo in bug 1664463. + +let nfinalized = 0; +let finalizers = new FinalizationRegistry(f => { nfinalized++; }); + +class A { + constructor(callback) { + this.b = {callback}; + finalizers.register(this, this.b, this); + } +} + +const LOOP_COUNT = 200; +const FINALIZER_COUNT = 200; + +async function main() { + for (let j = 0; j < LOOP_COUNT; j++) { + for (let i = 0; i < FINALIZER_COUNT; i++) { + let console = globalThis.console; + let obj = new A(() => console.log("hello")); + } + drainJobQueue(); + } + + gc(); + drainJobQueue(); + assertEq(nfinalized, LOOP_COUNT * FINALIZER_COUNT, "all objects should be finalized"); +} +main(); diff --git a/js/src/jit-test/tests/generators/bug1673080.js b/js/src/jit-test/tests/generators/bug1673080.js new file mode 100644 index 0000000000..a2b590c748 --- /dev/null +++ b/js/src/jit-test/tests/generators/bug1673080.js @@ -0,0 +1,23 @@ +// |jit-test| --code-coverage + +"use strict"; + +let s = `\ +(function* () { +yield 0; +try { v1; } catch (exc) { yield [1, exc]; } +try { v255; } catch (exc) { yield [2, exc]; } +let v255, v254, v253, v252, v251, v250, v249, v248, v247, v246, v245, v244, v243, v242, v241, v240, v239, v238, v237, v236, v235, v234, v233, v232, v231, v230, v229, v228, v227, v226, v225, v224, v223, v222, v221, v220, v219, v218, v217, v216, v215, v214, v213, v212, v211, v210, v209, v208, v207, v206, v205, v204, v203, v202, v201, v200, v199, v198, v197, v196, v195, v194, v193, v192; +let v191, v190, v189, v188, v187, v186, v185, v184, v183, v182, v181, v180, v179, v178, v177, v176, v175, v174, v173, v172, v171, v170, v169, v168, v167, v166, v165, v164, v163, v162, v161, v160, v159, v158, v157, v156, v155, v154, v153, v152, v151, v150, v149, v148, v147, v146, v145, v144, v143, v142, v141, v140, v139, v138, v137, v136, v135, v134, v133, v132, v131, v130, v129, v128; +let v127, v126, v125, v124, v123, v122, v121, v120, v119, v118, v117, v116, v115, v114, v113, v112, v111, v110, v109, v108, v107, v106, v105, v104, v103, v102, v101, v100, v99, v98, v97, v96, v95, v94, v93, v92, v91, v90, v89, v88, v87, v86, v85, v84, v83, v82, v81, v80, v79, v78, v77, v76, v75, v74, v73, v72, v71, v70, v69, v68, v67, v66, v65, v64; +let v63, v62, v61, v60, v59, v58, v57, v56, v55, v54, v53, v52, v51, v50, v49, v48, v47, v46, v45, v44, v43, v42, v41, v40, v39, v38, v37, v36, v35, v34, v33, v32, v31, v30, v29, v28, v27, v26, v25, v24, v23, v22, v21, v20, v19, v18, v17, v16, v15, v14, v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1, v0; + +let u255, u254, u253, u252, u251, u250, u249, u248, u247, u246, u245, u244, u243, u242, u241, u240, u239, u238, u237, u236, u235, u234, u233, u232, u231, u230, u229, u228, u227, u226, u225, u224, u223, u222, u221, u220, u219, u218, u217, u216, u215, u214, u213, u212, u211, u210, u209, u208, u207, u206, u205, u204, u203, u202, u201, u200, u199, u198, u197, u196, u195, u194, u193, u192; +let u191, u190, u189, u188, u187, u186, u185, u184, u183, u182, u181, u180, u179, u178, u177, u176, u175, u174, u173, u172, u171, u170, u169, u168, u167, u166, u165, u164, u163, u162, u161, u160, u159, u158, u157, u156, u155, u154, u153, u152, u151, u150, u149, u148, u147, u146, u145, u144, u143, u142, u141, u140, u139, u138, u137, u136, u135, u134, u133, u132, u131, u130, u129, u128; +let u127, u126, u125, u124, u123, u122, u121, u120, u119, u118, u117, u116, u115, u114, u113, u112, u111, u110, u109, u108, u107, u106, u105, u104, u103, u102, u101, u100, u99, u98, u97, u96, u95, u94, u93, u92, u91, u90, u89, u88, u87, u86, u85, u84, u83, u82, u81, u80, u79, u78, u77, u76, u75, u74, u73, u72, u71, u70, u69, u68, u67, u66, u65, u64; +let u63, u62, u61, u60, u59, u58, u57, u56, u55, u54, u53, u52, u51, u50, u49, u48, u47, u46, u45, u44, u43, u42, u41, u40, u39, u38, u37, u36, u35, u34, u33, u32, u31, u30, u29, u28, u27, u26, u25, u24, u23, u22, u21, u20, u19, u18, u17, u16, u15, u14, u13, u12, u11, u10, u9, u8, u7, u6, u5, u4, u3, u2, u1, u0; + +}) +`; +let gen = eval(s); +gen().next(); // don't assert diff --git a/js/src/jit-test/tests/generators/bug1767181.js b/js/src/jit-test/tests/generators/bug1767181.js new file mode 100644 index 0000000000..54892be81f --- /dev/null +++ b/js/src/jit-test/tests/generators/bug1767181.js @@ -0,0 +1,14 @@ +var caught = false; +function* a() { + try { + try { + yield; + } finally { + for (b = 0; b < 20; b++) {} + } + } catch (e) { caught = true; } +} +c = a(); +c.next(); +c.return(); +assertEq(caught, false); diff --git a/js/src/jit-test/tests/generators/bug1773628.js b/js/src/jit-test/tests/generators/bug1773628.js new file mode 100644 index 0000000000..8fe578d71e --- /dev/null +++ b/js/src/jit-test/tests/generators/bug1773628.js @@ -0,0 +1,13 @@ +// |jit-test| --fast-warmup +function* f() { + try { + yield; + } finally { + for (let b = 0; b < 10; b++) {} + } +} +for (var i = 0; i < 50; i++) { + let c = f(); + c.next(); + c.return(); +} diff --git a/js/src/jit-test/tests/generators/bug1791968.js b/js/src/jit-test/tests/generators/bug1791968.js new file mode 100644 index 0000000000..8438981ddf --- /dev/null +++ b/js/src/jit-test/tests/generators/bug1791968.js @@ -0,0 +1,33 @@ +function opaqueThrow() { with ({}) {} throw 3; } + +function* foo(n) { + try { + // Get into the catch block. + opaqueThrow(); + } catch(v12) { + // Yield a value. + yield 1; + } finally { + // OSR into Warp with JS_GENERATOR_CLOSING + // as the pushed exception. + for (let i = 0; i < 100; i++) { } + + // Create an RPow. + var x = Math.pow(1,n); + + // When the finally block terminates, we re-throw + // JS_GENERATOR_CLOSING, and rematerialize the frame + // for HandleClosingGeneratorReturn, triggering + // recovery of the RPow. + } +} + +for (let i = 0; i < 30; i++) { + let gen = foo(1); + + // Advance to the yield in the catch block. + gen.next(); + + // Close the generator. + gen.return(); +} diff --git a/js/src/jit-test/tests/generators/bug1811171.js b/js/src/jit-test/tests/generators/bug1811171.js new file mode 100644 index 0000000000..4f6bbb50fa --- /dev/null +++ b/js/src/jit-test/tests/generators/bug1811171.js @@ -0,0 +1,14 @@ +function* gen(z) { + try { + yield 1; + } finally { + for (let i = 0; i < 10; i++) {} + var x = z + 1; + } +} + +for (let i = 0; i < 20; i++) { + let g = gen(1); + g.next(); + g.return(); +} diff --git a/js/src/jit-test/tests/generators/bug908920.js b/js/src/jit-test/tests/generators/bug908920.js new file mode 100644 index 0000000000..5de57c546e --- /dev/null +++ b/js/src/jit-test/tests/generators/bug908920.js @@ -0,0 +1,9 @@ +if (typeof schedulegc != 'undefined') { + Function("\ + x = (function*() { yield })();\ + new Set(x);\ + schedulegc(1);\ + print( /x/ );\ + for (p in x) {}\ + ")(); +} diff --git a/js/src/jit-test/tests/generators/bug931414.js b/js/src/jit-test/tests/generators/bug931414.js new file mode 100644 index 0000000000..df1f24d094 --- /dev/null +++ b/js/src/jit-test/tests/generators/bug931414.js @@ -0,0 +1,11 @@ +// |jit-test| error: TypeError + +load(libdir + "iteration.js"); + +function iterable() { + var iterable = {}; + iterable[Symbol.iterator] = () => ({next: () => void 0}); + return iterable; +} + +(function*(){yield*iterable()}()).next(); diff --git a/js/src/jit-test/tests/generators/closing-osr.js b/js/src/jit-test/tests/generators/closing-osr.js new file mode 100644 index 0000000000..0e0fcfe68d --- /dev/null +++ b/js/src/jit-test/tests/generators/closing-osr.js @@ -0,0 +1,24 @@ +// OSR into a |finally| block while closing a legacy generator should work. +var log = ""; +function* f() { + try { + try { + log += "a"; + yield 2; + log += "b"; + yield 3; + } finally { + log += "c"; + for (var i=0; i<20; i++) {}; + log += "d"; + } + } catch(e) { + log += "e"; + } + log += "f"; +} + +var it = f(); +assertEq(it.next().value, 2); +it.return(); +assertEq(log, "acd"); diff --git a/js/src/jit-test/tests/generators/es6-syntax.js b/js/src/jit-test/tests/generators/es6-syntax.js new file mode 100644 index 0000000000..e805a0b62b --- /dev/null +++ b/js/src/jit-test/tests/generators/es6-syntax.js @@ -0,0 +1,34 @@ +// Test interactions between ES6 generators and not-yet-standard +// features. + +function assertSyntaxError(str) { + var msg; + var evil = eval; + try { + // Non-direct eval. + evil(str); + } catch (exc) { + if (exc instanceof SyntaxError) + return; + msg = "Assertion failed: expected SyntaxError, got " + exc; + } + if (msg === undefined) + msg = "Assertion failed: expected SyntaxError, but no exception thrown"; + throw new Error(msg + " - " + str); +} + +// Destructuring binding. +assertSyntaxError("function* f(x = yield) {}"); +assertSyntaxError("function* f(x = yield 17) {}"); +assertSyntaxError("function* f([yield]) {}"); +assertSyntaxError("function* f({ yield }) {}"); +assertSyntaxError("function* f(...yield) {}"); + +// For each. +assertSyntaxError("for yield"); +assertSyntaxError("for yield (;;) {}"); +assertSyntaxError("for yield (x of y) {}"); +assertSyntaxError("for yield (var i in o) {}"); + +// Expression bodies. +assertSyntaxError("function* f() yield 7"); diff --git a/js/src/jit-test/tests/generators/limits.js b/js/src/jit-test/tests/generators/limits.js new file mode 100644 index 0000000000..0e44284d90 --- /dev/null +++ b/js/src/jit-test/tests/generators/limits.js @@ -0,0 +1,90 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") +// +// Tests aimed at AbstractGeneratorObject::FixedSlotLimit. + +"use strict"; + +function test(n) { + const iterate = (start, f) => { + let value = start; + for (let i = n; i-- > 0; ) { + value = f(value, i); + } + return value; + }; + + const generate = (start, f) => { + let s = iterate(start, f); + let gen = eval('(function* () {\n' + s + '})'); + return gen(); + }; + + // Test 1: many vars in the function scope + { + let it = generate( + "yield 0;", + (s, i) => ` + var v${i} = ${i}; + ${s} + assertEq(v${i}, ${i}); + ` + ); + assertEq(it.next().done, false); + assertEq(it.next().done, true); + } + + // Test 2: many let-bindings in nested lexical scopes + { + let it = generate( + "yield a => v174;", + (s, i) => { + let block = ` + let v${i} = ${i}; + ${s} + assertEq(v${i}, ${i}); + `; + if (i % 17 == 0) { + block = '{\n' + block + '}\n'; + } + return block; + } + ); + assertEq(it.next().done, false); + assertEq(it.next().done, true); + } + + // Test 3: TDZ is preserved across yield + { + let it = generate( + 'yield 0;\n' + + 'try { v1; } catch (exc) { yield [1, exc]; }\n' + + `try { v${n - 1}; } catch (exc) { yield [2, exc]; }\n`, + (s, i) => { + let block = ` + ${s} + let v${i}; + `; + if (i % 256 == 0) { + block = '{\n' + block + '}\n'; + } + return block; + } + ); + let {value, done} = it.next(); + assertEq(value, 0); + ({value, done} = it.next()); + assertEq(value[0], 1); + assertEq(value[1].name, "ReferenceError"); + ({value, done} = it.next()); + assertEq(value[0], 2); + assertEq(value[1].name, "ReferenceError"); + ({value, done} = it.next()); + assertEq(done, true); + } +} + +for (let exp = 8; exp < 12; exp++) { + const n = 2 ** exp; + test(n - 2); + test(n + 1); +} diff --git a/js/src/jit-test/tests/generators/next-on-finished.js b/js/src/jit-test/tests/generators/next-on-finished.js new file mode 100644 index 0000000000..66c25a13f7 --- /dev/null +++ b/js/src/jit-test/tests/generators/next-on-finished.js @@ -0,0 +1,6 @@ +function*g(){ }; +o = g(); +o.next(); +result = o.next(); +assertEq(result.done, true); +assertEq(o.value, undefined); diff --git a/js/src/jit-test/tests/generators/relazify-arguments-usage.js b/js/src/jit-test/tests/generators/relazify-arguments-usage.js new file mode 100644 index 0000000000..0c37d9b56c --- /dev/null +++ b/js/src/jit-test/tests/generators/relazify-arguments-usage.js @@ -0,0 +1,10 @@ + +function * f() { + yield arguments; + yield arguments; + yield arguments; +} + +for (x of f()) { + relazifyFunctions(); +} diff --git a/js/src/jit-test/tests/generators/return-break-continue.js b/js/src/jit-test/tests/generators/return-break-continue.js new file mode 100644 index 0000000000..1d3070e28a --- /dev/null +++ b/js/src/jit-test/tests/generators/return-break-continue.js @@ -0,0 +1,66 @@ +load(libdir + "iteration.js"); + +// break in finally. +function *f1() { + L: try { + yield 1; + } finally { + break L; + } + return 2; +} +it = f1(); +assertIteratorNext(it, 1); +assertIteratorResult(it.return(4), 2, true); +assertIteratorDone(it); + +// continue in finally, followed by return. +function *f2() { + do try { + yield 1; + } catch (e) { + assertEq(0, 1); + } finally { + continue; + } while (0); + return 2; +} +it = f2(); +assertIteratorNext(it, 1); +assertIteratorResult(it.return(4), 2, true); +assertIteratorDone(it); + +// continue in finally, followed by yield. +function *f3() { + do try { + yield 1; + } catch (e) { + assertEq(0, 1); + } finally { + continue; + } while (0); + yield 2; +} +it = f3(); +assertIteratorNext(it, 1); +assertIteratorResult(it.return(4), 2, false); +assertIteratorDone(it); + +// continue in finally. +function *f4() { + var i = 0; + while (true) { + try { + yield i++; + } finally { + if (i < 3) + continue; + } + } +} +it = f4(); +assertIteratorNext(it, 0); +assertIteratorResult(it.return(-1), 1, false); +assertIteratorResult(it.return(-2), 2, false); +assertIteratorResult(it.return(-3), -3, true); +assertIteratorDone(it); diff --git a/js/src/jit-test/tests/generators/return.js b/js/src/jit-test/tests/generators/return.js new file mode 100644 index 0000000000..b71b38921e --- /dev/null +++ b/js/src/jit-test/tests/generators/return.js @@ -0,0 +1,181 @@ +// |jit-test| error:done + +load(libdir + "iteration.js"); + +function *f1() { + yield 1; + yield 2; +} + +// Return after initial yield. +var it = f1(); +assertIteratorResult(it.return(3), 3, true); +assertIteratorResult(it.return(Math), Math, true); +assertIteratorResult(it.return(), undefined, true); +assertIteratorDone(it); + +// Return after other yield. +it = f1(); +assertIteratorNext(it, 1); +assertIteratorResult(it.return(null), null, true); +assertIteratorDone(it); + +// Finally blocks should run and can override the return value. +function *f2() { + try { + yield 1; + yield 2; + } finally { + return 9; + } +} +it = f2(); +assertIteratorNext(it, 1); +assertIteratorResult(it.return(3), 9, true); +assertIteratorDone(it); + +// Yield in finally block can override the return, but we should still +// return the correct value after that. +function *f3() { + try { + try { + yield 1; + yield 2; + } finally { + yield 3; + } + } finally { + yield 4; + } +} +it = f3(); +assertIteratorNext(it, 1); +assertIteratorResult(it.return(9), 3, false); +assertIteratorNext(it, 4); +assertIteratorDone(it, 9); +assertIteratorDone(it, undefined); + +// Finally block can throw. +function *f4() { + try { + yield 1; + yield 2; + } finally { + throw 3; + } +} +it = f4(); +assertIteratorNext(it, 1); +assertThrowsValue(() => it.return(8), 3); +assertIteratorDone(it); + +function *f5() {} +it = f5(); +assertIteratorDone(it); +assertIteratorResult(it.return(3), 3, true); +assertIteratorDone(it); + +function *f6() { + try { + yield 1; + yield 2; + } finally { + try { + return 9; + } finally { + yield 3; + } + } +} +it = f6(); +assertIteratorNext(it, 1); +assertIteratorResult(it.return(5), 3, false); +assertIteratorDone(it, 9); +assertIteratorDone(it); + +// If we yield in a finally block, a second .return() can override +// the first one. +function *f7() { + try { + yield 1; + yield 2; + } finally { + try { + yield 3; + } finally { + yield 4; + } + } +} +it = f7(); +assertIteratorNext(it, 1); +assertIteratorResult(it.return(5), 3, false); +assertIteratorResult(it.return(6), 4, false); +assertIteratorDone(it, 6); +assertIteratorDone(it); + +// If we yield in a finally block, .throw() should work. +function *f8() { + try { + yield 1; + yield 2; + } finally { + yield 3; + } +} +it = f8(); +assertIteratorNext(it, 1); +assertIteratorResult(it.return(5), 3, false); +assertThrowsValue(() => it.throw(4), 4); +assertIteratorDone(it); + +// If the generator is already running, we should throw a TypeError. +function *f9() { + try { + yield 1; + yield 2; + } finally { + it.return(4); + yield 3; + } +} +it = f9(); +assertIteratorNext(it, 1); +assertThrowsInstanceOf(() => it.return(5), TypeError); +assertIteratorDone(it); +assertIteratorDone(it); + +// Second return overrides first one and closes the generator. +function *f10() { + try { + yield 1; + } finally { + yield 2; + } +} +it = f10(); +assertIteratorNext(it, 1); +assertIteratorResult(it.return(-1), 2, false); +assertIteratorResult(it.return(-2), -2, true); +assertIteratorDone(it); + +function *f11() { + try { + try { + yield 1; + } finally { + throw 2; + } + } catch(e) { + yield e; + } finally { + yield 3; + } +} +it = f11(); +assertIteratorNext(it, 1); +assertIteratorResult(it.return(9), 2, false); +assertIteratorNext(it, 3); +assertIteratorDone(it); + +throw "done"; diff --git a/js/src/jit-test/tests/generators/throw-closes.js b/js/src/jit-test/tests/generators/throw-closes.js new file mode 100644 index 0000000000..c190ccdef5 --- /dev/null +++ b/js/src/jit-test/tests/generators/throw-closes.js @@ -0,0 +1,42 @@ +// When a generator function throws, the generator is closed. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +// Star generator, next() throws. +function *g() { + yield 1; + yield 2; + throw 3; + yield 4; +} +var i = g(); +assertIteratorNext(i, 1); +assertIteratorNext(i, 2); +assertThrowsValue(() => i.next(), 3); +assertIteratorDone(i); +assertIteratorDone(i); + +// Star generator, throw() throws. +function *h() { + yield 1; + yield 2; +} +var i = h(); +assertIteratorNext(i, 1); +assertThrowsValue(() => i.throw(4), 4); +assertIteratorDone(i); + +// Star generator, return() throws. +function *h2() { + try { + yield 1; + yield 2; + } finally { + throw 6; + } +} +var i = h2(); +assertIteratorNext(i, 1); +assertThrowsValue(() => i.return(4), 6); +assertIteratorDone(i); diff --git a/js/src/jit-test/tests/generators/throw-on-finished.js b/js/src/jit-test/tests/generators/throw-on-finished.js new file mode 100644 index 0000000000..541e48f1f0 --- /dev/null +++ b/js/src/jit-test/tests/generators/throw-on-finished.js @@ -0,0 +1,7 @@ +load(libdir + "asserts.js"); + +function*g(){ }; +o = g(); +o.next(); +function TestException() {}; +assertThrowsInstanceOf(() => o.throw(new TestException()), TestException); diff --git a/js/src/jit-test/tests/generators/wrappers.js b/js/src/jit-test/tests/generators/wrappers.js new file mode 100644 index 0000000000..40328f3183 --- /dev/null +++ b/js/src/jit-test/tests/generators/wrappers.js @@ -0,0 +1,27 @@ +// Generator methods work transparently on CrossCompartmentWrappers. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var g = newGlobal(); + +function *gen3() { yield 1; yield 2; } +it = gen3(); +g.eval("function *gen4() { yield 5; yield 6; }; var it4 = gen4();"); + +// StarGenerator.next +assertIteratorResult(it.next.call(g.it4), 5, false) + +// StarGenerator.throw +assertThrowsValue(() => it.throw.call(g.it4, 8), 8); + +// StarGenerator.return +assertIteratorResult(it.return.call(g.it4, 8), 8, true); + +// Other objects should throw. +try { + it.next.call([]); + assertEq(0, 1); +} catch (e) { + assertEq(e.toString().includes("called on incompatible Array"), true); +} diff --git a/js/src/jit-test/tests/generators/yield-exception-stack-in-finally.js b/js/src/jit-test/tests/generators/yield-exception-stack-in-finally.js new file mode 100644 index 0000000000..6a1a0ef006 --- /dev/null +++ b/js/src/jit-test/tests/generators/yield-exception-stack-in-finally.js @@ -0,0 +1,33 @@ +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}) + +// Throw an exception from a different compartment. +var thrower = g.Function(` + throw 0; +`); + +function* throwAndYield() { + try { + thrower(); + } finally { + // The |finally| block is entered with the exception stack on the function + // stack. The function stack is saved in the generator object when executing + // |yield|, so the exception stack, which was created in a different + // compartment, has to be wrapped into the current compartment. + yield; + } +} +assertThrowsValue(() => [...throwAndYield()], 0); + +function* throwAndNuke() { + try { + thrower(); + } finally { + // The function stack contains the wrapped exception stack when entering + // the |finally| block. When nuking all CCWs it becomes a dead wrapper. + nukeAllCCWs(); + yield; + } +} +assertThrowsValue(() => [...throwAndNuke()], 0); diff --git a/js/src/jit-test/tests/generators/yield-in-finally.js b/js/src/jit-test/tests/generators/yield-in-finally.js new file mode 100644 index 0000000000..9d73721823 --- /dev/null +++ b/js/src/jit-test/tests/generators/yield-in-finally.js @@ -0,0 +1,164 @@ +// return value in try block should not be overridden by yield in finally block. + +load(libdir + "asserts.js"); + +// simple +function* g1() { + try { + return 42; + } finally { + yield 43; + } +} +var o = g1(); +var v = o.next(); +assertEq(v.done, false); +assertEq(v.value, 43); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, 42); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, undefined); + +// without return value +function* g2() { + try { + return; + } finally { + yield 43; + } +} +o = g2(); +v = o.next(); +assertEq(v.done, false); +assertEq(v.value, 43); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, undefined); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, undefined); + +// nested try-finally +function* g3() { + try { + try { + return 42; + } finally { + try { + return 43; + } finally { + yield 44; + } + } + } finally { + yield 45; + } +} +o = g3(); +v = o.next(); +assertEq(v.done, false); +assertEq(v.value, 44); +v = o.next(); +assertEq(v.done, false); +assertEq(v.value, 45); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, 43); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, undefined); + +// yield* +function* g4() { + try { + return 42; + } finally { + try { + return 43; + } finally { + yield* g5(); + } + } +} +function* g5() { + yield 44; + return 45; +} +o = g4(); +v = o.next(); +assertEq(v.done, false); +assertEq(v.value, 44); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, 43); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, undefined); + +// return in block scope +function* g6() { + let a = 10; + { + let a = 20; + try { + let a = 30; + { + let a = 40; + return 42; + } + } finally { + yield 43; + } + } +} +o = g6(); +v = o.next(); +assertEq(v.done, false); +assertEq(v.value, 43); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, 42); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, undefined); + +// no finally +function* g7() { + try { + return 42; + } catch (e) { + yield 1; + } +} +o = g7(); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, 42); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, undefined); + +// in "with" statement +eval(` +function* g9() { + with ({ ".genrval": { value: 44, done: false } }) { + try { + return 42; + } finally { + yield 43; + } + } +} +o = g9(); +v = o.next(); +assertEq(v.done, false); +assertEq(v.value, 43); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, 42); +v = o.next(); +assertEq(v.done, true); +assertEq(v.value, undefined); +`); diff --git a/js/src/jit-test/tests/generators/yield-regexp.js b/js/src/jit-test/tests/generators/yield-regexp.js new file mode 100644 index 0000000000..30f6a02982 --- /dev/null +++ b/js/src/jit-test/tests/generators/yield-regexp.js @@ -0,0 +1,28 @@ +// Bug 1099956 + +load(libdir + "asserts.js"); + +// Parses as IDENT(yield) DIV IDENT(abc) DIV IDENT(g). +eval(`function f1() { yield /abc/g; }`); + +// Throws a ReferenceError because no global "yield" variable is defined. +var ex; +try { + f1(); +} catch(e) { + ex = e; +} +assertEq(ex instanceof ReferenceError, true); + +// Parses as YIELD REGEXP(/abc/g). +function* f2() { + yield /abc/g; +} + +g = f2(); +v = g.next(); +assertEq(v.done, false); +assertEq(v.value instanceof RegExp, true); +assertEq(v.value.toString(), "/abc/g"); +v = g.next(); +assertEq(v.done, true); diff --git a/js/src/jit-test/tests/generators/yield-yield.js b/js/src/jit-test/tests/generators/yield-yield.js new file mode 100644 index 0000000000..4c468ba5af --- /dev/null +++ b/js/src/jit-test/tests/generators/yield-yield.js @@ -0,0 +1,12 @@ +// Bug 880447 + +load(libdir + "asserts.js"); + +function* f() { + yield yield 1; +} + +var g = f(); +assertEq(g.next().value, 1); +assertEq(g.return("hello").value, "hello"); +assertEq(g.next().value, undefined); diff --git a/js/src/jit-test/tests/heap-analysis/bug-1249107.js b/js/src/jit-test/tests/heap-analysis/bug-1249107.js new file mode 100644 index 0000000000..0ee1871a5c --- /dev/null +++ b/js/src/jit-test/tests/heap-analysis/bug-1249107.js @@ -0,0 +1 @@ +shortestPaths([this], {start: this, maxNumPaths: 5}) diff --git a/js/src/jit-test/tests/heap-analysis/bug-1252912.js b/js/src/jit-test/tests/heap-analysis/bug-1252912.js new file mode 100644 index 0000000000..409ef59006 --- /dev/null +++ b/js/src/jit-test/tests/heap-analysis/bug-1252912.js @@ -0,0 +1,6 @@ +try { + x = evalcx('') + toSource = (function() { + }) +} catch (foo) {} +shortestPaths(["$4"], {start: this, maxNumPaths: 5}) diff --git a/js/src/jit-test/tests/heap-analysis/bug-1254105.js b/js/src/jit-test/tests/heap-analysis/bug-1254105.js new file mode 100644 index 0000000000..20addba86c --- /dev/null +++ b/js/src/jit-test/tests/heap-analysis/bug-1254105.js @@ -0,0 +1,3 @@ +// |jit-test| error:Error: Each target must be a GC thing + +shortestPaths([, , , undefined], {start: this, maxNumPaths: 5}) diff --git a/js/src/jit-test/tests/heap-analysis/byteSize-of-bigint.js b/js/src/jit-test/tests/heap-analysis/byteSize-of-bigint.js new file mode 100644 index 0000000000..e16a3219da --- /dev/null +++ b/js/src/jit-test/tests/heap-analysis/byteSize-of-bigint.js @@ -0,0 +1,120 @@ +// |jit-test| skip-if: !getBuildConfiguration("moz-memory") +// Run this test only if we're using jemalloc. Other malloc implementations +// exhibit surprising behaviors. For example, 32-bit Fedora builds have +// non-deterministic allocation sizes. + +// Check JS::ubi::Node::size results for BigInts. + +// We actually hard-code specific sizes into this test, even though they're +// implementation details, because in practice there are only two architecture +// variants to consider (32-bit and 64-bit), and if these sizes change, that's +// something SpiderMonkey hackers really want to know; they're supposed to be +// stable. + +const pointerByteSize = getBuildConfiguration("pointer-byte-size"); +assertEq(pointerByteSize === 4 || pointerByteSize === 8, true); + +const m32 = pointerByteSize === 4; + +// 32-bit: sizeof(CellWithLengthAndFlags) + 2 * sizeof(BigInt::Digit) = 8 + 2 * 4 = 16 +// 64-bit: sizeof(CellWithLengthAndFlags) + sizeof(BigInt::Digit) = 8 + 8 = 16 +const SIZE_OF_BIGINT = 16; + +// sizeof(BigInt::Digit) +const SIZE_OF_DIGIT = pointerByteSize; + +// sizeof(JS::Value) +const SIZE_OF_VALUE = 8; + +// See Nursery::bigIntHeaderSize(). +const SIZE_OF_BIGINT_HEADER = 8; + +const SIZE_OF_TENURED_BIGINT = SIZE_OF_BIGINT; +const SIZE_OF_NURSERY_BIGINT = SIZE_OF_BIGINT + SIZE_OF_BIGINT_HEADER; + +function nurseryDigitSize(length) { + // See for why we currently + // overallocate on 32-bit. + if (m32) { + length += (length & 1); + } + return length * SIZE_OF_DIGIT; +} + +function mallocDigitSize(length) { + // See for why we currently + // overallocate on 32-bit. + if (m32) { + length += (length & 1); + } + + // Malloc buffer sizes are always a power of two. + return 1 << Math.ceil(Math.log2(length * SIZE_OF_DIGIT)); +} + +// Constant BigInts (tenured, inline digits). +assertEq(byteSize(10n), SIZE_OF_TENURED_BIGINT); +assertEq(byteSize(0xffff_ffff_ffff_ffffn), SIZE_OF_TENURED_BIGINT); + +// Constant BigInt (tenured, heap digits). +assertEq(byteSize(0x1_0000_0000_0000_0000n), + SIZE_OF_TENURED_BIGINT + mallocDigitSize(m32 ? 3 : 2)); +assertEq(byteSize(0x1_0000_0000_0000_0000_0000_0000n), + SIZE_OF_TENURED_BIGINT + mallocDigitSize(m32 ? 4 : 2)); +assertEq(byteSize(0x1_0000_0000_0000_0000_0000_0000_0000_0000n), + SIZE_OF_TENURED_BIGINT + mallocDigitSize(m32 ? 5 : 3)); + + +/////////////////////////////////////////////////////////////////////////////// +// Nursery BigInt tests below this point. // +/////////////////////////////////////////////////////////////////////////////// + +// Hack to skip this test if BigInts are not allocated in the nursery. +{ + const sample_nursery = BigInt(123456789); + + const before = byteSize(sample_nursery); + gc(); + const after = byteSize(sample_nursery); + + let nursery_disabled = before == after; + if (nursery_disabled) { + printErr("nursery BigInts appear to be disabled"); + quit(0); + } +} + +// Convert an input BigInt, which is probably tenured because it's a literal in +// the source text, to a nursery-allocated BigInt with the same contents. +function copyBigInt(bi) { + var plusOne = bi + 1n; + return plusOne - 1n; +} + +// Return the nursery byte size of |bi|. +function nByteSize(bi) { + // BigInts that appear in the source will always be tenured. + return byteSize(copyBigInt(bi)); +} + +// BigInts (nursery, inline digits). +assertEq(nByteSize(10n), SIZE_OF_NURSERY_BIGINT); +assertEq(nByteSize(0xffff_ffff_ffff_ffffn), SIZE_OF_NURSERY_BIGINT); + +// BigInt (nursery, nursery heap digits). +// +// This assumes small nursery buffer allocations always succeed. +assertEq(nByteSize(0x1_0000_0000_0000_0000n), + SIZE_OF_NURSERY_BIGINT + nurseryDigitSize(m32 ? 3 : 2)); +assertEq(nByteSize(0x1_0000_0000_0000_0000_0000_0000n), + SIZE_OF_NURSERY_BIGINT + nurseryDigitSize(m32 ? 4 : 2)); +assertEq(nByteSize(0x1_0000_0000_0000_0000_0000_0000_0000_0000n), + SIZE_OF_NURSERY_BIGINT + nurseryDigitSize(m32 ? 5 : 3)); + +// BigInt (nursery, malloc heap digits). +// +// |Nursery::MaxNurseryBufferSize| is 1024, so when +// |BigInt::digitLength * sizeof(BigInt::Digit)| exceeds 1024, the digits buffer +// should be malloc'ed. Pick a larger number to be future-proof. +assertEq(nByteSize(2n ** (64n * 1000n)), + SIZE_OF_NURSERY_BIGINT + mallocDigitSize(m32 ? 2002 : 1001)); diff --git a/js/src/jit-test/tests/heap-analysis/byteSize-of-object.js b/js/src/jit-test/tests/heap-analysis/byteSize-of-object.js new file mode 100644 index 0000000000..c120d68f86 --- /dev/null +++ b/js/src/jit-test/tests/heap-analysis/byteSize-of-object.js @@ -0,0 +1,77 @@ +// |jit-test| skip-if: !getBuildConfiguration("moz-memory") +// Run this test only if we're using jemalloc. Other malloc implementations +// exhibit surprising behaviors. For example, 32-bit Fedora builds have +// non-deterministic allocation sizes. + +// Check that JS::ubi::Node::size returns reasonable results for objects. + +// We actually hard-code specific sizes into this test, even though they're +// implementation details, because in practice there are only two architecture +// variants to consider (32-bit and 64-bit), and if these sizes change, that's +// something SpiderMonkey hackers really want to know; they're supposed to be +// stable. + +if (getBuildConfiguration("pointer-byte-size") == 4) + var s = (s32, s64) => s32 +else + var s = (s32, s64) => s64 + +// Return the byte size of |obj|, ensuring that the size is not affected by +// being tenured. (We use 'survives a GC' as an approximation for 'tenuring'.) +function tByteSize(obj) { + var size = byteSize(obj); + minorgc(); + if (size != byteSize(obj)) + return 0; + return size; +} + +assertEq(tByteSize({}), s(48, 56)); + +// Try objects with only named properties. +assertEq(tByteSize({ w: 1 }), s(32, 40)); +assertEq(tByteSize({ w: 1, x: 2 }), s(32, 40)); +assertEq(tByteSize({ w: 1, x: 2, y: 3 }), s(48, 56)); +assertEq(tByteSize({ w: 1, x: 2, y: 3, z:4 }), s(48, 56)); +assertEq(tByteSize({ w: 1, x: 2, y: 3, z:4, a: 5 }), s(80, 88)); + +// Try objects with only indexed properties. +assertEq(tByteSize({ 0:0 }), s(80, 88)); +assertEq(tByteSize({ 0:0, 1:1 }), s(80, 88)); +assertEq(tByteSize({ 0:0, 1:1, 2:2 }), s(96, 104)); +assertEq(tByteSize({ 0:0, 1:1, 2:2, 3:3 }), s(96, 104)); +assertEq(tByteSize({ 0:0, 1:1, 2:2, 3:3, 4:4 }), s(144, 152)); + +// Mix indexed and named properties, exploring each combination of the size +// classes above. +// +// Oddly, the changes here as the objects grow are not simply the sums of the +// changes above: for example, with one named property, the objects with three +// and five indexed properties are in different size classes; but with three +// named properties, there's no break there. +assertEq(tByteSize({ w:1, 0:0 }), s(80, 88)); +assertEq(tByteSize({ w:1, 0:0, 1:1, 2:2 }), s(96, 104)); +assertEq(tByteSize({ w:1, 0:0, 1:1, 2:2, 3:3, 4:4 }), s(144, 152)); +assertEq(tByteSize({ w:1, x:2, y:3, 0:0 }), s(96, 104)); +assertEq(tByteSize({ w:1, x:2, y:3, 0:0, 1:1, 2:2 }), s(128, 136)); +assertEq(tByteSize({ w:1, x:2, y:3, 0:0, 1:1, 2:2, 3:3, 4:4 }), s(144, 152)); +assertEq(tByteSize({ w:1, x:2, y:3, z:4, a:6, 0:0 }), s(128, 136)); +assertEq(tByteSize({ w:1, x:2, y:3, z:4, a:6, 0:0, 1:1, 2:2 }), s(128, 136)); +assertEq(tByteSize({ w:1, x:2, y:3, z:4, a:6, 0:0, 1:1, 2:2, 3:3, 4:4 }), s(176, 184)); + +// Check various lengths of array. +assertEq(tByteSize([]), s(80, 88)); +assertEq(tByteSize([1]), s(48, 56)); +assertEq(tByteSize([1, 2]), s(48, 56)); +assertEq(tByteSize([1, 2, 3]), s(80, 88)); +assertEq(tByteSize([1, 2, 3, 4]), s(80, 88)); +assertEq(tByteSize([1, 2, 3, 4, 5]), s(80, 88)); +assertEq(tByteSize([1, 2, 3, 4, 5, 6]), s(80, 88)); +assertEq(tByteSize([1, 2, 3, 4, 5, 6, 7]), s(112, 120)); +assertEq(tByteSize([1, 2, 3, 4, 5, 6, 7, 8]), s(112, 120)); + +// Various forms of functions. +assertEq(tByteSize(function () {}), s(48, 56)); +assertEq(tByteSize(function () {}.bind()), s(80, 88)); +assertEq(tByteSize(() => 1), s(48, 56)); +assertEq(tByteSize(Math.sin), s(48, 56)); diff --git a/js/src/jit-test/tests/heap-analysis/byteSize-of-scripts.js b/js/src/jit-test/tests/heap-analysis/byteSize-of-scripts.js new file mode 100644 index 0000000000..c35e07ef2d --- /dev/null +++ b/js/src/jit-test/tests/heap-analysis/byteSize-of-scripts.js @@ -0,0 +1,50 @@ +// Check JS::ubi::Node::size results for scripts. We don't attempt to check +// exact sizes in this test (deemed to difficult and non-deterministic), just +// some sanity checks. + +function f1() { + return 42; +} + +print("byteSizeOfScript(f1) = " + byteSizeOfScript(f1)); +assertEq(byteSizeOfScript(f1) > 1, true); + +function f2(n) { + var obj = { + x: 1, + y: 2, + z: 3, + }; + + if (i % 2 == 0) { + for (var i = 0; i < n; i++) { + (function() { + this.x += i; + print(String(i)); + obj[i] = i * i; + if (i > 10) { + f2(i / f1()); + } + })(); + } + } + + if (i % 3 == 0) { + for (var i = 0; i < n; i++) { + (function() { + this.x *= i; + print(String(i)); + obj[i] = i * i; + if (i > 10) { + f2(i / f1()); + } + })(); + } + } + + return this.x; +} + +print("byteSizeOfScript(f2) = " + byteSizeOfScript(f2)); +assertEq(byteSizeOfScript(f2) > 1, true); +assertEq(byteSizeOfScript(f2) > byteSizeOfScript(f1), true); diff --git a/js/src/jit-test/tests/heap-analysis/byteSize-of-string.js b/js/src/jit-test/tests/heap-analysis/byteSize-of-string.js new file mode 100644 index 0000000000..aaac0c4f1f --- /dev/null +++ b/js/src/jit-test/tests/heap-analysis/byteSize-of-string.js @@ -0,0 +1,259 @@ +// |jit-test| skip-if: !getBuildConfiguration("moz-memory") +// Run this test only if we're using jemalloc. Other malloc implementations +// exhibit surprising behaviors. For example, 32-bit Fedora builds have +// non-deterministic allocation sizes. + +// Check JS::ubi::Node::size results for strings. + +// We actually hard-code specific sizes into this test, even though they're +// implementation details, because in practice there are only two architecture +// variants to consider (32-bit and 64-bit), and if these sizes change, that's +// something SpiderMonkey hackers really want to know; they're supposed to be +// stable. + +gczeal(0); // Need to control when tenuring happens + +// Hack to skip this test if strings are not allocated in the nursery. +{ + const sample_nursery = "x" + "abc".substr(1); + let nursery_enabled = true; + const before = byteSize(sample_nursery); + gc(); + const after = byteSize(sample_nursery); + if (before == after) + nursery_enabled = false; + if (!nursery_enabled) { + printErr("nursery strings appear to be disabled"); + quit(0); + } +} + +// Ion eager runs much of this code in Ion, and Ion nursery-allocates more +// aggressively than other modes. +if (getJitCompilerOptions()["ion.warmup.trigger"] <= 100) + setJitCompilerOption("ion.warmup.trigger", 100); + +if (getBuildConfiguration("pointer-byte-size") == 4) + var s = (s32, s64) => s32 +else + var s = (s32, s64) => s64 + +// Convert an input string, which is probably an atom because it's a literal in +// the source text, to a nursery-allocated string with the same contents. Note +// that by going through the flatting process here, this also ensures that the +// char data is always malloced and expanded by doubling, which would not be +// the case for nursery-allocated chars (as would be produced by newString()). +function copyString(str) { + if (str.length == 0) + return str; // Nothing we can do here + return ensureLinearString(str.substr(0, 1) + str.substr(1)); +} + +// Return the nursery byte size of |str|. +function nByteSize(str) { + // Strings that appear in the source will always be atomized and therefore + // will never be in the nursery. + return byteSize(copyString(str)); +} + +// Return the tenured byte size of |str|. +function tByteSize(str) { + // Strings that appear in the source will always be atomized and therefore + // will never be in the nursery. But we'll make them get tenured instead of + // using the atom. + str = copyString(str); + minorgc(); + return byteSize(str); +} + +// There are four representations of linear strings, with the following +// capacities: +// +// 32-bit 64-bit test +// representation Latin-1 char16_t Latin-1 char16_t label +// ======================================================================== +// JSExternalString - limited by MaxStringLength - E +// JSThinInlineString 8 4 16 8 T +// JSFatInlineString 24 12 24 12 F +// JSExtensibleString - limited by MaxStringLength - X + +// Notes: +// - labels are suffixed with A for atoms and N for non-atoms +// - atoms are 8 bytes larger than non-atoms, to store the atom's hash code. +// - Nursery-allocated strings require a header that stores the zone. + +// Expected sizes based on type of string +const m32 = (getBuildConfiguration("pointer-byte-size") == 4); +const TA = m32 ? 24 : 32; // ThinInlineString atom, includes a hash value +const TN = m32 ? 16 : 24; // ThinInlineString +const FN = m32 ? 32 : 32; // FatInlineString +const XN = m32 ? 16 : 24; // ExtensibleString, has additional storage buffer +const RN = m32 ? 16 : 24; // Rope +const DN = m32 ? 16 : 24; // DependentString +const EN = m32 ? 16 : 24; // ExternalString + +// A function that pads out a tenured size to the nursery size. We store a zone +// pointer in the nursery just before the string (4 bytes on 32-bit, 8 bytes on +// 64-bit), and the string struct itself must be 8-byte aligned (resulting in +// +4 bytes on 32-bit, +0 bytes on 64-bit). The end result? Nursery strings are +// 8 bytes larger. +const Nursery = m32 ? s => s + 4 + 4 : s => s + 8 + 0; + +// Latin-1 +assertEq(tByteSize(""), s(TA, TA)); +assertEq(tByteSize("1"), s(TA, TA)); +assertEq(tByteSize("1234567"), s(TN, TN)); +assertEq(tByteSize("12345678"), s(TN, TN)); +assertEq(tByteSize("123456789"), s(FN, TN)); +assertEq(tByteSize("123456789.12345"), s(FN, TN)); +assertEq(tByteSize("123456789.123456"), s(FN, TN)); +assertEq(tByteSize("123456789.1234567"), s(FN, FN)); +assertEq(tByteSize("123456789.123456789.123"), s(FN, FN)); +assertEq(tByteSize("123456789.123456789.1234"), s(FN, FN)); +assertEq(tByteSize("123456789.123456789.12345"), s(XN+32, XN+32)); +assertEq(tByteSize("123456789.123456789.123456789.1"), s(XN+32, XN+32)); +assertEq(tByteSize("123456789.123456789.123456789.12"), s(XN+32, XN+32)); +assertEq(tByteSize("123456789.123456789.123456789.123"), s(XN+64, XN+64)); + +assertEq(nByteSize(""), s(TA, TA)); +assertEq(nByteSize("1"), s(TA, TA)); +assertEq(nByteSize("1234567"), s(Nursery(TN), Nursery(TN))); +assertEq(nByteSize("12345678"), s(Nursery(TN), Nursery(TN))); +assertEq(nByteSize("123456789"), s(Nursery(FN), Nursery(TN))); +assertEq(nByteSize("123456789.12345"), s(Nursery(FN), Nursery(TN))); +assertEq(nByteSize("123456789.123456"), s(Nursery(FN), Nursery(TN))); +assertEq(nByteSize("123456789.1234567"), s(Nursery(FN), Nursery(FN))); +assertEq(nByteSize("123456789.123456789.123"), s(Nursery(FN), Nursery(FN))); +assertEq(nByteSize("123456789.123456789.1234"), s(Nursery(FN), Nursery(FN))); +assertEq(nByteSize("123456789.123456789.12345"), s(Nursery(XN)+32,Nursery(XN)+32)); +assertEq(nByteSize("123456789.123456789.123456789.1"), s(Nursery(XN)+32,Nursery(XN)+32)); +assertEq(nByteSize("123456789.123456789.123456789.12"), s(Nursery(XN)+32,Nursery(XN)+32)); +assertEq(nByteSize("123456789.123456789.123456789.123"), s(Nursery(XN)+64,Nursery(XN)+64)); + +// Inline char16_t atoms. +// "Impassionate gods have never seen the red that is the Tatsuta River." +// - Ariwara no Narihira +assertEq(tByteSize("千"), s(TA, TA)); +assertEq(tByteSize("千早"), s(TN, TN)); +assertEq(tByteSize("千早ぶ"), s(TN, TN)); +assertEq(tByteSize("千早ぶる"), s(TN, TN)); +assertEq(tByteSize("千早ぶる神"), s(FN, TN)); +assertEq(tByteSize("千早ぶる神代"), s(FN, TN)); +assertEq(tByteSize("千早ぶる神代も"), s(FN, TN)); +assertEq(tByteSize("千早ぶる神代もき"), s(FN, TN)); +assertEq(tByteSize("千早ぶる神代もきか"), s(FN, FN)); +assertEq(tByteSize("千早ぶる神代もきかず龍"), s(FN, FN)); +assertEq(tByteSize("千早ぶる神代もきかず龍田"), s(FN, FN)); +assertEq(tByteSize("千早ぶる神代もきかず龍田川"), s(XN+32, XN+32)); +assertEq(tByteSize("千早ぶる神代もきかず龍田川 か"), s(XN+32, XN+32)); +assertEq(tByteSize("千早ぶる神代もきかず龍田川 から"), s(XN+32, XN+32)); +assertEq(tByteSize("千早ぶる神代もきかず龍田川 からく"), s(XN+64, XN+64)); +assertEq(tByteSize("千早ぶる神代もきかず龍田川 からくれなゐに水く"), s(XN+64, XN+64)); +assertEq(tByteSize("千早ぶる神代もきかず龍田川 からくれなゐに水くく"), s(XN+64, XN+64)); +assertEq(tByteSize("千早ぶる神代もきかず龍田川 からくれなゐに水くくるとは"), s(XN+64, XN+64)); + +assertEq(nByteSize("千"), s(TA, TA)); +assertEq(nByteSize("千早"), s(Nursery(TN), Nursery(TN))); +assertEq(nByteSize("千早ぶ"), s(Nursery(TN), Nursery(TN))); +assertEq(nByteSize("千早ぶる"), s(Nursery(TN), Nursery(TN))); +assertEq(nByteSize("千早ぶる神"), s(Nursery(FN), Nursery(TN))); +assertEq(nByteSize("千早ぶる神代"), s(Nursery(FN), Nursery(TN))); +assertEq(nByteSize("千早ぶる神代も"), s(Nursery(FN), Nursery(TN))); +assertEq(nByteSize("千早ぶる神代もき"), s(Nursery(FN), Nursery(TN))); +assertEq(nByteSize("千早ぶる神代もきか"), s(Nursery(FN), Nursery(FN))); +assertEq(nByteSize("千早ぶる神代もきかず龍"), s(Nursery(FN), Nursery(FN))); +assertEq(nByteSize("千早ぶる神代もきかず龍田"), s(Nursery(FN), Nursery(FN))); +assertEq(nByteSize("千早ぶる神代もきかず龍田川"), s(Nursery(XN)+32, Nursery(XN)+32)); +assertEq(nByteSize("千早ぶる神代もきかず龍田川 か"), s(Nursery(XN)+32, Nursery(XN)+32)); +assertEq(nByteSize("千早ぶる神代もきかず龍田川 から"), s(Nursery(XN)+32, Nursery(XN)+32)); +assertEq(nByteSize("千早ぶる神代もきかず龍田川 からく"), s(Nursery(XN)+64, Nursery(XN)+64)); +assertEq(nByteSize("千早ぶる神代もきかず龍田川 からくれなゐに水く"), s(Nursery(XN)+64, Nursery(XN)+64)); +assertEq(nByteSize("千早ぶる神代もきかず龍田川 からくれなゐに水くく"), s(Nursery(XN)+64, Nursery(XN)+64)); +assertEq(nByteSize("千早ぶる神代もきかず龍田川 からくれなゐに水くくるとは"), s(Nursery(XN)+64, Nursery(XN)+64)); + +// A Latin-1 rope. This changes size when flattened. +// "In a village of La Mancha, the name of which I have no desire to call to mind" +// - Miguel de Cervantes, Don Quixote +var fragment8 = "En un lugar de la Mancha, de cuyo nombre no quiero acordarme"; // 60 characters +var rope8 = fragment8; +for (var i = 0; i < 10; i++) // 1024 repetitions + rope8 = rope8 + rope8; + +assertEq(byteSize(rope8), s(Nursery(RN), Nursery(RN))); +minorgc(); +assertEq(byteSize(rope8), s(RN, RN)); +var matches8 = rope8.match(/(de cuyo nombre no quiero acordarme)/); +assertEq(byteSize(rope8), s(XN + 65536, XN + 65536)); + +// Test extensible strings. +// +// Appending another copy of the fragment should yield another rope. +// +// Flatting that should turn the original rope into a dependent string, and +// yield a new linear string, of the same size as the original. +rope8a = rope8 + fragment8; +assertEq(byteSize(rope8a), s(Nursery(RN), Nursery(RN))); +rope8a.match(/x/, function() { assertEq(true, false); }); +assertEq(byteSize(rope8a), s(Nursery(XN) + 65536, Nursery(XN) + 65536)); +assertEq(byteSize(rope8), s(RN, RN)); + + +// A char16_t rope. This changes size when flattened. +// "From the Heliconian Muses let us begin to sing" +// --- Hesiod, Theogony +var fragment16 = "μουσάων Ἑλικωνιάδων ἀρχώμεθ᾽ ἀείδειν"; +var rope16 = fragment16; +for (var i = 0; i < 10; i++) // 1024 repetitions + rope16 = rope16 + rope16; +assertEq(byteSize(rope16), s(Nursery(RN), Nursery(RN))); +let matches16 = rope16.match(/(Ἑλικωνιάδων ἀρχώμεθ᾽)/); +assertEq(byteSize(rope16), s(Nursery(RN) + 131072, Nursery(RN) + 131072)); + +// Latin-1 and char16_t dependent strings. +assertEq(byteSize(rope8.substr(1000, 2000)), s(Nursery(DN), Nursery(DN))); +assertEq(byteSize(rope16.substr(1000, 2000)), s(Nursery(DN), Nursery(DN))); +assertEq(byteSize(matches8[0]), s(Nursery(DN), Nursery(DN))); +assertEq(byteSize(matches8[1]), s(Nursery(DN), Nursery(DN))); +assertEq(byteSize(matches16[0]), s(Nursery(DN), Nursery(DN))); +assertEq(byteSize(matches16[1]), s(Nursery(DN), Nursery(DN))); + +// Test extensible strings. +// +// Appending another copy of the fragment should yield another rope. +// +// Flatting that should turn the original rope into a dependent string, and +// yield a new linear string, of the some size as the original. +rope16a = rope16 + fragment16; +assertEq(byteSize(rope16a), s(Nursery(RN), Nursery(RN))); +rope16a.match(/x/, function() { assertEq(true, false); }); +assertEq(byteSize(rope16a), s(Nursery(XN) + 131072, Nursery(XN) + 131072)); +assertEq(byteSize(rope16), s(Nursery(XN), Nursery(XN))); + +// Test external strings. +// +// We only support char16_t external strings and external strings are never +// allocated in the nursery. If this ever changes, please add tests for the new +// cases. Also note that on Windows mozmalloc's smallest allocation size is +// two words compared to one word on other platforms. +if (getBuildConfiguration("windows")) { + assertEq(byteSize(newString("", {external: true})), s(EN+8, EN+16)); + assertEq(byteSize(newString("1", {external: true})), s(EN+8, EN+16)); + assertEq(byteSize(newString("12", {external: true})), s(EN+8, EN+16)); + assertEq(byteSize(newString("123", {external: true})), s(EN+8, EN+16)); + assertEq(byteSize(newString("1234", {external: true})), s(EN+8, EN+16)); +} else { + assertEq(byteSize(newString("", {external: true})), s(EN+4, EN+8)); + assertEq(byteSize(newString("1", {external: true})), s(EN+4, EN+8)); + assertEq(byteSize(newString("12", {external: true})), s(EN+4, EN+8)); + assertEq(byteSize(newString("123", {external: true})), s(EN+8, EN+8)); + assertEq(byteSize(newString("1234", {external: true})), s(EN+8, EN+8)); +} +assertEq(byteSize(newString("12345", {external: true})), s(EN+16, EN+16)); +assertEq(byteSize(newString("123456789.123456789.1234", {external: true})), s(EN+48, EN+48)); +assertEq(byteSize(newString("123456789.123456789.12345", {external: true})), s(EN+64, EN+64)); + +// Nursery-allocated chars. +// +// byteSize will not include the space used by the nursery for the chars. +assertEq(byteSize(newString("123456789.123456789.12345")), s(Nursery(XN)+0,Nursery(XN)+0)); +assertEq(byteSize(newString("123456789.123456789.123456789.123")), s(Nursery(XN)+0,Nursery(XN)+0)); diff --git a/js/src/jit-test/tests/heap-analysis/byteSize-of-symbol.js b/js/src/jit-test/tests/heap-analysis/byteSize-of-symbol.js new file mode 100644 index 0000000000..3262b20993 --- /dev/null +++ b/js/src/jit-test/tests/heap-analysis/byteSize-of-symbol.js @@ -0,0 +1,23 @@ +// |jit-test| skip-if: !getBuildConfiguration("moz-memory") +// Run this test only if we're using jemalloc. Other malloc implementations +// exhibit surprising behaviors. For example, 32-bit Fedora builds have +// non-deterministic allocation sizes. + +// Check JS::ubi::Node::size results for symbols. + +// We actually hard-code specific sizes into this test, even though they're +// implementation details, because in practice there are only two architecture +// variants to consider (32-bit and 64-bit), and if these sizes change, that's +// something SpiderMonkey hackers really want to know; they're supposed to be +// stable. + +const SIZE_OF_SYMBOL = getBuildConfiguration("pointer-byte-size") == 4 ? 16 : 16; + +// Without a description. +assertEq(byteSize(Symbol()), SIZE_OF_SYMBOL); + +// With a description. +assertEq(byteSize(Symbol("This is a relatively long description to be passed to " + + "Symbol() but it doesn't matter because it just gets " + + "interned as a JSAtom* anyways.")), + SIZE_OF_SYMBOL); diff --git a/js/src/jit-test/tests/heap-analysis/findPath.js b/js/src/jit-test/tests/heap-analysis/findPath.js new file mode 100644 index 0000000000..c70728ee92 --- /dev/null +++ b/js/src/jit-test/tests/heap-analysis/findPath.js @@ -0,0 +1,50 @@ +load(libdir + "match.js") + +// At the moment, findPath just returns the names as provided by ubi::Node, +// which just uses js::TraceChildren for now. However, we have various plans +// to improve the quality of ubi::Node's metadata, to improve the precision +// and clarity of the results here. + +var o = { w: { x: { y: { z: {} } } } }; +Match.Pattern([{node: {}, edge: "w"}, + {node: {}, edge: "x"}, + {node: {}, edge: "y"}, + {node: {}, edge: "z"}]) + .assert(findPath(o, o.w.x.y.z)); +print(JSON.stringify(findPath(o, o.w.x.y.z))); + +var a = [ , o ]; +Match.Pattern([{node: {}, edge: "objectElements[1]"}]) + .assert(findPath(a, o)); +print(JSON.stringify(findPath(a, o))); + +function C() {} +C.prototype.obj = {}; +var c = new C; +Match.Pattern([{node: {}, edge: "shape"}, + {node: Match.Pattern.ANY, edge: "base"}, + {node: Match.Pattern.ANY, edge: "baseshape_proto"}, + {node: { constructor: Match.Pattern.ANY }, edge: "obj"}]) + .assert(findPath(c, c.obj)); +print(JSON.stringify(findPath(c, c.obj))); + +function f(x) { return function g(y) { return x+y; }; } +var o = {} +var gc = f(o); +Match.Pattern([{node: gc, edge: "**UNKNOWN SLOT 1**"}, + {node: Match.Pattern.ANY, edge: "x"}]) + .assert(findPath(gc, o)); +print(JSON.stringify(findPath(gc, o))); + +Match.Pattern([{node: {}, edge: "shape"}, + {node: Match.Pattern.ANY, edge: "base"}, + {node: Match.Pattern.ANY, edge: "baseshape_global"}, + {node: {}, edge: "o"}]) + .assert(findPath(o, o)); +print(findPath(o, o).map((e) => e.edge).toString()); + +// Check that we can generate ubi::Nodes for Symbols. +var so = { sym: Symbol() }; +Match.Pattern([{node: {}, edge: "sym" }]) + .assert(findPath(so, so.sym)); +print(findPath(so, so.sym).map((e) => e.edge).toString()); diff --git a/js/src/jit-test/tests/heap-analysis/pointerByteSize.js b/js/src/jit-test/tests/heap-analysis/pointerByteSize.js new file mode 100644 index 0000000000..261ab96508 --- /dev/null +++ b/js/src/jit-test/tests/heap-analysis/pointerByteSize.js @@ -0,0 +1,3 @@ +// Try out the pointerByteSize shell function. +var size = getBuildConfiguration("pointer-byte-size"); +assertEq(size == 4 || size == 8, true); diff --git a/js/src/jit-test/tests/heap-analysis/shortestPaths.js b/js/src/jit-test/tests/heap-analysis/shortestPaths.js new file mode 100644 index 0000000000..cdb82ba662 --- /dev/null +++ b/js/src/jit-test/tests/heap-analysis/shortestPaths.js @@ -0,0 +1,95 @@ +// The shortestPaths function exists solely to let the fuzzers go to town and +// exercise the code paths it calls into, hence the only things to assert +// relate to the shortestPaths test function API. +// +// The actual behavior of JS::ubi::ShortestPaths is tested in +// js/src/jsapi-tests/testUbiNode.cpp, where we can actually control the +// structure of the heap graph to test specific shapes. + +function f(x) { + return x + x; +} + +var g = f.bind(null, 5); + +var o = { + p: g +}; + +function describe(v) { + return v === undefined ? "(undefined)" + : v === null ? "(null)" + : typeof(v) === "object" ? Object.prototype.toString.call(v) + : typeof(v); +} + +function dumpPaths(results) { + results = results.map(paths => + paths.map(path => + path.map(({predecessor, edge}) => + predecessor !== undefined ? + { predecessor: describe(predecessor), edge } + : + { edge } + ) + ) + ); + print(JSON.stringify(results, null, 2)); +} + +print("shortestPaths([Object, f, o.p], {start: this, maxNumPaths: 5})"); +var paths = shortestPaths([Object, f, o.p], {start: this, maxNumPaths: 5}); +dumpPaths(paths); + +print(); +print("shortestPaths([f], {start: o, maxNumPaths: 1})") +paths = shortestPaths([f], {start: o, maxNumPaths: 1}); +dumpPaths(paths); + +print(); +print("shortestPaths([f], {start: this, maxNumPaths: 5})") +paths = shortestPaths([f], {start: this, maxNumPaths: 5}); +dumpPaths(paths); + +print(); +print("shortestPaths([f], {maxNumPaths: 5})") +paths = shortestPaths([f], {maxNumPaths: 5}); +dumpPaths(paths); +assertEq(paths[0].length <= 5, true, "Too many paths reported"); + +paths = shortestPaths([f, g]); +assertEq(paths.length, 2, "Two sets of paths expected"); + +paths = shortestPaths([f], {maxNumPaths: 1}); +assertEq(paths[0].length, 1, "Single path expected"); + +print(); +print("shortestPaths([1234n])") +paths = shortestPaths([1234n]); +dumpPaths(paths); + +// Error messages are more generic under PBL. +if (!getBuildConfiguration('pbl')) { + var exc; + + try { paths = shortestPaths(); } catch (exc) { e = ""+exc; }; + assertEq(e.includes("TypeError") && e.includes("1 argument required"), true); + + try { paths = shortestPaths(100, {}); } catch (exc) { e = ""+exc; }; + assertEq(e, "TypeError: 100 is not an array object"); + + try { paths = shortestPaths([f], {start: 200}); } catch (exc) { e = ""+exc; }; + assertEq(e, "TypeError: 200 is not a GC thing"); + + try { paths = shortestPaths([f, {}, {}, {}], { maxNumPaths: 0x40000000 }); } catch (exc) { e = "" + exc; }; + assertEq(e, "out of memory"); + + try { paths = shortestPaths([f], { maxNumPaths: -1 }); } catch (exc) { e = "" + exc; }; + assertEq(e, "TypeError: -1 is not greater than 0"); + + // Bug 1799824. + let arr = [{}]; + let objWithGetter = {get start() { arr.length = 0; return {}; }}; + try { paths = shortestPaths(arr, objWithGetter); } catch (exc) { e = ""+exc; } + assertEq(e, "TypeError: arr is not a dense array object with one or more elements"); +} diff --git a/js/src/jit-test/tests/ion/ArrayLengthGetPropertyIC.js b/js/src/jit-test/tests/ion/ArrayLengthGetPropertyIC.js new file mode 100644 index 0000000000..22197c7bef --- /dev/null +++ b/js/src/jit-test/tests/ion/ArrayLengthGetPropertyIC.js @@ -0,0 +1,54 @@ +function intLength (a, l) { + var res = 0; + for (var i = 0; i < l; i++) + res += a.length; + return res / l; +} + +function valueLength (a, l) { + var res = 0; + for (var i = 0; i < l; i++) + res += a.length; + return res / l; +} + +var denseArray = [0,1,2,3,4,5,6,7,8,9]; +var typedArray = new Uint8Array(10); +var hugeArray = new Array(4294967295); +var fakeArray1 = { length: 10 }; +var fakeArray2 = { length: 10.5 }; + +// Check the interpreter result and play with TI type objects. +assertEq(intLength(denseArray, 10), 10); +assertEq(intLength(typedArray, 10), 10); +// assertEq(intLength(fakeArray1, 10), 10); + +assertEq(valueLength(denseArray, 10), 10); +assertEq(valueLength(typedArray, 10), 10); +assertEq(valueLength(hugeArray , 10), 4294967295); +assertEq(valueLength(fakeArray2, 10), 10.5); + +// Heat up to compile (either JM / Ion) +assertEq(intLength(denseArray, 100), 10); +assertEq(valueLength(denseArray, 100), 10); + +// No bailout should occur during any of the following checks: + +// Check get-property length IC with dense array. +assertEq(intLength(denseArray, 1), 10); +assertEq(valueLength(denseArray, 1), 10); + +// Check get-property length IC with typed array. +assertEq(intLength(typedArray, 1), 10); +assertEq(valueLength(typedArray, 1), 10); + +// Check length which do not fit on non-double value. +assertEq(valueLength(hugeArray, 1), 4294967295); + +// Check object length property. +assertEq(intLength(fakeArray1, 1), 10); +assertEq(valueLength(fakeArray2, 1), 10.5); + +// Cause invalidation of intLength by returning a double. +assertEq(intLength(hugeArray, 1), 4294967295); +assertEq(intLength(fakeArray2, 1), 10.5); diff --git a/js/src/jit-test/tests/ion/ConvertElementsToDouble-Int32.js b/js/src/jit-test/tests/ion/ConvertElementsToDouble-Int32.js new file mode 100644 index 0000000000..bb3390416e --- /dev/null +++ b/js/src/jit-test/tests/ion/ConvertElementsToDouble-Int32.js @@ -0,0 +1,9 @@ +// Bug 1312488 + +function test(a) { + let x = 0; + for (let i = 0, len = a.length; i < len; i++) + x += a[i]; + return x; +} +assertEq(test([10.1, 10.2, 10.3, 10.4, 10]), 51); diff --git a/js/src/jit-test/tests/ion/InlineAddVTypeMonitor.js b/js/src/jit-test/tests/ion/InlineAddVTypeMonitor.js new file mode 100644 index 0000000000..af5b9532cf --- /dev/null +++ b/js/src/jit-test/tests/ion/InlineAddVTypeMonitor.js @@ -0,0 +1,17 @@ +// make sure AddV instruction is monitoring the output type when 'f' is inlined +// into the loop of 'g' +var x = {}; +var y = []; + +function f(i) { + return x + y; +} + +function g(m) { + var i; + for (i = 0; i < m; i++) { + f(i); + } +} + +g(101); diff --git a/js/src/jit-test/tests/ion/PurgeProtoChain.js b/js/src/jit-test/tests/ion/PurgeProtoChain.js new file mode 100644 index 0000000000..b6319464ab --- /dev/null +++ b/js/src/jit-test/tests/ion/PurgeProtoChain.js @@ -0,0 +1,10 @@ +// In a proto chain A-->B-->C, shadowing C.x with B.x must change C's shape. + +var C = {x: 1}; +var B = Object.create(C); +var A = Object.create(B); +for (var i = 0; i < 2000; i++) { + if (i == 1900) + B.x = 3; + assertEq(A.x, i < 1900 ? 1 : 3); +} diff --git a/js/src/jit-test/tests/ion/absd.js b/js/src/jit-test/tests/ion/absd.js new file mode 100644 index 0000000000..b0860965a9 --- /dev/null +++ b/js/src/jit-test/tests/ion/absd.js @@ -0,0 +1,7 @@ +var do_abs = function(x) { + return Math.abs(x); +} +var i; +for (i=0;i<50;i++) + do_abs(-1.5); +assertEq(do_abs(-2.5), 2.5); diff --git a/js/src/jit-test/tests/ion/andOr.js b/js/src/jit-test/tests/ion/andOr.js new file mode 100644 index 0000000000..ae92f5462b --- /dev/null +++ b/js/src/jit-test/tests/ion/andOr.js @@ -0,0 +1,31 @@ +function testBooleans(a, b) { + var res = 0; + if (a && b) res += 2; + if (b || a) res += 1; + return res; +} +assertEq(testBooleans(false, false), 0); +assertEq(testBooleans(false, true), 1); +assertEq(testBooleans(true, false), 1); +assertEq(testBooleans(true, true), 3); + +function testShortCircuit(a) { + var b = 0; + ++a && a++; + a || (b = 100); + return a + b; +} +assertEq(testShortCircuit(0), 2); +assertEq(testShortCircuit(-2), 100); +assertEq(testShortCircuit(-1), 100); + +function testValues(a, b) { + if (a && b) return 2; + if (b || a) return 1; + return 0; +} +assertEq(testValues(false, true), 1); +assertEq(testValues("foo", 22), 2); +assertEq(testValues(null, ""), 0); +assertEq(testValues(Math.PI, undefined), 1); +assertEq(testValues(Math.abs, 2.2), 2); diff --git a/js/src/jit-test/tests/ion/arguments-type-reflow.js b/js/src/jit-test/tests/ion/arguments-type-reflow.js new file mode 100644 index 0000000000..aaa03cc60f --- /dev/null +++ b/js/src/jit-test/tests/ion/arguments-type-reflow.js @@ -0,0 +1,17 @@ +// |jit-test| error: InternalError: too much recursion +// FIXME: this should not give an internal error once OSI lands. + +var forceReflow = false; + +function rec(x, self) { + if (x > 0) + self(x - 1, self); + else if (forceReflow) + self(NaN, self); +} + +for (var i = 0; i < 40; ++i) + rec(1, rec); + +forceReflow = true; +rec(1, rec); diff --git a/js/src/jit-test/tests/ion/arithstringtonumber.js b/js/src/jit-test/tests/ion/arithstringtonumber.js new file mode 100644 index 0000000000..56fb119dec --- /dev/null +++ b/js/src/jit-test/tests/ion/arithstringtonumber.js @@ -0,0 +1,19 @@ +var g_array = [0, 1]; + +function g(p) { + p = p - 0; + return g_array[p - 0]; +} + +function f() { + var q = 0; + for (var i = 0; i < 10; ++i) { + q += g("0x0"); + q += g("0x1"); + } + return q; +} + +for (var j = 0; j < 2; ++j) { + assertEq(f(), 10); +} diff --git a/js/src/jit-test/tests/ion/array-join-bug1137624-1.js b/js/src/jit-test/tests/ion/array-join-bug1137624-1.js new file mode 100644 index 0000000000..1a039dc688 --- /dev/null +++ b/js/src/jit-test/tests/ion/array-join-bug1137624-1.js @@ -0,0 +1,12 @@ + +try { + var x = ["a", {toString() { s = x.join("-"); }}]; + var a = x.join("a"); + var b = x.join("b"); + assertEq(a, b); +} catch (e) { + // Using assertion does not work. + quit(0); +} + +quit(3); diff --git a/js/src/jit-test/tests/ion/array-join-bug1137624-2.js b/js/src/jit-test/tests/ion/array-join-bug1137624-2.js new file mode 100644 index 0000000000..affceb37e7 --- /dev/null +++ b/js/src/jit-test/tests/ion/array-join-bug1137624-2.js @@ -0,0 +1,9 @@ + +function f() { + var x = 0; + var a = [{toString: () => x++}]; + for (var i=0; i<10000; i++) + a.join(""); + assertEq(x, 10000); +} +f(); diff --git a/js/src/jit-test/tests/ion/array-push-frozen-array.js b/js/src/jit-test/tests/ion/array-push-frozen-array.js new file mode 100644 index 0000000000..4dfe32daae --- /dev/null +++ b/js/src/jit-test/tests/ion/array-push-frozen-array.js @@ -0,0 +1,19 @@ +function maybeFreeze(arr, b) { + with(this) {}; // Don't inline this. + if (b) { + Object.freeze(arr); + } +} +function test() { + var arr = []; + for (var i = 0; i < 1800; i++) { + maybeFreeze(arr, i > 1500); + try { + arr.push(2); + assertEq(i <= 1500, true); + } catch(e) { + assertEq(e instanceof TypeError, true); + } + } +} +test(); diff --git a/js/src/jit-test/tests/ion/array-push-length-overflow.js b/js/src/jit-test/tests/ion/array-push-length-overflow.js new file mode 100644 index 0000000000..4f7ef485a0 --- /dev/null +++ b/js/src/jit-test/tests/ion/array-push-length-overflow.js @@ -0,0 +1,14 @@ +function maybeSetLength(arr, b) { + with(this) {}; + if (b) + arr.length = 0x7fffffff; +} +function test() { + var arr = []; + for (var i=0; i<2000; i++) { + maybeSetLength(arr, i > 1500); + var res = arr.push(2); + assertEq(res, i > 1500 ? 0x80000000 : i + 1); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/array-push-multiple-frozen.js b/js/src/jit-test/tests/ion/array-push-multiple-frozen.js new file mode 100644 index 0000000000..271f6cb07a --- /dev/null +++ b/js/src/jit-test/tests/ion/array-push-multiple-frozen.js @@ -0,0 +1,85 @@ +// |jit-test| --no-threads; skip-if: !('oomAtAllocation' in this) + +// This test case check's Ion ability to recover from an allocation failure in +// the inlining of Array.prototype.push, when given multiple arguments. Note, +// that the following are not equivalent in case of failures: +// +// arr = []; +// arr.push(1,2,3); // OOM ---> arr == [] +// +// arr = []; +// arr.push(1); +// arr.push(2); // OOM --> arr == [1] +// arr.push(3); + +function canIoncompile() { + while (true) { + var i = inIon(); + if (i) + return i; + } +} + +if (canIoncompile() != true) + quit(); +if ("gczeal" in this) + gczeal(0); + +function pushLimits(limit, offset, arr, freeze) { + arr = arr || []; + arr.push(0,1,2,3,4,5,6,7,8,9); + arr.length = offset; + var l = arr.length; + var was = inIon(); + oomAtAllocation(limit); + try { + for (var i = 0; i < 50; i++) + arr.push(0,1,2,3,4,5,6,7,8,9); + if (freeze) + arr.frozen(); + for (var i = 0; i < 100; i++) + arr.push(0,1,2,3,4,5,6,7,8,9); + } catch (e) { + // Catch OOM. + } + resetOOMFailure(); + assertEq(arr.length % 10, l); + // Check for a bailout. + var is = inIon(); + return was ? is ? 1 : 2 : 0; +} + +// We need this limit to be high enough to be able to OSR in the for-loop of +// pushLimits. +var limit = 1024 * 1024 * 1024; +while(true) { + var res = pushLimits(limit, 0); + + if (res == 0) { + limit = 1024 * 1024 * 1024; + } else if (res == 1) { // Started and finished in Ion. + if (limit <= 1) // If we are not in the Jit. + break; + // We want to converge quickly to a state where the memory is limited + // enough to cause failures in array.prototype.push. + limit = (limit / 2) | 0; + } else if (res == 2) { // Started in Ion, and finished in Baseline. + if (limit < 10) { + // This is used to offset the OOM location, such that we can test + // each steps of the Array.push function, when it is jitted. + for (var off = 1; off < 10; off++) { + var arr = []; + try { + pushLimits(limit, off, arr, true); + } catch (e) { + // Cacth OOM produced while generating the error message. + } + if (arr.length > 10) assertEq(arr[arr.length - 1], 9); + else assertEq(arr[arr.length - 1], arr.length - 1); + } + } + if (limit == 1) + break; + limit--; + } +} diff --git a/js/src/jit-test/tests/ion/array-push-multiple-with-funapply.js b/js/src/jit-test/tests/ion/array-push-multiple-with-funapply.js new file mode 100644 index 0000000000..b09fa9c440 --- /dev/null +++ b/js/src/jit-test/tests/ion/array-push-multiple-with-funapply.js @@ -0,0 +1,78 @@ +// |jit-test| --no-threads; skip-if: !('oomAtAllocation' in this) + +// This test case check's Ion ability to inline Array.prototype.push, when +// fun.apply is used and inlined with the set of arguments of the current +// function. Note, that the following are not equivalent in case of failures: +// +// arr = []; +// arr.push(1,2,3); // OOM ---> arr == [] +// +// arr = []; +// arr.push(1); +// arr.push(2); // OOM --> arr == [1] +// arr.push(3); + +function canIoncompile() { + while (true) { + var i = inIon(); + if (i) + return i; + } +} + +if (canIoncompile() != true) + quit(); +if ("gczeal" in this) + gczeal(0); + +function pushLimits(limit, offset) { + function pusher() { + Array.prototype.push.apply(arr, arguments) + } + var arr = [0,1,2,3,4,5,6,7]; + arr.length = offset; + var l = arr.length; + var was = inIon(); + oomAtAllocation(limit); + try { + for (var i = 0; i < 100; i++) + pusher(0,1,2,3,4,5,6,7); + } catch (e) { + // Catch OOM. + } + resetOOMFailure(); + assertEq(arr.length % 8, l); + // Check for a bailout. + var is = inIon(); + return was ? is ? 1 : 2 : 0; +} + + + +// We need this limit to be high enough to be able to OSR in the for-loop of +// pushLimits. +var limit = 1024 * 1024 * 1024; +while(true) { + var res = pushLimits(limit, 0); + print(limit, res); + + if (res == 0) { + limit = 1024 * 1024 * 1024; + } else if (res == 1) { // Started and finished in Ion. + // We want to converge quickly to a state where the memory is limited + // enough to cause failures in array.prototype.push. + limit = (limit / 1.5) | 0; + if (limit == 0) // If we are not in the Jit. + break; + } else if (res == 2) { // Started in Ion, and finished in Baseline. + if (limit < 10) { + // This is used to offset the OOM location, such that we can test + // each steps of the Array.push function, when it is jitted. + for (var off = 1; off < 8; off++) + pushLimits(limit, off); + } + if (limit == 1) + break; + limit--; + } +} diff --git a/js/src/jit-test/tests/ion/array-push-multiple.js b/js/src/jit-test/tests/ion/array-push-multiple.js new file mode 100644 index 0000000000..19c1a93e70 --- /dev/null +++ b/js/src/jit-test/tests/ion/array-push-multiple.js @@ -0,0 +1,72 @@ +// |jit-test| --no-threads; skip-if: !('oomAtAllocation' in this) + +// This test case check's Ion ability to recover from an allocation failure in +// the inlining of Array.prototype.push, when given multiple arguments. Note, +// that the following are not equivalent in case of failures: +// +// arr = []; +// arr.push(1,2,3); // OOM ---> arr == [] +// +// arr = []; +// arr.push(1); +// arr.push(2); // OOM --> arr == [1] +// arr.push(3); + +function canIoncompile() { + while (true) { + var i = inIon(); + if (i) + return i; + } +} + +if (canIoncompile() != true) + quit(); +if ("gczeal" in this) + gczeal(0); + +function pushLimits(limit, offset) { + var arr = [0,1,2,3,4,5,6,7,8,9]; + arr.length = offset; + var l = arr.length; + var was = inIon(); + oomAtAllocation(limit); + try { + for (var i = 0; i < 100; i++) + arr.push(0,1,2,3,4,5,6,7,8,9); + } catch (e) { + // Catch OOM. + } + resetOOMFailure(); + assertEq(arr.length % 10, l); + // Check for a bailout. + var is = inIon(); + return was ? is ? 1 : 2 : 0; +} + +// We need this limit to be high enough to be able to OSR in the for-loop of +// pushLimits. +var limit = 1024 * 1024 * 1024; +while(true) { + var res = pushLimits(limit, 0); + + if (res == 0) { + limit = 1024 * 1024 * 1024; + } else if (res == 1) { // Started and finished in Ion. + if (limit <= 1) // If we are not in the Jit. + break; + // We want to converge quickly to a state where the memory is limited + // enough to cause failures in array.prototype.push. + limit = (limit / 2) | 0; + } else if (res == 2) { // Started in Ion, and finished in Baseline. + if (limit < 10) { + // This is used to offset the OOM location, such that we can test + // each steps of the Array.push function, when it is jitted. + for (var off = 1; off < 10; off++) + pushLimits(limit, off); + } + if (limit == 1) + break; + limit--; + } +} diff --git a/js/src/jit-test/tests/ion/array-splice.js b/js/src/jit-test/tests/ion/array-splice.js new file mode 100644 index 0000000000..cb39a21ed5 --- /dev/null +++ b/js/src/jit-test/tests/ion/array-splice.js @@ -0,0 +1,38 @@ +function test1() { + // splice GetElement calls are observable and should be executed even if + // the return value of splice is unused. + Object.defineProperty(Object.prototype, "0", {get: function() { + c++; + }, set: function() {}}); + var arr = [,,,]; + var c = 0; + for (var i=0; i<100; i++) { + arr.splice(0, 1); + arr.length = 1; + } + + assertEq(c, 100); +} +test1(); + +function test2() { + var arr = []; + for (var i=0; i<100; i++) + arr.push(i); + for (var i=0; i<40; i++) + arr.splice(0, 2); + assertEq(arr.length, 20); + assertEq(arr[0], undefined); + assertEq(arr[1], 81); +} +test2(); + +function testNonArray() { + for (var i=0; i<10; i++) { + var o = {splice:[].splice, 0:"a", 1:"b", 2:"c", length:3}; + o.splice(0, 2); + assertEq(o.length, 1); + assertEq(o[0], "c"); + } +} +testNonArray(); diff --git a/js/src/jit-test/tests/ion/bailout-env.js b/js/src/jit-test/tests/ion/bailout-env.js new file mode 100644 index 0000000000..2edfaf2502 --- /dev/null +++ b/js/src/jit-test/tests/ion/bailout-env.js @@ -0,0 +1,54 @@ +function inner_env() { + let result = []; + + let x = 0; + result.push(() => x); + + var tmp = [1,2,3]; + for (let y in tmp) + result.push(() => tmp[y]) + + for (let z = 4; z < 7; z++) + result.push(() => z) + + return result; +} + +function outer_env() { + let result = inner_env(); + + var tmp = [7,8,9]; + for (let x in tmp) + result.push(() => tmp[x]) + + return result; +} + +function check_result(result, expectedLen) { + assertEq(result.length, expectedLen); + + for (var i = 0; i < expectedLen; ++i) + assertEq(result[i], i); +} + +// Wipeout jitcode +bailout(); +gc(); gc(); + +// Test lexical environment bailouts +for (var i = 0; i < 100; ++i) +{ + bailAfter(i); + + var result = inner_env().map(fn => fn()); + check_result(result, 7); +} + +// Test inlined lexical environment bailouts +for (var i = 0; i < 100; ++i) +{ + bailAfter(i); + + var result = outer_env().map(fn => fn()); + check_result(result, 10); +} diff --git a/js/src/jit-test/tests/ion/bailout-float-regs.js b/js/src/jit-test/tests/ion/bailout-float-regs.js new file mode 100644 index 0000000000..175fc59cca --- /dev/null +++ b/js/src/jit-test/tests/ion/bailout-float-regs.js @@ -0,0 +1,13 @@ +function f() { + var res = 0; + for (var i = 0; i < 2000; i++) { + var res1 = Math.abs(i - 123.5); // Double + var res2 = Math.fround(i + 0.5); // Float32 + if (i > 1900) { + bailout(); + } + res += res1 + res2; + } + assertEq(res, 3767376); +} +f(); diff --git a/js/src/jit-test/tests/ion/bailout-oom-01.js b/js/src/jit-test/tests/ion/bailout-oom-01.js new file mode 100644 index 0000000000..b56b323774 --- /dev/null +++ b/js/src/jit-test/tests/ion/bailout-oom-01.js @@ -0,0 +1,36 @@ +// |jit-test| --no-threads; --fast-warmup; skip-if: !('oomTest' in this) + +setJitCompilerOption("ion.warmup.trigger", 20); +gczeal(0); + +var nonce = 0; + +function doTest() { + // Block Warp/Ion compile. + with ({}) {}; + + nonce += 1; + + // Fresh function and script. + let fn = new Function("arg", ` + /* {nonce} */ + var r1 = []; + var r2 = []; + return (() => arg + 1)(); + `); + + // Warm up JITs. + for (var i = 0; i < 20; ++i) { + assertEq(fn(i), i + 1); + } + + // Trigger bailout. + fn(); +} + +// Warmup doTest already. +doTest(); +doTest(); + +// OOM test the JIT compilation and bailout. +oomTest(doTest); diff --git a/js/src/jit-test/tests/ion/bailout-spread.js b/js/src/jit-test/tests/ion/bailout-spread.js new file mode 100644 index 0000000000..2b7105c735 --- /dev/null +++ b/js/src/jit-test/tests/ion/bailout-spread.js @@ -0,0 +1,53 @@ +function f1(a,b,c,d) { + if (a < 0) + throw arguments; + + return a + b + c + d; +} + +function f2(a,b,c,d,e) { + return f1(a,b,c,d*e); +} + +function f3(a,v) { + return f2(a, ...v); +} + +function f4(i, j) { + return f3(i, [j,3,4,5]); +} + +function f5(i) { + return f4(i, i); +} + +// Clean jitcode +gc(); gc(); + +// Test bailouts through spreadcall +for (var i = 0; i < 1000; ++i) +{ + bailAfter(i); + assertEq(f5(i), i+i+23); +} + +// Test exception unwind bailout through spreadcall +for (var i = 1; i < 100; ++i) +{ + let x; + + try { + f5(-i); + + // Unreachable + assertEq(1, 0); + } + catch (e) { + x = e; + } + + assertEq(x[0], -i); + assertEq(x[1], -i); + assertEq(x[2], 3); + assertEq(x[3], 20); +} diff --git a/js/src/jit-test/tests/ion/bailout-with-object-or-null.js b/js/src/jit-test/tests/ion/bailout-with-object-or-null.js new file mode 100644 index 0000000000..260a20933d --- /dev/null +++ b/js/src/jit-test/tests/ion/bailout-with-object-or-null.js @@ -0,0 +1,17 @@ + +function foo(p) { + this.f = p; +} +function use(v, a, b) { + var f = v.f; + g = f; + g = a + b; + if (f != null) + return; +} + +with({}){} + +for (var i = 0; i < 2000; i++) + use(new foo(i % 2 ? {} : null), 1, 2); +use(new foo(null), 2147483548, 1000); diff --git a/js/src/jit-test/tests/ion/base-reg-fp.js b/js/src/jit-test/tests/ion/base-reg-fp.js new file mode 100644 index 0000000000..f6a8bb09f1 --- /dev/null +++ b/js/src/jit-test/tests/ion/base-reg-fp.js @@ -0,0 +1,13 @@ +setJitCompilerOption("base-reg-for-locals", 1); // FP +function g(x) { + with (this) {} // Don't inline. + return x; +} +function f(x) { + var sum = 0; + for (var i = 0; i < x; i++) { + sum += g(i); + } + return sum; +} +assertEq(f(2000), 1999000); diff --git a/js/src/jit-test/tests/ion/base-reg-sp.js b/js/src/jit-test/tests/ion/base-reg-sp.js new file mode 100644 index 0000000000..07c61aba11 --- /dev/null +++ b/js/src/jit-test/tests/ion/base-reg-sp.js @@ -0,0 +1,13 @@ +setJitCompilerOption("base-reg-for-locals", 0); // SP +function g(x) { + with (this) {} // Don't inline. + return x; +} +function f(x) { + var sum = 0; + for (var i = 0; i < x; i++) { + sum += g(i); + } + return sum; +} +assertEq(f(2000), 1999000); diff --git a/js/src/jit-test/tests/ion/bindname.js b/js/src/jit-test/tests/ion/bindname.js new file mode 100644 index 0000000000..be5eca2d03 --- /dev/null +++ b/js/src/jit-test/tests/ion/bindname.js @@ -0,0 +1,53 @@ +// Test the scope chain walk. +function test1() { + var x = 0; + function f1(addprop) { + function f2() { + eval(""); + function f3() { + eval(""); + function f4() { + for (var i=0; i<100; i++) { + x = x + i; + } + } + return f4; + } + return f3(); + } + var g = f2(); + g(); + if (addprop) + eval("var a1 = 3; var x = 33;"); + g(); + if (addprop) + assertEq(x, 4983); + return f2(); + } + + var g = f1(true); + g(); + g = f1(false); + eval("var y = 2020; var z = y + 3;"); + g(); + return x; +} +assertEq(test1(), 19800); + +// Test with non-cacheable objects on the scope chain. +function test2(o) { + var x = 0; + with ({}) { + with (o) { + var f = function() { + for (var i=0; i<100; i++) { + x++; + } + }; + } + } + f(); + assertEq(o.x, 110); + assertEq(x, 0); +} +test2({x: 10}); diff --git a/js/src/jit-test/tests/ion/bug-770309-mcall-bailout.js b/js/src/jit-test/tests/ion/bug-770309-mcall-bailout.js new file mode 100644 index 0000000000..9886a75a1d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug-770309-mcall-bailout.js @@ -0,0 +1,68 @@ + +// Test various code paths associated with fused getprop/poly inlining. + +function A(a) { this.a = a; } +A.prototype.foo = function (x) { return (x % 3) + this.a; }; + +function B(b) { this.b = b; } +B.prototype.foo = function (x) { return (x % 3) + this.b + 1; }; + +// c.foo() for some (c instanceof C) should always hit the fallback +// path of any fused poly inline cache created for it. +function C(c) { this.c = c; } +var GLOBX = {'x': function (x) { + if (x > 29500) + throw new Error("ERROR"); + return 2; +}}; +function C_foo1(x) { + return (x % 3) + this.c + GLOBX.x(x) + 1; +} +function C_foo2(x) { + return (x % 3) + this.c + GLOBX.x(x) + 2; +} +C.prototype.foo = C_foo1; + +// Create an array of As, Bs, and Cs. +function makeArray(n) { + var classes = [A, B, C]; + var arr = []; + for (var i = 0; i < n; i++) { + arr.push(new classes[i % 3](i % 3)); + } + return arr; +} + +// Call foo on them, sum up results into first elem of resultArray +function runner(arr, resultArray, len) { + for (var i = 0; i < len; i++) { + // This changes the type of returned value from C.foo(), leading to + // a bailout fater the call obj.foo() below. + var obj = arr[i]; + resultArray[0] += obj.foo(i); + } +} + +// Make an array of instance. +var resultArray = [0]; +var arr = makeArray(30000); + +// Run runner for a bit with C.prototype.foo being C_foo1 +runner(arr, resultArray, 100); + +// Run runner for a bit with C.prototype.foo being C_foo2 +C.prototype.foo = C_foo2; +runner(arr, resultArray, 100); + +// Run runner for a bit longer to force GLOBX.x to raise +// an error inside a call to C.prototype.foo within runner. +var gotError = false; +try { + runner(arr, resultArray, 30000); +} catch(err) { + gotError = true; +} + +// Check results. +assertEq(gotError, true); +assertEq(resultArray[0], 108859); diff --git a/js/src/jit-test/tests/ion/bug-870034.js b/js/src/jit-test/tests/ion/bug-870034.js new file mode 100644 index 0000000000..1bb6e095f5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug-870034.js @@ -0,0 +1,12 @@ +// |jit-test| --ion-eager +function f(b) { + var a = arguments; + if (b) + f(false); + else + g = { + apply:function(x,y) { "use asm"; function g() {} return g } + }; + g.apply(null, a); +} +f(true); diff --git a/js/src/jit-test/tests/ion/bug-952818.js b/js/src/jit-test/tests/ion/bug-952818.js new file mode 100644 index 0000000000..21c48f8f83 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug-952818.js @@ -0,0 +1,9 @@ +(function() { + eval("\ + (function() {\ + var f = function(){\ + f\ + }\ + })()\ + ") +})() diff --git a/js/src/jit-test/tests/ion/bug1000605.js b/js/src/jit-test/tests/ion/bug1000605.js new file mode 100644 index 0000000000..f2c78dbc1d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1000605.js @@ -0,0 +1,43 @@ +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("ion.warmup.trigger", 0); + +function ceil(a, b) { + return Math.ceil((a | 0) / (b | 0)) | 0; +} +function floor(a, b) { + return Math.floor((a | 0) / (b | 0)) | 0; +} +function round(a, b) { + return Math.round((a | 0) / (b | 0)) | 0; +} +function intdiv(a, b) { + return ((a | 0) / (b | 0)) | 0; +} + +// Always rounds up. +assertEq(ceil(5, 5), 1); +assertEq(ceil(4, 3), 2); +assertEq(ceil(5, 3), 2); +assertEq(ceil(-4, 3), -1); +assertEq(ceil(-5, 3), -1); + +// Always rounds down. +assertEq(floor(5, 5), 1); +assertEq(floor(4, 3), 1); +assertEq(floor(5, 3), 1); +assertEq(floor(-4, 3), -2); +assertEq(floor(-5, 3), -2); + +// Always rounds towards the nearest. +assertEq(round(5, 5), 1); +assertEq(round(4, 3), 1); +assertEq(round(5, 3), 2); +assertEq(round(-4, 3), -1); +assertEq(round(-5, 3), -2); + +// Always rounds towards zero. +assertEq(intdiv(5, 5), 1); +assertEq(intdiv(4, 3), 1); +assertEq(intdiv(5, 3), 1); +assertEq(intdiv(-4, 3), -1); +assertEq(intdiv(-5, 3), -1); diff --git a/js/src/jit-test/tests/ion/bug1000960.js b/js/src/jit-test/tests/ion/bug1000960.js new file mode 100644 index 0000000000..bf32f84439 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1000960.js @@ -0,0 +1,9 @@ +function testFloat32SetElemIC(a) { + for (var i = 0; i < a.length; i++) { + var r = Math.fround(Number.MAX_VALUE); + a[i] = r; + assertEq(a[i], r); + } +} +testFloat32SetElemIC(new Array(2048)); +testFloat32SetElemIC(new Float32Array(2048)); diff --git a/js/src/jit-test/tests/ion/bug1001222.js b/js/src/jit-test/tests/ion/bug1001222.js new file mode 100644 index 0000000000..98c7971bc6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1001222.js @@ -0,0 +1,5 @@ +function f(x, y) { + return +(x ? x : y), y >>> 0 +} +f(0, -0) +f(0, 2147483649) diff --git a/js/src/jit-test/tests/ion/bug1001378.js b/js/src/jit-test/tests/ion/bug1001378.js new file mode 100644 index 0000000000..f5953af24b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1001378.js @@ -0,0 +1,17 @@ +// Test that we don't incorrectly optimize out argument slots from resume +// points. + +function boo() { + return foo.arguments[0]; +} +function foo(a,b,c) { + if (a == 0) { + a ^= ""; + return boo(); + } +} +function inlined() { + return foo.apply({}, arguments); +} +assertEq(inlined(1,2,3), undefined); +assertEq(inlined(0,2,3), 0); diff --git a/js/src/jit-test/tests/ion/bug1001382.js b/js/src/jit-test/tests/ion/bug1001382.js new file mode 100644 index 0000000000..0c7044f2d4 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1001382.js @@ -0,0 +1,10 @@ +var i = 0; +var expectedmatch = ''; +var expectedmatches = new Array(); +addThis(); +expectedmatch = null; +addThis(); +function addThis() { + Array(-2147483648, -2147483648); + expectedmatches[i] = expectedmatch; +} diff --git a/js/src/jit-test/tests/ion/bug1001850.js b/js/src/jit-test/tests/ion/bug1001850.js new file mode 100644 index 0000000000..e9b002d718 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1001850.js @@ -0,0 +1,110 @@ +function t1() { + assertEq(thisValue, this); +} + +thisValue = {}; +var f1 = t1.bind(thisValue); +f1() +f1() + +//////////////////////////////////////////////////////////// + +function t2() { + bailout(); +} + +var f2 = t2.bind(thisValue); +f2() +f2() + +//////////////////////////////////////////////////////////// + +function test3() { + function i3(a,b,c,d) { + bailout(); + } + + function t3(a,b,c,d) { + i3(a,b,c,d); + } + + var f3 = t3.bind(thisValue); + for (var i=0;i<10; i++) { + f3(1,2,3,4) + f3(1,2,3,4) + } +} +test3(); +test3(); + +//////////////////////////////////////////////////////////// + +function test4() { + this.a = 1; + var inner = function(a,b,c,d) { + bailout(); + } + + var t = function(a,b,c,d) { + assertEq(this.a, undefined); + inner(a,b,c,d); + assertEq(this.a, undefined); + } + + var f = t.bind(thisValue); + for (var i=0;i<5; i++) { + var res = f(1,2,3,4) + var res2 = new f(1,2,3,4) + assertEq(res, undefined); + assertEq(res2 == undefined, false); + } +} +test4(); +test4(); + +//////////////////////////////////////////////////////////// + +function test5() { + this.a = 1; + var inner = function(a,b,c,d) { + assertEq(a, 1); + assertEq(b, 2); + assertEq(c, 3); + assertEq(d, 1); + bailout(); + assertEq(a, 1); + assertEq(b, 2); + assertEq(c, 3); + assertEq(d, 1); + } + + var t = function(a,b,c,d) { + inner(a,b,c,d); + } + + var f = t.bind(thisValue, 1,2,3); + for (var i=0;i<5; i++) { + f(1,2,3,4) + } +} +test5(); +test5(); + +//////////////////////////////////////////////////////////// + +function test6() { + function i6(a,b,c,d) { + if (a == 1) + bailout(); + } + + function t6(a,b,c,d) { + i6(a,b,c,d); + } + + var f6 = t6.bind(thisValue, 1); + f6(1,2,3,4) + f6(0,2,3,4) +} +test6(); +test6(); diff --git a/js/src/jit-test/tests/ion/bug1003694.js b/js/src/jit-test/tests/ion/bug1003694.js new file mode 100644 index 0000000000..7999510f19 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1003694.js @@ -0,0 +1,9 @@ +function f(i) { + if (i >= 10) + return; + var d = 3 + Math.abs(); + f(i ? i + 1 : 1); + bailout(); +} + +f(0); diff --git a/js/src/jit-test/tests/ion/bug1005458.js b/js/src/jit-test/tests/ion/bug1005458.js new file mode 100644 index 0000000000..02c7ceb66a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1005458.js @@ -0,0 +1,5 @@ +(function(x) { + for (var y = 0; y < 1; y++) { + assertEq(Array.prototype.shift.call(arguments.callee.arguments), 0); + } +})(0) diff --git a/js/src/jit-test/tests/ion/bug1005590.js b/js/src/jit-test/tests/ion/bug1005590.js new file mode 100644 index 0000000000..4fe1363bee --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1005590.js @@ -0,0 +1,9 @@ +function f(x) { + "use asm" + return !(1 || x) +} +for (var j = 0; j < 1; j++) { + (function(x) { + +f(+x) + })() +} diff --git a/js/src/jit-test/tests/ion/bug1006885.js b/js/src/jit-test/tests/ion/bug1006885.js new file mode 100644 index 0000000000..20819433b3 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1006885.js @@ -0,0 +1,9 @@ +function checkConstruct(thing, buggy) { + try { + new thing(); + } catch (e) {} +} +var boundFunctionPrototype = Function.prototype.bind(); +checkConstruct(boundFunctionPrototype, true); +var boundBuiltin = Math.sin.bind(); +checkConstruct(boundBuiltin, true); diff --git a/js/src/jit-test/tests/ion/bug1007027.js b/js/src/jit-test/tests/ion/bug1007027.js new file mode 100644 index 0000000000..f98c14fe87 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1007027.js @@ -0,0 +1,5 @@ +// |jit-test| error: ReferenceError +(function(x) { + x = i ? 4 : 2 + y +})() diff --git a/js/src/jit-test/tests/ion/bug1007213.js b/js/src/jit-test/tests/ion/bug1007213.js new file mode 100644 index 0000000000..6366e1e3f0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1007213.js @@ -0,0 +1,21 @@ + +function getval(o) { + return obj.val +} +function f(x, o) { + var lhs = -(~x >>> 0) + var rhs = getval(o) + return (lhs - rhs >> 0) +} +function getObj(v) { + return { + val: v + } +} + +var obj = getObj(1) +assertEq(f(0, obj), 0) +assertEq(f(0, obj), 0) +obj = getObj('can has bug?') +obj = getObj(.5) +assertEq(f(0, obj), 1) diff --git a/js/src/jit-test/tests/ion/bug1015498.js b/js/src/jit-test/tests/ion/bug1015498.js new file mode 100644 index 0000000000..9276fe55bf --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1015498.js @@ -0,0 +1,91 @@ +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 20); + +function myFloor(x) { + if(x >= 0) + return x - Math.abs(x % 1); + else + return x - Math.abs(1 + (x % 1)); +} + +function floorRangeTest(x) { + if(10 < x) { + if(x < 100) { + assertEq(Math.floor(x), myFloor(x)); + } + } + + if(-100 < x) { + if(x < -10) { + assertEq(Math.floor(x), myFloor(x)); + } + } + + if (-(4294967296 - 1) < x) { + if(x < 10) { + assertEq(Math.floor(x), myFloor(x)); + } + } + + if (-10 < x) { + if(x < 4294967296) { + assertEq(Math.floor(x), myFloor(x)); + } + } + + if (-2147483648 < x) { + if(x < 10) { + assertEq(Math.floor(x), myFloor(x)); + } + } + + if ((-2147483648 -1) < x) { + if(x < 10) { + assertEq(Math.floor(x), myFloor(x)); + } + } + + if (10 < x) { + if(x < 2147483648) { + assertEq(Math.floor(x), myFloor(x)); + } + } + + if (10 < x) { + if(x < 2147483649) { + assertEq(Math.floor(x), myFloor(x)); + } + } + + if (Math.pow(2,31) < x) { + if(x < Math.pow(2,33)) { + assertEq(Math.floor(x), myFloor(x)); + } + } +} + +var a = [Math.pow(2,31), Math.pow(2,33), -4294967296.4, 214748364.2, -50.4, 50.4]; + +for(var i = 0; i < 10; i++) { + for (var j = 0; j < a.length; j++) { + floorRangeTest(a[j]); + } +} + +for (var j = 0; j < 30; j++) { + (function() { + Math.floor(1.5); + })() +} + +for (var j = 0; j < 30; j++) { + (function() { + Math.floor(-1.5); + })() +} + +for (var j = 0; j < 30; j++) { + (function() { + Math.floor(-127.5); + })() +} diff --git a/js/src/jit-test/tests/ion/bug1018621.js b/js/src/jit-test/tests/ion/bug1018621.js new file mode 100644 index 0000000000..e9f530b63d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1018621.js @@ -0,0 +1,7 @@ +function strictSome(k) { + "use strict"; + for (var i = 0; i < args.length; i++) + assertEq(arguments[i], args[i], "wrong argument " + i); +} +args = [8, 6, 7, NaN, undefined, 0.3]; +strictSome.call(NaN, 8, 6, 7, NaN, undefined, 0.3); diff --git a/js/src/jit-test/tests/ion/bug1022081.js b/js/src/jit-test/tests/ion/bug1022081.js new file mode 100644 index 0000000000..f1e198849a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1022081.js @@ -0,0 +1,8 @@ +function f() { + (function() { + gc() + })() +} +enableGeckoProfiling() +f() +f() diff --git a/js/src/jit-test/tests/ion/bug1027510.js b/js/src/jit-test/tests/ion/bug1027510.js new file mode 100644 index 0000000000..62556086ae --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1027510.js @@ -0,0 +1,96 @@ +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 20); + +function myCeil(x) { + if(x >= 0) { + var r = Math.abs(x % 1); + if(r != 0) + return (x + 1) - r; + else + return x; + } + else + return x + Math.abs(x % 1); +} + +function ceilRangeTest(x) { + if(10 < x) { + if(x < 100) { + assertEq(Math.ceil(x), myCeil(x)); + } + } + + if(-100 < x) { + if(x < -10) { + assertEq(Math.ceil(x), myCeil(x)); + } + } + + if (-(4294967296 - 1) < x) { + if(x < 10) { + assertEq(Math.ceil(x), myCeil(x)); + } + } + + if (-10 < x) { + if(x < 4294967296) { + assertEq(Math.ceil(x), myCeil(x)); + } + } + + if (-2147483648 < x) { + if(x < 10) { + assertEq(Math.ceil(x), myCeil(x)); + } + } + + if ((-2147483648 -1) < x) { + if(x < 10) { + assertEq(Math.ceil(x), myCeil(x)); + } + } + + if (10 < x) { + if(x < 2147483648) { + assertEq(Math.ceil(x), myCeil(x)); + } + } + + if (10 < x) { + if(x < 2147483649) { + assertEq(Math.ceil(x), myCeil(x)); + } + } + + if (Math.pow(2,31) < x) { + if(x < Math.pow(2,33)) { + assertEq(Math.ceil(x), myCeil(x)); + } + } +} + +var a = [Math.pow(2,31), Math.pow(2,33), -4294967296.4, 214748364.2, -50.4, 50.4]; + +for(var i = 0; i < 10; i++) { + for (var j = 0; j < a.length; j++) { + ceilRangeTest(a[j]); + } +} + +for (var j = 0; j < 30; j++) { + (function() { + Math.ceil(1.5); + })() +} + +for (var j = 0; j < 30; j++) { + (function() { + Math.ceil(-1.5); + })() +} + +for (var j = 0; j < 30; j++) { + (function() { + Math.ceil(-127.5); + })() +} diff --git a/js/src/jit-test/tests/ion/bug1028910.js b/js/src/jit-test/tests/ion/bug1028910.js new file mode 100644 index 0000000000..25c0f7762e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1028910.js @@ -0,0 +1,14 @@ +setJitCompilerOption("ion.warmup.trigger", 4); + +var IsObject = getSelfHostedValue("IsObject") +function test(foo) { + if (IsObject(foo)) { + print(foo.test) + } + +} + +for (var i=0; i<10; i++) { + test(1) + test({}) +} diff --git a/js/src/jit-test/tests/ion/bug1033873.js b/js/src/jit-test/tests/ion/bug1033873.js new file mode 100644 index 0000000000..0caae6ff49 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1033873.js @@ -0,0 +1,6 @@ +function f() { + return __proto__ +} +f(); +f(); +assertEq(!!f(), true); diff --git a/js/src/jit-test/tests/ion/bug1034400.js b/js/src/jit-test/tests/ion/bug1034400.js new file mode 100644 index 0000000000..d55aaffc79 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1034400.js @@ -0,0 +1,28 @@ +var countG = 0; +function g() { + switch(countG++) { + case 0: return 42; + case 1: return "yo"; + case 2: return {}; + } +} + +var countFault = 0; +function uceFault() { + if (countFault++ == 4) + uceFault = function() { return true } + return false; +} + +function f() { + var x = !g(); + if (uceFault() || uceFault()) { + assertEq(x, false); + return 0; + } + return 1; +} + +f(); +f(); +f(); diff --git a/js/src/jit-test/tests/ion/bug1046597.js b/js/src/jit-test/tests/ion/bug1046597.js new file mode 100644 index 0000000000..cfd645143e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1046597.js @@ -0,0 +1,6 @@ +a = {} +b = __proto__ +for (i = 0; i < 10; i++) { + __proto__ &= a + a.__proto__ = b +} diff --git a/js/src/jit-test/tests/ion/bug1053074.js b/js/src/jit-test/tests/ion/bug1053074.js new file mode 100644 index 0000000000..8a9cf78b41 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1053074.js @@ -0,0 +1,12 @@ +function f(y) { + return 2147483648 < y >>> 0 +} +assertEq(f(0), false); +assertEq(f(-8), true); + +function g(y) { + var t = Math.floor(y); + return 2147483648 < t+2; +} +assertEq(g(0), false) +assertEq(g(2147483647), true) diff --git a/js/src/jit-test/tests/ion/bug1054047.js b/js/src/jit-test/tests/ion/bug1054047.js new file mode 100644 index 0000000000..42dedd718c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1054047.js @@ -0,0 +1,12 @@ + +function f() {} +function g() { + f.apply(this, arguments); +} + +var arr = []; +for (var j = 0; j < 128 /* 127 */; j++) + arr.push(0); + +for (var j = 0; j < 10000; j++) + g.apply(null, arr); diff --git a/js/src/jit-test/tests/ion/bug1054241.js b/js/src/jit-test/tests/ion/bug1054241.js new file mode 100644 index 0000000000..7c0cf0a26e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1054241.js @@ -0,0 +1,12 @@ +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 20); + +enableShellAllocationMetadataBuilder(); +(function(){ + for(var i = 0; i < 100; i++) { + try{ + var a = new Array(5); + throw 1; + } catch(e) {} + } +})(); diff --git a/js/src/jit-test/tests/ion/bug1054512.js b/js/src/jit-test/tests/ion/bug1054512.js new file mode 100644 index 0000000000..4da554dc64 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1054512.js @@ -0,0 +1,11 @@ +function f(x) { + x((x | 0) + x); +}; +try { + f(1); +} catch (e) {} +for (var k = 0; k < 1; ++k) { + try { + f(Symbol()); + } catch (e) {} +} diff --git a/js/src/jit-test/tests/ion/bug1054601.js b/js/src/jit-test/tests/ion/bug1054601.js new file mode 100644 index 0000000000..3332501739 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1054601.js @@ -0,0 +1,8 @@ + +(function() { + for (let x = 0; x < 1; ++x) { + if (x % 6 == 4) {} else { + return; + } + } +})() diff --git a/js/src/jit-test/tests/ion/bug1054753.js b/js/src/jit-test/tests/ion/bug1054753.js new file mode 100644 index 0000000000..a05f2be502 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1054753.js @@ -0,0 +1,13 @@ +// |jit-test| error: TypeError +g = (function() { + var Int32ArrayView = new Int32Array(); + function f() { + Int32ArrayView[Symbol() >> 2] + } + return f; +})(); +try { + g(); +} catch (e) {} +g(); + diff --git a/js/src/jit-test/tests/ion/bug1055762.js b/js/src/jit-test/tests/ion/bug1055762.js new file mode 100644 index 0000000000..54f09bf168 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1055762.js @@ -0,0 +1,13 @@ +// |jit-test| error: TypeError +function g() { + f(0); +} +function f(y) { + return (undefined <= y); +} +try { + g(); +} catch (e) {} +(function() { + f()() +})(); diff --git a/js/src/jit-test/tests/ion/bug1055864.js b/js/src/jit-test/tests/ion/bug1055864.js new file mode 100644 index 0000000000..0cf993cb43 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1055864.js @@ -0,0 +1,8 @@ +function f() {} +(function() { + f() +})() +function g() { + new f >> 0 +} +g() diff --git a/js/src/jit-test/tests/ion/bug1057580.js b/js/src/jit-test/tests/ion/bug1057580.js new file mode 100644 index 0000000000..7fe21b2ffc --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1057580.js @@ -0,0 +1,15 @@ +// |jit-test| error: TypeError + +function testApplyCallHelper(f) { + for (var i = 0; i < 10; ++i) + f.call(this); +} +function testApplyCall() { + var r = testApplyCallHelper( + function (a0,a1,a2,a3,a4,a5,a6,a7) { + x = [a0,a1,a2,a3,a4,a5,a6,a7]; + } + ); + r += testApplyCallHelper(x); +} +testApplyCall(); diff --git a/js/src/jit-test/tests/ion/bug1057582.js b/js/src/jit-test/tests/ion/bug1057582.js new file mode 100644 index 0000000000..05ca5160a2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1057582.js @@ -0,0 +1,10 @@ +Object.defineProperty(Object.prototype, "0", {configurable: true}); +delete Object.prototype[0]; + +function makeArray() { + var arr = []; + for (var i = 0; i < 10; i++) + arr.push(true); + return arr; +} +makeArray(); diff --git a/js/src/jit-test/tests/ion/bug1057598.js b/js/src/jit-test/tests/ion/bug1057598.js new file mode 100644 index 0000000000..63c1bf01b2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1057598.js @@ -0,0 +1,18 @@ +// enableShellAllocationMetadataBuilder ignores its argument, because we don't +// permit metadata callbacks to run JS any more, so this test may be +// unnecessary. We'll preserve its structure just in case. +enableShellAllocationMetadataBuilder(function( r, ... d) {}); +setJitCompilerOption("ion.warmup.trigger", 20); +var uceFault = function (i) { + if (i > 98) + uceFault = function (i) { return true; }; +} +var uceFault_str_split = eval(`(${uceFault})`.replace('uceFault', 'uceFault_str_split')) +function rstr_split(i) { + var x = "str01234567899876543210rts".split("" + i); + if (uceFault_str_split(i) || uceFault_str_split(i)) { + } +} +for (i = 0; i < 100; i++) { + rstr_split(i); +} diff --git a/js/src/jit-test/tests/ion/bug1060387.js b/js/src/jit-test/tests/ion/bug1060387.js new file mode 100644 index 0000000000..27d43a8c50 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1060387.js @@ -0,0 +1,12 @@ +function foo() { + var obj = new Object(); + var index = [-0, 2147483648, 1073741825]; + for (var j in index) { + testProperty(index[j]); + } + function testProperty(i) { + obj[i] = '' + i; + } + assertEq(JSON.stringify(obj), '{"0":"0","1073741825":"1073741825","2147483648":"2147483648"}'); +} +foo(); diff --git a/js/src/jit-test/tests/ion/bug1060398.js b/js/src/jit-test/tests/ion/bug1060398.js new file mode 100644 index 0000000000..dc47a92e2f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1060398.js @@ -0,0 +1,16 @@ +function test() { + var c = 0; + for (var i=0; i<20; i++) { + var arr = [1]; + if (i > 5) + Object.defineProperty(arr, "length", { writable: false, value: 4 }); + try { + arr.push(2); + } catch(e) { + assertEq(e.toString().includes("length"), true); + c++; + } + } + assertEq(c, 14); +} +test(); diff --git a/js/src/jit-test/tests/ion/bug1062612.js b/js/src/jit-test/tests/ion/bug1062612.js new file mode 100644 index 0000000000..3df1d1ed68 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1062612.js @@ -0,0 +1,7 @@ +x = [0, 1, 1, 0, 1, 1]; +y = -1; +sum = 0; +for (var j = 0; j < x.length; ++j) { + sum = sum + (x[j] ? 0 : (y >>> 0)) | 0; +} +assertEq(sum, -2); diff --git a/js/src/jit-test/tests/ion/bug1063488.js b/js/src/jit-test/tests/ion/bug1063488.js new file mode 100644 index 0000000000..b6ad1a7106 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1063488.js @@ -0,0 +1,16 @@ + +function foo(a, b) { + var x = b[0]; + for (var i = 0; i < 5; i++) { + a[i + 1] = 0; + x += b[i]; + } + assertEq(x, 2); +} +function bar() { + for (var i = 0; i < 5; i++) { + var arr = [1,2,3,4,5,6]; + foo(arr, arr); + } +} +bar(); diff --git a/js/src/jit-test/tests/ion/bug1063653.js b/js/src/jit-test/tests/ion/bug1063653.js new file mode 100644 index 0000000000..9a0e162ef1 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1063653.js @@ -0,0 +1,10 @@ + +function g(x) { + return (0 > (Math.max(x, x) || x)) +} +function f() { + return g(g() >> 0) +} +for (var k = 0; k < 1; ++k) { + f(); +} diff --git a/js/src/jit-test/tests/ion/bug1064537.js b/js/src/jit-test/tests/ion/bug1064537.js new file mode 100644 index 0000000000..60ddd8ceb2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1064537.js @@ -0,0 +1,17 @@ + +function test(a) { + return (a)?a:0; +} +function test2(a) { + return (a)?0:a; +} + +function isNegativeZero(x) { + return x===0 && (1/x)===-Infinity; +} + +test(0) +assertEq(isNegativeZero(test(-0)), false) +assertEq(isNegativeZero(test(-0)), false) +assertEq(isNegativeZero(test2(-0)), true) +assertEq(isNegativeZero(test2(-0)), true) diff --git a/js/src/jit-test/tests/ion/bug1066659.js b/js/src/jit-test/tests/ion/bug1066659.js new file mode 100644 index 0000000000..05aa1d4a9b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1066659.js @@ -0,0 +1,13 @@ + +function reportCompare (expected, actual) { + var actual_t = typeof actual; + var output = ""; + output += "x" + actual_t + " "; + expected != actual; + output += undefined; +} +gczeal(7,1); +for (var i=0; i<900; i++) { + reportCompare("abc", function() {}); + reportCompare(null, 10); +} diff --git a/js/src/jit-test/tests/ion/bug1070462.js b/js/src/jit-test/tests/ion/bug1070462.js new file mode 100644 index 0000000000..cbbc56c491 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1070462.js @@ -0,0 +1,4 @@ +// |jit-test| error: ReferenceError +with({}) { + let x = x += undefined +} diff --git a/js/src/jit-test/tests/ion/bug1070465.js b/js/src/jit-test/tests/ion/bug1070465.js new file mode 100644 index 0000000000..68946a3383 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1070465.js @@ -0,0 +1,5 @@ +// |jit-test| error: ReferenceError +{ + while (x && 0) {} + let x +} diff --git a/js/src/jit-test/tests/ion/bug1071879.js b/js/src/jit-test/tests/ion/bug1071879.js new file mode 100644 index 0000000000..0c90549c7c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1071879.js @@ -0,0 +1,39 @@ +// Test 1. +function g(f, inputs) { + for (var j = 0; j < 2; j++) { + try { + f(inputs[j]) + } catch (e) {} + } +} +function f(x) { + returnx > 0 ? x && Number.MIN_VALUE >> 0 : x; +}; +g(f, [-Number.E]) + +// Test 2. +function h(x) { + (x && 4294967296 >> 0)() +} +try { + h(Number.MAX_VALUE) + h() +} catch (e) {} + +// Test 3. +var arr = new Float64Array([1, 2, 3, 4, 5, 6, 7, 8, 9, -0]); +for (var i = 0; i < 10; i++) +{ + var el = +arr[i]; + print(String(el ? +0 : el)); +} + +// Test 4. +setIonCheckGraphCoherency() +function j(x) { + x(Math.hypot(x && 0, 4294967296)) +} +try { + j(Infinity) + j() +} catch (e) {} diff --git a/js/src/jit-test/tests/ion/bug1072188.js b/js/src/jit-test/tests/ion/bug1072188.js new file mode 100644 index 0000000000..dc13baf6a3 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1072188.js @@ -0,0 +1,24 @@ + +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 30); +var i; + +var uceFault = function (i) { + if (i > 98) + uceFault = function (i) { return true; }; + return false; +} + +var sqrt5 = Math.sqrt(5); +var phi = (1 + sqrt5) / 2; +function range_analysis_truncate(i) { + var fib = (Math.pow(phi, i) - Math.pow(1 - phi, i)) / sqrt5; + var x = (fib >> 8) * (fib >> 6); + if (uceFault(i) || uceFault(i)) + assertEq(x, (fib >> 8) * (fib >> 6)); + return x | 0; +} + +for (i = 0; i < 100; i++) { + range_analysis_truncate(i); +} diff --git a/js/src/jit-test/tests/ion/bug1072691.js b/js/src/jit-test/tests/ion/bug1072691.js new file mode 100644 index 0000000000..84204bc9f0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1072691.js @@ -0,0 +1,58 @@ +// Testcase 1. +try { + function g(x) { + (x | 0 && 0)() + } + (function(f, s) { + f() + })(g, []) +} catch (e) {} + +// Testcase 2. +function g2(f, inputs) { + for (var j = 0; j < 49; ++j) { + for (var k = 0; k < 49; ++k) { + try { + f() + } catch (e) {} + } + } +} +function f1(x, y) { + (x | 0 ? Number.MAX_VALUE | 0 : x | 0)(); +}; +function f2(y) { + f1(y | 0)(); +}; +g2(f2, [Number]) + +// Testcase 3. +function h(f) { + for (var j = 0; j < 99; ++j) { + for (var k = 0; k < 99; ++k) { + try { + f() + } catch (e) {} + } + } +} +function g3(x) { + (x | 0 ? Number.MAX_VALUE | 0 : x | 0) +} +h(g3, [Number]) + +// Testcase 4. +function m(f) { + f() +} +function g4(x) { + return x ? Math.fround(-Number.MIN_VALUE) : x +} +m(g4) +function h2(M) { + try { + (g4(-0 + M))() + } catch (e) {} +} +m(h2, [Math - Number]) + diff --git a/js/src/jit-test/tests/ion/bug1072911.js b/js/src/jit-test/tests/ion/bug1072911.js new file mode 100644 index 0000000000..44df7268f3 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1072911.js @@ -0,0 +1,14 @@ + +function X () {}; +function Y () {}; +function testCallProtoMethod() { + var a = [new X, new X, __proto__, new Y, new Y]; +} +testCallProtoMethod(); + +function testNot() { + var r; + for (var i = 0; i < 10; ++i) + r = []; +} +testNot(); diff --git a/js/src/jit-test/tests/ion/bug1073702.js b/js/src/jit-test/tests/ion/bug1073702.js new file mode 100644 index 0000000000..bd7d6df8a8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1073702.js @@ -0,0 +1,10 @@ +try { + let x = ((function f(y) { + if (y > 0) { + f(-1) + } + x + })(1)) +} catch (e) { + assertEq(e instanceof ReferenceError, true); +} diff --git a/js/src/jit-test/tests/ion/bug1073861.js b/js/src/jit-test/tests/ion/bug1073861.js new file mode 100644 index 0000000000..fe837c45c7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1073861.js @@ -0,0 +1,69 @@ +function a(a, b, c, g) { + for (;;) { + if (0 > c) return a; + a: { + for (;;) { + var k = a.forward[c]; + if (t(k)) + if (k.key < b) a = k; + else break a; + else break a + } + a = void 0 + } + null != + g && (g[c] = a); + c -= 1 + } +} + +function t(a) { + return null != a && !1 !== a +} + + +var d = {forward: [{},null,{}]} +for (var i=0; i < 1000; i++) { + a(d, 0, 1, null); + a(d, 0, 0, null); +} + + + + +function test(a) { + var t = a[0] + if (t) { + return t.test; + } +} + +function test2(a) { + var t = a[0] + if (t) { + if (t) { + return t.test; + } + } +} + +function test3(a) { + var t = a[0] + if (t !== null) { + if (t !== undefined) { + return t.test; + } + } +} + +var a = [{test:1}] +var b = [undefined] +assertEq(test(b), undefined) +assertEq(test(a), 1) +assertEq(test(a), 1) +assertEq(test2(b), undefined) +assertEq(test2(a), 1) +assertEq(test2(a), 1) +assertEq(test3(b), undefined) +assertEq(test3(a), 1) +assertEq(test3(a), 1) diff --git a/js/src/jit-test/tests/ion/bug1073928.js b/js/src/jit-test/tests/ion/bug1073928.js new file mode 100644 index 0000000000..990103d1fd --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1073928.js @@ -0,0 +1,30 @@ +function f(y) { + var a = Math.fround(-0); + var b = ~Math.hypot(y > 0, 5); + assertEq(a, -0); + assertEq(b, -6); +} +f(-0); +f(1); + +function g(y, z) { + if (z == 0) { + var a = Math.fround(z); + var b = ~Math.hypot(y > 0, 5); + assertEq(a, -0); + assertEq(b, -6); + } +} +g(-0, -0); +g(1, -0); + +function h(y, z) { + if (z == -0) { + var a = Math.fround(z); + var b = ~Math.hypot(y > 0, 5); + assertEq(a, -0); + assertEq(b, -6); + } +} +h(-0, -0); +h(1, -0); diff --git a/js/src/jit-test/tests/ion/bug1074833.js b/js/src/jit-test/tests/ion/bug1074833.js new file mode 100644 index 0000000000..992d6cff8f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1074833.js @@ -0,0 +1,44 @@ + +var i = 0; +function cond() { + return i++ < 20; +} + +function inline() { + ({ b: 1 }) +} + +function f() { + do { + ({ b: 1 }) + } while (cond()) +} + +i = 0; +f(); + +function g() { + do { + if (cond()) { } + ({ b: 1 }) + } while (cond()) +} + +i = 0; +g(); + + +function h() { + do { + inline(); + } while (cond()) +} + +i = 0; +h(); + + +i = 0; +for (i = 0; cond(); i++) + ({ set: Math.w }); + diff --git a/js/src/jit-test/tests/ion/bug1076026.js b/js/src/jit-test/tests/ion/bug1076026.js new file mode 100644 index 0000000000..1bfacef0e0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1076026.js @@ -0,0 +1,9 @@ +(function f() { + let x = (new function() {}) + this.__defineGetter__("x", function() { + ({ + e: x + }) + }) +})(); +print(x) diff --git a/js/src/jit-test/tests/ion/bug1076091.js b/js/src/jit-test/tests/ion/bug1076091.js new file mode 100644 index 0000000000..a00f003c53 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1076091.js @@ -0,0 +1,11 @@ + +Object.defineProperty(this, "x", { + get: function() { + return this.y + } +}) +x +x +y = Int16Array +var y +assertEq(x, Int16Array) diff --git a/js/src/jit-test/tests/ion/bug1076283.js b/js/src/jit-test/tests/ion/bug1076283.js new file mode 100644 index 0000000000..939d6ab663 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1076283.js @@ -0,0 +1,10 @@ +function f() { + assertEq(typeof this, "object"); +} +this.f(); +function gg() { + for (var j = 0; j < 3; ++j) { + f(); + } +}; +gg(); diff --git a/js/src/jit-test/tests/ion/bug1077349.js b/js/src/jit-test/tests/ion/bug1077349.js new file mode 100644 index 0000000000..886e5088a6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1077349.js @@ -0,0 +1,20 @@ + +function boo() { + return foo.arguments[0]; +} + +function foo(a,b,c) { + if (a == 0) { + a ^= 4; + return boo(); + } + + return undefined; +} + +function inlined() { + return foo.apply({}, arguments); +} + +assertEq(inlined(1,2,3), undefined); +assertEq(inlined(0,1,2), 4); diff --git a/js/src/jit-test/tests/ion/bug1077427.js b/js/src/jit-test/tests/ion/bug1077427.js new file mode 100644 index 0000000000..27b0306f85 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1077427.js @@ -0,0 +1,12 @@ + +(function f() { + var i; + var x = 3; + var o1 = { a: x }; + var o2 = { a: 2 }; + for (i = 0; i < 5; i++) + o2.a = x; + Object.preventExtensions({ a: 1 }); + for (i = 0; i < 5; i++) + ; +})(); diff --git a/js/src/jit-test/tests/ion/bug1079062.js b/js/src/jit-test/tests/ion/bug1079062.js new file mode 100644 index 0000000000..f03f1e0524 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1079062.js @@ -0,0 +1,6 @@ +function f(y) { + return ((y ? y : 0) ? 0 : y) +} +m = [0xf] +f(m[0]) +assertEq(f(m[0]), 0) diff --git a/js/src/jit-test/tests/ion/bug1079850.js b/js/src/jit-test/tests/ion/bug1079850.js new file mode 100644 index 0000000000..20309d70d8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1079850.js @@ -0,0 +1,5 @@ +function foo() { + for(__key in null) + var key=startTest(VERSION) ? this : this; + if (key !== undefined) {} +} foo(); diff --git a/js/src/jit-test/tests/ion/bug1080991.js b/js/src/jit-test/tests/ion/bug1080991.js new file mode 100644 index 0000000000..5c9c3783aa --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1080991.js @@ -0,0 +1,5 @@ +(function(){ + for (var i = 0; i < 8; i++) { + var c = i + } +})() diff --git a/js/src/jit-test/tests/ion/bug1085298.js b/js/src/jit-test/tests/ion/bug1085298.js new file mode 100644 index 0000000000..2cac7298f9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1085298.js @@ -0,0 +1,7 @@ +function f(x, y) { + return (y | 0 && x ? y | 0 : 0) +} +m = [1] +assertEq(f(m[0], m[0]), 1) +assertEq(f(m[1], m[0]), 0) +assertEq(f(m[2], m[0]), 0) diff --git a/js/src/jit-test/tests/ion/bug1089761.js b/js/src/jit-test/tests/ion/bug1089761.js new file mode 100644 index 0000000000..b2940b6714 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1089761.js @@ -0,0 +1,14 @@ +var hits = 0; +for (var j = 0; j < 9; ++j) { + try { + (function() { + (function() { + eval("x") + let x + })() + })() + } catch (e) { + hits++; + } +} +assertEq(hits, 9); diff --git a/js/src/jit-test/tests/ion/bug1090037.js b/js/src/jit-test/tests/ion/bug1090037.js new file mode 100644 index 0000000000..a49e1266ee --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1090037.js @@ -0,0 +1,7 @@ +function f(x) { + Math.sin([] | 0 && x) +} +for (var j = 0; j < 1; j++) { + f(1 && 0) +} + diff --git a/js/src/jit-test/tests/ion/bug1090424.js b/js/src/jit-test/tests/ion/bug1090424.js new file mode 100644 index 0000000000..4fd53fe5de --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1090424.js @@ -0,0 +1,55 @@ + +let w +(function() { + testgt1 = function(x) { + return (-0x80000000 >= (x | 0)) +} + testgt2 = function(x) { + return (+0x7fffffff >= (x | 0)) +} + testgt3 = function(x) { + return ((x | 0) >= -0x80000000) +} + testgt4 = function(x) { + return ((x | 0) >= +0x7fffffff) +} + + testlt1 = function(x) { + return (-0x80000000 <= (x | 0)) +} + testlt2 = function(x) { + return (+0x7fffffff <= (x | 0)) +} + testlt3 = function(x) { + return ((x | 0) <= -0x80000000) +} + testlt4 = function(x) { + return ((x | 0) <= +0x7fffffff) +} + +})() +assertEq(testgt1(-0x80000000), true); +assertEq(testgt1(-0x80000000), true); +assertEq(testgt1(0), false); +assertEq(testgt2(0x7fffffff), true); +assertEq(testgt2(0x7fffffff), true); +assertEq(testgt2(0), true); +assertEq(testgt3(-0x80000000), true); +assertEq(testgt3(-0x80000000), true); +assertEq(testgt3(0), true); +assertEq(testgt4(0x7fffffff), true); +assertEq(testgt4(0x7fffffff), true); +assertEq(testgt4(0), false); + +assertEq(testlt1(-0x80000000), true); +assertEq(testlt1(-0x80000000), true); +assertEq(testlt1(0), true); +assertEq(testlt2(0x7fffffff), true); +assertEq(testlt2(0x7fffffff), true); +assertEq(testlt2(0), false); +assertEq(testlt3(-0x80000000), true); +assertEq(testlt3(-0x80000000), true); +assertEq(testlt3(0), false); +assertEq(testlt4(0x7fffffff), true); +assertEq(testlt4(0x7fffffff), true); +assertEq(testlt4(0), true); diff --git a/js/src/jit-test/tests/ion/bug1092833.js b/js/src/jit-test/tests/ion/bug1092833.js new file mode 100644 index 0000000000..64a74fb28f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1092833.js @@ -0,0 +1,49 @@ +// Test that lexicals work with functions with many bindings. + +(function() { + var a01 + var b02 + var c03 + var d04 + var e05 + var f06 + var g07 + var h08 + let i09 + var j10 + var k11 + var l12 + var m13 + var n14 + var o15 + (function n14() { + assertEq(i09, undefined); + })() +})(); + +try { + (function() { + var a01 + var b02 + var c03 + var d04 + var e05 + var f06 + var g07 + var h08 + let i09 + var j10 + var k11 + var l12 + var m13 + var n14 + var o15 + (function n14() { + i12++ + })() + let i12 + })() +} catch (e) { + assertEq(e instanceof ReferenceError, true); + assertEq(e.message.indexOf("i12") > 0, true); +} diff --git a/js/src/jit-test/tests/ion/bug1101576.js b/js/src/jit-test/tests/ion/bug1101576.js new file mode 100644 index 0000000000..354d9c274d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1101576.js @@ -0,0 +1,14 @@ +// Random chosen test: js/src/jit-test/tests/ion/bug928423.js +o = { + a: 1, + b: 1 +} +print(1); +for (var x = 0; x < 2; x++) { + print(2); + o["a1".substr(0, 1)] + o["b1".substr(0, 1)] +} +print(3); +// jsfunfuzz +"a" + "b" diff --git a/js/src/jit-test/tests/ion/bug1101821.js b/js/src/jit-test/tests/ion/bug1101821.js new file mode 100644 index 0000000000..e65e47b8cd --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1101821.js @@ -0,0 +1,89 @@ + +// Makes it easier for fuzzers to get max or min statements with multiple arguments. +function test(a, b, c, d, e, f) { + var r = 0 + r += Math.max(a); + r += Math.max(a,b); + r += Math.max(a,b,c); + r += Math.max(a,b,c,d); + r += Math.max(a,b,c,d,e); + r += Math.max(a,b,c,d,e,f); + r += Math.min(a); + r += Math.min(a,b); + r += Math.min(a,b,c); + r += Math.min(a,b,c,d); + r += Math.min(a,b,c,d,e); + r += Math.min(a,b,c,d,e,f); + return r; +} +for (var i=0; i<10; i++) { + assertEq(test(12,5,32,6,18,2), 186); + assertEq(test(1,5,3,6,18,-10), 48); + assertEq(test(-19,5,20,6,18,1), -48); +} + +// Test max/min result up to 5 arguments. +for (var i=1; i<5; i++) { + var args = []; + for (var j=0; j arr[i]) + min = arr[i] + } + return min +} +function maximum(arr) { + var max = arr[0] + for (var i=1; i>> 0) | 0) >>> 0) | 0, f2()) < -1, !!x); +} +var f2 = function() { }; + +f1(0); +f2 = function() { }; +f1(0); +f1(0); +f1(-1); diff --git a/js/src/jit-test/tests/ion/bug1105684.js b/js/src/jit-test/tests/ion/bug1105684.js new file mode 100644 index 0000000000..fd2670cc8b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1105684.js @@ -0,0 +1,6 @@ +function f(x) { + Math.exp(x ? 0 : 1) +} +f(createIsHTMLDDA()) +f(createIsHTMLDDA()) + diff --git a/js/src/jit-test/tests/ion/bug1106171-sink.js b/js/src/jit-test/tests/ion/bug1106171-sink.js new file mode 100644 index 0000000000..26fb1e27d2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1106171-sink.js @@ -0,0 +1,19 @@ +// |jit-test| --ion-sink=on +// Sink Algorithm should not move instruction into merge blocks +// which have no corresponding pc. + +setJitCompilerOption("ion.warmup.trigger", 30); + +var o = { + a : 40, + b : true +}; + +function f(a, b) { + do { + if (a == 0) + return; + a--; + } while (true || this ? o.a-- : true); +} +f(200000, 0); diff --git a/js/src/jit-test/tests/ion/bug1107011-1.js b/js/src/jit-test/tests/ion/bug1107011-1.js new file mode 100644 index 0000000000..458d7dd12a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1107011-1.js @@ -0,0 +1,17 @@ +var f32 = new Float32Array(32); +function f(n) { + var x; + if (n > 10000) { + x = 4.5; + } else { + x = f32[0]; + } + f32[0] = (function() { + for(var f=0;f<4;++f) { + x=1; + } + })() < x; +} +for (var n = 0; n < 100; n++) + f(n); + diff --git a/js/src/jit-test/tests/ion/bug1107011-2.js b/js/src/jit-test/tests/ion/bug1107011-2.js new file mode 100644 index 0000000000..d59685ea05 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1107011-2.js @@ -0,0 +1,12 @@ +function foo() { + var x = 0, y = 0, a = new Float32Array(1); + function bar() { + x = y; + y = a[0]; + } + for (var i = 0; i < 1000; i++) { + bar(); + } +} +for (var i=0; i < 50; i++) + foo(); diff --git a/js/src/jit-test/tests/ion/bug1113139.js b/js/src/jit-test/tests/ion/bug1113139.js new file mode 100644 index 0000000000..31ae9e384b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1113139.js @@ -0,0 +1,9 @@ +var lfcode = new Array(); +lfcode.push = function(x) { eval("(function() { " + x + " })();"); }; +lfcode.push("\ +function error(str) { try { eval(str); } catch (e) { return e; } }\ +const YIELD_PAREN = error('(function*(){(for (y of (yield 1, 2)) y)})').message;\ +const GENEXP_YIELD = error('(function*(){(for (x of yield 1) x)})').message;\ +const GENERIC = error('(for)').message;\ +const eval = [];\ +"); diff --git a/js/src/jit-test/tests/ion/bug1115665.js b/js/src/jit-test/tests/ion/bug1115665.js new file mode 100644 index 0000000000..0ec96fc620 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1115665.js @@ -0,0 +1,8 @@ +Object.prototype[3] = 3 +x = Array() + function f() { + for (i = 0; i < 9; i++) { + if (Object[x++] != 0) {} + } + } +f() diff --git a/js/src/jit-test/tests/ion/bug1117099.js b/js/src/jit-test/tests/ion/bug1117099.js new file mode 100644 index 0000000000..fdb014a81b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1117099.js @@ -0,0 +1,10 @@ +// |jit-test| error: ReferenceError +function reportCompare (expected, actual, description) { + if (expected != actual) {} +} +reportCompare(1); +addThis(); +function addThis() { + for (var i=0; i>> 0) / 2) >> 0; +} +f(2); +assertEq(f(1), 1); + +function g(x, y) { + var x1 = 0; + var x2 = Math.tan(y); + var t1 = (x1 >>> 0); + var t2 = (x2 >>> 0); + var a = t1 / t2; + var sub = 1 - a; + var e = sub | 0; + return e; +} +g(8, 4) +assertEq(g(1, 0), 0); diff --git a/js/src/jit-test/tests/ion/bug1122839.js b/js/src/jit-test/tests/ion/bug1122839.js new file mode 100644 index 0000000000..02bd090a51 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1122839.js @@ -0,0 +1,11 @@ +x = ''; +Object.defineProperty(this, "y", { + get: function() { + return x + } +}) +y +x = 0 +x = new String; +y.__proto__ = [] +y diff --git a/js/src/jit-test/tests/ion/bug1123011.js b/js/src/jit-test/tests/ion/bug1123011.js new file mode 100644 index 0000000000..a1ced3f5ec --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1123011.js @@ -0,0 +1,8 @@ + +var global = this; +function f() { + return eval("'use strict'; this;"); +} +for (var j = 0; j < 5; ++j) { + assertEq(f(), global); +} diff --git a/js/src/jit-test/tests/ion/bug1123064.js b/js/src/jit-test/tests/ion/bug1123064.js new file mode 100644 index 0000000000..517bb8d46a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1123064.js @@ -0,0 +1,30 @@ + + +function toint32() { + + // The test case to trigger MToNumberInt32 operation. + var ToInteger = getSelfHostedValue("ToInteger"); + + // Case1: The input operand is constant int32. + var result = ToInteger(1); + assertEq(result, 1); + + // Case2: The input operand is constant double. + result = ToInteger(0.12); + assertEq(result, 0); + + // Case3: The input operand is constant float. + result = ToInteger(Math.fround(0.13)); + assertEq(result, 0); + + // Case4: The input operand is constant boolean. + result = ToInteger(true); + assertEq(result, 1); + + // Case5: The input operand is null. + result = ToInteger(null); + assertEq(result, 0); +} + +toint32(); +toint32(); diff --git a/js/src/jit-test/tests/ion/bug1128490.js b/js/src/jit-test/tests/ion/bug1128490.js new file mode 100644 index 0000000000..09963b9b26 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1128490.js @@ -0,0 +1,10 @@ + +for (var i = 0; i < 1000; ++i) { + function isNotEmpty(obj) { + for (var i = 0 ; i < arguments.length; i++) { + minorgc(); + var o = arguments[i]; + } + }; + isNotEmpty([1]); +} diff --git a/js/src/jit-test/tests/ion/bug1129977.js b/js/src/jit-test/tests/ion/bug1129977.js new file mode 100644 index 0000000000..b82fe7961f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1129977.js @@ -0,0 +1,10 @@ +gczeal(11); +function C(a, b) { + this.b=b; +} +evaluate('\ +Object.defineProperty(Object.prototype, "b", {set: function() {}});\ +var f = C.bind(0x2004, 2);\ +'); +for (var i=1; i<5000; ++i) + new f; diff --git a/js/src/jit-test/tests/ion/bug1130679.js b/js/src/jit-test/tests/ion/bug1130679.js new file mode 100644 index 0000000000..adb22aa804 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1130679.js @@ -0,0 +1,29 @@ + +function f(x) { + return x >>> 0 !== Math.imul(1, x >>> 0); +} +f(0) +assertEq(f(-1),true) + +function g(x) { + return 2147483647+x !== Math.imul(1, 2147483647+x); +} +g(0) +assertEq(g(1),true) + +function h(x) { + if (2147483647+x !== Math.imul(1, 2147483647+x)) + return true; + return (2147483647+x)|0 +} +h(0) +assertEq(h(1), true) + +function i2(x) { + return x === x +} +function i(x) { + return i2(0 / Math.sign(x > 0)) +} +i(1) +assertEq(i(-1), false) diff --git a/js/src/jit-test/tests/ion/bug1132128.js b/js/src/jit-test/tests/ion/bug1132128.js new file mode 100644 index 0000000000..b0d8dd1fdd --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1132128.js @@ -0,0 +1,26 @@ +if (getJitCompilerOptions()["ion.warmup.trigger"] > 20) + setJitCompilerOption("ion.warmup.trigger", 20); +function callRegExpTest(i) { + var s = "" + i; + var re = /(\d+)/; + re.test(s); + assertEq(RegExp.$1, s); +} +function callRegExpExec(i) { + var s = "" + i; + var re = /(\d+)/; + var res = re.exec(s); + assertEq(RegExp.$1, s); + return res; +} +function callRegExpReplace(i) { + var s = "" + i; + var re = /(\d+)/; + s.replace(re, ""); + assertEq(RegExp.$1, s); +} +for (var i = 0; i < 60; i++) { + callRegExpTest(i); + callRegExpExec(i); + callRegExpReplace(i); +} diff --git a/js/src/jit-test/tests/ion/bug1132290.js b/js/src/jit-test/tests/ion/bug1132290.js new file mode 100644 index 0000000000..0799d150b7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1132290.js @@ -0,0 +1,10 @@ + +f = function() { + v = new Uint8Array() + function f(x) { + return x + v[0] | 0 + } + return f +}() +assertEq(f(0), 0) +assertEq(f(1), 0) diff --git a/js/src/jit-test/tests/ion/bug1132584.js b/js/src/jit-test/tests/ion/bug1132584.js new file mode 100644 index 0000000000..84bd3f7a00 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1132584.js @@ -0,0 +1,12 @@ +enableOsiPointRegisterChecks() +function f() {} +f.__defineGetter__("x", (function() { + this._ +})) +for (var i = 0; i < 3; i++) { + (function() { + for (var j = 0; j < 1; j++) { + f.x + 1 + } + })() +} diff --git a/js/src/jit-test/tests/ion/bug1132770.js b/js/src/jit-test/tests/ion/bug1132770.js new file mode 100644 index 0000000000..51f6a44d6f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1132770.js @@ -0,0 +1,4 @@ +// |jit-test| error: too much recursion +Object.defineProperty(this, "x", {set: function() { this.x = 2; }}); +setJitCompilerOption("ion.warmup.trigger", 30); +x ^= 1; diff --git a/js/src/jit-test/tests/ion/bug1133530.js b/js/src/jit-test/tests/ion/bug1133530.js new file mode 100644 index 0000000000..b658f41e7e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1133530.js @@ -0,0 +1,18 @@ +// |jit-test| error: InternalError +x = {}; +y = x; +if (x !== y) {} +Object.defineProperty(this, "x", { + get: function() { + Object.defineProperty(this, "y", { + get: function() { + return Proxy(this.y) + } + }); + } +}) +x; +g = newGlobal({newCompartment: true}); +g.parent = this +g.eval("Debugger(parent).onExceptionUnwind=(function(){})") +y; diff --git a/js/src/jit-test/tests/ion/bug1134074.js b/js/src/jit-test/tests/ion/bug1134074.js new file mode 100644 index 0000000000..524f5405af --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1134074.js @@ -0,0 +1,10 @@ + +setJitCompilerOption("ion.warmup.trigger", 30); +function bar(i) { + if (i >= 40) + return; + if ("aaa,bbb,ccc".split(",")[0].length != 3) + throw "???"; + bar(i + 1); +} +bar(0); diff --git a/js/src/jit-test/tests/ion/bug1135047.js b/js/src/jit-test/tests/ion/bug1135047.js new file mode 100644 index 0000000000..5cb6eb8de8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1135047.js @@ -0,0 +1,5 @@ +function j(x) { + return Math.pow(x, x) !== Math.pow(x, x) +} +j(-0) +assertEq(j(-undefined), true) diff --git a/js/src/jit-test/tests/ion/bug1138740.js b/js/src/jit-test/tests/ion/bug1138740.js new file mode 100644 index 0000000000..195717c976 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1138740.js @@ -0,0 +1,12 @@ + +with({}){} +x = new Int8Array(1) +function f(y) { + x[0] = y +} +f() +f(3) +f(7) +x.buffer; +f(0); +assertEq(x[0], 0); diff --git a/js/src/jit-test/tests/ion/bug1139152.js b/js/src/jit-test/tests/ion/bug1139152.js new file mode 100644 index 0000000000..9f3f9503c9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1139152.js @@ -0,0 +1,25 @@ +function toLiteralSource(value) { + if (value === null) { + return 'null'; + } + if (typeof value === 'string') { + return escapeString(value); + } + if (typeof value === 'number') { + return generateNumber(value); + } + if (typeof value === 'boolean') { + return value ? 'true' : 'false'; + } + value.test(); +} + +function test(x) { + var b = x ? true : {}; + return toLiteralSource(b); +} + +var output = true +for (var i=0; i<1000; i++) { + output = test(output) == 'true'; +} diff --git a/js/src/jit-test/tests/ion/bug1139368.js b/js/src/jit-test/tests/ion/bug1139368.js new file mode 100644 index 0000000000..f47dc73db7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1139368.js @@ -0,0 +1,10 @@ +// |jit-test| error: TypeError +function f() { + for (var i=2; i<2; i++) { + var a = /a/; + } + for (var i=0; i<2; i++) { + a.exec("aaa"); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1139376.js b/js/src/jit-test/tests/ion/bug1139376.js new file mode 100644 index 0000000000..28f0c3819b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1139376.js @@ -0,0 +1,13 @@ +// |jit-test| error:ReferenceError + +(function() { + var $10=0; + while (1) { + switch (stack.label & 2) { + case 1: + return $8|0; + case 49: + if ($10) {} + } + } +})()() diff --git a/js/src/jit-test/tests/ion/bug1140890.js b/js/src/jit-test/tests/ion/bug1140890.js new file mode 100644 index 0000000000..f58452a7bb --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1140890.js @@ -0,0 +1,11 @@ +function isNegativeZero(x) { + return x===0 && (1/x)===-Infinity; +} +function f(y) { + return -(0 != 1 / y) - -Math.imul(1, !y) +} +x = [-0, Infinity] +for (var k = 0; k < 2; ++k) { + assertEq(isNegativeZero(f(x[k])), false); +} + diff --git a/js/src/jit-test/tests/ion/bug1143216.js b/js/src/jit-test/tests/ion/bug1143216.js new file mode 100644 index 0000000000..0bc0e9166a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1143216.js @@ -0,0 +1,17 @@ +// Note: This test produces a link error which is required to reproduce the +// original issue. +m = (function(stdlib, n, heap) { + "use asm" + var Float64ArrayView = new stdlib.Float64Array(heap) + var Int16ArrayView = new stdlib.Int16Array(heap) + function f(i0) { + i0 = i0 | 0 + i0 = i0 | 0 + Int16ArrayView[0] = (i0 << 0) + i0 + Float64ArrayView[0] + } + return f +})(this, {}, Array) +for (var j = 0; j < 9; j++) { + m() +} diff --git a/js/src/jit-test/tests/ion/bug1143878.js b/js/src/jit-test/tests/ion/bug1143878.js new file mode 100644 index 0000000000..7860b065ad --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1143878.js @@ -0,0 +1,10 @@ +function f(x, y) { + if (!y) + assertEq(x == x + x, false) +} +m = [true, null] +for (var j = 0; j < 2; ++j) { + for (var k = 0; k < 2; ++k) { + f(m[j], m[k]) + } +} diff --git a/js/src/jit-test/tests/ion/bug1146410.js b/js/src/jit-test/tests/ion/bug1146410.js new file mode 100644 index 0000000000..fd7caafda8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1146410.js @@ -0,0 +1,9 @@ +// |jit-test| error: TypeError +function foo() { + var ws = new WeakSet(); + ws.add({}); + for (var i = 0; i < 10; i++) + ws.add(WeakSet + ""); +} +foo(); +delete Math diff --git a/js/src/jit-test/tests/ion/bug1148883.js b/js/src/jit-test/tests/ion/bug1148883.js new file mode 100644 index 0000000000..3e8e3ae7e1 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1148883.js @@ -0,0 +1,26 @@ +function retThis() { + return this; +} + +var res = (function() { + var x = "678901234567890"; + var g = retThis.bind("123456789012345" + x); + function f() { return g(); } + return f; +})()(); + +// res == new String(...) +assertEq("" + res, "123456789012345678901234567890"); + +function retArg0(a) { + return a; +} + +res = (function() { + var x = "678901234567890"; + var g = retArg0.bind(null, "123456789012345" + x); + function f() { return g(); } + return f; +})()(); + +assertEq(res, "123456789012345678901234567890"); diff --git a/js/src/jit-test/tests/ion/bug1148973-1.js b/js/src/jit-test/tests/ion/bug1148973-1.js new file mode 100644 index 0000000000..201b9466f2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1148973-1.js @@ -0,0 +1,16 @@ +Object.defineProperty(this, "x", { get: decodeURI, configurable: true }) +try { + String(b = new Proxy(function() { }, { + get: function(r, z) { + return x[z] + } + })) +} catch (e) {}; +var log = ""; +evaluate(` +try { + function x() {} + assertEq(String(b), "function () {}"); +} catch (e) { log += "e"; } +`); +assertEq(log, "e"); diff --git a/js/src/jit-test/tests/ion/bug1148973-2.js b/js/src/jit-test/tests/ion/bug1148973-2.js new file mode 100644 index 0000000000..97bbe40855 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1148973-2.js @@ -0,0 +1,8 @@ +var proto = {}; +var obj = Object.create(proto); +Object.defineProperty(proto, "x", { get: decodeURI, configurable: true }); +Object.defineProperty(obj, "z", { get: function () { return this.x; } }); +assertEq(obj.z, "undefined"); + +Object.defineProperty(proto, "x", { get: Math.sin, configurable: false }); +assertEq(obj.z, NaN); diff --git a/js/src/jit-test/tests/ion/bug1151323.js b/js/src/jit-test/tests/ion/bug1151323.js new file mode 100644 index 0000000000..f4c3ecf20c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1151323.js @@ -0,0 +1,8 @@ + +function map_test(cases) { + for (var i = 0; i < cases.length; i++) { + var expected = cases[i].expected; + } +} +map_test([{ input: 8, expected: 1114369}, { input: -1, expected: 0}]); +map_test([{ expected: 16777215}, { expected: 4294967241 }]); diff --git a/js/src/jit-test/tests/ion/bug1154971.js b/js/src/jit-test/tests/ion/bug1154971.js new file mode 100644 index 0000000000..ec49a88fcd --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1154971.js @@ -0,0 +1,10 @@ + + +function f(x, y) { + return Math.imul(0, Math.imul(y | 0, x >> 0)) +} +for (var i = 0; i < 2; i++) { + try { + (f(1 ? 0 : undefined))() + } catch (e) {} +} diff --git a/js/src/jit-test/tests/ion/bug1155807.js b/js/src/jit-test/tests/ion/bug1155807.js new file mode 100644 index 0000000000..7dd3a6de5d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1155807.js @@ -0,0 +1,15 @@ + +for (var i = 0; i < 2; i++) { + setJitCompilerOption("ion.warmup.trigger", 8) + function f(state) { + this.s = state + } + f.prototype.g = function(v, y) { + this.t + } + x = ['', ''] + j = new f(false) + x.filter(j.g, j) + x.filter(j.g, new f(false)) + j.__proto__ = {} +} diff --git a/js/src/jit-test/tests/ion/bug1158632.js b/js/src/jit-test/tests/ion/bug1158632.js new file mode 100644 index 0000000000..b80dd0351d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1158632.js @@ -0,0 +1,13 @@ +for (var j = 0; j < 1; ++j) { + function f(x) { + x = 4294967295 >>> 4294967295 % x + switch (-1) { + case 1: + // case 0: + case -1: + x = 0; + // default: + } + } + f(); +} diff --git a/js/src/jit-test/tests/ion/bug1159899.js b/js/src/jit-test/tests/ion/bug1159899.js new file mode 100644 index 0000000000..10d930f3b9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1159899.js @@ -0,0 +1,5 @@ +function f(x) { + return ~~(x >>> 0) / (x >>> 0) | 0 +} +f(1) +assertEq(f(-1), 0); diff --git a/js/src/jit-test/tests/ion/bug1160884.js b/js/src/jit-test/tests/ion/bug1160884.js new file mode 100644 index 0000000000..7eb301688a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1160884.js @@ -0,0 +1,12 @@ +function foo(date) { + var F = date.split(" "); + var D = F[0].split("-"); + var C = F[1].split(":"); + return new Date(D[0], D[1], D[2], C[0], C[1], C[2]); +} +function test() { + with(this) {}; + for (var i = 0; i < 1200; i++) + foo("13-5-2015 18:30:" + i); +} +test(); diff --git a/js/src/jit-test/tests/ion/bug1165905.js b/js/src/jit-test/tests/ion/bug1165905.js new file mode 100644 index 0000000000..273e655e7d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1165905.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !this.getJitCompilerOptions() || !this.getJitCompilerOptions()['ion.enable'] +load(libdir + "asserts.js"); +var oldOpts = getJitCompilerOptions(); +for (var k in oldOpts) + setJitCompilerOption(k, oldOpts[k]); +var newOpts = getJitCompilerOptions(); +assertDeepEq(oldOpts, newOpts); diff --git a/js/src/jit-test/tests/ion/bug1172498-2.js b/js/src/jit-test/tests/ion/bug1172498-2.js new file mode 100644 index 0000000000..10026fefc7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1172498-2.js @@ -0,0 +1,12 @@ +gczeal(2); +for (var x = 0; x < 99; x++) { + (function() { + return function() { + new function(y) { + return { + e: q => q, function() {} + } + } + } + })()() +} diff --git a/js/src/jit-test/tests/ion/bug1172498.js b/js/src/jit-test/tests/ion/bug1172498.js new file mode 100644 index 0000000000..705cc109b8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1172498.js @@ -0,0 +1,3 @@ +for(var e=1; e<10000; e++) { + new (function (c) { eval("var y"); }); +} diff --git a/js/src/jit-test/tests/ion/bug1181354.js b/js/src/jit-test/tests/ion/bug1181354.js new file mode 100644 index 0000000000..bef39feed6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1181354.js @@ -0,0 +1,9 @@ +for (a of []) {} +var log = ""; +(function() { + for (a of [,0]) {} + const y = "FOO"; + log += y; + function inner() { log += y; } +})() +assertEq(log, "FOO"); diff --git a/js/src/jit-test/tests/ion/bug1185957.js b/js/src/jit-test/tests/ion/bug1185957.js new file mode 100644 index 0000000000..f9ad9c9d7b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1185957.js @@ -0,0 +1,9 @@ +// |jit-test| error: TypeError + +class test { + constructor() {}; +} + +(function() { + test() +})(); diff --git a/js/src/jit-test/tests/ion/bug1186271.js b/js/src/jit-test/tests/ion/bug1186271.js new file mode 100644 index 0000000000..2e1513abb2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1186271.js @@ -0,0 +1,18 @@ +function f(x) { + return Math.imul(1, x >>> 0) / 9 | 0; +} +function g(x) { + return 1 * (x >>> 0) / 9 | 0; +} +function h(x) { + return (x >>> 0) / 9 | 0; +} + +assertEq(0, f(4294967296)); +assertEq(-238609294, f(2147483648)); + +assertEq(0, g(4294967296)); +assertEq(238609294, g(2147483648)); + +assertEq(0, h(4294967296)); +assertEq(238609294, h(2147483648)); diff --git a/js/src/jit-test/tests/ion/bug1188586.js b/js/src/jit-test/tests/ion/bug1188586.js new file mode 100644 index 0000000000..df5f166ba4 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1188586.js @@ -0,0 +1,7 @@ +(function(y) { + for (var k = 0; k < 9; ++k) { + try { + y ** y == a; + } catch (e) {} + } +})(); diff --git a/js/src/jit-test/tests/ion/bug1189137.js b/js/src/jit-test/tests/ion/bug1189137.js new file mode 100644 index 0000000000..27c564195d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1189137.js @@ -0,0 +1,12 @@ + +var arr = []; +for (var i=0; i<2000; i++) + arr.push({amount: i > 1900 ? 1987654321 : 1}); + +function f() { + for (var i=0; i 1900 ? 3975308642 : 1987654322); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1195588.js b/js/src/jit-test/tests/ion/bug1195588.js new file mode 100644 index 0000000000..706788ea55 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1195588.js @@ -0,0 +1,15 @@ +function m(f) { + for (var k = 0; k < 2; ++k) { + try { + f() + } catch (e) {} + } +} +function g(i) { + x +} +m(g) +function h() { + g(Math.sqrt(+((function() {}) < 1))) +} +m(h) diff --git a/js/src/jit-test/tests/ion/bug1195590.js b/js/src/jit-test/tests/ion/bug1195590.js new file mode 100644 index 0000000000..698ba011ca --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1195590.js @@ -0,0 +1,7 @@ +function f(x) { + try { + eval(x); + } catch (e) {} +}; +f("enableGeckoProfilingWithSlowAssertions();"); +f("enableTrackAllocations(); throw Error();"); diff --git a/js/src/jit-test/tests/ion/bug1196589.js b/js/src/jit-test/tests/ion/bug1196589.js new file mode 100644 index 0000000000..2e6c149429 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1196589.js @@ -0,0 +1,9 @@ + +function printStatus (msg) { + var lines = msg.split ("\n"); + for (var i=0; i constructor.f_arg([3, 4, 5], null)) var length = 257751; +let get = () => 4, + hits = new Intl.Proxy([f_arg]), + y = ($ERROR < 1970) ? 1969 : 1970; diff --git a/js/src/jit-test/tests/ion/bug1214050.js b/js/src/jit-test/tests/ion/bug1214050.js new file mode 100644 index 0000000000..7cb214cb0d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1214050.js @@ -0,0 +1,6 @@ +eval(` + with ({}) { + var f = function() {}; + } + function f() {} +`); diff --git a/js/src/jit-test/tests/ion/bug1215600.js b/js/src/jit-test/tests/ion/bug1215600.js new file mode 100644 index 0000000000..abe433a8b4 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1215600.js @@ -0,0 +1,25 @@ +// |jit-test| slow + +lfcode = Array() +lfcode.push("5") +lfcode.push("") +lfcode.push("3") +lfcode.push("oomTest(()=>{gc()})") +for (let i = 0; i < 10; i++) { + file = lfcode.shift() + loadFile(file) +} +function loadFile(lfVarx) { + try { + if (lfVarx.length != 1) + switch (lfRunTypeId) { + case 3: + function newFunc(x) { return Function(x)(); } + newFunc(lfVarx) + case 5: + for (lfLocal in this); + } + isNaN(); + lfRunTypeId = parseInt(lfVarx); + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/ion/bug1215992.js b/js/src/jit-test/tests/ion/bug1215992.js new file mode 100644 index 0000000000..dd20be273d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1215992.js @@ -0,0 +1,6 @@ +// |jit-test| error: ReferenceError +(function() { + const x = ""; + x = y; + return x = z; +})(); diff --git a/js/src/jit-test/tests/ion/bug1216130.js b/js/src/jit-test/tests/ion/bug1216130.js new file mode 100644 index 0000000000..68731389f7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1216130.js @@ -0,0 +1,50 @@ +function Obj1(x) { this.x = x; } +function f1() { + var arr = [], o = {}; + for (var i=0; i<2500; i++) { + arr.push(new Obj1(o)); + if (i < 15) { + arr[i].x = undefined; + arr[i].x = Math; + } + } + for (var i=0; i<2500; i++) { + var y = (i > 2000) ? undefined : o; + arr[i].x = y; + } +} +f1(); + +function f2() { + var arr = [], p = {}; + for (var i=0; i<2500; i++) { + var x = (i < 2000) ? p : undefined; + var o = {x: x}; + if (i < 5) { + o.x = undefined; + o.x = p; + } + arr.push(o); + } + for (var i=0; i<2500; i++) { + assertEq(arr[i].x, i < 2000 ? p : undefined); + } +} +f2(); + +function f3() { + var arr = [], p = {}; + for (var i=0; i<2500; i++) { + var x = (i < 2000) ? p : true; + var o = {x: x}; + if (i < 5) { + o.x = true; + o.x = p; + } + arr.push(o); + } + for (var i=0; i<2500; i++) { + assertEq(arr[i].x, i < 2000 ? p : true); + } +} +f3(); diff --git a/js/src/jit-test/tests/ion/bug1216151.js b/js/src/jit-test/tests/ion/bug1216151.js new file mode 100644 index 0000000000..5f549ef516 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1216151.js @@ -0,0 +1,6 @@ +new function() { + var x = {}; + (function() { + return x; + })(); +} diff --git a/js/src/jit-test/tests/ion/bug1216157.js b/js/src/jit-test/tests/ion/bug1216157.js new file mode 100644 index 0000000000..1ec9497e40 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1216157.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('oomAfterAllocations' in this); allow-oom + +gcslice(0); // Start IGC, but don't mark anything. +function f(str) { + for (var i = 0; i < 10; i++) { + arr = /foo(ba(r))?/.exec(str); + var x = arr[oomAfterAllocations(100)] + " " + arr[1] + " " + 1899; + } +} +try { + f("foo"); +} catch(e) {} diff --git a/js/src/jit-test/tests/ion/bug1218065.js b/js/src/jit-test/tests/ion/bug1218065.js new file mode 100644 index 0000000000..f72febc11f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1218065.js @@ -0,0 +1,25 @@ +function f() { + const b = 0; + switch (1) { + case b = 0: + } +} +var err; +try { + f(); +} catch(e) { + err = e; +} +assertEq(err.name, "TypeError"); + +function g() { + const z = 0; + while (z = 1) {} +} +err = null; +try { + g(); +} catch(e) { + err = e; +} +assertEq(err.name, "TypeError"); diff --git a/js/src/jit-test/tests/ion/bug1219883.js b/js/src/jit-test/tests/ion/bug1219883.js new file mode 100644 index 0000000000..27d65f9c59 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1219883.js @@ -0,0 +1,14 @@ +function test() { + var arr = new Int8Array(400); + var idx = "384"; + arr[idx] = 9; + assertEq(arr[idx], 9); + idx = "1000"; + arr[idx] = 10; + assertEq(arr[idx], undefined); + idx = "-1"; + arr[idx] = 0; + assertEq(arr[idx], undefined); +} +for (var i=0; i<10; i++) + test(); diff --git a/js/src/jit-test/tests/ion/bug1222905.js b/js/src/jit-test/tests/ion/bug1222905.js new file mode 100644 index 0000000000..3e1dc53557 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1222905.js @@ -0,0 +1,14 @@ +for (var i = 0; i < 90; ++i) { + y = {x: 1}; +} + +Object.defineProperty(Object.prototype, "zz", {set: (v) => 1 }); + +function f() { + for (var i=0; i<1500; i++) { + y[0] = 0; + if (i > 1400) + y.zz = 3; + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1222917.js b/js/src/jit-test/tests/ion/bug1222917.js new file mode 100644 index 0000000000..2951b472f9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1222917.js @@ -0,0 +1,6 @@ +function f() { + var x = []; + for (var i=0; i<10; i++) + x.length = x; +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1225367.js b/js/src/jit-test/tests/ion/bug1225367.js new file mode 100644 index 0000000000..4889bb29ab --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1225367.js @@ -0,0 +1,17 @@ +function f() { + var hits = 0; + for (var T of [Float32Array, Float64Array, Float32Array]) { + var arr = new T(1); + try { + arr[0] = Symbol.iterator; + } catch(e) { hits++; } + } + for (var T of [Int32Array, Int16Array, Int8Array]) { + var arr = new T(1); + try { + arr[0] = Symbol.iterator; + } catch(e) { hits++; } + } + assertEq(hits, 6); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1226816.js b/js/src/jit-test/tests/ion/bug1226816.js new file mode 100644 index 0000000000..fc97c9c97d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1226816.js @@ -0,0 +1,11 @@ +// |jit-test| error: InternalError + +x = 1; +x; +function g(y) {} +g(this); +x = /x/; +function f() { + f(x.flags); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1228327.js b/js/src/jit-test/tests/ion/bug1228327.js new file mode 100644 index 0000000000..af9cda58a4 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1228327.js @@ -0,0 +1,14 @@ +for (var i=0; i<2; i++) { + var o = {}; + Object.setPrototypeOf(o, null); + o = Object.create(o); + var p = {}; + Object.setPrototypeOf(p, o); +} +function f() { + for (var i=1; i<20; i++) + p[i] = i; + for (var i=0; i<1500; i++) + assertEq(p[0], undefined); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1228397.js b/js/src/jit-test/tests/ion/bug1228397.js new file mode 100644 index 0000000000..c229251ffa --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1228397.js @@ -0,0 +1,7 @@ +(function() { + f = (function(y) { + return y ? (2147483648 >>> 0) / 1 == -2147483648 : 2147483648; + }) + assertEq(f(0), 2147483648); + assertEq(f(1), false); +})() diff --git a/js/src/jit-test/tests/ion/bug1232859.js b/js/src/jit-test/tests/ion/bug1232859.js new file mode 100644 index 0000000000..4eefa634ee --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1232859.js @@ -0,0 +1,12 @@ +// |jit-test| error:recursion +x = /x/; +z = []; +y = Object.defineProperty(z, "valueOf", { + get: function() { + +y; + for (var i = 0; i < 1; i++) { + a = x.exec(0); + } + } +}) +z + ''; diff --git a/js/src/jit-test/tests/ion/bug1233331.js b/js/src/jit-test/tests/ion/bug1233331.js new file mode 100644 index 0000000000..11b8faafd1 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1233331.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('oomTest' in this) + +x = 0; +try { + a; + b; +} catch (e) {} +var g = newGlobal(); +oomTest(function() { + return Debugger(g); +}); +eval("function g() {}"); diff --git a/js/src/jit-test/tests/ion/bug1233343.js b/js/src/jit-test/tests/ion/bug1233343.js new file mode 100644 index 0000000000..c3144053a8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1233343.js @@ -0,0 +1,36 @@ +function addRemove() { + dbg.addDebuggee(g); + f = dbg.getNewestFrame().older; +} +function removeAdd() { + dbg.addDebuggee(g); + var f = dbg.getNewestFrame(); + while (f) { + f = f.older; + } +} +function testInterrupt() { + g = newGlobal({newCompartment: true}); + dbg = new Debugger; + g.eval("" + function f() { + return g(); + }); + g.eval("" + function g() { + return h(); + }); + g.eval("" + function h() { + for (var i = 0; i < 100; i++) { + interruptIf(5); + } + }); + setInterruptCallback(function() { + toggleSeq(); + return true; + }); + g.f(); +} +toggleSeq = addRemove; +testInterrupt(); +toggleSeq = removeAdd; +testInterrupt(); + diff --git a/js/src/jit-test/tests/ion/bug1239075.js b/js/src/jit-test/tests/ion/bug1239075.js new file mode 100644 index 0000000000..d8e3a8868e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1239075.js @@ -0,0 +1,29 @@ + +function g0() { with({}){}; } +function f0(y, x) { + var a = y >>> 0; + a = a - 1 + 1; + g0(); // Capture the truncate result after the call. + var b = x / 2; // bailout. + return ~(a + b); +} +assertEq(f0(-1, 0), 0); +assertEq(f0(-1, 1), 0); + + +function g1() { with({}){}; } +function f1(y, x) { + var a = y >>> 0; + a = a - 1 + 1; + g1(); // Capture the truncate result after the call. + var b = Math.pow(x / 2, x); // bailout. + return ~(a + b); +} +assertEq(f1(-1, 0), -1); +assertEq(f1(-1, 1), 0); + +function f2(x) { + return ~(((~0 | 0) >>> 0 || 0) + Math.pow(Math.cos(x >>> 0), Math.atan2(0, x))) +} +assertEq(f2(0), -1); +assertEq(f2(-9999), 0); diff --git a/js/src/jit-test/tests/ion/bug1240521.js b/js/src/jit-test/tests/ion/bug1240521.js new file mode 100644 index 0000000000..5955705b7a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1240521.js @@ -0,0 +1,14 @@ +// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this) + +var egc = 138; +function SwitchTest(value) { + switch (value) { + case 0: + break + case new Number: + result = 8 + case oomAfterAllocations(egc): + } +} +!(SwitchTest(4) === 4); +!(SwitchTest(true) === 2); diff --git a/js/src/jit-test/tests/ion/bug1244502.js b/js/src/jit-test/tests/ion/bug1244502.js new file mode 100644 index 0000000000..b0b3943cd5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1244502.js @@ -0,0 +1,12 @@ +function f(arg) { + bailout(); + assertEq(arguments.length, 2); + assertEq(arg, ""); + assertEq(arguments[0], ""); + assertEq(arguments[1], 0); +} +for (var i = 0; i < 100; ++i) { + (function() { + f.call(1, "", 0); + })(); +} diff --git a/js/src/jit-test/tests/ion/bug1246154.js b/js/src/jit-test/tests/ion/bug1246154.js new file mode 100644 index 0000000000..93508bc433 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1246154.js @@ -0,0 +1,5 @@ +setJitCompilerOption('ion.forceinlineCaches', 1); +enableGeckoProfiling(); +(function() { + -[]; +})(); diff --git a/js/src/jit-test/tests/ion/bug1246552.js b/js/src/jit-test/tests/ion/bug1246552.js new file mode 100644 index 0000000000..3a4aa7c8b0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1246552.js @@ -0,0 +1,11 @@ + +var t = 0; +var y = []; +y.toString = (function() { t += 1 }); +function test() { + for (var i = 0; i < 14; i++) { + String.prototype.sup.call(y); + } +} +test(); +assertEq(t, 14); diff --git a/js/src/jit-test/tests/ion/bug1247880.js b/js/src/jit-test/tests/ion/bug1247880.js new file mode 100644 index 0000000000..af5bbf93ad --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1247880.js @@ -0,0 +1,12 @@ +function f(x) { + var a = x; + a = Number ? a | 0 : 0; + a = a >>> 0; + a = Math.imul(0x100000001, a); + a = a % 2; + a = a | 0; + return a; +}; + +assertEq(f(0), 0); +assertEq(f(-1), -1); diff --git a/js/src/jit-test/tests/ion/bug1247909.js b/js/src/jit-test/tests/ion/bug1247909.js new file mode 100644 index 0000000000..2ec956f367 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1247909.js @@ -0,0 +1,12 @@ +// |jit-test| --ion-pruning=on; + +function test() { + foo(startTest("", c(""), + test([{ 0 : c(), 0 : toString("", c(), [], tab([])) }]) + )); + function f() {}; +} + +try { + test(); +} catch(e) {} diff --git a/js/src/jit-test/tests/ion/bug1247915.js b/js/src/jit-test/tests/ion/bug1247915.js new file mode 100644 index 0000000000..c4f977cea9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1247915.js @@ -0,0 +1,7 @@ +// |jit-test| --ion-pruning=on + +evaluate(` + var i = 0; + while (!inIon()) + a = [] ? i: () => 5; +`); diff --git a/js/src/jit-test/tests/ion/bug1254197.js b/js/src/jit-test/tests/ion/bug1254197.js new file mode 100644 index 0000000000..d5ef9c902a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1254197.js @@ -0,0 +1,16 @@ +setJitCompilerOption("ion.warmup.trigger", 1); +function f(x) { + var w = []; + var i = 0; + for (var count = 0; count < 3; count++) { + for (var j = 0; j < 60; j++) { + if (j < 1) { + w[0] = x[i]; + } else { + w[0][0]; + } + } + i = 1; + } +} +f([NaN, 0]); diff --git a/js/src/jit-test/tests/ion/bug1261326.js b/js/src/jit-test/tests/ion/bug1261326.js new file mode 100644 index 0000000000..fb4f43de8f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1261326.js @@ -0,0 +1,11 @@ +x = x = ""; +function Obj1(x) { + this.x = x; +} +function f() { + var o = {}; + for (var i = 0; i < 1500; i++) + new Obj1(o); + Obj1(''); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1264948-1.js b/js/src/jit-test/tests/ion/bug1264948-1.js new file mode 100644 index 0000000000..1070275dce --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1264948-1.js @@ -0,0 +1,9 @@ +// |jit-test| error: ReferenceError + +var N = 70 * 1000; +var x = build("&&")(); +function build(operation) { + var a = []; + for (var i = 1; i != N - 1; ++i) a.push("f()"); + return new Function(a.join(operation)); +} diff --git a/js/src/jit-test/tests/ion/bug1265159.js b/js/src/jit-test/tests/ion/bug1265159.js new file mode 100644 index 0000000000..30d3443f18 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1265159.js @@ -0,0 +1,17 @@ + +var thrown = false; +try { + x = [0]; + for (var i = 0; i < 5; ++i) { + if (i == 3) + Object.freeze(x); + else + x.pop(); + } +} catch (e) { + thrown = true; + assertEq(e instanceof TypeError, true); +} + +assertEq(thrown, true); + diff --git a/js/src/jit-test/tests/ion/bug1269756.js b/js/src/jit-test/tests/ion/bug1269756.js new file mode 100644 index 0000000000..659805f16c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1269756.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(function() { + m = parseModule(`while (x && NaN) prototype; let x`); + moduleLink(m); + moduleEvaluate(m); +}) diff --git a/js/src/jit-test/tests/ion/bug1273858-1.js b/js/src/jit-test/tests/ion/bug1273858-1.js new file mode 100644 index 0000000000..89769ffe58 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1273858-1.js @@ -0,0 +1,53 @@ +// |jit-test| --no-threads + +function t1() { + let x = []; + + for (let k = 0; k < 100; ++k) + x[k] = () => k; // Lexical capture + + try { + eval("k"); + throw false; + } + catch (e) { + if (!(e instanceof ReferenceError)) + throw "Loop index escaped block"; + } + + for (var i = 0; i < 100; ++i) + if (x[i]() != i) + throw "Bad let capture"; +} +t1(); +t1(); +t1(); +t1(); + +function t2() { + let x = []; + let y = {}; + + for (var i = 0; i < 100; ++i) + x[i] = i; + + for (const k of x) + y[k] = () => k; // Lexical capture + + try { + eval("k"); + throw false; + } + catch (e) { + if (!(e instanceof ReferenceError)) + throw "Loop index escaped block"; + } + + for (var i = 0; i < 100; ++i) + if (y[i]() != i) + throw "Bad const capture"; +} +t2(); +t2(); +t2(); +t2(); diff --git a/js/src/jit-test/tests/ion/bug1273858-2.js b/js/src/jit-test/tests/ion/bug1273858-2.js new file mode 100644 index 0000000000..6d274cf02b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1273858-2.js @@ -0,0 +1,46 @@ +// |jit-test| --no-threads + +function t1() { + let x = []; + + try + { + for (let k = 0; k < 100; ++k) + { + let w = () => k; // Lexical capture + + if (w() > 10) + { + throw () => w; // Lexical capture + } + + x[k] = w; + } + } + catch (e) + { + // 'w' and 'k' should leave scope as exception unwinds + + try { + eval("k"); + throw false; + } + catch (e) { + if (!(e instanceof ReferenceError)) + throw "Loop index escaped block"; + } + + try { + eval("w"); + throw false; + } + catch (e) { + if (!(e instanceof ReferenceError)) + throw "Local name escaped block"; + } + } +} +t1(); +t1(); +t1(); +t1(); diff --git a/js/src/jit-test/tests/ion/bug1279898.js b/js/src/jit-test/tests/ion/bug1279898.js new file mode 100644 index 0000000000..756120a6d9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1279898.js @@ -0,0 +1,19 @@ + +function f() { + var i32 = new Int32Array(1); + var f32 = new Float32Array(i32.buffer); + for (var i = 0; i < 3; i++) { + var a0 = +1; + var a3 = +4; + + i32[0] = a0; + var b0 = f32[0]; + + i32[0] = a3; + var b3 = f32[0]; + + assertEq(b0 != b3, true); + } +} + +f(); diff --git a/js/src/jit-test/tests/ion/bug1282944.js b/js/src/jit-test/tests/ion/bug1282944.js new file mode 100644 index 0000000000..e59b659e1e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1282944.js @@ -0,0 +1,18 @@ +// |jit-test| --ion-eager; skip-if: helperThreadCount() === 0 + +// (1) Poison an element in the ionLazyLinkList with a builder whose +// script is in a different compartment. +evaluate(` +offThreadCompileToStencil("var x = -1"); +var stencil = finishOffThreadStencil(); +evalStencil(stencil); +`, + { global: newGlobal() }); + +// (2) Spam the ionLazyLinkList with pending builders until it pops off the one +// for the other compartment's script. +for (var i = 0; i < 1000; ++i) { + offThreadCompileToStencil('var x = ' + i); + var stencil = finishOffThreadStencil(); + evalStencil(stencil); +} diff --git a/js/src/jit-test/tests/ion/bug1284491.js b/js/src/jit-test/tests/ion/bug1284491.js new file mode 100644 index 0000000000..eb8f15619b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1284491.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: !('oomTest' in this) + +loadFile(` + function SwitchTest(){ + switch(value) { + case 0:break + case isNaN: break + } + } + SwitchTest(); +`) +function loadFile(lfVarx) { + oomTest(function() { return eval(lfVarx); }) +} diff --git a/js/src/jit-test/tests/ion/bug1285217.js b/js/src/jit-test/tests/ion/bug1285217.js new file mode 100644 index 0000000000..31943a6d15 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1285217.js @@ -0,0 +1,11 @@ +function f() { + var o = { + x: 1 + }; + for (var i = 0; i < 300; i++) o = Object.create(o); + for (var i = 0; i < 15; i++) { + assertEq(o.x, 1); + eval(o.y, undefined); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1285218.js b/js/src/jit-test/tests/ion/bug1285218.js new file mode 100644 index 0000000000..bb32f0f66a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1285218.js @@ -0,0 +1,27 @@ +function test() { + var a1; var a2; var a3; var a4; var a5; var a6; var a7; var a8; var a9; + var a10; var a11; var a12; var a13; var a14; var a15; var a16; var a17; + var a18; var a19; var a20; var a21; var a22; var a23; var a24; var a25; + var a26; var a27; var a28; var a29; var a30; var a31; var a32; var a33; + var a34; var a35; var a36; var a37; var a38; var a39; var a40; var a41; + var a42; var a43; var a44; var a45; var a46; var a47; var a48; + for ( dbg = 30; dbg >=0; dbg-- ) {} + var a50; var a51; var a52; var a53; var a54; var a55; var a56; var a57; + var a58; var a59; var a60; var a61; var a62; var a63; var a64; var a65; + var a66; var a67; var a68; var a69; + var assertEq = ''; + var a71; var a72; + let onDebuggerStatement; + var a74; var a75; var a76; var a77; var a78; var a79; var a80; var a81; + var a82; var a83; var a84; var a85; var a86; var a87; var a88; var a89; + var a90; var a91; var a92; var a93; var a94; var a95; var a96; var a97; + var a98; var a99; var a100; var a101; var a102; var a103; var a104; var a105; + var a106; var a107; var a108; var a109; var a110; var a111; var a112; + if(a111 !== a2) + var a114; + var a115; var a116; var a117; var a120; var a121; var a122; var a123; + var a124; var a125; + for (var a126 = 1; a126 < ([1,2,3]).length -1; ++a126) 1; +} + +test(); diff --git a/js/src/jit-test/tests/ion/bug1287416.js b/js/src/jit-test/tests/ion/bug1287416.js new file mode 100644 index 0000000000..5fad180288 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1287416.js @@ -0,0 +1,3 @@ +for (var i = 0; i < 1; i++) { + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".split("x"); +}; diff --git a/js/src/jit-test/tests/ion/bug1293542.js b/js/src/jit-test/tests/ion/bug1293542.js new file mode 100644 index 0000000000..38c27125e4 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1293542.js @@ -0,0 +1,11 @@ + +try { eval("3 ** 4") } catch (e) { + if (!(e instanceof SyntaxError)) + throw e; + quit(); +} + +var f = new Function("x", "return (x ** (1 / ~4294967297)) && x"); +for (var i = 0; i < 2; ++i) { + assertEq(f(-Infinity), 0); +} diff --git a/js/src/jit-test/tests/ion/bug1296667.js b/js/src/jit-test/tests/ion/bug1296667.js new file mode 100644 index 0000000000..4ad8cc70ea --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1296667.js @@ -0,0 +1,12 @@ +args = "" +for (i = 0; i < 2000; i++) { + args += "arg" + i; + if (i != 1999) args += ","; +} +MyFunc = MyObject = Function(args, "for (var i = 0; i < MyFunc.length; i++ ) break; eval('this.arg'+i +'=arg'+i) "); +new function TestCase() { + if (inIon()) + return; + for (var i=0; i<10; i++) {} + TestCase(eval("var EXP_1 = new MyObject; var EXP_2 = new MyObject; EXP_1 - EXP_2")); +} diff --git a/js/src/jit-test/tests/ion/bug1298354.js b/js/src/jit-test/tests/ion/bug1298354.js new file mode 100644 index 0000000000..3a11826e4a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1298354.js @@ -0,0 +1,19 @@ +// |jit-test| error: ReferenceError; --ion-warmup-threshold=50 +setJitCompilerOption("offthread-compilation.enable", 0); +gcPreserveCode(); + +new Function(` + while (true) { + try { + var buf = new Uint8ClampedArray(-1); + } catch (e) { + break; + } + } + var caughtInvalidArguments = false; + while (true) { + var a = inIon() ? -true.get : 0; + while (x > 7 & 0) {} + } +`)(); + diff --git a/js/src/jit-test/tests/ion/bug1299007.js b/js/src/jit-test/tests/ion/bug1299007.js new file mode 100644 index 0000000000..6c82a95264 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1299007.js @@ -0,0 +1,41 @@ + +evalInFrame = function(global) { + dbgGlobal = newGlobal({newCompartment: true}) + dbg = new dbgGlobal.Debugger + return function(upCount, code) { + dbg.addDebuggee(global) + var frame = dbg.getNewestFrame().older + for (var i = 0; i < upCount; i++) + if (!frame) frame = older + completion = frame.eval(code) + } +}(this); +function h() { + evalInFrame(0, "") + evalInFrame(0, "i") + evalInFrame(0, "a.push") + evalInFrame(1, "a.pushy") +} +function g() { return h(); } +function f() { return g(); } +f() +evaluate(` +g() +g() +g() +g() +g() +g() +g() +g() +g() +g() +g() +g() +g() +g() +g() +g() +g() +h() +`); diff --git a/js/src/jit-test/tests/ion/bug1304640.js b/js/src/jit-test/tests/ion/bug1304640.js new file mode 100644 index 0000000000..6de29f8528 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1304640.js @@ -0,0 +1,10 @@ + +function f() { + return /x/; +} +function g() { + return (f() == f()); +} +for (var i = 0; i < 2; ++i) { + assertEq(g(), false); +} diff --git a/js/src/jit-test/tests/ion/bug1304643.js b/js/src/jit-test/tests/ion/bug1304643.js new file mode 100644 index 0000000000..40bf37d38e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1304643.js @@ -0,0 +1,7 @@ + +var x = Object.create(this); +var y = '1'; +for (var i = 0; i < 3; ++i) { + y += x.y; +} +assertEq(y, "11111111"); diff --git a/js/src/jit-test/tests/ion/bug1308802.js b/js/src/jit-test/tests/ion/bug1308802.js new file mode 100644 index 0000000000..eafe3c697c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1308802.js @@ -0,0 +1,8 @@ + +function test() { + for (var i = 0; i < 2; ++i) { + assertEq(Math.max(-0), -0); + } +} +test(); + diff --git a/js/src/jit-test/tests/ion/bug1311061.js b/js/src/jit-test/tests/ion/bug1311061.js new file mode 100644 index 0000000000..b852248bf1 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1311061.js @@ -0,0 +1,5 @@ +// |jit-test| error:TypeError +function f() { + with(this) {}; +} +(new new Proxy(f, {get: f}))(); diff --git a/js/src/jit-test/tests/ion/bug1314438.js b/js/src/jit-test/tests/ion/bug1314438.js new file mode 100644 index 0000000000..bda1c7a2d7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1314438.js @@ -0,0 +1,6 @@ + +function g(x) { + return (-1 % x && Math.cos(8) >>> 0); +} +g(2); +assertEq(Object.is(g(-1), -0), true); diff --git a/js/src/jit-test/tests/ion/bug1314545.js b/js/src/jit-test/tests/ion/bug1314545.js new file mode 100644 index 0000000000..f833a8ae73 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1314545.js @@ -0,0 +1,31 @@ +function f() { + Object.prototype[0] = 10; + + var arr = []; + for (var i=3; i<20; i++) { + arr[0] = i; + Object.freeze(arr); + while (!inIon()) {} + } + assertEq(arr[0], 3); +} +f(); + +function g() { + var c = 0; + Object.defineProperty(Object.prototype, 18, {set: function() { c++; }}); + + var arrays = []; + for (var i=0; i<2; i++) + arrays.push([1, 2]); + + for (var i=0; i<20; i++) { + arrays[0][i] = 1; + arrays[1][i] = 2; + if (i === 0) + Object.freeze(arrays[0]); + while (!inIon()) {} + } + assertEq(c, 2); +} +g(); diff --git a/js/src/jit-test/tests/ion/bug1317943.js b/js/src/jit-test/tests/ion/bug1317943.js new file mode 100644 index 0000000000..10b36d3681 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1317943.js @@ -0,0 +1,14 @@ +"use strict"; +function test() { + for (var i=0; i<10; i++) { + try { + var arr = []; + arr[0] = 1; + Object.freeze(arr); + arr[0] = 2; + } catch (e) { + assertEq(e.toString().includes("TypeError: 0 is read-only"), true); + } + } +} +test(); diff --git a/js/src/jit-test/tests/ion/bug1318634.js b/js/src/jit-test/tests/ion/bug1318634.js new file mode 100644 index 0000000000..58448bb170 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1318634.js @@ -0,0 +1,20 @@ +var o1 = {get x() { return 1; }}; +var o2 = {get x() { return 2; }}; +var o3 = Object.create(o1); + +function f(o) { + return o.x; +} + +var res = 0; +for (var i=0; i<15; i++) { + res += f(o3); + res += f(o2); +} + +o1.y = 1; + +for (var i=0; i<110; i++) + res += f(o2); + +assertEq(res, 265); diff --git a/js/src/jit-test/tests/ion/bug1321437.js b/js/src/jit-test/tests/ion/bug1321437.js new file mode 100644 index 0000000000..98a60e9094 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1321437.js @@ -0,0 +1,14 @@ +function f(idx) { + "use strict"; + let z = [0, 1, 2, 3, 4, 5, 6, 7, 8, , , ]; + Object.freeze(z); + try { + z[idx] = 0; + } catch (e) { + return e.message; + } +} +assertEq(f(4), "4 is read-only"); +assertEq(f(-1), 'can\'t define property "-1": Array is not extensible'); +assertEq(f(9), "can't define property 9: Array is not extensible"); +assertEq(f(0xffffffff), 'can\'t define property "4294967295": Array is not extensible'); diff --git a/js/src/jit-test/tests/ion/bug1322932.js b/js/src/jit-test/tests/ion/bug1322932.js new file mode 100644 index 0000000000..0de9737eef --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1322932.js @@ -0,0 +1,12 @@ +// |jit-test| error: ReferenceError + +(function() { + for (var i = 0; i < 4; ++i) { + if (i % 3 == 0) { + for (var x in y) {} + } else { + continue; + } + } +})() + diff --git a/js/src/jit-test/tests/ion/bug1323854.js b/js/src/jit-test/tests/ion/bug1323854.js new file mode 100644 index 0000000000..7021d6a6d9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1323854.js @@ -0,0 +1,15 @@ + +g = (function () { + "use asm"; + function f(i0, d1) { + d1 = 4258326539 >>> 0; + switch (-8 && i0) { + case -1: + d1 = 0; + case 0: + } + } + return f; +})(); +g(); +g(); diff --git a/js/src/jit-test/tests/ion/bug1324521.js b/js/src/jit-test/tests/ion/bug1324521.js new file mode 100644 index 0000000000..38f9162fa2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1324521.js @@ -0,0 +1,6 @@ +function f() { + var args = arguments; + var i = 0; + while (!inIon()) args[i]; +}; +f(); diff --git a/js/src/jit-test/tests/ion/bug1326150.js b/js/src/jit-test/tests/ion/bug1326150.js new file mode 100644 index 0000000000..3c9047c983 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1326150.js @@ -0,0 +1,4 @@ +this.x = []; +Function.apply(null, this.x); +Object.defineProperty(this, "x", {get: valueOf}); +assertEq(evaluate("this.x;"), this); diff --git a/js/src/jit-test/tests/ion/bug1329933.js b/js/src/jit-test/tests/ion/bug1329933.js new file mode 100644 index 0000000000..582044feee --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1329933.js @@ -0,0 +1,10 @@ + +function g(f) { + for (var j = 0; j < 999; ++j) { + f(0 / 0); + } +} +function h(x) { + x < 1 ? 0 : Math.imul(x || 0); +} +g(h); diff --git a/js/src/jit-test/tests/ion/bug1330662.js b/js/src/jit-test/tests/ion/bug1330662.js new file mode 100644 index 0000000000..f181c4f3af --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1330662.js @@ -0,0 +1,8 @@ +// |jit-test| --ion-warmup-threshold=50 +setJitCompilerOption("offthread-compilation.enable", 0); +gcPreserveCode(); + +for (i=0;i<10000;++i) { + a = inIon() ? 0 : 300; + buf = new Uint8ClampedArray(a); +} diff --git a/js/src/jit-test/tests/ion/bug1331058.js b/js/src/jit-test/tests/ion/bug1331058.js new file mode 100644 index 0000000000..ffb8f29196 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1331058.js @@ -0,0 +1,29 @@ +function foo(o, trigger) { + bar = function() { return o.getY(); }; + if (trigger) + assertEq(bar(), undefined); + return 1; +} +function O(o, trigger) { + this.a1 = 1; + this.a2 = 2; + this.a3 = 3; + this.a4 = 4; + this.x = foo(this, trigger); +} +O.prototype.getY = function() { + return this.x; +} +function test() { + with(this) {}; // No Ion. + var arr = []; + for (var i=0; i<100; i++) + arr.push(new O({y: i}, false)); + + for (var i=0; i<100; i++) + bar(); + + for (var i=0; i<300; i++) + arr.push(new O({y: i}, true)); +} +test(); diff --git a/js/src/jit-test/tests/ion/bug1331350.js b/js/src/jit-test/tests/ion/bug1331350.js new file mode 100644 index 0000000000..ea83bfa4fe --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1331350.js @@ -0,0 +1,56 @@ +// |jit-test| --ion-eager +function optimize(a, b) { + a = a | 0; + b = b | 0; + + if ((a & 3) === 0) { + a = a + 1 | 0 + } + + if ((a & 7) !== 0) { + a = a + 1 | 0 + } + + return a + b | 0 +} + +for (var i=0; i<20; i++) { + assertEq(optimize(4 | 0, 6 | 0), 12); + assertEq(optimize(7 | 0, 11 | 0), 19); +} + +function not_optimizable(a, b) { + a = a | 0; + b = b | 0; + + if ((a & 3) > 0) { + a = a + 1 | 0 + } + + if ((a & 3) >= 0) { + a = a + 1 | 0 + } + + if ((a & 7) < 0) { + a = a + 1 | 0 + } + + if ((a & 7) <= 0) { + a = a + 1 | 0 + } + + if ((b & 3) === 1) { + b = b + 1 | 0 + } + + if ((b & 7) !== 3) { + b = b + 1 | 0 + } + + return a + b | 0 +} + +for (var i=0; i<20; i++) { + assertEq(not_optimizable(4 | 0, 6 | 0), 12); + assertEq(not_optimizable(7 | 0, 11 | 0), 20); +} diff --git a/js/src/jit-test/tests/ion/bug1331405.js b/js/src/jit-test/tests/ion/bug1331405.js new file mode 100644 index 0000000000..e10b96347b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1331405.js @@ -0,0 +1,4 @@ +// |jit-test| error:ReferenceError + +++f(); +try {} catch (e) {} diff --git a/js/src/jit-test/tests/ion/bug1333946.js b/js/src/jit-test/tests/ion/bug1333946.js new file mode 100644 index 0000000000..1fa1b9c491 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1333946.js @@ -0,0 +1,8 @@ +// |jit-test| error: 42; + +for (var x of [0]) { + for (var i = 0; ; i++) { + if (i === 20000) + throw 42; + } +} diff --git a/js/src/jit-test/tests/ion/bug1334314.js b/js/src/jit-test/tests/ion/bug1334314.js new file mode 100644 index 0000000000..488fc90274 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1334314.js @@ -0,0 +1,16 @@ +// |jit-test| error: TypeError + +var g = newGlobal(); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () { };"); + +function f() { + [[]] = []; +} +try { + f(); +} catch (e) {}; +try { + f(); +} catch (e) {}; +f(); diff --git a/js/src/jit-test/tests/ion/bug1342483-1.js b/js/src/jit-test/tests/ion/bug1342483-1.js new file mode 100644 index 0000000000..85c3cb48e6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1342483-1.js @@ -0,0 +1,6 @@ +// |jit-test| error: ReferenceError +for (var i = 0; i < 10; ++i) {} +for (var i = 0; i < 3; i++) { + throw eval(raisesException); + function ff() {} +} diff --git a/js/src/jit-test/tests/ion/bug1342483-2.js b/js/src/jit-test/tests/ion/bug1342483-2.js new file mode 100644 index 0000000000..1d5b808b04 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1342483-2.js @@ -0,0 +1,17 @@ +// |jit-test| error: () => g +function f() { + // Block Scope + { + // Lexical capture creates environment + function g() {} + var h = [() => g]; + + // OSR Re-Entry Point + for (;;) { break; } + + // Type Invalidation + Throw + throw h[0]; + } +} + +f(); diff --git a/js/src/jit-test/tests/ion/bug1342882.js b/js/src/jit-test/tests/ion/bug1342882.js new file mode 100644 index 0000000000..ff1fe001a0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1342882.js @@ -0,0 +1,3 @@ +// |jit-test| error: ReferenceError + +for (let [k, map = send.log += "" + map] of map) {} diff --git a/js/src/jit-test/tests/ion/bug1345160.js b/js/src/jit-test/tests/ion/bug1345160.js new file mode 100644 index 0000000000..e365ea3158 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1345160.js @@ -0,0 +1,9 @@ +function f() { + var o = [1, 2, 3]; + o.constructor = function() { + return new Uint8Array(3); + }; + for (var i=0; i<10; i++) + o.filter(x => true); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1352510.js b/js/src/jit-test/tests/ion/bug1352510.js new file mode 100644 index 0000000000..5c5e0e20af --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1352510.js @@ -0,0 +1,8 @@ +function maybeSetLength(arr, b) { + if (b) arr.length = 0x7fffffff; +} +var arr = []; +for (var i = 0; i < 2000; i++) { + maybeSetLength(arr, i > 1500); + var res = arr.push((0.017453)); +} diff --git a/js/src/jit-test/tests/ion/bug1354275.js b/js/src/jit-test/tests/ion/bug1354275.js new file mode 100644 index 0000000000..3d8d74af46 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1354275.js @@ -0,0 +1,16 @@ +// --ion-eager --ion-offthread-compile=off + +function f(t) { + for (var i = 0; i < 2; i++) { + try { + var x = 1; + Array(1); + x = 2; + Array(t); + } catch (e) { + assertEq(x, 2); + } + } +} +f(1); +f(-1); diff --git a/js/src/jit-test/tests/ion/bug1356822.js b/js/src/jit-test/tests/ion/bug1356822.js new file mode 100644 index 0000000000..0788933810 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1356822.js @@ -0,0 +1,15 @@ +const d = 0; +function f() { + var m = Math; + (function () { + d = m; + })() +} +for (var i = 0; i < 4; i++) { + try { + f(); + } catch (e) { + continue; + } + throw "Fail"; +} diff --git a/js/src/jit-test/tests/ion/bug1365518.js b/js/src/jit-test/tests/ion/bug1365518.js new file mode 100644 index 0000000000..30dc060c96 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1365518.js @@ -0,0 +1,13 @@ +function init() { + foo = () => 1; + bar = () => 2; + foo.__proto__ = function() {}; +} +function test() { + var arr = [foo, bar]; + for (var i = 0; i < 1300; i++) { + assertEq(arr[i % 2](), i % 2 + 1); + } +} +init(); +test(); diff --git a/js/src/jit-test/tests/ion/bug1365769-1.js b/js/src/jit-test/tests/ion/bug1365769-1.js new file mode 100644 index 0000000000..a586d0f1de --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1365769-1.js @@ -0,0 +1,16 @@ +// --ion-eager --ion-offthread-compile=off + +function f(t) { + for (var i = 0; i < 2; i++) { + try { + var x = 1; + new String(); // Creates a snapshot + x = 2; + new String(t); // Throws TypeError + } catch (e) { + assertEq(x, 2); + } + } +} + +f(Symbol()); diff --git a/js/src/jit-test/tests/ion/bug1365769-2.js b/js/src/jit-test/tests/ion/bug1365769-2.js new file mode 100644 index 0000000000..4999ad87ba --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1365769-2.js @@ -0,0 +1,16 @@ +// --ion-eager --ion-offthread-compile=off + +function f(t) { + for (var i = 0; i < 2; i++) { + try { + var x = 1; + new String(); + x = 2; + `${t}`; // Throws a TypeError + } catch (e) { + assertEq(x, 2); + } + } +} + +f(Symbol()); diff --git a/js/src/jit-test/tests/ion/bug1368360-1.js b/js/src/jit-test/tests/ion/bug1368360-1.js new file mode 100644 index 0000000000..9df4a0a06b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1368360-1.js @@ -0,0 +1,9 @@ +// |jit-test| error: ReferenceError +var t = {}; +function r(y) { return t.y = y; } +function g() { + for (let [x = r(x)] of x) {} +} +r(0); +r(0); +g(); diff --git a/js/src/jit-test/tests/ion/bug1368360-2.js b/js/src/jit-test/tests/ion/bug1368360-2.js new file mode 100644 index 0000000000..ff617fb76b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1368360-2.js @@ -0,0 +1,9 @@ +// |jit-test| error: ReferenceError +var t = {}; +function r(y) { return t.y = y; } +function g() { + for (let [x = r(x)] in x) {} +} +r(0); +r(0); +g(); diff --git a/js/src/jit-test/tests/ion/bug1370922.js b/js/src/jit-test/tests/ion/bug1370922.js new file mode 100644 index 0000000000..c8dc6d7577 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1370922.js @@ -0,0 +1,34 @@ +function f(y) { + return Math.min(0, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, + 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, + 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, + 6, 7, 8, 9); +} + +function g() { + return f({}); +} + +x = 0 + +for (var j = 0; j < 3000; j++) { + g([j]); + + if (inIon()) + break; +} diff --git a/js/src/jit-test/tests/ion/bug1379936.js b/js/src/jit-test/tests/ion/bug1379936.js new file mode 100644 index 0000000000..61d45bccd1 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1379936.js @@ -0,0 +1,6 @@ +assertEq("".replace(/x/), ""); +(function () { + for (var i = 0; i < 2000; ++i) { + assertEq(/[^]/g.exec("abc")[0], "a"); + } +})() diff --git a/js/src/jit-test/tests/ion/bug1383591.js b/js/src/jit-test/tests/ion/bug1383591.js new file mode 100644 index 0000000000..f80b6c9e8d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1383591.js @@ -0,0 +1,20 @@ +function test() { + var count = 0; + function f(x) { + "use strict"; + if (x) { + Object.seal(this); + } + this[0] = 1; + } + for (var y of [1, 0, arguments, 1]) { + try { + var o = new f(y); + } catch (e) { + count++; + } + } + assertEq(count, 3); +} +test(); +test(); diff --git a/js/src/jit-test/tests/ion/bug1383972.js b/js/src/jit-test/tests/ion/bug1383972.js new file mode 100644 index 0000000000..116972766b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1383972.js @@ -0,0 +1,92 @@ +// |jit-test| --ion-limit-script-size=off; error:ReferenceError + +function f() { + for (var i = 0; i < 1; i++) { + let x00, x01, x02, x03, x04, x05, x06, x07, x08, x09, x0A, x0B, x0C, x0D, x0E, x0F, + x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x1A, x1B, x1C, x1D, x1E, x1F, + x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x2A, x2B, x2C, x2D, x2E, x2F, + x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x3A, x3B, x3C, x3D, x3E, x3F, + x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x4A, x4B, x4C, x4D, x4E, x4F, + x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x5A, x5B, x5C, x5D, x5E, x5F, + x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x6A, x6B, x6C, x6D, x6E, x6F, + x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x7A, x7B, x7C, x7D, x7E, x7F, + x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x8A, x8B, x8C, x8D, x8E, x8F, + x90, x91, x92, x93, x94, x95, x96, x97, x98, x99, x9A, x9B, x9C, x9D, x9E, x9F, + xA0, xA1, xA2, xA3, xA4, xA5, xA6, xA7, xA8, xA9, xAA, xAB, xAC, xAD, xAE, xAF, + xB0, xB1, xB2, xB3, xB4, xB5, xB6, xB7, xB8, xB9, xBA, xBB, xBC, xBD, xBE, xBF, + xC0, xC1, xC2, xC3, xC4, xC5, xC6, xC7, xC8, xC9, xCA, xCB, xCC, xCD, xCE, xCF, + xD0, xD1, xD2, xD3, xD4, xD5, xD6, xD7, xD8, xD9, xDA, xDB, xDC, xDD, xDE, xDF, + xE0, xE1, xE2, xE3, xE4, xE5, xE6, xE7, xE8, xE9, xEA, xEB, xEC, xED, xEE, xEF, + xF0, xF1, xF2, xF3, xF4, xF5, xF6, xF7, xF8, xF9, xFA, xFB, xFC, xFD, xFE, xFF; + let y00, y01, y02, y03, y04, y05, y06, y07, y08, y09, y0A, y0B, y0C, y0D, y0E, y0F, + y10, y11, y12, y13, y14, y15, y16, y17, y18, y19, y1A, y1B, y1C, y1D, y1E, y1F, + y20, y21, y22, y23, y24, y25, y26, y27, y28, y29, y2A, y2B, y2C, y2D, y2E, y2F, + y30, y31, y32, y33, y34, y35, y36, y37, y38, y39, y3A, y3B, y3C, y3D, y3E, y3F, + y40, y41, y42, y43, y44, y45, y46, y47, y48, y49, y4A, y4B, y4C, y4D, y4E, y4F, + y50, y51, y52, y53, y54, y55, y56, y57, y58, y59, y5A, y5B, y5C, y5D, y5E, y5F, + y60, y61, y62, y63, y64, y65, y66, y67, y68, y69, y6A, y6B, y6C, y6D, y6E, y6F, + y70, y71, y72, y73, y74, y75, y76, y77, y78, y79, y7A, y7B, y7C, y7D, y7E, y7F, + y80, y81, y82, y83, y84, y85, y86, y87, y88, y89, y8A, y8B, y8C, y8D, y8E, y8F, + y90, y91, y92, y93, y94, y95, y96, y97, y98, y99, y9A, y9B, y9C, y9D, y9E, y9F, + yA0, yA1, yA2, yA3, yA4, yA5, yA6, yA7, yA8, yA9, yAA, yAB, yAC, yAD, yAE, yAF, + yB0, yB1, yB2, yB3, yB4, yB5, yB6, yB7, yB8, yB9, yBA, yBB, yBC, yBD, yBE, yBF, + yC0, yC1, yC2, yC3, yC4, yC5, yC6, yC7, yC8, yC9, yCA, yCB, yCC, yCD, yCE, yCF, + yD0, yD1, yD2, yD3, yD4, yD5, yD6, yD7, yD8, yD9, yDA, yDB, yDC, yDD, yDE, yDF, + yE0, yE1, yE2, yE3, yE4, yE5, yE6, yE7, yE8, yE9, yEA, yEB, yEC, yED, yEE, yEF, + yF0, yF1, yF2, yF3, yF4, yF5, yF6, yF7, yF8, yF9, yFA, yFB, yFC, yFD, yFE, yFF; + + if (b()) { + x00 = x01 = x02 = x03 = x04 = x05 = x06 = x07 = a(); + x08 = x09 = x0A = x0B = x0C = x0D = x0E = x0F = a(); + x10 = x11 = x12 = x13 = x14 = x15 = x16 = x17 = a(); + x18 = x19 = x1A = x1B = x1C = x1D = x1E = x1F = a(); + x20 = x21 = x22 = x23 = x24 = x25 = x26 = x27 = a(); + x28 = x29 = x2A = x2B = x2C = x2D = x2E = x2F = a(); + x30 = x31 = x32 = x33 = x34 = x35 = x36 = x37 = a(); + x38 = x39 = x3A = x3B = x3C = x3D = x3E = x3F = a(); + x40 = x41 = x42 = x43 = x44 = x45 = x46 = x47 = a(); + x48 = x49 = x4A = x4B = x4C = x4D = x4E = x4F = a(); + x50 = x51 = x52 = x53 = x54 = x55 = x56 = x57 = a(); + x58 = x59 = x5A = x5B = x5C = x5D = x5E = x5F = a(); + x60 = x61 = x62 = x63 = x64 = x65 = x66 = x67 = a(); + x68 = x69 = x6A = x6B = x6C = x6D = x6E = x6F = a(); + x70 = x71 = x72 = x73 = x74 = x75 = x76 = x77 = a(); + x78 = x79 = x7A = x7B = x7C = x7D = x7E = x7F = a(); + x80 = x81 = x82 = x83 = x84 = x85 = x86 = x87 = a(); + x88 = x89 = x8A = x8B = x8C = x8D = x8E = x8F = a(); + x90 = x91 = x92 = x93 = x94 = x95 = x96 = x97 = a(); + x98 = x99 = x9A = x9B = x9C = x9D = x9E = x9F = a(); + xA0 = xA1 = xA2 = xA3 = xA4 = xA5 = xA6 = xA7 = a(); + xA8 = xA9 = xAA = xAB = xAC = xAD = xAE = xAF = a(); + xB0 = xB1 = xB2 = xB3 = xB4 = xB5 = xB6 = xB7 = a(); + xB8 = xB9 = xBA = xBB = xBC = xBD = xBE = xBF = a(); + xC0 = xC1 = xC2 = xC3 = xC4 = xC5 = xC6 = xC7 = a(); + xC8 = xC9 = xCA = xCB = xCC = xCD = xCE = xCF = a(); + xD0 = xD1 = xD2 = xD3 = xD4 = xD5 = xD6 = xD7 = a(); + xD8 = xD9 = xDA = xDB = xDC = xDD = xDE = xDF = a(); + xE0 = xE1 = xE2 = xE3 = xE4 = xE5 = xE6 = xE7 = a(); + xE8 = xE9 = xEA = xEB = xEC = xED = xEE = xEF = a(); + xF0 = xF1 = xF2 = xF3 = xF4 = xF5 = xF6 = xF7 = a(); + xF8 = xF9 = xFA = xFB = xFC = xFD = xFE = xFF = a(); + } + + foo(x00, x01, x02, x03, x04, x05, x06, x07, x08, x09, x0A, x0B, x0C, x0D, x0E, x0F, + x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x1A, x1B, x1C, x1D, x1E, x1F, + x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x2A, x2B, x2C, x2D, x2E, x2F, + x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x3A, x3B, x3C, x3D, x3E, x3F, + x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x4A, x4B, x4C, x4D, x4E, x4F, + x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x5A, x5B, x5C, x5D, x5E, x5F, + x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x6A, x6B, x6C, x6D, x6E, x6F, + x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x7A, x7B, x7C, x7D, x7E, x7F, + x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x8A, x8B, x8C, x8D, x8E, x8F, + x90, x91, x92, x93, x94, x95, x96, x97, x98, x99, x9A, x9B, x9C, x9D, x9E, x9F, + xA0, xA1, xA2, xA3, xA4, xA5, xA6, xA7, xA8, xA9, xAA, xAB, xAC, xAD, xAE, xAF, + xB0, xB1, xB2, xB3, xB4, xB5, xB6, xB7, xB8, xB9, xBA, xBB, xBC, xBD, xBE, xBF, + xC0, xC1, xC2, xC3, xC4, xC5, xC6, xC7, xC8, xC9, xCA, xCB, xCC, xCD, xCE, xCF, + xD0, xD1, xD2, xD3, xD4, xD5, xD6, xD7, xD8, xD9, xDA, xDB, xDC, xDD, xDE, xDF, + xE0, xE1, xE2, xE3, xE4, xE5, xE6, xE7, xE8, xE9, xEA, xEB, xEC, xED, xEE, xEF, + xF0, xF1, xF2, xF3, xF4, xF5, xF6, xF7, xF8, xF9, xFA, xFB, xFC, xFD, xFE, xFF); + } +} + +f(); diff --git a/js/src/jit-test/tests/ion/bug1384737.js b/js/src/jit-test/tests/ion/bug1384737.js new file mode 100644 index 0000000000..7eb9630166 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1384737.js @@ -0,0 +1,8 @@ +function f(x) { + var count = 0; + for (var i = 0; i < x.length; ++i) + count++; + return count; +} +assertEq(f(Error()), 0); +assertEq(f([[]]), 1); diff --git a/js/src/jit-test/tests/ion/bug1394505.js b/js/src/jit-test/tests/ion/bug1394505.js new file mode 100644 index 0000000000..84979c046c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1394505.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: helperThreadCount() === 0 || !('oomTest' in this) + +for (let j = 0; j < 50; j++) { + if (j === 1) + oomTest(function() {}); + evalInWorker(` + for (let i = 0; i < 30; i++) + relazifyFunctions(); + `); +} diff --git a/js/src/jit-test/tests/ion/bug1395100.js b/js/src/jit-test/tests/ion/bug1395100.js new file mode 100644 index 0000000000..892ff7c12f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1395100.js @@ -0,0 +1,6 @@ +// |jit-test| --ion-eager; --no-threads; --arm-sim-icache-checks; --gc-zeal=14 +Object.getOwnPropertyNames(this); +for (var i = 0; i < 1; ++i) { + [Array]; + [ArrayBuffer]; +} diff --git a/js/src/jit-test/tests/ion/bug1397071.js b/js/src/jit-test/tests/ion/bug1397071.js new file mode 100644 index 0000000000..c6d290c84d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1397071.js @@ -0,0 +1,14 @@ +// |jit-test| --ion-limit-script-size=off +function f() { + var b1 = new ArrayBuffer(64); + for (var i = 0; i < 100; ++i) { + Object.defineProperty(b1, "x", { + configurable: true, + enumerable: true, + writable: true, + value: i + }); + assertEq(b1.x, i); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1401014.js b/js/src/jit-test/tests/ion/bug1401014.js new file mode 100644 index 0000000000..dd378948b0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1401014.js @@ -0,0 +1,52 @@ +// Prevent optimizing top-level +with ({}) { } + + +// Unboxed object constructor candidate +function Thing() { + this.a = {}; // Object || null + this.b = {}; // Object || null +} + +(new Thing()); +(new Thing()).a = null; +(new Thing()).b = null; + + +var arr = new Array(1000); +arr[0]; + +var ctx = new Thing(); + +function funPsh(t, x) { + t.a = x; +} + +function funBug(t, i) { + t.b = t.a; // GETPROP t.a + t.a = null; // SETPROP t.a + arr[i] = 0; // Bailout on uninitialized elements + return t.b; +} + +// Ion compile +for (var i = 0; i < 20000; ++i) { + funBug(ctx, 0); + funPsh(ctx, {}); +} + +// Invalidate +let tmp = { a: null, b: {} }; +funBug(tmp, 0); + +// Ion compile +for (var i = 0; i < 20000; ++i) { + funBug(ctx, 0); + funPsh(ctx, {}); +} + +// Trigger bailout +let res = funBug(ctx, 500); + +// Result should not be clobbered by |t.a = null| +assertEq(res === null, false); diff --git a/js/src/jit-test/tests/ion/bug1404636.js b/js/src/jit-test/tests/ion/bug1404636.js new file mode 100644 index 0000000000..c0652578ab --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1404636.js @@ -0,0 +1,6 @@ +x = new Uint32Array(4); +try { + Math.max(Uint32Array.prototype)(); +} catch (e) {} +x[3] = -1; +assertEq(x.toString(), "0,0,0,4294967295"); diff --git a/js/src/jit-test/tests/ion/bug1408412.js b/js/src/jit-test/tests/ion/bug1408412.js new file mode 100644 index 0000000000..a69749f9aa --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1408412.js @@ -0,0 +1,15 @@ +function g() { + return arguments.length; +} +function f() { + with(this) {}; + for (var i = 0; i < 100; i++) { + g(); + } + var s = "for (var j = 0; j < 1200; j++) assertEq(g("; + for (var i = 0; i < 5000; i++) + s += i + ","; + s += "1), 5001);"; + eval(s); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1410683.js b/js/src/jit-test/tests/ion/bug1410683.js new file mode 100644 index 0000000000..669662d4f9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1410683.js @@ -0,0 +1,17 @@ +class C {}; +C.prototype.a = "a"; +C.prototype.q = "q"; +C.prototype.NaN = NaN; +class D extends C { + foo(p) { + return super[p]; + } +} +function f() { + var d = new D(); + for (let p in C.prototype) { + assertEq(p, String(d.foo(p))); + } +} +f(); +f(); diff --git a/js/src/jit-test/tests/ion/bug1433496.js b/js/src/jit-test/tests/ion/bug1433496.js new file mode 100644 index 0000000000..0298b877a5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1433496.js @@ -0,0 +1,6 @@ +// |jit-test| --spectre-mitigations=on; skip-if: getBuildConfiguration("mips32") || getBuildConfiguration("mips64") || getBuildConfiguration("riscv64") +function f() { + return arguments[arguments.length]; +} +for (var i = 0; i < 10; i++) + assertEq(f(), undefined); diff --git a/js/src/jit-test/tests/ion/bug1441012.js b/js/src/jit-test/tests/ion/bug1441012.js new file mode 100644 index 0000000000..de24e4a83f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1441012.js @@ -0,0 +1,14 @@ +if (getJitCompilerOptions()["ion.warmup.trigger"] > 30) + setJitCompilerOption("ion.warmup.trigger", 30); +function Iterate(items) { + for (var value of items) {} +} +var iterable = { + *[Symbol.iterator]() { + return "pass"; + (yield* iterable); + } +}; +for (var i = 0; i < 20; ++i) { + Iterate(iterable); +} diff --git a/js/src/jit-test/tests/ion/bug1450796.js b/js/src/jit-test/tests/ion/bug1450796.js new file mode 100644 index 0000000000..f004cfc955 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1450796.js @@ -0,0 +1,7 @@ +function f() { + var t = new Float32Array(1); + t[t.length] = 1; + return t[t.length]; +} +for (var i = 0; i < 5; i++) + assertEq(f(), undefined); diff --git a/js/src/jit-test/tests/ion/bug1452581.js b/js/src/jit-test/tests/ion/bug1452581.js new file mode 100644 index 0000000000..2836f4511e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1452581.js @@ -0,0 +1,16 @@ +// |jit-test| error:7 +var g = newGlobal({newCompartment: true}) +g.parent = this +g.eval("(" + function() { + Debugger(parent).onExceptionUnwind = function(frame) { + frame.older + } +} + ")()") +function f1(i) { + return f2(i|0); +}; +function f2(i) { + if (i === 0) throw 7; + return f1(i - 1); +} +f1(10); diff --git a/js/src/jit-test/tests/ion/bug1472132.js b/js/src/jit-test/tests/ion/bug1472132.js new file mode 100644 index 0000000000..025be31496 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1472132.js @@ -0,0 +1,11 @@ +function f() { + for (var i = 0; i < 1200; i++) { + var o1 = Reflect.construct(Array, [], Object); + var o2 = Reflect.construct(String, [""], Object); + var o3 = Reflect.construct(Int32Array, [0], Object); + assertEq(o1.__proto__, Object.prototype); + assertEq(o2.__proto__, Object.prototype); + assertEq(o3.__proto__, Object.prototype); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1473830.js b/js/src/jit-test/tests/ion/bug1473830.js new file mode 100644 index 0000000000..209b23a6c8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1473830.js @@ -0,0 +1,18 @@ + +y = []; +y.forEach(function() {}); + +x = []; +for (var i = 0; i < 100; ++i) { + x.push(undefined, 1); +} +x.sort(); +x.reverse(); + +x.forEach(function(j) { + "use strict"; + assertEq(this, 4); + if (j) { + x.forEach(function(z) { }); + } +}, 4); \ No newline at end of file diff --git a/js/src/jit-test/tests/ion/bug1479394.js b/js/src/jit-test/tests/ion/bug1479394.js new file mode 100644 index 0000000000..ef33e35b20 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1479394.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('stackTest' in this) +var dbgGlobal = newGlobal({newCompartment: true}); +var dbg = new dbgGlobal.Debugger(this); +function f1() { + dbg.getNewestFrame().older; + throw new Error(); +} +function f2() { f1(); } +function f3() { f2(); } +stackTest(f3); diff --git a/js/src/jit-test/tests/ion/bug1484905.js b/js/src/jit-test/tests/ion/bug1484905.js new file mode 100644 index 0000000000..3a819ea815 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1484905.js @@ -0,0 +1,4 @@ +// |jit-test| --ion-limit-script-size=off; --ion-gvn=off +for (var i = 0; i < 1; ++i) { + "".replace(/x/, "").replace(/y/, "12"); +} diff --git a/js/src/jit-test/tests/ion/bug1492574.js b/js/src/jit-test/tests/ion/bug1492574.js new file mode 100644 index 0000000000..c1ce0c000a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1492574.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function foo() {} +function foooooooooooooooooooooooooooooooo() {} +function fn(s) { + var o = {a:1} + eval(("f" + s) + "()"); + if (!('a' in o)) { + print("unreachable"); + } +} +for (var i = 0; i < 1100; i++) { + fn("oo"); +} +oomTest(new Function(` + let a = newRope("oooooooooooooooo","oooooooooooooooo"); + fn(a); +`)) diff --git a/js/src/jit-test/tests/ion/bug1493900-1.js b/js/src/jit-test/tests/ion/bug1493900-1.js new file mode 100644 index 0000000000..643c1943d6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1493900-1.js @@ -0,0 +1,17 @@ +function f() { + var objs = []; + for (var i = 0; i < 100; i++) { + objs[i] = {}; + } + var o = objs[0]; + var a = new Float64Array(1024); + function g(a, b) { + let p = b; + for (; p.x < 0; p = p.x) { + while (p === p) {} + } + for (var i = 0; i < 10000; ++i) {} + } + g(a, o); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1493900-2.js b/js/src/jit-test/tests/ion/bug1493900-2.js new file mode 100644 index 0000000000..7e7f5fdecd --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1493900-2.js @@ -0,0 +1,7 @@ +function f(a, b) { + for (; b.x < 0; b = b.x) { + while (b === b) {}; + } + for (var i = 0; i < 99999; ++i) {} +} +f(0, 0); diff --git a/js/src/jit-test/tests/ion/bug1497107.js b/js/src/jit-test/tests/ion/bug1497107.js new file mode 100644 index 0000000000..c3c4942f88 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1497107.js @@ -0,0 +1,37 @@ +function makeChain(n, base) { + var curr = base; + for (var i = 0; i < n; i++) { + curr = Object.create(curr); + var propname = "level" + i; + curr[propname] = true; + } + return curr; +} + +function BaseClass() { + this.base = true; +} + +Object.defineProperty(BaseClass.prototype, "getter", {get: function() { with({}){}; return this.base; }}); + +function victim(arg) { + if (arg.getter) { + return 3; + } else { + return 4; + } +} + +let root = new BaseClass(); +let chains = []; +for (var i = 0; i < 6; i++) { + chains.push(makeChain(500, root)); +} + +with({}){}; +for (var i = 0; i < 1000 / 6; i++) { + with({}){}; + for (var j = 0; j < chains.length; j++) { + victim(chains[j]); + } +} diff --git a/js/src/jit-test/tests/ion/bug1502090.js b/js/src/jit-test/tests/ion/bug1502090.js new file mode 100644 index 0000000000..c7638e7e73 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1502090.js @@ -0,0 +1,13 @@ +function f(o) { + var a = [o]; + a.length = a[0]; + var useless = function() {} + var sz = Array.prototype.push.call(a, 42, 43); + (function(){ + sz; + })(new Boolean(false)); +} +for (var i = 0; i < 2; i++) { + f(1); +} +f(2); diff --git a/js/src/jit-test/tests/ion/bug1506968.js b/js/src/jit-test/tests/ion/bug1506968.js new file mode 100644 index 0000000000..2dadb1ccda --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1506968.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: typeof Intl === 'undefined' +function f(a, b) { + a.formatToParts(); + a.format(); +} +var a = new Intl.NumberFormat(); +f(a, []); +try { + f(); +} catch (e) {} +f(a, []); +try { + f(); +} catch (e) {} diff --git a/js/src/jit-test/tests/ion/bug1509482.js b/js/src/jit-test/tests/ion/bug1509482.js new file mode 100644 index 0000000000..26bda3b544 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1509482.js @@ -0,0 +1,18 @@ +let singleton = {x: 1}; + +let holder = {sing_prop: singleton} + +function makeChain(n, base) { + var curr = base; + for (var i = 0; i < n; i++) { + curr = Object.create(curr); + } + return curr; +} +let chain = makeChain(1000, holder); + +var x = 0; +for (var i = 0; i < 1111; i++) { + x += chain.sing_prop.x; + singleton.x = -singleton.x // Don't want it to be a constant. +} diff --git a/js/src/jit-test/tests/ion/bug1510684.js b/js/src/jit-test/tests/ion/bug1510684.js new file mode 100644 index 0000000000..514b934f32 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1510684.js @@ -0,0 +1,38 @@ +var verified = false; +function f(a) { + if (a < 10000) + return 5; + assertEq(g_fwd.caller.arguments.length, 0); + assertEq(h_fwd.caller.arguments.length, 0); + verified = true; + return 6; +} + +function g_fwd(x) { + with({}) {}; + return f(x); +} +function g(a) { + var x = a; + function inline() { + return g_fwd(x); + } + return inline(); +} + +function h_fwd(x) { + with({}) {}; + return g(x); +} +function h(a) { + var x = a; + function inline() { + return h_fwd(x); + } + return inline(); +} + +var i = 0; +while (!verified) { + h(i++); +} diff --git a/js/src/jit-test/tests/ion/bug1514625.js b/js/src/jit-test/tests/ion/bug1514625.js new file mode 100644 index 0000000000..4f4e27e864 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1514625.js @@ -0,0 +1,11 @@ +var i = 0; +evaluate(""); +while (--i >= 0) { + if (x > 0) { + continue; + } + switch (i) { + default: + i(i); + } +} diff --git a/js/src/jit-test/tests/ion/bug1518377-1.js b/js/src/jit-test/tests/ion/bug1518377-1.js new file mode 100644 index 0000000000..fc2869efc0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1518377-1.js @@ -0,0 +1,7 @@ +Object.prototype[Symbol.toPrimitive] = inIon; +which = function() {}; +for (var i = 0; i < 10; ++i) { + s = which[which[which]]; + a = which; + a += s + ""; +} diff --git a/js/src/jit-test/tests/ion/bug1518377-2.js b/js/src/jit-test/tests/ion/bug1518377-2.js new file mode 100644 index 0000000000..91902b20bf --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1518377-2.js @@ -0,0 +1,16 @@ +g = (function(t, foreign) { + "use asm"; + var ff = foreign.ff; + function f() { ff() } + return f +})(this, { + ff: -0 || (this) ? inIon : a &= () => test() +}) + +function m(f) { + for (var i = 0; i < 100; ++i) { + f(); + } +} + +m(g); diff --git a/js/src/jit-test/tests/ion/bug1526840.js b/js/src/jit-test/tests/ion/bug1526840.js new file mode 100644 index 0000000000..08f1ec64ae --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1526840.js @@ -0,0 +1,13 @@ + +setJitCompilerOption("offthread-compilation.enable", 0); +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("ion.warmup.trigger", 0); + +for (let j = 0; j < 2; ++j) { + let z = j ? 0n : 1; + if (z) { + z = 0; + } else { + z = 0; + } +} diff --git a/js/src/jit-test/tests/ion/bug1527148.js b/js/src/jit-test/tests/ion/bug1527148.js new file mode 100644 index 0000000000..509dbb90b5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1527148.js @@ -0,0 +1,17 @@ +var log = ""; +function g() { + var x = []; + for (var k = 0; k < 2; ++k) { + x.push(k); + } + log += x; +} +for (var i = 0; i < 1; i++) { + f = function() {}; +} +g(); +Array.prototype.push = f; +g(); +f.__proto__ = []; +g(); +assertEq(log, "0,1"); diff --git a/js/src/jit-test/tests/ion/bug1528818.js b/js/src/jit-test/tests/ion/bug1528818.js new file mode 100644 index 0000000000..3a49e3f468 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1528818.js @@ -0,0 +1,11 @@ +function getarg(x) { + return arguments[x] +} +function f() { + var r = 0n; + for (var i=0;i<2000;++i) { + r += getarg(1+(i & 1), BigInt(0), 1n); + } + return r; +} +for (var i=0;i<2;++i) print(f()) diff --git a/js/src/jit-test/tests/ion/bug1538083.js b/js/src/jit-test/tests/ion/bug1538083.js new file mode 100644 index 0000000000..424c7fe1ef --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1538083.js @@ -0,0 +1,8 @@ +// Crashes with --no-threads --ion-eager. +x = [8589934592, -0]; +y = [0, 0]; +for (let i = 0; i < 2; ++i) { + y[i] = Math.trunc(Math.tan(x[i])); +} +assertEq(Object.is(y[0], 1), true); +assertEq(Object.is(y[1], -0), true); diff --git a/js/src/jit-test/tests/ion/bug1543166.js b/js/src/jit-test/tests/ion/bug1543166.js new file mode 100644 index 0000000000..ea67400c2b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1543166.js @@ -0,0 +1,17 @@ +function f() { + var arr = []; + for (var i = 0; i < 12; i++) { + // Create a new global to get "DOM" objects with different groups. + var g = newGlobal(); + var o = new g.FakeDOMObject(); + o[0] = 1; + arr.push(o); + } + var res; + for (var i = 0; i < 2000; i++) { + var o = arr[i % arr.length]; + res = o[0]; + } + return res; +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1544386-1.js b/js/src/jit-test/tests/ion/bug1544386-1.js new file mode 100644 index 0000000000..f78cba11f0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1544386-1.js @@ -0,0 +1,16 @@ +const arr = [{a: 0}, {a: 1}, {a: 2}, {a: 3}, {a: 4}]; +function f() { + if (arr.length == 0) { + arr[3] = {a: 5}; + } + var v = arr.pop(); + v.a; + for (var i = 0; i < 3000; i++) {} +} +var p = {}; +p.__proto__ = [{a: 0}, {a: 1}, {a: 2}]; +p[0] = -1.8629373288622089e-06; +arr.__proto__ = p; +for (var i = 0; i < 10; i++) { + f(); +} diff --git a/js/src/jit-test/tests/ion/bug1544386-2.js b/js/src/jit-test/tests/ion/bug1544386-2.js new file mode 100644 index 0000000000..69c3bad799 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1544386-2.js @@ -0,0 +1,10 @@ +x = []; +x.unshift(4, 8); +y = []; +relazifyFunctions(); +y[3] = 9; +y.__proto__ = x; +for (var i = 0; i < 2; ++i) { + y.shift(); +} +assertEq(y[0], 8); diff --git a/js/src/jit-test/tests/ion/bug1544792.js b/js/src/jit-test/tests/ion/bug1544792.js new file mode 100644 index 0000000000..b9bea59615 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1544792.js @@ -0,0 +1,13 @@ +var res = undefined; +function X() { + try { + foobar(); + } catch (e) { + res = this.hasOwnProperty("prop"); + } + this.prop = 1; +} +for (var i = 0; i < 50; i++) { + new X(); + assertEq(res, false); +} diff --git a/js/src/jit-test/tests/ion/bug1546228.js b/js/src/jit-test/tests/ion/bug1546228.js new file mode 100644 index 0000000000..35814a32e9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1546228.js @@ -0,0 +1,10 @@ +function Obj() { + this.a = 1; +} +Obj.prototype = this; + +function test() { + return o.a; +} +var o = new Obj(); +test(); diff --git a/js/src/jit-test/tests/ion/bug1556571.js b/js/src/jit-test/tests/ion/bug1556571.js new file mode 100644 index 0000000000..b1d69788ca --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1556571.js @@ -0,0 +1,14 @@ +// Ensure that convertDoubleToInt32 allows the -0 case. + +// If convertDoubleToInt32 fails on the -0 case, then 0 !== -0 below, +// so it will fall through to the default case. +function test(v) { + switch(v) { + case 0: return; + default: assertEq(true, false); break; + } +} + +for (var i = 0; i < 10000; i++) { + test(i % 2 === 0 ? 0 : -0); +} diff --git a/js/src/jit-test/tests/ion/bug1568397.js b/js/src/jit-test/tests/ion/bug1568397.js new file mode 100644 index 0000000000..c03bb0283d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1568397.js @@ -0,0 +1,50 @@ +// |jit-test| error:TypeError: can't access property +let obj = {x: 1}; +obj.x = 1.1; + +function Foo(val, phase){ + if (phase == 3) { + // Phase 3: Modify the prototype of this constructor. + Foo.prototype.__proto__ = proto; + } + + // Phase 4: Trigger the getter on the new proto. + this.d; + + this.c = val; + + if (phase == 2) { + // Phase 2: Stash |this| in a global variable. + g_partial = this; + + // Trigger Phase 3. + new Foo(1.1, 3); + } + this.b = 2.2; +} + +let proto = {get d() { + function accessC(arg){ + var tmp = arg.c; + return tmp.x; + } + + // Phase 5: Ion-compile |accessC|, using the stashed |this| from phase 2. + // This is a partially initialized object with a C property but not a B + // property. + for (var i = 0; i < 100000; i++) { + accessC(g_partial); + } + + // Phase 6: call |accessC| with |this|, which is a partially initialized + // object *without* a C (and B) property. + x = accessC(this); +}}; + +// Phase 1: Warm up the |Foo| constructor with normal data. +for(let i = 0;i < 100;i++){ + new Foo(obj, 1); +} + +// Trigger Phase 2. +new Foo(obj, 2); diff --git a/js/src/jit-test/tests/ion/bug1570926.js b/js/src/jit-test/tests/ion/bug1570926.js new file mode 100644 index 0000000000..7af36aa4ba --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1570926.js @@ -0,0 +1,18 @@ +if (getJitCompilerOptions()["baseline.warmup.trigger"] > 10) { + setJitCompilerOption("baseline.warmup.trigger", 10); +} +if (getJitCompilerOptions()["ion.warmup.trigger"] > 20) { + setJitCompilerOption("ion.warmup.trigger", 20); +} +setJitCompilerOption("offthread-compilation.enable", 0); + +var arr = [1, 2, 3, 4, 5]; +function f(x) { + for (var i = x; i < 5; i++) { + arr[i - 2]; + } +} +for (var i = 0; i < 15; i++) { + f(2); +} +assertEq(f(0), undefined); diff --git a/js/src/jit-test/tests/ion/bug1572051.js b/js/src/jit-test/tests/ion/bug1572051.js new file mode 100644 index 0000000000..cb897e9aad --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1572051.js @@ -0,0 +1,6 @@ +evaluate(` + for (var i = 0; i < 2000; i++) { + Array(Math, {}); + bailout(); + } +`); diff --git a/js/src/jit-test/tests/ion/bug1593175.js b/js/src/jit-test/tests/ion/bug1593175.js new file mode 100644 index 0000000000..ef3d8d601f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1593175.js @@ -0,0 +1,10 @@ +function f() { + f; +} +f(); +f(); +function g() { + typeof(f = []) + f > 2; +} +g(); +g(); diff --git a/js/src/jit-test/tests/ion/bug1598456.js b/js/src/jit-test/tests/ion/bug1598456.js new file mode 100644 index 0000000000..c4f7f96c1b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1598456.js @@ -0,0 +1,3 @@ +(function() { + if (arguments) {} +})(); diff --git a/js/src/jit-test/tests/ion/bug1598784.js b/js/src/jit-test/tests/ion/bug1598784.js new file mode 100644 index 0000000000..20803e2f09 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1598784.js @@ -0,0 +1,8 @@ +// |jit-test| error:ReferenceError +(function() { + switch (0) { + case 0: + f() = 0; + case -3: + } +})(); diff --git a/js/src/jit-test/tests/ion/bug1602190.js b/js/src/jit-test/tests/ion/bug1602190.js new file mode 100644 index 0000000000..fbd2ed6551 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1602190.js @@ -0,0 +1,13 @@ +function g(x) { + var z = true; + return (x ? 0.1 : (z ? Math.fround(1) : NaN)); +} +function f() { + var arr = [1]; + for (var i = 0; i < 550; ++i) { + for (var j = 0; j < 2; ++j) { + assertEq(g(arr[j]), j ? 1 : 0.1); + } + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1604631.js b/js/src/jit-test/tests/ion/bug1604631.js new file mode 100644 index 0000000000..bc7e7e4ca9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1604631.js @@ -0,0 +1,4 @@ +// |jit-test| error:can't access lexical declaration +x = []; +x.length; +evaluate("x.length; let x = 1"); diff --git a/js/src/jit-test/tests/ion/bug1605641.js b/js/src/jit-test/tests/ion/bug1605641.js new file mode 100644 index 0000000000..e8eded6a9b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1605641.js @@ -0,0 +1,8 @@ +// |jit-test| error:9 +function thrower() { + throw 9; +} +function f() { + return [...{} [thrower(...["foo"])]] = "undefined"; +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1607670-1.js b/js/src/jit-test/tests/ion/bug1607670-1.js new file mode 100644 index 0000000000..edab65959e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1607670-1.js @@ -0,0 +1,13 @@ +// Test written by André Bargull for bug 1380953. +var q = 0; +function fn() {} +var newTarget = Object.defineProperty(fn.bind(), "prototype", { + get() { + ++q; + return null; + } +}); +for (var i = 0; i < 100; ++i) { + Reflect.construct(fn, [], newTarget); +} +assertEq(q, 100); diff --git a/js/src/jit-test/tests/ion/bug1607670-2.js b/js/src/jit-test/tests/ion/bug1607670-2.js new file mode 100644 index 0000000000..9488fbf3ca --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1607670-2.js @@ -0,0 +1,15 @@ +function inner(X, T) { + return Reflect.construct(X, [], T); +} +function F() {} + +let handler = {}; +let P = new Proxy(F, handler); + +for (var i = 0; i < 2000; i += 1) { + with ({}) {} + inner(F, P); +} + +handler.get = function() {} +inner(F, P); diff --git a/js/src/jit-test/tests/ion/bug1607670-3.js b/js/src/jit-test/tests/ion/bug1607670-3.js new file mode 100644 index 0000000000..aaecb9cc8f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1607670-3.js @@ -0,0 +1,24 @@ +let c = 0; +function f1() { + c++; +} +function LoggingProxyHandlerWrapper(name, handler={}) { + return new Proxy(handler, { + get(x, id) { + return function (...args) { + return Reflect[id].apply(null, args); + }; + } + }); +} +function LoggingProxy(name, target) { + return new Proxy(f1, new LoggingProxyHandlerWrapper(name)); +} +function test() { + let proxy = new LoggingProxy("proto", {}); + for (let i = 0; i < 2000; i++) { + new proxy(); + } + assertEq(c, 2000); +} +test(); diff --git a/js/src/jit-test/tests/ion/bug1607670-4.js b/js/src/jit-test/tests/ion/bug1607670-4.js new file mode 100644 index 0000000000..de115bc531 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1607670-4.js @@ -0,0 +1,16 @@ +function F() {} +function G() {} + +function f() { + for (var i = 0; i < 10000; ++i) { + var o = Reflect.construct(F, []); + assertEq(Object.getPrototypeOf(o), F.prototype); + } + + for (var i = 0; i < 10000; ++i) { + var o = Reflect.construct(F, [], G); + assertEq(Object.getPrototypeOf(o), G.prototype); + } +} + +for (var i = 0; i < 2; ++i) f(); diff --git a/js/src/jit-test/tests/ion/bug1608256.js b/js/src/jit-test/tests/ion/bug1608256.js new file mode 100644 index 0000000000..4445a41157 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1608256.js @@ -0,0 +1,13 @@ +// |jit-test| --no-threads; --baseline-warmup-threshold=1; --ion-full-warmup-threshold=1 +function g(obj, v) { + obj.prop = v; +} +function f() { + var obj = {prop: 2}; + for (var j = 0; j < 20; j++) {} + for (var i = 0; i < 100; i++) { + g(/x/, 1); + g(obj, false); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1620189.js b/js/src/jit-test/tests/ion/bug1620189.js new file mode 100644 index 0000000000..442982ac65 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1620189.js @@ -0,0 +1,11 @@ +function test(...a) { + // Overwrites the parameter |a|, but otherwise isn't used within this + // function, which should allow to optimise away the function expression. + // On bailout, this instruction can be safely repeated. + function a() {} + + // Read an element from the implicit |arguments| binding to ensure the + // arguments object gets created. + assertEq(arguments[0], 0); +} +test(0); \ No newline at end of file diff --git a/js/src/jit-test/tests/ion/bug1620203.js b/js/src/jit-test/tests/ion/bug1620203.js new file mode 100644 index 0000000000..c261d5ca0a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1620203.js @@ -0,0 +1,7 @@ +"use strict"; +var proxy = new Proxy({}, { + defineProperty(target, [...x27], ...[{p10: q34}]) { + return true; + } +}); +Object.defineProperty(proxy, "test", {writable: false}); diff --git a/js/src/jit-test/tests/ion/bug1620215.js b/js/src/jit-test/tests/ion/bug1620215.js new file mode 100644 index 0000000000..70b95ca630 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1620215.js @@ -0,0 +1,15 @@ +function test(x) { + for (var i = 0; i < 10; ++i) { + // Create an IC specialized for lazy arguments when Baseline runs. + arguments[0]; + // De-optimize lazy arguments by accessing an out-of-bounds argument. + arguments[10]; + + // Overwrite |arguments| to get a Value type. + arguments = 0; + + for (var j = 0; j < 1500; j++) {} + return; + } +} +test(1); diff --git a/js/src/jit-test/tests/ion/bug1621268-1.js b/js/src/jit-test/tests/ion/bug1621268-1.js new file mode 100644 index 0000000000..940b358696 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1621268-1.js @@ -0,0 +1,9 @@ +// |jit-test| error:ReferenceError: can't access lexical declaration +function f() { + for (let x of [1]) { + let y = new Date(x); + `Cannot parse "${x}"`; + let x; + } +} +f(); \ No newline at end of file diff --git a/js/src/jit-test/tests/ion/bug1621268-2.js b/js/src/jit-test/tests/ion/bug1621268-2.js new file mode 100644 index 0000000000..1788a75c10 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1621268-2.js @@ -0,0 +1,6 @@ +function f() { + for (const x of []) { + for (let y of [y, y]) {} + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1629503-1.js b/js/src/jit-test/tests/ion/bug1629503-1.js new file mode 100644 index 0000000000..06508e7487 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1629503-1.js @@ -0,0 +1,13 @@ +// |jit-test| error: TypeError: invalid assignment to const +function f() { + const g = newGlobal({newCompartment: true}); + const dbg = new Debugger(g); + g.eval(`function f() {}`); + dbg.onEnterFrame = function(frame) { + [x, dbg] = []; + } + for (var i = 0; i < 5; i++) { + g.eval("f()"); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1629503-2.js b/js/src/jit-test/tests/ion/bug1629503-2.js new file mode 100644 index 0000000000..a51e7fced5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1629503-2.js @@ -0,0 +1,10 @@ +// |jit-test| error: TypeError: invalid assignment to const +function f() { + const x60 = [0, 1]; + const y81 = [...x60]; + { + const x60 = [0, 1]; + [...x60] = [42]; + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1640737.js b/js/src/jit-test/tests/ion/bug1640737.js new file mode 100644 index 0000000000..9a1609a283 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1640737.js @@ -0,0 +1,17 @@ +function g(arr) { + var res = []; + for (var i = 0; i < arr.length; i++) { + var el = arr[i]; + res.push(el); + } + return res; +} +function f() { + for (var i = 0; i < 2; i++) { + var obj = {__proto__: []}; + for (var j = 0; j < 1500; j++) { + g([13.37, obj]); + } + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1643888.js b/js/src/jit-test/tests/ion/bug1643888.js new file mode 100644 index 0000000000..cf88b09c91 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1643888.js @@ -0,0 +1,7 @@ +function f() { + var y = this * this; + for (var i = 0; i < 2000; i++) { + assertEq(y >>> y, 0); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1647293.js b/js/src/jit-test/tests/ion/bug1647293.js new file mode 100644 index 0000000000..4c474f5f9a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1647293.js @@ -0,0 +1,12 @@ +function f() { + var i = 0; + while (i != 3000) { + if (typeof i !== "number") { + var x = i || 8; + } + var next = i + 1; + i = arguments; + i = next; + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1650526.js b/js/src/jit-test/tests/ion/bug1650526.js new file mode 100644 index 0000000000..69934cf111 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1650526.js @@ -0,0 +1,9 @@ +for (let i = 0; i < 2; ++i) { + // Alternate between even and odd values. + let power = 1000 + i; + + // Math.pow(negative-int, large-negative-value) is +0 for even and -0 for odd values. + let expected = (power & 1) === 0 ? +0 : -0; + + assertEq(Math.pow(-3, -power), expected); +} diff --git a/js/src/jit-test/tests/ion/bug1655940-1.js b/js/src/jit-test/tests/ion/bug1655940-1.js new file mode 100644 index 0000000000..34880823cc --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1655940-1.js @@ -0,0 +1,14 @@ +function f(t) { + for (var i = 0; i < 2; i++) { + try { + var x = 1; + new Int32Array(1); + x = 2; + new Int32Array(t); + } catch (e) { + assertEq(x, 2); + } + } +} +f(1); +f(-1); diff --git a/js/src/jit-test/tests/ion/bug1655940-2.js b/js/src/jit-test/tests/ion/bug1655940-2.js new file mode 100644 index 0000000000..d24a065f5f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1655940-2.js @@ -0,0 +1,15 @@ +function f(t) { + for (var i = 0; i < 2; i++) { + try { + var x = 1; + var {} = {}; + x = 2; + var {} = t; + } catch (e) { + assertEq(x, 2); + } + } +} +for (var t of [{}, null]) { + f(t); +} diff --git a/js/src/jit-test/tests/ion/bug1655940-3.js b/js/src/jit-test/tests/ion/bug1655940-3.js new file mode 100644 index 0000000000..a9d984dd68 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1655940-3.js @@ -0,0 +1,21 @@ +var ToObject = getSelfHostedValue("ToObject"); + +function f(arr) { + for (var i = 0; i < arr.length; i++) { + var v = arr[i]; + try { + var x = 1; + ToObject({}); + x = 2; + ToObject(v); + } catch (e) { + assertEq(x, 2); + } + } +} + +var a = []; +for (var i = 0; i < 50; i++) { + a.push({}, null); +} +f(a); diff --git a/js/src/jit-test/tests/ion/bug1723464.js b/js/src/jit-test/tests/ion/bug1723464.js new file mode 100644 index 0000000000..2b236a0b51 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1723464.js @@ -0,0 +1,3 @@ +// |jit-test| --ion-eager; --no-threads +setJitCompilerOption("ion.forceinlineCaches", 1); +"".localeCompare(); diff --git a/js/src/jit-test/tests/ion/bug1745388.js b/js/src/jit-test/tests/ion/bug1745388.js new file mode 100644 index 0000000000..762f3b2dcf --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1745388.js @@ -0,0 +1,3 @@ +// |jit-test| --ion-gvn=off; --ion-licm=off + +for (var k = 0; k < 100; k++) {} diff --git a/js/src/jit-test/tests/ion/bug1762343.js b/js/src/jit-test/tests/ion/bug1762343.js new file mode 100644 index 0000000000..7e07c5e886 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1762343.js @@ -0,0 +1,27 @@ +// |jit-test| --fast-warmup; --no-threads + +function placeholder() {} + +function main() { + const fhash = placeholder; + const v9 = -62980826; + + let v21; + for (let i = 0; i < 32; i++) { + // Call Math.fround() to enable the Float32 specialization pass. + Math.fround(123); + + // Math.trunc() can produce Float32. + const v18 = Math.trunc(-9007199254740992); + + // |valueOf| is always true, but can't be inferred at compile-time. + const v20 = valueOf ? v18 : -9007199254740992; + + // Use the Float32 value. + v21 = v20 && v9; + } + + assertEq(v21, -62980826); +} + +main(); diff --git a/js/src/jit-test/tests/ion/bug1791520.js b/js/src/jit-test/tests/ion/bug1791520.js new file mode 100644 index 0000000000..aca91c2a7f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1791520.js @@ -0,0 +1,92 @@ +function testAtomicsAdd() { + var x; + for (var i = 0; i < 100; ++i) { + var a = new BigInt64Array(2); + x = Atomics.add(a, i & 1, 1n); + } + return x; +} + +function testAtomicsSub() { + var x; + for (var i = 0; i < 100; ++i) { + var a = new BigInt64Array(2); + x = Atomics.sub(a, i & 1, 1n); + } + return x; +} + +function testAtomicsAnd() { + var x; + for (var i = 0; i < 100; ++i) { + var a = new BigInt64Array(2); + x = Atomics.and(a, i & 1, 1n); + } + return x; +} + +function testAtomicsOr() { + var x; + for (var i = 0; i < 100; ++i) { + var a = new BigInt64Array(2); + x = Atomics.or(a, i & 1, 1n); + } + return x; +} + +function testAtomicsXor() { + var x; + for (var i = 0; i < 100; ++i) { + var a = new BigInt64Array(2); + x = Atomics.xor(a, i & 1, 1n); + } + return x; +} + +function testAtomicsExchange() { + var x; + for (var i = 0; i < 100; ++i) { + var a = new BigInt64Array(2); + x = Atomics.exchange(a, i & 1, 0n); + } + return x; +} + +function testAtomicsCompareExchange() { + var x; + for (var i = 0; i < 100; ++i) { + var a = new BigInt64Array(2); + x = Atomics.compareExchange(a, i & 1, 0n, 0n); + } + return x; +} + +function testAtomicsLoad() { + var x; + for (var i = 0; i < 100; ++i) { + var a = new BigInt64Array(2); + x = Atomics.load(a, i & 1); + } + return x; +} + +function testLoadElement() { + var x; + for (var i = 0; i < 100; ++i) { + var a = new BigInt64Array(2); + x = a[i & 1]; + } + return x; +} + +gczeal(14); + +testAtomicsAdd(); +testAtomicsSub(); +testAtomicsAnd(); +testAtomicsOr(); +testAtomicsXor(); +testAtomicsExchange(); +testAtomicsCompareExchange(); +testAtomicsLoad(); +testLoadElement(); diff --git a/js/src/jit-test/tests/ion/bug1808210.js b/js/src/jit-test/tests/ion/bug1808210.js new file mode 100644 index 0000000000..4e47a5ba10 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1808210.js @@ -0,0 +1,14 @@ +// |jit-test| --ion-offthread-compile=off; --fast-warmup; --blinterp-warmup-threshold=1; --blinterp-eager + +let a = {}; +let b = {}; +class Foo {} +let bar = function() { return new Foo(); }; +for (let i = 0; i < 100; i++) { + for (let j = 0; j < i; j++) { + b.x + a.x; + bar(); + } + for (let k = 0; k < 100; k++) {} + bar(); +} diff --git a/js/src/jit-test/tests/ion/bug1808352.js b/js/src/jit-test/tests/ion/bug1808352.js new file mode 100644 index 0000000000..d106165f43 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1808352.js @@ -0,0 +1,27 @@ +let domObject = new FakeDOMObject(); +let expectedValue = domObject.x; + +let {object, transplant} = transplantableObject({object: domObject}); +assertEq(object, domObject); + +let global1 = newGlobal({newCompartment: true}); +let global2 = newGlobal({newCompartment: true}); + +transplant(global1); +transplant(global2); +transplant(global1); + +assertEq(object, domObject); +assertEq(domObject.x, expectedValue); + +global1.domObj = domObject; +global1.expectedValue = expectedValue; + +global1.evaluate(` +function f() { + for (var i = 0; i < 2000; i++) { + assertEq(domObj.x, expectedValue); + } +} +f(); +`); diff --git a/js/src/jit-test/tests/ion/bug1811803.js b/js/src/jit-test/tests/ion/bug1811803.js new file mode 100644 index 0000000000..5c7dc7ee26 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1811803.js @@ -0,0 +1,5 @@ +// |jit-test| --fuzzing-safe; --ion-offthread-compile=off; --fast-warmup + +a = {} +for (b = 0; b < 100; ++b) + a['x' + b] = 'x' + b; diff --git a/js/src/jit-test/tests/ion/bug1812001.js b/js/src/jit-test/tests/ion/bug1812001.js new file mode 100644 index 0000000000..936240718f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1812001.js @@ -0,0 +1,17 @@ +var arr = []; +for (var i = 0; i < 10; i++) { + arr.push({y: 1, x: 2, ["z" + i]: 3}); +} + +function bar(x) { with ({}) {} } + +function foo(obj) { + for (var key in obj) { + bar(obj[key]); + } +} + +with ({}) {} +for (var i = 0; i < 2000; i++) { + foo(arr[i % arr.length]); +} diff --git a/js/src/jit-test/tests/ion/bug1812508.js b/js/src/jit-test/tests/ion/bug1812508.js new file mode 100644 index 0000000000..f08981c3ab --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1812508.js @@ -0,0 +1,53 @@ +let toBeIncremented = 0; +function megamorphicGetIncremented(thisIsMegamorphic, thisIsAlwaysTrue) { + // We need this to always evaluate as foo, and have an else clause which + // would bail if we ever hit it. + let key = thisIsAlwaysTrue ? "foo" : thisIsMegamorphic.bob; + + // The first megamorphic load: + if (!thisIsMegamorphic[key]) { + // The store which invalidates it + thisIsMegamorphic[key] = ++toBeIncremented; + } + // The megamorphic load which was bugged + return thisIsMegamorphic[key]; +} + +// We just need enough shapes to go megamorphic. Put in a bunch though +// just to be sure +let objShapes = [ + {a: 1}, + // We need the shapes to occasionally have "foo" defined, but be false, + // otherwise stub folding will mean we don't go megamorphic because + // we'll just attach "Missing" which in our case just differs by a + // single shape guard. + {b: 1, baz: 2, foo: false}, + {c: 1}, + {d: 1, baz: 2, foo: false}, + {e: 1}, + {f: 1, baz: 2, foo: false}, + {g: 1}, + {h: 1, baz: 2, foo: false}, + {i: 1}, + {j: 1, baz: 2, foo: false}, + {k: 1}, + {l: 1, baz: 2, foo: false}, + {m: 1}, + {n: 1, baz: 2, foo: false}, + {o: 1}, + {p: 1, baz: 2, foo: false}, + {q: 1}, + {r: 1, baz: 2, foo: false}, + {s: 1}, + {t: 1, baz: 2, foo: false}, +]; +let objs = []; +for (let i = 0; i < 100; i++) { + let obj = Object.assign({}, objShapes[i % objShapes.length]); + objs.push(obj); +} + +for (let i = 1; i < 100; i++) { + let id = megamorphicGetIncremented(objs[i], true); + assertEq(id, i); +} diff --git a/js/src/jit-test/tests/ion/bug1814746.js b/js/src/jit-test/tests/ion/bug1814746.js new file mode 100644 index 0000000000..be66e12aab --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1814746.js @@ -0,0 +1,7 @@ +function testObjSetSelf(key) { + let obj = {}; + obj[key] = obj; +} +for (let i = 0; i < 100; i++) { + testObjSetSelf("a" + i); +} diff --git a/js/src/jit-test/tests/ion/bug1814899.js b/js/src/jit-test/tests/ion/bug1814899.js new file mode 100644 index 0000000000..43a16de511 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1814899.js @@ -0,0 +1,22 @@ +function bar(x) { + with ({}) {} + switch (x) { + case 1: + foo(2); + break; + case 2: + gczeal(14, 1); + break; + } + return "a sufficiently long string"; +} + +function foo(x) { + for (var s in bar(x)) { gczeal(0); } +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + foo(0); +} +foo(1); diff --git a/js/src/jit-test/tests/ion/bug1820602.js b/js/src/jit-test/tests/ion/bug1820602.js new file mode 100644 index 0000000000..24fc0fb7ab --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1820602.js @@ -0,0 +1,23 @@ +let domObject = new FakeDOMObject(); + +let {object, transplant} = transplantableObject({object: domObject}); +assertEq(object, domObject); + +let global1 = newGlobal({newCompartment: true}); +let global2 = newGlobal({newCompartment: true}); + +transplant(global1); +transplant(global2); +transplant(global1); + +assertEq(object, domObject); + +global1.domObj = domObject; + +global1.evaluate("(" + function f() { + var domObjNormal = new FakeDOMObject(); + for (var i = 0; i < 5000; i++) { + var obj = i < 1500 ? domObjNormal : domObj; + assertEq(obj.doFoo(4, 5), 2); + } +}.toString() + ")()"); diff --git a/js/src/jit-test/tests/ion/bug1822966.js b/js/src/jit-test/tests/ion/bug1822966.js new file mode 100644 index 0000000000..8ea4821c5b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1822966.js @@ -0,0 +1,22 @@ +// |jit-test| --no-threads + +function bar() { return Math; } + +function foo() { + for (var i = 0; i < 50; i++) { + const arr = [1]; + const arr2 = [1]; + arr.h = 2; + for (var j = 0; j < 10; j++) { + for (var n = 0; n < 3000; n++) {} + + for (var k = 0; k < 101; k++) { + bar(); + } + } + + arr.a = i; + arr2.x = 1; + } +} +foo() diff --git a/js/src/jit-test/tests/ion/bug1830107.js b/js/src/jit-test/tests/ion/bug1830107.js new file mode 100644 index 0000000000..4b8818ce24 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1830107.js @@ -0,0 +1,15 @@ +// |jit-test| --fast-warmup +function read(a, index, expected) { + for (var i = 0; i < 1; i++) { + a[index + 10]; + assertEq(a[index], expected); + } +} +var a = new Int8Array(11); +a[0] = 5; +for (var i = 0; i < 100; i++) { + read(a, 0, 5); +} +for (var i = -1; i > -10; --i) { + read(a, i, undefined); +} diff --git a/js/src/jit-test/tests/ion/bug1845257.js b/js/src/jit-test/tests/ion/bug1845257.js new file mode 100644 index 0000000000..b099c7ce8a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1845257.js @@ -0,0 +1,15 @@ +// |jit-test| --no-threads; --baseline-warmup-threshold=10; --ion-warmup-threshold=100; --fuzzing-safe; --gc-zeal=10 + +const v7 = {}; + +function foo(n) { + if (n == 0) return; + const v13 = Object(Object); + const v14 = v13(v7); + const v15 = v13.create(v13); + v15.setPrototypeOf(v14, v13); + const v18 = v15.assign(v14).create(v14); // 1 + v18.is(v18, v18); // 2 + foo(n-1); +} +foo(2000); diff --git a/js/src/jit-test/tests/ion/bug1851976.js b/js/src/jit-test/tests/ion/bug1851976.js new file mode 100644 index 0000000000..60ea38649d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1851976.js @@ -0,0 +1,8 @@ +// |jit-test| --ion-gvn=off +function g() {} +function f() { + for (var i = 0; i < 100; i++) { + g(...[]); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug1852917.js b/js/src/jit-test/tests/ion/bug1852917.js new file mode 100644 index 0000000000..b6371378ff --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1852917.js @@ -0,0 +1,9 @@ +// |jit-test| --fast-warmup +function main() { + for (var i = 0; i < 100; i++) { + Math.fround(~16); + var v = Math.min(-9223372036854775808, -2.220446049250313e-16); + v % v; + } +} +main(); diff --git a/js/src/jit-test/tests/ion/bug1866502.js b/js/src/jit-test/tests/ion/bug1866502.js new file mode 100644 index 0000000000..25739cf8b2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1866502.js @@ -0,0 +1,32 @@ +// |jit-test| --ion-offthread-compile=off +// |jit-test| --fast-warmup + +this.__defineSetter__('sum', () => {}) +sum=0; + +options = {fileName: "test.js"} +evaluate("\ + function inline1(i) { return i+0; }\ + function inline2(i) { return i+1; }\ + function inline3(z,i){ return i+5; }\ + function a() {\ + for (let i=0; i<2000; i++) {\ + sum=inline1(i);\ + sum=inline2(i);\ + sum=inline3(sum,i);\ + }\ + }\ +", options); +a(); + +evaluate("\ + function inline4(i) { return i+0; }\ + function inline5(i) { return i+1; }\ + function inline6(z,i){ return i+5; }\ + function b() {\ + for (let i=0; i<2000; i++) {\ + sum=sum+i;\ + }\ + }\ +", options); +b(); diff --git a/js/src/jit-test/tests/ion/bug1870756.js b/js/src/jit-test/tests/ion/bug1870756.js new file mode 100644 index 0000000000..5dca232399 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1870756.js @@ -0,0 +1,8 @@ +// |jit-test| --fast-warmup; --no-threads; --arm-hwcap=vfp + +function foo(n) { return n % 2; } + +with ({}) {} +for (var i = 0; i < 1000; i++) { + foo(0); +} diff --git a/js/src/jit-test/tests/ion/bug1872842.js b/js/src/jit-test/tests/ion/bug1872842.js new file mode 100644 index 0000000000..6884a2bd37 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1872842.js @@ -0,0 +1,12 @@ +class C { + constructor() { + this.c; + } + get c() { + new this.constructor(); + for (let i = 0; i < 5; i++) {} + } +} +try { + new C(); +} catch {} diff --git a/js/src/jit-test/tests/ion/bug1874502.js b/js/src/jit-test/tests/ion/bug1874502.js new file mode 100644 index 0000000000..4c3f242fc0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1874502.js @@ -0,0 +1,8 @@ +// |jit-test| --no-threads; --fast-warmup + +function f(x) { + Math.fround(function () { x; }); +} +for (let i = 0; i < 30; i++) { + f(Math.fround(1)); +} diff --git a/js/src/jit-test/tests/ion/bug470143.js b/js/src/jit-test/tests/ion/bug470143.js new file mode 100644 index 0000000000..0b63d4f0a4 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug470143.js @@ -0,0 +1,6 @@ +// Test that getname caches correctly handle typeof for missing names. +function f() { for (i = 0; i < 2000; ++i) { var k = typeof nosuchvar; } return k; } + +assertEq(f(), "undefined"); +this.nosuchvar = 5; +assertEq(f(), "number"); diff --git a/js/src/jit-test/tests/ion/bug669575-1.js b/js/src/jit-test/tests/ion/bug669575-1.js new file mode 100644 index 0000000000..bf0e05060a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug669575-1.js @@ -0,0 +1,25 @@ +function loopy(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31) { + var v2 = p2; + var v3 = p3; + var v5 = p5; + var v8 = p8; + var v10 = p10; + var v12 = p12; + var v14 = p14; + var v17 = p17; + var v18 = p18; + var v23 = p23; + var v26 = p26; + var v30 = p30; + while (v17) { + while (v5) { + v18 = v10 & v2; + v3 = v23 & v30; + } + while (v12) { + v23 = v26 & v14; + v5 = v8 & v26; + } + } +} +loopy(415,766,601,654,700,0,644,737,873,131,452,247,0,517,202,565,722,0,197,884,586,961,321,922,745,593,648,896,404,206,792,473) diff --git a/js/src/jit-test/tests/ion/bug669575-2.js b/js/src/jit-test/tests/ion/bug669575-2.js new file mode 100644 index 0000000000..d61e992039 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug669575-2.js @@ -0,0 +1,27 @@ +function loopy(p0) +{ + var r1 = p0; + var r2 = p0; + var r3 = p0; + var r4 = p0; + var r5 = p0; + var r6 = p0; + var r7 = p0; + + while (r2) { + while (r2) { + r1 = r4; + r5 = r6 & r1; + r3 = r4 & r3; + } + while (r2) { + r6 = r2; + r3 = r7; + } + } + + return 0; +} +loopy(0); + + diff --git a/js/src/jit-test/tests/ion/bug669575-3.js b/js/src/jit-test/tests/ion/bug669575-3.js new file mode 100644 index 0000000000..d8ad34ffbd --- /dev/null +++ b/js/src/jit-test/tests/ion/bug669575-3.js @@ -0,0 +1,25 @@ +function loopy(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31) { + var v1 = p1; + var v2 = p2; + var v15 = p15; + var v16 = p16; + var v18 = p18; + var v20 = p20; + var v22 = p22; + var v23 = p23; + var v24 = p24; + var v26 = p26; + var v28 = p28; + var v30 = p30; + while (v30) { + while (v2) { + v20 = v23 & v24; + v18 = v2 & v22; + } + while (v26) { + v15 = v1 & v16; + v1 = v28 & v22; + } + } +} +loopy(415,766,0,654,700,132,644,737,873,131,452,247,185,517,202,565,722,991,197,884,586,961,321,922,745,593,0,896,404,206,0,473) diff --git a/js/src/jit-test/tests/ion/bug669950.js b/js/src/jit-test/tests/ion/bug669950.js new file mode 100644 index 0000000000..90d133ca70 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug669950.js @@ -0,0 +1,3 @@ +(function () { + var x = true ? 1 : 2; +})(); diff --git a/js/src/jit-test/tests/ion/bug670484.js b/js/src/jit-test/tests/ion/bug670484.js new file mode 100644 index 0000000000..81422f02f7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug670484.js @@ -0,0 +1,101 @@ +// Call a function with no arguments. +function a_g() { + return 5; +} + +function a_f(g) { + return g(); +} + +a_g(); +assertEq(a_f(a_g), 5); + +/////////////////////////////////////////////////////////////////////////////// +// Call a function with one argument. +function b_g(a) { + return a; +} + +function b_f(h,b) { + return h(5); +} +b_g(5); +assertEq(b_f(b_g,4), 5); + +/////////////////////////////////////////////////////////////////////////////// +// Try to confuse the register allocator. +function c_g(a) { + return a; +} +function c_f(h,b) { + var x = h(5); + var y = x + 1; + var z = h(h(y + x + 2)); + var k = 2 + z + 3; + return h(h(h(k))); +} +c_g(2); // prime g(). +assertEq(c_f(c_g,7), 18) + +/////////////////////////////////////////////////////////////////////////////// +// Fail during unboxing, get kicked to interpreter. +// Interpreter throws an exception; handle it. + +function d_f(a) { + return a(); // Call a known non-object. This fails in unboxing. +} +var d_x = 0; +try { + d_f(1); // Don't assert. +} catch(e) { + d_x = 1; +} +assertEq(d_x, 1); + +/////////////////////////////////////////////////////////////////////////////// +// Try passing an uncompiled function. + +function e_uncompiled(a,b,c) { + return eval("b"); +} +function e_f(h) { + return h(0,h(2,4,6),1); +} +assertEq(e_f(e_uncompiled),4); + +/////////////////////////////////////////////////////////////////////////////// +// Try passing a native function. + +function f_app(f,n) { + return f(n); +} +assertEq(f_app(Math.sqrt, 16), 4); + +/////////////////////////////////////////////////////////////////////////////// +// Handle the case where too few arguments are passed. +function g_g(a,b,c,d,e) { + return e; +} + +function g_f(g) { + return g(2); +} + +g_g(); +assertEq(g_f(g_g), undefined); + +/////////////////////////////////////////////////////////////////////////////// +// Don't assert when given a non-function object. +function h_f(a) { + return a(); +} + +var x = new Object(); +var h_ret = 0; +try { + h_f(x); // don't assert. +} catch (e) { + h_ret = 1; +} +assertEq(h_ret, 1); + diff --git a/js/src/jit-test/tests/ion/bug674507-1.js b/js/src/jit-test/tests/ion/bug674507-1.js new file mode 100644 index 0000000000..c13f4e376d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug674507-1.js @@ -0,0 +1,19 @@ +function branchy(v0,v1) { + var result = 0; + if (v0) { + if (v0 & v0) { + if (v1 & v0) { + } else { + result = v0 & v0 & v1; + } + } else { + if (v0 & v0 & v0) { + result = v1; + } + } + } else { + if (v0 & v1 & v0) { } + } + return result; +} +branchy(932,256,368) diff --git a/js/src/jit-test/tests/ion/bug674507-2.js b/js/src/jit-test/tests/ion/bug674507-2.js new file mode 100644 index 0000000000..90d49b9101 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug674507-2.js @@ -0,0 +1,21 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") +timeout(5); +function f0(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9) { + var v0; + var v1; + do { + if (p1) { + break; + continue; + } else { + } + v0 = (p0 | p7); + } while (v0); + if (((p5 + p3) + (p3 & (v0 | v0)))) { + v1 = p6; + v1 = p4; + v0 = (v1 ^ v1); + (v0 + ((v0 & p5) | v0)); + } +} +f0(2204,465,7905,3902,4658,4110,5703,2199,2681,5291); diff --git a/js/src/jit-test/tests/ion/bug674656.js b/js/src/jit-test/tests/ion/bug674656.js new file mode 100644 index 0000000000..790b5ed0b2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug674656.js @@ -0,0 +1,22 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") +timeout(1); +function f0(p0) { + var v0; + var v1; + var v2; + while (v0) { + do { + if (p0) { + if (v0 ^ p0) { + v1 = v2; + continue; + } + break; + } + } while (p0); + } +} +f0(0); + +/* Don't assert */ + diff --git a/js/src/jit-test/tests/ion/bug674664-1.js b/js/src/jit-test/tests/ion/bug674664-1.js new file mode 100644 index 0000000000..1a0bd8f964 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug674664-1.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") +timeout(5); +function f0() { + var v0; + v0 = v0; + v0 = v0; + v0; + while ((v0 + v0)) { + v0 = (v0 | v0); + } + v0 = (v0 + (v0 + ((v0 + ((v0 ^ v0) & (v0 | v0))) + v0))); + while (v0) { + v0 = v0; + break; + } +} +f0(); + diff --git a/js/src/jit-test/tests/ion/bug674664-2.js b/js/src/jit-test/tests/ion/bug674664-2.js new file mode 100644 index 0000000000..2e9367b4c3 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug674664-2.js @@ -0,0 +1,36 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") +timeout(5); +function f0(p0,p1,p2,p3,p4,p5,p6,p7,p8) { + var v0; + p0; + v0 = p8; + if (v0) { + v0; + v0 = (p5 ^ (p2 ^ p6)); + if (p1) { + } else { + v0 = (((v0 & p6) ^ v0) + (v0 | p3)); + } + ((v0 + v0) + v0); + (v0 + ((p1 + ((v0 & v0) & p1)) & v0)); + p4; + p2; + v0 = v0; + } + p4; + while ((v0 ^ p0)) { + break; + (v0 ^ (p1 + p4)); + continue; + v0; + } + v0; + do { + continue; + v0 = p5; + break; + } while (v0); + v0 = v0; +} +f0(0,5695,59,475,4562,6803,6440,6004,0); + diff --git a/js/src/jit-test/tests/ion/bug674664-3.js b/js/src/jit-test/tests/ion/bug674664-3.js new file mode 100644 index 0000000000..ce5a828d57 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug674664-3.js @@ -0,0 +1,10 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +function f0(p0) { + var v0; + do { + v0 = p0; + } while (v0); + if (v0 & p0) + v0 = (p0 & v0); +} +f0(0); diff --git a/js/src/jit-test/tests/ion/bug674694.js b/js/src/jit-test/tests/ion/bug674694.js new file mode 100644 index 0000000000..2bc9c32ce1 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug674694.js @@ -0,0 +1,64 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") +// Don't assert in the type analyzer. +timeout(5); +function f0(p0,p1,p2,p3) { + var v0; + var v1; + var v2; + var v3; + var v4; + var v5; + var v6; + do { + continue; + } while ((v1 ^ p2)); + if (v5) { + p3; + while (p2) { + p0; + if (p2) { + } else { + break; + v3 = p0; + } + p0; + break; + while (((v3 & v0) | p2)) { + if (p2) { + break; + } + } + } + } else { + v2 = p1; + v3 = p2; + v4; + ((p3 | p3) + (v1 + p1)); + } + v6 = (p0 + p3); + v3 = v3; + v2 = v1; + while (((v3 & p0) + v1)) { + v6 = (v5 + p1); + while (((p3 + (v4 + v3)) + v6)) { + v6 = (v2 | (v1 + (v0 | v2))); + break; + v3 = p0; + v0; + } + do { + while (p2) { + } + v3 = p0; + do { + v2 = v5; + } while (p2); + continue; + } while ((((p2 & p2) & p0) + p2)); + v2 = p0; + v5 = v1; + } + v6 = (v4 & (v5 + v5)); +} +f0(0,0,0,0); + diff --git a/js/src/jit-test/tests/ion/bug675381.js b/js/src/jit-test/tests/ion/bug675381.js new file mode 100644 index 0000000000..30f987bad2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug675381.js @@ -0,0 +1,17 @@ +function f0(p0,p1) { + var v0; + var v1; + while (p0) { + if (p0) { + v1 = v0 + p0; + v0 = v1; + } + v0 = p1; + if (v1) { + while (v1); + break; + } + } +} +f0(); +/* Don't assert. */ diff --git a/js/src/jit-test/tests/ion/bug677066-2.js b/js/src/jit-test/tests/ion/bug677066-2.js new file mode 100644 index 0000000000..14267cda2c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677066-2.js @@ -0,0 +1,7 @@ +function f0(p0) { + var v0; + if (v0) + v0 = p0; + return v0; +} +assertEq(f0(0), undefined); diff --git a/js/src/jit-test/tests/ion/bug677066.js b/js/src/jit-test/tests/ion/bug677066.js new file mode 100644 index 0000000000..8b4a44c478 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677066.js @@ -0,0 +1,9 @@ +function f0() { + var v0 = 1; + if (v0 | 0) { + } else { + v0 = v0 + v0; + } + return v0; +} +assertEq(f0(), 1); diff --git a/js/src/jit-test/tests/ion/bug677073-2.js b/js/src/jit-test/tests/ion/bug677073-2.js new file mode 100644 index 0000000000..48ac1bbe90 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677073-2.js @@ -0,0 +1,11 @@ +// Don't assert. +function f0() { + var v0; + var v1; + while (v1) { + v1 = v0 + v1; + v0 = v1 + v1; + } + return v0; +} +assertEq(f0(), undefined); diff --git a/js/src/jit-test/tests/ion/bug677073.js b/js/src/jit-test/tests/ion/bug677073.js new file mode 100644 index 0000000000..df308b6a81 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677073.js @@ -0,0 +1,9 @@ +// Don't assert. +function a(p0) { + var x = 0; + if (p0|0) { + x = p0; + } + return x; +} +assertEq(a(1), 1); diff --git a/js/src/jit-test/tests/ion/bug677074.js b/js/src/jit-test/tests/ion/bug677074.js new file mode 100644 index 0000000000..4d67823184 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677074.js @@ -0,0 +1,6 @@ +function f0(p0,p1) { + if (p0) { + p1 + p1; + } else if (p0); +} +print(f0(0,0)); diff --git a/js/src/jit-test/tests/ion/bug677080.js b/js/src/jit-test/tests/ion/bug677080.js new file mode 100644 index 0000000000..5a47ae7da0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677080.js @@ -0,0 +1,8 @@ +function f0(p0) { + var v0; + if (v0) + v0 = (p0 & p0); + while (v0 & v0) + break; +} +print(f0(0)); diff --git a/js/src/jit-test/tests/ion/bug677163.js b/js/src/jit-test/tests/ion/bug677163.js new file mode 100644 index 0000000000..f884e79efe --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677163.js @@ -0,0 +1,9 @@ +function f0() { + var v0; + do { + v0 = (v0 & v0) + v0; + continue; + } while (v0); +} +assertEq(f0(), undefined); + diff --git a/js/src/jit-test/tests/ion/bug677455.js b/js/src/jit-test/tests/ion/bug677455.js new file mode 100644 index 0000000000..3d57ae22da --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677455.js @@ -0,0 +1,14 @@ +function f0(p0) { + var v0 = 0; + var v1; + var v2; + if (v1) + v2 = v1 + v1; + v1 | v2; + if (v0) { + while (p0) + v2 = v1 + v2; + v2 = v0; + } +} +assertEq(f0(1), undefined); diff --git a/js/src/jit-test/tests/ion/bug677715-2.js b/js/src/jit-test/tests/ion/bug677715-2.js new file mode 100644 index 0000000000..8ad4b951d7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677715-2.js @@ -0,0 +1,9 @@ +function f0(p0) { + var v0 = 4558.3; + var v1; + var v2; + loop0: while (((v2 + p0) & p0)) { + v2 = (p0 | p0); + } +} +assertEq(f0(7852), undefined); diff --git a/js/src/jit-test/tests/ion/bug677715-3.js b/js/src/jit-test/tests/ion/bug677715-3.js new file mode 100644 index 0000000000..91191e750f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677715-3.js @@ -0,0 +1,10 @@ +function f0(p0) { + var v0 = 3; + var v1; + var v2; + loop0: while (((v2 + p0) & p0)) { + v2 = (p0 | p0); + } + return v0; +} +assertEq(f0(7852), 3); diff --git a/js/src/jit-test/tests/ion/bug677715-4.js b/js/src/jit-test/tests/ion/bug677715-4.js new file mode 100644 index 0000000000..4fbc365b5c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677715-4.js @@ -0,0 +1,10 @@ +function f0(p0) { + var v0 = -16; + var v1; + var v2; + loop0: while (((v2 + p0) & p0)) { + v2 = (p0 | p0); + } + return v0; +} +assertEq(f0(7852), -16); diff --git a/js/src/jit-test/tests/ion/bug677715.js b/js/src/jit-test/tests/ion/bug677715.js new file mode 100644 index 0000000000..8910858dbf --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677715.js @@ -0,0 +1,9 @@ +function f0(p0) { + var v0 = 4558; + var v1; + var v2; + loop0: while (((v2 + p0) & p0)) { + v2 = (p0 | p0); + } +} +assertEq(f0(7852), undefined); diff --git a/js/src/jit-test/tests/ion/bug677730.js b/js/src/jit-test/tests/ion/bug677730.js new file mode 100644 index 0000000000..e4e429e6bd --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677730.js @@ -0,0 +1,4 @@ +function f0(p) { + return p + 1; +} +assertEq(f0(0x7fffffff), 0x80000000); diff --git a/js/src/jit-test/tests/ion/bug677774-1.js b/js/src/jit-test/tests/ion/bug677774-1.js new file mode 100644 index 0000000000..412060be52 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677774-1.js @@ -0,0 +1,16 @@ +function min(a, b) { + + if (a < b) { + return a; + } + else { + return b; + } +} + +assertEq(min(6, 5), 5); +assertEq(min(42, 1337), 42); +assertEq(min(-12, 6), -12) +assertEq(min(5, -6), -6) +assertEq(min(-3, -2), -3) +assertEq(min(-5, -6), -6) diff --git a/js/src/jit-test/tests/ion/bug677774-2.js b/js/src/jit-test/tests/ion/bug677774-2.js new file mode 100644 index 0000000000..a02d011af2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677774-2.js @@ -0,0 +1,8 @@ +function f(a, b) { return a > b; } + +assertEq(f(5, 6), false) +assertEq(f(1337, 42), true) +assertEq(f(-12, 6), false) +assertEq(f(5, -6), true) +assertEq(f(-3, -2), false) +assertEq(f(-5, -6), true) diff --git a/js/src/jit-test/tests/ion/bug677871.js b/js/src/jit-test/tests/ion/bug677871.js new file mode 100644 index 0000000000..d56206948c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug677871.js @@ -0,0 +1,18 @@ +function f0(p0,p1,p2,p3,p4,p5,p6) { + var v0; + var v1; + if (v1) { + do { + v0 = v0 + p3; + v1 = p3 + p3 + v1 + v0; + if (v1) { + v0 = v0 + p1 + p4 + p2 + p0 + v1; + continue; + } + break; + } while (v0); + } + v0 + v1; +} +assertEq(f0(1,2,3,4,5,6), undefined); + diff --git a/js/src/jit-test/tests/ion/bug678106.js b/js/src/jit-test/tests/ion/bug678106.js new file mode 100644 index 0000000000..34ab6584d9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug678106.js @@ -0,0 +1,32 @@ +function f_localinc(x) { + var a = x; + var b = a++; + + var c = b+b+b+b+b+b+b+b+b+b; + return a + c; +} +assertEq(f_localinc(1), 12) +function f_localdec(x) { + var a = x; + var b = a--; + + var c = b+b+b+b+b+b+b+b+b+b; + return a + c; +} +assertEq(f_localdec(1), 10) +function f_inclocal(x) { + var a = x; + var b = ++a; + + var c = b+b+b+b+b+b+b+b+b+b; + return a + c; +} +assertEq(f_inclocal(1), 22) +function f_declocal(x) { + var a = x; + var b = --a; + + var c = b+b+b+b+b+b+b+b+b+b; + return a + c; +} +assertEq(f_declocal(1), 0) diff --git a/js/src/jit-test/tests/ion/bug678239-1.js b/js/src/jit-test/tests/ion/bug678239-1.js new file mode 100644 index 0000000000..8a8f19ac16 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug678239-1.js @@ -0,0 +1,5 @@ +function f(x) { + x = x + 1; + return x; +} +assertEq(f(3), 4) diff --git a/js/src/jit-test/tests/ion/bug678239-2.js b/js/src/jit-test/tests/ion/bug678239-2.js new file mode 100644 index 0000000000..2b16a7cc9d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug678239-2.js @@ -0,0 +1,7 @@ +function f(x, y, z) { + if (1) + x = z; + return x + y; +} + +assertEq(f(0, 2, {}), "[object Object]2") diff --git a/js/src/jit-test/tests/ion/bug678353.js b/js/src/jit-test/tests/ion/bug678353.js new file mode 100644 index 0000000000..714192d12c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug678353.js @@ -0,0 +1,28 @@ +function f_arginc(a) { + var b = a++; + + var c = b+b+b+b+b+b+b+b+b+b; + return a + c; +} +assertEq(f_arginc(1), 12) +function f_argdec(a) { + var b = a--; + + var c = b+b+b+b+b+b+b+b+b+b; + return a + c; +} +assertEq(f_argdec(1), 10) +function f_incarg(a) { + var b = ++a; + + var c = b+b+b+b+b+b+b+b+b+b; + return a + c; +} +assertEq(f_incarg(1), 22) +function f_decarg(a) { + var b = --a; + + var c = b+b+b+b+b+b+b+b+b+b; + return a + c; +} +assertEq(f_decarg(1), 0) diff --git a/js/src/jit-test/tests/ion/bug678620.js b/js/src/jit-test/tests/ion/bug678620.js new file mode 100644 index 0000000000..9c2def3294 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug678620.js @@ -0,0 +1,6 @@ +function f0() { + var v0; + (++v0) ^ (v0--); +} +print(f0()); + diff --git a/js/src/jit-test/tests/ion/bug678625.js b/js/src/jit-test/tests/ion/bug678625.js new file mode 100644 index 0000000000..6fde67ea59 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug678625.js @@ -0,0 +1,8 @@ +function foldme() { + var v0 = 0x7fffffff; + var v1 = 1; + var v2 = v0 + v1; + return v2; +} +assertEq(foldme(),2147483648); + diff --git a/js/src/jit-test/tests/ion/bug678798.js b/js/src/jit-test/tests/ion/bug678798.js new file mode 100644 index 0000000000..7ad4d8e2b5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug678798.js @@ -0,0 +1,9 @@ +function f0() { + var v0; + if ((v0 ^ v0) + 1) { + return 3; + } else { + return 4; + } +} +assertEq(f0(), 3); diff --git a/js/src/jit-test/tests/ion/bug679493-2.js b/js/src/jit-test/tests/ion/bug679493-2.js new file mode 100644 index 0000000000..4cb089c1c2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug679493-2.js @@ -0,0 +1,30 @@ +// IM: Test generated code +function neg(x) { + return -x; +} +assertEq(neg(0), -0); +assertEq(neg(1), -1); +assertEq(neg(-1), 1); +assertEq(neg(-2147483648), 2147483648); +assertEq(neg(-1.3), 1.3); +assertEq(neg(1.45), -1.45); + +// IM: Test constant folding +function neg2(){ + var x = 1; + var y = -x; + return y; +} +assertEq(neg2(), -1); +function neg3(){ + var x = 0; + var y = -x; + return y; +} +assertEq(neg3(), -0); +function neg4(){ + var x = -2147483648; + var y = -x; + return y; +} +assertEq(neg4(), 2147483648); diff --git a/js/src/jit-test/tests/ion/bug679493.js b/js/src/jit-test/tests/ion/bug679493.js new file mode 100644 index 0000000000..91e54a001d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug679493.js @@ -0,0 +1,37 @@ +// Normal checks: +function mul(x, y) { + return x*y; +} +assertEq(mul(1, 2), 2); +assertEq(mul(0, 2), 0); +assertEq(mul(0, -1), -0); +assertEq(mul(100000000, 20000), 2000000000000); +assertEq(mul(0, -2), -0); +assertEq(mul(0, 0), 0); + +// Constant * value checks: +assertEq(function(x){return x*1}(4), 4); +assertEq(function(x){return x*1}(0), 0); +assertEq(function(x){return x*1}(-4), -4); +assertEq(function(x){return x*2}(4), 8); +assertEq(function(x){return x*2}(0), 0); +assertEq(function(x){return x*2}(-4), -8); +assertEq(function(x){return x*2}(2000000000), 4000000000); +assertEq(function(x){return x*5}(4), 20); +assertEq(function(x){return x*5}(0), 0); +assertEq(function(x){return x*5}(-4), -20); +assertEq(function(x){return x*0}(0), 0); +assertEq(function(x){return x*0}(5), 0); +assertEq(function(x){return x*0}(-5), -0); +assertEq(function(x){return x*-5}(4), -20); +assertEq(function(x){return x*-5}(0), -0); +assertEq(function(x){return x*-5}(-4), 20); +assertEq(function(x){return x*20000}(100000000), 2000000000000); + +// Constant folding +assertEq(function(){var x=5; return x*4}(), 20); +assertEq(function(){var x=5; return x*-4}(), -20); +assertEq(function(){var x=0; return x*4}(), 0); +assertEq(function(){var x=0; return x*0}(), 0); +assertEq(function(){var x=0; return x*-4}(), -0); +assertEq(function(){var x=20000; return x*100000000}(), 2000000000000); diff --git a/js/src/jit-test/tests/ion/bug679581.js b/js/src/jit-test/tests/ion/bug679581.js new file mode 100644 index 0000000000..21933ae9c2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug679581.js @@ -0,0 +1,11 @@ +function f0(p0) { + var v0; + var v1 = 0; + var v2 = (v0 ^ v0) + v0; + if (p0 | 0) + v1 = v0; + do break; while (v0); + p0 ^ v1; +} +print(f0(1)); + diff --git a/js/src/jit-test/tests/ion/bug679794.js b/js/src/jit-test/tests/ion/bug679794.js new file mode 100644 index 0000000000..8def13cb62 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug679794.js @@ -0,0 +1,7 @@ +function f0() { + var v0 = 0.1; + while (0) { + v0 = v0 + 1.7; + } +} +f0(); diff --git a/js/src/jit-test/tests/ion/bug680432.js b/js/src/jit-test/tests/ion/bug680432.js new file mode 100644 index 0000000000..f98e028683 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug680432.js @@ -0,0 +1,46 @@ +function f0(p0) { + var v0 = 0.5; + var v1 = 1.5; + var v2 = 2.5; + var v3 = 3.5; + var v4 = 4.5; + var v5 = 5.5; + var v6 = 6.5; + var v7 = 7.5; + var v8 = 8.5; + var v9 = 9.5; + var v10 = 10.5; + var v11 = 11.5; + var v12 = 12.5; + var v13 = 13.5; + var v14 = 14.5; + var v15 = 15.5; + var v16 = 16.5; + // 0.125 is used to avoid the oracle choice for int32. + while (0) { + // p0 = false; + var tmp = v0; + v0 = 0.125 + v0 + v1; + v1 = 0.125 + v1 + v2; + v2 = 0.125 + v2 + v3; + v3 = 0.125 + v3 + v4; + v4 = 0.125 + v4 + v5; + v5 = 0.125 + v5 + v6; + v6 = 0.125 + v6 + v7; + v7 = 0.125 + v7 + v8; + v8 = 0.125 + v8 + v9; + v9 = 0.125 + v9 + v10; + v10 = 0.125 + v10 + v11; + v11 = 0.125 + v11 + v12; + v12 = 0.125 + v12 + v13; + v13 = 0.125 + v13 + v14; + v14 = 0.125 + v14 + v15; + v15 = 0.125 + v15 + v16; + v16 = 0.125 + v16 + tmp; + } + return 0.5 + v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16; +} + +// expect 145 +assertEq(f0(false), 145); + diff --git a/js/src/jit-test/tests/ion/bug680619.js b/js/src/jit-test/tests/ion/bug680619.js new file mode 100644 index 0000000000..f35556cb8f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug680619.js @@ -0,0 +1,13 @@ +function f0() { + var v0 = 5000; + if (v0) { + if (v0) { + v0 = v0 * v0; + } else { + return; + } + v0 = v0 * v0; + } + return v0; +} +assertEq(f0(), 625000000000000); diff --git a/js/src/jit-test/tests/ion/bug680621.js b/js/src/jit-test/tests/ion/bug680621.js new file mode 100644 index 0000000000..358caffcfc --- /dev/null +++ b/js/src/jit-test/tests/ion/bug680621.js @@ -0,0 +1,10 @@ +// Don't assert. +function f0(p0) { + var v0 = 0 < 0; + var v1; + v1 + p0; + if (v0) + v1 = p0 | 0; +} +f0(5000); + diff --git a/js/src/jit-test/tests/ion/bug681185.js b/js/src/jit-test/tests/ion/bug681185.js new file mode 100644 index 0000000000..e93f34b625 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug681185.js @@ -0,0 +1,276 @@ +function test_lsh(x, y) { + return x << y; +} + +function test_ursh(x, y) { + return x >>> y; +} + +function test_rsh(x, y) { + return x >> y; +} + +var x = 1; +assertEq(test_rsh(x, -1), 0); +assertEq(test_rsh(-1, x), -1); +assertEq(test_ursh(x, -1), 0); +assertEq(test_ursh(-1, x), 2147483647); +assertEq(test_lsh(x, -1), -2147483648); +assertEq(test_lsh(-1, x), -2); +assertEq(test_rsh(x, 1), 0); +assertEq(test_rsh(1, x), 0); +assertEq(test_ursh(x, 1), 0); +assertEq(test_ursh(1, x), 0); +assertEq(test_lsh(x, 1), 2); +assertEq(test_lsh(1, x), 2); +assertEq(test_rsh(x, 0), 1); +assertEq(test_rsh(0, x), 0); +assertEq(test_ursh(x, 0), 1); +assertEq(test_ursh(0, x), 0); +assertEq(test_lsh(x, 0), 1); +assertEq(test_lsh(0, x), 0); +assertEq(test_rsh(x, 0xffffffff), 0); +assertEq(test_rsh(0xffffffff, x), -1); +assertEq(test_ursh(x, 0xffffffff), 0); +assertEq(test_ursh(0xffffffff, x), 2147483647); +assertEq(test_lsh(x, 0xffffffff), -2147483648); +assertEq(test_lsh(0xffffffff, x), -2); +assertEq(test_rsh(x, "10.6"), 0); +assertEq(test_rsh("10.6", x), 5); +assertEq(test_ursh(x, "10.6"), 0); +assertEq(test_ursh("10.6", x), 5); +assertEq(test_lsh(x, "10.6"), 1024); +assertEq(test_lsh("10.6", x), 20); +assertEq(test_rsh(x, 2147483648), 1); +assertEq(test_rsh(2147483648, x), -1073741824); +assertEq(test_ursh(x, 2147483648), 1); +assertEq(test_ursh(2147483648, x), 1073741824); +assertEq(test_lsh(x, 2147483648), 1); +assertEq(test_lsh(2147483648, x), 0); +assertEq(test_rsh(x, 4294967296), 1); +assertEq(test_rsh(4294967296, x), 0); +assertEq(test_ursh(x, 4294967296), 1); +assertEq(test_ursh(4294967296, x), 0); +assertEq(test_lsh(x, 4294967296), 1); +assertEq(test_lsh(4294967296, x), 0); +assertEq(test_rsh(x, undefined), 1); +assertEq(test_rsh(undefined, x), 0); +assertEq(test_ursh(x, undefined), 1); +assertEq(test_ursh(undefined, x), 0); +assertEq(test_lsh(x, undefined), 1); +assertEq(test_lsh(undefined, x), 0); +assertEq(test_rsh(x, null), 1); +assertEq(test_rsh(null, x), 0); +assertEq(test_ursh(x, null), 1); +assertEq(test_ursh(null, x), 0); +assertEq(test_lsh(x, null), 1); +assertEq(test_lsh(null, x), 0); +assertEq(test_rsh(x, false), 1); +assertEq(test_rsh(false, x), 0); +assertEq(test_ursh(x, false), 1); +assertEq(test_ursh(false, x), 0); +assertEq(test_lsh(x, false), 1); +assertEq(test_lsh(false, x), 0); +assertEq(test_rsh(x, true), 0); +assertEq(test_rsh(true, x), 0); +assertEq(test_ursh(x, true), 0); +assertEq(test_ursh(true, x), 0); +assertEq(test_lsh(x, true), 2); +assertEq(test_lsh(true, x), 2); +assertEq(test_rsh(x, -1.5), 0); +assertEq(test_rsh(-1.5, x), -1); +assertEq(test_ursh(x, -1.5), 0); +assertEq(test_ursh(-1.5, x), 2147483647); +assertEq(test_lsh(x, -1.5), -2147483648); +assertEq(test_lsh(-1.5, x), -2); + +var x = 0; +assertEq(test_rsh(x, -1), 0); +assertEq(test_rsh(-1, x), -1); +assertEq(test_ursh(x, -1), 0); +assertEq(test_ursh(-1, x), 4294967295); +assertEq(test_lsh(x, -1), 0); +assertEq(test_lsh(-1, x), -1); +assertEq(test_rsh(x, 1), 0); +assertEq(test_rsh(1, x), 1); +assertEq(test_ursh(x, 1), 0); +assertEq(test_ursh(1, x), 1); +assertEq(test_lsh(x, 1), 0); +assertEq(test_lsh(1, x), 1); +assertEq(test_rsh(x, 0), 0); +assertEq(test_rsh(0, x), 0); +assertEq(test_ursh(x, 0), 0); +assertEq(test_ursh(0, x), 0); +assertEq(test_lsh(x, 0), 0); +assertEq(test_lsh(0, x), 0); +assertEq(test_rsh(x, 0xffffffff), 0); +assertEq(test_rsh(0xffffffff, x), -1); +assertEq(test_ursh(x, 0xffffffff), 0); +assertEq(test_ursh(0xffffffff, x), 4294967295); +assertEq(test_lsh(x, 0xffffffff), 0); +assertEq(test_lsh(0xffffffff, x), -1); +assertEq(test_rsh(x, "10.6"), 0); +assertEq(test_rsh("10.6", x), 10); +assertEq(test_ursh(x, "10.6"), 0); +assertEq(test_ursh("10.6", x), 10); +assertEq(test_lsh(x, "10.6"), 0); +assertEq(test_lsh("10.6", x), 10); +assertEq(test_rsh(x, 2147483648), 0); +assertEq(test_rsh(2147483648, x), -2147483648); +assertEq(test_ursh(x, 2147483648), 0); +assertEq(test_ursh(2147483648, x), 2147483648); +assertEq(test_lsh(x, 2147483648), 0); +assertEq(test_lsh(2147483648, x), -2147483648); +assertEq(test_rsh(x, 4294967296), 0); +assertEq(test_rsh(4294967296, x), 0); +assertEq(test_ursh(x, 4294967296), 0); +assertEq(test_ursh(4294967296, x), 0); +assertEq(test_lsh(x, 4294967296), 0); +assertEq(test_lsh(4294967296, x), 0); +assertEq(test_rsh(x, undefined), 0); +assertEq(test_rsh(undefined, x), 0); +assertEq(test_ursh(x, undefined), 0); +assertEq(test_ursh(undefined, x), 0); +assertEq(test_lsh(x, undefined), 0); +assertEq(test_lsh(undefined, x), 0); +assertEq(test_rsh(x, null), 0); +assertEq(test_rsh(null, x), 0); +assertEq(test_ursh(x, null), 0); +assertEq(test_ursh(null, x), 0); +assertEq(test_lsh(x, null), 0); +assertEq(test_lsh(null, x), 0); +assertEq(test_rsh(x, false), 0); +assertEq(test_rsh(false, x), 0); +assertEq(test_ursh(x, false), 0); +assertEq(test_ursh(false, x), 0); +assertEq(test_lsh(x, false), 0); +assertEq(test_lsh(false, x), 0); +assertEq(test_rsh(x, true), 0); +assertEq(test_rsh(true, x), 1); +assertEq(test_ursh(x, true), 0); +assertEq(test_ursh(true, x), 1); +assertEq(test_lsh(x, true), 0); +assertEq(test_lsh(true, x), 1); +assertEq(test_rsh(x, -1.5), 0); +assertEq(test_rsh(-1.5, x), -1); +assertEq(test_ursh(x, -1.5), 0); +assertEq(test_ursh(-1.5, x), 4294967295); +assertEq(test_lsh(x, -1.5), 0); +assertEq(test_lsh(-1.5, x), -1); + +var x = -1; +assertEq(test_rsh(x, -1), -1); +assertEq(test_rsh(-1, x), -1); +assertEq(test_ursh(x, -1), 1); +assertEq(test_ursh(-1, x), 1); +assertEq(test_lsh(x, -1), -2147483648); +assertEq(test_lsh(-1, x), -2147483648); +assertEq(test_rsh(x, 1), -1); +assertEq(test_rsh(1, x), 0); +assertEq(test_ursh(x, 1), 2147483647); +assertEq(test_ursh(1, x), 0); +assertEq(test_lsh(x, 1), -2); +assertEq(test_lsh(1, x), -2147483648); +assertEq(test_rsh(x, 0), -1); +assertEq(test_rsh(0, x), 0); +assertEq(test_ursh(x, 0), 4294967295); +assertEq(test_ursh(0, x), 0); +assertEq(test_lsh(x, 0), -1); +assertEq(test_lsh(0, x), 0); +assertEq(test_rsh(x, 0xffffffff), -1); +assertEq(test_rsh(0xffffffff, x), -1); +assertEq(test_ursh(x, 0xffffffff), 1); +assertEq(test_ursh(0xffffffff, x), 1); +assertEq(test_lsh(x, 0xffffffff), -2147483648); +assertEq(test_lsh(0xffffffff, x), -2147483648); +assertEq(test_rsh(x, "10.6"), -1); +assertEq(test_rsh("10.6", x), 0); +assertEq(test_ursh(x, "10.6"), 4194303); +assertEq(test_ursh("10.6", x), 0); +assertEq(test_lsh(x, "10.6"), -1024); +assertEq(test_lsh("10.6", x), 0); +assertEq(test_rsh(x, 2147483648), -1); +assertEq(test_rsh(2147483648, x), -1); +assertEq(test_ursh(x, 2147483648), 4294967295); +assertEq(test_ursh(2147483648, x), 1); +assertEq(test_lsh(x, 2147483648), -1); +assertEq(test_lsh(2147483648, x), 0); +assertEq(test_rsh(x, 4294967296), -1); +assertEq(test_rsh(4294967296, x), 0); +assertEq(test_ursh(x, 4294967296), 4294967295); +assertEq(test_ursh(4294967296, x), 0); +assertEq(test_lsh(x, 4294967296), -1); +assertEq(test_lsh(4294967296, x), 0); +assertEq(test_rsh(x, undefined), -1); +assertEq(test_rsh(undefined, x), 0); +assertEq(test_ursh(x, undefined), 4294967295); +assertEq(test_ursh(undefined, x), 0); +assertEq(test_lsh(x, undefined), -1); +assertEq(test_lsh(undefined, x), 0); +assertEq(test_rsh(x, null), -1); +assertEq(test_rsh(null, x), 0); +assertEq(test_ursh(x, null), 4294967295); +assertEq(test_ursh(null, x), 0); +assertEq(test_lsh(x, null), -1); +assertEq(test_lsh(null, x), 0); +assertEq(test_rsh(x, false), -1); +assertEq(test_rsh(false, x), 0); +assertEq(test_ursh(x, false), 4294967295); +assertEq(test_ursh(false, x), 0); +assertEq(test_lsh(x, false), -1); +assertEq(test_lsh(false, x), 0); +assertEq(test_rsh(x, true), -1); +assertEq(test_rsh(true, x), 0); +assertEq(test_ursh(x, true), 2147483647); +assertEq(test_ursh(true, x), 0); +assertEq(test_lsh(x, true), -2); +assertEq(test_lsh(true, x), -2147483648); +assertEq(test_rsh(x, -1.5), -1); +assertEq(test_rsh(-1.5, x), -1); +assertEq(test_ursh(x, -1.5), 1); +assertEq(test_ursh(-1.5, x), 1); +assertEq(test_lsh(x, -1.5), -2147483648); +assertEq(test_lsh(-1.5, x), -2147483648); + + + +assertEq(test_ursh(0, -2147483648), 0); +assertEq(test_ursh(0, 2147483648), 0); +assertEq(test_ursh(0, 45), 0); +assertEq(test_ursh(0, -45), 0); +assertEq(test_ursh(100, -2147483648), 100); +assertEq(test_ursh(100, 2147483648), 100); +assertEq(test_ursh(100, 45), 0); +assertEq(test_ursh(100, -45), 0); +assertEq(test_ursh(-100, -2147483648), 4294967196); +assertEq(test_ursh(-100, 2147483648), 4294967196); +assertEq(test_ursh(-100, 45), 524287); +assertEq(test_ursh(-100, -45), 8191); + + + +function test1() { + var i = 0; + return 2147483647 >>> i; +} +assertEq(test1(), 2147483647); +function test2() { + var i = 1; + return 2147483647 >>> i; +} +assertEq(test2(), 1073741823); +function test3() { + var i = 0; + return -1 >>> i; +} +assertEq(test3(), 4294967295); +function test4() { + var i = 3; + return -1 >>> i; +} +assertEq(test4(), 536870911); +function test5() { + var i = 0; + return -3648 >>> i; +} +assertEq(test5(), 4294963648); diff --git a/js/src/jit-test/tests/ion/bug682210.js b/js/src/jit-test/tests/ion/bug682210.js new file mode 100644 index 0000000000..974dc8dc39 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug682210.js @@ -0,0 +1,7 @@ +function test() { + for (var x = 1; x < 1; x++) { + for (var y=1; y < 1; y++) { + } + } +} +test(); diff --git a/js/src/jit-test/tests/ion/bug684362.js b/js/src/jit-test/tests/ion/bug684362.js new file mode 100644 index 0000000000..9a83b053d7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug684362.js @@ -0,0 +1,14 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +function f(a) { + var k = a; + T: for (;;) { + for (;;) { + for (;;) { + if (k) + continue; + break T; + } + } + } +} +f(0); diff --git a/js/src/jit-test/tests/ion/bug684384.js b/js/src/jit-test/tests/ion/bug684384.js new file mode 100644 index 0000000000..b3f3f45437 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug684384.js @@ -0,0 +1,58 @@ +// Labeled break tests. +function f1() { + foo: + if ([1]) { + bar: + for (var i=0; i<100; i++) { + if (i > 60) + break foo; + } + assertEq(0, 1); + } + assertEq(i, 61); + return true; +} +assertEq(f1(), true); + +// Label with no breaks. +function f2() { + foo: + if ([1]) { + for (var i=0; i<100; i++) { + } + } + assertEq(i, 100); + return true; +} +assertEq(f2(), true); + +// No breaks and early return. +function f3() { + foo: { + if (true) { + for (var i=0; i<100; i++) { + } + } + return false; + } + assertEq(i, 100); + return true; +} +assertEq(f3(), false); + +// Multiple breaks. +function f4() { + foo: { + if (true) { + for (var i=0; i<100; i++) + if (i > 70) + break foo; + if (i > 80) + break foo; + } + break foo; + } + assertEq(i, 71); + return true; +} +assertEq(f4(), true); diff --git a/js/src/jit-test/tests/ion/bug691597.js b/js/src/jit-test/tests/ion/bug691597.js new file mode 100644 index 0000000000..348c8617dc --- /dev/null +++ b/js/src/jit-test/tests/ion/bug691597.js @@ -0,0 +1,5 @@ +// |jit-test| error: TypeError +function f() { + -null(); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug691603.js b/js/src/jit-test/tests/ion/bug691603.js new file mode 100644 index 0000000000..6c27b80e8a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug691603.js @@ -0,0 +1,11 @@ +// |jit-test| error: ReferenceError +function bitsinbyte(b) { + while(m<0x100) { } +} +function TimeFunc(func) { + for(var y=0; y<256; y++) func(y); +} +function nestedExit2() { + TimeFunc(bitsinbyte); +} +assertEq(nestedExit2(), "ok"); diff --git a/js/src/jit-test/tests/ion/bug691747.js b/js/src/jit-test/tests/ion/bug691747.js new file mode 100644 index 0000000000..117899d69d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug691747.js @@ -0,0 +1,11 @@ +function reportCompare(actual) { return - ++actual + "'"; } +var UBound = 0; +var actualvalues = []; +for (var li = 0; li < 6; ++li) addThis(); +function addThis() { + UBound++; + for (var i=0; i= 0) ? src : "default:\n"; + } +} +test1(); diff --git a/js/src/jit-test/tests/ion/bug695017.js b/js/src/jit-test/tests/ion/bug695017.js new file mode 100644 index 0000000000..44a5dbc89d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug695017.js @@ -0,0 +1,7 @@ +function f() { + var n = null; + return n++; +} + +print(f()); +assertEq(f(), 0); diff --git a/js/src/jit-test/tests/ion/bug701956.js b/js/src/jit-test/tests/ion/bug701956.js new file mode 100644 index 0000000000..f073e17f9b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug701956.js @@ -0,0 +1,13 @@ +function test() { + function f(arr, i) { + arr[3] |= i; + } + + var a = [1, 2, 3, 4, 5]; + + for (var i=0; i<100; i++) { + f(a, i * 2); + } + assertEq(a[3], 254); +} +test(); diff --git a/js/src/jit-test/tests/ion/bug701958.js b/js/src/jit-test/tests/ion/bug701958.js new file mode 100644 index 0000000000..6320ef3a6c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug701958.js @@ -0,0 +1,12 @@ +function f(v) +{ + return v.x + v.x + v.y; +} + +assertEq(f({ x: 1, y: 2 }), 4); +assertEq(f({ __proto__: {x: 1, y: 2} }), 4); +assertEq(f({ __proto__: {x: 0, y: 2}, x: 1 }), 4); + +// Ensure there is no aliasing. +var global = 1; +assertEq(f(Object.defineProperty({ y : 2 }, "x", { get : function(){ return global++; } })), 5); diff --git a/js/src/jit-test/tests/ion/bug701964.js b/js/src/jit-test/tests/ion/bug701964.js new file mode 100644 index 0000000000..a3f9f0fd2c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug701964.js @@ -0,0 +1,36 @@ +load(libdir + 'array-compare.js'); + +function f(v) { + return v.length; +} + +function g(v) { + return v.length; +} + +function h(v) { + return v.length; +} + +function aliasCheck(v) { + v[0] = v.length; + v[1] = v.length; + v[2] = v.length; + return v; +} + +for(let i = 41; i; i--) { + assertEq(f([]), 0); + assertEq(f([0]), 1); + assertEq(f([0, 1]), 2); + assertEq(f([0, 1, 2]), 3); + assertEq(g(""), 0); + assertEq(g("1"), 1); + assertEq(g("12"), 2); + assertEq(g("123"), 3); + assertEq(h({}), undefined); + assertEq(h({a: 1}), undefined); + assertEq(h({a: 1, b: 2}), undefined); + assertEq(h({a: 1, b: 2, length: 3}), 3); + assertEq(arraysEqual(aliasCheck([0, 1, 2]), [3, 3, 3]), true); +} diff --git a/js/src/jit-test/tests/ion/bug703376.js b/js/src/jit-test/tests/ion/bug703376.js new file mode 100644 index 0000000000..cc88c6011c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug703376.js @@ -0,0 +1,29 @@ +var global = 1; + +function test1(x) { + global = 2; + var k = global; + global = x; + global = x + 1; + k = global + global; + return k; +} + +for (var i=0; i<60; i++) { + assertEq(test1(i), i + 1 + i + 1); +} + +function test2(x) { + global = 2; + var k = global; + + for (var i=0; i<10; i++) { + k = global; + global = i + x; + } + return k; +} + +for (i=0; i<50; i++) { + assertEq(test2(i), i + 8); +} diff --git a/js/src/jit-test/tests/ion/bug705351.js b/js/src/jit-test/tests/ion/bug705351.js new file mode 100644 index 0000000000..10073b8de2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug705351.js @@ -0,0 +1,38 @@ +var a = 1.1; +function f1() { + return a + 0.2; +} +function test1() { + for (var i=0; i<100; i++) { + assertEq(f1(), 1.3); + } + a = 20; + assertEq(f1(), 20.2); +} +test1(); + +function f2(arr) { + return arr[2] + 0.2; +} +function test2() { + var a = [1.1, 2.2, 3.3, 4.4]; + for (var i=0; i<100; i++) { + assertEq(f2(a), 3.5); + } + a[2] = 123; + assertEq(f2(a), 123.2); +} +test2(); + +function f3(arr, idx) { + return arr[idx] + 0.2; +} +function test3() { + var a = [1.1, 2.2, 3.3, 4.4]; + for (var i=0; i<100; i++) { + assertEq(f3(a, 2), 3.5); + } + a[2] = 123; + assertEq(f3(a, 2), 123.2); +} +test3(); diff --git a/js/src/jit-test/tests/ion/bug706692.js b/js/src/jit-test/tests/ion/bug706692.js new file mode 100644 index 0000000000..d302545903 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug706692.js @@ -0,0 +1,21 @@ +// |jit-test| error: TypeError + +// Bailout from a stack with multiple ion frames of different flavors. +function f(obj,b,c) { + return obj(); // Throw error. +} + +function g(f,obj) { + return f(obj); // Call f() with insufficient arguments, generating a RectifierFrame. +} + +function h(f, g, obj) { + return g(f, obj); // EntryFrame. Generate a JSFrame. +} + +f(); // Prime f(). +g(); // Prime g(). +var obj = new Object(); + +h(f,g,obj); + diff --git a/js/src/jit-test/tests/ion/bug706699.js b/js/src/jit-test/tests/ion/bug706699.js new file mode 100644 index 0000000000..26370f3976 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug706699.js @@ -0,0 +1,16 @@ +// |jit-test| error: 2 +function g(x, y) { + return x + y; +} + +function f(g, x, y) { + // return x + y; + return g(x, y); +} + +assertEq(g(4, 5), 9); + +obj = { valueOf: function () { throw 2; } }; + +print(f(g, obj, 2)); + diff --git a/js/src/jit-test/tests/ion/bug710983.js b/js/src/jit-test/tests/ion/bug710983.js new file mode 100644 index 0000000000..86e47460a1 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug710983.js @@ -0,0 +1,19 @@ +function g() { } + +g(); + + +function f(a, g) { + var x; + if (a) { + x = 12; + print(a); + x = a + 19; + } else { + x = 20 + a; + g(a); + x += a; + } + return a + x + 12; +} +assertEq(f(0, g), 32); diff --git a/js/src/jit-test/tests/ion/bug714397.js b/js/src/jit-test/tests/ion/bug714397.js new file mode 100644 index 0000000000..6da4fac954 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug714397.js @@ -0,0 +1,17 @@ +// Don't assert. Reduced from a modified SS 1.0 crypto-md5. + +function g() +{ + return 0; +} + +function f() +{ + for(var i = 0; i < 100; i++) { + g(0); + g(0); + } +} + + +f(); diff --git a/js/src/jit-test/tests/ion/bug716504.js b/js/src/jit-test/tests/ion/bug716504.js new file mode 100644 index 0000000000..dff77c6932 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug716504.js @@ -0,0 +1,10 @@ +function f(x, from, to) { + var y = 0; + for (var i=from; i= null, true); + } +} +f(10); +f(0); diff --git a/js/src/jit-test/tests/ion/bug723271.js b/js/src/jit-test/tests/ion/bug723271.js new file mode 100644 index 0000000000..c261652b63 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug723271.js @@ -0,0 +1,23 @@ +function addConstraint(blaat) { + return blaat.v1 +} + +function ScaleConstraint() { + this.direction = null + this.v1 = {}; + addConstraint(this); +} + +function EqualityConstraint() { + this.v1 = {}; + addConstraint(this); +} + +function deltaBlue() { + new EqualityConstraint(); + new ScaleConstraint(); +} + +for (var n = 0; n<100; n++) { + deltaBlue() +} diff --git a/js/src/jit-test/tests/ion/bug724517.js b/js/src/jit-test/tests/ion/bug724517.js new file mode 100644 index 0000000000..1f3a8d4190 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug724517.js @@ -0,0 +1,10 @@ +function fannkuch() { + var perm = []; + var k = 3.3; + for (var j = 0; j < 10; j++) { + var k2 = NaN >> 1; + for (var i = 0; i < 10; i++) { } + perm[0]; + } +} +fannkuch(); diff --git a/js/src/jit-test/tests/ion/bug724530.js b/js/src/jit-test/tests/ion/bug724530.js new file mode 100644 index 0000000000..47b0a892c4 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug724530.js @@ -0,0 +1,10 @@ +function fannkuch() { + var perm = []; + var k = undefined; + for (var j = 0; j < 50; j++) { + for (var i = 0; i < 0; i++) { + perm[k - 1] = 0; + } + } +} +fannkuch(); diff --git a/js/src/jit-test/tests/ion/bug724562.js b/js/src/jit-test/tests/ion/bug724562.js new file mode 100644 index 0000000000..b59c9917e7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug724562.js @@ -0,0 +1,15 @@ +function fannkuch(n) { + var perm1 = Array(n); + for (var i = 0; i < n; i++) { }; + var r = n; + do { + while (r != 1) { r--; } + for (var z=0; z<50; z++) { + while (i < r) { + perm1[i]; + i++; + } + } + } while(false); +} +fannkuch(18); diff --git a/js/src/jit-test/tests/ion/bug724654.js b/js/src/jit-test/tests/ion/bug724654.js new file mode 100644 index 0000000000..59e552c66b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug724654.js @@ -0,0 +1,14 @@ +de = N = K = E = l = p = n = function() {} +function e() {} +function tryItOut(code) { + d = f = Function(code) + f() +} +function t() {} +function ne() {} +a = eval +function r() {} +s = v = false +function f4() {} +o = 9 +tryItOut("for(b in((Object.create)(this))){}") diff --git a/js/src/jit-test/tests/ion/bug724788.js b/js/src/jit-test/tests/ion/bug724788.js new file mode 100644 index 0000000000..9b2115de20 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug724788.js @@ -0,0 +1,29 @@ +// |jit-test| error: ReferenceError +o0 = TypeError.prototype.__proto__ +o1 = new Proxy({}, {}) +o13 = {}.__proto__ +var o15 = Object.prototype +o31 = (new Uint32Array(100)).buffer +function f2(o) { + try { + ({ + x: [eval("o")][0] + }.x.__defineGetter__("toString", function() { + return o26; + })); + } catch (e) {} +} +function f3(o) { + try { + +o31 + } catch (e) {} +} +function f19(o) { + for (var x in eval("o")) { + eval("o")[x]; + } +} +f2(o15) +f3(o0) +f19(o13) + diff --git a/js/src/jit-test/tests/ion/bug724944.js b/js/src/jit-test/tests/ion/bug724944.js new file mode 100644 index 0000000000..0b73ca7a77 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug724944.js @@ -0,0 +1,18 @@ +function TestCase(n, d, e, a) { + return function writeHeaderToLog( string ) {}; +} +var SECTION = "15.1.2.5-2"; +for ( var CHARCODE = 0; CHARCODE < 256; CHARCODE += 16 ) { + new TestCase( SECTION, unescape( "%" + (ToHexString(CHARCODE)).substring(0,1) ) ); +} +function ToHexString( n ) { + var hex = new Array(); + for ( var mag = 1; Math.pow(16,mag) <= n ; mag++ ) { } + for ( index = 0, mag -= 1; mag > 0; index++, mag-- ) { } + var string =""; + switch ( hex[index] ) { + case 10: + string += "A"; + } + return string; +} diff --git a/js/src/jit-test/tests/ion/bug724975.js b/js/src/jit-test/tests/ion/bug724975.js new file mode 100644 index 0000000000..745e2db409 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug724975.js @@ -0,0 +1,11 @@ +LastIndexOf("hello", "ll", 5); +function LastIndexOf(string, search, position) { + var j = 0; + for (;;) { + for (;;) { + if (string != search) break; + } + if (j++ > 100) + break; + } +} diff --git a/js/src/jit-test/tests/ion/bug724976.js b/js/src/jit-test/tests/ion/bug724976.js new file mode 100644 index 0000000000..01b7f0421e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug724976.js @@ -0,0 +1,4 @@ +function g(a) {} +for(var i = 0; i < 10000; i++) { + g(0 || 1); +} diff --git a/js/src/jit-test/tests/ion/bug724999.js b/js/src/jit-test/tests/ion/bug724999.js new file mode 100644 index 0000000000..56f0eb7ec8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug724999.js @@ -0,0 +1,7 @@ +function nsieve(m){ + for (var z=0; z<10; z++) { + for (var k=0; k> addexp ); + } +} +function ToInt32BitString( n ) { + var b = ""; + return b; +} +function SignedRightShift( s, a ) { + s = ToInt32BitString( s ); + s = s.substring( 0, 1 | Math && 0xffffffff + 2 ); +} diff --git a/js/src/jit-test/tests/ion/bug729788.js b/js/src/jit-test/tests/ion/bug729788.js new file mode 100644 index 0000000000..8297e2a1ea --- /dev/null +++ b/js/src/jit-test/tests/ion/bug729788.js @@ -0,0 +1,25 @@ +var msPerDay = 86400000; +function Day(t) { + return Math.floor(t / msPerDay); +} +function YearFromTime(t) { + sign = 1 + year = sign < 0 +} +function MonthFromTime(t) { + DayWithinYear(t) + function DayWithinYear(t) { return Day(t) - YearFromTime(); } + function WeekDay(t) { + weekday = Day(t) + 4 + return (weekday < 0 ? weekday : weekday); + } + time = year + for (var last_sunday = time; WeekDay(last_sunday) == 0;) {} +} +addTestCase(0, 946684800000); +function addTestCase(startms, newms) { + UTCDateFromTime(newms) +} +function UTCDateFromTime(t) { + MonthFromTime(t) +} diff --git a/js/src/jit-test/tests/ion/bug729795.js b/js/src/jit-test/tests/ion/bug729795.js new file mode 100644 index 0000000000..e2050a9dff --- /dev/null +++ b/js/src/jit-test/tests/ion/bug729795.js @@ -0,0 +1,2 @@ +var summary = 'TM: never abort on =='; +for(i=0;i<500;++(summary)) { var r = (void 0) == null; break;} diff --git a/js/src/jit-test/tests/ion/bug729798.js b/js/src/jit-test/tests/ion/bug729798.js new file mode 100644 index 0000000000..470a6c788c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug729798.js @@ -0,0 +1,6 @@ +function q2(n) { + var c = []; + var e = /foo$/.test(c) && c.match(/(.*)foo$/); +} +for (var x = 500; x < 5000; x += 500) +var y2 = q2(x); diff --git a/js/src/jit-test/tests/ion/bug729814.js b/js/src/jit-test/tests/ion/bug729814.js new file mode 100644 index 0000000000..d6a6080cba --- /dev/null +++ b/js/src/jit-test/tests/ion/bug729814.js @@ -0,0 +1,9 @@ +j = 0; +out1: +for (i = 0; ; j++) + if (j == 50) + break out1; +while (++i < 100) {} + +assertEq(j, 50); +assertEq(i, 100); diff --git a/js/src/jit-test/tests/ion/bug729884.js b/js/src/jit-test/tests/ion/bug729884.js new file mode 100644 index 0000000000..f6a7304e61 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug729884.js @@ -0,0 +1,3 @@ +function x() {} +evaluate("var x = JSON.stringify({});"); +evaluate("for (a = 0; a < 13; ++a) { if (!x) { } }"); diff --git a/js/src/jit-test/tests/ion/bug729899-1.js b/js/src/jit-test/tests/ion/bug729899-1.js new file mode 100644 index 0000000000..b91e0d5cde --- /dev/null +++ b/js/src/jit-test/tests/ion/bug729899-1.js @@ -0,0 +1,19 @@ +var lfcode = new Array(); +lfcode.push("function addThis() {}"); +lfcode.push("\ +var UBound = 0;\ +var expectedvalues = [];\ +addThis();\ +function addThis() {\ + expectedvalues[UBound] = expect;\ + UBound++;\ +}\ +"); +lfcode.push("\ + var expect = 'No Crash';\ + for (var i = 0; i < (2 << 16); i++) addThis();\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + try { evaluate(file); } catch(lfVare) {} +} diff --git a/js/src/jit-test/tests/ion/bug729899-2.js b/js/src/jit-test/tests/ion/bug729899-2.js new file mode 100644 index 0000000000..f23c868d8a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug729899-2.js @@ -0,0 +1,9 @@ +load(libdir + "immutable-prototype.js"); + +function f2() { + if (globalPrototypeChainIsMutable()) + __proto__ = null; +} + +for (var j = 0; j < 50; j++) + f2(); diff --git a/js/src/jit-test/tests/ion/bug729902-1.js b/js/src/jit-test/tests/ion/bug729902-1.js new file mode 100644 index 0000000000..5b214fb98b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug729902-1.js @@ -0,0 +1,11 @@ +var x = 2; +outer: +while (x == 10) { + while (x == 10) { + if (x < (null )) + continue outer; + while (x < 10) { + ((function() {}).abstract) = 0; + } + } +} diff --git a/js/src/jit-test/tests/ion/bug729902-2.js b/js/src/jit-test/tests/ion/bug729902-2.js new file mode 100644 index 0000000000..38e6bdbeab --- /dev/null +++ b/js/src/jit-test/tests/ion/bug729902-2.js @@ -0,0 +1,13 @@ +function f() { + var i = 0; + outer: + for (var x = 0; x < 10; x++) { + while (true) { + if (i > 150) + continue outer; + i++; + } + } + assertEq(i, 151); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug730115.js b/js/src/jit-test/tests/ion/bug730115.js new file mode 100644 index 0000000000..8fb04e9719 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug730115.js @@ -0,0 +1,5 @@ +for (var power = 0; power < 20; power++) { + for (var count = 0; count < 1000; count++) { } + continue; + gc( start, (new Date(t)).getTimezoneOffset() ); +} diff --git a/js/src/jit-test/tests/ion/bug730152.js b/js/src/jit-test/tests/ion/bug730152.js new file mode 100644 index 0000000000..fe4ecfe14f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug730152.js @@ -0,0 +1,4 @@ +if (typeof verifybarriers !== "undefined") { + for (var i = 0; i < 30; i++) {} + for (i in Function("gc(verifybarriers()); yield")()) {} +} diff --git a/js/src/jit-test/tests/ion/bug730977-implement-jsop-delprop.js b/js/src/jit-test/tests/ion/bug730977-implement-jsop-delprop.js new file mode 100644 index 0000000000..3939c7d383 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug730977-implement-jsop-delprop.js @@ -0,0 +1,51 @@ + +function makeThing(i) +{ + var thing = {}; + thing.foo = i; + thing.bar = "bar_" + i; + Object.defineProperty(thing, 'baz', {'configurable':false, 'value':[i]}); + return thing; +} +function makeArray(count) +{ + var arr = new Array(count); + for(var i = 0; i < count; i++) { + arr[i] = makeThing(i); + } + return arr; +} +function delBar(obj) +{ + assertEq(Object.getOwnPropertyDescriptor(obj, 'bar') === undefined, false); + assertEq(delete obj.bar, true); + assertEq(Object.getOwnPropertyDescriptor(obj, 'bar') === undefined, true); +} +function delBaz(obj) +{ + var s = delete obj.baz; + assertEq(Object.getOwnPropertyDescriptor(obj, 'baz') === undefined, false); + assertEq(delete obj.baz, false); + assertEq(Object.getOwnPropertyDescriptor(obj, 'baz') === undefined, false); +} +function delNonexistentThingy(obj) +{ + assertEq(Object.getOwnPropertyDescriptor(obj, 'thingy') === undefined, true); + assertEq(delete obj.thingy, true); + assertEq(Object.getOwnPropertyDescriptor(obj, 'thingy') === undefined, true); +} +function testDelProp() +{ + var arr = makeArray(10000); + for(var i = 0; i < 10000; i++) { + var obj = arr[i]; + assertEq(Object.getOwnPropertyDescriptor(obj, 'foo') === undefined, false); + assertEq(delete obj.foo, true); + assertEq(Object.getOwnPropertyDescriptor(obj, 'foo') === undefined, true); + delBar(obj); + delBaz(obj); + delNonexistentThingy(obj); + } +} + +testDelProp(); diff --git a/js/src/jit-test/tests/ion/bug731820.js b/js/src/jit-test/tests/ion/bug731820.js new file mode 100644 index 0000000000..1b34688e68 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug731820.js @@ -0,0 +1,29 @@ +function BigInteger(a, b, c) { + this.array = new Array(); + if (a != null) { + var this_array = this.array; + this.t = 0; + var i = a.length; + while (--i >= 0) { + this_array[this.t++] = 0; + } + } +} +function bnpCopyTo(r, g) { + var this_array = g.array; + for (var i = g.t - 1; i >= 0; --i) + r.array[i] = g.array[i]; + r.t = g.t; +} +function montConvert(x) { + var r = new BigInteger(null); + r.t = 56; + return r; +} +var ba = new Array(); +a = new BigInteger(ba); +new BigInteger("afdsafdsafdsaafdsafdsafdsafdsafdsafdsafdsafdsafdsafdsfds"); +g = montConvert(a); +var r = new BigInteger(null); +bnpCopyTo(r, g); + diff --git a/js/src/jit-test/tests/ion/bug732758.js b/js/src/jit-test/tests/ion/bug732758.js new file mode 100644 index 0000000000..91da521c79 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug732758.js @@ -0,0 +1,42 @@ +function tryItOut(code) { + try { + f = Function(code) + } catch (r) {} + v = tryRunning(f, code) + x = String; + for (e in v) {} +} +function tryRunning() { + try { + rv = f(); + return rv; + } catch (r) { + x = String; + } +} +__proto__.__defineSetter__("x", function() {}); +tryItOut("/()/;\"\"()"); +tryItOut("}"); +tryItOut(""); +tryItOut("o"); +tryItOut(")"); +tryItOut("("); +tryItOut(")"); +tryItOut("}"); +tryItOut("}"); +tryItOut(")"); +tryItOut(")"); +tryItOut(""); +tryItOut("l;function u(){/j/}"); +tryItOut("("); +tryItOut("t"); +tryItOut("("); +tryItOut(")"); +tryItOut("("); +tryItOut(""); +tryItOut("{t:g}"); +tryItOut("r"); +tryItOut("p"); +tryItOut("gc()"); +tryItOut("verifybarriers()"); +tryItOut("/**/yield"); diff --git a/js/src/jit-test/tests/ion/bug732846.js b/js/src/jit-test/tests/ion/bug732846.js new file mode 100644 index 0000000000..d33ea66c35 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug732846.js @@ -0,0 +1,6 @@ +var BUGNUMBER = { + valueOf: function() { + ++undefined; + } +}; +BUGNUMBER + 1; diff --git a/js/src/jit-test/tests/ion/bug732847.js b/js/src/jit-test/tests/ion/bug732847.js new file mode 100644 index 0000000000..8c343fa6e8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug732847.js @@ -0,0 +1,20 @@ +try{} catch (x) {} + +var callStack = []; +function currentFunc() { + return callStack[0]; +} +function reportFailure () { + var funcName = currentFunc(); + // play with the result to cause a SEGV. + var prefix = (funcName) ? funcName : ""; + // Use OSR to compile the function at the end of the first run. + for (var i=0; i < 50; i++) ; +} + +callStack[0] = 'test'; +// Run and compile with a string as result of currentFunc. +reportFailure(); +callStack[0] = undefined; +// Use previously compiled code with the string assumption. +reportFailure(); diff --git a/js/src/jit-test/tests/ion/bug732849.js b/js/src/jit-test/tests/ion/bug732849.js new file mode 100644 index 0000000000..169c4c9071 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug732849.js @@ -0,0 +1,2 @@ +a = []; +evaluate("if ('1234' + '' != (01 )) { var a = [];}"); diff --git a/js/src/jit-test/tests/ion/bug732850.js b/js/src/jit-test/tests/ion/bug732850.js new file mode 100644 index 0000000000..7824d77f0e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug732850.js @@ -0,0 +1,24 @@ +var gTestcases = new Array(); +var gTc = gTestcases.length; +function TestCase(n, d, e, a) { + this.passed = getTestCaseResult(e, a); + gTestcases[gTc++] = this; +} +function getTestCaseResult(expected, actual) { + if (typeof expected != 'number') + return actual == expected; + return Math.abs(actual - expected) <= 1E-10; +} +function test() { + for ( gTc=0; gTc < gTestcases.length; gTc++ ) { + gTestcases[gTc].passed = writeTestCaseResult(gTestcases[gTc].description +" = "+ gTestcases[gTc].actual); + } + function writeTestCaseResult( expect, actual, string ) { + var passed = getTestCaseResult( expect, actual ); + } +} +var SECTION = "15.4.2.1-1"; +new TestCase( SECTION, eval("var arr = (new Array(1,2)); arr[0]") ); +new TestCase( SECTION, "var arr = (new Array(1,2)); String(arr)", "1,2", (this.abstract++)); +test(); +new TestCase( SECTION, "VAR1 = NaN; VAR2=1; VAR1 -= VAR2", Number.NaN, eval("VAR1 = Number.NaN; VAR2=1; VAR1 -= VAR2")); diff --git a/js/src/jit-test/tests/ion/bug732851.js b/js/src/jit-test/tests/ion/bug732851.js new file mode 100644 index 0000000000..6e249c716d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug732851.js @@ -0,0 +1,11 @@ +var OMIT = {}; +var WRITABLES = [true, false, OMIT]; +{ + var desc = {}; + function put(field, value) { + return desc[field] = value; + } + WRITABLES.forEach(function(writable) { + put("writable", writable) + }); +}; diff --git a/js/src/jit-test/tests/ion/bug732858.js b/js/src/jit-test/tests/ion/bug732858.js new file mode 100644 index 0000000000..307939a4fb --- /dev/null +++ b/js/src/jit-test/tests/ion/bug732858.js @@ -0,0 +1,9 @@ +var g; +function store() { + return g = "v"; +} +function dump() { + return +store(); +} +for (var i = 0; i < 2; i++) + dump(); diff --git a/js/src/jit-test/tests/ion/bug732859.js b/js/src/jit-test/tests/ion/bug732859.js new file mode 100644 index 0000000000..bde07e7baf --- /dev/null +++ b/js/src/jit-test/tests/ion/bug732859.js @@ -0,0 +1,19 @@ +function TestCase(n, d, e, a) { + return function writeHeaderToLog( string ) {}; +} +var SECTION = "15.1.2.4"; +for ( var CHARCODE = 128; CHARCODE < 256; CHARCODE++ ) { + new TestCase( SECTION, "%"+ToHexString(CHARCODE), escape(String.fromCharCode(CHARCODE))); +} +function ToHexString( n ) { + var hex = new Array(); + hex[hex.length] = n % 16; + var string =""; + for ( var index = 0 ; index < hex.length ; index++ ) { + switch ( hex[index] ) { + case 10: + string += "A"; + case 11: + } + } +} diff --git a/js/src/jit-test/tests/ion/bug732860.js b/js/src/jit-test/tests/ion/bug732860.js new file mode 100644 index 0000000000..85af47e2c9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug732860.js @@ -0,0 +1,21 @@ +function trySetProperty(o, p, v, strict) { + function strictSetProperty() { + "use strict"; + o[p] = v; + } + try { + strictSetProperty(); + } catch (e) { + return "throw"; + } +} + +//var objs = [[0], [1]]; +var objs = [{a: 0}, {a: 1}]; + +for (var i = 0, sz = objs.length; i < sz; i++) { + var o = objs[i]; + var o2 = Object.preventExtensions(o); + print(i +' ' + o); + assertEq(trySetProperty(o, "baz", 17, true), "throw", "object " + i); +} diff --git a/js/src/jit-test/tests/ion/bug732862.js b/js/src/jit-test/tests/ion/bug732862.js new file mode 100644 index 0000000000..e88d4d3ccb --- /dev/null +++ b/js/src/jit-test/tests/ion/bug732862.js @@ -0,0 +1,6 @@ +function testReallyDeepNestedExit() { + for (var i = 0; i < 5*4; i++) {} + for (var o = schedule = i = 9 ; i < 5; i++) {} +} +assertEq(testReallyDeepNestedExit(), undefined); + diff --git a/js/src/jit-test/tests/ion/bug732863.js b/js/src/jit-test/tests/ion/bug732863.js new file mode 100644 index 0000000000..59059acc14 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug732863.js @@ -0,0 +1,20 @@ +// Compiled +function TestCase(a) { } + +// Not compiled (try) +function reportCompare (actual) { + TestCase(actual); + try { } catch(ex) { } +} + +// Compiled +function addThis(bound) { + actualvalues[bound] = undefined + actual; + reportCompare(actualvalues[bound]); +} + +var actual = ''; +var actualvalues = []; +addThis(0); +actual = NaN; +addThis(1); diff --git a/js/src/jit-test/tests/ion/bug732864.js b/js/src/jit-test/tests/ion/bug732864.js new file mode 100644 index 0000000000..abcfb8df6a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug732864.js @@ -0,0 +1,22 @@ +function BigInteger() { } +function bnpCopyTo(g) { + var this_array = g.array; + for (var i = g.t; i >= 0; --i) + ; + g.t = g.t; +} +function bnpFromString(n) { + n.t = 0; + var i = 100; + while (--i >= 0) { + n.t++; + } +} +n = new BigInteger(); +n.array = new Array(); +bnpFromString(n); + +g = new BigInteger(); +g.array = new Array(); +g.t = 100; +bnpCopyTo(g); diff --git a/js/src/jit-test/tests/ion/bug734383.js b/js/src/jit-test/tests/ion/bug734383.js new file mode 100644 index 0000000000..b3cb55a9ce --- /dev/null +++ b/js/src/jit-test/tests/ion/bug734383.js @@ -0,0 +1,15 @@ +function foo(a, b) { + var s = "foo"; + for (var j = 0; j < 5; j++) + s += a[b[j]]; + return s; +} + +var a = {a:"zero", b:"one", c:"two", d:"three", e:"four"}; +var b = ["a", "b", "c", "d", "e"]; + +for (var i=0; i<9; i++) + assertEq(foo(a, b), "foozeroonetwothreefour"); + +a.e = 4; +assertEq(foo(a, b), "foozeroonetwothree4"); diff --git a/js/src/jit-test/tests/ion/bug736135-2.js b/js/src/jit-test/tests/ion/bug736135-2.js new file mode 100644 index 0000000000..c174168a1b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug736135-2.js @@ -0,0 +1,23 @@ +function test(a, b) { + var y = a*b; + return y + y; +} + +function negzero(x) { + return x===0 && (1/x)===-Infinity; +} + +var a = 0; +var b = 0; +for(var i=0; i<58; i++) { + var o = test(a, b); + + // Test returns + // * 0, if i < 50 + // * -0, if i >= 50 + assertEq(negzero(o), i>50); + + if (i == 50) { + a = -1 + } +} diff --git a/js/src/jit-test/tests/ion/bug736135.js b/js/src/jit-test/tests/ion/bug736135.js new file mode 100644 index 0000000000..df3a504ce3 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug736135.js @@ -0,0 +1,38 @@ +var g; +function test(a, b) { + + g = 0; + for(var i=0; i<100; i++) { + g += i + } + + var t = a*b; + + for(var i=0; i<100; i++) { + t += x.y; + return t; + } + +} + +function negzero(x) { + return x===0 && (1/x)===-Infinity; +} + + +var x = {y:0}; +var a = 0; +var b = 0; +for(var i=0; i<58; i++) { + var o = test(a, b); + + // Test returns + // * 0, if i < 50 + // * -0, if i >= 50 + assertEq(negzero(o), i>50); + + if (i == 50) { + a = -1 + x.y = -0 + } +} diff --git a/js/src/jit-test/tests/ion/bug736141.js b/js/src/jit-test/tests/ion/bug736141.js new file mode 100644 index 0000000000..b003eed45e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug736141.js @@ -0,0 +1,18 @@ +function test(i) { + return i * 0 + 0; +} + +for(var i=0; i<100; i++){ + var x = test(-i); + assertEq((x===0 && (1/x)===-Infinity), false); // value should be 0, not -0 +} + +function test2(i) { + return 0 - i; +} + +for(var i=-100; i<100; i++){ + var x = test2(-i); + assertEq(x, i); +} + diff --git a/js/src/jit-test/tests/ion/bug739854.js b/js/src/jit-test/tests/ion/bug739854.js new file mode 100644 index 0000000000..226c17425b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug739854.js @@ -0,0 +1,12 @@ +function test(x) { + switch(x) { + case 0: + return 0; + default: + return -1; + } +} + +for(var i=0; i<100; i++) { + assertEq(test(-0), 0); +} diff --git a/js/src/jit-test/tests/ion/bug741202.js b/js/src/jit-test/tests/ion/bug741202.js new file mode 100644 index 0000000000..d386963535 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug741202.js @@ -0,0 +1,9 @@ +var o = {valueOf: function() { return -0x80000000; }}; +var s = {valueOf: function() { return 0; }}; + +for (var i = 0; i < 70; i++) { + assertEq(o >>> 1, 0x40000000); + assertEq(o >>> 0, 0x80000000); + assertEq(1 >>> s, 1); + assertEq(-1 >>> s, 0xffffffff); +} diff --git a/js/src/jit-test/tests/ion/bug741241.js b/js/src/jit-test/tests/ion/bug741241.js new file mode 100644 index 0000000000..5c26c41c52 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug741241.js @@ -0,0 +1,36 @@ + +function f1() {}; +new f1(); + +function f2() { + try{} catch (x) {} +}; +new f2(); + +function f3() { + for (var j = 0; j < 100; j++) {} +}; +new f3(); + +function notEager1(){ + function g1() {}; + new g1(); +} +for (var i = 0; i < 100; i++) + notEager1(); + +function notEager2(){ + function g2() {}; + new g2(); +} +for (var i = 0; i < 100; i++) + notEager2(); + +function notEager3(){ + function g3() { + for (var j = 0; j < 100; j++) {} + }; + new g3(); +} +for (var i = 0; i < 100; i++) + notEager3(); diff --git a/js/src/jit-test/tests/ion/bug743099.js b/js/src/jit-test/tests/ion/bug743099.js new file mode 100644 index 0000000000..48bfffee4d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug743099.js @@ -0,0 +1,9 @@ +function Day( t ) {} +function WeekDay( t ) { + var weekday = (Day(t)+4) % 7; + return( weekday < 0 ? 7 + weekday : weekday ); +} +var expect = 'No Error'; +for (var i = 0; i < 50; i++) { + var [] = [expect ? WeekDay(i.a) : true], print; +} diff --git a/js/src/jit-test/tests/ion/bug746370.js b/js/src/jit-test/tests/ion/bug746370.js new file mode 100644 index 0000000000..c8158eb21a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug746370.js @@ -0,0 +1,7 @@ +var a = ['p', 'q', 'r', 's', 't']; +var o = {p:1, q:2, r:(1), s:4, t:5}; +for (var i in o) { + delete o.p; +} +for (var i of a) + assertEq(o.hasOwnProperty(i), i != 'p'); diff --git a/js/src/jit-test/tests/ion/bug747271.js b/js/src/jit-test/tests/ion/bug747271.js new file mode 100644 index 0000000000..176a44a583 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug747271.js @@ -0,0 +1,18 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +function randomFloat () { + // note that in fuzz-testing, this can used as the size of a buffer to allocate. + // so it shouldn't return astronomic values. The maximum value 10000000 is already quite big. + var fac = 1.0; + var r = Math.random(); + if (r < 0.25) + fac = 10; + else if (r < 0.7) + fac = 10000000; + else if (r < 0.8) + fac = NaN; + return -0.5*fac + Math.random() * fac; +} + +for (var i = 0; i < 100000; i++) + randomFloat(); + diff --git a/js/src/jit-test/tests/ion/bug750588.js b/js/src/jit-test/tests/ion/bug750588.js new file mode 100644 index 0000000000..6fa44d9cce --- /dev/null +++ b/js/src/jit-test/tests/ion/bug750588.js @@ -0,0 +1,13 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function S() { + var t = new Float32Array(1); + var k = 0; + var xx = 19; + var gridRes = 64; + for (var i = 0; i < 100; i++) { + t[k] = -1 + 2 * xx / gridRes; + } + return t[0]; +} +assertEq(S(), -0.40625); diff --git a/js/src/jit-test/tests/ion/bug754713-1.js b/js/src/jit-test/tests/ion/bug754713-1.js new file mode 100644 index 0000000000..cfe4dfe877 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug754713-1.js @@ -0,0 +1,16 @@ +// Don't eliminate a phi if it has no SSA uses but its value is still +// observable in the interpreter. +var t = 100; +function foo(ox) { + var x = ox; + var n = 0; + for (var i = 0; i < 90; i++) { + n += x.f.g; + if (i >= 80) + t; + } +} +function f() {} +function g() {} +f.prototype = {f:g}; +foo(new f()); diff --git a/js/src/jit-test/tests/ion/bug754713-2.js b/js/src/jit-test/tests/ion/bug754713-2.js new file mode 100644 index 0000000000..5a099411c2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug754713-2.js @@ -0,0 +1,29 @@ +// Don't eliminate a phi if it has no SSA uses but its value is still +// observable in the interpreter. +var t1 = 100; +function test1(x) { + // g(x) is inlined with --ion-eager, but don't mark the phi + // for x as unused. + for (var i = 0; i < 90; i++) { + f1(x); + if (i >= 80) + t1; + } +} + +function f1(x) {}; +test1(2); + +var t2 = 100; +function test2(g) { + // g(x) is inlined with --ion-eager, but don't mark the phi + // for g as unused. + for (var i = 0; i < 90; i++) { + g(); + if (i >= 80) + t2; + } +} + +function f2() {}; +test2(f2); diff --git a/js/src/jit-test/tests/ion/bug754713-3.js b/js/src/jit-test/tests/ion/bug754713-3.js new file mode 100644 index 0000000000..a3b6405bfc --- /dev/null +++ b/js/src/jit-test/tests/ion/bug754713-3.js @@ -0,0 +1,9 @@ +var t = 100; +function f(x) { + for (var i = 0; i < 90; i++) { + [(x, 2)]; + if (i >= 80) + t; + } +} +f(2); diff --git a/js/src/jit-test/tests/ion/bug754713-4.js b/js/src/jit-test/tests/ion/bug754713-4.js new file mode 100644 index 0000000000..84afc4554d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug754713-4.js @@ -0,0 +1,6 @@ +function f(x) { + var y = (x < 0) ? 1 : 2; + Math.floor(0); // bailout +} +Math.floor(0); +f(1); diff --git a/js/src/jit-test/tests/ion/bug754720.js b/js/src/jit-test/tests/ion/bug754720.js new file mode 100644 index 0000000000..9c8d813fe6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug754720.js @@ -0,0 +1,64 @@ +function f2(a) { + return f2.arguments; +} + +// The first eager-compiled call will bailout, do not assert. +f2(); + +var o; +o = f2(); +assertEq(o.length, 0); + +o = f2(21); +assertEq(o.length, 1); +assertEq(o[0], 21); + +o = f2(21,42); +assertEq(o.length, 2); +assertEq(o[0], 21); +assertEq(o[1], 42); + +// 100 arguments. +o = f2(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9); +for (var i in o) + assertEq(o[i], i % 10); + +// 200 arguments. +o = f2(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9); +for (var i in o) + assertEq(o[i], i % 10); + +// 300 arguments. +o = f2(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9); +for (var i in o) + assertEq(o[i], i % 10); diff --git a/js/src/jit-test/tests/ion/bug755157.js b/js/src/jit-test/tests/ion/bug755157.js new file mode 100644 index 0000000000..6238d67c5f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug755157.js @@ -0,0 +1,4 @@ +gczeal(2,50); +for (var j = 0; j < 100000; ++j) { + (-0).toString(); +} diff --git a/js/src/jit-test/tests/ion/bug755832.js b/js/src/jit-test/tests/ion/bug755832.js new file mode 100644 index 0000000000..76008cb4a4 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug755832.js @@ -0,0 +1,6 @@ +var x; +function f(o) { + o.prop = x = 3; +} +f({}); +f(1); diff --git a/js/src/jit-test/tests/ion/bug756235.js b/js/src/jit-test/tests/ion/bug756235.js new file mode 100644 index 0000000000..9b9a7181e8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug756235.js @@ -0,0 +1,18 @@ +// |jit-test| slow; + +gczeal(2); +try { + function complex(aReal, aImag) { + let Z = new complex(0.0, 0.0); + } + function f(trace) { + const width = 60; + const height = 60; + for (let img_x = 0; img_x < width; ((function() {}).abstract)) { + for (let img_y = 0; img_y < height; img_y++) { + let C = new complex(-2 + (img_x / width) * 3, -1.5 + (img_y / height) * 3); + } + } + } + var timenonjit = f(false); +} catch(exc1) {} diff --git a/js/src/jit-test/tests/ion/bug756238.js b/js/src/jit-test/tests/ion/bug756238.js new file mode 100644 index 0000000000..fe719917f9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug756238.js @@ -0,0 +1,6 @@ +// |jit-test| error: ReferenceError + +outer: + for (var elem in {x:1}) + if (p > "q") + continue outer; diff --git a/js/src/jit-test/tests/ion/bug756240.js b/js/src/jit-test/tests/ion/bug756240.js new file mode 100644 index 0000000000..df737daaf6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug756240.js @@ -0,0 +1,12 @@ +function f() { + var x = 10; + var g = function(x, Int8Array, arr, f) { + for (var i = 0; i < 10; ++i) { + gc(); + } + } + for (var i = 0; i < 10; ++i) { + g(100 * i + x); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/bug756247.js b/js/src/jit-test/tests/ion/bug756247.js new file mode 100644 index 0000000000..83de1c57d5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug756247.js @@ -0,0 +1,13 @@ +function foo(i) { + var n = 0; + for (var i = 0; i < false; i++) + n = a++; + assertEq(n, 0); +} +var a = foo(10); + +function bar(x) { + var y = +(x ? x : "foo"); + assertEq(y, 10); +} +bar(10); diff --git a/js/src/jit-test/tests/ion/bug756780.js b/js/src/jit-test/tests/ion/bug756780.js new file mode 100644 index 0000000000..a252d2c24c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug756780.js @@ -0,0 +1,9 @@ +gczeal(4); +var i = (29); +var status = ''; +var statusmessages = new Array(); +addThis(); +addThis(); +function addThis() { + return statusmessages[i] = status; +} diff --git a/js/src/jit-test/tests/ion/bug756781.js b/js/src/jit-test/tests/ion/bug756781.js new file mode 100644 index 0000000000..aba3b7a3e1 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug756781.js @@ -0,0 +1,19 @@ +function AddTestCase( description, expect, actual ) { + new TestCase( SECTION, description, expect, actual ); +} +function TestCase(n, d, e, a) {} +var SECTION = "String/match-004.js"; +re = /0./; +s = 10203040506070809000; +Number.prototype.match = String.prototype.match; +AddRegExpCases( re, "re = " + re , s, String(s), 1, ["02"]); +AddRegExpCases( re, re, s, ["02"]); +function AddRegExpCases( + regexp, str_regexp, string, str_string, index, matches_array ) { + if ( regexp.exec(string) == null || matches_array == null ) { + AddTestCase( string.match(regexp) ); + } + AddTestCase( string.match(regexp).input ); + gczeal(4); +} + diff --git a/js/src/jit-test/tests/ion/bug758181.js b/js/src/jit-test/tests/ion/bug758181.js new file mode 100644 index 0000000000..117c6a2c53 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug758181.js @@ -0,0 +1,13 @@ +function Ld(a) { + var sum = 0; + for (var d = 5; 0 <= d; d--) + sum += a[d]; + return sum; +} +var arr = [0, 1, 2, 3, 4, 5, 6]; + +for (var i=0; i < 50; i++) + assertEq(Ld(arr), 15); + +var arr2 = [0, 1, 2, 3]; +assertEq(Ld(arr2), NaN); diff --git a/js/src/jit-test/tests/ion/bug758991.js b/js/src/jit-test/tests/ion/bug758991.js new file mode 100644 index 0000000000..093a75249a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug758991.js @@ -0,0 +1,16 @@ +// Don't treat f.caller as a singleton property access, it +// has a non-default getter. +function f(obj) { + return f.caller; +} +function g(obj) { + return f(obj); +} +function gg(obj) { + return f.call(obj, obj); +} + +assertEq(g({}), g); + +actual = gg(function() {}); +assertEq(actual, gg); diff --git a/js/src/jit-test/tests/ion/bug759213.js b/js/src/jit-test/tests/ion/bug759213.js new file mode 100644 index 0000000000..5d597b4efb --- /dev/null +++ b/js/src/jit-test/tests/ion/bug759213.js @@ -0,0 +1,9 @@ +// |jit-test| error: ReferenceError +function testNestedForIn() { + var a = {x: 1, y: (/\\u00fd[]/ ), z: 3}; + for (var p1 in a) + for (var { w } = 0 ; ; ) + testJSON(t); +} + +assertEq(testNestedForIn(), 'xx xy xz yx yy yz zx zy zz '); diff --git a/js/src/jit-test/tests/ion/bug760103.js b/js/src/jit-test/tests/ion/bug760103.js new file mode 100644 index 0000000000..4c20c72d28 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug760103.js @@ -0,0 +1,21 @@ +function test1() { + for (var i = 0; i <= 90; i++) { + var x = i/10.0; + if (Math.round(x) !== Math.floor(x + 0.5)) + assertEq(0, 1); + } +} +test1(); + +function test2() { + for (var i = -5; i >= -90; i--) { + if (i === -5) + x = -0.500000000000001; + else + x = i/10.0; + + if (Math.round(x) !== Math.floor(x + 0.5)) + assertEq(0, 1); + } +} +test2(); diff --git a/js/src/jit-test/tests/ion/bug761835.js b/js/src/jit-test/tests/ion/bug761835.js new file mode 100644 index 0000000000..01b831ee5d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug761835.js @@ -0,0 +1,154 @@ +// |jit-test| error: TypeError +function BigInteger(a,b,c) { + this.array = new Array(); + if(a != null) + if("number" == typeof a) this.fromNumber(a,b,c); + else this.fromString(a,b); +} +function nbi() { return new BigInteger(null); } +function am3(i,x,w,j,c,n) {} +setupEngine = function(fn, bits) { + dbits = bits; + BI_DB = dbits; + BI_DM = ((1<= 0) { + var x = (k==8)?s[i]&0xff:intAt(s,i); + if(sh == 0) + this_array[this.t++] = x; + else if(sh+k > BI_DB) { + this_array[this.t++] = (x>>(BI_DB-sh)); + } + sh += k; + } +} +function bnAbs() { return (this.s<0)?this.negate():this; } +function nbits(x) { + var r = 1, t; + return r; +} +function bnBitLength() {} +function bnpDLShiftTo(n,r) { + var this_array = this.array; + var r_array = r.array; + for(i = this.t-1; i >= 0; --i) r_array[i+n] = this_array[i]; + r.t = this.t+n; +} +function bnpLShiftTo(n,r) { + var bs = n%BI_DB; + var ds = Math.floor(n/BI_DB), c = (this.s< 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } + var ys = y.t; + var i = r.t, j = i-ys, t = (q==null)?nbi():q; + y.dlShiftTo(j,t); + BigInteger.ONE.dlShiftTo(ys,t); +} +function bnMod(a) { + var r = nbi(); + this.abs().divRemTo(a,null,r); +} +function Montgomery(m) { + this.m = m; +} +function montConvert(x) { + var r = nbi(); + x.abs().dlShiftTo(this.m.t,r); + r.divRemTo(this.m,null,r); +} +function montRevert(x) { + var r = nbi(); + return r; +} +Montgomery.prototype.convert = montConvert; +Montgomery.prototype.revert = montRevert; +function bnpIsEven() {} +function bnpExp(e,z) { + var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; + return z.revert(r); +} +function bnModPowInt(e,m) { + if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); + return this.exp(e,z); +} +BigInteger.prototype.fromInt = bnpFromInt; +BigInteger.prototype.fromString = bnpFromString; +BigInteger.prototype.dlShiftTo = bnpDLShiftTo; +BigInteger.prototype.lShiftTo = bnpLShiftTo; +BigInteger.prototype.divRemTo = bnpDivRemTo; +BigInteger.prototype.isEven = bnpIsEven; +BigInteger.prototype.exp = bnpExp; +BigInteger.prototype.abs = bnAbs; +BigInteger.prototype.bitLength = bnBitLength; +BigInteger.prototype.mod = bnMod; +BigInteger.prototype.modPowInt = bnModPowInt; +BigInteger.ONE = nbv(1); +function parseBigInt(str,r) { + return new BigInteger(str,r); +} +function pkcs1pad2(s,n) { + var ba = new Array(); + return new BigInteger(ba); +} +function RSAKey() { +} +function RSASetPublic(N,E) { + this.n = parseBigInt(N,16); +} +function RSADoPublic(x) { + return x.modPowInt(this.e, this.n); +} +function RSAEncrypt(text) { + var m = pkcs1pad2(text,(this.n.bitLength()+7)>>3); + var c = this.doPublic(m); + var h = c.toString(16); + if((h.length & 1) == 0) return h; else return "0" + h; +} +RSAKey.prototype.doPublic = RSADoPublic; +RSAKey.prototype.setPublic = RSASetPublic; +RSAKey.prototype.encrypt = RSAEncrypt; +function RSASetPrivateEx(N,E,D,P,Q,DP,DQ,C) { + this.p = parseBigInt(P,16); +} +function RSADoPrivate(x) { + var xp = x.mod(this.p).modPow(this.dmp1, this.p); +} +function RSADecrypt(ctext) { + var c = parseBigInt(ctext, 16); + var m = this.doPrivate(c); +} +RSAKey.prototype.doPrivate = RSADoPrivate; +RSAKey.prototype.setPrivateEx = RSASetPrivateEx; +RSAKey.prototype.decrypt = RSADecrypt; +nValue="a5261939975948bb7a58dffe5ff54e65f0498f9175f5a09288810b8975871e99af3b5dd94057b0fc07535f5f97444504fa35169d461d0d30cf0192e307727c065168c788771c561a9400fb49175e9e6aa4e23fe11af69e9412dd23b0cb6684c4c2429bce139e848ab26d0829073351f4acd36074eafd036a5eb83359d2a698d3"; +eValue="10001"; +dValue="8e9912f6d3645894e8d38cb58c0db81ff516cf4c7e5a14c7f1eddb1459d2cded4d8d293fc97aee6aefb861859c8b6a3d1dfe710463e1f9ddc72048c09751971c4a580aa51eb523357a3cc48d31cfad1d4a165066ed92d4748fb6571211da5cb14bc11b6e2df7c1a559e6d5ac1cd5c94703a22891464fba23d0d965086277a161"; +pValue="d090ce58a92c75233a6486cb0a9209bf3583b64f540c76f5294bb97d285eed33aec220bde14b2417951178ac152ceab6da7090905b478195498b352048f15e7d"; +qValue="cab575dc652bb66df15a0359609d51d1db184750c00c6698b90ef3465c99655103edbf0d54c56aec0ce3c4d22592338092a126a0cc49f65a4a30d222b411e58f"; +dmp1Value="1a24bca8e273df2f0e47c199bbf678604e7df7215480c77c8db39f49b000ce2cf7500038acfff5433b7d582a01f1826e6f4d42e1c57f5e1fef7b12aabc59fd25"; +dmq1Value="3d06982efbbe47339e1f6d36b1216b8a741d410b0c662f54f7118b27b9a4ec9d914337eb39841d8666f3034408cf94f5b62f11c402fc994fe15a05493150d9fd"; +coeffValue="3a3e731acd8960b7ff9eb81a7ff93bd1cfa74cbd56987db58b4594fb09c09084db1734c8143f98b602b981aaa9243ca28deb69b5b280ee8dcee0fd2625e53250"; +setupEngine(am3, 28); +function check_correctness(text, hash) { + var RSA = new RSAKey(); + RSA.setPublic(nValue, eValue); + RSA.setPrivateEx(nValue, eValue, dValue, pValue, qValue, dmp1Value, dmq1Value, coeffValue); + var encrypted = RSA.encrypt(text); + var decrypted = RSA.decrypt(encrypted); +} +check_correctness("Hello! I am some text.", "142b19b40fee712ab9468be296447d38c7dfe81a7850f11ae6aa21e49396a4e90bd6ba4aa385105e15960a59f95447dfad89671da6e08ed42229939583753be84d07558abb4feee4d46a92fd31d962679a1a5f4bf0fb7af414b9a756e18df7e6d1e96971cc66769f3b27d61ad932f2211373e0de388dc040557d4c3c3fe74320"); diff --git a/js/src/jit-test/tests/ion/bug761854.js b/js/src/jit-test/tests/ion/bug761854.js new file mode 100644 index 0000000000..d2e907e696 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug761854.js @@ -0,0 +1,57 @@ +var gTestcases = new Array(); +function TestCase(n, d, e, a) { + this.name = n; + this.description = d; + this.expect = e; + this.actual = a; + this.passed = getTestCaseResult(e, a); + options.stackvalues = []; +function getTestCaseResult(expected, actual) { } +} +var lfcode = new Array(); +lfcode.push("3"); +lfcode.push("var statusitems = [];\ +var actualvalues = [];\ +var expectedvalues = [];\ +actual = '$a$^'.replace(/\\$\\^/, '--');\ +actual = 'ababc'.replace(/abc/, '--');\ +actual = 'ababc'.replace(/abc/g, '--');\ +"); +lfcode.push("\ +var SECTION = \"15.4.4.3-1\";\ +new TestCase( SECTION, \"Array.prototype.join.length\", 1, Array.prototype.join.length );\ +new TestCase( SECTION, \"delete Array.prototype.join.length\", false, delete Array.prototype.join.length );\ +new TestCase( SECTION, \"delete Array.prototype.join.length; Array.prototype.join.length\", 1, eval(\"delete Array.prototype.join.length; Array.prototype.join.length\") );\ +new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(); TEST_ARRAY.join()\") );\ +new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(); TEST_ARRAY.join(' ')\") );\ +new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(null, void 0, true, false, 123, new Object(), new Boolean(true) ); TEST_ARRAY.join('&')\") );\ +new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(null, void 0, true, false, 123, new Object(), new Boolean(true) ); TEST_ARRAY.join('')\") );\ +new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(null, void 0, true, false, 123, new Object(), new Boolean(true) ); TEST_ARRAY.join(void 0)\") );\ +new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(null, void 0, true, false, 123, new Object(), new Boolean(true) ); TEST_ARRAY.join()\") );\ +new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(true); TEST_ARRAY.join('\\v')\") );\ +SEPARATOR = \"\\t\";\ +new TestCase( SECTION,TEST_ARRAY.join( SEPARATOR ) );\ +"); +lfcode.push("new TestCase( assertEq, \"String.prototype.toString()\", \"\", String.prototype.toString() );\ +new TestCase( SECTION, \"(new String()).toString()\", \"\", (new String()).toString() );\ +new TestCase( SECTION, \"(new String(\\\"\\\")).toString()\", \"\", (new String(\"\")).toString() );\ +new TestCase( SECTION, \"(new String( String() )).toString()\",\"\", (new String(String())).toString() );\ +gczeal(4);\ +new TestCase( SECTION, \"(new String( 0 )).toString()\", \"0\", (new String((1))).toString() );\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file); +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + } else if (!isNaN(lfVarx)) { + lfRunTypeId = lfVarx; + } else { + switch (lfRunTypeId) { + default: evaluate(lfVarx); + } + } + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/ion/bug762547.js b/js/src/jit-test/tests/ion/bug762547.js new file mode 100644 index 0000000000..8e9c20b5be --- /dev/null +++ b/js/src/jit-test/tests/ion/bug762547.js @@ -0,0 +1,14 @@ +if (typeof(gcPreserveCode) == "function") + gcPreserveCode(); + +function testStrict() { + var n = 10, a = []; + for (var i = 0; i < 10; ++i) { + a[0] = (gc()); + a[1] = (n !== 10); + a[0x2 ] = (n === null); + a[3] = (n == null); + } + return ; +} +testStrict(); diff --git a/js/src/jit-test/tests/ion/bug764432.js b/js/src/jit-test/tests/ion/bug764432.js new file mode 100644 index 0000000000..fad51db769 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug764432.js @@ -0,0 +1,7 @@ +function test() { + for (var i=0; i<100000; i++) { + var a = -0x80000000; + assertEq(a >>> 32, 2147483648); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/bug764792.js b/js/src/jit-test/tests/ion/bug764792.js new file mode 100644 index 0000000000..056aa0c7af --- /dev/null +++ b/js/src/jit-test/tests/ion/bug764792.js @@ -0,0 +1,7 @@ +test(); +function test() { + for (var i=0; i<2; ++i) {}; + try {} catch ([ q ]) { + function g() {} + } +} diff --git a/js/src/jit-test/tests/ion/bug765454.js b/js/src/jit-test/tests/ion/bug765454.js new file mode 100644 index 0000000000..d91bd87b67 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug765454.js @@ -0,0 +1,26 @@ +var seen = -1; + +// Test to make sure the jits get the number of calls, and return value +// of setters correct. We should not be affected by whether the setter +// modifies its argument or returns some value. +function setter(x) { + this.val = x; + x = 255; + bailout(); + seen++; + assertEq(seen, this.val); + return 5; +} + +function F(){} +Object.defineProperty(F.prototype, "value" , ({set: setter})); + +function test() { + var obj = new F(); + var itrCount = 10000; + for(var i = 0; i < itrCount; i++) { + assertEq(obj.value = i, i); + assertEq(obj.val, i); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/bug765477.js b/js/src/jit-test/tests/ion/bug765477.js new file mode 100644 index 0000000000..abb3623ccf --- /dev/null +++ b/js/src/jit-test/tests/ion/bug765477.js @@ -0,0 +1,8 @@ +function f(useArg2, arg2, expect) { + var args = arguments; + if (useArg2) + args = arg2; + assertEq(args.length, expect); +} +f(false, 0, 3); +f(false, 0, 3); diff --git a/js/src/jit-test/tests/ion/bug765478.js b/js/src/jit-test/tests/ion/bug765478.js new file mode 100644 index 0000000000..0cd9db3ea8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug765478.js @@ -0,0 +1,8 @@ +function test1() { + var input = arguments[undefined]; +} +function test2() { + return arguments["length"]; +} +test1(); +test2(); diff --git a/js/src/jit-test/tests/ion/bug765480.js b/js/src/jit-test/tests/ion/bug765480.js new file mode 100644 index 0000000000..fac2296e9d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug765480.js @@ -0,0 +1,9 @@ + +function fannkuch() { + for (var j = 0; j < 50; j++) { + for (var i = 0; i < 0; i++) { + arguments, Array; + } + } +} +fannkuch(); diff --git a/js/src/jit-test/tests/ion/bug766218.js b/js/src/jit-test/tests/ion/bug766218.js new file mode 100644 index 0000000000..9ac5744f24 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug766218.js @@ -0,0 +1,66 @@ +// Test strict-equality with a constant boolean. +function test1() { + var a = [{}, false, true, 0]; + var res = 0; + + for (var i=0; i<100; i++) { + if (a[i % 4] === false) + res += 1; + } + assertEq(res, 25); + + res = 0; + for (var i=0; i<100; i++) { + if (true !== a[i % 4]) + res += 1; + } + assertEq(res, 75); + + res = 0; + for (var i=0; i<100; i++) { + res += (a[i % 4] === true); + } + assertEq(res, 25); + + res = 0; + for (var i=0; i<100; i++) { + res += (false !== a[i % 4]); + } + assertEq(res, 75); +} +test1(); + +// Test strict-equality with non-constant boolean. +var TRUE = true; +var FALSE = false; + +function test2() { + var a = [{}, false, true, 0]; + var res = 0; + + for (var i=0; i<100; i++) { + if (a[i % 4] === FALSE) + res += 1; + } + assertEq(res, 25); + + res = 0; + for (var i=0; i<100; i++) { + if (TRUE !== a[i % 4]) + res += 1; + } + assertEq(res, 75); + + res = 0; + for (var i=0; i<100; i++) { + res += (a[i % 4] === TRUE); + } + assertEq(res, 25); + + res = 0; + for (var i=0; i<100; i++) { + res += (FALSE !== a[i % 4]); + } + assertEq(res, 75); +} +test2(); diff --git a/js/src/jit-test/tests/ion/bug767665.js b/js/src/jit-test/tests/ion/bug767665.js new file mode 100644 index 0000000000..01b378ff5c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug767665.js @@ -0,0 +1,11 @@ +var failures = 0; +function a() { + return new Array(-1); +} +for (var j = 0; j < 61; ++j) { + try { + a(); + ++failures; + } catch (e) { + } +} diff --git a/js/src/jit-test/tests/ion/bug768436.js b/js/src/jit-test/tests/ion/bug768436.js new file mode 100644 index 0000000000..b01ac0f255 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug768436.js @@ -0,0 +1,18 @@ +function f() { + return new ({}); +} +function g() { + return ({})(); +} +try { + f(); + assertEq(0, 1); +} catch (e) { + assertEq(e instanceof TypeError, true); +} +try { + g(); + assertEq(0, 1); +} catch (e) { + assertEq(e instanceof TypeError, true); +} diff --git a/js/src/jit-test/tests/ion/bug770235.js b/js/src/jit-test/tests/ion/bug770235.js new file mode 100644 index 0000000000..a368442222 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug770235.js @@ -0,0 +1,6 @@ +a = this; +with(evalcx('')) this.__defineGetter__("x", Function); +AddSplitCases( "splitme", "", "''", ["s", "p", "l", "i", "t", "m", "e"] ); +function AddSplitCases( string, separator, str_sep, split_array ) { + for ( var matches = 0; matches < 5; (a.x) ) { matches++; } +} diff --git a/js/src/jit-test/tests/ion/bug770762.js b/js/src/jit-test/tests/ion/bug770762.js new file mode 100644 index 0000000000..6bfa975567 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug770762.js @@ -0,0 +1,18 @@ +function first(a) { + return a[0]; +} +function g() { + first([function() {}])(); +} +first([function() {}]); +first([function() {}]); +first([function() {}]); +first([function() {}]); +first([function() {}]); +first([function() {}]); +first([function() {}]); +first([function() {}]); +first([function() {}]); +first([function() {}]); +g(); +g(); diff --git a/js/src/jit-test/tests/ion/bug772901.js b/js/src/jit-test/tests/ion/bug772901.js new file mode 100644 index 0000000000..164afd1517 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug772901.js @@ -0,0 +1,7 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function f(x) { + delete ((x)++); + arguments[0] !== undefined; +} +f(1, x = [f.ArrayBuffer, undefined], this, this, this) ; diff --git a/js/src/jit-test/tests/ion/bug773587.js b/js/src/jit-test/tests/ion/bug773587.js new file mode 100644 index 0000000000..91df924eca --- /dev/null +++ b/js/src/jit-test/tests/ion/bug773587.js @@ -0,0 +1,6 @@ +StrictEquality(true, new Boolean(true), false, 0); +function StrictEquality(x, y, expect, i) { + result = ( x === y ); + if (i < 100) + StrictEquality(y.environment !== Set.environment, true, false, i + 1); +} diff --git a/js/src/jit-test/tests/ion/bug774006.js b/js/src/jit-test/tests/ion/bug774006.js new file mode 100644 index 0000000000..6037628ab8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug774006.js @@ -0,0 +1,43 @@ + +// Test IonMonkey SetElementIC when ran with --ion-eager. + +function setelem(o, i, v) { + o[i] = v; +} + +var arr = new Array(); +var obj = {}; + +setelem(arr, "prop0", 2); +setelem(arr, 0, 2); // invalidate +setelem(arr, 1, 1); // recompile with setElemIC + +setelem(arr, 0, 0); // set known element. +setelem(arr, 2, 2); // push last element. +setelem(arr, 4, 4); // test out-of-bounds. +setelem(arr, "prop0", 0); +setelem(arr, "prop1", 1); + +setelem(obj, "prop0", 2); +setelem(obj, 0, 2); +setelem(obj, 1, 1); + +setelem(obj, 0, 0); +setelem(obj, 2, 2); +setelem(obj, 4, 4); +setelem(obj, "prop0", 0); +setelem(obj, "prop1", 1); + +assertEq(arr.prop0, 0); +assertEq(arr.prop1, 1); +assertEq(arr[0], 0); +assertEq(arr[1], 1); +assertEq(arr[2], 2); +assertEq(arr[4], 4); + +assertEq(obj.prop0, 0); +assertEq(obj.prop1, 1); +assertEq(obj[0], 0); +assertEq(obj[1], 1); +assertEq(obj[2], 2); +assertEq(obj[4], 4); diff --git a/js/src/jit-test/tests/ion/bug774644.js b/js/src/jit-test/tests/ion/bug774644.js new file mode 100644 index 0000000000..b5a38b5ed0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug774644.js @@ -0,0 +1,10 @@ +// |jit-test| error: ReferenceError +function YearFromTime() {} +addTestCase(); +function addTestCase() { + var start = -62126352000000; + YearFromTime(); + var stop = -62094729600000; + for (var d = start; d < stop; d >>= 86400000) + new TestCase(); +} diff --git a/js/src/jit-test/tests/ion/bug776687.js b/js/src/jit-test/tests/ion/bug776687.js new file mode 100644 index 0000000000..15784c2e1f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug776687.js @@ -0,0 +1,8 @@ +(function() { + for (var a = 0; a < 9; a++) { + if (arguments[a]) { + while (arguments[a]) + ; + } + } +})() diff --git a/js/src/jit-test/tests/ion/bug776748.js b/js/src/jit-test/tests/ion/bug776748.js new file mode 100644 index 0000000000..aa586254ac --- /dev/null +++ b/js/src/jit-test/tests/ion/bug776748.js @@ -0,0 +1,23 @@ +var eCount = 0; +var funs = [function () {}, function () {}]; +function someElement(a) { + ++eCount; + var i = (eCount >= 8) ? 1 : 0; + return a[i] +} +var recursionGuard = 0; +function recursiveThing() { + someElement(funs); + if (++recursionGuard % 2) { + e1(); + } +} +function e1() { + try {} catch (e) {} + someElement(funs); + recursiveThing() +} +recursiveThing() +gc(); +recursiveThing() +recursiveThing() diff --git a/js/src/jit-test/tests/ion/bug779125.js b/js/src/jit-test/tests/ion/bug779125.js new file mode 100644 index 0000000000..1bfd292579 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug779125.js @@ -0,0 +1,7 @@ +function test() { + for (var i = 0; i < 60; i++) { + x = ''.charAt(-1); + assertEq(x, ""); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/bug779245.js b/js/src/jit-test/tests/ion/bug779245.js new file mode 100644 index 0000000000..c3a230f943 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug779245.js @@ -0,0 +1,14 @@ +// |jit-test| error: InternalError: too much recursion +function printStatus (msg) { + msg.split("\n"); +} +function enterFunc () { + return undefined; +} +test(); +function test() { + enterFunc(); + printStatus(""); + for (let j = 0; false;) ; + new test(); +} diff --git a/js/src/jit-test/tests/ion/bug779595.js b/js/src/jit-test/tests/ion/bug779595.js new file mode 100644 index 0000000000..e68c7eb54a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug779595.js @@ -0,0 +1,7 @@ +var SECTION = "15.5.4.10-1"; +function testInt8Array(L) { + var f = new Int8Array(8); +} +for (var i = 0; i < 13000; ++i) { + testInt8Array(SECTION,this); +} diff --git a/js/src/jit-test/tests/ion/bug779812.js b/js/src/jit-test/tests/ion/bug779812.js new file mode 100644 index 0000000000..1302210ad0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug779812.js @@ -0,0 +1,6 @@ +// |jit-test| error: ReferenceError +gczeal(2,1); +(function () { + var m = {} + return { stringify: stringify }; +})(); diff --git a/js/src/jit-test/tests/ion/bug779841.js b/js/src/jit-test/tests/ion/bug779841.js new file mode 100644 index 0000000000..cbfb39116e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug779841.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError + +function outer2() { + "use strict"; + new (function () {}).arguments +} +outer2(); diff --git a/js/src/jit-test/tests/ion/bug780842.js b/js/src/jit-test/tests/ion/bug780842.js new file mode 100644 index 0000000000..16a480a0b6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug780842.js @@ -0,0 +1,8 @@ +// |jit-test| --ion-eager;error:TypeError + +function testUKeyUObject(a, key1, key2, key3) { + assertEq(a[-1](), "hi"); +} +for (var i = 0; i < 5; i++) { + testUKeyUObject({}, "a", "b", "c"); +} diff --git a/js/src/jit-test/tests/ion/bug782087.js b/js/src/jit-test/tests/ion/bug782087.js new file mode 100644 index 0000000000..472a0fa3e7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug782087.js @@ -0,0 +1,11 @@ +test(); +function test() { + var n = 12000; + var start = new Date(); + var mceil = Math.floor; + for (i = 3; i<= n; i+=2) {} + var end = mceil (); + var timetaken = end - start; + timetaken = timetaken / 1000; + return timetaken; +} diff --git a/js/src/jit-test/tests/ion/bug783590.js b/js/src/jit-test/tests/ion/bug783590.js new file mode 100644 index 0000000000..9d277e02c9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug783590.js @@ -0,0 +1,13 @@ +// |jit-test| error: TypeError + +var glob = this; +var arr = []; +Object.defineProperty(arr, 0, { + get: (function() { + glob.__proto__; + }) +}); +try { + arr.pop(); +} catch (e) {} +arr.pop(); diff --git a/js/src/jit-test/tests/ion/bug784385.js b/js/src/jit-test/tests/ion/bug784385.js new file mode 100644 index 0000000000..52d331d977 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug784385.js @@ -0,0 +1,9 @@ +Object.defineProperty(Object.prototype, "a", { + set: function(a) { eval(""); return 123; } +}); +var obj = {}; +var obj2 = {x: 1}; +for (var i = 0; i < 100; i++) { + var res = (obj.a = obj2); + res.x = 0xbeef; +} diff --git a/js/src/jit-test/tests/ion/bug786107.js b/js/src/jit-test/tests/ion/bug786107.js new file mode 100644 index 0000000000..6676c00c00 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug786107.js @@ -0,0 +1,10 @@ +function writeHeaderToLog( string ) {} +writeHeaderToLog(-0, this); +gczeal(4); +writeHeaderToLog(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9); diff --git a/js/src/jit-test/tests/ion/bug787921.js b/js/src/jit-test/tests/ion/bug787921.js new file mode 100644 index 0000000000..0435644060 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug787921.js @@ -0,0 +1,13 @@ +// |jit-test| error: InternalError: too much recursion +function TestCase(n, d, e, a) { + this.bugnumber = typeof(BUGNUMER) != 'undefined' ? BUGNUMBER : ''; + this.type = (typeof window == 'undefined' ? 'shell' : 'browser'); + gTestcases[gTc++] = this; + if (optionName) {} + {} {} {} // Seems to be required to crash +} +function f() {} +function g(n, h) { + var t = g(TestCase.toString()); +} +g(80, f); diff --git a/js/src/jit-test/tests/ion/bug789300.js b/js/src/jit-test/tests/ion/bug789300.js new file mode 100644 index 0000000000..41438b6419 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug789300.js @@ -0,0 +1,4 @@ +function f() { + return (NaN ? 4 : 5); +} +assertEq(f(), 5); diff --git a/js/src/jit-test/tests/ion/bug789420.js b/js/src/jit-test/tests/ion/bug789420.js new file mode 100644 index 0000000000..5debca5bf5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug789420.js @@ -0,0 +1,38 @@ +function g1(x, y) { + return 0 & y; +} +var c1 = 0; +function f1() { + for (var i=0; i<100; i++) { + g1(i, i); + g1(i, {valueOf: function() { c1++; return 0; }}); + } +} +f1(); +assertEq(c1, 100); + +function g2(x, y) { + ~y; +} +var c2 = 0; +function f2() { + for (var i=0; i<100; i++) { + g2(i, i); + g2(i, {valueOf: function() { c2++; return 0; }}); + } +} +f2(); +assertEq(c2, 100); + +function g3(x, y) { + return 0 >>> y; +} +var c3 = 0; +function f3() { + for (var i=0; i<100; i++) { + g3(i, i); + g3(i, {valueOf: function() { c3++; return 0; }}); + } +} +f3(); +assertEq(c3, 100); diff --git a/js/src/jit-test/tests/ion/bug790479.js b/js/src/jit-test/tests/ion/bug790479.js new file mode 100644 index 0000000000..c7ecdbb350 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug790479.js @@ -0,0 +1,16 @@ +function f() {}; +function g() { + f(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9); +} +g(); +g(); +g(); diff --git a/js/src/jit-test/tests/ion/bug792166-1.js b/js/src/jit-test/tests/ion/bug792166-1.js new file mode 100644 index 0000000000..b620c9fb66 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug792166-1.js @@ -0,0 +1,8 @@ +Object.defineProperty(Object.prototype, 'x', { + set: function() {} +}); +var obj = {}; +for (var i = 0; i < 100 ; ++i) { + obj.x = 1; + delete obj.x; +} diff --git a/js/src/jit-test/tests/ion/bug792166-2.js b/js/src/jit-test/tests/ion/bug792166-2.js new file mode 100644 index 0000000000..4a7adc9fc0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug792166-2.js @@ -0,0 +1,8 @@ +try { + __defineGetter__("eval", function() { + this["__proto__"] + }) + delete this["__proto__"] + this["__proto__"] +} catch (e) {} +eval diff --git a/js/src/jit-test/tests/ion/bug792220.js b/js/src/jit-test/tests/ion/bug792220.js new file mode 100644 index 0000000000..7b588f042d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug792220.js @@ -0,0 +1,12 @@ +var p = new Proxy({}, { + has : function(id) {} +}); +RegExp.prototype.__proto__ = p; +function f() { + if (/a/.exec("a")) + return 1; + return 0; +} +delete RegExp.prototype.test; +f(); + diff --git a/js/src/jit-test/tests/ion/bug792234.js b/js/src/jit-test/tests/ion/bug792234.js new file mode 100644 index 0000000000..3fc9661dee --- /dev/null +++ b/js/src/jit-test/tests/ion/bug792234.js @@ -0,0 +1,7 @@ + +function foo() { + return '' / undefined; +} + +foo(); +assertEq(foo(), NaN); diff --git a/js/src/jit-test/tests/ion/bug792944.js b/js/src/jit-test/tests/ion/bug792944.js new file mode 100644 index 0000000000..0c4d54bbcd --- /dev/null +++ b/js/src/jit-test/tests/ion/bug792944.js @@ -0,0 +1,13 @@ +function whoo() { + (new Object()).foo() +} +Object.prototype.foo = function() { return undefined }; +whoo(); +Object.prototype.foo = undefined; +gc(); +try { + whoo(); + assertEq(0, 1); +} catch(e) { + assertEq(e instanceof TypeError, true); +} diff --git a/js/src/jit-test/tests/ion/bug798819.js b/js/src/jit-test/tests/ion/bug798819.js new file mode 100644 index 0000000000..1a602bb6ba --- /dev/null +++ b/js/src/jit-test/tests/ion/bug798819.js @@ -0,0 +1,10 @@ +if (!this.gcPreserveCode) + gcPreserveCode = function() {}; +this.toString = (function() { + x.filter(function() {}) +}); +x = [0, 0, 0, 0, 0, 0, 0]; +gcPreserveCode() +print(this) +gc(); +this + '' diff --git a/js/src/jit-test/tests/ion/bug798823.js b/js/src/jit-test/tests/ion/bug798823.js new file mode 100644 index 0000000000..bd823c82f2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug798823.js @@ -0,0 +1,37 @@ +function g() { + switch (0) { + default: + w = newGlobal(''); + } + return function(f, code) { + try { + evalcx(code, w) + } catch (e) {} + } +} + +function f(code) { + h(Function(code), code); +} +h = g() +f("\ + x = [];\ + y = new Set;\ + z = [];\ + Object.defineProperty(x, 5, {\ + get: (function(j) {}),\ + });\ + Object.defineProperty(z, 3, {});\ + z[9] = 1;\ + x.shift();\ +"); +f("\ + z.every(function() {\ + x.filter(function(j) {\ + if (j) {} else {\ + y.add()\ + }\ + });\ + return 2\ + })\ +"); diff --git a/js/src/jit-test/tests/ion/bug798946.js b/js/src/jit-test/tests/ion/bug798946.js new file mode 100644 index 0000000000..13ba070dbf --- /dev/null +++ b/js/src/jit-test/tests/ion/bug798946.js @@ -0,0 +1,16 @@ +// Don't assert with --ion-eager. +function RandBool() { var x = Math.random() >= 0.5; return x; } +var CHARS = "aaa"; +function RandStr() { + var c = Math.floor(Math.random() * CHARS.length); +} +function RandVal() { + return RandBool() ? RandStr() : RandStr(); +} +function GenerateSpecPermutes(matchVals, resultArray) { + var maxPermuteBody = (1 << matchVals.length) - 1; + for(var bod_pm = 0; bod_pm <= maxPermuteBody; bod_pm++) + for(var k = 0; k < matchVals.length; k++) + var body = ((bod_pm & (1 << k)) > 0) ? null : RandVal(); +} +GenerateSpecPermutes(["foo", "bar", "zing"]); diff --git a/js/src/jit-test/tests/ion/bug799185-2.js b/js/src/jit-test/tests/ion/bug799185-2.js new file mode 100644 index 0000000000..7a5350cfd7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug799185-2.js @@ -0,0 +1,51 @@ +function test(aLauncher) { + var result = null; + + let prefs = 0; + let bundle = 1; + + if (!bundle) { + // Check to see if the user wishes to auto save to the default download + // folder without prompting. Note that preference might not be set. + let autodownload = false; + try { + autodownload = !!autodownload; + } catch (e) { } + + if (autodownload) { + // Retrieve the user's default download directory + let dnldMgr = 2; + let defaultFolder = 3; + + try { + result = 42; + } + catch (ex) { + if (result == 12) { + let prompter = 4; + return; + } + } + + // Check to make sure we have a valid directory, otherwise, prompt + if (result) + return result; + } + } + + // Use file picker to show dialog. + var picker = 0; + if (picker) { + // aSuggestedFileExtension includes the period, so strip it + picker = 1; + } + else { + try { + picker = aLauncher.MIMEInfo.primaryExtension; + } + catch (ex) { } + } + return result; + } + +test({}); diff --git a/js/src/jit-test/tests/ion/bug799185-3.js b/js/src/jit-test/tests/ion/bug799185-3.js new file mode 100644 index 0000000000..6077264c04 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug799185-3.js @@ -0,0 +1,9 @@ +// |jit-test| error: TypeError +function processNode(self) { + try { + if (self) return; + undefined.z; + } finally { + } +}; +processNode(); diff --git a/js/src/jit-test/tests/ion/bug799185-4.js b/js/src/jit-test/tests/ion/bug799185-4.js new file mode 100644 index 0000000000..964e5c9f20 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug799185-4.js @@ -0,0 +1,12 @@ +function foo(aObject) +{ + try { } + catch (ex) { + if (ex.name != "TypeError") + throw ex; + } + try { Object.getPrototypeOf(aObject); } + catch (ex) { } +} + +foo(true); diff --git a/js/src/jit-test/tests/ion/bug799185-5.js b/js/src/jit-test/tests/ion/bug799185-5.js new file mode 100644 index 0000000000..ba54359818 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug799185-5.js @@ -0,0 +1,26 @@ +function foo(aObject) +{ + try { + try { + if (!aObject) + return; + } + catch (ex) { + if (ex.name != "TypeError") + throw ex; + } + finally { + } + undefined.x; + } + catch (ex) { + if (ex.name != "TypeError") + throw ex; + if (ex.name != "TypeError") + throw ex; + } + finally { + } +} + +foo(true); diff --git a/js/src/jit-test/tests/ion/bug799185-6.js b/js/src/jit-test/tests/ion/bug799185-6.js new file mode 100644 index 0000000000..2980cfa596 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug799185-6.js @@ -0,0 +1,19 @@ +function f(a, b, c) { + while (a) { + let x; + if (b) { + if (c) { + d(); + break; // hidden LEAVEBLOCK, then GOTO + } + break; // another hidden LEAVEBLOCK, then GOTO + } + } + null.x; +} + +try { + f(); +} catch (x) { + ; +} diff --git a/js/src/jit-test/tests/ion/bug799185-7.js b/js/src/jit-test/tests/ion/bug799185-7.js new file mode 100644 index 0000000000..86cc0c8afc --- /dev/null +++ b/js/src/jit-test/tests/ion/bug799185-7.js @@ -0,0 +1,66 @@ +var y = undefined; + +try {} catch (x) { + try {} catch (x) { + try {} catch (x) { + } + } +} + +while (false) { + try {} catch ({x,y}) { + try {} catch ({a,b,c,d}) { + if (b) break; + if (c) continue; + } + } finally {} +} + +Label1: +for (let foo = 0; foo < 0; foo++) { + Label2: + for (let bar = 0; bar < 0; bar++) { + if (foo) { + if (bar) + break Label2; + continue Label2; + } else { + if (bar) + break Label1; + continue Label1; + } + } +} + +Label3: +for (let foo = 0; foo < 0; foo++) { + Label4: + for (let bar = 0; bar < 0; bar++) { + if (foo) { + if (bar) + continue Label4; + break Label4; + } else { + if (bar) + continue Label3; + break Label3; + } + } +} + +switch (42) { +default: + try {} catch (x) { + if (x + 1) { + if (x) + break; + break; + } + } + break; +} + +try { + null.x; +} catch (x) { +} diff --git a/js/src/jit-test/tests/ion/bug799185-8.js b/js/src/jit-test/tests/ion/bug799185-8.js new file mode 100644 index 0000000000..b84bcab9ee --- /dev/null +++ b/js/src/jit-test/tests/ion/bug799185-8.js @@ -0,0 +1,19 @@ +// |jit-test| error: TypeError +function testBitOrInconvertibleObjectInconvertibleObject() { + var o1 = {}; + var count2 = 0; + function toString2() { + ++count2; + if (count2 == 95) return {}; + } + var o2 = { toString: toString2 }; + try { + for (var i = 0; i < 100; i++) + var q = o1 | o2; + } catch (e) { + if (i !== 94) + return gc(); + this.bar.foo ^ this + } +} +testBitOrInconvertibleObjectInconvertibleObject() diff --git a/js/src/jit-test/tests/ion/bug799185-9.js b/js/src/jit-test/tests/ion/bug799185-9.js new file mode 100644 index 0000000000..96e6433462 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug799185-9.js @@ -0,0 +1,12 @@ + +function f() { + try {} catch (x) { + return; + } finally { + null.x; + } +} + +try { + f(); +} catch (x) {} diff --git a/js/src/jit-test/tests/ion/bug800179.js b/js/src/jit-test/tests/ion/bug800179.js new file mode 100644 index 0000000000..91b9d87db2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug800179.js @@ -0,0 +1,24 @@ +// |jit-test| error: TypeError + +try { + x = [] + y = function() {} + t = Uint8ClampedArray + Object.defineProperty(x, 1, { + get: (function() { + for (v of t) {} + }) + }) + Object.defineProperty(x, 8, { + configurable: t + }).reverse() +} catch (e) {} +Object.defineProperty([], 1, { + configurable: true, + get: (function() { + for (j = 0; j < 50; ++j) { + y() + } + }) +}).pop() +x.map(y) diff --git a/js/src/jit-test/tests/ion/bug804064.js b/js/src/jit-test/tests/ion/bug804064.js new file mode 100644 index 0000000000..453b6b890d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug804064.js @@ -0,0 +1,22 @@ +function f (v, i) { + var c = v[i]; + switch (c) { + case 0: + assertEq(v[i], 0); + break; + case 1: + assertEq(v[i], 1); + break; + default: + assertEq(c === 0 || c === 1, false); + } +} + +var v = [ + 0, 0.0, 0.1, 1, 1.0, 1.1, + null, undefined, true, false, {}, "", "0", "1", + { valueOf: function () { return 0; } }, + { valueOf: function () { return 1; } } +]; +for (var i = 0; i < 100; i++) + f(v, i % v.length); diff --git a/js/src/jit-test/tests/ion/bug807035.js b/js/src/jit-test/tests/ion/bug807035.js new file mode 100644 index 0000000000..f8ec4b8f63 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug807035.js @@ -0,0 +1,6 @@ + +x = [0, 0, 0, 0, 0, 0, 0, 0] +y = ({}).__proto__ +x.sort(function() { + y.z +}) diff --git a/js/src/jit-test/tests/ion/bug807047.js b/js/src/jit-test/tests/ion/bug807047.js new file mode 100644 index 0000000000..89fedd2d8a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug807047.js @@ -0,0 +1,9 @@ +function f(code) { + eval(code) +} +f("\ + function h({x}) {\ + print(x)\ + }\ + h(/x/);\ +") diff --git a/js/src/jit-test/tests/ion/bug808023.js b/js/src/jit-test/tests/ion/bug808023.js new file mode 100644 index 0000000000..56bcf75bcb --- /dev/null +++ b/js/src/jit-test/tests/ion/bug808023.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError +t = "" +function f(code) { + eval("(function(){" + code + "})")() +} +evalcx("") +f("var r=({a:1})[\"\"];t(r)") diff --git a/js/src/jit-test/tests/ion/bug809021.js b/js/src/jit-test/tests/ion/bug809021.js new file mode 100644 index 0000000000..c4c3d436be --- /dev/null +++ b/js/src/jit-test/tests/ion/bug809021.js @@ -0,0 +1,73 @@ +// nactuals > nformals +function testOverflow() { + var called = false; + function f(a) { + assertEq(a, 173); + assertEq(arguments.length, 2); + assertEq(arguments[0], a); + assertEq(arguments[1], a); + called = true; + } + + for (var i=0; i<10; i++) + [173, 173, 173].sort(f); + assertEq(called, true); +} +testOverflow(); + +// nactuals == nformals +function testEqual() { + var called = false; + function f(a, b) { + assertEq(a, 173); + assertEq(arguments.length, 2); + assertEq(arguments[0], a); + assertEq(arguments[1], b); + called = true; + } + + for (var i=0; i<10; i++) + [173, 173, 173].sort(f); + assertEq(called, true); +} +testEqual(); + +// nactuals < nformals +function testUnderflow() { + var called = false; + function f(a, b, c) { + assertEq(a, 173); + assertEq(c, undefined); + assertEq(arguments.length, 2); + assertEq(arguments[0], a); + assertEq(arguments[1], b); + called = true; + } + + for (var i=0; i<10; i++) + [173, 173, 173].sort(f); + assertEq(called, true); +} +testUnderflow(); + +function testUnderflowMany() { + var called = 0; + function f(a, b, c, d, e, f, g, h) { + assertEq(a, 173); + assertEq(arguments.length, 3); + assertEq(arguments[0], a); + assertEq(arguments[1] < 3, true); + assertEq(c.length, 3); + assertEq(d, undefined); + assertEq(e, undefined); + assertEq(f, undefined); + assertEq(g, undefined); + assertEq(h, undefined); + called += 1; + } + + for (var i=0; i<10; i++) + [173, 173, 173].map(f); + assertEq(called, 30); +} +testUnderflowMany(); diff --git a/js/src/jit-test/tests/ion/bug809472.js b/js/src/jit-test/tests/ion/bug809472.js new file mode 100644 index 0000000000..662d6e524c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug809472.js @@ -0,0 +1,19 @@ +function test1(x) { + return (x*((2<<23)-1))|0 +} +function test2(x) { + return (x*((2<<22)-1))|0 +} +function test3(x) { + return (x*((2<<21)-1))|0 +} +function test4(x) { + var b = x + x + 3 + return (b*b) | 0 +} +//MAX_INT +var x = 0x7ffffffe; +assertEq(test1(x), 2113929216); +assertEq(test2(x), 2130706434); +assertEq(test3(x), 2139095042); +assertEq(test4(x), 0); diff --git a/js/src/jit-test/tests/ion/bug810253.js b/js/src/jit-test/tests/ion/bug810253.js new file mode 100644 index 0000000000..2c8685fd91 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug810253.js @@ -0,0 +1,8 @@ +function f(x) { + // Enter via OSR. + for (var j = 0; j < 100; j++) { }; + + for (var i = 0; i < arguments.length; i++) + assertEq(arguments[i], i); +}; +f(0, 1, 2, 3); diff --git a/js/src/jit-test/tests/ion/bug813784.js b/js/src/jit-test/tests/ion/bug813784.js new file mode 100644 index 0000000000..d3b0767135 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug813784.js @@ -0,0 +1,184 @@ +/* Test an inlined argument returns the arguments from the right function */ +function get_arg_2() { return arguments[2]; } +function test() { return get_arg_2(1,2,3); } + +assertEq(test("a","b","c"), 3); +assertEq(test("a","b","c"), 3); + +/* Test the right length of the argument vector gets returned */ +function arg_len() { return arguments.length; } +function test2() { return arg_len(1,2,3); } + +assertEq(test2("a","b","c","d"), 3); +assertEq(test2("a","b","c","d"), 3); + +/* Test returning the argument vector */ +function get_arg() { return arguments; } +function test3() { return get_arg(1,2,3) } + +var arg = test3("a","b","c","d","e"); +assertEq(arg.length, 3); +assertEq(arg[0], 1); +assertEq(arg[1], 2); +assertEq(arg[2], 3); +var arg = test3("a","b","c","d","e"); +assertEq(arg.length, 3); +assertEq(arg[0], 1); +assertEq(arg[1], 2); +assertEq(arg[2], 3); + +/* Test funapply with arguments */ +function return0(a, b, c) { return 0; } +function funapply() { return return0.apply(undefined, arguments); } +function test4() { return funapply(1,2,3) } + +assertEq(test4("a","b","c","d","e"), 0); +assertEq(test4("a","b","c","d","e"), 0); + +/* Test if funapply gets the right arguments */ +function apply3(a, b, c) { + assertEq(a,1) + assertEq(b,2) + assertEq(c,3) +} +function funapply2() { return apply3.apply(undefined, arguments); } +function test5() { return funapply2(1,2,3) } + +test5("a","b","c","d","e"); +test5("a","b","c","d","e"); + +/* Test funapply when argument vector has less args than callee and callee known */ +function apply_fun1(a, b, c) { assertEq(c, undefined) } +function funapply3() { return apply_fun1.apply(undefined, arguments); } +function test7() { return funapply3(1,2) } + +test7("a","b","c","d","e"); +test7("a","b","c","d","e"); + +/* Test funapply when argument vector has less args than callee and callee unknown */ +var fun; +function apply_fun2(a, b, c) { assertEq(c, undefined) } +function funapply4() { return fun.apply(undefined, arguments); } +function test8() { return funapply4(1,2) } + +fun = apply_fun1; +test8("a","b","c","d","e"); +fun = apply_fun2; +test8("a","b","c","d","e"); +fun = apply_fun1; +test8("a","b","c","d","e"); +fun = apply_fun2; +test8("a","b","c","d","e"); + +//////////// + +function dumpArgs(i) { if (i == 90) return funapply5.arguments.length; return [i]; } +function funapply5() { return dumpArgs.apply(undefined, arguments); } +function test9(i) { return funapply5(i); } + +assertEq(test9(89)[0], 89); +assertEq(test9(90), 1); + +///////////// + +function notinlined() { + assertEq(arguments[0], 4); + assertEq(arguments[1], 5); + assertEq(arguments[2], 6); +} + +function inline2(a) { return notinlined(4,5,6); } +function inline() { return inline2(1,2,3); } +function base1() { return inline(-1,-2,-3); } + +base1(10,11,12); +base1(10,11,12); + +//////////////// + +function inlined(a) { + if (a == 11) { + a = undefined; + return arguments; + } +} + +function inline4(a) { return inlined(a,5,6); } +function inline3(a) { return inline4(a,2,3); } +function base2(a) { return inline3(a,-2,-3); } + +var args = base2(10,11,12); +assertEq(args, undefined); +var args = base2(11,11,12); +assertEq(args[0], undefined); +assertEq(args[1], 5); +assertEq(args[2], 6); +var args = base2(10,11,12); +assertEq(args, undefined); +var args = base2(11,11,12); +assertEq(args[0], undefined); +assertEq(args[1], 5); +assertEq(args[2], 6); + +////////////////// + +function arg_len2() { assertEq(arguments.length, 4); } +function bailing_arg_len(a) { + if (a == 90) { + bailout(); + arg_len.apply(undefined, arguments); + } + assertEq(arguments.length, 4); + return arguments; +} +function test10(i) { return bailing_arg_len(i,2,3,4); } + +var args = test10(1, "b"); +assertEq(args.length, 4) +assertEq(args[0], 1) +assertEq(args[1], 2) +assertEq(args[2], 3) +assertEq(args[3], 4) + +var args = test10(90, 'b'); +assertEq(args.length, 4) +assertEq(args[0], 90) +assertEq(args[1], 2) +assertEq(args[2], 3) +assertEq(args[3], 4) + +//////////// + +function dumpArgs11(i) { return funapply11.arguments; eval(""); } +function funapply11(i) { return dumpArgs11(i); } +function test11(i) { return funapply11(i); } + +assertEq(test11(89)[0], 89); +assertEq(test11(90)[0], 90); + +//////////// + +function dumpArgs12(i) { if (i == 90) return funapply12.arguments; return [i]; } +function noion12(i) { return dumpArgs12(i); eval(""); } +function funapply12(i) { return noion12(i); } +function test12(i) { return funapply12(i); } + +assertEq(test12("89")[0], "89"); +assertEq(test12("90")[0], "90"); + +//////////// + +function f13(i) { if (i == "90") return f13.arguments; return [i]; } +function test13(i,b) { return f13(i,b); } + +assertEq(test13("89", 1)[0], "89"); +assertEq(test13("90", 2)[1], 2); + +/////////// + +function noion14(i) { if (i == 2) { return funapply14.arguments; } return [i]; eval(""); } +function funapply14(i) { if (i == 90) { i = "2"; } return noion14(i); } +function test14(i) { return funapply14(i); } + +assertEq(test14("89")[0], "89"); +assertEq(test14("90")[0], "2"); diff --git a/js/src/jit-test/tests/ion/bug816492.js b/js/src/jit-test/tests/ion/bug816492.js new file mode 100644 index 0000000000..c3c5d84fa5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug816492.js @@ -0,0 +1,8 @@ +function TestCase(n, d, e, a) {} +function reportCompare () { + var testcase = new TestCase(); +} +reportCompare(); +schedulegc(10); +this.TestCase=Number; +reportCompare(4294967295.5); diff --git a/js/src/jit-test/tests/ion/bug816786.js b/js/src/jit-test/tests/ion/bug816786.js new file mode 100644 index 0000000000..dde7409632 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug816786.js @@ -0,0 +1,38 @@ +var g; +function test(a, b) { + + g = 0; + for(var i=0; i<100; i++) { + g += i + } + + var t = a*b; + + for(var i=0; i<100; i++) { + t = x.y + t; + return t; + } + +} + +function negzero(x) { + return x===0 && (1/x)===-Infinity; +} + + +var x = {y:0}; +var a = 0; +var b = 0; +for(var i=0; i<58; i++) { + var o = test(a, b); + + // Test returns + // * 0, if i < 50 + // * -0, if i >= 50 + assertEq(negzero(o), i>50); + + if (i == 50) { + a = -1 + x.y = -0 + } +} diff --git a/js/src/jit-test/tests/ion/bug818023.js b/js/src/jit-test/tests/ion/bug818023.js new file mode 100644 index 0000000000..d572aaf243 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug818023.js @@ -0,0 +1,53 @@ +Function.prototype.callX = Function.prototype.call; +var x; +function f() { + x = f.caller; + return x; +} + +function g() { + return f.callX(null); +} + +function h1() { + // native + return ([0].map(f))[0]; +} + +function h2() { + // self-hosted + x = null; + [0].forEach(f); + return x; +} + +function k() { + x = null; + [0, 1].sort(f); + return x; +} + +function l() { + return f(); +} + +assertEq(g(), g); +assertEq(h1(), h1); +assertEq(h2(), h2); +assertEq(k(), k); +assertEq(l(), l); + +var baz; +var foo = {callX: function() { return "m"; }}; +function bar() { + return baz.caller; +} +function m() { + return baz.callX(null); +} + +baz = foo; +assertEq(m(), "m"); +baz = bar; +assertEq(m(), m); +assertEq(m(), m); diff --git a/js/src/jit-test/tests/ion/bug819611.js b/js/src/jit-test/tests/ion/bug819611.js new file mode 100644 index 0000000000..f5b662935b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug819611.js @@ -0,0 +1,6 @@ +// |jit-test| --ion-eager +x = [0, 0] +Object.freeze(x).map(function() { + x.length = 6 +}) +assertEq(x.length,2); diff --git a/js/src/jit-test/tests/ion/bug819794.js b/js/src/jit-test/tests/ion/bug819794.js new file mode 100644 index 0000000000..919c5c47db --- /dev/null +++ b/js/src/jit-test/tests/ion/bug819794.js @@ -0,0 +1,7 @@ +x = []; +x[2] = 1; +x.unshift(0); +x.unshift(0); +x.sort(function() { + return Math.abs(4) +}) diff --git a/js/src/jit-test/tests/ion/bug819865.js b/js/src/jit-test/tests/ion/bug819865.js new file mode 100644 index 0000000000..db198594ef --- /dev/null +++ b/js/src/jit-test/tests/ion/bug819865.js @@ -0,0 +1,2 @@ +(function x() { return (x == x); })(); + diff --git a/js/src/jit-test/tests/ion/bug820873.js b/js/src/jit-test/tests/ion/bug820873.js new file mode 100644 index 0000000000..d50e1b19bb --- /dev/null +++ b/js/src/jit-test/tests/ion/bug820873.js @@ -0,0 +1,28 @@ + +var lfcode = new Array(); +lfcode.push("3"); +lfcode.push("with(evalcx('')) this.__defineGetter__('x', Function);"); +lfcode.push("gczeal(2)"); +lfcode.push("4"); +lfcode.push("\ + var log = '';\ + for (var { m } = i = 0 ; ; i++) {\ + log += x; \ + if (x === 6)\ + a.slow = true; if (i > 1000) break;\ + }\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file) +} +function loadFile(lfVarx) { + if (!isNaN(lfVarx)) { + lfRunTypeId = parseInt(lfVarx); + } else { + switch (lfRunTypeId) { + case 3: function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); break; + case 4: eval("(function() { " + lfVarx + " })();"); break; + } + } +} diff --git a/js/src/jit-test/tests/ion/bug821788.js b/js/src/jit-test/tests/ion/bug821788.js new file mode 100644 index 0000000000..520b7919c2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug821788.js @@ -0,0 +1,13 @@ + +var appendToActual = function(s) { + actual += s + ','; +} +gczeal(2,(3)); +actual = ''; +function loop(f) {} +function f(j, k) { + var g = function(a, b, c) {} + for (k = 0; k < 5; ++k) + appendToActual(loop(g)); +} +f(1); diff --git a/js/src/jit-test/tests/ion/bug821794.js b/js/src/jit-test/tests/ion/bug821794.js new file mode 100644 index 0000000000..4cc5257ed0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug821794.js @@ -0,0 +1,10 @@ + +gczeal(2); +function bitsinbyte() { + var summary = true[0]; +} +function TimeFunc(func) { + for(var y=0; y<11000; y++) + func(); +} +TimeFunc(bitsinbyte); diff --git a/js/src/jit-test/tests/ion/bug822938.js b/js/src/jit-test/tests/ion/bug822938.js new file mode 100644 index 0000000000..3e28c42056 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug822938.js @@ -0,0 +1,9 @@ + +(function f(i) { + // Add an OSR block which does not define the callee. + for (; false; ) {}; + + // Use the callee. + if (i) + f(i - 1); +})(50); diff --git a/js/src/jit-test/tests/ion/bug824347.js b/js/src/jit-test/tests/ion/bug824347.js new file mode 100644 index 0000000000..5e48c33ba7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug824347.js @@ -0,0 +1,11 @@ +function g() { } +function f(b) { + var test; + if (b) { + g.apply(null, arguments); + var test = 1; + } else { + f(false); + } +} +f(true); diff --git a/js/src/jit-test/tests/ion/bug824473.js b/js/src/jit-test/tests/ion/bug824473.js new file mode 100644 index 0000000000..93726b845f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug824473.js @@ -0,0 +1,41 @@ +function dumpArgs(i) { if (i == 90) return funapply.arguments.length; return [i]; } +function funapply() { return dumpArgs.apply(undefined, arguments); } +function test(i) { return funapply(i); } + +assertEq(test(89)[0], 89); +assertEq(test(90), 1); + +function dumpArgs2(i,b) { if (i == 90) return funapply2.arguments.length; return [i]; } +function funapply2() { return dumpArgs2.apply(undefined, arguments); } +function test2(i,b) { return funapply2(i,b); } + +assertEq(test2(89, 10)[0], 89); +assertEq(test2(90, 10), 2); + +function dumpArgs3(i,b) { if (i == 90) return funapply3.arguments.length; return [i]; } +function funapply3() { return dumpArgs3.apply(undefined, arguments); } +function test3(i,b, c) { return funapply3(i,b,c); } + +assertEq(test3(89, 10, 11)[0], 89); +assertEq(test3(90, 10, 11), 3); + +function dumpArgs4(i) { if (i == 90) return funapply4.arguments.length; return [i]; } +function funapply4() { return dumpArgs4.apply(undefined, arguments); } +function test4(i,b) { return funapply4(i,b,1,2); } + +assertEq(test4(89,10)[0], 89); +assertEq(test4(90,10), 4); + +function dumpArgs5(i,j,k,l) { if (i == 90) return funapply5.arguments.length*10 + l; return [i]; } +function funapply5() { return dumpArgs5.apply(undefined, arguments); } +function test5(i,b) { return funapply5(i,b,1,2); } + +assertEq(test5(89,10)[0], 89); +assertEq(test5(90,10), 42); + +function dumpArgs6(i) { if (i == 90) return funapply6.arguments.length; return [i]; } +function funapply6() { return dumpArgs6.apply(undefined, arguments); } +function test6(i) { return funapply6(i,1,2,3); } + +assertEq(test6(89)[0], 89); +assertEq(test6(90), 4); diff --git a/js/src/jit-test/tests/ion/bug824863.js b/js/src/jit-test/tests/ion/bug824863.js new file mode 100644 index 0000000000..32627b9c6e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug824863.js @@ -0,0 +1,53 @@ +Module = {}; +var Runtime = { + alignMemory: function alignMemory(size, quantum) { + return Math.ceil((size) / (quantum ? quantum : 4)) * (quantum ? quantum : 4); + }, +} +function assert(condition, text) { + throw text; +} +STACK_ROOT = STACKTOP = Runtime.alignMemory(1); +function _main() { + var __stackBase__ = STACKTOP; + var label; + label = 2; + while (1) { + switch (label) { + case 2: + var $f = __stackBase__; + var $1 = __stackBase__ + 12; + var $2 = __stackBase__ + 24; + var $3 = $f | 0; + var $4 = $f + 4 | 0; + var $5 = $f + 8 | 0; + var $_0 = $1 | 0; + var $_1 = $1 + 4 | 0; + var $_2 = $1 + 8 | 0; + var $j_012 = 0; + label = 4; + break; + case 4: + assertEq($_2, 24); + if (($j_012 | 0) != 110) { + var $j_012 = $j_012 + 1; + break; + } + var $23 = $i_014 + 1 | 0; + if (($23 | 0) != 110) { + var $i_014 = $23; + var $j_012 = 0; + label = 4; + break; + } + default: + assert(0, "bad label: " + label); + } + } +} +try { + _main(0, [], 0); + assertEq(0, 1); +} catch(e) { + assertEq(e, "bad label: 4"); +} diff --git a/js/src/jit-test/tests/ion/bug825599.js b/js/src/jit-test/tests/ion/bug825599.js new file mode 100644 index 0000000000..9a08ff150d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug825599.js @@ -0,0 +1,27 @@ +var typedSwitch0 = function (a) { + switch (a) { + case null: + return 0; + case 1.1: + return 1; + case "2": + return 2; + case 3: + return 3; + } + return 4; +}; + +// reuse the same function for testing with different inputs & type. +var typedSwitch1 = eval(`(${typedSwitch0})`); +var typedSwitch2 = eval(`(${typedSwitch0})`); +var typedSwitch3 = eval(`(${typedSwitch0})`); +var typedSwitch4 = eval(`(${typedSwitch0})`); + +for (var i = 0; i < 100; i++) { + assertEq(typedSwitch0(null), 0); + assertEq(typedSwitch1(1.1), 1); + assertEq(typedSwitch2("2"), 2); + assertEq(typedSwitch3(3), 3); + assertEq(typedSwitch4(undefined), 4); +} diff --git a/js/src/jit-test/tests/ion/bug825705.js b/js/src/jit-test/tests/ion/bug825705.js new file mode 100644 index 0000000000..ebd30c21c8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug825705.js @@ -0,0 +1,8 @@ +// Test 1: When constructing x, we shouldn't take the prototype for this. +// it will crash if that happens +evalcx("\ + var x = newGlobal().Object;\ + function f() { return new x; }\ + f();\ + f();\ +", newGlobal()); diff --git a/js/src/jit-test/tests/ion/bug825716.js b/js/src/jit-test/tests/ion/bug825716.js new file mode 100644 index 0000000000..ef1ee10a78 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug825716.js @@ -0,0 +1,3 @@ +(function() { + assertEq(["" % null][0], NaN); +})(); diff --git a/js/src/jit-test/tests/ion/bug827082.js b/js/src/jit-test/tests/ion/bug827082.js new file mode 100644 index 0000000000..9add78d6bc --- /dev/null +++ b/js/src/jit-test/tests/ion/bug827082.js @@ -0,0 +1,2 @@ +// |jit-test| error: TypeError +new [].sort() diff --git a/js/src/jit-test/tests/ion/bug827659-1.js b/js/src/jit-test/tests/ion/bug827659-1.js new file mode 100644 index 0000000000..f56ef46e3c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug827659-1.js @@ -0,0 +1,11 @@ +function f() { + return y.byteOffset; +} +var y; +for (var j = 0; j < 1; ++j) { + y = new Float32Array(); +} +f(); +y = 0; +assertEq(f(), undefined); +assertEq(f(), undefined); diff --git a/js/src/jit-test/tests/ion/bug827821-2.js b/js/src/jit-test/tests/ion/bug827821-2.js new file mode 100644 index 0000000000..f1231320a4 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug827821-2.js @@ -0,0 +1,58 @@ +s = newGlobal(''); +function f(code) { + try { + evalcx(code, s) + } catch (e) {} +} +f("\ + options('strict');\ + var x;\ + y='';\ + Object.preventExtensions(this);\ + y=new String;\ + y.toString=(function(){x=new Iterator});\ +"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("var z;"); +f("\ + Iterator=String.prototype.toUpperCase;\ + v=(function(){});\ + Object.defineProperty(Function,0,({enumerable:x}));\ +") diff --git a/js/src/jit-test/tests/ion/bug827821-3.js b/js/src/jit-test/tests/ion/bug827821-3.js new file mode 100644 index 0000000000..0db37061fc --- /dev/null +++ b/js/src/jit-test/tests/ion/bug827821-3.js @@ -0,0 +1,13 @@ +// |jit-test| error: TypeError +function TestCase(n, d, e, a) {} +function reportCompare (expected, actual, description) { + var testcase = new TestCase(); +} +eval("(function() { \ +var summary = 'Do not hang/crash, blah blah blah';\ +var actual = 'No Crash';\ +var expect = 'No Crash';\ +reportCompare(expect, actual, summary);\ +})();"); +eval("(function() { TestCase = Object.prototype.toString; })();"); +eval("gc(); reportCompare();"); diff --git a/js/src/jit-test/tests/ion/bug830269.js b/js/src/jit-test/tests/ion/bug830269.js new file mode 100644 index 0000000000..df4fbde99c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug830269.js @@ -0,0 +1,12 @@ +function f(g,y,z,w) { + return g.apply(undefined, arguments); +} + +function outer() { + var g = function() {}; + for (var i = 0; i < 20000; i++) + f(g,2,3,4,5); + f(g,2,3,4,5); +} + +outer(); diff --git a/js/src/jit-test/tests/ion/bug831087.js b/js/src/jit-test/tests/ion/bug831087.js new file mode 100644 index 0000000000..fb672075df --- /dev/null +++ b/js/src/jit-test/tests/ion/bug831087.js @@ -0,0 +1,15 @@ +function isNegZero(x) { + return x===0 && (1/x)===-Infinity; +} + +try { + for (y = 0; y < 1; y++) { + x = y; + } +} catch (e) {} + +function f() { + (x /= -9) +} +f() +assertEq(isNegZero(this.x), true); diff --git a/js/src/jit-test/tests/ion/bug831424-1.js b/js/src/jit-test/tests/ion/bug831424-1.js new file mode 100644 index 0000000000..a83a326f03 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug831424-1.js @@ -0,0 +1,16 @@ +// |jit-test| error: TypeError +x = []; +Object.defineProperty(this, "y", { + get: function() { + FakeDOMObject.caller + } +}); +Object.defineProperty(x, 3, { + get: function() { + y[13]; + } +}); +(function() { + x.shift(); +})(); + diff --git a/js/src/jit-test/tests/ion/bug831424-2.js b/js/src/jit-test/tests/ion/bug831424-2.js new file mode 100644 index 0000000000..bbd7b0ce6b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug831424-2.js @@ -0,0 +1,16 @@ +// |jit-test| error: TypeError +x = []; +Object.defineProperty(this, "y", { + get: function() { + print.caller + } +}); +Object.defineProperty(x, 3, { + get: function() { + y[13]; + } +}); +(function() { + x.shift(); +})(); + diff --git a/js/src/jit-test/tests/ion/bug832058.js b/js/src/jit-test/tests/ion/bug832058.js new file mode 100644 index 0000000000..22dd37a4e0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug832058.js @@ -0,0 +1,16 @@ +// |jit-test| +function f(c) { + var b = arguments; + if (c == 1) + b = 1; + return b; +} + +evaluate("f('a', 'b', 'c', 'd', 'e');"); +function test(){ + var args = f('a', (0), 'c'); + var s; + for (var v of args) + s += v; +} +test(); diff --git a/js/src/jit-test/tests/ion/bug833076.js b/js/src/jit-test/tests/ion/bug833076.js new file mode 100644 index 0000000000..a2ab5d35a7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug833076.js @@ -0,0 +1,6 @@ + +eval("(function() { " + "\ +var Constr = function( ... property) {};\ +Constr.prototype = 0.0;\ +var c = new Constr( ) ;\ +" + " })();"); diff --git a/js/src/jit-test/tests/ion/bug835178.js b/js/src/jit-test/tests/ion/bug835178.js new file mode 100644 index 0000000000..ec23951924 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug835178.js @@ -0,0 +1,30 @@ +function boo() { return foo.arguments[0] } +function foo(a,b,c) { if (a == 0) {a = 2; return boo();} return a } +function inlined() { return foo.apply({}, arguments); } +function test(a,b,c) { return inlined(a,b,c) } + +assertEq(test(1,2,3), 1); +assertEq(test(0,2,3), 2); + +function g(a) { if (g.arguments[1]) return true; return false; }; +function f() { return g(false, true); }; +function h() { return f(false, false); } + +assertEq(h(false, false), true); +assertEq(h(false, false), true); + +function g2(a) { if (a) { if (g2.arguments[1]) return true; return false; } return true; }; +function f2(a) { return g2(a, true); }; +function h2(a) { return f2(a, false); } + +assertEq(h2(false, false), true); +assertEq(h2(true, false), true); + +// Currently disabled for now, but in testsuite to be sure +function g3(a) { return a }; +function f3(a) { a = 3; return g3.apply({}, arguments); }; +function h3(a) { return f3(a); } + +assertEq(h3(0), 3); +assertEq(h3(0), 3); + diff --git a/js/src/jit-test/tests/ion/bug835496.js b/js/src/jit-test/tests/ion/bug835496.js new file mode 100644 index 0000000000..0c40c0106c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug835496.js @@ -0,0 +1,6 @@ +// |jit-test| error: TypeError + +(function([{x}]) {})({ + t: 0, + "1": 0 +}) diff --git a/js/src/jit-test/tests/ion/bug836102.js b/js/src/jit-test/tests/ion/bug836102.js new file mode 100644 index 0000000000..3fbcbede64 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug836102.js @@ -0,0 +1,26 @@ +function t() { + var x = 0x123456789abcd; + x = x + x; // x = 640511947003802 + x = x + x; // x = 1281023894007604 + x = x + x; // x = 2562047788015208 + x = x + x; // x = 5124095576030416 + x = x + x; // x = 10248191152060832 + assertEq(x+1 | 0, -248153696) +} +t() + +function t2() { + var x = -0x123456789abcd; + x = x + x; + x = x + x; + x = x + x; + x = x + x; + x = x + x; + assertEq(x + 7 | 0, 248153704) +} +t2() + +function t() { + var x = 4294967296+1; + assertEq(x|0, 1); +} diff --git a/js/src/jit-test/tests/ion/bug836274.js b/js/src/jit-test/tests/ion/bug836274.js new file mode 100644 index 0000000000..f1960c2dd9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug836274.js @@ -0,0 +1,13 @@ +function dumpArgs6(i) { + if (i == 90) + return funapply6.arguments.length; + return [i]; +} +function funapply6() { + return dumpArgs6.apply({}, arguments); +} +function test6(i) { + return funapply6(i,1,2,3); +} +test6(89)[0] +test6(0.2) diff --git a/js/src/jit-test/tests/ion/bug836705.js b/js/src/jit-test/tests/ion/bug836705.js new file mode 100644 index 0000000000..aa13c082e1 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug836705.js @@ -0,0 +1,12 @@ + +Object.prototype[3] = 3; +var sjcl = { + cipher: {}, +}; +sjcl.cipher.aes = function (a) { + d = a.slice(0); + for (a=0; a < 60; a++) { + c = d[a - 1]; + } +}; +new sjcl.cipher.aes([0xffffffff, 0xffffffff]); diff --git a/js/src/jit-test/tests/ion/bug837312.js b/js/src/jit-test/tests/ion/bug837312.js new file mode 100644 index 0000000000..75c326813e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug837312.js @@ -0,0 +1,7 @@ +function bind(f) { + return f.call.apply(f.bind, arguments); +} +function g(a, b) {} +for(var i=0; i<20; ++i) { + g.call(undefined, {}, bind(function(){})); +} diff --git a/js/src/jit-test/tests/ion/bug839315.js b/js/src/jit-test/tests/ion/bug839315.js new file mode 100644 index 0000000000..88446a7d23 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug839315.js @@ -0,0 +1,18 @@ +function f(x) { + switch(x) { + case 0: + case 100: + } +} +f(""); +evaluate('f({})', { noScriptRval : true }); + +function g(x) { + switch(x) { + case 0.1: + case 100: + } +} + +g(false); +evaluate('g({})', { noScriptRval : true }); diff --git a/js/src/jit-test/tests/ion/bug843866.js b/js/src/jit-test/tests/ion/bug843866.js new file mode 100644 index 0000000000..53f3b3a669 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug843866.js @@ -0,0 +1,8 @@ +function g(f) {} +function f(b) { + g.apply(null, arguments); + + if (b < 10) + f(b+1); +} +f(0); diff --git a/js/src/jit-test/tests/ion/bug843875.js b/js/src/jit-test/tests/ion/bug843875.js new file mode 100644 index 0000000000..3f648a4f2f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug843875.js @@ -0,0 +1,8 @@ + +function writeHeaderToLog( string ) { } +var input = [ 0xfffffff0, 101 ]; +var arr = new Uint32Array(input.length); +var expected = [ 0xffffffff, 101 ]; +for (var i=0; i 500) + a[0] = "a"; + } +} +for (var i=0; i<550; i++) + f(i); diff --git a/js/src/jit-test/tests/ion/bug848803.js b/js/src/jit-test/tests/ion/bug848803.js new file mode 100644 index 0000000000..09718882a9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug848803.js @@ -0,0 +1,34 @@ +var JSIL = {}; +JSIL.TypeNameParseState = function () +{ + this.input = 15; + this.pos = 0 +}; +JSIL.TypeNameParseState.prototype.substr = function (e) +{ + return e; +}; +JSIL.TypeNameParseState.prototype.moveNext = function () +{ + this.pos += 1; + return this.pos < this.input; +}; +JSIL.TypeNameParseResult = function () {}; +JSIL.ParseTypeNameImpl = function (n) +{ + var i = new JSIL.TypeNameParseState() + var u = new JSIL.TypeNameParseResult; + while (i.moveNext()) + { + if (n) + { + while (true) + u.assembly = 1 + } + u.assembly = i.substr(i.pos + 1); + } + return u +}; + +var u = JSIL.ParseTypeNameImpl(false) +assertEq(u.assembly, 15) diff --git a/js/src/jit-test/tests/ion/bug849781-2.js b/js/src/jit-test/tests/ion/bug849781-2.js new file mode 100644 index 0000000000..031ded4272 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug849781-2.js @@ -0,0 +1,9 @@ +function assertArraysFirstEqual(a, b) { + if (a.length != b.length) {} +} +function check(b) { + var a = deserialize(serialize(b)); + assertArraysFirstEqual(a, b); +} +check(new Int8Array(1)); +evaluate("check(['a', 'b']);"); diff --git a/js/src/jit-test/tests/ion/bug849781.js b/js/src/jit-test/tests/ion/bug849781.js new file mode 100644 index 0000000000..3818b97ef9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug849781.js @@ -0,0 +1,8 @@ +function c0(i) { print(i) } +function c1() { c0.apply({}, arguments); } +function c2() { c1.apply({}, arguments); } +function c3(a) { c2(a); } +c3(1); +c3(1); +c3(""); +c3(""); diff --git a/js/src/jit-test/tests/ion/bug850099.js b/js/src/jit-test/tests/ion/bug850099.js new file mode 100644 index 0000000000..79f36e9962 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug850099.js @@ -0,0 +1,4 @@ +var buf = serialize(-1); +var nbuf = serialize(undefined); +for (var j = 0 ; j < 5; j++) + buf[j + 8] = nbuf[j]; diff --git a/js/src/jit-test/tests/ion/bug851064.js b/js/src/jit-test/tests/ion/bug851064.js new file mode 100644 index 0000000000..e7af13aa21 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug851064.js @@ -0,0 +1,13 @@ +var base = "azertyuiopqsdfghjklmwxcvbn"; +function createRopedString() { + var test = ""; + for (var i=0; i<2; i++) { + test += base; + } + return test; +} + +assertEq(createRopedString().substr(0,10), base.substr(0,10)); +assertEq(createRopedString().substr(0,26), base.substr(0,26)); +assertEq(createRopedString().substr(26,10), base.substr(0,10)); +assertEq(createRopedString().substr(24,10), base.substr(24,2) + base.substr(0,8)); diff --git a/js/src/jit-test/tests/ion/bug851067.js b/js/src/jit-test/tests/ion/bug851067.js new file mode 100644 index 0000000000..79f3b1b1ef --- /dev/null +++ b/js/src/jit-test/tests/ion/bug851067.js @@ -0,0 +1,6 @@ +function toPrinted(value) { + value = String(value); +} +String = Array; +toPrinted(123); +evaluate('toPrinted("foo");'); diff --git a/js/src/jit-test/tests/ion/bug851792.js b/js/src/jit-test/tests/ion/bug851792.js new file mode 100644 index 0000000000..598bf4f8ed --- /dev/null +++ b/js/src/jit-test/tests/ion/bug851792.js @@ -0,0 +1,135 @@ +// Based on tests/ion/typed-arrays-1.js, but with string indexes +function testInt8() { + var arr1 = new Int8Array(50); + var arr2 = new Uint8Array(50); + var arr3 = new Uint8ClampedArray(50); + + for (var i=0; i 290888255, true); + assertEq(arr1["74".concat("")] < 290888257, true); + + assertEq(arr2["74".concat("")] > 290888184, true); + assertEq(arr2["74".concat("")] < 290888185, true); +} +testFloat(); + +function testCanonicalNaN() { + // NaN values have to be canonicalized. Otherwise, malicious scripts could + // construct arbitrary Value's (due to our NaN boxing Value representation). + var buf = new ArrayBuffer(16); + var uint32 = new Uint32Array(buf); + var f64 = new Float64Array(buf); + var f32 = new Float32Array(buf); + + // Evil: write a JSVAL_TYPE_OBJECT type tag... + uint32[0] = 0xffffff87; + uint32[1] = 0xffffff87; + + // Make sure this value is interpreted as a double. + for (var i=0; i<3; i++) { + assertEq(isNaN(f64["0".concat("")]), true); + assertEq(isNaN(f32["0".concat("")]), true); + } +} +testCanonicalNaN(); + +function testOutOfBounds() { + var buf = new ArrayBuffer(16); + var uint32 = new Uint32Array(buf); + + uint32[0] = 0; + uint32[1] = 1; + + for (var i=0; i<3; i++) { + assertEq(uint32["0".concat("")], 0); + assertEq(uint32["1".concat("")], 1); + assertEq(uint32["2".concat("")], 0); + assertEq(uint32["17".concat("")], undefined); + } +} +testOutOfBounds(); + +function testStrangeIndexes() { + var buf = new ArrayBuffer(16); + var uint32 = new Uint32Array(buf); + + uint32[0] = 0; + uint32[1] = 1; + + indexes = ["0", "1", "2", "3", "17", "3.5", "NaN", "undefined", "null"]; + solutions = [0, 1, 0, 0, undefined, undefined, undefined, undefined, undefined]; + + for (var i=0; i 15.0) + return 0; + } + return 0; + } + + function diag_1() { + foo(); + return 0; + } + + + return { diag: diag, diag_1:diag_1 }; +} + +var foreign = { + test:function(a,b) { + print(a+":"+b) + var c = [0.0]; + if (b > 10) + return c[1]; + return c[0]; + }, + foo:function() { + with({}) {}; + gc(); + } +} + +// make sure foreign is compiled + +var fast = DiagModule(this, foreign); // produces AOT-compiled version +print(fast.diag_1()); // 5 +gc() +print(fast.diag()); // 5 + + diff --git a/js/src/jit-test/tests/ion/bug860838.js b/js/src/jit-test/tests/ion/bug860838.js new file mode 100644 index 0000000000..60de82349f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug860838.js @@ -0,0 +1,51 @@ +enableOsiPointRegisterChecks(); + +function DiagModule(stdlib, foreign) { + "use asm"; + + var sqrt = stdlib.Math.sqrt; + var test = foreign.test; + + function square(x) { + x = x|0; + return ((x|0)+(x|0))|0; + } + + function diag() { + var x = 0.0; + while(1) { + test(1, x); + x = x+1.0 + if (x > 15.0) + return 0; + } + return 0; + } + + function diag_1() { + test(); + return 0; + } + + + return { diag: diag, diag_1:diag_1 }; +} + +var foreign = { + test:function(a,b) { + print(a+":"+b) + var c = [0.0]; + if (b > 10) + return c[1]; + return c[0]; + } +} + +// make sure foreign is compiled + +var fast = DiagModule(this, foreign); // produces AOT-compiled version +print(fast.diag()); // 5 +gc() +print(fast.diag()); // 5 + + diff --git a/js/src/jit-test/tests/ion/bug861165.js b/js/src/jit-test/tests/ion/bug861165.js new file mode 100644 index 0000000000..f6b469715b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug861165.js @@ -0,0 +1,83 @@ +// IM has the following fastpaths: +// - constant index (constant) +// - need negative int check (neg) +// - needs hole check (hole) +// So to test everything we have to do: +// constant | neg | hole +// test 1: 0 0 0 +// test 2: 1 0 0 +// test 3: 0 1 0 +// test 4: 1 1 0 +// test 5: 0 0 1 +// test 6: 1 0 1 +// test 7: 0 1 1 +// test 8: 1 1 1 + +function test1(index, a) { + if (index < 0) + index = -index + return index in a; +} +assertEq(test1(1, [1,2]), true); + +function test2(a) { + return 0 in a; +} +assertEq(test2([1,2]), true); + +function test3(index, a) { + return index in a; +} + +var arr3 = []; +arr3["-1073741828"] = 17; +assertEq(test3(-1073741828, arr3), true); + +function test4(a) { + return -1073741828 in a; +} +assertEq(test4(arr3), true); + + +function test5(index, a) { + if (index < 0) + index = -index + return index in a; +} +var arr5 = []; +arr5[0] = 1 +arr5[1] = 1 +arr5[2] = 1 +arr5[4] = 1 +assertEq(test5(1, arr5), true); +assertEq(test5(3, arr5), false); + +function test7a(a) { + return 3 in a; +} +function test7b(a) { + return 4 in a; +} +assertEq(test7a(arr5), false); +assertEq(test7b(arr5), true); + +function test8(index, a) { + return index in a; +} +arr5["-1073741828"] = 17; +assertEq(test8(-1073741828, arr5), true); +assertEq(test8(3, arr5), false); +assertEq(test8(0, arr5), true); + +function test9a(a) { + return 0 in a; +} +function test9b(a) { + return 3 in a; +} +function test9c(a) { + return -1073741828 in a; +} +assertEq(test9a(arr5), true); +assertEq(test9b(arr5), false); +assertEq(test9c(arr5), true); diff --git a/js/src/jit-test/tests/ion/bug861419.js b/js/src/jit-test/tests/ion/bug861419.js new file mode 100644 index 0000000000..20496f6620 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug861419.js @@ -0,0 +1,18 @@ + +arguments = []; +try { + arguments.toSource = (function() { + __proto__.y = x + }) + y = this + print(x = 8) + a = arguments + for (v of this) {} +} catch (e) {} +function f() { + "HELLO " + y +} +f() +f() +y = 1[7] +f() diff --git a/js/src/jit-test/tests/ion/bug861439.js b/js/src/jit-test/tests/ion/bug861439.js new file mode 100644 index 0000000000..f06dae6a65 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug861439.js @@ -0,0 +1,14 @@ + +try { + x = evalcx('') + toSource = (function() { + x = (new WeakMap).get(function() {}) + }) + valueOf = (function() { + schedulezone(x) + }) + this + '' + for (v of this) {} +} catch (e) {} +gc() +this + 1 diff --git a/js/src/jit-test/tests/ion/bug862100.js b/js/src/jit-test/tests/ion/bug862100.js new file mode 100644 index 0000000000..4ba973c040 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug862100.js @@ -0,0 +1,14 @@ + +function TestCase(n, d, e, a) {} +function reportCompare (expected, actual, description) { + new TestCase("", description, expected, actual); +} +new TestCase( "", "", 0, Number(new Number()) ); +reportCompare(true, true); +evaluate("\ +function TestCase(n, d, e, a) {}\ +test_negation(-2147483648, 2147483648);\ +test_negation(2147483647, -2147483647);\ +function test_negation(value, expected) {\ + reportCompare(expected, '', '-(' + value + ') == ' + expected);\ +}"); diff --git a/js/src/jit-test/tests/ion/bug862357.js b/js/src/jit-test/tests/ion/bug862357.js new file mode 100644 index 0000000000..2a44c525d5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug862357.js @@ -0,0 +1,22 @@ +// |jit-test| error: ReferenceError +function TestCase(e, a) { + return this.passed = (e == a); +} +function reportCompare (expected, actual) { + var expected_t = typeof expected; + var actual_t = typeof actual; + if (expected_t != actual_t) + printStatus(); + new TestCase(expected, actual); +} +var expect = ''; +reportCompare(expect, ''); +try { + test(); +} catch(exc1) {} +function test() { + var { expect } = ''; + for (var a = 1; a < 2; ++a) + reportCompare(expect, ''); +} +test(); diff --git a/js/src/jit-test/tests/ion/bug863261.js b/js/src/jit-test/tests/ion/bug863261.js new file mode 100644 index 0000000000..6e05f7be25 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug863261.js @@ -0,0 +1,12 @@ +// |jit-test| error: InternalError: too much recursion +function TestCase(d) { + toPrinted(d) +} +function toPrinted(value) {} +function reportCompare (expected, actual, description) { + if (typeof description == "undefined") + toPrinted(expected); + new TestCase(description); + reportCompare(); +} +reportCompare(Math['LN2'], Math['LN2'], 0); diff --git a/js/src/jit-test/tests/ion/bug863755.js b/js/src/jit-test/tests/ion/bug863755.js new file mode 100644 index 0000000000..6c59de480d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug863755.js @@ -0,0 +1,20 @@ +function TestCase( e, a) { + getTestCaseResult(e, a); +} +function getTestCaseResult(expected, actual) {} +var msPerSecond = 1000; +var TIME_0000 = (function () { })(); +var now = new Date(); +var TIME_NOW = now.valueOf(); +function msFromTime(t) { + var ms = t % msPerSecond; + return ((ms < 0) ? msPerSecond + ms : ms ); +} +new TestCase(false, eval("true, false")); +addTestCase( TIME_NOW ); +addTestCase( TIME_0000 ); +function addTestCase( t ) { + for ( m = 0; m <= 1000; m+=100 ) { + new TestCase(msFromTime(t), (new Date(t)).getMilliseconds()); + } +} diff --git a/js/src/jit-test/tests/ion/bug866611.js b/js/src/jit-test/tests/ion/bug866611.js new file mode 100644 index 0000000000..ce399d9b61 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug866611.js @@ -0,0 +1,5 @@ +// |jit-test| error: InternalError +y = 'x' +for (var i=0; i<100; i++) + y += y; +print(y.length); diff --git a/js/src/jit-test/tests/ion/bug867820.js b/js/src/jit-test/tests/ion/bug867820.js new file mode 100644 index 0000000000..2ee5c63234 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug867820.js @@ -0,0 +1,18 @@ + +function AddTestCase(expect, actual) { + new TestCase(expect, actual); +} +function TestCase(e, a) { + this.expect = e; + getTestCaseResult(e, a); +} +function getTestCaseResult(expected, actual) { + if (actual != expected) {} +} +AddRegExpCases(false, Math.pow(2,31)); +AddRegExpCases("", Math.pow(2,30) - 1); +function AddRegExpCases(m, l) { + AddTestCase(""); + AddTestCase(m, true); + AddTestCase(l, 0); +} diff --git a/js/src/jit-test/tests/ion/bug870328.js b/js/src/jit-test/tests/ion/bug870328.js new file mode 100644 index 0000000000..f5f0b1e9d5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug870328.js @@ -0,0 +1,7 @@ +var g = newGlobal("same-compartment"); +try { + evalcx("'use strict'; (function() { x = 33; })()", g); + assertEq(0, 1); +} catch(e) { + assertEq(e.toString().includes("variable x"), true); +} diff --git a/js/src/jit-test/tests/ion/bug870356.js b/js/src/jit-test/tests/ion/bug870356.js new file mode 100644 index 0000000000..a634a18161 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug870356.js @@ -0,0 +1,33 @@ +function f1(x) { + return Math.round(x); +} +assertEq(f1(3.3), 3); +assertEq(f1(-2.842170943040401e-14), -0); + +function f2(x) { + return Math.round(x); +} +assertEq(f2(3.3), 3); +assertEq(f2(-1.3), -1); +assertEq(f2(-1.8), -2); +assertEq(f2(-0.9), -1); +assertEq(f2(-0.6), -1); +assertEq(f2(-0.4), -0); + +function f3(x) { + return Math.round(x); +} +assertEq(f3(0.1), 0); +assertEq(f3(-0.5), -0); + +function f4(x) { + return Math.round(x); +} +assertEq(f4(0.1), 0); +assertEq(f4(-0), -0); + +function f5(x) { + return Math.round(x); +} +assertEq(f5(2.9), 3); +assertEq(f5(NaN), NaN); diff --git a/js/src/jit-test/tests/ion/bug872331.js b/js/src/jit-test/tests/ion/bug872331.js new file mode 100644 index 0000000000..fe32ea2220 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug872331.js @@ -0,0 +1,10 @@ + +function d(t) { + if (t >= undefined) {} +} +function s() { + d(null); +} +d(3); +s(); +s(); diff --git a/js/src/jit-test/tests/ion/bug875452.js b/js/src/jit-test/tests/ion/bug875452.js new file mode 100644 index 0000000000..27a1de4ac7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug875452.js @@ -0,0 +1,26 @@ +// |jit-test| --ion-eager + +function causeBreak(t, n, r) { + gcPreserveCode(); + gc(); +} + +function centralizeGetProp(p) +{ + p.someProp; +} + +var handler = {}; + +function test() { + var p = new Proxy({}, handler); + + var count = 5; + for (var i = 0; i < count; i++) { + centralizeGetProp(p); + } + handler.get = causeBreak; + centralizeGetProp(p); +} + +test(); diff --git a/js/src/jit-test/tests/ion/bug875656.js b/js/src/jit-test/tests/ion/bug875656.js new file mode 100644 index 0000000000..202ef2d0fa --- /dev/null +++ b/js/src/jit-test/tests/ion/bug875656.js @@ -0,0 +1,2 @@ +enableGeckoProfiling(); +Object.getOwnPropertyNames(this); diff --git a/js/src/jit-test/tests/ion/bug875804.js b/js/src/jit-test/tests/ion/bug875804.js new file mode 100644 index 0000000000..670fce9ca9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug875804.js @@ -0,0 +1,11 @@ + +eval('(function () {\ +function* range(n) {\ + for (var i = 0; i < 5000; i++)\ + yield i;\ +}\ +var r = range(10);\ +var i = 0;\ +for (var x of r)\ + assertEq(x,i++);\ +' + '})();'); diff --git a/js/src/jit-test/tests/ion/bug876465.js b/js/src/jit-test/tests/ion/bug876465.js new file mode 100644 index 0000000000..010848bdda --- /dev/null +++ b/js/src/jit-test/tests/ion/bug876465.js @@ -0,0 +1,20 @@ +function initialize() {}; +function test() { +eval("\ +var Class = {\ + create : function() {\ + return function() {\ + this.initialize.apply(this, arguments);\ + }\ + }\ +};\ +var Foo = Class.create();\ +Foo.prototype = {\ + initialize : function() {\ + this.bar = Foo();\ + }\ +};\ +var foo = new Foo();\ +"); +} +test(); diff --git a/js/src/jit-test/tests/ion/bug877936-2.js b/js/src/jit-test/tests/ion/bug877936-2.js new file mode 100644 index 0000000000..df57275337 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug877936-2.js @@ -0,0 +1,5 @@ +rex = RegExp("()()()()()()()()()()(z)?(y)"); +a = ["sub"]; +a[230] = '' + "a" +f = Function.apply(null, a); +"xyz".replace(rex, f); diff --git a/js/src/jit-test/tests/ion/bug877936.js b/js/src/jit-test/tests/ion/bug877936.js new file mode 100644 index 0000000000..a0d0e62dcd --- /dev/null +++ b/js/src/jit-test/tests/ion/bug877936.js @@ -0,0 +1,44 @@ +try{} catch(e){} + +function test(a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) { + return 0; +} + + +test(); +test(); + +///////////////////// + +function test2() { + return 0; +} + +var a = 1; +test2(a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a); +test2(a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a); + +///////////////////// + +function test4() { + test3() +} + +function test3(a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a) { + return 0; +} + +test4(); + +///////////////////// + +function test6() { + test5.apply({}, []) +} + +function test5() { + return 0; +} + +test6(); +test6(); diff --git a/js/src/jit-test/tests/ion/bug878444.js b/js/src/jit-test/tests/ion/bug878444.js new file mode 100644 index 0000000000..4b5e9f66a2 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug878444.js @@ -0,0 +1,26 @@ +function g() +{ + function f(v) { + v = +v; + var infinity = 0.0; + var three = 0.0; + var nan = 0.; + var result = 0; + + infinity = 1.0 / 0.0; + three = v + 2.0; + nan = (infinity % three); + result = ~~(nan + 42.0); + + return result | 0; + } + return f +} + +g = g() +var x; +for(i=0; i < 20000; ++i) +{ + x = g(1.0) +} +assertEq(x, 0); diff --git a/js/src/jit-test/tests/ion/bug878510.js b/js/src/jit-test/tests/ion/bug878510.js new file mode 100644 index 0000000000..05b84976d9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug878510.js @@ -0,0 +1,20 @@ +function neg0(x) { + return x===0 && (1/x)===-Infinity; +} + +function test(x,y) { + if (x == 1.1) + return 0; + else if (x == "a") + return 0; + return x*y +} + +var t = 0; +for(var i=0; i<1005; i++) { + test(1.1) + test("a") + t = test((i<1003)?i:-0, 0); +} + +assertEq(neg0(t), true); diff --git a/js/src/jit-test/tests/ion/bug882323.js b/js/src/jit-test/tests/ion/bug882323.js new file mode 100644 index 0000000000..010e8e7335 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug882323.js @@ -0,0 +1,23 @@ +var ints = new Int8Array(16); +ints[0] = 42; +function intElementAt(index) { + return ints[index]; +} +assertEq(intElementAt(16), undefined); +assertEq(intElementAt(0), 42); + +var floats = new Float64Array(16); +floats[0] = 3.14; +function floatElementAt(index) { + return floats[index]; +} +assertEq(floatElementAt(16), undefined); +assertEq(floatElementAt(0), 3.14); + +var uints = new Uint32Array(16); +uints[0] = 123; +function uintElementAt(index) { + return uints[index]; +} +assertEq(uintElementAt(16), undefined); +assertEq(uintElementAt(0), 123); diff --git a/js/src/jit-test/tests/ion/bug882565-1.js b/js/src/jit-test/tests/ion/bug882565-1.js new file mode 100644 index 0000000000..84db9258ff --- /dev/null +++ b/js/src/jit-test/tests/ion/bug882565-1.js @@ -0,0 +1,21 @@ +function zero() { return 0; } +function f(x, a) { + var test = 0x7fffffff; + + for (var i=0; i<100; i++) + { + if (i == 0) { + test += 1; + var t = (test > zero()) * (0xffffffff >>> x); + } + var test2 = test | 0; + return [test2,t]; + } +} +var t = f(0, ""); +assertEq(t[0], 0x80000000 | 0); +assertEq(t[1], 0xffffffff >>> 0); + +var t = f(0); +assertEq(t[0], 0x80000000 | 0); +assertEq(t[1], 0xffffffff >>> 0); diff --git a/js/src/jit-test/tests/ion/bug882565.js b/js/src/jit-test/tests/ion/bug882565.js new file mode 100644 index 0000000000..5e51ac7927 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug882565.js @@ -0,0 +1,4 @@ +function zero() { return 0; } +function f(x) { return (0xffffffff > zero()) * (0xffffffff >>> x); } +assertEq(f(0), 4294967295); +assertEq(f(0), 4294967295); diff --git a/js/src/jit-test/tests/ion/bug883490.js b/js/src/jit-test/tests/ion/bug883490.js new file mode 100644 index 0000000000..2fb27fda52 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug883490.js @@ -0,0 +1,33 @@ +//|jit-test| error: TypeError +function coerceForeign(stdlib, foreign) +{ + "use asm"; + + var g = foreign.g; + var h = foreign.h; + + function f() { + +g(0); + +g(1); + +g(2); + +h(2); + +h(3); + } + + return f; +} +function blaat() { + +} + +var t = coerceForeign(undefined, { + g: function(a) { + if (a == 2) + var blaat = new blaat(); + }, + h: function(b) { + print(b); + } +}) + +t(); diff --git a/js/src/jit-test/tests/ion/bug885660.js b/js/src/jit-test/tests/ion/bug885660.js new file mode 100644 index 0000000000..f7fed17dc1 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug885660.js @@ -0,0 +1,23 @@ +function ff(parsedTypeName, defaultContext) { + var context = null; + + if (context === null) + context = defaultContext; + + if (parsedTypeName.genericArguments !== null) { + for (var i = 0; i < 0; i++) {} + } + + var foo = parsedTypeName.type; + assertEq(typeof context, "object"); + return foo; +} +function test() { + var parsedTypeName = {genericArguments: null}; + for (var i=0; i<140; i++) { + if (i > 100) + parsedTypeName.x = {}; + ff(parsedTypeName, {}); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/bug886243.js b/js/src/jit-test/tests/ion/bug886243.js new file mode 100644 index 0000000000..a28030e686 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug886243.js @@ -0,0 +1,9 @@ +function f(x) +{ + if (Math.imul(0xffffffff, x)) { + return -x; + } + return 1; +} +f(0); +f(0); diff --git a/js/src/jit-test/tests/ion/bug886246.js b/js/src/jit-test/tests/ion/bug886246.js new file mode 100644 index 0000000000..ab6144edde --- /dev/null +++ b/js/src/jit-test/tests/ion/bug886246.js @@ -0,0 +1,11 @@ +function f(x) +{ + x = x|0; + return ~~((x ? 1.0e60 : 1.0e60) + 1.0); +} + +var r = -1; +for(var i = 0; i < 20000; i++) { + r = f(); +} +assertEq(r, 0); diff --git a/js/src/jit-test/tests/ion/bug888568.js b/js/src/jit-test/tests/ion/bug888568.js new file mode 100644 index 0000000000..82102865f4 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug888568.js @@ -0,0 +1,5 @@ +function f() { + return (42.0 + Math.abs(1.0e60)) | 0; +} +assertEq(f(), 0); +assertEq(f(), 0); diff --git a/js/src/jit-test/tests/ion/bug889186.js b/js/src/jit-test/tests/ion/bug889186.js new file mode 100644 index 0000000000..b1a08d37c1 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug889186.js @@ -0,0 +1,6 @@ +function f() +{ + return (4 >>> 0) > ((0 % (1 == 2)) >>> 0); +} +assertEq(f(), true); +assertEq(f(), true); diff --git a/js/src/jit-test/tests/ion/bug889451.js b/js/src/jit-test/tests/ion/bug889451.js new file mode 100644 index 0000000000..5c7c9ce4e6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug889451.js @@ -0,0 +1,18 @@ +/* +js> (((-1 >>> 1) + 1) * Math.pow(2, 52 - 30) + 1) & 1 +0 +js> (((-1 >> 1) + 1) * Math.pow(2, 52 - 30) + 1) & 1 +1 +*/ + +function f(x) { + if (x >= 0) { + // if it does not fail, try with lower power of 2. + return (((x >>> 1) + 1) * 4194304 /* 2 ** (52 - 30) */ + 1) & 1; + } + return 2; +} + +assertEq(f(-1 >>> 1), 1); +assertEq(f(-1 >>> 0), 0); +assertEq(f(-1 >>> 0), 0); diff --git a/js/src/jit-test/tests/ion/bug890722.js b/js/src/jit-test/tests/ion/bug890722.js new file mode 100644 index 0000000000..c06221915d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug890722.js @@ -0,0 +1,29 @@ + +// Test setting return value; + +function bail() { bailout(); } +function bail2() { bailout(); return 2; } + +// Test 1: Test setting/getting return value in ionmonkey +function test() { + return evalcx("1;"); +} +assertEq(test(), 1) + +// Test 3: Test ion -> baseline +function test2() { + return evaluate("1; bail2();"); +} +assertEq(test2(), 2) + +// Test 3: Test ion -> baseline +function test3() { + return evaluate("1; bail2(); 3"); +} +assertEq(test3(), 3) + +// Test4: Test baseline -> ion entering (very fragile, since iterations need to be precise, before it gets tested) +function test4() { + return evaluate("1; for(var i=0; i<1097; i++) { 3; };"); +} +assertEq(test4(), 3) diff --git a/js/src/jit-test/tests/ion/bug892426.js b/js/src/jit-test/tests/ion/bug892426.js new file mode 100644 index 0000000000..37e0c40f78 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug892426.js @@ -0,0 +1,9 @@ +function selfsetelem(o, i) { + o[i] = o; +} +var arr = new Array(); +selfsetelem(arr, "prop0"); +selfsetelem(arr, 0); +selfsetelem(arr, 1); +selfsetelem(arr, 0); +arr.prop0.toString(); diff --git a/js/src/jit-test/tests/ion/bug892794.js b/js/src/jit-test/tests/ion/bug892794.js new file mode 100644 index 0000000000..dd9a6236c4 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug892794.js @@ -0,0 +1,13 @@ +// |jit-test| --ion-eager + +function test0(v) { + return (2147483648-Math.max(1.1,-(((2<<(-v|v))-3)|0)))|0; +} +assertEq(test0(1.6), 2147483645); +assertEq(test0(437348122.9), 2147483646); + +function test1(v) { + return (2147483648+Math.min(v,0))|0; +} +assertEq(test1(2.1), -2147483648) +assertEq(test1(-0.1), 2147483647) diff --git a/js/src/jit-test/tests/ion/bug893732.js b/js/src/jit-test/tests/ion/bug893732.js new file mode 100644 index 0000000000..fe7f0d6a42 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug893732.js @@ -0,0 +1,14 @@ + +var arr = new Int8Array(100); +function f(a) { + for(var i=0; i<30; i++) { + x = a[85.3]; + } +} +f(arr); + +var buf = serialize(new Date(NaN)); +var n = -(8.64e15 + 1); +var nbuf = serialize(n); +for (var j = 0; j < 8; j++) + buf[j + (0.00000000123)] = nbuf[j]; diff --git a/js/src/jit-test/tests/ion/bug893853.js b/js/src/jit-test/tests/ion/bug893853.js new file mode 100644 index 0000000000..e07d7440e9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug893853.js @@ -0,0 +1,9 @@ + +function f() {} +new EvalTest(); +function EvalTest() { + with (this) { + f(EvalTest) + } +} +evaluate("var obj = new f(1, 'x');"); diff --git a/js/src/jit-test/tests/ion/bug894786-2.js b/js/src/jit-test/tests/ion/bug894786-2.js new file mode 100644 index 0000000000..836ffe7136 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug894786-2.js @@ -0,0 +1,91 @@ + +function f56(x) { + var a = x >>> 0; // Range = [0 .. UINT32_MAX] (bits = 32) + var b = 0x800000; // == 2^23 (bits = 24) + if (a > 0) { + // Beta node: Range [1 .. UINT32_MAX] (bits = 32) + var c = a * b; // Range = [0 .. +inf] (bits = a.bits + b.bits - 1 = 55) + var d = c + 1; // Range = [0 .. +inf] (bits = c.bits + 1 = 56) + return (d | 0) & 1; + } else { + return 1; + } +} + +function f55(x) { + var a = x >>> 0; // Range = [0 .. UINT32_MAX] (bits = 32) + var b = 0x400000; // == 2^22 (bits = 23) + if (a > 0) { + // Beta node: Range [1 .. UINT32_MAX] (bits = 32) + var c = a * b; // Range = [0 .. +inf] (bits = a.bits + b.bits - 1 = 54) + var d = c + 1; // Range = [0 .. +inf] (bits = c.bits + 1 = 55) + return (d | 0) & 1; + } else { + return 1; + } +} + +// Still returns 1, because the top-level bit is not represented. +function f54(x) { + var a = x >>> 0; // Range = [0 .. UINT32_MAX] (bits = 32) + var b = 0x200000; // == 2^21 (bits = 22) + if (a > 0) { + // Beta node: Range [1 .. UINT32_MAX] (bits = 32) + var c = a * b; // Range = [0 .. +inf] (bits = a.bits + b.bits - 1 = 53) + var d = c + 1; // Range = [1 .. +inf] (bits = c.bits + 1 = 54) + return (d | 0) & 1; + } else { + return 1; + } +} + +// Can safely truncate after these operations. (the mantissa has 53 bits) +function f53(x) { + var a = x >>> 0; // Range = [0 .. UINT32_MAX] (bits = 32) + var b = 0x100000; // == 2^20 (bits = 21) + if (a > 0) { + // Beta node: Range [1 .. UINT32_MAX] (bits = 32) + var c = a * b; // Range = [0 .. +inf] (bits = a.bits + b.bits - 1 = 52) + var d = c + 1; // Range = [1 .. +inf] (bits = c.bits + 1 = 53) + return (d | 0) & 1; + } else { + return 1; + } +} + +function f52(x) { + var a = x >>> 0; // Range = [0 .. UINT32_MAX] (bits = 32) + var b = 0x80000; // == 2^19 (bits = 20) + if (a > 0) { + // Beta node: Range [1 .. UINT32_MAX] (bits = 32) + var c = a * b; // Range = [0 .. +inf] (bits = a.bits + b.bits - 1 = 51) + var d = c + 1; // Range = [1 .. +inf] (bits = c.bits + 1 = 52) + return (d | 0) & 1; + } else { + return 1; + } +} + +function f51(x) { + var a = x >>> 0; // Range = [0 .. UINT32_MAX] (bits = 32) + var b = 0x40000; // == 2^18 (bits = 19) + if (a > 0) { + // Beta node: Range [1 .. UINT32_MAX] (bits = 32) + var c = a * b; // Range = [0 .. +inf] (bits = a.bits + b.bits - 1 = 50) + var d = c + 1; // Range = [1 .. +inf] (bits = c.bits + 1 = 51) + return (d | 0) & 1; + } else { + return 1; + } +} + +var e = Math.pow(2, 32); +for (var i = 1; i < e; i = i * 1.5) { + var x = i >>> 0; + assertEq(f56(x) , (x >= Math.pow(2, 30)) ? 0 : 1); + assertEq(f55(x), (x >= Math.pow(2, 31)) ? 0 : 1); + assertEq(f54(x), 1); + assertEq(f53(x), 1); + assertEq(f52(x), 1); + assertEq(f51(x), 1); +} diff --git a/js/src/jit-test/tests/ion/bug894786.js b/js/src/jit-test/tests/ion/bug894786.js new file mode 100644 index 0000000000..216062ec29 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug894786.js @@ -0,0 +1,9 @@ +(function() { + "use asm"; + function f(z) + { + z = z|0; + return (((0xc0000000 >>> z) >> 0) % -1)|0; + } + return f; +})()(0); diff --git a/js/src/jit-test/tests/ion/bug894794.js b/js/src/jit-test/tests/ion/bug894794.js new file mode 100644 index 0000000000..7001fce883 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug894794.js @@ -0,0 +1,7 @@ +(function() { + for (var j = 0; j < 1; ++j) { + var r = ((0x7fffffff - (0x80000000 | 0)) | 0) % 10000; + assertEq(r, -1); + } +})(); + diff --git a/js/src/jit-test/tests/ion/bug897747.js b/js/src/jit-test/tests/ion/bug897747.js new file mode 100644 index 0000000000..d7917b023d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug897747.js @@ -0,0 +1,6 @@ +function f(z) +{ + return (((0x80000000 | 0) % (0x80000001 | z)) | 0) % 100000 +} +assertEq(f(0), -1); +assertEq(f(0), -1); diff --git a/js/src/jit-test/tests/ion/bug898047.js b/js/src/jit-test/tests/ion/bug898047.js new file mode 100644 index 0000000000..ff47079e1c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug898047.js @@ -0,0 +1,23 @@ +function g(aa) { + assertEq(aa, 123); +} +function f(x, yy) { + if (yy < 0) { + for (var j=0; j<100; j++) {} + } + var o = yy < 2000 ? o1 : o2; + o.fun.apply(22, arguments); +} + +function test() { + o1 = {}; + o1.fun = g; + + o2 = {}; + o2.x = 3; + o2.fun = g; + + for (var i=0; i<3000; i++) + f(123, i); +} +test(); diff --git a/js/src/jit-test/tests/ion/bug898857.js b/js/src/jit-test/tests/ion/bug898857.js new file mode 100644 index 0000000000..1a054cc1db --- /dev/null +++ b/js/src/jit-test/tests/ion/bug898857.js @@ -0,0 +1,6 @@ +function fillHeap() { + var x = 1, tmp; + for (var i = 0; i < 50000; ++i) + tmp <<= x / 3; +} +RegExp({ toString: fillHeap }); diff --git a/js/src/jit-test/tests/ion/bug901086.js b/js/src/jit-test/tests/ion/bug901086.js new file mode 100644 index 0000000000..7853f63c78 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug901086.js @@ -0,0 +1,15 @@ +enableGeckoProfiling(); +function foo(obj,x,y,z) { + if (!y) + assertEq(0, 1); + obj.x = x; + return y + z; +} +function bar() { + var objz = {x:2} + for(var i = 0; i < 1100; i++) { + foo(objz,1,2,3); + foo(objz, false, "bar", "foo"); + } +} +bar(); diff --git a/js/src/jit-test/tests/ion/bug901391.js b/js/src/jit-test/tests/ion/bug901391.js new file mode 100644 index 0000000000..dd0304350a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug901391.js @@ -0,0 +1,4 @@ +function testPartition() { + if( "null" || new testPartition()) {} +} +testPartition(); diff --git a/js/src/jit-test/tests/ion/bug904315.js b/js/src/jit-test/tests/ion/bug904315.js new file mode 100644 index 0000000000..64239408f6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug904315.js @@ -0,0 +1,15 @@ + +function g(o, idx, exp) { + for (var i=0; i<3000; i++) { + assertEq(o[idx], exp); + } +} +function f() { + var o = []; + for (var i=1; i<100; i++) { + o[-i] = 1; + } + g(o, 50, undefined); + g(o, -50, 1); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug905166.js b/js/src/jit-test/tests/ion/bug905166.js new file mode 100644 index 0000000000..59591b2eb5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug905166.js @@ -0,0 +1,9 @@ +function test() { + LastIndexOf("hello"); + LastIndexOf("hello"); + eval(""); + function LastIndexOf(s) { + x = Math.min(Math.max(Math.pow(-1, 0.5), 0), s.length); + 0 <= x; + } +} test(); diff --git a/js/src/jit-test/tests/ion/bug905986.js b/js/src/jit-test/tests/ion/bug905986.js new file mode 100644 index 0000000000..955be16e4d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug905986.js @@ -0,0 +1,4 @@ +function testPartition() { + if(0.1 || new testPartition()) {} +} +testPartition(); diff --git a/js/src/jit-test/tests/ion/bug905999.js b/js/src/jit-test/tests/ion/bug905999.js new file mode 100644 index 0000000000..b8f33d8fbb --- /dev/null +++ b/js/src/jit-test/tests/ion/bug905999.js @@ -0,0 +1,11 @@ +// |jit-test| --ion-eager +function reportCompare (expected) { + typeof expected; +} +var expect = 'No Crash'; +var array = new Array(10); +for (var i = 0; i != array.length; ++i) { + gc(); +} +var expect = array.length; +reportCompare(expect); diff --git a/js/src/jit-test/tests/ion/bug906035.js b/js/src/jit-test/tests/ion/bug906035.js new file mode 100644 index 0000000000..09d0af7d61 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug906035.js @@ -0,0 +1,9 @@ +// |jit-test| --ion-eager +function y() { return "foo,bar"; } +function x() { + var z = y().split(','); + for (var i = 0; i < z.length; i++) {} +} +gczeal(2); +Object.prototype.length = function () {}; +x(); diff --git a/js/src/jit-test/tests/ion/bug906284.js b/js/src/jit-test/tests/ion/bug906284.js new file mode 100644 index 0000000000..8b7e0ea72d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug906284.js @@ -0,0 +1,15 @@ +"use strict" +function f() { + h = {} +} +var c = 0; +for (var i=0; i<3; i++) { + try { + new f(); + assertEq(0, 1); + } catch(e) { + c++; + assertEq(e.message.includes("undeclared variable"), true); + } +} +assertEq(c, 3); diff --git a/js/src/jit-test/tests/ion/bug908903.js b/js/src/jit-test/tests/ion/bug908903.js new file mode 100644 index 0000000000..b5c5c87a8b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug908903.js @@ -0,0 +1,54 @@ + +function f(x) { + return x + 1; +} + +setJitCompilerOption("ion.warmup.trigger", 2); +setJitCompilerOption("baseline.warmup.trigger", 0); + +assertEq(f(1), 2); // warm-up == 1 => eagerly compile with baseline. +assertEq(f(0.5), 1.5); // warm-up == 2 => normaly compile with ion. + // invalidate for unexpect output. + + +function normal() { + setJitCompilerOption("ion.warmup.trigger", 8); + setJitCompilerOption("baseline.warmup.trigger", 5); +} + +function eager() { + setJitCompilerOption("ion.warmup.trigger", 0); +} + +function h(x) { + return x + 1; +} + +function g(x) { + normal(); + return h(x) + 1; +} + +normal(); +for (var i = 0; i < 10; i++) { + eager(); + assertEq(g(i), i + 2); +} + + +// Check for wrong arguments. +try { + setJitCompilerOption("not.an.option", 51); + assertEq(false, true); +} catch (x) { } + +try { + var ion = { warmup: { trigger: null } }; + setJitCompilerOption(ion.warmup.trigger, 42); + assertEq(false, true); +} catch (x) { } + +try { + setJitCompilerOption("ion.warmup.trigger", "32"); + assertEq(false, true); +} catch (x) { } diff --git a/js/src/jit-test/tests/ion/bug909401.js b/js/src/jit-test/tests/ion/bug909401.js new file mode 100644 index 0000000000..a79e6c271a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug909401.js @@ -0,0 +1,26 @@ +var TZ_PST = -8; +var TZ_DIFF = GetTimezoneOffset(); +var PST_DIFF = TZ_DIFF - TZ_PST; +function GetTimezoneOffset() {} +function adjustResultArray(ResultArray) { + var t = ResultArray[TIME] - PST_DIFF; + ResultArray[UTC_YEAR] = YearFromTime(t); +} +function TimeInYear( y ) {} +function YearFromTime( t ) { + var sign = ( t < 0 ) ? -1 : 1; + var year = ( sign < 0 ) ? 1969 : 1970; + for ( var timeToTimeZero = t; ; ) { + timeToTimeZero -= sign * TimeInYear(year) + break; + } + return ( year ); +} +gczeal(4); +evaluate("\ +var TIME = 0;\ +var UTC_YEAR = 1;\ +adjustResultArray([]);\ +adjustResultArray([946684800000-1]);\ +adjustResultArray([]);\ +", { noScriptRval : true }); diff --git a/js/src/jit-test/tests/ion/bug909505.js b/js/src/jit-test/tests/ion/bug909505.js new file mode 100644 index 0000000000..9b08aef2bd --- /dev/null +++ b/js/src/jit-test/tests/ion/bug909505.js @@ -0,0 +1,5 @@ +function f(type) { + for (var i = 0; i < 3; i++) {} + assertEq((new String) instanceof type, true); +} +f(String); diff --git a/js/src/jit-test/tests/ion/bug909601.js b/js/src/jit-test/tests/ion/bug909601.js new file mode 100644 index 0000000000..01d481597e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug909601.js @@ -0,0 +1,10 @@ +// |jit-test| --ion-eager +for (var i=0; i<3; i++) + z = new Int32Array; + +function f() { + z.__proto__ = 2; +} + +for (var i=0; i<3; i++) + f(); diff --git a/js/src/jit-test/tests/ion/bug909997.js b/js/src/jit-test/tests/ion/bug909997.js new file mode 100644 index 0000000000..91d5c69bb3 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug909997.js @@ -0,0 +1,42 @@ +// getJitCompilerOptions will always return array with zeros when JIT is +// disabled. Therefore we quit now. +if (inJit() == 'Baseline is disabled.') { + print("JIT is disabled."); + quit(); +} + +var wait = 100; + +var method_A = function() { + for (var t = 0; t < wait; ++t) {} +} + +var method_B = function() { + for (var t = 0; t < wait; ++t) {} +} + +var method_C = function() { + for (var t = 0; t < wait; ++t) {} +} + +var method_D = function() { + for (var t = 0; t < wait; ++t) {} +} + +var func = [method_A, method_B, method_C, method_D] + +for (var n = 0; n < 4; ++n) { + try { + setJitCompilerOption("baseline.enable", n & 1); + setJitCompilerOption("ion.enable", n & 2 ? 1: 0); + } catch(e) { + if (e.toString().includes("on the stack")) + continue; + throw e; + } + var opt = getJitCompilerOptions(); + assertEq(opt["baseline.enable"], n & 1); + assertEq(opt["ion.enable"], n & 2 ? 1 : 0); + for (var i = 0; i < 1001; ++i) + func[n](); +} diff --git a/js/src/jit-test/tests/ion/bug911369.js b/js/src/jit-test/tests/ion/bug911369.js new file mode 100644 index 0000000000..90240b29cb --- /dev/null +++ b/js/src/jit-test/tests/ion/bug911369.js @@ -0,0 +1,14 @@ +var a = []; +var count = 0; +a.valueOf = function() { + ++count; +} +function f(a) { + 6 - a; +} + +f(3); +for (var i=0; i<10; i++) + f(a); + +assertEq(count, 10); diff --git a/js/src/jit-test/tests/ion/bug911707.js b/js/src/jit-test/tests/ion/bug911707.js new file mode 100644 index 0000000000..86f61f2fea --- /dev/null +++ b/js/src/jit-test/tests/ion/bug911707.js @@ -0,0 +1,5 @@ +// |jit-test| --ion-eager +x = [ "CNY", "TWD", "invalid" ]; +Object.freeze(x).map(function() { + x.length = 6 +}) diff --git a/js/src/jit-test/tests/ion/bug912152.js b/js/src/jit-test/tests/ion/bug912152.js new file mode 100644 index 0000000000..4c429fa46a --- /dev/null +++ b/js/src/jit-test/tests/ion/bug912152.js @@ -0,0 +1,7 @@ + +function foo() { + try { + this.f = 0; + } finally {} +} +new foo(); diff --git a/js/src/jit-test/tests/ion/bug913749.js b/js/src/jit-test/tests/ion/bug913749.js new file mode 100644 index 0000000000..e48310272f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug913749.js @@ -0,0 +1,33 @@ +y = new Float32Array(11); +x = []; + +Object.defineProperty(x, 18, { + get: (function() { + y.length; + }), +}); +JSON.stringify(this); + +y = undefined; + +// The exact error message varies nondeterministically. Accept several +// variations on the theme. +var variations = [ + `y is undefined`, + `can't access property "length" of undefined`, + `can't access property "length", y is undefined`, + `undefined has no properties`, +]; + +var hits = 0; +for (var i = 0; i < 3; i++) { + try { + x.toString(); + } catch (e) { + assertEq(e.constructor.name, 'TypeError'); + if (!variations.includes(e.message)) + throw new Error(`expected one of ${JSON.stringify(variations)}; got ${String(e.message)}`); + hits++; + } +} +assertEq(hits, 3); diff --git a/js/src/jit-test/tests/ion/bug914098.js b/js/src/jit-test/tests/ion/bug914098.js new file mode 100644 index 0000000000..353533f696 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug914098.js @@ -0,0 +1,16 @@ +// |jit-test| error: ReferenceError + +function ygTreeView(id) {}; +function ygNode() {} +ygNode.prototype.init = function () { + this.children = []; +} +ygTextNode.prototype = new ygNode; +function ygTextNode() { + this.init(it.next.bind(it), StopIteration) +} +userTree = new ygTreeView("userTree") +addMenuNode(userTree) +function addMenuNode(tree) { + new ygTextNode({}, tree.root, false) +} diff --git a/js/src/jit-test/tests/ion/bug914341.js b/js/src/jit-test/tests/ion/bug914341.js new file mode 100644 index 0000000000..2f0bb3174d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug914341.js @@ -0,0 +1,5 @@ +function f() { + assertEq(typeof eval("this"), "object"); +} +for (var i=0; i<5; i++) + f(); diff --git a/js/src/jit-test/tests/ion/bug915301.js b/js/src/jit-test/tests/ion/bug915301.js new file mode 100644 index 0000000000..6e9f6eed91 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug915301.js @@ -0,0 +1,23 @@ +setJitCompilerOption("ion.warmup.trigger", 50); +var f32 = new Float32Array(32); +f32[0] = 0; + +function g(x) { + eval(""); // don't inline + return x + 4; +} + +function f(n) { + var x; + if (n > 10000) { + x = 4.5; + } else { + x = f32[0]; + } + f32[0] = g(x); +} + +for (var n = 0; n < 100; n++) + f(n); + +assertEq(f32[0], 400); diff --git a/js/src/jit-test/tests/ion/bug915608.js b/js/src/jit-test/tests/ion/bug915608.js new file mode 100644 index 0000000000..20aa7a2c52 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug915608.js @@ -0,0 +1,8 @@ +function f1() { + var b = new Float32Array(50); + for (var i=0; i < 100; true ? ++i : x.foo()) { + var x = b[i]; + typeof x; + } +} +f1(); diff --git a/js/src/jit-test/tests/ion/bug915903.js b/js/src/jit-test/tests/ion/bug915903.js new file mode 100644 index 0000000000..37ba24fe8e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug915903.js @@ -0,0 +1,10 @@ +x = {}; +x.toString = (function(stdlib, heap) { + Int8ArrayView = new stdlib.Int8Array(heap); + Float32ArrayView = new stdlib.Float32Array(heap); + function f() { + Int8ArrayView[0] = Float32ArrayView[0] + } + return f +})(this, ArrayBuffer); +x + 1 diff --git a/js/src/jit-test/tests/ion/bug916712.js b/js/src/jit-test/tests/ion/bug916712.js new file mode 100644 index 0000000000..b02b13ef37 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug916712.js @@ -0,0 +1,7 @@ +var e = new Error(); +function test() { + var arr = new Float32Array(1); + for (var Number in e) {} + var a = arr [0]; + switch (a) {} +} test(); diff --git a/js/src/jit-test/tests/ion/bug916752.js b/js/src/jit-test/tests/ion/bug916752.js new file mode 100644 index 0000000000..13b7af5f69 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug916752.js @@ -0,0 +1,20 @@ +function test() { return "x,y,z"; }; +function testClear() { + test().split(','); +} +loadFile("1"); +loadFile("testClear();"); +loadFile("2"); +loadFile("gc();"); +loadFile("testClear();"); +loadFile("new test(0);"); +function loadFile(lfVarx) { + if (lfVarx.substr(-3) != ".js" && lfVarx.length != 1) { + switch (lfRunTypeId) { + case 2: new Function(lfVarx)(); break; + default: evaluate(lfVarx); break; + } + } else if (!isNaN(lfVarx)) { + lfRunTypeId = parseInt(lfVarx); + } +} diff --git a/js/src/jit-test/tests/ion/bug919118.js b/js/src/jit-test/tests/ion/bug919118.js new file mode 100644 index 0000000000..413a8a89ad --- /dev/null +++ b/js/src/jit-test/tests/ion/bug919118.js @@ -0,0 +1,13 @@ +setJitCompilerOption("ion.warmup.trigger", 50); + +var f32 = new Float32Array(1); +f32[0] = 13; +var str = "CAN HAS cheezburger? OKTHXBYE"; +var c; + +function f() { + c = str[ f32[0] ]; +} + +for(var n = 100; n; --n) f(); +print (c); diff --git a/js/src/jit-test/tests/ion/bug921035.js b/js/src/jit-test/tests/ion/bug921035.js new file mode 100644 index 0000000000..33b8c5c5a8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug921035.js @@ -0,0 +1,14 @@ +// |jit-test| error: TypeError + +function $ERROR() {} +function testMultipleArgumentsObjects() { + var testargs = arguments; + var f = function (which) { + var args = [ testargs ]; + return args[which][0]; + }; + var arr = [0, 0, 0, 0, 1]; + for (var i = 0; i < arr.length; i++) + $ERROR[i] = f(arr[i]); +} +testMultipleArgumentsObjects() diff --git a/js/src/jit-test/tests/ion/bug922118.js b/js/src/jit-test/tests/ion/bug922118.js new file mode 100644 index 0000000000..0c1829a3be --- /dev/null +++ b/js/src/jit-test/tests/ion/bug922118.js @@ -0,0 +1,30 @@ +var lfcode = new Array(); +lfcode.push("1"); +lfcode.push(""); +lfcode.push("0"); +lfcode.push("function arguments() { };"); +lfcode.push("1"); +lfcode.push("\ +var GLOBAL_PROPERTIES = new Array();\ +var i = 0;\ +for ( p in this ) {\ +if (p.startsWith('a')) GLOBAL_PROPERTIES[i++] = p;\ +}\ +for ( i = 0; i < GLOBAL_PROPERTIES.length; i++ ) {\ + eval(GLOBAL_PROPERTIES[i]);\ +}\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file) +} +function loadFile(lfVarx) { + if (lfVarx.substr(-3) != ".js" && lfVarx.length != 1) { + switch (lfRunTypeId) { + case 0: evaluate(lfVarx); break; + case 1: eval(lfVarx); break; + } + } else if (!isNaN(lfVarx)) { + lfRunTypeId = parseInt(lfVarx); + } +} diff --git a/js/src/jit-test/tests/ion/bug924538.js b/js/src/jit-test/tests/ion/bug924538.js new file mode 100644 index 0000000000..b84a5c924b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug924538.js @@ -0,0 +1,9 @@ +// Don't die a float32-related death. +function testFloat32SetElemIC(a) { + for (var i = 0; i < a.length; i++) { + var r = Math.fround(Math.random()); + a[i] = r; + } +} +testFloat32SetElemIC(new Array(2048)); +testFloat32SetElemIC(new Uint8ClampedArray(2048)); diff --git a/js/src/jit-test/tests/ion/bug925067-1.js b/js/src/jit-test/tests/ion/bug925067-1.js new file mode 100644 index 0000000000..13e14b643b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug925067-1.js @@ -0,0 +1,25 @@ +var c = 0; +function g(o) { + try { + for(;;) + o.next(); + } catch(e) { + c += e; + } + return o.x; +} +function f() { + var o = {x: 0, next: function() { + if (this.x++ > 100) + throw 3; + }}; + + g(o); + assertEq(o.x, 102); + + o.x = 0; + g(o); + assertEq(o.x, 102); +} +f(); +assertEq(c, 6); diff --git a/js/src/jit-test/tests/ion/bug925067-2.js b/js/src/jit-test/tests/ion/bug925067-2.js new file mode 100644 index 0000000000..e56e7c9a51 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug925067-2.js @@ -0,0 +1,16 @@ +// |jit-test| error: 4 +function g(o) { + if (o.x >= 0) { + for(;;) + o.next(); + } + return o.x; +} +function f() { + var o = {x: 0, next: function() { + if (this.x++ > 100) + throw 4; + }}; + g(o); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug925067-3.js b/js/src/jit-test/tests/ion/bug925067-3.js new file mode 100644 index 0000000000..aad4d88a8f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug925067-3.js @@ -0,0 +1,20 @@ +// |jit-test| error: 4 +function h(o) { + o.next(); +} +function g(o) { + for (var i=0; i<5; i++) {}; + if (o.x >= 0) { + for(;;) + h(o); + } + return o.x; +} +function f() { + var o = {x: 0, next: function() { + if (this.x++ > 100) + throw 4; + }}; + g(o); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug925305.js b/js/src/jit-test/tests/ion/bug925305.js new file mode 100644 index 0000000000..7278ce0abd --- /dev/null +++ b/js/src/jit-test/tests/ion/bug925305.js @@ -0,0 +1,14 @@ +function testFloat32SetElemIC(a) { + for (var i = 0; i < a.length; i++) { + var r = Math.fround(Math.random()); + a[i] = r; + assertEq(a[i], r); + } +} + +testFloat32SetElemIC(new Array(2048)); +testFloat32SetElemIC(new Array(2048)); + +enableOsiPointRegisterChecks(); +testFloat32SetElemIC(new Array(2048)); +testFloat32SetElemIC(new Float64Array(2048)); diff --git a/js/src/jit-test/tests/ion/bug925308.js b/js/src/jit-test/tests/ion/bug925308.js new file mode 100644 index 0000000000..9950af3ddc --- /dev/null +++ b/js/src/jit-test/tests/ion/bug925308.js @@ -0,0 +1,18 @@ +// |jit-test| error: ReferenceError + +var lfcode = new Array(); +lfcode.push("3"); +lfcode.push("enableGeckoProfiling();foo();"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file) +} +function loadFile(lfVarx) { + if (lfVarx.substr(-3) != ".js" && lfVarx.length != 1) { + switch (lfRunTypeId) { + default: function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); break; + } + } else if (!isNaN(lfVarx)) { + lfRunTypeId = parseInt(lfVarx); + } +} diff --git a/js/src/jit-test/tests/ion/bug927389.js b/js/src/jit-test/tests/ion/bug927389.js new file mode 100644 index 0000000000..ee5347faaf --- /dev/null +++ b/js/src/jit-test/tests/ion/bug927389.js @@ -0,0 +1,4 @@ +(function () { + var x = 0 || 1.1; + x >> x; +})(); diff --git a/js/src/jit-test/tests/ion/bug928423.js b/js/src/jit-test/tests/ion/bug928423.js new file mode 100644 index 0000000000..171e545576 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug928423.js @@ -0,0 +1,14 @@ +function f(o, p) { + try {} catch(e) {}; + return o[p]; +} +function test() { + var o = {foo: 1, bar: 2, foobar: 3}; + + for (var i = 0; i < 30; i++) { + assertEq(f(o, "foo1".substr(0, 3)), 1); + assertEq(f(o, "bar1".substr(0, 3)), 2); + assertEq(f(o, "foobar1".substr(0, 6)), 3); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/bug928542.js b/js/src/jit-test/tests/ion/bug928542.js new file mode 100644 index 0000000000..d79c929feb --- /dev/null +++ b/js/src/jit-test/tests/ion/bug928542.js @@ -0,0 +1,10 @@ + +called = 0; +function foo() { + this.what(); + this.random = 0; + this.what = 1; +} +foo.prototype.what = function() { called = 1; } +new foo(); +assertEq(called, 1); diff --git a/js/src/jit-test/tests/ion/bug928625.js b/js/src/jit-test/tests/ion/bug928625.js new file mode 100644 index 0000000000..1b5058e33f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug928625.js @@ -0,0 +1,3 @@ +var summary = true; +evaluate("var summary = 'Array slice when arrays length is assigned';"); +evaluate('var summary;'); diff --git a/js/src/jit-test/tests/ion/bug930327.js b/js/src/jit-test/tests/ion/bug930327.js new file mode 100644 index 0000000000..496b6e342e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug930327.js @@ -0,0 +1,12 @@ +// |jit-test| error: ReferenceError + +function MyObject( value ) { + this.value = value; + value &= value; +} +ForIn_1(new MyObject(true)); +function ForIn_1( object) { + for ( property in object ) { + object[property] == eval(property) + } +} diff --git a/js/src/jit-test/tests/ion/bug930990.js b/js/src/jit-test/tests/ion/bug930990.js new file mode 100644 index 0000000000..1846f28b9c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug930990.js @@ -0,0 +1,8 @@ +var f32 = new Float32Array(10); +f32[0] = 5; +var i = 0; +do { + f32[i + 1] = f32[i] - 1; + i += 1; +} while (f32[i]); + diff --git a/js/src/jit-test/tests/ion/bug930993.js b/js/src/jit-test/tests/ion/bug930993.js new file mode 100644 index 0000000000..bf4074c918 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug930993.js @@ -0,0 +1,6 @@ +x = {}; +y = x; +x.toString = function() { + new Int8Array(ArrayBuffer)[0] = new Float32Array(ArrayBuffer)[0]; +} +print(x << y); diff --git a/js/src/jit-test/tests/ion/bug931496.js b/js/src/jit-test/tests/ion/bug931496.js new file mode 100644 index 0000000000..7502dd08bc --- /dev/null +++ b/js/src/jit-test/tests/ion/bug931496.js @@ -0,0 +1,11 @@ + +function* g() { + yield +} +g() +function f() { + g() +} +try { + new f +} catch (e) {} diff --git a/js/src/jit-test/tests/ion/bug936740.js b/js/src/jit-test/tests/ion/bug936740.js new file mode 100644 index 0000000000..bf4a933786 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug936740.js @@ -0,0 +1,26 @@ +function ceil(x) { + return Math.ceil(x); +} + +// Compiled as Ceil(double -> int32) +assertEq(ceil(1.1), 2); +assertEq(ceil(-1.1), -1); +assertEq(ceil(-3), -3); + +// As we use the identity Math.ceil(x) == -Math.floor(-x) and Floor(-0) bails out, +// this should bail out. +assertEq(ceil(0), 0); +assertEq(ceil(0), 0); + +// Reuses the Ceil(double -> int32) path +assertEq(ceil(1.1), 2); +assertEq(ceil(-1.1), -1); +assertEq(ceil(-3), -3); + +// Bails out and then compiles as Ceil(double -> double) +assertEq(ceil(-0), -0); +assertEq(ceil(Math.pow(2, 32)), Math.pow(2, 32)); +assertEq(ceil(-0), -0); + +// Still works but not inlined as double -> int32 (it still uses double -> double) +assertEq(ceil(1.5), 2); diff --git a/js/src/jit-test/tests/ion/bug939868-2.js b/js/src/jit-test/tests/ion/bug939868-2.js new file mode 100644 index 0000000000..8ba8d7bc24 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug939868-2.js @@ -0,0 +1,47 @@ +function f(x,y,z) { + var z; + if (x) { + if (y) { + z = 0xfffffff; + } else { + z = 0xfffffff; + } + assertFloat32(z, false); + } else { + z = Math.fround(z); + assertFloat32(z, true); + } + assertFloat32(z, false); + return z; +} + +function g(x,y,z) { + var z; + if (x) { + if (y) { + z = 3; + } else { + z = 6; + } + assertFloat32(z, false); + } else { + z = Math.fround(z); + assertFloat32(z, true); + } + assertFloat32(z, true); + return z; +} + +setJitCompilerOption("ion.warmup.trigger", 50); + +for (var n = 100; n--; ) { + assertEq(f(0,1,2), 2); + assertEq(f(0,0,2), 2); + assertEq(f(1,0,2), 0xfffffff); + assertEq(f(1,1,2), 0xfffffff); + + assertEq(g(0,1,2), 2); + assertEq(g(0,0,2), 2); + assertEq(g(1,0,2), 6); + assertEq(g(1,1,2), 3); +} diff --git a/js/src/jit-test/tests/ion/bug939868.js b/js/src/jit-test/tests/ion/bug939868.js new file mode 100644 index 0000000000..fbf7f03c46 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug939868.js @@ -0,0 +1,3 @@ +function f(x, y) { return x || Math.fround(y); } +assertEq(f(0, 0), 0); +assertEq(f(0xfffffff, 0), 0xfffffff); diff --git a/js/src/jit-test/tests/ion/bug940635.js b/js/src/jit-test/tests/ion/bug940635.js new file mode 100644 index 0000000000..62e1eb5533 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug940635.js @@ -0,0 +1,7 @@ +function f(y) { + return (y > 0) == y; +} +assertEq(f(0), true); +assertEq(f(0), true); +assertEq(f(null), false); +assertEq(f(null), false); diff --git a/js/src/jit-test/tests/ion/bug940846.js b/js/src/jit-test/tests/ion/bug940846.js new file mode 100644 index 0000000000..587e24db29 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug940846.js @@ -0,0 +1,15 @@ +function a(f, i) { + results = [] + for (var k = 0; k < 10; ++k) { + gc(); + try { + results.push(f(i[k])); + } catch (e) { + results.push(e); + } + } +} +g = (function(x, y) { + return Math.fround((x ? Math.f : m0) ? w : Math.fround()) +}) +a(g, [Number.MAX_VALUE]) diff --git a/js/src/jit-test/tests/ion/bug942550.js b/js/src/jit-test/tests/ion/bug942550.js new file mode 100644 index 0000000000..16344f0848 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug942550.js @@ -0,0 +1,6 @@ +function pow(x,y) { + return Math.pow(x,y); +} +var x = pow(3, -.5); +var y = pow(3, -.5); +assertEq(x, y); diff --git a/js/src/jit-test/tests/ion/bug942604.js b/js/src/jit-test/tests/ion/bug942604.js new file mode 100644 index 0000000000..068b5e2ab6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug942604.js @@ -0,0 +1,11 @@ +for (var j = 0; j < 999; ++j) { + try { + (function() { + function f(x) { + x = (new Float32Array)[i >> 2]; + {}(w) = arguments[0] + } + return f + })()(); + } catch (e) {} +} diff --git a/js/src/jit-test/tests/ion/bug944080.js b/js/src/jit-test/tests/ion/bug944080.js new file mode 100644 index 0000000000..3f6889ce0b --- /dev/null +++ b/js/src/jit-test/tests/ion/bug944080.js @@ -0,0 +1,17 @@ + +function intLength (a, l) { + var res = 0; + for (var i = 0; i < l; i++) + res += a.length; +} +intLength([0,1,2,3,4,5,6,7,8,9], 10) +intLength(new Uint8Array(10), 10) +function test() { + var a = "abc".split(""); + var res = 0; + for (var i=0; i<20; i++) + res += a.length; + return res; +} +Object.prototype.length = function(){}; +assertEq(test(), 60); diff --git a/js/src/jit-test/tests/ion/bug945294.js b/js/src/jit-test/tests/ion/bug945294.js new file mode 100644 index 0000000000..4ad35c07a0 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug945294.js @@ -0,0 +1,22 @@ +// |jit-test| error:is not a function +var arr = []; + +var C = function () {}; +C.prototype.dump = function () {}; +arr[0] = new C; + +C = function () {}; +C.prototype.dump = this; +arr[1] = new C; + +function f() { + for (var i = 0; i < arr.length; i++) + arr[i].dump(); +} + +try { + f(); +} catch (exc) { + assertEq(exc.message.includes("is not a function"), true); +} +f(); diff --git a/js/src/jit-test/tests/ion/bug945512.js b/js/src/jit-test/tests/ion/bug945512.js new file mode 100644 index 0000000000..e0e6412209 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug945512.js @@ -0,0 +1,12 @@ + +var handler = { + has: function (name) { + assertEq(1, 2); + } +}; + +for (var i=0; i<10; i++) { + var regex = /undefined/; + regex.__proto__ = new Proxy(function() {}, handler) +} + diff --git a/js/src/jit-test/tests/ion/bug945811.js b/js/src/jit-test/tests/ion/bug945811.js new file mode 100644 index 0000000000..1425dafebb --- /dev/null +++ b/js/src/jit-test/tests/ion/bug945811.js @@ -0,0 +1,17 @@ +function toPrinted(value) {} +function reportCompare (expected, actual, description) { + if (expected != actual) + + toPrinted(actual) +} +test(); +function test() { + reportCompare(); + try { + test(); + } catch (e) { + try { + new test(); + } catch(e) {} + } + reportCompare(); +} diff --git a/js/src/jit-test/tests/ion/bug946284.js b/js/src/jit-test/tests/ion/bug946284.js new file mode 100644 index 0000000000..58bb8a37b6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug946284.js @@ -0,0 +1,5 @@ +function f(x) { + return x.length / 2 +} +f("") +assertEq(f(undefined + ""), 4.5); diff --git a/js/src/jit-test/tests/ion/bug946969.js b/js/src/jit-test/tests/ion/bug946969.js new file mode 100644 index 0000000000..b2fb187324 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug946969.js @@ -0,0 +1,6 @@ +function f() { + return Math.abs(~(Math.tan())); +} + +for (var i=0; i<1000; i++) + assertEq(f(i), 1); diff --git a/js/src/jit-test/tests/ion/bug950462.js b/js/src/jit-test/tests/ion/bug950462.js new file mode 100644 index 0000000000..4b0abe32ba --- /dev/null +++ b/js/src/jit-test/tests/ion/bug950462.js @@ -0,0 +1,2 @@ +for (var i = 0; i < 5; i++) + [,][i] = 3.14159; diff --git a/js/src/jit-test/tests/ion/bug950764.js b/js/src/jit-test/tests/ion/bug950764.js new file mode 100644 index 0000000000..9953b024e6 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug950764.js @@ -0,0 +1,19 @@ +function g( +a, a, a, a, a, a, a, a, a, a, +a, a, a, a, a, a, a, a, a, a, +a, a, a, a, a, a, a, a, a, a, +a, a, a, a, a, a, a, a, a, a, +a, a, a, a, a, a, a, a, a, a, +a, a, a, a, a, a, a, a, a, a, +a, a, a, a, a, a, a, a, a, a, +a, a, a, a, a, a, a, a, a, a, +a, a, a, a, a, a, a, a, a, a, +a, a, a, a, a, a, a, a, a, a, +a, a, a, a, a, a, a, a, a, a, +a, a, a, a, a, a, a, a, a, a, +a, a, a, a, a, a, a, a, a +) {} +function f() { + g(); +} +new f; diff --git a/js/src/jit-test/tests/ion/bug953164.js b/js/src/jit-test/tests/ion/bug953164.js new file mode 100644 index 0000000000..41868cda8d --- /dev/null +++ b/js/src/jit-test/tests/ion/bug953164.js @@ -0,0 +1,20 @@ +function test(a) { + var total = 0; + for (var i=0; i<100; i++) { + + var j = 1; + var b = a.a + if (b) { + j += b.test; + } + total += j; + } + print(total) +} + +var a1 = {"a": {"test":1}}; +var a2 = {"a": undefined}; +test(a1) +test(a2) +test(a1) +test(a2) diff --git a/js/src/jit-test/tests/ion/bug956156.js b/js/src/jit-test/tests/ion/bug956156.js new file mode 100644 index 0000000000..36e1d9bc5e --- /dev/null +++ b/js/src/jit-test/tests/ion/bug956156.js @@ -0,0 +1,7 @@ +// |jit-test| error:TypeError +function f() { + ((function g(x) { + g(x.slice) + })([])) +} +new f diff --git a/js/src/jit-test/tests/ion/bug958381.js b/js/src/jit-test/tests/ion/bug958381.js new file mode 100644 index 0000000000..98fc48edaa --- /dev/null +++ b/js/src/jit-test/tests/ion/bug958381.js @@ -0,0 +1,4 @@ +function f(x) { + return (x != x) != Math.fround(x) +} +assertEq(f(0), f(0)); diff --git a/js/src/jit-test/tests/ion/bug958432.js b/js/src/jit-test/tests/ion/bug958432.js new file mode 100644 index 0000000000..b8ae50a432 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug958432.js @@ -0,0 +1,27 @@ +function h(i, i) { + i = ([Infinity([])])(1 ? l : arguments) +} +for (var j = 0; j < 2; ++j) { + try { + h(-Number, -Number) + } catch (e) {} +} + +function f() { + function f(i0, i1) { + i0 = i0 | 0; + i = i1 | 0; + switch (1) { + case -3: + switch (f) {} + } { + return 0 + }(arguments) + } + return f +}; +for (var j = 0; j < 5; ++j) { + (function(x) { + f()(f()(x, f()())) + })() +} diff --git a/js/src/jit-test/tests/ion/bug964229-2.js b/js/src/jit-test/tests/ion/bug964229-2.js new file mode 100644 index 0000000000..0ccbd7c019 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug964229-2.js @@ -0,0 +1,58 @@ +function test1(re, test) { + return re.test(test); +} + +assertEq(true, test1(/undefined/, undefined)); +assertEq(true, test1(/undefined/, undefined)); + +function test2(re, test) { + return re.test(test); +} + +assertEq(true, test2(/null/, null)); +assertEq(true, test2(/null/, null)); + +function test3(re, test) { + return re.test(test); +} + +assertEq(true, test3(/0/, 0)); +assertEq(true, test3(/0/, 0)); + +function test4(re, test) { + return re.test(test); +} + +assertEq(true, test4(/12.12/, 12.12)); +assertEq(true, test4(/12.12/, 12.12)); + +function test5(re, test) { + return re.test(test); +} + +assertEq(true, test5(/true/, true)); +assertEq(true, test5(/false/, false)); +assertEq(true, test5(/true/, true)); +assertEq(true, test5(/false/, false)); + +function test6(re, test) { + return re.test(test); +} + +assertEq(true, test6(/object/, {})); +assertEq(true, test6(/object/, {})); + +assertEq(true, test1(/test/, "test")); +assertEq(true, test1(/test/, "test")); +assertEq(true, test1(/undefined/, undefined)); +assertEq(true, test1(/undefined/, undefined)); +assertEq(true, test1(/null/, null)); +assertEq(true, test1(/null/, null)); +assertEq(true, test1(/0.1/, 0.1)); +assertEq(true, test1(/0.1/, 0.1)); +assertEq(true, test1(/20000/, 20000)); +assertEq(true, test1(/20000/, 20000)); +assertEq(true, test1(/object/, {})); +assertEq(true, test1(/object/, {})); + + diff --git a/js/src/jit-test/tests/ion/bug964229.js b/js/src/jit-test/tests/ion/bug964229.js new file mode 100644 index 0000000000..7c018b5105 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug964229.js @@ -0,0 +1,26 @@ +a = 'a'; +b = 0 +var i=0; +exhaustiveSliceTest("exhaustive slice test 1", a); +var i=1; +exhaustiveSliceTest("exhaustive slice test 2", b); +exhaustiveSliceTest("exhaustive slice test 3", 0); +var i=0; +var executed = false; +try { + exhaustiveSliceTest("exhaustive slice test 4", 0); +} catch(e) { + executed = true; +} +assertEq(executed, true); + +function exhaustiveSliceTest(testname, a) { + print(testname) + for (var y = 0; y < 2; y++) + { + print(a.length) + if (a.length == 2 || i == 1) + return 0; + var b = a.slice(0,0); + } +} diff --git a/js/src/jit-test/tests/ion/bug965712.js b/js/src/jit-test/tests/ion/bug965712.js new file mode 100644 index 0000000000..634fb33d8f --- /dev/null +++ b/js/src/jit-test/tests/ion/bug965712.js @@ -0,0 +1,2 @@ +var result = "D1D1D1D1D1D1D1D1D1D1".replace(/d1/ig,1); +assertEq(result, "1111111111"); diff --git a/js/src/jit-test/tests/ion/bug966926.js b/js/src/jit-test/tests/ion/bug966926.js new file mode 100644 index 0000000000..204a35c4eb --- /dev/null +++ b/js/src/jit-test/tests/ion/bug966926.js @@ -0,0 +1,12 @@ +var f32 = new Float32Array(32); +function f(n) { + var x; + if (n > 10000) { + x = (0); + } else { + x = f32[0]; + } + g('' + (x)); +} +function g(y){} +f(0); diff --git a/js/src/jit-test/tests/ion/bug969203.js b/js/src/jit-test/tests/ion/bug969203.js new file mode 100644 index 0000000000..bf44b94d72 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug969203.js @@ -0,0 +1,4 @@ +var f = function (x) { + return Math.tan(Math.fround(Math.log(Math.fround(Math.exp(x))))); +} +assertEq(f(1), f(1)); diff --git a/js/src/jit-test/tests/ion/bug973118.js b/js/src/jit-test/tests/ion/bug973118.js new file mode 100644 index 0000000000..67ab4ebe74 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug973118.js @@ -0,0 +1,4 @@ +function h(x) { return +x == x }; +h(false) +assertEq(h(null), false); +assertEq(h(null), false); diff --git a/js/src/jit-test/tests/ion/bug975290.js b/js/src/jit-test/tests/ion/bug975290.js new file mode 100644 index 0000000000..147db84be7 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug975290.js @@ -0,0 +1,6 @@ +for (var j = 0; j < 9999; ++j) { + (function() { + Math.pow(Math.fround(), Math.fround(0)) + })(); +} + diff --git a/js/src/jit-test/tests/ion/bug976110.js b/js/src/jit-test/tests/ion/bug976110.js new file mode 100644 index 0000000000..0886fc3110 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug976110.js @@ -0,0 +1,91 @@ +var asmdiv2 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 2)>>>0; + return z|0; + } + return f; +})() + +var plaindiv2 = function(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 2)>>>0; + return z|0; +} + +var k2 = 0xf0000000; + +assertEq(asmdiv2(k2), 0x78000000); +assertEq(plaindiv2(k2), 0x78000000); + +var asmdiv3 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 3)>>>0; + return z|0; + } + return f; +})() + +var plaindiv3 = function(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 3)>>>0; + return z|0; +} + +var k3 = 3<<30; + +assertEq(asmdiv3(k3), 1<<30); +assertEq(plaindiv3(k3), 1<<30); + +var asmdiv7 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 7)>>>0; + return z|0; + } + return f; +})() + +var plaindiv7 = function(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 7)>>>0; + return z|0; +} + +var k7 = (1<<29)*7 + 4; + +assertEq(asmdiv7(k7), 1<<29); +assertEq(plaindiv7(k7), 1<<29); + +var asmmod3 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x>>>0) % 3)>>>0; + return z|0; + } + return f; +})() + +var plainmod3 = function(x) { + x = x|0; + var z = 0; + z = ((x>>>0) % 3)>>>0; + return z|0; +} + +var kmod = (3<<30) + 2; + +assertEq(asmmod3(kmod), 2); +assertEq(plainmod3(kmod), 2); diff --git a/js/src/jit-test/tests/ion/bug977966.js b/js/src/jit-test/tests/ion/bug977966.js new file mode 100644 index 0000000000..6d80c5c376 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug977966.js @@ -0,0 +1,125 @@ +// |jit-test| --ion-eager + +function join_check() { + var lengthWasCalled = false; + var obj = {"0": "", "1": ""}; + Object.defineProperty(obj, "length", { + get : function(){ lengthWasCalled = true; return 2; }, + enumerable : true, + configurable : true + }); + + var res = Array.prototype.join.call(obj, { toString: function () { + if (lengthWasCalled) + return "good"; + else + return "bad"; + }}) + + assertEq(res, "good"); +} +function split(i) { + var x = (i + "->" + i).split("->"); + assertEq(x[0], "" + i); + return i; +} + +function join(i) { + var x = [i, i].join("->"); + assertEq(x, i + "->" + i); + return i; +} + +function split_join(i) { + var x = (i + "-" + i).split("-").join("->"); + assertEq(x, i + "->" + i); + return i; +} + +function split_join_2(i) { + var x = (i + "-" + i).split("-"); + x.push("" + i); + var res = x.join("->"); + assertEq(res, i + "->" + i + "->" + i); + return i; +} + +function resumeHere() { bailout(); } + +function split_join_3(i) { + var x = (i + "-" + i).split("-"); + resumeHere(); + var res = x.join("->"); + assertEq(res, i + "->" + i); + return i; +} + +function trip(i) { + if (i == 99) + assertEq(myjoin.arguments[1][0], "" + i) +} + +function myjoin(i, x) { + trip(i); + return x.join("->"); +} + +function split_join_4(i) { + var x = (i + "-" + i).split("-"); + var res = myjoin(i, x); + assertEq(res, i + "->" + i); + return i; +} + +function split_join_5(i) { + var s = "abca"; + assertEq(s.split("a").join("") + i, "bc" + i); +} + +function split_join_two_byte_char(i) { + var s1 = "ab"; + assertEq(s1.split("").join("\u03c0"), "a\u03c0b"); + var s2 = i + "\u03c0" + i; + assertEq(s2.split("\u03c0").join("-"), i + "-" + i); +} + +function split_join_underflow(i) +{ + var s = ""; + assertEq(s.split("").join("x" + i), ""); +} + +// Check that we do not consider the string argument of join as a replacement +// pattern, as the string replace primitive is supposed to do. +function split_join_pattern(i) { + var s = i + "-" + i; + assertEq(s.split("-").join("$`$&$'"), i + "$`$&$'" + i); + assertEq(s.replace("-", "$`$&$'"), "" + i + i + "-" + i + i); +} + +// Check that, as opposed to String.replace, we are doing a global replacement +// as String.split does. +function split_join_multiple(i) { + var s1 = i + "-\n-" + i + "-\n-" + i; + assertEq(s1.split("-\n-").join("-") , i + "-" + i + "-" + i); + assertEq(s1.replace("-\n-", "-") , i + "-" + i + "-\n-" + i); + + var s2 = "abc"; + assertEq(s2.split("").join("" + i) , "a" + i + "b" + i + "c"); + assertEq(s2.replace("", "" + i) , i + "abc"); +} + +for (var i = 0; i < 1000; ++i) { + join_check(i); + split(i); + join(i); + split_join(i); + split_join_2(i); + split_join_3(i); + split_join_4(i); + split_join_5(i); + split_join_pattern(i); + split_join_multiple(i); + split_join_two_byte_char(i); + split_join_underflow(i); +} diff --git a/js/src/jit-test/tests/ion/bug980119.js b/js/src/jit-test/tests/ion/bug980119.js new file mode 100644 index 0000000000..b6778164b1 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug980119.js @@ -0,0 +1,9 @@ + +s = newGlobal() +evalcx("\ + x = new Uint8ClampedArray;\ + x.__proto__ = [];\ +", s); +evalcx("\ + x[0]\ +", s); diff --git a/js/src/jit-test/tests/ion/bug981325.js b/js/src/jit-test/tests/ion/bug981325.js new file mode 100644 index 0000000000..809b4da798 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug981325.js @@ -0,0 +1,7 @@ +function f(x) { + return Math.fround() ? x : x >> 0; +} +function g() { + return (f() !== Math.fround(0)) +} +assertEq(g(), g()); diff --git a/js/src/jit-test/tests/ion/bug984018.js b/js/src/jit-test/tests/ion/bug984018.js new file mode 100644 index 0000000000..ef144a85db --- /dev/null +++ b/js/src/jit-test/tests/ion/bug984018.js @@ -0,0 +1,62 @@ +var x = 0; +function test() { + function sincos1(a, b) { + var sa = Math.sin(a); + var sb = Math.sin(b); + var ca = Math.cos(a); + var cb = Math.cos(b); + var ra = sa * sa + ca * ca; + var rb = sb * sb + cb * cb; + var dec = 100000; + + assertEq(Math.round(ra * dec) / dec, Math.round(rb * dec) / dec); + + ca = Math.cos(a); + cb = Math.cos(b); + sa = Math.sin(a); + sb = Math.sin(b); + + var ra = sa * sa + ca * ca; + var rb = sb * sb + cb * cb; + + assertEq(Math.round(ra * dec) / dec, Math.round(rb * dec) / dec); + return ra; + } + + function sincos2(x) { + var s1 = Math.sin(x); + var c1 = Math.cos(x); + + var c2 = Math.cos(x); + var s2 = Math.sin(x); + + return (s1 * s1 + c1 * c1) - (s2 * s2 + c2 * c2); + } + + function bailoutHere() { bailout(); } + + function sincos3(x) { + var s = Math.sin(x); + bailoutHere(); + var c = Math.cos(x); + assertEq(Math.round(s * s + c * c), 1); + return s; + } + + function sincos4(x) { + if (x < 2500) + x = Math.sin(x); + else + x = Math.cos(x); + return x; + } + + for (var i=0; i<5000; i++) { + x += sincos1(x, x + 1); + x += sincos2(x); + x += sincos3(x); + x += sincos4(i); + } +} +x += 1; +test(); diff --git a/js/src/jit-test/tests/ion/bug984830.js b/js/src/jit-test/tests/ion/bug984830.js new file mode 100644 index 0000000000..a8c2db1ab8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug984830.js @@ -0,0 +1,16 @@ +function getTestCaseResult(expected, actual) { + if (actual != expected) + return Math.abs(actual - expected) <= 1E-10; +} +function InstanceOf(object, constructor) { + while ( object != null ) + object = object.__proto__; +} +function WorkerBee () {} +function Engineer () {} +Engineer.prototype = new WorkerBee(); +var pat = new Engineer(); +getTestCaseResult(pat.__proto__.__proto__.__proto__.__proto__ == Object.prototype); +getTestCaseResult(InstanceOf(pat, Engineer)); +evaluate("getTestCaseResult( Object.prototype.__proto__ );", + { isRunOnce: true }); diff --git a/js/src/jit-test/tests/ion/bug989586.js b/js/src/jit-test/tests/ion/bug989586.js new file mode 100644 index 0000000000..c21876dbab --- /dev/null +++ b/js/src/jit-test/tests/ion/bug989586.js @@ -0,0 +1,15 @@ +function t() { + var iter = 0; + function a(w) { + var a = new Array(w); + assertEq(a.length, w); + } + function r() { + a(3); + a(4); + } + for (var i=0; i<100; i++) { + r(); + } +} +t(); diff --git a/js/src/jit-test/tests/ion/bug991457.js b/js/src/jit-test/tests/ion/bug991457.js new file mode 100644 index 0000000000..6b9099ed2c --- /dev/null +++ b/js/src/jit-test/tests/ion/bug991457.js @@ -0,0 +1,64 @@ +function test() { + this.init(); + for (var i=0; i<10; i++) { + delete this.blocks[10][9]; + this.collapse_blocks(); + } + this.look_for_holes(); +} +test.prototype.init = function() { + this.blocks = new Array(20); + for (var x=0; x 0)) +} +f(2) +assertEq(f(-1), -0); diff --git a/js/src/jit-test/tests/ion/bug998059.js b/js/src/jit-test/tests/ion/bug998059.js new file mode 100644 index 0000000000..fc2c68d7f5 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug998059.js @@ -0,0 +1,25 @@ +// Test various ways of changing the behavior of |typedArray.length|. + +function addLengthProperty() { + var x = new Uint16Array(); + Object.defineProperty(x, "length", {value:1}); + for (var i = 0; i < 5; i++) + assertEq(x.length, 1); +} +addLengthProperty(); + +function changePrototype() { + var x = new Uint16Array(); + x.__proto__ = [0]; + for (var i = 0; i < 5; i++) + assertEq(x.length, 1); +} +changePrototype(); + +function redefineLengthProperty() { + var x = new Uint16Array(); + Object.defineProperty(Uint16Array.prototype, "length", {value:1}); + for (var i = 0; i < 5; i++) + assertEq(x.length, 1); +} +redefineLengthProperty(); diff --git a/js/src/jit-test/tests/ion/call-generic-args.js b/js/src/jit-test/tests/ion/call-generic-args.js new file mode 100644 index 0000000000..e8d88dd04e --- /dev/null +++ b/js/src/jit-test/tests/ion/call-generic-args.js @@ -0,0 +1,33 @@ +// Test that the generic call trampoline passes arguments correctly. + +function foo(f) { + return f(1); +} + +with ({}) {} + +function f1() { return arguments; } +function f2(x) { return [x]; } +function f3(x,y) { return [x,y]; } +function f4(x,y,z) { return [x,y,z]; } + +let f5 = f4.bind({}); +let f6 = f4.bind({}, 2); +let f7 = f4.bind({}, 2, 3); + +function assertArrayEq(a,b) { + assertEq(a.length, b.length); + for (var i = 0; i < a.length; i++) { + assertEq(a[i], b[i]); + } +} + +for (var i = 0; i < 500; i++) { + assertArrayEq(foo(f1), [1]); + assertArrayEq(foo(f2), [1]); + assertArrayEq(foo(f3), [1, undefined]); + assertArrayEq(foo(f4), [1, undefined, undefined]); + assertArrayEq(foo(f5), [1, undefined, undefined]); + assertArrayEq(foo(f6), [2, 1, undefined]); + assertArrayEq(foo(f7), [2, 3, 1]); +} diff --git a/js/src/jit-test/tests/ion/call-generic-bound.js b/js/src/jit-test/tests/ion/call-generic-bound.js new file mode 100644 index 0000000000..a0c563f5c7 --- /dev/null +++ b/js/src/jit-test/tests/ion/call-generic-bound.js @@ -0,0 +1,34 @@ +// Test that the generic call trampoline calls bound functions correctly, +// including nested bound functions. + +function foo(f) { + return f(0); +} + +function f1(x) { return x; } +var f2 = f1.bind({}); +var f3 = f2.bind({}, 1); +var f4 = f3.bind({}); + +var f5 = Math.log.bind({}); +var f6 = f5.bind({},1); +var f7 = f6.bind({}); + +let boundThis = {}; +function f8() { return this; } +let f9 = f8.bind(boundThis); +let f10 = f9.bind({}); + +with ({}) {} +for (var i = 0; i < 500; i++) { + assertEq(foo(f1), 0); + assertEq(foo(f2), 0); + assertEq(foo(f3), 1); + assertEq(foo(f4), 1); + assertEq(foo(f5), -Infinity); + assertEq(foo(f6), 0); + assertEq(foo(f7), 0); + assertEq(foo(f8), this); + assertEq(foo(f9), boundThis); + assertEq(foo(f10), boundThis); +} diff --git a/js/src/jit-test/tests/ion/call-generic-constructor.js b/js/src/jit-test/tests/ion/call-generic-constructor.js new file mode 100644 index 0000000000..15a8c4b36f --- /dev/null +++ b/js/src/jit-test/tests/ion/call-generic-constructor.js @@ -0,0 +1,21 @@ +// Test that the generic call trampoline handles constructors correctly. + +function foo(f) { + return new f(1); +} + +with ({}) {} + +function f1(x) { this.x = x; } +function f2(y) { this.y = y; } +let f3 = f1.bind({}); +let f4 = f1.bind({}, 2); +let f5 = Uint8Array; + +for (var i = 0; i < 500; i++) { + assertEq(foo(f1).x, 1); + assertEq(foo(f2).y, 1); + assertEq(foo(f3).x, 1); + assertEq(foo(f4).x, 2); + assertEq(foo(f5)[0], 0); +} diff --git a/js/src/jit-test/tests/ion/call-generic-cross-realm.js b/js/src/jit-test/tests/ion/call-generic-cross-realm.js new file mode 100644 index 0000000000..e2bd7f076d --- /dev/null +++ b/js/src/jit-test/tests/ion/call-generic-cross-realm.js @@ -0,0 +1,40 @@ +// Test that the generic call tramponline handles cross-realm calls. + +function foo(f) { + return f(1); +} +function foo_call(f) { + return f.call({}, 1); +} + +with ({}) {} + +var g = newGlobal({sameCompartmentAs: this}); +g.eval(` +function f1(x) { return x; } +var f2 = f1.bind({}); +var f3 = Math.log; +`); + +var f1 = g.f1; +var f2 = g.f2; +var f3 = g.f3; + +var f4 = f1.bind({}); +var f5 = f2.bind({}); +var f6 = f3.bind({}); + +for (var i = 0; i < 500; i++) { + assertEq(foo(f1), 1); + assertEq(foo(f2), 1); + assertEq(foo(f3), 0); + assertEq(foo(f4), 1); + assertEq(foo(f5), 1); + assertEq(foo(f6), 0); + assertEq(foo_call(f1), 1); + assertEq(foo_call(f2), 1); + assertEq(foo_call(f3), 0); + assertEq(foo_call(f4), 1); + assertEq(foo_call(f5), 1); + assertEq(foo_call(f6), 0); +} diff --git a/js/src/jit-test/tests/ion/call-generic-fun-call.js b/js/src/jit-test/tests/ion/call-generic-fun-call.js new file mode 100644 index 0000000000..d3e7671dea --- /dev/null +++ b/js/src/jit-test/tests/ion/call-generic-fun-call.js @@ -0,0 +1,20 @@ +// Test that the generic call trampoline implements fun_call correctly, +// even nested fun_call. + +function foo(f) { + var call = f.call; + return call.call(call, call, call, f, {}, 1); +} + +function f1(x) { return x; } +var f2 = f1.bind({}); +var f3 = Math.log; +var f4 = { call: () => { return 2;} } + +with ({}) {} +for (var i = 0; i < 2000; i++) { + assertEq(foo(f4), 2); + assertEq(foo(f1), 1); + assertEq(foo(f2), 1); + assertEq(foo(f3), 0); +} diff --git a/js/src/jit-test/tests/ion/call-generic-methods.js b/js/src/jit-test/tests/ion/call-generic-methods.js new file mode 100644 index 0000000000..83c2f75487 --- /dev/null +++ b/js/src/jit-test/tests/ion/call-generic-methods.js @@ -0,0 +1,24 @@ +// Test that the generic call trampoline calls methods correctly. + +function foo(o) { + return o.f(1); +} + +function id(x) { return x; } + +var o1 = { f: id } +var o2 = { f: id.bind({}) } +var o3 = { f: id.bind({}, 2) } +var o4 = [0,0,0,1,0,0,0,0,1,0,0,0]; +o4.f = [].indexOf; +var o5 = [0,0,0,1,0,0,0,1,0,0]; +o5.f = [].lastIndexOf; + +with ({}) {} +for (var i = 0; i < 500; i++) { + assertEq(foo(o1), 1); + assertEq(foo(o2), 1); + assertEq(foo(o3), 2); + assertEq(foo(o4), 3); + assertEq(foo(o5), 7); +} diff --git a/js/src/jit-test/tests/ion/call-generic-new-target.js b/js/src/jit-test/tests/ion/call-generic-new-target.js new file mode 100644 index 0000000000..f96dc659d6 --- /dev/null +++ b/js/src/jit-test/tests/ion/call-generic-new-target.js @@ -0,0 +1,26 @@ +// Test that the generic call trampoline passes new.target correctly. + +function foo(F) { + return new F(); +} + +with ({}) {} + +class C { + constructor() { + this.newTarget = new.target; + } +} +class C1 extends C {} +class C2 extends C {} +class C3 extends C {} +let C4 = C3.bind({}); +let C5 = C3.bind({}, 1); + +for (var i = 0; i < 500; i++) { + assertEq(foo(C1).newTarget, C1); + assertEq(foo(C2).newTarget, C2); + assertEq(foo(C3).newTarget, C3); + assertEq(foo(C4).newTarget, C3); + assertEq(foo(C5).newTarget, C3); +} diff --git a/js/src/jit-test/tests/ion/call-generic-throw-2.js b/js/src/jit-test/tests/ion/call-generic-throw-2.js new file mode 100644 index 0000000000..e580097117 --- /dev/null +++ b/js/src/jit-test/tests/ion/call-generic-throw-2.js @@ -0,0 +1,35 @@ +// Verify that the generic call trampoline handles fun_call with +// non-object / non-callable `this` correctly + +function foo(f) { + f.call({}); +} + +with ({}) {} + +function f1() {} +function f2() {} + +// Ion-compile the generic trampoline. +for (var i = 0; i < 1000; i++) { + foo(f1, {}); + foo(f2, {}); +} + +function assertThrows(f) { + var caught = false; + try { + foo(f); + } catch { + caught = true; + } + assertEq(caught, true); +} + +// Non-object callee +assertThrows(0); +assertThrows(undefined); +assertThrows(""); + +// Non-callable object callee +assertThrows({}); diff --git a/js/src/jit-test/tests/ion/call-generic-throw.js b/js/src/jit-test/tests/ion/call-generic-throw.js new file mode 100644 index 0000000000..3d04259b59 --- /dev/null +++ b/js/src/jit-test/tests/ion/call-generic-throw.js @@ -0,0 +1,41 @@ +// Verify that we throw when calling/constructing functions that must be +// constructed/called. + +function foo(f) { + f(); +} + +function new_foo(f) { + new f(); +} + +with ({}) {} + +function f1() {} +function f2() {} + +// Ion-compile the generic trampoline. +for (var i = 0; i < 1000; i++) { + foo(f1); + foo(f2); + new_foo(f1); + new_foo(f2); +} + +class A {} +class B extends A {} +var caught_constructor = false; +try { + foo(B); +} catch { + caught_constructor = true; +} +assertEq(caught_constructor, true); + +var caught_non_constructor = false; +try { + new_foo(() => {}); +} catch { + caught_non_constructor = true; +} +assertEq(caught_non_constructor, true); diff --git a/js/src/jit-test/tests/ion/callTypeBarriers.js b/js/src/jit-test/tests/ion/callTypeBarriers.js new file mode 100644 index 0000000000..94f9683dce --- /dev/null +++ b/js/src/jit-test/tests/ion/callTypeBarriers.js @@ -0,0 +1,25 @@ +function fixProto(x) { + x.__proto__ = x.__proto__; +} + +function bar() { + + function foo(count) { + if (count) + return 10; + return "foo"; + } + fixProto(foo); + + function g(x, i) { + var t; + for (var j = 0; j < 200; j++) + t = x(i); + return t; + } + var D; + for (var i = 0; i < 100; i++) + D = g(foo, -99 + i); + return D; +} +print(bar()); diff --git a/js/src/jit-test/tests/ion/callgname.js b/js/src/jit-test/tests/ion/callgname.js new file mode 100644 index 0000000000..74b3cd8f1f --- /dev/null +++ b/js/src/jit-test/tests/ion/callgname.js @@ -0,0 +1,43 @@ +function g1(x) { + return x + 1; +} +function f1() { + var y = 0; + for (var i=0; i<100; i++) { + y += g1(g1(i)); + } + return y; +} +g1(10); +assertEq(f1(), 5150); + +x = 1; +other = newGlobal("same-compartment"); +other.eval("f = function() { return x; }; x = 2;"); + +h = other.f; + +function testOtherGlobal() { + var y = 0; + for (var i=0; i<100; i++) { + y += h(); + } + return y; +} +h(); +assertEq(testOtherGlobal(), 200); + +// Note: this test requires on On-Stack Invalidation. +f2 = function() { + return x; +} +function test2() { + var y = 0; + for (var i=0; i<50; i++) { + y += f2(); + } + return y; +} +assertEq(test2(), 50); +f2 = h; +assertEq(test2(), 100); diff --git a/js/src/jit-test/tests/ion/callobj-tdz.js b/js/src/jit-test/tests/ion/callobj-tdz.js new file mode 100644 index 0000000000..fff872a23e --- /dev/null +++ b/js/src/jit-test/tests/ion/callobj-tdz.js @@ -0,0 +1,14 @@ +// CallObject with TDZ arguments +function test( + a00, a01, a02, a03, a04, a05, a06, a07, a08, a09, + a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, + {} = () => { + with ({}) {}; + return a00; + }) { +} + +// Warm-up JITs +for (var i = 0; i < 2000; ++i) { + test(); +} diff --git a/js/src/jit-test/tests/ion/ceil.js b/js/src/jit-test/tests/ion/ceil.js new file mode 100644 index 0000000000..1f058cf073 --- /dev/null +++ b/js/src/jit-test/tests/ion/ceil.js @@ -0,0 +1,65 @@ +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 20); + +//var log = print; +var log = function(x){} + +function ceil(x) { + // A nice but not always efficient polyfill. + return -Math.floor(-x); +} + +function doubleCheck(g) { + for (var j = 0; j < 200; j++) { + var i = j; + assertEq(g(i), i); + assertEq(g(i+.5), i+1); + assertEq(g(-i), -i); + assertEq(g(-i-.5), -i); + } +} + +function floatCheck(g, val) { + for (var j = 0; j < 200; j++) { + var i = Math.fround(j); + assertEq(g(i), i); + assertEq(g(i+.5), i+1); + assertEq(g(-i), -i); + assertEq(g(-i-.5), -i); + } +} + +function testBailout(value) { + var dceil = eval('(function(x) { return Math.ceil(x) })'); + log('start double'); + doubleCheck(dceil); + log('bailout'); + // At this point, the compiled code should bailout, if 'value' is in the + // edge case set. + assertEq(dceil(value), ceil(value)); + + var fceil = eval('(function(x) { return Math.ceil(Math.fround(x)) })'); + log('start float'); + floatCheck(fceil, value); + log('bailout'); + assertEq(fceil(Math.fround(value)), ceil(Math.fround(value))); +} + +var INT_MAX = Math.pow(2, 31) - 1; +var INT_MIN = INT_MAX + 1 | 0; +var UINT_MAX = Math.pow(2, 32) - 1; + +// Values in ]-1; -0] +testBailout(-0); +testBailout(-.5); +// Values outside the INT32 range, when represented in either double or +// single precision +testBailout(INT_MAX + .5); +testBailout(INT_MIN - 129); +// (UINT_MAX; +inf] have special behavior on ARM +testBailout(UINT_MAX); +testBailout(UINT_MAX + .5); +testBailout(UINT_MAX + 1); +testBailout(UINT_MAX + 2); +// BatNaN +testBailout(NaN); diff --git a/js/src/jit-test/tests/ion/close-iterators-1.js b/js/src/jit-test/tests/ion/close-iterators-1.js new file mode 100644 index 0000000000..6a1fbd96f4 --- /dev/null +++ b/js/src/jit-test/tests/ion/close-iterators-1.js @@ -0,0 +1,11 @@ +// |jit-test| error: InternalError +// from bug 729797, bug732852 as well +var patterns = new Array(); +patterns[0] = ''; +test(); +function test() { + for (i in patterns) { + s = patterns[i]; + status =(test)(s); + } +} diff --git a/js/src/jit-test/tests/ion/compare-char.js b/js/src/jit-test/tests/ion/compare-char.js new file mode 100644 index 0000000000..e63d69decc --- /dev/null +++ b/js/src/jit-test/tests/ion/compare-char.js @@ -0,0 +1,189 @@ +function IsASCIIAlphaString_CharCodeAt(s) { + for (var i = 0; i < s.length; i++) { + var c = s.charCodeAt(i); + if (!((0x41 <= c && c <= 0x5A) || (0x61 <= c && c <= 0x7A))) + return false; + } + return true; +} + +function IsASCIIAlphaString_CharAt(s) { + for (var i = 0; i < s.length; i++) { + var c = s.charAt(i); + if (!(("A" <= c && c <= "Z") || ("a" <= c && c <= "z"))) + return false; + } + return true; +} + +function IsASCIIAlphaString_GetElem(s) { + for (var i = 0; i < s.length; i++) { + var c = s[i]; + if (!(("A" <= c && c <= "Z") || ("a" <= c && c <= "z"))) + return false; + } + return true; +} + +function IsASCIIAlphaString_GetElem_GetElem(s) { + var range = "AZaz"; + for (var i = 0; i < s.length; i++) { + var c = s[i]; + if (!((range[0] <= c && c <= range[1]) || (range[2] <= c && c <= range[3]))) + return false; + } + return true; +} + +function IsGreekOrCyrillicString_CharCodeAt(s) { + // U+0370 (GREEK CAPITAL LETTER HETA) + // U+03FF (GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL) + // U+0400 (CYRILLIC CAPITAL LETTER IE WITH GRAVE) + // U+052F (CYRILLIC SMALL LETTER EL WITH DESCENDER) + for (var i = 0; i < s.length; i++) { + var c = s.charCodeAt(i); + if (!((0x0370 <= c && c <= 0x03FF) || (0x400 <= c && c <= 0x052F))) + return false; + } + return true; +} + +function IsGreekOrCyrillicString_CharAt(s) { + for (var i = 0; i < s.length; i++) { + var c = s.charAt(i); + if (!(("Ͱ" <= c && c <= "Ͽ") || ("Ѐ" <= c && c <= "ԯ"))) + return false; + } + return true; +} + +function IsGreekOrCyrillicString_GetElem(s) { + for (var i = 0; i < s.length; i++) { + var c = s[i]; + if (!(("Ͱ" <= c && c <= "Ͽ") || ("Ѐ" <= c && c <= "ԯ"))) + return false; + } + return true; +} + +function IsGreekOrCyrillicString_GetElem_GetElem(s) { + var range = "ͰϿЀԯ"; + for (var i = 0; i < s.length; i++) { + var c = s[i]; + if (!((range[0] <= c && c <= range[1]) || (range[2] <= c && c <= range[3]))) + return false; + } + return true; +} + +function main() { + function compareLatin1() { + var strings = ["ABCABCABC", "abcabcabc"]; + var compare = "aAbD"; + var q = 0; + for (var i = 0; i < 200; ++i) { + var str = strings[i & 1]; + for (var j = 0; j < str.length; ++j) { + if (str[j] === "a") + q++; + if ("A" == str[j]) + q++; + if (str[j] != "b") + q++; + if ("D" !== str[j]) + q++; + if (str[j] === compare[0]) + q++; + if (compare[1] == str[j]) + q++; + if (str[j] != compare[2]) + q++; + if (compare[3] !== str[j]) + q++; + } + } + assertEq(q, 100*3*2 + 100*3*2 + 100*15*2 + 100*18*2); + } + function compareTwoByte() { + var strings = ["āĉœāĉœāĉœ", "abcabcabc"]; + var compare = "œĉāƉ"; + var q = 0; + for (var i = 0; i < 200; ++i) { + var str = strings[i & 1]; + for (var j = 0; j < str.length; ++j) { + if ("œ" === str[j]) + q++; + if (str[j] == "ĉ") + q++; + if ("ā" != str[j]) + q++; + if (str[j] !== "Ɖ") + q++; + if (compare[0] === str[j]) + q++; + if (str[j] == compare[1]) + q++; + if (compare[2] != str[j]) + q++; + if (str[j] !== compare[3]) + q++; + } + } + assertEq(q, 100*3*2 + 100*3*2 + 100*15*2 + 100*18*2); + } + function compareRangeLatin1() { + var strings = [ + "ABCABCABC", // all upper + "abcabcabc", // all lower + "abcABCabc", // lower and upper + "abcabc123", // characters below limit + "abc[_]ABC", // characters between limit + "ABC{|}abc", // characters above limit + "!#$456_~ÿ", // no matches at all + "aBcZyyZUU", // - + ]; + for (var i = 0; i < 200; ++i) { + var str = strings[i & 7]; + var resultCharCodeAt = IsASCIIAlphaString_CharCodeAt(str); + var resultCharAt = IsASCIIAlphaString_CharAt(str); + var resultGetElem = IsASCIIAlphaString_GetElem(str); + var resultGetElemGetElem = IsASCIIAlphaString_GetElem_GetElem(str); + + assertEq(resultCharAt, resultCharCodeAt); + assertEq(resultGetElem, resultCharCodeAt); + assertEq(resultGetElemGetElem, resultCharCodeAt); + } + } + function compareRangeTwoByte() { + var strings = [ + "αβγΑΒΓαβγ", // all Greek + "АБВабвАБВ", // all Cyrillic + "αβγабвАБΓ", // Greek and Cyrillic + "αβγāēōАБВ", // characters below limit + "αβγԱԲԳАБВ", // characters above limit + "abcāēōԱԲԳ", // no matches at all + "𝐀𝐁𝐂𝐀𝐁𝐂𝐀𝐁𝐂", // (non-BMP) + "abcabcabc", // - + ]; + for (var i = 0; i < 200; ++i) { + var str = strings[i & 7]; + var resultCharCodeAt = IsGreekOrCyrillicString_CharCodeAt(str); + var resultCharAt = IsGreekOrCyrillicString_CharAt(str); + var resultGetElem = IsGreekOrCyrillicString_GetElem(str); + var resultGetElemGetElem = IsGreekOrCyrillicString_GetElem_GetElem(str); + + assertEq(resultCharAt, resultCharCodeAt); + assertEq(resultGetElem, resultCharCodeAt); + assertEq(resultGetElemGetElem, resultCharCodeAt); + } + } + + compareLatin1(); + compareTwoByte(); + compareRangeLatin1(); + compareRangeTwoByte(); +} + +for (var i = 0; i < 15; ++i) { + main(); +} diff --git a/js/src/jit-test/tests/ion/compare-string.js b/js/src/jit-test/tests/ion/compare-string.js new file mode 100644 index 0000000000..db5d295417 --- /dev/null +++ b/js/src/jit-test/tests/ion/compare-string.js @@ -0,0 +1,131 @@ +function compareToAtom(a) { + return a == 'test-test-test-test-test-test-test-test'; +} + +function compareToAtomStrict(a) { + return a === 'test-test-test-test-test-test-test-test'; +} + +function compareToAtomNe(a) { + return a != 'test-test-test-test-test-test-test-test'; +} + +function compareToAtomNeStrict(a) { + return a !== 'test-test-test-test-test-test-test-test'; +} + +function compareToAtomLessThan(a) { + return a < 'test-test-test-test-test-test-test-test'; +} + +function compareToAtomLessThanOrEquals(a) { + return a <= 'test-test-test-test-test-test-test-test'; +} + +function compareToAtomGreaterThan(a) { + return a > 'test-test-test-test-test-test-test-test'; +} + +function compareToAtomGreaterThanOrEquals(a) { + return a >= 'test-test-test-test-test-test-test-test'; +} + +var st = 'st-test-test-test-test-test-test-test'; + +function compareToRope(a) { + return a == ('te' + st); +} + +function compareToRopeStrict(a) { + return a === ('te' + st); +} + +function compareToRopeNe(a) { + var st = 'st-test-test-test-test-test-test-test'; + return a != ('te' + st); +} + +function compareToRopeNeStrict(a) { + var st = 'st-test-test-test-test-test-test-test'; + return a !== ('te' + st); +} + +function compareToRopeLessThan(a) { + var st = 'st-test-test-test-test-test-test-test'; + return a < ('te' + st); +} + +function compareToRopeLessThanOrEquals(a) { + var st = 'st-test-test-test-test-test-test-test'; + return a <= ('te' + st); +} + +function compareToRopeGreaterThan(a) { + var st = 'st-test-test-test-test-test-test-test'; + return a > ('te' + st); +} + +function compareToRopeGreaterThanOrEquals(a) { + var st = 'st-test-test-test-test-test-test-test'; + return a >= ('te' + st); +} + +function main() { + // |test| must be longer than |JSFatInlineString::MAX_LENGTH_LATIN1| to + // ensure the above functions create ropes when concatenating strings. + var test = 'test-test-test-test-test-test-test-test'; + var foobar = 'foobar'; + + assertEq(compareToAtom(test), true); + assertEq(compareToAtom(foobar), false); + + assertEq(compareToAtomStrict(test), true); + assertEq(compareToAtomStrict(foobar), false); + + assertEq(compareToAtomNe(test), false); + assertEq(compareToAtomNe(foobar), true); + + assertEq(compareToAtomNeStrict(test), false); + assertEq(compareToAtomNeStrict(foobar), true); + + assertEq(compareToAtomLessThan(test), false); + assertEq(compareToAtomLessThan(foobar), true); + + assertEq(compareToAtomLessThanOrEquals(test), true); + assertEq(compareToAtomLessThanOrEquals(foobar), true); + + assertEq(compareToAtomGreaterThan(test), false); + assertEq(compareToAtomGreaterThan(foobar), false); + + assertEq(compareToAtomGreaterThanOrEquals(test), true); + assertEq(compareToAtomGreaterThanOrEquals(foobar), false); + + + assertEq(compareToRope(test), true); + assertEq(compareToRope(foobar), false); + + assertEq(compareToRopeStrict(test), true); + assertEq(compareToRopeStrict(foobar), false); + + assertEq(compareToRopeNe(test), false); + assertEq(compareToRopeNe(foobar), true); + + assertEq(compareToRopeNeStrict(test), false); + assertEq(compareToRopeNeStrict(foobar), true); + + assertEq(compareToRopeLessThan(test), false); + assertEq(compareToRopeLessThan(foobar), true); + + assertEq(compareToRopeLessThanOrEquals(test), true); + assertEq(compareToRopeLessThanOrEquals(foobar), true); + + assertEq(compareToRopeGreaterThan(test), false); + assertEq(compareToRopeGreaterThan(foobar), false); + + assertEq(compareToRopeGreaterThanOrEquals(test), true); + assertEq(compareToRopeGreaterThanOrEquals(foobar), false); +} + +for (var i = 0; i < 10000; i++) { + main(); +} diff --git a/js/src/jit-test/tests/ion/compareAll.js b/js/src/jit-test/tests/ion/compareAll.js new file mode 100644 index 0000000000..58d82b4a43 --- /dev/null +++ b/js/src/jit-test/tests/ion/compareAll.js @@ -0,0 +1,279 @@ +load(libdir + 'array-compare.js'); + +function compareIAndSet(v) { + var res = 0; + var c; + var i = 0; + c = (v > 1); + res |= (c << i); + i++; + c = (v >= 2); + res |= (c << i); + i++; + c = (v < 3); + res |= (c << i); + i++; + c = (v <= 4); + res |= (c << i); + i++; + c = (v == 5); + res |= (c << i); + i++; + c = (v != 6); + res |= (c << i); + i++; + c = (v === 7); + res |= (c << i); + i++; + c = (v !== 8); + res |= (c << i); + i++; + return res; +} + +function compareIAndBranch(v) { + var res = 0; + var c = 1; + var i = 0; + if (v > 1) + res |= (c << i); + i++; + if (v >= 2) + res |= (c << i); + i++; + if (v < 3) + res |= (c << i); + i++; + if (v <= 4) + res |= (c << i); + i++; + if (v == 5) + res |= (c << i); + i++; + if (v != 6) + res |= (c << i); + i++; + if (v === 7) + res |= (c << i); + i++; + if (v !== 8) + res |= (c << i); + i++; + if (v) + res |= (c << i); + i++; + return res; +} + +function compareDAndSet(v) { + var res = 0; + var c; + var i = 0; + c = (v > 1.5); + res |= (c << i); + i++; + c = (v >= 2.5); + res |= (c << i); + i++; + c = (v < 3.5); + res |= (c << i); + i++; + c = (v <= 4.5); + res |= (c << i); + i++; + c = (v == 5.5); + res |= (c << i); + i++; + c = (v != 6.5); + res |= (c << i); + i++; + c = (v === 7.5); + res |= (c << i); + i++; + c = (v !== 8.5); + res |= (c << i); + i++; + c = (v !== 0.0); + res |= (c << i); + i++; + return res; +} + +function compareDAndBranch(v) { + var res = 0; + var c = 1; + var i = 0; + if (v > 1.5) + res |= (c << i); + i++; + if (v >= 2.5) + res |= (c << i); + i++; + if (v < 3.5) + res |= (c << i); + i++; + if (v <= 4.5) + res |= (c << i); + i++; + if (v == 5.5) + res |= (c << i); + i++; + if (v != 6.5) + res |= (c << i); + i++; + if (v === 7.5) + res |= (c << i); + i++; + if (v !== 8.5) + res |= (c << i); + i++; + if (v) + res |= (c << i); + i++; + return res; +} + +function compareSAndSet(v) { + var res = 0; + var c; + var i = 0; + c = (v > "a"); + res |= (c << i); + i++; + c = (v >= "b"); + res |= (c << i); + i++; + c = (v < "c"); + res |= (c << i); + i++; + c = (v <= "d"); + res |= (c << i); + i++; + c = (v == "e"); + res |= (c << i); + i++; + c = (v != "f"); + res |= (c << i); + i++; + c = (v === "g"); + res |= (c << i); + i++; + c = (v !== "h"); + res |= (c << i); + i++; + return res; +} + +function compareSAndBranch(v) { + var res = 0; + var c = 1; + var i = 0; + if (v > "a") + res |= (c << i); + i++; + if (v >= "b") + res |= (c << i); + i++; + if (v < "c") + res |= (c << i); + i++; + if (v <= "d") + res |= (c << i); + i++; + if (v == "e") + res |= (c << i); + i++; + if (v != "f") + res |= (c << i); + i++; + if (v === "g") + res |= (c << i); + i++; + if (v !== "h") + res |= (c << i); + i++; + if (v) + res |= (c << i); + i++; + return res; +} + +var expected = [ + // compareIAndSet + 172, 175, 171, 171, 179, 131, 227, 35, + // compareIAndBranch + 428, 431, 427, 427, 435, 387, 483, 291, + // compareDAndSet + 428, 428, 431, 427, 427, 435, 387, 483, 291, 416, + // compareDAndBranch + 428, 428, 431, 427, 427, 435, 387, 483, 291, 160, 172, + // compareSAndSet + 172, 175, 171, 171, 179, 131, 227, 35, 172, + // compareSAndBranch + 428, 431, 427, 427, 435, 387, 483, 291, 172 +]; + +var result = [ + compareIAndSet(1), + compareIAndSet(2), + compareIAndSet(3), + compareIAndSet(4), + compareIAndSet(5), + compareIAndSet(6), + compareIAndSet(7), + compareIAndSet(8), + + compareIAndBranch(1), + compareIAndBranch(2), + compareIAndBranch(3), + compareIAndBranch(4), + compareIAndBranch(5), + compareIAndBranch(6), + compareIAndBranch(7), + compareIAndBranch(8), + + compareDAndSet(0.5), + compareDAndSet(1.5), + compareDAndSet(2.5), + compareDAndSet(3.5), + compareDAndSet(4.5), + compareDAndSet(5.5), + compareDAndSet(6.5), + compareDAndSet(7.5), + compareDAndSet(8.5), + compareDAndSet(NaN), + + compareDAndBranch(0.5), + compareDAndBranch(1.5), + compareDAndBranch(2.5), + compareDAndBranch(3.5), + compareDAndBranch(4.5), + compareDAndBranch(5.5), + compareDAndBranch(6.5), + compareDAndBranch(7.5), + compareDAndBranch(8.5), + compareDAndBranch(NaN), + compareDAndBranch(0.0), + + compareSAndSet("a"), + compareSAndSet("b"), + compareSAndSet("c"), + compareSAndSet("d"), + compareSAndSet("e"), + compareSAndSet("f"), + compareSAndSet("g"), + compareSAndSet("h"), + compareSAndSet(""), + + compareSAndBranch("a"), + compareSAndBranch("b"), + compareSAndBranch("c"), + compareSAndBranch("d"), + compareSAndBranch("e"), + compareSAndBranch("f"), + compareSAndBranch("g"), + compareSAndBranch("h"), + compareSAndBranch("") +]; + +assertEq(arraysEqual(result, expected), true); diff --git a/js/src/jit-test/tests/ion/condswitch.js b/js/src/jit-test/tests/ion/condswitch.js new file mode 100644 index 0000000000..2ab0a43e44 --- /dev/null +++ b/js/src/jit-test/tests/ion/condswitch.js @@ -0,0 +1,104 @@ +// This test case is made to be run with --ion-eager. + +function ret2() { + return 2; +} + +// Check with default case in the middle. +function test0(x) { + var res = 0; + switch (x) { + case (res |= 0x40, 1): // x === 1 + res |= 0x1; + default: // otherwise + res |= 0x2; + case (res |= 0x80, ret2()): // x === 2 + res |= 0x4; + case (res |= 0x100, 1 + ret2()): // x === 3 + res |= 0x8; + break; + case (res |= 0x200, 0): // x === 0 + res |= 0x10; + } + res |= 0x20; + return res; +} + +assertEq(test0(0), 0x40 | 0x80 | 0x100 | 0x200 | 0x10 | 0x20); +assertEq(test0(1), 0x40 | 0x1 | 0x2 | 0x4 | 0x8 | 0x20); +assertEq(test0(2), 0x40 | 0x80 | 0x4 | 0x8 | 0x20); +assertEq(test0(3), 0x40 | 0x80 | 0x100 | 0x8 | 0x20); +assertEq(test0(4), 0x40 | 0x80 | 0x100 | 0x200 | 0x2 | 0x4 | 0x8 | 0x20); + +// Check with no default and only one case. +function test1(x) { + var res = 0; + switch (x) { + case (res |= 0x1, ret2()): // x === 2 + res |= 0x2; + } + res |= 0x4; + return res; +} + +assertEq(test1(1), 0x1 | 0x4); // default. +assertEq(test1(2), 0x1 | 0x2 | 0x4); // case. + +// Check with default case identical to a case. +function test2(x) { + var res = 0; + switch (x) { + case (res |= 0x1, 0): + res |= 0x10; + break; + default: + case (res |= 0x2, 1): + res |= 0x20; + break; + case (res |= 0x4, ret2()): // x === 2 + res |= 0x40; + } + res |= 0x100; + return res; +} + +assertEq(test2(0), 0x1 | 0x10 | 0x100); +assertEq(test2(1), 0x1 | 0x2 | 0x20 | 0x100); +assertEq(test2(2), 0x1 | 0x2 | 0x4 | 0x40 | 0x100); +assertEq(test2(3), 0x1 | 0x2 | 0x4 | 0x20 | 0x100); + +// Check a non-break, non-empty default at the end. +function test3(x) { + var res = 0; + switch (x) { + case (res |= 0x1, 1): + res |= 0x10; + case (res |= 0x2, ret2()): // x === 2 + res |= 0x20; + default: + res |= 0x40; + } + res |= 0x100; + return res; +} + +assertEq(test3(1), 0x1 | 0x10 | 0x20 | 0x40 | 0x100); +assertEq(test3(2), 0x1 | 0x2 | 0x20 | 0x40 | 0x100); +assertEq(test3(3), 0x1 | 0x2 | 0x40 | 0x100); + +// Check cfg in condition of non-last case with no break. (reverse post order failure ?) +function test4(x) { + var res = 0; + switch (x) { + case (res |= 0x1, (x ? 1 : 0)): + res |= 0x10; + case (res |= 0x2, ret2()): // x === 2 + res |= 0x20; + } + res |= 0x100; + return res; +} + +assertEq(test4(0), 0x1 | 0x10 | 0x20 | 0x100); +assertEq(test4(1), 0x1 | 0x10 | 0x20 | 0x100); +assertEq(test4(2), 0x1 | 0x2 | 0x20 | 0x100); diff --git a/js/src/jit-test/tests/ion/context-override.js b/js/src/jit-test/tests/ion/context-override.js new file mode 100644 index 0000000000..b45f51c03c --- /dev/null +++ b/js/src/jit-test/tests/ion/context-override.js @@ -0,0 +1,2 @@ +// |jit-test| --no-ion-for-main-context +assertEq(inIon(), "Ion is disabled."); diff --git a/js/src/jit-test/tests/ion/dce-with-rinstructions.js b/js/src/jit-test/tests/ion/dce-with-rinstructions.js new file mode 100644 index 0000000000..481a1279ec --- /dev/null +++ b/js/src/jit-test/tests/ion/dce-with-rinstructions.js @@ -0,0 +1,2205 @@ +// |jit-test| --ion-limit-script-size=off + +setJitCompilerOption("baseline.warmup.trigger", 9); +setJitCompilerOption("ion.warmup.trigger", 20); +var i; + +var warp = true; + +// Prevent GC from cancelling/discarding Ion compilations. +gczeal(0); + +var max = 200; + +// Check that we are able to remove the operation inside recover test functions (denoted by "rop..."), +// when we inline the first version of uceFault, and ensure that the bailout is correct +// when uceFault is replaced (which cause an invalidation bailout) + +var uceFault = function (i) { + if (i > 98) + uceFault = function (i) { return true; }; + return false; +} + +var uceFault_bitnot_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bitnot_number')); +function rbitnot_number(i) { + var x = ~i; + if (uceFault_bitnot_number(i) || uceFault_bitnot_number(i)) + assertEq(x, -100 /* = ~99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_bitnot_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bitnot_object')); +function rbitnot_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = ~o; /* computed with t == i, not 1000 */ + t = 1000; + if (uceFault_bitnot_object(i) || uceFault_bitnot_object(i)) + assertEq(x, -100 /* = ~99 */); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_bitand_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bitand_number')); +function rbitand_number(i) { + var x = 1 & i; + if (uceFault_bitand_number(i) || uceFault_bitand_number(i)) + assertEq(x, 1 /* = 1 & 99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_bitand_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bitand_object')); +function rbitand_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = o & i; /* computed with t == i, not 1000 */ + t = 1000; + if (uceFault_bitand_object(i) || uceFault_bitand_object(i)) + assertEq(x, 99); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_bitor_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bitor_number')); +function rbitor_number(i) { + var x = i | -100; /* -100 == ~99 */ + if (uceFault_bitor_number(i) || uceFault_bitor_number(i)) + assertEq(x, -1) /* ~99 | 99 = -1 */ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_bitor_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bitor_object')); +function rbitor_object(i) { + var t = i; + var o = { valueOf: function() { return t; } }; + var x = o | -100; + t = 1000; + if (uceFault_bitor_object(i) || uceFault_bitor_object(i)) + assertEq(x, -1); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_bitxor_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bitxor_number')); +function rbitxor_number(i) { + var x = 1 ^ i; + if (uceFault_bitxor_number(i) || uceFault_bitxor_number(i)) + assertEq(x, 98 /* = 1 XOR 99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_bitxor_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bitxor_object')); +function rbitxor_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = 1 ^ o; /* computed with t == i, not 1000 */ + t = 1000; + if (uceFault_bitxor_object(i) || uceFault_bitxor_object(i)) + assertEq(x, 98 /* = 1 XOR 99 */); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_lsh_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_lsh_number')); +function rlsh_number(i) { + var x = i << 1; + if (uceFault_lsh_number(i) || uceFault_lsh_number(i)) + assertEq(x, 198); /* 99 << 1 == 198 */ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_lsh_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_lsh_object')); +function rlsh_object(i) { + var t = i; + var o = { valueOf: function() { return t; } }; + var x = o << 1; + t = 1000; + if (uceFault_lsh_object(i) || uceFault_lsh_object(i)) + assertEq(x, 198); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_rsh_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_rsh_number')); +function rrsh_number(i) { + var x = i >> 1; + if (uceFault_rsh_number(i) || uceFault_rsh_number(i)) + assertEq(x, 49 /* = 99 >> 1 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_rsh_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_rsh_object')); +function rrsh_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = o >> 1; /* computed with t == i, not 1000 */ + t = 1000; + if (uceFault_rsh_object(i) || uceFault_rsh_object(i)) + assertEq(x, 49 /* = 99 >> 1 */); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_ursh_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_ursh_number')); +function rursh_number(i) { + var x = i >>> 1; + if (uceFault_ursh_number(i) || uceFault_ursh_number(i)) + assertEq(x, 49 /* = 99 >>> 1 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_ursh_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_ursh_object')); +function rursh_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = o >>> 1; /* computed with t == i, not 1000 */ + t = 1000; + if (uceFault_ursh_object(i) || uceFault_ursh_object(i)) + assertEq(x, 49 /* = 99 >>> 1 */); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_signextend8_1 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_signextend8_1')); +function rsignextend8_1(i) { + var x = (i << 24) >> 24; + if (uceFault_signextend8_1(i) || uceFault_signextend8_1(i)) + assertEq(x, 99 /* = (99 << 24) >> 24 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_signextend8_2 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_signextend8_2')); +function rsignextend8_2(i) { + var x = ((-1 * i) << 24) >> 24; + if (uceFault_signextend8_2(i) || uceFault_signextend8_2(i)) + assertEq(x, -99 /* = (-99 << 24) >> 24 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_signextend16_1 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_signextend16_1')); +function rsignextend16_1(i) { + var x = (i << 16) >> 16; + if (uceFault_signextend16_1(i) || uceFault_signextend16_1(i)) + assertEq(x, 99 /* = (99 << 16) >> 16 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_signextend16_2 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_signextend16_2')); +function rsignextend16_2(i) { + var x = ((-1 * i) << 16) >> 16; + if (uceFault_signextend16_2(i) || uceFault_signextend16_2(i)) + assertEq(x, -99 /* = (-99 << 16) >> 16 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_add_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_add_number')); +function radd_number(i) { + var x = 1 + i; + if (uceFault_add_number(i) || uceFault_add_number(i)) + assertEq(x, 100 /* = 1 + 99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_add_float = eval(`(${uceFault})`.replace('uceFault', 'uceFault_add_float')); +function radd_float(i) { + var t = Math.fround(1/3); + var fi = Math.fround(i); + var x = Math.fround(Math.fround(Math.fround(Math.fround(t + fi) + t) + fi) + t); + if (uceFault_add_float(i) || uceFault_add_float(i)) + assertEq(x, 199); /* != 199.00000002980232 (when computed with double additions) */ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_add_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_add_object')); +function radd_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = o + i; /* computed with t == i, not 1000 */ + t = 1000; + if (uceFault_add_object(i) || uceFault_add_object(i)) + assertEq(x, 198); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_sub_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_sub_number')); +function rsub_number(i) { + var x = 1 - i; + if (uceFault_sub_number(i) || uceFault_sub_number(i)) + assertEq(x, -98 /* = 1 - 99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_sub_float = eval(`(${uceFault})`.replace('uceFault', 'uceFault_sub_float')); +function rsub_float(i) { + var t = Math.fround(1/3); + var fi = Math.fround(i); + var x = Math.fround(Math.fround(Math.fround(Math.fround(t - fi) - t) - fi) - t); + if (uceFault_sub_float(i) || uceFault_sub_float(i)) + assertEq(x, -198.3333282470703); /* != -198.33333334326744 (when computed with double subtractions) */ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_sub_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_sub_object')); +function rsub_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = o - i; /* computed with t == i, not 1000 */ + t = 1000; + if (uceFault_sub_object(i) || uceFault_sub_object(i)) + assertEq(x, 0); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_mul_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_mul_number')); +function rmul_number(i) { + var x = 2 * i; + if (uceFault_mul_number(i) || uceFault_mul_number(i)) + assertEq(x, 198 /* = 2 * 99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_mul_overflow = eval(`(${uceFault})`.replace('uceFault', 'uceFault_mul_overflow')); +function rmul_overflow(i) { + var x = Math.pow(2, i * 16 / 99) | 0; + x = x * x; + if (uceFault_mul_overflow(i) || uceFault_mul_overflow(i)) + assertEq(x, Math.pow(2, 32)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_mul_float = eval(`(${uceFault})`.replace('uceFault', 'uceFault_mul_float')); +function rmul_float(i) { + var t = Math.fround(1/3); + var fi = Math.fround(i); + var x = Math.fround(Math.fround(Math.fround(Math.fround(t * fi) * t) * fi) * t); + if (uceFault_mul_float(i) || uceFault_mul_float(i)) + assertEq(x, 363); /* != 363.0000324547301 (when computed with double multiplications) */ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_mul_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_mul_object')); +function rmul_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = o * i; /* computed with t == i, not 1000 */ + t = 1000; + if (uceFault_mul_object(i) || uceFault_mul_object(i)) + assertEq(x, 9801); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_imul_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_imul_number')); +function rimul_number(i) { + var x = Math.imul(2, i); + if (uceFault_imul_number(i) || uceFault_imul_number(i)) + assertEq(x, 198 /* = 2 * 99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_imul_overflow = eval(`(${uceFault})`.replace('uceFault', 'uceFault_imul_overflow')); +function rimul_overflow(i) { + var x = Math.pow(2, i * 16 / 99) | 0; + x = Math.imul(x, x); + if (uceFault_imul_overflow(i) || uceFault_imul_overflow(i)) + assertEq(x, 0); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_imul_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_imul_object')); +function rimul_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = Math.imul(o, i); /* computed with t == i, not 1000 */ + t = 1000; + if (uceFault_imul_object(i) || uceFault_imul_object(i)) + assertEq(x, 9801); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_div_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_div_number')); +function rdiv_number(i) { + i = i | 0; + if (i < 1) { return i; } + var x = 1 / i; + if (uceFault_div_number(i) || uceFault_div_number(i)) + assertEq(x, 0.010101010101010102 /* = 1 / 99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_div_float = eval(`(${uceFault})`.replace('uceFault', 'uceFault_div_float')); +function rdiv_float(i) { + var t = Math.fround(1/3); + var fi = Math.fround(i); + var x = Math.fround(Math.fround(Math.fround(Math.fround(t / fi) / t) / fi) / t); + if (uceFault_div_float(i) || uceFault_div_float(i)) + assertEq(x, 0.0003060912131331861); /* != 0.0003060912060598955 (when computed with double divisions) */ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_div_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_div_object')); +function rdiv_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = o / i; /* computed with t == i, not 1000 */ + t = 1000; + if (uceFault_div_object(i) || uceFault_div_object(i)) + assertEq(x, 1); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_mod_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_mod_number')); +function rmod_number(i) { + var x = i % 98; + if (uceFault_mod_number(i) || uceFault_mod_number(i)) + assertEq(x, 1); /* 99 % 98 = 1 */ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_mod_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_mod_object')); +function rmod_object(i) { + var t = i; + var o = { valueOf: function() { return t; } }; + var x = o % 98; /* computed with t == i, not 1000 */ + t = 1000; + if(uceFault_mod_object(i) || uceFault_mod_object(i)) + assertEq(x, 1); /* 99 % 98 = 1 */ + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_not_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_not_number')); +function rnot_number(i) { + var x = !i; + if (uceFault_not_number(i) || uceFault_not_number(i)) + assertEq(x, false /* = !99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_not_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_not_object')); +function rnot_object(i) { + var o = createIsHTMLDDA(); + var x = !o; + if(uceFault_not_object(i) || uceFault_not_object(i)) + assertEq(x, true /* = !undefined = !document.all = !createIsHTMLDDA() */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_number_eq = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_number_eq')); +function rcompare_number_eq(i) { + var x = i == 99; + if (uceFault_compare_number_eq(i) || uceFault_compare_number_eq(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_number_stricteq = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_number_stricteq')); +function rcompare_number_stricteq(i) { + var x = i === 99; + if (uceFault_compare_number_stricteq(i) || uceFault_compare_number_stricteq(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_number_ne = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_number_ne')); +function rcompare_number_ne(i) { + var x = i != 99; + if (uceFault_compare_number_ne(i) || uceFault_compare_number_ne(i)) + assertEq(x, false); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_number_strictne = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_number_strictne')); +function rcompare_number_strictne(i) { + var x = i !== 99; + if (uceFault_compare_number_strictne(i) || uceFault_compare_number_strictne(i)) + assertEq(x, false); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_number_lt = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_number_lt')); +function rcompare_number_lt(i) { + var x = i < 99; + if (uceFault_compare_number_lt(i) || uceFault_compare_number_lt(i)) + assertEq(x, false); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_number_le = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_number_le')); +function rcompare_number_le(i) { + var x = i <= 99; + if (uceFault_compare_number_le(i) || uceFault_compare_number_le(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_number_gt = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_number_gt')); +function rcompare_number_gt(i) { + var x = i > 99; + if (uceFault_compare_number_gt(i) || uceFault_compare_number_gt(i)) + assertEq(x, false); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_number_ge = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_number_ge')); +function rcompare_number_ge(i) { + var x = i >= 99; + if (uceFault_compare_number_ge(i) || uceFault_compare_number_ge(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_string_eq = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_string_eq')); +function rcompare_string_eq(i) { + var x = String(i) == "99"; + if (uceFault_compare_string_eq(i) || uceFault_compare_string_eq(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_string_stricteq = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_string_stricteq')); +function rcompare_string_stricteq(i) { + var x = String(i) === "99"; + if (uceFault_compare_string_stricteq(i) || uceFault_compare_string_stricteq(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_string_ne = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_string_ne')); +function rcompare_string_ne(i) { + var x = String(i) != "99"; + if (uceFault_compare_string_ne(i) || uceFault_compare_string_ne(i)) + assertEq(x, false); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_string_strictne = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_string_strictne')); +function rcompare_string_strictne(i) { + var x = String(i) !== "99"; + if (uceFault_compare_string_strictne(i) || uceFault_compare_string_strictne(i)) + assertEq(x, false); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_string_lt = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_string_lt')); +function rcompare_string_lt(i) { + var x = String(i) < "99"; + if (uceFault_compare_string_lt(i) || uceFault_compare_string_lt(i)) + assertEq(x, false); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_string_le = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_string_le')); +function rcompare_string_le(i) { + var x = String(i) <= "99"; + if (uceFault_compare_string_le(i) || uceFault_compare_string_le(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_string_gt = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_string_gt')); +function rcompare_string_gt(i) { + var x = String(i) > "99"; + if (uceFault_compare_string_gt(i) || uceFault_compare_string_gt(i)) + assertEq(x, false); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_string_ge = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_string_ge')); +function rcompare_string_ge(i) { + var x = String(i) >= "99"; + if (uceFault_compare_string_ge(i) || uceFault_compare_string_ge(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_bigint_eq = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_bigint_eq')); +function rcompare_bigint_eq(i) { + var x = BigInt(i) == 99n; + if (uceFault_compare_bigint_eq(i) || uceFault_compare_bigint_eq(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_bigint_stricteq = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_bigint_stricteq')); +function rcompare_bigint_stricteq(i) { + var x = BigInt(i) === 99n; + if (uceFault_compare_bigint_stricteq(i) || uceFault_compare_bigint_stricteq(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_bigint_ne = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_bigint_ne')); +function rcompare_bigint_ne(i) { + var x = BigInt(i) != 99n; + if (uceFault_compare_bigint_ne(i) || uceFault_compare_bigint_ne(i)) + assertEq(x, false); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_bigint_strictne = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_bigint_strictne')); +function rcompare_bigint_strictne(i) { + var x = BigInt(i) !== 99n; + if (uceFault_compare_bigint_strictne(i) || uceFault_compare_bigint_strictne(i)) + assertEq(x, false); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_bigint_lt = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_bigint_lt')); +function rcompare_bigint_lt(i) { + var x = BigInt(i) < 99n; + if (uceFault_compare_bigint_lt(i) || uceFault_compare_bigint_lt(i)) + assertEq(x, false); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_bigint_le = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_bigint_le')); +function rcompare_bigint_le(i) { + var x = BigInt(i) <= 99n; + if (uceFault_compare_bigint_le(i) || uceFault_compare_bigint_le(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_bigint_gt = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_bigint_gt')); +function rcompare_bigint_gt(i) { + var x = BigInt(i) > 99n; + if (uceFault_compare_bigint_gt(i) || uceFault_compare_bigint_gt(i)) + assertEq(x, false); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_compare_bigint_ge = eval(`(${uceFault})`.replace('uceFault', 'uceFault_compare_bigint_ge')); +function rcompare_bigint_ge(i) { + var x = BigInt(i) >= 99n; + if (uceFault_compare_bigint_ge(i) || uceFault_compare_bigint_ge(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_concat_string = eval(`(${uceFault})`.replace('uceFault', 'uceFault_concat_string')); +function rconcat_string(i) { + var x = "s" + i.toString(); + if (uceFault_concat_string(i) || uceFault_concat_string(i)) + assertEq(x, "s99"); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_concat_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_concat_number')); +function rconcat_number(i) { + var x = "s" + i; + if (uceFault_concat_number(i) || uceFault_concat_number(i)) + assertEq(x, "s99"); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_string_length = eval(`(${uceFault})`.replace('uceFault', 'uceFault_string_length')); +function rstring_length(i) { + var x = i.toString().length; + if (uceFault_string_length(i) || uceFault_string_length(i)) + assertEq(x, 2); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_arguments_length_1 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_arguments_length_1')); +function rarguments_length_1(i) { + var x = arguments.length; + if (uceFault_arguments_length_1(i) || uceFault_arguments_length_1(i)) + assertEq(x, 1); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_arguments_length_3 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_arguments_length_3')); +function rarguments_length_3(i) { + var x = arguments.length; + if (uceFault_arguments_length_3(i) || uceFault_arguments_length_3(i)) + assertEq(x, 3); + assertRecoveredOnBailout(x, true); + return i; +} + +function ret_argumentsLength() { return arguments.length; } + +var uceFault_inline_arguments_length_1 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_inline_arguments_length_1')); +function rinline_arguments_length_1(i) { + var x = ret_argumentsLength.apply(this, arguments); + if (uceFault_inline_arguments_length_1(i) || uceFault_inline_arguments_length_1(i)) + assertEq(x, 1); + // We cannot garantee that the function would be inlined + // assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_inline_arguments_length_3 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_inline_arguments_length_3')); +function rinline_arguments_length_3(i) { + var x = ret_argumentsLength.apply(this, arguments); + if (uceFault_inline_arguments_length_3(i) || uceFault_inline_arguments_length_3(i)) + assertEq(x, 3); + // We cannot garantee that the function would be inlined + // assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_floor_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_floor_number')); +function rfloor_number(i) { + var x = Math.floor(i + 0.1111); + if (uceFault_floor_number(i) || uceFault_floor_number(i)) + assertEq(x, i); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_floor_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_floor_object')); +function rfloor_object(i) { + var t = i + 0.1111; + var o = { valueOf: function () { return t; } }; + var x = Math.floor(o); + t = 1000.1111; + if (uceFault_floor_object(i) || uceFault_floor_object(i)) + assertEq(x, i); + assertRecoveredOnBailout(x, false); + return i; +} + +let uceFault_floor_double = eval(`(${uceFault})`.replace('uceFault', 'uceFault_floor_double')); +function rfloor_double(i) { + const x = Math.floor(i + (-1 >>> 0)); + if (uceFault_floor_double(i) || uceFault_floor_double(i)) + assertEq(x, 99 + (-1 >>> 0)); /* = i + 2 ^ 32 - 1 */ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_ceil_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_ceil_number')); +function rceil_number(i) { + var x = Math.ceil(-i - 0.12010799100); + if (uceFault_ceil_number(i) || uceFault_ceil_number(i)) + assertEq(x, -i); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_ceil_double = eval(`(${uceFault})`.replace('uceFault', 'uceFault_ceil_double')); +function rceil_double(i) { + const x = Math.ceil(i + (-1 >>> 0)); + if (uceFault_ceil_double(i) || uceFault_ceil_double(i)) + assertEq(x, 99 + (-1 >>> 0)); /* = i + 2 ^ 32 - 1 */ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_round_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_round')); +function rround_number(i) { + var x = Math.round(i + 1.4); + if (uceFault_round_number(i) || uceFault_round_number(i)) + assertEq(x, 100); /* = i + 1*/ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_round_double = eval(`(${uceFault})`.replace('uceFault', 'uceFault_round_double')); +function rround_double(i) { + var x = Math.round(i + (-1 >>> 0)); + if (uceFault_round_double(i) || uceFault_round_double(i)) + assertEq(x, 99 + (-1 >>> 0)); /* = i + 2 ^ 32 - 1 */ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_trunc_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_trunc_number')); +function rtrunc_number(i) { + var x = Math.trunc(-i - 0.12010799100); + if (uceFault_trunc_number(i) || uceFault_trunc_number(i)) + assertEq(x, -i); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_trunc_double = eval(`(${uceFault})`.replace('uceFault', 'uceFault_trunc_double')); +function rtrunc_double(i) { + const x = Math.trunc(i + (-1 >>> 0)); + if (uceFault_trunc_double(i) || uceFault_trunc_double(i)) + assertEq(x, 99 + (-1 >>> 0)); /* = i + 2 ^ 32 - 1 */ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_Char_Code_At = eval(`(${uceFault})`.replace('uceFault', 'uceFault_Char_Code_At')); +function rcharCodeAt(i) { + var s = "aaaaa"; + var x = s.charCodeAt(i % 4); + if (uceFault_Char_Code_At(i) || uceFault_Char_Code_At(i)) + assertEq(x, 97 ); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_from_char_code = eval(`(${uceFault})`.replace('uceFault', 'uceFault_from_char_code')); +function rfrom_char_code(i) { + var x = String.fromCharCode(i); + if (uceFault_from_char_code(i) || uceFault_from_char_code(i)) + assertEq(x, "c"); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_from_char_code_non_ascii = eval(`(${uceFault})`.replace('uceFault', 'uceFault_from_char_code_non_ascii')); +function rfrom_char_code_non_ascii(i) { + var x = String.fromCharCode(i * 100); + if (uceFault_from_char_code_non_ascii(i) || uceFault_from_char_code_non_ascii(i)) + assertEq(x, "\u26AC"); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_pow_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_pow_number')); +function rpow_number(i) { + var x = Math.pow(i, 3.14159); + if (uceFault_pow_number(i) || uceFault_pow_number(i)) + assertEq(x, Math.pow(99, 3.14159)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_pow_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_pow_object')); +function rpow_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = Math.pow(o, 3.14159); /* computed with t == i, not 1.5 */ + t = 1.5; + if (uceFault_pow_object(i) || uceFault_pow_object(i)) + assertEq(x, Math.pow(99, 3.14159)); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_powhalf_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_powhalf_number')); +function rpowhalf_number(i) { + var x = Math.pow(i, 0.5); + if (uceFault_powhalf_number(i) || uceFault_powhalf_number(i)) + assertEq(x, Math.pow(99, 0.5)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_powhalf_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_powhalf_object')); +function rpowhalf_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = Math.pow(o, 0.5); /* computed with t == i, not 1.5 */ + t = 1.5; + if (uceFault_powhalf_object(i) || uceFault_powhalf_object(i)) + assertEq(x, Math.pow(99, 0.5)); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_min_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_min_number')); +function rmin_number(i) { + var x = Math.min(i, i-1, i-2.1); + if (uceFault_min_number(i) || uceFault_min_number(i)) + assertEq(x, i-2.1); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_min_float = eval(`(${uceFault})`.replace('uceFault', 'uceFault_min_float')); +function rmin_float(i) { + var x = Math.fround(Math.min(Math.fround(i), Math.fround(13.37))); + if (uceFault_min_number(i) || uceFault_min_number(i)) + assertEq(x, Math.fround(13.37)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_min_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_min_object')); +function rmin_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = Math.min(o, o-1, o-2.1) + t = 1000; + if (uceFault_min_object(i) || uceFault_min_object(i)) + assertEq(x, i-2.1); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_max_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_max_number')); +function rmax_number(i) { + var x = Math.max(i, i-1, i-2.1); + if (uceFault_max_number(i) || uceFault_max_number(i)) + assertEq(x, i); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_max_float = eval(`(${uceFault})`.replace('uceFault', 'uceFault_max_float')); +function rmax_float(i) { + var x = Math.fround(Math.max(Math.fround(-i), Math.fround(13.37))); + if (uceFault_max_number(i) || uceFault_max_number(i)) + assertEq(x, Math.fround(13.37)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_max_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_max_object')); +function rmax_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = Math.max(o, o-1, o-2.1) + t = 1000; + if (uceFault_max_object(i) || uceFault_max_object(i)) + assertEq(x, i); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_abs = eval(`(${uceFault})`.replace('uceFault', 'uceFault_abs')); +function rabs_number(i) { + var x = Math.abs(i-42); + if (uceFault_abs(i) || uceFault_abs(i)) + assertEq(x, 57); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_abs_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_abs_object')); +function rabs_object(i) { + var t = -i; + var o = { valueOf: function() { return t; } }; + var x = Math.abs(o); /* computed with t == i, not 1000 */ + t = 1000; + if(uceFault_abs_object(i) || uceFault_abs_object(i)) + assertEq(x, 99); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_sqrt_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_sqrt_number')); +function rsqrt_number(i) { + var x = Math.sqrt(i); + if (uceFault_sqrt_number(i) || uceFault_sqrt_number(i)) + assertEq(x, Math.sqrt(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_sqrt_float = eval(`(${uceFault})`.replace('uceFault', 'uceFault_sqrt_float')); +function rsqrt_float(i) { + var x = Math.fround(Math.sqrt(Math.fround(i))); + if (uceFault_sqrt_float(i) || uceFault_sqrt_float(i)) + assertEq(x, Math.fround(Math.sqrt(Math.fround(99)))); /* != 9.9498743710662 (when computed with double sqrt) */ + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_sqrt_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_sqrt_object')); +function rsqrt_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = Math.sqrt(o); /* computed with t == i, not 1.5 */ + t = 1.5; + if (uceFault_sqrt_object(i) || uceFault_sqrt_object(i)) + assertEq(x, Math.sqrt(99)); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_atan2_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_atan2_number')); +function ratan2_number(i) { + var x = Math.atan2(i, i+1); + if (uceFault_atan2_number(i) || uceFault_atan2_number(i)) + assertEq(x, Math.atan2(99, 100)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_atan2_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_atan2_object')); +function ratan2_object(i) { + var t = i; + var o = { valueOf: function () { return t; } }; + var x = Math.atan2(o, o+1); + t = 1000; + if (uceFault_atan2_object(i) || uceFault_atan2_object(i)) + assertEq(x, Math.atan2(i, i+1)); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_str_split = eval(`(${uceFault})`.replace('uceFault', 'uceFault_str_split')) +function rstr_split(i) { + var x = "str01234567899876543210rts".split("" + i); + if (uceFault_str_split(i) || uceFault_str_split(i)) + assertEq(x[0], "str012345678"); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_regexp_exec = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_exec')) +function rregexp_exec(i) { + var re = new RegExp("(str)\\d+" + i + "\\d+rts"); + var res = re.exec("str01234567899876543210rts"); + if (uceFault_regexp_exec(i) || uceFault_regexp_exec(i)) + assertEq(res[1], "str"); + assertRecoveredOnBailout(res, false); + return i; +} +var uceFault_regexp_y_exec = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_y_exec')) +function rregexp_y_exec(i) { + var re = new RegExp("(str)\\d+" + (i % 10), "y"); + var res = re.exec("str00123456789"); + if (uceFault_regexp_y_exec(i) || uceFault_regexp_y_exec(i)) + assertEq(res[1], "str"); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, false); + return i; +} + +var uceFault_regexp_y_literal_exec = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_y_literal_exec')) +function rregexp_y_literal_exec(i) { + var re = /(str)\d*0/y; + var res = re.exec("str00123456789"); + if (uceFault_regexp_y_literal_exec(i) || uceFault_regexp_y_literal_exec(i)) + assertEq(res[1], "str"); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, false); + return i; +} + +var uceFault_regexp_g_exec = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_g_exec')) +function rregexp_g_exec(i) { + var re = new RegExp("(str)\\d+" + (i % 10), "g"); + var res = re.exec("str00123456789str00123456789"); + if (uceFault_regexp_g_exec(i) || uceFault_regexp_g_exec(i)) + assertEq(res[1], "str"); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, false); + return i; +} + +var uceFault_regexp_g_literal_exec = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_g_literal_exec')) +function rregexp_g_literal_exec(i) { + var re = /(str)\d*0/g; + var res = re.exec("str00123456789str00123456789"); + if (uceFault_regexp_g_literal_exec(i) || uceFault_regexp_g_literal_exec(i)) + assertEq(res[1], "str"); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, false); + return i; +} + +var uceFault_regexp_i_exec = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_i_exec')) +function rregexp_i_exec(i) { + var re = new RegExp("(str)\\d+" + (i % 10), "i"); + var res = re.exec("STR00123456789"); + if (uceFault_regexp_i_exec(i) || uceFault_regexp_i_exec(i)) + assertEq(res[1], "STR"); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, true); + return i; +} + +var uceFault_regexp_i_literal_exec = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_i_literal_exec')) +function rregexp_i_literal_exec(i) { + var re = /(str)\d*0/i; + var res = re.exec("STR00123456789"); + if (uceFault_regexp_i_literal_exec(i) || uceFault_regexp_i_literal_exec(i)) + assertEq(res[1], "STR"); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, true); + return i; +} + + +var uceFault_regexp_m_exec = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_m_exec')) +function rregexp_m_exec(i) { + var re = new RegExp("^(str)\\d+" + (i % 10), "m"); + var res = re.exec("abc\nstr00123456789"); + if (uceFault_regexp_m_exec(i) || uceFault_regexp_m_exec(i)) + assertEq(res[1], "str"); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, true); + return i; +} + +var uceFault_regexp_m_literal_exec = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_m_literal_exec')) +function rregexp_m_literal_exec(i) { + var re = /^(str)\d*0/m; + var res = re.exec("abc\nstr00123456789"); + if (uceFault_regexp_m_literal_exec(i) || uceFault_regexp_m_literal_exec(i)) + assertEq(res[1], "str"); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, true); + return i; +} + +var uceFault_regexp_test = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_test')) +function rregexp_test(i) { + var re = new RegExp("str\\d+" + i + "\\d+rts"); + var res = re.test("str01234567899876543210rts"); + if (uceFault_regexp_test(i) || uceFault_regexp_test(i)) + assertEq(res, true); + assertRecoveredOnBailout(res, false); + return i; +} + +var uceFault_regexp_y_test = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_y_test')) +function rregexp_y_test(i) { + var re = new RegExp("str\\d+" + (i % 10), "y"); + var res = re.test("str00123456789"); + if (uceFault_regexp_y_test(i) || uceFault_regexp_y_test(i)) + assertEq(res, true); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, false); + return i; +} + +var uceFault_regexp_y_literal_test = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_y_literal_test')) +function rregexp_y_literal_test(i) { + var re = /str\d*0/y; + var res = re.test("str00123456789"); + if (uceFault_regexp_y_literal_test(i) || uceFault_regexp_y_literal_test(i)) + assertEq(res, true); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, false); + return i; +} + +var uceFault_regexp_g_test = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_g_test')) +function rregexp_g_test(i) { + var re = new RegExp("str\\d+" + (i % 10), "g"); + var res = re.test("str00123456789str00123456789"); + if (uceFault_regexp_g_test(i) || uceFault_regexp_g_test(i)) + assertEq(res, true); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, false); + return i; +} + +var uceFault_regexp_g_literal_test = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_g_literal_test')) +function rregexp_g_literal_test(i) { + var re = /str\d*0/g; + var res = re.test("str00123456789str00123456789"); + if (uceFault_regexp_g_literal_test(i) || uceFault_regexp_g_literal_test(i)) + assertEq(res, true); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, false); + return i; +} + +var uceFault_regexp_i_test = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_i_test')) +function rregexp_i_test(i) { + var re = new RegExp("str\\d+" + (i % 10), "i"); + var res = re.test("STR00123456789"); + if (uceFault_regexp_i_test(i) || uceFault_regexp_i_test(i)) + assertEq(res, true); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, true); + return i; +} + +var uceFault_regexp_i_literal_test = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_i_literal_test')) +function rregexp_i_literal_test(i) { + var re = /str\d*0/i; + var res = re.test("STR00123456789"); + if (uceFault_regexp_i_literal_test(i) || uceFault_regexp_i_literal_test(i)) + assertEq(res, true); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, true); + return i; +} + +var uceFault_regexp_m_test = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_m_test')) +function rregexp_m_test(i) { + var re = new RegExp("^str\\d+" + (i % 10), "m"); + var res = re.test("abc\nstr00123456789"); + if (uceFault_regexp_m_test(i) || uceFault_regexp_m_test(i)) + assertEq(res, true); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, true); + return i; +} + +var uceFault_regexp_m_literal_test = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_m_literal_test')) +function rregexp_m_literal_test(i) { + var re = /^str\d*0/m; + var res = re.test("abc\nstr00123456789"); + if (uceFault_regexp_m_literal_test(i) || uceFault_regexp_m_literal_test(i)) + assertEq(res, true); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, true); + return i; +} + +var uceFault_regexp_replace = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_replace')) +function rregexp_replace(i) { + var re = new RegExp("str\\d+" + (i % 10)); + var res = "str00123456789".replace(re, "abc"); + if (uceFault_regexp_replace(i) || uceFault_regexp_replace(i)) + assertEq(res, "abc"); + assertRecoveredOnBailout(res, false); + return i; +} + +var uceFault_regexp_y_replace = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_y_replace')) +function rregexp_y_replace(i) { + var re = new RegExp("str\\d+" + (i % 10), "y"); + re.test("str00123456789"); + assertEq(re.lastIndex == 0, false); + + var res = "str00123456789".replace(re, "abc"); + + assertEq(re.lastIndex, 0); + + assertEq(res, "str00123456789"); + + res = "str00123456789".replace(re, "abc"); + assertEq(re.lastIndex == 0, false); + + if (uceFault_regexp_y_replace(i) || uceFault_regexp_y_replace(i)) + assertEq(res, "abc"); + assertRecoveredOnBailout(res, false); + return i; +} + +var uceFault_regexp_y_literal_replace = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_y_literal_replace')) +function rregexp_y_literal_replace(i) { + var re = /str\d+9/y; + re.test("str00123456789"); + assertEq(re.lastIndex == 0, false); + + var res = "str00123456789".replace(re, "abc"); + + assertEq(re.lastIndex, 0); + + assertEq(res, "str00123456789"); + + res = "str00123456789".replace(re, "abc"); + assertEq(re.lastIndex == 0, false); + + if (uceFault_regexp_y_literal_replace(i) || uceFault_regexp_y_literal_replace(i)) + assertEq(res, "abc"); + assertRecoveredOnBailout(res, false); + return i; +} + +var uceFault_regexp_g_replace = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_g_replace')) +function rregexp_g_replace(i) { + var re = new RegExp("str\\d+" + (i % 10), "g"); + re.test("str00123456789"); + assertEq(re.lastIndex == 0, false); + + var res = "str00123456789".replace(re, "abc"); + + // replace will always zero the lastIndex field, even if it was not zero before. + assertEq(re.lastIndex == 0, true); + + if (uceFault_regexp_g_replace(i) || uceFault_regexp_g_replace(i)) + assertEq(res, "abc"); + assertRecoveredOnBailout(res, false); + return i; +} + +var uceFault_regexp_g_literal_replace = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_g_literal_replace')) +function rregexp_g_literal_replace(i) { + var re = /str\d+9/g; + re.test("str00123456789"); + assertEq(re.lastIndex == 0, false); + + var res = "str00123456789".replace(re, "abc"); + + // replace will zero the lastIndex field. + assertEq(re.lastIndex == 0, true); + + if (uceFault_regexp_g_literal_replace(i) || uceFault_regexp_g_literal_replace(i)) + assertEq(res, "abc"); + assertRecoveredOnBailout(res, false); + return i; +} + +var uceFault_regexp_i_replace = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_i_replace')) +function rregexp_i_replace(i) { + var re = new RegExp("str\\d+" + (i % 10), "i"); + re.test("STR00123456789"); + assertEq(re.lastIndex == 0, true); + + var res = "STR00123456789".replace(re, "abc"); + + assertEq(re.lastIndex == 0, true); + + if (uceFault_regexp_i_replace(i) || uceFault_regexp_i_replace(i)) + assertEq(res, "abc"); + assertRecoveredOnBailout(res, false); + return i; +} + +var uceFault_regexp_i_literal_replace = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_i_literal_replace')) +function rregexp_i_literal_replace(i) { + var re = /str\d+9/i; + re.test("STR00123456789"); + assertEq(re.lastIndex == 0, true); + + var res = "str00123456789".replace(re, "abc"); + + assertEq(re.lastIndex == 0, true); + + if (uceFault_regexp_i_literal_replace(i) || uceFault_regexp_i_literal_replace(i)) + assertEq(res, "abc"); + assertRecoveredOnBailout(res, false); + return i; +} + +var uceFault_regexp_m_replace = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_m_replace')) +function rregexp_m_replace(i) { + var re = new RegExp("^str\\d+" + (i % 10), "m"); + re.test("abc\nstr00123456789"); + assertEq(re.lastIndex == 0, true); + + var res = "abc\nstr00123456789".replace(re, "abc"); + + assertEq(re.lastIndex == 0, true); + + if (uceFault_regexp_m_replace(i) || uceFault_regexp_m_replace(i)) + assertEq(res, "abc\nabc"); + assertRecoveredOnBailout(res, false); + return i; +} + +var uceFault_regexp_m_literal_replace = eval(`(${uceFault})`.replace('uceFault', 'uceFault_regexp_m_literal_replace')) +function rregexp_m_literal_replace(i) { + var re = /^str\d+9/m; + re.test("abc\nstr00123456789"); + assertEq(re.lastIndex == 0, true); + + var res = "abc\nstr00123456789".replace(re, "abc"); + + assertEq(re.lastIndex == 0, true); + + if (uceFault_regexp_m_literal_replace(i) || uceFault_regexp_m_literal_replace(i)) + assertEq(res, "abc\nabc"); + assertRecoveredOnBailout(res, false); + return i; +} + +var uceFault_string_replace = eval(`(${uceFault})`.replace('uceFault', 'uceFault_string_replace')) +function rstring_replace(i) { + var re = /str\d+9/; + + assertEq(re.lastIndex == 0, true); + var res = "str00123456789".replace(re, "abc"); + if (uceFault_string_replace(i) || uceFault_string_replace(i)) + assertEq(res, "abc"); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, true); + return i; +} + +var uceFault_string_replace_y = eval(`(${uceFault})`.replace('uceFault', 'uceFault_string_replace_y')) +function rstring_replace_y(i) { + var re = /str\d+9/y; + + assertEq(re.lastIndex == 0, true); + var res = "str00123456789".replace(re, "abc"); + if (uceFault_string_replace_y(i) || uceFault_string_replace_y(i)) + assertEq(res, "abc"); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, false); + return i; +} + +var uceFault_string_replace_g = eval(`(${uceFault})`.replace('uceFault', 'uceFault_string_replace_g')) +function rstring_replace_g(i) { + var re = /str\d+9/g; + + assertEq(re.lastIndex == 0, true); + var res = "str00123456789str00123456789".replace(re, "abc"); + if (uceFault_string_replace_g(i) || uceFault_string_replace_g(i)) + assertEq(res, "abcabc"); + assertRecoveredOnBailout(res, false); + assertEq(re.lastIndex == 0, true); + return i; +} + +var uceFault_string_slice = eval(`(${uceFault})`.replace('uceFault', 'uceFault_string_slice')) +function rstring_slice(i) { + var res = "str00123456789".slice(0, 3); + if (uceFault_string_slice(i) || uceFault_string_slice(i)) + assertEq(res, "str"); + assertRecoveredOnBailout(res, false); + return i; +} + +var uceFault_string_substring = eval(`(${uceFault})`.replace('uceFault', 'uceFault_string_substring')) +function rstring_substring(i) { + var res = "str00123456789".substring(0, 3); + if (uceFault_string_substring(i) || uceFault_string_substring(i)) + assertEq(res, "str"); + assertRecoveredOnBailout(res, false); + return i; +} + +var uceFault_typeof = eval(`(${uceFault})`.replace('uceFault', 'uceFault_typeof')) +function rtypeof(i) { + var inputs = [ {}, [], 1, true, undefined, function(){}, null, Symbol() ]; + var types = [ "object", "object", "number", "boolean", "undefined", "function", "object", "symbol"]; + + var x = typeof (inputs[i % inputs.length]); + var y = types[i % types.length]; + + if (uceFault_typeof(i) || uceFault_typeof(i)) + assertEq(x, y); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_todouble_value = eval(`(${uceFault})`.replace('uceFault', 'uceFault_todouble_value')) +function rtodouble_value(i) { + var a = 1; + if (i == 1000) a = "1"; + + var x = a < 8.1; + + if (uceFault_todouble_value(i) || uceFault_todouble_value(i)) + assertEq(x, true); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_todouble_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_todouble_number')); +function rtodouble_number(i) { + var x = Math.fround(Math.fround(i) + Math.fround(i)) + 1; + if (uceFault_todouble_number(i) || uceFault_todouble_number(i)) + assertEq(2 * i + 1, x); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_tofloat32_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_tofloat32_number')); +function rtofloat32_number(i) { + var x = Math.fround(i + 0.1111111111); + if (uceFault_tofloat32_number(i) || uceFault_tofloat32_number(i)) + assertEq(x, Math.fround(99.1111111111)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_tofloat32_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_tofloat32_object')); +function rtofloat32_object(i) { + var t = i + 0.1111111111; + var o = { valueOf: function () { return t; } }; + var x = Math.fround(o); + t = 1000.1111111111; + if (uceFault_tofloat32_object(i) || uceFault_tofloat32_object(i)) + assertEq(x, Math.fround(99.1111111111)); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_trunc_to_int32_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_trunc_to_int32_number')); +function rtrunc_to_int32_number(i) { + var x = (i + 0.12) | 0; + if (uceFault_trunc_to_int32_number(i) || uceFault_trunc_to_int32_number(i)) + assertEq(x, (i + 0.12) | 0); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_trunc_to_int32_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_trunc_to_int32_object')); +function rtrunc_to_int32_object(i) { + var t1 = i + 0.12; + var o1 = { valueOf: function() { return t1; } }; + var x = o1 | 0; + t1 = 777.12; + if (uceFault_trunc_to_int32_object(i) || uceFault_trunc_to_int32_object(i)) + assertEq(x, (i + 0.12) | 0); + assertRecoveredOnBailout(x, false); +} + +var uceFault_trunc_to_int32_string = eval(`(${uceFault})`.replace('uceFault', 'uceFault_trunc_to_int32_string')); +function rtrunc_to_int32_string(i) { + var x = (i + "0") | 0; + if (uceFault_trunc_to_int32_string(i) || uceFault_trunc_to_int32_string(i)) + assertEq(x, (i + "0") | 0); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_hypot_number_2args = eval(`(${uceFault})`.replace('uceFault', 'uceFault_hypot_number_2args')); +function rhypot_number_2args(i) { + var x = Math.hypot(i, i + 1); + if (uceFault_hypot_number_2args(i) || uceFault_hypot_number_2args(i)) + assertEq(x, Math.sqrt(i * i + (i + 1) * (i + 1))); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_hypot_number_3args = eval(`(${uceFault})`.replace('uceFault', 'uceFault_hypot_number_3args')); +function rhypot_number_3args(i) { + var x = Math.hypot(i, i + 1, i + 2); + if (uceFault_hypot_number_3args(i) || uceFault_hypot_number_3args(i)) + assertEq(x, Math.sqrt(i * i + (i + 1) * (i + 1) + (i + 2) * (i + 2))); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_hypot_number_4args = eval(`(${uceFault})`.replace('uceFault', 'uceFault_hypot_number_4args')); +function rhypot_number_4args(i) { + var x = Math.hypot(i, i + 1, i + 2, i + 3); + if (uceFault_hypot_number_4args(i) || uceFault_hypot_number_4args(i)) + assertEq(x, Math.sqrt(i * i + (i + 1) * (i + 1) + (i + 2) * (i + 2) + (i + 3) * (i + 3))); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_hypot_object_2args = eval(`(${uceFault})`.replace('uceFault', 'uceFault_hypot_object_2args')); +function rhypot_object_2args(i) { + var t0 = i; + var t1 = i + 1; + var o0 = { valueOf: function () { return t0; } }; + var o1 = { valueOf: function () { return t1; } }; + var x = Math.hypot(o0, o1); + t0 = 1000; + t1 = 2000; + if (uceFault_hypot_object_2args(i) || uceFault_hypot_object_2args(i) ) + assertEq(x, Math.sqrt(i * i + (i + 1) * (i + 1))); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_hypot_object_3args = eval(`(${uceFault})`.replace('uceFault', 'uceFault_hypot_object_3args')); +function rhypot_object_3args(i) { + var t0 = i; + var t1 = i + 1; + var t2 = i + 2; + var o0 = { valueOf: function () { return t0; } }; + var o1 = { valueOf: function () { return t1; } }; + var o2 = { valueOf: function () { return t2; } }; + var x = Math.hypot(o0, o1, o2); + t0 = 1000; + t1 = 2000; + t2 = 3000; + if (uceFault_hypot_object_3args(i) || uceFault_hypot_object_3args(i) ) + assertEq(x, Math.sqrt(i * i + (i + 1) * (i + 1) + (i + 2) * (i + 2))); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_hypot_object_4args = eval(`(${uceFault})`.replace('uceFault', 'uceFault_hypot_object_4args')); +function rhypot_object_4args(i) { + var t0 = i; + var t1 = i + 1; + var t2 = i + 2; + var t3 = i + 3; + var o0 = { valueOf: function () { return t0; } }; + var o1 = { valueOf: function () { return t1; } }; + var o2 = { valueOf: function () { return t2; } }; + var o3 = { valueOf: function () { return t3; } }; + var x = Math.hypot(o0, o1, o2, o3); + t0 = 1000; + t1 = 2000; + t2 = 3000; + t3 = 4000; + if (uceFault_hypot_object_4args(i) || uceFault_hypot_object_4args(i) ) + assertEq(x, Math.sqrt(i * i + (i + 1) * (i + 1) + (i + 2) * (i + 2) + (i + 3) * (i + 3))); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_random = eval(`(${uceFault})`.replace('uceFault', 'uceFault_random')); +function rrandom(i) { + // setRNGState() exists only in debug builds + if (getBuildConfiguration("debug")) setRNGState(2, 1+i); + + var x = Math.random(); + if (uceFault_random(i) || uceFault_random(i)) { + // TODO(Warp): Conditional operator ?: prevents recovering operands. + // assertEq(x, getBuildConfiguration("debug") ? setRNGState(2, 1+i) || Math.random() : x); + if (getBuildConfiguration("debug")) { + assertEq(x, setRNGState(2, 1+i) || Math.random()); + } else { + assertEq(x, x); + } + } + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_sin_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_sin_number')); +function rsin_number(i) { + var x = Math.sin(i); + if (uceFault_sin_number(i) || uceFault_sin_number(i)) + assertEq(x, Math.sin(i)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_sin_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_sin_object')); +function rsin_object(i) { + var t = i; + var o = { valueOf: function() { return t; } }; + var x = Math.sin(o); + t = 777; + if (uceFault_sin_object(i) || uceFault_sin_object(i)) + assertEq(x, Math.sin(i)); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_log_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_log_number')); +function rlog_number(i) { + var x = Math.log(i); + if (uceFault_log_number(i) || uceFault_log_number(i)) + assertEq(x, Math.log(99) /* log(99) */); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_log_object = eval(`(${uceFault})`.replace('uceFault', 'uceFault_log_object')); +function rlog_object(i) { + var t = i; + var o = { valueOf: function() { return t; } }; + var x = Math.log(o); /* Evaluated with t == i, not t == 1000 */ + t = 1000; + if (uceFault_log_object(i) || uceFault_log_object(i)) + assertEq(x, Math.log(99) /* log(99) */); + assertRecoveredOnBailout(x, false); + return i; +} + +var uceFault_cos_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_cos_number')); +function rcos_number(i) { + var x = Math.cos(i); + if (uceFault_cos_number(i) || uceFault_cos_number(i)) + assertEq(x, Math.cos(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_tan_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_tan_number')); +function rtan_number(i) { + var x = Math.tan(i); + if (uceFault_tan_number(i) || uceFault_tan_number(i)) + assertEq(x, Math.tan(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_exp_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_exp_number')); +function rexp_number(i) { + var x = Math.exp(i); + if (uceFault_exp_number(i) || uceFault_exp_number(i)) + assertEq(x, Math.exp(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_acos_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_acos_number')); +function racos_number(i) { + var x = Math.acos(1 / i); + if (uceFault_acos_number(i) || uceFault_acos_number(i)) + assertEq(x, Math.acos(1 / 99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_asin_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_asin_number')); +function rasin_number(i) { + var x = Math.asin(1 / i); + if (uceFault_asin_number(i) || uceFault_asin_number(i)) + assertEq(x, Math.asin(1 / 99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_atan_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_atan_number')); +function ratan_number(i) { + var x = Math.atan(i); + if (uceFault_atan_number(i) || uceFault_atan_number(i)) + assertEq(x, Math.atan(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_log10_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_log10_number')); +function rlog10_number(i) { + var x = Math.log10(i); + if (uceFault_log10_number(i) || uceFault_log10_number(i)) + assertEq(x, Math.log10(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_log2_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_log2_number')); +function rlog2_number(i) { + var x = Math.log2(i); + if (uceFault_log2_number(i) || uceFault_log2_number(i)) + assertEq(x, Math.log2(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_log1p_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_log1p_number')); +function rlog1p_number(i) { + var x = Math.log1p(i); + if (uceFault_log1p_number(i) || uceFault_log1p_number(i)) + assertEq(x, Math.log1p(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_expm1_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_expm1_number')); +function rexpm1_number(i) { + var x = Math.expm1(i); + if (uceFault_expm1_number(i) || uceFault_expm1_number(i)) + assertEq(x, Math.expm1(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_cosh_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_cosh_number')); +function rcosh_number(i) { + var x = Math.cosh(i); + if (uceFault_cosh_number(i) || uceFault_cosh_number(i)) + assertEq(x, Math.cosh(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_sinh_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_sinh_number')); +function rsinh_number(i) { + var x = Math.sinh(i); + if (uceFault_sinh_number(i) || uceFault_sinh_number(i)) + assertEq(x, Math.sinh(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_tanh_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_tanh_number')); +function rtanh_number(i) { + var x = Math.tanh(1 / i); + if (uceFault_tanh_number(i) || uceFault_tanh_number(i)) + assertEq(x, Math.tanh(1 / 99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_acosh_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_acosh_number')); +function racosh_number(i) { + var x = Math.acosh(i); + if (uceFault_acosh_number(i) || uceFault_acosh_number(i)) + assertEq(x, Math.acosh(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_asinh_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_asinh_number')); +function rasinh_number(i) { + var x = Math.asinh(i); + if (uceFault_asinh_number(i) || uceFault_asinh_number(i)) + assertEq(x, Math.asinh(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_atanh_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_atanh_number')); +function ratanh_number(i) { + var x = Math.atanh(1 / i); + if (uceFault_atanh_number(i) || uceFault_atanh_number(i)) + assertEq(x, Math.atanh(1 / 99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_cbrt_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_cbrt_number')); +function rcbrt_number(i) { + var x = Math.cbrt(i); + if (uceFault_cbrt_number(i) || uceFault_cbrt_number(i)) + assertEq(x, Math.cbrt(99)); + assertRecoveredOnBailout(x, true); + return i; +} + +var uceFault_sign_number = eval(`(${uceFault})`.replace('uceFault', 'uceFault_sign_number')); +function rsign_number(i) { + var x = Math.sign(-i - 0.12010799100); + if (uceFault_sign_number(i) || uceFault_sign_number(i)) + assertEq(x, Math.sign(-10)); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_sign_double = eval(`(${uceFault})`.replace('uceFault', 'uceFault_sign_double')); +function rsign_double(i) { + const x = Math.sign(i + (-1 >>> 0)); + if (uceFault_sign_double(i) || uceFault_sign_double(i)) + assertEq(x, Math.sign(10)); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_add_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_add_bigint')); +function rbigintadd(i) { + var x = 1n + i; + if (uceFault_add_bigint(i) || uceFault_add_bigint(i)) + assertEq(x, 100n /* = 1 + 99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_sub_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_sub_bigint')); +function rbigintsub(i) { + var x = 1n - i; + if (uceFault_sub_bigint(i) || uceFault_sub_bigint(i)) + assertEq(x, -98n /* = 1 - 99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_mul_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_mul_bigint')); +function rbigintmul(i) { + var x = 2n * i; + if (uceFault_mul_bigint(i) || uceFault_mul_bigint(i)) + assertEq(x, 198n /* = 2 * 99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_div_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_div_bigint')); +function rbigintdiv(i) { + var x = i / 3n; + if (uceFault_div_bigint(i) || uceFault_div_bigint(i)) + assertEq(x, 33n /* = 99 / 3 */); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_mod_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_mod_bigint')); +function rbigintmod(i) { + var x = i % 2n; + if (uceFault_mod_bigint(i) || uceFault_mod_bigint(i)) + assertEq(x, 1n /* = 99 % 2 */); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_pow_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_pow_bigint')); +function rbigintpow(i) { + var x = i ** 2n; + if (uceFault_pow_bigint(i) || uceFault_pow_bigint(i)) + assertEq(x, 9801n /* = 99 ** 2 */); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_inc_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_inc_bigint')); +function rbigintinc(i) { + var x = i; + x++; + if (uceFault_inc_bigint(i) || uceFault_inc_bigint(i)) + assertEq(x, 100n /* = 99 + 1 */); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_dec_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_dec_bigint')); +function rbigintdec(i) { + var x = i; + x--; + if (uceFault_dec_bigint(i) || uceFault_dec_bigint(i)) + assertEq(x, 98n /* = 99 - 1 */); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_neg_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_neg_bigint')); +function rbigintneg(i) { + var x = -i; + if (uceFault_neg_bigint(i) || uceFault_neg_bigint(i)) + assertEq(x, -99n); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_bitand_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bitand_bigint')); +function rbigintbitand(i) { + var x = 1n & i; + if (uceFault_bitand_bigint(i) || uceFault_bitand_bigint(i)) + assertEq(x, 1n /* = 1 & 99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_bitor_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bitor_bigint')); +function rbigintbitor(i) { + var x = i | -100n; /* -100 == ~99 */ + if (uceFault_bitor_bigint(i) || uceFault_bitor_bigint(i)) + assertEq(x, -1n) /* ~99 | 99 = -1 */ + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_bitxor_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bitxor_bigint')); +function rbigintbitxor(i) { + var x = 1n ^ i; + if (uceFault_bitxor_bigint(i) || uceFault_bitxor_bigint(i)) + assertEq(x, 98n /* = 1 XOR 99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_bitnot_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bitnot_bigint')); +function rbigintbitnot(i) { + var x = ~i; + if (uceFault_bitnot_bigint(i) || uceFault_bitnot_bigint(i)) + assertEq(x, -100n /* = ~99 */); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_lsh_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_lsh_bigint')); +function rbigintlsh(i) { + var x = i << 1n; + if (uceFault_lsh_bigint(i) || uceFault_lsh_bigint(i)) + assertEq(x, 198n); /* 99 << 1 == 198 */ + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_rsh_bigint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_rsh_bigint')); +function rbigintrsh(i) { + var x = i >> 1n; + if (uceFault_rsh_bigint(i) || uceFault_rsh_bigint(i)) + assertEq(x, 49n /* = 99 >> 1 */); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_bigintasint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bigintasint')); +function rbigintasint(i) { + var x = BigInt.asIntN(6, i); + if (uceFault_bigintasint(i) || uceFault_bigintasint(i)) + assertEq(x, -29n); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_bigintasuint = eval(`(${uceFault})`.replace('uceFault', 'uceFault_bigintasuint')); +function rbigintasuint(i) { + var x = BigInt.asUintN(6, i); + if (uceFault_bigintasuint(i) || uceFault_bigintasuint(i)) + assertEq(x, 35n); + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_nantozero_nan = eval(`(${uceFault})`.replace('uceFault', 'uceFault_nantozero_nan')); +function rnantozero_nan(i) { + // Note: |x| must be Double-typed. + var x = (i + 0.5) * NaN; + var y = x ? x : +0; + if (uceFault_nantozero_nan(i) || uceFault_nantozero_nan(i)) + assertEq(y, +0); + assertRecoveredOnBailout(y, true); + return i; +} + +let uceFault_nantozero_poszero = eval(`(${uceFault})`.replace('uceFault', 'uceFault_nantozero_poszero')); +function rnantozero_poszero(i) { + // Note: |x| must be Double-typed. + var x = (i + 0.5) * +0; + var y = x ? x : +0; + if (uceFault_nantozero_poszero(i) || uceFault_nantozero_poszero(i)) + assertEq(y, +0); + assertRecoveredOnBailout(y, true); + return i; +} + +let uceFault_nantozero_negzero = eval(`(${uceFault})`.replace('uceFault', 'uceFault_nantozero_negzero')); +function rnantozero_negzero(i) { + // Note: |x| must be Double-typed. + var x = (i + 0.5) * -0; + var y = x ? x : +0; + if (uceFault_nantozero_negzero(i) || uceFault_nantozero_negzero(i)) + assertEq(y, +0); + assertRecoveredOnBailout(y, true); + return i; +} + +for (j = 100 - max; j < 100; j++) { + with({}){} // Do not Ion-compile this loop. + let i = j < 2 ? (Math.abs(j) % 50) + 2 : j; + rbitnot_number(i); + rbitnot_object(i); + rbitand_number(i); + rbitand_object(i); + rbitor_number(i); + rbitor_object(i); + rbitxor_number(i); + rbitxor_object(i); + rlsh_number(i); + rlsh_object(i); + rrsh_number(i); + rrsh_object(i); + rursh_number(i); + rursh_object(i); + rsignextend8_1(i); + rsignextend8_2(i); + rsignextend16_1(i); + rsignextend16_2(i); + radd_number(i); + radd_float(i); + radd_object(i); + rsub_number(i); + rsub_float(i); + rsub_object(i); + rmul_number(i); + rmul_overflow(i); + rmul_float(i); + rmul_object(i); + rimul_number(i); + rimul_overflow(i); + rimul_object(i); + rdiv_number(i); + rdiv_float(i); + rdiv_object(i); + rmod_number(i); + rmod_object(i); + rnot_number(i); + rnot_object(i); + rcompare_number_eq(i); + rcompare_number_stricteq(i); + rcompare_number_ne(i); + rcompare_number_stricteq(i); + rcompare_number_lt(i); + rcompare_number_le(i); + rcompare_number_gt(i); + rcompare_number_ge(i); + rcompare_string_eq(i); + rcompare_string_stricteq(i); + rcompare_string_ne(i); + rcompare_string_stricteq(i); + rcompare_string_lt(i); + rcompare_string_le(i); + rcompare_string_gt(i); + rcompare_string_ge(i); + rcompare_bigint_eq(i); + rcompare_bigint_stricteq(i); + rcompare_bigint_ne(i); + rcompare_bigint_stricteq(i); + rcompare_bigint_lt(i); + rcompare_bigint_le(i); + rcompare_bigint_gt(i); + rcompare_bigint_ge(i); + rconcat_string(i); + rconcat_number(i); + rstring_length(i); + rarguments_length_1(i); + rarguments_length_3(i, 0, 1); + rinline_arguments_length_1(i); + rinline_arguments_length_3(i, 0, 1); + rfloor_number(i); + rfloor_double(i); + rfloor_object(i); + rceil_number(i); + rceil_double(i); + rround_number(i); + rround_double(i); + rtrunc_number(i); + rtrunc_double(i); + rcharCodeAt(i); + rfrom_char_code(i); + rfrom_char_code_non_ascii(i); + rpow_number(i); + rpow_object(i); + rpowhalf_number(i); + rpowhalf_object(i); + rmin_number(i); + rmin_float(i); + rmin_object(i); + rmax_number(i); + rmax_float(i); + rmax_object(i); + rabs_number(i); + rabs_object(i); + rsqrt_number(i); + rsqrt_float(i); + rsqrt_object(i); + ratan2_number(i); + ratan2_object(i); + if (!warp) { + // TODO(Warp): Warp doesn't currently support a compiler constraints like + // system to elide checks for modified built-ins. Additionally this test + // requires to inline the self-hosted function and to elide all type + // checks before the StringSplitString intrinsic is called. + rstr_split(i); + } + rregexp_exec(i); + rregexp_y_exec(i); + rregexp_y_literal_exec(i); + rregexp_g_exec(i); + rregexp_g_literal_exec(i); + rregexp_i_exec(i); + rregexp_i_literal_exec(i); + rregexp_m_exec(i); + rregexp_m_literal_exec(i); + rregexp_test(i); + rregexp_y_test(i); + rregexp_y_literal_test(i); + rregexp_g_test(i); + rregexp_g_literal_test(i); + rregexp_i_test(i); + rregexp_i_literal_test(i); + rregexp_m_test(i); + rregexp_m_literal_test(i); + rregexp_replace(i); + rregexp_y_replace(i); + rregexp_y_literal_replace(i); + rregexp_g_replace(i); + rregexp_g_literal_replace(i); + rregexp_i_replace(i); + rregexp_i_literal_replace(i); + rregexp_m_replace(i); + rregexp_m_literal_replace(i); + rstring_replace(i); + rstring_replace_y(i); + rstring_replace_g(i); + rstring_slice(i); + rstring_substring(i); + rtypeof(i); + rtodouble_value(i); + rtodouble_number(i); + rtofloat32_number(i); + rtofloat32_object(i); + rtrunc_to_int32_number(i); + rtrunc_to_int32_object(i); + if (!warp) { + // TODO(Warp): Bitwise operations on strings not optimised in Warp. + rtrunc_to_int32_string(i); + } + rhypot_number_2args(i); + rhypot_number_3args(i); + rhypot_number_4args(i); + rhypot_object_2args(i); + rhypot_object_3args(i); + rhypot_object_4args(i); + rrandom(i); + rsin_number(i); + rsin_object(i); + rlog_number(i); + rlog_object(i); + rcos_number(i); + rexp_number(i); + rtan_number(i); + racos_number(i); + rasin_number(i); + ratan_number(i); + rlog10_number(i); + rlog2_number(i); + rlog1p_number(i); + rexpm1_number(i); + rcosh_number(i); + rsinh_number(i); + rtanh_number(i); + racosh_number(i); + rasinh_number(i); + ratanh_number(i); + rcbrt_number(i); + rsign_number(i); + rsign_double(i); + rbigintadd(BigInt(i)); + rbigintsub(BigInt(i)); + rbigintmul(BigInt(i)); + rbigintdiv(BigInt(i)); + rbigintmod(BigInt(i)); + rbigintpow(BigInt(i)); + rbigintinc(BigInt(i)); + rbigintdec(BigInt(i)); + rbigintneg(BigInt(i)); + rbigintbitand(BigInt(i)); + rbigintbitor(BigInt(i)); + rbigintbitxor(BigInt(i)); + rbigintbitnot(BigInt(i)); + rbigintlsh(BigInt(i)); + rbigintrsh(BigInt(i)); + rbigintasint(BigInt(i)); + rbigintasuint(BigInt(i)); + rnantozero_nan(i); + rnantozero_poszero(i); + rnantozero_negzero(i); +} + +// Test that we can refer multiple time to the same recover instruction, as well +// as chaining recover instructions. + +function alignedAlloc($size, $alignment) { + var $1 = $size + 4 | 0; + var $2 = $alignment - 1 | 0; + var $3 = $1 + $2 | 0; + var $4 = malloc($3); +} + +function malloc($bytes) { + var $189 = undefined; + var $198 = $189 + 8 | 0; +} + +for (i = 0; i < 50; i++) + alignedAlloc(608, 16); diff --git a/js/src/jit-test/tests/ion/dense-elem-write-barrier.js b/js/src/jit-test/tests/ion/dense-elem-write-barrier.js new file mode 100644 index 0000000000..79fda227da --- /dev/null +++ b/js/src/jit-test/tests/ion/dense-elem-write-barrier.js @@ -0,0 +1,22 @@ +var arr = []; +for (var i=0; i<20; i++) { + arr.push(new Int32Array(2000)); +} +arr.push([null, null]); + +function test(o, x) { + assertEq(o[0], x); +} + +function f() { + for (var i=0; i<3100; i++) { + var o = arr[i % arr.length]; + if (o.length > 10 || i > 2000) { + var val = (i > 3000 ? 1 : null); + o[0] = val; + if (o.length < 5) + test(o, val); + } + } +} +f(); diff --git a/js/src/jit-test/tests/ion/directEval.js b/js/src/jit-test/tests/ion/directEval.js new file mode 100644 index 0000000000..e9ba89d129 --- /dev/null +++ b/js/src/jit-test/tests/ion/directEval.js @@ -0,0 +1,10 @@ + +// test scope iteration when throwing from within an eval. +function testEvalThrow(x, y) { + x = 5; + for (var i in [1,2,3]) + eval("x += 5; if (i == 2) throw 0"); + assertEq(x, 10); +} +for (var i = 0; i < 5; i++) + try { testEvalThrow.call({}, 3); } catch (e) { assertEq(e, 0); } diff --git a/js/src/jit-test/tests/ion/div-by-constant-bug1555153.js b/js/src/jit-test/tests/ion/div-by-constant-bug1555153.js new file mode 100644 index 0000000000..b217f2cf4b --- /dev/null +++ b/js/src/jit-test/tests/ion/div-by-constant-bug1555153.js @@ -0,0 +1,5 @@ +x = [99999999999999999999999999, -(2 ** 53 - 2)]; +res = [0, 2 / 3]; +for (let i = 0; i < 2; ++i) { + assertEq((x[i] | 0) / 3, res[i]); +} diff --git a/js/src/jit-test/tests/ion/divmodself.js b/js/src/jit-test/tests/ion/divmodself.js new file mode 100644 index 0000000000..524d46d022 --- /dev/null +++ b/js/src/jit-test/tests/ion/divmodself.js @@ -0,0 +1,664 @@ +// |jit-test| --ion-eager + +// bug 944963 +function bug944963(x, y) { + (+(xy))(y % y) +} +for (var i = 0; i < 10; i++) { + try { + (function() { + bug944963(0, (~Math.fround(-8))) + })() + } catch (e) {} +} + +// bug 900437 +function bug900437() { + var x = 0.0; + for (var i = 0; i < 10; i++) + -("") >> (x / x); +} +bug900437(); +bug900437(); + +// bug 715460 +function f(x) { + var a = x; + return a / 10; +} +function g(x) { + var y = x + 1; + return y / y; +} +for (var i=0; i<10; i++) + assertEq(f(i * 10), i); +for (var i=0; i<10; i++) + assertEq(g(i), 1); + +// bug 939893 +function bug939893() { + bug_g(); +} +function bug_g() { + bug_h(undefined >>> 0, +undefined); +} +function bug_h(x) { + Math.max(x ? ((x / x) | 0) : 0); +} +for (var a = 0; a < 2; ++a) { + bug939893(); +} + +// bug 945860 +function bug945860(x) { + return (x % x); +} +for (var i = 0; i < 2; i++) { + try { + (function() { + assertEq(bug945860(1), 0); + })() + } catch (e) {} +} + +// Assorted tests. + +function sdiv_truncate(y) { + return (y / y)|0; +} +assertEq(sdiv_truncate(5), 1); +assertEq(sdiv_truncate(1), 1); +assertEq(sdiv_truncate(-1), 1); +assertEq(sdiv_truncate(0), 0); +assertEq(sdiv_truncate(-0), 0); +assertEq(sdiv_truncate(1.1), 1); +assertEq(sdiv_truncate(-1.1), 1); +assertEq(sdiv_truncate(Infinity), 0); +assertEq(sdiv_truncate(NaN), 0); +assertEq(sdiv_truncate(undefined), 0); +assertEq(sdiv_truncate(null), 0); + +function sdiv(y) { + return y / y; +} +assertEq(sdiv(5), 1); +assertEq(sdiv(1), 1); +assertEq(sdiv(-1), 1); +assertEq(sdiv(0), NaN); +assertEq(sdiv(-0), NaN); +assertEq(sdiv(1.1), 1); +assertEq(sdiv(-1.1), 1); +assertEq(sdiv(Infinity), NaN); +assertEq(sdiv(NaN), NaN); +assertEq(sdiv(undefined), NaN); +assertEq(sdiv(null), NaN); + +function udiv_truncate(y) { + var yu = y>>>0; + return (yu / yu)|0; +} +assertEq(udiv_truncate(5), 1); +assertEq(udiv_truncate(1), 1); +assertEq(udiv_truncate(-1), 1); +assertEq(udiv_truncate(0), 0); +assertEq(udiv_truncate(-0), 0); +assertEq(udiv_truncate(1.1), 1); +assertEq(udiv_truncate(-1.1), 1); +assertEq(udiv_truncate(Infinity), 0); +assertEq(udiv_truncate(NaN), 0); +assertEq(udiv_truncate(undefined), 0); +assertEq(udiv_truncate(null), 0); + +function shifted_udiv_truncate(y) { + var yu = y>>>1; + return (yu / yu)|0; +} +assertEq(shifted_udiv_truncate(5), 1); +assertEq(shifted_udiv_truncate(2), 1); +assertEq(shifted_udiv_truncate(1), 0); +assertEq(shifted_udiv_truncate(-1), 1); +assertEq(shifted_udiv_truncate(0), 0); +assertEq(shifted_udiv_truncate(-0), 0); +assertEq(shifted_udiv_truncate(1.1), 0); +assertEq(shifted_udiv_truncate(-1.1), 1); +assertEq(shifted_udiv_truncate(Infinity), 0); +assertEq(shifted_udiv_truncate(NaN), 0); +assertEq(shifted_udiv_truncate(undefined), 0); +assertEq(shifted_udiv_truncate(null), 0); + +function udiv(y) { + var yu = y>>>0; + return yu / yu; +} +assertEq(udiv(5), 1); +assertEq(udiv(1), 1); +assertEq(udiv(-1), 1); +assertEq(udiv(0), NaN); +assertEq(udiv(-0), NaN); +assertEq(udiv(1.1), 1); +assertEq(udiv(-1.1), 1); +assertEq(udiv(Infinity), NaN); +assertEq(udiv(NaN), NaN); +assertEq(udiv(undefined), NaN); +assertEq(udiv(null), NaN); + +function shifted_udiv(y) { + var yu = y>>>1; + return yu / yu; +} +assertEq(shifted_udiv(5), 1); +assertEq(shifted_udiv(2), 1); +assertEq(shifted_udiv(1), NaN); +assertEq(shifted_udiv(-1), 1); +assertEq(shifted_udiv(0), NaN); +assertEq(shifted_udiv(-0), NaN); +assertEq(shifted_udiv(1.1), NaN); +assertEq(shifted_udiv(-1.1), 1); +assertEq(shifted_udiv(Infinity), NaN); +assertEq(shifted_udiv(NaN), NaN); +assertEq(shifted_udiv(undefined), NaN); +assertEq(shifted_udiv(null), NaN); + +function smod_truncate(y) { + return (y % y)|0; +} +assertEq(smod_truncate(5), 0); +assertEq(smod_truncate(1), 0); +assertEq(smod_truncate(-1), 0); +assertEq(smod_truncate(0), 0); +assertEq(smod_truncate(-0), 0); +assertEq(smod_truncate(1.1), 0); +assertEq(smod_truncate(-1.1), 0); +assertEq(smod_truncate(Infinity), 0); +assertEq(smod_truncate(NaN), 0); +assertEq(smod_truncate(undefined), 0); +assertEq(smod_truncate(null), 0); + +function smod(y) { + return y % y; +} +assertEq(smod(5), 0); +assertEq(smod(1), 0); +assertEq(smod(-1), -0); +assertEq(smod(0), NaN); +assertEq(smod(-0), NaN); +assertEq(smod(1.1), 0); +assertEq(smod(-1.1), -0); +assertEq(smod(Infinity), NaN); +assertEq(smod(NaN), NaN); +assertEq(smod(undefined), NaN); +assertEq(smod(null), NaN); + +function umod_truncate(y) { + var yu = y>>>0; + return (yu % yu)|0; +} +assertEq(umod_truncate(5), 0); +assertEq(umod_truncate(1), 0); +assertEq(umod_truncate(-1), 0); +assertEq(umod_truncate(0), 0); +assertEq(umod_truncate(-0), 0); +assertEq(umod_truncate(1.1), 0); +assertEq(umod_truncate(-1.1), 0); +assertEq(umod_truncate(Infinity), 0); +assertEq(umod_truncate(NaN), 0); +assertEq(umod_truncate(undefined), 0); +assertEq(umod_truncate(null), 0); + +function shifted_umod_truncate(y) { + var yu = y>>>1; + return (yu % yu)|0; +} +assertEq(shifted_umod_truncate(5), 0); +assertEq(shifted_umod_truncate(2), 0); +assertEq(shifted_umod_truncate(1), 0); +assertEq(shifted_umod_truncate(-1), 0); +assertEq(shifted_umod_truncate(0), 0); +assertEq(shifted_umod_truncate(-0), 0); +assertEq(shifted_umod_truncate(1.1), 0); +assertEq(shifted_umod_truncate(-1.1), 0); +assertEq(shifted_umod_truncate(Infinity), 0); +assertEq(shifted_umod_truncate(NaN), 0); +assertEq(shifted_umod_truncate(undefined), 0); +assertEq(shifted_umod_truncate(null), 0); + +function umod(y) { + var yu = y>>>0; + return yu % yu; +} +assertEq(umod(5), 0); +assertEq(umod(1), 0); +assertEq(umod(-1), 0); +assertEq(umod(0), NaN); +assertEq(umod(-0), NaN); +assertEq(umod(1.1), 0); +assertEq(umod(-1.1), 0); +assertEq(umod(Infinity), NaN); +assertEq(umod(NaN), NaN); +assertEq(umod(undefined), NaN); +assertEq(umod(null), NaN); + +function shifted_umod(y) { + var yu = y>>>1; + return yu % yu; +} +assertEq(shifted_umod(5), 0); +assertEq(shifted_umod(2), 0); +assertEq(shifted_umod(1), NaN); +assertEq(shifted_umod(-1), 0); +assertEq(shifted_umod(0), NaN); +assertEq(shifted_umod(-0), NaN); +assertEq(shifted_umod(1.1), NaN); +assertEq(shifted_umod(-1.1), 0); +assertEq(shifted_umod(Infinity), NaN); +assertEq(shifted_umod(NaN), NaN); +assertEq(shifted_umod(undefined), NaN); +assertEq(shifted_umod(null), NaN); + +function sdiv_truncate_nonzero(y) { + if (y == 0) return -202; + return (y / y)|0; +} +assertEq(sdiv_truncate_nonzero(5), 1); +assertEq(sdiv_truncate_nonzero(1), 1); +assertEq(sdiv_truncate_nonzero(-1), 1); +assertEq(sdiv_truncate_nonzero(0), -202); +assertEq(sdiv_truncate_nonzero(-0), -202); +assertEq(sdiv_truncate_nonzero(1.1), 1); +assertEq(sdiv_truncate_nonzero(-1.1), 1); +assertEq(sdiv_truncate_nonzero(Infinity), 0); +assertEq(sdiv_truncate_nonzero(NaN), 0); +assertEq(sdiv_truncate_nonzero(undefined), 0); +assertEq(sdiv_truncate_nonzero(null), 0); + +function sdiv_nonzero(y) { + if (y == 0) return -202; + return y / y; +} +assertEq(sdiv_nonzero(5), 1); +assertEq(sdiv_nonzero(1), 1); +assertEq(sdiv_nonzero(-1), 1); +assertEq(sdiv_nonzero(0), -202); +assertEq(sdiv_nonzero(-0), -202); +assertEq(sdiv_nonzero(1.1), 1); +assertEq(sdiv_nonzero(-1.1), 1); +assertEq(sdiv_nonzero(Infinity), NaN); +assertEq(sdiv_nonzero(NaN), NaN); +assertEq(sdiv_nonzero(undefined), NaN); +assertEq(sdiv_nonzero(null), NaN); + +function udiv_truncate_nonzero(y) { + var yu = y>>>0; + if (yu == 0) return -202; + return (yu / yu)|0; +} +assertEq(udiv_truncate_nonzero(5), 1); +assertEq(udiv_truncate_nonzero(1), 1); +assertEq(udiv_truncate_nonzero(-1), 1); +assertEq(udiv_truncate_nonzero(0), -202); +assertEq(udiv_truncate_nonzero(-0), -202); +assertEq(udiv_truncate_nonzero(1.1), 1); +assertEq(udiv_truncate_nonzero(-1.1), 1); +assertEq(udiv_truncate_nonzero(Infinity), -202); +assertEq(udiv_truncate_nonzero(NaN), -202); +assertEq(udiv_truncate_nonzero(undefined), -202); +assertEq(udiv_truncate_nonzero(null), -202); + +function shifted_udiv_truncate_nonzero(y) { + var yu = y>>>1; + if (yu == 0) return -202; + return (yu / yu)|0; +} +assertEq(shifted_udiv_truncate_nonzero(5), 1); +assertEq(shifted_udiv_truncate_nonzero(2), 1); +assertEq(shifted_udiv_truncate_nonzero(1), -202); +assertEq(shifted_udiv_truncate_nonzero(-1), 1); +assertEq(shifted_udiv_truncate_nonzero(0), -202); +assertEq(shifted_udiv_truncate_nonzero(-0), -202); +assertEq(shifted_udiv_truncate_nonzero(1.1), -202); +assertEq(shifted_udiv_truncate_nonzero(-1.1), 1); +assertEq(shifted_udiv_truncate_nonzero(Infinity), -202); +assertEq(shifted_udiv_truncate_nonzero(NaN), -202); +assertEq(shifted_udiv_truncate_nonzero(undefined), -202); +assertEq(shifted_udiv_truncate_nonzero(null), -202); + +function udiv_nonzero(y) { + var yu = y>>>0; + if (yu == 0) return -202; + return yu / yu; +} +assertEq(udiv_nonzero(5), 1); +assertEq(udiv_nonzero(1), 1); +assertEq(udiv_nonzero(-1), 1); +assertEq(udiv_nonzero(0), -202); +assertEq(udiv_nonzero(-0), -202); +assertEq(udiv_nonzero(1.1), 1); +assertEq(udiv_nonzero(-1.1), 1); +assertEq(udiv_nonzero(Infinity), -202); +assertEq(udiv_nonzero(NaN), -202); +assertEq(udiv_nonzero(undefined), -202); +assertEq(udiv_nonzero(null), -202); + +function shifted_udiv_nonzero(y) { + var yu = y>>>1; + if (yu == 0) return -202; + return yu / yu; +} +assertEq(shifted_udiv_nonzero(5), 1); +assertEq(shifted_udiv_nonzero(2), 1); +assertEq(shifted_udiv_nonzero(1), -202); +assertEq(shifted_udiv_nonzero(-1), 1); +assertEq(shifted_udiv_nonzero(0), -202); +assertEq(shifted_udiv_nonzero(-0), -202); +assertEq(shifted_udiv_nonzero(1.1), -202); +assertEq(shifted_udiv_nonzero(-1.1), 1); +assertEq(shifted_udiv_nonzero(Infinity), -202); +assertEq(shifted_udiv_nonzero(NaN), -202); +assertEq(shifted_udiv_nonzero(undefined), -202); +assertEq(shifted_udiv_nonzero(null), -202); + +function smod_truncate_nonzero(y) { + if (y == 0) return -202; + return (y % y)|0; +} +assertEq(smod_truncate_nonzero(5), 0); +assertEq(smod_truncate_nonzero(1), 0); +assertEq(smod_truncate_nonzero(-1), 0); +assertEq(smod_truncate_nonzero(0), -202); +assertEq(smod_truncate_nonzero(-0), -202); +assertEq(smod_truncate_nonzero(1.1), 0); +assertEq(smod_truncate_nonzero(-1.1), 0); +assertEq(smod_truncate_nonzero(Infinity), 0); +assertEq(smod_truncate_nonzero(NaN), 0); +assertEq(smod_truncate_nonzero(undefined), 0); +assertEq(smod_truncate_nonzero(null), 0); + +function smod_nonzero(y) { + if (y == 0) return -202; + return y % y; +} +assertEq(smod_nonzero(5), 0); +assertEq(smod_nonzero(1), 0); +assertEq(smod_nonzero(-1), -0); +assertEq(smod_nonzero(0), -202); +assertEq(smod_nonzero(-0), -202); +assertEq(smod_nonzero(1.1), 0); +assertEq(smod_nonzero(-1.1), -0); +assertEq(smod_nonzero(Infinity), NaN); +assertEq(smod_nonzero(NaN), NaN); +assertEq(smod_nonzero(undefined), NaN); +assertEq(smod_nonzero(null), NaN); + +function umod_truncate_nonzero(y) { + var yu = y>>>0; + if (yu == 0) return -202; + return (yu % yu)|0; +} +assertEq(umod_truncate_nonzero(5), 0); +assertEq(umod_truncate_nonzero(1), 0); +assertEq(umod_truncate_nonzero(-1), 0); +assertEq(umod_truncate_nonzero(0), -202); +assertEq(umod_truncate_nonzero(-0), -202); +assertEq(umod_truncate_nonzero(1.1), 0); +assertEq(umod_truncate_nonzero(-1.1), 0); +assertEq(umod_truncate_nonzero(Infinity), -202); +assertEq(umod_truncate_nonzero(NaN), -202); +assertEq(umod_truncate_nonzero(undefined), -202); +assertEq(umod_truncate_nonzero(null), -202); + +function shifted_umod_truncate_nonzero(y) { + var yu = y>>>1; + if (yu == 0) return -202; + return (yu % yu)|0; +} +assertEq(shifted_umod_truncate_nonzero(5), 0); +assertEq(shifted_umod_truncate_nonzero(2), 0); +assertEq(shifted_umod_truncate_nonzero(1), -202); +assertEq(shifted_umod_truncate_nonzero(-1), 0); +assertEq(shifted_umod_truncate_nonzero(0), -202); +assertEq(shifted_umod_truncate_nonzero(-0), -202); +assertEq(shifted_umod_truncate_nonzero(1.1), -202); +assertEq(shifted_umod_truncate_nonzero(-1.1), 0); +assertEq(shifted_umod_truncate_nonzero(Infinity), -202); +assertEq(shifted_umod_truncate_nonzero(NaN), -202); +assertEq(shifted_umod_truncate_nonzero(undefined), -202); +assertEq(shifted_umod_truncate_nonzero(null), -202); + +function umod_nonzero(y) { + var yu = y>>>0; + if (yu == 0) return -202; + return yu % yu; +} +assertEq(umod_nonzero(5), 0); +assertEq(umod_nonzero(1), 0); +assertEq(umod_nonzero(-1), 0); +assertEq(umod_nonzero(0), -202); +assertEq(umod_nonzero(-0), -202); +assertEq(umod_nonzero(1.1), 0); +assertEq(umod_nonzero(-1.1), 0); +assertEq(umod_nonzero(Infinity), -202); +assertEq(umod_nonzero(NaN), -202); +assertEq(umod_nonzero(undefined), -202); +assertEq(umod_nonzero(null), -202); + +function shifted_umod_nonzero(y) { + var yu = y>>>1; + if (yu == 0) return -202; + return yu % yu; +} +assertEq(shifted_umod_nonzero(5), 0); +assertEq(shifted_umod_nonzero(2), 0); +assertEq(shifted_umod_nonzero(1), -202); +assertEq(shifted_umod_nonzero(-1), 0); +assertEq(shifted_umod_nonzero(0), -202); +assertEq(shifted_umod_nonzero(-0), -202); +assertEq(shifted_umod_nonzero(1.1), -202); +assertEq(shifted_umod_nonzero(-1.1), 0); +assertEq(shifted_umod_nonzero(Infinity), -202); +assertEq(shifted_umod_nonzero(NaN), -202); +assertEq(shifted_umod_nonzero(undefined), -202); +assertEq(shifted_umod_nonzero(null), -202); + +function sdiv_truncate_positive(y) { + if (y <= 0) return -202; + return (y / y)|0; +} +assertEq(sdiv_truncate_positive(5), 1); +assertEq(sdiv_truncate_positive(1), 1); +assertEq(sdiv_truncate_positive(-1), -202); +assertEq(sdiv_truncate_positive(0), -202); +assertEq(sdiv_truncate_positive(-0), -202); +assertEq(sdiv_truncate_positive(1.1), 1); +assertEq(sdiv_truncate_positive(-1.1), -202); +assertEq(sdiv_truncate_positive(Infinity), 0); +assertEq(sdiv_truncate_positive(NaN), 0); +assertEq(sdiv_truncate_positive(undefined), 0); +assertEq(sdiv_truncate_positive(null), -202); + +function sdiv_positive(y) { + if (y <= 0) return -202; + return y / y; +} +assertEq(sdiv_positive(5), 1); +assertEq(sdiv_positive(1), 1); +assertEq(sdiv_positive(-1), -202); +assertEq(sdiv_positive(0), -202); +assertEq(sdiv_positive(-0), -202); +assertEq(sdiv_positive(1.1), 1); +assertEq(sdiv_positive(-1.1), -202); +assertEq(sdiv_positive(Infinity), NaN); +assertEq(sdiv_positive(NaN), NaN); +assertEq(sdiv_positive(undefined), NaN); +assertEq(sdiv_positive(null), -202); + +function udiv_truncate_positive(y) { + var yu = y>>>0; + if (yu <= 0) return -202; + return (yu / yu)|0; +} +assertEq(udiv_truncate_positive(5), 1); +assertEq(udiv_truncate_positive(1), 1); +assertEq(udiv_truncate_positive(-1), 1); +assertEq(udiv_truncate_positive(0), -202); +assertEq(udiv_truncate_positive(-0), -202); +assertEq(udiv_truncate_positive(1.1), 1); +assertEq(udiv_truncate_positive(-1.1), 1); +assertEq(udiv_truncate_positive(Infinity), -202); +assertEq(udiv_truncate_positive(NaN), -202); +assertEq(udiv_truncate_positive(undefined), -202); +assertEq(udiv_truncate_positive(null), -202); + +function shifted_udiv_truncate_positive(y) { + var yu = y>>>1; + if (yu <= 0) return -202; + return (yu / yu)|0; +} +assertEq(shifted_udiv_truncate_positive(5), 1); +assertEq(shifted_udiv_truncate_positive(2), 1); +assertEq(shifted_udiv_truncate_positive(1), -202); +assertEq(shifted_udiv_truncate_positive(-1), 1); +assertEq(shifted_udiv_truncate_positive(0), -202); +assertEq(shifted_udiv_truncate_positive(-0), -202); +assertEq(shifted_udiv_truncate_positive(1.1), -202); +assertEq(shifted_udiv_truncate_positive(-1.1), 1); +assertEq(shifted_udiv_truncate_positive(Infinity), -202); +assertEq(shifted_udiv_truncate_positive(NaN), -202); +assertEq(shifted_udiv_truncate_positive(undefined), -202); +assertEq(shifted_udiv_truncate_positive(null), -202); + +function udiv_positive(y) { + var yu = y>>>0; + if (yu <= 0) return -202; + return yu / yu; +} +assertEq(udiv_positive(5), 1); +assertEq(udiv_positive(1), 1); +assertEq(udiv_positive(-1), 1); +assertEq(udiv_positive(0), -202); +assertEq(udiv_positive(-0), -202); +assertEq(udiv_positive(1.1), 1); +assertEq(udiv_positive(-1.1), 1); +assertEq(udiv_positive(Infinity), -202); +assertEq(udiv_positive(NaN), -202); +assertEq(udiv_positive(undefined), -202); +assertEq(udiv_positive(null), -202); + +function shifted_udiv_positive(y) { + var yu = y>>>1; + if (yu <= 0) return -202; + return yu / yu; +} +assertEq(shifted_udiv_positive(5), 1); +assertEq(shifted_udiv_positive(2), 1); +assertEq(shifted_udiv_positive(1), -202); +assertEq(shifted_udiv_positive(-1), 1); +assertEq(shifted_udiv_positive(0), -202); +assertEq(shifted_udiv_positive(-0), -202); +assertEq(shifted_udiv_positive(1.1), -202); +assertEq(shifted_udiv_positive(-1.1), 1); +assertEq(shifted_udiv_positive(Infinity), -202); +assertEq(shifted_udiv_positive(NaN), -202); +assertEq(shifted_udiv_positive(undefined), -202); +assertEq(shifted_udiv_positive(null), -202); + +function smod_truncate_positive(y) { + if (y <= 0) return -202; + return (y % y)|0; +} +assertEq(smod_truncate_positive(5), 0); +assertEq(smod_truncate_positive(1), 0); +assertEq(smod_truncate_positive(-1), -202); +assertEq(smod_truncate_positive(0), -202); +assertEq(smod_truncate_positive(-0), -202); +assertEq(smod_truncate_positive(1.1), 0); +assertEq(smod_truncate_positive(-1.1), -202); +assertEq(smod_truncate_positive(Infinity), 0); +assertEq(smod_truncate_positive(NaN), 0); +assertEq(smod_truncate_positive(undefined), 0); +assertEq(smod_truncate_positive(null), -202); + +function smod_positive(y) { + if (y <= 0) return -202; + return y % y; +} +assertEq(smod_positive(5), 0); +assertEq(smod_positive(1), 0); +assertEq(smod_positive(-1), -202); +assertEq(smod_positive(0), -202); +assertEq(smod_positive(-0), -202); +assertEq(smod_positive(1.1), 0); +assertEq(smod_positive(-1.1), -202); +assertEq(smod_positive(Infinity), NaN); +assertEq(smod_positive(NaN), NaN); +assertEq(smod_positive(undefined), NaN); +assertEq(smod_positive(null), -202); + +function umod_truncate_positive(y) { + var yu = y>>>0; + if (yu <= 0) return -202; + return (yu % yu)|0; +} +assertEq(umod_truncate_positive(5), 0); +assertEq(umod_truncate_positive(1), 0); +assertEq(umod_truncate_positive(-1), 0); +assertEq(umod_truncate_positive(0), -202); +assertEq(umod_truncate_positive(-0), -202); +assertEq(umod_truncate_positive(1.1), 0); +assertEq(umod_truncate_positive(-1.1), 0); +assertEq(umod_truncate_positive(Infinity), -202); +assertEq(umod_truncate_positive(NaN), -202); +assertEq(umod_truncate_positive(undefined), -202); +assertEq(umod_truncate_positive(null), -202); + +function shifted_umod_truncate_positive(y) { + var yu = y>>>1; + if (yu <= 0) return -202; + return (yu % yu)|0; +} +assertEq(shifted_umod_truncate_positive(5), 0); +assertEq(shifted_umod_truncate_positive(2), 0); +assertEq(shifted_umod_truncate_positive(1), -202); +assertEq(shifted_umod_truncate_positive(-1), 0); +assertEq(shifted_umod_truncate_positive(0), -202); +assertEq(shifted_umod_truncate_positive(-0), -202); +assertEq(shifted_umod_truncate_positive(1.1), -202); +assertEq(shifted_umod_truncate_positive(-1.1), 0); +assertEq(shifted_umod_truncate_positive(Infinity), -202); +assertEq(shifted_umod_truncate_positive(NaN), -202); +assertEq(shifted_umod_truncate_positive(undefined), -202); +assertEq(shifted_umod_truncate_positive(null), -202); + +function umod_positive(y) { + var yu = y>>>0; + if (yu <= 0) return -202; + return yu % yu; +} +assertEq(umod_positive(5), 0); +assertEq(umod_positive(1), 0); +assertEq(umod_positive(-1), 0); +assertEq(umod_positive(0), -202); +assertEq(umod_positive(-0), -202); +assertEq(umod_positive(1.1), 0); +assertEq(umod_positive(-1.1), 0); +assertEq(umod_positive(Infinity), -202); +assertEq(umod_positive(NaN), -202); +assertEq(umod_positive(undefined), -202); +assertEq(umod_positive(null), -202); + +function shifted_umod_positive(y) { + var yu = y>>>1; + if (yu <= 0) return -202; + return yu % yu; +} +assertEq(shifted_umod_positive(5), 0); +assertEq(shifted_umod_positive(2), 0); +assertEq(shifted_umod_positive(1), -202); +assertEq(shifted_umod_positive(-1), 0); +assertEq(shifted_umod_positive(0), -202); +assertEq(shifted_umod_positive(-0), -202); +assertEq(shifted_umod_positive(1.1), -202); +assertEq(shifted_umod_positive(-1.1), 0); +assertEq(shifted_umod_positive(Infinity), -202); +assertEq(shifted_umod_positive(NaN), -202); +assertEq(shifted_umod_positive(undefined), -202); +assertEq(shifted_umod_positive(null), -202); diff --git a/js/src/jit-test/tests/ion/double-array-loop-phi.js b/js/src/jit-test/tests/ion/double-array-loop-phi.js new file mode 100644 index 0000000000..b12a9b5f37 --- /dev/null +++ b/js/src/jit-test/tests/ion/double-array-loop-phi.js @@ -0,0 +1,11 @@ +function f() { + for (var i = 0; i < 600; i++) { + var arr = [1.1, ([...[]], 2.2), i]; + for (var j = 0; j < 2; j++) { + var idx = j === 1 ? 2 : 0; + var exp = j === 1 ? i + 1 : 2.1; + assertEq(arr[idx] + 1, exp); + } + } +} +f(); diff --git a/js/src/jit-test/tests/ion/doubleArrays.js b/js/src/jit-test/tests/ion/doubleArrays.js new file mode 100644 index 0000000000..4622c3f29e --- /dev/null +++ b/js/src/jit-test/tests/ion/doubleArrays.js @@ -0,0 +1,51 @@ + +function testPushConvert() { + var x = []; + for (var i = 0; i < 10; i++) + x.push(i + .5); + for (var i = 0; i < 5; i++) + x.push(i); + var res = 0; + for (var i = 0; i < x.length; i++) + res += x[i]; + assertEq(res, 60); +} +testPushConvert(); + +function testArrayInitializer() { + var x = [.5,1.5,2.5,3]; + var res = 0; + for (var i = 0; i < x.length; i++) + res += x[i]; + assertEq(res, 7.5); +} +for (var i = 0; i < 5; i++) + testArrayInitializer(); + +function testArrayConstructor() { + var x = Array(.5,1.5,2.5,3); + var res = 0; + for (var i = 0; i < x.length; i++) + res += x[i]; + assertEq(res, 7.5); +} +for (var i = 0; i < 5; i++) + testArrayConstructor(); + +function addInt(a) { + // inhibit ion + try { + a[0] = 10; + } catch (e) {} +} + +function testBaseline() { + var x = Array(.5,1.5,2.5,3); + addInt(x); + var res = 0; + for (var i = 0; i < x.length; i++) + res += x[i]; + assertEq(res, 17); +} +for (var i = 0; i < 5; i++) + testBaseline(); diff --git a/js/src/jit-test/tests/ion/doubleComparisons.js b/js/src/jit-test/tests/ion/doubleComparisons.js new file mode 100644 index 0000000000..e9f78382a6 --- /dev/null +++ b/js/src/jit-test/tests/ion/doubleComparisons.js @@ -0,0 +1,88 @@ + +function gen_f(x) { + var f = "{\n" + + " var x = " + x + ";\n" + + " if (x)\n" + + " return true;\n" + + " return false;\n" + + "}"; + return new Function(f); +} + +function run_f(x) { + return gen_f(x)(); +} + +function gen_k(x, op, y) { + var f = "{\n" + + " var x = " + x + ";\n" + + " var y = " + y + ";\n" + + " if (x " + op + " y)\n" + + " return true;\n" + + " return false;\n" + + "}"; + return new Function(f); +} + +function run_k(x, op, y) { + return gen_k(x, op, y)(); +} + +function gen_r(x, op, y) { + var f = "{\n" + + " var x = " + x + ";\n" + + " var y = " + y + ";\n" + + " return x " + op + " y;\n" + + "}"; + return new Function(f); +} + +function run_r(x, op, y) { + return gen_r(x, op, y)(); +} + +assertEq(run_f("1 / 0"), true); +assertEq(run_f("0 / 0"), false); +assertEq(run_f("-0"), false); +assertEq(run_f(1.3), true); + +// Ordered results. +assertEq(run_k(1.3, ">", 2.3), false); +assertEq(run_k(2.3, ">", 2.3), false); +assertEq(run_k(2.4, ">", 2.3), true); +assertEq(run_k(1.3, ">=", 2.3), false); +assertEq(run_k(2.3, ">=", 2.3), true); +assertEq(run_k(2.4, ">=", 2.3), true); +assertEq(run_k(1.3, "<", 2.3), true); +assertEq(run_k(2.3, "<", 2.3), false); +assertEq(run_k(2.4, "<", 2.3), false); +assertEq(run_k(1.3, "<", 2.3), true); +assertEq(run_k(2.3, "<=", 2.3), true); +assertEq(run_k(2.4, "<", 2.3), false); + +// Unordered results. +assertEq(run_k("NaN", "<", 2.5), false); +assertEq(run_k("NaN", "<=", 2.5), false); +assertEq(run_k("NaN", ">", 2.5), false); +assertEq(run_k("NaN", ">=", 2.5), false); + +// Ordered results. +assertEq(run_r(1.3, ">", 2.3), false); +assertEq(run_r(2.3, ">", 2.3), false); +assertEq(run_r(2.4, ">", 2.3), true); +assertEq(run_r(1.3, ">=", 2.3), false); +assertEq(run_r(2.3, ">=", 2.3), true); +assertEq(run_r(2.4, ">=", 2.3), true); +assertEq(run_r(1.3, "<", 2.3), true); +assertEq(run_r(2.3, "<", 2.3), false); +assertEq(run_r(2.4, "<", 2.3), false); +assertEq(run_r(1.3, "<", 2.3), true); +assertEq(run_r(2.3, "<=", 2.3), true); +assertEq(run_r(2.4, "<", 2.3), false); + +// Unordered results. +assertEq(run_r("NaN", "<", 2.5), false); +assertEq(run_r("NaN", "<=", 2.5), false); +assertEq(run_r("NaN", ">", 2.5), false); +assertEq(run_r("NaN", ">=", 2.5), false); + diff --git a/js/src/jit-test/tests/ion/eliminate-type-barrier.js b/js/src/jit-test/tests/ion/eliminate-type-barrier.js new file mode 100644 index 0000000000..75cc9a200a --- /dev/null +++ b/js/src/jit-test/tests/ion/eliminate-type-barrier.js @@ -0,0 +1,41 @@ +function foo(a) { + var y = 0; + for (var i = 0; i < 10; i++) { + var x = a[i]; + z = x.f; + if (x.h != null) + y = x.f.g; + } + return y; +} + +function foo2(a) { + var y = 0; + for (var i = 0; i < 10; i++) { + var x = a[i]; + if (x.f !== undefined) { + if (x.h != null) + y = x.f.g; + } + } + return y; +} + +a = []; +for (var i = 0; i < 10; i++) + a[i] = {f:null, h:null}; +for (var i = 0; i < 10; i++) { + a[i].f = {g:0}; + a[i].h = {}; +} +var q = a[0].h; +a[0].f = null; +a[0].h = null; + +foo(a); +foo2(a); + +a[0].h = q; + +try { foo(a); } catch (e) {} +try { foo2(a); } catch (e) {} diff --git a/js/src/jit-test/tests/ion/eliminate-unreachable-1.js b/js/src/jit-test/tests/ion/eliminate-unreachable-1.js new file mode 100644 index 0000000000..2cece911ac --- /dev/null +++ b/js/src/jit-test/tests/ion/eliminate-unreachable-1.js @@ -0,0 +1,32 @@ +// Test for one annoying case of the EliminateUnreachableCode +// optimization. Here the dominators change and also phis are +// eliminated. + +function test1(v) { + var i = 0; + if (v) { + if (v) { + i += 1; + } else { + i += 10; + } + i += 100; + } else { + if (v) { + i += 1000; + } else { + i += 10000; + } + i += 100000; + } + i += 1000000; + return i; +} + +function test() { + assertEq(test1(true), 1000101); + assertEq(test1(false), 1110000); +} + +for (var i = 0; i < 100; i++) + test(); diff --git a/js/src/jit-test/tests/ion/eliminate-unreachable-2.js b/js/src/jit-test/tests/ion/eliminate-unreachable-2.js new file mode 100644 index 0000000000..3671e6399b --- /dev/null +++ b/js/src/jit-test/tests/ion/eliminate-unreachable-2.js @@ -0,0 +1,28 @@ +// Test for one annoying case of the EliminateUnreachableCode +// optimization. Here the dominator of print("Goodbye") changes to be +// the print("Hello") after optimization. + +function test1(v) { + if (v) { + if (v) { + assertEq(v, v); + } else { + assertEq(0, 1); + } + } else { + if (v) { + assertEq(0, 1); + } else { + assertEq(v, v); + } + } + assertEq(v, v); +} + +function test() { + test1(true); + test1(false); +} + +for (var i = 0; i < 100; i++) + test(); diff --git a/js/src/jit-test/tests/ion/entryOverflowBailout.js b/js/src/jit-test/tests/ion/entryOverflowBailout.js new file mode 100644 index 0000000000..bae6301810 --- /dev/null +++ b/js/src/jit-test/tests/ion/entryOverflowBailout.js @@ -0,0 +1,220 @@ +var o; +var f1; +var counter = 0; + +function f2(a) { + bailout(); + return f2.arguments; +}; + +var restartCode = "counter = 0; " + f2.toString(); + +// We need to reevaluate this function everytime, otherwise it is flagged as +// having an argument object and it would not be re-entered. + +// This test case is checking that f.arguments reflects the overflow or the +// underflow of arguments after a bailout. Due to the way bailouts are +// recovered we need to check for the intial frame and for any other JS frame +// below. +// +// To produce a JSFrame, we need to avoid the 'Hot' counters of f1 to be the +// same as f2, because IonMonkey will try to inline f2 in f1, and not +// compiling/calling f2 separately. This explain why we ignore the 5 first call +// of f1 by returning immediately. +// +// Bailouts are caused by calling an object function, which is expected to be a +// function by IonMonkey. So bailout() cause a bailout in the currently +// compiled function. +// +// To avoid any preventive effect to re-enter f2, we re-evaluate it before every +// test. + +// Check bailouts of the initial frame. + +eval(restartCode); +while (counter++ < 50) { + o = f2(); + assertEq(o.length, 0); +} + +eval(restartCode); +while (counter++ < 50) { + o = f2(21); + assertEq(o.length, 1); + assertEq(o[0], 21); +} + +eval(restartCode); +while (counter++ < 50) { + o = f2(21,42); + assertEq(o.length, 2); + assertEq(o[0], 21); + assertEq(o[1], 42); +} + +// 100 arguments. +eval(restartCode); +while (counter++ < 50) { + o = f2(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9); + assertEq(o.length, 100); + for (var i in o) + assertEq(o[i], i % 10); +} + +// 200 arguments. +eval(restartCode); +while (counter++ < 50) { + o = f2(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9); + assertEq(o.length, 200); + for (var i in o) + assertEq(o[i], i % 10); +} + +// 300 arguments. +eval(restartCode); +while (counter++ < 50) { + o = f2(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9); + assertEq(o.length, 300); + for (var i in o) + assertEq(o[i], i % 10); +} + +// Check bailouts of one frame which is not the initial frame. + +eval(restartCode); +f1 = function() { + if (counter < 5) return 0; + return f2(); +}; +while (counter++ < 50) { + o = f1(); + if (counter < 5) continue; + assertEq(o.length, 0); +} + +eval(restartCode); +f1 = function() { + if (counter < 5) return 0; + return f2(21); +}; +while (counter++ < 50) { + o = f1(); + if (counter < 5) continue; + assertEq(o.length, 1); + assertEq(o[0], 21); +} + +eval(restartCode); +f1 = function() { + if (counter < 5) return 0; + return f2(21,42); +}; +while (counter++ < 50) { + o = f1(); + if (counter < 5) continue; + assertEq(o.length, 2); + assertEq(o[0], 21); + assertEq(o[1], 42); +} + +// 100 arguments. +eval(restartCode); +f1 = function() { + if (counter < 5) return 0; + return f2(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9); +}; +while (counter++ < 50) { + o = f1(); + if (counter < 5) continue; + assertEq(o.length, 100); + for (var i in o) + assertEq(o[i], i % 10); +} + +// 200 arguments. +eval(restartCode); +f1 = function() { + if (counter < 5) return 0; + return f2(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9); +}; +while (counter++ < 50) { + o = f1(); + if (counter < 5) continue; + assertEq(o.length, 200); + for (var i in o) + assertEq(o[i], i % 10); +} + +// 300 arguments. +eval(restartCode); +f1 = function() { + if (counter < 5) return 0; + return f2(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, + 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9); +}; +while (counter++ < 500) { + o = f1(); + if (counter < 5) continue; + assertEq(o.length, 300); + for (var i in o) + assertEq(o[i], i % 10); +} diff --git a/js/src/jit-test/tests/ion/eval-neg0.js b/js/src/jit-test/tests/ion/eval-neg0.js new file mode 100644 index 0000000000..14782614c2 --- /dev/null +++ b/js/src/jit-test/tests/ion/eval-neg0.js @@ -0,0 +1,6 @@ +function f() { + for (var i = 0; i < 100; i++) + assertEq(eval(-0), -0); +} + +f(); diff --git a/js/src/jit-test/tests/ion/evalCallingName.js b/js/src/jit-test/tests/ion/evalCallingName.js new file mode 100644 index 0000000000..c2ca3ccef7 --- /dev/null +++ b/js/src/jit-test/tests/ion/evalCallingName.js @@ -0,0 +1,43 @@ + +function a() { + return "a"; +} +function b() { + return "b"; +} +function c() { + return "c"; +} +var names = ["a","b","c"]; + +function foo(name) { + return eval(name + "()"); +} + +for (var i = 0; i < names.length; i++) + assertEq(foo(names[i]), names[i]); + +// Test bailout due to bad name passed to eval. +try { + foo("missing"); +} catch (e) { + assertEq(/missing/.test(e), true); +} + +function bar(name) { + return eval(name + "()"); +} + +for (var i = 0; i < names.length; i++) + assertEq(bar(names[i]), names[i]); + +function recursion() { + return bar({ valueOf: function() { return "gotcha"; }}); +} + +function gotcha() { + return "gotcha"; +} + +// Test invalidation within call made after name lookup. +assertEq(bar("recursion"), "gotcha"); diff --git a/js/src/jit-test/tests/ion/exc-bailout-double-reg.js b/js/src/jit-test/tests/ion/exc-bailout-double-reg.js new file mode 100644 index 0000000000..62f5a95433 --- /dev/null +++ b/js/src/jit-test/tests/ion/exc-bailout-double-reg.js @@ -0,0 +1,24 @@ +var x = 0; +var o1 = {x: 1}; +var o2 = {}; +for (var o of [o1, o2]) { + Object.defineProperty(o, "thrower", {get: function() { + if (x++ > 1900) { + throw "error"; + } + }}); +} +function f() { + var res = 0; + try { + for (var i = 0; i < 2000; i++) { + res = Math.abs(i - 123456.7); + var o = (i & 1) ? o1 : o2; + o.thrower; + res++; + } + } catch(e) {} + assertEq(res, 121555.7); + return res; +} +f(); diff --git a/js/src/jit-test/tests/ion/exc-bailout-float32-reg.js b/js/src/jit-test/tests/ion/exc-bailout-float32-reg.js new file mode 100644 index 0000000000..640eebc7f3 --- /dev/null +++ b/js/src/jit-test/tests/ion/exc-bailout-float32-reg.js @@ -0,0 +1,24 @@ +var x = 0; +var o1 = {x: 1}; +var o2 = {}; +for (var o of [o1, o2]) { + Object.defineProperty(o, "thrower", {get: function() { + if (x++ > 1900) { + throw "error"; + } + }}); +} +function f() { + var res = 0; + try { + for (var i = 0; i < 2000; i++) { + res = Math.fround(i - 123456.7); + var o = (i & 1) ? o1 : o2; + o.thrower; + res++; + } + } catch(e) {} + assertEq(res, -121555.703125); + return res; +} +f(); diff --git a/js/src/jit-test/tests/ion/expando-realloc-slots.js b/js/src/jit-test/tests/ion/expando-realloc-slots.js new file mode 100644 index 0000000000..90438b5045 --- /dev/null +++ b/js/src/jit-test/tests/ion/expando-realloc-slots.js @@ -0,0 +1,28 @@ +function O() { + this.x0 = 1; + this.x1 = 1; + this.x2 = 1; + this.x3 = 1; + this.x4 = 1; + this.x5 = 1; +} +function f() { + var arr = []; + for (var i=0; i<1500; i++) + arr.push(new O); + for (var i=0; i<1500; i++) { + var o = arr[i]; + o.x10 = 1; + o.x11 = 1; + o.x12 = 1; + o.x13 = 1; + o.x14 = 1; + o.x15 = 1; + o.x16 = 1; + o.x17 = 1; + o.x18 = 1; + o.x19 = 1; + o.x20 = 1; + } +} +f(); diff --git a/js/src/jit-test/tests/ion/filtertypeset-float32.js b/js/src/jit-test/tests/ion/filtertypeset-float32.js new file mode 100644 index 0000000000..891c77aa40 --- /dev/null +++ b/js/src/jit-test/tests/ion/filtertypeset-float32.js @@ -0,0 +1,6 @@ +function f(x) { + return Math.fround((x ? 0 : x) | Math.max(x, x)); +} +for (var j = 0; j < 2; ++j) { + assertEq(f((function(){}) - 4294967297 ? 1 : 1 | 0 && 4294967297), 1); +} diff --git a/js/src/jit-test/tests/ion/fold-in.js b/js/src/jit-test/tests/ion/fold-in.js new file mode 100644 index 0000000000..4e0c54cd5d --- /dev/null +++ b/js/src/jit-test/tests/ion/fold-in.js @@ -0,0 +1,44 @@ +// Singleton +function f() { + var res = 0; + for (var i=0; i<500; i++) + res += ("abcd" in Math); + return res; +} +assertEq(f(), 0); +Math.abcd = 3; +assertEq(f(), 500); +delete Math.abcd; +assertEq(f(), 0); + +// Non-singleton +function O(x) { if (x) this.x = 1; } + +var arr = []; +for (var i=0; i<4; i++) + arr.push(new O(i % 2)); + +function g(arr) { + var res = 0; + for (var i=0; i<500; i++) { + var o = arr[i % arr.length]; + res += "x" in o; + res += "abcd" in o; + } + return res; +} +assertEq(g(arr), 250); +arr[0].abcd = 3; +assertEq(g(arr), 375); + +function testPrimitive() { + var x = 7; + var c = 0; + for (var i=0; i<5; i++) { + try { + "z" in x; + } catch(e) { c++; } + } + assertEq(c, 5); +} +testPrimitive(); diff --git a/js/src/jit-test/tests/ion/fold-linear-arith-bug1316830.js b/js/src/jit-test/tests/ion/fold-linear-arith-bug1316830.js new file mode 100644 index 0000000000..28ef5400ed --- /dev/null +++ b/js/src/jit-test/tests/ion/fold-linear-arith-bug1316830.js @@ -0,0 +1,9 @@ +function f(x) { + return (x | 0) - (-4294967295 | 0) + -2147483647 +} +x = [1, 4294967295] +for (var j = 0; j < 2; ++j) { + for (var k = 0; k < 3; ++k) { + assertEq(f(x[j]), -2147483647 - 2 * j); + } +} diff --git a/js/src/jit-test/tests/ion/fold-linear-arith-bug1319242.js b/js/src/jit-test/tests/ion/fold-linear-arith-bug1319242.js new file mode 100644 index 0000000000..8100180362 --- /dev/null +++ b/js/src/jit-test/tests/ion/fold-linear-arith-bug1319242.js @@ -0,0 +1,7 @@ +function f(x) { + // Check that we do not fold +1 and -2 across truncated/non-truncated operations. + return (((x | 0) + 1) | 0) + -2; +} +const int32_min = -Math.pow(2,31); +f(Infinity); +assertEq(f(int32_min - 1), int32_min - 2); diff --git a/js/src/jit-test/tests/ion/fold-linear-arith-bug1528829.js b/js/src/jit-test/tests/ion/fold-linear-arith-bug1528829.js new file mode 100644 index 0000000000..e4529c1bfb --- /dev/null +++ b/js/src/jit-test/tests/ion/fold-linear-arith-bug1528829.js @@ -0,0 +1,18 @@ +// |jit-test| --ion-warmup-threshold=0; --ion-check-range-analysis + +function f(o) { + // Int32 math does an overflow check. + o += 1; + // Int32 math does an underflow check. + o += -2147483647; + // If previous math operations are folded, we should keep the smallest + // overflow check and the highest underflow check to stay within the + // expected range deduced by Range Analysis. + for (let i = 0; i < 1; ++i) { + o -= 1; + } +} +f(0); +f(0); +f(2147483647); + diff --git a/js/src/jit-test/tests/ion/fold-needless-control-flow.js b/js/src/jit-test/tests/ion/fold-needless-control-flow.js new file mode 100644 index 0000000000..7f5b461d43 --- /dev/null +++ b/js/src/jit-test/tests/ion/fold-needless-control-flow.js @@ -0,0 +1,13 @@ +function test(str, needle) { + // We should be able to fold away the complete indexOf instruction, because + // executing the right-hand side of the && operator is a no-op. + (str.indexOf(needle) > -1) && needle; +} + +const needles = [ + "a", "b", +]; + +for (let i = 0; i < 100; ++i) { + test("aaa", needles[i & 1]); +} diff --git a/js/src/jit-test/tests/ion/for-in-iterator-1.js b/js/src/jit-test/tests/ion/for-in-iterator-1.js new file mode 100644 index 0000000000..0257634459 --- /dev/null +++ b/js/src/jit-test/tests/ion/for-in-iterator-1.js @@ -0,0 +1,29 @@ +gczeal(0); + +var values = { + input1: null, + input2: undefined, + input3: {}, + input4: [], + input5: "" +}; + +var original = function (x) { + var res = { start: inIon(), end: false }; + for (var i in x.input) { + throw "Iterator is not empty"; + } + res.end = inIon(); + return res; +}; + +for (var i = 1; i < 6; i++) { + // Reset type inference. + var res = false; + var test = eval(`(${original})`.replace(".input", ".input" + i)); + + // Run until the end is running within Ion, or skip if we are unable to run + // in Ion. + while (!res.start || !res.end) + res = test(values); +} diff --git a/js/src/jit-test/tests/ion/fromcharcode-charcodeat-zero.js b/js/src/jit-test/tests/ion/fromcharcode-charcodeat-zero.js new file mode 100644 index 0000000000..b8a5cb6b56 --- /dev/null +++ b/js/src/jit-test/tests/ion/fromcharcode-charcodeat-zero.js @@ -0,0 +1,82 @@ +function toCharCodes(str) { + return [...str].map(s => s.length === 1 ? [s.charCodeAt(0)] : [s.charCodeAt(0), s.charCodeAt(1)]) + .flat(); +} + +function test() { + // [Ascii; Latin-1, non-Ascii; non-Latin-1; non-BMP] + const constant = "AaÁáĀā𝐀𝐚"; + const charCodes = toCharCodes(constant); + + // Create a linear, but non-constant string with the same contents. + const linear = String.fromCharCode(...charCodes); + assertEq(linear, constant); + + // Optimisation applies for |MCharCodeAt(MFromCharCode(MCharCodeAt(str, idx)), 0|. + for (let i = 0; i < 500; ++i) { + let idx = i & 3; + + // str[idx] is compiled to |MFromCharCode(MCharCodeAt(str, idx))|. + assertEq(constant[idx].charCodeAt(0), charCodes[idx]); + assertEq(linear[idx].charCodeAt(0), charCodes[idx]); + + // str.charAt(idx) is compiled to |MFromCharCode(MCharCodeAt(str, idx))|. + assertEq(constant.charAt(idx).charCodeAt(0), charCodes[idx]); + assertEq(linear.charAt(idx).charCodeAt(0), charCodes[idx]); + } +} +for (let i = 0; i < 4; ++i) { + test(); +} + +function testNonConstantIndex() { + // [Ascii; Latin-1, non-Ascii; non-Latin-1; non-BMP] + const constant = "AaÁáĀā𝐀𝐚"; + const charCodes = toCharCodes(constant); + + // Create a linear, but non-constant string with the same contents. + const linear = String.fromCharCode(...charCodes); + assertEq(linear, constant); + + // No optimisation when the index isn't a constant zero. + let indices = [0, 1, 2, 3]; + for (let i = 0; i < 500; ++i) { + let idx = i & 3; + + // Always zero, but too complicated to infer at compile time. + let zero = indices[idx] - idx; + + assertEq(constant[idx].charCodeAt(zero), charCodes[idx]); + assertEq(linear[idx].charCodeAt(zero), charCodes[idx]); + + assertEq(constant.charAt(idx).charCodeAt(zero), charCodes[idx]); + assertEq(linear.charAt(idx).charCodeAt(zero), charCodes[idx]); + } +} +for (let i = 0; i < 4; ++i) { + testNonConstantIndex(); +} + +function testOOB() { + // [Ascii; Latin-1, non-Ascii; non-Latin-1; non-BMP] + const constant = "AaÁáĀā𝐀𝐚"; + const charCodes = toCharCodes(constant); + + // Create a linear, but non-constant string with the same contents. + const linear = String.fromCharCode(...charCodes); + assertEq(linear, constant); + + // No optimisation when the index is out-of-bounds. + for (let i = 0; i < 500; ++i) { + let idx = i & 3; + + assertEq(constant[idx].charCodeAt(1), NaN); + assertEq(linear[idx].charCodeAt(1), NaN); + + assertEq(constant.charAt(idx).charCodeAt(1), NaN); + assertEq(linear.charAt(idx).charCodeAt(1), NaN); + } +} +for (let i = 0; i < 4; ++i) { + testOOB(); +} diff --git a/js/src/jit-test/tests/ion/gc-during-bailout.js b/js/src/jit-test/tests/ion/gc-during-bailout.js new file mode 100644 index 0000000000..b5cb91882a --- /dev/null +++ b/js/src/jit-test/tests/ion/gc-during-bailout.js @@ -0,0 +1,158 @@ +setJitCompilerOption("ion.warmup.trigger", 30); +gcPreserveCode(); +var o = {}; + +function f(i) { + var obj_1 = { a: 0 }; + var obj_2 = { a: 0 }; + var obj_3 = { a: 0 }; + var obj_4 = { a: 0 }; + var obj_5 = { a: 0 }; + var obj_6 = { a: 0 }; + var obj_7 = { a: 0 }; + var obj_8 = { a: 0 }; + var obj_9 = { a: 0 }; + var obj_10 = { a: 0 }; + var obj_11 = { a: 0 }; + var obj_12 = { a: 0 }; + var obj_13 = { a: 0 }; + var obj_14 = { a: 0 }; + var obj_15 = { a: 0 }; + var obj_16 = { a: 0 }; + var obj_17 = { a: 0 }; + var obj_18 = { a: 0 }; + var obj_19 = { a: 0 }; + var obj_20 = { a: 0 }; + var obj_21 = { a: 0 }; + var obj_22 = { a: 0 }; + var obj_23 = { a: 0 }; + var obj_24 = { a: 0 }; + var obj_25 = { a: 0 }; + var obj_26 = { a: 0 }; + var obj_27 = { a: 0 }; + var obj_28 = { a: 0 }; + var obj_29 = { a: 0 }; + var obj_30 = { a: 0 }; + + // Doing a bailout after the return of the function call implies that we + // cannot resume before the function call. Thus, we would have to recover + // the 30 objects allocations during the bailout. + schedulegc(i % 100); + bailout(); + + obj_1.a = 1; + obj_2.a = 1; + obj_3.a = 1; + obj_4.a = 1; + obj_5.a = 1; + obj_6.a = 1; + obj_7.a = 1; + obj_8.a = 1; + obj_9.a = 1; + obj_10.a = 1; + obj_11.a = 1; + obj_12.a = 1; + obj_13.a = 1; + obj_14.a = 1; + obj_15.a = 1; + obj_16.a = 1; + obj_17.a = 1; + obj_18.a = 1; + obj_19.a = 1; + obj_20.a = 1; + obj_21.a = 1; + obj_22.a = 1; + obj_23.a = 1; + obj_24.a = 1; + obj_25.a = 1; + obj_26.a = 1; + obj_27.a = 1; + obj_28.a = 1; + obj_29.a = 1; + obj_30.a = 1; +} + +for (var i = 0; i < 200; i++) { + // Do not inline 'f', to keep re-entering 'f' at every loop iteration. + with (o) { } + f(i); +} + +// This is the same test except that we do not preserve code under shrinking GC. +gczeal(14); + +function g(i) { + var obj_1 = { a: 0 }; + var obj_2 = { a: 0 }; + var obj_3 = { a: 0 }; + var obj_4 = { a: 0 }; + var obj_5 = { a: 0 }; + var obj_6 = { a: 0 }; + var obj_7 = { a: 0 }; + var obj_8 = { a: 0 }; + var obj_9 = { a: 0 }; + var obj_10 = { a: 0 }; + var obj_11 = { a: 0 }; + var obj_12 = { a: 0 }; + var obj_13 = { a: 0 }; + var obj_14 = { a: 0 }; + var obj_15 = { a: 0 }; + var obj_16 = { a: 0 }; + var obj_17 = { a: 0 }; + var obj_18 = { a: 0 }; + var obj_19 = { a: 0 }; + var obj_20 = { a: 0 }; + var obj_21 = { a: 0 }; + var obj_22 = { a: 0 }; + var obj_23 = { a: 0 }; + var obj_24 = { a: 0 }; + var obj_25 = { a: 0 }; + var obj_26 = { a: 0 }; + var obj_27 = { a: 0 }; + var obj_28 = { a: 0 }; + var obj_29 = { a: 0 }; + var obj_30 = { a: 0 }; + + // Doing a bailout after the return of the function call implies that we + // cannot resume before the function call. Thus, we would have to recover + // the 30 objects allocations during the bailout. + schedulegc(i % 100); + bailout(); + + obj_1.a = 1; + obj_2.a = 1; + obj_3.a = 1; + obj_4.a = 1; + obj_5.a = 1; + obj_6.a = 1; + obj_7.a = 1; + obj_8.a = 1; + obj_9.a = 1; + obj_10.a = 1; + obj_11.a = 1; + obj_12.a = 1; + obj_13.a = 1; + obj_14.a = 1; + obj_15.a = 1; + obj_16.a = 1; + obj_17.a = 1; + obj_18.a = 1; + obj_19.a = 1; + obj_20.a = 1; + obj_21.a = 1; + obj_22.a = 1; + obj_23.a = 1; + obj_24.a = 1; + obj_25.a = 1; + obj_26.a = 1; + obj_27.a = 1; + obj_28.a = 1; + obj_29.a = 1; + obj_30.a = 1; +} + +for (var i = 0; i < 200; i++) { + // Do not inline 'g', to keep re-entering 'g' at every loop iteration. + with (o) { } + g(i); +} diff --git a/js/src/jit-test/tests/ion/getPropertyCacheOverflow.js b/js/src/jit-test/tests/ion/getPropertyCacheOverflow.js new file mode 100644 index 0000000000..41a7fadedc --- /dev/null +++ b/js/src/jit-test/tests/ion/getPropertyCacheOverflow.js @@ -0,0 +1,37 @@ +// This test was made to be effective with --no-jm. + +var list = [ + { entry00: 0, length: 1 }, + { entry01: 0, length: 1 }, + { entry02: 0, length: 1 }, + { entry03: 0, length: 1 }, + { entry04: 0, length: 1 }, + { entry05: 0, length: 1 }, + { entry06: 0, length: 1 }, + { entry07: 0, length: 1 }, + { entry08: 0, length: 1 }, + { entry09: 0, length: 1 }, + { entry10: 0, length: 1 }, + { entry11: 0, length: 1 }, + { entry12: 0, length: 1 }, + { entry13: 0, length: 1 }, + { entry14: 0, length: 1 }, + { entry15: 0, length: 1 }, + { entry16: 0, length: 1 }, // cause an overflow. + { entry17: 0, length: 1 }, + [0], + (new Uint8Array(new ArrayBuffer(1))) +]; + +function f(obj) { + return obj.length; +} + +// Cook the f function on the top of the list to make sure we do not register +// our test cases. +for (var i = 0; i < 100; i++) + f(list[i % 10]); + +// Register & check stubs. +for (var i = 0; i < 40; i++) + assertEq(f(list[i % 20]), 1); diff --git a/js/src/jit-test/tests/ion/getelem-bounds-coalesce.js b/js/src/jit-test/tests/ion/getelem-bounds-coalesce.js new file mode 100644 index 0000000000..c5dda1784d --- /dev/null +++ b/js/src/jit-test/tests/ion/getelem-bounds-coalesce.js @@ -0,0 +1,49 @@ +var a = [1,2,3,4]; + +// Basic constants. +function foo(x) { + return x[0] + x[1] + x[2] + x[3]; +} +for (var i = 0; i < 100; i++) + assertEq(foo(a), 10); +assertEq(foo([1,2,3]), NaN); + +// Basic terms. +function foo2(x, n) { + return x[n] + x[n + 1] + x[n + 2]; +} +for (var i = 0; i < 100; i++) + assertEq(foo2(a, 1), 9); +assertEq(foo2(a, 2), NaN); + +// Term underflow. +function foo3(x, n) { + return x[n] + x[n + 1] + x[n + 2]; +} +for (var i = 0; i < 100; i++) + assertEq(foo3(a, 1), 9); +assertEq(foo3(a, -1), NaN); + +// Integer overflow computing bound. +function foo4(x, n) { + return x[n] + x[n + 1] + x[n + 2]; +} +for (var i = 0; i < 45; i++) + assertEq(foo4(a, 1), 9); +assertEq(foo4(a, 0x7fffffff), NaN); + +// Underflow at an offset. +function foo5(x, n) { + return x[n + 10] + x[n + 11] + x[n + 12]; +} +for (var i = 0; i < 45; i++) + assertEq(foo5(a, -9), 9); +assertEq(foo5(a, -11), NaN); + +// Overflow at offset. +function foo6(x, n) { + return x[n - 10] + x[n - 11] + x[n - 12]; +} +for (var i = 0; i < 45; i++) + assertEq(foo6(a, 13), 9); +assertEq(foo6(a, 14), NaN); diff --git a/js/src/jit-test/tests/ion/getelem-bounds-hoist.js b/js/src/jit-test/tests/ion/getelem-bounds-hoist.js new file mode 100644 index 0000000000..694da72d6a --- /dev/null +++ b/js/src/jit-test/tests/ion/getelem-bounds-hoist.js @@ -0,0 +1,83 @@ +var a = [1,2,3,4,5]; + +// Basic overflow in hoisted condition. +function foo(x, n) { + var v = 0; + for (var i = 0; i < n; i++) + v += x[i]; + return v; +} +for (var i = 0; i < 15; i++) + assertEq(foo(a, 5), 15); +assertEq(foo(a, 6), NaN); + +// Basic underflow in hoisted condition. +function foo2(x, m, n) { + var v = 0; + for (var i = m; i < n; i++) + v += x[i]; + return v; +} +for (var i = 0; i < 15; i++) + assertEq(foo2(a, 0, 5), 15); +assertEq(foo2(a, -1, 5), NaN); + +// Overflow when hoisting consolidated condition. +function foo3(x, m, n) { + var v = 0; + for (var i = m; i < n; i++) + v += x[i] + x[i + 1] + x[i + 2]; + return v; +} +for (var i = 0; i < 15; i++) + assertEq(foo3(a, 0, 3), 27); +assertEq(foo3(a, 0, 4), NaN); + +// Underflow when hoisting consolidated condition. +function foo4(x, m, n) { + var v = 0; + for (var i = m; i < n; i++) + v += x[i] + x[i - 1] + x[i - 2]; + return v; +} +for (var i = 0; i < 15; i++) + assertEq(foo4(a, 2, 5), 27); +assertEq(foo4(a, 0, 5), NaN); + +// Underflow due to decreasing index. +function foo5(x, n) { + var v = 0; + for (var i = 0; i < n; i++) { + v += x[i]; + if (n == 4) + i -= 2; + if (i == -5) + break; + } + return v; +} +for (var i = 0; i < 15; i++) + assertEq(foo5(a, 5), 15); +assertEq(foo5(a, 4), NaN); + +// Overflow after access at constant offset. +function foo6(x, m, n) { + var v = 0; + for (var i = m; i < n; i++) + v += x[i + 10]; + return v; +} +for (var i = 0; i < 15; i++) + assertEq(foo6(a, -10, -5), 15); +assertEq(foo6(a, -10, -4), NaN); + +// Underflow after access at constant offset. +function foo7(x, m, n) { + var v = 0; + for (var i = m; i < n; i++) + v += x[i + 10]; + return v; +} +for (var i = 0; i < 15; i++) + assertEq(foo7(a, -10, -5), 15); +assertEq(foo7(a, -11, -5), NaN); diff --git a/js/src/jit-test/tests/ion/getelem-hole.js b/js/src/jit-test/tests/ion/getelem-hole.js new file mode 100644 index 0000000000..de3517ecbb --- /dev/null +++ b/js/src/jit-test/tests/ion/getelem-hole.js @@ -0,0 +1,15 @@ +var a = [1, 2, 3]; +var b = [4, 5, 6]; + +function testFold() { + for (var i=0; i<10; i++) { + var x = a[i]; + var y = a[i]; + var z = b[i]; + assertEq(x, y); + if (i < 3) + assertEq(x !== z, true); + } +} +for (var i=0; i<10; i++) + testFold(); diff --git a/js/src/jit-test/tests/ion/getelem-proto.js b/js/src/jit-test/tests/ion/getelem-proto.js new file mode 100644 index 0000000000..5e9be37d12 --- /dev/null +++ b/js/src/jit-test/tests/ion/getelem-proto.js @@ -0,0 +1,18 @@ +var a = [1, , 2]; +Array.prototype[1] = 3; + +function f(arr) { + return arr[0] + arr[1] + arr[2]; +} +for (var i=0; i<70; i++) { + assertEq(f(a), 6); +} + +Object.defineProperty(Array.prototype, "1", { + get: function() { + return 1234; + } +}); + +assertEq(f(a), 1237); +assertEq(f(a), 1237); diff --git a/js/src/jit-test/tests/ion/getelem-string.js b/js/src/jit-test/tests/ion/getelem-string.js new file mode 100644 index 0000000000..b187e5b68b --- /dev/null +++ b/js/src/jit-test/tests/ion/getelem-string.js @@ -0,0 +1,11 @@ +function test1() { + function getchar(s, i) { + return s[i]; + } + for (var i=0; i<70; i++) { + assertEq(getchar("foo", 0), "f"); + assertEq(getchar("bar", 2), "r"); + } + assertEq(getchar("foo", 3), undefined); +} +test1(); diff --git a/js/src/jit-test/tests/ion/getelem.js b/js/src/jit-test/tests/ion/getelem.js new file mode 100644 index 0000000000..3fd11586a5 --- /dev/null +++ b/js/src/jit-test/tests/ion/getelem.js @@ -0,0 +1,77 @@ +function testValue() { + function f(arr, x) { + return arr[x]; + } + var a = [1, undefined, null, Math, 2.1, ""]; + for (var i=0; i<50; i++) { + assertEq(f(a, 0), 1); + assertEq(f(a, 1), undefined); + assertEq(f(a, 2), null); + assertEq(f(a, 3), Math); + assertEq(f(a, 4), 2.1); + assertEq(f(a, 5), ""); + assertEq(f(a, -1), undefined); + assertEq(f(a, 6), undefined); + } +} +testValue(); + +function testOutOfBounds() { + function f(arr, x) { + return arr[x]; + } + var a = [0, 1, 2, 3, 4]; + + for (var j=0; j<4; j++) { + for (var i=0; i<5; i++) { + assertEq(f(a, i), i); + } + for (var i=5; i<10; i++) { + assertEq(f(a, i), undefined); + } + for (var i=-1; i>-10; i--) { + assertEq(f(a, i), undefined); + } + } +} +testOutOfBounds(); + +function testHole() { + function f(arr, x) { + return arr[x]; + } + var a = [0, , 2, ]; + for (var i=0; i<70; i++) { + assertEq(f(a, 0), 0); + assertEq(f(a, 1), undefined); + assertEq(f(a, 2), 2); + assertEq(f(a, 3), undefined); + } +} +testHole(); + +function testClassGuard() { + function f(arr) { + return arr[2]; + } + var a = [1, 2, 3, 4]; + for (var i=0; i<90; i++) { + assertEq(f(a), 3); + } + var b = {2: 100}; + assertEq(f(b), 100); +} +testClassGuard(); + +function testGeneric1() { + function f(o, i) { + return o[i]; + } + for (var i=0; i<100; i++) { + assertEq(f("abc", 1), "b"); + assertEq(f("foo", "length"), 3); + assertEq(f([], -1), undefined); + assertEq(f({x: 1}, "x"), 1); + } +} +testGeneric1(); diff --git a/js/src/jit-test/tests/ion/getgname-getter.js b/js/src/jit-test/tests/ion/getgname-getter.js new file mode 100644 index 0000000000..47a0464f1c --- /dev/null +++ b/js/src/jit-test/tests/ion/getgname-getter.js @@ -0,0 +1,8 @@ +var accesses = 100000; + +for (var i = 0; i < accesses; i++) + assertEq(timesAccessed, i+1); + +gc(); + +assertEq(timesAccessed, accesses + 1); diff --git a/js/src/jit-test/tests/ion/getgname.js b/js/src/jit-test/tests/ion/getgname.js new file mode 100644 index 0000000000..507172524e --- /dev/null +++ b/js/src/jit-test/tests/ion/getgname.js @@ -0,0 +1,37 @@ +var x = 13; + +function ReturnArray() { + return Array; +} +function ReturnObject() { + return Object; +} +function ReturnX() { + return x; +} + +y = null; +function ReturnY() { + return y; +} +z = "3"; +z = null; +function ReturnZ() { + return z; +} + +for (var i = 0; i < 100; i++) + ReturnArray(); +for (var i = 0; i < 100; i++) + ReturnX(); +for (var i = 0; i < 100; i++) + ReturnZ(); + +gc(); + +assertEq(ReturnArray(), Array); +assertEq(ReturnObject(), Object); +assertEq(ReturnX(), 13); +assertEq(ReturnY(), null); +assertEq(ReturnZ(), null); + diff --git a/js/src/jit-test/tests/ion/getprop-cache.js b/js/src/jit-test/tests/ion/getprop-cache.js new file mode 100644 index 0000000000..68df630dd2 --- /dev/null +++ b/js/src/jit-test/tests/ion/getprop-cache.js @@ -0,0 +1,28 @@ +function test1() { + function h(node) { + var x = 0.1; + for (var i=0; i<100; i++) { + x += node.parent; + } + return x; + } + function build(depth) { + if (depth > 10) + return {parent: 3.3}; + return {__proto__: build(depth + 1)}; + } + var tree = build(0); + assertEq(h(tree)|0, 330); +} +test1(); + +function test2() { + function Foo() {}; + Foo.prototype.x = 3.3; + + var o = new Foo(); + for (var i=0; i<100; i++) { + assertEq(o.x, 3.3); + } +} +test2(); diff --git a/js/src/jit-test/tests/ion/getprop-constant.js b/js/src/jit-test/tests/ion/getprop-constant.js new file mode 100644 index 0000000000..c11e855281 --- /dev/null +++ b/js/src/jit-test/tests/ion/getprop-constant.js @@ -0,0 +1,20 @@ +// |jit-test| error: TypeError + +/* GETPROP of a known constant where the lvalue may not be an object. */ + +function foo(ox) { + var x = ox; + var n = 0; + for (var i = 0; i < 90; i++) { + n += x.f.g; + if (i >= 80) + x = undefined; + } + print(n); +} +var n = 1; +function f() {} +function g() {} +g.g = 1; +f.prototype = {f:g}; +foo(new f()); diff --git a/js/src/jit-test/tests/ion/getprop-idempotent-cache-1.js b/js/src/jit-test/tests/ion/getprop-idempotent-cache-1.js new file mode 100644 index 0000000000..bddde433f6 --- /dev/null +++ b/js/src/jit-test/tests/ion/getprop-idempotent-cache-1.js @@ -0,0 +1,17 @@ +function f(o) { + var res = 0; + for (var i=0; i<11000; i++) { + res += o.x; + } + return res; +} + +function O(x) { + if (x) + this.x = 10; +} + +f(new O(true)); + +// "o.x" is now missing so the idempotent cache should invalidate f. +f(new O(false)); diff --git a/js/src/jit-test/tests/ion/getprop-idempotent-cache-2.js b/js/src/jit-test/tests/ion/getprop-idempotent-cache-2.js new file mode 100644 index 0000000000..8da24537d9 --- /dev/null +++ b/js/src/jit-test/tests/ion/getprop-idempotent-cache-2.js @@ -0,0 +1,21 @@ +function f(o) { + var res = 0; + for (var i=0; i<110; i++) { + res += o.x; + } + return res; +} + +function O(x) { + if ([].length == 0) // Thwart definite slot analysis. + this.x = 10; +} + +var o = new O(true); +f(o); + +// Add a getter, this should invalidate the script containing the idempotent cache. +var res = 0; +o.__defineGetter__("x", function() { res++; }); +f(o); +assertEq(res, 110); diff --git a/js/src/jit-test/tests/ion/getprop-primitive.js b/js/src/jit-test/tests/ion/getprop-primitive.js new file mode 100644 index 0000000000..d85ba11f10 --- /dev/null +++ b/js/src/jit-test/tests/ion/getprop-primitive.js @@ -0,0 +1,59 @@ +// |jit-test| --ion-warmup-threshold=50 +setJitCompilerOption("offthread-compilation.enable", 0); +gcPreserveCode(); + +var testSet1 = [1, "", Symbol("a"), true]; +var testSet2 = [1, "", Symbol("a"), true, { bar: 5 }]; + +Number.prototype.bar = 1; +String.prototype.bar = 2; +Symbol.prototype.bar = 3; +Boolean.prototype.bar = 4; + +function assertEqIf(prev, curr, expected) { + // Branch pruning absolutely want to get rid of the next branch + // which causes bailouts, so we forbid inlining of this function. + with({}){} + if (prev) { + assertEq(curr, expected); + return false; + } + return true; +} + +var f; +var template = function (set) { + var lastX = 0, x = 0, i = 0, y = 0; + var cont = true; + while (cont) { // OSR here. + for (var i = 0; i < set.length; i++) { + x = x + (inIon() ? 1 : 0); + if (set[i].placeholder != set[(i + 1) % set.length].placeholder) + y += 1; + } + + // If we bailout in the inner loop, then x will have a smaller value + // than the number of iterations. + cont = assertEqIf(lastX > 0, x, set.length); + if (inIon()) + lastX = x; + x = 0; + } + return y; +} + +// Set 1, Non existing properties. +f = eval(`(${template})`.replace(".placeholder", ".foo")); +f(testSet1); + +// Set 2, Non existing properties. +f = eval(`(${template})`.replace(".placeholder", ".foo")); +f(testSet2); + +// Set 1, Existing properties. +f = eval(`(${template})`.replace(".placeholder", ".bar")); +f(testSet1); + +// Set 2, Existing properties. +f = eval(`(${template})`.replace(".placeholder", ".bar")); +f(testSet2); diff --git a/js/src/jit-test/tests/ion/gvn-unremovable-phi-bug1317675.js b/js/src/jit-test/tests/ion/gvn-unremovable-phi-bug1317675.js new file mode 100644 index 0000000000..99d74fc13e --- /dev/null +++ b/js/src/jit-test/tests/ion/gvn-unremovable-phi-bug1317675.js @@ -0,0 +1,18 @@ +// |jit-test| error: InternalError: too much recursion + +function f() { + var phi1 = 0; + var phi2 = 0; + while (true) { + if (!phi2) { + var add = phi1 + 1; + f(add); + if (!phi2) + return; + phi1 = 1; + phi2 = 0; + } + } +} + +f(0); diff --git a/js/src/jit-test/tests/ion/has-definite-folding.js b/js/src/jit-test/tests/ion/has-definite-folding.js new file mode 100644 index 0000000000..3e5dcfad45 --- /dev/null +++ b/js/src/jit-test/tests/ion/has-definite-folding.js @@ -0,0 +1,32 @@ +var max = 40; +setJitCompilerOption("ion.warmup.trigger", max - 10); + +function defineProperty() { + var abc = {}; + Object.defineProperty(abc, "x", {value: 1}) + assertEq(abc.x, 1); +} + +function simple() { + var o = {a: 1}; + assertEq("a" in o, true); + assertEq("b" in o, false); + assertEq(o.hasOwnProperty("a"), true); + assertEq(o.hasOwnProperty("b"), false); +} + +function proto() { + var o = {a: 1, __proto__: {b: 2}}; + assertEq("a" in o, true); + assertEq("b" in o, true); + assertEq("c" in o, false); + assertEq(o.hasOwnProperty("a"), true); + assertEq(o.hasOwnProperty("b"), false); + assertEq(o.hasOwnProperty("c"), false); +} + +for (var i = 0; i < max; i++) { + defineProperty(); + simple(); + proto(); +} diff --git a/js/src/jit-test/tests/ion/hasOwn-megamorphic.js b/js/src/jit-test/tests/ion/hasOwn-megamorphic.js new file mode 100644 index 0000000000..422e869497 --- /dev/null +++ b/js/src/jit-test/tests/ion/hasOwn-megamorphic.js @@ -0,0 +1,32 @@ +setJitCompilerOption("offthread-compilation.enable", 0); +setJitCompilerOption("baseline.warmup.trigger", 5); +setJitCompilerOption("ion.warmup.trigger", 5); + +function Base() { +} + +Base.prototype.foo = false; + +// XXX: tried to do this with ic.force-megamorphic, but it didn't seem to want +// to work. Maybe something is being too clever for my simple test case if I +// don't put things into a megamorphic array? +let objs = [ + {a: true}, + {b: true}, + {c: true}, + {d: true}, + {e: true}, + {f: true}, + {g: true}, + new Base(), +]; + +function doTest(i) { + let o = objs[i % objs.length]; + assertEq(!o.foo, true); + assertEq(Object.hasOwn(o, "foo"), false); +} + +for (var i = 0; i < 50; i++) { + doTest(i); +} diff --git a/js/src/jit-test/tests/ion/hole.js b/js/src/jit-test/tests/ion/hole.js new file mode 100644 index 0000000000..c990704cd7 --- /dev/null +++ b/js/src/jit-test/tests/ion/hole.js @@ -0,0 +1,11 @@ +function f() { + var a; + for (var i=0; i<50; i++) { + a = [i, , [,, i*3], ]; + } + return a; +} +Array.prototype[1] = 123; +var arr = f(); +assertEq(arr.length, 3); +assertEq(arr.toString(), "49,123,,123,147"); diff --git a/js/src/jit-test/tests/ion/ic-fuzz-0.js b/js/src/jit-test/tests/ion/ic-fuzz-0.js new file mode 100644 index 0000000000..9a14a1b148 --- /dev/null +++ b/js/src/jit-test/tests/ion/ic-fuzz-0.js @@ -0,0 +1,3 @@ +setJitCompilerOption("ion.warmup.trigger", 50); +for (var i = 0; i < 150; i++) + Infinity; diff --git a/js/src/jit-test/tests/ion/idempotentCache.js b/js/src/jit-test/tests/ion/idempotentCache.js new file mode 100644 index 0000000000..6a54bb72e5 --- /dev/null +++ b/js/src/jit-test/tests/ion/idempotentCache.js @@ -0,0 +1,34 @@ +// Test that we don't attach ICs to idempotent caches that are incompatible +// with the cache result type. + +var missingObjs = [{a:1},Object.create({a:2}),{}]; +function testMissing(limit) +{ + var res = 0; + for (var i = 0; i < 1000; i++) { + for (var j = 0; j < missingObjs.length; j++) { + var obj = missingObjs[j]; + if (j < limit) + res += obj.a; + } + } + return res; +} +assertEq(testMissing(2), 3000); +assertEq(testMissing(3), NaN); + +var lengthObjs = [{length:{a:1}},Object.create({length:{a:2}}),[0,1]]; +function testArrayLength(limit) +{ + var res = 0; + for (var i = 0; i < 1000; i++) { + for (var j = 0; j < lengthObjs.length; j++) { + var obj = lengthObjs[j]; + if (j < limit) + res += obj.length.a; + } + } + return res; +} +assertEq(testArrayLength(2), 3000); +assertEq(testArrayLength(3), NaN); diff --git a/js/src/jit-test/tests/ion/idiv-by-constant.js b/js/src/jit-test/tests/ion/idiv-by-constant.js new file mode 100644 index 0000000000..c1ebbea71f --- /dev/null +++ b/js/src/jit-test/tests/ion/idiv-by-constant.js @@ -0,0 +1,108 @@ +function int_seq(count) { + var arr = []; + var x = 0xfac83126; + while (count--) { + x ^= x << 13; + x ^= x >> 17; + x ^= x << 5; + arr.push(x | 0); + } + return arr; +} + +function test(name, asm, ion, int) { + let count = 10000; + let seq = int_seq(count); + for (let x of seq) { + let rint = int(x); + let rasm = asm(x); + let rion = ion(x); + // console.log(name, x, rint, rasm, rion); + assertEq(rasm, rint); + assertEq(rion, rint); + } +} + +var asmdiv2 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x|0) / 2)|0; + return z|0; + } + return f; +})() + +var plaindiv2 = function(x) { + x = x|0; + var z = 0; + z = ((x|0) / 2)|0; + return z|0; +} + +var interpdiv2 = function(x) { + with({}){}; + x = x|0; + var z = 0; + z = ((x|0) / 2)|0; + return z|0; +} + +test("div2", asmdiv2, plaindiv2, interpdiv2); + +var asmdiv3 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x|0) / 3)|0; + return z|0; + } + return f; +})() + +var plaindiv3 = function(x) { + x = x|0; + var z = 0; + z = ((x|0) / 3)|0; + return z|0; +} + +var interpdiv3 = function(x) { + with({}){}; + x = x|0; + var z = 0; + z = ((x|0) / 3)|0; + return z|0; +} + +test("div3", asmdiv3, plaindiv3, interpdiv3); + +var asmdiv7 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x|0) / 7)|0; + return z|0; + } + return f; +})() + +var plaindiv7 = function(x) { + x = x|0; + var z = 0; + z = ((x|0) / 7)|0; + return z|0; +} + +var interpdiv7 = function(x) { + with({}){}; + x = x|0; + var z = 0; + z = ((x|0) / 7)|0; + return z|0; +} + +test("div7", asmdiv7, plaindiv7, interpdiv7); diff --git a/js/src/jit-test/tests/ion/iloop.js b/js/src/jit-test/tests/ion/iloop.js new file mode 100644 index 0000000000..5e9447c6d7 --- /dev/null +++ b/js/src/jit-test/tests/ion/iloop.js @@ -0,0 +1,4 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") + +timeout(1); +for(;;); diff --git a/js/src/jit-test/tests/ion/inline-Math-random-before-called.js b/js/src/jit-test/tests/ion/inline-Math-random-before-called.js new file mode 100644 index 0000000000..25d801b62f --- /dev/null +++ b/js/src/jit-test/tests/ion/inline-Math-random-before-called.js @@ -0,0 +1,11 @@ +// |jit-test| --ion-eager + +function ionCompiledEagerly() { + Math.random; // establish Math.random's identity for inlining + return function() { + return +Math.random(); // call will be inlined + }; +} + +var alreadyIonCompiled = ionCompiledEagerly(); +assertEq(alreadyIonCompiled() < 1, true); diff --git a/js/src/jit-test/tests/ion/inline-doubles.js b/js/src/jit-test/tests/ion/inline-doubles.js new file mode 100644 index 0000000000..e59a5f1334 --- /dev/null +++ b/js/src/jit-test/tests/ion/inline-doubles.js @@ -0,0 +1,33 @@ +function add0_5 (n) { + return n + 0.5; +} + +function add1_0 (n) { + return n + 1; +} + +function add1_5 (n) { + return n + 1.5; +} + +function add2_0 (n) { + return n + 2; +} + +function sub2_0 (n) { + return n - 2; +} + + +var num = 1.5; + +function main () { + for (var i = 0; i < 1000; i++) { + assertEq(add0_5(num), 2); + assertEq(add1_0(num), 2.5); + assertEq(add1_5(num), 3); + assertEq(add2_0(num), 3.5); + assertEq(sub2_0(num), -0.5); + } +} +main(); diff --git a/js/src/jit-test/tests/ion/inlining/array-pop.js b/js/src/jit-test/tests/ion/inlining/array-pop.js new file mode 100644 index 0000000000..007b1dc8ec --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/array-pop.js @@ -0,0 +1,17 @@ +function f(arr) { + var x; + for (var i=0; i<100; i++) { + x = arr.pop(); + } + return x; +} + +var arr = []; +for (var i=0; i<130; i++) { + arr.push({i: i}); +} + +assertEq(f(arr).i, 30); +assertEq(arr.length, 30); +assertEq(f(arr), undefined); +assertEq(arr.length, 0); diff --git a/js/src/jit-test/tests/ion/inlining/array-push.js b/js/src/jit-test/tests/ion/inlining/array-push.js new file mode 100644 index 0000000000..3e7ac159e3 --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/array-push.js @@ -0,0 +1,37 @@ +function test1() { + function push(arr, x) { + return arr.push(x); + } + var arr = []; + for (var i=0; i<100; i++) { + assertEq(push(arr, i), i + 1); + } +} +test1(); + +function test2() { + var arr; + for (var i=0; i<60; i++) { + arr = []; + assertEq(arr.push(3.3), 1); + assertEq(arr.push(undefined), 2); + assertEq(arr.push(true), 3); + assertEq(arr.push(Math), 4); + assertEq(arr.toString(), "3.3,,true,[object Math]"); + } +} +test2(); + +function test3() { + function push(arr, v) { + arr.push(v); + } + for (var i=0; i<60; i++) { + var arr = []; + push(arr, null); + push(arr, 3.14); + push(arr, {}); + assertEq(arr.toString(), ",3.14,[object Object]"); + } +} +test3(); diff --git a/js/src/jit-test/tests/ion/inlining/bug705251.js b/js/src/jit-test/tests/ion/inlining/bug705251.js new file mode 100644 index 0000000000..19f639d7aa --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/bug705251.js @@ -0,0 +1,10 @@ +function bitsinbyte() { + var c = 0; + while (false) c = c * 2; +} +function TimeFunc(func) { + for(var y=0; y<11000; y++) + func(); +} +for (var i=0; i<50; i++) + TimeFunc(bitsinbyte); diff --git a/js/src/jit-test/tests/ion/inlining/call-apply-non-singletons.js b/js/src/jit-test/tests/ion/inlining/call-apply-non-singletons.js new file mode 100644 index 0000000000..9b26ddf0ab --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/call-apply-non-singletons.js @@ -0,0 +1,22 @@ +var arr1 = []; +var arr2 = []; +for (let i = 0; i < 10; i++) { + arr1.push(function f(x) { + if (x === 350) + bailout(); + assertEq(f, arr1[i]); + return x + i; + }); + arr2.push(function() { + return arr1[i].apply(null, arguments); + }); +} + +function test() { + for (var i = 0; i < 400; i++) { + for (var j = 0; j < arr2.length; j++) { + assertEq(arr2[j].call(null, i), i + j); + } + } +} +test(); diff --git a/js/src/jit-test/tests/ion/inlining/exception-during-inlining-decision.js b/js/src/jit-test/tests/ion/inlining/exception-during-inlining-decision.js new file mode 100644 index 0000000000..17c11f8599 --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/exception-during-inlining-decision.js @@ -0,0 +1,115 @@ +function runNearStackLimit(f) { + function t() { + try { + return t(); + } catch (e) { + return f(); + } + } + return t() +} +var helpers = function helpers() { + return { + get isCompatVersion9() { + } }; +}(); +var testRunner = function testRunner() { + var testRunner = { + asyncTestHasNoErr: function asyncTestHasNoErr() { + }, + runTests: function runTests(testsToRun) { + for (var i in testsToRun) { + this.runTest(i, testsToRun[i].name, testsToRun[i].body); + } + }, + runTest: function runTest(testIndex, testName, testBody) { + try { + testBody(); + } catch (ex) { + } + }, + asyncTestBegin: function asyncTestBegin() { + return explicitAsyncTestExit ? ` + ` : ` + `; + } }; + return testRunner; +}(); +var assert = function assert() { + var validate = function validate() { + }; + return { + areEqual: function areEqual() { + validate( message); + }, + areNotEqual: function areNotEqual() { + } }; +}(); +class __c_19 { + constructor() { + this.foo = 'SimpleParent'; + } +} +var __v_2735 = [{ + body: function () { + class __c_23 extends __c_19 { + constructor() { + super() + } + } + let __v_2738 = new __c_23(); + } +}, { + body: function () { + class __c_26 extends __c_19 { + constructor() { + super(); + } + } + let __v_2739 = new __c_26(); + } +}, { + body: function () { + class __c_29 extends __c_19 { + constructor() { + super() + } + } + let __v_2743 = new __c_29(); + class __c_30 extends __c_19 { + constructor() { + super() + super(); + } + } + let __v_2746 = new __c_30(); + } +}, { + body: function () { + class __c_34 extends __c_19 {} + let __v_2749 = new __c_34(); + } +}, { + body: function () { + class __c_87 extends __c_19 { + constructor() { + try { + assert.areEqual(); + } catch (e) {} + eval('super();') + } + } + function __f_683(__v_2812) { + __v_2812.foo + } + __f_683(new __c_87()) + runNearStackLimit(() => { + return __f_683(); + }) + } +}, { + body: function () { + } +}]; + testRunner.runTests(__v_2735, { + }); \ No newline at end of file diff --git a/js/src/jit-test/tests/ion/inlining/getelem-getter-bailout.js b/js/src/jit-test/tests/ion/inlining/getelem-getter-bailout.js new file mode 100644 index 0000000000..71fc680a8a --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/getelem-getter-bailout.js @@ -0,0 +1,48 @@ +// Test bailouts in inlined jsop_getelem accesses. + +// Defined outside of the test functions to ensure they're recognised as +// constants in Ion. +var atom = "prop"; +var symbol = Symbol(); + +function testAtom() { + var holder = { + get [atom]() { + bailout(); + return 1; + } + }; + + function f() { + for (var i = 0; i < 2000; ++i) { + var x = holder[atom]; + assertEq(x, 1); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testAtom(); + +function testSymbol() { + var holder = { + get [symbol]() { + bailout(); + return 1; + } + }; + + function f() { + for (var i = 0; i < 2000; ++i) { + var x = holder[symbol]; + assertEq(x, 1); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testSymbol(); diff --git a/js/src/jit-test/tests/ion/inlining/getelem-getter-frameiter.js b/js/src/jit-test/tests/ion/inlining/getelem-getter-frameiter.js new file mode 100644 index 0000000000..7a2e2f1405 --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/getelem-getter-frameiter.js @@ -0,0 +1,48 @@ +// Test bailouts in inlined jsop_getelem accesses. + +// Defined outside of the test functions to ensure they're recognised as +// constants in Ion. +var atom = "prop"; +var symbol = Symbol(); + +function testAtom() { + var holder = { + get [atom]() { + new Error().stack; + return 1; + } + }; + + function f() { + for (var i = 0; i < 2000; ++i) { + var x = holder[atom]; + assertEq(x, 1); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testAtom(); + +function testSymbol() { + var holder = { + get [symbol]() { + new Error().stack; + return 1; + } + }; + + function f() { + for (var i = 0; i < 2000; ++i) { + var x = holder[symbol]; + assertEq(x, 1); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testSymbol(); diff --git a/js/src/jit-test/tests/ion/inlining/getelem-getter-id-mismatch.js b/js/src/jit-test/tests/ion/inlining/getelem-getter-id-mismatch.js new file mode 100644 index 0000000000..57a2c0ff68 --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/getelem-getter-id-mismatch.js @@ -0,0 +1,113 @@ +// Ensure BaselineInspector properly handles mixed atom/symbols when determining +// whether or not a jsop_getelem access to a getter can be inlined. + +// Defined outside of the test functions to ensure they're recognised as +// constants in Ion. +var atom1 = "prop1"; +var atom2 = "prop2"; +var sym1 = Symbol(); +var sym2 = Symbol(); + +function testAtomAtom() { + var holder = { + get [atom1]() { return 1; }, + get [atom2]() { return 2; }, + }; + + function get(name) { + // Single access point called with different atoms. + return holder[name]; + } + + function f() { + for (var i = 0; i < 1000; ++i) { + var x = get(atom1); + var y = get(atom2); + assertEq(x, 1); + assertEq(y, 2); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testAtomAtom(); + +function testAtomSymbol() { + var holder = { + get [atom1]() { return 1; }, + get [sym2]() { return 2; }, + }; + + function get(name) { + // Single access point called with atom and symbol. + return holder[name]; + } + + function f() { + for (var i = 0; i < 1000; ++i) { + var x = get(atom1); + var y = get(sym2); + assertEq(x, 1); + assertEq(y, 2); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testAtomSymbol(); + +function testSymbolAtom() { + var holder = { + get [sym1]() { return 1; }, + get [atom2]() { return 2; }, + }; + + function get(name) { + // Single access point called with symbol and atom. + return holder[name]; + } + + function f() { + for (var i = 0; i < 1000; ++i) { + var x = get(sym1); + var y = get(atom2); + assertEq(x, 1); + assertEq(y, 2); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testSymbolAtom(); + +function testSymbolSymbol() { + var holder = { + get [sym1]() { return 1; }, + get [sym2]() { return 2; }, + }; + + function get(name) { + // Single access point called with different symbols. + return holder[name]; + } + + function f() { + for (var i = 0; i < 1000; ++i) { + var x = get(sym1); + var y = get(sym2); + assertEq(x, 1); + assertEq(y, 2); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testSymbolSymbol(); diff --git a/js/src/jit-test/tests/ion/inlining/getelem-getter-megamorphic.js b/js/src/jit-test/tests/ion/inlining/getelem-getter-megamorphic.js new file mode 100644 index 0000000000..2b8fdddcd0 --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/getelem-getter-megamorphic.js @@ -0,0 +1,79 @@ +// Test for inlined getters for jsop_getelem accesses, where the getter is a +// property on the prototype and a megamorphic IC is attached. + +function makeObjects(name) { + class Base { + constructor(v) { + this._prop = v; + } + get [name]() { + return this._prop; + } + } + + // When we hit |TYPE_FLAG_OBJECT_COUNT_LIMIT|, the objects are marked as + // |TYPE_FLAG_ANYOBJECT|. That means less than |TYPE_FLAG_OBJECT_COUNT_LIMIT| + // objects need to be created to have no unknown objects in the type set. + const TYPE_FLAG_OBJECT_COUNT_LIMIT = 7; + + // |ICState::ICState::MaxOptimizedStubs| defines the maximum number of + // optimized stubs, so as soon as we hit the maximum number, the megamorphic + // state is entered. + const ICState_MaxOptimizedStubs = 6; + + // Create enough classes to enter megamorphic state, but not too much to + // have |TYPE_FLAG_ANYOBJECT| in the TypeSet. + const OBJECT_COUNT = Math.min(ICState_MaxOptimizedStubs, TYPE_FLAG_OBJECT_COUNT_LIMIT); + + var objects = []; + for (var i = 0; i < OBJECT_COUNT; ++i) { + objects.push(new class extends Base {}(1)); + } + + return objects; +} + +// Defined outside of the test functions to ensure they're recognised as +// constants in Ion. +var atom = "prop"; +var symbol = Symbol(); + +function testAtom() { + var objects = makeObjects(atom); + + function f() { + var actual = 0; + var expected = 0; + for (var i = 0; i < 1000; i++) { + var obj = objects[i % objects.length]; + actual += obj[atom]; + expected += obj._prop; + } + assertEq(actual, expected); + } + + for (var i = 0; i < 2; ++i) { + f(); + } +} +testAtom(); + +function testSymbol() { + var objects = makeObjects(symbol); + + function f() { + var actual = 0; + var expected = 0; + for (var i = 0; i < 1000; i++) { + var obj = objects[i % objects.length]; + actual += obj[symbol]; + expected += obj._prop; + } + assertEq(actual, expected); + } + + for (var i = 0; i < 2; ++i) { + f(); + } +} +testSymbol(); diff --git a/js/src/jit-test/tests/ion/inlining/getelem-getter-noninlined-call.js b/js/src/jit-test/tests/ion/inlining/getelem-getter-noninlined-call.js new file mode 100644 index 0000000000..e3b741e0ef --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/getelem-getter-noninlined-call.js @@ -0,0 +1,52 @@ +// With-Statements are not supported in Ion, therefore functions containing +// them can't be inlined in Ion. However it's still possible to inline the +// property access to the getter into a simple guard-shape instruction. + +// Defined outside of the test functions to ensure they're recognised as +// constants in Ion. +var atom = "prop"; +var symbol = Symbol(); + +function testAtom() { + var holder = { + get [atom]() { + with ({}) { + return 1; + } + } + }; + + function f() { + for (var i = 0; i < 1000; ++i) { + var x = holder[atom]; + assertEq(x, 1); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testAtom(); + +function testSymbol() { + var holder = { + get [symbol]() { + with ({}) { + return 1; + } + } + }; + + function f() { + for (var i = 0; i < 1000; ++i) { + var x = holder[symbol]; + assertEq(x, 1); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testSymbol(); diff --git a/js/src/jit-test/tests/ion/inlining/getelem-getter-own.js b/js/src/jit-test/tests/ion/inlining/getelem-getter-own.js new file mode 100644 index 0000000000..f2e5ce617b --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/getelem-getter-own.js @@ -0,0 +1,51 @@ +// Test for inlined getters for jsop_getelem accesses, where the getter is an +// own property. + +// Defined outside of the test functions to ensure they're recognised as +// constants in Ion. +var atom1 = "prop1"; +var atom2 = "prop2"; +var sym1 = Symbol(); +var sym2 = Symbol(); + +function testAtom() { + var holder = { + get [atom1]() { return 1; }, + get [atom2]() { return 2; }, + }; + + function f() { + for (var i = 0; i < 1000; ++i) { + var x = holder[atom1]; + var y = holder[atom2]; + assertEq(x, 1); + assertEq(y, 2); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testAtom(); + +function testSymbol() { + var holder = { + get [sym1]() { return 1; }, + get [sym2]() { return 2; }, + }; + + function f() { + for (var i = 0; i < 1000; ++i) { + var x = holder[sym1]; + var y = holder[sym2]; + assertEq(x, 1); + assertEq(y, 2); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testSymbol(); diff --git a/js/src/jit-test/tests/ion/inlining/getelem-getter-proto.js b/js/src/jit-test/tests/ion/inlining/getelem-getter-proto.js new file mode 100644 index 0000000000..8aab839f1e --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/getelem-getter-proto.js @@ -0,0 +1,55 @@ +// Test for inlined getters for jsop_getelem accesses, where the getter is a +// property on the prototype. + +// Defined outside of the test functions to ensure they're recognised as +// constants in Ion. +var atom1 = "prop1"; +var atom2 = "prop2"; +var sym1 = Symbol(); +var sym2 = Symbol(); + +function testAtom() { + var proto = { + get [atom1]() { return 1; }, + get [atom2]() { return 2; }, + }; + + var holder = Object.create(proto); + + function f() { + for (var i = 0; i < 1000; ++i) { + var x = holder[atom1]; + var y = holder[atom2]; + assertEq(x, 1); + assertEq(y, 2); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testAtom(); + +function testSymbol() { + var proto = { + get [sym1]() { return 1; }, + get [sym2]() { return 2; }, + }; + + var holder = Object.create(proto); + + function f() { + for (var i = 0; i < 1000; ++i) { + var x = holder[sym1]; + var y = holder[sym2]; + assertEq(x, 1); + assertEq(y, 2); + } + } + + for (var i = 0; i < 2; i++) { + f(); + } +} +testSymbol(); diff --git a/js/src/jit-test/tests/ion/inlining/inline-callarg-bailout-phi.js b/js/src/jit-test/tests/ion/inlining/inline-callarg-bailout-phi.js new file mode 100644 index 0000000000..06bc1f6efe --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/inline-callarg-bailout-phi.js @@ -0,0 +1,29 @@ +function add(x, y) { + if (x & 0x1) + return x + y; + else + return y + x; +} + +function runBinop(binop, lhs, rhs) { + return binop(lhs, rhs); +} + +//dis(run_binop); + +// Get the add function to compile. +var accum = 0; +for (var i = 0; i < 1000; ++i) + accum += add(1, 1); +assertEq(accum, 2000); + +// Get the runBinop function to compile and inline the add function. +var accum = 0; +for (var i = 0; i < 11000; ++i) + accum = runBinop(add, i, i); +assertEq(accum, 21998); + +var t30 = 1 << 30; +var t31 = t30 + t30; +var result = runBinop(add, t31, t31); +assertEq(result, Math.pow(2, 32)); diff --git a/js/src/jit-test/tests/ion/inlining/inline-callarg-bailout.js b/js/src/jit-test/tests/ion/inlining/inline-callarg-bailout.js new file mode 100644 index 0000000000..fad2c1a3bb --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/inline-callarg-bailout.js @@ -0,0 +1,26 @@ +function add(x, y) { + return x + y; +} + +function runBinop(binop, lhs, rhs) { + return binop(lhs, rhs); +} + +//dis(run_binop); + +// Get the add function to compile. +var accum = 0; +for (var i = 0; i < 1000; ++i) + accum += add(1, 1); +assertEq(accum, 2000); + +// Get the runBinop function to compile and inline the add function. +var accum = 0; +for (var i = 0; i < 10100; ++i) + accum = runBinop(add, i, i); +assertEq(accum, 20198); + +var t30 = 1 << 30; +var t31 = t30 + t30; +var result = runBinop(add, t31, t31); +assertEq(result, Math.pow(2, 32)); diff --git a/js/src/jit-test/tests/ion/inlining/inline-callarg-ubench-no-double2.js b/js/src/jit-test/tests/ion/inlining/inline-callarg-ubench-no-double2.js new file mode 100644 index 0000000000..385ea1a026 --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/inline-callarg-ubench-no-double2.js @@ -0,0 +1,27 @@ +function lameFunc(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +function runSomeTimes(func, iters) { + var result; + for (var i = 0; i < iters; ++i) { + result = func(42, 42); + result = func(42, 42); + } + return result; +} + +// First, run the inner function to get TI information. +for (var i = 0; i < 100; ++i) + lameFunc(42, 42); + +// Then, run the outer function with the inner function as a CALLARG to get it +// to Ion compile with inlining. +for (var i = 0; i < 11000; ++i) + runSomeTimes(lameFunc, 1); + +// Lastly, now that we're all inlined and compiled, perform the test! +var iterations = 100; +assertEq(84, runSomeTimes(lameFunc, iterations)); diff --git a/js/src/jit-test/tests/ion/inlining/inline-getelem-args.js b/js/src/jit-test/tests/ion/inlining/inline-getelem-args.js new file mode 100644 index 0000000000..41acaf6a04 --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/inline-getelem-args.js @@ -0,0 +1,59 @@ +function cat() { + var res = ""; + for (var i = 0; i < arguments.length; i++) + res += arguments[i]; + return res; +} + +function cat_m1(ion) { + var res = ""; + for (var i = (ion ? -1 : 0); i < arguments.length; i++) + res += arguments[i]; + return res; +} + +function cat_p1(ion) { + var res = ""; + for (var i = 0; i < arguments.length + (ion ? 1 : 0); i++) + res += arguments[i]; + return res; +} + +function sum() { + var res = 0; + for (var i = 0; i < arguments.length; i++) + res += arguments[i]; + return res; +} + +function wrapper() { + var res; + var i6 = { valueOf: () => 6 }, + i8 = 8.5, + s2 = { toString: () => "2" }, + s4 = {}, + s6 = "6", + s7 = undefined, + s8 = null; + for (var b = true; b; b = !inIon()) { + res = sum(1,2,3,4,5,i6,7,i8,9,10); + assertEq(res, 55.5); + + res = cat(true,s2,3,s4,5,s6,s7,s8); + assertEq(res, "true23[object Object]56undefinednull"); + + ion = inIon(); + if (typeof ion !== "boolean") break; + res = cat_m1(ion,1,s2,3,s4,5,s6,s7,s8); + if (ion) assertEq(res, "undefinedtrue123[object Object]56undefinednull"); + else assertEq(res, "false123[object Object]56undefinednull"); + + ion = inIon(); + if (typeof ion !== "boolean") break; + res = cat_p1(ion,1,s2,3,s4,5,s6,s7,s8); + if (ion) assertEq(res, "true123[object Object]56undefinednullundefined"); + else assertEq(res, "false123[object Object]56undefinednull"); + } +} + +wrapper(); diff --git a/js/src/jit-test/tests/ion/inlining/inline-istypedarray-on-nontypedarray.js b/js/src/jit-test/tests/ion/inlining/inline-istypedarray-on-nontypedarray.js new file mode 100644 index 0000000000..e1c540d19d --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/inline-istypedarray-on-nontypedarray.js @@ -0,0 +1,6 @@ +(new Int8Array(3)).join(); +[Math.abs, Math.abs].forEach(x => { + try { + Int8Array.prototype.join.call(x); + } catch(e) {} +}); diff --git a/js/src/jit-test/tests/ion/inlining/isFiniteInline.js b/js/src/jit-test/tests/ion/inlining/isFiniteInline.js new file mode 100644 index 0000000000..6f0897009b --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/isFiniteInline.js @@ -0,0 +1,15 @@ +/* Test inlining of Number.isFinite() */ + +for (var i = 0; i < 10_000; i++) { + assertEq(Number.isFinite(NaN), false); + assertEq(Number.isFinite(-NaN), false); + assertEq(Number.isFinite(+Infinity), false); + assertEq(Number.isFinite(-Infinity), false); + assertEq(Number.isFinite(3), true); + assertEq(Number.isFinite(3.141592654), true); + assertEq(Number.isFinite(+0), true); + assertEq(Number.isFinite(-0), true); + assertEq(Number.isFinite(-3), true); + assertEq(Number.isFinite(-3.141592654), true); + assertEq(Number.isFinite({}), false); +} diff --git a/js/src/jit-test/tests/ion/inlining/isNaNInline.js b/js/src/jit-test/tests/ion/inlining/isNaNInline.js new file mode 100644 index 0000000000..23766f7b5d --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/isNaNInline.js @@ -0,0 +1,15 @@ +/* Test inlining of Number.isNaN() */ + +for (var i = 0; i < 10_000; i++) { + assertEq(Number.isNaN(NaN), true); + assertEq(Number.isNaN(-NaN), true); + assertEq(Number.isNaN(+Infinity), false); + assertEq(Number.isNaN(-Infinity), false); + assertEq(Number.isNaN(3.14159), false); + assertEq(Number.isNaN(-3.14159), false); + assertEq(Number.isNaN(3), false); + assertEq(Number.isNaN(-3), false); + assertEq(Number.isNaN(+0), false); + assertEq(Number.isNaN(-0), false); + assertEq(Number.isNaN({}), false); +} diff --git a/js/src/jit-test/tests/ion/inlining/object-is-stricteq.js b/js/src/jit-test/tests/ion/inlining/object-is-stricteq.js new file mode 100644 index 0000000000..059c3f210c --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/object-is-stricteq.js @@ -0,0 +1,143 @@ +// Test when Object.is() is inlined as JSOP_STRICTEQ + +function SameValue(x, y) { + if (x === y) { + return (x !== 0) || (1 / x === 1 / y); + } + return (x !== x && y !== y); +} + +var compareTemplate = function compare(name, xs, ys) { + // Compare each entry in xs with each entry in ys and ensure Object.is + // computes the same result as SameValue. + for (var i = 0; i < 1000; ++i) { + var xi = (i % xs.length) | 0; + var yi = ((i + ((i / ys.length) | 0)) % ys.length) | 0; + + assertEq(Object.is(xs[xi], ys[yi]), SameValue(xs[xi], ys[yi]), name); + } +} + +const objects = { + plain: {}, + function: function(){}, + proxy: new Proxy({}, {}), +}; + +const sym = Symbol(); + +const testCases = [ + { + name: "Homogenous-Int32", + xs: [-1, 0, 1, 2, 0x7fffffff], + ys: [2, 1, 0, -5, -0x80000000], + }, + { + name: "Homogenous-Boolean", + xs: [true, false], + ys: [true, false], + }, + { + name: "Homogenous-Object", + xs: [{}, [], objects.plain, objects.proxy], + ys: [{}, objects.function, objects.plain, objects.proxy], + }, + { + name: "Homogenous-String", + xs: ["", "abc", "αβγαβγ", "𝐀𝐁𝐂𝐀𝐁𝐂", "ABCabc"], + ys: ["abc", "ABC", "ABCABC", "αβγαβγ", "𝐀𝐁𝐂𝐀𝐁𝐂"], + }, + { + name: "Homogenous-Symbol", + xs: [Symbol.iterator, Symbol(), Symbol.for("object-is"), sym], + ys: [sym, Symbol.match, Symbol(), Symbol.for("object-is-two")], + }, + { + name: "Homogenous-Null", + xs: [null, null], + ys: [null, null], + }, + { + name: "Homogenous-Undefined", + xs: [undefined, undefined], + ys: [undefined, undefined], + }, + + // Note: Values must not include floating-point types! + { + name: "String-Value", + xs: ["", "abc", "αβγαβγ", "𝐀𝐁𝐂𝐀𝐁𝐂"], + ys: [null, undefined, sym, true, 0, "", {}], + }, + { + name: "Null-Value", + xs: [null, null], + ys: [null, undefined, sym, true, 0, "", {}], + }, + { + name: "Undefined-Value", + xs: [undefined, undefined], + ys: [null, undefined, sym, true, 0, "", {}], + }, + { + name: "Boolean-Value", + xs: [true, false], + ys: [null, undefined, sym, true, 0, "", {}], + }, + + // Note: Values must not include floating-point types! + { + name: "Value-String", + xs: [null, undefined, sym, true, 0, "", {}], + ys: ["", "abc", "αβγαβγ", "𝐀𝐁𝐂𝐀𝐁𝐂"], + }, + { + name: "Value-Null", + xs: [null, undefined, sym, true, 0, "", {}], + ys: [null, null], + }, + { + name: "Value-Undefined", + xs: [null, undefined, sym, true, 0, "", {}], + ys: [undefined, undefined], + }, + { + name: "Value-Boolean", + xs: [null, undefined, sym, true, 0, "", {}], + ys: [undefined, undefined], + }, + + // Strict-equal comparison can be optimized to bitwise comparison when + // string types are not possible. + // Note: Values must not include floating-point types! + { + name: "Value-Value", + xs: [null, undefined, sym, true, 0, {}], + ys: [null, undefined, sym, true, 0, {}], + }, + { + name: "ValueMaybeString-ValueMaybeString", + xs: [null, undefined, sym, true, 0, "", {}], + ys: [null, undefined, sym, true, 0, "", {}], + }, + { + name: "Value-ValueMaybeString", + xs: [null, undefined, sym, true, 0, {}], + ys: [null, undefined, sym, true, 0, "", {}], + }, + { + name: "ValueMaybeString-Value", + xs: [null, undefined, sym, true, 0, "", {}], + ys: [null, undefined, sym, true, 0, {}], + }, +]; + +for (let {name, xs, ys} of testCases) { + // Create a separate function for each test case. + // Use indirect eval to avoid possible direct eval deopts. + const compare = (0, eval)(`(${compareTemplate})`); + + for (let i = 0; i < 5; ++i) { + compare(name, xs, ys); + } +} diff --git a/js/src/jit-test/tests/ion/inlining/typedarray-data-inlining-neuter-samedata.js b/js/src/jit-test/tests/ion/inlining/typedarray-data-inlining-neuter-samedata.js new file mode 100644 index 0000000000..16478e0a06 --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/typedarray-data-inlining-neuter-samedata.js @@ -0,0 +1,28 @@ +var NONINLINABLE_AMOUNT = 40; +var SIZEOF_INT32 = 4; + +var INLINABLE_INT8_AMOUNT = 4; + +// Large arrays with non-inline data + +var ab1 = new ArrayBuffer(NONINLINABLE_AMOUNT * SIZEOF_INT32); +var ta1 = new Int32Array(ab1); +for (var i = 0; i < ta1.length; i++) + ta1[i] = i + 43; +function q1() { return ta1[NONINLINABLE_AMOUNT - 1]; } +assertEq(q1(), NONINLINABLE_AMOUNT - 1 + 43); +assertEq(q1(), NONINLINABLE_AMOUNT - 1 + 43); +detachArrayBuffer(ab1); +assertEq(q1(), undefined); + +// Small arrays with inline data + +var ab2 = new ArrayBuffer(INLINABLE_INT8_AMOUNT); +var ta2 = new Int8Array(ab2); +for (var i = 0; i < ta2.length; i++) + ta2[i] = i + 13; +function q2() { return ta2[INLINABLE_INT8_AMOUNT - 1]; } +assertEq(q2(), INLINABLE_INT8_AMOUNT - 1 + 13); +assertEq(q2(), INLINABLE_INT8_AMOUNT - 1 + 13); +detachArrayBuffer(ab2); +assertEq(q2(), undefined); diff --git a/js/src/jit-test/tests/ion/inlining/typedarray-large-length.js b/js/src/jit-test/tests/ion/inlining/typedarray-large-length.js new file mode 100644 index 0000000000..9e6d67d3b3 --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/typedarray-large-length.js @@ -0,0 +1,10 @@ +var SINGLETON_BYTE_LENGTH = 1024 * 1024 * 10; + +for (var i = 0; i < 2000; i++) { + if (i == 1500) + len = SINGLETON_BYTE_LENGTH >> 3; + else + len = i % 64; + var arr = new Float64Array(len); + assertEq(arr[0], len ? 0 : undefined); +} diff --git a/js/src/jit-test/tests/ion/inlining/typedarray-length-inlining-neuter.js b/js/src/jit-test/tests/ion/inlining/typedarray-length-inlining-neuter.js new file mode 100644 index 0000000000..520dd1a38b --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/typedarray-length-inlining-neuter.js @@ -0,0 +1,22 @@ +var INLINE_INT8_AMOUNT = 4; +var OUT_OF_LINE_INT8_AMOUNT = 237; + +// Small and inline + +var ab1 = new ArrayBuffer(INLINE_INT8_AMOUNT); +var ta1 = new Int8Array(ab1); +function q1() { return ta1.length; } +q1(); +q1(); +detachArrayBuffer(ab1); +assertEq(q1(), 0); + +// Large and out-of-line + +var ab2 = new ArrayBuffer(OUT_OF_LINE_INT8_AMOUNT); +var ta2 = new Int8Array(ab2); +function q2() { return ta2.length; } +q2(); +q2(); +detachArrayBuffer(ab2); +assertEq(q2(), 0); diff --git a/js/src/jit-test/tests/ion/instanceof-mutate-proto.js b/js/src/jit-test/tests/ion/instanceof-mutate-proto.js new file mode 100644 index 0000000000..e3e057ec4f --- /dev/null +++ b/js/src/jit-test/tests/ion/instanceof-mutate-proto.js @@ -0,0 +1,13 @@ +function g(i) { + with(this) {}; // Don't inline. + if (i === 1500) + String.prototype.__proto__ = Array.prototype; +} +function f() { + var arr = new String("A"); + for (var i=0; i<2000; i++) { + g(i); + assertEq(arr instanceof Array, i >= 1500); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/invalidation/easy-invalidate.js b/js/src/jit-test/tests/ion/invalidation/easy-invalidate.js new file mode 100644 index 0000000000..ccade26dc6 --- /dev/null +++ b/js/src/jit-test/tests/ion/invalidation/easy-invalidate.js @@ -0,0 +1,5 @@ +// When run with eager, invalidation will be forced immediately. + +(function(o) { + o.s; +})({}); diff --git a/js/src/jit-test/tests/ion/invalidation/framedescriptors.js b/js/src/jit-test/tests/ion/invalidation/framedescriptors.js new file mode 100644 index 0000000000..562ddf9f66 --- /dev/null +++ b/js/src/jit-test/tests/ion/invalidation/framedescriptors.js @@ -0,0 +1,40 @@ +var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ +function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} +function core_md5(x, len) { + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + for(var i = 0; i < x.length; i += 16) + c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); +} +function md5_cmn(q, a, b, x, s, t) { + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); +} +function md5_ff(a, b, c, d, x, s, t) { + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function safe_add(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} +function bit_rol(num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)); +} +function str2binl(str) { + var bin = Array(); + var mask = (1 << chrsz) - 1; + for(var i = 0; i < str.length * chrsz; i += chrsz) + bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); + return bin; +} +function binl2hex(binarray) {} +var plainText = "Rebellious subjects, enemies to peace,\n\ +Throw your mistemper'd weapons to the ground,\n\ +To know our further pleasure in this case,\n\ +To old Free-town, our common judgment-place.\n\ +Once more, on pain of death, all men depart." +for (var i = 0; i <4; i++) + plainText += plainText; +var md5Output = hex_md5(plainText); diff --git a/js/src/jit-test/tests/ion/invalidation/outofline.js b/js/src/jit-test/tests/ion/invalidation/outofline.js new file mode 100644 index 0000000000..17976d752b --- /dev/null +++ b/js/src/jit-test/tests/ion/invalidation/outofline.js @@ -0,0 +1,22 @@ +// Breaks with --ion -n. See bug 718122. + +function Foo() +{ } + +Foo.prototype.bar = function(){ + print("yes hello"); + return 5; +} + +var x = new Foo(); + +function f(x) { + // Enter Ion. + for (var i=0; i < 41; i++); + + // At this point we have no type information for the GetPropertyCache below. + // This causes the cache to be typed as Value. + x.bar(); +} + +f(x); diff --git a/js/src/jit-test/tests/ion/invalidation/recursive-invalidate.js b/js/src/jit-test/tests/ion/invalidation/recursive-invalidate.js new file mode 100644 index 0000000000..509a9992c4 --- /dev/null +++ b/js/src/jit-test/tests/ion/invalidation/recursive-invalidate.js @@ -0,0 +1,21 @@ +var causeOSI = true; + +function rec(x, self) { + if (x === 0 || x !== x) { + if (causeOSI) { + causeOSI = false; + self(NaN, self) + causeOSI = true; + } + return; + } + self(x - 1, self); +} + +// Use enough iterations to type infer the script. +causeOSI = false; +for (var i = 0; i < 20; ++i) + rec(1, rec); +causeOSI = true; + +rec(2, rec) diff --git a/js/src/jit-test/tests/ion/is-constructing.js b/js/src/jit-test/tests/ion/is-constructing.js new file mode 100644 index 0000000000..82224321e8 --- /dev/null +++ b/js/src/jit-test/tests/ion/is-constructing.js @@ -0,0 +1,62 @@ +var isConstructing = getSelfHostedValue("IsConstructing"); + +function testBasic() { + var f = function(expected) { + with(this) {}; // Don't inline. + assertEq(isConstructing(), expected); + }; + for (var i=0; i<40; i++) { + f(false); + new f(true); + } +} +testBasic(); + +function testGeneric() { + var f1 = function(expected) { + with(this) {}; + assertEq(isConstructing(), expected); + }; + var f2 = function(expected) { + assertEq(isConstructing(), expected); + } + var funs = [f1, f2]; + for (var i=0; i<40; i++) { + var f = funs[i % 2]; + f(false); + new f(true); + } +} +testGeneric(); + +function testArgsRectifier() { + var f = function(x) { + with(this) {}; + assertEq(isConstructing(), true); + }; + for (var i=0; i<40; i++) + new f(); +} +testArgsRectifier(); + +function testBailout() { + var f1 = function(x, expected) { + if (x > 20) { + bailout(); + assertEq(isConstructing(), expected); + } + }; + var f2 = function(x) { + return new f1(x, true); + }; + var f3 = function(x) { + return f1(x, false); + }; + for (var i=0; i<40; i++) { + f2(i); + f3(i); + } + for (var i=0; i<40; i++) + f1(i, false); +} +testBailout(); diff --git a/js/src/jit-test/tests/ion/isArray.js b/js/src/jit-test/tests/ion/isArray.js new file mode 100644 index 0000000000..db79122935 --- /dev/null +++ b/js/src/jit-test/tests/ion/isArray.js @@ -0,0 +1,47 @@ +function f() { + assertEq(Array.isArray(10), false); + assertEq(Array.isArray([]), true); + assertEq(Array.isArray(Math), false); + + var objs = [{}, []]; + for (var i=0; i 1); + test(obj, () => 2); +} + +assertEq(test({x: 1, y: 2}, (o) => delete o.y), 1); +assertEq(test([1,2], (o) => delete o[1]), 1); +assertEq(test([1,2], (o) => {o.length = 0}), 1); + +assertEq(test({x: 1, y: 2, z: 3}, (o) => delete o.y), 4); +assertEq(test([1,2,3], (o) => delete o[1]), 4); +assertEq(test([1,2,3,4], (o) => {o.length = 2}), 3); + +assertEq(test({x: 1, y: 2, z: 3}, (o) => delete o.x), 6); +assertEq(test([1,2,3], (o) => delete o[0]), 6); +assertEq(test([1], (o) => {o.length = 0}), 1); diff --git a/js/src/jit-test/tests/ion/iterator-indices-4.js b/js/src/jit-test/tests/ion/iterator-indices-4.js new file mode 100644 index 0000000000..f71d5014f8 --- /dev/null +++ b/js/src/jit-test/tests/ion/iterator-indices-4.js @@ -0,0 +1,19 @@ +function id(x) { return x; } + +function foo(obj) { + for (var key in obj) { + assertEq(id(obj[key]), obj[key]); + } +} + +var arr = []; +for (var i = 0; i < 8; i++) { + var obj = {["x" + i]: 1}; + arr.push(obj); +} + +with ({}) {} +for (var i = 0; i < 1000; i++) { + let obj = arr[i % arr.length]; + foo(obj); +} diff --git a/js/src/jit-test/tests/ion/iterator-indices-5.js b/js/src/jit-test/tests/ion/iterator-indices-5.js new file mode 100644 index 0000000000..6982b26d2d --- /dev/null +++ b/js/src/jit-test/tests/ion/iterator-indices-5.js @@ -0,0 +1,30 @@ +function bar(o, trigger) { + with ({}) {} + if (trigger) { + Object.defineProperty(o, "y", { + get() { return 3; } + }); + } +} + +function foo(o, trigger) { + var result; + for (var key in o) { + result = o[key]; + bar(o, trigger); + } + return result; +} + +var arr = []; +for (var i = 0; i < 10; i++) { + arr.push({["x" + i]: 0, y: 0}); +} + +with ({}) {} +for (var i = 0; i < 1000; i++) { + for (var o of arr) { + foo(o, false) + } +} +print(foo(arr[0], true)); diff --git a/js/src/jit-test/tests/ion/iterator-indices-6.js b/js/src/jit-test/tests/ion/iterator-indices-6.js new file mode 100644 index 0000000000..bf36aa97c2 --- /dev/null +++ b/js/src/jit-test/tests/ion/iterator-indices-6.js @@ -0,0 +1,28 @@ +var iters = 0; + +function test(o1, o2) { + var count = 0; + for (var s1 in o1) { + for (var s2 in o2) { + if (Object.hasOwn(o1, s1)) { + count += o1[s1]; + } + if (Object.hasOwn(o2, s2)) { + count += o2[s2]; + } + } + } + assertEq(count, 2); +} + +var arr = []; +for (var i = 0; i < 20; i++) { + arr.push({["x_" + i]: 1}); +} + +with ({}) {} +for (var i = 0; i < 2000; i++) { + var idx1 = i % arr.length; + var idx2 = 1 + i % (arr.length - 1); + test(arr[idx1], arr[idx2]); +} diff --git a/js/src/jit-test/tests/ion/iterator-indices-7.js b/js/src/jit-test/tests/ion/iterator-indices-7.js new file mode 100644 index 0000000000..09d0e338ac --- /dev/null +++ b/js/src/jit-test/tests/ion/iterator-indices-7.js @@ -0,0 +1,25 @@ +function test(obj, expected) { + var actual = 0; + for (var s in obj) { + actual += obj[s]; + } + assertEq(actual, expected); +} + +var arr = []; +var elem_obj = []; +for (var i = 0; i < 20; i++) { + var obj = {}; + for (var j = 0; j < i; j++) { + obj["x_" + i + "_" + j] = 1; + } + arr.push(obj); + elem_obj.push(1); +} +arr.push(elem_obj); + +with ({}) {} +for (var i = 0; i < 2000; i++) { + var idx = i % arr.length; + test(arr[idx], idx); +} diff --git a/js/src/jit-test/tests/ion/iterator-indices-8.js b/js/src/jit-test/tests/ion/iterator-indices-8.js new file mode 100644 index 0000000000..b27cd5f4dc --- /dev/null +++ b/js/src/jit-test/tests/ion/iterator-indices-8.js @@ -0,0 +1,32 @@ +// Tests megamorphic stores to fixed and dynamics slots, and dense elements +function test(obj) { + let index = 0; + for (var s in obj) { + obj[s] = index; + index++; + } + index = 0; + for (var s in obj) { + assertEq(obj[s], index); + index++; + } +} + +var arr = []; +var elem_obj = []; +for (var i = 0; i < 20; i++) { + var obj = {}; + for (var j = 0; j < i; j++) { + obj["x_" + i + "_" + j] = 1; + } + arr.push(obj); + elem_obj.push(1); +} +arr.push(elem_obj); + +with ({}) {} +for (var i = 0; i < 2000; i++) { + var idx = i % arr.length; + test(arr[idx]); +} + diff --git a/js/src/jit-test/tests/ion/iterator-indices-9.js b/js/src/jit-test/tests/ion/iterator-indices-9.js new file mode 100644 index 0000000000..631beee5d3 --- /dev/null +++ b/js/src/jit-test/tests/ion/iterator-indices-9.js @@ -0,0 +1,34 @@ +// Tests SetPropertyCache sets to object. +function test(obj) { + let index = 0; + for (var s in obj) { + if (s.startsWith("test")) { + obj[s] = index; + } + index++; + } + index = 0; + for (var s in obj) { + if (s.startsWith("test")) { + assertEq(obj[s], index); + } + index++; + } +} + +var arr = []; +for (var i = 0; i < 2; i++) { + var obj = {}; + for (var j = 0; j < i * 20; j++) { + obj["x_" + i + "_" + j] = 1; + } + obj.testKey = 1; + arr.push(obj); +} + +with ({}) {} +for (var i = 0; i < 2000; i++) { + var idx = i % arr.length; + test(arr[idx]); +} + diff --git a/js/src/jit-test/tests/ion/known-class.js b/js/src/jit-test/tests/ion/known-class.js new file mode 100644 index 0000000000..61e6f2afe2 --- /dev/null +++ b/js/src/jit-test/tests/ion/known-class.js @@ -0,0 +1,121 @@ +var IsRegExpObject = getSelfHostedValue("IsRegExpObject"); +var IsCallable = getSelfHostedValue("IsCallable"); +var NewArrayIterator = getSelfHostedValue("NewArrayIterator"); +var GuardToArrayIterator = getSelfHostedValue("GuardToArrayIterator"); + +function array() { + var a = [0]; + assertEq(Array.isArray(a), true); + assertEq(typeof a, "object"); + assertEq(IsRegExpObject(a), false); + assertEq(IsCallable(a), false); +} + +function array2(x) { + var a; + if (x) { + a = [0]; + } else { + a = [1]; + } + assertEq(Array.isArray(a), true); + assertEq(typeof a, "object"); + assertEq(IsRegExpObject(a), false); + assertEq(IsCallable(a), false); +} + +function object() { + var o = {a: 1}; + assertEq(Array.isArray(o), false); + assertEq(typeof o, "object"); + assertEq(IsRegExpObject(o), false); + assertEq(IsCallable(o), false); +} + +function object2(x) { + var o; + if (x) { + o = {a: 1}; + } else { + o = {b: 1}; + } + assertEq(Array.isArray(o), false); + assertEq(typeof o, "object"); + assertEq(IsRegExpObject(o), false); + assertEq(IsCallable(o), false); +} + +function mixed(x) { + var o; + if (x) { + o = [1]; + } else { + o = {a: 1}; + } + assertEq(Array.isArray(o), x); + assertEq(typeof o, "object"); + assertEq(IsRegExpObject(o), false); + assertEq(IsCallable(o), false); +} + +function lambda() { + function f() {} + assertEq(Array.isArray(f), false); + assertEq(typeof f, "function"); + assertEq(IsRegExpObject(f), false); + assertEq(IsCallable(f), true); +} + +function arrow() { + var f = () => {}; + assertEq(Array.isArray(f), false); + assertEq(typeof f, "function"); + assertEq(IsRegExpObject(f), false); + assertEq(IsCallable(f), true); +} + +function regexp() { + var r = /a/; + assertEq(Array.isArray(r), false); + assertEq(typeof r, "object"); + assertEq(IsRegExpObject(r), true); + assertEq(IsCallable(r), false); +} + +function regexp2(x) { + var a; + if (x) { + a = /a/; + } else { + a = /b/; + } + assertEq(Array.isArray(a), false); + assertEq(typeof a, "object"); + assertEq(IsRegExpObject(a), true); + assertEq(IsCallable(a), false); +} + +function iterator() { + var i = NewArrayIterator(); + assertEq(Array.isArray(i), false); + assertEq(typeof i, "object"); + assertEq(IsRegExpObject(i), false); + assertEq(IsCallable(i), false); + assertEq(GuardToArrayIterator(i), i); +} + +var b = true; +for (var i = 0; i < 1e4; i++) { + array(); + array2(b); + object(); + object2(b); + mixed(b); + lambda(); + arrow(); + regexp() + regexp2(b); + iterator(); + + b = !b; +} diff --git a/js/src/jit-test/tests/ion/lambda.js b/js/src/jit-test/tests/ion/lambda.js new file mode 100644 index 0000000000..8960763e5a --- /dev/null +++ b/js/src/jit-test/tests/ion/lambda.js @@ -0,0 +1,25 @@ +function test1(i) { + var g1 = 20; + function g1() { + return 10; + } + assertEq(g1, 20); + + function g2(x) { + return x + 1; + } + return g2(i); +} +for (var i=0; i<100; i++) { + assertEq(test1(i), i + 1); +} + +var c = 0; +function test2(arr) { + for (var i=0; i<100; i++) { + arr.sort(function(a, b) { c += a + b; return 0; }); + } + return c; +} +test2([1, 2, 3]); +assertEq(c, 800); diff --git a/js/src/jit-test/tests/ion/lazyLink-bug1150783.js b/js/src/jit-test/tests/ion/lazyLink-bug1150783.js new file mode 100644 index 0000000000..518081a4fb --- /dev/null +++ b/js/src/jit-test/tests/ion/lazyLink-bug1150783.js @@ -0,0 +1,34 @@ +var path = ''; + +// trigger off-main-thread compilation +for (var i = 0; i < 11; i++) + path.substr(-1); + +// maybe link to the the result of the off-main-thread compilation. +function load(unsigned) { + if (unsigned) + path.substr(-1); +} + +(function(global, env) { + 'use asm'; + var load = env.load; + function _main() { + var $l1 = 0, $l2 = 0, $l3 = 0; + do { + load(); + $l1 = $l1 + 1 | 0; + } while (($l1 | 0) != 10); + load(1); + load(1); + do { + load(); + $l2 = $l2 + 1 | 0; + } while (($l2 | 0) != 1024); + while (($l3 | 0) < 10000) { + load(1); + $l3 = $l3 + 1 | 0; + } + } + return _main; +})({}, { 'load':load })(); diff --git a/js/src/jit-test/tests/ion/lexical-check-1.js b/js/src/jit-test/tests/ion/lexical-check-1.js new file mode 100644 index 0000000000..e1ba1baa17 --- /dev/null +++ b/js/src/jit-test/tests/ion/lexical-check-1.js @@ -0,0 +1,15 @@ +function f() { + const x = 42; + function g() { + var s = 0; + for (var i = 100; i--;) + s += x; + return s; + } + return g; +} + +var func = f(); +for (var i = 200; i--;) + assertEq(func(), 4200); + diff --git a/js/src/jit-test/tests/ion/lexical-check-2.js b/js/src/jit-test/tests/ion/lexical-check-2.js new file mode 100644 index 0000000000..30dbb67b97 --- /dev/null +++ b/js/src/jit-test/tests/ion/lexical-check-2.js @@ -0,0 +1,22 @@ +function f(i) { + if (i == 1500) + g(); + const x = 42; + function g() { + return x; + } + return g; +} + +var caught = false; +var i; +try { + for (i = 0; i < 2000; i++) + assertEq(f(i)(), 42); +} catch(e) { + assertEq(e instanceof ReferenceError, true); + assertEq(i, 1500); + caught = true; +} +assertEq(caught, true); + diff --git a/js/src/jit-test/tests/ion/lexical-check-3.js b/js/src/jit-test/tests/ion/lexical-check-3.js new file mode 100644 index 0000000000..c42137844a --- /dev/null +++ b/js/src/jit-test/tests/ion/lexical-check-3.js @@ -0,0 +1,26 @@ +// |jit-test| skip-if: getBuildConfiguration("arm64") +// +// Test skipped on ARM64 due to bug 1546742. +function f() { + + function g(n) { + n = n|0; + var s = 0; + for (var i = 0; (i = i + 1 |0) < 1000;) { + s = s * i; + if (!n) { + s = x; + } + } + return s; + } + + return g; + let x; +} + +var func = f(); +var r; +for (var i = 0; i < 2000; i++) + r = func(i + 1); +assertEq(r, 0); diff --git a/js/src/jit-test/tests/ion/lexical-check-4.js b/js/src/jit-test/tests/ion/lexical-check-4.js new file mode 100644 index 0000000000..6812674e44 --- /dev/null +++ b/js/src/jit-test/tests/ion/lexical-check-4.js @@ -0,0 +1,15 @@ +var caught = false; +try { + (function() { + let x = (function f(y) { + if (y == 0) { + x + return + } + return f(y - 1) + })(3) + })() +} catch(e) { + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/ion/lexical-check-5.js b/js/src/jit-test/tests/ion/lexical-check-5.js new file mode 100644 index 0000000000..78b1ece661 --- /dev/null +++ b/js/src/jit-test/tests/ion/lexical-check-5.js @@ -0,0 +1,7 @@ +// |jit-test| error: ReferenceError + +{ + for (var i = 0; i < 100; i++) + a += i; + let a = 1; +} diff --git a/js/src/jit-test/tests/ion/lexical-check-6.js b/js/src/jit-test/tests/ion/lexical-check-6.js new file mode 100644 index 0000000000..5af7686aee --- /dev/null +++ b/js/src/jit-test/tests/ion/lexical-check-6.js @@ -0,0 +1,39 @@ +// This function uses UCE to test when the if branch is removed by +// IonMonkey. Some optimization such as Scalar Replacement are able to remove +// the scope chain, which can cause issues when the scope chain properties are +// not initialized properly. +var uceFault = function (i) { + if (i % 1500 == 0) { + uceFault = function (i) { return i % 1500 == 0; }; + } + return false; +}; + +function f(i) { + if (uceFault(i) || uceFault(i)) + g(); + const x = 42; + function g() { + return x; + } + return g; +} + +function loop() { + for (; i < 4000; i++) + assertEq(f(i)(), 42); +} + +var caught = 0; +var i = 1; +while (i < 4000) { + try { + loop(); + } catch(e) { + assertEq(e instanceof ReferenceError, true); + assertEq(i == 1500 || i == 3000, true); + caught += 1; + i++; + } +} +assertEq(caught, 2); diff --git a/js/src/jit-test/tests/ion/lookupswitch.js b/js/src/jit-test/tests/ion/lookupswitch.js new file mode 100644 index 0000000000..6e778d39ae --- /dev/null +++ b/js/src/jit-test/tests/ion/lookupswitch.js @@ -0,0 +1,3974 @@ +///////////////////////////////////////// +// This is a generated file! +// See jit-tests/etc/generate-lookupswitch-tests.js for the code +// that generated this code! +///////////////////////////////////////// + +///////////////////////////////////////// +// PRELUDE // +///////////////////////////////////////// + +// Avoid eager compilation of the global-scope. +try{} catch (x) {}; + +function ASSERT(cond, msg) { + assertEq(cond, true, msg); +} +function IsNull(x) { + return typeof x == "object" && x == null; +} +function IsNum(x) { + return typeof x == "number"; +} +function ArraysEqual(arr1, arr2) { + ASSERT(arr1.length == arr2.length, "Lengths not equal"); + for (var i = 0; i < arr1.length; i++) { + ASSERT(typeof arr1[i] == typeof arr2[i], "Types not equal for position " + i); + ASSERT(arr1[i] == arr2[i], "Values not equal for position " + i); + } +} +function InterpretSwitch(spec, input, outputArray) { + var foundMatch = undefined, foundDefault = undefined; + for (var i = 0; i < spec.length; i++) { + var caseSpec = spec[i], match = caseSpec.match; + if (IsNull(match)) { + foundDefault = i; + continue; + } else if (match === input) { + foundMatch = i; + break; + } + } + var matchI = IsNum(foundMatch) ? foundMatch : foundDefault; + if (IsNum(matchI)) { + for (var i = matchI; i < spec.length; i++) { + var caseSpec = spec[i], match = caseSpec.match, body = caseSpec.body, fallthrough = caseSpec.fallthrough; + if (!IsNull(body)) { + outputArray.push(body); + } + if (!fallthrough) { + break; + } + } + } +} +function RunTest(test) { + var inputs = test.INPUTS; + inputs.push("UNMATCHED_CASE"); + var spec = test.SPEC; + var results1 = []; + for (var i = 0; i < 80; i++) { + for (var j = 0; j < inputs.length; j++) { + test(inputs[j], results1); + } + } + var results2 = []; + for (var i = 0; i < 80; i++) { + for (var j = 0; j < inputs.length; j++) { + InterpretSwitch(spec, inputs[j], results2); + } + } + ArraysEqual(results1, results2); +} + +///////////////////////////////////////// +// TEST CASES // +///////////////////////////////////////// + +var TESTS = []; +function test_1(x, arr) { + switch(x) { + default: + case 'foo': + arr.push(777087170); + break; + case 'bar': + arr.push(641037838); + break; + case 'zing': + arr.push(1652156613); + break; + } +} +test_1.INPUTS = ['foo', 'bar', 'zing']; +test_1.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":777087170,"fallthrough":false},{"match":"bar","body":641037838,"fallthrough":false},{"match":"zing","body":1652156613,"fallthrough":false}]; +TESTS.push(test_1); + +function test_2(x, arr) { + switch(x) { + case 'foo': + arr.push(777087170); + break; + default: + case 'bar': + arr.push(641037838); + break; + case 'zing': + arr.push(1652156613); + break; + } +} +test_2.INPUTS = ['foo', 'bar', 'zing']; +test_2.SPEC = [{"match":"foo","body":777087170,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":641037838,"fallthrough":false},{"match":"zing","body":1652156613,"fallthrough":false}]; +TESTS.push(test_2); + +function test_3(x, arr) { + switch(x) { + case 'foo': + arr.push(777087170); + break; + case 'bar': + arr.push(641037838); + break; + case 'zing': + arr.push(1652156613); + break; + default: + } +} +test_3.INPUTS = ['foo', 'bar', 'zing']; +test_3.SPEC = [{"match":"foo","body":777087170,"fallthrough":false},{"match":"bar","body":641037838,"fallthrough":false},{"match":"zing","body":1652156613,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_3); + +function test_4(x, arr) { + switch(x) { + default: + arr.push(633415567); + case 'foo': + arr.push(777087170); + break; + case 'bar': + arr.push(641037838); + break; + case 'zing': + arr.push(1652156613); + break; + } +} +test_4.INPUTS = ['foo', 'bar', 'zing']; +test_4.SPEC = [{"match":null,"body":633415567,"fallthrough":true},{"match":"foo","body":777087170,"fallthrough":false},{"match":"bar","body":641037838,"fallthrough":false},{"match":"zing","body":1652156613,"fallthrough":false}]; +TESTS.push(test_4); + +function test_5(x, arr) { + switch(x) { + case 'foo': + arr.push(777087170); + break; + default: + arr.push(633415567); + case 'bar': + arr.push(641037838); + break; + case 'zing': + arr.push(1652156613); + break; + } +} +test_5.INPUTS = ['foo', 'bar', 'zing']; +test_5.SPEC = [{"match":"foo","body":777087170,"fallthrough":false},{"match":null,"body":633415567,"fallthrough":true},{"match":"bar","body":641037838,"fallthrough":false},{"match":"zing","body":1652156613,"fallthrough":false}]; +TESTS.push(test_5); + +function test_6(x, arr) { + switch(x) { + case 'foo': + arr.push(777087170); + break; + case 'bar': + arr.push(641037838); + break; + case 'zing': + arr.push(1652156613); + break; + default: + arr.push(633415567); + } +} +test_6.INPUTS = ['foo', 'bar', 'zing']; +test_6.SPEC = [{"match":"foo","body":777087170,"fallthrough":false},{"match":"bar","body":641037838,"fallthrough":false},{"match":"zing","body":1652156613,"fallthrough":false},{"match":null,"body":633415567,"fallthrough":true}]; +TESTS.push(test_6); + +function test_7(x, arr) { + switch(x) { + default: + arr.push('5zO^Qj'); + break; + case 'foo': + arr.push(777087170); + break; + case 'bar': + arr.push(641037838); + break; + case 'zing': + arr.push(1652156613); + break; + } +} +test_7.INPUTS = ['foo', 'bar', 'zing']; +test_7.SPEC = [{"match":null,"body":"5zO^Qj","fallthrough":false},{"match":"foo","body":777087170,"fallthrough":false},{"match":"bar","body":641037838,"fallthrough":false},{"match":"zing","body":1652156613,"fallthrough":false}]; +TESTS.push(test_7); + +function test_8(x, arr) { + switch(x) { + case 'foo': + arr.push(777087170); + break; + default: + arr.push('5zO^Qj'); + break; + case 'bar': + arr.push(641037838); + break; + case 'zing': + arr.push(1652156613); + break; + } +} +test_8.INPUTS = ['foo', 'bar', 'zing']; +test_8.SPEC = [{"match":"foo","body":777087170,"fallthrough":false},{"match":null,"body":"5zO^Qj","fallthrough":false},{"match":"bar","body":641037838,"fallthrough":false},{"match":"zing","body":1652156613,"fallthrough":false}]; +TESTS.push(test_8); + +function test_9(x, arr) { + switch(x) { + case 'foo': + arr.push(777087170); + break; + case 'bar': + arr.push(641037838); + break; + case 'zing': + arr.push(1652156613); + break; + default: + arr.push('5zO^Qj'); + break; + } +} +test_9.INPUTS = ['foo', 'bar', 'zing']; +test_9.SPEC = [{"match":"foo","body":777087170,"fallthrough":false},{"match":"bar","body":641037838,"fallthrough":false},{"match":"zing","body":1652156613,"fallthrough":false},{"match":null,"body":"5zO^Qj","fallthrough":false}]; +TESTS.push(test_9); + +function test_10(x, arr) { + switch(x) { + default: + case 'foo': + break; + case 'bar': + arr.push('c'); + break; + case 'zing': + arr.push(2008006064); + break; + } +} +test_10.INPUTS = ['foo', 'bar', 'zing']; +test_10.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":"c","fallthrough":false},{"match":"zing","body":2008006064,"fallthrough":false}]; +TESTS.push(test_10); + +function test_11(x, arr) { + switch(x) { + case 'foo': + break; + default: + case 'bar': + arr.push('c'); + break; + case 'zing': + arr.push(2008006064); + break; + } +} +test_11.INPUTS = ['foo', 'bar', 'zing']; +test_11.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":"c","fallthrough":false},{"match":"zing","body":2008006064,"fallthrough":false}]; +TESTS.push(test_11); + +function test_12(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + arr.push('c'); + break; + case 'zing': + arr.push(2008006064); + break; + default: + } +} +test_12.INPUTS = ['foo', 'bar', 'zing']; +test_12.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":"c","fallthrough":false},{"match":"zing","body":2008006064,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_12); + +function test_13(x, arr) { + switch(x) { + default: + arr.push('M'); + case 'foo': + break; + case 'bar': + arr.push('c'); + break; + case 'zing': + arr.push(2008006064); + break; + } +} +test_13.INPUTS = ['foo', 'bar', 'zing']; +test_13.SPEC = [{"match":null,"body":"M","fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":"c","fallthrough":false},{"match":"zing","body":2008006064,"fallthrough":false}]; +TESTS.push(test_13); + +function test_14(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push('M'); + case 'bar': + arr.push('c'); + break; + case 'zing': + arr.push(2008006064); + break; + } +} +test_14.INPUTS = ['foo', 'bar', 'zing']; +test_14.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":"M","fallthrough":true},{"match":"bar","body":"c","fallthrough":false},{"match":"zing","body":2008006064,"fallthrough":false}]; +TESTS.push(test_14); + +function test_15(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + arr.push('c'); + break; + case 'zing': + arr.push(2008006064); + break; + default: + arr.push('M'); + } +} +test_15.INPUTS = ['foo', 'bar', 'zing']; +test_15.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":"c","fallthrough":false},{"match":"zing","body":2008006064,"fallthrough":false},{"match":null,"body":"M","fallthrough":true}]; +TESTS.push(test_15); + +function test_16(x, arr) { + switch(x) { + default: + arr.push(1424069880); + break; + case 'foo': + break; + case 'bar': + arr.push('c'); + break; + case 'zing': + arr.push(2008006064); + break; + } +} +test_16.INPUTS = ['foo', 'bar', 'zing']; +test_16.SPEC = [{"match":null,"body":1424069880,"fallthrough":false},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":"c","fallthrough":false},{"match":"zing","body":2008006064,"fallthrough":false}]; +TESTS.push(test_16); + +function test_17(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push(1424069880); + break; + case 'bar': + arr.push('c'); + break; + case 'zing': + arr.push(2008006064); + break; + } +} +test_17.INPUTS = ['foo', 'bar', 'zing']; +test_17.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":1424069880,"fallthrough":false},{"match":"bar","body":"c","fallthrough":false},{"match":"zing","body":2008006064,"fallthrough":false}]; +TESTS.push(test_17); + +function test_18(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + arr.push('c'); + break; + case 'zing': + arr.push(2008006064); + break; + default: + arr.push(1424069880); + break; + } +} +test_18.INPUTS = ['foo', 'bar', 'zing']; +test_18.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":"c","fallthrough":false},{"match":"zing","body":2008006064,"fallthrough":false},{"match":null,"body":1424069880,"fallthrough":false}]; +TESTS.push(test_18); + +function test_19(x, arr) { + switch(x) { + default: + case 'foo': + case 'bar': + arr.push(1915689729); + break; + case 'zing': + arr.push(973913896); + break; + } +} +test_19.INPUTS = ['foo', 'bar', 'zing']; +test_19.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":1915689729,"fallthrough":false},{"match":"zing","body":973913896,"fallthrough":false}]; +TESTS.push(test_19); + +function test_20(x, arr) { + switch(x) { + case 'foo': + default: + case 'bar': + arr.push(1915689729); + break; + case 'zing': + arr.push(973913896); + break; + } +} +test_20.INPUTS = ['foo', 'bar', 'zing']; +test_20.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":1915689729,"fallthrough":false},{"match":"zing","body":973913896,"fallthrough":false}]; +TESTS.push(test_20); + +function test_21(x, arr) { + switch(x) { + case 'foo': + case 'bar': + arr.push(1915689729); + break; + case 'zing': + arr.push(973913896); + break; + default: + } +} +test_21.INPUTS = ['foo', 'bar', 'zing']; +test_21.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":1915689729,"fallthrough":false},{"match":"zing","body":973913896,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_21); + +function test_22(x, arr) { + switch(x) { + default: + arr.push(104770589); + case 'foo': + case 'bar': + arr.push(1915689729); + break; + case 'zing': + arr.push(973913896); + break; + } +} +test_22.INPUTS = ['foo', 'bar', 'zing']; +test_22.SPEC = [{"match":null,"body":104770589,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":1915689729,"fallthrough":false},{"match":"zing","body":973913896,"fallthrough":false}]; +TESTS.push(test_22); + +function test_23(x, arr) { + switch(x) { + case 'foo': + default: + arr.push(104770589); + case 'bar': + arr.push(1915689729); + break; + case 'zing': + arr.push(973913896); + break; + } +} +test_23.INPUTS = ['foo', 'bar', 'zing']; +test_23.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":104770589,"fallthrough":true},{"match":"bar","body":1915689729,"fallthrough":false},{"match":"zing","body":973913896,"fallthrough":false}]; +TESTS.push(test_23); + +function test_24(x, arr) { + switch(x) { + case 'foo': + case 'bar': + arr.push(1915689729); + break; + case 'zing': + arr.push(973913896); + break; + default: + arr.push(104770589); + } +} +test_24.INPUTS = ['foo', 'bar', 'zing']; +test_24.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":1915689729,"fallthrough":false},{"match":"zing","body":973913896,"fallthrough":false},{"match":null,"body":104770589,"fallthrough":true}]; +TESTS.push(test_24); + +function test_25(x, arr) { + switch(x) { + default: + arr.push(304532507); + break; + case 'foo': + case 'bar': + arr.push(1915689729); + break; + case 'zing': + arr.push(973913896); + break; + } +} +test_25.INPUTS = ['foo', 'bar', 'zing']; +test_25.SPEC = [{"match":null,"body":304532507,"fallthrough":false},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":1915689729,"fallthrough":false},{"match":"zing","body":973913896,"fallthrough":false}]; +TESTS.push(test_25); + +function test_26(x, arr) { + switch(x) { + case 'foo': + default: + arr.push(304532507); + break; + case 'bar': + arr.push(1915689729); + break; + case 'zing': + arr.push(973913896); + break; + } +} +test_26.INPUTS = ['foo', 'bar', 'zing']; +test_26.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":304532507,"fallthrough":false},{"match":"bar","body":1915689729,"fallthrough":false},{"match":"zing","body":973913896,"fallthrough":false}]; +TESTS.push(test_26); + +function test_27(x, arr) { + switch(x) { + case 'foo': + case 'bar': + arr.push(1915689729); + break; + case 'zing': + arr.push(973913896); + break; + default: + arr.push(304532507); + break; + } +} +test_27.INPUTS = ['foo', 'bar', 'zing']; +test_27.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":1915689729,"fallthrough":false},{"match":"zing","body":973913896,"fallthrough":false},{"match":null,"body":304532507,"fallthrough":false}]; +TESTS.push(test_27); + +function test_28(x, arr) { + switch(x) { + default: + case 'foo': + arr.push(2116660419); + break; + case 'bar': + break; + case 'zing': + arr.push('FvxWZ'); + break; + } +} +test_28.INPUTS = ['foo', 'bar', 'zing']; +test_28.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":2116660419,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"FvxWZ","fallthrough":false}]; +TESTS.push(test_28); + +function test_29(x, arr) { + switch(x) { + case 'foo': + arr.push(2116660419); + break; + default: + case 'bar': + break; + case 'zing': + arr.push('FvxWZ'); + break; + } +} +test_29.INPUTS = ['foo', 'bar', 'zing']; +test_29.SPEC = [{"match":"foo","body":2116660419,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"FvxWZ","fallthrough":false}]; +TESTS.push(test_29); + +function test_30(x, arr) { + switch(x) { + case 'foo': + arr.push(2116660419); + break; + case 'bar': + break; + case 'zing': + arr.push('FvxWZ'); + break; + default: + } +} +test_30.INPUTS = ['foo', 'bar', 'zing']; +test_30.SPEC = [{"match":"foo","body":2116660419,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"FvxWZ","fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_30); + +function test_31(x, arr) { + switch(x) { + default: + arr.push(121730727); + case 'foo': + arr.push(2116660419); + break; + case 'bar': + break; + case 'zing': + arr.push('FvxWZ'); + break; + } +} +test_31.INPUTS = ['foo', 'bar', 'zing']; +test_31.SPEC = [{"match":null,"body":121730727,"fallthrough":true},{"match":"foo","body":2116660419,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"FvxWZ","fallthrough":false}]; +TESTS.push(test_31); + +function test_32(x, arr) { + switch(x) { + case 'foo': + arr.push(2116660419); + break; + default: + arr.push(121730727); + case 'bar': + break; + case 'zing': + arr.push('FvxWZ'); + break; + } +} +test_32.INPUTS = ['foo', 'bar', 'zing']; +test_32.SPEC = [{"match":"foo","body":2116660419,"fallthrough":false},{"match":null,"body":121730727,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"FvxWZ","fallthrough":false}]; +TESTS.push(test_32); + +function test_33(x, arr) { + switch(x) { + case 'foo': + arr.push(2116660419); + break; + case 'bar': + break; + case 'zing': + arr.push('FvxWZ'); + break; + default: + arr.push(121730727); + } +} +test_33.INPUTS = ['foo', 'bar', 'zing']; +test_33.SPEC = [{"match":"foo","body":2116660419,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"FvxWZ","fallthrough":false},{"match":null,"body":121730727,"fallthrough":true}]; +TESTS.push(test_33); + +function test_34(x, arr) { + switch(x) { + default: + arr.push(1614107154); + break; + case 'foo': + arr.push(2116660419); + break; + case 'bar': + break; + case 'zing': + arr.push('FvxWZ'); + break; + } +} +test_34.INPUTS = ['foo', 'bar', 'zing']; +test_34.SPEC = [{"match":null,"body":1614107154,"fallthrough":false},{"match":"foo","body":2116660419,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"FvxWZ","fallthrough":false}]; +TESTS.push(test_34); + +function test_35(x, arr) { + switch(x) { + case 'foo': + arr.push(2116660419); + break; + default: + arr.push(1614107154); + break; + case 'bar': + break; + case 'zing': + arr.push('FvxWZ'); + break; + } +} +test_35.INPUTS = ['foo', 'bar', 'zing']; +test_35.SPEC = [{"match":"foo","body":2116660419,"fallthrough":false},{"match":null,"body":1614107154,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"FvxWZ","fallthrough":false}]; +TESTS.push(test_35); + +function test_36(x, arr) { + switch(x) { + case 'foo': + arr.push(2116660419); + break; + case 'bar': + break; + case 'zing': + arr.push('FvxWZ'); + break; + default: + arr.push(1614107154); + break; + } +} +test_36.INPUTS = ['foo', 'bar', 'zing']; +test_36.SPEC = [{"match":"foo","body":2116660419,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"FvxWZ","fallthrough":false},{"match":null,"body":1614107154,"fallthrough":false}]; +TESTS.push(test_36); + +function test_37(x, arr) { + switch(x) { + default: + case 'foo': + arr.push('-=Z'); + break; + case 'bar': + case 'zing': + arr.push('R8f'); + break; + } +} +test_37.INPUTS = ['foo', 'bar', 'zing']; +test_37.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":"-=Z","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"R8f","fallthrough":false}]; +TESTS.push(test_37); + +function test_38(x, arr) { + switch(x) { + case 'foo': + arr.push('-=Z'); + break; + default: + case 'bar': + case 'zing': + arr.push('R8f'); + break; + } +} +test_38.INPUTS = ['foo', 'bar', 'zing']; +test_38.SPEC = [{"match":"foo","body":"-=Z","fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"R8f","fallthrough":false}]; +TESTS.push(test_38); + +function test_39(x, arr) { + switch(x) { + case 'foo': + arr.push('-=Z'); + break; + case 'bar': + case 'zing': + arr.push('R8f'); + break; + default: + } +} +test_39.INPUTS = ['foo', 'bar', 'zing']; +test_39.SPEC = [{"match":"foo","body":"-=Z","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"R8f","fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_39); + +function test_40(x, arr) { + switch(x) { + default: + arr.push('XfrKO0'); + case 'foo': + arr.push('-=Z'); + break; + case 'bar': + case 'zing': + arr.push('R8f'); + break; + } +} +test_40.INPUTS = ['foo', 'bar', 'zing']; +test_40.SPEC = [{"match":null,"body":"XfrKO0","fallthrough":true},{"match":"foo","body":"-=Z","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"R8f","fallthrough":false}]; +TESTS.push(test_40); + +function test_41(x, arr) { + switch(x) { + case 'foo': + arr.push('-=Z'); + break; + default: + arr.push('XfrKO0'); + case 'bar': + case 'zing': + arr.push('R8f'); + break; + } +} +test_41.INPUTS = ['foo', 'bar', 'zing']; +test_41.SPEC = [{"match":"foo","body":"-=Z","fallthrough":false},{"match":null,"body":"XfrKO0","fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"R8f","fallthrough":false}]; +TESTS.push(test_41); + +function test_42(x, arr) { + switch(x) { + case 'foo': + arr.push('-=Z'); + break; + case 'bar': + case 'zing': + arr.push('R8f'); + break; + default: + arr.push('XfrKO0'); + } +} +test_42.INPUTS = ['foo', 'bar', 'zing']; +test_42.SPEC = [{"match":"foo","body":"-=Z","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"R8f","fallthrough":false},{"match":null,"body":"XfrKO0","fallthrough":true}]; +TESTS.push(test_42); + +function test_43(x, arr) { + switch(x) { + default: + arr.push(465477587); + break; + case 'foo': + arr.push('-=Z'); + break; + case 'bar': + case 'zing': + arr.push('R8f'); + break; + } +} +test_43.INPUTS = ['foo', 'bar', 'zing']; +test_43.SPEC = [{"match":null,"body":465477587,"fallthrough":false},{"match":"foo","body":"-=Z","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"R8f","fallthrough":false}]; +TESTS.push(test_43); + +function test_44(x, arr) { + switch(x) { + case 'foo': + arr.push('-=Z'); + break; + default: + arr.push(465477587); + break; + case 'bar': + case 'zing': + arr.push('R8f'); + break; + } +} +test_44.INPUTS = ['foo', 'bar', 'zing']; +test_44.SPEC = [{"match":"foo","body":"-=Z","fallthrough":false},{"match":null,"body":465477587,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"R8f","fallthrough":false}]; +TESTS.push(test_44); + +function test_45(x, arr) { + switch(x) { + case 'foo': + arr.push('-=Z'); + break; + case 'bar': + case 'zing': + arr.push('R8f'); + break; + default: + arr.push(465477587); + break; + } +} +test_45.INPUTS = ['foo', 'bar', 'zing']; +test_45.SPEC = [{"match":"foo","body":"-=Z","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"R8f","fallthrough":false},{"match":null,"body":465477587,"fallthrough":false}]; +TESTS.push(test_45); + +function test_46(x, arr) { + switch(x) { + default: + case 'foo': + break; + case 'bar': + break; + case 'zing': + arr.push('(0'); + break; + } +} +test_46.INPUTS = ['foo', 'bar', 'zing']; +test_46.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"(0","fallthrough":false}]; +TESTS.push(test_46); + +function test_47(x, arr) { + switch(x) { + case 'foo': + break; + default: + case 'bar': + break; + case 'zing': + arr.push('(0'); + break; + } +} +test_47.INPUTS = ['foo', 'bar', 'zing']; +test_47.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"(0","fallthrough":false}]; +TESTS.push(test_47); + +function test_48(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + break; + case 'zing': + arr.push('(0'); + break; + default: + } +} +test_48.INPUTS = ['foo', 'bar', 'zing']; +test_48.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"(0","fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_48); + +function test_49(x, arr) { + switch(x) { + default: + arr.push('{5J~&%)kV'); + case 'foo': + break; + case 'bar': + break; + case 'zing': + arr.push('(0'); + break; + } +} +test_49.INPUTS = ['foo', 'bar', 'zing']; +test_49.SPEC = [{"match":null,"body":"{5J~&%)kV","fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"(0","fallthrough":false}]; +TESTS.push(test_49); + +function test_50(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push('{5J~&%)kV'); + case 'bar': + break; + case 'zing': + arr.push('(0'); + break; + } +} +test_50.INPUTS = ['foo', 'bar', 'zing']; +test_50.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":"{5J~&%)kV","fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"(0","fallthrough":false}]; +TESTS.push(test_50); + +function test_51(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + break; + case 'zing': + arr.push('(0'); + break; + default: + arr.push('{5J~&%)kV'); + } +} +test_51.INPUTS = ['foo', 'bar', 'zing']; +test_51.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"(0","fallthrough":false},{"match":null,"body":"{5J~&%)kV","fallthrough":true}]; +TESTS.push(test_51); + +function test_52(x, arr) { + switch(x) { + default: + arr.push('V^IbL'); + break; + case 'foo': + break; + case 'bar': + break; + case 'zing': + arr.push('(0'); + break; + } +} +test_52.INPUTS = ['foo', 'bar', 'zing']; +test_52.SPEC = [{"match":null,"body":"V^IbL","fallthrough":false},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"(0","fallthrough":false}]; +TESTS.push(test_52); + +function test_53(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push('V^IbL'); + break; + case 'bar': + break; + case 'zing': + arr.push('(0'); + break; + } +} +test_53.INPUTS = ['foo', 'bar', 'zing']; +test_53.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":"V^IbL","fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"(0","fallthrough":false}]; +TESTS.push(test_53); + +function test_54(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + break; + case 'zing': + arr.push('(0'); + break; + default: + arr.push('V^IbL'); + break; + } +} +test_54.INPUTS = ['foo', 'bar', 'zing']; +test_54.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"(0","fallthrough":false},{"match":null,"body":"V^IbL","fallthrough":false}]; +TESTS.push(test_54); + +function test_55(x, arr) { + switch(x) { + default: + case 'foo': + case 'bar': + break; + case 'zing': + arr.push('4'); + break; + } +} +test_55.INPUTS = ['foo', 'bar', 'zing']; +test_55.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"4","fallthrough":false}]; +TESTS.push(test_55); + +function test_56(x, arr) { + switch(x) { + case 'foo': + default: + case 'bar': + break; + case 'zing': + arr.push('4'); + break; + } +} +test_56.INPUTS = ['foo', 'bar', 'zing']; +test_56.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"4","fallthrough":false}]; +TESTS.push(test_56); + +function test_57(x, arr) { + switch(x) { + case 'foo': + case 'bar': + break; + case 'zing': + arr.push('4'); + break; + default: + } +} +test_57.INPUTS = ['foo', 'bar', 'zing']; +test_57.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"4","fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_57); + +function test_58(x, arr) { + switch(x) { + default: + arr.push('K'); + case 'foo': + case 'bar': + break; + case 'zing': + arr.push('4'); + break; + } +} +test_58.INPUTS = ['foo', 'bar', 'zing']; +test_58.SPEC = [{"match":null,"body":"K","fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"4","fallthrough":false}]; +TESTS.push(test_58); + +function test_59(x, arr) { + switch(x) { + case 'foo': + default: + arr.push('K'); + case 'bar': + break; + case 'zing': + arr.push('4'); + break; + } +} +test_59.INPUTS = ['foo', 'bar', 'zing']; +test_59.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":"K","fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"4","fallthrough":false}]; +TESTS.push(test_59); + +function test_60(x, arr) { + switch(x) { + case 'foo': + case 'bar': + break; + case 'zing': + arr.push('4'); + break; + default: + arr.push('K'); + } +} +test_60.INPUTS = ['foo', 'bar', 'zing']; +test_60.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"4","fallthrough":false},{"match":null,"body":"K","fallthrough":true}]; +TESTS.push(test_60); + +function test_61(x, arr) { + switch(x) { + default: + arr.push(129591787); + break; + case 'foo': + case 'bar': + break; + case 'zing': + arr.push('4'); + break; + } +} +test_61.INPUTS = ['foo', 'bar', 'zing']; +test_61.SPEC = [{"match":null,"body":129591787,"fallthrough":false},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"4","fallthrough":false}]; +TESTS.push(test_61); + +function test_62(x, arr) { + switch(x) { + case 'foo': + default: + arr.push(129591787); + break; + case 'bar': + break; + case 'zing': + arr.push('4'); + break; + } +} +test_62.INPUTS = ['foo', 'bar', 'zing']; +test_62.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":129591787,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"4","fallthrough":false}]; +TESTS.push(test_62); + +function test_63(x, arr) { + switch(x) { + case 'foo': + case 'bar': + break; + case 'zing': + arr.push('4'); + break; + default: + arr.push(129591787); + break; + } +} +test_63.INPUTS = ['foo', 'bar', 'zing']; +test_63.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":"4","fallthrough":false},{"match":null,"body":129591787,"fallthrough":false}]; +TESTS.push(test_63); + +function test_64(x, arr) { + switch(x) { + default: + case 'foo': + break; + case 'bar': + case 'zing': + arr.push(60518010); + break; + } +} +test_64.INPUTS = ['foo', 'bar', 'zing']; +test_64.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":60518010,"fallthrough":false}]; +TESTS.push(test_64); + +function test_65(x, arr) { + switch(x) { + case 'foo': + break; + default: + case 'bar': + case 'zing': + arr.push(60518010); + break; + } +} +test_65.INPUTS = ['foo', 'bar', 'zing']; +test_65.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":60518010,"fallthrough":false}]; +TESTS.push(test_65); + +function test_66(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + case 'zing': + arr.push(60518010); + break; + default: + } +} +test_66.INPUTS = ['foo', 'bar', 'zing']; +test_66.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":60518010,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_66); + +function test_67(x, arr) { + switch(x) { + default: + arr.push('0]YO]}'); + case 'foo': + break; + case 'bar': + case 'zing': + arr.push(60518010); + break; + } +} +test_67.INPUTS = ['foo', 'bar', 'zing']; +test_67.SPEC = [{"match":null,"body":"0]YO]}","fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":60518010,"fallthrough":false}]; +TESTS.push(test_67); + +function test_68(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push('0]YO]}'); + case 'bar': + case 'zing': + arr.push(60518010); + break; + } +} +test_68.INPUTS = ['foo', 'bar', 'zing']; +test_68.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":"0]YO]}","fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":60518010,"fallthrough":false}]; +TESTS.push(test_68); + +function test_69(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + case 'zing': + arr.push(60518010); + break; + default: + arr.push('0]YO]}'); + } +} +test_69.INPUTS = ['foo', 'bar', 'zing']; +test_69.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":60518010,"fallthrough":false},{"match":null,"body":"0]YO]}","fallthrough":true}]; +TESTS.push(test_69); + +function test_70(x, arr) { + switch(x) { + default: + arr.push(1222888797); + break; + case 'foo': + break; + case 'bar': + case 'zing': + arr.push(60518010); + break; + } +} +test_70.INPUTS = ['foo', 'bar', 'zing']; +test_70.SPEC = [{"match":null,"body":1222888797,"fallthrough":false},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":60518010,"fallthrough":false}]; +TESTS.push(test_70); + +function test_71(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push(1222888797); + break; + case 'bar': + case 'zing': + arr.push(60518010); + break; + } +} +test_71.INPUTS = ['foo', 'bar', 'zing']; +test_71.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":1222888797,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":60518010,"fallthrough":false}]; +TESTS.push(test_71); + +function test_72(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + case 'zing': + arr.push(60518010); + break; + default: + arr.push(1222888797); + break; + } +} +test_72.INPUTS = ['foo', 'bar', 'zing']; +test_72.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":60518010,"fallthrough":false},{"match":null,"body":1222888797,"fallthrough":false}]; +TESTS.push(test_72); + +function test_73(x, arr) { + switch(x) { + default: + case 'foo': + case 'bar': + case 'zing': + arr.push('ku]^x'); + break; + } +} +test_73.INPUTS = ['foo', 'bar', 'zing']; +test_73.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"ku]^x","fallthrough":false}]; +TESTS.push(test_73); + +function test_74(x, arr) { + switch(x) { + case 'foo': + default: + case 'bar': + case 'zing': + arr.push('ku]^x'); + break; + } +} +test_74.INPUTS = ['foo', 'bar', 'zing']; +test_74.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"ku]^x","fallthrough":false}]; +TESTS.push(test_74); + +function test_75(x, arr) { + switch(x) { + case 'foo': + case 'bar': + case 'zing': + arr.push('ku]^x'); + break; + default: + } +} +test_75.INPUTS = ['foo', 'bar', 'zing']; +test_75.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"ku]^x","fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_75); + +function test_76(x, arr) { + switch(x) { + default: + arr.push(1697959342); + case 'foo': + case 'bar': + case 'zing': + arr.push('ku]^x'); + break; + } +} +test_76.INPUTS = ['foo', 'bar', 'zing']; +test_76.SPEC = [{"match":null,"body":1697959342,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"ku]^x","fallthrough":false}]; +TESTS.push(test_76); + +function test_77(x, arr) { + switch(x) { + case 'foo': + default: + arr.push(1697959342); + case 'bar': + case 'zing': + arr.push('ku]^x'); + break; + } +} +test_77.INPUTS = ['foo', 'bar', 'zing']; +test_77.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":1697959342,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"ku]^x","fallthrough":false}]; +TESTS.push(test_77); + +function test_78(x, arr) { + switch(x) { + case 'foo': + case 'bar': + case 'zing': + arr.push('ku]^x'); + break; + default: + arr.push(1697959342); + } +} +test_78.INPUTS = ['foo', 'bar', 'zing']; +test_78.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"ku]^x","fallthrough":false},{"match":null,"body":1697959342,"fallthrough":true}]; +TESTS.push(test_78); + +function test_79(x, arr) { + switch(x) { + default: + arr.push(2023306409); + break; + case 'foo': + case 'bar': + case 'zing': + arr.push('ku]^x'); + break; + } +} +test_79.INPUTS = ['foo', 'bar', 'zing']; +test_79.SPEC = [{"match":null,"body":2023306409,"fallthrough":false},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"ku]^x","fallthrough":false}]; +TESTS.push(test_79); + +function test_80(x, arr) { + switch(x) { + case 'foo': + default: + arr.push(2023306409); + break; + case 'bar': + case 'zing': + arr.push('ku]^x'); + break; + } +} +test_80.INPUTS = ['foo', 'bar', 'zing']; +test_80.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":2023306409,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"ku]^x","fallthrough":false}]; +TESTS.push(test_80); + +function test_81(x, arr) { + switch(x) { + case 'foo': + case 'bar': + case 'zing': + arr.push('ku]^x'); + break; + default: + arr.push(2023306409); + break; + } +} +test_81.INPUTS = ['foo', 'bar', 'zing']; +test_81.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":"ku]^x","fallthrough":false},{"match":null,"body":2023306409,"fallthrough":false}]; +TESTS.push(test_81); + +function test_82(x, arr) { + switch(x) { + default: + case 'foo': + arr.push(588167318); + break; + case 'bar': + arr.push(663884613); + break; + case 'zing': + break; + } +} +test_82.INPUTS = ['foo', 'bar', 'zing']; +test_82.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":588167318,"fallthrough":false},{"match":"bar","body":663884613,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_82); + +function test_83(x, arr) { + switch(x) { + case 'foo': + arr.push(588167318); + break; + default: + case 'bar': + arr.push(663884613); + break; + case 'zing': + break; + } +} +test_83.INPUTS = ['foo', 'bar', 'zing']; +test_83.SPEC = [{"match":"foo","body":588167318,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":663884613,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_83); + +function test_84(x, arr) { + switch(x) { + case 'foo': + arr.push(588167318); + break; + case 'bar': + arr.push(663884613); + break; + case 'zing': + break; + default: + } +} +test_84.INPUTS = ['foo', 'bar', 'zing']; +test_84.SPEC = [{"match":"foo","body":588167318,"fallthrough":false},{"match":"bar","body":663884613,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_84); + +function test_85(x, arr) { + switch(x) { + default: + arr.push(1238869146); + case 'foo': + arr.push(588167318); + break; + case 'bar': + arr.push(663884613); + break; + case 'zing': + break; + } +} +test_85.INPUTS = ['foo', 'bar', 'zing']; +test_85.SPEC = [{"match":null,"body":1238869146,"fallthrough":true},{"match":"foo","body":588167318,"fallthrough":false},{"match":"bar","body":663884613,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_85); + +function test_86(x, arr) { + switch(x) { + case 'foo': + arr.push(588167318); + break; + default: + arr.push(1238869146); + case 'bar': + arr.push(663884613); + break; + case 'zing': + break; + } +} +test_86.INPUTS = ['foo', 'bar', 'zing']; +test_86.SPEC = [{"match":"foo","body":588167318,"fallthrough":false},{"match":null,"body":1238869146,"fallthrough":true},{"match":"bar","body":663884613,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_86); + +function test_87(x, arr) { + switch(x) { + case 'foo': + arr.push(588167318); + break; + case 'bar': + arr.push(663884613); + break; + case 'zing': + break; + default: + arr.push(1238869146); + } +} +test_87.INPUTS = ['foo', 'bar', 'zing']; +test_87.SPEC = [{"match":"foo","body":588167318,"fallthrough":false},{"match":"bar","body":663884613,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":1238869146,"fallthrough":true}]; +TESTS.push(test_87); + +function test_88(x, arr) { + switch(x) { + default: + arr.push('pOh#'); + break; + case 'foo': + arr.push(588167318); + break; + case 'bar': + arr.push(663884613); + break; + case 'zing': + break; + } +} +test_88.INPUTS = ['foo', 'bar', 'zing']; +test_88.SPEC = [{"match":null,"body":"pOh#","fallthrough":false},{"match":"foo","body":588167318,"fallthrough":false},{"match":"bar","body":663884613,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_88); + +function test_89(x, arr) { + switch(x) { + case 'foo': + arr.push(588167318); + break; + default: + arr.push('pOh#'); + break; + case 'bar': + arr.push(663884613); + break; + case 'zing': + break; + } +} +test_89.INPUTS = ['foo', 'bar', 'zing']; +test_89.SPEC = [{"match":"foo","body":588167318,"fallthrough":false},{"match":null,"body":"pOh#","fallthrough":false},{"match":"bar","body":663884613,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_89); + +function test_90(x, arr) { + switch(x) { + case 'foo': + arr.push(588167318); + break; + case 'bar': + arr.push(663884613); + break; + case 'zing': + break; + default: + arr.push('pOh#'); + break; + } +} +test_90.INPUTS = ['foo', 'bar', 'zing']; +test_90.SPEC = [{"match":"foo","body":588167318,"fallthrough":false},{"match":"bar","body":663884613,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":"pOh#","fallthrough":false}]; +TESTS.push(test_90); + +function test_91(x, arr) { + switch(x) { + default: + case 'foo': + arr.push('Z!I#t'); + break; + case 'bar': + arr.push('D'); + break; + case 'zing': + } +} +test_91.INPUTS = ['foo', 'bar', 'zing']; +test_91.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":"Z!I#t","fallthrough":false},{"match":"bar","body":"D","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_91); + +function test_92(x, arr) { + switch(x) { + case 'foo': + arr.push('Z!I#t'); + break; + default: + case 'bar': + arr.push('D'); + break; + case 'zing': + } +} +test_92.INPUTS = ['foo', 'bar', 'zing']; +test_92.SPEC = [{"match":"foo","body":"Z!I#t","fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":"D","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_92); + +function test_93(x, arr) { + switch(x) { + case 'foo': + arr.push('Z!I#t'); + break; + case 'bar': + arr.push('D'); + break; + case 'zing': + default: + } +} +test_93.INPUTS = ['foo', 'bar', 'zing']; +test_93.SPEC = [{"match":"foo","body":"Z!I#t","fallthrough":false},{"match":"bar","body":"D","fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_93); + +function test_94(x, arr) { + switch(x) { + default: + arr.push(63474909); + case 'foo': + arr.push('Z!I#t'); + break; + case 'bar': + arr.push('D'); + break; + case 'zing': + } +} +test_94.INPUTS = ['foo', 'bar', 'zing']; +test_94.SPEC = [{"match":null,"body":63474909,"fallthrough":true},{"match":"foo","body":"Z!I#t","fallthrough":false},{"match":"bar","body":"D","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_94); + +function test_95(x, arr) { + switch(x) { + case 'foo': + arr.push('Z!I#t'); + break; + default: + arr.push(63474909); + case 'bar': + arr.push('D'); + break; + case 'zing': + } +} +test_95.INPUTS = ['foo', 'bar', 'zing']; +test_95.SPEC = [{"match":"foo","body":"Z!I#t","fallthrough":false},{"match":null,"body":63474909,"fallthrough":true},{"match":"bar","body":"D","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_95); + +function test_96(x, arr) { + switch(x) { + case 'foo': + arr.push('Z!I#t'); + break; + case 'bar': + arr.push('D'); + break; + case 'zing': + default: + arr.push(63474909); + } +} +test_96.INPUTS = ['foo', 'bar', 'zing']; +test_96.SPEC = [{"match":"foo","body":"Z!I#t","fallthrough":false},{"match":"bar","body":"D","fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":63474909,"fallthrough":true}]; +TESTS.push(test_96); + +function test_97(x, arr) { + switch(x) { + default: + arr.push(1165220694); + break; + case 'foo': + arr.push('Z!I#t'); + break; + case 'bar': + arr.push('D'); + break; + case 'zing': + } +} +test_97.INPUTS = ['foo', 'bar', 'zing']; +test_97.SPEC = [{"match":null,"body":1165220694,"fallthrough":false},{"match":"foo","body":"Z!I#t","fallthrough":false},{"match":"bar","body":"D","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_97); + +function test_98(x, arr) { + switch(x) { + case 'foo': + arr.push('Z!I#t'); + break; + default: + arr.push(1165220694); + break; + case 'bar': + arr.push('D'); + break; + case 'zing': + } +} +test_98.INPUTS = ['foo', 'bar', 'zing']; +test_98.SPEC = [{"match":"foo","body":"Z!I#t","fallthrough":false},{"match":null,"body":1165220694,"fallthrough":false},{"match":"bar","body":"D","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_98); + +function test_99(x, arr) { + switch(x) { + case 'foo': + arr.push('Z!I#t'); + break; + case 'bar': + arr.push('D'); + break; + case 'zing': + default: + arr.push(1165220694); + break; + } +} +test_99.INPUTS = ['foo', 'bar', 'zing']; +test_99.SPEC = [{"match":"foo","body":"Z!I#t","fallthrough":false},{"match":"bar","body":"D","fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":1165220694,"fallthrough":false}]; +TESTS.push(test_99); + +function test_100(x, arr) { + switch(x) { + default: + case 'foo': + break; + case 'bar': + arr.push(1994756408); + break; + case 'zing': + break; + } +} +test_100.INPUTS = ['foo', 'bar', 'zing']; +test_100.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":1994756408,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_100); + +function test_101(x, arr) { + switch(x) { + case 'foo': + break; + default: + case 'bar': + arr.push(1994756408); + break; + case 'zing': + break; + } +} +test_101.INPUTS = ['foo', 'bar', 'zing']; +test_101.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":1994756408,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_101); + +function test_102(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + arr.push(1994756408); + break; + case 'zing': + break; + default: + } +} +test_102.INPUTS = ['foo', 'bar', 'zing']; +test_102.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":1994756408,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_102); + +function test_103(x, arr) { + switch(x) { + default: + arr.push('*8ZYmVI($X'); + case 'foo': + break; + case 'bar': + arr.push(1994756408); + break; + case 'zing': + break; + } +} +test_103.INPUTS = ['foo', 'bar', 'zing']; +test_103.SPEC = [{"match":null,"body":"*8ZYmVI($X","fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":1994756408,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_103); + +function test_104(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push('*8ZYmVI($X'); + case 'bar': + arr.push(1994756408); + break; + case 'zing': + break; + } +} +test_104.INPUTS = ['foo', 'bar', 'zing']; +test_104.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":"*8ZYmVI($X","fallthrough":true},{"match":"bar","body":1994756408,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_104); + +function test_105(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + arr.push(1994756408); + break; + case 'zing': + break; + default: + arr.push('*8ZYmVI($X'); + } +} +test_105.INPUTS = ['foo', 'bar', 'zing']; +test_105.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":1994756408,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":"*8ZYmVI($X","fallthrough":true}]; +TESTS.push(test_105); + +function test_106(x, arr) { + switch(x) { + default: + arr.push(207183901); + break; + case 'foo': + break; + case 'bar': + arr.push(1994756408); + break; + case 'zing': + break; + } +} +test_106.INPUTS = ['foo', 'bar', 'zing']; +test_106.SPEC = [{"match":null,"body":207183901,"fallthrough":false},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":1994756408,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_106); + +function test_107(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push(207183901); + break; + case 'bar': + arr.push(1994756408); + break; + case 'zing': + break; + } +} +test_107.INPUTS = ['foo', 'bar', 'zing']; +test_107.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":207183901,"fallthrough":false},{"match":"bar","body":1994756408,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_107); + +function test_108(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + arr.push(1994756408); + break; + case 'zing': + break; + default: + arr.push(207183901); + break; + } +} +test_108.INPUTS = ['foo', 'bar', 'zing']; +test_108.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":1994756408,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":207183901,"fallthrough":false}]; +TESTS.push(test_108); + +function test_109(x, arr) { + switch(x) { + default: + case 'foo': + case 'bar': + arr.push('YJQk'); + break; + case 'zing': + break; + } +} +test_109.INPUTS = ['foo', 'bar', 'zing']; +test_109.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":"YJQk","fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_109); + +function test_110(x, arr) { + switch(x) { + case 'foo': + default: + case 'bar': + arr.push('YJQk'); + break; + case 'zing': + break; + } +} +test_110.INPUTS = ['foo', 'bar', 'zing']; +test_110.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":"YJQk","fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_110); + +function test_111(x, arr) { + switch(x) { + case 'foo': + case 'bar': + arr.push('YJQk'); + break; + case 'zing': + break; + default: + } +} +test_111.INPUTS = ['foo', 'bar', 'zing']; +test_111.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":"YJQk","fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_111); + +function test_112(x, arr) { + switch(x) { + default: + arr.push('04mJy'); + case 'foo': + case 'bar': + arr.push('YJQk'); + break; + case 'zing': + break; + } +} +test_112.INPUTS = ['foo', 'bar', 'zing']; +test_112.SPEC = [{"match":null,"body":"04mJy","fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":"YJQk","fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_112); + +function test_113(x, arr) { + switch(x) { + case 'foo': + default: + arr.push('04mJy'); + case 'bar': + arr.push('YJQk'); + break; + case 'zing': + break; + } +} +test_113.INPUTS = ['foo', 'bar', 'zing']; +test_113.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":"04mJy","fallthrough":true},{"match":"bar","body":"YJQk","fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_113); + +function test_114(x, arr) { + switch(x) { + case 'foo': + case 'bar': + arr.push('YJQk'); + break; + case 'zing': + break; + default: + arr.push('04mJy'); + } +} +test_114.INPUTS = ['foo', 'bar', 'zing']; +test_114.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":"YJQk","fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":"04mJy","fallthrough":true}]; +TESTS.push(test_114); + +function test_115(x, arr) { + switch(x) { + default: + arr.push('0NgLbYKr~c'); + break; + case 'foo': + case 'bar': + arr.push('YJQk'); + break; + case 'zing': + break; + } +} +test_115.INPUTS = ['foo', 'bar', 'zing']; +test_115.SPEC = [{"match":null,"body":"0NgLbYKr~c","fallthrough":false},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":"YJQk","fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_115); + +function test_116(x, arr) { + switch(x) { + case 'foo': + default: + arr.push('0NgLbYKr~c'); + break; + case 'bar': + arr.push('YJQk'); + break; + case 'zing': + break; + } +} +test_116.INPUTS = ['foo', 'bar', 'zing']; +test_116.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":"0NgLbYKr~c","fallthrough":false},{"match":"bar","body":"YJQk","fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_116); + +function test_117(x, arr) { + switch(x) { + case 'foo': + case 'bar': + arr.push('YJQk'); + break; + case 'zing': + break; + default: + arr.push('0NgLbYKr~c'); + break; + } +} +test_117.INPUTS = ['foo', 'bar', 'zing']; +test_117.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":"YJQk","fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":"0NgLbYKr~c","fallthrough":false}]; +TESTS.push(test_117); + +function test_118(x, arr) { + switch(x) { + default: + case 'foo': + break; + case 'bar': + arr.push('[^U}J^z'); + break; + case 'zing': + } +} +test_118.INPUTS = ['foo', 'bar', 'zing']; +test_118.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":"[^U}J^z","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_118); + +function test_119(x, arr) { + switch(x) { + case 'foo': + break; + default: + case 'bar': + arr.push('[^U}J^z'); + break; + case 'zing': + } +} +test_119.INPUTS = ['foo', 'bar', 'zing']; +test_119.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":"[^U}J^z","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_119); + +function test_120(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + arr.push('[^U}J^z'); + break; + case 'zing': + default: + } +} +test_120.INPUTS = ['foo', 'bar', 'zing']; +test_120.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":"[^U}J^z","fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_120); + +function test_121(x, arr) { + switch(x) { + default: + arr.push('Y'); + case 'foo': + break; + case 'bar': + arr.push('[^U}J^z'); + break; + case 'zing': + } +} +test_121.INPUTS = ['foo', 'bar', 'zing']; +test_121.SPEC = [{"match":null,"body":"Y","fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":"[^U}J^z","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_121); + +function test_122(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push('Y'); + case 'bar': + arr.push('[^U}J^z'); + break; + case 'zing': + } +} +test_122.INPUTS = ['foo', 'bar', 'zing']; +test_122.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":"Y","fallthrough":true},{"match":"bar","body":"[^U}J^z","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_122); + +function test_123(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + arr.push('[^U}J^z'); + break; + case 'zing': + default: + arr.push('Y'); + } +} +test_123.INPUTS = ['foo', 'bar', 'zing']; +test_123.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":"[^U}J^z","fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":"Y","fallthrough":true}]; +TESTS.push(test_123); + +function test_124(x, arr) { + switch(x) { + default: + arr.push(279382281); + break; + case 'foo': + break; + case 'bar': + arr.push('[^U}J^z'); + break; + case 'zing': + } +} +test_124.INPUTS = ['foo', 'bar', 'zing']; +test_124.SPEC = [{"match":null,"body":279382281,"fallthrough":false},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":"[^U}J^z","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_124); + +function test_125(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push(279382281); + break; + case 'bar': + arr.push('[^U}J^z'); + break; + case 'zing': + } +} +test_125.INPUTS = ['foo', 'bar', 'zing']; +test_125.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":279382281,"fallthrough":false},{"match":"bar","body":"[^U}J^z","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_125); + +function test_126(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + arr.push('[^U}J^z'); + break; + case 'zing': + default: + arr.push(279382281); + break; + } +} +test_126.INPUTS = ['foo', 'bar', 'zing']; +test_126.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":"[^U}J^z","fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":279382281,"fallthrough":false}]; +TESTS.push(test_126); + +function test_127(x, arr) { + switch(x) { + default: + case 'foo': + case 'bar': + arr.push('7+leA1'); + break; + case 'zing': + } +} +test_127.INPUTS = ['foo', 'bar', 'zing']; +test_127.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":"7+leA1","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_127); + +function test_128(x, arr) { + switch(x) { + case 'foo': + default: + case 'bar': + arr.push('7+leA1'); + break; + case 'zing': + } +} +test_128.INPUTS = ['foo', 'bar', 'zing']; +test_128.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":"7+leA1","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_128); + +function test_129(x, arr) { + switch(x) { + case 'foo': + case 'bar': + arr.push('7+leA1'); + break; + case 'zing': + default: + } +} +test_129.INPUTS = ['foo', 'bar', 'zing']; +test_129.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":"7+leA1","fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_129); + +function test_130(x, arr) { + switch(x) { + default: + arr.push(282691036); + case 'foo': + case 'bar': + arr.push('7+leA1'); + break; + case 'zing': + } +} +test_130.INPUTS = ['foo', 'bar', 'zing']; +test_130.SPEC = [{"match":null,"body":282691036,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":"7+leA1","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_130); + +function test_131(x, arr) { + switch(x) { + case 'foo': + default: + arr.push(282691036); + case 'bar': + arr.push('7+leA1'); + break; + case 'zing': + } +} +test_131.INPUTS = ['foo', 'bar', 'zing']; +test_131.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":282691036,"fallthrough":true},{"match":"bar","body":"7+leA1","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_131); + +function test_132(x, arr) { + switch(x) { + case 'foo': + case 'bar': + arr.push('7+leA1'); + break; + case 'zing': + default: + arr.push(282691036); + } +} +test_132.INPUTS = ['foo', 'bar', 'zing']; +test_132.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":"7+leA1","fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":282691036,"fallthrough":true}]; +TESTS.push(test_132); + +function test_133(x, arr) { + switch(x) { + default: + arr.push('C^kPR'); + break; + case 'foo': + case 'bar': + arr.push('7+leA1'); + break; + case 'zing': + } +} +test_133.INPUTS = ['foo', 'bar', 'zing']; +test_133.SPEC = [{"match":null,"body":"C^kPR","fallthrough":false},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":"7+leA1","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_133); + +function test_134(x, arr) { + switch(x) { + case 'foo': + default: + arr.push('C^kPR'); + break; + case 'bar': + arr.push('7+leA1'); + break; + case 'zing': + } +} +test_134.INPUTS = ['foo', 'bar', 'zing']; +test_134.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":"C^kPR","fallthrough":false},{"match":"bar","body":"7+leA1","fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_134); + +function test_135(x, arr) { + switch(x) { + case 'foo': + case 'bar': + arr.push('7+leA1'); + break; + case 'zing': + default: + arr.push('C^kPR'); + break; + } +} +test_135.INPUTS = ['foo', 'bar', 'zing']; +test_135.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":"7+leA1","fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":"C^kPR","fallthrough":false}]; +TESTS.push(test_135); + +function test_136(x, arr) { + switch(x) { + default: + case 'foo': + arr.push(1580091060); + break; + case 'bar': + break; + case 'zing': + break; + } +} +test_136.INPUTS = ['foo', 'bar', 'zing']; +test_136.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":1580091060,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_136); + +function test_137(x, arr) { + switch(x) { + case 'foo': + arr.push(1580091060); + break; + default: + case 'bar': + break; + case 'zing': + break; + } +} +test_137.INPUTS = ['foo', 'bar', 'zing']; +test_137.SPEC = [{"match":"foo","body":1580091060,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_137); + +function test_138(x, arr) { + switch(x) { + case 'foo': + arr.push(1580091060); + break; + case 'bar': + break; + case 'zing': + break; + default: + } +} +test_138.INPUTS = ['foo', 'bar', 'zing']; +test_138.SPEC = [{"match":"foo","body":1580091060,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_138); + +function test_139(x, arr) { + switch(x) { + default: + arr.push(1822221944); + case 'foo': + arr.push(1580091060); + break; + case 'bar': + break; + case 'zing': + break; + } +} +test_139.INPUTS = ['foo', 'bar', 'zing']; +test_139.SPEC = [{"match":null,"body":1822221944,"fallthrough":true},{"match":"foo","body":1580091060,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_139); + +function test_140(x, arr) { + switch(x) { + case 'foo': + arr.push(1580091060); + break; + default: + arr.push(1822221944); + case 'bar': + break; + case 'zing': + break; + } +} +test_140.INPUTS = ['foo', 'bar', 'zing']; +test_140.SPEC = [{"match":"foo","body":1580091060,"fallthrough":false},{"match":null,"body":1822221944,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_140); + +function test_141(x, arr) { + switch(x) { + case 'foo': + arr.push(1580091060); + break; + case 'bar': + break; + case 'zing': + break; + default: + arr.push(1822221944); + } +} +test_141.INPUTS = ['foo', 'bar', 'zing']; +test_141.SPEC = [{"match":"foo","body":1580091060,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":1822221944,"fallthrough":true}]; +TESTS.push(test_141); + +function test_142(x, arr) { + switch(x) { + default: + arr.push(1855786158); + break; + case 'foo': + arr.push(1580091060); + break; + case 'bar': + break; + case 'zing': + break; + } +} +test_142.INPUTS = ['foo', 'bar', 'zing']; +test_142.SPEC = [{"match":null,"body":1855786158,"fallthrough":false},{"match":"foo","body":1580091060,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_142); + +function test_143(x, arr) { + switch(x) { + case 'foo': + arr.push(1580091060); + break; + default: + arr.push(1855786158); + break; + case 'bar': + break; + case 'zing': + break; + } +} +test_143.INPUTS = ['foo', 'bar', 'zing']; +test_143.SPEC = [{"match":"foo","body":1580091060,"fallthrough":false},{"match":null,"body":1855786158,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_143); + +function test_144(x, arr) { + switch(x) { + case 'foo': + arr.push(1580091060); + break; + case 'bar': + break; + case 'zing': + break; + default: + arr.push(1855786158); + break; + } +} +test_144.INPUTS = ['foo', 'bar', 'zing']; +test_144.SPEC = [{"match":"foo","body":1580091060,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":1855786158,"fallthrough":false}]; +TESTS.push(test_144); + +function test_145(x, arr) { + switch(x) { + default: + case 'foo': + arr.push('XO'); + break; + case 'bar': + case 'zing': + break; + } +} +test_145.INPUTS = ['foo', 'bar', 'zing']; +test_145.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":"XO","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_145); + +function test_146(x, arr) { + switch(x) { + case 'foo': + arr.push('XO'); + break; + default: + case 'bar': + case 'zing': + break; + } +} +test_146.INPUTS = ['foo', 'bar', 'zing']; +test_146.SPEC = [{"match":"foo","body":"XO","fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_146); + +function test_147(x, arr) { + switch(x) { + case 'foo': + arr.push('XO'); + break; + case 'bar': + case 'zing': + break; + default: + } +} +test_147.INPUTS = ['foo', 'bar', 'zing']; +test_147.SPEC = [{"match":"foo","body":"XO","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_147); + +function test_148(x, arr) { + switch(x) { + default: + arr.push('L'); + case 'foo': + arr.push('XO'); + break; + case 'bar': + case 'zing': + break; + } +} +test_148.INPUTS = ['foo', 'bar', 'zing']; +test_148.SPEC = [{"match":null,"body":"L","fallthrough":true},{"match":"foo","body":"XO","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_148); + +function test_149(x, arr) { + switch(x) { + case 'foo': + arr.push('XO'); + break; + default: + arr.push('L'); + case 'bar': + case 'zing': + break; + } +} +test_149.INPUTS = ['foo', 'bar', 'zing']; +test_149.SPEC = [{"match":"foo","body":"XO","fallthrough":false},{"match":null,"body":"L","fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_149); + +function test_150(x, arr) { + switch(x) { + case 'foo': + arr.push('XO'); + break; + case 'bar': + case 'zing': + break; + default: + arr.push('L'); + } +} +test_150.INPUTS = ['foo', 'bar', 'zing']; +test_150.SPEC = [{"match":"foo","body":"XO","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":"L","fallthrough":true}]; +TESTS.push(test_150); + +function test_151(x, arr) { + switch(x) { + default: + arr.push(1118900933); + break; + case 'foo': + arr.push('XO'); + break; + case 'bar': + case 'zing': + break; + } +} +test_151.INPUTS = ['foo', 'bar', 'zing']; +test_151.SPEC = [{"match":null,"body":1118900933,"fallthrough":false},{"match":"foo","body":"XO","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_151); + +function test_152(x, arr) { + switch(x) { + case 'foo': + arr.push('XO'); + break; + default: + arr.push(1118900933); + break; + case 'bar': + case 'zing': + break; + } +} +test_152.INPUTS = ['foo', 'bar', 'zing']; +test_152.SPEC = [{"match":"foo","body":"XO","fallthrough":false},{"match":null,"body":1118900933,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_152); + +function test_153(x, arr) { + switch(x) { + case 'foo': + arr.push('XO'); + break; + case 'bar': + case 'zing': + break; + default: + arr.push(1118900933); + break; + } +} +test_153.INPUTS = ['foo', 'bar', 'zing']; +test_153.SPEC = [{"match":"foo","body":"XO","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":1118900933,"fallthrough":false}]; +TESTS.push(test_153); + +function test_154(x, arr) { + switch(x) { + default: + case 'foo': + arr.push('H@'); + break; + case 'bar': + break; + case 'zing': + } +} +test_154.INPUTS = ['foo', 'bar', 'zing']; +test_154.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":"H@","fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_154); + +function test_155(x, arr) { + switch(x) { + case 'foo': + arr.push('H@'); + break; + default: + case 'bar': + break; + case 'zing': + } +} +test_155.INPUTS = ['foo', 'bar', 'zing']; +test_155.SPEC = [{"match":"foo","body":"H@","fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_155); + +function test_156(x, arr) { + switch(x) { + case 'foo': + arr.push('H@'); + break; + case 'bar': + break; + case 'zing': + default: + } +} +test_156.INPUTS = ['foo', 'bar', 'zing']; +test_156.SPEC = [{"match":"foo","body":"H@","fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_156); + +function test_157(x, arr) { + switch(x) { + default: + arr.push('f8n'); + case 'foo': + arr.push('H@'); + break; + case 'bar': + break; + case 'zing': + } +} +test_157.INPUTS = ['foo', 'bar', 'zing']; +test_157.SPEC = [{"match":null,"body":"f8n","fallthrough":true},{"match":"foo","body":"H@","fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_157); + +function test_158(x, arr) { + switch(x) { + case 'foo': + arr.push('H@'); + break; + default: + arr.push('f8n'); + case 'bar': + break; + case 'zing': + } +} +test_158.INPUTS = ['foo', 'bar', 'zing']; +test_158.SPEC = [{"match":"foo","body":"H@","fallthrough":false},{"match":null,"body":"f8n","fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_158); + +function test_159(x, arr) { + switch(x) { + case 'foo': + arr.push('H@'); + break; + case 'bar': + break; + case 'zing': + default: + arr.push('f8n'); + } +} +test_159.INPUTS = ['foo', 'bar', 'zing']; +test_159.SPEC = [{"match":"foo","body":"H@","fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":"f8n","fallthrough":true}]; +TESTS.push(test_159); + +function test_160(x, arr) { + switch(x) { + default: + arr.push('4rg'); + break; + case 'foo': + arr.push('H@'); + break; + case 'bar': + break; + case 'zing': + } +} +test_160.INPUTS = ['foo', 'bar', 'zing']; +test_160.SPEC = [{"match":null,"body":"4rg","fallthrough":false},{"match":"foo","body":"H@","fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_160); + +function test_161(x, arr) { + switch(x) { + case 'foo': + arr.push('H@'); + break; + default: + arr.push('4rg'); + break; + case 'bar': + break; + case 'zing': + } +} +test_161.INPUTS = ['foo', 'bar', 'zing']; +test_161.SPEC = [{"match":"foo","body":"H@","fallthrough":false},{"match":null,"body":"4rg","fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_161); + +function test_162(x, arr) { + switch(x) { + case 'foo': + arr.push('H@'); + break; + case 'bar': + break; + case 'zing': + default: + arr.push('4rg'); + break; + } +} +test_162.INPUTS = ['foo', 'bar', 'zing']; +test_162.SPEC = [{"match":"foo","body":"H@","fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":"4rg","fallthrough":false}]; +TESTS.push(test_162); + +function test_163(x, arr) { + switch(x) { + default: + case 'foo': + arr.push(1921603085); + break; + case 'bar': + case 'zing': + } +} +test_163.INPUTS = ['foo', 'bar', 'zing']; +test_163.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":1921603085,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_163); + +function test_164(x, arr) { + switch(x) { + case 'foo': + arr.push(1921603085); + break; + default: + case 'bar': + case 'zing': + } +} +test_164.INPUTS = ['foo', 'bar', 'zing']; +test_164.SPEC = [{"match":"foo","body":1921603085,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_164); + +function test_165(x, arr) { + switch(x) { + case 'foo': + arr.push(1921603085); + break; + case 'bar': + case 'zing': + default: + } +} +test_165.INPUTS = ['foo', 'bar', 'zing']; +test_165.SPEC = [{"match":"foo","body":1921603085,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_165); + +function test_166(x, arr) { + switch(x) { + default: + arr.push(2201436); + case 'foo': + arr.push(1921603085); + break; + case 'bar': + case 'zing': + } +} +test_166.INPUTS = ['foo', 'bar', 'zing']; +test_166.SPEC = [{"match":null,"body":2201436,"fallthrough":true},{"match":"foo","body":1921603085,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_166); + +function test_167(x, arr) { + switch(x) { + case 'foo': + arr.push(1921603085); + break; + default: + arr.push(2201436); + case 'bar': + case 'zing': + } +} +test_167.INPUTS = ['foo', 'bar', 'zing']; +test_167.SPEC = [{"match":"foo","body":1921603085,"fallthrough":false},{"match":null,"body":2201436,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_167); + +function test_168(x, arr) { + switch(x) { + case 'foo': + arr.push(1921603085); + break; + case 'bar': + case 'zing': + default: + arr.push(2201436); + } +} +test_168.INPUTS = ['foo', 'bar', 'zing']; +test_168.SPEC = [{"match":"foo","body":1921603085,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":2201436,"fallthrough":true}]; +TESTS.push(test_168); + +function test_169(x, arr) { + switch(x) { + default: + arr.push('(vPssM{'); + break; + case 'foo': + arr.push(1921603085); + break; + case 'bar': + case 'zing': + } +} +test_169.INPUTS = ['foo', 'bar', 'zing']; +test_169.SPEC = [{"match":null,"body":"(vPssM{","fallthrough":false},{"match":"foo","body":1921603085,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_169); + +function test_170(x, arr) { + switch(x) { + case 'foo': + arr.push(1921603085); + break; + default: + arr.push('(vPssM{'); + break; + case 'bar': + case 'zing': + } +} +test_170.INPUTS = ['foo', 'bar', 'zing']; +test_170.SPEC = [{"match":"foo","body":1921603085,"fallthrough":false},{"match":null,"body":"(vPssM{","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_170); + +function test_171(x, arr) { + switch(x) { + case 'foo': + arr.push(1921603085); + break; + case 'bar': + case 'zing': + default: + arr.push('(vPssM{'); + break; + } +} +test_171.INPUTS = ['foo', 'bar', 'zing']; +test_171.SPEC = [{"match":"foo","body":1921603085,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":"(vPssM{","fallthrough":false}]; +TESTS.push(test_171); + +function test_172(x, arr) { + switch(x) { + default: + case 'foo': + break; + case 'bar': + break; + case 'zing': + break; + } +} +test_172.INPUTS = ['foo', 'bar', 'zing']; +test_172.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_172); + +function test_173(x, arr) { + switch(x) { + case 'foo': + break; + default: + case 'bar': + break; + case 'zing': + break; + } +} +test_173.INPUTS = ['foo', 'bar', 'zing']; +test_173.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_173); + +function test_174(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + break; + case 'zing': + break; + default: + } +} +test_174.INPUTS = ['foo', 'bar', 'zing']; +test_174.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_174); + +function test_175(x, arr) { + switch(x) { + default: + arr.push('y'); + case 'foo': + break; + case 'bar': + break; + case 'zing': + break; + } +} +test_175.INPUTS = ['foo', 'bar', 'zing']; +test_175.SPEC = [{"match":null,"body":"y","fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_175); + +function test_176(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push('y'); + case 'bar': + break; + case 'zing': + break; + } +} +test_176.INPUTS = ['foo', 'bar', 'zing']; +test_176.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":"y","fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_176); + +function test_177(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + break; + case 'zing': + break; + default: + arr.push('y'); + } +} +test_177.INPUTS = ['foo', 'bar', 'zing']; +test_177.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":"y","fallthrough":true}]; +TESTS.push(test_177); + +function test_178(x, arr) { + switch(x) { + default: + arr.push('H'); + break; + case 'foo': + break; + case 'bar': + break; + case 'zing': + break; + } +} +test_178.INPUTS = ['foo', 'bar', 'zing']; +test_178.SPEC = [{"match":null,"body":"H","fallthrough":false},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_178); + +function test_179(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push('H'); + break; + case 'bar': + break; + case 'zing': + break; + } +} +test_179.INPUTS = ['foo', 'bar', 'zing']; +test_179.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":"H","fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_179); + +function test_180(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + break; + case 'zing': + break; + default: + arr.push('H'); + break; + } +} +test_180.INPUTS = ['foo', 'bar', 'zing']; +test_180.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":"H","fallthrough":false}]; +TESTS.push(test_180); + +function test_181(x, arr) { + switch(x) { + default: + case 'foo': + case 'bar': + break; + case 'zing': + break; + } +} +test_181.INPUTS = ['foo', 'bar', 'zing']; +test_181.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_181); + +function test_182(x, arr) { + switch(x) { + case 'foo': + default: + case 'bar': + break; + case 'zing': + break; + } +} +test_182.INPUTS = ['foo', 'bar', 'zing']; +test_182.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_182); + +function test_183(x, arr) { + switch(x) { + case 'foo': + case 'bar': + break; + case 'zing': + break; + default: + } +} +test_183.INPUTS = ['foo', 'bar', 'zing']; +test_183.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_183); + +function test_184(x, arr) { + switch(x) { + default: + arr.push('0vM}'); + case 'foo': + case 'bar': + break; + case 'zing': + break; + } +} +test_184.INPUTS = ['foo', 'bar', 'zing']; +test_184.SPEC = [{"match":null,"body":"0vM}","fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_184); + +function test_185(x, arr) { + switch(x) { + case 'foo': + default: + arr.push('0vM}'); + case 'bar': + break; + case 'zing': + break; + } +} +test_185.INPUTS = ['foo', 'bar', 'zing']; +test_185.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":"0vM}","fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_185); + +function test_186(x, arr) { + switch(x) { + case 'foo': + case 'bar': + break; + case 'zing': + break; + default: + arr.push('0vM}'); + } +} +test_186.INPUTS = ['foo', 'bar', 'zing']; +test_186.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":"0vM}","fallthrough":true}]; +TESTS.push(test_186); + +function test_187(x, arr) { + switch(x) { + default: + arr.push('jn~d(x'); + break; + case 'foo': + case 'bar': + break; + case 'zing': + break; + } +} +test_187.INPUTS = ['foo', 'bar', 'zing']; +test_187.SPEC = [{"match":null,"body":"jn~d(x","fallthrough":false},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_187); + +function test_188(x, arr) { + switch(x) { + case 'foo': + default: + arr.push('jn~d(x'); + break; + case 'bar': + break; + case 'zing': + break; + } +} +test_188.INPUTS = ['foo', 'bar', 'zing']; +test_188.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":"jn~d(x","fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_188); + +function test_189(x, arr) { + switch(x) { + case 'foo': + case 'bar': + break; + case 'zing': + break; + default: + arr.push('jn~d(x'); + break; + } +} +test_189.INPUTS = ['foo', 'bar', 'zing']; +test_189.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":"jn~d(x","fallthrough":false}]; +TESTS.push(test_189); + +function test_190(x, arr) { + switch(x) { + default: + case 'foo': + break; + case 'bar': + case 'zing': + break; + } +} +test_190.INPUTS = ['foo', 'bar', 'zing']; +test_190.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_190); + +function test_191(x, arr) { + switch(x) { + case 'foo': + break; + default: + case 'bar': + case 'zing': + break; + } +} +test_191.INPUTS = ['foo', 'bar', 'zing']; +test_191.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_191); + +function test_192(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + case 'zing': + break; + default: + } +} +test_192.INPUTS = ['foo', 'bar', 'zing']; +test_192.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_192); + +function test_193(x, arr) { + switch(x) { + default: + arr.push('['); + case 'foo': + break; + case 'bar': + case 'zing': + break; + } +} +test_193.INPUTS = ['foo', 'bar', 'zing']; +test_193.SPEC = [{"match":null,"body":"[","fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_193); + +function test_194(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push('['); + case 'bar': + case 'zing': + break; + } +} +test_194.INPUTS = ['foo', 'bar', 'zing']; +test_194.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":"[","fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_194); + +function test_195(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + case 'zing': + break; + default: + arr.push('['); + } +} +test_195.INPUTS = ['foo', 'bar', 'zing']; +test_195.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":"[","fallthrough":true}]; +TESTS.push(test_195); + +function test_196(x, arr) { + switch(x) { + default: + arr.push('3DbGY'); + break; + case 'foo': + break; + case 'bar': + case 'zing': + break; + } +} +test_196.INPUTS = ['foo', 'bar', 'zing']; +test_196.SPEC = [{"match":null,"body":"3DbGY","fallthrough":false},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_196); + +function test_197(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push('3DbGY'); + break; + case 'bar': + case 'zing': + break; + } +} +test_197.INPUTS = ['foo', 'bar', 'zing']; +test_197.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":"3DbGY","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_197); + +function test_198(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + case 'zing': + break; + default: + arr.push('3DbGY'); + break; + } +} +test_198.INPUTS = ['foo', 'bar', 'zing']; +test_198.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":"3DbGY","fallthrough":false}]; +TESTS.push(test_198); + +function test_199(x, arr) { + switch(x) { + default: + case 'foo': + case 'bar': + case 'zing': + break; + } +} +test_199.INPUTS = ['foo', 'bar', 'zing']; +test_199.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_199); + +function test_200(x, arr) { + switch(x) { + case 'foo': + default: + case 'bar': + case 'zing': + break; + } +} +test_200.INPUTS = ['foo', 'bar', 'zing']; +test_200.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_200); + +function test_201(x, arr) { + switch(x) { + case 'foo': + case 'bar': + case 'zing': + break; + default: + } +} +test_201.INPUTS = ['foo', 'bar', 'zing']; +test_201.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_201); + +function test_202(x, arr) { + switch(x) { + default: + arr.push(1320190826); + case 'foo': + case 'bar': + case 'zing': + break; + } +} +test_202.INPUTS = ['foo', 'bar', 'zing']; +test_202.SPEC = [{"match":null,"body":1320190826,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_202); + +function test_203(x, arr) { + switch(x) { + case 'foo': + default: + arr.push(1320190826); + case 'bar': + case 'zing': + break; + } +} +test_203.INPUTS = ['foo', 'bar', 'zing']; +test_203.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":1320190826,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_203); + +function test_204(x, arr) { + switch(x) { + case 'foo': + case 'bar': + case 'zing': + break; + default: + arr.push(1320190826); + } +} +test_204.INPUTS = ['foo', 'bar', 'zing']; +test_204.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":1320190826,"fallthrough":true}]; +TESTS.push(test_204); + +function test_205(x, arr) { + switch(x) { + default: + arr.push(1211439111); + break; + case 'foo': + case 'bar': + case 'zing': + break; + } +} +test_205.INPUTS = ['foo', 'bar', 'zing']; +test_205.SPEC = [{"match":null,"body":1211439111,"fallthrough":false},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_205); + +function test_206(x, arr) { + switch(x) { + case 'foo': + default: + arr.push(1211439111); + break; + case 'bar': + case 'zing': + break; + } +} +test_206.INPUTS = ['foo', 'bar', 'zing']; +test_206.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":1211439111,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false}]; +TESTS.push(test_206); + +function test_207(x, arr) { + switch(x) { + case 'foo': + case 'bar': + case 'zing': + break; + default: + arr.push(1211439111); + break; + } +} +test_207.INPUTS = ['foo', 'bar', 'zing']; +test_207.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":false},{"match":null,"body":1211439111,"fallthrough":false}]; +TESTS.push(test_207); + +function test_208(x, arr) { + switch(x) { + default: + case 'foo': + break; + case 'bar': + break; + case 'zing': + } +} +test_208.INPUTS = ['foo', 'bar', 'zing']; +test_208.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_208); + +function test_209(x, arr) { + switch(x) { + case 'foo': + break; + default: + case 'bar': + break; + case 'zing': + } +} +test_209.INPUTS = ['foo', 'bar', 'zing']; +test_209.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_209); + +function test_210(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + break; + case 'zing': + default: + } +} +test_210.INPUTS = ['foo', 'bar', 'zing']; +test_210.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_210); + +function test_211(x, arr) { + switch(x) { + default: + arr.push(1547874695); + case 'foo': + break; + case 'bar': + break; + case 'zing': + } +} +test_211.INPUTS = ['foo', 'bar', 'zing']; +test_211.SPEC = [{"match":null,"body":1547874695,"fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_211); + +function test_212(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push(1547874695); + case 'bar': + break; + case 'zing': + } +} +test_212.INPUTS = ['foo', 'bar', 'zing']; +test_212.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":1547874695,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_212); + +function test_213(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + break; + case 'zing': + default: + arr.push(1547874695); + } +} +test_213.INPUTS = ['foo', 'bar', 'zing']; +test_213.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":1547874695,"fallthrough":true}]; +TESTS.push(test_213); + +function test_214(x, arr) { + switch(x) { + default: + arr.push('@_2GFlnK=t'); + break; + case 'foo': + break; + case 'bar': + break; + case 'zing': + } +} +test_214.INPUTS = ['foo', 'bar', 'zing']; +test_214.SPEC = [{"match":null,"body":"@_2GFlnK=t","fallthrough":false},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_214); + +function test_215(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push('@_2GFlnK=t'); + break; + case 'bar': + break; + case 'zing': + } +} +test_215.INPUTS = ['foo', 'bar', 'zing']; +test_215.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":"@_2GFlnK=t","fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_215); + +function test_216(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + break; + case 'zing': + default: + arr.push('@_2GFlnK=t'); + break; + } +} +test_216.INPUTS = ['foo', 'bar', 'zing']; +test_216.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":"@_2GFlnK=t","fallthrough":false}]; +TESTS.push(test_216); + +function test_217(x, arr) { + switch(x) { + default: + case 'foo': + case 'bar': + break; + case 'zing': + } +} +test_217.INPUTS = ['foo', 'bar', 'zing']; +test_217.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_217); + +function test_218(x, arr) { + switch(x) { + case 'foo': + default: + case 'bar': + break; + case 'zing': + } +} +test_218.INPUTS = ['foo', 'bar', 'zing']; +test_218.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_218); + +function test_219(x, arr) { + switch(x) { + case 'foo': + case 'bar': + break; + case 'zing': + default: + } +} +test_219.INPUTS = ['foo', 'bar', 'zing']; +test_219.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_219); + +function test_220(x, arr) { + switch(x) { + default: + arr.push('~C$'); + case 'foo': + case 'bar': + break; + case 'zing': + } +} +test_220.INPUTS = ['foo', 'bar', 'zing']; +test_220.SPEC = [{"match":null,"body":"~C$","fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_220); + +function test_221(x, arr) { + switch(x) { + case 'foo': + default: + arr.push('~C$'); + case 'bar': + break; + case 'zing': + } +} +test_221.INPUTS = ['foo', 'bar', 'zing']; +test_221.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":"~C$","fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_221); + +function test_222(x, arr) { + switch(x) { + case 'foo': + case 'bar': + break; + case 'zing': + default: + arr.push('~C$'); + } +} +test_222.INPUTS = ['foo', 'bar', 'zing']; +test_222.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":"~C$","fallthrough":true}]; +TESTS.push(test_222); + +function test_223(x, arr) { + switch(x) { + default: + arr.push('2sfo%'); + break; + case 'foo': + case 'bar': + break; + case 'zing': + } +} +test_223.INPUTS = ['foo', 'bar', 'zing']; +test_223.SPEC = [{"match":null,"body":"2sfo%","fallthrough":false},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_223); + +function test_224(x, arr) { + switch(x) { + case 'foo': + default: + arr.push('2sfo%'); + break; + case 'bar': + break; + case 'zing': + } +} +test_224.INPUTS = ['foo', 'bar', 'zing']; +test_224.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":"2sfo%","fallthrough":false},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_224); + +function test_225(x, arr) { + switch(x) { + case 'foo': + case 'bar': + break; + case 'zing': + default: + arr.push('2sfo%'); + break; + } +} +test_225.INPUTS = ['foo', 'bar', 'zing']; +test_225.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":false},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":"2sfo%","fallthrough":false}]; +TESTS.push(test_225); + +function test_226(x, arr) { + switch(x) { + default: + case 'foo': + break; + case 'bar': + case 'zing': + } +} +test_226.INPUTS = ['foo', 'bar', 'zing']; +test_226.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_226); + +function test_227(x, arr) { + switch(x) { + case 'foo': + break; + default: + case 'bar': + case 'zing': + } +} +test_227.INPUTS = ['foo', 'bar', 'zing']; +test_227.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_227); + +function test_228(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + case 'zing': + default: + } +} +test_228.INPUTS = ['foo', 'bar', 'zing']; +test_228.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_228); + +function test_229(x, arr) { + switch(x) { + default: + arr.push(1637942279); + case 'foo': + break; + case 'bar': + case 'zing': + } +} +test_229.INPUTS = ['foo', 'bar', 'zing']; +test_229.SPEC = [{"match":null,"body":1637942279,"fallthrough":true},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_229); + +function test_230(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push(1637942279); + case 'bar': + case 'zing': + } +} +test_230.INPUTS = ['foo', 'bar', 'zing']; +test_230.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":1637942279,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_230); + +function test_231(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + case 'zing': + default: + arr.push(1637942279); + } +} +test_231.INPUTS = ['foo', 'bar', 'zing']; +test_231.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":1637942279,"fallthrough":true}]; +TESTS.push(test_231); + +function test_232(x, arr) { + switch(x) { + default: + arr.push('4E!jR'); + break; + case 'foo': + break; + case 'bar': + case 'zing': + } +} +test_232.INPUTS = ['foo', 'bar', 'zing']; +test_232.SPEC = [{"match":null,"body":"4E!jR","fallthrough":false},{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_232); + +function test_233(x, arr) { + switch(x) { + case 'foo': + break; + default: + arr.push('4E!jR'); + break; + case 'bar': + case 'zing': + } +} +test_233.INPUTS = ['foo', 'bar', 'zing']; +test_233.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":null,"body":"4E!jR","fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_233); + +function test_234(x, arr) { + switch(x) { + case 'foo': + break; + case 'bar': + case 'zing': + default: + arr.push('4E!jR'); + break; + } +} +test_234.INPUTS = ['foo', 'bar', 'zing']; +test_234.SPEC = [{"match":"foo","body":null,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":"4E!jR","fallthrough":false}]; +TESTS.push(test_234); + +function test_235(x, arr) { + switch(x) { + default: + case 'foo': + case 'bar': + case 'zing': + } +} +test_235.INPUTS = ['foo', 'bar', 'zing']; +test_235.SPEC = [{"match":null,"body":null,"fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_235); + +function test_236(x, arr) { + switch(x) { + case 'foo': + default: + case 'bar': + case 'zing': + } +} +test_236.INPUTS = ['foo', 'bar', 'zing']; +test_236.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_236); + +function test_237(x, arr) { + switch(x) { + case 'foo': + case 'bar': + case 'zing': + default: + } +} +test_237.INPUTS = ['foo', 'bar', 'zing']; +test_237.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":null,"fallthrough":true}]; +TESTS.push(test_237); + +function test_238(x, arr) { + switch(x) { + default: + arr.push(')fSNzp06'); + case 'foo': + case 'bar': + case 'zing': + } +} +test_238.INPUTS = ['foo', 'bar', 'zing']; +test_238.SPEC = [{"match":null,"body":")fSNzp06","fallthrough":true},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_238); + +function test_239(x, arr) { + switch(x) { + case 'foo': + default: + arr.push(')fSNzp06'); + case 'bar': + case 'zing': + } +} +test_239.INPUTS = ['foo', 'bar', 'zing']; +test_239.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":")fSNzp06","fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_239); + +function test_240(x, arr) { + switch(x) { + case 'foo': + case 'bar': + case 'zing': + default: + arr.push(')fSNzp06'); + } +} +test_240.INPUTS = ['foo', 'bar', 'zing']; +test_240.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":")fSNzp06","fallthrough":true}]; +TESTS.push(test_240); + +function test_241(x, arr) { + switch(x) { + default: + arr.push(974910083); + break; + case 'foo': + case 'bar': + case 'zing': + } +} +test_241.INPUTS = ['foo', 'bar', 'zing']; +test_241.SPEC = [{"match":null,"body":974910083,"fallthrough":false},{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_241); + +function test_242(x, arr) { + switch(x) { + case 'foo': + default: + arr.push(974910083); + break; + case 'bar': + case 'zing': + } +} +test_242.INPUTS = ['foo', 'bar', 'zing']; +test_242.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":null,"body":974910083,"fallthrough":false},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true}]; +TESTS.push(test_242); + +function test_243(x, arr) { + switch(x) { + case 'foo': + case 'bar': + case 'zing': + default: + arr.push(974910083); + break; + } +} +test_243.INPUTS = ['foo', 'bar', 'zing']; +test_243.SPEC = [{"match":"foo","body":null,"fallthrough":true},{"match":"bar","body":null,"fallthrough":true},{"match":"zing","body":null,"fallthrough":true},{"match":null,"body":974910083,"fallthrough":false}]; +TESTS.push(test_243); + + +///////////////////////////////////////// +// RUNNER // +///////////////////////////////////////// + +for(var i = 0; i < TESTS.length; i++) { + RunTest(TESTS[i]); +} diff --git a/js/src/jit-test/tests/ion/loop-test-fold.js b/js/src/jit-test/tests/ion/loop-test-fold.js new file mode 100644 index 0000000000..ff897c405b --- /dev/null +++ b/js/src/jit-test/tests/ion/loop-test-fold.js @@ -0,0 +1,7 @@ + +function f(a, b) { + do { + a--; + } while (a || b); +} +f(2000, 0); diff --git a/js/src/jit-test/tests/ion/lsra-bug1112164.js b/js/src/jit-test/tests/ion/lsra-bug1112164.js new file mode 100644 index 0000000000..92a7e08003 --- /dev/null +++ b/js/src/jit-test/tests/ion/lsra-bug1112164.js @@ -0,0 +1,36 @@ +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 30); + +var atan2 = Math.atan2; + +function reference(x, y, z, w) { + with({}) {}; /* prevent compilation */ + return [ atan2(x + 0.1, w), + atan2(y + 0.1, z), + atan2(z + 0.1, y), + atan2(w + 0.1, x) ]; +} + +function generator(x, y, z, w) { + return [ atan2(x + 0.1, w), + atan2(y + 0.1, z), + atan2(z + 0.1, y), + atan2(w + 0.1, x) ]; +} + +function test() { + var min = -0.99999, step = 0.1, max = 1; + for (var x = min; x < max; x += step) + for (var y = min; y < max; y += step) + for (var z = min; z < max; z += step) + for (var w = min; w < max; w += step) { + var ref = reference(x, y, z, w); + var gen = generator(x, y, z, w); + assertEq(gen[0], ref[0]); + assertEq(gen[1], ref[1]); + assertEq(gen[2], ref[2]); + assertEq(gen[3], ref[3]); + } +} + +test(); diff --git a/js/src/jit-test/tests/ion/math-imul-folding.js b/js/src/jit-test/tests/ion/math-imul-folding.js new file mode 100644 index 0000000000..4a187ad074 --- /dev/null +++ b/js/src/jit-test/tests/ion/math-imul-folding.js @@ -0,0 +1,7 @@ +function sprod(x, y) { + var iprod = Math.imul(x | 0, y | 0); + var fprod = (x | 0) * (y | 0); + return iprod + fprod; +} +assertEq(sprod(2, 2), 8); +assertEq(sprod(0x10000, 0x10000), 0x100000000); diff --git a/js/src/jit-test/tests/ion/math-max-arraylength.js b/js/src/jit-test/tests/ion/math-max-arraylength.js new file mode 100644 index 0000000000..dd8e915f84 --- /dev/null +++ b/js/src/jit-test/tests/ion/math-max-arraylength.js @@ -0,0 +1,25 @@ +var arrays = [ + [], + [1], + [1, 2], + [1, 2, 3], + [1, 2, 3, 4], +]; + +function test() { + for (var i = 0; i < arrays.length; i++) { + var array = arrays[i]; + + assertEq(Math.max(array.length, 0), i); + assertEq(Math.max(0, array.length), i); + + assertEq(Math.max(array.length, -1), i); + assertEq(Math.max(-1, array.length), i); + + assertEq(Math.max(array.length, -1.5), i); + assertEq(Math.max(-1.5, array.length), i); + } +} + +test(); +test(); diff --git a/js/src/jit-test/tests/ion/mathFloor.js b/js/src/jit-test/tests/ion/mathFloor.js new file mode 100644 index 0000000000..319ff17bff --- /dev/null +++ b/js/src/jit-test/tests/ion/mathFloor.js @@ -0,0 +1,50 @@ +// Test Math.floor() for IonMonkey. +// Requires --ion-eager to enter at the top of each loop. + +var floorDTests = [ + [-0, -0], + [0.49999999999999997, 0], + [0.5, 0], + [1.0, 1], + [1.5, 1], + [792.8, 792], + [-0.1, -1], + [-1.0001, -2], + [-3.14, -4], + [2137483649.5, 2137483649], + [2137483648.5, 2137483648], + [2137483647.1, 2137483647], + [900000000000, 900000000000], + [-0, -0], + [-Infinity, -Infinity], + [Infinity, Infinity], + [NaN, NaN], + [-2147483648.8, -2147483649], + [-2147483649.8, -2147483650] +]; + +var floorITests = [ + [0, 0], + [4, 4], + [-1, -1], + [-7, -7], + [2147483648, 2147483648], + [-2147483649, -2147483649] +]; + +// Typed functions to be compiled by Ion. +function floorD(x) { return Math.floor(x); } +function floorI(x) { return Math.floor(x); } + +function test() { + // Always run this function in the interpreter. + with ({}) {} + + for (var i = 0; i < floorDTests.length; i++) + assertEq(floorD(floorDTests[i][0]), floorDTests[i][1]); + for (var i = 0; i < floorITests.length; i++) + assertEq(floorI(floorITests[i][0]), floorITests[i][1]); +} + +for (var i = 0; i < 40; i++) + test(); diff --git a/js/src/jit-test/tests/ion/mathMinMax.js b/js/src/jit-test/tests/ion/mathMinMax.js new file mode 100644 index 0000000000..dc3e5df9e1 --- /dev/null +++ b/js/src/jit-test/tests/ion/mathMinMax.js @@ -0,0 +1,42 @@ +var nan = Number.NaN; +var negative_zero = -0; + +function max(a, b) { + return Math.max(a, b); +} +function min(a, b) { + return Math.min(a, b); +} + +function main() { + for (var i = 0; i < 100; i++) { + assertEq(max(negative_zero, 0), 0); + assertEq(max(0, negative_zero), 0); + assertEq(min(0, negative_zero), negative_zero); + assertEq(min(negative_zero, 0), negative_zero); + + assertEq(min(negative_zero, negative_zero), negative_zero); + assertEq(max(negative_zero, negative_zero), negative_zero); + + assertEq(max(nan, 0), nan); + assertEq(min(nan, 0), nan); + + assertEq(max(0, nan), nan); + assertEq(max(nan, 0), nan); + + assertEq(max(3, 5), 5); + assertEq(max(5, 3), 5); + + assertEq(min(3, 5), 3); + assertEq(min(5, 3), 3); + + assertEq(max(Infinity, -Infinity), Infinity); + assertEq(min(Infinity, -Infinity), -Infinity); + assertEq(max(Infinity, nan), nan); + + assertEq(max(negative_zero, -5), negative_zero); + assertEq(min(negative_zero, -5), -5); + } +} + +main(); \ No newline at end of file diff --git a/js/src/jit-test/tests/ion/mathRound.js b/js/src/jit-test/tests/ion/mathRound.js new file mode 100644 index 0000000000..9230e4fc10 --- /dev/null +++ b/js/src/jit-test/tests/ion/mathRound.js @@ -0,0 +1,48 @@ +// Test Math.round() for IonMonkey. +// Requires --ion-eager to enter at the top of each loop. + +var roundDTests = [ + [-0, -0], + [0.49999999999999997, 0], + [0.5, 1], + [1.0, 1], + [1.5, 2], + [792.8, 793], + [-0.1, -0], + [-1.0001, -1], + [-3.14, -3], + [2137483649.5, 2137483650], + [2137483648.5, 2137483649], + [2137483647.1, 2137483647], + [900000000000, 900000000000], + [-0, -0], + [-Infinity, -Infinity], + [Infinity, Infinity], + [NaN, NaN], + [-2147483648.8, -2147483649], + [-2147483649.8, -2147483650] +]; + +var roundITests = [ + [0, 0], + [4, 4], + [2147483648, 2147483648], + [-2147483649, -2147483649] +]; + +// Typed functions to be compiled by Ion. +function roundD(x) { return Math.round(x); } +function roundI(x) { return Math.round(x); } + +function test() { + // Always run this function in the interpreter. + with ({}) {} + + for (var i = 0; i < roundDTests.length; i++) + assertEq(roundD(roundDTests[i][0]), roundDTests[i][1]); + for (var i = 0; i < roundITests.length; i++) + assertEq(roundI(roundITests[i][0]), roundITests[i][1]); +} + +for (var i = 0; i < 40; i++) + test(); diff --git a/js/src/jit-test/tests/ion/mathSign.js b/js/src/jit-test/tests/ion/mathSign.js new file mode 100644 index 0000000000..892bcbe63b --- /dev/null +++ b/js/src/jit-test/tests/ion/mathSign.js @@ -0,0 +1,75 @@ +// Test Math.sign() for IonMonkey. +// Requires --ion-eager to enter at the top of each loop. + +var signDITests = [ + [0.49999999999999997, 1], + [0.5, 1], + [1.0, 1], + [1.5, 1], + [792.8, 1], + [-0.1, -1], + [-1.0001, -1], + [-3.14, -1], + [900000000000, 1], + [+0, +0], + [-Infinity, -1], + [Infinity, 1], +]; + +var signDITests_bailout = [ + // Add a few 'double -> int' tests before the bailout. + ...(function*(){ for (var i = 0; i < 50; ++i) yield* signDITests; })(), + + // Trigger bailout for negative zero. + [-0, -0], +]; + +var signDTests = [ + [-0, -0], + [0.49999999999999997, 1], + [0.5, 1], + [1.0, 1], + [1.5, 1], + [792.8, 1], + [-0.1, -1], + [-1.0001, -1], + [-3.14, -1], + [900000000000, 1], + [-0, -0], + [+0, +0], + [-Infinity, -1], + [Infinity, 1], + [NaN, NaN], +]; + +var signITests = [ + [0, 0], + [4, 1], + [-1, -1], + [-7, -1], + [2147483647, 1], + [-2147483648, -1], +]; + +// Typed functions to be compiled by Ion. +function signDI(x) { return Math.sign(x); } +function signDI_bailout(x) { return Math.sign(x); } +function signD(x) { return Math.sign(x); } +function signI(x) { return Math.sign(x); } + +function test() { + // Always run this function in the interpreter. + with ({}) {} + + for (var i = 0; i < signDITests.length; i++) + assertEq(signDI(signDITests[i][0]), signDITests[i][1]); + for (var i = 0; i < signDITests_bailout.length; i++) + assertEq(signDI_bailout(signDITests_bailout[i][0]), signDITests_bailout[i][1]); + for (var i = 0; i < signDTests.length; i++) + assertEq(signD(signDTests[i][0]), signDTests[i][1]); + for (var i = 0; i < signITests.length; i++) + assertEq(signI(signITests[i][0]), signITests[i][1]); +} + +for (var i = 0; i < 40; i++) + test(); diff --git a/js/src/jit-test/tests/ion/mathTrunc.js b/js/src/jit-test/tests/ion/mathTrunc.js new file mode 100644 index 0000000000..35c0369a00 --- /dev/null +++ b/js/src/jit-test/tests/ion/mathTrunc.js @@ -0,0 +1,76 @@ +// Test Math.trunc() for IonMonkey. +// Requires --ion-eager to enter at the top of each loop. + +var truncDITests = [ + [0.49999999999999997, 0], + [0.5, 0], + [1.0, 1], + [1.5, 1], + [792.8, 792], + [-1.0001, -1], + [-3.14, -3], + [2137483649.5, 2137483649], + [2137483648.5, 2137483648], + [2137483647.1, 2137483647], + [-2147483647.8, -2147483647], +]; + +var truncDITests_bailout = [ + ...truncDITests, + + // Bailout in bailoutCvttsd2si: https://bugzil.la/1379626#c1 + [-2147483648.8, -2147483648], +]; + +var truncDTests = [ + [-0, -0], + [0.49999999999999997, 0], + [0.5, 0], + [1.0, 1], + [1.5, 1], + [792.8, 792], + [-0.1, -0], + [-1.0001, -1], + [-3.14, -3], + [2137483649.5, 2137483649], + [2137483648.5, 2137483648], + [2137483647.1, 2137483647], + [900000000000, 900000000000], + [-0, -0], + [-Infinity, -Infinity], + [Infinity, Infinity], + [NaN, NaN], + [-2147483648.8, -2147483648], + [-2147483649.8, -2147483649], +]; + +var truncITests = [ + [0, 0], + [4, 4], + [-1, -1], + [-7, -7], + [2147483647, 2147483647], +]; + +// Typed functions to be compiled by Ion. +function truncDI(x) { return Math.trunc(x); } +function truncDI_bailout(x) { return Math.trunc(x); } +function truncD(x) { return Math.trunc(x); } +function truncI(x) { return Math.trunc(x); } + +function test() { + // Always run this function in the interpreter. + with ({}) {} + + for (var i = 0; i < truncDITests.length; i++) + assertEq(truncDI(truncDITests[i][0]), truncDITests[i][1]); + for (var i = 0; i < truncDITests_bailout.length; i++) + assertEq(truncDI_bailout(truncDITests_bailout[i][0]), truncDITests_bailout[i][1]); + for (var i = 0; i < truncDTests.length; i++) + assertEq(truncD(truncDTests[i][0]), truncDTests[i][1]); + for (var i = 0; i < truncITests.length; i++) + assertEq(truncI(truncITests[i][0]), truncITests[i][1]); +} + +for (var i = 0; i < 40; i++) + test(); diff --git a/js/src/jit-test/tests/ion/megamorphic-null-and-undefined.js b/js/src/jit-test/tests/ion/megamorphic-null-and-undefined.js new file mode 100644 index 0000000000..5f7f804a31 --- /dev/null +++ b/js/src/jit-test/tests/ion/megamorphic-null-and-undefined.js @@ -0,0 +1,18 @@ +let objs = []; + +for (let i = 0; i < 100; i++) { + let obj = {}; + obj["x" + i] = 1; + obj[undefined] = 2; + obj[null] = 3; + objs.push(obj); +} + +function foo(obj) { + assertEq(obj[undefined], 2); + assertEq(obj[null], 3); +} + +for (let i = 0; i < 100; i++) { + foo(objs[i]); +} diff --git a/js/src/jit-test/tests/ion/merge-phi-usage-analysis.js b/js/src/jit-test/tests/ion/merge-phi-usage-analysis.js new file mode 100644 index 0000000000..f239a8faf2 --- /dev/null +++ b/js/src/jit-test/tests/ion/merge-phi-usage-analysis.js @@ -0,0 +1,63 @@ + +function expensive() { + with({}) {} +} + +function phi_merge_0(i) { + // These computations can overflow, if the output is not truncated. + i = i | 0; + var a0 = i + i; + var a1 = i + i; + + if ((a1 | 0) - ((2 * i) | 0)) { + // Good candidate for branch pruning, which marks only a1 as having + // removed uses. + expensive(); + expensive(); + expensive(); + expensive(); + expensive(); + } + + // Simple branch made to let GVN merge the Phi instructions. + if (a1 % 3 == 1) { + a1 = 2 * i; + a0 = 2 * i; + } + + // a0 is never used, but a1 is truncated. + return a1 | 0; +} + +function phi_merge_1(i) { + // These computations can overflow, if the output is not truncated. + i = i | 0; + var a1 = i + i; + var a0 = i + i; + + if ((a1 | 0) - ((2 * i) | 0)) { + // Good candidate for branch pruning, which marks only a1 as having + // removed uses. + expensive(); + expensive(); + expensive(); + expensive(); + expensive(); + } + + // Simple branch made to let GVN merge the Phi instructions. + if (a1 % 3 == 1) { + a1 = 2 * i; + a0 = 2 * i; + } + + // a0 is never used, but a1 is truncated. + return a1 | 0; +} + +for (var j = 0; j < 300; j++) { + for (var i = 1; i == (i | 0); i = 2 * i + 1) { + assertEq(phi_merge_0(i) < 0x80000000, true); + assertEq(phi_merge_1(i) < 0x80000000, true); + } +} diff --git a/js/src/jit-test/tests/ion/mod-double.js b/js/src/jit-test/tests/ion/mod-double.js new file mode 100644 index 0000000000..7a6df7bd56 --- /dev/null +++ b/js/src/jit-test/tests/ion/mod-double.js @@ -0,0 +1,13 @@ +function test1() { + function mod(x, y) { + return x % y; + } + for (var i=0; i<60; i++) { + assertEq(mod(4, 2), 0); + assertEq(mod(5.5, 2.5), 0.5); + assertEq(mod(10.3, 0), NaN); + assertEq(mod(-0, -3), -0); + + } +} +test1(); diff --git a/js/src/jit-test/tests/ion/monomorphic-inlining.js b/js/src/jit-test/tests/ion/monomorphic-inlining.js new file mode 100644 index 0000000000..608d10917d --- /dev/null +++ b/js/src/jit-test/tests/ion/monomorphic-inlining.js @@ -0,0 +1,42 @@ +// |jit-test| --ion-offthread-compile=off; + +function foo(f, a, b) { + return f(a, b); +} + +function bar(a, b) { + let result = a + b; + if (result >= fns.length) { + return b + a; + } + return result; +} + +function baz(a, b) { + return a + b; +} + +let fns = []; + +// This is pretty fiddly. What we are trying to test here is a specific path +// in the bailout code which needs to know which ICScript to load, and has to +// decide between the script's own ICScript, or the trial-inlined ICScript +// which belongs to the outer script. It uses the ICFallbackStub's +// trialInliningState to make this decision, which can change out from +// underneath us if the inlined call fails. So what were doing here is getting +// into a state where we've monomorphic inlined a function, and gone to Ion +// with it. We then cause the inlined call to fail by calling a function which +// doesn't match what we expect, which transitions us to a failed +// trialInliningState. We then will bail out *inside* bar, due to the +// previously unseen inside of the result >= fns.length check, exercising the +// bailout code in question. +for (let i = 0; i < 2000; i++) { + fns.push(bar); +} + +fns.push(baz); +fns.push(bar); + +for (let i = 0; i < fns.length; i++) { + assertEq(foo(fns[i], i, 1), i + 1); +} diff --git a/js/src/jit-test/tests/ion/monomorphic-property-access.js b/js/src/jit-test/tests/ion/monomorphic-property-access.js new file mode 100644 index 0000000000..54066a8d89 --- /dev/null +++ b/js/src/jit-test/tests/ion/monomorphic-property-access.js @@ -0,0 +1,38 @@ +function Foo() { + for (var i=0; i<10; i++) { + this["p" + i] = i; + } +} + +function test1(foo) { + for (var i=0; i<10400; i++) { + foo.p1 = i; + foo.p9 = i; + var x = foo.p0 + foo.p1 + foo.p2 + foo.p8 + foo.p4 + + foo.p5 + foo.p6 + foo.p7 + foo.p3 + foo.p9; + assertEq(x, i + i + 35); + } +} + +test1(new Foo); + +function Bar(arg) { + if (arg) { // Thwart definite-property analysis. + this.x = 1; + this.y = 2; + this.z = 3; + } +} + +function test2(bar) { + for (var i=0; i<10400; i++) { + bar.x++; + bar.y++; + bar.z++; + } + assertEq(bar.x, 10401); + assertEq(bar.y, 10402); + assertEq(bar.z, 10403); +} + +test2(new Bar(true)); diff --git a/js/src/jit-test/tests/ion/muli-constant-1-bug1534810.js b/js/src/jit-test/tests/ion/muli-constant-1-bug1534810.js new file mode 100644 index 0000000000..3936d28697 --- /dev/null +++ b/js/src/jit-test/tests/ion/muli-constant-1-bug1534810.js @@ -0,0 +1,15 @@ +function f() {} +function g(x) { + var a = 0, b = NaN, c = 1, d = 0, e = 0; + a = (x >> 0); + b = f(); + b = +b; + c = Math.round(1); + d = Math.imul(b, c); + e = e + a; + e = e + d; + return e; +} +for (let i = 0; i < 2; ++i) { + assertEq(g(), 0); +} diff --git a/js/src/jit-test/tests/ion/nativeElementAccesses.js b/js/src/jit-test/tests/ion/nativeElementAccesses.js new file mode 100644 index 0000000000..c126750ac4 --- /dev/null +++ b/js/src/jit-test/tests/ion/nativeElementAccesses.js @@ -0,0 +1,44 @@ + +function testOverwritingSparseHole() +{ + var x = []; + for (var i = 0; i < 50; i++) + x[i] = i; + var hit = false; + Object.defineProperty(x, 40, {set: function() { hit = true; }}); + for (var i = 0; i < 50; i++) + x[i] = 10; + assertEq(hit, true); +} +testOverwritingSparseHole(); + +function testReadingSparseHole() +{ + var x = []; + for (var i = 5; i < 50; i++) + x[i] = i; + var hit = false; + Object.defineProperty(x, 40, {get: function() { hit = true; return 5.5; }}); + var res = 0; + for (var i = 0; i < 50; i++) { + res += x[i]; + if (i == 10) + res = 0; + } + assertEq(res, 1135.5); + assertEq(hit, true); +} +testReadingSparseHole(); + +function testInSparseHole() +{ + var x = []; + for (var i = 5; i < 50; i++) + x[i] = i; + Object.defineProperty(x, 40, {get: function() {}}); + var res = 0; + for (var i = 0; i < 50; i++) + res += (i in x) ? 1 : 0; + assertEq(res, 45); +} +testInSparseHole(); diff --git a/js/src/jit-test/tests/ion/new-0.js b/js/src/jit-test/tests/ion/new-0.js new file mode 100644 index 0000000000..851b59facd --- /dev/null +++ b/js/src/jit-test/tests/ion/new-0.js @@ -0,0 +1,16 @@ +// Some testing for JSOP_NEW. +function foo(prop) { + this.name = "Foo"; + this.prop = prop; + return this; +} + +// Construct an object with a unique assignation to a property. +function f(i) { + var x = new foo(i); + return x.prop; +} + +// Assert that a unique object really was created. +for (var i = 0; i < 100; i++) + assertEq(f(i), i); diff --git a/js/src/jit-test/tests/ion/new-1.js b/js/src/jit-test/tests/ion/new-1.js new file mode 100644 index 0000000000..81862b562f --- /dev/null +++ b/js/src/jit-test/tests/ion/new-1.js @@ -0,0 +1,15 @@ +// Some testing for JSOP_NEW. +function foo(prop) { + this.name = "Foo"; + this.prop = prop; +} + +// Construct an object with a unique assignation to a property. +function f(i) { + var x = new foo(i); + return x.prop; +} + +// Assert that a unique object really was created. +for (var i = 0; i < 100; i++) + assertEq(f(i), i); diff --git a/js/src/jit-test/tests/ion/new-10.js b/js/src/jit-test/tests/ion/new-10.js new file mode 100644 index 0000000000..7f8a202c76 --- /dev/null +++ b/js/src/jit-test/tests/ion/new-10.js @@ -0,0 +1,15 @@ +function O(a) { + this.x = 20; + var ret = a ? {x: 10} : 26; + return ret; +} +function test() { + for (var i=0; i<100; i++) { + var o = new O((i & 1) == 1); + if (i & 1) + assertEq(o.x, 10); + else + assertEq(o.x, 20); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/new-2.js b/js/src/jit-test/tests/ion/new-2.js new file mode 100644 index 0000000000..c8e7c2c273 --- /dev/null +++ b/js/src/jit-test/tests/ion/new-2.js @@ -0,0 +1,13 @@ +// Test JSOP_NEW using native constructors. +// Construct an object with a unique assignation to a property. +function f(i) { + var x = new Number(i); + return x; +} + +// Assert that a unique object really was created. +for (var i = 0; i < 100; i++) { + var o = f(i); + assertEq(typeof o, "object"); + assertEq(Number(o), i); +} diff --git a/js/src/jit-test/tests/ion/new-3.js b/js/src/jit-test/tests/ion/new-3.js new file mode 100644 index 0000000000..b7b2fa89fa --- /dev/null +++ b/js/src/jit-test/tests/ion/new-3.js @@ -0,0 +1,18 @@ +// Uncompiled, polymorphic callsite for |new|. + +function Foo(prop) { + this.name = "Foo"; + this.prop = prop; +} + +function f() { + // Enter OSR here. + for (var i = 0; i < 100; i++) + { } + + // No type information below this point. + var x = new Foo("cats"); + return x; +} + +assertEq(f().prop, "cats"); diff --git a/js/src/jit-test/tests/ion/new-4.js b/js/src/jit-test/tests/ion/new-4.js new file mode 100644 index 0000000000..d8df9ef3f7 --- /dev/null +++ b/js/src/jit-test/tests/ion/new-4.js @@ -0,0 +1,21 @@ +// Handle bailing from a constructor. + +var confuzzle = 0; + +function BailFromConstructor() { + this.x = "cats"; + this.y = confuzzle + 5; + return 4; +} + +function f() { + var x; + for (var i = 0; i < 100; i++) { + if (i == 99) + confuzzle = undefined; + x = new BailFromConstructor(); + assertEq(typeof(x), "object"); + } +} + +f(); diff --git a/js/src/jit-test/tests/ion/new-5.js b/js/src/jit-test/tests/ion/new-5.js new file mode 100644 index 0000000000..4c5a8485b5 --- /dev/null +++ b/js/src/jit-test/tests/ion/new-5.js @@ -0,0 +1,15 @@ +// Call an Ion constructor from the interpreter. + +// This gets compiled and called by the interpreter. +// Allocation and primitive check need to happen caller-side. +function Foo() { + this.x = 5; + return 4; +} + +eval("//nothing"); // Prevent compilation of global script. + +for (var i = 0; i < 100; i++) { + var x = new Foo(); + assertEq(typeof(x), "object"); +} diff --git a/js/src/jit-test/tests/ion/new-6.js b/js/src/jit-test/tests/ion/new-6.js new file mode 100644 index 0000000000..6212cd91d8 --- /dev/null +++ b/js/src/jit-test/tests/ion/new-6.js @@ -0,0 +1,18 @@ +// Enter an Ion constructor via on-stack replacement. + +// This gets compiled and called by the interpreter. +// Allocation and primitive check need to happen caller-side. +function Foo() { + var y = 0; + for (var i = 0; i < 100; i++) + { y++ } + this.x = 5; + return y; +} + +eval("//nothing"); // Prevent compilation of global script. + +for (var i = 0; i < 100; i++) { + var x = new Foo(); + assertEq(typeof(x), "object"); +} diff --git a/js/src/jit-test/tests/ion/new-7.js b/js/src/jit-test/tests/ion/new-7.js new file mode 100644 index 0000000000..73f059c24d --- /dev/null +++ b/js/src/jit-test/tests/ion/new-7.js @@ -0,0 +1,32 @@ +// Reduced from v8-raytrace. + +var Class = { + create : function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var Bar = Class.create(); +Bar.prototype = { + // Compiled third. + initialize : function() { } +} + +var Foo = Class.create(); +Foo.prototype = { + // Compiled second. Crashes when setting "bar". Uses LCallConstructor. + initialize : function() { + this.bar = new Bar(); + } +} + +// Compiled first. +function f() { + for (var i = 0; i < 100; i++) { + var foo = new Foo(); + } +} + +f(); diff --git a/js/src/jit-test/tests/ion/new-8.js b/js/src/jit-test/tests/ion/new-8.js new file mode 100644 index 0000000000..bd2dfb9c7d --- /dev/null +++ b/js/src/jit-test/tests/ion/new-8.js @@ -0,0 +1,21 @@ +// Handle bailing from a constructor that's called from the interpreter. + +function yesokhellothankyou() { + return 5; +} + +function BailFromConstructor() { + this.x = "cats"; + this.y = 5; + var z = yesokhellothankyou(); + + // Causes a bailout for purposes of inlining at the LRecompileCheck. + // Yep, this is great. + for (var i = 0; i < 10500; i++) { + x = 4; + } + + return 4; +} + +var x = new BailFromConstructor(); diff --git a/js/src/jit-test/tests/ion/new-9.js b/js/src/jit-test/tests/ion/new-9.js new file mode 100644 index 0000000000..ef346ffc58 --- /dev/null +++ b/js/src/jit-test/tests/ion/new-9.js @@ -0,0 +1,27 @@ +// Test createThisScripted(), without a singleton. +function Foo(a) { + this.str = "foo"; +} + +function Bar(a) { + this.str = "bar"; +} + +function f() { + var x; + for (var i = 0; i < 400; i++) { + if (i % 2 == 0) + x = Foo; + else + x = Bar; + + var y = new x(5); + + if (i % 2 == 0) + assertEq(y.str, "foo"); + else + assertEq(y.str, "bar"); + } +} + +f(); diff --git a/js/src/jit-test/tests/ion/new-object-with-dynamic-slots.js b/js/src/jit-test/tests/ion/new-object-with-dynamic-slots.js new file mode 100644 index 0000000000..a6c7625234 --- /dev/null +++ b/js/src/jit-test/tests/ion/new-object-with-dynamic-slots.js @@ -0,0 +1,35 @@ + +function Foo() { + this.a = 1; + this.b = 1; + this.c = 1; + this.d = 1; + this.e = 1; + this.f = 1; + this.g = 1; + this.h = 1; + this.i = 1; + this.j = 1; + this.k = 1; + this.l = 1; + this.m = 1; + this.n = 1; + this.o = 1; + this.p = 1; + this.q = 1; + this.r = 1; + this.s = 1; +} + +function fn() { + var a = []; + for (var i = 0; i < 50; i++) + a.push(new Foo()); + var total = 0; + for (var i = 0; i < a.length; i++) { + var v = a[i]; + total += v.a + v.b + v.c + v.d + v.e + v.f + v.g + v.h + v.i + v.j + v.k + v.l + v.m + v.n + v.o + v.p + v.q + v.r + v.s; + } + assertEq(total, 950); +} +fn(); diff --git a/js/src/jit-test/tests/ion/notV.js b/js/src/jit-test/tests/ion/notV.js new file mode 100644 index 0000000000..f42a3893d1 --- /dev/null +++ b/js/src/jit-test/tests/ion/notV.js @@ -0,0 +1,32 @@ +function foo(x) { + return !x; +} + +assertEq(foo({}), false); +assertEq(foo({}), false); +assertEq(foo(1.1), false); +assertEq(foo(1.1), false); +assertEq(foo(0.0), true); +assertEq(foo(0.0), true); +assertEq(foo(null), true); +assertEq(foo(null), true); +assertEq(foo(undefined), true); +assertEq(foo(undefined), true); +assertEq(foo(Infinity), false); +assertEq(foo(Infinity), false); +assertEq(foo(NaN), true); +assertEq(foo(NaN), true); +assertEq(foo([]), false); +assertEq(foo([]), false); +assertEq(foo(''), true); +assertEq(foo(''), true); +assertEq(foo('x'), false); +assertEq(foo('x'), false); +assertEq(foo(true), false); +assertEq(foo(true), false); +assertEq(foo(false), true); +assertEq(foo(false), true); +assertEq(foo(-0.0), true); +assertEq(foo(-0.0), true); +assertEq(foo(createIsHTMLDDA()), true); +assertEq(foo(createIsHTMLDDA()), true); diff --git a/js/src/jit-test/tests/ion/nursery-getter-setter.js b/js/src/jit-test/tests/ion/nursery-getter-setter.js new file mode 100644 index 0000000000..c017b1d7bb --- /dev/null +++ b/js/src/jit-test/tests/ion/nursery-getter-setter.js @@ -0,0 +1,17 @@ +var threshold = getJitCompilerOptions()["ion.warmup.trigger"] + 101; +function bar(i) { + if (!i) + with (this) {}; // Don't inline. + if (i === threshold) + minorgc(); +} + +function f() { + var o2 = Object.create({get foo() { return this.x; }, set foo(x) { this.x = x + 1; }}); + for (var i=0; i<2000; i++) { + o2.foo = i; + assertEq(o2.foo, i + 1); + bar(i); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/nursery-getter-setter2.js b/js/src/jit-test/tests/ion/nursery-getter-setter2.js new file mode 100644 index 0000000000..3ad3b47e5b --- /dev/null +++ b/js/src/jit-test/tests/ion/nursery-getter-setter2.js @@ -0,0 +1,11 @@ +function g(o, i) { + o.foo = i; + assertEq(o.foo, i + 1); +} +function f() { + var o2 = Object.create({get foo() { return this.x; }, set foo(x) { this.x = x + 1; }}); + for (var i=0; i<1200; i++) { + g(o2, i); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/object-create-with-primitive-second-arg-in-ion.js b/js/src/jit-test/tests/ion/object-create-with-primitive-second-arg-in-ion.js new file mode 100644 index 0000000000..a4c6d40da9 --- /dev/null +++ b/js/src/jit-test/tests/ion/object-create-with-primitive-second-arg-in-ion.js @@ -0,0 +1,8 @@ +// |jit-test| --ion-eager +load(libdir + "asserts.js"); + +[1, "", true, Symbol(), undefined].forEach(props => { + assertEq(Object.getPrototypeOf(Object.create(null, props)), null); +}); + +assertThrowsInstanceOf(() => Object.create(null, null), TypeError); diff --git a/js/src/jit-test/tests/ion/object-create.js b/js/src/jit-test/tests/ion/object-create.js new file mode 100644 index 0000000000..dca277c3ed --- /dev/null +++ b/js/src/jit-test/tests/ion/object-create.js @@ -0,0 +1,25 @@ +// Ensure Ion inlining of Object.create(x) tests the type of x +// matches the template object. + +var P1 = {}; +var P2 = {}; +minorgc(); + +function f1() { + for (var i=0; i<100; i++) { + var P = (i & 1) ? P1 : P2; + var o = Object.create(P); + assertEq(Object.getPrototypeOf(o), P); + } +} +f1(); + +function f2() { + var arr = [null, Array]; + for (var i=0; i<99; i++) { + var p = arr[(i / 50)|0]; + var o = Object.create(p); + assertEq(Object.getPrototypeOf(o), p); + } +} +f2(); diff --git a/js/src/jit-test/tests/ion/object-keys-00.js b/js/src/jit-test/tests/ion/object-keys-00.js new file mode 100644 index 0000000000..497823e2e2 --- /dev/null +++ b/js/src/jit-test/tests/ion/object-keys-00.js @@ -0,0 +1,31 @@ +// This test case is used to test the optimized code path where the computation +// of `Object.keys(...).length` no longer compute `Object.keys(...)` as an +// intermediate result. +// +// This test verifies that the result remain consistent after the optimization. + +function cmp_keys_length(a, b) { + return Object.keys(a).length == Object.keys(b).length; +} + +let objs = [ + {x:0, a: 1, b: 2}, + {x:1, b: 1, c: 2}, + {x:2, c: 1, d: 2}, + {x:3, a: 1, b: 2, c: 3}, + {x:4, b: 1, c: 2, d: 3}, + {x:5, a: 1, b: 2, c: 3, d: 4} +]; + +function max_of(o) { + return o?.d ?? o?.c ?? o?.b ?? 0; +} + +with({}) {} +for (let i = 0; i < 1000; i++) { + for (let o1 of objs) { + for (let o2 of objs) { + assertEq(cmp_keys_length(o1, o2), max_of(o1) == max_of(o2)); + } + } +} diff --git a/js/src/jit-test/tests/ion/object-keys-01.js b/js/src/jit-test/tests/ion/object-keys-01.js new file mode 100644 index 0000000000..feb053f327 --- /dev/null +++ b/js/src/jit-test/tests/ion/object-keys-01.js @@ -0,0 +1,36 @@ + +// This test case is used to test one common configuration seen in the wild and +// that we expect to be successful at optimizing properly. + +// Similar functions are part of popular framework such as React and Angular. +function shallowEqual(o1, o2) { + var k1 = Object.keys(o1); + var k2 = Object.keys(o2); + if (k1.length != k2.length) { + return false; + } + for (var k = 0; k < k1.length; k++) { + if (!Object.hasOwnProperty.call(o2, k1[k]) || !Object.is(o1[k1[k]], o2[k1[k]])) { + return false; + } + } + return true; +} + +let objs = [ + {x:0, a: 1, b: 2}, + {x:1, b: 1, c: 2}, + {x:2, c: 1, d: 2}, + {x:3, a: 1, b: 2, c: 3}, + {x:4, b: 1, c: 2, d: 3}, + {x:5, a: 1, b: 2, c: 3, d: 4} +]; + +with({}) {} +for (let i = 0; i < 1000; i++) { + for (let o1 of objs) { + for (let o2 of objs) { + assertEq(shallowEqual(o1, o2), Object.is(o1, o2)); + } + } +} diff --git a/js/src/jit-test/tests/ion/object-keys-02.js b/js/src/jit-test/tests/ion/object-keys-02.js new file mode 100644 index 0000000000..077433431b --- /dev/null +++ b/js/src/jit-test/tests/ion/object-keys-02.js @@ -0,0 +1,54 @@ + +// This test case check some code frequently used in the wild, with some object +// (proxy) for which the optimization we have deployed do not work, as the +// assumption the Object.keys(...) can be elided without having noticeable +// side-effects. + +// Similar functions are part of popular framework such as React and Angular. +function shallowEqual(o1, o2) { + var k1 = Object.keys(o1); + var k2 = Object.keys(o2); + if (k1.length != k2.length) { + return false; + } + for (var k = 0; k < k1.length; k++) { + if (!Object.hasOwnProperty.call(o2, k1[k]) || !Object.is(o1[k1[k]], o2[k1[k]])) { + return false; + } + } + return true; +} + +let sideEffectCounter = 0; +const payload = {x: 5, a: 1, b: 2, c: 3, d: 4}; +const handler = { + ownKeys(target) { + // side-effect that should not be removed. + sideEffectCounter++; + // answer returned. + return Reflect.ownKeys(target); + }, +}; +const proxy = new Proxy(payload, handler); + +let objs = [ + {x:0, a: 1, b: 2}, + {x:1, b: 1, c: 2}, + {x:2, c: 1, d: 2}, + {x:3, a: 1, b: 2, c: 3}, + {x:4, b: 1, c: 2, d: 3}, + proxy +]; + +with({}) {} +let iterMax = 1000; +for (let i = 0; i < iterMax; i++) { + for (let o1 of objs) { + for (let o2 of objs) { + assertEq(shallowEqual(o1, o2), Object.is(o1, o2)); + } + } +} + +let expectedSideEffects = 2 * objs.length * iterMax; +assertEq(sideEffectCounter, expectedSideEffects); diff --git a/js/src/jit-test/tests/ion/object-keys-03.js b/js/src/jit-test/tests/ion/object-keys-03.js new file mode 100644 index 0000000000..9977fcbaa1 --- /dev/null +++ b/js/src/jit-test/tests/ion/object-keys-03.js @@ -0,0 +1,60 @@ + +// This test case checks that some code can be optimized for non-proxy object, +// and than we can correctly fallback if a proxy object ever flow into this +// code. + +// Similar functions are part of popular framework such as React and Angular. +function shallowEqual(o1, o2) { + var k1 = Object.keys(o1); + var k2 = Object.keys(o2); + if (k1.length != k2.length) { + return false; + } + for (var k = 0; k < k1.length; k++) { + if (!Object.hasOwnProperty.call(o2, k1[k]) || !Object.is(o1[k1[k]], o2[k1[k]])) { + return false; + } + } + return true; +} + +let sideEffectCounter = 0; +const payload = {x: 5, a: 1, b: 2, c: 3, d: 4}; +const handler = { + ownKeys(target) { + // side-effect that should not be removed. + sideEffectCounter++; + // answer returned. + return Reflect.ownKeys(target); + }, +}; +const proxy = new Proxy(payload, handler); + +let objs = [ + {x:0, a: 1, b: 2}, + {x:1, b: 1, c: 2}, + {x:2, c: 1, d: 2}, + {x:3, a: 1, b: 2, c: 3}, + {x:4, b: 1, c: 2, d: 3}, + {x:5, a: 1, b: 2, c: 3, d: 4} +]; + +// Ion compile shallowEqual ... +with({}) {} +let iterMax = 1000; +for (let i = 0; i < iterMax; i++) { + for (let o1 of objs) { + for (let o2 of objs) { + assertEq(shallowEqual(o1, o2), Object.is(o1, o2)); + } + } +} + +assertEq(sideEffectCounter, 0); + +// ... before calling it with a proxy. +// This should bailout with a guard failure. +shallowEqual(objs[0], proxy); + +// Assert that the proxy's ownKeys function has been called. +assertEq(sideEffectCounter, 1); diff --git a/js/src/jit-test/tests/ion/object-keys-04.js b/js/src/jit-test/tests/ion/object-keys-04.js new file mode 100644 index 0000000000..0b147bada4 --- /dev/null +++ b/js/src/jit-test/tests/ion/object-keys-04.js @@ -0,0 +1,208 @@ +load(libdir + 'array-compare.js'); // arraysEqual + +// Ion eager fails the test below because we have not yet created any +// Cache IR IC in baseline before running the content of the top-level +// function. +if (getJitCompilerOptions()["ion.warmup.trigger"] <= 100) + setJitCompilerOption("ion.warmup.trigger", 100); + +// This test case checks that we are capable of recovering the Object.keys array +// even if we optimized it away. It also checks that we indeed optimize it away +// as we would expect. + +// Prevent GC from cancelling/discarding Ion compilations. +gczeal(0); + +function objKeysLength(obj, expected, i) { + var keys = Object.keys(obj); + let len = keys.length; + assertRecoveredOnBailout(keys, true); + if (i >= 99) { + // bailout would hint Ion to remove everything after, making the keys + // array appear like being only used by resume points. + bailout(); + assertEq(arraysEqual(keys, expected), true); + } + return len; +} + +// This is the same test as above, except that the branch which is being removed +// cause the introduction of a different resume point to be inserted in the +// middle. At the moment we expect this circustances to to disable the +// optimization. +// +// Removing this limitation would be useful but would require more verification +// when applying the optimization. +function objKeysLengthDiffBlock(obj, expected, i) { + var keys = Object.keys(obj); + if (i >= 99) { + // bailout would hint Ion to remove everything after, making the keys + // array appear like being only used by resume points. + bailout(); + assertEq(arraysEqual(keys, expected), true); + } + let len = keys.length; + assertRecoveredOnBailout(keys, false); + return len; +} + +// Mutating the object in-between the call from Object.keys and the evaluation +// of the length property should prevent the optimization from being reflected +// as the mutation of the object would cause the a different result of +// Object.keys evaluation. +function objKeysLengthMutate0(obj, expected, i) { + var keys = Object.keys(obj); + obj.foo = 42; + let len = keys.length; + assertRecoveredOnBailout(keys, false); + if (i >= 99) { + bailout(); + assertEq(arraysEqual(keys, expected), true); + } + return len; +} + +function objKeysLengthMutate1(obj, expected, i) { + var keys = Object.keys(obj); + let len = keys.length; + assertRecoveredOnBailout(keys, false); + obj.foo = 42; + if (i >= 99) { + bailout(); + assertEq(arraysEqual(keys, expected), true); + } + return len; +} + +function objKeysLengthMutate2(obj, expected, i) { + var keys = Object.keys(obj); + let len = keys.length; + assertRecoveredOnBailout(keys, false); + if (i >= 99) { + bailout(); + assertEq(arraysEqual(keys, expected), true); + } + obj.foo = 42; + return len; +} + +function objKeysLengthMutate3(obj, expected, i) { + var keys = Object.keys(obj); + let len = keys.length; + assertRecoveredOnBailout(keys, true); + if (i >= 99) { + // When branches are pruned, Warp/Ion is not aware and would recover the + // keys on bailout, and this is fine. + obj.foo = 42; + bailout(); + assertEq(arraysEqual(keys, expected), true); + } + return len; +} + +function objKeysLengthMutate4(obj, expected, i) { + // Mutating the objects ahead of keying the keys does not prevent optimizing + // the keys length query, given that all side-effects are already acted by + // the time we query the keys. + obj.foo = 42; + var keys = Object.keys(obj); + let len = keys.length; + assertRecoveredOnBailout(keys, true); + if (i >= 99) { + bailout(); + assertEq(arraysEqual(keys, expected), true); + } + return len; +} + + +function doNotInlineSideEffect() { + eval("1"); +} + +function objKeysLengthSideEffect0(obj, expected, i) { + var keys = Object.keys(obj); + let len = keys.length; + assertRecoveredOnBailout(keys, false); + doNotInlineSideEffect(); + if (i >= 99) { + bailout(); + assertEq(arraysEqual(keys, expected), true); + } + return len; +} + +function objKeysLengthSideEffect1(obj, expected, i) { + var keys = Object.keys(obj); + let len = keys.length; + assertRecoveredOnBailout(keys, false); + if (i >= 99) { + bailout(); + assertEq(arraysEqual(keys, expected), true); + } + doNotInlineSideEffect(); + return len; +} + +function objKeysLengthSideEffect2(obj, expected, i) { + var keys = Object.keys(obj); + let len = keys.length; + assertRecoveredOnBailout(keys, true); + if (i >= 99) { + // When branches are pruned, Warp/Ion is not aware and would recover the + // keys on bailout, and this is fine. + doNotInlineSideEffect(); + bailout(); + assertEq(arraysEqual(keys, expected), true); + } + return len; +} + +function objKeysLengthSideEffect3(obj, expected, i) { + doNotInlineSideEffect(); + var keys = Object.keys(obj); + let len = keys.length; + assertRecoveredOnBailout(keys, true); + if (i >= 99) { + bailout(); + assertEq(arraysEqual(keys, expected), true); + } + return len; +} + +// Check what we are doing as optimizations when the object is fully known and +// when it does not escape. +// +// Except that today, Object.keys(..) is still assumed to make side-effect +// despite being removed later. +function nonEscapedObjKeysLength(i) { + let obj = {a: i}; + var keys = Object.keys(obj); + let len = keys.length; + assertRecoveredOnBailout(keys, true); + assertRecoveredOnBailout(obj, false); + if (i >= 99) { + bailout(); + assertEq(arraysEqual(keys, ["a"]), true); + } + return len; +} + +// Prevent compilation of the top-level. +eval(`${arraysEqual}`); +let obj = {a: 0, b: 1, c: 2, d: 3}; + +for (let i = 0; i < 100; i++) { + objKeysLength({...obj}, ["a", "b", "c", "d"], i); + objKeysLengthDiffBlock({...obj}, ["a", "b", "c", "d"], i); + objKeysLengthMutate0({...obj}, ["a", "b", "c", "d"], i); + objKeysLengthMutate1({...obj}, ["a", "b", "c", "d"], i); + objKeysLengthMutate2({...obj}, ["a", "b", "c", "d"], i); + objKeysLengthMutate3({...obj}, ["a", "b", "c", "d"], i); + objKeysLengthMutate4({...obj}, ["a", "b", "c", "d", "foo"], i); + objKeysLengthSideEffect0({...obj}, ["a", "b", "c", "d"], i); + objKeysLengthSideEffect1({...obj}, ["a", "b", "c", "d"], i); + objKeysLengthSideEffect2({...obj}, ["a", "b", "c", "d"], i); + objKeysLengthSideEffect3({...obj}, ["a", "b", "c", "d"], i); + nonEscapedObjKeysLength(i); +} diff --git a/js/src/jit-test/tests/ion/object-keys-05.js b/js/src/jit-test/tests/ion/object-keys-05.js new file mode 100644 index 0000000000..2bc0f6095e --- /dev/null +++ b/js/src/jit-test/tests/ion/object-keys-05.js @@ -0,0 +1,49 @@ + +// This test case is similar to object-keys-01, except that we replace +// `Object.keys` by a copy of it. +let myThis = { + keys: Object.keys +}; + +// Similar functions are part of popular framework such as React and Angular. +function shallowEqual(o1, o2) { + var k1 = myThis.keys(o1); + var k2 = myThis.keys(o2); + if (k1.length != k2.length) { + return false; + } + for (var k = 0; k < k1.length; k++) { + if (!Object.hasOwnProperty.call(o2, k1[k]) || !Object.is(o1[k1[k]], o2[k1[k]])) { + return false; + } + } + return true; +} + +let objs = [ + {x:0, a: 1, b: 2}, + {x:1, b: 1, c: 2}, + {x:2, c: 1, d: 2}, + {x:3, a: 1, b: 2, c: 3}, + {x:4, b: 1, c: 2, d: 3}, + {x:5, a: 1, b: 2, c: 3, d: 4} +]; + +with({}) {} +for (let i = 0; i < 1000; i++) { + for (let o1 of objs) { + for (let o2 of objs) { + assertEq(shallowEqual(o1, o2), Object.is(o1, o2)); + } + } +} + +let count = 0; +myThis.keys = function keys(obj) { + count++; + return Object.keys(obj); +} + +let o1 = objs[4], o2 = objs[5]; +assertEq(shallowEqual(o1, o2), Object.is(o1, o2)); +assertEq(count, 2); diff --git a/js/src/jit-test/tests/ion/object-prototype-tostring.js b/js/src/jit-test/tests/ion/object-prototype-tostring.js new file mode 100644 index 0000000000..ad06dbde89 --- /dev/null +++ b/js/src/jit-test/tests/ion/object-prototype-tostring.js @@ -0,0 +1,45 @@ +var toString = Object.prototype.toString; +var iter = 500; + +function testConstant() { + for (var i = 0; i < iter; i++) { + assertEq(({}).toString(), "[object Object]"); + assertEq(toString.call([]), "[object Array]"); + assertEq(toString.call(Math.abs), "[object Function]"); + } +} +testConstant(); + +function testOwnToStringTag() { + var stringify = o => toString.call(o); + var o = {}; + for (var i = 0; i < iter; i++) + assertEq(stringify(o), "[object Object]"); + o[Symbol.toStringTag] = "foo"; + for (var i = 0; i < iter; i++) + assertEq(stringify(o), "[object foo]"); +} +testOwnToStringTag(); + +function testDynamic() { + var arr = [{}, [], new Date, /a/]; + var expected = ["[object Object]", "[object Array]", "[object Date]", "[object RegExp]"]; + for (var i = 0; i < iter; i++) { + for (var j = 0; j < arr.length; j++) + assertEq(toString.call(arr[j]), expected[j]); + } +} +testDynamic(); + +function testToStringTagProto() { + var c = 0; + Object.defineProperty(Date.prototype, Symbol.toStringTag, {get() { c++; return "evil"; }}); + var arr = [{}, [], new Date, /a/]; + var expected = ["[object Object]", "[object Array]", "[object evil]", "[object RegExp]"]; + for (var i = 0; i < iter; i++) { + for (var j = 0; j < arr.length; j++) + assertEq(toString.call(arr[j]), expected[j]); + } + assertEq(c, iter); +} +testToStringTagProto(); diff --git a/js/src/jit-test/tests/ion/osr-with-optimized-out.js b/js/src/jit-test/tests/ion/osr-with-optimized-out.js new file mode 100644 index 0000000000..da9211a671 --- /dev/null +++ b/js/src/jit-test/tests/ion/osr-with-optimized-out.js @@ -0,0 +1,22 @@ +// |jit-test| --ion-offthread-compile=off; --ion-warmup-threshold=30 + +// We disable any off-main thread compilation, and set a definite trigger for +// Ion compilation, such that we can garantee that we would OSR into the inner +// loop before we reach the end of the loop. +gcPreserveCode(); + +function f (n) { + while (!inIon()) { + var inner = 0; + let x = {}; + for (var i = 0; i < n; i++) { + inner += inIon() == true ? 1 : 0; + if (inner <= 1) + bailout(); + } + assertEq(inner != 1, true); + } +} + +// Iterate enough to ensure that we OSR in this inner loop. +f(300); diff --git a/js/src/jit-test/tests/ion/pgo-bug1252120.js b/js/src/jit-test/tests/ion/pgo-bug1252120.js new file mode 100644 index 0000000000..f25e9c9f79 --- /dev/null +++ b/js/src/jit-test/tests/ion/pgo-bug1252120.js @@ -0,0 +1,14 @@ +// |jit-test| --ion-pruning=on; + +target = handler = {} +for (p of[new Proxy(target, handler)]) + evaluate("foo()"); +function foo() { + symbols = [Symbol] + values = [NaN] + for (comparator of[""]) + for (b of values) assertEq; + for (comparator of[""]) + for (a of symbols) + for (b of values) assertEq; +} diff --git a/js/src/jit-test/tests/ion/pgo-bug1259476.js b/js/src/jit-test/tests/ion/pgo-bug1259476.js new file mode 100644 index 0000000000..63297264d5 --- /dev/null +++ b/js/src/jit-test/tests/ion/pgo-bug1259476.js @@ -0,0 +1,16 @@ +// |jit-test| --ion-pruning=on; + +try { + x = evalcx(''); + x.__proto__ = 0; +} catch (e) {} +(function() { + for (var i = 0; i < 1; ++i) { + if (i % 5 == 0) { + for (let z of[0, 0, new Boolean(false), new Boolean(false), + new Boolean(false), new Boolean(false)]) { + this.x; + } + } + } +})() diff --git a/js/src/jit-test/tests/ion/popn.js b/js/src/jit-test/tests/ion/popn.js new file mode 100644 index 0000000000..06e2f5fb85 --- /dev/null +++ b/js/src/jit-test/tests/ion/popn.js @@ -0,0 +1,11 @@ +function f() { + var t = 0; + for (var j = 0; j < 10; j++) { + for (var i = 0; i < 9; ++i) { + var [r, g, b] = [1, i, -10]; + t += r + g + b; + } + } + return t; +} +assertEq(f(), -450); diff --git a/js/src/jit-test/tests/ion/pow-base-power-of-two-bailouts.js b/js/src/jit-test/tests/ion/pow-base-power-of-two-bailouts.js new file mode 100644 index 0000000000..34e7ed406f --- /dev/null +++ b/js/src/jit-test/tests/ion/pow-base-power-of-two-bailouts.js @@ -0,0 +1,85 @@ +// Lowering provides a specialisation when the base operand is a constant which +// is a power of two. +// +// Test bailout conditions for this optimisation. + +function test(x) { + function pow(x, y) { return `Math.pow(${x}, ${y})` }; + function exp(x, y) { return `((${x}) ** ${y})` }; + + function make(fn) { + return Function("y, z", ` + // Load from array to prevent constant-folding. + // (Ion is currently not smart enough to realise that both array + // values are the same.) + var ys = [y, y]; + var zs = [z, z]; + for (var i = 0; i < 1000; ++i) { + assertEq(${fn(x, "ys[i & 1]")}, zs[i & 1]); + } + `); + } + + function double(v) { + // NB: numberToDouble() always returns a double value. + return numberToDouble(v); + } + + // Find the first power which will exceed the Int32 range by computing ⌈log_x(2 ^ 31)⌉. + var limit = Math.ceil(Math.log2(2 ** 31) / Math.log2(x)); + assertEq(Math.pow(x, limit - 1) < 2 ** 31, true); + assertEq(Math.pow(x, limit) >= 2 ** 31, true); + + function* args(first, last) { + // Run the test function a few times without a bailout. + for (var i = 0; i < 3; ++i) { + yield first; + } + + // |last| should trigger a bailout. + yield last; + } + + // Test precision loss when the result exceeds 2**31. + for (var fn of [make(pow), make(exp)]) { + for (var y of args(limit - 1, limit)) { + // Ensure the callee always sees a double to avoid an early Bailout_ArgumentCheck. + var z = double(Math.pow(x, y)); + fn(y, z); + } + } + + // Test precision loss when the result is a fractional number. + for (var fn of [make(pow), make(exp)]) { + for (var y of args(0, -1)) { + // Ensure the callee always sees a double to avoid an early Bailout_ArgumentCheck. + var z = double(Math.pow(x, y)); + fn(y, z); + } + } + + // Find the first negative power which can be represented as a double + var negLimit = -Math.floor(1074 / Math.log2(x)); + + // Test precision loss when the result is a non-zero, fractional number. + for (var fn of [make(pow), make(exp)]) { + for (var y of args(limit - 1, limit)) { + // Ensure the callee always sees a double to avoid an early Bailout_ArgumentCheck. + var z = double(Math.pow(x, y)); + fn(y, z); + } + } +} + +function* range(a, b, fn) { + for (var i = a; i <= b; ++i) { + yield fn(i); + } +} + +// Only 2^i with |i| ∈ {1..8} currently triggers the optimisation, but also test +// the next power-of-two values. + +for (var x of range(1, 10, i => 2 ** i)) { + test(x); +} diff --git a/js/src/jit-test/tests/ion/pow-base-power-of-two.js b/js/src/jit-test/tests/ion/pow-base-power-of-two.js new file mode 100644 index 0000000000..7e3baf82ef --- /dev/null +++ b/js/src/jit-test/tests/ion/pow-base-power-of-two.js @@ -0,0 +1,75 @@ +// Lowering provides a specialisation when the base operand is a constant which +// is a power of two. + +load(libdir + "math.js"); + +function test(x, y, z) { + function pow(x, y) { return `Math.pow(${x}, ${y})` }; + function exp(x, y) { return `((${x}) ** ${y})` }; + + function make(fn, x, y, z) { + return Function(` + // Load from array to prevent constant-folding. + // (Ion is currently not smart enough to realise that both array + // values are the same.) + var ys = [${y}, ${y}]; + var zs = [${z}, ${z}]; + for (var i = 0; i < 1000; ++i) { + assertNear(${fn(x, "ys[i & 1]")}, zs[i & 1]); + } + `); + } + + function double(v) { + // NB: numberToDouble() always returns a double value. + return `numberToDouble(${v})`; + } + + function addTests(fn) { + tests.push(make(fn, x, y, z)); + tests.push(make(fn, x, double(y), z)); + tests.push(make(fn, double(x), y, z)); + tests.push(make(fn, double(x), double(y), z)); + } + + var tests = []; + addTests(pow); + addTests(exp); + + for (var i = 0; i < tests.length; ++i) { + for (var j = 0; j < 2; ++j) { + tests[i](); + } + } +} + +function* range(a, b, fn) { + for (var i = a; i <= b; ++i) { + yield fn(i); + } +} + +// Only 2^i with |i| ∈ {1..8} currently triggers the optimisation, but also test +// the next power-of-two values, 1 and 0, and negative base-of-two values. +var values = [ + ...range(1, 10, i => 2 ** i), + 1, + 0, + ...range(1, 4, i => -(2 ** i)), +]; + +for (var x of values) { + test(x, 0, 1); + test(x, 1, x); + test(x, 2, x * x); + + // 0**(negative) is Infinity, 1**(negative) is 1. + if (Math.abs(x) > 1) { + test(x, -1076, 0); + } + + // (negative)**(odd-negative) is -0. + if (x > 1) { + test(x, -1075, 0); + } +} diff --git a/js/src/jit-test/tests/ion/pow-constant-power.js b/js/src/jit-test/tests/ion/pow-constant-power.js new file mode 100644 index 0000000000..9382348052 --- /dev/null +++ b/js/src/jit-test/tests/ion/pow-constant-power.js @@ -0,0 +1,68 @@ +// Ion provides specialisations when Math.pow() resp. the **-operator is used +// with a constant power of one of [-0.5, 0.5, 1, 2, 3, 4]. + +function test(x, y, z) { + function pow(x, y) { return `Math.pow(${x}, ${y})` }; + function exp(x, y) { return `((${x}) ** ${y})` }; + + function make(fn, x, y, z) { + return Function(` + // Load from array to prevent constant-folding. + // (Ion is currently not smart enough to realise that both array + // values are the same.) + var xs = [${x}, ${x}]; + var zs = [${z}, ${z}]; + for (var i = 0; i < 1000; ++i) { + assertEq(${fn("xs[i & 1]", y)}, zs[i & 1]); + } + `); + } + + function double(v) { + // NB: numberToDouble() always returns a double value. + return `numberToDouble(${v})`; + } + + function addTests(fn) { + tests.push(make(fn, x, y, z)); + tests.push(make(fn, x, double(y), z)); + tests.push(make(fn, double(x), y, z)); + tests.push(make(fn, double(x), double(y), z)); + } + + var tests = []; + addTests(pow); + addTests(exp); + + for (var i = 0; i < tests.length; ++i) { + for (var j = 0; j < 2; ++j) { + tests[i](); + } + } +} + +// Make sure the tests below test int32 and double return values. + +// Math.pow(x, -0.5) +test( 1, -0.5, 1); +test(16, -0.5, 0.25); + +// Math.pow(x, 0.5) +test(16, 0.5, 4); +test( 2, 0.5, Math.SQRT2); + +// Math.pow(x, 1) +test(5, 1, 5); +test(0.5, 1, 0.5); + +// Math.pow(x, 2) +test(5, 2, 25); +test(0.5, 2, 0.25); + +// Math.pow(x, 3) +test(5, 3, 125); +test(0.5, 3, 0.125); + +// Math.pow(x, 3) +test(5, 4, 625); +test(0.5, 4, 0.0625); diff --git a/js/src/jit-test/tests/ion/range-analysis-bug1122402.js b/js/src/jit-test/tests/ion/range-analysis-bug1122402.js new file mode 100644 index 0000000000..62e52e9e71 --- /dev/null +++ b/js/src/jit-test/tests/ion/range-analysis-bug1122402.js @@ -0,0 +1,11 @@ +// |jit-test| error:TypeError + +(function() { + let r + g = function(x) { + ((-0x80000000 + (x >>> 0)) != 0) ? 0 : x() + } +})() + +g(NaN) +g(0x80000000); diff --git a/js/src/jit-test/tests/ion/range-analysis-bug1124448.js b/js/src/jit-test/tests/ion/range-analysis-bug1124448.js new file mode 100644 index 0000000000..807f75432e --- /dev/null +++ b/js/src/jit-test/tests/ion/range-analysis-bug1124448.js @@ -0,0 +1,8 @@ + +function f(y) { + var x1 = Math.max(-2147483649 >> 0, y >>> 0); + var x2 = x1 | 0; + return (x2 >= 0) ? 1 : 0; +} +assertEq(f(0), 1); +assertEq(f(-1), 0); diff --git a/js/src/jit-test/tests/ion/range-analysis.js b/js/src/jit-test/tests/ion/range-analysis.js new file mode 100644 index 0000000000..86f4419135 --- /dev/null +++ b/js/src/jit-test/tests/ion/range-analysis.js @@ -0,0 +1,35 @@ +// |jit-test| + +// Only fails with Ion. +function add_xors_1() { + var res = 0; + var step = 4; + for (var i = 0x7fffffff | 0; i >= (1 << step); i -= (i >> step)) { + var x = i ^ (i << 1); + res += (((x + x) + res + res) | 0); + } + return res; +} + +var r1 = add_xors_1(); +for (var i = 0; i < 100; i++) { + var r2 = add_xors_1(); + assertEq(r2, r1); +} + +// Only fails with JM +function add_xors_2() { + var res = 0; + var step = 4; + for (var i = 0x7fffffff | 0; i >= (1 << step); i -= (i >> step)) { + var x = i ^ (i << 1); + res += ((x + x) + res + res) | 0; + } + return res; +} + +var r1 = add_xors_2(); +for (var i = 0; i < 100; i++) { + var r2 = add_xors_2(); + assertEq(r1, r2); +} diff --git a/js/src/jit-test/tests/ion/recover-arguments.js b/js/src/jit-test/tests/ion/recover-arguments.js new file mode 100644 index 0000000000..fd6e44f9db --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-arguments.js @@ -0,0 +1,26 @@ +setJitCompilerOption("baseline.warmup.trigger", 9); +setJitCompilerOption("ion.warmup.trigger", 20); + +// Prevent the GC from cancelling compilations, when we expect them to succeed. +gczeal(0); + +function rcreate_arguments_object_nouse() { + assertRecoveredOnBailout(arguments, true); +} + +function rcreate_arguments_object_oneuse() { + assertRecoveredOnBailout(arguments, true); + return arguments[0]; +} + +function rcreate_arguments_object_oneuse_oob() { + assertRecoveredOnBailout(arguments, true); + return arguments[100]; +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + rcreate_arguments_object_nouse(); + rcreate_arguments_object_oneuse(0); + rcreate_arguments_object_oneuse_oob(0); +} diff --git a/js/src/jit-test/tests/ion/recover-arrays.js b/js/src/jit-test/tests/ion/recover-arrays.js new file mode 100644 index 0000000000..db08a7b8ec --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-arrays.js @@ -0,0 +1,332 @@ +// Ion eager fails the test below because we have not yet created any +// template object in baseline before running the content of the top-level +// function. +if (getJitCompilerOptions()["ion.warmup.trigger"] <= 100) + setJitCompilerOption("ion.warmup.trigger", 100); + +// This test checks that we are able to remove the getelem & setelem with scalar +// replacement, so we should not force inline caches, as this would skip the +// generation of getelem & setelem instructions. +if (getJitCompilerOptions()["ion.forceinlineCaches"]) + setJitCompilerOption("ion.forceinlineCaches", 0); + +// Prevent the GC from cancelling Ion compilations, when we expect them to succeed +gczeal(0); + +// This function is used to force a bailout when it is inlined, and to recover +// the frame which is inlining this function. +var resumeHere = function (i) { if (i >= 99) bailout(); }; + +// This function is used to cause an invalidation after having removed a branch +// after DCE. This is made to check if we correctly recover an array +// allocation. +var uceFault = function (i) { + if (i > 98) + uceFault = function (i) { return true; }; + return false; +}; + +// This function is used to ensure that we do escape the array, and thus prevent +// any escape analysis. +var global_arr; +function escape(arr) { global_arr = arr; } + +// Check Array length defined by the literal. +function array0Length(i) { + var a = []; + assertRecoveredOnBailout(a, true); + return a.length; +} + +function array0LengthBail(i) { + var a = []; + resumeHere(i); + assertRecoveredOnBailout(a, true); + return a.length; +} + +function array1Length(i) { + var a = [ i ]; + assertRecoveredOnBailout(a, true); + return a.length; +} + +function array1LengthBail(i) { + var a = [ i ]; + resumeHere(i); + assertRecoveredOnBailout(a, true); + return a.length; +} + +function array2Length(i) { + var a = [ i, i ]; + assertRecoveredOnBailout(a, true); + return a.length; +} + +function array2LengthBail(i) { + var a = [ i, i ]; + resumeHere(i); + assertRecoveredOnBailout(a, true); + return a.length; +} + +// Check that we can correctly gc in the middle of an incomplete object +// intialization. +function arrayWithGCInit0(i) { + var a = [ (i == 99 ? (gc(), i) : i), i ]; + assertRecoveredOnBailout(a, true); + return a.length; +} + +function arrayWithGCInit1(i) { + var a = [ i, (i == 99 ? (gc(), i) : i) ]; + assertRecoveredOnBailout(a, true); + return a.length; +} + +function arrayWithGCInit2(i) { + var a = [ i, i ]; + if (i == 99) gc(); + assertRecoveredOnBailout(a, true); + return a.length; +} + +// Check Array content +function array1Content(i) { + var a = [ i ]; + assertEq(a[0], i); + assertRecoveredOnBailout(a, true); + return a.length; +} +function array1ContentBail0(i) { + var a = [ i ]; + resumeHere(i); + assertEq(a[0], i); + assertRecoveredOnBailout(a, true); + return a.length; +} +function array1ContentBail1(i) { + var a = [ i ]; + assertEq(a[0], i); + resumeHere(i); + assertRecoveredOnBailout(a, true); + return a.length; +} + +function array2Content(i) { + var a = [ i, i ]; + assertEq(a[0], i); + assertEq(a[1], i); + assertRecoveredOnBailout(a, true); + return a.length; +} + +function array2ContentBail0(i) { + var a = [ i, i ]; + resumeHere(i); + assertEq(a[0], i); + assertEq(a[1], i); + assertRecoveredOnBailout(a, true); + return a.length; +} + +function array2ContentBail1(i) { + var a = [ i, i ]; + assertEq(a[0], i); + resumeHere(i); + assertEq(a[1], i); + assertRecoveredOnBailout(a, true); + return a.length; +} + +function array2ContentBail2(i) { + var a = [ i, i ]; + assertEq(a[0], i); + assertEq(a[1], i); + resumeHere(i); + assertRecoveredOnBailout(a, true); + return a.length; +} + +// Check bailouts during the initialization. +function arrayInitBail0(i) { + var a = [ resumeHere(i), i ]; + assertRecoveredOnBailout(a, true); + return a.length; +} + +function arrayInitBail1(i) { + var a = [ i, resumeHere(i) ]; + assertRecoveredOnBailout(a, true); + return a.length; +} + +// Check recovery of large arrays. +function arrayLarge0(i) { + var a = new Array(10000000); + resumeHere(); bailout(); // always resume here. + // IsArrayEscaped prevent us from escaping Arrays with too many elements. + assertRecoveredOnBailout(a, false); + return a.length; +} + +function arrayLarge1(i) { + var a = new Array(10000000); + a[0] = i; + assertEq(a[0], i); + // IsArrayEscaped prevent us from escaping Arrays with too many elements. + assertRecoveredOnBailout(a, false); + return a.length; +} + +function arrayLarge2(i) { + var a = new Array(10000000); + a[0] = i; + a[100] = i; + assertEq(a[0], i); + assertEq(a[100], i); + // IsArrayEscaped prevent us from escaping Arrays with too many elements. + assertRecoveredOnBailout(a, false); + return a.length; +} + +// Check escape analysis in case of branches. +function arrayCond(i) { + var a = [i,0,i]; + if (i % 2 == 1) + a[1] = i; + assertEq(a[0], i); + assertEq(a[1], (i % 2) * i); + assertEq(a[2], i); + assertRecoveredOnBailout(a, true); + return a.length; +} + +// Check escape analysis in case of holes. +function arrayHole0(i) { + var a = [i,,i]; + if (i != 99) + a[1] = i; + assertEq(a[0], i); + assertEq(a[1], i != 99 ? i : undefined); + assertEq(a[2], i); + // need to check for holes. + assertRecoveredOnBailout(a, false); + return a.length; +} + +// Same test as the previous one, but the Array.prototype is changed to reutn +// "100" when we request for the element "1". +function arrayHole1(i) { + var a = [i,,i]; + if (i != 99) + a[1] = i; + assertEq(a[0], i); + assertEq(a[1], i != 99 ? i : 100); + assertEq(a[2], i); + // need to check for holes. + assertRecoveredOnBailout(a, false); + return a.length; +} + +// Check that we correctly allocate the array after taking the recover path. +var uceFault_arrayAlloc0 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_arrayAlloc0')); +function arrayAlloc0(i) { + var a = new Array(10); + if (uceFault_arrayAlloc0(i) || uceFault_arrayAlloc0(i)) { + return a.length; + } + assertRecoveredOnBailout(a, true); + return 0; +} + +var uceFault_arrayAlloc1 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_arrayAlloc1')); +function arrayAlloc1(i) { + var a = new Array(10); + if (uceFault_arrayAlloc1(i) || uceFault_arrayAlloc1(i)) { + a[0] = i; + a[1] = i; + assertEq(a[0], i); + assertEq(a[1], i); + assertEq(a[2], undefined); + return a.length; + } + assertRecoveredOnBailout(a, true); + return 0; +} + +var uceFault_arrayAlloc2 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_arrayAlloc2')); +function arrayAlloc2(i) { + var a = new Array(10); + if (uceFault_arrayAlloc2(i) || uceFault_arrayAlloc2(i)) { + a[4096] = i; + assertEq(a[0], undefined); + assertEq(a[4096], i); + return a.length; + } + assertRecoveredOnBailout(a, true); + return 0; +} + +function build(l) { var arr = []; for (var i = 0; i < l; i++) arr.push(i); return arr } +var uceFault_arrayAlloc3 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_arrayAlloc3')); +function arrayAlloc3(i) { + var a = [0,1,2,3,4,5,6,7,8]; + if (uceFault_arrayAlloc3(i) || uceFault_arrayAlloc3(i)) { + assertEq(a[0], 0); + assertEq(a[3], 3); + return a.length; + } + assertRecoveredOnBailout(a, true); + return 0; +}; + +// Prevent compilation of the top-level +eval(`(${resumeHere})`); + +for (var i = 0; i < 100; i++) { + array0Length(i); + array0LengthBail(i); + array1Length(i); + array1LengthBail(i); + array2Length(i); + array2LengthBail(i); + array1Content(i); + array1ContentBail0(i); + array1ContentBail1(i); + array2Content(i); + array2ContentBail0(i); + array2ContentBail1(i); + array2ContentBail2(i); + arrayInitBail0(i); + arrayInitBail1(i); + arrayLarge0(i); + arrayLarge1(i); + arrayLarge2(i); + //arrayCond(i); See bug 1697691. + arrayHole0(i); + arrayAlloc0(i); + arrayAlloc1(i); + arrayAlloc2(i); + arrayAlloc3(i); +} + +for (var i = 0; i < 100; i++) { + arrayWithGCInit0(i); + arrayWithGCInit1(i); + arrayWithGCInit2(i); +} + +// If arr[1] is not defined, then we fallback on the prototype which instead of +// returning undefined, returns "0". +Object.defineProperty(Array.prototype, 1, { + value: 100, + configurable: true, + enumerable: true, + writable: true +}); + +for (var i = 0; i < 100; i++) { + arrayHole1(i); +} diff --git a/js/src/jit-test/tests/ion/recover-autounsafe-2.js b/js/src/jit-test/tests/ion/recover-autounsafe-2.js new file mode 100644 index 0000000000..9738a8c678 --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-autounsafe-2.js @@ -0,0 +1,20 @@ +// |jit-test| --fast-warmup; --ion-offthread-compile=off + +function f() { + "use strict"; + + // Recoverable instruction. Uses AutoUnsafeCallWithABI, so no pending + // exceptions are allowed. + const recoverable = Math.sqrt(4); + + // Throws because |not_defined| isn't defined and we're in strict mode. + // The thrown exception attempts to close the iterator, which will then + // lead to recovering all instructions, including |Math.sqrt(4)|. + [not_defined] = "a"; +} + +for (let i = 0; i < 50; i++) { + try { + f(); + } catch {} +} diff --git a/js/src/jit-test/tests/ion/recover-autounsafe.js b/js/src/jit-test/tests/ion/recover-autounsafe.js new file mode 100644 index 0000000000..e03b018ccc --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-autounsafe.js @@ -0,0 +1,36 @@ +// |jit-test| --ion-eager; --ion-offthread-compile=off + +// Some AutoUnsafeCallWithABI functions can be reached via recovery instructions. +// This testcase is designed to trigger all of the recovery paths that can reach +// AutoUnsafeCallWithABI functions, while an exception is being thrown. + +(function() { + inputs = []; + f = (function(x) { + var o = {a: x}; + 4294967297 ** (x >>> 0) * + 4294967297 / x >>> 0 * + 4294967297 % x >>> 0 * + Math.max(4294967297, x >>> 0) * + Math.min(4294967, x >>> 0) * + Math.atan2(4294967, x >>> 0) * + Math.sin(x >>> 0) * + Math.sqrt(x >>> 0) * + Math.hypot(4294967, x >>> 0) * + Math.ceil((x >>> 0) * 0.5) * + Math.floor((x >>> 0) * 0.5) * + Math.trunc((x >>> 0) * 0.5) * + Math.round((x >>> 0) * 0.5) * + Math.sign(x >>> 0) * + Math.log(x >>> 0) * + !o * + Math.fround(y); // Exception thrown here; y is not defined. + }); + if (f) { + for (var j = 0; j < 2; ++j) { + try { + f(inputs[0]); + } catch (e) {} + } + } +})(); diff --git a/js/src/jit-test/tests/ion/recover-bigint.js b/js/src/jit-test/tests/ion/recover-bigint.js new file mode 100644 index 0000000000..3a272c42f3 --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-bigint.js @@ -0,0 +1,265 @@ +// |jit-test| --ion-limit-script-size=off + +setJitCompilerOption("baseline.warmup.trigger", 9); +setJitCompilerOption("ion.warmup.trigger", 20); + +// Prevent the GC from cancelling Ion compilations, when we expect them to succeed +gczeal(0); + +// Keep in sync with BigInt::MaxBitLength. +const maxBitLength = 1024 * 1024; + +const maxBigInt = BigInt.asUintN(maxBitLength, -1n); +const minBigInt = -maxBigInt; + +function resumeHere() {} + +function bigIntAddBail(i) { + var x = [0n, maxBigInt][0 + (i >= 99)]; + + var a = x + 1n; + + // Add a function call to capture a resumepoint at the end of the call or + // inside the inlined block, such as the bailout does not rewind to the + // beginning of the function. + resumeHere(); + + if (i >= 99) { + bailout(); + // Flag the computation as having removed uses to check that we properly + // report the error while executing the BigInt operation on bailout. + return a; + } +} + +function bigIntSubBail(i) { + var x = [0n, minBigInt][0 + (i >= 99)]; + + var a = x - 1n; + + // Add a function call to capture a resumepoint at the end of the call or + // inside the inlined block, such as the bailout does not rewind to the + // beginning of the function. + resumeHere(); + + if (i >= 99) { + bailout(); + // Flag the computation as having removed uses to check that we properly + // report the error while executing the BigInt operation on bailout. + return a; + } +} + +function bigIntMulBail(i) { + var x = [0n, maxBigInt][0 + (i >= 99)]; + + var a = x * 2n; + + // Add a function call to capture a resumepoint at the end of the call or + // inside the inlined block, such as the bailout does not rewind to the + // beginning of the function. + resumeHere(); + + if (i >= 99) { + bailout(); + // Flag the computation as having removed uses to check that we properly + // report the error while executing the BigInt operation on bailout. + return a; + } +} + +function bigIntIncBail(i) { + var x = [0n, maxBigInt][0 + (i >= 99)]; + + var a = x++; + + // Add a function call to capture a resumepoint at the end of the call or + // inside the inlined block, such as the bailout does not rewind to the + // beginning of the function. + resumeHere(); + + if (i >= 99) { + bailout(); + // Flag the computation as having removed uses to check that we properly + // report the error while executing the BigInt operation on bailout. + return x; + } +} + +function bigIntDecBail(i) { + var x = [0n, minBigInt][0 + (i >= 99)]; + + var a = x--; + + // Add a function call to capture a resumepoint at the end of the call or + // inside the inlined block, such as the bailout does not rewind to the + // beginning of the function. + resumeHere(); + + if (i >= 99) { + bailout(); + // Flag the computation as having removed uses to check that we properly + // report the error while executing the BigInt operation on bailout. + return x; + } +} + +function bigIntBitNotBail(i) { + var x = [0n, maxBigInt][0 + (i >= 99)]; + + var a = ~x; + + // Add a function call to capture a resumepoint at the end of the call or + // inside the inlined block, such as the bailout does not rewind to the + // beginning of the function. + resumeHere(); + + if (i >= 99) { + bailout(); + // Flag the computation as having removed uses to check that we properly + // report the error while executing the BigInt operation on bailout. + return a; + } +} + +function bigIntLshBail(i) { + var shift = [0n, BigInt(maxBitLength)][0 + (i >= 99)]; + + var a = 1n << shift; + + // Add a function call to capture a resumepoint at the end of the call or + // inside the inlined block, such as the bailout does not rewind to the + // beginning of the function. + resumeHere(); + + if (i >= 99) { + bailout(); + // Flag the computation as having removed uses to check that we properly + // report the error while executing the BigInt operation on bailout. + return a; + } +} + +function bigIntRshBail(i) { + var shift = [0n, -BigInt(maxBitLength)][0 + (i >= 99)]; + + var a = 1n >> shift; + + // Add a function call to capture a resumepoint at the end of the call or + // inside the inlined block, such as the bailout does not rewind to the + // beginning of the function. + resumeHere(); + + if (i >= 99) { + bailout(); + // Flag the computation as having removed uses to check that we properly + // report the error while executing the BigInt operation on bailout. + return a; + } +} + +function bigIntAsUintBail(i) { + var x = [0, maxBitLength + 1][0 + (i >= 99)]; + + var a = BigInt.asUintN(x, -1n); + + // Add a function call to capture a resumepoint at the end of the call or + // inside the inlined block, such as the bailout does not rewind to the + // beginning of the function. + resumeHere(); + + if (i >= 99) { + bailout(); + // Flag the computation as having removed uses to check that we properly + // report the error while executing the BigInt operation on bailout. + return a; + } +} + +// Prevent compilation of the top-level +eval(`(${resumeHere})`); + +// The bigIntXBail() functions create a BigInt which exceeds the maximum +// representable BigInt. This results in either throwing a RangeError or an +// out-of-memory error when the operation is recovered during a bailout. + +try { + for (let i = 0; i < 100; i++) { + bigIntAddBail(i); + } + throw new Error("missing exception"); +} catch (e) { + assertEq(e instanceof RangeError || e === "out of memory", true, String(e)); +} + +try { + for (let i = 0; i < 100; i++) { + bigIntSubBail(i); + } + throw new Error("missing exception"); +} catch (e) { + assertEq(e instanceof RangeError || e === "out of memory", true, String(e)); +} + +try { + for (let i = 0; i < 100; i++) { + bigIntMulBail(i); + } + throw new Error("missing exception"); +} catch (e) { + assertEq(e instanceof RangeError || e === "out of memory", true, String(e)); +} + +try { + for (let i = 0; i < 100; i++) { + bigIntIncBail(i); + } + throw new Error("missing exception"); +} catch (e) { + assertEq(e instanceof RangeError || e === "out of memory", true, String(e)); +} + +try { + for (let i = 0; i < 100; i++) { + bigIntDecBail(i); + } + throw new Error("missing exception"); +} catch (e) { + assertEq(e instanceof RangeError || e === "out of memory", true, String(e)); +} + +try { + for (let i = 0; i < 100; i++) { + bigIntBitNotBail(i); + } + throw new Error("missing exception"); +} catch (e) { + assertEq(e instanceof RangeError || e === "out of memory", true, String(e)); +} + +try { + for (let i = 0; i < 100; i++) { + bigIntLshBail(i); + } + throw new Error("missing exception"); +} catch (e) { + assertEq(e instanceof RangeError || e === "out of memory", true, String(e)); +} + +try { + for (let i = 0; i < 100; i++) { + bigIntRshBail(i); + } + throw new Error("missing exception"); +} catch (e) { + assertEq(e instanceof RangeError || e === "out of memory", true, String(e)); +} + +try { + for (let i = 0; i < 100; i++) { + bigIntAsUintBail(i); + } + throw new Error("missing exception"); +} catch (e) { + assertEq(e instanceof RangeError || e === "out of memory", true, String(e)); +} diff --git a/js/src/jit-test/tests/ion/recover-bug1236114.js b/js/src/jit-test/tests/ion/recover-bug1236114.js new file mode 100644 index 0000000000..0956a3ee8a --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-bug1236114.js @@ -0,0 +1,5 @@ +function f(x) { + return (!(Math.round(Math.hypot(Number.MIN_VALUE, Math.fround(x))) | 0) | 0) !== (Math.atanh(x) ? false : Math.tan(0)) +} +f(Number.MIN_VALUE) +assertEq(f(4294967295), true) diff --git a/js/src/jit-test/tests/ion/recover-empty-new-object.js b/js/src/jit-test/tests/ion/recover-empty-new-object.js new file mode 100644 index 0000000000..2aee977ce2 --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-empty-new-object.js @@ -0,0 +1,35 @@ +// |jit-test| --no-ion +// Warp lacks Scalar Replacement support (bug 1650233). Re-evaluate after that +// bug has been fixed. + +// Ion eager fails the test below because we have not yet created any +// template object in baseline before running the content of the top-level +// function. +if (getJitCompilerOptions()["ion.warmup.trigger"] <= 20) + setJitCompilerOption("ion.warmup.trigger", 20); + +// Prevent the GC from cancelling Ion compilations, when we expect them to succeed +gczeal(0); + +// These arguments have to be computed by baseline, and thus captured in a +// resume point. The next function checks that we can remove the computation of +// these arguments. +function f(a, b, c, d) { } + +function topLevel() { + for (var i = 0; i < 30; i++) { + var unused = {}; + var a = {}; + var b = {}; + var c = {}; + var d = {}; + assertRecoveredOnBailout(unused, true); + assertRecoveredOnBailout(a, true); + assertRecoveredOnBailout(b, true); + assertRecoveredOnBailout(c, true); + assertRecoveredOnBailout(d, true); + f(a, b, c, d); + } +} + +topLevel(); diff --git a/js/src/jit-test/tests/ion/recover-inline-arguments-debugger.js b/js/src/jit-test/tests/ion/recover-inline-arguments-debugger.js new file mode 100644 index 0000000000..4ad8994829 --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-inline-arguments-debugger.js @@ -0,0 +1,32 @@ +// |jit-test| --fast-warmup + +g13 = newGlobal({newCompartment: true}) +g13.parent = this; +g13.eval("(" + function() { + Debugger(parent).onExceptionUnwind = function(frame) { + while (frame.older) { + frame = frame.older; + } + } +} + ")()"); + +function triggerUnwind() { + try { + throw 1; + } catch {} +} + +function foo(depth) { + var dummy = arguments; + if (depth == 0) { + triggerUnwind(); + } else { + bar(depth - 1); + } +} + +function bar(depth) { + foo(depth); +} + +bar(50); diff --git a/js/src/jit-test/tests/ion/recover-inline-arguments.js b/js/src/jit-test/tests/ion/recover-inline-arguments.js new file mode 100644 index 0000000000..7daa3cba30 --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-inline-arguments.js @@ -0,0 +1,38 @@ +// |jit-test| --inlining-entry-threshold=5 + +setJitCompilerOption("baseline.warmup.trigger", 9); +setJitCompilerOption("ion.warmup.trigger", 20); + +// Prevent the GC from cancelling compilations, when we expect them to succeed. +gczeal(0); + +function rcreate_arguments_object_nouse_inner() { + assertRecoveredOnBailout(arguments, true); +} +function rcreate_arguments_object_nouse_outer() { + rcreate_arguments_object_nouse_inner(); + trialInline(); +} +function rcreate_arguments_object_oneuse_inner() { + assertRecoveredOnBailout(arguments, true); + return arguments.length; +} +function rcreate_arguments_object_oneuse_outer() { + rcreate_arguments_object_oneuse_inner(0) + trialInline(); +} + +function rcreate_arguments_object_oneuse_inner() { + assertRecoveredOnBailout(arguments, true); + return arguments.length; +} +function rcreate_arguments_object_oneuse_outer() { + rcreate_arguments_object_oneuse_inner(0) + trialInline(); +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + rcreate_arguments_object_nouse_outer(); + rcreate_arguments_object_oneuse_outer(); +} diff --git a/js/src/jit-test/tests/ion/recover-inline-rest.js b/js/src/jit-test/tests/ion/recover-inline-rest.js new file mode 100644 index 0000000000..8d1745a0ef --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-inline-rest.js @@ -0,0 +1,103 @@ +// |jit-test| --fast-warmup; --no-threads + +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("ion.warmup.trigger", 100); + +// Prevent GC from cancelling/discarding Ion compilations. +gczeal(0); + +// This function is used to force a bailout when it is inlined, and to recover +// the frame which is inlining this function. +var resumeHere = function (i) { if (i >= 99) bailout(); }; + +// This function is used to cause an invalidation after having removed a branch +// after DCE. This is made to check if we correctly recover an array +// allocation. +var uceFault = function (i) { + if (i > 98) + uceFault = function (i) { return true; }; + return false; +}; + +var uceFault_lengthRest = eval(`(${uceFault})`.replace('uceFault', 'uceFault_lengthRest')); +function lengthRest(i, ...rest) { + if (uceFault_lengthRest(i) || uceFault_lengthRest(i)) { + return empty.apply(null, rest); + } + assertRecoveredOnBailout(rest, true); + return 0; +} +function lengthRestOuter(i) { + return lengthRest(i); +} +assertEq(isSmallFunction(lengthRest), true, + "function must be small enough to be inlined to create an inline rest array"); + +var uceFault_elemRest = eval(`(${uceFault})`.replace('uceFault', 'uceFault_elemRest')); +function elemRest(i, ...rest) { + if (uceFault_elemRest(i) || uceFault_elemRest(i)) { + return empty.apply(null, rest); + } + assertRecoveredOnBailout(rest, true); + return 0; +} +function elemRestOuter(i) { + return elemRest(i); +} +assertEq(isSmallFunction(elemRest), true, + "function must be small enough to be inlined to create an inline rest array"); + +function empty() {} + +var uceFault_applyRest = eval(`(${uceFault})`.replace('uceFault', 'uceFault_applyRest')); +function applyRest(i, ...rest) { + if (uceFault_applyRest(i) || uceFault_applyRest(i)) { + return empty.apply(null, rest); + } + assertRecoveredOnBailout(rest, true); + return 0; +} +function applyRestOuter(i) { + return applyRest(i); +} +assertEq(isSmallFunction(applyRest), true, + "function must be small enough to be inlined to create an inline rest array"); + +var uceFault_spreadRest = eval(`(${uceFault})`.replace('uceFault', 'uceFault_spreadRest')); +function spreadRest(i, ...rest) { + if (uceFault_spreadRest(i) || uceFault_spreadRest(i)) { + return empty(...rest); + } + assertRecoveredOnBailout(rest, true); + return 0; +} +function spreadRestOuter(i) { + return spreadRest(i); +} +assertEq(isSmallFunction(spreadRest), true, + "function must be small enough to be inlined to create an inline rest array"); + +var uceFault_newSpreadRest = eval(`(${uceFault})`.replace('uceFault', 'uceFault_newSpreadRest')); +function newSpreadRest(i, ...rest) { + if (uceFault_newSpreadRest(i) || uceFault_newSpreadRest(i)) { + return new empty(...rest); + } + assertRecoveredOnBailout(rest, true); + return 0; +} +function newSpreadRestOuter(i) { + return newSpreadRest(i); +} +assertEq(isSmallFunction(newSpreadRest), true, + "function must be small enough to be inlined to create an inline rest array"); + +// Prevent compilation of the top-level +eval(`(${resumeHere})`); + +for (let i = 0; i < 100; i++) { + lengthRestOuter(i); + elemRestOuter(i); + applyRestOuter(i); + spreadRestOuter(i); + newSpreadRestOuter(i); +} diff --git a/js/src/jit-test/tests/ion/recover-lambdas-bug1113940.js b/js/src/jit-test/tests/ion/recover-lambdas-bug1113940.js new file mode 100644 index 0000000000..078e51ad2c --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-lambdas-bug1113940.js @@ -0,0 +1,37 @@ + +gczeal(14); + +// The object metadata callback can iterate over the stack. Thus during the +// allocation of the lambda we might inspect the stack which is still incomplete +// because the lambda is not yet reconstructed. +// +// enableShellAllocationMetadataBuilder ignores its argument, because we don't +// permit metadata callbacks to run JS any more, so this test may be +// unnecessary. We'll preserve its structure just in case. +enableShellAllocationMetadataBuilder(function() {}); +function f() { + (function() { + '' ^ Object + })(); +} +x = 0; +for (var j = 0; j < 99; ++j) { + x += f(); +} + +try { + x = true; + // Same comment as above. + enableShellAllocationMetadataBuilder(function([x, y, z], ... Debugger) {}); + for (var i = 0; i < 10; ++i) { + var f = function() { + function g() { + x++; + } + g(); + } + f(); + } +} catch (e) { + assertEq(e instanceof TypeError, true); +} diff --git a/js/src/jit-test/tests/ion/recover-lambdas-bug1114566.js b/js/src/jit-test/tests/ion/recover-lambdas-bug1114566.js new file mode 100644 index 0000000000..ada8e59f38 --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-lambdas-bug1114566.js @@ -0,0 +1,2 @@ + +(new Function("return (function o() {}).caller;"))(); diff --git a/js/src/jit-test/tests/ion/recover-lambdas-bug1118911.js b/js/src/jit-test/tests/ion/recover-lambdas-bug1118911.js new file mode 100644 index 0000000000..d1e43cb717 --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-lambdas-bug1118911.js @@ -0,0 +1,10 @@ + +function test() { + function f() { + return k.apply(this, arguments); + } + if (undefined >> undefined !== 0) {} + for (var [ v , c ] in this.tracemonkey) { } +} +try { test(); } catch(exc1) {} +try { test(); } catch(exc1) {} diff --git a/js/src/jit-test/tests/ion/recover-lambdas-bug1133389.js b/js/src/jit-test/tests/ion/recover-lambdas-bug1133389.js new file mode 100644 index 0000000000..a1fc813b63 --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-lambdas-bug1133389.js @@ -0,0 +1,17 @@ +var o = {} +Object.defineProperty(o, "p", { + get: function() { + return arguments.callee.caller.caller; + } +}); + +function f() { + function g() { + return o.p; + } + return g(); +} + +for (var k = 0; k < 2; k++) { + assertEq(f(), f); +} diff --git a/js/src/jit-test/tests/ion/recover-lambdas.js b/js/src/jit-test/tests/ion/recover-lambdas.js new file mode 100644 index 0000000000..bec1dad254 --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-lambdas.js @@ -0,0 +1,62 @@ +// |jit-test| --no-ion; --ion-osr=off +// Warp lacks Scalar Replacement support (bug 1650233). Re-evaluate after that +// bug has been fixed. + +var max = 40; +setJitCompilerOption("ion.warmup.trigger", max - 10); + +// Prevent the GC from cancelling Ion compilations, when we expect them to succeed +gczeal(0); + +// This function is used to escape "g" which is a non-escaped inner function. +// As it is not escaped within "f", the lambda for "g" would be computed on the +// bailout path. Resolving the first ".caller" implies that we have to recover +// the lambda. Resolving the second ".caller" is needed such as we can build the +// test case without explicitly escaping "g", which would prevent this +// optimization. + +function return_f(i) { + if (i != max - 1) + return f; + + // return_f.caller == g + // return_f.caller.caller == f + return return_f.caller.caller; +} + +function f(i) { + function g() { + return return_f(i); + } + + assertRecoveredOnBailout(g, true); + return g(); +} + +// This function is used to cause an invalidation after having removed a branch. +// These functions are used to check if we correctly recover the lambda +// and its environment during a bailout. +var uceFault = function (i) { + if (i == max - 1) + uceFault = function (i) { return true; }; + return false; +}; + +var uceFault_lambdaCall = eval(`(${uceFault})`.replace('uceFault', 'uceFault_lambdaCall')); +function lambdaCall(i) { + function g() { + return i; + } + + if (uceFault_lambdaCall(i) || uceFault_lambdaCall(i)) + assertEq(g(), i); + + assertRecoveredOnBailout(g, true); +}; + + + +for (var i = 0; i < max; i++) { + assertEq(f(i), f); + lambdaCall(i); +} diff --git a/js/src/jit-test/tests/ion/recover-newarrayiterator-close.js b/js/src/jit-test/tests/ion/recover-newarrayiterator-close.js new file mode 100644 index 0000000000..43d3b99b5f --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-newarrayiterator-close.js @@ -0,0 +1,15 @@ +// |jit-test| --no-threads +"use strict"; + +function test() { + for (var k = 0; k < 35; ++k) { + try { + (function (x) { + (x ? 0 : ([y] = [])); + })(); + } catch (e) {} + } +} + +for (var i = 0; i < 35; i++) + test(); diff --git a/js/src/jit-test/tests/ion/recover-newarrayiterator.js b/js/src/jit-test/tests/ion/recover-newarrayiterator.js new file mode 100644 index 0000000000..3d98640a2c --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-newarrayiterator.js @@ -0,0 +1,66 @@ +var max = 40; +setJitCompilerOption("ion.warmup.trigger", max - 10); + +// Prevent the GC from cancelling Ion compilations, when we expect them to succeed +gczeal(0); + +function selfhosted() { + if (typeof getSelfHostedValue === "undefined") + return; + + var NewArrayIterator = getSelfHostedValue("NewArrayIterator"); + var iter = NewArrayIterator(); + bailout(); + // assertRecoveredOnBailout(iter, true); +} + +function iterator(i) { + var array = [1, i]; + var iter = array[Symbol.iterator](); + assertEq(iter.next().value, 1); + bailout(); + // This sometimes fails + // assertRecoveredOnBailout(iter, true); + var result = iter.next(); + assertEq(result.value, i); + assertEq(result.done, false); + assertEq(iter.next().done, true); +} + +function forof(i) { + var array = [1, i]; + var first = true; + + for (var x of array) { + if (first) { + assertEq(x, 1); + bailout(); + first = false; + } else { + assertEq(x, i); + } + } +} + +var data = { + a: 'foo', + b: {c: 'd'}, + arr: [1, 2, 3] +}; + +function fn() { + var {a, b:{c:b}, arr:[, c]} = data; + return c; +} + +function destructuring() { + for (var i = 0; i < max; i++) + assertEq(fn(), 2); +} + +for (var i = 0; i < max; i++) { + selfhosted(); + iterator(i); + forof(i); + destructuring(); +} diff --git a/js/src/jit-test/tests/ion/recover-newstringiterator.js b/js/src/jit-test/tests/ion/recover-newstringiterator.js new file mode 100644 index 0000000000..14a7d46b6e --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-newstringiterator.js @@ -0,0 +1,66 @@ +var max = 40; +setJitCompilerOption("ion.warmup.trigger", max - 10); + +// Prevent the GC from cancelling Ion compilations, when we expect them to succeed +gczeal(0); + +function selfhosted() { + if (typeof getSelfHostedValue === "undefined") + return; + + var NewStringIterator = getSelfHostedValue("NewStringIterator"); + var iter = NewStringIterator(); + bailout(); + // assertRecoveredOnBailout(iter, true); +} + +function iterator(i) { + var string = String.fromCharCode(0x41, i); + var iter = string[Symbol.iterator](); + assertEq(iter.next().value, 'A'); + bailout(); + // This sometimes fails + // assertRecoveredOnBailout(iter, true); + var result = iter.next(); + assertEq(result.value, String.fromCharCode(i)); + assertEq(result.done, false); + assertEq(iter.next().done, true); +} + +function forof(i) { + var string = String.fromCharCode(0x41, i); + var first = true; + + for (var x of string) { + if (first) { + assertEq(x, 'A'); + bailout(); + first = false; + } else { + assertEq(x, String.fromCharCode(i)); + } + } +} + +var data = { + a: 'foo', + b: {c: 'd'}, + str: 'ABC' +}; + +function fn() { + var {a, b:{c:b}, str:[, c]} = data; + return c; +} + +function destructuring() { + for (var i = 0; i < max; i++) + assertEq(fn(), 'B'); +} + +for (var i = 0; i < max; i++) { + selfhosted(); + iterator(i); + forof(i); + destructuring(); +} diff --git a/js/src/jit-test/tests/ion/recover-object-bug1174322.js b/js/src/jit-test/tests/ion/recover-object-bug1174322.js new file mode 100644 index 0000000000..d5e1066b8e --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-object-bug1174322.js @@ -0,0 +1,13 @@ +function f(y) { + Math.min(NaN) ? a : y +} +function g(y) { + f({ + e: false + }) +} +x = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +for (var j = 0; j < 23; ++j) { + g(x[j]) +} diff --git a/js/src/jit-test/tests/ion/recover-object-bug1175233.js b/js/src/jit-test/tests/ion/recover-object-bug1175233.js new file mode 100644 index 0000000000..6d4a8eaa5b --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-object-bug1175233.js @@ -0,0 +1,51 @@ +// |jit-test| --ion-pruning=on +// +// Unboxed object optimization might not trigger in all cases, thus we ensure +// that Scalar Replacement optimization is working well independently of the +// object representation. + +// Ion eager fails the test below because we have not yet created any +// template object in baseline before running the content of the top-level +// function. +if (getJitCompilerOptions()["ion.warmup.trigger"] <= 130) + setJitCompilerOption("ion.warmup.trigger", 130); + +// This test checks that we are able to remove the getelem & setelem with scalar +// replacement, so we should not force inline caches, as this would skip the +// generation of getelem & setelem instructions. +if (getJitCompilerOptions()["ion.forceinlineCaches"]) + setJitCompilerOption("ion.forceinlineCaches", 0); + +// Prevent the GC from cancelling Ion compilations, when we expect them to succeed +gczeal(0); + +var uceFault = function (j) { + if (j >= max) + uceFault = function (j) { return true; }; + return false; +} + +function f(j) { + var i = Math.pow(2, j) | 0; + var obj = { + i: i, + v: i + i + }; + // These can only be recovered on bailout iff either we have type + // information for the property access in the branch, or the branch is + // removed before scalar replacement. + assertRecoveredOnBailout(obj, true); + assertRecoveredOnBailout(obj.v, true); + if (uceFault(j) || uceFault(j)) { + // MObjectState::recover should neither fail, + // nor coerce its result to an int32. + assertEq(obj.v, 2 * i); + } + return 2 * obj.i; +} + +var max = 150; +for (var j = 0; j <= max; ++j) { + with({}){}; + f(j); +} diff --git a/js/src/jit-test/tests/ion/recover-objects.js b/js/src/jit-test/tests/ion/recover-objects.js new file mode 100644 index 0000000000..30865433ae --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-objects.js @@ -0,0 +1,224 @@ +// |jit-test| --ion-pruning=on; --fast-warmup + +var max = 200; + +// Ion eager fails the test below because we have not yet created any +// template object in baseline before running the content of the top-level +// function. +if (getJitCompilerOptions()["ion.warmup.trigger"] <= max - 10) + setJitCompilerOption("ion.warmup.trigger", max - 10); + +// Force Inlining heuristics to always inline the functions which have the same +// number of use count. +setJitCompilerOption("ion.warmup.trigger", getJitCompilerOptions()["ion.warmup.trigger"]); + +// This test checks that we are able to remove the getprop & setprop with scalar +// replacement, so we should not force inline caches, as this would skip the +// generation of getprop & setprop instructions. +if (getJitCompilerOptions()["ion.forceinlineCaches"]) + setJitCompilerOption("ion.forceinlineCaches", 0); + +// Prevent the GC from cancelling Ion compilations, when we expect them to succeed +gczeal(0); + +function resumeHere() {} +var uceFault = function (i) { + if (i > max - 2) + uceFault = function (i) { return true; }; + return false; +}; + + +// Without "use script" in the inner function, the arguments might be +// observable. +function inline_notSoEmpty1(a, b, c, d) { + // This function is not strict, so we might be able to observe its + // arguments, if somebody ever called fun.arguments inside it. + return { v: (a.v + b.v + c.v + d.v - 10) / 4 }; +} +var uceFault_notSoEmpty1 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_notSoEmpty1')); +function notSoEmpty1() { + var a = { v: i }; + var b = { v: 1 + a.v }; + var c = { v: 2 + b.v }; + var d = { v: 3 + c.v }; + var unused = { v: 4 + d.v }; + var res = inline_notSoEmpty1(a, b, c, d); + if (uceFault_notSoEmpty1(i) || uceFault_notSoEmpty1(i)) + assertEq(i, res.v); + // Note, that even if the arguments are observable, we are capable of + // optimizing these cases by executing recover instruction before the + // execution of the bailout. This ensures that the observed objects are + // allocated once and used by the unexpected observation and the bailout. + assertRecoveredOnBailout(a, true); + assertRecoveredOnBailout(b, true); + assertRecoveredOnBailout(c, true); + assertRecoveredOnBailout(d, true); + assertRecoveredOnBailout(unused, true); + // This can only be recovered on bailout iff either we have type + // information for the property access in the branch, or the branch is + // removed before scalar replacement. + assertRecoveredOnBailout(res, true); +} + +// Check that we can recover objects with their content. +function inline_notSoEmpty2(a, b, c, d) { + "use strict"; + return { v: (a.v + b.v + c.v + d.v - 10) / 4 }; +} +var uceFault_notSoEmpty2 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_notSoEmpty2')); +function notSoEmpty2(i) { + var a = { v: i }; + var b = { v: 1 + a.v }; + var c = { v: 2 + b.v }; + var d = { v: 3 + c.v }; + var unused = { v: 4 + d.v }; + var res = inline_notSoEmpty2(a, b, c, d); + if (uceFault_notSoEmpty2(i) || uceFault_notSoEmpty2(i)) + assertEq(i, res.v); + assertRecoveredOnBailout(a, true); + assertRecoveredOnBailout(b, true); + assertRecoveredOnBailout(c, true); + assertRecoveredOnBailout(d, true); + assertRecoveredOnBailout(unused, true); + // This can only be recovered on bailout iff either we have type + // information for the property access in the branch, or the branch is + // removed before scalar replacement. + assertRecoveredOnBailout(res, true); +} + +// Check that we can recover objects with their content. +var argFault_observeArg = function (i) { + if (i > max - 2) + return inline_observeArg.arguments[0]; + return { test : i }; +}; +function inline_observeArg(obj, i) { + return argFault_observeArg(i); +} +function observeArg(i) { + var obj = { test: i }; + var res = inline_observeArg(obj, i); + assertEq(res.test, i); + assertRecoveredOnBailout(obj, true); +} + +// Check case where one successor can have multiple times the same predecessor. +function complexPhi(i) { + var obj = { test: i }; + switch (i) { // TableSwitch + case 0: obj.test = 0; break; + case 1: obj.test = 1; break; + case 2: obj.test = 2; break; + case 3: case 4: case 5: case 6: + default: obj.test = i; break; + case 7: obj.test = 7; break; + case 8: obj.test = 8; break; + case 9: obj.test = 9; break; + } + assertEq(obj.test, i); + assertRecoveredOnBailout(obj, true); +} + +// Check case where one successor can have multiple times the same predecessor. +function withinIf(i) { + var x = undefined; + if (i % 2 == 0) { + let obj = { foo: i }; + x = obj.foo; + assertRecoveredOnBailout(obj, true); + obj = undefined; + } else { + let obj = { bar: i }; + x = obj.bar; + assertRecoveredOnBailout(obj, true); + obj = undefined; + } + assertEq(x, i); +} + +// Check case where one successor can have multiple times the same predecessor. +function unknownLoad(i) { + var obj = { foo: i }; + // Unknown properties are inlined as undefined. + assertEq(obj.bar, undefined); + assertRecoveredOnBailout(obj, true); +} + +// Check with dynamic slots. +// +// This test assumes that creation of an object with 50 slots is optimized; +// see MaxDynamicSlotsToOptimize. +function dynamicSlots(i) { + var obj = { + p0: i + 0, p1: i + 1, p2: i + 2, p3: i + 3, p4: i + 4, p5: i + 5, p6: i + 6, p7: i + 7, p8: i + 8, p9: i + 9, p10: i + 10, + p11: i + 11, p12: i + 12, p13: i + 13, p14: i + 14, p15: i + 15, p16: i + 16, p17: i + 17, p18: i + 18, p19: i + 19, p20: i + 20, + p21: i + 21, p22: i + 22, p23: i + 23, p24: i + 24, p25: i + 25, p26: i + 26, p27: i + 27, p28: i + 28, p29: i + 29, p30: i + 30, + p31: i + 31, p32: i + 32, p33: i + 33, p34: i + 34, p35: i + 35, p36: i + 36, p37: i + 37, p38: i + 38, p39: i + 39, p40: i + 40, + p41: i + 41, p42: i + 42, p43: i + 43, p44: i + 44, p45: i + 45, p46: i + 46, p47: i + 47, p48: i + 48, p49: i + 49, p50: i + 50 + }; + // Add a function call to capture a resumepoint at the end of the call or + // inside the inlined block, such as the bailout does not rewind to the + // beginning of the function. + resumeHere(); bailout(); + assertEq(obj.p0 + obj.p10 + obj.p20 + obj.p30 + obj.p40, 5 * i + 100); + assertRecoveredOnBailout(obj, true); +} + +// Check that we can correctly recover allocations of new objects. +function Point(x, y) +{ + this.x = x; + this.y = y; +} + +function createThisWithTemplate(i) +{ + var p = new Point(i - 1, i + 1); + bailout(); + assertEq(p.y - p.x, 2); + assertRecoveredOnBailout(p, true); +} + +function testNewObject1(i) { + var o = { a: 1 }; + assertRecoveredOnBailout(o, true); + return o.a; +} + +var objIdx = 0; +var uceFault_notSoEmpty3 = eval(`(${uceFault})`.replace('uceFault', 'uceFault_notSoEmpty3')); +function testNewObjectWithBranchPruning(i) { + let obj = {}; + let idx = objIdx++; + if (uceFault_notSoEmpty3(i) || uceFault_notSoEmpty3(i)) { + // Branch content removed because never taken. Thus, no uses of obj, + // which can then be marked as recovered-on-bailout if foo is ever + // called with false. + obj.idx = idx; + obj.a = 1; + obj.b = 2; + return obj; + } + assertRecoveredOnBailout(obj, true); + return idx; +} + +for (var i = 0; i < max; i++) { + notSoEmpty1(i); + notSoEmpty2(i); + observeArg(i); + complexPhi(i); + withinIf(i); + dynamicSlots(i); + testNewObject1(i); + testNewObjectWithBranchPruning(i); + unknownLoad(i); + + // TODO: support constructors in scalar replacement (bug 1700422) + // createThisWithTemplate(i); +} + +let o = testNewObjectWithBranchPruning(-1); +assertEq(o.a, 1); +assertEq(o.b, 2); diff --git a/js/src/jit-test/tests/ion/recover-rest-osr.js b/js/src/jit-test/tests/ion/recover-rest-osr.js new file mode 100644 index 0000000000..a8f88cd5f7 --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-rest-osr.js @@ -0,0 +1,28 @@ +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("ion.warmup.trigger", 120); +gczeal(0); + +with ({}) {} + +function bar(...rest) { + // |rest| can be recovered, even if this is inlined into an OSR script. + assertRecoveredOnBailout(rest, true); + return rest[0]; +} + +function foo(n, ...rest) { + // |rest| for an OSR script can't be recovered. + assertRecoveredOnBailout(rest, false); + var sum = 0; + for (var i = 0; i < n; i++) { + sum += bar(i); + } + trialInline(); + return sum; +} + +// Trigger trial-inlining of bar into foo. +foo(110); + +// OSR-compile foo. +assertEq(foo(1000), 499500); diff --git a/js/src/jit-test/tests/ion/recover-rest.js b/js/src/jit-test/tests/ion/recover-rest.js new file mode 100644 index 0000000000..11bfde7ff4 --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-rest.js @@ -0,0 +1,340 @@ +// Prevent GC from cancelling/discarding Ion compilations. +gczeal(0); + +// This function is used to force a bailout when it is inlined, and to recover +// the frame which is inlining this function. +var resumeHere = function (i) { if (i >= 99) bailout(); }; + +// This function is used to cause an invalidation after having removed a branch +// after DCE. This is made to check if we correctly recover an array +// allocation. +var uceFault = function (i) { + if (i > 98) + uceFault = function (i) { return true; }; + return false; +}; + +function empty() {} + +var globalArgs; +function escape(args) { globalArgs = args; } + +// Check rest array length. +function length(i, ...rest) { + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function lengthBail(i, ...rest) { + resumeHere(i); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +// Check rest array content. +function content(...rest) { + assertEq(rest[0], rest[1]); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function contentBail(...rest) { + resumeHere(rest[0]); + assertEq(rest[0], rest[1]); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function contentExtraFormals(i, ...rest) { + assertEq(rest[0], i); + assertRecoveredOnBailout(rest, true); + return rest.length; +} +function contentExtraFormalsBail(i, ...rest) { + resumeHere(i); + assertEq(rest[0], i); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +// No scalar replacement when the rest array is modified. +function setLength(i, ...rest) { + rest.length = 0; + assertRecoveredOnBailout(rest, false); + return rest.length; +} + +function setLengthBail(i, ...rest) { + resumeHere(i); + rest.length = 0; + assertRecoveredOnBailout(rest, false); + return rest.length; +} + +function setContent(i, ...rest) { + rest[0] = "bad"; + assertRecoveredOnBailout(rest, false); + return rest.length; +} + +function setContentBail(i, ...rest) { + resumeHere(i); + rest[0] = "bad"; + assertRecoveredOnBailout(rest, false); + return rest.length; +} + +function deleteContent(i, ...rest) { + delete rest[0]; + assertRecoveredOnBailout(rest, false); + return rest.length; +} + +function deleteContentBail(i, ...rest) { + resumeHere(i); + delete rest[0]; + assertRecoveredOnBailout(rest, false); + return rest.length; +} + +// No scalar replacement when the rest array escapes. +function escapes(i, ...rest) { + escape(rest); + assertRecoveredOnBailout(rest, false); + return rest.length; +} + +function escapesBail(i, ...rest) { + resumeHere(i); + escape(rest); + assertRecoveredOnBailout(rest, false); + return rest.length; +} + +// Check rest array with Function.prototype.apply. +function apply(...rest) { + empty.apply(null, rest); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function applyBail(...rest) { + resumeHere(rest[0]); + empty.apply(null, rest); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function applyExtraFormals(i, ...rest) { + empty.apply(null, rest); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function applyExtraFormalsBail(i, ...rest) { + resumeHere(i); + empty.apply(null, rest); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +// Check rest array with spread. +function spread(...rest) { + empty(...rest); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function spreadBail(...rest) { + resumeHere(rest[0]); + empty(...rest); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function spreadExtraFormals(i, ...rest) { + empty(...rest); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function spreadExtraFormalsBail(i, ...rest) { + resumeHere(i); + empty(...rest); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +// Extra args currently not supported. +function spreadExtraArgs(...rest) { + empty(0, ...rest); + assertRecoveredOnBailout(rest, false); + return rest.length; +} + +function spreadExtraArgsBail(...rest) { + resumeHere(rest[0]); + empty(0, ...rest); + assertRecoveredOnBailout(rest, false); + return rest.length; +} + +// Check rest array with new spread. +function newSpread(...rest) { + new empty(...rest); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function newSpreadBail(...rest) { + resumeHere(rest[0]); + new empty(...rest); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function newSpreadExtraFormals(i, ...rest) { + new empty(...rest); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function newSpreadExtraFormalsBail(i, ...rest) { + resumeHere(i); + new empty(...rest); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +// Extra args currently not supported. +function newSpreadExtraArgs(...rest) { + new empty(0, ...rest); + assertRecoveredOnBailout(rest, false); + return rest.length; +} + +function newSpreadExtraArgsBail(...rest) { + resumeHere(rest[0]); + new empty(0, ...rest); + assertRecoveredOnBailout(rest, false); + return rest.length; +} + +// The arguments object isn't mapped. +function setArgs(i, ...rest) { + arguments[1] = "fail"; + assertEq(rest[0], i); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +function setArgsBail(i, ...rest) { + resumeHere(i); + arguments[1] = "fail"; + assertEq(rest[0], i); + assertRecoveredOnBailout(rest, true); + return rest.length; +} + +// Check that we correctly allocate the array after taking the recover path. +var uceFault_recoverLength = eval(`(${uceFault})`.replace('uceFault', 'uceFault_recoverLength')); +function recoverLength(i, ...rest) { + if (uceFault_recoverLength(i) || uceFault_recoverLength(i)) { + return rest.length; + } + assertRecoveredOnBailout(rest, true); + return 0; +} + +var uceFault_recoverContent = eval(`(${uceFault})`.replace('uceFault', 'uceFault_recoverContent')); +function recoverContent(i, ...rest) { + if (uceFault_recoverContent(i) || uceFault_recoverContent(i)) { + return rest[0]; + } + assertRecoveredOnBailout(rest, true); + return 0; +} + +var uceFault_recoverApply = eval(`(${uceFault})`.replace('uceFault', 'uceFault_recoverApply')); +function recoverApply(i, ...rest) { + if (uceFault_recoverApply(i) || uceFault_recoverApply(i)) { + return empty.apply(null, rest); + } + assertRecoveredOnBailout(rest, true); + return 0; +} + +var uceFault_recoverSpread = eval(`(${uceFault})`.replace('uceFault', 'uceFault_recoverSpread')); +function recoverSpread(i, ...rest) { + if (uceFault_recoverSpread(i) || uceFault_recoverSpread(i)) { + return empty(...rest); + } + assertRecoveredOnBailout(rest, true); + return 0; +} + +var uceFault_recoverNewSpread = eval(`(${uceFault})`.replace('uceFault', 'uceFault_recoverNewSpread')); +function recoverNewSpread(i, ...rest) { + if (uceFault_recoverNewSpread(i) || uceFault_recoverNewSpread(i)) { + return new empty(...rest); + } + assertRecoveredOnBailout(rest, true); + return 0; +} + +var uceFault_recoverSetArgs = eval(`(${uceFault})`.replace('uceFault', 'uceFault_recoverSetArgs')); +function recoverSetArgs(i, ...rest) { + arguments[1] = "fail"; + if (uceFault_recoverSetArgs(i) || uceFault_recoverSetArgs(i)) { + // Ensure arguments[1] isn't mapped to rest[0]. + assertEq(rest[0], "ok"); + return 0; + } + assertRecoveredOnBailout(rest, true); + return 0; +} + +// Prevent compilation of the top-level +eval(`(${resumeHere})`); + +for (let i = 0; i < 100; i++) { + length(i); + lengthBail(i); + content(i, i); + contentBail(i, i); + contentExtraFormals(i, i); + contentExtraFormalsBail(i, i); + setLength(i); + setLengthBail(i); + setContent(i, i); + setContentBail(i, i); + deleteContent(i, i); + deleteContentBail(i, i); + escapes(i); + escapesBail(i); + apply(i); + applyBail(i); + applyExtraFormals(i); + applyExtraFormalsBail(i); + spread(i); + spreadBail(i); + spreadExtraFormals(i); + spreadExtraFormalsBail(i); + spreadExtraArgs(i); + spreadExtraArgsBail(i); + newSpread(i); + newSpreadBail(i); + newSpreadExtraFormals(i); + newSpreadExtraFormalsBail(i); + newSpreadExtraArgs(i); + newSpreadExtraArgsBail(i); + setArgs(i, i); + setArgsBail(i, i); + + recoverLength(i); + recoverContent(i); + recoverApply(i); + recoverSpread(i); + recoverNewSpread(i); + recoverSetArgs(i, "ok"); +} diff --git a/js/src/jit-test/tests/ion/recover-typed-array.js b/js/src/jit-test/tests/ion/recover-typed-array.js new file mode 100644 index 0000000000..9a48a2018a --- /dev/null +++ b/js/src/jit-test/tests/ion/recover-typed-array.js @@ -0,0 +1,13 @@ +function f () { + var x = new Uint8Array(4); + empty(); + assertRecoveredOnBailout(x, true); + var res = inIon(); + bailout(); + return res; +} + +function empty() { +} + +while(!f()); diff --git a/js/src/jit-test/tests/ion/regexp-clone.js b/js/src/jit-test/tests/ion/regexp-clone.js new file mode 100644 index 0000000000..2ed41967fb --- /dev/null +++ b/js/src/jit-test/tests/ion/regexp-clone.js @@ -0,0 +1,8 @@ +var i=0; +function f() { + assertEq(/^[a-z0-9\.]+$/gi.test("Foo.Bar"), true); + i++; + if (i < 100) + f(); +} +f(); diff --git a/js/src/jit-test/tests/ion/regexp-exec.js b/js/src/jit-test/tests/ion/regexp-exec.js new file mode 100644 index 0000000000..d9cec788ef --- /dev/null +++ b/js/src/jit-test/tests/ion/regexp-exec.js @@ -0,0 +1,20 @@ +// RegExp.exec -> RegExp.test optimization should use the builtin test method. +function f() { + var res = 0; + for (var i=0; i<100; i++) { + if (/a/.exec("a")) + res++; + } + assertEq(res, 100); +} +delete RegExp.prototype.test; +gc(); +f(); + +RegExp.prototype.test = function() { assertEq(0, 1); } +gc(); +f(); + +Object.defineProperty(RegExp.prototype, "test", {get: function() { assertEq(0, 1); }}); +gc(); +f(); diff --git a/js/src/jit-test/tests/ion/result-type-mutated.js b/js/src/jit-test/tests/ion/result-type-mutated.js new file mode 100644 index 0000000000..601a6d6176 --- /dev/null +++ b/js/src/jit-test/tests/ion/result-type-mutated.js @@ -0,0 +1,18 @@ +// jitcode which uses objects of one type might not be invalidated when that +// object changes type, if the object isn't accessed in any way. + +function foo(x) { + return x.f; +} + +function bar() { + with({}){} + + var a = {}; + var b = { f: a }; + foo(b); + a.__proto__ = null; + foo(b); +} + +bar(); diff --git a/js/src/jit-test/tests/ion/rinstructions-no-sse4.js b/js/src/jit-test/tests/ion/rinstructions-no-sse4.js new file mode 100644 index 0000000000..3fc764d7e2 --- /dev/null +++ b/js/src/jit-test/tests/ion/rinstructions-no-sse4.js @@ -0,0 +1,53 @@ +// |jit-test| --no-sse4; + +// This test is a fork of dce-with-rinstructions.js. It tests recover +// instructions which are only executed on pre-SSE4 processors. + +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 20); + +// Prevent the GC from cancelling Ion compilations, when we expect them to succeed +gczeal(0); + +const max = 200; + +// Check that we are able to remove the operation inside recover test +// functions (denoted by "rop..."), when we inline the first version +// of uceFault, and ensure that the bailout is correct when uceFault +// is replaced (which cause an invalidation bailout) +let uceFault = function (i) { + if (i > 98) + uceFault = function (i) { return true; }; + return false; +}; + +let uceFault_ceil_double = eval( + `(${uceFault})` + .replace('uceFault', 'uceFault_ceil_double') +); +function rceil_double(i) { + const x = Math.ceil(i + (-1 >>> 0)); + if (uceFault_ceil_double(i) || uceFault_ceil_double(i)) + assertEq(x, 99 + (-1 >>> 0)); /* = i + 2 ^ 32 - 1 */ + assertRecoveredOnBailout(x, true); + return i; +} + +let uceFault_floor_double = eval( + `(${uceFault})` + .replace('uceFault', 'uceFault_floor_double') +); +function rfloor_double(i) { + const x = Math.floor(i + (-1 >>> 0)); + if (uceFault_floor_double(i) || uceFault_floor_double(i)) + assertEq(x, 99 + (-1 >>> 0)); /* = i + 2 ^ 32 - 1 */ + assertRecoveredOnBailout(x, true); + return i; +} + +for (let j = 100 - max; j < 100; j++) { + with({}){} // Do not Ion-compile this loop. + const i = j < 2 ? (Math.abs(j) % 50) + 2 : j; + rceil_double(i); + rfloor_double(i); +} diff --git a/js/src/jit-test/tests/ion/round-float32.js b/js/src/jit-test/tests/ion/round-float32.js new file mode 100644 index 0000000000..88bc7a842e --- /dev/null +++ b/js/src/jit-test/tests/ion/round-float32.js @@ -0,0 +1,103 @@ +// Bug 1073910 +(function() { + function roundf(y) { + return Math.round(Math.fround(y)); + } + + var x = -1; + assertEq(roundf(x), x); + assertEq(roundf(x), x); + + var x = -2; + assertEq(roundf(x), x); + assertEq(roundf(x), x); + + var x = -1024; + assertEq(roundf(x), x); + + var x = -14680050; + assertEq(roundf(x), Math.fround(x)); + + var x = -8388610; + assertEq(roundf(x), Math.fround(x)); +})(); + +// Bug 1000606 +(function() { + function f() { + var d = Math.fround(0.4999999701976776); + return Math.round(d); + } + assertEq(f(), f()); + + function g() { + var c = Math.fround(8886111); + return Math.round(c); + } + assertEq(g(), g()); +})(); + +// Bug 1124485 +(function() { + function h(x) { + var y = Math.fround(x); + assertEq(y, Math.pow(y, 1)); + } + h(0); + h(2147483647); +})(); + +// Bug 1122344 +(function() { + function f() { + return Math.round(Math.fround(-13527757)); + }; + assertEq(f(), f()); +})(); + +(function() { + // Test values around -0.5 and +0.5 + var f32 = new Float32Array(1); + var i32 = new Int32Array(f32.buffer); + + function round(x) { return Math.round(x); } + function roundf(x) { return Math.round(Math.fround(x)); } + + // Warm up + round(2.5); + round(3.5); + roundf(2.5); + roundf(3.5); + + f32[0] = 0.5; + i32[0] += 1; + print('0.5+e =', f32[0]); + + var x = f32[0]; + assertEq(round(x), 1); + assertEq(roundf(x), 1); + + f32[0] = 0.5; + i32[0] -= 1; + print('0.5-e =', f32[0]); + + var x = f32[0]; + assertEq(round(x), 0); + assertEq(roundf(x), 0); + + f32[0] = -0.5; + i32[0] += 1; + print('-0.5-e =', f32[0]); + + var x = f32[0]; + assertEq(round(x), -1); + assertEq(roundf(x), -1); + + f32[0] = -0.5; + i32[0] -= 1; + print('-0.5+e =', f32[0]); + + var x = f32[0]; + assertEq(round(x), -0); + assertEq(roundf(x), -0); +})(); diff --git a/js/src/jit-test/tests/ion/scalar-replacement-oom.js b/js/src/jit-test/tests/ion/scalar-replacement-oom.js new file mode 100644 index 0000000000..32a3a2e5d5 --- /dev/null +++ b/js/src/jit-test/tests/ion/scalar-replacement-oom.js @@ -0,0 +1,22 @@ +// |jit-test| skip-if: !('oomAtAllocation' in this) + +var lfcode = new Array(); +function k(a, f_arg, b, c) { + for (var i = 0; i < 5; ++i) { + f_arg(i + a); + } +} +function t() { + var x = 2; + k(50, function(i) { + x = i; + }, 100, 200); + oomAtAllocation(101); +} + +try { + t(); + t(); +} catch(e) { + // ignore the exception +} diff --git a/js/src/jit-test/tests/ion/scripted-getter-setter.js b/js/src/jit-test/tests/ion/scripted-getter-setter.js new file mode 100644 index 0000000000..4e8842cba5 --- /dev/null +++ b/js/src/jit-test/tests/ion/scripted-getter-setter.js @@ -0,0 +1,59 @@ +if (getJitCompilerOptions()["ion.warmup.trigger"] > 50) + setJitCompilerOption("ion.warmup.trigger", 50); + +function getObjects() { + var objs = []; + + // Own scripted getter/setter. + objs.push({x: 0, get prop() { + assertJitStackInvariants(); + return ++this.x; + }, set prop(v) { + assertJitStackInvariants(); + this.x += v; + }}); + + // Scripted getter/setter on prototype. Also verify extra formal args are + // handled correctly. + function getter(a, b, c) { + assertEq(arguments.length, 0); + assertEq(a, undefined); + assertEq(b, undefined); + assertEq(c, undefined); + assertJitStackInvariants(); + bailout(); + return ++this.y; + } + function setter1(a, b) { + assertEq(arguments.length, 1); + assertEq(b, undefined); + assertJitStackInvariants(); + this.y = a; + bailout(); + return "unused"; + } + var proto = {}; + Object.defineProperty(proto, "prop", {get: getter, set: setter1}); + objs.push(Object.create(proto)); + + function setter2() { + assertEq(arguments.length, 1); + assertJitStackInvariants(); + this.y = arguments[0]; + } + proto = {}; + Object.defineProperty(proto, "prop", {get: getter, set: setter2}); + objs.push(Object.create(proto)); + return objs; +} +function f() { + var objs = getObjects(); + var res = 0; + for (var i=0; i<200; i++) { + var o = objs[i % objs.length]; + o.prop = 2; + res += o.prop; + } + assertEq(res, 7233); +} +f(); diff --git a/js/src/jit-test/tests/ion/selfhosted-too-many-args.js b/js/src/jit-test/tests/ion/selfhosted-too-many-args.js new file mode 100644 index 0000000000..120fdf12ee --- /dev/null +++ b/js/src/jit-test/tests/ion/selfhosted-too-many-args.js @@ -0,0 +1,14 @@ +// Calling self-hosted functions that use GetArgument(i) with more arguments than +// we support for inlining. +function f() { + var arr = [1, 2, 3]; + var add1 = x => x + 1; + for (var i = 0; i < 2000; i++) { + assertEq(arr.map(add1).toString(), "2,3,4"); + assertEq(arr.map(add1, 1, 2, 3).toString(), "2,3,4"); + assertEq(Reflect.get(arr, 1), 2); + assertEq(Reflect.get(arr, 1, 2), 2); + assertEq(Reflect.get(arr, 1, 2, 3, 4), 2); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/setelem-float32-typedarray-ic.js b/js/src/jit-test/tests/ion/setelem-float32-typedarray-ic.js new file mode 100644 index 0000000000..6ad44f4dce --- /dev/null +++ b/js/src/jit-test/tests/ion/setelem-float32-typedarray-ic.js @@ -0,0 +1,23 @@ +function testFloat32SetElemIC(a) { + for (var i = 0; i < a.length; i++) { + var r = Math.fround(Math.random()); + a[i] = r; + assertEq(a[i], r); + } +} + +function testCompoundClamping(a, b) { + for (var i = 0; i < a.length; i++) { + var r = Math.random(); + a[i] = b[i] = r; + assertEq(a[i], b[i]); + } +} + +testFloat32SetElemIC(new Array(2048)); +testFloat32SetElemIC(new Float64Array(2048)); +testFloat32SetElemIC(new Float32Array(2048)); + +testCompoundClamping(new Array(2048), new Array(2048)); +testCompoundClamping(new Uint8Array(2048), new Uint8Array(2048)); +testCompoundClamping(new Uint8ClampedArray(2048), new Uint8ClampedArray(2048)); diff --git a/js/src/jit-test/tests/ion/setelem-hole.js b/js/src/jit-test/tests/ion/setelem-hole.js new file mode 100644 index 0000000000..3f5333fb2e --- /dev/null +++ b/js/src/jit-test/tests/ion/setelem-hole.js @@ -0,0 +1,68 @@ +// Storing a typed value. +function test1() { + var a = []; + for (var i=0; i<130; i++) { + a[i] = i + 1; + } + return a; +} + +var arr = test1(); +assertEq(arr.length, 130); + +for (var i=0; i<130; i++) + assertEq(arr[i], i + 1); + +// Storing a Value. +function getValue(x) { + var y = x & 0x3; + if (y == 0) return null; + if (y == 1) return true; + if (y == 2) return 1.23; + if (y == 3) return Math; + assertEq(0, 1); +} +getValue(0); +getValue(1); + +function test2() { + var a = []; + for (var i=0; i<130; i++) { + a[i] = getValue(i); + } + return a; +} + +var arr = test2(); +assertEq(arr.length, 130); + +for (var i=0; i<130; i++) + assertEq(arr[i], getValue(i)); + +// Make sure the length-property is not updated if it's greater than +// the (new) initialized length. +function test3(arr, start, end) { + for (var i=start; i= 1900) { + return badRest; + } + return rest; + } + function fn(...rest) { + rest = maybeInvalidate(rest); + return add(...rest); + } + for (var i = 0; i < 4000; ++i) { + assertEq(fn(1, 2), i < 1900 ? 3 : 7); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-2a.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-2a.js new file mode 100644 index 0000000000..8f5834b813 --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-2a.js @@ -0,0 +1,37 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL no longer apply after the initial Ion +// compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b, c = 0, d = 0) { + return a + b + c + d; +} + +// The rest argument contains holes. +function test() { + function maybeInvalidate(rest) { + // Use a WithStatement to prevent Ion-inlining. This ensures any + // bailouts due to type changes don't occur in this function, but + // instead in the caller. + with ({}); + + if (i >= 1900) { + rest[3] = 4; + } + } + function fn(...rest) { + maybeInvalidate(rest); + return add(...rest); + } + for (var i = 0; i < 4000; ++i) { + assertEq(fn(1, 2), i < 1900 ? 3 : 7); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-2b.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-2b.js new file mode 100644 index 0000000000..e1d8c69496 --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-2b.js @@ -0,0 +1,37 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL no longer apply after the initial Ion +// compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b, c = 0, d = 0) { + return a + b + c + d; +} + +// The rest argument is a packed array. +function test() { + function maybeInvalidate(rest) { + // Use a WithStatement to prevent Ion-inlining. This ensures any + // bailouts due to type changes don't occur in this function, but + // instead in the caller. + with ({}); + + if (i >= 1900) { + rest.length = 3; + } + } + function fn(...rest) { + maybeInvalidate(rest); + return add(...rest); + } + for (var i = 0; i < 4000; ++i) { + assertEq(fn(1, 2), 3); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-3.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-3.js new file mode 100644 index 0000000000..e7a136f41e --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-3.js @@ -0,0 +1,40 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL no longer apply after the initial Ion +// compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// The rest argument has an own @@iterator property. +function test() { + function MyIter() { + return [3, 4][Symbol.iterator](); + } + function maybeInvalidate(rest) { + // Use a WithStatement to prevent Ion-inlining. This ensures any + // bailouts due to type changes don't occur in this function, but + // instead in the caller. + with ({}); + + if (i >= 1900) { + rest[Symbol.iterator] = MyIter; + } + } + function fn(...rest) { + maybeInvalidate(rest); + return add(...rest); + } + for (var i = 0; i < 4000; ++i) { + assertEq(fn(1, 2), i < 1900 ? 3 : 7); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-4a.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-4a.js new file mode 100644 index 0000000000..22b64f9a81 --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-4a.js @@ -0,0 +1,43 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL no longer apply after the initial Ion +// compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// The rest arguments don't share a common prototype. +function test() { + class MyArray1 extends Array { } + class MyArray2 extends Array { } + function maybeInvalidate(rest) { + // Use a WithStatement to prevent Ion-inlining. This ensures any + // bailouts due to type changes don't occur in this function, but + // instead in the caller. + with ({}); + + if (i >= 1900) { + if (i & 1) + rest = new MyArray1(3, 4); + else + rest = new MyArray2(5, 6); + } + return rest; + } + function fn(...rest) { + rest = maybeInvalidate(rest); + return add(...rest); + } + for (var i = 0; i < 4000; ++i) { + assertEq(fn(1, 2), i < 1900 ? 3 : (i & 1) ? 7 : 11); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-4b.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-4b.js new file mode 100644 index 0000000000..f533c39f3f --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-4b.js @@ -0,0 +1,39 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL no longer apply after the initial Ion +// compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// The rest argument's prototype isn't Array.prototype. +function test() { + class MyArray extends Array { } + function maybeInvalidate(rest) { + // Use a WithStatement to prevent Ion-inlining. This ensures any + // bailouts due to type changes don't occur in this function, but + // instead in the caller. + with ({}); + + if (i >= 1900) { + rest = new MyArray(3, 4); + } + return rest; + } + function fn(...rest) { + rest = maybeInvalidate(rest); + return add(...rest); + } + for (var i = 0; i < 4000; ++i) { + assertEq(fn(1, 2), i < 1900 ? 3 : 7); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-5a.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-5a.js new file mode 100644 index 0000000000..88c2683cab --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-5a.js @@ -0,0 +1,37 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL no longer apply after the initial Ion +// compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// Array.prototype's [[Prototype]] was changed, as a result all properties are marked as unknown. +function test() { + function maybeInvalidate() { + // Use a WithStatement to prevent Ion-inlining. This ensures any + // bailouts due to type changes don't occur in this function, but + // instead in the caller. + with ({}); + + if (i === 1900) { + Object.setPrototypeOf(Array.prototype, null); + } + } + function fn(...rest) { + maybeInvalidate(); + return add(...rest); + } + for (var i = 0; i < 4000; ++i) { + assertEq(fn(1, 2), 3); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-5b.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-5b.js new file mode 100644 index 0000000000..37ce077723 --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-5b.js @@ -0,0 +1,40 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL no longer apply after the initial Ion +// compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// Array.prototype[@@iterator] was modified. +function test() { + function maybeInvalidate() { + // Use a WithStatement to prevent Ion-inlining. This ensures any + // bailouts due to type changes don't occur in this function, but + // instead in the caller. + with ({}); + + if (i === 1900) { + var ArrayPrototypeIterator = Array.prototype[Symbol.iterator]; + Array.prototype[Symbol.iterator] = function() { + return ArrayPrototypeIterator.call([3, 4]); + }; + } + } + function fn(...rest) { + maybeInvalidate(); + return add(...rest); + } + for (var i = 0; i < 4000; ++i) { + assertEq(fn(1, 2), i < 1900 ? 3 : 7); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-6a.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-6a.js new file mode 100644 index 0000000000..64d96b4de8 --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-6a.js @@ -0,0 +1,38 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL no longer apply after the initial Ion +// compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// %ArrayIteratorPrototype%'s [[Prototype]] was changed, as a result all properties are marked as unknown. +function test() { + function maybeInvalidate() { + // Use a WithStatement to prevent Ion-inlining. This ensures any + // bailouts due to type changes don't occur in this function, but + // instead in the caller. + with ({}); + + if (i === 1900) { + var ArrayIteratorPrototype = Object.getPrototypeOf(Array.prototype[Symbol.iterator]()); + Object.setPrototypeOf(ArrayIteratorPrototype, null); + } + } + function fn(...rest) { + maybeInvalidate(); + return add(...rest); + } + for (var i = 0; i < 4000; ++i) { + assertEq(fn(1, 2), 3); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-6b.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-6b.js new file mode 100644 index 0000000000..a95e3f145c --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-dynamic-6b.js @@ -0,0 +1,45 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL no longer apply after the initial Ion +// compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// %ArrayIteratorPrototype%.next was modified. +function test() { + function maybeInvalidate() { + // Use a WithStatement to prevent Ion-inlining. This ensures any + // bailouts due to type changes don't occur in this function, but + // instead in the caller. + with ({}); + + if (i === 1900) { + var ArrayIteratorPrototype = Object.getPrototypeOf(Array.prototype[Symbol.iterator]()); + var ArrayIteratorPrototypeNext = ArrayIteratorPrototype.next; + ArrayIteratorPrototype.next = function() { + var res = ArrayIteratorPrototypeNext.call(this); + if (!res.done) { + res.value += 2; + } + return res; + }; + } + } + function fn(...rest) { + maybeInvalidate(); + return add(...rest); + } + for (var i = 0; i < 4000; ++i) { + assertEq(fn(1, 2), i < 1900 ? 3 : 7); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-1.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-1.js new file mode 100644 index 0000000000..bccd64c762 --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-1.js @@ -0,0 +1,33 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL can't be applied during the initial +// Ion compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// The rest argument is overwritten with a non-Array object. +function test() { + var badRest = { + *[Symbol.iterator]() { + yield 3; + yield 4; + } + }; + function fn(...rest) { + rest = badRest; + return add(...rest); + } + for (var i = 0; i < 2000; ++i) { + assertEq(fn(1, 2), 7); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-2a.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-2a.js new file mode 100644 index 0000000000..e9ec676c91 --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-2a.js @@ -0,0 +1,27 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL can't be applied during the initial +// Ion compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b, c = 0, d = 0) { + return a + b + c + d; +} + +// The rest argument contains holes. +function test() { + function fn(...rest) { + rest[3] = 4; + return add(...rest); + } + for (var i = 0; i < 2000; ++i) { + assertEq(fn(1, 2), 7); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-2b.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-2b.js new file mode 100644 index 0000000000..47e761d5a1 --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-2b.js @@ -0,0 +1,27 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL can't be applied during the initial +// Ion compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b, c = 0, d = 0) { + return a + b + c + d; +} + +// The rest argument is a packed array. +function test() { + function fn(...rest) { + rest.length = 3; + return add(...rest); + } + for (var i = 0; i < 2000; ++i) { + assertEq(fn(1, 2), 3); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-3.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-3.js new file mode 100644 index 0000000000..8bae3c19d2 --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-3.js @@ -0,0 +1,30 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL can't be applied during the initial +// Ion compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// The rest argument has an own @@iterator property. +function test() { + function MyIter() { + return [3, 4][Symbol.iterator](); + } + function fn(...rest) { + rest[Symbol.iterator] = MyIter; + return add(...rest); + } + for (var i = 0; i < 2000; ++i) { + assertEq(fn(1, 2), 7); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-4a.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-4a.js new file mode 100644 index 0000000000..d3bdb98869 --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-4a.js @@ -0,0 +1,32 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL can't be applied during the initial +// Ion compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// The rest arguments don't share a common prototype. +function test() { + class MyArray1 extends Array { } + class MyArray2 extends Array { } + function fn(...rest) { + if (i & 1) + rest = new MyArray1(3, 4); + else + rest = new MyArray2(5, 6); + return add(...rest); + } + for (var i = 0; i < 2000; ++i) { + assertEq(fn(1, 2), (i & 1) ? 7 : 11); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-4b.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-4b.js new file mode 100644 index 0000000000..bdc2acbc8e --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-4b.js @@ -0,0 +1,28 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL can't be applied during the initial +// Ion compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// The rest argument's prototype isn't Array.prototype. +function test() { + class MyArray extends Array { } + function fn(...rest) { + rest = new MyArray(3, 4); + return add(...rest); + } + for (var i = 0; i < 2000; ++i) { + assertEq(fn(1, 2), 7); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-5a.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-5a.js new file mode 100644 index 0000000000..4d5d8fec85 --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-5a.js @@ -0,0 +1,27 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL can't be applied during the initial +// Ion compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// Array.prototype's [[Prototype]] was changed, as a result all properties are marked as unknown. +function test() { + Object.setPrototypeOf(Array.prototype, null); + function fn(...rest) { + return add(...rest); + } + for (var i = 0; i < 2000; ++i) { + assertEq(fn(1, 2), 3); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-5b.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-5b.js new file mode 100644 index 0000000000..1302cfbedf --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-5b.js @@ -0,0 +1,30 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL can't be applied during the initial +// Ion compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// Array.prototype[@@iterator] was modified. +function test() { + var ArrayPrototypeIterator = Array.prototype[Symbol.iterator]; + Array.prototype[Symbol.iterator] = function() { + return ArrayPrototypeIterator.call([3, 4]); + }; + function fn(...rest) { + return add(...rest); + } + for (var i = 0; i < 2000; ++i) { + assertEq(fn(1, 2), 7); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-6a.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-6a.js new file mode 100644 index 0000000000..c23a56bed0 --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-6a.js @@ -0,0 +1,28 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL can't be applied during the initial +// Ion compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// %ArrayIteratorPrototype%'s [[Prototype]] was changed, as a result all properties are marked as unknown. +function test() { + var ArrayIteratorPrototype = Object.getPrototypeOf(Array.prototype[Symbol.iterator]()); + Object.setPrototypeOf(ArrayIteratorPrototype, null); + function fn(...rest) { + return add(...rest); + } + for (var i = 0; i < 2000; ++i) { + assertEq(fn(1, 2), 3); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-6b.js b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-6b.js new file mode 100644 index 0000000000..b666cadc3c --- /dev/null +++ b/js/src/jit-test/tests/ion/spreadcall-not-optimized-static-6b.js @@ -0,0 +1,35 @@ +// Tests when JSOP_OPTIMIZE_SPREADCALL can't be applied during the initial +// Ion compilation. + +// JSOP_OPTIMIZE_SPREADCALL can be optimised when the following conditions +// are fulfilled: +// (1) the argument is an array +// (2) the array has no hole +// (3) array[@@iterator] is not modified +// (4) the array's prototype is Array.prototype +// (5) Array.prototype[@@iterator] is not modified +// (6) %ArrayIteratorPrototype%.next is not modified + +function add(a, b) { + return a + b; +} + +// %ArrayIteratorPrototype%.next was modified. +function test() { + var ArrayIteratorPrototype = Object.getPrototypeOf(Array.prototype[Symbol.iterator]()); + var ArrayIteratorPrototypeNext = ArrayIteratorPrototype.next; + ArrayIteratorPrototype.next = function() { + var res = ArrayIteratorPrototypeNext.call(this); + if (!res.done) { + res.value += 2; + } + return res; + }; + function fn(...rest) { + return add(...rest); + } + for (var i = 0; i < 2000; ++i) { + assertEq(fn(1, 2), 7); + } +} +test(); diff --git a/js/src/jit-test/tests/ion/stack-alignment-bug1126375.js b/js/src/jit-test/tests/ion/stack-alignment-bug1126375.js new file mode 100644 index 0000000000..29c217aadc --- /dev/null +++ b/js/src/jit-test/tests/ion/stack-alignment-bug1126375.js @@ -0,0 +1,7 @@ +function entryFrame_1(d) { + assertJitStackInvariants(); +} +for (i = 0Xa; i < 40; i++) { + entryFrame_1(); +} + diff --git a/js/src/jit-test/tests/ion/stack-alignment.js b/js/src/jit-test/tests/ion/stack-alignment.js new file mode 100644 index 0000000000..0bd4ad5fba --- /dev/null +++ b/js/src/jit-test/tests/ion/stack-alignment.js @@ -0,0 +1,166 @@ +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 30); +var i; + +// Check that an entry frame is always aligned properly. +function entryFrame_1() { + assertJitStackInvariants(); +} + +// Check rectifier frames are keeping the same alignment. +function rectifierFrame_verify(a, b, c, d) { + assertJitStackInvariants(); +} + +function rectifierFrame_1(i) { + rectifierFrame_verify(); +} +function rectifierFrame_2(i) { + rectifierFrame_verify(i); +} +function rectifierFrame_3(i) { + rectifierFrame_verify(i, i); +} +function rectifierFrame_4(i) { + rectifierFrame_verify(i, i, i); +} + +// Check that an ion frame size is always aligned properly. +function gen_ionFrameSize(x, y, name) { + var locals = (new Array(x)).fill(0).map((v, i) => i); + var args = (new Array(y)).fill(0).map((v, i) => i); + + return new Function("i", + locals.map(i => "var l% = i + %;\n".replace(/%/g, i)).join("") + + name + "(" + args.map(i => "l%".replace("%", i)).join(", ") + ");\n" + + "return " + locals.map(i => "l%".replace("%", i)).join(" + ") + ";\n" + ); +} + +var ionFrameSize_0 = gen_ionFrameSize(30, 0, "assertJitStackInvariants"); +var ionFrameSize_1 = gen_ionFrameSize(31, 0, "assertJitStackInvariants"); +var ionFrameSize_2 = gen_ionFrameSize(32, 0, "assertJitStackInvariants"); +var ionFrameSize_3 = gen_ionFrameSize(33, 0, "assertJitStackInvariants"); + +function ionFrameSize_callee_verify(a, b, c, d) { + assertJitStackInvariants(); +} + +var ionFrameSize_args = []; +for (var l = 0; l < 4; l++) { + ionFrameSize_args[l] = []; + for (var a = 0; a < 4; a++) + ionFrameSize_args[l][a] = gen_ionFrameSize(30 + l, a, "ionFrameSize_callee_verify");; +} + +// Check ion frames during function apply calls with the argument vector. +function ionFrame_funApply_0() { + assertJitStackInvariants.apply(this, arguments); +} +function ionFrame_funApply_1() { + ionFrame_funApply_0.apply(this, arguments); +} + +// Check ion frames during function apply calls with an array of arguments. +function ionFrame_funApply_2() { + var arr = Array.apply(Array, arguments); + assertJitStackInvariants.apply(this, arr); +} +function ionFrame_funApply_3() { + var arr = Array.apply(Array, arguments); + ionFrame_funApply_2.apply(this, arr); +} + +// Check ion frames during function .call calls. +function ionFrame_funCall_0() { + assertJitStackInvariants.call(this); +} +function ionFrame_funCall_1(a) { + assertJitStackInvariants.call(this, a); +} +function ionFrame_funCall_2(a, b) { + assertJitStackInvariants.call(this, a, b); +} +function ionFrame_funCall_3(a, b, c) { + assertJitStackInvariants.call(this, a, b, c); +} + +function ionFrame_funCall_x0() { + ionFrame_funCall_0.call(this); +} +function ionFrame_funCall_x1(a) { + ionFrame_funCall_1.call(this, a); +} +function ionFrame_funCall_x2(a, b) { + ionFrame_funCall_2.call(this, a, b); +} +function ionFrame_funCall_x3(a, b, c) { + ionFrame_funCall_3.call(this, a, b, c); +} + +// Check ion frames during spread calls. +function ionFrame_spreadCall_0() { + var arr = Array.apply(Array, arguments); + assertJitStackInvariants(...arr); +} +function ionFrame_spreadCall_1() { + var arr = Array.apply(Array, arguments); + ionFrame_spreadCall_0(...arr); +} + + +for (i = 0; i < 40; i++) { + entryFrame_1(); + entryFrame_1(0); + entryFrame_1(0, 1); + + rectifierFrame_1(i); + rectifierFrame_2(i); + rectifierFrame_3(i); + rectifierFrame_4(i); + + ionFrameSize_0(i); + ionFrameSize_1(i); + ionFrameSize_2(i); + ionFrameSize_3(i); + + for (var l = 0; l < 4; l++) + for (var a = 0; a < 4; a++) + ionFrameSize_args[l][a](i); + + ionFrame_funApply_0(); + ionFrame_funApply_0(1); + ionFrame_funApply_0(1, 2); + ionFrame_funApply_0(1, 2, 3); + ionFrame_funApply_1(); + ionFrame_funApply_1(1); + ionFrame_funApply_1(1, 2); + ionFrame_funApply_1(1, 2, 3); + + ionFrame_funApply_2(); + ionFrame_funApply_2(1); + ionFrame_funApply_2(1, 2); + ionFrame_funApply_2(1, 2, 3); + ionFrame_funApply_3(); + ionFrame_funApply_3(1); + ionFrame_funApply_3(1, 2); + ionFrame_funApply_3(1, 2, 3); + + ionFrame_funCall_0(); + ionFrame_funCall_1(1); + ionFrame_funCall_2(1, 2); + ionFrame_funCall_3(1, 2, 3); + ionFrame_funCall_x0(); + ionFrame_funCall_x1(1); + ionFrame_funCall_x2(1, 2); + ionFrame_funCall_x3(1, 2, 3); + + ionFrame_spreadCall_0(); + ionFrame_spreadCall_0(1); + ionFrame_spreadCall_0(1, 2); + ionFrame_spreadCall_0(1, 2, 3); + ionFrame_spreadCall_1(); + ionFrame_spreadCall_1(1); + ionFrame_spreadCall_1(1, 2); + ionFrame_spreadCall_1(1, 2, 3); +} diff --git a/js/src/jit-test/tests/ion/string-compare.js b/js/src/jit-test/tests/ion/string-compare.js new file mode 100644 index 0000000000..001d0856e2 --- /dev/null +++ b/js/src/jit-test/tests/ion/string-compare.js @@ -0,0 +1,9 @@ +function f(a, b) { + return a == b; +} + +var X = "" + Math.random(); +var Y = "" + Math.random(); + +assertEq(f(X + Y, X + Y), true); + diff --git a/js/src/jit-test/tests/ion/string-concat-short.js b/js/src/jit-test/tests/ion/string-concat-short.js new file mode 100644 index 0000000000..a0108df044 --- /dev/null +++ b/js/src/jit-test/tests/ion/string-concat-short.js @@ -0,0 +1,13 @@ +function f() { + var res = 0; + for (var i=0; i<100; i++) { + var s = "test" + i; + res += s.length; + assertEq(s[0], "t"); + assertEq(s[3], "t"); + if (i > 90) + assertEq(s[4], "9"); + } + return res; +} +assertEq(f(), 590); diff --git a/js/src/jit-test/tests/ion/super-getelem-profiling.js b/js/src/jit-test/tests/ion/super-getelem-profiling.js new file mode 100644 index 0000000000..76aaf28707 --- /dev/null +++ b/js/src/jit-test/tests/ion/super-getelem-profiling.js @@ -0,0 +1,12 @@ +enableGeckoProfiling(); + +class base {} +class derived extends base { + testElem() { + super[ruin()]; + } +} +let instance = new derived(); +try { + instance.testElem(); +} catch { /* don't crash */ } diff --git a/js/src/jit-test/tests/ion/super-prop.js b/js/src/jit-test/tests/ion/super-prop.js new file mode 100644 index 0000000000..004284730f --- /dev/null +++ b/js/src/jit-test/tests/ion/super-prop.js @@ -0,0 +1,87 @@ +class Y { + a() { + assertEq(this.__proto__, X.prototype); + return 1; + } + b() { + assertEq(this.__proto__, X.prototype); + return 2; + } +} + +class X extends Y { + a() { throw "not invoked"; } + b() { + return super.a() + super.b(); + } + c(i) { + var a, b; + + if (i % 2) { + a = "a"; + b = "b" + } else { + a = "b"; + b = "a"; + } + + return super[a]() + super[b](); + } +} + +function simple() { + var x = new X(); + assertEq(x.b(), 3); + assertEq(x.c(), 3); +} + +class A { + b() { return 1;} +} +class B extends A { + a() { + assertEq(super.b(), 1); + } +} + +function nullHomeObjectSuperBase(i) { + var b = new B(); + if (i == 500) { + Object.setPrototypeOf(B.prototype, null); + // Don't crash + } + b.a(); +} + +class SArray extends Array { + constructor() { + super("a", "b"); + } + + a() { + assertEq(super.length, 0); + assertEq(this.length, 2); + + assertEq(this[0], "a"); + assertEq(this[1], "b"); + + assertEq(super[0], undefined); + assertEq(super[1], undefined); + } +} + +function array() { + var s = new SArray(); + s.a(); +} + +for (var i = 0; i < 1e4; i++) { + simple(); + array(); + + try { + nullHomeObjectSuperBase(i); + } catch (e) { + assertEq(i >= 500, true); + } +} diff --git a/js/src/jit-test/tests/ion/template-tag-callsiteobject.js b/js/src/jit-test/tests/ion/template-tag-callsiteobject.js new file mode 100644 index 0000000000..4d1cdcbf41 --- /dev/null +++ b/js/src/jit-test/tests/ion/template-tag-callsiteobject.js @@ -0,0 +1,26 @@ +function tagA(strings) { + assertEq(strings.length, 2); + assertEq(strings[0], "a"); + assertEq(strings[1], ""); +} + +function tagAB(strings) { + assertEq(strings.length, 2); + assertEq(strings[0], "a"); + assertEq(strings[1], "b"); +} + +var data = [1, 2, 3]; +function tag(strings, value1, value2) { + return strings[0] + value1 + strings[1] + value2 + strings[2]; +} + +function complex() { + return tag`${data[0]} ${data[1] + data[2]}`; +} + +for (var i = 0; i < 20; i++) { + tagA`a${0}`; + tagAB`a${0}b`; + assertEq(complex(), "1 5"); +} diff --git a/js/src/jit-test/tests/ion/test-scalar-replacement-float32.js b/js/src/jit-test/tests/ion/test-scalar-replacement-float32.js new file mode 100644 index 0000000000..3302381f14 --- /dev/null +++ b/js/src/jit-test/tests/ion/test-scalar-replacement-float32.js @@ -0,0 +1,98 @@ +setJitCompilerOption("ion.warmup.trigger", 30); +var max = 40; + +// This test case verify that even if we do some scalar replacement, we keep a +// correct computation of Float32 maths. In this case, when the object is not +// escaped, the "store" instruction are preventing any float32 optimization to +// kick-in. After Scalar Replacement, the store is removed, and the Float32 +// optimizations can avoid Double coercions. +function escape_object(o) { + if (o.e) { + print(o); + } +} + +var func = null; +var check_object_argument_func = function (i, res) { + with ({}) { /* trun off the jit for this function, do not inline */ }; + if (i == max - 1) + return funname.arguments[1].d; + return res; +}; + +var test_object_ref_check = eval(`(${check_object_argument_func})`.replace("funname", "test_object_ref")); +function test_object_ref(x, tmp) { + tmp = { + a: Math.fround(Math.pow(2 * x / max, 0)), + b: Math.fround(Math.pow(2 * x / max, 25)), + c: Math.fround(Math.pow(2 * x / max, 50)), + d: 0 + }; + + tmp.d = tmp.a + tmp.b; + assertFloat32(tmp.d, false); + escape_object(tmp); + return test_object_ref_check(x, Math.fround(tmp.c + Math.fround(tmp.d))); +} + +var test_object_check = eval(`(${check_object_argument_func})`.replace("funname", "test_object")); +function test_object(x, tmp) { + tmp = { + a: Math.fround(Math.pow(2 * x / max, 0)), + b: Math.fround(Math.pow(2 * x / max, 25)), + c: Math.fround(Math.pow(2 * x / max, 50)), + d: 0 + }; + + tmp.d = tmp.a + tmp.b; + assertFloat32(tmp.d, false); + return test_object_check(x, Math.fround(tmp.c + Math.fround(tmp.d))); +} + +// Same test with Arrays. +function escape_array(o) { + if (o.length == 0) { + print(o); + } +} + +var check_array_argument_func = function (i, res) { + with ({}) { /* trun off the jit for this function, do not inline */ }; + if (i == max - 1) { + return funname.arguments[1][3]; + } + return res; +}; + +var test_array_ref_check = eval(`(${check_array_argument_func})`.replace("funname", "test_array_ref")); +function test_array_ref(x, tmp) { + tmp = [ + Math.fround(Math.pow(2 * x / max, 0)), + Math.fround(Math.pow(2 * x / max, 25)), + Math.fround(Math.pow(2 * x / max, 50)), + 0 + ]; + tmp[3] = tmp[0] + tmp[1]; + assertFloat32(tmp[3], false); + escape_array(tmp); + return test_array_ref_check(x, Math.fround(tmp[2] + Math.fround(tmp[3]))); +} + +var test_array_check = eval(`(${check_array_argument_func})`.replace("funname", "test_array")); +function test_array(x, tmp) { + tmp = [ + Math.fround(Math.pow(2 * x / max, 0)), + Math.fround(Math.pow(2 * x / max, 25)), + Math.fround(Math.pow(2 * x / max, 50)), + 0 + ]; + tmp[3] = tmp[0] + tmp[1]; + assertFloat32(tmp[3], false); + return test_array_check(x, Math.fround(tmp[2] + Math.fround(tmp[3]))); +} + + +for (var i = 0; i < max; i++) { + assertEq(test_object_ref(i, undefined), test_object(i, undefined)); + assertEq(test_array_ref(i, undefined), test_array(i, undefined)); +} diff --git a/js/src/jit-test/tests/ion/testArrayBufferByteLength.js b/js/src/jit-test/tests/ion/testArrayBufferByteLength.js new file mode 100644 index 0000000000..bf5fc49833 --- /dev/null +++ b/js/src/jit-test/tests/ion/testArrayBufferByteLength.js @@ -0,0 +1,20 @@ +// |jit-test| --ion-warmup-threshold=50 + +var ArrayBufferByteLength = getSelfHostedValue("ArrayBufferByteLength"); + +function testBasic() { + var arr = [1, 2, 3]; + var tarr = new Int32Array(arr); + var abuf = tarr.buffer; + + var arrLength = arr.length; + var bytesPerElement = Int32Array.BYTES_PER_ELEMENT; + + var f = function() { + assertEq(ArrayBufferByteLength(abuf), arrLength * bytesPerElement); + }; + do { + f(); + } while (!inIon()); +} +testBasic(); diff --git a/js/src/jit-test/tests/ion/testFloat32-correctness.js b/js/src/jit-test/tests/ion/testFloat32-correctness.js new file mode 100644 index 0000000000..8321e6bfab --- /dev/null +++ b/js/src/jit-test/tests/ion/testFloat32-correctness.js @@ -0,0 +1,340 @@ +setJitCompilerOption("ion.warmup.trigger", 50); + +var f32 = new Float32Array(10); + +function test(setup, f) { + if (f === undefined) { + f = setup; + setup = function(){}; + } + setup(); + for(var n = 200; n; --n) { + f(); + } +} + +// Basic arithmetic +function setupBasicArith() { + f32[0] = -Infinity; + f32[1] = -1; + f32[2] = -0; + f32[3] = 0; + f32[4] = 1.337; + f32[5] = 42; + f32[6] = Infinity; + f32[7] = NaN; +} +function basicArith() { + for (var i = 0; i < 7; ++i) { + var opf = Math.fround(f32[i] + f32[i+1]); + var opd = (1 / (1 / f32[i])) + f32[i+1]; + assertFloat32(opf, true); + assertFloat32(opd, false); + assertEq(opf, Math.fround(opd)); + + opf = Math.fround(f32[i] - f32[i+1]); + opd = (1 / (1 / f32[i])) - f32[i+1]; + assertFloat32(opf, true); + assertFloat32(opd, false); + assertEq(opf, Math.fround(opd)); + + opf = Math.fround(f32[i] * f32[i+1]); + opd = (1 / (1 / f32[i])) * f32[i+1]; + assertFloat32(opf, true); + assertFloat32(opd, false); + assertEq(opf, Math.fround(opd)); + + opf = Math.fround(f32[i] / f32[i+1]); + opd = (1 / (1 / f32[i])) / f32[i+1]; + assertFloat32(opf, true); + assertFloat32(opd, false); + assertEq(opf, Math.fround(opd)); + } +} +test(setupBasicArith, basicArith); + +// MAbs +function setupAbs() { + f32[0] = -0; + f32[1] = 0; + f32[2] = -3.14159; + f32[3] = 3.14159; + f32[4] = -Infinity; + f32[5] = Infinity; + f32[6] = NaN; +} +function abs() { + for(var i = 0; i < 7; ++i) { + assertEq( Math.fround(Math.abs(f32[i])), Math.abs(f32[i]) ); + } +} +test(setupAbs, abs); + +// MSqrt +function setupSqrt() { + f32[0] = 0; + f32[1] = 1; + f32[2] = 4; + f32[3] = -1; + f32[4] = Infinity; + f32[5] = NaN; + f32[6] = 13.37; +} +function sqrt() { + for(var i = 0; i < 7; ++i) { + var sqrtf = Math.fround(Math.sqrt(f32[i])); + var sqrtd = 1 + Math.sqrt(f32[i]) - 1; // force no float32 by chaining arith ops + assertEq( sqrtf, Math.fround(sqrtd) ); + } +} +test(setupSqrt, sqrt); + +// MMinMax +function setupMinMax() { + f32[0] = -0; + f32[1] = 0; + f32[2] = 1; + f32[3] = 4; + f32[4] = -1; + f32[5] = Infinity; + f32[6] = NaN; + f32[7] = 13.37; + f32[8] = -Infinity; + f32[9] = Math.pow(2,31) - 1; +} +function minMax() { + for(var i = 0; i < 9; ++i) { + for(var j = 0; j < 9; j++) { + var minf = Math.fround(Math.min(f32[i], f32[j])); + var mind = 1 / (1 / Math.min(f32[i], f32[j])); // force no float32 by chaining arith ops + assertFloat32(minf, true); + assertFloat32(mind, false); + assertEq( minf, Math.fround(mind) ); + + var maxf = Math.fround(Math.max(f32[i], f32[j])); + var maxd = 1 / (1 / Math.max(f32[i], f32[j])); // force no float32 by chaining arith ops + assertFloat32(maxf, true); + assertFloat32(maxd, false); + assertEq( maxf, Math.fround(maxd) ); + } + } +} +test(setupMinMax, minMax); + +// MTruncateToInt32 +// The only way to get a MTruncateToInt32 with a Float32 input is to use Math.imul +function setupTruncateToInt32() { + f32[0] = -1; + f32[1] = 4; + f32[2] = 5.13; +} +function truncateToInt32() { + assertEq( Math.imul(f32[0], f32[1]), Math.imul(-1, 4) ); + assertEq( Math.imul(f32[1], f32[2]), Math.imul(4, 5) ); +} +test(setupTruncateToInt32, truncateToInt32); + +// MCompare +function comp() { + for(var i = 0; i < 9; ++i) { + assertEq( f32[i] < f32[i+1], true ); + } +} +function setupComp() { + f32[0] = -Infinity; + f32[1] = -1; + f32[2] = -0.01; + f32[3] = 0; + f32[4] = 0.01; + f32[5] = 1; + f32[6] = 10; + f32[7] = 13.37; + f32[8] = 42; + f32[9] = Infinity; +} +test(setupComp, comp); + +// MNot +function setupNot() { + f32[0] = -0; + f32[1] = 0; + f32[2] = 1; + f32[3] = NaN; + f32[4] = Infinity; + f32[5] = 42; + f32[6] = -23; +} +function not() { + assertEq( !f32[0], true ); + assertEq( !f32[1], true ); + assertEq( !f32[2], false ); + assertEq( !f32[3], true ); + assertEq( !f32[4], false ); + assertEq( !f32[5], false ); + assertEq( !f32[6], false ); +} +test(setupNot, not); + +// MToNumberInt32 +var str = "can haz cheezburger? okthxbye;"; +function setupToInt32() { + f32[0] = 0; + f32[1] = 1; + f32[2] = 2; + f32[3] = 4; + f32[4] = 5; +} +function testToInt32() { + assertEq(str[f32[0]], 'c'); + assertEq(str[f32[1]], 'a'); + assertEq(str[f32[2]], 'n'); + assertEq(str[f32[3]], 'h'); + assertEq(str[f32[4]], 'a'); +} +test(setupToInt32, testToInt32); + +function setupBailoutToInt32() { + f32[0] = .5; +} +function testBailoutToInt32() { + assertEq(typeof str[f32[0]], 'undefined'); +} +test(setupBailoutToInt32, testBailoutToInt32); + +// MMath (no trigo - see also testFloat32-trigo.js +function assertNear(a, b) { + var r = (a != a && b != b) || Math.abs(a-b) < 1e-1 || a === b; + if (!r) { + print('Precision error: '); + print(new Error().stack); + print('Got', a, ', expected near', b); + assertEq(false, true); + } +} + +function setupOtherMath() { + setupComp(); + f32[8] = 4.2; +} +function otherMath() { + for (var i = 0; i < 9; ++i) { + assertNear(Math.fround(Math.exp(f32[i])), Math.exp(f32[i])); + assertNear(Math.fround(Math.log(f32[i])), Math.log(f32[i])); + } +}; +test(setupOtherMath, otherMath); + +function setupFloor() { + f32[0] = -5.5; + f32[1] = -0.5; + f32[2] = 0; + f32[3] = 1.5; +} +function setupFloorDouble() { + f32[4] = NaN; + f32[5] = -0; + f32[6] = Infinity; + f32[7] = -Infinity; + f32[8] = Math.pow(2,31); // too big to fit into a int +} +function testFloor() { + for (var i = 0; i < 4; ++i) { + var f = Math.floor(f32[i]); + assertFloat32(f, false); // f is an int32 + + var g = Math.floor(-0 + f32[i]); + assertFloat32(g, false); + + assertEq(f, g); + } +} +function testFloorDouble() { + for (var i = 4; i < 9; ++i) { + var f = Math.fround(Math.floor(f32[i])); + assertFloat32(f, true); + + var g = Math.floor(-0 + f32[i]); + assertFloat32(g, false); + + assertEq(f, g); + } +} +test(setupFloor, testFloor); +test(setupFloorDouble, testFloorDouble); + +function setupRound() { + f32[0] = -5.5; + f32[1] = -0.6; + f32[2] = 1.5; + f32[3] = 1; +} +function setupRoundDouble() { + f32[4] = NaN; + f32[5] = -0.49; // rounded to -0 + f32[6] = Infinity; + f32[7] = -Infinity; + f32[8] = Math.pow(2,31); // too big to fit into a int + f32[9] = -0; +} +function testRound() { + for (var i = 0; i < 4; ++i) { + var r32 = Math.round(f32[i]); + assertFloat32(r32, false); // r32 is an int32 + + var r64 = Math.round(-0 + f32[i]); + assertFloat32(r64, false); + + assertEq(r32, r64); + } +} +function testRoundDouble() { + for (var i = 4; i < 10; ++i) { + var r32 = Math.fround(Math.round(f32[i])); + assertFloat32(r32, true); + + var r64 = Math.round(-0 + f32[i]); + assertFloat32(r64, false); + + assertEq(r32, r64); + } +} +test(setupRound, testRound); +test(setupRoundDouble, testRoundDouble); + +function setupCeil() { + f32[0] = -5.5; + f32[1] = -1.5; + f32[2] = 0; + f32[3] = 1.5; +} +function setupCeilDouble() { + f32[4] = NaN; + f32[5] = -0; + f32[6] = Infinity; + f32[7] = -Infinity; + f32[8] = Math.pow(2,31); // too big to fit into a int +} +function testCeil() { + for(var i = 0; i < 2; ++i) { + var f = Math.ceil(f32[i]); + assertFloat32(f, false); + + var g = Math.ceil(-0 + f32[i]); + assertFloat32(g, false); + + assertEq(f, g); + } +} +function testCeilDouble() { + for(var i = 4; i < 9; ++i) { + var f = Math.fround(Math.ceil(f32[i])); + assertFloat32(f, true); + + var g = Math.ceil(-0 + f32[i]); + assertFloat32(g, false); + + assertEq(f, g); + } +} +test(setupCeil, testCeil); +test(setupCeilDouble, testCeilDouble); diff --git a/js/src/jit-test/tests/ion/testFloat32.js b/js/src/jit-test/tests/ion/testFloat32.js new file mode 100644 index 0000000000..5d7d598bed --- /dev/null +++ b/js/src/jit-test/tests/ion/testFloat32.js @@ -0,0 +1,532 @@ +// |jit-test| --baseline-warmup-threshold=20 + +// This test checks that we are able to optimize float32 inputs. As +// GetElementIC (float32 array accesses) output is not specialized with Float32 +// output types, we should not force inline caches. +if (getJitCompilerOptions()["ion.forceinlineCaches"]) + setJitCompilerOption("ion.forceinlineCaches", 0); + +// Fuzz tests +(function(){ + // + (function(){ + var g = {}; + x = new Float32Array() + Function('g', "g.o = x[1]")(g); + })(); + // + (function() { + var g = new Float32Array(16); + var h = new Float64Array(16); + var farrays = [ g, h ]; + for (aridx = 0; aridx < farrays.length; ++aridx) { + ar = farrays[aridx]; + !(ar[ar.length-2] == (NaN / Infinity)[ar.length-2]) + } + })(); + // + (function () { + var v = new Float32Array(32); + for (var i = 0; i < v.length; ++i) + v[i] = i; + var t = (false ); + for (var i = 0; i < i .length; ++i) + t += v[i]; + })(); + // + (function() { + x = y = {}; + z = new Float32Array(6) + for (c in this) { + Array.prototype.unshift.call(x, new ArrayBuffer()) + } + Array.prototype.sort.call(x, (function (j) { + y.s = z[2] + })) + })(); + // + (function() { + // bug 1134298 + for (var k = 0; k < 1; k++) { + Math.fround(Math.ceil(Math.fround(Math.acos(3.0)))) + } + })(); +})(); +// +// ION TESTS +// +// The assertFloat32 function is deactivated in --ion-eager mode, as the first time, the function Math.fround +// would be guarded against modifications (typeguard on Math and then on fround). In this case, Math.fround is +// not inlined and the compiler will consider the return value to be a double, not a float32, making the +// assertions fail. Note that as assertFloat32 is declared unsafe for fuzzing, this can't happen in fuzzed code. +// +// To be able to test it, we still need ion compilation though. A nice solution +// is to manually lower the ion warm-up trigger. +setJitCompilerOption("ion.warmup.trigger", 50); + +function test(f) { + f32[0] = .5; + for(var n = 110; n; n--) + f(); +} + +var f32 = new Float32Array(4); +var f64 = new Float64Array(4); + +function acceptAdd() { + var use = f32[0] + 1; + assertFloat32(use, true); + f32[0] = use; +} +test(acceptAdd); + +function acceptAddSeveral() { + var sum1 = f32[0] + 0.5; + var sum2 = f32[0] + 0.5; + f32[0] = sum1; + f32[0] = sum2; + assertFloat32(sum1, true); + assertFloat32(sum2, true); +} +test(acceptAddSeveral); + +function acceptAddVar() { + var x = f32[0] + 1; + f32[0] = x; + f32[1] = x; + assertFloat32(x, true); +} +test(acceptAddVar); + +function refuseAddCst() { + var x = f32[0] + 1234567890; // this constant can't be precisely represented as a float32 + f32[0] = x; + assertFloat32(x, false); +} +test(refuseAddCst); + +function refuseAddVar() { + var x = f32[0] + 1; + f32[0] = x; + f32[1] = x; + f64[1] = x; // non consumer + assertFloat32(x, false); +} +test(refuseAddVar); + +function refuseAddStore64() { + var x = f32[0] + 1; + f64[0] = x; // non consumer + f32[0] = f64[0]; + assertFloat32(x, false); +} +test(refuseAddStore64); + +function refuseAddStoreObj() { + var o = {} + var x = f32[0] + 1; + o.x = x; // non consumer + f32[0] = o['x']; + assertFloat32(x, false); +} +test(refuseAddStoreObj); + +function refuseAddSeveral() { + var sum = (f32[0] + 2) - 1; // second addition is not a consumer + f32[0] = sum; + assertFloat32(sum, false); +} +test(refuseAddSeveral); + +function refuseAddFunctionCall() { + function plusOne(x) { return Math.cos(x+1)*13.37; } + var res = plusOne(f32[0]); // func call is not a consumer + f32[0] = res; + assertFloat32(res, false); +} +test(refuseAddFunctionCall); + +function acceptSqrt() { + var res = Math.sqrt(f32[0]); + assertFloat32(res, true); + f32[0] = res; +} +test(acceptSqrt); + +function refuseSqrt() { + var res = Math.sqrt(f32[0]); + assertFloat32(res, false); + f32[0] = res + 1; +} +test(refuseSqrt); + +function acceptMin() { + var res = Math.min(f32[0], f32[1]); + assertFloat32(res, true); + f64[0] = res; +} +test(acceptMin); + +// In theory, we could do it, as Math.min/max actually behave as a Phi (it's a +// float32 producer iff its inputs are producers, it's a consumer iff its uses +// are consumers). In practice, this would involve some overhead for big chains +// of min/max. +function refuseMinAdd() { + var res = Math.min(f32[0], f32[1]) + f32[2]; + assertFloat32(res, false); + f32[3] = res; +} +test(refuseMinAdd); + +function acceptSeveralMinMax() { + var x = Math.min(f32[0], f32[1]); + var y = Math.max(f32[2], f32[3]); + var res = Math.min(x, y); + assertFloat32(res, true); + f64[0] = res; +} +test(acceptSeveralMinMax); + +function acceptSeveralMinMax2() { + var res = Math.min(f32[0], f32[1], f32[2], f32[3]); + assertFloat32(res, true); + f64[0] = res; +} +test(acceptSeveralMinMax2); + +function partialMinMax() { + var x = Math.min(f32[0], f32[1]); + var y = Math.min(f64[0], f32[1]); + var res = Math.min(x, y); + assertFloat32(x, true); + assertFloat32(y, false); + assertFloat32(res, false); + f64[0] = res; +} +test(partialMinMax); + +function refuseSeveralMinMax() { + var res = Math.min(f32[0], f32[1] + f32[2], f32[2], f32[3]); + assertFloat32(res, false); + f64[0] = res; +} +test(refuseSeveralMinMax); + +function refuseMin() { + var res = Math.min(f32[0], 42.13 + f32[1]); + assertFloat32(res, false); + f64[0] = res; +} +test(refuseMin); + +function acceptMax() { + var res = Math.max(f32[0], f32[1]); + assertFloat32(res, true); + f64[0] = res; +} +test(acceptMax); + +function refuseMax() { + var res = Math.max(f32[0], 42.13 + f32[1]); + assertFloat32(res, false); + f64[0] = res; +} +test(refuseMax); + +function acceptAbs() { + var res = Math.abs(f32[0]); + assertFloat32(res, true); + f32[0] = res; +} +test(acceptAbs); + +function refuseAbs() { + var res = Math.abs(f32[0]); + assertFloat32(res, false); + f64[0] = res + 1; +} +test(refuseAbs); + +function acceptFilterTypeSet() { + var res = f32[0]; + if (!res) { + } else { + f32[0] = res; + assertFloat32(res, true); + } +} +test(acceptFilterTypeSet); + +function acceptFilterTypeSet2() { + var res = f32[0]; + if (!res) { + } else { + var res1 = Math.abs(res); + f32[0] = res1; + assertFloat32(res1, true); + } +} +test(acceptFilterTypeSet2); + +function refuseFilterTypeSet() { + var res = f32[0]; + if (!res) { + } else { + var res1 = Math.abs(res); + f64[0] = res1 + 1; + assertFloat32(res1, false); + } +} +test(refuseFilterTypeSet); + +function refuseTrigo() { + var res = Math.cos(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + var res = Math.sin(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + var res = Math.tan(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + var res = Math.acos(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + var res = Math.asin(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.atan(f32[0]); + f32[0] = res; + assertFloat32(res, false); +} +test(refuseTrigo); + +function acceptCeil() { + // Specialize for floating-point output. + f32[0] = NaN; + f32[1] = Infinity; + f32[2] = -0; + f32[3] = 0.5; + + var res = Math.ceil(f32[0]); + f32[0] = res; + assertFloat32(res, true); +} +test(acceptCeil); + +function acceptFloor() { + // Specialize for floating-point output. + f32[0] = NaN; + f32[1] = Infinity; + f32[2] = -0; + f32[3] = 0.5; + + var res = Math.floor(f32[0]); + f32[0] = res; + assertFloat32(res, true); +} +test(acceptFloor); + +function acceptRound() { + // Specialize for floating-point output. + f32[0] = NaN; + f32[1] = Infinity; + f32[2] = -0; + f32[3] = 0.5; + + var res = Math.round(f32[0]); + f32[0] = res; + assertFloat32(res, true); +} +test(acceptRound); + +function acceptTrunc() { + // Specialize for floating-point output. + f32[0] = NaN; + f32[1] = Infinity; + f32[2] = -0; + f32[3] = 0.5; + + var res = Math.trunc(f32[0]); + f32[0] = res; + assertFloat32(res, true); +} +test(acceptTrunc); + +function refuseMath() { + var res = Math.log(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + var res = Math.log10(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.log2(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.log1p(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.exp(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.expm1(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.cosh(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.sinh(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.tanh(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.acosh(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.asinh(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.atanh(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.cbrt(f32[0]); + f32[0] = res; + assertFloat32(res, false); + + res = Math.sign(f32[0]); + f32[0] = res; + assertFloat32(res, false); +} +test(refuseMath); + +function refuseLoop() { + var res = f32[0], + n = 10; + while (n--) { + res = res + 1; // this loop is equivalent to several additions => second addition is not a consumer + assertFloat32(res, false); + } + assertFloat32(res, false); + f32[0] = res; +} +test(refuseLoop); + +function acceptLoop() { + var res = f32[0], + n = 10; + while (n--) { + var sum = res + 1; + res = Math.fround(sum); + assertFloat32(sum, true); + } + assertFloat32(res, true); + f32[0] = res; +} +test(acceptLoop); + +function alternateCond(n) { + var x = f32[0]; + if (n > 0) { + var s1 = x + 1; + f32[0] = s1; + assertFloat32(s1, true); + } else { + var s2 = x + 1; + f64[0] = s2; // non consumer + assertFloat32(s2, false); + } +} +(function() { + f32[0] = 0; + for (var n = 110; n; n--) { + alternateCond(n % 2); + } +})(); + +function phiTest(n) { + var x = (f32[0]); + var y = n; + if (n > 0) { + x = x + 2; + assertFloat32(x, true); + } else { + if (n < -10) { + x = Math.fround(Math.sqrt(y)); + assertFloat32(x, true); + } else { + x = x - 1; + assertFloat32(x, true); + } + } + assertFloat32(x, true); + f32[0] = x; +} +(function() { + f32[0] = 0; + for (var n = 100; n; n--) { + phiTest( ((n % 3) - 1) * 15 ); + } +})(); + +function mixedPhiTest(n) { + var x = (f32[0]); + var y = n; + if (n > 0) { + x = x + 2; // non consumer because of (1) + assertFloat32(x, false); + } else { + if (n < -10) { + x = Math.fround(Math.sqrt(y)); // new producer + assertFloat32(x, true); + } else { + x = x - 1; // non consumer because of (1) + assertFloat32(x, false); + } + } + assertFloat32(x, false); + x = x + 1; // (1) non consumer + f32[0] = x; +} +(function() { + f32[0] = 0; + for (var n = 100; n; n--) { + mixedPhiTest( ((n % 3) - 1) * 15 ); + } +})(); + +function phiTest2(n) { + var x = f32[0]; + while (n >= 0) { + x = Math.fround(Math.fround(x) + 1); + assertFloat32(x, true); + if (n < 10) { + x = f32[0] + 1; + assertFloat32(x, true); + } + n = n - 1; + } +} +(function(){ + f32[0] = 0; + for (var n = 100; n > 10; n--) { + phiTest2(n); + } +})(); diff --git a/js/src/jit-test/tests/ion/testInArray.js b/js/src/jit-test/tests/ion/testInArray.js new file mode 100644 index 0000000000..8650d7d3d6 --- /dev/null +++ b/js/src/jit-test/tests/ion/testInArray.js @@ -0,0 +1,41 @@ +function test1() { + var dense = [1, 2, 3]; + var denseHoles = [1, , 3]; + var result = 0; + + for (var i = 0; i < 70; i++) { + if (i in dense) result += 1; + if (1 in dense) result += 2; + if (3 in dense) result += 3; + if (-1000 in dense) result += 4; + if (i in denseHoles) result += 5; + if (1 in denseHoles) result += 6; + } + + assertEq(result, 153); +} +test1(); + +function test2() { + var a = [1, 2, 3]; + + for (var i = 0; i < 70; i++) { + assertEq(-0 in a, true); + assertEq(Math.sqrt(4) in a, true); + assertEq(1.9 in a, false); + assertEq(NaN in a, false); + assertEq(Infinity in a, false); + } +} +test2(); + +function test3() { + var a = [1, , 3]; + + for (var i = 0; i < 70; i++) { + if (i == 60) + Object.prototype[1] = null; + assertEq(1 in a, i >= 60); + } +} +test3(); \ No newline at end of file diff --git a/js/src/jit-test/tests/ion/testIsCallable.js b/js/src/jit-test/tests/ion/testIsCallable.js new file mode 100644 index 0000000000..ace8cffa14 --- /dev/null +++ b/js/src/jit-test/tests/ion/testIsCallable.js @@ -0,0 +1,134 @@ +// |jit-test| --ion-warmup-threshold=50 + +var IsCallable = getSelfHostedValue("IsCallable"); + +function testSinglePrimitive() { + var f1 = function() { assertEq(IsCallable(undefined), false); }; + do { f1(); } while (!inIon()); + + var f2 = function() { assertEq(IsCallable(null), false); }; + do { f2(); } while (!inIon()); + + var f3 = function() { assertEq(IsCallable(true), false); }; + do { f3(); } while (!inIon()); + + var f4 = function() { assertEq(IsCallable(1), false); }; + do { f4(); } while (!inIon()); + + var f5 = function() { assertEq(IsCallable(1.2), false); }; + do { f5(); } while (!inIon()); + + var f6 = function() { assertEq(IsCallable("foo"), false); }; + do { f6(); } while (!inIon()); + + var f7 = function() { assertEq(IsCallable(Symbol.iterator), false); }; + do { f7(); } while (!inIon()); +} +testSinglePrimitive(); + +function testMixedPrimitive() { + var list = [ + undefined, + null, + true, + 1, + 1.2, + "foo", + Symbol.iterator, + ]; + + var f1 = function() { + for (let x of list) { + assertEq(IsCallable(x), false); + } + }; + do { f1(); } while (!inIon()); +} +testMixedPrimitive(); + +function testSingleObject() { + var obj = []; + var arr = []; + + var f1 = function() { assertEq(IsCallable(obj), false); }; + do { f1(); } while (!inIon()); + + var f2 = function() { assertEq(IsCallable(arr), false); }; + do { f2(); } while (!inIon()); +} +testSingleObject(); + +function testMixedPrimitiveAndObject() { + var list = [ + undefined, + null, + true, + 1, + 1.2, + "foo", + Symbol.iterator, + + {}, + [], + ]; + + var f1 = function() { + for (let x of list) { + assertEq(IsCallable(x), false); + } + }; + do { f1(); } while (!inIon()); +} +testMixedPrimitiveAndObject(); + +function testFunction() { + var f1 = function() { assertEq(IsCallable(Function), true); }; + do { f1(); } while (!inIon()); + + var f2 = function() { assertEq(IsCallable(parseInt), true); }; + do { f2(); } while (!inIon()); +} +testFunction(); + +function testProxy() { + var p1 = new Proxy({}, {}); + var f1 = function() { assertEq(IsCallable(p1), false); }; + do { f1(); } while (!inIon()); + + var p2 = new Proxy(function() {}, {}); + var f2 = function() { assertEq(IsCallable(p2), true); }; + do { f2(); } while (!inIon()); +} +testProxy(); + +function testMixed() { + var p1 = new Proxy({}, {}); + var p2 = new Proxy(function() {}, {}); + + var list = [ + [undefined, false], + [null, false], + [true, false], + [1, false], + [1.2, false], + ["foo", false], + [Symbol.iterator, false], + + [{}, false], + [[], false], + + [Function, true], + [parseInt, true], + + [p1, false], + [p2, true], + ]; + + var f1 = function() { + for (let [x, expected] of list) { + assertEq(IsCallable(x), expected); + } + }; + do { f1(); } while (!inIon()); +} +testMixed(); diff --git a/js/src/jit-test/tests/ion/testObjectHasPrototype.js b/js/src/jit-test/tests/ion/testObjectHasPrototype.js new file mode 100644 index 0000000000..0fce075c5b --- /dev/null +++ b/js/src/jit-test/tests/ion/testObjectHasPrototype.js @@ -0,0 +1,63 @@ +setJitCompilerOption("ion.warmup.trigger", 4); + +var ObjectHasPrototype = getSelfHostedValue("ObjectHasPrototype"); + +var StringProto = String.prototype; +var ObjectProto = Object.prototype; + +function testBasic() { + var f = function() { + assertEq(ObjectHasPrototype(StringProto, ObjectProto), true); + }; + for (var i = 0; i < 40; i++) { + f(); + } +} +testBasic(); + +function testProtoChange(proto) { + var f = function(expected) { + assertEq(ObjectHasPrototype(StringProto, ObjectProto), expected); + }; + var expected = true; + for (var i = 0; i < 120; i++) { + f(expected); + if (i == 40) { + Object.setPrototypeOf(StringProto, proto); + expected = false; + } + if (i == 80) { + Object.setPrototypeOf(StringProto, ObjectProto); + expected = true; + } + } +} +testProtoChange(null); +// Different singleton +testProtoChange(Function.prototype); +// native non-singleton +testProtoChange(/a/); +// non-native non-singleton +testProtoChange({}); + +var Int32ArrayProto = Int32Array.prototype; +var TypedArrayProto = Object.getPrototypeOf(Int32ArrayProto); +function testProtoProtoChange(proto) { + var f = function() { + assertEq(ObjectHasPrototype(Int32ArrayProto, TypedArrayProto), true); + }; + for (var i = 0; i < 120; i++) { + f(); + if (i == 40) + Object.setPrototypeOf(TypedArrayProto, proto); + if (i == 80) + Object.setPrototypeOf(TypedArrayProto, Object); + } +} +testProtoProtoChange(null); +// Different singleton +testProtoProtoChange(Function.prototype); +// native non-singleton +testProtoProtoChange(/a/); +// non-native non-singleton +testProtoProtoChange({}); diff --git a/js/src/jit-test/tests/ion/testPos.js b/js/src/jit-test/tests/ion/testPos.js new file mode 100644 index 0000000000..197650e9b1 --- /dev/null +++ b/js/src/jit-test/tests/ion/testPos.js @@ -0,0 +1,32 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +function f_int(x) { + return +x; +} + +function f_double(x) { + return +x; +} + +for (var i = 0; i < 1000; i++) { + assertEq(f_int(0), 0); + assertEq(f_int(1), 1); + assertEq(f_int(-1), -1); + assertEq(f_int(-2147483648), -2147483648); + assertEq(f_int(2147483647), 2147483647); +} + +for (var i = 0; i < 1000; i++) { + assertEq(f_double(0.0), 0.0); + assertEq(f_double(1.0), 1.0); + assertEq(f_double(-1.0), -1.0); + assertEq(f_double(-2.147483648), -2.147483648); + assertEq(f_double(2.147483647), 2.147483647); +} + +for (var i = 0; i < 1000; i++) { + assertEq(f_double("0.0"), 0.0); + assertEq(f_double("1.0"), 1.0); + assertEq(f_double("-1.0"), -1.0); + assertEq(f_double("-2.147483648"), -2.147483648); + assertEq(f_double("2.147483647"), 2.147483647); +} diff --git a/js/src/jit-test/tests/ion/testPossiblyWrappedArrayBufferByteLength.js b/js/src/jit-test/tests/ion/testPossiblyWrappedArrayBufferByteLength.js new file mode 100644 index 0000000000..abbff59a6f --- /dev/null +++ b/js/src/jit-test/tests/ion/testPossiblyWrappedArrayBufferByteLength.js @@ -0,0 +1,41 @@ +// |jit-test| --ion-warmup-threshold=50 + +var PossiblyWrappedArrayBufferByteLength = getSelfHostedValue("PossiblyWrappedArrayBufferByteLength"); + +function testBasic() { + var arr = [1, 2, 3]; + var tarr = new Int32Array(arr); + var abuf = tarr.buffer; + + var arrLength = arr.length; + var bytesPerElement = Int32Array.BYTES_PER_ELEMENT; + + var f = function() { + assertEq(PossiblyWrappedArrayBufferByteLength(abuf), arrLength * bytesPerElement); + }; + do { + f(); + } while (!inIon()); +} +testBasic(); + +function testWrapped() { + var g = newGlobal(); +g.eval(` +var arr = [1, 2, 3]; +var tarr = new Int32Array(arr); +var abuf = tarr.buffer; +`); + + var abuf = g.abuf; + var arrLength = g.arr.length; + var bytesPerElement = g.Int32Array.BYTES_PER_ELEMENT; + + var f = function() { + assertEq(PossiblyWrappedArrayBufferByteLength(abuf), arrLength * bytesPerElement); + }; + do { + f(); + } while (!inIon()); +} +testWrapped(); diff --git a/js/src/jit-test/tests/ion/testStringFromCodePoint.js b/js/src/jit-test/tests/ion/testStringFromCodePoint.js new file mode 100644 index 0000000000..6344e05383 --- /dev/null +++ b/js/src/jit-test/tests/ion/testStringFromCodePoint.js @@ -0,0 +1,32 @@ +// |jit-test| --ion-warmup-threshold=20 + +function testBailout() { + function f(v, r) { + for (var i = 0; i < 50; ++i) { + // Ensure DCE and LICM don't eliminate calls to fromCodePoint in + // case the input argument is not a valid code point. + if (i === 0) { + r(); + } + String.fromCodePoint(v); + String.fromCodePoint(v); + String.fromCodePoint(v); + } + } + + var result = []; + function r() { + result.push("ok"); + } + + do { + result.length = 0; + try { + f(0, r); + f(0, r); + f(0x10ffff + 1, r); + } catch (e) {} + assertEq(result.length, 3); + } while (!inIon()); +} +testBailout(); diff --git a/js/src/jit-test/tests/ion/testStringMatch.js b/js/src/jit-test/tests/ion/testStringMatch.js new file mode 100644 index 0000000000..dc5af2d80b --- /dev/null +++ b/js/src/jit-test/tests/ion/testStringMatch.js @@ -0,0 +1,71 @@ +setJitCompilerOption("ion.warmup.trigger", 4); + +function testBasic() { + var f = function() { + var result = "abc".match("b"); + assertEq(result.length, 1); + assertEq(result.index, 1); + assertEq(result[0], "b"); + }; + for (var i = 0; i < 40; i++) { + f(); + } +} +testBasic(); + +function testMod(apply, unapply) { + var f = function(applied) { + var result = "abc".match("b"); + assertEq(result.length, 1); + if (applied) { + assertEq(result[0], "mod"); + } else { + assertEq(result.index, 1); + assertEq(result[0], "b"); + } + }; + var applied = false; + for (var i = 0; i < 120; i++) { + f(applied); + if (i == 40) { + apply(); + applied = true; + } + if (i == 80) { + unapply(); + applied = false; + } + } +} +testMod(() => { + String.prototype[Symbol.match] = () => ["mod"]; +}, () => { + delete String.prototype[Symbol.match]; +}); +testMod(() => { + Object.prototype[Symbol.match] = () => ["mod"]; +}, () => { + delete Object.prototype[Symbol.match]; +}); + +testMod(() => { + Object.setPrototypeOf(String.prototype, { + [Symbol.match]: () => ["mod"] + }); +}, () => { + Object.setPrototypeOf(String.prototype, Object.prototype); +}); + +var orig_exec = RegExp.prototype.exec; +testMod(() => { + RegExp.prototype.exec = () => ["mod"]; +}, () => { + RegExp.prototype.exec = orig_exec; +}); + +var orig_match = RegExp.prototype[Symbol.match]; +testMod(() => { + RegExp.prototype[Symbol.match] = () => ["mod"]; +}, () => { + RegExp.prototype[Symbol.match] = orig_match; +}); diff --git a/js/src/jit-test/tests/ion/testSubtract.js b/js/src/jit-test/tests/ion/testSubtract.js new file mode 100644 index 0000000000..2b4389b2a8 --- /dev/null +++ b/js/src/jit-test/tests/ion/testSubtract.js @@ -0,0 +1,20 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +function f_int(x, y) { + return x - y; +} +function f_double(x, y) { + return x - y; +} + +for (var i = 0; i < 1000; i++) { + assertEq(f_int(5, 3), 2); + assertEq(f_int(3, 5), -2); + assertEq(f_int(-2147483648, 1), -2147483649); +} + + +for (var i = 0; i < 1000; i++) { + assertEq(f_double(5.5, 3.2), 2.3); + assertEq(f_double(2.5, 3.0), -0.5); +} + diff --git a/js/src/jit-test/tests/ion/testVAndBranch.js b/js/src/jit-test/tests/ion/testVAndBranch.js new file mode 100644 index 0000000000..c1fcc00e96 --- /dev/null +++ b/js/src/jit-test/tests/ion/testVAndBranch.js @@ -0,0 +1,20 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +function f(x) { + if (x) + return true; + return false; +} + +assertEq(f(NaN), false); +assertEq(f(-0), false); +assertEq(f(3.3), true); +assertEq(f(0), false); +assertEq(f(3), true); +assertEq(f("hi"), true); +assertEq(f(""), false); +assertEq(f(true), true); +assertEq(f(false), false); +assertEq(f(undefined), false); +assertEq(f({}), true); +assertEq(f(null), false); + diff --git a/js/src/jit-test/tests/ion/throw.js b/js/src/jit-test/tests/ion/throw.js new file mode 100644 index 0000000000..e81558194b --- /dev/null +++ b/js/src/jit-test/tests/ion/throw.js @@ -0,0 +1,112 @@ +function thrower1(x) { + throw x + 2; + + // Dead code, should be ignored. + throw ++x; + return x; +} +function test1() { + // If we ever inline functions containing JSOP_THROW, + // this shouldn't assert. + function f(x) { + thrower1(x + 1); + } + for (var i=0; i<11000; i++) { + try { + f(i); + assertEq(0, 1); + } catch(e) { + assertEq(e, i + 3); + } + } +} +test1(); + +// Test throwing from an uncompilable (interpreted) function. +function getException(f) { + try { + f(); + assertEq(0, 1); + } catch(e) { + return e; + } + assertEq(0, 1); +} + +function thrower2(x) { + if (x > 90) + throw x; + with ({}) {}; // Abort compilation...(?) +} +function test2() { + for (var i = 0; i < 100; i++) { + thrower2(i); + } +} +assertEq(getException(test2), 91); + +// Throwing |this| from a constructor. +function thrower3(x) { + this.x = x; + if (x > 90) + throw this; +} +function test3() { + for (var i=0; i < 100; i++) { + new thrower3(i); + } +} +assertEq(getException(test3).x, 91); + +// Throwing an exception in various loop blocks. +var count = 0; +function thrower4(x) { + throw count++; + count += 12345; // Shouldn't be executed. +} +function test4_1() { + var i = 0; + for (new thrower4(i); i < 100; i++) { + count += 2000; // Shouldn't be executed. + } +} +function test4_2() { + for (var i = 0; thrower4(i); i++) { + count += 3000; // Shouldn't be executed. + } +} +function test4_3() { + for (var i = 0; i < 100; thrower4(i)) { + count += 5; + } +} +function test4_4() { + for (var i = 0; i < 10; i++) { + if (i > 8) + thrower4(); + count += i; + } +} +for (var i = 0; i < 100; i++) { + assertEq(getException(test4_1), count-1); + assertEq(getException(test4_2), count-1); + assertEq(getException(test4_3), count-1); + assertEq(getException(test4_4), count-1); +} +assertEq(count, 4500); + +function test5() { + var res = 0; + for (var i=0; i<40; i++) { + try { + throw i; + } catch (e) { + if (e % 2) + res += e; + else + res += e * 3; + } + } + return res; +} +assertEq(test5(), 1540); diff --git a/js/src/jit-test/tests/ion/timeout-iloop.js b/js/src/jit-test/tests/ion/timeout-iloop.js new file mode 100644 index 0000000000..b704fb2d68 --- /dev/null +++ b/js/src/jit-test/tests/ion/timeout-iloop.js @@ -0,0 +1,6 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") + +timeout(1, function() { return false; }); + +function forever() { for(;;); } +forever(); diff --git a/js/src/jit-test/tests/ion/toid.js b/js/src/jit-test/tests/ion/toid.js new file mode 100644 index 0000000000..33341a5a6f --- /dev/null +++ b/js/src/jit-test/tests/ion/toid.js @@ -0,0 +1,10 @@ +function f(arr, index) { + for (var i=0; i<100; i++) { + arr[index]++; + ++arr[index]; + } +} +var arr = [1, 2, 3]; +f(arr, "1"); +f(arr, 1); +assertEq(arr[1], 402); diff --git a/js/src/jit-test/tests/ion/truncate.js b/js/src/jit-test/tests/ion/truncate.js new file mode 100644 index 0000000000..3f4d353ac0 --- /dev/null +++ b/js/src/jit-test/tests/ion/truncate.js @@ -0,0 +1,28 @@ +function f() { + var x = Math.pow(2, 31); // take it as argument if constant propagation comes in you way. + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 32 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 33 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 34 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 35 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 36 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 37 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 38 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 39 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 40 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 41 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 42 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 43 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 44 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 45 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 46 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 47 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 48 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 49 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 50 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 51 + x = x + x; assertEq((x + 1) | 0, 1); // 2 ** 52 + x = x + x; assertEq((x + 1) | 0, 0); // 2 ** 53 +} + +for (var i = 0; i <= 10_000; i++) + f(); diff --git a/js/src/jit-test/tests/ion/truncateToInt32-ool.js b/js/src/jit-test/tests/ion/truncateToInt32-ool.js new file mode 100644 index 0000000000..dd3d9c99ab --- /dev/null +++ b/js/src/jit-test/tests/ion/truncateToInt32-ool.js @@ -0,0 +1,28 @@ +function f (x) { + return x >> 0; +} + +var table = [ + [NaN, 0], + + [Infinity, 0], + [-Infinity, 0], + [0, 0], + [-0, 0], + + [15, 15], + [-15, -15], + + [0x80000000, -0x80000000], + [-0x80000000, -0x80000000], + + [0xffffffff, -1], + [-0xffffffff, 1], + + [0x7fffffff, 0x7fffffff], + [-0x7fffffff, -0x7fffffff] +] + +for (var i = 0; i < table.length; i++) { + assertEq(f(table[i][0]), table[i][1]); +} diff --git a/js/src/jit-test/tests/ion/truncateToInt32.js b/js/src/jit-test/tests/ion/truncateToInt32.js new file mode 100644 index 0000000000..462b411ad1 --- /dev/null +++ b/js/src/jit-test/tests/ion/truncateToInt32.js @@ -0,0 +1,46 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function w(y) +{ + var x = 23.5; + return x & y; +} + +function f(x, y) { + // Confuse the type analysis to not know the type of x. + var t = 3.5 + x; + t + 3.5; + return x & y; +} + +function g_bool(x, y) { + var t; + if (x + 0) + t = true; + else + t = false; + return t & y; + +} + +function g_null(x) { + return null & x; +} + +var obj = { valueOf: function () { return 5; } } + +assertEq(w(93), 21); +assertEq(g_bool(1, 3), 1); +assertEq(g_bool(0, 3), 0); +assertEq(g_null(2), 0); + +assertEq(f(1, 7), 1); +assertEq(f(true, 7), 1); +assertEq(f(false, 7), 0); +assertEq(f("3", 7), 3); +assertEq(f(obj, 7), 5); +assertEq(f(3.5, 7), 3); +assertEq(f(undefined, 7), 0); +assertEq(f(null, 7), 0); +assertEq(f(Math.NaN, 7), 0); + diff --git a/js/src/jit-test/tests/ion/try-catch-1.js b/js/src/jit-test/tests/ion/try-catch-1.js new file mode 100644 index 0000000000..33041451aa --- /dev/null +++ b/js/src/jit-test/tests/ion/try-catch-1.js @@ -0,0 +1,12 @@ +function F() { + try { + var T = {}; + throw 12; + } catch (e) { + // Don't throw. + T.x = 5; + } +} +F(); +F(); +F(); diff --git a/js/src/jit-test/tests/ion/try-catch-2.js b/js/src/jit-test/tests/ion/try-catch-2.js new file mode 100644 index 0000000000..80ed6c9e9f --- /dev/null +++ b/js/src/jit-test/tests/ion/try-catch-2.js @@ -0,0 +1,14 @@ +// Control flow does not reach end of try block, code after try statement is +// reachable by catch block. +function f() { + try { + throw 3; + } catch(e) { + } + + var res = 0; + for (var i=0; i<40; i++) + res += 2; + return res; +} +assertEq(f(), 80); diff --git a/js/src/jit-test/tests/ion/try-catch-3.js b/js/src/jit-test/tests/ion/try-catch-3.js new file mode 100644 index 0000000000..53b6babe18 --- /dev/null +++ b/js/src/jit-test/tests/ion/try-catch-3.js @@ -0,0 +1,27 @@ +// Don't fail if code after try statement is unreachable. +function f() { + try { + throw 1; + } catch(e) { + throw 5; + } + + // Unreachable. + assertEq(0, 2); + var res = 0; + for (var i=0; i<10; i++) + res += 2; + return res; +} + +var c = 0; + +for (var i=0; i<5; i++) { + try { + f(); + assertEq(0, 1); + } catch(e) { + c += e; + } +} +assertEq(c, 25); diff --git a/js/src/jit-test/tests/ion/try-catch-4.js b/js/src/jit-test/tests/ion/try-catch-4.js new file mode 100644 index 0000000000..f87a5a44e5 --- /dev/null +++ b/js/src/jit-test/tests/ion/try-catch-4.js @@ -0,0 +1,15 @@ +// Entering catch blocks via OSR is not possible (because the catch block +// is not compiled by Ion). Don't crash. +function f() { + var res = 0; + try { + throw 1; + } catch(e) { + for (var i=0; i<10; i++) { + res += 3; + } + } + + assertEq(res, 30); +} +f(); diff --git a/js/src/jit-test/tests/ion/try-catch-5.js b/js/src/jit-test/tests/ion/try-catch-5.js new file mode 100644 index 0000000000..059ce6281e --- /dev/null +++ b/js/src/jit-test/tests/ion/try-catch-5.js @@ -0,0 +1,8 @@ +function x() { + try { + do { + var { q , gen } = t; + } while(false); + } catch (e) {} +} +x(); diff --git a/js/src/jit-test/tests/ion/try-catch-6.js b/js/src/jit-test/tests/ion/try-catch-6.js new file mode 100644 index 0000000000..f0c01048a0 --- /dev/null +++ b/js/src/jit-test/tests/ion/try-catch-6.js @@ -0,0 +1,14 @@ +var o = { + valueOf: function() {} +}; +var threw = false; +function test(t) { + try { + for (x[t++] in o) {} + } catch (err) { + assertEq(t, 3.14); + threw = true; + } +} +test(3.14); +assertEq(threw, true); diff --git a/js/src/jit-test/tests/ion/try-catch-7.js b/js/src/jit-test/tests/ion/try-catch-7.js new file mode 100644 index 0000000000..ed07cfe7e1 --- /dev/null +++ b/js/src/jit-test/tests/ion/try-catch-7.js @@ -0,0 +1,10 @@ +// The second for-loop is only reachable via the catch block, which Ion +// does not compile. +for (;;) { + try { + throw 3; + } catch(e) { + break; + } +} +for (var i = 0; i < 1500; i++) {} diff --git a/js/src/jit-test/tests/ion/typed-arrays-1.js b/js/src/jit-test/tests/ion/typed-arrays-1.js new file mode 100644 index 0000000000..0bfd1f4895 --- /dev/null +++ b/js/src/jit-test/tests/ion/typed-arrays-1.js @@ -0,0 +1,101 @@ +function testInt8() { + var arr1 = new Int8Array(50); + var arr2 = new Uint8Array(50); + var arr3 = new Uint8ClampedArray(50); + + for (var i=0; i 290888255, true); + assertEq(arr1[74] < 290888257, true); + + assertEq(arr2[74] > 290888184, true); + assertEq(arr2[74] < 290888185, true); +} +testFloat(); + +function testCanonicalNaN() { + // NaN values have to be canonicalized. Otherwise, malicious scripts could + // construct arbitrary Value's (due to our NaN boxing Value representation). + var buf = new ArrayBuffer(16); + var uint32 = new Uint32Array(buf); + var f64 = new Float64Array(buf); + var f32 = new Float32Array(buf); + + // Evil: write a JSVAL_TYPE_OBJECT type tag... + uint32[0] = 0xffffff87; + uint32[1] = 0xffffff87; + + // Make sure this value is interpreted as a double. + for (var i=0; i<100; i++) { + assertEq(isNaN(f64[0]), true); + assertEq(isNaN(f32[0]), true); + } +} +testCanonicalNaN(); diff --git a/js/src/jit-test/tests/ion/typed-arrays-2.js b/js/src/jit-test/tests/ion/typed-arrays-2.js new file mode 100644 index 0000000000..1f88cb65df --- /dev/null +++ b/js/src/jit-test/tests/ion/typed-arrays-2.js @@ -0,0 +1,18 @@ +function test1() { + var arr = new Uint32Array(100); + Object.prototype[105] = true; + arr[50] = 0xffffee00; + arr[84] = 444; + + var res = 0; + for (var i=0; i<200; i++) { + res = arr[i]; + if (i == 50) + assertEq(res, 0xffffee00); + else if (i == 84) + assertEq(res, 444); + else if (i >= 100) + assertEq(res, undefined); + } +} +test1(); diff --git a/js/src/jit-test/tests/ion/typed-arrays-3.js b/js/src/jit-test/tests/ion/typed-arrays-3.js new file mode 100644 index 0000000000..74deb1ed02 --- /dev/null +++ b/js/src/jit-test/tests/ion/typed-arrays-3.js @@ -0,0 +1,65 @@ +function testClampInt() { + var values = [-255, -254, -2, -1, 0, 1, 2, 128, 254, 255, 256, 300]; + var expected = [ 0, 0, 0, 0, 0, 1, 2, 128, 254, 255, 255, 255]; + + var arr = new Uint8ClampedArray(100); + + for (var i=0; i<10; i++) { + for (var j=0; j= 2000 ? 0 : 1000); + } +} + +test(); diff --git a/js/src/jit-test/tests/ion/typedarray-static-load.js b/js/src/jit-test/tests/ion/typedarray-static-load.js new file mode 100644 index 0000000000..09a05ed2fd --- /dev/null +++ b/js/src/jit-test/tests/ion/typedarray-static-load.js @@ -0,0 +1,12 @@ +var buffer = new ArrayBuffer(512 * 1024); +var ta = new Uint8Array(buffer); + +function load() { return ta[0x1234]; } + +load(); +load(); +load(); + +detachArrayBuffer(buffer); + +load(); diff --git a/js/src/jit-test/tests/ion/typedarray-static-store.js b/js/src/jit-test/tests/ion/typedarray-static-store.js new file mode 100644 index 0000000000..98da228289 --- /dev/null +++ b/js/src/jit-test/tests/ion/typedarray-static-store.js @@ -0,0 +1,12 @@ +var buffer = new ArrayBuffer(512 * 1024); +var ta = new Uint8Array(buffer); + +function store() { ta[0x1234] = 42; } + +store(); +store(); +store(); + +detachArrayBuffer(buffer); + +store(); diff --git a/js/src/jit-test/tests/ion/typedarrayindex-const-double-representable-as-int32.js b/js/src/jit-test/tests/ion/typedarrayindex-const-double-representable-as-int32.js new file mode 100644 index 0000000000..03468621fa --- /dev/null +++ b/js/src/jit-test/tests/ion/typedarrayindex-const-double-representable-as-int32.js @@ -0,0 +1,19 @@ +function f(n) { + const ta = new Int32Array(n); + + // When the TypedArray has a zero length, accessing the element at index 0 + // should return undefined. That'll lead to using MGuardNumberToIntPtrIndex + // with supportOOB for the TypedArray index conversion. + const r = n === 0 ? undefined : 0; + + // numberToDouble always returns a double number. + const k = numberToDouble(0); + + for (var i = 0; i < 10; ++i) { + assertEq(ta[k], r); + } +} + +for (var i = 0; i < 2; ++i) { + f(i); +} diff --git a/js/src/jit-test/tests/ion/typeof.js b/js/src/jit-test/tests/ion/typeof.js new file mode 100644 index 0000000000..355609dd58 --- /dev/null +++ b/js/src/jit-test/tests/ion/typeof.js @@ -0,0 +1,16 @@ +function getType(v) { + return typeof v; +} +function f() { + for (var i=0; i<100; i++) { + assertEq(getType({}), "object"); + assertEq(getType(Math.abs), "function"); + assertEq(getType(10), "number"); + assertEq(getType(Math.PI), "number"); + assertEq(getType(true), "boolean"); + assertEq(getType(""), "string"); + assertEq(getType(null), "object"); + assertEq(getType(undefined), "undefined"); + } +} +f(); diff --git a/js/src/jit-test/tests/ion/udiv-by-constant.js b/js/src/jit-test/tests/ion/udiv-by-constant.js new file mode 100644 index 0000000000..43549cd1e7 --- /dev/null +++ b/js/src/jit-test/tests/ion/udiv-by-constant.js @@ -0,0 +1,114 @@ +function uint_seq(count) { + with({}){} + var arr = []; + var x = 0xfac83126; + while (count--) { + x ^= x << 13; + x ^= x >> 17; + x ^= x << 5; + // SpiderMonkey does not know how to represent UInt32, only Int32, and + // including any UInt32 will cause the following function to be + // de-optimized as double math. + if (x|0 > 0) + arr.push(x|0); + } + return arr; +} + +function test(name, asm, ion, int) { + with({}){} + let count = 10000; + let seq = uint_seq(count); + for (let x of seq) { + let rint = int(x); + let rasm = asm(x); + let rion = ion(x); + // console.log(name, x, rint, rasm, rion); + assertEq(rasm, rint); + assertEq(rion, rint); + } +} + +var asmdiv2 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 2)>>>0; + return z|0; + } + return f; +})() + +var plaindiv2 = function(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 2)>>>0; + return z|0; +} + +var interpdiv2 = function(x) { + with({}){}; + x = x|0; + var z = 0; + z = ((x>>>0) / 2)>>>0; + return z|0; +} + +test("div2", asmdiv2, plaindiv2, interpdiv2); + +var asmdiv5 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 5)>>>0; + return z|0; + } + return f; +})() + +var plaindiv5 = function(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 5)>>>0; + return z|0; +} + +var interpdiv5 = function(x) { + with({}){}; + x = x|0; + var z = 0; + z = ((x>>>0) / 5)>>>0; + return z|0; +} + +test("div5", asmdiv5, plaindiv5, interpdiv5); + +var asmdiv7 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 7)>>>0; + return z|0; + } + return f; +})() + +var plaindiv7 = function(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 7)>>>0; + return z|0; +} + +var interpdiv7 = function(x) { + with({}){}; + x = x|0; + var z = 0; + z = ((x>>>0) / 7)>>>0; + return z|0; +} + +test("div7", asmdiv7, plaindiv7, interpdiv7); diff --git a/js/src/jit-test/tests/ion/udiv-by-u32-constant.js b/js/src/jit-test/tests/ion/udiv-by-u32-constant.js new file mode 100644 index 0000000000..f73a6f6465 --- /dev/null +++ b/js/src/jit-test/tests/ion/udiv-by-u32-constant.js @@ -0,0 +1,110 @@ +function uint_seq(count) { + with({}){} + var arr = []; + var x = 0xfac83126; + while (count--) { + x ^= x << 13; + x ^= x >> 17; + x ^= x << 5; + arr.push(x >>> 0); + } + return arr; +} + +function test(name, asm, ion, int) { + with({}){} + let count = 10000; + let seq = uint_seq(count); + for (let x of seq) { + let rint = int(x); + let rasm = asm(x); + let rion = ion(x); + // console.log(name, x, rint, rasm, rion); + assertEq(rasm, rint); + assertEq(rion, rint); + } +} + +var asmdiv2 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 2)>>>0; + return z|0; + } + return f; +})() + +var plaindiv2 = function(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 2)>>>0; + return z|0; +} + +var interpdiv2 = function(x) { + with({}){}; + x = x|0; + var z = 0; + z = ((x>>>0) / 2)>>>0; + return z|0; +} + +test("div2", asmdiv2, plaindiv2, interpdiv2); + +var asmdiv3 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 3)>>>0; + return z|0; + } + return f; +})() + +var plaindiv3 = function(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 3)>>>0; + return z|0; +} + +var interpdiv3 = function(x) { + with({}){}; + x = x|0; + var z = 0; + z = ((x>>>0) / 3)>>>0; + return z|0; +} + +test("div3", asmdiv3, plaindiv3, interpdiv3); + +var asmdiv7 = (function(m) { + "use asm" + function f(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 7)>>>0; + return z|0; + } + return f; +})() + +var plaindiv7 = function(x) { + x = x|0; + var z = 0; + z = ((x>>>0) / 7)>>>0; + return z|0; +} + +var interpdiv7 = function(x) { + with({}){}; + x = x|0; + var z = 0; + z = ((x>>>0) / 7)>>>0; + return z|0; +} + +test("div7", asmdiv7, plaindiv7, interpdiv7); diff --git a/js/src/jit-test/tests/ion/unboxed-objects-invalidate.js b/js/src/jit-test/tests/ion/unboxed-objects-invalidate.js new file mode 100644 index 0000000000..02e27614fe --- /dev/null +++ b/js/src/jit-test/tests/ion/unboxed-objects-invalidate.js @@ -0,0 +1,16 @@ + +var a = []; +for (var i = 0; i < 2000; i++) + a.push({f:i}); + +function f() { + var total = 0; + for (var i = 0; i < a.length; i++) + total += a[i].f; + return total; +} +assertEq(f(), 1999000); + +var sub = Object.create(a[0]); + +assertEq(f(), 1999000); diff --git a/js/src/jit-test/tests/ion/ursh-sign-bug1528597.js b/js/src/jit-test/tests/ion/ursh-sign-bug1528597.js new file mode 100644 index 0000000000..2c4f8eee38 --- /dev/null +++ b/js/src/jit-test/tests/ion/ursh-sign-bug1528597.js @@ -0,0 +1,8 @@ +setJitCompilerOption('ion.enable', 1); +function g(x) { + for (let i = 0; i < 2; ++i) { + var y = x[i]; + print(y >>> y); + } +} +g([2147483649, -2147483648]); diff --git a/js/src/jit-test/tests/ion/valueToInt32.js b/js/src/jit-test/tests/ion/valueToInt32.js new file mode 100644 index 0000000000..65ad561eca --- /dev/null +++ b/js/src/jit-test/tests/ion/valueToInt32.js @@ -0,0 +1,41 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function f(x, y) { + // Confuse the type analysis to not know the type of x. + var u; + var a = x + u; + var b = x + 3; + return x + y; +} + +function g_bool(x, y) { + var t; + if (x + 0) + t = true; + else + t = false; + return t + y; + +} +function g_null(x) { + return null + x; +} + +assertEq(g_bool(1, 2), 3); +assertEq(g_bool(0, 2), 2); +assertEq(g_null(2), 2); + +// These will not bailout. +assertEq(f(Math.cos(Math.PI), 2), 1); +assertEq(f(null, 2), 2); +assertEq(f(false, 2), 2); +assertEq(f(true, 2), 3); +assertEq(f(17, 2), 19); + +// These will bailout. +assertEq(f(undefined, 2), Number.NaN); +assertEq(f("20", 2), "202"); +assertEq(f(16.3, 2), 18.3); +assertEq((1 / f(-0, -0)), -Infinity); + + diff --git a/js/src/jit-test/tests/ion/void.js b/js/src/jit-test/tests/ion/void.js new file mode 100644 index 0000000000..ce638b672f --- /dev/null +++ b/js/src/jit-test/tests/ion/void.js @@ -0,0 +1,6 @@ +function f() { + var b, c; + var a = void ( b = 5, c = 7 ); + return a; +} +assertEq(typeof f(), "undefined") diff --git a/js/src/jit-test/tests/jaeger/argumentsOptimize-1.js b/js/src/jit-test/tests/jaeger/argumentsOptimize-1.js new file mode 100644 index 0000000000..6ee2c6af14 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/argumentsOptimize-1.js @@ -0,0 +1,14 @@ + +function bar() { + foo.arguments.length = 10; +} + +function foo(x) { + var a = arguments; + var n = 0; + bar(); + assertEq(x, 5); + assertEq(a.length, 1); +} + +foo(5); diff --git a/js/src/jit-test/tests/jaeger/argumentsOptimize-2.js b/js/src/jit-test/tests/jaeger/argumentsOptimize-2.js new file mode 100644 index 0000000000..e7b1b9bd2a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/argumentsOptimize-2.js @@ -0,0 +1,27 @@ + +function foo() { + var x = 0; + for (var i = arguments.length - 1; i >= 0; i--) + x += arguments[i]; + return x; +} + +function bar() { + var x = 0; + for (var i = 0; i < arguments.length; i++) + x += arguments[i]; + return x; +} + +function baz(a,b,c,d,e) { + var x = 0; + for (var i = 0; i < arguments.length; i++) + x += arguments[i]; + return x; +} + +for (var i = 0; i < 10; i++) { + assertEq(foo(1,2,3,4,5), 15); + assertEq(bar(1,2.5,true,{valueOf:function() { return 10}},"five"), "14.5five"); + assertEq(baz(1,2,3,4,5), 15); +} diff --git a/js/src/jit-test/tests/jaeger/bug549393-1.js b/js/src/jit-test/tests/jaeger/bug549393-1.js new file mode 100644 index 0000000000..817d1255b7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug549393-1.js @@ -0,0 +1,43 @@ +// |jit-test| error: TypeError +function start() { + MAX_TOTAL_TIME = startTime = new Date + do { + if (rnd(0)) return (a[rnd()])() + lastTime = new Date + } while ( lastTime - startTime < MAX_TOTAL_TIME ) +} +function MersenneTwister19937() { + this.init_genrand = function() { + for (mti = 1; mti < 4; mti++) { + Array[mti] = 1 + } + }; + this.genrand_int32_t = function() { + if (mti > 4) { + mti = 0 + } + return Array[mti++]; + } +} (function() { + fuzzMT = new MersenneTwister19937; + fuzzMT.init_genrand() + rnd = function() { + return Math.floor(fuzzMT.genrand_int32()) + } +} ()) +function weighted(wa) { + a = [] + for (i = 0; i < wa.length; ++i) { + for (var j = 0; j < 8; ++j) { + a.push(wa[i].fun) + } + } +} +statementMakers = weighted([{ + fun: function makeMixedTypeArray() { [[, , , , , , , , , , , , , , , , , , , +, , , , , ""][(a[rnd()])()]]} +}]) +start() + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug549393-2.js b/js/src/jit-test/tests/jaeger/bug549393-2.js new file mode 100644 index 0000000000..6c902ca179 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug549393-2.js @@ -0,0 +1,10 @@ +(function () { + for (var q = 0; q < 6; ++q) { + x: (function () { + var m = (function () {})() + })([0, , 0, 0, 0, , 0, 0, 0, , 0, 0, 0, , 0, 0, 0, 0, 0, 0, Number(1)]) + } +})() + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug549396.js b/js/src/jit-test/tests/jaeger/bug549396.js new file mode 100644 index 0000000000..f0d61475b7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug549396.js @@ -0,0 +1 @@ +x = this.__defineSetter__("x", function(z) { return function() { z }; }) diff --git a/js/src/jit-test/tests/jaeger/bug549398.js b/js/src/jit-test/tests/jaeger/bug549398.js new file mode 100644 index 0000000000..7e18e43d77 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug549398.js @@ -0,0 +1,10 @@ +(function () { + eval("\ + for(var z = 0 ; z < 2 ; ++z) {\ + this\ + }\ + ", ([1,2,3])) +})() + +/* Don't crash. */ + diff --git a/js/src/jit-test/tests/jaeger/bug549521.js b/js/src/jit-test/tests/jaeger/bug549521.js new file mode 100644 index 0000000000..f7eeee8fae --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug549521.js @@ -0,0 +1,13 @@ +function f(y) { + if (y) + return; + { + let x; + for (;;) {} + } +} + + +/* Don't assert. */ +f(1); + diff --git a/js/src/jit-test/tests/jaeger/bug549602.js b/js/src/jit-test/tests/jaeger/bug549602.js new file mode 100644 index 0000000000..11797bd3b4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug549602.js @@ -0,0 +1,30 @@ +function f1(code) { + var c + var t = code.replace(/s/, "") + var f = new Function(code) + var o + e = v = f2(f, c) +} +function f2(f, e) { + try { + a = f() + } catch(r) { + var r = g() + } +} +g1 = [{ + text: "(function sum_slicing(array){return array==0?0:a+sum_slicing(array.slice(1))})", + test: function (f) { + f([, 2]) == "" + } +}]; +(function () { + for (var i = 0; i < g1.length; ++i) { + var a = g1[i] + var text = a.text + var f = eval(text.replace(/@/, "")) + if (a.test(f)) {} + } +}()) +f1("for(let a=0;a<6;a++){print([\"\"].some(function(){false>\"\"}))}") + diff --git a/js/src/jit-test/tests/jaeger/bug549603.js b/js/src/jit-test/tests/jaeger/bug549603.js new file mode 100644 index 0000000000..5d5dea67d7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug549603.js @@ -0,0 +1,3 @@ +// |jit-test| error: ReferenceError +x ? o : [] && x + diff --git a/js/src/jit-test/tests/jaeger/bug550490.js b/js/src/jit-test/tests/jaeger/bug550490.js new file mode 100644 index 0000000000..f4348067c8 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug550490.js @@ -0,0 +1,14 @@ + +function a() { + function f() {} + this.d = function() { + f + } +} (function() { + var a2, x + a2 = new a; + d = (function(){x * 1})(); +})() + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug551603.js b/js/src/jit-test/tests/jaeger/bug551603.js new file mode 100644 index 0000000000..019408e270 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug551603.js @@ -0,0 +1,8 @@ +(function() { + ((function f(a) { + if (a > 0) { + f(a - 1) + } + })(6)) +})() + diff --git a/js/src/jit-test/tests/jaeger/bug553784.js b/js/src/jit-test/tests/jaeger/bug553784.js new file mode 100644 index 0000000000..85a298f4b1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug553784.js @@ -0,0 +1,18 @@ +// |jit-test| allow-oom +(function(){ + (x)=[1,2,3] +})() +try{ + (function(){ + ((function a(aaaaaa,bbbbbb){ + if(aaaaaa.length==bbbbbb){ + return eval%bbbbbb.valueOf() + } + cccccc=a(aaaaaa,bbbbbb+1) + return cccccc._=x + })([,,,,,,,,,,,,,,,,,,0],0)) + })() +}catch(e){} + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug554580-3.js b/js/src/jit-test/tests/jaeger/bug554580-3.js new file mode 100644 index 0000000000..7728e5adf7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug554580-3.js @@ -0,0 +1,11 @@ +// |jit-test| error: TypeError +Function("\n\ + for (a = 0; a < 3; a++) {\n\ + if (a == 0) {} else {\n\ + this.__defineSetter__(\"\",1)\n\ + }\n\ + }\n\ +")() + +/* Don't crash/assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug554580-5.js b/js/src/jit-test/tests/jaeger/bug554580-5.js new file mode 100644 index 0000000000..1d3ee522b0 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug554580-5.js @@ -0,0 +1,20 @@ +(function() { + (function g(m, n) { + if (m = n) { + return eval("x=this") + } + g(m, 1)[[]] + })() +})() +Function("\ + for (let b in [0]) {\ + for (var k = 0; k < 6; ++k) {\ + if (k == 1) {\ + print(x)\ + }\ + }\ + }\ +")() + +/* Don't crash/assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug554651.js b/js/src/jit-test/tests/jaeger/bug554651.js new file mode 100644 index 0000000000..23be34d793 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug554651.js @@ -0,0 +1,15 @@ +// |jit-test| error: InternalError +(function() { + try { + (Function("this.__defineGetter__(\"x\",(Function(\"for(z=0;z<6;z++)(x)\")))"))() + } catch(e) {} +})() +((function f(d, aaaaaa) { + if (bbbbbb = aaaaaa) { + x + } + f(bbbbbb, aaaaaa + 1) +})([], 0)) + +/* Don't assert (32-bit mac only, relies on very specific stack usage). */ + diff --git a/js/src/jit-test/tests/jaeger/bug554675-1.js b/js/src/jit-test/tests/jaeger/bug554675-1.js new file mode 100644 index 0000000000..2dcbae8113 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug554675-1.js @@ -0,0 +1,8 @@ +(function() { + for (e in [0, 0]) { + if (/x/ < this) {} + } +})() + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug555155.js b/js/src/jit-test/tests/jaeger/bug555155.js new file mode 100644 index 0000000000..db7b57aa1b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug555155.js @@ -0,0 +1,12 @@ +// |jit-test| error: undefined +(function() { + throw (function f(a, b) { + if (a.h == b) { + return eval("((function(){return 1})())!=this") + } + f(b) + })([], 0) +})() + +/* Don't assert/crash. */ + diff --git a/js/src/jit-test/tests/jaeger/bug555206.js b/js/src/jit-test/tests/jaeger/bug555206.js new file mode 100644 index 0000000000..e99eb75606 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug555206.js @@ -0,0 +1,4 @@ +// |jit-test| error: TypeError +__defineGetter__("x", function() { return /a/.exec(undefined); } ); +" ".replace(/\s/,""); +x.b diff --git a/js/src/jit-test/tests/jaeger/bug557070.js b/js/src/jit-test/tests/jaeger/bug557070.js new file mode 100644 index 0000000000..a3e08cc910 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug557070.js @@ -0,0 +1,6 @@ +// |jit-test| error: InternalError + +for (e in (function x() { [eval()].some(x) } ())); + +/* Don't crash or assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug557075.js b/js/src/jit-test/tests/jaeger/bug557075.js new file mode 100644 index 0000000000..264924a157 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug557075.js @@ -0,0 +1,8 @@ +// |jit-test| error: TypeError + +for (l in [Math.h.h.h.h.h.I.h.h.h.h.h.h.h.I.h.I]) { + t.x +} + +/* Don't crash or assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug560221.js b/js/src/jit-test/tests/jaeger/bug560221.js new file mode 100644 index 0000000000..4cba9500dd --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug560221.js @@ -0,0 +1,13 @@ +try { + (function() { + (Object.defineProperty(this, "x", ({ + set: function() {} + }))) + })() +} catch(e) {} +for (var a = 0; a < 4; a++) { + x = 7 +} + +/* Don't bogus assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug563000/eif-call-newvar.js b/js/src/jit-test/tests/jaeger/bug563000/eif-call-newvar.js new file mode 100644 index 0000000000..635b5bb99f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug563000/eif-call-newvar.js @@ -0,0 +1,12 @@ +load(libdir + "evalInFrame.js"); + +function callee() { + evalInFrame(1, "var x = 'success'"); +} +function caller(code) { + eval(code); + callee(); + return x; +} +assertEq(caller('var y = "ignominy"'), "success"); +assertEq(typeof x, "undefined"); diff --git a/js/src/jit-test/tests/jaeger/bug563000/eif-call-typechange.js b/js/src/jit-test/tests/jaeger/bug563000/eif-call-typechange.js new file mode 100644 index 0000000000..486659a336 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug563000/eif-call-typechange.js @@ -0,0 +1,11 @@ +load(libdir + "evalInFrame.js"); + +function callee() { + evalInFrame(1, "x = 'success'"); +} +function caller() { + var x = ({ dana : "zuul" }); + callee(); + return x; +} +assertEq(caller(), "success"); diff --git a/js/src/jit-test/tests/jaeger/bug563000/eif-call.js b/js/src/jit-test/tests/jaeger/bug563000/eif-call.js new file mode 100644 index 0000000000..eff548c8b5 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug563000/eif-call.js @@ -0,0 +1,11 @@ +load(libdir + "evalInFrame.js"); + +function callee() { + evalInFrame(1, "x = 'success'"); +} +function caller() { + var x = "failure"; + callee(); + return x; +} +assertEq(caller(), "success"); diff --git a/js/src/jit-test/tests/jaeger/bug563000/eif-getter-newvar.js b/js/src/jit-test/tests/jaeger/bug563000/eif-getter-newvar.js new file mode 100644 index 0000000000..87e6923401 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug563000/eif-getter-newvar.js @@ -0,0 +1,9 @@ +load(libdir + "evalInFrame.js"); + +this.__defineGetter__("someProperty", function () { evalInFrame(1, "var x = 'success'"); }); +function caller(obj) { + var x = 'ignominy'; + obj.someProperty; + return x; +} +assertEq(caller(this), "success"); diff --git a/js/src/jit-test/tests/jaeger/bug563000/eif-getter-typechange.js b/js/src/jit-test/tests/jaeger/bug563000/eif-getter-typechange.js new file mode 100644 index 0000000000..067ec4dcda --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug563000/eif-getter-typechange.js @@ -0,0 +1,9 @@ +load(libdir + "evalInFrame.js"); + +this.__defineGetter__("someProperty", function () { evalInFrame(1, "var x = 'success'"); }); +function caller(obj) { + var x = ({ dana : 'zuul' }); + obj.someProperty; + return x; +} +assertEq(caller(this), "success"); diff --git a/js/src/jit-test/tests/jaeger/bug563000/eif-getter.js b/js/src/jit-test/tests/jaeger/bug563000/eif-getter.js new file mode 100644 index 0000000000..e64492ce47 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug563000/eif-getter.js @@ -0,0 +1,9 @@ +load(libdir + "evalInFrame.js"); + +this.__defineGetter__("someProperty", function () { evalInFrame(1, "x = 'success'"); }); +function caller(obj) { + var x = "failure"; + obj.someProperty; + return x; +} +assertEq(caller(this), "success"); diff --git a/js/src/jit-test/tests/jaeger/bug563000/eif-global-newvar.js b/js/src/jit-test/tests/jaeger/bug563000/eif-global-newvar.js new file mode 100644 index 0000000000..eb5ed0adff --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug563000/eif-global-newvar.js @@ -0,0 +1,7 @@ +load(libdir + "evalInFrame.js"); + +function callee() { + evalInFrame(1, "var x = 'success'"); +} +callee(); +assertEq(x, "success"); diff --git a/js/src/jit-test/tests/jaeger/bug565198.js b/js/src/jit-test/tests/jaeger/bug565198.js new file mode 100644 index 0000000000..1ecf6c8ef4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug565198.js @@ -0,0 +1,6 @@ +const X = 12; + +eval("switch (X) { case X: print(); }"); + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug566022.js b/js/src/jit-test/tests/jaeger/bug566022.js new file mode 100644 index 0000000000..5bd055808b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug566022.js @@ -0,0 +1,8 @@ +function f() { + var a; + var o = { valueOf: function () { x = 99; return x; } }; + var x = 2; + return [x, o + x, x] +} +assertEq(f().join(", "), "2, 101, 99"); + diff --git a/js/src/jit-test/tests/jaeger/bug573433.js b/js/src/jit-test/tests/jaeger/bug573433.js new file mode 100644 index 0000000000..aa39022bb7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug573433.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError +function f() { + eval("(function() \n{\nfor(x in[])\n{}\n})"); + ("")() +} +f() + diff --git a/js/src/jit-test/tests/jaeger/bug576398.js b/js/src/jit-test/tests/jaeger/bug576398.js new file mode 100644 index 0000000000..82e2caaab3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug576398.js @@ -0,0 +1,10 @@ +function K(x) { + with ({}); // prevent compilation + this.x = x; +} +function f() { + var a = new K(1); + var b = new K(2); + return (a == b); +} +assertEq(f(), false); diff --git a/js/src/jit-test/tests/jaeger/bug577580.js b/js/src/jit-test/tests/jaeger/bug577580.js new file mode 100644 index 0000000000..6812a7da48 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug577580.js @@ -0,0 +1,7 @@ +// |jit-test| error: ReferenceError +(function() { + for (; i;) { + eval(/@/, "") + } +})() + diff --git a/js/src/jit-test/tests/jaeger/bug577646.js b/js/src/jit-test/tests/jaeger/bug577646.js new file mode 100644 index 0000000000..659354c8b5 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug577646.js @@ -0,0 +1,5 @@ +try { + [](); +} catch(e) {} + +/* Don't crash. */ diff --git a/js/src/jit-test/tests/jaeger/bug577705.js b/js/src/jit-test/tests/jaeger/bug577705.js new file mode 100644 index 0000000000..e9e338130e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug577705.js @@ -0,0 +1,65 @@ +// |jit-test| error: ReferenceError +function f1() { + N = 62; + mt = Array + function g1(n1) { + return n1 < 0 ? (1 ^ 21) + 21: n1 + } + function g2(n1, n2) { + return g1(n1 + n2 & 4294967295); + } + function g3(n1, n2) { + sum = 0; + for (var i = 0; i < 32; ++i) { + if (n1 >> i) { + sum = g2(sum, g1(n2)) + } + } + return sum + } + this.h1 = function() { + for (mti = 1; mti < N; mti++) { + mt[mti] = g2(g3(3, g1(mt[mti - 1] ^ 0)), mti) + } + }; + this.i2 = function() { + if (mti > N) { + mti = 0; + } + y = mt[mti++]; + return y + }; + this.i1 = function() { + return (this.i2() + 5) * 2e-10 + }; +} (function() { + fuzzMT = new f1; + fuzzMT.h1(9); + rnd = function(n) { + return Math.floor(fuzzMT.i1() * n) + }; +} ()); +function f5(a) { + return a[rnd(a.length)] +} +function f2(d, b) { + f3(d, b); + return "" + f2(2, b) + ""; +} +function f3(d, b) { + if (rnd(4) == 1) { + f5(f4)(d, b) + } +} +var f4 = [function() { ["", f6(), ""] +}]; +function f6(db) { + return f5(foo)(); +} +var foo = [function() { + t(["", "", "", "", "", "", "", "", "", "", "", "" + h.I, ""]); +}]; +f2() + +/* Don't assert or crash. */ + diff --git a/js/src/jit-test/tests/jaeger/bug580712.js b/js/src/jit-test/tests/jaeger/bug580712.js new file mode 100644 index 0000000000..aabb5f5f01 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug580712.js @@ -0,0 +1 @@ +--''.trimLeft diff --git a/js/src/jit-test/tests/jaeger/bug580884-3.js b/js/src/jit-test/tests/jaeger/bug580884-3.js new file mode 100644 index 0000000000..fb22882b10 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug580884-3.js @@ -0,0 +1,10 @@ +function testDestructuring() { + eval(); + var t = 0; + for (var i = 0; i < 9; ++i) { + var [r, g, b] = [1, 1, 1]; + t += r + g + b; + } + return t +} +assertEq(testDestructuring(), (9) * 3); diff --git a/js/src/jit-test/tests/jaeger/bug580884.js b/js/src/jit-test/tests/jaeger/bug580884.js new file mode 100644 index 0000000000..b7a26f7056 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug580884.js @@ -0,0 +1,8 @@ +// |jit-test| error: ReferenceError +for (let a in [0]) +a = e +for (let a in [0]) +(function () { + a +}) + diff --git a/js/src/jit-test/tests/jaeger/bug580931-2.js b/js/src/jit-test/tests/jaeger/bug580931-2.js new file mode 100644 index 0000000000..9f18f57e02 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug580931-2.js @@ -0,0 +1,4 @@ +// |jit-test| error: TypeError +x = 0 +'a'.replace(/a/, x.toLocaleString) + diff --git a/js/src/jit-test/tests/jaeger/bug581871.js b/js/src/jit-test/tests/jaeger/bug581871.js new file mode 100644 index 0000000000..6b22dd5963 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug581871.js @@ -0,0 +1,10 @@ +function test(p) { + var alwaysFalse = p && !p; + var k = []; + var g; + if (!alwaysFalse) { + k[0] = g = alwaysFalse ? "failure" : "success"; + return g; + } +} +assertEq(test("anything"), "success"); diff --git a/js/src/jit-test/tests/jaeger/bug581936.js b/js/src/jit-test/tests/jaeger/bug581936.js new file mode 100644 index 0000000000..5b4e4f1e8e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug581936.js @@ -0,0 +1,12 @@ +function returnZero() { return 0; } +function test() { + var a = "a"; + var b = "b"; + if (returnZero()) { + return a + b; + } else { + return b + a; + } +} +assertEq(test(), "ba"); + diff --git a/js/src/jit-test/tests/jaeger/bug582185.js b/js/src/jit-test/tests/jaeger/bug582185.js new file mode 100644 index 0000000000..38d1c4219f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug582185.js @@ -0,0 +1,3 @@ +let c = (this != 4.2); + +/* Don't assert. */ diff --git a/js/src/jit-test/tests/jaeger/bug582286.js b/js/src/jit-test/tests/jaeger/bug582286.js new file mode 100644 index 0000000000..094366a3c7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug582286.js @@ -0,0 +1,3 @@ +evalcx("function s(){}",evalcx('lazy')) + + diff --git a/js/src/jit-test/tests/jaeger/bug582392.js b/js/src/jit-test/tests/jaeger/bug582392.js new file mode 100644 index 0000000000..ad60d3f5b1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug582392.js @@ -0,0 +1,8 @@ +function cmp(x, y) { + if (x < y) + return -1; + if (x > y) + return 1; + return 0; +} +assertEq(cmp('true', 'false'), 1); diff --git a/js/src/jit-test/tests/jaeger/bug582880.js b/js/src/jit-test/tests/jaeger/bug582880.js new file mode 100644 index 0000000000..9d77df1f57 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug582880.js @@ -0,0 +1,8 @@ +x = (function() {}) +(function () { + function a() {} + a([7].some(gc)) +}()) + +/* Don't crash or assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug582882.js b/js/src/jit-test/tests/jaeger/bug582882.js new file mode 100644 index 0000000000..2fafca5f43 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug582882.js @@ -0,0 +1,11 @@ +// |jit-test| error: ReferenceError +function f1(code) { + f = Function(code) + f2() +} +function f2() { + f() +} +f1("d=this.__defineGetter__(\"x\",gc)") +f1("b(x&=w);function b(){}") + diff --git a/js/src/jit-test/tests/jaeger/bug582884.js b/js/src/jit-test/tests/jaeger/bug582884.js new file mode 100644 index 0000000000..3d5d9954ef --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug582884.js @@ -0,0 +1,7 @@ +(function () { + x ^ x++ + var x +})() + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug582897.js b/js/src/jit-test/tests/jaeger/bug582897.js new file mode 100644 index 0000000000..0c8dbc9b08 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug582897.js @@ -0,0 +1,7 @@ +{ + let x; + x + x-- +} + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug582898.js b/js/src/jit-test/tests/jaeger/bug582898.js new file mode 100644 index 0000000000..7296b3d6e7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug582898.js @@ -0,0 +1,7 @@ +{ + let x = ""; + x++ + assertEq(x, 1); +} + +/* Test no assert. */ diff --git a/js/src/jit-test/tests/jaeger/bug582900.js b/js/src/jit-test/tests/jaeger/bug582900.js new file mode 100644 index 0000000000..1da55397af --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug582900.js @@ -0,0 +1,3 @@ +// |jit-test| error: ReferenceError + +[].x >>= a | 0 diff --git a/js/src/jit-test/tests/jaeger/bug583158.js b/js/src/jit-test/tests/jaeger/bug583158.js new file mode 100644 index 0000000000..6d8c124487 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug583158.js @@ -0,0 +1,9 @@ +// |jit-test| error: ReferenceError +function g() { + var rv = (function() { + this << 1 + })() + if (a) (function() {}) +} +g() + diff --git a/js/src/jit-test/tests/jaeger/bug583160.js b/js/src/jit-test/tests/jaeger/bug583160.js new file mode 100644 index 0000000000..928f588cda --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug583160.js @@ -0,0 +1,10 @@ +(function() { + for (a in []) { + (function() {}) + ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +h.I]) + } +})() + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug583672.js b/js/src/jit-test/tests/jaeger/bug583672.js new file mode 100644 index 0000000000..6280fa470e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug583672.js @@ -0,0 +1,30 @@ +(function () { + function f() + { + this.y = w + this.y = (void 0) + Object + } + for (a in [0, 0, 0, 0]) + { + new f + } + var w = {} +})() + +/* Make sure that MICs don't have the same bug. */ +x = Object(); +(function () { + function f() + { + x = w + x = (void 0) + Object + } + for (a in [0, 0, 0, 0]) + { + new f + } + var w = {} +})() +/* Don't assert. */ diff --git a/js/src/jit-test/tests/jaeger/bug583688.js b/js/src/jit-test/tests/jaeger/bug583688.js new file mode 100644 index 0000000000..c13f616021 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug583688.js @@ -0,0 +1,10 @@ +// |jit-test| error: ReferenceError +this.__defineSetter__("x", function () {}) +try { + this.__defineGetter__("d", (Function("x"))) +} catch (e) {} +d +print(delete x) +throw d + + diff --git a/js/src/jit-test/tests/jaeger/bug583689.js b/js/src/jit-test/tests/jaeger/bug583689.js new file mode 100644 index 0000000000..edb3248ea9 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug583689.js @@ -0,0 +1,7 @@ +function f() { + if (-[]) delete y +} +for (c in [0, 0, 0, 0]) { + new f +} + diff --git a/js/src/jit-test/tests/jaeger/bug584646.js b/js/src/jit-test/tests/jaeger/bug584646.js new file mode 100644 index 0000000000..566739245d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug584646.js @@ -0,0 +1,7 @@ +switch (0) { + case 2: + k; + case (-1): + case 2: +} +/* Don't assert. */ diff --git a/js/src/jit-test/tests/jaeger/bug584647.js b/js/src/jit-test/tests/jaeger/bug584647.js new file mode 100644 index 0000000000..7f0e659848 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug584647.js @@ -0,0 +1,2 @@ +(function(){for(j=0;j<3;++j)NaN=42})(); +assertEq(NaN != NaN, true); diff --git a/js/src/jit-test/tests/jaeger/bug585341.js b/js/src/jit-test/tests/jaeger/bug585341.js new file mode 100644 index 0000000000..7c192029b8 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug585341.js @@ -0,0 +1,6 @@ +this.__defineGetter__("x", () => new Float64Array()) +Function("\ + with(this) {\ + eval(\"x\")\ + }\ +")() diff --git a/js/src/jit-test/tests/jaeger/bug585391.js b/js/src/jit-test/tests/jaeger/bug585391.js new file mode 100644 index 0000000000..28f969cf15 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug585391.js @@ -0,0 +1,11 @@ +var x = (function () { + return [, , ] +}()); +(function () { + while (x > 7 & 0) { + return + } +}()) + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug585408-2.js b/js/src/jit-test/tests/jaeger/bug585408-2.js new file mode 100644 index 0000000000..b77f1a9844 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug585408-2.js @@ -0,0 +1,6 @@ +for (let c in []) { + c << c++ +} + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug585408-3.js b/js/src/jit-test/tests/jaeger/bug585408-3.js new file mode 100644 index 0000000000..9359abad83 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug585408-3.js @@ -0,0 +1,7 @@ +(function() { + function a() {} + a > a-- +})() + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug585408.js b/js/src/jit-test/tests/jaeger/bug585408.js new file mode 100644 index 0000000000..118f219e33 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug585408.js @@ -0,0 +1,7 @@ +(function() { + function a() {} + a.e = a++ +})() + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug585540.js b/js/src/jit-test/tests/jaeger/bug585540.js new file mode 100644 index 0000000000..0fae459e02 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug585540.js @@ -0,0 +1,13 @@ +try { + (function () { + gczeal(2)() + })() +} catch (e) {} +(function () { + for (y in [/x/, Boolean, Boolean, 0, Boolean]) { + [Math.floor(this)].some(function () {}) + } +})() + +/* Don't crash. */ + diff --git a/js/src/jit-test/tests/jaeger/bug587431.js b/js/src/jit-test/tests/jaeger/bug587431.js new file mode 100644 index 0000000000..bfad85776c --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug587431.js @@ -0,0 +1,29 @@ +function g() { + var UPPER_MASK = 2147483648 + var mt = new Array + function f1(n1) { + return n1 < 0 ? (n1 ^ UPPER_MASK) + UPPER_MASK: n1 + } + function f2(n1, n2) { + return f1(n1 + n2 & 4294967295) + } + function f3(n1, n2) { + var sum + for (var i = 0; i < 32; ++i) { + sum = f2(sum, f1(n2 << i)) + } + return sum + } + this.init_genrand = function(s) { + mt[0] = f1(s & 96295) + for (mti = 1; mti < 6; mti++) { + mt[mti] = f2(f3(3, f1(mt[mti - 1] ^ mt[1] > 0)), mti) + } + } +} (function() { + var fuzzMT = new g; + fuzzMT.init_genrand(54) +} ()) + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug588338.js b/js/src/jit-test/tests/jaeger/bug588338.js new file mode 100644 index 0000000000..c400d76875 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug588338.js @@ -0,0 +1,15 @@ +// |jit-test| error: is not a function +function f() { + (e) +} +(x = new Proxy(Function, (function(x) { + return { + get: function(r, b) { + return x[b] + } + } +})(/x/))) +for (e in [0]) { + gczeal(2) +} ( [1,2,3])("") + diff --git a/js/src/jit-test/tests/jaeger/bug588362-1.js b/js/src/jit-test/tests/jaeger/bug588362-1.js new file mode 100644 index 0000000000..460912f1c0 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug588362-1.js @@ -0,0 +1,8 @@ +for (a = 0; a < 13; a++) { + (function* e() { + yield eval() + }()) +} + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug588362-2.js b/js/src/jit-test/tests/jaeger/bug588362-2.js new file mode 100644 index 0000000000..8451448b5a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug588362-2.js @@ -0,0 +1,10 @@ +for (a = 0; a < 13; a++) { + (function* n() { + with({}) { + yield + } + } ()) +} + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug588362-3.js b/js/src/jit-test/tests/jaeger/bug588362-3.js new file mode 100644 index 0000000000..8bf0346b0e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug588362-3.js @@ -0,0 +1,10 @@ +for (a = 0; a < 13; a++) { + (function* n() { { + function s() {} + } + yield[]; + }()); +} + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug588363-1.js b/js/src/jit-test/tests/jaeger/bug588363-1.js new file mode 100644 index 0000000000..6fca00dd84 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug588363-1.js @@ -0,0 +1,6 @@ +// |jit-test| +({eval} = Object.defineProperty(evalcx("lazy"), "", {})) +eval("eval(/x/)", []) + +/* Don't assert or crash. */ + diff --git a/js/src/jit-test/tests/jaeger/bug588363-2.js b/js/src/jit-test/tests/jaeger/bug588363-2.js new file mode 100644 index 0000000000..5550be3ea8 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug588363-2.js @@ -0,0 +1,7 @@ +with(evalcx('')) { + delete eval; + eval("x", this.__defineGetter__("x", Function)); +} + +/* Don't assert or crash. */ + diff --git a/js/src/jit-test/tests/jaeger/bug589108.js b/js/src/jit-test/tests/jaeger/bug589108.js new file mode 100644 index 0000000000..e1835ea209 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug589108.js @@ -0,0 +1,10 @@ +try { + var x + for (x in [x]) + gczeal(2) + new NaN +} catch(e) {} +(function() { + for (a in [Boolean(), x.t]) {} +} (function() {})) + diff --git a/js/src/jit-test/tests/jaeger/bug589461.js b/js/src/jit-test/tests/jaeger/bug589461.js new file mode 100644 index 0000000000..89fc7acad4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug589461.js @@ -0,0 +1,7 @@ +function f(h, i, Q) { + var L = Q; + var H = h; + + return h[i] * L ^ L * 0x1010100; +} +assertEq(f([6], 0, 12345), 1768429654); diff --git a/js/src/jit-test/tests/jaeger/bug590083.js b/js/src/jit-test/tests/jaeger/bug590083.js new file mode 100644 index 0000000000..c11c7a137b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug590083.js @@ -0,0 +1,11 @@ +eval("\ + (function(){\ + for(var w in [0]) {\ + function w(){}\ + print(w)\ + }\ + })\ +")() + +/* Don't crash. */ + diff --git a/js/src/jit-test/tests/jaeger/bug591606.js b/js/src/jit-test/tests/jaeger/bug591606.js new file mode 100644 index 0000000000..cb711f0bd1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug591606.js @@ -0,0 +1,5 @@ +var c = [] +function c() {} + +/* Don't assert. */ + diff --git a/js/src/jit-test/tests/jaeger/bug592973-1.js b/js/src/jit-test/tests/jaeger/bug592973-1.js new file mode 100644 index 0000000000..d3bafac623 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug592973-1.js @@ -0,0 +1,12 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +function f(x) { + if (x) { + let y; + y = 12; + (function () { + assertEq(y, 12); + })(); + } +} +f(1); + diff --git a/js/src/jit-test/tests/jaeger/bug592973-2.js b/js/src/jit-test/tests/jaeger/bug592973-2.js new file mode 100644 index 0000000000..052c622685 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug592973-2.js @@ -0,0 +1,7 @@ +function f(a) { + function a() { + } +} + +/* Don't assert on JOF_NAME test in BindNameToSlot(). */ + diff --git a/js/src/jit-test/tests/jaeger/bug592973-3.js b/js/src/jit-test/tests/jaeger/bug592973-3.js new file mode 100644 index 0000000000..541c39981a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug592973-3.js @@ -0,0 +1,8 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +function f([a, b, c, d]) { + a = b; + return function () { return a + b + c + d; }; +} + +var F = f(["a", "b", "c", "d"]); +assertEq(F(), "bbcd"); diff --git a/js/src/jit-test/tests/jaeger/bug593554.js b/js/src/jit-test/tests/jaeger/bug593554.js new file mode 100644 index 0000000000..20143da845 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug593554.js @@ -0,0 +1,8 @@ +/* Don't assert. */ +var b = 7; +var a = []; +for (var j = 0; j < 7; ++j) { + var d = {}; + a.push(b >> d); +} +assertEq(a.toString(), '7,7,7,7,7,7,7'); diff --git a/js/src/jit-test/tests/jaeger/bug595917.js b/js/src/jit-test/tests/jaeger/bug595917.js new file mode 100644 index 0000000000..1b3e132953 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug595917.js @@ -0,0 +1,4 @@ +if (!this.parseInt) { + var parseInt = function () { return 5; } +} +assertEq(parseInt(10), 10); diff --git a/js/src/jit-test/tests/jaeger/bug597378.js b/js/src/jit-test/tests/jaeger/bug597378.js new file mode 100644 index 0000000000..c766407ab5 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug597378.js @@ -0,0 +1,12 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +function f(a, b) { + var o = a; + var q = b; + var p; + do { } while (0); + p = o; + q = p + 1 < q ? p + 1 : 0; + assertEq(q, 0); +} +f(3, 4); + diff --git a/js/src/jit-test/tests/jaeger/bug598696.js b/js/src/jit-test/tests/jaeger/bug598696.js new file mode 100644 index 0000000000..129275d2a5 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug598696.js @@ -0,0 +1,6 @@ +function f() { + eval(); + var i = 0; + assertEq(++i, 1); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug599488.js b/js/src/jit-test/tests/jaeger/bug599488.js new file mode 100644 index 0000000000..f2cf952091 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug599488.js @@ -0,0 +1,9 @@ +/* Don't crash. */ +function foo(y) { + var x = y; + if (x != x) + return true; + return false; +} +assertEq(foo("three"), false); +assertEq(foo(NaN), true); diff --git a/js/src/jit-test/tests/jaeger/bug600139.js b/js/src/jit-test/tests/jaeger/bug600139.js new file mode 100644 index 0000000000..61fa7283a0 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug600139.js @@ -0,0 +1,10 @@ +// |jit-test| error: ReferenceError +// vim: set ts=8 sts=4 et sw=4 tw=99: +function f(a, b, c) { + if (!a.__SSi) { + throw Components.returnCode = Cr.NS_ERROR_INVALID_ARG; + } + this.restoreWindow(a, b, c); + eval(); +} +f(1, 2, 3); diff --git a/js/src/jit-test/tests/jaeger/bug600419.js b/js/src/jit-test/tests/jaeger/bug600419.js new file mode 100644 index 0000000000..981a6a17c4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug600419.js @@ -0,0 +1,5 @@ +/* Don't assert. */ +(function() { + var x; + [1].map(function(){}, x << x); +})() diff --git a/js/src/jit-test/tests/jaeger/bug600424.js b/js/src/jit-test/tests/jaeger/bug600424.js new file mode 100644 index 0000000000..e59a06614f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug600424.js @@ -0,0 +1,14 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: +function f(a) { + var x = { + g: function () { + return this.a; + } + }; + x.g.prototype.a = a; + assertEq(x.g.prototype.a, a); + return x; +} +f(1); +f(2); +f(3); diff --git a/js/src/jit-test/tests/jaeger/bug601982.js b/js/src/jit-test/tests/jaeger/bug601982.js new file mode 100644 index 0000000000..99f4bf906f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug601982.js @@ -0,0 +1,33 @@ +/* vim: set ts=8 sts=4 et sw=4 tw=99: */ + +function J(i) { + /* Cause a branch to build(?) */ + if (i % 3) + [1,2,3] +} + +function h(i) { + J(i); + + /* Generate a safe point in the method JIT. */ + if (1 == 14) { eval(); } + + return J(i); +} + +function g(i) { + /* Method JIT will try to remove this frame(?) */ + if (i == 14) { with ({}); } + return h(i); +} + +function f() { + for (var i = 0; i < 9 * 2; i++) { + g(i); + } +} + +f(); + +/* Don't crash. */ + diff --git a/js/src/jit-test/tests/jaeger/bug604381.js b/js/src/jit-test/tests/jaeger/bug604381.js new file mode 100644 index 0000000000..3ca01cb362 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug604381.js @@ -0,0 +1,14 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function F() { + var T = { }; + try { + throw 12; + } catch (e) { + T.x = 5; + return T; + } +} + +assertEq((new F()).x, 5); + diff --git a/js/src/jit-test/tests/jaeger/bug604427.js b/js/src/jit-test/tests/jaeger/bug604427.js new file mode 100644 index 0000000000..1e37df8694 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug604427.js @@ -0,0 +1,6 @@ + +function testInt(x) { + var a = x|0; + return (a !== a); +} +assertEq(testInt(10), false); diff --git a/js/src/jit-test/tests/jaeger/bug606662-2.js b/js/src/jit-test/tests/jaeger/bug606662-2.js new file mode 100644 index 0000000000..dc38cbb330 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug606662-2.js @@ -0,0 +1,5 @@ +// don't crash +try{a()}catch(e){} +try{for(e in((JSON.e)(x=/x/)))throw []}catch(e){} +try{(function(){c()})()}catch(e){} +try{new function(){}}catch(e){} diff --git a/js/src/jit-test/tests/jaeger/bug606829.js b/js/src/jit-test/tests/jaeger/bug606829.js new file mode 100644 index 0000000000..1839c93d25 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug606829.js @@ -0,0 +1,8 @@ +/* Don't assert. */ +function f(x) +{ + if ("hi" == (x & 3)) { + return 1; + } +} +f(12); diff --git a/js/src/jit-test/tests/jaeger/bug610652.js b/js/src/jit-test/tests/jaeger/bug610652.js new file mode 100644 index 0000000000..b5c64d193c --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug610652.js @@ -0,0 +1,5 @@ +function a1(a2) { + return 10 - a2; +} +a3 = a1(-2147483648); +assertEq(a3, 2147483658); diff --git a/js/src/jit-test/tests/jaeger/bug615440.js b/js/src/jit-test/tests/jaeger/bug615440.js new file mode 100644 index 0000000000..1ed4cd1c04 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug615440.js @@ -0,0 +1,5 @@ +Array.prototype.__proto__ = null; +for (var r = 0; r < 3; ++r) [][0] = 1; + +// Don't crash. + diff --git a/js/src/jit-test/tests/jaeger/bug616508.js b/js/src/jit-test/tests/jaeger/bug616508.js new file mode 100644 index 0000000000..d29bf75f9b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug616508.js @@ -0,0 +1,14 @@ +// |jit-test| error: ReferenceError +// vim: set ts=8 sts=4 et sw=4 tw=99: + +// Note: modified from original test, which used Uint32Array in place of Array, +// because the behavior has changed in a way that this will throw a TypeError +// before it gets to testing what used to crash. I have no idea whether this +// would actually crash the original version it was written for. +try { + (function () { + __proto__ = Array() + }()) +} catch (e) {}(function () { + length, ([eval()] ? x : 7) +})() diff --git a/js/src/jit-test/tests/jaeger/bug617433.js b/js/src/jit-test/tests/jaeger/bug617433.js new file mode 100644 index 0000000000..768f5a4149 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug617433.js @@ -0,0 +1,12 @@ +// don't crash + +function foo(x) { + (x >>> 3.14); + (x >>> true); + (x >>> (0/0)); + (x >>> 100); + (x >>> -10); + (x >>> (1/0)); + (x >>> (void 0)); +} +foo(10); diff --git a/js/src/jit-test/tests/jaeger/bug617440.js b/js/src/jit-test/tests/jaeger/bug617440.js new file mode 100644 index 0000000000..48311e7614 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug617440.js @@ -0,0 +1,11 @@ + +function f() { + var x = 1.23; + function g() { + var y = x++; + assertEq(y, 1.23); + } + g(); + assertEq(x, 2.23); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug617458.js b/js/src/jit-test/tests/jaeger/bug617458.js new file mode 100644 index 0000000000..1dc9b2f87c --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug617458.js @@ -0,0 +1,6 @@ + +function f(x) { + var a = 4 | x; + a = +a; +} +f(10); diff --git a/js/src/jit-test/tests/jaeger/bug617460.js b/js/src/jit-test/tests/jaeger/bug617460.js new file mode 100644 index 0000000000..5b9f7662fc --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug617460.js @@ -0,0 +1,10 @@ + +function f() { + var x = NaN; + if (2 > 0) {} + var y = {}; + var z = (1234 - x); + y.foo = z; + assertEq(x, NaN); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug617549.js b/js/src/jit-test/tests/jaeger/bug617549.js new file mode 100644 index 0000000000..a48e80f3c5 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug617549.js @@ -0,0 +1,9 @@ + +function f() { + var a, b, c; + a = -c; + b = c & 2; + a = b; + a = 123 * a; +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug617558.js b/js/src/jit-test/tests/jaeger/bug617558.js new file mode 100644 index 0000000000..1bbd30f21a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug617558.js @@ -0,0 +1,7 @@ + +Array.prototype.__proto__ = Function.prototype; +var x = [1,2,3]; +x[0]; + +[].__proto__.foo = true; +eval("[]"); diff --git a/js/src/jit-test/tests/jaeger/bug617624.js b/js/src/jit-test/tests/jaeger/bug617624.js new file mode 100644 index 0000000000..ebf1e661e8 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug617624.js @@ -0,0 +1,7 @@ + +function f() { + var x; + var a = x; + Boolean(a = Number(12.34)); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug618007.js b/js/src/jit-test/tests/jaeger/bug618007.js new file mode 100644 index 0000000000..daa43e504d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug618007.js @@ -0,0 +1,31 @@ +var appendToActual = function(s) { + actual += s + ','; +} + +for(var z=0; z < 3; z++) { + function ff() { + } + ff(); + + // jit-test/tests/closures/setname-closure.js + actual = ''; + expected = '2,4,8,16,32,undefined,64,128,256,512,1024,undefined,2048,4096,8192,16384,32768,undefined,65536,131072,262144,524288,1048576,undefined,2097152,4194304,8388608,16777216,33554432,undefined,'; + + var f = function() { + var p = 1; + function g() { + for (var i = 0; i < 5; ++i) { + p = p * 2; + appendToActual(p); + } + } + return g; + } + var g = f(); + for (var i = 0; i < 5; ++i) { + g(); + appendToActual(); + } + assertEq(actual, expected); +} + diff --git a/js/src/jit-test/tests/jaeger/bug618849.js b/js/src/jit-test/tests/jaeger/bug618849.js new file mode 100644 index 0000000000..0df67a069f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug618849.js @@ -0,0 +1,11 @@ + +function f() { + function g() { + var b = x; + var c = b++ & b; + return c; + } + var x = x--; + return g(); +} +assertEq(f(), 0); diff --git a/js/src/jit-test/tests/jaeger/bug618850.js b/js/src/jit-test/tests/jaeger/bug618850.js new file mode 100644 index 0000000000..8c423d87b3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug618850.js @@ -0,0 +1,6 @@ +function f() { + var x = false; + NaN ? x = Math.floor() : x = Math.ceil(); + return x * 12345; +} +assertEq(f(), NaN); diff --git a/js/src/jit-test/tests/jaeger/bug618863.js b/js/src/jit-test/tests/jaeger/bug618863.js new file mode 100644 index 0000000000..9393361190 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug618863.js @@ -0,0 +1,23 @@ +function f() { + for(var i=0; i<3; i++) { + var x = -i / 100; + assertEq(x * -100, i); + } +} +f(); + +function g() { + for (var i = 0; i < 2; i++) { + var a = i ? true : false; + var x = -a / 100; + assertEq(x * -100, i); + } +} +g(); + +function h() { + for (var i = 0; i < 20; i++) + var x = (0x7ffffff4 + i) / 100; + assertEq(x, 21474836.55); +} +h(); diff --git a/js/src/jit-test/tests/jaeger/bug619339.js b/js/src/jit-test/tests/jaeger/bug619339.js new file mode 100644 index 0000000000..2445d24fcc --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug619339.js @@ -0,0 +1,3 @@ + +var a; +assertEq(true && 1.1 + a, NaN); diff --git a/js/src/jit-test/tests/jaeger/bug619433-1.js b/js/src/jit-test/tests/jaeger/bug619433-1.js new file mode 100644 index 0000000000..8ffb23838f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug619433-1.js @@ -0,0 +1,22 @@ + +/* Test compiling JSOP_STRICTEQ on known doubles. */ + +function foo(x) { + return x === x; +} + +for (var i = 0; i < 20; i++) { + assertEq(foo(1.2), true); + assertEq(foo(NaN), false); +} + +function bar(x) { + if (x === x) + return true; + return false; +} + +for (var i = 0; i < 20; i++) { + assertEq(bar(1.2), true); + assertEq(bar(NaN), false); +} diff --git a/js/src/jit-test/tests/jaeger/bug619433-2.js b/js/src/jit-test/tests/jaeger/bug619433-2.js new file mode 100644 index 0000000000..947557da37 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug619433-2.js @@ -0,0 +1,10 @@ + +function foo(x) { + var y = 2.5; + y = -x; + var z = [1,2,y]; + return x + 5; +} +for (var i = 0; i < 20; i++) + foo(i); +assertEq(foo(20), 25); diff --git a/js/src/jit-test/tests/jaeger/bug620643.js b/js/src/jit-test/tests/jaeger/bug620643.js new file mode 100644 index 0000000000..fcb096e953 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug620643.js @@ -0,0 +1 @@ +var a = new Int32Array(); +(a[0]={}); diff --git a/js/src/jit-test/tests/jaeger/bug621522.js b/js/src/jit-test/tests/jaeger/bug621522.js new file mode 100644 index 0000000000..a952502d82 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug621522.js @@ -0,0 +1,14 @@ + +/* Don't crash. */ +function f() { + var x; + x.a; + x = {}; +} + +try { + f(); + assertEq(0, 1); +} catch(e) { + +} diff --git a/js/src/jit-test/tests/jaeger/bug621655.js b/js/src/jit-test/tests/jaeger/bug621655.js new file mode 100644 index 0000000000..5b14df90b1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug621655.js @@ -0,0 +1,10 @@ +/* Don't assert. */ +for(p in 0.3) { } + +Number.prototype.foo = function() {} +var arr = []; + +for(p in 1.2) { + arr.push(p); +} +assertEq(arr[0], "foo"); diff --git a/js/src/jit-test/tests/jaeger/bug624100.js b/js/src/jit-test/tests/jaeger/bug624100.js new file mode 100644 index 0000000000..744ca01876 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug624100.js @@ -0,0 +1,2 @@ +// |jit-test| error: ReferenceError +eval("'use strict'; for(let j=0;j<9;++j) {} x;"); diff --git a/js/src/jit-test/tests/jaeger/bug624483.js b/js/src/jit-test/tests/jaeger/bug624483.js new file mode 100644 index 0000000000..480e53914f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug624483.js @@ -0,0 +1,5 @@ +var arr = new Uint8ClampedArray(16); +for (var i = 0; i < 16; i++) { + arr[i] = "Infinity"; +} +assertEq(arr[14], 255); diff --git a/js/src/jit-test/tests/jaeger/bug625157.js b/js/src/jit-test/tests/jaeger/bug625157.js new file mode 100644 index 0000000000..53bed4e681 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug625157.js @@ -0,0 +1,16 @@ +function f() { + { + function g() { + var a = []; + for (var i = 0; i < 10; i++) + a.push({}); + for (var i = 0; i < 10; i++) + a[i].m = function() { return 0; } + assertEq(a[8].m !== a[9].m, true); + } + g(); + } +} +f() + + diff --git a/js/src/jit-test/tests/jaeger/bug625377.js b/js/src/jit-test/tests/jaeger/bug625377.js new file mode 100644 index 0000000000..4c78939384 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug625377.js @@ -0,0 +1,13 @@ +x = [] +for(var i=0; i<3; i++) { + var obj = { first: "first", second: "second" }; + var count = 0; + for (var elem in obj) { + delete obj.second; + count++; + } + x.push(count); +} +assertEq(x[0], 1); +assertEq(x[1], 1); +assertEq(x[2], 1); diff --git a/js/src/jit-test/tests/jaeger/bug625718-1.js b/js/src/jit-test/tests/jaeger/bug625718-1.js new file mode 100644 index 0000000000..601c2a8e6d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug625718-1.js @@ -0,0 +1,12 @@ +function f3() { return 2; }; +function f4(o) { o.g4 = function() {}; }; + +var f = function() {}; +f.x = undefined; +f4(new String("x")); +f3(); +f4(f); + +for(var i=0; i<20; i++) { + f4(Math); +} diff --git a/js/src/jit-test/tests/jaeger/bug625718-2.js b/js/src/jit-test/tests/jaeger/bug625718-2.js new file mode 100644 index 0000000000..029819519c --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug625718-2.js @@ -0,0 +1,14 @@ +var o3 = new String("foobarbaz"); +var o10 = Math; +var o11 = function() {}; + +function f3(o) { return o; }; +function f4(o) { o.g4 = function() {}; }; + +for(var i=0; i<20; i++) { + o11[3] = undefined; + f4(o3); + f3(o3); + f4(o11); + f4(o10); +} diff --git a/js/src/jit-test/tests/jaeger/bug625718-3.js b/js/src/jit-test/tests/jaeger/bug625718-3.js new file mode 100644 index 0000000000..81e788143a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug625718-3.js @@ -0,0 +1,52 @@ +var o0 = []; +var o1 = new String("foobarbaz"); +var o2 = {}; +var o3 = new String("foobarbaz"); +var o4 = {}; +var o5 = Math; +var o6 = {}; +var o7 = new String("foobarbaz"); +var o8 = new String("foobarbaz"); +var o9 = Math; +var o10 = Math; +var o11 = function() {}; +var o12 = {}; +var o13 = new String("foobarbaz"); +var o14 = {}; + +function f1(o) { return o.length;}; +function f2(o) { o.g2 = function() {};}; +function f3(o) { return o.g10;}; +function f4(o) { o.g4 = function() {};}; +function f5(o) { return o == o14;}; +function f6(o) { o[3] = o;}; +function f7(o) { o[3] = undefined;}; +function f8(o) { o[3] = undefined;}; +function f9(o) { return o.length;}; +function f10(o) { return o.__proto__; }; + +for(var i=0; i<20; i++) { + f9(o11); + f6(o0); + f2(o1); + f2(o6); + f7(o6); + f8(o11); + f2(o5); + f7(o9); + f7(o12); + f6(o4); + f5(o1); + f4(o1); + f8(o8); + f6(o5); + f2(o0); + f10(o7); + f3(o3); + f4(o1); + f9(o3); + f4(o11); + f4(o0); + f2(o4); + f4(o10); +} diff --git a/js/src/jit-test/tests/jaeger/bug625757.js b/js/src/jit-test/tests/jaeger/bug625757.js new file mode 100644 index 0000000000..458c1604a8 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug625757.js @@ -0,0 +1,4 @@ +for(var i=0; i<20; i++) { + var x = 5e-324; +} +/* Don't crash. */ diff --git a/js/src/jit-test/tests/jaeger/bug627486.js b/js/src/jit-test/tests/jaeger/bug627486.js new file mode 100644 index 0000000000..7acc3b01e9 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug627486.js @@ -0,0 +1,23 @@ +// |jit-test| error: TypeError +// vim: set ts=8 sts=4 et sw=4 tw=99: +g = undefined; +function L() { } + +function h() { + with (h) { } + for (var i = 0; i < 10; i++) + g(); +} + +function f(x) { + g = x; +} + +f(L); +h(); +f(L); +f(2); +h(); + +/* Don't assert/crash. */ + diff --git a/js/src/jit-test/tests/jaeger/bug639459.js b/js/src/jit-test/tests/jaeger/bug639459.js new file mode 100644 index 0000000000..035952e816 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug639459.js @@ -0,0 +1,6 @@ +function f() { + var a = [].length; + return a / a; +} +assertEq(f(), NaN); + diff --git a/js/src/jit-test/tests/jaeger/bug639478-1.js b/js/src/jit-test/tests/jaeger/bug639478-1.js new file mode 100644 index 0000000000..a0f2fd37e2 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug639478-1.js @@ -0,0 +1,5 @@ + +function f(x) { + return (x % 123.45) >> x; +} +assertEq(f(-123), -4); diff --git a/js/src/jit-test/tests/jaeger/bug639478-2.js b/js/src/jit-test/tests/jaeger/bug639478-2.js new file mode 100644 index 0000000000..3412dfa3e4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug639478-2.js @@ -0,0 +1,12 @@ +var y; +function f() { + for(var _ in [3.14]) { + y = 3.14; + y = y ^ y; + return y; + + function g() { + } + } +} +assertEq(f(), 0); diff --git a/js/src/jit-test/tests/jaeger/bug639587.js b/js/src/jit-test/tests/jaeger/bug639587.js new file mode 100644 index 0000000000..462c118463 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug639587.js @@ -0,0 +1,8 @@ +/* Don't assert. */ + +function f(o) { + o == 1; + if (o == 2) {} +} +for (var i = 0; i < 20; i++) + f(3.14); diff --git a/js/src/jit-test/tests/jaeger/bug639792.js b/js/src/jit-test/tests/jaeger/bug639792.js new file mode 100644 index 0000000000..601f047ae1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug639792.js @@ -0,0 +1,8 @@ + +for(var i=0; i<20; i++) { + function f(){}; + x = -1; + x = x % 1; + assertEq(x, -0); +} + diff --git a/js/src/jit-test/tests/jaeger/bug639808.js b/js/src/jit-test/tests/jaeger/bug639808.js new file mode 100644 index 0000000000..bf6b16c3d1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug639808.js @@ -0,0 +1,16 @@ +function f() { + var x = 1.23; + var y = [].length; + x = ++y; + y - 1; +} +f(); + +function g(q) { + var x = 1.23; + var y = [].length; + x = ++y; + if (q) + assertEq(y + 5, 6); +} +g(1); diff --git a/js/src/jit-test/tests/jaeger/bug640098.js b/js/src/jit-test/tests/jaeger/bug640098.js new file mode 100644 index 0000000000..b037df8a11 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug640098.js @@ -0,0 +1,15 @@ + +eval("(function(){({6953421313:0})})")(); + +function f() { + var x = {6953421313: 123}; + assertEq(x[6953421313], 123); + + x[6953421313] = "a"; + assertEq(x[6953421313], "a"); + + var y = {3.3: true}; + assertEq(y[3.3], true); +} +f(); + diff --git a/js/src/jit-test/tests/jaeger/bug640102.js b/js/src/jit-test/tests/jaeger/bug640102.js new file mode 100644 index 0000000000..e3ad9fbc01 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug640102.js @@ -0,0 +1,3 @@ +try { + eval("v>>([]=x)") +} catch (e) {} diff --git a/js/src/jit-test/tests/jaeger/bug640614.js b/js/src/jit-test/tests/jaeger/bug640614.js new file mode 100644 index 0000000000..f17ba2719d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug640614.js @@ -0,0 +1,5 @@ +function f(x) { + x = 2 ^ x++; + if (x) {} +} +f(1.1); diff --git a/js/src/jit-test/tests/jaeger/bug642198.js b/js/src/jit-test/tests/jaeger/bug642198.js new file mode 100644 index 0000000000..dec6e7294f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug642198.js @@ -0,0 +1,9 @@ + +function test() { + for(var e=1.2; true; e=20.2) { + if (e > 10) + break; + } +} +test(); + diff --git a/js/src/jit-test/tests/jaeger/bug643653-1.js b/js/src/jit-test/tests/jaeger/bug643653-1.js new file mode 100644 index 0000000000..7900f8ddd6 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug643653-1.js @@ -0,0 +1,10 @@ +function f(x) { + var a; + var b = [1].length; + var c = x; + var d = b + 1; + AA = x; + a = d; + assertEq(b + d, 3); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug643653-2.js b/js/src/jit-test/tests/jaeger/bug643653-2.js new file mode 100644 index 0000000000..aea6896f1d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug643653-2.js @@ -0,0 +1,58 @@ +var HEAP, IHEAP, FHEAP; +var TOTAL_MEMORY = 50 * 1024 * 1024; +HEAP = IHEAP = new Int32Array(TOTAL_MEMORY); +STACK_ROOT = STACKTOP = undefined; +var _rng; +var __str2; +var __str3; +{ + var __stackBase__ = STACKTOP; + var $n; + var $tmp5 = __stackBase__ + 12; + var $tmp6 = $n; + var $mul7 = ($tmp6) * 3; + $this_addr_i23 = $tmp5; + $id_addr_i = __str2; + $desc_addr_i = __str3; + $N_addr_i = $mul7; + var $this1_i24 = $this_addr_i23; + var $tmp_i25 = $id_addr_i; + var $tmp2_i = $desc_addr_i; + var $tmp3_i = $N_addr_i; + __Z9makeFastaI10RandomizedEvPKcS2_jRT_($tmp_i25, $tmp2_i, $tmp3_i, $this1_i24); +} +function __Z9makeFastaI10RandomizedEvPKcS2_jRT_($id, $desc, $N, $output) +{ + $output_addr = $output; + var $tmp4 = $output_addr; + $this_addr_i = $tmp4; + var $this1_i = $this_addr_i; + var $table_i = $this1_i; + var $call_i = __ZN10LineBuffer7genrandER10Cumulativej(0, $table_i, 0); +} +function __ZN10LineBuffer7genrandER10Cumulativej($this, $table, $N) +{ + var $this_addr_i1; + var $pct_addr_i; + $table_addr = $table; + var $tmp3 = $table_addr; + $this_addr_i = _rng; + $max_addr_i = 1; + var $this1_i = $this_addr_i; + var $last_i = $this1_i; + var $tmp_i = IHEAP[$last_i]; + var $mul_i = ($tmp_i) * 3877; + var $add_i = ($mul_i) + 29573; + var $rem_i = ($add_i) % 139968; + var $last2_i = $this1_i; + IHEAP[$last2_i] = $rem_i; + var $tmp3_i = $max_addr_i; + var $last4_i = $this1_i; + var $tmp5_i = IHEAP[$last4_i]; + var $conv_i = ($tmp5_i); + var $mul6_i = ($tmp3_i) * ($conv_i); + var $div_i = ($mul6_i) / 139968; + $this_addr_i1 = $tmp3; + $pct_addr_i = $div_i; + assertEq($pct_addr_i, NaN); +} diff --git a/js/src/jit-test/tests/jaeger/bug643805.js b/js/src/jit-test/tests/jaeger/bug643805.js new file mode 100644 index 0000000000..14a9edb48d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug643805.js @@ -0,0 +1,50 @@ +function _tt_face_get_name() { + var __label__ = -1; + var $rec; + var $n; + while(true) { + switch(__label__) { + case -1: + $rec=0; + $n=0; + case 0: + if ($rec == 20) { + __label__ = 2; + break; + } + var $63 = $n; + var $64 = $63 + 1; + $n = $64; + var $65 = $rec; + $rec = $rec + 1; + assertEq($64 < 30, true); + __label__ = 0; + break; + case 1: + $rec = 0; + case 2: + return; + } + } +} +_tt_face_get_name(); + +/* Test tracking of lifetimes around backedges in nested loops. */ +function nested() { + var x = 100; + var i = 0; + while (i < 10) { + while (i < 10) { + i++; + if (x < 20) + break; + if (i > 10) { + x = 200; + i++; + } + } + if (i > 10) + x = 100; + } +} +nested(); diff --git a/js/src/jit-test/tests/jaeger/bug643829.js b/js/src/jit-test/tests/jaeger/bug643829.js new file mode 100644 index 0000000000..43766c0125 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug643829.js @@ -0,0 +1,12 @@ +function _build_tree() { + var $n; + var $elems = 20; + while (true) { + var $tmp18 = $n; + var $tmp19 = $elems; + var $cmp = ($n | 0) < ($elems | 0); + return $cmp; + } +} +assertEq(_build_tree(), true); + diff --git a/js/src/jit-test/tests/jaeger/bug643913.js b/js/src/jit-test/tests/jaeger/bug643913.js new file mode 100644 index 0000000000..1dc8ac5d04 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug643913.js @@ -0,0 +1,8 @@ +function f() { + var x; + eval("x = 3.14"); + x = 123; + var y = -(-x); + assertEq(y, 123); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug645629.js b/js/src/jit-test/tests/jaeger/bug645629.js new file mode 100644 index 0000000000..c92d2c7bf5 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug645629.js @@ -0,0 +1,8 @@ +/* Don't assert. */ +o1 = {}; +o1 = 2; +function f(o) { + o.hasOwnProperty("x"); +} +new f(o1); +f(o1); diff --git a/js/src/jit-test/tests/jaeger/bug645657.js b/js/src/jit-test/tests/jaeger/bug645657.js new file mode 100644 index 0000000000..d33870934e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug645657.js @@ -0,0 +1,8 @@ +function f() { + var x = 3; + var y = 1.2; + var z; + y = --z; + x = z++; +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug645985.js b/js/src/jit-test/tests/jaeger/bug645985.js new file mode 100644 index 0000000000..7ba1a0386f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug645985.js @@ -0,0 +1,5 @@ +function f(o) { + o += ""; + o.hasOwnProperty("x"); +} +f({}); diff --git a/js/src/jit-test/tests/jaeger/bug646001.js b/js/src/jit-test/tests/jaeger/bug646001.js new file mode 100644 index 0000000000..eabdb12dc4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug646001.js @@ -0,0 +1,12 @@ +function jit(on) +{ + if (on && !options().match(/tracejit/)) { } +} +try { test(); } catch (e) {} +function test( + ) +{ + for (var j=0;j<5;++j) { switch(1.1) { case 2: case NaN: } } + jit(false); + reportCompare('xxxxxxx'.test(new j('(x+)(x*)'))); +} diff --git a/js/src/jit-test/tests/jaeger/bug646060.js b/js/src/jit-test/tests/jaeger/bug646060.js new file mode 100644 index 0000000000..f399e12839 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug646060.js @@ -0,0 +1,8 @@ +function f0(i) { + switch(i) { + case "a": + case { TITLE: false, VERSION: false }('test') + : + } +} +try { new TestCase(SECTION, 'switch statement', f0("a"), "ab*"); } catch (e) {} diff --git a/js/src/jit-test/tests/jaeger/bug646411.js b/js/src/jit-test/tests/jaeger/bug646411.js new file mode 100644 index 0000000000..2e4f6b9421 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug646411.js @@ -0,0 +1,12 @@ +load(libdir + "immutable-prototype.js"); + +if (globalPrototypeChainIsMutable()) + __proto__ = Function(); + +eval("\ +var MS = 16;\ +addNewTestCase(new Date(1899,11,31,16,0,0), \"new Date(1899,11,31,16,0,0)\", typeof UTC_DAY == 'undefined');\ +function addNewTestCase( DateCase, DateString, ResultArray ) {\ + ResultArray[MS];\ +}\ +"); diff --git a/js/src/jit-test/tests/jaeger/bug646495.js b/js/src/jit-test/tests/jaeger/bug646495.js new file mode 100644 index 0000000000..f961de7472 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug646495.js @@ -0,0 +1,6 @@ +function f() { + var x = 1; + var y; + if (x = y = Math) {} +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug646938.js b/js/src/jit-test/tests/jaeger/bug646938.js new file mode 100644 index 0000000000..0284bdce3d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug646938.js @@ -0,0 +1,21 @@ +function f() { + var x = -[NaN][0]; + assertEq(x === x, false); + assertEq(x !== x, true); + assertEq(x == x, false); + assertEq(x != x, true); + + var y = -("x" / {}); + var z = y; + assertEq(y === z, false); + assertEq(y !== z, true); + assertEq(y == z, false); + assertEq(y != z, true); +} +f(); + +function g(x, y) { + var z = x / y; + assertEq(z === z, false); +} +g(0, 0); diff --git a/js/src/jit-test/tests/jaeger/bug647440.js b/js/src/jit-test/tests/jaeger/bug647440.js new file mode 100644 index 0000000000..f03f2c2075 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug647440.js @@ -0,0 +1,7 @@ +if (false) + function g() {} +function f() { + var x; + (x = Infinity) >> x--; +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug647657.js b/js/src/jit-test/tests/jaeger/bug647657.js new file mode 100644 index 0000000000..09c999fa7a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug647657.js @@ -0,0 +1 @@ +Function("var{}=Array()")() diff --git a/js/src/jit-test/tests/jaeger/bug647785.js b/js/src/jit-test/tests/jaeger/bug647785.js new file mode 100644 index 0000000000..da7dd20a1a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug647785.js @@ -0,0 +1,4 @@ +assertEq(-(!new Int32Array(5)), -0); +assertEq(-(!Math), -0); +assertEq(-(!{}), -0); +assertEq(-(![]), -0); diff --git a/js/src/jit-test/tests/jaeger/bug648004.js b/js/src/jit-test/tests/jaeger/bug648004.js new file mode 100644 index 0000000000..ba215bdead --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug648004.js @@ -0,0 +1,4 @@ +var x = eval("gc(); 30"); +var y = x.toString(); +isNaN(x); +assertEq(y, "30"); diff --git a/js/src/jit-test/tests/jaeger/bug648230-1.js b/js/src/jit-test/tests/jaeger/bug648230-1.js new file mode 100644 index 0000000000..f684bc6897 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug648230-1.js @@ -0,0 +1,13 @@ + +function f() { + -null; + -null; + -null; + -null; + -null; +} +{ + function g() {}; +} +f(); +x = Math.abs(); diff --git a/js/src/jit-test/tests/jaeger/bug648230-2.js b/js/src/jit-test/tests/jaeger/bug648230-2.js new file mode 100644 index 0000000000..d9e1eb421f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug648230-2.js @@ -0,0 +1,14 @@ +var i = 1; +var j = 2; +function f() { + if (false) + function g() {}; + return i / j; +} +-null; +-null; +-null; +-null; +-null; +f(); + diff --git a/js/src/jit-test/tests/jaeger/bug648498.js b/js/src/jit-test/tests/jaeger/bug648498.js new file mode 100644 index 0000000000..8e54209e5a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug648498.js @@ -0,0 +1,5 @@ +function f(x, y) { + return x; +} +var a = 3.3; +a ? f(f(1, 2), 3) : a; diff --git a/js/src/jit-test/tests/jaeger/bug648708.js b/js/src/jit-test/tests/jaeger/bug648708.js new file mode 100644 index 0000000000..1f79596371 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug648708.js @@ -0,0 +1,6 @@ +thrown = false +try { + ("".x = Object.seal) + "".x.valueOf(); +} catch (e) {thrown = true} +assertEq(thrown, true); diff --git a/js/src/jit-test/tests/jaeger/bug649272.js b/js/src/jit-test/tests/jaeger/bug649272.js new file mode 100644 index 0000000000..b09e324ad1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug649272.js @@ -0,0 +1,4 @@ +function f(x) {return x;} +x = f(/abc/); +eval("this.__defineSetter__(\"x\", function(){}); x = 3;"); +eval("var BUGNUMBER = 233483;"); diff --git a/js/src/jit-test/tests/jaeger/bug649593.js b/js/src/jit-test/tests/jaeger/bug649593.js new file mode 100644 index 0000000000..9d878d4a28 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug649593.js @@ -0,0 +1,10 @@ +function RunSingleBenchmark(data) { + if (data == null) + return { runs: 0, elapsed: 0 }; + data.runs += 10; + return data; +} +var data; +data = RunSingleBenchmark(data); +data = RunSingleBenchmark(data); +assertEq(data.runs, 10); \ No newline at end of file diff --git a/js/src/jit-test/tests/jaeger/bug649689.js b/js/src/jit-test/tests/jaeger/bug649689.js new file mode 100644 index 0000000000..147197e00f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug649689.js @@ -0,0 +1,6 @@ +function f(x) { + eval("a = 3"); + x.p = x.p = a; + assertEq(x.p, 3); +} +f({p: 2}); diff --git a/js/src/jit-test/tests/jaeger/bug649775.js b/js/src/jit-test/tests/jaeger/bug649775.js new file mode 100644 index 0000000000..abf136f593 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug649775.js @@ -0,0 +1,17 @@ +var x = [, ]; +var n = [, ]; +var np = 18229; +sa = Array; +function copy_(x, y) { + var i; + var k = x < y ? x.length : y.length; + for (i = 0; i < k; i--) { + x[i]; + if (i == -100) + return; + } +} +function mont_(x, y, n, np) { + copy_(x, sa); +} +mont_(x, x, n, np); diff --git a/js/src/jit-test/tests/jaeger/bug649824.js b/js/src/jit-test/tests/jaeger/bug649824.js new file mode 100644 index 0000000000..619641c92e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug649824.js @@ -0,0 +1,6 @@ +var o = { + w: 2, + x: 3 +}; +var o = 430717; +o.x = 4; diff --git a/js/src/jit-test/tests/jaeger/bug649973.js b/js/src/jit-test/tests/jaeger/bug649973.js new file mode 100644 index 0000000000..89b2882235 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug649973.js @@ -0,0 +1,2 @@ +x = 2147483647; +(x+10, false) ? [x % x] : [2 * x]; diff --git a/js/src/jit-test/tests/jaeger/bug650076.js b/js/src/jit-test/tests/jaeger/bug650076.js new file mode 100644 index 0000000000..a72faa0feb --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug650076.js @@ -0,0 +1,13 @@ +var v0, v1, v2, v3, v4, v5, v6, v7, v8, v9; +var v10, v11, v12, v13, v14, v15, v16, v17, v18, v19; +var v20, v21, v22, v23, v24, v25, v26, v27, v28, v29; +var v30, v31, v32, v33, v34, v35, v36, v37, v38, v39; +var v40, v41, v42, v43; + +function f() {} + +v1 = new Date(0); +v1.setMilliseconds(12); +v2 = eval("''"); +v3 = ""; +f((v2 + v3).indexOf(v3)); diff --git a/js/src/jit-test/tests/jaeger/bug650662.js b/js/src/jit-test/tests/jaeger/bug650662.js new file mode 100644 index 0000000000..4c4b2bc853 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug650662.js @@ -0,0 +1,6 @@ +test(); +function test() { + var a = []; + a*=3; + a.length; +} diff --git a/js/src/jit-test/tests/jaeger/bug650663.js b/js/src/jit-test/tests/jaeger/bug650663.js new file mode 100644 index 0000000000..786230fb34 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug650663.js @@ -0,0 +1,15 @@ +var cnBadSyntax = '1=2'; +var obj = new testObject; +f.call(obj); +g(); +function testObject() { + this.badSyntax = cnBadSyntax; +} +function f() { + try { + eval(this.badSyntax) + } catch (e) {} +} +function g() { + f.call(); +} diff --git a/js/src/jit-test/tests/jaeger/bug651147.js b/js/src/jit-test/tests/jaeger/bug651147.js new file mode 100644 index 0000000000..08971faa09 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug651147.js @@ -0,0 +1,7 @@ +var BUGNUMBER = 96284; +var BUGNUMBER = "410725"; +function iteratorToArray(iterator) { + var result = []; + for (var i in iterator) BUGNUMBER[result.length]; +} +try { obj = { a: 1, }('["a", "b"]', iteratorToArray(), 'uneval(iteratorToArray(new Iterator(obj,true)))'); } catch (e) { } diff --git a/js/src/jit-test/tests/jaeger/bug652305.js b/js/src/jit-test/tests/jaeger/bug652305.js new file mode 100644 index 0000000000..78df18aadf --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug652305.js @@ -0,0 +1,25 @@ +var sjcl = { + cipher: {}, +}; +var global = 99; +sjcl.cipher.aes = function (a) { + var b, c, d, e, f = this.h[0][4], + g = this.h[1]; + d = a.slice(0); + this.a = [d, []]; + for (a = 8; a < 60; a++) { + c = d[a - 1]; + if (a % 8 === 0) { + c = global; + if (0 === 0) { + h = 2; + } + } + d[a] = c; + } + assertEq(this.a[0][50], 99); +}; +sjcl.cipher.aes.prototype = { + h: [[[], [], [], [], [99, 0]], [[67175681, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 65537], [17039621, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 16777472], [83952641, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 65537], [17105156, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 16777472], []]], +}; +new sjcl.cipher.aes([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]); diff --git a/js/src/jit-test/tests/jaeger/bug652314.js b/js/src/jit-test/tests/jaeger/bug652314.js new file mode 100644 index 0000000000..80b4a32084 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug652314.js @@ -0,0 +1,7 @@ +(function() { + for (a in [0]) { + try { + return + } catch(e) {} + } +})() diff --git a/js/src/jit-test/tests/jaeger/bug652590.js b/js/src/jit-test/tests/jaeger/bug652590.js new file mode 100644 index 0000000000..5709411a53 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug652590.js @@ -0,0 +1,5 @@ +function f() { + var x = undefined ? 1 : 4294967295; + print(false || x); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug653243.js b/js/src/jit-test/tests/jaeger/bug653243.js new file mode 100644 index 0000000000..53e9302803 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug653243.js @@ -0,0 +1,12 @@ +try { + obj[i] = "a"; +} catch (e) {} +var obj = { + p: 100 +}; +var name = "p"; +var a = []; +for (var i = 0; i < 10; i++) { + a[i] = obj[name]--; +} +assertEq(a.join(), '100,99,98,97,96,95,94,93,92,91'); diff --git a/js/src/jit-test/tests/jaeger/bug653249.js b/js/src/jit-test/tests/jaeger/bug653249.js new file mode 100644 index 0000000000..b85ddd743f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug653249.js @@ -0,0 +1,13 @@ + +function testUnaryImacros() { + function checkArg(x) { + o = { + valueOf: checkArg + } + } + var v = 0; + v += +toString; + for (var i = 0; i;) { + v += [].checkArg.checkArg; + } +}(testUnaryImacros(), "valueOf passed, toString passed"); diff --git a/js/src/jit-test/tests/jaeger/bug653397.js b/js/src/jit-test/tests/jaeger/bug653397.js new file mode 100644 index 0000000000..f17167fac1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug653397.js @@ -0,0 +1,16 @@ +try { + function testSlowArrayPopMultiFrame() { + a = undefined; + function parent(a, i) { i }; + function gramps(a, i) { + return parent; + } + var last; + for (var i = 0; ; gramps++) { + last = gramps(a, i) + } + }(testSlowArrayPopMultiFrame(), 23); + assertEq(0, 1); +} catch(e) { + assertEq(e instanceof TypeError, true); +} diff --git a/js/src/jit-test/tests/jaeger/bug655505.js b/js/src/jit-test/tests/jaeger/bug655505.js new file mode 100644 index 0000000000..4d2e07c668 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug655505.js @@ -0,0 +1,15 @@ +var a = [, , , , , , ]; +var res = 0; +exhaustiveSliceTest("exhaustive slice test 1", a); +function mySlice(a, from, to) { + var to2 = to; + if (to2 > 0) { + res += to2; + to2 = to2.length + to; + } +} +function exhaustiveSliceTest(testname, a) { x = a; } +for (y = a.length; y >= 0; y--) { + mySlice(a, x, y); +} +assertEq(res, 21); diff --git a/js/src/jit-test/tests/jaeger/bug655508.js b/js/src/jit-test/tests/jaeger/bug655508.js new file mode 100644 index 0000000000..712c1c0cf8 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug655508.js @@ -0,0 +1,15 @@ +switch (3) { +case + function () { + var x; + (function () {})() && false; + x = undefined; + try { + JSON.parse(x) + } catch (e) {} + }([]): +case + function () { + [typeof loopa1] + }(0): +} diff --git a/js/src/jit-test/tests/jaeger/bug655810.js b/js/src/jit-test/tests/jaeger/bug655810.js new file mode 100644 index 0000000000..e31d56234c --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug655810.js @@ -0,0 +1,6 @@ +function f(arr) { + var x = arr[0]; + if (typeof x) {}; + Math.abs(x); +} +f([1.2]); diff --git a/js/src/jit-test/tests/jaeger/bug655990.js b/js/src/jit-test/tests/jaeger/bug655990.js new file mode 100644 index 0000000000..4ca4fd1f6c --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug655990.js @@ -0,0 +1,12 @@ +expect = 0; +summary = 0; +test(); +function test() { + function f(a, b, c) { + return c; + } + if (gczeal == 'function') actual = f(1.5, 1.25, 1.125) + else expect; + (expect, actual, summary); + var actual = ''; +} diff --git a/js/src/jit-test/tests/jaeger/bug656096.js b/js/src/jit-test/tests/jaeger/bug656096.js new file mode 100644 index 0000000000..63fdac76ba --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug656096.js @@ -0,0 +1,37 @@ +function aes(a) { + d = a.slice() + for (; a < 28; a++) + d[0] = d[0] ^ undefined +} +var sjcl = {}; +sjcl.bitArray = { + concat: function (a, b) { + return d ? a : []; + }, + clamp: function (a, b) { + return a + } +}; +function G(a, b, c, d, e, f) { + var g = [], + h = sjcl.bitArray, + f = []; + f = h.concat(f, c) + if (c) g = [] + else c = h.concat([], []) + h.concat(g, d) + h.clamp(f, [1,2,3]) +} +function decrypt(a, b, c, d, e) { + G(a, 1, c, d, e, b) + var g = [], + h = sjcl.bitArray, + f = []; + h.concat(f, c) + if (c) g = [] + else c = h.concat([], []) + h.concat(g, d) + h.concat([], c).concat.slice +} +aes(sjcl.bitArray.clamp([])); +decrypt(1, 2, 3); diff --git a/js/src/jit-test/tests/jaeger/bug656252.js b/js/src/jit-test/tests/jaeger/bug656252.js new file mode 100644 index 0000000000..07b0f94f1f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug656252.js @@ -0,0 +1,14 @@ +o14 = [undefined].__proto__ +function f18() { + try { + [] = o[p] + } catch (e) {} +} +for (var i; i < 20; i++) { + ({ + x: function() { + return eval("o14") + } + }.x().__proto__ = null); + f18() +} diff --git a/js/src/jit-test/tests/jaeger/bug656259.js b/js/src/jit-test/tests/jaeger/bug656259.js new file mode 100644 index 0000000000..35de217265 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug656259.js @@ -0,0 +1,11 @@ + +function throwsRangeError(t) { + try { + t: for (t[t++] in object) { + t++ + break t; + } + date(t) + } catch (err) {} +} +throwsRangeError(Infinity); diff --git a/js/src/jit-test/tests/jaeger/bug656591.js b/js/src/jit-test/tests/jaeger/bug656591.js new file mode 100644 index 0000000000..8d86cdf2b5 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug656591.js @@ -0,0 +1,9 @@ +// |jit-test| error: TypeError +(function () { + var i = 0; + (function () { + var x; + (x = "3") || 1; + (x = "")(i || x); + })(); +})(); diff --git a/js/src/jit-test/tests/jaeger/bug656748.js b/js/src/jit-test/tests/jaeger/bug656748.js new file mode 100644 index 0000000000..fd0cb2c110 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug656748.js @@ -0,0 +1,8 @@ +function f() { + var x = -0; + x++; + if (3 > 2) {}; + var y = x + 2.14; + assertEq(y, 3.14); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug656914.js b/js/src/jit-test/tests/jaeger/bug656914.js new file mode 100644 index 0000000000..e57e0a9747 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug656914.js @@ -0,0 +1,23 @@ +try { + new MyObject; +} catch (e) {} + +function MyObject() { + return; + return this; +} + +function Foo(x) { + if (x) + this.f = x; +} +var q = new Foo(false); +for (a in q) { assertEq(true, false); } + +function Bar(x, y) { + if (!x) + return; + this.f = y; +} +var q2 = new Bar(false, true); +for (b in q2) { assertEq(true, false); } diff --git a/js/src/jit-test/tests/jaeger/bug657120.js b/js/src/jit-test/tests/jaeger/bug657120.js new file mode 100644 index 0000000000..6e8af1a495 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug657120.js @@ -0,0 +1,6 @@ +function f() { + var x = Object(2); + var y = 3.14; + assertEq(true && x < y, true); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug657247.js b/js/src/jit-test/tests/jaeger/bug657247.js new file mode 100644 index 0000000000..539cdf55c9 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug657247.js @@ -0,0 +1,5 @@ + +a = new Array; +for (var i = 0; i != 1000; ++i) a[i] = 17; +var x = '123' + '\0' + '456'; +(1, a[x], ': 123\\0456'); diff --git a/js/src/jit-test/tests/jaeger/bug657890.js b/js/src/jit-test/tests/jaeger/bug657890.js new file mode 100644 index 0000000000..1d74fc48cb --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug657890.js @@ -0,0 +1,6 @@ +function f() {}; +var x; +for(var i=0; i<200; i++) { + x = f.bind(x, x, 2); + gc(); +} diff --git a/js/src/jit-test/tests/jaeger/bug658240.js b/js/src/jit-test/tests/jaeger/bug658240.js new file mode 100644 index 0000000000..033f2fbdab --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug658240.js @@ -0,0 +1,11 @@ +function f() { + var x = 0; + for(var i=0; i<5; i++) { + (function() { + var q = parseFloat("2"); + x += q; + })(); + } + return x; +} +assertEq(f(), 10); diff --git a/js/src/jit-test/tests/jaeger/bug658294.js b/js/src/jit-test/tests/jaeger/bug658294.js new file mode 100644 index 0000000000..e1496b9614 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug658294.js @@ -0,0 +1,15 @@ +test(); +function test() +{ + try { + instances = [] + for (var i = 0; i != 2; ++i) + instances[i]=constructor + var i = 0; + var instance = instances[i]; + var name = instance.name; + for (var j = 1; j != instances; ++j) + if (i != j && instance instanceof name[j].constructor) {} + } catch(ex) {} +} +test(); diff --git a/js/src/jit-test/tests/jaeger/bug658579.js b/js/src/jit-test/tests/jaeger/bug658579.js new file mode 100644 index 0000000000..7affcbd5fb --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug658579.js @@ -0,0 +1,5 @@ +(function () { + var x = 1 || 1.2; + true ? ~x : x; + x >> x; +})(); diff --git a/js/src/jit-test/tests/jaeger/bug658968.js b/js/src/jit-test/tests/jaeger/bug658968.js new file mode 100644 index 0000000000..74a15afa19 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug658968.js @@ -0,0 +1,13 @@ +function f(){ + var tarr = []; + var elemArray = [ + {name: "C0", checked: true}, + {name: "C1", checked: false}, + ]; + for (var i = 0; i < elemArray.length; i++) { + var element = elemArray[i]; + tarr[i] = (element.checked == true) ? 1 : 2; + } + assertEq(tarr.join(""), "12"); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug659438.js b/js/src/jit-test/tests/jaeger/bug659438.js new file mode 100644 index 0000000000..fddfe6a026 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug659438.js @@ -0,0 +1,8 @@ +var o1 = {x: {}}; +function f() { + var o = o1; + for(var i=0; i<10; i++) { + o1 = o.x; + } +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug659439.js b/js/src/jit-test/tests/jaeger/bug659439.js new file mode 100644 index 0000000000..e83afebfd1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug659439.js @@ -0,0 +1,16 @@ +function bind(f) { + return f.call.apply(f.bind, arguments); +}; +function h(a, b) { + a.x; +} +function g(a, b) { + a.x = b; + h(a); +} +function f() { + for(var i=0; i<20; i++) { + g.call(this, {}, bind(function(){})); + } +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug659448.js b/js/src/jit-test/tests/jaeger/bug659448.js new file mode 100644 index 0000000000..d9d7c9f16e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug659448.js @@ -0,0 +1,9 @@ +function TestCase(n, d, e, a) { + this.expect = e; + this.passed = getTestCaseResult(this.expect, this.actual); +} +function getTestCaseResult(expect, actual) {} +new TestCase( + TestCase(3000000000.5) +); +new TestCase(null,null, String('Sally and Fred are sure to come'.match(/^[a-z\s]*/i))); diff --git a/js/src/jit-test/tests/jaeger/bug659456.js b/js/src/jit-test/tests/jaeger/bug659456.js new file mode 100644 index 0000000000..b2155f000c --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug659456.js @@ -0,0 +1,12 @@ +// |jit-test| error: InternalError +function foo() { return "tracejit,methodjit"; }; +function baz(on) { + foo('bar'); +} +eval("\ +test();\ +function test() {\ + baz(true);\ + test();\ +}\ +"); diff --git a/js/src/jit-test/tests/jaeger/bug660002.js b/js/src/jit-test/tests/jaeger/bug660002.js new file mode 100644 index 0000000000..f1bc7ab737 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug660002.js @@ -0,0 +1,4 @@ +// |jit-test| error: ReferenceError +(function() { + let V = x(x, x = w), x +})() diff --git a/js/src/jit-test/tests/jaeger/bug662072.js b/js/src/jit-test/tests/jaeger/bug662072.js new file mode 100644 index 0000000000..04c198ccdd --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug662072.js @@ -0,0 +1,7 @@ +(function () { + var x; + x = arguments.length; + return function () { + [1][x = arguments.length]; + }; +}).call().apply(); diff --git a/js/src/jit-test/tests/jaeger/bug662082.js b/js/src/jit-test/tests/jaeger/bug662082.js new file mode 100644 index 0000000000..533fee8ba3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug662082.js @@ -0,0 +1,11 @@ + +function foo(z) +{ + var x = 2; + if (z) { + x = 2.5; + } + var y = x * 10; + assertEq(y, 20); +} +foo(false); diff --git a/js/src/jit-test/tests/jaeger/bug663485.js b/js/src/jit-test/tests/jaeger/bug663485.js new file mode 100644 index 0000000000..3e177e406a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug663485.js @@ -0,0 +1,17 @@ +function makeExpectedMatch(arr) { + expectedMatch = { + x: arr.length + } +} +var expected = makeExpectedMatch(new Int32Array); +JSON.stringify(this); + +function testTypedArrayOther() { + var ar = new Int32Array; + for (; i < ar; ++i) { + ar[i] = i; + } + for (var i = 0; i<40; i++) { + } +} +testTypedArrayOther(); diff --git a/js/src/jit-test/tests/jaeger/bug663910.js b/js/src/jit-test/tests/jaeger/bug663910.js new file mode 100644 index 0000000000..33997a3c4c --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug663910.js @@ -0,0 +1,22 @@ +var otherGlobalSameCompartment = newGlobal("same-compartment"); +eval = otherGlobalSameCompartment.eval; +doesNotNeedParens(1, "if (xx) { }"); +needParens(2, "if (1, xx) { }"); +function doesNotNeedParens(section, pat) { + try { + f = new Function + } catch (e) {} + roundTripTest(section, f) +} +function needParens(section, pat, exp) { + var f, ft; + roundTripTest(section, f, exp) +} +function roundTripTest(section, f, exp) { + uf = "" + f + var euf; + try { + euf = eval("(" + uf + ")"); + } catch (e) { } + + euf +} diff --git a/js/src/jit-test/tests/jaeger/bug669706.js b/js/src/jit-test/tests/jaeger/bug669706.js new file mode 100644 index 0000000000..a3ddb43588 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug669706.js @@ -0,0 +1,14 @@ +function printStatus(msg) { + msg.toString() + lines = msg + for (var i = 0; i < lines; i++) i +} +var summary = new Float32Array; +try { + printStatus(summary) + x = { + } + toString.__proto__ = x +} catch (e) {} +var summary = 6; +printStatus(summary) diff --git a/js/src/jit-test/tests/jaeger/bug670885.js b/js/src/jit-test/tests/jaeger/bug670885.js new file mode 100644 index 0000000000..a1d8bcbe7b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug670885.js @@ -0,0 +1,16 @@ +// arr is an Int8Array, then changes to Int16Array. +// This should trigger recompilation of f. +var arr = new Int8Array(100); +var arr16 = new Int16Array(100); +arr16[2] = 12345; +function f(a) { + var x; + for(var i=0; i<30; i++) { + x = a[2]; + } + return x; +} +assertEq(f(arr), 0); +assertEq(f(arr), 0); +this.arr = arr16; +assertEq(f(arr), 12345); diff --git a/js/src/jit-test/tests/jaeger/bug672122.js b/js/src/jit-test/tests/jaeger/bug672122.js new file mode 100644 index 0000000000..14802554e2 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug672122.js @@ -0,0 +1,3 @@ +// |jit-test| error: ReferenceError + +if (x) {} else if ((evalcx('lazy'))++) {} diff --git a/js/src/jit-test/tests/jaeger/bug678234.js b/js/src/jit-test/tests/jaeger/bug678234.js new file mode 100644 index 0000000000..52a421553a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug678234.js @@ -0,0 +1,10 @@ +a = {} +function f(o) { + for (x in o) { + print + } +} +for (var i = 0; i < 3; i++) { + new f(a) + a.__proto__ = null +} diff --git a/js/src/jit-test/tests/jaeger/bug678782.js b/js/src/jit-test/tests/jaeger/bug678782.js new file mode 100644 index 0000000000..1549bbe770 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug678782.js @@ -0,0 +1,9 @@ +var i = -1; var j = -1; var s = ''; var f = ''; +var buf = serialize(new Date(NaN)); +var a = [1/0, -1/0, 8.64e15 + 1, -(8.64e15 + 1)]; +for (var i = 0; i < a.length; i++) { + var n = a[i]; + var nbuf = serialize(n); + for (var Number ; j < 8; j++) + buf[j + 8] = nbuf[j]; +} diff --git a/js/src/jit-test/tests/jaeger/bug679666.js b/js/src/jit-test/tests/jaeger/bug679666.js new file mode 100644 index 0000000000..986195ebc3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug679666.js @@ -0,0 +1,22 @@ +var arr = new Int32Array(20); + +function f(a1, a2) { + for (var i=0; i<10; i++) { + g1 = a2; + arr[a1] = a2; + assertEq(g1, a2); + + if ([1].length === 10) { + a1 = {}; + } + } +} + +f(1, eval("{}")); + +for (var i=0; i<5; i++) { + f(2, 3); + f(5, -6.1); +} +assertEq(arr[2], 3); +assertEq(arr[5], -6); diff --git a/js/src/jit-test/tests/jaeger/bug680842.js b/js/src/jit-test/tests/jaeger/bug680842.js new file mode 100644 index 0000000000..016673fb72 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug680842.js @@ -0,0 +1,27 @@ + +var gTestcases = new Array; +var gTc = gTestcases; +var msg = ''; +function TestCase(n, d, e, a) { + gTestcases[gTc++]=this; +} +TestCase.prototype.dump=function () { + lines = msg + for (var i=0; i v3 + v3=1.7 + } while (p1 * v0 > p0); + + v3; +} +f0(4105,8307); diff --git a/js/src/jit-test/tests/jaeger/bug682345.js b/js/src/jit-test/tests/jaeger/bug682345.js new file mode 100644 index 0000000000..94d610748d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug682345.js @@ -0,0 +1,16 @@ +// |jit-test| error: TypeError + +for (var i = 0; i <= 0x017f; i++) { + var U = new Unicode(i); +} +function Unicode(c) { + u = GetUnicodeValues(c); + this.upper = u[0]; +} +function GetUnicodeValues(c) { + u = new Array(); + if ((c >= 0x0100 && c < 0x0138) || (c > 0x0149 && c < 0x0178)) try {} finally { + return; + } + return u; +} diff --git a/js/src/jit-test/tests/jaeger/bug684084-2.js b/js/src/jit-test/tests/jaeger/bug684084-2.js new file mode 100644 index 0000000000..34ddae320a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug684084-2.js @@ -0,0 +1,8 @@ +function Function() { + try { + var g = this; + g.c("evil", eval); + } catch(b) {} +} +var o0 = Function.prototype; +var f = new Function( (null ) ); diff --git a/js/src/jit-test/tests/jaeger/bug684084.js b/js/src/jit-test/tests/jaeger/bug684084.js new file mode 100644 index 0000000000..ac2c11a384 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug684084.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError +function Integer( value, exception ) { + try { } catch ( e ) { } + new (value = this)( this.value ); + if ( Math.floor(value) != value || isNaN(value) ) { } +} +new Integer( 3, false ); diff --git a/js/src/jit-test/tests/jaeger/bug684576.js b/js/src/jit-test/tests/jaeger/bug684576.js new file mode 100644 index 0000000000..b845d2160d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug684576.js @@ -0,0 +1,10 @@ +// |jit-test| error: TypeError +function f0(p0,p1) { + var v3; + do { + p1 > v3 + v3=1.7 + } while (((p0[p1][5]==1)||(p0[p1][5]==2)||(p0[p1][5] == 3)) + 0 > p0); + + (v3(f0)); +} +f0(4105,8307); diff --git a/js/src/jit-test/tests/jaeger/bug684824.js b/js/src/jit-test/tests/jaeger/bug684824.js new file mode 100644 index 0000000000..9e8ad9c7ee --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug684824.js @@ -0,0 +1,7 @@ + +function X(n) { + while ('' + (n--)) { + break; + } +} +X(); diff --git a/js/src/jit-test/tests/jaeger/bug684943.js b/js/src/jit-test/tests/jaeger/bug684943.js new file mode 100644 index 0000000000..69ec5ca2bd --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug684943.js @@ -0,0 +1,7 @@ + +function foo(x) { + for (var i = 0; i < 100; i++) { + x.f === i; + } +} +foo({f:"three"}); diff --git a/js/src/jit-test/tests/jaeger/bug687768.js b/js/src/jit-test/tests/jaeger/bug687768.js new file mode 100644 index 0000000000..a4b2b4adeb --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug687768.js @@ -0,0 +1,17 @@ + +expected = '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,'; +function slice(a, b) { + return expected; +} +function f() { + var length = 4; + var index = 0; + function get3() { + if (length - index < 3) + return null; + return slice(index, ++index); + } + var bytes = null; + while (bytes = get3()) { } +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug693311.js b/js/src/jit-test/tests/jaeger/bug693311.js new file mode 100644 index 0000000000..39d69ab257 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug693311.js @@ -0,0 +1,8 @@ +function f(x) { + assertEq("a" !== x, true); + assertEq("b" != x, true); + assertEq("c" === x, false); + assertEq("d" == x, false); +} +f(1); +f(1); diff --git a/js/src/jit-test/tests/jaeger/bug704138.js b/js/src/jit-test/tests/jaeger/bug704138.js new file mode 100644 index 0000000000..71e4958875 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug704138.js @@ -0,0 +1,21 @@ +load(libdir + "immutable-prototype.js"); + +function TestCase(n, d, e, a) { + this.name=n; + return n; +} + +function reportCompare (expected, actual, description) { + new TestCase +} + +reportCompare(true, "isGenerator" in Function, "Function.prototype.isGenerator present"); +var p = new Proxy({}, {}); +function test() { + TestCase.prototype.__proto__=null + if (new TestCase) + TestCase.prototype.__proto__=p +} +test(); +new TestCase; +test() diff --git a/js/src/jit-test/tests/jaeger/bug705873.js b/js/src/jit-test/tests/jaeger/bug705873.js new file mode 100644 index 0000000000..1d4d65246a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug705873.js @@ -0,0 +1,7 @@ +a = [] +function f(o) { + o[5] = {} +} +for (var i = 0; i < 20; i++) { + with(a) f(a) +} diff --git a/js/src/jit-test/tests/jaeger/bug706110.js b/js/src/jit-test/tests/jaeger/bug706110.js new file mode 100644 index 0000000000..ef1e657ca6 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug706110.js @@ -0,0 +1,18 @@ +function test() { + function Bug() { this.prototype } + var actual = (new Bug instanceof Bug); + assertEq(actual, true); +} +test(); +test(); + +function testLambdaCtor() { + var q; + for (var x = 0; x < 2; ++x) { + var f = function(){}; + if (x == 1) gc(); + q = new f; + } + return q.__proto__ === f.prototype; +} +assertEq(testLambdaCtor(), true); diff --git a/js/src/jit-test/tests/jaeger/bug707641.js b/js/src/jit-test/tests/jaeger/bug707641.js new file mode 100644 index 0000000000..3df5893941 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug707641.js @@ -0,0 +1,7 @@ +function a(a, prototype) { + try { + typeof (arguments[a]) in code + } catch(e) {} +} +a(); +a(); diff --git a/js/src/jit-test/tests/jaeger/bug709067.js b/js/src/jit-test/tests/jaeger/bug709067.js new file mode 100644 index 0000000000..3e3bd70b8b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug709067.js @@ -0,0 +1,11 @@ +called = 0; +Object.defineProperty(Object.prototype, 0, {set: function() { called++; }}); +function testInit() +{ + var a = []; + for (var i = 0; i < 5; i++) + a[i] = 0; +} +for (var i = 0; i < 100; i++) + testInit(); +assertEq(called, 100); diff --git a/js/src/jit-test/tests/jaeger/bug710780.js b/js/src/jit-test/tests/jaeger/bug710780.js new file mode 100644 index 0000000000..84d2646921 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug710780.js @@ -0,0 +1,12 @@ + +function foo() { + function bar() { + function baz() { + assertEq(arguments.callee.caller === null, false); + } + for (var i = 0; i < 10; i++) + baz(); + } + bar(); +} +foo(); diff --git a/js/src/jit-test/tests/jaeger/bug714645.js b/js/src/jit-test/tests/jaeger/bug714645.js new file mode 100644 index 0000000000..2bcfa25982 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug714645.js @@ -0,0 +1,12 @@ + +function testAddInconvertibleObjectAny() { + var count = 0; + function toString() { } + try { + for (var i = 0; i < 100; i++) + var q = count[count] && this ? testAddInconvertibleObjectAny : ++toString; + } catch (e) { + var dbg = count(toString); + } +} +testAddInconvertibleObjectAny(); diff --git a/js/src/jit-test/tests/jaeger/bug719918.js b/js/src/jit-test/tests/jaeger/bug719918.js new file mode 100644 index 0000000000..388189269e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug719918.js @@ -0,0 +1,17 @@ +function test(m) { + do { + if (m = arr[0]) break; + m = 0; + } + while (0); + arr[1] = m; +} + +arr = new Float64Array(2); + +// run function a lot to trigger methodjit compile +for(var i=0; i<200; i++) + test(0); + +// should return 0, not NaN +assertEq(arr[1], 0) diff --git a/js/src/jit-test/tests/jaeger/bug732423.js b/js/src/jit-test/tests/jaeger/bug732423.js new file mode 100644 index 0000000000..caf6d116d8 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug732423.js @@ -0,0 +1,22 @@ +function testStuff(x, y) { + for (var i = 0; i < 60; i++) { + x[y](); + x[y]; + } +} +testStuff({"elements":function(){}}, "elements"); + +var o = { + res: 0, + f: function() { this.res += 3; }, + __noSuchMethod__: function() { this.res += 5; } +}; + +function testNoSuchMethod(x, y) { + for (var i = 0; i < 60; i++) { + x[y](); + } +} + +testNoSuchMethod(o, "f"); +assertEq(o.res, 180); diff --git a/js/src/jit-test/tests/jaeger/bug735161.js b/js/src/jit-test/tests/jaeger/bug735161.js new file mode 100644 index 0000000000..c127253fa1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug735161.js @@ -0,0 +1,4 @@ +var obj = {valueOf: function() { "use strict"; undeclared = 7; }}; +try { '' + obj; assertEq(true, false); } catch(e) { } +try { '' + obj; assertEq(true, false); } catch(e) { } +assertEq("undeclared" in this, false); diff --git a/js/src/jit-test/tests/jaeger/bug738525.js b/js/src/jit-test/tests/jaeger/bug738525.js new file mode 100644 index 0000000000..0e531fa455 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug738525.js @@ -0,0 +1,37 @@ +// Test IC for getters backed by a JSNative. +function test1() { + for (var i = 0; i < 60; i++) { + assertEq(it.customNative, undefined); + } + + var res = 0; + for (var i = 0; i < 60; i++) { + it.customNative = i; + res += it.customNative; + } + + assertEq(res, 1770); +} +function test2() { + function getValue() { + return it.customNative; + } + + for (var i = 0; i < 60; i++) { + it.customNative = i; + assertEq(getValue(), i); + } + + for (var i = 0; i < 60; i++) { + it.customNative = null; + assertEq(getValue(), null); + + delete it["customNativ" + "e"]; + assertEq(getValue(), undefined); + assertEq(it.customNative, undefined); + } +} +if ("it" in this) { + test1(); + test2(); +} diff --git a/js/src/jit-test/tests/jaeger/bug742393.js b/js/src/jit-test/tests/jaeger/bug742393.js new file mode 100644 index 0000000000..76d7d5f1c7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug742393.js @@ -0,0 +1,11 @@ +var global = 0; +Object.defineProperty(Array.prototype, "2", {get: function() { return global++; }}); + +function f() { + var a = []; + var b = [0, 1, , 3]; + for (var i=0; i<100; i++) + var c = a.concat(b); + assertEq(c[2], 99); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/bug751320.js b/js/src/jit-test/tests/jaeger/bug751320.js new file mode 100644 index 0000000000..2013150aa7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug751320.js @@ -0,0 +1,22 @@ +datediff = function(date1, date2, interval) { + var delta = 1; + switch(interval) { + case "day": + delta /= 24; + case "hour": + delta /= 60; + case "minute": + delta /= 60; + case "second": + delta /= 1000; + case "millisecond": + delta *= date2.getTime() - date1.getTime(); + } + return Math.round(delta); +}; + +var diff = datediff(new Date("2012-04-28T14:30:00Z"), new Date("2012-04-29T14:30:00Z"), "day"); +for (var i = 0; i < 50; i++) { + diff = datediff(new Date("2012-04-28T17:00:00Z"), new Date("2012-04-28T17:30:00Z"), "minute"); + assertEq(diff, 30); +} diff --git a/js/src/jit-test/tests/jaeger/bug767961.js b/js/src/jit-test/tests/jaeger/bug767961.js new file mode 100644 index 0000000000..b5516bd01e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug767961.js @@ -0,0 +1,6 @@ +function C() { + this.x = this[this.y = "foo"]--; +} + +// Don't crash. +new C; diff --git a/js/src/jit-test/tests/jaeger/bug768313.js b/js/src/jit-test/tests/jaeger/bug768313.js new file mode 100644 index 0000000000..1062354879 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug768313.js @@ -0,0 +1,6 @@ +// |jit-test| --dump-bytecode + +function f() { } +evaluate('function g() { f(); }'); +for (var i = 0; i < 2; i++) + g(0); diff --git a/js/src/jit-test/tests/jaeger/bug769985.js b/js/src/jit-test/tests/jaeger/bug769985.js new file mode 100644 index 0000000000..39c6a056b4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug769985.js @@ -0,0 +1,19 @@ + +/* Make sure ints are converted to doubles as needed at the head of loops which modify those ints. */ + +function bar() {} + +function foo() { + var n = 0.5; + n -= 0.5; + var iters = 0; + for (var i = n;; ) { + bar(); + iters++; + if (i == 100) + break; + i = (i + 1) | 0; + } + assertEq(iters, 101); +} +foo(); diff --git a/js/src/jit-test/tests/jaeger/bug771871.js b/js/src/jit-test/tests/jaeger/bug771871.js new file mode 100644 index 0000000000..23d91aab26 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug771871.js @@ -0,0 +1,7 @@ +function test() { + var box = { call: function () { return 42.1; } }; + for (var i = 0; i < 50; i++) { + assertEq(box.call(undefined, 42.1), 42.1); + } +} +test(); diff --git a/js/src/jit-test/tests/jaeger/bug781859-1.js b/js/src/jit-test/tests/jaeger/bug781859-1.js new file mode 100644 index 0000000000..7a28c02b77 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug781859-1.js @@ -0,0 +1,25 @@ +// |jit-test| error:ReferenceError +function e() { + try {} catch (e) { + return (actual = "FAIL"); + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + a.x + } + while (t) continue; +} +e(); diff --git a/js/src/jit-test/tests/jaeger/bug781859-2.js b/js/src/jit-test/tests/jaeger/bug781859-2.js new file mode 100644 index 0000000000..e738bc0883 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug781859-2.js @@ -0,0 +1,8 @@ +Function("\ + switch (/x/) {\ + case 8:\ + break;\ + t(function(){})\ + }\ + while (false)(function(){})\ +")() diff --git a/js/src/jit-test/tests/jaeger/bug781859-3.js b/js/src/jit-test/tests/jaeger/bug781859-3.js new file mode 100644 index 0000000000..ab3f39b289 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug781859-3.js @@ -0,0 +1,9 @@ +function e() { + try { + var t = undefined; + } catch (e) { } + while (t) + continue; +} +for (var i = 0; i < 20; i++) + e(); diff --git a/js/src/jit-test/tests/jaeger/bug819035.js b/js/src/jit-test/tests/jaeger/bug819035.js new file mode 100644 index 0000000000..846310b2a2 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug819035.js @@ -0,0 +1,38 @@ +// This test case check the difference between fp->callee() and fp->fun() on +// lambdas. +(function (a, u) { + var sum = function (array, callback) { + for (var i = 0; i < array.length; i++) + callback(array[i]); + }; + (function () { + (function r(t) { + t !== u, + sum(t, function (v) { return r(v); } ); + })(arguments); + })(a); +}) ( + [ + [ + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1] + ], [ + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], + [1], [1], [1], [1], [1], [1], [1], [1], [1], [1] + ] + ] +); diff --git a/js/src/jit-test/tests/jaeger/bug825966.js b/js/src/jit-test/tests/jaeger/bug825966.js new file mode 100644 index 0000000000..44e165d333 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug825966.js @@ -0,0 +1,18 @@ +datediff = function(date1, date2, interval) { + var delta = 1; + switch(interval) { + case "day": + delta /= 24; + case "minute": + delta /= 60; + case Math: + break; + } + return delta; +}; + +var diff = datediff(new Date("2012-04-28T14:30:00Z"), new Date("2012-04-29T14:30:00Z"), "day"); +for (var i = 0; i < 50; i++) { + diff = datediff(new Date("2012-04-28T17:00:00Z"), new Date("2012-04-28T17:30:00Z"), "minute"); + assertEq(diff, 1/60); +} diff --git a/js/src/jit-test/tests/jaeger/chunk/bug712267.js b/js/src/jit-test/tests/jaeger/chunk/bug712267.js new file mode 100644 index 0000000000..929d4d5b73 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/chunk/bug712267.js @@ -0,0 +1,14 @@ +expected = 100; +function slice(a, b) { + return expected--; +} +function f() { + var length = 8.724e02 ; + var index = 0; + function get3() { + return slice(index, ++index); + } + var bytes = null; + while (bytes = get3()) { } +} +f(); diff --git a/js/src/jit-test/tests/jaeger/clonefun.js b/js/src/jit-test/tests/jaeger/clonefun.js new file mode 100644 index 0000000000..950ae39227 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/clonefun.js @@ -0,0 +1,17 @@ + +// Functions which have been marked as singletons should not be cloned. + +BeatDetektor = function() +{ + this.config = BeatDetektor.config; + + assertEq(this.config.a, 0); + assertEq(this.config.b, 1); +} + +BeatDetektor.config_default = { a:0, b:1 }; +BeatDetektor.config = BeatDetektor.config_default; + +var bd = new BeatDetektor(); + +assertEq(bd.config === BeatDetektor.config, true); diff --git a/js/src/jit-test/tests/jaeger/closure-01.js b/js/src/jit-test/tests/jaeger/closure-01.js new file mode 100644 index 0000000000..4c82b6fd35 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/closure-01.js @@ -0,0 +1,18 @@ + +/* Non-reentrant call on an inner and outer closure. */ + +function foo() { + var x = 0; + function bar() { + var y = 0; + function baz() { + return ++x + ++y; + } + return baz; + } + return bar(); +} + +var a = foo(); +var b = foo(); +assertEq(a() + a() + b() + b(), 12); diff --git a/js/src/jit-test/tests/jaeger/closure-02.js b/js/src/jit-test/tests/jaeger/closure-02.js new file mode 100644 index 0000000000..902c8f5ae7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/closure-02.js @@ -0,0 +1,14 @@ + +/* Non-reentrant closure used in an invoke session. */ + +var last = null; + +var a = [1,2,3,4,5,6,7,8]; +var b = a.map(function(x) { + x++; + var res = last ? last() : 0; + last = function() { return x; }; + return res; + }); + +assertEq("" + b, "0,2,3,4,5,6,7,8"); diff --git a/js/src/jit-test/tests/jaeger/closure-03.js b/js/src/jit-test/tests/jaeger/closure-03.js new file mode 100644 index 0000000000..e2d1ebe3f8 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/closure-03.js @@ -0,0 +1,15 @@ + +/* Recovering non-reentrant information on singletons after a GC. */ + +function foo(a) { + return function() { + gc(); + var n = 0; + for (var i = 0; i < 20; i++) + n = a++; + assertEq(n, 29); + }; +} +var a = foo(10); +var b = foo(20); +a(); diff --git a/js/src/jit-test/tests/jaeger/closure-04.js b/js/src/jit-test/tests/jaeger/closure-04.js new file mode 100644 index 0000000000..10f8e447a1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/closure-04.js @@ -0,0 +1,30 @@ +var depth = 0; +test(); +function test() { + // |test()| is called recursively. When the generator runs in the JIT, the + // recursion limit is ~20x higher than in the interpreter. Limit the depth + // here so that the test doesn't timeout or becomes extremely slow. + if (++depth > 400) + return; + + var catch1, catch2, catch3, finally1, finally2, finally3; + function* gen() { + yield 1; + try { + try { + try { + yield 1; + } finally { + test(); + } + } catch (e) { + finally2 = true; + } + } catch (e) { } + } + iter = gen(); + iter.next(); + iter.next(); + iter.return(); + gc(); +} diff --git a/js/src/jit-test/tests/jaeger/closure-05.js b/js/src/jit-test/tests/jaeger/closure-05.js new file mode 100644 index 0000000000..b2aeffa365 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/closure-05.js @@ -0,0 +1,17 @@ +var gTestcases = new Array(); +var gTc = gTestcases.length; +function TestCase(n, d, e, a) { + gTestcases[gTc++] = this; +} +new TestCase("SECTION", "with MyObject, eval should return square of "); +test(); +function test() { + for (gTc = 0; gTc < gTestcases.length; gTc++) { + var MYOBJECT = (function isPrototypeOf(message) { + delete input; + })(); + with({}) { + gTestcases[gTc].actual = eval(""); + } + } +} diff --git a/js/src/jit-test/tests/jaeger/compare-wrong-1.js b/js/src/jit-test/tests/jaeger/compare-wrong-1.js new file mode 100644 index 0000000000..dec3ada457 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/compare-wrong-1.js @@ -0,0 +1,4 @@ +function f(a) { return a; } +assertEq(print < f, false); +assertEq(print > f, true); + diff --git a/js/src/jit-test/tests/jaeger/crash-on-compare.js b/js/src/jit-test/tests/jaeger/crash-on-compare.js new file mode 100644 index 0000000000..5abd7aa045 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/crash-on-compare.js @@ -0,0 +1 @@ +assertEq(Infinity >= Infinity ? true : false, true); diff --git a/js/src/jit-test/tests/jaeger/deepBailAfterRunTracer.js b/js/src/jit-test/tests/jaeger/deepBailAfterRunTracer.js new file mode 100644 index 0000000000..63399a4743 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/deepBailAfterRunTracer.js @@ -0,0 +1,25 @@ +var o = { }; +for (var i = 0; i <= 50; i++) + o[i] = i; + +Object.defineProperty(o, "51", { get: assertEq }); + +var threw = 0; +function g(o, i) { + try { + assertEq(o[i], i); + } catch (e) { + threw++; + } +} + +function f() { + for (var i = 0; i <= 51; i++) + g(o, i); +} + +f(); +f(); +f(); +assertEq(threw, 3); + diff --git a/js/src/jit-test/tests/jaeger/floatTypedArrays.js b/js/src/jit-test/tests/jaeger/floatTypedArrays.js new file mode 100644 index 0000000000..51ea7c0a16 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/floatTypedArrays.js @@ -0,0 +1,64 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function testFloat32Array(L) { + var f = new Float32Array(8); + assertEq(f[0], 0); + assertEq(f[L], 0); + assertEq(f[L+8], undefined); + assertEq(f[8], undefined); + f[0] = 12; + f[L+1] = 13.5; + f[2] = f[1]; + f[L+3] = 4294967295; + f[L+4] = true; + f[L+5] = L; + assertEq(f[0], 12); + assertEq(f[1], 13.5); + assertEq(f[2], 13.5); + assertEq(f[3], 4294967296); + assertEq(f[4], 1); + assertEq(f[5], 0); +} + +function testFloat64Array(L) { + var f = new Float64Array(8); + assertEq(f[0], 0); + assertEq(f[L], 0); + assertEq(f[L+8], undefined); + assertEq(f[8], undefined); + f[0] = 12; + f[L+1] = 13.5; + f[2] = f[1]; + f[L+3] = 4294967295; + f[L+4] = true; + f[L+5] = L; + assertEq(f[0], 12); + assertEq(f[1], 13.5); + assertEq(f[2], 13.5); + assertEq(f[3], 4294967295); + assertEq(f[4], 1); + assertEq(f[5], 0); +} + +function testNaNCanonicalization() { + var buf = new ArrayBuffer(128); + + var u8 = new Uint8Array(buf); + for (var i = 0; i < 128; i++) + u8[i] = 0xFF; + + var dblarr = new Float64Array(buf); + var asstr = dblarr[0] + ""; + var asnum = dblarr[0] + 0.0; + assertEq(asstr, "NaN"); + assertEq(asnum, NaN); +} + +for (var i = 0; i < 10; i++) { + //testFloat32Array(0); + //testFloat64Array(0); + testNaNCanonicalization(); + if (i == 5) + gc(); +} + diff --git a/js/src/jit-test/tests/jaeger/fromCharCode.js b/js/src/jit-test/tests/jaeger/fromCharCode.js new file mode 100644 index 0000000000..971878372d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/fromCharCode.js @@ -0,0 +1,8 @@ +/* +* Any copyright is dedicated to the Public Domain. +* http://creativecommons.org/licenses/publicdomain/ +*/ + +for (var i = 0; i <= 0xFFFF; i++) { + assertEq(String.fromCharCode(i).charCodeAt(0), i); +} diff --git a/js/src/jit-test/tests/jaeger/fused-eq-ifeq.js b/js/src/jit-test/tests/jaeger/fused-eq-ifeq.js new file mode 100644 index 0000000000..b5d2bf2f61 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/fused-eq-ifeq.js @@ -0,0 +1,6 @@ +function ack(m,n){ + if (m==0) { return n+1; } + if (n==0) { return ack(m-1,1); } + return ack(m-1, ack(m,n-1) ); +} +assertEq(ack(3, 3), 61); diff --git a/js/src/jit-test/tests/jaeger/getelem-sanity-1.js b/js/src/jit-test/tests/jaeger/getelem-sanity-1.js new file mode 100644 index 0000000000..4bad91eccb --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getelem-sanity-1.js @@ -0,0 +1,9 @@ +var obj = {attr: 'value'}; + +(function() { + var name = 'attr'; + for (var i = 0; i < 10; ++i) + assertEq(obj[name], 'value'); +})(); + +/* Look up a string id. */ diff --git a/js/src/jit-test/tests/jaeger/getelem-sanity-2.js b/js/src/jit-test/tests/jaeger/getelem-sanity-2.js new file mode 100644 index 0000000000..399219b482 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getelem-sanity-2.js @@ -0,0 +1,22 @@ +var obj = {firstAttr: 'value', secondAttr: 'another value'}; + +(function() { + for (var i = 0; i < 12; ++i) { + var name; + if (i < 4) + name = 'firstAttr'; + else if (i < 8) + name = 'secondAttr'; + else + name = 'firstAttr'; + + var result = obj[name]; + + switch (name) { + case 'firstAttr': assertEq(result, 'value'); break; + case 'secondAttr': assertEq(result, 'another value'); break; + } + } +})(); + +/* Toggle lookup between two ids. */ diff --git a/js/src/jit-test/tests/jaeger/getelem-sanity-3.js b/js/src/jit-test/tests/jaeger/getelem-sanity-3.js new file mode 100644 index 0000000000..4b5b879001 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getelem-sanity-3.js @@ -0,0 +1,22 @@ +var obj = {firstAttr: 'value', secondAttr: 'another value', thirdAttr: 'the last value'}; + +(function() { + for (var i = 0; i < 64; ++i) { + var name; + switch (~~(i / 4) % 3) { + case 0: name = 'firstAttr'; break; + case 1: name = 'secondAttr'; break; + case 2: name = 'thirdAttr'; break; + } + + var result = obj[name]; + + switch (name) { + case 'firstAttr': assertEq(result, 'value'); break; + case 'secondAttr': assertEq(result, 'another value'); break; + case 'thirdAttr': assertEq(result, 'the last value'); break; + } + } +})(); + +/* Rotate lookup between three ids. */ diff --git a/js/src/jit-test/tests/jaeger/getelem-sanity-4.js b/js/src/jit-test/tests/jaeger/getelem-sanity-4.js new file mode 100644 index 0000000000..983713376e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getelem-sanity-4.js @@ -0,0 +1,51 @@ +var obj = { + attr0: 'val0', + attr1: 'val1', + attr2: 'val2', + attr3: 'val3', + attr4: 'val4', + attr5: 'val5', + attr6: 'val6', + attr7: 'val7', + attr8: 'val8', + attr9: 'val9', + attr10: 'val10', + attr11: 'val11', + attr12: 'val12', + attr13: 'val13', + attr14: 'val14', + attr15: 'val15', + attr16: 'val16', + attr17: 'val17', +} + +var baseName = 'attr'; + +(function() { + for (var i = 0; i < 128; ++i) { + var name = baseName + (i % 18); + var result = obj[name]; + switch (i) { + case 0: assertEq('val0', result); break; + case 1: assertEq('val1', result); break; + case 2: assertEq('val2', result); break; + case 3: assertEq('val3', result); break; + case 4: assertEq('val4', result); break; + case 5: assertEq('val5', result); break; + case 6: assertEq('val6', result); break; + case 7: assertEq('val7', result); break; + case 8: assertEq('val8', result); break; + case 9: assertEq('val9', result); break; + case 10: assertEq('val10', result); break; + case 11: assertEq('val11', result); break; + case 12: assertEq('val12', result); break; + case 13: assertEq('val13', result); break; + case 14: assertEq('val14', result); break; + case 15: assertEq('val15', result); break; + case 16: assertEq('val16', result); break; + case 17: assertEq('val17', result); break; + } + } +})(); + +/* Megamorphic index atom. */ diff --git a/js/src/jit-test/tests/jaeger/getelem-sanity-5.js b/js/src/jit-test/tests/jaeger/getelem-sanity-5.js new file mode 100644 index 0000000000..e825471530 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getelem-sanity-5.js @@ -0,0 +1,4 @@ +var x = { 0: 5, 1: 5 }; +assertEq(x[0] + x[1], 10); + +/* int32_t getelem on object. */ diff --git a/js/src/jit-test/tests/jaeger/getelem-sanity-6.js b/js/src/jit-test/tests/jaeger/getelem-sanity-6.js new file mode 100644 index 0000000000..693453d69b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getelem-sanity-6.js @@ -0,0 +1,4 @@ +var x = {1: 2, 3: 4}; +assertEq(x[1], 2); + +/* getelem with non-dense array and known type int32. */ diff --git a/js/src/jit-test/tests/jaeger/getelem-sanity-7.js b/js/src/jit-test/tests/jaeger/getelem-sanity-7.js new file mode 100644 index 0000000000..483d8b5584 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getelem-sanity-7.js @@ -0,0 +1,10 @@ +var obj = {count: 24}; +var key = 'count'; + +for (var i = 0; i < 1024; ++i) { + var result = obj[key]; + if (i === 2) + obj.newAttr = 42; +} + +/* Perform getelem across shape change. */ diff --git a/js/src/jit-test/tests/jaeger/getelem-sanity-8.js b/js/src/jit-test/tests/jaeger/getelem-sanity-8.js new file mode 100644 index 0000000000..f203216ac2 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getelem-sanity-8.js @@ -0,0 +1,13 @@ + +// TI does not account for GETELEM accessing strings, so the GETELEM PIC must +// update type constraints according to generated stubs. +function foo(a, b) { + for (var j = 0; j < 5; j++) + a[b[j]] + " what"; +} +var a = {a:"zero", b:"one", c:"two", d:"three", e:"four"}; +var b = ["a", "b", "c", "d", "e"]; +foo(a, b); +foo(a, b); +a.e = 4; +foo(a, b); diff --git a/js/src/jit-test/tests/jaeger/getelem-sanity-int-1.js b/js/src/jit-test/tests/jaeger/getelem-sanity-int-1.js new file mode 100644 index 0000000000..d278a97dc4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getelem-sanity-int-1.js @@ -0,0 +1,7 @@ +var arr = ['this', 'works', 'for', 'me']; +assertEq('this', arr[0]); +assertEq('works', arr[1]); +assertEq('for', arr[2]); +assertEq('me', arr[3]); + +/* Multiple int32_t getelem for dense array. */ diff --git a/js/src/jit-test/tests/jaeger/getelem-sanity-int-2.js b/js/src/jit-test/tests/jaeger/getelem-sanity-int-2.js new file mode 100644 index 0000000000..add4568ef7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getelem-sanity-int-2.js @@ -0,0 +1,12 @@ +var arr = ['this', 'works', 'for', 'me']; +for (var i = 0; i < arr.length; ++i) { + var result = arr[i]; + switch (i) { + case 0: assertEq('this', result); break; + case 1: assertEq('works', result); break; + case 2: assertEq('for', result); break; + case 3: assertEq('me', result); break; + } +} + +/* int32_t getelem for dense array. */ diff --git a/js/src/jit-test/tests/jaeger/getelem-sanity-int-3.js b/js/src/jit-test/tests/jaeger/getelem-sanity-int-3.js new file mode 100644 index 0000000000..91fb50f50e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getelem-sanity-int-3.js @@ -0,0 +1,19 @@ +var a = [1, 2]; +a[3.1415926535] = 'value'; + +for (var i = 0; i < 3; i++) { + var attr; + switch (i) { + case 0: attr = 0; break; + case 1: attr = 1; break; + case 2: attr = 3.1415926535; break; + } + var result = a[attr]; + switch (i) { + case 0: assertEq(result, 1); break; + case 1: assertEq(result, 2); break; + case 2: assertEq(result, 'value'); break; + } +} + +/* int32_t and string getelem for non-dense array. */ diff --git a/js/src/jit-test/tests/jaeger/getter-hook-1.js b/js/src/jit-test/tests/jaeger/getter-hook-1.js new file mode 100644 index 0000000000..29ab9552eb --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getter-hook-1.js @@ -0,0 +1,18 @@ +// GETPROP PIC with multiple stubs containing getter hooks. + +function foo(arr) { + for (var i = 0; i < 100; i++) + arr[i].caller; +} +arr = Object.create(Object.prototype); +first = Object.create({}); +first.caller = null; +second = Object.create({}); +second.caller = null; +for (var i = 0; i < 100; ) { + arr[i++] = first; + arr[i++] = foo; + arr[i++] = second; +} +foo.caller; +foo(arr); diff --git a/js/src/jit-test/tests/jaeger/getter-hook-2.js b/js/src/jit-test/tests/jaeger/getter-hook-2.js new file mode 100644 index 0000000000..4361ce1262 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/getter-hook-2.js @@ -0,0 +1,19 @@ +// PIC on CALLPROP invoking getter hook. + +function foo(arr) { + for (var i = 0; i < 100; i++) + arr[i].caller(false); +} +arr = Object.create(Object.prototype); +first = Object.create({}); +first.caller = bar; +second = Object.create({}); +second.caller = bar; +for (var i = 0; i < 100; ) + arr[i++] = foo; +foo.caller; +function bar(x) { + if (x) + foo(arr); +} +bar(true); diff --git a/js/src/jit-test/tests/jaeger/globalOptimize-1.js b/js/src/jit-test/tests/jaeger/globalOptimize-1.js new file mode 100644 index 0000000000..f90114c334 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/globalOptimize-1.js @@ -0,0 +1,5 @@ +/* Test that NaN does not trigger js_InitMathClass & constants while parsing. */ +var NaN + +var x = 2; + diff --git a/js/src/jit-test/tests/jaeger/globalOptimize-2.js b/js/src/jit-test/tests/jaeger/globalOptimize-2.js new file mode 100644 index 0000000000..2756ec5a36 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/globalOptimize-2.js @@ -0,0 +1,10 @@ + +x = 30; +function foo() { + assertEq(x, 30); + delete x; + y = 20; + Object.defineProperty(this, 'x', {value:10}); + assertEq(x, 10); +} +foo(); diff --git a/js/src/jit-test/tests/jaeger/globalOptimize-4.js b/js/src/jit-test/tests/jaeger/globalOptimize-4.js new file mode 100644 index 0000000000..5df15f55a5 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/globalOptimize-4.js @@ -0,0 +1,8 @@ + +x = 30; +assertEq(x, 30); + +for (var i = 0; i < 10000; i++) + this[i] = 0; + +assertEq(x, 30); diff --git a/js/src/jit-test/tests/jaeger/in.js b/js/src/jit-test/tests/jaeger/in.js new file mode 100644 index 0000000000..a179d60ecb --- /dev/null +++ b/js/src/jit-test/tests/jaeger/in.js @@ -0,0 +1,21 @@ +function f(arr, b) { + var res = ""; + var a; + if (b) + a = arr; + for (var i=100; i>-200; i--) { + if (i in a) { + res += i; + } + } + return res; +} + +assertEq(f([1, , 2, 3], true), "320"); + +try { + f([1, , 2, 3], false); + assertEq(0, 1); +} catch(e) { + assertEq(e instanceof TypeError, true); +} diff --git a/js/src/jit-test/tests/jaeger/inline/bug645645.js b/js/src/jit-test/tests/jaeger/inline/bug645645.js new file mode 100644 index 0000000000..6649b559ed --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/bug645645.js @@ -0,0 +1,4 @@ +function f() { + f = Math.x; +} +f(); diff --git a/js/src/jit-test/tests/jaeger/inline/bug645666.js b/js/src/jit-test/tests/jaeger/inline/bug645666.js new file mode 100644 index 0000000000..34fd6822ab --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/bug645666.js @@ -0,0 +1,16 @@ +function f1() { + gc(); +} +function f2() { + with(this) {}; + f1(); +} +function f3() { + f2(); +} +function f4() { + f3(); +} +f3(); +f3(); +f4(); diff --git a/js/src/jit-test/tests/jaeger/inline/bug646004.js b/js/src/jit-test/tests/jaeger/inline/bug646004.js new file mode 100644 index 0000000000..8ffb4bd55a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/bug646004.js @@ -0,0 +1,9 @@ +function reportCompare (expected, actual, description) {} +function f() +{ + f(f, 0x09AA, 0x09B0, f); +} +try { + reportCompare ("outer", f(), + "Inner function statement should not have been called."); +} catch (e) {} diff --git a/js/src/jit-test/tests/jaeger/inline/bug646480.js b/js/src/jit-test/tests/jaeger/inline/bug646480.js new file mode 100644 index 0000000000..e870e33efe --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/bug646480.js @@ -0,0 +1,7 @@ +if (true) + function f1() {}; +function f2() { + var y = -8; + return y % 2; +} +f2() / 3; diff --git a/js/src/jit-test/tests/jaeger/inline/bug647973.js b/js/src/jit-test/tests/jaeger/inline/bug647973.js new file mode 100644 index 0000000000..c19797a242 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/bug647973.js @@ -0,0 +1,11 @@ +function f(a1, a2, a3, a4) { +} +function g(a1, a2) { + var d = new Date(0); + f(); + assertEq(typeof d, 'object'); +} +g(); +gc(); +f(2, 2, 2, f(2, 2, 2, 12 === 12)); +g(false, false); diff --git a/js/src/jit-test/tests/jaeger/inline/bug651209.js b/js/src/jit-test/tests/jaeger/inline/bug651209.js new file mode 100644 index 0000000000..27e14a17b1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/bug651209.js @@ -0,0 +1,11 @@ +var i = 0; +try { test(); } catch (e) { } +function test() { + var jstop = 900; + var code = ''; + code+=createCode(i); + eval(); +} +function createCode(i) { + jstop+= + + + i + " string.';"; +} diff --git a/js/src/jit-test/tests/jaeger/inline/bug655954.js b/js/src/jit-test/tests/jaeger/inline/bug655954.js new file mode 100644 index 0000000000..f57488b959 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/bug655954.js @@ -0,0 +1,5 @@ +// |jit-test| error: TypeError +foo(); +function foo() { + this(); +} diff --git a/js/src/jit-test/tests/jaeger/inline/bug656221.js b/js/src/jit-test/tests/jaeger/inline/bug656221.js new file mode 100644 index 0000000000..8319bcf838 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/bug656221.js @@ -0,0 +1,5 @@ +function f() { + var a = []; + a.push(a); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/inline/bug676491.js b/js/src/jit-test/tests/jaeger/inline/bug676491.js new file mode 100644 index 0000000000..82e6095a0c --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/bug676491.js @@ -0,0 +1,14 @@ +Array.prototype.__defineSetter__(32, function() { print("Hello from arbitrary JS");}); +var UBound = 0; +var expect= ''; +var expectedvalues = []; +for (var j=0; j < 10; j++) { + addThis(); + addThis(); + addThis(); + addThis(); +} +function addThis() { + expectedvalues[UBound] = expect; + UBound++; +} diff --git a/js/src/jit-test/tests/jaeger/inline/bug680759.js b/js/src/jit-test/tests/jaeger/inline/bug680759.js new file mode 100644 index 0000000000..975f9e3b76 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/bug680759.js @@ -0,0 +1,14 @@ + +TryToCatch(); +TryToCatch(); +function Thrower( v ) { + throw "Caught"; +} +function Eval( v ) { + SECTION : Thrower(TryToCatch, v, ': 3') +} +function TryToCatch( value, expect ) { + try { + Eval( value ) + } catch (e) { } +} diff --git a/js/src/jit-test/tests/jaeger/inline/doubleArg.js b/js/src/jit-test/tests/jaeger/inline/doubleArg.js new file mode 100644 index 0000000000..bd44225998 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/doubleArg.js @@ -0,0 +1,10 @@ +function foo(x, y) { + if (y < 0) {} + return x * 1000; +} +function bar(x, y) { + while (false) {} + assertEq(foo(x, false), 10500); + assertEq(foo(y, false), 11000); +} +bar(10.5, 11); diff --git a/js/src/jit-test/tests/jaeger/inline/mathAbs.js b/js/src/jit-test/tests/jaeger/inline/mathAbs.js new file mode 100644 index 0000000000..b1d077add1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/mathAbs.js @@ -0,0 +1,31 @@ + +assertEq(Math.abs(-10), 10); +assertEq(Math.abs(-2147483648), 2147483648); +assertEq(Math.abs(2147483648), 2147483648); +assertEq(Math.abs(-0), 0); +assertEq(Math.abs(0), 0); +assertEq(Math.abs(-3.14), 3.14); +assertEq(Math.abs(NaN), NaN); + +/* Inferred as abs(int). */ +function abs1(x) { + return Math.abs(x); +} +assertEq(abs1(1), 1); +assertEq(abs1(-1), 1); +assertEq(abs1(0), 0); +assertEq(abs1(-123) + abs1(234), 357); +assertEq(abs1(-2147483648), 2147483648); // recompile to return double +assertEq(abs1(-2), 2); + +/* Inferred as abs(double). */ +function abs2(x) { + return Math.abs(x); +} +assertEq(abs2(-2.2), 2.2); +assertEq(abs2(123), 123); +assertEq(abs2(-456), 456); +assertEq(abs2(-0), 0); +assertEq(abs2(1.3), 1.3); +assertEq(abs2(NaN), NaN); + diff --git a/js/src/jit-test/tests/jaeger/inline/mathFloor.js b/js/src/jit-test/tests/jaeger/inline/mathFloor.js new file mode 100644 index 0000000000..1419beb9f3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/mathFloor.js @@ -0,0 +1,34 @@ + +assertEq(Math.floor(3.14), 3); +assertEq(Math.floor(-0), -0); +assertEq(Math.floor(0), 0); +assertEq(Math.floor(-1.23), -2); +assertEq(Math.floor(2147483649), 2147483649); +assertEq(Math.floor(2147483648.5), 2147483648); +assertEq(Math.floor(2147483647.1), 2147483647); + +/* Inferred as floor(double). */ +function floor1(x) { + return Math.floor(x); +} +assertEq(floor1(10.3), 10); +assertEq(floor1(-3.14), -4); +assertEq(floor1(-0), -0); // recompile to return double +assertEq(floor1(678.3), 678); + +/* Inferred as floor(double). */ +function floor2(x) { + return Math.floor(x); +} +assertEq(floor2(3.4), 3); +assertEq(floor2(NaN), NaN); // recompile to return double +assertEq(floor2(-4.4), -5); + +/* Inferred as floor(int). */ +function floor3(x) { + return Math.floor(x); +} +assertEq(floor3(4), 4); +assertEq(floor3(-5), -5); +assertEq(floor3(0), 0); + diff --git a/js/src/jit-test/tests/jaeger/inline/mathPow.js b/js/src/jit-test/tests/jaeger/inline/mathPow.js new file mode 100644 index 0000000000..717e087c96 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/mathPow.js @@ -0,0 +1,35 @@ + +assertEq(Math.pow(100, 2), 10000); +assertEq(Math.pow(-Infinity, -0.5), 0); +assertEq(Math.pow(-Infinity, 0.5), Infinity); +assertEq(Math.pow(Infinity, -0.5), 0); +assertEq(Math.pow(Infinity, 0.5), Infinity); +assertEq(Math.pow(NaN, -0.5), NaN); +assertEq(Math.pow(NaN, 0.5), NaN); +assertEq(Math.pow(-3.14, -0.5), NaN); +assertEq(Math.pow(-1.23, 0.5), NaN); +assertEq(Math.pow(-0, -0.5), Infinity); +assertEq(Math.pow(-0, 0.5), 0); +assertEq(Math.pow(-1, -0.5), NaN); +assertEq(Math.pow(-1, 0.5), NaN); +assertEq(Math.pow(0, -0.5), Infinity); +assertEq(Math.pow(0, 0.5), 0); +assertEq(Math.pow(1, -0.5), 1); +assertEq(Math.pow(1, 0.5), 1); +assertEq(Math.pow(100, -0.5), 0.1); +assertEq(Math.pow(100, 0.5), 10); + +/* Inferred as pow(double, double). */ +function pow1(x) { + return Math.pow(x, 0.5); +} +assertEq(pow1(100), 10); +assertEq(pow1(144), 12); +assertEq(pow1(-0), 0); +assertEq(pow1(0), 0); +assertEq(pow1(1), 1); +assertEq(pow1(-1), NaN); +assertEq(pow1(NaN), NaN); +assertEq(pow1(-Infinity), Infinity); +assertEq(pow1(Infinity), Infinity); + diff --git a/js/src/jit-test/tests/jaeger/inline/mathRound.js b/js/src/jit-test/tests/jaeger/inline/mathRound.js new file mode 100644 index 0000000000..60a59e2020 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/mathRound.js @@ -0,0 +1,41 @@ + +assertEq(Math.round(3.14), 3); +assertEq(Math.round(0.5), 1); +assertEq(Math.round(-0), -0); +assertEq(Math.round(0), 0); +assertEq(Math.round(-1.03), -1); +assertEq(Math.round(2147483649), 2147483649); +assertEq(Math.round(2147483647.5), 2147483648); +assertEq(Math.floor(2147483647.1), 2147483647); + +/* Inferred as round(double). */ +function round1(x) { + return Math.round(x); +} +assertEq(round1(10.3), 10); +assertEq(round1(-3.14), -3); +assertEq(round1(-3.5), -3); +assertEq(round1(-3.6), -4); +assertEq(round1(3.5), 4); +assertEq(round1(3.6), 4); +assertEq(round1(0), 0); +assertEq(round1(-0), -0); // recompile to return double +assertEq(round1(12345), 12345); +assertEq(round1(654.6), 655); + +/* Inferred as round(double). */ +function round2(x) { + return Math.round(x); +} +assertEq(round2(1234.5), 1235); +assertEq(round2(NaN), NaN); // recompile to return double +assertEq(round2(4.6), 5); + +/* Inferred as round(int). */ +function round3(x) { + return Math.round(x); +} +assertEq(round3(4), 4); +assertEq(round3(-5), -5); +assertEq(round3(0), 0); + diff --git a/js/src/jit-test/tests/jaeger/inline/mathSqrt.js b/js/src/jit-test/tests/jaeger/inline/mathSqrt.js new file mode 100644 index 0000000000..3401499427 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/mathSqrt.js @@ -0,0 +1,29 @@ + +assertEq(Math.sqrt(-Infinity), NaN); +assertEq(Math.sqrt(-3.14), NaN); +assertEq(Math.sqrt(-2), NaN); +assertEq(Math.sqrt(-0), -0); +assertEq(Math.sqrt(0), 0); +assertEq(Math.sqrt(2), Math.SQRT2); +assertEq(Math.sqrt(49), 7); +assertEq(Math.sqrt(Infinity), Infinity); + +/* Inferred as sqrt(double). */ +function sqrt1(x) { + return Math.sqrt(x); +} +assertEq(sqrt1(NaN), NaN); +assertEq(sqrt1(-Infinity), NaN); +assertEq(sqrt1(Infinity), Infinity); +assertEq(sqrt1(-0), -0); +assertEq(sqrt1(2), Math.SQRT2); +assertEq(sqrt1(16), 4); + +/* Inferred as sqrt(int). */ +function sqrt2(x) { + return Math.sqrt(x); +} +assertEq(sqrt2(4), 2); +assertEq(sqrt2(169), 13); +assertEq(sqrt2(0), 0); + diff --git a/js/src/jit-test/tests/jaeger/inline/scripted-01.js b/js/src/jit-test/tests/jaeger/inline/scripted-01.js new file mode 100644 index 0000000000..f6a585d054 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/scripted-01.js @@ -0,0 +1,17 @@ +function bar(x, y) { + return x + y; +} + +function foo(x, y) { + var a = 0; + for (var i = 0; i < 1000; i++) { + a += bar(x, y); + a += bar(x, y); + a += bar(x, y); + a += bar(x, y); + } + return a; +} + +var q = foo(0, 1); +assertEq(q, 4000); diff --git a/js/src/jit-test/tests/jaeger/inline/scripted-02.js b/js/src/jit-test/tests/jaeger/inline/scripted-02.js new file mode 100644 index 0000000000..fede7f4943 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/scripted-02.js @@ -0,0 +1,22 @@ +function getter(a, i) { + return a[i]; +} + +function foo(a, n) { + var res = 0; + for (var i = 0; i < 10; i++) { + res = 0; + for (var j = 0; j < n; j++) { + res += getter(a, j); + } + } + return res; +} + +var n = 100; +var a = Array(n); +for (var i = 0; i < n; i++) + a[i] = i; + +var q = foo(a, n); +assertEq(q, 4950); diff --git a/js/src/jit-test/tests/jaeger/inline/scripted-03.js b/js/src/jit-test/tests/jaeger/inline/scripted-03.js new file mode 100644 index 0000000000..f54c1c66da --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/scripted-03.js @@ -0,0 +1,14 @@ +function choose(x, y, z) { + return x ? y : z; +} + +function foo(x, y, z) { + var a = 0; + for (var i = 0; i < 100; i++) { + a += choose(x, y, z); + } + return a; +} + +var q = foo(true, 10, 0); +assertEq(q, 1000); diff --git a/js/src/jit-test/tests/jaeger/inline/scripted-04.js b/js/src/jit-test/tests/jaeger/inline/scripted-04.js new file mode 100644 index 0000000000..d2f8535bcf --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/scripted-04.js @@ -0,0 +1,12 @@ +function adder(x, y) { + return x + y; +} + +function foo(x) { + for (var i = 0; i < 100; i++) + var a = adder(x, i); + return a; +} + +var q = foo(0x7ffffff0); +assertEq(q, 2147483731); diff --git a/js/src/jit-test/tests/jaeger/inline/scripted-05.js b/js/src/jit-test/tests/jaeger/inline/scripted-05.js new file mode 100644 index 0000000000..b763fb3649 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/scripted-05.js @@ -0,0 +1,13 @@ +function adder(x, y) { + return Math.floor(x + y); +} + +function foo(x) { + for (var i = 0; i < 100; i++) { + var a = adder(x, i); + } + return a; +} + +var q = foo(0x7ffffff0 + .5); +assertEq(q, 2147483731); diff --git a/js/src/jit-test/tests/jaeger/inline/scripted-06.js b/js/src/jit-test/tests/jaeger/inline/scripted-06.js new file mode 100644 index 0000000000..074bb52017 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/scripted-06.js @@ -0,0 +1,17 @@ +function popper(a) { + return a.pop(); +} + +function foo(x) { + for (var i = 0; i < 10; i++) { + var q = popper(x); + if (i < 5) + assertEq(q, 5 - i); + else + assertEq(q, undefined); + } + return q; +} + +var q = foo([1,2,3,4,5]); +assertEq(q, undefined); diff --git a/js/src/jit-test/tests/jaeger/inline/scripted-07.js b/js/src/jit-test/tests/jaeger/inline/scripted-07.js new file mode 100644 index 0000000000..dfe076a656 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/scripted-07.js @@ -0,0 +1,15 @@ +function multiple(a) { + if (a > 10) + return 1; + return 0; +} + +function foo(x) { + var a = 0; + for (var i = 0; i < 100; i++) + a += multiple(i); + return a; +} + +var q = foo([1,2,3,4,5]); +assertEq(q, 89); diff --git a/js/src/jit-test/tests/jaeger/inline/scripted-08.js b/js/src/jit-test/tests/jaeger/inline/scripted-08.js new file mode 100644 index 0000000000..22198388ef --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/scripted-08.js @@ -0,0 +1,21 @@ +function first(a, b) { + return second(a, b); +} + +function second(a, b) { + return third(a, b, a + b); +} + +function third(a, b, c) { + return a + b + c; +} + +function foo(x) { + var a = 0; + for (var i = 0; i < 100; i++) + a += first(x, i); + return a; +} + +var q = foo(10); +assertEq(q, 11900); diff --git a/js/src/jit-test/tests/jaeger/inline/scripted-09.js b/js/src/jit-test/tests/jaeger/inline/scripted-09.js new file mode 100644 index 0000000000..e970b77e43 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/scripted-09.js @@ -0,0 +1,19 @@ +function multiple(a) { + if (a > 10) + return a * 20; + return 0; +} + +function deeper(a, b) { + return multiple(a + b); +} + +function foo() { + var a = 0; + for (var i = 0; i < 10; i++) + a += deeper(0x7ffffff0, i); + return a; +} + +var q = foo(); +assertEq(q, 429496727300); diff --git a/js/src/jit-test/tests/jaeger/inline/scripted-10.js b/js/src/jit-test/tests/jaeger/inline/scripted-10.js new file mode 100644 index 0000000000..492d055e84 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/scripted-10.js @@ -0,0 +1,13 @@ +function copied(x, y) { + return x + y; +} + +function foo(x) { + var a = 0; + for (var i = 0; i < 100; i++) + a += copied(x, x); + return a; +} + +var q = foo(5); +assertEq(q, 1000); diff --git a/js/src/jit-test/tests/jaeger/inline/scripted-11.js b/js/src/jit-test/tests/jaeger/inline/scripted-11.js new file mode 100644 index 0000000000..750add3980 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/scripted-11.js @@ -0,0 +1,12 @@ +what = 0; + +function f(x) { + g(x); +} + +function g(x) { + eval("what = true"); +} + +f(10); +assertEq(what, true); diff --git a/js/src/jit-test/tests/jaeger/inline/stringCharAt.js b/js/src/jit-test/tests/jaeger/inline/stringCharAt.js new file mode 100644 index 0000000000..bf2bbbd67f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/stringCharAt.js @@ -0,0 +1,49 @@ + +assertEq("foo".charAt(-123), ""); +assertEq("foo".charAt(-1), ""); +assertEq("foo".charAt(0), "f"); +assertEq("foo".charAt(1), "o"); +assertEq("foo".charAt(2), "o"); +assertEq("foo".charAt(3.4), ""); +assertEq("foo".charAt(), "f"); +assertEq("".charAt(), ""); +assertEq("".charAt(0), ""); +assertEq("abc\u9123".charAt(3), "\u9123"); // char without unit string + +/* Inferred as string.charAt(int). */ +function charAt1(x) { + return "abc".charAt(x); +} +assertEq(charAt1(-1), ""); +assertEq(charAt1(0), "a"); +assertEq(charAt1(1), "b"); +assertEq(charAt1(2), "c"); +assertEq(charAt1(3), ""); +assertEq(charAt1(1234), ""); + +/* Inferred as string.charAt(double). */ +function charAt2(x) { + return "abc".charAt(x); +} +assertEq(charAt2(-1.3), ""); +assertEq(charAt2(-0), "a"); +assertEq(charAt2(2), "c"); +assertEq(charAt2(2.3), "c"); +assertEq(charAt2(3.14), ""); +assertEq(charAt2(NaN), "a"); + +/* Test ropes. */ +function charAt3(s, i) { + var s2 = "abcdef" + s + "12345"; + return s2.charAt(i); +} +assertEq(charAt3("abcdef", 14), "3"); +assertEq(charAt3("a" + "b", 1), "b"); +assertEq(charAt3("abcdefg" + "hijklmnop", 10), "e"); + +/* Other 'this'. */ +var arr = [1, 2]; +arr.charAt = String.prototype.charAt; +assertEq(arr.charAt(1), ","); + + diff --git a/js/src/jit-test/tests/jaeger/inline/stringCharCodeAt.js b/js/src/jit-test/tests/jaeger/inline/stringCharCodeAt.js new file mode 100644 index 0000000000..3f0bfe2cfd --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/stringCharCodeAt.js @@ -0,0 +1,47 @@ + +assertEq("foo".charCodeAt(-123), NaN); +assertEq("foo".charCodeAt(-0), 102); +assertEq("foo".charCodeAt(0), 102); +assertEq("foo".charCodeAt(2), 111); +assertEq("foo".charCodeAt(3.4), NaN); +assertEq("foo".charCodeAt(), 102); +assertEq("".charCodeAt(), NaN); +assertEq("".charCodeAt(0), NaN); + +/* Inferred as string.charCodeAt(int). */ +function charCodeAt1(x) { + return "abc".charCodeAt(x); +} +assertEq(charCodeAt1(-1), NaN); +assertEq(charCodeAt1(0), 97); +assertEq(charCodeAt1(1), 98); +assertEq(charCodeAt1(2), 99); +assertEq(charCodeAt1(3), NaN); +assertEq(charCodeAt1(1234), NaN); + +/* Inferred as string.charCodeAt(double). */ +function charCodeAt2(x) { + return "abc".charCodeAt(x); +} +assertEq(charCodeAt2(-1.3), NaN); +assertEq(charCodeAt2(-0), 97); +assertEq(charCodeAt2(2), 99); +assertEq(charCodeAt2(2.3), 99); +assertEq(charCodeAt2(3.14), NaN); +assertEq(charCodeAt2(NaN), 97); + +/* Test ropes. */ +function charCodeAt3(s, i) { + var s2 = "abcdef" + s + "12345"; + return s2.charCodeAt(i); +} +assertEq(charCodeAt3("abcdef", 14), 51); +assertEq(charCodeAt3("a" + "b", 1), 98); +assertEq(charCodeAt3("abcdefg" + "hijklmnop", 10), 101); + +/* Other 'this'. */ +var n = new Number(123); +n.charCodeAt = String.prototype.charCodeAt; +assertEq(n.charCodeAt(1), 50); + + diff --git a/js/src/jit-test/tests/jaeger/inline/undefinedLocal.js b/js/src/jit-test/tests/jaeger/inline/undefinedLocal.js new file mode 100644 index 0000000000..f6fb129966 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/undefinedLocal.js @@ -0,0 +1,19 @@ + +function bar(n) { + var a; + if (n < 50) + a = n; + return a; +} + +function foo() { + for (var i = 0; i < 100; i++) { + var q = bar(i); + if (i < 50) + assertEq(q, i); + else + assertEq(q, undefined); + } +} + +foo(); diff --git a/js/src/jit-test/tests/jaeger/instanceOfWithKnownTypes.js b/js/src/jit-test/tests/jaeger/instanceOfWithKnownTypes.js new file mode 100644 index 0000000000..0ca3dc8d94 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/instanceOfWithKnownTypes.js @@ -0,0 +1,13 @@ +// |jit-test| error: TypeError + +// Verify that the compiler doesn't assert. + +function f() { + var o = {}, p = {}; + z = o instanceof p; + z = 3 instanceof p; + z = p instanceof 3; + z = 3 instanceof 4; +} + +f(); diff --git a/js/src/jit-test/tests/jaeger/invokeSessionGuard.js b/js/src/jit-test/tests/jaeger/invokeSessionGuard.js new file mode 100644 index 0000000000..53bdbe5d6e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/invokeSessionGuard.js @@ -0,0 +1,8 @@ +load(libdir + "evalInFrame.js"); + +[1,2,3,4,5,6,7,8].forEach( + function(x) { + // evalInFrame means lightweight gets call obj + assertEq(evalInFrame(0, "x"), x); + } +); diff --git a/js/src/jit-test/tests/jaeger/loops/bug651155.js b/js/src/jit-test/tests/jaeger/loops/bug651155.js new file mode 100644 index 0000000000..37c16fff19 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/bug651155.js @@ -0,0 +1,6 @@ +ForIn_2(); +function ForIn_2( object ) { + PropertyArray=new Array; + var PropertyArray = 'Do not assert: !cx->throwing'; + for ( i in object ) PropertyArray.length-1; +} diff --git a/js/src/jit-test/tests/jaeger/loops/bug654393.js b/js/src/jit-test/tests/jaeger/loops/bug654393.js new file mode 100644 index 0000000000..e603392a40 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/bug654393.js @@ -0,0 +1,12 @@ +var VERSION = "ECMA_2"; +DoWhile( + new DoWhileObject(false, false, false, VERSION) +); +function DoWhileObject( out1, out2, out3, in1 ) { + this.breakIn = in1 +} +function DoWhile(object) { + do { + if (object.breakIn) {} + } while(false); +} diff --git a/js/src/jit-test/tests/jaeger/loops/bug655854.js b/js/src/jit-test/tests/jaeger/loops/bug655854.js new file mode 100644 index 0000000000..81c7194314 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/bug655854.js @@ -0,0 +1,8 @@ + +function foo(a, b, c) { + var res = 0; + for (var b = 0; b < c; b++) + res += a[b]; + return res; +} +assertEq(foo([1,2,3], 0, 10), NaN); diff --git a/js/src/jit-test/tests/jaeger/loops/bug658290.js b/js/src/jit-test/tests/jaeger/loops/bug658290.js new file mode 100644 index 0000000000..cfb42066af --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/bug658290.js @@ -0,0 +1,8 @@ +var SECTION = "15.4.5.2-2"; +addCase(new Array, 0, Math, Math.pow(2, SECTION)); +var arg = "", i = 0; +var a = eval("new Array(" + arg + ")"); +addCase(a, i, +i + 1, Math.pow(2, 12) + i + 1, true); +function addCase(object, old_len, set_len, new_len, checkitems) { + for (var i = old_len; i < new_len; i++) if (object[i] != 0) {} +} diff --git a/js/src/jit-test/tests/jaeger/loops/bug659452.js b/js/src/jit-test/tests/jaeger/loops/bug659452.js new file mode 100644 index 0000000000..6cc3f4d465 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/bug659452.js @@ -0,0 +1,5 @@ +test(); +function test() { + var t = function () { return function printStatus() {}; }; + for (var j = 0; j < 10; j++) t["-1"] +} diff --git a/js/src/jit-test/tests/jaeger/loops/bug668643.js b/js/src/jit-test/tests/jaeger/loops/bug668643.js new file mode 100644 index 0000000000..fe41c7ffc7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/bug668643.js @@ -0,0 +1,12 @@ + +function foo(a,n) { + var x = {a:[]}; + for (var i = 0; i < n; ) { + a[i]; + x.a[i]; + a[++i]; + } +} +var a = [1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0]; +var n = a.length; +foo(a,n); diff --git a/js/src/jit-test/tests/jaeger/loops/bug671814.js b/js/src/jit-test/tests/jaeger/loops/bug671814.js new file mode 100644 index 0000000000..69b581f772 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/bug671814.js @@ -0,0 +1,12 @@ +var ta = Int8Array([]); +function Int8Array(summary) { + summary.length; +} +function test() { + ctors = [ Int8Array ] + for (var i = 0; i < 10; i++) { + ctor = ctors[0] + b = ctor(0) + } +} +test(); diff --git a/js/src/jit-test/tests/jaeger/loops/bug680809.js b/js/src/jit-test/tests/jaeger/loops/bug680809.js new file mode 100644 index 0000000000..22bcbf3c46 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/bug680809.js @@ -0,0 +1,8 @@ +function f0(p0) { + var v0; + v0 = 1.7; + loop0: while (v0) { + v0 = p0; + } +} +f0(0); diff --git a/js/src/jit-test/tests/jaeger/loops/bug684621.js b/js/src/jit-test/tests/jaeger/loops/bug684621.js new file mode 100644 index 0000000000..9ca13bc7f4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/bug684621.js @@ -0,0 +1,15 @@ +function runRichards() { + queue = new Packet; + Packet(queue, ID_DEVICE_A, KIND_DEVICE); + new Packet; +} +var ID_DEVICE_A = 4; +var KIND_DEVICE = 0; +Packet = function (queue) { + this.link = null + if (queue == null) return; + var peek, next = queue; + while ((peek = next.link) != null) + ID_HANDLER_B +}; +runRichards() diff --git a/js/src/jit-test/tests/jaeger/loops/hoist-01.js b/js/src/jit-test/tests/jaeger/loops/hoist-01.js new file mode 100644 index 0000000000..0c0f12357a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/hoist-01.js @@ -0,0 +1,35 @@ +function foo(x, n) { + for (var i = 0; i < n; i++) + x[i] = i; + var q = 0; + for (var i = 0; i < 10; i++) { + for (var j = 0; j < n; j++) + q += x[j]; + } + return q; +} + +var a = foo([], 100); +assertEq(a, 49500); + +function basic1(x) { + var q = 0; + for (var i = 0; i < 4; i++) + q += x[i]; + return q; +} + +var b = basic1([1,2,3,4]); +assertEq(b, 10); + +ARRAY = [1,2,3,4]; + +function basic2() { + var q = 0; + for (var i = 0; i < 4; i++) + q += ARRAY[i]; + return q; +} + +var c = basic2(); +assertEq(c, 10); diff --git a/js/src/jit-test/tests/jaeger/loops/hoist-02.js b/js/src/jit-test/tests/jaeger/loops/hoist-02.js new file mode 100644 index 0000000000..79c3f11952 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/hoist-02.js @@ -0,0 +1,12 @@ +function foo(x, n) { + var a = 0; + for (var i = 0; i < n; i++) + a += x[3]; + return a; +} + +var a = foo([1,2,3,4], 100); +assertEq(a, 400); + +var b = foo([1,2], 100); +assertEq(b, NaN); diff --git a/js/src/jit-test/tests/jaeger/loops/hoist-03.js b/js/src/jit-test/tests/jaeger/loops/hoist-03.js new file mode 100644 index 0000000000..c5c2ba6190 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/hoist-03.js @@ -0,0 +1,12 @@ +function foo(x, j, n) { + var a = 0; + for (var i = 0; i < n; i++) + a += x[j]; + return a; +} + +var a = foo([1,2,3,4], 3, 100); +assertEq(a, 400); + +var b = foo([1,2,3,4], 5, 100); +assertEq(b, NaN); diff --git a/js/src/jit-test/tests/jaeger/loops/hoist-04.js b/js/src/jit-test/tests/jaeger/loops/hoist-04.js new file mode 100644 index 0000000000..f17bd7f737 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/hoist-04.js @@ -0,0 +1,18 @@ +function bar(x, i) { + if (i == 50) + x.length = 0; +} + +function foo(x, j, n) { + var a = 0; + for (var i = 0; i < n; i++) { + var q = x[j]; + bar(x, i); + if (typeof q == 'undefined') + a++; + } + return a; +} + +var a = foo([1,2,3,4], 3, 100); +assertEq(a, 49); diff --git a/js/src/jit-test/tests/jaeger/loops/hoist-05.js b/js/src/jit-test/tests/jaeger/loops/hoist-05.js new file mode 100644 index 0000000000..b99b07893b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/hoist-05.js @@ -0,0 +1,19 @@ +function bar(x, i) { + if (i == 50) + foo.arguments[1] = 20; +} + +function foo(x, j, n) { + var a = 0; + arguments; + for (var i = 0; i < n; i++) { + var q = x[j]; + bar(x, i); + if (typeof q == 'undefined') + a++; + } + return a; +} + +var a = foo([1,2,3,4], 3, 100); +assertEq(a, 0); diff --git a/js/src/jit-test/tests/jaeger/loops/hoist-06.js b/js/src/jit-test/tests/jaeger/loops/hoist-06.js new file mode 100644 index 0000000000..fc2919cda2 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/hoist-06.js @@ -0,0 +1,14 @@ + +function foo(x, n, y) { + var q = 0; + for (var j = 0; j < n; j++) { + if (x[j] < y) + q++; + } + assertEq(q, 1); +} + +var x = [1,2,3,4,5]; +var y = { valueOf: function() { x.length = 0; return 6; } }; + +var a = foo(x, 5, y); diff --git a/js/src/jit-test/tests/jaeger/loops/hoist-07.js b/js/src/jit-test/tests/jaeger/loops/hoist-07.js new file mode 100644 index 0000000000..a409f70559 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/hoist-07.js @@ -0,0 +1,17 @@ + +var res = 0; + +function foo(x, n, y) { + for (var j = 0; j < n; j++) { + x[j]; + y.f; + } +} + +var x = [1,2,3,4,5]; +var y = {}; +Object.defineProperty(y, 'f', {get:function() { res++; x.length = 2; }}); + +var a = foo(x, 5, y); + +assertEq(res, 5); diff --git a/js/src/jit-test/tests/jaeger/loops/hoist-08.js b/js/src/jit-test/tests/jaeger/loops/hoist-08.js new file mode 100644 index 0000000000..a695dd1a76 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/hoist-08.js @@ -0,0 +1,7 @@ + +function foo(x,n) { + for (var i = -5; i < n; i++) { + x[i] = 10; + } +} +foo([1,2,3,4,5],5); diff --git a/js/src/jit-test/tests/jaeger/loops/hoist-09.js b/js/src/jit-test/tests/jaeger/loops/hoist-09.js new file mode 100644 index 0000000000..1b398c7c26 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/hoist-09.js @@ -0,0 +1,11 @@ + +function foo(x, y) { + for (var i = 0; i < x.length; i++) { + x[i]; + if (i < 20) + y[i + 1] = 0; + } +} + +var q = Array(1,2,3,4,5); +foo(q, []); diff --git a/js/src/jit-test/tests/jaeger/loops/hoist-10.js b/js/src/jit-test/tests/jaeger/loops/hoist-10.js new file mode 100644 index 0000000000..43a3084c9d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/hoist-10.js @@ -0,0 +1,39 @@ +function foo1(x, n) { + var i = 0; + while (--n >= 0) { + x[i++] = 0; + } +} +foo1([1,2,3,4,5],5); + +function foo2(x, n) { + var i = 0; + while (--n >= 0) { + x[i++] = 0; + } +} +foo2([1,2,3,4,5],6); + +function foo3(x, n) { + var i = 0; + while (n-- >= 0) { + x[i++] = 0; + } +} +foo3([1,2,3,4,5],5); + +function foo4(x, n) { + var i = 0; + while (--n >= 0) { + x[++i] = 0; + } +} +foo4([1,2,3,4,5],5); + +function foo5(x, n) { + var i = 0; + while (--n >= 0) { + x[++i] = 0; + } +} +foo5([1,2,3,4,5,6],5); diff --git a/js/src/jit-test/tests/jaeger/loops/integer-1.js b/js/src/jit-test/tests/jaeger/loops/integer-1.js new file mode 100644 index 0000000000..f0ef122f3c --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/integer-1.js @@ -0,0 +1,7 @@ +function foo(x) { + for (var i = 0x7ffffff0; i <= x; i++) { + var y = i; + } + return y; +} +assertEq(foo(0x7fffffff), 0x7fffffff); diff --git a/js/src/jit-test/tests/jaeger/loops/integer-2.js b/js/src/jit-test/tests/jaeger/loops/integer-2.js new file mode 100644 index 0000000000..129c92f1fe --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/integer-2.js @@ -0,0 +1,10 @@ +function foo(x, y, z, a) { + for (var i = 0x7fff; i < 0xffff; i++) { + var y = ((x + y) + (z + a[0])) | 0; + } + return y; +} +assertEq(foo(0x7fffffff, 0x7fffffff, 0x7fffffff, [0x7fffffff]), 2147385343); + +var q = [0x7fffffff]; +assertEq(eval("foo(0x7fffffff, 0x7fffffff, {valueOf:function() {q[0] = 'e4'; return 0;}}, q)"), 438048096); diff --git a/js/src/jit-test/tests/jaeger/loops/integer-3.js b/js/src/jit-test/tests/jaeger/loops/integer-3.js new file mode 100644 index 0000000000..26c7b76a8f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/integer-3.js @@ -0,0 +1,7 @@ +function foo(x) { + for (var i = 0x7ffffff0; i <= x; i++) { + var y = (i % -2147483648); + } + return y + 5; +} +assertEq(foo(0x7fffffff), 0x7fffffff + 5); diff --git a/js/src/jit-test/tests/jaeger/loops/multiply-by-int32min.js b/js/src/jit-test/tests/jaeger/loops/multiply-by-int32min.js new file mode 100644 index 0000000000..bc692f1480 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/multiply-by-int32min.js @@ -0,0 +1,59 @@ +function foo() +{ + // Range analysis incorrectly computes a range for the multiplication. Once + // that incorrect range is computed, the goal is to compute a new value whose + // range analysis *thinks* is in int32_t range, but which goes past it using + // JS semantics. + // + // On the final iteration, in JS semantics, the multiplication produces 0, and + // the next addition 0x7fffffff. Adding any positive integer to that goes + // past int32_t range: here, (0x7fffffff + 5) or 2147483652. + // + // Range analysis instead thinks the multiplication produces a value in the + // range [INT32_MIN, INT32_MIN], and the next addition a value in the range + // [-1, -1]. Adding any positive value to that doesn't overflow int32_t range + // but *does* overflow the actual range in JS semantics. Thus omitting + // overflow checks produces the value 0x80000004, which interpreting as signed + // is (INT32_MIN + 4) or -2147483644. + // + // For this test to trigger the bug it was supposed to trigger: + // + // * 0x7fffffff must be the LHS, not RHS, of the addition in the loop, and + // * i must not be incremented using ++ + // + // The first is required because JM LoopState doesn't treat *both* V + mul and + // mul + V as not overflowing, when V is known to be int32_t -- only V + mul. + // (JM pessimally assumes V's type might change before it's evaluated. This + // obviously can't happen if V is a constant, but JM's puny little mind + // doesn't detect this possibility now.) + // + // The second is required because JM LoopState only ignores integer overflow + // on multiplications if the enclosing loop is a "constrainedLoop" (the name + // of the relevant field). Loops become unconstrained when unhandled ops are + // found in the loop. Increment operators generate a DUP op, which is not + // presently a handled op, causing the loop to become unconstrained. + for (var i = 0; i < 15; i = i + 1) { + var y = (0x7fffffff + ((i & 1) * -2147483648)) + 5; + } + return y; +} +assertEq(foo(), (0x7fffffff + ((14 & 1) * -2147483648)) + 5); + +function bar() +{ + // Variation on the theme of the above test with -1 as the other half of the + // INT32_MIN multiplication, which *should* result in -INT32_MIN on multiply + // (exceeding int32_t range). + // + // Here, range analysis again thinks the range of the multiplication is + // INT32_MIN. We'd overflow-check except that adding zero (on the LHS, see + // above) prevents overflow checking, so range analysis thinks the range is + // [INT32_MIN, INT32_MIN] when -INT32_MIN is actually possible. This direct + // result of the multiplication is already out of int32_t range, so no need to + // add anything to bias it outside int32_t range to get a wrong result. + for (var i = 0; i < 17; i = i + 1) { + var y = (0 + ((-1 + (i & 1)) * -2147483648)); + } + return y; +} +assertEq(bar(), (0 + ((-1 + (16 & 1)) * -2147483648))); diff --git a/js/src/jit-test/tests/jaeger/loops/property-1.js b/js/src/jit-test/tests/jaeger/loops/property-1.js new file mode 100644 index 0000000000..81a6b3c360 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/loops/property-1.js @@ -0,0 +1,19 @@ + +function foo(x, y) { + var res = 0; + for (var i = 0; i < 10; i++) { + res += x.f + y[i]; + } + return res; +} + +var x = {f:0}; +var y = Array(10); +for (var i = 0; i < 10; i++) { + if (i == 5) + Object.defineProperty(Object.prototype, 5, {get: function() { x.f = 10; return 5}}); + else + y[i] = i; +} + +assertEq(foo(x, y), 85); diff --git a/js/src/jit-test/tests/jaeger/modConstDoubles.js b/js/src/jit-test/tests/jaeger/modConstDoubles.js new file mode 100644 index 0000000000..807782ce6e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/modConstDoubles.js @@ -0,0 +1,8 @@ + +function f() { + var x = 2.6; + var y = 2.1; + return x % y; +} +assertEq(f(), 0.5); + diff --git a/js/src/jit-test/tests/jaeger/modConstInt.js b/js/src/jit-test/tests/jaeger/modConstInt.js new file mode 100644 index 0000000000..cdb0711da3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/modConstInt.js @@ -0,0 +1,8 @@ + +function f() { + var i = 1000; + var rest = i % 3; + var div = (i - rest) / 3; + assertEq(div, 333); +} +f(); \ No newline at end of file diff --git a/js/src/jit-test/tests/jaeger/modConstZeroRhs.js b/js/src/jit-test/tests/jaeger/modConstZeroRhs.js new file mode 100644 index 0000000000..75ef884100 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/modConstZeroRhs.js @@ -0,0 +1,8 @@ + +function f() { + var x = 5; + var y = 0; + return x % y; +} +assertEq(f(), NaN); + diff --git a/js/src/jit-test/tests/jaeger/modWithConstLhs.js b/js/src/jit-test/tests/jaeger/modWithConstLhs.js new file mode 100644 index 0000000000..67bf398b00 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/modWithConstLhs.js @@ -0,0 +1,2 @@ +// |jit-test| error: ReferenceError; +7%s; diff --git a/js/src/jit-test/tests/jaeger/mulNegZero.js b/js/src/jit-test/tests/jaeger/mulNegZero.js new file mode 100644 index 0000000000..6758dab7c4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/mulNegZero.js @@ -0,0 +1,31 @@ + +function mul(x, y) { return x * y; }; +function mulConst0(x) { return x * 0; }; +function mulConst1(x) { return -5 * x; }; +function mulConst2(x) { return x * -5; }; + +function f() { + assertEq(mulConst0(7), 0); + assertEq(mulConst0(-5), -0); + assertEq(mulConst0(0), 0); + assertEq(mulConst0(-0), -0); + + assertEq(mulConst1(7), -35); + assertEq(mulConst1(-8), 40); + assertEq(mulConst1(0), -0); + assertEq(mulConst1(-0), 0); + + assertEq(mulConst2(7), -35); + assertEq(mulConst2(-8), 40); + assertEq(mulConst2(0), -0); + assertEq(mulConst2(-0), 0); + + assertEq(mul(55, 2), 110); + assertEq(mul(0, -10), -0); + assertEq(mul(-5, 0), -0); + assertEq(mul(-0, 0), -0); + assertEq(mul(0, -0), -0); + assertEq(mul(0, 0), 0); + assertEq(mul(-0, -0), 0); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/negation.js b/js/src/jit-test/tests/jaeger/negation.js new file mode 100644 index 0000000000..f0f3e51853 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/negation.js @@ -0,0 +1,2 @@ +var n = -2147483648; +assertEq(-n, 2147483648); diff --git a/js/src/jit-test/tests/jaeger/normalIntTypedArrays.js b/js/src/jit-test/tests/jaeger/normalIntTypedArrays.js new file mode 100644 index 0000000000..8bb4627fa6 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/normalIntTypedArrays.js @@ -0,0 +1,49 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function testInt32Array(L) { + var f = new Int32Array(8); + assertEq(f[0], 0); + assertEq(f[L], 0); + assertEq(f[L+8], undefined); + assertEq(f[8], undefined); + f[0] = 12; + f[L+1] = 13; + f[2] = f[1]; + f[L+3] = 4294967295; + f[L+4] = true; + f[L+5] = L; + assertEq(f[0], 12); + assertEq(f[1], 13); + assertEq(f[2], 13); + assertEq(f[3], -1); + assertEq(f[4], 1); + assertEq(f[5], 0); +} + +function testUint32Array(L) { + var f = new Uint32Array(8); + assertEq(f[0], 0); + assertEq(f[L], 0); + assertEq(f[L+8], undefined); + assertEq(f[8], undefined); + f[0] = 12; + f[L+1] = 13; + f[2] = f[1]; + f[L+3] = 4294967295; + f[L+4] = true; + f[L+5] = L; + assertEq(f[0], 12); + assertEq(f[1], 13); + assertEq(f[2], 13); + assertEq(f[3], 4294967295); + assertEq(f[4], 1); + assertEq(f[5], 0); +} + +for (var i = 0; i < 10; i++) { + //testInt32Array(0); + testUint32Array(0); + if (i == 5) + gc(); +} + diff --git a/js/src/jit-test/tests/jaeger/optimize-globals-1.js b/js/src/jit-test/tests/jaeger/optimize-globals-1.js new file mode 100644 index 0000000000..4197a27174 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/optimize-globals-1.js @@ -0,0 +1,9 @@ + +function testLocalNames() { + var NaN = 4; + var undefined = 5; + var Infinity = 6; + return NaN + undefined + Infinity; +} +assertEq(testLocalNames(), 15); + diff --git a/js/src/jit-test/tests/jaeger/optimize-globals-2.js b/js/src/jit-test/tests/jaeger/optimize-globals-2.js new file mode 100644 index 0000000000..2e01cdcb04 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/optimize-globals-2.js @@ -0,0 +1,20 @@ + +function testNaN(x) { + var x = NaN; + assertEq(isNaN(x), true); +} +testNaN(); + +function testInfinity(x) { + return (x === Infinity); +} +assertEq(testInfinity(Infinity), true); +assertEq(testInfinity(6), false); +assertEq(testInfinity(-Infinity), false); + +function testUndefined(x) { + return (x === undefined); +} +assertEq(testUndefined(undefined), true); +assertEq(testUndefined(), true); +assertEq(testUndefined(5), false); diff --git a/js/src/jit-test/tests/jaeger/optimize-globals-3.js b/js/src/jit-test/tests/jaeger/optimize-globals-3.js new file mode 100644 index 0000000000..eb2474c45b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/optimize-globals-3.js @@ -0,0 +1,9 @@ + +NaN = 4; +undefined = 5; +Infinity = 6; + +assertEq(isNaN(NaN), true); +assertEq(Infinity > 100, true); +assertEq(undefined != 5, true); + diff --git a/js/src/jit-test/tests/jaeger/propertyOptimize-1.js b/js/src/jit-test/tests/jaeger/propertyOptimize-1.js new file mode 100644 index 0000000000..47ac2fc6ef --- /dev/null +++ b/js/src/jit-test/tests/jaeger/propertyOptimize-1.js @@ -0,0 +1,29 @@ + +function Foo(x) +{ + this.f = x + 10; +} + +function Bar() +{ + this.g = 0; +} + +Bar.prototype = Foo.prototype; + +var x = new Foo(0); +var y = new Bar(); + +assertEq(10, eval("x.f")); +assertEq(undefined, eval("y.f")); + +function Other(x) +{ + this.f = x + 10; +} + +var a = new Other(0); +var b = Object.create(Other.prototype); + +assertEq(10, eval("a.f")); +assertEq(undefined, eval("b.f")); diff --git a/js/src/jit-test/tests/jaeger/propertyOptimize-2.js b/js/src/jit-test/tests/jaeger/propertyOptimize-2.js new file mode 100644 index 0000000000..88df13e2c7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/propertyOptimize-2.js @@ -0,0 +1,16 @@ + +function Foo(x) +{ + this.f = x + 10; +} + +var x = new Foo(0); +assertEq(10, eval("x.f")); + +called = false; +Object.defineProperty(Foo.prototype, 'f', {set: function() { called = true; }}); + +var y = new Foo(0); +assertEq(10, eval("x.f")); +assertEq(undefined, eval("y.f")); +assertEq(called, true); diff --git a/js/src/jit-test/tests/jaeger/propertyOptimize-3.js b/js/src/jit-test/tests/jaeger/propertyOptimize-3.js new file mode 100644 index 0000000000..90327e47a3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/propertyOptimize-3.js @@ -0,0 +1,67 @@ + +// Properties cleared in the middle of a single function constructor. + +function foo(x, y) { + this.f = 0; + this.g = x + y; + this.h = 2; +} + +var called = false; +var a = 0; +var b = {valueOf: function() { Object.defineProperty(Object.prototype, 'g', {set: function() { called = true }}) }}; +var c = new foo(a, b); + +assertEq(called, true); +assertEq(c.g, undefined); + +// Properties cleared in the middle of a constructor callee. + +function foo2(x, y) { + this.a = 0; + this.b = 1; + bar2.call(this, x, y); + this.c = 2; +} +function bar2(x, y) { + this.d = x + y; + this.e = 3; +} + +var called2 = false; +var xa = 0; +var xb = {valueOf: function() { Object.defineProperty(Object.prototype, 'e', {set: function() { called2 = true }}) }}; +var xc = new foo2(xa, xb); + +assertEq(called2, true); +assertEq(xc.e, undefined); +assertEq(xc.c, 2); + +// Properties cleared after a constructor callee. + +function foo3() { + this.aa = 0; + this.bb = 1; + bar3.call(this); + this.cc = 2; + baz(); + xbar3.call(this); + this.dd = 3; +} +function bar3() { + this.ee = 4; +} +function xbar3() { + this.ff = 5; +} +function baz() { + eval("xbar3.call = function() { called3 = true }"); +} + +var called3 = false; +var c3 = new foo3(); +assertEq(c3.cc, 2); +assertEq(c3.ee, 4); +assertEq(c3.ff, undefined); +assertEq(c3.dd, 3); +assertEq(called3, true); diff --git a/js/src/jit-test/tests/jaeger/propertyOptimize-4.js b/js/src/jit-test/tests/jaeger/propertyOptimize-4.js new file mode 100644 index 0000000000..942474875a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/propertyOptimize-4.js @@ -0,0 +1,17 @@ +// Make sure new script properties can be invalidated on specialized prototype +// types while they are still being constructed. + +function Foo(a, b, c) { + this.x = a + b; + this.y = c; +} + +updated = false; +var o = {valueOf: function() { + Object.defineProperty(Object.prototype, 'y', {set:function() { updated = true; }}) + }}; + +function Bar() {} +Bar.prototype = new Foo(o, 1, 2); +assertEq(updated, true); +assertEq(Bar.prototype.y, undefined); diff --git a/js/src/jit-test/tests/jaeger/recompile/arith.js b/js/src/jit-test/tests/jaeger/recompile/arith.js new file mode 100644 index 0000000000..a705a2937b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/arith.js @@ -0,0 +1,49 @@ + +/* Handle recompilation of arithmetic operations, and on-stack int -> double conversion. */ + +function add(x, y) +{ + var z = x + y; + assertEq(z, 2147483732); + assertEq(z - 10, 2147483722); +} +add(0x7ffffff0, 100); + +function mul(x, y) +{ + var z = x * y; + assertEq(z, 4294967264); +} +mul(0x7ffffff0, 2); + +function div1(x, y) +{ + var z = x / y; + assertEq(z + 10, 20); +} +div1(100, 10); + +function div2(x, y) +{ + var z = x / y; + assertEq(z + 10, 20.5); +} +div2(105, 10); + +function uncopy(x, y) +{ + var q = x; + x += y; + q++; + assertEq(q, 2147483633); + assertEq(x, 2147483732); +} +uncopy(0x7ffffff0, 100); + +function addmore(x, y) +{ + var q = (x + 10) + (x + y); + assertEq(q, 4294967374); + x = q; +} +addmore(0x7ffffff0, 100); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug617592.js b/js/src/jit-test/tests/jaeger/recompile/bug617592.js new file mode 100644 index 0000000000..cec1774803 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug617592.js @@ -0,0 +1,3 @@ + +var x; +-(x === null); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug621292.js b/js/src/jit-test/tests/jaeger/recompile/bug621292.js new file mode 100644 index 0000000000..11dca94710 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug621292.js @@ -0,0 +1,24 @@ + +/* Don't crash. */ + +var count = 0; + +function callbackfn(v) { + if (++count == 98) + count = 0x7ffffff0; + return arr[0] + count; +} + +function foo() { + arr = [1,2,3,4,5]; + for (var i = 0; i < 50; i++) + arr = arr.map(callbackfn); +} +foo(); + +function f(a,b,c) { + a = 1; b = 'str'; c = 2.1; + return arguments[0]; +} +for (var i = 0; i < 20; i++) + assertEq(f(10,'sss',1), 1); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug621328.js b/js/src/jit-test/tests/jaeger/recompile/bug621328.js new file mode 100644 index 0000000000..f755549c96 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug621328.js @@ -0,0 +1,9 @@ +function foo() { +}; +function f() { + var e = foo; + a = new e(); + assertEq(typeof(a), "object"); + e=a; +} +f(); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug638977.js b/js/src/jit-test/tests/jaeger/recompile/bug638977.js new file mode 100644 index 0000000000..0fac782249 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug638977.js @@ -0,0 +1,6 @@ +function f() { + gc(); + [].unshift(false); +} +f(); +f(); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug639508.js b/js/src/jit-test/tests/jaeger/recompile/bug639508.js new file mode 100644 index 0000000000..a25a70c601 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug639508.js @@ -0,0 +1,2 @@ +var o = 2; +o = o.p; diff --git a/js/src/jit-test/tests/jaeger/recompile/bug639882.js b/js/src/jit-test/tests/jaeger/recompile/bug639882.js new file mode 100644 index 0000000000..3f9f898a29 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug639882.js @@ -0,0 +1,5 @@ +var x = 2; +x = -(x == 3); + +var y = ""; +typeof(z) + typeof(eval("z = y")); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug640608.js b/js/src/jit-test/tests/jaeger/recompile/bug640608.js new file mode 100644 index 0000000000..1c5c3c8106 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug640608.js @@ -0,0 +1,10 @@ +try { +{ + function x() {} +} +o = (0).__proto__; +function f(o) { + o._("", function() {}) +} +f(o) +} catch (e) {} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug641225.js b/js/src/jit-test/tests/jaeger/recompile/bug641225.js new file mode 100644 index 0000000000..7b79781972 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug641225.js @@ -0,0 +1,149 @@ +gczeal(1); +var o0 = Function.prototype; +o1 = {}; +var o4 = Error.prototype; +o5 = new Int32Array(100); +o6 = new Proxy({}, {}) +o8 = new Proxy(function() { return {}; }, { + get: function() { return 10; }, +}); +o9 = {}; +var o10 = -500; +var o12 = new Int32Array(100); +function f0(o) { +} +function f1(o) { +} +function f3(o) { + with(o) {} + o[o5] = o5; +} +function f5(o) { +}for(var f2 in o9) { + for(var i1=0; i1<83; i1++) { + for(var i3=0; i3<98; i3++) { + for(var x in f1) { f1[x]; }; + } + Object.defineProperty(o0, 'constructor', {enumerable: true,unused: 1 }); + f1(f5); + f4(f3); + f3(o8); + f2(o5); + o9.toString(1, 2); + f4.caller = o3; + f2(o6); + f0(f2); + f1(f2); + f0(f1); + var key = Object.getOwnPropertyNames(o9)[2]; if(key) delete o9[key]; + var props = Object.getOwnPropertyNames(o5); + if (props.length > 6) { + var prop = props[6]; + o8[prop] = o5[prop]; + } + f3(f1); + f1(f5); + } + for(var o3 in f1) { + f1(o3); + f4(o3); + o0 == f4; + f1(f3); + Object.freeze(o12); + f0(o9); + new f0(o1); + o4 = o5.call(o4, o4, o4, o4, o4, o4); + f2(o10); + var prop = Object.getOwnPropertyNames(o0)[15]; + if (prop) { Object.defineProperty(o0, prop, {configurable: true,enumerable: true,get: function(){},set: function(){},unused: 1 }); } + f3(f1); + new f2(o0); + } + f5(o9); + gc(); + f0(o2); + f3(f4); + new f4(o7); + f1 = new o10(f1, f1, f1, f1); + f5(o10); + f5(o7); + f0(o7); + f1(o10); + f3(o10); + delete f0.constructor; + f0(f3); + f1 = wrap(f3); + f4(f1); + delete o1.prototype; + f4(o5); + f2(f2); + o1 + ''; + f2(f2); + f0(o12); + f0(o12); + f1(o3); + o5[3] = 8.3; + o10['__proto_' + '_']; +} +for(var o2 in f5) { + for(var o10 in f3) { + delete f2['__proto_' + '_']; + o8 = f1.toString; + f1(o1); + f0(o9); + f2(o12); + var key = Object.getOwnPropertyNames(o3)[19]; if(key) o9 = o3[key]; + f1(o10); + f4(f1); + f1(o1); + f1(o7); + for(var x in o1) { o1[x]; }; + f0(o8); + f4(o1); + f0(o1); + f0.p0 = o6; + f3(o9); + f5(o8); + f2 >>> o7; + if(o3 === o8) {} + f5(o3); + } + o5[0] = f4; + o0.caller = function() { }; + Object.freeze(f0); + f4(o3); + o7.p0 = o3; + f1(f5); + f4(o10); + f2(o5); + f2(o5); + f0(o3); + o8[o8] = o8; + f0(o5); + f1(o6); + f2 = Object.create(o5); + var key = Object.getOwnPropertyNames(o11)[23]; if(key) f2 = o11[key]; + f5(o9); + o12 = o6.bind(o12, o12, o12); + f5(f4); + f1(o1); + f0(o11); + f1(o11); + eval('f4'); + f4(o1); + Object.isExtensible(o7); +} +(function() { + f1(o12); + f5 + ''; + if(o8 != o3) {} +})(); +f1(o10); +f3(f0); +o4.toSource = function() { }; +var _o = o1; +var prop = Object.getOwnPropertyNames(_o)[5]; +if (prop) { _o[prop](o2, o2); } +f3(o0); +f1(f3); +Object.isExtensible(f1); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug641269.js b/js/src/jit-test/tests/jaeger/recompile/bug641269.js new file mode 100644 index 0000000000..413d65070a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug641269.js @@ -0,0 +1,8 @@ +// |jit-test| error: ReferenceError + +var g = newGlobal({newCompartment: true}); +var dbg = new g.Debugger(this); + +(function() { + const x = [][x] +})() diff --git a/js/src/jit-test/tests/jaeger/recompile/bug641535.js b/js/src/jit-test/tests/jaeger/recompile/bug641535.js new file mode 100644 index 0000000000..732eeb08cb --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug641535.js @@ -0,0 +1,2 @@ +var o = {}; +o[o.p] = 2; diff --git a/js/src/jit-test/tests/jaeger/recompile/bug642405.js b/js/src/jit-test/tests/jaeger/recompile/bug642405.js new file mode 100644 index 0000000000..2bbca34832 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug642405.js @@ -0,0 +1,13 @@ +function startTest() {}; +try { +} +catch(ex) +{ + actual = ex + ''; +} +var actual = 'no error'; +var prefValue; +DESCRIPTION = "var class = true"; +EXPECTED = "error"; +foo(EXPECTED[prefValue], DESCRIPTION[prefValue], startTest[prefValue]); +function foo() {} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug643182.js b/js/src/jit-test/tests/jaeger/recompile/bug643182.js new file mode 100644 index 0000000000..cb134fe0bd --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug643182.js @@ -0,0 +1,7 @@ +x = 123; +function f() {} +function g(o) { + y = x.p; + eval('o'); +} +g(f); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug643376.js b/js/src/jit-test/tests/jaeger/recompile/bug643376.js new file mode 100644 index 0000000000..300fbc90d7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug643376.js @@ -0,0 +1,8 @@ +SECTION = 0; +function TestCase() {} +function outer_func(x) +{ + var y = "inner"; + new TestCase( SECTION, { SECTION: ++y }); +} +outer_func(1111); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug643669.js b/js/src/jit-test/tests/jaeger/recompile/bug643669.js new file mode 100644 index 0000000000..d66639df40 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug643669.js @@ -0,0 +1,3 @@ +try {(function () { + eval("gc().l()") + })() } catch (e) {} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug645044.js b/js/src/jit-test/tests/jaeger/recompile/bug645044.js new file mode 100644 index 0000000000..e31762a8e6 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug645044.js @@ -0,0 +1,4 @@ + +this.__defineGetter__("x", gc); +x.__proto__ = this; +__proto__ = 44; diff --git a/js/src/jit-test/tests/jaeger/recompile/bug646267.js b/js/src/jit-test/tests/jaeger/recompile/bug646267.js new file mode 100644 index 0000000000..2f15037675 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug646267.js @@ -0,0 +1,8 @@ +function t(code) { + var f = new Function(code); + try { f(); } catch (e) { } +} +t(""); +t(""); +t(""); +t("this.function = 7;"); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug647183.js b/js/src/jit-test/tests/jaeger/recompile/bug647183.js new file mode 100644 index 0000000000..0405a548a4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug647183.js @@ -0,0 +1,23 @@ +var SECTION = ""; +var VERSION = ""; +function test() {} +function writeTestCaseResult( expect, actual, string ) { + if (typeof document != "object" || +!document.location.href.match(/jsreftest.html/)) { + } +} +TIME_0000 = now = new Date; +TIME_NOW = now.valueOf(); +function DaysInYear( y ) { +function MakeDate( day, time ) { + +} +} +function TimeClip( t ) { + if ( isNaN ) { Number.NaN; } +} +function runDSTOffsetCachingTestsFraction(part, parts) { print; }; +test_times=( TIME_NOW, TIME_0000, ( SECTION, VERSION+".getUTCMinutes()", + TIME_NOW.test_times,VERSION.SECTION ) , TIME_0000, TIME_0000, + 0, 0 ); +try { j = 0( SECTION, TimeClip(1.1), 0 ); } catch (e) {} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug647199.js b/js/src/jit-test/tests/jaeger/recompile/bug647199.js new file mode 100644 index 0000000000..d8ad7994a6 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug647199.js @@ -0,0 +1,11 @@ +TryInWhile( new TryObject( "hello", ThrowException, true ) ); +function TryObject( value, throwFunction, result ) { + this.thrower=throwFunction +} +function ThrowException() { return TryInWhile(1); } +function TryInWhile( object ) { + try { + object.thrower() + } catch ( e ) { + } +} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug647532.js b/js/src/jit-test/tests/jaeger/recompile/bug647532.js new file mode 100644 index 0000000000..3c8bc3f404 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug647532.js @@ -0,0 +1,4 @@ +try { Function("\ + __defineSetter__(\"x\",Object.keys)\ + (z=x instanceof[].some)\ +")() } catch (e) { } diff --git a/js/src/jit-test/tests/jaeger/recompile/bug647547.js b/js/src/jit-test/tests/jaeger/recompile/bug647547.js new file mode 100644 index 0000000000..6f9c970aa7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug647547.js @@ -0,0 +1,9 @@ +DoWhile(new DoWhileObject); +new DoWhileObject("", Boolean); +function DoWhileObject( d, e, s ) { + this.whileExpression=e; +} +function DoWhile( object ) { + while ( object.whileExpression ) eval( ); + Boolean +} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug647991-1.js b/js/src/jit-test/tests/jaeger/recompile/bug647991-1.js new file mode 100644 index 0000000000..2597524478 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug647991-1.js @@ -0,0 +1,18 @@ +function f() { + function g() { + eval(""); + gc(); + Math.abs(4); + NaN; + } + g(); +} +function h() { + var x, y; + x = Math.floor(-0); + y = parseInt("1"); +} + +f(); +h(); + diff --git a/js/src/jit-test/tests/jaeger/recompile/bug647991-2.js b/js/src/jit-test/tests/jaeger/recompile/bug647991-2.js new file mode 100644 index 0000000000..6ebea8482d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug647991-2.js @@ -0,0 +1,2 @@ +[""][NaN] = 2; +-([][[""][String] = ""] = null); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug648502.js b/js/src/jit-test/tests/jaeger/recompile/bug648502.js new file mode 100644 index 0000000000..26caf6b615 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug648502.js @@ -0,0 +1,12 @@ +function f(x, y) { + -(undefined ? 0 : 0); + assertEq(y === y, true); + return 0; +} +f(1, 2); +{ + f(3, 3.14); + f(true, f(4, 5)); + + function g() {} +} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug648567.js b/js/src/jit-test/tests/jaeger/recompile/bug648567.js new file mode 100644 index 0000000000..5b7df219d9 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug648567.js @@ -0,0 +1,16 @@ +var arr = [-10, true]; +true || arr[0]; + +function g() { + var x = arr[12]; + var y = arr.length; + arr[undefined] = x; + assertEq(y, 2); +} +{ + function f() { + gc(); + g(); + } + f(); +} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug648843.js b/js/src/jit-test/tests/jaeger/recompile/bug648843.js new file mode 100644 index 0000000000..37de8fbbe5 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug648843.js @@ -0,0 +1,8 @@ + +function Q(on) +{ + options().match +} +function options() { return "methodjit"; } +gczeal(2); +for (i = 0; i < 100 ; ++i) { Q(Q(42, [])); } diff --git a/js/src/jit-test/tests/jaeger/recompile/bug648966.js b/js/src/jit-test/tests/jaeger/recompile/bug648966.js new file mode 100644 index 0000000000..df0f9d8cd3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug648966.js @@ -0,0 +1,7 @@ + +function f(x) { + gc(); + -x; + -null; +} +f(); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug649261.js b/js/src/jit-test/tests/jaeger/recompile/bug649261.js new file mode 100644 index 0000000000..fabc38e73e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug649261.js @@ -0,0 +1,2 @@ +var DESCRIPTION; +eval("DESCRIPTION += \"Non-character escapes in identifiers negative test.\";"); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug649769.js b/js/src/jit-test/tests/jaeger/recompile/bug649769.js new file mode 100644 index 0000000000..28c823b422 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug649769.js @@ -0,0 +1,16 @@ + +function g(x) { + if (!x) { + throw 1; + } +} + +function f(a, b, c, d) { + var x = [].push(3); + g(true); + assertEq(x, 1); +} +f(1.2, 2, 3, 4); +gc(); +f(1, 2, 3, 4); + diff --git a/js/src/jit-test/tests/jaeger/recompile/bug651119.js b/js/src/jit-test/tests/jaeger/recompile/bug651119.js new file mode 100644 index 0000000000..598a36574d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug651119.js @@ -0,0 +1,51 @@ +Object.extend = function(destination, source) { + for (var property in source) + destination[property] = source[property]; +}; +var Enumerable = { + _each: function(iterator) { + for (var i = 0, length = this.length; i < length; i++) + iterator(this[i]); + }, + each: function(iterator, context) { + var index = 0; + this._each(function(value) { + iterator.call(context, value, index++); + }); + }, + map: function(iterator, context) { + var results = []; + this.each(function(value, index) { + var res = iterator.call(context, value); + results.push(res); + }); + return results; + }, + invoke: function(method) { + var args = $A(arguments).slice(1); + return this.map(function(value) { + return value[method].apply(value, args); + }); + }, +}; +Object.extend(Array.prototype, Enumerable); +function $A(iterable) { + var length = iterable.length || 0, results = new Array(length); + while (length--) results[length] = iterable[length]; + return results; +} +function g() { + return [1, 2, 3, 4, 5].each(function(part) { + return 0; + }); +} +function f() { + g(); + g(); + g(); + g(); + var result = [[2, 1, 3], [6, 5, 4]]; + result = result.invoke('invoke', 'toString', 2); + result[0].join(', '); +}; +f(); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug653980.js b/js/src/jit-test/tests/jaeger/recompile/bug653980.js new file mode 100644 index 0000000000..f5a4d2a9f0 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug653980.js @@ -0,0 +1,13 @@ + +function f(code) { + try { + Function(code)() + } catch(r) {} +} { + function x() {} +} +f("") +f("") +f("") +f("x::e") +if (typeof w == "") {} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug654536.js b/js/src/jit-test/tests/jaeger/recompile/bug654536.js new file mode 100644 index 0000000000..5a3266ff6a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug654536.js @@ -0,0 +1,6 @@ +function f() { + var x = Object.prototype.hasOwnProperty.call(1); + assertEq(x, false); + isNaN(2); +} +f(); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug655949.js b/js/src/jit-test/tests/jaeger/recompile/bug655949.js new file mode 100644 index 0000000000..1adace1a10 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug655949.js @@ -0,0 +1,6 @@ +var a; +try { + a(); +} catch(e) { + assertEq(e instanceof TypeError, true); +} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug655998.js b/js/src/jit-test/tests/jaeger/recompile/bug655998.js new file mode 100644 index 0000000000..a48eb32152 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug655998.js @@ -0,0 +1,7 @@ +function f(x) { + var y; + gc(); + ++x.x; +} +f(1); +f.call(2, 3); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug657288.js b/js/src/jit-test/tests/jaeger/recompile/bug657288.js new file mode 100644 index 0000000000..2a19c5c515 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug657288.js @@ -0,0 +1,9 @@ +// |jit-test| error: TypeError +new DoWhileObject; +function DoWhileObject(breakOut, breakIn, iterations, loops) { + loops.prototype = new DoWhile; + this.looping; +} +function DoWhile(object) { + do {} while (object); +} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug658209.js b/js/src/jit-test/tests/jaeger/recompile/bug658209.js new file mode 100644 index 0000000000..966c10f28b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug658209.js @@ -0,0 +1,10 @@ +for (var i=0; i<20; i++) { + (function () { + var x; + (function () { + x = /abc/; + x++; + gc(); + })(); + })(); +} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug658211.js b/js/src/jit-test/tests/jaeger/recompile/bug658211.js new file mode 100644 index 0000000000..02de292591 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug658211.js @@ -0,0 +1,13 @@ +function foo(x) { + return bar(x); +} +function bar(x) { + return x.f + 10; +} +var g = Object(); +g.f = 10; +assertEq(foo(g), 20); +assertEq(foo(g), 20); +assertEq(foo(g), 20); +eval("g.f = 'three'"); +assertEq(foo(g), 'three10'); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug658212.js b/js/src/jit-test/tests/jaeger/recompile/bug658212.js new file mode 100644 index 0000000000..e462770b56 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug658212.js @@ -0,0 +1,33 @@ +var gTestcases = Array; +function TestCase(n, d, e, a) { + this.description = d + gTestcases[gTc] = this +} +TestCase.prototype.dump=function () { return + + + + + this.description + + + + + '\n'; +}; +function printStatus (msg) { + return function toPrinted(value) { + }; +} +function reportCompare(expected, actual, description) { + new TestCase("unknown-test-name", description, expected, actual) +} +gTc = 0;; +function jsTestDriverEnd() { + for (var i = 0; i < gTestcases.length; i++) + gTestcases[i].dump() +} +var summary = 'Do not assert with try/finally inside finally'; +var expect = 'No Crash'; +reportCompare(expect, printStatus, summary); +jsTestDriverEnd(); +jsTestDriverEnd(); +try { + f +} catch (ex) { + actual = '' +} +reportCompare(expect, actual, 5); +jsTestDriverEnd() diff --git a/js/src/jit-test/tests/jaeger/recompile/bug658561.js b/js/src/jit-test/tests/jaeger/recompile/bug658561.js new file mode 100644 index 0000000000..a8c0937c00 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug658561.js @@ -0,0 +1,5 @@ +var s1 = 'xx'; +for (var x = 0; x < 10 ; ++x ) { + new function() { return s1++; }; + gc(); +} diff --git a/js/src/jit-test/tests/jaeger/recompile/bug658777.js b/js/src/jit-test/tests/jaeger/recompile/bug658777.js new file mode 100644 index 0000000000..7f6ec16e15 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug658777.js @@ -0,0 +1,11 @@ +function Employee(name, dept) { return this.name = name || ""; } +function WorkerBee(name, dept, projs) { + this.base = Employee + this.base(name, dept) +} +function Engineer(name, projs, machine) { + this.base = WorkerBee + this.base(name, "engineering", projs) + __proto__["a" + constructor] = 1 +} +new Engineer; diff --git a/js/src/jit-test/tests/jaeger/recompile/bug659639.js b/js/src/jit-test/tests/jaeger/recompile/bug659639.js new file mode 100644 index 0000000000..4e7ffe2880 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug659639.js @@ -0,0 +1,16 @@ +test(); +function iso(d) { new Date(d).toISOString() } +function check(s,millis) { iso(millis); } +function dd(year, month, day, hour, minute, second, millis) { + return Date.UTC(year, 1, day, hour, minute, second, millis); +} +function test() { + try { + check("", 20092353211) + check("", 2009) + check("", 0) + check("", dd(BUGNUMBER, 7, 23, 19, 53, 21, 1)) + } catch (e) {} +} +var BUGNUMBER = "10278"; +test() diff --git a/js/src/jit-test/tests/jaeger/recompile/bug659766.js b/js/src/jit-test/tests/jaeger/recompile/bug659766.js new file mode 100644 index 0000000000..fac969288b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug659766.js @@ -0,0 +1,29 @@ +var gTestcases = new Array; +var gTc = gTestcases; +function TestCase(n, d, e, a) { + this.description=d + this.reason='' + gTestcases[gTc++]=this +} +TestCase.prototype.dump=function () { return + toPrinted(this.description) + toPrinted(this.reason) + '\n'; }; +function toPrinted(value) { return value=value.replace(/\\n/g, 'NL').replace(/[^\x20-\x7E]+/g, escapeString); } +function escapeString (str) { + try { + err + } catch(ex) { } +} +function jsTestDriverEnd() { + for (var i = 0; i < gTestcases.length; i++) + gTestcases[i].dump() +} +var SECTION = "dowhile-007"; +DoWhile(); +function DoWhile( object ) { return result1=false; } +new TestCase( + SECTION, + "break one: ", + result1 +); +jsTestDriverEnd(); +new TestCase( SECTION, "'�O� �:i��'.match(new RegExp('.+'))", [], '�O� �:i��'); +jsTestDriverEnd(); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug661859.js b/js/src/jit-test/tests/jaeger/recompile/bug661859.js new file mode 100644 index 0000000000..f0ca2400f5 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug661859.js @@ -0,0 +1,24 @@ +function TestCase(n, d, e, a) { return this.expect = e; } +function reportCompare(expected, actual, description) { + typeof actual +} +expect = 1; +var summary = 'Do not assert: top < ss->printer->script->depth'; +var actual = 'No Crash'; +var expect = 'No Crash'; +test(); +function notInlined(f) { + // prevent inlining this function, as a consequence, it prevent inlining + // Array.prototype.some (Bug 1087468) + with ({}) {} + return f; +} +function test(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) { + try { + p = [1].some(notInlined(function (y) { return test(); })) ? 4 : 0x0041; + } catch (ex) {} + reportCompare(expect, actual, summary) +} +test(); +TestCase(); +test() diff --git a/js/src/jit-test/tests/jaeger/recompile/bug663690.js b/js/src/jit-test/tests/jaeger/recompile/bug663690.js new file mode 100644 index 0000000000..1738d01968 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug663690.js @@ -0,0 +1,14 @@ + +function g(c) { + b = b = h(c); +} +function j(s) { + return Function(s) +} +function h(c) { + return j(c)() +} +g() +var a +Boolean.__proto__[a] = [] +g("return gc()") diff --git a/js/src/jit-test/tests/jaeger/recompile/bug671943-2.js b/js/src/jit-test/tests/jaeger/recompile/bug671943-2.js new file mode 100644 index 0000000000..7b262b9b67 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug671943-2.js @@ -0,0 +1,10 @@ +if (typeof schedulegc != 'undefined') + schedulegc(11); +function foo(n) { + if (n == 10) + foo.apply = function(a, b) { return b[0]; } + return n; +} +function bar() { return foo.apply(null, arguments); } +for (var i = 0; i < 20; i++) + assertEq(bar(i), i); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug672123.js b/js/src/jit-test/tests/jaeger/recompile/bug672123.js new file mode 100644 index 0000000000..d2ca2497e7 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug672123.js @@ -0,0 +1,46 @@ +var caught = false; +function h(code) { + f = eval("(function(){" + code + "})") + g() +} +function g() { + try { + f(); + } catch (r) { caught = true } +} +h("") +for (i = 0; i < 9; i++) { + h("") +} +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("") +h("\"\"(gc())") +assertEq(caught, true); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug674391.js b/js/src/jit-test/tests/jaeger/recompile/bug674391.js new file mode 100644 index 0000000000..7fdc2c3037 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug674391.js @@ -0,0 +1,11 @@ +a = []; +for (var i = 0; i < 1000; i++) { + a[i] = i; +} +function foo(x) { + for (var i in x) { + } +} +if (typeof schedulegc != "undefined") + schedulegc(100); +foo(a); diff --git a/js/src/jit-test/tests/jaeger/recompile/bug676764.js b/js/src/jit-test/tests/jaeger/recompile/bug676764.js new file mode 100644 index 0000000000..fca27de64c --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug676764.js @@ -0,0 +1,14 @@ + +try { with( {"a":1} ) { + (function () { + for (;;) { + t + } + })() +} } catch (e) {} + +with( {"b":2} ) { + (function () { + for (b = 0; b < 18; ++b) {} + })(); +} diff --git a/js/src/jit-test/tests/jaeger/recompile/callic.js b/js/src/jit-test/tests/jaeger/recompile/callic.js new file mode 100644 index 0000000000..6647c9acf6 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/callic.js @@ -0,0 +1,27 @@ + +/* Recompilation while being processed by a call IC. */ + +var g; +function foo() { + for (g = 0; g < 5; g++) { + bar(); + } + function bar() { + with ({}) { + eval("g = undefined;"); + } + } +} +foo(); + +assertEq(g, NaN); + +/* Recompilation while being processed by a native call IC. */ + +function native() { + var x; + x = x; + x = Math.ceil(NaN); + assertEq(x, NaN); +} +native(); diff --git a/js/src/jit-test/tests/jaeger/recompile/exotic.js b/js/src/jit-test/tests/jaeger/recompile/exotic.js new file mode 100644 index 0000000000..c1630d50a5 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/exotic.js @@ -0,0 +1,64 @@ + +// Test exotic ways of triggering recompilation. + +// Recompilation triggered by local function. + +var o = {}; +function what(q) { + function inner() { return q; } + o.f = inner; + var a = o.f(); + return a; +} +for (var i = 0; i < 10; i++) { + var a = what(i); + assertEq(a, i); +} + +// Lowered scripted call to apply returning code pointer. + +var global = 3; +function foo(x, y) { + var q = x.apply(null, y); + if (q != 10) + assertEq(global, true); +} +foo(function(a) { global = a; return 10; }, [1]); +foo(function(a) { global = a; return 10; }, [1]); +foo(function(a) { global = a; return 10; }, [1]); +assertEq(global, 1); +foo(function(a) { global = a; return 3; }, [true]); +assertEq(global, true); + +// Lowered scripted call returning NULL. + +var oglobal = 3; +function xfoo(x, y) { + var q = x.apply(null, y); + if (q != 10) + assertEq(oglobal, true); +} +xfoo(function(a) { oglobal = a; return 10; }, [1]); +xfoo(function(a) { oglobal = a; return 10; }, [1]); +xfoo(function(a) { oglobal = a; return 10; }, [1]); +assertEq(oglobal, 1); +xfoo(function(a) { [1,2,3]; oglobal = a; return 3; }, [true]); +assertEq(oglobal, true); + +// Recompilation out of SplatApplyArgs. + +weirdarray = [,,1,2,3]; +Object.defineProperty(weirdarray, 0, {get: function() { vglobal = 'true'; }}); + +var vglobal = 3; +function yfoo(x, y) { + var q = x.apply(null, y); + if (q != 10) + assertEq(vglobal, 'true'); + else + assertEq(vglobal, 3); +} +yfoo(function(a) { return 10; }, [1]); +yfoo(function(a) { return 10; }, [1]); +yfoo(function(a) { return 10; }, [1]); +yfoo(function() { return 0; }, weirdarray); diff --git a/js/src/jit-test/tests/jaeger/recompile/flush.js b/js/src/jit-test/tests/jaeger/recompile/flush.js new file mode 100644 index 0000000000..81681e6040 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/flush.js @@ -0,0 +1,18 @@ + +/* Handle flushing of scripted call ICs pointing to recompiled functions. */ + +function add(x, y) { + var z = x + y; + return String(x + y); +} + +function foo() { + var x = 0x7ffffff0; + var res = ""; + for (var i = 0; i < 20; i++) { + res += add(x, i) + ","; + res += add(x, i) + ","; + } + assertEq(res, "2147483632,2147483632,2147483633,2147483633,2147483634,2147483634,2147483635,2147483635,2147483636,2147483636,2147483637,2147483637,2147483638,2147483638,2147483639,2147483639,2147483640,2147483640,2147483641,2147483641,2147483642,2147483642,2147483643,2147483643,2147483644,2147483644,2147483645,2147483645,2147483646,2147483646,2147483647,2147483647,2147483648,2147483648,2147483649,2147483649,2147483650,2147483650,2147483651,2147483651,"); +} +foo(); diff --git a/js/src/jit-test/tests/jaeger/recompile/getelem.js b/js/src/jit-test/tests/jaeger/recompile/getelem.js new file mode 100644 index 0000000000..1c976ac7ee --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/getelem.js @@ -0,0 +1,26 @@ + +/* Unexpected values out of GETELEM */ + +function foo() { + var x = [1,2,3]; + var y; + var z = x[y]; + y = 10; + assertEq(z, "twelve"); +} +Array.prototype["undefined"] = "twelve"; +foo(); + +function fna() { + var a = {}; + a[true] = 1; + assertEq(a["true"], 1); +} +fna(); + +function fnb() { + var a = []; + a[1.1] = 2; + assertEq(a["1.1"], 2); +} +fnb(); diff --git a/js/src/jit-test/tests/jaeger/recompile/incdec.js b/js/src/jit-test/tests/jaeger/recompile/incdec.js new file mode 100644 index 0000000000..93786ba349 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/incdec.js @@ -0,0 +1,92 @@ + +/* Handle recompilation on overflow of inc/dec operations. */ + +function local() +{ + var j = 0x7ffffff0; + for (var i = 0; i < 100; i++) + j++; + assertEq(j, 2147483732); +} +local(); + +function olocal() +{ + var j = 0x7ffffff0; + for (var i = 0; i < 100; i++) { + if (j++ == 5000) + break; + } + assertEq(j, 2147483732); +} +olocal(); + +function arg(j) +{ + for (var i = 0; i < 100; i++) + j++; + assertEq(j, 2147483732); +} +arg(0x7ffffff0); + +function oarg(j) +{ + for (var i = 0; i < 100; i++) { + if (j++ == 5000) + break; + } + assertEq(j, 2147483732); +} +oarg(0x7ffffff0); + +// basic global inc/dec correctness +var x = 1.23; +x = x--; +x = x++; +x = ++x; +x = --x; +assertEq(x, 1.23); + +var g = 0x7ffffff0; +function glob() +{ + for (var i = 0; i < 100; i++) + g++; + assertEq(g, 2147483732); +} +glob(); + +function gname() +{ + n = 0x7ffffff0; + for (var i = 0; i < 100; i++) + n++; + assertEq(n, 2147483732); +} +gname(); + +function prop() +{ + var v = {f: 0x7ffffff0}; + for (var i = 0; i < 100; i++) + v.f++; + assertEq(v.f, 2147483732); +} +prop(); + +function elem(v, f) +{ + for (var i = 0; i < 100; i++) + v[f]++; + assertEq(v.f, 2147483732); +} +elem({f: 0x7ffffff0}, "f"); + +function name() +{ + var v = 0x7ffffff0; + var i; + eval("for (i = 0; i < 100; i++) v++"); + assertEq(v + 10, 2147483742); +} +name(); diff --git a/js/src/jit-test/tests/jaeger/recompile/inlinestubs.js b/js/src/jit-test/tests/jaeger/recompile/inlinestubs.js new file mode 100644 index 0000000000..05a7ee8ef3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/inlinestubs.js @@ -0,0 +1,43 @@ +// rejoining after recompilation from CompileFunction or a native called by an inlined frame. + +var global = 0; +var arr = [ + function() { return 0; }, + function() { return 1; }, + function() { return 2; }, + function() { return 3; }, + function() { return 4; }, + function() { return 5; }, + function() { return 6; }, + function() { return 7; }, + function() { global = -"three"; return 8; } + ]; +function wrap_call(i) { + var fn = arr["" + i]; + return fn(); +} +function foo1() { + var res = 0; + for (var i = 0; i < arr.length; i++) { + res += wrap_call(i); + var expected = (i == arr.length - 1) ? NaN : 10; + assertEq(global + 10, expected); + } +} +foo1(); + +var callfn = Function.call; +function wrap_floor(x, y) { + var z = x; + if (y) + z = {}; // trick the compiler into not inlining the floor() call. + return Math.floor(z); +} + +function foo2(x, y) { + var z = 0; + for (var i = 0; i < y; i++) + z = wrap_floor(x + i, false); + assertEq(z + 10, 2147483661); +} +foo2(0x7ffffff0 + .5, 20); diff --git a/js/src/jit-test/tests/jaeger/recompile/memory-01.js b/js/src/jit-test/tests/jaeger/recompile/memory-01.js new file mode 100644 index 0000000000..aa14746212 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/memory-01.js @@ -0,0 +1,12 @@ + +function foo(n) { + for (var i = 0; i < n; i++) {} + return i; +} + +assertEq(foo(1000), 1000); + +gc(); + +eval("assertEq(foo(1000.5), 1001)"); + diff --git a/js/src/jit-test/tests/jaeger/recompile/memory-02.js b/js/src/jit-test/tests/jaeger/recompile/memory-02.js new file mode 100644 index 0000000000..875487abc2 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/memory-02.js @@ -0,0 +1,19 @@ + +var g = 10; + +function bar(n) { + return g; +} + +function foo(n, v) { + for (var i = 0; i < n; i++) + assertEq(bar(i), v); +} + +foo(10, 10); + +gc(); + +eval("g = 10.5"); + +foo(10, 10.5); diff --git a/js/src/jit-test/tests/jaeger/recompile/memory-03.js b/js/src/jit-test/tests/jaeger/recompile/memory-03.js new file mode 100644 index 0000000000..c5eaf82961 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/memory-03.js @@ -0,0 +1,6 @@ + +eval("var x = 10; function foo() { return x; }"); + +assertEq(foo(), 10); +gc(); +assertEq(foo(), 10); diff --git a/js/src/jit-test/tests/jaeger/recompile/memory-04.js b/js/src/jit-test/tests/jaeger/recompile/memory-04.js new file mode 100644 index 0000000000..794c93802d --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/memory-04.js @@ -0,0 +1,8 @@ + +function foo(x, y) { + gc(); + var z = x + y; + print(z); +} + +foo(0x7ffffff0, 100); diff --git a/js/src/jit-test/tests/jaeger/recompile/native.js b/js/src/jit-test/tests/jaeger/recompile/native.js new file mode 100644 index 0000000000..72a6c25761 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/native.js @@ -0,0 +1,26 @@ + +/* Handle recompilations triggered by native calls. */ + +function dofloor(v) +{ + var res = ""; + for (var i = 0; i < 10; i++) { + var q = Math.floor(v + i); + res += q + ","; + } + assertEq(res, "2147483642,2147483643,2147483644,2147483645,2147483646,2147483647,2147483648,2147483649,2147483650,2147483651,"); +} +dofloor(0x7ffffffa + .5); + +function mapfloor(a) +{ + var b = a.map(function(v) { return Math.floor(v); }); + + var res = ""; + for (var i = 0; i < b.length; i++) + res += b[i] + ","; + return res; +} +mapfloor([1,2]); +mapfloor([3,4]); +assertEq(mapfloor([0x7ffffffa + 2.5, 0x7ffffffa + 20.5]), "2147483644,2147483662,"); diff --git a/js/src/jit-test/tests/jaeger/recompile/nativemulti.js b/js/src/jit-test/tests/jaeger/recompile/nativemulti.js new file mode 100644 index 0000000000..d611586970 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/nativemulti.js @@ -0,0 +1,21 @@ + +/* Recompilation that requires patching the same native stub multiple times. */ + +var first = 0; +var second = 0; + +function foreachweird(a, f, vfirst, vsecond) +{ + a.forEach(f); + assertEq(first, vfirst); + assertEq(second, vsecond); +} + +function weird() { + eval("first = 'one';"); + eval("second = 'two';"); +} + +foreachweird([0], function() {}, 0, 0); +foreachweird([0], function() {}, 0, 0); +foreachweird([0], weird, 'one', 'two'); diff --git a/js/src/jit-test/tests/jaeger/recompile/nativestack.js b/js/src/jit-test/tests/jaeger/recompile/nativestack.js new file mode 100644 index 0000000000..350649afcd --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/nativestack.js @@ -0,0 +1,25 @@ + +/* Recompilation that requires patching the same native stub multiple times on one stack. */ + +var first = 0; +var second = 0; + +function eacher(f, vfirst, vsecond) { + var a = [0]; + a.forEach(f); + assertEq(first, vfirst); + assertEq(second, vsecond); +} + +function one() { + eacher(two, 'one', 'two'); +} + +function two() { + eval("first = 'one';"); + eval("second = 'two';"); +} + +eacher(function () {}, 0, 0); +eacher(function () {}, 0, 0); +eacher(one, 'one', 'two'); diff --git a/js/src/jit-test/tests/jaeger/recompile/patchdouble.js b/js/src/jit-test/tests/jaeger/recompile/patchdouble.js new file mode 100644 index 0000000000..4de0838138 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/patchdouble.js @@ -0,0 +1,7 @@ +// only fix doubles for slots which the recompiled script thinks are doubles. +function foo(x) { + var y = x & 0xffff; + y = (y * (x * 1000)); + assertEq(y, 140735340806145000); +} +foo(0x7fffffff); diff --git a/js/src/jit-test/tests/jaeger/recompile/property.js b/js/src/jit-test/tests/jaeger/recompile/property.js new file mode 100644 index 0000000000..37223563af --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/property.js @@ -0,0 +1,26 @@ + +/* Handle recompilation on undefined properties and array holes. */ + +var v = {}; +if (typeof v == 'string') + v.x = 0; +function prop(v) +{ + var z = v.x + 1; + assertEq(z, NaN); +} +prop(v); + +v = []; +v[0] = 0; +v[1] = 1; +v[3] = 3; +v[4] = 4; +function elem(x) +{ + var x = ""; + for (var i = 0; i < 5; i++) + x += v[i]; + assertEq(x, "01undefined34"); +} +elem(v); diff --git a/js/src/jit-test/tests/jaeger/recompile/propic.js b/js/src/jit-test/tests/jaeger/recompile/propic.js new file mode 100644 index 0000000000..f394c4c467 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/propic.js @@ -0,0 +1,24 @@ + +/* Recompilation while being processed by property ICs. */ + +var ga = 10; +var gb = 10; + +Object.defineProperty(Object.prototype, "a", { + set: function(a) { eval("ga = true;"); }, + get: function() { eval("gb = true;"); } + }); + +function foo() { + var x = {}; + x.a = 10; + assertEq(ga + 1, 2); +} +foo(); + +function bar() { + var x = {}; + var a = x.a; + assertEq(gb + 1, 2); +} +bar(); diff --git a/js/src/jit-test/tests/jaeger/recompile/staticoverflow.js b/js/src/jit-test/tests/jaeger/recompile/staticoverflow.js new file mode 100644 index 0000000000..7387772444 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/staticoverflow.js @@ -0,0 +1,26 @@ + +// overflows occurring during constant folding + +var y = -null - y; +assertEq(y, NaN); + +var x = -(void 0); +assertEq(x, NaN); + +function overdiv() { + for(var i=0; i<25; i++) { + var a, b; + function f() { + } + a = f(); + b = (123 ^ 1) / 1234; + } +} +overdiv(); + +function overadd() { + var a = 0x7ffffff0; + var b = 100; + return a + b; +} +overadd(); diff --git a/js/src/jit-test/tests/jaeger/recompile/undef.js b/js/src/jit-test/tests/jaeger/recompile/undef.js new file mode 100644 index 0000000000..a738c802c6 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/undef.js @@ -0,0 +1,61 @@ + +/* Handle recompilation on undefined variables. */ + +function local() +{ + var x; + x++; + assertEq(x, NaN); + x = 0; +} +local(); + +function name(v) +{ + var x; + with (v) { + x++; + assertEq(x, NaN); + } + assertEq(x, NaN); + x = 0; +} +name({}); + +function letname(v) +{ + if (v) { + let x; + with (v) { + x = "twelve"; + } + assertEq(x, "twelve"); + } +} +letname({}); + +function upvar() +{ + var x; + function inner() { + x++; + assertEq(x, NaN); + } + inner(); +} +upvar(); + +var x; +var y; + +function global() +{ + x++; + assertEq(x, NaN); + var z = 2 + y; + assertEq(z, NaN); +} +global(); + +x = 0; +y = 0; diff --git a/js/src/jit-test/tests/jaeger/regalloc-double.js b/js/src/jit-test/tests/jaeger/regalloc-double.js new file mode 100644 index 0000000000..8d49eb54f5 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/regalloc-double.js @@ -0,0 +1,12 @@ +// register allocation involving doubles. + +function foo(a,b) { + var c; + if (a < b) { + c = a + 1; + } else { + c = 0.5; + } + return c; +} +assertEq(foo(0, 1), 1); diff --git a/js/src/jit-test/tests/jaeger/regalloc-live.js b/js/src/jit-test/tests/jaeger/regalloc-live.js new file mode 100644 index 0000000000..b50ee2a2d3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/regalloc-live.js @@ -0,0 +1,41 @@ + +// test local/arg liveness analysis in presence of many locals + +function foo(a, b, c) { + var x = 0, y = 0, z = 0; + if (a < b) { + x = a + 0; + y = b + 0; + z = c + 0; + } else { + x = a; + y = b; + z = c; + } + return x + y + z; +} +assertEq(foo(1, 2, 3), 6); + +// restore liveness correctly before switch statements + +function foo(a, b, c) { + var x = 0, y = 0, z = 0; + if (a < b) { + x = a + 0; + y = b + 0; + z = c + 0; + } else { + switch (c) { + case 1: + case 2: + case 3: + case 4: + case 5: return 0; + } + x = 0; + y = 0; + z = 0; + } + return x + y + z; +} +assertEq(foo(1, 2, 3), 6); diff --git a/js/src/jit-test/tests/jaeger/regress-bug625701.js b/js/src/jit-test/tests/jaeger/regress-bug625701.js new file mode 100644 index 0000000000..a6f24d9bd4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/regress-bug625701.js @@ -0,0 +1,10 @@ +gczeal(2); + +for(var i=0; i<20; i++) { + function f() { + for (var j = 0; j < 3; j++) { + (function() {})(); + } + } + f(); +} diff --git a/js/src/jit-test/tests/jaeger/rsh-sanity-1.js b/js/src/jit-test/tests/jaeger/rsh-sanity-1.js new file mode 100644 index 0000000000..3127a32ab8 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/rsh-sanity-1.js @@ -0,0 +1,17 @@ +/* Unknown types. */ +function rsh(lhs, rhs) { return lhs >> rhs; } +assertEq(rsh(1024, 2), 256) +assertEq(rsh(1024.5, 2), 256) +assertEq(rsh(1024.5, 2.0), 256) + +/* Constant rhs. */ +var lhs = 1024; +assertEq(lhs >> 2, 256); +lhs = 1024.5; +assertEq(lhs >> 2, 256); + +/* Constant lhs. */ +var rhs = 2; +assertEq(256, 1024 >> rhs); +var rhs = 2.0; +assertEq(256, 1024 >> rhs); diff --git a/js/src/jit-test/tests/jaeger/scriptedICs-1.js b/js/src/jit-test/tests/jaeger/scriptedICs-1.js new file mode 100644 index 0000000000..b0fd505c7e --- /dev/null +++ b/js/src/jit-test/tests/jaeger/scriptedICs-1.js @@ -0,0 +1,39 @@ +T = 12; + +function arity2(q, w, r, t, y) { + var Q1; + var Q2; + var Q3; + var Q4; + var Q5; + var Q6; + var Q7; + var Q8; + var Q9; + T; + return arguments; +} + +function arity(q, w, r) { + var Q1; + var Q2; + var Q3; + var Q4; + var Q5; + var Q6; + var Q7; + var Q8; + var Q9; + T; + return Q9; +} + +for (var i = 0; i < 10; i++) { + arity(); + if (i == 6) + arity = arity2; +} + +/* Don't assert - stubs::CompileFunction must correct |regs.sp| */ + + diff --git a/js/src/jit-test/tests/jaeger/setPropTypeGuard.js b/js/src/jit-test/tests/jaeger/setPropTypeGuard.js new file mode 100644 index 0000000000..3786fc88af --- /dev/null +++ b/js/src/jit-test/tests/jaeger/setPropTypeGuard.js @@ -0,0 +1,23 @@ + +/* + * Get a SETPROP site which is monitored (unknown lhs) and is repeatedly + * invoked on objects with the same shape but different types (and without + * triggering a recompile of the function). The SETPROP PIC needs a type guard + * when the object is being monitored. + */ +var x = {g:0}; +var y = {g:0,f:"fubar"}; +x.f = 10; + +function foo(x) { + for (var i = 0; i < 30; i++) + x.f = 10; +} +function access(x) { + return x.f + 10; +} +foo(Object.create({})); +eval("foo(x)"); +assertEq(access(y), "fubar10"); +eval("foo(y)"); +assertEq(access(y), 20); diff --git a/js/src/jit-test/tests/jaeger/smallIntTypedArrays.js b/js/src/jit-test/tests/jaeger/smallIntTypedArrays.js new file mode 100644 index 0000000000..c63d36bf2a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/smallIntTypedArrays.js @@ -0,0 +1,112 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function testInt8Array(L) { + var f = new Int8Array(8); + assertEq(f[0], 0); + assertEq(f[L], 0); + assertEq(f[L+8], undefined); + assertEq(f[8], undefined); + f[0] = 12; + f[L+1] = 13; + f[2] = f[1]; + f[L+3] = 500; + f[L+4] = true; + f[L+5] = L; + assertEq(f[0], 12); + assertEq(f[1], 13); + assertEq(f[2], 13); + assertEq(f[3], -12); + assertEq(f[4], 1); + assertEq(f[5], 0); +} + +function testUint8Array(L) { + var f = new Uint8Array(8); + assertEq(f[0], 0); + assertEq(f[L], 0); + assertEq(f[L+8], undefined); + assertEq(f[8], undefined); + f[0] = 12; + f[L+1] = 13; + f[2] = f[1]; + f[L+3] = 500; + f[L+4] = true; + f[L+5] = L; + assertEq(f[0], 12); + assertEq(f[1], 13); + assertEq(f[2], 13); + assertEq(f[3], 244); + assertEq(f[4], 1); + assertEq(f[5], 0); +} + +function testUint8ClampedArray(L) { + var f = new Uint8ClampedArray(8); + assertEq(f[0], 0); + assertEq(f[L], 0); + assertEq(f[L+8], undefined); + assertEq(f[8], undefined); + f[0] = 12; + f[L+1] = 13; + f[2] = f[1]; + f[L+3] = 500; + f[L+4] = true; + f[L+5] = L; + assertEq(f[0], 12); + assertEq(f[1], 13); + assertEq(f[2], 13); + assertEq(f[3], 255); + assertEq(f[4], 1); + assertEq(f[5], 0); +} + +function testInt16Array(L) { + var f = new Int16Array(8); + assertEq(f[0], 0); + assertEq(f[L], 0); + assertEq(f[L+8], undefined); + assertEq(f[8], undefined); + f[0] = 12; + f[L+1] = 13; + f[2] = f[1]; + f[L+3] = 190000; + f[L+4] = true; + f[L+5] = L; + assertEq(f[0], 12); + assertEq(f[1], 13); + assertEq(f[2], 13); + assertEq(f[3], -6608); + assertEq(f[4], 1); + assertEq(f[5], 0); +} + +function testUint16Array(L) { + var f = new Uint16Array(8); + assertEq(f[0], 0); + assertEq(f[L], 0); + assertEq(f[L+8], undefined); + assertEq(f[8], undefined); + f[0] = 12; + f[L+1] = 13; + f[2] = f[1]; + f[L+3] = 190000; + f[L+4] = true; + f[L+5] = L; + assertEq(f[0], 12); + assertEq(f[1], 13); + assertEq(f[2], 13); + assertEq(f[3], 58928); + assertEq(f[4], 1); + assertEq(f[5], 0); +} + +for (var i = 0; i < 10; i++) { + testInt8Array(0); + testUint8Array(0); + testUint8ClampedArray(0); + testInt16Array(0); + testUint16Array(0); + if (i == 5) + gc(); +} + diff --git a/js/src/jit-test/tests/jaeger/strictModeSetUndefinedVar.js b/js/src/jit-test/tests/jaeger/strictModeSetUndefinedVar.js new file mode 100644 index 0000000000..99b846c17b --- /dev/null +++ b/js/src/jit-test/tests/jaeger/strictModeSetUndefinedVar.js @@ -0,0 +1,8 @@ +// |jit-test| error: ReferenceError; + +function f() { + "use strict"; + foo = 1; +} + +f(); diff --git a/js/src/jit-test/tests/jaeger/subCommutativity.js b/js/src/jit-test/tests/jaeger/subCommutativity.js new file mode 100644 index 0000000000..89885c27a8 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/subCommutativity.js @@ -0,0 +1,4 @@ +assertEq(6 - ((void 0) ^ 0x80000005), 2147483649); + +var x = ((void 0) ^ 0x80000005); +assertEq(6 - x, 2147483649); diff --git a/js/src/jit-test/tests/jaeger/tableSwitchConst.js b/js/src/jit-test/tests/jaeger/tableSwitchConst.js new file mode 100644 index 0000000000..6422af3187 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/tableSwitchConst.js @@ -0,0 +1,18 @@ +function f() { + switch(2) { + case 1: return 1; + case 2: return 2; + default: return -1; + } +} +assertEq(f(), 2); + +function g() { + switch(3.14) { + case 3: return 3; + case 4: return 4; + default: return -1; + } +} +assertEq(g(), -1); + diff --git a/js/src/jit-test/tests/jaeger/tableSwitchDouble.js b/js/src/jit-test/tests/jaeger/tableSwitchDouble.js new file mode 100644 index 0000000000..df9fe2a55f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/tableSwitchDouble.js @@ -0,0 +1,13 @@ + +function f(a) { + switch(a) { + case 3: return 3; + case 4: return 4; + default: return -1; + } +} + +assertEq(f(-0.0), -1); +assertEq(f(3.14), -1); +assertEq(f(12.34), -1); + diff --git a/js/src/jit-test/tests/jaeger/tableSwitchEmpty.js b/js/src/jit-test/tests/jaeger/tableSwitchEmpty.js new file mode 100644 index 0000000000..42a050dc63 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/tableSwitchEmpty.js @@ -0,0 +1,14 @@ + +function f(a) { + switch(a) { + } + switch(a) { + default: return 0; + } + assertEq(0, 1); +} + +assertEq(f(), 0); +assertEq(f(0), 0); +assertEq(f(1.1), 0); + diff --git a/js/src/jit-test/tests/jaeger/tableSwitchFloat.js b/js/src/jit-test/tests/jaeger/tableSwitchFloat.js new file mode 100644 index 0000000000..6422af3187 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/tableSwitchFloat.js @@ -0,0 +1,18 @@ +function f() { + switch(2) { + case 1: return 1; + case 2: return 2; + default: return -1; + } +} +assertEq(f(), 2); + +function g() { + switch(3.14) { + case 3: return 3; + case 4: return 4; + default: return -1; + } +} +assertEq(g(), -1); + diff --git a/js/src/jit-test/tests/jaeger/tableSwitchNeg.js b/js/src/jit-test/tests/jaeger/tableSwitchNeg.js new file mode 100644 index 0000000000..ae370262e1 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/tableSwitchNeg.js @@ -0,0 +1,27 @@ + +function f(a) { + switch(a) { + case -1: return 1; + case -2: return 2; + case -5: return 5; + default: return 10; + } +} + +assertEq(f(-1), 1); +assertEq(f(-2), 2); +assertEq(f(-5), 5); + +assertEq(f(-3), 10); +assertEq(f(-6), 10); +assertEq(f(0), 10); +assertEq(f(1), 10); + +assertEq(f(-2147483647), 10); +assertEq(f(-2147483648), 10); +assertEq(f(-2147483649), 10); + +assertEq(f(2147483647), 10); +assertEq(f(2147483648), 10); +assertEq(f(2147483649), 10); + diff --git a/js/src/jit-test/tests/jaeger/testAddStringObject.js b/js/src/jit-test/tests/jaeger/testAddStringObject.js new file mode 100644 index 0000000000..0ed0288e6c --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testAddStringObject.js @@ -0,0 +1,17 @@ +String.prototype.m = function(s) { + return this.indexOf('a'); +}; + +var g = function(s) { + return (s + 'asdf').m(); +}; + +var h = function(s) { + return ('asdf' + s).m(); +}; + +var ix = g(new String('abc')); +assertEq(ix, 0); + +var ix = h(new String('abc')); +assertEq(ix, 0); diff --git a/js/src/jit-test/tests/jaeger/testCallElemAfterGC.js b/js/src/jit-test/tests/jaeger/testCallElemAfterGC.js new file mode 100644 index 0000000000..369aa2c6fb --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testCallElemAfterGC.js @@ -0,0 +1,20 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function A() { + this.x = 12; + this.y = function () { return this.x; }; + this[1] = function () { return this.x; }; +} + +function f(obj, key){ + assertEq(obj[key](), 12); +} + +a = new A(); +f(a, "y"); +f(a, "y"); +f(a, 1); +gc(); +f(a, "y"); +f(a, "y"); + diff --git a/js/src/jit-test/tests/jaeger/testDenseCallElem.js b/js/src/jit-test/tests/jaeger/testDenseCallElem.js new file mode 100644 index 0000000000..0301048bf3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testDenseCallElem.js @@ -0,0 +1,89 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function fillDense(a) { +} + +function testDenseUKeyUArray(a, key) { + a.push(function () { return this[3]; }); + a.push(function () { return this[4]; }); + a.push(function() { return this[5]; }); + a.push(20); + a.push("hi"); + a.push(500); + assertEq(a[key](), 20); + assertEq(a[key + 1](), "hi"); + assertEq(a[key + 2](), 500); +} + +function testDenseVKeyUArray(a) { + a.push(function () { return this[3]; }); + a.push(function () { return this[4]; }); + a.push(function() { return this[5]; }); + a.push(20); + a.push("hi"); + a.push(500); + var key = a.length & 1; + assertEq(a[key](), 20); + assertEq(a[(key + 1) & 3](), "hi"); + assertEq(a[(key + 2) & 3](), 500); +} + +function testDenseKKeyUArray(a, key) { + a.push(function () { return this[3]; }); + a.push(function () { return this[4]; }); + a.push(function() { return this[5]; }); + a.push(20); + a.push("hi"); + a.push(500); + assertEq(a[0](), 20); + assertEq(a[1](), "hi"); + assertEq(a[2](), 500); +} + +function testDenseUKeyVArray(key) { + var a = [function () { return this[3]; }, + function () { return this[4]; }, + function() { return this[5]; }, + 20, + "hi", + 500]; + assertEq(a[key](), 20); + assertEq(a[key + 1](), "hi"); + assertEq(a[key + 2](), 500); +} + +function testDenseVKeyVArray() { + var a = [function () { return this[3]; }, + function () { return this[4]; }, + function() { return this[5]; }, + 20, + "hi", + 500]; + var key = a.length & 1; + assertEq(a[key](), 20); + assertEq(a[(key + 1) & 3](), "hi"); + assertEq(a[(key + 2) & 3](), 500); +} + +function testDenseKKeyVArray() { + var a = [function () { return this[3]; }, + function () { return this[4]; }, + function() { return this[5]; }, + 20, + "hi", + 500]; + assertEq(a[0](), 20); + assertEq(a[1](), "hi"); + assertEq(a[2](), 500); +} + +for (var i = 0; i < 5; i++) { + testDenseUKeyUArray([], 0); + testDenseVKeyUArray([]); + testDenseKKeyUArray([]); + testDenseUKeyVArray(0); + testDenseVKeyVArray(); + testDenseKKeyVArray(); +} + + diff --git a/js/src/jit-test/tests/jaeger/testForOps.js b/js/src/jit-test/tests/jaeger/testForOps.js new file mode 100644 index 0000000000..773aae2495 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testForOps.js @@ -0,0 +1,67 @@ +// |jit-test| +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function assertObjectsEqual(obj1, obj2) { + assertEq(obj1.a, obj2.a); + assertEq(obj1.b, obj2.b); + assertEq(obj1.c, obj2.c); + assertEq(obj1.d, obj2.d); + assertEq(obj2.a, 1); + assertEq(obj2.b, "bee"); + assertEq(obj2.c, "crab"); + assertEq(obj2.d, 12); +} + +function forName(obj) { + eval(''); + var r = { }; + for (x in obj) + r[x] = obj[x]; + return r; +} + +function forGlobalName(obj) { + var r = { }; + for (x in obj) + r[x] = obj[x]; + return r; +} + +function forProp(obj) { + var r = { }; + var c = { }; + for (c.x in obj) + r[c.x] = obj[c.x]; + return r; +} + +function forElem(obj, x) { + var r = { }; + var c = { }; + for (c[x] in obj) + r[c[x]] = obj[c[x]]; + return r; +} + +function forLocal(obj) { + var r = { }; + for (var x in obj) + r[x] = obj[x]; + return r; +} + +function forArg(obj, x) { + var r = { }; + for (x in obj) + r[x] = obj[x]; + return r; +} + +var obj = { a: 1, b: "bee", c: "crab", d: 12 }; +assertObjectsEqual(obj, forName(obj)); +assertObjectsEqual(obj, forGlobalName(obj)); +assertObjectsEqual(obj, forProp(obj)); +assertObjectsEqual(obj, forElem(obj, "v")); +assertObjectsEqual(obj, forLocal(obj)); +assertObjectsEqual(obj, forArg(obj)); + diff --git a/js/src/jit-test/tests/jaeger/testIfEqX.js b/js/src/jit-test/tests/jaeger/testIfEqX.js new file mode 100644 index 0000000000..6940619e6f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testIfEqX.js @@ -0,0 +1,37 @@ +// Tests for IFEQX and GOTOX ops. +function testIfElse() { + var src = + "var a = 0;\n" + + "if (x) {\n"; + for (var i=0; i<7000; i++) { + src += "a = 1;"; + } + src += "} else {\n"; + for (var i=0; i<7000; i++) { + src += "a = 2;"; + } + src += "}\n"; + src += "return a;"; + + var f = new Function("x", src); + assertEq(f(true), 1); + assertEq(f(false), 2); + assertEq(f([1, 2, 3]), 1); + assertEq(f(), 2); +} +testIfElse(); + +function testWhile() { + var src = + "var i = 0, j = 0;\n" + + "while (i++ < 50) {\n"; + for (var i=0; i<5000; i++) { + src += "j = i;"; + } + src += "}\n"; + src += "return j;"; + + var f = new Function(src); + assertEq(f(), 50); +} +testWhile(); diff --git a/js/src/jit-test/tests/jaeger/testPropCallElem.js b/js/src/jit-test/tests/jaeger/testPropCallElem.js new file mode 100644 index 0000000000..2bb97fbe64 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testPropCallElem.js @@ -0,0 +1,93 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function testUKeyUObject(a, key1, key2, key3) { + a.a = function () { return this.d; } + a.b = function () { return this.e; } + a.c = function() { return this.f; } + a.d = 20; + a.e = "hi"; + a.f = 500; + assertEq(a[key1](), 20); + assertEq(a[key2](), "hi"); + assertEq(a[key3](), 500); +} + +function testVKeyUObject(a, key1, key2, key3) { + a.a = function () { return this.d; } + a.b = function () { return this.e; } + a.c = function() { return this.f; } + a.d = 20; + a.e = "hi"; + a.f = 500; + assertEq(a["" + key1](), 20); + assertEq(a["" + key2](), "hi"); + assertEq(a["" + key3](), 500); +} + +function testKKeyUObject(a) { + a.a = function () { return this.d; } + a.b = function () { return this.e; } + a.c = function() { return this.f; } + a.d = 20; + a.e = "hi"; + a.f = 500; + var key1 = "a"; + var key2 = "b"; + var key3 = "c"; + assertEq(a[key1](), 20); + assertEq(a[key2](), "hi"); + assertEq(a[key3](), 500); +} + +function testUKeyVObject(key1, key2, key3) { + a = { a: function () { return this.d; }, + b: function () { return this.e; }, + c: function () { return this.f; }, + d: 20, + e: "hi", + f: 500 + }; + assertEq(a[key1](), 20); + assertEq(a[key2](), "hi"); + assertEq(a[key3](), 500); +} + +function testVKeyVObject(key1, key2, key3) { + a = { a: function () { return this.d; }, + b: function () { return this.e; }, + c: function () { return this.f; }, + d: 20, + e: "hi", + f: 500 + }; + assertEq(a["" + key1](), 20); + assertEq(a["" + key2](), "hi"); + assertEq(a["" + key3](), 500); +} + +function testKKeyVObject(a) { + a = { a: function () { return this.d; }, + b: function () { return this.e; }, + c: function () { return this.f; }, + d: 20, + e: "hi", + f: 500 + }; + var key1 = "a"; + var key2 = "b"; + var key3 = "c"; + assertEq(a[key1](), 20); + assertEq(a[key2](), "hi"); + assertEq(a[key3](), 500); +} + +for (var i = 0; i < 5; i++) { + testUKeyUObject({}, "a", "b", "c"); + testVKeyUObject({}, "a", "b", "c"); + testKKeyUObject({}); + testUKeyVObject("a", "b", "c"); + testVKeyVObject("a", "b", "c"); + testKKeyVObject(); +} + + diff --git a/js/src/jit-test/tests/jaeger/testPropCallElem2.js b/js/src/jit-test/tests/jaeger/testPropCallElem2.js new file mode 100644 index 0000000000..43f8efb0fb --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testPropCallElem2.js @@ -0,0 +1,20 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function testUKeyUObject(a, key1, key2, key3) { + a.a = function () { return this.d; } + a.b = function () { return this.e; } + a.c = function() { return this.f; } + a.d = 20; + a.e = "hi"; + a.f = 500; + delete a["b"]; + Object.defineProperty(a, "b", { get: function () { return function () { return this.e; } } }); + assertEq(a[key1](), 20); + assertEq(a[key2](), "hi"); + assertEq(a[key3](), 500); +} + +for (var i = 0; i < 5; i++) + testUKeyUObject({}, "a", "b", "c"); + + diff --git a/js/src/jit-test/tests/jaeger/testSetElem-Easy.js b/js/src/jit-test/tests/jaeger/testSetElem-Easy.js new file mode 100644 index 0000000000..ed8fc7c9a9 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testSetElem-Easy.js @@ -0,0 +1,41 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function testBadSetElems(obj, key) { + obj[key] = 5; + obj[-1] = 5; + var L = obj; + L[L] = L; + obj = []; + obj.K = 5; + obj[2] = 5; + var T = "a"; + obj[T] = 12; + obj = []; + obj[Object] = key; +} + +function testDenseSets(L) { + var obj = [,,,,,,,,,,]; + obj[2] = 2; + assertEq(obj[2], 2); + var T = L; + assertEq(obj[T], 2); + assertEq(obj.length, 10); + obj[10] = T; + assertEq(obj[10], T); + assertEq(obj.length, 11); + var K = T + 9; + obj[K] = K; + assertEq(obj[K], K); + assertEq(obj.length, 12); + obj[K + 1] = obj; + assertEq(obj[K + 1], obj); + assertEq(obj.length, 13); +} + +for (var i = 0; i < 10; i++) { + testBadSetElems([], -1); + testDenseSets(2); +} + + diff --git a/js/src/jit-test/tests/jaeger/testSetElem-Indexed.js b/js/src/jit-test/tests/jaeger/testSetElem-Indexed.js new file mode 100644 index 0000000000..01b42bd6b3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testSetElem-Indexed.js @@ -0,0 +1,36 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function f() { + return [[], [], [], []]; +} + +function setelem(obj, key, val) { + obj[key] = val; +} + +// Generate IC +setelem([], 0, "hi"); +setelem([], 0, "hi"); + +// Get some arrays pre-indexing. +var arrays = f(); + +// Do bad stuff. +Object.defineProperty(Object.prototype, "1", { set: function (v) { this.kettle = v; } }); + +var k = arrays[0]; +setelem(k, 1, 13); +assertEq(k.kettle, 13); +assertEq(k.hasOwnProperty("1"), false); + +Object.defineProperty(Array.prototype, "2", { set: function (v) { this.pot = v; } }); +k = arrays[1]; +setelem(k, 2, "yam"); +assertEq(k.pot, "yam"); + +gc(); + +// make sure this reset okay. +setelem([], 0, "hi"); +setelem([], 0, "hi"); + diff --git a/js/src/jit-test/tests/jaeger/testSetElem-NewProto.js b/js/src/jit-test/tests/jaeger/testSetElem-NewProto.js new file mode 100644 index 0000000000..f202513d53 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testSetElem-NewProto.js @@ -0,0 +1,24 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function f() { + return [[], [], [], []]; +} + +function setelem(obj, key, val) { + obj[key] = val; +} + +// Generate IC +setelem([], 0, "hi"); +setelem([], 0, "hi"); + +var arrays = f(); + +var evil = { }; +Object.defineProperty(evil, "1", { set: function (v) { this.ham = v; } }); +Array.prototype.__proto__ = evil; + +var k = arrays[0]; +setelem(k, 1, "yam"); +assertEq(k.ham, "yam"); + diff --git a/js/src/jit-test/tests/jaeger/testSetTypedFloatArray.js b/js/src/jit-test/tests/jaeger/testSetTypedFloatArray.js new file mode 100644 index 0000000000..33e38dd3fc --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testSetTypedFloatArray.js @@ -0,0 +1,61 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function testSetTypedFloat32Array(k) { + var ar = new Float32Array(8); + ar[k+5] = { }; + ar[k+6] = ar; + ar[k+4] = (k + 800) * 897 * 800 * 800 * 810 * 1923437; + var t = k + 555; + var L = ar[k+7] = t & 5; + ar[0] = 12.3; + ar[8] = 500; + ar[k+8] = 1200; + ar[k+1] = 500; + ar[k+2] = "3" + k; + ar[k+3] = true; + assertEq(ar[0] - 12.3 >= 0 && + ar[0] - 12.3 <= 0.0001, true); + assertEq(ar[1], 500); + assertEq(ar[2], 30); + assertEq(ar[3], 1); + assertEq(ar[4], 715525927453369300000); + assertEq(ar[5], NaN); + assertEq(ar[6], NaN); + assertEq(ar[7], 1); + assertEq(ar[8], undefined); + assertEq(ar[k+8], undefined); +} + +function testSetTypedFloat64Array(k) { + var ar = new Float64Array(8); + ar[k+5] = { }; + ar[k+6] = ar; + ar[k+4] = (k + 800) * 897 * 800 * 800 * 810 * 1923437; + var t = k + 555; + var L = ar[k+7] = t & 5; + ar[0] = 12.3; + ar[8] = 500; + ar[k+8] = 1200; + ar[k+1] = 500; + ar[k+2] = "3" + k; + ar[k+3] = true; + assertEq(ar[0] - 12.3 >= 0 && + ar[0] - 12.3 <= 0.0001, true); + assertEq(ar[1], 500); + assertEq(ar[2], 30); + assertEq(ar[3], 1); + assertEq(ar[4], 715525949998080000000); + assertEq(ar[5], NaN); + assertEq(ar[6], NaN); + assertEq(ar[7], 1); + assertEq(ar[8], undefined); + assertEq(ar[k+8], undefined); +} + +for (var i = 0; i <= 10; i++) { + testSetTypedFloat32Array(0); + testSetTypedFloat64Array(0); + if (i == 5) + gc(); +} + diff --git a/js/src/jit-test/tests/jaeger/testSetTypedIntArray.js b/js/src/jit-test/tests/jaeger/testSetTypedIntArray.js new file mode 100644 index 0000000000..89e943b698 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testSetTypedIntArray.js @@ -0,0 +1,190 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function testSetTypedInt8Array(k) { + var ar = new Int8Array(8); + ar[k+5] = { }; + ar[k+6] = ar; + ar[k+4] = k + 800; + var t = k + 555; + var t = ar[k+7] = t & 5; + ar[0] = 12; + ar[8] = 500; + ar[k+8] = 1200; + ar[k+1] = 500; + ar[k+2] = "3"; + ar[k+3] = true; + assertEq(ar[0], 12); + assertEq(ar[1], -12); + assertEq(ar[2], 3); + assertEq(ar[3], 1); + assertEq(ar[4], 32); + assertEq(ar[5], 0); + assertEq(ar[6], 0); + assertEq(ar[7], 1); + assertEq(ar[8], undefined); + assertEq(ar[k+8], undefined); +} + +function testSetTypedUint8ClampedArray(k) { + var ar = new Uint8ClampedArray(8); + ar[k+5] = { }; + ar[k+6] = ar; + ar[k+4] = k + 800; + var t = k + 555; + var L = ar[k+7] = t & 5; + var Q = ar[k+7] = t + 5; + ar[0] = 12; + ar[8] = 500; + ar[k+8] = 1200; + ar[k+1] = -500; + ar[k+2] = "3"; + ar[k+3] = true; + assertEq(ar[0], 12); + assertEq(ar[1], 0); + assertEq(ar[2], 3); + assertEq(ar[3], 1); + assertEq(ar[4], 255); + assertEq(ar[5], 0); + assertEq(ar[6], 0); + assertEq(ar[7], 255); + assertEq(ar[8], undefined); + assertEq(ar[k+8], undefined); +} + +function testSetTypedUint8Array(k) { + var ar = new Uint8Array(8); + ar[k+5] = { }; + ar[k+6] = ar; + ar[k+4] = k + 800; + var t = k + 555; + var L = ar[k+7] = t + 5; + ar[0] = 12.3; + ar[8] = 500; + ar[k+8] = 1200; + ar[k+1] = 500; + ar[k+2] = "3"; + ar[k+3] = true; + assertEq(ar[0], 12); + assertEq(ar[1], 244); + assertEq(ar[2], 3); + assertEq(ar[3], 1); + assertEq(ar[4], 32); + assertEq(ar[5], 0); + assertEq(ar[6], 0); + assertEq(ar[7], 48); + assertEq(ar[8], undefined); + assertEq(ar[k+8], undefined); +} + +function testSetTypedInt16Array(k) { + var ar = new Int16Array(8); + ar[k+5] = { }; + ar[k+6] = ar; + ar[k+4] = (k + 800) * 800 * 800 * 913; + var t = k + 555; + var L = ar[k+7] = t + 5; + ar[0] = 12.3; + ar[8] = 500; + ar[k+8] = 1200; + ar[k+1] = 500000; + ar[k+2] = "3"; + ar[k+3] = true; + assertEq(ar[0], 12); + assertEq(ar[1], -24288); + assertEq(ar[2], 3); + assertEq(ar[3], 1); + assertEq(ar[4], -32768); + assertEq(ar[5], 0); + assertEq(ar[6], 0); + assertEq(ar[7], 560); + assertEq(ar[8], undefined); + assertEq(ar[k+8], undefined); +} + +function testSetTypedUint16Array(k) { + var ar = new Uint16Array(8); + ar[k+5] = { }; + ar[k+6] = ar; + ar[k+4] = (k + 800) * 800 * 800 * 913; + var t = k + 555; + var L = ar[k+7] = t + 5; + ar[0] = 12.3; + ar[8] = 500; + ar[k+8] = 1200; + ar[k+1] = 500000; + ar[k+2] = "3"; + ar[k+3] = true; + assertEq(ar[0], 12); + assertEq(ar[1], 41248); + assertEq(ar[2], 3); + assertEq(ar[3], 1); + assertEq(ar[4], 32768); + assertEq(ar[5], 0); + assertEq(ar[6], 0); + assertEq(ar[7], 560); + assertEq(ar[8], undefined); + assertEq(ar[k+8], undefined); +} + +function testSetTypedInt32Array(k) { + var ar = new Int32Array(8); + ar[k+5] = { }; + ar[k+6] = ar; + ar[k+4] = (k + 800) * 800 * 800 * 800 * 800; + var t = k + 555; + var L = ar[k+7] = t + 5; + ar[0] = 12.3; + ar[8] = 500; + ar[k+8] = 1200; + ar[k+1] = 500; + ar[k+2] = "3"; + ar[k+3] = true; + assertEq(ar[0], 12); + assertEq(ar[1], 500); + assertEq(ar[2], 3); + assertEq(ar[3], 1); + assertEq(ar[4], -234881024); + assertEq(ar[5], 0); + assertEq(ar[6], 0); + assertEq(ar[7], 560); + assertEq(ar[8], undefined); + assertEq(ar[k+8], undefined); +} + +function testSetTypedUint32Array(k) { + var ar = new Uint32Array(8); + ar[k+5] = { }; + ar[k+6] = ar; + ar[k+4] = (k + 800) * 800 * 800 * 800 * 800; + var t = k + 555; + var L = ar[k+7] = t + 5; + ar[0] = 12.3; + ar[8] = 500; + ar[k+8] = 1200; + ar[k+1] = 500; + ar[k+2] = "3"; + ar[k+3] = true; + assertEq(ar[0], 12); + assertEq(ar[1], 500); + assertEq(ar[2], 3); + assertEq(ar[3], 1); + assertEq(ar[4], 4060086272); + assertEq(ar[5], 0); + assertEq(ar[6], 0); + assertEq(ar[7], 560); + assertEq(ar[8], undefined); + assertEq(ar[k+8], undefined); +} + +for (var i = 0; i <= 10; i++) { + testSetTypedInt8Array(0); + testSetTypedUint8Array(0); + testSetTypedUint8ClampedArray(0); + testSetTypedInt16Array(0); + testSetTypedUint16Array(0); + testSetTypedInt32Array(0); + testSetTypedUint32Array(0); + if (i == 5) + gc(); +} + diff --git a/js/src/jit-test/tests/jaeger/testShiftSameBacking.js b/js/src/jit-test/tests/jaeger/testShiftSameBacking.js new file mode 100644 index 0000000000..1cbe064d3f --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testShiftSameBacking.js @@ -0,0 +1,12 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function f(a) { + var x = a; + var y = x; + + assertEq((x << y), (a << a)); + assertEq((y << x), (a << a)); +} + +f(2); + diff --git a/js/src/jit-test/tests/jaeger/testTableSwitchX.js b/js/src/jit-test/tests/jaeger/testTableSwitchX.js new file mode 100644 index 0000000000..c92d4c2758 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testTableSwitchX.js @@ -0,0 +1,25 @@ +// Tests for JSOP_TABLESWITCHX. +function test1() { + var src = + "var a = 0;\n" + + "switch(x) {\n"; + for (var i=-1; i<4; i++) { + src += (i >= 0) ? + "case " + i + ":\n" : + "default:\n"; + for (var j=0; j<1500; j++) { + src += "a = " + i + ";"; + } + src += "break;\n"; + } + src += "}\n"; + src += "return a;"; + + var f = new Function("x", src); + assertEq(f(0), 0); + assertEq(f(4), -1); + assertEq(f(), -1); + assertEq(f(1.1), -1); + assertEq(f(3), 3); +} +test1(); diff --git a/js/src/jit-test/tests/jaeger/undoAdd.js b/js/src/jit-test/tests/jaeger/undoAdd.js new file mode 100644 index 0000000000..007a29c973 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/undoAdd.js @@ -0,0 +1,25 @@ + +/* Test undoing addition in overflow paths when under heavy register pressure. */ + +function add1(x, y, a, b, res) { var nres = res + 0; var z = (x + a) + (y + b); assertEq(z, nres); } +function add2(x, y, a, b, res) { var nres = res + 0; var z = (x + a) + (y + b); assertEq(z, nres); } +function add3(x, y, a, b, res) { var nres = res + 0; var z = (x + a) + (y + b); assertEq(z, nres); } +add1(0x7ffffff0, 100, 0, 0, 2147483732); +add2(-1000, -0x80000000, 0, 0, -2147484648); +add3(-0x80000000, -1000, 0, 0, -2147484648); + +function cadd1(x, a, b, res) { + var nres = res + 0; + var nb = b + 0; + var z = (x + a) + 1000; + assertEq(z, nres + nb); +} +cadd1(0x7ffffff0, 0, 0, 2147484632); + +function cadd2(x, a, b, res) { + var nres = res + 0; + var nb = b + 0; + var z = (x + a) + (-0x80000000); + assertEq(z, nres + nb); +} +cadd2(-1000, 0, 0, -2147484648); diff --git a/js/src/jit-test/tests/jaeger/unsignedShiftZero.js b/js/src/jit-test/tests/jaeger/unsignedShiftZero.js new file mode 100644 index 0000000000..e199677d05 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/unsignedShiftZero.js @@ -0,0 +1,8 @@ + +function f(a) { + return a >>> 0; +}; + +assertEq(f(-2147483647), 2147483649); +assertEq(f(-2147483648), 2147483648); +assertEq(f(-2147483649), 2147483647); diff --git a/js/src/jit-test/tests/jaeger/xor-sanity.js b/js/src/jit-test/tests/jaeger/xor-sanity.js new file mode 100644 index 0000000000..4f41e0fcec --- /dev/null +++ b/js/src/jit-test/tests/jaeger/xor-sanity.js @@ -0,0 +1 @@ +assertEq(-2^31, -31); diff --git a/js/src/jit-test/tests/large-arraybuffers/address-offset-overflow.js b/js/src/jit-test/tests/large-arraybuffers/address-offset-overflow.js new file mode 100644 index 0000000000..02914237d9 --- /dev/null +++ b/js/src/jit-test/tests/large-arraybuffers/address-offset-overflow.js @@ -0,0 +1,94 @@ +// |jit-test| test-also=--spectre-mitigations=off + +// Ensure |index * ByteSize| overflowing int32_t is handled correctly in the +// backend. + +const ab = new ArrayBuffer(7 * 1024 * 1024 * 1024); + +function testInt16() { + var ta = new Int16Array(ab); + for (var i = 0; i < 2000; i++) { + var idx = 1073741824; // 2147483648 / 2, offset doesn't fit in int32_t. + assertEq(ta[idx], i); + ++ta[idx]; + + idx = 1073741823; // Largest offset that fits in int32_t. + assertEq(ta[idx], i * 2); + ta[idx] += 2; + } + ta[1073741823] = 0; + ta[1073741824] = 0; +} +testInt16(); + +function testInt32() { + var ta = new Int32Array(ab); + for (var i = 0; i < 2000; i++) { + var idx = 536870912; // 2147483648 / 4, offset doesn't fit in int32_t. + assertEq(ta[idx], i); + ++ta[idx]; + + idx = 536870911; // Largest offset that fits in int32_t. + assertEq(ta[idx], i * 2); + ta[idx] += 2; + } + ta[536870911] = 0; + ta[536870912] = 0; +} +testInt32(); + +function testFloat64() { + var ta = new Float64Array(ab); + for (var i = 0; i < 2000; i++) { + var idx = 268435456; // 2147483648 / 8 + assertEq(ta[idx], i); + ++ta[idx]; + + idx = 268435455; // Largest offset that fits in int32_t. + assertEq(ta[idx], i * 2); + ta[idx] += 2; + } + ta[268435455] = 0; + ta[268435456] = 0; +} +testFloat64(); + +function testBigInt() { + var ta = new BigInt64Array(ab); + for (var i = 0; i < 2000; i++) { + var idx = 268435456; // 2147483648 / 8 + assertEq(ta[idx], BigInt(i)); + ++ta[idx]; + + idx = 268435455; // Largest offset that fits in int32_t. + assertEq(ta[idx], BigInt(i * 2)); + ta[idx] += 2n; + } + ta[268435455] = 0n; + ta[268435456] = 0n; +} +testBigInt(); + +function testInt16Atomics() { + var ta = new Int16Array(ab); + for (var i = 0; i < 2000; i++) { + var idx = 1073741824; // 2147483648 / 2, offset doesn't fit in int32_t. + assertEq(Atomics.load(ta, idx), i); + Atomics.add(ta, idx, 1); + Atomics.exchange(ta, idx, 2); + assertEq(ta[idx], 2); + assertEq(Atomics.compareExchange(ta, idx, 2, 3), 2); + Atomics.store(ta, idx, i + 1); + + idx = 1073741823; // Largest offset that fits in int32_t. + assertEq(Atomics.load(ta, idx), i); + Atomics.add(ta, idx, 1); + Atomics.exchange(ta, idx, 2); + assertEq(ta[idx], 2); + assertEq(Atomics.compareExchange(ta, idx, 2, 3), 2); + Atomics.store(ta, idx, i + 1); + } + ta[1073741823] = 0; + ta[1073741824] = 0; +} +testInt16Atomics(); diff --git a/js/src/jit-test/tests/large-arraybuffers/arraybuffer-transfer.js b/js/src/jit-test/tests/large-arraybuffers/arraybuffer-transfer.js new file mode 100644 index 0000000000..3f522e741c --- /dev/null +++ b/js/src/jit-test/tests/large-arraybuffers/arraybuffer-transfer.js @@ -0,0 +1,64 @@ +const gb = 1 * 1024 * 1024 * 1024; + +const smallByteLength = 1024; +const largeByteLength = 4 * gb; + +// Fast alternative to |assertEq| to avoid a slow VM-call. +// Should only be used when looping over the TypedArray contents to avoid +// unnecessary test slowdowns. +function assertEqNum(e, a) { + if (e !== a) { + assertEq(e, a); + } +} + +{ + let smallBuffer = new ArrayBuffer(smallByteLength); + + let i8 = new Uint8Array(smallBuffer); + for (let i = 0; i < smallByteLength; ++i) { + assertEqNum(i8[i], 0); + i8[i] = i; + } + + assertEq(smallBuffer.byteLength, smallByteLength); + assertEq(smallBuffer.detached, false); + + // Copy from a small into a large buffer. + let largeBuffer = smallBuffer.transfer(largeByteLength); + + assertEq(smallBuffer.byteLength, 0); + assertEq(smallBuffer.detached, true); + + assertEq(largeBuffer.byteLength, largeByteLength); + assertEq(largeBuffer.detached, false); + + i8 = new Uint8Array(largeBuffer); + for (let i = 0; i < smallByteLength; ++i) { + assertEqNum(i8[i], i & 0xff); + } + + // Test the first 100 new bytes. + for (let i = smallByteLength; i < smallByteLength + 100; ++i) { + assertEqNum(i8[i], 0); + } + + // And the last 100 new bytes. + for (let i = largeByteLength - 100; i < largeByteLength; ++i) { + assertEqNum(i8[i], 0); + } + + // Copy back from a large into a small buffer. + smallBuffer = largeBuffer.transfer(smallByteLength); + + assertEq(largeBuffer.byteLength, 0); + assertEq(largeBuffer.detached, true); + + assertEq(smallBuffer.byteLength, smallByteLength); + assertEq(smallBuffer.detached, false); + + i8 = new Uint8Array(smallBuffer); + for (let i = 0; i < smallByteLength; ++i) { + assertEqNum(i8[i], i & 0xff); + } +} diff --git a/js/src/jit-test/tests/large-arraybuffers/atomics.js b/js/src/jit-test/tests/large-arraybuffers/atomics.js new file mode 100644 index 0000000000..0e108db3b7 --- /dev/null +++ b/js/src/jit-test/tests/large-arraybuffers/atomics.js @@ -0,0 +1,57 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer || !this.Atomics + +let gb = 1 * 1024 * 1024 * 1024; +let buflen = 4 * gb + 64; +let sab = new SharedArrayBuffer(buflen); +assertEq(sab.byteLength, buflen); + +function testBasic(base) { + var uint8 = new Uint8Array(sab); + var uint8Part = new Uint8Array(sab, base, 64); + + for (var i = 0; i < 50; i++) { + var index = base + i; + uint8Part[i] = 123; + assertEq(uint8[index], 123); + + // Binary ops. + assertEq(Atomics.add(uint8, index, 1), 123); + assertEq(Atomics.and(uint8, index, 0xf), 124); + assertEq(Atomics.or(uint8, index, 0xf), 12); + assertEq(Atomics.xor(uint8, index, 0xee), 0xf); + assertEq(Atomics.sub(uint8, index, 100), 225); + assertEq(uint8Part[i], 125); + + // compareExchange. + assertEq(Atomics.compareExchange(uint8, index, 125, 90), 125); + assertEq(Atomics.compareExchange(uint8, index, 125, 90), 90); + assertEq(uint8Part[i], 90); + + // exchange. + assertEq(Atomics.exchange(uint8, index, 42), 90); + assertEq(uint8Part[i], 42); + + // load/store. + assertEq(Atomics.load(uint8, index), 42); + assertEq(Atomics.store(uint8, index, 99), 99); + assertEq(uint8Part[i], 99); + } +} +for (let i = 0; i <= 4; i++) { + testBasic(i * gb); +} + +function testWait() { + let int32 = new Int32Array(sab); + let index = int32.length - 1; + assertEq(int32[index], 0); + assertEq(Atomics.wait(int32, index, 1), "not-equal"); + int32[index] = 12345; + assertEq(Atomics.wait(int32, index, 12345, 1), "timed-out"); + assertEq(Atomics.notify(int32, index), 0); + + let int32WithOffset = new Int32Array(sab, int32.byteLength - 4); + assertEq(int32WithOffset[0], 12345); + assertEq(Atomics.wait(int32WithOffset, 0, 12345, 1), "timed-out"); +} +testWait(); diff --git a/js/src/jit-test/tests/large-arraybuffers/basic.js b/js/src/jit-test/tests/large-arraybuffers/basic.js new file mode 100644 index 0000000000..58db1ee128 --- /dev/null +++ b/js/src/jit-test/tests/large-arraybuffers/basic.js @@ -0,0 +1,50 @@ +// Basic smoke tests for large ArrayBuffers. + +let gb = 1 * 1024 * 1024 * 1024; + +function test1() { + let ab = new ArrayBuffer(7 * gb); + assertEq(ab.byteLength, 7 * gb); + + let taInt16 = new Int16Array(ab); + assertEq(taInt16.byteOffset, 0); + assertEq(taInt16.byteLength, 7 * gb); + assertEq(taInt16.length, 3.5 * gb); + + let taInt16LastGb = new Int16Array(ab, 6 * gb); + assertEq(taInt16LastGb.byteOffset, 6 * gb); + assertEq(taInt16LastGb.byteLength, 1 * gb); + assertEq(taInt16LastGb.length, 0.5 * gb); + + taInt16LastGb[0] = -99; + assertEq(taInt16[3 * gb], -99); + + let taUint8 = new Uint8Array(ab); + assertEq(taUint8.length, 7 * gb); + assertEq(taUint8[7 * gb - 1], 0); + + taUint8[7 * gb - 1] = 42; + taUint8[7 * gb - 1]++; + ++taUint8[7 * gb - 1]; + assertEq(taUint8[7 * gb - 1], 44); + + let dv = new DataView(ab); + assertEq(dv.getInt16(6 * gb, true), -99); + assertEq(dv.getUint8(7 * gb - 1, true), 44); + + dv.setInt16(6 * gb + 2, 123, true); + assertEq(taInt16LastGb[1], 123); +} +test1(); + +function test2() { + let taInt8 = new Int8Array(4 * gb); + assertEq(taInt8.length, 4 * gb); + taInt8[4 * gb - 4] = 42; + assertEq(taInt8[4 * gb - 4], 42); + + let dv = new DataView(taInt8.buffer); + assertEq(dv.getInt32(4 * gb - 4, true), 42); + assertEq(dv.getBigInt64(4 * gb - 8, true), 180388626432n); +} +test2(); diff --git a/js/src/jit-test/tests/large-arraybuffers/directives.txt b/js/src/jit-test/tests/large-arraybuffers/directives.txt new file mode 100644 index 0000000000..7f4cb67f4a --- /dev/null +++ b/js/src/jit-test/tests/large-arraybuffers/directives.txt @@ -0,0 +1 @@ +|jit-test| allow-oom; skip-if: (!largeArrayBufferSupported() || getBuildConfiguration("tsan")) diff --git a/js/src/jit-test/tests/large-arraybuffers/jit-alloc-big.js b/js/src/jit-test/tests/large-arraybuffers/jit-alloc-big.js new file mode 100644 index 0000000000..2d2706f903 --- /dev/null +++ b/js/src/jit-test/tests/large-arraybuffers/jit-alloc-big.js @@ -0,0 +1,23 @@ +// |jit-test| slow + +// Ensure Warp JIT code handles |new Int32Array(INT32_MAX)| correctly. + +function test(len) { + var ta; + for (var i = 0; i < 2149; i++) { + if (i % 1024 === 100) { + // Constant length. + ta = new Int32Array(0x7fff_ffff); + assertEq(ta.length, 0x7fff_ffff); + ta[0x7fff_fffe] = i; + assertEq(ta[0x7fff_fffe], i); + + // Variable length. + ta = new Int32Array(len - i); + assertEq(ta.length, len - i); + ta[ta.length - 1] = i; + assertEq(ta[ta.length - 1], i); + } + } +} +test(0x7fff_ffff); diff --git a/js/src/jit-test/tests/large-arraybuffers/jit-bounds-checks.js b/js/src/jit-test/tests/large-arraybuffers/jit-bounds-checks.js new file mode 100644 index 0000000000..29a4056873 --- /dev/null +++ b/js/src/jit-test/tests/large-arraybuffers/jit-bounds-checks.js @@ -0,0 +1,117 @@ +// |jit-test| test-also=--spectre-mitigations=off + +const gb = 1 * 1024 * 1024 * 1024; +const ab = new ArrayBuffer(7 * gb); + +// Function called with Uint8Arrays of different sizes. +function test(u8arr) { + var length = u8arr.length; + u8arr[0] = 87; + + function testExpectedOOB() { + var base = length - 10; + u8arr[base]++; + for (var i = 0; i < 15; i++) { + var val = u8arr[base + i]; + u8arr[base + i + 1] = (val|0) + 1; + } + } + for (var i = 0; i < 500; i++) { + testExpectedOOB(); + } + assertEq(u8arr[length - 1], 253); + + function testNegativeInt32Index() { + var val = 0; + for (var i = 0; i < 1500; i++) { + var idx = (i < 1450) - 1; // First 0, then -1. + val = u8arr[idx]; + } + assertEq(val, undefined); + } + testNegativeInt32Index(); + + function testNegativeDoubleIndex() { + var val = 0; + for (var i = 0; i < 1500; i++) { + var idx = numberToDouble(+(i < 1450)) - 1; // First 0.0, then -1.0. + val = u8arr[idx]; + assertEq(val, i < 1450 ? 87 : undefined); + } + } + testNegativeDoubleIndex(); + + function testConstantDoubleIndex() { + for (var i = 0; i < 1500; i++) { + var idxInBounds = 4294967100; + assertEq(u8arr[idxInBounds], 0); + u8arr[idxInBounds] = 1; + assertEq(u8arr[idxInBounds], 1); + u8arr[idxInBounds] = 0; + var idxOOB = 7516192768; + assertEq(u8arr[idxOOB], undefined); + var idxFractional = 7516192766 - 0.1; + assertEq(u8arr[idxFractional], undefined); + var idxNeg0 = -0; + assertEq(u8arr[idxNeg0], 87); + var idxNaN = NaN; + assertEq(u8arr[idxNaN], undefined); + } + } + testConstantDoubleIndex(); + + function testDoubleIndexWeird() { + var arr = [0.0, -0, 3.14, NaN, Infinity, -Infinity, + Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER]; + for (var i = 0; i < 1500; i++) { + var which = i % arr.length; + var idx = arr[which]; + assertEq(u8arr[idx], which < 2 ? 87 : undefined); + } + } + testDoubleIndexWeird(); + + // Uses LCompare. + function testHasElement1() { + for (var i = 0; i < 1500; i++) { + var idx = (length - 500) + i; + assertEq(idx in u8arr, idx < length); + assertEq(-1 in u8arr, false); + assertEq(10737418240 in u8arr, false); + assertEq(0x7fff_ffff in u8arr, true); + assertEq(0xffff_ffff in u8arr, true); + } + } + testHasElement1(); + + // Uses LCompareAndBranch. + function testHasElement2() { + for (var i = 0; i < 1500; i++) { + var idx = (length - 500) + i; + if (idx in u8arr) { + assertEq(idx < length, true); + } else { + assertEq(idx >= length, true); + } + var count = 0; + if (-1 in u8arr) { + count++; + } + if (10737418240 in u8arr) { + count++; + } + if (0x7fff_ffff in u8arr) { + } else { + count++; + } + if (0xffff_ffff in u8arr) { + } else { + count++; + } + assertEq(count, 0); + } + } + testHasElement2(); +} +test(new Uint8Array(ab)); // 7 GB +test(new Uint8Array(ab, 0, 4 * gb)); // 4 GB diff --git a/js/src/jit-test/tests/large-arraybuffers/large-lengths-offsets.js b/js/src/jit-test/tests/large-arraybuffers/large-lengths-offsets.js new file mode 100644 index 0000000000..4e2bff1d70 --- /dev/null +++ b/js/src/jit-test/tests/large-arraybuffers/large-lengths-offsets.js @@ -0,0 +1,73 @@ +const gb = 1 * 1024 * 1024 * 1024; + +const bufferSmall = new ArrayBuffer(8); +const bufferLarge = new ArrayBuffer(6 * gb); + +const taSmall = new Uint8Array(bufferSmall); +const taLargeOffset = new Uint8Array(bufferLarge, 5 * gb); +const taLargeLength = new Uint8Array(bufferLarge); + +const dvSmall = new DataView(bufferSmall); +const dvLargeOffset = new DataView(bufferLarge, 5 * gb); +const dvLargeLength = new DataView(bufferLarge); + +const ArrayBufferByteLength = getSelfHostedValue("ArrayBufferByteLength"); +const TypedArrayByteOffset = getSelfHostedValue("TypedArrayByteOffset"); +const TypedArrayLength = getSelfHostedValue("TypedArrayLength"); + +function testBufferByteLengthInt32() { + var arr = [bufferLarge, bufferSmall]; + for (var i = 0; i < 2000; i++) { + var idx = +(i < 1900); // First 1 then 0. + assertEq(ArrayBufferByteLength(arr[idx]), idx === 0 ? 6 * gb : 8); + assertEq(arr[idx].byteLength, idx === 0 ? 6 * gb : 8); + } +} +testBufferByteLengthInt32(); + +function testTypedArrayByteOffsetInt32() { + var arr = [taLargeOffset, taSmall]; + for (var i = 0; i < 2000; i++) { + var idx = +(i < 1900); // First 1 then 0. + assertEq(TypedArrayByteOffset(arr[idx]), idx === 0 ? 5 * gb : 0); + assertEq(arr[idx].byteOffset, idx === 0 ? 5 * gb : 0); + } +} +testTypedArrayByteOffsetInt32(); + +function testTypedArrayLengthInt32() { + var arr = [taLargeLength, taSmall]; + for (var i = 0; i < 2000; i++) { + var idx = +(i < 1900); // First 1 then 0. + assertEq(TypedArrayLength(arr[idx]), idx === 0 ? 6 * gb : 8); + assertEq(arr[idx].length, idx === 0 ? 6 * gb : 8); + } +} +testTypedArrayLengthInt32(); + +function testTypedArrayByteLengthInt32() { + var arr = [taLargeLength, taSmall]; + for (var i = 0; i < 2000; i++) { + var idx = +(i < 1900); // First 1 then 0. + assertEq(arr[idx].byteLength, idx === 0 ? 6 * gb : 8); + } +} +testTypedArrayByteLengthInt32(); + +function testDataViewByteOffsetInt32() { + var arr = [dvLargeOffset, dvSmall]; + for (var i = 0; i < 2000; i++) { + var idx = +(i < 1900); // First 1 then 0. + assertEq(arr[idx].byteOffset, idx === 0 ? 5 * gb : 0); + } +} +testDataViewByteOffsetInt32(); + +function testDataViewByteLengthInt32() { + var arr = [dvLargeLength, dvSmall]; + for (var i = 0; i < 2000; i++) { + var idx = +(i < 1900); // First 1 then 0. + assertEq(arr[idx].byteLength, idx === 0 ? 6 * gb : 8); + } +} +testDataViewByteLengthInt32(); diff --git a/js/src/jit-test/tests/large-arraybuffers/max-typed-array-size.js b/js/src/jit-test/tests/large-arraybuffers/max-typed-array-size.js new file mode 100644 index 0000000000..3cf01057b6 --- /dev/null +++ b/js/src/jit-test/tests/large-arraybuffers/max-typed-array-size.js @@ -0,0 +1,19 @@ +load(libdir + "asserts.js"); + +const maxByteLength = 8 * 1024 * 1024 * 1024; + +// Test only the smallest and largest element type, because allocating a lot of +// large buffers can be pretty slow. +for (let ctor of [Int8Array, BigInt64Array]) { + const maxLength = maxByteLength / ctor.BYTES_PER_ELEMENT; + let ta1 = new ctor(maxLength); + assertEq(ta1.length, maxLength); + ta1[maxLength - 1]++; + + let ta2 = new ctor(ta1.buffer, 0, maxLength); + assertEq(ta2.length, maxLength); + assertEq(ta1[maxLength - 1], ta2[maxLength - 1]); + + assertThrowsInstanceOf(() => new ctor(maxLength + 1), RangeError); + assertThrowsInstanceOf(() => new ctor(ta1.buffer, 0, maxLength + 1), RangeError); +} diff --git a/js/src/jit-test/tests/large-arraybuffers/shared-array-buffer.js b/js/src/jit-test/tests/large-arraybuffers/shared-array-buffer.js new file mode 100644 index 0000000000..608744b392 --- /dev/null +++ b/js/src/jit-test/tests/large-arraybuffers/shared-array-buffer.js @@ -0,0 +1,40 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +var gb = 1 * 1024 * 1024 * 1024; +var sab = new SharedArrayBuffer(4 * gb + 10); +var ta = new Uint8Array(sab); + +function testSlice() { + // Large |start| and |end|. + ta[4 * gb + 0] = 11; + ta[4 * gb + 1] = 22; + ta[4 * gb + 2] = 33; + ta[4 * gb + 3] = 44; + var ta2 = new Uint8Array(sab.slice(4 * gb, 4 * gb + 4)); + assertEq(ta2.toString(), "11,22,33,44"); + + // Large |start|. + ta[ta.length - 3] = 99; + ta[ta.length - 2] = 88; + ta[ta.length - 1] = 77; + ta2 = new Uint8Array(sab.slice(4 * gb + 8)); + assertEq(ta2.toString(), "88,77"); + + // Relative values. + ta2 = new Uint8Array(sab.slice(-3, -1)); + assertEq(ta2.toString(), "99,88"); + + // Large relative values. + ta[0] = 100; + ta[1] = 101; + ta[2] = 102; + ta2 = new Uint8Array(sab.slice(-ta.length, -ta.length + 3)); + assertEq(ta2.toString(), "100,101,102"); +} +testSlice(); + +function testSharedMailbox() { + setSharedObject(sab); + assertEq(getSharedObject().byteLength, 4 * gb + 10); +} +testSharedMailbox(); diff --git a/js/src/jit-test/tests/large-arraybuffers/structured-clone.js b/js/src/jit-test/tests/large-arraybuffers/structured-clone.js new file mode 100644 index 0000000000..b9d3c70cb5 --- /dev/null +++ b/js/src/jit-test/tests/large-arraybuffers/structured-clone.js @@ -0,0 +1,74 @@ +var gb = 1 * 1024 * 1024 * 1024; +var ab = new ArrayBuffer(5 * gb); + +var ta1 = new Uint8Array(ab); + +for (var i = 0; i < 5; i++) { + ta1[i * gb + 0] = i + 1; + ta1[i * gb + 1] = i + 2; + ta1[i * gb + 2] = i + 3; + ta1[i * gb + 3] = i + 4; +} + +function test(transferables, scope) { + var ta2 = new Int32Array(ab, ab.byteLength - 8, 2); + ta2[0] = 1234567; + var dv1 = new DataView(ab); + var dv2 = new DataView(ab, ab.byteLength - 8); + dv2.setInt32(4, -987654); + var objects = [ab, ta1, ta2, dv1, dv2]; + + var clonebuf = serialize(objects, transferables, {scope}); + check(clonebuf); +} + +function check(clonebuf) { + var objects = deserialize(clonebuf); + assertEq(objects.length, 5); + + var ab = objects[0]; + assertEq(ab instanceof ArrayBuffer, true); + assertEq(ab.byteLength, 5 * gb); + + var ta1 = objects[1]; + assertEq(ta1 instanceof Uint8Array, true); + assertEq(ta1.buffer, ab); + assertEq(ta1.byteOffset, 0); + assertEq(ta1.length, 5 * gb); + + for (var i = 0; i < 5; i++) { + assertEq(ta1[i * gb + 0], i + 1); + assertEq(ta1[i * gb + 1], i + 2); + assertEq(ta1[i * gb + 2], i + 3); + assertEq(ta1[i * gb + 3], i + 4); + } + + var ta2 = objects[2]; + assertEq(ta2 instanceof Int32Array, true); + assertEq(ta2.buffer, ab); + assertEq(ta2.byteOffset, 5 * gb - 8); + assertEq(ta2.length, 2); + assertEq(ta2[0], 1234567); + + var dv1 = objects[3]; + assertEq(dv1 instanceof DataView, true); + assertEq(dv1.buffer, ab); + assertEq(dv1.byteOffset, 0); + assertEq(dv1.byteLength, 5 * gb); + + var dv2 = objects[4]; + assertEq(dv2 instanceof DataView, true); + assertEq(dv2.buffer, ab); + assertEq(dv2.byteOffset, 5 * gb - 8); + assertEq(dv2.byteLength, 8); + assertEq(dv2.getInt32(4), -987654); +} + +// It would be nice to test serialization of the ArrayBuffer's contents, but it +// causes OOMs and/or timeouts in automation so for now only test the more +// efficient version that transfers the underlying buffer. +//test([], "DifferentProcessForIndexedDB"); +//assertEq(ab.byteLength, 5 * gb); + +test([ab], "SameProcess"); +assertEq(ab.byteLength, 0); diff --git a/js/src/jit-test/tests/large-arraybuffers/typed-array.js b/js/src/jit-test/tests/large-arraybuffers/typed-array.js new file mode 100644 index 0000000000..c6eebc86cd --- /dev/null +++ b/js/src/jit-test/tests/large-arraybuffers/typed-array.js @@ -0,0 +1,203 @@ +load(libdir + "asserts.js"); + +var gb = 1 * 1024 * 1024 * 1024; +var ta = new Uint8Array(4 * gb + 10); + +function testSetFromTyped() { + var ta2 = new Int8Array(10); + ta2[0] = 23; + ta2[9] = -10; + ta.set(ta2, 4 * gb); + assertEq(ta[4 * gb + 0], 23); + assertEq(ta[4 * gb + 9], 246); +} +testSetFromTyped(); + +function testSetFromOther() { + ta.set([12, 34], 4 * gb + 4); + assertEq(ta[4 * gb + 4], 12); + assertEq(ta[4 * gb + 5], 34); +} +testSetFromOther(); + +function testCopyWithin() { + // Large |start|. + ta[ta.length - 1] = 3; + ta.copyWithin(0, 4 * gb); + assertEq(ta[9], 3); + + // Large relative |start|. + ta[ta.length - 1] = 4; + ta.copyWithin(0, -10); + assertEq(ta[9], 4); + + // Large |start| and |end|. + ta[ta.length - 3] = 5; + ta[ta.length - 2] = 66; + ta[1] = 1; + ta.copyWithin(0, ta.length - 3, ta.length - 2); + assertEq(ta[0], 5); + assertEq(ta[1], 1); + + // Large |target| and |start|. + ta.copyWithin(4 * gb + 5, 4 * gb + 7); + assertEq(ta[4 * gb + 6], 66); + + // Large |target|. + ta[6] = 117; + ta.copyWithin(4 * gb); + assertEq(ta[4 * gb + 6], 117); +} +testCopyWithin(); + +function testSlice() { + // Large |start| and |end|. + ta[4 * gb + 0] = 11; + ta[4 * gb + 1] = 22; + ta[4 * gb + 2] = 33; + ta[4 * gb + 3] = 44; + var ta2 = ta.slice(4 * gb, 4 * gb + 4); + assertEq(ta2.toString(), "11,22,33,44"); + + // Large |start|. + ta[ta.length - 3] = 99; + ta[ta.length - 2] = 88; + ta[ta.length - 1] = 77; + ta2 = ta.slice(4 * gb + 8); + assertEq(ta2.toString(), "88,77"); + + // Relative values. + ta2 = ta.slice(-3, -1); + assertEq(ta2.toString(), "99,88"); + + // Large relative values. + ta[0] = 100; + ta[1] = 101; + ta[2] = 102; + ta2 = ta.slice(-ta.length, -ta.length + 3); + assertEq(ta2.toString(), "100,101,102"); +} +testSlice(); + +function testSubarray() { + // Large |start| and |end|. + ta[4 * gb + 0] = 11; + ta[4 * gb + 1] = 22; + ta[4 * gb + 2] = 33; + ta[4 * gb + 3] = 44; + var ta2 = ta.subarray(4 * gb, 4 * gb + 4); + assertEq(ta2.toString(), "11,22,33,44"); + + // Large |start|. + ta[ta.length - 3] = 99; + ta[ta.length - 2] = 88; + ta[ta.length - 1] = 77; + ta2 = ta.subarray(4 * gb + 8); + assertEq(ta2.toString(), "88,77"); + + // Relative values. + ta2 = ta.subarray(-3, -1); + assertEq(ta2.toString(), "99,88"); + + // Large relative values. + ta[0] = 100; + ta[1] = 101; + ta[2] = 102; + ta2 = ta.subarray(-ta.length, -ta.length + 3); + assertEq(ta2.toString(), "100,101,102"); +} +testSubarray(); + +function testIterators() { + var ex; + + ex = null; + try { + for (var p in ta) {} + } catch (e) { + ex = e; + } + assertEq(ex, "out of memory"); + + ex = null; + try { + Object.getOwnPropertyNames(ta); + } catch (e) { + ex = e; + } + const msg = ex + ""; + assertEq(msg.includes("out of memory") || msg.includes("InternalError: allocation size overflow"), true); +} +testIterators(); + +function testArraySliceSparse() { + // Length mustn't exceed UINT32_MAX. + var len = 4 * gb - 1; + var ta2 = new Int8Array(ta.buffer, 0, len); + ta2[len - 1] = 1; + + // The SliceSparse optimisation is only used for native objects which have the + // "indexed" flag set. + var o = { + length: len, + 100000: 0, // sparse + indexed + __proto__: ta2, + }; + + // Collect sufficient elements to trigger the SliceSparse optimisation. + var r = Array.prototype.slice.call(o, -2000); + assertEq(r.length, 2000); + assertEq(r[r.length - 1], 1); +} +testArraySliceSparse(); + +function testArrayIterator() { + for (var i = 0; i < 20; i++) { + ta[i] = i; + } + var sum = 0; + var i = 0; + for (var x of ta) { + if (i++ > 20) { + break; + } + sum += x; + } + assertEq(sum, 190); +} +testArrayIterator(); + +function testArrayBufferSlice() { + // Large |start| and |end|. + ta[4 * gb + 0] = 11; + ta[4 * gb + 1] = 22; + ta[4 * gb + 2] = 33; + ta[4 * gb + 3] = 44; + var ta2 = new Uint8Array(ta.buffer.slice(4 * gb, 4 * gb + 4)); + assertEq(ta2.toString(), "11,22,33,44"); + + // Large |start|. + ta[ta.length - 3] = 99; + ta[ta.length - 2] = 88; + ta[ta.length - 1] = 77; + ta2 = new Uint8Array(ta.buffer.slice(4 * gb + 8)); + assertEq(ta2.toString(), "88,77"); + + // Relative values. + ta2 = new Uint8Array(ta.buffer.slice(-3, -1)); + assertEq(ta2.toString(), "99,88"); + + // Large relative values. + ta[0] = 100; + ta[1] = 101; + ta[2] = 102; + ta2 = new Uint8Array(ta.buffer.slice(-ta.length, -ta.length + 3)); + assertEq(ta2.toString(), "100,101,102"); +} +testArrayBufferSlice(); + +function testFromObjectTooLargeLength() { + assertThrowsInstanceOf(() => new Uint8Array({length: 9 * gb}), RangeError); + assertThrowsInstanceOf(() => ta.set({length: 9 * gb}), RangeError); +} +testFromObjectTooLargeLength(); diff --git a/js/src/jit-test/tests/latin1/assorted.js b/js/src/jit-test/tests/latin1/assorted.js new file mode 100644 index 0000000000..5d6da13030 --- /dev/null +++ b/js/src/jit-test/tests/latin1/assorted.js @@ -0,0 +1,39 @@ +// Reflect.parse Latin1 +var ast = Reflect.parse("function f() { return 3; }"); +assertEq(ast.body[0].id.name, "f"); +assertEq(isLatin1(ast.body[0].id.name), true); + +// Reflect.parse TwoByte +var ast = Reflect.parse("function f\u1200() { return 3; }"); +assertEq(ast.body[0].id.name, "f\u1200"); + +if (Object.prototype.toSource) { + // obj.toSource Latin1 + var o = {}; + Object.defineProperty(o, "prop", {get: function() { return 1; }, + set: function() { return 2; }, + enumerable: true, configurable: true}); + assertEq(o.toSource(), "({get prop() { return 1; }, set prop() { return 2; }})"); + + // obj.toSource TwoByte + Object.defineProperty(o, "prop", {get: function() { return "\u1200"; }, + set: function() { return "\u1200"; }, + enumerable: true}); + assertEq(o.toSource(), '({get prop() { return "\\u1200"; }, set prop() { return "\\u1200"; }})'); + + var ff = function() { return 10; }; + ff.toSource = function() { return "((11))"; } + Object.defineProperty(o, "prop", {get: ff, set: ff, enumerable: true}); + assertEq(o.toSource(), "({get prop(11), set prop(11)})"); +} + +// XDR +load(libdir + 'bytecode-cache.js'); + +// Latin1 string constant +test = "'string123';"; +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); + +// TwoByte string constant +test = "'string\u1234';"; +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); diff --git a/js/src/jit-test/tests/latin1/basic.js b/js/src/jit-test/tests/latin1/basic.js new file mode 100644 index 0000000000..a11a6cf65d --- /dev/null +++ b/js/src/jit-test/tests/latin1/basic.js @@ -0,0 +1,113 @@ +assertEq(isLatin1("Foo123\u1200"), false); + +s = "Foo123"; +assertEq(isLatin1(s), true); + +function testEq(s) { + assertEq(isLatin1(s), true); + assertEq(s === "foo02", false); + assertEq(s == "foo02", false); + + // Non-atomized to force char comparison. + var nonAtomized = "\u1234foo01\u00c7".substr(1); + assertEq(isLatin1(nonAtomized), false); + assertEq(s === nonAtomized, true); + assertEq(nonAtomized !== s, false); + assertEq(nonAtomized == s, true); + assertEq(s, nonAtomized); + + nonAtomized = "\u1234foo02".substr(1); + assertEq(isLatin1(nonAtomized), false); + assertEq(s === nonAtomized, false); + assertEq(nonAtomized == s, false); +} + +s = "foo01\u00c7"; +testEq(s); +testEq(s); + +function testConcat() { + function concat(s1, s2) { + return s1 + s2; + } + + // Following tests create fat inline strings. + assertEq(concat("abc", "def"), "abcdef"); + var s1 = "ABC"; + var s2 = "DEF"; + assertEq(concat(s1, s2), "ABCDEF"); + assertEq(concat(s1, "GHI\u0580"), "ABCGHI\u0580"); + assertEq(concat("GHI\u0580", s2), "GHI\u0580DEF"); + assertEq(concat(concat("GHI\u0580", s2), s1), "GHI\u0580DEFABC"); + assertEq(isLatin1(s1), true); + assertEq(isLatin1(s2), true); + + // Create a Latin1 rope. + var s3 = "0123456789012345678901234567890123456789"; + var rope = concat(s1, s3); + assertEq(isLatin1(rope), true); + assertEq(rope, "ABC0123456789012345678901234567890123456789"); + assertEq(isLatin1(rope), true); // Still Latin1 after flattening. + + // Latin1 + TwoByte => TwoByte rope. + assertEq(isLatin1(s3), true); + rope = concat(s3, "someTwoByteString\u0580"); + assertEq(isLatin1(rope), false); + assertEq(rope, "0123456789012345678901234567890123456789someTwoByteString\u0580"); + assertEq(isLatin1(rope), false); + + assertEq(isLatin1(s3), true); + rope = concat("twoByteString\u0580", concat(s3, "otherTwoByte\u0580")); + assertEq(isLatin1(rope), false); + assertEq(rope, "twoByteString\u05800123456789012345678901234567890123456789otherTwoByte\u0580"); + assertEq(isLatin1(rope), false); + + // Build a Latin1 rope with left-most string an extensible string. + var s4 = "adsfasdfjkasdfkjasdfasasdfasdf"; + for (var i=0; i<5; i++) { + s4 = concat(s4, s1); + assertEq(s4 === ".".repeat(s4.length), false); // Flatten rope. + } + + assertEq(isLatin1(s4), true); + + // Appending a TwoByte string must inflate. + s4 = concat(s4, "--\u0580"); + assertEq(s4, "adsfasdfjkasdfkjasdfasasdfasdfABCABCABCABCABC--\u0580"); +} +testConcat(); + +function testFlattenDependent() { + function concat(s1, s2) { + return s1 + s2; + } + + // Create some latin1 strings. + var s1 = "Foo0123456789bar012345---"; + var s2 = "Foo0123456789bar012345+++"; + assertEq(isLatin1(s1), true); + assertEq(isLatin1(s2), true); + + // And some ropes. + var rope1 = concat(s1, s1); + assertEq(isLatin1(rope1), true); + + var rope2 = concat(rope1, s2); + assertEq(isLatin1(rope2), true); + + var rope3 = concat("twoByte\u0581", rope2); + assertEq(isLatin1(rope3), false); + + // Flatten everything. + assertEq(rope3, "twoByte\u0581Foo0123456789bar012345---Foo0123456789bar012345---Foo0123456789bar012345+++"); + assertEq(isLatin1(rope3), false); + + // rope1 and rope2 were Latin1, but flattening rope3 turned them into + // dependent strings, so rope1 and rope2 must also be TwoByte now. + assertEq(isLatin1(rope1), false); + assertEq(isLatin1(rope2), false); + + assertEq(rope1, "Foo0123456789bar012345---Foo0123456789bar012345---"); + assertEq(rope2, "Foo0123456789bar012345---Foo0123456789bar012345---Foo0123456789bar012345+++"); +} +testFlattenDependent(); diff --git a/js/src/jit-test/tests/latin1/bug1033113.js b/js/src/jit-test/tests/latin1/bug1033113.js new file mode 100644 index 0000000000..74f1ff53f2 --- /dev/null +++ b/js/src/jit-test/tests/latin1/bug1033113.js @@ -0,0 +1,20 @@ +var s = "aaaaaaaaaaaaaaaaaa111aaaa"; +var latin1Rope1 = "foo" + s; +var latin1Rope2 = "bar" + latin1Rope1; +var twoByteRope = "\u1200--" + latin1Rope1; + +// Flatten twoByteRope. +assertEq(twoByteRope.lastIndexOf("11"), 25); + +// latin1Rope1 is now a TwoByte dependent string. +assertEq(isLatin1(latin1Rope1), false); +assertEq(latin1Rope1, "fooaaaaaaaaaaaaaaaaaa111aaaa"); + +// latin1Rope2 should still be Latin1, but now has a +// TwoByte descendent (latin1Rope1). +if (isLatin1(s)) + assertEq(isLatin1(latin1Rope2), true); + +// Flatten latin1Rope2. +assertEq(latin1Rope2.lastIndexOf("11"), 25); +assertEq(latin1Rope2, "barfooaaaaaaaaaaaaaaaaaa111aaaa"); diff --git a/js/src/jit-test/tests/latin1/compare.js b/js/src/jit-test/tests/latin1/compare.js new file mode 100644 index 0000000000..636802b16c --- /dev/null +++ b/js/src/jit-test/tests/latin1/compare.js @@ -0,0 +1,20 @@ +function test() { + var arr = [ + "abc", + "abcd", + "123\u00ff" + ]; + for (var i = 0; i < arr.length; i++) { + for (var j = 0; j < arr.length; j++) { + var s1 = arr[i]; + var s2 = arr[j]; + var s1tb = "\u1200" + s1; + var s2tb = "\u1200" + s2; + assertEq(s1 < s2, s1tb < s2tb); + assertEq(s1 > s2, s1tb > s2tb); + assertEq(s1 <= s2, s1tb <= s2tb); + assertEq(s1 >= s2, s1tb >= s2tb); + } + } +} +test(); diff --git a/js/src/jit-test/tests/latin1/date.js b/js/src/jit-test/tests/latin1/date.js new file mode 100644 index 0000000000..edf0221f93 --- /dev/null +++ b/js/src/jit-test/tests/latin1/date.js @@ -0,0 +1,29 @@ +function test(lat1) { + assertEq(isLatin1(lat1), true); + + var twoByte = "\u1200" + lat1; + twoByte.indexOf("X"); // Flatten. + twoByte = twoByte.substr(1); + + assertEq(isLatin1(lat1), true); + assertEq(isLatin1(twoByte), false); + + assertEq(Date.parse(lat1), Date.parse(twoByte)); +} + +// ISO format +test("2014-06-06"); +test("2014-06-06T08:30+01:00"); +test("T11:59Z"); + +// Non-ISO format +test("06 Jun 2014, 17:20:36"); +test("6 Jun 2014"); +test("Wed Nov 05 21:49:11 GMT-0800 1997"); +test("Jan 30 2014 2:30 PM"); + +// Invalid +test("06 Aaa 2014, 17:20:36"); +test("6 Jun 10"); +test("2014-13-06"); +test("2014-06-06T08:30+99:00"); diff --git a/js/src/jit-test/tests/latin1/decompiler.js b/js/src/jit-test/tests/latin1/decompiler.js new file mode 100644 index 0000000000..35f07847ed --- /dev/null +++ b/js/src/jit-test/tests/latin1/decompiler.js @@ -0,0 +1,20 @@ +// Latin1 +function f(someName) { + someName(); +} +try { + f(3); +} catch(e) { + assertEq(e.message.includes("someName"), true); +} + +// TwoByte +function g(someName\u1200) { + someName\u1200(); +} +try { + g(3); +} catch(e) { + // Note: string is deflated; don't check for the \u1200. + assertEq(e.message.includes("someName"), true); +} diff --git a/js/src/jit-test/tests/latin1/dependent.js b/js/src/jit-test/tests/latin1/dependent.js new file mode 100644 index 0000000000..f92bc9dc1c --- /dev/null +++ b/js/src/jit-test/tests/latin1/dependent.js @@ -0,0 +1,92 @@ +function testSubstrLatin1() { + var s1 = "abcdefghijklmnopqrstuvwxyz12345678900000a"; + + // Static strings. + assertEq(s1.substr(s1.length - 1), "a"); + assertEq(s1.substr(s1.length - 2), "0a"); + assertEq(s1.substr(26, 3), "123"); + + // (Fat) inline strings. + var s2 = s1.substr(3, 5); + assertEq(isLatin1(s2), true); + assertEq(s2, "defgh"); + s2 = s1.substr(0, 20); + assertEq(isLatin1(s2), true); + assertEq(s2, "abcdefghijklmnopqrst"); + + // Dependent string. + s2 = s1.substr(1, s1.length - 2); + assertEq(isLatin1(s2), true); + assertEq(s2.length, 39); + assertEq(s2, "bcdefghijklmnopqrstuvwxyz12345678900000"); + + s2 = s2.substr(2).substr(1); + assertEq(isLatin1(s2), true); + assertEq(s2, "efghijklmnopqrstuvwxyz12345678900000"); +} +testSubstrLatin1(); + +function testSubstrTwoByte() { + // Two byte string. + var s1 = "abcdefghijklmnopqrstuvwxyz12345678900000a\u1480"; + assertEq(isLatin1(s1), false); + + // Static string. + var s2 = s1.substr(28, 1); + assertEq(s2, "3"); + + // Inline string. + s2 = s1.substr(3, 5); + assertEq(s2, "defgh"); + + // Dependent string. + s2 = s1.substr(2); + assertEq(isLatin1(s2), false); + assertEq(s2, "cdefghijklmnopqrstuvwxyz12345678900000a\u1480"); + + s2 = s2.substr(2).substr(1); + assertEq(isLatin1(s2), false); + assertEq(s2, "fghijklmnopqrstuvwxyz12345678900000a\u1480"); +} +testSubstrTwoByte(); + +function testSubstring() { + var s1 = "abcdefghijklmnopqrstuvwxyz123456789000ab"; + var s2 = s1.substring(1, 8); + assertEq(isLatin1(s2), true); + assertEq(s2, "bcdefgh"); + s2 = s1.substring(0, s1.length - 1); + assertEq(isLatin1(s2), true); + assertEq(s2, "abcdefghijklmnopqrstuvwxyz123456789000a"); +} +testSubstring(); + +function testSlice() { + var s1 = "abcdefghijklmnopqrstuvwxyz123456789000ABC"; + var s2 = s1.slice(1, 8); + assertEq(isLatin1(s2), true); + assertEq(s2, "bcdefgh"); + s2 = s1.slice(0, -2); + assertEq(isLatin1(s2), true); + assertEq(s2, "abcdefghijklmnopqrstuvwxyz123456789000A"); +} +testSlice(); + +function testUndepend() { + // Latin1 + var s = "abcdefg".repeat(7); + s.indexOf("def"); // flatten + assertEq(isLatin1(s), true); + + var dep = s.substr(7); + var res = dep.replace(/abcdef/g, ""); // StrReplaceRegexpRemove undepends. + assertEq(res, "gggggg"); + + // TwoByte + var s = "abcdefg\u1200".repeat(6); + s.indexOf("def"); // flatten + var dep = s.substr(8); + var res = dep.replace(/abcdefg/g, ""); // StrReplaceRegexpRemove undepends. + assertEq(res, "\u1200\u1200\u1200\u1200\u1200"); +} +testUndepend(); diff --git a/js/src/jit-test/tests/latin1/encode-decode.js b/js/src/jit-test/tests/latin1/encode-decode.js new file mode 100644 index 0000000000..cb6869654f --- /dev/null +++ b/js/src/jit-test/tests/latin1/encode-decode.js @@ -0,0 +1,57 @@ +// Latin1 +s = "a%2b%20def%00A0"; + +res = decodeURI(s); +assertEq(res, "a%2b def\x00A0"); +assertEq(isLatin1(res), true); + +res = decodeURIComponent(s); +assertEq(res, "a+ def\x00A0"); +assertEq(isLatin1(res), true); + +// TwoByte +s += "\u1200"; +assertEq(decodeURI(s), "a%2b def\x00A0\u1200"); +assertEq(decodeURIComponent(s), "a+ def\x00A0\u1200"); + +// Latin1 malformed +try { + decodeURI("abc%80"); + assertEq(0, 1); +} catch(e) { + assertEq(e instanceof URIError, true); +} + +// TwoByte malformed +try { + decodeURI("abc%80\u1200"); + assertEq(0, 1); +} catch(e) { + assertEq(e instanceof URIError, true); +} + +// Latin1 +res = encodeURI("a%2b def\x00A0"); +assertEq(res, "a%252b%20def%00A0"); +assertEq(isLatin1(res), true); + +res = encodeURIComponent("a+ def\x00A0"); +assertEq(res, "a%2B%20def%00A0"); +assertEq(isLatin1(res), true); + +// TwoByte +res = encodeURI("a%2b def\x00A0\u1200"); +assertEq(res, "a%252b%20def%00A0%E1%88%80"); +assertEq(isLatin1(res), true); + +res = encodeURIComponent("a+ def\x00A0\u1200"); +assertEq(res, "a%2B%20def%00A0%E1%88%80"); +assertEq(isLatin1(res), true); + +// TwoByte malformed +try { + encodeURI("a\uDB00"); + assertEq(0, 1); +} catch(e) { + assertEq(e instanceof URIError, true); +} diff --git a/js/src/jit-test/tests/latin1/escape-unescape.js b/js/src/jit-test/tests/latin1/escape-unescape.js new file mode 100644 index 0000000000..9cab2ddbbb --- /dev/null +++ b/js/src/jit-test/tests/latin1/escape-unescape.js @@ -0,0 +1,24 @@ +// Latin1 +s = "a%2b%20def%00A0"; +res = unescape(s); +assertEq(res, "a+ def\x00A0"); +assertEq(isLatin1(res), true); + +s = "a%2b%20def%00A0%u1200"; +assertEq(unescape(s), "a+ def\x00A0\u1200"); + +// TwoByte +s += "\u1200"; +assertEq(unescape(s), "a+ def\x00A0\u1200\u1200"); + +// Latin1 +s = "abc \u00ff"; +res = escape(s); +assertEq(res, "abc%20%FF"); +assertEq(isLatin1(res), true); + +// TwoByte +s += "\u1200"; +res = escape(s); +assertEq(res, "abc%20%FF%u1200"); +assertEq(isLatin1(res), true); diff --git a/js/src/jit-test/tests/latin1/eval.js b/js/src/jit-test/tests/latin1/eval.js new file mode 100644 index 0000000000..8b13018d07 --- /dev/null +++ b/js/src/jit-test/tests/latin1/eval.js @@ -0,0 +1,10 @@ +function f(s) { + var x = 3, y = 5; + var z = eval(s); + assertEq(z, 8); +} +var s = "x + y"; +f(s); // Latin1 +f(s); +f("x + y;/*\u1200*/"); // TwoByte +f("x + y;/*\u1200*/"); diff --git a/js/src/jit-test/tests/latin1/function.js b/js/src/jit-test/tests/latin1/function.js new file mode 100644 index 0000000000..37c74fefbc --- /dev/null +++ b/js/src/jit-test/tests/latin1/function.js @@ -0,0 +1,16 @@ +function test() { + var arg1TwoByte = "arg1\u1200"; + var arg2Latin1 = "arg2"; + + var bodyLatin1 = "return arg2 * 3"; + + var f = Function(arg1TwoByte, arg2Latin1, bodyLatin1); + assertEq(f(10, 20), 60); + assertEq(f.toString().includes("arg1\u1200,arg2"), true); + + var bodyTwoByte = "return arg1\u1200 + arg2;"; + f = Function(arg1TwoByte, arg2Latin1, bodyTwoByte); + assertEq(f(30, 40), 70); + assertEq(f.toString().includes("arg1\u1200,arg2"), true); +} +test(); diff --git a/js/src/jit-test/tests/latin1/index.js b/js/src/jit-test/tests/latin1/index.js new file mode 100644 index 0000000000..4a8a930280 --- /dev/null +++ b/js/src/jit-test/tests/latin1/index.js @@ -0,0 +1,26 @@ +function test() { + var arr = new Int8Array(400); + var idx = "384"; + + arr[idx] = 9; + assertEq(arr[idx], 9); + arr[idx] = 10; + assertEq(arr[384], 10); + + idx = "512"; + assertEq(arr[idx], undefined); + assertEq(arr[(() => "byteLength")()], 400); + + var o = {}; + Object.defineProperty(o, idx, {value: 123}); + assertEq(o[512], 123); + + var propLatin1 = "foobar"; + o[propLatin1] = 3; + assertEq(o.foobar, 3); + + var propTwoByte = "foobar\u1200"; + o[propTwoByte] = 4; + assertEq(o.foobar\u1200, 4); +} +test(); diff --git a/js/src/jit-test/tests/latin1/indexOf.js b/js/src/jit-test/tests/latin1/indexOf.js new file mode 100644 index 0000000000..9857f4a7fc --- /dev/null +++ b/js/src/jit-test/tests/latin1/indexOf.js @@ -0,0 +1,155 @@ +function toLatin1(s) { + assertEq(isLatin1(s), true); + return s; +} +function testLastIndexOf() { + var s1 = toLatin1("abcdefgh123456\u0081defg"); + var s2 = toLatin1("456\u0081de"); + + // Latin1 + Latin1 + assertEq(s1.lastIndexOf(s1), 0); + assertEq(s1.lastIndexOf(s2), 11); + assertEq(s1.lastIndexOf(s2, 10), -1); + assertEq(s2.lastIndexOf(s1), -1); + + // Latin1 + TwoByte + assertEq(s1.lastIndexOf("abc\u1234"), -1); + assertEq(s1.lastIndexOf("def\u1234".substring(0, 3)), 15); + assertEq(s1.lastIndexOf("def\u1234".substring(0, 3), 9), 3); + + // TwoByte + Latin1 + var s3 = "123456\u0081defg\u1123a456\u0081defg"; + assertEq(isLatin1(s2), true); + assertEq(s3.lastIndexOf(s2), 13); + assertEq(s3.lastIndexOf(s2, 12), 3); + assertEq(s3.lastIndexOf(toLatin1("defg7")), -1); + + // TwoByte + TwoByte + assertEq(s3.lastIndexOf("\u1123a4"), 11); + assertEq(s3.lastIndexOf("\u1123a4", 10), -1); + assertEq(s3.lastIndexOf("\u1123a\u1098"), -1); + assertEq(s3.lastIndexOf(s3), 0); +} +testLastIndexOf(); + +function testIndexOf() { + var s1 = toLatin1("abcdefgh123456d\u00AAefghi"); + var s2 = toLatin1("456d\u00AA"); + + // Latin1 + Latin1 + assertEq(s1.indexOf(s1), 0); + assertEq(s1.indexOf(s2), 11); + assertEq(s1.indexOf(s2, 12), -1); + assertEq(s2.indexOf(s1), -1); + + // Latin1 + TwoByte + assertEq(s1.indexOf("abc\u1234"), -1); + assertEq(s1.indexOf("def\u1234".substring(0, 3)), 3); + assertEq(s1.indexOf("d\u00AAef\u1234".substring(0, 3), 9), 14); + + // TwoByte + Latin1 + var s3 = "123456d\u00AAefg\u1123a456d\u00AAefg"; + assertEq(isLatin1(s2), true); + assertEq(s3.indexOf(s2), 3); + assertEq(s3.indexOf(s2, 11), 13); + assertEq(s3.indexOf(toLatin1("d\u00AAefg7")), -1); + + // TwoByte + TwoByte + assertEq(s3.indexOf("\u1123a4"), 11); + assertEq(s3.indexOf("\u1123a4", 12), -1); + assertEq(s3.indexOf("\u1123a\u1098"), -1); + assertEq(s3.indexOf(s3), 0); +} +testIndexOf(); + +function testincludes() { + var s1 = toLatin1("abcdefgh123456defghi\u00EEj"); + var s2 = toLatin1("456defghi\u00EE"); + + // Latin1 + Latin1 + assertEq(s1.includes(s1), true); + assertEq(s1.includes(s2), true); + assertEq(s1.includes(s2, 12), false); + assertEq(s2.includes(s1), false); + + // Latin1 + TwoByte + assertEq(s1.includes("abc\u1234"), false); + assertEq(s1.includes("def\u1234".substring(0, 3)), true); + assertEq(s1.includes("def\u1234".substring(0, 3), 9), true); + + // TwoByte + Latin1 + var s3 = "123456defg\u1123a456defghi\u00EEj"; + assertEq(isLatin1(s2), true); + assertEq(s3.includes(s2), true); + assertEq(s3.includes(s2, 13), false); + assertEq(s3.includes(toLatin1("defg8")), false); + + // TwoByte + TwoByte + assertEq(s3.includes("\u1123a4"), true); + assertEq(s3.includes("\u1123a4", 11), false); + assertEq(s3.includes("\u1123a\u1098"), false); + assertEq(s3.includes(s3), true); +} +testincludes(); + +function testIndexOfBMH() { + // BoyerMooreHorspool algorithm is used for large strings. + var s = "012345678901234567890123456789".repeat(20); + var text = s + "abcdefghijklmnopqrst\u00C1uvwxyz"; + text.indexOf("333"); + + var textL1 = toLatin1(text); + var patL1 = toLatin1("cdefghijklmnopqrst\u00C1uvwx"); + + // Latin1 + Latin1 + assertEq(textL1.indexOf(patL1), 602); + assertEq(textL1.indexOf(patL1, 603), -1); + assertEq(textL1.indexOf(textL1), 0); + + // Latin1 + TwoByte + assertEq(textL1.indexOf("cdefghijklmnopqrst\u00C1uvwxy"), 602); + assertEq(textL1.indexOf("cdefghijklmnopqrst\u00C1uvwxy", 603), -1); + assertEq(textL1.indexOf("cdefghijklmnopqrst\u00C1uvwxy\uaa00", -1), -1); + + // TwoByte + Latin1 + var textTB = s + "abcdefghijklmnopqrst\u00C1uvwxyz\u1200"; + text.indexOf("333"); + assertEq(textTB.indexOf(patL1), 602); + assertEq(textTB.indexOf(patL1, 603), -1); + + // TwoByte + TwoByte + assertEq(textTB.indexOf("defghijklmnopqrst\u00C1uvwxyz\u1200"), 603); + assertEq(textTB.indexOf("defghijklmnopqrst\u00C1uvwxyz\u1200", 604), -1); + assertEq(textTB.indexOf("defghijklmnopqrst\u00C1uvwxyz\u1201"), -1); +} +testIndexOfBMH(); + +function testIndexOfLargePattern() { + // If the pattern length > 128, memcmp is used (text length has to be < 512 + // or we'll use BoyerMooreHorspool). This is only valid if both + // strings have the same encoding. + var text = "012345678901234567890123456789".repeat(10) + "abcdefghijklmnopqrst\u00C1uvwxyz"; + text.indexOf("333"); // flatten + var pat = "012345678901234567890123456789".repeat(5) + "abcdefghijklmnopqr"; + pat.indexOf("333"); // flatten + + // Latin1 + Latin1 + text = toLatin1(text); + pat = toLatin1(pat); + assertEq(text.indexOf(pat), 150); + + // Latin1 + TwoByte + assertEq(text.indexOf(pat + "\u1200"), -1); + assertEq(text.indexOf((pat + "\u1200").slice(0, -1)), 150); + + // TwoByte + Latin1 + text = text + "\u1100"; + assertEq(isLatin1(pat), true); + assertEq(text.indexOf(pat), 150); + + // TwoByte + TwoByte + pat = pat + "st\u00C1uvwxyz\u1100"; + assertEq(text.indexOf(pat), 150); + assertEq(text.indexOf(pat + "\u2000"), -1); +} +testIndexOfLargePattern(); diff --git a/js/src/jit-test/tests/latin1/indexing.js b/js/src/jit-test/tests/latin1/indexing.js new file mode 100644 index 0000000000..c37ed52be9 --- /dev/null +++ b/js/src/jit-test/tests/latin1/indexing.js @@ -0,0 +1,47 @@ +function testCharCodeAt() { + var s = "abcdefghijklm1234567891000"; + for (var i=0; i<10; i++) + assertEq(s.charCodeAt(i), 97 + i); + + var rope = s + "blah"; + assertEq(rope.charCodeAt(s.length + 3), 104); + + rope = s + "Foo987"; + assertEq(rope.charCodeAt(s.length + 4), 56); + + rope = "twoByte\u0580" + s; + assertEq(rope.charCodeAt(7), 0x580); + assertEq(rope.charCodeAt(14), 103); +} +testCharCodeAt(); + +function testCharAt() { + var s = "abcdefghijklm100000002345"; + assertEq(s.charAt(0), "a"); + assertEq(s.charAt(s.length-1), "5"); + assertEq(s.charAt(s.length), ""); + + var rope = s + "abcZYX"; + assertEq(rope.charAt(s.length + 3), "Z"); + + rope = s + "Foo987"; + assertEq(rope.charAt(s.length + 4), "8"); + + rope = "twoByte\u0580" + s; + assertEq(rope.charAt(7), "\u0580"); + assertEq(rope.charAt(14), "g"); +} +testCharAt(); + +function testIndex(s) { + assertEq(s[0], "a"); + assertEq(s[s.length-1], "6"); + + rope = "twoByte\u0512" + s + assertEq(rope[7], "\u0512"); +} + +var s = "abcdefghijklm123456"; +testIndex(s); +testIndex(s); +testIndex(s); diff --git a/js/src/jit-test/tests/latin1/join.js b/js/src/jit-test/tests/latin1/join.js new file mode 100644 index 0000000000..ab27a4376b --- /dev/null +++ b/js/src/jit-test/tests/latin1/join.js @@ -0,0 +1,24 @@ +function toLatin1(s) { + assertEq(isLatin1(s), true); + return s; +} + +var arrLatin1 = [toLatin1("abc1"), toLatin1("abc\u00A0")]; +var res = arrLatin1.join(toLatin1("sep\u00ff")); +assertEq(res, "abc1sep\xFFabc\xA0"); +assertEq(isLatin1(res), true); + +var arrTwoByte = [toLatin1("abc2"), "def\u1200"]; +assertEq(arrTwoByte.join(toLatin1("sep\u00fe")), "abc2sep\xFEdef\u1200"); + +res = arrLatin1.join(toLatin1("-")); +assertEq(res, "abc1-abc\xA0"); +assertEq(isLatin1(res), true); + +assertEq(arrTwoByte.join(toLatin1("7")), "abc27def\u1200"); + +assertEq(arrLatin1.join("\u1200"), "abc1\u1200abc\xA0"); +assertEq(arrTwoByte.join("\u1200"), "abc2\u1200def\u1200"); + +assertEq(arrLatin1.join("---\u1200"), "abc1---\u1200abc\xA0"); +assertEq(arrTwoByte.join("---\u1200"), "abc2---\u1200def\u1200"); diff --git a/js/src/jit-test/tests/latin1/json.js b/js/src/jit-test/tests/latin1/json.js new file mode 100644 index 0000000000..88a4f1471e --- /dev/null +++ b/js/src/jit-test/tests/latin1/json.js @@ -0,0 +1,75 @@ +function testBasic() { + // Latin1 + var s = '[1, 2, "foo", "bar\\r\\n", {"xyz": 3}, [1, 2, 3]]'; + assertEq(isLatin1(s), true); + assertEq(JSON.stringify(JSON.parse(s)), '[1,2,"foo","bar\\r\\n",{"xyz":3},[1,2,3]]'); + + // TwoByte + s = '[1, 2, "foo\u1200", "bar\\r\\n", {"xyz": 3}, [1, 2, 3]]'; + assertEq(JSON.stringify(JSON.parse(s)), '[1,2,"foo\u1200","bar\\r\\n",{"xyz":3},[1,2,3]]'); +} +testBasic(); + +function testErrorPos() { + // Make sure the error location is calculated correctly. + + // Latin1 + var s = '[1, \n2,'; + try { + JSON.parse(s); + assertEq(0, 1); + } catch(e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.toString().includes("line 2 column 3"), true); + } + + s = '[1, "\u1300",\n2,'; + try { + JSON.parse(s); + assertEq(0, 1); + } catch(e) { + assertEq(e instanceof SyntaxError, true); + assertEq(e.toString().includes("line 2 column 3"), true); + } +} +testErrorPos(); + +function testEvalHack() { + // Latin1 + var arr = eval("[1, 2, 3, \"abc\"]"); + assertEq(JSON.stringify(arr), '[1,2,3,"abc"]'); + assertEq(isLatin1(JSON.stringify(arr)), true); + + // TwoByte + arr = eval("[1, 2, 3, \"abc\u1200\"]"); + assertEq(JSON.stringify(arr), '[1,2,3,"abc\u1200"]'); +} +testEvalHack(); + +function testEvalHackNotJSON() { + // Latin1 + var arr = eval("[]; var q; [1, 2, 3, \"abc\"]"); + assertEq(JSON.stringify(arr), '[1,2,3,"abc"]'); + + // TwoByte + arr = eval("[]; var z; [1, 2, 3, \"abc\u1200\"]"); + assertEq(JSON.stringify(arr), '[1,2,3,"abc\u1200"]'); + + var arr = eval("[1, 2, 3, \"abc\u2028\"]"); + assertEq(arr.length, 4); + assertEq(arr[3], "abc\u2028"); +} +testEvalHackNotJSON(); + +function testQuote() { + // Latin1 + var s = "abc--\x05-'\"-\n-\u00ff++"; + var res = JSON.stringify(s); + assertEq(res, '"abc--\\u0005-\'\\"-\\n-\xFF++"'); + assertEq(isLatin1(res), true); + + // TwoByte + s += "\uAAAA"; + assertEq(JSON.stringify(s), '"abc--\\u0005-\'\\"-\\n-\xFF++\uAAAA"'); +} +testQuote(); diff --git a/js/src/jit-test/tests/latin1/latin1.js b/js/src/jit-test/tests/latin1/latin1.js new file mode 100644 index 0000000000..ae850f60b4 --- /dev/null +++ b/js/src/jit-test/tests/latin1/latin1.js @@ -0,0 +1,120 @@ +function assertLatin1(s) { + assertEq(isLatin1(s), true, "String: " + s); +} + +// string literals +assertLatin1(""); +assertLatin1("x"); +assertLatin1("xy"); +assertLatin1("while"); +assertLatin1("xyaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\u00ff."); +assertLatin1("-1"); +assertLatin1("50"); +assertLatin1("873939"); +assertLatin1("12.34"); +assertLatin1("NaN"); + +// int32 +assertLatin1(String(1)); +assertLatin1("" + 40); +assertLatin1(String(873939)); +assertLatin1(String(-1)); +assertLatin1((-12983).toString()); +assertLatin1(20..toString(16)); +assertLatin1((-20).toString(12)); +assertLatin1(12121..toString(16)); +assertLatin1(12144..toString(2)); + +// doubles +assertLatin1(String(12.34)); +assertLatin1(45.6.toString(16)); +assertLatin1(String(-0)); +assertLatin1(NaN.toString()); +assertLatin1("" + -Infinity); +assertLatin1("a" + 85899345929); + +// other types +assertLatin1(true.toString()); +assertLatin1(String(false)); +assertLatin1(String(null)); +assertLatin1(String(undefined)); + +// objects +assertLatin1(Math.toString()); +assertLatin1(({x:1}).toString()); +if (Object.prototype.toSource) { + assertLatin1(({x:"foo"}).toSource()); +} +assertLatin1([1, "bar"].toString()); + +// typeof +assertLatin1(typeof "foo"); +assertLatin1(typeof assertEq); + +// join +assertLatin1([1, "foo", null, true].join()); +assertLatin1([1, "foo", null, true].join(":")); + +// JSON +assertLatin1(JSON.stringify({x:1,y:"bar",z:[null],1281298:Math.PI})); +assertLatin1(JSON.stringify([1, 2, 3], null, "foo")); +assertLatin1(JSON.stringify({x:1,y:"bar"}, function(k, v) { + assertLatin1(k); + return v; +})); +var arr = [1, 2, 3]; arr.length = 300; +assertLatin1(JSON.stringify(arr, function(k, v) { + assertLatin1(k); + return v; +})); + +// Date +assertLatin1(new Date().toString()); +assertLatin1(new Date().toISOString()); +assertLatin1(Date()); + +// native functions +assertLatin1(Math.abs.toString()); +assertLatin1(Object.getOwnPropertyNames.name); + +// scripted functions +function fun1(a, b) { return ["foo\xAA"]; } +assertLatin1(fun1.toString()); +assertLatin1(fun1.name); + +// fromCharCode +assertLatin1(String.fromCharCode(99)); +assertLatin1(String.fromCharCode(99, 0xff, 1)); + +// charAt +assertLatin1("foo\u00ff\u1200".charAt(3)); + +// RegExps +var re = /a\.*b[cC]+/g; +assertLatin1(re.source); +assertLatin1(re.toString()); + +// For-in +var o = {x: 1, y: 2, z\u00ff: 3, 987654: 4, 22: 5}; +for (var prop in o) + assertLatin1(prop); + +// Object.keys +assertLatin1(Object.keys(o)[2]); + +// Error +(function foo() { + var err; + try { this(); } catch(e) { err = e; } + assertEq(err.name, "TypeError"); + assertLatin1(err.name); + assertLatin1(err.message); + assertLatin1(err.stack); + assertLatin1(err.toString()); + + try { throw new Error("foo"); } catch(e) { err = e; } + assertLatin1(err.name); + assertLatin1(err.message); + assertLatin1(err.stack); + assertLatin1(err.toString()); +})(); diff --git a/js/src/jit-test/tests/latin1/other.js b/js/src/jit-test/tests/latin1/other.js new file mode 100644 index 0000000000..6713794ec8 --- /dev/null +++ b/js/src/jit-test/tests/latin1/other.js @@ -0,0 +1,34 @@ +var s1 = "abcdefg12345"; +var s2 = 'foo"bar'; + +assertEq(isLatin1(s1), true); +assertEq(isLatin1(s2), true); + +function test() { + assertEq(s1.valueOf(), s1); + + assertEq(s1.bold(), "abcdefg12345"); + assertEq(s1.fontsize("twoByte\u1400"), 'abcdefg12345'); + assertEq(s1.anchor(s1), 'abcdefg12345'); + assertEq(s1.link(s2), 'abcdefg12345'); + + assertEq(s1.concat("abc"), "abcdefg12345abc"); + + var s3 = s1.concat(s1, s1); + assertEq(isLatin1(s3), true); + assertEq(s3, "abcdefg12345abcdefg12345abcdefg12345"); + + s3 = s1.concat("twoByte\u1400"); + assertEq(isLatin1(s3), false); + assertEq(s3, "abcdefg12345twoByte\u1400"); + + assertEq(s1.codePointAt(3), 100); + assertEq(s1.codePointAt(10), 52); + assertEq(s1.codePointAt(12), undefined); + + s3 = s1.repeat(5); + assertEq(s3, "abcdefg12345abcdefg12345abcdefg12345abcdefg12345abcdefg12345"); + assertEq(isLatin1(s3), true); +} +test(); +test(); diff --git a/js/src/jit-test/tests/latin1/parseInt-parseFloat.js b/js/src/jit-test/tests/latin1/parseInt-parseFloat.js new file mode 100644 index 0000000000..7240224d12 --- /dev/null +++ b/js/src/jit-test/tests/latin1/parseInt-parseFloat.js @@ -0,0 +1,43 @@ +function toLatin1(s) { + assertEq(isLatin1(s), true); + return s; +} +function testParseInt() { + // Latin1 + assertEq(parseInt(toLatin1("12345abc")), 12345); + assertEq(parseInt(toLatin1("0x5")), 0x5); + assertEq(parseInt(toLatin1("-123")), -123); + assertEq(parseInt(toLatin1("xyz")), NaN); + assertEq(parseInt(toLatin1("1234GHI"), 17), 94298); + assertEq(parseInt(toLatin1("9007199254749999")), 9007199254750000); + assertEq(parseInt(toLatin1(" 9007199254749998"), 16), 10378291982571444000); + + // TwoByte + assertEq(parseInt("12345abc\u1200"), 12345); + assertEq(parseInt("0x5\u1200"), 0x5); + assertEq(parseInt(" -123\u1200"), -123); + assertEq(parseInt("\u1200"), NaN); + assertEq(parseInt("1234GHI\u1200", 17), 94298); + assertEq(parseInt("9007199254749999\u1200"), 9007199254750000); + assertEq(parseInt(" 9007199254749998\u1200", 16), 10378291982571444000); +} +testParseInt(); + +function testParseFloat() { + // Latin1 + assertEq(parseFloat(toLatin1("3.1415")), 3.1415); + assertEq(parseFloat(toLatin1(" -1234")), -1234); + assertEq(parseFloat(toLatin1("\u00AA")), NaN); + assertEq(parseFloat(toLatin1("Infinityabc")), Infinity); + assertEq(parseFloat(toLatin1("-Infinity")), -Infinity); + assertEq(parseFloat(toLatin1("\t\t\t+Infinity")), Infinity); + + // TwoByte + assertEq(parseFloat("3.1415\u0FFF"), 3.1415); + assertEq(parseFloat(" -1234\u0FFF"), -1234); + assertEq(parseFloat("\u00AA\u0FFF"), NaN); + assertEq(parseFloat("Infinityabc\u0FFF"), Infinity); + assertEq(parseFloat("-Infinity\u0FFF"), -Infinity); + assertEq(parseFloat("\t\t\t+Infinity\u0FFF"), Infinity); +} +testParseFloat(); diff --git a/js/src/jit-test/tests/latin1/regexp.js b/js/src/jit-test/tests/latin1/regexp.js new file mode 100644 index 0000000000..809c3817db --- /dev/null +++ b/js/src/jit-test/tests/latin1/regexp.js @@ -0,0 +1,47 @@ +function toLatin1(s) { + assertEq(isLatin1(s), true); + return s; +} + +// Latin1 +var re = new RegExp(toLatin1("foo[bB]a\\r"), toLatin1("im")); +assertEq(isLatin1(re.source), true); +assertEq(re.source, "foo[bB]a\\r"); +assertEq(re.multiline, true); +assertEq(re.ignoreCase, true); +assertEq(re.sticky, false); + +// TwoByte +re = new RegExp("foo[bB]a\\r\u1200", "im"); +assertEq(isLatin1(re.source), false); +assertEq(re.source, "foo[bB]a\\r\u1200"); +assertEq(re.multiline, true); +assertEq(re.ignoreCase, true); +assertEq(re.sticky, false); + +re = /b[aA]r/; + +// Latin1 +assertEq(toLatin1("foobAr1234").search(re), 3); +assertEq(toLatin1("bar1234").search(re), 0); +assertEq(toLatin1("foobbr1234").search(re), -1); + +// TwoByte +assertEq("foobAr1234\u1200".search(re), 3); +assertEq("bar1234\u1200".search(re), 0); +assertEq("foobbr1234\u1200".search(re), -1); + +re = /abcdefghijklm[0-5]/; +assertEq(toLatin1("1abcdefghijklm4").search(re), 1); +assertEq("\u12001abcdefghijklm0".search(re), 2); +assertEq(toLatin1("1abcdefghijklm8").search(re), -1); +assertEq("\u12001abcdefghijklm8".search(re), -1); + +// If the input is Latin1, case-independent matches should work +// correctly for characters outside Latin1 with Latin1 equivalents. +var s = toLatin1("foobar\xff5baz"); +assertEq(s.search(/bar\u0178\d/i), 3); + +// Bug 1032067. +''.match(eval("/(:[aaaaa\cC]\u1200)(?:\S|(?=(\3)))+?/y")); +assertEq(Function("return /(\uB0DA()})/.toString();")(), "/(\uB0DA()})/"); diff --git a/js/src/jit-test/tests/latin1/replace.js b/js/src/jit-test/tests/latin1/replace.js new file mode 100644 index 0000000000..fecd958d19 --- /dev/null +++ b/js/src/jit-test/tests/latin1/replace.js @@ -0,0 +1,145 @@ +function toLatin1(s) { + assertEq(isLatin1(s), true); + return s; +} +function testDollarReplacement() { + // Latin1 input, pat and replacement + var s = toLatin1("Foobarbaz123"); + var pat = toLatin1("bar"); + assertEq(s.replace(pat, toLatin1("AA")), "FooAAbaz123"); + assertEq(s.replace(pat, toLatin1("A$$A")), "FooA$Abaz123"); + assertEq(s.replace(pat, toLatin1("A$`A")), "FooAFooAbaz123"); + assertEq(s.replace(pat, toLatin1("A$&A")), "FooAbarAbaz123"); + assertEq(s.replace(pat, toLatin1("A$'A")), "FooAbaz123Abaz123"); + assertEq(isLatin1(s.replace(pat, "A$'A")), true); + + // Latin1 input and pat, TwoByte replacement + assertEq(s.replace(pat, "A\u1200"), "FooA\u1200baz123"); + assertEq(s.replace(pat, "A$$\u1200"), "FooA$\u1200baz123"); + assertEq(s.replace(pat, "A$`\u1200"), "FooAFoo\u1200baz123"); + assertEq(s.replace(pat, "A$&\u1200"), "FooAbar\u1200baz123"); + assertEq(s.replace(pat, "A$'\u1200"), "FooAbaz123\u1200baz123"); + + // TwoByte input, Latin1 pat and replacement + s = "Foobarbaz123\u1200"; + assertEq(s.replace(pat, toLatin1("A")), "FooAbaz123\u1200"); + assertEq(s.replace(pat, toLatin1("A$$")), "FooA$baz123\u1200"); + assertEq(s.replace(pat, toLatin1("A$`")), "FooAFoobaz123\u1200"); + assertEq(s.replace(pat, toLatin1("A$&")), "FooAbarbaz123\u1200"); + assertEq(s.replace(pat, toLatin1("A$'")), "FooAbaz123\u1200baz123\u1200"); + + // TwoByte input and pat, Latin1 replacement + s = "Foobar\u1200baz123"; + pat += "\u1200"; + assertEq(s.replace(pat, toLatin1("AB")), "FooABbaz123"); + assertEq(s.replace(pat, toLatin1("A$$B")), "FooA$Bbaz123"); + assertEq(s.replace(pat, toLatin1("A$`B")), "FooAFooBbaz123"); + assertEq(s.replace(pat, toLatin1("A$&B")), "FooAbar\u1200Bbaz123"); + assertEq(s.replace(pat, toLatin1("A$'B")), "FooAbaz123Bbaz123"); + + // TwoByte input, pat and replacement + assertEq(s.replace(pat, "A\u1300"), "FooA\u1300baz123"); + assertEq(s.replace(pat, "A$$\u1300"), "FooA$\u1300baz123"); + assertEq(s.replace(pat, "A$`\u1300"), "FooAFoo\u1300baz123"); + assertEq(s.replace(pat, "A$&\u1300"), "FooAbar\u1200\u1300baz123"); + assertEq(s.replace(pat, "A$'\u1300"), "FooAbaz123\u1300baz123"); +} +testDollarReplacement(); + +function testRegExp() { + var s = toLatin1("Foobar123bar234"); + var res = s.replace(/bar\d\d/, "456"); + assertEq(res, "Foo4563bar234"); + assertEq(isLatin1(res), true); + + // Latin1 input and replacement + var re1 = /bar\d\d/; + res = s.replace(re1, toLatin1("789")); + assertEq(res, "Foo7893bar234"); + assertEq(isLatin1(res), true); + + var re2 = /bar\d\d/g; + res = s.replace(re2, toLatin1("789\u00ff")); + assertEq(res, "Foo789\u00ff3789\u00ff4"); + assertEq(isLatin1(res), true); + + // Latin1 input, TwoByte replacement + assertEq(s.replace(re1, "789\u1200"), "Foo789\u12003bar234"); + assertEq(s.replace(re2, "789\u1200"), "Foo789\u12003789\u12004"); + + // TwoByte input, Latin1 replacement + s += "\u1200"; + assertEq(s.replace(re1, toLatin1("7890")), "Foo78903bar234\u1200"); + assertEq(s.replace(re2, toLatin1("7890\u00ff")), "Foo7890\u00ff37890\u00ff4\u1200"); + + // TwoByte input and replacement + assertEq(s.replace(re1, "789\u1200"), "Foo789\u12003bar234\u1200"); + assertEq(s.replace(re2, "789\u1200"), "Foo789\u12003789\u12004\u1200"); +} +testRegExp(); + +function testRegExpDollar() { + var s = toLatin1("Foobar123bar2345"); + + // Latin1 input and replacement + var re1 = /bar\d\d/; + var re2 = /bar(\d\d)/g; + assertEq(s.replace(re1, toLatin1("--$&--")), "Foo--bar12--3bar2345"); + assertEq(s.replace(re2, toLatin1("--$'\u00ff--")), "Foo--3bar2345\xFF--3--45\xFF--45"); + assertEq(s.replace(re2, toLatin1("--$`--")), "Foo--Foo--3--Foobar123--45"); + assertEq(isLatin1(s.replace(re2, toLatin1("--$`--"))), true); + + // Latin1 input, TwoByte replacement + assertEq(s.replace(re1, "\u1200$$"), "Foo\u1200$3bar2345"); + assertEq(s.replace(re2, "\u1200$1"), "Foo\u1200123\u12002345"); + assertEq(s.replace(re2, "\u1200$'"), "Foo\u12003bar23453\u12004545"); + + // TwoByte input, Latin1 replacement + s += "\u1200"; + assertEq(s.replace(re1, toLatin1("**$&**")), "Foo**bar12**3bar2345\u1200"); + assertEq(s.replace(re2, toLatin1("**$1**")), "Foo**12**3**23**45\u1200"); + assertEq(s.replace(re2, toLatin1("**$`**")), "Foo**Foo**3**Foobar123**45\u1200"); + assertEq(s.replace(re2, toLatin1("**$'$$**")), "Foo**3bar2345\u1200$**3**45\u1200$**45\u1200"); + + // TwoByte input and replacement + assertEq(s.replace(re1, "**$&**\ueeee"), "Foo**bar12**\ueeee3bar2345\u1200"); + assertEq(s.replace(re2, "**$1**\ueeee"), "Foo**12**\ueeee3**23**\ueeee45\u1200"); + assertEq(s.replace(re2, "\ueeee**$`**"), "Foo\ueeee**Foo**3\ueeee**Foobar123**45\u1200"); + assertEq(s.replace(re2, "\ueeee**$'$$**"), "Foo\ueeee**3bar2345\u1200$**3\ueeee**45\u1200$**45\u1200"); +} +testRegExpDollar(); + +function testFlattenPattern() { + var s = "abcdef[g]abc"; + + // Latin1 pattern + var res = s.replace(toLatin1("def[g]"), "--$&--", "gi"); + assertEq(res, "abc--def[g]--abc"); + assertEq(isLatin1(res), true); + + // TwoByte pattern + s = "abcdef[g]\u1200abc"; + assertEq(s.replace("def[g]\u1200", "++$&++", "gi"), "abc++def[g]\u1200++abc"); +} +testFlattenPattern(); + +function testReplaceEmpty() { + // Latin1 + var s = toLatin1("--abcdefghijkl--abcdefghijkl--abcdefghijkl--abcdefghijkl"); + var res = s.replace(/abcd[eE]/g, ""); + assertEq(res, "--fghijkl--fghijkl--fghijkl--fghijkl"); + assertEq(isLatin1(res), true); + + s = "--abcdEf--"; + res = s.replace(/abcd[eE]/g, ""); + assertEq(res, "--f--"); + assertEq(isLatin1(res), true); + + // TwoByte + s = "--abcdefghijkl--abcdefghijkl--abcdefghijkl--abcdefghijkl\u1200"; + assertEq(s.replace(/abcd[eE]/g, ""), "--fghijkl--fghijkl--fghijkl--fghijkl\u1200"); + + s = "--abcdEf--\u1200"; + assertEq(s.replace(/abcd[eE]/g, ""), "--f--\u1200"); +} +testReplaceEmpty(); diff --git a/js/src/jit-test/tests/latin1/rope-stringchar.js b/js/src/jit-test/tests/latin1/rope-stringchar.js new file mode 100644 index 0000000000..d0afa89131 --- /dev/null +++ b/js/src/jit-test/tests/latin1/rope-stringchar.js @@ -0,0 +1,16 @@ +function f(a, b) { + assertEq(isLatin1(a), true); + assertEq(isLatin1(b), false); + var c = a + b; + assertEq(isLatin1(c), false); + assertEq(c[4], 'b'); + assertEq(c.charCodeAt(4), 98); +} + +function test() { + for (var i = 0; i < 15; i++) { + f("aaaab\x00\x00\x00\x00\x00\x00", "\u{2603}"); + } +} + +test(); diff --git a/js/src/jit-test/tests/latin1/search.js b/js/src/jit-test/tests/latin1/search.js new file mode 100644 index 0000000000..a26c632f27 --- /dev/null +++ b/js/src/jit-test/tests/latin1/search.js @@ -0,0 +1,79 @@ +function toLatin1(s) { + assertEq(isLatin1(s), true); + return s; +} +function testSearchFlat() { + var s1 = toLatin1("fooBar12345"); + var s2 = toLatin1("Bar1"); + + // Latin1 + Latin1 + assertEq(s1.search(s2), 3); + assertEq(s2.search(s1), -1); + assertEq(s1.search(s1), 0); + + // Latin1 + TwoByte + assertEq(s1.search(s2 + "\u1200"), -1); + assertEq(s1.search(("12345\u1200").slice(0, -1)), 6); + + // TwoByte + Latin1 + assertEq("fooBar12345\u1200".search(s1), 0); + assertEq("fooBar12345\u1200".search(s2), 3); + + // TwoByte + TwoByte + assertEq("fooBar12345\u1200".search("5\u1200"), 10); + assertEq("fooBar12345\u1200".search("5\u1201"), -1); +} +testSearchFlat(); + +function testSearchRope() { + // Tests for the RopeMatch algorithm. + var s1 = "foobarbaz0123456789".repeat(10); + s1.indexOf("333"); // flatten + s1 = toLatin1(s1); + + var ropeMixed = s1 + "abcdef\u1200"; + assertEq(isLatin1(ropeMixed), false); + + var abc = toLatin1("abc"); + var baz = toLatin1("baz"); + + // Mixed + Latin1 + assertEq(ropeMixed.search(abc), 190); + assertEq(ropeMixed.search(baz), 6); + + // Mixed + TwoByte + assertEq(ropeMixed.search("def\u1200"), 193); + + // Latin1 + Latin1 + s1 = "foobarbaz0123456789".repeat(10); + s1.indexOf("333"); // flatten + s1 = toLatin1(s1); + var ropeLatin1 = s1 + toLatin1("abcdef\u00AA"); + assertEq(isLatin1(ropeLatin1), true); + assertEq(ropeLatin1.search(abc), 190); + + // Latin1 + TwoByte + assertEq(ropeLatin1.search("\u1200bc".substr(1)), 191); + + // TwoByte + Latin1 + s1 = "foobarbaz0123456789\u11AA".repeat(10); + var ropeTwoByte = s1 + "abcdef\u1200"; + assertEq(ropeTwoByte.search(abc), 200); + + // TwoByte + TwoByte + assertEq(ropeTwoByte.search("def\u1200"), 203); +} +testSearchRope(); + +function testSearchStringMatch() { + var re = /bar/; + + // Latin1 + assertEq(toLatin1("foobar1234").search(re), 3); + assertEq(toLatin1("foo1234").search(re), -1); + + // TwoByte + assertEq("\u1200bar".search(re), 1); + assertEq("\u12001234".search(re), -1); +} +testSearchStringMatch(); diff --git a/js/src/jit-test/tests/latin1/split.js b/js/src/jit-test/tests/latin1/split.js new file mode 100644 index 0000000000..d07576e103 --- /dev/null +++ b/js/src/jit-test/tests/latin1/split.js @@ -0,0 +1,27 @@ +// Latin1 +var s = "abcdef,g,,"; +var res = s.split(","); +assertEq(res[0], "abcdef"); +assertEq(isLatin1(res[0]), true); +assertEq(res[1], "g"); +assertEq(res[2], ""); +assertEq(res[3], ""); + +s = "abcdef,gh,,"; +res = s.split("\u1200"); +assertEq(res[0], "abcdef,gh,,"); +assertEq(isLatin1(res[0]), true); + +// TwoByte +s = "abcdef\u1200\u1200,g,,"; +res = s.split(","); +assertEq(res[0], "abcdef\u1200\u1200"); +assertEq(isLatin1(res[0]), false); +assertEq(res[1], "g"); +assertEq(res[2], ""); +assertEq(res[3], ""); + +res = s.split("\u1200"); +assertEq(res[0], "abcdef"); +assertEq(res[1], ""); +assertEq(res[2], ",g,,"); diff --git a/js/src/jit-test/tests/latin1/startsWith-endsWith.js b/js/src/jit-test/tests/latin1/startsWith-endsWith.js new file mode 100644 index 0000000000..eb49bea165 --- /dev/null +++ b/js/src/jit-test/tests/latin1/startsWith-endsWith.js @@ -0,0 +1,69 @@ +function toLatin1(s) { + assertEq(isLatin1(s), true); + return s; +} +function testStartsWith() { + var s1 = toLatin1("abc\u0099def"); + var s2 = toLatin1("abc\u0099d"); + var s3 = toLatin1("abc\u0098d"); + var s4 = toLatin1("bc\u0099"); + + // Latin1 + Latin1 + assertEq(s1.startsWith(s2), true); + assertEq(s1.startsWith(s3), false); + assertEq(s1.startsWith(s4), false); + assertEq(s1.startsWith(s4, 1), true); + assertEq(s1.startsWith(s1), true); + + // Latin1 + TwoByte + assertEq(s1.startsWith("abc\u0099\u1200".slice(0, -1)), true); + assertEq(s1.startsWith("abc\u0099e\u1200".slice(0, -1)), false); + assertEq(s1.startsWith("bc\u0099\u1200".slice(0, -1), 1), true); + assertEq(s1.startsWith("\u1200"), false); + + // TwoByte + Latin1 + var s5 = "abc\u0099de\u1200"; + assertEq(s5.startsWith(s1), false); + assertEq(s5.startsWith(s2), true); + assertEq(s5.startsWith(s4), false); + assertEq(s5.startsWith(s4, 1), true); + + // TwoByte + TwoByte + assertEq(s5.startsWith(s5), true); + assertEq(s5.startsWith("\u1200"), false); + assertEq(s5.startsWith("\u1200", 6), true); +} +testStartsWith(); + +function testEndsWith() { + var s1 = toLatin1("zabc\u0099defg"); + var s2 = toLatin1("\u0099defg"); + var s3 = toLatin1("\u0098defg"); + var s4 = toLatin1("zabc\u0099def"); + + // Latin1 + Latin1 + assertEq(s1.endsWith(s2), true); + assertEq(s1.endsWith(s3), false); + assertEq(s1.endsWith(s4), false); + assertEq(s1.endsWith(s4, 8), true); + assertEq(s1.endsWith(s1), true); + + // Latin1 + TwoByte + assertEq(s1.endsWith("abc\u0099defg\u1200".slice(0, -1)), true); + assertEq(s1.endsWith("\u1100efg\u1200".slice(0, -1)), false); + assertEq(s1.endsWith("bc\u0099\u1200".slice(0, -1), 5), true); + assertEq(s1.endsWith("\u1200"), false); + + // TwoByte + Latin1 + var s5 = "\u1200zabc\u0099defg"; + assertEq(s5.endsWith(s1), true); + assertEq(s5.endsWith(s2), true); + assertEq(s5.endsWith(s4), false); + assertEq(s5.endsWith(s4, 9), true); + + // TwoByte + TwoByte + assertEq(s5.endsWith(s5), true); + assertEq(s5.endsWith("\u1200"), false); + assertEq(s5.endsWith("\u1200za", 3), true); +} +testEndsWith(); diff --git a/js/src/jit-test/tests/latin1/structured-clone.js b/js/src/jit-test/tests/latin1/structured-clone.js new file mode 100644 index 0000000000..d7ad815a57 --- /dev/null +++ b/js/src/jit-test/tests/latin1/structured-clone.js @@ -0,0 +1,19 @@ +// Latin1 +var s = deserialize(serialize("foo123\u00EE")); +assertEq(s, "foo123\u00EE"); +assertEq(isLatin1(s), true); + +var o = deserialize(serialize(new String("foo\u00EE"))); +assertEq(typeof o, "object"); +assertEq(o.valueOf(), "foo\u00EE"); +assertEq(isLatin1(o.valueOf()), true); + +// TwoByte +var s = deserialize(serialize("foo123\u00FF\u1234")); +assertEq(s, "foo123\u00FF\u1234"); +assertEq(isLatin1(s), false); + +var o = deserialize(serialize(new String("foo\uEEEE"))); +assertEq(typeof o, "object"); +assertEq(o.valueOf(), "foo\uEEEE"); +assertEq(isLatin1(o.valueOf()), false); diff --git a/js/src/jit-test/tests/latin1/toLowerCase-toUpperCase.js b/js/src/jit-test/tests/latin1/toLowerCase-toUpperCase.js new file mode 100644 index 0000000000..d1855dc3d7 --- /dev/null +++ b/js/src/jit-test/tests/latin1/toLowerCase-toUpperCase.js @@ -0,0 +1,57 @@ +function testToLowerCase() { + var s1 = "abcdefgABCDEFGH 123456"; + assertEq(isLatin1(s1), true); + + // Latin1 + var s2 = s1.toLowerCase(); + assertEq(isLatin1(s2), true); + assertEq(s2, "abcdefgabcdefgh 123456"); + + s2 = s1.toLocaleLowerCase(); + assertEq(isLatin1(s2), true); + assertEq(s2, "abcdefgabcdefgh 123456"); + + // TwoByte + s2 = "abcdefg\u1200ABCDEFGH 123456\u04AC".toLowerCase(); + assertEq(s2, "abcdefg\u1200abcdefgh 123456\u04AD"); + + s2 = "abcdefg\u1200ABCDEFGH 123456\u04AC".toLocaleLowerCase(); + assertEq(s2, "abcdefg\u1200abcdefgh 123456\u04AD"); + + // For toLowerCase, every Latin1 character maps to a Latin1 character. + for (var i=0; i <= 0xff; i++) { + var s = "\u1200\u11AA" + String.fromCharCode(i); + assertEq(s.toLowerCase().charCodeAt(2) <= 0xff, true); + } +} +testToLowerCase(); + +function testToUpperCase() { + var s1 = "abcdefgABCDEFGH 12345"; + assertEq(isLatin1(s1), true); + + // Latin1 + var s2 = s1.toUpperCase(); + assertEq(isLatin1(s2), true); + assertEq(s2, "ABCDEFGABCDEFGH 12345"); + + s2 = s1.toLocaleUpperCase(); + assertEq(isLatin1(s2), true); + assertEq(s2, "ABCDEFGABCDEFGH 12345"); + + // TwoByte + s2 = "abcdefg\u1200ABCDEFGH 12345\u1E0F".toUpperCase(); + assertEq(s2, "ABCDEFG\u1200ABCDEFGH 12345\u1E0E"); + + s2 = "abcdefg\u1200ABCDEFGH 12345\u1E0F".toLocaleUpperCase(); + assertEq(s2, "ABCDEFG\u1200ABCDEFGH 12345\u1E0E"); + + // Tricky case: Latin1 character \u00FF maps to \u0178, a + // non-Latin1 character. + s1 = "ABC\u00FF"; + assertEq(isLatin1(s1), true); + s2 = s1.toUpperCase(); + assertEq(isLatin1(s2), false); + assertEq(s2, "ABC\u0178"); +} +testToUpperCase(); diff --git a/js/src/jit-test/tests/latin1/toNumber.js b/js/src/jit-test/tests/latin1/toNumber.js new file mode 100644 index 0000000000..ab70342739 --- /dev/null +++ b/js/src/jit-test/tests/latin1/toNumber.js @@ -0,0 +1,28 @@ +function toLatin1(s) { + assertEq(isLatin1(s), true); + return s; +} +function testToNumber() { + // Latin1 + assertEq(+toLatin1("12345.6"), 12345.6); + assertEq(+toLatin1("+123"), 123); + assertEq(+toLatin1("0xABC"), 0xABC); + assertEq(+toLatin1("112."), 112); + assertEq(+toLatin1("112.A"), NaN); + assertEq(+toLatin1("-Infinity"), -Infinity); + + // TwoByte + function twoByte(s) { + s = "\u1200" + s; + s = s.substr(1); + assertEq(isLatin1(s), false); + return s; + } + assertEq(+twoByte("12345.6"), 12345.6); + assertEq(+twoByte("+123"), 123); + assertEq(+twoByte("0xABC"), 0xABC); + assertEq(+twoByte("112."), 112); + assertEq(+twoByte("112.A"), NaN); + assertEq(+twoByte("-Infinity"), -Infinity); +} +testToNumber(); diff --git a/js/src/jit-test/tests/latin1/trim.js b/js/src/jit-test/tests/latin1/trim.js new file mode 100644 index 0000000000..79e0830126 --- /dev/null +++ b/js/src/jit-test/tests/latin1/trim.js @@ -0,0 +1,28 @@ +function test() { + // Latin1 + var s = " \r\t\n\u00A0foo 123\t \r\n\u00A0"; + assertEq(isLatin1(s), true); + + var res = s.trim(); + assertEq(isLatin1(res), true); + assertEq(res, "foo 123"); + + res = s.trimLeft(); + assertEq(isLatin1(res), true); + assertEq(res, "foo 123\t \r\n\u00A0"); + + res = s.trimRight(); + assertEq(isLatin1(res), true); + assertEq(res, " \r\t\n\u00A0foo 123"); + + res = "foo 1234".trim(); + assertEq(isLatin1(res), true); + assertEq(res, "foo 1234"); + + // TwoByte + s = " \r\t\n\u00A0\u2000foo\u1200123\t \r\n\u00A0\u2009"; + assertEq(s.trim(), "foo\u1200123"); + assertEq(s.trimLeft(), "foo\u1200123\t \r\n\u00A0\u2009"); + assertEq(s.trimRight(), " \r\t\n\u00A0\u2000foo\u1200123"); +} +test(); diff --git a/js/src/jit-test/tests/modules/add-to-namespace-import.js b/js/src/jit-test/tests/modules/add-to-namespace-import.js new file mode 100644 index 0000000000..b5a6626bfc --- /dev/null +++ b/js/src/jit-test/tests/modules/add-to-namespace-import.js @@ -0,0 +1,3 @@ +// |jit-test| module; error: TypeError +import * as ns from "module1.js"; +ns.b = 2; diff --git a/js/src/jit-test/tests/modules/ambiguous-import.js b/js/src/jit-test/tests/modules/ambiguous-import.js new file mode 100644 index 0000000000..6a91f9537b --- /dev/null +++ b/js/src/jit-test/tests/modules/ambiguous-import.js @@ -0,0 +1,2 @@ +// |jit-test| module; error: SyntaxError +import { a } from "ambiguous.js"; diff --git a/js/src/jit-test/tests/modules/ambiguous-indirect-export.js b/js/src/jit-test/tests/modules/ambiguous-indirect-export.js new file mode 100644 index 0000000000..17949955ea --- /dev/null +++ b/js/src/jit-test/tests/modules/ambiguous-indirect-export.js @@ -0,0 +1,2 @@ +// |jit-test| module; error: SyntaxError +export { a } from "ambiguous.js"; diff --git a/js/src/jit-test/tests/modules/ambiguous-star-export.js b/js/src/jit-test/tests/modules/ambiguous-star-export.js new file mode 100644 index 0000000000..f90673bd9f --- /dev/null +++ b/js/src/jit-test/tests/modules/ambiguous-star-export.js @@ -0,0 +1,43 @@ +// Test ambigious export * statements. + +"use strict"; + +load(libdir + "asserts.js"); + +function checkModuleEval(source) { + let m = parseModule(source); + moduleLink(m); + moduleEvaluate(m); + return m; +} + +function checkModuleSyntaxError(source) { + let m = parseModule(source); + assertThrowsInstanceOf(() => moduleLink(m), SyntaxError); +} + +let a = registerModule('a', parseModule("export var a = 1; export var b = 2;")); +let b = registerModule('b', parseModule("export var b = 3; export var c = 4;")); +let c = registerModule('c', parseModule("export * from 'a'; export * from 'b';")); +moduleLink(c); +moduleEvaluate(c); + +// Check importing/exporting non-ambiguous name works. +let d = checkModuleEval("import { a } from 'c';"); +assertEq(getModuleEnvironmentValue(d, "a"), 1); +checkModuleEval("export { a } from 'c';"); + +// Check importing/exporting ambiguous name is a syntax error. +checkModuleSyntaxError("import { b } from 'c';"); +checkModuleSyntaxError("export { b } from 'c';"); + +// Check that namespace objects include only non-ambiguous names. +let m = parseModule("import * as ns from 'c';"); +moduleLink(m); +moduleEvaluate(m); +let ns = c.namespace; +let names = Object.keys(ns); +assertEq(names.length, 2); +assertEq('a' in ns, true); +assertEq('b' in ns, false); +assertEq('c' in ns, true); diff --git a/js/src/jit-test/tests/modules/assign-to-import.js b/js/src/jit-test/tests/modules/assign-to-import.js new file mode 100644 index 0000000000..42abd66c50 --- /dev/null +++ b/js/src/jit-test/tests/modules/assign-to-import.js @@ -0,0 +1,3 @@ +// |jit-test| module; error: TypeError +import { a } from "module1.js"; +a = 2; diff --git a/js/src/jit-test/tests/modules/assign-to-namespace-import.js b/js/src/jit-test/tests/modules/assign-to-namespace-import.js new file mode 100644 index 0000000000..faa55b6198 --- /dev/null +++ b/js/src/jit-test/tests/modules/assign-to-namespace-import.js @@ -0,0 +1,3 @@ +// |jit-test| module; error: TypeError +import * as ns from "module1.js"; +ns.a = 2; diff --git a/js/src/jit-test/tests/modules/assign-to-namespace.js b/js/src/jit-test/tests/modules/assign-to-namespace.js new file mode 100644 index 0000000000..396ec1b525 --- /dev/null +++ b/js/src/jit-test/tests/modules/assign-to-namespace.js @@ -0,0 +1,3 @@ +// |jit-test| module; error: TypeError +import * as ns from "module1.js"; +ns = 2; diff --git a/js/src/jit-test/tests/modules/async-eval-state.js b/js/src/jit-test/tests/modules/async-eval-state.js new file mode 100644 index 0000000000..b3c524d961 --- /dev/null +++ b/js/src/jit-test/tests/modules/async-eval-state.js @@ -0,0 +1,207 @@ +// Test module fields related to asynchronous evaluation. + +// Hardcoded values of ModuleStatus. Keep these in sync if the code changes. +const StatusUnlinked = 0; +const StatusLinked = 2; +const StatusEvaluating = 3; +const StatusEvaluatingAsync = 4; +const StatusEvaluated = 5; + +{ + let m = parseModule(''); + assertEq(m.status, StatusUnlinked); + + moduleLink(m); + assertEq(m.isAsyncEvaluating, false); + assertEq(m.status, StatusLinked); + + moduleEvaluate(m); + assertEq(m.isAsyncEvaluating, false); + assertEq(m.status, StatusEvaluated); +} + +{ + let m = parseModule('await 1;'); + + moduleLink(m); + assertEq(m.isAsyncEvaluating, false); + + moduleEvaluate(m); + assertEq(m.isAsyncEvaluating, true); + assertEq(m.status, StatusEvaluatingAsync); + assertEq(m.asyncEvaluatingPostOrder, 1); + + drainJobQueue(); + assertEq(m.isAsyncEvaluating, true); + assertEq(m.status, StatusEvaluated); + assertEq(m.asyncEvaluatingPostOrder, undefined); +} + +{ + let m = parseModule('await 1; throw 2;'); + + moduleLink(m); + moduleEvaluate(m).catch(() => 0); + assertEq(m.isAsyncEvaluating, true); + assertEq(m.status, StatusEvaluatingAsync); + assertEq(m.asyncEvaluatingPostOrder, 1); + + drainJobQueue(); + assertEq(m.isAsyncEvaluating, true); + assertEq(m.status, StatusEvaluated); + assertEq(m.evaluationError, 2); + assertEq(m.asyncEvaluatingPostOrder, undefined); +} + +{ + let m = parseModule('throw 1; await 2;'); + moduleLink(m); + moduleEvaluate(m).catch(() => 0); + assertEq(m.isAsyncEvaluating, true); + assertEq(m.status, StatusEvaluatingAsync); + assertEq(m.asyncEvaluatingPostOrder, 1); + + drainJobQueue(); + assertEq(m.isAsyncEvaluating, true); + assertEq(m.status, StatusEvaluated); + assertEq(m.evaluationError, 1); + assertEq(m.asyncEvaluatingPostOrder, undefined); +} + +{ + clearModules(); + let a = registerModule('a', parseModule('')); + let b = registerModule('b', parseModule('import {} from "a"; await 1;')); + + moduleLink(b); + moduleEvaluate(b); + assertEq(a.isAsyncEvaluating, false); + assertEq(a.status, StatusEvaluated); + assertEq(b.isAsyncEvaluating, true); + assertEq(b.status, StatusEvaluatingAsync); + assertEq(b.asyncEvaluatingPostOrder, 1); + + drainJobQueue(); + assertEq(a.isAsyncEvaluating, false); + assertEq(a.status, StatusEvaluated); + assertEq(b.isAsyncEvaluating, true); + assertEq(b.status, StatusEvaluated); + assertEq(b.asyncEvaluatingPostOrder, undefined); +} + +{ + clearModules(); + let a = registerModule('a', parseModule('await 1;')); + let b = registerModule('b', parseModule('import {} from "a";')); + + moduleLink(b); + moduleEvaluate(b); + assertEq(a.isAsyncEvaluating, true); + assertEq(a.status, StatusEvaluatingAsync); + assertEq(a.asyncEvaluatingPostOrder, 1); + assertEq(b.isAsyncEvaluating, true); + assertEq(b.status, StatusEvaluatingAsync); + assertEq(b.asyncEvaluatingPostOrder, 2); + + drainJobQueue(); + assertEq(a.isAsyncEvaluating, true); + assertEq(a.status, StatusEvaluated); + assertEq(a.asyncEvaluatingPostOrder, undefined); + assertEq(b.isAsyncEvaluating, true); + assertEq(b.status, StatusEvaluated); + assertEq(b.asyncEvaluatingPostOrder, undefined); +} + +{ + clearModules(); + let resolve; + var promise = new Promise(r => { resolve = r; }); + let a = registerModule('a', parseModule('await promise;')); + let b = registerModule('b', parseModule('await 2;')); + let c = registerModule('c', parseModule('import {} from "a"; import {} from "b";')); + + moduleLink(c); + moduleEvaluate(c); + assertEq(a.isAsyncEvaluating, true); + assertEq(a.status, StatusEvaluatingAsync); + assertEq(a.asyncEvaluatingPostOrder, 1); + assertEq(b.isAsyncEvaluating, true); + assertEq(b.status, StatusEvaluatingAsync); + assertEq(b.asyncEvaluatingPostOrder, 2); + assertEq(c.isAsyncEvaluating, true); + assertEq(c.status, StatusEvaluatingAsync); + assertEq(c.asyncEvaluatingPostOrder, 3); + + resolve(1); + drainJobQueue(); + assertEq(a.isAsyncEvaluating, true); + assertEq(a.status, StatusEvaluated); + assertEq(a.asyncEvaluatingPostOrder, undefined); + assertEq(b.isAsyncEvaluating, true); + assertEq(b.status, StatusEvaluated); + assertEq(b.asyncEvaluatingPostOrder, undefined); + assertEq(c.isAsyncEvaluating, true); + assertEq(c.status, StatusEvaluated); + assertEq(c.asyncEvaluatingPostOrder, undefined); +} + +{ + clearModules(); + let a = registerModule('a', parseModule('throw 1;')); + let b = registerModule('b', parseModule('import {} from "a"; await 2;')); + + moduleLink(b); + moduleEvaluate(b).catch(() => 0); + assertEq(a.status, StatusEvaluated); + assertEq(a.isAsyncEvaluating, false); + assertEq(a.evaluationError, 1); + assertEq(b.status, StatusEvaluated); + assertEq(b.isAsyncEvaluating, false); + assertEq(b.evaluationError, 1); +} + +{ + clearModules(); + let a = registerModule('a', parseModule('throw 1; await 2;')); + let b = registerModule('b', parseModule('import {} from "a";')); + + moduleLink(b); + moduleEvaluate(b).catch(() => 0); + assertEq(a.isAsyncEvaluating, true); + assertEq(a.status, StatusEvaluatingAsync); + assertEq(b.isAsyncEvaluating, true); + assertEq(b.status, StatusEvaluatingAsync); + + drainJobQueue(); + assertEq(a.isAsyncEvaluating, true); + assertEq(a.status, StatusEvaluated); + assertEq(a.evaluationError, 1); + assertEq(a.asyncEvaluatingPostOrder, undefined); + assertEq(b.isAsyncEvaluating, true); + assertEq(b.status, StatusEvaluated); + assertEq(b.evaluationError, 1); + assertEq(b.asyncEvaluatingPostOrder, undefined); +} + +{ + clearModules(); + let a = registerModule('a', parseModule('await 1; throw 2;')); + let b = registerModule('b', parseModule('import {} from "a";')); + + moduleLink(b); + moduleEvaluate(b).catch(() => 0); + assertEq(a.isAsyncEvaluating, true); + assertEq(a.status, StatusEvaluatingAsync); + assertEq(b.isAsyncEvaluating, true); + assertEq(b.status, StatusEvaluatingAsync); + + drainJobQueue(); + assertEq(a.isAsyncEvaluating, true); + assertEq(a.status, StatusEvaluated); + assertEq(a.evaluationError, 2); + assertEq(a.asyncEvaluatingPostOrder, undefined); + assertEq(b.isAsyncEvaluating, true); + assertEq(b.status, StatusEvaluated); + assertEq(b.evaluationError, 2); + assertEq(b.asyncEvaluatingPostOrder, undefined); +} diff --git a/js/src/jit-test/tests/modules/bad-namespace-created.js b/js/src/jit-test/tests/modules/bad-namespace-created.js new file mode 100644 index 0000000000..49fcc0c50f --- /dev/null +++ b/js/src/jit-test/tests/modules/bad-namespace-created.js @@ -0,0 +1,15 @@ +// Prior to https://github.com/tc39/ecma262/pull/916 it was possible for a +// module namespace object to be successfully created that was later found to be +// erroneous. Test that this is no longer the case. + +"use strict"; + +load(libdir + "asserts.js"); + +let a = registerModule('A', parseModule('import "B"; export {x} from "C"')); +registerModule('B', parseModule('import * as a from "A"')); +registerModule('C', parseModule('export * from "D"; export * from "E"')); +registerModule('D', parseModule('export let x')); +registerModule('E', parseModule('export let x')); + +assertThrowsInstanceOf(() => moduleLink(a), SyntaxError); diff --git a/js/src/jit-test/tests/modules/bug-1168666.js b/js/src/jit-test/tests/modules/bug-1168666.js new file mode 100644 index 0000000000..32aea2983b --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1168666.js @@ -0,0 +1,2 @@ +// |jit-test| error: SyntaxError +export * diff --git a/js/src/jit-test/tests/modules/bug-1217593.js b/js/src/jit-test/tests/modules/bug-1217593.js new file mode 100644 index 0000000000..ebf210b38e --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1217593.js @@ -0,0 +1,6 @@ +enableOsiPointRegisterChecks(); +function f() { + return this; +} +f(); +f(); diff --git a/js/src/jit-test/tests/modules/bug-1219044.js b/js/src/jit-test/tests/modules/bug-1219044.js new file mode 100644 index 0000000000..3917d7ca9c --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1219044.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => parseModule('import v from "mod";')); +fullcompartmentchecks(true); diff --git a/js/src/jit-test/tests/modules/bug-1219408.js b/js/src/jit-test/tests/modules/bug-1219408.js new file mode 100644 index 0000000000..1dcc5426b7 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1219408.js @@ -0,0 +1,2 @@ +// |jit-test| error: Error +moduleEvaluate(parseModule("")); diff --git a/js/src/jit-test/tests/modules/bug-1225346.js b/js/src/jit-test/tests/modules/bug-1225346.js new file mode 100644 index 0000000000..6d8908e981 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1225346.js @@ -0,0 +1,2 @@ +// |jit-test| error: Error: expected filename string, got number +parseModule("", 3); diff --git a/js/src/jit-test/tests/modules/bug-1233117.js b/js/src/jit-test/tests/modules/bug-1233117.js new file mode 100644 index 0000000000..b84a84155a --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1233117.js @@ -0,0 +1,2 @@ +// |jit-test| module; +eval("1"); diff --git a/js/src/jit-test/tests/modules/bug-1233179.js b/js/src/jit-test/tests/modules/bug-1233179.js new file mode 100644 index 0000000000..80e742b319 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1233179.js @@ -0,0 +1,8 @@ +// |jit-test| --code-coverage + +let c = parseModule(` + function a(x) { return x; } + function b(x) { return i<40; } + function d(x) { return x + 3; } +`); +getLcovInfo(); diff --git a/js/src/jit-test/tests/modules/bug-1233915.js b/js/src/jit-test/tests/modules/bug-1233915.js new file mode 100644 index 0000000000..4de08e50c9 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1233915.js @@ -0,0 +1,11 @@ +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("(" + function() { + Debugger(parent) + .onExceptionUnwind = function(frame) { + return frame.eval(""); + }; +} + ")()"); +m = parseModule(` s1 `); +moduleLink(m); +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/modules/bug-1236875.js b/js/src/jit-test/tests/modules/bug-1236875.js new file mode 100644 index 0000000000..82ded01600 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1236875.js @@ -0,0 +1,2 @@ +let m = parseModule(`{ function x() {} }`); +moduleLink(m); diff --git a/js/src/jit-test/tests/modules/bug-1245518.js b/js/src/jit-test/tests/modules/bug-1245518.js new file mode 100644 index 0000000000..857451cabd --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1245518.js @@ -0,0 +1,15 @@ +evalInFrame = function(global) { + dbgGlobal = newGlobal({newCompartment: true}); + dbg = new dbgGlobal.Debugger(); + return function(upCount, code) { + dbg.addDebuggee(global); + frame = dbg.getNewestFrame().older; + frame.eval(code); + } +}(this); +m = parseModule(` + function g() { return this.hours = 0; } + evalInFrame.call(0, 0, "g()") +`); +moduleLink(m); +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/modules/bug-1247934.js b/js/src/jit-test/tests/modules/bug-1247934.js new file mode 100644 index 0000000000..547f36faf6 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1247934.js @@ -0,0 +1,5 @@ +setJitCompilerOption("ion.warmup.trigger", 50); +s = ""; +for (i = 0; i < 1024; i++) s += "export let e" + i + "\n"; +registerModule('a', parseModule(s)); +moduleLink(parseModule("import * as ns from 'a'")); diff --git a/js/src/jit-test/tests/modules/bug-1258097.js b/js/src/jit-test/tests/modules/bug-1258097.js new file mode 100644 index 0000000000..c7f8770436 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1258097.js @@ -0,0 +1,3 @@ +// |jit-test| module; error:SyntaxError +import x from 'y'; +function x() {} diff --git a/js/src/jit-test/tests/modules/bug-1283448.js b/js/src/jit-test/tests/modules/bug-1283448.js new file mode 100644 index 0000000000..def4d8cc6e --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1283448.js @@ -0,0 +1,4 @@ +let a = registerModule('a', parseModule("var x = 1; export { x };")); +let b = registerModule('b', parseModule("import { x as y } from 'a';")); +a.__proto__ = {15: 1337}; +moduleLink(b); diff --git a/js/src/jit-test/tests/modules/bug-1284486-2.js b/js/src/jit-test/tests/modules/bug-1284486-2.js new file mode 100644 index 0000000000..710f6e02eb --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1284486-2.js @@ -0,0 +1,34 @@ +// This tests that attempting to perform ModuleDeclarationInstantation a +// second time after a failure still fails. (It no longer stores and rethrows +// the same error; the spec changed in that regard and the implementation was +// updated in bug 1420420). +// +// The attempts fails becuase module 'a' is not available. +// +// This test exercises the path where the previously instantiated module is +// re-instantiated directly. + +let b = registerModule('b', parseModule("export var b = 3; export var c = 4;")); +let c = registerModule('c', parseModule("export * from 'a'; export * from 'b';")); + +let e1; +let threw = false; +try { + moduleLink(c); +} catch (exc) { + threw = true; + e1 = exc; +} +assertEq(threw, true); +assertEq(typeof e1 === "undefined", false); + +threw = false; +let e2; +try { + moduleLink(c); +} catch (exc) { + threw = true; + e2 = exc; +} +assertEq(threw, true); +assertEq(e1.toString(), e2.toString()); diff --git a/js/src/jit-test/tests/modules/bug-1284486.js b/js/src/jit-test/tests/modules/bug-1284486.js new file mode 100644 index 0000000000..ba8aff1d07 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1284486.js @@ -0,0 +1,33 @@ +// This tests that module instantiation can succeed when executed a second +// time after a failure. +// +// The first attempt fails becuase module 'a' is not available. The second +// attempt succeeds as 'a' is now available. +// +// This test exercises the path where the previously instantiated module is +// encountered as an import. + +let b = registerModule('b', parseModule("export var b = 3; export var c = 4;")); +let c = registerModule('c', parseModule("export * from 'a'; export * from 'b';")); + +let e1; +let threw = false; +try { + moduleLink(c); +} catch (exc) { + threw = true; + e1 = exc; +} +assertEq(threw, true); +assertEq(typeof e1 === "undefined", false); + +let a = registerModule('a', parseModule("export var a = 1; export var b = 2;")); +let d = registerModule('d', parseModule("import { a } from 'c'; a;")); + +threw = false; +try { + moduleLink(d); +} catch (exc) { + threw = true; +} +assertEq(threw, false); diff --git a/js/src/jit-test/tests/modules/bug-1287406.js b/js/src/jit-test/tests/modules/bug-1287406.js new file mode 100644 index 0000000000..8eef163886 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1287406.js @@ -0,0 +1 @@ +parseModule("export default () => 1"); diff --git a/js/src/jit-test/tests/modules/bug-1287410.js b/js/src/jit-test/tests/modules/bug-1287410.js new file mode 100644 index 0000000000..cc9487746c --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1287410.js @@ -0,0 +1,17 @@ +// |jit-test| error: InternalError + +let a = registerModule('a', parseModule("export var a = 1; export var b = 2;")); +let b = registerModule('b', parseModule("export var b = 3; export var c = 4;")); +let c = registerModule('c', parseModule("export * from 'a'; export * from 'b';")); +moduleLink(c); + +// Module 'a' is replaced with another module that has not been instantiated. +// This should not happen and would be a bug in the module loader. +a = registerModule('a', parseModule("export var a = 1; export var b = 2;")); + +let d = registerModule('d', parseModule("import { a } from 'c'; a;")); + +// Attempting to instantiate 'd' throws an error because depdency 'a' of +// instantiated module 'c' is not instantiated. +moduleLink(d); +moduleEvaluate(d); diff --git a/js/src/jit-test/tests/modules/bug-1320993.js b/js/src/jit-test/tests/modules/bug-1320993.js new file mode 100644 index 0000000000..bece5731a3 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1320993.js @@ -0,0 +1,2 @@ +parseModule("export default (class {})"); +parseModule("export default (class A {})"); diff --git a/js/src/jit-test/tests/modules/bug-1372258.js b/js/src/jit-test/tests/modules/bug-1372258.js new file mode 100644 index 0000000000..a55979457f --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1372258.js @@ -0,0 +1,26 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// Overwrite built-in parseModule with off-thread module parser. +function parseModule(source) { + offThreadCompileModuleToStencil(source); + var stencil = finishOffThreadStencil(); + return instantiateModuleStencil(stencil); +} + +// Test case derived from: js/src/jit-test/tests/modules/many-imports.js + +// Test importing an import many times. + +const count = 1024; + +let a = registerModule('a', parseModule("export let a = 1;")); + +let s = ""; +for (let i = 0; i < count; i++) { + s += "import { a as i" + i + " } from 'a';\n"; + s += "assertEq(i" + i + ", 1);\n"; +} +let b = registerModule('b', parseModule(s)); + +moduleLink(b); +moduleEvaluate(b); diff --git a/js/src/jit-test/tests/modules/bug-1402535.js b/js/src/jit-test/tests/modules/bug-1402535.js new file mode 100644 index 0000000000..f8cf878260 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1402535.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('stackTest' in this) + +stackTest(function() { + let m = parseModule(``); + moduleLink(m); +}); diff --git a/js/src/jit-test/tests/modules/bug-1402649.js b/js/src/jit-test/tests/modules/bug-1402649.js new file mode 100644 index 0000000000..559a91a98f --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1402649.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: !('oomTest' in this) + +loadFile(` +function parseAndEvaluate(source) { + let m = parseModule(source); + moduleLink(m); +} +parseAndEvaluate("async function a() { await 2 + 3; }") +`); +function loadFile(lfVarx) { + oomTest(function() { + eval(lfVarx); + }); +} diff --git a/js/src/jit-test/tests/modules/bug-1406452.js b/js/src/jit-test/tests/modules/bug-1406452.js new file mode 100644 index 0000000000..e7293bc222 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1406452.js @@ -0,0 +1,5 @@ +// |jit-test| error: Error +let m = parseModule(`for (var x of iterator) {}`); +moduleLink(m); +try { moduleEvaluate(m); } catch (e) {} +getModuleEnvironmentValue(m, "r"); diff --git a/js/src/jit-test/tests/modules/bug-1420420-2.js b/js/src/jit-test/tests/modules/bug-1420420-2.js new file mode 100644 index 0000000000..1c1666295d --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1420420-2.js @@ -0,0 +1,17 @@ +// Test re-instantiation module after failure. + +load(libdir + "asserts.js"); + +registerModule("good", parseModule(`export let x`)); + +registerModule("y1", parseModule(`export let y`)); +registerModule("y2", parseModule(`export let y`)); +registerModule("bad", parseModule(`export* from "y1"; export* from "y2";`)); + +registerModule("a", parseModule(`import* as ns from "good"; import {y} from "bad";`)); + +let b = registerModule("b", parseModule(`import "a";`)); +let c = registerModule("c", parseModule(`import "a";`)); + +assertThrowsInstanceOf(() => moduleLink(b), SyntaxError); +assertThrowsInstanceOf(() => moduleLink(c), SyntaxError); diff --git a/js/src/jit-test/tests/modules/bug-1420420-3.js b/js/src/jit-test/tests/modules/bug-1420420-3.js new file mode 100644 index 0000000000..508afa41b1 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1420420-3.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('stackTest' in this) + +let a = parseModule(`throw new Error`); +moduleLink(a); +stackTest(function() { + moduleEvaluate(a); +}); diff --git a/js/src/jit-test/tests/modules/bug-1420420-4.js b/js/src/jit-test/tests/modules/bug-1420420-4.js new file mode 100644 index 0000000000..6181183ce3 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1420420-4.js @@ -0,0 +1,18 @@ +load(libdir + "asserts.js"); + +registerModule("a", parseModule(`throw undefined`)); + +let b = registerModule("b", parseModule(`import "a";`)); +let c = registerModule("c", parseModule(`import "a";`)); + +moduleLink(b); +moduleLink(c); + +(async () => { + let count = 0; + try { await moduleEvaluate(b) } catch (e) { count++; } + try { await moduleEvaluate(c) } catch (e) { count++; } + assertEq(count, 2); +})(); + +drainJobQueue(); diff --git a/js/src/jit-test/tests/modules/bug-1420420.js b/js/src/jit-test/tests/modules/bug-1420420.js new file mode 100644 index 0000000000..e8bbcb81c8 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1420420.js @@ -0,0 +1,17 @@ +// Test re-instantiation module after failure. + +load(libdir + "asserts.js"); + +registerModule("good", parseModule(`export let x`)); + +registerModule("y1", parseModule(`export let y`)); +registerModule("y2", parseModule(`export let y`)); +registerModule("bad", parseModule(`export* from "y1"; export* from "y2";`)); + +registerModule("a", parseModule(`import {x} from "good"; import {y} from "bad";`)); + +let b = registerModule("b", parseModule(`import "a";`)); +let c = registerModule("c", parseModule(`import "a";`)); + +assertThrowsInstanceOf(() => moduleLink(b), SyntaxError); +assertThrowsInstanceOf(() => moduleLink(c), SyntaxError); diff --git a/js/src/jit-test/tests/modules/bug-1435327.js b/js/src/jit-test/tests/modules/bug-1435327.js new file mode 100644 index 0000000000..bb9f18a220 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1435327.js @@ -0,0 +1,27 @@ +// |jit-test| skip-if: !('oomTest' in this) + +lfLogBuffer = ` + let c = registerModule('c', parseModule("")); + let d = registerModule('d', parseModule("import { a } from 'c'; a;")); + moduleLink(d); +`; +lfLogBuffer = lfLogBuffer.split('\n'); +var lfCodeBuffer = ""; +while (true) { + var line = lfLogBuffer.shift(); + if (line == null) { + break; + } else { + lfCodeBuffer += line + "\n"; + } +} +if (lfCodeBuffer) loadFile(lfCodeBuffer); +function loadFile(lfVarx) { + try { + oomTest(function() { + let m = parseModule(lfVarx); + moduleLink(m); + moduleEvaluate(m); + }); + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/modules/bug-1439416-2.js b/js/src/jit-test/tests/modules/bug-1439416-2.js new file mode 100644 index 0000000000..b9202c112c --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1439416-2.js @@ -0,0 +1,10 @@ +function parseAsModule(source) { + return Reflect.parse(source, { + target: "module", + line: 0x7FFFFFFF + 1, + }); +} +parseAsModule(` + import {a} from ""; + export {a}; +`); diff --git a/js/src/jit-test/tests/modules/bug-1439416.js b/js/src/jit-test/tests/modules/bug-1439416.js new file mode 100644 index 0000000000..9dfe55b49a --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1439416.js @@ -0,0 +1,10 @@ +// Test that zero-based line numbers supplied by Reflect.parse don't cause +// assertions. + +function parseAsModule(source) { + return Reflect.parse(source, { + target: "module", + line: 0 + }); +} +parseAsModule("import d from 'a'"); diff --git a/js/src/jit-test/tests/modules/bug-1443555.js b/js/src/jit-test/tests/modules/bug-1443555.js new file mode 100644 index 0000000000..b67002d52d --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1443555.js @@ -0,0 +1,29 @@ +// |jit-test| error: TypeError + +"use strict"; + +setJitCompilerOption("baseline.warmup.trigger", 0); + +let mainSrc = ` +import A from "A"; + +const a = A; + +function requestAnimationFrame(f) { Promise.resolve().then(f); }; + +requestAnimationFrame(loopy); +a = 2; +function loopy() { + A; +} +`; + +let ASrc = ` +export default 1; +`; + +registerModule('A', parseModule(ASrc)); + +let m = parseModule(mainSrc); +moduleLink(m) +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/modules/bug-1462286.js b/js/src/jit-test/tests/modules/bug-1462286.js new file mode 100644 index 0000000000..ffffc5ee6a --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1462286.js @@ -0,0 +1,8 @@ +let a = registerModule('a', parseModule(` + export var { ... get } = { x: "foo" }; +`)); + +let m = parseModule("import { get } from 'a'; export { get };"); +moduleLink(m); +moduleEvaluate(m) +assertEq(getModuleEnvironmentValue(m, "get").x, "foo"); diff --git a/js/src/jit-test/tests/modules/bug-1462326.js b/js/src/jit-test/tests/modules/bug-1462326.js new file mode 100644 index 0000000000..172b9246fa --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1462326.js @@ -0,0 +1,6 @@ +// |jit-test| error: Error + +let m = parseModule(` + import A from "A"; +`); +moduleLink(m); diff --git a/js/src/jit-test/tests/modules/bug-1466487.js b/js/src/jit-test/tests/modules/bug-1466487.js new file mode 100644 index 0000000000..50d7f18325 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1466487.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +evalInWorker(` + let m = parseModule("import.meta;"); + moduleLink(m); + moduleEvaluate(m); +`); diff --git a/js/src/jit-test/tests/modules/bug-1476921.js b/js/src/jit-test/tests/modules/bug-1476921.js new file mode 100644 index 0000000000..005099319f --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1476921.js @@ -0,0 +1,31 @@ +// |jit-test| +"use strict"; + +load(libdir + "asserts.js"); + +class UniqueError extends Error {} + +let a = registerModule('a', parseModule(` + throw new UniqueError(); +`)); + +let b = registerModule('b', parseModule(` + import * as ns0 from "a"; +`)); + +moduleLink(a); +moduleEvaluate(a) + .then(r => { + // We should not reach here, as we expect an error to be thrown. + assertEq(false, true); + }) + .catch(e => assertEq(e instanceof UniqueError, true)); +moduleLink(b); +moduleEvaluate(b) + .then(r => { + // We should not reach here, as we expect an error to be thrown. + assertEq(false, true); + }) + .catch(e => assertEq(e instanceof UniqueError, true)); + +drainJobQueue(); diff --git a/js/src/jit-test/tests/modules/bug-1498980.js b/js/src/jit-test/tests/modules/bug-1498980.js new file mode 100644 index 0000000000..f05dca6af5 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1498980.js @@ -0,0 +1,29 @@ +// |jit-test| +dbgGlobal = newGlobal({newCompartment: true}); +dbg = new dbgGlobal.Debugger; +dbg.addDebuggee(this); + +function f() { + dbg.getNewestFrame().older.eval(""); +} + +function execModule(source) { + m = parseModule(source); + moduleLink(m); + return moduleEvaluate(m); +} + +execModule("f();").then(() => { + gc(); + + execModule("throw 'foo'") + .then(r => { + // We should not reach here. + assertEq(false, true); + }) + .catch(e => { + assertEq(e, 'foo'); + }); +}) + +drainJobQueue(); diff --git a/js/src/jit-test/tests/modules/bug-1501154.js b/js/src/jit-test/tests/modules/bug-1501154.js new file mode 100644 index 0000000000..48a506db2b --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1501154.js @@ -0,0 +1,25 @@ +// Test using an empty string as a module specifier fails. +let result = null; +let error = null; +let promise = import(""); +promise.then((ns) => { + result = ns; +}).catch((e) => { + error = e; +}); + +drainJobQueue(); +assertEq(result, null); +assertEq(error instanceof Error, true); + +// Test reading a directory as a file fails. +result = null; +error = null; +try { + result = os.file.readFile("."); +} catch (e) { + error = e; +} + +assertEq(result, null); +assertEq(error instanceof Error, true); diff --git a/js/src/jit-test/tests/modules/bug-1501157.js b/js/src/jit-test/tests/modules/bug-1501157.js new file mode 100644 index 0000000000..db681c5000 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1501157.js @@ -0,0 +1,2 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +offThreadCompileToStencil('import("")', {}); diff --git a/js/src/jit-test/tests/modules/bug-1502669.js b/js/src/jit-test/tests/modules/bug-1502669.js new file mode 100644 index 0000000000..4ac6e262cf --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1502669.js @@ -0,0 +1,5 @@ +// |jit-test| error: ReferenceError +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () { hits++; };"); +import('')(); diff --git a/js/src/jit-test/tests/modules/bug-1503009.js b/js/src/jit-test/tests/modules/bug-1503009.js new file mode 100644 index 0000000000..f8dd8d384b --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1503009.js @@ -0,0 +1 @@ +new Function("if (0) import('')")(); diff --git a/js/src/jit-test/tests/modules/bug-1510598.js b/js/src/jit-test/tests/modules/bug-1510598.js new file mode 100644 index 0000000000..0701474f1a --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1510598.js @@ -0,0 +1,9 @@ +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval(`new Debugger(parent).onExceptionUnwind = () => null;`); +let exc = "fail"; +// Module evaluation throws so we fire the onExceptionUnwind hook. +import("javascript: throw 'foo'").catch(e => { exc = e; }); +drainJobQueue(); +assertEq(exc, undefined); + diff --git a/js/src/jit-test/tests/modules/bug-1519140.js b/js/src/jit-test/tests/modules/bug-1519140.js new file mode 100644 index 0000000000..29871bd1a4 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1519140.js @@ -0,0 +1,3 @@ +// |jit-test| --more-compartments; +fullcompartmentchecks(true); +newGlobal().eval(`import("javascript:")`).catch(() => {}); diff --git a/js/src/jit-test/tests/modules/bug-1604792.js b/js/src/jit-test/tests/modules/bug-1604792.js new file mode 100644 index 0000000000..d5f4561616 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1604792.js @@ -0,0 +1,7 @@ +var lfLogBuffer = ` + eval("function f(){}; f();"); +`; + +let lfMod = parseModule(lfLogBuffer); +moduleLink(lfMod); +moduleEvaluate(lfMod); diff --git a/js/src/jit-test/tests/modules/bug-1657066.js b/js/src/jit-test/tests/modules/bug-1657066.js new file mode 100644 index 0000000000..22c828ca68 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1657066.js @@ -0,0 +1,3 @@ +let g = newGlobal({newCompartment: true}); +new Debugger(g).onExceptionUnwind = () => null; +g.eval(`import("javascript: throw 1")`).catch(() => 0); diff --git a/js/src/jit-test/tests/modules/bug-1680878.js b/js/src/jit-test/tests/modules/bug-1680878.js new file mode 100644 index 0000000000..02975bb61b --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1680878.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError + +r = parseModule(` + for await (var x of this) {} +`); +moduleLink(r); +moduleEvaluate(r); diff --git a/js/src/jit-test/tests/modules/bug-1681256.js b/js/src/jit-test/tests/modules/bug-1681256.js new file mode 100644 index 0000000000..f4485abd46 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1681256.js @@ -0,0 +1,20 @@ +// |jit-test| --more-compartments; +let lfCode = ` + var g = newGlobal(); + g.debuggeeGlobal = this; + g.eval("(" + function () { + dbg = new Debugger(debuggeeGlobal); + dbg.onExceptionUnwind = function (frame, exc) {}; + } + ")();"); +`; +loadFile(lfCode); +// use "await" so the module is marked as TLA +loadFile(lfCode + " await ''"); +async function loadFile(lfVarx) { + try { + try { evaluate(lfVarx); } catch(exc) {} + let lfMod = parseModule(lfVarx); + lfMomoduleLink(d); + await lfMomoduleEvaluate(d); + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/modules/bug-1711342.js b/js/src/jit-test/tests/modules/bug-1711342.js new file mode 100644 index 0000000000..a0c6277902 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1711342.js @@ -0,0 +1,6 @@ +Object.defineProperty(__proto__, "then", { + get: function () { + x + } +}); +import("javascript:null"); diff --git a/js/src/jit-test/tests/modules/bug-1764239.js b/js/src/jit-test/tests/modules/bug-1764239.js new file mode 100644 index 0000000000..2beb2a8959 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1764239.js @@ -0,0 +1,13 @@ +let module1 = registerModule('module1', parseModule( + `import {} from "module2"; + import {} from "module3";`)); + +let module2 = registerModule('module2', parseModule( + `await 1;`)); + +let module3 = registerModule('module3', parseModule( + `throw 1;`)); + +moduleLink(module1); +moduleEvaluate(module1).catch(() => 0); +drainJobQueue(); diff --git a/js/src/jit-test/tests/modules/bug-1771090.js b/js/src/jit-test/tests/modules/bug-1771090.js new file mode 100644 index 0000000000..cb5a5a2bc6 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1771090.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomAfterAllocations' in this) + +asyncFunc1("geval0\n await ''") +async function asyncFunc1(lfVarx) { + lfMod = parseModule(lfVarx); + moduleLink(lfMod); + await moduleEvaluate(lfMod); +} +oomAfterAllocations(1); diff --git a/js/src/jit-test/tests/modules/bug-1777972.js b/js/src/jit-test/tests/modules/bug-1777972.js new file mode 100644 index 0000000000..e04214a7e1 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1777972.js @@ -0,0 +1,4 @@ +let a = parseModule(`throw new Error`); +moduleLink(a); +moduleEvaluate(a).catch(e => {}); +moduleEvaluate(a).catch(e => {}); diff --git a/js/src/jit-test/tests/modules/bug-1778439.js b/js/src/jit-test/tests/modules/bug-1778439.js new file mode 100644 index 0000000000..ac930d5055 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1778439.js @@ -0,0 +1 @@ +assertEq(parseModule("").evaluationError, undefined); diff --git a/js/src/jit-test/tests/modules/bug-1782496.js b/js/src/jit-test/tests/modules/bug-1782496.js new file mode 100644 index 0000000000..33ea725a7b --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1782496.js @@ -0,0 +1,9 @@ +// |jit-test| exitstatus: 6; allow-overrecursed + +setInterruptCallback(function() { + import("javascript:null"); + interruptIf(true); +}); + +interruptIf(true); +for (;;) {} // Wait for interrupt. diff --git a/js/src/jit-test/tests/modules/bug-1787926.js b/js/src/jit-test/tests/modules/bug-1787926.js new file mode 100644 index 0000000000..fb71014359 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1787926.js @@ -0,0 +1,16 @@ +let m = registerModule('m', parseModule(`import {} from "s";`)); +let l = registerModule('l', parseModule(`import {} from "s";`)); +let s = registerModule('s', parseModule(`await 0;`)); + +let state = "init"; + +moduleLink(m); +moduleEvaluate(m).then(() => { state = "loaded"; }); +drainJobQueue(); + +assertEq(state, "loaded"); + +import("l").then(() => { state = "complete"; }); +drainJobQueue(); + +assertEq(state, "complete"); diff --git a/js/src/jit-test/tests/modules/bug-1789412.js b/js/src/jit-test/tests/modules/bug-1789412.js new file mode 100644 index 0000000000..55a04d83e5 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1789412.js @@ -0,0 +1,12 @@ +let state = "init"; + +let m = registerModule('m', parseModule( + `import "l"; import("l").then(() => { state = "complete" });`)); + +let l = registerModule('l', parseModule( + `await(0);`)); + +moduleLink(m); +moduleEvaluate(m); +drainJobQueue(); +assertEq(state, "complete"); diff --git a/js/src/jit-test/tests/modules/bug-1790352.js b/js/src/jit-test/tests/modules/bug-1790352.js new file mode 100644 index 0000000000..c215b3e8eb --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1790352.js @@ -0,0 +1,13 @@ +let a = registerModule('a', parseModule("import 'b';")); +let b = registerModule('b', parseModule("import 'c'; await 1; throw 'error';")); +let c = registerModule('c', parseModule("import 'b';")); + +let status1; +import('a').then(() => { status1 = 'loaded' }).catch(e => { status1 = e; }); +drainJobQueue(); +assertEq(status1, 'error'); + +let status2; +import('c').then(() => { status2 = 'loaded' }).catch(e => { status2 = e; }); +drainJobQueue(); +assertEq(status2, 'error'); diff --git a/js/src/jit-test/tests/modules/bug-1795845.js b/js/src/jit-test/tests/modules/bug-1795845.js new file mode 100644 index 0000000000..e2641ee098 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1795845.js @@ -0,0 +1,3 @@ +enableShellAllocationMetadataBuilder(); +gczeal(9, 1); +parseModule(``); diff --git a/js/src/jit-test/tests/modules/bug-1802479.js b/js/src/jit-test/tests/modules/bug-1802479.js new file mode 100644 index 0000000000..c00d0e0da6 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1802479.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: !('oomTest' in this); slow + +function test(lfVarx) { + try { + oomTest(function() { + let m41 = parseModule(lfVarx); + moduleLink(m41); + moduleEvaluate(m41); + }); + } catch (lfVare) {} +} +test(` + var g93 = newGlobal({newCompartment: true}); + g93.eval("f(10);"); +`); diff --git a/js/src/jit-test/tests/modules/bug1105608.js b/js/src/jit-test/tests/modules/bug1105608.js new file mode 100644 index 0000000000..98e6aded08 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1105608.js @@ -0,0 +1,9 @@ +// export-from should throw SyntaxError until it's implemented. + +var caught = false; +try { + eval("export { a } from 'b';"); +} catch (e) { + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/modules/bug1169850.js b/js/src/jit-test/tests/modules/bug1169850.js new file mode 100644 index 0000000000..3f6fbeef93 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1169850.js @@ -0,0 +1,9 @@ +// export-default should throw SyntaxError until it's implemented. + +var caught = false; +try { + eval("export default 1;"); +} catch (e) { + caught = true; +} +assertEq(caught, true); diff --git a/js/src/jit-test/tests/modules/bug1198673.js b/js/src/jit-test/tests/modules/bug1198673.js new file mode 100644 index 0000000000..509adb8e59 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1198673.js @@ -0,0 +1,2 @@ +// |jit-test| error: expected string to compile +parseModule((1)); diff --git a/js/src/jit-test/tests/modules/bug1204857.js b/js/src/jit-test/tests/modules/bug1204857.js new file mode 100644 index 0000000000..451da2e286 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1204857.js @@ -0,0 +1,2 @@ +// |jit-test| error: SyntaxError: unexpected garbage after module +parseModule(("}")); diff --git a/js/src/jit-test/tests/modules/bug1210391.js b/js/src/jit-test/tests/modules/bug1210391.js new file mode 100644 index 0000000000..32df29a8b6 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1210391.js @@ -0,0 +1,7 @@ +let a = registerModule('a', parseModule("export var a = 1; export var b = 2;")); +let b = registerModule('b', parseModule("export var b = 3; export var c = 4;")); +let c = registerModule('c', parseModule("export * from 'a'; export * from 'b';")); +let d = registerModule('d', parseModule("import { a } from 'c'; a;")); +moduleLink(d); +moduleEvaluate(d); + diff --git a/js/src/jit-test/tests/modules/bug1394492.js b/js/src/jit-test/tests/modules/bug1394492.js new file mode 100644 index 0000000000..4fae8ebf9e --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1394492.js @@ -0,0 +1,6 @@ +// |jit-test| error: NaN +let m = parseModule(` + throw i => { return 5; }, m-1; +`); +moduleLink(m); +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/modules/bug1394493.js b/js/src/jit-test/tests/modules/bug1394493.js new file mode 100644 index 0000000000..1fc1899602 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1394493.js @@ -0,0 +1,4 @@ +// |jit-test| error: ReferenceError + +let m = parseModule("export let r = y; y = 4;"); +getModuleEnvironmentValue(m, "r").toString() diff --git a/js/src/jit-test/tests/modules/bug1429031.js b/js/src/jit-test/tests/modules/bug1429031.js new file mode 100644 index 0000000000..b65daa081b --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1429031.js @@ -0,0 +1,16 @@ +// |jit-test| error: ReferenceError + +assertEq = function(a, b) {} +evaluate(` +let a = registerModule('a', parseModule( + 'export var a = 1;' +)); +let b = registerModule('b', parseModule( + \`import * as ns from 'a'; + export var x = ns.a + ns.b;\` +)); +moduleLink(b); +let ns = getModuleEnvironmentValue(b, "ns"); +assertEq(ns.a, 1); +while ( t.ArrayType() ) 1; +`); diff --git a/js/src/jit-test/tests/modules/bug1449153.js b/js/src/jit-test/tests/modules/bug1449153.js new file mode 100644 index 0000000000..4c321854bb --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1449153.js @@ -0,0 +1,33 @@ +// Test performing GetModuleNamespace on an errored module. + +class MyError {} + +async function assertThrowsMyError(f) +{ + let caught = false; + try { + await f(); + } catch (e) { + caught = true; + assertEq(e.constructor, MyError); + } + assertEq(caught, true); +} + +registerModule("a", parseModule(` + throw new MyError(); +`)); + +let c = registerModule("c", parseModule(` + import "a"; +`)); +moduleLink(c); +assertThrowsMyError(() => moduleEvaluate(c)); + +let b = registerModule('b', parseModule(` + import * as ns0 from 'a' +`)); +moduleLink(b); +assertThrowsMyError(() => moduleEvaluate(b)); + +drainJobQueue(); diff --git a/js/src/jit-test/tests/modules/bug1485698.js b/js/src/jit-test/tests/modules/bug1485698.js new file mode 100644 index 0000000000..36f3e53763 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1485698.js @@ -0,0 +1,9 @@ +let m = parseModule(` + function f(x,y,z) { + delete arguments[2]; + import.meta[2] + } + f(1,2,3) +`); +moduleLink(m); +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/modules/bug1584034.js b/js/src/jit-test/tests/modules/bug1584034.js new file mode 100644 index 0000000000..65597effc4 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1584034.js @@ -0,0 +1 @@ +import('./asdf.js').then(() => {}, inJit) diff --git a/js/src/jit-test/tests/modules/bug1584309.js b/js/src/jit-test/tests/modules/bug1584309.js new file mode 100644 index 0000000000..3e5906ea64 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1584309.js @@ -0,0 +1 @@ +import('./asdf.js').then(() => {}, inIon) diff --git a/js/src/jit-test/tests/modules/bug1586599.js b/js/src/jit-test/tests/modules/bug1586599.js new file mode 100644 index 0000000000..612024678a --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1586599.js @@ -0,0 +1,30 @@ +let m1 = parseModule(` +function x() { + return 1; +} +function y() { + x = function() { return 2; }; +} +export { x, y }; +`); +moduleLink(m1); +moduleEvaluate(m1); + +registerModule('m1', m1); + +let m2 = parseModule(` +import {x, y} from "m1"; + +function test(expected) { + for (var i = 0; i < 2000; i++) { + if (i > 1900) { + assertEq(x(), expected); + } + } +} +test(1); +y(); +test(2); +`); +moduleLink(m2); +moduleEvaluate(m2); diff --git a/js/src/jit-test/tests/modules/bug1670236.js b/js/src/jit-test/tests/modules/bug1670236.js new file mode 100644 index 0000000000..35192c2b58 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1670236.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) +o0=r=/x/; +this.toString=(function() { + evaluate("",({ element:o0 })); +}) +oomTest(String.prototype.charCodeAt,{ keepFailing:true }) diff --git a/js/src/jit-test/tests/modules/bug1685992.js b/js/src/jit-test/tests/modules/bug1685992.js new file mode 100644 index 0000000000..39fd4ce7fd --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1685992.js @@ -0,0 +1,12 @@ +// |jit-test| --ion-offthread-compile=off; skip-if: !('oomTest' in this) + +function oomModule(lfMod) { + oomTest(function () { + parseModule(lfMod); + }); +} +oomModule(` + class B50 { + #priv() {} + } +`) \ No newline at end of file diff --git a/js/src/jit-test/tests/modules/bug1699622.js b/js/src/jit-test/tests/modules/bug1699622.js new file mode 100644 index 0000000000..7b8b64b93c --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1699622.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +offThreadCompileModuleToStencil(""); +var stencil = finishOffThreadStencil(); +instantiateModuleStencil(stencil); diff --git a/js/src/jit-test/tests/modules/bug1770048.js b/js/src/jit-test/tests/modules/bug1770048.js new file mode 100644 index 0000000000..31395cab9b --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1770048.js @@ -0,0 +1,20 @@ +const m1 = parseModule(` + export let mod = {}; + function setter(elem) { + delete Array.prototype[0]; // Delete the setter + this.push(elem); // Push the element for real + mod = elem; // Export the gathered module + } + Array.prototype.__defineSetter__(0, setter); + export const _foo = await Promise.resolve(5); +`); + +const m2 = parseModule(` + import {mod} from 'm1'; + assertEq(mod.status, undefined); +`); + +registerModule('m1', m1); +moduleLink(m2); +moduleEvaluate(m2); +drainJobQueue(); diff --git a/js/src/jit-test/tests/modules/bug1846247.js b/js/src/jit-test/tests/modules/bug1846247.js new file mode 100644 index 0000000000..4d63f0cfb3 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug1846247.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this); allow-unhandlable-oom +ignoreUnhandledRejections(); +oomTest(() => { + gc(); + import("javascript:0"); + drainJobQueue(); +}); diff --git a/js/src/jit-test/tests/modules/cyclic-function-import.js b/js/src/jit-test/tests/modules/cyclic-function-import.js new file mode 100644 index 0000000000..a7d61e9bdf --- /dev/null +++ b/js/src/jit-test/tests/modules/cyclic-function-import.js @@ -0,0 +1,7 @@ +// |jit-test| module + +import { isOdd } from "isOdd.js" +import { isEven } from "isEven.js" + +assertEq(isEven(4), true); +assertEq(isOdd(5), true); diff --git a/js/src/jit-test/tests/modules/cyclic-import.js b/js/src/jit-test/tests/modules/cyclic-import.js new file mode 100644 index 0000000000..3ca7bf123e --- /dev/null +++ b/js/src/jit-test/tests/modules/cyclic-import.js @@ -0,0 +1,3 @@ +// |jit-test| module; error: ReferenceError + +import { a } from "cyclicImport1.js"; diff --git a/js/src/jit-test/tests/modules/debugger-frames.js b/js/src/jit-test/tests/modules/debugger-frames.js new file mode 100644 index 0000000000..c343627d51 --- /dev/null +++ b/js/src/jit-test/tests/modules/debugger-frames.js @@ -0,0 +1,83 @@ +// Test debugger access to frames and environments work as expected inside a module. + +load(libdir + "asserts.js"); + +function assertArrayEq(actual, expected) +{ + var eq = actual.length == expected.length; + if (eq) { + for (var i = 0; i < actual.length; i++) { + if (actual[i] !== expected[i]) { + eq = false; + break; + } + } + } + if (!eq) { + print("Assertion failed: got " + JSON.stringify(actual) + + ", expected " + JSON.stringify(expected)); + quit(3); + } +} + +var g2 = newGlobal({newCompartment: true}); + +var dbg = Debugger(g2); +dbg.onDebuggerStatement = function (frame) { + // The current frame is a module frame. + assertEq(frame.type, 'module'); + assertEq(frame.this, undefined); + + // The frame's environement is a module environment. + let env = frame.environment; + assertEq(env.type, 'declarative'); + assertEq(env.calleeScript, null); + + // Top level module definitions and imports are visible. + assertArrayEq(env.names().sort(), ['a', 'b', 'c', 'x', 'y', 'z']); + assertArrayEq(['a', 'b', 'c'].map(env.getVariable, env), [1, 2, 3]); + assertArrayEq(['x', 'y', 'z'].map(env.getVariable, env), [4, 5, 6]); + + // Cannot set imports or const bindings. + assertThrowsInstanceOf(() => env.setVariable('a', 10), TypeError); + assertThrowsInstanceOf(() => env.setVariable('b', 11), TypeError); + assertThrowsInstanceOf(() => env.setVariable('c', 12), TypeError); + env.setVariable('x', 7); + env.setVariable('y', 8); + assertThrowsInstanceOf(() => env.setVariable('z', 9), TypeError); + assertArrayEq(['a', 'b', 'c'].map(env.getVariable, env), [1, 2, 3]); + assertArrayEq(['x', 'y', 'z'].map(env.getVariable, env), [7, 8, 6]); + + // The global lexical is the next thing after the module on the scope chain, + // followed by the global. + assertEq(env.parent.type, 'declarative'); + assertEq(env.parent.parent.type, 'object'); + assertEq(env.parent.parent.parent, null); +}; + +f = g2.eval( +` + // Set up a module to import from. + a = registerModule('a', parseModule( + \` + export var a = 1; + export let b = 2; + export const c = 3; + export function f(x) { return x + 1; } + \`)); + moduleLink(a); + moduleEvaluate(a); + + let m = parseModule( + \` + import { a, b, c } from 'a'; + var x = 4; + let y = 5; + const z = 6; + + eval(""); + debugger; + \`); + moduleLink(m); + moduleEvaluate(m); +`); diff --git a/js/src/jit-test/tests/modules/debugger-vars-function.js b/js/src/jit-test/tests/modules/debugger-vars-function.js new file mode 100644 index 0000000000..64ea177b0e --- /dev/null +++ b/js/src/jit-test/tests/modules/debugger-vars-function.js @@ -0,0 +1,30 @@ +// Test debugger access to aliased and unaliased bindings work correctly. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + let env = frame.environment.parent; + assertEq(env.getVariable('a'), 1); + assertEq(env.getVariable('b'), 2); + assertEq(env.getVariable('c'), 3); + assertEq(env.getVariable('d'), 4); + assertEq(env.getVariable('e'), 5); +}; + +g.eval( +` + let m = parseModule( + \` + var a = 1; + let b = 2; + export var c = 3; + export let d = 4; + let e = 5; + function f() { debugger; return e; } + \`); + moduleLink(m); + moduleEvaluate(m); +`); + diff --git a/js/src/jit-test/tests/modules/debugger-vars-toplevel.js b/js/src/jit-test/tests/modules/debugger-vars-toplevel.js new file mode 100644 index 0000000000..46a9940098 --- /dev/null +++ b/js/src/jit-test/tests/modules/debugger-vars-toplevel.js @@ -0,0 +1,31 @@ +// Test debugger access to aliased and unaliased bindings work correctly. + +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + let env = frame.environment; + assertEq(env.getVariable('a'), 1); + assertEq(env.getVariable('b'), 2); + assertEq(env.getVariable('c'), 3); + assertEq(env.getVariable('d'), 4); + assertEq(env.getVariable('e'), 5); +}; + +g.eval( +` + let m = parseModule( + \` + var a = 1; + let b = 2; + export var c = 3; + export let d = 4; + let e = 5; + function f() { return e; } + debugger; + \`); + moduleLink(m); + moduleEvaluate(m); +`); + diff --git a/js/src/jit-test/tests/modules/delete-import.js b/js/src/jit-test/tests/modules/delete-import.js new file mode 100644 index 0000000000..b76c028f6f --- /dev/null +++ b/js/src/jit-test/tests/modules/delete-import.js @@ -0,0 +1,3 @@ +// |jit-test| module; error: SyntaxError +import { a } from "module1.js"; +delete a; diff --git a/js/src/jit-test/tests/modules/delete-namespace-import.js b/js/src/jit-test/tests/modules/delete-namespace-import.js new file mode 100644 index 0000000000..4b5f2d1c9d --- /dev/null +++ b/js/src/jit-test/tests/modules/delete-namespace-import.js @@ -0,0 +1,3 @@ +// |jit-test| module; error: TypeError +import * as ns from "module1.js"; +delete ns.a; diff --git a/js/src/jit-test/tests/modules/delete-namespace.js b/js/src/jit-test/tests/modules/delete-namespace.js new file mode 100644 index 0000000000..ef23e2afcb --- /dev/null +++ b/js/src/jit-test/tests/modules/delete-namespace.js @@ -0,0 +1,3 @@ +// |jit-test| module; error: SyntaxError +import * as ns from "module1.js"; +delete ns; diff --git a/js/src/jit-test/tests/modules/duplicate-exports.js b/js/src/jit-test/tests/modules/duplicate-exports.js new file mode 100644 index 0000000000..7e45ac6f37 --- /dev/null +++ b/js/src/jit-test/tests/modules/duplicate-exports.js @@ -0,0 +1,32 @@ +// Test errors due to duplicate exports +load(libdir + "asserts.js"); + +function testSyntaxError(source) { + assertThrowsInstanceOf(function () { + parseModule(source); + }, SyntaxError); +} + +// SyntexError due to duplicate exports +testSyntaxError("export var v; export var v;"); +testSyntaxError("export var x, y, z; export var y;"); +testSyntaxError("export let v; var w; export {w as v};"); +testSyntaxError("export const v; var w; export {w as v};"); +testSyntaxError("export var v; let w; export {w as v};"); +testSyntaxError("export var v; const w; export {w as v};"); +testSyntaxError("export default 1; export default 2;"); +testSyntaxError("export default 1; export default function() {};"); +testSyntaxError("export default 1; export default function foo() {};"); +testSyntaxError("var v; export {v}; export {v};"); +testSyntaxError("var v, x; export {v}; export {x as v};"); +testSyntaxError("export default 1; export default export class { constructor() {} };"); +testSyntaxError("export default 1; export default export class foo { constructor() {} };"); + +// SyntaxError due to redeclared binding +testSyntaxError("export let v; export let v;"); +testSyntaxError("export let x, y, z; export let y;"); +testSyntaxError("export const v = 0; export const v = 0;"); +testSyntaxError("export const x = 0, y = 0, z = 0; export const y = 0;"); +testSyntaxError("export var v; export let v;"); +testSyntaxError("export var v; export const v = 0;"); +testSyntaxError("export let v; export const v;"); diff --git a/js/src/jit-test/tests/modules/duplicate-imports.js b/js/src/jit-test/tests/modules/duplicate-imports.js new file mode 100644 index 0000000000..fa87ba8ebd --- /dev/null +++ b/js/src/jit-test/tests/modules/duplicate-imports.js @@ -0,0 +1,27 @@ +// Test errors due to duplicate lexically declared names. + +load(libdir + "asserts.js"); + +function testNoError(source) { + parseModule(source); +} + +function testSyntaxError(source) { + assertThrowsInstanceOf(() => parseModule(source), SyntaxError); +} + +testNoError("import { a } from 'm';"); +testNoError("import { a as b } from 'm';"); +testNoError("import * as a from 'm';"); +testNoError("import a from 'm';"); + +testSyntaxError("import { a } from 'm'; let a = 1;"); +testSyntaxError("let a = 1; import { a } from 'm';"); +testSyntaxError("import { a } from 'm'; var a = 1;"); +testSyntaxError("var a = 1; import { a } from 'm';"); +testSyntaxError("import { a, b } from 'm'; const b = 1;"); +testSyntaxError("import { a } from 'm'; import { a } from 'm2';"); +testSyntaxError("import { a } from 'm'; import { b as a } from 'm2';"); +testSyntaxError("import { a } from 'm'; import * as a from 'm2';"); +testSyntaxError("import { a } from 'm'; import a from 'm2';"); + diff --git a/js/src/jit-test/tests/modules/dynamic-import-error.js b/js/src/jit-test/tests/modules/dynamic-import-error.js new file mode 100644 index 0000000000..98a6af75d0 --- /dev/null +++ b/js/src/jit-test/tests/modules/dynamic-import-error.js @@ -0,0 +1,14 @@ +// |jit-test| module + +let result = null; +let error = null; +let promise = import("nonexistent.js"); +promise.then((ns) => { + result = ns; +}).catch((e) => { + error = e; +}); + +drainJobQueue(); +assertEq(result, null); +assertEq(error instanceof Error, true); diff --git a/js/src/jit-test/tests/modules/dynamic-import-expression.js b/js/src/jit-test/tests/modules/dynamic-import-expression.js new file mode 100644 index 0000000000..2a02c774f4 --- /dev/null +++ b/js/src/jit-test/tests/modules/dynamic-import-expression.js @@ -0,0 +1,214 @@ +// |jit-test| --enable-import-attributes + +load(libdir + "match.js"); +load(libdir + "asserts.js"); + +var { Pattern, MatchError } = Match; + +program = (elts) => Pattern({ + type: "Program", + body: elts +}); +expressionStatement = (expression) => Pattern({ + type: "ExpressionStatement", + expression: expression +}); +assignmentExpression = (left, operator, right) => Pattern({ + type: "AssignmentExpression", + operator: operator, + left: left, + right: right +}); +ident = (name) => Pattern({ + type: "Identifier", + name: name +}); +importCall = (ident, args) => Pattern({ + type: "CallImport", + ident: ident, + arguments: args +}); + +objExpr = (elts) => Pattern({ + type: "ObjectExpression", + properties: elts +}); +property = (key, value) => Pattern({ + type: "Property", + kind: "init", + key: key, + value: value, +}); +lit = (val) => Pattern({ + type: "Literal", + value: val +}); +callExpression = (callee, args) => Pattern({ + type: "CallExpression", + callee: callee, + arguments: args +}); + +function parseAsClassicScript(source) +{ + return Reflect.parse(source); +} + +function parseAsModuleScript(source) +{ + return Reflect.parse(source, {target: "module"}); +} + +for (let parse of [parseAsModuleScript, parseAsClassicScript]) { + program([ + expressionStatement( + importCall( + ident("import"), + [ + ident("foo") + ] + ) + ) + ]).assert(parse("import(foo);")); + + program([ + expressionStatement( + assignmentExpression( + ident("x"), + "=", + importCall( + ident("import"), + [ + ident("foo") + ] + ) + ) + ) + ]).assert(parse("x = import(foo);")); + + if (getRealmConfiguration("importAttributes")) { + program([ + expressionStatement( + importCall( + ident("import"), + [ + ident("foo"), + objExpr([]) + ] + ) + ) + ]).assert(parse("import(foo, {});")); + + program([ + expressionStatement( + importCall( + ident("import"), + + [ + ident("foo"), + objExpr([ + property( + ident("assert"), + objExpr([] + )) + ]) + ] + + ) + ) + ]).assert(parse("import(foo, { assert: {} });")); + + program([ + expressionStatement( + importCall( + ident("import"), + [ + ident("foo"), + objExpr([ + property( + ident("assert"), + objExpr([ + property( + ident("type"), + lit('json') + ) + ] + )) + ]) + ] + ) + ) + ]).assert(parse("import(foo, { assert: { type: 'json' } });")); + + program([ + expressionStatement( + importCall( + ident("import"), + [ + ident("foo"), + objExpr([ + property( + ident("assert"), + objExpr([ + property( + ident("type"), + lit('json') + ), + property( + ident("foo"), + lit('bar') + ) + ] + )) + ]) + ] + ) + ) + ]).assert(parse("import(foo, { assert: { type: 'json', foo: 'bar' } });")); + + program([ + expressionStatement( + importCall( + ident("import"), + [ + ident("foo"), + objExpr([ + property( + ident("assert"), + objExpr([ + property( + ident("type"), + callExpression(ident('getType'), []) + ) + ] + )) + ]) + ] + ) + ) + ]).assert(parse("import(foo, { assert: { type: getType() } });")); + } +} + +function assertParseThrowsSyntaxError(source) +{ + assertThrowsInstanceOf(() => parseAsClassicScript(source), SyntaxError); + assertThrowsInstanceOf(() => parseAsModuleScript(source), SyntaxError); +} + +assertParseThrowsSyntaxError("import"); +assertParseThrowsSyntaxError("import("); +assertParseThrowsSyntaxError("import(1,"); +assertParseThrowsSyntaxError("x = import"); +assertParseThrowsSyntaxError("x = import("); +assertParseThrowsSyntaxError("x = import(1,"); +assertParseThrowsSyntaxError("x = import(1, 2"); + +if (!getRealmConfiguration("importAttributes")) { + assertParseThrowsSyntaxError("import(1, 2"); + assertParseThrowsSyntaxError("import(1, 2)"); + assertParseThrowsSyntaxError("x = import(1, 2)"); +} +else { + assertParseThrowsSyntaxError("import(1, 2, 3)"); +} diff --git a/js/src/jit-test/tests/modules/dynamic-import-ion.js b/js/src/jit-test/tests/modules/dynamic-import-ion.js new file mode 100644 index 0000000000..9c8f5e0e40 --- /dev/null +++ b/js/src/jit-test/tests/modules/dynamic-import-ion.js @@ -0,0 +1,16 @@ +// Even with --ion-eager, this needs to be run twice before it executes the +// ion-compiled version. +for (let i = 0; i < 2; i++) { + let result = null; + let error = null; + let promise = import("../../modules/module1.js"); + promise.then((ns) => { + result = ns; + }).catch((e) => { + error = e; + }); + + drainJobQueue(); + assertEq(error, null); + assertEq(result.a, 1); +} diff --git a/js/src/jit-test/tests/modules/dynamic-import-lazy.js b/js/src/jit-test/tests/modules/dynamic-import-lazy.js new file mode 100644 index 0000000000..ccbf90989d --- /dev/null +++ b/js/src/jit-test/tests/modules/dynamic-import-lazy.js @@ -0,0 +1,4 @@ +function lazyilyParsedFunction() +{ + return import("/module1.js"); +} diff --git a/js/src/jit-test/tests/modules/dynamic-import-module.js b/js/src/jit-test/tests/modules/dynamic-import-module.js new file mode 100644 index 0000000000..3c004258a3 --- /dev/null +++ b/js/src/jit-test/tests/modules/dynamic-import-module.js @@ -0,0 +1,39 @@ +// |jit-test| module + +function testImport(path, name, value) { + let result = null; + let error = null; + let promise = import(path); + promise.then((ns) => { + result = ns; + }).catch((e) => { + error = e; + }); + + drainJobQueue(); + assertEq(error, null); + assertEq(result[name], value); +} + +// Resolved via module load path. +testImport("module1.js", "a", 1); + +// Relative path resolved relative to this script. +testImport("../../modules/module1a.js", "a", 2); + +// Import inside function. +function f() { + testImport("../../modules/module2.js", "b", 2); +} +f(); + +// Import inside direct eval. +eval(`testImport("../../modules/module3.js", "c", 3)`); + +// Import inside indirect eval. +const indirect = eval; +const defineTestFunc = testImport.toString(); +indirect(defineTestFunc + `testImport("../../modules/module3.js");`); + +// Import inside dynamic function. +Function(defineTestFunc + `testImport("../../modules/module3.js");`)(); diff --git a/js/src/jit-test/tests/modules/dynamic-import-oom.js b/js/src/jit-test/tests/modules/dynamic-import-oom.js new file mode 100644 index 0000000000..9682c7560a --- /dev/null +++ b/js/src/jit-test/tests/modules/dynamic-import-oom.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this); --ion-offthread-compile=off +// +// Note: without --ion-offthread-compile=off this test takes a long time and +// may timeout on some platforms. See bug 1507721. + +ignoreUnhandledRejections(); + +oomTest(() => import("module1.js")); +oomTest(() => import("cyclicImport1.js")); diff --git a/js/src/jit-test/tests/modules/dynamic-import-script.js b/js/src/jit-test/tests/modules/dynamic-import-script.js new file mode 100644 index 0000000000..e6986a42ec --- /dev/null +++ b/js/src/jit-test/tests/modules/dynamic-import-script.js @@ -0,0 +1,45 @@ +function testImport(path, name, value) { + let result = null; + let error = null; + let promise = import(path); + promise.then((ns) => { + result = ns; + }).catch((e) => { + error = e; + }); + + drainJobQueue(); + assertEq(error, null); + assertEq(result[name], value); +} + +// Resolved via module load path. +testImport("module1.js", "a", 1); + +// Relative path resolved relative to this script. +testImport("../../modules/module1a.js", "a", 2); + +// Import inside function. +function f() { + testImport("../../modules/module2.js", "b", 2); +} +f(); + +// Import inside eval. +eval(`testImport("../../modules/module3.js", "c", 3)`); + +// Import inside indirect eval. +const indirect = eval; +const defineTestFunc = testImport.toString(); +indirect(defineTestFunc + `testImport("../../modules/module3.js");`); + +// Import inside dynamic function. +Function(defineTestFunc + `testImport("../../modules/module3.js");`)(); + +// Import in eval in promise handler. +let ran = false; +Promise + .resolve(`import("../../modules/module3.js").then(() => { ran = true; })`) + .then(eval) +drainJobQueue(); +assertEq(ran, true); diff --git a/js/src/jit-test/tests/modules/eval-module-oom.js b/js/src/jit-test/tests/modules/eval-module-oom.js new file mode 100644 index 0000000000..5587670735 --- /dev/null +++ b/js/src/jit-test/tests/modules/eval-module-oom.js @@ -0,0 +1,23 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// OOM tests for module parsing. + +const sa = +`export default 20; + export let a = 22; + export function f(x, y) { return x + y } +`; + +const sb = +`import x from "a"; + import { a as y } from "a"; + import * as ns from "a"; + ns.f(x, y); +`; + +oomTest(() => { + let a = registerModule('a', parseModule(sa)); + let b = registerModule('b', parseModule(sb)); + moduleLink(b); + assertEq(moduleEvaluate(b), 42); +}); diff --git a/js/src/jit-test/tests/modules/export-circular-nonexisting-binding.js b/js/src/jit-test/tests/modules/export-circular-nonexisting-binding.js new file mode 100644 index 0000000000..387c7c369a --- /dev/null +++ b/js/src/jit-test/tests/modules/export-circular-nonexisting-binding.js @@ -0,0 +1,3 @@ +// |jit-test| module; error:SyntaxError + +import "export-circular-nonexisting-binding-1.js"; diff --git a/js/src/jit-test/tests/modules/export-declaration.js b/js/src/jit-test/tests/modules/export-declaration.js new file mode 100644 index 0000000000..833f4d4c50 --- /dev/null +++ b/js/src/jit-test/tests/modules/export-declaration.js @@ -0,0 +1,569 @@ +// |jit-test| --enable-import-assertions + +load(libdir + "match.js"); +load(libdir + "asserts.js"); + +var { Pattern, MatchError } = Match; + +program = (elts) => Pattern({ + type: "Program", + body: elts +}) +exportDeclaration = (declaration, specifiers, moduleRequest, isDefault) => Pattern({ + type: "ExportDeclaration", + declaration: declaration, + specifiers: specifiers, + moduleRequest: moduleRequest, + isDefault: isDefault +}); +moduleRequest = (specifier, attributes) => Pattern({ + type: "ModuleRequest", + source: specifier, + attributes: attributes +}); +importAttribute = (key, value) => Pattern({ + type: "ImportAttribute", + key: key, + value : value +}); +exportSpecifier = (id, name) => Pattern({ + type: "ExportSpecifier", + id: id, + name: name +}); +exportBatchSpecifier = () => Pattern({ + type: "ExportBatchSpecifier" +}); +blockStatement = (body) => Pattern({ + type: "BlockStatement", + body: body +}); +functionDeclaration = (id, params, body) => Pattern({ + type: "FunctionDeclaration", + id: id, + params: params, + defaults: [], + body: body, + rest: null, + generator: false +}); +classDeclaration = (name) => Pattern({ + type: "ClassStatement", + id: name +}); +variableDeclaration = (decls) => Pattern({ + type: "VariableDeclaration", + kind: "var", + declarations: decls +}); +constDeclaration = (decls) => Pattern({ + type: "VariableDeclaration", + kind: "const", + declarations: decls +}); +letDeclaration = (decls) => Pattern({ + type: "VariableDeclaration", + kind: "let", + declarations: decls +}); +ident = (name) => Pattern({ + type: "Identifier", + name: name +}); +lit = (val) => Pattern({ + type: "Literal", + value: val +}); + +function parseAsModule(source) +{ + return Reflect.parse(source, {target: "module"}); +} + +program([ + exportDeclaration( + null, + [], + null, + false + ) +]).assert(parseAsModule("export {}")); + +program([ + letDeclaration([ + { + id: ident("a"), + init: lit(1) + } + ]), + exportDeclaration( + null, + [ + exportSpecifier( + ident("a"), + ident("a") + ) + ], + null, + false + ) +]).assert(parseAsModule("let a = 1; export { a }")); + +program([ + letDeclaration([ + { + id: ident("a"), + init: lit(1) + } + ]), + exportDeclaration( + null, + [ + exportSpecifier( + ident("a"), + ident("b") + ) + ], + null, + false + ) +]).assert(parseAsModule("let a = 1; export { a as b }")); + +program([ + letDeclaration([ + { + id: ident("as"), + init: lit(1) + } + ]), + exportDeclaration( + null, + [ + exportSpecifier( + ident("as"), + ident("as") + ) + ], + null, + false + ) +]).assert(parseAsModule("let as = 1; export { as as as }")); + +program([ + letDeclaration([ + { + id: ident("a"), + init: lit(1) + } + ]), + exportDeclaration( + null, + [ + exportSpecifier( + ident("a"), + ident("true") + ) + ], + null, + false + ) +]).assert(parseAsModule("let a = 1; export { a as true }")); + +program([ + letDeclaration([ + { + id: ident("a"), + init: lit(1) + }, + { + id: ident("b"), + init: lit(2) + } + ]), + exportDeclaration( + null, + [ + exportSpecifier( + ident("a"), + ident("a") + ), + exportSpecifier( + ident("b"), + ident("b") + ), + ], + null, + false + ) +]).assert(parseAsModule("let a = 1, b = 2; export { a, b }")); + +program([ + letDeclaration([ + { + id: ident("a"), + init: lit(1) + }, + { + id: ident("c"), + init: lit(2) + } + ]), + exportDeclaration( + null, + [ + exportSpecifier( + ident("a"), + ident("b") + ), + exportSpecifier( + ident("c"), + ident("d") + ), + ], + null, + false + ) +]).assert(parseAsModule("let a = 1, c = 2; export { a as b, c as d }")); + +program([ + exportDeclaration( + null, + [ + exportSpecifier( + ident("a"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [], + ), + false + ) +]).assert(parseAsModule("export { a } from 'b'")); + +program([ + exportDeclaration( + null, + [ + exportBatchSpecifier() + ], + moduleRequest( + lit("a"), + [], + ), + false + ) +]).assert(parseAsModule("export * from 'a'")); + +program([ + exportDeclaration( + functionDeclaration( + ident("f"), + [], + blockStatement([]) + ), + null, + null, + false + ) +]).assert(parseAsModule("export function f() {}")); + +program([ + exportDeclaration( + classDeclaration( + ident("Foo") + ), + null, + null, + false + ) +]).assert(parseAsModule("export class Foo { constructor() {} }")); + +program([ + exportDeclaration( + variableDeclaration([ + { + id: ident("a"), + init: lit(1) + }, { + id: ident("b"), + init: lit(2) + } + ]), + null, + null, + false + ) +]).assert(parseAsModule("export var a = 1, b = 2;")); + +program([ + exportDeclaration( + constDeclaration([ + { + id: ident("a"), + init: lit(1) + }, { + id: ident("b"), + init: lit(2) + } + ]), + null, + null, + false + ) +]).assert(parseAsModule("export const a = 1, b = 2;")); + +program([ + exportDeclaration( + letDeclaration([ + { + id: ident("a"), + init: lit(1) + }, { + id: ident("b"), + init: lit(2) + } + ]), + null, + null, + false + ) +]).assert(parseAsModule("export let a = 1, b = 2;")); + +program([ + exportDeclaration( + functionDeclaration( + ident("default"), + [], + blockStatement([]) + ), + null, + null, + true + ) +]).assert(parseAsModule("export default function() {}")); + +program([ + exportDeclaration( + functionDeclaration( + ident("foo"), + [], + blockStatement([]) + ), + null, + null, + true + ) +]).assert(parseAsModule("export default function foo() {}")); + +program([ + exportDeclaration( + classDeclaration( + ident("default") + ), + null, + null, + true + ) +]).assert(parseAsModule("export default class { constructor() {} }")); + +program([ + exportDeclaration( + classDeclaration( + ident("Foo") + ), + null, + null, + true + ) +]).assert(parseAsModule("export default class Foo { constructor() {} }")); + +program([ + exportDeclaration( + lit(1234), + null, + null, + true + ) +]).assert(parseAsModule("export default 1234")); + +if (getRealmConfiguration("importAttributes")) { + program([ + exportDeclaration( + null, + [ + exportSpecifier( + ident("a"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [ + importAttribute(ident('type'), lit('js')), + ] + ), + false + ) + ]).assert(parseAsModule("export { a } from 'b' assert { type: 'js' } ")); + + program([ + exportDeclaration( + null, + [ + exportSpecifier( + ident("a"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [ + importAttribute(ident('foo'), lit('bar')), + ], + ), + false + ) + ]).assert(parseAsModule("export { a } from 'b' assert { foo: 'bar', } ")); + + program([ + exportDeclaration( + null, + [ + exportSpecifier( + ident("a"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [ + importAttribute(ident('type'), lit('js')), + importAttribute(ident('foo'), lit('bar')), + importAttribute(ident('test'), lit('123')), + ] + ), + false + ) + ]).assert(parseAsModule("export { a } from 'b' assert { type: 'js', foo: 'bar', 'test': '123' } ")); + + assertThrowsInstanceOf(function () { + parseAsModule("export { a } from 'b' assert { type: type }"); + }, SyntaxError); +} + +assertThrowsInstanceOf(function () { + parseAsModule("export default 1234 5678"); +}, SyntaxError); + +var loc = parseAsModule("export { a as b } from 'c'", { + loc: true +}).body[0].loc; + +assertEq(loc.start.line, 1); +assertEq(loc.start.column, 1); +assertEq(loc.start.line, 1); +assertEq(loc.end.column, 27); + +assertThrowsInstanceOf(function () { + parseAsModule("function f() { export a }"); +}, SyntaxError); + +assertThrowsInstanceOf(function () { + parseAsModule("if (true) export a"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("export {"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("export {} from"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("export {,} from 'a'"); +}, SyntaxError); + +program([ + exportDeclaration( + null, + [ + exportSpecifier( + ident("true"), + ident("true") + ), + ], + moduleRequest( + lit("b"), + [], + ), + false + ) +]).assert(parseAsModule("export { true } from 'b'")); + +program([ + exportDeclaration( + null, + [ + exportSpecifier( + ident("true"), + ident("name") + ), + ], + moduleRequest( + lit("b"), + [], + ), + false + ) +]).assert(parseAsModule("export { true as name } from 'b'")); + +assertThrowsInstanceOf(function() { + parseAsModule("export { true }"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("export { true as name }"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("export { static }"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("export { static as name }"); +}, SyntaxError); + +assertThrowsInstanceOf(function () { + parseAsModule("export { name } from 'b' f();"); +}, SyntaxError); + +assertThrowsInstanceOf(function () { + parseAsModule("export *"); +}, SyntaxError); + +assertThrowsInstanceOf(function () { + parseAsModule("export * from 'b' f();"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("export {}\nfrom ()"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("function() {}"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("class() { constructor() {} }"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("export x"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("export foo = 5"); +}, SyntaxError); diff --git a/js/src/jit-test/tests/modules/export-destructuring.js b/js/src/jit-test/tests/modules/export-destructuring.js new file mode 100644 index 0000000000..8272097042 --- /dev/null +++ b/js/src/jit-test/tests/modules/export-destructuring.js @@ -0,0 +1,104 @@ +function assertArrayEq(value, expected) +{ + assertEq(value instanceof Array, true); + assertEq(value.length, expected.length); + for (let i = 0; i < value.length; i++) + assertEq(value[i], expected[i]); +} + +registerModule('a', parseModule(` + export const [] = []; + export const [a=0] = []; + export const [b] = [1]; + export const [c, d, e] = [2, 3, 4]; + export const [, f, g] = [5, 6, 7]; + export const [h,, i] = [8, 9, 10]; + export const [,, j] = [11, 12, 13]; + export const [...k] = [14, 15, 16]; + export const [l, ...m] = [17, 18, 19]; + export const [,, ...n] = [20, 21, 22]; +`)); + +m = parseModule(` + import * as a from 'a'; + + assertEq(a.a, 0); + assertEq(a.b, 1); + assertEq(a.c, 2); + assertEq(a.d, 3); + assertEq(a.e, 4); + assertEq(a.f, 6); + assertEq(a.g, 7); + assertEq(a.h, 8); + assertEq(a.i, 10); + assertEq(a.j, 13); + assertArrayEq(a.k, [14, 15, 16]); + assertEq(a.l, 17); + assertArrayEq(a.m, [18, 19]); + assertArrayEq(a.n, [22]); +`); + +moduleLink(m); +moduleEvaluate(m); + +registerModule('o', parseModule(` + export const {} = {}; + export const {x: a=0} = {}; + export const {x: b=0} = {x: 1}; + export const {c, d, e} = {c: 2, d: 3, e: 4}; + export const {x: f} = {x: 5}; + export const {g} = {}; + export const {h=6} = {}; +`)); + +m = parseModule(` + import * as o from 'o'; + + assertEq(o.a, 0); + assertEq(o.b, 1); + assertEq(o.c, 2); + assertEq(o.d, 3); + assertEq(o.e, 4); + assertEq(o.f, 5); + assertEq(o.g, undefined); + assertEq(o.h, 6); +`); + +moduleLink(m); +moduleEvaluate(m); + +registerModule('ao', parseModule(` + export const [{x: a}, {x: b}] = [{x: 1}, {x: 2}]; + export const [{c}, {d}] = [{c: 3}, {d: 4}]; + export const [,, {e}, ...f] = [5, 6, {e: 7}, 8, 9]; + + export const {x: [g, h, i]} = {x: [10, 11, 12]}; + + export const [[], [...j], [, k, l]] = [[], [13, 14], [15, 16, 17]]; + + export const {x: {m, n, o=20}, y: {z: p}} = {x: {m: 18, n: 19}, y: {z: 21}}; +`)); + +m = parseModule(` + import * as ao from 'ao'; + + assertEq(ao.a, 1); + assertEq(ao.b, 2); + assertEq(ao.c, 3); + assertEq(ao.d, 4); + assertEq(ao.e, 7); + assertArrayEq(ao.f, [8, 9]); + assertEq(ao.g, 10); + assertEq(ao.h, 11); + assertEq(ao.i, 12); + assertArrayEq(ao.j, [13, 14]); + assertEq(ao.k, 16); + assertEq(ao.l, 17); + assertEq(ao.m, 18); + assertEq(ao.n, 19); + assertEq(ao.o, 20); + assertEq(ao.p, 21); +`); + +moduleLink(m); +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/modules/export-entries.js b/js/src/jit-test/tests/modules/export-entries.js new file mode 100644 index 0000000000..bb0c50a69e --- /dev/null +++ b/js/src/jit-test/tests/modules/export-entries.js @@ -0,0 +1,130 @@ +// Test localExportEntries property + +function testObjectContents(actual, expected) { + for (var property in expected) { + if(actual[property] instanceof Object) { + testObjectContents(actual[property], expected[property]); + } + else { + assertEq(actual[property], expected[property]); + } + } +} + +function testArrayContents(actual, expected) { + assertEq(actual.length, expected.length); + for (var i = 0; i < actual.length; i++) { + testObjectContents(actual[i], expected[i]); + } +} + +function testLocalExportEntries(source, expected) { + var module = parseModule(source); + testArrayContents(module.localExportEntries, expected); +} + +testLocalExportEntries( + 'export var v;', + [{exportName: 'v', moduleRequest: null, importName: null, localName: 'v'}]); + +testLocalExportEntries( + 'export var v = 0;', + [{exportName: 'v', moduleRequest: null, importName: null, localName: 'v'}]); + +testLocalExportEntries( + 'export let x = 1;', + [{exportName: 'x', moduleRequest: null, importName: null, localName: 'x'}]); + +testLocalExportEntries( + 'export const x = 1;', + [{exportName: 'x', moduleRequest: null, importName: null, localName: 'x'}]); + +testLocalExportEntries( + 'export class foo { constructor() {} };', + [{exportName: 'foo', moduleRequest: null, importName: null, localName: 'foo'}]); + +testLocalExportEntries( + 'export default function f() {};', + [{exportName: 'default', moduleRequest: null, importName: null, localName: 'f'}]); + +testLocalExportEntries( + 'export default function() {};', + [{exportName: 'default', moduleRequest: null, importName: null, localName: 'default'}]); + +testLocalExportEntries( + 'export default 42;', + [{exportName: 'default', moduleRequest: null, importName: null, localName: 'default'}]); + +testLocalExportEntries( + 'let x = 1; export {x};', + [{exportName: 'x', moduleRequest: null, importName: null, localName: 'x'}]); + +testLocalExportEntries( + 'let v = 1; export {v as x};', + [{exportName: 'x', moduleRequest: null, importName: null, localName: 'v'}]); + +testLocalExportEntries( + 'export {x} from "mod";', + []); + +testLocalExportEntries( + 'export {v as x} from "mod";', + []); + +testLocalExportEntries( + 'export * from "mod";', + []); + +// Test indirectExportEntries property + +function testIndirectExportEntries(source, expected) { + var module = parseModule(source); + testArrayContents(module.indirectExportEntries, expected); +} + +testIndirectExportEntries( + 'export default function f() {};', + []); + +testIndirectExportEntries( + 'let x = 1; export {x};', + []); + +testIndirectExportEntries( + 'export {x} from "mod";', + [{exportName: 'x', moduleRequest: {specifier:'mod'}, importName: 'x', localName: null}]); + +testIndirectExportEntries( + 'export {v as x} from "mod";', + [{exportName: 'x', moduleRequest: {specifier:'mod'}, importName: 'v', localName: null}]); + +testIndirectExportEntries( + 'export * from "mod";', + []); + +testIndirectExportEntries( + 'import {v as x} from "mod"; export {x as y};', + [{exportName: 'y', moduleRequest: {specifier:'mod'}, importName: 'v', localName: null}]); + +// Test starExportEntries property + +function testStarExportEntries(source, expected) { + var module = parseModule(source); + testArrayContents(module.starExportEntries, expected); +} + +testStarExportEntries( + 'export default function f() {};', + []); + +testStarExportEntries( + 'let x = 1; export {x};', + []); + +testStarExportEntries( + 'export {x} from "mod";', + []); + +testStarExportEntries( + 'export * from "mod";', + [{exportName: null, moduleRequest: {specifier:'mod'}, importName: null, localName: null}]); diff --git a/js/src/jit-test/tests/modules/export-ns-from.js b/js/src/jit-test/tests/modules/export-ns-from.js new file mode 100644 index 0000000000..2e79d77f42 --- /dev/null +++ b/js/src/jit-test/tests/modules/export-ns-from.js @@ -0,0 +1,10 @@ +// |jit-test| module + +import { ns } from "export-ns.js"; + +load(libdir + 'asserts.js'); + +assertEq(isProxy(ns), true); +assertEq(ns.a, 1); +assertThrowsInstanceOf(function() { eval("delete ns"); }, SyntaxError); +assertThrowsInstanceOf(function() { ns = null; }, TypeError); diff --git a/js/src/jit-test/tests/modules/export-star-cannot-rescue-missing-export.js b/js/src/jit-test/tests/modules/export-star-cannot-rescue-missing-export.js new file mode 100644 index 0000000000..f87829d89b --- /dev/null +++ b/js/src/jit-test/tests/modules/export-star-cannot-rescue-missing-export.js @@ -0,0 +1,4 @@ +// |jit-test| module; error:SyntaxError + +export { a } from "empty.js"; +export* from "module1.js"; diff --git a/js/src/jit-test/tests/modules/export-star-circular-dependencies.js b/js/src/jit-test/tests/modules/export-star-circular-dependencies.js new file mode 100644 index 0000000000..9aa612f087 --- /dev/null +++ b/js/src/jit-test/tests/modules/export-star-circular-dependencies.js @@ -0,0 +1,6 @@ +// |jit-test| module + +import { x, y } from "export-star-circular-1.js"; + +assertEq(x, "pass"); +assertEq(y, "pass"); diff --git a/js/src/jit-test/tests/modules/function-redeclaration.js b/js/src/jit-test/tests/modules/function-redeclaration.js new file mode 100644 index 0000000000..b84704641d --- /dev/null +++ b/js/src/jit-test/tests/modules/function-redeclaration.js @@ -0,0 +1,94 @@ +load(libdir + "asserts.js"); + +var functionDeclarations = [ + "function f(){}", + "function* f(){}", + "async function f(){}", +]; + +var varDeclarations = [ + "var f", + "{ var f; }", + "for (var f in null);", + "for (var f of null);", + "for (var f; ;);", +]; + +var lexicalDeclarations = [ + "let f;", + "const f = 0;", + "class f {};", +]; + +var imports = [ + "import f from '';", + "import f, {} from '';", + "import d, {f} from '';", + "import d, {f as f} from '';", + "import d, {foo as f} from '';", + "import f, * as d from '';", + "import d, * as f from '';", + "import {f} from '';", + "import {f as f} from '';", + "import {foo as f} from '';", + "import* as f from '';", +]; + +var exports = [ + "export var f;", + ...functionDeclarations.map(fn => `export ${fn};`), + ...lexicalDeclarations.map(ld => `export ${ld};`), + ...functionDeclarations.map(fn => `export default ${fn};`), + "export default class f {};", +]; + +var redeclarations = [ + ...functionDeclarations, + ...varDeclarations, + ...lexicalDeclarations, + ...imports, + ...exports, +]; + +var noredeclarations = [ + ...functionDeclarations.map(fn => `{ ${fn} }`), + ...lexicalDeclarations.map(ld => `{ ${ld} }`), + ...["let", "const"].map(ld => `for (${ld} f in null);`), + ...["let", "const"].map(ld => `for (${ld} f of null);`), + ...["let", "const"].map(ld => `for (${ld} f = 0; ;);`), + "export {f};", + "export {f as f};", + "export {foo as f}; var foo;", + "export {f} from '';", + "export {f as f} from '';", + "export {foo as f} from '';", +]; + +for (var decl of functionDeclarations) { + for (var redecl of redeclarations) { + assertThrowsInstanceOf(() => { + parseModule(` + ${decl} + ${redecl} + `); + }, SyntaxError); + + assertThrowsInstanceOf(() => { + parseModule(` + ${redecl} + ${decl} + `); + }, SyntaxError); + } + + for (var redecl of noredeclarations) { + parseModule(` + ${decl} + ${redecl} + `); + parseModule(` + ${redecl} + ${decl} + `); + } +} diff --git a/js/src/jit-test/tests/modules/global-scope.js b/js/src/jit-test/tests/modules/global-scope.js new file mode 100644 index 0000000000..9b4b36bf42 --- /dev/null +++ b/js/src/jit-test/tests/modules/global-scope.js @@ -0,0 +1,35 @@ +// Test interaction with global object and global lexical scope. + +function evalModuleAndCheck(source, expected) { + let m = parseModule(source); + moduleLink(m); + moduleEvaluate(m); + assertEq(getModuleEnvironmentValue(m, "r"), expected); +} + +var x = 1; +evalModuleAndCheck("export let r = x; x = 2;", 1); +assertEq(x, 2); + +let y = 3; +evalModuleAndCheck("export let r = y; y = 4;", 3); +assertEq(y, 4); + +if (helperThreadCount() == 0) + quit(); + +function offThreadEvalModuleAndCheck(source, expected) { + offThreadCompileModuleToStencil(source); + let stencil = finishOffThreadStencil(); + let m = instantiateModuleStencil(stencil); + print("compiled"); + moduleLink(m); + moduleEvaluate(m); + assertEq(getModuleEnvironmentValue(m, "r"), expected); +} + +offThreadEvalModuleAndCheck("export let r = x; x = 5;", 2); +assertEq(x, 5); + +offThreadEvalModuleAndCheck("export let r = y; y = 6;", 4); +assertEq(y, 6); diff --git a/js/src/jit-test/tests/modules/import-declaration.js b/js/src/jit-test/tests/modules/import-declaration.js new file mode 100644 index 0000000000..976386bc5b --- /dev/null +++ b/js/src/jit-test/tests/modules/import-declaration.js @@ -0,0 +1,523 @@ +// |jit-test| --enable-import-assertions + +load(libdir + "match.js"); +load(libdir + "asserts.js"); + +var { Pattern, MatchError } = Match; + +program = (elts) => Pattern({ + type: "Program", + body: elts +}) +importDeclaration = (specifiers, source) => Pattern({ + type: "ImportDeclaration", + specifiers: specifiers, + moduleRequest: source +}); +importSpecifier = (id, name) => Pattern({ + type: "ImportSpecifier", + id: id, + name: name +}); +moduleRequest = (specifier, attributes) => Pattern({ + type: "ModuleRequest", + source: specifier, + attributes: attributes +}); +importAttribute = (key, value) => Pattern({ + type: "ImportAttribute", + key: key, + value : value +}); +importNamespaceSpecifier = (name) => Pattern({ + type: "ImportNamespaceSpecifier", + name: name +}); +ident = (name) => Pattern({ + type: "Identifier", + name: name +}) +lit = (val) => Pattern({ + type: "Literal", + value: val +}) + +function parseAsModule(source) +{ + return Reflect.parse(source, {target: "module"}); +} + +program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [] + ) + ) +]).assert(parseAsModule("import a from 'b'")); + +program([ + importDeclaration( + [ + importNamespaceSpecifier( + ident("a") + ) + ], + moduleRequest( + lit("b"), + [] + ) + ) +]).assert(parseAsModule("import * as a from 'b'")); + +program([ + importDeclaration( + [], + moduleRequest( + lit("a"), + [] + ) + ) +]).assert(parseAsModule("import {} from 'a'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("a"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [] + ) + ) +]).assert(parseAsModule("import { a } from 'b'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("a"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [] + ) + ) +]).assert(parseAsModule("import { a, } from 'b'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("a"), + ident("b") + ) + ], + moduleRequest( + lit("c"), + [] + ) + ) +]).assert(parseAsModule("import { a as b } from 'c'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("as"), + ident("as") + ) + ], + moduleRequest( + lit("a"), + [] + ) + ) +]).assert(parseAsModule("import { as as as } from 'a'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("a") + ), + importNamespaceSpecifier( + ident("b") + ) + ], + moduleRequest( + lit("c"), + [] + ) + ) +]).assert(parseAsModule("import a, * as b from 'c'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("d") + ) + ], + moduleRequest( + lit("a"), + [] + ) + ) +]).assert(parseAsModule("import d, {} from 'a'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("d") + ), + importSpecifier( + ident("a"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [] + ) + ) +]).assert(parseAsModule("import d, { a } from 'b'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("d") + ), + importSpecifier( + ident("a"), + ident("b") + ) + ], + moduleRequest( + lit("c"), + [] + ) + ) +]).assert(parseAsModule("import d, { a as b } from 'c'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("d") + ), + importSpecifier( + ident("a"), + ident("a") + ), + importSpecifier( + ident("b"), + ident("b") + ), + ], + moduleRequest( + lit("c"), + [] + ) + ) +]).assert(parseAsModule("import d, { a, b } from 'c'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("d") + ), + importSpecifier( + ident("a"), + ident("b") + ), + importSpecifier( + ident("c"), + ident("f") + ), + ], + moduleRequest( + lit("e"), + [] + ) + ) +]).assert(parseAsModule("import d, { a as b, c as f } from 'e'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("true"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [] + ) + ) +]).assert(parseAsModule("import { true as a } from 'b'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("a"), + ident("a") + ), + importSpecifier( + ident("b"), + ident("b") + ), + ], + moduleRequest( + lit("c"), + [] + ) + ) +]).assert(parseAsModule("import { a, b } from 'c'")); + +program([ + importDeclaration( + [ + importSpecifier( + ident("a"), + ident("b") + ), + importSpecifier( + ident("c"), + ident("d") + ), + ], + moduleRequest( + lit("e"), + [] + ) + ) +]).assert(parseAsModule("import { a as b, c as d } from 'e'")); + +program([ + importDeclaration( + [], + moduleRequest( + lit("a"), + [] + ) + ) +]).assert(parseAsModule("import 'a'")); + +if (getRealmConfiguration("importAttributes")) { + program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [] + ) + ) + ]).assert(parseAsModule("import a from 'b' assert {}")); + + program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [ + importAttribute(ident('type'), lit('js')), + ] + ) + ) + ]).assert(parseAsModule("import a from 'b' assert { type: 'js' }")); + + program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [ + importAttribute(ident('foo'), lit('bar')), + ] + ) + ) + ]).assert(parseAsModule("import a from 'b' assert { foo: 'bar' }")); + + program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [ + importAttribute(ident('foo'), lit('bar')), + ] + ) + ) + ]).assert(parseAsModule(`import a from 'b' with { foo: 'bar' }`)); + + // `assert` has NLTH but `with` doesn't + program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [ + importAttribute(ident('foo'), lit('bar')), + ] + ) + ) + ]).assert(parseAsModule(`import a from 'b' + with { foo: 'bar' }`)); + + program([ + importDeclaration( + [ + importSpecifier( + ident("default"), + ident("a") + ) + ], + moduleRequest( + lit("b"), + [ + importAttribute(ident('type'), lit('js')), + importAttribute(ident('foo'), lit('bar')), + ] + ) + ) + ]).assert(parseAsModule("import a from 'b' assert { type: 'js', foo: 'bar' }")); + + assertThrowsInstanceOf(function () { + parseAsModule("import a from 'b' assert { type: type }"); + }, SyntaxError); + + assertThrowsInstanceOf(function () { + // No newline allowed as assert. + parseAsModule(`import foo from "foo" + assert {type: 'js' }`); + }, SyntaxError); +} + +var loc = parseAsModule("import { a as b } from 'c'", { + loc: true +}).body[0].loc; + +assertEq(loc.start.line, 1); +assertEq(loc.start.column, 1); +assertEq(loc.start.line, 1); +assertEq(loc.end.column, 27); + +assertThrowsInstanceOf(function () { + parseAsModule("function f() { import a from 'b' }"); +}, SyntaxError); + +assertThrowsInstanceOf(function () { + parseAsModule("if (true) import a from 'b'"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import {"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import {}"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import {} from"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import {,} from 'a'"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import { a as true } from 'b'"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import { true } from 'a'"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import a,"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import a, b from 'a'"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import * as a,"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import * as a, {} from 'a'"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import as a from 'a'"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import * a from 'a'"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import * as from 'a'"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import , {} from 'a'"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import d, from 'a'"); +}, SyntaxError); + +assertThrowsInstanceOf(function() { + parseAsModule("import * as true from 'b'"); +}, SyntaxError); diff --git a/js/src/jit-test/tests/modules/import-default-async-asi.js b/js/src/jit-test/tests/modules/import-default-async-asi.js new file mode 100644 index 0000000000..96a4ea155f --- /dev/null +++ b/js/src/jit-test/tests/modules/import-default-async-asi.js @@ -0,0 +1,7 @@ +// |jit-test| module + +import v from "export-default-async-asi.js"; + +assertEq(typeof v, "function"); +assertEq(v.name, "async"); +assertEq(v(), 17); diff --git a/js/src/jit-test/tests/modules/import-default-async-regexpy.js b/js/src/jit-test/tests/modules/import-default-async-regexpy.js new file mode 100644 index 0000000000..10a769cf2c --- /dev/null +++ b/js/src/jit-test/tests/modules/import-default-async-regexpy.js @@ -0,0 +1,5 @@ +// |jit-test| module + +import v from "export-default-async-regexpy.js"; + +assertEq(v, 7); diff --git a/js/src/jit-test/tests/modules/import-default-class.js b/js/src/jit-test/tests/modules/import-default-class.js new file mode 100644 index 0000000000..ff87649ac6 --- /dev/null +++ b/js/src/jit-test/tests/modules/import-default-class.js @@ -0,0 +1,5 @@ +// |jit-test| module + +import c from "defaultClass.js"; +let o = new c(); +assertEq(o.triple(14), 42); diff --git a/js/src/jit-test/tests/modules/import-default-function.js b/js/src/jit-test/tests/modules/import-default-function.js new file mode 100644 index 0000000000..95e962448f --- /dev/null +++ b/js/src/jit-test/tests/modules/import-default-function.js @@ -0,0 +1,4 @@ +// |jit-test| module + +import f from "defaultFunction.js"; +assertEq(f(21), 42); diff --git a/js/src/jit-test/tests/modules/import-entries.js b/js/src/jit-test/tests/modules/import-entries.js new file mode 100644 index 0000000000..e20d4e119b --- /dev/null +++ b/js/src/jit-test/tests/modules/import-entries.js @@ -0,0 +1,87 @@ +// |jit-test| --enable-import-assertions + +// Test importEntries property + +function assertionEq(actual, expected) { + var actualAssertions = actual['assertions']; + var expectedAssertions = expected['assertions']; + + if(actualAssertions === null) { + return expectedAssertions === actualAssertions + } + + if(actualAssertions.length !== expectedAssertions.length) { + return false; + } + + for (var i = 0; i < expected.length; i++) { + if(expected[i].type !== actual[i].type) { + return false; + } + } + + return true; +} + +function importEntryEq(a, b) { + var r1 = a['moduleRequest']['specifier'] === b['moduleRequest']['specifier'] && + a['importName'] === b['importName'] && + a['localName'] === b['localName']; + + return r1 && assertionEq(a['moduleRequest'], b['moduleRequest']); +} + +function findImportEntry(array, target) +{ + for (let i = 0; i < array.length; i++) { + if (importEntryEq(array[i], target)) + return i; + } + return -1; +} + +function testImportEntries(source, expected) { + var module = parseModule(source); + var actual = module.importEntries.slice(0); + assertEq(actual.length, expected.length); + for (var i = 0; i < expected.length; i++) { + let index = findImportEntry(actual, expected[i]); + assertEq(index >= 0, true); + actual.splice(index, 1); + } +} + +testImportEntries('', []); + +testImportEntries('import v from "mod";', + [{moduleRequest: {specifier: 'mod', assertions: null}, importName: 'default', localName: 'v'}]); + +testImportEntries('import * as ns from "mod";', + [{moduleRequest: {specifier: 'mod', assertions: null}, importName: null, localName: 'ns'}]); + +testImportEntries('import {x} from "mod";', + [{moduleRequest: {specifier: 'mod', assertions: null}, importName: 'x', localName: 'x'}]); + +testImportEntries('import {x as v} from "mod";', + [{moduleRequest: {specifier: 'mod', assertions: null}, importName: 'x', localName: 'v'}]); + +testImportEntries('import "mod";', + []); + +testImportEntries('import {x} from "a"; import {y} from "b";', + [{moduleRequest: {specifier: 'a', assertions: null}, importName: 'x', localName: 'x'}, + {moduleRequest: {specifier: 'b', assertions: null}, importName: 'y', localName: 'y'}]); + +if (getRealmConfiguration("importAttributes")) { + testImportEntries('import v from "mod" assert {};', + [{moduleRequest: {specifier: 'mod', assertions: null}, importName: 'default', localName: 'v'}]); + + testImportEntries('import v from "mod" assert { type: "js"};', + [{moduleRequest: {specifier: 'mod', assertions: [{ type: 'js'}]}, importName: 'default', localName: 'v'}]); + + testImportEntries('import {x} from "mod" assert { type: "js"};', + [{moduleRequest: {specifier: 'mod', assertions: [{ type: 'js'}]}, importName: 'x', localName: 'x'}]); + + testImportEntries('import {x as v} from "mod" assert { type: "js"};', + [{moduleRequest: {specifier: 'mod', assertions: [{ type: 'js'}]}, importName: 'x', localName: 'v'}]); +} diff --git a/js/src/jit-test/tests/modules/import-in-lazy-function.js b/js/src/jit-test/tests/modules/import-in-lazy-function.js new file mode 100644 index 0000000000..cddacb1428 --- /dev/null +++ b/js/src/jit-test/tests/modules/import-in-lazy-function.js @@ -0,0 +1,11 @@ +// |jit-test| module + +// Test that accessing imports in lazily parsed functions works. + +import { a } from "module1.js"; + +function add1(x) { + return x + a; +} + +assertEq(add1(2), 3); diff --git a/js/src/jit-test/tests/modules/import-meta-expression.js b/js/src/jit-test/tests/modules/import-meta-expression.js new file mode 100644 index 0000000000..e7562afaed --- /dev/null +++ b/js/src/jit-test/tests/modules/import-meta-expression.js @@ -0,0 +1,91 @@ +load(libdir + "match.js"); +load(libdir + "asserts.js"); + +var { Pattern, MatchError } = Match; + +program = (elts) => Pattern({ + type: "Program", + body: elts +}); +expressionStatement = (expression) => Pattern({ + type: "ExpressionStatement", + expression: expression +}); +assignmentExpression = (left, operator, right) => Pattern({ + type: "AssignmentExpression", + operator: operator, + left: left, + right: right +}); +ident = (name) => Pattern({ + type: "Identifier", + name: name +}); +metaProperty = (meta, property) => Pattern({ + type: "MetaProperty", + meta: meta, + property: property +}); +memberExpression = (object, property) => Pattern({ + type: "MemberExpression", + object: object, + property: property +}); + +function parseAsModule(source) +{ + return Reflect.parse(source, {target: "module"}); +} + +program([ + expressionStatement( + metaProperty( + ident("import"), + ident("meta") + ) + ) +]).assert(parseAsModule("import.meta;")); + +program([ + expressionStatement( + assignmentExpression( + ident("x"), + "=", + metaProperty( + ident("import"), + ident("meta") + ) + ) + ) +]).assert(parseAsModule("x = import.meta;")); + +program([ + expressionStatement( + assignmentExpression( + memberExpression( + metaProperty( + ident("import"), + ident("meta") + ), + ident("foo") + ), + "=", + ident("x"), + ) + ) +]).assert(parseAsModule("import.meta.foo = x;")); + +function assertModuleParseThrowsSyntaxError(source) +{ + assertThrowsInstanceOf(() => parseAsModule(source), SyntaxError); +} + +assertModuleParseThrowsSyntaxError("import"); +assertModuleParseThrowsSyntaxError("import."); +assertModuleParseThrowsSyntaxError("import.met"); +assertModuleParseThrowsSyntaxError("import.metaa"); +assertModuleParseThrowsSyntaxError("x = import"); +assertModuleParseThrowsSyntaxError("x = import."); +assertModuleParseThrowsSyntaxError("x = import.met"); +assertModuleParseThrowsSyntaxError("x = import.metaa"); +assertModuleParseThrowsSyntaxError("import.meta = x"); diff --git a/js/src/jit-test/tests/modules/import-meta-oom.js b/js/src/jit-test/tests/modules/import-meta-oom.js new file mode 100644 index 0000000000..168f1102a1 --- /dev/null +++ b/js/src/jit-test/tests/modules/import-meta-oom.js @@ -0,0 +1,3 @@ +// |jit-test| module; skip-if: !('oomTest' in this) + +oomTest(() => import.meta); diff --git a/js/src/jit-test/tests/modules/import-meta.js b/js/src/jit-test/tests/modules/import-meta.js new file mode 100644 index 0000000000..98697fa2e1 --- /dev/null +++ b/js/src/jit-test/tests/modules/import-meta.js @@ -0,0 +1,67 @@ +// |jit-test| module + +// import.meta is an object. +assertEq(typeof import.meta, "object"); +assertEq(import.meta !== null, true); + +// import.meta always returns the same object. +let obj = import.meta; +assertEq(import.meta, obj); + +// Test calling from lazily compile function. +function get() { + return import.meta; +} +assertEq(get(), import.meta); + +// import.meta.url: This property will contain the module script's base URL, +// serialized. + +assertEq("url" in import.meta, true); +assertEq(import.meta.url.endsWith("import-meta.js"), true); + +assertEq("resolve" in import.meta, true); + +assertEq(import.meta.resolve("./x"), + import.meta.url.replace("import-meta.js", "x")); + +import getOtherMetaObject from "exportImportMeta.js"; + +let otherImportMeta = getOtherMetaObject(); +assertEq(otherImportMeta.url.endsWith("exportImportMeta.js"), true); + +// By default the import.meta object will be extensible, and its properties will +// be writable, configurable, and enumerable. + +assertEq(Object.isExtensible(import.meta), true); + +for (const name of Reflect.ownKeys(import.meta)) { + const desc = Object.getOwnPropertyDescriptor(import.meta, name); + assertEq(desc.writable, true); + assertEq(desc.enumerable, true); + assertEq(desc.configurable, true); + assertEq(desc.value, import.meta[name]); +} + +// The import.meta object's prototype is null. +assertEq(Object.getPrototypeOf(import.meta), null); + +import.meta.url = 0; +assertEq(import.meta.url, 0); + +import.meta.newProp = 42; +assertEq(import.meta.newProp, 42); + +let found = new Set(Reflect.ownKeys(import.meta)); + +assertEq(found.size, 3); +assertEq(found.has("url"), true); +assertEq(found.has("newProp"), true); +assertEq(found.has("resolve"), true); + +delete import.meta.url; +delete import.meta.newProp; +delete import.meta.resolve; + +found = new Set(Reflect.ownKeys(import.meta)); +assertEq(found.size, 0); diff --git a/js/src/jit-test/tests/modules/import-namespace.js b/js/src/jit-test/tests/modules/import-namespace.js new file mode 100644 index 0000000000..c6c86090bf --- /dev/null +++ b/js/src/jit-test/tests/modules/import-namespace.js @@ -0,0 +1,114 @@ +// |jit-test| +// Test importing module namespaces + +"use strict"; + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +function parseAndEvaluate(source) { + let m = parseModule(source); + moduleLink(m); + return moduleEvaluate(m); +} + +function testHasNames(names, expected) { + assertEq(names.length, expected.length); + expected.forEach(function(name) { + assertEq(names.includes(name), true); + }); +} + +function testEqualArrays(actual, expected) { + assertEq(Array.isArray(actual), true); + assertEq(Array.isArray(expected), true); + assertEq(actual.length, expected.length); + for (let i = 0; i < expected.length; i++) { + assertEq(actual[i], expected[i]); + } +} + +let a = registerModule('a', parseModule( + `// Reflection methods should return these exports alphabetically sorted. + export var b = 2; + export var a = 1;` +)); + +let b = registerModule('b', parseModule( + `import * as ns from 'a'; + export { ns }; + export var x = ns.a + ns.b;` +)); + +moduleLink(b); +moduleEvaluate(b); +testHasNames(getModuleEnvironmentNames(b), ["ns", "x"]); +let ns = getModuleEnvironmentValue(b, "ns"); +testHasNames(Object.keys(ns), ["a", "b"]); +assertEq(ns.a, 1); +assertEq(ns.b, 2); +assertEq(ns.c, undefined); +assertEq(getModuleEnvironmentValue(b, "x"), 3); + +// Test module namespace internal methods as defined in 9.4.6 +assertEq(Object.getPrototypeOf(ns), null); +assertEq(Reflect.setPrototypeOf(ns, null), true); +assertEq(Reflect.setPrototypeOf(ns, Object.prototype), false); +assertThrowsInstanceOf(() => Object.setPrototypeOf(ns, {}), TypeError); +assertThrowsInstanceOf(function() { ns.foo = 1; }, TypeError); +assertEq(Object.isExtensible(ns), false); +Object.preventExtensions(ns); +let desc = Object.getOwnPropertyDescriptor(ns, "a"); +assertEq(desc.value, 1); +assertEq(desc.writable, true); +assertEq(desc.enumerable, true); +assertEq(desc.configurable, false); +assertEq(typeof desc.get, "undefined"); +assertEq(typeof desc.set, "undefined"); +assertThrowsInstanceOf(function() { ns.a = 1; }, TypeError); +delete ns.foo; +assertThrowsInstanceOf(function() { delete ns.a; }, TypeError); + +// Test @@toStringTag property +desc = Object.getOwnPropertyDescriptor(ns, Symbol.toStringTag); +assertEq(desc.value, "Module"); +assertEq(desc.writable, false); +assertEq(desc.enumerable, false); +assertEq(desc.configurable, false); +assertEq(typeof desc.get, "undefined"); +assertEq(typeof desc.set, "undefined"); +assertEq(Object.prototype.toString.call(ns), "[object Module]"); + +// Test [[OwnPropertyKeys]] internal method. +testEqualArrays(Reflect.ownKeys(ns), ["a", "b", Symbol.toStringTag]); +testEqualArrays(Object.getOwnPropertyNames(ns), ["a", "b"]); +testEqualArrays(Object.getOwnPropertySymbols(ns), [Symbol.toStringTag]); + +// Test cyclic namespace import and access in module evaluation. +let c = registerModule('c', + parseModule("export let c = 1; import * as ns from 'd'; let d = ns.d;")); +let d = registerModule('d', + parseModule("export let d = 2; import * as ns from 'c'; let c = ns.c;")); +moduleLink(c); +moduleLink(d); +moduleEvaluate(c) + .then(r => { + // We expect the evaluation to throw, so we should not reach this. + assertEq(false, true) + }) + .catch(e => { + assertEq(e instanceof ReferenceError, true) + }); + +// Test cyclic namespace import. +let e = registerModule('e', + parseModule("export let e = 1; import * as ns from 'f'; export function f() { return ns.f }")); +let f = registerModule('f', + parseModule("export let f = 2; import * as ns from 'e'; export function e() { return ns.e }")); +moduleLink(e); +moduleLink(f); +moduleEvaluate(e); +moduleEvaluate(f); +assertEq(e.namespace.f(), 2); +assertEq(f.namespace.e(), 1); +drainJobQueue(); diff --git a/js/src/jit-test/tests/modules/import-not-found.js b/js/src/jit-test/tests/modules/import-not-found.js new file mode 100644 index 0000000000..05e6e1e8d5 --- /dev/null +++ b/js/src/jit-test/tests/modules/import-not-found.js @@ -0,0 +1,2 @@ +// |jit-test| module; error: SyntaxError +import { foo } from "module1.js"; diff --git a/js/src/jit-test/tests/modules/inline-data.js b/js/src/jit-test/tests/modules/inline-data.js new file mode 100644 index 0000000000..9c56856f8d --- /dev/null +++ b/js/src/jit-test/tests/modules/inline-data.js @@ -0,0 +1,17 @@ +// |jit-test| module + +import { a } from "javascript: export let a = 42;"; +assertEq(a, 42); + +let result = null; +let error = null; +let promise = import("javascript: export let b = 100;"); +promise.then((ns) => { + result = ns; +}).catch((e) => { + error = e; +}); + +drainJobQueue(); +assertEq(error, null); +assertEq(result.b, 100); diff --git a/js/src/jit-test/tests/modules/instanceof-error-message.js b/js/src/jit-test/tests/modules/instanceof-error-message.js new file mode 100644 index 0000000000..d78eb333b3 --- /dev/null +++ b/js/src/jit-test/tests/modules/instanceof-error-message.js @@ -0,0 +1,14 @@ +function getInstanceOfErrorMessage(x) { + try { + var result = {} instanceof x; + } + catch (e) { + return e.message; + } +} + +// Error message for a Module Namespace Exotic Object should be same as normal +// non-callable when using 'instanceof' +import('empty.js').then( + m => assertEq(getInstanceOfErrorMessage(m), + getInstanceOfErrorMessage({}))); diff --git a/js/src/jit-test/tests/modules/let-tdz.js b/js/src/jit-test/tests/modules/let-tdz.js new file mode 100644 index 0000000000..b426794340 --- /dev/null +++ b/js/src/jit-test/tests/modules/let-tdz.js @@ -0,0 +1,3 @@ +// |jit-test| module; error:ReferenceError +foo = 1; +let foo; diff --git a/js/src/jit-test/tests/modules/many-exports.js b/js/src/jit-test/tests/modules/many-exports.js new file mode 100644 index 0000000000..a573f05ef3 --- /dev/null +++ b/js/src/jit-test/tests/modules/many-exports.js @@ -0,0 +1,17 @@ +// Test many exports. + +const count = 1024; + +let s = ""; +for (let i = 0; i < count; i++) + s += "export let e" + i + " = " + (i * i) + ";\n"; +let a = registerModule('a', parseModule(s)); + +let b = registerModule('b', parseModule("import * as ns from 'a'")); + +moduleLink(b); +moduleEvaluate(b); + +let ns = a.namespace; +for (let i = 0; i < count; i++) + assertEq(ns["e" + i], i * i); diff --git a/js/src/jit-test/tests/modules/many-imports.js b/js/src/jit-test/tests/modules/many-imports.js new file mode 100644 index 0000000000..9106c6ce85 --- /dev/null +++ b/js/src/jit-test/tests/modules/many-imports.js @@ -0,0 +1,15 @@ +// Test importing an import many times. + +const count = 1024; + +let a = registerModule('a', parseModule("export let a = 1;")); + +let s = ""; +for (let i = 0; i < count; i++) { + s += "import { a as i" + i + " } from 'a';\n"; + s += "assertEq(i" + i + ", 1);\n"; +} +let b = registerModule('b', parseModule(s)); + +moduleLink(b); +moduleEvaluate(b); diff --git a/js/src/jit-test/tests/modules/many-namespace-imports.js b/js/src/jit-test/tests/modules/many-namespace-imports.js new file mode 100644 index 0000000000..df361c7b91 --- /dev/null +++ b/js/src/jit-test/tests/modules/many-namespace-imports.js @@ -0,0 +1,15 @@ +// Test importing a namespace many times. + +const count = 1024; + +let a = registerModule('a', parseModule("export let a = 1;")); + +let s = ""; +for (let i = 0; i < count; i++) { + s += "import * as ns" + i + " from 'a';\n"; + s += "assertEq(ns" + i + ".a, 1);\n"; +} +let b = registerModule('b', parseModule(s)); + +moduleLink(b); +moduleEvaluate(b); diff --git a/js/src/jit-test/tests/modules/missing-export-offthread.js b/js/src/jit-test/tests/modules/missing-export-offthread.js new file mode 100644 index 0000000000..2dca5c8705 --- /dev/null +++ b/js/src/jit-test/tests/modules/missing-export-offthread.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +load(libdir + "asserts.js") + +// Don't assert. +offThreadCompileModuleToStencil("export { x };"); +assertThrowsInstanceOf(() => { + var stencil = finishOffThreadStencil(); + instantiateModuleStencil(stencil); +}, SyntaxError); diff --git a/js/src/jit-test/tests/modules/missing-indirect-export.js b/js/src/jit-test/tests/modules/missing-indirect-export.js new file mode 100644 index 0000000000..207e49ba05 --- /dev/null +++ b/js/src/jit-test/tests/modules/missing-indirect-export.js @@ -0,0 +1,2 @@ +// |jit-test| module; error: SyntaxError +export { foo } from "module1.js"; diff --git a/js/src/jit-test/tests/modules/module-declaration-instantiation.js b/js/src/jit-test/tests/modules/module-declaration-instantiation.js new file mode 100644 index 0000000000..43d66a7f6f --- /dev/null +++ b/js/src/jit-test/tests/modules/module-declaration-instantiation.js @@ -0,0 +1,37 @@ +// Exercise ModuleDeclarationInstantiation() operation. + +function testModuleEnvironment(module, expected) { + var actual = getModuleEnvironmentNames(module).sort(); + assertEq(actual.length, expected.length); + for (var i = 0; i < actual.length; i++) { + assertEq(actual[i], expected[i]); + } +} + +// Check the environment of an empty module. +let m = parseModule(""); +moduleLink(m); +testModuleEnvironment(m, []); + +let a = registerModule('a', parseModule("var x = 1; export { x };")); +let b = registerModule('b', parseModule("import { x as y } from 'a';")); + +moduleLink(a); +moduleLink(b); + +testModuleEnvironment(a, ['x']); +testModuleEnvironment(b, ['y']); + +// Function bindings are initialized as well as instantiated. +let c = parseModule(`function a(x) { return x; } + function b(x) { return x + 1; } + function c(x) { return x + 2; } + function d(x) { return x + 3; }`); +const names = ['a', 'b', 'c', 'd']; +testModuleEnvironment(c, names); +names.forEach((n) => assertEq(typeof getModuleEnvironmentValue(c, n), "undefined")); +moduleLink(c); +for (let i = 0; i < names.length; i++) { + let f = getModuleEnvironmentValue(c, names[i]); + assertEq(f(21), 21 + i); +} diff --git a/js/src/jit-test/tests/modules/module-environment.js b/js/src/jit-test/tests/modules/module-environment.js new file mode 100644 index 0000000000..fc526cfdd7 --- /dev/null +++ b/js/src/jit-test/tests/modules/module-environment.js @@ -0,0 +1,34 @@ +// Test top-level module environment + +function testInitialEnvironment(source, expected) { + let module = parseModule(source); + let names = getModuleEnvironmentNames(module); + assertEq(names.length, expected.length); + expected.forEach(function(name) { + assertEq(names.includes(name), true); + }); +} + +// Non-exported bindings: only top-level functions are present in the +// environment. +testInitialEnvironment('', []); +testInitialEnvironment('var x = 1;', []); +testInitialEnvironment('let x = 1;', []); +testInitialEnvironment("if (true) { let x = 1; }", []); +testInitialEnvironment("if (true) { var x = 1; }", []); +testInitialEnvironment('function x() {}', ['x']); +testInitialEnvironment("class x { constructor() {} }", []); + +// Exported bindings must be present in the environment. +testInitialEnvironment('export var x = 1;', ['x']); +testInitialEnvironment('export let x = 1;', ['x']); +testInitialEnvironment('export default function x() {};', ['x']); +testInitialEnvironment('export default 1;', ['default']); +testInitialEnvironment('export default function() {};', ['default']); +testInitialEnvironment("export class x { constructor() {} }", ['x']); +testInitialEnvironment('export default class x { constructor() {} };', ['x']); +testInitialEnvironment('export default class { constructor() {} };', ['default']); + +// Imports: namespace imports are present. +testInitialEnvironment('import { x } from "m";', []); +testInitialEnvironment('import * as x from "m";', ['x']); diff --git a/js/src/jit-test/tests/modules/module-evaluation.js b/js/src/jit-test/tests/modules/module-evaluation.js new file mode 100644 index 0000000000..c727f567df --- /dev/null +++ b/js/src/jit-test/tests/modules/module-evaluation.js @@ -0,0 +1,125 @@ +// |jit-test| +// Exercise ModuleEvaluation() concrete method. + +load(libdir + "asserts.js"); + +async function parseAndEvaluate(source) { + let m = parseModule(source); + moduleLink(m); + await moduleEvaluate(m); + return m; +} + +// Check the evaluation of an empty module succeeds. +(async () => { + await parseAndEvaluate(""); +})(); + +(async () => { + // Check that evaluation returns evaluation promise, + // and promise is always the same. + let m = parseModule("1"); + moduleLink(m); + assertEq(typeof moduleEvaluate(m), "object"); + assertEq(moduleEvaluate(m) instanceof Promise, true); + assertEq(moduleEvaluate(m), moduleEvaluate(m)); + await moduleEvaluate(m); +})(); + +(async () => { + // Check top level variables are initialized by evaluation. + let m = parseModule("export var x = 2 + 2;"); + assertEq(typeof getModuleEnvironmentValue(m, "x"), "undefined"); + moduleLink(m); + await moduleEvaluate(m); + assertEq(getModuleEnvironmentValue(m, "x"), 4); +})(); + +(async () => { + let m = parseModule("export let x = 2 * 3;"); + moduleLink(m); + await moduleEvaluate(m); + assertEq(getModuleEnvironmentValue(m, "x"), 6); +})(); + +// Set up a module to import from. +let a = registerModule('a', + parseModule(`var x = 1; + export { x }; + export default 2; + export function f(x) { return x + 1; }`)); + +(async () => { + // Check we can evaluate top level definitions. + await parseAndEvaluate("var foo = 1;"); + await parseAndEvaluate("let foo = 1;"); + await parseAndEvaluate("const foo = 1"); + await parseAndEvaluate("function foo() {}"); + await parseAndEvaluate("class foo { constructor() {} }"); + + // Check we can evaluate all module-related syntax. + await parseAndEvaluate("export var foo = 1;"); + await parseAndEvaluate("export let foo = 1;"); + await parseAndEvaluate("export const foo = 1;"); + await parseAndEvaluate("var x = 1; export { x };"); + await parseAndEvaluate("export default 1"); + await parseAndEvaluate("export default function() {};"); + await parseAndEvaluate("export default function foo() {};"); + await parseAndEvaluate("import a from 'a';"); + await parseAndEvaluate("import { x } from 'a';"); + await parseAndEvaluate("import * as ns from 'a';"); + await parseAndEvaluate("export * from 'a'"); + await parseAndEvaluate("export default class { constructor() {} };"); + await parseAndEvaluate("export default class foo { constructor() {} };"); +})(); + +(async () => { + // Test default import + let m = parseModule("import a from 'a'; export { a };") + moduleLink(m); + await moduleEvaluate(m) + assertEq(getModuleEnvironmentValue(m, "a"), 2); +})(); + +(async () => { + // Test named import + let m = parseModule("import { x as y } from 'a'; export { y };") + moduleLink(m); + await moduleEvaluate(m); + assertEq(getModuleEnvironmentValue(m, "y"), 1); +})(); + +(async () => { + // Call exported function + let m = parseModule("import { f } from 'a'; export let x = f(3);") + moduleLink(m); + await moduleEvaluate(m); + assertEq(getModuleEnvironmentValue(m, "x"), 4); +})(); + +(async () => { + // Test importing an indirect export + registerModule('b', parseModule("export { x as z } from 'a';")); + let m = await parseAndEvaluate("import { z } from 'b'; export { z }"); + assertEq(getModuleEnvironmentValue(m, "z"), 1); +})(); + +(async () => { + // Test cyclic dependencies + registerModule('c1', parseModule("export var x = 1; export {y} from 'c2'")); + registerModule('c2', parseModule("export var y = 2; export {x} from 'c1'")); + let m = await parseAndEvaluate(`import { x as x1, y as y1 } from 'c1'; + import { x as x2, y as y2 } from 'c2'; + export let z = [x1, y1, x2, y2]`); + assertDeepEq(getModuleEnvironmentValue(m, "z"), [1, 2, 1, 2]); +})(); + +(async () => { + // Import access in functions + let m = await parseModule("import { x } from 'a'; function f() { return x; }") + moduleLink(m); + moduleEvaluate(m); + let f = getModuleEnvironmentValue(m, "f"); + assertEq(f(), 1); +})(); +drainJobQueue(); diff --git a/js/src/jit-test/tests/modules/module-this.js b/js/src/jit-test/tests/modules/module-this.js new file mode 100644 index 0000000000..2970f0846e --- /dev/null +++ b/js/src/jit-test/tests/modules/module-this.js @@ -0,0 +1,25 @@ +// |jit-test| +// Test 'this' is undefined in modules. + +function parseAndEvaluate(source) { + let m = parseModule(source); + moduleLink(m); + return moduleEvaluate(m); +} + +parseAndEvaluate("this") + .then(value => assertEq(typeof(value), "undefined")) + .catch(error => { + // We shouldn't throw in this case. + assertEq(false, true) + }); + +let m = parseModule("export function getThis() { return this; }"); +moduleLink(m); +moduleEvaluate(m) + .then(() => { + let f = getModuleEnvironmentValue(m, "getThis"); + assertEq(typeof(f()), "undefined"); + }); + +drainJobQueue(); diff --git a/js/src/jit-test/tests/modules/namespace-import-compilation-2.js b/js/src/jit-test/tests/modules/namespace-import-compilation-2.js new file mode 100644 index 0000000000..ae322246dd --- /dev/null +++ b/js/src/jit-test/tests/modules/namespace-import-compilation-2.js @@ -0,0 +1,17 @@ +// |jit-test| module + +import * as ns from 'module1.js'; + +let other = ns; + +const iterations = 2000; + +let x = 0; +for (let i = 0; i < iterations; i++) { + if (i == iterations / 2) + other = 1; + x += other.a; +} + +assertEq(other.a, undefined); +assertEq(x, NaN); diff --git a/js/src/jit-test/tests/modules/namespace-import-compilation.js b/js/src/jit-test/tests/modules/namespace-import-compilation.js new file mode 100644 index 0000000000..42595b7095 --- /dev/null +++ b/js/src/jit-test/tests/modules/namespace-import-compilation.js @@ -0,0 +1,17 @@ +// |jit-test| module + +import * as ns from 'module1.js'; + +let other = ns; + +const iterations = 10000; + +let x = 0; +for (let i = 0; i < iterations; i++) { + if (i == iterations / 2) + other = { a: 0 }; + x += other.a; +} + +assertEq(other.a, 0); +assertEq(x, iterations / 2); diff --git a/js/src/jit-test/tests/modules/off-thread-compile.js b/js/src/jit-test/tests/modules/off-thread-compile.js new file mode 100644 index 0000000000..80de986c6f --- /dev/null +++ b/js/src/jit-test/tests/modules/off-thread-compile.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// Test off thread module compilation. + +load(libdir + "asserts.js"); + +function offThreadParseAndEvaluate(source) { + offThreadCompileModuleToStencil(source); + let stencil = finishOffThreadStencil(); + let m = instantiateModuleStencil(stencil); + moduleLink(m); + return moduleEvaluate(m); +} + +offThreadParseAndEvaluate("export let x = 2 * 3;"); diff --git a/js/src/jit-test/tests/modules/offthread-oom.js b/js/src/jit-test/tests/modules/offthread-oom.js new file mode 100644 index 0000000000..97b783c1ba --- /dev/null +++ b/js/src/jit-test/tests/modules/offthread-oom.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0 + +// Test Out-of-Memory handling when parsing modules off-thread + +function offThreadParseAndEvaluate(source) { + offThreadCompileModuleToStencil(source); + let stencil = finishOffThreadStencil(); + let m = instantiateModuleStencil(stencil); + moduleLink(m); + return moduleEvaluate(m); +} + +oomTest(() => offThreadParseAndEvaluate(`export let i = 2 * 3;`)); diff --git a/js/src/jit-test/tests/modules/recursive-star-export.js b/js/src/jit-test/tests/modules/recursive-star-export.js new file mode 100644 index 0000000000..0313321c59 --- /dev/null +++ b/js/src/jit-test/tests/modules/recursive-star-export.js @@ -0,0 +1,2 @@ +// |jit-test| module; +import * as ns from "recursiveStarExport.js"; diff --git a/js/src/jit-test/tests/modules/requested-modules.js b/js/src/jit-test/tests/modules/requested-modules.js new file mode 100644 index 0000000000..ebbf8ce6c1 --- /dev/null +++ b/js/src/jit-test/tests/modules/requested-modules.js @@ -0,0 +1,95 @@ +// |jit-test| --enable-import-assertions + +// Test requestedModules property + +function testRequestedModules(source, expected) { + var module = parseModule(source); + var actual = module.requestedModules; + assertEq(actual.length, expected.length); + for (var i = 0; i < actual.length; i++) { + assertEq(actual[i].moduleRequest.specifier, expected[i].specifier); + if(expected[i].assertions === null) { + assertEq(actual[i].moduleRequest.assertions, null); + } + else { + var expectedAssertions = expected[i].assertions; + var actualAssertions = actual[i].moduleRequest.assertions; + assertEq(actualAssertions.length, expectedAssertions.length); + for (var j = 0; j < expectedAssertions.length; j++) { + assertEq(expectedAssertions[j].type, actualAssertions[j].type); + } + } + } +} + +testRequestedModules("", []); + +testRequestedModules("import a from 'foo'", [ + { specifier: 'foo', assertions: null } +]); + +testRequestedModules("import a from 'foo'; import b from 'bar'", [ + { specifier: 'foo', assertions: null }, + { specifier: 'bar', assertions: null } +]); + +testRequestedModules("import a from 'foo'; import b from 'bar'; import c from 'foo'", [ + { specifier: 'foo', assertions: null }, + { specifier: 'bar', assertions: null } +]); + +testRequestedModules("export {} from 'foo'", [ + { specifier: 'foo', assertions: null } +]); + +testRequestedModules("export * from 'bar'",[ + { specifier: 'bar', assertions: null } +]); + +testRequestedModules("import a from 'foo'; export {} from 'bar'; export * from 'baz'", [ + { specifier: 'foo', assertions: null }, + { specifier: 'bar', assertions: null }, + { specifier: 'baz', assertions: null } +]); + +if (getRealmConfiguration("importAttributes")) { + testRequestedModules("import a from 'foo' assert {}", [ + { specifier: 'foo', assertions: null }, + ]); + + testRequestedModules("import a from 'foo' assert { type: 'js'}", [ + { specifier: 'foo', assertions: [ { type: 'js' } ] }, + ]); + + testRequestedModules("import a from 'foo' assert { unsupported: 'test'}", [ + { specifier: 'foo', assertions: null }, + ]); + + testRequestedModules("import a from 'foo' assert { unsupported: 'test', type: 'js', foo: 'bar' }", [ + { specifier: 'foo', assertions: [ { type: 'js' } ] }, + ]); + + testRequestedModules("import a from 'foo' assert { type: 'js1'}; export {} from 'bar' assert { type: 'js2'}; export * from 'baz' assert { type: 'js3'}", [ + { specifier: 'foo', assertions: [ { type: 'js1' } ] }, + { specifier: 'bar', assertions: [ { type: 'js2' } ] }, + { specifier: 'baz', assertions: [ { type: 'js3' } ] } + ]); + + testRequestedModules("export {} from 'foo' assert { type: 'js'}", [ + { specifier: 'foo', assertions: [ { type: 'js' } ] } + ]); + + testRequestedModules("export * from 'bar' assert { type: 'json'}",[ + { specifier: 'bar', assertions: [ { type: 'json' } ] } + ]); + + testRequestedModules("import a from 'foo'; import b from 'bar' assert { type: 'json' };", [ + { specifier: 'foo', assertions: null }, + { specifier: 'bar', assertions: [ { type: 'json' } ] }, + ]); + + testRequestedModules("import b from 'bar' assert { type: 'json' }; import a from 'foo';", [ + { specifier: 'bar', assertions: [ { type: 'json' } ] }, + { specifier: 'foo', assertions: null }, + ]); +} diff --git a/js/src/jit-test/tests/modules/shell-parse.js b/js/src/jit-test/tests/modules/shell-parse.js new file mode 100644 index 0000000000..d01f10aaa2 --- /dev/null +++ b/js/src/jit-test/tests/modules/shell-parse.js @@ -0,0 +1,30 @@ +// Exercise shell parseModule function. + +function testEvalError(source) { + // Test |source| throws when passed to eval. + var caught = false; + try { + eval(source); + } catch (e) { + caught = true; + } + assertEq(caught, true); +} + +function testModuleSource(source) { + // Test |source| parses as a module, but throws when passed to eval. + testEvalError(source); + parseModule(source); +} + +parseModule(""); +parseModule("const foo = 1;"); +parseModule("var foo = 1;"); +parseModule("let foo = 1; var bar = 2; const baz = 3"); + +testModuleSource("import * as ns from 'bar';"); +testModuleSource("export { a } from 'b';"); +testModuleSource("export * from 'b';"); +testModuleSource("export const foo = 1;"); +testModuleSource("export default function() {};"); +testModuleSource("export default 1;"); diff --git a/js/src/jit-test/tests/modules/shell-wrapper.js b/js/src/jit-test/tests/modules/shell-wrapper.js new file mode 100644 index 0000000000..1be1c486c6 --- /dev/null +++ b/js/src/jit-test/tests/modules/shell-wrapper.js @@ -0,0 +1,174 @@ +// |jit-test| module +// Test shell ModuleObject wrapper's accessors and methods + +load(libdir + "asserts.js"); + +function testGetter(obj, name) { + // Check the getter is defined on the instance, instead of prototype. + // * raw ModuleObject's getters are defined on prototype + // * ModuleObject wrapper's getters are defined on instance + const desc = Object.getOwnPropertyDescriptor(obj, name); + assertEq(typeof desc.get, "function"); + assertEq(Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), name), + undefined); + + // Check invalid this value. + assertThrowsInstanceOf(() => { + desc.get.call({}); + }, Error); +} + +// ==== namespace getter ==== +const a = registerModule('a', parseModule(` +export const v = 10; +`)); +const b = registerModule('b', parseModule(` +import * as ns from 'a' +`)); +moduleLink(b); +moduleEvaluate(b); +assertEq(a.namespace.v, 10); +testGetter(a, "namespace"); + +// ==== status getter ==== +const MODULE_STATUS_UNLINKED = 0; +const MODULE_STATUS_LINKED = 2; +const MODULE_STATUS_EVALUATED = 5; + +const c = registerModule('c', parseModule(` +`)); +assertEq(c.status, MODULE_STATUS_UNLINKED); +moduleLink(c); +assertEq(c.status, MODULE_STATUS_LINKED); +moduleEvaluate(c); +assertEq(c.status, MODULE_STATUS_EVALUATED); +testGetter(c, "status"); + +// ==== evaluationError getter ==== +const d = registerModule('d', parseModule(` +f(); +`)); +moduleLink(d); +try { + await moduleEvaluate(d); +} catch (e) { +} +assertEq(d.evaluationError instanceof ReferenceError, true); +testGetter(d, "evaluationError"); + +// ==== requestedModules getter ==== +const e = parseModule(` +import a from 'b'; +`); +assertEq(e.requestedModules.length, 1); +assertEq(e.requestedModules[0].moduleRequest.specifier, 'b'); +assertEq(e.requestedModules[0].lineNumber, 2); +assertEq(e.requestedModules[0].columnNumber, 15); +testGetter(e, "requestedModules"); +testGetter(e.requestedModules[0], "moduleRequest"); +testGetter(e.requestedModules[0].moduleRequest, "specifier"); +testGetter(e.requestedModules[0], "lineNumber"); +testGetter(e.requestedModules[0], "columnNumber"); + +// ==== importEntries getter ==== +const f = parseModule(` +import {a as A} from 'b'; +`); +assertEq(f.importEntries.length, 1); +assertEq(f.importEntries[0].moduleRequest.specifier, 'b'); +assertEq(f.importEntries[0].importName, 'a'); +assertEq(f.importEntries[0].localName, 'A'); +assertEq(f.importEntries[0].lineNumber, 2); +assertEq(f.importEntries[0].columnNumber, 9); +testGetter(f, "importEntries"); +testGetter(f.importEntries[0], "moduleRequest"); +testGetter(f.importEntries[0].moduleRequest, "specifier"); +testGetter(f.importEntries[0], "importName"); +testGetter(f.importEntries[0], "localName"); +testGetter(f.importEntries[0], "lineNumber"); +testGetter(f.importEntries[0], "columnNumber"); + +// ==== localExportEntries getter ==== +const g = parseModule(` +export const v = 1; +`); +assertEq(g.localExportEntries.length, 1); +assertEq(g.localExportEntries[0].exportName, 'v'); +assertEq(g.localExportEntries[0].moduleRequest, null); +assertEq(g.localExportEntries[0].importName, null); +assertEq(g.localExportEntries[0].localName, 'v'); +assertEq(g.localExportEntries[0].lineNumber, 0); +assertEq(g.localExportEntries[0].columnNumber, 1); +testGetter(g, "localExportEntries"); +testGetter(g.localExportEntries[0], "exportName"); +testGetter(g.localExportEntries[0], "moduleRequest"); +testGetter(g.localExportEntries[0], "importName"); +testGetter(g.localExportEntries[0], "localName"); +testGetter(g.localExportEntries[0], "lineNumber"); +testGetter(g.localExportEntries[0], "columnNumber"); + +// ==== indirectExportEntries getter ==== +const h = parseModule(` +export {v} from "b"; +`); +assertEq(h.indirectExportEntries.length, 1); +assertEq(h.indirectExportEntries[0].exportName, 'v'); +assertEq(h.indirectExportEntries[0].moduleRequest.specifier, "b"); +assertEq(h.indirectExportEntries[0].importName, "v"); +assertEq(h.indirectExportEntries[0].localName, null); +assertEq(h.indirectExportEntries[0].lineNumber, 2); +assertEq(h.indirectExportEntries[0].columnNumber, 9); + +// ==== starExportEntries getter ==== +const i = parseModule(` +export * from "b"; +`); +assertEq(i.starExportEntries.length, 1); +assertEq(i.starExportEntries[0].exportName, null); +assertEq(i.starExportEntries[0].moduleRequest.specifier, "b"); +assertEq(i.starExportEntries[0].importName, null); +assertEq(i.starExportEntries[0].localName, null); +assertEq(i.starExportEntries[0].lineNumber, 2); +assertEq(i.starExportEntries[0].columnNumber, 8); + +// ==== dfsIndex and dfsAncestorIndex getters ==== +const j = registerModule('j', parseModule(` +export const v1 = 10; +import {v2} from 'k' +`)); +const k = registerModule('k', parseModule(` +export const v2 = 10; +import {v1} from 'j' +`)); +const l = registerModule('l', parseModule(` +export const v3 = 10; +import {v2} from 'k' +import {v1} from 'j' +`)); +assertEq(j.dfsIndex, undefined); +assertEq(j.dfsAncestorIndex, undefined); +assertEq(k.dfsIndex, undefined); +assertEq(k.dfsAncestorIndex, undefined); +assertEq(l.dfsIndex, undefined); +assertEq(l.dfsAncestorIndex, undefined); +moduleLink(l); +assertEq(j.dfsIndex, 2); +assertEq(j.dfsAncestorIndex, 1); +assertEq(k.dfsIndex, 1); +assertEq(k.dfsAncestorIndex, 1); +assertEq(l.dfsIndex, 0); +assertEq(l.dfsAncestorIndex, 0); + +// ==== async and promises getters ==== +const m = parseModule(` +`); +assertEq(m.hasTopLevelAwait, false); +assertEq(m.topLevelCapability, undefined); +assertEq(m.asyncEvaluatingPostOrder, undefined); +assertEq(m.asyncParentModules[0], undefined); +assertEq(m.pendingAsyncDependencies, undefined); +testGetter(m, "hasTopLevelAwait"); +testGetter(m, "topLevelCapability"); +testGetter(m, "asyncEvaluatingPostOrder"); +testGetter(m, "asyncParentModules"); +testGetter(m, "pendingAsyncDependencies"); diff --git a/js/src/jit-test/tests/modules/simple-imports.js b/js/src/jit-test/tests/modules/simple-imports.js new file mode 100644 index 0000000000..a0c894ef63 --- /dev/null +++ b/js/src/jit-test/tests/modules/simple-imports.js @@ -0,0 +1,11 @@ +// |jit-test| module + +import { a } from "module1.js"; +import { b } from "module2.js"; +import { c } from "module3.js"; +import d from "module4.js"; + +assertEq(a, 1); +assertEq(b, 2); +assertEq(c, 3); +assertEq(d, 4); diff --git a/js/src/jit-test/tests/modules/tla-after-many-bindings.js b/js/src/jit-test/tests/modules/tla-after-many-bindings.js new file mode 100644 index 0000000000..220d2d3ab1 --- /dev/null +++ b/js/src/jit-test/tests/modules/tla-after-many-bindings.js @@ -0,0 +1,24 @@ +parseModule(` + var x = 449627; + var summary = 'foo'; + if (typeof unescape === 'function') { + let x00, x01, x02, x03, x04, x05, x06, x07, x08, x09, x0a, x0b, x0c, x0d, x0e, x0f, + x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x1a, x1b, x1c, x1d, x1e, x1f, + x20, x21, x22, x23, x24, x25, x26, x27, { get } = ()=>{x41++;y63++;z84++}, + x29, x2a, x2b, x2c, x2d, x2e, x2f, + x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x3a, x3b, x3c, x3d, x3e, x3f, + x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x4a, x4b, x4c, x4d, x4e, x4f, + x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x5a, x5b, x5c, x5d, x5e, x5f, + x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x6a, x6b, x6c, x6d, x6e, x6f, + x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x7a, x7b, x7c, x7d, x7e, x7f, + x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x8a, x8b, x8c, x8d, x8e, x8f, + x90, x91, x92, x93, x94, x95, x96, x97, x98, x99, x9a, x9b, x9c, x9d, x9e, x9f, + xa0, of , xa2, xa3, xa4, xa5, xa6, xa7, xa8, xa9, xaa, xab, xac, xad, xae, xaf, + xb0, xb1, xb2, xb3, xb4, xb5, xb6, xb7, xb8, xb9, xba, xbb, xbc, xbd, xbe, xbf, + xc0, xc1, xc2, xc3, xc4, xc5, xc6, xc7, xc8, xc9, xca, xcb, xcc, xcd, xce, xcf, + xd0, xd1, xd2, xd3, xd4, xd5, xd6, xd7, xd8, xd9, xda, xdb, xdc, xdd, xde, xdf, + xe0, xe1, xe2, xe3, xe4, xe5, xe6, xe7, xe8, xe9, xea, xeb, xec, xed, xee, xef, + xf0, xf1, xf2, xf3, xf4, xf5, xf6, xf7, xf8, xf9, xfa, xfb, xfc, xfd, xfe, xff; + } + await isOdd(); +`); diff --git a/js/src/jit-test/tests/modules/tla-many-vars.js b/js/src/jit-test/tests/modules/tla-many-vars.js new file mode 100644 index 0000000000..de2e813805 --- /dev/null +++ b/js/src/jit-test/tests/modules/tla-many-vars.js @@ -0,0 +1,15 @@ +a = []; +for (i = 0; i < 1000; ++i) { + a.push("x" + i); +} + +// Sync +parseModule(` + let ${a.join(",")}; + `); + +// Async +parseModule(` + let ${a.join(",")}; + await 1; + `); diff --git a/js/src/jit-test/tests/modules/unbound-export.js b/js/src/jit-test/tests/modules/unbound-export.js new file mode 100644 index 0000000000..f70405d56f --- /dev/null +++ b/js/src/jit-test/tests/modules/unbound-export.js @@ -0,0 +1,2 @@ +// |jit-test| module; error: SyntaxError: local binding for export 'b' not found +export { b }; diff --git a/js/src/jit-test/tests/optional-chain/bug1848244.js b/js/src/jit-test/tests/optional-chain/bug1848244.js new file mode 100644 index 0000000000..cbd7bd6164 --- /dev/null +++ b/js/src/jit-test/tests/optional-chain/bug1848244.js @@ -0,0 +1,6 @@ +// Constant-folding should replace the ternary expression with one that is +// equally valid with optional chaining in the AST +function main() { + (0 ? 0 : -1n)?.g; +} +main(); diff --git a/js/src/jit-test/tests/optional-chain/call-ignore-rval.js b/js/src/jit-test/tests/optional-chain/call-ignore-rval.js new file mode 100644 index 0000000000..c5fd2fe975 --- /dev/null +++ b/js/src/jit-test/tests/optional-chain/call-ignore-rval.js @@ -0,0 +1,34 @@ +// Tests for JSOp::CallIgnoresRv in optional chains. + +// Note:: IgnoresReturnValueNative is supported for Array.prototype.splice. + +// Test for optional call. +function testOptionalCall() { + for (var i = 0; i < 100; ++i) { + var x = [1, 2, 3]; + x.splice?.(0); + } +} + +for (var i = 0; i < 5; ++i) { testOptionalCall(); } + +// Test for optional prop directly followed by call. +function testOptionalProp() { + for (var i = 0; i < 100; ++i) { + var x = [1, 2, 3]; + x?.splice(0); + } +} + +for (var i = 0; i < 5; ++i) { testOptionalProp(); } + +// Test for call in optional chain expression. +function testOptionalChain() { + for (var i = 0; i < 100; ++i) { + var x = [1, 2, 3]; + var o = {x}; + o?.x.splice(0); + } +} + +for (var i = 0; i < 5; ++i) { testOptionalChain(); } diff --git a/js/src/jit-test/tests/optional-chain/fun-call-or-apply.js b/js/src/jit-test/tests/optional-chain/fun-call-or-apply.js new file mode 100644 index 0000000000..6734c3c86b --- /dev/null +++ b/js/src/jit-test/tests/optional-chain/fun-call-or-apply.js @@ -0,0 +1,60 @@ +// Tests for JSOp::FunCall and JSOp::FunApply in optional calls. + +function f1() { + return 0; +} +function f2(a) { + return a * 2; +} + +function funCall(fn) { + // Without arguments. + for (var i = 0; i < 100; ++i) { + assertEq(f1?.call(), 0); + } + + // Only this-arg. + for (var i = 0; i < 100; ++i) { + assertEq(f1?.call(null), 0); + } + + // With one arg. + for (var i = 0; i < 100; ++i) { + assertEq(f1?.call(null, 1), 0); + assertEq(f2?.call(null, 5), 10); + } + + // With multiple args. + for (var i = 0; i < 100; ++i) { + assertEq(f1?.call(null, 1, 2, 3), 0); + assertEq(f2?.call(null, 4, 5, 6), 8); + } +} + +for (var i = 0; i < 5; ++i) { funCall(); } + +function funApply(fn) { + // Without arguments. + for (var i = 0; i < 100; ++i) { + assertEq(f1?.apply(), 0); + } + + // Only this-arg. + for (var i = 0; i < 100; ++i) { + assertEq(f1?.apply(null), 0); + } + + // With one arg. + for (var i = 0; i < 100; ++i) { + assertEq(f1?.apply(null, [1]), 0); + assertEq(f2?.apply(null, [5]), 10); + } + + // With multiple args. + for (var i = 0; i < 100; ++i) { + assertEq(f1?.apply(null, [1, 2, 3]), 0); + assertEq(f2?.apply(null, [4, 5, 6]), 8); + } +} + +for (var i = 0; i < 5; ++i) { funApply(); } diff --git a/js/src/jit-test/tests/out-of-tree-apis.js b/js/src/jit-test/tests/out-of-tree-apis.js new file mode 100644 index 0000000000..3615fba7f3 --- /dev/null +++ b/js/src/jit-test/tests/out-of-tree-apis.js @@ -0,0 +1,23 @@ +/** + * This tests APIs that are relied on by external consumers such as fuzzers, + * which could be broken if modified with regard only to in-tree code. + */ + +// getRealmConfiguration and getBuildConfiguration +// If API changes are planned here, be sure to notify anyone who is fuzzing SM. + +config = getRealmConfiguration(); + +assertEq(typeof config, "object"); + +for (const [key, value] of Object.entries(config)) { + assertEq(getRealmConfiguration(key), value); +} + +config = getBuildConfiguration(); + +assertEq(typeof config, "object"); + +for (const [key, value] of Object.entries(config)) { + assertEq(getBuildConfiguration(key), value); +} diff --git a/js/src/jit-test/tests/parser/arrow-rest.js b/js/src/jit-test/tests/parser/arrow-rest.js new file mode 100644 index 0000000000..52db6eb867 --- /dev/null +++ b/js/src/jit-test/tests/parser/arrow-rest.js @@ -0,0 +1,204 @@ +// The parser should throw SyntaxError immediately if it finds "..." in a +// context where it's not allowed. + +function testThrow(code, column) { + var caught = false; + try { + eval(code); + } catch (e) { + caught = true; + assertEq(e.columnNumber, column); + } + assertEq(caught, true, + "failed to throw evaluating <" + code + ">"); +} + +// expression statement + +testThrow(` +...a)=> +`, 1); + +// default parameter + +testThrow(` +function f(x=...a) => +`, 14); + +// rest parameter + +testThrow(` +function f(... ...a) => +`, 16); + +// destructuring parameter + +testThrow(` +([... ...a)=> +`, 7); + +testThrow(` +({...a)=> +`, 7); + +testThrow(` +function f([... ...a)=> +`, 17); + +testThrow(` +function f({...a)=> +`, 17); + +// arrow + +testThrow(` +x => ...a)=> +`, 6); + +// template literal + +testThrow("`${ ...a)=>}`", 5); + +// destructing assignment + +testThrow(` +var [... ...a)=> +`, 10); + +testThrow(` +var {...a)=> +`, 10); + +// initializer + +testThrow(` +var [a] = ...a)=> +`, 11); + +testThrow(` +var {a:a} = ...a)=> +`, 13); + +testThrow(` +var a = ...a)=> +`, 9); + +// if statement + +testThrow(` +if (...a) => +`, 5); + +// for statement + +testThrow(` +for (...a)=> +`, 6); + +testThrow(` +for (let a in ...a)=> +`, 15); + +testThrow(` +for (let a of ...a)=> +`, 15); + +testThrow(` +for (; ...a)=> +`, 8); + +testThrow(` +for (;; ...a)=> +`, 9); + +// case + +testThrow(` +switch (x) { case ...a)=> +`, 19); + +// return statement + +testThrow(` +function f(x) { return ...a)=> +`, 24); + +// yield expression + +testThrow(` +function* f(x) { yield ...a)=> +`, 24); + +// throw statement + +testThrow(` +throw ...a) => +`, 7); + +// class + +testThrow(` +class A extends ...a) => +`, 17); + +// conditional expression + +testThrow(` +1 ? ...a) => +`, 5); + +testThrow(` +1 ? 2 : ...a) => +`, 9); + +// unary operators + +testThrow(` +void ...a) => +`, 6); + +testThrow(` +typeof ...a) => +`, 8); + +testThrow(` +++ ...a) => +`, 4); + +testThrow(` +delete ...a) => +`, 8); + +// new + +testThrow(` +new ...a) => +`, 5); + +// member expression + +testThrow(` +x[...a) => +`, 3); + +// array literal + +testThrow(` +[... ...a) => +`, 6); + +// object literal + +testThrow(` +({[...a) => +`, 4); + +testThrow(` +({x: ...a) => +`, 6); + +// assignment + +testThrow(` +x = ...a) => +`, 5); diff --git a/js/src/jit-test/tests/parser/arrow-with-block.js b/js/src/jit-test/tests/parser/arrow-with-block.js new file mode 100644 index 0000000000..de6f34c314 --- /dev/null +++ b/js/src/jit-test/tests/parser/arrow-with-block.js @@ -0,0 +1,92 @@ +load(libdir + "asserts.js"); + +let x = 10; +let g = 4; + +assertEq(eval(` +a => {} +/x/g; +`).toString(), "/x/g"); +assertEq(eval(` +a => {} +/x/; +`).toString(), "/x/"); +assertThrowsInstanceOf(() => eval(` +a => {} /x/g; +`), SyntaxError); + +assertEq(eval(` +a => {}, +/x/; +`).toString(), "/x/"); +assertEq(eval(` +a => {} +, +/x/; +`).toString(), "/x/"); + +assertEq(eval(` +false ? +a => {} : +/x/; +`).toString(), "/x/"); +assertEq(eval(` +false ? +a => {} +: +/x/; +`).toString(), "/x/"); + +assertEq(eval(` +a => {}; +/x/; +`).toString(), "/x/"); +assertEq(eval(` +a => {} +; +/x/; +`).toString(), "/x/"); + +assertEq(eval(` +a => 200 +/x/g; +`) instanceof Function, true); +assertEq(eval(` +a => 200 +/x/g; +`)(), 5); +assertEq(eval(` +a => 200 /x/g; +`)(), 5); + +assertEq(eval(` +a => 1, +/x/; +`).toString(), "/x/"); +assertEq(eval(` +a => 1 +, +/x/; +`).toString(), "/x/"); + +assertEq(eval(` +false ? +a => 1 : +/x/; +`).toString(), "/x/"); +assertEq(eval(` +false ? +a => 1 +: +/x/; +`).toString(), "/x/"); + +assertEq(eval(` +a => 1; +/x/; +`).toString(), "/x/"); +assertEq(eval(` +a => 1 +; +/x/; +`).toString(), "/x/"); diff --git a/js/src/jit-test/tests/parser/break-continue-errors.js b/js/src/jit-test/tests/parser/break-continue-errors.js new file mode 100644 index 0000000000..9d484506e9 --- /dev/null +++ b/js/src/jit-test/tests/parser/break-continue-errors.js @@ -0,0 +1,22 @@ +load(libdir + "asserts.js"); + +function test(s, expected) { + assertErrorMessage(() => Function(s), SyntaxError, expected); +} + +test("A: continue;", "continue must be inside loop"); +test("A: continue B;", "continue must be inside loop"); +test("A: if (false) { continue; }", "continue must be inside loop"); +test("A: if (false) { continue B; }", "continue must be inside loop"); +test("while (false) { (() => { continue B; })(); }", "continue must be inside loop"); +test("B: while (false) { (() => { continue B; })(); }", "continue must be inside loop"); + +test("do { continue B; } while (false);", "label not found"); +test("A: for (;;) { continue B; }", "label not found"); +test("A: while (false) { if (x) { continue B; } }", "label not found"); +test("A: while (false) { B: if (x) { continue B; } }", "label not found"); + +test("A: if (false) { break B; }", "label not found"); +test("A: while (false) { break B; }", "label not found"); +test("A: while (true) { if (x) { break B; } }", "label not found"); +test("B: while (false) { (() => { break B; })(); }", "label not found"); diff --git a/js/src/jit-test/tests/parser/bug-1090096.js b/js/src/jit-test/tests/parser/bug-1090096.js new file mode 100644 index 0000000000..3894630afe --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1090096.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); + +assertThrowsInstanceOf( + () => Function(` +for (let { + [ + function(x) {; + } + ]: {} +} in 0 +`), + SyntaxError) diff --git a/js/src/jit-test/tests/parser/bug-1161312.js b/js/src/jit-test/tests/parser/bug-1161312.js new file mode 100644 index 0000000000..ef7f7905c1 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1161312.js @@ -0,0 +1,3 @@ +// Test that lazy scripts can handle OOB column numbers. + +assertEq(evaluate(`var f = x=>saveStack().column; f()`, { columnNumber: 1730 }), 1741); diff --git a/js/src/jit-test/tests/parser/bug-1250192.js b/js/src/jit-test/tests/parser/bug-1250192.js new file mode 100644 index 0000000000..39b0ff0f54 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1250192.js @@ -0,0 +1,5 @@ +(function * YearFromTime(x, ... get) { +try {} catch (x) { + for (var x;;); +} +})(); diff --git a/js/src/jit-test/tests/parser/bug-1254164.js b/js/src/jit-test/tests/parser/bug-1254164.js new file mode 100644 index 0000000000..3b08180a78 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1254164.js @@ -0,0 +1,6 @@ +// |jit-test| slow; + +var s = ''; +for (var i = 0; i < 70000; i++) + s += 'function x' + i + '() { x' + i + '(); }\n'; +eval("(function() { " + s + " })();"); diff --git a/js/src/jit-test/tests/parser/bug-1263355-1.js b/js/src/jit-test/tests/parser/bug-1263355-1.js new file mode 100644 index 0000000000..e5dbb56450 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-1.js @@ -0,0 +1,5 @@ +// |jit-test| error: ReferenceError + +for (let b in [0]) { + let b = b ? 0 : 1 +} diff --git a/js/src/jit-test/tests/parser/bug-1263355-10.js b/js/src/jit-test/tests/parser/bug-1263355-10.js new file mode 100644 index 0000000000..1b7888d861 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-10.js @@ -0,0 +1,4 @@ +// |jit-test| error: TypeError + +function f(m, k = class C extends Array { }, p = m()) { } +f() diff --git a/js/src/jit-test/tests/parser/bug-1263355-11.js b/js/src/jit-test/tests/parser/bug-1263355-11.js new file mode 100644 index 0000000000..1e363dc79d --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-11.js @@ -0,0 +1,6 @@ +function assertNotSame(expected, actual, message = "") { } +function g3(h = () => arguments) { + function arguments() { } + assertNotSame(arguments, h()); +} +g3(); diff --git a/js/src/jit-test/tests/parser/bug-1263355-12.js b/js/src/jit-test/tests/parser/bug-1263355-12.js new file mode 100644 index 0000000000..d2049bfa22 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-12.js @@ -0,0 +1,6 @@ + + +syntaxParse(` +if (scriptArgs.length === 0) { } +var file = scriptArgs[0]; +`); diff --git a/js/src/jit-test/tests/parser/bug-1263355-13.js b/js/src/jit-test/tests/parser/bug-1263355-13.js new file mode 100644 index 0000000000..96997c2dc0 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-13.js @@ -0,0 +1,26 @@ +// |jit-test| error: ReferenceError + +// jsfunfuzz-generated +gczeal(9); +for (var i in function(){}); +s = newGlobal({newCompartment: true}); +aa = f(); +function f(x) { + evalcx(x, s) +} +function h(x) { + f(x) +} +// Adapted from randomly chosen test: js/src/jit-test/tests/debug/resumption-05.js +h("\ + var g = newGlobal({newCompartment: true});\ + g.debuggeeGlobal = this;\ + g.eval(\"(\" + function() {\ + var dbg = Debugger(debuggeeGlobal);\ + dbg.onDebuggerStatement = function(frame) {\ + frame.eval(\"f\")\ + }\ + } + \")()\");\ + debugger;\ +"); +z; diff --git a/js/src/jit-test/tests/parser/bug-1263355-14.js b/js/src/jit-test/tests/parser/bug-1263355-14.js new file mode 100644 index 0000000000..23f7c160e8 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-14.js @@ -0,0 +1,28 @@ +// |jit-test| allow-unhandlable-oom +gczeal(0); +function g() { + for (var j = 0; j < 999; ++j) { + try { + k + } catch (e) { + try { + r + } catch (e) {} + } + } +} +function h(code) { + try { + f = Function(code) + } catch (r) {}; + try { + f() + } catch (r) {} + eval("") +} +h("m=function(){};g(m,[,])") +h("=") +h("=") +h("=") +h("startgc(1,'shrinking')") +h("gcparam(\"maxBytes\",gcparam(\"gcBytes\")+4);for(r;;i++){}") diff --git a/js/src/jit-test/tests/parser/bug-1263355-15.js b/js/src/jit-test/tests/parser/bug-1263355-15.js new file mode 100644 index 0000000000..409ead51d5 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-15.js @@ -0,0 +1,4 @@ +// Adapted from randomly chosen test: js/src/jit-test/tests/parser/yield-in-formal-destructuring.js +function f({ + [e]: {} +}) {} diff --git a/js/src/jit-test/tests/parser/bug-1263355-16.js b/js/src/jit-test/tests/parser/bug-1263355-16.js new file mode 100644 index 0000000000..9bf1a2412e --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-16.js @@ -0,0 +1,11 @@ +// |jit-test| error: ReferenceError + +let m = parseModule(` +var i = 0; +addThis(); +function addThis() { + return statusmessages[i] = Number; +} +`); +moduleLink(m); +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/parser/bug-1263355-17.js b/js/src/jit-test/tests/parser/bug-1263355-17.js new file mode 100644 index 0000000000..f472efcd34 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-17.js @@ -0,0 +1,4 @@ +let m = parseModule(` + var expect = ''; + var [ ... of ] = ( ... of ) => expect; +`); diff --git a/js/src/jit-test/tests/parser/bug-1263355-18.js b/js/src/jit-test/tests/parser/bug-1263355-18.js new file mode 100644 index 0000000000..683c248514 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-18.js @@ -0,0 +1,4 @@ +function f14(g = 0) { + { function g() { return "g" } } +} +f14(); diff --git a/js/src/jit-test/tests/parser/bug-1263355-19.js b/js/src/jit-test/tests/parser/bug-1263355-19.js new file mode 100644 index 0000000000..c3d118635b --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-19.js @@ -0,0 +1,4 @@ +(function(p = null){ + var q; + (function() { q })(); +})(); diff --git a/js/src/jit-test/tests/parser/bug-1263355-2.js b/js/src/jit-test/tests/parser/bug-1263355-2.js new file mode 100644 index 0000000000..bb37715b61 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-2.js @@ -0,0 +1,2 @@ +eval(); +try {} catch (abc) {}; diff --git a/js/src/jit-test/tests/parser/bug-1263355-20.js b/js/src/jit-test/tests/parser/bug-1263355-20.js new file mode 100644 index 0000000000..f98cf7b44f --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-20.js @@ -0,0 +1,2 @@ +{ function c() {} } +class c { } diff --git a/js/src/jit-test/tests/parser/bug-1263355-21.js b/js/src/jit-test/tests/parser/bug-1263355-21.js new file mode 100644 index 0000000000..9dfa94e691 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-21.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError + +(function() { + "use asm"; + var [] = 0; +})() + diff --git a/js/src/jit-test/tests/parser/bug-1263355-22.js b/js/src/jit-test/tests/parser/bug-1263355-22.js new file mode 100644 index 0000000000..69b7e77092 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-22.js @@ -0,0 +1,16 @@ +// |jit-test| error: ReferenceError + +// Adapted from randomly chosen test: js/src/jit-test/tests/debug/Frame-onPop-error-scope-unwind-02.js +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onEnterFrame = function(f) { + (f.environment.getVariable("e") == 0); +}; +g.eval("" + function f() { + try { + throw 42; + } catch (e) { + noSuchFn(e); + } +}); +g.eval("f();"); diff --git a/js/src/jit-test/tests/parser/bug-1263355-23.js b/js/src/jit-test/tests/parser/bug-1263355-23.js new file mode 100644 index 0000000000..802e58a785 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-23.js @@ -0,0 +1,7 @@ +let m = parseModule(` + const root = newGlobal(); + minorgc(); + root.eval(); +`); +moduleLink(m); +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/parser/bug-1263355-24.js b/js/src/jit-test/tests/parser/bug-1263355-24.js new file mode 100644 index 0000000000..0c33ec3530 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-24.js @@ -0,0 +1,3 @@ +function TestFunction_4(get, b, [] = status, d, e) { + var arguments = "FAIL"; +} diff --git a/js/src/jit-test/tests/parser/bug-1263355-26.js b/js/src/jit-test/tests/parser/bug-1263355-26.js new file mode 100644 index 0000000000..a3c09459ab --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-26.js @@ -0,0 +1,7 @@ +// |jit-test| error: TypeError + +function test(a, b, c, d, e, {} = "zmi") { + var r = 0 + r += Math.min(a, b, c, r.script.getLineOffsets(g.line0 + 3), e); +} +test(); diff --git a/js/src/jit-test/tests/parser/bug-1263355-27.js b/js/src/jit-test/tests/parser/bug-1263355-27.js new file mode 100644 index 0000000000..ba334a3eb8 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-27.js @@ -0,0 +1,5 @@ +// |jit-test| error: ReferenceError + +load(libdir + "evalInFrame.js"); +evalInFrame(1, "a = 43"); +let a = 42; diff --git a/js/src/jit-test/tests/parser/bug-1263355-28.js b/js/src/jit-test/tests/parser/bug-1263355-28.js new file mode 100644 index 0000000000..88c7b0653e --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-28.js @@ -0,0 +1,3 @@ +for (var i = 0; i < 1; i++) { + L: break; +} diff --git a/js/src/jit-test/tests/parser/bug-1263355-29.js b/js/src/jit-test/tests/parser/bug-1263355-29.js new file mode 100644 index 0000000000..ace3e5faa9 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-29.js @@ -0,0 +1,6 @@ +// |jit-test| error: ReferenceError + +{ + for (var x = 0; i < 100; i++) a >>= i + let i = 1; +} diff --git a/js/src/jit-test/tests/parser/bug-1263355-3.js b/js/src/jit-test/tests/parser/bug-1263355-3.js new file mode 100644 index 0000000000..00a1cef382 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-3.js @@ -0,0 +1,4 @@ +// |jit-test| error: ReferenceError + +f = ([a = class b extends b {}, b] = [void 0]) => {}; +f() diff --git a/js/src/jit-test/tests/parser/bug-1263355-30.js b/js/src/jit-test/tests/parser/bug-1263355-30.js new file mode 100644 index 0000000000..f3339ee5fa --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-30.js @@ -0,0 +1,19 @@ +// |jit-test| error: ReferenceError + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +g.toggle = function toggle(d) { + if (d) { + dbg.addDebuggee(g); + frame1.onPop = function() { + onPopExecuted = setJitCompilerOption('offthread-compilation.enable', 0) >> toggle('#2: x = null; x ^= true; x === 1. Actual: ' + (getObjectMetadata)) + (this); + }; + } +}; +g.eval("" + function f(d) { + toggle(d); +}); +g.eval("(" + function test() { + for (var i = 0; i < 5; i++) f(false); + f(true); +} + ")();"); diff --git a/js/src/jit-test/tests/parser/bug-1263355-31.js b/js/src/jit-test/tests/parser/bug-1263355-31.js new file mode 100644 index 0000000000..2ffe295d0c --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-31.js @@ -0,0 +1,6 @@ +try { + eval('"use strict"; var x = "a\\4";'); +} catch (e) { + var e = ''; + let arguments; +} diff --git a/js/src/jit-test/tests/parser/bug-1263355-32.js b/js/src/jit-test/tests/parser/bug-1263355-32.js new file mode 100644 index 0000000000..db31a6b12d --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-32.js @@ -0,0 +1,4 @@ +// |jit-test| error: ReferenceError + +f = ([a = class target extends b {}, b] = [void 0]) => {}; +f() diff --git a/js/src/jit-test/tests/parser/bug-1263355-33.js b/js/src/jit-test/tests/parser/bug-1263355-33.js new file mode 100644 index 0000000000..e1732de594 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-33.js @@ -0,0 +1,22 @@ +// |jit-test| error: InternalError + +var lfLogBuffer = ` +if (lfCodeBuffer) loadFile(lfCodeBuffer); +function loadFile(await ) { + eval(lfVarx); +} +`; +lfLogBuffer = lfLogBuffer.split('\n'); +var lfCodeBuffer = ""; +while (true) { + var line = lfLogBuffer.shift(); + if (line == null) { + break; + } else { + lfCodeBuffer += line + "\n"; + } +} +if (lfCodeBuffer) loadFile(lfCodeBuffer); +function loadFile(lfVarx) { + eval(lfVarx); +} diff --git a/js/src/jit-test/tests/parser/bug-1263355-34.js b/js/src/jit-test/tests/parser/bug-1263355-34.js new file mode 100644 index 0000000000..975c6d33dc --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-34.js @@ -0,0 +1,4 @@ +eval(` +var of; +let expect =false , assertEq; +`); diff --git a/js/src/jit-test/tests/parser/bug-1263355-35.js b/js/src/jit-test/tests/parser/bug-1263355-35.js new file mode 100644 index 0000000000..1bb5f44dd0 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-35.js @@ -0,0 +1,7 @@ +function f({get +} = (0), y) { + var stack = getBacktrace({ + args: true, + }); +} +f(1, 2); diff --git a/js/src/jit-test/tests/parser/bug-1263355-36.js b/js/src/jit-test/tests/parser/bug-1263355-36.js new file mode 100644 index 0000000000..b6d07c3ce9 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-36.js @@ -0,0 +1,9 @@ +// |jit-test| error: ReferenceError + +(function f() { + let x = (new function() { + x(() => { + f.ArrayType(1, 2); + }, "first argument of ctypes.cast must be a CData"); + }) +})(); diff --git a/js/src/jit-test/tests/parser/bug-1263355-37.js b/js/src/jit-test/tests/parser/bug-1263355-37.js new file mode 100644 index 0000000000..c9829c01e7 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-37.js @@ -0,0 +1,7 @@ +// |jit-test| error: ReferenceError + +{ + while (x && 0) + if (!((x = 1) === x)) {} + let x = () => sym() +} diff --git a/js/src/jit-test/tests/parser/bug-1263355-38.js b/js/src/jit-test/tests/parser/bug-1263355-38.js new file mode 100644 index 0000000000..4a42642762 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-38.js @@ -0,0 +1,9 @@ +// |jit-test| error: SyntaxError + +function crashMe2(n) { + var nasty = [], + fn + while (n--) nasty[n] = "a" + 1234567890 + fn = Function(nasty.join(), "void 0") +} +crashMe2(0x10000); diff --git a/js/src/jit-test/tests/parser/bug-1263355-39.js b/js/src/jit-test/tests/parser/bug-1263355-39.js new file mode 100644 index 0000000000..85d0f8aaef --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-39.js @@ -0,0 +1,8 @@ +function f() { + var init, first; + for (let i = (init = () => i = 1, 0); (first = () => i, i) < 0; ++i); + assertEq(init(), 1); + assertEq(first(), 0); +} + +f(); diff --git a/js/src/jit-test/tests/parser/bug-1263355-4.js b/js/src/jit-test/tests/parser/bug-1263355-4.js new file mode 100644 index 0000000000..f2b855f7df --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-4.js @@ -0,0 +1,2 @@ +function f(a = (eval("var b"))) {} +f() diff --git a/js/src/jit-test/tests/parser/bug-1263355-40.js b/js/src/jit-test/tests/parser/bug-1263355-40.js new file mode 100644 index 0000000000..0142054d4a --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-40.js @@ -0,0 +1,5 @@ + + +function test(get, [] = Bool16x8(...w), ...of) { + var f; +} diff --git a/js/src/jit-test/tests/parser/bug-1263355-41.js b/js/src/jit-test/tests/parser/bug-1263355-41.js new file mode 100644 index 0000000000..6c79054174 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-41.js @@ -0,0 +1,5 @@ +for (var i = 0; i < 200; i++) { + (function* get(undefined, ...get) { + g.apply(this, arguments); + })(); +} diff --git a/js/src/jit-test/tests/parser/bug-1263355-42.js b/js/src/jit-test/tests/parser/bug-1263355-42.js new file mode 100644 index 0000000000..b874006a4b --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-42.js @@ -0,0 +1,11 @@ +// |jit-test| error: ReferenceError + +function f() { + switch (2) { + case 1: + x = 1; + case (x, 2): + let x; + } +} +f(); diff --git a/js/src/jit-test/tests/parser/bug-1263355-43.js b/js/src/jit-test/tests/parser/bug-1263355-43.js new file mode 100644 index 0000000000..8605108aca --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-43.js @@ -0,0 +1,4 @@ +// |jit-test| error: ReferenceError + +function f(a = x, x = x) {} +f(/y/) diff --git a/js/src/jit-test/tests/parser/bug-1263355-44.js b/js/src/jit-test/tests/parser/bug-1263355-44.js new file mode 100644 index 0000000000..c2de49fd49 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-44.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// Adapted from randomly chosen test: js/src/jit-test/tests/profiler/bug1231925.js +"use strict"; +enableGeckoProfiling(); +oomTest(function() { + eval("(function() {})()"); +}); diff --git a/js/src/jit-test/tests/parser/bug-1263355-45.js b/js/src/jit-test/tests/parser/bug-1263355-45.js new file mode 100644 index 0000000000..968c595664 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-45.js @@ -0,0 +1,8 @@ +// |jit-test| error: ReferenceError + +gczeal(4, 10); +f = ([a = class target extends b {}, b] = [void 0]) => { + class dbg {} + class get {} +}; +f() diff --git a/js/src/jit-test/tests/parser/bug-1263355-46.js b/js/src/jit-test/tests/parser/bug-1263355-46.js new file mode 100644 index 0000000000..e5c3ec1db1 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-46.js @@ -0,0 +1,23 @@ +setJitCompilerOption("ion.warmup.trigger", 4); +var lfLogBuffer = ` +function logProxy(object = {}, handler = {}) { + var log = []; + var proxy = new WeakMap(object, new Proxy(handler, { + get(proto) { + log.push(propertyKey); + } + })); +} +var {proxy, log} = logProxy(); +`; +loadFile(lfLogBuffer); +loadFile(lfLogBuffer); +loadFile(lfLogBuffer); +function loadFile(lfVarx) { + try { + function newFunc(x) { + new Function(x)(); + }; + newFunc(lfVarx); + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/parser/bug-1263355-47.js b/js/src/jit-test/tests/parser/bug-1263355-47.js new file mode 100644 index 0000000000..da6575e3f4 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-47.js @@ -0,0 +1,6 @@ + +for (let x = 0; x < 4; ++x) { + (function() { + for (var set = 0, get, get; eval("\tvar\tx\t=\t1\t");) {} + })() +}; diff --git a/js/src/jit-test/tests/parser/bug-1263355-48.js b/js/src/jit-test/tests/parser/bug-1263355-48.js new file mode 100644 index 0000000000..149db99878 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-48.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +function eval(source) { + offThreadCompileModuleToStencil(source); + let stencil = finishOffThreadStencil(); + let m = instantiateModuleStencil(stencil); + moduleLink(m); + return moduleEvaluate(m); +} +function runTestCase(testcase) { + if (testcase() !== true) {} +} +eval(` + function testcase() { + function set () {} + } + runTestCase(testcase); +`); diff --git a/js/src/jit-test/tests/parser/bug-1263355-49.js b/js/src/jit-test/tests/parser/bug-1263355-49.js new file mode 100644 index 0000000000..e5fad35322 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-49.js @@ -0,0 +1,4 @@ +load(libdir + "iteration.js"); +function* f4(get = [1], f2, ...each) {} +it = f4(); +assertIteratorResult(it.return(2), 2, true); diff --git a/js/src/jit-test/tests/parser/bug-1263355-5.js b/js/src/jit-test/tests/parser/bug-1263355-5.js new file mode 100644 index 0000000000..89fff8ea0e --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-5.js @@ -0,0 +1,3 @@ +// |jit-test| error: ReferenceError + +new class extends Object { constructor(a = (()=>{delete super[super()]})()) { } } diff --git a/js/src/jit-test/tests/parser/bug-1263355-50.js b/js/src/jit-test/tests/parser/bug-1263355-50.js new file mode 100644 index 0000000000..0416249ec1 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-50.js @@ -0,0 +1,4 @@ +// |jit-test| error: TypeError + +function* of([d] = eval("var MYVAR=new String('0Xf');++MYVAR"), ...get) { var x = 42;} +of(); diff --git a/js/src/jit-test/tests/parser/bug-1263355-51.js b/js/src/jit-test/tests/parser/bug-1263355-51.js new file mode 100644 index 0000000000..b2bdb680d0 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-51.js @@ -0,0 +1,9 @@ +// TDZ checks work in destructuring default expressions, +// even after the variables are initialized the first time. + +load(libdir + "asserts.js"); + +assertThrowsInstanceOf(() => { + // should throw the second time through: b is uninitialized + for (const {a=b, b} of [{a:1, b:2}, {b:3}]) {} +}, ReferenceError); diff --git a/js/src/jit-test/tests/parser/bug-1263355-52.js b/js/src/jit-test/tests/parser/bug-1263355-52.js new file mode 100644 index 0000000000..0b0cb4fa21 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-52.js @@ -0,0 +1,11 @@ +// |jit-test| error: ReferenceError + +(function() { + if ({}) {} + else if (x) {} + else {} + + return "" + x; + + let x; +})() diff --git a/js/src/jit-test/tests/parser/bug-1263355-6.js b/js/src/jit-test/tests/parser/bug-1263355-6.js new file mode 100644 index 0000000000..4297e33fba --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-6.js @@ -0,0 +1,3 @@ +// |jit-test| error: TypeError + +(new class extends Array {constructor(a=()=>eval("super()")){ var f = ()=>super(); f() }})(0) diff --git a/js/src/jit-test/tests/parser/bug-1263355-7.js b/js/src/jit-test/tests/parser/bug-1263355-7.js new file mode 100644 index 0000000000..b45f1a97ac --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-7.js @@ -0,0 +1,5 @@ +// |jit-test| error: ReferenceError + +let a; +for(let {a = new class extends Array { constructor(){super(a)} }} of [[]]) { +} diff --git a/js/src/jit-test/tests/parser/bug-1263355-8.js b/js/src/jit-test/tests/parser/bug-1263355-8.js new file mode 100644 index 0000000000..c6d01da9e9 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-8.js @@ -0,0 +1,5 @@ +// |jit-test| error: ReferenceError + +let a; +for(let {a = new class extends Array { constructor(){super[a]} }} of [[]]) { +} diff --git a/js/src/jit-test/tests/parser/bug-1263355-9.js b/js/src/jit-test/tests/parser/bug-1263355-9.js new file mode 100644 index 0000000000..80e991eb05 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263355-9.js @@ -0,0 +1,5 @@ +// |jit-test| error: ReferenceError + +let a; +for(let {a = new class extends Array { constructor(b = (a = eval("()=>super()"))){} }} of [[]]) { +} diff --git a/js/src/jit-test/tests/parser/bug-1263881-1.js b/js/src/jit-test/tests/parser/bug-1263881-1.js new file mode 100644 index 0000000000..f105946098 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263881-1.js @@ -0,0 +1,6 @@ +registerModule('a', parseModule("export let a = 1;")); +let s = ""; +let max = 65536; +for (let i = 0; i < max; i++) + s += "import * as ns" + i + " from 'a';\n"; +parseModule(s); diff --git a/js/src/jit-test/tests/parser/bug-1263881-2.js b/js/src/jit-test/tests/parser/bug-1263881-2.js new file mode 100644 index 0000000000..06c3049085 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263881-2.js @@ -0,0 +1,5 @@ +let s = ""; +let max = 65536; +for (let i = 0; i < max; i++) + s += "let ns" + i + " = "+ i +";\n"; +eval(s); diff --git a/js/src/jit-test/tests/parser/bug-1263881-3.js b/js/src/jit-test/tests/parser/bug-1263881-3.js new file mode 100644 index 0000000000..4d3573b6c5 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1263881-3.js @@ -0,0 +1,6 @@ +let s = "function foo() {\n"; +let max = 65536; +for (let i = 0; i < max; i++) + s += "let ns" + i + " = "+ i +";\n"; +s += "};"; +eval(s); diff --git a/js/src/jit-test/tests/parser/bug-1264568.js b/js/src/jit-test/tests/parser/bug-1264568.js new file mode 100644 index 0000000000..086a04aa94 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1264568.js @@ -0,0 +1,6 @@ +// |jit-test| error: SyntaxError +f = (function(stdlib, foreign, heap) { + "use asm"; + ({ "0" + () + { eval } diff --git a/js/src/jit-test/tests/parser/bug-1316832.js b/js/src/jit-test/tests/parser/bug-1316832.js new file mode 100644 index 0000000000..8b299dd00e --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1316832.js @@ -0,0 +1,10 @@ + +(function(x, x) { + eval(` + var y = 1; + function f() { + return delete y; + } + f(); + `); +})() diff --git a/js/src/jit-test/tests/parser/bug-1319443.js b/js/src/jit-test/tests/parser/bug-1319443.js new file mode 100644 index 0000000000..c2f01c3a8e --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1319443.js @@ -0,0 +1,11 @@ +// |jit-test| error: TypeError + +var global = newGlobal({ cloneSingletons: true }); + +var code = cacheEntry(` +function f() {} +Object.freeze(this); +`); + +evaluate(code, { global, saveIncrementalBytecode: true }); +evaluate(code, { global, saveIncrementalBytecode: true }); diff --git a/js/src/jit-test/tests/parser/bug-1324773-2.js b/js/src/jit-test/tests/parser/bug-1324773-2.js new file mode 100644 index 0000000000..bf485ee602 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1324773-2.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: !('gczeal' in this) + +var lfGlobal = newGlobal(); +lfGlobal.evaluate(` + for (var i = 0; i < 600; i++) + eval('function f' + i + '() {}'); +`); +var lfGlobal = newGlobal(); +lfGlobal.evaluate(` + if (!('gczeal' in this)) + quit(); + var dbg = new Debugger(); + gczeal(9, 10); + dbg.findScripts({}); +`); diff --git a/js/src/jit-test/tests/parser/bug-1324773.js b/js/src/jit-test/tests/parser/bug-1324773.js new file mode 100644 index 0000000000..1ab1a3fb9a --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1324773.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: !('gczeal' in this) + +var lfGlobal = newGlobal(); +lfGlobal.evaluate(` + for (var i = 0; i < 600; i++) + eval('function f' + i + '() {}'); +`); +var lfGlobal = newGlobal(); +lfGlobal.evaluate(` + if (!('gczeal' in this)) + quit(); + var dbg = new Debugger(); + gczeal(9, 1); + dbg.findScripts({}); +`); diff --git a/js/src/jit-test/tests/parser/bug-1355046.js b/js/src/jit-test/tests/parser/bug-1355046.js new file mode 100644 index 0000000000..86bf7bec92 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1355046.js @@ -0,0 +1,8 @@ +// |jit-test| error: ReferenceError + +var localstr = ""; +for (var i = 0; i < 0xFFFC; ++i) + localstr += ('\f') + i + "; "; +var arg = "x"; +var body = localstr + "for (var i = 0; i < 4; ++i) arr[i](x-1);"; +(new Function(arg, body))(1000); diff --git a/js/src/jit-test/tests/parser/bug-1357075.js b/js/src/jit-test/tests/parser/bug-1357075.js new file mode 100644 index 0000000000..47482e372b --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1357075.js @@ -0,0 +1,10 @@ +// |jit-test| error: TypeError + +var iterable = {}; +var iterator = { + return: 1 +}; +iterable[Symbol.iterator] = function() { + return iterator; +}; +for ([ class get {} ().iterator ] of [iterable]) {} diff --git a/js/src/jit-test/tests/parser/bug-1363191.js b/js/src/jit-test/tests/parser/bug-1363191.js new file mode 100644 index 0000000000..779e1a5d1a --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1363191.js @@ -0,0 +1,2 @@ +eval("{ function f() {} }"); +let f; diff --git a/js/src/jit-test/tests/parser/bug-1364648.js b/js/src/jit-test/tests/parser/bug-1364648.js new file mode 100644 index 0000000000..e9b7b1a4ea --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1364648.js @@ -0,0 +1 @@ +assertEq(evaluate("var f = x=>class { }; f()", { columnNumber: 1729 }).toString(), "class { }"); diff --git a/js/src/jit-test/tests/parser/bug-1366927.js b/js/src/jit-test/tests/parser/bug-1366927.js new file mode 100644 index 0000000000..45eb3e69f0 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1366927.js @@ -0,0 +1 @@ +evaluate("\n(y => 1)()", { columnNumber: 1729 }) diff --git a/js/src/jit-test/tests/parser/bug-1385112.js b/js/src/jit-test/tests/parser/bug-1385112.js new file mode 100644 index 0000000000..a84ecd1d26 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1385112.js @@ -0,0 +1 @@ +eval(`let \\u{${"0".repeat(0x8000)}65} = 123;`); diff --git a/js/src/jit-test/tests/parser/bug-1431353-2.js b/js/src/jit-test/tests/parser/bug-1431353-2.js new file mode 100644 index 0000000000..67e05d77a1 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1431353-2.js @@ -0,0 +1,57 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// Test off-thread parsing correctly fixes up prototypes of special objects when +// merging back to the target compartment. + +function execOffThread(source) +{ + offThreadCompileToStencil(source); + var stencil = finishOffThreadStencil(); + return evalStencil(stencil); +} + +function parseModuleOffThread(source) +{ + offThreadCompileModuleToStencil(source); + var stencil = finishOffThreadStencil(); + return instantiateModuleStencil(stencil); +} + +let a = { x: 1 }; +let b = execOffThread("undefined, { x: 1 }") +let c = execOffThread("undefined, { x: 1 }") + +assertEq(Object.getPrototypeOf(a), Object.prototype); +assertEq(Object.getPrototypeOf(b), Object.prototype); +assertEq(Object.getPrototypeOf(c), Object.prototype); + +a = () => 1; +b = execOffThread("() => 1") +c = execOffThread("() => 1") + +assertEq(Object.getPrototypeOf(a), Function.prototype); +assertEq(Object.getPrototypeOf(b), Function.prototype); +assertEq(Object.getPrototypeOf(c), Function.prototype); + +a = [1, 2, 3]; +b = execOffThread("[1, 2, 3]") +c = execOffThread("[1, 2, 3]") + +assertEq(Object.getPrototypeOf(a), Array.prototype); +assertEq(Object.getPrototypeOf(b), Array.prototype); +assertEq(Object.getPrototypeOf(c), Array.prototype); + +a = /a/; +b = execOffThread("/a/") +c = execOffThread("/a/") + +assertEq(Object.getPrototypeOf(a), RegExp.prototype); +assertEq(Object.getPrototypeOf(b), RegExp.prototype); +assertEq(Object.getPrototypeOf(c), RegExp.prototype); + +a = parseModule(""); +b = parseModuleOffThread(""); +c = parseModuleOffThread(""); + +assertEq(Object.getPrototypeOf(b), Object.getPrototypeOf(a)); +assertEq(Object.getPrototypeOf(c), Object.getPrototypeOf(a)); diff --git a/js/src/jit-test/tests/parser/bug-1431353.js b/js/src/jit-test/tests/parser/bug-1431353.js new file mode 100644 index 0000000000..61c83136f2 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1431353.js @@ -0,0 +1,165 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +// Test multiple concurrent off-thread parse jobs. + +function assertFails(f) { + let failed = false; + try { + f(); + } catch (e) { + failed = true; + } + assertEq(failed, true); +} + +function encodeScript(source) +{ + let entry = cacheEntry(source); + let global = newGlobal({ cloneSingletons: true }); + evaluate(entry, { global: global, saveIncrementalBytecode: true }); + return entry; +} + +let a, b, c; +let stencil, stencilA, stencilB, stencilC; + +// Calling run functions without arguments assumes a single off-thread job. + +// Test run functions fail when no jobs exist. + +assertFails(() => finishOffThreadStencil()); + +assertFails(() => finishOffThreadStencil()); + +assertFails(() => finishOffThreadStencil()); + +// Test run functions fail when multiple jobs exist and no ID specified. + +a = offThreadCompileToStencil(""); +b = offThreadCompileToStencil(""); +assertFails(() => finishOffThreadStencil()); +stencilA = finishOffThreadStencil(a); +stencilB = finishOffThreadStencil(b); +evalStencil(stencilA); +evalStencil(stencilB); + +a = offThreadCompileModuleToStencil(""); +b = offThreadCompileModuleToStencil(""); +assertFails(() => finishOffThreadStencil()); +stencilA = finishOffThreadStencil(a); +stencilB = finishOffThreadStencil(b); +instantiateModuleStencil(stencilA); +instantiateModuleStencil(stencilB); + +a = offThreadDecodeStencil(encodeScript("")); +b = offThreadDecodeStencil(encodeScript("")); +assertFails(() => finishOffThreadStencil()); +stencilA = finishOffThreadStencil(a); +stencilB = finishOffThreadStencil(b); +evalStencil(stencilA); +evalStencil(stencilB); + +// Test fun functions succeed when a single job exist and no ID specified. + +offThreadCompileToStencil("42"); +stencil = finishOffThreadStencil(); +assertEq(evalStencil(stencil), 42); + +offThreadCompileModuleToStencil(""); +stencil = finishOffThreadStencil(); +assertEq(typeof instantiateModuleStencil(stencil), "object"); + +offThreadDecodeStencil(encodeScript("23")); +stencil = finishOffThreadStencil(); +assertEq(evalStencil(stencil), 23); + +// Run functions take an ID argument returned from the compile function. + +// Test bad ID type and unknown ID. + +offThreadCompileToStencil(""); +assertFails(() => finishOffThreadStencil("foo")); +assertFails(() => finishOffThreadStencil(42)); +stencil = finishOffThreadStencil(); +evalStencil(stencil); + +offThreadCompileModuleToStencil(""); +assertFails(() => finishOffThreadStencil("foo")); +assertFails(() => finishOffThreadStencil(42)); +stencil = finishOffThreadStencil(); +instantiateModuleStencil(stencil); + +offThreadDecodeStencil(encodeScript("")); +assertFails(() => finishOffThreadStencil("foo")); +assertFails(() => finishOffThreadStencil(42)); +stencil = finishOffThreadStencil(); +evalStencil(stencil); + +// Test stale ID. + +a = offThreadCompileToStencil(""); +stencilA = finishOffThreadStencil(a); +evalStencil(stencilA); +assertFails(() => finishOffThreadStencil(a)); + +a = offThreadCompileModuleToStencil(""); +stencilA = finishOffThreadStencil(a); +assertFails(() => finishOffThreadStencil(a)); +instantiateModuleStencil(stencilA); + +a = offThreadDecodeStencil(encodeScript("")); +stencilA = finishOffThreadStencil(a); +evalStencil(stencilA); +assertFails(() => finishOffThreadStencil(a)); + +// Test running multiple jobs. + +a = offThreadCompileToStencil("1"); +b = offThreadCompileToStencil("2"); +stencilA = finishOffThreadStencil(a); +stencilB = finishOffThreadStencil(b); +assertEq(evalStencil(stencilA), 1); +assertEq(evalStencil(stencilB), 2); + +a = offThreadCompileModuleToStencil(""); +b = offThreadCompileModuleToStencil(""); +stencilA = finishOffThreadStencil(a); +stencilB = finishOffThreadStencil(b); +assertEq(typeof instantiateModuleStencil(stencilA), "object"); +assertEq(typeof instantiateModuleStencil(stencilB), "object"); + +a = offThreadDecodeStencil(encodeScript("3")); +b = offThreadDecodeStencil(encodeScript("4")); +stencilA = finishOffThreadStencil(a); +stencilB = finishOffThreadStencil(b); +assertEq(evalStencil(stencilA), 3); +assertEq(evalStencil(stencilB), 4); + +// Test many jobs. + +const count = 100; +let jobs; + +jobs = new Array(count); +for (let i = 0; i < jobs.length; i++) + jobs[i] = offThreadCompileToStencil(`${i} * ${i}`); +for (let i = 0; i < jobs.length; i++) { + stencil = finishOffThreadStencil(jobs[i]); + assertEq(evalStencil(stencil), i * i); +} + +jobs = new Array(count); +for (let i = 0; i < jobs.length; i++) + jobs[i] = offThreadCompileModuleToStencil(""); +for (let i = 0; i < jobs.length; i++) { + stencil = finishOffThreadStencil(jobs[i]); + assertEq(typeof instantiateModuleStencil(stencil), "object"); +} + +jobs = new Array(count); +for (let i = 0; i < jobs.length; i++) + jobs[i] = offThreadDecodeStencil(encodeScript(`${i} * ${i}`)); +for (let i = 0; i < jobs.length; i++) { + stencil = finishOffThreadStencil(jobs[i]); + assertEq(evalStencil(stencil), i * i); +} diff --git a/js/src/jit-test/tests/parser/bug-1433014.js b/js/src/jit-test/tests/parser/bug-1433014.js new file mode 100644 index 0000000000..efb8ab98d3 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1433014.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: helperThreadCount() === 0 || !('oomTest' in this) +evaluate(` + oomTest(() => { + offThreadCompileToStencil(""); + });`); diff --git a/js/src/jit-test/tests/parser/bug-1465695.js b/js/src/jit-test/tests/parser/bug-1465695.js new file mode 100644 index 0000000000..9c63fcfd1b --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1465695.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +for (let x = 0; x < 99; ++x) + evalInWorker("newGlobal().offThreadCompileToStencil(\"{}\");"); diff --git a/js/src/jit-test/tests/parser/bug-1470992.js b/js/src/jit-test/tests/parser/bug-1470992.js new file mode 100644 index 0000000000..6be1548590 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1470992.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +offThreadCompileModuleToStencil("export { x };"); +gcslice(10); diff --git a/js/src/jit-test/tests/parser/bug-1566974.js b/js/src/jit-test/tests/parser/bug-1566974.js new file mode 100644 index 0000000000..efd176daf0 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1566974.js @@ -0,0 +1,5 @@ +(() => { + (function() { + eval(''); + }()); +})(); diff --git a/js/src/jit-test/tests/parser/bug-1576865-1.js b/js/src/jit-test/tests/parser/bug-1576865-1.js new file mode 100644 index 0000000000..f31539b8ea --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1576865-1.js @@ -0,0 +1,49 @@ +// |jit-test| skip-if: !('oomTest' in this) +var sourceText = ` + function Outer() { + var X00, X01, X02, X03, X04, X05, X06, X07; + var X08, X09, X10, X11, X12, X13, X14, X15; + var X16, X17, X18, X19, X20, X21, X22, X23; + var X24, X25, X26, X27, X28, X29, X30, X31; + + function LazyFunction() { + // Lots of closed-over bindings. + { X00 = true; }; + { X01 = true; }; + { X02 = true; }; + { X03 = true; }; + { X04 = true; }; + { X05 = true; }; + { X06 = true; }; + { X07 = true; }; + { X08 = true; }; + { X09 = true; }; + { X10 = true; }; + { X11 = true; }; + { X12 = true; }; + { X13 = true; }; + { X14 = true; }; + { X15 = true; }; + { X16 = true; }; + { X17 = true; }; + { X18 = true; }; + { X19 = true; }; + { X20 = true; }; + { X21 = true; }; + { X22 = true; }; + { X23 = true; }; + { X24 = true; }; + { X25 = true; }; + { X26 = true; }; + { X27 = true; }; + { X28 = true; }; + { X29 = true; }; + { X30 = true; }; + { X31 = true; }; + } + } +`; + +oomTest(function() { + evaluate(sourceText); + }); diff --git a/js/src/jit-test/tests/parser/bug-1576865-2.js b/js/src/jit-test/tests/parser/bug-1576865-2.js new file mode 100644 index 0000000000..d053c24728 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1576865-2.js @@ -0,0 +1,44 @@ +// |jit-test| skip-if: !('oomTest' in this) +var sourceText = ` + function Outer() { + function LazyFunction() { + // Lots of inner functions. + function F00() { } + function F01() { } + function F02() { } + function F03() { } + function F04() { } + function F05() { } + function F06() { } + function F07() { } + function F08() { } + function F09() { } + function F10() { } + function F11() { } + function F12() { } + function F13() { } + function F14() { } + function F15() { } + function F16() { } + function F17() { } + function F18() { } + function F19() { } + function F20() { } + function F21() { } + function F22() { } + function F23() { } + function F24() { } + function F25() { } + function F26() { } + function F27() { } + function F28() { } + function F29() { } + function F30() { } + function F31() { } + } + } +`; + +oomTest(function() { + evaluate(sourceText); + }); diff --git a/js/src/jit-test/tests/parser/bug-1662260.js b/js/src/jit-test/tests/parser/bug-1662260.js new file mode 100644 index 0000000000..235737657e --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1662260.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function loadX(lfVarx) { + oomTest(function() { + let m55 = parseModule(lfVarx); + }); +} +loadX(` + class B50 { + #priv() {} + } +`) diff --git a/js/src/jit-test/tests/parser/bug-1764737.js b/js/src/jit-test/tests/parser/bug-1764737.js new file mode 100644 index 0000000000..0fcc39e276 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-1764737.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this); --fuzzing-safe; --ion-offthread-compile=off + +function r(src) { + oomTest(function() { + parseModule(src); + }); +} +r("export * from 'y';"); +r("export * from 'y';"); diff --git a/js/src/jit-test/tests/parser/bug-844805-1.js b/js/src/jit-test/tests/parser/bug-844805-1.js new file mode 100644 index 0000000000..b6bad21059 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-844805-1.js @@ -0,0 +1 @@ +if (Math["key"]) {} diff --git a/js/src/jit-test/tests/parser/bug-844805-2.js b/js/src/jit-test/tests/parser/bug-844805-2.js new file mode 100644 index 0000000000..5a278ef9b1 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-844805-2.js @@ -0,0 +1,10 @@ +// Constant folding does not affect strict delete. + +function f(x) { + "use strict"; + + // This senseless delete-expression is legal even in strict mode. Per ES5.1 + // 11.4.1 step 2, it does nothing and returns true. + return delete (1 ? x : x); +} +assertEq(f(), true); diff --git a/js/src/jit-test/tests/parser/bug-888002-1.js b/js/src/jit-test/tests/parser/bug-888002-1.js new file mode 100644 index 0000000000..44333e0bcf --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-888002-1.js @@ -0,0 +1 @@ +Function("var e = delete(false ? e : e)")(); diff --git a/js/src/jit-test/tests/parser/bug-888002-2.js b/js/src/jit-test/tests/parser/bug-888002-2.js new file mode 100644 index 0000000000..f0ccfca998 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-888002-2.js @@ -0,0 +1,12 @@ +// Constant folding doesn't affect non-strict delete. + +(function (x) { + // These senseless delete-expressions are legal. Per ES5.1 11.4.1 step 2, + // each one does nothing and returns true. + assertEq(delete (1 ? x : x), true); + assertEq(delete (0 || x), true); + assertEq(delete (1 && x), true); + + // This one is legal too, but returns false. + assertEq(delete x, false); +}()); diff --git a/js/src/jit-test/tests/parser/bug-888002-3.js b/js/src/jit-test/tests/parser/bug-888002-3.js new file mode 100644 index 0000000000..964ae2e1b9 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-888002-3.js @@ -0,0 +1,18 @@ +// Constant folding doesn't affect strict delete either. +// In particular, it doesn't affect whether |delete x| is a strict error. + +load(libdir + "asserts.js"); + +(function (x) { + "use strict"; + + // These senseless delete-expressions are legal even in strict mode. + // Per ES5.1 11.4.1 step 2, each one does nothing and returns true. + assertEq(delete (1 ? x : x), true); + assertEq(delete (0 || x), true); + assertEq(delete (1 && x), true); + + // Plain `delete x` is a SyntaxError though. + assertThrowsInstanceOf(() => eval('delete x'), SyntaxError); + assertThrowsInstanceOf(() => Function('"use strict"; delete x'), SyntaxError); +}()); diff --git a/js/src/jit-test/tests/parser/bug-888002.js b/js/src/jit-test/tests/parser/bug-888002.js new file mode 100644 index 0000000000..44333e0bcf --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-888002.js @@ -0,0 +1 @@ +Function("var e = delete(false ? e : e)")(); diff --git a/js/src/jit-test/tests/parser/bug-889628.js b/js/src/jit-test/tests/parser/bug-889628.js new file mode 100644 index 0000000000..bb337c35d7 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-889628.js @@ -0,0 +1,33 @@ +// Destructuring assignment to eval or arguments in destructuring is a SyntaxError +// in strict mode + +load(libdir + "asserts.js"); + +var patterns = [ + "[_]", + "[a, b, _]", + "[[_]]", + "[[], [{}, [_]]]", + "{x:_}", + "{x:y, z:_}", + "{0:_}", + "{_}", + "[..._]" +]; + +for (var pattern of patterns) { + var stmt = pattern + " = obj"; + if (stmt[0] == "{") + stmt = "(" + stmt + ")"; + stmt += ";" + + // stmt is a legal statement... + Function(stmt); + + // ...but not if you replace _ with one of these two names. + for (var name of ["eval", "arguments"]) { + var s = stmt.replace("_", name); + Function(s); + assertThrowsInstanceOf(() => Function("'use strict'; " + s), SyntaxError); + } +} diff --git a/js/src/jit-test/tests/parser/bug-896126.js b/js/src/jit-test/tests/parser/bug-896126.js new file mode 100644 index 0000000000..334ea33b92 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-896126.js @@ -0,0 +1,11 @@ +// |jit-test| error: SyntaxError +({ + r: function() { + function f() { + w[0xe56241c6 >> 3] + } + }, + s: function() { + "use asm" + return (1 for + diff --git a/js/src/jit-test/tests/parser/bug-975484.js b/js/src/jit-test/tests/parser/bug-975484.js new file mode 100644 index 0000000000..dfbd0818d1 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug-975484.js @@ -0,0 +1,7 @@ +var loc = Reflect.parse("f()").body[0].expression.loc; +assertEq(loc.start.column, 1); +assertEq(loc.end.column, 4); + +loc = Reflect.parse("f(x)").body[0].expression.loc; +assertEq(loc.start.column, 1); +assertEq(loc.end.column, 5); diff --git a/js/src/jit-test/tests/parser/bug1461034.js b/js/src/jit-test/tests/parser/bug1461034.js new file mode 100644 index 0000000000..84d6ae88ca --- /dev/null +++ b/js/src/jit-test/tests/parser/bug1461034.js @@ -0,0 +1,2 @@ +// |jit-test| skip-if: !('oomTest' in this) +oomTest(function(){s[-1]}); diff --git a/js/src/jit-test/tests/parser/bug1547655.js b/js/src/jit-test/tests/parser/bug1547655.js new file mode 100644 index 0000000000..540e011d9a --- /dev/null +++ b/js/src/jit-test/tests/parser/bug1547655.js @@ -0,0 +1,2 @@ +// |jit-test| allow-unhandlable-oom; allow-oom; skip-if: !('oomTest' in this) +oomTest(() => evaluate(`meta: { with({}) {} }`)); diff --git a/js/src/jit-test/tests/parser/bug1604952.js b/js/src/jit-test/tests/parser/bug1604952.js new file mode 100644 index 0000000000..66ccfe76e5 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug1604952.js @@ -0,0 +1,4 @@ +// This is a leak test to ensure that a folded +// RegExp parse node doesn't leak data. + +/x/ diff --git a/js/src/jit-test/tests/parser/bug1605254.js b/js/src/jit-test/tests/parser/bug1605254.js new file mode 100644 index 0000000000..b8b1794785 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug1605254.js @@ -0,0 +1,4 @@ +// This is a leak test to ensure that a folded +// BigInt parse node doesn't leak data. + +128n diff --git a/js/src/jit-test/tests/parser/bug1657557.js b/js/src/jit-test/tests/parser/bug1657557.js new file mode 100644 index 0000000000..6035035166 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug1657557.js @@ -0,0 +1,7 @@ +setImmutablePrototype(Function.__proto__); + +if (helperThreadCount() > 0) { + offThreadCompileToStencil("function f() {}"); + var stencil = finishOffThreadStencil(); + evalStencil(stencil); +} diff --git a/js/src/jit-test/tests/parser/bug1661454.js b/js/src/jit-test/tests/parser/bug1661454.js new file mode 100644 index 0000000000..ca7792f4bc --- /dev/null +++ b/js/src/jit-test/tests/parser/bug1661454.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function oomTestEval(lfVarx) { + oomTest(() => eval(lfVarx)); +} + +oomTestEval(``); +oomTestEval(` + { + function bug1661454() { } + } +`); diff --git a/js/src/jit-test/tests/parser/bug1750935.js b/js/src/jit-test/tests/parser/bug1750935.js new file mode 100644 index 0000000000..e4f7440848 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug1750935.js @@ -0,0 +1,11 @@ +// Parse-time static string lookup. +var s = "\ue531\ue531\ue531"; +assertEq(s.codePointAt(0), 0xe531); +assertEq(s.codePointAt(1), 0xe531); +assertEq(s.codePointAt(2), 0xe531); + +// Runtime static string lookup. +s = "\ue531\ue531\ue5310n".split(/\d[^]/)[0]; +assertEq(s.codePointAt(0), 0xe531); +assertEq(s.codePointAt(1), 0xe531); +assertEq(s.codePointAt(2), 0xe531); diff --git a/js/src/jit-test/tests/parser/bug1764715.js b/js/src/jit-test/tests/parser/bug1764715.js new file mode 100644 index 0000000000..b203925aa8 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug1764715.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('oomTest' in this) +oomTest(function() { + let m = parseModule(`x = a?.b; x = a?.b; x = a?.b;`); +}); diff --git a/js/src/jit-test/tests/parser/bug1803036.js b/js/src/jit-test/tests/parser/bug1803036.js new file mode 100644 index 0000000000..bb3e237990 --- /dev/null +++ b/js/src/jit-test/tests/parser/bug1803036.js @@ -0,0 +1,22 @@ +// Test that parsing the given source text will throw an error with location set +// to last character in source, rather than after it. +function testErrorPosition(src) { + let failed = false; + + try { + parse(src) + } + catch (e) { + failed = true; + assertEq(e.lineNumber, 1) + assertEq(e.columnNumber, src.length) + } + + assertEq(failed, true); +} + +testErrorPosition("0_") // No trailing separator - Zero +testErrorPosition("00_") // No trailing separator - Octal +testErrorPosition("1_") // No trailing separator - Number +testErrorPosition("1__") // No repeated separator +testErrorPosition("00n") // No octal BigInt diff --git a/js/src/jit-test/tests/parser/bug1835785.js b/js/src/jit-test/tests/parser/bug1835785.js new file mode 100644 index 0000000000..25317757ec --- /dev/null +++ b/js/src/jit-test/tests/parser/bug1835785.js @@ -0,0 +1,8 @@ +// |jit-test| allow-unhandlable-oom; allow-oom; skip-if: !('oomAtAllocation' in this) +function main() { + this + oomAtAllocation(7); + var v7 = /a/ + disassemble(); +} +main(); diff --git a/js/src/jit-test/tests/parser/bytecode-sharing.js b/js/src/jit-test/tests/parser/bytecode-sharing.js new file mode 100644 index 0000000000..26f0ac429c --- /dev/null +++ b/js/src/jit-test/tests/parser/bytecode-sharing.js @@ -0,0 +1,103 @@ +// Test that bytecode is still shared when expected. The expectations can be +// updated if necessary. + + +// Check the testing function. +evaluate(`function a01(){ return a + b; }`) +evaluate(`function a02(){ return a + b; }`) +evaluate(`function a03(){ return a + b + c; }`) +assertEq(hasSameBytecodeData(a01, a02), true) +assertEq(hasSameBytecodeData(a01, a03), false) + + +// Check effect of whitespace. +evaluate(`function b(){}`) +evaluate(`function b01(){}`) +evaluate(`function b02 (){}`) +evaluate(`function b03( ){}`) +evaluate(`function b04() {}`) +evaluate(`function b05(){ }`) +assertEq(hasSameBytecodeData(b, b01), true) +assertEq(hasSameBytecodeData(b, b02), true) +assertEq(hasSameBytecodeData(b, b03), false) +assertEq(hasSameBytecodeData(b, b04), false) +assertEq(hasSameBytecodeData(b, b05), false) + + +// Check effect of binding names. +evaluate(`function c01(){ return a; }`) +evaluate(`function c02(){ return b; }`) +evaluate(`function c03(){ return cc; }`) +assertEq(hasSameBytecodeData(c01, c02), true) +assertEq(hasSameBytecodeData(c01, c03), false) + + +// Check effect of string literals. +evaluate(`function d01(){ return "AA"; }`) +evaluate(`function d02(){ return "BB"; }`) +assertEq(hasSameBytecodeData(d01, d02), true) + + +// Check effect of string template literals. +evaluate("function e01(){ return a`AA`; }") +evaluate("function e02(){ return b`BB`; }") +assertEq(hasSameBytecodeData(e01, e02), true) + + +// Check effect of object literals. +evaluate(`function f01(){ return { a: 1 }; }`) +evaluate(`function f02(){ return { b: 1 }; }`) +evaluate(`function f03(){ return { b: 2 }; }`) +assertEq(hasSameBytecodeData(f01, f02), true) +assertEq(hasSameBytecodeData(f01, f03), false) + + +// Check effect of inner functions. +evaluate(`function g01(){ return () => 0; }`) +evaluate(`function g02(){ return () => 0; }`) +evaluate(`function g03(){ return () => a; }`) +assertEq(hasSameBytecodeData(g01, g02), true) +assertEq(hasSameBytecodeData(g01, g03), true) + + +// Check effect of line number. +evaluate(`function h01(){ return 0; }`) +evaluate(`\nfunction h02(){ return 0; }`) +evaluate(`\n\n\n\n\n\n\nfunction h03(){ return 0; }`) +assertEq(hasSameBytecodeData(h01, h02), true) +assertEq(hasSameBytecodeData(h01, h03), true) + + +// Check effect of line number when function has large gaps in it. This +// corresponds to SetLine source-notes. +evaluate(`function i01(){ return\n\n\n\n\n\n\n\n0; }`) +evaluate(`\nfunction i02(){ return\n\n\n\n\n\n\n\n0; }`) +evaluate(`\n\n\n\n\n\n\nfunction i03(){ return\n\n\n\n\n\n\n\n0; }`) +assertEq(hasSameBytecodeData(i01, i02), true) +assertEq(hasSameBytecodeData(i01, i03), true) + + +// Check effect of column number. +evaluate(`function j01(){ return 0; }`) +evaluate(` function j02(){ return 0; }`) +evaluate(` \tfunction j03(){ return 0; }`) +assertEq(hasSameBytecodeData(j01, j02), true) +assertEq(hasSameBytecodeData(j01, j03), true) + + +// Check different forms of functions. +evaluate(`function k01 () { return 0; }`) +evaluate(`var k02 = function() { return 0; }`) +evaluate(`var k03 = () => { return 0; }`) +assertEq(hasSameBytecodeData(k01, k02), true) +assertEq(hasSameBytecodeData(k01, k03), true) + + +// Check sharing across globals / compartments. +let l02_global = newGlobal({newCompartment: false}); +let l03_global = newGlobal({newCompartment: true}); +evaluate(`function l01() { return 0; }`) +l02_global.evaluate(`function l02() { return 0; }`) +l03_global.evaluate(`function l03() { return 0; }`) +assertEq(hasSameBytecodeData(l01, l02_global.l02), true) +assertEq(hasSameBytecodeData(l01, l03_global.l03), true) diff --git a/js/src/jit-test/tests/parser/columnNumber.js b/js/src/jit-test/tests/parser/columnNumber.js new file mode 100644 index 0000000000..122309dc4b --- /dev/null +++ b/js/src/jit-test/tests/parser/columnNumber.js @@ -0,0 +1,50 @@ +// Simple tests for evaluate's "columnNumber" option. + +load(libdir + 'asserts.js'); + +assertEq(evaluate("saveStack().column"), 1); +assertEq(evaluate("saveStack().column", { columnNumber: 1729 }), 1729); +assertEq(evaluate("\nsaveStack().column", { columnNumber: 1729 }), 1); +assertEq(evaluate("saveStack().column", { columnNumber: "42" }), 42); +// columnNumber < 1 is fixed to 1. +assertEq(evaluate("saveStack().column", { columnNumber: -10 }), 1); +assertThrowsInstanceOf(() => evaluate("saveStack().column", { columnNumber: Math.pow(2,30) }), + RangeError); + +if (helperThreadCount() > 0) { + print("offThreadCompileToStencil 1"); + offThreadCompileToStencil("saveStack().column", { columnNumber: -10 }); + var stencil = finishOffThreadStencil(); + assertEq(evalStencil(stencil), 1); + + print("offThreadCompileToStencil 2"); + offThreadCompileToStencil("saveStack().column", { columnNumber: Math.pow(2,30) }); + assertThrowsInstanceOf(() => { + var stencil = finishOffThreadStencil(); + evalStencil(); + }, RangeError); + + print("offThreadCompileToStencil 3"); + offThreadCompileToStencil("saveStack().column", { columnNumber: 10000 }); + stencil = finishOffThreadStencil(); + assertEq(evalStencil(stencil), 10000); +} + +// Check handling of columns near the limit of our ability to represent them. +// (This is hardly thorough, but since web content can't set column numbers, +// it's probably not worth it to be thorough.) +const maxColumn = Math.pow(2, 30) - 2; +assertEq(evaluate("saveStack().column", { columnNumber: maxColumn }), + maxColumn); + +// Check the saturation behavior when we reach the limit of the column +// representation. +assertEq(evaluate(" saveStack().column", { columnNumber: maxColumn }), + maxColumn + 1); + +// Gathering source text for inclusion in error messages should not try to reach +// outside the buffer to find the start of the source line. The below should +// report the error without crashing. +assertThrowsInstanceOf(() => evaluate("function x(y,y) { 'use strict'; } x()", + { columnNumber: 10 }), + SyntaxError); diff --git a/js/src/jit-test/tests/parser/compile-script.js b/js/src/jit-test/tests/parser/compile-script.js new file mode 100644 index 0000000000..293d25632e --- /dev/null +++ b/js/src/jit-test/tests/parser/compile-script.js @@ -0,0 +1,50 @@ +// |jit-test| skip-if: !('oomTest' in this) + +load(libdir + "asserts.js"); + +let stencil = compileToStencil('314;'); +assertEq(evalStencil(stencil), 314); + +stencil = compileToStencil('let o = { a: 42, b: 2718 }["b"]; o', { prepareForInstantiate: true }); +assertEq(evalStencil(stencil), 2718); + +assertThrowsInstanceOf(() => compileToStencil('let fail ='), SyntaxError); +assertThrowsInstanceOf(() => compileToStencil('42;', 42), Error); + +oomTest(function() { + compileToStencil('"hello stencil!";', { prepareForInstantiate: false }); +}); + +oomTest(function() { + compileToStencil('"hello stencil!";', { prepareForInstantiate: true }); +}); + +// Modules +function compileAndEvaluateModule(script, options) { + if (!options) { + options = {}; + } + options.module = true; + let stencil = compileToStencil(script, options); + let m = instantiateModuleStencil(stencil); + moduleLink(m); + moduleEvaluate(m); + return m; +} + +var m = compileAndEvaluateModule('export let r = 314;'); +assertEq(getModuleEnvironmentValue(m, "r"), 314); + +m = compileAndEvaluateModule('export let r = { a: 42, b: 2718 }["b"];', { prepareForInstantiate: true }); +assertEq(getModuleEnvironmentValue(m, "r"), 2718); + +assertThrowsInstanceOf(() => compileAndEvaluateModule('let fail ='), SyntaxError); +assertThrowsInstanceOf(() => compileToStencil('42;', 42), Error); + +oomTest(function() { + compileAndEvaluateModule('export let r = "hello stencil!";', { prepareForInstantiate: false }); +}); + +oomTest(function() { + compileAndEvaluateModule('export let r = "hello stencil!";', { prepareForInstantiate: true }); +}); diff --git a/js/src/jit-test/tests/parser/dumpStencil-01.js b/js/src/jit-test/tests/parser/dumpStencil-01.js new file mode 100644 index 0000000000..5c06d579c0 --- /dev/null +++ b/js/src/jit-test/tests/parser/dumpStencil-01.js @@ -0,0 +1,24 @@ +dumpStencil("a"); +dumpStencil("ab"); +dumpStencil("abc"); +dumpStencil("/a/"); +dumpStencil("/ab/"); +dumpStencil("/abc/"); +dumpStencil("1"); +dumpStencil("1.2"); +dumpStencil("true"); +dumpStencil("[]"); +dumpStencil("[1]"); +dumpStencil("[1, 2]"); +dumpStencil("({})"); +dumpStencil("({x: 10})"); +dumpStencil("({x: a})"); +dumpStencil("({x:10, y: 20})"); +dumpStencil("({x:10, y: a})"); +dumpStencil("({x:10, [y]: a})"); +dumpStencil("function y() {}"); +dumpStencil("(function y() {})"); +dumpStencil("(function() {})"); +dumpStencil("1n"); +dumpStencil("100n"); +dumpStencil("export var z;", { module : true }); diff --git a/js/src/jit-test/tests/parser/fold-constant-index-access.js b/js/src/jit-test/tests/parser/fold-constant-index-access.js new file mode 100644 index 0000000000..eabe2c5787 --- /dev/null +++ b/js/src/jit-test/tests/parser/fold-constant-index-access.js @@ -0,0 +1,47 @@ +// Constant folding optimizes the element access with string that contains +// 32-bit unsignned integer. +// The result shouldn't be visible to the script, and the optimization shouldn't +// change the behavior. + +// Asserts that the property name and the value are same. +var validator = new Proxy({}, { + set(that, prop, value) { + assertEq(prop, value); + } +}); + +// Optimizable cases. +validator["0"] = "0"; +validator["1"] = "1"; +validator["10"] = "10"; +validator["123"] = "123"; + +// Not optimizable cases. + +// More than UINT32_MAX. +validator["4294967296"] = "4294967296"; +validator["10000000000000"] = "10000000000000"; + +// Leading 0. +validator["01"] = "01"; +validator["0000001"] = "0000001"; + +// Sign. +validator["+1"] = "+1"; +validator["-1"] = "-1"; + +// Non-decimal +validator["0b1"] = "0b1"; +validator["0o1"] = "0o1"; +validator["0x1"] = "0x1"; + +// Non-integer. +validator["1.1"] = "1.1"; +validator["1."] = "1."; +validator[".1"] = ".1"; +validator["0.1"] = "0.1"; + +// Extra character. +validator["1a"] = "1a"; +validator["1 "] = "1 "; +validator[" 1"] = " 1"; diff --git a/js/src/jit-test/tests/parser/home-object-getter.js b/js/src/jit-test/tests/parser/home-object-getter.js new file mode 100644 index 0000000000..d4ee62acc9 --- /dev/null +++ b/js/src/jit-test/tests/parser/home-object-getter.js @@ -0,0 +1,4 @@ +var o = {get a() { + return eval("5"); +}} +assertEq(o.a, 5); diff --git a/js/src/jit-test/tests/parser/lazy-flag-consistency.js b/js/src/jit-test/tests/parser/lazy-flag-consistency.js new file mode 100644 index 0000000000..06096beaa6 --- /dev/null +++ b/js/src/jit-test/tests/parser/lazy-flag-consistency.js @@ -0,0 +1,65 @@ +// These tests highlight potential differences between the lazy and non-lazy +// parse modes. The delazification process should be able to assert that script +// flags are consistent. + +function dead_inner_function_1() { + (function() {}) +} +dead_inner_function_1(); + +function dead_inner_function_2() { + if (false) { + function inner() {} + } +} +dead_inner_function_2(); + +function inner_eval_1() { + eval(""); +} +inner_eval_1(); + +function inner_eval_2() { + (function() { + eval(""); + }) +} +inner_eval_2(); + +function inner_eval_3() { + (() => eval("")); +} +inner_eval_3(); + +function inner_delete_1() { + var x; + (function() { delete x; }) +} +inner_delete_1(); + +function inner_delete_2() { + var x; + (() => delete x); +} +inner_delete_2(); + +function inner_this_1() { + (() => this); +} +inner_this_1(); + +function inner_arguments_1() { + (() => arguments); +} +inner_arguments_1(); + +function constructor_wrapper_1() { + return (function() { + this.initialize.apply(this, arguments); + }); +} +constructor_wrapper_1(); + +var runonce_lazy_1 = function (){}(); + +var runonce_lazy_2 = function* (){}(); diff --git a/js/src/jit-test/tests/parser/lazy-parse-bad-offset.js b/js/src/jit-test/tests/parser/lazy-parse-bad-offset.js new file mode 100644 index 0000000000..676fcd75cb --- /dev/null +++ b/js/src/jit-test/tests/parser/lazy-parse-bad-offset.js @@ -0,0 +1,4 @@ +// Bug 1098132: Shouldn't assert. + +function eval() {}; +eval(); diff --git a/js/src/jit-test/tests/parser/let-after-directive.js b/js/src/jit-test/tests/parser/let-after-directive.js new file mode 100644 index 0000000000..58864ab341 --- /dev/null +++ b/js/src/jit-test/tests/parser/let-after-directive.js @@ -0,0 +1,6 @@ +// 'let' after "use strict" directive without semicolon is lexed as TOK_NAME +// before parsing the directive. 'let' with TOK_NAME should be handled +// correctly in strict mode. + +"use strict" +let a = 1; diff --git a/js/src/jit-test/tests/parser/letContextualKeyword.js b/js/src/jit-test/tests/parser/letContextualKeyword.js new file mode 100644 index 0000000000..8bccfacf0f --- /dev/null +++ b/js/src/jit-test/tests/parser/letContextualKeyword.js @@ -0,0 +1,110 @@ +function expectError(str) { + var log = ""; + try { + eval(str); + } catch (e) { + log += "e"; + assertEq(e instanceof SyntaxError, true); + } + assertEq(log, "e"); +} + +eval(`let x = 42; assertEq(x, 42);`); +eval(`var let = 42; assertEq(let, 42);`); +eval(`let;`); +eval(`[...let] = [];`); +eval(`function let() { return 42; } assertEq(let(), 42);`) +eval(`let {x:x} = {x:42}; assertEq(x, 42);`); +eval(`let [x] = [42]; assertEq(x, 42);`); + +eval(`for (let x in [1]) { assertEq(x, "0"); }`); +eval(`for (const x in [1]) { assertEq(x, "0"); }`); + +eval(`for (let x of [1]) { assertEq(x, 1); }`); +eval(`for (const x of [1]) { assertEq(x, 1); }`); + +eval(`for (let i = 0; i < 1; i++) { assertEq(i, 0); }`); +eval(`var done = false; for (const i = 0; !done; done = true) { assertEq(i, 0); }`); + +eval(`for (let of of [1]) { assertEq(of, 1); }`); +eval(`for (const of of [1]) { assertEq(of, 1); }`); + +eval(`try { throw 17; } catch (let) { assertEq(let, 17); }`); +eval(`try { throw [17]; } catch ([let]) { assertEq(let, 17); }`); +eval(`try { throw { x: 17 }; } catch ({ x: let }) { assertEq(let, 17); }`); +eval(`try { throw {}; } catch ({ x: let = 17 }) { assertEq(let, 17); }`); + +expectError(`try { throw [17, 42]; } catch ([let, let]) {}`); + +eval(`for (let in [1]) { assertEq(let, "0"); }`); +eval(`for (let / 1; ; ) { break; }`); +expectError(`let = {}; for (let.x of;;);`); +expectError(`for (let of [1]) { }`); + +expectError(`for (let let in [1]) { }`); +expectError(`for (const let in [1]) { }`); + +expectError(`for (let let of [1]) { }`); +expectError(`for (const let of [1]) { }`); + +expectError(`for (let let = 17; false; ) { }`); +expectError(`for (const let = 17; false; ) { }`); + +expectError(`for (let [let] = 17; false; ) { }`); +expectError(`for (const [let] = 17; false; ) { }`); + +expectError(`for (let [let = 42] = 17; false; ) { }`); +expectError(`for (const [let = 42] = 17; false; ) { }`); + +expectError(`for (let { x: let } = 17; false; ) { }`); +expectError(`for (const { x: let } = 17; false; ) { }`); + +expectError(`for (let { x: let = 42 } = 17; false; ) { }`); +expectError(`for (const { x: let = 42 } = 17; false; ) { }`); + +expectError("let\nlet;"); +expectError("const\nlet;"); + +expectError(`let let = 17;`); +expectError(`const let = 17;`); + +expectError(`let [let] = 17;`); +expectError(`const [let] = 17;`); + +expectError(`let [let = 42] = 17;`); +expectError(`const [let = 42] = 17;`); + +expectError(`let {let} = 17;`); +expectError(`const {let} = 17;`); + +expectError(`let { let = 42 } = 17;`); +expectError(`const { let = 42 } = 17;`); + +expectError(`let { x: let } = 17;`); +expectError(`const { x: let } = 17;`); + +expectError(`let { x: let = 42 } = 17;`); +expectError(`const { x: let = 42 } = 17;`); + +expectError(`let { ['y']: let } = 17;`); +expectError(`const { ['y']: let } = 17;`); + +expectError(`let { ['y']: let = 42 } = 17;`); +expectError(`const { ['y']: let = 42 } = 17;`); + +expectError(`let { x: [let] } = { x: 17 };`); +expectError(`const { x: [let] } = { x: 17 };`); + +expectError(`let { x: [let = 42] } = { x: 17 };`); +expectError(`const { x: [let = 42] } = { x: 17 };`); + +expectError(`let [foo, let] = 42;`); +expectError(`const [foo, let] = 42;`); + +expectError(`let [foo, { let }] = [17, {}];`); +expectError(`const [foo, { let }] = [17, {}];`); + +expectError(`"use strict"; var let = 42;`); +expectError(`"use strict"; function let() {}`); +expectError(`"use strict"; for (let of [1]) {}`); +expectError(`"use strict"; try {} catch (let) {}`); diff --git a/js/src/jit-test/tests/parser/lineNumber.js b/js/src/jit-test/tests/parser/lineNumber.js new file mode 100644 index 0000000000..f86efbc03e --- /dev/null +++ b/js/src/jit-test/tests/parser/lineNumber.js @@ -0,0 +1,37 @@ + +// Simple tests for evaluate's "lineNumber" option. + +load(libdir + 'asserts.js'); + +const maxLine = Math.pow(2,32) - 1; + +assertEq(evaluate("saveStack().line"), 1); +assertEq(evaluate("saveStack().line", { lineNumber: maxLine }), maxLine); +assertEq(evaluate("\nsaveStack().line"), 2); +assertEq(evaluate("\nsaveStack().line", { lineNumber: 1000 }), 1001); +assertThrowsInstanceOf(() => evaluate("\nsaveStack().line", { lineNumber: maxLine }), + RangeError); + +if (helperThreadCount() > 0) { + offThreadCompileToStencil("saveStack().line"); + var stencil = finishOffThreadStencil(); + assertEq(evalStencil(stencil), 1); + + offThreadCompileToStencil("saveStack().line", { lineNumber: maxLine }); + stencil = finishOffThreadStencil(); + assertEq(evalStencil(stencil), maxLine); + + offThreadCompileToStencil("\nsaveStack().line"); + stencil = finishOffThreadStencil(); + assertEq(evalStencil(stencil), 2); + + offThreadCompileToStencil("\nsaveStack().line", { lineNumber: 1000 }); + stencil = finishOffThreadStencil(); + assertEq(evalStencil(stencil), 1001); + + offThreadCompileToStencil("\nsaveStack().line", { lineNumber: maxLine }); + assertThrowsInstanceOf(() => { + stencil = finishOffThreadStencil(); + evalStencil(stencil); + }, RangeError); +} diff --git a/js/src/jit-test/tests/parser/missing-closing-brace.js b/js/src/jit-test/tests/parser/missing-closing-brace.js new file mode 100644 index 0000000000..53fede80af --- /dev/null +++ b/js/src/jit-test/tests/parser/missing-closing-brace.js @@ -0,0 +1,90 @@ +function test(source, [lineNumber, columnNumber], openType = "{", closeType = "}") { + let caught = false; + try { + Reflect.parse(source, { source: "foo.js" }); + } catch (e) { + assertEq(e.message.includes("missing " + closeType + " "), true); + let notes = getErrorNotes(e); + assertEq(notes.length, 1); + let note = notes[0]; + assertEq(note.message, openType + " opened at line " + lineNumber + ", column " + columnNumber); + assertEq(note.fileName, "foo.js"); + assertEq(note.lineNumber, lineNumber); + assertEq(note.columnNumber, columnNumber); + caught = true; + } + assertEq(caught, true); +} + +// Function + +test(` +function test1() { +} +function test2() { + if (true) { + //} +} +function test3() { +} +`, [4, 18]); + +// Block statement. +test(` +{ + if (true) { +} +`, [2, 1]); +test(` +if (true) { + if (true) { +} +`, [2, 11]); +test(` +for (;;) { + if (true) { +} +`, [2, 10]); +test(` +while (true) { + if (true) { +} +`, [2, 14]); +test(` +do { + do { +} while(true); +`, [2, 4]); + +// try-catch-finally. +test(` +try { + if (true) { +} +`, [2, 5]); +test(` +try { +} catch (e) { + if (true) { +} +`, [3, 13]); +test(` +try { +} finally { + if (true) { +} +`, [3, 11]); + +// Object literal. +test(` +var x = { + foo: { +}; +`, [2, 9]); + +// Array literal. +test(` +var x = [ + [ +]; +`, [2, 9], "[", "]"); diff --git a/js/src/jit-test/tests/parser/modifier-arrow-rest.js b/js/src/jit-test/tests/parser/modifier-arrow-rest.js new file mode 100644 index 0000000000..e66aa5c37d --- /dev/null +++ b/js/src/jit-test/tests/parser/modifier-arrow-rest.js @@ -0,0 +1,11 @@ +load(libdir + "syntax.js"); + +var postfixes = [ + "...foo) => 1 @", +]; + +function check_syntax_error(e, code) { + assertEq(e instanceof SyntaxError, true); +} + +test_syntax(postfixes, check_syntax_error, true); diff --git a/js/src/jit-test/tests/parser/modifier-do-while.js b/js/src/jit-test/tests/parser/modifier-do-while.js new file mode 100644 index 0000000000..9fa9b06dfe --- /dev/null +++ b/js/src/jit-test/tests/parser/modifier-do-while.js @@ -0,0 +1,12 @@ +do 1 +while(false); + +do if (1) { +} while(false); + +do if (1) 1 +while(false); + +do try { +} catch(ex) { +} while(false); diff --git a/js/src/jit-test/tests/parser/modifier-regexp-vs-div.js b/js/src/jit-test/tests/parser/modifier-regexp-vs-div.js new file mode 100644 index 0000000000..7754bcb191 --- /dev/null +++ b/js/src/jit-test/tests/parser/modifier-regexp-vs-div.js @@ -0,0 +1,12 @@ +load(libdir + "syntax.js"); + +var postfixes = [ + "/bar/g; @", + "\n/bar/g; @", +]; + +function check_syntax_error(e, code) { + assertEq(e instanceof SyntaxError, true); +} + +test_syntax(postfixes, check_syntax_error, true); diff --git a/js/src/jit-test/tests/parser/modifier-semicolon-insertion.js b/js/src/jit-test/tests/parser/modifier-semicolon-insertion.js new file mode 100644 index 0000000000..5a5dfee0f2 --- /dev/null +++ b/js/src/jit-test/tests/parser/modifier-semicolon-insertion.js @@ -0,0 +1,48 @@ +Reflect.parse(` +let a +f2() +`); +Reflect.parse(` +let a=1 +f2() +`); +Reflect.parse(` +import 'a' +f2() +`, {target: "module"}); +Reflect.parse(` +export { a } from 'a' +f2() +`, {target: "module"}); +Reflect.parse(` +var a +f2() +`); +Reflect.parse(` +var a=1 +f2() +`); +Reflect.parse(` +f1() +f2() +`); +Reflect.parse(` +while(false) { continue +f2() } +`); +Reflect.parse(` +while(false) { break +f2() } +`); +Reflect.parse(` +function a() { return +f2() } +`); +Reflect.parse(` +throw 1 +f2() +`); +Reflect.parse(` +debugger +f2() +`); diff --git a/js/src/jit-test/tests/parser/modifier-yield-without-operand-1.js b/js/src/jit-test/tests/parser/modifier-yield-without-operand-1.js new file mode 100644 index 0000000000..635acbe323 --- /dev/null +++ b/js/src/jit-test/tests/parser/modifier-yield-without-operand-1.js @@ -0,0 +1,12 @@ +load(libdir + "syntax.js"); + +var postfixes = [ + "yield, @", + "yield; @", +]; + +function check_syntax_error(e, code) { + // No need to check exception type +} + +test_syntax(postfixes, check_syntax_error, true); diff --git a/js/src/jit-test/tests/parser/modifier-yield-without-operand-2.js b/js/src/jit-test/tests/parser/modifier-yield-without-operand-2.js new file mode 100644 index 0000000000..2b7a8ddedb --- /dev/null +++ b/js/src/jit-test/tests/parser/modifier-yield-without-operand-2.js @@ -0,0 +1,13 @@ +load(libdir + "syntax.js"); + +var postfixes = [ + "yield) @", + "yield} @", + "yield] @", +]; + +function check_syntax_error(e, code) { + // No need to check exception type +} + +test_syntax(postfixes, check_syntax_error, true); diff --git a/js/src/jit-test/tests/parser/module-line-0.js b/js/src/jit-test/tests/parser/module-line-0.js new file mode 100644 index 0000000000..6f905a1070 --- /dev/null +++ b/js/src/jit-test/tests/parser/module-line-0.js @@ -0,0 +1,18 @@ +load(libdir + "asserts.js"); + +compileToStencil("", { lineNumber: 1, module: true }); +assertThrowsInstanceOf(() => { + compileToStencil("", { lineNumber: 0, module: true }); +}, Error); + +compileToStencilXDR("", { lineNumber: 1, module: true }); +assertThrowsInstanceOf(() => { + compileToStencilXDR("", { lineNumber: 0, module: true }); +}, Error); + +if (helperThreadCount() > 0) { + offThreadCompileModuleToStencil("", { lineNumber: 1, module: true }); + assertThrowsInstanceOf(() => { + offThreadCompileModuleToStencil("", { lineNumber: 0, module: true }); + }, Error); +} diff --git a/js/src/jit-test/tests/parser/off_thread_compile_oom.js b/js/src/jit-test/tests/parser/off_thread_compile_oom.js new file mode 100644 index 0000000000..5a8e32eb37 --- /dev/null +++ b/js/src/jit-test/tests/parser/off_thread_compile_oom.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0 + +// OOM during off-thread initialization shouldn't leak memory. +eval('oomTest(function(){offThreadCompileToStencil("")})'); diff --git a/js/src/jit-test/tests/parser/off_thread_compile_throws_error.js b/js/src/jit-test/tests/parser/off_thread_compile_throws_error.js new file mode 100644 index 0000000000..7b4323f908 --- /dev/null +++ b/js/src/jit-test/tests/parser/off_thread_compile_throws_error.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +load(libdir + "asserts.js"); + +offThreadCompileToStencil("var shouldFailToParse ="); + +assertThrowsInstanceOf(() => finishOffThreadStencil(), SyntaxError); diff --git a/js/src/jit-test/tests/parser/oom-tracking-line-starts-in-tokenizer.js b/js/src/jit-test/tests/parser/oom-tracking-line-starts-in-tokenizer.js new file mode 100644 index 0000000000..46aa1dbd04 --- /dev/null +++ b/js/src/jit-test/tests/parser/oom-tracking-line-starts-in-tokenizer.js @@ -0,0 +1,143 @@ +// Constraints on this test's appearance: +// +// * |TokenStream::SourceCoords::add| must try to allocate memory. (This test +// ensures this happens by making the function below >=128 lines long so +// that |SourceCoords::lineStartOffsets_| must convert to heap storage. The +// precise approach doesn't matter.) +// * That allocation attempt must fail (by forced simulated OOM, here). +// +// It'd be nice to build up the function programmatically, but it appears that +// the above only happens if the provided function has a lazy script. Cursory +// attempts to relazify |Function("...")| didn't work, so this fuzzer-like +// version had to be used instead. +if ("oomTest" in this) { + oomTest(function() { + try { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } catch(e) { + ; + } + }) +} diff --git a/js/src/jit-test/tests/parser/optimized-out-functions.js b/js/src/jit-test/tests/parser/optimized-out-functions.js new file mode 100644 index 0000000000..10c225d548 --- /dev/null +++ b/js/src/jit-test/tests/parser/optimized-out-functions.js @@ -0,0 +1,7 @@ +// Functions optimized out by constant-folding should have correct +// stencil data. +// This shouldn't hit any assertion while iterating stencil while instantiation. +(function() { + (function() { + }); +}); diff --git a/js/src/jit-test/tests/parser/parse-module.js b/js/src/jit-test/tests/parser/parse-module.js new file mode 100644 index 0000000000..3303be2253 --- /dev/null +++ b/js/src/jit-test/tests/parser/parse-module.js @@ -0,0 +1 @@ +parse("1", {module: true}); diff --git a/js/src/jit-test/tests/parser/parse-non-ascii-latin1.js b/js/src/jit-test/tests/parser/parse-non-ascii-latin1.js new file mode 100644 index 0000000000..91d0c8bd20 --- /dev/null +++ b/js/src/jit-test/tests/parser/parse-non-ascii-latin1.js @@ -0,0 +1,5 @@ +load(libdir + "asserts.js"); + +parse("10"); +assertThrowsInstanceOf(() => parse("10_"), SyntaxError); +assertThrowsInstanceOf(() => parse("10_\xff"), SyntaxError); diff --git a/js/src/jit-test/tests/parser/redeclaration-message.js b/js/src/jit-test/tests/parser/redeclaration-message.js new file mode 100644 index 0000000000..29de3cf7ba --- /dev/null +++ b/js/src/jit-test/tests/parser/redeclaration-message.js @@ -0,0 +1,10 @@ +var aVar = 56; +try { + console.log(aLet); + let aLet = 56; + // We cannot add `caught` variable on the toplevel for this testcase. + // We use assertEq here to catch non-throwing case. + assertEq(true, false); +} catch (e) { + assertEq(e.message, "can't access lexical declaration 'aLet' before initialization"); +} diff --git a/js/src/jit-test/tests/parser/redeclaration.js b/js/src/jit-test/tests/parser/redeclaration.js new file mode 100644 index 0000000000..6f019edb07 --- /dev/null +++ b/js/src/jit-test/tests/parser/redeclaration.js @@ -0,0 +1,229 @@ +// Error message for redeclaration should show the position where the variable +// was declared. + +const npos = -1; + +function test_one(fun, filename, name, + [prevLineNumber, prevColumnNumber], + [lineNumber, columnNumber]) { + let caught = false; + try { + fun(); + } catch (e) { + assertEq(e.message.includes("redeclaration"), true); + assertEq(e.lineNumber, lineNumber); + assertEq(e.columnNumber, columnNumber); + let notes = getErrorNotes(e); + if (prevLineNumber == npos) { + assertEq(notes.length, 0); + } else { + assertEq(notes.length, 1); + let note = notes[0]; + assertEq(note.message, + `Previously declared at line ${prevLineNumber}, column ${prevColumnNumber}`); + assertEq(note.lineNumber, prevLineNumber); + assertEq(note.columnNumber, prevColumnNumber); + if (filename) + assertEq(note.fileName, filename); + } + caught = true; + } + assertEq(caught, true); +} + +function test_parse(source, ...args) { + test_one(() => { + Reflect.parse(source, { source: "foo.js" }); + }, "foo.js", ...args); +} + +function test_eval(source, ...args) { + test_one(() => { + eval(source); + }, undefined, ...args); +} + +function test(...args) { + test_parse(...args); + test_eval(...args); +} + +// let + +test(` +let a, a; +`, "a", [2, 5], [2, 8]); + +test(` +let a; +let a; +`, "a", [2, 5], [3, 5]); + +test(` +let a; +const a = 1; +`, "a", [2, 5], [3, 7]); + +test(` +let a; +var a; +`, "a", [2, 5], [3, 5]); + +test(` +let a; +function a() { +} +`, "a", [2, 5], [3, 10]); + +test(` +{ + let a; + function a() { + } +} +`, "a", [3, 7], [4, 12]); + +// const + +test(` +const a = 1, a = 2; +`, "a", [2, 7], [2, 14]); + +test(` +const a = 1; +const a = 2; +`, "a", [2, 7], [3, 7]); + +test(` +const a = 1; +let a; +`, "a", [2, 7], [3, 5]); + +test(` +const a = 1; +var a; +`, "a", [2, 7], [3, 5]); + +test(` +const a = 1; +function a() { +} +`, "a", [2, 7], [3, 10]); + +test(` +{ + const a = 1; + function a() { + } +} +`, "a", [3, 9], [4, 12]); + +// var + +test(` +var a; +let a; +`, "a", [2, 5], [3, 5]); + +test(` +var a; +const a = 1; +`, "a", [2, 5], [3, 7]); + +// function + +test(` +function a() {}; +let a; +`, "a", [2, 10], [3, 5]); + +test(` +function a() {}; +const a = 1; +`, "a", [2, 10], [3, 7]); + +// Annex B lexical function + +test(` +{ + function a() {}; + let a; +} +`, "a", [3, 12], [4, 7]); + +test(` +{ + function a() {}; + const a = 1; +} +`, "a", [3, 12], [4, 9]); + +// catch parameter + +test(` +try { +} catch (a) { + let a; +} +`, "a", [3, 10], [4, 7]); +test(` +try { +} catch (a) { + const a = 1; +} +`, "a", [3, 10], [4, 9]); + +test(` +try { +} catch (a) { + function a() { + } +} +`, "a", [3, 10], [4, 12]); + +// parameter + +test(` +function f(a) { + let a; +} +`, "a", [2, 12], [3, 7]); + +test(` +function f(a) { + const a = 1; +} +`, "a", [2, 12], [3, 9]); + +test(` +function f([a]) { + let a; +} +`, "a", [2, 13], [3, 7]); + +test(` +function f({a}) { + let a; +} +`, "a", [2, 13], [3, 7]); + +test(` +function f(...a) { + let a; +} +`, "a", [2, 15], [3, 7]); + +test(` +function f(a=1) { + let a; +} +`, "a", [2, 12], [3, 7]); + +// eval +// We don't have position information at runtime. +// No note should be shown. + +test_eval(` +let a; +eval("var a"); +`, "a", [npos, npos], [1, 5]); diff --git a/js/src/jit-test/tests/parser/regexp-after-do-while.js b/js/src/jit-test/tests/parser/regexp-after-do-while.js new file mode 100644 index 0000000000..e94f8ac24d --- /dev/null +++ b/js/src/jit-test/tests/parser/regexp-after-do-while.js @@ -0,0 +1,8 @@ +// RegExp after do-while get parsed. + +load(libdir + "asserts.js"); + +assertNoWarning(() => Function("do {} while (true) \n /bar/g"), SyntaxError, + "RegExp in next line should be parsed"); +assertNoWarning(() => Function("do {} while (true) /bar/g"), SyntaxError, + "RegExp in same line should be parsed"); diff --git a/js/src/jit-test/tests/parser/regexp-after-variable.js b/js/src/jit-test/tests/parser/regexp-after-variable.js new file mode 100644 index 0000000000..3ba2206c1f --- /dev/null +++ b/js/src/jit-test/tests/parser/regexp-after-variable.js @@ -0,0 +1,8 @@ +// RegExp after variable name get parsed or throws error correctly. + +load(libdir + "asserts.js"); + +assertNoWarning(() => Function("var foo \n /bar/g"), SyntaxError, + "RegExp in next line should be parsed"); +assertThrowsInstanceOf(() => Function("var foo /bar/g"), SyntaxError, + "RegExp in same line should be error"); diff --git a/js/src/jit-test/tests/parser/regexp-error-location.js b/js/src/jit-test/tests/parser/regexp-error-location.js new file mode 100644 index 0000000000..0d94cf72ee --- /dev/null +++ b/js/src/jit-test/tests/parser/regexp-error-location.js @@ -0,0 +1,16 @@ +// Check that error location for RegExp points to the actual line/column inside +// the script instead of inside the pattern. +var line, column; +try { + eval(` + + /aaa(/; +123456789; +`); +} catch (e) { + line = e.lineNumber; + column = e.columnNumber; +} + +assertEq(line, 3); +assertEq(column, 7); diff --git a/js/src/jit-test/tests/parser/script-source-extent.js b/js/src/jit-test/tests/parser/script-source-extent.js new file mode 100644 index 0000000000..01624ed143 --- /dev/null +++ b/js/src/jit-test/tests/parser/script-source-extent.js @@ -0,0 +1,337 @@ +// |jit-test| + +// Test that the sourceStart/sourceEnd values of scripts match the current +// expectations. These values are internal details and slightly arbitrary so +// these tests expectations can be updated as needed. +// +// We don't check lineno/column here since they are reasonably robustly +// determined from source start offset. + +// We use the Debugger API to introspect locate (possibly hidden) scripts and +// inspect their internal source coordinates. While we want new globals for each +// test case, they can share the same debuggee compartment. +let dbg = new Debugger(); +let debuggeeCompartment = newGlobal({newCompartment: true}); + +// Some static class field initializer lambdas may be thrown away by GC. +gczeal(0); + +function getScriptSourceExtent(source) { + // NOTE: We will _evaluate_ the source below which may introduce dynamic + // scripts which are also reported. This is intended so that we may test + // those cases too. + + let g = newGlobal({sameCompartmentAs: debuggeeCompartment}); + dbg.addDebuggee(g); + + g.evaluate(source); + + // Use Debugger.findScripts to locate scripts, including hidden ones that + // are implementation details. + let scripts = dbg.findScripts(); + + // Ignore the top-level script since it may or may not be GC'd and is + // otherwise uninteresting to us here. + scripts = scripts.filter(script => (script.sourceStart > 0) || script.isFunction); + + // Sanity-check that line/column are consistent with sourceStart. If we need + // to test multi-line sources, this will need to be updated. + for (let script of scripts) { + assertEq(script.startLine, 1); + assertEq(script.startColumn, script.sourceStart + 1); + } + + // Map each found script to a source extent string. + function getExtentString(script) { + let start = script.sourceStart; + let end = script.sourceStart + script.sourceLength; + let length = script.sourceLength; + + let resultLength = source.length; + assertEq(start < resultLength, true); + assertEq(end <= resultLength, true); + + // The result string takes one of following forms: + // ` ^ `, when start == end. + // ` ^--^ `, typical case. + // ` ^----`, when end == resultLength. + let result = " ".repeat(start) + "^"; + if (end > start) { + result += "^".padStart(length, "-"); + } + return result.padEnd(resultLength) + .substring(0, resultLength); + } + let results = scripts.map(getExtentString); + + // Sort results since `findScripts` does not have deterministic ordering. + results.sort(); + + dbg.removeDebuggee(g); + + return results; +} + +function testSourceExtent(source, ...expectations) { + let actual = getScriptSourceExtent(source); + + // Check that strings of each array match. These should have been presorted. + assertEq(actual.length, expectations.length); + for (let i = 0; i < expectations.length; ++i) { + assertEq(actual[i], expectations[i]); + } +} + +//////////////////// + +// Function statements. +testSourceExtent(`function foo () { }`, + ` ^-----`); +testSourceExtent(`function foo (a) { }`, + ` ^------`); +testSourceExtent(`function foo (a, b) { }`, + ` ^---------`); + +// Function expressions. +testSourceExtent(`let foo = function () { }`, + ` ^-----`); +testSourceExtent(`let foo = function (a) { }`, + ` ^------`); +testSourceExtent(`let foo = function (a, b) { }`, + ` ^---------`); + +// Named function expressions. +testSourceExtent(`let foo = function bar () { }`, + ` ^-----`); +testSourceExtent(`let foo = function bar (a) { }`, + ` ^------`); +testSourceExtent(`let foo = function bar (a, b) { }`, + ` ^---------`); + +// Arrow functions. +testSourceExtent(`let foo = x => { }`, + ` ^-------`); +testSourceExtent(`let foo = x => { };`, + ` ^-------^`); +testSourceExtent(`let foo = () => { }`, + ` ^--------`); +testSourceExtent(`let foo = (a, b) => { }`, + ` ^------------`); +testSourceExtent(`let foo = x => x`, + ` ^-----`); +testSourceExtent(`let foo = () => 0`, + ` ^------`); + +// Async / Generator functions. +testSourceExtent(`function * foo () { }`, + ` ^-----`); +testSourceExtent(`async function foo () { }`, + ` ^-----`); +testSourceExtent(`async function * foo () { }`, + ` ^-----`); + +// Async arrow functions. +testSourceExtent(`let foo = async x => { }`, + ` ^-------`); +testSourceExtent(`let foo = async () => { }`, + ` ^--------`); + +// Basic inner functions. +testSourceExtent(`function foo() { function bar () {} }`, + ` ^----^ `, + ` ^------------------------`); + +// Default parameter expressions. +// NOTE: Arrow function parser back-tracking may generate multiple scripts for +// the same source text. Delazification expects these copies to have correct +// range information for `skipInnerLazyFunction` to work. If syntax parsing is +// disabled (such as for coverage builds), these extra functions are not +// generated. +if (!isLcovEnabled()) { + testSourceExtent(`function foo(a = b => c) {}`, + ` ^-----^ `, + ` ^--------------`); + testSourceExtent(`let foo = (a = (b = c => 1) => 2) => 3;`, + ` ^-----^ `, + ` ^----------------^ `, + ` ^---------------------------^`); +} + +// Object methods, getters, setters. +testSourceExtent(`let obj = { x () {} };`, + ` ^----^ `); +testSourceExtent(`let obj = { * x () {} };`, + ` ^----^ `); +testSourceExtent(`let obj = { async x () {} };`, + ` ^----^ `); +testSourceExtent(`let obj = { async * x () {} };`, + ` ^----^ `); +testSourceExtent(`let obj = { get x () {} };`, + ` ^----^ `); +testSourceExtent(`let obj = { set x (v) {} };`, + ` ^-----^ `); +testSourceExtent(`let obj = { x: function () {} };`, + ` ^----^ `); +testSourceExtent(`let obj = { x: y => z };`, + ` ^-----^ `); + +// Classes without user-defined constructors. +testSourceExtent(` class C { } `, + ` ^----------^`); +testSourceExtent(` let C = class { } `, + ` ^--------^`); +testSourceExtent(` class C { }; class D extends C { } `, + ` ^--------------------^`, + ` ^----------^ `); +testSourceExtent(` class C { }; let D = class extends C { } `, + ` ^------------------^`, + ` ^----------^ `); +testSourceExtent(`let C = class extends class { } { }`, + ` ^--------^ `, + ` ^--------------------------`); + +// Classes with user-defined constructors. +testSourceExtent(` class C { constructor() { } } `, + ` ^-----^ `); +testSourceExtent(` let C = class { constructor() { } } `, + ` ^-----^ `); +testSourceExtent(` class C { }; class D extends C { constructor() { } } `, + ` ^-----^ `, + ` ^----------^ `); +testSourceExtent(` class C { }; let D = class extends C { constructor() { } } `, + ` ^-----^ `, + ` ^----------^ `); +testSourceExtent(`let C = class extends class { } { constructor() { } }`, + ` ^-----^ `, + ` ^--------^ `); + +// Class field initializers lambdas. +// NOTE: These are an implementation detail and may be optimized away in future. +testSourceExtent(`class C { field }`, + ` ^----^ `, + `^----------------`); +testSourceExtent(`class C { field; }`, + ` ^----^ `, + `^-----------------`); +testSourceExtent(`class C { "field" }`, + ` ^------^ `, + `^------------------`); +testSourceExtent(`class C { 0 }`, + ` ^^ `, + `^------------`); +testSourceExtent(`class C { [1n] }`, + ` ^---^ `, + `^---------------`); +testSourceExtent(`class C { field = 1 }`, + ` ^--------^ `, + `^--------------------`); +testSourceExtent(`class C { "field" = 1 }`, + ` ^----------^ `, + `^----------------------`); +testSourceExtent(`class C { 0 = 1 }`, + ` ^----^ `, + `^----------------`); +testSourceExtent(`class C { [1n] = 1}`, + ` ^-------^`, + `^------------------`); + +// Static class field initializer lambdas. +// NOTE: These are an implementation detail and may be optimized away in future. +testSourceExtent(`class C { static field }`, + ` ^----^ `, + `^-----------------------`); +testSourceExtent(`class C { static field; }`, + ` ^----^ `, + `^------------------------`); +testSourceExtent(`class C { static field = 1 }`, + ` ^--------^ `, + `^---------------------------`); +testSourceExtent(`class C { static [0] = 1 }`, + ` ^------^ `, + `^-------------------------`); + +// Static class methods, getters, setters. +testSourceExtent(`class C { static mtd() {} }`, + ` ^----^ `, + `^--------------------------`); +testSourceExtent(`class C { static * mtd() {} }`, + ` ^----^ `, + `^----------------------------`); +testSourceExtent(`class C { static async mtd() {} }`, + ` ^----^ `, + `^--------------------------------`); +testSourceExtent(`class C { static async * mtd() {} }`, + ` ^----^ `, + `^----------------------------------`); +testSourceExtent(`class C { static get prop() {} }`, + ` ^----^ `, + `^-------------------------------`); +testSourceExtent(`class C { static get [0]() {} }`, + ` ^----^ `, + `^------------------------------`); +testSourceExtent(`class C { static set prop(v) {} }`, + ` ^-----^ `, + `^--------------------------------`); + +// Private class field initializer lambdas. +// NOTE: These are an implementation detail and may be optimized away in future. +testSourceExtent(`class C { #field }`, + ` ^-----^ `, + `^-----------------`); +testSourceExtent(`class C { #field = 1 }`, + ` ^---------^ `, + `^---------------------`); +testSourceExtent(`class C { static #field }`, + ` ^-----^ `, + `^------------------------`); +testSourceExtent(`class C { static #field = 1 }`, + ` ^---------^ `, + `^----------------------------`); + +// Private class methods, getters, setters. +// NOTE: These generate both a field initializer lambda and a method script. +testSourceExtent(` class C { #field() { } }`, + ` ^-----^ `, + ` ^-----------------------`); +testSourceExtent(` class C { get #field() { } }`, + ` ^-----^ `, + ` ^---------------^ `, + ` ^---------------------------`); +testSourceExtent(` class C { set #field(v) { } }`, + ` ^------^ `, + ` ^----------------^ `, + ` ^----------------------------`); +testSourceExtent(` class C { * #field() { } }`, + ` ^-----^ `, + ` ^-------------------------`); +testSourceExtent(` class C { async #field() { } }`, + ` ^-----^ `, + ` ^-----------------------------`); +testSourceExtent(` class C { async * #field() { } }`, + ` ^-----^ `, + ` ^-------------------------------`); + +// Private static class methods. +testSourceExtent(` class C { static #mtd() { } }`, + ` ^-----^ `, + ` ^----------------------------`); +testSourceExtent(` class C { static * #mtd() { } }`, + ` ^-----^ `, + ` ^------------------------------`); +testSourceExtent(` class C { static async #mtd() { } }`, + ` ^-----^ `, + ` ^----------------------------------`); +testSourceExtent(` class C { static async * #mtd() { } }`, + ` ^-----^ `, + ` ^------------------------------------`); +testSourceExtent(` class C { static get #prop() { } }`, + ` ^-----^ `, + ` ^---------------------------------`); +testSourceExtent(` class C { static set #prop(v) { } }`, + ` ^------^ `, + ` ^----------------------------------`); + +// Static Class Blocks +testSourceExtent(` class C { static { 10; } }`, + ` ^-------------^ `, + ` ^-------------------------`); diff --git a/js/src/jit-test/tests/parser/standalone-function-name.js b/js/src/jit-test/tests/parser/standalone-function-name.js new file mode 100644 index 0000000000..e676d7cb9c --- /dev/null +++ b/js/src/jit-test/tests/parser/standalone-function-name.js @@ -0,0 +1,22 @@ +function test(name) { + eval(` +function ${name}(stdlib, foreign, heap) { + "use asm"; + var ffi = foreign.t; + return {}; +} +${name}(15, 10); +`); +} + +test("as"); +test("async"); +test("await"); +test("each"); +test("from"); +test("get"); +test("let"); +test("of"); +test("set"); +test("static"); +test("target"); diff --git a/js/src/jit-test/tests/parser/stencil-asmjs.js b/js/src/jit-test/tests/parser/stencil-asmjs.js new file mode 100644 index 0000000000..0379fa05eb --- /dev/null +++ b/js/src/jit-test/tests/parser/stencil-asmjs.js @@ -0,0 +1,28 @@ +// |jit-test| skip-if: isLcovEnabled() + +let source = ` + var m = function() { + "use asm" + function g(){} + return g; + } + + function check() { + var objM = new m; + var g = m(); + // g is a ctor returning an primitive value, thus an empty object + assertEq(Object.getOwnPropertyNames(new g).length, 0); + } + + check() +`; + +// Check that on-demand delazification and concurrent delazification are not +// attempting to parse "use asm" functions. +const options = { + fileName: "tests/asm.js/testBug999790.js", + lineNumber: 1, + eagerDelazificationStrategy: "CheckConcurrentWithOnDemand", + newContext: true, +}; +evaluate(source, options); diff --git a/js/src/jit-test/tests/parser/stencil-compile-invalid-argument.js b/js/src/jit-test/tests/parser/stencil-compile-invalid-argument.js new file mode 100644 index 0000000000..26ed7b9eb4 --- /dev/null +++ b/js/src/jit-test/tests/parser/stencil-compile-invalid-argument.js @@ -0,0 +1,14 @@ +// Passing non-object to `options` argument of stencil testing functions should +// throw. + +load(libdir + "asserts.js"); + +const stencil = compileToStencil(""); +const xdr = compileToStencilXDR(""); + +for (const arg of [0, 1.1, "foo", true, false, null, Symbol.iterator]) { + assertThrowsInstanceOf(() => compileToStencil("", arg), Error); + assertThrowsInstanceOf(() => evalStencil(stencil, arg), Error); + assertThrowsInstanceOf(() => compileToStencilXDR("", arg), Error); + assertThrowsInstanceOf(() => evalStencilXDR(xdr, arg), Error); +} diff --git a/js/src/jit-test/tests/parser/stencil-eager-delazify-certviewer.js b/js/src/jit-test/tests/parser/stencil-eager-delazify-certviewer.js new file mode 100644 index 0000000000..ddd7f32ed4 --- /dev/null +++ b/js/src/jit-test/tests/parser/stencil-eager-delazify-certviewer.js @@ -0,0 +1,35 @@ +// |jit-test| skip-if: helperThreadCount() === 0 || isLcovEnabled() + +const eagerOptions = { + fileName: "certViewer.js", + lineNumber: 1, + eagerDelazificationStrategy: "OnDemandOnly", +}; + +const concurrentOptions = { + fileName: "certViewer.js", + lineNumber: 1, + eagerDelazificationStrategy: "ConcurrentDepthFirst", +}; + +// Check that `undefined` is properly resolved to the global scope. +let script = ` +function certDecoderInitializer() { + return undefined; +} + +let result = certDecoderInitializer(); +export { result }; +`; + +function evalModule(source, opts) { + let job = offThreadCompileModuleToStencil(source, opts); + let stencil = finishOffThreadStencil(job); + let m = instantiateModuleStencil(stencil); + moduleLink(m); + moduleEvaluate(m) + return m.result; +} + +assertEq(evalModule(script, eagerOptions), undefined); +assertEq(evalModule(script, concurrentOptions), undefined); diff --git a/js/src/jit-test/tests/parser/stencil-eager-delazify-empty.js b/js/src/jit-test/tests/parser/stencil-eager-delazify-empty.js new file mode 100644 index 0000000000..3121f5491b --- /dev/null +++ b/js/src/jit-test/tests/parser/stencil-eager-delazify-empty.js @@ -0,0 +1,22 @@ +// |jit-test| skip-if: helperThreadCount() === 0 || isLcovEnabled() + +// Extra GCs can empty the StencilCache to reclaim memory. This lines +// re-configure the gc-zeal setting to prevent this from happening in this test +// case which waits for the cache to contain some entry. +if ('gczeal' in this) + gczeal(0); + +// Generate a source code with no inner functions. +function justVariables(n) { + let text = ""; + for (let i = 0; i < n; i++) { + text += `let v${i} = ${i};`; + } + return text; +}; + +// Create an extra task to test the case where there is nothing to delazify. +let job = offThreadCompileToStencil(justVariables(10000), options); + +const stencil = finishOffThreadStencil(job); +evalStencil(stencil, options); diff --git a/js/src/jit-test/tests/parser/stencil-eager-delazify.js b/js/src/jit-test/tests/parser/stencil-eager-delazify.js new file mode 100644 index 0000000000..d638b16e78 --- /dev/null +++ b/js/src/jit-test/tests/parser/stencil-eager-delazify.js @@ -0,0 +1,75 @@ +// |jit-test| skip-if: helperThreadCount() === 0 || isLcovEnabled() + +// Extra GCs can empty the StencilCache to reclaim memory. This lines +// re-configure the gc-zeal setting to prevent this from happening in this test +// case which waits for the cache to contain some entry. +if ('gczeal' in this) + gczeal(0); + +let u = 0; + +// At each function, create `width` inner functions. +let width = 2; +// Depth of inner functions. +let depth = 4; +// Number of additional parser & delazification workload running concurrently +// with the one we are attempting to measure, such that we can see differences +// in the report of `isInStencilCache`. +let load = 14; + +// Return the number of function generated by a to `depthFirstExec` given the +// same parameters. +function count(w, d) { + return (Math.pow(w, d + 1) - 1) / (w - 1); +} + +// Generate a source code with a large number of inner functions, such that +// eager delazification can be observe while running JS code concurrently. +function depthFirstExec(indent, name, w, d) { + let fun = `${indent}function ${name} (arg) {\n`; + let inner = ""; + let val = `arg + isInStencilCache(${name})`; + if (d > 0) { + for (let i = 0; i < w; i++) { + inner += depthFirstExec(`${indent} `, `${name}_${i}`, w, d - 1); + val = `${name}_${i}(${val})`; + } + } + fun += inner; + fun += `${indent} return ${u} + ${val} - ${u};\n`; + fun += `${indent}}\n`; + u += 1; + return fun; +}; + +const options = { + fileName: "depthFirstExec.js", + lineNumber: 1, + eagerDelazificationStrategy: "ConcurrentDepthFirst", +}; +let script = depthFirstExec("", "raceMe", width, depth); + +let jobs = []; +for (let i = 0; i < load; i++) { + // Spin up extra compilation workload... + jobs.push(offThreadCompileToStencil(script, options)); +} + +const stencil = finishOffThreadStencil(jobs[0]); +evalStencil(stencil, options); + +waitForStencilCache(raceMe); +let start = raceMe(0); +let mid = raceMe(0); +let end = raceMe(0); + +// The garbage collector should clear the cache and suppress all delazification +// tasks. +gc(); +let afterGc = raceMe(0); + +assertEq(1 <= start, true); +assertEq(start <= mid, true); +assertEq(mid <= end, true); +assertEq(end <= count(width, depth), true); +assertEq(afterGc, 0); diff --git a/js/src/jit-test/tests/parser/stencil-laziness-validate.js b/js/src/jit-test/tests/parser/stencil-laziness-validate.js new file mode 100644 index 0000000000..78bcb80910 --- /dev/null +++ b/js/src/jit-test/tests/parser/stencil-laziness-validate.js @@ -0,0 +1,29 @@ +// |jit-test| skip-if: isLcovEnabled() + +load(libdir + "asserts.js"); + +const gWithSource = newGlobal({discardSource: false}); +const gWithoutSource = newGlobal({discardSource: true}); + +const stencil = compileToStencil(""); + +gWithSource.evalStencil(stencil); +assertThrowsInstanceOf(() => gWithoutSource.evalStencil(stencil), gWithoutSource.Error); + +const xdr = compileToStencilXDR(""); +gWithSource.evalStencilXDR(xdr); +assertThrowsInstanceOf(() => gWithoutSource.evalStencilXDR(xdr), gWithoutSource.Error); + +const code = cacheEntry(""); + +evaluate(code, { global: gWithSource, saveIncrementalBytecode: true}); +evaluate(code, { global: gWithSource, loadBytecode: true}); +assertThrowsInstanceOf(() => evaluate(code, { global: gWithoutSource, loadBytecode: true}), gWithoutSource.Error); + +const moduleStencil = compileToStencil("", { module: true }); +gWithSource.instantiateModuleStencil(moduleStencil); +assertThrowsInstanceOf(() => gWithoutSource.instantiateModuleStencil(moduleStencil), gWithoutSource.Error); + +const moduleXDR = compileToStencilXDR("", { module: true }); +gWithSource.instantiateModuleStencilXDR(moduleXDR); +assertThrowsInstanceOf(() => gWithoutSource.instantiateModuleStencilXDR(moduleXDR), gWithoutSource.Error); diff --git a/js/src/jit-test/tests/parser/stencil-scope.js b/js/src/jit-test/tests/parser/stencil-scope.js new file mode 100644 index 0000000000..0dc562147a --- /dev/null +++ b/js/src/jit-test/tests/parser/stencil-scope.js @@ -0,0 +1,134 @@ +const optionsFull = { + fileName: "compileToStencil-DATA.js", + lineNumber: 1, + eagerDelazificationStrategy: "ParseEverythingEagerly", +}; + +const optionsLazy = { + fileName: "compileToStencil-DATA.js", + lineNumber: 1, + eagerDelazificationStrategy: "OnDemandOnly", +}; + +const optionsLazyCache = { + fileName: "compileToStencil-DATA.js", + lineNumber: 1, + eagerDelazificationStrategy: "ConcurrentDepthFirst", +}; + +const optionsLazyCache2 = { + fileName: "compileToStencil-DATA.js", + lineNumber: 1, + eagerDelazificationStrategy: "ConcurrentLargeFirst", +}; + +let result = 0; + +function testMainThread(script_str) { + const stencil = compileToStencil(script_str, optionsFull); + result = evalStencil(stencil, optionsFull); + assertEq(result, 1); +} + +function testMainThreadDelazifyAll(script_str) { + if (isLcovEnabled()) { + // Code-coverage implies forceFullParse = true, and as such it cannot be + // used while testing to incrementally delazify. + return; + } + const stencil = compileToStencil(script_str, optionsLazy); + result = evalStencil(stencil, optionsLazy); + assertEq(result, 1); +} + +function testMainThreadCacheAll(script_str) { + if (isLcovEnabled() || helperThreadCount() === 0) { + // Code-coverage implies forceFullParse = true, and as such it cannot be + // used while testing to incrementally delazify. + // Similarly, concurrent delazification requires off-threads processing. + return; + } + const stencil = compileToStencil(script_str, optionsLazyCache); + result = evalStencil(stencil, optionsLazyCache); + assertEq(result, 1); +} + +function testMainThreadCacheAll2(script_str) { + if (isLcovEnabled() || helperThreadCount() === 0) { + // Code-coverage implies forceFullParse = true, and as such it cannot be + // used while testing to incrementally delazify. + // Similarly, concurrent delazification requires off-threads processing. + return; + } + const stencil = compileToStencil(script_str, optionsLazyCache2); + result = evalStencil(stencil, optionsLazyCache2); + assertEq(result, 1); +} + +function testOffThread(script_str) { + const job = offThreadCompileToStencil(script_str, optionsFull); + const stencil = finishOffThreadStencil(job); + result = evalStencil(stencil, optionsFull); + assertEq(result, 1); +} + +// These patches are meant to wrap the inner code given as argument into one +// kind of scope. The freeVars specify one way to retrieve the variable name +// added in this process if any. +const scopeCases = [ + { code: inner => `{ ${inner} }`, freeVars: [] }, + { code: inner => `{ var v = 1; ${inner} }`, freeVars: ["v"] }, + { code: inner => `{ let l = 1; ${inner} }`, freeVars: ["l"] }, + { code: inner => `{ const c = 1; ${inner} }`, freeVars: ["c"] }, + { code: inner => `with ({ p: 1 }) { ${inner} }`, freeVars: ["p"], + inClass: false }, + { code: inner => `(a => { ${inner} })(1)`, freeVars: ["a"] }, + { code: inner => `function fun(a) { ${inner} }; fun(1)`, freeVars: ["a"], + inClass: false}, + { code: inner => `try { ${inner} } catch(unused) { }`, freeVars: [] }, + { code: inner => `try { throw 1; } catch(t) { ${inner} }`, freeVars: ["t"] }, + { code: inner => `{ class C { #m = 1; constructor() { ${inner} }}; new C() }`, + freeVars: ["this.#m"], isClass: true }, +]; + +// This function is used to generate code which mostly exercise the various kind +// of scopes to cover ScopeContext class in CompilationStencil.h +function generateCode(seed) { + let start = inner => ` + ${inner}; + result + `; + + let prog = [start]; + let freeVars = ["1"]; + let inClass = false; + + while (seed >= freeVars.length) { + let index = seed % scopeCases.length; + seed = (seed / scopeCases.length) | 0; + let scope = scopeCases[index]; + if (inClass && !(scope.inClass ?? false)) { + // Skip illegal code (non-strict) or code which might not accept + // this to work. + continue; + } + inClass ||= scope.isClass ?? false; + prog.push(scope.code); + freeVars = freeVars.concat(scope.freeVars); + } + + let name = freeVars[seed]; + return prog.reduceRight((inner, f) => f(inner), `result = ${name}`); +} + +for (let s = 0; s < 3000; s++) { + let code = generateCode(s); + // console.log(s, ":", code); + testMainThread(code); + testMainThreadDelazifyAll(code); + testMainThreadCacheAll(code); + testMainThreadCacheAll2(code); + if (helperThreadCount() > 0) { + testOffThread(code); + } +} diff --git a/js/src/jit-test/tests/parser/stencil.js b/js/src/jit-test/tests/parser/stencil.js new file mode 100644 index 0000000000..0001ebaca1 --- /dev/null +++ b/js/src/jit-test/tests/parser/stencil.js @@ -0,0 +1,111 @@ +const optionsFull = { + fileName: "compileToStencil-DATA.js", + lineNumber: 1, + eagerDelazificationStrategy: "ParseEverythingEagerly", +}; + +const optionsLazy = { + fileName: "compileToStencil-DATA.js", + lineNumber: 1, + eagerDelazificationStrategy: "OnDemandOnly", +}; + +const optionsLazyCache = { + fileName: "compileToStencil-DATA.js", + lineNumber: 1, + eagerDelazificationStrategy: "ConcurrentDepthFirst", +}; + +function testMainThread(script_str) { + const eval_f = eval; + const stencil = compileToStencil(script_str, optionsFull); + const result = evalStencil(stencil, optionsFull); + assertEq(result, eval_f(script_str)); +} + +function testMainThreadDelazifyAll(script_str) { + if (isLcovEnabled()) { + // Code-coverage implies forceFullParse = true, and as such it cannot be + // used while testing to incrementally delazify. + return; + } + const eval_f = eval; + const stencil = compileToStencil(script_str, optionsLazy); + const result = evalStencil(stencil, optionsLazy); + assertEq(result, eval_f(script_str)); +} + +function testMainThreadCacheAll(script_str) { + if (isLcovEnabled() || helperThreadCount() === 0) { + // Code-coverage implies forceFullParse = true, and as such it cannot be + // used while testing to incrementally delazify. + // Similarly, concurrent delazification requires off-threads processing. + return; + } + const eval_f = eval; + const stencil = compileToStencil(script_str, optionsLazyCache); + const result = evalStencil(stencil, optionsLazyCache); + assertEq(result, eval_f(script_str)); +} + +function testOffThread(script_str) { + const eval_f = eval; + const job = offThreadCompileToStencil(script_str, optionsFull); + const stencil = finishOffThreadStencil(job); + const result = evalStencil(stencil, optionsFull); + assertEq(result, eval_f(script_str)); +} + +testMainThread(` +var a = 10; +let b = 20, c = 30; +const d = 40; +function f() { + return a + b + c + d; +} +f(); +`); + +testMainThreadDelazifyAll(` +var a1 = 10; +let b1 = 20, c1 = 30; +const d1 = 40; +function g1() { + function h1() { + return a1 + b1; + } + return h1() + c1; +} +function f1() { + return a1 + b1 + c1 + d1; +} +f1(); +`); + +testMainThreadCacheAll(` +var a3 = 10; +let b3 = 20, c3 = 30; +const d3 = 40; +function g3() { + function h3() { + return a3 + b3; + } + return h3() + c3; +} +function f3() { + return a3 + b3 + c3 + d3; +} +f3(); +`); + +if (helperThreadCount() > 0) { + testOffThread(` +var a2 = 10; +let b2 = 20, c2 = 30; +const d2 = 40; +function f2() { + return a2 + b2 + c2 + d2; +} +f2(); +`); +} diff --git a/js/src/jit-test/tests/parser/strict-with-asi-and-deprecated-octal.js b/js/src/jit-test/tests/parser/strict-with-asi-and-deprecated-octal.js new file mode 100644 index 0000000000..cb09ac5849 --- /dev/null +++ b/js/src/jit-test/tests/parser/strict-with-asi-and-deprecated-octal.js @@ -0,0 +1,4 @@ +// |jit-test| error: SyntaxError +"use strict" +010 + diff --git a/js/src/jit-test/tests/parser/syntax-error-illegal-character.js b/js/src/jit-test/tests/parser/syntax-error-illegal-character.js new file mode 100644 index 0000000000..03a98122ef --- /dev/null +++ b/js/src/jit-test/tests/parser/syntax-error-illegal-character.js @@ -0,0 +1,22 @@ +load(libdir + "syntax.js"); + +if (!getBuildConfiguration("decorators")) { + function check_syntax_error_at(e, code, name) { + assertEq(e instanceof SyntaxError, true, name + ": " + code); + assertEq(e.message, "illegal character U+0040", name + ": " + code); + } + test_syntax(["@"], check_syntax_error_at, false); +} + +function check_syntax_error_ellipsis(e, code, name) { + assertEq(e instanceof SyntaxError, true, name + ": " + code); + assertEq(e.message, "illegal character U+2026", name + ": " + code); +} +test_syntax(["…"], check_syntax_error_ellipsis, false); + +function check_syntax_error_clown(e, code, name) { + assertEq(e instanceof SyntaxError, true, name + ": " + code); + assertEq(e.message, "illegal character U+1F921", name + ": " + code); +} +test_syntax(["🤡"], check_syntax_error_clown, false); + diff --git a/js/src/jit-test/tests/parser/syntax-parse-error.js b/js/src/jit-test/tests/parser/syntax-parse-error.js new file mode 100644 index 0000000000..4d13989a1e --- /dev/null +++ b/js/src/jit-test/tests/parser/syntax-parse-error.js @@ -0,0 +1,4 @@ +load(libdir + "asserts.js"); + +assertThrowsInstanceOf(() => syntaxParse(">"), SyntaxError); + diff --git a/js/src/jit-test/tests/parser/truncation.js b/js/src/jit-test/tests/parser/truncation.js new file mode 100644 index 0000000000..3cfc6e37f6 --- /dev/null +++ b/js/src/jit-test/tests/parser/truncation.js @@ -0,0 +1,73 @@ +load(libdir + "asserts.js"); + +var cases = [ + "{", + "{ ;", + "var", + "var x,", + "var x =", + "let x,", + "let x =", + "const", + "const x =", + "const x = 1,", + "if", + "if (", + "if (0) ; else", + "do", + "do ;", + "do ; while", + "do ; while (", + "do ; while (1", + "while", + "while (", + "while (1", + "while (1)", + "for", + "for (", + "for (;", + "for (;;", + "for (;;)", + "for (var", + "for (x", + "for (x in", + "for (x in y", + "for (x in y)", + "for (x of", + "for (x of y", + "for (x of y)", + "switch", + "switch (", + "switch (x", + "switch (x)", + "with", + "with (", + "with (x", + "with (x)", + "a:", + "throw", + "try", + "try {", + "try {} catch", + "try {} catch (", + "try {} catch (exc", + "try {} catch (exc if", + "try {} catch (exc if 1", + "try {} finally", + "try {} finally {", + + "function", + "function f", + "function f(", + "function f()", + "function f() {", + "(function", + "(function f", + "(function f(", + "(function f()", + +]; + +for (var s of cases) + assertThrowsInstanceOf(() => Function(s), SyntaxError); + diff --git a/js/src/jit-test/tests/parser/warning-oom.js b/js/src/jit-test/tests/parser/warning-oom.js new file mode 100644 index 0000000000..baf91cb9c9 --- /dev/null +++ b/js/src/jit-test/tests/parser/warning-oom.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// OOM during reporting warning should be handled. + +oomTest(function(){ + new Function("return; 0;"); +}); diff --git a/js/src/jit-test/tests/parser/yield-in-formal-destructuring.js b/js/src/jit-test/tests/parser/yield-in-formal-destructuring.js new file mode 100644 index 0000000000..08e4ed5fd8 --- /dev/null +++ b/js/src/jit-test/tests/parser/yield-in-formal-destructuring.js @@ -0,0 +1 @@ +function d([{ [yield]: {} } ]) { f } diff --git a/js/src/jit-test/tests/pic/arguments.js b/js/src/jit-test/tests/pic/arguments.js new file mode 100644 index 0000000000..0ca82f690d --- /dev/null +++ b/js/src/jit-test/tests/pic/arguments.js @@ -0,0 +1,23 @@ +function f() { + var args = arguments, r; + + for (var i = 0; i < args.length; i++) + r = args[i]; + + return r; +} + +assertEq(f.apply(null, [1, 2, 3, 4, 5, 6]), 6) +assertEq(f.apply(null, [1, 2, 3, 4, 5]), 5) +assertEq(f.apply(null, [1, 2, 3, 4]), 4) + +function g(arg) { + var r; + for (var i = 0; i < arg.length; i++) + r = arg[i]; + return r; +} + +assertEq(g((function () { return arguments; }).call(null, 1, 2, 3)), 3); +assertEq(g(new Float32Array(3)), 0.0); +assertEq(g([1, 2, 3, 4]), 4); diff --git a/js/src/jit-test/tests/pic/bug584642.js b/js/src/jit-test/tests/pic/bug584642.js new file mode 100644 index 0000000000..ebf4d78553 --- /dev/null +++ b/js/src/jit-test/tests/pic/bug584642.js @@ -0,0 +1,3 @@ +// |jit-test| error: ReferenceError +Function("x=[(x)=s]")(); +/* Don't assert. */ diff --git a/js/src/jit-test/tests/pic/bug595706.js b/js/src/jit-test/tests/pic/bug595706.js new file mode 100644 index 0000000000..63c031ad07 --- /dev/null +++ b/js/src/jit-test/tests/pic/bug595706.js @@ -0,0 +1,19 @@ +function f(useArg2, arg2, expect) { + var args = arguments; + if (useArg2) + args = arg2; + + print(args) + assertEq(args.length, expect); +} + +// Generate a PIC for arguments. +f(false, 0, 3); +f(false, 0, 3); +f(false, 0, 3); + +// Now call it with a slow array. +var a = [1, 2, 3]; +a.x = 9; + +f(true, a, 3); diff --git a/js/src/jit-test/tests/pic/bug645184.js b/js/src/jit-test/tests/pic/bug645184.js new file mode 100644 index 0000000000..80d20d45a4 --- /dev/null +++ b/js/src/jit-test/tests/pic/bug645184.js @@ -0,0 +1,8 @@ +var obj = new Object(); +var passed = true; +for (var i = 0; i < 100; i++) { + if (obj['-1'] == null) + obj['-1'] = new Array(); + assertEq(obj['-1'] == null, false); + obj = new Object(); +} diff --git a/js/src/jit-test/tests/pic/call_self.js b/js/src/jit-test/tests/pic/call_self.js new file mode 100644 index 0000000000..0709b23472 --- /dev/null +++ b/js/src/jit-test/tests/pic/call_self.js @@ -0,0 +1,15 @@ +var o = { + g: function(a) { + return a; + } +}; + +function f() { + var z; + for (var i = 0; i < 10; ++i) { + z = o.g(i); + assertEq(z, i); + } +} + +f(); diff --git a/js/src/jit-test/tests/pic/callname-eager-this1.js b/js/src/jit-test/tests/pic/callname-eager-this1.js new file mode 100644 index 0000000000..1052ada52a --- /dev/null +++ b/js/src/jit-test/tests/pic/callname-eager-this1.js @@ -0,0 +1,11 @@ +this.name = "outer"; + +var sb = evalcx(''); +sb.name = "inner"; +sb.parent = this; + +function f() { + assertEq(this.name, "outer"); +} + +evalcx('with(this) { ff = parent.f; }; (function() { eval(""); for(var i=0; i<10; i++) { ff() } })()', sb); diff --git a/js/src/jit-test/tests/pic/callname-eager-this2.js b/js/src/jit-test/tests/pic/callname-eager-this2.js new file mode 100644 index 0000000000..86bd740d14 --- /dev/null +++ b/js/src/jit-test/tests/pic/callname-eager-this2.js @@ -0,0 +1,25 @@ +this.name = "outer"; + +var sb = evalcx(''); +sb.name = "inner"; +sb.parent = this; + +var res = 0; + +function f() { + assertEq(this.name, "outer"); + res++; +} + +// ff is a property of the inner global object. Generate a CALLNAME IC, then +// change ff to a function on the outer global. It should get the inner this +// value. +evalcx('this.ff = function() {};' + + '(function() { ' + + 'eval("");' + + 'for(var i=0; i<10; i++) {' + + 'ff();' + + 'if (i == 5) ff = parent.f;' + + '}' + + '})()', sb); +assertEq(res, 4); diff --git a/js/src/jit-test/tests/pic/callname-global1.js b/js/src/jit-test/tests/pic/callname-global1.js new file mode 100644 index 0000000000..ed34ec6b2a --- /dev/null +++ b/js/src/jit-test/tests/pic/callname-global1.js @@ -0,0 +1,35 @@ +// Check that the implicit-this logic needed for CALLNAME global stubs +// handles non-function values correctly. +var self = this; +var count = 0; +function g1() { + assertEq(this, self); + this.count++; +} +function g2() { + this.count += 10; +} +function f() { + function f1(other) { + eval("gc(); h = g1"); + try { + for(var i=0; i<20; i++) { + h(); + if (i === 9) { + h = other; + } + } + assertEq(typeof other, "function"); + } catch(e) { + assertEq(typeof other !== "function", true); + assertEq(e instanceof TypeError, true); + } + } + f1(3); + f1(null); + f1({}); + f1(Math.abs); + f1(g2); +} +f(); +assertEq(count, 150); diff --git a/js/src/jit-test/tests/pic/callname-global2.js b/js/src/jit-test/tests/pic/callname-global2.js new file mode 100644 index 0000000000..5ee3aa2650 --- /dev/null +++ b/js/src/jit-test/tests/pic/callname-global2.js @@ -0,0 +1,15 @@ +g0 = function(i) { + this["g"+(i+1)] = g0; + return "g"+(i+1); +} +function f() { + a = eval("g0"); + for(var i=0; i<40; i++) { + a = this[a(i)]; + if (i === 30) { + gc(); + } + assertEq(this["g" + i], g0); + } +} +f(); diff --git a/js/src/jit-test/tests/pic/callname-with.js b/js/src/jit-test/tests/pic/callname-with.js new file mode 100644 index 0000000000..0a988edbf3 --- /dev/null +++ b/js/src/jit-test/tests/pic/callname-with.js @@ -0,0 +1,15 @@ +var res; +var x = 0; + +function f() { + x = {x: 1, f: function() { res = this.x; }}; + with(x) { + g = function() { + eval(""); + f(); + } + g(); + } +} +f(); +assertEq(res, 1); diff --git a/js/src/jit-test/tests/pic/densearray.js b/js/src/jit-test/tests/pic/densearray.js new file mode 100644 index 0000000000..1d0e8fa7c3 --- /dev/null +++ b/js/src/jit-test/tests/pic/densearray.js @@ -0,0 +1,12 @@ +function f() { + var o = [ 1, 2, 3, 4, 5 ]; + + for (var i = 6; i < 10; ++i) + o.push(i); + + return o; +} + +var o = f(); + +assertEq(o.join(','), [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ].join(',')); \ No newline at end of file diff --git a/js/src/jit-test/tests/pic/getelem-large-index.js b/js/src/jit-test/tests/pic/getelem-large-index.js new file mode 100644 index 0000000000..c7f813ea2a --- /dev/null +++ b/js/src/jit-test/tests/pic/getelem-large-index.js @@ -0,0 +1,13 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +function testProperty(i) +{ + actual = obj[String(i)]; +} + +var obj = {}; +var index = [null, 1073741824, 1073741825]; +for (var j in index) + testProperty(index[j]); diff --git a/js/src/jit-test/tests/pic/grandproto.js b/js/src/jit-test/tests/pic/grandproto.js new file mode 100644 index 0000000000..0dd65fc328 --- /dev/null +++ b/js/src/jit-test/tests/pic/grandproto.js @@ -0,0 +1,28 @@ +function A() +{ + this.a = 77; + this.b = 88; +} + +function B() +{ +} + +B.prototype = new A; + +function C() +{ +} + +C.prototype = new B; + +function f() { + var o = new C; + var z; + for (var i = 0; i < 5; ++i) { + z = o.a; + assertEq(z, 77); + } +} + +f(); \ No newline at end of file diff --git a/js/src/jit-test/tests/pic/length_array.js b/js/src/jit-test/tests/pic/length_array.js new file mode 100644 index 0000000000..ab77749b76 --- /dev/null +++ b/js/src/jit-test/tests/pic/length_array.js @@ -0,0 +1,16 @@ +// length, string + +var expected = "3,6,4,3,6,4,3,6,4,3,6,4,"; +var actual = ''; + +function f() { + var ss = [ [1, 2, 3], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4] ]; + + for (var i = 0; i < 12; ++i) { + actual += ss[i%3].length + ','; + } +} + +f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/pic/length_mix.js b/js/src/jit-test/tests/pic/length_mix.js new file mode 100644 index 0000000000..094762f1e7 --- /dev/null +++ b/js/src/jit-test/tests/pic/length_mix.js @@ -0,0 +1,22 @@ +// length, various types + +var expected = "4,5,44,5,44,4,44,4,5,4,5,44,5,44,4,44,4,5,"; +var actual = ''; + +function f() { + var a = [ "abcd", [1, 2, 3, 4, 5], { length: 44 } ]; + + for (var i = 0; i < 6; ++i) { + // Use 3 PICs so we start out with each type in one PIC. + var i1 = i % 3; + var i2 = (i+1) % 3; + var i3 = (i+2) % 3; + actual += a[i1].length + ','; + actual += a[i2].length + ','; + actual += a[i3].length + ','; + } +} + +f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/pic/length_object.js b/js/src/jit-test/tests/pic/length_object.js new file mode 100644 index 0000000000..5f01d57dff --- /dev/null +++ b/js/src/jit-test/tests/pic/length_object.js @@ -0,0 +1,16 @@ +// length, object + +var expected = "777,777,777,777,777,"; +var actual = ''; + +function f() { + var o = { a: 11, length: 777, b: 22 }; + + for (var i = 0; i < 5; ++i) { + actual += o.length + ','; + } +} + +f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/pic/length_string.js b/js/src/jit-test/tests/pic/length_string.js new file mode 100644 index 0000000000..abdf62cbf6 --- /dev/null +++ b/js/src/jit-test/tests/pic/length_string.js @@ -0,0 +1,16 @@ +// length, string + +var expected = "3,6,4,3,6,4,3,6,4,3,6,4,"; +var actual = ''; + +function f() { + var ss = [ "abc", "foobar", "quux" ]; + + for (var i = 0; i < 12; ++i) { + actual += ss[i%3].length + ','; + } +} + +f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/pic/length_string_object.js b/js/src/jit-test/tests/pic/length_string_object.js new file mode 100644 index 0000000000..534c6b451e --- /dev/null +++ b/js/src/jit-test/tests/pic/length_string_object.js @@ -0,0 +1,36 @@ +//length, string, object + +var expected = "3,6,4,3,6,4,3,6,4,3,6,4,"; +var actual = ''; + +function f() { + var ss = [new String("abc"), new String("foobar"), new String("quux")]; + + for (var i = 0; i < 12; ++i) { + actual += ss[i%3].length + ','; + } +} + +f(); + +assertEq(actual, expected); + + +function g(s) { + return new String(s).length; +} + +assertEq(g("x"), 1); // Warm-up +assertEq(g("x"), 1); // Create IC +assertEq(g("x"), 1); // Test IC + +function h(s) { + var x = new String(s); + for (var i = 0; i < 100; i++) + x[i] = i; + return x.length; +} + +assertEq(h("x"), 1); +assertEq(h("x"), 1); +assertEq(h("x"), 1); diff --git a/js/src/jit-test/tests/pic/proto1.js b/js/src/jit-test/tests/pic/proto1.js new file mode 100644 index 0000000000..4c98dd7da0 --- /dev/null +++ b/js/src/jit-test/tests/pic/proto1.js @@ -0,0 +1,24 @@ +// getprop, proto, 1 shape + +var expected = "11,22,33,11,22,33,11,22,33,11,22,33,11,22,33,"; +var actual = ''; + +var proto = { a: 11, b: 22, c: 33 }; + +function B() { +} +B.prototype = proto; + +function f() { + var o = new B(); + + for (var i = 0; i < 5; ++i) { + actual += o.a + ','; + actual += o.b + ','; + actual += o.c + ','; + } +} + +f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/pic/proto3.js b/js/src/jit-test/tests/pic/proto3.js new file mode 100644 index 0000000000..48800ebb99 --- /dev/null +++ b/js/src/jit-test/tests/pic/proto3.js @@ -0,0 +1,32 @@ +// getprop, proto, 3 shapes + +var expected = "22,202,202,22,202,202,22,202,202,"; +var actual = ''; + +var protoB = { a: 11, b: 22, c: 33 }; + +function B() { +} +B.prototype = protoB; + +var protoC = { a: 101, b: 202, c: 303 }; + +function C() { +} +C.prototype = protoC; + +function f() { + var o1 = new B(); + var o2 = new C(); + var o3 = new C(); + o3.q = 99; + var oa = [ o1, o2, o3 ]; + + for (var i = 0; i < 9; ++i) { + actual += oa[i%3].b + ','; + } +} + +f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/pic/proto_self.js b/js/src/jit-test/tests/pic/proto_self.js new file mode 100644 index 0000000000..faa3e4a8ee --- /dev/null +++ b/js/src/jit-test/tests/pic/proto_self.js @@ -0,0 +1,39 @@ +// getprop, proto and self, 3 shapes + +var expected = "22,202,99;202,99,22;99,22,202;22,202,99;202,99,22;99,22,202;22,202,99;202,99,22;99,22,202;"; +var actual = ''; + +var protoB = { a: 11, b: 22, c: 33 }; + +function B() { +} +B.prototype = protoB; + +var protoC = { a: 101, b: 202, c: 303 }; + +function C() { +} +C.prototype = protoC; + +function f() { + var o1 = new B(); + var o2 = new C(); + var o3 = new C(); + o3.b = 99; + var oa = [ o1, o2, o3 ]; + + for (var i = 0; i < 9; ++i) { + // Use 3 PICs so we start out with each type in one PIC. + var i1 = i % 3; + var i2 = (i+1) % 3; + var i3 = (i+2) % 3; + + actual += oa[i1].b + ','; + actual += oa[i2].b + ','; + actual += oa[i3].b + ';'; + } +} + +f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/pic/self1.js b/js/src/jit-test/tests/pic/self1.js new file mode 100644 index 0000000000..3a8d45e520 --- /dev/null +++ b/js/src/jit-test/tests/pic/self1.js @@ -0,0 +1,18 @@ +// getprop, self, 1 shape + +var expected = "11,22,33,11,22,33,11,22,33,11,22,33,11,22,33,"; +var actual = ''; + +function f() { + var o = { a: 11, b: 22, c: 33 }; + + for (var i = 0; i < 5; ++i) { + actual += o.a + ','; + actual += o.b + ','; + actual += o.c + ','; + } +} + +f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/pic/self2.js b/js/src/jit-test/tests/pic/self2.js new file mode 100644 index 0000000000..146771c672 --- /dev/null +++ b/js/src/jit-test/tests/pic/self2.js @@ -0,0 +1,18 @@ +// getprop, self, 2 shapes + +var expected = "22,303,22,303,22,303,22,303,"; +var actual = ''; + +function f() { + var o1 = { a: 11, b: 22, c: 33 }; + var o2 = { x: 101, y: 202, b: 303 }; + var oa = [ o1, o2 ]; + + for (var i = 0; i < 8; ++i) { + actual += oa[i%2].b + ','; + } +} + +f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/pic/self3.js b/js/src/jit-test/tests/pic/self3.js new file mode 100644 index 0000000000..b865a224d5 --- /dev/null +++ b/js/src/jit-test/tests/pic/self3.js @@ -0,0 +1,19 @@ +// getprop, self, 3 shapes + +var expected = "22,303,1001,22,303,1001,22,303,"; +var actual = ''; + +function f() { + var o1 = { a: 11, b: 22, c: 33 }; + var o2 = { x: 101, y: 202, b: 303 }; + var o3 = { b: 1001, x: 2002, y: 3003 }; + var oa = [ o1, o2, o3 ]; + + for (var i = 0; i < 8; ++i) { + actual += oa[i%3].b + ','; + } +} + +f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/pic/self8.js b/js/src/jit-test/tests/pic/self8.js new file mode 100644 index 0000000000..3c0523cb04 --- /dev/null +++ b/js/src/jit-test/tests/pic/self8.js @@ -0,0 +1,32 @@ +// getprop, self, 8 shapes + +var expected = "0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,"; +var actual = ''; + +function letter(i) { + return String.fromCharCode(97 + i); +} + +function f() { + // Build 8 objects with different shapes and x in different slots. + var oa = []; + for (var i = 0; i < 8; ++i) { + var o = {}; + for (var j = 0; j < 8; ++j) { + if (j != i) { + o[letter(j)] = 1000 + i * 10 + j; + } else { + o.x = i; + } + } + oa[i] = o; + } + + for (var i = 0; i < 24; ++i) { + actual += oa[i%8].x + ','; + } +} + +f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/pic/set-assign.js b/js/src/jit-test/tests/pic/set-assign.js new file mode 100644 index 0000000000..227d92a338 --- /dev/null +++ b/js/src/jit-test/tests/pic/set-assign.js @@ -0,0 +1,10 @@ +function f() { + var o = { a: 555 }; + + for (var j = 0; j < 10; ++j) { + var i = o.a = 100 + j; + assertEq(i, 100 + j); + } +} + +f() \ No newline at end of file diff --git a/js/src/jit-test/tests/pic/set1.js b/js/src/jit-test/tests/pic/set1.js new file mode 100644 index 0000000000..58db0a3f0d --- /dev/null +++ b/js/src/jit-test/tests/pic/set1.js @@ -0,0 +1,11 @@ +function f() { + var o = { a: 5 }; + + for (var i = 0; i < 5; ++i) { + o.a = i; + } + + assertEq(o.a, 4); +} + +f(); \ No newline at end of file diff --git a/js/src/jit-test/tests/pic/set2.js b/js/src/jit-test/tests/pic/set2.js new file mode 100644 index 0000000000..8713642e48 --- /dev/null +++ b/js/src/jit-test/tests/pic/set2.js @@ -0,0 +1,14 @@ +function f(k) { + var o1 = { a: 5 }; + var o2 = { b : 7, a : 9 }; + + for (var i = 0; i < k; ++i) { + var o = i % 2 ? o2 : o1; + o.a = i; + } + + return o1.a + ',' + o2.a; +} + +assertEq(f(5), '4,3') +assertEq(f(6), '4,5') diff --git a/js/src/jit-test/tests/pic/shape_regen.js b/js/src/jit-test/tests/pic/shape_regen.js new file mode 100644 index 0000000000..55b3ff1cfa --- /dev/null +++ b/js/src/jit-test/tests/pic/shape_regen.js @@ -0,0 +1,33 @@ +// Try to test that we handle shape regeneration correctly. +// This is a fragile test, but as of this writing, on dmandelin's +// windows box, we have the same shape number with different +// logical shapes in the two assertEq lines. + +var o; +var p; +var zz; +var o2; + +function f(x) { + return x.a; +} + +gczeal(1); +gc(); + +zz = { q: 11 }; +o = { a: 77, b: 88 }; +o2 = { c: 11 }; +p = { b: 99, a: 11 }; + +//print('s ' + shapeOf(zz) + ' ' + shapeOf(o) + ' ' + shapeOf(o2) + ' ' + shapeOf(p)); + +assertEq(f(o), 77); + +o = undefined; + +gczeal(1); +gc(); +//print('s ' + 'x' + ' ' + shapeOf(p)); + +assertEq(f(p), 11); diff --git a/js/src/jit-test/tests/pic/thisprop.js b/js/src/jit-test/tests/pic/thisprop.js new file mode 100644 index 0000000000..e20d6993d2 --- /dev/null +++ b/js/src/jit-test/tests/pic/thisprop.js @@ -0,0 +1,30 @@ +// test getthisprop + +var expected = "22,22,22,;33,33,33,;"; +var actual = ''; + +function f() { + for (var i = 0; i < 3; ++i) { + actual += this.b + ','; + } + actual += ';'; +} + +function A() { + this.a = 11; + this.b = 22; +}; + +A.prototype.f = f; + +function B() { + this.b = 33; + this.c = 44; +}; + +B.prototype.f = f; + +new A().f(); +new B().f(); + +assertEq(actual, expected); diff --git a/js/src/jit-test/tests/pic/to-dictionary.js b/js/src/jit-test/tests/pic/to-dictionary.js new file mode 100644 index 0000000000..e4f22021f8 --- /dev/null +++ b/js/src/jit-test/tests/pic/to-dictionary.js @@ -0,0 +1,9 @@ +function f() { + var MAX_HEIGHT = 512; + var obj = {}; + for (var i = 0; i < MAX_HEIGHT; i++) + obj['a' + i] = i; + obj.m = function () { return 0; }; +} +f(); +f(); diff --git a/js/src/jit-test/tests/profiler/AutoEntryMonitor-01.js b/js/src/jit-test/tests/profiler/AutoEntryMonitor-01.js new file mode 100644 index 0000000000..c64a121b66 --- /dev/null +++ b/js/src/jit-test/tests/profiler/AutoEntryMonitor-01.js @@ -0,0 +1,50 @@ +// AutoEntryMonitor should catch all entry points into JavaScript. + +load(libdir + 'array-compare.js'); + +function cold_and_warm(f, params, expected) { + print(JSON.stringify(params)); + print(JSON.stringify(entryPoints(params))); + assertEq(arraysEqual(entryPoints(params), expected), true); + + // Warm up the function a bit, so the JITs will compile it, and try again. + if (f) + for (i = 0; i < 10; i++) + f(); + + assertEq(arraysEqual(entryPoints(params), expected), true); +} + +function entry1() { } +cold_and_warm(entry1, { function: entry1 }, [ "entry1" ]); + +var getx = { get x() { } }; +cold_and_warm(Object.getOwnPropertyDescriptor(getx, 'x').get, + { object: getx, property: 'x' }, [ "get x" ]); + +var sety = { set y(v) { } }; +cold_and_warm(Object.getOwnPropertyDescriptor(sety, 'y').set, + { object: sety, property: 'y', value: 'glerk' }, [ "set y" ]); + +cold_and_warm(Object.prototype.toString, { ToString: {} }, []); + +var toS = { toString: function myToString() { return "string"; } }; +cold_and_warm(toS.toString, { ToString: toS }, [ "myToString" ]); + +cold_and_warm(undefined, { ToNumber: 5 }, []); + +var vOf = { valueOf: function myValueOf() { return 42; } }; +cold_and_warm(vOf.valueOf, { ToNumber: vOf }, [ "myValueOf" ]); + +var toSvOf = { toString: function relations() { return Object; }, + valueOf: function wallpaper() { return 17; } }; +cold_and_warm(() => { toSvOf.toString(); toSvOf.valueOf(); }, + { ToString: toSvOf }, [ "relations", "wallpaper" ]); + +var vOftoS = { toString: function ettes() { return "6-inch lengths"; }, + valueOf: function deathBy() { return Math; } }; +cold_and_warm(() => { vOftoS.valueOf(); vOftoS.toString(); }, + { ToNumber: vOftoS }, [ "deathBy", "ettes" ]); + + +cold_and_warm(() => 0, { eval: "Math.atan2(1,1);" }, [ "eval:entryPoint eval" ]); diff --git a/js/src/jit-test/tests/profiler/AutoEntryMonitor-02.js b/js/src/jit-test/tests/profiler/AutoEntryMonitor-02.js new file mode 100644 index 0000000000..1aee82068c --- /dev/null +++ b/js/src/jit-test/tests/profiler/AutoEntryMonitor-02.js @@ -0,0 +1,12 @@ +// Nested uses of AutoEntryMonitor should behave with decorum. + +load(libdir + 'array-compare.js'); + +function Cobb() { + var twoShot = { toString: function Saito() { return Object; }, + valueOf: function Fischer() { return "Ariadne"; } }; + assertEq(arraysEqual(entryPoints({ ToString: twoShot }), + [ "Saito", "Fischer" ]), true); +} + +assertEq(arraysEqual(entryPoints({ function: Cobb }), ["Cobb"]), true); diff --git a/js/src/jit-test/tests/profiler/bug1135703.js b/js/src/jit-test/tests/profiler/bug1135703.js new file mode 100644 index 0000000000..3bad17e943 --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1135703.js @@ -0,0 +1,6 @@ + +for (var idx = 0; idx < 20; ++idx) { + newFunc("enableGeckoProfilingWithSlowAssertions(); disableGeckoProfiling();"); +} +newFunc("enableGeckoProfiling();"); +function newFunc(x) { new Function(x)(); }; diff --git a/js/src/jit-test/tests/profiler/bug1161351.js b/js/src/jit-test/tests/profiler/bug1161351.js new file mode 100644 index 0000000000..2da402275b --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1161351.js @@ -0,0 +1,16 @@ +function x() { n; } +function f() { + try { x(); } catch(ex) {} +} +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () {};"); +enableGeckoProfiling(); +try { + enableSingleStepProfiling(); +} catch (e) { + // Not all platforms support single-step profiling. +} +f(); +f(); +f(); diff --git a/js/src/jit-test/tests/profiler/bug1164448.js b/js/src/jit-test/tests/profiler/bug1164448.js new file mode 100644 index 0000000000..61e88022ff --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1164448.js @@ -0,0 +1,26 @@ +// |jit-test| error: TypeError + +print = function(s) { return s.toString(); } +var gTestcases = new Array(); +function TestCase(n, d, e, a) { + return gTestcases[gTc++] = this; +} + dump = print; + for ( gTc=0; gTc < gTestcases.length; gTc++ ) {} +function jsTestDriverEnd() { + for (var i = 0; i < gTestcases.length; i++) + gTestcases[i].dump(); +} +TestCase(); +var g = newGlobal(); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () {};"); +enableGeckoProfiling(); +if (getBuildConfiguration("arm-simulator")) + enableSingleStepProfiling(1); +loadFile("jsTestDriverEnd();"); +loadFile("jsTestDriverEnd();"); +jsTestDriverEnd(); +function loadFile(lfVarx) { + try { evaluate(lfVarx); } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/profiler/bug1211962.js b/js/src/jit-test/tests/profiler/bug1211962.js new file mode 100644 index 0000000000..d47d823ff2 --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1211962.js @@ -0,0 +1,11 @@ +// |jit-test| slow; skip-if: !('oomTest' in this) || helperThreadCount() === 0 + +enableGeckoProfiling(); +var lfGlobal = newGlobal(); +for (lfLocal in this) { + lfGlobal[lfLocal] = this[lfLocal]; +} +const script = 'oomTest(() => getBacktrace({args: true, locals: "123795", thisprops: true}));'; +lfGlobal.offThreadCompileToStencil(script); +var stencil = lfGlobal.finishOffThreadStencil(); +lfGlobal.evalStencil(stencil); diff --git a/js/src/jit-test/tests/profiler/bug1231925.js b/js/src/jit-test/tests/profiler/bug1231925.js new file mode 100644 index 0000000000..87325b6763 --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1231925.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +enableGeckoProfiling(); +oomTest(function() { + eval("(function() {})()") +}); diff --git a/js/src/jit-test/tests/profiler/bug1233921.js b/js/src/jit-test/tests/profiler/bug1233921.js new file mode 100644 index 0000000000..18cce796be --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1233921.js @@ -0,0 +1,19 @@ +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () {}"); +enableGeckoProfiling(); +try { + enableSingleStepProfiling(); +} catch(e) { + quit(); +} +f(); +f(); +function $ERROR() { + throw Error; +} +function f() { + try { + $ERROR() + } catch (ex) {} +} diff --git a/js/src/jit-test/tests/profiler/bug1242840.js b/js/src/jit-test/tests/profiler/bug1242840.js new file mode 100644 index 0000000000..8770403409 --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1242840.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: !('oomTest' in this) + +enableGeckoProfiling(); +oomTest(() => { + try { + for (quit of ArrayBuffer); + } catch (e) { + switch (1) { + case 0: + let x + case 1: + (function() { return x; })() + } + } +}) diff --git a/js/src/jit-test/tests/profiler/bug1261324.js b/js/src/jit-test/tests/profiler/bug1261324.js new file mode 100644 index 0000000000..053f00928e --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1261324.js @@ -0,0 +1,24 @@ +g = newGlobal({newCompartment: true}) +g.parent = this +g.eval("new Debugger(parent).onExceptionUnwind = function () {}") +enableGeckoProfiling() + +try { + // Only the ARM simulator supports single step profiling. + enableSingleStepProfiling(); +} catch (e) { + quit(); +} + +function assertThrowsInstanceOf(f) { + try { + f() + } catch (exc) {} +} +function testThrow(thunk) { + for (i = 0; i < 20; i++) { + iter = thunk() + assertThrowsInstanceOf(function() { return iter.throw(); }) + } +} +testThrow(function*() {}) diff --git a/js/src/jit-test/tests/profiler/bug1352507-1.js b/js/src/jit-test/tests/profiler/bug1352507-1.js new file mode 100644 index 0000000000..540c4d5350 --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1352507-1.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +evalInWorker("enableGeckoProfiling()"); diff --git a/js/src/jit-test/tests/profiler/bug1427774.js b/js/src/jit-test/tests/profiler/bug1427774.js new file mode 100644 index 0000000000..53a3103f3b --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1427774.js @@ -0,0 +1,29 @@ +setJitCompilerOption("baseline.warmup.trigger", 0); +enableGeckoProfiling(); +try { + enableSingleStepProfiling(); +} catch(e) { + quit(); +} +function removeAdd(dbg, g) { + dbg.removeDebuggee(g); +} +function newGlobalDebuggerPair(toggleSeq) { + var g = newGlobal({newCompartment: true}); + var dbg = new Debugger; + dbg.addDebuggee(g); + g.eval("" + function f() {return 100}); + return [g, dbg]; +} +function testTrap(toggleSeq) { + var [g, dbg] = newGlobalDebuggerPair(toggleSeq); + dbg.onEnterFrame = function(f) { + f.script.setBreakpoint(Symbol.iterator == (this) ^ (this), { + hit: function() { + toggleSeq(dbg, g); + } + }); + }; + assertEq(g.f(), 100); +} +testTrap(removeAdd); diff --git a/js/src/jit-test/tests/profiler/bug1478509.js b/js/src/jit-test/tests/profiler/bug1478509.js new file mode 100644 index 0000000000..eafe5a70b5 --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1478509.js @@ -0,0 +1,5 @@ +// |jit-test| error: SyntaxError +enableGeckoProfiling(); +s = newGlobal(); +evalcx("let x;", s); +evalcx("let x;", s); diff --git a/js/src/jit-test/tests/profiler/bug1502744.js b/js/src/jit-test/tests/profiler/bug1502744.js new file mode 100644 index 0000000000..c0f1ee3dfd --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1502744.js @@ -0,0 +1,20 @@ +// |jit-test| error:ReferenceError +(function(global) { + global.makeIterator = function makeIterator(overrides) { + var iterator = { + return: function(x) { + return overrides.ret(x); + } + }; + return function() { + return iterator; + }; + } +})(this); +var iterable = {}; +iterable[Symbol.iterator] = makeIterator({ + ret: (function() { + enableGeckoProfilingWithSlowAssertions(); + }) +}); +0, [...{} [throwlhs()]] = iterable; diff --git a/js/src/jit-test/tests/profiler/bug1563889.js b/js/src/jit-test/tests/profiler/bug1563889.js new file mode 100644 index 0000000000..c8f9776ada --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1563889.js @@ -0,0 +1,3 @@ +// |jit-test| skip-if: !('oomTest' in this) +for (var i = 0; i < 20; i++) {} +oomTest(enableGeckoProfiling); diff --git a/js/src/jit-test/tests/profiler/bug1774149.js b/js/src/jit-test/tests/profiler/bug1774149.js new file mode 100644 index 0000000000..08c44b462b --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1774149.js @@ -0,0 +1,14 @@ +// |jit-test| --fast-warmup +function* f() { + try { + yield; + } finally { + for (let i = 0; i < 10; i++) {} + } +} +enableGeckoProfilingWithSlowAssertions(); +for (var i = 0; i < 25; ++i) { + let it = f(); + it.next(); + it.return(); +} diff --git a/js/src/jit-test/tests/profiler/bug1782003.js b/js/src/jit-test/tests/profiler/bug1782003.js new file mode 100644 index 0000000000..34219a7179 --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug1782003.js @@ -0,0 +1,28 @@ +function getStack() { + enableGeckoProfiling(); + let stack = readGeckoProfilingStack(); + // The number of frames depends on JIT flags, but there must be at least + // one frame for the caller and at most 3 total (the global script, 'testFun' + // and 'getStack'). + assertEq(stack.length > 0, true); + assertEq(stack.length <= 3, true); + assertEq(JSON.stringify(stack).includes('"testFun ('), true); + disableGeckoProfiling(); +} +function testFun() { + // Loop until this is a JIT frame. + while (true) { + let isJitFrame = inJit(); + if (typeof isJitFrame === "string") { + return; // JIT disabled. + } + if (isJitFrame) { + break; + } + } + + // Now call getStack to check this frame is on the profiler's JIT stack. + getStack(); + getStack(); +} +testFun(); diff --git a/js/src/jit-test/tests/profiler/bug925309.js b/js/src/jit-test/tests/profiler/bug925309.js new file mode 100644 index 0000000000..9301cb74ae --- /dev/null +++ b/js/src/jit-test/tests/profiler/bug925309.js @@ -0,0 +1,2 @@ + +for(var i = 0; i < 100; enableGeckoProfiling(), i++) {} diff --git a/js/src/jit-test/tests/profiler/debugmode-osr-exception-return-addr.js b/js/src/jit-test/tests/profiler/debugmode-osr-exception-return-addr.js new file mode 100644 index 0000000000..f91ce610e5 --- /dev/null +++ b/js/src/jit-test/tests/profiler/debugmode-osr-exception-return-addr.js @@ -0,0 +1,16 @@ +// |jit-test| error: ReferenceError + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("new Debugger(parent).onExceptionUnwind = function () { };"); +enableGeckoProfiling(); + +try { + // Only the ARM simulator supports single step profiling. + enableSingleStepProfiling(); +} catch (e) { + throw new ReferenceError; +} + +enableSingleStepProfiling(); +a() diff --git a/js/src/jit-test/tests/profiler/debugmode-osr-resume-addr.js b/js/src/jit-test/tests/profiler/debugmode-osr-resume-addr.js new file mode 100644 index 0000000000..0246234932 --- /dev/null +++ b/js/src/jit-test/tests/profiler/debugmode-osr-resume-addr.js @@ -0,0 +1,11 @@ +enableGeckoProfiling(); +try { + // Only the ARM simulator supports single step profiling. + enableSingleStepProfiling(); +} catch (e) { + quit(0); +} +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) {}; +g.eval("var line = new Error().lineNumber; debugger;"); diff --git a/js/src/jit-test/tests/profiler/enterjit-osr-disabling-earlyret.js b/js/src/jit-test/tests/profiler/enterjit-osr-disabling-earlyret.js new file mode 100644 index 0000000000..f8184696e8 --- /dev/null +++ b/js/src/jit-test/tests/profiler/enterjit-osr-disabling-earlyret.js @@ -0,0 +1,13 @@ +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 20); + +enableGeckoProfilingWithSlowAssertions(); +(function() { + var n = 50; + while (n--) { + disableGeckoProfiling(); + if (!n) + return; + enableGeckoProfilingWithSlowAssertions(); + } +})(); diff --git a/js/src/jit-test/tests/profiler/enterjit-osr-disabling.js b/js/src/jit-test/tests/profiler/enterjit-osr-disabling.js new file mode 100644 index 0000000000..e0663e6a95 --- /dev/null +++ b/js/src/jit-test/tests/profiler/enterjit-osr-disabling.js @@ -0,0 +1,9 @@ +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 20); + +enableGeckoProfilingWithSlowAssertions(); +(function() { + disableGeckoProfiling(); + var n = 50; + while (n--); +})(); diff --git a/js/src/jit-test/tests/profiler/enterjit-osr-enabling-earlyret.js b/js/src/jit-test/tests/profiler/enterjit-osr-enabling-earlyret.js new file mode 100644 index 0000000000..e63531f504 --- /dev/null +++ b/js/src/jit-test/tests/profiler/enterjit-osr-enabling-earlyret.js @@ -0,0 +1,12 @@ +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 20); + +(function() { + var n = 50; + while (n--) { + enableGeckoProfilingWithSlowAssertions(); + if (!n) + return; + disableGeckoProfiling(); + } +})(); diff --git a/js/src/jit-test/tests/profiler/enterjit-osr-enabling.js b/js/src/jit-test/tests/profiler/enterjit-osr-enabling.js new file mode 100644 index 0000000000..aaad2c32a4 --- /dev/null +++ b/js/src/jit-test/tests/profiler/enterjit-osr-enabling.js @@ -0,0 +1,8 @@ +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 20); + +(function() { + enableGeckoProfilingWithSlowAssertions(); + var n = 50; + while (n--); +})(); diff --git a/js/src/jit-test/tests/profiler/enterjit-osr.js b/js/src/jit-test/tests/profiler/enterjit-osr.js new file mode 100644 index 0000000000..b490fafc96 --- /dev/null +++ b/js/src/jit-test/tests/profiler/enterjit-osr.js @@ -0,0 +1,8 @@ +setJitCompilerOption("baseline.warmup.trigger", 10); +setJitCompilerOption("ion.warmup.trigger", 20); + +enableGeckoProfilingWithSlowAssertions(); +(function() { + var n = 50; + while (n--); +})(); diff --git a/js/src/jit-test/tests/profiler/exception-unwind-hook.js b/js/src/jit-test/tests/profiler/exception-unwind-hook.js new file mode 100644 index 0000000000..6b52d1615d --- /dev/null +++ b/js/src/jit-test/tests/profiler/exception-unwind-hook.js @@ -0,0 +1,22 @@ +// Test interaction between exception handler, debugger's onExceptionUnwind, +// and profiler's frame iterator. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval("" + function f() { + for (var i = 0; i < 120; i++) { + try { throw 1; } catch {} + } +}); + +var count = 0; +dbg.onExceptionUnwind = function() { + enableGeckoProfiling(); + readGeckoProfilingStack(); + disableGeckoProfiling(); + count++; +}; + +g.f(); +assertEq(count, 120); diff --git a/js/src/jit-test/tests/profiler/getter-setter-ic.js b/js/src/jit-test/tests/profiler/getter-setter-ic.js new file mode 100644 index 0000000000..225d69895e --- /dev/null +++ b/js/src/jit-test/tests/profiler/getter-setter-ic.js @@ -0,0 +1,32 @@ +// Ensure readGeckoProfilingStack() doesn't crash with Ion +// getter/setter ICs on the stack. +function getObjects() { + var objs = []; + objs.push({x: 0, get prop() { + readGeckoProfilingStack(); + return ++this.x; + }, set prop(v) { + readGeckoProfilingStack(); + this.x = v + 2; + }}); + objs.push({x: 0, y: 0, get prop() { + readGeckoProfilingStack(); + return this.y; + }, set prop(v) { + readGeckoProfilingStack(); + this.y = v; + }}); + return objs; +} +function f() { + var objs = getObjects(); + var res = 0; + for (var i=0; i<100; i++) { + var o = objs[i % objs.length]; + res += o.prop; + o.prop = i; + } + assertEq(res, 4901); +} +enableGeckoProfiling(); +f(); diff --git a/js/src/jit-test/tests/profiler/interpreter-stacks.js b/js/src/jit-test/tests/profiler/interpreter-stacks.js new file mode 100644 index 0000000000..737a8fce18 --- /dev/null +++ b/js/src/jit-test/tests/profiler/interpreter-stacks.js @@ -0,0 +1,105 @@ +// |jit-test| --no-blinterp +// Disable Baseline Interpreter and JITs because we only read information about +// C++ Interpreter profiling frames. + +enableGeckoProfilingWithSlowAssertions(); + +function assertStack(stack, expected) { + assertEq(stack.length, expected.length); + for (let i = 0; i < stack.length; i++) { + // Use |split| to get rid of the file name. + assertEq(stack[i].dynamicString.split(" (")[0], expected[i]); + } +} + +// We currently don't push entries for frames that were already on the stack +// when the profiler was enabled. +assertStack(readGeckoInterpProfilingStack(), []); + +function testBasic() { + let g1 = function() { + return readGeckoInterpProfilingStack(); + } + let f1 = () => g1(); + assertStack(f1(), ["testBasic", "f1", "g1"]); + + // Test non-function frames. + assertStack(evaluate("eval(`(function foo() { return readGeckoInterpProfilingStack(); })()`)"), + ["testBasic", "@evaluate", "@evaluate line 1 > eval:1:1", "foo"]); +} +testBasic(); +testBasic(); + +function testThrow() { + let stacks = []; + let thrower = function() { + stacks.push(readGeckoInterpProfilingStack()); + throw 1; + }; + let catcher = function() { + try { + thrower(); + } catch (e) { + stacks.push(readGeckoInterpProfilingStack()); + } + }; + catcher(); + assertEq(stacks.length, 2); + assertStack(stacks[0], ["testThrow", "catcher", "thrower"]); + assertStack(stacks[1], ["testThrow", "catcher"]); +} +testThrow(); +testThrow(); + +function testSelfHosted() { + let stacks = [1, 2, 3].map(function() { + return readGeckoInterpProfilingStack(); + }); + assertEq(stacks.length, 3); + for (var stack of stacks) { + assertStack(stack, ["testSelfHosted", "map", "testSelfHosted/stacks<"]); + } +} +testSelfHosted(); +testSelfHosted(); + +function testGenerator() { + let stacks = []; + let generator = function*() { + stacks.push(readGeckoInterpProfilingStack()); + yield 1; + stacks.push(readGeckoInterpProfilingStack()); + yield 2; + stacks.push(readGeckoInterpProfilingStack()); + }; + for (let x of generator()) {} + assertStack(readGeckoInterpProfilingStack(), ["testGenerator"]); + + assertEq(stacks.length, 3); + for (var stack of stacks) { + assertStack(stack, ["testGenerator", "next", "generator"]); + } +} +testGenerator(); +testGenerator(); + +async function testAsync() { + let stacks = []; + let asyncFun = async function() { + stacks.push(readGeckoInterpProfilingStack()); + await 1; + stacks.push(readGeckoInterpProfilingStack()); + }; + await asyncFun(); + assertStack(readGeckoInterpProfilingStack(), ["AsyncFunctionNext", "testAsync"]); + + assertEq(stacks.length, 2); + assertStack(stacks[0], ["testAsync", "asyncFun"]); + assertStack(stacks[1], ["AsyncFunctionNext", "asyncFun"]); +} +testAsync(); +drainJobQueue(); +testAsync(); +drainJobQueue(); + +disableGeckoProfiling(); diff --git a/js/src/jit-test/tests/profiler/ion-rectifier-frame-bug1530351.js b/js/src/jit-test/tests/profiler/ion-rectifier-frame-bug1530351.js new file mode 100644 index 0000000000..651b635179 --- /dev/null +++ b/js/src/jit-test/tests/profiler/ion-rectifier-frame-bug1530351.js @@ -0,0 +1,6 @@ +function test(str) { + for (let i = 0; i < 100; ++i) + Reflect.apply(String.prototype.substring, str, []) +} +enableGeckoProfilingWithSlowAssertions(); +test(""); diff --git a/js/src/jit-test/tests/profiler/jsop-resume-return-bug1451385-1.js b/js/src/jit-test/tests/profiler/jsop-resume-return-bug1451385-1.js new file mode 100644 index 0000000000..f8e2f1f3d7 --- /dev/null +++ b/js/src/jit-test/tests/profiler/jsop-resume-return-bug1451385-1.js @@ -0,0 +1,10 @@ +// |jit-test| error:ReferenceError + +enableGeckoProfiling("Math.round", "-0.49", -0); +function* g(n) { + for (var i = 0; i < n; i++) yield i; +} +var inner = g(20); +for (let target of inner) { + if (GeneratorObjectPrototype() == i(true, true) == (this) == (this)) {} +} diff --git a/js/src/jit-test/tests/profiler/jsop-resume-return-bug1451385-2.js b/js/src/jit-test/tests/profiler/jsop-resume-return-bug1451385-2.js new file mode 100644 index 0000000000..98e1ee0817 --- /dev/null +++ b/js/src/jit-test/tests/profiler/jsop-resume-return-bug1451385-2.js @@ -0,0 +1,9 @@ +// |jit-test| error:ReferenceError + +function* g(n) { + for (var i = 0; i < n; i++) yield i; +} +var inner = g(20); +for (let target of inner) { + if (GeneratorObjectPrototype() == i(true, true) == (this) == (this)) {} +} diff --git a/js/src/jit-test/tests/profiler/pc-count-profiler.js b/js/src/jit-test/tests/profiler/pc-count-profiler.js new file mode 100644 index 0000000000..235055af3b --- /dev/null +++ b/js/src/jit-test/tests/profiler/pc-count-profiler.js @@ -0,0 +1,53 @@ +// Smoke test for the PC count profiler. + +function f(x) { + if (x < 10) + return 0; + if (x < 50) + return 1; + return 2; +} + +L: try { + // Profile the test function "f". + pccount.start(); + for (var i = 0; i < 100; ++i) f(i); + pccount.stop(); + + // Count the profiled scripts, stop if no scripts were profiled. + var n = pccount.count(); + if (n === 0) + break L; + + // Find the script index for "f". + var scriptIndex = -1; + for (var i = 0; i < n; ++i) { + var summary = JSON.parse(pccount.summary(i)); + if (summary.name === "f") + scriptIndex = i; + } + + // Stop if the script index for "f" wasn't found. + if (scriptIndex < 0) + break L; + + // Retrieve the profiler data for "f". + var contents = pccount.contents(scriptIndex); + assertEq(typeof contents, "string"); + + // The profiler data should be parsable as JSON text. + var contents = JSON.parse(contents, (name, value) => { + // Split the Ion code segments into multiple entries. + if (name === "code") + return value.split("\n"); + + return value; + }); + + // Pretty print the profiler data. + var pretty = JSON.stringify(contents, null, 1); + print(pretty); +} finally { + // Clean-up. + pccount.purge(); +} diff --git a/js/src/jit-test/tests/profiler/test-baseline-eval-frame-profiling.js b/js/src/jit-test/tests/profiler/test-baseline-eval-frame-profiling.js new file mode 100644 index 0000000000..fafa9a12d9 --- /dev/null +++ b/js/src/jit-test/tests/profiler/test-baseline-eval-frame-profiling.js @@ -0,0 +1,11 @@ + +setJitCompilerOption("baseline.warmup.trigger", 10); + +function main() { + for (var i = 0; i < 50; i++) + eval("for (var j = 0; j < 50; j++) readGeckoProfilingStack();"); +} + +gczeal(2, 10000); +enableGeckoProfilingWithSlowAssertions(); +main(); diff --git a/js/src/jit-test/tests/profiler/test-bug1026485.js b/js/src/jit-test/tests/profiler/test-bug1026485.js new file mode 100644 index 0000000000..4d0acc9c4c --- /dev/null +++ b/js/src/jit-test/tests/profiler/test-bug1026485.js @@ -0,0 +1,15 @@ + +function TestCase(n, d, e, a) { + return TestCase.prototype.dump = function () {}; +} +enableGeckoProfiling(); +new TestCase(typeof Number(new Number())); +new TestCase(typeof Number(new Number(Number.NaN))); +test(); +function test() { + try { + test(); + } catch (e) { + new TestCase(); + } +} diff --git a/js/src/jit-test/tests/promise/bug-1298776.js b/js/src/jit-test/tests/promise/bug-1298776.js new file mode 100644 index 0000000000..bd4f2a66ed --- /dev/null +++ b/js/src/jit-test/tests/promise/bug-1298776.js @@ -0,0 +1,4 @@ +ignoreUnhandledRejections(); + +if (typeof oomTest === 'function') + oomTest(Function(`new Promise(res=>res)`)); diff --git a/js/src/jit-test/tests/promise/bug-1545369.js b/js/src/jit-test/tests/promise/bug-1545369.js new file mode 100644 index 0000000000..cb2adb5da3 --- /dev/null +++ b/js/src/jit-test/tests/promise/bug-1545369.js @@ -0,0 +1,9 @@ +// |jit-test| --no-cgc; allow-oom + +async function f(x) { + await await x; +}; +for (let i = 0; i < 800; ++i) { + f(); +} +gcparam("maxBytes", gcparam("gcBytes")); diff --git a/js/src/jit-test/tests/promise/bug1347984.js b/js/src/jit-test/tests/promise/bug1347984.js new file mode 100644 index 0000000000..10dbae25b2 --- /dev/null +++ b/js/src/jit-test/tests/promise/bug1347984.js @@ -0,0 +1,6 @@ +// |jit-test| error:dead object +var g = newGlobal({newCompartment: true}); +var p = new Promise(() => {}); +g.Promise.prototype.then.call(p, () => void 0); +g.eval("nukeAllCCWs()"); +resolvePromise(p, 9); diff --git a/js/src/jit-test/tests/promise/bug1406463.js b/js/src/jit-test/tests/promise/bug1406463.js new file mode 100644 index 0000000000..4873da395f --- /dev/null +++ b/js/src/jit-test/tests/promise/bug1406463.js @@ -0,0 +1,16 @@ +// |jit-test| error:dead object + +var P = newGlobal({newCompartment: true}).eval(` +(class extends Promise { + static resolve(o) { + return o; + } +}); +`); + +Promise.all.call(P, [{ + then(r) { + nukeAllCCWs(); + r(); + } +}]); diff --git a/js/src/jit-test/tests/promise/debugger-reaction-does-not-resolve.js b/js/src/jit-test/tests/promise/debugger-reaction-does-not-resolve.js new file mode 100644 index 0000000000..48aec08e26 --- /dev/null +++ b/js/src/jit-test/tests/promise/debugger-reaction-does-not-resolve.js @@ -0,0 +1,71 @@ +// Promise.race(...) may add a dummy PromiseReaction which is only used for the +// debugger. Ensure that this dummy reaction can't influence the normal Promise +// resolution behaviour. +// +// See BlockOnPromise when called from PerformPromiseRace for when this dummy +// reaction is created. + +function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + +function neverCalled() { + // Quit with non-zero exit code to ensure a test suite error is shown, + // even when this function is called within promise handlers which normally + // swallow any exceptions. + quit(1); +} + +var c = 0; +var g_resolve; + +var resolvedValues = []; + +function resolveCapability(v) { + resolvedValues.push(v); +} + +class P extends Promise { + constructor(executor) { + // Only the very first object created through this constructor gets + // special treatment, all other invocations create built-in Promise + // objects. + if (c++ > 1) { + return new Promise(executor); + } + + executor(resolveCapability, neverCalled); + + var {promise, resolve} = newPromiseCapability(); + g_resolve = resolve; + + // Use an async function to create a Promise without resolving functions. + var p = async function(){ await promise; return 456; }(); + + // Ensure the species constructor is not the built-in Promise constructor + // to avoid falling into the fast path. + p.constructor = { + [Symbol.species]: P + }; + + return p; + } +} + +var {promise: alwaysPending} = newPromiseCapability(); + +// The promise returned from race() should never be resolved. +P.race([alwaysPending]).then(neverCalled, neverCalled); + +g_resolve(123); + +drainJobQueue(); + +// Check |resolvedValues| to ensure resolving functions were properly called. +assertEq(resolvedValues.length, 2); +assertEq(resolvedValues[0], alwaysPending); +assertEq(resolvedValues[1], 456); diff --git a/js/src/jit-test/tests/promise/drain-job-queue-after-quit-called.js b/js/src/jit-test/tests/promise/drain-job-queue-after-quit-called.js new file mode 100644 index 0000000000..ceb067e291 --- /dev/null +++ b/js/src/jit-test/tests/promise/drain-job-queue-after-quit-called.js @@ -0,0 +1,15 @@ +function d() { + quit(); +} + +function bt() { + getBacktrace({thisprops: true}); +} + +d.toString = bt.toString = drainJobQueue.toString = function () { + if (this === bt) + return ''; + this(); +} + +bt(); diff --git a/js/src/jit-test/tests/promise/getwaitforallpromise-error-handling.js b/js/src/jit-test/tests/promise/getwaitforallpromise-error-handling.js new file mode 100644 index 0000000000..476e6c7d01 --- /dev/null +++ b/js/src/jit-test/tests/promise/getwaitforallpromise-error-handling.js @@ -0,0 +1,8 @@ +load(libdir + "asserts.js"); + +assertThrowsInstanceOf(_=>getWaitForAllPromise(42), Error); +assertThrowsInstanceOf(_=>getWaitForAllPromise([42]), Error); +assertThrowsInstanceOf(_=>getWaitForAllPromise([{}]), Error); + +// Shouldn't throw. +getWaitForAllPromise([Promise.resolve()]); diff --git a/js/src/jit-test/tests/promise/job-realm.js b/js/src/jit-test/tests/promise/job-realm.js new file mode 100644 index 0000000000..643de60671 --- /dev/null +++ b/js/src/jit-test/tests/promise/job-realm.js @@ -0,0 +1,363 @@ +// `debugGetQueuedJobs` is available only in debug build. +if (!getBuildConfiguration("debug")) { + quit(); +} + +function testOne(func) { + assertEq(debugGetQueuedJobs().length, 0); + + func(); + + drainJobQueue(); + + assertEq(debugGetQueuedJobs().length, 0); + + if (func.length == 1) { + func({sameCompartmentAs: globalThis}); + + drainJobQueue(); + + assertEq(debugGetQueuedJobs().length, 0); + } +} + +function assertGlobal(obj, expectedGlobal) { + const global = objectGlobal(obj); + if (global) { + assertEq(global === expectedGlobal, true); + } else { + // obj is a wrapper. + // expectedGlobal should be other global than this. + assertEq(expectedGlobal !== globalThis, true); + } +} + +testOne(() => { + // Just creating a promise shouldn't enqueue any jobs. + Promise.resolve(10); + assertEq(debugGetQueuedJobs().length, 0); +}); + +testOne(() => { + // Calling then should create a job for each. + Promise.resolve(10).then(() => {}); + Promise.resolve(10).then(() => {}); + Promise.resolve(10).then(() => {}); + + assertEq(debugGetQueuedJobs().length, 3); +}); + +testOne(() => { + // The reaction job should use the function's realm. + Promise.resolve(10).then(() => {}); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], globalThis); +}); + +testOne(newGlobalOptions => { + // The reaction job should use the function's realm. + var g = newGlobal(newGlobalOptions); + g.eval(` +Promise.resolve(10).then(() => {}); +`); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], g); +}); + +testOne(newGlobalOptions => { + // The reaction job should use the function's realm. + var g = newGlobal(newGlobalOptions); + g.Promise.resolve(10).then(g.eval(`() => {}`)); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], g); +}); + +testOne(newGlobalOptions => { + // The reaction job should use the function's realm. + var g = newGlobal(newGlobalOptions); + g.Promise.resolve(10).then(() => {}); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], globalThis); +}); + +testOne(newGlobalOptions => { + // The reaction job should use the bound function's target function's realm. + var g = newGlobal(newGlobalOptions); + g.Promise.resolve(10) + .then(Function.prototype.bind.call(g.eval(`() => {}`), this)); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], g); +}); + +testOne(newGlobalOptions => { + // The reaction job should use the bound function's target function's realm. + var g = newGlobal(newGlobalOptions); + g.Promise.resolve(10) + .then(g.Function.prototype.bind.call(() => {}, g)); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], globalThis); +}); + +testOne(newGlobalOptions => { + // The reaction job should use the bound function's target function's realm, + // recursively + var g = newGlobal(newGlobalOptions); + g.Promise.resolve(10) + .then( + g.Function.prototype.bind.call( + Function.prototype.bind.call( + g.Function.prototype.bind.call( + () => {}, + g), + this), + g) + ); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], globalThis); +}); + +testOne(newGlobalOptions => { + // The reaction job should use the bound function's target function's realm, + // recursively + var g = newGlobal(newGlobalOptions); + Promise.resolve(10) + .then( + g.Function.prototype.bind.call( + Function.prototype.bind.call( + g.Function.prototype.bind.call( + Function.prototype.bind.call( + g.eval(`() => {}`), + this), + g), + this), + g) + ); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], g); +}); + +testOne(newGlobalOptions => { + // The reaction job should use the proxy's target function's realm. + var g = newGlobal(newGlobalOptions); + g.handler = () => {}; + g.eval(` +Promise.resolve(10).then(new Proxy(handler, {})); +`); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], globalThis); +}); + +testOne(newGlobalOptions => { + // The reaction job should use the proxy's target function's realm. + var g = newGlobal(newGlobalOptions); + g.eval(` +var handler = () => {}; +`); + Promise.resolve(10).then(new Proxy(g.handler, {})); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], g); +}); + + +testOne(newGlobalOptions => { + // The reaction job should use the proxy's target function's realm, + // recursively. + var g = newGlobal(newGlobalOptions); + g.handler = () => {}; + g.outerProxy = Proxy; + g.eval(` +Promise.resolve(10).then( + new outerProxy(new Proxy(new outerProxy(new Proxy(handler, {}), {}), {}), {}) +); +`); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], globalThis); +}); + +testOne(newGlobalOptions => { + // The reaction job should use the proxy's target function's realm, + // recursively. + var g = newGlobal(newGlobalOptions); + g.eval(` +var handler = () => {}; +`); + Promise.resolve(10) + .then(new Proxy(new g.Proxy(new Proxy(g.handler, {}), {}), {})); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], g); +}); + +testOne(() => { + // The thenable job should use the `then` function's realm. + Promise.resolve({ + then: () => {} + }); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], globalThis); +}); + +testOne(newGlobalOptions => { + // The thenable job should use the `then` function's realm. + var g = newGlobal(newGlobalOptions); + Promise.resolve(g.eval(` +({ + then: () => {} +}); +`)); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], g); +}); + +testOne(newGlobalOptions => { + // The thenable job should use the `then` function's realm. + var g = newGlobal(newGlobalOptions); + Promise.resolve({ + then: g.eval(`() => {}`), + }); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], g); +}); + +testOne(newGlobalOptions => { + // The thenable job should use the bound function's target function's realm. + var g = newGlobal(newGlobalOptions); + Promise.resolve({ + then: Function.prototype.bind.call(g.eval(`() => {}`), this), + }); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], g); +}); + +testOne(newGlobalOptions => { + // The thenable job should use the bound function's target function's realm. + var g = newGlobal(newGlobalOptions); + Promise.resolve({ + then: g.Function.prototype.bind.call(() => {}, g), + }); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], globalThis); +}); + +testOne(newGlobalOptions => { + // The thenable job should use the bound function's target function's realm, + // recursively. + var g = newGlobal(newGlobalOptions); + Promise.resolve({ + then: Function.prototype.bind.call( + g.Function.prototype.bind.call( + Function.prototype.bind.call( + g.eval(`() => {}`), + this), + g), + this) + }); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], g); +}); + +testOne(newGlobalOptions => { + // The thenable job should use the bound function's target function's realm, + // recursively. + var g = newGlobal(newGlobalOptions); + Promise.resolve({ + then: g.Function.prototype.bind.call( + Function.prototype.bind.call( + g.Function.prototype.bind.call( + () => {}, + g), + this), + g), + }); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], globalThis); +}); + +testOne(newGlobalOptions => { + // The thenable job should use the proxy's target function's realm. + var g = newGlobal(newGlobalOptions); + Promise.resolve({ + then: new Proxy(g.eval(`() => {}`), {}), + }); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], g); +}); + +testOne(newGlobalOptions => { + // The thenable job should use the proxy's target function's realm. + var g = newGlobal(newGlobalOptions); + Promise.resolve({ + then: new g.Proxy(() => {}, {}), + }); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], globalThis); +}); + +testOne(newGlobalOptions => { + // The thenable job should use the proxy's target function's realm, + // recursively. + var g = newGlobal(newGlobalOptions); + Promise.resolve({ + then: new Proxy(new g.Proxy(new Proxy(g.eval(`() => {}`), {}), {}), {}), + }); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], g); +}); + +testOne(newGlobalOptions => { + // The thenable job should use the proxy's target function's realm, + // recursively. + var g = newGlobal(newGlobalOptions); + Promise.resolve({ + then: new g.Proxy(new Proxy(new g.Proxy(() => {}, {}), {}), {}), + }); + + var jobs = debugGetQueuedJobs(); + assertEq(jobs.length, 1); + assertGlobal(jobs[0], globalThis); +}); + +print("ok"); diff --git a/js/src/jit-test/tests/promise/newpromisecapability-error-message.js b/js/src/jit-test/tests/promise/newpromisecapability-error-message.js new file mode 100644 index 0000000000..4fb96013f4 --- /dev/null +++ b/js/src/jit-test/tests/promise/newpromisecapability-error-message.js @@ -0,0 +1,23 @@ +// |jit-test| skip-if: getBuildConfiguration('pbl') +// (justification: PBL does not invoke the decompiler in the same way and so +// will not have an error message referring to the specific value name) +load(libdir + "asserts.js"); + +let foo = {}; +for (let method of ["resolve", "reject", "race"]) { + assertErrorMessage( + () => Promise[method].call(foo), + TypeError, + "foo is not a constructor" + ); + assertErrorMessage( + () => Promise[method].call(foo, []), + TypeError, + "foo is not a constructor" + ); + assertErrorMessage( + () => Promise[method].call({}, [], foo), + TypeError, + "({}) is not a constructor" + ); +} diff --git a/js/src/jit-test/tests/promise/no-reentrant-drainjobqueue.js b/js/src/jit-test/tests/promise/no-reentrant-drainjobqueue.js new file mode 100644 index 0000000000..7db07bdc73 --- /dev/null +++ b/js/src/jit-test/tests/promise/no-reentrant-drainjobqueue.js @@ -0,0 +1,10 @@ +let thenCalled = false; +let p1 = new Promise(res => res('result')).then(val => { + Promise.resolve(1).then(_=>{thenCalled = true;}); + // This reentrant call is ignored. + drainJobQueue(); + assertEq(thenCalled, false); +}); + +drainJobQueue(); +assertEq(thenCalled, true); diff --git a/js/src/jit-test/tests/promise/optimized-promise-already-resolved.js b/js/src/jit-test/tests/promise/optimized-promise-already-resolved.js new file mode 100644 index 0000000000..69e7d95fe0 --- /dev/null +++ b/js/src/jit-test/tests/promise/optimized-promise-already-resolved.js @@ -0,0 +1,73 @@ +// Promise created with default resolution functions (without instances) should +// behave in the same way as normal case. + +class MockPromise { + constructor(...args) { + return new Promise(...args); + } +} + +for (const expected of ["resolve", "reject"]) { + for (const unexpected of ["resolve", "reject"]) { + let resolve, reject; + const p = new Promise((a, b) => { + resolve = a; + reject = b; + }); + + // To prevent fast path in Promise.resolve that returns the passed promise, + // modify constructor property. + p.constructor = MockPromise; + + // Given `p` has custom constructor, Promise.resolve creates a new promise + // instead of returning `p` itself. + // + // Newly created promise `optimized` does not have resolution function + // instances. + const optimized = Promise.resolve(p); + + // Newly created promise `normal` has resolution functions. + const normal = new Promise(r => r(p)); + + // These calls should be ignored because [[AlreadyResolved]] == true, + if (unexpected === "resolve") { + resolvePromise(optimized, "unexpected resolve optimized"); + resolvePromise(normal, "unexpected resolve normal"); + } else { + rejectPromise(optimized, "unexpected reject optimized"); + rejectPromise(normal, "unexpected reject normal"); + } + + if (expected === "resolve") { + resolve("resolve"); + } else { + reject("reject"); + } + + let optimized_resolutionValue, optimized_rejectionValue; + optimized.then( + x => { optimized_resolutionValue = x; }, + x => { optimized_rejectionValue = x; } + ); + + let normal_resolutionValue, normal_rejectionValue; + normal.then( + x => { normal_resolutionValue = x; }, + x => { normal_rejectionValue = x; } + ); + + drainJobQueue(); + + if (expected === "resolve") { + assertEq(optimized_resolutionValue, "resolve", + `${expected} + ${unexpected}`); + assertEq(normal_resolutionValue, "resolve", + `${expected} + ${unexpected}`); + } else { + assertEq(optimized_rejectionValue, "reject", + `${expected} + ${unexpected}`); + assertEq(normal_rejectionValue, "reject", + `${expected} + ${unexpected}`); + } + } +} diff --git a/js/src/jit-test/tests/promise/primitives-handling-in-promise-all.js b/js/src/jit-test/tests/promise/primitives-handling-in-promise-all.js new file mode 100644 index 0000000000..4032f34bc4 --- /dev/null +++ b/js/src/jit-test/tests/promise/primitives-handling-in-promise-all.js @@ -0,0 +1,5 @@ +// This just shouldn't crash. +ignoreUnhandledRejections(); + +Promise.resolve = () => 42; +Promise.all([1]); diff --git a/js/src/jit-test/tests/promise/promise-any-with-non-default-resolving.js b/js/src/jit-test/tests/promise/promise-any-with-non-default-resolving.js new file mode 100644 index 0000000000..27a178331a --- /dev/null +++ b/js/src/jit-test/tests/promise/promise-any-with-non-default-resolving.js @@ -0,0 +1,58 @@ +// |jit-test| skip-if: !Promise.any + +function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + +function neverCalled() { + // Quit with non-zero exit code to ensure a test suite error is shown, + // even when this function is called within promise handlers which normally + // swallow any exceptions. + quit(1); +} + +var {promise, resolve} = newPromiseCapability(); + +var getterCount = 0; + +class P extends Promise { + constructor(executor) { + var {promise, resolve, reject} = newPromiseCapability(); + + executor(function(v) { + // Resolve the promise. + resolve(v); + + // But then return an object from the resolve function. This object + // must be treated as the resolution value for the otherwise + // skipped promise which gets created when Promise.prototype.then is + // called in PerformPromiseRace. + return { + get then() { + getterCount++; + } + }; + }, neverCalled); + + return promise; + } + + // Default to the standard Promise.resolve function, so we don't create + // another instance of this class when resolving the passed promise objects + // in Promise.race. + static resolve(v) { + return Promise.resolve(v); + } +} + +P.any([promise]); + +resolve(0); + +drainJobQueue(); + +assertEq(getterCount, 1); diff --git a/js/src/jit-test/tests/promise/promise-cross-compartment-subclassing.js b/js/src/jit-test/tests/promise/promise-cross-compartment-subclassing.js new file mode 100644 index 0000000000..18cd5a3a6d --- /dev/null +++ b/js/src/jit-test/tests/promise/promise-cross-compartment-subclassing.js @@ -0,0 +1,10 @@ +ignoreUnhandledRejections(); + +const global = newGlobal(); +const OtherPromise = global.Promise; +class SubPromise extends OtherPromise {} + +assertEq(true, new SubPromise(()=>{}) instanceof OtherPromise); +assertEq(true, SubPromise.resolve({}) instanceof OtherPromise); +assertEq(true, SubPromise.reject({}) instanceof OtherPromise); +assertEq(true, SubPromise.resolve({}).then(()=>{}, ()=>{}) instanceof OtherPromise); diff --git a/js/src/jit-test/tests/promise/promise-race-with-default-resolving-internal.js b/js/src/jit-test/tests/promise/promise-race-with-default-resolving-internal.js new file mode 100644 index 0000000000..815124c46f --- /dev/null +++ b/js/src/jit-test/tests/promise/promise-race-with-default-resolving-internal.js @@ -0,0 +1,54 @@ +function newPromiseCapability() { + let resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + +function neverCalled() { + // Quit with non-zero exit code to ensure a test suite error is shown, + // even when this function is called within promise handlers which normally + // swallow any exceptions. + quit(1); +} + +var c = 0; +var g_resolve; + +class P extends Promise { + constructor(executor) { + // Only the very first object created through this constructor gets + // special treatment, all other invocations create built-in Promise + // objects. + if (c++ > 1) { + return new Promise(executor); + } + + // Pass a native ResolvePromiseFunction function as the resolve handler. + // (It's okay that the promise of this promise capability is never used.) + executor(newPromiseCapability().resolve, neverCalled); + + let {promise, resolve} = newPromiseCapability(); + g_resolve = resolve; + + // Use an async function to create a Promise without resolving functions. + return async function(){ await promise; return 456; }(); + } + + // Ensure we don't take the (spec) fast path in Promise.resolve and instead + // create a new promise object. (We could not provide an override at all + // and rely on the default behaviour, but giving an explicit definition + // may help to interpret this test case.) + static resolve(v) { + return super.resolve(v); + } +} + +let {promise: alwaysPending} = newPromiseCapability(); + +P.race([alwaysPending]).then(neverCalled, neverCalled); + +g_resolve(123); + +drainJobQueue(); diff --git a/js/src/jit-test/tests/promise/promise-race-with-non-default-resolving.js b/js/src/jit-test/tests/promise/promise-race-with-non-default-resolving.js new file mode 100644 index 0000000000..23d4b95bc3 --- /dev/null +++ b/js/src/jit-test/tests/promise/promise-race-with-non-default-resolving.js @@ -0,0 +1,56 @@ +function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + +function neverCalled() { + // Quit with non-zero exit code to ensure a test suite error is shown, + // even when this function is called within promise handlers which normally + // swallow any exceptions. + quit(1); +} + +var {promise, resolve} = newPromiseCapability(); + +var getterCount = 0; + +class P extends Promise { + constructor(executor) { + var {promise, resolve, reject} = newPromiseCapability(); + + executor(function(v) { + // Resolve the promise. + resolve(v); + + // But then return an object from the resolve function. This object + // must be treated as the resolution value for the otherwise + // skipped promise which gets created when Promise.prototype.then is + // called in PerformPromiseRace. + return { + get then() { + getterCount++; + } + }; + }, neverCalled); + + return promise; + } + + // Default to the standard Promise.resolve function, so we don't create + // another instance of this class when resolving the passed promise objects + // in Promise.race. + static resolve(v) { + return Promise.resolve(v); + } +} + +P.race([promise]); + +resolve(0); + +drainJobQueue(); + +assertEq(getterCount, 1); diff --git a/js/src/jit-test/tests/promise/resolve-promise-scripted-and-api.js b/js/src/jit-test/tests/promise/resolve-promise-scripted-and-api.js new file mode 100644 index 0000000000..d69a6d9167 --- /dev/null +++ b/js/src/jit-test/tests/promise/resolve-promise-scripted-and-api.js @@ -0,0 +1,15 @@ +function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + + +var {promise, resolve} = newPromiseCapability(); + +resolve(Promise.resolve(0)); + +// Don't assert when the Promise was already resolved. +resolvePromise(promise, 123); diff --git a/js/src/jit-test/tests/promise/settle-async-generator.js b/js/src/jit-test/tests/promise/settle-async-generator.js new file mode 100644 index 0000000000..bdc9fcb51c --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-async-generator.js @@ -0,0 +1,23 @@ +// Force resolving/rejecting Promises returned by async generator's methods +// should fail. + +load(libdir + "asserts.js"); + +async function* f() { + yield 1; +} + +let p = f().next(); +assertThrowsInstanceOf(() => { + settlePromiseNow(p); +}, Error); + +p = f().next(); +assertThrowsInstanceOf(() => { + resolvePromise(p); +}, Error); + +p = f().next(); +assertThrowsInstanceOf(() => { + rejectPromise(p); +}, Error); diff --git a/js/src/jit-test/tests/promise/settle-now-already-resolved.js b/js/src/jit-test/tests/promise/settle-now-already-resolved.js new file mode 100644 index 0000000000..44186f868f --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-now-already-resolved.js @@ -0,0 +1,28 @@ +// |jit-test| error:Unhandled rejection + +load(libdir + "asserts.js"); + +// Calling settlePromiseNow on already-resolved promise should throw, and +// unhandled rejection tracking should work. + +assertThrowsInstanceOf(() => { + var promise = new Promise(resolve => { + resolve(10); + }); + settlePromiseNow(promise); +}, Error); + + +assertThrowsInstanceOf(() => { + var promise = new Promise((_, reject) => { + reject(10); + }); + settlePromiseNow(promise); +}, Error); + +assertThrowsInstanceOf(() => { + var promise = new Promise(() => { + throw 10; + }); + settlePromiseNow(promise); +}, Error); diff --git a/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-1.js b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-1.js new file mode 100644 index 0000000000..940adf660d --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-1.js @@ -0,0 +1,21 @@ +// Test we don't assert when the promise is settled after enqueuing a PromiseReactionJob. + +function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + + +var {promise, resolve} = newPromiseCapability(); + +var p = Promise.resolve(0); + +// Enqueue a PromiseResolveThenableJob followed by a PromiseReactionJob. +resolve(p); + +// The PromiseReactionJob expects a pending promise, but this settlePromiseNow +// call will already have settled the promise. +settlePromiseNow(promise); diff --git a/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-10.js b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-10.js new file mode 100644 index 0000000000..4d19966cba --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-10.js @@ -0,0 +1,18 @@ +// Don't assert when the promise in the resolving functions is wrapped in a CCW. + +function newPromiseCapability(newTarget) { + var resolve, reject, promise = Reflect.construct(Promise, [function(r1, r2) { + resolve = r1; + reject = r2; + }], newTarget); + return {promise, resolve, reject}; +} + +var g = newGlobal(); + +var {promise, resolve} = newPromiseCapability(g.Promise); + +g.settlePromiseNow(promise); + +// Don't assert when resolving the promise. +resolve(0); diff --git a/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-11.js b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-11.js new file mode 100644 index 0000000000..e4887b7267 --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-11.js @@ -0,0 +1,18 @@ +// Don't assert when the promise in the resolving functions is wrapped in a CCW. + +function newPromiseCapability(newTarget) { + var resolve, reject, promise = Reflect.construct(Promise, [function(r1, r2) { + resolve = r1; + reject = r2; + }], newTarget); + return {promise, resolve, reject}; +} + +var g = newGlobal(); + +var {promise, reject} = newPromiseCapability(g.Promise); + +g.settlePromiseNow(promise); + +// Don't assert when rejecting the promise. +reject(0); diff --git a/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-2.js b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-2.js new file mode 100644 index 0000000000..79129003e3 --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-2.js @@ -0,0 +1,27 @@ +// Test we don't assert when the promise is settled and the SpeciesConstructor +// call in Promise.prototype.then throws an exception. + +function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + + +var {promise, resolve} = newPromiseCapability(); + +var p = Promise.resolve(0); + +p.constructor = { + [Symbol.species]: function() { + throw new Error(); + } +}; + +// Enqueue a PromiseResolveThenableJob. +resolve(p); + +// Settle the promise after the resolve call. +settlePromiseNow(promise); diff --git a/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-3.js b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-3.js new file mode 100644 index 0000000000..591eba456f --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-3.js @@ -0,0 +1,27 @@ +// Test we don't assert when the promise is settled and the SpeciesConstructor +// call in Promise.prototype.then throws an exception. + +function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + + +var {promise, resolve} = newPromiseCapability(); + +var p = Promise.resolve(0); + +p.constructor = { + [Symbol.species]: function() { + // Settle the promise in the SpeciesConstructor call. + settlePromiseNow(promise); + + throw new Error(); + } +}; + +// Enqueue a PromiseResolveThenableJob. +resolve(p); diff --git a/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-4.js b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-4.js new file mode 100644 index 0000000000..a9d147ccaa --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-4.js @@ -0,0 +1,18 @@ +// Test we don't assert when the promise is settled and we then try to call the +// resolving function. + +function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + + +var {promise, resolve} = newPromiseCapability(); + +settlePromiseNow(promise); + +// Don't assert when the promise is already settled. +resolve(0); diff --git a/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-5.js b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-5.js new file mode 100644 index 0000000000..e5d2ceaafe --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-5.js @@ -0,0 +1,18 @@ +// Test we don't assert when the promise is settled and we then try to call the +// rejecting function. + +function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + + +var {promise, reject} = newPromiseCapability(); + +settlePromiseNow(promise); + +// Don't assert when the promise is already settled. +reject(0); diff --git a/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-6.js b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-6.js new file mode 100644 index 0000000000..d694f849a6 --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-6.js @@ -0,0 +1,20 @@ +// Don't assert when a side-effect when getting the "then" property settled the promise. + +function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + + +var {promise, resolve} = newPromiseCapability(); + +var thenable = { + get then() { + settlePromiseNow(promise); + } +}; + +resolve(thenable); diff --git a/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-7.js b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-7.js new file mode 100644 index 0000000000..d6920f9b79 --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-7.js @@ -0,0 +1,23 @@ +// Don't assert when a side-effect when getting the "then" property settled the promise. + +function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + + +var {promise, resolve} = newPromiseCapability(); + +var thenable = { + get then() { + settlePromiseNow(promise); + + // Throw an error to reject the promise. + throw new Error(); + } +}; + +resolve(thenable); diff --git a/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-8.js b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-8.js new file mode 100644 index 0000000000..8b581b7725 --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-8.js @@ -0,0 +1,7 @@ +// Don't assert when settlePromiseNow() is called on an async-function promise. + +var promise = async function(){ await 0; }(); + +try { + settlePromiseNow(promise); +} catch {} diff --git a/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-9.js b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-9.js new file mode 100644 index 0000000000..45413d768c --- /dev/null +++ b/js/src/jit-test/tests/promise/settle-now-breaks-all-invariants-9.js @@ -0,0 +1,15 @@ +function newPromiseCapability() { + var resolve, reject, promise = new Promise(function(r1, r2) { + resolve = r1; + reject = r2; + }); + return {promise, resolve, reject}; +} + + +var {promise, resolve, reject} = newPromiseCapability(); + +settlePromiseNow(promise); + +assertEq(resolve(0), undefined); +assertEq(reject(0), undefined); diff --git a/js/src/jit-test/tests/promise/species-redefine-getter.js b/js/src/jit-test/tests/promise/species-redefine-getter.js new file mode 100644 index 0000000000..4e30759cf2 --- /dev/null +++ b/js/src/jit-test/tests/promise/species-redefine-getter.js @@ -0,0 +1,20 @@ +// Ensure the HadGetterSetterChange flag is set. +Object.defineProperty(Promise, "foo", {configurable: true, get: function() {}}); +Object.defineProperty(Promise, "foo", {configurable: true, get: function() {}}); + +// Initialize PromiseLookup. +var p = new Promise(() => {}); +for (let i = 0; i < 5; i++) { + Promise.all([p]); +} + +// Redefine the Promise[Symbol.species] getter without changing its attributes/shape. +let count = 0; +Object.defineProperty(Promise, Symbol.species, + {get: function() { count++; }, enumerable: false, configurable: true}); + +// Ensure PromiseLookup now deoptimizes and calls the getter. +for (let i = 0; i < 5; i++) { + Promise.all([p]); +} +assertEq(count, 5); diff --git a/js/src/jit-test/tests/promise/stopdrainingjobqueue.js b/js/src/jit-test/tests/promise/stopdrainingjobqueue.js new file mode 100644 index 0000000000..534cc03039 --- /dev/null +++ b/js/src/jit-test/tests/promise/stopdrainingjobqueue.js @@ -0,0 +1,4 @@ +Promise.resolve() + .then(()=>quit(0)); +Promise.resolve() + .then(()=>crash("Must not run any more promise jobs after quitting")); \ No newline at end of file diff --git a/js/src/jit-test/tests/promise/unhandled-rejections-dead-2.js b/js/src/jit-test/tests/promise/unhandled-rejections-dead-2.js new file mode 100644 index 0000000000..ef42340fde --- /dev/null +++ b/js/src/jit-test/tests/promise/unhandled-rejections-dead-2.js @@ -0,0 +1,24 @@ +// |jit-test| error:Unhandled rejection + +var g = newGlobal({newCompartment: true}) +g.outer = this; +g.eval(` + // Create a new Promise in |outer| using new.target, but with + // resolver functions in |g|. + var resolvers; + var p = Reflect.construct(Promise, [ + (resolve, reject) => { + resolvers = {resolve, reject}; + } + ], outer.Promise); + + resolvers.resolve({ + get then() { + // Throw from the about to be nuked compartment. + throw null; + } + }); +`); + +// Nuke CCWs, including the SavedFrame for the Promise resolution info. +nukeAllCCWs(); diff --git a/js/src/jit-test/tests/promise/unhandled-rejections-dead.js b/js/src/jit-test/tests/promise/unhandled-rejections-dead.js new file mode 100644 index 0000000000..d70a078c73 --- /dev/null +++ b/js/src/jit-test/tests/promise/unhandled-rejections-dead.js @@ -0,0 +1,17 @@ +// |jit-test| error:Unhandled rejection + +// Create the set object for unhandled rejection in this global. +async function fn() { e } +let p = fn(); + +var g = newGlobal(); +g.evaluate(` +async function fn() { e } +fn() +// Create unhandled rejection in another compartment. +// The promise is tracked by the unhandled rejection set with CCW. +P = newGlobal().eval("(class extends Promise { function(){} })") + +// Nuke the CCW to make the entry in unhandled rejection set a dead proxy. +Promise.all.call(P, [{ then() { nukeAllCCWs() } }]) +`); diff --git a/js/src/jit-test/tests/promise/unhandled-rejections-different-realm.js b/js/src/jit-test/tests/promise/unhandled-rejections-different-realm.js new file mode 100644 index 0000000000..866a865e2d --- /dev/null +++ b/js/src/jit-test/tests/promise/unhandled-rejections-different-realm.js @@ -0,0 +1,19 @@ +// |jit-test| error:Unhandled rejection: "some reason" + +// Test JS shell's unhandled rejection tracking. + +var z = newGlobal(); + +Promise.prototype.then = z.Promise.prototype.then; + +// Add unhandled rejection from other realm. +evalcx("var p = (async function() { throw 'some reason' })()", z); + +// Add unhandled rejection from this realm. +var p = (async function f() { throw 'other reason'; })(); + +// Remove unhandled rejection from this realm. +p.then(); + +// Remove unhandled rejection from other realm. +evalcx("p.then()", z); diff --git a/js/src/jit-test/tests/promise/unhandled-rejections-error.js b/js/src/jit-test/tests/promise/unhandled-rejections-error.js new file mode 100644 index 0000000000..48a2eedda2 --- /dev/null +++ b/js/src/jit-test/tests/promise/unhandled-rejections-error.js @@ -0,0 +1,3 @@ +// |jit-test| error:Error while printing unhandled rejection + +Promise.reject({ toSource() { throw "another error"; } }); diff --git a/js/src/jit-test/tests/promise/unhandled-rejections-oom.js b/js/src/jit-test/tests/promise/unhandled-rejections-oom.js new file mode 100644 index 0000000000..706eba0032 --- /dev/null +++ b/js/src/jit-test/tests/promise/unhandled-rejections-oom.js @@ -0,0 +1,3 @@ +// |jit-test| allow-oom; skip-if: !('oomTest' in this) + +oomTest(async function() {}, { keepFailing: true }); diff --git a/js/src/jit-test/tests/promise/unhandled-rejections.js b/js/src/jit-test/tests/promise/unhandled-rejections.js new file mode 100644 index 0000000000..0bafa27fd0 --- /dev/null +++ b/js/src/jit-test/tests/promise/unhandled-rejections.js @@ -0,0 +1,3 @@ +// |jit-test| error:Unhandled rejection: "some reason" + +Promise.reject("some reason"); diff --git a/js/src/jit-test/tests/promise/user-activation-propagation.js b/js/src/jit-test/tests/promise/user-activation-propagation.js new file mode 100644 index 0000000000..5ec28eb3a5 --- /dev/null +++ b/js/src/jit-test/tests/promise/user-activation-propagation.js @@ -0,0 +1,19 @@ +function newPromiseCapability() { + return {}; +} +function neverCalled() {} +function resolveCapability(dIs) {} +class P extends Promise { + constructor(executor) { + executor(resolveCapability, neverCalled); + var p = async function() {}(); + p.constructor = { + [Symbol.species]: P + }; + return p; + } +} +var { + promise: alwaysPending +} = newPromiseCapability(); +P.race([alwaysPending]).then(neverCalled, neverCalled); diff --git a/js/src/jit-test/tests/proxy/bug-862848-1.js b/js/src/jit-test/tests/proxy/bug-862848-1.js new file mode 100644 index 0000000000..870b5632c3 --- /dev/null +++ b/js/src/jit-test/tests/proxy/bug-862848-1.js @@ -0,0 +1,24 @@ +// obj.hasOwnProperty(id), Object.getOwnPropertyDescriptor(obj, id), and +// Object.defineProperty(obj, id, desc) do not look at obj's prototype. + +var angryHandler = new Proxy({}, { + has: () => true, + get: (t, id) => { + throw new Error("angryHandler should not be queried (" + id + ")"); + } +}); +var angryProto = new Proxy({}, angryHandler); + +var obj = Object.create(angryProto, { + // Define hasOwnProperty directly on obj since we are poisoning its + // prototype chain. + hasOwnProperty: { + value: Object.prototype.hasOwnProperty + } +}); + +assertEq(Object.getOwnPropertyDescriptor(obj, "foo"), undefined); +assertEq(obj.hasOwnProperty("foo"), false); +Object.defineProperty(obj, "foo", {value: 5}); +assertEq(obj.hasOwnProperty("foo"), true); +assertEq(obj.foo, 5); diff --git a/js/src/jit-test/tests/proxy/bug1072817.js b/js/src/jit-test/tests/proxy/bug1072817.js new file mode 100644 index 0000000000..d8656e0c70 --- /dev/null +++ b/js/src/jit-test/tests/proxy/bug1072817.js @@ -0,0 +1,5 @@ +// |jit-test| error: TypeError +var r = Proxy.revocable({}, {}); +var p = r.proxy; +r.revoke(); +p instanceof Object; diff --git a/js/src/jit-test/tests/proxy/bug1095973.js b/js/src/jit-test/tests/proxy/bug1095973.js new file mode 100644 index 0000000000..6e917a16c8 --- /dev/null +++ b/js/src/jit-test/tests/proxy/bug1095973.js @@ -0,0 +1,5 @@ +var C = {}; +var B = new Proxy(C, {}); +var A = Object.create(B); +B.x = 1; +assertEq(C.x, 1); diff --git a/js/src/jit-test/tests/proxy/bug1685290.js b/js/src/jit-test/tests/proxy/bug1685290.js new file mode 100644 index 0000000000..df1f2f6070 --- /dev/null +++ b/js/src/jit-test/tests/proxy/bug1685290.js @@ -0,0 +1,13 @@ +with ({}) {} + +function test(s) { + "".replace(/x/, s); +} + +for (var i = 0; i < 20; i++) { + test(""); +} + +try { + test(new Proxy({}, { get: invalidate })); +} catch {} diff --git a/js/src/jit-test/tests/proxy/bug1714531.js b/js/src/jit-test/tests/proxy/bug1714531.js new file mode 100644 index 0000000000..03fcb483bf --- /dev/null +++ b/js/src/jit-test/tests/proxy/bug1714531.js @@ -0,0 +1,6 @@ +var p = new Proxy({ get a() { } }, { + defineProperty() { + return true; + } +}); +Object.defineProperty(p, "a", { value: 1 }); diff --git a/js/src/jit-test/tests/proxy/bug1853103.js b/js/src/jit-test/tests/proxy/bug1853103.js new file mode 100644 index 0000000000..63a31aaa97 --- /dev/null +++ b/js/src/jit-test/tests/proxy/bug1853103.js @@ -0,0 +1,6 @@ +let { object, transplant } = transplantableObject(); +transplant(newGlobal({newCompartment: true})); +nukeAllCCWs() +try { + transplant(this) +} catch {} diff --git a/js/src/jit-test/tests/proxy/bug1853180-2.js b/js/src/jit-test/tests/proxy/bug1853180-2.js new file mode 100644 index 0000000000..97b7face46 --- /dev/null +++ b/js/src/jit-test/tests/proxy/bug1853180-2.js @@ -0,0 +1,32 @@ +// |jit-test| --fast-warmup + +function foo(o) { + return o.x; +} + +with ({}) {} + +var trigger = false; + +var handler = { + get: (target, prop) => { + if (trigger) { + transplant(newGlobal({newCompartment: true})); + } + return 1; + }, + getOwnPropertyDescriptor: (target, prop) => { + return Object.getOwnPropertyDescriptor(target, prop); + } +} + +let {object, transplant} = transplantableObject(); +Object.defineProperty(object, 'x', { value: 1, configurable: false, writable: false }); + +var proxy = new Proxy(object, handler); +for (var i = 0; i < 50; i++) { + foo(proxy); +} + +trigger = true; +foo(proxy); diff --git a/js/src/jit-test/tests/proxy/bug1853180.js b/js/src/jit-test/tests/proxy/bug1853180.js new file mode 100644 index 0000000000..2883dd3989 --- /dev/null +++ b/js/src/jit-test/tests/proxy/bug1853180.js @@ -0,0 +1,23 @@ +// |jit-test| --fast-warmup + +function foo(o) { + return o.x; +} + +with ({}) {} + +var handler = { + get: (target, prop) => { return 1; }, + getOwnPropertyDescriptor: (target, prop) => { return Object.getOwnPropertyDescriptor(target, prop); } +} + +var o = {}; +Object.defineProperty(o, 'x', { value: 1, configurable: false, writable: false }); + +var proxy = new Proxy(o, handler); +for (var i = 0; i < 50; i++) { + foo(proxy); +} + +var proxy_proxy = new Proxy(proxy, handler); +foo(proxy_proxy); diff --git a/js/src/jit-test/tests/proxy/bug897403.js b/js/src/jit-test/tests/proxy/bug897403.js new file mode 100644 index 0000000000..45b743eac7 --- /dev/null +++ b/js/src/jit-test/tests/proxy/bug897403.js @@ -0,0 +1,3 @@ +var f = (function () {}).bind({}); +var p = new Proxy(f, {}); +Object.defineProperty(p, "caller", {get: function(){}}); diff --git a/js/src/jit-test/tests/proxy/bug901979-1.js b/js/src/jit-test/tests/proxy/bug901979-1.js new file mode 100644 index 0000000000..f6432a838c --- /dev/null +++ b/js/src/jit-test/tests/proxy/bug901979-1.js @@ -0,0 +1,16 @@ +// A proxy on the prototype chain of the global can't intercept lazy definition of globals. +// Thanks to André Bargull for this one. +load(libdir + "immutable-prototype.js"); + +var global = this; +var status = "pass"; +var handler = { + get: function get(t, pk, r) { status = "FAIL get"; }, + has: function has(t, pk) { status = "FAIL has"; } +}; + +if (globalPrototypeChainIsMutable()) + Object.prototype.__proto__ = new Proxy(Object.create(null), handler); + +Map; +assertEq(status, "pass"); diff --git a/js/src/jit-test/tests/proxy/bug901979-2.js b/js/src/jit-test/tests/proxy/bug901979-2.js new file mode 100644 index 0000000000..93f45dc891 --- /dev/null +++ b/js/src/jit-test/tests/proxy/bug901979-2.js @@ -0,0 +1,37 @@ +// A proxy on the prototype chain of the global should not observe anything at +// all about lazy resolution of globals. +load(libdir + "immutable-prototype.js"); + +var global = this; +var status = "pass"; + +// This is a little tricky. There are two proxies. +// 1. handler is a proxy that fails the test if you try to call a method on it. +var metaHandler = { + get: _ => { status = "SMASH"; }, + has: _ => { status = "SMASH"; }, + invoke: _ => { status = "SMASH"; } +}; +var handler = new Proxy({}, metaHandler); + +// 2. Then we create a proxy using 'handler' as its handler. This means the test +// will fail if *any* method of the handler is called, not just get/has/invoke. +var angryProxy = new Proxy(Object.create(null), handler); +if (globalPrototypeChainIsMutable()) { + this.__proto__ = angryProxy; + Object.prototype.__proto__ = angryProxy; +} + +// Trip the alarm once, to make sure the proxies are working. +this.nonExistingProperty; +if (globalPrototypeChainIsMutable()) + assertEq(status, "SMASH"); +else + assertEq(status, "pass"); + +// OK. Reset the status and run the actual test. +status = "pass"; +Map; +ArrayBuffer; +Date; +assertEq(status, "pass"); diff --git a/js/src/jit-test/tests/proxy/bug911553.js b/js/src/jit-test/tests/proxy/bug911553.js new file mode 100644 index 0000000000..5ccfbe21db --- /dev/null +++ b/js/src/jit-test/tests/proxy/bug911553.js @@ -0,0 +1,10 @@ +assertEq( + ""+new Proxy( + {toString:() => "inner toString"}, + {get:(t, pk) => (pk === "toString" ? () => "proxy toString" : t[pk])}), + "proxy toString") +assertEq( + ""+new Proxy( + {valueOf:() => "inner valueOf"}, + {get:(t, pk) => (pk === "valueOf" ? () => "proxy valueOf" : t[pk])}), + "proxy valueOf") diff --git a/js/src/jit-test/tests/proxy/defineProperty-fallback.js b/js/src/jit-test/tests/proxy/defineProperty-fallback.js new file mode 100644 index 0000000000..e8f52dc382 --- /dev/null +++ b/js/src/jit-test/tests/proxy/defineProperty-fallback.js @@ -0,0 +1,8 @@ +"use strict"; +var obj = {}; +Object.defineProperty(obj, "test", {configurable: false, writable: false, value: "hey"}); +Object.defineProperty(obj, "test", {configurable: false, writable: false}); + +var wrapper = new Proxy(obj, {}); +Object.defineProperty(wrapper, "test", {configurable: false, writable: false}); +assertEq(wrapper.test, "hey"); diff --git a/js/src/jit-test/tests/proxy/delete-not-invoked-on-proto.js b/js/src/jit-test/tests/proxy/delete-not-invoked-on-proto.js new file mode 100644 index 0000000000..1de2eaef04 --- /dev/null +++ b/js/src/jit-test/tests/proxy/delete-not-invoked-on-proto.js @@ -0,0 +1,10 @@ +// Create Proxy that throws for everything. +var {proxy, revoke} = Proxy.revocable({}, {}); + +var obj = {__proto__: proxy, a: 1}; +// This revokes the proxy, so every operation on it THROWS. +revoke(); + +assertEq(delete obj.a, true); +assertEq(delete obj.b, true); +// Should not have invoked anything on [[Prototype]] diff --git a/js/src/jit-test/tests/proxy/freeze-proxy.js b/js/src/jit-test/tests/proxy/freeze-proxy.js new file mode 100644 index 0000000000..ff82c50fd3 --- /dev/null +++ b/js/src/jit-test/tests/proxy/freeze-proxy.js @@ -0,0 +1,22 @@ +var called = []; +var proxy = new Proxy({a: 1, get b() {}}, { + getOwnPropertyDescriptor(target, P) { + called.push("getOwnPropertyDescriptor"); + return Object.getOwnPropertyDescriptor(target, P); + }, + defineProperty(target, P, desc) { + called.push("defineProperty"); + if (P == "a") { + assertEq(Object.getOwnPropertyNames(desc).length, 2); + assertEq(desc.configurable, false); + assertEq(desc.writable, false); + } else { + assertEq(Object.getOwnPropertyNames(desc).length, 1); + assertEq(desc.configurable, false); + } + return Object.defineProperty(target, P, desc); + } +}); + +Object.freeze(proxy); +assertEq(called.toString(), "getOwnPropertyDescriptor,defineProperty,getOwnPropertyDescriptor,defineProperty"); diff --git a/js/src/jit-test/tests/proxy/function-toString.js b/js/src/jit-test/tests/proxy/function-toString.js new file mode 100644 index 0000000000..4aca5c907e --- /dev/null +++ b/js/src/jit-test/tests/proxy/function-toString.js @@ -0,0 +1,10 @@ +load(libdir + 'asserts.js'); + +var nativeCode = "function () {\n [native code]\n}"; + +var proxy = new Proxy(function() {}, {}); +assertEq(Function.prototype.toString.call(proxy), nativeCode); +var o = Proxy.revocable(function() {}, {}); +assertEq(Function.prototype.toString.call(o.proxy), nativeCode); +o.revoke(); +assertEq(Function.prototype.toString.call(o.proxy), nativeCode); diff --git a/js/src/jit-test/tests/proxy/getElementIfPresent-not-present.js b/js/src/jit-test/tests/proxy/getElementIfPresent-not-present.js new file mode 100644 index 0000000000..ccfb92d8c4 --- /dev/null +++ b/js/src/jit-test/tests/proxy/getElementIfPresent-not-present.js @@ -0,0 +1,5 @@ +x = (/x/).exec(); +y = wrapWithProto((new WeakMap), x); +y.length = 7; +Array.prototype.push.call(y, 1); +Array.prototype.reverse.call(y); diff --git a/js/src/jit-test/tests/proxy/getPrototype-cycle-for-in.js b/js/src/jit-test/tests/proxy/getPrototype-cycle-for-in.js new file mode 100644 index 0000000000..0a5275af0a --- /dev/null +++ b/js/src/jit-test/tests/proxy/getPrototype-cycle-for-in.js @@ -0,0 +1,12 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") +timeout(0.5); + +var proxy = new Proxy({}, { + getPrototypeOf() { + return proxy; + } +}); + +var obj = {a: 1, b: 2, __proto__: proxy}; +for (var x in obj) {} +assertEq(0, 1); // Should timeout. diff --git a/js/src/jit-test/tests/proxy/getPrototype-cycle-hasInstance.js b/js/src/jit-test/tests/proxy/getPrototype-cycle-hasInstance.js new file mode 100644 index 0000000000..7a6324b1be --- /dev/null +++ b/js/src/jit-test/tests/proxy/getPrototype-cycle-hasInstance.js @@ -0,0 +1,11 @@ +// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration("wasi") +timeout(0.5) + +var proxy = new Proxy({}, { + getPrototypeOf() { + return proxy; + } +}); + +var x = proxy instanceof function() {}; +assertEq(0, 1); // Should timeout. diff --git a/js/src/jit-test/tests/proxy/operations-on-revoked.js b/js/src/jit-test/tests/proxy/operations-on-revoked.js new file mode 100644 index 0000000000..181f4c6fcf --- /dev/null +++ b/js/src/jit-test/tests/proxy/operations-on-revoked.js @@ -0,0 +1,18 @@ +load(libdir + 'asserts.js'); + +var r = Proxy.revocable({}, {}); +var r2 = Proxy.revocable(function(){}, {}); +r.revoke(); +r2.revoke(); + +var p = r.proxy; +var p2 = r2.proxy; + +assertThrowsInstanceOf(() => ({} instanceof p), TypeError); +assertThrowsInstanceOf(() => ({} instanceof p2), TypeError); + +assertThrowsInstanceOf(() => Object.prototype.toString.call(p), TypeError); +assertThrowsInstanceOf(() => Object.prototype.toString.call(p2), TypeError); + +assertThrowsInstanceOf(() => RegExp.prototype.exec.call(p, ""), TypeError); +assertThrowsInstanceOf(() => RegExp.prototype.exec.call(p2, ""), TypeError); diff --git a/js/src/jit-test/tests/proxy/preserve-iscallable-isconstructor.js b/js/src/jit-test/tests/proxy/preserve-iscallable-isconstructor.js new file mode 100644 index 0000000000..f1c84e2065 --- /dev/null +++ b/js/src/jit-test/tests/proxy/preserve-iscallable-isconstructor.js @@ -0,0 +1,17 @@ +load(libdir + "asserts.js"); + +var global = newGlobal({newCompartment: true}) +var fun = global.eval("(function() {})") +var p = new Proxy(fun, {}) + +// Nuking should preserve IsCallable and IsConstructor. +assertEq(isConstructor(p), true); +assertEq(typeof p, "function"); +nukeCCW(fun); +assertEq(isConstructor(p), true); +assertEq(typeof p, "function"); + +// But actually calling and constructing should throw, because it's been +// nuked. +assertThrowsInstanceOf(() => { p(); }, TypeError); +assertThrowsInstanceOf(() => { new p(); }, TypeError); diff --git a/js/src/jit-test/tests/proxy/proxy-array-length.js b/js/src/jit-test/tests/proxy/proxy-array-length.js new file mode 100644 index 0000000000..11045aac0f --- /dev/null +++ b/js/src/jit-test/tests/proxy/proxy-array-length.js @@ -0,0 +1,4 @@ +var a = [1, 2, 3]; +var p = new Proxy(a, {}); +assertEq(p.length, 3); +assertEq(JSON.stringify(p), "[1,2,3]"); diff --git a/js/src/jit-test/tests/proxy/seal-proxy.js b/js/src/jit-test/tests/proxy/seal-proxy.js new file mode 100644 index 0000000000..74923cde01 --- /dev/null +++ b/js/src/jit-test/tests/proxy/seal-proxy.js @@ -0,0 +1,16 @@ +var called = []; +var proxy = new Proxy({a: 1}, { + getOwnPropertyDescriptor(target, P) { + called.push("getOwnPropertyDescriptor"); + return Object.getOwnPropertyDescriptor(target, P); + }, + defineProperty(target, P, desc) { + called.push("defineProperty"); + assertEq(Object.getOwnPropertyNames(desc).length, 1); + assertEq(desc.configurable, false); + return Object.defineProperty(target, P, desc); + } +}); + +Object.seal(proxy); +assertEq(called.toString(), "defineProperty"); diff --git a/js/src/jit-test/tests/proxy/surfaces.js b/js/src/jit-test/tests/proxy/surfaces.js new file mode 100644 index 0000000000..087b53f94d --- /dev/null +++ b/js/src/jit-test/tests/proxy/surfaces.js @@ -0,0 +1,14 @@ +// Check superficial properties of the Proxy constructor. + +var desc = Object.getOwnPropertyDescriptor(this, "Proxy"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, false); +assertEq(desc.writable, true); +assertEq(desc.value, Proxy); + +assertEq(typeof Proxy, "function"); +assertEq(Object.getPrototypeOf(Proxy), Function.prototype); +assertEq(Proxy.length, 2); + +// Proxy is a constructor but has no .prototype property. +assertEq(Proxy.hasOwnProperty("prototype"), false); diff --git a/js/src/jit-test/tests/proxy/target-becomes-nonextensible-during-preventExtensions.js b/js/src/jit-test/tests/proxy/target-becomes-nonextensible-during-preventExtensions.js new file mode 100644 index 0000000000..3ef475c728 --- /dev/null +++ b/js/src/jit-test/tests/proxy/target-becomes-nonextensible-during-preventExtensions.js @@ -0,0 +1,8 @@ +// Don't assert +var obj = {}; +var proxy = new Proxy(obj, { + get preventExtensions() { + Object.preventExtensions(obj); + } +}); +Object.preventExtensions(proxy); diff --git a/js/src/jit-test/tests/proxy/testBug793160.js b/js/src/jit-test/tests/proxy/testBug793160.js new file mode 100644 index 0000000000..8e15baa269 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testBug793160.js @@ -0,0 +1,3 @@ +var obj = new Proxy(Object.create(null), {}); +assertEq(typeof obj, 'object'); +assertEq(obj != null, true); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyApply1.js b/js/src/jit-test/tests/proxy/testDirectProxyApply1.js new file mode 100644 index 0000000000..a198dd1449 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyApply1.js @@ -0,0 +1,6 @@ +// Forward to the target if the trap is undefined +var target = function (x, y) { + return x + y; +} +for (let p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) + assertEq(p(2, 3), 5); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyApply2.js b/js/src/jit-test/tests/proxy/testDirectProxyApply2.js new file mode 100644 index 0000000000..cc2c5332e7 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyApply2.js @@ -0,0 +1,19 @@ +/* + * Call the trap with the handler as the this value, the target as the first + * argument, the original this value as the second argument, and the original + * arguments as the third argument. + */ +var target = function () {}; +var receiver = {}; +var handler = { + apply: function (target1, receiver1, args) { + assertEq(this, handler); + assertEq(target1, target); + assertEq(receiver1, receiver); + assertEq(args.length, 2); + assertEq(args[0], 2); + assertEq(args[1], 3); + } +} +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + p.call(receiver, 2, 3); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyApply3.js b/js/src/jit-test/tests/proxy/testDirectProxyApply3.js new file mode 100644 index 0000000000..2a5f927f65 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyApply3.js @@ -0,0 +1,10 @@ +// Return the trap result +// Man, wouldn't haskell's "uninfix" be cleaner? (+) +function justAdd(x, y) { + return x + y; +} + +var handler = { apply : function (target, receiver, args) { return args[0] * args[1]; } }; + +for (let p of [new Proxy(justAdd, handler), Proxy.revocable(justAdd, handler).proxy]) + assertEq(p(2,3), 6); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyApply4.js b/js/src/jit-test/tests/proxy/testDirectProxyApply4.js new file mode 100644 index 0000000000..448f8c3b2c --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyApply4.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); +// Revoked proxies should throw before calling the handler + +var called = false; +var target = function () { }; +var handler = { apply: () => called = true }; +var holder = Proxy.revocable(target, handler); + +holder.revoke(); + +assertThrowsInstanceOf(() => holder.proxy(), TypeError); +assertEq(called, false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyConstruct1.js b/js/src/jit-test/tests/proxy/testDirectProxyConstruct1.js new file mode 100644 index 0000000000..6117d8b6cb --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyConstruct1.js @@ -0,0 +1,12 @@ +// Forward to the target if the trap is undefined +var p; +var target = function (x, y) { + assertEq(new.target, p); + this.foo = x + y; +} + +for (p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) { + var obj = new p(2, 3); + assertEq(obj.foo, 5); + assertEq(Object.getPrototypeOf(obj), target.prototype); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyConstruct2.js b/js/src/jit-test/tests/proxy/testDirectProxyConstruct2.js new file mode 100644 index 0000000000..7f2421bd67 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyConstruct2.js @@ -0,0 +1,21 @@ +load(libdir + "asserts.js"); +/* + * Call the trap with the handler as the this value, the target as the first + * argument, and the original arguments as the third argument. + * + * Hooks that don't return an object must throw. + */ +var p; +var target = function () {}; +var handler = { + construct: function (target1, args, newTarget) { + assertEq(this, handler); + assertEq(target1, target); + assertEq(args.length, 2); + assertEq(args[0], 2); + assertEq(args[1], 3); + assertEq(newTarget, p); + } +} +for (p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(function () {new p(2, 3)}, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyConstruct3.js b/js/src/jit-test/tests/proxy/testDirectProxyConstruct3.js new file mode 100644 index 0000000000..881523cdff --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyConstruct3.js @@ -0,0 +1,11 @@ +// Return the trap result +function setFoo(x,y) { this.foo = x + y; } +var handler = { construct: function (target, args) { return { foo : args[0] * args[1]}; } } + +for (let proxy of [new Proxy(setFoo, handler), Proxy.revocable(setFoo, handler).proxy]) { + var obj1 = new proxy(2, 3); + assertEq(obj1.foo, 6); + obj1.bar = proxy; + var obj2 = new obj1.bar(2, 3); + assertEq(obj2.foo, 6); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyConstruct4.js b/js/src/jit-test/tests/proxy/testDirectProxyConstruct4.js new file mode 100644 index 0000000000..35a44deac0 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyConstruct4.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); +// Revoked proxies should throw before calling the handler + +var called = false; +var target = function () { }; +var handler = { construct: () => called = true }; +var holder = Proxy.revocable(target, handler); + +holder.revoke(); + +assertThrowsInstanceOf(() => new holder.proxy(), TypeError); +assertEq(called, false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyConstruct5.js b/js/src/jit-test/tests/proxy/testDirectProxyConstruct5.js new file mode 100644 index 0000000000..e86bc456fa --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyConstruct5.js @@ -0,0 +1,14 @@ +load(libdir + "asserts.js"); + +// Make sure that a proxy only has a [[Construct]] if the target does + +var handler = {}; +var p = new Proxy(Math.sin, handler); +var r = Proxy.revocable(Math.sin, handler).proxy; + +assertThrowsInstanceOf(() => new p, TypeError, "Can't use 'new' on proxy with non-constructor target"); +assertThrowsInstanceOf(() => new r, TypeError, "Can't use 'new' on proxy with non-constructor target"); +// Better throw regardless of whether we have a handler trap. +handler.construct = (() => ({})); +assertThrowsInstanceOf(() => new p, TypeError, "Can't use 'new' on proxy with non-constructor target"); +assertThrowsInstanceOf(() => new r, TypeError, "Can't use 'new' on proxy with non-constructor target"); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyConstructor.js b/js/src/jit-test/tests/proxy/testDirectProxyConstructor.js new file mode 100644 index 0000000000..9ff2710bf0 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyConstructor.js @@ -0,0 +1,19 @@ +load(libdir + "asserts.js"); + +// Throw a TypeError if Proxy is not called as a constructor +assertThrowsInstanceOf(function () { Proxy({}, {}); }, TypeError); + +// Throw a TypeError if Proxy is called with less than two arguments +assertThrowsInstanceOf(function () { new Proxy(); }, TypeError); +assertThrowsInstanceOf(function () { new Proxy({}); }, TypeError); + +// Throw a TypeError if the first argument is not a non-null object +assertThrowsInstanceOf(function () { new Proxy(0, {}); }, TypeError); +assertThrowsInstanceOf(function () { new Proxy(null, {}); }, TypeError); + +// Throw a TypeError if the second argument is not a non-null object +assertThrowsInstanceOf(function () { new Proxy({}, 0); }, TypeError); +assertThrowsInstanceOf(function () { new Proxy({}, null); }, TypeError); + +// Result of the call should be an object +assertEq(typeof new Proxy({}, {}), 'object'); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty1.js b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty1.js new file mode 100644 index 0000000000..243ad55a13 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty1.js @@ -0,0 +1,23 @@ +// Forward to the target if the trap is not defined + +var target; +function testProxy(p, key) { + Object.defineProperty(p, key, { + value: 'bar', + writable: true, + enumerable: false, + configurable: true + }); + var desc = Object.getOwnPropertyDescriptor(target, key); + assertEq(desc.value, 'bar'); + assertEq(desc.writable, true); + assertEq(desc.enumerable, false); + assertEq(desc.configurable, true); +} + +for (var key of ['foo', Symbol("quux")]) { + target = {}; + testProxy(new Proxy(target, {}), key); + target = {}; + testProxy(Proxy.revocable(target, {}).proxy, key); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty2.js b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty2.js new file mode 100644 index 0000000000..e07323efe5 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty2.js @@ -0,0 +1,34 @@ +/* + * Call the trap with the handler as the this value, the target as the first + * argument, the name of the property as the second argument, and the descriptor + * as the third argument. + */ +var target = {}; +var handler = { + defineProperty: function (target1, key, desc1) { + assertEq(this, handler); + assertEq(target1, target); + log.push(key); + assertEq(desc1 == desc, false); + assertEq(desc1.value, 'bar'); + assertEq(desc1.writable, true); + assertEq(desc1.enumerable, false); + assertEq(desc1.configurable, true); + return true; + } +}; +var desc = { + value: 'bar', + writable: true, + enumerable: false, + configurable: true +}; + +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + var log = []; + Object.defineProperty(p, 'foo', desc); + Object.defineProperty(p, Symbol.for('quux'), desc); + assertEq(log.length, 2); + assertEq(log[0], 'foo'); + assertEq(log[1], Symbol.for('quux')); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty3.js b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty3.js new file mode 100644 index 0000000000..8a466aded2 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty3.js @@ -0,0 +1,16 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap defines a new property on a non-extensible + * object + */ +var target = {}; +Object.preventExtensions(target); + +var handler = { defineProperty: function (target, name, desc) { return true; } }; + +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + assertThrowsInstanceOf(function () { + Object.defineProperty(p, 'foo', { configurable: true }); + }, TypeError); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty4.js b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty4.js new file mode 100644 index 0000000000..30e8d63161 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty4.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap defines a non-configurable property that does + * not exist on the target + */ +var handler = { defineProperty: function (target, name, desc) { return true; } }; +for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy]) { + assertThrowsInstanceOf(function () { + Object.defineProperty(p, 'foo', { configurable: false }); + }, TypeError); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty5.js b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty5.js new file mode 100644 index 0000000000..78d8847a97 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty5.js @@ -0,0 +1,13 @@ +load(libdir + "asserts.js"); +// Revoked proxies should throw before calling the handler + +var called = false; +var target = {}; +var handler = { defineProperty: () => called = true }; +var holder = Proxy.revocable(target, handler); + +holder.revoke(); + +var p = holder.proxy; +assertThrowsInstanceOf(() => Object.defineProperty(p, 'foo', {}), TypeError); +assertEq(called, false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty6.js b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty6.js new file mode 100644 index 0000000000..9818257e0c --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty6.js @@ -0,0 +1,16 @@ +// Bug 1133094 - Proxy.[[DefineOwnProperty]]() should not throw when asked to +// define a configurable accessor property over an existing configurable data +// property on the target, even if the trap leaves the target unchanged. + +var hits = 0; +var p = new Proxy({x: 1}, { + defineProperty(t, k, desc) { + // don't bother redefining the existing property t.x + hits++; + return true; + } +}); + +assertEq(Object.defineProperty(p, "x", {get: function () {}}), p); +assertEq(hits, 1); +assertEq(p.x, 1); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty7.js b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty7.js new file mode 100644 index 0000000000..8c05147c57 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty7.js @@ -0,0 +1,17 @@ +// Bug 1133085 - Test that descriptors are properly reconstituted +// when only .get or only .set is present. + +load(libdir + "asserts.js"); + +var input, output; +var p = new Proxy({x: 0}, { + defineProperty(t, k, desc) { output = desc; print("ok"); return true; } +}); + +input = {get: function () {}}; +Object.defineProperty(p, "x", input); +assertDeepEq(output, input); + +input = {set: function () {}}; +Object.defineProperty(p, "x", input); +assertDeepEq(output, input); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyDefinePropertyFailure.js b/js/src/jit-test/tests/proxy/testDirectProxyDefinePropertyFailure.js new file mode 100644 index 0000000000..0de3000c3f --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyDefinePropertyFailure.js @@ -0,0 +1,26 @@ +// Test handling of false return from a handler.defineProperty() hook. + +load(libdir + "asserts.js"); + +var obj = {x: 1, y: 2}; +var nope = false; +var p = new Proxy(obj, { + defineProperty(target, key, desc) { return nope; } +}); + +// Object.defineProperty throws on failure. +print(1); +assertThrowsInstanceOf(() => Object.defineProperty(p, "z", {value: 3}), TypeError); +assertEq("z" in obj, false); +assertThrowsInstanceOf(() => Object.defineProperty(p, "x", {value: 0}), TypeError); + +// Setting a property ultimately causes [[DefineOwnProperty]] to be called. +// In strict mode code only, this is a TypeError. +print(2); +assertEq(p.z = 3, 3); +assertThrowsInstanceOf(() => { "use strict"; p.z = 3; }, TypeError); + +// Other falsy values also trigger failure. +print(3); +for (nope of [0, -0, NaN, ""]) + assertThrowsInstanceOf(() => { "use strict"; p.z = 3; }, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyEnumerate1.js b/js/src/jit-test/tests/proxy/testDirectProxyEnumerate1.js new file mode 100644 index 0000000000..485e03182e --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyEnumerate1.js @@ -0,0 +1,14 @@ +// for-in with revoked Proxy +load(libdir + "asserts.js"); + +let {proxy, revoke} = Proxy.revocable({a: 1}, {}); + +for (let x in proxy) + assertEq(x, "a") + +revoke(); + +assertThrowsInstanceOf(function() { + for (let x in proxy) + assertEq(true, false); +}, TypeError) diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet1.js b/js/src/jit-test/tests/proxy/testDirectProxyGet1.js new file mode 100644 index 0000000000..43cb5385d0 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet1.js @@ -0,0 +1,12 @@ +// Forward to the target if the trap is not defined +var target = { foo: 'bar' }; +for (let p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) { + assertEq(p.foo, 'bar'); + assertEq(p['foo'], 'bar'); +} + +var s = Symbol.for("moon"); +var obj = {}; +obj[s] = "dust"; +for (let p of [new Proxy(obj, {}), Proxy.revocable(obj, {}).proxy]) + assertEq(p[s], "dust"); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet10.js b/js/src/jit-test/tests/proxy/testDirectProxyGet10.js new file mode 100644 index 0000000000..c6d73e1956 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet10.js @@ -0,0 +1,43 @@ +load(libdir + "asserts.js"); + +var target = {x:5}; +var magic = false; +var returnValue = 42; +var handler = { + get(t, p, a, b) { + assertEq(a, proxy); + assertEq(b, undefined); + assertEq(arguments.length, 3); + if (magic) { + Object.defineProperty(target, 'x', { + value: 42, + writable: false, + configurable: false + }); + if (returnValue != 42) { + gc(testGet, "shrinking"); + } + } + return returnValue; + } +}; +var proxy = new Proxy(target, handler); + +// Use an array that sometimes has a proxy and sometimes not, to get to +// the Ion IC path. +var maybeProxies = [ + {x: returnValue}, + proxy, +]; + +function testGet(p) { + return p.x; +} + +for (i = 0; i < 200; i++) { + assertEq(testGet(maybeProxies[i % maybeProxies.length]), returnValue); +} +magic = true; +assertEq(testGet(proxy), returnValue); +returnValue = 41; +assertThrowsInstanceOf(function () { testGet(proxy) }, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet11.js b/js/src/jit-test/tests/proxy/testDirectProxyGet11.js new file mode 100644 index 0000000000..1f0f0e0b0b --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet11.js @@ -0,0 +1,28 @@ +load(libdir + "asserts.js"); + +var target = {x:5}; +var returnValue = 42; +var handler = { + get(t, p) { + if (returnValue != 42) { + gc(testGet, "shrinking"); + } + return returnValue; + } +}; +var proxy = new Proxy(target, handler); + +function testGet(p) { + return p.x; +} + +for (i = 0; i < 200; i++) { + assertEq(testGet(proxy), returnValue); +} + +Object.defineProperty(target, 'x', { + set(v) {}, + configurable: false +}); + +assertThrowsInstanceOf(function () { testGet(proxy) }, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet12.js b/js/src/jit-test/tests/proxy/testDirectProxyGet12.js new file mode 100644 index 0000000000..c6663d7703 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet12.js @@ -0,0 +1,31 @@ +load(libdir + "asserts.js"); + +let {object: target, transplant} = transplantableObject(options); +let otherGlobal = newGlobal({newCompartment: true}); + +var returnValue = 42; +var handler = { + get(t, p) { + if (returnValue != 42) { + transplant(otherGlobal); + Object.defineProperty(target, "x", { + value: 42, + writable: false, + configurable: false, + }); + } + return returnValue; + } +}; +var proxy = new Proxy(target, handler); + +function testGet(p) { + return p.x; +} + +for (i = 0; i < 200; i++) { + assertEq(testGet(proxy), returnValue); +} + +returnValue = 43; +assertThrowsInstanceOf(function () { testGet(proxy) }, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet13.js b/js/src/jit-test/tests/proxy/testDirectProxyGet13.js new file mode 100644 index 0000000000..1e86e64fd7 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet13.js @@ -0,0 +1,31 @@ +load(libdir + "asserts.js"); + +var target = {x: 5}; +var returnValue = 42; +var handler = { + get(t, p) { + if (returnValue != 42) { + bailout(); + } + return returnValue; + } +}; +var proxy = new Proxy(target, handler); + +function testGet(p) { + return p.x; +} + +for (i = 0; i < 200; i++) { + assertEq(testGet(proxy), returnValue); +} + +Object.defineProperty(target, 'x', { + value: 42, + writable: false, + configurable: false +}); + +assertEq(testGet(proxy), returnValue); +returnValue = 41; +assertThrowsInstanceOf(function () { testGet(proxy) }, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet14.js b/js/src/jit-test/tests/proxy/testDirectProxyGet14.js new file mode 100644 index 0000000000..c87c37b0de --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet14.js @@ -0,0 +1,22 @@ +load(libdir + "asserts.js"); + +var target = {x: 5}; +var returnValue = 42; +var handler = { + get(t, p) { + return returnValue; + } +}; +var {proxy, revoke} = Proxy.revocable(target, handler); + +function testGet(p) { + return p.x; +} + +for (i = 0; i < 200; i++) { + assertEq(testGet(proxy), returnValue); +} + +assertEq(testGet(proxy), returnValue); +revoke(); +assertThrowsInstanceOf(function () { testGet(proxy) }, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet15.js b/js/src/jit-test/tests/proxy/testDirectProxyGet15.js new file mode 100644 index 0000000000..60b86feacf --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet15.js @@ -0,0 +1,25 @@ +var target = {x: 5}; +var returnValue = 42; +var handlerProto = {}; +var handler = {}; +handlerProto.get = function(t, p) { + return returnValue; +} +handler.foo = handlerProto.get; +handler.__proto__ = handlerProto; + +var proxy = new Proxy(target, handler); + +function testGet(p) { + return p.x; +} + +for (i = 0; i < 500; i++) { + assertEq(testGet(proxy), returnValue); +} + +handlerProto.get = function() { + return returnValue - 1; +} + +assertEq(testGet(proxy), returnValue - 1); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet2.js b/js/src/jit-test/tests/proxy/testDirectProxyGet2.js new file mode 100644 index 0000000000..ab3efae322 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet2.js @@ -0,0 +1,22 @@ +/* + * Call the trap with the handler as the this value, the target as the first + * argument, the name of the property as the second argument, and the receiver + * as the third argument + */ +var target = {}; +for (var key of ['foo', Symbol.iterator]) { + handler = {}; + for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + handler.get = + function (target1, name, receiver) { + assertEq(this, handler); + assertEq(target1, target); + assertEq(name, key); + assertEq(receiver, p); + called = true; + }; + var called = false; + assertEq(p[key], undefined); + assertEq(called, true); + } +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet3.js b/js/src/jit-test/tests/proxy/testDirectProxyGet3.js new file mode 100644 index 0000000000..e0acc3b3bb --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet3.js @@ -0,0 +1,50 @@ +load(libdir + "asserts.js"); + +function testProxy(handlerReturn, prop, shouldThrow) { + var handler = { get: function () { return handlerReturn; } }; + for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + if (shouldThrow) + assertThrowsInstanceOf(function () { return p[prop]; }, TypeError); + else + assertEq(p[prop], handlerReturn); + } +} + +/* + * Throw a TypeError if the trap reports a different value for a non-writable, + * non-configurable property + */ +var target = {}; +Object.defineProperty(target, 'foo', { + value: 'bar', + writable: false, + configurable: false +}); +testProxy('baz', 'foo', true); +/* + * Don't throw a TypeError if the trap reports the same value for a non-writable, + * non-configurable property + */ +testProxy('bar', 'foo', false); + +/* + * Don't throw a TypeError if the trap reports a different value for a writable, + * non-configurable property + */ +Object.defineProperty(target, 'prop', { + value: 'bar', + writable: true, + configurable: false +}); +testProxy('baz', 'prop', false); + +/* + * Don't throw a TypeError if the trap reports a different value for a non-writable, + * configurable property + */ +Object.defineProperty(target, 'prop2', { + value: 'bar', + writable: false, + configurable: true +}); +testProxy('baz', 'prop2', false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet4.js b/js/src/jit-test/tests/proxy/testDirectProxyGet4.js new file mode 100644 index 0000000000..4fc7b2f9a3 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet4.js @@ -0,0 +1,14 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap does not report undefined for a non-configurable + * accessor property that does not have a getter + */ +var target = {}; +Object.defineProperty(target, 'foo', { + set: function (value) {}, + configurable: false +}); +var handler = { get: function (target, name, receiver) { return 'baz'; } }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(function () { p['foo'] }, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet5.js b/js/src/jit-test/tests/proxy/testDirectProxyGet5.js new file mode 100644 index 0000000000..a71a36e80b --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet5.js @@ -0,0 +1,16 @@ +// Return the trap result +var target = { foo: 'bar' }; +var s1 = Symbol("moon"), s2 = Symbol("sun"); +target[s1] = "wrong"; + +var handler = { }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + handler.get = (() => 'baz'); + assertEq(p.foo, 'baz'); + + handler.get = (() => undefined); + assertEq(p.foo, undefined); + + handler.get = (() => s2); + assertEq(p[s1], s2); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet6.js b/js/src/jit-test/tests/proxy/testDirectProxyGet6.js new file mode 100644 index 0000000000..c86818122f --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet6.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); +// Revoked proxies should throw before calling the handler + +var called = false; +var target = {}; +var handler = { get: () => called = true }; +var holder = Proxy.revocable(target, handler); + +holder.revoke(); + +assertThrowsInstanceOf(() => holder.proxy.foo, TypeError); +assertEq(called, false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet8.js b/js/src/jit-test/tests/proxy/testDirectProxyGet8.js new file mode 100644 index 0000000000..3b00be202d --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet8.js @@ -0,0 +1,31 @@ +load(libdir + "asserts.js"); + +var target = {x: 5}; +var returnValue = 42; +var handler = { + get(t, p) { + if (returnValue != 42) { + gc(testGet, "shrinking"); + } + return returnValue; + } +}; +var proxy = new Proxy(target, handler); + +function testGet(p) { + return p.x; +} + +for (i = 0; i < 200; i++) { + assertEq(testGet(proxy), returnValue); +} + +Object.defineProperty(target, 'x', { + value: 42, + writable: false, + configurable: false +}); + +assertEq(testGet(proxy), returnValue); +returnValue = 41; +assertThrowsInstanceOf(function () { testGet(proxy) }, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGet9.js b/js/src/jit-test/tests/proxy/testDirectProxyGet9.js new file mode 100644 index 0000000000..7b51227b92 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGet9.js @@ -0,0 +1,33 @@ +load(libdir + "asserts.js"); + +var target = {x:5}; +var magic = false; +var returnValue = 42; +var handler = { + get(t, p) { + if (magic) { + Object.defineProperty(target, 'x', { + value: 42, + writable: false, + configurable: false + }); + if (returnValue != 42) { + gc(testGet, "shrinking"); + } + } + return returnValue; + } +}; +var proxy = new Proxy(target, handler); + +function testGet(p) { + return p.x; +} + +for (i = 0; i < 200; i++) { + assertEq(testGet(proxy), returnValue); +} +magic = true; +assertEq(testGet(proxy), returnValue); +returnValue = 41; +assertThrowsInstanceOf(function () { testGet(proxy) }, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetInherited1.js b/js/src/jit-test/tests/proxy/testDirectProxyGetInherited1.js new file mode 100644 index 0000000000..fc2dc0388f --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetInherited1.js @@ -0,0 +1,16 @@ +// Getting a property that exists on an ordinary object +// does not touch a proxy on its proto chain. + +load(libdir + "asserts.js"); + +var angryHandler = new Proxy({}, { + get(t, id) { throw new Error("angryHandler should not be queried (" + id + ")"); } +}); +var angryProto = new Proxy({}, angryHandler); +var obj = Object.create(angryProto, { + x: {value: 3}, + y: {get: () => 4} +}); +assertThrowsInstanceOf(() => obj.z, Error); // check that angryProto works +assertEq(obj.x, 3); +assertEq(obj.y, 4); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetInherited2.js b/js/src/jit-test/tests/proxy/testDirectProxyGetInherited2.js new file mode 100644 index 0000000000..3c58e314ea --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetInherited2.js @@ -0,0 +1,31 @@ +// Getting a property that's inherted from a proxy calls the proxy's get handler. + +var handler = { + get(t, id, r) { + assertEq(this, handler); + assertEq(t, target); + assertEq(id, "foo"); + assertEq(r, obj); + return "bar"; + }, + getOwnPropertyDescriptor(t, id) { + throw "FAIL"; + } +}; + +var target = {}; +var proto = new Proxy(target, handler); +var obj = Object.create(proto); +assertEq(obj.foo, "bar"); + +// Longer proto chain: same result. +var origObj = obj; +for (var i = 0; i < 4; i++) + obj = Object.create(obj); +assertEq(obj.foo, "bar"); + +// Chain of transparent proxy wrappers: same result. +obj = origObj; +for (var i = 0; i < 4; i++) + obj = new Proxy(obj, {}); +assertEq(obj.foo, "bar"); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetInherited3.js b/js/src/jit-test/tests/proxy/testDirectProxyGetInherited3.js new file mode 100644 index 0000000000..d9f34e60e8 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetInherited3.js @@ -0,0 +1,21 @@ +// Recursion through the get hook works; runaway recursion is checked. + +load(libdir + "asserts.js"); + +var hits = 0, limit = 10; +var proto = new Proxy({}, { + get(t, id, r) { + assertEq(r, obj); + if (hits++ >= limit) + return "ding"; + return obj[id]; + } +}); + +var obj = Object.create(proto); +assertEq(obj.prop, "ding"); + +hits = 0; +limit = Infinity; +assertThrowsInstanceOf(() => obj.prop, InternalError); +assertEq(hits > 10, true); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetInherited4.js b/js/src/jit-test/tests/proxy/testDirectProxyGetInherited4.js new file mode 100644 index 0000000000..b1cf4a9053 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetInherited4.js @@ -0,0 +1,6 @@ +// A proxy P whose target is an object X whose prototype is an array V inherits V.length. + +var V = [1, 2, 3]; +var X = Object.create(V); +var P = new Proxy(X, {}); +assertEq(P.length, 3); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor1.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor1.js new file mode 100644 index 0000000000..20163dfe04 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor1.js @@ -0,0 +1,27 @@ +// Forward to the target if the trap is not defined +var target = {}; +Object.defineProperty(target, 'foo', { + value: 'bar', + writable: true, + enumerable: false, + configurable: true +}); + +for (let p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) { + var desc = Object.getOwnPropertyDescriptor(p, 'foo'); + assertEq(desc.value, 'bar'); + assertEq(desc.writable, true); + assertEq(desc.enumerable, false); + assertEq(desc.configurable, true); +} + +var proto = {}; +Object.defineProperty(proto, 'foo', { + value: 'bar', + writable: true, + enumerable: false, + configurable: true +}); +var target = Object.create(proto); +for (let p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) + assertEq(Object.getOwnPropertyDescriptor(p, 'foo'), undefined); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor10.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor10.js new file mode 100644 index 0000000000..79a46d59fd --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor10.js @@ -0,0 +1,35 @@ +// Return a new descriptor object that agrees with that returned by the trap +var target = {}; +Object.defineProperty(target, 'foo', { + value: 'bar', + writable: true, + enumerable: false, + configurable: true +}); + +var desc = { + value: 'baz', + writable: false, + enumerable: true, + configurable: true +}; +var handler = { getOwnPropertyDescriptor: function () { return desc; } }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + var desc1 = Object.getOwnPropertyDescriptor(p, 'foo'); + assertEq(desc1 == desc, false); + assertEq(desc1.value, 'baz'); + assertEq(desc1.writable, false); + assertEq(desc1.enumerable, true); + assertEq(desc1.configurable, true); +} + +// The returned descriptor must agree in configurability. +desc = { configurable : true }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + var desc1 = Object.getOwnPropertyDescriptor(p, 'foo'); + assertEq(desc1 == desc, false); + assertEq(desc1.value, undefined); + assertEq(desc1.writable, false); + assertEq(desc1.enumerable, false); + assertEq(desc1.configurable, true); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor11.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor11.js new file mode 100644 index 0000000000..7af839477d --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor11.js @@ -0,0 +1,14 @@ +// Bug 1133294 - Object.getOwnPropertyDescriptor should never return an incomplete descriptor. + +load(libdir + "asserts.js"); + +var p = new Proxy({}, { + getOwnPropertyDescriptor() { return {configurable: true}; } +}); +var desc = Object.getOwnPropertyDescriptor(p, "x"); +assertDeepEq(desc, { + value: undefined, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor2.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor2.js new file mode 100644 index 0000000000..abf1f5d6d3 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor2.js @@ -0,0 +1,20 @@ +/* + * Call the trap with the handler as the this value, the target as the first + * argument, and the name of the property as the second argument + */ +var target = {}; +var called; +var handler = { + getOwnPropertyDescriptor: function (target1, name) { + assertEq(this, handler); + assertEq(target1, target); + assertEq(name, 'foo'); + called = true; + } +}; + +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + called = false; + Object.getOwnPropertyDescriptor(p, 'foo'); + assertEq(called, true); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor3.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor3.js new file mode 100644 index 0000000000..0bfdc7fb83 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor3.js @@ -0,0 +1,13 @@ +load(libdir + "asserts.js"); +// Revoked proxies should throw before calling the handler + +var called = false; +var target = {}; +var handler = { getOwnPropertyDescriptor: () => called = true }; +var holder = Proxy.revocable(target, handler); + +holder.revoke(); + +var test = function () { Object.getOwnPropertyDescriptor(holder.proxy, 'foo'); } +assertThrowsInstanceOf(test, TypeError); +assertEq(called, false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor4.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor4.js new file mode 100644 index 0000000000..9920121f20 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor4.js @@ -0,0 +1,14 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap reports a non-configurable property as + * non-existent + */ +var target = {}; +Object.defineProperty(target, 'foo', { + configurable: false +}); + +var handler = { getOwnPropertyDescriptor: () => undefined }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => Object.getOwnPropertyDescriptor(p, 'foo'), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor5.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor5.js new file mode 100644 index 0000000000..0d3334680a --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor5.js @@ -0,0 +1,15 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap reports an existing own property as + * non-existent on a non-extensible object + */ +var target = {}; +Object.defineProperty(target, 'foo', { + configurable: true +}); +Object.preventExtensions(target); + +var handler = { getOwnPropertyDescriptor: () => undefined }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => Object.getOwnPropertyDescriptor(p, 'foo'), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor6.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor6.js new file mode 100644 index 0000000000..558aab8502 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor6.js @@ -0,0 +1,9 @@ +// Return undefined if the trap returns undefined +var target = {}; +Object.defineProperty(target, 'foo', { + configurable: true +}); + +var handler = { getOwnPropertyDescriptor: () => undefined }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertEq(Object.getOwnPropertyDescriptor(p, 'foo'), undefined); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor7.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor7.js new file mode 100644 index 0000000000..4f11bb7330 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor7.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap reports a new own property on a non-extensible + * object + */ +var target = {}; +Object.preventExtensions(target); + +var handler = { getOwnPropertyDescriptor: () => ({}) }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => Object.getOwnPropertyDescriptor(p, 'foo'), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor8.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor8.js new file mode 100644 index 0000000000..6178d8a039 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor8.js @@ -0,0 +1,13 @@ +load(libdir + "asserts.js"); + +var target = {}; +var handler = { + getOwnPropertyDescriptor: function () { return { value: 2, configurable: true}; } +}; + +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + Object.getOwnPropertyDescriptor(p, 'foo'); + +Object.preventExtensions(target); +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => Object.getOwnPropertyDescriptor(p, 'foo'), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor9.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor9.js new file mode 100644 index 0000000000..7a07f74f6e --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyDescriptor9.js @@ -0,0 +1,9 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap returns a non-configurable descriptor for a + * non-existent property + */ +var handler = { getOwnPropertyDescriptor: () => ({ configurable: false }) }; +for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy]) + assertThrowsInstanceOf(() => Object.getOwnPropertyDescriptor(p, 'foo'), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames1.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames1.js new file mode 100644 index 0000000000..11618c876f --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames1.js @@ -0,0 +1,30 @@ +// Forward to the target if the trap is not defined +var objAB = Object.create(null, { + a: { + enumerable: true, + configurable: true + }, + b: { + enumerable: false, + configurable: true + } +}); + +var objCD = Object.create(objAB, { + c: { + enumerable: true, + configurable: true + }, + d: { + enumerable: false, + configurable: true + } +}); + +objCD[Symbol("moon")] = "something"; +for (let p of [new Proxy(objCD, {}), Proxy.revocable(objCD, {}).proxy]) { + var names = Object.getOwnPropertyNames(p); + assertEq(names.length, 2); + assertEq(names[0], 'c'); + assertEq(names[1], 'd'); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames2.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames2.js new file mode 100644 index 0000000000..8d3696369d --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames2.js @@ -0,0 +1,19 @@ +/* + * Call the trap with the handler as the this value, and the target as the first + * argument + */ +var target = {}; +var called = false; +var handler = { + ownKeys: function (target1) { + assertEq(this, handler); + assertEq(target1, target); + called = true; + return []; + } +}; + +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + assertEq(Object.getOwnPropertyNames(p).length, 0); + assertEq(called, true); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames3.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames3.js new file mode 100644 index 0000000000..cd674a8ba9 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames3.js @@ -0,0 +1,6 @@ +load(libdir + "asserts.js"); + +// Throw a TypeError if the trap does not return an object +var handler = { ownKeys: () => undefined }; +for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy]) + assertThrowsInstanceOf(() => Object.getOwnPropertyNames(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames4.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames4.js new file mode 100644 index 0000000000..d6ebb15b5e --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames4.js @@ -0,0 +1,7 @@ +load(libdir + "asserts.js"); + +// Throw TypeError if trap returns a property key multiple times. + +var handler = { ownKeys : () => [ 'foo', 'foo' ] }; +for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy]) + assertThrowsInstanceOf(() => Object.getOwnPropertyNames(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames5.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames5.js new file mode 100644 index 0000000000..9ff27518fd --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames5.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap reports a new own property on a non-extensible + * object + */ +var target = {}; +Object.preventExtensions(target); + +var handler = { ownKeys: () => [ 'foo' ] }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => Object.getOwnPropertyNames(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames6.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames6.js new file mode 100644 index 0000000000..355f88a92f --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames6.js @@ -0,0 +1,11 @@ +load(libdir + "asserts.js"); + +// Throw a TypeError if the trap skips a non-configurable property +var target = {}; +Object.defineProperty(target, 'foo', { + configurable: false +}); + +var handler = { ownKeys: () => [] }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => Object.getOwnPropertyNames(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames7.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames7.js new file mode 100644 index 0000000000..a062934144 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames7.js @@ -0,0 +1,15 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap skips an existing own property on a + * non-extensible object + */ +var target = {}; +Object.defineProperty(target, 'foo', { + configurable: true +}); +Object.preventExtensions(target); + +var handler = { ownKeys: () => [] }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => Object.getOwnPropertyNames(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames8.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames8.js new file mode 100644 index 0000000000..bd4631ff84 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames8.js @@ -0,0 +1,42 @@ +// Return the names returned by the trap +var target = {}; +Object.defineProperty(target, 'foo', { + configurable: true +}); + +var handler = { ownKeys: () => [ 'bar' ] }; + +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + var names = Object.getOwnPropertyNames(p); + assertEq(names.length, 1); + assertEq(names[0], 'bar'); +} + +var protoWithAB = Object.create(null, { + a: { + enumerable: true, + configurable: true + }, + b: { + enumerable: false, + configurable: true + } +}); +var objWithCD = Object.create(protoWithAB, { + c: { + enumerable: true, + configurable: true + }, + d: { + enumerable: true, + configurable: true + } +}); + +handler = { ownKeys: () => [ 'c', 'e' ] }; +for (let p of [new Proxy(objWithCD, handler), Proxy.revocable(objWithCD, handler).proxy]) { + var names = Object.getOwnPropertyNames(p); + assertEq(names.length, 2); + assertEq(names[0], 'c'); + assertEq(names[1], 'e'); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames9.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames9.js new file mode 100644 index 0000000000..18a2cc89d8 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames9.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); +// Revoked proxies should throw before calling the handler + +var called = false; +var target = {}; +var handler = { ownKeys: () => called = true }; +var holder = Proxy.revocable(target, handler); + +holder.revoke(); + +assertThrowsInstanceOf(() => Object.getOwnPropertyNames(holder.proxy), TypeError); +assertEq(called, false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyHas1.js b/js/src/jit-test/tests/proxy/testDirectProxyHas1.js new file mode 100644 index 0000000000..0e46d03e88 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyHas1.js @@ -0,0 +1,18 @@ +// Forward to the target if the trap is not defined +var proto = Object.create(null, { + 'foo': { + configurable: true + } +}); +var target = Object.create(proto, { + 'bar': { + configurable: true + } +}); + +for (let p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) { + assertEq('foo' in p, true); + assertEq('bar' in p, true); + assertEq('baz' in p, false); + assertEq(Symbol() in p, false); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyHas2.js b/js/src/jit-test/tests/proxy/testDirectProxyHas2.js new file mode 100644 index 0000000000..a1aba55dfb --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyHas2.js @@ -0,0 +1,21 @@ +/* + * Call the trap with the handler as the this value, the target as the first + * argument, and the name of the property as the second argument + */ +var target = {}; +for (var key of ['foo', Symbol('bar')]) { + var called; + var handler = { + has: function (target1, name) { + assertEq(this, handler); + assertEq(target1, target); + assertEq(name, key); + called = true; + } + }; + for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + called = false; + key in p; + assertEq(called, true); + } +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyHas3.js b/js/src/jit-test/tests/proxy/testDirectProxyHas3.js new file mode 100644 index 0000000000..1840c85fdd --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyHas3.js @@ -0,0 +1,13 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap reports a non-configurable own property as + * non-existent + */ +var target = {}; +Object.defineProperty(target, 'foo', { + configurable: false +}); +var handler = { has: () => false }; +for (p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(function () { 'foo' in p; }, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyHas4.js b/js/src/jit-test/tests/proxy/testDirectProxyHas4.js new file mode 100644 index 0000000000..e2f88a7ddc --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyHas4.js @@ -0,0 +1,15 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap reports an existing own property as + * non-existent on a non-extensible object + */ +var target = {}; +Object.defineProperty(target, 'foo', { + configurable: true +}); +Object.preventExtensions(target); + +var handler = { has: () => false }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(function () { 'foo' in p }, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyHas5.js b/js/src/jit-test/tests/proxy/testDirectProxyHas5.js new file mode 100644 index 0000000000..c581ede8ed --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyHas5.js @@ -0,0 +1,18 @@ +// Return the trap result +var proto = Object.create(null, { + 'foo': { + configurable: true + } +}); +var target = Object.create(proto, { + 'bar': { + configurable: true + } +}); + +var handler = { has: () => false }; + +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + assertEq('foo' in p, false); + assertEq('bar' in p, false); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyHas6.js b/js/src/jit-test/tests/proxy/testDirectProxyHas6.js new file mode 100644 index 0000000000..179e40f86f --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyHas6.js @@ -0,0 +1,13 @@ +/* + * Don't throw a type error if the trap reports an undefined property as + * non-present, regardless of extensibility. + */ +var target = {}; +Object.preventExtensions(target); + +var handler = { has: () => false }; + +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + assertEq('foo' in p, false); + assertEq(Symbol.iterator in p, false); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyHas7.js b/js/src/jit-test/tests/proxy/testDirectProxyHas7.js new file mode 100644 index 0000000000..096688204a --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyHas7.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); +// Revoked proxies should throw before calling the handler + +var called = false; +var target = {}; +var handler = { has: () => called = true }; +var holder = Proxy.revocable(target, handler); + +holder.revoke(); + +assertThrowsInstanceOf(() => 'foo' in holder.proxy, TypeError); +assertEq(called, false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyHasOwnProperty.js b/js/src/jit-test/tests/proxy/testDirectProxyHasOwnProperty.js new file mode 100644 index 0000000000..5b7a97bba9 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyHasOwnProperty.js @@ -0,0 +1,35 @@ +// Forward to the target if the trap is not defined +var proto = Object.create(null, { + 'foo': { + configurable: true + } +}); +var descs = { + 'bar': { + configurable: true + } +}; +descs[Symbol.for("quux")] = {configurable: true}; +var target = Object.create(proto, descs); + +for (let p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) { + assertEq(({}).hasOwnProperty.call(p, 'foo'), false); + assertEq(({}).hasOwnProperty.call(p, 'bar'), true); + assertEq(({}).hasOwnProperty.call(p, 'quux'), false); + assertEq(({}).hasOwnProperty.call(p, Symbol('quux')), false); + assertEq(({}).hasOwnProperty.call(p, 'Symbol(quux)'), false); + assertEq(({}).hasOwnProperty.call(p, Symbol.for('quux')), true); +} + +// Make sure only the getOwnPropertyDescriptor trap is called, and not the has +// trap. +var called; +var handler = { getOwnPropertyDescriptor: function () { called = true; }, + has: function () { assertEq(false, true, "has trap must not be called"); } + } + +for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy]) { + called = false; + assertEq(({}).hasOwnProperty.call(p, 'foo'), false); + assertEq(called, true); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyIsExtensible1.js b/js/src/jit-test/tests/proxy/testDirectProxyIsExtensible1.js new file mode 100644 index 0000000000..6d0bdc6298 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyIsExtensible1.js @@ -0,0 +1,97 @@ +load(libdir + "asserts.js"); +// Test ES6 Proxy trap compliance for Object.isExtensible() on exotic proxy +// objects. +var unsealed = {}; +var sealed = Object.seal({}); +var handler = {}; + +assertEq(Object.isExtensible(unsealed), true); +assertEq(Object.isExtensible(sealed), false); + +var targetSealed = new Proxy(sealed, handler); +var targetUnsealed = new Proxy(unsealed, handler); + +var handlerCalled = false; + +function testExtensible(target, expectedResult, shouldIgnoreHandler = false) +{ + for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + handlerCalled = false; + if (typeof expectedResult === "boolean") + assertEq(Object.isExtensible(p), expectedResult, "Must return the correct value."); + else + assertThrowsInstanceOf(() => Object.isExtensible(p), expectedResult); + assertEq(handlerCalled, !shouldIgnoreHandler, "Must call handler appropriately"); + } +} + +// without traps, forward to the target +// First, make sure we get the obvious answer on a non-exotic target. +testExtensible(sealed, false, /* shouldIgnoreHandler = */true); +testExtensible(unsealed, true, /* shouldIgnoreHandler = */true); + +// Now, keep everyone honest. What if the target itself is a proxy? +// Note that we cheat a little. |handlerCalled| is true in a sense, just not +// for the toplevel handler. +// While we're here, test that the argument is passed correctly. +var targetsTarget = {}; +function ensureCalled(target) { assertEq(target, targetsTarget); handlerCalled = true; return true; } +var proxyTarget = new Proxy(targetsTarget, { isExtensible : ensureCalled }); +testExtensible(proxyTarget, true); + +// What if the trap says it's necessarily sealed? +function fakeSealed() { handlerCalled = true; return false; } +handler.isExtensible = fakeSealed; +testExtensible(targetSealed, false); +testExtensible(targetUnsealed, TypeError); + +// What if the trap says it's never sealed? +function fakeUnsealed() { handlerCalled = true; return true; } +handler.isExtensible = fakeUnsealed; +testExtensible(targetSealed, TypeError); +testExtensible(targetUnsealed, true); + +// make sure we are able to prevent further extensions mid-flight and throw if the +// hook tries to lie. +function makeSealedTruth(target) { handlerCalled = true; Object.preventExtensions(target); return false; } +function makeSealedLie(target) { handlerCalled = true; Object.preventExtensions(target); return true; } +handler.isExtensible = makeSealedTruth; +testExtensible({}, false); +handler.isExtensible = makeSealedLie; +testExtensible({}, TypeError); + +// What if the trap doesn't directly return a boolean? +function falseyNonBool() { handlerCalled = true; return undefined; } +handler.isExtensible = falseyNonBool; +testExtensible(sealed, false); +testExtensible(unsealed, TypeError); + +function truthyNonBool() { handlerCalled = true; return {}; } +handler.isExtensible = truthyNonBool; +testExtensible(sealed, TypeError); +testExtensible(unsealed, true); + +// What if the trap throws? +function ExtensibleError() { } +ExtensibleError.prototype = new Error(); +ExtensibleError.prototype.constructor = ExtensibleError; +function throwFromTrap() { throw new ExtensibleError(); } +handler.isExtensible = throwFromTrap; + +// exercise some other code paths and make sure that they invoke the trap and +// can handle the ensuing error. +for (let p of [new Proxy(sealed, handler), Proxy.revocable(sealed, handler).proxy]) { + assertThrowsInstanceOf(function () { Object.isExtensible(p); }, + ExtensibleError, "Must throw if the trap does."); + assertThrowsInstanceOf(function () { Object.isFrozen(p); }, + ExtensibleError, "Must throw if the trap does."); + assertThrowsInstanceOf(function () { Object.isSealed(p); }, + ExtensibleError, "Must throw if the trap does."); +} + +// What if the trap likes to re-ask old questions? +for (let p of [new Proxy(sealed, handler), Proxy.revocable(sealed, handler).proxy]) { + handler.isExtensible = (() => Object.isExtensible(p)); + assertThrowsInstanceOf(() => Object.isExtensible(p), + InternalError, "Should allow and detect infinite recurison."); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyIsExtensible2.js b/js/src/jit-test/tests/proxy/testDirectProxyIsExtensible2.js new file mode 100644 index 0000000000..09662541d0 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyIsExtensible2.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); +// Revoked proxies should throw before calling the handler + +var called = false; +var target = {}; +var handler = { isExtensible: () => called = true }; +var holder = Proxy.revocable(target, handler); + +holder.revoke(); + +assertThrowsInstanceOf(() => Object.isExtensible(holder.proxy), TypeError); +assertEq(called, false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyKeys1.js b/js/src/jit-test/tests/proxy/testDirectProxyKeys1.js new file mode 100644 index 0000000000..2176850500 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyKeys1.js @@ -0,0 +1,27 @@ +// Forward to the target if the trap is not defined +var proto = Object.create(null, { + a: { + enumerable: true, + configurable: true + }, + b: { + enumerable: false, + configurable: true + } +}); +var target = Object.create(proto, { + c: { + enumerable: true, + configurable: true + }, + d: { + enumerable: false, + configurable: true + } +}); + +for (let p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) { + var names = Object.keys(p); + assertEq(names.length, 1); + assertEq(names[0], 'c'); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyKeys10.js b/js/src/jit-test/tests/proxy/testDirectProxyKeys10.js new file mode 100644 index 0000000000..47a4360aac --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyKeys10.js @@ -0,0 +1,23 @@ +load(libdir + "asserts.js"); + +// Allow [[GetOwnPropertyDescriptor]] to spoof enumerability of target object's +// properties. Note that this also tests that the getOwnPropertyDescriptor is +// called by Object.keys(), as expected. + +var target = {}; +var handler = { + getOwnPropertyDescriptor : function (target, P) { + var targetDesc = Object.getOwnPropertyDescriptor(target, P); + // Lie about enumerability + targetDesc.enumerable = !targetDesc.enumerable; + return targetDesc; + } +}; + +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + Object.defineProperty(target, "foo", { configurable: true, enumerable: false }); + assertDeepEq(Object.keys(p), ["foo"]); + + Object.defineProperty(target, "foo", {configurable: true, enumerable: true}); + assertDeepEq(Object.keys(p), []); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyKeys11.js b/js/src/jit-test/tests/proxy/testDirectProxyKeys11.js new file mode 100644 index 0000000000..2cd54d3b06 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyKeys11.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); +// Revoked proxies should throw before calling the handler + +var called = false; +var target = {}; +var handler = { ownKeys: () => called = true }; +var holder = Proxy.revocable(target, handler); + +holder.revoke(); + +assertThrowsInstanceOf(() => Object.keys(holder.proxy), TypeError); +assertEq(called, false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyKeys2.js b/js/src/jit-test/tests/proxy/testDirectProxyKeys2.js new file mode 100644 index 0000000000..db03be48f8 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyKeys2.js @@ -0,0 +1,20 @@ +/* + * Call the trap with the handler as the this value, and the target as the first + * argument + */ +var target = {}; +var called; +var handler = { + ownKeys: function (target1) { + assertEq(this, handler); + assertEq(target1, target); + called = true; + return []; + } +}; + +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + called = false; + Object.keys(new Proxy(target, handler)); + assertEq(called, true); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyKeys3.js b/js/src/jit-test/tests/proxy/testDirectProxyKeys3.js new file mode 100644 index 0000000000..1ffc2edd63 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyKeys3.js @@ -0,0 +1,7 @@ +load(libdir + "asserts.js"); + +// Throw a TypeError if the trap does not return an object + +var handler = { ownKeys: () => undefined }; +for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy]) + assertThrowsInstanceOf(() => Object.keys(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyKeys4.js b/js/src/jit-test/tests/proxy/testDirectProxyKeys4.js new file mode 100644 index 0000000000..16ce41a029 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyKeys4.js @@ -0,0 +1,7 @@ +load(libdir + "asserts.js"); + +// Throw TypeError if trap returns a property key multiple times. + +var handler = { ownKeys: () => [ 'foo', 'foo' ] }; +for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy]) + assertThrowsInstanceOf(() => Object.keys(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyKeys5.js b/js/src/jit-test/tests/proxy/testDirectProxyKeys5.js new file mode 100644 index 0000000000..2ccfc5cd31 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyKeys5.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap reports a new own property on a non-extensible + * object + */ +var target = {}; +Object.preventExtensions(target); + +var handler = { ownKeys: () => [ 'foo' ] }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => Object.keys(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyKeys6.js b/js/src/jit-test/tests/proxy/testDirectProxyKeys6.js new file mode 100644 index 0000000000..00d97cbbca --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyKeys6.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); + +// Throw a TypeError if the trap skips a non-configurable enumerable property +var target = {}; +Object.defineProperty(target, 'foo', { + enumerable: true, + configurable: false +}); + +var handler = { ownKeys: () => [] }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => Object.keys(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyKeys7.js b/js/src/jit-test/tests/proxy/testDirectProxyKeys7.js new file mode 100644 index 0000000000..4486919300 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyKeys7.js @@ -0,0 +1,16 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap skips an existing own enumerable property on a + * non-extensible object + */ +var target = {}; +Object.defineProperty(target, 'foo', { + enumerable: true, + configurable: true +}); +Object.preventExtensions(target); + +var handler = { ownKeys: () => [] }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => Object.keys(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyKeys8.js b/js/src/jit-test/tests/proxy/testDirectProxyKeys8.js new file mode 100644 index 0000000000..4486919300 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyKeys8.js @@ -0,0 +1,16 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap skips an existing own enumerable property on a + * non-extensible object + */ +var target = {}; +Object.defineProperty(target, 'foo', { + enumerable: true, + configurable: true +}); +Object.preventExtensions(target); + +var handler = { ownKeys: () => [] }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => Object.keys(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyKeys9.js b/js/src/jit-test/tests/proxy/testDirectProxyKeys9.js new file mode 100644 index 0000000000..92695cdcd1 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyKeys9.js @@ -0,0 +1,35 @@ +// Cull non-existent names returned by the trap. +var nullProtoAB = Object.create(null, { + a: { + enumerable: true, + configurable: true + }, + b: { + enumerable: false, + configurable: true + } +}); +var protoABWithCD = Object.create(nullProtoAB, { + c: { + enumerable: true, + configurable: true + }, + d: { + enumerable: false, + configurable: true + } +}); + +var returnedNames; +var handler = { ownKeys: () => returnedNames }; + +for (let p of [new Proxy(protoABWithCD, handler), Proxy.revocable(protoABWithCD, handler).proxy]) { + returnedNames = [ 'e' ]; + var names = Object.keys(p); + assertEq(names.length, 0); + + returnedNames = [ 'c' ]; + names = Object.keys(p); + assertEq(names.length, 1); + assertEq(names[0], 'c'); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxyOnProtoWithForIn.js b/js/src/jit-test/tests/proxy/testDirectProxyOnProtoWithForIn.js new file mode 100644 index 0000000000..984e913c0e --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyOnProtoWithForIn.js @@ -0,0 +1,23 @@ +let proxy = new Proxy({ + a: 1, + b: 2, + c: 3 +}, { + enumerate() { + // Should not be invoked. + assertEq(false, true); + }, + + ownKeys() { + return ['a', 'b']; + } +}); + +let object = Object.create(proxy); +object.d = 4; + +let a = []; +for (let x in object) { + a.push(x); +} +assertEq(a.toString(), "d,a,b"); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyOwnKeysSymbol.js b/js/src/jit-test/tests/proxy/testDirectProxyOwnKeysSymbol.js new file mode 100644 index 0000000000..ad6e1845e1 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyOwnKeysSymbol.js @@ -0,0 +1,33 @@ +// Make sure that we can find own, enumerable symbols. +var symbol = Symbol("bad"); +var symbol2 = Symbol("good"); +var proxy = new Proxy({}, { + ownKeys() { + return [symbol, symbol2]; + }, + getOwnPropertyDescriptor(target, name) { + if (name == symbol) + return {configurable: true, enumerable: false, value: {}}; + // Only this enumerable symbol should be defined. + if (name == symbol2) + return {configurable: true, enumerable: true, value: {}}; + assertEq(true, false); + }, + get(target, name) { + // Slightly confusing, but these are the descriptors that defineProperties + // is going to define on the object. + if (name == symbol) + return {configurable: true, value: "bad"}; + if (name == symbol2) + return {configurable: true, value: "good"}; + assertEq(true, false); + } +}); +assertEq(Object.getOwnPropertySymbols(proxy).length, 2); + +var obj = {}; +Object.defineProperties(obj, proxy); +assertEq(Object.getOwnPropertySymbols(obj).length, 1); +assertEq(symbol in obj, false); +assertEq(symbol2 in obj, true); +assertEq(obj[symbol2], "good"); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions1.js b/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions1.js new file mode 100644 index 0000000000..384be1cf57 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions1.js @@ -0,0 +1,10 @@ +// Forward to the target if the trap is not defined +var target = {}; +var proxy = new Proxy(target, {}); +Object.preventExtensions(proxy); +assertEq(Object.isExtensible(target), false); + +target = {}; +proxy = Proxy.revocable(target, {}).proxy; +Object.preventExtensions(proxy); +assertEq(Object.isExtensible(target), false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions2.js b/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions2.js new file mode 100644 index 0000000000..42591e22c3 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions2.js @@ -0,0 +1,25 @@ +/* + * Call the trap with the handler as the this value and the target as the first + * argument. + */ +var target = {}; +var handler = { + preventExtensions: function (target1) { + assertEq(this, handler); + assertEq(target1, target); + Object.preventExtensions(target1); + called = true; + return true; + } +}; + +var proxy = new Proxy(target, handler); +var called = false; +Object.preventExtensions(proxy); +assertEq(called, true); + +target = {}; +proxy = Proxy.revocable(target, handler).proxy; +called = false; +Object.preventExtensions(proxy); +assertEq(called, true); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions3.js b/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions3.js new file mode 100644 index 0000000000..7cb4046185 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions3.js @@ -0,0 +1,7 @@ +load(libdir + "asserts.js"); + +// Throw a TypeError if the trap reports an extensible object as non-extensible + +var handler = { preventExtensions: () => true }; +for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy]) + assertThrowsInstanceOf(() => Object.preventExtensions(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions4.js b/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions4.js new file mode 100644 index 0000000000..01395624e3 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions4.js @@ -0,0 +1,6 @@ +load(libdir + "asserts.js"); + +// Throw a TypeError if the object refuses to be made non-extensible +var handler = { preventExtensions: () => false }; +for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy]) + assertThrowsInstanceOf(() => Object.preventExtensions(p), TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions5.js b/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions5.js new file mode 100644 index 0000000000..e839ffa7b2 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions5.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); +// Revoked proxies should throw before calling the handler + +var called = false; +var target = {}; +var handler = { preventExtensions: () => called = true }; +var holder = Proxy.revocable(target, handler); + +holder.revoke(); + +assertThrowsInstanceOf(() => Object.preventExtensions(holder.proxy), TypeError); +assertEq(called, false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyRevoke.js b/js/src/jit-test/tests/proxy/testDirectProxyRevoke.js new file mode 100644 index 0000000000..420fe3eaf9 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyRevoke.js @@ -0,0 +1,45 @@ +load(libdir + "asserts.js"); + +// Test for various properties demanded of Proxy.revocable +var holder = Proxy.revocable({}, {}); + +// The returned object must inherit from Object.prototype +assertEq(Object.getPrototypeOf(holder), Object.prototype); + +assertDeepEq(Object.getOwnPropertyNames(holder), [ 'proxy', 'revoke' ]); + +// The revocation function must inherit from Function.prototype +assertEq(Object.getPrototypeOf(holder.revoke), Function.prototype); + +// Proxy.revoke should return unique objects from the same opcode call. +var proxyLog = [] +var revokerLog = [] +var holderLog = [] + +function addUnique(l, v) +{ + assertEq(l.indexOf(v), -1); + l.push(v); +} + +for (let i = 0; i < 5; i++) { + holder = Proxy.revocable({}, {}); + addUnique(holderLog, holder); + addUnique(revokerLog, holder.revoke); + addUnique(proxyLog, holder.proxy); +} + +// The provided revoke function should revoke only the 1 proxy +var p = proxyLog.pop(); +var r = revokerLog.pop(); + +// Works before, but not after. This is mostly a token. There are +// testDirectProxy* tests to check each trap revokes properly. +p.foo; +assertEq(r(), undefined, "Revoke trap must return undefined"); +assertThrowsInstanceOf(() => p.foo, TypeError); +assertEq(r(), undefined, "Revoke trap must return undefined"); + +// None of this should throw, since these proxies are unrevoked. +for (let i = 0; i < proxyLog.length; i++) + proxyLog[i].foo; diff --git a/js/src/jit-test/tests/proxy/testDirectProxySet1.js b/js/src/jit-test/tests/proxy/testDirectProxySet1.js new file mode 100644 index 0000000000..ddc1bc5ddc --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySet1.js @@ -0,0 +1,18 @@ +// Forward to the target if the trap is not defined +var target = { + foo: 'bar' +}; +for (let p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) { + // The sets from the first iteration will affect target, but it doesn't + // matter, since the effectiveness of the foo sets is still observable. + p.foo = 'baz'; + assertEq(target.foo, 'baz'); + p['foo'] = 'buz'; + assertEq(target.foo, 'buz'); + + var sym = Symbol.for('quux'); + p[sym] = sym; + assertEq(target[sym], sym); + // Reset for second iteration + target[sym] = undefined; +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxySet10.js b/js/src/jit-test/tests/proxy/testDirectProxySet10.js new file mode 100644 index 0000000000..287cced8f3 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySet10.js @@ -0,0 +1,60 @@ +// Assigning to a non-existing property of a plain object defines that +// property on that object, even if a proxy is on the proto chain. + +// Create an object that behaves just like obj except it throws (instead of +// returning undefined) if you try to get a property that doesn't exist. +function throwIfNoSuchProperty(obj) { + return new Proxy(obj, { + get(t, id) { + if (id in t) + return t[id]; + throw new Error("no such handler method: " + id); + } + }); +} + +// Use a touchy object as our proxy handler in this test. +var hits = 0, savedDesc = undefined; +var touchyHandler = throwIfNoSuchProperty({ + set: undefined +}); +var target = {}; +var proto = new Proxy(target, touchyHandler); +var receiver = Object.create(proto); + +// This assignment `receiver.x = 2` results in a series of [[Set]] calls, +// starting with: +// +// - receiver.[[Set]]() +// - receiver is an ordinary object. +// - This looks for an own property "x" on receiver. There is none. +// - So it walks the prototype chain, doing a tail-call to: +// - proto.[[Set]]() +// - proto is a proxy. +// - This does handler.[[Get]]("set") to look for a set trap +// (that's why we need `set: undefined` on the handler, above) +// - Since there's no "set" handler, it tail-calls: +// - target.[[Set]]() +// - ordinary +// - no own property "x" +// - tail call to: +// - Object.prototype.[[Set]]() +// - ordinary +// - no own property "x" +// - We're at the end of the line: there's nothing left on the proto chain. +// - So at last we call: +// - receiver.[[DefineOwnProperty]]() +// - ordinary +// - creates the property +// +// Got all that? Let's try it. +// +receiver.x = 2; +assertEq(receiver.x, 2); + +var desc = Object.getOwnPropertyDescriptor(receiver, "x"); +assertEq(desc.enumerable, true); +assertEq(desc.configurable, true); +assertEq(desc.writable, true); +assertEq(desc.value, 2); + diff --git a/js/src/jit-test/tests/proxy/testDirectProxySet2.js b/js/src/jit-test/tests/proxy/testDirectProxySet2.js new file mode 100644 index 0000000000..af940f6bc3 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySet2.js @@ -0,0 +1,23 @@ +/* + * Call the trap with the handler as the this value, the target as the first + * argument, the name of the property as the second argument, the value as the + * third argument, and the receiver as the fourth argument + */ +var target = {}; +for (var key of ['foo', Symbol.for('quux')]) { + var handler = { }; + for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + handler.set = function (target1, name, val, receiver) { + assertEq(this, handler); + assertEq(target1, target); + assertEq(name, key); + assertEq(val, 'baz'); + assertEq(receiver, p); + called = true; + } + + var called = false; + p[key] = 'baz'; + assertEq(called, true); + } +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxySet3.js b/js/src/jit-test/tests/proxy/testDirectProxySet3.js new file mode 100644 index 0000000000..94674aed61 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySet3.js @@ -0,0 +1,14 @@ +load(libdir + "asserts.js"); + +// Throw a TypeError if the trap sets a non-writable, non-configurable property +for (var key of ['foo', Symbol.for('quux')]) { + var target = {}; + Object.defineProperty(target, key, { + value: 'bar', + writable: false, + configurable: false + }); + var handler = { set: () => true }; + for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => p[key] = 'baz', TypeError); +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxySet4.js b/js/src/jit-test/tests/proxy/testDirectProxySet4.js new file mode 100644 index 0000000000..760d1099df --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySet4.js @@ -0,0 +1,17 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the trap sets a non-configurable accessor property that + * doest not have a setter + */ +var target = {}; +Object.defineProperty(target, 'foo', { + get: function () { + return 'bar' + }, + configurable: false +}); + +var handler = { set: () => true }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) + assertThrowsInstanceOf(() => p['foo'] = 'baz', TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySet5.js b/js/src/jit-test/tests/proxy/testDirectProxySet5.js new file mode 100644 index 0000000000..d4adcda0fe --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySet5.js @@ -0,0 +1,13 @@ +// Reflect side-effects from the trap +var target = { + foo: 'bar' +}; + +var handler = { set: (target, name) => target[name] = 'qux' }; +for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) { + p['foo'] = 'baz'; + assertEq(target['foo'], 'qux'); + + // reset for second iteration + target['foo'] = 'bar'; +} diff --git a/js/src/jit-test/tests/proxy/testDirectProxySet6.js b/js/src/jit-test/tests/proxy/testDirectProxySet6.js new file mode 100644 index 0000000000..3b5f66c2a9 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySet6.js @@ -0,0 +1,12 @@ +load(libdir + "asserts.js"); +// Revoked proxies should throw before calling the handler + +var called = false; +var target = {}; +var handler = { set: () => called = true }; +var holder = Proxy.revocable(target, handler); + +holder.revoke(); + +assertThrowsInstanceOf(() => holder.proxy.foo = 'bar', TypeError); +assertEq(called, false); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySet7.js b/js/src/jit-test/tests/proxy/testDirectProxySet7.js new file mode 100644 index 0000000000..9376670e4a --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySet7.js @@ -0,0 +1,20 @@ +// Assigning to a proxy with no set handler calls the defineProperty handler +// when no such property already exists. + +var hits = 0; +var t = {}; +var p = new Proxy(t, { + defineProperty(t, id, desc) { hits++; return true; } +}); +p.x = 1; +assertEq(hits, 1); +assertEq("x" in t, false); + +// Same thing, but the receiver is a plain object inheriting from p: +var receiver = Object.create(p); +hits = 0; +receiver.x = 2; +assertEq(hits, 0); +assertEq("x" in t, false); +assertEq(receiver.hasOwnProperty("x"), true); +assertEq(receiver.x, 2); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySet8.js b/js/src/jit-test/tests/proxy/testDirectProxySet8.js new file mode 100644 index 0000000000..905769bbde --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySet8.js @@ -0,0 +1,21 @@ +// Assigning to a proxy with no set handler calls the defineProperty handler +// when an existing inherited data property already exists. + +var hits = 0; +var proto = {x: 1}; +var t = Object.create(proto); +var p = new Proxy(t, { + defineProperty(t, id, desc) { hits++; return true; } +}); +p.x = 2; +assertEq(hits, 1); +assertEq(proto.x, 1); +assertEq(t.hasOwnProperty("x"), false); + +// Same thing, but the receiver is a plain object inheriting from p: +var receiver = Object.create(p); +receiver.x = 2; +assertEq(hits, 1); +assertEq(t.hasOwnProperty("x"), false); +assertEq(receiver.hasOwnProperty("x"), true); +assertEq(receiver.x, 2); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySet9.js b/js/src/jit-test/tests/proxy/testDirectProxySet9.js new file mode 100644 index 0000000000..7a08b3c0cd --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySet9.js @@ -0,0 +1,20 @@ +// Assigning to a proxy with no set handler calls the defineProperty handler +// when an existing own data property already exists on the target. + +var t = {x: 1}; +var p = new Proxy(t, { + defineProperty(t, id, desc) { + hits++; + + // ES6 draft rev 28 (2014 Oct 14) 9.1.9 step 5.e.i. + // Since the property already exists, the system only changes + // the value. desc is otherwise empty. + assertEq(Object.getOwnPropertyNames(desc).join(","), "value"); + assertEq(desc.value, 42); + return true; + } +}); +var hits = 0; +p.x = 42; +assertEq(hits, 1); +assertEq(t.x, 1); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySetArray1.js b/js/src/jit-test/tests/proxy/testDirectProxySetArray1.js new file mode 100644 index 0000000000..27d8489c4d --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySetArray1.js @@ -0,0 +1,25 @@ +// Assigning to a missing array element (a hole) via a proxy with no set handler +// calls the defineProperty handler. + +function test(id) { + var arr = [, 1, 2, 3]; + var p = new Proxy(arr, { + defineProperty(t, id, desc) { + hits++; + assertEq(desc.value, "ponies"); + assertEq(desc.enumerable, true); + assertEq(desc.configurable, true); + assertEq(desc.writable, true); + return true; + } + }); + var hits = 0; + p[id] = "ponies"; + assertEq(hits, 1); + assertEq(id in arr, false); + assertEq(arr.length, 4); +} + +test(0); +test(4); +test("str"); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySetArray2.js b/js/src/jit-test/tests/proxy/testDirectProxySetArray2.js new file mode 100644 index 0000000000..1025aa04f9 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySetArray2.js @@ -0,0 +1,12 @@ +// Direct proxies pass through the receiver argument to [[Set]] to their targets. +// This also tests that an ordinary object's [[Set]] method can change the length +// of an array passed as the receiver. + +load(libdir + "asserts.js"); + +var a = [0, 1, 2, 3]; +var p = new Proxy({}, {}); +Reflect.set(p, "length", 2, a); +assertEq("length" in p, false); +assertEq(a.length, 2); +assertDeepEq(a, [0, 1]); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySetArray3.js b/js/src/jit-test/tests/proxy/testDirectProxySetArray3.js new file mode 100644 index 0000000000..44bbcd99b4 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySetArray3.js @@ -0,0 +1,21 @@ +// Assigning to the length property of a proxy to an array +// calls the proxy's defineProperty handler. + +var a = [0, 1, 2, 3]; +var p = new Proxy(a, { + defineProperty(t, id, desc) { + hits++; + + // ES6 draft rev 28 (2014 Oct 14) 9.1.9 step 5.e.i. + // Since the property already exists, the system only changes + // the value. desc is otherwise empty. + assertEq(Object.getOwnPropertyNames(desc).join(","), "value"); + assertEq(desc.value, 2); + return true; + } +}); +var hits = 0; +p.length = 2; +assertEq(hits, 1); +assertEq(a.length, 4); +assertEq(a[2], 2); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySetArray4.js b/js/src/jit-test/tests/proxy/testDirectProxySetArray4.js new file mode 100644 index 0000000000..524ddca456 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySetArray4.js @@ -0,0 +1,24 @@ +// Assigning to an existing array element via a proxy with no set handler +// calls the defineProperty handler. + +function test(arr) { + var p = new Proxy(arr, { + defineProperty(t, id, desc) { + hits++; + + // ES6 draft rev 28 (2014 Oct 14) 9.1.9 step 5.e.i. + // Since the property already exists, the system only changes + // the value. desc is otherwise empty. + assertEq(Object.getOwnPropertyNames(desc).join(","), "value"); + assertEq(desc.value, "ponies"); + return true; + } + }); + var hits = 0; + p[0] = "ponies"; + assertEq(hits, 1); + assertEq(arr[0], 123); +} + +test([123]); +test(new Int32Array([123])); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySetFailure.js b/js/src/jit-test/tests/proxy/testDirectProxySetFailure.js new file mode 100644 index 0000000000..3646fc69b3 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySetFailure.js @@ -0,0 +1,32 @@ +// Test handling of false return from a handler.set() hook. + +load(libdir + "asserts.js"); + +var obj = {x: 1}; +var p = new Proxy(obj, { + set(target, key, value, receiver) { return false; } +}); + +// Failing to set a property is a no-op in non-strict code. +assertEq(p.x = 2, 2); +assertEq(obj.x, 1); + +// It's a TypeError in strict mode code. +assertThrowsInstanceOf(() => { "use strict"; p.x = 2; }, TypeError); +assertEq(obj.x, 1); + +// Even if the value doesn't change. +assertThrowsInstanceOf(() => { "use strict"; p.x = 1; }, TypeError); +assertEq(obj.x, 1); + +// Even if the target property doesn't already exist. +assertThrowsInstanceOf(() => { "use strict"; p.z = 1; }, TypeError); +assertEq("z" in obj, false); + +// [].sort() mutates its operand only by doing strict [[Set]] calls. +var arr = ["not", "already", "in", "order"]; +var p2 = new Proxy(arr, { + set(target, key, value, receiver) { return false; } +}); +assertThrowsInstanceOf(() => p2.sort(), TypeError); +assertDeepEq(arr, ["not", "already", "in", "order"]); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySetInherited.js b/js/src/jit-test/tests/proxy/testDirectProxySetInherited.js new file mode 100644 index 0000000000..9c8c880938 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySetInherited.js @@ -0,0 +1,23 @@ +// When assigning to an object with a proxy is on the prototype chain, +// the proxy's set handler is called. + +var C = {}; +var B = new Proxy(C, { + get() { throw "FAIL"; }, + getOwnPropertyDescriptor() { throw "FAIL"; }, + has() { throw "FAIL"; }, + defineProperty() { throw "FAIL"; }, + set(target, id, value, receiver) { + hits++; + assertEq(target, C); + assertEq(id, "x"); + assertEq(value, 3); + assertEq(receiver, A); + return true; + } +}); +var A = Object.create(B); + +var hits = 0; +A.x = 3; +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySetNested.js b/js/src/jit-test/tests/proxy/testDirectProxySetNested.js new file mode 100644 index 0000000000..20df6bbec8 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySetNested.js @@ -0,0 +1,15 @@ +// The receiver argument is passed through proxies with no "set" handler. + +var hits; +var a = new Proxy({}, { + set(t, id, value, receiver) { + assertEq(id, "prop"); + assertEq(value, 3); + assertEq(receiver, b); + hits++; + } +}); +var b = new Proxy(a, {}); +hits = 0; +b.prop = 3; +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySetNested2.js b/js/src/jit-test/tests/proxy/testDirectProxySetNested2.js new file mode 100644 index 0000000000..1825ec259c --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySetNested2.js @@ -0,0 +1,16 @@ +// The receiver argument is passed through prototype chains and proxies with no "set" handler. + +var hits; +var a = new Proxy({}, { + set(t, id, value, receiver) { + assertEq(id, "prop"); + assertEq(value, 3); + assertEq(receiver, b); + hits++; + } +}); +var b = Object.create(Object.create(new Proxy(Object.create(new Proxy(a, {})), {}))); +hits = 0; +b.prop = 3; +assertEq(hits, 1); +assertEq(b.prop, undefined); diff --git a/js/src/jit-test/tests/proxy/testDirectProxySetReceiverLookup.js b/js/src/jit-test/tests/proxy/testDirectProxySetReceiverLookup.js new file mode 100644 index 0000000000..3cf687ed54 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxySetReceiverLookup.js @@ -0,0 +1,57 @@ +// Assigning to a proxy with no set handler causes the proxy's +// getOwnPropertyDescriptor handler to be called just before defineProperty +// in some cases. (ES6 draft rev 28, 2014 Oct 14, 9.1.9 step 5.c.) + +var attrs = ["configurable", "enumerable", "writable", "value", "get", "set"]; + +function test(target, id, existingDesc, expectedDesc) { + var log = ""; + var p = new Proxy(target, { + getOwnPropertyDescriptor(t, idarg) { + assertEq(idarg, id); + log += "g"; + return existingDesc; + }, + defineProperty(t, idarg, desc) { + assertEq(idarg, id); + for (var attr of attrs) { + var args = JSON.stringify([target, id, existingDesc]).slice(1, -1); + assertEq(attr in desc, attr in expectedDesc, + `test(${args}), checking existence of desc.${attr}`); + assertEq(desc[attr], expectedDesc[attr], + `test(${args}), checking value of desc.${attr}`); + } + log += "d"; + return true; + } + }); + p[id] = "pizza"; + assertEq(log, "gd"); +} + +var fullDesc = { + configurable: true, + enumerable: true, + writable: true, + value: "pizza" +}; +var valueOnlyDesc = { + value: "pizza" +}; +var sealedDesc = { + configurable: false, + enumerable: true, + writable: true, + value: "pizza" +}; + +test({}, "x", undefined, fullDesc); +test({}, "x", fullDesc, valueOnlyDesc); +test({x: 1}, "x", undefined, fullDesc); +test({x: 1}, "x", fullDesc, valueOnlyDesc); +test(Object.seal({x: 1}), "x", sealedDesc, valueOnlyDesc); +test(Object.create({x: 1}), "x", undefined, fullDesc); +test([0, 1, 2], "2", undefined, fullDesc); +test([0, 1, 2], "2", fullDesc, valueOnlyDesc); +test([0, 1, 2], "3", undefined, fullDesc); +test([0, 1, 2], "3", fullDesc, valueOnlyDesc); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty1.js b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty1.js new file mode 100644 index 0000000000..d2c9c18c9d --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty1.js @@ -0,0 +1,19 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the current descriptor is non-configurable and the trap + * returns a configurable descriptor + */ +var target = {}; +Object.defineProperty(target, 'foo', { + configurable: false +}); +assertThrowsInstanceOf(function () { + Object.getOwnPropertyDescriptor(Proxy(target, { + getOwnPropertyDescriptor: function (target, name) { + return { + configurable: true + }; + } + }), 'foo'); +}, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty2.js b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty2.js new file mode 100644 index 0000000000..b027c68804 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty2.js @@ -0,0 +1,39 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the enumerable fields of the current descriptor and the + * descriptor returned by the trap are the boolean negation of each other + */ +var target = {}; +Object.defineProperty(target, 'foo', { + configurable: false, + enumerable: true +}); +var caught = false; +assertThrowsInstanceOf(function () { + Object.getOwnPropertyDescriptor(new Proxy(target, { + getOwnPropertyDescriptor: function (target, name) { + return { + configurable: false, + enumerable: false + }; + } + }), 'foo'); +}, TypeError); + +var target = {}; +Object.defineProperty(target, 'foo', { + configurable: false, + enumerable: false +}); +var caught = false; +assertThrowsInstanceOf(function () { + Object.getOwnPropertyDescriptor(new Proxy(target, { + getOwnPropertyDescriptor: function (target, name) { + return { + configurable: false, + enumerable: true + }; + } + }), 'foo'); +}, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty3.js b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty3.js new file mode 100644 index 0000000000..34654d3ce9 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty3.js @@ -0,0 +1,43 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if the current descriptor is a data descriptor and the + * descriptor returned by the trap is not, or vice versa, and the current + * descriptor is non-configurable + */ +var target = {}; +Object.defineProperty(target, 'foo', { + value: 'bar', + configurable: false +}); +var caught = false; +assertThrowsInstanceOf(function () { + Object.getOwnPropertyDescriptor(new Proxy(target, { + getOwnPropertyDescriptor: function (target, name) { + return { + get: function () { + return 'bar'; + }, + configurable: false + }; + } + }), 'foo'); +}, TypeError); + +var target = {}; +Object.defineProperty(target, 'foo', { + value: function () { + return 'bar'; + }, + configurable: false +}); +assertThrowsInstanceOf(function () { + Object.getOwnPropertyDescriptor(new Proxy(target, { + getOwnPropertyDescriptor: function (target, name) { + return { + value: 'bar', + configurable: false + }; + } + }), 'foo'); +}, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty4.js b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty4.js new file mode 100644 index 0000000000..966bd364e2 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty4.js @@ -0,0 +1,24 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if both the current descriptor and the descriptor returned + * by the trap are data descriptors, the current descriptor is non-configurable + * and non-writable, and the descriptor returned by the trap is writable. + */ +var target = {}; +Object.defineProperty(target, 'foo', { + value: 'bar', + writable: false, + configurable: false +}); +assertThrowsInstanceOf(function () { + Object.getOwnPropertyDescriptor(new Proxy(target, { + getOwnPropertyDescriptor: function (target, name) { + return { + value: 'bar', + writable: true, + configurable: false + }; + } + }), 'foo'); +}, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty5.js b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty5.js new file mode 100644 index 0000000000..0cc3cb8e0c --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty5.js @@ -0,0 +1,26 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if both the current descriptor and the descriptor returned + * by the trap are data descriptors, the current descriptor is non-configurable + * and non-writable, and the descriptor returned by the trap does not have the + * same value. + */ +var target = {}; +Object.defineProperty(target, 'foo', { + value: 'bar', + writable: false, + configurable: false +}); +var caught = false; +assertThrowsInstanceOf(function () { + Object.getOwnPropertyDescriptor(new Proxy(target, { + getOwnPropertyDescriptor: function (target, name) { + return { + value: 'baz', + writable: false, + configurable: false + }; + } + }), 'foo'); +}, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty6.js b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty6.js new file mode 100644 index 0000000000..40cf389167 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty6.js @@ -0,0 +1,28 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if both the current descriptor and the descriptor returned + * by the trap are accessor descriptors, the current descriptor is + * non-configurable, and the descriptor returned by the trap has a different + * setter. + */ +var target = {}; +Object.defineProperty(target, 'foo', { + set: function (value) { + target.foo = 'bar'; + }, + configurable: false +}); +var caught = false; +assertThrowsInstanceOf(function () { + Object.getOwnPropertyDescriptor(new Proxy(target, { + getOwnPropertyDescriptor: function (target, name) { + return { + set: function (value) { + target.foo = 'baz'; + }, + configurable: false + }; + } + }), 'foo'); +}, TypeError); diff --git a/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty7.js b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty7.js new file mode 100644 index 0000000000..3c945c1315 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyValidateProperty7.js @@ -0,0 +1,28 @@ +load(libdir + "asserts.js"); + +/* + * Throw a TypeError if both the current descriptor and the descriptor returned + * by the trap are accessor descriptors, the current descriptor is + * non-configurable, and the descriptor returned by the trap has a different + * getter. + */ +var target = {}; +Object.defineProperty(target, 'foo', { + get: function () { + return 'bar'; + }, + configurable: false +}); +var caught = false; +assertThrowsInstanceOf(function () { + Object.getOwnPropertyDescriptor(new Proxy(target, { + getOwnPropertyDescriptor: function (target, name) { + return { + get: function () { + return 'baz'; + }, + configurable: false + }; + } + }), 'foo'); +}, TypeError); diff --git a/js/src/jit-test/tests/proxy/testSetImmutablePrototype.js b/js/src/jit-test/tests/proxy/testSetImmutablePrototype.js new file mode 100644 index 0000000000..bc61dbbfcf --- /dev/null +++ b/js/src/jit-test/tests/proxy/testSetImmutablePrototype.js @@ -0,0 +1,11 @@ +load(libdir + "asserts.js"); + +let p = {}; +let x = new Proxy({__proto__: p}, {}); +assertEq(Reflect.getPrototypeOf(x), p); +setImmutablePrototype(x); +assertEq(Reflect.getPrototypeOf(x), p); +assertEq(Reflect.setPrototypeOf(x, Date.prototype), false); +assertEq(Reflect.setPrototypeOf(x, p), true); +assertThrowsInstanceOf(() => Object.setPrototypeOf(x, Date.prototype), TypeError); +assertEq(Reflect.getPrototypeOf(x), p); diff --git a/js/src/jit-test/tests/proxy/testTestIntegrityLevel.js b/js/src/jit-test/tests/proxy/testTestIntegrityLevel.js new file mode 100644 index 0000000000..4defb5f607 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testTestIntegrityLevel.js @@ -0,0 +1,30 @@ +// isSealed/isFrozen should short-circuit. + +var count = 0; +var target = Object.preventExtensions({a: 1, b: 2, c: 3}); +var p = new Proxy(target, { + getOwnPropertyDescriptor(t, id) { + count++; + return Object.getOwnPropertyDescriptor(t, id); + } +}); +assertEq(Object.isSealed(p), false); +assertEq(count, 1); + +count = 0; +assertEq(Object.isFrozen(p), false); +assertEq(count, 1); + +Object.seal(target); +count = 0; +assertEq(Object.isSealed(p), true); +assertEq(count, 3); + +count = 0; +assertEq(Object.isFrozen(p), false); +assertEq(count, 1); + +Object.freeze(target); +count = 0; +assertEq(Object.isFrozen(p), true); +assertEq(count, 3); diff --git a/js/src/jit-test/tests/proxy/testWrapWithProtoIter.js b/js/src/jit-test/tests/proxy/testWrapWithProtoIter.js new file mode 100644 index 0000000000..c6854b2067 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testWrapWithProtoIter.js @@ -0,0 +1 @@ +[...wrapWithProto(new Int8Array(), new Int8Array())] diff --git a/js/src/jit-test/tests/proxy/testWrapWithProtoSet.js b/js/src/jit-test/tests/proxy/testWrapWithProtoSet.js new file mode 100644 index 0000000000..9139186571 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testWrapWithProtoSet.js @@ -0,0 +1,8 @@ +// A scripted proxy can delegate a [[Set]] along to a target +// that's a different kind of proxy. + +var target = {}; +var wrapper = wrapWithProto(target, null); +var p = new Proxy(wrapper, {}); +p.prop = 3; +assertEq(target.prop, 3); diff --git a/js/src/jit-test/tests/proxy/testWrapWithProtoTypedArray.js b/js/src/jit-test/tests/proxy/testWrapWithProtoTypedArray.js new file mode 100644 index 0000000000..1b805d30a1 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testWrapWithProtoTypedArray.js @@ -0,0 +1,19 @@ +let a = wrapWithProto(new Int8Array([1, 3, 5, 6, 9]), new Int8Array()); + +assertEq([...a].toString(), "1,3,5,6,9"); +assertEq(a.every(e => e < 100), true); +assertEq(a.filter(e => e % 2 == 1).toString(), "1,3,5,9"); +assertEq(a.find(e => e > 3), 5); +assertEq(a.findIndex(e => e % 2 == 0), 3); +assertEq(a.map(e => e * 10).toString(), "10,30,50,60,90"); +assertEq(a.reduce((a, b) => a + b, ""), "13569"); +assertEq(a.reduceRight((acc, e) => "(" + e + acc + ")", ""), "(1(3(5(6(9)))))"); +assertEq(a.some(e => e % 2 == 0), true); + +let s = ""; +assertEq(a.forEach(e => s += e), undefined); +assertEq(s, "13569"); + +a.sort((a, b) => b - a); +assertEq(a.toString(), "9,6,5,3,1"); + diff --git a/js/src/jit-test/tests/proxy/testWrapWithProtoTypedArraySortFloat32.js b/js/src/jit-test/tests/proxy/testWrapWithProtoTypedArraySortFloat32.js new file mode 100644 index 0000000000..b36fa34f34 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testWrapWithProtoTypedArraySortFloat32.js @@ -0,0 +1,3 @@ +let a = wrapWithProto(new Float32Array(1024), new Float32Array()); + +a.sort(); diff --git a/js/src/jit-test/tests/proxy/testWrapperGetInherited.js b/js/src/jit-test/tests/proxy/testWrapperGetInherited.js new file mode 100644 index 0000000000..1ff767e920 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testWrapperGetInherited.js @@ -0,0 +1,18 @@ +// Getting a property O.X, inherited from a transparent cross-compartment wrapper W +// that wraps a Proxy P. + +var g = newGlobal(); +var target = {} +var P = new Proxy(target, { + get(t, id, r) { + assertEq(t, target); + assertEq(id, "X"); + assertEq(r, wO); + return "vega"; + } +}); + +g.W = P; +g.eval("var O = Object.create(W);"); +var wO = g.O; +assertEq(g.eval("O.X"), "vega"); diff --git a/js/src/jit-test/tests/realms/array-ctor.js b/js/src/jit-test/tests/realms/array-ctor.js new file mode 100644 index 0000000000..b2e0497ae5 --- /dev/null +++ b/js/src/jit-test/tests/realms/array-ctor.js @@ -0,0 +1,35 @@ +function testArrayRealm() { + var g = newGlobal(); + var A = g.Array; + for (var i = 0; i < 100; i++) { + var a; + a = new A(); + assertEq(isSameCompartment(a, g), true); + assertEq(Object.getPrototypeOf(a), A.prototype); + + a = new A(i); + assertEq(isSameCompartment(a, g), true); + assertEq(Object.getPrototypeOf(a), A.prototype); + } +} +testArrayRealm(); + +function testErrorRealm() { + var g = newGlobal(); + var A = g.Array; + for (var i = 50; i > -50; i--) { + var a = null; + var ex = null; + try { + a = new A(i); + } catch (e) { + ex = e; + } + if (i >= 0) { + assertEq(Object.getPrototypeOf(a), A.prototype); + } else { + assertEq(ex instanceof g.RangeError, true); + } + } +} +testErrorRealm(); diff --git a/js/src/jit-test/tests/realms/array-species-create.js b/js/src/jit-test/tests/realms/array-species-create.js new file mode 100644 index 0000000000..e6bfd61c97 --- /dev/null +++ b/js/src/jit-test/tests/realms/array-species-create.js @@ -0,0 +1,35 @@ +function testSelfHosted() { + var g = newGlobal({sameCompartmentAs: this}); + var arr = g.evaluate("[1, 2]"); + for (var i = 0; i < 20; i++) { + var mapped = Array.prototype.map.call(arr, x => x + 1); + assertEq(mapped.constructor, Array); + } +} +testSelfHosted(); + +function testNative() { + var g = newGlobal({sameCompartmentAs: this}); + var arr = g.evaluate("[1, 2, 3, 4]"); + for (var i = 0; i < 20; i++) { + var slice = Array.prototype.slice.call(arr, 0, 3); + assertEq(slice.constructor, Array); + } +} +testNative(); + +function testIntrinsic() { + var g1 = newGlobal({sameCompartmentAs: this}); + var g2 = newGlobal(); + var IsCrossRealmArrayConstructor = getSelfHostedValue("IsCrossRealmArrayConstructor"); + for (var i = 0; i < 20; i++) { + assertEq(IsCrossRealmArrayConstructor(Array), false); + assertEq(IsCrossRealmArrayConstructor(Math), false); + assertEq(IsCrossRealmArrayConstructor(() => 1), false); + assertEq(IsCrossRealmArrayConstructor(g1.Array), true); + assertEq(IsCrossRealmArrayConstructor(g2.Array), true); + assertEq(IsCrossRealmArrayConstructor(g1.assertEq), false); + assertEq(IsCrossRealmArrayConstructor(g2.assertEq), false); + } +} +testIntrinsic(); diff --git a/js/src/jit-test/tests/realms/basic.js b/js/src/jit-test/tests/realms/basic.js new file mode 100644 index 0000000000..3c9bbd4d6d --- /dev/null +++ b/js/src/jit-test/tests/realms/basic.js @@ -0,0 +1,114 @@ +var g1 = newGlobal({sameCompartmentAs: this}); +var g2 = newGlobal({sameCompartmentAs: g1}); +g2.x = g1; +gc(); +assertEq(objectGlobal(Math), this); +assertEq(objectGlobal(g1.print), g1); +assertEq(objectGlobal(g2.x), g1); + +assertEq(isSameCompartment(g1, g2), true); +assertEq(isSameCompartment(g1, Math), true); + +// Different-compartment realms have wrappers. +assertEq(objectGlobal(newGlobal({newCompartment: true}).Math), null); + +function testCrossRealmProto() { + var g = newGlobal({sameCompartmentAs:this}); + + for (var i = 0; i < 20; i++) { + var o = Object.create(g.Math); + assertEq(objectGlobal(o), this); + assertEq(o.__proto__, g.Math); + + var a = Reflect.construct(Array, [], g.Object); + assertEq(Array.isArray(a), true); + assertEq(objectGlobal(a), this); + assertEq(a.__proto__, g.Object.prototype); + } +} +testCrossRealmProto(); + +function testSystemNonSystemRealms() { + var systemRealm = newGlobal({newCompartment: true, systemPrincipal: true}); + var ex; + try { + var nonSystemRealm = newGlobal({sameCompartmentAs: systemRealm, principal: 10}); + } catch(e) { + ex = e; + } + assertEq(ex.toString().includes("non-system realms"), true); + ex = null; + try { + systemRealm = newGlobal({systemPrincipal: true, sameCompartmentAs: this}); + } catch(e) { + ex = e; + } + assertEq(ex.toString().includes("non-system realms"), true); +} +testSystemNonSystemRealms(); + +function testNewObjectCache() { + // NewObjectCache lookup based on the proto should not return a cross-realm + // object. + var g = newGlobal({sameCompartmentAs: this}); + var o1 = g.evaluate("Object.create(Math)"); + var o2 = Object.create(g.Math); + assertEq(objectGlobal(o1), g); + assertEq(objectGlobal(o2), this); +} +testNewObjectCache(); + +function testCCWs() { + // CCWs are allocated in the first realm. + var g1 = newGlobal({newCompartment: true}); + var g2 = newGlobal({sameCompartmentAs: g1}); + g1.o1 = {x: 1}; + g2.o2 = {x: 2}; + g1 = null; + gc(); + g2.o3 = {x: 3}; + assertEq(g2.o2.x, 2); + assertEq(g2.o3.x, 3); +} +testCCWs(); + +function testTypedArrayLazyBuffer(global) { + var arr1 = new global.Int32Array(1); + var arr2 = new Int32Array(arr1); + assertEq(objectGlobal(arr2.buffer), this); + global.buf = arr1.buffer; + global.eval("assertEq(objectGlobal(buf), this);"); +} +testTypedArrayLazyBuffer(newGlobal()); +testTypedArrayLazyBuffer(newGlobal({sameCompartmentAs: this})); + +function testEvalcx() { + var g = newGlobal(); + evalcx("this.x = 7", g); + assertEq(g.x, 7); + + g = newGlobal({newCompartment: true, invisibleToDebugger: true}); + var ex, sb; + try { + sb = g.eval("evalcx('')"); + } catch(e) { + ex = e; + } + // Check for either an exception or CCW (with --more-compartments). + assertEq((sb && objectGlobal(sb) === null) || + ex.toString().includes("visibility"), true); + + // Bug 1524707. + var lazysb = evalcx("lazy"); + Object.setPrototypeOf(lazysb, Math); + assertEq(lazysb.__proto__, Math); +} +testEvalcx(); + +function testSetProto() { + var o = {}; + o.__proto__ = newGlobal(); + o.__proto__ = newGlobal(); + assertEq(objectGlobal(o), this); +} +testSetProto(); diff --git a/js/src/jit-test/tests/realms/bug1385890-c50.js b/js/src/jit-test/tests/realms/bug1385890-c50.js new file mode 100644 index 0000000000..34dc346c93 --- /dev/null +++ b/js/src/jit-test/tests/realms/bug1385890-c50.js @@ -0,0 +1,20 @@ +// |jit-test| skip-if: !this.hasOwnProperty("ReadableStream") +// See . + +let otherGlobal = newGlobal(); +function getFreshInstances(type, otherType = type) { + stream = new ReadableStream({ + start(c) { + controller = c; + }, + type + }); +} +getFreshInstances(); +let [branch1, branch2] = otherGlobal.ReadableStream.prototype.tee.call(stream); +cancelPromise1 = ReadableStream.prototype.cancel.call(branch1, { + name: "cancel 1" +}); +cancelPromise2 = ReadableStream.prototype.cancel.call(branch2, { + name: "cancel 2" +}); diff --git a/js/src/jit-test/tests/realms/bug1479430.js b/js/src/jit-test/tests/realms/bug1479430.js new file mode 100644 index 0000000000..a7bd9cc075 --- /dev/null +++ b/js/src/jit-test/tests/realms/bug1479430.js @@ -0,0 +1,6 @@ +function f(a) { + return a.toString(); +} +var g = newGlobal({sameCompartmentAs: this}); +g.evaluate("function Obj() {}"); +f(f(new g.Obj())); diff --git a/js/src/jit-test/tests/realms/bug1487238.js b/js/src/jit-test/tests/realms/bug1487238.js new file mode 100644 index 0000000000..dc0f9710a9 --- /dev/null +++ b/js/src/jit-test/tests/realms/bug1487238.js @@ -0,0 +1,3 @@ +// |jit-test| error: TypeError +var x = newGlobal({sameCompartmentAs: this}); +x instanceof x.Map.prototype.set; diff --git a/js/src/jit-test/tests/realms/bug1496892.js b/js/src/jit-test/tests/realms/bug1496892.js new file mode 100644 index 0000000000..8a38ddfaef --- /dev/null +++ b/js/src/jit-test/tests/realms/bug1496892.js @@ -0,0 +1,4 @@ +(function(a) { + var g = newGlobal({sameCompartmentAs: this}); + g.Object.defineProperty(arguments, "0", {value: g}); +})(0); diff --git a/js/src/jit-test/tests/realms/bug1513665.js b/js/src/jit-test/tests/realms/bug1513665.js new file mode 100644 index 0000000000..6fd803b486 --- /dev/null +++ b/js/src/jit-test/tests/realms/bug1513665.js @@ -0,0 +1,24 @@ +load(libdir + "asserts.js"); + +var g = newGlobal(); + +function testArrayOf() { + var a = Array.of.call(g.Array); + assertEq(a instanceof g.Array, true); +} +testArrayOf(); + +function testPromiseThen() { + var p = Promise.resolve(0); + p.constructor = g.Promise; + var r = p.then(() => {}); + assertEq(r instanceof g.Promise, true); +} +testPromiseThen(); + +function testPromiseCatch() { + Boolean.prototype.then = g.Promise.prototype.then; + assertThrowsInstanceOf(() => Promise.prototype.catch.call(false), + g.TypeError); +} +testPromiseCatch(); diff --git a/js/src/jit-test/tests/realms/bug1514263.js b/js/src/jit-test/tests/realms/bug1514263.js new file mode 100644 index 0000000000..066663c434 --- /dev/null +++ b/js/src/jit-test/tests/realms/bug1514263.js @@ -0,0 +1,16 @@ +function O(x) { + this.x = x; +} + +var arr = []; +for (var i = 0; i < 100; i++) { + arr.push(new O(i)); +} + +var g = newGlobal({sameCompartmentAs: this}); +g.trigger = function(arr) { + var obj = arr[90]; + this.Object.create(obj); + assertEq(objectGlobal(obj), objectGlobal(arr)); +}; +g.trigger(arr); diff --git a/js/src/jit-test/tests/realms/bug1518753.js b/js/src/jit-test/tests/realms/bug1518753.js new file mode 100644 index 0000000000..61743d3111 --- /dev/null +++ b/js/src/jit-test/tests/realms/bug1518753.js @@ -0,0 +1,13 @@ +var g = newGlobal({sameCompartmentAs: this}); + +var o1 = Array(1, 2); +var o2 = g.Array(1, 2); +Array.prototype.x = 10; + +function test(o, v) { + for (var i = 0; i < 15; i++) { + assertEq(o.x, v); + } +} +test(o1, 10); +test(o2, undefined); diff --git a/js/src/jit-test/tests/realms/bug1518821.js b/js/src/jit-test/tests/realms/bug1518821.js new file mode 100644 index 0000000000..03a217be81 --- /dev/null +++ b/js/src/jit-test/tests/realms/bug1518821.js @@ -0,0 +1,11 @@ +load(libdir + "asserts.js"); + +var g = newGlobal({newCompartment: true}); +var f = g.Function("fn", "fn()"); +f(function() { + nukeAllCCWs(); + assertErrorMessage(() => { arguments.callee.caller = null; }, TypeError, + "can't access dead object"); + assertErrorMessage(() => arguments.callee.caller, TypeError, + "can't access dead object"); +}); diff --git a/js/src/jit-test/tests/realms/bug1519857.js b/js/src/jit-test/tests/realms/bug1519857.js new file mode 100644 index 0000000000..4b7d9511df --- /dev/null +++ b/js/src/jit-test/tests/realms/bug1519857.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !("dis" in this) +const g = newGlobal({sameCompartmentAs: this}); +g.eval(`function f() { y(); }`); +dis(g.f); diff --git a/js/src/jit-test/tests/realms/bug1548611.js b/js/src/jit-test/tests/realms/bug1548611.js new file mode 100644 index 0000000000..70603e25e3 --- /dev/null +++ b/js/src/jit-test/tests/realms/bug1548611.js @@ -0,0 +1,5 @@ +const otherGlobal = newGlobal(); +for (var i=0; i<60; i++) { + new otherGlobal.Array(); + bailout(); +} diff --git a/js/src/jit-test/tests/realms/bug1610189.js b/js/src/jit-test/tests/realms/bug1610189.js new file mode 100644 index 0000000000..c65f8120f8 --- /dev/null +++ b/js/src/jit-test/tests/realms/bug1610189.js @@ -0,0 +1,15 @@ +var g = newGlobal({sameCompartmentAs: this}); +var newTarget = g.Function(); +newTarget.prototype = undefined; + +// Reflect.construct returns an object in the current realm +// but its prototype is g's Array.prototype. +var arr1 = Reflect.construct(Array, [], newTarget); +assertEq(objectGlobal(arr1), this); +assertEq(arr1.__proto__, g.Array.prototype); + +// Calling cross-realm slice creates an object in that realm. +for (var i = 0; i < 10; i++) { + var arr2 = arr1.slice(); + assertEq(objectGlobal(arr2), g); +} diff --git a/js/src/jit-test/tests/realms/ccw-errors.js b/js/src/jit-test/tests/realms/ccw-errors.js new file mode 100644 index 0000000000..380c81d17c --- /dev/null +++ b/js/src/jit-test/tests/realms/ccw-errors.js @@ -0,0 +1,28 @@ +function test() { + "use strict"; + + const g = newGlobal({newCompartment: true}); + Error.prototype.whence = "main global"; + g.eval("Error.prototype.whence = 'other global'"); + + const obj = g.eval("[]"); + Object.freeze(obj); + try { + obj.foo = 7; + assertEq("reached", "no", "This line should not be reached; the previous line should have thrown"); + } catch(e) { + assertEq("" + e, `TypeError: can't define property "foo": Array is not extensible`); + assertEq(e.whence, "main global"); // setting operation happens in this global + } + + const obj2 = g.eval(`obj2 = { get x() { throw new Error("go away"); } };`); + try { + obj2.x; + assertEq("reached", "no", "This line should not be reached; the previous line should have thrown"); + } catch(e) { + assertEq("" + e, `Error: go away`); + assertEq(e.whence, "other global"); // Error created in other global + } +} + +test(); diff --git a/js/src/jit-test/tests/realms/first-global.js b/js/src/jit-test/tests/realms/first-global.js new file mode 100644 index 0000000000..d2a4bbade0 --- /dev/null +++ b/js/src/jit-test/tests/realms/first-global.js @@ -0,0 +1,5 @@ +var g1 = newGlobal({sameCompartmentAs: this}); +var g2 = newGlobal({newCompartment: true}); +assertEq(firstGlobalInCompartment(this), this); +assertEq(firstGlobalInCompartment(g1), this); +assertEq(firstGlobalInCompartment(g2), g2); diff --git a/js/src/jit-test/tests/realms/nuking.js b/js/src/jit-test/tests/realms/nuking.js new file mode 100644 index 0000000000..1d0656a716 --- /dev/null +++ b/js/src/jit-test/tests/realms/nuking.js @@ -0,0 +1,49 @@ +// Ensure nuking happens on a single target realm instead of compartment. + +var g1 = newGlobal({newCompartment: true}); +var g2 = newGlobal({sameCompartmentAs: g1}); +g2.other = g1; + +var o1 = g1.Math; +var o2 = g2.Math; + +g1.nukeAllCCWs(); + +// o1 is now dead. +ex = null; +try { + assertEq(o1.abs(1), 1); +} catch (e) { + ex = e; +} +assertEq(ex.toString().includes("dead object"), true); + +// o2 still works. +assertEq(o2.abs(1), 1); + +// g2 can still access g1 because they're same-compartment. +assertEq(g2.evaluate("other.Math.abs(-2)"), 2); + +// Attempting to create a new wrapper targeting nuked realm g1 should return a +// dead wrapper now. Note that we can't use g1 directly because that's now a +// dead object, so we try to get to g1 via g2. +ex = null; +try { + g2.other.toString(); +} catch (e) { + ex = e; +} +assertEq(ex.toString().includes("dead object"), true); + +// Nuke g2 too. We have nuked all realms in its compartment so we should now +// throw if we try to create a new outgoing wrapper. +g2.evaluate("(" + function() { + nukeAllCCWs(); + var ex = null; + try { + newGlobal({newCompartment: true}).Array(); + } catch (e) { + ex = e; + } + assertEq(ex.toString().includes('dead object'), true); +} + ")()"); diff --git a/js/src/jit-test/tests/realms/promise-job-global.js b/js/src/jit-test/tests/realms/promise-job-global.js new file mode 100644 index 0000000000..246ce171a2 --- /dev/null +++ b/js/src/jit-test/tests/realms/promise-job-global.js @@ -0,0 +1,31 @@ +// Test that jobs added to the promise job queue have a global that's consistent +// with and without same-compartment realms. + +var g1 = newGlobal(); +var g2 = newGlobal({sameCompartmentAs: this}); + +// EnqueuePromiseReactionJob, handler is a primitive. +// Job's global is the reaction's global. +function test1(g) { + var resolve; + var p = new Promise(res => { resolve = res; }); + g.Promise.prototype.then.call(p, 1); + resolve(); + assertEq(globalOfFirstJobInQueue(), g); + drainJobQueue(); +} +test1(g1); +test1(g2); + +// EnqueuePromiseReactionJob, handler is an object. +// Job's global is the handler's global. +function test2(g) { + var resolve; + var p = new Promise(res => { resolve = res; }); + p.then(new g.Function()); + resolve(); + assertEq(globalOfFirstJobInQueue(), g); + drainJobQueue(); +} +test2(g1); +test2(g2); diff --git a/js/src/jit-test/tests/realms/promise-then.js b/js/src/jit-test/tests/realms/promise-then.js new file mode 100644 index 0000000000..a12c2c6d82 --- /dev/null +++ b/js/src/jit-test/tests/realms/promise-then.js @@ -0,0 +1,32 @@ +load(libdir + "asserts.js"); + +ignoreUnhandledRejections(); + +const g = newGlobal({sameCompartmentAs: this}); + +let resolve, reject; +let promise = new Promise((resolveFn, rejectFn) => { + resolve = resolveFn; + reject = rejectFn; +}); + +// Set to a built-in Promise.prototype.then function, but from a different realm. +promise.then = g.Promise.prototype.then; + +// Make SpeciesConstructor throw a TypeError exception. +promise.constructor = { + [Symbol.species]: "not a constructor" +}; + +async function f(p) { + await p; +} + +let error; +f(promise).catch(e => { error = e; }); + +resolve(promise); + +drainJobQueue(); + +assertEq(error.constructor === g.TypeError, true); diff --git a/js/src/jit-test/tests/realms/proxy-realm.js b/js/src/jit-test/tests/realms/proxy-realm.js new file mode 100644 index 0000000000..00d984dd40 --- /dev/null +++ b/js/src/jit-test/tests/realms/proxy-realm.js @@ -0,0 +1,14 @@ +// Based on a test written by André Bargull (bug 1297179). + +load(libdir + "asserts.js"); + +var g = newGlobal({sameCompartmentAs: this}); +var {proxy, revoke} = g.eval(`Proxy.revocable(function(){}, {})`); + +revoke(); + +assertEq(objectGlobal(proxy), g); +assertThrowsInstanceOf(() => proxy(), TypeError); +assertThrowsInstanceOf(() => new proxy(), TypeError); +assertThrowsInstanceOf(() => proxy.foo, TypeError); +assertThrowsInstanceOf(() => proxy.foo = 1, TypeError); diff --git a/js/src/jit-test/tests/realms/scripted-caller-global.js b/js/src/jit-test/tests/realms/scripted-caller-global.js new file mode 100644 index 0000000000..15290e90b5 --- /dev/null +++ b/js/src/jit-test/tests/realms/scripted-caller-global.js @@ -0,0 +1,5 @@ +assertEq(scriptedCallerGlobal(), this); + +var g = newGlobal(); +assertEq(g.evaluate("scriptedCallerGlobal()"), g); +assertEq(g.scriptedCallerGlobal(), this); diff --git a/js/src/jit-test/tests/realms/switch-realms-native.js b/js/src/jit-test/tests/realms/switch-realms-native.js new file mode 100644 index 0000000000..e4ae74cffc --- /dev/null +++ b/js/src/jit-test/tests/realms/switch-realms-native.js @@ -0,0 +1,60 @@ +function testCall() { + var g = newGlobal({sameCompartmentAs: this}); + for (var i = 0; i < 20; i++) { + assertEq(objectGlobal(g.Array(1, 2, 3)), g); + assertEq(objectGlobal(new g.Array(1, 2, 3)), g); + } + for (var i = 0; i < 20; i++) { + g.Error(); + g.assertCorrectRealm(); + if (i > 15) + g.gc(); + } +} +testCall(); + +function testAccessor() { + var g = newGlobal({sameCompartmentAs: this}); + var o = {}; + Object.defineProperty(o, "foo", {get: g.assertCorrectRealm, + set: g.assertCorrectRealm}); + for (var i = 0; i < 20; i++) + o.foo; + for (var i = 0; i < 20; i++) + o.foo = 1; + Object.defineProperty(o, "arr", {get: g.Array}); + for (var i = 0; i < 20; i++) { + var arr = o.arr; + assertEq(objectGlobal(arr), g); + assertEq(arr.__proto__, g.Array.prototype); + } +} +testAccessor(); + +function testException1() { + var g = newGlobal({sameCompartmentAs: this}); + for (var i = 0; i < 20; i++) { + var ex; + try { + g.throwOutOfMemory(); + } catch(e) { + ex = e; + } + assertCorrectRealm(); + assertEq(typeof ex, "string"); + } +} +testException1(); + +function testDOMCalls() { + var g = newGlobal({sameCompartmentAs: this}); + var obj = g.evaluate("new FakeDOMObject()"); + for (var i = 0; i < 2000; i++) { + assertCorrectRealm(); + assertEq(obj.doFoo(1), 1); + assertEq(typeof obj.x, "number"); + assertEq(obj.global, g); + obj.global = g; // Throws if not setter's global. + } +} +testDOMCalls(); diff --git a/js/src/jit-test/tests/realms/switch-realms-scripted.js b/js/src/jit-test/tests/realms/switch-realms-scripted.js new file mode 100644 index 0000000000..24746fd4d1 --- /dev/null +++ b/js/src/jit-test/tests/realms/switch-realms-scripted.js @@ -0,0 +1,113 @@ +function testBasic() { + var g = newGlobal({sameCompartmentAs: this}); + g.evaluate("function foo() { return scriptedCallerGlobal(); }"); + for (var i = 0; i < 20; i++) + assertEq(g.foo(), g); + + g.evaluate("function Obj() {}"); + for (var i = 0; i < 30; i++) + assertEq(objectGlobal(new g.Obj()), g); +} +testBasic(); + +function testFunCall() { + var g = newGlobal({sameCompartmentAs: this}); + g.evaluate("function foo() { return scriptedCallerGlobal(); }"); + for (var i = 0; i < 20; i++) + assertEq(g.foo.call(1, 2), g); +} +testFunCall(); + +function testFunApplyArgs() { + var g = newGlobal({sameCompartmentAs: this}); + g.evaluate("function foo() { return scriptedCallerGlobal(); }"); + for (var i = 0; i < 2000; i++) + assertEq(g.foo.apply(null, arguments), g); +} +testFunApplyArgs(1, 2); + +function testFunApplyArray() { + var g = newGlobal({sameCompartmentAs: this}); + g.evaluate("function foo() { return scriptedCallerGlobal(); }"); + var arr = [1, 2]; + for (var i = 0; i < 2000; i++) + assertEq(g.foo.apply(null, arr), g); +} +testFunApplyArray(); + +function testAccessor() { + var g = newGlobal({sameCompartmentAs: this}); + g.evaluate("function foo() { return scriptedCallerGlobal(); }"); + var o = {}; + Object.defineProperty(o, "foo", {get: g.foo, set: g.foo}); + for (var i = 0; i < 20; i++) { + assertEq(o.foo, g); + o.foo = 1; + } +} +testAccessor(); + +function testGenerator() { + var thisGlobalGen = function*() {}; + var thisGlobalGenObj = thisGlobalGen(); + + var g = newGlobal({sameCompartmentAs: this}); + g.evaluate("function* gen() { for (var i = 0; i < 2; i++) yield new Array(1, 2); }"); + for (var i = 0; i < 20; i++) { + var o = g.gen(); + for (var j = 0; j < 2; j++) { + var res = thisGlobalGenObj.next.call(o); + assertEq(objectGlobal(res), g); + assertEq(Array.isArray(res.value), true); + assertEq(objectGlobal(res.value), g); + } + } +} +testGenerator(); + +function testException1() { + var g = newGlobal({sameCompartmentAs: this}); + g.evaluate("function throwEx() { throw this; }"); + for (var i = 0; i < 20; i++) { + var ex; + try { + g.throwEx(); + } catch(e) { + ex = e; + } + assertCorrectRealm(); + assertEq(ex, g); + } +} +testException1(); + +function testException2() { + var g = newGlobal({sameCompartmentAs: this}); + g.evaluate("function f1(x) { if (x > 100) throw x; }"); + g.f2 = function(x) { return g.f1(x); } + g.f3 = function(x) { return g.f2(x); } + g.evaluate("function f4(x) { try { return f3(x); } finally { assertCorrectRealm(); } }"); + var ex; + try { + for (var i = 0; i < 110; i++) { + g.f4(i); + } + } catch (e) { + ex = e; + } + assertCorrectRealm(); + assertEq(ex, 101); +} +testException2(); +testException2(); + +function testException3(x) { + var g = newGlobal({sameCompartmentAs: this}); + g.f1 = function(x) { if (x === max + 2) throw 1; } + g.evaluate("function f2(x) { try { return f1(x); } catch(e) {} }"); + var max = 15; + for (var i = 0; i < max; i++) + g.f2(x * max + i); +} +testException3(0); +testException3(1); diff --git a/js/src/jit-test/tests/record-tuple/bug-1772597.js b/js/src/jit-test/tests/record-tuple/bug-1772597.js new file mode 100644 index 0000000000..a220a813fe --- /dev/null +++ b/js/src/jit-test/tests/record-tuple/bug-1772597.js @@ -0,0 +1,23 @@ +// |jit-test| skip-if: !this.hasOwnProperty("Tuple") + +gczeal(14); + +var c = #["a", "b", "c"]; // Need at least 3 elements to trigger the bug +var t; + +for (i = 0; i < 2; i++) { + /* + To trigger the bug, the calculated tenured size needs to exceed + the size of the nursery during the previous GC. So we call Tuple.with(), + which is implemented in C++, because most of the self-hosted Tuple + methods allocate temporary space that increases the nursery size, + masking the bug. + */ + t = c.with(1, "x"); + /* + Calling gc() manually forces `t` to be tenured. This test fails if + the GC assumes that `t` has the same alloc kind in the nursery and + the tenured heap, as happened in Bug 1772597. + */ + gc(); +} diff --git a/js/src/jit-test/tests/record-tuple/compacting-gc-nested-tuples.js b/js/src/jit-test/tests/record-tuple/compacting-gc-nested-tuples.js new file mode 100644 index 0000000000..396ab359ed --- /dev/null +++ b/js/src/jit-test/tests/record-tuple/compacting-gc-nested-tuples.js @@ -0,0 +1,23 @@ +// |jit-test| skip-if: !this.hasOwnProperty("Tuple") +gczeal(14); // Be sure to run compacting GC + +function f() { + assertEq(#[1, 2].flatMap(function(e) { + return #[e, e * 2]; + }), #[1, 2, 2, 4]); + + var result = #[1, 2, 3].flatMap(function(ele) { + return #[ + #[ele * 2] + ]; + }); + + assertEq(result.length, 3); + assertEq(result[0], #[2]); + assertEq(result[1], #[4]); + assertEq(result[2], #[6]); +} + +for (i = 0; i < 20; i++) { + f(); +} diff --git a/js/src/jit-test/tests/record-tuple/compartments.js b/js/src/jit-test/tests/record-tuple/compartments.js new file mode 100644 index 0000000000..ce05db021e --- /dev/null +++ b/js/src/jit-test/tests/record-tuple/compartments.js @@ -0,0 +1,19 @@ +// |jit-test| --more-compartments; skip-if: !this.hasOwnProperty("Record") +const realm = newGlobal(); + +const realm_record = realm.eval(`Record({ x: 1, y: 2 })`); + +assertEq(realm_record === #{ x: 1, y: 2 }, true); + +const realm_tuple = realm.eval(`Tuple(1, 2, 3)`); + +assertEq(realm_tuple === #[1, 2, 3], true); + +// Test that an object can point to a record in a different realm +const realm2 = newGlobal(); + +const realm2_object = realm.eval(`new Object()`); + +realm2_object['r'] = realm_record; + +assertEq(realm2_object['r'] === #{"x": 1, "y": 2}, true); diff --git a/js/src/jit-test/tests/record-tuple/from.js b/js/src/jit-test/tests/record-tuple/from.js new file mode 100644 index 0000000000..1d23517295 --- /dev/null +++ b/js/src/jit-test/tests/record-tuple/from.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !this.hasOwnProperty("Tuple") + +gczeal(10); // Run incremental GC in many slices + +var c = ["a", "b"]; +var t = Tuple.from(c); + +for (i = 0; i < 100; i++) { +c = ["a", "b"]; +t = Tuple.from(c); +c = null; +gc(); +} diff --git a/js/src/jit-test/tests/record-tuple/with.js b/js/src/jit-test/tests/record-tuple/with.js new file mode 100644 index 0000000000..920512caa9 --- /dev/null +++ b/js/src/jit-test/tests/record-tuple/with.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !this.hasOwnProperty("Tuple") + +function f() { + var expected = #[1, "monkeys", 3]; + assertEq(#[1,2,3].with(1, "monkeys"), expected); + assertEq(Object(#[1,2,3]).with(1, "monkeys"), expected); +} + +for (i = 0; i < 500; i++) { + f(); +} diff --git a/js/src/jit-test/tests/regexp/CheckRegExpSyntax.js b/js/src/jit-test/tests/regexp/CheckRegExpSyntax.js new file mode 100644 index 0000000000..19471fdf50 --- /dev/null +++ b/js/src/jit-test/tests/regexp/CheckRegExpSyntax.js @@ -0,0 +1,16 @@ +// |jit-test| skip-if: !('oomTest' in this) + +load(libdir + "asserts.js"); + +assertEq(checkRegExpSyntax("correct[reg]exp"), undefined); +let err = checkRegExpSyntax("regex[withSyntaxError"); +assertEq(err instanceof SyntaxError, true); + +oomTest(() => checkRegExpSyntax("correct(re)gexp")) + +var checkReturnedSyntaxError = true; +oomTest(() => { + let err = checkRegExpSyntax("regex[withSyntaxError"); + if (!(err instanceof SyntaxError)) { checkReturnedSyntaxError = false; } +}) +assertEq(checkReturnedSyntaxError, true); diff --git a/js/src/jit-test/tests/regexp/RegExpExec-errors.js b/js/src/jit-test/tests/regexp/RegExpExec-errors.js new file mode 100644 index 0000000000..bee579859f --- /dev/null +++ b/js/src/jit-test/tests/regexp/RegExpExec-errors.js @@ -0,0 +1,6 @@ +load(libdir + "asserts.js"); + +assertErrorMessage(() => RegExp.prototype.test.call({}), TypeError, + /test method called on incompatible Object/); +assertErrorMessage(() => RegExp.prototype[Symbol.match].call([]), TypeError, + /\[Symbol\.match\] method called on incompatible Array/); diff --git a/js/src/jit-test/tests/regexp/atom-match-unicode-split-surrogate.js b/js/src/jit-test/tests/regexp/atom-match-unicode-split-surrogate.js new file mode 100644 index 0000000000..3c1909fcf2 --- /dev/null +++ b/js/src/jit-test/tests/regexp/atom-match-unicode-split-surrogate.js @@ -0,0 +1,25 @@ +function test(flags) { + // RegExp with a simple atom matcher. + // - Global flag to enable setting 'lastIndex'. + let s = "\u{10000}"; + let re = RegExp(s, flags + "g"); + + for (let i = 0; i < 200; ++i) { + // Set lastIndex in the middle of the surrogate pair. + re.lastIndex = 1; + + // |exec| will reset lastIndex to the start of the surrogate pair. + let r = re.exec(s); + + // Atom match should succeed. + assertEq(r[0], s); + assertEq(r.index, 0); + assertEq(re.lastIndex, 2); + } +} + +// Unicode flag to enable surrogate pairs support. +test("u"); + +// Unicode-Sets flag to enable surrogate pairs support. +test("v"); diff --git a/js/src/jit-test/tests/regexp/bug-1841771.js b/js/src/jit-test/tests/regexp/bug-1841771.js new file mode 100644 index 0000000000..ae13aa86f5 --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug-1841771.js @@ -0,0 +1,76 @@ +var lfLogBuffer = ` +let hasFunction ; +for (const name of [, "" ]) + g55 = newGlobal(); +gcparam('maxBytes', gcparam('gcBytes') ); +//corefuzz-dcd-endofdata +/* +//corefuzz-dcd-endofdata +/**/ + + + +let hasFunction ; +for (const name of [ "", "", "", ""]) { + + + + + + const present = name in this; + if (!present) + thisname = function() {}; +} +//corefuzz-dcd-endofdata +//corefuzz-dcd-selectmode 1089924061 +//corefuzz-dcd-endofdata +oomTest(function() { + let m14 = parseModule('a'.replace(/a/, assertEq.toString)); +}); +`; +lfLogBuffer = lfLogBuffer.split('\n'); +let lfPreamble = ` + Object.defineProperty(this, "fuzzutils", { + value:{ + untemplate: function(s) { + return s.replace(/\\\\/g, '\\\\\\\\').replace(/\`/g, '\\\\\`').replace(/\\\$/g, '\\\\\$'); + } + } + }); +function lfFixRedeclaration(lfSrc, lfExc, lfRewriteSet) { + let varName; + let srcParts = lfSrc.split("\\n"); + let regReplace = new RegExp; + for (let lfIdx = 0; lfIdx < srcParts.length; ++lfIdx) + srcParts[lfExc.lineNumber - 1] = srcParts[lfExc.lineNumber - 1].replace(regReplace, varName); + return srcParts.join(); +} +`; +evaluate(lfPreamble); +let lfRunTypeId = -1; +let lfCodeBuffer = ""; +while (true) { + let line = lfLogBuffer.shift(); + if (line == null) break; + else if (line == "//corefuzz-dcd-endofdata") { + loadFile(lfCodeBuffer); + lfCodeBuffer = ""; + } else lfCodeBuffer += line + "\n"; +} +loadFile(lfCodeBuffer); +function loadFile(lfVarx, lfForceRunType = 0, lfPatchSets = []) { + try { + if (lfVarx.indexOf("//corefuzz-dcd-selectmode ") === 0) { + if (lfGCStress); + } else { + evaluate(lfVarx); + } + } catch (lfVare) { + if (lfVare.toString.indexOf0 >= 0); + else if (lfVare.toString().indexOf("redeclaration of ") >= 0) { + let lfNewSrc = lfFixRedeclaration(lfVarx, lfVare, lfPatchSets); + loadFile(lfNewSrc, lfRunTypeId, lfPatchSets); + } + lfVarx = fuzzutils.untemplate(lfVarx); + } +} diff --git a/js/src/jit-test/tests/regexp/bug-1845715.js b/js/src/jit-test/tests/regexp/bug-1845715.js new file mode 100644 index 0000000000..992a5a8d8a --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug-1845715.js @@ -0,0 +1,2 @@ +// |jit-test| skip-if: !('oomTest' in this) +oomTest(() => { gc(); /./d.exec(); }); diff --git a/js/src/jit-test/tests/regexp/bug1419785.js b/js/src/jit-test/tests/regexp/bug1419785.js new file mode 100644 index 0000000000..b40eca9f8c --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1419785.js @@ -0,0 +1,3 @@ +// |jit-test| error:character class +Object.defineProperty(RegExp.prototype, Symbol.search, {get: () => { throw "wrong"; }}); +"abc".search("[["); diff --git a/js/src/jit-test/tests/regexp/bug1445907.js b/js/src/jit-test/tests/regexp/bug1445907.js new file mode 100644 index 0000000000..a0e0dca57b --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1445907.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() + +// On ARM64, we failed to save x28 properly when generating code for the regexp +// matcher. +// +// There's wasm and Debugger code here because the combination forces the use of +// x28 and exposes the bug when running on the simulator. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +g.eval(`var m = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func (export "test")))')))`); +var re = /./; +dbg.onEnterFrame = function(frame) { re.exec("x") }; +result = g.eval("m.exports.test()"); diff --git a/js/src/jit-test/tests/regexp/bug1600272.js b/js/src/jit-test/tests/regexp/bug1600272.js new file mode 100644 index 0000000000..08f154f771 --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1600272.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +evalInWorker(` + Array.prototype[1] = 1; + var source = Array(50000).join("(") + "a" + Array(50000).join(")"); + var r70 = RegExp(source); +`); diff --git a/js/src/jit-test/tests/regexp/bug1640473.js b/js/src/jit-test/tests/regexp/bug1640473.js new file mode 100644 index 0000000000..d2ba97043d --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1640473.js @@ -0,0 +1,20 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") +var s = ""; +var input = ""; +for (var i = 0; i < 500; ++i) { + s += "(?a)"; + s += "(?b)?"; + input += "a"; +} + +try { + var r = RegExp(s); + var e = r.exec(input); + + for (var i = 0; i < 500; i++) { + assertEq(e.groups["a" + i], "a"); + assertEq(e.groups["b" + i], undefined); + } +} catch (err) { + assertEq(err.message, "too much recursion"); +} diff --git a/js/src/jit-test/tests/regexp/bug1640475.js b/js/src/jit-test/tests/regexp/bug1640475.js new file mode 100644 index 0000000000..58c092ec1d --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1640475.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var i = 0; +oomTest(function() { + for (var j = 0; j < 10; ++j) { + var r = RegExp(`(?<_${(i++).toString(32)}>a)`); + r.exec("a"); + } +}); diff --git a/js/src/jit-test/tests/regexp/bug1640479.js b/js/src/jit-test/tests/regexp/bug1640479.js new file mode 100644 index 0000000000..ff166d6451 --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1640479.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var failures = 0; +var i = 0; + +function foo() { + var e; + var r = RegExp("(?<_" + (i++) + "a>)"); + try { e = r.exec("a"); } catch {} + e = r.exec("a"); + if (e.groups === undefined) failures++; +} + +oomTest(foo); +assertEq(failures, 0); diff --git a/js/src/jit-test/tests/regexp/bug1640487.js b/js/src/jit-test/tests/regexp/bug1640487.js new file mode 100644 index 0000000000..7ee3756075 --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1640487.js @@ -0,0 +1,8 @@ +var re = /(?a)|b/; + +function f(j) { + var s = String.fromCharCode(0x61 + (j === 1)); + var e = re.exec(s); + if (e.groups.x !== "a") print(i,j); +} +for (var i = 0; i < 2; ++i) f(i); diff --git a/js/src/jit-test/tests/regexp/bug1640592.js b/js/src/jit-test/tests/regexp/bug1640592.js new file mode 100644 index 0000000000..e00fd81e99 --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1640592.js @@ -0,0 +1,2 @@ +gczeal(14, 16); +"a".match(/(?a)/); diff --git a/js/src/jit-test/tests/regexp/bug1697077.js b/js/src/jit-test/tests/regexp/bug1697077.js new file mode 100644 index 0000000000..5551b98655 --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1697077.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !('interruptRegexp' in this) || getBuildConfiguration('pbl') +// skip testing under PBL because interruption of regex engine here seems to +// depend on GC behavior and is hard to reproduce reliably. +var s0 = "A".repeat(10*1024); +var interrupted = false; +gczeal(0); +setInterruptCallback(() => { + interrupted = true; + startgc(7,'shrinking'); + return true; +}); +assertEq(interruptRegexp(/a(bc|bd)/, s0), null); +assertEq(interrupted, true); diff --git a/js/src/jit-test/tests/regexp/bug1703750.js b/js/src/jit-test/tests/regexp/bug1703750.js new file mode 100644 index 0000000000..4be2d7748a --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1703750.js @@ -0,0 +1,7 @@ +function foo() { + const b = "".match(); + try { + foo(); + } catch {} +} +foo() diff --git a/js/src/jit-test/tests/regexp/bug1718842-1.js b/js/src/jit-test/tests/regexp/bug1718842-1.js new file mode 100644 index 0000000000..35b557b6b4 --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1718842-1.js @@ -0,0 +1,7 @@ +var g = newGlobal({sameZoneAs: this}); + +var re1 = RegExp("(?a)"); +var re2 = g.RegExp("(?a)"); + +re1.exec("a"); +re2.exec("a"); diff --git a/js/src/jit-test/tests/regexp/bug1718842-2.js b/js/src/jit-test/tests/regexp/bug1718842-2.js new file mode 100644 index 0000000000..88f76046f7 --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1718842-2.js @@ -0,0 +1,9 @@ +var g = newGlobal(); + +g.enableTrackAllocations(); + +var re1 = RegExp("(?a)"); +var re2 = g.RegExp("(?a)"); + +re1.exec("a"); +re2.exec("a"); diff --git a/js/src/jit-test/tests/regexp/bug1783555.js b/js/src/jit-test/tests/regexp/bug1783555.js new file mode 100644 index 0000000000..60978910a2 --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1783555.js @@ -0,0 +1,4 @@ +var src = "(.?)".repeat(65536); +try { + "".match(src); +} catch {} diff --git a/js/src/jit-test/tests/regexp/bug1783830.js b/js/src/jit-test/tests/regexp/bug1783830.js new file mode 100644 index 0000000000..cd41be7f66 --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1783830.js @@ -0,0 +1,7 @@ +assertEq(/[^!]/u.exec('\u{1F4A9}')[0], "\u{1F4A9}"); +assertEq(/^[^!]/u.exec('\u{1F4A9}')[0], "\u{1F4A9}"); +assertEq(/[^!]$/u.exec('\u{1F4A9}')[0], "\u{1F4A9}"); +assertEq(/![^!]/u.exec('!\u{1F4A9}')[0], "!\u{1F4A9}"); +assertEq(/[^!]!/u.exec('\u{1F4A9}!')[0], "\u{1F4A9}!"); +assertEq(/![^!]/ui.exec('!\u{1F4A9}')[0], "!\u{1F4A9}"); +assertEq(/[^!]!/ui.exec('\u{1F4A9}!')[0], "\u{1F4A9}!"); diff --git a/js/src/jit-test/tests/regexp/bug1786012.js b/js/src/jit-test/tests/regexp/bug1786012.js new file mode 100644 index 0000000000..f806fd22bb --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1786012.js @@ -0,0 +1,8 @@ +var repeated = "A".repeat(65536); +var src = "^(?:" + repeated + ")\$"; + +for (var i = 0; i < 100; i++) { + try { + RegExp(src).test(); + } catch {} +} diff --git a/js/src/jit-test/tests/regexp/bug1794317.js b/js/src/jit-test/tests/regexp/bug1794317.js new file mode 100644 index 0000000000..1ecb21eb64 --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1794317.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) + +for (let i = 0; i < 2; i++) { + oomTest(function () { + RegExp("(?)").exec(); + }) +} diff --git a/js/src/jit-test/tests/regexp/builtin-exec-wrapper.js b/js/src/jit-test/tests/regexp/builtin-exec-wrapper.js new file mode 100644 index 0000000000..63660de643 --- /dev/null +++ b/js/src/jit-test/tests/regexp/builtin-exec-wrapper.js @@ -0,0 +1,7 @@ +var g = newGlobal({newCompartment: true}); +g.evaluate(`RegExp.prototype.exec = {};`); +var wrapper = g.evaluate(`/abc.+def/`); +assertEq(RegExp.prototype.test.call(wrapper, "abc"), false); +assertEq(RegExp.prototype.test.call(wrapper, "abcXdef"), true); +assertEq(RegExp.prototype[Symbol.match].call(wrapper, "abc"), null); +assertEq(RegExp.prototype[Symbol.match].call(wrapper, "abcXdef")[0], "abcXdef"); diff --git a/js/src/jit-test/tests/regexp/clone-statics.js b/js/src/jit-test/tests/regexp/clone-statics.js new file mode 100644 index 0000000000..d2f0ce1cac --- /dev/null +++ b/js/src/jit-test/tests/regexp/clone-statics.js @@ -0,0 +1,21 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +offThreadCompileToStencil(` + function foo(x, {}) { + do { + re = /erwe/; + if (x === 1) + re.x = 1; + else + re.x = "a"; + assertEq(re.x.length, (x === 1) ? undefined : 1); + } while (!inIon()); + } + + foo(0, 0); + RegExp.multiline = 1; + foo(1, 0); +`); + +var stencil = finishOffThreadStencil(); +evalStencil(stencil); diff --git a/js/src/jit-test/tests/regexp/flag-getters.js b/js/src/jit-test/tests/regexp/flag-getters.js new file mode 100644 index 0000000000..fbc1ad7274 --- /dev/null +++ b/js/src/jit-test/tests/regexp/flag-getters.js @@ -0,0 +1,61 @@ +// Test inlining for RegExp flag getters. + +function testGlobal() { + const xs = [/a/, /b/g]; + + for (let i = 0; i < 200; ++i) { + let x = xs[i & 1]; + assertEq(x.global, !!(i & 1)); + } +} +for (let i = 0; i < 2; ++i) testGlobal(); + +function testIgnoreCase() { + const xs = [/a/, /b/i]; + + for (let i = 0; i < 200; ++i) { + let x = xs[i & 1]; + assertEq(x.ignoreCase, !!(i & 1)); + } +} +for (let i = 0; i < 2; ++i) testIgnoreCase(); + +function testMultiline() { + const xs = [/a/, /b/m]; + + for (let i = 0; i < 200; ++i) { + let x = xs[i & 1]; + assertEq(x.multiline, !!(i & 1)); + } +} +for (let i = 0; i < 2; ++i) testMultiline(); + +function testDotAll() { + const xs = [/a/, /b/s]; + + for (let i = 0; i < 200; ++i) { + let x = xs[i & 1]; + assertEq(x.dotAll, !!(i & 1)); + } +} +for (let i = 0; i < 2; ++i) testDotAll(); + +function testUnicode() { + const xs = [/a/, /b/u]; + + for (let i = 0; i < 200; ++i) { + let x = xs[i & 1]; + assertEq(x.unicode, !!(i & 1)); + } +} +for (let i = 0; i < 2; ++i) testUnicode(); + +function testSticky() { + const xs = [/a/, /b/y]; + + for (let i = 0; i < 200; ++i) { + let x = xs[i & 1]; + assertEq(x.sticky, !!(i & 1)); + } +} +for (let i = 0; i < 2; ++i) testSticky(); diff --git a/js/src/jit-test/tests/regexp/has-capture-groups-intrinsic.js b/js/src/jit-test/tests/regexp/has-capture-groups-intrinsic.js new file mode 100644 index 0000000000..2dfb450ea9 --- /dev/null +++ b/js/src/jit-test/tests/regexp/has-capture-groups-intrinsic.js @@ -0,0 +1,20 @@ +function test() { + var RegExpHasCaptureGroups = getSelfHostedValue("RegExpHasCaptureGroups"); + var cases = [ + [/a.+/, false], + [/abc/, false], + [/\r\n?|\n/, false], + [/(abc)/, true], + [/a(.+)/, true], + [/a(b)(c)(d)/, true], + [/a(?:b)/, false], + [/((?:a))/, true], + [/(?a)/, true], + ]; + for (var i = 0; i < 10; i++) { + for (var [re, expected] of cases) { + assertEq(RegExpHasCaptureGroups(re, "abcdef"), expected); + } + } +} +test(); diff --git a/js/src/jit-test/tests/regexp/huge-01.js b/js/src/jit-test/tests/regexp/huge-01.js new file mode 100644 index 0000000000..bc1529f0c6 --- /dev/null +++ b/js/src/jit-test/tests/regexp/huge-01.js @@ -0,0 +1,21 @@ + +function g(N, p) { + var prefix = p.repeat(N); + var str = prefix + "[AB]"; + + try { + var re = new RegExp(str); + re.exec(prefix + "A"); + } catch(e) { + // 1. Regexp too big is raised by the lack of the 64k virtual registers + // reserved for the regexp evaluation. + // 2. The stack overflow can occur during the analysis of the regexp + assertEq(e.message.includes("regexp too big") || + e.message.includes("Stack overflow") || + e.message.includes("too much recursion"), true); + } +} + +var prefix = "/(?=k)ok/"; +for (var i = 0; i < 18; i++) + g(Math.pow(2, i), prefix) diff --git a/js/src/jit-test/tests/regexp/huge-02.js b/js/src/jit-test/tests/regexp/huge-02.js new file mode 100644 index 0000000000..1d0d94e10c --- /dev/null +++ b/js/src/jit-test/tests/regexp/huge-02.js @@ -0,0 +1,13 @@ +var interestingCaptureNums = [(1 << 14), + (1 << 15) - 1, + (1 << 15), + (1 << 15) + 1, + (1 << 16)] + +for (let i of interestingCaptureNums) { + print(i); + try { + var source = Array(i).join("(") + "a" + Array(i).join(")"); + RegExp(source).exec("a"); + } catch {} +} diff --git a/js/src/jit-test/tests/regexp/lastIndex-negative.js b/js/src/jit-test/tests/regexp/lastIndex-negative.js new file mode 100644 index 0000000000..536b3d2233 --- /dev/null +++ b/js/src/jit-test/tests/regexp/lastIndex-negative.js @@ -0,0 +1,14 @@ +// A negative lastIndex value must be treated as 0. +function test() { + var re = /abc.+de/g; + for (var i = 0; i < 100; i++) { + re.lastIndex = (i > 60) ? -1 : 0; + assertEq(typeof re.exec("abcXdef"), "object"); + assertEq(re.lastIndex, 6); + + re.lastIndex = (i > 60) ? -1 : 0; + assertEq(re.test("abcXdef"), true); + assertEq(re.lastIndex, 6); + } +} +test(); diff --git a/js/src/jit-test/tests/regexp/lastIndex-non-writable.js b/js/src/jit-test/tests/regexp/lastIndex-non-writable.js new file mode 100644 index 0000000000..74839762f5 --- /dev/null +++ b/js/src/jit-test/tests/regexp/lastIndex-non-writable.js @@ -0,0 +1,71 @@ +function testGlobalExec() { + var re = /abc.+de/g; + var c = 0; + for (var i = 0; i < 100; i++) { + re.lastIndex = 0; + if (i === 60) { + Object.freeze(re); + } + try { + re.exec("abcXdef"); + } catch (e) { + assertEq(e.toString().includes("lastIndex"), true); + c++; + } + assertEq(re.lastIndex, i >= 60 ? 0 : 6); + } + assertEq(c, 40); +} +testGlobalExec(); + +function testStickyTest() { + var re = /abc.+de/y; + var c = 0; + for (var i = 0; i < 100; i++) { + re.lastIndex = 0; + if (i === 60) { + Object.freeze(re); + } + try { + re.test("abcXdef"); + } catch (e) { + assertEq(e.toString().includes("lastIndex"), true); + c++; + } + assertEq(re.lastIndex, i >= 60 ? 0 : 6); + } + assertEq(c, 40); +} +testStickyTest(); + +// Must not reset too-large .lastIndex to 0 if non-writable. +function testLastIndexOutOfRange() { + var re = /abc.+de/g; + re.lastIndex = 123; + Object.freeze(re); + for (var i = 0; i < 100; i++) { + var ex = null; + try { + re.exec("abcXdef"); + } catch (e) { + ex = e; + } + assertEq(ex.toString().includes("lastIndex"), true); + assertEq(re.lastIndex, 123); + } +} +testLastIndexOutOfRange(); + +// .lastIndex is ignored for non-global/non-sticky regexps. +function testPlainExec() { + var re = /abc.+de/; + re.lastIndex = 1234; + for (var i = 0; i < 100; i++) { + if (i === 60) { + Object.freeze(re); + } + assertEq(re.exec("abcXdef")[0], "abcXde"); + assertEq(re.lastIndex, 1234); + } +} +testPlainExec(); diff --git a/js/src/jit-test/tests/regexp/lastIndex-too-large.js b/js/src/jit-test/tests/regexp/lastIndex-too-large.js new file mode 100644 index 0000000000..3e04042dd0 --- /dev/null +++ b/js/src/jit-test/tests/regexp/lastIndex-too-large.js @@ -0,0 +1,13 @@ +function test() { + var re = /abc.+de/y; + for (var i = 0; i < 100; i++) { + re.lastIndex = 10; + assertEq(re.exec("abcXdef"), null); + assertEq(re.lastIndex, 0); + + re.lastIndex = 10; + assertEq(re.test("abcXdef"), false); + assertEq(re.lastIndex, 0); + } +} +test(); diff --git a/js/src/jit-test/tests/regexp/lastIndex-valueOf.js b/js/src/jit-test/tests/regexp/lastIndex-valueOf.js new file mode 100644 index 0000000000..3794d20c2e --- /dev/null +++ b/js/src/jit-test/tests/regexp/lastIndex-valueOf.js @@ -0,0 +1,16 @@ +function test() { + var re = /abc.+de/g; + var c = 0; + var weird = {valueOf() { c++; return 0; }}; + for (var i = 0; i < 100; i++) { + re.lastIndex = (i > 60) ? weird : 0; + assertEq(typeof re.exec("abcXdef"), "object"); + assertEq(re.lastIndex, 6); + + re.lastIndex = (i > 60) ? weird : 0; + assertEq(re.test("abcXdef"), true); + assertEq(re.lastIndex, 6); + } + assertEq(c, 78); +} +test(); diff --git a/js/src/jit-test/tests/regexp/match-indices-dictionary.js b/js/src/jit-test/tests/regexp/match-indices-dictionary.js new file mode 100644 index 0000000000..14b7fd0630 --- /dev/null +++ b/js/src/jit-test/tests/regexp/match-indices-dictionary.js @@ -0,0 +1,24 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") +var s = ""; +var input = ""; +for (var i = 0; i < 500; ++i) { + s += "(?a)"; + s += "(?b)?"; + input += "a"; +} + +try { + var r = RegExp(s, "d"); + var e = r.exec(input); + + for (var i = 0; i < 500; i++) { + assertEq(e.groups["a" + i], "a"); + assertEq(e.groups["b" + i], undefined); + + assertEq(e.indices.groups["a" + i][0], i) + assertEq(e.indices.groups["a" + i][1], i + 1) + assertEq(e.indices.groups["b" + i], undefined) + } +} catch (err) { + assertEq(err.message, "too much recursion"); +} diff --git a/js/src/jit-test/tests/regexp/match-indices-warp.js b/js/src/jit-test/tests/regexp/match-indices-warp.js new file mode 100644 index 0000000000..634d368aee --- /dev/null +++ b/js/src/jit-test/tests/regexp/match-indices-warp.js @@ -0,0 +1,8 @@ +var re = /A*(B)A*/d; +for (var i = 0; i < 100; i++) { + var match = re.exec("xxxxxAAABAxxxxx"); + assertEq(match.indices[0][0], 5); + assertEq(match.indices[0][1], 10); + assertEq(match.indices[1][0], 8); + assertEq(match.indices[1][1], 9); +} diff --git a/js/src/jit-test/tests/regexp/match-stub-realms.js b/js/src/jit-test/tests/regexp/match-stub-realms.js new file mode 100644 index 0000000000..9cf082f015 --- /dev/null +++ b/js/src/jit-test/tests/regexp/match-stub-realms.js @@ -0,0 +1,19 @@ +// Ensure regexp match stub uses the correct realm for the match object and +// the regexp statics. +function test() { + var g1 = newGlobal({sameCompartmentAs: this}); + var g2 = newGlobal({sameCompartmentAs: this}); + g1.evaluate("function match(s) { return /(.)([\\d]+)/.exec(s); }"); + g2.evaluate("function match(s) { return /(.)([\\d]+)/.exec(s); }"); + for (var i = 0; i < 25; i++) { + var res1 = g1.match(`A${i}`); + var res2 = g2.match(`B${i}`); + assertEq(objectGlobal(res1), g1); + assertEq(objectGlobal(res2), g2); + assertEq(g1.RegExp.$1, "A"); + assertEq(g1.RegExp.$2, String(i)); + assertEq(g2.RegExp.$1, "B"); + assertEq(g2.RegExp.$2, String(i)); + } +} +test(); diff --git a/js/src/jit-test/tests/regexp/named-capture-proxy.js b/js/src/jit-test/tests/regexp/named-capture-proxy.js new file mode 100644 index 0000000000..e7cc933850 --- /dev/null +++ b/js/src/jit-test/tests/regexp/named-capture-proxy.js @@ -0,0 +1,21 @@ +var access_log = ""; +const handler = { + get: function(obj, prop) { + access_log += prop + ","; + return prop in obj ? obj[prop] : ""; + } +}; + +class ProxiedGroupRegExp extends RegExp { + exec(s) { + var result = super.exec(s); + if (result) { + result.groups = new Proxy(result.groups, handler); + } + return result; + } +} + +let re = new ProxiedGroupRegExp("(?.)"); +assertEq("a".replace(re, "$ $"), "a "); +assertEq(access_log, "x,y,") diff --git a/js/src/jit-test/tests/regexp/negated-set-expression.js b/js/src/jit-test/tests/regexp/negated-set-expression.js new file mode 100644 index 0000000000..70be08f680 --- /dev/null +++ b/js/src/jit-test/tests/regexp/negated-set-expression.js @@ -0,0 +1 @@ +assertEq("ab".match(/^(?:a[^a])+$/v)[0], "ab"); diff --git a/js/src/jit-test/tests/regexp/non-unicode-case-folding-backreference.js b/js/src/jit-test/tests/regexp/non-unicode-case-folding-backreference.js new file mode 100644 index 0000000000..bfea5f89a9 --- /dev/null +++ b/js/src/jit-test/tests/regexp/non-unicode-case-folding-backreference.js @@ -0,0 +1,67 @@ +// |jit-test| skip-if: typeof Intl === 'undefined' + +// See https://tc39.es/ecma262/#sec-runtime-semantics-canonicalize-ch +function Canonicalize(ch) { + var u = ch.toUpperCase(); + if (u.length > 1) return ch; + var cu = u.charCodeAt(0); + if (ch.charCodeAt(0) >= 128 && cu < 128) return ch; + return cu; +} + +function TestEquivalenceClass(eclass) { + var backref = /(.)\1/i; + + for (var i = 0; i < eclass.length; i++) { + for (var j = 0; j < eclass.length; j++) { + if (i == j) continue; + var c1 = eclass[i]; + var c2 = eclass[j]; + var cc = c1 + c2; + var shouldMatch = Canonicalize(c1) === Canonicalize(c2); + + assertEq(backref.test(cc), shouldMatch); + } + } +} + +function TestAll() { + for (var eclass of equivalence_classes) { + TestEquivalenceClass(eclass); + } +} + +// Interesting case-folding equivalence classes (as determined by +// ICU's UnicodeSet::closeOver). A class is interesting if it contains +// more than two characters, or if it contains any characters in +// IgnoreSet or SpecialAddSet as defined in new-regexp/special-case.h. +var equivalence_classes = [ + '\u0041\u0061', // Aa (sanity check) + '\u004b\u006b\u212a', // KkK + '\u0053\u0073\u017f', // Ssſ + '\u00b5\u039c\u03bc', // µΜμ + '\u00c5\u00e5\u212b', // ÅåÅ + '\u00df\u1e9e', // ßẞ + '\u03a9\u03c9\u2126', // ΩωΩ + '\u0390\u1fd3', // ΐΐ + '\u0398\u03b8\u03d1\u03f4', // Θθϑϴ + '\u03b0\u1fe3', // ΰΰ + '\u1f80\u1f88', // ᾀᾈ + '\u1fb3\u1fbc', // ᾳᾼ + '\u1fc3\u1fcc', // ῃῌ + '\u1ff3\u1ffc', // ῳῼ + '\ufb05\ufb06', // ſtst + + // Everything below this line is a well-behaved case-folding + // equivalence class with more than two characters but only one + // canonical case-folded character + '\u01c4\u01c5\u01c6', '\u01c7\u01c8\u01c9', '\u01ca\u01cb\u01cc', + '\u01f1\u01f2\u01f3', '\u0345\u0399\u03b9\u1fbe', '\u0392\u03b2\u03d0', + '\u0395\u03b5\u03f5', '\u039a\u03ba\u03f0', '\u03a0\u03c0\u03d6', + '\u03a1\u03c1\u03f1', '\u03a3\u03c2\u03c3', '\u03a6\u03c6\u03d5', + '\u0412\u0432\u1c80', '\u0414\u0434\u1c81', '\u041e\u043e\u1c82', + '\u0421\u0441\u1c83', '\u0422\u0442\u1c84\u1c85', '\u042a\u044a\u1c86', + '\u0462\u0463\u1c87', '\u1c88\ua64a\ua64b', '\u1e60\u1e61\u1e9b' +]; + +TestAll(); diff --git a/js/src/jit-test/tests/regexp/non-unicode-case-folding.js b/js/src/jit-test/tests/regexp/non-unicode-case-folding.js new file mode 100644 index 0000000000..52a799238e --- /dev/null +++ b/js/src/jit-test/tests/regexp/non-unicode-case-folding.js @@ -0,0 +1,68 @@ +// |jit-test| skip-if: typeof Intl === 'undefined' + +// See https://tc39.es/ecma262/#sec-runtime-semantics-canonicalize-ch +function Canonicalize(ch) { + var u = ch.toUpperCase(); + if (u.length > 1) return ch; + var cu = u.charCodeAt(0); + if (ch.charCodeAt(0) >= 128 && cu < 128) return ch; + return cu; +} + +function TestEquivalenceClass(eclass) { + for (var i = 0; i < eclass.length; i++) { + for (var j = 0; j < eclass.length; j++) { + if (i == j) continue; + var c1 = eclass[i]; + var c2 = eclass[j]; + var shouldMatch = Canonicalize(c1) === Canonicalize(c2); + + var re1 = new RegExp(c1, 'i'); + var re2 = new RegExp('[' + c1 + ']', 'i'); + + assertEq(re1.test(c2), shouldMatch); + assertEq(re2.test(c2), shouldMatch); + } + } +} + +function TestAll() { + for (var eclass of equivalence_classes) { + TestEquivalenceClass(eclass); + } +} + +// Interesting case-folding equivalence classes (as determined by +// ICU's UnicodeSet::closeOver). A class is interesting if it contains +// more than two characters, or if it contains any characters in +// IgnoreSet or SpecialAddSet as defined in new-regexp/special-case.h. +var equivalence_classes = [ + '\u0041\u0061', // Aa (sanity check) + '\u004b\u006b\u212a', // KkK + '\u0053\u0073\u017f', // Ssſ + '\u00b5\u039c\u03bc', // µΜμ + '\u00c5\u00e5\u212b', // ÅåÅ + '\u00df\u1e9e', // ßẞ + '\u03a9\u03c9\u2126', // ΩωΩ + '\u0390\u1fd3', // ΐΐ + '\u0398\u03b8\u03d1\u03f4', // Θθϑϴ + '\u03b0\u1fe3', // ΰΰ + '\u1f80\u1f88', // ᾀᾈ + '\u1fb3\u1fbc', // ᾳᾼ + '\u1fc3\u1fcc', // ῃῌ + '\u1ff3\u1ffc', // ῳῼ + '\ufb05\ufb06', // ſtst + + // Everything below this line is a well-behaved case-folding + // equivalence class with more than two characters but only one + // canonical case-folded character + '\u01c4\u01c5\u01c6', '\u01c7\u01c8\u01c9', '\u01ca\u01cb\u01cc', + '\u01f1\u01f2\u01f3', '\u0345\u0399\u03b9\u1fbe', '\u0392\u03b2\u03d0', + '\u0395\u03b5\u03f5', '\u039a\u03ba\u03f0', '\u03a0\u03c0\u03d6', + '\u03a1\u03c1\u03f1', '\u03a3\u03c2\u03c3', '\u03a6\u03c6\u03d5', + '\u0412\u0432\u1c80', '\u0414\u0434\u1c81', '\u041e\u043e\u1c82', + '\u0421\u0441\u1c83', '\u0422\u0442\u1c84\u1c85', '\u042a\u044a\u1c86', + '\u0462\u0463\u1c87', '\u1c88\ua64a\ua64b', '\u1e60\u1e61\u1e9b' +]; + +TestAll(); diff --git a/js/src/jit-test/tests/regexp/replace-exec.js b/js/src/jit-test/tests/regexp/replace-exec.js new file mode 100644 index 0000000000..b6488ec678 --- /dev/null +++ b/js/src/jit-test/tests/regexp/replace-exec.js @@ -0,0 +1,12 @@ +function test() { + var re = /abc.+de/; + var c = 0; + for (var i = 0; i < 100; i++) { + assertEq(re.test("abcXdef"), true); + if (i === 60) { + RegExp.prototype.exec = () => { c++; return {}; }; + } + } + assertEq(c, 39); +} +test(); diff --git a/js/src/jit-test/tests/regexp/replace-global-lambda.js b/js/src/jit-test/tests/regexp/replace-global-lambda.js new file mode 100644 index 0000000000..ca102c8d62 --- /dev/null +++ b/js/src/jit-test/tests/regexp/replace-global-lambda.js @@ -0,0 +1,56 @@ +"use strict"; + +function testNoCaptureGroups() { + var s = "a..bb.cba."; + for (var i = 0; i < 20; i++) { + var log = ""; + var res = s.replace(/a|b/g, function(...args) { + assertEq(this, undefined); + assertEq(args.length, 3); + assertEq(args[2], s); + log += "(" + args[0] + args[1] + ")"; + return "X"; + }); + assertEq(res, "X..XX.cXX."); + assertEq(log, "(a0)(b3)(b4)(b7)(a8)"); + } +} +testNoCaptureGroups(); + +function testCaptureGroups() { + var s = "a..bb.cba."; + for (var i = 0; i < 20; i++) { + var log = ""; + var res = s.replace(/(a)|(b)/g, function(...args) { + assertEq(this, undefined); + assertEq(args.length, 5); + assertEq(args[4], s); + log += "(" + args[0] + args[1] + args[2] + args[3] + ")"; + return "X"; + }); + assertEq(res, "X..XX.cXX."); + assertEq(log, "(aaundefined0)(bundefinedb3)(bundefinedb4)(bundefinedb7)(aaundefined8)"); + } +} +testCaptureGroups(); + +// Calling RegExp#compile in the callback has no effect, because |replace| will +// create a new RegExp object from the original source/flags if this happens. +function testCaptureGroupsChanging() { + var s = "a..bb.cba."; + for (var i = 0; i < 20; i++) { + var log = ""; + var re = /a|b/g; + var res = s.replace(re, function(...args) { + assertEq(this, undefined); + assertEq(args.length, 3); + assertEq(args[2], s); + log += "(" + args[0] + args[1] + ")"; + re.compile("(a)|(b)", "g"); + return "X"; + }); + assertEq(res, "X..XX.cXX."); + assertEq(log, "(a0)(b3)(b4)(b7)(a8)"); + } +} +testCaptureGroupsChanging(); diff --git a/js/src/jit-test/tests/regexp/rope-inputs.js b/js/src/jit-test/tests/regexp/rope-inputs.js new file mode 100644 index 0000000000..ca10fa3a4f --- /dev/null +++ b/js/src/jit-test/tests/regexp/rope-inputs.js @@ -0,0 +1,10 @@ +function test() { + var re = /abc(.+)z/; + for (var i = 0; i < 100; i++) { + assertEq(re.exec(newRope("abcdefghijklmnopqrstuvw", "xyz"))[1], "defghijklmnopqrstuvwxy"); + assertEq(re.test(newRope("abcdefghijklmnopqrstuvw", "xyz")), true); + assertEq(re[Symbol.search](newRope(".abcdefghijklmnopqrstuvw", "xyz")), 1); + assertEq(re[Symbol.match](newRope("abcdefghijklmnopqrstuvw", "xyz"))[1], "defghijklmnopqrstuvwxy"); + } +} +test(); diff --git a/js/src/jit-test/tests/regexp/unicode-back-reference.js b/js/src/jit-test/tests/regexp/unicode-back-reference.js new file mode 100644 index 0000000000..90eef410a5 --- /dev/null +++ b/js/src/jit-test/tests/regexp/unicode-back-reference.js @@ -0,0 +1,3 @@ +for (var t = 0; t < 10000; t++) { + (t + "\u1234").split(/(.)\1/i); +} diff --git a/js/src/jit-test/tests/resist-fingerprinting/locale.js b/js/src/jit-test/tests/resist-fingerprinting/locale.js new file mode 100644 index 0000000000..6c15ca88ae --- /dev/null +++ b/js/src/jit-test/tests/resist-fingerprinting/locale.js @@ -0,0 +1,19 @@ +// |jit-test| skip-if: typeof Intl === 'undefined' + +function test(locale, timeZone) { + let global = newGlobal({locale, forceUTC: true}); + + const constructors = ["Collator", "DateTimeFormat", "ListFormat", + "NumberFormat", "PluralRules", "RelativeTimeFormat"]; + for (const constructor of constructors) { + let intl = new global.Intl[constructor]; + assertEq(intl.resolvedOptions().locale, locale); + } + + const date = new global.Date(2012, 0, 10); + let tzRE = /\(([^\)]+)\)/; + assertEq(tzRE.exec(date)[1], timeZone) +} + +test("de-CH", "Koordinierte Weltzeit"); +test("en", "Coordinated Universal Time"); diff --git a/js/src/jit-test/tests/resist-fingerprinting/math-fdlibm-sincostan-asm.js b/js/src/jit-test/tests/resist-fingerprinting/math-fdlibm-sincostan-asm.js new file mode 100644 index 0000000000..e95b807117 --- /dev/null +++ b/js/src/jit-test/tests/resist-fingerprinting/math-fdlibm-sincostan-asm.js @@ -0,0 +1,56 @@ +// |jit-test| skip-if: !isAsmJSCompilationAvailable() + +load(libdir + "asm.js"); + +var g = newGlobal({alwaysUseFdlibm: true}) + +var code = (fun) => { + return `(function asm(glob) { + "use asm"; + var sq=glob.Math.${fun}; function f(d) { d=+d; return +sq(d) } return f; + })`; +} + +// Linking RFP asm.js with non-RFP Math.sin. +let asmSin = g.eval(code("sin")); +assertAsmLinkFail(asmSin, {Math: {sin: Math.sin}}); + +// Linking RFP asm.js with RFP Math.sin +const sin = asmLink(asmSin, {Math: {sin: g.Math.sin}}); +assertEq(sin(35*Math.LN2 ), -0.765996413898051); +assertEq(sin(110*Math.LOG2E), 0.9989410140273757); +assertEq(sin(7*Math.LOG10E ), 0.10135692924965616); + +// Linking non-RFP asm.js with RFP Math.sin +asmSin = eval(code("sin")) +assertAsmLinkFail(asmSin, {Math: {sin: g.Math.sin}}); + +// Linking non-RFP asm.js with non-RFP Math.sin (the "normal case") +asmLink(asmSin, {Math: {sin: Math.sin}}); + +// Testing cos +let asmCos = g.eval(code("cos")); +assertAsmLinkFail(asmCos, {Math: {cos: Math.cos}}); +const cos = asmLink(asmCos, {Math: {cos: g.Math.cos}}); +assertEq(cos(1e130 ), -0.767224894221913); +assertEq(cos(1e272 ), -0.7415825695514536); +assertEq(cos(1e284 ), 0.7086865671674247); +assertEq(cos(1e75 ), -0.7482651726250321); +assertEq(cos(57*Math.E ), -0.536911695749024); +assertEq(cos(21*Math.LN2 ), -0.4067775970251724); +assertEq(cos(51*Math.LN2 ), -0.7017203400855446); +assertEq(cos(21*Math.SQRT1_2), -0.6534063185820198); +assertEq(cos(17*Math.LOG10E ), 0.4537557425982784); +assertEq(cos(2*Math.LOG10E ), 0.6459044007438142); + +// Testing tan +let asmTan = g.eval(code("tan")); +assertAsmLinkFail(asmTan, {Math: {tan: Math.tan}}); +const tan = asmLink(asmTan, {Math: {tan: g.Math.tan}}); +assertEq(tan(1e140 ), 0.7879079967710036); +assertEq(tan(6*Math.E ), 0.6866761546452431); +assertEq(tan(6*Math.LN2 ), 1.6182817135715877); +assertEq(tan(10*Math.LOG2E ), -3.3537128705376014); +assertEq(tan(17*Math.SQRT2 ), -1.9222955461799982); +assertEq(tan(34*Math.SQRT1_2), -1.9222955461799982); +assertEq(tan(10*Math.LOG10E ), 2.5824856130712432); diff --git a/js/src/jit-test/tests/resist-fingerprinting/math-fdlibm-sincostan.js b/js/src/jit-test/tests/resist-fingerprinting/math-fdlibm-sincostan.js new file mode 100644 index 0000000000..0fe5445e79 --- /dev/null +++ b/js/src/jit-test/tests/resist-fingerprinting/math-fdlibm-sincostan.js @@ -0,0 +1,88 @@ +let g = newGlobal({alwaysUseFdlibm: true}); + +// Adapted from https://github.com/arkenfox/TZP/blob/master/tests/math.html +// Tests all values that differed from libm for me on Linux and Windows. + +function test() { + for (var i = 0; i < 100; i++) { + assertEq(g.Math.cos(1e130 ), -0.767224894221913); + assertEq(g.Math.cos(1e272 ), -0.7415825695514536); + assertEq(g.Math.cos(1e284 ), 0.7086865671674247); + assertEq(g.Math.cos(1e75 ), -0.7482651726250321); + assertEq(g.Math.cos(57*Math.E ), -0.536911695749024); + assertEq(g.Math.cos(21*Math.LN2 ), -0.4067775970251724); + assertEq(g.Math.cos(51*Math.LN2 ), -0.7017203400855446); + assertEq(g.Math.cos(21*Math.SQRT1_2), -0.6534063185820198); + assertEq(g.Math.cos(17*Math.LOG10E ), 0.4537557425982784); + assertEq(g.Math.cos(2*Math.LOG10E ), 0.6459044007438142); + + assertEq(g.Math.sin(35*Math.LN2 ), -0.765996413898051); + assertEq(g.Math.sin(110*Math.LOG2E ), 0.9989410140273757); + assertEq(g.Math.sin(7*Math.LOG10E ), 0.10135692924965616); + + assertEq(g.Math.tan(1e140 ), 0.7879079967710036); + assertEq(g.Math.tan(6*Math.E ), 0.6866761546452431); + assertEq(g.Math.tan(6*Math.LN2 ), 1.6182817135715877); + assertEq(g.Math.tan(10*Math.LOG2E ), -3.3537128705376014); + assertEq(g.Math.tan(17*Math.SQRT2 ), -1.9222955461799982); + assertEq(g.Math.tan(34*Math.SQRT1_2), -1.9222955461799982); + assertEq(g.Math.tan(10*Math.LOG10E ), 2.5824856130712432); + } +} + +/* +cos + 3: 1e130 : -0.767224894221913 , + 4: 1e272 : -0.7415825695514536, + 6: 1e284 : 0.7086865671674247, + 7: 1e75 : -0.7482651726250321, + 13: 57*Math.E : -0.536911695749024, + 14: 21*Math.LN2 : -0.4067775970251724, + 15: 51*Math.LN2 : -0.7017203400855446, + 19: 21*Math.SQRT1_2 : -0.6534063185820198, + 20: 17*Math.LOG10E : 0.4537557425982784, + 21: 2*Math.LOG10E : 0.6459044007438142, + + +sin + 11: : -0.765996413898051, + 12: : 0.9989410140273757, + 13: : 0.10135692924965616, + +tan + 1: 1e140 : 0.7879079967710036, + 10: 6*Math.E : 0.6866761546452431, + 11: 6*Math.LN2 : 1.6182817135715877, + 12: 10*Math.LOG2E : -3.3537128705376014, + 13: 17*Math.SQRT2 : -1.9222955461799982, + 14: 34*Math.SQRT1_2 : -1.9222955461799982, + 15: 10*Math.LOG10E : 2.5824856130712432, +*/ + +test(); + +// Test if the test is still useful, or if all results match without +// fingerprinting resistance as well. +if (!getBuildConfiguration("android") && + Math.cos(1e130 ) == -0.767224894221913 && + Math.cos(1e272 ) == -0.7415825695514536 && + Math.cos(1e284 ) == 0.7086865671674247 && + Math.cos(1e75 ) == -0.7482651726250321 && + Math.cos(57*Math.E ) == -0.536911695749024 && + Math.cos(21*Math.LN2 ) == -0.4067775970251724 && + Math.cos(51*Math.LN2 ) == -0.7017203400855446 && + Math.cos(21*Math.SQRT1_2) == -0.6534063185820198 && + Math.cos(17*Math.LOG10E ) == 0.4537557425982784 && + Math.cos(2*Math.LOG10E ) == 0.6459044007438142 && + Math.sin(35*Math.LN2 ) == -0.765996413898051 && + Math.sin(110*Math.LOG2E ) == 0.9989410140273757 && + Math.sin(7*Math.LOG10E ) == 0.10135692924965616 && + Math.tan(1e140 ) == 0.7879079967710036 && + Math.tan(6*Math.E ) == 0.6866761546452431 && + Math.tan(6*Math.LN2 ) == 1.6182817135715877 && + Math.tan(10*Math.LOG2E ) == -3.3537128705376014 && + Math.tan(17*Math.SQRT2 ) == -1.9222955461799982 && + Math.tan(34*Math.SQRT1_2) == -1.9222955461799982 && + Math.tan(10*Math.LOG10E ) == 2.5824856130712432) { + assertEq(false, true); +} diff --git a/js/src/jit-test/tests/resist-fingerprinting/timezone.js b/js/src/jit-test/tests/resist-fingerprinting/timezone.js new file mode 100644 index 0000000000..06aa089965 --- /dev/null +++ b/js/src/jit-test/tests/resist-fingerprinting/timezone.js @@ -0,0 +1,33 @@ +// |jit-test| tz-pacific; skip-if: typeof Intl === 'undefined' + +let tzRE = /\(([^\)]+)\)/; + +// Make sure we aren't already running with UTC +let original = new Date(0); +assertEq(tzRE.exec(original.toString())[1], "Pacific Standard Time"); + +let originalDT = Intl.DateTimeFormat("en-US", { + dateStyle: "full", + timeStyle: "full", +}); +assertEq(originalDT.format(original).endsWith("Pacific Standard Time"), true); +assertEq(originalDT.resolvedOptions().timeZone, "PST8PDT"); + +let global = newGlobal({forceUTC: true}); + +let date = new global.Date(); +assertEq(tzRE.exec(date.toString())[1], "Coordinated Universal Time"); +assertEq(tzRE.exec(date.toTimeString())[1], "Coordinated Universal Time"); +assertEq(date.getFullYear(), date.getUTCFullYear()); +assertEq(date.getMonth(), date.getUTCMonth()); +assertEq(date.getDate(), date.getUTCDate()); +assertEq(date.getDay(), date.getUTCDay()); +assertEq(date.getHours(),date.getUTCHours()); +assertEq(date.getTimezoneOffset(), 0); + +let dt = global.Intl.DateTimeFormat("en-US", { + dateStyle: "full", + timeStyle: "full", +}); +assertEq(dt.format(date).endsWith("Coordinated Universal Time"), true); +assertEq(dt.resolvedOptions().timeZone, "UTC"); diff --git a/js/src/jit-test/tests/saved-stacks/1438121-async-function.js b/js/src/jit-test/tests/saved-stacks/1438121-async-function.js new file mode 100644 index 0000000000..87fc9bab0a --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/1438121-async-function.js @@ -0,0 +1,119 @@ +const mainGlobal = this; +const debuggerGlobal = newGlobal({newCompartment: true}); + +function Memory({global}) { + this.dbg = new (debuggerGlobal.Debugger); + this.gDO = this.dbg.addDebuggee(global); +} + +Memory.prototype = { + constructor: Memory, + attach() { return Promise.resolve('fake attach result'); }, + detach() { return Promise.resolve('fake detach result'); }, + startRecordingAllocations() { + this.dbg.memory.trackingAllocationSites = true; + return Promise.resolve('fake startRecordingAllocations result'); + }, + stopRecordingAllocations() { + this.dbg.memory.trackingAllocationSites = false; + return Promise.resolve('fake stopRecordingAllocations result'); + }, + getAllocations() { + return Promise.resolve({ allocations: this.dbg.memory.drainAllocationsLog() }); + } +}; + +function ok(cond, msg) { + assertEq(!!cond, true, `ok(${JSON.stringify(cond)}, ${JSON.stringify(msg)})`); +} + +const is = assertEq; + +function startServerAndGetSelectedTabMemory() { + let memory = new Memory({ global: mainGlobal }); + return Promise.resolve({ memory, client: 'fake client' }); +} + +function destroyServerAndFinish() { + return Promise.resolve('fake destroyServerAndFinish result'); +} + +(async function body() { + let { memory, client } = await startServerAndGetSelectedTabMemory(); + await memory.attach(); + + await memory.startRecordingAllocations(); + ok(true, "Can start recording allocations"); + + // Allocate some objects. + + let alloc1, alloc2, alloc3; + + /* eslint-disable max-nested-callbacks */ + (function outer() { + (function middle() { + (function inner() { + alloc1 = {}; alloc1.line = Error().lineNumber; + alloc2 = []; alloc2.line = Error().lineNumber; + // eslint-disable-next-line new-parens + alloc3 = new function () {}; alloc3.line = Error().lineNumber; + }()); + }()); + }()); + /* eslint-enable max-nested-callbacks */ + + let response = await memory.getAllocations(); + + await memory.stopRecordingAllocations(); + ok(true, "Can stop recording allocations"); + + // Filter out allocations by library and test code, and get only the + // allocations that occurred in our test case above. + + function isTestAllocation(alloc) { + let frame = alloc.frame; + return frame + && frame.functionDisplayName === "inner" + && (frame.line === alloc1.line + || frame.line === alloc2.line + || frame.line === alloc3.line); + } + + let testAllocations = response.allocations.filter(isTestAllocation); + ok(testAllocations.length >= 3, + "Should find our 3 test allocations (plus some allocations for the error " + + "objects used to get line numbers)"); + + // For each of the test case's allocations, ensure that the parent frame + // indices are correct. Also test that we did get an allocation at each + // line we expected (rather than a bunch on the first line and none on the + // others, etc). + + let expectedLines = new Set([alloc1.line, alloc2.line, alloc3.line]); + + for (let alloc of testAllocations) { + let innerFrame = alloc.frame; + ok(innerFrame, "Should get the inner frame"); + is(innerFrame.functionDisplayName, "inner"); + expectedLines.delete(innerFrame.line); + + let middleFrame = innerFrame.parent; + ok(middleFrame, "Should get the middle frame"); + is(middleFrame.functionDisplayName, "middle"); + + let outerFrame = middleFrame.parent; + ok(outerFrame, "Should get the outer frame"); + is(outerFrame.functionDisplayName, "outer"); + + // Not going to test the rest of the frames because they are Task.jsm + // and promise frames and it gets gross. Plus, I wouldn't want this test + // to start failing if they changed their implementations in a way that + // added or removed stack frames here. + } + + is(expectedLines.size, 0, + "Should have found all the expected lines"); + + await memory.detach(); + destroyServerAndFinish(client); +})().catch(e => { print("Error: " + e + "\nstack:\n" + e.stack); quit(1); }); diff --git a/js/src/jit-test/tests/saved-stacks/1438121-generator.js b/js/src/jit-test/tests/saved-stacks/1438121-generator.js new file mode 100644 index 0000000000..4e3a88122c --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/1438121-generator.js @@ -0,0 +1,131 @@ +const mainGlobal = this; +const debuggerGlobal = newGlobal({newCompartment: true}); + +function Memory({global}) { + this.dbg = new (debuggerGlobal.Debugger); + this.gDO = this.dbg.addDebuggee(global); +} + +Memory.prototype = { + constructor: Memory, + attach() { return Promise.resolve('fake attach result'); }, + detach() { return Promise.resolve('fake detach result'); }, + startRecordingAllocations() { + this.dbg.memory.trackingAllocationSites = true; + return Promise.resolve('fake startRecordingAllocations result'); + }, + stopRecordingAllocations() { + this.dbg.memory.trackingAllocationSites = false; + return Promise.resolve('fake stopRecordingAllocations result'); + }, + getAllocations() { + return Promise.resolve({ allocations: this.dbg.memory.drainAllocationsLog() }); + } +}; + +function ok(cond, msg) { + assertEq(!!cond, true, `ok(${JSON.stringify(cond)}, ${JSON.stringify(msg)})`); +} + +const is = assertEq; + +function startServerAndGetSelectedTabMemory() { + let memory = new Memory({ global: mainGlobal }); + return Promise.resolve({ memory, client: 'fake client' }); +} + +function destroyServerAndFinish() { + return Promise.resolve('fake destroyServerAndFinish result'); +} + +function* body() { + let { memory, client } = yield startServerAndGetSelectedTabMemory(); + yield memory.attach(); + + yield memory.startRecordingAllocations(); + ok(true, "Can start recording allocations"); + + // Allocate some objects. + + let alloc1, alloc2, alloc3; + + /* eslint-disable max-nested-callbacks */ + (function outer() { + (function middle() { + (function inner() { + alloc1 = {}; alloc1.line = Error().lineNumber; + alloc2 = []; alloc2.line = Error().lineNumber; + // eslint-disable-next-line new-parens + alloc3 = new function () {}; alloc3.line = Error().lineNumber; + }()); + }()); + }()); + /* eslint-enable max-nested-callbacks */ + + let response = yield memory.getAllocations(); + + yield memory.stopRecordingAllocations(); + ok(true, "Can stop recording allocations"); + + // Filter out allocations by library and test code, and get only the + // allocations that occurred in our test case above. + + function isTestAllocation(alloc) { + let frame = alloc.frame; + return frame + && frame.functionDisplayName === "inner" + && (frame.line === alloc1.line + || frame.line === alloc2.line + || frame.line === alloc3.line); + } + + let testAllocations = response.allocations.filter(isTestAllocation); + ok(testAllocations.length >= 3, + "Should find our 3 test allocations (plus some allocations for the error " + + "objects used to get line numbers)"); + + // For each of the test case's allocations, ensure that the parent frame + // indices are correct. Also test that we did get an allocation at each + // line we expected (rather than a bunch on the first line and none on the + // others, etc). + + let expectedLines = new Set([alloc1.line, alloc2.line, alloc3.line]); + + for (let alloc of testAllocations) { + let innerFrame = alloc.frame; + ok(innerFrame, "Should get the inner frame"); + is(innerFrame.functionDisplayName, "inner"); + expectedLines.delete(innerFrame.line); + + let middleFrame = innerFrame.parent; + ok(middleFrame, "Should get the middle frame"); + is(middleFrame.functionDisplayName, "middle"); + + let outerFrame = middleFrame.parent; + ok(outerFrame, "Should get the outer frame"); + is(outerFrame.functionDisplayName, "outer"); + + // Not going to test the rest of the frames because they are Task.jsm + // and promise frames and it gets gross. Plus, I wouldn't want this test + // to start failing if they changed their implementations in a way that + // added or removed stack frames here. + } + + is(expectedLines.size, 0, + "Should have found all the expected lines"); + + yield memory.detach(); + destroyServerAndFinish(client); +} + +const generator = body(); +loop(generator.next()); + +function loop({ value: promise, done }) { + if (done) + return; + promise + .catch(e => loop(generator.throw(e))) + .then(v => { loop(generator.next(v)); }) + .catch(e => { print(`Error: ${e}\nstack:\n${e.stack}`); }); +} diff --git a/js/src/jit-test/tests/saved-stacks/SavedFrame-constructor.js b/js/src/jit-test/tests/saved-stacks/SavedFrame-constructor.js new file mode 100644 index 0000000000..0dbafea986 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/SavedFrame-constructor.js @@ -0,0 +1,4 @@ +// The SavedFrame constructor shouldn't have been exposed to JS on the global. + +saveStack(); +assertEq(typeof SavedFrame, "undefined"); diff --git a/js/src/jit-test/tests/saved-stacks/asm-frames.js b/js/src/jit-test/tests/saved-stacks/asm-frames.js new file mode 100644 index 0000000000..3667122532 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/asm-frames.js @@ -0,0 +1,37 @@ +function AsmModule(stdlib, foreign, heap) { + "use asm"; + var ffi = foreign.t; + + function doTest() { + ffi(); + } + + function test() { + doTest(); + } + + return { test: test }; +} + +let stack; + +function tester() { + stack = saveStack(); +} + +const buf = new ArrayBuffer(1024*8); +const module = AsmModule(this, { t: tester }, buf); +module.test(); + +print(stack); +assertEq(stack.functionDisplayName, "tester"); + +assertEq(stack.parent.functionDisplayName, "doTest"); +assertEq(stack.parent.line, 6); + +assertEq(stack.parent.parent.functionDisplayName, "test"); +assertEq(stack.parent.parent.line, 10); + +assertEq(stack.parent.parent.parent.line, 24); + +assertEq(stack.parent.parent.parent.parent, null); diff --git a/js/src/jit-test/tests/saved-stacks/async-implicit.js b/js/src/jit-test/tests/saved-stacks/async-implicit.js new file mode 100644 index 0000000000..d0b9328906 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/async-implicit.js @@ -0,0 +1,52 @@ +// Test AutoSetAsyncStackForNewCalls's IMPLICIT kind. + +// Given a SavedFrame stack, return a string listing the frame's function names +// and their async causes, if any. +function stackFunctions(stack) { + const frames = []; + for (; stack; stack = stack.parent || stack.asyncParent) { + if (!stack.functionDisplayName) { + frames.push('(top level)'); + } else if (stack.asyncCause) { + frames.push(`${stack.asyncCause}*${stack.functionDisplayName}`); + } else { + frames.push(stack.functionDisplayName); + } + } + return frames.join(', '); +} + +let fakeStack = (function fake1() { + function fake2() { + return saveStack(); + } + return fake2(); +})(); + +function bindAndExpect(options, expected) { + function bindee() { + assertEq(stackFunctions(saveStack()), expected); + } + + return bindToAsyncStack(bindee, options); +} + +function caller(f) { + return f(); +} + +// An explicit async stack always overrides the actual callers of the bindee. +// An implicit async stack never overrides callers; it is only attached when +// the stack is otherwise empty. +caller(bindAndExpect({ stack: fakeStack, cause: 'ano', explicit: false }, + "bindee, caller, (top level)")); + +caller(bindAndExpect({ stack: fakeStack, cause: 'hi', explicit: true }, + "bindee, hi*fake2, fake1, (top level)")); + +enqueueJob(bindAndExpect({ stack: fakeStack, cause: 'mita', explicit: false }, + "bindee, mita*fake2, fake1, (top level)")); + +enqueueJob(bindAndExpect({ stack: fakeStack, cause: 'hana', explicit: true }, + "bindee, hana*fake2, fake1, (top level)")); + diff --git a/js/src/jit-test/tests/saved-stacks/async-livecache.js b/js/src/jit-test/tests/saved-stacks/async-livecache.js new file mode 100644 index 0000000000..1034b5fc49 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/async-livecache.js @@ -0,0 +1,43 @@ +// Async stacks should not supplant LiveSavedFrameCache hits. + +top(); + +// An ordinary function, to give the frame a convenient name. +function top() { + // Perform an async call. F will run in an activation that has an async stack + // supplied. + f().catch(catchError); +} + +async function f() { + // Perform an ordinary call. Its parent frame will be a LiveSavedFrameCache + // hit. + g(); +} + +function g() { + // Populate the LiveSavedFrameCache. + saveStack(); + + // Capturing the stack again should find f (if not g) in the cache. The async + // stack supplied below the call to f should not supplant f's own frame. + let frame = saveStack(); + + assertEq(frame.functionDisplayName, 'g'); + assertEq(parent(frame).functionDisplayName, 'f'); + assertEq(parent(parent(frame)).functionDisplayName, 'top'); +} + +// Return the parent of |frame|, skipping self-hosted code and following async +// parent links. +function parent(frame) { + do { + frame = frame.parent || frame.asyncParent; + } while (frame.source.match(/self-hosted/)); + return frame; +} + +function catchError(e) { + print(`${e}\n${e.stack}`); + quit(1) +} diff --git a/js/src/jit-test/tests/saved-stacks/async-max-frame-count.js b/js/src/jit-test/tests/saved-stacks/async-max-frame-count.js new file mode 100644 index 0000000000..bada5b1ac9 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/async-max-frame-count.js @@ -0,0 +1,99 @@ +// Test that async stacks are limited on recursion. + +const defaultAsyncStackLimit = 60; + +function recur(n, limit) { + if (n > 0) { + return callFunctionWithAsyncStack(function recur() {return recur(n - 1, limit)}, + saveStack(limit), "Recurse"); + } + return saveStack(limit); +} + +function checkRecursion(n, limit) { + print("checkRecursion(" + String(n) + ", " + String(limit) + ")"); + + try { + var stack = recur(n, limit); + } catch (e) { + // Some platforms, like ASAN builds, can end up overrecursing. Tolerate + // these failures. + assertEq(/too much recursion/.test("" + e), true); + return; + } + + // Async stacks are limited even if we didn't ask for a limit. There is a + // default limit on frames attached on top of any synchronous frames, and + // every time the limit is reached when capturing, half of the frames are + // truncated from the old end of the async stack. + if (limit == 0) { + // Always add one synchronous frame that is the last call to `recur`. + if (n + 1 < defaultAsyncStackLimit) { + limit = defaultAsyncStackLimit + 1; + } else { + limit = n + 2 - (defaultAsyncStackLimit / 2); + } + } + + // The first `n` or `limit` frames should have `recur` as their `asyncParent`. + for (var i = 0; i < Math.min(n, limit); i++) { + assertEq(stack.functionDisplayName, "recur"); + assertEq(stack.parent, null); + stack = stack.asyncParent; + } + + // This frame should be the first call to `recur`. + if (limit > n) { + assertEq(stack.functionDisplayName, "recur"); + assertEq(stack.asyncParent, null); + stack = stack.parent; + } else { + assertEq(stack, null); + } + + // This frame should be the call to `checkRecursion`. + if (limit > n + 1) { + assertEq(stack.functionDisplayName, "checkRecursion"); + assertEq(stack.asyncParent, null); + stack = stack.parent; + } else { + assertEq(stack, null); + } + + // We should be at the top frame, which is the test script itself. + if (limit > n + 2) { + assertEq(stack.functionDisplayName, null); + assertEq(stack.asyncParent, null); + assertEq(stack.parent, null); + } else { + assertEq(stack, null); + } +} + +// Check capturing with no limit, which should still apply a default limit. +checkRecursion(0, 0); +checkRecursion(1, 0); +checkRecursion(2, 0); +checkRecursion(defaultAsyncStackLimit - 10, 0); +checkRecursion(defaultAsyncStackLimit, 0); +checkRecursion(defaultAsyncStackLimit + 10, 0); + +// Limit of 1 frame. +checkRecursion(0, 1); +checkRecursion(1, 1); +checkRecursion(2, 1); + +// Limit of 2 frames. +checkRecursion(0, 2); +checkRecursion(1, 2); +checkRecursion(2, 2); + +// Limit of 3 frames. +checkRecursion(0, 3); +checkRecursion(1, 3); +checkRecursion(2, 3); + +// Limit higher than the default limit. +checkRecursion(defaultAsyncStackLimit + 10, defaultAsyncStackLimit + 10); +checkRecursion(defaultAsyncStackLimit + 11, defaultAsyncStackLimit + 10); +checkRecursion(defaultAsyncStackLimit + 12, defaultAsyncStackLimit + 10); diff --git a/js/src/jit-test/tests/saved-stacks/async-principals.js b/js/src/jit-test/tests/saved-stacks/async-principals.js new file mode 100644 index 0000000000..4a253057e8 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/async-principals.js @@ -0,0 +1,247 @@ +// Test cases when a SavedFrame or one of its ancestors have a principal that is +// not subsumed by the caller's principal, when async parents are present. + +function checkVisibleStack(stackFrame, expectedFrames) { + // We check toString separately from properties like asyncCause to check that + // it walks the physical SavedFrame chain consistently with the properties. + var stringFrames = stackFrame.toString().split("\n"); + + while (expectedFrames.length) { + let expectedFrame = expectedFrames.shift(); + let stringFrame = stringFrames.shift(); + + // Check the frame properties. + assertEq(stackFrame.functionDisplayName, expectedFrame.name); + assertEq(stackFrame.asyncCause, expectedFrame.asyncCause); + + // Check the stringified version. + let expectedStart = + (expectedFrame.asyncCause ? expectedFrame.asyncCause + "*" : "") + + expectedFrame.name; + assertEq(stringFrame.replace(/@.*$/, ""), expectedStart); + + // If the next frame has an asyncCause, it should be an asyncParent. + if (expectedFrames.length && expectedFrames[0].asyncCause) { + assertEq(stackFrame.parent, null); + stackFrame = stackFrame.asyncParent; + } else { + assertEq(stackFrame.asyncParent, null); + stackFrame = stackFrame.parent; + } + } +} + +var low = newGlobal({ principal: 0 }); +var high = newGlobal({ principal: 0xfffff }); + +// Test with synchronous cross-compartment calls. +// +// With arrows representing child-to-parent links, and fat arrows representing +// child-to-async-parent links, create a SavedFrame stack like this: +// +// low.e -> high.d => high.c => high.b -> low.a +// +// This stack captured in function `e` would be seen in its complete version if +// accessed by `high`'s compartment, while in `low`'s compartment it would look +// like this: +// +// low.e => low.a +// +// The asyncCause seen on `low.a` above should not leak information about the +// real asyncCause on `high.c` and `high.d`. +// +// The stack captured in function `d` would be seen in its complete version if +// accessed by `high`'s compartment, while in `low`'s compartment it would look +// like this: +// +// low.a + +// We'll move these functions into the right globals below before invoking them. +function a() { + b(); +} +function b() { + callFunctionWithAsyncStack(c, saveStack(), "BtoC"); +} +function c() { + callFunctionWithAsyncStack(d, saveStack(), "CtoD"); +} +function d() { + let stackD = saveStack(); + + print("high.checkVisibleStack(stackD)"); + checkVisibleStack(stackD, [ + { name: "d", asyncCause: null }, + { name: "c", asyncCause: "CtoD" }, + { name: "b", asyncCause: "BtoC" }, + { name: "a", asyncCause: null }, + ]); + + let stackE = e(saveStack(0, low)); + + print("high.checkVisibleStack(stackE)"); + checkVisibleStack(stackE, [ + { name: "e", asyncCause: null }, + { name: "d", asyncCause: null }, + { name: "c", asyncCause: "CtoD" }, + { name: "b", asyncCause: "BtoC" }, + { name: "a", asyncCause: null }, + ]); +} +function e(stackD) { + print("low.checkVisibleStack(stackD)"); + checkVisibleStack(stackD, [ + { name: "a", asyncCause: "Async" }, + ]); + + let stackE = saveStack(); + + print("low.checkVisibleStack(stackE)"); + checkVisibleStack(stackE, [ + { name: "e", asyncCause: null }, + { name: "a", asyncCause: "Async" }, + ]); + + return saveStack(0, high); +} + +// Test with asynchronous cross-compartment calls and shared frames. +// +// With arrows representing child-to-parent links, and fat arrows representing +// child-to-async-parent links, create a SavedFrame stack like this: +// +// low.x => high.v => low.u +// low.y -> high.v => low.u +// low.z => high.w -> low.u +// +// This stack captured in functions `x`, `y`, and `z` would be seen in its +// complete version if accessed by `high`'s compartment, while in `low`'s +// compartment it would look like this: +// +// low.x => low.u +// low.y => low.u +// low.z => low.u +// +// The stack captured in function `v` would be seen in its complete version if +// accessed by `high`'s compartment, while in `low`'s compartment it would look +// like this: +// +// low.u + +// We'll move these functions into the right globals below before invoking them. +function u() { + callFunctionWithAsyncStack(v, saveStack(), "UtoV"); + w(); +} +function v() { + let stackV = saveStack(); + print("high.checkVisibleStack(stackV)"); + checkVisibleStack(stackV, [ + { name: "v", asyncCause: null }, + { name: "u", asyncCause: "UtoV" }, + ]); + + let stack = saveStack(0, low); + function xToCall() { return x(stack);}; + + let stackX = callFunctionWithAsyncStack(xToCall, saveStack(), "VtoX"); + + print("high.checkVisibleStack(stackX)"); + checkVisibleStack(stackX, [ + { name: "x", asyncCause: null }, + { name: "xToCall", asyncCause: null }, + { name: "v", asyncCause: "VtoX" }, + { name: "u", asyncCause: "UtoV" }, + ]); + + let stackY = y(); + + print("high.checkVisibleStack(stackY)"); + checkVisibleStack(stackY, [ + { name: "y", asyncCause: null }, + { name: "v", asyncCause: null }, + { name: "u", asyncCause: "UtoV" }, + ]); +} +function w() { + let stackZ = callFunctionWithAsyncStack(z, saveStack(), "WtoZ"); + + print("high.checkVisibleStack(stackZ)"); + checkVisibleStack(stackZ, [ + { name: "z", asyncCause: null }, + { name: "w", asyncCause: "WtoZ" }, + { name: "u", asyncCause: null }, + ]); +} +function x(stackV) { + print("low.checkVisibleStack(stackV)"); + checkVisibleStack(stackV, [ + { name: "u", asyncCause: "UtoV" }, + ]); + + let stackX = saveStack(); + + print("low.checkVisibleStack(stackX)"); + checkVisibleStack(stackX, [ + { name: "x", asyncCause: null }, + { name: "u", asyncCause: "UtoV" }, + ]); + + return saveStack(0, high); +} + +function y() { + let stackY = saveStack(); + + print("low.checkVisibleStack(stackY)"); + checkVisibleStack(stackY, [ + { name: "y", asyncCause: null }, + { name: "u", asyncCause: "UtoV" }, + ]); + + return saveStack(0, high); +} +function z() { + let stackZ = saveStack(); + + print("low.checkVisibleStack(stackZ)"); + checkVisibleStack(stackZ, [ + { name: "z", asyncCause: null }, + { name: "u", asyncCause: "Async" }, + ]); + + return saveStack(0, high); +} + +// Split the functions in their respective globals. +low .eval(a.toString()); +high.eval(b.toString()); +high.eval(c.toString()); +high.eval(d.toString()); +low .eval(e.toString()); + +low .b = high.b; +high.e = low .e; + +low .eval(u.toString()); +high.eval(v.toString()); +high.eval(w.toString()); +low .eval(x.toString()); +low .eval(y.toString()); +low .eval(z.toString()); + +low .v = high.v; +low .w = high.w; +high.x = low .x; +high.y = low .y; +high.z = low .z; + +low .high = high; +high.low = low; + +low .eval(checkVisibleStack.toString()); +high.eval(checkVisibleStack.toString()); + +// Execute the tests. +low.a(); +low.u(); diff --git a/js/src/jit-test/tests/saved-stacks/async.js b/js/src/jit-test/tests/saved-stacks/async.js new file mode 100644 index 0000000000..6ab4546a7c --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/async.js @@ -0,0 +1,24 @@ +// Test calling a function using a previously captured stack as an async stack. + +function getAsyncStack() { + return saveStack(); +} + +// asyncCause may contain non-ASCII characters. +let testAsyncCause = "Tes" + String.fromCharCode(355) + "String"; + +callFunctionWithAsyncStack(function asyncCallback() { + let stack = saveStack(); + + assertEq(stack.functionDisplayName, "asyncCallback"); + assertEq(stack.parent, null); + assertEq(stack.asyncCause, null); + + assertEq(stack.asyncParent.functionDisplayName, "getAsyncStack"); + assertEq(stack.asyncParent.asyncCause, testAsyncCause); + assertEq(stack.asyncParent.asyncParent, null); + + assertEq(stack.asyncParent.parent.asyncCause, null); + assertEq(stack.asyncParent.parent.asyncParent, null); + assertEq(stack.asyncParent.parent.parent, null); +}, getAsyncStack(), testAsyncCause); diff --git a/js/src/jit-test/tests/saved-stacks/bug-1004479-savedStacks-with-string-parameter.js b/js/src/jit-test/tests/saved-stacks/bug-1004479-savedStacks-with-string-parameter.js new file mode 100644 index 0000000000..785c024945 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1004479-savedStacks-with-string-parameter.js @@ -0,0 +1,4 @@ +// This test case was found by the fuzzer and crashed the js shell. + +Object.preventExtensions(this); +saveStack(); diff --git a/js/src/jit-test/tests/saved-stacks/bug-1006876-too-much-recursion.js b/js/src/jit-test/tests/saved-stacks/bug-1006876-too-much-recursion.js new file mode 100644 index 0000000000..593c4b40bf --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1006876-too-much-recursion.js @@ -0,0 +1,10 @@ +// |jit-test| exitstatus: 3 + +// This test case was found by the fuzzer and crashed the js shell. It should +// throw a "too much recursion" error, but was crashing instead. + +enableTrackAllocations(); +function f() { + f(); +} +f(); diff --git a/js/src/jit-test/tests/saved-stacks/bug-1012646-strlen-crasher.js b/js/src/jit-test/tests/saved-stacks/bug-1012646-strlen-crasher.js new file mode 100644 index 0000000000..95a63aafde --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1012646-strlen-crasher.js @@ -0,0 +1,4 @@ +// |jit-test| exitstatus: 3 + +enableTrackAllocations(); +evaluate("throw Error();", {fileName: null}); diff --git a/js/src/jit-test/tests/saved-stacks/bug-1031168-trace-sources.js b/js/src/jit-test/tests/saved-stacks/bug-1031168-trace-sources.js new file mode 100644 index 0000000000..3162855a8c --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1031168-trace-sources.js @@ -0,0 +1,9 @@ +loadFile("\ +saveStack();\ +gcPreserveCode = function() {};\ +gc();\ +saveStack() == 3\ +"); +function loadFile(lfVarx) { + evaluate(lfVarx); +} diff --git a/js/src/jit-test/tests/saved-stacks/bug-1149495.js b/js/src/jit-test/tests/saved-stacks/bug-1149495.js new file mode 100644 index 0000000000..996f606f13 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1149495.js @@ -0,0 +1,7 @@ +try { + offThreadCompileToStencil('Error()', { lineNumber: (4294967295)}); + var stencil = finishOffThreadStencil(); + evalStencil(stencil).stack; +} catch (e) { + // Ignore "Error: Can't use offThreadCompileToStencil with --no-threads" +} diff --git a/js/src/jit-test/tests/saved-stacks/bug-1225474.js b/js/src/jit-test/tests/saved-stacks/bug-1225474.js new file mode 100644 index 0000000000..ca0dcaa31c --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1225474.js @@ -0,0 +1,6 @@ +// setSavedStacksRNGState shouldn't crash regardless of the seed value passed. + +setSavedStacksRNGState(0); +setSavedStacksRNGState({}); +setSavedStacksRNGState(false); +setSavedStacksRNGState(NaN); diff --git a/js/src/jit-test/tests/saved-stacks/bug-1260712.js b/js/src/jit-test/tests/saved-stacks/bug-1260712.js new file mode 100644 index 0000000000..5b1319cd17 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1260712.js @@ -0,0 +1,7 @@ +low = high = newGlobal({ + principal: 5 +}) +high.low = low +high.eval("function a() { return saveStack(1, low) }") +set = eval("high.a()") +serialize(set) diff --git a/js/src/jit-test/tests/saved-stacks/bug-1289058.js b/js/src/jit-test/tests/saved-stacks/bug-1289058.js new file mode 100644 index 0000000000..1968f58500 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1289058.js @@ -0,0 +1,13 @@ +const g1 = newGlobal({}); +const g2 = newGlobal(newGlobal); +g1.g2obj = g2.eval("new Object"); +g1.evaluate(` + const global = this; + function capture(shouldIgnoreSelfHosted = true) { + return captureFirstSubsumedFrame(global.g2obj, shouldIgnoreSelfHosted); + } + (function iife1() { + const captureTrueStack = capture(true); + }()); +`, { +}); diff --git a/js/src/jit-test/tests/saved-stacks/bug-1289073.js b/js/src/jit-test/tests/saved-stacks/bug-1289073.js new file mode 100644 index 0000000000..2d0a9919f6 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1289073.js @@ -0,0 +1 @@ +saveStack(0.2); diff --git a/js/src/jit-test/tests/saved-stacks/bug-1445973-quick.js b/js/src/jit-test/tests/saved-stacks/bug-1445973-quick.js new file mode 100644 index 0000000000..e95315f71f --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1445973-quick.js @@ -0,0 +1,53 @@ +// |jit-test| --no-baseline; skip-if: !('oomTest' in this) +// +// For background, see the comments for LiveSavedFrameCache in js/src/vm/Stack.h. +// +// The cache would like to assert that, assuming the cache hasn't been +// completely flushed due to a compartment mismatch, if a stack frame's +// hasCachedSavedFrame bit is set, then that frame does indeed have an entry in +// the cache. +// +// When LiveSavedFrameCache::find finds an entry whose frame address matches, +// but whose pc does not match, it removes that entry from the cache. Usually, a +// fresh entry for that frame will be pushed into the cache in short order as we +// rebuild the SavedFrame chain, but if the creation of the SavedFrame fails due +// to OOM, then we are left with no cache entry for that frame. +// +// The fix for 1445973 is simply to clear the frame's bit when we remove the +// cache entry for a pc mismatch. Previously the code neglected to do this, but +// usually got away with it because the cache would be re-populated. OOM fuzzing +// interrupted the code at the proper place and revealed the crash, but did so +// with a test that took 90s to run. This test runs in a fraction of a second. + +function f() { + // Ensure that we will try to allocate fresh SavedFrame objects. + clearSavedFrames(); + + // Ensure that all frames have their hasCachedSavedFrame bits set. + saveStack(); + + try { + // Capture the stack again. The entry for this frame will be removed due to + // a pc mismatch. The OOM must occur here, causing the cache not to be + // repopulated. + saveStack(); + } catch (e) { } + + // Capture the stack a third time. This will see that f's frame has its bit + // set, even though it has no entry in the cache. + saveStack(); +} + +// This ensures that there is a frame below f's in the same Activation, so that +// the assertion doesn't get skipped because the LiveSavedFrameCache is entirely +// empty, to handle caches flushed by compartment mismatches. +function g() { f(); } + +// Call all the code once, to ensure that everything has been delazified. When +// different calls to g perform different amounts of allocation, oomTest's +// simple strategy for choosing which allocation should fail can neglect to hit +// the SavedFrame creation. This is also why we disable the baseline compiler in +// the test metaline. +g(); + +oomTest(g); diff --git a/js/src/jit-test/tests/saved-stacks/bug-1451268.js b/js/src/jit-test/tests/saved-stacks/bug-1451268.js new file mode 100644 index 0000000000..a4b7b03d92 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1451268.js @@ -0,0 +1,23 @@ +// |jit-test| --no-threads; --ion-eager +// Walking into Rematerialized frames under ordinary frames with their +// hasCachedSavedFrame bits set shouldn't cause an assertion. + +enableTrackAllocations(); +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger; +g.toggle = function toggle(x, d) { + if (d) { + dbg.addDebuggee(g); + var frame = dbg.getNewestFrame().older; + } +}; +g.eval("" + function f(x, d) { + g(x, d); +}); +g.eval("" + function g(x, d) { + toggle(x, d); +}); +g.eval("(" + function test() { + for (var i = 0; i < 5; i++) f(42, false); + f(42, true); +} + ")();"); diff --git a/js/src/jit-test/tests/saved-stacks/bug-1505387-dbg-eval-ion.js b/js/src/jit-test/tests/saved-stacks/bug-1505387-dbg-eval-ion.js new file mode 100644 index 0000000000..64029d8cb0 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1505387-dbg-eval-ion.js @@ -0,0 +1,12 @@ +// |jit-test| --ion-eager; --no-threads; +// This test ensures that debugger eval on an ion frame is able to correctly +// follow the debugger eval frame link to its parent frame. + +var dbgGlobal = newGlobal({ newCompartment: true }); +var dbg = new dbgGlobal.Debugger(globalThis); + +for (var i = 0; i < 1; i++) { + (() => { + dbg.getNewestFrame().older.eval("saveStack()"); + })(); +} diff --git a/js/src/jit-test/tests/saved-stacks/bug-1509420.js b/js/src/jit-test/tests/saved-stacks/bug-1509420.js new file mode 100644 index 0000000000..87cd0b7f21 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1509420.js @@ -0,0 +1,9 @@ +// bindtoAsyncStack shouldn't choke on CCWs of functions. + +var g = newGlobal(); +g.evaluate("function h() {}"); +bindToAsyncStack(g.h, { stack: saveStack() })(); + +bindToAsyncStack(new Proxy(() => {}, { apply: () => {} }), + { stack: saveStack() }) +(); diff --git a/js/src/jit-test/tests/saved-stacks/bug-1640034-dbg-eval-across-compartments.js b/js/src/jit-test/tests/saved-stacks/bug-1640034-dbg-eval-across-compartments.js new file mode 100644 index 0000000000..73c4dc9621 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1640034-dbg-eval-across-compartments.js @@ -0,0 +1,22 @@ +// This test ensures that capturing a stack works when the Debugger.Frame +// being used for an eval has an async stack on the activation between +// the two debuggee frames. + +const global = newGlobal({ newCompartment: true }); +const dbg = new Debugger(global); +dbg.onDebuggerStatement = function() { + const frame = dbg.getNewestFrame(); + + // Capturing this stack inside the debugger compartment will populate the + // LiveSavedFrameCache with a SavedFrame in the debugger compartment. + const opts = { + stack: saveStack(), + }; + + bindToAsyncStack(function() { + // This captured stack needs to properly invalidate the LiveSavedFrameCache + // for the frame and create a new one inside the debuggee compartment. + frame.eval(`saveStack()`); + }, opts)(); +}; +global.eval(`debugger;`); diff --git a/js/src/jit-test/tests/saved-stacks/bug-1744495.js b/js/src/jit-test/tests/saved-stacks/bug-1744495.js new file mode 100644 index 0000000000..4ce56f4235 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug-1744495.js @@ -0,0 +1,18 @@ +// |jit-test| --fast-warmup; --more-compartments + +enableTrackAllocations() +e = function(a) { + b = newGlobal() + c = new b.Debugger + return function(d, code) { + c.addDebuggee(a) + c.getNewestFrame().older.older.eval(code) + } +}(this) +for (var i = 0; i < 50; i++) f() +function g() { + e(1, "a.push0") +} +function f() { + g() +} diff --git a/js/src/jit-test/tests/saved-stacks/bug1813533.js b/js/src/jit-test/tests/saved-stacks/bug1813533.js new file mode 100644 index 0000000000..e16587413c --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug1813533.js @@ -0,0 +1,22 @@ +async function foo() { + // Suspend this function until later. + await undefined; + + // Capture the stack using JS::AllFrames. + saveStack(); + + // Capture the stack using JS::FirstSubsumedFrame. + var g = newGlobal({principal: {}}); + captureFirstSubsumedFrame(g); +} + +// Invoke foo. This will capture the stack and mark the bit +// on the top-level script, but we clear it below. +foo(); + +// Tier up to blinterp, clearing the hasCachedSavedFrame bit +// on the top-level script. +for (var i = 0; i < 20; i++) {} + +// Continue execution of foo. +drainJobQueue(); diff --git a/js/src/jit-test/tests/saved-stacks/bug1832936.js b/js/src/jit-test/tests/saved-stacks/bug1832936.js new file mode 100644 index 0000000000..bb0e2c63eb --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug1832936.js @@ -0,0 +1,13 @@ +const g = newGlobal({"newCompartment": true}); +const dbg = Debugger(g); + +dbg.onDebuggerStatement = function () { + const stack = saveStack(); + for (let i = 0; i < 50; i++) {} + function foo() { + saveStack(); + dbg.getNewestFrame().eval(`saveStack()`); + } + bindToAsyncStack(foo, {"stack": stack})(); +} +g.eval("debugger;"); diff --git a/js/src/jit-test/tests/saved-stacks/caching-and-ccws.js b/js/src/jit-test/tests/saved-stacks/caching-and-ccws.js new file mode 100644 index 0000000000..b61e8c3252 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/caching-and-ccws.js @@ -0,0 +1,35 @@ +// Test that the SavedFrame caching doesn't get messed up in the presence of +// cross-compartment calls. + +const funcSource = "function call(f) { return f(); }"; + +const g1 = newGlobal(); +const g2 = newGlobal(); + +g1.eval(funcSource); +g2.eval(funcSource); +eval(funcSource); + +function doSaveStack() { + return saveStack(); +} + +const captureStacksAcrossCompartmens = () => + [this, g1, g2].map(g => g.call(doSaveStack)); + +(function f0() { + const stacks = []; + + for (var i = 0; i < 2; i++) + stacks.push(...captureStacksAcrossCompartmens()); + + const [s1, s2, s3, s4, s5, s6] = stacks; + + assertEq(s1 != s2, true); + assertEq(s2 != s3, true); + assertEq(s3 != s1, true); + + assertEq(s1, s4); + assertEq(s2, s5); + assertEq(s3, s6); +}()); diff --git a/js/src/jit-test/tests/saved-stacks/caching-and-frame-count.js b/js/src/jit-test/tests/saved-stacks/caching-and-frame-count.js new file mode 100644 index 0000000000..462adfd546 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/caching-and-frame-count.js @@ -0,0 +1,40 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") +// +// Test that the SavedFrame caching doesn't mess up counts. Specifically, that +// if we capture only the first n frames of a stack, we don't cache that stack +// and return it for when someone else captures another stack and asks for more +// frames than that last time. + +function stackLength(stack) { + return stack === null + ? 0 + : 1 + stackLength(stack.parent); +} + +(function f0() { + (function f1() { + (function f2() { + (function f3() { + (function f4() { + (function f5() { + (function f6() { + (function f7() { + (function f8() { + (function f9() { + const s1 = saveStack(3); + const s2 = saveStack(5); + const s3 = saveStack(0 /* no limit */); + + assertEq(stackLength(s1), 3); + assertEq(stackLength(s2), 5); + assertEq(stackLength(s3), 11); + }()); + }()); + }()); + }()); + }()); + }()); + }()); + }()); + }()); +}()); diff --git a/js/src/jit-test/tests/saved-stacks/capture-first-frame-with-principals.js b/js/src/jit-test/tests/saved-stacks/capture-first-frame-with-principals.js new file mode 100644 index 0000000000..640b129567 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/capture-first-frame-with-principals.js @@ -0,0 +1,86 @@ +// Create two different globals whose compartments have two different +// principals. Test getting the first frame on the stack with some given +// principals in various configurations of JS stack and of wanting self-hosted +// frames or not. + +const g1 = newGlobal({ + principal: 0xffff +}); + +const g2 = newGlobal({ + principal: 0xff +}); + +// Introduce everyone to themselves and each other. +g1.g2 = g2.g2 = g2; +g1.g1 = g2.g1 = g1; + +g1.g2obj = g2.eval("new Object"); + +g1.evaluate(` + const global = this; + + // Capture the stack back to the first frame in the g2 global. + function capture(shouldIgnoreSelfHosted = true) { + return captureFirstSubsumedFrame(global.g2obj, shouldIgnoreSelfHosted); + } +`, { + fileName: "script1.js" +}); + +g2.evaluate(` + const capture = g1.capture; + + function getOldestFrame(stack) { + while (stack.parent) { + stack = stack.parent; + } + return stack; + } + + function dumpStack(name, stack) { + print("Stack " + name + " ="); + while (stack) { + print(" " + stack.functionDisplayName + " @ " + stack.source); + stack = stack.parent; + } + print(); + } + + // When the youngest frame is not self-hosted, it doesn't matter whether or not + // we specify that we should ignore self hosted frames when capturing the first + // frame with the given principals. + // + // Stack: iife1 (g2) <- capture (g1) + + (function iife1() { + const captureTrueStack = capture(true); + dumpStack("captureTrueStack", captureTrueStack); + assertEq(getOldestFrame(captureTrueStack).functionDisplayName, "iife1"); + assertEq(getOldestFrame(captureTrueStack).source, "script2.js"); + + const captureFalseStack = capture(false); + dumpStack("captureFalseStack", captureFalseStack); + assertEq(getOldestFrame(captureFalseStack).functionDisplayName, "iife1"); + assertEq(getOldestFrame(captureFalseStack).source, "script2.js"); + }()); + + // When the youngest frame is a self hosted frame, we get two different + // captured stacks depending on whether or not we ignore self-hosted frames. + // + // Stack: iife2 (g2) <- Array.prototype.map <- capture (g1) + + (function iife2() { + const trueStack = [true].map(capture)[0]; + dumpStack("trueStack", trueStack); + assertEq(getOldestFrame(trueStack).functionDisplayName, "iife2"); + assertEq(getOldestFrame(trueStack).source, "script2.js"); + + const falseStack = [false].map(capture)[0]; + dumpStack("falseStack", falseStack); + assertEq(getOldestFrame(falseStack).functionDisplayName !== "iife2", true); + assertEq(getOldestFrame(falseStack).source, "self-hosted"); + }()); +`, { + fileName: "script2.js" +}); diff --git a/js/src/jit-test/tests/saved-stacks/display-url.js b/js/src/jit-test/tests/saved-stacks/display-url.js new file mode 100644 index 0000000000..4688fefe01 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/display-url.js @@ -0,0 +1,26 @@ +eval(` + function a() { + return b(); + } + //# sourceURL=source-a.js +`); + +eval(` + function b() { + return c(); + } + //# sourceURL=source-b.js +`); + +eval(` + function c() { + return saveStack(); + } + //# sourceURL=source-c.js +`); + +let stack = a(); +print(stack); +assertEq(stack.source, "source-c.js"); +assertEq(stack.parent.source, "source-b.js"); +assertEq(stack.parent.parent.source, "source-a.js"); diff --git a/js/src/jit-test/tests/saved-stacks/evals.js b/js/src/jit-test/tests/saved-stacks/evals.js new file mode 100644 index 0000000000..41a0f9111c --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/evals.js @@ -0,0 +1,38 @@ +// Test that we can save stacks with direct and indirect eval calls. + +const directEval = (function iife() { + return eval("(" + function evalFrame() { + return saveStack(); + } + "())"); +}()); + +assertEq(directEval.source.includes("> eval"), true); +assertEq(directEval.functionDisplayName, "evalFrame"); + +assertEq(directEval.parent.source.includes("> eval"), true); + +assertEq(directEval.parent.parent.source.includes("> eval"), false); +assertEq(directEval.parent.parent.functionDisplayName, "iife"); + +assertEq(directEval.parent.parent.parent.source.includes("> eval"), false); + +assertEq(directEval.parent.parent.parent.parent, null); + +const lave = eval; +const indirectEval = (function iife() { + return lave("(" + function evalFrame() { + return saveStack(); + } + "())"); +}()); + +assertEq(indirectEval.source.includes("> eval"), true); +assertEq(indirectEval.functionDisplayName, "evalFrame"); + +assertEq(indirectEval.parent.source.includes("> eval"), true); + +assertEq(indirectEval.parent.parent.source.includes("> eval"), false); +assertEq(indirectEval.parent.parent.functionDisplayName, "iife"); + +assertEq(indirectEval.parent.parent.parent.source.includes("> eval"), false); + +assertEq(indirectEval.parent.parent.parent.parent, null); diff --git a/js/src/jit-test/tests/saved-stacks/function-display-name.js b/js/src/jit-test/tests/saved-stacks/function-display-name.js new file mode 100644 index 0000000000..f10b7de6bd --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/function-display-name.js @@ -0,0 +1,16 @@ +// Test the functionDisplayName of SavedFrame instances. + +function uno() { return dos(); } +const dos = () => tres.quattro(); +let tres = {}; +tres.quattro = () => saveStack() + +const frame = uno(); + +assertEq(frame.functionDisplayName, "tres.quattro"); +assertEq(frame.parent.functionDisplayName, "dos"); +assertEq(frame.parent.parent.functionDisplayName, "uno"); +assertEq(frame.parent.parent.parent.functionDisplayName, null); + +assertEq(frame.parent.parent.parent.parent, null); + diff --git a/js/src/jit-test/tests/saved-stacks/gc-frame-cache.js b/js/src/jit-test/tests/saved-stacks/gc-frame-cache.js new file mode 100644 index 0000000000..cf2646f471 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/gc-frame-cache.js @@ -0,0 +1,87 @@ +// Test that SavedFrame instances get removed from the SavedStacks frames cache +// after a GC. + +const FUZZ_FACTOR = 3; + +function isAboutEq(actual, expected) { + return Math.abs(actual - expected) <= FUZZ_FACTOR; +} + +var stacks = []; + +(function () { + // Use an IIFE here so that we don't keep these saved stacks alive in the + // frame cache when we test that they all go away at the end of the test. + + var startCount = getSavedFrameCount(); + print("startCount = " + startCount); + + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + stacks.push(saveStack()); + + gc(); + + var endCount = getSavedFrameCount(); + print("endCount = " + endCount); + + assertEq(isAboutEq(endCount - startCount, 50), true); +}()); + +while (stacks.length) { + stacks.pop(); +} +gc(); + +stacks = null; +gc(); + +assertEq(isAboutEq(getSavedFrameCount(), 0), true); diff --git a/js/src/jit-test/tests/saved-stacks/generators.js b/js/src/jit-test/tests/saved-stacks/generators.js new file mode 100644 index 0000000000..2878997580 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/generators.js @@ -0,0 +1,19 @@ +// Test that we can save stacks which have generator frames. + +const { value: frame } = (function iife1() { + return (function* generator() { + yield (function iife2() { + return saveStack(); + }()); + }()).next(); +}()); + +// Bug 1102498 - toString does not include self-hosted frames, which can appear +// depending on GC timing. This may end up changing in the future, see +// bug 1103155. + +var lines = frame.toString().split("\n"); +assertEq(lines[0].startsWith("iife2@"), true); +assertEq(lines[1].startsWith("generator@"), true); +assertEq(lines[2].startsWith("iife1@"), true); +assertEq(lines[3].startsWith("@"), true); diff --git a/js/src/jit-test/tests/saved-stacks/get-set.js b/js/src/jit-test/tests/saved-stacks/get-set.js new file mode 100644 index 0000000000..be2e207399 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/get-set.js @@ -0,0 +1,25 @@ +// Test that we can save stacks with getter and setter function frames. + +function assertStackLengthEq(stack, expectedLength) { + let actual = 0; + while (stack) { + actual++; + stack = stack.parent; + } + assertEq(actual, expectedLength); +} + +const get = { get s() { return saveStack(); } }.s; +assertStackLengthEq(get, 2); + +let set; +try { + ({ + set s(v) { + throw saveStack(); + } + }).s = 1; +} catch (s) { + set = s; +} +assertStackLengthEq(set, 2); diff --git a/js/src/jit-test/tests/saved-stacks/getters-on-invalid-objects.js b/js/src/jit-test/tests/saved-stacks/getters-on-invalid-objects.js new file mode 100644 index 0000000000..9a892f20bf --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/getters-on-invalid-objects.js @@ -0,0 +1,23 @@ +// Test that you can't call the SavedFrame constructor and can only use +// SavedFrame's getters on SavedFrame instances. + +load(libdir + "asserts.js"); + +let proto = Object.getPrototypeOf(saveStack()); + +// Can't create new SavedFrame instances by hand. +print("Testing constructor"); +assertThrowsInstanceOf(() => { + new proto.constructor(); +}, TypeError); + +for (let p of ["source", "line", "column", "functionDisplayName", "parent"]) { + print("Testing getter: " + p); + // The getters shouldn't work on the prototype. + assertThrowsInstanceOf(() => proto[p], TypeError); + + // Nor should they work on random objects. + let o = {}; + Object.defineProperty(o, p, Object.getOwnPropertyDescriptor(proto, p)); + assertThrowsInstanceOf(() => o[p], TypeError); +} diff --git a/js/src/jit-test/tests/saved-stacks/max-frame-count.js b/js/src/jit-test/tests/saved-stacks/max-frame-count.js new file mode 100644 index 0000000000..17c3751765 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/max-frame-count.js @@ -0,0 +1,42 @@ +// Test that we can capture only the N newest frames. +// This is the maxFrameCount argument to JS::CaptureCurrentStack. + +load(libdir + 'asserts.js'); + +function recur(n, limit) { + if (n > 0) + return recur(n - 1, limit); + return saveStack(limit); +} + +// Negative values are rejected. +assertThrowsInstanceOf(() => saveStack(-1), TypeError); + +// Zero means 'no limit'. +assertEq(saveStack(0).parent, null); +assertEq(recur(0, 0).parent !== null, true); +assertEq(recur(0, 0).parent.parent, null); +assertEq(recur(1, 0).parent.parent.parent, null); +assertEq(recur(2, 0).parent.parent.parent.parent, null); +assertEq(recur(3, 0).parent.parent.parent.parent.parent, null); + +// limit of 1 +assertEq(saveStack(1).parent, null); +assertEq(recur(0, 1).parent, null); +assertEq(recur(0, 1).parent, null); +assertEq(recur(1, 1).parent, null); +assertEq(recur(2, 1).parent, null); + +// limit of 2 +assertEq(saveStack(2).parent, null); +assertEq(recur(0, 2).parent !== null, true); +assertEq(recur(0, 2).parent.parent, null); +assertEq(recur(1, 2).parent.parent, null); +assertEq(recur(2, 2).parent.parent, null); + +// limit of 3 +assertEq(saveStack(3).parent, null); +assertEq(recur(0, 3).parent !== null, true); +assertEq(recur(0, 3).parent.parent, null); +assertEq(recur(1, 3).parent.parent.parent, null); +assertEq(recur(2, 3).parent.parent.parent, null); diff --git a/js/src/jit-test/tests/saved-stacks/native-calls.js b/js/src/jit-test/tests/saved-stacks/native-calls.js new file mode 100644 index 0000000000..4b12ad7383 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/native-calls.js @@ -0,0 +1,12 @@ +// Test that we can save stacks with native code on the stack. + +// Unlike Array.prototype.map, Array.prototype.filter is not self-hosted. +const filter = (function iife() { + try { + callFunctionFromNativeFrame(n => { throw saveStack() }); + } catch (s) { + return s; + } +}()); + +assertEq(filter.parent.functionDisplayName, "iife"); diff --git a/js/src/jit-test/tests/saved-stacks/oom-in-save-stack-02.js b/js/src/jit-test/tests/saved-stacks/oom-in-save-stack-02.js new file mode 100644 index 0000000000..ed24db8f0f --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/oom-in-save-stack-02.js @@ -0,0 +1,28 @@ +// |jit-test| --no-ion; --no-baseline; --no-blinterp; skip-if: !('oomAtAllocation' in this) +// This shouldn't assert (bug 1516514). +// +// Disabled for ion and baseline because those introduce OOMs at some point that +// we don't seem to be able to catch, and they're not relevant to the bug. + +let g = newGlobal(); + +function oomTest() { + let done = false; + for (let j = 1; !done; j++) { + saveStack(); + + oomAtAllocation(j); + + try { + g.saveStack(); + } catch {} + + done = !resetOOMFailure(); + + try { + g.saveStack(); + } catch {} + } +} + +oomTest(); diff --git a/js/src/jit-test/tests/saved-stacks/oom-in-save-stack.js b/js/src/jit-test/tests/saved-stacks/oom-in-save-stack.js new file mode 100644 index 0000000000..c96bbc5c6b --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/oom-in-save-stack.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !('oomTest' in this) + +let s = saveStack(); +oomTest(() => { saveStack(); }); diff --git a/js/src/jit-test/tests/saved-stacks/principals-01.js b/js/src/jit-test/tests/saved-stacks/principals-01.js new file mode 100644 index 0000000000..85b46feb87 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/principals-01.js @@ -0,0 +1,70 @@ +// Test that SavedFrame.prototype.parent gives the next older frame whose +// principals are subsumed by the caller's principals. + +// Given a string of letters |expected|, say "abc", assert that the stack +// contains calls to a series of functions named by the next letter from +// the string, say a, b, and then c. Younger frames appear earlier in +// |expected| than older frames. +function check(expected, stack) { + print("check(" + JSON.stringify(expected) + ") against:\n" + stack); + count++; + + while (stack.length && expected.length) { + assertEq(stack.shift(), expected[0]); + expected = expected.slice(1); + } + + if (expected.length > 0) { + throw new Error("Missing frames for: " + expected); + } + if (stack.length > 0 && !stack.every(s => s === null)) { + throw new Error("Unexpected extra frame(s):\n" + stack); + } +} + +// Go from a SavedFrame linked list to an array of function display names. +function extract(stack) { + const results = []; + while (stack) { + results.push(stack.functionDisplayName); + stack = stack.parent; + } + return results; +} + +const low = newGlobal({ principal: 0 }); +const mid = newGlobal({ principal: 0xffff }); +const high = newGlobal({ principal: 0xfffff }); + +var count = 0; + + eval('function a() { check("a", extract(saveStack())); b(); }'); +low .eval('function b() { check("b", extract(saveStack())); c(); }'); +mid .eval('function c() { check("cba", extract(saveStack())); d(); }'); +high.eval('function d() { check("dcba", extract(saveStack())); e(); }'); + eval('function e() { check("ecba", extract(saveStack())); f(); }'); +low .eval('function f() { check("fb", extract(saveStack())); g(); }'); +mid .eval('function g() { check("gfecba", extract(saveStack())); h(); }'); +high.eval('function h() { check("hgfedcba", extract(saveStack())); }'); + +// Make everyone's functions visible to each other, as needed. + b = low .b; +low .c = mid .c; +mid .d = high.d; +high.e = e; + f = low .f; +low .g = mid .g; +mid .h = high.h; + +low.check = mid.check = high.check = check; + +// They each must have their own extract so that CCWs don't mess up the +// principals when we ask for the parent property. +low. eval("" + extract); +mid. eval("" + extract); +high.eval("" + extract); + +// Kick the whole process off. +a(); + +assertEq(count, 8); diff --git a/js/src/jit-test/tests/saved-stacks/principals-02.js b/js/src/jit-test/tests/saved-stacks/principals-02.js new file mode 100644 index 0000000000..8253ce4566 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/principals-02.js @@ -0,0 +1,56 @@ +// Test that SavedFrame.prototype.toString only shows frames whose principal is +// subsumed by the caller's principal. + +var count = 0; + +// Given a string of letters |expected|, say "abc", assert that the stack +// contains calls to a series of functions named by the next letter from +// the string, say a, b, and then c. Younger frames appear earlier in +// |expected| than older frames. +function check(expected, stack) { + print("check(" + JSON.stringify(expected) + ") against:\n" + stack); + count++; + + // Extract only the function names from the stack trace. Omit the frames + // for the top-level evaluation, if it is present. + const frames = stack + .split("\n") + .filter(f => f.match(/^.@/)) + .map(f => f.replace(/@.*$/g, "")); + + // Check the function names against the expected sequence. + assertEq(frames.length, expected.length); + for (var i = 0; i < expected.length; i++) { + assertEq(frames[i], expected[i]); + } +} + +var low = newGlobal({ principal: 0 }); +var mid = newGlobal({ principal: 0xffff }); +var high = newGlobal({ principal: 0xfffff }); + + eval('function a() { check("a", saveStack().toString()); b(); }'); +low .eval('function b() { check("b", saveStack().toString()); c(); }'); +mid .eval('function c() { check("cba", saveStack().toString()); d(); }'); +high.eval('function d() { check("dcba", saveStack().toString()); e(); }'); + eval('function e() { check("ecba", saveStack().toString()); f(); }'); +low .eval('function f() { check("fb", saveStack().toString()); g(); }'); +mid .eval('function g() { check("gfecba", saveStack().toString()); h(); }'); +high.eval('function h() { check("hgfedcba", saveStack().toString()); }'); + +// Make everyone's functions visible to each other, as needed. + b = low .b; +low .c = mid .c; +mid .d = high.d; +high.e = e; + f = low .f; +low .g = mid .g; +mid .h = high.h; + +low.check = mid.check = high.check = check; + +// Kick the whole process off. +a(); + +assertEq(count, 8); + diff --git a/js/src/jit-test/tests/saved-stacks/principals-03.js b/js/src/jit-test/tests/saved-stacks/principals-03.js new file mode 100644 index 0000000000..006b4477cd --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/principals-03.js @@ -0,0 +1,23 @@ +// With arrows representing child-to-parent links, create a SavedFrame stack +// like this: +// +// high.a -> low.b +// +// in `low`'s compartment and give `low` a reference to this stack. Assert the +// stack's youngest frame's properties doesn't leak information about `high.a` +// that `low` shouldn't have access to, and instead returns information about +// `low.b`. + +var low = newGlobal({ principal: 0 }); +var high = newGlobal({ principal: 0xfffff }); + +low.high = high; +high.low = low; + +high.eval("function a() { return saveStack(0, low); }"); +low.eval("function b() { return high.a(); }") + +var stack = low.b(); + +assertEq(stack.functionDisplayName, "b"); +assertEq(stack.parent, null); diff --git a/js/src/jit-test/tests/saved-stacks/principals-04.js b/js/src/jit-test/tests/saved-stacks/principals-04.js new file mode 100644 index 0000000000..3a9b578005 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/principals-04.js @@ -0,0 +1,15 @@ +// Test what happens when a compartment gets a SavedFrame that it doesn't have +// the principals to access any of its frames. + +var low = newGlobal({ principal: 0 }); +var high = newGlobal({ principal: 0xfffff }); + +low.high = high; +high.low = low; + +high.eval("function a() { return saveStack(1, low); }"); +var stack = low.eval("high.a();") + +assertEq(stack.functionDisplayName, null); +assertEq(stack.parent, null); +assertEq(stack.toString(), ""); diff --git a/js/src/jit-test/tests/saved-stacks/proxy-handlers.js b/js/src/jit-test/tests/saved-stacks/proxy-handlers.js new file mode 100644 index 0000000000..7ad1f6dc68 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/proxy-handlers.js @@ -0,0 +1,10 @@ +// Test that we can save stacks with proxy handler frames. + +const stack = (function iife() { + return (new Proxy({}, { + get: function get(t, n, r) { return saveStack(); } + })).stack; +}()); + +assertEq(stack.functionDisplayName, "get"); +assertEq(stack.parent.functionDisplayName, "iife"); diff --git a/js/src/jit-test/tests/saved-stacks/same-stack.js b/js/src/jit-test/tests/saved-stacks/same-stack.js new file mode 100644 index 0000000000..b82ba1c04a --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/same-stack.js @@ -0,0 +1,12 @@ +// Test that the same saved stack is only ever allocated once. + +const stacks = []; + +for (let i = 0; i < 10; i++) { + stacks.push(saveStack()); +} + +const s = stacks.pop(); +for (let stack of stacks) { + assertEq(s, stack); +} diff --git a/js/src/jit-test/tests/saved-stacks/self-hosted.js b/js/src/jit-test/tests/saved-stacks/self-hosted.js new file mode 100644 index 0000000000..88f8ce2007 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/self-hosted.js @@ -0,0 +1,26 @@ +// Test that we can save stacks with self-hosted function frames in them. + +const map = (function () { + return [3].map(n => saveStack()).pop(); +}()); + +assertEq(map.parent.functionDisplayName, "map"); +assertEq(map.parent.source, "self-hosted"); + +const reduce = (function () { + return [3].reduce(() => saveStack(), 3); +}()); + +assertEq(reduce.parent.functionDisplayName, "reduce"); +assertEq(reduce.parent.source, "self-hosted"); + +const forEach = (function () { + try { + [3].forEach(n => { throw saveStack() }); + } catch (s) { + return s; + } +}()); + +assertEq(forEach.parent.functionDisplayName, "forEach"); +assertEq(forEach.parent.source, "self-hosted"); diff --git a/js/src/jit-test/tests/saved-stacks/shared-parent-frames.js b/js/src/jit-test/tests/saved-stacks/shared-parent-frames.js new file mode 100644 index 0000000000..c6b4332dd9 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/shared-parent-frames.js @@ -0,0 +1,19 @@ +// Test that parent frames are shared when the older portions of two stacks are +// the same. + +let f1, f2; + +function dos() { + f1 = saveStack(); + f2 = saveStack(); +} + +(function uno() { + dos(); +}()); + + +// Different youngest frames. +assertEq(f1 == f2, false); +// However the parents should be the same. +assertEq(f1.parent, f2.parent); diff --git a/js/src/jit-test/tests/saved-stacks/stacks-are-frozen.js b/js/src/jit-test/tests/saved-stacks/stacks-are-frozen.js new file mode 100644 index 0000000000..b2d125aa42 --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/stacks-are-frozen.js @@ -0,0 +1,17 @@ +// Test that SavedFrame instances are frozen and can't be messed with. + +// Strict mode so that mutating frozen objects doesn't silently fail. +"use strict"; + +const s = saveStack(); + +load(libdir + 'asserts.js'); + +assertThrowsInstanceOf(() => s.source = "fake.url", + TypeError); + +assertThrowsInstanceOf(() => { + Object.defineProperty(s.__proto__, "line", { + get: () => 0 + }) +}, TypeError); diff --git a/js/src/jit-test/tests/saved-stacks/stringify-with-self-hosted.js b/js/src/jit-test/tests/saved-stacks/stringify-with-self-hosted.js new file mode 100644 index 0000000000..2f867d8f3d --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/stringify-with-self-hosted.js @@ -0,0 +1,8 @@ +// Test that stringify'ing a saved frame with self-hosted parent frames doesn't +// include the self-hosted parent frame in the output. + +const map = (function () { + return [3].map(n => saveStack()).pop(); +}()); + +assertEq(map.toString().includes("@self-hosted:"), false); diff --git a/js/src/jit-test/tests/self-hosting/GetStringDataProperty.js b/js/src/jit-test/tests/self-hosting/GetStringDataProperty.js new file mode 100644 index 0000000000..3eb2a9be7e --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/GetStringDataProperty.js @@ -0,0 +1,23 @@ +// Bug 1267364 - GetStringDataProperty should return undefined when the object +// is non-native. + +var GetStringDataProperty = getSelfHostedValue("GetStringDataProperty"); + +function testProxy() { + var obj = new Proxy({"foo": "10"}, {}); + var v = GetStringDataProperty(obj, "foo"); + assertEq(v, undefined); +} + +function testMaybeUnboxed() { + // Use JSON.parse to create unboxed object if availbale. + var obj = JSON.parse("[" + '{"foo": "10"},'.repeat(100) +"{}]"); + + // GetStringDataProperty may return "10" or undefined, depending on whether + // `obj` is unboxed or not + var v = GetStringDataProperty(obj[0], "foo"); + assertEq(v == undefined || v == "10", true); +} + +testProxy(); +testMaybeUnboxed(); diff --git a/js/src/jit-test/tests/self-hosting/bug1264575.js b/js/src/jit-test/tests/self-hosting/bug1264575.js new file mode 100644 index 0000000000..db74ef48c1 --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/bug1264575.js @@ -0,0 +1,7 @@ +function f(x, [y]) {} +f(0, []); +// jsfunfuzz-generated +let i = 0; +for (var z of [0, 0, 0]) { + verifyprebarriers(); +} diff --git a/js/src/jit-test/tests/self-hosting/bug1816084.js b/js/src/jit-test/tests/self-hosting/bug1816084.js new file mode 100644 index 0000000000..9ac6c5f59d --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/bug1816084.js @@ -0,0 +1,10 @@ +var count = 0; +function f() { + if (count++ < 10) { + interruptIf(true); + } + assertEq((1).toLocaleString(), "1"); + return true; +} +setInterruptCallback(f); +f(); diff --git a/js/src/jit-test/tests/self-hosting/bug957004.js b/js/src/jit-test/tests/self-hosting/bug957004.js new file mode 100644 index 0000000000..ce767a9a4a --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/bug957004.js @@ -0,0 +1,3 @@ +// No result, just mustn't crash. +Array.prototype.push(0); +Array.prototype.indexOf(); diff --git a/js/src/jit-test/tests/self-hosting/define-value-property.js b/js/src/jit-test/tests/self-hosting/define-value-property.js new file mode 100644 index 0000000000..b5ffebde21 --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/define-value-property.js @@ -0,0 +1,8 @@ +// These tests just mustn't trigger asserts. +if (!this.hasOwnProperty('Intl')) + quit(); + +Object.prototype.get = 5; +new Intl.Collator().resolvedOptions(); + +Intl.DateTimeFormat.supportedLocalesOf('en'); diff --git a/js/src/jit-test/tests/self-hosting/get-backtrace-in-constructing-bound-function.js b/js/src/jit-test/tests/self-hosting/get-backtrace-in-constructing-bound-function.js new file mode 100644 index 0000000000..10cc1b3217 --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/get-backtrace-in-constructing-bound-function.js @@ -0,0 +1,6 @@ +function t() { + getBacktrace({ locals: true }); +} +var f = t.bind(); +new f(); +f(); diff --git a/js/src/jit-test/tests/self-hosting/get-intrinsic.js b/js/src/jit-test/tests/self-hosting/get-intrinsic.js new file mode 100644 index 0000000000..8cff55a5cd --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/get-intrinsic.js @@ -0,0 +1,19 @@ + +var intrinsic_names = [ + "IsConstructor", // Implementation in C++ + "ArrayMap", // Implementation in JS + "localeCache", // Self-hosting variable +]; + +for (var name of intrinsic_names) { + // GetIntrinsic in same global should have consistent values + assertEq(getSelfHostedValue(name), getSelfHostedValue(name)); + + // Different globals shouldn't reuse intrinsics. + for (var newCompartment of [true, false]) { + let g = newGlobal({newCompartment}); + let a = evaluate(`getSelfHostedValue("${name}")`, { global: g }) + let b = getSelfHostedValue(name); + assertEq(a === b, false); + } +} diff --git a/js/src/jit-test/tests/self-hosting/intl-fallback-original.js b/js/src/jit-test/tests/self-hosting/intl-fallback-original.js new file mode 100644 index 0000000000..ab1ec63b28 --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/intl-fallback-original.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: typeof Intl === 'undefined'; skip-if: getBuildConfiguration("wasi") + +// Clobbering `Symbol` should not impact creation of %Intl%.[[FallbackSymbol]] +globalThis.Symbol = null; + +const IntlFallbackSymbol = + Object.getOwnPropertySymbols( + Intl.DateTimeFormat.call( + Object.create(Intl.DateTimeFormat.prototype)))[0]; diff --git a/js/src/jit-test/tests/self-hosting/invoke-self-hosted-function.js b/js/src/jit-test/tests/self-hosting/invoke-self-hosted-function.js new file mode 100644 index 0000000000..88893c58bd --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/invoke-self-hosted-function.js @@ -0,0 +1,9 @@ +var callees = [function a() {}, function b() {}, function c() {}, function d() {}, Array.prototype.forEach]; + +function f() { + for (var i = 0; i < callees.length; ++i) { + callees[i](function(){}); + } +} + +f(); \ No newline at end of file diff --git a/js/src/jit-test/tests/self-hosting/invoke-self-hosted-with-primitive-this.js b/js/src/jit-test/tests/self-hosting/invoke-self-hosted-with-primitive-this.js new file mode 100644 index 0000000000..24130e0f01 --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/invoke-self-hosted-with-primitive-this.js @@ -0,0 +1,7 @@ +try { + [0,0].sort(Array.some) + "".replace(RegExp(), Array.reduce) +} catch (error) { + if (!(error instanceof TypeError && /^\w is not a function$/.test(error.message))) + throw error; +} diff --git a/js/src/jit-test/tests/self-hosting/is-constructor-inlined.js b/js/src/jit-test/tests/self-hosting/is-constructor-inlined.js new file mode 100644 index 0000000000..e801a4b58e --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/is-constructor-inlined.js @@ -0,0 +1,16 @@ +var g = newGlobal(); +var w = g.eval("() => {}"); +var v = g.eval("Array"); + +function f() +{ + try { + Reflect.construct(v, {}, w); + } catch (e) { + assertEq(e instanceof TypeError, true); + } +} + +f(); +f(); +f(); diff --git a/js/src/jit-test/tests/self-hosting/is-constructor-on-wrapper.js b/js/src/jit-test/tests/self-hosting/is-constructor-on-wrapper.js new file mode 100644 index 0000000000..51ece0fe4b --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/is-constructor-on-wrapper.js @@ -0,0 +1,17 @@ +var g = newGlobal(); +var w = g.eval("() => {}"); +var v = g.eval("Array"); + +try { + Reflect.construct(Array, [], w); + assertEq(true, false, "Expected exception above"); +} catch (e) { + assertEq(e.constructor, TypeError); +} + +try { + Reflect.construct(v, [], w); + assertEq(true, false, "Expected exception above"); +} catch (e) { + assertEq(e.constructor, TypeError); +} diff --git a/js/src/jit-test/tests/self-hosting/is-possibly-wrapped-typed-array.js b/js/src/jit-test/tests/self-hosting/is-possibly-wrapped-typed-array.js new file mode 100644 index 0000000000..fd2244be21 --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/is-possibly-wrapped-typed-array.js @@ -0,0 +1,91 @@ +var IsPossiblyWrappedTypedArray = getSelfHostedValue("IsPossiblyWrappedTypedArray"); + +var declareSamples = ` + var allTypedArraySamples = [ + { value: new Int8Array(1), expected: true }, + { value: new Uint8Array(1), expected: true }, + { value: new Int16Array(1), expected: true }, + { value: new Uint16Array(1), expected: true }, + { value: new Int32Array(1), expected: true }, + { value: new Uint32Array(1), expected: true }, + { value: new Float32Array(1), expected: true }, + { value: new Float64Array(1), expected: true }, + { value: new Uint8ClampedArray(1), expected: true } + ]; + + var allObjectSamples = [ + { value: new Array(1), expected: false }, + { value: {}, expected: false }, + { value: { length: 1 }, expected: false } + ]; +`; + +// Create a new global to wrap with cross compartment wrappers. +var g = newGlobal(); +evaluate(declareSamples) +g.evaluate(declareSamples); + +var assertCode = `function (value, expected) { + assertEq(IsPossiblyWrappedTypedArray(value), expected); + return inIon(); +}`; + +function checkSamples(samples) { + // Create the assert function anew every run so as not to share JIT code, + // type information, etc. + var assert = new Function(`return (${assertCode})`)(); + + // Prevent Ion compilation of this function so that we don't freeze the + // sample array's type. If we did, IonBuilder's typed-array-length inlining + // would always see a Mixed state, preventing IsPossiblyWrappedTypedArray + // from being inlined. + with ({}) {}; + + do { + // spinInJit is used to ensure that we at least test all elements in the + // sample vector while running a compiled version of the assert + // function. + var spinInJit = true; + for (var i = 0; i < samples.length; i++) { + var e = samples[i]; + if (!e) continue; + spinInJit = spinInJit && assert(e.value, e.expected); + } + } while(!spinInJit); +} + +// Check a mix of samples from each type. +function test(a, b, c, d) { + var samples = [ + a == -1 ? null : allTypedArraySamples[a], + b == -1 ? null : allObjectSamples[b], + c == -1 ? null : g.allTypedArraySamples[c], + d == -1 ? null : g.allObjectSamples[d], + ]; + + checkSamples(samples); +} + +// Check all samples. +checkSamples(allTypedArraySamples); +checkSamples(allObjectSamples); +checkSamples(g.allTypedArraySamples); +checkSamples(g.allObjectSamples); + +// Check combinations mixing 2 elements from different types. +test(-1, -1, 0, 0); +test(-1, 0, -1, 0); +test(-1, 0, 0, -1); +test( 0, -1, -1, 0); +test( 0, -1, 0, -1); +test( 0, 0, -1, -1); +test( 0, 0, -1, 0); + +// Check combinations mixing 3 elements from different types. +test(-1, 0, 0, 0); +test( 0, -1, 0, 0); +test( 0, 0, -1, 0); +test( 0, 0, 0, -1); + +// Check combinations mixing 4 elements from different types. +test( 0, 0, 0, 0); diff --git a/js/src/jit-test/tests/self-hosting/makeconstructible-function-inherited-prototype-property.js b/js/src/jit-test/tests/self-hosting/makeconstructible-function-inherited-prototype-property.js new file mode 100644 index 0000000000..ff4d0c000a --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/makeconstructible-function-inherited-prototype-property.js @@ -0,0 +1,3 @@ +var proxy = new Proxy({ get: function() { throw 42; } }, {}); +Function.prototype.__proto__ = proxy; +this.hasOwnProperty("Intl"); diff --git a/js/src/jit-test/tests/self-hosting/method-called-on-incompatible.js b/js/src/jit-test/tests/self-hosting/method-called-on-incompatible.js new file mode 100644 index 0000000000..2a48991f66 --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/method-called-on-incompatible.js @@ -0,0 +1,9 @@ +load(libdir + "asserts.js"); + +assertTypeErrorMessage(() => Set.prototype.forEach.call({}), "forEach method called on incompatible Object"); +assertTypeErrorMessage(() => newGlobal({newCompartment: true}).Set.prototype.forEach.call({}), "forEach method called on incompatible Object"); +assertTypeErrorMessage(() => Set.prototype.forEach.call(15), "forEach method called on incompatible number"); + +assertTypeErrorMessage(() => Int8Array.prototype.find.call({}), "find method called on incompatible Object"); +assertTypeErrorMessage(() => newGlobal({newCompartment: true}).Int8Array.prototype.find.call({}), "find method called on incompatible Object"); +assertTypeErrorMessage(() => Int8Array.prototype.find.call(15), "find method called on incompatible number"); diff --git a/js/src/jit-test/tests/self-hosting/object-define-hazard.js b/js/src/jit-test/tests/self-hosting/object-define-hazard.js new file mode 100644 index 0000000000..7a1ccc2243 --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/object-define-hazard.js @@ -0,0 +1,18 @@ +// We shouldn't do the wrong thing in the face of an evil Object.prototype + +Object.prototype.get = function() {}; +var x = {}; +var setter = function () {}; +x.__defineSetter__("a", setter); +var desc = Object.getOwnPropertyDescriptor(x, "a"); +assertEq(desc.get, undefined); +assertEq(desc.set, setter); +delete Object.prototype.get; + +Object.prototype.set = function() {}; +x = {}; +var getter = function () {}; +x.__defineGetter__("a", getter); +desc = Object.getOwnPropertyDescriptor(x, "a"); +assertEq(desc.set, undefined); +assertEq(desc.get, getter); diff --git a/js/src/jit-test/tests/self-hosting/object-lookup-hazard.js b/js/src/jit-test/tests/self-hosting/object-lookup-hazard.js new file mode 100644 index 0000000000..5197a9113d --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/object-lookup-hazard.js @@ -0,0 +1,8 @@ +// We shouldn't do the wrong thing in the face of an evil Object.prototype + +Object.prototype.get = function() {}; +assertEq(({a: 1}).__lookupGetter__("a"), undefined); +delete Object.prototype.get; + +Object.prototype.set = function() {}; +assertEq(({a: 1}).__lookupSetter__("a"), undefined); diff --git a/js/src/jit-test/tests/self-hosting/oom-delazify.js b/js/src/jit-test/tests/self-hosting/oom-delazify.js new file mode 100644 index 0000000000..2c9bfc71e9 --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/oom-delazify.js @@ -0,0 +1,5 @@ +// |jit-test| --no-blinterp; skip-if: !('oomTest' in this) + +// Disable the JITs to make oomTest more reliable + +oomTest(() => Object.bind()) diff --git a/js/src/jit-test/tests/self-hosting/oom-toplevel.js b/js/src/jit-test/tests/self-hosting/oom-toplevel.js new file mode 100644 index 0000000000..60f2be4e1e --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/oom-toplevel.js @@ -0,0 +1,25 @@ +// |jit-test| skip-if: !('oomAtAllocation' in this) + +function code(n) { + return ` + // Trigger top-level execution with an OOM in the middle. + oomAtAllocation(${n}); + try { getSelfHostedValue("numberFormatCache") } catch (e) { } + resetOOMFailure(); + + // Read current value of "dateTimeFormatCache". + var initVal = getSelfHostedValue("dateTimeFormatCache"); + assertEq(typeof initVal, "object"); + + // Retrigger top-level execution by reading a later value in the file. + // Then compare that "dateTimeFormatCache" was not clobbered. + getSelfHostedValue("collatorCache"); + assertEq(initVal, getSelfHostedValue("dateTimeFormatCache")); + `; +} + +// We cannot use `oomTest` here because of divergence issues from things like +// `RegisterShapeCache` absorbing OOMs. +for (var i = 1; i < 300; ++i) { + evaluate(code(i), { global: newGlobal() }); +} diff --git a/js/src/jit-test/tests/self-hosting/relazify.js b/js/src/jit-test/tests/self-hosting/relazify.js new file mode 100644 index 0000000000..b335f8026c --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/relazify.js @@ -0,0 +1,16 @@ +// |jit-test| skip-if: isLcovEnabled() + +// Self-hosted builtins use a special form of lazy function, but still can be +// delazified in some cases. + +let obj = []; +let fun = obj.map; +assertEq(isLazyFunction(fun), true); + +// Delazify +fun.call(obj, x => x); +assertEq(isLazyFunction(fun), false); + +// Relazify +relazifyFunctions(obj); +assertEq(isLazyFunction(fun), true); diff --git a/js/src/jit-test/tests/self-hosting/tolength.js b/js/src/jit-test/tests/self-hosting/tolength.js new file mode 100644 index 0000000000..06fda18a72 --- /dev/null +++ b/js/src/jit-test/tests/self-hosting/tolength.js @@ -0,0 +1,13 @@ +let ToLength = getSelfHostedValue('ToLength'); + +assertEq(ToLength(NaN), 0); +assertEq(ToLength(-0), 0); +assertEq(ToLength(0), 0); +assertEq(ToLength(-Infinity), 0); +assertEq(ToLength(-Math.pow(2, 31)), 0); + +const MAX = Math.pow(2, 53) - 1; +assertEq(ToLength(Infinity), MAX); +assertEq(ToLength(MAX + 1), MAX); +assertEq(ToLength(3), 3); +assertEq(ToLength(40.5), 40); diff --git a/js/src/jit-test/tests/self-test/assertDeepEq.js b/js/src/jit-test/tests/self-test/assertDeepEq.js new file mode 100644 index 0000000000..3619a3fcc6 --- /dev/null +++ b/js/src/jit-test/tests/self-test/assertDeepEq.js @@ -0,0 +1,112 @@ +// Tests for the assertEqual function in jit-test/lib/asserts.js + +load(libdir + "asserts.js"); + +function assertNotDeepEq(a, b, options) { + assertThrowsInstanceOf(() => assertDeepEq(a, b, options), Error); +} + +// primitives +assertDeepEq(undefined, undefined); +assertDeepEq("1", "1"); +assertNotDeepEq(1, "1"); +assertNotDeepEq(undefined, null); +assertNotDeepEq({}, null); + +// symbols +assertDeepEq(Symbol(), Symbol()); +assertNotDeepEq(Symbol(), Symbol("")); +assertDeepEq(Symbol("tweedledum"), Symbol("tweedledum")); +assertNotDeepEq(Symbol("tweedledum"), Symbol("alice")); +assertNotDeepEq(Symbol("what-its-called"), Symbol.for("what-its-called")); +assertNotDeepEq(Symbol.iterator, Symbol.for("Symbol.iterator")); +assertDeepEq([Symbol(), Symbol(), Symbol()], + [Symbol(), Symbol(), Symbol()]); +var sym = Symbol(); +assertDeepEq([sym, sym], [sym, sym]); +assertNotDeepEq([sym, sym], [Symbol(), Symbol()]); +assertNotDeepEq([sym, sym], [Symbol(), sym]); +var obj1 = {}, obj2 = {}; +obj1[Symbol("x")] = "y"; +obj2[Symbol("x")] = "y"; +assertDeepEq(obj1, obj2); + +// objects +assertDeepEq({}, {}); +assertDeepEq({one: 1, two: 2}, {one: 1, two: 2}); +assertNotDeepEq(Object.freeze({}), {}); +assertDeepEq(Object.create(null), Object.create(null)); +assertNotDeepEq(Object.create(null, {a: {configurable: false, value: 3}}), + Object.create(null, {a: {configurable: true, value: 3}})); +assertNotDeepEq({one: 1}, {one: 1, two: 2}); +assertNotDeepEq({yes: true}, {oui: true}); +assertNotDeepEq({zero: 0}, {zero: "0"}); + +// test the comment +var x = {}, y = {}, ax = [x]; +assertDeepEq([ax, x], [ax, y]); // passes (bogusly) +assertNotDeepEq([ax, x], [ax, y], {strictEquivalence: true}); +assertDeepEq([x, ax], [y, ax]); // passes (bogusly) +assertNotDeepEq([x, ax], [y, ax], {strictEquivalence: true}); + +// object identity +assertNotDeepEq([x, y], [x, x]); +assertDeepEq([x, y], [x, y]); +assertDeepEq([y, x], [x, y]); + +// proto chain +var x = {}; +assertDeepEq(Object.create(x), Object.create(x)); +assertDeepEq(Object.create({}), Object.create({})); // equivalent but not identical proto objects + +// arrays +assertDeepEq([], []); +assertNotDeepEq([], [1]); +assertDeepEq([1], [1]); +assertNotDeepEq([0], [1]); +assertDeepEq([1, 2, 3], [1, 2, 3]); +assertNotDeepEq([1, , 3], [1, undefined, 3]); +var p = [], q = []; +p.prop = 1; +assertNotDeepEq(p, q); +assertNotDeepEq(q, p); +q.prop = 1; +assertDeepEq(q, p); + +// functions +assertNotDeepEq(() => 1, () => 2); +assertNotDeepEq((...x) => 1, x => 1); +assertNotDeepEq(function f(){}, function g(){}); +// Avoid setting name property. +var [f1, f2] = [function () {}, function () {}]; +assertDeepEq(f1, f1); +assertDeepEq(f1, f2); // same text, close enough +f1.prop = 1; +assertNotDeepEq(f1, f2); +f2.prop = 1; +assertDeepEq(f1, f2); + +// recursion +var a = [], b = []; +a[0] = a; +b[0] = b; +assertDeepEq(a, b); +a[0] = b; +assertNotDeepEq(a, b); // [#1=[#1#]] is not structurally equivalent to #1=[[#1#]] +b[0] = a; +assertDeepEq(a, b); +b[0] = [a]; // a[0] === b, b[0] === c, c[0] === a +assertDeepEq(a, b); + +// objects that merge +var x = {}; +assertDeepEq({x: x}, {x: x}); +var y = [x]; +assertDeepEq([y], [y]); + +// cross-compartment +var g1 = newGlobal({newCompartment: true}), g2 = newGlobal({newCompartment: true}); +assertDeepEq(g1, g2); +assertDeepEq(g1, g2, {strictEquivalence: true}); +Object.preventExtensions(g2.Math.abs); // make some miniscule change +assertNotDeepEq(g1, g2); diff --git a/js/src/jit-test/tests/self-test/assertRecoveredOnBailout-0.js b/js/src/jit-test/tests/self-test/assertRecoveredOnBailout-0.js new file mode 100644 index 0000000000..47f538b5f3 --- /dev/null +++ b/js/src/jit-test/tests/self-test/assertRecoveredOnBailout-0.js @@ -0,0 +1,12 @@ +// Prevent the GC from cancelling Ion compilations, when we expect them to succeed +gczeal(0); + +function f () { + var o = {}; + var x = assertRecoveredOnBailout(o, true); + bailout(); + return x; +} + +f(); +f(); diff --git a/js/src/jit-test/tests/self-test/assertRecoveredOnBailout-1.js b/js/src/jit-test/tests/self-test/assertRecoveredOnBailout-1.js new file mode 100644 index 0000000000..98d4f5d716 --- /dev/null +++ b/js/src/jit-test/tests/self-test/assertRecoveredOnBailout-1.js @@ -0,0 +1,36 @@ +// |jit-test| crash; skip-if: getBuildConfiguration("tsan") || getBuildConfiguration("wasi"); --ion-warmup-threshold=50 +setJitCompilerOption("offthread-compilation.enable", 0); + +var opts = getJitCompilerOptions(); +if (!opts['ion.enable'] || !opts['baseline.enable'] || + opts["ion.forceinlineCaches"] || opts["ion.check-range-analysis"]) +{ + crash("Cannot test assertRecoveredOnBailout"); +} + +// Prevent the GC from cancelling Ion compilations, when we expect them to succeed +gczeal(0); + +function g() { + return inIon(); +} + +// Wait until IonMonkey compilation finished. +while(!(res = g())); + +// Check that we entered Ion succesfully. +if (res !== true) + crash("Cannot enter IonMonkey"); + +// Test that assertRecoveredOnBailout fails as expected. +function f () { + var o = {}; + assertRecoveredOnBailout(o, false); + return inIon(); +} + +// Wait until IonMonkey compilation finished. +while(!(res = f())); + +// Ensure that we entered Ion. +assertEq(res, true); diff --git a/js/src/jit-test/tests/self-test/baselineCompile-Bug1444894.js b/js/src/jit-test/tests/self-test/baselineCompile-Bug1444894.js new file mode 100644 index 0000000000..768d4b655c --- /dev/null +++ b/js/src/jit-test/tests/self-test/baselineCompile-Bug1444894.js @@ -0,0 +1,5 @@ + +if (typeof baselineCompile == "function") { + gc(); + newGlobal().baselineCompile(); +} diff --git a/js/src/jit-test/tests/self-test/baselineCompile.js b/js/src/jit-test/tests/self-test/baselineCompile.js new file mode 100644 index 0000000000..18da9dbf12 --- /dev/null +++ b/js/src/jit-test/tests/self-test/baselineCompile.js @@ -0,0 +1,21 @@ +// |jit-test| test-also=--fuzzing-safe +// Check that the help text for baselineCompile() is accurate. + +if (typeof inJit == "function" && typeof baselineCompile == "function") { + if (!inJit()) { + + var res = baselineCompile(); // compile the current script + + assertEq(inJit(), false, + "We have compiled this script to baseline jitcode, but shouldn't " + + "be running it yet, according to the help text for baselineCompile() " + + "in TestingFunctions.cpp. If you fail this assertion, nice work, and " + + "please update the help text!"); + + for (var i=0; i<1; i++) {} // exact boilerplate suggested by the help text + + assertEq(typeof res != "string" ? inJit() : true, true, + "help text in TestingFunctions.cpp claims the above loop causes " + + "the interpreter to start running the new baseline jitcode"); + } +} diff --git a/js/src/jit-test/tests/self-test/cacheEntry.js b/js/src/jit-test/tests/self-test/cacheEntry.js new file mode 100644 index 0000000000..d60671b602 --- /dev/null +++ b/js/src/jit-test/tests/self-test/cacheEntry.js @@ -0,0 +1,23 @@ +// These tests are checking that CacheEntry_getBytecode properly set an error +// when there is no bytecode registered. +var caught = 0; +var code = cacheEntry(""); +try { + offThreadDecodeStencil(code); +} +catch (e) { + // offThreadDecodeStencil does not work with the --no-thread command line option. + assertEq(e.message.includes("CacheEntry") || e.message.includes("offThreadDecodeStencil"), true); + caught++; +} + +code = cacheEntry(""); +try { + evaluate(code, {loadBytecode: true}); +} +catch (e) { + assertEq(e.message.includes("CacheEntry"), true); + caught++; +} + +assertEq(caught, 2); diff --git a/js/src/jit-test/tests/self-test/delazification-mode-00.js b/js/src/jit-test/tests/self-test/delazification-mode-00.js new file mode 100644 index 0000000000..036065c688 --- /dev/null +++ b/js/src/jit-test/tests/self-test/delazification-mode-00.js @@ -0,0 +1,19 @@ +//|jit-test| skip-if: isLcovEnabled() + +let source = ` + function foo() { + return "foo"; + } + + // Wait is skipped as the source is not registered in the stencil cache. + waitForStencilCache(foo); + assertEq(isInStencilCache(foo), false); +`; + +const options = { + fileName: "inner-00.js", + lineNumber: 1, + eagerDelazificationStrategy: "OnDemandOnly", + newContext: true, +}; +evaluate(source, options); diff --git a/js/src/jit-test/tests/self-test/delazification-mode-01.js b/js/src/jit-test/tests/self-test/delazification-mode-01.js new file mode 100644 index 0000000000..ce1f9ee89b --- /dev/null +++ b/js/src/jit-test/tests/self-test/delazification-mode-01.js @@ -0,0 +1,24 @@ +//|jit-test| skip-if: isLcovEnabled() || helperThreadCount() === 0 + +// GCs might trash the stencil cache. Prevent us from scheduling too many GCs. +if ('gczeal' in this) { + gczeal(0); +} + +let source = ` + function foo() { + return "foo"; + } + + waitForStencilCache(foo); + // false would be expected if threads are disabled. + assertEq(isInStencilCache(foo), true); +`; + +const options = { + fileName: "inner-01.js", + lineNumber: 1, + eagerDelazificationStrategy: "CheckConcurrentWithOnDemand", + newContext: true, +}; +evaluate(source, options); diff --git a/js/src/jit-test/tests/self-test/delazification-mode-02.js b/js/src/jit-test/tests/self-test/delazification-mode-02.js new file mode 100644 index 0000000000..ea16ee7027 --- /dev/null +++ b/js/src/jit-test/tests/self-test/delazification-mode-02.js @@ -0,0 +1,24 @@ +//|jit-test| skip-if: isLcovEnabled() || helperThreadCount() === 0 + +// GCs might trash the stencil cache. Prevent us from scheduling too many GCs. +if ('gczeal' in this) { + gczeal(0); +} + +let source = ` + function foo() { + return "foo"; + } + + waitForStencilCache(foo); + // false would be expected if threads are disabled. + assertEq(isInStencilCache(foo), true); +`; + +const options = { + fileName: "inner-02.js", + lineNumber: 1, + eagerDelazificationStrategy: "ConcurrentDepthFirst", + newContext: true, +}; +evaluate(source, options); diff --git a/js/src/jit-test/tests/self-test/delazification-mode-03.js b/js/src/jit-test/tests/self-test/delazification-mode-03.js new file mode 100644 index 0000000000..53f158765e --- /dev/null +++ b/js/src/jit-test/tests/self-test/delazification-mode-03.js @@ -0,0 +1,17 @@ +let source = ` + function foo() { + return "foo"; + } + + // Wait is skipped as the source is not registered in the stencil cache. + waitForStencilCache(foo); + assertEq(isInStencilCache(foo), false); +`; + +const options = { + fileName: "inner-03.js", + lineNumber: 1, + eagerDelazificationStrategy: "ParseEverythingEagerly", + newContext: true, +}; +evaluate(source, options); diff --git a/js/src/jit-test/tests/self-test/getBacktrace-bug1138195.js b/js/src/jit-test/tests/self-test/getBacktrace-bug1138195.js new file mode 100644 index 0000000000..092cdd936f --- /dev/null +++ b/js/src/jit-test/tests/self-test/getBacktrace-bug1138195.js @@ -0,0 +1,8 @@ + +function f(x) { + for (var i = 0; i < 40; ++i) { + var stack = getBacktrace({args: true}); + (function() { g = x;}); + } +} +f(1); diff --git a/js/src/jit-test/tests/self-test/inIon.js b/js/src/jit-test/tests/self-test/inIon.js new file mode 100644 index 0000000000..e14a0bc4a9 --- /dev/null +++ b/js/src/jit-test/tests/self-test/inIon.js @@ -0,0 +1,20 @@ +// Test that inIon eventually becomes truthy. +// This code should never timeout. + +function callInIon() { + return inIon(); +}; + +function test() { + // Test with OSR. + while(!inIon()); + + // Test with inlining. + while(!callInIon()); + + // Test with zealous gc preventing compilation. + while(!inIon()) gc(this, 'shrinking'); +}; + +test(); + diff --git a/js/src/jit-test/tests/self-test/inJit.js b/js/src/jit-test/tests/self-test/inJit.js new file mode 100644 index 0000000000..dd218b5160 --- /dev/null +++ b/js/src/jit-test/tests/self-test/inJit.js @@ -0,0 +1,20 @@ +// Test that inJit eventually becomes truthy. +// This code should never timeout. + +function callInJit() { + return inJit(); +}; + +function test() { + // Test with OSR. + while(!inJit()); + + // Test with inlining. + while(!callInJit()); + + // Test with zealous gc preventing compilation. + while(!inJit()) gc(); +}; + +test(); + diff --git a/js/src/jit-test/tests/self-test/isRelazifiableFunction-0.js b/js/src/jit-test/tests/self-test/isRelazifiableFunction-0.js new file mode 100644 index 0000000000..a75246668d --- /dev/null +++ b/js/src/jit-test/tests/self-test/isRelazifiableFunction-0.js @@ -0,0 +1,3 @@ +// |jit-test| error: Error: The first argument should be a function. + +isRelazifiableFunction(new Array()); diff --git a/js/src/jit-test/tests/self-test/notInIon.js b/js/src/jit-test/tests/self-test/notInIon.js new file mode 100644 index 0000000000..f3da1836e0 --- /dev/null +++ b/js/src/jit-test/tests/self-test/notInIon.js @@ -0,0 +1,3 @@ +// |jit-test| --no-ion + +assertEq(inIon(), "Ion is disabled."); diff --git a/js/src/jit-test/tests/self-test/notInJit.js b/js/src/jit-test/tests/self-test/notInJit.js new file mode 100644 index 0000000000..4bb3469e40 --- /dev/null +++ b/js/src/jit-test/tests/self-test/notInJit.js @@ -0,0 +1,4 @@ +// |jit-test| --no-baseline + +assertEq(inJit(), "Baseline is disabled."); +assertEq(inIon(), "Ion is disabled."); diff --git a/js/src/jit-test/tests/self-test/oom-test-bug1497906.js b/js/src/jit-test/tests/self-test/oom-test-bug1497906.js new file mode 100644 index 0000000000..da6a0a959d --- /dev/null +++ b/js/src/jit-test/tests/self-test/oom-test-bug1497906.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: !('oomTest' in this && 'stackTest' in this) || helperThreadCount() === 0 + +// Check that oomTest throws an exception on worker threads. + +setSharedObject(0); +evalInWorker(` + try { + oomTest(crash); + } catch (e) { + if (e.toString().includes("main thread")) { + setSharedObject(1); + } + } +`); + +while (getSharedObject() != 1) { + // poor-man wait condition. +} diff --git a/js/src/jit-test/tests/self-test/printer-escape-seq.js b/js/src/jit-test/tests/self-test/printer-escape-seq.js new file mode 100644 index 0000000000..80c7fa6b82 --- /dev/null +++ b/js/src/jit-test/tests/self-test/printer-escape-seq.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !getBuildConfiguration("debug") + +// Due to sign extension of characters, we might accidentally extend \xAF into +// \uFFAF, which is incorrect. +assertEq(disassemble("'\xAF'").includes("FFAF"), false); diff --git a/js/src/jit-test/tests/self-test/readlineBuf.js b/js/src/jit-test/tests/self-test/readlineBuf.js new file mode 100644 index 0000000000..1430c4ae49 --- /dev/null +++ b/js/src/jit-test/tests/self-test/readlineBuf.js @@ -0,0 +1,42 @@ +load(libdir + "asserts.js"); + +assertThrowsInstanceOf(function () { readlineBuf() }, Error); + +var testBuffers = [ + "foo\nbar\nbaz\n", + "foo\nbar\nbaz", + "foo\n\nbar\nbaz", + "f", + "\n", + "\nf", + "", + "Ää\n\u{10ffff}", +]; + +var expected = [ + [ "foo", "bar", "baz" ], + [ "foo", "bar", "baz" ], + [ "foo", "", "bar", "baz" ], + [ "f" ], + [ "" ], + [ "", "f" ], + [], + ["Ää", "\u{10ffff}"], +]; + +for (var [idx, testValue] of testBuffers.entries()) { + readlineBuf(testValue); + var result = []; + + while ((line = readlineBuf()) != null) { + result.push(line); + } + + assertDeepEq(result, expected[idx]); +} + +readlineBuf(testBuffers[0]); +readlineBuf(); +readlineBuf(); +readlineBuf(testBuffers[3]); +assertEq(readlineBuf(), expected[3][0]); diff --git a/js/src/jit-test/tests/sharedbuf/asm-link.js b/js/src/jit-test/tests/sharedbuf/asm-link.js new file mode 100644 index 0000000000..865cd10786 --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/asm-link.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +// Don't assert on linking. +// Provide superficial functionality. + +function $(stdlib, foreign, heap) { + "use asm"; + var f64 = new stdlib.Float64Array(heap); + function f() { var v=0.0; v=+f64[0]; return +v; } + return f +} + +var heap = new SharedArrayBuffer(65536); +(new Float64Array(heap))[0] = 3.14159; +assertEq($(this, {}, heap)(), 3.14159); diff --git a/js/src/jit-test/tests/sharedbuf/byteLength.js b/js/src/jit-test/tests/sharedbuf/byteLength.js new file mode 100644 index 0000000000..f2501c55e3 --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/byteLength.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +// SharedArrayBuffer.prototype.byteLength + +load(libdir + "asserts.js"); + +let buffer = new SharedArrayBuffer(137); +assertEq(buffer.byteLength, 137); diff --git a/js/src/jit-test/tests/sharedbuf/gc-one-view.js b/js/src/jit-test/tests/sharedbuf/gc-one-view.js new file mode 100644 index 0000000000..03f1dddf8c --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/gc-one-view.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +// Test tracing of a single linked ArrayBufferViewObject. + +function f() { + var x = new SharedArrayBuffer(0x1000); + var y = new Int32Array(x); + gc(); +} + +f(); diff --git a/js/src/jit-test/tests/sharedbuf/gc-two-views.js b/js/src/jit-test/tests/sharedbuf/gc-two-views.js new file mode 100644 index 0000000000..6a16004b07 --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/gc-two-views.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +// Test tracing of two views of a SharedArrayBuffer. Uses a different path. + +function f() { + var x = new SharedArrayBuffer(0x1000); + var y = new Int32Array(x); + var z = new Int8Array(x); + gc(); +} + +f(); diff --git a/js/src/jit-test/tests/sharedbuf/growable-sab-over-mailbox.js b/js/src/jit-test/tests/sharedbuf/growable-sab-over-mailbox.js new file mode 100644 index 0000000000..3ffb29cc3d --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/growable-sab-over-mailbox.js @@ -0,0 +1,40 @@ +// |jit-test| --enable-arraybuffer-resizable; skip-if: !this.SharedArrayBuffer?.prototype?.grow + +var gsab = new SharedArrayBuffer(4, {maxByteLength: 16}); + +// Test byte lengths are correct. +assertEq(gsab.byteLength, 4); +assertEq(gsab.maxByteLength, 16); + +// Pass |gsab| to the mailbox. +setSharedObject(gsab); + +// Retrieve again from the mailbox to create a new growable shared array buffer +// which points to the same memory. +var gsab2 = getSharedObject(); + +assertEq(gsab !== gsab2, true, "different objects expected"); + +// Byte lengths are correct for both objects. +assertEq(gsab.byteLength, 4); +assertEq(gsab.maxByteLength, 16); +assertEq(gsab2.byteLength, 4); +assertEq(gsab2.maxByteLength, 16); + +// Grow the original object. +gsab.grow(6); + +// Byte lengths are correct for both objects. +assertEq(gsab.byteLength, 6); +assertEq(gsab.maxByteLength, 16); +assertEq(gsab2.byteLength, 6); +assertEq(gsab2.maxByteLength, 16); + +// Grow the copy. +gsab2.grow(8); + +// Byte lengths are correct for both objects. +assertEq(gsab.byteLength, 8); +assertEq(gsab.maxByteLength, 16); +assertEq(gsab2.byteLength, 8); +assertEq(gsab2.maxByteLength, 16); diff --git a/js/src/jit-test/tests/sharedbuf/inline-access.js b/js/src/jit-test/tests/sharedbuf/inline-access.js new file mode 100644 index 0000000000..3672f65c1d --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/inline-access.js @@ -0,0 +1,26 @@ +// |jit-test| slow; skip-if: !this.SharedArrayBuffer +// +// This is for testing inlining behavior in the jits. +// +// For Baseline, run: +// $ IONFLAGS=bl-ic .../js --ion-off --baseline-eager inline-access.js +// Then inspect the output, there should be calls to "GetElem(TypedArray[Int32])", +// "GetProp(NativeObj/NativeGetter 0x...)", and "SetElem_TypedArray stub" +// for the read access, length access, and write access respectively, within f. +// +// For Ion, run: +// $ IONFLAGS=logs .../js --ion-offthread-compile=off inline-access.js +// Then postprocess with iongraph and verify (by inspecting MIR late in the pipeline) +// that it contains instructions like "typedarraylength", "loadtypedarrayelement", +// and "storetypedarrayelement". + +function f(ta) { + return (ta[2] = ta[0] + ta[1] + ta.length); +} + +var v = new Int32Array(new SharedArrayBuffer(4096)); +var sum = 0; +var iter = 1000; +for ( var i=0 ; i < iter ; i++ ) + sum += f(v); +assertEq(sum, v.length * iter); diff --git a/js/src/jit-test/tests/sharedbuf/is-zeroed.js b/js/src/jit-test/tests/sharedbuf/is-zeroed.js new file mode 100644 index 0000000000..e92b7013c8 --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/is-zeroed.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +// Test that the SharedArrayBuffer memory is properly zeroed. + +function f() { + var x = new SharedArrayBuffer(4096); + var y = new Int32Array(x); + assertEq(y[0], 0); + assertEq(y[1], 0); + assertEq(y[1023], 0); +} + +f(); diff --git a/js/src/jit-test/tests/sharedbuf/resized-out-of-bounds-to-in-bounds-index-over-mailbox.js b/js/src/jit-test/tests/sharedbuf/resized-out-of-bounds-to-in-bounds-index-over-mailbox.js new file mode 100644 index 0000000000..5e5d61df25 --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/resized-out-of-bounds-to-in-bounds-index-over-mailbox.js @@ -0,0 +1,38 @@ +// |jit-test| --enable-arraybuffer-resizable; skip-if: !this.SharedArrayBuffer?.prototype?.grow||helperThreadCount()===0 + +let gsab = new SharedArrayBuffer(3, {maxByteLength: 4}); + +setSharedObject(gsab); + +function worker(gsab) { + let ta = new Int8Array(gsab); + + // Wait until `valueOf` is called. + while (Atomics.load(ta, 0) === 0); + + // Now grow the buffer. + gsab.grow(4); + + // Notify the buffer has been resized. + Atomics.store(ta, 1, 1); +} + +evalInWorker(`(${worker})(getSharedObject());`); + +let ta = new Int8Array(gsab); + +let value = { + valueOf() { + // Notify we're in `valueOf()`. + Atomics.store(ta, 0, 1); + + // Wait until buffer has been resized. + while (Atomics.load(ta, 1) === 0); + + // Continue execution. + return 0; + } +}; + +// Write into currently out-of-bounds, but later in-bounds index. +ta[3] = value; diff --git a/js/src/jit-test/tests/sharedbuf/sab-construct-noargs-1068458.js b/js/src/jit-test/tests/sharedbuf/sab-construct-noargs-1068458.js new file mode 100644 index 0000000000..28333d4655 --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/sab-construct-noargs-1068458.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +// Note that as of 2014-09-18 it is not correct to construct a SharedArrayBuffer without +// a length acceptable to asm.js: at-least 4K AND (power-of-two OR multiple-of-16M). +// That is likely to change however (see bug 1068684). The test case is constructed +// to take that into account by catching exceptions. That does not impact the +// original bug, which is an assertion in the implementation. + +try { + new SharedArrayBuffer // No arguments +} +catch (e) { + // Ignore it +} diff --git a/js/src/jit-test/tests/sharedbuf/sab-gating.js b/js/src/jit-test/tests/sharedbuf/sab-gating.js new file mode 100644 index 0000000000..0f7cd07c8d --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/sab-gating.js @@ -0,0 +1,4 @@ +// Check gating of shared memory features in plain js (bug 1231338). + +assertEq(sharedMemoryEnabled(), !!this.SharedArrayBuffer); +assertEq(sharedMemoryEnabled(), !!this.Atomics); diff --git a/js/src/jit-test/tests/sharedbuf/slice-same-memory.js b/js/src/jit-test/tests/sharedbuf/slice-same-memory.js new file mode 100644 index 0000000000..22c2215424 --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/slice-same-memory.js @@ -0,0 +1,25 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +load(libdir + "asserts.js"); + +var sab = new SharedArrayBuffer(1 * Int32Array.BYTES_PER_ELEMENT); + +// Make a copy, sharing the same memory +var sab2 = (setSharedObject(sab), getSharedObject()); + +// Assert it's not the same object +assertEq(sab === sab2, false); + +// Assert they're sharing memory +new Int32Array(sab)[0] = 0x12345678; +assertEq(new Int32Array(sab2)[0], 0x12345678) + +sab.constructor = { + [Symbol.species]: function(length) { + return sab2; + } +}; + +// This should throw because the buffer being sliced shares memory with the new +// buffer it constructs. +assertThrowsInstanceOf(() => sab.slice(), TypeError); diff --git a/js/src/jit-test/tests/sharedbuf/slice.js b/js/src/jit-test/tests/sharedbuf/slice.js new file mode 100644 index 0000000000..0ae188e79f --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/slice.js @@ -0,0 +1,121 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +// SharedArrayBuffer.prototype.slice + +load(libdir + "asserts.js"); + +let buf = new SharedArrayBuffer(1024); +let bufAsI8 = new Int8Array(buf); +for ( let i=0 ; i < buf.length ; i++ ) + bufAsI8[i] = i; + +let base = 10; +let len = 10; + +let buf2 = buf.slice(base, base+len); + +// Smells right? +assertEq(buf2 instanceof SharedArrayBuffer, true); +assertEq(buf2.byteLength, len); + +// Data got copied correctly? +let buf2AsI8 = new Int8Array(buf2); +for ( let i=0 ; i < buf2AsI8.length ; i++ ) + assertEq(buf2AsI8[i], bufAsI8[base+i]); + +// Storage not shared? +let correct = bufAsI8[base]; +bufAsI8[base]++; +assertEq(buf2AsI8[0], correct); + +// Start beyond end +let notail = buf.slice(buf.byteLength+1); +assertEq(notail.byteLength, 0); + +// Negative start +let tail = buf.slice(-5, buf.byteLength); +assertEq(tail.byteLength, 5); +let tailAsI8 = new Int8Array(tail); +for ( let i=0 ; i < tailAsI8.length ; i++ ) + assertEq(tailAsI8[i], bufAsI8[buf.byteLength-5+i]); + +// Negative end +let head = buf.slice(0, -5); +assertEq(head.byteLength, buf.byteLength-5); +let headAsI8 = new Int8Array(head); +for ( let i=0 ; i < headAsI8.length ; i++ ) + assertEq(headAsI8[i], bufAsI8[i]); + +// Subtyping +class MySharedArrayBuffer1 extends SharedArrayBuffer { + constructor(n) { super(n) } +} + +let myBuf = new MySharedArrayBuffer1(1024); + +let myBufAsI8 = new Int8Array(myBuf); +for ( let i=0 ; i < myBuf.length ; i++ ) + myBufAsI8[i] = i; + +let myBufSlice = myBuf.slice(0, 20); + +assertEq(myBufSlice instanceof MySharedArrayBuffer1, true); + +assertEq(myBufSlice.byteLength, 20); + +let myBufSliceAsI8 = new Int8Array(myBufSlice); +for ( let i=0 ; i < myBufSlice.length ; i++ ) + assertEq(myBufAsI8[i], myBufSliceAsI8[i]); + +// Error mode: the method requires an object +assertThrowsInstanceOf(() => buf.slice.call(false, 0, 1), TypeError); + +// Error mode: the method is not generic. +assertThrowsInstanceOf(() => buf.slice.call([1,2,3], 0, 1), TypeError); + +// Error mode (step 15): the buffer constructed on behalf of slice +// is too short. + +class MySharedArrayBuffer2 extends SharedArrayBuffer { + constructor(n) { super(n-1) } +} + +let myBuf2 = new MySharedArrayBuffer2(10); + +assertThrowsInstanceOf(() => myBuf2.slice(0, 5), TypeError); + +// Error mode (step 13): the buffer constructed on behalf of slice +// is not a SharedArrayBuffer. + +let subvert = false; + +class MySharedArrayBuffer3 extends SharedArrayBuffer { + constructor(n) { + super(n); + if (subvert) + return new Array(n); + } +} + +let myBuf3 = new MySharedArrayBuffer3(10); + +subvert = true; +assertThrowsInstanceOf(() => myBuf3.slice(0, 5), TypeError); + +// Error mode (step 14): the buffer constructed on behalf of slice +// is the same as the input buffer. + +let sneaky = null; + +class MySharedArrayBuffer4 extends SharedArrayBuffer { + constructor(n) { + super(n); + if (sneaky) + return sneaky; + } +} + +let myBuf4 = new MySharedArrayBuffer4(10); + +sneaky = myBuf4; +assertThrowsInstanceOf(() => myBuf4.slice(0, 5), TypeError); diff --git a/js/src/jit-test/tests/sharedbuf/subtypes.js b/js/src/jit-test/tests/sharedbuf/subtypes.js new file mode 100644 index 0000000000..cf3adde3ce --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/subtypes.js @@ -0,0 +1,52 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +// Test cases for subclasses of SharedArrayBuffer. + +load(libdir + "asserts.js"); + +// Basic subclassing. + +class MySharedArrayBuffer1 extends SharedArrayBuffer { + constructor(n) { super(n) } +} + +let mv1 = new MySharedArrayBuffer1(1024); +assertEq(mv1 instanceof SharedArrayBuffer, true); +assertEq(mv1 instanceof MySharedArrayBuffer1, true); +assertEq(mv1.byteLength, 1024); + +// Can construct views on the subclasses and read/write elements. + +let mva1 = new Int8Array(mv1); +assertEq(mva1.length, mv1.byteLength); +assertEq(mva1.buffer, mv1); + +for ( let i=1 ; i < mva1.length ; i++ ) + mva1[i] = i; + +for ( let i=1 ; i < mva1.length ; i++ ) + assertEq(mva1[i], (i << 24) >> 24); + +// Passing modified arguments to superclass to get a different length. + +class MySharedArrayBuffer2 extends SharedArrayBuffer { + constructor(n) { super(n-1) } +} + +let mv2 = new MySharedArrayBuffer2(10); +assertEq(mv2 instanceof SharedArrayBuffer, true); +assertEq(mv2 instanceof MySharedArrayBuffer2, true); +assertEq(mv2.byteLength, 9); + +// Returning a different object altogether. + +class MySharedArrayBuffer3 extends SharedArrayBuffer { + constructor(n) { + return new Array(n); + } +} + +let mv3 = new MySharedArrayBuffer3(10); +assertEq(mv3 instanceof Array, true); +assertEq(mv3 instanceof MySharedArrayBuffer3, false); +assertEq(mv3.length, 10); diff --git a/js/src/jit-test/tests/sharedbuf/typedarray-from-sharedtypedarray-with-overridden-length.js b/js/src/jit-test/tests/sharedbuf/typedarray-from-sharedtypedarray-with-overridden-length.js new file mode 100644 index 0000000000..100443495a --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/typedarray-from-sharedtypedarray-with-overridden-length.js @@ -0,0 +1,24 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +// This would hit an assertion in debug builds due to an incorrect +// type guard in the code that copies data from STA to TA. + +// Original test case + +var sab = new SharedArrayBuffer(4); + +var x = new Int32Array(sab); +x.__proto__ = (function(){}); +new Uint8Array(x); // Would assert here + +// Supposedly equivalent test case, provoking the error directly + +var x = new Int32Array(sab); +Object.defineProperty(x, "length", { value: 0 }); +new Uint8Array(x); // Would assert here + +// Derived test case - would not tickle the bug, though. + +var x = new Int32Array(sab); +Object.defineProperty(x, "length", { value: 1 << 20 }); +new Uint8Array(x); diff --git a/js/src/jit-test/tests/stream/bug-1387503-1.js b/js/src/jit-test/tests/stream/bug-1387503-1.js new file mode 100644 index 0000000000..a12dc2ad1d --- /dev/null +++ b/js/src/jit-test/tests/stream/bug-1387503-1.js @@ -0,0 +1,38 @@ +// |jit-test| skip-if: !this.hasOwnProperty("ReadableStream") +// Test uncatchable error when a stream source's pull() method is called. + +// Make `debugger;` raise an uncatchable error. +let g = newGlobal({newCompartment: true}); +g.parent = this; +g.hit = false; +g.eval(` + new Debugger(parent).onDebuggerStatement = _frame => (hit = true, null); +`); + +// Create a stream whose pull() method raises an uncatchable error, +// and try reading from it. +let readerCreated = false; +let fnFinished = false; +async function fn() { + try { + let stream = new ReadableStream({ + start(controller) {}, + pull(controller) { + debugger; + } + }); + + let reader = stream.getReader(); + let p = reader.read(); + readerCreated = true; + await p; + } finally { + fnFinished = true; + } +} + +fn(); +drainJobQueue(); +assertEq(readerCreated, true); +assertEq(g.hit, true); +assertEq(fnFinished, false); diff --git a/js/src/jit-test/tests/stream/bug-1387503-2.js b/js/src/jit-test/tests/stream/bug-1387503-2.js new file mode 100644 index 0000000000..d6885f325a --- /dev/null +++ b/js/src/jit-test/tests/stream/bug-1387503-2.js @@ -0,0 +1,40 @@ +// |jit-test| skip-if: !this.hasOwnProperty("ReadableStream") +// Test uncatchable error when a stream's queuing strategy's size() method is called. + +// Make `debugger;` raise an uncatchable exception. +let g = newGlobal({newCompartment: true}); +g.parent = this; +g.hit = false; +g.eval(` + var dbg = new Debugger(parent); + dbg.onDebuggerStatement = (_frame, exc) => (hit = true, null); +`); + +let fnFinished = false; +async function fn() { + // Await once to postpone the uncatchable error until we're running inside + // a reaction job. We don't want the rest of the test to be terminated. + // (`drainJobQueue` catches uncatchable errors!) + await 1; + + try { + // Create a stream with a strategy whose .size() method raises an + // uncatchable exception, and have it call that method. + new ReadableStream({ + start(controller) { + controller.enqueue("FIRST POST"); // this calls .size() + } + }, { + size() { + debugger; + } + }); + } finally { + fnFinished = true; + } +} + +fn(); +drainJobQueue(); +assertEq(g.hit, true); +assertEq(fnFinished, false); diff --git a/js/src/jit-test/tests/stream/bug-1503399-1.js b/js/src/jit-test/tests/stream/bug-1503399-1.js new file mode 100644 index 0000000000..a5f7443279 --- /dev/null +++ b/js/src/jit-test/tests/stream/bug-1503399-1.js @@ -0,0 +1,19 @@ +// |jit-test| skip-if: !this.hasOwnProperty("ReadableStream") +// Don't assert if the wrapper that's the value of stream.[[reader]] gets nuked. + +load(libdir + "asserts.js"); + +ignoreUnhandledRejections(); + +let g = newGlobal({newCompartment: true}); +let stream = new ReadableStream({ + start(controller) { + controller.enqueue("ponies"); + controller.close(); + } +}); +g.stream = stream; +g.eval("var reader = ReadableStream.prototype.getReader.call(stream);"); +nukeCCW(g.reader); +assertErrorMessage(() => g.eval("reader.read()"), g.TypeError, "can't access dead object"); +g.eval("reader.releaseLock();"); diff --git a/js/src/jit-test/tests/stream/bug-1503399-2.js b/js/src/jit-test/tests/stream/bug-1503399-2.js new file mode 100644 index 0000000000..fe7de74e7c --- /dev/null +++ b/js/src/jit-test/tests/stream/bug-1503399-2.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !this.hasOwnProperty("ReadableStream") +// Don't assert if the wrapper that's the value of reader.[[stream]] gets nuked. + +load(libdir + "asserts.js"); + +let g = newGlobal({newCompartment: true}); +let stream = new g.ReadableStream({}); +let reader = ReadableStream.prototype.getReader.call(stream); +nukeCCW(stream); + +assertErrorMessage(() => reader.read(), TypeError, "can't access dead object"); +assertErrorMessage(() => reader.releaseLock(), TypeError, "can't access dead object"); diff --git a/js/src/jit-test/tests/stream/bug-1503406.js b/js/src/jit-test/tests/stream/bug-1503406.js new file mode 100644 index 0000000000..c325b5ea01 --- /dev/null +++ b/js/src/jit-test/tests/stream/bug-1503406.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: !this.hasOwnProperty("ReadableStream") +let g = newGlobal(); +let reader = g.eval(` + let stream = new ReadableStream({ + start(controller) { + controller.enqueue([]); + }, + }); + let [b1, b2] = stream.tee(); + b1.getReader(); +`); +let read = new ReadableStream({}).getReader().read; +drainJobQueue(); // let the stream be started before reading +read.call(reader); diff --git a/js/src/jit-test/tests/stream/bug-1512008.js b/js/src/jit-test/tests/stream/bug-1512008.js new file mode 100644 index 0000000000..32dc847256 --- /dev/null +++ b/js/src/jit-test/tests/stream/bug-1512008.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !this.hasOwnProperty("ReadableStream") +ignoreUnhandledRejections(); + +Object.defineProperty(Promise, Symbol.species, { + value: function(g) { + g(function() {}, function() {}) + } +}); +new ReadableStream().tee(); diff --git a/js/src/jit-test/tests/stream/bug-1513266.js b/js/src/jit-test/tests/stream/bug-1513266.js new file mode 100644 index 0000000000..3db1e2d941 --- /dev/null +++ b/js/src/jit-test/tests/stream/bug-1513266.js @@ -0,0 +1,16 @@ +// |jit-test| --no-ion; --no-baseline; skip-if: !('oomTest' in this && this.hasOwnProperty("ReadableStream")) + +ignoreUnhandledRejections(); + +function test() { + let controller; + let stream = new ReadableStream({ + start(c) { } + }); + stream.getReader(); + drainJobQueue(); +} + +// Force lazy parsing to happen before oomTest starts (see `help(oomTest)`). +test(); +oomTest(test, { verbose: true, keepFailing: false }); diff --git a/js/src/jit-test/tests/stream/bug-1515816.js b/js/src/jit-test/tests/stream/bug-1515816.js new file mode 100644 index 0000000000..44329b056d --- /dev/null +++ b/js/src/jit-test/tests/stream/bug-1515816.js @@ -0,0 +1,17 @@ +// |jit-test| --no-ion; --no-baseline; --no-blinterp; skip-if: !('oomAfterAllocations' in this && this.hasOwnProperty("ReadableStream")) +// Don't crash on OOM in ReadableStreamDefaultReader.prototype.read(). + +for (let n = 1; n < 1000; n++) { + let stream = new ReadableStream({ + start(controller) { + controller.enqueue(7); + } + }); + let reader = stream.getReader(); + oomAfterAllocations(n); + try { + reader.read(); + n = 1000; + } catch { } + resetOOMFailure(); +} diff --git a/js/src/jit-test/tests/stream/proper-realm-cancel.js b/js/src/jit-test/tests/stream/proper-realm-cancel.js new file mode 100644 index 0000000000..b1098c3698 --- /dev/null +++ b/js/src/jit-test/tests/stream/proper-realm-cancel.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !this.hasOwnProperty("ReadableStream") + +ignoreUnhandledRejections(); + +var g = newGlobal({ newCompartment: true }); +var ccwCancelMethod = new g.Function("return 17;"); + +new ReadableStream({ cancel: ccwCancelMethod }).cancel("bye"); diff --git a/js/src/jit-test/tests/stream/proper-realm-pull.js b/js/src/jit-test/tests/stream/proper-realm-pull.js new file mode 100644 index 0000000000..60ef7f5d82 --- /dev/null +++ b/js/src/jit-test/tests/stream/proper-realm-pull.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !this.hasOwnProperty("ReadableStream") +ignoreUnhandledRejections(); + +var g = newGlobal({ newCompartment: true }); +var ccwPullMethod = new g.Function("return 17;"); + +new ReadableStream({ pull: ccwPullMethod }); diff --git a/js/src/jit-test/tests/stream/reader-closedPromise-handled-2.js b/js/src/jit-test/tests/stream/reader-closedPromise-handled-2.js new file mode 100644 index 0000000000..0525ff91ee --- /dev/null +++ b/js/src/jit-test/tests/stream/reader-closedPromise-handled-2.js @@ -0,0 +1,34 @@ +// |jit-test| skip-if: !this.hasOwnProperty("ReadableStream") +// Releasing a reader should not result in a promise being tracked as +// unhandled. + +function test(readable) { + // Create an errored stream. + let controller; + let stream = new ReadableStream({ + start(c) { + controller = c; + } + }); + drainJobQueue(); + + // Track promises. + let status = new Map; + setPromiseRejectionTrackerCallback((p, x) => { status.set(p, x); }); + + // Per Streams spec 3.7.5 step 5, this creates a rejected promise + // (reader.closed) but marks it as handled. + let reader = stream.getReader(); + if (!readable) { + controller.close(); + } + reader.releaseLock(); + + // Check that the promise's status is not 0 (unhandled); + // it may be either 1 (handled) or undefined (never tracked). + let result = status.get(reader.closed); + assertEq(result === 1 || result === undefined, true); +} + +test(true); +test(false); diff --git a/js/src/jit-test/tests/stream/reader-closedPromise-handled.js b/js/src/jit-test/tests/stream/reader-closedPromise-handled.js new file mode 100644 index 0000000000..b17a8dda4d --- /dev/null +++ b/js/src/jit-test/tests/stream/reader-closedPromise-handled.js @@ -0,0 +1,24 @@ +// |jit-test| skip-if: !this.hasOwnProperty("ReadableStream") +// Creating a reader from an errored stream should not result in a promise +// being tracked as unhandled. + +// Create an errored stream. +let stream = new ReadableStream({ + start(controller) { + controller.error(new Error("splines insufficiently reticulated")); + } +}); +drainJobQueue(); + +// Track promises. +let status = new Map; +setPromiseRejectionTrackerCallback((p, x) => { status.set(p, x); }); + +// Per Streams spec 3.7.4 step 5.c, this creates a rejected promise +// (reader.closed) but marks it as handled. +let reader = stream.getReader(); + +// Check that the promise's status is not 0 (unhandled); +// it may be either 1 (handled) or undefined (never tracked). +let result = status.get(reader.closed); +assertEq(result === 1 || result === undefined, true); diff --git a/js/src/jit-test/tests/structured-clone/Map-Set-cross-compartment.js b/js/src/jit-test/tests/structured-clone/Map-Set-cross-compartment.js new file mode 100644 index 0000000000..8ce792562e --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/Map-Set-cross-compartment.js @@ -0,0 +1,11 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +// Don't crash +serialize(evalcx("new Set(['x', 'y'])")); +serialize(evalcx("new Map([['x', 1]])")); + +assertEq(deserialize(serialize(evalcx("new Set([1, 2, 3])"))).has(1), true); +assertEq(deserialize(serialize(evalcx("new Map([['x', 1]])"))).get('x'), 1); diff --git a/js/src/jit-test/tests/structured-clone/Map.js b/js/src/jit-test/tests/structured-clone/Map.js new file mode 100644 index 0000000000..51ac240961 --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/Map.js @@ -0,0 +1,112 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +load(libdir + "asserts.js"); + +var map = new Map(); +map.set("self", map); + +var magic = deserialize(serialize(map)); +assertEq(magic.get("self"), magic); +assertEq(magic.size, 1); + +map = new Map(); +map.set(map, "self"); + +magic = deserialize(serialize(map)); +assertEq(magic.get(magic), "self"); +assertEq(magic.size, 1); + +var values = [ + "a", "\uDEFF", undefined, null, -3.5, true, false, NaN, 155, -2 +] + +map = new Map(); +for (var value of values) { + map.set(value, value); +} + +magic = deserialize(serialize(map)); +var i = 0; +for (value of magic) { + assertEq(value[0], value[1]); + assertEq(value[0], values[i++]); +} + +assertDeepEq([...map.keys()], [...magic.keys()]); +assertDeepEq([...map.values()], [...magic.values()]); + +var obj = {a: 1}; +obj.map = new Map(); +obj.map.set("obj", obj); + +magic = deserialize(serialize(obj)); + +assertEq(magic.map.get("obj"), magic); +assertEq(magic.a, 1); + +map = new Map(); +map.set("a", new Number(1)); +map.set("b", new String("aaaa")); +map.set("c", new Date(NaN)); + +magic = deserialize(serialize(map)); + +assertEq(magic.get("a").valueOf(), 1); +assertEq(magic.get("b").valueOf(), "aaaa"); +assertEq(magic.get("c").valueOf(), NaN); + +assertDeepEq([...map.keys()], ["a", "b", "c"]); + +map = new Map(); +map.set("x", new Map()); +map.get("x").set("x", map); +map.get("x").set("b", null); + +magic = deserialize(serialize(map)); + +assertEq(magic.get("x").get("x"), magic); +assertEq(magic.get("x").get("b"), null); + +map = new Map() +map.set({a: 1}, "b"); + +magic = deserialize(serialize(map)); + +obj = [...magic.keys()][0]; +assertEq(obj.a, 1); +assertEq(magic.get(obj), "b"); + +// Make sure expandos aren't cloned (Bug 1041172) +map = new Map(); +map.a = "aaaaa"; +magic = deserialize(serialize(map)); +assertEq("a" in magic, false); +assertEq(Object.keys(magic).length, 0); + +// Busted [[Prototype]] shouldn't matter +map = new Map(); +Object.setPrototypeOf(map, null); +Map.prototype.set.call(map, "self", map); +magic = deserialize(serialize(map)); +assertEq(magic.get("self"), magic); +assertEq(magic.size, 1); + +// Can't fuzz around with Map after it is cloned +obj = { + a: new Map(), + get b() { + obj.a.delete("test"); + return "invoked"; + } +} +obj.a.set("test", "hello"); +assertEq(obj.a.has("test"), true); +magic = deserialize(serialize(obj)); +assertEq(obj.a.has("test"), false); +assertEq(magic.a.size, 1); +assertEq(magic.a.get("test"), "hello"); +assertEq([...magic.a.keys()].toString(), "test"); +assertEq(magic.b, "invoked"); \ No newline at end of file diff --git a/js/src/jit-test/tests/structured-clone/Set.js b/js/src/jit-test/tests/structured-clone/Set.js new file mode 100644 index 0000000000..76c1651715 --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/Set.js @@ -0,0 +1,84 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +load(libdir + "asserts.js"); + +var set = new Set(); +set.add(set); + +var magic = deserialize(serialize(set)); +assertEq(magic.size, 1); +assertEq(magic.values().next().value, magic); + +var values = [ + "a", "\uDEFF", undefined, null, -3.5, true, false, NaN, 155, -2 +] + +set = new Set(); +for (var value of values) { + set.add(value) +} + +magic = deserialize(serialize(set)); +var i = 0; +for (value of magic) { + assertEq(value, values[i++]); +} + +assertDeepEq([...set.keys()], [...magic.keys()]); +assertDeepEq([...set.values()], [...magic.values()]); + +var obj = {a: 1}; +obj.set = new Set(); +obj.set.add(obj); + +magic = deserialize(serialize(obj)); + +assertEq(magic.set.values().next().value, magic); +assertEq(magic.a, 1); + +set = new Set(); +set.add(new Number(1)); +set.add(new String("aaaa")); +set.add(new Date(NaN)); + +magic = deserialize(serialize(set)); + +values = magic.values(); +assertEq(values.next().value.valueOf(), 1); +assertEq(values.next().value.valueOf(), "aaaa"); +assertEq(values.next().value.valueOf(), NaN); +assertEq(values.next().done, true); + +// Make sure expandos aren't cloned (Bug 1041172) +set = new Set(); +set.a = "aaaaa"; +magic = deserialize(serialize(set)); +assertEq("a" in magic, false); +assertEq(Object.keys(magic).length, 0); + +// Busted [[Prototype]] shouldn't matter +set = new Set(); +Object.setPrototypeOf(set, null); +Set.prototype.add.call(set, "aaa"); +magic = deserialize(serialize(set)); +assertEq(magic.has("aaa"), true); +assertEq(magic.size, 1); + +// Can't fuzz around with Set after it is cloned +obj = { + a: new Set(), + get b() { + obj.a.delete("test"); + return "invoked"; + } +} +obj.a.add("test"); +assertEq(obj.a.has("test"), true); +magic = deserialize(serialize(obj)); +assertEq(obj.a.has("test"), false); +assertEq(magic.a.size, 1); +assertEq([...magic.a.keys()].toString(), "test"); +assertEq(magic.b, "invoked"); \ No newline at end of file diff --git a/js/src/jit-test/tests/structured-clone/array-buffers.js b/js/src/jit-test/tests/structured-clone/array-buffers.js new file mode 100644 index 0000000000..fcb61f6eca --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/array-buffers.js @@ -0,0 +1,80 @@ +// Tests for ArrayBuffer, TypedArray, and DataView encoding/decoding. + +var clonebuffer = serialize("dummy"); + +// ========= V2 ========= + +function testV2Int32Array() { + var buf = new Uint8Array([3,0,0,0,0,0,241,255,3,0,0,0,16,0,255,255,4,0,0,0,0,0,0,0,12,0,0,0,9,0,255,255,1,0,0,0,177,127,57,5,133,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0]); + clonebuffer.clonebuffer = buf.buffer; + var ta = deserialize(clonebuffer); + assertEq(ta instanceof Int32Array, true); + assertEq(ta.toString(), "1,87654321,-123"); +} +testV2Int32Array(); + +function testV2Float64Array() { + var buf = new Uint8Array([3,0,0,0,0,0,241,255,4,0,0,0,16,0,255,255,7,0,0,0,0,0,0,0,32,0,0,0,9,0,255,255,0,0,0,0,0,0,248,127,31,133,235,81,184,30,9,64,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]); + clonebuffer.clonebuffer = buf.buffer; + var ta = deserialize(clonebuffer); + assertEq(ta instanceof Float64Array, true); + assertEq(ta.toString(), "NaN,3.14,0,0"); +} +testV2Float64Array(); + +function testV2DataView() { + var buf = new Uint8Array([3,0,0,0,0,0,241,255,3,0,0,0,21,0,255,255,3,0,0,0,9,0,255,255,5,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0]); + clonebuffer.clonebuffer = buf.buffer; + var dv = deserialize(clonebuffer); + assertEq(dv instanceof DataView, true); + assertEq(new Uint8Array(dv.buffer).toString(), "5,0,255"); +} +testV2DataView(); + +function testV2ArrayBuffer() { + var buf = new Uint8Array([3,0,0,0,0,0,241,255,4,0,0,0,9,0,255,255,33,44,55,66,0,0,0,0]); + clonebuffer.clonebuffer = buf.buffer; + var ab = deserialize(clonebuffer); + assertEq(ab instanceof ArrayBuffer, true); + assertEq(new Uint8Array(ab).toString(), "33,44,55,66"); +} +testV2ArrayBuffer(); + +// ========= Current ========= + +function testInt32Array() { + var ta1 = new Int32Array([1, 87654321, -123]); + var clonebuf = serialize(ta1, undefined, {scope: "DifferentProcessForIndexedDB"}); + var ta2 = deserialize(clonebuf); + assertEq(ta2 instanceof Int32Array, true); + assertEq(ta2.toString(), "1,87654321,-123"); +} +testInt32Array(); + +function testFloat64Array() { + var ta1 = new Float64Array([NaN, 3.14, 0, 0]); + var clonebuf = serialize(ta1, undefined, {scope: "DifferentProcessForIndexedDB"}); + var ta2 = deserialize(clonebuf); + assertEq(ta2 instanceof Float64Array, true); + assertEq(ta2.toString(), "NaN,3.14,0,0"); +} +testFloat64Array(); + +function testDataView() { + var ta = new Uint8Array([5, 0, 255]); + var dv1 = new DataView(ta.buffer); + var clonebuf = serialize(dv1, undefined, {scope: "DifferentProcessForIndexedDB"}); + var dv2 = deserialize(clonebuf); + assertEq(dv2 instanceof DataView, true); + assertEq(new Uint8Array(dv2.buffer).toString(), "5,0,255"); +} +testDataView(); + +function testArrayBuffer() { + var ta = new Uint8Array([33, 44, 55, 66]); + var clonebuf = serialize(ta.buffer, undefined, {scope: "DifferentProcessForIndexedDB"}); + var ab = deserialize(clonebuf); + assertEq(ab instanceof ArrayBuffer, true); + assertEq(new Uint8Array(ab).toString(), "33,44,55,66"); +} +testArrayBuffer(); diff --git a/js/src/jit-test/tests/structured-clone/bug1687243.js b/js/src/jit-test/tests/structured-clone/bug1687243.js new file mode 100644 index 0000000000..13b7b83a07 --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/bug1687243.js @@ -0,0 +1,30 @@ +let invalidTypedArrays = [ + // Uint8Array with invalid length. + [3,0,0,0,0,0,241,255,0,0,0,0,32,0,255,255,3,0,0,0,0,0,0,255,0,0,0,0,31,0,255,255,3,0,0,0,0,0,0,0,1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0], + // Uint8Array with invalid byteOffset. + [3,0,0,0,0,0,241,255,0,0,0,0,32,0,255,255,3,0,0,0,0,0,0,0,0,0,0,0,31,0,255,255,3,0,0,0,0,0,0,0,1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,1], +]; +let invalidDataViews = [ + // DataView with invalid length. + [3,0,0,0,0,0,241,255,0,0,0,0,33,0,255,255,3,0,0,0,0,0,0,255,0,0,0,0,31,0,255,255,3,0,0,0,0,0,0,0,1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0], + // DataView with invalid byteOffset. + [3,0,0,0,0,0,241,255,0,0,0,0,33,0,255,255,3,0,0,0,0,0,0,0,0,0,0,0,31,0,255,255,3,0,0,0,0,0,0,0,1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,1], +]; +function checkError(data, message) { + let clonebuffer = serialize("dummy"); + let buf = new Uint8Array(data); + clonebuffer.clonebuffer = buf.buffer; + let ex = null; + try { + deserialize(clonebuffer); + } catch (e) { + ex = e; + } + assertEq(ex.toString().includes(message), true); +} +for (let data of invalidTypedArrays) { + checkError(data, "invalid typed array length or offset"); +} +for (let data of invalidDataViews) { + checkError(data, "invalid DataView length or offset"); +} diff --git a/js/src/jit-test/tests/structured-clone/bug1875797.js b/js/src/jit-test/tests/structured-clone/bug1875797.js new file mode 100644 index 0000000000..b512ff36df --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/bug1875797.js @@ -0,0 +1,2 @@ +a = makeSerializable(); +serialize(a, [a]); diff --git a/js/src/jit-test/tests/structured-clone/errors.js b/js/src/jit-test/tests/structured-clone/errors.js new file mode 100644 index 0000000000..6e72d46b7c --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/errors.js @@ -0,0 +1,139 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +load(libdir + "asserts.js"); + +function roundtrip(error) { + return deserialize(serialize(error, [])); +} + +// Basic +{ + let error = new Error("hello world"); + let cloned = roundtrip(error); + + assertDeepEq(cloned, error); + assertEq(cloned.name, "Error"); + assertEq(cloned.message, "hello world"); + assertEq(cloned.stack, error.stack); +} + +let constructors = [Error, EvalError, RangeError, ReferenceError, + SyntaxError, TypeError, URIError]; +for (let constructor of constructors) { + // With message + let error = new constructor("hello"); + let cloned = roundtrip(error); + assertDeepEq(cloned, error); + assertEq(cloned.hasOwnProperty('message'), true); + assertEq(cloned instanceof constructor, true); + + // Without message + error = new constructor(); + cloned = roundtrip(error); + assertDeepEq(cloned, error); + assertEq(cloned.hasOwnProperty('message'), false); + assertEq(cloned instanceof constructor, true); + + // Custom name + error = new constructor("hello"); + error.name = "MyError"; + cloned = roundtrip(error); + assertEq(cloned.name, "Error"); + assertEq(cloned.message, "hello"); + assertEq(cloned.stack, error.stack); + if (constructor !== Error) { + assertEq(cloned instanceof constructor, false); + } + + // |cause| property + error = new constructor("hello", { cause: new Error("foobar") }); + cloned = roundtrip(error); + assertDeepEq(cloned, error); + assertEq(cloned.hasOwnProperty('message'), true); + assertEq(cloned instanceof constructor, true); + assertEq(cloned.stack, error.stack); + assertEq(cloned.stack === undefined, false); + + // |cause| property, manually added after construction. + error = new constructor("hello"); + error.cause = new Error("foobar"); + assertDeepEq(Object.getOwnPropertyDescriptor(error, "cause"), { + value: error.cause, + writable: true, + enumerable: true, + configurable: true, + }); + cloned = roundtrip(error); + assertDeepEq(Object.getOwnPropertyDescriptor(cloned, "cause"), { + value: cloned.cause, + writable: true, + enumerable: false, // Non-enumerable in the cloned object! + configurable: true, + }); + assertEq(cloned.hasOwnProperty('message'), true); + assertEq(cloned instanceof constructor, true); + assertEq(cloned.stack, error.stack); + assertEq(cloned.stack === undefined, false); + + // Subclassing + error = new (class MyError extends constructor {}); + cloned = roundtrip(error); + assertEq(cloned.name, constructor.name); + assertEq(cloned.hasOwnProperty('message'), false); + assertEq(cloned.stack, error.stack); + assertEq(cloned instanceof Error, true); + + // Cross-compartment + error = evalcx(`new ${constructor.name}("hello")`); + cloned = roundtrip(error); + assertEq(cloned.name, constructor.name); + assertEq(cloned.message, "hello"); + assertEq(cloned.stack, error.stack); + assertEq(cloned instanceof constructor, true); +} + +// Non-string message +{ + let error = new Error("hello world"); + error.message = 123; + let cloned = roundtrip(error); + assertEq(cloned.message, "123"); + assertEq(cloned.hasOwnProperty('message'), true); + + error = new Error(); + Object.defineProperty(error, 'message', { get: () => {} }); + cloned = roundtrip(error); + assertEq(cloned.message, ""); + assertEq(cloned.hasOwnProperty('message'), false); +} + +// AggregateError +{ + // With message + let error = new AggregateError([{a: 1}, {b: 2}], "hello"); + let cloned = roundtrip(error); + assertDeepEq(cloned, error); + assertEq(cloned.hasOwnProperty('message'), true); + assertEq(cloned instanceof AggregateError, true); + + // Without message + error = new AggregateError([{a: 1}, {b: 2}]); + cloned = roundtrip(error); + assertDeepEq(cloned, error); + assertEq(cloned.hasOwnProperty('message'), false); + assertEq(cloned instanceof AggregateError, true); + + // Custom name breaks this! + error = new AggregateError([{a: 1}, {b: 2}]); + error.name = "MyError"; + cloned = roundtrip(error); + assertEq(cloned.name, "Error"); + assertEq(cloned.message, ""); + assertEq(cloned.stack, error.stack); + assertEq(cloned instanceof AggregateError, false); + assertEq(cloned.errors, undefined); + assertEq(cloned.hasOwnProperty('errors'), false); +} diff --git a/js/src/jit-test/tests/structured-clone/growable-shared-array-buffers.js b/js/src/jit-test/tests/structured-clone/growable-shared-array-buffers.js new file mode 100644 index 0000000000..f4eba68231 --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/growable-shared-array-buffers.js @@ -0,0 +1,126 @@ +// |jit-test| --enable-arraybuffer-resizable; skip-if: !SharedArrayBuffer.prototype.grow + +const scopes = [ + "SameProcess", +]; + +const g = newGlobal({enableCoopAndCoep: true}); + +const options = { + SharedArrayBuffer: "allow", +}; + +function testInt32Array(scope) { + var length = 4; + var byteLength = length * Int32Array.BYTES_PER_ELEMENT; + var maxByteLength = 2 * byteLength; + + var ab = new SharedArrayBuffer(byteLength, {maxByteLength}); + assertEq(ab.growable, true); + assertEq(ab.byteLength, byteLength); + assertEq(ab.maxByteLength, maxByteLength); + + var ta1 = new Int32Array(ab); + assertEq(ta1.byteLength, byteLength); + ta1.set([1, 87654321, -123]); + assertEq(ta1.toString(), "1,87654321,-123,0"); + + var clonebuf = g.serialize(ta1, undefined, {scope, ...options}); + var ta2 = g.deserialize(clonebuf, {...options}); + assertEq(ta2 instanceof g.Int32Array, true); + assertEq(ta2.byteLength, byteLength); + assertEq(ta2.toString(), "1,87654321,-123,0"); + assertEq(ta2.buffer.growable, true); + assertEq(ta2.buffer.byteLength, byteLength); + assertEq(ta2.buffer.maxByteLength, maxByteLength); + + ta2.buffer.grow(maxByteLength); + assertEq(ta2.byteLength, maxByteLength); +} +scopes.forEach(testInt32Array); + +function testFloat64Array(scope) { + var length = 4; + var byteLength = length * Float64Array.BYTES_PER_ELEMENT; + var maxByteLength = 2 * byteLength; + + var ab = new SharedArrayBuffer(byteLength, {maxByteLength}); + assertEq(ab.growable, true); + assertEq(ab.byteLength, byteLength); + assertEq(ab.maxByteLength, maxByteLength); + + var ta1 = new Float64Array(ab); + assertEq(ta1.byteLength, byteLength); + ta1.set([NaN, 3.14, 0, 0]); + assertEq(ta1.toString(), "NaN,3.14,0,0"); + + var clonebuf = g.serialize(ta1, undefined, {scope, ...options}); + var ta2 = g.deserialize(clonebuf, {...options}); + assertEq(ta2 instanceof g.Float64Array, true); + assertEq(ta2.byteLength, byteLength); + assertEq(ta2.toString(), "NaN,3.14,0,0"); + assertEq(ta2.buffer.growable, true); + assertEq(ta2.buffer.byteLength, byteLength); + assertEq(ta2.buffer.maxByteLength, maxByteLength); + + ta2.buffer.grow(maxByteLength); + assertEq(ta2.byteLength, maxByteLength); +} +scopes.forEach(testFloat64Array); + +function testDataView(scope) { + var length = 4; + var byteLength = length * Uint8Array.BYTES_PER_ELEMENT; + var maxByteLength = 2 * byteLength; + + var ab = new SharedArrayBuffer(byteLength, {maxByteLength}); + assertEq(ab.growable, true); + assertEq(ab.byteLength, byteLength); + assertEq(ab.maxByteLength, maxByteLength); + + var ta = new Uint8Array(ab); + ta.set([5, 0, 255]); + assertEq(ta.toString(), "5,0,255,0"); + var dv1 = new DataView(ab); + assertEq(dv1.byteLength, byteLength); + + var clonebuf = g.serialize(dv1, undefined, {scope, ...options}); + var dv2 = g.deserialize(clonebuf, {...options}); + assertEq(dv2 instanceof g.DataView, true); + assertEq(dv2.byteLength, byteLength); + assertEq(new Uint8Array(dv2.buffer).toString(), "5,0,255,0"); + assertEq(dv2.buffer.growable, true); + assertEq(dv2.buffer.byteLength, byteLength); + assertEq(dv2.buffer.maxByteLength, maxByteLength); + + dv2.buffer.grow(maxByteLength); + assertEq(dv2.byteLength, maxByteLength); +} +scopes.forEach(testDataView); + +function testArrayBuffer(scope) { + var length = 4; + var byteLength = length * Uint8Array.BYTES_PER_ELEMENT; + var maxByteLength = 2 * byteLength; + + var ab = new SharedArrayBuffer(byteLength, {maxByteLength}); + assertEq(ab.growable, true); + assertEq(ab.byteLength, byteLength); + assertEq(ab.maxByteLength, maxByteLength); + + var ta = new Uint8Array(ab); + ta.set([33, 44, 55, 66]); + assertEq(ta.toString(), "33,44,55,66"); + + var clonebuf = g.serialize(ab, undefined, {scope, ...options}); + var ab2 = g.deserialize(clonebuf, {...options}); + assertEq(ab2 instanceof g.SharedArrayBuffer, true); + assertEq(new Uint8Array(ab2).toString(), "33,44,55,66"); + assertEq(ab2.growable, true); + assertEq(ab2.byteLength, byteLength); + assertEq(ab2.maxByteLength, maxByteLength); + + ab2.grow(maxByteLength); + assertEq(ab2.byteLength, maxByteLength); +} +scopes.forEach(testArrayBuffer); diff --git a/js/src/jit-test/tests/structured-clone/resizable-array-buffers-transferable.js b/js/src/jit-test/tests/structured-clone/resizable-array-buffers-transferable.js new file mode 100644 index 0000000000..dd7c7fb075 --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/resizable-array-buffers-transferable.js @@ -0,0 +1,37 @@ +// |jit-test| --enable-arraybuffer-resizable; skip-if: !ArrayBuffer.prototype.resize + +const scopes = [ + "SameProcess", + "DifferentProcess", + "DifferentProcessForIndexedDB", +]; + +function testArrayBufferTransferable(scope) { + var length = 4; + var byteLength = length * Uint8Array.BYTES_PER_ELEMENT; + var maxByteLength = 2 * byteLength; + + var ab = new ArrayBuffer(byteLength, {maxByteLength}); + assertEq(ab.resizable, true); + assertEq(ab.byteLength, byteLength); + assertEq(ab.maxByteLength, maxByteLength); + + var ta = new Uint8Array(ab); + ta.set([33, 44, 55, 66]); + assertEq(ta.toString(), "33,44,55,66"); + + var clonebuf = serialize(ab, [ab], {scope}); + var ab2 = deserialize(clonebuf); + assertEq(ab2 instanceof ArrayBuffer, true); + assertEq(new Uint8Array(ab2).toString(), "33,44,55,66"); + assertEq(ab2.resizable, true); + assertEq(ab2.byteLength, byteLength); + assertEq(ab2.maxByteLength, maxByteLength); + + assertEq(ab.detached, true); + assertEq(ab2.detached, false); + + ab2.resize(maxByteLength); + assertEq(ab2.byteLength, maxByteLength); +} +scopes.forEach(testArrayBufferTransferable); diff --git a/js/src/jit-test/tests/structured-clone/resizable-array-buffers.js b/js/src/jit-test/tests/structured-clone/resizable-array-buffers.js new file mode 100644 index 0000000000..bc435f92a0 --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/resizable-array-buffers.js @@ -0,0 +1,122 @@ +// |jit-test| --enable-arraybuffer-resizable; skip-if: !ArrayBuffer.prototype.resize + +const scopes = [ + "SameProcess", + "DifferentProcess", + "DifferentProcessForIndexedDB", +]; + +function testInt32Array(scope) { + var length = 4; + var byteLength = length * Int32Array.BYTES_PER_ELEMENT; + var maxByteLength = 2 * byteLength; + + var ab = new ArrayBuffer(byteLength, {maxByteLength}); + assertEq(ab.resizable, true); + assertEq(ab.byteLength, byteLength); + assertEq(ab.maxByteLength, maxByteLength); + + var ta1 = new Int32Array(ab); + assertEq(ta1.byteLength, byteLength); + ta1.set([1, 87654321, -123]); + assertEq(ta1.toString(), "1,87654321,-123,0"); + + var clonebuf = serialize(ta1, undefined, {scope}); + var ta2 = deserialize(clonebuf); + assertEq(ta2 instanceof Int32Array, true); + assertEq(ta2.byteLength, byteLength); + assertEq(ta2.toString(), "1,87654321,-123,0"); + assertEq(ta2.buffer.resizable, true); + assertEq(ta2.buffer.byteLength, byteLength); + assertEq(ta2.buffer.maxByteLength, maxByteLength); + + ta2.buffer.resize(maxByteLength); + assertEq(ta2.byteLength, maxByteLength); +} +scopes.forEach(testInt32Array); + +function testFloat64Array(scope) { + var length = 4; + var byteLength = length * Float64Array.BYTES_PER_ELEMENT; + var maxByteLength = 2 * byteLength; + + var ab = new ArrayBuffer(byteLength, {maxByteLength}); + assertEq(ab.resizable, true); + assertEq(ab.byteLength, byteLength); + assertEq(ab.maxByteLength, maxByteLength); + + var ta1 = new Float64Array(ab); + assertEq(ta1.byteLength, byteLength); + ta1.set([NaN, 3.14, 0, 0]); + assertEq(ta1.toString(), "NaN,3.14,0,0"); + + var clonebuf = serialize(ta1, undefined, {scope}); + var ta2 = deserialize(clonebuf); + assertEq(ta2 instanceof Float64Array, true); + assertEq(ta2.byteLength, byteLength); + assertEq(ta2.toString(), "NaN,3.14,0,0"); + assertEq(ta2.buffer.resizable, true); + assertEq(ta2.buffer.byteLength, byteLength); + assertEq(ta2.buffer.maxByteLength, maxByteLength); + + ta2.buffer.resize(maxByteLength); + assertEq(ta2.byteLength, maxByteLength); +} +scopes.forEach(testFloat64Array); + +function testDataView(scope) { + var length = 4; + var byteLength = length * Uint8Array.BYTES_PER_ELEMENT; + var maxByteLength = 2 * byteLength; + + var ab = new ArrayBuffer(byteLength, {maxByteLength}); + assertEq(ab.resizable, true); + assertEq(ab.byteLength, byteLength); + assertEq(ab.maxByteLength, maxByteLength); + + var ta = new Uint8Array(ab); + ta.set([5, 0, 255]); + assertEq(ta.toString(), "5,0,255,0"); + var dv1 = new DataView(ab); + assertEq(dv1.byteLength, byteLength); + + var clonebuf = serialize(dv1, undefined, {scope}); + var dv2 = deserialize(clonebuf); + assertEq(dv2 instanceof DataView, true); + assertEq(dv2.byteLength, byteLength); + assertEq(new Uint8Array(dv2.buffer).toString(), "5,0,255,0"); + assertEq(dv2.buffer.resizable, true); + assertEq(dv2.buffer.byteLength, byteLength); + assertEq(dv2.buffer.maxByteLength, maxByteLength); + + dv2.buffer.resize(maxByteLength); + assertEq(dv2.byteLength, maxByteLength); +} +scopes.forEach(testDataView); + +function testArrayBuffer(scope) { + var length = 4; + var byteLength = length * Uint8Array.BYTES_PER_ELEMENT; + var maxByteLength = 2 * byteLength; + + var ab = new ArrayBuffer(byteLength, {maxByteLength}); + assertEq(ab.resizable, true); + assertEq(ab.byteLength, byteLength); + assertEq(ab.maxByteLength, maxByteLength); + + var ta = new Uint8Array(ab); + ta.set([33, 44, 55, 66]); + assertEq(ta.toString(), "33,44,55,66"); + + var clonebuf = serialize(ab, undefined, {scope}); + var ab2 = deserialize(clonebuf); + assertEq(ab2 instanceof ArrayBuffer, true); + assertEq(new Uint8Array(ab2).toString(), "33,44,55,66"); + assertEq(ab2.resizable, true); + assertEq(ab2.byteLength, byteLength); + assertEq(ab2.maxByteLength, maxByteLength); + + ab2.resize(maxByteLength); + assertEq(ab2.byteLength, maxByteLength); +} +scopes.forEach(testArrayBuffer); diff --git a/js/src/jit-test/tests/structured-clone/roundtrip.js b/js/src/jit-test/tests/structured-clone/roundtrip.js new file mode 100644 index 0000000000..ef7732ea07 --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/roundtrip.js @@ -0,0 +1,30 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +load(libdir + "asserts.js"); + +const objects = [ + {}, + {a: 1, b: 2}, + {0: 1, 1: 2}, + {0: 1, 1: 2, a: 1}, + {0: 1, 1: 2, a: 1, b: 2}, + {1000000: 0, 1000001: 1}, + {0: 0, 1: 0, 1000000: 0, 1000001: 1}, + + [], + [0, 1, 2], + [0, 15, 16], + [{a: 0, b: 0}, {b: 0, a: 0}], + [0, , , 1, 2], + [, 1], + [0,,], + [,,], +] + +for (const obj of objects) { + assertDeepEq(deserialize(serialize(obj)), obj); + assertDeepEq(deserialize(serialize(wrapWithProto(obj, null))), obj); +} diff --git a/js/src/jit-test/tests/structured-clone/sab-errMsg.js b/js/src/jit-test/tests/structured-clone/sab-errMsg.js new file mode 100644 index 0000000000..ea8c7de0fd --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/sab-errMsg.js @@ -0,0 +1,26 @@ +// |jit-test| skip-if: !sharedMemoryEnabled() + +// Check the error mssage when the prefs for COOP/COEP are both enable or not. +var g = newGlobal(); +var ex; +const sab = new SharedArrayBuffer(); +try { + g.serialize(sab); +} catch (e) { + ex = e; +} +assertEq(ex.toString(), + `TypeError: The SharedArrayBuffer object cannot be serialized. The ` + + `Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy HTTP ` + + `headers will enable this in the future.`); + +var h = newGlobal({enableCoopAndCoep: true}); +try { + h.serialize(sab); +} catch (e) { + ex = e; +} +assertEq(ex.toString(), + `TypeError: The SharedArrayBuffer object cannot be serialized. The ` + + `Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy HTTP ` + + `headers can be used to enable this.`); diff --git a/js/src/jit-test/tests/structured-clone/saved-stack.js b/js/src/jit-test/tests/structured-clone/saved-stack.js new file mode 100644 index 0000000000..dd2d4a3240 --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/saved-stack.js @@ -0,0 +1,37 @@ +// The following binary data was created with: +// JS_STRUCTURED_CLONE_VERSION = 8 +// +// ``` +// function f() { +// return saveStack(); +// } +// function g() { +// return f(); +// } +// +// let stack = g(); +// print(valueToSource(serialize(stack, undefined, {scope: "DifferentProcess"}).clonebuffer)) +// ``` + +function checkStack(stack) { + print(stack.toString()); + + assertEq(stack.functionDisplayName, "f"); + assertEq(stack.parent.functionDisplayName, "g"); + assertEq(stack.parent.parent.functionDisplayName, null); + assertEq(stack.parent.parent.parent, null); +} + +var clonebuffer = serialize("dummy"); +clonebuffer.clonebuffer = "\x02\x00\x00\x00\x00\x00\xF1\xFF\x18\x00\xFF\xFF\x16\x00\xFF\xFF \x00\x00\x80\x04\x00\xFF\xFF/home/tom/Desktop/saved-stack.js\x11\x00\x00\x00\x03\x00\xFF\xFF\t\x00\x00\x00\x03\x00\xFF\xFF\x01\x00\x00\x80\x04\x00\xFF\xFFf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x18\x00\xFF\xFF\x16\x00\xFF\xFF \x00\x00\x80\x04\x00\xFF\xFF/home/tom/Desktop/saved-stack.js\x14\x00\x00\x00\x03\x00\xFF\xFF\t\x00\x00\x00\x03\x00\xFF\xFF\x01\x00\x00\x80\x04\x00\xFF\xFFg\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x18\x00\xFF\xFF\x16\x00\xFF\xFF \x00\x00\x80\x04\x00\xFF\xFF/home/tom/Desktop/saved-stack.js\x17\x00\x00\x00\x03\x00\xFF\xFF\r\x00\x00\x00\x03\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x13\x00\xFF\xFF\x00\x00\x00\x00\x13\x00\xFF\xFF\x00\x00\x00\x00\x13\x00\xFF\xFF"; +var stack = deserialize(clonebuffer); +checkStack(stack); + +function f() { + return saveStack(); +} +function g() { + return f(); +} +stack = deserialize(serialize(g())); +checkStack(stack); diff --git a/js/src/jit-test/tests/structured-clone/tenuring.js b/js/src/jit-test/tests/structured-clone/tenuring.js new file mode 100644 index 0000000000..0fffa064fa --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/tenuring.js @@ -0,0 +1,92 @@ +// Check that we switch to allocating in the tenure heap after the first +// nursery collection. + +function buildObjectTree(depth) { + if (depth === 0) { + return "leaf"; + } + + return { + left: buildObjectTree(depth - 1), + right: buildObjectTree(depth - 1) + }; +} + +function buildArrayTree(depth) { + if (depth === 0) { + return []; + } + + return [ + buildArrayTree(depth - 1), + buildArrayTree(depth - 1) + ]; +} + +function testRoundTrip(depth, objectTree, expectedNurseryAllocated) { + const input = objectTree ? buildObjectTree(depth) : buildArrayTree(depth); + + gc(); + const initialMinorNumber = gcparam('minorGCNumber'); + + const output = deserialize(serialize(input)); + checkHeap(output, depth, objectTree, expectedNurseryAllocated); + + const minorCollections = gcparam('minorGCNumber') - initialMinorNumber; + const expectedMinorCollections = expectedNurseryAllocated ? 0 : 1; + assertEq(minorCollections, expectedMinorCollections); +} + +function checkHeap(tree, depth, objectTree, expectedNurseryAllocated) { + const counts = countHeapLocations(tree, objectTree); + + const total = counts.nursery + counts.tenured; + assertEq(total, (2 ** (depth + 1)) - 1); + + if (expectedNurseryAllocated) { + assertEq(counts.tenured, 0); + assertEq(counts.nursery >= 1, true); + } else { + assertEq(counts.tenured >= 1, true); + // We get a single nursery allocation when we trigger minor GC. + assertEq(counts.nursery <= 1, true); + } +} + +function countHeapLocations(tree, objectTree, counts) { + if (!counts) { + counts = {nursery: 0, tenured: 0}; + } + + if (isNurseryAllocated(tree)) { + counts.nursery++; + } else { + counts.tenured++; + } + + if (objectTree) { + if (tree !== "leaf") { + countHeapLocations(tree.left, objectTree, counts); + countHeapLocations(tree.right, objectTree, counts); + } + } else { + if (tree.length !== 0) { + countHeapLocations(tree[0], objectTree, counts); + countHeapLocations(tree[1], objectTree, counts); + } + } + + return counts; +} + +gczeal(0); +gcparam('minNurseryBytes', 1024 * 1024); +gcparam('maxNurseryBytes', 1024 * 1024); +gc(); + +testRoundTrip(1, true, true); +testRoundTrip(1, false, true); +testRoundTrip(4, true, true); +testRoundTrip(4, false, true); +testRoundTrip(15, true, false); +testRoundTrip(15, false, false); diff --git a/js/src/jit-test/tests/structured-clone/transferable-across-segments.js b/js/src/jit-test/tests/structured-clone/transferable-across-segments.js new file mode 100644 index 0000000000..9b31260ae7 --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/transferable-across-segments.js @@ -0,0 +1,13 @@ +// Default capacity is 4096 bytes and each entry requires 24 bytes, so when +// the transferables list contains >170 entries, more than one segment is +// used, because 171 * 24 = 4104 and 4104 > 4096. + +const transferables = []; +for (let i = 0; i < 170 + 1; ++i) { + transferables.push(new ArrayBuffer(1)); +} + +// Just don't crash. +serialize([], transferables, { + scope: "DifferentProcess", +}); diff --git a/js/src/jit-test/tests/structured-clone/transferable-cleanup.js b/js/src/jit-test/tests/structured-clone/transferable-cleanup.js new file mode 100644 index 0000000000..e55cb480f4 --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/transferable-cleanup.js @@ -0,0 +1,243 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +// The tests expect the clone buffer to be collected at a certain point. +// I don't think collecting it sooner would break anything, but just in case: +gczeal(0); + +function testBasic() { + const desc = "basic canTransfer, writeTransfer, freeTransfer"; + const BASE = 100; + const obj = makeSerializable(BASE + 1); + let s = serialize(obj, [obj]); + assertEq("" + obj.log, "" + [101, "?", 101, "W"], "serialize " + desc); + s = null; + gc(); + print(`serialize ${arguments.callee.name}: ${obj.log}`); + assertEq("" + obj.log, "" + [ + // canTransfer(obj) then writeTransfer(obj), then obj is read with + // a backreference. + 101, "?", 101, "W", + // Then discard the serialized data, triggering freeTransfer(obj). + 101, "F" + ], "serialize " + desc); + obj.log = null; +} + +function testErrorDuringWrite() { + const desc = "canTransfer, write=>error"; + const BASE = 200; + const obj = makeSerializable(BASE + 1); + const ab = new ArrayBuffer(100); + detachArrayBuffer(ab); + try { + serialize([obj, ab], [obj]); + } catch (e) { + } + gc(); + print(`${arguments.callee.name}: ${obj.log}`); + assertEq("" + obj.log, "" + [201, "?"], desc); + obj.log = null; +} + +function testErrorDuringTransfer() { + const desc = "canTransfer, write(ab), writeTransfer(obj), writeTransfer(ab)=>error, freeTransfer"; + const BASE = 300; + const obj = makeSerializable(BASE + 1); + const ab = new ArrayBuffer(100); + detachArrayBuffer(ab); + try { + serialize([obj, ab], [obj, ab]); + } catch (e) { + } + gc(); + print(`${arguments.callee.name}: ${obj.log}`); + assertEq("" + obj.log, "" + [ + // canTransfer(obj) then writeTransfer(obj) + 301, "?", 301, "W", + // error reading ab, freeTransfer(obj) + 301, "F" + ], desc); + obj.log = null; +} + +function testMultiOkHelper(g, BASE, desc) { + const obj = makeSerializable(BASE + 1); + const obj2 = makeSerializable(BASE + 2); + const obj3 = makeSerializable(BASE + 3); + serialize([obj, obj2, obj3], [obj, obj3]); + gc(); + print(`${arguments.callee.name}(${BASE}): ${obj.log}`); + assertEq("" + obj.log, "" + [ + // canTransfer(obj then obj3). + BASE + 1, "?", BASE + 3, "?", + // write(obj2), which happens before transferring. + BASE + 2, "w", + // writeTransfer(obj then obj3). + BASE + 1, "W", BASE + 3, "W", + // discard the clone buffer without deserializing, so freeTransfer(obj1+obj3). + BASE + 1, "F", BASE + 3, "F" + ], desc); + obj.log = null; +} + +function testMultiOk() { + const desc = "write 3 objects, transfer obj1 and obj3 only, write obj2"; + testMultiOkHelper(globalThis, 400, desc); +} + +function testMultiOkCrossRealm() { + const desc = "write 3 objects, transfer obj1 and obj2 only, cross-realm"; + testMultiOkHelper(newGlobal({ newCompartment: true }), 500, desc); +} + +function printTrace(callee, global, base, log, phase = undefined) { + phase = phase ? `${phase} ` : ""; + const test = callee.replace("Helper", "") + (global === globalThis ? "" : "CrossRealm"); + print(`${phase}${test}(${base}): ${log}`); +} + +function testMultiOkWithDeserializeHelper(g, BASE, desc) { + const obj = makeSerializable(BASE + 1); + const obj2 = makeSerializable(BASE + 2); + const obj3 = makeSerializable(BASE + 3); + let s = serialize([obj, obj2, obj3], [obj, obj3]); + gc(); + printTrace(arguments.callee.name, g, BASE, obj.log, "serialize"); + assertEq("" + obj.log, "" + [ + // canTransfer(obj+obj3). + BASE + 1, "?", BASE + 3, "?", + // write(obj2). + BASE + 2, "w", + // writeTransfer(obj1+obj3). All good. + BASE + 1, "W", BASE + 3, "W", + // Do not collect the clone buffer. It owns obj1+obj3 now. + ], "serialize " + desc); + obj.log = null; + + let clone = deserialize(s); + s = null; + gc(); + printTrace(arguments.callee.name, g, BASE, obj.log, "deserialize"); + assertEq("" + obj.log, "" + [ + // readTransfer(obj1+obj3). + BASE + 1, "R", BASE + 3, "R", + // read(obj2). The full clone is successful. + BASE + 2, "r", + ], "deserialize " + desc); + obj.log = null; +} + +function testMultiOkWithDeserialize() { + const desc = "write 3 objects, transfer obj1 and obj3 only, write obj2, deserialize"; + testMultiOkWithDeserializeHelper(globalThis, 600, desc); +} + +function testMultiOkWithDeserializeCrossRealm() { + const desc = "write 3 objects, transfer obj1 and obj2 only, deserialize, cross-realm"; + testMultiOkWithDeserializeHelper(newGlobal({ newCompartment: true }), 700, desc); +} + +function testMultiWithDeserializeReadTransferErrorHelper(g, BASE, desc) { + const obj = makeSerializable(BASE + 1, 0); + const obj2 = makeSerializable(BASE + 2, 1); + const obj3 = makeSerializable(BASE + 3, 1); + let s = serialize([obj, obj2, obj3], [obj, obj3]); + gc(); + printTrace(arguments.callee.name, g, BASE, obj.log, "serialize"); + assertEq("" + obj.log, "" + [ + // Successful serialization. + BASE + 1, "?", BASE + 3, "?", + BASE + 2, "w", + BASE + 1, "W", BASE + 3, "W", + ], "serialize " + desc); + obj.log = null; + + try { + let clone = deserialize(s); + } catch (e) { + assertEq(e.message.includes("invalid transferable"), true); + } + s = null; + gc(); + printTrace(arguments.callee.name, g, BASE, obj.log, "deserialize"); + assertEq("" + obj.log, "" + [ + // readTransfer(obj) then readTransfer(obj3) which fails. + BASE + 1, "R", BASE + 3, "R", + // obj2 has not been read at all because we errored out during readTransferMap(), + // which comes before the main reading. obj transfer data is now owned by its + // clone. obj3 transfer data was not successfully handed over to a new object, + // so it is still owned by the clone buffer and must be discarded with freeTransfer. + BASE + 3, "F", + ], "deserialize " + desc); + obj.log = null; +} + +function testMultiWithDeserializeReadTransferError() { + const desc = "write 3 objects, transfer obj1 and obj3 only, fail during readTransfer(obj3)"; + testMultiWithDeserializeReadTransferErrorHelper(globalThis, 800, desc); +} + +function testMultiWithDeserializeReadTransferErrorCrossRealm() { + const desc = "write 3 objects, transfer obj1 and obj2 only, fail during readTransfer(obj3), cross-realm"; + testMultiWithDeserializeReadTransferErrorHelper(newGlobal({ newCompartment: true }), 900, desc); +} + +function testMultiWithDeserializeReadErrorHelper(g, BASE, desc) { + const obj = makeSerializable(BASE + 1, 2); + const obj2 = makeSerializable(BASE + 2, 2); + const obj3 = makeSerializable(BASE + 3, 2); + let s = serialize([obj, obj2, obj3], [obj, obj3]); + gc(); + printTrace(arguments.callee.name, g, BASE, obj.log, "serialize"); + assertEq("" + obj.log, "" + [ + // Same as above. Everything is fine. + BASE + 1, "?", BASE + 3, "?", + BASE + 2, "w", + BASE + 1, "W", BASE + 3, "W", + ], "serialize " + desc); + obj.log = null; + + try { + let clone = deserialize(s); + } catch (e) { + assertEq(e.message.includes("Failed as requested"), true); + } + s = null; + gc(); + printTrace(arguments.callee.name, g, BASE, obj.log, "deserialize"); + assertEq("" + obj.log, "" + [ + // The transferred objects will get restored via the readTransfer() hook + // and thus will own their transferred data. They will get discarded during + // the GC, but that doesn't call any hooks. When the GC collects `s`, + // it will look for any transferrable data to release, but will + // find that it no longer owns any such data and will do nothing. + BASE + 1, "R", BASE + 3, "R", + BASE + 2, "r", + ], "deserialize " + desc); + obj.log = null; +} + +function testMultiWithDeserializeReadError() { + const desc = "write 3 objects, transfer obj1 and obj3 only, fail during read(obj2)"; + testMultiWithDeserializeReadErrorHelper(globalThis, 1000, desc); +} + +function testMultiWithDeserializeReadErrorCrossRealm() { + const desc = "write 3 objects, transfer obj1 and obj2 only, fail during read(obj2), cross-realm"; + testMultiWithDeserializeReadErrorHelper(newGlobal({ newCompartment: true }), 1100, desc); +} + +testBasic(); +testErrorDuringWrite(); +testErrorDuringTransfer(); +testMultiOk(); +testMultiOkCrossRealm(); +testMultiOkWithDeserialize(); +testMultiOkWithDeserializeCrossRealm(); +testMultiWithDeserializeReadTransferError(); +testMultiWithDeserializeReadTransferErrorCrossRealm(); +testMultiWithDeserializeReadError(); +testMultiWithDeserializeReadErrorCrossRealm(); diff --git a/js/src/jit-test/tests/structured-clone/version3.js b/js/src/jit-test/tests/structured-clone/version3.js new file mode 100644 index 0000000000..c3b3041ad6 --- /dev/null +++ b/js/src/jit-test/tests/structured-clone/version3.js @@ -0,0 +1,13 @@ +// Created with JS_STRUCTURED_CLONE_VERSION = 3 +// var x = { +// "ab": 1, +// 12: 2, +// }; +// print(uneval(serialize(x).clonebuffer)); + +var clonebuffer = serialize("abc"); +clonebuffer.clonebuffer = "\x00\x00\x00\x00\b\x00\xFF\xFF\f\x00\x00\x00\x03\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00@\x02\x00\x00\x00\x04\x00\xFF\xFFa\x00b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\xFF\xFF" +var obj = deserialize(clonebuffer) +assertEq(obj.ab, 1); +assertEq(obj[12], 2); +assertEq(Object.keys(obj).toString(), "12,ab"); diff --git a/js/src/jit-test/tests/sunspider/check-3d-cube.js b/js/src/jit-test/tests/sunspider/check-3d-cube.js new file mode 100644 index 0000000000..036a4f6f71 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-3d-cube.js @@ -0,0 +1,345 @@ +// 3D Cube Rotation +// http://www.speich.net/computer/moztesting/3d.htm +// Created by Simon Speich + +var Q = new Array(); +var MTrans = new Array(); // transformation matrix +var MQube = new Array(); // position information of qube +var I = new Array(); // entity matrix +var Origin = new Object(); +var Testing = new Object(); +var LoopTimer; + +var DisplArea = new Object(); +DisplArea.Width = 300; +DisplArea.Height = 300; + +function DrawLine(From, To) { + var x1 = From.V[0]; + var x2 = To.V[0]; + var y1 = From.V[1]; + var y2 = To.V[1]; + var dx = Math.abs(x2 - x1); + var dy = Math.abs(y2 - y1); + var x = x1; + var y = y1; + var IncX1, IncY1; + var IncX2, IncY2; + var Den; + var Num; + var NumAdd; + var NumPix; + + if (x2 >= x1) { IncX1 = 1; IncX2 = 1; } + else { IncX1 = -1; IncX2 = -1; } + if (y2 >= y1) { IncY1 = 1; IncY2 = 1; } + else { IncY1 = -1; IncY2 = -1; } + if (dx >= dy) { + IncX1 = 0; + IncY2 = 0; + Den = dx; + Num = dx / 2; + NumAdd = dy; + NumPix = dx; + } + else { + IncX2 = 0; + IncY1 = 0; + Den = dy; + Num = dy / 2; + NumAdd = dx; + NumPix = dy; + } + + NumPix = Math.round(Q.LastPx + NumPix); + + var i = Q.LastPx; + for (; i < NumPix; i++) { + Num += NumAdd; + if (Num >= Den) { + Num -= Den; + x += IncX1; + y += IncY1; + } + x += IncX2; + y += IncY2; + } + Q.LastPx = NumPix; +} + +function CalcCross(V0, V1) { + var Cross = new Array(); + Cross[0] = V0[1]*V1[2] - V0[2]*V1[1]; + Cross[1] = V0[2]*V1[0] - V0[0]*V1[2]; + Cross[2] = V0[0]*V1[1] - V0[1]*V1[0]; + return Cross; +} + +function CalcNormal(V0, V1, V2) { + var A = new Array(); var B = new Array(); + for (var i = 0; i < 3; i++) { + A[i] = V0[i] - V1[i]; + B[i] = V2[i] - V1[i]; + } + A = CalcCross(A, B); + var Length = Math.sqrt(A[0]*A[0] + A[1]*A[1] + A[2]*A[2]); + for (var i = 0; i < 3; i++) A[i] = A[i] / Length; + A[3] = 1; + return A; +} + +function CreateP(X,Y,Z) { + this.V = [X,Y,Z,1]; +} + +// multiplies two matrices +function MMulti(M1, M2) { + var M = [[],[],[],[]]; + var i = 0; + var j = 0; + for (; i < 4; i++) { + j = 0; + for (; j < 4; j++) M[i][j] = M1[i][0] * M2[0][j] + M1[i][1] * M2[1][j] + M1[i][2] * M2[2][j] + M1[i][3] * M2[3][j]; + } + return M; +} + +//multiplies matrix with vector +function VMulti(M, V) { + var Vect = new Array(); + var i = 0; + for (;i < 4; i++) Vect[i] = M[i][0] * V[0] + M[i][1] * V[1] + M[i][2] * V[2] + M[i][3] * V[3]; + return Vect; +} + +function VMulti2(M, V) { + var Vect = new Array(); + var i = 0; + for (;i < 3; i++) Vect[i] = M[i][0] * V[0] + M[i][1] * V[1] + M[i][2] * V[2]; + return Vect; +} + +// add to matrices +function MAdd(M1, M2) { + var M = [[],[],[],[]]; + var i = 0; + var j = 0; + for (; i < 4; i++) { + j = 0; + for (; j < 4; j++) M[i][j] = M1[i][j] + M2[i][j]; + } + return M; +} + +function Translate(M, Dx, Dy, Dz) { + var T = [ + [1,0,0,Dx], + [0,1,0,Dy], + [0,0,1,Dz], + [0,0,0,1] + ]; + return MMulti(T, M); +} + +function RotateX(M, Phi) { + var a = Phi; + a *= Math.PI / 180; + var Cos = Math.cos(a); + var Sin = Math.sin(a); + var R = [ + [1,0,0,0], + [0,Cos,-Sin,0], + [0,Sin,Cos,0], + [0,0,0,1] + ]; + return MMulti(R, M); +} + +function RotateY(M, Phi) { + var a = Phi; + a *= Math.PI / 180; + var Cos = Math.cos(a); + var Sin = Math.sin(a); + var R = [ + [Cos,0,Sin,0], + [0,1,0,0], + [-Sin,0,Cos,0], + [0,0,0,1] + ]; + return MMulti(R, M); +} + +function RotateZ(M, Phi) { + var a = Phi; + a *= Math.PI / 180; + var Cos = Math.cos(a); + var Sin = Math.sin(a); + var R = [ + [Cos,-Sin,0,0], + [Sin,Cos,0,0], + [0,0,1,0], + [0,0,0,1] + ]; + return MMulti(R, M); +} + +function DrawQube() { + // calc current normals + var CurN = new Array(); + var i = 5; + Q.LastPx = 0; + for (; i > -1; i--) CurN[i] = VMulti2(MQube, Q.Normal[i]); + if (CurN[0][2] < 0) { + if (!Q.Line[0]) { DrawLine(Q[0], Q[1]); Q.Line[0] = true; }; + if (!Q.Line[1]) { DrawLine(Q[1], Q[2]); Q.Line[1] = true; }; + if (!Q.Line[2]) { DrawLine(Q[2], Q[3]); Q.Line[2] = true; }; + if (!Q.Line[3]) { DrawLine(Q[3], Q[0]); Q.Line[3] = true; }; + } + if (CurN[1][2] < 0) { + if (!Q.Line[2]) { DrawLine(Q[3], Q[2]); Q.Line[2] = true; }; + if (!Q.Line[9]) { DrawLine(Q[2], Q[6]); Q.Line[9] = true; }; + if (!Q.Line[6]) { DrawLine(Q[6], Q[7]); Q.Line[6] = true; }; + if (!Q.Line[10]) { DrawLine(Q[7], Q[3]); Q.Line[10] = true; }; + } + if (CurN[2][2] < 0) { + if (!Q.Line[4]) { DrawLine(Q[4], Q[5]); Q.Line[4] = true; }; + if (!Q.Line[5]) { DrawLine(Q[5], Q[6]); Q.Line[5] = true; }; + if (!Q.Line[6]) { DrawLine(Q[6], Q[7]); Q.Line[6] = true; }; + if (!Q.Line[7]) { DrawLine(Q[7], Q[4]); Q.Line[7] = true; }; + } + if (CurN[3][2] < 0) { + if (!Q.Line[4]) { DrawLine(Q[4], Q[5]); Q.Line[4] = true; }; + if (!Q.Line[8]) { DrawLine(Q[5], Q[1]); Q.Line[8] = true; }; + if (!Q.Line[0]) { DrawLine(Q[1], Q[0]); Q.Line[0] = true; }; + if (!Q.Line[11]) { DrawLine(Q[0], Q[4]); Q.Line[11] = true; }; + } + if (CurN[4][2] < 0) { + if (!Q.Line[11]) { DrawLine(Q[4], Q[0]); Q.Line[11] = true; }; + if (!Q.Line[3]) { DrawLine(Q[0], Q[3]); Q.Line[3] = true; }; + if (!Q.Line[10]) { DrawLine(Q[3], Q[7]); Q.Line[10] = true; }; + if (!Q.Line[7]) { DrawLine(Q[7], Q[4]); Q.Line[7] = true; }; + } + if (CurN[5][2] < 0) { + if (!Q.Line[8]) { DrawLine(Q[1], Q[5]); Q.Line[8] = true; }; + if (!Q.Line[5]) { DrawLine(Q[5], Q[6]); Q.Line[5] = true; }; + if (!Q.Line[9]) { DrawLine(Q[6], Q[2]); Q.Line[9] = true; }; + if (!Q.Line[1]) { DrawLine(Q[2], Q[1]); Q.Line[1] = true; }; + } + Q.Line = [false,false,false,false,false,false,false,false,false,false,false,false]; + Q.LastPx = 0; +} + +function Loop() { + if (Testing.LoopCount > Testing.LoopMax) return; + var TestingStr = String(Testing.LoopCount); + while (TestingStr.length < 3) TestingStr = "0" + TestingStr; + MTrans = Translate(I, -Q[8].V[0], -Q[8].V[1], -Q[8].V[2]); + MTrans = RotateX(MTrans, 1); + MTrans = RotateY(MTrans, 3); + MTrans = RotateZ(MTrans, 5); + MTrans = Translate(MTrans, Q[8].V[0], Q[8].V[1], Q[8].V[2]); + MQube = MMulti(MTrans, MQube); + var i = 8; + for (; i > -1; i--) { + Q[i].V = VMulti(MTrans, Q[i].V); + } + DrawQube(); + Testing.LoopCount++; + Loop(); +} + +function Init(CubeSize) { + // init/reset vars + Origin.V = [150,150,20,1]; + Testing.LoopCount = 0; + Testing.LoopMax = 50; + Testing.TimeMax = 0; + Testing.TimeAvg = 0; + Testing.TimeMin = 0; + Testing.TimeTemp = 0; + Testing.TimeTotal = 0; + Testing.Init = false; + + // transformation matrix + MTrans = [ + [1,0,0,0], + [0,1,0,0], + [0,0,1,0], + [0,0,0,1] + ]; + + // position information of qube + MQube = [ + [1,0,0,0], + [0,1,0,0], + [0,0,1,0], + [0,0,0,1] + ]; + + // entity matrix + I = [ + [1,0,0,0], + [0,1,0,0], + [0,0,1,0], + [0,0,0,1] + ]; + + // create qube + Q[0] = new CreateP(-CubeSize,-CubeSize, CubeSize); + Q[1] = new CreateP(-CubeSize, CubeSize, CubeSize); + Q[2] = new CreateP( CubeSize, CubeSize, CubeSize); + Q[3] = new CreateP( CubeSize,-CubeSize, CubeSize); + Q[4] = new CreateP(-CubeSize,-CubeSize,-CubeSize); + Q[5] = new CreateP(-CubeSize, CubeSize,-CubeSize); + Q[6] = new CreateP( CubeSize, CubeSize,-CubeSize); + Q[7] = new CreateP( CubeSize,-CubeSize,-CubeSize); + + // center of gravity + Q[8] = new CreateP(0, 0, 0); + + // anti-clockwise edge check + Q.Edge = [[0,1,2],[3,2,6],[7,6,5],[4,5,1],[4,0,3],[1,5,6]]; + + // calculate squad normals + Q.Normal = new Array(); + for (var i = 0; i < Q.Edge.length; i++) Q.Normal[i] = CalcNormal(Q[Q.Edge[i][0]].V, Q[Q.Edge[i][1]].V, Q[Q.Edge[i][2]].V); + + // line drawn ? + Q.Line = [false,false,false,false,false,false,false,false,false,false,false,false]; + + // create line pixels + Q.NumPx = 9 * 2 * CubeSize; + for (var i = 0; i < Q.NumPx; i++) CreateP(0,0,0); + + MTrans = Translate(MTrans, Origin.V[0], Origin.V[1], Origin.V[2]); + MQube = MMulti(MTrans, MQube); + + var i = 0; + for (; i < 9; i++) { + Q[i].V = VMulti(MTrans, Q[i].V); + } + DrawQube(); + Testing.Init = true; + Loop(); +} + +for ( var i = 20; i <= 160; i *= 2 ) { + Init(i); +} + +var actual = ''; +for (var i = 0; i < Q.length; ++i) { + actual += Q[i].V + ';'; +} +var expected = "-116.618229186398,212.51135212951073,62.5094191967962,1;127.83701023614447,417.11611179082263,90.41153816299942,1;293.9570894432935,196.58093046570656,252.17789153139591,1;49.501850020750915,-8.02382919560505,224.275772565193,1;6.042910556709444,103.41906953429206,-212.1778915313964,1;250.49814997925202,308.02382919560387,-184.27577256519325,1;416.61822918640064,87.48864787048812,-22.509419196796493,1;172.1629897638581,-117.1161117908236,-50.41153816299975,1;150.0000000000007,149.99999999999952,20,1;"; +assertEq(actual, expected); + +Q = null; +MTrans = null; +MQube = null; +I = null; +Origin = null; +Testing = null; +LoopTime = null; +DisplArea = null; + diff --git a/js/src/jit-test/tests/sunspider/check-3d-morph.js b/js/src/jit-test/tests/sunspider/check-3d-morph.js new file mode 100644 index 0000000000..3fabdc70f6 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-3d-morph.js @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var loops = 15 +var nx = 120 +var nz = 120 + +function morph(a, f) { + var PI2nx = Math.PI * 8/nx + var sin = Math.sin + var f30 = -(50 * sin(f*Math.PI*2)) + + for (var i = 0; i < nz; ++i) { + for (var j = 0; j < nx; ++j) { + a[3*(i*nx+j)+1] = sin((j-1) * PI2nx ) * -f30 + } + } +} + + +var a = Array() +for (var i=0; i < nx*nz*3; ++i) + a[i] = 0 + +for (var i = 0; i < loops; ++i) { + morph(a, i/loops) +} + +testOutput = 0; +for (var i = 0; i < nx; i++) + testOutput += a[3*(i*nx+i)+1]; +a = null; + +/* not based on any mathematical error calculation.*/ +acceptableDelta = 4e-15 + +assertEq((testOutput - 6.394884621840902e-14) < acceptableDelta, true); diff --git a/js/src/jit-test/tests/sunspider/check-3d-raytrace.js b/js/src/jit-test/tests/sunspider/check-3d-raytrace.js new file mode 100644 index 0000000000..bcb3616be5 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-3d-raytrace.js @@ -0,0 +1,442 @@ +/* + * Copyright (C) 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +function createVector(x,y,z) { + return new Array(x,y,z); +} + +function sqrLengthVector(self) { + return self[0] * self[0] + self[1] * self[1] + self[2] * self[2]; +} + +function lengthVector(self) { + return Math.sqrt(self[0] * self[0] + self[1] * self[1] + self[2] * self[2]); +} + +function addVector(self, v) { + self[0] += v[0]; + self[1] += v[1]; + self[2] += v[2]; + return self; +} + +function subVector(self, v) { + self[0] -= v[0]; + self[1] -= v[1]; + self[2] -= v[2]; + return self; +} + +function scaleVector(self, scale) { + self[0] *= scale; + self[1] *= scale; + self[2] *= scale; + return self; +} + +function normaliseVector(self) { + var len = Math.sqrt(self[0] * self[0] + self[1] * self[1] + self[2] * self[2]); + self[0] /= len; + self[1] /= len; + self[2] /= len; + return self; +} + +function add(v1, v2) { + return new Array(v1[0] + v2[0], v1[1] + v2[1], v1[2] + v2[2]); +} + +function sub(v1, v2) { + return new Array(v1[0] - v2[0], v1[1] - v2[1], v1[2] - v2[2]); +} + +function scalev(v1, v2) { + return new Array(v1[0] * v2[0], v1[1] * v2[1], v1[2] * v2[2]); +} + +function dot(v1, v2) { + return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2]; +} + +function scale(v, scale) { + return [v[0] * scale, v[1] * scale, v[2] * scale]; +} + +function cross(v1, v2) { + return [v1[1] * v2[2] - v1[2] * v2[1], + v1[2] * v2[0] - v1[0] * v2[2], + v1[0] * v2[1] - v1[1] * v2[0]]; + +} + +function normalise(v) { + var len = lengthVector(v); + return [v[0] / len, v[1] / len, v[2] / len]; +} + +function transformMatrix(self, v) { + var vals = self; + var x = vals[0] * v[0] + vals[1] * v[1] + vals[2] * v[2] + vals[3]; + var y = vals[4] * v[0] + vals[5] * v[1] + vals[6] * v[2] + vals[7]; + var z = vals[8] * v[0] + vals[9] * v[1] + vals[10] * v[2] + vals[11]; + return [x, y, z]; +} + +function invertMatrix(self) { + var temp = new Array(16); + var tx = -self[3]; + var ty = -self[7]; + var tz = -self[11]; + for (h = 0; h < 3; h++) + for (v = 0; v < 3; v++) + temp[h + v * 4] = self[v + h * 4]; + for (i = 0; i < 11; i++) + self[i] = temp[i]; + self[3] = tx * self[0] + ty * self[1] + tz * self[2]; + self[7] = tx * self[4] + ty * self[5] + tz * self[6]; + self[11] = tx * self[8] + ty * self[9] + tz * self[10]; + return self; +} + + +// Triangle intersection using barycentric coord method +function Triangle(p1, p2, p3) { + var edge1 = sub(p3, p1); + var edge2 = sub(p2, p1); + var normal = cross(edge1, edge2); + if (Math.abs(normal[0]) > Math.abs(normal[1])) + if (Math.abs(normal[0]) > Math.abs(normal[2])) + this.axis = 0; + else + this.axis = 2; + else + if (Math.abs(normal[1]) > Math.abs(normal[2])) + this.axis = 1; + else + this.axis = 2; + var u = (this.axis + 1) % 3; + var v = (this.axis + 2) % 3; + var u1 = edge1[u]; + var v1 = edge1[v]; + + var u2 = edge2[u]; + var v2 = edge2[v]; + this.normal = normalise(normal); + this.nu = normal[u] / normal[this.axis]; + this.nv = normal[v] / normal[this.axis]; + this.nd = dot(normal, p1) / normal[this.axis]; + var det = u1 * v2 - v1 * u2; + this.eu = p1[u]; + this.ev = p1[v]; + this.nu1 = u1 / det; + this.nv1 = -v1 / det; + this.nu2 = v2 / det; + this.nv2 = -u2 / det; + this.material = [0.7, 0.7, 0.7]; +} + +Triangle.prototype.intersect = function(orig, dir, near, far) { + var u = (this.axis + 1) % 3; + var v = (this.axis + 2) % 3; + var d = dir[this.axis] + this.nu * dir[u] + this.nv * dir[v]; + var t = (this.nd - orig[this.axis] - this.nu * orig[u] - this.nv * orig[v]) / d; + if (t < near || t > far) + return null; + var Pu = orig[u] + t * dir[u] - this.eu; + var Pv = orig[v] + t * dir[v] - this.ev; + var a2 = Pv * this.nu1 + Pu * this.nv1; + if (a2 < 0) + return null; + var a3 = Pu * this.nu2 + Pv * this.nv2; + if (a3 < 0) + return null; + + if ((a2 + a3) > 1) + return null; + return t; +} + +function Scene(a_triangles) { + this.triangles = a_triangles; + this.lights = []; + this.ambient = [0,0,0]; + this.background = [0.8,0.8,1]; +} +var zero = new Array(0,0,0); + +Scene.prototype.intersect = function(origin, dir, near, far) { + var closest = null; + for (i = 0; i < this.triangles.length; i++) { + var triangle = this.triangles[i]; + var d = triangle.intersect(origin, dir, near, far); + if (d == null || d > far || d < near) + continue; + far = d; + closest = triangle; + } + + if (!closest) + return [this.background[0],this.background[1],this.background[2]]; + + var normal = closest.normal; + var hit = add(origin, scale(dir, far)); + if (dot(dir, normal) > 0) + normal = [-normal[0], -normal[1], -normal[2]]; + + var colour = null; + if (closest.shader) { + colour = closest.shader(closest, hit, dir); + } else { + colour = closest.material; + } + + // do reflection + var reflected = null; + if (colour.reflection > 0.001) { + var reflection = addVector(scale(normal, -2*dot(dir, normal)), dir); + reflected = this.intersect(hit, reflection, 0.0001, 1000000); + if (colour.reflection >= 0.999999) + return reflected; + } + + var l = [this.ambient[0], this.ambient[1], this.ambient[2]]; + for (var i = 0; i < this.lights.length; i++) { + var light = this.lights[i]; + var toLight = sub(light, hit); + var distance = lengthVector(toLight); + scaleVector(toLight, 1.0/distance); + distance -= 0.0001; + if (this.blocked(hit, toLight, distance)) + continue; + var nl = dot(normal, toLight); + if (nl > 0) + addVector(l, scale(light.colour, nl)); + } + l = scalev(l, colour); + if (reflected) { + l = addVector(scaleVector(l, 1 - colour.reflection), scaleVector(reflected, colour.reflection)); + } + return l; +} + +Scene.prototype.blocked = function(O, D, far) { + var near = 0.0001; + var closest = null; + for (i = 0; i < this.triangles.length; i++) { + var triangle = this.triangles[i]; + var d = triangle.intersect(O, D, near, far); + if (d == null || d > far || d < near) + continue; + return true; + } + + return false; +} + + +// this camera code is from notes i made ages ago, it is from *somewhere* -- i cannot remember where +// that somewhere is +function Camera(origin, lookat, up) { + var zaxis = normaliseVector(subVector(lookat, origin)); + var xaxis = normaliseVector(cross(up, zaxis)); + var yaxis = normaliseVector(cross(xaxis, subVector([0,0,0], zaxis))); + var m = new Array(16); + m[0] = xaxis[0]; m[1] = xaxis[1]; m[2] = xaxis[2]; + m[4] = yaxis[0]; m[5] = yaxis[1]; m[6] = yaxis[2]; + m[8] = zaxis[0]; m[9] = zaxis[1]; m[10] = zaxis[2]; + invertMatrix(m); + m[3] = 0; m[7] = 0; m[11] = 0; + this.origin = origin; + this.directions = new Array(4); + this.directions[0] = normalise([-0.7, 0.7, 1]); + this.directions[1] = normalise([ 0.7, 0.7, 1]); + this.directions[2] = normalise([ 0.7, -0.7, 1]); + this.directions[3] = normalise([-0.7, -0.7, 1]); + this.directions[0] = transformMatrix(m, this.directions[0]); + this.directions[1] = transformMatrix(m, this.directions[1]); + this.directions[2] = transformMatrix(m, this.directions[2]); + this.directions[3] = transformMatrix(m, this.directions[3]); +} + +Camera.prototype.generateRayPair = function(y) { + rays = new Array(new Object(), new Object()); + rays[0].origin = this.origin; + rays[1].origin = this.origin; + rays[0].dir = addVector(scale(this.directions[0], y), scale(this.directions[3], 1 - y)); + rays[1].dir = addVector(scale(this.directions[1], y), scale(this.directions[2], 1 - y)); + return rays; +} + +function renderRows(camera, scene, pixels, width, height, starty, stopy) { + for (var y = starty; y < stopy; y++) { + var rays = camera.generateRayPair(y / height); + for (var x = 0; x < width; x++) { + var xp = x / width; + var origin = addVector(scale(rays[0].origin, xp), scale(rays[1].origin, 1 - xp)); + var dir = normaliseVector(addVector(scale(rays[0].dir, xp), scale(rays[1].dir, 1 - xp))); + var l = scene.intersect(origin, dir); + pixels[y][x] = l; + } + } +} + +Camera.prototype.render = function(scene, pixels, width, height) { + var cam = this; + var row = 0; + renderRows(cam, scene, pixels, width, height, 0, height); +} + + + +function raytraceScene() +{ + var numTriangles = 2 * 6; + var triangles = new Array();//numTriangles); + var tfl = createVector(-10, 10, -10); + var tfr = createVector( 10, 10, -10); + var tbl = createVector(-10, 10, 10); + var tbr = createVector( 10, 10, 10); + var bfl = createVector(-10, -10, -10); + var bfr = createVector( 10, -10, -10); + var bbl = createVector(-10, -10, 10); + var bbr = createVector( 10, -10, 10); + + // cube!!! + // front + var i = 0; + + triangles[i++] = new Triangle(tfl, tfr, bfr); + triangles[i++] = new Triangle(tfl, bfr, bfl); + // back + triangles[i++] = new Triangle(tbl, tbr, bbr); + triangles[i++] = new Triangle(tbl, bbr, bbl); + // triangles[i-1].material = [0.7,0.2,0.2]; + // triangles[i-1].material.reflection = 0.8; + // left + triangles[i++] = new Triangle(tbl, tfl, bbl); + // triangles[i-1].reflection = 0.6; + triangles[i++] = new Triangle(tfl, bfl, bbl); + // triangles[i-1].reflection = 0.6; + // right + triangles[i++] = new Triangle(tbr, tfr, bbr); + triangles[i++] = new Triangle(tfr, bfr, bbr); + // top + triangles[i++] = new Triangle(tbl, tbr, tfr); + triangles[i++] = new Triangle(tbl, tfr, tfl); + // bottom + triangles[i++] = new Triangle(bbl, bbr, bfr); + triangles[i++] = new Triangle(bbl, bfr, bfl); + + //Floor!!!! + var green = createVector(0.0, 0.4, 0.0); + var grey = createVector(0.4, 0.4, 0.4); + grey.reflection = 1.0; + var floorShader = function(tri, pos, view) { + var x = ((pos[0]/32) % 2 + 2) % 2; + var z = ((pos[2]/32 + 0.3) % 2 + 2) % 2; + if (x < 1 != z < 1) { + //in the real world we use the fresnel term... + // var angle = 1-dot(view, tri.normal); + // angle *= angle; + // angle *= angle; + // angle *= angle; + //grey.reflection = angle; + return grey; + } else + return green; + } + var ffl = createVector(-1000, -30, -1000); + var ffr = createVector( 1000, -30, -1000); + var fbl = createVector(-1000, -30, 1000); + var fbr = createVector( 1000, -30, 1000); + triangles[i++] = new Triangle(fbl, fbr, ffr); + triangles[i-1].shader = floorShader; + triangles[i++] = new Triangle(fbl, ffr, ffl); + triangles[i-1].shader = floorShader; + + var _scene = new Scene(triangles); + _scene.lights[0] = createVector(20, 38, -22); + _scene.lights[0].colour = createVector(0.7, 0.3, 0.3); + _scene.lights[1] = createVector(-23, 40, 17); + _scene.lights[1].colour = createVector(0.7, 0.3, 0.3); + _scene.lights[2] = createVector(23, 20, 17); + _scene.lights[2].colour = createVector(0.7, 0.7, 0.7); + _scene.ambient = createVector(0.1, 0.1, 0.1); + // _scene.background = createVector(0.7, 0.7, 1.0); + + var size = 30; + var pixels = new Array(); + for (var y = 0; y < size; y++) { + pixels[y] = new Array(); + for (var x = 0; x < size; x++) { + pixels[y][x] = 0; + } + } + + var _camera = new Camera(createVector(-40, 40, 40), createVector(0, 0, 0), createVector(0, 1, 0)); + _camera.render(_scene, pixels, size, size); + + return pixels; +} + +function arrayToCanvasCommands(pixels) +{ + var s = '\nvar pixels = ['; + var size = 30; + for (var y = 0; y < size; y++) { + s += "["; + for (var x = 0; x < size; x++) { + s += "[" + pixels[y][x] + "],"; + } + s+= "],"; + } + s += '];\n var canvas = document.getElementById("renderCanvas").getContext("2d");\n\ +\n\ +\n\ + var size = 30;\n\ + canvas.fillStyle = "red";\n\ + canvas.fillRect(0, 0, size, size);\n\ + canvas.scale(1, -1);\n\ + canvas.translate(0, -size);\n\ +\n\ + if (!canvas.setFillColor)\n\ + canvas.setFillColor = function(r, g, b, a) {\n\ + this.fillStyle = "rgb("+[Math.floor(r * 255), Math.floor(g * 255), Math.floor(b * 255)]+")";\n\ + }\n\ +\n\ +for (var y = 0; y < size; y++) {\n\ + for (var x = 0; x < size; x++) {\n\ + var l = pixels[y][x];\n\ + canvas.setFillColor(l[0], l[1], l[2], 1);\n\ + canvas.fillRect(x, y, 1, 1);\n\ + }\n\ +}'; + + return s; +} + +testOutput = arrayToCanvasCommands(raytraceScene()); +expected = ''; +assertEq(testOutput, expected) diff --git a/js/src/jit-test/tests/sunspider/check-access-binary-trees.js b/js/src/jit-test/tests/sunspider/check-access-binary-trees.js new file mode 100644 index 0000000000..e10961a010 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-access-binary-trees.js @@ -0,0 +1,52 @@ +/* The Great Computer Language Shootout + http://shootout.alioth.debian.org/ + contributed by Isaac Gouy */ + +function TreeNode(left,right,item){ + this.left = left; + this.right = right; + this.item = item; +} + +TreeNode.prototype.itemCheck = function(){ + if (this.left==null) return this.item; + else return this.item + this.left.itemCheck() - this.right.itemCheck(); +} + +function bottomUpTree(item,depth){ + if (depth>0){ + return new TreeNode( + bottomUpTree(2*item-1, depth-1) + ,bottomUpTree(2*item, depth-1) + ,item + ); + } + else { + return new TreeNode(null,null,item); + } +} + +var ret; + +for ( var n = 4; n <= 7; n += 1 ) { + var minDepth = 4; + var maxDepth = Math.max(minDepth + 2, n); + var stretchDepth = maxDepth + 1; + + var check = bottomUpTree(0,stretchDepth).itemCheck(); + + var longLivedTree = bottomUpTree(0,maxDepth); + for (var depth=minDepth; depth<=maxDepth; depth+=2){ + var iterations = 1 << (maxDepth - depth + minDepth); + + check = 0; + for (var i=1; i<=iterations; i++){ + check += bottomUpTree(i,depth).itemCheck(); + check += bottomUpTree(-i,depth).itemCheck(); + } + } + + ret = longLivedTree.itemCheck(); +} + +assertEq(ret, -1) diff --git a/js/src/jit-test/tests/sunspider/check-access-fannkuch.js b/js/src/jit-test/tests/sunspider/check-access-fannkuch.js new file mode 100644 index 0000000000..d2bb98dcc3 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-access-fannkuch.js @@ -0,0 +1,66 @@ +/* The Great Computer Language Shootout + http://shootout.alioth.debian.org/ + contributed by Isaac Gouy */ + +function fannkuch(n) { + var check = 0; + var perm = Array(n); + var perm1 = Array(n); + var count = Array(n); + var maxPerm = Array(n); + var maxFlipsCount = 0; + var m = n - 1; + + for (var i = 0; i < n; i++) perm1[i] = i; + var r = n; + + while (true) { + // write-out the first 30 permutations + if (check < 30){ + var s = ""; + for(var i=0; i> 1; + for (var i = 0; i < k2; i++) { + var temp = perm[i]; perm[i] = perm[k - i]; perm[k - i] = temp; + } + flipsCount++; + } + + if (flipsCount > maxFlipsCount) { + maxFlipsCount = flipsCount; + for (var i = 0; i < n; i++) maxPerm[i] = perm1[i]; + } + } + + while (true) { + if (r == n) return maxFlipsCount; + var perm0 = perm1[0]; + var i = 0; + while (i < r) { + var j = i + 1; + perm1[i] = perm1[j]; + i = j; + } + perm1[r] = perm0; + + count[r] = count[r] - 1; + if (count[r] > 0) break; + r++; + } + } +} + +var n = 8; +var ret = fannkuch(n); +assertEq(ret, 22) diff --git a/js/src/jit-test/tests/sunspider/check-access-nbody.js b/js/src/jit-test/tests/sunspider/check-access-nbody.js new file mode 100644 index 0000000000..5bcfd59a40 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-access-nbody.js @@ -0,0 +1,171 @@ +/* The Great Computer Language Shootout + http://shootout.alioth.debian.org/ + contributed by Isaac Gouy */ + +var PI = 3.141592653589793; +var SOLAR_MASS = 4 * PI * PI; +var DAYS_PER_YEAR = 365.24; + +function Body(x,y,z,vx,vy,vz,mass){ + this.x = x; + this.y = y; + this.z = z; + this.vx = vx; + this.vy = vy; + this.vz = vz; + this.mass = mass; +} + +Body.prototype.offsetMomentum = function(px,py,pz) { + this.vx = -px / SOLAR_MASS; + this.vy = -py / SOLAR_MASS; + this.vz = -pz / SOLAR_MASS; + return this; +} + +function Jupiter(){ + return new Body( + 4.84143144246472090e+00, + -1.16032004402742839e+00, + -1.03622044471123109e-01, + 1.66007664274403694e-03 * DAYS_PER_YEAR, + 7.69901118419740425e-03 * DAYS_PER_YEAR, + -6.90460016972063023e-05 * DAYS_PER_YEAR, + 9.54791938424326609e-04 * SOLAR_MASS + ); +} + +function Saturn(){ + return new Body( + 8.34336671824457987e+00, + 4.12479856412430479e+00, + -4.03523417114321381e-01, + -2.76742510726862411e-03 * DAYS_PER_YEAR, + 4.99852801234917238e-03 * DAYS_PER_YEAR, + 2.30417297573763929e-05 * DAYS_PER_YEAR, + 2.85885980666130812e-04 * SOLAR_MASS + ); +} + +function Uranus(){ + return new Body( + 1.28943695621391310e+01, + -1.51111514016986312e+01, + -2.23307578892655734e-01, + 2.96460137564761618e-03 * DAYS_PER_YEAR, + 2.37847173959480950e-03 * DAYS_PER_YEAR, + -2.96589568540237556e-05 * DAYS_PER_YEAR, + 4.36624404335156298e-05 * SOLAR_MASS + ); +} + +function Neptune(){ + return new Body( + 1.53796971148509165e+01, + -2.59193146099879641e+01, + 1.79258772950371181e-01, + 2.68067772490389322e-03 * DAYS_PER_YEAR, + 1.62824170038242295e-03 * DAYS_PER_YEAR, + -9.51592254519715870e-05 * DAYS_PER_YEAR, + 5.15138902046611451e-05 * SOLAR_MASS + ); +} + +function Sun(){ + return new Body(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SOLAR_MASS); +} + + +function NBodySystem(bodies){ + this.bodies = bodies; + var px = 0.0; + var py = 0.0; + var pz = 0.0; + var size = this.bodies.length; + for (var i=0; i0){ + for (var i=1; i<=prefixWidth; i++) s = " " + s; + } + return s; +} + +function nsieve(m, isPrime){ + var i, k, count; + + for (i=2; i<=m; i++) { isPrime[i] = true; } + count = 0; + + for (i=2; i<=m; i++){ + if (isPrime[i]) { + for (k=i+i; k<=m; k+=i) isPrime[k] = false; + count++; + } + } + return count; +} + +var ret = 0; +function sieve() { + for (var i = 1; i <= 3; i++ ) { + var m = (1<> ((b << 1) & 14)); +c += 3 & (bi3b >> ((b >> 2) & 14)); +c += 3 & (bi3b >> ((b >> 5) & 6)); +return c; + +/* +lir4,0xE994; 9 instructions, no memory access, minimal register dependence, 6 shifts, 2 adds, 1 inline assign +rlwinmr5,r3,1,28,30 +rlwinmr6,r3,30,28,30 +rlwinmr7,r3,27,29,30 +rlwnmr8,r4,r5,30,31 +rlwnmr9,r4,r6,30,31 +rlwnmr10,r4,r7,30,31 +addr3,r8,r9 +addr3,r3,r10 +*/ +} + +var ret = 0; +function TimeFunc(func) { + var x, y, t; + for(var x=0; x<500; x++) + for(var y=0; y<256; y++) { + ret += func(y); + } +} + +TimeFunc(fast3bitlookup); +assertEq(ret, 512000) diff --git a/js/src/jit-test/tests/sunspider/check-bitops-bits-in-byte.js b/js/src/jit-test/tests/sunspider/check-bitops-bits-in-byte.js new file mode 100644 index 0000000000..8a0efdaa28 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-bitops-bits-in-byte.js @@ -0,0 +1,24 @@ +// Copyright (c) 2004 by Arthur Langereis (arthur_ext at domain xfinitegames, tld com) + + +// 1 op = 2 assigns, 16 compare/branches, 8 ANDs, (0-8) ADDs, 8 SHLs +// O(n) +function bitsinbyte(b) { +var m = 1, c = 0; +while(m<0x100) { +if(b & m) c++; +m <<= 1; +} +return c; +} + +var ret = 0; +function TimeFunc(func) { +var x, y, t; +for(var x=0; x<350; x++) +for(var y=0; y<256; y++) + ret += func(y); +} + +TimeFunc(bitsinbyte); +assertEq(ret, 358400) diff --git a/js/src/jit-test/tests/sunspider/check-bitops-bitwise-and.js b/js/src/jit-test/tests/sunspider/check-bitops-bitwise-and.js new file mode 100644 index 0000000000..5971de73ee --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-bitops-bitwise-and.js @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +bitwiseAndValue = 4294967296; +for (var i = 0; i < 60; i++) + bitwiseAndValue = bitwiseAndValue & i; +assertEq(bitwiseAndValue, 0) diff --git a/js/src/jit-test/tests/sunspider/check-bitops-nsieve-bits.js b/js/src/jit-test/tests/sunspider/check-bitops-nsieve-bits.js new file mode 100644 index 0000000000..1db6ff27fa --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-bitops-nsieve-bits.js @@ -0,0 +1,40 @@ +// The Great Computer Language Shootout +// http://shootout.alioth.debian.org +// +// Contributed by Ian Osgood + +var result = []; + +function pad(n,width) { + var s = n.toString(); + while (s.length < width) s = ' ' + s; + return s; +} + +function primes(isPrime, n) { + var i, count = 0, m = 10000<>5; + + for (i=0; i>5] & 1<<(i&31)) { + for (var j=i+i; j>5] &= ~(1<<(j&31))); + count++; + } +} + +function sieve() { + for (var i = 4; i <= 4; i++) { + var isPrime = new Array((10000<>5); + primes(isPrime, i); + } +} + +sieve(); + +var ret = 0; +for (var i = 0; i < result.length; ++i) + ret += result[i]; + +assertEq(ret, -211235557404919) diff --git a/js/src/jit-test/tests/sunspider/check-controlflow-recursive.js b/js/src/jit-test/tests/sunspider/check-controlflow-recursive.js new file mode 100644 index 0000000000..8ee010e9ba --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-controlflow-recursive.js @@ -0,0 +1,27 @@ +// The Computer Language Shootout +// http://shootout.alioth.debian.org/ +// contributed by Isaac Gouy + +function ack(m,n){ + if (m==0) { return n+1; } + if (n==0) { return ack(m-1,1); } + return ack(m-1, ack(m,n-1) ); +} + +function fib(n) { + if (n < 2){ return 1; } + return fib(n-2) + fib(n-1); +} + +function tak(x,y,z) { + if (y >= x) return z; + return tak(tak(x-1,y,z), tak(y-1,z,x), tak(z-1,x,y)); +} + +var ret = 0; +for ( var i = 3; i <= 5; i++ ) { + ret += ack(3,i); + ret += fib(17.0+i); + ret += tak(3*i+3,2*i+2,i+1); +} +assertEq(ret, 57775); diff --git a/js/src/jit-test/tests/sunspider/check-crypto-aes.js b/js/src/jit-test/tests/sunspider/check-crypto-aes.js new file mode 100644 index 0000000000..875d68fe85 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-crypto-aes.js @@ -0,0 +1,425 @@ +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + +/* + * AES Cipher function: encrypt 'input' with Rijndael algorithm + * + * takes byte-array 'input' (16 bytes) + * 2D byte-array key schedule 'w' (Nr+1 x Nb bytes) + * + * applies Nr rounds (10/12/14) using key schedule w for 'add round key' stage + * + * returns byte-array encrypted value (16 bytes) + */ +function Cipher(input, w) { // main Cipher function [§5.1] + var Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES) + var Nr = w.length/Nb - 1; // no of rounds: 10/12/14 for 128/192/256-bit keys + + var state = [[],[],[],[]]; // initialise 4xNb byte-array 'state' with input [§3.4] + for (var i=0; i<4*Nb; i++) state[i%4][Math.floor(i/4)] = input[i]; + + state = AddRoundKey(state, w, 0, Nb); + + for (var round=1; round 6 && i%Nk == 4) { + temp = SubWord(temp); + } + for (var t=0; t<4; t++) w[i][t] = w[i-Nk][t] ^ temp[t]; + } + + return w; +} + +function SubWord(w) { // apply SBox to 4-byte word w + for (var i=0; i<4; i++) w[i] = Sbox[w[i]]; + return w; +} + +function RotWord(w) { // rotate 4-byte word w left by one byte + w[4] = w[0]; + for (var i=0; i<4; i++) w[i] = w[i+1]; + return w; +} + + +// Sbox is pre-computed multiplicative inverse in GF(2^8) used in SubBytes and KeyExpansion [§5.1.1] +var Sbox = [0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5,0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76, + 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0,0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0, + 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc,0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15, + 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a,0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75, + 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0,0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84, + 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b,0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf, + 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85,0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8, + 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5,0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2, + 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17,0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73, + 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88,0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb, + 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c,0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79, + 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9,0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08, + 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6,0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a, + 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e,0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e, + 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94,0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf, + 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68,0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16]; + +// Rcon is Round Constant used for the Key Expansion [1st col is 2^(r-1) in GF(2^8)] [§5.2] +var Rcon = [ [0x00, 0x00, 0x00, 0x00], + [0x01, 0x00, 0x00, 0x00], + [0x02, 0x00, 0x00, 0x00], + [0x04, 0x00, 0x00, 0x00], + [0x08, 0x00, 0x00, 0x00], + [0x10, 0x00, 0x00, 0x00], + [0x20, 0x00, 0x00, 0x00], + [0x40, 0x00, 0x00, 0x00], + [0x80, 0x00, 0x00, 0x00], + [0x1b, 0x00, 0x00, 0x00], + [0x36, 0x00, 0x00, 0x00] ]; + + +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + +/* + * Use AES to encrypt 'plaintext' with 'password' using 'nBits' key, in 'Counter' mode of operation + * - see http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf + * for each block + * - outputblock = cipher(counter, key) + * - cipherblock = plaintext xor outputblock + */ +function AESEncryptCtr(plaintext, password, nBits) { + if (!(nBits==128 || nBits==192 || nBits==256)) return ''; // standard allows 128/192/256 bit keys + + // for this example script, generate the key by applying Cipher to 1st 16/24/32 chars of password; + // for real-world applications, a more secure approach would be to hash the password e.g. with SHA-1 + var nBytes = nBits/8; // no bytes in key + var pwBytes = new Array(nBytes); + for (var i=0; i>> i*8) & 0xff; + for (var i=0; i<4; i++) counterBlock[i+4] = (nonce/0x100000000 >>> i*8) & 0xff; + + // generate key schedule - an expansion of the key into distinct Key Rounds for each round + var keySchedule = KeyExpansion(key); + + var blockCount = Math.ceil(plaintext.length/blockSize); + var ciphertext = new Array(blockCount); // ciphertext as array of strings + + for (var b=0; b>> c*8) & 0xff; + for (var c=0; c<4; c++) counterBlock[15-c-4] = (b/0x100000000 >>> c*8) + + var cipherCntr = Cipher(counterBlock, keySchedule); // -- encrypt counter block -- + + // calculate length of final block: + var blockLength = b>> c*8) & 0xff; + for (var c=0; c<4; c++) counterBlock[15-c-4] = ((b/0x100000000-1) >>> c*8) & 0xff; + + var cipherCntr = Cipher(counterBlock, keySchedule); // encrypt counter block + + ciphertext[b] = unescCtrlChars(ciphertext[b]); + + var pt = ''; + for (var i=0; i>18 & 0x3f; + h2 = bits>>12 & 0x3f; + h3 = bits>>6 & 0x3f; + h4 = bits & 0x3f; + + // end of string? index to '=' in b64 + if (isNaN(o3)) h4 = 64; + if (isNaN(o2)) h3 = 64; + + // use hexets to index into b64, and append result to encoded string + enc += b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4); + } while (i < str.length); + + return enc; +} + +function decodeBase64(str) { + var o1, o2, o3, h1, h2, h3, h4, bits, i=0, enc=''; + + do { // unpack four hexets into three octets using index points in b64 + h1 = b64.indexOf(str.charAt(i++)); + h2 = b64.indexOf(str.charAt(i++)); + h3 = b64.indexOf(str.charAt(i++)); + h4 = b64.indexOf(str.charAt(i++)); + + bits = h1<<18 | h2<<12 | h3<<6 | h4; + + o1 = bits>>16 & 0xff; + o2 = bits>>8 & 0xff; + o3 = bits & 0xff; + + if (h3 == 64) enc += String.fromCharCode(o1); + else if (h4 == 64) enc += String.fromCharCode(o1, o2); + else enc += String.fromCharCode(o1, o2, o3); + } while (i < str.length); + + return decodeUTF8(enc); // decode UTF-8 byte-array back to Unicode +} + +function encodeUTF8(str) { // encode multi-byte string into utf-8 multiple single-byte characters + str = str.replace( + /[\u0080-\u07ff]/g, // U+0080 - U+07FF = 2-byte chars + function(c) { + var cc = c.charCodeAt(0); + return String.fromCharCode(0xc0 | cc>>6, 0x80 | cc&0x3f); } + ); + str = str.replace( + /[\u0800-\uffff]/g, // U+0800 - U+FFFF = 3-byte chars + function(c) { + var cc = c.charCodeAt(0); + return String.fromCharCode(0xe0 | cc>>12, 0x80 | cc>>6&0x3F, 0x80 | cc&0x3f); } + ); + return str; +} + +function decodeUTF8(str) { // decode utf-8 encoded string back into multi-byte characters + str = str.replace( + /[\u00c0-\u00df][\u0080-\u00bf]/g, // 2-byte chars + function(c) { + var cc = (c.charCodeAt(0)&0x1f)<<6 | c.charCodeAt(1)&0x3f; + return String.fromCharCode(cc); } + ); + str = str.replace( + /[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g, // 3-byte chars + function(c) { + var cc = (c.charCodeAt(0)&0x0f)<<12 | (c.charCodeAt(1)&0x3f<<6) | c.charCodeAt(2)&0x3f; + return String.fromCharCode(cc); } + ); + return str; +} + + +function byteArrayToHexStr(b) { // convert byte array to hex string for displaying test vectors + var s = ''; + for (var i=0; i> 5] |= 0x80 << ((len) % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + + a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); + d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); + c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); + b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); + a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); + d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); + c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); + b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); + a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); + d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); + c = md5_ff(c, d, a, b, x[i+10], 17, -42063); + b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); + a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); + d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); + c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); + b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); + + a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); + d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); + c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); + b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); + a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); + d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); + c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); + b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); + a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); + d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); + c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); + b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); + a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); + d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); + c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); + b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); + + a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); + d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); + c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); + b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); + a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); + d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); + c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); + b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); + a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); + d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); + c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); + b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); + a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); + d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); + c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); + b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); + + a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); + d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); + c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); + b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); + a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); + d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); + c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); + b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); + a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); + d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); + c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); + b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); + a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); + d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); + c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); + b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + } + return Array(a, b, c, d); + +} + +/* + * These functions implement the four basic operations the algorithm uses. + */ +function md5_cmn(q, a, b, x, s, t) +{ + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); +} +function md5_ff(a, b, c, d, x, s, t) +{ + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5_gg(a, b, c, d, x, s, t) +{ + return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5_hh(a, b, c, d, x, s, t) +{ + return md5_cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5_ii(a, b, c, d, x, s, t) +{ + return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +/* + * Calculate the HMAC-MD5, of a key and some data + */ +function core_hmac_md5(key, data) +{ + var bkey = str2binl(key); + if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); + + var ipad = Array(16), opad = Array(16); + for(var i = 0; i < 16; i++) + { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } + + var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); + return core_md5(opad.concat(hash), 512 + 128); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function bit_rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* + * Convert a string to an array of little-endian words + * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. + */ +function str2binl(str) +{ + var bin = Array(); + var mask = (1 << chrsz) - 1; + for(var i = 0; i < str.length * chrsz; i += chrsz) + bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); + return bin; +} + +/* + * Convert an array of little-endian words to a string + */ +function binl2str(bin) +{ + var str = ""; + var mask = (1 << chrsz) - 1; + for(var i = 0; i < bin.length * 32; i += chrsz) + str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); + return str; +} + +/* + * Convert an array of little-endian words to a hex string. + */ +function binl2hex(binarray) +{ + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i++) + { + str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); + } + return str; +} + +/* + * Convert an array of little-endian words to a base-64 string + */ +function binl2b64(binarray) +{ + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i += 3) + { + var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) + | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) + | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); + for(var j = 0; j < 4; j++) + { + if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; + else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); + } + } + return str; +} + +var plainText = "Rebellious subjects, enemies to peace,\n\ +Profaners of this neighbour-stained steel,--\n\ +Will they not hear? What, ho! you men, you beasts,\n\ +That quench the fire of your pernicious rage\n\ +With purple fountains issuing from your veins,\n\ +On pain of torture, from those bloody hands\n\ +Throw your mistemper'd weapons to the ground,\n\ +And hear the sentence of your moved prince.\n\ +Three civil brawls, bred of an airy word,\n\ +By thee, old Capulet, and Montague,\n\ +Have thrice disturb'd the quiet of our streets,\n\ +And made Verona's ancient citizens\n\ +Cast by their grave beseeming ornaments,\n\ +To wield old partisans, in hands as old,\n\ +Canker'd with peace, to part your canker'd hate:\n\ +If ever you disturb our streets again,\n\ +Your lives shall pay the forfeit of the peace.\n\ +For this time, all the rest depart away:\n\ +You Capulet; shall go along with me:\n\ +And, Montague, come you this afternoon,\n\ +To know our further pleasure in this case,\n\ +To old Free-town, our common judgment-place.\n\ +Once more, on pain of death, all men depart." + +for (var i = 0; i <4; i++) { + plainText += plainText; +} + +var md5Output = hex_md5(plainText); +assertEq(md5Output, "a831e91e0f70eddcb70dc61c6f82f6cd") diff --git a/js/src/jit-test/tests/sunspider/check-crypto-sha1.js b/js/src/jit-test/tests/sunspider/check-crypto-sha1.js new file mode 100644 index 0000000000..d25d5adb1d --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-crypto-sha1.js @@ -0,0 +1,225 @@ +/* + * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined + * in FIPS PUB 180-1 + * Version 2.1a Copyright Paul Johnston 2000 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for details. + */ + +/* + * Configurable variables. You may need to tweak these to be compatible with + * the server-side, but the defaults work in most cases. + */ +var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ +var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ +var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ + +/* + * These are the functions you'll usually want to call + * They take string arguments and return either hex or base-64 encoded strings + */ +function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));} +function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));} +function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));} +function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));} +function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));} +function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));} + +/* + * Perform a simple self-test to see if the VM is working + */ +function sha1_vm_test() +{ + return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d"; +} + +/* + * Calculate the SHA-1 of an array of big-endian words, and a bit length + */ +function core_sha1(x, len) +{ + /* append padding */ + x[len >> 5] |= 0x80 << (24 - len % 32); + x[((len + 64 >> 9) << 4) + 15] = len; + + var w = Array(80); + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + var e = -1009589776; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + var olde = e; + + for(var j = 0; j < 80; j++) + { + if(j < 16) w[j] = x[i + j]; + else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); + var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), + safe_add(safe_add(e, w[j]), sha1_kt(j))); + e = d; + d = c; + c = rol(b, 30); + b = a; + a = t; + } + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + e = safe_add(e, olde); + } + return Array(a, b, c, d, e); + +} + +/* + * Perform the appropriate triplet combination function for the current + * iteration + */ +function sha1_ft(t, b, c, d) +{ + if(t < 20) return (b & c) | ((~b) & d); + if(t < 40) return b ^ c ^ d; + if(t < 60) return (b & c) | (b & d) | (c & d); + return b ^ c ^ d; +} + +/* + * Determine the appropriate additive constant for the current iteration + */ +function sha1_kt(t) +{ + return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : + (t < 60) ? -1894007588 : -899497514; +} + +/* + * Calculate the HMAC-SHA1 of a key and some data + */ +function core_hmac_sha1(key, data) +{ + var bkey = str2binb(key); + if(bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz); + + var ipad = Array(16), opad = Array(16); + for(var i = 0; i < 16; i++) + { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } + + var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz); + return core_sha1(opad.concat(hash), 512 + 160); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* + * Convert an 8-bit or 16-bit string to an array of big-endian words + * In 8-bit function, characters >255 have their hi-byte silently ignored. + */ +function str2binb(str) +{ + var bin = Array(); + var mask = (1 << chrsz) - 1; + for(var i = 0; i < str.length * chrsz; i += chrsz) + bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i%32); + return bin; +} + +/* + * Convert an array of big-endian words to a string + */ +function binb2str(bin) +{ + var str = ""; + var mask = (1 << chrsz) - 1; + for(var i = 0; i < bin.length * 32; i += chrsz) + str += String.fromCharCode((bin[i>>5] >>> (32 - chrsz - i%32)) & mask); + return str; +} + +/* + * Convert an array of big-endian words to a hex string. + */ +function binb2hex(binarray) +{ + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i++) + { + str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + + hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF); + } + return str; +} + +/* + * Convert an array of big-endian words to a base-64 string + */ +function binb2b64(binarray) +{ + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i += 3) + { + var triplet = (((binarray[i >> 2] >> 8 * (3 - i %4)) & 0xFF) << 16) + | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 ) + | ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF); + for(var j = 0; j < 4; j++) + { + if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; + else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); + } + } + return str; +} + + +var plainText = "Two households, both alike in dignity,\n\ +In fair Verona, where we lay our scene,\n\ +From ancient grudge break to new mutiny,\n\ +Where civil blood makes civil hands unclean.\n\ +From forth the fatal loins of these two foes\n\ +A pair of star-cross'd lovers take their life;\n\ +Whole misadventured piteous overthrows\n\ +Do with their death bury their parents' strife.\n\ +The fearful passage of their death-mark'd love,\n\ +And the continuance of their parents' rage,\n\ +Which, but their children's end, nought could remove,\n\ +Is now the two hours' traffic of our stage;\n\ +The which if you with patient ears attend,\n\ +What here shall miss, our toil shall strive to mend."; + +for (var i = 0; i <4; i++) { + plainText += plainText; +} + +var sha1Output = hex_sha1(plainText); +assertEq(sha1Output, "2524d264def74cce2498bf112bedf00e6c0b796d") diff --git a/js/src/jit-test/tests/sunspider/check-date-format-tofte.js b/js/src/jit-test/tests/sunspider/check-date-format-tofte.js new file mode 100644 index 0000000000..c3809f1d14 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-date-format-tofte.js @@ -0,0 +1,304 @@ +// |jit-test| tz-pacific; skip-if: getBuildConfiguration("wasi") + +function arrayExists(array, x) { + for (var i = 0; i < array.length; i++) { + if (array[i] == x) return true; + } + return false; +} + +Date.prototype.formatDate = function (input,time) { + // formatDate : + // a PHP date like function, for formatting date strings + // See: http://www.php.net/date + // + // input : format string + // time : epoch time (seconds, and optional) + // + // if time is not passed, formatting is based on + // the current "this" date object's set time. + // + // supported: + // a, A, B, d, D, F, g, G, h, H, i, j, l (lowercase L), L, + // m, M, n, O, r, s, S, t, U, w, W, y, Y, z + // + // unsupported: + // I (capital i), T, Z + + var switches = ["a", "A", "B", "d", "D", "F", "g", "G", "h", "H", + "i", "j", "l", "L", "m", "M", "n", "O", "r", "s", + "S", "t", "U", "w", "W", "y", "Y", "z"]; + var daysLong = ["Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", "Saturday"]; + var daysShort = ["Sun", "Mon", "Tue", "Wed", + "Thu", "Fri", "Sat"]; + var monthsShort = ["Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", "Sep", + "Oct", "Nov", "Dec"]; + var monthsLong = ["January", "February", "March", "April", + "May", "June", "July", "August", "September", + "October", "November", "December"]; + var daysSuffix = ["st", "nd", "rd", "th", "th", "th", "th", // 1st - 7th + "th", "th", "th", "th", "th", "th", "th", // 8th - 14th + "th", "th", "th", "th", "th", "th", "st", // 15th - 21st + "nd", "rd", "th", "th", "th", "th", "th", // 22nd - 28th + "th", "th", "st"]; // 29th - 31st + + function a() { + // Lowercase Ante meridiem and Post meridiem + return self.getHours() > 11? "pm" : "am"; + } + function A() { + // Uppercase Ante meridiem and Post meridiem + return self.getHours() > 11? "PM" : "AM"; + } + + function B(){ + // Swatch internet time. code simply grabbed from ppk, + // since I was feeling lazy: + // http://www.xs4all.nl/~ppk/js/beat.html + var off = (self.getTimezoneOffset() + 60)*60; + var theSeconds = (self.getHours() * 3600) + + (self.getMinutes() * 60) + + self.getSeconds() + off; + var beat = Math.floor(theSeconds/86.4); + if (beat > 1000) beat -= 1000; + if (beat < 0) beat += 1000; + if ((""+beat).length == 1) beat = "00"+beat; + if ((""+beat).length == 2) beat = "0"+beat; + return beat; + } + + function d() { + // Day of the month, 2 digits with leading zeros + return new String(self.getDate()).length == 1? + "0"+self.getDate() : self.getDate(); + } + function D() { + // A textual representation of a day, three letters + return daysShort[self.getDay()]; + } + function F() { + // A full textual representation of a month + return monthsLong[self.getMonth()]; + } + function g() { + // 12-hour format of an hour without leading zeros + return self.getHours() > 12? self.getHours()-12 : self.getHours(); + } + function G() { + // 24-hour format of an hour without leading zeros + return self.getHours(); + } + function h() { + // 12-hour format of an hour with leading zeros + if (self.getHours() > 12) { + var s = new String(self.getHours()-12); + return s.length == 1? + "0"+ (self.getHours()-12) : self.getHours()-12; + } else { + var s = new String(self.getHours()); + return s.length == 1? + "0"+self.getHours() : self.getHours(); + } + } + function H() { + // 24-hour format of an hour with leading zeros + return new String(self.getHours()).length == 1? + "0"+self.getHours() : self.getHours(); + } + function i() { + // Minutes with leading zeros + return new String(self.getMinutes()).length == 1? + "0"+self.getMinutes() : self.getMinutes(); + } + function j() { + // Day of the month without leading zeros + return self.getDate(); + } + function l() { + // A full textual representation of the day of the week + return daysLong[self.getDay()]; + } + function L() { + // leap year or not. 1 if leap year, 0 if not. + // the logic should match iso's 8601 standard. + var y_ = Y(); + if ( + (y_ % 4 == 0 && y_ % 100 != 0) || + (y_ % 4 == 0 && y_ % 100 == 0 && y_ % 400 == 0) + ) { + return 1; + } else { + return 0; + } + } + function m() { + // Numeric representation of a month, with leading zeros + return self.getMonth() < 9? + "0"+(self.getMonth()+1) : + self.getMonth()+1; + } + function M() { + // A short textual representation of a month, three letters + return monthsShort[self.getMonth()]; + } + function n() { + // Numeric representation of a month, without leading zeros + return self.getMonth()+1; + } + function O() { + // Difference to Greenwich time (GMT) in hours + var os = Math.abs(self.getTimezoneOffset()); + var h = ""+Math.floor(os/60); + var m = ""+(os%60); + h.length == 1? h = "0"+h:1; + m.length == 1? m = "0"+m:1; + return self.getTimezoneOffset() < 0 ? "+"+h+m : "-"+h+m; + } + function r() { + // RFC 822 formatted date + var r; // result + // Thu , 21 Dec 2000 + r = D() + ", " + j() + " " + M() + " " + Y() + + // 16 : 01 : 07 +0200 + " " + H() + ":" + i() + ":" + s() + " " + O(); + return r; + } + function S() { + // English ordinal suffix for the day of the month, 2 characters + return daysSuffix[self.getDate()-1]; + } + function s() { + // Seconds, with leading zeros + return new String(self.getSeconds()).length == 1? + "0"+self.getSeconds() : self.getSeconds(); + } + function t() { + + // thanks to Matt Bannon for some much needed code-fixes here! + var daysinmonths = [null,31,28,31,30,31,30,31,31,30,31,30,31]; + if (L()==1 && n()==2) return 29; // leap day + return daysinmonths[n()]; + } + function U() { + // Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) + return Math.round(self.getTime()/1000); + } + function W() { + // Weeknumber, as per ISO specification: + // http://www.cl.cam.ac.uk/~mgk25/iso-time.html + + // if the day is three days before newyears eve, + // there's a chance it's "week 1" of next year. + // here we check for that. + var beforeNY = 364+L() - z(); + var afterNY = z(); + var weekday = w()!=0?w()-1:6; // makes sunday (0), into 6. + if (beforeNY <= 2 && weekday <= 2-beforeNY) { + return 1; + } + // similarly, if the day is within threedays of newyears + // there's a chance it belongs in the old year. + var ny = new Date("January 1 " + Y() + " 00:00:00"); + var nyDay = ny.getDay()!=0?ny.getDay()-1:6; + if ( + (afterNY <= 2) && + (nyDay >=4) && + (afterNY >= (6-nyDay)) + ) { + // Since I'm not sure we can just always return 53, + // i call the function here again, using the last day + // of the previous year, as the date, and then just + // return that week. + var prevNY = new Date("December 31 " + (Y()-1) + " 00:00:00"); + return prevNY.formatDate("W"); + } + + // week 1, is the week that has the first thursday in it. + // note that this value is not zero index. + if (nyDay <= 3) { + // first day of the year fell on a thursday, or earlier. + return 1 + Math.floor( ( z() + nyDay ) / 7 ); + } else { + // first day of the year fell on a friday, or later. + return 1 + Math.floor( ( z() - ( 7 - nyDay ) ) / 7 ); + } + } + function w() { + // Numeric representation of the day of the week + return self.getDay(); + } + + function Y() { + // A full numeric representation of a year, 4 digits + + // we first check, if getFullYear is supported. if it + // is, we just use that. ppks code is nice, but wont + // work with dates outside 1900-2038, or something like that + if (self.getFullYear) { + var newDate = new Date("January 1 2001 00:00:00 +0000"); + var x = newDate .getFullYear(); + if (x == 2001) { + // i trust the method now + return self.getFullYear(); + } + } + // else, do this: + // codes thanks to ppk: + // http://www.xs4all.nl/~ppk/js/introdate.html + var x = self.getYear(); + var y = x % 100; + y += (y < 38) ? 2000 : 1900; + return y; + } + function y() { + // A two-digit representation of a year + var y = Y()+""; + return y.substring(y.length-2,y.length); + } + function z() { + // The day of the year, zero indexed! 0 through 366 + var t = new Date("January 1 " + Y() + " 00:00:00"); + var diff = self.getTime() - t.getTime(); + return Math.floor(diff/1000/60/60/24); + } + + var self = this; + if (time) { + // save time + var prevTime = self.getTime(); + self.setTime(time); + } + + var ia = input.split(""); + var ij = 0; + while (ia[ij]) { + if (ia[ij] == "\\") { + // this is our way of allowing users to escape stuff + ia.splice(ij,1); + } else { + if (arrayExists(switches,ia[ij])) { + ia[ij] = eval(ia[ij] + "()"); + } + } + ij++; + } + // reset time, back to what it was + if (prevTime) { + self.setTime(prevTime); + } + return ia.join(""); +} + +var date = new Date("1/1/2007 1:11:11"); + +var ret = ""; +for (i = 0; i < 500; ++i) { + var shortFormat = date.formatDate("Y-m-d"); + var longFormat = date.formatDate("l, F d, Y g:i:s A"); + ret += shortFormat + longFormat; + date.setTime(date.getTime() + 84266956); +} +var expected = "2007-01-01Monday, January 01, 2007 1:11:11 AM2007-01-02Tuesday, January 02, 2007 0:35:37 AM2007-01-03Wednesday, January 03, 2007 0:00:04 AM2007-01-03Wednesday, January 03, 2007 11:24:31 PM2007-01-04Thursday, January 04, 2007 10:48:58 PM2007-01-05Friday, January 05, 2007 10:13:25 PM2007-01-06Saturday, January 06, 2007 9:37:52 PM2007-01-07Sunday, January 07, 2007 9:02:19 PM2007-01-08Monday, January 08, 2007 8:26:46 PM2007-01-09Tuesday, January 09, 2007 7:51:13 PM2007-01-10Wednesday, January 10, 2007 7:15:40 PM2007-01-11Thursday, January 11, 2007 6:40:07 PM2007-01-12Friday, January 12, 2007 6:04:34 PM2007-01-13Saturday, January 13, 2007 5:29:01 PM2007-01-14Sunday, January 14, 2007 4:53:28 PM2007-01-15Monday, January 15, 2007 4:17:55 PM2007-01-16Tuesday, January 16, 2007 3:42:22 PM2007-01-17Wednesday, January 17, 2007 3:06:49 PM2007-01-18Thursday, January 18, 2007 2:31:16 PM2007-01-19Friday, January 19, 2007 1:55:43 PM2007-01-20Saturday, January 20, 2007 1:20:10 PM2007-01-21Sunday, January 21, 2007 12:44:37 PM2007-01-22Monday, January 22, 2007 12:09:04 PM2007-01-23Tuesday, January 23, 2007 11:33:30 AM2007-01-24Wednesday, January 24, 2007 10:57:57 AM2007-01-25Thursday, January 25, 2007 10:22:24 AM2007-01-26Friday, January 26, 2007 9:46:51 AM2007-01-27Saturday, January 27, 2007 9:11:18 AM2007-01-28Sunday, January 28, 2007 8:35:45 AM2007-01-29Monday, January 29, 2007 8:00:12 AM2007-01-30Tuesday, January 30, 2007 7:24:39 AM2007-01-31Wednesday, January 31, 2007 6:49:06 AM2007-02-01Thursday, February 01, 2007 6:13:33 AM2007-02-02Friday, February 02, 2007 5:38:00 AM2007-02-03Saturday, February 03, 2007 5:02:27 AM2007-02-04Sunday, February 04, 2007 4:26:54 AM2007-02-05Monday, February 05, 2007 3:51:21 AM2007-02-06Tuesday, February 06, 2007 3:15:48 AM2007-02-07Wednesday, February 07, 2007 2:40:15 AM2007-02-08Thursday, February 08, 2007 2:04:42 AM2007-02-09Friday, February 09, 2007 1:29:09 AM2007-02-10Saturday, February 10, 2007 0:53:36 AM2007-02-11Sunday, February 11, 2007 0:18:03 AM2007-02-11Sunday, February 11, 2007 11:42:30 PM2007-02-12Monday, February 12, 2007 11:06:57 PM2007-02-13Tuesday, February 13, 2007 10:31:24 PM2007-02-14Wednesday, February 14, 2007 9:55:50 PM2007-02-15Thursday, February 15, 2007 9:20:17 PM2007-02-16Friday, February 16, 2007 8:44:44 PM2007-02-17Saturday, February 17, 2007 8:09:11 PM2007-02-18Sunday, February 18, 2007 7:33:38 PM2007-02-19Monday, February 19, 2007 6:58:05 PM2007-02-20Tuesday, February 20, 2007 6:22:32 PM2007-02-21Wednesday, February 21, 2007 5:46:59 PM2007-02-22Thursday, February 22, 2007 5:11:26 PM2007-02-23Friday, February 23, 2007 4:35:53 PM2007-02-24Saturday, February 24, 2007 4:00:20 PM2007-02-25Sunday, February 25, 2007 3:24:47 PM2007-02-26Monday, February 26, 2007 2:49:14 PM2007-02-27Tuesday, February 27, 2007 2:13:41 PM2007-02-28Wednesday, February 28, 2007 1:38:08 PM2007-03-01Thursday, March 01, 2007 1:02:35 PM2007-03-02Friday, March 02, 2007 12:27:02 PM2007-03-03Saturday, March 03, 2007 11:51:29 AM2007-03-04Sunday, March 04, 2007 11:15:56 AM2007-03-05Monday, March 05, 2007 10:40:23 AM2007-03-06Tuesday, March 06, 2007 10:04:50 AM2007-03-07Wednesday, March 07, 2007 9:29:17 AM2007-03-08Thursday, March 08, 2007 8:53:44 AM2007-03-09Friday, March 09, 2007 8:18:10 AM2007-03-10Saturday, March 10, 2007 7:42:37 AM2007-03-11Sunday, March 11, 2007 8:07:04 AM2007-03-12Monday, March 12, 2007 7:31:31 AM2007-03-13Tuesday, March 13, 2007 6:55:58 AM2007-03-14Wednesday, March 14, 2007 6:20:25 AM2007-03-15Thursday, March 15, 2007 5:44:52 AM2007-03-16Friday, March 16, 2007 5:09:19 AM2007-03-17Saturday, March 17, 2007 4:33:46 AM2007-03-18Sunday, March 18, 2007 3:58:13 AM2007-03-19Monday, March 19, 2007 3:22:40 AM2007-03-20Tuesday, March 20, 2007 2:47:07 AM2007-03-21Wednesday, March 21, 2007 2:11:34 AM2007-03-22Thursday, March 22, 2007 1:36:01 AM2007-03-23Friday, March 23, 2007 1:00:28 AM2007-03-24Saturday, March 24, 2007 0:24:55 AM2007-03-24Saturday, March 24, 2007 11:49:22 PM2007-03-25Sunday, March 25, 2007 11:13:49 PM2007-03-26Monday, March 26, 2007 10:38:16 PM2007-03-27Tuesday, March 27, 2007 10:02:43 PM2007-03-28Wednesday, March 28, 2007 9:27:10 PM2007-03-29Thursday, March 29, 2007 8:51:37 PM2007-03-30Friday, March 30, 2007 8:16:03 PM2007-03-31Saturday, March 31, 2007 7:40:30 PM2007-04-01Sunday, April 01, 2007 7:04:57 PM2007-04-02Monday, April 02, 2007 6:29:24 PM2007-04-03Tuesday, April 03, 2007 5:53:51 PM2007-04-04Wednesday, April 04, 2007 5:18:18 PM2007-04-05Thursday, April 05, 2007 4:42:45 PM2007-04-06Friday, April 06, 2007 4:07:12 PM2007-04-07Saturday, April 07, 2007 3:31:39 PM2007-04-08Sunday, April 08, 2007 2:56:06 PM2007-04-09Monday, April 09, 2007 2:20:33 PM2007-04-10Tuesday, April 10, 2007 1:45:00 PM2007-04-11Wednesday, April 11, 2007 1:09:27 PM2007-04-12Thursday, April 12, 2007 12:33:54 PM2007-04-13Friday, April 13, 2007 11:58:21 AM2007-04-14Saturday, April 14, 2007 11:22:48 AM2007-04-15Sunday, April 15, 2007 10:47:15 AM2007-04-16Monday, April 16, 2007 10:11:42 AM2007-04-17Tuesday, April 17, 2007 9:36:09 AM2007-04-18Wednesday, April 18, 2007 9:00:36 AM2007-04-19Thursday, April 19, 2007 8:25:03 AM2007-04-20Friday, April 20, 2007 7:49:30 AM2007-04-21Saturday, April 21, 2007 7:13:57 AM2007-04-22Sunday, April 22, 2007 6:38:23 AM2007-04-23Monday, April 23, 2007 6:02:50 AM2007-04-24Tuesday, April 24, 2007 5:27:17 AM2007-04-25Wednesday, April 25, 2007 4:51:44 AM2007-04-26Thursday, April 26, 2007 4:16:11 AM2007-04-27Friday, April 27, 2007 3:40:38 AM2007-04-28Saturday, April 28, 2007 3:05:05 AM2007-04-29Sunday, April 29, 2007 2:29:32 AM2007-04-30Monday, April 30, 2007 1:53:59 AM2007-05-01Tuesday, May 01, 2007 1:18:26 AM2007-05-02Wednesday, May 02, 2007 0:42:53 AM2007-05-03Thursday, May 03, 2007 0:07:20 AM2007-05-03Thursday, May 03, 2007 11:31:47 PM2007-05-04Friday, May 04, 2007 10:56:14 PM2007-05-05Saturday, May 05, 2007 10:20:41 PM2007-05-06Sunday, May 06, 2007 9:45:08 PM2007-05-07Monday, May 07, 2007 9:09:35 PM2007-05-08Tuesday, May 08, 2007 8:34:02 PM2007-05-09Wednesday, May 09, 2007 7:58:29 PM2007-05-10Thursday, May 10, 2007 7:22:56 PM2007-05-11Friday, May 11, 2007 6:47:23 PM2007-05-12Saturday, May 12, 2007 6:11:50 PM2007-05-13Sunday, May 13, 2007 5:36:17 PM2007-05-14Monday, May 14, 2007 5:00:43 PM2007-05-15Tuesday, May 15, 2007 4:25:10 PM2007-05-16Wednesday, May 16, 2007 3:49:37 PM2007-05-17Thursday, May 17, 2007 3:14:04 PM2007-05-18Friday, May 18, 2007 2:38:31 PM2007-05-19Saturday, May 19, 2007 2:02:58 PM2007-05-20Sunday, May 20, 2007 1:27:25 PM2007-05-21Monday, May 21, 2007 12:51:52 PM2007-05-22Tuesday, May 22, 2007 12:16:19 PM2007-05-23Wednesday, May 23, 2007 11:40:46 AM2007-05-24Thursday, May 24, 2007 11:05:13 AM2007-05-25Friday, May 25, 2007 10:29:40 AM2007-05-26Saturday, May 26, 2007 9:54:07 AM2007-05-27Sunday, May 27, 2007 9:18:34 AM2007-05-28Monday, May 28, 2007 8:43:01 AM2007-05-29Tuesday, May 29, 2007 8:07:28 AM2007-05-30Wednesday, May 30, 2007 7:31:55 AM2007-05-31Thursday, May 31, 2007 6:56:22 AM2007-06-01Friday, June 01, 2007 6:20:49 AM2007-06-02Saturday, June 02, 2007 5:45:16 AM2007-06-03Sunday, June 03, 2007 5:09:43 AM2007-06-04Monday, June 04, 2007 4:34:10 AM2007-06-05Tuesday, June 05, 2007 3:58:37 AM2007-06-06Wednesday, June 06, 2007 3:23:03 AM2007-06-07Thursday, June 07, 2007 2:47:30 AM2007-06-08Friday, June 08, 2007 2:11:57 AM2007-06-09Saturday, June 09, 2007 1:36:24 AM2007-06-10Sunday, June 10, 2007 1:00:51 AM2007-06-11Monday, June 11, 2007 0:25:18 AM2007-06-11Monday, June 11, 2007 11:49:45 PM2007-06-12Tuesday, June 12, 2007 11:14:12 PM2007-06-13Wednesday, June 13, 2007 10:38:39 PM2007-06-14Thursday, June 14, 2007 10:03:06 PM2007-06-15Friday, June 15, 2007 9:27:33 PM2007-06-16Saturday, June 16, 2007 8:52:00 PM2007-06-17Sunday, June 17, 2007 8:16:27 PM2007-06-18Monday, June 18, 2007 7:40:54 PM2007-06-19Tuesday, June 19, 2007 7:05:21 PM2007-06-20Wednesday, June 20, 2007 6:29:48 PM2007-06-21Thursday, June 21, 2007 5:54:15 PM2007-06-22Friday, June 22, 2007 5:18:42 PM2007-06-23Saturday, June 23, 2007 4:43:09 PM2007-06-24Sunday, June 24, 2007 4:07:36 PM2007-06-25Monday, June 25, 2007 3:32:03 PM2007-06-26Tuesday, June 26, 2007 2:56:30 PM2007-06-27Wednesday, June 27, 2007 2:20:56 PM2007-06-28Thursday, June 28, 2007 1:45:23 PM2007-06-29Friday, June 29, 2007 1:09:50 PM2007-06-30Saturday, June 30, 2007 12:34:17 PM2007-07-01Sunday, July 01, 2007 11:58:44 AM2007-07-02Monday, July 02, 2007 11:23:11 AM2007-07-03Tuesday, July 03, 2007 10:47:38 AM2007-07-04Wednesday, July 04, 2007 10:12:05 AM2007-07-05Thursday, July 05, 2007 9:36:32 AM2007-07-06Friday, July 06, 2007 9:00:59 AM2007-07-07Saturday, July 07, 2007 8:25:26 AM2007-07-08Sunday, July 08, 2007 7:49:53 AM2007-07-09Monday, July 09, 2007 7:14:20 AM2007-07-10Tuesday, July 10, 2007 6:38:47 AM2007-07-11Wednesday, July 11, 2007 6:03:14 AM2007-07-12Thursday, July 12, 2007 5:27:41 AM2007-07-13Friday, July 13, 2007 4:52:08 AM2007-07-14Saturday, July 14, 2007 4:16:35 AM2007-07-15Sunday, July 15, 2007 3:41:02 AM2007-07-16Monday, July 16, 2007 3:05:29 AM2007-07-17Tuesday, July 17, 2007 2:29:56 AM2007-07-18Wednesday, July 18, 2007 1:54:23 AM2007-07-19Thursday, July 19, 2007 1:18:50 AM2007-07-20Friday, July 20, 2007 0:43:16 AM2007-07-21Saturday, July 21, 2007 0:07:43 AM2007-07-21Saturday, July 21, 2007 11:32:10 PM2007-07-22Sunday, July 22, 2007 10:56:37 PM2007-07-23Monday, July 23, 2007 10:21:04 PM2007-07-24Tuesday, July 24, 2007 9:45:31 PM2007-07-25Wednesday, July 25, 2007 9:09:58 PM2007-07-26Thursday, July 26, 2007 8:34:25 PM2007-07-27Friday, July 27, 2007 7:58:52 PM2007-07-28Saturday, July 28, 2007 7:23:19 PM2007-07-29Sunday, July 29, 2007 6:47:46 PM2007-07-30Monday, July 30, 2007 6:12:13 PM2007-07-31Tuesday, July 31, 2007 5:36:40 PM2007-08-01Wednesday, August 01, 2007 5:01:07 PM2007-08-02Thursday, August 02, 2007 4:25:34 PM2007-08-03Friday, August 03, 2007 3:50:01 PM2007-08-04Saturday, August 04, 2007 3:14:28 PM2007-08-05Sunday, August 05, 2007 2:38:55 PM2007-08-06Monday, August 06, 2007 2:03:22 PM2007-08-07Tuesday, August 07, 2007 1:27:49 PM2007-08-08Wednesday, August 08, 2007 12:52:16 PM2007-08-09Thursday, August 09, 2007 12:16:43 PM2007-08-10Friday, August 10, 2007 11:41:10 AM2007-08-11Saturday, August 11, 2007 11:05:36 AM2007-08-12Sunday, August 12, 2007 10:30:03 AM2007-08-13Monday, August 13, 2007 9:54:30 AM2007-08-14Tuesday, August 14, 2007 9:18:57 AM2007-08-15Wednesday, August 15, 2007 8:43:24 AM2007-08-16Thursday, August 16, 2007 8:07:51 AM2007-08-17Friday, August 17, 2007 7:32:18 AM2007-08-18Saturday, August 18, 2007 6:56:45 AM2007-08-19Sunday, August 19, 2007 6:21:12 AM2007-08-20Monday, August 20, 2007 5:45:39 AM2007-08-21Tuesday, August 21, 2007 5:10:06 AM2007-08-22Wednesday, August 22, 2007 4:34:33 AM2007-08-23Thursday, August 23, 2007 3:59:00 AM2007-08-24Friday, August 24, 2007 3:23:27 AM2007-08-25Saturday, August 25, 2007 2:47:54 AM2007-08-26Sunday, August 26, 2007 2:12:21 AM2007-08-27Monday, August 27, 2007 1:36:48 AM2007-08-28Tuesday, August 28, 2007 1:01:15 AM2007-08-29Wednesday, August 29, 2007 0:25:42 AM2007-08-29Wednesday, August 29, 2007 11:50:09 PM2007-08-30Thursday, August 30, 2007 11:14:36 PM2007-08-31Friday, August 31, 2007 10:39:03 PM2007-09-01Saturday, September 01, 2007 10:03:30 PM2007-09-02Sunday, September 02, 2007 9:27:56 PM2007-09-03Monday, September 03, 2007 8:52:23 PM2007-09-04Tuesday, September 04, 2007 8:16:50 PM2007-09-05Wednesday, September 05, 2007 7:41:17 PM2007-09-06Thursday, September 06, 2007 7:05:44 PM2007-09-07Friday, September 07, 2007 6:30:11 PM2007-09-08Saturday, September 08, 2007 5:54:38 PM2007-09-09Sunday, September 09, 2007 5:19:05 PM2007-09-10Monday, September 10, 2007 4:43:32 PM2007-09-11Tuesday, September 11, 2007 4:07:59 PM2007-09-12Wednesday, September 12, 2007 3:32:26 PM2007-09-13Thursday, September 13, 2007 2:56:53 PM2007-09-14Friday, September 14, 2007 2:21:20 PM2007-09-15Saturday, September 15, 2007 1:45:47 PM2007-09-16Sunday, September 16, 2007 1:10:14 PM2007-09-17Monday, September 17, 2007 12:34:41 PM2007-09-18Tuesday, September 18, 2007 11:59:08 AM2007-09-19Wednesday, September 19, 2007 11:23:35 AM2007-09-20Thursday, September 20, 2007 10:48:02 AM2007-09-21Friday, September 21, 2007 10:12:29 AM2007-09-22Saturday, September 22, 2007 9:36:56 AM2007-09-23Sunday, September 23, 2007 9:01:23 AM2007-09-24Monday, September 24, 2007 8:25:49 AM2007-09-25Tuesday, September 25, 2007 7:50:16 AM2007-09-26Wednesday, September 26, 2007 7:14:43 AM2007-09-27Thursday, September 27, 2007 6:39:10 AM2007-09-28Friday, September 28, 2007 6:03:37 AM2007-09-29Saturday, September 29, 2007 5:28:04 AM2007-09-30Sunday, September 30, 2007 4:52:31 AM2007-10-01Monday, October 01, 2007 4:16:58 AM2007-10-02Tuesday, October 02, 2007 3:41:25 AM2007-10-03Wednesday, October 03, 2007 3:05:52 AM2007-10-04Thursday, October 04, 2007 2:30:19 AM2007-10-05Friday, October 05, 2007 1:54:46 AM2007-10-06Saturday, October 06, 2007 1:19:13 AM2007-10-07Sunday, October 07, 2007 0:43:40 AM2007-10-08Monday, October 08, 2007 0:08:07 AM2007-10-08Monday, October 08, 2007 11:32:34 PM2007-10-09Tuesday, October 09, 2007 10:57:01 PM2007-10-10Wednesday, October 10, 2007 10:21:28 PM2007-10-11Thursday, October 11, 2007 9:45:55 PM2007-10-12Friday, October 12, 2007 9:10:22 PM2007-10-13Saturday, October 13, 2007 8:34:49 PM2007-10-14Sunday, October 14, 2007 7:59:16 PM2007-10-15Monday, October 15, 2007 7:23:43 PM2007-10-16Tuesday, October 16, 2007 6:48:09 PM2007-10-17Wednesday, October 17, 2007 6:12:36 PM2007-10-18Thursday, October 18, 2007 5:37:03 PM2007-10-19Friday, October 19, 2007 5:01:30 PM2007-10-20Saturday, October 20, 2007 4:25:57 PM2007-10-21Sunday, October 21, 2007 3:50:24 PM2007-10-22Monday, October 22, 2007 3:14:51 PM2007-10-23Tuesday, October 23, 2007 2:39:18 PM2007-10-24Wednesday, October 24, 2007 2:03:45 PM2007-10-25Thursday, October 25, 2007 1:28:12 PM2007-10-26Friday, October 26, 2007 12:52:39 PM2007-10-27Saturday, October 27, 2007 12:17:06 PM2007-10-28Sunday, October 28, 2007 11:41:33 AM2007-10-29Monday, October 29, 2007 11:06:00 AM2007-10-30Tuesday, October 30, 2007 10:30:27 AM2007-10-31Wednesday, October 31, 2007 9:54:54 AM2007-11-01Thursday, November 01, 2007 9:19:21 AM2007-11-02Friday, November 02, 2007 8:43:48 AM2007-11-03Saturday, November 03, 2007 8:08:15 AM2007-11-04Sunday, November 04, 2007 6:32:42 AM2007-11-05Monday, November 05, 2007 5:57:09 AM2007-11-06Tuesday, November 06, 2007 5:21:36 AM2007-11-07Wednesday, November 07, 2007 4:46:03 AM2007-11-08Thursday, November 08, 2007 4:10:29 AM2007-11-09Friday, November 09, 2007 3:34:56 AM2007-11-10Saturday, November 10, 2007 2:59:23 AM2007-11-11Sunday, November 11, 2007 2:23:50 AM2007-11-12Monday, November 12, 2007 1:48:17 AM2007-11-13Tuesday, November 13, 2007 1:12:44 AM2007-11-14Wednesday, November 14, 2007 0:37:11 AM2007-11-15Thursday, November 15, 2007 0:01:38 AM2007-11-15Thursday, November 15, 2007 11:26:05 PM2007-11-16Friday, November 16, 2007 10:50:32 PM2007-11-17Saturday, November 17, 2007 10:14:59 PM2007-11-18Sunday, November 18, 2007 9:39:26 PM2007-11-19Monday, November 19, 2007 9:03:53 PM2007-11-20Tuesday, November 20, 2007 8:28:20 PM2007-11-21Wednesday, November 21, 2007 7:52:47 PM2007-11-22Thursday, November 22, 2007 7:17:14 PM2007-11-23Friday, November 23, 2007 6:41:41 PM2007-11-24Saturday, November 24, 2007 6:06:08 PM2007-11-25Sunday, November 25, 2007 5:30:35 PM2007-11-26Monday, November 26, 2007 4:55:02 PM2007-11-27Tuesday, November 27, 2007 4:19:29 PM2007-11-28Wednesday, November 28, 2007 3:43:56 PM2007-11-29Thursday, November 29, 2007 3:08:22 PM2007-11-30Friday, November 30, 2007 2:32:49 PM2007-12-01Saturday, December 01, 2007 1:57:16 PM2007-12-02Sunday, December 02, 2007 1:21:43 PM2007-12-03Monday, December 03, 2007 12:46:10 PM2007-12-04Tuesday, December 04, 2007 12:10:37 PM2007-12-05Wednesday, December 05, 2007 11:35:04 AM2007-12-06Thursday, December 06, 2007 10:59:31 AM2007-12-07Friday, December 07, 2007 10:23:58 AM2007-12-08Saturday, December 08, 2007 9:48:25 AM2007-12-09Sunday, December 09, 2007 9:12:52 AM2007-12-10Monday, December 10, 2007 8:37:19 AM2007-12-11Tuesday, December 11, 2007 8:01:46 AM2007-12-12Wednesday, December 12, 2007 7:26:13 AM2007-12-13Thursday, December 13, 2007 6:50:40 AM2007-12-14Friday, December 14, 2007 6:15:07 AM2007-12-15Saturday, December 15, 2007 5:39:34 AM2007-12-16Sunday, December 16, 2007 5:04:01 AM2007-12-17Monday, December 17, 2007 4:28:28 AM2007-12-18Tuesday, December 18, 2007 3:52:55 AM2007-12-19Wednesday, December 19, 2007 3:17:22 AM2007-12-20Thursday, December 20, 2007 2:41:49 AM2007-12-21Friday, December 21, 2007 2:06:16 AM2007-12-22Saturday, December 22, 2007 1:30:42 AM2007-12-23Sunday, December 23, 2007 0:55:09 AM2007-12-24Monday, December 24, 2007 0:19:36 AM2007-12-24Monday, December 24, 2007 11:44:03 PM2007-12-25Tuesday, December 25, 2007 11:08:30 PM2007-12-26Wednesday, December 26, 2007 10:32:57 PM2007-12-27Thursday, December 27, 2007 9:57:24 PM2007-12-28Friday, December 28, 2007 9:21:51 PM2007-12-29Saturday, December 29, 2007 8:46:18 PM2007-12-30Sunday, December 30, 2007 8:10:45 PM2007-12-31Monday, December 31, 2007 7:35:12 PM2008-01-01Tuesday, January 01, 2008 6:59:39 PM2008-01-02Wednesday, January 02, 2008 6:24:06 PM2008-01-03Thursday, January 03, 2008 5:48:33 PM2008-01-04Friday, January 04, 2008 5:13:00 PM2008-01-05Saturday, January 05, 2008 4:37:27 PM2008-01-06Sunday, January 06, 2008 4:01:54 PM2008-01-07Monday, January 07, 2008 3:26:21 PM2008-01-08Tuesday, January 08, 2008 2:50:48 PM2008-01-09Wednesday, January 09, 2008 2:15:15 PM2008-01-10Thursday, January 10, 2008 1:39:42 PM2008-01-11Friday, January 11, 2008 1:04:09 PM2008-01-12Saturday, January 12, 2008 12:28:36 PM2008-01-13Sunday, January 13, 2008 11:53:02 AM2008-01-14Monday, January 14, 2008 11:17:29 AM2008-01-15Tuesday, January 15, 2008 10:41:56 AM2008-01-16Wednesday, January 16, 2008 10:06:23 AM2008-01-17Thursday, January 17, 2008 9:30:50 AM2008-01-18Friday, January 18, 2008 8:55:17 AM2008-01-19Saturday, January 19, 2008 8:19:44 AM2008-01-20Sunday, January 20, 2008 7:44:11 AM2008-01-21Monday, January 21, 2008 7:08:38 AM2008-01-22Tuesday, January 22, 2008 6:33:05 AM2008-01-23Wednesday, January 23, 2008 5:57:32 AM2008-01-24Thursday, January 24, 2008 5:21:59 AM2008-01-25Friday, January 25, 2008 4:46:26 AM2008-01-26Saturday, January 26, 2008 4:10:53 AM2008-01-27Sunday, January 27, 2008 3:35:20 AM2008-01-28Monday, January 28, 2008 2:59:47 AM2008-01-29Tuesday, January 29, 2008 2:24:14 AM2008-01-30Wednesday, January 30, 2008 1:48:41 AM2008-01-31Thursday, January 31, 2008 1:13:08 AM2008-02-01Friday, February 01, 2008 0:37:35 AM2008-02-02Saturday, February 02, 2008 0:02:02 AM2008-02-02Saturday, February 02, 2008 11:26:29 PM2008-02-03Sunday, February 03, 2008 10:50:56 PM2008-02-04Monday, February 04, 2008 10:15:22 PM2008-02-05Tuesday, February 05, 2008 9:39:49 PM2008-02-06Wednesday, February 06, 2008 9:04:16 PM2008-02-07Thursday, February 07, 2008 8:28:43 PM2008-02-08Friday, February 08, 2008 7:53:10 PM2008-02-09Saturday, February 09, 2008 7:17:37 PM2008-02-10Sunday, February 10, 2008 6:42:04 PM2008-02-11Monday, February 11, 2008 6:06:31 PM2008-02-12Tuesday, February 12, 2008 5:30:58 PM2008-02-13Wednesday, February 13, 2008 4:55:25 PM2008-02-14Thursday, February 14, 2008 4:19:52 PM2008-02-15Friday, February 15, 2008 3:44:19 PM2008-02-16Saturday, February 16, 2008 3:08:46 PM2008-02-17Sunday, February 17, 2008 2:33:13 PM2008-02-18Monday, February 18, 2008 1:57:40 PM2008-02-19Tuesday, February 19, 2008 1:22:07 PM2008-02-20Wednesday, February 20, 2008 12:46:34 PM2008-02-21Thursday, February 21, 2008 12:11:01 PM2008-02-22Friday, February 22, 2008 11:35:28 AM2008-02-23Saturday, February 23, 2008 10:59:55 AM2008-02-24Sunday, February 24, 2008 10:24:22 AM2008-02-25Monday, February 25, 2008 9:48:49 AM2008-02-26Tuesday, February 26, 2008 9:13:15 AM2008-02-27Wednesday, February 27, 2008 8:37:42 AM2008-02-28Thursday, February 28, 2008 8:02:09 AM2008-02-29Friday, February 29, 2008 7:26:36 AM2008-03-01Saturday, March 01, 2008 6:51:03 AM2008-03-02Sunday, March 02, 2008 6:15:30 AM2008-03-03Monday, March 03, 2008 5:39:57 AM2008-03-04Tuesday, March 04, 2008 5:04:24 AM2008-03-05Wednesday, March 05, 2008 4:28:51 AM2008-03-06Thursday, March 06, 2008 3:53:18 AM2008-03-07Friday, March 07, 2008 3:17:45 AM2008-03-08Saturday, March 08, 2008 2:42:12 AM2008-03-09Sunday, March 09, 2008 3:06:39 AM2008-03-10Monday, March 10, 2008 2:31:06 AM2008-03-11Tuesday, March 11, 2008 1:55:33 AM2008-03-12Wednesday, March 12, 2008 1:20:00 AM2008-03-13Thursday, March 13, 2008 0:44:27 AM2008-03-14Friday, March 14, 2008 0:08:54 AM2008-03-14Friday, March 14, 2008 11:33:21 PM2008-03-15Saturday, March 15, 2008 10:57:48 PM2008-03-16Sunday, March 16, 2008 10:22:15 PM2008-03-17Monday, March 17, 2008 9:46:42 PM2008-03-18Tuesday, March 18, 2008 9:11:09 PM2008-03-19Wednesday, March 19, 2008 8:35:35 PM2008-03-20Thursday, March 20, 2008 8:00:02 PM2008-03-21Friday, March 21, 2008 7:24:29 PM2008-03-22Saturday, March 22, 2008 6:48:56 PM2008-03-23Sunday, March 23, 2008 6:13:23 PM2008-03-24Monday, March 24, 2008 5:37:50 PM2008-03-25Tuesday, March 25, 2008 5:02:17 PM2008-03-26Wednesday, March 26, 2008 4:26:44 PM2008-03-27Thursday, March 27, 2008 3:51:11 PM2008-03-28Friday, March 28, 2008 3:15:38 PM2008-03-29Saturday, March 29, 2008 2:40:05 PM2008-03-30Sunday, March 30, 2008 2:04:32 PM2008-03-31Monday, March 31, 2008 1:28:59 PM2008-04-01Tuesday, April 01, 2008 12:53:26 PM2008-04-02Wednesday, April 02, 2008 12:17:53 PM2008-04-03Thursday, April 03, 2008 11:42:20 AM2008-04-04Friday, April 04, 2008 11:06:47 AM2008-04-05Saturday, April 05, 2008 10:31:14 AM2008-04-06Sunday, April 06, 2008 9:55:41 AM2008-04-07Monday, April 07, 2008 9:20:08 AM2008-04-08Tuesday, April 08, 2008 8:44:35 AM2008-04-09Wednesday, April 09, 2008 8:09:02 AM2008-04-10Thursday, April 10, 2008 7:33:29 AM2008-04-11Friday, April 11, 2008 6:57:55 AM2008-04-12Saturday, April 12, 2008 6:22:22 AM2008-04-13Sunday, April 13, 2008 5:46:49 AM2008-04-14Monday, April 14, 2008 5:11:16 AM2008-04-15Tuesday, April 15, 2008 4:35:43 AM2008-04-16Wednesday, April 16, 2008 4:00:10 AM2008-04-17Thursday, April 17, 2008 3:24:37 AM2008-04-18Friday, April 18, 2008 2:49:04 AM2008-04-19Saturday, April 19, 2008 2:13:31 AM2008-04-20Sunday, April 20, 2008 1:37:58 AM2008-04-21Monday, April 21, 2008 1:02:25 AM2008-04-22Tuesday, April 22, 2008 0:26:52 AM2008-04-22Tuesday, April 22, 2008 11:51:19 PM2008-04-23Wednesday, April 23, 2008 11:15:46 PM2008-04-24Thursday, April 24, 2008 10:40:13 PM2008-04-25Friday, April 25, 2008 10:04:40 PM2008-04-26Saturday, April 26, 2008 9:29:07 PM2008-04-27Sunday, April 27, 2008 8:53:34 PM2008-04-28Monday, April 28, 2008 8:18:01 PM2008-04-29Tuesday, April 29, 2008 7:42:28 PM2008-04-30Wednesday, April 30, 2008 7:06:55 PM2008-05-01Thursday, May 01, 2008 6:31:22 PM" +assertEq(ret, expected); diff --git a/js/src/jit-test/tests/sunspider/check-date-format-xparb.js b/js/src/jit-test/tests/sunspider/check-date-format-xparb.js new file mode 100644 index 0000000000..41f44fed50 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-date-format-xparb.js @@ -0,0 +1,422 @@ +/* + * Copyright (C) 2004 Baron Schwartz + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation, version 2.1. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +Date.parseFunctions = {count:0}; +Date.parseRegexes = []; +Date.formatFunctions = {count:0}; + +Date.prototype.dateFormat = function(format) { + if (Date.formatFunctions[format] == null) { + Date.createNewFormat(format); + } + var func = Date.formatFunctions[format]; + return this[func](); +} + +Date.createNewFormat = function(format) { + var funcName = "format" + Date.formatFunctions.count++; + Date.formatFunctions[format] = funcName; + var code = "Date.prototype." + funcName + " = function(){return "; + var special = false; + var ch = ''; + for (var i = 0; i < format.length; ++i) { + ch = format.charAt(i); + if (!special && ch == "\\") { + special = true; + } + else if (special) { + special = false; + code += "'" + String.escape(ch) + "' + "; + } + else { + code += Date.getFormatCode(ch); + } + } + eval(code.substring(0, code.length - 3) + ";}"); +} + +Date.getFormatCode = function(character) { + switch (character) { + case "d": + return "String.leftPad(this.getDate(), 2, '0') + "; + case "D": + return "Date.dayNames[this.getDay()].substring(0, 3) + "; + case "j": + return "this.getDate() + "; + case "l": + return "Date.dayNames[this.getDay()] + "; + case "S": + return "this.getSuffix() + "; + case "w": + return "this.getDay() + "; + case "z": + return "this.getDayOfYear() + "; + case "W": + return "this.getWeekOfYear() + "; + case "F": + return "Date.monthNames[this.getMonth()] + "; + case "m": + return "String.leftPad(this.getMonth() + 1, 2, '0') + "; + case "M": + return "Date.monthNames[this.getMonth()].substring(0, 3) + "; + case "n": + return "(this.getMonth() + 1) + "; + case "t": + return "this.getDaysInMonth() + "; + case "L": + return "(this.isLeapYear() ? 1 : 0) + "; + case "Y": + return "this.getFullYear() + "; + case "y": + return "('' + this.getFullYear()).substring(2, 4) + "; + case "a": + return "(this.getHours() < 12 ? 'am' : 'pm') + "; + case "A": + return "(this.getHours() < 12 ? 'AM' : 'PM') + "; + case "g": + return "((this.getHours() %12) ? this.getHours() % 12 : 12) + "; + case "G": + return "this.getHours() + "; + case "h": + return "String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + "; + case "H": + return "String.leftPad(this.getHours(), 2, '0') + "; + case "i": + return "String.leftPad(this.getMinutes(), 2, '0') + "; + case "s": + return "String.leftPad(this.getSeconds(), 2, '0') + "; + case "O": + return "this.getGMTOffset() + "; + case "T": + return "this.getTimezone() + "; + case "Z": + return "(this.getTimezoneOffset() * -60) + "; + default: + return "'" + String.escape(character) + "' + "; + } +} + +Date.parseDate = function(input, format) { + if (Date.parseFunctions[format] == null) { + Date.createParser(format); + } + var func = Date.parseFunctions[format]; + return Date[func](input); +} + +Date.createParser = function(format) { + var funcName = "parse" + Date.parseFunctions.count++; + var regexNum = Date.parseRegexes.length; + var currentGroup = 1; + Date.parseFunctions[format] = funcName; + + var code = "Date." + funcName + " = function(input){\n" + + "var y = -1, m = -1, d = -1, h = -1, i = -1, s = -1;\n" + + "var d = new Date();\n" + + "y = d.getFullYear();\n" + + "m = d.getMonth();\n" + + "d = d.getDate();\n" + + "var results = input.match(Date.parseRegexes[" + regexNum + "]);\n" + + "if (results && results.length > 0) {" + var regex = ""; + + var special = false; + var ch = ''; + for (var i = 0; i < format.length; ++i) { + ch = format.charAt(i); + if (!special && ch == "\\") { + special = true; + } + else if (special) { + special = false; + regex += String.escape(ch); + } + else { + obj = Date.formatCodeToRegex(ch, currentGroup); + currentGroup += obj.g; + regex += obj.s; + if (obj.g && obj.c) { + code += obj.c; + } + } + } + + code += "if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n" + + "{return new Date(y, m, d, h, i, s);}\n" + + "else if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n" + + "{return new Date(y, m, d, h, i);}\n" + + "else if (y > 0 && m >= 0 && d > 0 && h >= 0)\n" + + "{return new Date(y, m, d, h);}\n" + + "else if (y > 0 && m >= 0 && d > 0)\n" + + "{return new Date(y, m, d);}\n" + + "else if (y > 0 && m >= 0)\n" + + "{return new Date(y, m);}\n" + + "else if (y > 0)\n" + + "{return new Date(y);}\n" + + "}return null;}"; + + Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$"); + eval(code); +} + +Date.formatCodeToRegex = function(character, currentGroup) { + switch (character) { + case "D": + return {g:0, + c:null, + s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"}; + case "j": + case "d": + return {g:1, + c:"d = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{1,2})"}; + case "l": + return {g:0, + c:null, + s:"(?:" + Date.dayNames.join("|") + ")"}; + case "S": + return {g:0, + c:null, + s:"(?:st|nd|rd|th)"}; + case "w": + return {g:0, + c:null, + s:"\\d"}; + case "z": + return {g:0, + c:null, + s:"(?:\\d{1,3})"}; + case "W": + return {g:0, + c:null, + s:"(?:\\d{2})"}; + case "F": + return {g:1, + c:"m = parseInt(Date.monthNumbers[results[" + currentGroup + "].substring(0, 3)], 10);\n", + s:"(" + Date.monthNames.join("|") + ")"}; + case "M": + return {g:1, + c:"m = parseInt(Date.monthNumbers[results[" + currentGroup + "]], 10);\n", + s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"}; + case "n": + case "m": + return {g:1, + c:"m = parseInt(results[" + currentGroup + "], 10) - 1;\n", + s:"(\\d{1,2})"}; + case "t": + return {g:0, + c:null, + s:"\\d{1,2}"}; + case "L": + return {g:0, + c:null, + s:"(?:1|0)"}; + case "Y": + return {g:1, + c:"y = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{4})"}; + case "y": + return {g:1, + c:"var ty = parseInt(results[" + currentGroup + "], 10);\n" + + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", + s:"(\\d{1,2})"}; + case "a": + return {g:1, + c:"if (results[" + currentGroup + "] == 'am') {\n" + + "if (h == 12) { h = 0; }\n" + + "} else { if (h < 12) { h += 12; }}", + s:"(am|pm)"}; + case "A": + return {g:1, + c:"if (results[" + currentGroup + "] == 'AM') {\n" + + "if (h == 12) { h = 0; }\n" + + "} else { if (h < 12) { h += 12; }}", + s:"(AM|PM)"}; + case "g": + case "G": + case "h": + case "H": + return {g:1, + c:"h = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{1,2})"}; + case "i": + return {g:1, + c:"i = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{2})"}; + case "s": + return {g:1, + c:"s = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{2})"}; + case "O": + return {g:0, + c:null, + s:"[+-]\\d{4}"}; + case "T": + return {g:0, + c:null, + s:"[A-Z]{3}"}; + case "Z": + return {g:0, + c:null, + s:"[+-]\\d{1,5}"}; + default: + return {g:0, + c:null, + s:String.escape(character)}; + } +} + +Date.prototype.getTimezone = function() { + return this.toString().replace( + /^.*? ([A-Z]{3}) [0-9]{4}.*$/, "$1").replace( + /^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/, "$1$2$3"); +} + +Date.prototype.getGMTOffset = function() { + return (this.getTimezoneOffset() > 0 ? "-" : "+") + + String.leftPad(Math.floor(this.getTimezoneOffset() / 60), 2, "0") + + String.leftPad(this.getTimezoneOffset() % 60, 2, "0"); +} + +Date.prototype.getDayOfYear = function() { + var num = 0; + Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28; + for (var i = 0; i < this.getMonth(); ++i) { + num += Date.daysInMonth[i]; + } + return num + this.getDate() - 1; +} + +Date.prototype.getWeekOfYear = function() { + // Skip to Thursday of this week + var now = this.getDayOfYear() + (4 - this.getDay()); + // Find the first Thursday of the year + var jan1 = new Date(this.getFullYear(), 0, 1); + var then = (7 - jan1.getDay() + 4); + document.write(then); + return String.leftPad(((now - then) / 7) + 1, 2, "0"); +} + +Date.prototype.isLeapYear = function() { + var year = this.getFullYear(); + return ((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year))); +} + +Date.prototype.getFirstDayOfMonth = function() { + var day = (this.getDay() - (this.getDate() - 1)) % 7; + return (day < 0) ? (day + 7) : day; +} + +Date.prototype.getLastDayOfMonth = function() { + var day = (this.getDay() + (Date.daysInMonth[this.getMonth()] - this.getDate())) % 7; + return (day < 0) ? (day + 7) : day; +} + +Date.prototype.getDaysInMonth = function() { + Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28; + return Date.daysInMonth[this.getMonth()]; +} + +Date.prototype.getSuffix = function() { + switch (this.getDate()) { + case 1: + case 21: + case 31: + return "st"; + case 2: + case 22: + return "nd"; + case 3: + case 23: + return "rd"; + default: + return "th"; + } +} + +String.escape = function(string) { + return string.replace(/('|\\)/g, "\\$1"); +} + +String.leftPad = function (val, size, ch) { + var result = new String(val); + if (ch == null) { + ch = " "; + } + while (result.length < size) { + result = ch + result; + } + return result; +} + +Date.daysInMonth = [31,28,31,30,31,30,31,31,30,31,30,31]; +Date.monthNames = + ["January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December"]; +Date.dayNames = + ["Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday"]; +Date.y2kYear = 50; +Date.monthNumbers = { + Jan:0, + Feb:1, + Mar:2, + Apr:3, + May:4, + Jun:5, + Jul:6, + Aug:7, + Sep:8, + Oct:9, + Nov:10, + Dec:11}; +Date.patterns = { + ISO8601LongPattern:"Y-m-d H:i:s", + ISO8601ShortPattern:"Y-m-d", + ShortDatePattern: "n/j/Y", + LongDatePattern: "l, F d, Y", + FullDateTimePattern: "l, F d, Y g:i:s A", + MonthDayPattern: "F d", + ShortTimePattern: "g:i A", + LongTimePattern: "g:i:s A", + SortableDateTimePattern: "Y-m-d\\TH:i:s", + UniversalSortableDateTimePattern: "Y-m-d H:i:sO", + YearMonthPattern: "F, Y"}; + +var date = new Date("1/1/2007 1:11:11"); + +var ret; +for (i = 0; i < 4000; ++i) { + var shortFormat = date.dateFormat("Y-m-d"); + var longFormat = date.dateFormat("l, F d, Y g:i:s A"); + ret = shortFormat + longFormat; + date.setTime(date.getTime() + 84266956); +} + +// No exact match because the output depends on the locale's time zone. See bug 524490. +assertEq(/^2017-09-05Tuesday, September 05, 2017 [0-9:]* AM$/.exec(ret) != null, true); diff --git a/js/src/jit-test/tests/sunspider/check-math-cordic.js b/js/src/jit-test/tests/sunspider/check-math-cordic.js new file mode 100644 index 0000000000..0abf3db0f9 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-math-cordic.js @@ -0,0 +1,94 @@ +/* + * Copyright (C) Rich Moore. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/////. Start CORDIC + +var AG_CONST = 0.6072529350; + +function FIXED(X) +{ + return X * 65536.0; +} + +function FLOAT(X) +{ + return X / 65536.0; +} + +function DEG2RAD(X) +{ + return 0.017453 * (X); +} + +var Angles = [ + FIXED(45.0), FIXED(26.565), FIXED(14.0362), FIXED(7.12502), + FIXED(3.57633), FIXED(1.78991), FIXED(0.895174), FIXED(0.447614), + FIXED(0.223811), FIXED(0.111906), FIXED(0.055953), + FIXED(0.027977) + ]; + + +function cordicsincos() { + var X; + var Y; + var TargetAngle; + var CurrAngle; + var Step; + + X = FIXED(AG_CONST); /* AG_CONST * cos(0) */ + Y = 0; /* AG_CONST * sin(0) */ + + TargetAngle = FIXED(28.027); + CurrAngle = 0; + for (Step = 0; Step < 12; Step++) { + var NewX; + if (TargetAngle > CurrAngle) { + NewX = X - (Y >> Step); + Y = (X >> Step) + Y; + X = NewX; + CurrAngle += Angles[Step]; + } else { + NewX = X + (Y >> Step); + Y = -(X >> Step) + Y; + X = NewX; + CurrAngle -= Angles[Step]; + } + } + return CurrAngle; +} + +///// End CORDIC + +function cordic( runs ) { + var actual; + + for ( var i = 0 ; i < runs ; i++ ) { + actual = cordicsincos(); + } + + assertEq(actual, 1834995.3515519998) +} + +cordic(25000); diff --git a/js/src/jit-test/tests/sunspider/check-math-partial-sums.js b/js/src/jit-test/tests/sunspider/check-math-partial-sums.js new file mode 100644 index 0000000000..a9082702cc --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-math-partial-sums.js @@ -0,0 +1,41 @@ +// The Computer Language Shootout +// http://shootout.alioth.debian.org/ +// contributed by Isaac Gouy + +function partial(n){ + var a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = 0.0; + var twothirds = 2.0/3.0; + var alt = -1.0; + var k2 = k3 = sk = ck = 0.0; + + for (var k = 1; k <= n; k++){ + k2 = k*k; + k3 = k2*k; + sk = Math.sin(k); + ck = Math.cos(k); + alt = -alt; + + a1 += Math.pow(twothirds,k-1); + a2 += Math.pow(k,-0.5); + a3 += 1.0/(k*(k+1.0)); + a4 += 1.0/(k3 * sk*sk); + a5 += 1.0/(k3 * ck*ck); + a6 += 1.0/k; + a7 += 1.0/k2; + a8 += alt/k; + a9 += alt/(2*k -1); + } + + return [ a1, a2, a3, a4, a5, a6, a7, a8, a9 ]; +} + +var actual = []; +for (var i = 1024; i <= 16384; i *= 2) + Array.prototype.push.apply(actual, partial(i)); + +var eps = 1e-12; +var expect = [2.9999999999999987,62.555269219624684,0.9990243902439033,30.174793391263677,42.99468748637077,7.509175672278132,1.6439579810301654,0.6926591377284127,0.785154022830656,2.9999999999999987,89.06036157695789,0.9995119570522216,30.30796333494624,42.99485339033617,8.202078771817716,1.6444459047881168,0.6929030995395857,0.7852760930922243,2.9999999999999987,126.54745783224483,0.999755918965097,30.314167756318135,42.994888939123,8.89510389696629,1.6446899560231332,0.6930251251486118,0.7853371282421086,2.9999999999999987,179.56450569047874,0.9998779445868421,30.314499725429847,42.99489723774016,9.588190046095265,1.644812003986005,0.693086149128997,0.785367645819433,2.9999999999999987,254.54355172132264,0.9999389685688135,30.31451920492601,42.99489939769195,10.281306710008463,1.6448730335545856,0.6931166639131536,0.7853829046083998]; + +assertEq(actual.length, expect.length); +for (var i = 0; i < expect.length; ++i) + assertEq(Math.abs(actual[i] - expect[i]) < eps, true); diff --git a/js/src/jit-test/tests/sunspider/check-math-spectral-norm.js b/js/src/jit-test/tests/sunspider/check-math-spectral-norm.js new file mode 100644 index 0000000000..824863c6a5 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-math-spectral-norm.js @@ -0,0 +1,53 @@ +// The Great Computer Language Shootout +// http://shootout.alioth.debian.org/ +// +// contributed by Ian Osgood + +function A(i,j) { + return 1/((i+j)*(i+j+1)/2+i+1); +} + +function Au(u,v) { + for (var i=0; i (1<>=1; //bpe=number of bits in one element of the array representing the bigInt +mask=(1<>=bpe; + } +} + +//is x > y? (x and y both nonnegative) +function greater(x,y) { + var i; + var k=(x.length=0;i--) + if (x[i]>y[i]) + return 1; + else if (x[i]0 && n[kn-1]==0;kn--); //ignore leading zeros of n + for (;ky>0 && y[ky-1]==0;ky--); //ignore leading zeros of y + + copyInt_(sa,0); + + //the following loop consumes 95% of the runtime for randTruePrime_() and powMod_() for large keys + for (i=0; i> bpe; + t=x[i]; + + //do sa=(sa+x[i]*y+ui*n)/b where b=2**bpe + for (j=1;j>=bpe; + } + for (;j>=bpe; + } + sa[j-1]=c & mask; + } + + if (!greater(n,sa)) + sub_(sa,n); + copy_(x,sa); +} + +mont_(x, x, n, np); + +var passed = expected.length == x.length; +for (var i = 0; i < expected.length; i++) { + if (passed) + passed = expected[i] == x[i]; +} +assertEq(passed, true); diff --git a/js/src/jit-test/tests/sunspider/check-regexp-dna.js b/js/src/jit-test/tests/sunspider/check-regexp-dna.js new file mode 100644 index 0000000000..bc9c9205c9 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-regexp-dna.js @@ -0,0 +1,1714 @@ +// The Computer Language Shootout +// http://shootout.alioth.debian.org/ +// +// contributed by Jesse Millikan +// Base on the Ruby version by jose fco. gonzalez + +var l; +var dnaInput = ">ONE Homo sapiens alu\n\ +GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGA\n\ +TCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACT\n\ +AAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAG\n\ +GCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCG\n\ +CCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGT\n\ +GGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCA\n\ +GGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAA\n\ +TTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAG\n\ +AATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCA\n\ +GCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGT\n\ +AATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACC\n\ +AGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTG\n\ +GTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACC\n\ +CGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAG\n\ +AGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTT\n\ +TGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACA\n\ +TGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCT\n\ +GTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGG\n\ +TTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGT\n\ +CTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGG\n\ +CGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCG\n\ +TCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTA\n\ +CTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCG\n\ +AGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCG\n\ +GGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACC\n\ +TGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAA\n\ +TACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGA\n\ +GGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACT\n\ +GCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTC\n\ +ACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGT\n\ +TCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGC\n\ +CGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCG\n\ +CTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTG\n\ +GGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCC\n\ +CAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCT\n\ +GGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGC\n\ +GCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGA\n\ +GGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGA\n\ +GACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGA\n\ +GGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTG\n\ +AAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAAT\n\ +CCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCA\n\ +GTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAA\n\ +AAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGC\n\ +GGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCT\n\ +ACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGG\n\ +GAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATC\n\ +GCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGC\n\ +GGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGG\n\ +TCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAA\n\ +AAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAG\n\ +GAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACT\n\ +CCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCC\n\ +TGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAG\n\ +ACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGC\n\ +GTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGA\n\ +ACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGA\n\ +CAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCA\n\ +CTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCA\n\ +ACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCG\n\ +CCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGG\n\ +AGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTC\n\ +CGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCG\n\ +AGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACC\n\ +CCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAG\n\ +CTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAG\n\ +CCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGG\n\ +CCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATC\n\ +ACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAA\n\ +AAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGC\n\ +TGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCC\n\ +ACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGG\n\ +CTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGG\n\ +AGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATT\n\ +AGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAA\n\ +TCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGC\n\ +CTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAA\n\ +TCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAG\n\ +CCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGT\n\ +GGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCG\n\ +GGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAG\n\ +CGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTG\n\ +GGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATG\n\ +GTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGT\n\ +AATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTT\n\ +GCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCT\n\ +CAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCG\n\ +GGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTC\n\ +TCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACT\n\ +CGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAG\n\ +ATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGG\n\ +CGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTG\n\ +AGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATA\n\ +CAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGG\n\ +CAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGC\n\ +ACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCAC\n\ +GCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTC\n\ +GAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCG\n\ +GGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCT\n\ +TGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGG\n\ +CGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCA\n\ +GCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGG\n\ +CCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGC\n\ +GCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGG\n\ +CGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGA\n\ +CTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGG\n\ +CCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAA\n\ +ACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCC\n\ +CAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGT\n\ +GAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAA\n\ +AGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGG\n\ +ATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTAC\n\ +TAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGA\n\ +GGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGC\n\ +GCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGG\n\ +TGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTC\n\ +AGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAA\n\ +ATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGA\n\ +GAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC\n\ +AGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTG\n\ +TAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGAC\n\ +CAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGT\n\ +GGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAAC\n\ +CCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACA\n\ +GAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACT\n\ +TTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAAC\n\ +ATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCC\n\ +TGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAG\n\ +GTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCG\n\ +TCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAG\n\ +GCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCC\n\ +GTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCT\n\ +ACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCC\n\ +GAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCC\n\ +GGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCAC\n\ +CTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAA\n\ +ATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTG\n\ +AGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCAC\n\ +TGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCT\n\ +CACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAG\n\ +TTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAG\n\ +CCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATC\n\ +GCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCT\n\ +GGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATC\n\ +CCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCC\n\ +TGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGG\n\ +CGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG\n\ +AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCG\n\ +AGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGG\n\ +AGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGT\n\ +GAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAA\n\ +TCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGC\n\ +AGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCA\n\ +AAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGG\n\ +CGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTC\n\ +TACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCG\n\ +GGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGAT\n\ +CGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCG\n\ +CGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAG\n\ +GTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACA\n\ +AAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCA\n\ +GGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCAC\n\ +TCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGC\n\ +CTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGA\n\ +GACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGG\n\ +CGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTG\n\ +AACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCG\n\ +ACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGC\n\ +ACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCC\n\ +AACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGC\n\ +GCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCG\n\ +GAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACT\n\ +CCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCC\n\ +GAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAAC\n\ +CCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA\n\ +GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGA\n\ +GCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAG\n\ +GCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGAT\n\ +CACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTA\n\ +AAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGG\n\ +CTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGC\n\ +CACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTG\n\ +GCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAG\n\ +GAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAAT\n\ +TAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGA\n\ +ATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAG\n\ +CCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTA\n\ +ATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCA\n\ +GCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGG\n\ +TGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCC\n\ +GGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGA\n\ +GCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTT\n\ +GGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACAT\n\ +GGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTG\n\ +TAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGT\n\ +TGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTC\n\ +TCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGC\n\ +GGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGT\n\ +CTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTAC\n\ +TCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGA\n\ +GATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGG\n\ +GCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCT\n\ +GAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT\n\ +ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAG\n\ +GCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTG\n\ +CACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCA\n\ +CGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTT\n\ +CGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCC\n\ +GGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGC\n\ +TTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGG\n\ +GCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCC\n\ +AGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTG\n\ +GCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCG\n\ +CGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAG\n\ +GCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAG\n\ +ACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAG\n\ +GCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGA\n\ +AACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATC\n\ +CCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAG\n\ +TGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAA\n\ +AAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCG\n\ +GATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTA\n\ +CTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGG\n\ +AGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCG\n\ +CGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCG\n\ +GTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGT\n\ +CAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAA\n\ +AATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGG\n\ +AGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTC\n\ +CAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCT\n\ +GTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA\n\ +CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCG\n\ +TGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAA\n\ +CCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGAC\n\ +AGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCAC\n\ +TTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAA\n\ +CATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGC\n\ +CTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGA\n\ +GGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCC\n\ +GTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGA\n\ +GGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCC\n\ +CGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGC\n\ +TACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGC\n\ +CGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGC\n\ +CGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCA\n\ +CCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAA\n\ +AATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCT\n\ +GAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCA\n\ +CTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGC\n\ +TCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGA\n\ +GTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTA\n\ +GCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAAT\n\ +CGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCC\n\ +TGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAAT\n\ +CCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGC\n\ +CTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTG\n\ +GCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGG\n\ +GAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGC\n\ +GAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG\n\ +GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGG\n\ +TGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTA\n\ +ATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTG\n\ +CAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTC\n\ +AAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGG\n\ +GCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCT\n\ +CTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTC\n\ +GGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGA\n\ +TCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGC\n\ +GCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGA\n\ +GGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATAC\n\ +AAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGC\n\ +AGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCA\n\ +CTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACG\n\ +CCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCG\n\ +AGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGG\n\ +GCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTT\n\ +GAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGC\n\ +GACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAG\n\ +CACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGC\n\ +CAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCG\n\ +CGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGC\n\ +GGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGAC\n\ +TCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGC\n\ +CGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAA\n\ +CCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCC\n\ +AGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTG\n\ +AGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA\n\ +GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGA\n\ +TCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACT\n\ +AAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAG\n\ +GCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCG\n\ +CCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGT\n\ +GGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCA\n\ +GGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAA\n\ +TTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAG\n\ +AATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCA\n\ +GCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGT\n\ +AATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACC\n\ +AGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTG\n\ +GTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACC\n\ +CGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAG\n\ +AGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTT\n\ +TGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACA\n\ +TGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCT\n\ +GTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGG\n\ +TTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGT\n\ +CTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGG\n\ +CGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCG\n\ +TCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTA\n\ +CTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCG\n\ +AGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCG\n\ +GGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACC\n\ +TGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAA\n\ +TACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGA\n\ +GGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACT\n\ +GCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTC\n\ +ACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGT\n\ +TCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGC\n\ +CGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCG\n\ +CTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTG\n\ +GGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCC\n\ +CAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCT\n\ +GGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGC\n\ +GCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGA\n\ +GGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGA\n\ +GACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGA\n\ +GGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTG\n\ +AAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAAT\n\ +CCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCA\n\ +GTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAA\n\ +AAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGC\n\ +GGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCT\n\ +ACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGG\n\ +GAGGCTGAGGCAGGAGAATC\n\ +>TWO IUB ambiguity codes\n\ +cttBtatcatatgctaKggNcataaaSatgtaaaDcDRtBggDtctttataattcBgtcg\n\ +tactDtDagcctatttSVHtHttKtgtHMaSattgWaHKHttttagacatWatgtRgaaa\n\ +NtactMcSMtYtcMgRtacttctWBacgaaatatagScDtttgaagacacatagtVgYgt\n\ +cattHWtMMWcStgttaggKtSgaYaaccWStcgBttgcgaMttBYatcWtgacaYcaga\n\ +gtaBDtRacttttcWatMttDBcatWtatcttactaBgaYtcttgttttttttYaaScYa\n\ +HgtgttNtSatcMtcVaaaStccRcctDaataataStcYtRDSaMtDttgttSagtRRca\n\ +tttHatSttMtWgtcgtatSSagactYaaattcaMtWatttaSgYttaRgKaRtccactt\n\ +tattRggaMcDaWaWagttttgacatgttctacaaaRaatataataaMttcgDacgaSSt\n\ +acaStYRctVaNMtMgtaggcKatcttttattaaaaagVWaHKYagtttttatttaacct\n\ +tacgtVtcVaattVMBcttaMtttaStgacttagattWWacVtgWYagWVRctDattBYt\n\ +gtttaagaagattattgacVatMaacattVctgtBSgaVtgWWggaKHaatKWcBScSWa\n\ +accRVacacaaactaccScattRatatKVtactatatttHttaagtttSKtRtacaaagt\n\ +RDttcaaaaWgcacatWaDgtDKacgaacaattacaRNWaatHtttStgttattaaMtgt\n\ +tgDcgtMgcatBtgcttcgcgaDWgagctgcgaggggVtaaScNatttacttaatgacag\n\ +cccccacatYScaMgtaggtYaNgttctgaMaacNaMRaacaaacaKctacatagYWctg\n\ +ttWaaataaaataRattagHacacaagcgKatacBttRttaagtatttccgatctHSaat\n\ +actcNttMaagtattMtgRtgaMgcataatHcMtaBSaRattagttgatHtMttaaKagg\n\ +YtaaBataSaVatactWtataVWgKgttaaaacagtgcgRatatacatVtHRtVYataSa\n\ +KtWaStVcNKHKttactatccctcatgWHatWaRcttactaggatctataDtDHBttata\n\ +aaaHgtacVtagaYttYaKcctattcttcttaataNDaaggaaaDYgcggctaaWSctBa\n\ +aNtgctggMBaKctaMVKagBaactaWaDaMaccYVtNtaHtVWtKgRtcaaNtYaNacg\n\ +gtttNattgVtttctgtBaWgtaattcaagtcaVWtactNggattctttaYtaaagccgc\n\ +tcttagHVggaYtgtNcDaVagctctctKgacgtatagYcctRYHDtgBattDaaDgccK\n\ +tcHaaStttMcctagtattgcRgWBaVatHaaaataYtgtttagMDMRtaataaggatMt\n\ +ttctWgtNtgtgaaaaMaatatRtttMtDgHHtgtcattttcWattRSHcVagaagtacg\n\ +ggtaKVattKYagactNaatgtttgKMMgYNtcccgSKttctaStatatNVataYHgtNa\n\ +BKRgNacaactgatttcctttaNcgatttctctataScaHtataRagtcRVttacDSDtt\n\ +aRtSatacHgtSKacYagttMHtWataggatgactNtatSaNctataVtttRNKtgRacc\n\ +tttYtatgttactttttcctttaaacatacaHactMacacggtWataMtBVacRaSaatc\n\ +cgtaBVttccagccBcttaRKtgtgcctttttRtgtcagcRttKtaaacKtaaatctcac\n\ +aattgcaNtSBaaccgggttattaaBcKatDagttactcttcattVtttHaaggctKKga\n\ +tacatcBggScagtVcacattttgaHaDSgHatRMaHWggtatatRgccDttcgtatcga\n\ +aacaHtaagttaRatgaVacttagattVKtaaYttaaatcaNatccRttRRaMScNaaaD\n\ +gttVHWgtcHaaHgacVaWtgttScactaagSgttatcttagggDtaccagWattWtRtg\n\ +ttHWHacgattBtgVcaYatcggttgagKcWtKKcaVtgaYgWctgYggVctgtHgaNcV\n\ +taBtWaaYatcDRaaRtSctgaHaYRttagatMatgcatttNattaDttaattgttctaa\n\ +ccctcccctagaWBtttHtBccttagaVaatMcBHagaVcWcagBVttcBtaYMccagat\n\ +gaaaaHctctaacgttagNWRtcggattNatcRaNHttcagtKttttgWatWttcSaNgg\n\ +gaWtactKKMaacatKatacNattgctWtatctaVgagctatgtRaHtYcWcttagccaa\n\ +tYttWttaWSSttaHcaaaaagVacVgtaVaRMgattaVcDactttcHHggHRtgNcctt\n\ +tYatcatKgctcctctatVcaaaaKaaaagtatatctgMtWtaaaacaStttMtcgactt\n\ +taSatcgDataaactaaacaagtaaVctaggaSccaatMVtaaSKNVattttgHccatca\n\ +cBVctgcaVatVttRtactgtVcaattHgtaaattaaattttYtatattaaRSgYtgBag\n\ +aHSBDgtagcacRHtYcBgtcacttacactaYcgctWtattgSHtSatcataaatataHt\n\ +cgtYaaMNgBaatttaRgaMaatatttBtttaaaHHKaatctgatWatYaacttMctctt\n\ +ttVctagctDaaagtaVaKaKRtaacBgtatccaaccactHHaagaagaaggaNaaatBW\n\ +attccgStaMSaMatBttgcatgRSacgttVVtaaDMtcSgVatWcaSatcttttVatag\n\ +ttactttacgatcaccNtaDVgSRcgVcgtgaacgaNtaNatatagtHtMgtHcMtagaa\n\ +attBgtataRaaaacaYKgtRccYtatgaagtaataKgtaaMttgaaRVatgcagaKStc\n\ +tHNaaatctBBtcttaYaBWHgtVtgacagcaRcataWctcaBcYacYgatDgtDHccta\n\ +aagacYRcaggattHaYgtKtaatgcVcaataMYacccatatcacgWDBtgaatcBaata\n\ +cKcttRaRtgatgaBDacggtaattaaYtataStgVHDtDctgactcaaatKtacaatgc\n\ +gYatBtRaDatHaactgtttatatDttttaaaKVccYcaaccNcBcgHaaVcattHctcg\n\ +attaaatBtatgcaaaaatYMctSactHatacgaWacattacMBgHttcgaatVaaaaca\n\ +BatatVtctgaaaaWtctRacgBMaatSgRgtgtcgactatcRtattaScctaStagKga\n\ +DcWgtYtDDWKRgRtHatRtggtcgaHgggcgtattaMgtcagccaBggWVcWctVaaat\n\ +tcgNaatcKWagcNaHtgaaaSaaagctcYctttRVtaaaatNtataaccKtaRgtttaM\n\ +tgtKaBtRtNaggaSattHatatWactcagtgtactaKctatttgRYYatKatgtccgtR\n\ +tttttatttaatatVgKtttgtatgtNtataRatWYNgtRtHggtaaKaYtKSDcatcKg\n\ +taaYatcSRctaVtSMWtVtRWHatttagataDtVggacagVcgKWagBgatBtaaagNc\n\ +aRtagcataBggactaacacRctKgttaatcctHgDgttKHHagttgttaatgHBtatHc\n\ +DaagtVaBaRccctVgtgDtacRHSctaagagcggWYaBtSaKtHBtaaactYacgNKBa\n\ +VYgtaacttagtVttcttaatgtBtatMtMtttaattaatBWccatRtttcatagVgMMt\n\ +agctStKctaMactacDNYgKYHgaWcgaHgagattacVgtttgtRaSttaWaVgataat\n\ +gtgtYtaStattattMtNgWtgttKaccaatagNYttattcgtatHcWtctaaaNVYKKt\n\ +tWtggcDtcgaagtNcagatacgcattaagaccWctgcagcttggNSgaNcHggatgtVt\n\ +catNtRaaBNcHVagagaaBtaaSggDaatWaatRccaVgggStctDaacataKttKatt\n\ +tggacYtattcSatcttagcaatgaVBMcttDattctYaaRgatgcattttNgVHtKcYR\n\ +aatRKctgtaaacRatVSagctgtWacBtKVatctgttttKcgtctaaDcaagtatcSat\n\ +aWVgcKKataWaYttcccSaatgaaaacccWgcRctWatNcWtBRttYaattataaNgac\n\ +acaatagtttVNtataNaYtaatRaVWKtBatKagtaatataDaNaaaaataMtaagaaS\n\ +tccBcaatNgaataWtHaNactgtcDtRcYaaVaaaaaDgtttRatctatgHtgttKtga\n\ +aNSgatactttcgagWaaatctKaaDaRttgtggKKagcDgataaattgSaacWaVtaNM\n\ +acKtcaDaaatttctRaaVcagNacaScRBatatctRatcctaNatWgRtcDcSaWSgtt\n\ +RtKaRtMtKaatgttBHcYaaBtgatSgaSWaScMgatNtctcctatttctYtatMatMt\n\ +RRtSaattaMtagaaaaStcgVgRttSVaScagtgDtttatcatcatacRcatatDctta\n\ +tcatVRtttataaHtattcYtcaaaatactttgVctagtaaYttagatagtSYacKaaac\n\ +gaaKtaaatagataatSatatgaaatSgKtaatVtttatcctgKHaatHattagaaccgt\n\ +YaaHactRcggSBNgtgctaaBagBttgtRttaaattYtVRaaaattgtaatVatttctc\n\ +ttcatgBcVgtgKgaHaaatattYatagWacNctgaaMcgaattStagWaSgtaaKagtt\n\ +ttaagaDgatKcctgtaHtcatggKttVDatcaaggtYcgccagNgtgcVttttagagat\n\ +gctaccacggggtNttttaSHaNtatNcctcatSaaVgtactgBHtagcaYggYVKNgta\n\ +KBcRttgaWatgaatVtagtcgattYgatgtaatttacDacSctgctaaaStttaWMagD\n\ +aaatcaVYctccgggcgaVtaaWtStaKMgDtttcaaMtVgBaatccagNaaatcYRMBg\n\ +gttWtaaScKttMWtYataRaDBMaDataatHBcacDaaKDactaMgagttDattaHatH\n\ +taYatDtattDcRNStgaatattSDttggtattaaNSYacttcDMgYgBatWtaMagact\n\ +VWttctttgYMaYaacRgHWaattgRtaagcattctMKVStatactacHVtatgatcBtV\n\ +NataaBttYtSttacKgggWgYDtgaVtYgatDaacattYgatggtRDaVDttNactaSa\n\ +MtgNttaacaaSaBStcDctaccacagacgcaHatMataWKYtaYattMcaMtgSttDag\n\ +cHacgatcaHttYaKHggagttccgatYcaatgatRaVRcaagatcagtatggScctata\n\ +ttaNtagcgacgtgKaaWaactSgagtMYtcttccaKtStaacggMtaagNttattatcg\n\ +tctaRcactctctDtaacWYtgaYaSaagaWtNtatttRacatgNaatgttattgWDDcN\n\ +aHcctgaaHacSgaataaRaataMHttatMtgaSDSKatatHHaNtacagtccaYatWtc\n\ +actaactatKDacSaStcggataHgYatagKtaatKagStaNgtatactatggRHacttg\n\ +tattatgtDVagDVaRctacMYattDgtttYgtctatggtKaRSttRccRtaaccttaga\n\ +gRatagSaaMaacgcaNtatgaaatcaRaagataatagatactcHaaYKBctccaagaRa\n\ +BaStNagataggcgaatgaMtagaatgtcaKttaaatgtaWcaBttaatRcggtgNcaca\n\ +aKtttScRtWtgcatagtttWYaagBttDKgcctttatMggNttattBtctagVtacata\n\ +aaYttacacaaRttcYtWttgHcaYYtaMgBaBatctNgcDtNttacgacDcgataaSat\n\ +YaSttWtcctatKaatgcagHaVaacgctgcatDtgttaSataaaaYSNttatagtaNYt\n\ +aDaaaNtggggacttaBggcHgcgtNtaaMcctggtVtaKcgNacNtatVaSWctWtgaW\n\ +cggNaBagctctgaYataMgaagatBSttctatacttgtgtKtaattttRagtDtacata\n\ +tatatgatNHVgBMtKtaKaNttDHaagatactHaccHtcatttaaagttVaMcNgHata\n\ +tKtaNtgYMccttatcaaNagctggacStttcNtggcaVtattactHaSttatgNMVatt\n\ +MMDtMactattattgWMSgtHBttStStgatatRaDaagattttctatMtaaaaaggtac\n\ +taaVttaSacNaatactgMttgacHaHRttgMacaaaatagttaatatWKRgacDgaRta\n\ +tatttattatcYttaWtgtBRtWatgHaaattHataagtVaDtWaVaWtgStcgtMSgaS\n\ +RgMKtaaataVacataatgtaSaatttagtcgaaHtaKaatgcacatcggRaggSKctDc\n\ +agtcSttcccStYtccRtctctYtcaaKcgagtaMttttcRaYDttgttatctaatcata\n\ +NctctgctatcaMatactataggDaHaaSttMtaDtcNatataattctMcStaaBYtaNa\n\ +gatgtaatHagagSttgWHVcttatKaYgDctcttggtgttMcRaVgSgggtagacaata\n\ +aDtaattSaDaNaHaBctattgNtaccaaRgaVtKNtaaYggHtaKKgHcatctWtctDt\n\ +ttctttggSDtNtaStagttataaacaattgcaBaBWggHgcaaaBtYgctaatgaaatW\n\ +cDcttHtcMtWWattBHatcatcaaatctKMagtDNatttWaBtHaaaNgMttaaStagt\n\ +tctctaatDtcRVaYttgttMtRtgtcaSaaYVgSWDRtaatagctcagDgcWWaaaBaa\n\ +RaBctgVgggNgDWStNaNBKcBctaaKtttDcttBaaggBttgaccatgaaaNgttttt\n\ +tttatctatgttataccaaDRaaSagtaVtDtcaWatBtacattaWacttaSgtattggD\n\ +gKaaatScaattacgWcagKHaaccaYcRcaRttaDttRtttHgaHVggcttBaRgtccc\n\ +tDatKaVtKtcRgYtaKttacgtatBtStaagcaattaagaRgBagSaattccSWYttta\n\ +ttVaataNctgHgttaaNBgcVYgtRtcccagWNaaaacaDNaBcaaaaRVtcWMgBagM\n\ +tttattacgDacttBtactatcattggaaatVccggttRttcatagttVYcatYaSHaHc\n\ +ttaaagcNWaHataaaRWtctVtRYtagHtaaaYMataHYtNBctNtKaatattStgaMc\n\ +BtRgctaKtgcScSttDgYatcVtggaaKtaagatWccHccgKYctaNNctacaWctttt\n\ +gcRtgtVcgaKttcMRHgctaHtVaataaDtatgKDcttatBtDttggNtacttttMtga\n\ +acRattaaNagaactcaaaBBVtcDtcgaStaDctgaaaSgttMaDtcgttcaccaaaag\n\ +gWtcKcgSMtcDtatgtttStaaBtatagDcatYatWtaaaBacaKgcaDatgRggaaYc\n\ +taRtccagattDaWtttggacBaVcHtHtaacDacYgtaatataMagaatgHMatcttat\n\ +acgtatttttatattacHactgttataMgStYaattYaccaattgagtcaaattaYtgta\n\ +tcatgMcaDcgggtcttDtKgcatgWRtataatatRacacNRBttcHtBgcRttgtgcgt\n\ +catacMtttBctatctBaatcattMttMYgattaaVYatgDaatVagtattDacaacDMa\n\ +tcMtHcccataagatgBggaccattVWtRtSacatgctcaaggggYtttDtaaNgNtaaB\n\ +atggaatgtctRtaBgBtcNYatatNRtagaacMgagSaSDDSaDcctRagtVWSHtVSR\n\ +ggaacaBVaccgtttaStagaacaMtactccagtttVctaaRaaHttNcttagcaattta\n\ +ttaatRtaaaatctaacDaBttggSagagctacHtaaRWgattcaaBtctRtSHaNtgta\n\ +cattVcaHaNaagtataccacaWtaRtaaVKgMYaWgttaKggKMtKcgWatcaDatYtK\n\ +SttgtacgaccNctSaattcDcatcttcaaaDKttacHtggttHggRRaRcaWacaMtBW\n\ +VHSHgaaMcKattgtaRWttScNattBBatYtaNRgcggaagacHSaattRtttcYgacc\n\ +BRccMacccKgatgaacttcgDgHcaaaaaRtatatDtatYVtttttHgSHaSaatagct\n\ +NYtaHYaVYttattNtttgaaaYtaKttWtctaNtgagaaaNctNDctaaHgttagDcRt\n\ +tatagccBaacgcaRBtRctRtggtaMYYttWtgataatcgaataattattataVaaaaa\n\ +ttacNRVYcaaMacNatRttcKatMctgaagactaattataaYgcKcaSYaatMNctcaa\n\ +cgtgatttttBacNtgatDccaattattKWWcattttatatatgatBcDtaaaagttgaa\n\ +VtaHtaHHtBtataRBgtgDtaataMttRtDgDcttattNtggtctatctaaBcatctaR\n\ +atgNacWtaatgaagtcMNaacNgHttatactaWgcNtaStaRgttaaHacccgaYStac\n\ +aaaatWggaYaWgaattattcMaactcBKaaaRVNcaNRDcYcgaBctKaacaaaaaSgc\n\ +tccYBBHYaVagaatagaaaacagYtctVccaMtcgtttVatcaatttDRtgWctagtac\n\ +RttMctgtDctttcKtWttttataaatgVttgBKtgtKWDaWagMtaaagaaattDVtag\n\ +gttacatcatttatgtcgMHaVcttaBtVRtcgtaYgBRHatttHgaBcKaYWaatcNSc\n\ +tagtaaaaatttacaatcactSWacgtaatgKttWattagttttNaggtctcaagtcact\n\ +attcttctaagKggaataMgtttcataagataaaaatagattatDgcBVHWgaBKttDgc\n\ +atRHaagcaYcRaattattatgtMatatattgHDtcaDtcaaaHctStattaatHaccga\n\ +cNattgatatattttgtgtDtRatagSacaMtcRtcattcccgacacSattgttKaWatt\n\ +NHcaacttccgtttSRtgtctgDcgctcaaMagVtBctBMcMcWtgtaacgactctcttR\n\ +ggRKSttgYtYatDccagttDgaKccacgVatWcataVaaagaataMgtgataaKYaaat\n\ +cHDaacgataYctRtcYatcgcaMgtNttaBttttgatttaRtStgcaacaaaataccVg\n\ +aaDgtVgDcStctatatttattaaaaRKDatagaaagaKaaYYcaYSgKStctccSttac\n\ +agtcNactttDVttagaaagMHttRaNcSaRaMgBttattggtttaRMggatggcKDgWR\n\ +tNaataataWKKacttcKWaaagNaBttaBatMHtccattaacttccccYtcBcYRtaga\n\ +ttaagctaaYBDttaNtgaaaccHcaRMtKtaaHMcNBttaNaNcVcgVttWNtDaBatg\n\ +ataaVtcWKcttRggWatcattgaRagHgaattNtatttctctattaattaatgaDaaMa\n\ +tacgttgggcHaYVaaNaDDttHtcaaHtcVVDgBVagcMacgtgttaaBRNtatRtcag\n\ +taagaggtttaagacaVaaggttaWatctccgtVtaDtcDatttccVatgtacNtttccg\n\ +tHttatKgScBatgtVgHtYcWagcaKtaMYaaHgtaattaSaHcgcagtWNaatNccNN\n\ +YcacgVaagaRacttctcattcccRtgtgtaattagcSttaaStWaMtctNNcSMacatt\n\ +ataaactaDgtatWgtagtttaagaaaattgtagtNagtcaataaatttgatMMYactaa\n\ +tatcggBWDtVcYttcDHtVttatacYaRgaMaacaStaatcRttttVtagaDtcacWat\n\ +ttWtgaaaagaaagNRacDtttStVatBaDNtaactatatcBSMcccaSttccggaMatg\n\ +attaaWatKMaBaBatttgataNctgttKtVaagtcagScgaaaDggaWgtgttttKtWt\n\ +atttHaatgtagttcactaaKMagttSYBtKtaYgaactcagagRtatagtVtatcaaaW\n\ +YagcgNtaDagtacNSaaYDgatBgtcgataacYDtaaactacagWDcYKaagtttatta\n\ +gcatcgagttKcatDaattgattatDtcagRtWSKtcgNtMaaaaacaMttKcaWcaaSV\n\ +MaaaccagMVtaMaDtMaHaBgaacataBBVtaatVYaNSWcSgNtDNaaKacacBttta\n\ +tKtgtttcaaHaMctcagtaacgtcgYtactDcgcctaNgagagcYgatattttaaattt\n\ +ccattttacatttDaaRctattttWctttacgtDatYtttcagacgcaaVttagtaaKaa\n\ +aRtgVtccataBggacttatttgtttaWNtgttVWtaWNVDaattgtatttBaagcBtaa\n\ +BttaaVatcHcaVgacattccNggtcgacKttaaaRtagRtctWagaYggtgMtataatM\n\ +tgaaRttattttgWcttNtDRRgMDKacagaaaaggaaaRStcccagtYccVattaNaaK\n\ +StNWtgacaVtagaagcttSaaDtcacaacgDYacWDYtgtttKatcVtgcMaDaSKStV\n\ +cgtagaaWaKaagtttcHaHgMgMtctataagBtKaaaKKcactggagRRttaagaBaaN\n\ +atVVcgRcKSttDaactagtSttSattgttgaaRYatggttVttaataaHttccaagDtg\n\ +atNWtaagHtgcYtaactRgcaatgMgtgtRaatRaNaacHKtagactactggaatttcg\n\ +ccataacgMctRgatgttaccctaHgtgWaYcactcacYaattcttaBtgacttaaacct\n\ +gYgaWatgBttcttVttcgttWttMcNYgtaaaatctYgMgaaattacNgaHgaacDVVM\n\ +tttggtHtctaaRgtacagacgHtVtaBMNBgattagcttaRcttacaHcRctgttcaaD\n\ +BggttKaacatgKtttYataVaNattccgMcgcgtagtRaVVaattaKaatggttRgaMc\n\ +agtatcWBttNtHagctaatctagaaNaaacaYBctatcgcVctBtgcaaagDgttVtga\n\ +HtactSNYtaaNccatgtgDacgaVtDcgKaRtacDcttgctaagggcagMDagggtBWR\n\ +tttSgccttttttaacgtcHctaVtVDtagatcaNMaVtcVacatHctDWNaataRgcgt\n\ +aVHaggtaaaaSgtttMtattDgBtctgatSgtRagagYtctSaKWaataMgattRKtaa\n\ +catttYcgtaacacattRWtBtcggtaaatMtaaacBatttctKagtcDtttgcBtKYYB\n\ +aKttctVttgttaDtgattttcttccacttgSaaacggaaaNDaattcYNNaWcgaaYat\n\ +tttMgcBtcatRtgtaaagatgaWtgaccaYBHgaatagataVVtHtttVgYBtMctaMt\n\ +cctgaDcYttgtccaaaRNtacagcMctKaaaggatttacatgtttaaWSaYaKttBtag\n\ +DacactagctMtttNaKtctttcNcSattNacttggaacaatDagtattRtgSHaataat\n\ +gccVgacccgatactatccctgtRctttgagaSgatcatatcgDcagWaaHSgctYYWta\n\ +tHttggttctttatVattatcgactaagtgtagcatVgtgHMtttgtttcgttaKattcM\n\ +atttgtttWcaaStNatgtHcaaaDtaagBaKBtRgaBgDtSagtatMtaacYaatYtVc\n\ +KatgtgcaacVaaaatactKcRgtaYtgtNgBBNcKtcttaccttKgaRaYcaNKtactt\n\ +tgagSBtgtRagaNgcaaaNcacagtVtttHWatgttaNatBgtttaatNgVtctgaata\n\ +tcaRtattcttttttttRaaKcRStctcggDgKagattaMaaaKtcaHacttaataataK\n\ +taRgDtKVBttttcgtKaggHHcatgttagHggttNctcgtatKKagVagRaaaggaaBt\n\ +NatttVKcRttaHctaHtcaaatgtaggHccaBataNaNaggttgcWaatctgatYcaaa\n\ +HaatWtaVgaaBttagtaagaKKtaaaKtRHatMaDBtBctagcatWtatttgWttVaaa\n\ +ScMNattRactttgtYtttaaaagtaagtMtaMaSttMBtatgaBtttaKtgaatgagYg\n\ +tNNacMtcNRacMMHcttWtgtRtctttaacaacattattcYaMagBaacYttMatcttK\n\ +cRMtgMNccattaRttNatHaHNaSaaHMacacaVaatacaKaSttHatattMtVatWga\n\ +ttttttaYctttKttHgScWaacgHtttcaVaaMgaacagNatcgttaacaaaaagtaca\n\ +HBNaattgttKtcttVttaaBtctgctacgBgcWtttcaggacacatMgacatcccagcg\n\ +gMgaVKaBattgacttaatgacacacaaaaaatRKaaBctacgtRaDcgtagcVBaacDS\n\ +BHaaaaSacatatacagacRNatcttNaaVtaaaataHattagtaaaaSWccgtatWatg\n\ +gDttaactattgcccatcttHaSgYataBttBaactattBtcHtgatcaataSttaBtat\n\ +KSHYttWggtcYtttBttaataccRgVatStaHaKagaatNtagRMNgtcttYaaSaact\n\ +cagDSgagaaYtMttDtMRVgWKWtgMaKtKaDttttgactatacataatcNtatNaHat\n\ +tVagacgYgatatatttttgtStWaaatctWaMgagaRttRatacgStgattcttaagaD\n\ +taWccaaatRcagcagaaNKagtaaDggcgccBtYtagSBMtactaaataMataBSacRM\n\ +gDgattMMgtcHtcaYDtRaDaacggttDaggcMtttatgttaNctaattaVacgaaMMt\n\ +aatDccSgtattgaRtWWaccaccgagtactMcgVNgctDctaMScatagcgtcaactat\n\ +acRacgHRttgctatttaatgaattataYKttgtaagWgtYttgcHgMtaMattWaWVta\n\ +RgcttgYgttBHtYataSccStBtgtagMgtDtggcVaaSBaatagDttgBgtctttctc\n\ +attttaNagtHKtaMWcYactVcgcgtatMVtttRacVagDaatcttgctBBcRDgcaac\n\ +KttgatSKtYtagBMagaRtcgBattHcBWcaactgatttaatttWDccatttatcgagS\n\ +KaWttataHactaHMttaatHtggaHtHagaatgtKtaaRactgtttMatacgatcaagD\n\ +gatKaDctataMggtHDtggHacctttRtatcttYattttgacttgaaSaataaatYcgB\n\ +aaaaccgNatVBttMacHaKaataagtatKgtcaagactcttaHttcggaattgttDtct\n\ +aaccHttttWaaatgaaatataaaWattccYDtKtaaaacggtgaggWVtctattagtga\n\ +ctattaagtMgtttaagcatttgSgaaatatccHaaggMaaaattttcWtatKctagDtY\n\ +tMcctagagHcactttactatacaaacattaacttaHatcVMYattYgVgtMttaaRtga\n\ +aataaDatcaHgtHHatKcDYaatcttMtNcgatYatgSaMaNtcttKcWataScKggta\n\ +tcttacgcttWaaagNatgMgHtctttNtaacVtgttcMaaRatccggggactcMtttaY\n\ +MtcWRgNctgNccKatcttgYDcMgattNYaRagatHaaHgKctcataRDttacatBatc\n\ +cattgDWttatttaWgtcggagaaaaatacaatacSNtgggtttccttacSMaagBatta\n\ +caMaNcactMttatgaRBacYcYtcaaaWtagctSaacttWgDMHgaggatgBVgcHaDt\n\ +ggaactttggtcNatNgtaKaBcccaNtaagttBaacagtatacDYttcctNgWgcgSMc\n\ +acatStctHatgRcNcgtacacaatRttMggaNKKggataaaSaYcMVcMgtaMaHtgat\n\ +tYMatYcggtcttcctHtcDccgtgRatcattgcgccgatatMaaYaataaYSggatagc\n\ +gcBtNtaaaScaKgttBgagVagttaKagagtatVaactaSacWactSaKatWccaKaaa\n\ +atBKgaaKtDMattttgtaaatcRctMatcaaMagMttDgVatggMaaWgttcgaWatga\n\ +aatttgRtYtattaWHKcRgctacatKttctaccaaHttRatctaYattaaWatVNccat\n\ +NgagtcKttKataStRaatatattcctRWatDctVagttYDgSBaatYgttttgtVaatt\n\ +taatagcagMatRaacttBctattgtMagagattaaactaMatVtHtaaatctRgaaaaa\n\ +aaatttWacaacaYccYDSaattMatgaccKtaBKWBattgtcaagcHKaagttMMtaat\n\ +ttcKcMagNaaKagattggMagaggtaatttYacatcWaaDgatMgKHacMacgcVaaca\n\ +DtaDatatYggttBcgtatgWgaSatttgtagaHYRVacaRtctHaaRtatgaactaata\n\ +tctSSBgggaaHMWtcaagatKgagtDaSatagttgattVRatNtctMtcSaagaSHaat\n\ +aNataataRaaRgattctttaataaagWaRHcYgcatgtWRcttgaaggaMcaataBRaa\n\ +ccagStaaacNtttcaatataYtaatatgHaDgcStcWttaacctaRgtYaRtataKtgM\n\ +ttttatgactaaaatttacYatcccRWtttHRtattaaatgtttatatttgttYaatMca\n\ +RcSVaaDatcgtaYMcatgtagacatgaaattgRtcaaYaaYtRBatKacttataccaNa\n\ +aattVaBtctggacaagKaaYaaatatWtMtatcYaaVNtcgHaactBaagKcHgtctac\n\ +aatWtaDtSgtaHcataHtactgataNctRgttMtDcDttatHtcgtacatcccaggStt\n\ +aBgtcacacWtccNMcNatMVaVgtccDYStatMaccDatggYaRKaaagataRatttHK\n\ +tSaaatDgataaacttaHgttgVBtcttVttHgDacgaKatgtatatNYataactctSat\n\ +atatattgcHRRYttStggaactHgttttYtttaWtatMcttttctatctDtagVHYgMR\n\ +BgtHttcctaatYRttKtaagatggaVRataKDctaMtKBNtMtHNtWtttYcVtattMc\n\ +gRaacMcctNSctcatttaaagDcaHtYccSgatgcaatYaaaaDcttcgtaWtaattct\n\ +cgttttScttggtaatctttYgtctaactKataHacctMctcttacHtKataacacagcN\n\ +RatgKatttttSaaatRYcgDttaMRcgaaattactMtgcgtaagcgttatBtttttaat\n\ +taagtNacatHgttcRgacKcBBtVgatKttcgaBaatactDRgtRtgaNacWtcacYtt\n\ +aaKcgttctHaKttaNaMgWgWaggtctRgaKgWttSttBtDcNtgtttacaaatYcDRt\n\ +gVtgcctattcNtctaaaDMNttttNtggctgagaVctDaacVtWccaagtaacacaNct\n\ +gaScattccDHcVBatcgatgtMtaatBgHaatDctMYgagaatgYWKcctaatNaStHa\n\ +aaKccgHgcgtYaaYtattgtStgtgcaaRtattaKatattagaWVtcaMtBagttatta\n\ +gNaWHcVgcaattttDcMtgtaRHVYtHtctgtaaaaHVtMKacatcgNaatttMatatg\n\ +ttgttactagWYtaRacgataKagYNKcattataNaRtgaacKaYgcaaYYacaNccHat\n\ +MatDcNgtHttRaWttagaaDcaaaaaatagggtKDtStaDaRtaVtHWKNtgtattVct\n\ +SVgRgataDaRaWataBgaagaaKtaataaYgDcaStaNgtaDaaggtattHaRaWMYaY\n\ +aWtggttHYgagVtgtgcttttcaaDKcagVcgttagacNaaWtagtaataDttctggtt\n\ +VcatcataaagtgKaaaNaMtaBBaattaatWaattgctHaVKaSgDaaVKaHtatatat\n\ +HatcatSBagNgHtatcHYMHgttDgtaHtBttWatcgtttaRaattgStKgSKNWKatc\n\ +agDtctcagatttctRtYtBatBgHHtKaWtgYBgacVVWaKtacKcDttKMaKaVcggt\n\ +gttataagaataaHaatattagtataatMHgttYgaRttagtaRtcaaVatacggtcMcg\n\ +agtaaRttacWgactKRYataaaagSattYaWgagatYagKagatgSaagKgttaatMgg\n\ +tataatgttWYttatgagaaacctNVataatHcccKtDctcctaatactggctHggaSag\n\ +gRtKHaWaattcgSatMatttagaggcYtctaMcgctcataSatatgRagacNaaDagga\n\ +VBagaYttKtacNaKgtSYtagttggaWcatcWttaatctatgaVtcgtgtMtatcaYcg\n\ +tRccaaYgDctgcMgtgtWgacWtgataacacgcgctBtgttaKtYDtatDcatcagKaV\n\ +MctaatcttgVcaaRgcRMtDcgattaHttcaNatgaatMtactacVgtRgatggaWttt\n\ +actaaKatgagSaaKggtaNtactVaYtaaKRagaacccacaMtaaMtKtatBcttgtaa\n\ +WBtMctaataaVcDaaYtcRHBtcgttNtaaHatttBNgRStVDattBatVtaagttaYa\n\ +tVattaagaBcacggtSgtVtatttaRattgatgtaHDKgcaatattKtggcctatgaWD\n\ +KRYcggattgRctatNgatacaatMNttctgtcRBYRaaaHctNYattcHtaWcaattct\n\ +BtMKtVgYataatMgYtcagcttMDataVtggRtKtgaatgccNcRttcaMtRgattaac\n\ +attRcagcctHtWMtgtDRagaKaBtgDttYaaaaKatKgatctVaaYaacWcgcatagB\n\ +VtaNtRtYRaggBaaBtgKgttacataagagcatgtRattccacttaccatRaaatgWgD\n\ +aMHaYVgVtaSctatcgKaatatattaDgacccYagtgtaYNaaatKcagtBRgagtcca\n\ +tgKgaaaccBgaagBtgSttWtacgatWHaYatcgatttRaaNRgcaNaKVacaNtDgat\n\ +tgHVaatcDaagcgtatgcNttaDataatcSataaKcaataaHWataBtttatBtcaKtK\n\ +tatagttaDgSaYctacaRatNtaWctSaatatttYaKaKtaccWtatcRagacttaYtt\n\ +VcKgSDcgagaagatccHtaattctSttatggtKYgtMaHagVaBRatttctgtRgtcta\n\ +tgggtaHKgtHacHtSYacgtacacHatacKaaBaVaccaDtatcSaataaHaagagaat\n\ +ScagactataaRttagcaaVcaHataKgDacatWccccaagcaBgagWatctaYttgaaa\n\ +tctVNcYtttWagHcgcgcDcVaaatgttKcHtNtcaatagtgtNRaactttttcaatgg\n\ +WgBcgDtgVgtttctacMtaaataaaRggaaacWaHttaRtNtgctaaRRtVBctYtVta\n\ +tDcattDtgaccYatagatYRKatNYKttNgcctagtaWtgaactaMVaacctgaStttc\n\ +tgaKVtaaVaRKDttVtVctaDNtataaaDtccccaagtWtcgatcactDgYaBcatcct\n\ +MtVtacDaaBtYtMaKNatNtcaNacgDatYcatcgcaRatWBgaacWttKttagYtaat\n\ +tcggttgSWttttDWctttacYtatatWtcatDtMgtBttgRtVDggttaacYtacgtac\n\ +atgaattgaaWcttMStaDgtatattgaDtcRBcattSgaaVBRgagccaaKtttcDgcg\n\ +aSMtatgWattaKttWtgDBMaggBBttBaatWttRtgcNtHcgttttHtKtcWtagHSt\n\ +aacagttgatatBtaWSaWggtaataaMttaKacDaatactcBttcaatatHttcBaaSa\n\ +aatYggtaRtatNtHcaatcaHtagVtgtattataNggaMtcttHtNagctaaaggtaga\n\ +YctMattNaMVNtcKtactBKcaHHcBttaSagaKacataYgctaKaYgttYcgacWVtt\n\ +WtSagcaacatcccHaccKtcttaacgaKttcacKtNtacHtatatRtaaatacactaBt\n\ +ttgaHaRttggttWtatYagcatYDatcggagagcWBataagRtacctataRKgtBgatg\n\ +aDatataSttagBaHtaatNtaDWcWtgtaattacagKttcNtMagtattaNgtctcgtc\n\ +ctcttBaHaKcKccgtRcaaYagSattaagtKataDatatatagtcDtaacaWHcaKttD\n\ +gaaRcgtgYttgtcatatNtatttttatggccHtgDtYHtWgttatYaacaattcaWtat\n\ +NgctcaaaSttRgctaatcaaatNatcgtttaBtNNVtgttataagcaaagattBacgtD\n\ +atttNatttaaaDcBgtaSKgacgtagataatttcHMVNttgttBtDtgtaWKaaRMcKM\n\ +tHtaVtagataWctccNNaSWtVaHatctcMgggDgtNHtDaDttatatVWttgttattt\n\ +aacctttcacaaggaSaDcggttttttatatVtctgVtaacaStDVaKactaMtttaSNa\n\ +gtgaaattaNacttSKctattcctctaSagKcaVttaagNaVcttaVaaRNaHaaHttat\n\ +gtHttgtgatMccaggtaDcgaccgtWgtWMtttaHcRtattgScctatttKtaaccaag\n\ +tYagaHgtWcHaatgccKNRtttagtMYSgaDatctgtgaWDtccMNcgHgcaaacNDaa\n\ +aRaStDWtcaaaaHKtaNBctagBtgtattaactaattttVctagaatggcWSatMaccc\n\ +ttHttaSgSgtgMRcatRVKtatctgaaaccDNatYgaaVHNgatMgHRtacttaaaRta\n\ +tStRtDtatDttYatattHggaBcttHgcgattgaKcKtttcRataMtcgaVttWacatN\n\ +catacctRataDDatVaWNcggttgaHtgtMacVtttaBHtgagVttMaataattatgtt\n\ +cttagtttgtgcDtSatttgBtcaacHattaaBagVWcgcaSYttMgcttacYKtVtatc\n\ +aYaKctgBatgcgggcYcaaaaacgNtctagKBtattatctttKtaVttatagtaYtRag\n\ +NtaYataaVtgaatatcHgcaaRataHtacacatgtaNtgtcgYatWMatttgaactacR\n\ +ctaWtWtatacaatctBatatgYtaagtatgtgtatSttactVatcttYtaBcKgRaSgg\n\ +RaaaaatgcagtaaaWgtaRgcgataatcBaataccgtatttttccatcNHtatWYgatH\n\ +SaaaDHttgctgtccHtggggcctaataatttttctatattYWtcattBtgBRcVttaVM\n\ +RSgctaatMagtYtttaaaaatBRtcBttcaaVtaacagctccSaaSttKNtHtKYcagc\n\ +agaaaccccRtttttaaDcDtaStatccaagcgctHtatcttaDRYgatDHtWcaaaBcW\n\ +gKWHttHataagHacgMNKttMKHccaYcatMVaacgttaKgYcaVaaBtacgcaacttt\n\ +MctaaHaatgtBatgagaSatgtatgSRgHgWaVWgataaatatttccKagVgataattW\n\ +aHNcYggaaatgctHtKtaDtctaaagtMaatVDVactWtSaaWaaMtaHtaSKtcBRaN\n\ +cttStggtBttacNagcatagRgtKtgcgaacaacBcgKaatgataagatgaaaattgta\n\ +ctgcgggtccHHWHaaNacaBttNKtKtcaaBatatgctaHNgtKcDWgtttatNgVDHg\n\ +accaacWctKaaggHttgaRgYaatHcaBacaatgagcaaattactgtaVaaYaDtagat\n\ +tgagNKggtggtgKtWKaatacagDRtatRaMRtgattDggtcaaYRtatttNtagaDtc\n\ +acaaSDctDtataatcgtactaHttatacaatYaacaaHttHatHtgcgatRRttNgcat\n\ +SVtacWWgaaggagtatVMaVaaattScDDKNcaYBYaDatHgtctatBagcaacaagaa\n\ +tgagaaRcataaKNaRtBDatcaaacgcattttttaaBtcSgtacaRggatgtMNaattg\n\ +gatatWtgagtattaaaVctgcaYMtatgatttttYgaHtgtcttaagWBttHttgtctt\n\ +attDtcgtatWtataataSgctaHagcDVcNtaatcaagtaBDaWaDgtttagYctaNcc\n\ +DtaKtaHcttaataacccaRKtacaVaatNgcWRaMgaattatgaBaaagattVYaHMDc\n\ +aDHtcRcgYtcttaaaWaaaVKgatacRtttRRKYgaatacaWVacVcRtatMacaBtac\n\ +tggMataaattttHggNagSctacHgtBagcgtcgtgattNtttgatSaaggMttctttc\n\ +ttNtYNagBtaaacaaatttMgaccttacataattgYtcgacBtVMctgStgMDtagtaR\n\ +ctHtatgttcatatVRNWataDKatWcgaaaaagttaaaagcacgHNacgtaatctttMR\n\ +tgacttttDacctataaacgaaatatgattagaactccSYtaBctttaataacWgaaaYa\n\ +tagatgWttcatKtNgatttttcaagHtaYgaaRaDaagtaggagcttatVtagtctttc\n\ +attaaaatcgKtattaRttacagVaDatgcatVgattgggtctttHVtagKaaRBtaHta\n\ +aggccccaaaaKatggtttaMWgtBtaaacttcactttKHtcgatctccctaYaBacMgt\n\ +cttBaBaNgcgaaacaatctagtHccHtKttcRtRVttccVctttcatacYagMVtMcag\n\ +aMaaacaataBctgYtaatRaaagattaaccatVRatHtaRagcgcaBcgDttStttttc\n\ +VtttaDtKgcaaWaaaaatSccMcVatgtKgtaKgcgatatgtagtSaaaDttatacaaa\n\ +catYaRRcVRHctKtcgacKttaaVctaDaatgttMggRcWaacttttHaDaKaDaBctg\n\ +taggcgtttaHBccatccattcNHtDaYtaataMttacggctNVaacDattgatatttta\n\ +cVttSaattacaaRtataNDgacVtgaacataVRttttaDtcaaacataYDBtttaatBa\n\ +DtttYDaDaMccMttNBttatatgagaaMgaNtattHccNataattcaHagtgaaggDga\n\ +tgtatatatgYatgaStcataaBStWacgtcccataRMaaDattggttaaattcMKtctM\n\ +acaBSactcggaatDDgatDgcWctaacaccgggaVcacWKVacggtaNatatacctMta\n\ +tgatagtgcaKagggVaDtgtaacttggagtcKatatcgMcttRaMagcattaBRaStct\n\ +YSggaHYtacaactMBaagDcaBDRaaacMYacaHaattagcattaaaHgcgctaaggSc\n\ +cKtgaaKtNaBtatDDcKBSaVtgatVYaagVtctSgMctacgttaacWaaattctSgtD\n\ +actaaStaaattgcagBBRVctaatatacctNttMcRggctttMttagacRaHcaBaacV\n\ +KgaataHttttMgYgattcYaNRgttMgcVaaacaVVcDHaatttgKtMYgtatBtVVct\n\ +WgVtatHtacaaHttcacgatagcagtaaNattBatatatttcVgaDagcggttMaagtc\n\ +ScHagaaatgcYNggcgtttttMtStggtRatctacttaaatVVtBacttHNttttaRca\n\ +aatcacagHgagagtMgatcSWaNRacagDtatactaaDKaSRtgattctccatSaaRtt\n\ +aaYctacacNtaRtaactggatgaccYtacactttaattaattgattYgttcagDtNKtt\n\ +agDttaaaaaaaBtttaaNaYWKMBaaaacVcBMtatWtgBatatgaacVtattMtYatM\n\ +NYDKNcKgDttDaVtaaaatgggatttctgtaaatWtctcWgtVVagtcgRgacttcccc\n\ +taDcacagcRcagagtgtWSatgtacatgttaaSttgtaaHcgatgggMagtgaacttat\n\ +RtttaVcaccaWaMgtactaatSSaHtcMgaaYtatcgaaggYgggcgtgaNDtgttMNg\n\ +aNDMtaattcgVttttaacatgVatgtWVMatatcaKgaaattcaBcctccWcttgaaWH\n\ +tWgHtcgNWgaRgctcBgSgaattgcaaHtgattgtgNagtDttHHgBttaaWcaaWagc\n\ +aSaHHtaaaVctRaaMagtaDaatHtDMtcVaWMtagSagcttHSattaacaaagtRacM\n\ +tRtctgttagcMtcaBatVKtKtKacgagaSNatSactgtatatcBctgagVtYactgta\n\ +aattaaaggcYgDHgtaacatSRDatMMccHatKgttaacgactKtgKagtcttcaaHRV\n\ +tccttKgtSataatttacaactggatDNgaacttcaRtVaagDcaWatcBctctHYatHa\n\ +DaaatttagYatSatccaWtttagaaatVaacBatHcatcgtacaatatcgcNYRcaata\n\ +YaRaYtgattVttgaatgaVaactcRcaNStgtgtattMtgaggtNttBaDRcgaaaagc\n\ +tNgBcWaWgtSaDcVtgVaatMKBtttcgtttctaaHctaaagYactgMtatBDtcStga\n\ +ccgtSDattYaataHctgggaYYttcggttaWaatctggtRagWMaDagtaacBccacta\n\ +cgHWMKaatgatWatcctgHcaBaSctVtcMtgtDttacctaVgatYcWaDRaaaaRtag\n\ +atcgaMagtggaRaWctctgMgcWttaagKBRtaaDaaWtctgtaagYMttactaHtaat\n\ +cttcataacggcacBtSgcgttNHtgtHccatgttttaaagtatcgaKtMttVcataYBB\n\ +aKtaMVaVgtattNDSataHcagtWMtaggtaSaaKgttgBtVtttgttatcatKcgHac\n\ +acRtctHatNVagSBgatgHtgaRaSgttRcctaacaaattDNttgacctaaYtBgaaaa\n\ +tagttattactcttttgatgtNNtVtgtatMgtcttRttcatttgatgacacttcHSaaa\n\ +ccaWWDtWagtaRDDVNacVaRatgttBccttaatHtgtaaacStcVNtcacaSRttcYa\n\ +gacagaMMttttgMcNttBcgWBtactgVtaRttctccaaYHBtaaagaBattaYacgat\n\ +ttacatctgtaaMKaRYtttttactaaVatWgctBtttDVttctggcDaHaggDaagtcg\n\ +aWcaagtagtWttHtgKtVataStccaMcWcaagataagatcactctHatgtcYgaKcat\n\ +cagatactaagNSStHcctRRNtattgtccttagttagMVgtatagactaactctVcaat\n\ +MctgtttgtgttgccttatWgtaBVtttctggMcaaKgDWtcgtaaYStgSactatttHg\n\ +atctgKagtagBtVacRaagRtMctatgggcaaaKaaaatacttcHctaRtgtDcttDat\n\ +taggaaatttcYHaRaaBttaatggcacKtgctHVcaDcaaaVDaaaVcgMttgtNagcg\n\ +taDWgtcgttaatDgKgagcSatatcSHtagtagttggtgtHaWtaHKtatagctgtVga\n\ +ttaBVaatgaataagtaatVatSttaHctttKtttgtagttaccttaatcgtagtcctgB\n\ +cgactatttVcMacHaaaggaatgDatggKtaHtgStatattaaSagctWcctccRtata\n\ +BaDYcgttgcNaagaggatRaaaYtaWgNtSMcaatttactaacatttaaWttHtatBat\n\ +tgtcgacaatNgattgcNgtMaaaKaBDattHacttggtRtttaYaacgVactBtaBaKt\n\ +gBttatgVttgtVttcaatcWcNctDBaaBgaDHacBttattNtgtDtatttVSaaacag\n\ +gatgcRatSgtaSaNtgBatagttcHBgcBBaaattaHgtDattatDaKaatBaaYaaMa\n\ +ataaataKtttYtagtBgMatNcatgtttgaNagtgttgtgKaNaSagtttgaSMaYBca\n\ +aaacDStagttVacaaaaactaaWttBaagtctgtgcgtMgtaattctcctacctcaNtt\n\ +taaccaaaaVtBcacataacaccccBcWMtatVtggaatgaWtcaaWaaaaaaaaWtDta\n\ +atatRcctDWtcctaccMtVVatKttaWaaKaaatataaagScHBagaggBaSMtaWaVt\n\ +atattactSaaaKNaactatNatccttgaYctattcaaaVgatttYHcRagattttaSat\n\ +aggttattcVtaaagaKgtattattKtRttNcggcRgtgtgtWYtaacHgKatKgatYta\n\ +cYagDtWcHBDctctgRaYKaYagcactKcacSaRtBttttBHKcMtNtcBatttatttt\n\ +tgSatVgaaagaWtcDtagDatatgMacaacRgatatatgtttgtKtNRaatatNatgYc\n\ +aHtgHataacKtgagtagtaacYttaNccaaatHcacaacaVDtagtaYtccagcattNt\n\ +acKtBtactaaagaBatVtKaaHBctgStgtBgtatgaSNtgDataaccctgtagcaBgt\n\ +gatcttaDataStgaMaccaSBBgWagtacKcgattgaDgNNaaaacacagtSatBacKD\n\ +gcgtataBKcatacactaSaatYtYcDaactHttcatRtttaatcaattataRtttgtaa\n\ +gMcgNttcatcBtYBagtNWNMtSHcattcRctttttRWgaKacKttgggagBcgttcgc\n\ +MaWHtaatactgtctctatttataVgtttaBScttttaBMaNaatMacactYtBMggtHa\n\ +cMagtaRtctgcatttaHtcaaaatttgagKtgNtactBacaHtcgtatttctMaSRagc\n\ +agttaatgtNtaaattgagagWcKtaNttagVtacgatttgaatttcgRtgtWcVatcgt\n\ +taaDVctgtttBWgaccagaaagtcSgtVtatagaBccttttcctaaattgHtatcggRa\n\ +ttttcaaggcYSKaagWaWtRactaaaacccBatMtttBaatYtaagaactSttcgaaSc\n\ +aatagtattgaccaagtgttttctaacatgtttNVaatcaaagagaaaNattaaRtttta\n\ +VaaaccgcaggNMtatattVctcaagaggaacgBgtttaacaagttcKcYaatatactaa\n\ +ccBaaaSggttcNtattctagttRtBacgScVctcaatttaatYtaaaaaaatgSaatga\n\ +tagaMBRatgRcMcgttgaWHtcaVYgaatYtaatctttYttatRaWtctgBtDcgatNa\n\ +tcKaBaDgatgtaNatWKctccgatattaacattNaaacDatgBgttctgtDtaaaMggt\n\ +gaBaSHataacgccSctaBtttaRBtcNHcDatcDcctagagtcRtaBgWttDRVHagat\n\ +tYatgtatcWtaHtttYcattWtaaagtctNgtStggRNcgcggagSSaaagaaaatYcH\n\ +DtcgctttaatgYcKBVSgtattRaYBaDaaatBgtatgaHtaaRaRgcaSWNtagatHa\n\ +acttNctBtcaccatctMcatattccaSatttgcgaDagDgtatYtaaaVDtaagtttWV\n\ +aagtagYatRttaagDcNgacKBcScagHtattatcDaDactaaaaaYgHttBcgaDttg\n\ +gataaaKSRcBMaBcgaBSttcWtgNBatRaccgattcatttataacggHVtaattcaca\n\ +agagVttaaRaatVVRKcgWtVgacctgDgYaaHaWtctttcacMagggatVgactagMa\n\ +aataKaaNWagKatagNaaWtaaaatttgaattttatttgctaaVgaHatBatcaaBWcB\n\ +gttcMatcgBaaNgttcgSNaggSaRtttgHtRtattaNttcDcatSaVttttcgaaaaa\n\ +ttgHatctaRaggSaNatMDaaatDcacgattttagaHgHaWtYgattaatHNSttatMS\n\ +gggNtcKtYatRggtttgtMWVtttaYtagcagBagHaYagttatatggtBacYcattaR\n\ +SataBatMtttaaatctHcaaaSaaaagttNSaaWcWRccRtKaagtBWtcaaattSttM\n\ +tattggaaaccttaacgttBtWatttatatWcDaatagattcctScacctaagggRaaYt\n\ +aNaatgVtBcttaaBaacaMVaaattatStYgRcctgtactatcMcVKatttcgSgatRH\n\ +MaaaHtagtaaHtVgcaaataatatcgKKtgccaatBNgaaWcVttgagttaKatagttc\n\ +aggKDatDtattgaKaVcaKtaataDataataHSaHcattagttaatRVYcNaHtaRcaa\n\ +ggtNHcgtcaaccaBaaagYtHWaaaRcKgaYaaDttgcWYtataRgaatatgtYtgcKt\n\ +aNttWacatYHctRaDtYtattcBttttatcSataYaYgttWaRagcacHMgtttHtYtt\n\ +YaatcggtatStttcgtRSattaaDaKMaatatactaNBaWgctacacYtgaYVgtgHta\n\ +aaRaaRgHtagtWattataaaSDaaWtgMattatcgaaaagtaYRSaWtSgNtBgagcRY\n\ +aMDtactaacttaWgtatctagacaagNtattHggataatYttYatcataDcgHgttBtt\n\ +ctttVttgccgaaWtaaaacgKgtatctaaaaaNtccDtaDatBMaMggaatNKtatBaa\n\ +atVtccRaHtaSacataHattgtttKVYattcataVaattWtcgtgMttcttKtgtctaa\n\ +cVtatctatatBRataactcgKatStatattcatHHRttKtccaacgtgggtgRgtgaMt\n\ +attattggctatcgtgacMtRcBDtcttgtactaatRHttttaagatcgVMDStattatY\n\ +BtttDttgtBtNttgRcMtYtgBacHaWaBaatDKctaagtgaaactaatgRaaKgatcc\n\ +aagNaaaatattaggWNtaagtatacttttKcgtcggSYtcttgRctataYcttatataa\n\ +agtatattaatttataVaacacaDHatctatttttKYVatHRactttaBHccaWagtact\n\ +BtcacgaVgcgttRtttttttSVgtSagtBaaattctgaHgactcttgMcattttagVta\n\ +agaattHctHtcaDaaNtaacRggWatagttcgtSttgaDatcNgNagctagDgatcNtt\n\ +KgttgtaDtctttRaaYStRatDtgMggactSttaDtagSaVtBDttgtDgccatcacaM\n\ +attaaaMtNacaVcgSWcVaaDatcaHaatgaattaMtatccVtctBtaattgtWattat\n\ +BRcWcaatgNNtactWYtDaKttaaatcactcagtRaaRgatggtKgcgccaaHgaggat\n\ +StattYcaNMtcaBttacttatgagDaNtaMgaaWtgtttcttctaHtMNgttatctaWW\n\ +atMtBtaaatagDVatgtBYtatcggcttaagacMRtaHScgatatYgRDtcattatSDa\n\ +HggaaataNgaWSRRaaaBaatagBattaDctttgHWNttacaataaaaaaatacggttt\n\ +gHgVtaHtWMttNtBtctagtMcgKMgHgYtataHaNagWtcaacYattaataYRgtaWK\n\ +gaBctataaccgatttaHaNBRaRaMtccggtNgacMtctcatttgcaattcWgMactta\n\ +caaDaaNtactWatVtttagccttMaatcagVaagtctVaaDaBtattaattaYtNaYtg\n\ +gattaKtaKctYaMtattYgatattataatKtVgDcttatatNBtcgttgtStttttMag\n\ +aggttaHYSttcKgtcKtDNtataagttataagSgttatDtRttattgttttSNggRtca\n\ +aKMNatgaatattgtBWtaMacctgggYgaSgaagYataagattacgagaatBtggtRcV\n\ +HtgYggaDgaYaKagWagctatagacgaaHgtWaNgacttHRatVaWacKYtgRVNgVcS\n\ +gRWctacatcKSactctgWYtBggtataagcttNRttVtgRcaWaaatDMatYattaact\n\ +ttcgaagRatSctgccttgcRKaccHtttSNVagtagHagBagttagaccaRtataBcca\n\ +taatSHatRtcHagacBWatagcaMtacaRtgtgaaBatctKRtScttccaNaatcNgta\n\ +atatWtcaMgactctBtWtaaNactHaaaaRctcgcatggctMcaaNtcagaaaaacaca\n\ +gtggggWttRttagtaagaVctVMtcgaatcttcMaaaHcaHBttcgattatgtcaDagc\n\ +YRtBtYcgacMgtDcagcgaNgttaataatagcagKYYtcgtaBtYctMaRtaRtDagaa\n\ +aacacatgYaBttgattattcgaaNttBctSataaMataWRgaHtttccgtDgaYtatgg\n\ +tDgHKgMtatttVtMtVagttaRatMattRagataaccctKctMtSttgaHagtcStcta\n\ +tttccSagatgttccacgaggYNttHRacgattcDatatDcataaaatBBttatcgaHtN\n\ +HaaatatDNaggctgaNcaaggagttBttMgRagVatBcRtaWgatgBtSgaKtcgHttt\n\ +gaatcaaDaHttcSBgHcagtVaaSttDcagccgttNBtgttHagYtattctttRWaaVt\n\ +SttcatatKaaRaaaNacaVtVctMtSDtDtRHRcgtaatgctcttaaatSacacaatcg\n\ +HattcaWcttaaaatHaaatcNctWttaNMcMtaKctVtcctaagYgatgatcYaaaRac\n\ +tctaRDaYagtaacgtDgaggaaatctcaaacatcaScttcKttNtaccatNtaNataca\n\ +tttHaaDHgcaDatMWaaBttcRggctMaagctVYcacgatcaDttatYtaatcKatWat\n\ +caatVYtNagatttgattgaYttttYgacttVtcKaRagaaaHVgDtaMatKYagagttN\n\ +atWttaccNtYtcDWgSatgaRgtMatgKtcgacaagWtacttaagtcgKtgatccttNc\n\ +ttatagMatHVggtagcgHctatagccctYttggtaattKNaacgaaYatatVctaataM\n\ +aaaYtgVtcKaYtaataacagaatHcacVagatYWHttagaaSMaatWtYtgtaaagNaa\n\ +acaVgaWtcacNWgataNttcaSagctMDaRttgNactaccgataMaaatgtttattDtc\n\ +aagacgctDHYYatggttcaagccNctccttcMctttagacBtaaWtaWVHggaaaaNat\n\ +ttaDtDtgctaaHHtMtatNtMtagtcatttgcaaaRatacagRHtatDNtgtDgaatVg\n\ +tVNtcaaatYBMaaaagcaKgtgatgatMgWWMaHttttMgMagatDtataaattaacca\n\ +actMtacataaattgRataatacgBtKtaataattRgtatDagDtcRDacctatRcagag\n\ +cSHatNtcaScNtttggacNtaaggaccgtgKNttgttNcttgaaRgYgRtNtcagttBc\n\ +ttttcHtKtgcttYaaNgYagtaaatgaatggWaMattBHtatctatSgtcYtgcHtaat\n\ +tHgaaMtHcagaaSatggtatgccaHBtYtcNattWtgtNgctttaggtttgtWatNtgH\n\ +tgcDttactttttttgcNtactKtWRaVcttcatagtgSNKaNccgaataaBttataata\n\ +YtSagctttaaatSttggctaaKSaatRccgWHgagDttaaatcatgagMtcgagtVtaD\n\ +ggaBtatttgDacataaacgtagYRagBWtgDStKDgatgaagttcattatttaKWcata\n\ +aatWRgatataRgttRacaaNKttNtKagaaYaStaactScattattaacgatttaaatg\n\ +DtaattagatHgaYataaactatggggatVHtgccgtNgatNYcaStRtagaccacWcaM\n\ +tatRagHgVactYtWHtcttcatgatWgagaKggagtatgaWtDtVtNaNtcgYYgtaaa\n\ +ctttaDtBactagtaDctatagtaatatttatatataacgHaaaRagKattSagttYtSt\n\ +>THREE Homo sapiens frequency\n\ +agagagacgatgaaaattaatcgtcaatacgctggcgaacactgagggggacccaatgct\n\ +cttctcggtctaaaaaggaatgtgtcagaaattggtcagttcaaaagtagaccggatctt\n\ +tgcggagaacaattcacggaacgtagcgttgggaaatatcctttctaccacacatcggat\n\ +tttcgccctctcccattatttattgtgttctcacatagaattattgtttagacatccctc\n\ +gttgtatggagagttgcccgagcgtaaaggcataatccatataccgccgggtgagtgacc\n\ +tgaaattgtttttagttgggatttcgctatggattagcttacacgaagagattctaatgg\n\ +tactataggataattataatgctgcgtggcgcagtacaccgttacaaacgtcgttcgcat\n\ +atgtggctaacacggtgaaaatacctacatcgtatttgcaatttcggtcgtttcatagag\n\ +cgcattgaattactcaaaaattatatatgttgattatttgattagactgcgtggaaagaa\n\ +ggggtactcaagccatttgtaaaagctgcatctcgcttaagtttgagagcttacattagt\n\ +ctatttcagtcttctaggaaatgtctgtgtgagtggttgtcgtccataggtcactggcat\n\ +atgcgattcatgacatgctaaactaagaaagtagattactattaccggcatgcctaatgc\n\ +gattgcactgctatgaaggtgcggacgtcgcgcccatgtagccctgataataccaatact\n\ +tacatttggtcagcaattctgacattatacctagcacccataaatttactcagacttgag\n\ +gacaggctcttggagtcgatcttctgtttgtatgcatgtgatcatatagatgaataagcg\n\ +atgcgactagttagggcatagtatagatctgtgtatacagttcagctgaacgtccgcgag\n\ +tggaagtacagctgagatctatcctaaaatgcaaccatatcgttcacacatgatatgaac\n\ +ccagggggaaacattgagttcagttaaattggcagcgaatcccccaagaagaaggcggag\n\ +tgacgttgaacgggcttatggtttttcagtacttcctccgtataagttgagcgaaatgta\n\ +aacagaataatcgttgtgttaacaacattaaaatcgcggaatatgatgagaatacacagt\n\ +gtgagcatttcacttgtaaaatatctttggtagaacttactttgctttaaatatgttaaa\n\ +ccgatctaataatctacaaaacggtagattttgcctagcacattgcgtccttctctattc\n\ +agatagaggcaatactcagaaggttttatccaaagcactgtgttgactaacctaagtttt\n\ +agtctaataatcatgattgattataggtgccgtggactacatgactcgtccacaaataat\n\ +acttagcagatcagcaattggccaagcacccgacttttatttaatggttgtgcaatagtc\n\ +cagattcgtattcgggactctttcaaataatagtttcctggcatctaagtaagaaaagct\n\ +cataaggaagcgatattatgacacgctcttccgccgctgttttgaaacttgagtattgct\n\ +cgtccgaaattgagggtcacttcaaaatttactgagaagacgaagatcgactaaagttaa\n\ +aatgctagtccacagttggtcaagttgaattcatccacgagttatatagctattttaatt\n\ +tatagtcgagtgtacaaaaaacatccacaataagatttatcttagaataacaacccccgt\n\ +atcatcgaaatcctccgttatggcctgactcctcgagcttatagcatttgtgctggcgct\n\ +cttgccaggaacttgctcgcgaggtggtgacgagtgagatgatcagtttcattatgatga\n\ +tacgattttatcgcgactagttaatcatcatagcaagtaaaatttgaattatgtcattat\n\ +catgctccattaacaggttatttaattgatactgacgaaattttttcacaatgggttttc\n\ +tagaatttaatatcagtaattgaagccttcataggggtcctactagtatcctacacgacg\n\ +caggtccgcagtatcctggagggacgtgttactgattaaaagggtcaaaggaatgaaggc\n\ +tcacaatgttacctgcttcaccatagtgagccgatgagttttacattagtactaaatccc\n\ +aaatcatactttacgatgaggcttgctagcgctaaagagaatacatacaccaccacatag\n\ +aattgttagcgatgatatcaaatagactcctggaagtgtcagggggaaactgttcaatat\n\ +ttcgtccacaggactgaccaggcatggaaaagactgacgttggaaactataccatctcac\n\ +gcccgacgcttcactaattgatgatccaaaaaatatagcccggattcctgattagcaaag\n\ +ggttcacagagaaagatattatcgacgtatatcccaaaaaacagacgtaatgtgcatctt\n\ +cgaatcgggatgaatacttgtatcataaaaatgtgacctctagtatacaggttaatgtta\n\ +gtgatacacaatactcgtgggccatgggttctcaaataaaatgtaatattgcgtcgatca\n\ +ctcacccacgtatttggtctaattatgttttatttagtgacaatccaatagataaccggt\n\ +cctattaagggctatatttttagcgaccacgcgtttaaacaaaggattgtatgtagatgg\n\ +taccagtttaattgccagtgggcaatcctaagcaaaatgagattctatcctaaagtttgg\n\ +gcttgatataagatttcggatgtatgggttttataatcgttggagagctcaatcatgagc\n\ +taatacatggatttcgctacctcaccgagagaccttgcatgaagaattctaaccaaaagt\n\ +ttaataggccggattggattgagttaattaagaccttgttcagtcatagtaaaaaccctt\n\ +aaattttaccgattgacaaagtgagcagtcgcaataccctatgcgaaacgcctcgatagt\n\ +gactaggtatacaaggtttttgagttcctttgaaatagttaactaatttaaaattaatta\n\ +acgacatggaaatcacagaacctaatgctttgtaggagttatttatgctgtttactgcct\n\ +ctacaaccctaataaagcagtcctaagaatgaaacgcatcttttagttcagaaagtggta\n\ +tccagggtggtcaatttaataaattcaacatcgggtctcaggatattcggtcatataatt\n\ +tattaagggctcttcgagtcttactctgagtgaaattggaaacagtcatccttttcgttg\n\ +tgaggcatcttacaccgctatcgatatacaatgcattccaccgcggtgtcccgtacacaa\n\ +ggaaacttgttaccttggggatataagaaaactcacacgtctcattattaaactgagtac\n\ +aatttttgcacgagaaagtaatgcaatacaatatgatgaaagccagctaatgaaaaggga\n\ +tggaacgcacctcggatctgttgcactggattaaaatccgattatttttaaaaatattca\n\ +gtgctagagcatatcaggtctacttttttatctggtatgtaaagcccacggagcgatagt\n\ +gagatccttacgactcaacgaaaagttataacataactcccgttagccaaagcccaatcc\n\ +cgattactgccctaccctaacgtctgccatctaaatatcgaacttgttatgatcaatgtg\n\ +actacctcccaccctttccccttcatttgttccactggggataagctagcgttttcagaa\n\ +tcaatgcaataagaatagccaattgtctcacttcatcagagctcttggcaattccaggcg\n\ +ctacgtggttctggaatatattcatttttcaaatagtaatacgtttagtgttgctattgt\n\ +ctacacgtttggatattacgttatgtgagcggacatcaatagttgtctaactctttagta\n\ +agccagagatagcactcttagcgaatggataccatcttccataagtttagttaatagtcc\n\ +gaaacaactgcttcgagcatatttgaacctccttgtaggcaaatagcctcttcaaagcaa\n\ +tcttactaatagatagagtttgttttaagggactactagaaatgggacaatcttaatagt\n\ +atgacctaaactgacatttaaagatatatccaggtggcaagcataaagatcattgcgcca\n\ +cctccaccgtgggattacttatcagtcgatatcctatatgctaagtttgcgacggcagaa\n\ +tacaaactaagctgagttgatgctaaccttacctatgataccccattggaccggttaaca\n\ +gccctacttattccaaataaaagaacttttatgctgtagaagctattatagtgatgcctg\n\ +gtaacttcagtatattaaaatgacacacatacgccatatagagctcctggaactttgaat\n\ +aatgagcgaacttcgaagttgaagagcaagaaaccatatgtcacggttgcctaaagcccg\n\ +gtaaccagacatgtgctatcattgatcattatcgaggttttcataaccttgacccattat\n\ +cggctgtgcgcggacaagtacttaaatcactagtttcttcacctgcttatcggtaagaaa\n\ +taaggttggcaaagaatcgcataagacggacgtagagccgcagcgttgtgcgagtccagg\n\ +tgcatgcgcagcaataggattttaaattttgttccatttttaatttagccgtaaggatgt\n\ +ccgtaaatgattgaaaattggattcaatctttgggcctatgctactggaacctgatcgac\n\ +aaaatttcaaacatacgttaactccgaaagaccgtatttttgcggctagaatagtcagtc\n\ +gcttggagccatataccttaccacttaaacgacgtgctcctgtagttgaaatataaacag\n\ +aacacaaagactaccgatcatatcaactgaagatctttgtaactttgaggcgaagcaccc\n\ +tcttcgagacaactaagagtaaagtaccgggcgccgcaaggagtcgattgggaccctaaa\n\ +tcttgacgaattgctaagaggctcagagctaccactgtaatttctctagagcccataata\n\ +aatgaacgatacatccgtaggtagcacctaagggattataatggaagccaaatgcagtta\n\ +ataatattatatactggcgtacacgattcgacggatctctcacatagtgattcacgaccc\n\ +ccccctttgattgacacagcgtcagcattttgcaagaacgatcttctgcatagggtgcgc\n\ +caccgtaaggatgacgtcgaagctacaactgggtataatttaccatgcttccctgatgct\n\ +gagtgcaatacactaagaatgagtttttaccccatatcaccagtatttgttctgttattg\n\ +cgaagaaatggctatgctgagttggcgactaaagtcacccatcctttttattaggtaacc\n\ +ccctcccttaaactaactgatttgctggagctgccctgcatacatatactttatcattta\n\ +tggacgtccgtgacgcttattatccaccatagtcgatatgctacacggattcattaatgg\n\ +atcgtaggagtttaagttatatttactaagatcggtctcggctactatcccgccttaccc\n\ +ggcgctatttacggccatttttaatatattgacggtaattattcctatggtttcgaccgc\n\ +acgtccttggacaagaaagaatggcaaaaaaaatgtaaaagaaaaaaaatattgagtccc\n\ +taccatcatataaaaaatatgtgatgagtaacttgacgaaatgttagtggttattaaaga\n\ +ctatctattacaccttttgttttctgtcgtagtatattaaagtctagaagccttacagga\n\ +aaatcagggttatacagccgatactccgcagcatgaatcatcgaggaggtgtcctaccat\n\ +cgcgccttgtaatcttgtctgtgtatactgtatttagaccttttatacaaagtaaatatc\n\ +tcggctttatgtgattgggaggggcctactcaaacatgatgacttgacctaataatcact\n\ +gtgcgggcgtcttatgactagctattccttgaaatccaccaccaaatggttaatatgtaa\n\ +aaactttgacgatgaaacaaggtgaatgtgtagttactttgtgtaattagctgcgtcgag\n\ +cattgcttgtaaaaccgtcaatcgcacacgttacttccataaaatttctacgaatacacc\n\ +cttcttaaaaaaaacgtaggaattcacgagtttaacaaacgataactgtataaagtggaa\n\ +gtccgaagaaagcagatgcccgaactactcgaagatgtttcgttttcttaaccatagggg\n\ +cttcttaatggcccactacgcacattttgttcaagcccgagagggacatccccattacgg\n\ +gagtattactaaaactgttccgtaatacgttcagcaagggatgaaaaaggccactgctca\n\ +agttattgacgtgggagtattacatcggaagcctgaatcccacactatgatggtctgtac\n\ +aggcctagggactgcgtctagacggtattaccggcttctaatcatacgatcgtgagtctt\n\ +aacgggaagtaaggctcacacctaccccaaaccatttatctatgtaagtataaaattgtg\n\ +cgtaagtgttcaaagtggacaataaagacgtggcaaaaacccccgcacataagccgcttt\n\ +agatttcacaaataccaatgcggttaaaaacatccttgagtcgtacatacaccatactcg\n\ +cgttaaacggatataacagaagataataaatccggatgtggagtcggtgtaactatagaa\n\ +agccaagtgaaataatgcttaccagtcatttagctatacggctttcatttcatgtcaaga\n\ +gggtggagtttgacctgtacagttgatatatcaccgatacttagaactcacctaaagcta\n\ +aaattgctcgcagcgtgtaatccgcatattacaaacaatagatgggattcattatacata\n\ +agacacgatgatctgctttttcaggttgcgagatgttgcctatcgtcaatcgagtcctgc\n\ +cttacaccacttaaacaaaagtattgacagggaacctattttcgaggtattatatagtcc\n\ +agcttgaatatcaatttgacagttaacctagtgaaaatcagtaagaggaaatacgccaca\n\ +ttctccagtgaaattctacgggttatcgtctagtccaactatcaattataactcacgaga\n\ +tataagtaaattctcgtacttggcctgatttttattatactttggatccttagtaaacag\n\ +gaagggagaaaccttcaacgaaaaacactggattttgttttactctcaaagctcttatat\n\ +gacggaaataccctgtcaagtcttaactttattactagactaatgaaatgggcttggggt\n\ +ggccagaatcatagtacaatttagcggatacactattcggactttcctatcggctgtctg\n\ +gttggataagtatggggactaataggctagacatacctatacttaaactatacaggcgtc\n\ +atctatctctgcaactttggagttccctgatgttctcccgccctttgggttcacatcttc\n\ +tataccgacacccctaataacgattagtttgtgggttagagtaaattaatacggttaata\n\ +ttaatgtatcgttgaaaagctggtgtcgccaataaggtaaccggctaggcagagtatatg\n\ +tcacgaagtataactaccctaatgataagctgtaggaataaaattaatgctgtctctaag\n\ +cgaagagatatttccgactctgttttaatgacgaatctcattacttctgacttgcaaatg\n\ +ttcaatatggcacggtttcacggcacctttgtgacgcatataatgaacttagaagattat\n\ +aacgacggaactttatatgataatccgttacgattaaagaatctgttaaatatcataatg\n\ +gcattcagttctagaccgtgcatcatggtaaacttactttctctgcatggcgacatacat\n\ +ttcgctattcaaattcgcgtgtggttacacccactcgcacctttggaatattaagagaag\n\ +atgatcagaaaatccattcgctcaatttttctgacgtacgtctaatttatcctaggagac\n\ +aaatcgttttatgtctctcacatttttgaagaaaggttcgagagacaatactcaggtcct\n\ +gaactgctagaagatactcggtggagcgtggcaacaatgaaaaactcgtgacataaatga\n\ +atgatacttttccaagttcagttaagtgaatatgtttaacatacccggcttttcgatctt\n\ +aagctgacgctggacgtgcgagtaatgtcagtctcttacatacactagtgactccaagtt\n\ +tcgtcaaaaacgccccctcccttctcgagcccactcacgctatgtattgacgcgaacttg\n\ +ttcgggatcagacttttcaggagttcggtcgcgtgtccctatgtgctaatatataagtta\n\ +gatcgcattagatgctaatctgaatacttatagacgaccttcaacgagaacgggtaccac\n\ +cttgaggctagagttaggtgtgaaacgacaggtagggacatataaaatttgagtgcggct\n\ +ttagttaagggtttaattacctactcaaacatcacgctcgcgcccttcgtacgtaatcga\n\ +ccatctagaggctaaggggactgtactaggtagtgattaatgatatcctagacgcacgtg\n\ +ccttagatcttcagactctgatggtccgcgatcaccgtaattgtagtcctccaactcgat\n\ +cactttgttggcgtcaaagaaattacgatatctaaatacttataatacaataaccaagga\n\ +tgagaatgactcatcgcgttggagttatattgcttgaagttctatggaatgaaagcacgt\n\ +tatctgccgtcccaatatctccagtgagctaattcattggacggtccactttgatcaatc\n\ +cccgaggagatgttcggacactttagtctgtaacacttagcgttgagaccacgaacaatt\n\ +gattactcagtcttgaaggtgttttccaaagttcattttaaataagactacgataggcct\n\ +ttcctattgatataaactacccggctctgttgttcgtgtgagtcgtacttctctgtgttt\n\ +ttctgattatagcaagattcgattcttagtgtaaacagcgatttttatttgacccgtcaa\n\ +tgagaagcgcataggatctaagcaaaattatcaagttgtgccacaaggtaagatctttcc\n\ +agttattgcaggtaggatgtatcccacgttgatagtatgaggtctgacgtcaactgtcta\n\ +ggagagttgaccgcgtgcgggtacaccggatttgcatcgatgttgagaacgcagaactcc\n\ +cactgtcgtggcggcgttcctgatatttagcaagaggcgttgataaagccctcatcatct\n\ +agatctcgacctcatctgccctcttgctccatcattttctacacagactactttcctatc\n\ +tacgttagtataattgctttctatcttagtatcatttagagcttctccgtcaacaggttc\n\ +gtgctattaaagttagtacgaaagggacaacttgtagcaacgcatttaatcggttttcga\n\ +ctacttcgcacaaaatcagataaagaagtttgtcattctattagacattgaattgcgcaa\n\ +ttgacttgtaccacttatgatcgaacactgaatcaagactgtgattaactaaaatagaca\n\ +agccactatatcaactaataaaaacgcccctggtggtcgaacatagttgactacaggata\n\ +attaattggactggagccattacattctctacaatcgtatcacttcccaagtagacaact\n\ +ttgaccttgtagtttcatgtacaaaaaaatgctttcgcaggagcacattggtagttcaat\n\ +agtttcatgggaacctcttgagccgtcttctgtgggtgtgttcggatagtaggtactgat\n\ +aaagtcgtgtcgctttcgatgagagggaattcaccggaaaacaccttggttaacaggata\n\ +gtctatgtaaacttcgagacatgtttaagagttaccagcttaatccacggtgctctacta\n\ +gtatcatcagctgtcttgcctcgcctagaaatatgcattctatcgttatcctatcaacgg\n\ +ttgccgtactgagcagccttattgtggaagagtaatatataaatgtagtcttgtctttac\n\ +gaagcagacgtaagtaataatgacttggaataccaaaactaaacatagtggattatcata\n\ +ctcaagaactctccagataaataacagtttttacgatacgtcaccaatgagcttaaagat\n\ +taggatcctcaaaactgatacaaacgctaattcatttgttattggatccagtatcagtta\n\ +aactgaatggagtgaagattgtagaatgttgttctggcctcgcatggggtctaggtgata\n\ +tacaatttctcatacttacacggtagtggaaatctgattctagcttcgtagctgactata\n\ +ctcaaggaaccactgctcaaggtaggagactagttccgaccctacagtcaaagtggccga\n\ +agcttaaactatagactagttgttaaatgctgatttcaagatatcatctatatacagttt\n\ +ggacaattatgtgtgcgaaactaaaattcatgctattcagatggatttcacttatgcctt\n\ +agaaacagatattgcccgagctcaatcaacagttttagccggaaacaatcgaagcatagg\n\ +gacaatgtatcttttcctaaattgccatgtgcagatttctgagtgtcacgaagcgcataa\n\ +tagaatcttgtgttgcctcaactcgttgaaaagtttaaaacaatcgcagcagtctttttg\n\ +gggtctactgtgtgtttgcaaaataactgaaagaaacgcttgaacaactctgaagtagct\n\ +cgagtactcattaaagtgtaacacattagtgaatatcggccaatgaaccaaacgcttccc\n\ +ggtacgctatctctctcatcgggaggcgatgtgcaggttatctacgaaagcatcccttta\n\ +cgttgagagtgtcgatgcatgaacctcattgtaacaatagcccagcaaattctcatacgt\n\ +gcctcagggtccgggcgtactcctccatggaagggcgcgcatctagtgttataccaactc\n\ +gctttttaactactatgctgtagttctacaggcatagtggccagtattttctaacttctc\n\ +tggatagatgctctcactcctcatccatcacggcttcagtttacgtcttacttgcttgtt\n\ +cagcaacggatggaggcattaagtatcttcactgttccctaaaattgctgttcaatatca\n\ +aagtaaggacgatacagggaaagctcaagcacactcattgaatactgccccagttgcaac\n\ +ctcacttaatctgacaaaaataatgactactctaagtgttgcggaagcagtctcttccac\n\ +gagcttgtctgtatcacttcgtataggcatgtaactcgatagacacgaacaccgagtgag\n\ +aaactatattcttgcttccgtgtgtgtgacaccaggtaattgatgcggatataagctgga\n\ +gatcactcacgcccacacaaggcgctgctacctctttattccaatgtgtaagaatttgct\n\ +aacttcatttctagaccgcagctttgcggtcataatttcacggtacggacccttgggtta\n\ +gagacttgataacacacttcgcagtttccaccgcgcacatgttttagtggcttctaacat\n\ +agaatttttgttgtgacataaagagtgcgtgggagacttgcccgaccgttaagccataat\n\ +caattgaaagccccgtgagtcacatctaattggttgtactgcgcatttagctatccttta\n\ +gctgactcgaagagattcgattcctaatataggttaattagatggctgccgcgcgaagta\n\ +aaacgtgaaaaacgtagtgcgcagatctgcataactcgcgcttaattacttatgagtagt\n\ +tccaagttcgctacgttatgagagagattggaattaagcaaatatgttttatggtgattt\n\ +tgggatgagaaggactgctaagtacggctactaaacaaatttctaaaaccgccatctacc\n\ +ttatcttggagacatttaagttgtatatgtcactagtctagcttttgtctgtgggacgcg\n\ +ttctcggaatgagggaaatgcaagagccgattcatcaaatgcttatctaagaaagtagtg\n\ +gactattacaccaagcacgaatgccagggaactgctttcttgctcaggacctcgcgacaa\n\ +ggtaccccgcataagtcctagaattacatttggtcagcaatgctgacatttgaccgtgaa\n\ +aacataattttaatcagaaggcagctcacccgcttgctctagatcttatctttgtatgaa\n\ +tgtcagaatttactgcaatatccgttccgaatagtgagggcttagtatagttctctgtat\n\ +acaggtcacatcaaactccccctgtcctagtacagctctgagctttaattaattgcatac\n\ +atttccttcaatcatcagatgaaaacaccgcgaatcatgctcttctcgtatagggcaaga\n\ +gaagcaacaaacaactagcccgactcacgttcatccgccgtatccttgttcagttcttac\n\ +tccgtattaggtcagcgaaatctaatcagaataatcggtcgcgtatcaaaattaaaatcc\n\ +cgcttgaggttgacaattaaaacgctgagcagttatcggctattagatagtggggtgaaa\n\ +gtaattggctggaattatgttaaaacgtgatattaagctaaaatacgctacttgttgccg\n\ +acctaattcagtcattcgatattcagttagagccaagaataacaagcttgtataaattga\n\ +acggggtgcactaaacgatgtgttactctaatattcagcttggagtatacctgaaggcga\n\ +attcatgtatcggccaataataagacgttgaagatcacaatttggactagcaaaagaagg\n\ +tgatttatgcgtggggattgagtccactgtacgagtacggtctctggaaaattataggtt\n\ +cagggaatataaggaagtaaagataattaccaagagatttttggtatcgctatgacccag\n\ +aggtgttctaacgtctgttttgatccgcagaatttctgcctcaatgcatatttgacggac\n\ +ttgaactagagcctctaaagttaaatggcgacgcaactgttcctaaacttcaattattac\n\ +tactctttttttcctagggtattgtagaggccagtggacaaaataaatcaaatttaagat\n\ +gtttcggacattaacatcccccgtagcatagaaatcatcagttatccaatctctcatcga\n\ +gcttttacaatttctgctggcgctatggacagcatatgccgcgagacctccgcaagactc\n\ +acttgatcactgtaagtatcttcattagaggttagagcctatagttaagctgctgaccta\n\ +gtaaaattggtattttctaattttattgctcaagttaaaggttagtgaagggataatgac\n\ +gttatttttgaacaatgggttgtattcaattttatatcacgaatggaacccttcattccc\n\ +ggcataatactagacgacacgaacaagctccgatctatcagccaggcacgtgttaaggtt\n\ +taattccggcaaaccaatgaagcatcaaaaggtgacctgatgcaacttagggtcacgatg\n\ +agtttttcaggactacttattacctattaataagttaacatgagccttcataccccgtaa\n\ +gacaatacatactccaccaattagaattctgagccatcttatctttttgtatcatcgaag\n\ +ggtatggccgaataggttaattagttactcctaacgtctctacaggcatgcatttgacgc\n\ +accttcgaaaatagtcaatctctcgccacacgcgtctagtatgcagcatcaaaaatatag\n\ +tccacggtttccggattaccaaacgcggcaaagagaaacattgtatcgacggagataact\n\ +taatacagaaggaaggggcatcttcgaatacggatgaataattctatctgtttattctga\n\ +catcttgttttcaggttaatcttacgcattcaaatgacgcctgccccatgcgtgcgcaat\n\ +tattttctaatattgacgagagcaatctcactccttttgggtctatttatgttttattga\n\ +ggcacaagcctatacagaacaggtactattaaggccgtgagtgtgagactcaaaccgtgg\n\ +aaacaaaggatgggttgttcttggtacaagttttagtgcatgtgggcaatccttaccaaa\n\ +atcagatgctatccttaactttgggctgcatttaagatggcggttggaggcctgtgagaa\n\ +tcctgcgtgtcatctttaatgaccgaattcatccatgtagattcagatcacacactcatt\n\ +ccttgatgttgtctaaacaaaagttgttgtggacgcattggagggagttaagtaacaact\n\ +tgggatcgcatacttataaaaattatatgttaaactttcacaaacgctgaagtccaaagt\n\ +aactagcccaaacgcctcgagagtcactaggtattaatggtgtttgagttcctgtgaaat\n\ +agtgttcgaaggtaaaatttatgtaccaaatcgaaagaacacttaataaggcttgcttgc\n\ +acggaggtatgatgtttactgactctacaaccctaattttccagtacgtacattcattcc\n\ +aataggttagttctcaaagtgctatacaggctcctcaattgatgatatgcttcagccgct\n\ +ctatggatattagctcattttatttaggaagcccgcttagaggcttactatgagggaaat\n\ +gccaaaatgtcatacttttcggtgtgtcccatatgacaccgctttacatagaatttgaat\n\ +taaaacgcgctctcccgttcactaccatacttggtaccgtgcgcatattacatatagata\n\ +taggatcattttttaaagctgtactaggtttgatcgacaatcttatgctatactatatga\n\ +tgtaaccctcataatcaataccgatcgtacgatcctagcataggtggcaagcgattttat\n\ +gccgattattgtgttaaatagtctgtgagtgtgattatcagggctacgttggtagagggg\n\ +ttgtatagacctcgcacacattgtgacatacttaacaatatacgaaaactgatataataa\n\ +atccccttacccaaacaccaatcccgttgaatcaactaccataacgtctcccatataaat\n\ +tgcctacttgtttgcataaatctgaatacataacaccattgcaccttcttgtgttccaat\n\ +cccgttaagattgccttgtcagatgatatgcaagaacaatagcatttgctagcaattatt\n\ +aacagctcttcgaattgcctccacataacgcgggagggtatattttaatttggcaaatac\n\ +taagtactgttggcgtcatatgctattaacggttggatattaagttatgtcagccgtaag\n\ +caagagtgggcgaaatattttgttacccagtgagagcactcttagagtttggatacaata\n\ +ggccatatgttgacttaagaggacgtaactacgccgtacaccattgttcaaccgacttct\n\ +tggcaaatagaatcgtattagcaatcttaagaatagagacacgttcgtgttagggtatac\n\ +tacaaatccgaaaatcttaagaggatcacctaaactgaaatttatacatatttcaacgtg\n\ +gatagatttaacataattcagccacctccaacctgggagtaattttcagtagatttacta\n\ +gatgattagtggcccaacgcacttgactatataagatctggggatcctaacctgacctat\n\ +gagacaaaattggaaacgttaacagcccttatgtgtacaaagaaaagtaagttgttgctg\n\ +ttcaacagatgatagtcatgacgcgtaacttcactatagtaaattgaaacaaatacgcaa\n\ +tttagacagaatggtacggtcatgaatgacagtaattcgaagtgctagaccaacttaaaa\n\ +taggtaaacgtgcccgaaaccccccttaacagaaagctgctatcatggtgcagtatcgac\n\ +gtgttcagaaacttgtaacttttgagcaggtccgagcacatggaagtatatcacgtgttt\n\ +ctgaaccggcttatccctaagatatatccgtcgcaaactttcgatttagtcccacgtaga\n\ +gcccaagcgttgtgcgactccacgtgcatgcccagaaatacgagtttaaatttggttaca\n\ +tggttaattttgaccgaagcatcgcactttatgattgataattggattcaatatgtcgcc\n\ +ctatgcgaatgcaacatgatccacaatttggctataagacgtttaatccgtatcacactt\n\ +tgtttgcggctagtatagtaacgcccgtgcaccaagagtcagtaacaattataagtactc\n\ +cgcaggtacttcaaatataaaaactaatcaaacacgacccatatgatcatctgaagatat\n\ +ttggaactttctcgacaaccaccctcgtactcaatacttacactaatcgacaggcacacg\n\ +caacgtgtacagtcgcaccatattgagtcaagatttgcttagtggcgatgagcgtacacg\n\ +cttatttctctagtcacaattagttatctacgagacatcacgagggagcaaataagcgat\n\ +gttatggctacacataggcacgtatgaatatgatataagccagttaaacagtcgaaccat\n\ +cgagcaaattctcatgcaccaacccacacgttgaggcacaaagagtaagctgtttgaatg\n\ +taacttcttctgctgagcgggccccaacgtaaggatcaactagaagagaaaactcggtat\n\ +tagtttaaatgcgtcacggagcatgagtgcatttcactaagaatgtctgtgtaaccaata\n\ +taacatctatttgttatctgattgcctacttatggctttgcggtcgtggcgactaatgtc\n\ +tccaatccttttgaggtcggtaccaactccctttaaattacgctgtgcaggctcatgcac\n\ +tgcatacatatacggtagcaggtagggacctcacgcacccttattataatcaatagtagt\n\ +tatcagtcaacgaggcaggaatgctgaggtcgaggtgttggtatattttctatgtgccgt\n\ +ctaggcgactatcacgcattaccaggcgagatttaagccaattttgaatatagtcaacgt\n\ +aatttttactatgggttccaccgaaacgccttgcacaactaagaatcccataaaatatcg\n\ +atatcaaataaaagattgtgtcaataccttcatatatattttttcggttgactaacgtga\n\ +actaaggttaggggttttgtatgtctatataggaaacagtttcttttctgtcctacttta\n\ +gtaaagtcttcaagccttactccaaaatcacggtgattaagccgttactcagcagcatga\n\ +ttctgcctgctcgggtcctaaaatccagccttgtaagagtcgctgtgtattagctaggga\n\ +gacctttgttaaaaaggatatatcgcggcgggatgtgagtgcgtggcgcatactcaatct\n\ +tcagctcgtgtcattataatatctctcccccacgcttttcactagatatgccgtgtaagc\n\ +aaacaccttatgcttaatttcgaaaatattggtacttgaaaaaagctgtaggggtactta\n\ +atgtctggtaggagatcaggagagaattgagtgtaaaaccgtaaagccctcacctgactt\n\ +catgtaaatggcttagaagactccatgatttaataaatactacgaaggaaagactggatc\n\ +taaagataactctagtaaggccaactcccttcaatgctgttgccagttataatccaagag\n\ +ctgtccttttctgaaccatagcggcttctgaagcgaactagaagcaaagttggttctagc\n\ +cagacagccacataccctgtacgggtgtattactaaaactggtccggtattagttcacca\n\ +agggaggaattaggcaaaggatctaggtatgcaagtcggagtattacatccctaccctga\n\ +atccatcaataggttcctctgtactggccttcgcaatgagtattcaaggttgtacagccg\n\ +tataataataagatagtgactatgaacgggaagtaacccgctcaccttccccaaaacatt\n\ +gttatatctaagtattaaagtctgccgtagtgttaatactcgaaaataaacaactggcaa\n\ +attacaccgcacttaagccgcttttgatttatatttttccaatgcgcttttaaaaataat\n\ +tcagtcctacatactaattaagacccttaaacggagatatcacaagttaagttttaacca\n\ +tctcgactaggtggaactatagatacccaactcaatttatcattacctgtaatgttccta\n\ +gaaggattgcatttcatgtcaagacggtggagtttcacagcgaaacttcagtgtgaacag\n\ +attctgagaaatcacctaaacctattagtcagagcacccggttagaaccagttgtcaaaa\n\ +aatagagcggttgcatgagacagaagtaacgatgagatccgttgtaacgttgagacatct\n\ +ggcctatcgtcaatacagtcctcccttaaaaatatttttaaatactaggcaaacccaaca\n\ +taggttagtcctatgtgatacgccacatggtatatcattttgtaacgttacctagggata\n\ +atcaggaagtggaattacgcaaaagtagacagtgaaatgcttagggttatagtctagtcc\n\ +aaagataaaggataaagcacgtcagagaactatattagccgaatgggaatcattgttagg\n\ +agactgtggatcatgtctaaaaagcaacgcagaaacagtcatcgaaaaaatctcgttttt\n\ +gtttgaatctaaaagagctttgatgaccgatagtacctgtatactagttactgtattacg\n\ +tgtctaatgatttcggattggggtccccagaatcagacgtcattgtagacgattcaagtt\n\ +taccaatttaatttcccagctctccttggagaactatcgccaataattgcagtcactttc\n\ +cttttctgaaacgataaagccgtcagagttctctgcaacgttggacttacctgaggttct\n\ +aacccactttcggttctaatagtagttaacgacacaacgaataacctttactgtggggct\n\ +ttcacgatattttttcgcttattattaatggttacgtcataagctggtgtccaaattaag\n\ +gttaccggcttcgcagagtagttgtatccaagtataacttccctaatcataagatcgagg\n\ +tagaaaattaatgctgtctctaaccgaacagatatgtcccactatgtggtatggacgttg\n\ +ctaattacttctgaagggaaattggtcattatggatacgtgtctaccatcaggtcggacg\n\ +cagatatggttctgtcttcagttgatccaccgttctttataggataataactgacgatta\n\ +aagattatggtaaatagattaagccaattctcttcttgtcagtgaagcatccttaactga\n\ +cttgctctgcagcccctcatacatttagctattcaaagtaccggctcgtttcaaactctc\n\ +ccacctttggaagaggttgtcaacttgataagtatatcatttacagcattttttcggacg\n\ +tacctctaatgtttcattgcagaaaattagttttttctatcgcacattttgcaagtaacg\n\ +ttagagacacaattatctgcgaatgaactgctagatctgacgaccgggagcctcgcaaat\n\ +atcaaaaaagactgacatatatcaaggagtcgttgacaagtgctggtaagtcaattggtt\n\ +tatctgtcccggcgtttcgatcttaagctgaccatgcacggcagagtaatgtcactctcg\n\ +ttcttacaagtctgtctccaagggtcggcaaaaaagacccctccattctcgagcccactc\n\ +acgatatgtagggacgacaacttgtgcggcttatgaattgtctggactgcgggcgagggt\n\ +ccatatctccgaagttagaagggacatacctttagatgataagatcaattcttattgacg\n\ +aaattcatccacaacggggaacaacttcaccctagacttacgtctgaaaagacacctagc\n\ +gtcttataaaaggtcagtgccccgtttcgtaaggctggaattacctacgcaaacttaaac\n\ +ctcgcgcccttccttacgtatcgacaagatagaggctatcgcgaatgtactacggaggca\n\ +tgaatcatatactagaaccaagtgcctgtgatattaacaagatgatccgacgcgagcacc\n\ +gtaattctaggcataaaactccagcaatttgggggccgaaaacaaatgacgttagctaat\n\ +taattatatgacatgatcaaaggaggtcaatcacgcatcgagttcgacgtatattcattg\n\ +aacttcgtgcgtttgaaagaaacttttatgaaggcaaaattgatcctgtctcctatttca\n\ +tgcgtacctcctagttgataattccccgagcagtggttaggacacttttgtcggtatcaa\n\ +gttccggtctcaaaacgtaaaattctgtaatctgtatggatggtctgtgaattagttaat\n\ +ttttatgaagtcgtcgagacgcagttcctattgatttattctaaacggagatgtgcttcg\n\ +tgggactcggaagtagatctgtgtttatgattattgctactttagatgctgactgttaac\n\ +tccgtgttgtttttcaaccgtatatcacaaccgaattggatagaacctatagtttcaagt\n\ +tctgccacaaggtatcatatttacagttagtgctggttgcttctttcaaacgtggtgagt\n\ +ttgtgctatcacgtcaacggtagagctcagtggaccgagtgcgcgttcaaccctgttcca\n\ +gagagggtgtgatagcacatataccacgctcgtcgaggcgttcatgatagtttgcaagag\n\ +ccggtgttaaacacatattattattgttatccaactaatcggacctatgcataaagcatt\n\ +gtctaaacagaataattgcctatatacggtagttttagtgatttatatcttagtatcagt\n\ +tagagcttcgaactcttcaggttcctcatatttaacgttcttcgaaagcgaaaacttcta\n\ +caaacgaatgtaagcggttttccaagtagtacctataaatcacagaaagatctgtctcag\n\ +tatagttgaaatggtattcagctagtgacgtgtaccaattatcatagttcactcaagcaa\n\ +gacgctcattaacgaatatagacaagacactatatcatataataaaaaagaacatggtgc\n\ +tcgaacatagttgaattcaccatattgaaggggaatgctgacatgtaattcgctactaga\n\ +cgatcaattccctacttgtcaaagttgaactggtacgttcttggaattaaatatgattgc\n\ +gctggaccaaattgcgacttcttgagtttcagggcaaacgattgagccggaggatgtccg\n\ +tctcttacctttcttgcttatgataaacgacggtccctgtacatcactgggaattctcag\n\ +caaaaataattgggtaaatcgagactcgatgtattcggccacaaaggtgttagacgttaa\n\ +agattattcaacggggcgataataggatcataaccggtatgcaagcgcattgaaagagcc\n\ +atgagatccttatccgataaacgctgcacggtatgtgcagccttattgtcgatcacgaat\n\ +ttataaatgtagtctgggctgtaagttgaagacctaagttataatgaagtgcaataccaa\n\ +atcgattcatagtggattatcagactcaagatatctcctgataaattacagttgttaaga\n\ +tacggataaaatgagatttaagattagcagcctctaatctgtttcaatcccgttggaatg\n\ +tggtatgcgatcaaggttaagttaaaatcaagcctgtcttcagtcttgattcttgttctg\n\ +ccatcgcatgcggtctacgtgagttaatatgtagcttacgttctagcttgtgctaatctg\n\ +agtatagattcgtagaggaatattatcaagcttccacgcctcaacgtacgtgtattggtc\n\ +acacaagacactaaaagtggaagtagcgtaaactatagtctagttgttaaatgctcagtt\n\ +cttgttatattcgatatactcttggctaatttatgtctgagtatataaaattaatgatat\n\ +taacttgcatttcacggatcccttagaaaaagattttgaccgagcgcattataaacggtt\n\ +acaccgaatcaatagaagcatacccaatagctttctttgaatttattgcctgcgcaactt\n\ +ggctgactctctagatccgaataattctatatggtcgtgacgaaactagttcattactgt\n\ +ttaaaatgccaacatgtcttttgggccgataatggctctttgcaaaattactcaatgata\n\ +cgattgatcaaagcggtagttgctagtggtagcatgtaagtctatcaaatgtctgattat\n\ +ccgaaaatcttccaaaagagtccacgtaccatatctatctcatagcgacgcgaggggaac\n\ +cttatctaactatcattccatttaccgggtgactctcgatgcaggatccgattgggataa\n\ +attgcccagaaatggctcattcctgactaagggtaaggccgttctcagcaagggaacccc\n\ +gcgaatctaggcttataccatctagattgttaactacttgcctgtagttctacagccata\n\ +ctggacagttgtttctaaatgatcgggattcatgctagcactcctctgaatgcaccgcgt\n\ +aagtttaactattacgtccgtgggcagataaggatggaggctgtatgtatcttaactgtt\n\ +acctaatatggctggtaattatcaaagtaaggaccttaatgccatagcgctagcaatcgc\n\ +tttgtatactgaccatgtgccaacctctcttaatctgtaaaatataatgtcttagctaac\n\ +tgtggacgatcatgtctctgcctagagcttcgctgtatcaattcctatagccagcgtact\n\ +agtgacacaacaacaccgtgtgagaaaagatattagtccttacgtctgtctctctacagc\n\ +ttattgatgaggattgaacatggacatatagctccccctcaaaagcagatgctacctctt\n\ +tattccattctcgaacatttgccgaacttaatttcgacaaacctgaggtcacgtcttaat\n\ +ttatcggtaacgtcacgtccctttgagactggataaatatattaccaggggccaacgagc\n\ +aattgttggaggcgcttctataatacaaggtgtcttgtcaaagaaagacggcgtgcgtct\n\ +cgtgcaactcacttaaccaatattaatgtgaaacccccctctctcacatcttatgcggtg\n\ +tactgccctggtacatttcctgtacaggactccaacagtgtagattcctaagatagctgt\n\ +tggagttgcctcacgccagatcgaaaaactgaataaactagtgagctgagctgcagaaat\n\ +accgcttaattacttatgactagttcaaagggacctacgtgatgtcagacattgcaagga\n\ +agaaattaggtttgtgcgtcattttggctggactagcactccttacttcccctactattc\n\ +aaatgtcgtaaacagcatgagacaggatcgtgctgacatttaaggtctattgggaacgag\n\ +gctacctttggtcgcgcgctcgcgttctccgaatgaccgaaatgcatgagcacagtatgc\n\ +aattgcttatagatctaaggtctggtcgttgaaaccaagcacgtaggcctgggaaatcag\n\ +ttcttcctcagcaactacacaaaagcgtccaagcattagtacttgtagtaaatgtccgaa\n\ +cctatgcgctcatttgaaagtcaaaaaatatttttaagcagtaggcacctaacccgattc\n\ +ctctacttagtagctttctttgattctcagaattgactgcaatatcactgcacaattctg\n\ +tgccattactagacttctctgtattaacgtctcatcttactaacactcgcctaggacaca\n\ +tctgagagtgaagtatttcaatacatttactgaaatcttcagttctaaaatccccgaata\n\ +aggctcttatcggtttggccaacacaagaaaaaaacttcttgcaccactcaccttcatac\n\ +gcaggagcctggggaacttagtaataactatttcggcagacaaagcttataacaagttgc\n\ +cggcgcgtataatatttaaaagaccccttgagctgctcaattaaaacgctcacctggtat\n\ +aggctattagatagtgccgtcttagtaaggggcgggaattatcggataaactgatatttt\n\ +gataaaataaccgacttgttcacgacataagtcactaaggagattttatctttctccaaa\n\ +gtatatcttccttggataatttcaaagcgctgcaatttaagttctgttactagtttatgc\n\ +tgctgggaggtgaccggaaggcgtagtaatctagaggcaaattataagaagttcatcata\n\ +tcattttcgactacaaaaacaaggtgttgtatgccggcgcattgtgtaaactggacgagt\n\ +accctagatggaaaattatacgttaagccaagatttcgatgtaatgataattacctacac\n\ +atttttgctatccataggaacaagagctgttctataggctcgtggcatacgaacatttgc\n\ +tgccgctatgaatattggaagctcttcaactacagactctattcttaattgccgtcgaaa\n\ +atgggccgaatcggctattattaatactcggtttttccgaggggattgttgtcgacagtc\n\ +gtaattattattaatattgatgttggtgaggtcatttaaatacaaccttgcagacaatga\n\ +ataagggatccaatctctcatactccttttacaattgctcatgcccctatgcaaacctta\n\ +tgccgccacacctccgcaactctctcttctgaactgtaagtagcttcattactggtttga\n\ +gactatactgaagctgatgacattctaaaatggctattttcgaatgtgattcataatgtt\n\ +tatcgtttgggatggcagaatcacgttatttttgatatagcccgggtattctattgtata\n\ +gaacgtatgctacaagtcattccccgaagaagactagaagtaaacaacatgcgaccatcg\n\ +ttaagccacgcaaggctgtagctttatttcccgataacctatcttccataaatagcggac\n\ +agcaggatactgacgctcaacatcagtggttatggtctaatttttaacttttaataaggt\n\ +aacttcagcaggcatacacagtaactctttaatttataatcaaattagaagtctgacact\n\ +tcttatatttttctatcatccaacgcgatcgcccattagcttattgtgttactaataacg\n\ +tatctaaaccaatccttttcaagctactgcctatattgtcaatatatacaaacaacagga\n\ +tagtaggctgcttaaaaaatattgtcaaccgtgtacgctttacaatacccggaaatcaca\n\ +aactttgtagacaacgagtgaaatttatacactacgaagggccagcgtacaagacccatg\n\ +aattaggcgatatgtttattctgacatattggtttatccttaatctgtcgctgtaaaatg\n\ +aagccgcccccatccctgcgaattttttttcgaagattcacgactgaaatataaatacgt\n\ +ttggctatatttatgttggagggaggcaatagcctttactgttaaccgaagatttagcca\n\ +gtgagtgtgacactaaaacactggaataaatgcaggcgttcttctgggtaaaaggtttag\n\ +tcaatctcgcctataagttcatatagctctggatataattatctggcccatgcatttatc\n\ +atggcgcttggtgccctgtgtgaagccggcctctcatattgaaggtccgaagtattccat\n\ +gtacattaagatcactctctcattcatgcatcttggcttaacaaatctggttgtccaagc\n\ +tttccaggcacgtatggtacaaattcggatcgaatacttataaaaatgatatgttaaact\n\ +gtctaaaacgctcatctacaaagtaaagtgcactaaccaatagagtctcaagaccgtgta\n\ +atgctggtgcactgaatgtgtaatacggttagaagggattagttatgttacaaatccatt\n\ +gaaaacttaagaagcattgcgtgctcggagggtgcatcttttatcaagagactaacatta\n\ +ttttcaacgacgtacatgctttacaatagggtacttatcaaacgccgagaaacgcgccta\n\ +tagtgatgttatgattatgacccgatatccattggaccgaattttatgtaggttcccagc\n\ +gtactcgcgtaatatctcggtattgccataatgtaatacttgtcggtctctcccagatga\n\ +aaaagcgttacagagtatttcaatgaaaaacagcgcgcaacgtcaatacctttaggggta\n\ +acggccgctgatttcatatagatatacgataagttggtatagctctactaggtggcatcc\n\ +acaatcgttgcatttactatagctggttacaatcataatctataccgttccttacatact\n\ +accatagcgggatagcgtttttttgccgttgattgggtttaagaggatgtcagtctcatt\n\ +atatccgattcggtgggagagccgttgttttcaaatcgcacactttgtgacataatgtac\n\ +aagataacaaaactgatataagatataaactgtcaatatcaccttgacacttgaatcaaa\n\ +gtaaattaactcgcaaatataatttgactaattgggtgcagatttctcaattaataaaaa\n\ +aatggcaccggatgggcttacaagccccttatcattcacttgtatcatgatttccaagaa\n\ +caatagaatttgctagcaagtatgaacagagattcgaattgcatccacagtacgccggag\n\ +cgtttattttaatgtggatatgacgatgtactgttggcggcatttgctagtaaccggtcc\n\ +ttatttacgtagcgcacacgtaagcatgtctgggagaaatatggtggtacaatctcagag\n\ +aaagattacagtttggtttaaataggacttatcgggtcggaagtggaacttaataagcag\n\ +tacacaattgggcaacagacgtcttgcctattacaataggattacaatgcgttagatttc\n\ +agacacgttcgtgtttggctattcgtcaattccctaaatagttagacgatcaactattat\n\ +caaagtgattctttgttcatcctccattcatgtaacagatggcacactacgcataacgcc\n\ +gaggaattttaacgagatttaagagagcagttcgggcacaacccacttgactttataaca\n\ +gctcggcagcataaacggtaatatgtgacaaatttccaaacgttataagaacgtatgtgt\n\ +acttagaaaactaagtggttcatgttcaacagatgtgacgcagcaagcctaacttatcta\n\ +ttggttttgctataaaagaacaaagttacacagaatcctaagggcttgtttcacacttat\n\ +gcctagtgcttcaccatcttaaaatagcgaaaccggcacgaatcaaaccttaaaacaatg\n\ +cgcagatattggtgatggtgactccgggtatgataatggtaactgttgaccagcgcccac\n\ +ctcatcgaagtatagaaagtggttaggataaggatgagaccgaacttatttccggccata\n\ +actttagattttctacctagtacacaacatcagggcggacacgaaaccgccatcacatca\n\ +tataccaggtttaatttgcttaatgggggaagtgtcaacgaaccttcgaactttagcagg\n\ +catatggccattatatatggccccagagcagaatgctacagcagacaaaatttggattta\n\ +tgtagtttaatacctatcaaacttggtgtgaccatacttgtctaacgacagtgcacaaag\n\ +tgtaagttacaattattactactcagcagcttctgcaatgataaaatcttatcatacacg\n\ +tcacatatgataatatctacttagggggaacgggctccacaacctacatagtactcaata\n\ +cttacactattcgacaggcacaccaaacctgtacagtcccaaaagattgagtcaactttg\n\ +cagtactgcagatcacagtaatagcttagttagcgagtcaaaattagttttctacgagac\n\ +tgcacgaccgtgcaaatttccgatgtgttggctacaaatagcaacgtatgaatttgtttg\n\ +aagccacgtaaactgtacaaccttagagataagtctcaggctactaaaaacacgttgtgg\n\ +cactaacaggatcatggttgattcttacttattcggctgaccggcccaataagtaacctt\n\ +caactagaacagaataatcgggagtagtttaattcagtcaaggtgcaggtctcattgtaa\n\ +ctaacaagctctgtgtaaccaagttaaaatcgttttcttagcggattccctacttatgga\n\ +tttgagctcgtccacaatattcgatacaagaagtttgtggtccgtaacaacgaaatttta\n\ +attacgctgtgcagcctcatccaaggaattaatagaaggttgatggtaggctccgaacgc\n\ +tccatgattataatcaagtggactgtgcagtaaacgaggaaggtatcctgacgtcgtggt\n\ +gttcgtttttgttatttgtgccctatacgagtagataaaccatgaacagcacagtgtgaa\n\ +cccatggttgattttaggctaccttatttttaatttccgttacacagaaacgaattccac\n\ +aactaacatgccattaatttttcgatatcttataaaagatggtcgaaattcattcattta\n\ +ttttttttcggttctcgaaagtcaactaagctgtcgcgttttgtttctctttagaggtaa\n\ +aagtggctttgatctcctacgtttggatactagtcaaccattactccatttgatccgtga\n\ +gtatcacctgtctaacatccagcattatgactcctcggcgaagaaaagacacacttctta\n\ +gagtcgatgtgtattagctagggacacagttgtttaatacgatagtgagcccagggaggg\n\ +cagtgcgtcccccagtagatttattcagctagtgtaagtataagatatctcacccacgag\n\ +gttcaagtgatatgcagtcttagaataatacttatcctgaatttcgatattatgggtact\n\ +tcaataatccgctagcgctactttatgtctcgttggacagcaggacacatggcagtctta\n\ +aacactaaagacatcacctgaatgaatgtaatgggattacaagaatcaatgaggtattat\n\ +atacgacgtaggaaactctggatatatacagtaatctagttacgccatcgcacttcattc\n\ +ctctggaaacttagaagacatcagctgtacgtggaggaaccagacccccgtatgtagcca\n\ +aatagaaccaaagttgcttatacaaacacacccaatgacaatggaccgctggagttcgta\n\ +aactcggaacgtagtactgcacaaacccagcatttagcaataggagctacgtatgcaact\n\ +cccacgtggtaataccttcaagctatcaatatataggtgcctagctaatcgcattcgcaa\n\ +gcagtattcaagcttgtaaaccagtataataattacagaggctctatgaaacccaacttt\n\ +ccagctaaaagtcccaattaaatggttatttcgtacttttaaagtcgcccgttctgttat\n\ +tacgcgaattgattctactccaaaattaaacacaaattatcaaccgtttcatttatattt\n\ +gtcaatgcagctgtttaaaataaggctctactaaattataattaagacacttattaccag\n\ +atttctctagttaagtttgaaccagctcgactaccgcgaaagatacattcccttctctat\n\ +ttttcagttcatctatgggtcagagaagcattgaatttattctattcaccctcgtcgttc\n\ +acagcgaatcgtcagtgtgatcagtgtatgagaaatatcctaaaccgtttagtcagacca\n\ +cacgcttagaacaagtggtctaaaaagactgccctggaaggagtaagaagtatacagctg\n\ +atccggtgtatccttcagtcatctgccctatactaattacacgacgcaaggaaaaatagg\n\ +tttattttctaggcaaacccttcataggtgactccgatgtgttacgaatcatgcttgaga\n\ +atgtgctatcgttaccgacggataataacgatctccaatgaaccaaatgtagaatgtcta\n\ +ttgattacccttttactattcgacttagagataggagatagaacctcagtgtactttttt\n\ +agccgaatgggaatctttgggaggtgaatggccataaggtcgtaaatccaaccctcttaa\n\ +agtcttccatattatatcgttgttcgtggaatcgataacagatttgttgacccatagtaa\n\ +atgtatactagtttatgttgtaagtgtagattgttttccgattgccgtccaaactttatg\n\ +tcgtaattgtagaccagtaaagttgaccaaggtaagtgcccagcgatcctgcgagatcga\n\ +tcgccaatttttccagtcactgtaagtgtaggtttagataaagccgtatgagttatatca\n\ +taagggcctcggaaagcagcttcgaaccaaagttcccttataatagtagtttaactataa\n\ +aagtatatactggtctgtcgccctttcacgatttgttttaccggtttatgaagcgttacg\n\ +tcattagagcggctccaatttaaggttaacggcttccatgtgtagttgtatacaaggata\n\ +acttaaagtatctgttcagcgagctagttaagttatcctcgatagaacacaactcagagg\n\ +tcccaagatcgggtttgcaacttgctaatttattctcaaggcaaattgggaattatcgat\n\ +acctgtataccataaggtcgctcgatgtgatgcttatgtcttctggtgatcctaccttag\n\ +ttagtgctgattaacggaacattaatgtttatcgttttgagatttagccaattctctgat\n\ +tctaactcaagatgccttatctgacgtgctatgcagcccctaagtattttacattgtaat\n\ +aggacacgctcctttaaaactcgccaaaaggtcgttgtggttctctactggttaactata\n\ +taatttacagctttgttgagctagttcctctttggtttaagtcctcaatattagttggtt\n\ +cgagcgataagttggctagttaccttagtcactatattagatccgaatgttatgcttcat\n\ +ctgaagaccgccaccctccaaaatttcttttaagactcacttattgcaaggtgtaggtga\n\ +attcggctcgtttctcaagtggtgtatctgtacacgagtttccatattttcatcaacagc\n\ +caccgcacacttatgtcactctaggtattaaaagtcgctctacaaggggacgcaattaag\n\ +aaacagacatgctagtcaaaaataaacatagcgaggcaccactaattcggccgcttatca\n\ +atgggatgctctgcgcgagacgcgccagagctcagtagttagttcggacatacatttact\n\ +tcagatgatcaattagttttctacaaatgcttactctaccccgaaaaaagtcaccagact\n\ +cttacgtctctttagtatccttccgtcttatataaggtcagtcccccgtttcggtaccct\n\ +ggaatttactaagaataatgaaacagcccccaaggacgtacgtttacaaatgatagacca\n\ +gatcgcctagcttattccgacgcatgttgcatagaattgaaccaacggaatgtgagagta\n\ +actagatgagccgaccacagcacccgtttgcgtcgcagaatacgcctgatagttcggcca\n\ +cgaaatcatatgtcctttgagtattaagtatttgtaatgatcaatcgagctcaagcaagc\n\ +ttacacttcctcggatattcagggaacttagtgcctttgaaagatacgttgatcaacgaa\n\ +aaattgataatggctcatatggaatgcctacctcatagtgctgaattaacacagcactgc\n\ +ggacctaacttttcgaggtttcaagttcacgtctcaaaacctaataggctggaatatgta\n\ +gggatcctcggtgaatttgtgattgggtttgttgtagtactgaccaagtgaatattcttt\n\ +ttttctaaaagcagatctgctgccgggcactacgaaggagatctctgtgtatcattattg\n\ +cttcttgacatgatgactcttaaatcactgtgggtgtgcaaaacgatagcacaacccaat\n\ +tcgatagtacatattgttgatacttcgcactaaaccgttcatatttaaaggttgtgctcc\n\ +ttccttcgttaaatactggtgacttggtcctatctactattagctagacctctggggaac\n\ +cacgcccccgtaaaacctgtgcaagagagggggtcatacatcttagacatcgcgcctcca\n\ +ccagggaagcattgggtgattgaccaggtgtgtaacaaatatgattattcttatactaat\n\ +attagcaaagatgcataatgatttgtattaaatgtataattgaattgataagggtctttt\n\ +agtcagtgatagagtagtataaggtagacattagaactcttaaccggacgcagatttttc\n\ +ggtcttagtaagccaattagtcgacaaaacaaggtaagagcggttactagtagtacctat\n\ +aatgcactgaatcttcggtcgaagtatagttctaatgctatgcagattgtgacggcgaca\n\ +aatgttcagacttatatcatgaaacaagctcttgtaagtattgacaaatgaaaagattga\n\ +atatttttaaatacaaaatgcgcctacttattaggggaattaaccagattgaaggccaat\n\ +cctcacatgtaatgagataatagacgataaatgaaattcttgtaatagttgaactgctac\n\ +gtgatgggtattatatatgattgagatcctccaattgccgacgtcttgtcttgatgccca\n\ +aaagattgtcaacgaggagctccctcgcgtacctgtcgtccgtatcataaacgacgcgac\n\ +atgtacagcactccgaagtataagcaataataatgcgggtaatccagactagatcttttc\n\ +ggactcaatgcggtttcacggtaaacatgattaataccggagagtagtcgagcttatcag\n\ +cgatgcaagcgaattcattgtgccaggagatacgttgcagataaaaccggcaacgtatgt\n\ +caacaagttttggcgatctcgttgtttgtattcgacgaggcgcgggaacttcaagaacta\n\ +tcgtatattcaagtccattaccttttagtttcagactggtggagctgactaaagttatat\n\ +catcattttgtacactggtttagttaacgataatttcagatttaacatgaccagacgata\n\ +atcgctgtatatccagttggaatgtggtttgccagaaaggttaacttataatcaagcctc\n\ +tcttcagtcttgattcgtcgtatcccatccattgcgctatacctcagtgtatttggagct\n\ +gtagttataccgtgtgctaagatcagtagacatgacgagagcaatattatctaccttaca\n\ +agcatcaacggacgtctagtcggaacaaaagactctaaaactcgaacttcaggttaatat\n\ +actatagttctgtattcagcagttattcttatattcgatattatcttgcctattggatgt\n\ +ctgactttagtatattaatcatagtatctgccatgtaaaggtgccagtactaaatctgtt\n\ +tcacagtgcgaattataaacggttacaaccattaaagacaacaagaccctatagctttat\n\ +ttgaattttgtcaatgcgcaacttggagctcgcgatacatcccaattagtctatagggtc\n\ +gggacgattctacggcatttctggttataatgacaacatggattgtggcccgagaatcgc\n\ +tctttcattaattaagcaatcattacagtcttataagcgctacttccgagtggtagcagg\n\ +taactcgatataaggtcgcatgagccgaatagcttaaaaaacaggccaccgaacattgat\n\ +agagaataccgaccacagcgcaacctttgattactttcattaaattgtacggctcactcg\n\ +acatcaagcttaagattgcgataatgtgaactcaaatggatcagtactgaagaaccgtaa\n\ +cccacttcgcagaaagcgtacccagagaagatacgctgttacaatatacagggtgaaatt\n\ +attgcctgttcttcgtaaccatttcgccaaacttggttagaaatgatagccattcatgat\n\ +agaaataagctgaatgataccagtatctttaactatgtagtcagggggaagataacgatg\n\ +gtccatgtatgtttctgatatgtgacagtattggccgcgtaatttgctaacgaagctact\n\ +taatgcctttgagcttcatatagatttctttaatcaaaatcggcaaaaagatagtatgag\n\ +ctataatatatgctagtagagaactctggaccatcatctatatgaatactgattcgagcg\n\ +tgcaattactttagcctgcgtactactgactctacaaaacactctgagataagtttgtag\n\ +tcagtaagtcgctctctataaaccttttggatgaccattgtacagccacttatagatccc\n\ +aataaatagcacaggagacagagtttttcaatgctcgatcatttgccgatagtattttcg\n\ +tctaacctcagggcacctattatttgatacctaacctaacggccctttcacaatggagaa\n\ +atatatgacatcgggacaaacacaaatggtgggtggccaggagatatgacatggtggcgt\n\ +ctctaagaaacacggactccctctaggcaaactcacgtaaccaattttaatgtcaaacaa\n\ +aacgctcgaaaagattttgccgtgtaatgacctggtacattgactggtcaggaatacatc\n\ +actgtagttgccgtagtgtcctgttggtgttccatcaagacacatcgtataacgcaattt\n\ +acgacggacatcagatcaagttatacagattatttaagtatcacgtgtgcattgggacat\n\ +aagggatctcacacatgccttggaacatttttgctttgtgccgctttttcgctgcactac\n\ +caatccttacttaccagtatattcaaaggtcgttaacagaatgagaaaggttagggctct\n\ +aagttatcgtcgattgggatagacgagacatttgcgagcgccctccacggatacgaatct\n\ +cccatatcaatgtgaactggatgctatgcagtttagttcttacgtctcctagtggtaaaa\n\ +atcaaagtagcactcgcatagcagttattcagaacctaatacacaaaaccgtcaaacatt\n\ +ttctaattctaggtatgggccgatcataggagctaaggtgaaactcataaatgttttgtt\n\ +agatctagcatcctaaaaagatgcatatactgagtagctggcgtgcattctctcaattgt\n\ +atcctttttaactgaactagtcggtcccatttcgtgactgagatctattaaccgataaga\n\ +ttaataacactcgcattcgtatcagctcagagtgaagtttttcaataatttgactgatat\n\ +attaacttctaaaataaccctttaagcctcggatccgtttcccaatcacatcaaaaattc\n\ +ttattccaactatctacggattaacaacgtgcatggggatcgtagtaagaacttgttccg\n\ +atcactttgagtatatcaagttgacggcccggttattattgaatagaaacattcacctgc\n\ +taaattaaataccgcacatcggatacccgatttcagagggccgtcttactaagggcaggc\n\ +tttgttcggtttaactgagatgttcattattttacagtatgcttcaactaatatgtaacg\n\ +aaggacagtggatctgtctccatagtagatcttcagtcgtgaatttcataccgctcctat\n\ +ttaagttcgcgttcgagttgttgatcatggcacgtgaaagcaacccctagtattctagac\n\ +gaaaattttttctagttcatctgataatttgccaattcaaaaacaaccgctggtttcccg\n\ +gcgcattctctaaaatggaagtcgaacctagagccattatttgtcggtaacccatgagtt\n\ +ccttcttttcagaagttaatacactgtggtcctatacagaggaaaaacagcggttatata\n\ +cgatcgtggcataacaacattggatcaagatagcaatttggctacctattctaattctca\n\ +ctagattcggtattccactacaatatcggcagattaggattggatgaataatcggtgttt\n\ +aagtccggttgcgtctccaatctcctaatttttattaatattgatcttggtgacctattg\n\ +taaataaaaacttcaagactttgaataacggtgaaaagatagaagactcatttgaaaatg\n\ +gatcatccacagatccaaacattagcaagacactaatccccaactagctattctgatcgc\n\ +gatcgtgctgcagtactcctgtcacaatagtctgttcatgatctaattctttttgggctt\n\ +tgttcgatggtgattcagaatctttatccggtcgcttccctgtagctactttgtggggat\n\ +attgcccggggattatagggttgagatcgtttcctaaaagtatttaaaccaagtagactt\n\ +caactaaactacatcagaacatcgtgaagacaccatacgcggtacctttatttaccgata\n\ +acatttcttcaagaaataccggtaagcagcataatgaccctaaacagctcggggtatcgt\n\ +cgtagttttaaattttatttaggttactgctcaaggaataaaaactaactatttaattta\n\ +taataatattacaaggctcacactgattagatttgtctataagacttcgcgatcccccat\n\ +taccggattgtcttaagaataaactagataaaccatgcattttctagataaggcctttag\n\ +tctaattagatacaaaaaacacgatagttgcatccttaatttattgtgtcaaacctggaa\n\ +ccttttaattacccgcaaatcactttatgtcgagactacctctgaaatttattatctacc\n\ +taccgcatgaggacttgaaccatcttgtaggagttatgtttattagctaagattcgttta\n\ +tcctgtagcggtccatgtatattcaacaagcaaaaagcactcagaattgtttttagttga\n\ +gtcaagactgatatataaataagtttccctagttttttcgtggtgggacgatattgaatt\n\ +gaatcttaaccgaagagtttcccactctgtcgcacaataatacacgccaatatttccagc\n\ +cctgcttatgccttaatcggttactcaatctcccattgaagttcattttgatctgcatag\n\ +aagtttcgggcccagccttttttctgccaccttcctccaagctctgtagacgcactctaa\n\ +gattgatgctcacatgtattaattctacattaacataaatatataagtcatgcatcttcg\n\ +agtaaaatatctggttctccaacatgtcctggcacgtatcgttataatgcccatacatgt\n\ +agtattaaaatgattgggttaactggatattaagatcatcgaaattgtaaagtcaaatta\n\ +acaatactgtctcaagaccgtgtattcctcgtgctcggaagggctattacgcttacttcc\n\ +gttttggtatcttaatatgactttcaaaaattaagttgcagtgagtcctacctgcgtgca\n\ +tcggttagcaagagtataaaagttgtttaaacgaactacttgctttacaataccggtcgt\n\ +atatatcgccgtgaatccagaagattgtcttctttggattatcaaccgagatcctgtgga\n\ +ccgatgttttgggaccttcacagaggactccaggtagagctcgcttttgcattaatctaa\n\ +gaattgtacctctctaaaagatctaaaacagtgaatgtgtatttcatggaaaaacacaga\n\ +gaaacgtaaattactttaggccgaaaggcacatgagttattatacatatacgagatggtg\n\ +gtatacatcgaattcggggcatacactatagttgcattgtatttagctgctttaaataat\n\ +atgatattaccttccttacataagacattaccggcataccctggttttcaacttgtgggg\n\ +ctttttgacgatcgcactctcatttgatccgagtagggcggtgacccctgcttttcaaat\n\ +acaaaaatttcgctatgaaggtaatagattacttttcgctgttatgatagaaacggtaaa\n\ +tttaaaattgaaacttctagaaaagtaaagtaacgagaaatgattttgtgaataatgcgg\n\ +tcatgattgcgcaagtaagaaaaaaaggcaaaaggatgcgcggaatagaaacttatcagt\n\ +cacgggtatcttgatttcattcttcttgtcaattgccgacataggatgaaatcagattcc\n\ +aatgcaatacacagtaacccccacccttgattgtaatgtcgatttgaagttgtacgcgtc\n\ +gacgaagtggatagtatacgggccttttgtacggtgcgatcaactatgaatctcggcgag\n\ +ttagatggtcgtacaatctcacacatagaggtcacttgcctgtaatgacgaattttcggc\n\ +taggtactcgaactttattagaagtaaaaatgtgggcaaaagaaggattccattttacaa\n\ +gacgattacaatgagttacatgtctctcaacgtagtctttccctagtagtctttgaacta\n\ +tttaggtactccagaaaattttagcaaagggtttctgtgtgaatccgccattcatgttta\n\ +tgatggaacaataagaataacgccctcgtatgttatcgacagtgaagtcagcagttcggc\n\ +caaaaacatattcaatttagtacagatccccagaagttaagctaagtgctctaaaatggc\n\ +ctaaacggttatcaaagtaggtctaattactatactaacgggtgcatcgtaataactgct\n\ +gtcgatgcaacactatatgatagtgtcgttttgctatatatgtacaatgtgacaaagaag\n\ +ccttagcgattcttgcaaacttaggacttcggattctcaatcttaaatgtccgaaaacgc\n\ +aaagattcaaaaatttaatctatgagcagatatgcctgatggtgactacgcgtatgttaa\n\ +ggctaaatgttgacaaccgcacacataatcgaactattgatagtcgggagcataaccagg\n\ +tgaacgtactttgttcacgacatttattgacatgttctaaatacgtctcaaaatcacggc\n\ +gcactagaaaacgcaatcaaatcattgtcctggtttaagggccgtaatgccggtagtgtc\n\ +aaacttcatgagaactttagctggcttttggccagtatttagggaccaagagcactagcc\n\ +ttaagctgaatattttgccatttatctactgttataactttaaaacttggtggcaccaga\n\ +cttgtcgatacacacgcatcaatctgtaacgtaaaaggtttactaagaacaagcgtagga\n\ +attgagtttatattatatttaaactaaaagatgatattagcttctgagggcgatagggct\n\ +ccaaatcataaagaggaatatattattacacgattagaaacccacaacatacctcgaatc\n\ +gcccaaaagtttgacgaaacttggcagtactccacatctcagtaatacagttgggagagt\n\ +ctcaaatgttgttttattactcaatgaaccaccctcataatttcactgctgttccattaa\n\ +atttgcaaacgatcatttgctttgaagaaacgtaaaatcgacaaaattacagataagtag\n\ +atgcataataaaaaaaactgctcgctataacacgatcatcgtgcattcttacttaggagc\n\ +atcacccgcacaataacgtaccttaaactacaacactattagaccgagtactgtaattca\n\ +cgaaagctcaagctcgcattgtaaagaacttgctctctcgtaaaatgtgataatagtttg\n\ +cggagaggattcaattattttccattgcacctactccactagattcgataaaagaaggtg\n\ +gtcctcccttaaaaagaaatgttaagtaacatcggaaccataagcaaagcatgtaagtga\n\ +accgtcatccttccctaagaaacataaaggtttttaataatgtcgactgtgaactataac\n\ +tgcatcctttcctgacctactccggttccttgttgttatttctgaacgagaccagtagat\n\ +aaacaatgtaaaccacagtgggtaccaatggtgcatgtgacgctaccgttgttttaagtg\n\ +cccgtacaaacataagaagtcataatcttacttgaaattaattttgccttttattttttt\n\ +tcaggctcgaaattaatgatttgttttttttgaccttctagttacgctaatatgcggtcg\n\ +cctgtggtttctattgagtcctataacgggatgggatctaatacgtttggttactagtaa\n\ +acaaggtataaatttgataccggagtatcaactgtataacatcaagctttatgactcata\n\ +cgcgaagtaatgacacaaggctttcaggagatcgcgagtacagagccactaaggggtgta\n\ +ttacgatagtgacaccaccgagcgcactcactccccaagtagatttatgatcctacgcta\n\ +agtattagatatataaccaaagaggttctagtcagtgcaactcttagaataataattagc\n\ +cggttttgcctttttaggcctaatgcaatattcagctagcccttatgtatctcgcgttcc\n\ +acagcaccactcatggcacgcgtttaaactaatcaaatataatctatgaatgttatgcca\n\ +gtacttgaataaatcaggttttttataagtccttgcatactctcgttatatactgttaga\n\ +gtcttaccccatagaaattctttcatctgcaaacttagaagaattctcagctacggggag\n\ +cataaagtccccaggatgttgacaaatacaacaaatgtggcttatacaaacactccatat\n\ +gaaaatcgaaccctcgtggtagttttagccgaaccttgtacggataaatccctccatttt\n\ +ccaatagcagatacctatcctactacctcgtggtattaaattaaagcttgaaatatagag\n\ +ctgcatagcttatccaattcccaagcacgagtctaccgtcgtaaccacgatttgatttac\n\ +agacgctagagcaaacccatctttaaacatataagtaaaaattaaagggtgagtgcgtac\n\ +gtgtttactagcaacttcgcttattaagacaattgtttataagccataattaaaaacata\n\ +tgttcaacaggttcattgatatttgtaattgcacaggtttttaataaggatctacgtaag\n\ +tataatgaacaaactttttaccagagttatattctgtactttgaaaatgctcctctaccg\n\ +ccttagagactttcaattagattttttgcagttaatctatgcgtaagtgaaccatgcaag\n\ +ggatgcgattcaaccgcctcgtgctaaccctatcgtctgtctcataactgtaggtctaat\n\ +ataattttcagttttcgaacacataaccctttgaaaatctgctatttaatgtctcacctg\n\ +catgcactatcttctatactgctcagaacggctatacgtcactatgctccaagtgacgat\n\ +ttaaacgaagcaaggaataataggtttattttagtgcaaaacaattaagtgcggactacg\n\ +tgctctttacaataagccttgtgattgggctataggttaagtcccatattaacgatctcc\n\ +aatgtacaaaatcgacaatcgctttgcattacccggttactagtcgaattacagatagct\n\ +gttagatactcactctaattttggacaacaatcccaatcttggggtcgtctatcgcctga\n\ +agctcgtaaatccttccatcttaaacgattacatattatagacttgttcggggtagagat\n\ +atcacagttgtgcaaacattgtaaatcgatactagtttatgttggtagtctagttgcttt\n\ +taccattccccgaaaaacttgatctactatttcgacaacagtaaacttgaactaggtaag\n\ +tgaaaacagagaatgcctcatagtgccactatttgtccactatatgtaagtgtagcttta\n\ +cataatccactatgactgagatcattacggcctaggaaagcagcgtagaaaaaaagggcc\n\ +cggatattacgactgtaactataaaactagttactggtagcgcgccatgtatagatttgt\n\ +tttaccggttgtggttgcgttaacgaatttcagccgcgaaaattgatccgttaaccagtc\n\ +catctcgacttctataaaacgataaagtaaagttgatgttcagcctccttcttatggttg\n\ +catcgagagtacactactcagtgggaaatagatcggggttcctacttcagattgtattat\n\ +ctaggcaattgccgattgtgccatacctggataaaataagctacctacatgtgatgctta\n\ +tctattatcgtcatactaccttagggtgtcctgttgaacgctacattaatctttagccgt\n\ +ttgagatgttccaatggataggagtctaacgcatgatgaagtttaggaaggcagagcatc\n\ +ccactaagtatgtgacagtgtatttcgaaacgagacgttataaatagaaaaaaggtcctt\n\ +ctggttctattctgctgaactattgaatggaaagattggttgacctacgtactatttgct\n\ +tgaagtcatcaatttgacggggtgagagacatatggtgcatactttacggactctatatt\n\ +ttagatcagaagcttagcagtcttctctacaccccctcacgacataattgcttttaagaa\n\ +tctatgtttgattcctctacgggaattcggatccgttcgcatgtgcggtttatctaaacc\n\ +aggggacatatgttcagctaaagcatacgaacactttgctaactagacgtatgtatagta\n\ +gctataaatcccgacgatatttacaaaaagaaatgagactcaaatatatacatagcgacc\n\ +ctacacttattcgcaccctgatctaggcgatcctagcacccacacccgaaagtgagcact\n\ +agtgtcttccgtattaaatttactgcagttgagattttagttgtctactaaggattactc\n\ +taacccgtaataaggatcaagactcggtactagctttactatcattccctatgtgttttc\n\ +ctaactcacaagggtacgtaccagcctatgtaattacaataatgataaagacacaaagga\n\ +agtaactttacaaatgagtctccagttacactagcttagtccctcccatcttgctttgaa\n\ +gtctaaatacgcaatctctgaggatatacagcagaagaacactcataacgttggagtcca\n\ +agaattagactcatagggcccccaacatttaatatgtactgtgagtttgaaggtgttcta\n\ +ttgttaattcctgctcttgatacatgacacgtactccgtgtttaaggcttcggactgact\n\ +ttctttcataagttgagcaacgaaaatttcagaatcgataagttggattcactaactaat\n\ +acggctgattgaaaactccactccggacctatatggtcgacctttatacgtaaccgatat\n\ +aaaacttataggctggtatatcgagccttcctagcgcaatttcggatggggtttcttcta\n\ +ctactcaacaacggaatagtctttgtttagtaaaccagagctcaggacgcccaatacgta\n\ +ggagagcgctgtggagcatgtgtcattatggactggagcactcttaaatcactctgcgtg\n\ +tgctaaacgatagatcataacatgtcctgagtaaattttcttgatacgtcgcaatatacc\n\ +gttattagttaaacgttctcatccgtcatgcgtgaaatacggctgtcgtgctcagatata\n\ +ctattagcgactcatctcgcctaacacgcacacgtataaactcggaatgactgccgctct\n\ +tacatattagaaatacagactacaccacggaagcattgggtcattctcaaccgctgtata\n\ +aaagatgattagtcttataataagattaccaaagaggcagaatcatgggtagtaaatcta\n\ +ttattcaagtgattaccgtcgtgtaggcagggagtgaggacgagatggtactcaggacaa\n\ +atattaaccggacgaagtggtttacgtcgtactttcactattagtagtaaatacaaggta\n\ +acaccggggaatagtactaaatataatgatatctatcttcgggagaacgagtcgtctatt\n\ +gctttgaacattctcaaggcgtaaaatgtgctgacttatagcatgatacaaccgattgtt\n\ +acttttgtctattcaaaagattgaatagttttttatacaaaagccgcatacttatgacgg\n\ +ctagtatacagtttcatcccctagcatcaatgctatggacagtattgaacttataggaaa\n\ +ttcttctaatagggcaaatccgtcgtgatgcctattttttttcagtcacatcctcaaatg\n\ +gcactagtattgtcgggatcccattaacaggctcaaccacgagctcacgcgaggacatgt\n\ +agtccgtatctttaacgaagcgacagcgacagaactcccatggataaccaattataaggc\n\ +ccgtaatcctctagacatcgtttaccaataaatccgctttctccgtaatcatgttgaata\n\ +ccccagagtagtccagatgataaccgatgaaacacaagtctttctcaatgcacttacggt\n\ +gaacttattaccgccaacgtagctcatcaaggttgcgacatctagttgtgtgtttgcgac\n\ +gagcccagcgaacttcatcaactttcgtatattcaacgccttgtaattttactttaagac\n\ +gcctggtgatgtagattcttagataatcagtttgttatcggctgtactttaccataattt\n\ +cacaggtttcaggtcaagaagattatagctgtatatacagttccatgctcggtgcacaga\n\ +aacgtgatcggataataatcaatcgcttatgtcgtctttaggcgtatccaatacatgccc\n\ +cgataccgcagtgtatttcgacatgtaggtataccgtcgcatttgagctcgagtcaggac\n\ +gtcagctagattagattccttaatagaatataccgacctctagtccgaactaaactatag\n\ +ataacgccaacttcaggttaattgtctagtcgtctgtttgcagatgggattcttagatga\n\ +gtgagtatcggccatattggttcgagcactttagtttttgatgcataggatatgcaatgt\n\ +atagctgaaagtactttatctgtttcaaactcacattgattaaaccggtaaacctttaaa\n\ +gactacaagaaaatattcagtgagggcaattttgtcaatcacaatcttccagctagagat\n\ +acttcacaatttgtcttgaggctacgcaacattagacggattttcgcgttttattgaaat\n\ +aatcgaggggcccaagagtatccatagttcattttgtaagatttctttacaggcttatta\n\ +cagcttcttcagactcctacatgcttacgagttatatgctagcatgtgaacaatagatta\n\ +atatacaggaaaacgtacattgagagagatgaccctacacagcgcaaccgttgagtactt\n\ +tcattaaagggtaacgctctcgagacagcatccttaagatggccttattgtcaaatcatt\n\ +tgcagaagtacgcaagatccctaaccaacgtagaagaatccctacaaacacatgagacgc\n\ +ggtgaaaatagacagggtgttagtattcaatcttcggagtatcaatttcgccaatcttgg\n\ +tgagaaagcataccctttcttcagagaaagaagatcaatcataacactatctttaacgag\n\ +gtacgcacgcgcatcattacctgcctccatggatctttaggatagcggaaagtattggca\n\ +gcgtattgtgatttcgttcctactttatcaatttcacattcatatacatgtcttttatca\n\ +aaatcgccaataagataggatgagctatattagatgctagtagagttcgcgccaacatca\n\ +tcgataggaatactcaggacagcgtgataggacttttcaatccctaatactctctataat\n\ +tataactctctcttaagtttggaggcagtaacgcgctctatataatcagtttgctgcacc\n\ +attcttcagcctctgatacatacaaataaattccacagcagtaagagggtttaattgaga\n\ +catcttgggaacttaggattttactctaacatcaccgaaacgattattggataccgtacc\n\ +taaacgaactttctcaaggcagtaatataggacatccgcaataacacaaatgctgcctcc\n\ +ccaggagttatgtcttcctggaggctatatcttacacccactcactataggcaaactaaa\n\ +gtttaaatgttgattgtctaaaaaaaagatagataagagttggccggcgtagcacatgcg\n\ +aaagtgaatcgtaagctataattctctggacttgaagttctgtcctgttcctctgcaaga\n\ +aacaaacttcctttaaagctatttacgacgcacatctcagcaagttataaacatgttgga\n\ +agtttctagtcggaattcccaaagaacggatctatctaatgcattcctacatttttcctg\n\ +tctgccgatggtgccatcctattcaaagaatttcttaaaagtagattaaatgggactttt\n\ +aacaatgagtaaccttacgcctctaagggttcctcgagtgccatacaccagtcaggtccg\n\ +agccacatacacggagaacattctaacatagcattctcaactcgatcatttgcaggttac\n\ +ttctttcctatcctagtgctaaaaatcatacttgcaatcccatagcacggattaagaacc\n\ +taagaaacaattcagtaaaacatgttcgaattcttggtatgggaacatcattgcagctat\n\ +ggtctaacgcattaatgtttgggtacatcttccatcatataaacaggaagagtctgacga\n\ +cagggagtgcttgcgatcatgtctatcattgtgaaatcaaattgtagctcacatgtcgtc\n\ +tatgagagcgtgtatccgataagatttagaaaaatagaagtcgtataagatctcactgaa\n\ +cttttgaatgaatgtgaagcatatatgatctgctttaataaaactttatccataggatac\n\ +gtttccaaatcaattcaataattattagtcaaaatagataaggatgaacaacctgaaggc\n\ +cgatcggacgtagaaagtggtcccatcactttgagttgatattgttgaaccacacgttat\n\ +tatggttttcaaacagtctcaggatattgtatatacagataatccgataccagttgtctg\n\ +acgcccctcttacgtaccccaccctttgtgacgtttaaagcagttgttcagtattttaaa\n\ +ctaggcggcaactaatttggaaagaagcacagtggatatgtctaaattcttgttattcag\n\ +gcctgaatttaatacaccgcatagttaacttcgcggtagagttgttcatcatgcctcctc\n\ +taagctaccacttctatgatacaccaatagttgttctacggaatctgataattggccaag\n\ +tcataaacttccgctgcgttcaacccccttgctcgaatatccaactcgaaaagacagcct\n\ +tttggtgtccggaacaaatcagttacttcttttctgatgttaattctctgtggtcagata\n\ +cagaccaaaaactccgcggatttaccatcctccaagaacaaatttgcatcaacatagcat\n\ +tttggctacatattctaagtctcaatagtttaggttttcaactacattatcccaacatta\n\ +ggattggaggaataatagctgggtaagtccccttgcgtctacaatcgactattttttatg\n\ +aatatgcttctgccgcacctatggttattaaaaaagtcatgactttgaagaaccctgaaa\n\ +agatagatgaatcaggtgtaatggcagcagccaaagagcatataattagcaacactctaa\n\ +gaacattatagatatgatgatagcgatcgtcatgatgttatccggtcacaatagtagctt\n\ +catcagctaattcgttttgccagtggtgacttgcgctggaagaatcgttatacggtccct\n\ +tccctcttgatacggtgggggcttattcaaccgcgtggattgggttgtcatacttgcatt\n\ +aaacgatgtaaaccatctagtagtcaactatactaaatcacaaaatagtgatcaatacat\n\ +acccgcttcatggttttaaccatttaattgattaaagatattccgctaagaaccattatc\n\ +tacctaaactgatcgccgtatcctagtagtttgaaatttgatgtaccgtaatgatcaacg\n\ +aagtaaaacgttatattgtatgtagaataataggtcttggagctaaatgatgtgattggt\n\ +agtgaagacttacccttacaactttaccggtttctcggaagaatatactagagaatcaat\n\ +gcatgggctacataagcactttagtctaatgagataaaaaatacacgagtcttccatcat\n\ +gaattttttgtcgaaaaactcgaacctggtaatttaaaccatatatctttatgtcgtcaa\n\ +taactctcatatgttttatataacttcccaatcacgacttgtaactgcttgttcgactga\n\ +gctgtttgagctatgaggccgggatccggttgagctacatctatttgctacaagaaaaat\n\ +gaaagcacatttgttgggagttctggctacactcatagagaaataagtggcccgagtggg\n\ +tgcggcctgcctccatattcaagtgtatcttaaaccaagtggttccaacgctcgcgctaa\n\ +agaattaaagcctttatttcctccacggagtagcccgtaatccggttcgaaagagaccat\n\ +tgaagttaattttcatatccagtgaagtttaggcacaagcatgtgttctgccacatgcct\n\ +caaagcgctcttcaaccaagatatgattcatcctaacttcgatgaatgcgtctgtaacat\n\ +aaatatagaaggaatgattcggcgagttaattttcgccttctccaacatggcatccctac\n\ +gttcgttataaggaccatacatgtaggttttaaaggtttgcggttaatcgatatttacat\n\ +catagaaattctatagtcaaatttacaagactctagatactcactcgttgcagccggcta\n\ +ggaagcgctttgtaccttacttcccttttcgttgcgtaatatgaatttcatatagtaagt\n\ +tcaaggcactcatacctccgtgaagagggtagatagactattaaagttgtttaatagtac\n\ +gtattgatggaaatgacccgtaggagatttaccactcaatccacaagattcgctgctgtg\n\ +cattatcaaaacagtgcatgtcgaaacatgggttgggtccttcaaacacgaatccaggta\n\ +gagatacctttgcaattttt\n"; + +dnaInput = dnaInput + dnaInput + dnaInput; + +var ilen, clen, + seqs = [ + /agggtaaa|tttaccct/ig, + /[cgt]gggtaaa|tttaccc[acg]/ig, + /a[act]ggtaaa|tttacc[agt]t/ig, + /ag[act]gtaaa|tttac[agt]ct/ig, + /agg[act]taaa|ttta[agt]cct/ig, + /aggg[acg]aaa|ttt[cgt]ccct/ig, + /agggt[cgt]aa|tt[acg]accct/ig, + /agggta[cgt]a|t[acg]taccct/ig, + /agggtaa[cgt]|[acg]ttaccct/ig], + subs = { + B: '(c|g|t)', D: '(a|g|t)', H: '(a|c|t)', K: '(g|t)', + M: '(a|c)', N: '(a|c|g|t)', R: '(a|g)', S: '(c|t)', + V: '(a|c|g)', W: '(a|t)', Y: '(c|t)' } + +ilen = dnaInput.length; + +// There is no in-place substitution +dnaInput = dnaInput.replace(/>.*\n|\n/g,"") +clen = dnaInput.length + +var dnaOutputString = ''; + +for(i in seqs) + dnaOutputString += seqs[i].source + " " + (dnaInput.match(seqs[i]) || []).length + "\n"; + // match returns null if no matches, so replace with empty + +for(k in subs) + dnaInput = dnaInput.replace(k, subs[k]) // FIXME: Would like this to be a global substitution in a future version of SunSpider. + // search string, replacement string, flags + +assertEq(dnaOutputString, "agggtaaa|tttaccct 0\n[cgt]gggtaaa|tttaccc[acg] 9\na[act]ggtaaa|tttacc[agt]t 27\nag[act]gtaaa|tttac[agt]ct 24\nagg[act]taaa|ttta[agt]cct 30\naggg[acg]aaa|ttt[cgt]ccct 9\nagggt[cgt]aa|tt[acg]accct 12\nagggta[cgt]a|t[acg]taccct 9\nagggtaa[cgt]|[acg]ttaccct 15\n") diff --git a/js/src/jit-test/tests/sunspider/check-string-fasta.js b/js/src/jit-test/tests/sunspider/check-string-fasta.js new file mode 100644 index 0000000000..ed5ecef9c1 --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-string-fasta.js @@ -0,0 +1,90 @@ +// The Great Computer Language Shootout +// http://shootout.alioth.debian.org +// +// Contributed by Ian Osgood + +var last = 42, A = 3877, C = 29573, M = 139968; + +function rand(max) { + last = (last * A + C) % M; + return max * last / M; +} + +var ALU = + "GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG" + + "GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA" + + "CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT" + + "ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA" + + "GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG" + + "AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC" + + "AGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA"; + +var IUB = { + a:0.27, c:0.12, g:0.12, t:0.27, + B:0.02, D:0.02, H:0.02, K:0.02, + M:0.02, N:0.02, R:0.02, S:0.02, + V:0.02, W:0.02, Y:0.02 +} + +var HomoSap = { + a: 0.3029549426680, + c: 0.1979883004921, + g: 0.1975473066391, + t: 0.3015094502008 +} + +function makeCumulative(table) { + var last = null; + for (var c in table) { + if (last) table[c] += table[last]; + last = c; + } +} + +function fastaRepeat(n, seq) { + var seqi = 0, lenOut = 60; + while (n>0) { + if (n0) { + if (n= 0x7f) { + validates = false; + break; + } + } + + if (!validates) + continue; + + var url = "http://example.com/tag/" + tag.replace(" ", "").toLowerCase(); + var popularity = tagInfo[i].popularity; + var color = 'rgb(' + Math.floor(255 * (popularity - 12) / 20) + ', 0, 255)'; + output += ' ' + tag + ' \n'; + } + + output += ''; + output.replace(" ", " "); + + return output; +} + +var tagcloud = makeTagCloud(tagInfo); +tagInfo = null; + +// The result string embeds floating-point numbers, which can vary a bit on different platforms, +// so we truncate them a bit before comparing. +var tagcloud_norm = tagcloud.replace(/([0-9.]+)px/g, function(str, p1) { return p1.substr(0, 10) + 'px' }) +assertEq(tagcloud_norm.length, 295906) diff --git a/js/src/jit-test/tests/sunspider/check-string-unpack-code.js b/js/src/jit-test/tests/sunspider/check-string-unpack-code.js new file mode 100644 index 0000000000..a7013ec76d --- /dev/null +++ b/js/src/jit-test/tests/sunspider/check-string-unpack-code.js @@ -0,0 +1,73 @@ +// This test case unpacks the compressed code for the MochiKit, +// jQuery, Dojo and Prototype JavaScript libraries. + +/*** + MochiKit.MochiKit 1.3.1 : PACKED VERSION + THIS FILE IS AUTOMATICALLY GENERATED. If creating patches, please + diff against the source tree, not this file. + + See for documentation, downloads, license, etc. + + (c) 2005 Bob Ippolito. All rights Reserved. +***/ + +for (var i = 0; i < 2; i++) { + +var decompressedMochiKit = function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('if(H(1q)!="L"){1q.2X("B.J")}if(H(B)=="L"){B={}}if(H(B.J)=="L"){B.J={}}B.J.1Y="1.3.1";B.J.1r="B.J";B.J.2l=G(7V,vR){if(7V===O){7V={}}R(u i=1;i=0;i--){aw.e9(o[i])}}N{X.1c(o)}}F X},1R:G(7U,1i,av){if(!av){av=0}if(1i){u l=1i.K;if(H(l)!="2y"){if(H(B.15)!="L"){1i=B.15.2G(1i);l=1i.K}N{14 Y 3p("au 2E an at-as 3W B.15 2E ar")}}if(!7U){7U=[]}R(u i=av;i>b},vG:G(a,b){F a>>>b},eq:G(a,b){F a==b},ne:G(a,b){F a!=b},gt:G(a,b){F a>b},ge:G(a,b){F a>=b},lt:G(a,b){F al){7T=l}}69=[];R(i=0;i<7T;i++){u fa=[];R(u j=1;j0){ap=m.2o(me.am,ap)}u 4o=me.f7;if(!4o){4o=D}F me.f5.1w(4o,ap)};7Q.f7=f6;7Q.f5=ao;7Q.am=5f;F 7Q},lF:G(7P){u mp=B.J.1O;R(u k in 7P){u f4=7P[k];if(H(f4)=="G"){7P[k]=mp(f4,7P)}}},5u:G(mo,mn,ml,mk){B.J.ae.5M(mo,mn,ml,mk)},mj:{"5L":1h,"1n":1h,"2y":1h},2f:G(a,b){if(a==b){F 0}u f3=(H(a)=="L"||a===O);u f2=(H(b)=="L"||b===O);if(f3&&f2){F 0}N{if(f3){F-1}N{if(f2){F 1}}}u m=B.J;u f1=m.mj;if(!(H(a)in f1&&H(b)in f1)){1f{F m.ae.3C(a,b)}1e(e){if(e!=m.4d){14 e}}}if(ab){F 1}}u f0=m.U;14 Y 3p(f0(a)+" 3W "+f0(b)+" 9v 2E be vv")},eM:G(a,b){F B.J.2f(a.9P(),b.9P())},eL:G(a,b){u mi=B.J.2f;u 7O=a.K;u al=0;if(7O>b.K){al=1;7O=b.K}N{if(7O0))){u kv=B.S.d5(3s);3s=kv[0];68=kv[1]}N{if(M.K==1){u o=3s;3s=[];68=[];R(u k in o){u v=o[k];if(H(v)!="G"){3s.1c(k);68.1c(v)}}}}u W=[];u lT=28.2a(3s.K,68.K);u eT=B.J.af;R(u i=0;i=2J){14 I.25}5c+=3a;F W}}},4c:G(aa,p,q){u m=B.J;u I=B.15;u lb=m.2r(I.1Q,m.1R(O,M,1));u 2r=m.2r;u 1a=I.1a;F{U:G(){F"4c(...)"},1l:m.24("U"),1a:G(){F aa.1w(D,2r(1a,lb))}}},ep:G(aa,1V,I){1V=B.15.1Q(1V);u m=B.J;F{U:G(){F"ep(...)"},1l:m.24("U"),1a:G(){F aa.1w(I,1V.1a())}}},55:G(p,q){u I=B.15;u m=B.J;if(M.K==1){F I.1Q(M[0])}u 64=m.2r(I.1Q,M);F{U:G(){F"55(...)"},1l:m.24("U"),1a:G(){1M(64.K>1){1f{F 64[0].1a()}1e(e){if(e!=I.25){14 e}64.2P()}}if(64.K==1){u a9=64.2P();D.1a=m.1O("1a",a9);F D.1a()}14 I.25}}},9Z:G(3b,1V){u I=B.15;1V=I.1Q(1V);F{U:G(){F"9Z(...)"},1l:B.J.24("U"),1a:G(){u W=1V.1a();if(!3b(W)){D.1a=G(){14 I.25};D.1a()}F W}}},eo:G(3b,1V){1V=B.15.1Q(1V);u m=B.J;u 1O=m.1O;F{"U":G(){F"eo(...)"},"1l":m.24("U"),"1a":G(){1M(1h){u W=1V.1a();if(!3b(W)){2K}}D.1a=1O("1a",1V);F W}}},a7:G(63,2u,la){2u.62[63]=-1;u m=B.J;u l9=m.eI;F{U:G(){F"en("+63+", ...)"},1l:m.24("U"),1a:G(){u W;u i=2u.62[63];if(i==2u.29){W=la.1a();2u.a8.1c(W);2u.29+=1;2u.62[63]+=1}N{W=2u.a8[i-2u.2a];2u.62[63]+=1;if(i==2u.2a&&l9(2u.62)!=2u.2a){2u.2a+=1;2u.a8.2P()}}F W}}},en:G(a6,n){u W=[];u 2u={"62":[],"a8":[],"29":-1,"2a":-1};if(M.K==1){n=2}u I=B.15;a6=I.1Q(a6);u a7=I.a7;R(u i=0;i0&&4k>=2J)||(3a<0&&4k<=2J)){14 B.15.25}u W=4k;4k+=3a;F W},U:G(){F"7I("+[4k,2J,3a].2b(", ")+")"},1l:B.J.24("U")}},l0:G(a5,l7){u x=l7||0;u I=B.15;a5=I.1Q(a5);1f{1M(1h){x+=a5.1a()}}1e(e){if(e!=I.25){14 e}}F x},em:G(a4){u I=B.15;a4=I.1Q(a4);1f{1M(1h){a4.1a()}}1e(e){if(e!=I.25){14 e}}},9a:G(7J,1A,I){u m=B.J;if(M.K>2){1A=m.1O(1A,I)}if(m.3A(7J)){1f{R(u i=0;i<7J.K;i++){1A(7J[i])}}1e(e){if(e!=B.15.25){14 e}}}N{I=B.15;I.em(I.4c(1A,7J))}},kZ:G(l6,1A){u I=B.15;1f{I.a0(1A,l6).1a();F 1m}1e(e){if(e!=I.25){14 e}F 1h}},kY:G(l5,4j){u W=B.15.2G(l5);if(M.K==1){4j=B.J.2f}W.iz(4j);F W},kX:G(l4){u W=B.15.2G(l4);W.vg();F W},kW:G(l3,1A){u I=B.15;1f{I.a1(1A,l3).1a();F 1h}1e(e){if(e!=I.25){14 e}F 1m}},kV:G(1g,5b){if(B.J.3A(5b)){R(u i=0;i<5b.K;i++){1g.1c(5b[i])}}N{u I=B.15;5b=I.1Q(5b);1f{1M(1h){1g.1c(5b.1a())}}1e(e){if(e!=I.25){14 e}}}F 1g},ek:G(a3,eH){u m=B.J;u I=B.15;if(M.K<2){eH=m.4i.eE}a3=I.1Q(a3);u pk=L;u k=L;u v;G eF(){v=a3.1a();k=eH(v)}G l2(){u 7j=v;v=L;F 7j}u eG=1h;F{U:G(){F"ek(...)"},1a:G(){1M(k==pk){eF();if(eG){eG=1m;2K}}pk=k;F[k,{1a:G(){if(v==L){eF()}if(k!=pk){14 I.25}F l2()}}]}}},kU:G(a2,eD){u m=B.J;u I=B.15;if(M.K<2){eD=m.4i.eE}a2=I.1Q(a2);u ey=[];u eA=1h;u ez;1M(1h){1f{u eB=a2.1a();u 2h=eD(eB)}1e(e){if(e==I.25){2K}14 e}if(eA||2h!=ez){u eC=[];ey.1c([2h,eC])}eC.1c(eB);eA=1m;ez=2h}F ey},9X:G(ex){u i=0;F{U:G(){F"9X(...)"},1l:B.J.24("U"),1a:G(){if(i>=ex.K){14 B.15.25}F ex[i++]}}},eh:G(ew){F(ew&&H(ew.ei)=="G")},9V:G(l1){F{U:G(){F"9V(...)"},1l:B.J.24("U"),1a:G(){u W=l1.ei();if(W===O||W===L){14 B.15.25}F W}}}});B.15.1W=["9Y","9X","eh","9V",];B.15.1z=["25","9W","1Q","eu","et","7b","1a","es","a1","a0","er","4c","ep","55","9Z","eo","en","2G","7H","7I","l0","em","9a","kZ","kY","kX","kW","kV","ek","kU"];B.15.2d=G(){u m=B.J;D.25=Y m.5a("25");D.9Y=Y m.4a();D.9W("ej",m.3A,D.9X);D.9W("ei",D.eh,D.9V);D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)};B.15.2d();if(!B.3d){7H=B.15.7H}B.J.2Y(D,B.15);if(H(1q)!="L"){1q.2X("B.1H");1q.2M("B.J")}if(H(1x)!="L"){1x.26("B.J",[])}1f{if(H(B.J)=="L"){14""}}1e(e){14"B.1H 3F on B.J!"}if(H(B.1H)=="L"){B.1H={}}B.1H.1r="B.1H";B.1H.1Y="1.3.1";B.1H.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1H.1l=G(){F D.1K()};B.1H.1z=["5C","49","7A","kR","2L","5Z","kG","ch","kE","kC"];B.1H.1W=["ef","e8","e7"];B.1H.49=G(1P,kT,3z){D.1P=1P;D.3N=kT;D.3z=3z;D.vf=Y 3Q()};B.1H.49.1U={U:G(){u m=B.J;F"49("+m.2r(m.U,[D.1P,D.3N,D.3z]).2b(", ")+")"},1l:B.J.24("U")};B.J.2l(B.1H,{ef:G(7F){u I=B.1H;if(H(7F)=="1n"){7F=I.5C[7F]}F G(1t){u 7G=1t.3N;if(H(7G)=="1n"){7G=I.5C[7G]}F 7G>=7F}},e8:G(){u kS=B.1H.49;R(u i=0;i=0&&D.4h.K>D.ec){D.4h.2P()}},c8:G(9U){u ea=0;if(!(H(9U)=="L"||9U===O)){ea=28.29(0,D.4h.K-9U)}F D.4h.9T(ea)},kJ:G(7B){if(H(7B)=="L"||7B===O){7B=30}u 9S=D.c8(7B);if(9S.K){u 1g=2r(G(m){F"\\n ["+m.1P+"] "+m.3N+": "+m.3z.2b(" ")},9S);1g.e9("va "+9S.K+" v9:");F 1g.2b("")}F""},v8:G(kI){if(H(B.1I)=="L"){cq(D.kJ())}N{B.1I.bY(kI||1m)}}};B.1H.2d=G(){D.5C={8M:40,8L:50,8K:30,8J:20,8I:10};u m=B.J;m.5u("49",D.e8,D.e7);u 61=m.2z;u e6=D.7A;u 60=e6.1U.kH;m.2l(D.7A.1U,{kF:61(60,"8I"),5Z:61(60,"8J"),dE:61(60,"8M"),kD:61(60,"8L"),kB:61(60,"8K")});u I=D;u 5Y=G(1b){F G(){I.2L[1b].1w(I.2L,M)}};D.5Z=5Y("5Z");D.kG=5Y("dE");D.ch=5Y("kF");D.kE=5Y("kD");D.kC=5Y("kB");D.2L=Y e6();D.2L.e5=1h;D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)};if(H(5X)=="L"&&H(2v)!="L"&&2v.kA&&H(kz)!="L"){5X=G(){5X.3G=M;u ev=2v.kA("v7");ev.v6("5X",1m,1h);kz(ev)}}B.1H.2d();B.J.2Y(D,B.1H);if(H(1q)!="L"){1q.2X("B.1D")}if(H(B)=="L"){B={}}if(H(B.1D)=="L"){B.1D={}}B.1D.1r="B.1D";B.1D.1Y="1.3.1";B.1D.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1D.1l=G(){F D.1K()};B.1D.ks=G(1y){1y=1y+"";if(H(1y)!="1n"||1y.K===0){F O}u 7z=1y.2R("-");if(7z.K===0){F O}F Y 3Q(7z[0],7z[1]-1,7z[2])};B.1D.ky=/(\\d{4,})(?:-(\\d{1,2})(?:-(\\d{1,2})(?:[T ](\\d{1,2}):(\\d{1,2})(?::(\\d{1,2})(?:\\.(\\d+))?)?(?:(Z)|([+-])(\\d{1,2})(?::(\\d{1,2}))?)?)?)?)?/;B.1D.kr=G(1y){1y=1y+"";if(H(1y)!="1n"||1y.K===0){F O}u X=1y.3C(B.1D.ky);if(H(X)=="L"||X===O){F O}u 5W,7y,7x,9R,2a,9Q,7w;5W=3w(X[1],10);if(H(X[2])=="L"||X[2]===""){F Y 3Q(5W)}7y=3w(X[2],10)-1;7x=3w(X[3],10);if(H(X[4])=="L"||X[4]===""){F Y 3Q(5W,7y,7x)}9R=3w(X[4],10);2a=3w(X[5],10);9Q=(H(X[6])!="L"&&X[6]!=="")?3w(X[6],10):0;if(H(X[7])!="L"&&X[7]!==""){7w=28.ha(c5*4M("0."+X[7]))}N{7w=0}if((H(X[8])=="L"||X[8]==="")&&(H(X[9])=="L"||X[9]==="")){F Y 3Q(5W,7y,7x,9R,2a,9Q,7w)}u 58;if(H(X[9])!="L"&&X[9]!==""){58=3w(X[10],10)*v5;if(H(X[11])!="L"&&X[11]!==""){58+=3w(X[11],10)*kw}if(X[9]=="-"){58=-58}}N{58=0}F Y 3Q(3Q.v4(5W,7y,7x,9R,2a,9Q,7w)-58)};B.1D.dY=G(2g,kx){if(H(2g)=="L"||2g===O){F O}u hh=2g.v3();u mm=2g.v2();u ss=2g.v1();u 1g=[((kx&&(hh<10))?"0"+hh:hh),((mm<10)?"0"+mm:mm),((ss<10)?"0"+ss:ss)];F 1g.2b(":")};B.1D.kq=G(2g,7v){if(H(2g)=="L"||2g===O){F O}u ku=7v?"T":" ";u kt=7v?"Z":"";if(7v){2g=Y 3Q(2g.9P()+(2g.v0()*kw))}F B.1D.dX(2g)+ku+B.1D.dY(2g,7v)+kt};B.1D.dX=G(2g){if(H(2g)=="L"||2g===O){F O}u e4=B.1D.e3;F[2g.dZ(),e4(2g.e1()+1),e4(2g.e0())].2b("-")};B.1D.kp=G(d){d=d+"";if(H(d)!="1n"||d.K===0){F O}u a=d.2R("/");F Y 3Q(a[2],a[0]-1,a[1])};B.1D.e3=G(n){F(n>9)?n:"0"+n};B.1D.ko=G(d){if(H(d)=="L"||d===O){F O}u e2=B.1D.e3;F[e2(d.e1()+1),e2(d.e0()),d.dZ()].2b("/")};B.1D.kn=G(d){if(H(d)=="L"||d===O){F O}F[d.e1()+1,d.e0(),d.dZ()].2b("/")};B.1D.1z=["ks","kr","dY","kq","dX","kp","ko","kn"];B.1D.1W=[];B.1D.2k={":3e":B.1D.1z,":1p":B.1D.1z};B.1D.2d=G(){u 2w=D.1r+".";R(u k in D){u o=D[k];if(H(o)=="G"&&H(o.1r)=="L"){1f{o.1r=2w+k}1e(e){}}}};B.1D.2d();if(H(B.J)!="L"){B.J.2Y(D,B.1D)}N{(G(km,dW){if((H(1x)=="L"&&H(1q)=="L")||(H(B.3d)=="5L"&&B.3d)){u 1p=dW.2k[":1p"];R(u i=0;i<1p.K;i++){km[1p[i]]=dW[1p[i]]}}})(D,B.1D)}if(H(1q)!="L"){1q.2X("B.1s")}if(H(B)=="L"){B={}}if(H(B.1s)=="L"){B.1s={}}B.1s.1r="B.1s";B.1s.1Y="1.3.1";B.1s.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1s.1l=G(){F D.1K()};B.1s.ke=G(kl,kk,kj,ki,kh,dV,kg,9N,kf){F G(1P){1P=4M(1P);if(H(1P)=="L"||1P===O||k8(1P)){F kl}u 9L=kk;u 9K=kj;if(1P<0){1P=-1P}N{9L=9L.23(/-/,"")}u me=M.2U;u 9M=B.1s.dJ(ki);if(kh){1P=1P*3k;9K=9M.9y+9K}1P=B.1s.dK(1P,dV);u 9O=1P.2R(/\\./);u 3r=9O[0];u 3P=(9O.K==1)?"":9O[1];u X="";1M(3r.K9N){u i=3r.K-9N;X=9M.9A+3r.2W(i,3r.K)+X;3r=3r.2W(0,i)}}X=3r+X;if(dV>0){1M(3P.K=0)){D.9u()}},jR:G(X){D.9x(X);D.jX()},9x:G(X){D.2H=((X 2C 2x)?1:0);D.53[D.2H]=X;D.9u()},dD:G(){if(D.2H!=-1){if(!D.7l){14 Y B.1k.dj(D)}D.7l=1m;F}},3o:G(X){D.dD();if(X 2C B.1k.2t){14 Y 2x("2t jW 9v aB be 7r if jV jU jT jS of a 3o")}D.9x(X)},52:G(X){D.dD();u I=B.1k;if(X 2C I.2t){14 Y 2x("2t jW 9v aB be 7r if jV jU jT jS of a 3o")}if(!(X 2C 2x)){X=Y I.9p(X)}D.9x(X)},jP:G(fn){if(M.K>1){fn=B.J.2z.1w(O,M)}F D.9w(fn,fn)},5Q:G(fn){if(M.K>1){fn=B.J.2z.1w(O,M)}F D.9w(fn,O)},jA:G(fn){if(M.K>1){fn=B.J.2z.1w(O,M)}F D.9w(O,fn)},9w:G(cb,eb){if(D.7r){14 Y 2x("uQ uP 9v 2E be re-uO")}D.55.1c([cb,eb]);if(D.2H>=0){D.9u()}F D},9u:G(){u dC=D.55;u 56=D.2H;u X=D.53[56];u I=D;u cb=O;1M(dC.K>0&&D.54===0){u 2n=dC.2P();u f=2n[56];if(f===O){2V}1f{X=f(X);56=((X 2C 2x)?1:0);if(X 2C B.1k.2t){cb=G(X){I.jR(X)};D.jQ()}}1e(3O){56=1;if(!(3O 2C 2x)){3O=Y B.1k.9p(3O)}X=3O}}D.2H=56;D.53[56]=X;if(cb&&D.54){X.jP(cb);X.7r=1h}}};B.J.2l(B.1k,{dk:G(){F dB("("+M[0].jN+")")},dp:G(uN){u d=Y B.1k.2t();d.3o.1w(d,M);F d},9q:G(uM){u d=Y B.1k.2t();d.52.1w(d,M);F d},do:G(){u I=M.2U;if(!I.7q){u dy=[G(){F Y 7q()},G(){F Y dA("jO.dz")},G(){F Y dA("uL.dz")},G(){F Y dA("jO.dz.4.0")},G(){14 Y B.1k.dh("uK uJ 2E uI 7q")}];R(u i=0;i1){u m=B.J;u qs=m.dw.1w(O,m.1R(O,M,1));if(qs){5F+="?"+qs}}2s.cp("uB",5F,1h);F I.dl(2s)},jv:G(5F){u I=B.1k;u d=I.dn.1w(I,M);d=d.5Q(I.dk);F d},dm:G(jJ,dv){u d=Y B.1k.2t();u m=B.J;if(H(dv)!="L"){d.5Q(G(){F dv})}u jI=uA(m.1O("3o",d),28.8B(jJ*c5));d.7m=G(){1f{uz(jI)}1e(e){}};F d},ju:G(jH,1A){u m=B.J;u jG=m.2z.1w(m,m.1R(O,M,1));F B.1k.dm(jH).5Q(G(X){F jG()})}});B.1k.5O=G(){D.5S=[];D.4e=1m;D.id=D.7n()};B.1k.5O.1U={bX:B.1k.5O,uy:G(){d=Y B.1k.2t();if(D.4e){D.5S.1c(d)}N{D.4e=1h;d.3o(D)}F d},jF:G(){if(!D.4e){14 3p("ux to jF an jE 5O")}D.4e=1m;if(D.5S.K>0){D.4e=1h;D.5S.2P().3o(D)}},7n:B.J.4f(),U:G(){u 9t;if(D.4e){9t="4e, "+D.5S.K+" 5S"}N{9t="jE"}F"5O("+D.id+", "+9t+")"},1l:B.J.24("U")};B.1k.7i=G(2G,du,jC,jB,jD){D.2G=2G;D.9r=Y 7o(D.2G.K);D.55=[];D.id=D.7n();D.2H=-1;D.54=0;D.53=[O,O];D.7m=jD;D.7l=1m;if(D.2G.K===0&&!du){D.3o(D.9r)}D.dr=0;D.jz=du;D.jy=jC;D.jx=jB;u 9s=0;B.J.2r(B.J.1O(G(d){d.5Q(B.J.1O(D.dt,D),9s,1h);d.jA(B.J.1O(D.dt,D),9s,1m);9s+=1},D),D.2G)};B.J.2l(B.1k.7i.1U,B.1k.2t.1U);B.J.2l(B.1k.7i.1U,{dt:G(ds,7k,5R){D.9r[ds]=[7k,5R];D.dr+=1;if(D.2H!==0){if(7k&&D.jz){D.3o([ds,5R])}N{if(!7k&&D.jy){D.52(5R)}N{if(D.dr==D.2G.K){D.3o(D.9r)}}}}if(!7k&&D.jx){5R=O}F 5R}});B.1k.jt=G(jw){u d=Y B.1k.7i(jw,1m,1h,1m);d.5Q(G(dq){u 7j=[];R(u i=0;i=0){u 9m=Q.1S[Q.j4];7d.1c(1b);7c.1c((9m.3m)?9m.3m:9m.7X);F O}7d.1c(1b);7c.1c("");F O}if(4Y=="cu"||4Y=="P"||4Y=="8d"||4Y=="6m"){F Q.5h}7d.1c(1b);7c.1c(Q.3m||"");F O}F Q.5h});F[7d,7c]},94:G(1N,1A){u I=B.S;u d3=I.1Z;u W;1f{I.1Z=1N;W=1A()}1e(e){I.1Z=d3;14 e}I.1Z=d3;F W},j3:G(1b,j2,3y,j1){B.S.9b.5M(1b,j2,3y,j1)},9k:G(1j,7a){u im=B.15;u I=B.S;u 1Q=im.1Q;u iY=im.7b;u 4c=im.4c;u iX=I.9b;u iZ=I.9k;u iW=B.J.4d;1M(1h){if(H(1j)=="L"||1j===O){F O}if(H(1j.3T)!="L"&&1j.3T>0){F 1j}if(H(1j)=="2y"||H(1j)=="5L"){1j=1j.1l()}if(H(1j)=="1n"){F I.1Z.4S(1j)}if(H(1j.j0)=="G"){1j=1j.j0(7a);2V}if(H(1j)=="G"){1j=1j(7a);2V}u 9l=O;1f{9l=1Q(1j)}1e(e){}if(9l){F 4c(iZ,9l,iY(7a))}1f{1j=iX.3C(1j,7a);2V}1e(e){if(e!=iW){14 e}}F I.1Z.4S(1j.1l())}F L},iV:G(1j,79,iU){u o={};o[79]=iU;1f{F B.S.4X(1j,o)}1e(e){}F O},iT:G(1j,79){u I=B.S;u d2=I.4U.99[79];1j=I.1E(1j);1f{if(d2){F 1j[d2]}F 1j.fm(79)}1e(e){}F O},4X:G(1j,5K){u Q=1j;u I=B.S;if(H(1j)=="1n"){Q=I.1E(1j)}if(5K){u d0=B.J.8Z;if(I.4U.6X){R(u k in 5K){u v=5K[k];if(H(v)=="3n"&&H(Q[k])=="3n"){d0(Q[k],v)}N{if(k.2W(0,2)=="on"){if(H(v)=="1n"){v=Y cZ(v)}Q[k]=v}N{Q.4p(k,v)}}}}N{u iS=I.4U.99;R(k in 5K){v=5K[k];u d1=iS[k];if(k=="1T"&&H(v)=="1n"){Q.1T.3x=v}N{if(H(d1)=="1n"){Q[d1]=v}N{if(H(Q[k])=="3n"&&H(v)=="3n"){d0(Q[k],v)}N{if(k.2W(0,2)=="on"){if(H(v)=="1n"){v=Y cZ(v)}Q[k]=v}N{Q.4p(k,v)}}}}}}}F Q},9j:G(1j){u Q=1j;u I=B.S;if(H(1j)=="1n"){Q=I.1E(1j)}u 78=[I.9k(B.J.1R(O,M,1),Q)];u iR=B.J.2o;1M(78.K){u n=78.2P();if(H(n)=="L"||n===O){}N{if(H(n.3T)=="2y"){Q.2c(n)}N{78=iR(n,78)}}}F Q},iQ:G(1j){u Q=1j;u I=B.S;if(H(1j)=="1n"){Q=I.1E(1j);M[0]=Q}u cY;1M((cY=Q.6n)){Q.6S(cY)}if(M.K<2){F Q}N{F I.9j.1w(D,M)}},cX:G(1b,4b){u Q;u I=B.S;u m=B.J;if(H(4b)=="1n"||H(4b)=="2y"){u 3G=m.1R([1b,O],M,1);F M.2U.1w(D,3G)}if(H(1b)=="1n"){if(4b&&"1b"in 4b&&!I.4U.6X){1b=("<"+1b+" 1b=\\""+I.9c(4b.1b)+"\\">")}Q=I.1Z.2S(1b)}N{Q=1b}if(4b){I.4X(Q,4b)}if(M.K<=2){F Q}N{u 3G=m.1R([Q],M,2);F I.9j.1w(D,3G)}},cw:G(){u m=B.J;F m.2z.1w(D,m.1R([B.S.cX],M))},cs:G(5J,1d){u I=B.S;5J=I.1E(5J);u cW=5J.3t;if(1d){1d=I.1E(1d);cW.uj(1d,5J)}N{cW.6S(5J)}F 1d},1E:G(id){u I=B.S;if(M.K==1){F((H(id)=="1n")?I.1Z.hN(id):id)}N{F B.J.2r(I.1E,M)}},4q:G(iP,cV,cU){if(M.K==2){cU=cV}u I=B.S;u el=I.1E(iP);u 77=I.1Z;if(!el||el==77){F L}if(el.iO){F el.iO[cV]}if(H(77.5k)=="L"){F L}if(77.5k===O){F L}u 9i=77.5k.g4(el,O);if(H(9i)=="L"||9i===O){F L}F 9i.6q(cU)},aH:G(76,9g,4W){u I=B.S;if(H(76)=="L"||76===O){76="*"}if(H(4W)=="L"||4W===O){4W=I.1Z}4W=I.1E(4W);u 9h=(4W.fr(76)||I.1Z.1p);if(H(9g)=="L"||9g===O){F B.J.1R(O,9h)}u cR=[];R(u i=0;i<9h.K;i++){u cS=9h[i];u cT=cS.3M.2R(" ");R(u j=0;j/g,">")},iB:G(2q){F B.S.cG(2q).2b("")},cG:G(2q,1g){if(H(1g)=="L"||1g===O){1g=[]}u 70=[2q];u I=B.S;u cB=I.9c;u iA=I.4U;1M(70.K){2q=70.hP();if(H(2q)=="1n"){1g.1c(2q)}N{if(2q.3T==1){1g.1c("<"+2q.cD.8G());u 71=[];u cF=iA(2q);R(u i=0;i");70.1c("");u cC=2q.5h;R(i=cC.K-1;i>=0;i--){70.1c(cC[i])}}N{1g.1c("/>")}}N{if(2q.3T==3){1g.1c(cB(2q.iv))}}}}F 1g},97:G(ix,cA){u m=B.J;u iy=m.1R(O,M,1);B.15.9a(m.47(O,m.2r(B.S.1E,iy)),G(cA){cA.1T.3u=ix})},iw:G(1j,iu){u W=[];(G(1j){u cn=1j.5h;if(cn){R(u i=0;i0){u it=m.47;2T=G(1j){F it(2T.ir,1j.6Y)};2T.cx={};B.15.9a(6Z.6Y,G(a){2T.cx[a.1b]=a.3m});2T.ir=G(a){F(2T.cx[a.1b]!=a.3m)};2T.6X=1m;2T.99={"iq":"3M","ip":"ud","uc":"ub","R":"u9"}}N{2T=G(1j){F 1j.6Y};2T.6X=1h;2T.99={}}D.4U=2T;u 1C=D.cw;D.io=1C("ul");D.il=1C("ol");D.ik=1C("li");D.ij=1C("td");D.cm=1C("tr");D.ii=1C("u8");D.ih=1C("u7");D.ig=1C("u6");D.ie=1C("u5");D.ic=1C("th");D.cv=1C("ck");D.8d=1C("cj");D.A=1C("a");D.6m=1C("4u");D.ib=1C("u4");D.ia=1C("2e");D.i9=1C("tt");D.i8=1C("4O");D.i7=1C("h1");D.i6=1C("h2");D.i5=1C("h3");D.i4=1C("br");D.i3=1C("hr");D.i2=1C("u3");D.i1=1C("u2");D.cu=1C("u1");D.P=1C("p");D.ct=1C("u0");D.i0=1C("hJ");D.hZ=1C("tZ");D.hY=1C("tY");D.hX=1C("tX");D.hW=1C("tW");D.hV=1C("tV");D.hU=m.2z(D.97,"98");D.hT=m.2z(D.97,"8c");D.hS=D.cs;D.$=D.1E;D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)}});B.S.2d(((H(2O)=="L")?D:2O));if(!B.3d){95=B.S.95;94=B.S.94}B.J.2Y(D,B.S);if(H(1q)!="L"){1q.2X("B.1I");1q.2M("B.1H");1q.2M("B.J")}if(H(1x)!="L"){1x.26("B.1H",[]);1x.26("B.J",[])}1f{if(H(B.J)=="L"||H(B.1H)=="L"){14""}}1e(e){14"B.1I 3F on B.J 3W B.1H!"}if(H(B.1I)=="L"){B.1I={}}B.1I.1r="B.1I";B.1I.1Y="1.3.1";B.1I.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1I.1l=G(){F D.1K()};B.1I.bY=G(6W){u m=B.1I;6W=!(!6W);if(m.3l&&m.3l.8Q!=6W){m.3l.hA();m.3l=O}if(!m.3l||m.3l.8P){m.3l=Y m.1I(6W,B.1H.2L)}F m.3l};B.1I.1I=G(4R,6V){if(H(6V)=="L"||6V===O){6V=B.1H.2L}D.2L=6V;u tU=B.J.2l;u c3=B.J.8Z;u 1O=B.J.1O;u hM=B.J.4L;u 2m=2O;u 6U="tT";if(H(B.S)!="L"){2m=B.S.cr()}if(!4R){u 5F=2m.tS.tR.2R("?")[0].23(/[:\\/.><&]/g,"hR");u 1b=6U+"hR"+5F;u 5D=2m.cp("",1b,"tQ,tP,3V=hQ");if(!5D){cq("tO tN to cp tM 2O tL to hP-up tK.");F L}5D.2v.fl(""+"<5E><8Y>[B.1I]"+"<5s>");5D.2v.hG();5D.2v.8Y+=" "+2m.2v.8Y;2m=5D}u 1N=2m.2v;D.1N=1N;u 21=1N.hN(6U);u c4=!!21;if(21&&H(21.5B)!="L"){21.5B.2L=D.2L;21.5B.6K();F 21.5B}if(c4){u cl;1M((cl=21.6n)){21.6S(cl)}}N{21=1N.2S("4u");21.id=6U}21.5B=D;u 8T=1N.2S("ck");u 8S=1N.2S("ck");u 6O=1N.2S("2e");u 6N=1N.2S("2e");u 6M=1N.2S("2e");u 6L=1N.2S("2e");u 3L=1N.2S("4u");u 42=1N.2S("4u");u 8U=6U+"tz";D.8N=hM(D.8N);u 4T=[];u 6R=O;u cf=G(1t){u 6T=1t.3N;if(H(6T)=="2y"){6T=B.1H.5C[6T]}F 6T};u cd=G(1t){F 1t.3z.2b(" ")};u ca=1O(G(1t){u 8W=cf(1t);u 7X=cd(1t);u c=D.8N[8W];u p=1N.2S("cj");p.3M="B-49 B-5C-"+8W;p.1T.3x="ty: 2N; 4F-8X: -hL-4O-3y; 4F-8X: -o-4O-3y; 4F-8X: 4O-3y; 4F-8X: 4O-tx; hK-3y: 2K-hK; 3y-hJ: tw; 3U: "+c;p.2c(1N.4S(8W+": "+7X));42.2c(p);42.2c(1N.2S("br"));if(3L.ci>3L.hI){3L.4C=0}N{3L.4C=3L.hI}},D);u hD=G(1t){4T[4T.K]=1t;ca(1t)};u hF=G(){u cg,ce;1f{cg=Y 8V(8T.3m);ce=Y 8V(8S.3m)}1e(e){ch("2x in 47 tv: "+e.43);F O}F G(1t){F(cg.hH(cf(1t))&&ce.hH(cd(1t)))}};u cc=G(){1M(42.6n){42.6S(42.6n)}};u hB=G(){4T=[];cc()};u bZ=1O(G(){if(D.8P){F}D.8P=1h;if(B.1I.3l==D){B.1I.3l=O}D.2L.c9(8U);21.5B=O;if(4R){21.3t.6S(21)}N{D.2m.hG()}},D);u c7=G(){cc();R(u i=0;i<4T.K;i++){u 1t=4T[i];if(6R===O||6R(1t)){ca(1t)}}};D.6K=G(){6R=hF();c7();D.2L.c9(8U);D.2L.hE(8U,6R,hD)};u c0=1O(G(){4T=D.2L.c8();c7()},D);u c2=1O(G(6Q){6Q=6Q||2O.6D;2h=6Q.6w||6Q.8t;if(2h==13){D.6K()}},D);u 31="3u: 8c; z-c6: c5; 2I: 2N; 6f: 2N; 6P: tu; 5A: 3k%; he-3U: 4F; c1: "+D.8O;if(4R){31+="; 3V: ts; 3E-3D: fO 8a 8y"}N{31+="; 3V: 3k%;"}21.1T.3x=31;if(!c4){1N.5s.2c(21)}31={"3x":"5A: 33%; 3u: 8Q; c1: "+D.8O};c3(8T,{"3m":"8L|8M|8K|8J|8I","hC":c2,"1T":31});21.2c(8T);c3(8S,{"3m":".*","hC":c2,"1T":31});21.2c(8S);31="5A: 8%; 3u:8Q; c1: "+D.8O;6O.2c(1N.4S("tq"));6O.8R=1O("6K",D);6O.1T.3x=31;21.2c(6O);6N.2c(1N.4S("tp"));6N.8R=c0;6N.1T.3x=31;21.2c(6N);6M.2c(1N.4S("tn"));6M.8R=hB;6M.1T.3x=31;21.2c(6M);6L.2c(1N.4S("tm"));6L.8R=bZ;6L.1T.3x=31;21.2c(6L);3L.1T.3x="fS: tk; 5A: 3k%";42.1T.3x="5A: 3k%; 3V: "+(4R?"tj":"3k%");3L.2c(42);21.2c(3L);D.6K();c0();if(4R){D.2m=L}N{D.2m=2m}D.8Q=4R;D.hA=bZ;D.8P=1m;F D};B.1I.1I.1U={"8O":"ti tg,tf-te","8N":{"8M":"1v","8L":"gU","8K":"1F","8J":"8y","8I":"bx"}};B.1I.1W=["1I"];B.1I.1z=["bY"];B.1I.2d=G(){D.2k={":3e":D.1z,":1p":B.J.2o(D.1z,D.1W)};B.J.3f(D);B.1I.3l=O};B.1I.2d();B.J.2Y(D,B.1I);if(H(1q)!="L"){1q.2X("B.V");1q.2M("B.J")}if(H(1x)!="L"){1x.26("B.J",[])}1f{if(H(B.J)=="L"){14""}}1e(e){14"B.V 3F on B.J"}if(H(B.V)=="L"){B.V={}}B.V.1r="B.V";B.V.1Y="1.3.1";B.V.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.V.1l=G(){F D.1K()};B.V.V=G(1v,hz,1F,6J){if(H(6J)=="L"||6J===O){6J=1}D.1B={r:1v,g:hz,b:1F,a:6J}};B.V.V.1U={bX:B.V.V,tc:G(hy){u 1B=D.1B;u m=B.V;F m.V.3Y(1B.r,1B.g,1B.b,hy)},tb:G(1o){u 1G=D.41();1G.h=1o;u m=B.V;F m.V.4H(1G)},ta:G(hx){u 1G=D.41();1G.s=hx;u m=B.V;F m.V.4H(1G)},t9:G(hw){u 1G=D.41();1G.l=hw;u m=B.V;F m.V.4H(1G)},t8:G(hv){u 1G=D.41();1G.l=28.29(1G.l-hv,0);u m=B.V;F m.V.4H(1G)},t7:G(hu){u 1G=D.41();1G.l=28.2a(1G.l+hu,1);u m=B.V;F m.V.4H(1G)},fJ:G(ht,5z){if(H(5z)=="L"||5z===O){5z=0.5}u sf=1-5z;u s=D.1B;u d=ht.1B;u df=5z;F B.V.V.3Y((s.r*sf)+(d.r*df),(s.g*sf)+(d.g*df),(s.b*sf)+(d.b*df),(s.a*sf)+(d.a*df))},h4:G(hs){u a=D.6r();u b=hs.6r();F B.J.2f([a.r,a.g,a.b,a.a],[b.r,b.g,b.b,b.a])},hq:G(){F D.41().b>0.5},t6:G(){F(!D.hq())},t5:G(){u c=D.41();u 2Z=B.V.6F;u W=D.ho;if(!W){u 5y=(2Z(c.h,bF).6I(0)+","+2Z(c.s,3k).hp(4)+"%"+","+2Z(c.l,3k).hp(4)+"%");u a=c.a;if(a>=1){a=1;W="1G("+5y+")"}N{if(a<=0){a=0}W="t4("+5y+","+a+")"}D.ho=W}F W},hl:G(){u c=D.1B;u 2Z=B.V.6F;u W=D.hn;if(!W){u 5y=(2Z(c.r,3h).6I(0)+","+2Z(c.g,3h).6I(0)+","+2Z(c.b,3h).6I(0));if(c.a!=1){W="t3("+5y+","+c.a+")"}N{W="1B("+5y+")"}D.hn=W}F W},6r:G(){F B.J.4L(D.1B)},t2:G(){u m=B.V;u c=D.1B;u 2Z=B.V.6F;u W=D.hm;if(!W){W=("#"+m.6E(2Z(c.r,3h))+m.6E(2Z(c.g,3h))+m.6E(2Z(c.b,3h)));D.hm=W}F W},t1:G(){u 2Q=D.2Q;u c=D.1B;if(H(2Q)=="L"||2Q===O){2Q=B.V.bA(D.1B);D.2Q=2Q}F B.J.4L(2Q)},41:G(){u 1G=D.1G;u c=D.1B;if(H(1G)=="L"||1G===O){1G=B.V.bC(D.1B);D.1G=1G}F B.J.4L(1G)},1l:G(){F D.hl()},U:G(){u c=D.1B;u hk=[c.r,c.g,c.b,c.a];F D.bX.1r+"("+hk.2b(", ")+")"}};B.J.2l(B.V.V,{3Y:G(1v,bW,1F,8H){u hj=B.V.V;if(M.K==1){u 1B=1v;1v=1B.r;bW=1B.g;1F=1B.b;if(H(1B.a)=="L"){8H=L}N{8H=1B.a}}F Y hj(1v,bW,1F,8H)},4H:G(1o,t0,sZ,sY){u m=B.V;F m.V.3Y(m.bB.1w(m,M))},sX:G(1o,sW,sV,sU){u m=B.V;F m.V.3Y(m.bz.1w(m,M))},hi:G(1b){u 8F=B.V.V;if(1b.3Z(0)=="\\""){1b=1b.3H(1,1b.K-2)}u bV=8F.by[1b.8G()];if(H(bV)=="1n"){F 8F.bT(bV)}N{if(1b=="aP"){F 8F.sT()}}F O},8f:G(4Q){u I=B.V.V;u bU=4Q.3H(0,3);if(bU=="1B"){F I.h9(4Q)}N{if(bU=="1G"){F I.h8(4Q)}N{if(4Q.3Z(0)=="#"){F I.bT(4Q)}}}F I.hi(4Q)},bT:G(4P){if(4P.3Z(0)=="#"){4P=4P.2W(1)}u 8E=[];u i,5x;if(4P.K==3){R(i=0;i<3;i++){5x=4P.3H(i,1);8E.1c(3w(5x+5x,16)/3h)}}N{R(i=0;i<6;i+=2){5x=4P.3H(i,2);8E.1c(3w(5x,16)/3h)}}u bS=B.V.V;F bS.3Y.1w(bS,8E)},bG:G(4O,hf,hg,4N){if(4N.2A(4O)===0){4N=4N.2W(4N.2A("(",3)+1,4N.K-1)}u bR=4N.2R(/\\s*,\\s*/);u bP=[];R(u i=0;i0){F 8D}}F O},ba:G(Q){u 2F=B.V.V;F 2F.bN(Q,"aZ","he-3U")||2F.sN()},sM:G(Q){u 2F=B.V.V;F 2F.bN(Q,"3U","3U")||2F.sL()},sK:G(){F B.J.4L(B.V.V.by)}});B.J.2l(B.V,{6F:G(v,8C){v*=8C;if(v<0){F 0}N{if(v>8C){F 8C}N{F v}}},hc:G(n1,n2,1o){if(1o>6){1o-=6}N{if(1o<0){1o+=6}}u 2i;if(1o<1){2i=n1+(n2-n1)*1o}N{if(1o<3){2i=n2}N{if(1o<4){2i=n1+(n2-n1)*(4-1o)}N{2i=n1}}}F 2i},bz:G(1o,5w,3i,bM){if(M.K==1){u 2Q=1o;1o=2Q.h;5w=2Q.s;3i=2Q.v;bM=2Q.a}u 1v;u 3K;u 1F;if(5w===0){1v=0;3K=0;1F=0}N{u i=28.8B(1o*6);u f=(1o*6)-i;u p=3i*(1-5w);u q=3i*(1-(5w*f));u t=3i*(1-(5w*(1-f)));hd(i){3j 1:1v=q;3K=3i;1F=p;2K;3j 2:1v=p;3K=3i;1F=t;2K;3j 3:1v=p;3K=q;1F=3i;2K;3j 4:1v=t;3K=p;1F=3i;2K;3j 5:1v=3i;3K=p;1F=q;2K;3j 6:3j 0:1v=3i;3K=t;1F=p;2K}}F{r:1v,g:3K,b:1F,a:bM}},bB:G(1o,5v,3v,bL){if(M.K==1){u 1G=1o;1o=1G.h;5v=1G.s;3v=1G.l;bL=1G.a}u 1v;u 8A;u 1F;if(5v===0){1v=3v;8A=3v;1F=3v}N{u m2;if(3v<=0.5){m2=3v*(1+5v)}N{m2=3v+5v-(3v*5v)}u m1=(2*3v)-m2;u f=B.V.hc;u h6=1o*6;1v=f(m1,m2,h6+2);8A=f(m1,m2,h6);1F=f(m1,m2,h6-2)}F{r:1v,g:8A,b:1F,a:bL}},bA:G(1v,4K,1F,bK){if(M.K==1){u 1B=1v;1v=1B.r;4K=1B.g;1F=1B.b;bK=1B.a}u 29=28.29(28.29(1v,4K),1F);u 2a=28.2a(28.2a(1v,4K),1F);u 1o;u 8z;u hb=29;if(2a==29){1o=0;8z=0}N{u 6H=(29-2a);8z=6H/29;if(1v==29){1o=(4K-1F)/6H}N{if(4K==29){1o=2+((1F-1v)/6H)}N{1o=4+((1v-4K)/6H)}}1o/=6;if(1o<0){1o+=1}if(1o>1){1o-=1}}F{h:1o,s:8z,v:hb,a:bK}},bC:G(1v,4J,1F,bI){if(M.K==1){u 1B=1v;1v=1B.r;4J=1B.g;1F=1B.b;bI=1B.a}u 29=28.29(1v,28.29(4J,1F));u 2a=28.2a(1v,28.2a(4J,1F));u 1o;u 6G;u bJ=(29+2a)/2;u 4I=29-2a;if(4I===0){1o=0;6G=0}N{if(bJ<=0.5){6G=4I/(29+2a)}N{6G=4I/(2-29-2a)}if(1v==29){1o=(4J-1F)/4I}N{if(4J==29){1o=2+((1F-1v)/4I)}N{1o=4+((1v-4J)/4I)}}1o/=6;if(1o<0){1o+=1}if(1o>1){1o-=1}}F{h:1o,s:6G,l:bJ,a:bI}},6E:G(1P){1P=28.ha(1P);u bH=1P.1l(16);if(1P<16){F"0"+bH}F bH},2d:G(){u m=B.J;D.V.h9=m.1O(D.V.bG,D.V,"1B","3Y",[1/3h,1/3h,1/3h,1]);D.V.h8=m.1O(D.V.bG,D.V,"1G","4H",[1/bF,0.bE,0.bE,1]);u 4G=1/3;u bD={8y:[0,0,0],1F:[0,0,1],gY:[0.6,0.4,0.2],gX:[0,1,1],sJ:[4G,4G,4G],gR:[0.5,0.5,0.5],bx:[0,1,0],sI:[2*4G,2*4G,2*4G],gN:[1,0,1],gL:[1,0.5,0],gK:[0.5,0,0.5],1v:[1,0,0],aP:[0,0,0,0],4F:[1,1,1],gI:[1,1,0]};u h7=G(1b,r,g,b,a){u W=D.3Y(r,g,b,a);D[1b]=G(){F W};F W};R(u k in bD){u 1b=k+"V";u h5=m.2o([h7,D.V,1b],bD[k]);D.V[1b]=m.1O.1w(O,h5)}u h0=G(){R(u i=0;i1){u 1d=B.S.1E(M[0]);u 2D=M[1];u 1i=M[2];u 1A=M[3];R(u i=5o.K-1;i>=0;i--){u o=5o[i];if(o[0]===1d&&o[1]===2D&&o[4]===1i&&o[5]===1A){I.6t(o);5o.4y(i,1);F 1h}}}N{u 5n=m.bi(5o,bh);if(5n>=0){I.6t(bh);5o.4y(5n,1);F 1h}}F 1m},8i:G(1d,2D){1d=B.S.1E(1d);u m=B.J;u 8l=m.bg(m.1R(O,M,1));u I=B.1u;u bd=I.6t;u 4z=I.4x;if(8l.K===0){R(u i=4z.K-1;i>=0;i--){u 4A=4z[i];if(4A[0]===1d){bd(4A);4z.4y(i,1)}}}N{u bf={};R(u i=0;i<8l.K;i++){bf[8l[i]]=1h}R(u i=4z.K-1;i>=0;i--){u 4A=4z[i];if(4A[0]===1d&&4A[1]in bf){bd(4A);4z.4y(i,1)}}}},8h:G(1d,2D){u bc=B.1u.4x;1d=B.S.1E(1d);u 3G=B.J.1R(O,M,2);u 5m=[];R(u i=0;i1){u e=Y 2x("mZ bb mY in mX \'2D\', mW bb mV");e.bb=5m;14 e}}}});B.1u.1W=[];B.1u.1z=["6s","8j","8h","8i"];B.1u.2d=G(2m){u m=B.J;D.1Z=2v;D.3X=2m;1f{D.6s(2O,"g8",D.g7)}1e(e){}D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)};B.1u.2d(D);if(!B.3d){6s=B.1u.6s;8j=B.1u.8j;8i=B.1u.8i;8h=B.1u.8h}B.J.2Y(D,B.1u);if(H(1q)!="L"){1q.2X("B.1X");1q.2M("B.J");1q.2M("B.S");1q.2M("B.V")}if(H(1x)!="L"){1x.26("B.J",[]);1x.26("B.S",[]);1x.26("B.V",[])}1f{if(H(B.J)=="L"||H(B.S)=="L"||H(B.V)=="L"){14""}}1e(e){14"B.1X 3F on B.J, B.S 3W B.V!"}if(H(B.1X)=="L"){B.1X={}}B.1X.1r="B.1X";B.1X.1Y="1.3.1";B.1X.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1X.1l=G(){F D.1K()};B.1X.aI=G(e,g6){e=B.S.1E(e);D.fN(g6);if(D.1S.fL){e=D.g5(e)}u 4w=D.1S.3U;u C=B.V.V;if(D.1S.3U=="aW"){4w=C.ba(e)}N{if(!(4w 2C C)){4w=C.8f(4w)}}D.82=(4w.6r().a<=0);u 5l=D.1S.aV;if(D.1S.aV=="fM"){5l=C.ba(e.8g)}N{if(!(5l 2C C)){5l=C.8f(5l)}}D.g3(e,4w,5l)};B.1X.aI.1U={g5:G(e){u mU=e.3t;u 1N=B.S.b9();if(H(1N.5k)=="L"||1N.5k===O){F e}u 4v=1N.5k.g4(e,O);if(H(4v)=="L"||4v===O){F e}u b8=B.S.6m({"1T":{3u:"8c",mT:4v.6q("6p-3D"),85:4v.6q("6p-3g"),mS:4v.6q("6p-6f"),86:4v.6q("6p-2I"),6p:"2N"}});b8.6o=e.6o;e.6o="";e.2c(b8);F e},g3:G(e,b7,8e){if(D.1S.3E){D.g2(e,8e)}if(D.fy()){D.fX(e,b7,8e)}if(D.fx()){D.fV(e,b7,8e)}},g2:G(el,g1){u b6="6l 8a "+D.aQ(g1);u g0="3E-2I: "+b6;u fZ="3E-3g: "+b6;u fY="1T=\'"+g0+";"+fZ+"\'";el.6o="<4u "+fY+">"+el.6o+""},fX:G(el,fW,b5){u b4=D.b1(b5);R(u i=0;i=0;i--){b2.2c(D.b0(fU,b3,i,"6f"))}el.1T.mP=0;el.2c(b2)},b1:G(fT){u 2q=B.S;F 2q.6m({1T:{aZ:fT.1l()}})},b0:G(aY,fQ,n,aX){u 6k=B.S.8d();u 2p=6k.1T;2p.aZ=aY.1l();2p.3u="8c";2p.3V="6l";2p.fS="fR";2p.mO="6l";u 8b=D.aQ(aY,fQ);if(D.1S.3E&&n===0){2p.mN="8a";2p.mM="6l";2p.84="2N";2p.83="2N";2p.mL="2N";2p.3V="2N";2p.fP=8b.1l()}N{if(8b){2p.fP=8b.1l();2p.mK="8a";2p.mJ="2N 6l"}}if(!D.1S.4r&&(n==(D.1S.89-1))){2p.3V="fO"}D.fI(6k,n,aX);D.fG(6k,n,aX);F 6k},fN:G(fK){D.1S={6g:"1p",3U:"aW",aV:"fM",5j:1h,3E:1m,4r:1m,fL:1m};B.J.2l(D.1S,fK);D.1S.89=(D.1S.4r?2:4)},aL:G(){u 88=D.1S.6g;if(D.6h(88,"1p","3D")){F""}u aU=(88.2A("tl")!=-1);u aT=(88.2A("tr")!=-1);if(aU&&aT){F""}if(aU){F"2I"}if(aT){F"3g"}F""},aK:G(){u 87=D.1S.6g;if(D.6h(87,"1p","6f")){F""}u aS=(87.2A("bl")!=-1);u aR=(87.2A("br")!=-1);if(aS&&aR){F""}if(aS){F"2I"}if(aR){F"3g"}F""},aQ:G(aN,aO){if(aN=="aP"){F aO}N{if(D.1S.3E){F D.1S.3E}N{if(D.1S.5j){F aO.fJ(aN)}}}F""},fI:G(el,n,fH){u 6j=D.fE(n)+"px";u aM=(fH=="3D"?D.aL():D.aK());u 4t=el.1T;if(aM=="2I"){4t.86=6j;4t.85="2N"}N{if(aM=="3g"){4t.85=6j;4t.86="2N"}N{4t.86=6j;4t.85=6j}}},fG:G(el,n,fF){u 6i=D.fz(n)+"px";u aJ=(fF=="3D"?D.aL():D.aK());u 4s=el.1T;if(aJ=="2I"){4s.84=6i;4s.83="2N"}N{if(aJ=="3g"){4s.83=6i;4s.84="2N"}N{4s.84=6i;4s.83=6i}}},fE:G(n){if(D.82){F 0}u o=D.1S;if(o.4r&&o.5j){u fD=[1,0];F fD[n]}N{if(o.4r){u fC=[2,1];F fC[n]}N{if(o.5j){u fB=[3,2,1,0];F fB[n]}N{u fA=[5,3,2,1];F fA[n]}}}},fz:G(n){u o=D.1S;u 5i;if(o.4r&&(o.5j||D.82)){F 1}N{if(o.4r){5i=[1,0]}N{if(o.5j){5i=[2,1,1,1]}N{if(o.3E){5i=[0,2,0,0]}N{if(D.82){5i=[5,3,2,1]}N{F 0}}}}}F 5i[n]},6h:G(1y){R(u i=1;i")}}})()}',62,1976,'||||||||||||||||||||||||||||||var|||||||MochiKit||this||return|function|typeof|self|Base|length|undefined|arguments|else|null||elem|for|DOM||repr|Color|rval|res|new||||||throw|Iter|||||next|name|push|src|catch|try|lst|true|obj|node|Async|toString|false|string|hue|all|dojo|NAME|Format|msg|Signal|red|apply|JSAN|str|EXPORT|func|rgb|_425|DateTime|getElement|blue|hsl|Logging|LoggingPane|type|__repr__|_event|while|doc|bind|num|iter|extend|options|style|prototype|seq|EXPORT_OK|Visual|VERSION|_document||_434||replace|forwardCall|StopIteration|use||Math|max|min|join|appendChild|__new__|button|compare|date|key|val|_329|EXPORT_TAGS|update|win|pair|concat|_596|dom|map|req|Deferred|sync|document|base|Error|number|partial|indexOf||instanceof|sig|not|cls|list|fired|left|stop|break|logger|require|0px|window|shift|hsv|split|createElement|_423|callee|continue|substring|provide|_exportSymbols|ccc||_464|||||||||step|pred|_51|__compat__|common|nameFunctions|right|255|_517|case|100|_loggingPane|value|object|callback|TypeError|_251|_246|_113|parentNode|display|_522|parseInt|cssText|wrap|info|isArrayLike|end|match|top|border|depends|args|substr|mouse|code|_519|_443|className|level|err|frac|Date|_135|_85|nodeType|color|height|and|_window|fromRGB|charAt||asHSL|_444|message||||filter||LogMessage|AdapterRegistry|_366|imap|NotFound|locked|counter|_262|_messages|operator|cmp|_165|_161|pairs|arr|_52|setAttribute|computedStyle|compact|_614|_610|div|_576|_572|_observers|splice|_565|_566|_555|scrollTop|page|modifier|white|_541|fromHSL|_539|_535|_528|clone|parseFloat|_505|pre|_499|_497|_427|createTextNode|_446|attributeArray|_388|_379|updateNodeAttributes|_341|_326||box|errback|results|paused|chain|_285||ofs||NamedError|_175|_147|_122|_83|_54|_17|childNodes|_619|blend|defaultView|_574|_569|idx|_562|must|_554|_specialKeys|body|Coordinates|registerComparator|_521|_516|hex|mid|_478|width|loggingPane|LogLevel|nwin|head|url|setElementClass|callStack|path|dest|_359|boolean|register|Dimensions|DeferredLock|_313|addCallback|_310|waiting|onreadystatechange|_290|LOCALE|year|printfire|_214|log|_213|_211|pos|_155|_153||typeMatcher|listMinMax|_114|_40|itr|typ|_19|_634|_625|bottom|corners|_hasString|_612|_608|_595|1px|DIV|firstChild|innerHTML|padding|getPropertyValue|asRGB|connect|_disconnect|_559|middle|which|clientY|scrollLeft|clientX|client|charCode|relatedTarget|event|toColorPart|clampColorComponent|_537|_534|toFixed|_468|buildAndApplyFilter|_442|_441|_440|_439|position|_463|_447|removeChild|_449|uid|_428|_426|compliant|attributes|_422|_409|_412|_400|_395|_390|_389|_377|_375|_363|attr|ctx|repeat|_340|_339|isNotEmpty|_335|_333|opera|DeferredList|ret|_309|silentlyCancelled|canceller|_nextId|Array|_293|XMLHttpRequest|chained|_281|tail|_252|_225|msec|day|month|iso|Logger|_208|listeners|_200|_198|_194|_196|reduce|range|_169|_162|truth|registerRepr|_121|_70|_58|_56|_47|_45|_41|_13|_1|script|text|uri|documentElement|_630|_629|isTransparent|borderRightWidth|borderLeftWidth|marginRight|marginLeft|_602|_599|numSlices|solid|_597|block|SPAN|_579|fromString|offsetParent|signal|disconnectAll|disconnect|_570|_563|_557|preventDefault|stopPropagation|clientTop|clientLeft|pageY|pageX|keyCode|meta|ctrl|alt|target|black|_532|_524|floor|_513|_512|_500|_495|toLowerCase|_487|DEBUG|INFO|WARNING|FATAL|ERROR|colorTable|logFont|closed|inline|onclick|_438|_437|_445|RegExp|_452|space|title|updatetree|||||withDocument|withWindow||setDisplayForElement|none|renames|forEach|domConverters|escapeHTML|addElementClass|removeElementClass|once|_378|_380|_376|appendChildNodes|coerceToDOM|_355|opt|clientWidth|opacity|GenericError|fail|resultList|_307|_301|_fire|can|addCallbacks|_resback|percent|decimal|separator|twoDigitFloat|_274|_273|_264|_257|_250|_249|_254|_248|_243|_242|fmt|_240|_245|getTime|sec|hour|_209|slice|_206|iterateNextIter|registerIteratorFactory|arrayLikeIter|iteratorRegistry|takewhile|ifilterfalse|ifilter|_181|_176|_168|_166|_159|_tee|deque|arg|fun|jsonRegistry|reprString|reprRegistry|comparatorRegistry|urlEncode|_110|_108|cur|_95|_87|_71|im_preargs||_53|_57|_46|present|like|array|Argument|_15|_12|_632|_631|_633|SUBMODULES|only|_628|_627|_626|roundElement|_624|getElementsByTagAndClassName|_RoundCorners|_613|_whichSideBottom|_whichSideTop|_609|_605|_606|transparent|_borderColor|_604|_603|_601|_600|bgColor|fromElement|_594|_592|backgroundColor|_createCornerSlice|_createCorner|_590|_589|_587|_586|_581|_578|_577|currentDocument|fromBackground|errors|_568|_564||sigs|flattenArguments|_561|findIdentical|_560|_558||_556|attachEvent|addEventListener|funcOrStr|Event||_548|fromCharCode|String|_specialMacKeys|any|green|_namedColors|hsvToRGB|rgbToHSV|hslToRGB|rgbToHSL|_542|01|360|_fromColorString|_540|_536|_538|_529|_523|_518|fromComputedStyle|_511|_507|_508|_506|_501|fromHexString|_498|_496|_486|__class__|createLoggingPane|_459|_461|font|_462|_430|_435|1000|index|_460|getMessages|removeListener|_451||_457|_450|infore|_448|_456|logDebug|offsetHeight|span|input|_436|TR||HTML|open|alert|currentWindow|swapDOM|SELECT|FORM|INPUT|createDOMFunc|ignoreAttr|_421|call|_417|_410|_415|nodeName|_414|_413|emitHTML|good|_406|_399|_397|_393|_392|addLoadEvent|addToCallStack|_387|_386|_381|_382|_383|_373|_372|_369|createDOM|_365|Function|_360|_362|_358|_344|nodeWalk|formContents|_337|_338|_334|_332|offsetTop|offsetLeft|visibility|parentElement|||XMLHttpRequestError|BrowserComplianceError|CancelledError|AlreadyCalledError|evalJSONRequest|sendXMLHttpRequest|wait|doSimpleXMLHttpRequest|getXMLHttpRequest|succeed|_312|finishedCount|_308|_cbDeferred|_303|_297|queryString|_nothing|_289|XMLHTTP|ActiveXObject|eval|_284|_check|error|_279|default|rstrip|lstrip|formatLocale|roundToFixed|truncToFixed|_276|pow|_272|_271|_270|sign|_265|_263|tmp|_238|_232|toISODate|toISOTime|getFullYear|getDate|getMonth|_230|_padTwo|_228|useNativeConsole|_212|compareLogMessage|isLogMessage|unshift|_207||maxSize|_202|_199|logLevelAtLeast|console|hasIterateNext|iterateNext|arrayLike|groupby||exhaust|tee|dropwhile|applymap||islice|izip|cycle|count||_189|_188|_183|_185|_184|_186|_187|_182|identity|fetch|_180|_177|listMin|reprNumber|reprArrayLike|compareArrayLike|compareDateLike|isDateLike|findValue|_128|__export__|keyComparator|_124|_118|_93|_94|_90|_88|_84|_77|_68|_67|_66|_65|_60|im_func|_55|im_self|_48|_44|_42|_39|_36|_33|_27|_26|_25|_22|_24|_20|javascript|write|getAttribute||org|www|http|getElementsByTagName|roundClass|_623|_622|_621|_620|_isBottomRounded|_isTopRounded|_borderSize|_618|_617|_616|_615|_marginSize|_611|_setBorder|_607|_setMargin|blendedColor|_598|__unstable__wrapElement|fromParent|_setOptions|2px|borderColor|_593|hidden|overflow|_591|_588|_roundBottomCorners|_585|_roundTopCorners|_584|_583|_582|_580|_renderBorder|_roundCornersImpl|getComputedStyle|_doWrap|_571|_unloadCache|onunload|detachEvent|removeEventListener|_listener|objOrFunc|_552||_551|_549|onload|delete|112|KEY_F|KEY_|MINUS|KEY_SEMICOLON|KEY_DELETE|KEY_INSERT|KEY_ARROW_DOWN|KEY_ARROW_RIGHT|KEY_ARROW_UP||KEY_ARROW_LEFT|KEY_HOME|KEY_END|KEY_PAGE_DOWN|KEY_PAGE_UP|KEY_ENTER|KEY_NUM_PAD_CLEAR|63236|mousemove|contextmenu|click|mouseout|mouseover|_src|yellow|708090|purple|orange|ff00ff|magenta|778899|d3d3d3|808080|gray|696969|2f4f4f|darkred|a9a9a9|00ffff|cyan|brown|_547|_546||||compareRGB|_545||_543|fromHSLString|fromRGBString|round|_533|_hslValue|switch|background|_503|_504||fromName|_488|col|toRGBString|_hexString|_rgbString|_hslString|toPrecision|isLight||_481|_477|_476|_475|_474|_473|_469|_466|closePane|_458|onkeypress|_454|addListener|_455|close|test|scrollHeight|option|word|moz|_431|getElementById|html|pop|200|_|removeElement|showElement|hideElement|CANVAS|STRONG|FIELDSET|LEGEND|OPTGROUP|OPTION|TEXTAREA|LABEL|HR|BR|H3|H2|H1|PRE|TT|BUTTON|IMG|TH||TABLE||TFOOT|THEAD|TBODY|TD|LI|OL|||UL|checked|class|ignoreAttrFilter||_424|_419|nodeValue|scrapeText|_416|_418|sort|_411|toHTML|_404|hasElementClass|_403|_402|_401|swapElementClass|_398|_394|toggleElementClass|_391|focusOnLoad|_newCallStack|currentStyle|_371|replaceChildNodes|_364|_361|getNodeAttribute|_357|setNodeAttribute|_354|_352|_350|_353|toDOM|_346|_345|registerDOMConverter|selectedIndex|setElementPosition|setElementDimensions|tagName|absolute|getBoxObjectFor|getBoundingClientRect|elementPosition|_325|_324|_322|_323|offsetWidth|elementDimensions|clientHeight|innerWidth|getViewportDimensions|setOpacity|status|_317|deferred|_316|_newNamedError|maybeDeferred||gatherResults|callLater|loadJSONDoc|_311|consumeErrors|fireOnOneErrback|fireOnOneCallback|addErrback|_305|_304|_306|unlocked|release|_300|_299|_298|_296|_xhr_onreadystatechange|_xhr_canceller|304|responseText|Msxml2|addBoth|_pause|_continue|result|the|are|they|instances|_unpause|cancel|_280|_278|en_US|strip|percentFormat|twoDigitAverage|numberFormatter|_277|_275|isNaN|_259|_258|_260|_255|_253|_numberFormatter|_241|_239|_237|_236|_235|_234|_233|_231|toAmericanDate|toPaddedAmericanDate|americanDate|toISOTimestamp|isoTimestamp|isoDate|foot|sep||60000|_221|_isoRegexp|dispatchEvent|createEvent|warning|logWarning|fatal|logFatal|debug|logError|baseLog|_210|getMessageText|logToConsole|dispatchListeners|_204|_203|ident|_201|postError|alertListener|_197|_192|groupby_as_array|iextend|some|reversed|sorted|every|sum|_190|eat|_174|_173|_172|_171|_167|_163|_158|_157|_151|_144|_141||_139|_136|_134||_133|_132|zip|merge|isUndefined|isCallable|listMax|_131|_130|encodeURIComponent||_127|method|parseQueryString|evalJSON|registerJSON|serializeJSON|objMin|objMax|reverseKeyComparator|arrayEqual|objEqual|bindMethods|xfilter|xmap|isEmpty|isNull|isUndefinedOrNull|itemgetter|items|keys|setdefault|_126|_120|decodeURIComponent|_119|len|_109|_107|_104|_105|_101|_102|_98|||_100|_97|_96|_91|json|__json__|_82|_81|_80|_79|_76||_75|_74|_73|_69|_primitives|_64|_63||_62|_61|_59|_wrapDumbFunction|_49|_50|_31|_30|_21|_7|application|MochiKit_|createElementNS|namespaceURI|lastIndexOf|xul|there|gatekeeper|keymaster|mozilla|getElementsComputedStyle|_hasSingleTextChild|borderWidth|borderStyle|borderBottomWidth|borderTopWidth|borderTopStyle|fontSize|paddingBottom|insertBefore|paddingTop|marginBottom|marginTop|_575|property|see|handling|thrown|Multiple|element|||given|123|KEY_NUM_PAD_|105|KEY_APOSTROPHE|222|KEY_RIGHT_SQUARE_BRACKET|221|KEY_REVERSE_SOLIDUS|220|KEY_LEFT_SQUARE_BRACKET||219|KEY_GRAVE_ACCENT|192|KEY_SOLIDUS|191|KEY_FULL_STOP|190|KEY_HYPHEN|189||KEY_COMMA|188|KEY_EQUALS_SIGN|187|186|KEY_SCROLL_LOCK|145|KEY_NUM_LOCK|144|KEY_NUM_PAD_SOLIDUS|111|KEY_NUM_PAD_FULL_STOP|110|KEY_NUM_PAD_HYPHEN|109|KEY_NUM_PAD_PLUS_SIGN|107|KEY_NUM_PAD_ASTERISK|106|KEY_SELECT|KEY_WINDOWS_RIGHT|KEY_WINDOWS_LEFT|KEY_PRINT_SCREEN|KEY_SPACEBAR|KEY_ESCAPE|KEY_CAPS_LOCK|KEY_PAUSE|KEY_ALT|KEY_CTRL|KEY_SHIFT|KEY_TAB|KEY_BACKSPACE|63242|63272|63302|63233|63235|63232|63234|63273|63275|63277|63276|63289|returnValue|cancelBubble|keypress|KEY_UNKNOWN|keyup|keydown|shiftKey|metaKey||ctrlKey|altKey|toElement|srcElement|9acd32||yellowgreen||ffff00|f5f5f5|whitesmoke||ffffff|f5deb3|wheat|ee82ee|violet|40e0d0|turquoise|ff6347|tomato|d8bfd8|thistle|008080|teal|d2b48c|tan|4682b4|steelblue|00ff7f|springgreen|fffafa|snow|slategrey|slategray|6a5acd|slateblue|87ceeb|skyblue|c0c0c0|silver|a0522d|sienna|fff5ee|seashell|2e8b57|seagreen|f4a460|sandybrown|fa8072|salmon|8b4513|saddlebrown|4169e1|royalblue|bc8f8f|rosybrown|ff0000|800080|b0e0e6|powderblue|dda0dd|plum|ffc0cb|pink|cd853f||peru|ffdab9|peachpuff|ffefd5|papayawhip|db7093|palevioletred|afeeee|paleturquoise|98fb98|palegreen|eee8aa||palegoldenrod|da70d6|orchid|ff4500|orangered|ffa500|6b8e23|olivedrab|808000|olive|fdf5e6|oldlace|000080|navy|ffdead|navajowhite|ffe4b5|moccasin|ffe4e1|mistyrose|f5fffa|mintcream|191970|midnightblue|c71585|mediumvioletred|48d1cc|mediumturquoise|00fa9a|mediumspringgreen|7b68ee|mediumslateblue|3cb371|mediumseagreen|9370db|mediumpurple|ba55d3|mediumorchid|0000cd|mediumblue|66cdaa|mediumaquamarine|800000|maroon|faf0e6|linen|32cd32|limegreen|00ff00|lime|ffffe0|lightyellow|b0c4de|lightsteelblue|lightslategrey|lightslategray||87cefa|lightskyblue|20b2aa|lightseagreen|ffa07a|lightsalmon|ffb6c1|lightpink|lightgrey|90ee90|lightgreen|lightgray|fafad2|lightgoldenrodyellow|e0ffff|lightcyan|f08080|lightcoral|add8e6|lightblue|fffacd|lemonchiffon|7cfc00|lawngreen|fff0f5|lavenderblush|e6e6fa|lavender|f0e68c|khaki|fffff0|ivory|4b0082|indigo|cd5c5c|indianred|ff69b4|hotpink|f0fff0|honeydew|grey|adff2f|greenyellow|008000|daa520|goldenrod|ffd700||gold|f8f8ff|ghostwhite|dcdcdc|gainsboro|fuchsia|228b22|forestgreen|fffaf0|floralwhite|b22222|firebrick|1e90ff|dodgerblue|dimgrey|dimgray|00bfff|deepskyblue|ff1493|deeppink|9400d3|darkviolet|00ced1|darkturquoise|darkslategrey|darkslategray|483d8b|darkslateblue|8fbc8f|darkseagreen|e9967a|darksalmon|8b0000|9932cc|darkorchid|ff8c00|darkorange|556b2f|darkolivegreen|8b008b|darkmagenta|bdb76b|darkkhaki|darkgrey|006400|darkgreen|darkgray|b8860b|darkgoldenrod|008b8b|darkcyan|00008b|darkblue|dc143c|crimson|fff8dc|cornsilk|6495ed|cornflowerblue|ff7f50|coral|d2691e||chocolate|7fff00|chartreuse|5f9ea0|cadetblue|deb887|burlywood|a52a2a|8a2be2|blueviolet|0000ff|ffebcd||blanchedalmond|000000|ffe4c4|bisque|f5f5dc|beige|f0ffff|azure|7fffd4|aquamarine|aqua|faebd7|antiquewhite|f0f8ff|aliceblue|lightGray|darkGray|namedColors|blackColor|fromText|whiteColor|_510|_509|PI|rad|deg|transparentColor|_494|_493|_492|fromHSV|_491|_490|_489|asHSV|toHexString|rgba|hsla|toHSLString|isDark|lighterColorWithLevel|darkerColorWithLevel|colorWithLightness|colorWithSaturation|colorWithHue|colorWithAlpha||serif|sans|Verdana||8pt|8em|auto||Close|Clear||Load|Filter||10em||fixed|regex|emergency|line|margin|_Listener|dtd|loose|html4|w3|EN|Transitional|DTD|W3C|PUBLIC|DOCTYPE|blocking|due|debugging|able|Not|resizable|dependent|href|location|_MochiKit_LoggingPane|_429|canvas|strong|fieldset|legend|optgroup|select|form|textarea|label|img|table|tfoot|thead|tbody|htmlFor||useMap|usemap|defaultChecked|hasChildNodes|quot|amp|_405|focus|replaceChild|checkbox||radio|_win|BODY||safari|version|userAgent|navigator|innerHeight|alpha|khtml|Tried|acquire|clearTimeout|setTimeout|GET|ignore|send|abort|failed|Request|readyState|support|does|Browser|Microsoft|_288|_287|used|Deferreds|Chained|success|unfired|fr_FR|de_DE|00|abs|search|pattern|Invalid|getTimezoneOffset|getSeconds|getMinutes|getHours|UTC|3600000|initEvent|Events|debuggingBookmarklet|MESSAGES|LAST|_205|clear|ninfo|nlevel|timestamp|reverse|takes|initial|with|sequence|empty|iterable|numbers|dateLike|escape|find|forward|unregister|unescape|Object|compared|item|contains|logor|logand|cle|clt|cge|cgt|cne|ceq|zrshift|rshift|lshift|xor|mul|mod|sub|add|neg|lognot|_9|_2'.split('|'),0,{}) + + +/* + * jQuery 1.2.1 - New Wave Javascript + * + * Copyright (c) 2007 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $ + * $Rev: 3353 $ + */ + +var decompressedJQuery = function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(G(){9(1m E!="W")H w=E;H E=18.15=G(a,b){I 6 7u E?6.5N(a,b):1u E(a,b)};9(1m $!="W")H D=$;18.$=E;H u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;E.1b=E.3A={5N:G(c,a){c=c||U;9(1m c=="1M"){H m=u.2S(c);9(m&&(m[1]||!a)){9(m[1])c=E.4D([m[1]],a);J{H b=U.3S(m[3]);9(b)9(b.22!=m[3])I E().1Y(c);J{6[0]=b;6.K=1;I 6}J c=[]}}J I 1u E(a).1Y(c)}J 9(E.1n(c))I 1u E(U)[E.1b.2d?"2d":"39"](c);I 6.6v(c.1c==1B&&c||(c.4c||c.K&&c!=18&&!c.1y&&c[0]!=W&&c[0].1y)&&E.2h(c)||[c])},4c:"1.2.1",7Y:G(){I 6.K},K:0,21:G(a){I a==W?E.2h(6):6[a]},2o:G(a){H b=E(a);b.4Y=6;I b},6v:G(a){6.K=0;1B.3A.1a.16(6,a);I 6},N:G(a,b){I E.N(6,a,b)},4I:G(a){H b=-1;6.N(G(i){9(6==a)b=i});I b},1x:G(f,d,e){H c=f;9(f.1c==3X)9(d==W)I 6.K&&E[e||"1x"](6[0],f)||W;J{c={};c[f]=d}I 6.N(G(a){L(H b 1i c)E.1x(e?6.R:6,b,E.1e(6,c[b],e,a,b))})},17:G(b,a){I 6.1x(b,a,"3C")},2g:G(e){9(1m e!="5i"&&e!=S)I 6.4n().3g(U.6F(e));H t="";E.N(e||6,G(){E.N(6.3j,G(){9(6.1y!=8)t+=6.1y!=1?6.6x:E.1b.2g([6])})});I t},5m:G(b){9(6[0])E(b,6[0].3H).6u().3d(6[0]).1X(G(){H a=6;1W(a.1w)a=a.1w;I a}).3g(6);I 6},8m:G(a){I 6.N(G(){E(6).6q().5m(a)})},8d:G(a){I 6.N(G(){E(6).5m(a)})},3g:G(){I 6.3z(1q,Q,1,G(a){6.58(a)})},6j:G(){I 6.3z(1q,Q,-1,G(a){6.3d(a,6.1w)})},6g:G(){I 6.3z(1q,P,1,G(a){6.12.3d(a,6)})},50:G(){I 6.3z(1q,P,-1,G(a){6.12.3d(a,6.2q)})},2D:G(){I 6.4Y||E([])},1Y:G(t){H b=E.1X(6,G(a){I E.1Y(t,a)});I 6.2o(/[^+>] [^+>]/.14(t)||t.1g("..")>-1?E.4V(b):b)},6u:G(e){H f=6.1X(G(){I 6.67?E(6.67)[0]:6.4R(Q)});H d=f.1Y("*").4O().N(G(){9(6[F]!=W)6[F]=S});9(e===Q)6.1Y("*").4O().N(G(i){H c=E.M(6,"2P");L(H a 1i c)L(H b 1i c[a])E.1j.1f(d[i],a,c[a][b],c[a][b].M)});I f},1E:G(t){I 6.2o(E.1n(t)&&E.2W(6,G(b,a){I t.16(b,[a])})||E.3m(t,6))},5V:G(t){I 6.2o(t.1c==3X&&E.3m(t,6,Q)||E.2W(6,G(a){I(t.1c==1B||t.4c)?E.2A(a,t)<0:a!=t}))},1f:G(t){I 6.2o(E.1R(6.21(),t.1c==3X?E(t).21():t.K!=W&&(!t.11||E.11(t,"2Y"))?t:[t]))},3t:G(a){I a?E.3m(a,6).K>0:P},7c:G(a){I 6.3t("."+a)},3i:G(b){9(b==W){9(6.K){H c=6[0];9(E.11(c,"24")){H e=c.4Z,a=[],Y=c.Y,2G=c.O=="24-2G";9(e<0)I S;L(H i=2G?e:0,33=2G?e+1:Y.K;i<33;i++){H d=Y[i];9(d.26){H b=E.V.1h&&!d.9V["1Q"].9L?d.2g:d.1Q;9(2G)I b;a.1a(b)}}I a}J I 6[0].1Q.1p(/\\r/g,"")}}J I 6.N(G(){9(b.1c==1B&&/4k|5j/.14(6.O))6.2Q=(E.2A(6.1Q,b)>=0||E.2A(6.2H,b)>=0);J 9(E.11(6,"24")){H a=b.1c==1B?b:[b];E("9h",6).N(G(){6.26=(E.2A(6.1Q,a)>=0||E.2A(6.2g,a)>=0)});9(!a.K)6.4Z=-1}J 6.1Q=b})},4o:G(a){I a==W?(6.K?6[0].3O:S):6.4n().3g(a)},6H:G(a){I 6.50(a).28()},6E:G(i){I 6.2J(i,i+1)},2J:G(){I 6.2o(1B.3A.2J.16(6,1q))},1X:G(b){I 6.2o(E.1X(6,G(a,i){I b.2O(a,i,a)}))},4O:G(){I 6.1f(6.4Y)},3z:G(f,d,g,e){H c=6.K>1,a;I 6.N(G(){9(!a){a=E.4D(f,6.3H);9(g<0)a.8U()}H b=6;9(d&&E.11(6,"1I")&&E.11(a[0],"4m"))b=6.4l("1K")[0]||6.58(U.5B("1K"));E.N(a,G(){H a=c?6.4R(Q):6;9(!5A(0,a))e.2O(b,a)})})}};G 5A(i,b){H a=E.11(b,"1J");9(a){9(b.3k)E.3G({1d:b.3k,3e:P,1V:"1J"});J E.5f(b.2g||b.6s||b.3O||"");9(b.12)b.12.3b(b)}J 9(b.1y==1)E("1J",b).N(5A);I a}E.1k=E.1b.1k=G(){H c=1q[0]||{},a=1,2c=1q.K,5e=P;9(c.1c==8o){5e=c;c=1q[1]||{}}9(2c==1){c=6;a=0}H b;L(;a<2c;a++)9((b=1q[a])!=S)L(H i 1i b){9(c==b[i])6r;9(5e&&1m b[i]==\'5i\'&&c[i])E.1k(c[i],b[i]);J 9(b[i]!=W)c[i]=b[i]}I c};H F="15"+(1u 3D()).3B(),6p=0,5c={};E.1k({8a:G(a){18.$=D;9(a)18.15=w;I E},1n:G(a){I!!a&&1m a!="1M"&&!a.11&&a.1c!=1B&&/G/i.14(a+"")},4a:G(a){I a.2V&&!a.1G||a.37&&a.3H&&!a.3H.1G},5f:G(a){a=E.36(a);9(a){9(18.6l)18.6l(a);J 9(E.V.1N)18.56(a,0);J 3w.2O(18,a)}},11:G(b,a){I b.11&&b.11.27()==a.27()},1L:{},M:G(c,d,b){c=c==18?5c:c;H a=c[F];9(!a)a=c[F]=++6p;9(d&&!E.1L[a])E.1L[a]={};9(b!=W)E.1L[a][d]=b;I d?E.1L[a][d]:a},30:G(c,b){c=c==18?5c:c;H a=c[F];9(b){9(E.1L[a]){2E E.1L[a][b];b="";L(b 1i E.1L[a])1T;9(!b)E.30(c)}}J{2a{2E c[F]}29(e){9(c.53)c.53(F)}2E E.1L[a]}},N:G(a,b,c){9(c){9(a.K==W)L(H i 1i a)b.16(a[i],c);J L(H i=0,48=a.K;i<48;i++)9(b.16(a[i],c)===P)1T}J{9(a.K==W)L(H i 1i a)b.2O(a[i],i,a[i]);J L(H i=0,48=a.K,3i=a[0];i<48&&b.2O(3i,i,3i)!==P;3i=a[++i]){}}I a},1e:G(c,b,d,e,a){9(E.1n(b))b=b.2O(c,[e]);H f=/z-?4I|7T-?7Q|1r|69|7P-?1H/i;I b&&b.1c==4W&&d=="3C"&&!f.14(a)?b+"2T":b},1o:{1f:G(b,c){E.N((c||"").2l(/\\s+/),G(i,a){9(!E.1o.3K(b.1o,a))b.1o+=(b.1o?" ":"")+a})},28:G(b,c){b.1o=c!=W?E.2W(b.1o.2l(/\\s+/),G(a){I!E.1o.3K(c,a)}).66(" "):""},3K:G(t,c){I E.2A(c,(t.1o||t).3s().2l(/\\s+/))>-1}},2k:G(e,o,f){L(H i 1i o){e.R["3r"+i]=e.R[i];e.R[i]=o[i]}f.16(e,[]);L(H i 1i o)e.R[i]=e.R["3r"+i]},17:G(e,p){9(p=="1H"||p=="2N"){H b={},42,41,d=["7J","7I","7G","7F"];E.N(d,G(){b["7C"+6]=0;b["7B"+6+"5Z"]=0});E.2k(e,b,G(){9(E(e).3t(\':3R\')){42=e.7A;41=e.7w}J{e=E(e.4R(Q)).1Y(":4k").5W("2Q").2D().17({4C:"1P",2X:"4F",19:"2Z",7o:"0",1S:"0"}).5R(e.12)[0];H a=E.17(e.12,"2X")||"3V";9(a=="3V")e.12.R.2X="7g";42=e.7e;41=e.7b;9(a=="3V")e.12.R.2X="3V";e.12.3b(e)}});I p=="1H"?42:41}I E.3C(e,p)},3C:G(h,j,i){H g,2w=[],2k=[];G 3n(a){9(!E.V.1N)I P;H b=U.3o.3Z(a,S);I!b||b.4y("3n")==""}9(j=="1r"&&E.V.1h){g=E.1x(h.R,"1r");I g==""?"1":g}9(j.1t(/4u/i))j=y;9(!i&&h.R[j])g=h.R[j];J 9(U.3o&&U.3o.3Z){9(j.1t(/4u/i))j="4u";j=j.1p(/([A-Z])/g,"-$1").2p();H d=U.3o.3Z(h,S);9(d&&!3n(h))g=d.4y(j);J{L(H a=h;a&&3n(a);a=a.12)2w.4w(a);L(a=0;a<2w.K;a++)9(3n(2w[a])){2k[a]=2w[a].R.19;2w[a].R.19="2Z"}g=j=="19"&&2k[2w.K-1]!=S?"2s":U.3o.3Z(h,S).4y(j)||"";L(a=0;a<2k.K;a++)9(2k[a]!=S)2w[a].R.19=2k[a]}9(j=="1r"&&g=="")g="1"}J 9(h.3Q){H f=j.1p(/\\-(\\w)/g,G(m,c){I c.27()});g=h.3Q[j]||h.3Q[f];9(!/^\\d+(2T)?$/i.14(g)&&/^\\d/.14(g)){H k=h.R.1S;H e=h.4v.1S;h.4v.1S=h.3Q.1S;h.R.1S=g||0;g=h.R.71+"2T";h.R.1S=k;h.4v.1S=e}}I g},4D:G(a,e){H r=[];e=e||U;E.N(a,G(i,d){9(!d)I;9(d.1c==4W)d=d.3s();9(1m d=="1M"){d=d.1p(/(<(\\w+)[^>]*?)\\/>/g,G(m,a,b){I b.1t(/^(70|6Z|6Y|9Q|4t|9N|9K|3a|9G|9E)$/i)?m:a+">"});H s=E.36(d).2p(),1s=e.5B("1s"),2x=[];H c=!s.1g("<9y")&&[1,"<24>",""]||!s.1g("<9w")&&[1,"<6T>",""]||s.1t(/^<(9u|1K|9t|9r|9p)/)&&[1,"<1I>",""]||!s.1g("<4m")&&[2,"<1I><1K>",""]||(!s.1g("<9m")||!s.1g("<9k"))&&[3,"<1I><1K><4m>",""]||!s.1g("<6Y")&&[2,"<1I><1K><6L>",""]||E.V.1h&&[1,"1s<1s>",""]||[0,"",""];1s.3O=c[1]+d+c[2];1W(c[0]--)1s=1s.5p;9(E.V.1h){9(!s.1g("<1I")&&s.1g("<1K")<0)2x=1s.1w&&1s.1w.3j;J 9(c[1]=="<1I>"&&s.1g("<1K")<0)2x=1s.3j;L(H n=2x.K-1;n>=0;--n)9(E.11(2x[n],"1K")&&!2x[n].3j.K)2x[n].12.3b(2x[n]);9(/^\\s/.14(d))1s.3d(e.6F(d.1t(/^\\s*/)[0]),1s.1w)}d=E.2h(1s.3j)}9(0===d.K&&(!E.11(d,"2Y")&&!E.11(d,"24")))I;9(d[0]==W||E.11(d,"2Y")||d.Y)r.1a(d);J r=E.1R(r,d)});I r},1x:G(c,d,a){H e=E.4a(c)?{}:E.5o;9(d=="26"&&E.V.1N)c.12.4Z;9(e[d]){9(a!=W)c[e[d]]=a;I c[e[d]]}J 9(E.V.1h&&d=="R")I E.1x(c.R,"9e",a);J 9(a==W&&E.V.1h&&E.11(c,"2Y")&&(d=="9d"||d=="9a"))I c.97(d).6x;J 9(c.37){9(a!=W){9(d=="O"&&E.11(c,"4t")&&c.12)6G"O 94 93\'t 92 91";c.90(d,a)}9(E.V.1h&&/6C|3k/.14(d)&&!E.4a(c))I c.4p(d,2);I c.4p(d)}J{9(d=="1r"&&E.V.1h){9(a!=W){c.69=1;c.1E=(c.1E||"").1p(/6O\\([^)]*\\)/,"")+(3I(a).3s()=="8S"?"":"6O(1r="+a*6A+")")}I c.1E?(3I(c.1E.1t(/1r=([^)]*)/)[1])/6A).3s():""}d=d.1p(/-([a-z])/8Q,G(z,b){I b.27()});9(a!=W)c[d]=a;I c[d]}},36:G(t){I(t||"").1p(/^\\s+|\\s+$/g,"")},2h:G(a){H r=[];9(1m a!="8P")L(H i=0,2c=a.K;i<2c;i++)r.1a(a[i]);J r=a.2J(0);I r},2A:G(b,a){L(H i=0,2c=a.K;i<2c;i++)9(a[i]==b)I i;I-1},1R:G(a,b){9(E.V.1h){L(H i=0;b[i];i++)9(b[i].1y!=8)a.1a(b[i])}J L(H i=0;b[i];i++)a.1a(b[i]);I a},4V:G(b){H r=[],2f={};2a{L(H i=0,6y=b.K;i<6y;i++){H a=E.M(b[i]);9(!2f[a]){2f[a]=Q;r.1a(b[i])}}}29(e){r=b}I r},2W:G(b,a,c){9(1m a=="1M")a=3w("P||G(a,i){I "+a+"}");H d=[];L(H i=0,4g=b.K;i<4g;i++)9(!c&&a(b[i],i)||c&&!a(b[i],i))d.1a(b[i]);I d},1X:G(c,b){9(1m b=="1M")b=3w("P||G(a){I "+b+"}");H d=[];L(H i=0,4g=c.K;i<4g;i++){H a=b(c[i],i);9(a!==S&&a!=W){9(a.1c!=1B)a=[a];d=d.8M(a)}}I d}});H v=8K.8I.2p();E.V={4s:(v.1t(/.+(?:8F|8E|8C|8B)[\\/: ]([\\d.]+)/)||[])[1],1N:/6w/.14(v),34:/34/.14(v),1h:/1h/.14(v)&&!/34/.14(v),35:/35/.14(v)&&!/(8z|6w)/.14(v)};H y=E.V.1h?"4h":"5h";E.1k({5g:!E.V.1h||U.8y=="8x",4h:E.V.1h?"4h":"5h",5o:{"L":"8w","8v":"1o","4u":y,5h:y,4h:y,3O:"3O",1o:"1o",1Q:"1Q",3c:"3c",2Q:"2Q",8u:"8t",26:"26",8s:"8r"}});E.N({1D:"a.12",8q:"15.4e(a,\'12\')",8p:"15.2I(a,2,\'2q\')",8n:"15.2I(a,2,\'4d\')",8l:"15.4e(a,\'2q\')",8k:"15.4e(a,\'4d\')",8j:"15.5d(a.12.1w,a)",8i:"15.5d(a.1w)",6q:"15.11(a,\'8h\')?a.8f||a.8e.U:15.2h(a.3j)"},G(i,n){E.1b[i]=G(a){H b=E.1X(6,n);9(a&&1m a=="1M")b=E.3m(a,b);I 6.2o(E.4V(b))}});E.N({5R:"3g",8c:"6j",3d:"6g",8b:"50",89:"6H"},G(i,n){E.1b[i]=G(){H a=1q;I 6.N(G(){L(H j=0,2c=a.K;j<2c;j++)E(a[j])[n](6)})}});E.N({5W:G(a){E.1x(6,a,"");6.53(a)},88:G(c){E.1o.1f(6,c)},87:G(c){E.1o.28(6,c)},86:G(c){E.1o[E.1o.3K(6,c)?"28":"1f"](6,c)},28:G(a){9(!a||E.1E(a,[6]).r.K){E.30(6);6.12.3b(6)}},4n:G(){E("*",6).N(G(){E.30(6)});1W(6.1w)6.3b(6.1w)}},G(i,n){E.1b[i]=G(){I 6.N(n,1q)}});E.N(["85","5Z"],G(i,a){H n=a.2p();E.1b[n]=G(h){I 6[0]==18?E.V.1N&&3y["84"+a]||E.5g&&38.33(U.2V["5a"+a],U.1G["5a"+a])||U.1G["5a"+a]:6[0]==U?38.33(U.1G["6n"+a],U.1G["6m"+a]):h==W?(6.K?E.17(6[0],n):S):6.17(n,h.1c==3X?h:h+"2T")}});H C=E.V.1N&&3x(E.V.4s)<83?"(?:[\\\\w*57-]|\\\\\\\\.)":"(?:[\\\\w\\82-\\81*57-]|\\\\\\\\.)",6k=1u 47("^>\\\\s*("+C+"+)"),6i=1u 47("^("+C+"+)(#)("+C+"+)"),6h=1u 47("^([#.]?)("+C+"*)");E.1k({55:{"":"m[2]==\'*\'||15.11(a,m[2])","#":"a.4p(\'22\')==m[2]",":":{80:"im[3]-0",2I:"m[3]-0==i",6E:"m[3]-0==i",3v:"i==0",3u:"i==r.K-1",6f:"i%2==0",6e:"i%2","3v-46":"a.12.4l(\'*\')[0]==a","3u-46":"15.2I(a.12.5p,1,\'4d\')==a","7X-46":"!15.2I(a.12.5p,2,\'4d\')",1D:"a.1w",4n:"!a.1w",7W:"(a.6s||a.7V||15(a).2g()||\'\').1g(m[3])>=0",3R:\'"1P"!=a.O&&15.17(a,"19")!="2s"&&15.17(a,"4C")!="1P"\',1P:\'"1P"==a.O||15.17(a,"19")=="2s"||15.17(a,"4C")=="1P"\',7U:"!a.3c",3c:"a.3c",2Q:"a.2Q",26:"a.26||15.1x(a,\'26\')",2g:"\'2g\'==a.O",4k:"\'4k\'==a.O",5j:"\'5j\'==a.O",54:"\'54\'==a.O",52:"\'52\'==a.O",51:"\'51\'==a.O",6d:"\'6d\'==a.O",6c:"\'6c\'==a.O",2r:\'"2r"==a.O||15.11(a,"2r")\',4t:"/4t|24|6b|2r/i.14(a.11)",3K:"15.1Y(m[3],a).K",7S:"/h\\\\d/i.14(a.11)",7R:"15.2W(15.32,G(1b){I a==1b.T;}).K"}},6a:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1u 47("^([:.#]*)("+C+"+)")],3m:G(a,c,b){H d,2b=[];1W(a&&a!=d){d=a;H f=E.1E(a,c,b);a=f.t.1p(/^\\s*,\\s*/,"");2b=b?c=f.r:E.1R(2b,f.r)}I 2b},1Y:G(t,o){9(1m t!="1M")I[t];9(o&&!o.1y)o=S;o=o||U;H d=[o],2f=[],3u;1W(t&&3u!=t){H r=[];3u=t;t=E.36(t);H l=P;H g=6k;H m=g.2S(t);9(m){H p=m[1].27();L(H i=0;d[i];i++)L(H c=d[i].1w;c;c=c.2q)9(c.1y==1&&(p=="*"||c.11.27()==p.27()))r.1a(c);d=r;t=t.1p(g,"");9(t.1g(" ")==0)6r;l=Q}J{g=/^([>+~])\\s*(\\w*)/i;9((m=g.2S(t))!=S){r=[];H p=m[2],1R={};m=m[1];L(H j=0,31=d.K;j<31;j++){H n=m=="~"||m=="+"?d[j].2q:d[j].1w;L(;n;n=n.2q)9(n.1y==1){H h=E.M(n);9(m=="~"&&1R[h])1T;9(!p||n.11.27()==p.27()){9(m=="~")1R[h]=Q;r.1a(n)}9(m=="+")1T}}d=r;t=E.36(t.1p(g,""));l=Q}}9(t&&!l){9(!t.1g(",")){9(o==d[0])d.44();2f=E.1R(2f,d);r=d=[o];t=" "+t.68(1,t.K)}J{H k=6i;H m=k.2S(t);9(m){m=[0,m[2],m[3],m[1]]}J{k=6h;m=k.2S(t)}m[2]=m[2].1p(/\\\\/g,"");H f=d[d.K-1];9(m[1]=="#"&&f&&f.3S&&!E.4a(f)){H q=f.3S(m[2]);9((E.V.1h||E.V.34)&&q&&1m q.22=="1M"&&q.22!=m[2])q=E(\'[@22="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.11(q,m[3]))?[q]:[]}J{L(H i=0;d[i];i++){H a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];9(a=="*"&&d[i].11.2p()=="5i")a="3a";r=E.1R(r,d[i].4l(a))}9(m[1]==".")r=E.4X(r,m[2]);9(m[1]=="#"){H e=[];L(H i=0;r[i];i++)9(r[i].4p("22")==m[2]){e=[r[i]];1T}r=e}d=r}t=t.1p(k,"")}}9(t){H b=E.1E(t,r);d=r=b.r;t=E.36(b.t)}}9(t)d=[];9(d&&o==d[0])d.44();2f=E.1R(2f,d);I 2f},4X:G(r,m,a){m=" "+m+" ";H c=[];L(H i=0;r[i];i++){H b=(" "+r[i].1o+" ").1g(m)>=0;9(!a&&b||a&&!b)c.1a(r[i])}I c},1E:G(t,r,h){H d;1W(t&&t!=d){d=t;H p=E.6a,m;L(H i=0;p[i];i++){m=p[i].2S(t);9(m){t=t.7O(m[0].K);m[2]=m[2].1p(/\\\\/g,"");1T}}9(!m)1T;9(m[1]==":"&&m[2]=="5V")r=E.1E(m[3],r,Q).r;J 9(m[1]==".")r=E.4X(r,m[2],h);J 9(m[1]=="["){H g=[],O=m[3];L(H i=0,31=r.K;i<31;i++){H a=r[i],z=a[E.5o[m[2]]||m[2]];9(z==S||/6C|3k|26/.14(m[2]))z=E.1x(a,m[2])||\'\';9((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1g(m[5])||O=="$="&&z.68(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1g(m[5])>=0)^h)g.1a(a)}r=g}J 9(m[1]==":"&&m[2]=="2I-46"){H e={},g=[],14=/(\\d*)n\\+?(\\d*)/.2S(m[3]=="6f"&&"2n"||m[3]=="6e"&&"2n+1"||!/\\D/.14(m[3])&&"n+"+m[3]||m[3]),3v=(14[1]||1)-0,d=14[2]-0;L(H i=0,31=r.K;i<31;i++){H j=r[i],12=j.12,22=E.M(12);9(!e[22]){H c=1;L(H n=12.1w;n;n=n.2q)9(n.1y==1)n.4U=c++;e[22]=Q}H b=P;9(3v==1){9(d==0||j.4U==d)b=Q}J 9((j.4U+d)%3v==0)b=Q;9(b^h)g.1a(j)}r=g}J{H f=E.55[m[1]];9(1m f!="1M")f=E.55[m[1]][m[2]];f=3w("P||G(a,i){I "+f+"}");r=E.2W(r,f,h)}}I{r:r,t:t}},4e:G(b,c){H d=[];H a=b[c];1W(a&&a!=U){9(a.1y==1)d.1a(a);a=a[c]}I d},2I:G(a,e,c,b){e=e||1;H d=0;L(;a;a=a[c])9(a.1y==1&&++d==e)1T;I a},5d:G(n,a){H r=[];L(;n;n=n.2q){9(n.1y==1&&(!a||n!=a))r.1a(n)}I r}});E.1j={1f:G(g,e,c,h){9(E.V.1h&&g.4j!=W)g=18;9(!c.2u)c.2u=6.2u++;9(h!=W){H d=c;c=G(){I d.16(6,1q)};c.M=h;c.2u=d.2u}H i=e.2l(".");e=i[0];c.O=i[1];H b=E.M(g,"2P")||E.M(g,"2P",{});H f=E.M(g,"2t",G(){H a;9(1m E=="W"||E.1j.4T)I a;a=E.1j.2t.16(g,1q);I a});H j=b[e];9(!j){j=b[e]={};9(g.4S)g.4S(e,f,P);J g.7N("43"+e,f)}j[c.2u]=c;6.1Z[e]=Q},2u:1,1Z:{},28:G(d,c,b){H e=E.M(d,"2P"),2L,4I;9(1m c=="1M"){H a=c.2l(".");c=a[0]}9(e){9(c&&c.O){b=c.4Q;c=c.O}9(!c){L(c 1i e)6.28(d,c)}J 9(e[c]){9(b)2E e[c][b.2u];J L(b 1i e[c])9(!a[1]||e[c][b].O==a[1])2E e[c][b];L(2L 1i e[c])1T;9(!2L){9(d.4P)d.4P(c,E.M(d,"2t"),P);J d.7M("43"+c,E.M(d,"2t"));2L=S;2E e[c]}}L(2L 1i e)1T;9(!2L){E.30(d,"2P");E.30(d,"2t")}}},1F:G(d,b,e,c,f){b=E.2h(b||[]);9(!e){9(6.1Z[d])E("*").1f([18,U]).1F(d,b)}J{H a,2L,1b=E.1n(e[d]||S),4N=!b[0]||!b[0].2M;9(4N)b.4w(6.4M({O:d,2m:e}));b[0].O=d;9(E.1n(E.M(e,"2t")))a=E.M(e,"2t").16(e,b);9(!1b&&e["43"+d]&&e["43"+d].16(e,b)===P)a=P;9(4N)b.44();9(f&&f.16(e,b)===P)a=P;9(1b&&c!==P&&a!==P&&!(E.11(e,\'a\')&&d=="4L")){6.4T=Q;e[d]()}6.4T=P}I a},2t:G(d){H a;d=E.1j.4M(d||18.1j||{});H b=d.O.2l(".");d.O=b[0];H c=E.M(6,"2P")&&E.M(6,"2P")[d.O],3q=1B.3A.2J.2O(1q,1);3q.4w(d);L(H j 1i c){3q[0].4Q=c[j];3q[0].M=c[j].M;9(!b[1]||c[j].O==b[1]){H e=c[j].16(6,3q);9(a!==P)a=e;9(e===P){d.2M();d.3p()}}}9(E.V.1h)d.2m=d.2M=d.3p=d.4Q=d.M=S;I a},4M:G(c){H a=c;c=E.1k({},a);c.2M=G(){9(a.2M)a.2M();a.7L=P};c.3p=G(){9(a.3p)a.3p();a.7K=Q};9(!c.2m&&c.65)c.2m=c.65;9(E.V.1N&&c.2m.1y==3)c.2m=a.2m.12;9(!c.4K&&c.4J)c.4K=c.4J==c.2m?c.7H:c.4J;9(c.64==S&&c.63!=S){H e=U.2V,b=U.1G;c.64=c.63+(e&&e.2R||b.2R||0);c.7E=c.7D+(e&&e.2B||b.2B||0)}9(!c.3Y&&(c.61||c.60))c.3Y=c.61||c.60;9(!c.5F&&c.5D)c.5F=c.5D;9(!c.3Y&&c.2r)c.3Y=(c.2r&1?1:(c.2r&2?3:(c.2r&4?2:0)));I c}};E.1b.1k({3W:G(c,a,b){I c=="5Y"?6.2G(c,a,b):6.N(G(){E.1j.1f(6,c,b||a,b&&a)})},2G:G(d,b,c){I 6.N(G(){E.1j.1f(6,d,G(a){E(6).5X(a);I(c||b).16(6,1q)},c&&b)})},5X:G(a,b){I 6.N(G(){E.1j.28(6,a,b)})},1F:G(c,a,b){I 6.N(G(){E.1j.1F(c,a,6,Q,b)})},7x:G(c,a,b){9(6[0])I E.1j.1F(c,a,6[0],P,b)},25:G(){H a=1q;I 6.4L(G(e){6.4H=0==6.4H?1:0;e.2M();I a[6.4H].16(6,[e])||P})},7v:G(f,g){G 4G(e){H p=e.4K;1W(p&&p!=6)2a{p=p.12}29(e){p=6};9(p==6)I P;I(e.O=="4x"?f:g).16(6,[e])}I 6.4x(4G).5U(4G)},2d:G(f){5T();9(E.3T)f.16(U,[E]);J E.3l.1a(G(){I f.16(6,[E])});I 6}});E.1k({3T:P,3l:[],2d:G(){9(!E.3T){E.3T=Q;9(E.3l){E.N(E.3l,G(){6.16(U)});E.3l=S}9(E.V.35||E.V.34)U.4P("5S",E.2d,P);9(!18.7t.K)E(18).39(G(){E("#4E").28()})}}});E.N(("7s,7r,39,7q,6n,5Y,4L,7p,"+"7n,7m,7l,4x,5U,7k,24,"+"51,7j,7i,7h,3U").2l(","),G(i,o){E.1b[o]=G(f){I f?6.3W(o,f):6.1F(o)}});H x=P;G 5T(){9(x)I;x=Q;9(E.V.35||E.V.34)U.4S("5S",E.2d,P);J 9(E.V.1h){U.7f("<7d"+"7y 22=4E 7z=Q "+"3k=//:><\\/1J>");H a=U.3S("4E");9(a)a.62=G(){9(6.2C!="1l")I;E.2d()};a=S}J 9(E.V.1N)E.4B=4j(G(){9(U.2C=="5Q"||U.2C=="1l"){4A(E.4B);E.4B=S;E.2d()}},10);E.1j.1f(18,"39",E.2d)}E.1b.1k({39:G(g,d,c){9(E.1n(g))I 6.3W("39",g);H e=g.1g(" ");9(e>=0){H i=g.2J(e,g.K);g=g.2J(0,e)}c=c||G(){};H f="4z";9(d)9(E.1n(d)){c=d;d=S}J{d=E.3a(d);f="5P"}H h=6;E.3G({1d:g,O:f,M:d,1l:G(a,b){9(b=="1C"||b=="5O")h.4o(i?E("<1s/>").3g(a.40.1p(/<1J(.|\\s)*?\\/1J>/g,"")).1Y(i):a.40);56(G(){h.N(c,[a.40,b,a])},13)}});I 6},7a:G(){I E.3a(6.5M())},5M:G(){I 6.1X(G(){I E.11(6,"2Y")?E.2h(6.79):6}).1E(G(){I 6.2H&&!6.3c&&(6.2Q||/24|6b/i.14(6.11)||/2g|1P|52/i.14(6.O))}).1X(G(i,c){H b=E(6).3i();I b==S?S:b.1c==1B?E.1X(b,G(a,i){I{2H:c.2H,1Q:a}}):{2H:c.2H,1Q:b}}).21()}});E.N("5L,5K,6t,5J,5I,5H".2l(","),G(i,o){E.1b[o]=G(f){I 6.3W(o,f)}});H B=(1u 3D).3B();E.1k({21:G(d,b,a,c){9(E.1n(b)){a=b;b=S}I E.3G({O:"4z",1d:d,M:b,1C:a,1V:c})},78:G(b,a){I E.21(b,S,a,"1J")},77:G(c,b,a){I E.21(c,b,a,"45")},76:G(d,b,a,c){9(E.1n(b)){a=b;b={}}I E.3G({O:"5P",1d:d,M:b,1C:a,1V:c})},75:G(a){E.1k(E.59,a)},59:{1Z:Q,O:"4z",2z:0,5G:"74/x-73-2Y-72",6o:Q,3e:Q,M:S},49:{},3G:G(s){H f,2y=/=(\\?|%3F)/g,1v,M;s=E.1k(Q,s,E.1k(Q,{},E.59,s));9(s.M&&s.6o&&1m s.M!="1M")s.M=E.3a(s.M);9(s.1V=="4b"){9(s.O.2p()=="21"){9(!s.1d.1t(2y))s.1d+=(s.1d.1t(/\\?/)?"&":"?")+(s.4b||"5E")+"=?"}J 9(!s.M||!s.M.1t(2y))s.M=(s.M?s.M+"&":"")+(s.4b||"5E")+"=?";s.1V="45"}9(s.1V=="45"&&(s.M&&s.M.1t(2y)||s.1d.1t(2y))){f="4b"+B++;9(s.M)s.M=s.M.1p(2y,"="+f);s.1d=s.1d.1p(2y,"="+f);s.1V="1J";18[f]=G(a){M=a;1C();1l();18[f]=W;2a{2E 18[f]}29(e){}}}9(s.1V=="1J"&&s.1L==S)s.1L=P;9(s.1L===P&&s.O.2p()=="21")s.1d+=(s.1d.1t(/\\?/)?"&":"?")+"57="+(1u 3D()).3B();9(s.M&&s.O.2p()=="21"){s.1d+=(s.1d.1t(/\\?/)?"&":"?")+s.M;s.M=S}9(s.1Z&&!E.5b++)E.1j.1F("5L");9(!s.1d.1g("8g")&&s.1V=="1J"){H h=U.4l("9U")[0];H g=U.5B("1J");g.3k=s.1d;9(!f&&(s.1C||s.1l)){H j=P;g.9R=g.62=G(){9(!j&&(!6.2C||6.2C=="5Q"||6.2C=="1l")){j=Q;1C();1l();h.3b(g)}}}h.58(g);I}H k=P;H i=18.6X?1u 6X("9P.9O"):1u 6W();i.9M(s.O,s.1d,s.3e);9(s.M)i.5C("9J-9I",s.5G);9(s.5y)i.5C("9H-5x-9F",E.49[s.1d]||"9D, 9C 9B 9A 5v:5v:5v 9z");i.5C("X-9x-9v","6W");9(s.6U)s.6U(i);9(s.1Z)E.1j.1F("5H",[i,s]);H c=G(a){9(!k&&i&&(i.2C==4||a=="2z")){k=Q;9(d){4A(d);d=S}1v=a=="2z"&&"2z"||!E.6S(i)&&"3U"||s.5y&&E.6R(i,s.1d)&&"5O"||"1C";9(1v=="1C"){2a{M=E.6Q(i,s.1V)}29(e){1v="5k"}}9(1v=="1C"){H b;2a{b=i.5s("6P-5x")}29(e){}9(s.5y&&b)E.49[s.1d]=b;9(!f)1C()}J E.5r(s,i,1v);1l();9(s.3e)i=S}};9(s.3e){H d=4j(c,13);9(s.2z>0)56(G(){9(i){i.9q();9(!k)c("2z")}},s.2z)}2a{i.9o(s.M)}29(e){E.5r(s,i,S,e)}9(!s.3e)c();I i;G 1C(){9(s.1C)s.1C(M,1v);9(s.1Z)E.1j.1F("5I",[i,s])}G 1l(){9(s.1l)s.1l(i,1v);9(s.1Z)E.1j.1F("6t",[i,s]);9(s.1Z&&!--E.5b)E.1j.1F("5K")}},5r:G(s,a,b,e){9(s.3U)s.3U(a,b,e);9(s.1Z)E.1j.1F("5J",[a,s,e])},5b:0,6S:G(r){2a{I!r.1v&&9n.9l=="54:"||(r.1v>=6N&&r.1v<9j)||r.1v==6M||E.V.1N&&r.1v==W}29(e){}I P},6R:G(a,c){2a{H b=a.5s("6P-5x");I a.1v==6M||b==E.49[c]||E.V.1N&&a.1v==W}29(e){}I P},6Q:G(r,b){H c=r.5s("9i-O");H d=b=="6K"||!b&&c&&c.1g("6K")>=0;H a=d?r.9g:r.40;9(d&&a.2V.37=="5k")6G"5k";9(b=="1J")E.5f(a);9(b=="45")a=3w("("+a+")");I a},3a:G(a){H s=[];9(a.1c==1B||a.4c)E.N(a,G(){s.1a(3f(6.2H)+"="+3f(6.1Q))});J L(H j 1i a)9(a[j]&&a[j].1c==1B)E.N(a[j],G(){s.1a(3f(j)+"="+3f(6))});J s.1a(3f(j)+"="+3f(a[j]));I s.66("&").1p(/%20/g,"+")}});E.1b.1k({1A:G(b,a){I b?6.1U({1H:"1A",2N:"1A",1r:"1A"},b,a):6.1E(":1P").N(G(){6.R.19=6.3h?6.3h:"";9(E.17(6,"19")=="2s")6.R.19="2Z"}).2D()},1z:G(b,a){I b?6.1U({1H:"1z",2N:"1z",1r:"1z"},b,a):6.1E(":3R").N(G(){6.3h=6.3h||E.17(6,"19");9(6.3h=="2s")6.3h="2Z";6.R.19="2s"}).2D()},6J:E.1b.25,25:G(a,b){I E.1n(a)&&E.1n(b)?6.6J(a,b):a?6.1U({1H:"25",2N:"25",1r:"25"},a,b):6.N(G(){E(6)[E(6).3t(":1P")?"1A":"1z"]()})},9c:G(b,a){I 6.1U({1H:"1A"},b,a)},9b:G(b,a){I 6.1U({1H:"1z"},b,a)},99:G(b,a){I 6.1U({1H:"25"},b,a)},98:G(b,a){I 6.1U({1r:"1A"},b,a)},96:G(b,a){I 6.1U({1r:"1z"},b,a)},95:G(c,a,b){I 6.1U({1r:a},c,b)},1U:G(k,i,h,g){H j=E.6D(i,h,g);I 6[j.3L===P?"N":"3L"](G(){j=E.1k({},j);H f=E(6).3t(":1P"),3y=6;L(H p 1i k){9(k[p]=="1z"&&f||k[p]=="1A"&&!f)I E.1n(j.1l)&&j.1l.16(6);9(p=="1H"||p=="2N"){j.19=E.17(6,"19");j.2U=6.R.2U}}9(j.2U!=S)6.R.2U="1P";j.3M=E.1k({},k);E.N(k,G(c,a){H e=1u E.2j(3y,j,c);9(/25|1A|1z/.14(a))e[a=="25"?f?"1A":"1z":a](k);J{H b=a.3s().1t(/^([+-]=)?([\\d+-.]+)(.*)$/),1O=e.2b(Q)||0;9(b){H d=3I(b[2]),2i=b[3]||"2T";9(2i!="2T"){3y.R[c]=(d||1)+2i;1O=((d||1)/e.2b(Q))*1O;3y.R[c]=1O+2i}9(b[1])d=((b[1]=="-="?-1:1)*d)+1O;e.3N(1O,d,2i)}J e.3N(1O,a,"")}});I Q})},3L:G(a,b){9(E.1n(a)){b=a;a="2j"}9(!a||(1m a=="1M"&&!b))I A(6[0],a);I 6.N(G(){9(b.1c==1B)A(6,a,b);J{A(6,a).1a(b);9(A(6,a).K==1)b.16(6)}})},9f:G(){H a=E.32;I 6.N(G(){L(H i=0;i-8O?r:3I(E.17(6.T,6.1e))||0},3N:G(c,b,e){6.5u=(1u 3D()).3B();6.1O=c;6.2D=b;6.2i=e||6.2i||"2T";6.2v=6.1O;6.4q=6.4i=0;6.4r();H f=6;G t(){I f.2F()}t.T=6.T;E.32.1a(t);9(E.32.K==1){H d=4j(G(){H a=E.32;L(H i=0;i6.Y.2e+6.5u){6.2v=6.2D;6.4q=6.4i=1;6.4r();6.Y.3M[6.1e]=Q;H a=Q;L(H i 1i 6.Y.3M)9(6.Y.3M[i]!==Q)a=P;9(a){9(6.Y.19!=S){6.T.R.2U=6.Y.2U;6.T.R.19=6.Y.19;9(E.17(6.T,"19")=="2s")6.T.R.19="2Z"}9(6.Y.1z)6.T.R.19="2s";9(6.Y.1z||6.Y.1A)L(H p 1i 6.Y.3M)E.1x(6.T.R,p,6.Y.3P[p])}9(a&&E.1n(6.Y.1l))6.Y.1l.16(6.T);I P}J{H n=t-6.5u;6.4i=n/6.Y.2e;6.4q=E.3J[6.Y.3J||(E.3J.5q?"5q":"6B")](6.4i,n,0,1,6.Y.2e);6.2v=6.1O+((6.2D-6.1O)*6.4q);6.4r()}I Q}};E.2j.2F={2R:G(a){a.T.2R=a.2v},2B:G(a){a.T.2B=a.2v},1r:G(a){E.1x(a.T.R,"1r",a.2v)},6z:G(a){a.T.R[a.1e]=a.2v+a.2i}};E.1b.6m=G(){H c=0,3E=0,T=6[0],5t;9(T)8L(E.V){H b=E.17(T,"2X")=="4F",1D=T.12,23=T.23,2K=T.3H,4f=1N&&3x(4s)<8J;9(T.6V){5w=T.6V();1f(5w.1S+38.33(2K.2V.2R,2K.1G.2R),5w.3E+38.33(2K.2V.2B,2K.1G.2B));9(1h){H d=E("4o").17("8H");d=(d=="8G"||E.5g&&3x(4s)>=7)&&2||d;1f(-d,-d)}}J{1f(T.5l,T.5z);1W(23){1f(23.5l,23.5z);9(35&&/^t[d|h]$/i.14(1D.37)||!4f)d(23);9(4f&&!b&&E.17(23,"2X")=="4F")b=Q;23=23.23}1W(1D.37&&!/^1G|4o$/i.14(1D.37)){9(!/^8D|1I-9S.*$/i.14(E.17(1D,"19")))1f(-1D.2R,-1D.2B);9(35&&E.17(1D,"2U")!="3R")d(1D);1D=1D.12}9(4f&&b)1f(-2K.1G.5l,-2K.1G.5z)}5t={3E:3E,1S:c}}I 5t;G d(a){1f(E.17(a,"9T"),E.17(a,"8A"))}G 1f(l,t){c+=3x(l)||0;3E+=3x(t)||0}}})();',62,616,'||||||this|||if|||||||||||||||||||||||||||||||||function|var|return|else|length|for|data|each|type|false|true|style|null|elem|document|browser|undefined||options|||nodeName|parentNode||test|jQuery|apply|css|window|display|push|fn|constructor|url|prop|add|indexOf|msie|in|event|extend|complete|typeof|isFunction|className|replace|arguments|opacity|div|match|new|status|firstChild|attr|nodeType|hide|show|Array|success|parent|filter|trigger|body|height|table|script|tbody|cache|string|safari|start|hidden|value|merge|left|break|animate|dataType|while|map|find|global||get|id|offsetParent|select|toggle|selected|toUpperCase|remove|catch|try|cur|al|ready|duration|done|text|makeArray|unit|fx|swap|split|target||pushStack|toLowerCase|nextSibling|button|none|handle|guid|now|stack|tb|jsre|timeout|inArray|scrollTop|readyState|end|delete|step|one|name|nth|slice|doc|ret|preventDefault|width|call|events|checked|scrollLeft|exec|px|overflow|documentElement|grep|position|form|block|removeData|rl|timers|max|opera|mozilla|trim|tagName|Math|load|param|removeChild|disabled|insertBefore|async|encodeURIComponent|append|oldblock|val|childNodes|src|readyList|multiFilter|color|defaultView|stopPropagation|args|old|toString|is|last|first|eval|parseInt|self|domManip|prototype|getTime|curCSS|Date|top||ajax|ownerDocument|parseFloat|easing|has|queue|curAnim|custom|innerHTML|orig|currentStyle|visible|getElementById|isReady|error|static|bind|String|which|getComputedStyle|responseText|oWidth|oHeight|on|shift|json|child|RegExp|ol|lastModified|isXMLDoc|jsonp|jquery|previousSibling|dir|safari2|el|styleFloat|state|setInterval|radio|getElementsByTagName|tr|empty|html|getAttribute|pos|update|version|input|float|runtimeStyle|unshift|mouseover|getPropertyValue|GET|clearInterval|safariTimer|visibility|clean|__ie_init|absolute|handleHover|lastToggle|index|fromElement|relatedTarget|click|fix|evt|andSelf|removeEventListener|handler|cloneNode|addEventListener|triggered|nodeIndex|unique|Number|classFilter|prevObject|selectedIndex|after|submit|password|removeAttribute|file|expr|setTimeout|_|appendChild|ajaxSettings|client|active|win|sibling|deep|globalEval|boxModel|cssFloat|object|checkbox|parsererror|offsetLeft|wrapAll|dequeue|props|lastChild|swing|handleError|getResponseHeader|results|startTime|00|box|Modified|ifModified|offsetTop|evalScript|createElement|setRequestHeader|ctrlKey|callback|metaKey|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxStop|ajaxStart|serializeArray|init|notmodified|POST|loaded|appendTo|DOMContentLoaded|bindReady|mouseout|not|removeAttr|unbind|unload|Width|keyCode|charCode|onreadystatechange|clientX|pageX|srcElement|join|outerHTML|substr|zoom|parse|textarea|reset|image|odd|even|before|quickClass|quickID|prepend|quickChild|execScript|offset|scroll|processData|uuid|contents|continue|textContent|ajaxComplete|clone|setArray|webkit|nodeValue|fl|_default|100|linear|href|speed|eq|createTextNode|throw|replaceWith|splice|_toggle|xml|colgroup|304|200|alpha|Last|httpData|httpNotModified|httpSuccess|fieldset|beforeSend|getBoundingClientRect|XMLHttpRequest|ActiveXObject|col|br|abbr|pixelLeft|urlencoded|www|application|ajaxSetup|post|getJSON|getScript|elements|serialize|clientWidth|hasClass|scr|clientHeight|write|relative|keyup|keypress|keydown|change|mousemove|mouseup|mousedown|right|dblclick|resize|focus|blur|frames|instanceof|hover|offsetWidth|triggerHandler|ipt|defer|offsetHeight|border|padding|clientY|pageY|Left|Right|toElement|Bottom|Top|cancelBubble|returnValue|detachEvent|attachEvent|substring|line|weight|animated|header|font|enabled|innerText|contains|only|size|gt|lt|uFFFF|u0128|417|inner|Height|toggleClass|removeClass|addClass|replaceAll|noConflict|insertAfter|prependTo|wrap|contentWindow|contentDocument|http|iframe|children|siblings|prevAll|nextAll|wrapInner|prev|Boolean|next|parents|maxLength|maxlength|readOnly|readonly|class|htmlFor|CSS1Compat|compatMode|compatible|borderTopWidth|ie|ra|inline|it|rv|medium|borderWidth|userAgent|522|navigator|with|concat|1px|10000|array|ig|PI|NaN|400|reverse|fast|600|slow|Function|Object|setAttribute|changed|be|can|property|fadeTo|fadeOut|getAttributeNode|fadeIn|slideToggle|method|slideUp|slideDown|action|cssText|stop|responseXML|option|content|300|th|protocol|td|location|send|cap|abort|colg|cos|tfoot|thead|With|leg|Requested|opt|GMT|1970|Jan|01|Thu|area|Since|hr|If|Type|Content|meta|specified|open|link|XMLHTTP|Microsoft|img|onload|row|borderLeftWidth|head|attributes'.split('|'),0,{}); + +/* + Copyright (c) 2004-2007, The Dojo Foundation + All Rights Reserved. + + Licensed under the Academic Free License version 2.1 or above OR the + modified BSD license. For more information on Dojo licensing, see: + + http://dojotoolkit.org/community/licensing.shtml +*/ + +/* + This is a compiled version of Dojo, built for deployment and not for + development. To get an editable version, please visit: + + http://dojotoolkit.org + + for documentation and information on getting the source. +*/ + +var decompressedDojo = function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('if(V z=="1k"){(B(){if(V D["1o"]=="1k"){D.1o={}}if((!D["1z"])||(!1z["ca"])){D.1z={}}A cn=["rA","rz","1K","ry","rx","9f","rw","rv","ru","rt","rs","rr","rq","ro","rn","rm"];A i=0,24;1s(24=cn[i++]){if(!1z[24]){1z[24]=B(){}}}if(V D["z"]=="1k"){D.z={}}z.1W=D;A d3={im:U,rl:U,rk:"",rj:"",ri:"",rh:K,rg:U};R(A 8z in d3){if(V 1o[8z]=="1k"){1o[8z]=d3[8z]}}A jK=["rf","rd","rc","rb"];A t;1s(t=jK.3a()){z["is"+t]=U}})();z.8h=1o.8h;z.cY={jJ:0,jI:9,jH:0,jG:"",jF:2V("$ra: r9 $".1f(/[0-9]+/)[0]),2i:B(){4G(z.cY){C jJ+"."+jI+"."+jH+jG+" ("+jF+")"}}};z.d1=B(jE,jD,1V){A 2h=1V||z.1W;R(A i=0,p;2h&&(p=jE[i]);i++){2h=(p in 2h?2h[p]:(jD?2h[p]={}:1k))}C 2h};z.88=B(jC,jA,jB){A d2=jC.1A("."),p=d2.8q(),M=z.d1(d2,K,jB);C(M&&p?(M[p]=jA):1k)};z.6q=B(jz,jy,jx){C z.d1(jz.1A("."),jy,jx)};z.r8=B(jw,M){C!!z.6q(jw,U,M)};z["3u"]=B(d0){C z.1W.3u?z.1W.3u(d0):3u(d0)};z.ia=B(jv,cZ,cX){A 8y="r7: "+jv;if(cZ){8y+=" "+cZ}if(cX){8y+=" -- r6 be r5 in cY: "+cX}1z.1K(8y)};z.r4=B(ju,cW){A cV="r3: "+ju+" -- r2 r1 4F r0 qZ qY.";if(cW){cV+=" "+cW}1z.1K(cV)};(B(){A cR={53:{},6p:0,1h:{},8k:{z:{1p:"z",1Z:"."},cU:{1p:"cU",1Z:"../qX/cU"},cT:{1p:"cT",1Z:"cT"}},cN:B(cS){A mp=D.8k;C jp(mp[cS]&&mp[cS].1Z)},jk:B(8x){A mp=D.8k;if(D.cN(8x)){C mp[8x].1Z}C 8x},8v:[],6t:U,56:[],8t:[],8u:U};R(A cQ in cR){z[cQ]=cR[cQ]}})();z.jg=B(8w,cP,cb){A 1g=(((8w.2s(0)=="/"||8w.1f(/^\\w+:/)))?"":D.51)+8w;if(1o.jt&&z.c8){1g+="?"+67(1o.jt).2f(/\\W+/g,"")}1u{C!cP?D.cO(1g,cb):D.jq(1g,cP,cb)}1y(e){1z.1K(e);C U}};z.cO=B(1g,cb){if(D.8v[1g]){C K}A 6u=D.iR(1g,K);if(!6u){C U}D.8v[1g]=K;D.8v.Y(1g);if(cb){6u="("+6u+")"}A jr=z["3u"](6u+"\\r\\n//@ qW="+1g);if(cb){cb(jr)}C K};z.jq=B(1g,jo,cb){A ok=U;1u{ok=D.cO(1g,cb)}1y(e){1z.1K("qV je ",1g," 4G 9f: ",e)}C jp(ok&&D.53[jo])};z.6m=B(){D.8u=K;D.6t=K;A 57=D.56;D.56=[];R(A x=0;x<57.G;x++){57[x]()}D.8u=U;if(z.6t&&z.6p==0&&D.56.G>0){z.8s()}};z.ck=B(){A 57=D.8t;1s(57.G){(57.8q())()}};z.qU=B(M,jn){A d=z;if(P.G==1){d.56.Y(M)}I{if(P.G>1){d.56.Y(B(){M[jn]()})}}if(d.6t&&d.6p==0&&!d.8u){d.8s()}};z.dW=B(M,jm){A d=z;if(P.G==1){d.8t.Y(M)}I{if(P.G>1){d.8t.Y(B(){M[jm]()})}}};z.iM=B(){if(D.6t){C}if(D.6p>0){1z.1K("qT qS in qR!");C}z.8s()};z.8s=B(){if(V 5c=="8b"||(1o["qQ"]&&z.2M)){5c("z.6m();",0)}I{z.6m()}};z.cF=B(jl){A 4v=jl.1A(".");R(A i=4v.G;i>0;i--){A 8r=4v.2w(0,i).22(".");if((i==1)&&!D.cN(8r)){4v[0]="../"+4v[0]}I{A cM=D.jk(8r);if(cM!=8r){4v.3S(0,i,cM);3f}}}C 4v};z.jj=U;z.8m=B(2T,qP,55){55=D.jj||55;A 54=D.53[2T];if(54){C 54}A cL=2T.1A(".");A 3L=D.cF(2T);A jh=((3L[0].2s(0)!="/")&&!3L[0].1f(/^\\w+:/));A ji=3L[3L.G-1];A 3m;if(ji=="*"){2T=cL.2w(0,-1).22(".");3L.8q();3m=3L.22("/")+"/"+(1o["qO"]||"qN")+".js";if(jh&&3m.2s(0)=="/"){3m=3m.2w(1)}}I{3m=3L.22("/")+".js";2T=cL.22(".")}A jf=(!55)?2T:L;A ok=D.jg(3m,jf);if((!ok)&&(!55)){2m S 1O("qM 3O 4E \'"+2T+"\'; 72 qL \'"+3m+"\'")}if((!55)&&(!D["qK"])){54=D.53[2T];if(!54){2m S 1O("qJ \'"+2T+"\' is 3O qI a8 je \'"+3m+"\'")}}C 54};z.8c=z.8m;z.1Q=B(cK){A cJ=cK+"";A 8p=cJ;A 6s=cK.1A(/\\./);if(6s[6s.G-1]=="*"){6s.8q();8p=6s.22(".")}A 8o=z.6q(8p,K);D.53[cJ]=8o;D.53[8p]=8o;C 8o};z.qH=B(8n){A jd=8n["qG"]||[];A cI=jd.3U(8n[z.j4]||8n["aY"]||[]);R(A x=0;x0&&!(j==1&&1X[0]=="")&&1X[j]==".."&&1X[j-1]!=".."){if(j==(1X.G-1)){1X.3S(j,1);1X[j-1]=""}I{1X.3S(j-1,2);j-=2}}}}1t.28=1X.22("/")}}}}1g="";if(1t.4t){1g+=1t.4t+":"}if(1t.3l){1g+="//"+1t.3l}1g+=1t.28;if(1t.1r){1g+="?"+1t.1r}if(1t.52){1g+="#"+1t.52}}D.1g=1g.2i();A r=D.1g.1f(j7);D.4t=r[2]||(r[1]?"":n);D.3l=r[4]||(r[3]?"":n);D.28=r[5];D.1r=r[7]||(r[6]?"":n);D.52=r[9]||(r[8]?"":n);if(D.3l!=n){r=D.3l.1f(j6);D.8X=r[3]||n;D.8W=r[4]||n;D.qw=r[5];D.qv=r[7]||n}};z.4r.1C.2i=B(){C D.1g}})();z.qu=B(j5,2E){A 2B=z.cF(j5).22("/");if(!2B){C L}if(2B.31("/")!=2B.G-1){2B+="/"}A cE=2B.T(":");if(2B.2s(0)!="/"&&(cE==-1||cE>2B.T("/"))){2B=z.51+2B}C S z.4r(2B,2E)};if(V 26!="1k"){z.c8=K;z.j4="qt";(B(){A d=z;if(1q&&1q.4I){A 8j=1q.4I("ak");A j3=/z(\\.qs)?\\.js([\\?\\.]|$)/i;R(A i=0;i<8j.G;i++){A 4X=8j[i].5t("4X");if(!4X){6c}A m=4X.1f(j3);if(m){if(!1o["51"]){1o["51"]=4X.21(0,m.hK)}A cD=8j[i].5t("1o");if(cD){A cC=3u("({ "+cD+" })");R(A x in cC){1o[x]=cC[x]}}3f}}}d.51=1o["51"];A n=cq;A 8i=n.iL;A 4Z=n.qr;A 6r=2k(4Z);d.2M=(8i.T("qq")>=0)?6r:0;d.6B=(4Z.T("qo")>=0)||(4Z.T("j2")>=0)?6r:0;d.3o=(4Z.T("j2")>=0)?6r:0;A j1=8i.T("qn");d.gu=d.7B=((j1>=0)&&(!d.6B))?6r:0;d.j0=0;d.1l=0;d.iV=0;1u{if(d.7B){d.j0=2k(8i.1A("qm/")[1].1A(" ")[0])}if((1q.gx)&&(!d.2M)){d.1l=2k(4Z.1A("qk ")[1].1A(";")[0])}}1y(e){}if(z.1l&&(26.8f.cu==="9q:")){1o.iT=K}d.iX=B(){A 2A;A qj;A cB=d.6q("cz.cy");if(cB){C cB}if(V iZ!="1k"){2A=S iZ()}I{if(d.1l){1u{2A=S 9j("qi.qh")}1y(e){}}I{if(cq.qg["8Z/x-iY"]){2A=1q.a9("8b");2A.cA("Z","8Z/x-iY");2A.cA("3n",0);2A.cA("58",0);2A.1c.gq="7C";1q.5K.4c(2A)}}}if(!2A){C L}z.88("cz.cy.qf",2A);C z.6q("cz.cy")};A iW=d.iX();if(iW){d.iV=K}A cm=1q["aX"];d.qe=(cm=="aW")||(cm=="gr")||(d.1l<6);d.8h=1o.8h||(d.1l?n.qd:n.qc).1M();d.qb=1z.1K;d.cx=["iU.8g","em.8g","iU.8g.4.0"];d.9b=B(){A 4s=L;A cv=L;if(!z.1l||!1o.iT){1u{4s=S qa()}1y(e){}}if(!4s){R(A i=0;i<3;++i){A cw=z.cx[i];1u{4s=S 9j(cw)}1y(e){cv=e}if(4s){z.cx=[cw];3f}}}if(!4s){2m S 1O("8g 3O q9: "+cv)}C 4s};d.8Y=B(iS){A 4Y=iS.3N||0;C((4Y>=q8)&&(4Y0);d.iR=B(1g,iP){A 3K=D.9b();if(!iQ&&z.4r){1g=(S z.4r(26.8f,1g)).2i()}3K.dL("dD",1g,U);1u{3K.dI(L);if(!d.8Y(3K)){A 1G=1O("q2 4F 4E "+1g+" 3N:"+3K.3N);1G.3N=3K.3N;1G.2G=3K.2G;2m 1G}}1y(e){if(iP){C L}2m e}C 3K.2G}})();z.iO=U;z.6o=B(e){z.iO=K;A cr=(e&&e.Z)?e.Z.1M():"4E";if(P.2O.iN||(cr!="q1"&&cr!="4E")){C}P.2O.iN=K;if(V z["8e"]!="1k"){dX(z.8e);63 z.8e}if(z.6p==0){z.iM()}};if(1q.66){if(z.2M||(z.7B&&(1o["q0"]===K))){1q.66("pZ",z.6o,L)}26.66("4E",z.6o,L)}if(/(pY|pX)/i.6Z(cq.iL)){z.8e=dN(B(){if(/6m|iJ/.6Z(1q.6F)){z.6o()}},10)}(B(){A 3g=26;A 8d=B(cp,fp){A iK=3g[cp]||B(){};3g[cp]=B(){fp.14(3g,P);iK.14(3g,P)}};if(z.1l){1q.fJ(""+"");A co=K;8d("iG",B(){3g.5c(B(){co=U},0)});8d("pU",B(){if(co){z.ck()}});1u{1q.pT.2P("v","pS:pR-pQ-pP:pO");1q.pN().pM("v\\\\:*","pL:2E(#aY#pK)")}1y(e){}}I{8d("iG",B(){z.ck()})}})();z.pJ=B(){};z.1e=26["1q"]||L;z.3E=B(){C z.1e.3E||z.1e.4I("3E")[0]};z.ch=B(iF,iE){z.1W=iF;z.1e=iE};z.cf=B(4q,6n,iD){if((6n)&&((V 4q=="3c")||(4q 1N 67))){4q=6n[4q]}C(6n?4q.14(6n,iD||[]):4q())};z.pI=B(cj,iC,iB,iA){A cg;A iz=z.1W;A iy=z.1e;1u{z.ch(cj,cj.1q);cg=z.cf(iC,iB,iA)}ir{z.ch(iz,iy)}C cg};z.pH=B(ix,iw,iv,iu){A ce;A ip=z.1e;1u{z.1e=ix;ce=z.cf(iw,iv,iu)}ir{z.1e=ip}C ce};if(1o["cd"]){R(A cc in 1o["cd"]){z.io(cc,1o["cd"][cc])}}}if(1o.im){if(!1z.ca){z.8c("z.pG.ca")}}}if(!z.1h["z.X.c9"]){z.1h["z.X.c9"]=K;z.1Q("z.X.c9");z.1R=B(it){C(V it=="3c"||it 1N 67)};z.2l=B(it){C(it&&it 1N 4e||V it=="6a"||((V z["1H"]!="1k")&&(it 1N z.1H)))};if(z.c8&&z.3o){z.1Y=B(it){if((V(it)=="B")&&(it=="[8b 1H]")){C U}C(V it=="B"||it 1N bI)}}I{z.1Y=B(it){C(V it=="B"||it 1N bI)}}z.ib=B(it){if(V it=="1k"){C U}C(it===L||V it=="8b"||z.2l(it)||z.1Y(it))};z.pF=B(it){A d=z;if((!it)||(V it=="1k")){C U}if(d.1R(it)){C U}if(d.1Y(it)){C U}if(d.2l(it)){C K}if((it.5w)&&(it.5w.1M()=="3R")){C U}if(pE(it.G)){C K}C U};z.pD=B(it){if(!it){C U}C!z.1Y(it)&&/\\{\\s*\\[il 5h\\]\\s*\\}/.6Z(67(it))};z.c7=B(M,4W){A 8a={};R(A x in 4W){if((V 8a[x]=="1k")||(8a[x]!=4W[x])){M[x]=4W[x]}}if(z.1l){A p=4W.2i;if((V(p)=="B")&&(p!=M.2i)&&(p!=8a.2i)&&(p!="\\pC 2i() {\\n [il 5h]\\n}\\n")){M.2i=4W.2i}}C M};z.1x=B(M,pB){R(A i=1,l=P.G;i2){C z.ig.14(z,P)}if(!3k){3k=2z;2z=L}if(z.1R(3k)){2z=2z||z.1W;if(!2z[3k]){2m(["z.2p: ie[\\"",3k,"\\"] is L (ie=\\"",2z,"\\")"].22(""))}C B(){C 2z[3k].14(2z,P||[])}}I{C(!2z?3k:B(){C 3k.14(2z,P||[])})}};z.6j=B(M,c3){B c4(){};c4.1C=M;A c2=S c4();if(c3){z.1x(c2,c3)}C c2};z.7X=B(pz){A Q=[L];C z.2p.14(z,Q.3U(z.4d(P)))};z.4d=B(M,ic){A Q=[];R(A x=ic||0;x3)){z.ia("z.2r: R 9P \'"+6l+"\' py pw B as \'1P\' pv pu of as a pt i3.","","1.0");A c=3j;3j=P[3]||{};3j.1P=c}A dd=P.2O,4V=L;if(z.2l(4p)){4V=4p;4p=4V.3a()}if(4V){R(A i=0,m;i<4V.G;i++){m=4V[i];if(!m){2m("ps #"+i+" 4F pr of "+6l+" is L. pq\'s pp a po pl is 3O 6m.")}4p=dd.6j(4p,m)}}A i9=(3j||0).1P,6k=dd.6j(4p),fn;R(A i in 3j){if(z.1Y(fn=3j[i])&&(!0[i])){fn.i4=i}}z.4M(6k,{4o:6l,bY:i9,bZ:L},3j||0);6k.1C.1P=6k;C z.88(6l,6k)};z.1x(z.2r,{6j:B(c0,i8){A bp=(c0||0).1C,mp=(i8||0).1C;A 2S=z.2r.i7();z.1x(2S,{84:bp,1x:mp});if(c0){2S.1C=z.6j(bp)}z.4M(2S,z.2r.i6,mp||0,{bY:L});2S.1C.1P=2S;2S.1C.4o=(bp||0).4o+"pk"+(mp||0).4o;z.88(2S.1C.4o,2S);C 2S},i7:B(){C B(){D.i5(P)}},i6:{i5:B(86){A c=86.2O,s=c.84,ct=s&&s.1P,m=c.1x,87=m&&m.1P,a=86,ii,fn;if(a[0]){if((fn=a[0]["bZ"])){a=fn.14(D,a)||a}}if(fn=c.1C.bZ){a=fn.14(D,a)||a}if(ct&&ct.14){ct.14(D,a)}if(87&&87.14){87.14(D,a)}if(ii=c.1C.bY){ii.14(D,86)}},bX:B(85){A c=D.1P,p,m;1s(c){p=c.84;m=c.1x;if(m==85||(m 1N 85.1P)){C p}if(m&&(m=m.bX(85))){C m}c=p&&p.1P}},6h:B(83,82,bW,6i){A p=bW,c,m,f;do{c=p.1P;m=c.1x;if(m&&(m=D.6h(83,82,m,6i))){C m}if((f=p[83])&&(6i==(f==82))){C p}p=c.84}1s(p);C!6i&&(p=D.bX(bW))&&D.6h(83,82,p,6i)},bU:B(2R,4U,bV){A a=P;if(!z.1R(a[0])){bV=4U;4U=2R;2R=4U.2O.i4}A c=4U.2O,p=D.1P.1C,a=bV||4U,fn,mp;if(D[2R]!=c||p[2R]==c){mp=D.6h(2R,c,p,K);if(!mp){2m(D.4o+": 1p i3 (\\""+2R+"\\") 4F bU pj 1f 2O (2r.js)")}p=D.6h(2R,c,mp,U)}fn=p&&p[2R];if(!fn){1z.1K(mp.4o+": no bU \\""+2R+"\\" ph pg (2r.js)");C}C fn.14(D,a)}}})}if(!z.1h["z.X.2c"]){z.1h["z.X.2c"]=K;z.1Q("z.X.2c");z.3i={i2:B(){C B(){A ap=4e.1C,c=P.2O,ls=c.2b,t=c.5V;A r=t&&t.14(D,P);R(A i in ls){if(!(i in ap)){ls[i].14(D,P)}}C r}},2P:B(6g,bT,i1){6g=6g||z.1W;A f=6g[bT];if(!f||!f.2b){A d=z.3i.i2();d.5V=f;d.2b=[];f=6g[bT]=d}C f.2b.Y(i1)},3J:B(i0,hZ,bS){A f=(i0||z.1W)[hZ];if(f&&f.2b&&bS--){63 f.2b[bS]}}};z.2c=B(M,pd,pc,pa,p9){A a=P,F=[],i=0;F.Y(z.1R(a[0])?L:a[i++],a[i++]);A a1=a[i+1];F.Y(z.1R(a1)||z.1Y(a1)?a[i++]:L,a[i++]);R(A l=a.G;i2){6e=z.7X(6e,P,2)}C D.5k(6e,6e)},ef:B(cb,4T){A 7Y=z.2p(cb,4T);if(P.G>2){7Y=z.7X(7Y,P,2)}C D.5k(7Y,L)},ed:B(cb,4T){A 7W=z.2p(cb,4T);if(P.G>2){7W=z.7X(7W,P,2)}C D.5k(L,7W)},5k:B(cb,eb){D.bM.Y([cb,eb]);if(D.2y>=0){D.7U()}C D},7U:B(){A bL=D.bM;A 4n=D.2y;A 1v=D.4R[4n];A 4S=D;A cb=L;1s((bL.G>0)&&(D.3M==0)){A f=bL.3a()[4n];if(!f){6c}1u{1v=f(1v);4n=((1v 1N 1O)?1:0);if(1v 1N z.30){cb=B(1v){4S.7V(1v);4S.3M--;if((4S.3M==0)&&(4S.2y>=0)){4S.7U()}};D.3M++}}1y(1G){1z.1K(1G);4n=1;1v=1G}}D.2y=4n;D.4R[4n]=1v;if((cb)&&(D.3M)){1v.9e(cb)}}})}if(!z.1h["z.X.2e"]){z.1h["z.X.2e"]=K;z.1Q("z.X.2e");z.5m=B(2e){1u{C 3u("("+2e+")")}1y(e){1z.1K(e);C 2e}};z.bK=B(2H){C("\\""+2H.2f(/(["\\\\])/g,"\\\\$1")+"\\"").2f(/[\\f]/g,"\\\\f").2f(/[\\b]/g,"\\\\b").2f(/[\\n]/g,"\\\\n").2f(/[\\t]/g,"\\\\t").2f(/[\\r]/g,"\\\\r")};z.hM="\\t";z.eq=B(it,4l,4P){4P=4P||"";A 4k=(4l?4P+z.hM:"");A 6b=(4l?"\\n":"");A 4Q=V(it);if(4Q=="1k"){C"1k"}I{if((4Q=="4J")||(4Q=="p1")){C it+""}I{if(it===L){C"L"}}}if(4Q=="3c"){C z.bK(it)}A 6d=P.2O;A 4m;if(V it.hL=="B"){4m=it.hL();if(it!==4m){C 6d(4m,4l,4k)}}if(V it.2e=="B"){4m=it.2e();if(it!==4m){C 6d(4m,4l,4k)}}if(z.2l(it)){A 1v=[];R(A i=0;i>=7R;t[x]=7R==4?17*c:c});t.a=1;C t};z.7P=B(a,M){A t=M||S z.1J();t.bz(2V(a[0]),2V(a[1]),2V(a[2]),2V(a[3]));if(2L(t.a)){t.a=1}C t.7Q()};z.hq=B(2H,M){A a=z.1J.hp[2H];C a&&z.7P(a,M)||z.ho(2H,M)||z.hn(2H,M)}}if(!z.1h["z.X"]){z.1h["z.X"]=K;z.1Q("z.X")}if(!z.1h["z.X.5Z"]){z.1h["z.X.5Z"]=K;z.1Q("z.X.5Z");(B(){A 1j=z.b2={2P:B(E,68,fp){if(!E){C}68=1j.4O(68);fp=1j.7G(68,fp);E.66(68,fp,U);C fp},3J:B(E,hm,hl){(E)&&(E.oF(1j.4O(hm),hl,U))},4O:B(1p){C(1p.2w(0,2)=="on"?1p.2w(2):1p)},7G:B(1p,fp){C(1p!="4b"?fp:B(e){C fp.2d(D,1j.4i(e,D))})},4i:B(H,oE){4w(H.Z){2X"4b":1j.7K(H);3f}C H},7K:B(H){H.oD=(H.3h?67.oC(H.3h):"")}};z.oB=B(H,hk){C 1j.4i(H,hk)};z.gY=B(H){H.7J();H.7I()};A 7O=z.3i;z.by=B(M,bx,hh,hg,hi){A hj=M&&(M.2t||M.oA||M.66);A bw=!hj?0:(!hi?1:2),l=[z.3i,1j,7O][bw];A h=l.2P(M,bx,z.2p(hh,hg));C[M,bx,h,bw]};z.bv=B(M,he,hd,hf){([z.3i,1j,7O][hf]).3J(M,he,hd)};z.5W={oz:8,gV:9,oy:12,ox:13,ow:16,ov:17,ou:18,gG:19,ot:20,os:27,or:32,b5:33,b4:34,gE:35,gF:36,b7:37,b9:38,b6:39,b8:40,gD:45,8S:46,oq:47,oo:91,om:92,ol:93,oj:96,oi:97,oh:98,og:99,oe:6D,od:oc,ob:oa,o9:o8,o7:o6,o5:o4,o3:bi,o2:o1,o0:nZ,nY:nX,nW:nV,nU:bk,gS:nT,gR:nS,gQ:nR,gP:nQ,gO:nP,gN:nO,gM:nN,gL:nM,gK:nL,gJ:nK,gI:nJ,gH:nI,nH:nG,nF:nE,nD:nC,gB:nB,gC:nA};if(z.1l){bf=B(e,5h){1u{C(e.3I=5h)}1y(e){C 0}};A 61=z.3i;if(!1o.nz){7O=61=z.gy={b3:[],2P:B(64,bu,hc){64=64||z.1W;A f=64[bu];if(!f||!f.2b){A d=z.gz();d.5V=f&&(7M.Y(f)-1);d.2b=[];f=64[bu]=d}C f.2b.Y(7M.Y(hc)-1)},3J:B(hb,ha,7N){A f=(hb||z.1W)[ha],l=f&&f.2b;if(f&&l&&7N--){63 7M[l[7N]];63 l[7N]}}};A 7M=61.b3}z.1x(1j,{2P:B(E,62,fp){if(!E){C}62=1j.4O(62);if(62=="h3"){A kd=E.bs;if(!kd||!kd.2b||!kd.h9){1j.2P(E,"bs",1j.h4);E.bs.h9=K}}C 61.2P(E,62,1j.7G(fp))},3J:B(E,h8,h7){61.3J(E,1j.4O(h8),h7)},4O:B(7L){C(7L.2w(0,2)!="on"?"on"+7L:7L)},ny:B(){},4i:B(H,4N){if(!H){A w=(4N)&&((4N.aD||4N.1q||4N).nx)||26;H=w.5Z}if(!H){C(H)}H.5V=H.br;H.bh=(4N||H.br);H.nw=H.nv;H.nu=H.nr;A bq=H.br,1e=(bq&&bq.aD)||1q;A bn=((z.1l<6)||(1e["aX"]=="aW"))?1e.3E:1e.5K;A bm=z.aB();H.nq=H.np+z.aH(bn.5I||0)-bm.x;H.nn=H.nm+(bn.5G||0)-bm.y;if(H.Z=="fk"){H.h6=H.nl}if(H.Z=="fj"){H.h6=H.nk}H.7I=1j.bc;H.7J=1j.ba;C 1j.h5(H)},h5:B(H){4w(H.Z){2X"4b":A c=("3h"in H?H.3h:H.3I);if(c==10){c=0;H.3I=13}I{if(c==13||c==27){c=0}I{if(c==3){c=99}}}H.3h=c;1j.7K(H);3f}C H},gZ:{bi:42,bk:47,h2:59,nj:43,ni:44,nh:45,ng:46,nf:47,60:96,h1:91,nb:92,na:93,h0:39},h4:B(H){A kp=H.bh.h3;if(!kp||!kp.2b){C}A k=H.3I;A bj=(k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>bk)&&(k60)&&(kh0);if(bj||H.5Y){A c=(bj?0:k);if(H.5Y){if(k==3||k==13){C}I{if(c>95&&c=65&&c<=90)){c+=32}I{c=1j.gZ[c]||c}}}}A 2x=1j.7H(H,{Z:"4b",2x:K,3h:c});kp.2d(H.bh,2x);H.bg=2x.bg;H.bd=2x.bd;bf(H,2x.3I)}},bc:B(){D.bg=K},ba:B(){D.n9=D.3I;if(D.5Y){bf(D,0)}D.bd=U}});z.gY=B(H){H=H||26.5Z;1j.bc.2d(H);1j.ba.2d(H)}}1j.7H=B(H,gX){A 2x=z.1x({},H,gX);1j.7K(2x);2x.7J=B(){H.7J()};2x.7I=B(){H.7I()};C 2x};if(z.2M){z.1x(1j,{4i:B(H,n8){4w(H.Z){2X"4b":A c=H.n7;if(c==3){c=99}c=((c<41)&&(!H.5X)?0:c);if((H.5Y)&&(!H.5X)&&(c>=65)&&(c<=90)){c+=32}C 1j.7H(H,{3h:c})}C H}})}if(z.3o){z.1x(1j,{4i:B(H,n6){4w(H.Z){2X"4b":A c=H.3h,s=H.5X,k=H.3I;k=k||gA[H.gW]||0;if(H.gW=="n5"){c=0}I{if((H.5Y)&&(c>0)&&(c<27)){c+=96}I{if(c==z.5W.gU){c=z.5W.gV;s=K}I{c=(c>=32&&c gh",E).1n(B(i){i.1c.7E=i.1c.7E.2f(/gk:[^;]*;/i,"")})}}I{A o="mh(mg="+(7D*6D)+")";E.1c.3T=o}if(E.gj.1M()=="gi"){z.1r("> gh",E).1n(B(i){i.1c.3T=o})}C 7D}:B(E,gg){C E.1c.2W=gg});A 5Q={3n:K,58:K,2g:K,5J:K};A gd=B(E,Z,5P){Z=Z.1M();if(5Q[Z]===K){C z.4g(E,5P)}I{if(5Q[Z]===U){C 5P}I{if((Z.T("mf")>=0)||(Z.T("md")>=0)||(Z.T("3n")>=0)||(Z.T("58")>=0)||(Z.T("5q")>=0)||(Z.T("mc")>=0)||(Z.T("ma")>=0)){5Q[Z]=K;C z.4g(E,5P)}I{5Q[Z]=U;C 5P}}}};z.1c=B(E,5O,aT){A n=z.1D(E),F=P.G,op=(5O=="2W");if(F==3){C op?z.gf(n,aT):n.1c[5O]=aT}if(F==2&&op){C z.ge(n)}A s=z.3F(n);C(F==1)?s:gd(n,5O,s[5O])};z.7A=B(n,gc){A s=gc||1E(n),px=z.4g,l=px(n,s.m9),t=px(n,s.m8);C{l:l,t:t,w:l+px(n,s.m7),h:t+px(n,s.m6)}};z.5N=B(n,gb){A ne="7C",px=z.4g,s=gb||1E(n),bl=(s.m5!=ne?px(n,s.m4):0),bt=(s.m3!=ne?px(n,s.m2):0);C{l:bl,t:bt,w:bl+(s.m1!=ne?px(n,s.m0):0),h:bt+(s.lZ!=ne?px(n,s.lY):0)}};z.aN=B(n,ga){A s=ga||1E(n),p=z.7A(n,s),b=z.5N(n,s);C{l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h}};z.aM=B(n,g9){A s=g9||1E(n),px=z.4g,l=px(n,s.lX),t=px(n,s.lW),r=px(n,s.lV),b=px(n,s.lU);if(z.3o&&(s.ax!="fU")){r=l}C{l:l,t:t,w:l+r,h:t+b}};z.au=B(E,g8){A s=g8||1E(E),me=z.aM(E,s);A l=E.fT-me.l,t=E.fS-me.t;if(z.7B){A aS=2k(s.2g),aR=2k(s.5J);if(!2L(aS)&&!2L(aR)){l=aS,t=aR}I{A p=E.1L;if(p&&p.1c){A aQ=1E(p);if(aQ.lT!="lS"){A be=z.5N(p,aQ);l+=be.l,t+=be.t}}}}I{if(z.2M){A p=E.1L;if(p){A be=z.5N(p);l-=be.l,t-=be.t}}}C{l:l,t:t,w:E.6v+me.w,h:E.8D+me.h}};z.aK=B(E,g7){A s=g7||1E(E),pe=z.7A(E,s),be=z.5N(E,s),w=E.aF,h;if(!w){w=E.6v,h=E.8D}I{h=E.lR,be.w=be.h=0}if(z.2M){pe.l+=be.l;pe.t+=be.t}C{l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h}};z.lQ=B(E,g6){A s=g6||1E(E),pe=z.7A(E,s),cb=z.aK(E,s);C{l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h}};z.aL=B(E,l,t,w,h,u){u=u||"px";4G(E.1c){if(!2L(l)){2g=l+u}if(!2L(t)){5J=t+u}if(w>=0){3n=w+u}if(h>=0){58=h+u}}};z.aO=B(E){A n=E.5w;C(z.aP=="g5-3G")||(n=="lP")||(n=="lO")};z.fX=B(E,7z,7y,g4){A bb=z.aO(E);if(bb){A pb=z.aN(E,g4);if(7z>=0){7z+=pb.w}if(7y>=0){7y+=pb.h}}z.aL(E,g3,g3,7z,7y)};z.fY=B(E,g1,g0,5M,5L,g2){A s=g2||z.3F(E);A bb=z.aO(E),pb=bb?fZ:z.aN(E,s),mb=z.aM(E,s);if(5M>=0){5M=2Y.5q(5M-pb.w-mb.w,0)}if(5L>=0){5L=2Y.5q(5L-pb.h-mb.h,0)}z.aL(E,g1,g0,5M,5L)};A fZ={l:0,t:0,w:0,h:0};z.lN=B(E,3G){A n=z.1D(E),s=1E(n),b=3G;C!b?z.au(n,s):z.fY(n,b.l,b.t,b.w,b.h,s)};z.lM=B(E,3G){A n=z.1D(E),s=1E(n),b=3G;C!b?z.aK(n,s):z.fX(n,b.w,b.h,s)};A 5H=B(E,1a){if(!(E=(E||0).1L)){C 0}A 1U,aJ=0,2h=z.3E();1s(E&&E.1c){if(1E(E).ax=="lL"){C 0}1U=E[1a];if(1U){aJ+=1U-0;if(E==2h){3f}}E=E.1L}C aJ};z.fQ=B(){A 2h=z.3E();A 3g=z.1W;A de=z.1e.5K;C{y:(3g.lK||de.5G||2h.5G||0),x:(3g.lJ||z.aH(de.5I)||2h.5I||0)}};z.aG=B(){C V z.aI=="1k"?(z.aI=z.3F(z.3E()).lI=="lH"):z.aI};z.aB=B(){A de=z.1e.5K;if(z.1l>=7){C{x:de.aC().2g,y:de.aC().5J}}I{C{x:z.aG()||26.am==26?de.fW:de.6v-de.aF-de.fW,y:de.lG}}};z.aH=B(aE){if(z.1l&&!z.aG()){A de=z.1e.5K;C aE+de.aF-de.lF}C aE};z.fP=B(E,aw){A ay=E.aD;A J={x:0,y:0};A 7w=U;A db=z.3E();if(z.1l){A aA=E.aC();A az=z.aB();J.x=aA.2g-az.x;J.y=aA.5J-az.y}I{if(ay["fV"]){A bo=ay.fV(E);J.x=bo.x-5H(E,"5I");J.y=bo.y-5H(E,"5G")}I{if(E["fR"]){7w=K;A 7x;if(z.3o&&(1E(E).ax=="fU")&&(E.1L==db)){7x=db}I{7x=db.1L}if(E.1L!=db){A nd=E;if(z.2M){nd=db}J.x-=5H(nd,"5I");J.y-=5H(nd,"5G")}A 4f=E;do{A n=4f["fT"];if(!z.2M||n>0){J.x+=2L(n)?0:n}A m=4f["fS"];J.y+=2L(m)?0:m;4f=4f.fR}1s((4f!=7x)&&4f)}I{if(E["x"]&&E["y"]){J.x+=2L(E.x)?0:E.x;J.y+=2L(E.y)?0:E.y}}}}if(7w||aw){A av=z.fQ();A m=7w?(!aw?-1:0):1;J.y+=m*av.y;J.x+=m*av.x}C J};z.af=B(E,fO){A n=z.1D(E),s=1E(n),mb=z.au(n,s);A at=z.fP(n,fO);mb.x=at.x;mb.y=at.y;C mb}})();z.fL=B(E,fN){C((" "+E.3A+" ").T(" "+fN+" ")>=0)};z.7s=B(E,ar){A 7v=E.3A;if((" "+7v+" ").T(" "+ar+" ")<0){E.3A=7v+(7v?" ":"")+ar}};z.7r=B(E,fM){A t=z.7g((" "+E.3A+" ").2f(" "+fM+" "," "));if(E.3A!=t){E.3A=t}};z.lE=B(E,aq,7u){if(V 7u=="1k"){7u=!z.fL(E,aq)}z[7u?"7s":"7r"](E,aq)}}if(!z.1h["z.X.1H"]){z.1h["z.X.1H"]=K;z.1Q("z.X.1H");(B(){A d=z;z.1H=B(){A F=P;if((F.G==1)&&(V F[0]=="4J")){D.G=eK(F[0])}I{if(F.G){d.1n(F,B(i){D.Y(i)},D)}}};z.1H.1C=S 4e;if(d.1l){A fK=B(al){C("A a2 = am."+al+"; "+"A ap = 4e.1C; "+"A ao = a2.1C; "+"R(A x in ao){ ap[x] = ao[x]; } "+"am."+al+" = 4e; ")};A fI=fK("z.1H");A aj=26.lD();aj.1q.fJ(""+fI+"");aj.lC(1,1,1,1)}z.4M(z.1H,{T:B(fH,fG){C d.T(D,fH,fG)},31:B(lB,lA){A aa=d.4d(P);aa.ae(D);C d.31.14(d,aa)},ah:B(fF,fE){C d.ah(D,fF,fE)},ag:B(fD,fC){C d.ag(D,fD,fC)},1n:B(fB,fA){d.1n(D,fB,fA);C D},23:B(7t,M){C d.23(D,7t,M,d.1H)},af:B(){C d.23(D,d.af)},1c:B(lz,ly){A aa=d.4d(P);aa.ae(D[0]);A s=d.1c.14(d,aa);C(P.G>1)?D:s},lx:B(lw,lv){A aa=d.4d(P);aa.ae(L);A s=D.23(B(i){aa[0]=i;C d.1c.14(d,aa)});C(P.G>1)?D:s},7s:B(fz){C D.1n(B(i){z.7s(i,fz)})},7r:B(fy){C D.1n(B(i){z.7r(i,fy)})},5E:B(fw,7q){A 1m=d.1r(fw)[0];7q=7q||"72";R(A x=0;x=0){if(i[x]<1d){1d=i[x]}}}C(1d<0)?ql:1d};A 6X=B(7l){A i=2I(7l);if(i[0]!=-1){C 7l.21(i[0]+1,a0(7l,1))}I{C""}};A 5r=B(7k){A 5D;A i=2I(7k);if((i[0]==0)||(i[1]==0)){5D=0}I{5D=a0(7k,0)}C((5D>0)?7k.3b(0,5D).1M():"*")};A fg=B(Q){A J=-1;R(A x=0;x=0){if((1S>J)||(J==-1)){J=1S}}}C J};A 9H=B(7i){A i=2I(7i);if(-1==i[1]){C""}A di=i[1]+1;A 7j=fg(i.2w(2));if(di<7j){C 7i.21(di,7j)}I{if(-1==7j){C 7i.3b(di)}I{C""}}};A f3=[{1i:"|=",1f:B(15,fe){C"[5z(3U(\' \',@"+15+",\' \'), \' "+fe+"-\')]"}},{1i:"~=",1f:B(15,fd){C"[5z(3U(\' \',@"+15+",\' \'), \' "+fd+" \')]"}},{1i:"^=",1f:B(15,fb){C"[li-4G(@"+15+", \'"+fb+"\')]"}},{1i:"*=",1f:B(15,fa){C"[5z(@"+15+", \'"+fa+"\')]"}},{1i:"$=",1f:B(15,9Z){C"[21(@"+15+", 3c-G(@"+15+")-"+(9Z.G-1)+")=\'"+9Z+"\']"}},{1i:"!=",1f:B(15,f9){C"[3O(@"+15+"=\'"+f9+"\')]"}},{1i:"=",1f:B(15,f8){C"[@"+15+"=\'"+f8+"\']"}}];A 9C=B(9Y,3Z,f7,f6){A 49;A i=2I(3Z);if(i[2]>=0){A 4L=3Z.T("]",i[2]);A 29=3Z.21(i[2]+1,4L);1s(29&&29.G){if(29.2s(0)=="@"){29=29.2w(1)}49=L;R(A x=0;x<9Y.G;x++){A 1S=9Y[x];A 7h=29.T(1S.1i);if(7h>=0){A 15=29.21(0,7h);A 4a=29.21(7h+1S.1i.G);if((4a.2s(0)=="\\"")||(4a.2s(0)=="\'")){4a=4a.21(1,4a.G-1)}49=1S.1f(d.7g(15),d.7g(4a));3f}}if((!49)&&(29.G)){49=f7(29)}if(49){f6(49)}29=L;A 7f=3Z.T("[",4L);if(0<=7f){4L=3Z.T("]",7f);if(0<=4L){29=3Z.21(7f+1,4L)}}}}};A f0=B(f5){A 4K=".";A 7e=f5.1A(" ");1s(7e.G){A 2K=7e.3a();A 7d;if(2K==">"){7d="/";2K=7e.3a()}I{7d="//"}A f4=5r(2K);4K+=7d+f4;A id=6X(2K);if(id.G){4K+="[@id=\'"+id+"\'][1]"}A cn=9H(2K);if(cn.G){A 9X=" ";if(cn.2s(cn.G-1)=="*"){9X="";cn=cn.3b(0,cn.G-1)}4K+="[5z(3U(\' \',@9P,\' \'), \' "+cn+9X+"\')]"}9C(f3,2K,B(f2){C"[@"+f2+"]"},B(f1){4K+=f1})}C 4K};A 7a={};A eC=B(28){if(7a[28]){C 7a[28]}A 1e=d.1e;A 9W=f0(28);A 4H=B(9V){A J=[];A 7b;1u{7b=1e.9x(9W,9V,L,lh.lg,L)}1y(e){1z.1K("lf in le:",9W,"lc:",9V);1z.1K(e)}A 7c=7b.eZ();1s(7c){J.Y(7c);7c=7b.eZ()}C J};C 7a[28]=4H};A 5x={};A 9B={};A 3y=B(79,78){if(!79){C 78}if(!78){C 79}C B(){C 79.14(26,P)&&78.14(26,P)}};A 75=B(9U,3Y,5B,2J){A 2v=2J+1;A 76=(3Y.G==2v);A 2K=3Y[2J];if(2K==">"){A 77=9U.3W;if(!77.G){C}2v++;76=(3Y.G==2v);A 4H=6O(3Y[2J+1]);R(A x=0,11;x<77.G,11=77[x];x++){if(4H(11)){if(76){5B.Y(11)}I{75(11,3Y,5B,2v)}}}}A 5C=6U(2K)(9U);if(76){1s(5C.G){5B.Y(5C.3a())}}I{1s(5C.G){75(5C.3a(),3Y,5B,2v)}}};A eE=B(9T,eY){A J=[];A x=9T.G-1,11;1s(11=9T[x--]){75(11,eY,J,0)}C J};A 6O=B(3D){if(5x[3D]){C 5x[3D]}A ff=L;A 9S=5r(3D);if(9S!="*"){ff=3y(ff,B(N){C((N.2t==1)&&(9S==N.5w.1M()))})}A 9R=6X(3D);if(9R.G){ff=3y(ff,B(N){C((N.2t==1)&&(N.id==9R))})}if(2Y.5q.14(D,2I(3D).2w(1))>=0){ff=3y(ff,9z(3D))}C 5x[3D]=ff};A 5y=B(E){A pn=E.1L;A 9Q=pn.3W;A 2v=-1;A 3C=pn.5A;if(!3C){C 2v}A ci=E["eW"];A cl=pn["eX"];if(((V cl=="4J")&&(cl!=9Q.G))||(V ci!="4J")){pn["eX"]=9Q.G;A 2J=1;do{if(3C===E){2v=2J}if(3C.2t==1){3C["eW"]=2J;2J++}3C=3C.71}1s(3C)}I{2v=ci}C 2v};A lb=0;A 3X=B(N,15){A 74="";if(15=="9P"){C N.3A||74}if(15=="R"){C N.la||74}C N.5t(15,2)||74};A eH=[{1i:"|=",1f:B(15,9O){A eV=" "+9O+"-";C B(N){A ea=" "+(N.5t(15,2)||"");C((ea==9O)||(ea.T(eV)==0))}}},{1i:"^=",1f:B(15,eU){C B(N){C(3X(N,15).T(eU)==0)}}},{1i:"*=",1f:B(15,eT){C B(N){C(3X(N,15).T(eT)>=0)}}},{1i:"~=",1f:B(15,eS){A 9N=" "+eS+" ";C B(N){A ea=" "+3X(N,15)+" ";C(ea.T(9N)>=0)}}},{1i:"$=",1f:B(15,73){A 9N=" "+73;C B(N){A ea=" "+3X(N,15);C(ea.31(73)==(ea.G-73.G))}}},{1i:"!=",1f:B(15,eR){C B(N){C(3X(N,15)!=eR)}}},{1i:"=",1f:B(15,eQ){C B(N){C(3X(N,15)==eQ)}}}];A 9E=[{1i:"9M-9K",1f:B(1p,l9){C B(N){if(N.2t!=1){C U}A fc=N.eP;1s(fc&&(fc.2t!=1)){fc=fc.eP}C(!fc)}}},{1i:"72-9K",1f:B(1p,l8){C B(N){if(N.2t!=1){C U}A nc=N.71;1s(nc&&(nc.2t!=1)){nc=nc.71}C(!nc)}}},{1i:"l7",1f:B(1p,l6){C B(N){A cn=N.3W;A eO=N.3W.G;R(A x=eO-1;x>=0;x--){A nt=cn[x].2t;if((nt==1)||(nt==3)){C U}}C K}}},{1i:"5z",1f:B(1p,eN){C B(N){C(N.9L.T(eN)>=0)}}},{1i:"3O",1f:B(1p,eM){A eL=6O(eM);C B(N){C(!eL(N))}}},{1i:"l5-9K",1f:B(1p,2u){A pi=eK;if(2u=="l4"){C B(N){C(((5y(N))%2)==1)}}I{if((2u=="2n")||(2u=="l3")){C B(N){C((5y(N)%2)==0)}}I{if(2u.T("l2+")==0){A 70=pi(2u.3b(3));C B(N){C(N.1L.3W[70-1]===N)}}I{if((2u.T("n+")>0)&&(2u.G>3)){A 9J=2u.1A("n+",2);A eJ=pi(9J[0]);A 2J=pi(9J[1]);C B(N){C((5y(N)%eJ)==2J)}}I{if(2u.T("n")==-1){A 70=pi(2u);C B(N){C(5y(N)==70)}}}}}}}}];A 9z=B(3e){A 9I=(9B[3e]||5x[3e]);if(9I){C 9I}A ff=L;A i=2I(3e);if(i[0]>=0){A 24=5r(3e);if(24!="*"){ff=3y(ff,B(N){C(N.5w.1M()==24)})}}A 5u;A 3B=9H(3e);if(3B.G){A 9F=3B.2s(3B.G-1)=="*";if(9F){3B=3B.3b(0,3B.G-1)}A re=S 9G("(?:^|\\\\s)"+3B+(9F?".*":"")+"(?:\\\\s|$)");ff=3y(ff,B(N){C re.6Z(N.3A)})}if(i[3]>=0){A 3z=3e.3b(i[3]+1);A 9D="";A 5v=3z.T("(");A 6Y=3z.31(")");if((0<=5v)&&(0<=6Y)&&(6Y>5v)){9D=3z.21(5v+1,6Y);3z=3z.3b(0,5v)}5u=L;R(A x=0;x<9E.G;x++){A 1S=9E[x];if(1S.1i==3z){5u=1S.1f(3z,9D);3f}}if(5u){ff=3y(ff,5u)}}A eG=(d.1l)?B(5s){A eI=5s.1M();C B(N){C N[5s]||N[eI]}}:B(5s){C B(N){C(N&&N.5t&&N.l1(5s))}};9C(eH,3e,eG,B(eF){ff=3y(ff,eF)});if(!ff){ff=B(){C K}}C 9B[3e]=ff};A 6W={};A 6U=B(3d,1B){A 9A=6W[3d];if(9A){C 9A}A i=2I(3d);A id=6X(3d);if(i[0]==0){C 6W[3d]=B(1B){C[d.1D(id)]}}A 9y=9z(3d);A 5p;if(i[0]>=0){5p=B(1B){A 11=d.1D(id);if(9y(11)){C[11]}}}I{A 3V;A 24=5r(3d);if(2Y.5q.14(D,2I(3d))==-1){5p=B(1B){A J=[];A 11,x=0,3V=1B.4I(24);1s(11=3V[x++]){J.Y(11)}C J}}I{5p=B(1B){A J=[];A 11,x=0,3V=1B.4I(24);1s(11=3V[x++]){if(9y(11)){J.Y(11)}}C J}}}C 6W[3d]=5p};A l0={};A 5o={">":B(1B){A J=[];A 11,x=0,3V=1B.3W;1s(11=3V[x++]){if(11.2t==1){J.Y(11)}}C J}};A 9w=B(6V){if(0>6V.T(" ")){C 6U(6V)}A eD=B(1B){A 6S=6V.1A(" ");A 6T;if(6S[0]==">"){6T=[1B]}I{6T=6U(6S.3a())(1B)}C eE(6T,6S)};C eD};A 9v=((1q["9x"]&&!d.3o)?B(3x){A 6R=3x.1A(" ");if((1q["9x"])&&(3x.T(":")==-1)&&((K))){if(((6R.G>2)&&(3x.T(">")==-1))||(6R.G>3)||(3x.T("[")>=0)||((1==6R.G)&&(0<=3x.T(".")))){C eC(3x)}}C 9w(3x)}:9w);A ey=B(3w){if(5o[3w]){C 5o[3w]}if(0>3w.T(",")){C 5o[3w]=9v(3w)}I{A eB=3w.1A(/\\s*,\\s*/);A 4H=B(1B){A eA=0;A J=[];A 6Q;1s(6Q=eB[eA++]){J=J.3U(9v(6Q,6Q.T(" "))(1B))}C J};C 5o[3w]=4H}};A 5n=0;A ez=B(Q){A J=S d.1H();if(!Q){C J}if(Q[0]){J.Y(Q[0])}if(Q.G<2){C J}5n++;Q[0]["9u"]=5n;R(A x=1,11;11=Q[x];x++){if(Q[x]["9u"]!=5n){J.Y(11)}11["9u"]=5n}C J};d.1r=B(6P,1B){if(V 6P!="3c"){C S d.1H(6P)}if(V 1B=="3c"){1B=d.1D(1B)}C ez(ey(6P)(1B||d.1e))};d.9t=B(ex,9s){A 9r=S d.1H();A ff=(9s)?6O(9s):B(){C K};R(A x=0,11;11=ex[x];x++){if(ff(11)){9r.Y(11)}}C 9r}})()}if(!z.1h["z.X.1b"]){z.1h["z.X.1b"]=K;z.1Q("z.X.1b");z.6K=B(ew){A J={};A iq="kZ[Z!=9q][Z!=kY][Z!=et][Z!=kX][Z!=kW], kV, kU";z.1r(iq,ew).3T(B(E){C(!E.kT)}).1n(B(1m){A 3v=1m.1p;A Z=(1m.Z||"").1M();if((Z=="kS")||(Z=="kR")){if(1m.kQ){J[3v]=1m.1Z}}I{if(1m.kP){A ev=J[3v]=[];z.1r("kO[kN]",1m).1n(B(eu){ev.Y(eu.1Z)})}I{J[3v]=1m.1Z;if(Z=="et"){J[3v+".x"]=J[3v+".y"]=J[3v].x=J[3v].y=0}}}});C J};z.9h=B(23){A ec=kM;A J="";A es={};R(A x in 23){if(23[x]!=es[x]){if(z.2l(23[x])){R(A y=0;y<23[x].G;y++){J+=ec(x)+"="+ec(23[x][y])+"&"}}I{J+=ec(x)+"="+ec(23[x])+"&"}}}if((J.G)&&(J.2s(J.G-1)=="&")){J=J.3b(0,J.G-1)}C J};z.kL=B(er){C z.9h(z.6K(er))};z.kK=B(ep){C z.eq(z.6K(ep))};z.kJ=B(2H){A J={};A qp=2H.1A("&");A dc=kI;z.1n(qp,B(1m){if(1m.G){A 9p=1m.1A("=");A 1p=dc(9p.3a());A 1U=dc(9p.22("="));if(z.1R(J[1p])){J[1p]=[J[1p]]}if(z.2l(J[1p])){J[1p].Y(1U)}I{J[1p]=1U}}});C J};z.e1=U;z.e6={"9g":B(1b){C 1b.2G},"2e":B(1b){if(!1o.eo){1z.1K("kH kG kF a kE of 9g/2e-6M-9m"+" 4F kD kC kB kA 4G en kz"+" (ky 1o.eo=K 4F kx kw D kv)")}C z.5m(1b.2G)},"2e-6M-ku":B(1b){A 6N=1b.2G;A 9o=6N.T("/*");A 9n=6N.31("*/");if((9o==-1)||(9n==-1)){C z.5m(1b.2G)}C z.5m(6N.21(9o+2,9n))},"2e-6M-9m":B(1b){A 6L=1b.2G;A 9l=6L.T("/*");A 9k=6L.31("*/");if((9l==-1)||(9k==-1)){1z.1K("kt en ks\'t 6M 9m!");C""}C z.5m(6L.21(9l+2,9k))},"kr":B(1b){C z.3u(1b.2G)},"kq":B(1b){if(z.1l&&!1b.el){z.1n(["ko","em","kn","km"],B(i){1u{A 1e=S 9j(kl[i]+".kk");1e.kj=U;1e.ki(1b.2G);C 1e}1y(e){}})}I{C 1b.el}}};(B(){z.e5=B(F,ej,ei,eh){A 2F={};2F.F=F;A 6J=L;if(F.3R){A 3R=z.1D(F.3R);A 9i=3R.kh("kg");2F.2E=F.2E||(9i?9i.1Z:L);6J=z.6K(3R)}I{2F.2E=F.2E}A 5l=[{}];if(6J){5l.Y(6J)}if(F.5g){5l.Y(F.5g)}if(F.ek){5l.Y({"z.ek":S 5d().8O()})}2F.1r=z.9h(z.1x.14(L,5l));2F.9d=F.9d||"9g";A d=S z.30(ej);d.5k(ei,B(eg){C eh(eg,d)});A ld=F.4E;if(ld&&z.1Y(ld)){d.ef(B(ee){C ld.2d(F,ee,2F)})}A 1G=F.9f;if(1G&&z.1Y(1G)){d.ed(B(e9){C 1G.2d(F,e9,2F)})}A 6I=F.kf;if(6I&&z.1Y(6I)){d.9e(B(e8){C 6I.2d(F,e8,2F)})}d.1F=2F;C d};A e4=B(O){O.e0=K;A 1b=O.1F.1b;if(V 1b.e7=="B"){1b.e7()}};A e3=B(O){C z.e6[O.1F.9d](O.1F.1b)};A e2=B(9c,O){1z.1K(9c);C 9c};A 3Q=B(F){A O=z.e5(F,e4,e3,e2);O.1F.1b=z.9b(O.1F.F);C O};A 5j=L;A 3t=[];A 94=B(){A dZ=(S 5d()).dU();if(!z.e1){z.1n(3t,B(4D,6H){if(!4D){C}A O=4D.O;1u{if(!O||O.e0||!4D.dT(O)){3t.3S(6H,1);C}if(4D.dR(O)){3t.3S(6H,1);4D.dP(O)}I{if(O.9a){if(O.9a+(O.1F.F.6G||0)0){5c(z.2p(D,B(){D.5b(L,8R)}),d);C D}D.4A=S 5d().8O();if(D.2Z){D.4A-=D.8Q*D.2o}D.8N=D.4A+D.8Q;D.2D=K;D.2Z=U;A 8P=D.2C.4x(D.2o);if(!D.2o){if(!D.4y){D.4y=D.4z}D.3q("dt",[8P])}D.3q("ds",[8P]);D.8M();C D},jS:B(){5e(D.3r);if(!D.2D){C D}D.2Z=K;D.3q("dr",[D.2C.4x(D.2o)]);C D},jR:B(dq,dp){5e(D.3r);D.2D=D.2Z=K;D.2o=dq*6D;if(dp){D.5b()}C D},jQ:B(dn){if(!D.3r){C}5e(D.3r);if(dn){D.2o=1}D.3q("dm",[D.2C.4x(D.2o)]);D.2D=D.2Z=U;C D},3N:B(){if(D.2D){C D.2Z?"3M":"jP"}C"jO"},8M:B(){5e(D.3r);if(D.2D){A dl=S 5d().8O();A 2q=(dl-D.4A)/(D.8N-D.4A);if(2q>=1){2q=1}D.2o=2q;if(D.5a){2q=D.5a(2q)}D.3q("8B",[D.2C.4x(2q)]);if(2q<1){D.3r=5c(z.2p(D,"8M"),D.dj)}I{D.2D=U;if(D.4z>0){D.4z--;D.5b(L,K)}I{if(D.4z==-1){D.5b(L,K)}I{if(D.4y){D.4z=D.4y;D.4y=0}}}D.2o=0;D.3q("dh")}}C D}});(B(){A df=B(E){if(z.1l){A ns=E.1c;if(!ns.8L.G&&z.1c(E,"8L")=="dg"){ns.8L="1"}if(!ns.3n.G&&z.1c(E,"3n")=="8K"){ns.3n="8K"}}};z.6C=B(F){if(V F.1d=="1k"){2m S 1O("z.6C jN an 1d 1Z")}F.E=z.1D(F.E);A 3p=z.1x({6w:{}},F);A 8J=(3p.6w.2W={});8J.1w=(V 3p.1w=="1k")?B(){C 2V(z.1c(3p.E,"2W"))}:3p.1w;8J.1d=3p.1d;A 2U=z.6y(3p);z.2c(2U,"6x",L,B(){df(3p.E)});C 2U};z.8I=B(F){C z.6C(z.1x({1d:1},F))};z.8H=B(F){C z.6C(z.1x({1d:0},F))};if(z.6B&&!z.3o){z.8E=B(n){C 2k("0.5")+((2Y.da((n+2k("1.5"))*2Y.d9))/2)}}I{z.8E=B(n){C 0.5+((2Y.da((n+1.5)*2Y.d9))/2)}}A d4=B(6A){D.8G=6A;R(A p in 6A){A 1a=6A[p];if(1a.1w 1N z.1J){1a.d7=S z.1J()}}D.4x=B(r){A J={};R(A p in D.8G){A 1a=D.8G[p];A 6z=L;if(1a.1w 1N z.1J){6z=z.d8(1a.1w,1a.1d,r,1a.d7).8F()}I{if(!z.2l(1a.1w)){6z=((1a.1d-1a.1w)*r)+1a.1w+(p!="2W"?1a.jM||"px":"")}}J[p]=6z}C J}};z.6y=B(F){F.E=z.1D(F.E);if(!F.5a){F.5a=z.8E}A 2U=S z.d6(F);z.2c(2U,"6x",2U,B(){A pm={};R(A p in D.6w){A 1a=pm[p]=z.1x({},D.6w[p]);if(z.1Y(1a.1w)){1a.1w=1a.1w()}if(z.1Y(1a.1d)){1a.1d=1a.1d()}A d5=(p.1M().T("jL")>=0);B 8C(E,p){4w(p){2X"58":C E.8D;2X"3n":C E.6v}A v=z.1c(E,p);C(p=="2W")?2V(v):2k(v)};if(V 1a.1d=="1k"){1a.1d=8C(D.E,p)}I{if(V 1a.1w=="1k"){1a.1w=8C(D.E,p)}}if(d5){1a.1w=S z.1J(1a.1w);1a.1d=S z.1J(1a.1d)}I{1a.1w=(p=="2W")?2V(1a.1w):2k(1a.1w)}}D.2C=S d4(pm)});z.2c(2U,"8B",2U,B(8A){R(A s in 8A){z.1c(D.E,s,8A[s])}});C 2U}})()}',62,1711,'|||||||||||||||||||||||||||||||||||dojo|var|function|return|this|node|args|length|evt|else|ret|true|null|obj|elem|dfd|arguments|arr|for|new|indexOf|false|typeof||_base|push|type||te|||apply|attr|||||prop|xhr|style|end|doc|match|uri|_hasResource|key|del|undefined|isIE|item|forEach|djConfig|name|document|query|while|_66|try|res|start|mixin|catch|console|split|root|prototype|byId|gcs|ioArgs|err|NodeList|_p|Color|debug|parentNode|toLowerCase|instanceof|Error|constructor|provide|isString|ta|255|val|_a|global|_69|isFunction|value||substring|join|map|tn||window||path|_343|_220|_listeners|connect|call|json|replace|left|_b|toString|128|parseFloat|isArray|throw||_percent|hitch|step|declare|charAt|nodeType|_3c3|nidx|slice|faux|fired|_c4|_7e|loc|curve|_active|url|_44c|responseText|str|_312|idx|tqp|isNaN|isOpera|_22d|callee|add|_18b|_f8|_e2|_41|anim|Number|opacity|case|Math|_paused|Deferred|lastIndexOf|||||||||shift|substr|string|_3e7|_3ce|break|_w|charCode|_listener|_d5|_c5|authority|_49|width|isSafari|_49e|fire|_timer|_47b|_465|eval|_in|_40c|_409|_362|_3d9|className|_3d5|_386|_37a|body|getComputedStyle|box|_221|keyCode|remove|_8d|_46|paused|status|not|_478|_461|form|splice|filter|concat|tret|childNodes|_38b|_367|_33d||||||||||_340|_348|keypress|appendChild|_toArray|Array|_2b0|_toPixelValue|ref|_fixEvent|_19f|_14c|_14a|_150|_141|declaredClass|_d4|_99|_Url|_83|scheme|_67|_3d|switch|getValue|_startRepeatCount|repeat|_startTime|_47e|cancel|tif|load|to|with|tf|getElementsByTagName|number|_34c|_342|extend|_1e3|_normalizeEventName|_14b|_14e|results|self|cbfn|_f9|_d8|_b2|src|_88|dav||baseUrl|fragment|_loadedModules|_44|_43|_loaders|mll|height||easing|play|setTimeout|Date|clearTimeout|hdr|content|code|errback|_464|addCallbacks|_450|fromJson|_413|_3fc|_3ee|max|_31e|cond|getAttribute|_3d4|obi|tagName|_360|_381|contains|firstChild|_368|_372|_320|place|_2fa|scrollTop|_299|scrollLeft|top|documentElement|_288|_287|_getBorderExtents|_23f|_23d|_239|_218|_216|_211|eles|target|keys|shiftKey|ctrlKey|event|192|iel|_1db|delete|_1cf||addEventListener|String|_1af|_157|array|_14d|continue|_14f|_137|_11f|_106|_findMethod|has|_delegate|_dc|_d3|loaded|_9a|_loadInit|_inFlightCount|getObject|tv|_4f|_postLoad|_2d|offsetWidth|properties|beforeBegin|animateProperty|_4ad|_4a6|isKhtml|_fade|100|headers|readyState|timeout|_469|_457|_44d|formToObject|_441|comment|_43d|_36f|_419|tp|_40a|_406|_407|_373|_403|_3e6|_31b|cbi|test|_3c7|nextSibling|last|_3a1|_38e|_365|_36b|ecn|_364|_363|_356|_35e|_35f|_34f|_34d|_349|trim|tci|_328|_32b|_31f|_31c|_anim|_300|_2ff|_2f5|_2e7|removeClass|addClass|func|_2c4|cls|_2a9|_2ae|_280|_27f|_getPadExtents|isMoz|none|_233|cssText|_214|_fixCallback|_synthesizeEvent|stopPropagation|preventDefault|_setKeyChar|_1e1|ieh|_1d7|_1be|colorFromArray|sanitize|bits|rgb|_156|_fire|_resback|_13d|partial|_13a|silentlyCancelled|_topics|_127|_f1|_f0|superclass|_ec|_e3|mct|setObject|_bf|_b3|object|require|_92|_khtmlTimer|location|XMLHTTP|locale|dua|_71|_modulePrefixes|_55|_loadModule|_51|_50|_4e|pop|_3f|_callLoaded|_unloaders|_loadNotifying|_loadedUrls|_27|_24|_1d|_5|_4b7|onAnimate|getStyle|offsetHeight|_defaultEasing|toCss|_properties|fadeOut|fadeIn|_49f|auto|zoom|_cycle|_endTime|valueOf|_494|duration|_492|DELETE|_ioAddQueryToUrl|putData|contentType|password|user|_isDocumentOk|application|||||_466||||||startTime|_xhrObj|_45f|handleAs|addBoth|error|text|objectToQuery|_44f|ActiveXObject|_443|_442|filtered|_43f|_43e|_437|file|tnl|_41c|_filterQueryResult|_zipIdx|_408|_402|evaluate|_3ed|_380|fHit|_361|_33b|_3da|_3ab|_3d6|RegExp|_327|_3cf|_3c9|child|innerHTML|first|tval|_391|class|pnc|_37e|_37c|_375|_366|_35c|_35a|_353|_33c|_336|_314|||_315|_oe|_307|_309|cloneNode|after|createElement||_2f8|_2ef|_2ee|unshift|coords|some|every||_2cb|script|_2c9|parent||a2p||_2c3|_2bd||abs|_getMarginBox|_2b3|_2a6|position|_2a7|_2ac|_2ab|_getIeDocumentElementOffset|getBoundingClientRect|ownerDocument|_2a3|clientWidth|_isBodyLtr|_fixIeBiDiScrollLeft|_bodyLtr|_29d|_getContentBox|_setBox|_getMarginExtents|_getPadBorderExtents|_usesBorderBox|boxModel|pcs|st|sl|_240|runtimeStyle|_dcm|BackCompat|compatMode|default|_21b|_d|html|_event_listener|handlers|PAGE_DOWN|PAGE_UP|RIGHT_ARROW|LEFT_ARROW|DOWN_ARROW|UP_ARROW|_preventDefault||_stopPropagation|returnValue||_trySetKeyCode|cancelBubble|currentTarget|106|_1ee|111||_1e8|_1e7|||se|srcElement|onkeydown||_1d0|_disconnect|lid|_1c0|_connect|_set|_195|_185|_183|_17d|_everyOrSome|_16b|_172|_15b|Function|_154|_escapeString|_140|chain|_check|canceller|_12d|_124|_11a|_10d|_107|inherited|_fa|_f2|_findMixin|_constructor|preamble|_de|clone|tmp|_c7|TMP|_be|_ba|_mixin|isBrowser|lang|firebug||param|modulePaths|_a7|_fireCallback|_a0|setContext||_9c|unloaded||||_96|_93|navigator|_90|_89||protocol|_84|_86|_XMLHTTP_PROGIDS|gears|google|setAttribute|_80|_77|cfg|_6f|_getModuleSymbols|_5a|_58|_53|_4d|_4c|_45|_40|_moduleHasPrefix|_loadUri|_28|_26|_21|_22|tests|doh|_20|_1f|_1c|version|_1b|_19|_getProp|_11|_4|_4a5|_4b3|_Animation|tempColor|blendColors|PI|sin|||||_49a|normal|onEnd||rate||curr|onStop|_497||_496|pct|onPause|onPlay|onBegin|delay||_491|_Line|_48b|wrapForm|PUT|_487|POST|GET|_476|_474|_472|_ioWatch|send|_471|setRequestHeader|open|callback|setInterval|_470|resHandle|_46f|ioCheck|_46e|validCheck|getTime|_ioCancelAll|addOnUnload|clearInterval|dojoType|now|canceled|_blockAsync|_45e|_45c|_459|_ioSetArgs|_contentHandlers|abort|_458|_456||||addErrback|_454|addCallback|_452|_44b|_44a|_449|preventCache|responseXML|Microsoft|JSON|usePlainJson|_431|toJson|_430|_42d|image|opt|ria|_421|_41b|_40b|_zip|_410|_40d|_357|sqf|_374|_3e5|_3df|_38f|clc|pred|parseInt|ntf|_3bf|_3bc|cnl|previousSibling|_3a9|_3a6|_39c|_399|_396|_392|__cachedIndex|__cachedLength|_376|iterateNext|_34a|_355|_354|_32c|_350|_34b|_33f|_33e|_33a|_338|_334|_332||_330|_32e||_322|_316|mousemove|mouseout|mouseover|_305|lastChild||_2f9||_2f2|_2f1|removeChild|_2ec|_2eb|_2ea|_2e6||_2e4|_2e2|_2d6|_2d5|_2d4|_2d3|_2d2|_2d1|_2cd|_2cc|scs|write|_2c8|hasClass|_2c0|_2bb|_2b5|_abs|_docScroll|offsetParent|offsetTop|offsetLeft|absolute|getBoxObjectFor|clientLeft|_setContentSize|_setMarginBox|_28d|_286|_285|_289|NaN|_281|border|_272|_26b|_260|_258|_253|_24c|_246|_23a|_getOpacity|_setOpacity|_238|td|tr|nodeName|FILTER|_22f|_22e|currentStyle|_22c|_22b|display|QuirksMode|unselectable|_217|isMozilla|getElementById|attributes|all|_ie_listener|_getIeDispatcher|_1fd|NUM_LOCK|SCROLL_LOCK|INSERT|END|HOME|PAUSE|F12|F11|F10|F9|F8|F7|F6|F5|F4|F3|F2|F1|63232|SHIFT_TAB|TAB|keyIdentifier|_1f3|stopEvent|_punctMap|222|219|186|onkeypress|_stealthKeyDown|_fixKeys|relatedTarget|_1e0|_1df|_stealthKeydown|_1d6|_1d5|_1d1|_1ca|_1c9|_1cb|_1c2|_1c1|_1c3|_1c4|_1bc|_1b3|_1b2|colorFromHex|colorFromRgb|named|colorFromString|mask|rgba|_19c|_197|_192|setColor|_180|_178|_177|_175|_174|_16d|_166|_164|_163|_162|_15c|_15d|_15e|index|__json__|toJsonIndentStr|_nextId|_12f|_12b|publish|_128|_126|_125|_122|_121|_123|_11c|_11b|_10c|_10b|_108|getDispatcher|argument|nom|_construct|_core|_makeCtor|_df|_db|deprecated|isObject|_cc||scope||_hitchArgs|_c2||pre|_c1|native|isDebug||registerModulePath|_a8||finally|||_a6|_a5|_a4|_a3|_a2|_a1|_9f|_9e|_9d|_9b|_98|_97|onbeforeunload|ipt|scr|complete|_95|userAgent|_modulesLoaded|initialized|_initFired|_8c|_8a|_getText|_87|ieForceActiveXXhr|Msxml2|isGears|_81|_gearsObject|googlegears|GearsFactory|isFF|_7d|Safari|_72|_name|_6c|ire|ore|_68|i18n|_5b|requireIf|_56|_52|loading|_4a|_loadPath|_47|_48|_global_omit_module_check|_getModulePrefix|_3c|_3a|_37|_30|Boolean|_loadUriAndCheck|_2e||cacheBust|_1e|_1a|_17|_16|_15|_14|_f|_10|_e|_9|_8|revision|flag|patch|minor|major|_6|color|units|needs|stopped|playing|stop|gotoPercent|pause|1000|implemented|yet|_48a|xhrDelete|rawXhrPut|xhrPut|postData|rawXhrPost|xhrPost|xhrGet|Type|Content|sync|response|http|bad|urlencoded|www|_watchInFlightError||exceeded|handle|action|getAttributeNode|loadXML|async|XMLDOM|prefixes|MSXML3|MSXML|MSXML2||xml|javascript|wasn|your|optional|message|off|turn|use|endpoints|issues|security|potential|avoid|mimetype|using|consider|please|decodeURIComponent|queryToObject|formToJson|formToQuery|encodeURIComponent|selected|option|multiple|checked|checkbox|radio|disabled|textarea|select|button|reset|submit|input|_3fb|hasAttribute|0n|even|odd|nth|_3b5|empty|_3b1|_3ad|htmlFor|_38a|under||exprssion|failure|ANY_TYPE|XPathResult|starts|keyup|keydown|mouseup|mousedown|blur|click|combine|span|addContent||adopt|orphan|_2de|_2dd|styles|_2da|_2d9|_2cf|_2ce|show|createPopup|toggleClass|scrollWidth|clientTop|ltr|direction|pageXOffset|pageYOffset|fixed|contentBox|marginBox|BUTTON|TABLE|_getBorderBox|clientHeight|visible|overflow|marginBottom|marginRight|marginTop|marginLeft|borderBottomWidth|borderBottomStyle|borderRightWidth|borderRightStyle|borderTopWidth|borderTopStyle|borderLeftWidth|borderLeftStyle|paddingBottom|paddingRight|paddingTop|paddingLeft|offset||min|padding||margin|Opacity|Alpha|alpha|filters|pixelLeft|medium|_22a|defaultView|before||insertBefore|KhtmlUserSelect|MozUserSelect|setSelectable|isDescendant|div|_destroyElement|BackgroundImageCache|execCommand|PageDown|PageUp|Right|Left|Down|Up|63289|63249|63248|PRINT_SCREEN|63302|63277|63276|63275|63273|63272|63250|63247|63246|63245|63244|63243|63242|63241|63240|63239|63238|63237|63236|63235|63234|63233|Enter|_1f9|which|_1f6|bubbledKeyCode|221|220||||191|190|189|188|187|toElement|fromElement|clientY|pageY||clientX|pageX|offsetY|||layerY|offsetX|layerX|parentWindow|_nop|_allow_leaks|145|144|126|F15|125|F14|124|F13|123|122|121|120|119|118|117|116|115|114|113|112|NUMPAD_DIVIDE|110|NUMPAD_PERIOD|109|NUMPAD_MINUS|108|NUMPAD_ENTER|107|NUMPAD_PLUS|NUMPAD_MULTIPLY|105|NUMPAD_9|104|NUMPAD_8|103|NUMPAD_7|102|NUMPAD_6|101|NUMPAD_5|NUMPAD_4||NUMPAD_3|NUMPAD_2|NUMPAD_1|NUMPAD_0||SELECT|RIGHT_WINDOW||LEFT_WINDOW||HELP|SPACE|ESCAPE|CAPS_LOCK|ALT|CTRL|SHIFT|ENTER|CLEAR|BACKSPACE|attachEvent|fixEvent|fromCharCode|keyChar|_1b9|removeEventListener|0x|round|toHex|toRgba|toRgb|aqua|teal|blue|navy|yellow|olive|lime|green|fuchsia|purple|red|maroon|white|gray|silver|black|boolean|called|already|Cancelled|connectPublisher|unsubscribe|subscribe|disconnect|_113|_112||_111|_110|||found|was||must|_|module|||required|likely|It|declaration|Mixin|separate|instead|property|initializer||pass|_c9|_bb|_b7|nfunction|isAlien|isFinite|isArrayLike|_firebug|withDoc|withGlobal|_writeIncludes|VML|behavior|addRule|createStyleSheet|vml|com|microsoft|schemas|urn|namespaces|onunload|onreadystatechange|defer|khtml|WebKit|DOMContentLoaded|enableMozDomContentLoaded|domcontentloaded|Unable|base|chrome|1223|304|300|200|available|XMLHttpRequest|_println|language|userLanguage|isQuirks|factory|mimeTypes|Factory|Gears|_7f|MSIE||Firefox|Gecko|Konqueror||Opera|appVersion|xd|browser|moduleUrl|port|host|hostenv|_requireLocalization|_5f|_5e|_5d|_5c|requireLocalization|requireAfterIf|_57|common|platformRequire|defined|symbol|_isXDomain|tried|Could|__package__|packageFileName|_42|useXDomain|flight|still|files|addOnLoad|failed|sourceURL|util|notice|without|change|subject|APIs|EXPERIMENTAL|experimental|removed|will|DEPRECATED|exists|10315|Rev|Mobile|Spidermonkey|Rhino||Browser|delayMozLoadingFix|preventBackButtonFix|libraryScriptUri|baseRelativePath|baseScriptUri|allowQueryConfig|warn|trace|timeEnd||time|profileEnd|profile|log|info|groupEnd|group|dirxml|dir|count|assert'.split('|'),0,{}); + + +/* + +Prototype 1.5 rc0 + - Adapted from Ruby on Rails - http://dev.rubyonrails.org/browser/spinoffs/prototype/src + - By Lunarmedia, 06 August, 2006 + - Available at (and packed with) JavascriptCompressor.com + +Please note this version is missing the selector.js component of the full Prototype library. +You can get the compressed version of selector at JavascriptCompressor.com + +*/ + +var decompressedPrototype = function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[e]})];e=(function(){return'\\w+'});c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('d T={4l:\'1.5.8P\',3E:\'(?:<3G.*?>)((\\n|\\r|.)*?)(?:<\\/3G>)\',2v:7(){},K:7(x){c x}};d 1b={17:7(){c 7(){6.1I.2n(6,N)}}};d 1e=z q();q.u=7(5d,O){G(d 1G 2M O){5d[1G]=O[1G]}c 5d};q.1U=7(U){1j{f(U==1v)c\'1v\';f(U==1L)c\'1L\';c U.1U?U.1U():U.2C()}1s(e){f(e 8R 9l)c\'...\';25 e}};7j.v.1d=7(){d 43=6,23=$A(N),U=23.8S();c 7(){c 43.2n(U,23.3s($A(N)))}};7j.v.8U=7(U){d 43=6;c 7(C){c 43.8V(U,C||1W.C)}};q.u(8Q.v,{8W:7(){d 4Z=6.2C(16);f(6<16)c\'0\'+4Z;c 4Z},5j:7(){c 6+1},8Y:7(o){$R(0,6,11).V(o);c 6}});d 6s={6j:7(){d 48;G(d i=0;i0){f(I=O.I(1A)){L+=O.47(0,I.w);L+=(1z(I)||\'\').2C();O=O.47(I.w+I[0].t)}1D{L+=O,O=\'\'}}c L},92:7(1A,1z,3i){1z=6.2T.52(1z);3i=3i===1v?1:3i;c 6.2T(1A,7(I){f(--3i<0)c I[0];c 1z(I)})},93:7(1A,o){6.2T(1A,o);c 6},94:7(t,2S){t=t||30;2S=2S===1v?\'...\':2S;c 6.t>t?6.47(0,t-2S.t)+2S:6},9F:7(){c 6.2y(/^\\s+/,\'\').2y(/\\s+$/,\'\')},71:7(){c 6.2y(/<\\/?[^>]+>/7Y,\'\')},2Q:7(){c 6.2y(z 3O(T.3E,\'5P\'),\'\')},70:7(){d 6Y=z 3O(T.3E,\'5P\');d 5p=z 3O(T.3E,\'98\');c(6.I(6Y)||[]).1C(7(5o){c(5o.I(5p)||[\'\',\'\'])[1]})},3q:7(){c 6.70().1C(7(3G){c 4q(3G)})},9E:7(){d 1q=J.4Y(\'1q\');d 1Y=J.9D(6);1q.75(1Y);c 1q.3h},9c:7(){d 1q=J.4Y(\'1q\');1q.3h=6.71();c 1q.2z[0]?1q.2z[0].6q:\'\'},78:7(){d 7i=6.I(/^\\??(.*)$/)[1].3j(\'&\');c 7i.36({},7(5b,72){d 1i=72.3j(\'=\');5b[1i[0]]=1i[1];c 5b})},1Z:7(){c 6.3j(\'\')},3P:7(){d 2l=6.3j(\'-\');f(2l.t==1)c 2l[0];d 54=6.5g(\'-\')==0?2l[0].7e(0).3Y()+2l[0].7g(1):2l[0];G(d i=1,73=2l.t;i<73;i++){d s=2l[i];54+=s.7e(0).3Y()+s.7g(1)}c 54},1U:7(){c"\'"+6.2y(/\\\\/g,\'\\\\\\\\\').2y(/\'/g,\'\\\\\\\'\')+"\'"}});4b.v.2T.52=7(1z){f(2i 1z==\'7\')c 1z;d 2U=z 3n(1z);c 7(I){c 2U.7a(I)}};4b.v.9h=4b.v.78;d 3n=1b.17();3n.79=/(^|.|\\r|\\n)(#\\{(.*?)\\})/;3n.v={1I:7(2U,1A){6.2U=2U.2C();6.1A=1A||3n.79},7a:7(U){c 6.2U.2T(6.1A,7(I){d 53=I[1];f(53==\'\\\\\')c I[2];c 53+(U[I[3]]||\'\').2C()})}};d $1y=z q();d $49=z q();d 1p={V:7(o){d w=0;1j{6.2m(7(h){1j{o(h,w++)}1s(e){f(e!=$49)25 e}})}1s(e){f(e!=$1y)25 e}},9n:7(o){d L=11;6.V(7(h,w){L=L&&!!(o||T.K)(h,w);f(!L)25 $1y});c L},9o:7(o){d L=11;6.V(7(h,w){f(L=!!(o||T.K)(h,w))25 $1y});c L},3e:7(o){d P=[];6.V(7(h,w){P.W(o(h,w))});c P},7n:7(o){d L;6.V(7(h,w){f(o(h,w)){L=h;25 $1y}});c L},7o:7(o){d P=[];6.V(7(h,w){f(o(h,w))P.W(h)});c P},9p:7(1A,o){d P=[];6.V(7(h,w){d 7c=h.2C();f(7c.I(1A))P.W((o||T.K)(h,w))});c P},1M:7(U){d 51=Y;6.V(7(h){f(h==U){51=11;25 $1y}});c 51},36:7(45,o){6.V(7(h,w){45=o(45,h,w)});c 45},9q:7(1F){d 23=$A(N).47(1);c 6.3e(7(h){c h[1F].2n(h,23)})},9s:7(o){d L;6.V(7(h,w){h=(o||T.K)(h,w);f(L==1v||h>=L)L=h});c L},9u:7(o){d L;6.V(7(h,w){h=(o||T.K)(h,w);f(L==1v||hb?1:0}).3r(\'h\')},1Z:7(){c 6.3e(T.K)},9B:7(){d o=T.K,23=$A(N);f(2i 23.5e()==\'7\')o=23.9C();d 7l=[6].3s(23).1C($A);c 6.1C(7(h,w){c o(7l.3r(w))})},1U:7(){c\'#<1p:\'+6.1Z().1U()+\'>\'}};q.u(1p,{1C:1p.3e,5v:1p.7n,1k:1p.7o,8M:1p.1M,7p:1p.1Z});d $A=1E.7q=7(2R){f(!2R)c[];f(2R.1Z){c 2R.1Z()}1D{d P=[];G(d i=0;i<2R.t;i++)P.W(2R[i]);c P}};q.u(1E.v,1p);f(!1E.v.4d)1E.v.4d=1E.v.4m;q.u(1E.v,{2m:7(o){G(d i=0;i<6.t;i++)o(6[i])},5i:7(){6.t=0;c 6},7r:7(){c 6[0]},5e:7(){c 6[6.t-1]},7s:7(){c 6.1k(7(h){c h!=1v||h!=1L})},6J:7(){c 6.36([],7(6H,h){c 6H.3s(h&&h.5D==1E?h.6J():[h])})},5s:7(){d 4N=$A(N);c 6.1k(7(h){c!4N.1M(h)})},5g:7(U){G(d i=0;i<6.t;i++)f(6[i]==U)c i;c-1},4m:7(5h){c(5h!==Y?6:6.1Z()).4d()},1U:7(){c\'[\'+6.1C(q.1U).1N(\', \')+\']\'}});d 4h={2m:7(o){G(d 1O 2M 6){d h=6[1O];f(2i h==\'7\')49;d 1i=[1O,h];1i.1O=1O;1i.h=h;o(1i)}},7t:7(){c 6.3r(\'1O\')},4N:7(){c 6.3r(\'h\')},7u:7(2N){c $H(2N).36($H(6),7(4Q,1i){4Q[1i.1O]=1i.h;c 4Q})},7w:7(){c 6.1C(7(1i){c 1i.1C(4n).1N(\'=\')}).1N(\'&\')},1U:7(){c\'#<4h:{\'+6.1C(7(1i){c 1i.1C(q.1U).1N(\': \')}).1N(\', \')+\'}>\'}};7 $H(U){d 2N=q.u({},U||{});q.u(2N,1p);q.u(2N,4h);c 2N};3L=1b.17();q.u(3L.v,1p);q.u(3L.v,{1I:7(22,2x,2H){6.22=22;6.2x=2x;6.2H=2H},2m:7(o){d h=6.22;2q{o(h);h=h.5j()}1H(6.1M(h))},1M:7(h){f(h<6.22)c Y;f(6.2H)c h<6.2x;c h<=6.2x}});d $R=7(22,2x,2H){c z 3L(22,2x,2H)};d M={4w:7(){c 6s.6j(7(){c z 5C()},7(){c z 5n(\'7y.6d\')},7(){c z 5n(\'7z.6d\')})||Y},4s:0};M.2W={3b:[],2m:7(o){6.3b.2m(o)},69:7(4F){f(!6.1M(4F))6.3b.W(4F)},7A:7(5t){6.3b=6.3b.5s(5t)},3y:7(1a,26,E,2Z){6.V(7(3o){f(3o[1a]&&2i 3o[1a]==\'7\'){1j{3o[1a].2n(3o,[26,E,2Z])}1s(e){}}})}};q.u(M.2W,1p);M.2W.69({5G:7(){M.4s++},1B:7(){M.4s--}});M.44=7(){};M.44.v={4a:7(m){6.m={1F:\'4j\',4p:11,5H:\'5E/x-86-Q-7C\',28:\'\'};q.u(6.m,m||{})},3l:7(){c 6.E.32==1v||6.E.32==0||(6.E.32>=84&&6.E.32<7E)},7G:7(){c!6.3l()}};M.3t=1b.17();M.3t.5L=[\'7H\',\'80\',\'7I\',\'7J\',\'4t\'];M.3t.v=q.u(z M.44(),{1I:7(1l,m){6.E=M.4w();6.4a(m);6.26(1l)},26:7(1l){d 28=6.m.28||\'\';f(28.t>0)28+=\'&7K=\';1j{6.1l=1l;f(6.m.1F==\'7L\'&&28.t>0)6.1l+=(6.1l.I(/\\?/)?\'&\':\'?\')+28;M.2W.3y(\'5G\',6,6.E);6.E.7N(6.m.1F,6.1l,6.m.4p);f(6.m.4p){6.E.5T=6.5J.1d(6);2Y((7(){6.4r(1)}).1d(6),10)}6.5A();d 1c=6.m.5V?6.m.5V:28;6.E.7O(6.m.1F==\'4j\'?1c:1L)}1s(e){6.3p(e)}},5A:7(){d 1P=[\'X-7P-7Q\',\'5C\',\'X-T-4l\',T.4l,\'7R\',\'1Y/7m, 1Y/2e, 5E/5F, 1Y/5F, */*\'];f(6.m.1F==\'4j\'){1P.W(\'5Q-2g\',6.m.5H);f(6.E.7S)1P.W(\'7T\',\'7U\')}f(6.m.1P)1P.W.2n(1P,6.m.1P);G(d i=0;i<1P.t;i+=2)6.E.7V(1P[i],1P[i+1])},5J:7(){d 2F=6.E.2F;f(2F!=1)6.4r(6.E.2F)},4A:7(B){1j{c 6.E.7W(B)}1s(e){}},5M:7(){1j{c 4q(\'(\'+6.4A(\'X-7X\')+\')\')}1s(e){}},5R:7(){1j{c 4q(6.E.3F)}1s(e){6.3p(e)}},4r:7(2F){d C=M.3t.5L[2F];d E=6.E,2Z=6.5M();f(C==\'4t\'){1j{(6.m[\'2I\'+6.E.32]||6.m[\'2I\'+(6.3l()?\'81\':\'82\')]||T.2v)(E,2Z)}1s(e){6.3p(e)}f((6.4A(\'5Q-2g\')||\'\').I(/^1Y\\/7m/i))6.5R()}1j{(6.m[\'2I\'+C]||T.2v)(E,2Z);M.2W.3y(\'2I\'+C,6,E,2Z)}1s(e){6.3p(e)}f(C==\'4t\')6.E.5T=T.2v},3p:7(57){(6.m.5W||T.2v)(6,57);M.2W.3y(\'5W\',6,57)}});M.4C=1b.17();q.u(q.u(M.4C.v,M.3t.v),{1I:7(1w,1l,m){6.4x={3m:1w.3m?$(1w.3m):$(1w),3z:1w.3z?$(1w.3z):(1w.3m?1L:$(1w))};6.E=M.4w();6.4a(m);d 1B=6.m.1B||T.2v;6.m.1B=(7(E,U){6.5Y();1B(E,U)}).1d(6);6.26(1l)},5Y:7(){d 3A=6.3l()?6.4x.3m:6.4x.3z;d 3k=6.E.3F;f(!6.m.3q)3k=3k.2Q();f(3A){f(6.m.60){z 6.m.60(3A,3k)}1D{k.6h(3A,3k)}}f(6.3l()){f(6.1B)2Y(6.1B.1d(6),10)}}});M.61=1b.17();M.61.v=q.u(z M.44(),{1I:7(1w,1l,m){6.4a(m);6.1B=6.m.1B;6.1J=(6.m.1J||2);6.2s=(6.m.2s||1);6.4B={};6.1w=1w;6.1l=1l;6.22()},22:7(){6.m.1B=6.63.1d(6);6.2D()},7b:7(){6.4B.1B=1v;89(6.65);(6.1B||T.2v).2n(6,N)},63:7(26){f(6.m.2s){6.2s=(26.3F==6.64?6.2s*6.m.2s:1);6.64=26.3F}6.65=2Y(6.2D.1d(6),6.2s*6.1J*4z)},2D:7(){6.4B=z M.4C(6.1w,6.1l,6.m)}});7 $(){d P=[],4;G(d i=0;i<4V>\'+6.2t+\'\';c $A(1q.2z[0].2z[0].2z)}};d 1g=z q();1g.6W=1b.17();1g.6W.v=q.u(z 1e.1g(\'96\'),{2V:7(){6.1K.97(6.4)},2X:7(2h){2h.V((7(2j){6.4.1X.55(2j,6.4)}).1d(6))}});1g.5m=1b.17();1g.5m.v=q.u(z 1e.1g(\'99\'),{2V:7(){6.1K.56(6.4);6.1K.74(11)},2X:7(2h){2h.4m(Y).V((7(2j){6.4.55(2j,6.4.9a)}).1d(6))}});1g.7h=1b.17();1g.7h.v=q.u(z 1e.1g(\'9d\'),{2V:7(){6.1K.56(6.4);6.1K.74(6.4)},2X:7(2h){2h.V((7(2j){6.4.75(2j)}).1d(6))}});1g.76=1b.17();1g.76.v=q.u(z 1e.1g(\'9i\'),{2V:7(){6.1K.9m(6.4)},2X:7(2h){2h.V((7(2j){6.4.1X.55(2j,6.4.9t)}).1d(6))}});k.3S=1b.17();k.3S.v={1I:7(4){6.4=$(4)},2m:7(o){6.4.1f.3j(/\\s+/).1k(7(B){c B.t>0}).2m(o)},5c:7(1f){6.4.1f=1f},7k:7(5a){f(6.1M(5a))c;6.5c(6.1Z().3s(5a).1N(\' \'))},42:7(4c){f(!6.1M(4c))c;6.5c(6.1k(7(1f){c 1f!=4c}).1N(\' \'))},2C:7(){c 6.1Z().1N(\' \')}};q.u(k.3S.v,1p);d 5I={5i:7(){G(d i=0;i=0){2b=4.m[w];h=2b.h||2b.1Y}c[4.B,h]},5X:7(4){d h=[];G(d i=0;i<4.t;i++){d 2b=4.m[i];f(2b.87)h.W(2b.h||2b.1Y)}c[4.B,h]}};d $F=D.k.1x;1e.3D=7(){};1e.3D.v={1I:7(4,1J,1a){6.1J=1J;6.4=$(4);6.1a=1a;6.2K=6.1x();6.2A()},2A:7(){5Z(6.2D.1d(6),6.1J*4z)},2D:7(){d h=6.1x();f(6.2K!=h){6.1a(6.4,h);6.2K=h}}};D.k.3C=1b.17();D.k.3C.v=q.u(z 1e.3D(),{1x:7(){c D.k.1x(6.4)}});D.3C=1b.17();D.3C.v=q.u(z 1e.3D(),{1x:7(){c D.3a(6.4)}});1e.2c=7(){};1e.2c.v={1I:7(4,1a){6.4=$(4);6.1a=1a;6.2K=6.1x();f(6.4.1h.2w()==\'Q\')6.67();1D 6.2A(6.4)},4K:7(){d h=6.1x();f(6.2K!=h){6.1a(6.4,h);6.2K=h}},67:7(){d 12=D.2L(6.4);G(d i=0;i<12.t;i++)6.2A(12[i])},2A:7(4){f(4.2g){6c(4.2g.2w()){1r\'6g\':1r\'6i\':1o.3B(4,\'8j\',6.4K.1d(6));1y;1r\'6l\':1r\'1Y\':1r\'3J\':1r\'1k-6n\':1r\'1k-8t\':1o.3B(4,\'8u\',6.4K.1d(6));1y}}}};D.k.2c=1b.17();D.k.2c.v=q.u(z 1e.2c(),{1x:7(){c D.k.1x(6.4)}});D.2c=1b.17();D.2c.v=q.u(z 1e.2c(),{1x:7(){c D.3a(6.4)}});f(!1W.1o){d 1o=z q()}q.u(1o,{8C:8,8F:9,8H:13,8I:27,8J:37,8L:38,8O:39,8T:40,8X:46,4:7(C){c C.Z||C.91},95:7(C){c(((C.6X)&&(C.6X==1))||((C.6Z)&&(C.6Z==1)))},9b:7(C){c C.9e||(C.9f+(J.3R.2G||J.1c.2G))},9g:7(C){c C.9j||(C.9k+(J.3R.2O||J.1c.2O))},7b:7(C){f(C.7d){C.7d();C.9r()}1D{C.48=Y;C.9w=11}},9A:7(C,1h){d 4=1o.4(C);1H(4.1X&&(!4.1h||(4.1h.3Y()!=1h.3Y())))4=4.1X;c 4},1T:Y,5u:7(4,B,1V,1u){f(!6.1T)6.1T=[];f(4.5f){6.1T.W([4,B,1V,1u]);4.5f(B,1V,1u)}1D f(4.4i){6.1T.W([4,B,1V,1u]);4.4i(\'2I\'+B,1V)}},66:7(){f(!1o.1T)c;G(d i=0;i<1o.1T.t;i++){1o.5N.2n(6,1o.1T[i]);1o.1T[i][0]=1L}1o.1T=Y},3B:7(4,B,1V,1u){d 4=$(4);1u=1u||Y;f(B==\'5U\'&&(33.4u.I(/3x|3w|3u/)||4.4i))B=\'5K\';6.5u(4,B,1V,1u)},5N:7(4,B,1V,1u){d 4=$(4);1u=1u||Y;f(B==\'5U\'&&(33.4u.I(/3x|3w|3u/)||4.4k))B=\'5K\';f(4.5x){4.5x(B,1V,1u)}1D f(4.4k){1j{4.4k(\'2I\'+B,1V)}1s(e){}}}});f(33.4u.I(/\\88\\b/))1o.3B(1W,\'8a\',1o.66,Y);d 2d={6o:Y,4P:7(){6.6z=1W.8e||J.3R.2G||J.1c.2G||0;6.6F=1W.8g||J.3R.2O||J.1c.2O||0},6u:7(4){d 19=0,15=0;2q{19+=4.2O||0;15+=4.2G||0;4=4.1X}1H(4);c[15,19]},35:7(4){d 19=0,15=0;2q{19+=4.29||0;15+=4.2f||0;4=4.1Q}1H(4);c[15,19]},68:7(4){d 19=0,15=0;2q{19+=4.29||0;15+=4.2f||0;4=4.1Q;f(4){p=k.1R(4,\'14\');f(p==\'3T\'||p==\'2o\')1y}}1H(4);c[15,19]},1Q:7(4){f(4.1Q)c 4.1Q;f(4==J.1c)c 4;1H((4=4.1X)&&4!=J.1c)f(k.1R(4,\'14\')!=\'4G\')c 4;c J.1c},8o:7(4,x,y){f(6.6o)c 6.6r(4,x,y);6.3g=x;6.34=y;6.1t=6.35(4);c(y>=6.1t[1]&&y<6.1t[1]+4.2k&&x>=6.1t[0]&&x<6.1t[0]+4.2p)},6r:7(4,x,y){d 4S=6.6u(4);6.3g=x+4S[0]-6.6z;6.34=y+4S[1]-6.6F;6.1t=6.35(4);c(6.34>=6.1t[1]&&6.34<6.1t[1]+4.2k&&6.3g>=6.1t[0]&&6.3g<6.1t[0]+4.2p)},8E:7(3Z,4){f(!3Z)c 0;f(3Z==\'8G\')c((6.1t[1]+4.2k)-6.34)/4.2k;f(3Z==\'8K\')c((6.1t[0]+4.2p)-6.3g)/4.2p},77:7(O,Z){O=$(O);Z=$(Z);Z.l.14=\'2o\';d 2P=6.35(O);Z.l.1n=2P[1]+\'1m\';Z.l.18=2P[0]+\'1m\';Z.l.21=O.2p+\'1m\';Z.l.24=O.2k+\'1m\'},4e:7(4M){d 19=0,15=0;d 4=4M;2q{19+=4.29||0;15+=4.2f||0;f(4.1Q==J.1c)f(k.1R(4,\'14\')==\'2o\')1y}1H(4=4.1Q);4=4M;2q{19-=4.2O||0;15-=4.2G||0}1H(4=4.1X);c[15,19]},77:7(O,Z){d m=q.u({5l:11,5r:11,5B:11,5q:11,29:0,2f:0},N[2]||{});O=$(O);d p=2d.4e(O);Z=$(Z);d 2J=[0,0];d 3v=1L;f(k.1R(Z,\'14\')==\'2o\'){3v=2d.1Q(Z);2J=2d.4e(3v)}f(3v==J.1c){2J[0]-=J.1c.2f;2J[1]-=J.1c.29}f(m.5l)Z.l.18=(p[0]-2J[0]+m.2f)+\'1m\';f(m.5r)Z.l.1n=(p[1]-2J[1]+m.29)+\'1m\';f(m.5B)Z.l.21=O.2p+\'1m\';f(m.5q)Z.l.24=O.2k+\'1m\'},8b:7(4){4=$(4);f(4.l.14==\'2o\')c;2d.4P();d 2P=2d.68(4);d 1n=2P[1];d 18=2P[0];d 21=4.6m;d 24=4.6p;4.6P=18-3X(4.l.18||0);4.6I=1n-3X(4.l.1n||0);4.5k=4.l.21;4.7f=4.l.24;4.l.14=\'2o\';4.l.1n=1n+\'1m\';4.l.18=18+\'1m\';4.l.21=21+\'1m\';4.l.24=24+\'1m\'},8w:7(4){4=$(4);f(4.l.14==\'3T\')c;2d.4P();4.l.14=\'3T\';d 1n=3X(4.l.1n||0)-(4.6I||0);d 18=3X(4.l.18||0)-(4.6P||0);4.l.1n=1n+\'1m\';4.l.18=18+\'1m\';4.l.24=4.7f;4.l.21=4.5k}};f(/3x|3w|3u/.4v(33.62)){2d.35=7(4){d 19=0,15=0;2q{19+=4.29||0;15+=4.2f||0;f(4.1Q==J.1c)f(k.1R(4,\'14\')==\'2o\')1y;4=4.1Q}1H(4);c[15,19]}};',62,600,'||||element||this|function|||||return|var||if||value|||Element|style|options||iterator||Object|||length|extend|prototype|index|||new||name|event|Form|transport||for||match|document||result|Ajax|arguments|source|results|form|||Prototype|object|each|push||false|target||true|elements||position|valueL||create|left|valueT|callback|Class|body|bind|Abstract|className|Insertion|tagName|pair|try|select|url|px|top|Event|Enumerable|div|case|catch|offset|useCapture|undefined|container|getValue|break|replacement|pattern|onComplete|map|else|Array|method|property|while|initialize|frequency|range|null|include|join|key|requestHeaders|offsetParent|getStyle|parameter|observers|inspect|observer|window|parentNode|text|toArray|els|width|start|args|height|throw|request||parameters|offsetTop|methods|opt|EventObserver|Position|html|offsetLeft|type|fragments|typeof|fragment|offsetHeight|oStringList|_each|apply|absolute|offsetWidth|do|cache|decay|content|input|emptyFunction|toLowerCase|end|replace|childNodes|registerCallback|display|toString|onTimerEvent|Serializers|readyState|scrollLeft|exclusive|on|delta|lastValue|getElements|in|hash|scrollTop|offsets|stripScripts|iterable|truncation|gsub|template|initializeRange|Responders|insertContent|setTimeout|json||hidden|status|navigator|ycomp|cumulativeOffset|inject||||serialize|responders|_overflow|Methods|collect|adjacency|xcomp|innerHTML|count|split|response|responseIsSuccess|success|Template|responder|dispatchException|evalScripts|pluck|concat|Request|KHTML|parent|Safari|Konqueror|dispatch|failure|receiver|observe|Observer|TimedObserver|ScriptFragment|responseText|script|inputs|ancestor|textarea|classNames|ObjectRange|node|typeName|RegExp|camelize|none|documentElement|ClassNames|relative|right|overflow|HTMLElement|parseFloat|toUpperCase|mode||currentlyExecuting|remove|__method|Base|memo||slice|returnValue|continue|setOptions|String|classNameToRemove|_reverse|page|focus|queryComponent|Hash|attachEvent|post|detachEvent|Version|reverse|encodeURIComponent|disabled|asynchronous|eval|respondToReadyState|activeRequestCount|Complete|appVersion|test|getTransport|containers|matchingInputs|1000|header|updater|Updater|getElementsByTagName|child|responderToAdd|static|tagElements|queryComponents|defaultView|onElementEvent|css|forElement|values|visibility|prepare|mergedHash|pos|offsetcache|_madePositioned|visible|tbody|findOrStore|_nativeExtensions|createElement|digits|trues|found|prepareReplacement|before|camelizedString|insertBefore|selectNodeContents|exception|falses|criteria|classNameToAdd|params|set|destination|last|addEventListener|indexOf|inline|clear|succ|_originalWidth|setLeft|Top|ActiveXObject|scriptTag|matchOne|setHeight|setTop|without|responderToRemove|_observeAndCache|find|reset|removeEventListener|activate|findFirstElement|setRequestHeaders|setWidth|XMLHttpRequest|constructor|application|xml|onCreate|contentType|Field|onStateChange|keydown|Events|evalJSON|stopObserving|inputSelector|img|Content|evalResponse|selectOne|onreadystatechange|keypress|postBody|onException|selectMany|updateContent|setInterval|insertion|PeriodicalUpdater|userAgent|updateComplete|lastText|timer|unloadCache|registerFormCallbacks|positionedOffset|register|parentElement|children|switch|XMLHTTP|_extended|hide|checkbox|update|radio|these|outerHTML|password|clientWidth|one|includeScrollOffsets|clientHeight|nodeValue|withinIncludingScrolloffsets|Try|scrollTo|realOffset|getComputedStyle|show|currentStyle|auto|deltaX|originalPosition|originalVisibility|originalWidth|originalHeight|opera|deltaY|bottom|array|_originalTop|flatten|addMethods|lambda|Toggle|toggle|insertAdjacentHTML|_originalLeft|PeriodicalExecuter|ownerDocument|createRange|createContextualFragment|contentFromAnonymousTable|table|Before|which|matchAll|button|extractScripts|stripTags|pairString|len|collapse|appendChild|After|clone|toQueryParams|Pattern|evaluate|stop|stringValue|preventDefault|charAt|_originalHeight|substring|Bottom|pairs|Function|add|collections|javascript|detect|findAll|entries|from|first|compact|keys|merge|present|toQueryString|getInputs|Msxml2|Microsoft|unregister|disable|urlencoded|blur|300|enable|responseIsFailure|Uninitialized|Loaded|Interactive|_|get|focusFirstElement|open|send|Requested|With|Accept|overrideMimeType|Connection|close|setRequestHeader|getResponseHeader|JSON|gi|submit|Loading|Success|Failure|checked|200|selectedIndex|www|selected|bMSIE|clearTimeout|unload|absolutize|string|getElementById|pageXOffset|getElementsByClassName|pageYOffset|removeChild|replaceChild|click|getHeight|hasClassName|addClassName|removeClassName|within|cleanWhitespace|nodeType|empty|childOf|multiple|change|getPropertyValue|relativize|setStyle|getDimensions|makePositioned|undoPositioned|makeClipping|KEY_BACKSPACE|undoClipping|overlap|KEY_TAB|vertical|KEY_RETURN|KEY_ESC|KEY_LEFT|horizontal|KEY_UP|member|tr|KEY_RIGHT|0_RC_0|Number|instanceof|shift|KEY_DOWN|bindAsEventListener|call|toColorPart|KEY_DELETE|times|finally|callee|srcElement|sub|scan|truncate|isLeftClick|beforeBegin|setStartBefore|im|afterBegin|firstChild|pointerX|unescapeHTML|beforeEnd|pageX|clientX|pointerY|parseQuery|afterEnd|pageY|clientY|RangeError|setStartAfter|all|any|grep|invoke|stopPropagation|max|nextSibling|min|partition|cancelBubble|reject|sortBy|sort|findElement|zip|pop|createTextNode|escapeHTML|strip'.split('|'),0,{}) + +} + +assertEq(decompressedMochiKit.length, 106415) +assertEq(decompressedMochiKit[2000], '5') +assertEq(decompressedMochiKit[12000], '_') +assertEq(decompressedMochiKit[82556], '>') diff --git a/js/src/jit-test/tests/symbol-equality.js b/js/src/jit-test/tests/symbol-equality.js new file mode 100644 index 0000000000..1b56273a7c --- /dev/null +++ b/js/src/jit-test/tests/symbol-equality.js @@ -0,0 +1,41 @@ +setJitCompilerOption("ion.warmup.trigger", 10); + +function simpleEquality() { + for (var i = 0; i < 150; i++) { + var x = Symbol(); + var y = Symbol(); + assertEq(x === y, false); + assertEq(x !== y, true); + assertEq(x == y, false); + assertEq(x != y, true); + } +} + +function equalOperands() { + for (var i = 0; i < 150; i++) { + var x = Symbol(); + assertEq(x === x, true); + assertEq(x !== x, false); + } +} + +function bitwiseCompare() { + var ar = [true, false, Symbol(), null, undefined]; + var s = Symbol(); + ar.push(s); + + for (var i = 0; i < 150; i++) { + for (var j = 0; j < ar.length; j++) { + var equal = (j == ar.indexOf(s)); + + assertEq(ar[j] === s, equal); + assertEq(ar[j] !== s, !equal); + assertEq(ar[j] == s, equal); + assertEq(ar[j] != s, !equal); + } + } +} + +equalOperands(); +simpleEquality(); +bitwiseCompare(); diff --git a/js/src/jit-test/tests/symbol/bug-1033856.js b/js/src/jit-test/tests/symbol/bug-1033856.js new file mode 100644 index 0000000000..18f80ac202 --- /dev/null +++ b/js/src/jit-test/tests/symbol/bug-1033856.js @@ -0,0 +1,6 @@ +function f(x, y) { + return x == y; +} +f(1.1, 2.2); +for (var i=0; i<5; i++) + f(1, Symbol()); diff --git a/js/src/jit-test/tests/symbol/not.js b/js/src/jit-test/tests/symbol/not.js new file mode 100644 index 0000000000..7237b0b36c --- /dev/null +++ b/js/src/jit-test/tests/symbol/not.js @@ -0,0 +1,13 @@ +for (var i = 0; i < 9; i++) + assertEq(!Symbol(), false, "symbols are truthy"); + +var a = [0, 0, 0, 0, 0, Symbol(), Symbol()]; +var b = []; +function f(i, v) { + b[i] = !v; +} +for (var i = 0; i < a.length; i++) + f(i, a[i]); +assertEq(b[b.length - 3], true); +assertEq(b[b.length - 2], false); +assertEq(b[b.length - 1], false); diff --git a/js/src/jit-test/tests/symbol/toNumber-2.js b/js/src/jit-test/tests/symbol/toNumber-2.js new file mode 100644 index 0000000000..05a3224e96 --- /dev/null +++ b/js/src/jit-test/tests/symbol/toNumber-2.js @@ -0,0 +1,14 @@ +// |jit-test| error: ReferenceError +function eq(e, a) { + passed = (a == e); +} +function f(e, a) { + fail(); + eq(e, a); +} +try { + f(); +} catch (exc1) {} +eq(.1, .1); +var sym = Symbol("method"); +evaluate("f(test, sym, 0)", {isRunOnce:true}); diff --git a/js/src/jit-test/tests/symbol/toNumber.js b/js/src/jit-test/tests/symbol/toNumber.js new file mode 100644 index 0000000000..4677acbeb4 --- /dev/null +++ b/js/src/jit-test/tests/symbol/toNumber.js @@ -0,0 +1,53 @@ +load(libdir + "asserts.js"); + +var sym = Symbol(); + +function add2(x) { + return x + 2; +} +for (var i = 0; i < 9; i++) + assertThrowsInstanceOf(() => add2(sym), TypeError); + +function sqr(x) { + return x * x; +} +for (var i = 0; i < 9; i++) + assertThrowsInstanceOf(() => sqr(sym), TypeError); + +function bit_or(x) { + return x | x; +} +for (var i = 0; i < 9; i++) + assertThrowsInstanceOf(() => bit_or(sym), TypeError); + +function bit_not(x) { + return ~x; +} +for (var i = 0; i < 9; i++) + assertThrowsInstanceOf(() => bit_not(sym), TypeError); + +function plus(x) { + return +x; +} +for (var i = 0; i < 9; i++) + assertThrowsInstanceOf(() => plus(sym), TypeError); + +function f(a, b) { + return a + b; +} + +function testPoly() { + assertEq(f(20, 30), 50); + assertEq(f("one", "two"), "onetwo"); + assertThrowsInstanceOf(() => f(Symbol("one"), Symbol("two")), TypeError); + assertThrowsInstanceOf(() => f(Symbol("14"), 14), TypeError); + assertThrowsInstanceOf(() => f(Symbol("14"), 13.719), TypeError); + assertThrowsInstanceOf(() => f(14, Symbol("14")), TypeError); + assertThrowsInstanceOf(() => f(13.719, Symbol("14")), TypeError); +} + +for (var i = 0; i < 9; i++) + testPoly(); + +for (var i = 0; i < 9; i++) + assertThrowsInstanceOf(() => assertEq(f(Symbol("14"), "40"), NaN), TypeError); diff --git a/js/src/jit-test/tests/symbol/toString.js b/js/src/jit-test/tests/symbol/toString.js new file mode 100644 index 0000000000..764ea7aab4 --- /dev/null +++ b/js/src/jit-test/tests/symbol/toString.js @@ -0,0 +1,11 @@ +// ToString(symbol) throws a TypeError. + +var N = 10, obj, hits = 0; +for (var i = 0; i < N; i++) { + try { + obj = new String(Symbol()); + } catch (exc) { + hits++; + } +} +assertEq(hits, N); diff --git a/js/src/jit-test/tests/symbol/truthiness.js b/js/src/jit-test/tests/symbol/truthiness.js new file mode 100644 index 0000000000..a672158d60 --- /dev/null +++ b/js/src/jit-test/tests/symbol/truthiness.js @@ -0,0 +1,13 @@ +for (var i = 0; i < 9; i++) + assertEq(Symbol() ? 1 : 0, 1, "symbols are truthy"); + +var a = [0, 0, 0, 0, 0, Symbol(), Symbol()]; +var b = []; +function f(i, v) { + b[i] = v ? "yes" : "no"; +} +for (var i = 0; i < a.length; i++) + f(i, a[i]); +assertEq(b[b.length - 3], "no"); +assertEq(b[b.length - 2], "yes"); +assertEq(b[b.length - 1], "yes"); diff --git a/js/src/jit-test/tests/symbol/typed-arrays.js b/js/src/jit-test/tests/symbol/typed-arrays.js new file mode 100644 index 0000000000..005eec09af --- /dev/null +++ b/js/src/jit-test/tests/symbol/typed-arrays.js @@ -0,0 +1,29 @@ +load(libdir + "asserts.js"); + +var LENGTH = 1024, SYMBOL_INDEX = 999; + +var big = []; +for (var i = 0; i < LENGTH; i++) + big[i] = (i === SYMBOL_INDEX ? Symbol.for("comet") : i); + +var progress; +function copy(arr, big) { + for (var i = 0; i < LENGTH; i++) { + arr[i] = big[i]; + progress = i; + } +} + +for (var T of [Uint8Array, Uint8ClampedArray, Int16Array, Float32Array]) { + // Typed array constructors convert symbols using ToNumber, which throws. + assertThrowsInstanceOf(() => new T(big), TypeError); + + // Element assignment does the same. + var arr = new T(big.length); + for (var k = 0; k < 3; k++) { + progress = -1; + assertThrowsInstanceOf(() => copy(arr, big), TypeError); + assertEq(progress, SYMBOL_INDEX - 1); + assertEq(arr[SYMBOL_INDEX], 0); + } +} diff --git a/js/src/jit-test/tests/symbol/typeof.js b/js/src/jit-test/tests/symbol/typeof.js new file mode 100644 index 0000000000..d2c7d51cfd --- /dev/null +++ b/js/src/jit-test/tests/symbol/typeof.js @@ -0,0 +1,9 @@ +var a = [0, 0, 0, 0, 0, Symbol(), Symbol()]; +var b = []; +function f(i, v) { + b[i] = typeof v; +} +for (var i = 0; i < a.length; i++) + f(i, a[i]); +assertEq(b[b.length - 2], "symbol"); +assertEq(b[b.length - 1], "symbol"); diff --git a/js/src/jit-test/tests/truthiness/equal-null.js b/js/src/jit-test/tests/truthiness/equal-null.js new file mode 100644 index 0000000000..bba6617db4 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/equal-null.js @@ -0,0 +1,37 @@ +function f(v, value) +{ + var b = v == null; + assertEq(b, value, + "failed: " + v + " " + value); +} + +f({}, false); +f({}, false); +f(null, true); +f(null, true); +f(undefined, true); +f(undefined, true); +f(createIsHTMLDDA(), true); +f(createIsHTMLDDA(), true); +f(Object.prototype, false); +f(Object.prototype, false); + +function g(v, value) +{ + var b = v == null; + assertEq(b, value, + "failed: " + v + " " + value); +} + +g({}, false); +g({}, false); + +function h(v, value) +{ + var b = v == null; + assertEq(b, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), true); +h(createIsHTMLDDA(), true); diff --git a/js/src/jit-test/tests/truthiness/equal-undefined.js b/js/src/jit-test/tests/truthiness/equal-undefined.js new file mode 100644 index 0000000000..b807098cb3 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/equal-undefined.js @@ -0,0 +1,37 @@ +function f(v, value) +{ + var b = v == undefined; + assertEq(b, value, + "failed: " + v + " " + value); +} + +f({}, false); +f({}, false); +f(null, true); +f(null, true); +f(undefined, true); +f(undefined, true); +f(createIsHTMLDDA(), true); +f(createIsHTMLDDA(), true); +f(Object.prototype, false); +f(Object.prototype, false); + +function g(v, value) +{ + var b = v == undefined; + assertEq(b, value, + "failed: " + v + " " + value); +} + +g({}, false); +g({}, false); + +function h(v, value) +{ + var b = v == undefined; + assertEq(b, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), true); +h(createIsHTMLDDA(), true); diff --git a/js/src/jit-test/tests/truthiness/if-equal-null.js b/js/src/jit-test/tests/truthiness/if-equal-null.js new file mode 100644 index 0000000000..79fc6f37dd --- /dev/null +++ b/js/src/jit-test/tests/truthiness/if-equal-null.js @@ -0,0 +1,46 @@ +var counterF = 0; + +function f(v, value) +{ + if (v == null) + counterF++; + assertEq(counterF, value, + "failed: " + v + " " + value); +} + +f({}, 0); +f({}, 0); +f(null, 1); +f(null, 2); +f(undefined, 3); +f(undefined, 4); +f(createIsHTMLDDA(), 5); +f(createIsHTMLDDA(), 6); +f(Object.prototype, 6); +f(Object.prototype, 6); + +var counterG = 0; + +function g(v, value) +{ + if (v == null) + counterG++; + assertEq(counterG, value, + "failed: " + v + " " + value); +} + +g({}, 0); +g({}, 0); + +var counterH = 0; + +function h(v, value) +{ + if (v == null) + counterH++; + assertEq(counterH, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), 1); +h(createIsHTMLDDA(), 2); diff --git a/js/src/jit-test/tests/truthiness/if-equal-undefined.js b/js/src/jit-test/tests/truthiness/if-equal-undefined.js new file mode 100644 index 0000000000..9a2284b94c --- /dev/null +++ b/js/src/jit-test/tests/truthiness/if-equal-undefined.js @@ -0,0 +1,46 @@ +var counterF = 0; + +function f(v, value) +{ + if (v == undefined) + counterF++; + assertEq(counterF, value, + "failed: " + v + " " + value); +} + +f({}, 0); +f({}, 0); +f(null, 1); +f(null, 2); +f(undefined, 3); +f(undefined, 4); +f(createIsHTMLDDA(), 5); +f(createIsHTMLDDA(), 6); +f(Object.prototype, 6); +f(Object.prototype, 6); + +var counterG = 0; + +function g(v, value) +{ + if (v == undefined) + counterG++; + assertEq(counterG, value, + "failed: " + v + " " + value); +} + +g({}, 0); +g({}, 0); + +var counterH = 0; + +function h(v, value) +{ + if (v == undefined) + counterH++; + assertEq(counterH, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), 1); +h(createIsHTMLDDA(), 2); diff --git a/js/src/jit-test/tests/truthiness/if-not-equal-null.js b/js/src/jit-test/tests/truthiness/if-not-equal-null.js new file mode 100644 index 0000000000..d0d266042b --- /dev/null +++ b/js/src/jit-test/tests/truthiness/if-not-equal-null.js @@ -0,0 +1,46 @@ +var counterF = 0; + +function f(v, value) +{ + if (v != null) + counterF++; + assertEq(counterF, value, + "failed: " + v + " " + value); +} + +f({}, 1); +f({}, 2); +f(null, 2); +f(null, 2); +f(undefined, 2); +f(undefined, 2); +f(createIsHTMLDDA(), 2); +f(createIsHTMLDDA(), 2); +f(Object.prototype, 3); +f(Object.prototype, 4); + +var counterG = 0; + +function g(v, value) +{ + if (v != null) + counterG++; + assertEq(counterG, value, + "failed: " + v + " " + value); +} + +g({}, 1); +g({}, 2); + +var counterH = 0; + +function h(v, value) +{ + if (v != null) + counterH++; + assertEq(counterH, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), 0); +h(createIsHTMLDDA(), 0); diff --git a/js/src/jit-test/tests/truthiness/if-not-equal-undefined.js b/js/src/jit-test/tests/truthiness/if-not-equal-undefined.js new file mode 100644 index 0000000000..204b8d293e --- /dev/null +++ b/js/src/jit-test/tests/truthiness/if-not-equal-undefined.js @@ -0,0 +1,46 @@ +var counterF = 0; + +function f(v, value) +{ + if (v != undefined) + counterF++; + assertEq(counterF, value, + "failed: " + v + " " + value); +} + +f({}, 1); +f({}, 2); +f(null, 2); +f(null, 2); +f(undefined, 2); +f(undefined, 2); +f(createIsHTMLDDA(), 2); +f(createIsHTMLDDA(), 2); +f(Object.prototype, 3); +f(Object.prototype, 4); + +var counterG = 0; + +function g(v, value) +{ + if (v != undefined) + counterG++; + assertEq(counterG, value, + "failed: " + v + " " + value); +} + +g({}, 1); +g({}, 2); + +var counterH = 0; + +function h(v, value) +{ + if (v != undefined) + counterH++; + assertEq(counterH, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), 0); +h(createIsHTMLDDA(), 0); diff --git a/js/src/jit-test/tests/truthiness/if-strict-equal-null.js b/js/src/jit-test/tests/truthiness/if-strict-equal-null.js new file mode 100644 index 0000000000..f571930ef9 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/if-strict-equal-null.js @@ -0,0 +1,46 @@ +var counterF = 0; + +function f(v, value) +{ + if (v === null) + counterF++; + assertEq(counterF, value, + "failed: " + v + " " + value); +} + +f({}, 0); +f({}, 0); +f(null, 1); +f(null, 2); +f(undefined, 2); +f(undefined, 2); +f(createIsHTMLDDA(), 2); +f(createIsHTMLDDA(), 2); +f(Object.prototype, 2); +f(Object.prototype, 2); + +var counterG = 0; + +function g(v, value) +{ + if (v === null) + counterG++; + assertEq(counterG, value, + "failed: " + v + " " + value); +} + +g({}, 0); +g({}, 0); + +var counterH = 0; + +function h(v, value) +{ + if (v === null) + counterH++; + assertEq(counterH, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), 0); +h(createIsHTMLDDA(), 0); diff --git a/js/src/jit-test/tests/truthiness/if-strict-equal-undefined.js b/js/src/jit-test/tests/truthiness/if-strict-equal-undefined.js new file mode 100644 index 0000000000..670adc4784 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/if-strict-equal-undefined.js @@ -0,0 +1,46 @@ +var counterF = 0; + +function f(v, value) +{ + if (v === undefined) + counterF++; + assertEq(counterF, value, + "failed: " + v + " " + value); +} + +f({}, 0); +f({}, 0); +f(null, 0); +f(null, 0); +f(undefined, 1); +f(undefined, 2); +f(createIsHTMLDDA(), 2); +f(createIsHTMLDDA(), 2); +f(Object.prototype, 2); +f(Object.prototype, 2); + +var counterG = 0; + +function g(v, value) +{ + if (v === undefined) + counterG++; + assertEq(counterG, value, + "failed: " + v + " " + value); +} + +g({}, 0); +g({}, 0); + +var counterH = 0; + +function h(v, value) +{ + if (v === undefined) + counterH++; + assertEq(counterH, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), 0); +h(createIsHTMLDDA(), 0); diff --git a/js/src/jit-test/tests/truthiness/if-strict-not-equal-null.js b/js/src/jit-test/tests/truthiness/if-strict-not-equal-null.js new file mode 100644 index 0000000000..cae48fb213 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/if-strict-not-equal-null.js @@ -0,0 +1,46 @@ +var counterF = 0; + +function f(v, value) +{ + if (v !== null) + counterF++; + assertEq(counterF, value, + "failed: " + v + " " + value); +} + +f({}, 1); +f({}, 2); +f(null, 2); +f(null, 2); +f(undefined, 3); +f(undefined, 4); +f(createIsHTMLDDA(), 5); +f(createIsHTMLDDA(), 6); +f(Object.prototype, 7); +f(Object.prototype, 8); + +var counterG = 0; + +function g(v, value) +{ + if (v !== null) + counterG++; + assertEq(counterG, value, + "failed: " + v + " " + value); +} + +g({}, 1); +g({}, 2); + +var counterH = 0; + +function h(v, value) +{ + if (v !== null) + counterH++; + assertEq(counterH, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), 1); +h(createIsHTMLDDA(), 2); diff --git a/js/src/jit-test/tests/truthiness/if-strict-not-equal-undefined.js b/js/src/jit-test/tests/truthiness/if-strict-not-equal-undefined.js new file mode 100644 index 0000000000..433446fe11 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/if-strict-not-equal-undefined.js @@ -0,0 +1,46 @@ +var counterF = 0; + +function f(v, value) +{ + if (v !== undefined) + counterF++; + assertEq(counterF, value, + "failed: " + v + " " + value); +} + +f({}, 1); +f({}, 2); +f(null, 3); +f(null, 4); +f(undefined, 4); +f(undefined, 4); +f(createIsHTMLDDA(), 5); +f(createIsHTMLDDA(), 6); +f(Object.prototype, 7); +f(Object.prototype, 8); + +var counterG = 0; + +function g(v, value) +{ + if (v !== undefined) + counterG++; + assertEq(counterG, value, + "failed: " + v + " " + value); +} + +g({}, 1); +g({}, 2); + +var counterH = 0; + +function h(v, value) +{ + if (v !== undefined) + counterH++; + assertEq(counterH, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), 1); +h(createIsHTMLDDA(), 2); diff --git a/js/src/jit-test/tests/truthiness/if.js b/js/src/jit-test/tests/truthiness/if.js new file mode 100644 index 0000000000..129df405f9 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/if.js @@ -0,0 +1,24 @@ +function t1(v) +{ + if (v) + return 1; + return 0; +} + +assertEq(t1(createIsHTMLDDA()), 0); +assertEq(t1(createIsHTMLDDA()), 0); +assertEq(t1(createIsHTMLDDA()), 0); + +function t2(v) +{ + if (v) + return 1; + return 0; +} + +assertEq(t2(17), 1); +assertEq(t2(0), 0); +assertEq(t2(-0), 0); +assertEq(t2(createIsHTMLDDA()), 0); +assertEq(t2(createIsHTMLDDA()), 0); +assertEq(t2(createIsHTMLDDA()), 0); diff --git a/js/src/jit-test/tests/truthiness/not-equal-null.js b/js/src/jit-test/tests/truthiness/not-equal-null.js new file mode 100644 index 0000000000..ab6c144bce --- /dev/null +++ b/js/src/jit-test/tests/truthiness/not-equal-null.js @@ -0,0 +1,37 @@ +function f(v, value) +{ + var b = v != null; + assertEq(b, value, + "failed: " + v + " " + value); +} + +f({}, true); +f({}, true); +f(null, false); +f(null, false); +f(undefined, false); +f(undefined, false); +f(createIsHTMLDDA(), false); +f(createIsHTMLDDA(), false); +f(Object.prototype, true); +f(Object.prototype, true); + +function g(v, value) +{ + var b = v != null; + assertEq(b, value, + "failed: " + v + " " + value); +} + +g({}, true); +g({}, true); + +function h(v, value) +{ + var b = v != null; + assertEq(b, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), false); +h(createIsHTMLDDA(), false); diff --git a/js/src/jit-test/tests/truthiness/not-equal-undefined.js b/js/src/jit-test/tests/truthiness/not-equal-undefined.js new file mode 100644 index 0000000000..533cf1f018 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/not-equal-undefined.js @@ -0,0 +1,37 @@ +function f(v, value) +{ + var b = v != undefined; + assertEq(b, value, + "failed: " + v + " " + value); +} + +f({}, true); +f({}, true); +f(null, false); +f(null, false); +f(undefined, false); +f(undefined, false); +f(createIsHTMLDDA(), false); +f(createIsHTMLDDA(), false); +f(Object.prototype, true); +f(Object.prototype, true); + +function g(v, value) +{ + var b = v != undefined; + assertEq(b, value, + "failed: " + v + " " + value); +} + +g({}, true); +g({}, true); + +function h(v, value) +{ + var b = v != undefined; + assertEq(b, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), false); +h(createIsHTMLDDA(), false); diff --git a/js/src/jit-test/tests/truthiness/not.js b/js/src/jit-test/tests/truthiness/not.js new file mode 100644 index 0000000000..58945734a1 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/not.js @@ -0,0 +1,24 @@ +function t1(v) +{ + if (!v) + return 1; + return 0; +} + +assertEq(t1(createIsHTMLDDA()), 1); +assertEq(t1(createIsHTMLDDA()), 1); +assertEq(t1(createIsHTMLDDA()), 1); + +function t2(v) +{ + if (!v) + return 1; + return 0; +} + +assertEq(t2(17), 0); +assertEq(t2(0), 1); +assertEq(t2(-0), 1); +assertEq(t2(createIsHTMLDDA()), 1); +assertEq(t2(createIsHTMLDDA()), 1); +assertEq(t2(createIsHTMLDDA()), 1); diff --git a/js/src/jit-test/tests/truthiness/obj-obj-equal.js b/js/src/jit-test/tests/truthiness/obj-obj-equal.js new file mode 100644 index 0000000000..0800c05432 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/obj-obj-equal.js @@ -0,0 +1,23 @@ +function f(v1, v2, value) +{ + var b = v1 == v2; + assertEq(b, value, + "failed: " + v1 + ", " + v2 + ": " + value); +} + +var obj = {}; +var emul = createIsHTMLDDA(); + +f(obj, obj, true); +f(obj, obj, true); +f(emul, obj, false); +f(emul, obj, false); +f(obj, emul, false); +f(obj, emul, false); +f(Object.prototype, obj, false); +f(Object.prototype, obj, false); +f(emul, emul, true); +f(createIsHTMLDDA(), emul, false); +f(createIsHTMLDDA(), emul, false); +f(emul, createIsHTMLDDA(), false); +f(emul, createIsHTMLDDA(), false); diff --git a/js/src/jit-test/tests/truthiness/obj-obj-not-equal.js b/js/src/jit-test/tests/truthiness/obj-obj-not-equal.js new file mode 100644 index 0000000000..5fb905aaf5 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/obj-obj-not-equal.js @@ -0,0 +1,23 @@ +function f(v1, v2, value) +{ + var b = v1 != v2; + assertEq(b, value, + "failed: " + v1 + ", " + v2 + ": " + value); +} + +var obj = {}; +var emul = createIsHTMLDDA(); + +f(obj, obj, false); +f(obj, obj, false); +f(emul, obj, true); +f(emul, obj, true); +f(obj, emul, true); +f(obj, emul, true); +f(Object.prototype, obj, true); +f(Object.prototype, obj, true); +f(emul, emul, false); +f(createIsHTMLDDA(), emul, true); +f(createIsHTMLDDA(), emul, true); +f(emul, createIsHTMLDDA(), true); +f(emul, createIsHTMLDDA(), true); diff --git a/js/src/jit-test/tests/truthiness/strict-equal-null.js b/js/src/jit-test/tests/truthiness/strict-equal-null.js new file mode 100644 index 0000000000..a20d893332 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/strict-equal-null.js @@ -0,0 +1,37 @@ +function f(v, value) +{ + var b = v === null; + assertEq(b, value, + "failed: " + v + " " + value); +} + +f({}, false); +f({}, false); +f(null, true); +f(null, true); +f(undefined, false); +f(undefined, false); +f(createIsHTMLDDA(), false); +f(createIsHTMLDDA(), false); +f(Object.prototype, false); +f(Object.prototype, false); + +function g(v, value) +{ + var b = v === null; + assertEq(b, value, + "failed: " + v + " " + value); +} + +g({}, false); +g({}, false); + +function h(v, value) +{ + var b = v === null; + assertEq(b, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), false); +h(createIsHTMLDDA(), false); diff --git a/js/src/jit-test/tests/truthiness/strict-equal-undefined.js b/js/src/jit-test/tests/truthiness/strict-equal-undefined.js new file mode 100644 index 0000000000..f58e13698d --- /dev/null +++ b/js/src/jit-test/tests/truthiness/strict-equal-undefined.js @@ -0,0 +1,37 @@ +function f(v, value) +{ + var b = v === undefined; + assertEq(b, value, + "failed: " + v + " " + value); +} + +f({}, false); +f({}, false); +f(null, false); +f(null, false); +f(undefined, true); +f(undefined, true); +f(createIsHTMLDDA(), false); +f(createIsHTMLDDA(), false); +f(Object.prototype, false); +f(Object.prototype, false); + +function g(v, value) +{ + var b = v === undefined; + assertEq(b, value, + "failed: " + v + " " + value); +} + +g({}, false); +g({}, false); + +function h(v, value) +{ + var b = v === undefined; + assertEq(b, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), false); +h(createIsHTMLDDA(), false); diff --git a/js/src/jit-test/tests/truthiness/strict-not-equal-null.js b/js/src/jit-test/tests/truthiness/strict-not-equal-null.js new file mode 100644 index 0000000000..7cab3e7b1c --- /dev/null +++ b/js/src/jit-test/tests/truthiness/strict-not-equal-null.js @@ -0,0 +1,37 @@ +function f(v, value) +{ + var b = v !== null; + assertEq(b, value, + "failed: " + v + " " + value); +} + +f({}, true); +f({}, true); +f(null, false); +f(null, false); +f(undefined, true); +f(undefined, true); +f(createIsHTMLDDA(), true); +f(createIsHTMLDDA(), true); +f(Object.prototype, true); +f(Object.prototype, true); + +function g(v, value) +{ + var b = v !== null; + assertEq(b, value, + "failed: " + v + " " + value); +} + +g({}, true); +g({}, true); + +function h(v, value) +{ + var b = v !== null; + assertEq(b, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), true); +h(createIsHTMLDDA(), true); diff --git a/js/src/jit-test/tests/truthiness/strict-not-equal-undefined.js b/js/src/jit-test/tests/truthiness/strict-not-equal-undefined.js new file mode 100644 index 0000000000..04c8f7702b --- /dev/null +++ b/js/src/jit-test/tests/truthiness/strict-not-equal-undefined.js @@ -0,0 +1,37 @@ +function f(v, value) +{ + var b = v !== undefined; + assertEq(b, value, + "failed: " + v + " " + value); +} + +f({}, true); +f({}, true); +f(null, true); +f(null, true); +f(undefined, false); +f(undefined, false); +f(createIsHTMLDDA(), true); +f(createIsHTMLDDA(), true); +f(Object.prototype, true); +f(Object.prototype, true); + +function g(v, value) +{ + var b = v !== undefined; + assertEq(b, value, + "failed: " + v + " " + value); +} + +g({}, true); +g({}, true); + +function h(v, value) +{ + var b = v !== undefined; + assertEq(b, value, + "failed: " + v + " " + value); +} + +h(createIsHTMLDDA(), true); +h(createIsHTMLDDA(), true); diff --git a/js/src/jit-test/tests/truthiness/typeof.js b/js/src/jit-test/tests/truthiness/typeof.js new file mode 100644 index 0000000000..91e281ada3 --- /dev/null +++ b/js/src/jit-test/tests/truthiness/typeof.js @@ -0,0 +1,23 @@ +function t1(v) +{ + return typeof v; +} + +assertEq(t1(createIsHTMLDDA()), "undefined"); +assertEq(t1(createIsHTMLDDA()), "undefined"); +assertEq(t1(createIsHTMLDDA()), "undefined"); + +function t2(v) +{ + return typeof v; +} + +assertEq(t2(17), "number"); +assertEq(t2(0), "number"); +assertEq(t2(-0), "number"); +assertEq(t2(function(){}), "function"); +assertEq(t2({}), "object"); +assertEq(t2(null), "object"); +assertEq(t2(createIsHTMLDDA()), "undefined"); +assertEq(t2(createIsHTMLDDA()), "undefined"); +assertEq(t2(createIsHTMLDDA()), "undefined"); diff --git a/js/src/jit-test/tests/typedarray/arraybuffer-pin.js b/js/src/jit-test/tests/typedarray/arraybuffer-pin.js new file mode 100644 index 0000000000..8799da29de --- /dev/null +++ b/js/src/jit-test/tests/typedarray/arraybuffer-pin.js @@ -0,0 +1,69 @@ +// |jit-test| --enable-arraybuffer-resizable + +load(libdir + "asserts.js"); + +var ab_inline = new ArrayBuffer(4); +assertEq(pinArrayBufferOrViewLength(ab_inline), true); +assertEq(pinArrayBufferOrViewLength(ab_inline), false); +assertErrorMessage(() => detachArrayBuffer(ab_inline), RangeError, /change pinned length/); +assertEq(pinArrayBufferOrViewLength(ab_inline, false), true); +detachArrayBuffer(ab_inline); + +var ab_big = new ArrayBuffer(1000); +assertEq(pinArrayBufferOrViewLength(ab_big), true); +assertEq(pinArrayBufferOrViewLength(ab_big), false); +assertErrorMessage(() => detachArrayBuffer(ab_big), RangeError, /change pinned length/); +assertEq(pinArrayBufferOrViewLength(ab_big, false), true); +detachArrayBuffer(ab_big); + +if (ArrayBuffer.prototype.resize) { + var rab_small = new ArrayBuffer(4, { maxByteLength: 20 }); + assertEq(pinArrayBufferOrViewLength(rab_small), true); + assertEq(pinArrayBufferOrViewLength(rab_small), false); + assertErrorMessage(() => detachArrayBuffer(rab_small), RangeError, /change pinned length/); + assertErrorMessage(() => rab_small.resize(18), RangeError, /change pinned length/); + assertEq(pinArrayBufferOrViewLength(rab_small, false), true); + assertEq(rab_small.byteLength, 4); + rab_small.resize(18); + assertEq(rab_small.byteLength, 18); + detachArrayBuffer(rab_small); +} else { + print("Skipped test: resizable ArrayBuffers unavailable"); +} + +if (ArrayBuffer.prototype.resize) { + var rab_big = new ArrayBuffer(200, { maxByteLength: 1000 }); + assertEq(pinArrayBufferOrViewLength(rab_big), true); + assertEq(pinArrayBufferOrViewLength(rab_big), false); + assertErrorMessage(() => detachArrayBuffer(rab_big), RangeError, /change pinned length/); + assertErrorMessage(() => rab_big.resize(400), RangeError, /change pinned length/); + assertEq(pinArrayBufferOrViewLength(rab_big, false), true); + assertEq(rab_big.byteLength, 200); + rab_big.resize(400); + assertEq(rab_big.byteLength, 400); + detachArrayBuffer(rab_big); +} else { + print("Skipped test: resizable ArrayBuffers unavailable"); +} + +var sab = new SharedArrayBuffer(4); +assertEq(pinArrayBufferOrViewLength(sab), false); +assertEq(pinArrayBufferOrViewLength(sab), false); +assertErrorMessage(() => serialize([sab], [sab]), TypeError, /Shared memory objects.*transfer/); +assertEq(pinArrayBufferOrViewLength(sab, false), false); +assertErrorMessage(() => detachArrayBuffer(sab), TypeError, /ArrayBuffer.*required/); + +if (SharedArrayBuffer.prototype.grow) { + var gab = new SharedArrayBuffer(4, { maxByteLength: 1000 }); + assertEq(pinArrayBufferOrViewLength(gab), false); + assertEq(pinArrayBufferOrViewLength(gab), false); + assertErrorMessage(() => detachArrayBuffer(gab), TypeError, /ArrayBuffer.*required/); + // assertErrorMessage(() => gab.grow(400), RangeError, /change pinned length/); + assertEq(pinArrayBufferOrViewLength(gab, false), false); + assertEq(gab.byteLength, 4); + gab.grow(400); + assertEq(gab.byteLength, 400); + assertErrorMessage(() => detachArrayBuffer(gab), TypeError, /ArrayBuffer.*required/); +} else { + print("Skipped test: growable SharedArrayBuffers unavailable"); +} diff --git a/js/src/jit-test/tests/typedarray/arraybuffer-transfer-coerce-large-bytelength.js b/js/src/jit-test/tests/typedarray/arraybuffer-transfer-coerce-large-bytelength.js new file mode 100644 index 0000000000..a8f2cad117 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/arraybuffer-transfer-coerce-large-bytelength.js @@ -0,0 +1,15 @@ +// |jit-test| allow-oom; skip-if: (getBuildConfiguration("tsan")) + +let buffer = new ArrayBuffer(0); + +let result = null; +try { + result = buffer.transfer(2 ** 32); +} catch { + // Intentionally ignore allocation failure. +} + +// If the allocation succeeded, |result| has the correct size. +if (result) { + assertEq(result.byteLength, 2 ** 32); +} diff --git a/js/src/jit-test/tests/typedarray/arraybuffer-transfer-mapped.txt b/js/src/jit-test/tests/typedarray/arraybuffer-transfer-mapped.txt new file mode 100644 index 0000000000..ad471007bd --- /dev/null +++ b/js/src/jit-test/tests/typedarray/arraybuffer-transfer-mapped.txt @@ -0,0 +1 @@ +0123456789 \ No newline at end of file diff --git a/js/src/jit-test/tests/typedarray/arraybuffer-transfer-unknown-arena.js b/js/src/jit-test/tests/typedarray/arraybuffer-transfer-unknown-arena.js new file mode 100644 index 0000000000..2d586913e9 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/arraybuffer-transfer-unknown-arena.js @@ -0,0 +1,12 @@ +const headerSize = 8; +const undefinedSize = 8; + +let source = serialize(undefined).arraybuffer +assertEq(source.detached, false); +assertEq(source.byteLength, headerSize + undefinedSize); + +let target = source.transfer(128); +assertEq(source.detached, true); +assertEq(source.byteLength, 0); +assertEq(target.detached, false); +assertEq(target.byteLength, 128); diff --git a/js/src/jit-test/tests/typedarray/arraybuffer-transfer.js b/js/src/jit-test/tests/typedarray/arraybuffer-transfer.js new file mode 100644 index 0000000000..12bbe5bed7 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/arraybuffer-transfer.js @@ -0,0 +1,207 @@ +const byteLengths = [ + // Byte lengths applicable for inline storage + 0, 1, 4, 16, 32, 64, 96, + + // Too large for inline storage + 128, 1024, 4096, 65536, +]; + +// Most values in |byteLengths| are powers-of-two. Add +1/-1 to test for +// off-by-one errors. +function offByOne(v) { + if (v === 0) { + return [v, v + 1]; + } + return [v - 1, v, v + 1]; +} + +// Fast alternative to |assertEq| to avoid a slow VM-call. +// Should only be used when looping over the TypedArray contents to avoid +// unnecessary test slowdowns. +function assertEqNum(e, a) { + if (e !== a) { + assertEq(e, a); + } +} + +// Inline or malloced ArrayBuffer. +{ + for (let byteLength of byteLengths.flatMap(offByOne)) { + for (let newByteLength of offByOne(byteLength)) { + for (let transfer of [ + ArrayBuffer.prototype.transfer, + ArrayBuffer.prototype.transferToFixedLength, + ]) { + let buffer = new ArrayBuffer(byteLength); + let i8 = new Uint8Array(buffer); + for (let i = 0; i < byteLength; ++i) { + assertEqNum(i8[i], 0); + i8[i] = i; + } + + assertEq(buffer.byteLength, byteLength); + assertEq(buffer.detached, false); + + let copy = transfer.call(buffer, newByteLength); + + assertEq(buffer.byteLength, 0); + assertEq(buffer.detached, true); + + assertEq(copy.byteLength, newByteLength); + assertEq(copy.detached, false); + + i8 = new Uint8Array(copy); + for (let i = 0; i < Math.min(byteLength, newByteLength); ++i) { + assertEqNum(i8[i], i & 0xff); + } + for (let i = byteLength; i < newByteLength; ++i) { + assertEqNum(i8[i], 0); + } + } + } + } +} + +// External buffer. +{ + for (let byteLength of byteLengths.flatMap(offByOne)) { + for (let newByteLength of offByOne(byteLength)) { + for (let transfer of [ + ArrayBuffer.prototype.transfer, + ArrayBuffer.prototype.transferToFixedLength, + ]) { + let buffer = createExternalArrayBuffer(byteLength); + let i8 = new Uint8Array(buffer); + for (let i = 0; i < byteLength; ++i) { + assertEqNum(i8[i], 0); + i8[i] = i; + } + + assertEq(buffer.byteLength, byteLength); + assertEq(buffer.detached, false); + + let copy = transfer.call(buffer, newByteLength); + + assertEq(buffer.byteLength, 0); + assertEq(buffer.detached, true); + + assertEq(copy.byteLength, newByteLength); + assertEq(copy.detached, false); + + i8 = new Uint8Array(copy); + for (let i = 0; i < Math.min(byteLength, newByteLength); ++i) { + assertEqNum(i8[i], i & 0xff); + } + for (let i = byteLength; i < newByteLength; ++i) { + assertEqNum(i8[i], 0); + } + } + } + } +} + +// User-controlled buffer. +{ + for (let byteLength of byteLengths.flatMap(offByOne)) { + for (let newByteLength of offByOne(byteLength)) { + for (let transfer of [ + ArrayBuffer.prototype.transfer, + ArrayBuffer.prototype.transferToFixedLength, + ]) { + let buffer = createUserArrayBuffer(byteLength); + let i8 = new Uint8Array(buffer); + for (let i = 0; i < byteLength; ++i) { + assertEqNum(i8[i], 0); + i8[i] = i; + } + + assertEq(buffer.byteLength, byteLength); + assertEq(buffer.detached, false); + + let copy = transfer.call(buffer, newByteLength); + + assertEq(buffer.byteLength, 0); + assertEq(buffer.detached, true); + + assertEq(copy.byteLength, newByteLength); + assertEq(copy.detached, false); + + i8 = new Uint8Array(copy); + for (let i = 0; i < Math.min(byteLength, newByteLength); ++i) { + assertEqNum(i8[i], i & 0xff); + } + for (let i = byteLength; i < newByteLength; ++i) { + assertEqNum(i8[i], 0); + } + } + } + } +} + +// Mapped file buffer. +if (getBuildConfiguration("mapped-array-buffer")) { + let fileName = "arraybuffer-transfer-mapped.txt"; + let fileContent = os.file.readRelativeToScript(fileName, "binary"); + + let byteLength = fileContent.byteLength; + assertEq(byteLength > 0, true); + + for (let newByteLength of offByOne(byteLength)) { + for (let transfer of [ + ArrayBuffer.prototype.transfer, + ArrayBuffer.prototype.transferToFixedLength, + ]) { + let buffer = createMappedArrayBuffer(fileName); + + assertEq(buffer.byteLength, byteLength); + assertEq(buffer.detached, false); + + let copy = transfer.call(buffer, newByteLength); + + assertEq(buffer.byteLength, 0); + assertEq(buffer.detached, true); + + assertEq(copy.byteLength, newByteLength); + assertEq(copy.detached, false); + + i8 = new Uint8Array(copy); + for (let i = 0; i < Math.min(byteLength, newByteLength); ++i) { + assertEqNum(i8[i], fileContent[i]); + } + for (let i = byteLength; i < newByteLength; ++i) { + assertEqNum(i8[i], 0); + } + } + } +} + +// Cross-compartment +{ + let g = newGlobal({ newCompartment: true }); + + let byteLengthGetter = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get; + let detachedGetter = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "detached").get; + + for (let byteLength of byteLengths) { + for (let transfer of [ + ArrayBuffer.prototype.transfer, + ArrayBuffer.prototype.transferToFixedLength, + ]) { + let buffer = new g.ArrayBuffer(byteLength); + + assertEq(byteLengthGetter.call(buffer), byteLength); + assertEq(detachedGetter.call(buffer), false); + + let copy = transfer.call(buffer); + + assertEq(detachedGetter.call(buffer), true); + assertEq(byteLengthGetter.call(buffer), 0); + + assertEq(detachedGetter.call(copy), false); + assertEq(byteLengthGetter.call(copy), byteLength); + + // NOTE: Incorrect realm due to CallNonGenericMethod. + assertEq(copy instanceof g.ArrayBuffer, true); + } + } +} diff --git a/js/src/jit-test/tests/typedarray/bug1518764.js b/js/src/jit-test/tests/typedarray/bug1518764.js new file mode 100644 index 0000000000..3ea5bfb76b --- /dev/null +++ b/js/src/jit-test/tests/typedarray/bug1518764.js @@ -0,0 +1,8 @@ +// |jit-test| error:dead object + +var g = newGlobal({newCompartment: true}); +var ta = new g.Int32Array(1); +Int32Array.prototype.filter.call(ta, function() { + nukeAllCCWs(); + return true; +}); diff --git a/js/src/jit-test/tests/typedarray/bug1520536.js b/js/src/jit-test/tests/typedarray/bug1520536.js new file mode 100644 index 0000000000..af6c8472bd --- /dev/null +++ b/js/src/jit-test/tests/typedarray/bug1520536.js @@ -0,0 +1,3 @@ +let a = wrapWithProto(new Int16Array([300]), {}); +let b = new Uint8ClampedArray(a); +assertEq(b[0], 255); diff --git a/js/src/jit-test/tests/typedarray/bug1713567.js b/js/src/jit-test/tests/typedarray/bug1713567.js new file mode 100644 index 0000000000..36209f8a15 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/bug1713567.js @@ -0,0 +1,21 @@ +// |jit-test| --ion-gvn=off; --fast-warmup; --no-threads + +var heap = new ArrayBuffer(4); +var view32 = new Uint32Array(heap); + +function foo(i0) { + var t1 = i0 + 1; + var t2 = i0 >>> view32[0]; + var t3 = t1 - (t2 > 0); + return t3; +} + +with ({}) {} +view32[0] = 0x80000000; +for (var i = 0; i < 100; i++) { + foo(0); +} +view32[0] = 0; +for (var i = 0; i < 100; i++) { + foo(0x80000000); +} diff --git a/js/src/jit-test/tests/typedarray/bug1858678.js b/js/src/jit-test/tests/typedarray/bug1858678.js new file mode 100644 index 0000000000..df042d98be --- /dev/null +++ b/js/src/jit-test/tests/typedarray/bug1858678.js @@ -0,0 +1,12 @@ +function foo(glob, imp, b) { + "use asm"; + var arr=new glob.Int8Array(b); + return {}; + } + a = new ArrayBuffer(64 * 1024); + foo(this, null, a); + function f(h, g) { + ensureNonInline(g); + } +f(Float64Array, a); + \ No newline at end of file diff --git a/js/src/jit-test/tests/typedarray/construct-with-arraybuffer.js b/js/src/jit-test/tests/typedarray/construct-with-arraybuffer.js new file mode 100644 index 0000000000..5b819f1d57 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/construct-with-arraybuffer.js @@ -0,0 +1,59 @@ +// Test TypedArray constructor when called with ArrayBuffers. + +function testArrayBuffer() { + function test() { + var ab = new ArrayBuffer(4 * Int32Array.BYTES_PER_ELEMENT); + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(ab); + assertEq(ta.length, 4); + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testArrayBuffer(); + +function testArrayBufferAndByteOffset() { + function test() { + var ab = new ArrayBuffer(4 * Int32Array.BYTES_PER_ELEMENT); + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(ab, Int32Array.BYTES_PER_ELEMENT); + assertEq(ta.length, 3); + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testArrayBufferAndByteOffset(); + +function testArrayBufferAndByteOffsetAndLength() { + function test() { + var ab = new ArrayBuffer(4 * Int32Array.BYTES_PER_ELEMENT); + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(ab, Int32Array.BYTES_PER_ELEMENT, 2); + assertEq(ta.length, 2); + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testArrayBufferAndByteOffsetAndLength(); + +function testWrappedArrayBuffer() { + var g = newGlobal(); + + function test() { + var ab = new g.ArrayBuffer(4 * Int32Array.BYTES_PER_ELEMENT); + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(ab); + assertEq(ta.length, 4); + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testWrappedArrayBuffer(); diff --git a/js/src/jit-test/tests/typedarray/construct-with-arrays.js b/js/src/jit-test/tests/typedarray/construct-with-arrays.js new file mode 100644 index 0000000000..290a27b3ea --- /dev/null +++ b/js/src/jit-test/tests/typedarray/construct-with-arrays.js @@ -0,0 +1,165 @@ +// Test TypedArray constructor when called with iterables or typed arrays. + +function testPackedArray() { + function test() { + var array = [ + 1, 2, 3, + 4, 5, 6, + 7, 8, 9, + ]; + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(array); + assertEq(ta.length, array.length); + for (var j = 0; j < array.length; ++j) { + assertEq(ta[j], array[j]); + } + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testPackedArray(); + +function testHoleArray() { + function test() { + var array = [ + 1, /* hole */, 3, + 4, /* hole */, 6, + 7, /* hole */, 9, + ]; + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(array); + assertEq(ta.length, array.length); + for (var j = 0; j < array.length; ++j) { + assertEq(ta[j], array[j] || 0); + } + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testHoleArray(); + +function testTypedArraySameType() { + function test() { + var array = new Int32Array([ + 1, 2, 3, + 4, 5, 6, + 7, 8, 9, + ]); + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(array); + assertEq(ta.length, array.length); + for (var j = 0; j < array.length; ++j) { + assertEq(ta[j], array[j]); + } + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testTypedArraySameType(); + +function testTypedArrayDifferentType() { + function test() { + var array = new Float32Array([ + 1, 2, 3, + 4, 5, 6, + 7, 8, 9, + ]); + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(array); + assertEq(ta.length, array.length); + for (var j = 0; j < array.length; ++j) { + assertEq(ta[j], array[j]); + } + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testTypedArrayDifferentType(); + +function testIterable() { + function test() { + var array = [ + 1, 2, 3, + 4, 5, 6, + 7, 8, 9, + ]; + array = Object.defineProperties({ + [Symbol.iterator]() { + var index = 0; + return { + next() { + var done = index >= array.length; + var value = !done ? array[index++] : undefined; + return {done, value}; + } + }; + } + }, Object.getOwnPropertyDescriptors(array)); + + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(array); + assertEq(ta.length, array.length); + for (var j = 0; j < array.length; ++j) { + assertEq(ta[j], array[j]); + } + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testIterable(); + +function testWrappedArray() { + var g = newGlobal(); + + function test() { + var array = new g.Array( + 1, 2, 3, + 4, 5, 6, + 7, 8, 9, + ); + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(array); + assertEq(ta.length, array.length); + for (var j = 0; j < array.length; ++j) { + assertEq(ta[j], array[j]); + } + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testWrappedArray(); + +function testWrappedTypedArray() { + var g = newGlobal(); + + function test() { + var array = new g.Int32Array([ + 1, 2, 3, + 4, 5, 6, + 7, 8, 9, + ]); + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(array); + assertEq(ta.length, array.length); + for (var j = 0; j < array.length; ++j) { + assertEq(ta[j], array[j]); + } + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testWrappedTypedArray(); diff --git a/js/src/jit-test/tests/typedarray/construct-with-sharedarraybuffer.js b/js/src/jit-test/tests/typedarray/construct-with-sharedarraybuffer.js new file mode 100644 index 0000000000..8583901ce5 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/construct-with-sharedarraybuffer.js @@ -0,0 +1,61 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +// Test TypedArray constructor when called with SharedArrayBuffers. + +function testSharedArrayBuffer() { + function test() { + var sab = new SharedArrayBuffer(4 * Int32Array.BYTES_PER_ELEMENT); + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(sab); + assertEq(ta.length, 4); + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testSharedArrayBuffer(); + +function testSharedArrayBufferAndByteOffset() { + function test() { + var sab = new SharedArrayBuffer(4 * Int32Array.BYTES_PER_ELEMENT); + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(sab, Int32Array.BYTES_PER_ELEMENT); + assertEq(ta.length, 3); + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testSharedArrayBufferAndByteOffset(); + +function testSharedArrayBufferAndByteOffsetAndLength() { + function test() { + var sab = new SharedArrayBuffer(4 * Int32Array.BYTES_PER_ELEMENT); + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(sab, Int32Array.BYTES_PER_ELEMENT, 2); + assertEq(ta.length, 2); + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testSharedArrayBufferAndByteOffsetAndLength(); + +function testWrappedSharedArrayBuffer() { + var g = newGlobal(); + + function test() { + var sab = new g.SharedArrayBuffer(4 * Int32Array.BYTES_PER_ELEMENT); + for (var i = 0; i < 1000; ++i) { + var ta = new Int32Array(sab); + assertEq(ta.length, 4); + } + } + for (var i = 0; i < 2; ++i) { + test(); + } +} +testWrappedSharedArrayBuffer(); diff --git a/js/src/jit-test/tests/typedarray/define-property-oob.js b/js/src/jit-test/tests/typedarray/define-property-oob.js new file mode 100644 index 0000000000..a4afac3a57 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/define-property-oob.js @@ -0,0 +1,24 @@ +const ta = new Int32Array(1); +const desc = {value: 0, writable: true, enumerable: true, configurable: true}; + +// Out-of-bounds with an int32 index. +for (let i = 0; i < 1000; ++i) { + let didThrow = false; + try { + Object.defineProperty(ta, 10, desc); + } catch { + didThrow = true; + } + assertEq(didThrow, true); +} + +// Out-of-bounds with a non-int32 index. +for (let i = 0; i < 1000; ++i) { + let didThrow = false; + try { + Object.defineProperty(ta, 12.3, desc); + } catch { + didThrow = true; + } + assertEq(didThrow, true); +} diff --git a/js/src/jit-test/tests/typedarray/dom-view.js b/js/src/jit-test/tests/typedarray/dom-view.js new file mode 100644 index 0000000000..cfc9ead74e --- /dev/null +++ b/js/src/jit-test/tests/typedarray/dom-view.js @@ -0,0 +1,13 @@ +// Bug 1731039 fuzzbug. Exercises one of the new ArrayBufferOrView classes. + +var error; +try { + encodeAsUtf8InBuffer("", ""); +} catch (e) { + error = e; +} + +assertEq(error.message.includes("must be a Uint8Array"), true); + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/typedarray/ensure-non-inline.js b/js/src/jit-test/tests/typedarray/ensure-non-inline.js new file mode 100644 index 0000000000..d8859fa627 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/ensure-non-inline.js @@ -0,0 +1,85 @@ +const constructors = [ + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array ]; + +function messWith(view, obj) { + view[0] = 1; + view[1] = 1; + view[2] = 2; + view[3] = 3; + ensureNonInline(obj); + assertEq(view[0], 1); + assertEq(view[1], 1); + assertEq(view[2], 2); + assertEq(view[3], 3); +} + +function test() { + // Bufferless + for (const ctor of constructors) { + let small = new ctor(4); + messWith(small, small); + let big = new ctor(4000); + messWith(big, big); + } + + // With buffer, single view, operate on view + for (const ctor of constructors) { + let ab = new ArrayBuffer(96); + const small = new ctor(ab); + messWith(small, small); + ab = new ArrayBuffer(4000); + const big = new ctor(ab); + messWith(big, big); + } + + // With buffer, single view, operate on ArrayBuffer + for (const ctor of constructors) { + let ab = new ArrayBuffer(96); + const small = new ctor(ab); + messWith(small, ab); + ab = new ArrayBuffer(4000); + const big = new ctor(ab); + messWith(big, ab); + } + + // With buffer, dual view, operate on view + for (const ctor of constructors) { + let ab = new ArrayBuffer(96); + let view0 = new Uint8Array(ab); + const small = new ctor(ab); + messWith(small, small); + ab = new ArrayBuffer(4000); + view0 = new Uint8Array(ab); + const big = new ctor(ab); + messWith(big, big); + } + + // With buffer, dual view, operate on ArrayBuffer + for (const ctor of constructors) { + let ab = new ArrayBuffer(96); + let view0 = new Uint8Array(ab); + const small = new ctor(ab); + messWith(small, ab); + ab = new ArrayBuffer(4000); + view0 = new Uint8Array(ab); + const big = new ctor(ab); + messWith(big, ab); + } +} + +try { + ensureNonInline(new Array(3)); + assertEq(false, true); +} catch (e) { + assertEq(e.message.includes("unhandled type"), true); +} + +test(); diff --git a/js/src/jit-test/tests/typedarray/error-messages.js b/js/src/jit-test/tests/typedarray/error-messages.js new file mode 100644 index 0000000000..d317cf523e --- /dev/null +++ b/js/src/jit-test/tests/typedarray/error-messages.js @@ -0,0 +1,40 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") + +function assertThrowsMessage(f, regexp) { + var threw = true; + var error = null; + try { + f(); + threw = false; + } catch (e) { + error = e; + } + // Make sure f threw + assertEq(threw, true); + // Make sure the message is as we expected + assertEq(regexp.test(error.message), true); +} + +var shared = new SharedArrayBuffer(4096); +assertThrowsMessage(() => new Int32Array(shared, 7), /start offset of Int32Array should be a multiple of 4/); + +var shared = new SharedArrayBuffer(4096); +assertThrowsMessage(() => new Float64Array(shared, 3), /start offset of Float64Array should be a multiple of 8/); + +var shared = new SharedArrayBuffer(1025); +assertThrowsMessage(() => new Float32Array(shared, 8), /buffer length for Float32Array should be a multiple of 4/); + +var shared = new SharedArrayBuffer(513); +assertThrowsMessage(() => new Int16Array(shared, 8), /buffer length for Int16Array should be a multiple of 2/); + +var shared = new SharedArrayBuffer(32); +assertThrowsMessage(() => new Int16Array(shared, 36), /size of buffer is too small for Int16Array with byteOffset/); + +var shared = new SharedArrayBuffer(2048); +assertThrowsMessage(() => new BigInt64Array(shared, 4096), /size of buffer is too small for BigInt64Array with byteOffset/); + +var shared = new SharedArrayBuffer(4096); +assertThrowsMessage(() => new Int32Array(shared, 4096, 4), /attempting to construct out-of-bounds Int32Array on ArrayBuffer/); + +var shared = new SharedArrayBuffer(1024); +assertThrowsMessage(() => new Float32Array(shared, 800, 300), /attempting to construct out-of-bounds Float32Array on ArrayBuffer/); \ No newline at end of file diff --git a/js/src/jit-test/tests/typedarray/indexed-integer-exotics-simple.js b/js/src/jit-test/tests/typedarray/indexed-integer-exotics-simple.js new file mode 100644 index 0000000000..4d9eb30875 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/indexed-integer-exotics-simple.js @@ -0,0 +1,35 @@ +// Copyright 2014 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +var array = new Int32Array(10); +function check() { + for (var i = 0; i < 4; i++) { + assertEq(undefined, array["-1"]); + } +} +check(); +check(); diff --git a/js/src/jit-test/tests/typedarray/indexed-integer-exotics.js b/js/src/jit-test/tests/typedarray/indexed-integer-exotics.js new file mode 100644 index 0000000000..6331efd7c3 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/indexed-integer-exotics.js @@ -0,0 +1,97 @@ +// Copyright 2014 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +function assertThrows(code) { + try { + eval(code); + } catch (e) { + return; + } + assertEq(true, false); +} + +Object.prototype["10"] = "unreachable"; +Object.prototype["7"] = "unreachable"; +Object.prototype["-1"] = "unreachable"; +Object.prototype["-0"] = "unreachable"; +Object.prototype["4294967295"] = "unreachable"; + +var array = new Int32Array(10); + +function check() { + for (var i = 0; i < 4; i++) { + assertEq(undefined, array["-1"]); + assertEq(undefined, array["-0"]); + assertEq(undefined, array["10"]); + assertEq(undefined, array["4294967295"]); + } + assertEq("unreachable", array.__proto__["-1"]); + assertEq("unreachable", array.__proto__["-0"]); + assertEq("unreachable", array.__proto__["10"]); + assertEq("unreachable", array.__proto__["4294967295"]); +} + +check(); + +array["-1"] = "unreachable"; +array["-0"] = "unreachable"; +array["10"] = "unreachable"; +array["4294967295"] = "unreachable"; + +check(); + +delete array["-0"]; +delete array["-1"]; +delete array["10"]; +delete array["4294967295"]; + +assertEq(undefined, Object.getOwnPropertyDescriptor(array, "-1")); +assertEq(undefined, Object.getOwnPropertyDescriptor(array, "-0")); +assertEq(undefined, Object.getOwnPropertyDescriptor(array, "10")); +assertEq(undefined, Object.getOwnPropertyDescriptor(array, "4294967295")); +assertEq(10, Object.keys(array).length); + +check(); + +function f() { return array["-1"]; } + +for (var i = 0; i < 3; i++) { + assertEq(undefined, f()); +} +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("ion.warmup.trigger", 0); +assertEq(undefined, f()); + +// These checks currently fail due to bug 1129202 not being implemented yet. +// We should uncomment them once that bug landed. +//assertThrows('Object.defineProperty(new Int32Array(100), -1, {value: 1})'); +// -0 gets converted to the string "0", so use "-0" instead. +//assertThrows('Object.defineProperty(new Int32Array(100), "-0", {value: 1})'); +//assertThrows('Object.defineProperty(new Int32Array(100), -10, {value: 1})'); +//assertThrows('Object.defineProperty(new Int32Array(), 4294967295, {value: 1})'); + +check(); diff --git a/js/src/jit-test/tests/typedarray/oom-allocating-arraybuffer-contents.js b/js/src/jit-test/tests/typedarray/oom-allocating-arraybuffer-contents.js new file mode 100644 index 0000000000..16d1bf976f --- /dev/null +++ b/js/src/jit-test/tests/typedarray/oom-allocating-arraybuffer-contents.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// Resolve ArrayBuffer before OOM-testing, so OOM-testing runs less code and is +// less fragile. +var AB = ArrayBuffer; + +function f() +{ + return new AB(256); +} + +// Create |f|'s script before OOM-testing for the same reason. +f(); + +oomTest(f); diff --git a/js/src/jit-test/tests/typedarray/oom-allocating-copying-same-buffer-contents.js b/js/src/jit-test/tests/typedarray/oom-allocating-copying-same-buffer-contents.js new file mode 100644 index 0000000000..ec33e4ef8e --- /dev/null +++ b/js/src/jit-test/tests/typedarray/oom-allocating-copying-same-buffer-contents.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var buffer = new ArrayBuffer(16); +var i8 = new Int8Array(buffer); +var i16 = new Int16Array(buffer); + +oomTest(function() { + i8.set(i16); +}); diff --git a/js/src/jit-test/tests/typedarray/sort.js b/js/src/jit-test/tests/typedarray/sort.js new file mode 100644 index 0000000000..45d1b2ac23 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/sort.js @@ -0,0 +1,24 @@ +setJitCompilerOption("ion.warmup.trigger", 40); + +const constructors = [ + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array ]; + +// Ensure that when creating TypedArrays under JIT +// the sort() method works as expected (bug 1295034). +for (var ctor of constructors) { + for (var _ of Array(1024)) { + var testArray = new ctor(10); + testArray.sort(); + } +} + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/jit-test/tests/typedarray/typed-array-change-by-copy.js b/js/src/jit-test/tests/typedarray/typed-array-change-by-copy.js new file mode 100644 index 0000000000..4aa12a615d --- /dev/null +++ b/js/src/jit-test/tests/typedarray/typed-array-change-by-copy.js @@ -0,0 +1,43 @@ +// |jit-test| + +load(libdir + 'array-compare.js'); +load(libdir + "asserts.js"); + +let typedArray123 = new Uint8Array([1, 2, 3]); +let typedArray12345 = new Uint8Array([1, 2, 3, 4, 5]); +let typedArray = new Uint8Array([1, 2, 3]); +let typedArray2 = new Uint8Array([3, 2, 1]); + +let a_with = typedArray.with(1, 42); +assertEq(arraysEqual(typedArray, new Uint8Array([1, 2, 3])), true); +assertEq(arraysEqual(a_with, new Uint8Array([1, 42, 3])), true); + +let tarray1 = new Uint8Array([42, 2, 3]); +let tarray2 = new Uint8Array([1, 2, 42]); + +assertEq(arraysEqual(typedArray.with(-0, 42), tarray1), true); + +/* null => 0 */ +assertEq(arraysEqual(typedArray.with(null, 42), tarray1), true); +/* [] => 0 */ +assertEq(arraysEqual(typedArray.with([], 42), tarray1), true); + +assertEq(arraysEqual(typedArray.with("2", 42), tarray2), true); + +/* Non-numeric indices => 0 */ +assertEq(arraysEqual(typedArray.with("monkeys", 42), tarray1), true); +assertEq(arraysEqual(typedArray.with(undefined, 42), tarray1), true); +assertEq(arraysEqual(typedArray.with(function() {}, 42), tarray1), true); + +assertThrowsInstanceOf(() => typedArray.with(3, 42), RangeError); +assertThrowsInstanceOf(() => typedArray.with(5, 42), RangeError); +assertThrowsInstanceOf(() => typedArray.with(-10, 42), RangeError); +assertThrowsInstanceOf(() => typedArray.with(Infinity, 42), RangeError); + +let reversedIntArray = typedArray.toReversed(); +assertEq(arraysEqual(typedArray, typedArray123), true); +assertEq(arraysEqual(reversedIntArray, typedArray2), true); + +let sortedIntArray = typedArray2.toSorted(); +assertEq(arraysEqual(typedArray2, new Uint8Array([3, 2, 1])), true); +assertEq(arraysEqual(sortedIntArray, typedArray), true); diff --git a/js/src/jit-test/tests/typedarray/typed-array-inline-cache.js b/js/src/jit-test/tests/typedarray/typed-array-inline-cache.js new file mode 100644 index 0000000000..f7697875f9 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/typed-array-inline-cache.js @@ -0,0 +1,54 @@ +// ECMA262 9.4.5.2 [[HasProperty]] +function check_in(x, a) { + return (x in a); +} + +function check_has_own(x, a) { + return a.hasOwnProperty(x); +} + +//make sure baseline gets compiled +function warmup(a) { + for (var i = 0; i < 1001; i++) { + check_in(i, a); + check_has_own(i, a); + } +} + +function check_assertions(a) { + assertEq(check_in(1, a), true); + assertEq(check_in("-0",a), false); // -0 access + assertEq(check_in(-10,a), false); // Negative access + assertEq(check_in(1012,a), false); // OOB access + + + assertEq(check_has_own(1, a), true); + assertEq(check_has_own("-0",a), false); // -0 access + assertEq(check_has_own(-10,a), false); // Negative access + assertEq(check_has_own(1012,a), false); // OOB access +} + +function test_with_no_protochain(a) { + var a = new Int32Array(1000).fill(1); + warmup(a); + check_assertions(a); +} + +// Attempting to validate against this comment: +// https://bugzilla.mozilla.org/show_bug.cgi?id=1419372#c3 +// +// "Out of bounds "in" or "hasOwnProperty" should always +// return false, and not consider the prototype chain at all" +function test_with_protochain(a) { + var a = new Int32Array(1000).fill(1); + warmup(a); + // try to force the behaviour of 9.4.5.2 + Object.prototype["-0"] = "value"; + Object.prototype[-1] = "value"; + Object.prototype[-10] = "value"; + Object.prototype[1012] = "value"; + check_assertions(a); +} + +test_with_no_protochain(); +test_with_protochain(); diff --git a/js/src/jit-test/tests/typedarray/typedarrayobject-getelements.js b/js/src/jit-test/tests/typedarray/typedarrayobject-getelements.js new file mode 100644 index 0000000000..98296b1fe1 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/typedarrayobject-getelements.js @@ -0,0 +1,6 @@ +function test() { + var view = new Uint8Array([72, 101, 108, 108, 111]); + let s = String.fromCharCode.apply(null, view); + assertEq("Hello", s); +} +test(); diff --git a/js/src/jit-test/tests/v8-v5/check-crypto.js b/js/src/jit-test/tests/v8-v5/check-crypto.js new file mode 100644 index 0000000000..d0a0109d2a --- /dev/null +++ b/js/src/jit-test/tests/v8-v5/check-crypto.js @@ -0,0 +1,1717 @@ +// |jit-test| slow; +// This test times out in rooting analyis builds, and so is marked slow so that +// it's not run as part of the rooting analysis tests on tinderbox. + +/* + * Copyright (c) 2003-2005 Tom Wu + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF + * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * In addition, the following condition applies: + * + * All redistributions must retain an intact copy of this copyright notice + * and disclaimer. + */ + + +// The code has been adapted for use as a benchmark by Google. +//var Crypto = new BenchmarkSuite('Crypto', 203037, [ +// new Benchmark("Encrypt", encrypt), +// new Benchmark("Decrypt", decrypt) +//]); + + +// Basic JavaScript BN library - subset useful for RSA encryption. + +// Bits per digit +var dbits; +var BI_DB; +var BI_DM; +var BI_DV; + +var BI_FP; +var BI_FV; +var BI_F1; +var BI_F2; + +// JavaScript engine analysis +var canary = 0xdeadbeefcafe; +var j_lm = ((canary&0xffffff)==0xefcafe); + +// This is the best random number generator available to mankind ;) +var MyMath = { + curr: 0, + random: function() { + this.curr = this.curr + 1; + return this.curr; + }, +}; + + +// (public) Constructor +function BigInteger(a,b,c) { + this.array = new Array(); + if(a != null) + if("number" == typeof a) this.fromNumber(a,b,c); + else if(b == null && "string" != typeof a) this.fromString(a,256); + else this.fromString(a,b); +} + +// return new, unset BigInteger +function nbi() { return new BigInteger(null); } + +// am: Compute w_j += (x*this_i), propagate carries, +// c is initial carry, returns final carry. +// c < 3*dvalue, x < 2*dvalue, this_i < dvalue +// We need to select the fastest one that works in this environment. + +// am1: use a single mult and divide to get the high bits, +// max digit bits should be 26 because +// max internal value = 2*dvalue^2-2*dvalue (< 2^53) +function am1(i,x,w,j,c,n) { + var this_array = this.array; + var w_array = w.array; + while(--n >= 0) { + var v = x*this_array[i++]+w_array[j]+c; + c = Math.floor(v/0x4000000); + w_array[j++] = v&0x3ffffff; + } + return c; +} + +// am2 avoids a big mult-and-extract completely. +// Max digit bits should be <= 30 because we do bitwise ops +// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) +function am2(i,x,w,j,c,n) { + var this_array = this.array; + var w_array = w.array; + var xl = x&0x7fff, xh = x>>15; + while(--n >= 0) { + var l = this_array[i]&0x7fff; + var h = this_array[i++]>>15; + var m = xh*l+h*xl; + l = xl*l+((m&0x7fff)<<15)+w_array[j]+(c&0x3fffffff); + c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); + w_array[j++] = l&0x3fffffff; + } + return c; +} + +// Alternately, set max digit bits to 28 since some +// browsers slow down when dealing with 32-bit numbers. +function am3(i,x,w,j,c,n) { + var this_array = this.array; + var w_array = w.array; + + var xl = x&0x3fff, xh = x>>14; + while(--n >= 0) { + var l = this_array[i]&0x3fff; + var h = this_array[i++]>>14; + var m = xh*l+h*xl; + l = xl*l+((m&0x3fff)<<14)+w_array[j]+c; + c = (l>>28)+(m>>14)+xh*h; + w_array[j++] = l&0xfffffff; + } + return c; +} + +// This is tailored to VMs with 2-bit tagging. It makes sure +// that all the computations stay within the 29 bits available. +function am4(i,x,w,j,c,n) { + var this_array = this.array; + var w_array = w.array; + + var xl = x&0x1fff, xh = x>>13; + while(--n >= 0) { + var l = this_array[i]&0x1fff; + var h = this_array[i++]>>13; + var m = xh*l+h*xl; + l = xl*l+((m&0x1fff)<<13)+w_array[j]+c; + c = (l>>26)+(m>>13)+xh*h; + w_array[j++] = l&0x3ffffff; + } + return c; +} + +// am3/28 is best for SM, Rhino, but am4/26 is best for v8. +// Kestrel (Opera 9.5) gets its best result with am4/26. +// IE7 does 9% better with am3/28 than with am4/26. +// Firefox (SM) gets 10% faster with am3/28 than with am4/26. + +setupEngine = function(fn, bits) { + BigInteger.prototype.am = fn; + dbits = bits; + + BI_DB = dbits; + BI_DM = ((1<= 0; --i) r_array[i] = this_array[i]; + r.t = this.t; + r.s = this.s; +} + +// (protected) set from integer value x, -DV <= x < DV +function bnpFromInt(x) { + var this_array = this.array; + this.t = 1; + this.s = (x<0)?-1:0; + if(x > 0) this_array[0] = x; + else if(x < -1) this_array[0] = x+DV; + else this.t = 0; +} + +// return bigint initialized to value +function nbv(i) { var r = nbi(); r.fromInt(i); return r; } + +// (protected) set from string and radix +function bnpFromString(s,b) { + var this_array = this.array; + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 256) k = 8; // byte array + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else { this.fromRadix(s,b); return; } + this.t = 0; + this.s = 0; + var i = s.length, mi = false, sh = 0; + while(--i >= 0) { + var x = (k==8)?s[i]&0xff:intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-") mi = true; + continue; + } + mi = false; + if(sh == 0) + this_array[this.t++] = x; + else if(sh+k > BI_DB) { + this_array[this.t-1] |= (x&((1<<(BI_DB-sh))-1))<>(BI_DB-sh)); + } + else + this_array[this.t-1] |= x<= BI_DB) sh -= BI_DB; + } + if(k == 8 && (s[0]&0x80) != 0) { + this.s = -1; + if(sh > 0) this_array[this.t-1] |= ((1<<(BI_DB-sh))-1)< 0 && this_array[this.t-1] == c) --this.t; +} + +// (public) return string representation in given radix +function bnToString(b) { + var this_array = this.array; + if(this.s < 0) return "-"+this.negate().toString(b); + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else return this.toRadix(b); + var km = (1< 0) { + if(p < BI_DB && (d = this_array[i]>>p) > 0) { m = true; r = int2char(d); } + while(i >= 0) { + if(p < k) { + d = (this_array[i]&((1<>(p+=BI_DB-k); + } + else { + d = (this_array[i]>>(p-=k))&km; + if(p <= 0) { p += BI_DB; --i; } + } + if(d > 0) m = true; + if(m) r += int2char(d); + } + } + return m?r:"0"; +} + +// (public) -this +function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } + +// (public) |this| +function bnAbs() { return (this.s<0)?this.negate():this; } + +// (public) return + if this > a, - if this < a, 0 if equal +function bnCompareTo(a) { + var this_array = this.array; + var a_array = a.array; + + var r = this.s-a.s; + if(r != 0) return r; + var i = this.t; + r = i-a.t; + if(r != 0) return r; + while(--i >= 0) if((r=this_array[i]-a_array[i]) != 0) return r; + return 0; +} + +// returns bit length of the integer x +function nbits(x) { + var r = 1, t; + if((t=x>>>16) != 0) { x = t; r += 16; } + if((t=x>>8) != 0) { x = t; r += 8; } + if((t=x>>4) != 0) { x = t; r += 4; } + if((t=x>>2) != 0) { x = t; r += 2; } + if((t=x>>1) != 0) { x = t; r += 1; } + return r; +} + +// (public) return the number of bits in "this" +function bnBitLength() { + var this_array = this.array; + if(this.t <= 0) return 0; + return BI_DB*(this.t-1)+nbits(this_array[this.t-1]^(this.s&BI_DM)); +} + +// (protected) r = this << n*DB +function bnpDLShiftTo(n,r) { + var this_array = this.array; + var r_array = r.array; + var i; + for(i = this.t-1; i >= 0; --i) r_array[i+n] = this_array[i]; + for(i = n-1; i >= 0; --i) r_array[i] = 0; + r.t = this.t+n; + r.s = this.s; +} + +// (protected) r = this >> n*DB +function bnpDRShiftTo(n,r) { + var this_array = this.array; + var r_array = r.array; + for(var i = n; i < this.t; ++i) r_array[i-n] = this_array[i]; + r.t = Math.max(this.t-n,0); + r.s = this.s; +} + +// (protected) r = this << n +function bnpLShiftTo(n,r) { + var this_array = this.array; + var r_array = r.array; + var bs = n%BI_DB; + var cbs = BI_DB-bs; + var bm = (1<= 0; --i) { + r_array[i+ds+1] = (this_array[i]>>cbs)|c; + c = (this_array[i]&bm)<= 0; --i) r_array[i] = 0; + r_array[ds] = c; + r.t = this.t+ds+1; + r.s = this.s; + r.clamp(); +} + +// (protected) r = this >> n +function bnpRShiftTo(n,r) { + var this_array = this.array; + var r_array = r.array; + r.s = this.s; + var ds = Math.floor(n/BI_DB); + if(ds >= this.t) { r.t = 0; return; } + var bs = n%BI_DB; + var cbs = BI_DB-bs; + var bm = (1<>bs; + for(var i = ds+1; i < this.t; ++i) { + r_array[i-ds-1] |= (this_array[i]&bm)<>bs; + } + if(bs > 0) r_array[this.t-ds-1] |= (this.s&bm)<>= BI_DB; + } + if(a.t < this.t) { + c -= a.s; + while(i < this.t) { + c += this_array[i]; + r_array[i++] = c&BI_DM; + c >>= BI_DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c -= a_array[i]; + r_array[i++] = c&BI_DM; + c >>= BI_DB; + } + c -= a.s; + } + r.s = (c<0)?-1:0; + if(c < -1) r_array[i++] = BI_DV+c; + else if(c > 0) r_array[i++] = c; + r.t = i; + r.clamp(); +} + +// (protected) r = this * a, r != this,a (HAC 14.12) +// "this" should be the larger one if appropriate. +function bnpMultiplyTo(a,r) { + var this_array = this.array; + var r_array = r.array; + var x = this.abs(), y = a.abs(); + var y_array = y.array; + + var i = x.t; + r.t = i+y.t; + while(--i >= 0) r_array[i] = 0; + for(i = 0; i < y.t; ++i) r_array[i+x.t] = x.am(0,y_array[i],r,i,0,x.t); + r.s = 0; + r.clamp(); + if(this.s != a.s) BigInteger.ZERO.subTo(r,r); +} + +// (protected) r = this^2, r != this (HAC 14.16) +function bnpSquareTo(r) { + var x = this.abs(); + var x_array = x.array; + var r_array = r.array; + + var i = r.t = 2*x.t; + while(--i >= 0) r_array[i] = 0; + for(i = 0; i < x.t-1; ++i) { + var c = x.am(i,x_array[i],r,2*i,0,1); + if((r_array[i+x.t]+=x.am(i+1,2*x_array[i],r,2*i+1,c,x.t-i-1)) >= BI_DV) { + r_array[i+x.t] -= BI_DV; + r_array[i+x.t+1] = 1; + } + } + if(r.t > 0) r_array[r.t-1] += x.am(i,x_array[i],r,2*i,0,1); + r.s = 0; + r.clamp(); +} + +// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) +// r != q, this != m. q or r may be null. +function bnpDivRemTo(m,q,r) { + var pm = m.abs(); + if(pm.t <= 0) return; + var pt = this.abs(); + if(pt.t < pm.t) { + if(q != null) q.fromInt(0); + if(r != null) this.copyTo(r); + return; + } + if(r == null) r = nbi(); + var y = nbi(), ts = this.s, ms = m.s; + var pm_array = pm.array; + var nsh = BI_DB-nbits(pm_array[pm.t-1]); // normalize modulus + if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } + else { pm.copyTo(y); pt.copyTo(r); } + var ys = y.t; + + var y_array = y.array; + var y0 = y_array[ys-1]; + if(y0 == 0) return; + var yt = y0*(1<1)?y_array[ys-2]>>BI_F2:0); + var d1 = BI_FV/yt, d2 = (1<= 0) { + r_array[r.t++] = 1; + r.subTo(t,r); + } + BigInteger.ONE.dlShiftTo(ys,t); + t.subTo(y,y); // "negative" y so we can replace sub with am later + while(y.t < ys) y_array[y.t++] = 0; + while(--j >= 0) { + // Estimate quotient digit + var qd = (r_array[--i]==y0)?BI_DM:Math.floor(r_array[i]*d1+(r_array[i-1]+e)*d2); + if((r_array[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out + y.dlShiftTo(j,t); + r.subTo(t,r); + while(r_array[i] < --qd) r.subTo(t,r); + } + } + if(q != null) { + r.drShiftTo(ys,q); + if(ts != ms) BigInteger.ZERO.subTo(q,q); + } + r.t = ys; + r.clamp(); + if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder + if(ts < 0) BigInteger.ZERO.subTo(r,r); +} + +// (public) this mod a +function bnMod(a) { + var r = nbi(); + this.abs().divRemTo(a,null,r); + if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); + return r; +} + +// Modular reduction using "classic" algorithm +function Classic(m) { this.m = m; } +function cConvert(x) { + if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); + else return x; +} +function cRevert(x) { return x; } +function cReduce(x) { x.divRemTo(this.m,null,x); } +function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } +function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + +Classic.prototype.convert = cConvert; +Classic.prototype.revert = cRevert; +Classic.prototype.reduce = cReduce; +Classic.prototype.mulTo = cMulTo; +Classic.prototype.sqrTo = cSqrTo; + +// (protected) return "-1/this % 2^DB"; useful for Mont. reduction +// justification: +// xy == 1 (mod m) +// xy = 1+km +// xy(2-xy) = (1+km)(1-km) +// x[y(2-xy)] = 1-k^2m^2 +// x[y(2-xy)] == 1 (mod m^2) +// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 +// should reduce x and y(2-xy) by m^2 at each step to keep size bounded. +// JS multiply "overflows" differently from C/C++, so care is needed here. +function bnpInvDigit() { + var this_array = this.array; + if(this.t < 1) return 0; + var x = this_array[0]; + if((x&1) == 0) return 0; + var y = x&3; // y == 1/x mod 2^2 + y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 + y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 + y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 + // last step - calculate inverse mod DV directly; + // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints + y = (y*(2-x*y%BI_DV))%BI_DV; // y == 1/x mod 2^dbits + // we really want the negative inverse, and -DV < y < DV + return (y>0)?BI_DV-y:-y; +} + +// Montgomery reduction +function Montgomery(m) { + this.m = m; + this.mp = m.invDigit(); + this.mpl = this.mp&0x7fff; + this.mph = this.mp>>15; + this.um = (1<<(BI_DB-15))-1; + this.mt2 = 2*m.t; +} + +// xR mod m +function montConvert(x) { + var r = nbi(); + x.abs().dlShiftTo(this.m.t,r); + r.divRemTo(this.m,null,r); + if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); + return r; +} + +// x/R mod m +function montRevert(x) { + var r = nbi(); + x.copyTo(r); + this.reduce(r); + return r; +} + +// x = x/R mod m (HAC 14.32) +function montReduce(x) { + var x_array = x.array; + while(x.t <= this.mt2) // pad x so am has enough room later + x_array[x.t++] = 0; + for(var i = 0; i < this.m.t; ++i) { + // faster way of calculating u0 = x[i]*mp mod DV + var j = x_array[i]&0x7fff; + var u0 = (j*this.mpl+(((j*this.mph+(x_array[i]>>15)*this.mpl)&this.um)<<15))&BI_DM; + // use am to combine the multiply-shift-add into one call + j = i+this.m.t; + x_array[j] += this.m.am(0,u0,x,i,0,this.m.t); + // propagate carry + while(x_array[j] >= BI_DV) { x_array[j] -= BI_DV; x_array[++j]++; } + } + x.clamp(); + x.drShiftTo(this.m.t,x); + if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); +} + +// r = "x^2/R mod m"; x != r +function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + +// r = "xy/R mod m"; x,y != r +function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + +Montgomery.prototype.convert = montConvert; +Montgomery.prototype.revert = montRevert; +Montgomery.prototype.reduce = montReduce; +Montgomery.prototype.mulTo = montMulTo; +Montgomery.prototype.sqrTo = montSqrTo; + +// (protected) true iff this is even +function bnpIsEven() { + var this_array = this.array; + return ((this.t>0)?(this_array[0]&1):this.s) == 0; +} + +// (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) +function bnpExp(e,z) { + if(e > 0xffffffff || e < 1) return BigInteger.ONE; + var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; + g.copyTo(r); + while(--i >= 0) { + z.sqrTo(r,r2); + if((e&(1< 0) z.mulTo(r2,g,r); + else { var t = r; r = r2; r2 = t; } + } + return z.revert(r); +} + +// (public) this^e % m, 0 <= e < 2^32 +function bnModPowInt(e,m) { + var z; + if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); + return this.exp(e,z); +} + +// protected +BigInteger.prototype.copyTo = bnpCopyTo; +BigInteger.prototype.fromInt = bnpFromInt; +BigInteger.prototype.fromString = bnpFromString; +BigInteger.prototype.clamp = bnpClamp; +BigInteger.prototype.dlShiftTo = bnpDLShiftTo; +BigInteger.prototype.drShiftTo = bnpDRShiftTo; +BigInteger.prototype.lShiftTo = bnpLShiftTo; +BigInteger.prototype.rShiftTo = bnpRShiftTo; +BigInteger.prototype.subTo = bnpSubTo; +BigInteger.prototype.multiplyTo = bnpMultiplyTo; +BigInteger.prototype.squareTo = bnpSquareTo; +BigInteger.prototype.divRemTo = bnpDivRemTo; +BigInteger.prototype.invDigit = bnpInvDigit; +BigInteger.prototype.isEven = bnpIsEven; +BigInteger.prototype.exp = bnpExp; + +// public +BigInteger.prototype.toString = bnToString; +BigInteger.prototype.negate = bnNegate; +BigInteger.prototype.abs = bnAbs; +BigInteger.prototype.compareTo = bnCompareTo; +BigInteger.prototype.bitLength = bnBitLength; +BigInteger.prototype.mod = bnMod; +BigInteger.prototype.modPowInt = bnModPowInt; + +// "constants" +BigInteger.ZERO = nbv(0); +BigInteger.ONE = nbv(1); +// Copyright (c) 2005 Tom Wu +// All Rights Reserved. +// See "LICENSE" for details. + +// Extended JavaScript BN functions, required for RSA private ops. + +// (public) +function bnClone() { var r = nbi(); this.copyTo(r); return r; } + +// (public) return value as integer +function bnIntValue() { + var this_array = this.array; + if(this.s < 0) { + if(this.t == 1) return this_array[0]-BI_DV; + else if(this.t == 0) return -1; + } + else if(this.t == 1) return this_array[0]; + else if(this.t == 0) return 0; + // assumes 16 < DB < 32 + return ((this_array[1]&((1<<(32-BI_DB))-1))<>24; +} + +// (public) return value as short (assumes DB>=16) +function bnShortValue() { + var this_array = this.array; + return (this.t==0)?this.s:(this_array[0]<<16)>>16; +} + +// (protected) return x s.t. r^x < DV +function bnpChunkSize(r) { return Math.floor(Math.LN2*BI_DB/Math.log(r)); } + +// (public) 0 if this == 0, 1 if this > 0 +function bnSigNum() { + var this_array = this.array; + if(this.s < 0) return -1; + else if(this.t <= 0 || (this.t == 1 && this_array[0] <= 0)) return 0; + else return 1; +} + +// (protected) convert to radix string +function bnpToRadix(b) { + if(b == null) b = 10; + if(this.signum() == 0 || b < 2 || b > 36) return "0"; + var cs = this.chunkSize(b); + var a = Math.pow(b,cs); + var d = nbv(a), y = nbi(), z = nbi(), r = ""; + this.divRemTo(d,y,z); + while(y.signum() > 0) { + r = (a+z.intValue()).toString(b).substr(1) + r; + y.divRemTo(d,y,z); + } + return z.intValue().toString(b) + r; +} + +// (protected) convert from radix string +function bnpFromRadix(s,b) { + this.fromInt(0); + if(b == null) b = 10; + var cs = this.chunkSize(b); + var d = Math.pow(b,cs), mi = false, j = 0, w = 0; + for(var i = 0; i < s.length; ++i) { + var x = intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-" && this.signum() == 0) mi = true; + continue; + } + w = b*w+x; + if(++j >= cs) { + this.dMultiply(d); + this.dAddOffset(w,0); + j = 0; + w = 0; + } + } + if(j > 0) { + this.dMultiply(Math.pow(b,j)); + this.dAddOffset(w,0); + } + if(mi) BigInteger.ZERO.subTo(this,this); +} + +// (protected) alternate constructor +function bnpFromNumber(a,b,c) { + if("number" == typeof b) { + // new BigInteger(int,int,RNG) + if(a < 2) this.fromInt(1); + else { + this.fromNumber(a,c); + if(!this.testBit(a-1)) // force MSB set + this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); + if(this.isEven()) this.dAddOffset(1,0); // force odd + while(!this.isProbablePrime(b)) { + this.dAddOffset(2,0); + if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); + } + } + } + else { + // new BigInteger(int,RNG) + var x = new Array(), t = a&7; + x.length = (a>>3)+1; + b.nextBytes(x); + if(t > 0) x[0] &= ((1< 0) { + if(p < BI_DB && (d = this_array[i]>>p) != (this.s&BI_DM)>>p) + r[k++] = d|(this.s<<(BI_DB-p)); + while(i >= 0) { + if(p < 8) { + d = (this_array[i]&((1<>(p+=BI_DB-8); + } + else { + d = (this_array[i]>>(p-=8))&0xff; + if(p <= 0) { p += BI_DB; --i; } + } + if((d&0x80) != 0) d |= -256; + if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; + if(k > 0 || d != this.s) r[k++] = d; + } + } + return r; +} + +function bnEquals(a) { return(this.compareTo(a)==0); } +function bnMin(a) { return(this.compareTo(a)<0)?this:a; } +function bnMax(a) { return(this.compareTo(a)>0)?this:a; } + +// (protected) r = this op a (bitwise) +function bnpBitwiseTo(a,op,r) { + var this_array = this.array; + var a_array = a.array; + var r_array = r.array; + var i, f, m = Math.min(a.t,this.t); + for(i = 0; i < m; ++i) r_array[i] = op(this_array[i],a_array[i]); + if(a.t < this.t) { + f = a.s&BI_DM; + for(i = m; i < this.t; ++i) r_array[i] = op(this_array[i],f); + r.t = this.t; + } + else { + f = this.s&BI_DM; + for(i = m; i < a.t; ++i) r_array[i] = op(f,a_array[i]); + r.t = a.t; + } + r.s = op(this.s,a.s); + r.clamp(); +} + +// (public) this & a +function op_and(x,y) { return x&y; } +function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } + +// (public) this | a +function op_or(x,y) { return x|y; } +function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } + +// (public) this ^ a +function op_xor(x,y) { return x^y; } +function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } + +// (public) this & ~a +function op_andnot(x,y) { return x&~y; } +function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } + +// (public) ~this +function bnNot() { + var this_array = this.array; + var r = nbi(); + var r_array = r.array; + + for(var i = 0; i < this.t; ++i) r_array[i] = BI_DM&~this_array[i]; + r.t = this.t; + r.s = ~this.s; + return r; +} + +// (public) this << n +function bnShiftLeft(n) { + var r = nbi(); + if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); + return r; +} + +// (public) this >> n +function bnShiftRight(n) { + var r = nbi(); + if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); + return r; +} + +// return index of lowest 1-bit in x, x < 2^31 +function lbit(x) { + if(x == 0) return -1; + var r = 0; + if((x&0xffff) == 0) { x >>= 16; r += 16; } + if((x&0xff) == 0) { x >>= 8; r += 8; } + if((x&0xf) == 0) { x >>= 4; r += 4; } + if((x&3) == 0) { x >>= 2; r += 2; } + if((x&1) == 0) ++r; + return r; +} + +// (public) returns index of lowest 1-bit (or -1 if none) +function bnGetLowestSetBit() { + var this_array = this.array; + for(var i = 0; i < this.t; ++i) + if(this_array[i] != 0) return i*BI_DB+lbit(this_array[i]); + if(this.s < 0) return this.t*BI_DB; + return -1; +} + +// return number of 1 bits in x +function cbit(x) { + var r = 0; + while(x != 0) { x &= x-1; ++r; } + return r; +} + +// (public) return number of set bits +function bnBitCount() { + var r = 0, x = this.s&BI_DM; + for(var i = 0; i < this.t; ++i) r += cbit(this_array[i]^x); + return r; +} + +// (public) true iff nth bit is set +function bnTestBit(n) { + var this_array = this.array; + var j = Math.floor(n/BI_DB); + if(j >= this.t) return(this.s!=0); + return((this_array[j]&(1<<(n%BI_DB)))!=0); +} + +// (protected) this op (1<>= BI_DB; + } + if(a.t < this.t) { + c += a.s; + while(i < this.t) { + c += this_array[i]; + r_array[i++] = c&BI_DM; + c >>= BI_DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c += a_array[i]; + r_array[i++] = c&BI_DM; + c >>= BI_DB; + } + c += a.s; + } + r.s = (c<0)?-1:0; + if(c > 0) r_array[i++] = c; + else if(c < -1) r_array[i++] = BI_DV+c; + r.t = i; + r.clamp(); +} + +// (public) this + a +function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } + +// (public) this - a +function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } + +// (public) this * a +function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } + +// (public) this / a +function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } + +// (public) this % a +function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } + +// (public) [this/a,this%a] +function bnDivideAndRemainder(a) { + var q = nbi(), r = nbi(); + this.divRemTo(a,q,r); + return new Array(q,r); +} + +// (protected) this *= n, this >= 0, 1 < n < DV +function bnpDMultiply(n) { + var this_array = this.array; + this_array[this.t] = this.am(0,n-1,this,0,0,this.t); + ++this.t; + this.clamp(); +} + +// (protected) this += n << w words, this >= 0 +function bnpDAddOffset(n,w) { + var this_array = this.array; + while(this.t <= w) this_array[this.t++] = 0; + this_array[w] += n; + while(this_array[w] >= BI_DV) { + this_array[w] -= BI_DV; + if(++w >= this.t) this_array[this.t++] = 0; + ++this_array[w]; + } +} + +// A "null" reducer +function NullExp() {} +function nNop(x) { return x; } +function nMulTo(x,y,r) { x.multiplyTo(y,r); } +function nSqrTo(x,r) { x.squareTo(r); } + +NullExp.prototype.convert = nNop; +NullExp.prototype.revert = nNop; +NullExp.prototype.mulTo = nMulTo; +NullExp.prototype.sqrTo = nSqrTo; + +// (public) this^e +function bnPow(e) { return this.exp(e,new NullExp()); } + +// (protected) r = lower n words of "this * a", a.t <= n +// "this" should be the larger one if appropriate. +function bnpMultiplyLowerTo(a,n,r) { + var r_array = r.array; + var a_array = a.array; + var i = Math.min(this.t+a.t,n); + r.s = 0; // assumes a,this >= 0 + r.t = i; + while(i > 0) r_array[--i] = 0; + var j; + for(j = r.t-this.t; i < j; ++i) r_array[i+this.t] = this.am(0,a_array[i],r,i,0,this.t); + for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a_array[i],r,i,0,n-i); + r.clamp(); +} + +// (protected) r = "this * a" without lower n words, n > 0 +// "this" should be the larger one if appropriate. +function bnpMultiplyUpperTo(a,n,r) { + var r_array = r.array; + var a_array = a.array; + --n; + var i = r.t = this.t+a.t-n; + r.s = 0; // assumes a,this >= 0 + while(--i >= 0) r_array[i] = 0; + for(i = Math.max(n-this.t,0); i < a.t; ++i) + r_array[this.t+i-n] = this.am(n-i,a_array[i],r,0,0,this.t+i-n); + r.clamp(); + r.drShiftTo(1,r); +} + +// Barrett modular reduction +function Barrett(m) { + // setup Barrett + this.r2 = nbi(); + this.q3 = nbi(); + BigInteger.ONE.dlShiftTo(2*m.t,this.r2); + this.mu = this.r2.divide(m); + this.m = m; +} + +function barrettConvert(x) { + if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); + else if(x.compareTo(this.m) < 0) return x; + else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } +} + +function barrettRevert(x) { return x; } + +// x = x mod m (HAC 14.42) +function barrettReduce(x) { + x.drShiftTo(this.m.t-1,this.r2); + if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } + this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); + this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); + while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); + x.subTo(this.r2,x); + while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); +} + +// r = x^2 mod m; x != r +function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + +// r = x*y mod m; x,y != r +function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + +Barrett.prototype.convert = barrettConvert; +Barrett.prototype.revert = barrettRevert; +Barrett.prototype.reduce = barrettReduce; +Barrett.prototype.mulTo = barrettMulTo; +Barrett.prototype.sqrTo = barrettSqrTo; + +// (public) this^e % m (HAC 14.85) +function bnModPow(e,m) { + var e_array = e.array; + var i = e.bitLength(), k, r = nbv(1), z; + if(i <= 0) return r; + else if(i < 18) k = 1; + else if(i < 48) k = 3; + else if(i < 144) k = 4; + else if(i < 768) k = 5; + else k = 6; + if(i < 8) + z = new Classic(m); + else if(m.isEven()) + z = new Barrett(m); + else + z = new Montgomery(m); + + // precomputation + var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { + var g2 = nbi(); + z.sqrTo(g[1],g2); + while(n <= km) { + g[n] = nbi(); + z.mulTo(g2,g[n-2],g[n]); + n += 2; + } + } + + var j = e.t-1, w, is1 = true, r2 = nbi(), t; + i = nbits(e_array[j])-1; + while(j >= 0) { + if(i >= k1) w = (e_array[j]>>(i-k1))&km; + else { + w = (e_array[j]&((1<<(i+1))-1))<<(k1-i); + if(j > 0) w |= e_array[j-1]>>(BI_DB+i-k1); + } + + n = k; + while((w&1) == 0) { w >>= 1; --n; } + if((i -= n) < 0) { i += BI_DB; --j; } + if(is1) { // ret == 1, don't bother squaring or multiplying it + g[w].copyTo(r); + is1 = false; + } + else { + while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } + if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } + z.mulTo(r2,g[w],r); + } + + while(j >= 0 && (e_array[j]&(1< 0) { + x.rShiftTo(g,x); + y.rShiftTo(g,y); + } + while(x.signum() > 0) { + if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); + if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); + if(x.compareTo(y) >= 0) { + x.subTo(y,x); + x.rShiftTo(1,x); + } + else { + y.subTo(x,y); + y.rShiftTo(1,y); + } + } + if(g > 0) y.lShiftTo(g,y); + return y; +} + +// (protected) this % n, n < 2^26 +function bnpModInt(n) { + var this_array = this.array; + if(n <= 0) return 0; + var d = BI_DV%n, r = (this.s<0)?n-1:0; + if(this.t > 0) + if(d == 0) r = this_array[0]%n; + else for(var i = this.t-1; i >= 0; --i) r = (d*r+this_array[i])%n; + return r; +} + +// (public) 1/this % m (HAC 14.61) +function bnModInverse(m) { + var ac = m.isEven(); + if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; + var u = m.clone(), v = this.clone(); + var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); + while(u.signum() != 0) { + while(u.isEven()) { + u.rShiftTo(1,u); + if(ac) { + if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } + a.rShiftTo(1,a); + } + else if(!b.isEven()) b.subTo(m,b); + b.rShiftTo(1,b); + } + while(v.isEven()) { + v.rShiftTo(1,v); + if(ac) { + if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } + c.rShiftTo(1,c); + } + else if(!d.isEven()) d.subTo(m,d); + d.rShiftTo(1,d); + } + if(u.compareTo(v) >= 0) { + u.subTo(v,u); + if(ac) a.subTo(c,a); + b.subTo(d,b); + } + else { + v.subTo(u,v); + if(ac) c.subTo(a,c); + d.subTo(b,d); + } + } + if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; + if(d.compareTo(m) >= 0) return d.subtract(m); + if(d.signum() < 0) d.addTo(m,d); else return d; + if(d.signum() < 0) return d.add(m); else return d; +} + +var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509]; +var lplim = (1<<26)/lowprimes[lowprimes.length-1]; + +// (public) test primality with certainty >= 1-.5^t +function bnIsProbablePrime(t) { + var i, x = this.abs(); + var x_array = x.array; + if(x.t == 1 && x_array[0] <= lowprimes[lowprimes.length-1]) { + for(i = 0; i < lowprimes.length; ++i) + if(x_array[0] == lowprimes[i]) return true; + return false; + } + if(x.isEven()) return false; + i = 1; + while(i < lowprimes.length) { + var m = lowprimes[i], j = i+1; + while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; + m = x.modInt(m); + while(i < j) if(m%lowprimes[i++] == 0) return false; + } + return x.millerRabin(t); +} + +// (protected) true if probably prime (HAC 4.24, Miller-Rabin) +function bnpMillerRabin(t) { + var n1 = this.subtract(BigInteger.ONE); + var k = n1.getLowestSetBit(); + if(k <= 0) return false; + var r = n1.shiftRight(k); + t = (t+1)>>1; + if(t > lowprimes.length) t = lowprimes.length; + var a = nbi(); + for(var i = 0; i < t; ++i) { + a.fromInt(lowprimes[i]); + var y = a.modPow(r,this); + if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { + var j = 1; + while(j++ < k && y.compareTo(n1) != 0) { + y = y.modPowInt(2,this); + if(y.compareTo(BigInteger.ONE) == 0) return false; + } + if(y.compareTo(n1) != 0) return false; + } + } + return true; +} + +// protected +BigInteger.prototype.chunkSize = bnpChunkSize; +BigInteger.prototype.toRadix = bnpToRadix; +BigInteger.prototype.fromRadix = bnpFromRadix; +BigInteger.prototype.fromNumber = bnpFromNumber; +BigInteger.prototype.bitwiseTo = bnpBitwiseTo; +BigInteger.prototype.changeBit = bnpChangeBit; +BigInteger.prototype.addTo = bnpAddTo; +BigInteger.prototype.dMultiply = bnpDMultiply; +BigInteger.prototype.dAddOffset = bnpDAddOffset; +BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; +BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; +BigInteger.prototype.modInt = bnpModInt; +BigInteger.prototype.millerRabin = bnpMillerRabin; + +// public +BigInteger.prototype.clone = bnClone; +BigInteger.prototype.intValue = bnIntValue; +BigInteger.prototype.byteValue = bnByteValue; +BigInteger.prototype.shortValue = bnShortValue; +BigInteger.prototype.signum = bnSigNum; +BigInteger.prototype.toByteArray = bnToByteArray; +BigInteger.prototype.equals = bnEquals; +BigInteger.prototype.min = bnMin; +BigInteger.prototype.max = bnMax; +BigInteger.prototype.and = bnAnd; +BigInteger.prototype.or = bnOr; +BigInteger.prototype.xor = bnXor; +BigInteger.prototype.andNot = bnAndNot; +BigInteger.prototype.not = bnNot; +BigInteger.prototype.shiftLeft = bnShiftLeft; +BigInteger.prototype.shiftRight = bnShiftRight; +BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; +BigInteger.prototype.bitCount = bnBitCount; +BigInteger.prototype.testBit = bnTestBit; +BigInteger.prototype.setBit = bnSetBit; +BigInteger.prototype.clearBit = bnClearBit; +BigInteger.prototype.flipBit = bnFlipBit; +BigInteger.prototype.add = bnAdd; +BigInteger.prototype.subtract = bnSubtract; +BigInteger.prototype.multiply = bnMultiply; +BigInteger.prototype.divide = bnDivide; +BigInteger.prototype.remainder = bnRemainder; +BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; +BigInteger.prototype.modPow = bnModPow; +BigInteger.prototype.modInverse = bnModInverse; +BigInteger.prototype.pow = bnPow; +BigInteger.prototype.gcd = bnGCD; +BigInteger.prototype.isProbablePrime = bnIsProbablePrime; + +// BigInteger interfaces not implemented in jsbn: + +// BigInteger(int signum, byte[] magnitude) +// double doubleValue() +// float floatValue() +// int hashCode() +// long longValue() +// static BigInteger valueOf(long val) +// prng4.js - uses Arcfour as a PRNG + +function Arcfour() { + this.i = 0; + this.j = 0; + this.S = new Array(); +} + +// Initialize arcfour context from key, an array of ints, each from [0..255] +function ARC4init(key) { + var i, j, t; + for(i = 0; i < 256; ++i) + this.S[i] = i; + j = 0; + for(i = 0; i < 256; ++i) { + j = (j + this.S[i] + key[i % key.length]) & 255; + t = this.S[i]; + this.S[i] = this.S[j]; + this.S[j] = t; + } + this.i = 0; + this.j = 0; +} + +function ARC4next() { + var t; + this.i = (this.i + 1) & 255; + this.j = (this.j + this.S[this.i]) & 255; + t = this.S[this.i]; + this.S[this.i] = this.S[this.j]; + this.S[this.j] = t; + return this.S[(t + this.S[this.i]) & 255]; +} + +Arcfour.prototype.init = ARC4init; +Arcfour.prototype.next = ARC4next; + +// Plug in your RNG constructor here +function prng_newstate() { + return new Arcfour(); +} + +// Pool size must be a multiple of 4 and greater than 32. +// An array of bytes the size of the pool will be passed to init() +var rng_psize = 256; +// Random number generator - requires a PRNG backend, e.g. prng4.js + +// For best results, put code like +// +// in your main HTML document. + +var rng_state; +var rng_pool; +var rng_pptr; + +// Mix in a 32-bit integer into the pool +function rng_seed_int(x) { + rng_pool[rng_pptr++] ^= x & 255; + rng_pool[rng_pptr++] ^= (x >> 8) & 255; + rng_pool[rng_pptr++] ^= (x >> 16) & 255; + rng_pool[rng_pptr++] ^= (x >> 24) & 255; + if(rng_pptr >= rng_psize) rng_pptr -= rng_psize; +} + +// Mix in the current time (w/milliseconds) into the pool +function rng_seed_time() { + // Use pre-computed date to avoid making the benchmark + // results dependent on the current date. + rng_seed_int(1122926989487); +} + +// Initialize the pool with junk if needed. +if(rng_pool == null) { + rng_pool = new Array(); + rng_pptr = 0; + var t; + while(rng_pptr < rng_psize) { // extract some randomness from Math.random() + t = Math.floor(65536 * MyMath.random()); + rng_pool[rng_pptr++] = t >>> 8; + rng_pool[rng_pptr++] = t & 255; + } + rng_pptr = 0; + rng_seed_time(); + //rng_seed_int(window.screenX); + //rng_seed_int(window.screenY); +} + +function rng_get_byte() { + if(rng_state == null) { + rng_seed_time(); + rng_state = prng_newstate(); + rng_state.init(rng_pool); + for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) + rng_pool[rng_pptr] = 0; + rng_pptr = 0; + //rng_pool = null; + } + // TODO: allow reseeding after first request + return rng_state.next(); +} + +function rng_get_bytes(ba) { + var i; + for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); +} + +function SecureRandom() {} + +SecureRandom.prototype.nextBytes = rng_get_bytes; +// Depends on jsbn.js and rng.js + +// convert a (hex) string to a bignum object +function parseBigInt(str,r) { + return new BigInteger(str,r); +} + +function linebrk(s,n) { + var ret = ""; + var i = 0; + while(i + n < s.length) { + ret += s.substring(i,i+n) + "\n"; + i += n; + } + return ret + s.substring(i,s.length); +} + +function byte2Hex(b) { + if(b < 0x10) + return "0" + b.toString(16); + else + return b.toString(16); +} + +// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint +function pkcs1pad2(s,n) { + if(n < s.length + 11) { + alert("Message too long for RSA"); + return null; + } + var ba = new Array(); + var i = s.length - 1; + while(i >= 0 && n > 0) ba[--n] = s.charCodeAt(i--); + ba[--n] = 0; + var rng = new SecureRandom(); + var x = new Array(); + while(n > 2) { // random non-zero pad + x[0] = 0; + while(x[0] == 0) rng.nextBytes(x); + ba[--n] = x[0]; + } + ba[--n] = 2; + ba[--n] = 0; + return new BigInteger(ba); +} + +// "empty" RSA key constructor +function RSAKey() { + this.n = null; + this.e = 0; + this.d = null; + this.p = null; + this.q = null; + this.dmp1 = null; + this.dmq1 = null; + this.coeff = null; +} + +// Set the public key fields N and e from hex strings +function RSASetPublic(N,E) { + if(N != null && E != null && N.length > 0 && E.length > 0) { + this.n = parseBigInt(N,16); + this.e = parseInt(E,16); + } + else + alert("Invalid RSA public key"); +} + +// Perform raw public operation on "x": return x^e (mod n) +function RSADoPublic(x) { + return x.modPowInt(this.e, this.n); +} + +// Return the PKCS#1 RSA encryption of "text" as an even-length hex string +function RSAEncrypt(text) { + var m = pkcs1pad2(text,(this.n.bitLength()+7)>>3); + if(m == null) return null; + var c = this.doPublic(m); + if(c == null) return null; + var h = c.toString(16); + if((h.length & 1) == 0) return h; else return "0" + h; +} + +// Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string +//function RSAEncryptB64(text) { +// var h = this.encrypt(text); +// if(h) return hex2b64(h); else return null; +//} + +// protected +RSAKey.prototype.doPublic = RSADoPublic; + +// public +RSAKey.prototype.setPublic = RSASetPublic; +RSAKey.prototype.encrypt = RSAEncrypt; +//RSAKey.prototype.encrypt_b64 = RSAEncryptB64; +// Depends on rsa.js and jsbn2.js + +// Undo PKCS#1 (type 2, random) padding and, if valid, return the plaintext +function pkcs1unpad2(d,n) { + var b = d.toByteArray(); + var i = 0; + while(i < b.length && b[i] == 0) ++i; + if(b.length-i != n-1 || b[i] != 2) + return null; + ++i; + while(b[i] != 0) + if(++i >= b.length) return null; + var ret = ""; + while(++i < b.length) + ret += String.fromCharCode(b[i]); + return ret; +} + +// Set the private key fields N, e, and d from hex strings +function RSASetPrivate(N,E,D) { + if(N != null && E != null && N.length > 0 && E.length > 0) { + this.n = parseBigInt(N,16); + this.e = parseInt(E,16); + this.d = parseBigInt(D,16); + } + else + alert("Invalid RSA private key"); +} + +// Set the private key fields N, e, d and CRT params from hex strings +function RSASetPrivateEx(N,E,D,P,Q,DP,DQ,C) { + if(N != null && E != null && N.length > 0 && E.length > 0) { + this.n = parseBigInt(N,16); + this.e = parseInt(E,16); + this.d = parseBigInt(D,16); + this.p = parseBigInt(P,16); + this.q = parseBigInt(Q,16); + this.dmp1 = parseBigInt(DP,16); + this.dmq1 = parseBigInt(DQ,16); + this.coeff = parseBigInt(C,16); + } + else + alert("Invalid RSA private key"); +} + +// Generate a new random private key B bits long, using public expt E +function RSAGenerate(B,E) { + var rng = new SecureRandom(); + var qs = B>>1; + this.e = parseInt(E,16); + var ee = new BigInteger(E,16); + for(;;) { + for(;;) { + this.p = new BigInteger(B-qs,1,rng); + if(this.p.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) break; + } + for(;;) { + this.q = new BigInteger(qs,1,rng); + if(this.q.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) break; + } + if(this.p.compareTo(this.q) <= 0) { + var t = this.p; + this.p = this.q; + this.q = t; + } + var p1 = this.p.subtract(BigInteger.ONE); + var q1 = this.q.subtract(BigInteger.ONE); + var phi = p1.multiply(q1); + if(phi.gcd(ee).compareTo(BigInteger.ONE) == 0) { + this.n = this.p.multiply(this.q); + this.d = ee.modInverse(phi); + this.dmp1 = this.d.mod(p1); + this.dmq1 = this.d.mod(q1); + this.coeff = this.q.modInverse(this.p); + break; + } + } +} + +// Perform raw private operation on "x": return x^d (mod n) +function RSADoPrivate(x) { + if(this.p == null || this.q == null) + return x.modPow(this.d, this.n); + + // TODO: re-calculate any missing CRT params + var xp = x.mod(this.p).modPow(this.dmp1, this.p); + var xq = x.mod(this.q).modPow(this.dmq1, this.q); + + while(xp.compareTo(xq) < 0) + xp = xp.add(this.p); + return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq); +} + +// Return the PKCS#1 RSA decryption of "ctext". +// "ctext" is an even-length hex string and the output is a plain string. +function RSADecrypt(ctext) { + var c = parseBigInt(ctext, 16); + var m = this.doPrivate(c); + if(m == null) return null; + return pkcs1unpad2(m, (this.n.bitLength()+7)>>3); +} + +// Return the PKCS#1 RSA decryption of "ctext". +// "ctext" is a Base64-encoded string and the output is a plain string. +//function RSAB64Decrypt(ctext) { +// var h = b64tohex(ctext); +// if(h) return this.decrypt(h); else return null; +//} + +// protected +RSAKey.prototype.doPrivate = RSADoPrivate; + +// public +RSAKey.prototype.setPrivate = RSASetPrivate; +RSAKey.prototype.setPrivateEx = RSASetPrivateEx; +RSAKey.prototype.generate = RSAGenerate; +RSAKey.prototype.decrypt = RSADecrypt; +//RSAKey.prototype.b64_decrypt = RSAB64Decrypt; + + +nValue="a5261939975948bb7a58dffe5ff54e65f0498f9175f5a09288810b8975871e99af3b5dd94057b0fc07535f5f97444504fa35169d461d0d30cf0192e307727c065168c788771c561a9400fb49175e9e6aa4e23fe11af69e9412dd23b0cb6684c4c2429bce139e848ab26d0829073351f4acd36074eafd036a5eb83359d2a698d3"; +eValue="10001"; +dValue="8e9912f6d3645894e8d38cb58c0db81ff516cf4c7e5a14c7f1eddb1459d2cded4d8d293fc97aee6aefb861859c8b6a3d1dfe710463e1f9ddc72048c09751971c4a580aa51eb523357a3cc48d31cfad1d4a165066ed92d4748fb6571211da5cb14bc11b6e2df7c1a559e6d5ac1cd5c94703a22891464fba23d0d965086277a161"; +pValue="d090ce58a92c75233a6486cb0a9209bf3583b64f540c76f5294bb97d285eed33aec220bde14b2417951178ac152ceab6da7090905b478195498b352048f15e7d"; +qValue="cab575dc652bb66df15a0359609d51d1db184750c00c6698b90ef3465c99655103edbf0d54c56aec0ce3c4d22592338092a126a0cc49f65a4a30d222b411e58f"; +dmp1Value="1a24bca8e273df2f0e47c199bbf678604e7df7215480c77c8db39f49b000ce2cf7500038acfff5433b7d582a01f1826e6f4d42e1c57f5e1fef7b12aabc59fd25"; +dmq1Value="3d06982efbbe47339e1f6d36b1216b8a741d410b0c662f54f7118b27b9a4ec9d914337eb39841d8666f3034408cf94f5b62f11c402fc994fe15a05493150d9fd"; +coeffValue="3a3e731acd8960b7ff9eb81a7ff93bd1cfa74cbd56987db58b4594fb09c09084db1734c8143f98b602b981aaa9243ca28deb69b5b280ee8dcee0fd2625e53250"; + +setupEngine(am3, 28); + +// So that v8 understands assertEq() +if (assertEq == undefined) +{ + function assertEq(to_check, expected) { + if ( to_check !== expected ) + { + print( "Error: Assertion failed: got \"" + to_check + "\", expected \"" + expected + "\"" ); + } + } +} + +function check_correctness(text, hash) { + var RSA = new RSAKey(); + RSA.setPublic(nValue, eValue); + RSA.setPrivateEx(nValue, eValue, dValue, pValue, qValue, dmp1Value, dmq1Value, coeffValue); + var encrypted = RSA.encrypt(text); + var decrypted = RSA.decrypt(encrypted); + assertEq( encrypted, hash ); + assertEq( decrypted, text ); +} + +// All 'correct' hashes here come from v8's javascript shell built off of tag 2.3.4 +check_correctness("Hello! I am some text.", "142b19b40fee712ab9468be296447d38c7dfe81a7850f11ae6aa21e49396a4e90bd6ba4aa385105e15960a59f95447dfad89671da6e08ed42229939583753be84d07558abb4feee4d46a92fd31d962679a1a5f4bf0fb7af414b9a756e18df7e6d1e96971cc66769f3b27d61ad932f2211373e0de388dc040557d4c3c3fe74320"); +check_correctness("PLEASE ENCRYPT ME. I AM TEXT. I AM DIEING TO BE ENCRYPTED. OH WHY WONT YOU ENCRYPT ME!?", "490c1fae87d7046296e4b34b357912a72cb7c38c0da3198f1ac3aad3489662ce02663ec5ea1be58ae73a275f3096b16c491f3520ebf822df6c65cc95e28be1cc0a4454dfba3fdd402c3a9de0db2f308989bfc1a7fada0dd680db76d24b2d96bd6b7e7d7e7f962deb953038bae06092f7bb9bcb40bba4ec92e040df32f98e035e"); +check_correctness("x","46c1b7cf202171b1b588e9ecf250e768dcf3b300490e859d508f708e702ef799bc496b9fac7634d60a82644653c5fd25b808393b234567116b8890d5f119c7c74dae7c97c8e40ba78ca2dc3e3d78ce859a7fa3815f42c27d0607eafc3940896abb6019cc28b2ff875531ed581a6351728a8df0d607b7c2c26265bf3dddbe4f84"); diff --git a/js/src/jit-test/tests/v8-v5/check-deltablue.js b/js/src/jit-test/tests/v8-v5/check-deltablue.js new file mode 100644 index 0000000000..ea12d39196 --- /dev/null +++ b/js/src/jit-test/tests/v8-v5/check-deltablue.js @@ -0,0 +1,883 @@ +// Copyright 2008 the V8 project authors. All rights reserved. +// Copyright 1996 John Maloney and Mario Wolczko. + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +// This implementation of the DeltaBlue benchmark is derived +// from the Smalltalk implementation by John Maloney and Mario +// Wolczko. Some parts have been translated directly, whereas +// others have been modified more aggresively to make it feel +// more like a JavaScript program. + + +//var DeltaBlue = new BenchmarkSuite('DeltaBlue', 71104, [ +// new Benchmark('DeltaBlue', deltaBlue) +//]); + + +/** + * A JavaScript implementation of the DeltaBlue constrain-solving + * algorithm, as described in: + * + * "The DeltaBlue Algorithm: An Incremental Constraint Hierarchy Solver" + * Bjorn N. Freeman-Benson and John Maloney + * January 1990 Communications of the ACM, + * also available as University of Washington TR 89-08-06. + * + * Beware: this benchmark is written in a grotesque style where + * the constraint model is built by side-effects from constructors. + * I've kept it this way to avoid deviating too much from the original + * implementation. + */ + +function alert(msg) { + print(msg); + assertEq(false, true); +} + +/* --- O b j e c t M o d e l --- */ + +Object.prototype.inheritsFrom = function (shuper) { + function Inheriter() { } + Inheriter.prototype = shuper.prototype; + this.prototype = new Inheriter(); + this.superConstructor = shuper; +} + +function OrderedCollection() { + this.elms = new Array(); +} + +OrderedCollection.prototype.add = function (elm) { + this.elms.push(elm); +} + +OrderedCollection.prototype.at = function (index) { + return this.elms[index]; +} + +OrderedCollection.prototype.size = function () { + return this.elms.length; +} + +OrderedCollection.prototype.removeFirst = function () { + return this.elms.pop(); +} + +OrderedCollection.prototype.remove = function (elm) { + var index = 0, skipped = 0; + for (var i = 0; i < this.elms.length; i++) { + var value = this.elms[i]; + if (value != elm) { + this.elms[index] = value; + index++; + } else { + skipped++; + } + } + for (var i = 0; i < skipped; i++) + this.elms.pop(); +} + +/* --- * + * S t r e n g t h + * --- */ + +/** + * Strengths are used to measure the relative importance of constraints. + * New strengths may be inserted in the strength hierarchy without + * disrupting current constraints. Strengths cannot be created outside + * this class, so pointer comparison can be used for value comparison. + */ +function Strength(strengthValue, name) { + this.strengthValue = strengthValue; + this.name = name; +} + +Strength.stronger = function (s1, s2) { + return s1.strengthValue < s2.strengthValue; +} + +Strength.weaker = function (s1, s2) { + return s1.strengthValue > s2.strengthValue; +} + +Strength.weakestOf = function (s1, s2) { + return this.weaker(s1, s2) ? s1 : s2; +} + +Strength.strongest = function (s1, s2) { + return this.stronger(s1, s2) ? s1 : s2; +} + +Strength.prototype.nextWeaker = function () { + switch (this.strengthValue) { + case 0: return Strength.WEAKEST; + case 1: return Strength.WEAK_DEFAULT; + case 2: return Strength.NORMAL; + case 3: return Strength.STRONG_DEFAULT; + case 4: return Strength.PREFERRED; + case 5: return Strength.REQUIRED; + } +} + +// Strength constants. +Strength.REQUIRED = new Strength(0, "required"); +Strength.STONG_PREFERRED = new Strength(1, "strongPreferred"); +Strength.PREFERRED = new Strength(2, "preferred"); +Strength.STRONG_DEFAULT = new Strength(3, "strongDefault"); +Strength.NORMAL = new Strength(4, "normal"); +Strength.WEAK_DEFAULT = new Strength(5, "weakDefault"); +Strength.WEAKEST = new Strength(6, "weakest"); + +/* --- * + * C o n s t r a i n t + * --- */ + +/** + * An abstract class representing a system-maintainable relationship + * (or "constraint") between a set of variables. A constraint supplies + * a strength instance variable; concrete subclasses provide a means + * of storing the constrained variables and other information required + * to represent a constraint. + */ +function Constraint(strength) { + this.strength = strength; +} + +/** + * Activate this constraint and attempt to satisfy it. + */ +Constraint.prototype.addConstraint = function () { + this.addToGraph(); + planner.incrementalAdd(this); +} + +/** + * Attempt to find a way to enforce this constraint. If successful, + * record the solution, perhaps modifying the current dataflow + * graph. Answer the constraint that this constraint overrides, if + * there is one, or nil, if there isn't. + * Assume: I am not already satisfied. + */ +Constraint.prototype.satisfy = function (mark) { + this.chooseMethod(mark); + if (!this.isSatisfied()) { + if (this.strength == Strength.REQUIRED) + alert("Could not satisfy a required constraint!"); + return null; + } + this.markInputs(mark); + var out = this.output(); + var overridden = out.determinedBy; + if (overridden != null) overridden.markUnsatisfied(); + out.determinedBy = this; + if (!planner.addPropagate(this, mark)) + alert("Cycle encountered"); + out.mark = mark; + return overridden; +} + +Constraint.prototype.destroyConstraint = function () { + if (this.isSatisfied()) planner.incrementalRemove(this); + else this.removeFromGraph(); +} + +/** + * Normal constraints are not input constraints. An input constraint + * is one that depends on external state, such as the mouse, the + * keybord, a clock, or some arbitraty piece of imperative code. + */ +Constraint.prototype.isInput = function () { + return false; +} + +/* --- * + * U n a r y C o n s t r a i n t + * --- */ + +/** + * Abstract superclass for constraints having a single possible output + * variable. + */ +function UnaryConstraint(v, strength) { + UnaryConstraint.superConstructor.call(this, strength); + this.myOutput = v; + this.satisfied = false; + this.addConstraint(); +} + +UnaryConstraint.inheritsFrom(Constraint); + +/** + * Adds this constraint to the constraint graph + */ +UnaryConstraint.prototype.addToGraph = function () { + this.myOutput.addConstraint(this); + this.satisfied = false; +} + +/** + * Decides if this constraint can be satisfied and records that + * decision. + */ +UnaryConstraint.prototype.chooseMethod = function (mark) { + this.satisfied = (this.myOutput.mark != mark) + && Strength.stronger(this.strength, this.myOutput.walkStrength); +} + +/** + * Returns true if this constraint is satisfied in the current solution. + */ +UnaryConstraint.prototype.isSatisfied = function () { + return this.satisfied; +} + +UnaryConstraint.prototype.markInputs = function (mark) { + // has no inputs +} + +/** + * Returns the current output variable. + */ +UnaryConstraint.prototype.output = function () { + return this.myOutput; +} + +/** + * Calculate the walkabout strength, the stay flag, and, if it is + * 'stay', the value for the current output of this constraint. Assume + * this constraint is satisfied. + */ +UnaryConstraint.prototype.recalculate = function () { + this.myOutput.walkStrength = this.strength; + this.myOutput.stay = !this.isInput(); + if (this.myOutput.stay) this.execute(); // Stay optimization +} + +/** + * Records that this constraint is unsatisfied + */ +UnaryConstraint.prototype.markUnsatisfied = function () { + this.satisfied = false; +} + +UnaryConstraint.prototype.inputsKnown = function () { + return true; +} + +UnaryConstraint.prototype.removeFromGraph = function () { + if (this.myOutput != null) this.myOutput.removeConstraint(this); + this.satisfied = false; +} + +/* --- * + * S t a y C o n s t r a i n t + * --- */ + +/** + * Variables that should, with some level of preference, stay the same. + * Planners may exploit the fact that instances, if satisfied, will not + * change their output during plan execution. This is called "stay + * optimization". + */ +function StayConstraint(v, str) { + StayConstraint.superConstructor.call(this, v, str); +} + +StayConstraint.inheritsFrom(UnaryConstraint); + +StayConstraint.prototype.execute = function () { + // Stay constraints do nothing +} + +/* --- * + * E d i t C o n s t r a i n t + * --- */ + +/** + * A unary input constraint used to mark a variable that the client + * wishes to change. + */ +function EditConstraint(v, str) { + EditConstraint.superConstructor.call(this, v, str); +} + +EditConstraint.inheritsFrom(UnaryConstraint); + +/** + * Edits indicate that a variable is to be changed by imperative code. + */ +EditConstraint.prototype.isInput = function () { + return true; +} + +EditConstraint.prototype.execute = function () { + // Edit constraints do nothing +} + +/* --- * + * B i n a r y C o n s t r a i n t + * --- */ + +var Direction = new Object(); +Direction.NONE = 0; +Direction.FORWARD = 1; +Direction.BACKWARD = -1; + +/** + * Abstract superclass for constraints having two possible output + * variables. + */ +function BinaryConstraint(var1, var2, strength) { + BinaryConstraint.superConstructor.call(this, strength); + this.v1 = var1; + this.v2 = var2; + this.direction = Direction.NONE; + this.addConstraint(); +} + +BinaryConstraint.inheritsFrom(Constraint); + +/** + * Decides if this constratint can be satisfied and which way it + * should flow based on the relative strength of the variables related, + * and record that decision. + */ +BinaryConstraint.prototype.chooseMethod = function (mark) { + if (this.v1.mark == mark) { + this.direction = (this.v1.mark != mark && Strength.stronger(this.strength, this.v2.walkStrength)) + ? Direction.FORWARD + : Direction.NONE; + } + if (this.v2.mark == mark) { + this.direction = (this.v1.mark != mark && Strength.stronger(this.strength, this.v1.walkStrength)) + ? Direction.BACKWARD + : Direction.NONE; + } + if (Strength.weaker(this.v1.walkStrength, this.v2.walkStrength)) { + this.direction = Strength.stronger(this.strength, this.v1.walkStrength) + ? Direction.BACKWARD + : Direction.NONE; + } else { + this.direction = Strength.stronger(this.strength, this.v2.walkStrength) + ? Direction.FORWARD + : Direction.BACKWARD + } +} + +/** + * Add this constraint to the constraint graph + */ +BinaryConstraint.prototype.addToGraph = function () { + this.v1.addConstraint(this); + this.v2.addConstraint(this); + this.direction = Direction.NONE; +} + +/** + * Answer true if this constraint is satisfied in the current solution. + */ +BinaryConstraint.prototype.isSatisfied = function () { + return this.direction != Direction.NONE; +} + +/** + * Mark the input variable with the given mark. + */ +BinaryConstraint.prototype.markInputs = function (mark) { + this.input().mark = mark; +} + +/** + * Returns the current input variable + */ +BinaryConstraint.prototype.input = function () { + return (this.direction == Direction.FORWARD) ? this.v1 : this.v2; +} + +/** + * Returns the current output variable + */ +BinaryConstraint.prototype.output = function () { + return (this.direction == Direction.FORWARD) ? this.v2 : this.v1; +} + +/** + * Calculate the walkabout strength, the stay flag, and, if it is + * 'stay', the value for the current output of this + * constraint. Assume this constraint is satisfied. + */ +BinaryConstraint.prototype.recalculate = function () { + var ihn = this.input(), out = this.output(); + out.walkStrength = Strength.weakestOf(this.strength, ihn.walkStrength); + out.stay = ihn.stay; + if (out.stay) this.execute(); +} + +/** + * Record the fact that this constraint is unsatisfied. + */ +BinaryConstraint.prototype.markUnsatisfied = function () { + this.direction = Direction.NONE; +} + +BinaryConstraint.prototype.inputsKnown = function (mark) { + var i = this.input(); + return i.mark == mark || i.stay || i.determinedBy == null; +} + +BinaryConstraint.prototype.removeFromGraph = function () { + if (this.v1 != null) this.v1.removeConstraint(this); + if (this.v2 != null) this.v2.removeConstraint(this); + this.direction = Direction.NONE; +} + +/* --- * + * S c a l e C o n s t r a i n t + * --- */ + +/** + * Relates two variables by the linear scaling relationship: "v2 = + * (v1 * scale) + offset". Either v1 or v2 may be changed to maintain + * this relationship but the scale factor and offset are considered + * read-only. + */ +function ScaleConstraint(src, scale, offset, dest, strength) { + this.direction = Direction.NONE; + this.scale = scale; + this.offset = offset; + ScaleConstraint.superConstructor.call(this, src, dest, strength); +} + +ScaleConstraint.inheritsFrom(BinaryConstraint); + +/** + * Adds this constraint to the constraint graph. + */ +ScaleConstraint.prototype.addToGraph = function () { + ScaleConstraint.superConstructor.prototype.addToGraph.call(this); + this.scale.addConstraint(this); + this.offset.addConstraint(this); +} + +ScaleConstraint.prototype.removeFromGraph = function () { + ScaleConstraint.superConstructor.prototype.removeFromGraph.call(this); + if (this.scale != null) this.scale.removeConstraint(this); + if (this.offset != null) this.offset.removeConstraint(this); +} + +ScaleConstraint.prototype.markInputs = function (mark) { + ScaleConstraint.superConstructor.prototype.markInputs.call(this, mark); + this.scale.mark = this.offset.mark = mark; +} + +/** + * Enforce this constraint. Assume that it is satisfied. + */ +ScaleConstraint.prototype.execute = function () { + if (this.direction == Direction.FORWARD) { + this.v2.value = this.v1.value * this.scale.value + this.offset.value; + } else { + this.v1.value = (this.v2.value - this.offset.value) / this.scale.value; + } +} + +/** + * Calculate the walkabout strength, the stay flag, and, if it is + * 'stay', the value for the current output of this constraint. Assume + * this constraint is satisfied. + */ +ScaleConstraint.prototype.recalculate = function () { + var ihn = this.input(), out = this.output(); + out.walkStrength = Strength.weakestOf(this.strength, ihn.walkStrength); + out.stay = ihn.stay && this.scale.stay && this.offset.stay; + if (out.stay) this.execute(); +} + +/* --- * + * E q u a l i t y C o n s t r a i n t + * --- */ + +/** + * Constrains two variables to have the same value. + */ +function EqualityConstraint(var1, var2, strength) { + EqualityConstraint.superConstructor.call(this, var1, var2, strength); +} + +EqualityConstraint.inheritsFrom(BinaryConstraint); + +/** + * Enforce this constraint. Assume that it is satisfied. + */ +EqualityConstraint.prototype.execute = function () { + this.output().value = this.input().value; +} + +/* --- * + * V a r i a b l e + * --- */ + +/** + * A constrained variable. In addition to its value, it maintain the + * structure of the constraint graph, the current dataflow graph, and + * various parameters of interest to the DeltaBlue incremental + * constraint solver. + **/ +function Variable(name, initialValue) { + this.value = initialValue || 0; + this.constraints = new OrderedCollection(); + this.determinedBy = null; + this.mark = 0; + this.walkStrength = Strength.WEAKEST; + this.stay = true; + this.name = name; +} + +/** + * Add the given constraint to the set of all constraints that refer + * this variable. + */ +Variable.prototype.addConstraint = function (c) { + this.constraints.add(c); +} + +/** + * Removes all traces of c from this variable. + */ +Variable.prototype.removeConstraint = function (c) { + this.constraints.remove(c); + if (this.determinedBy == c) this.determinedBy = null; +} + +/* --- * + * P l a n n e r + * --- */ + +/** + * The DeltaBlue planner + */ +function Planner() { + this.currentMark = 0; +} + +/** + * Attempt to satisfy the given constraint and, if successful, + * incrementally update the dataflow graph. Details: If satifying + * the constraint is successful, it may override a weaker constraint + * on its output. The algorithm attempts to resatisfy that + * constraint using some other method. This process is repeated + * until either a) it reaches a variable that was not previously + * determined by any constraint or b) it reaches a constraint that + * is too weak to be satisfied using any of its methods. The + * variables of constraints that have been processed are marked with + * a unique mark value so that we know where we've been. This allows + * the algorithm to avoid getting into an infinite loop even if the + * constraint graph has an inadvertent cycle. + */ +Planner.prototype.incrementalAdd = function (c) { + var mark = this.newMark(); + var overridden = c.satisfy(mark); + while (overridden != null) + overridden = overridden.satisfy(mark); +} + +/** + * Entry point for retracting a constraint. Remove the given + * constraint and incrementally update the dataflow graph. + * Details: Retracting the given constraint may allow some currently + * unsatisfiable downstream constraint to be satisfied. We therefore collect + * a list of unsatisfied downstream constraints and attempt to + * satisfy each one in turn. This list is traversed by constraint + * strength, strongest first, as a heuristic for avoiding + * unnecessarily adding and then overriding weak constraints. + * Assume: c is satisfied. + */ +Planner.prototype.incrementalRemove = function (c) { + var out = c.output(); + c.markUnsatisfied(); + c.removeFromGraph(); + var unsatisfied = this.removePropagateFrom(out); + var strength = Strength.REQUIRED; + do { + for (var i = 0; i < unsatisfied.size(); i++) { + var u = unsatisfied.at(i); + if (u.strength == strength) + this.incrementalAdd(u); + } + strength = strength.nextWeaker(); + } while (strength != Strength.WEAKEST); +} + +/** + * Select a previously unused mark value. + */ +Planner.prototype.newMark = function () { + return ++this.currentMark; +} + +/** + * Extract a plan for resatisfaction starting from the given source + * constraints, usually a set of input constraints. This method + * assumes that stay optimization is desired; the plan will contain + * only constraints whose output variables are not stay. Constraints + * that do no computation, such as stay and edit constraints, are + * not included in the plan. + * Details: The outputs of a constraint are marked when it is added + * to the plan under construction. A constraint may be appended to + * the plan when all its input variables are known. A variable is + * known if either a) the variable is marked (indicating that has + * been computed by a constraint appearing earlier in the plan), b) + * the variable is 'stay' (i.e. it is a constant at plan execution + * time), or c) the variable is not determined by any + * constraint. The last provision is for past states of history + * variables, which are not stay but which are also not computed by + * any constraint. + * Assume: sources are all satisfied. + */ +Planner.prototype.makePlan = function (sources) { + var mark = this.newMark(); + var plan = new Plan(); + var todo = sources; + while (todo.size() > 0) { + var c = todo.removeFirst(); + if (c.output().mark != mark && c.inputsKnown(mark)) { + plan.addConstraint(c); + c.output().mark = mark; + this.addConstraintsConsumingTo(c.output(), todo); + } + } + return plan; +} + +/** + * Extract a plan for resatisfying starting from the output of the + * given constraints, usually a set of input constraints. + */ +Planner.prototype.extractPlanFromConstraints = function (constraints) { + var sources = new OrderedCollection(); + for (var i = 0; i < constraints.size(); i++) { + var c = constraints.at(i); + if (c.isInput() && c.isSatisfied()) + // not in plan already and eligible for inclusion + sources.add(c); + } + return this.makePlan(sources); +} + +/** + * Recompute the walkabout strengths and stay flags of all variables + * downstream of the given constraint and recompute the actual + * values of all variables whose stay flag is true. If a cycle is + * detected, remove the given constraint and answer + * false. Otherwise, answer true. + * Details: Cycles are detected when a marked variable is + * encountered downstream of the given constraint. The sender is + * assumed to have marked the inputs of the given constraint with + * the given mark. Thus, encountering a marked node downstream of + * the output constraint means that there is a path from the + * constraint's output to one of its inputs. + */ +Planner.prototype.addPropagate = function (c, mark) { + var todo = new OrderedCollection(); + todo.add(c); + while (todo.size() > 0) { + var d = todo.removeFirst(); + if (d.output().mark == mark) { + this.incrementalRemove(c); + return false; + } + d.recalculate(); + this.addConstraintsConsumingTo(d.output(), todo); + } + return true; +} + + +/** + * Update the walkabout strengths and stay flags of all variables + * downstream of the given constraint. Answer a collection of + * unsatisfied constraints sorted in order of decreasing strength. + */ +Planner.prototype.removePropagateFrom = function (out) { + out.determinedBy = null; + out.walkStrength = Strength.WEAKEST; + out.stay = true; + var unsatisfied = new OrderedCollection(); + var todo = new OrderedCollection(); + todo.add(out); + while (todo.size() > 0) { + var v = todo.removeFirst(); + for (var i = 0; i < v.constraints.size(); i++) { + var c = v.constraints.at(i); + if (!c.isSatisfied()) + unsatisfied.add(c); + } + var determining = v.determinedBy; + for (var i = 0; i < v.constraints.size(); i++) { + var next = v.constraints.at(i); + if (next != determining && next.isSatisfied()) { + next.recalculate(); + todo.add(next.output()); + } + } + } + return unsatisfied; +} + +Planner.prototype.addConstraintsConsumingTo = function (v, coll) { + var determining = v.determinedBy; + var cc = v.constraints; + for (var i = 0; i < cc.size(); i++) { + var c = cc.at(i); + if (c != determining && c.isSatisfied()) + coll.add(c); + } +} + +/* --- * + * P l a n + * --- */ + +/** + * A Plan is an ordered list of constraints to be executed in sequence + * to resatisfy all currently satisfiable constraints in the face of + * one or more changing inputs. + */ +function Plan() { + this.v = new OrderedCollection(); +} + +Plan.prototype.addConstraint = function (c) { + this.v.add(c); +} + +Plan.prototype.size = function () { + return this.v.size(); +} + +Plan.prototype.constraintAt = function (index) { + return this.v.at(index); +} + +Plan.prototype.execute = function () { + for (var i = 0; i < this.size(); i++) { + var c = this.constraintAt(i); + c.execute(); + } +} + +/* --- * + * M a i n + * --- */ + +/** + * This is the standard DeltaBlue benchmark. A long chain of equality + * constraints is constructed with a stay constraint on one end. An + * edit constraint is then added to the opposite end and the time is + * measured for adding and removing this constraint, and extracting + * and executing a constraint satisfaction plan. There are two cases. + * In case 1, the added constraint is stronger than the stay + * constraint and values must propagate down the entire length of the + * chain. In case 2, the added constraint is weaker than the stay + * constraint so it cannot be accomodated. The cost in this case is, + * of course, very low. Typical situations lie somewhere between these + * two extremes. + */ +function chainTest(n) { + planner = new Planner(); + var prev = null, first = null, last = null; + + // Build chain of n equality constraints + for (var i = 0; i <= n; i++) { + var name = "v" + i; + var v = new Variable(name); + if (prev != null) + new EqualityConstraint(prev, v, Strength.REQUIRED); + if (i == 0) first = v; + if (i == n) last = v; + prev = v; + } + + new StayConstraint(last, Strength.STRONG_DEFAULT); + var edit = new EditConstraint(first, Strength.PREFERRED); + var edits = new OrderedCollection(); + edits.add(edit); + var plan = planner.extractPlanFromConstraints(edits); + for (var i = 0; i < 100; i++) { + first.value = i; + plan.execute(); + assertEq(last.value, i); + } +} + +/** + * This test constructs a two sets of variables related to each + * other by a simple linear transformation (scale and offset). The + * time is measured to change a variable on either side of the + * mapping and to change the scale and offset factors. + */ +function projectionTest(n) { + planner = new Planner(); + var scale = new Variable("scale", 10); + var offset = new Variable("offset", 1000); + var src = null, dst = null; + + var dests = new OrderedCollection(); + for (var i = 0; i < n; i++) { + src = new Variable("src" + i, i); + dst = new Variable("dst" + i, i); + dests.add(dst); + new StayConstraint(src, Strength.NORMAL); + new ScaleConstraint(src, scale, offset, dst, Strength.REQUIRED); + } + + change(src, 17); + assertEq(dst.value, 1170); + change(dst, 1050); + assertEq(src.value, 5); + change(scale, 5); + for (var i = 0; i < n - 1; i++) { + assertEq(dests.at(i).value, i * 5 + 1000); + } + change(offset, 2000); + for (var i = 0; i < n - 1; i++) { + assertEq(dests.at(i).value, i * 5 + 2000); + } +} + +function change(v, newValue) { + var edit = new EditConstraint(v, Strength.PREFERRED); + var edits = new OrderedCollection(); + edits.add(edit); + var plan = planner.extractPlanFromConstraints(edits); + for (var i = 0; i < 10; i++) { + v.value = newValue; + plan.execute(); + } + edit.destroyConstraint(); +} + +// Global variable holding the current planner. +var planner = null; + +function deltaBlue() { + chainTest(100); + projectionTest(100); +} + +deltaBlue(); diff --git a/js/src/jit-test/tests/v8-v5/check-earley-boyer.js b/js/src/jit-test/tests/v8-v5/check-earley-boyer.js new file mode 100644 index 0000000000..1e46f5eeef --- /dev/null +++ b/js/src/jit-test/tests/v8-v5/check-earley-boyer.js @@ -0,0 +1,4696 @@ +// |jit-test| skip-if: getBuildConfiguration("wasi") +// +// This file is automatically generated by scheme2js, except for the +// benchmark harness code at the beginning and end of the file. + +//var EarleyBoyer = new BenchmarkSuite('EarleyBoyer', 765819, [ +// new Benchmark("Earley", function () { BgL_earleyzd2benchmarkzd2(); }), +// new Benchmark("Boyer", function () { BgL_nboyerzd2benchmarkzd2(); }) +//]); + + +/************* GENERATED FILE - DO NOT EDIT *************/ +/************* GENERATED FILE - DO NOT EDIT *************/ +/************* GENERATED FILE - DO NOT EDIT *************/ +/************* GENERATED FILE - DO NOT EDIT *************/ +/************* GENERATED FILE - DO NOT EDIT *************/ +/************* GENERATED FILE - DO NOT EDIT *************/ +/************* GENERATED FILE - DO NOT EDIT *************/ +/************* GENERATED FILE - DO NOT EDIT *************/ +/* + * To use write/prints/... the default-output port has to be set first. + * Simply setting SC_DEFAULT_OUT and SC_ERROR_OUT to the desired values + * should do the trick. + * In the following example the std-out and error-port are redirected to + * a DIV. +function initRuntime() { + function escapeHTML(s) { + var tmp = s; + tmp = tmp.replace(/&/g, "&"); + tmp = tmp.replace(//g, ">"); + tmp = tmp.replace(/ /g, " "); + tmp = tmp.replace(/\n/g, "
"); + tmp = tmp.replace(/\t/g, "    "); + return tmp; + + } + + document.write("
"); + SC_DEFAULT_OUT = new sc_GenericOutputPort( + function(s) { + var stdout = document.getElementById('stdout'); + stdout.innerHTML = stdout.innerHTML + escapeHTML(s); + }); + SC_ERROR_OUT = SC_DEFAULT_OUT; +} +*/ + + +function sc_print_debug() { + sc_print.apply(null, arguments); +} +/*** META ((export *js*)) */ +var sc_JS_GLOBALS = this; + +var __sc_LINE=-1; +var __sc_FILE=""; + +/*** META ((export #t)) */ +function sc_alert() { + var len = arguments.length; + var s = ""; + var i; + + for( i = 0; i < len; i++ ) { + s += sc_toDisplayString(arguments[ i ]); + } + + return alert( s ); +} + +/*** META ((export #t)) */ +function sc_typeof( x ) { + return typeof x; +} + +/*** META ((export #t)) */ +function sc_error() { + var a = [sc_jsstring2symbol("*error*")]; + for (var i = 0; i < arguments.length; i++) { + a[i+1] = arguments[i]; + } + throw a; +} + +/*** META ((export #t) + (peephole (prefix "throw "))) +*/ +function sc_raise(obj) { + throw obj; +} + +/*** META ((export with-handler-lambda)) */ +function sc_withHandlerLambda(handler, body) { + try { + return body(); + } catch(e) { + if (!e._internalException) + return handler(e); + else + throw e; + } +} + +var sc_properties = new Object(); + +/*** META ((export #t)) */ +function sc_putpropBang(sym, key, val) { + var ht = sc_properties[sym]; + if (!ht) { + ht = new Object(); + sc_properties[sym] = ht; + } + ht[key] = val; +} + +/*** META ((export #t)) */ +function sc_getprop(sym, key) { + var ht = sc_properties[sym]; + if (ht) { + if (key in ht) + return ht[key]; + else + return false; + } else + return false; +} + +/*** META ((export #t)) */ +function sc_rempropBang(sym, key) { + var ht = sc_properties[sym]; + if (ht) + delete ht[key]; +} + +/*** META ((export #t)) */ +function sc_any2String(o) { + return jsstring2string(sc_toDisplayString(o)); +} + +/*** META ((export #t) + (peephole (infix 2 2 "===")) + (type bool)) +*/ +function sc_isEqv(o1, o2) { + return (o1 === o2); +} + +/*** META ((export #t) + (peephole (infix 2 2 "===")) + (type bool)) +*/ +function sc_isEq(o1, o2) { + return (o1 === o2); +} + +/*** META ((export #t) + (type bool)) +*/ +function sc_isNumber(n) { + return (typeof n === "number"); +} + +/*** META ((export #t) + (type bool)) +*/ +function sc_isComplex(n) { + return sc_isNumber(n); +} + +/*** META ((export #t) + (type bool)) +*/ +function sc_isReal(n) { + return sc_isNumber(n); +} + +/*** META ((export #t) + (type bool)) +*/ +function sc_isRational(n) { + return sc_isReal(n); +} + +/*** META ((export #t) + (type bool)) +*/ +function sc_isInteger(n) { + return (parseInt(n) === n); +} + +/*** META ((export #t) + (type bool) + (peephole (postfix ", false"))) +*/ +// we don't have exact numbers... +function sc_isExact(n) { + return false; +} + +/*** META ((export #t) + (peephole (postfix ", true")) + (type bool)) +*/ +function sc_isInexact(n) { + return true; +} + +/*** META ((export = =fx =fl) + (type bool) + (peephole (infix 2 2 "==="))) +*/ +function sc_equal(x) { + for (var i = 1; i < arguments.length; i++) + if (x !== arguments[i]) + return false; + return true; +} + +/*** META ((export < = arguments[i]) + return false; + x = arguments[i]; + } + return true; +} + +/*** META ((export > >fx >fl) + (type bool) + (peephole (infix 2 2 ">"))) +*/ +function sc_greater(x, y) { + for (var i = 1; i < arguments.length; i++) { + if (x <= arguments[i]) + return false; + x = arguments[i]; + } + return true; +} + +/*** META ((export <= <=fx <=fl) + (type bool) + (peephole (infix 2 2 "<="))) +*/ +function sc_lessEqual(x, y) { + for (var i = 1; i < arguments.length; i++) { + if (x > arguments[i]) + return false; + x = arguments[i]; + } + return true; +} + +/*** META ((export >= >=fl >=fx) + (type bool) + (peephole (infix 2 2 ">="))) +*/ +function sc_greaterEqual(x, y) { + for (var i = 1; i < arguments.length; i++) { + if (x < arguments[i]) + return false; + x = arguments[i]; + } + return true; +} + +/*** META ((export #t) + (type bool) + (peephole (postfix "=== 0"))) +*/ +function sc_isZero(x) { + return (x === 0); +} + +/*** META ((export #t) + (type bool) + (peephole (postfix "> 0"))) +*/ +function sc_isPositive(x) { + return (x > 0); +} + +/*** META ((export #t) + (type bool) + (peephole (postfix "< 0"))) +*/ +function sc_isNegative(x) { + return (x < 0); +} + +/*** META ((export #t) + (type bool) + (peephole (postfix "%2===1"))) +*/ +function sc_isOdd(x) { + return (x % 2 === 1); +} + +/*** META ((export #t) + (type bool) + (peephole (postfix "%2===0"))) +*/ +function sc_isEven(x) { + return (x % 2 === 0); +} + +/*** META ((export #t)) */ +var sc_max = Math.max; +/*** META ((export #t)) */ +var sc_min = Math.min; + +/*** META ((export + +fx +fl) + (peephole (infix 0 #f "+" "0"))) +*/ +function sc_plus() { + var sum = 0; + for (var i = 0; i < arguments.length; i++) + sum += arguments[i]; + return sum; +} + +/*** META ((export * *fx *fl) + (peephole (infix 0 #f "*" "1"))) +*/ +function sc_multi() { + var product = 1; + for (var i = 0; i < arguments.length; i++) + product *= arguments[i]; + return product; +} + +/*** META ((export - -fx -fl) + (peephole (minus))) +*/ +function sc_minus(x) { + if (arguments.length === 1) + return -x; + else { + var res = x; + for (var i = 1; i < arguments.length; i++) + res -= arguments[i]; + return res; + } +} + +/*** META ((export / /fl) + (peephole (div))) +*/ +function sc_div(x) { + if (arguments.length === 1) + return 1/x; + else { + var res = x; + for (var i = 1; i < arguments.length; i++) + res /= arguments[i]; + return res; + } +} + +/*** META ((export #t)) */ +var sc_abs = Math.abs; + +/*** META ((export quotient /fx) + (peephole (hole 2 "parseInt(" x "/" y ")"))) +*/ +function sc_quotient(x, y) { + return parseInt(x / y); +} + +/*** META ((export #t) + (peephole (infix 2 2 "%"))) +*/ +function sc_remainder(x, y) { + return x % y; +} + +/*** META ((export #t) + (peephole (modulo))) +*/ +function sc_modulo(x, y) { + var remainder = x % y; + // if they don't have the same sign + if ((remainder * y) < 0) + return remainder + y; + else + return remainder; +} + +function sc_euclid_gcd(a, b) { + var temp; + if (a === 0) return b; + if (b === 0) return a; + if (a < 0) {a = -a;}; + if (b < 0) {b = -b;}; + if (b > a) {temp = a; a = b; b = temp;}; + while (true) { + a %= b; + if(a === 0) {return b;}; + b %= a; + if(b === 0) {return a;}; + }; + return b; +} + +/*** META ((export #t)) */ +function sc_gcd() { + var gcd = 0; + for (var i = 0; i < arguments.length; i++) + gcd = sc_euclid_gcd(gcd, arguments[i]); + return gcd; +} + +/*** META ((export #t)) */ +function sc_lcm() { + var lcm = 1; + for (var i = 0; i < arguments.length; i++) { + var f = Math.round(arguments[i] / sc_euclid_gcd(arguments[i], lcm)); + lcm *= Math.abs(f); + } + return lcm; +} + +// LIMITATION: numerator and denominator don't make sense in floating point world. +//var SC_MAX_DECIMALS = 1000000 +// +// function sc_numerator(x) { +// var rounded = Math.round(x * SC_MAX_DECIMALS); +// return Math.round(rounded / sc_euclid_gcd(rounded, SC_MAX_DECIMALS)); +// } + +// function sc_denominator(x) { +// var rounded = Math.round(x * SC_MAX_DECIMALS); +// return Math.round(SC_MAX_DECIMALS / sc_euclid_gcd(rounded, SC_MAX_DECIMALS)); +// } + +/*** META ((export #t)) */ +var sc_floor = Math.floor; +/*** META ((export #t)) */ +var sc_ceiling = Math.ceil; +/*** META ((export #t)) */ +var sc_truncate = parseInt; +/*** META ((export #t)) */ +var sc_round = Math.round; + +// LIMITATION: sc_rationalize doesn't make sense in a floating point world. + +/*** META ((export #t)) */ +var sc_exp = Math.exp; +/*** META ((export #t)) */ +var sc_log = Math.log; +/*** META ((export #t)) */ +var sc_sin = Math.sin; +/*** META ((export #t)) */ +var sc_cos = Math.cos; +/*** META ((export #t)) */ +var sc_tan = Math.tan; +/*** META ((export #t)) */ +var sc_asin = Math.asin; +/*** META ((export #t)) */ +var sc_acos = Math.acos; +/*** META ((export #t)) */ +var sc_atan = Math.atan; + +/*** META ((export #t)) */ +var sc_sqrt = Math.sqrt; +/*** META ((export #t)) */ +var sc_expt = Math.pow; + +// LIMITATION: we don't have complex numbers. +// LIMITATION: the following functions are hence not implemented. +// LIMITATION: make-rectangular, make-polar, real-part, imag-part, magnitude, angle +// LIMITATION: 2 argument atan + +/*** META ((export #t) + (peephole (id))) +*/ +function sc_exact2inexact(x) { + return x; +} + +/*** META ((export #t) + (peephole (id))) +*/ +function sc_inexact2exact(x) { + return x; +} + +function sc_number2jsstring(x, radix) { + if (radix) + return x.toString(radix); + else + return x.toString(); +} + +function sc_jsstring2number(s, radix) { + if (s === "") return false; + + if (radix) { + var t = parseInt(s, radix); + if (!t && t !== 0) return false; + // verify that each char is in range. (parseInt ignores leading + // white and trailing chars) + var allowedChars = "01234567890abcdefghijklmnopqrstuvwxyz".substring(0, radix+1); + if ((new RegExp("^["+allowedChars+"]*$", "i")).test(s)) + return t; + else return false; + } else { + var t = +s; // does not ignore trailing chars. + if (!t && t !== 0) return false; + // simply verify that first char is not whitespace. + var c = s.charAt(0); + // if +c is 0, but the char is not "0", then we have a whitespace. + if (+c === 0 && c !== "0") return false; + return t; + } +} + +/*** META ((export #t) + (type bool) + (peephole (not))) +*/ +function sc_not(b) { + return b === false; +} + +/*** META ((export #t) + (type bool)) +*/ +function sc_isBoolean(b) { + return (b === true) || (b === false); +} + +function sc_Pair(car, cdr) { + this.car = car; + this.cdr = cdr; +} + +sc_Pair.prototype.toString = function() { + return sc_toDisplayString(this); +}; +sc_Pair.prototype.sc_toWriteOrDisplayString = function(writeOrDisplay) { + var current = this; + + var res = "("; + + while(true) { + res += writeOrDisplay(current.car); + if (sc_isPair(current.cdr)) { + res += " "; + current = current.cdr; + } else if (current.cdr !== null) { + res += " . " + writeOrDisplay(current.cdr); + break; + } else // current.cdr == null + break; + } + + res += ")"; + + return res; +}; +sc_Pair.prototype.sc_toDisplayString = function() { + return this.sc_toWriteOrDisplayString(sc_toDisplayString); +}; +sc_Pair.prototype.sc_toWriteString = function() { + return this.sc_toWriteOrDisplayString(sc_toWriteString); +}; +// sc_Pair.prototype.sc_toWriteCircleString in IO.js + +/*** META ((export #t) + (type bool) + (peephole (postfix " instanceof sc_Pair"))) +*/ +function sc_isPair(p) { + return (p instanceof sc_Pair); +} + +function sc_isPairEqual(p1, p2, comp) { + return (comp(p1.car, p2.car) && comp(p1.cdr, p2.cdr)); +} + +/*** META ((export #t) + (peephole (hole 2 "new sc_Pair(" car ", " cdr ")"))) +*/ +function sc_cons(car, cdr) { + return new sc_Pair(car, cdr); +} + +/*** META ((export cons*)) */ +function sc_consStar() { + var res = arguments[arguments.length - 1]; + for (var i = arguments.length-2; i >= 0; i--) + res = new sc_Pair(arguments[i], res); + return res; +} + +/*** META ((export #t) + (peephole (postfix ".car"))) +*/ +function sc_car(p) { + return p.car; +} + +/*** META ((export #t) + (peephole (postfix ".cdr"))) +*/ +function sc_cdr(p) { + return p.cdr; +} + +/*** META ((export #t) + (peephole (hole 2 p ".car = " val))) +*/ +function sc_setCarBang(p, val) { + p.car = val; +} + +/*** META ((export #t) + (peephole (hole 2 p ".cdr = " val))) +*/ +function sc_setCdrBang(p, val) { + p.cdr = val; +} + +/*** META ((export #t) + (peephole (postfix ".car.car"))) +*/ +function sc_caar(p) { return p.car.car; } +/*** META ((export #t) + (peephole (postfix ".cdr.car"))) +*/ +function sc_cadr(p) { return p.cdr.car; } +/*** META ((export #t) + (peephole (postfix ".car.cdr"))) +*/ +function sc_cdar(p) { return p.car.cdr; } +/*** META ((export #t) + (peephole (postfix ".cdr.cdr"))) +*/ +function sc_cddr(p) { return p.cdr.cdr; } +/*** META ((export #t) + (peephole (postfix ".car.car.car"))) +*/ +function sc_caaar(p) { return p.car.car.car; } +/*** META ((export #t) + (peephole (postfix ".car.cdr.car"))) +*/ +function sc_cadar(p) { return p.car.cdr.car; } +/*** META ((export #t) + (peephole (postfix ".cdr.car.car"))) +*/ +function sc_caadr(p) { return p.cdr.car.car; } +/*** META ((export #t) + (peephole (postfix ".cdr.cdr.car"))) +*/ +function sc_caddr(p) { return p.cdr.cdr.car; } +/*** META ((export #t) + (peephole (postfix ".car.car.cdr"))) +*/ +function sc_cdaar(p) { return p.car.car.cdr; } +/*** META ((export #t) + (peephole (postfix ".cdr.car.cdr"))) +*/ +function sc_cdadr(p) { return p.cdr.car.cdr; } +/*** META ((export #t) + (peephole (postfix ".car.cdr.cdr"))) +*/ +function sc_cddar(p) { return p.car.cdr.cdr; } +/*** META ((export #t) + (peephole (postfix ".cdr.cdr.cdr"))) +*/ +function sc_cdddr(p) { return p.cdr.cdr.cdr; } +/*** META ((export #t) + (peephole (postfix ".car.car.car.car"))) +*/ +function sc_caaaar(p) { return p.car.car.car.car; } +/*** META ((export #t) + (peephole (postfix ".car.cdr.car.car"))) +*/ +function sc_caadar(p) { return p.car.cdr.car.car; } +/*** META ((export #t) + (peephole (postfix ".cdr.car.car.car"))) +*/ +function sc_caaadr(p) { return p.cdr.car.car.car; } +/*** META ((export #t) + (peephole (postfix ".cdr.cdr.car.car"))) +*/ +function sc_caaddr(p) { return p.cdr.cdr.car.car; } +/*** META ((export #t) + (peephole (postfix ".car.car.car.cdr"))) +*/ +function sc_cdaaar(p) { return p.car.car.car.cdr; } +/*** META ((export #t) + (peephole (postfix ".car.cdr.car.cdr"))) +*/ +function sc_cdadar(p) { return p.car.cdr.car.cdr; } +/*** META ((export #t) + (peephole (postfix ".cdr.car.car.cdr"))) +*/ +function sc_cdaadr(p) { return p.cdr.car.car.cdr; } +/*** META ((export #t) + (peephole (postfix ".cdr.cdr.car.cdr"))) +*/ +function sc_cdaddr(p) { return p.cdr.cdr.car.cdr; } +/*** META ((export #t) + (peephole (postfix ".car.car.cdr.car"))) +*/ +function sc_cadaar(p) { return p.car.car.cdr.car; } +/*** META ((export #t) + (peephole (postfix ".car.cdr.cdr.car"))) +*/ +function sc_caddar(p) { return p.car.cdr.cdr.car; } +/*** META ((export #t) + (peephole (postfix ".cdr.car.cdr.car"))) +*/ +function sc_cadadr(p) { return p.cdr.car.cdr.car; } +/*** META ((export #t) + (peephole (postfix ".cdr.cdr.cdr.car"))) +*/ +function sc_cadddr(p) { return p.cdr.cdr.cdr.car; } +/*** META ((export #t) + (peephole (postfix ".car.car.cdr.cdr"))) +*/ +function sc_cddaar(p) { return p.car.car.cdr.cdr; } +/*** META ((export #t) + (peephole (postfix ".car.cdr.cdr.cdr"))) +*/ +function sc_cdddar(p) { return p.car.cdr.cdr.cdr; } +/*** META ((export #t) + (peephole (postfix ".cdr.car.cdr.cdr"))) +*/ +function sc_cddadr(p) { return p.cdr.car.cdr.cdr; } +/*** META ((export #t) + (peephole (postfix ".cdr.cdr.cdr.cdr"))) +*/ +function sc_cddddr(p) { return p.cdr.cdr.cdr.cdr; } + +/*** META ((export #t)) */ +function sc_lastPair(l) { + if (!sc_isPair(l)) sc_error("sc_lastPair: pair expected"); + var res = l; + var cdr = l.cdr; + while (sc_isPair(cdr)) { + res = cdr; + cdr = res.cdr; + } + return res; +} + +/*** META ((export #t) + (type bool) + (peephole (postfix " === null"))) +*/ +function sc_isNull(o) { + return (o === null); +} + +/*** META ((export #t) + (type bool)) +*/ +function sc_isList(o) { + var rabbit; + var turtle; + + var rabbit = o; + var turtle = o; + while (true) { + if (rabbit === null || + (rabbit instanceof sc_Pair && rabbit.cdr === null)) + return true; // end of list + else if ((rabbit instanceof sc_Pair) && + (rabbit.cdr instanceof sc_Pair)) { + rabbit = rabbit.cdr.cdr; + turtle = turtle.cdr; + if (rabbit === turtle) return false; // cycle + } else + return false; // not pair + } +} + +/*** META ((export #t)) */ +function sc_list() { + var res = null; + var a = arguments; + for (var i = a.length-1; i >= 0; i--) + res = new sc_Pair(a[i], res); + return res; +} + +/*** META ((export #t)) */ +function sc_iota(num, init) { + var res = null; + if (!init) init = 0; + for (var i = num - 1; i >= 0; i--) + res = new sc_Pair(i + init, res); + return res; +} + +/*** META ((export #t)) */ +function sc_makeList(nbEls, fill) { + var res = null; + for (var i = 0; i < nbEls; i++) + res = new sc_Pair(fill, res); + return res; +} + +/*** META ((export #t)) */ +function sc_length(l) { + var res = 0; + while (l !== null) { + res++; + l = l.cdr; + } + return res; +} + +/*** META ((export #t)) */ +function sc_remq(o, l) { + var dummy = { cdr : null }; + var tail = dummy; + while (l !== null) { + if (l.car !== o) { + tail.cdr = sc_cons(l.car, null); + tail = tail.cdr; + } + l = l.cdr; + } + return dummy.cdr; +} + +/*** META ((export #t)) */ +function sc_remqBang(o, l) { + var dummy = { cdr : null }; + var tail = dummy; + var needsAssig = true; + while (l !== null) { + if (l.car === o) { + needsAssig = true; + } else { + if (needsAssig) { + tail.cdr = l; + needsAssig = false; + } + tail = l; + } + l = l.cdr; + } + tail.cdr = null; + return dummy.cdr; +} + +/*** META ((export #t)) */ +function sc_delete(o, l) { + var dummy = { cdr : null }; + var tail = dummy; + while (l !== null) { + if (!sc_isEqual(l.car, o)) { + tail.cdr = sc_cons(l.car, null); + tail = tail.cdr; + } + l = l.cdr; + } + return dummy.cdr; +} + +/*** META ((export #t)) */ +function sc_deleteBang(o, l) { + var dummy = { cdr : null }; + var tail = dummy; + var needsAssig = true; + while (l !== null) { + if (sc_isEqual(l.car, o)) { + needsAssig = true; + } else { + if (needsAssig) { + tail.cdr = l; + needsAssig = false; + } + tail = l; + } + l = l.cdr; + } + tail.cdr = null; + return dummy.cdr; +} + +function sc_reverseAppendBang(l1, l2) { + var res = l2; + while (l1 !== null) { + var tmp = res; + res = l1; + l1 = l1.cdr; + res.cdr = tmp; + } + return res; +} + +function sc_dualAppend(l1, l2) { + if (l1 === null) return l2; + if (l2 === null) return l1; + var rev = sc_reverse(l1); + return sc_reverseAppendBang(rev, l2); +} + +/*** META ((export #t)) */ +function sc_append() { + if (arguments.length === 0) + return null; + var res = arguments[arguments.length - 1]; + for (var i = arguments.length - 2; i >= 0; i--) + res = sc_dualAppend(arguments[i], res); + return res; +} + +function sc_dualAppendBang(l1, l2) { + if (l1 === null) return l2; + if (l2 === null) return l1; + var tmp = l1; + while (tmp.cdr !== null) tmp=tmp.cdr; + tmp.cdr = l2; + return l1; +} + +/*** META ((export #t)) */ +function sc_appendBang() { + var res = null; + for (var i = 0; i < arguments.length; i++) + res = sc_dualAppendBang(res, arguments[i]); + return res; +} + +/*** META ((export #t)) */ +function sc_reverse(l1) { + var res = null; + while (l1 !== null) { + res = sc_cons(l1.car, res); + l1 = l1.cdr; + } + return res; +} + +/*** META ((export #t)) */ +function sc_reverseBang(l) { + return sc_reverseAppendBang(l, null); +} + +/*** META ((export #t)) */ +function sc_listTail(l, k) { + var res = l; + for (var i = 0; i < k; i++) { + res = res.cdr; + } + return res; +} + +/*** META ((export #t)) */ +function sc_listRef(l, k) { + return sc_listTail(l, k).car; +} + +/* // unoptimized generic versions +function sc_memX(o, l, comp) { + while (l != null) { + if (comp(l.car, o)) + return l; + l = l.cdr; + } + return false; +} +function sc_memq(o, l) { return sc_memX(o, l, sc_isEq); } +function sc_memv(o, l) { return sc_memX(o, l, sc_isEqv); } +function sc_member(o, l) { return sc_memX(o, l, sc_isEqual); } +*/ + +/* optimized versions */ +/*** META ((export #t)) */ +function sc_memq(o, l) { + while (l !== null) { + if (l.car === o) + return l; + l = l.cdr; + } + return false; +} +/*** META ((export #t)) */ +function sc_memv(o, l) { + while (l !== null) { + if (l.car === o) + return l; + l = l.cdr; + } + return false; +} +/*** META ((export #t)) */ +function sc_member(o, l) { + while (l !== null) { + if (sc_isEqual(l.car,o)) + return l; + l = l.cdr; + } + return false; +} + +/* // generic unoptimized versions +function sc_assX(o, al, comp) { + while (al != null) { + if (comp(al.car.car, o)) + return al.car; + al = al.cdr; + } + return false; +} +function sc_assq(o, al) { return sc_assX(o, al, sc_isEq); } +function sc_assv(o, al) { return sc_assX(o, al, sc_isEqv); } +function sc_assoc(o, al) { return sc_assX(o, al, sc_isEqual); } +*/ +// optimized versions +/*** META ((export #t)) */ +function sc_assq(o, al) { + while (al !== null) { + if (al.car.car === o) + return al.car; + al = al.cdr; + } + return false; +} +/*** META ((export #t)) */ +function sc_assv(o, al) { + while (al !== null) { + if (al.car.car === o) + return al.car; + al = al.cdr; + } + return false; +} +/*** META ((export #t)) */ +function sc_assoc(o, al) { + while (al !== null) { + if (sc_isEqual(al.car.car, o)) + return al.car; + al = al.cdr; + } + return false; +} + +/* can be used for mutable strings and characters */ +function sc_isCharStringEqual(cs1, cs2) { return cs1.val === cs2.val; } +function sc_isCharStringLess(cs1, cs2) { return cs1.val < cs2.val; } +function sc_isCharStringGreater(cs1, cs2) { return cs1.val > cs2.val; } +function sc_isCharStringLessEqual(cs1, cs2) { return cs1.val <= cs2.val; } +function sc_isCharStringGreaterEqual(cs1, cs2) { return cs1.val >= cs2.val; } +function sc_isCharStringCIEqual(cs1, cs2) + { return cs1.val.toLowerCase() === cs2.val.toLowerCase(); } +function sc_isCharStringCILess(cs1, cs2) + { return cs1.val.toLowerCase() < cs2.val.toLowerCase(); } +function sc_isCharStringCIGreater(cs1, cs2) + { return cs1.val.toLowerCase() > cs2.val.toLowerCase(); } +function sc_isCharStringCILessEqual(cs1, cs2) + { return cs1.val.toLowerCase() <= cs2.val.toLowerCase(); } +function sc_isCharStringCIGreaterEqual(cs1, cs2) + { return cs1.val.toLowerCase() >= cs2.val.toLowerCase(); } + + + + +function sc_Char(c) { + var cached = sc_Char.lazy[c]; + if (cached) + return cached; + this.val = c; + sc_Char.lazy[c] = this; + // add return, so FF does not complain. + return undefined; +} +sc_Char.lazy = new Object(); +// thanks to Eric +sc_Char.char2readable = { + "\000": "#\\null", + "\007": "#\\bell", + "\010": "#\\backspace", + "\011": "#\\tab", + "\012": "#\\newline", + "\014": "#\\page", + "\015": "#\\return", + "\033": "#\\escape", + "\040": "#\\space", + "\177": "#\\delete", + + /* poeticless names */ + "\001": "#\\soh", + "\002": "#\\stx", + "\003": "#\\etx", + "\004": "#\\eot", + "\005": "#\\enq", + "\006": "#\\ack", + + "\013": "#\\vt", + "\016": "#\\so", + "\017": "#\\si", + + "\020": "#\\dle", + "\021": "#\\dc1", + "\022": "#\\dc2", + "\023": "#\\dc3", + "\024": "#\\dc4", + "\025": "#\\nak", + "\026": "#\\syn", + "\027": "#\\etb", + + "\030": "#\\can", + "\031": "#\\em", + "\032": "#\\sub", + "\033": "#\\esc", + "\034": "#\\fs", + "\035": "#\\gs", + "\036": "#\\rs", + "\037": "#\\us"}; + +sc_Char.readable2char = { + "null": "\000", + "bell": "\007", + "backspace": "\010", + "tab": "\011", + "newline": "\012", + "page": "\014", + "return": "\015", + "escape": "\033", + "space": "\040", + "delete": "\000", + "soh": "\001", + "stx": "\002", + "etx": "\003", + "eot": "\004", + "enq": "\005", + "ack": "\006", + "bel": "\007", + "bs": "\010", + "ht": "\011", + "nl": "\012", + "vt": "\013", + "np": "\014", + "cr": "\015", + "so": "\016", + "si": "\017", + "dle": "\020", + "dc1": "\021", + "dc2": "\022", + "dc3": "\023", + "dc4": "\024", + "nak": "\025", + "syn": "\026", + "etb": "\027", + "can": "\030", + "em": "\031", + "sub": "\032", + "esc": "\033", + "fs": "\034", + "gs": "\035", + "rs": "\036", + "us": "\037", + "sp": "\040", + "del": "\177"}; + +sc_Char.prototype.toString = function() { + return this.val; +}; +// sc_toDisplayString == toString +sc_Char.prototype.sc_toWriteString = function() { + var entry = sc_Char.char2readable[this.val]; + if (entry) + return entry; + else + return "#\\" + this.val; +}; + +/*** META ((export #t) + (type bool) + (peephole (postfix "instanceof sc_Char"))) +*/ +function sc_isChar(c) { + return (c instanceof sc_Char); +} + +/*** META ((export char=?) + (type bool) + (peephole (hole 2 c1 ".val === " c2 ".val"))) +*/ +var sc_isCharEqual = sc_isCharStringEqual; +/*** META ((export char?) + (type bool) + (peephole (hole 2 c1 ".val > " c2 ".val"))) +*/ +var sc_isCharGreater = sc_isCharStringGreater; +/*** META ((export char<=?) + (type bool) + (peephole (hole 2 c1 ".val <= " c2 ".val"))) +*/ +var sc_isCharLessEqual = sc_isCharStringLessEqual; +/*** META ((export char>=?) + (type bool) + (peephole (hole 2 c1 ".val >= " c2 ".val"))) +*/ +var sc_isCharGreaterEqual = sc_isCharStringGreaterEqual; +/*** META ((export char-ci=?) + (type bool) + (peephole (hole 2 c1 ".val.toLowerCase() === " c2 ".val.toLowerCase()"))) +*/ +var sc_isCharCIEqual = sc_isCharStringCIEqual; +/*** META ((export char-ci?) + (type bool) + (peephole (hole 2 c1 ".val.toLowerCase() > " c2 ".val.toLowerCase()"))) +*/ +var sc_isCharCIGreater = sc_isCharStringCIGreater; +/*** META ((export char-ci<=?) + (type bool) + (peephole (hole 2 c1 ".val.toLowerCase() <= " c2 ".val.toLowerCase()"))) +*/ +var sc_isCharCILessEqual = sc_isCharStringCILessEqual; +/*** META ((export char-ci>=?) + (type bool) + (peephole (hole 2 c1 ".val.toLowerCase() >= " c2 ".val.toLowerCase()"))) +*/ +var sc_isCharCIGreaterEqual = sc_isCharStringCIGreaterEqual; + +var SC_NUMBER_CLASS = "0123456789"; +var SC_WHITESPACE_CLASS = ' \r\n\t\f'; +var SC_LOWER_CLASS = 'abcdefghijklmnopqrstuvwxyz'; +var SC_UPPER_CLASS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + +function sc_isCharOfClass(c, cl) { return (cl.indexOf(c) != -1); } +/*** META ((export #t) + (type bool)) +*/ +function sc_isCharAlphabetic(c) + { return sc_isCharOfClass(c.val, SC_LOWER_CLASS) || + sc_isCharOfClass(c.val, SC_UPPER_CLASS); } +/*** META ((export #t) + (type bool) + (peephole (hole 1 "SC_NUMBER_CLASS.indexOf(" c ".val) != -1"))) +*/ +function sc_isCharNumeric(c) + { return sc_isCharOfClass(c.val, SC_NUMBER_CLASS); } +/*** META ((export #t) + (type bool)) +*/ +function sc_isCharWhitespace(c) { + var tmp = c.val; + return tmp === " " || tmp === "\r" || tmp === "\n" || tmp === "\t" || tmp === "\f"; +} +/*** META ((export #t) + (type bool) + (peephole (hole 1 "SC_UPPER_CLASS.indexOf(" c ".val) != -1"))) +*/ +function sc_isCharUpperCase(c) + { return sc_isCharOfClass(c.val, SC_UPPER_CLASS); } +/*** META ((export #t) + (type bool) + (peephole (hole 1 "SC_LOWER_CLASS.indexOf(" c ".val) != -1"))) +*/ +function sc_isCharLowerCase(c) + { return sc_isCharOfClass(c.val, SC_LOWER_CLASS); } + +/*** META ((export #t) + (peephole (postfix ".val.charCodeAt(0)"))) +*/ +function sc_char2integer(c) + { return c.val.charCodeAt(0); } +/*** META ((export #t) + (peephole (hole 1 "new sc_Char(String.fromCharCode(" n "))"))) +*/ +function sc_integer2char(n) + { return new sc_Char(String.fromCharCode(n)); } + +/*** META ((export #t) + (peephole (hole 1 "new sc_Char(" c ".val.toUpperCase())"))) +*/ +function sc_charUpcase(c) + { return new sc_Char(c.val.toUpperCase()); } +/*** META ((export #t) + (peephole (hole 1 "new sc_Char(" c ".val.toLowerCase())"))) +*/ +function sc_charDowncase(c) + { return new sc_Char(c.val.toLowerCase()); } + +function sc_makeJSStringOfLength(k, c) { + var fill; + if (c === undefined) + fill = " "; + else + fill = c; + var res = ""; + var len = 1; + // every round doubles the size of fill. + while (k >= len) { + if (k & len) + res = res.concat(fill); + fill = fill.concat(fill); + len *= 2; + } + return res; +} + +function sc_makejsString(k, c) { + var fill; + if (c) + fill = c.val; + else + fill = " "; + return sc_makeJSStringOfLength(k, fill); +} + +function sc_jsstring2list(s) { + var res = null; + for (var i = s.length - 1; i >= 0; i--) + res = sc_cons(new sc_Char(s.charAt(i)), res); + return res; +} + +function sc_list2jsstring(l) { + var a = new Array(); + while(l !== null) { + a.push(l.car.val); + l = l.cdr; + } + return "".concat.apply("", a); +} + +var sc_Vector = Array; + +sc_Vector.prototype.sc_toWriteOrDisplayString = function(writeOrDisplay) { + if (this.length === 0) return "#()"; + + var res = "#(" + writeOrDisplay(this[0]); + for (var i = 1; i < this.length; i++) + res += " " + writeOrDisplay(this[i]); + res += ")"; + return res; +}; +sc_Vector.prototype.sc_toDisplayString = function() { + return this.sc_toWriteOrDisplayString(sc_toDisplayString); +}; +sc_Vector.prototype.sc_toWriteString = function() { + return this.sc_toWriteOrDisplayString(sc_toWriteString); +}; + +/*** META ((export vector? array?) + (type bool) + (peephole (postfix " instanceof sc_Vector"))) +*/ +function sc_isVector(v) { + return (v instanceof sc_Vector); +} + +// only applies to vectors +function sc_isVectorEqual(v1, v2, comp) { + if (v1.length !== v2.length) return false; + for (var i = 0; i < v1.length; i++) + if (!comp(v1[i], v2[i])) return false; + return true; +} + +/*** META ((export make-vector make-array)) */ +function sc_makeVector(size, fill) { + var a = new sc_Vector(size); + if (fill !== undefined) + sc_vectorFillBang(a, fill); + return a; +} + +/*** META ((export vector array) + (peephole (vector))) +*/ +function sc_vector() { + var a = new sc_Vector(); + for (var i = 0; i < arguments.length; i++) + a.push(arguments[i]); + return a; +} + +/*** META ((export vector-length array-length) + (peephole (postfix ".length"))) +*/ +function sc_vectorLength(v) { + return v.length; +} + +/*** META ((export vector-ref array-ref) + (peephole (hole 2 v "[" pos "]"))) +*/ +function sc_vectorRef(v, pos) { + return v[pos]; +} + +/*** META ((export vector-set! array-set!) + (peephole (hole 3 v "[" pos "] = " val))) +*/ +function sc_vectorSetBang(v, pos, val) { + v[pos] = val; +} + +/*** META ((export vector->list array->list)) */ +function sc_vector2list(a) { + var res = null; + for (var i = a.length-1; i >= 0; i--) + res = sc_cons(a[i], res); + return res; +} + +/*** META ((export list->vector list->array)) */ +function sc_list2vector(l) { + var a = new sc_Vector(); + while(l !== null) { + a.push(l.car); + l = l.cdr; + } + return a; +} + +/*** META ((export vector-fill! array-fill!)) */ +function sc_vectorFillBang(a, fill) { + for (var i = 0; i < a.length; i++) + a[i] = fill; +} + + +/*** META ((export #t)) */ +function sc_copyVector(a, len) { + if (len <= a.length) + return a.slice(0, len); + else { + var tmp = a.concat(); + tmp.length = len; + return tmp; + } +} + +/*** META ((export #t) + (peephole (hole 3 a ".slice(" start "," end ")"))) +*/ +function sc_vectorCopy(a, start, end) { + return a.slice(start, end); +} + +/*** META ((export #t)) */ +function sc_vectorCopyBang(target, tstart, source, sstart, send) { + if (!sstart) sstart = 0; + if (!send) send = source.length; + + // if target == source we don't want to overwrite not yet copied elements. + if (tstart <= sstart) { + for (var i = tstart, j = sstart; j < send; i++, j++) { + target[i] = source[j]; + } + } else { + var diff = send - sstart; + for (var i = tstart + diff - 1, j = send - 1; + j >= sstart; + i--, j--) { + target[i] = source[j]; + } + } + return target; +} + +/*** META ((export #t) + (type bool) + (peephole (hole 1 "typeof " o " === 'function'"))) +*/ +function sc_isProcedure(o) { + return (typeof o === "function"); +} + +/*** META ((export #t)) */ +function sc_apply(proc) { + var args = new Array(); + // first part of arguments are not in list-form. + for (var i = 1; i < arguments.length - 1; i++) + args.push(arguments[i]); + var l = arguments[arguments.length - 1]; + while (l !== null) { + args.push(l.car); + l = l.cdr; + } + return proc.apply(null, args); +} + +/*** META ((export #t)) */ +function sc_map(proc, l1) { + if (l1 === undefined) + return null; + // else + var nbApplyArgs = arguments.length - 1; + var applyArgs = new Array(nbApplyArgs); + var revres = null; + while (l1 !== null) { + for (var i = 0; i < nbApplyArgs; i++) { + applyArgs[i] = arguments[i + 1].car; + arguments[i + 1] = arguments[i + 1].cdr; + } + revres = sc_cons(proc.apply(null, applyArgs), revres); + } + return sc_reverseAppendBang(revres, null); +} + +/*** META ((export #t)) */ +function sc_mapBang(proc, l1) { + if (l1 === undefined) + return null; + // else + var l1_orig = l1; + var nbApplyArgs = arguments.length - 1; + var applyArgs = new Array(nbApplyArgs); + while (l1 !== null) { + var tmp = l1; + for (var i = 0; i < nbApplyArgs; i++) { + applyArgs[i] = arguments[i + 1].car; + arguments[i + 1] = arguments[i + 1].cdr; + } + tmp.car = proc.apply(null, applyArgs); + } + return l1_orig; +} + +/*** META ((export #t)) */ +function sc_forEach(proc, l1) { + if (l1 === undefined) + return undefined; + // else + var nbApplyArgs = arguments.length - 1; + var applyArgs = new Array(nbApplyArgs); + while (l1 !== null) { + for (var i = 0; i < nbApplyArgs; i++) { + applyArgs[i] = arguments[i + 1].car; + arguments[i + 1] = arguments[i + 1].cdr; + } + proc.apply(null, applyArgs); + } + // add return so FF does not complain. + return undefined; +} + +/*** META ((export #t)) */ +function sc_filter(proc, l1) { + var dummy = { cdr : null }; + var tail = dummy; + while (l1 !== null) { + if (proc(l1.car) !== false) { + tail.cdr = sc_cons(l1.car, null); + tail = tail.cdr; + } + l1 = l1.cdr; + } + return dummy.cdr; +} + +/*** META ((export #t)) */ +function sc_filterBang(proc, l1) { + var head = sc_cons("dummy", l1); + var it = head; + var next = l1; + while (next !== null) { + if (proc(next.car) !== false) { + it.cdr = next + it = next; + } + next = next.cdr; + } + it.cdr = null; + return head.cdr; +} + +function sc_filterMap1(proc, l1) { + var revres = null; + while (l1 !== null) { + var tmp = proc(l1.car) + if (tmp !== false) revres = sc_cons(tmp, revres); + l1 = l1.cdr; + } + return sc_reverseAppendBang(revres, null); +} +function sc_filterMap2(proc, l1, l2) { + var revres = null; + while (l1 !== null) { + var tmp = proc(l1.car, l2.car); + if(tmp !== false) revres = sc_cons(tmp, revres); + l1 = l1.cdr; + l2 = l2.cdr + } + return sc_reverseAppendBang(revres, null); +} + +/*** META ((export #t)) */ +function sc_filterMap(proc, l1, l2, l3) { + if (l2 === undefined) + return sc_filterMap1(proc, l1); + else if (l3 === undefined) + return sc_filterMap2(proc, l1, l2); + // else + var nbApplyArgs = arguments.length - 1; + var applyArgs = new Array(nbApplyArgs); + var revres = null; + while (l1 !== null) { + for (var i = 0; i < nbApplyArgs; i++) { + applyArgs[i] = arguments[i + 1].car; + arguments[i + 1] = arguments[i + 1].cdr; + } + var tmp = proc.apply(null, applyArgs); + if(tmp !== false) revres = sc_cons(tmp, revres); + } + return sc_reverseAppendBang(revres, null); +} + +/*** META ((export #t)) */ +function sc_any(proc, l) { + var revres = null; + while (l !== null) { + var tmp = proc(l.car); + if(tmp !== false) return tmp; + l = l.cdr; + } + return false; +} + +/*** META ((export any?) + (peephole (hole 2 "sc_any(" proc "," l ") !== false"))) +*/ +function sc_anyPred(proc, l) { + return sc_any(proc, l)!== false; +} + +/*** META ((export #t)) */ +function sc_every(proc, l) { + var revres = null; + var tmp = true; + while (l !== null) { + tmp = proc(l.car); + if (tmp === false) return false; + l = l.cdr; + } + return tmp; +} + +/*** META ((export every?) + (peephole (hole 2 "sc_every(" proc "," l ") !== false"))) +*/ +function sc_everyPred(proc, l) { + var tmp = sc_every(proc, l); + if (tmp !== false) return true; + return false; +} + +/*** META ((export #t) + (peephole (postfix "()"))) +*/ +function sc_force(o) { + return o(); +} + +/*** META ((export #t)) */ +function sc_makePromise(proc) { + var isResultReady = false; + var result = undefined; + return function() { + if (!isResultReady) { + var tmp = proc(); + if (!isResultReady) { + isResultReady = true; + result = tmp; + } + } + return result; + }; +} + +function sc_Values(values) { + this.values = values; +} + +/*** META ((export #t) + (peephole (values))) +*/ +function sc_values() { + if (arguments.length === 1) + return arguments[0]; + else + return new sc_Values(arguments); +} + +/*** META ((export #t)) */ +function sc_callWithValues(producer, consumer) { + var produced = producer(); + if (produced instanceof sc_Values) + return consumer.apply(null, produced.values); + else + return consumer(produced); +} + +/*** META ((export #t)) */ +function sc_dynamicWind(before, thunk, after) { + before(); + try { + var res = thunk(); + return res; + } finally { + after(); + } +} + + +// TODO: eval/scheme-report-environment/null-environment/interaction-environment + +// LIMITATION: 'load' doesn't exist without files. +// LIMITATION: transcript-on/transcript-off doesn't exist without files. + + +function sc_Struct(name) { + this.name = name; +} +sc_Struct.prototype.sc_toDisplayString = function() { + return "#"; +}; +sc_Struct.prototype.sc_toWriteString = sc_Struct.prototype.sc_toDisplayString; + +/*** META ((export #t) + (peephole (hole 1 "new sc_Struct(" name ")"))) +*/ +function sc_makeStruct(name) { + return new sc_Struct(name); +} + +/*** META ((export #t) + (type bool) + (peephole (postfix " instanceof sc_Struct"))) +*/ +function sc_isStruct(o) { + return (o instanceof sc_Struct); +} + +/*** META ((export #t) + (type bool) + (peephole (hole 2 "(" 1 " instanceof sc_Struct) && ( " 1 ".name === " 0 ")"))) +*/ +function sc_isStructNamed(name, s) { + return ((s instanceof sc_Struct) && (s.name === name)); +} + +/*** META ((export struct-field) + (peephole (hole 3 0 "[" 2 "]"))) +*/ +function sc_getStructField(s, name, field) { + return s[field]; +} + +/*** META ((export struct-field-set!) + (peephole (hole 4 0 "[" 2 "] = " 3))) +*/ +function sc_setStructFieldBang(s, name, field, val) { + s[field] = val; +} + +/*** META ((export #t) + (peephole (prefix "~"))) +*/ +function sc_bitNot(x) { + return ~x; +} + +/*** META ((export #t) + (peephole (infix 2 2 "&"))) +*/ +function sc_bitAnd(x, y) { + return x & y; +} + +/*** META ((export #t) + (peephole (infix 2 2 "|"))) +*/ +function sc_bitOr(x, y) { + return x | y; +} + +/*** META ((export #t) + (peephole (infix 2 2 "^"))) +*/ +function sc_bitXor(x, y) { + return x ^ y; +} + +/*** META ((export #t) + (peephole (infix 2 2 "<<"))) +*/ +function sc_bitLsh(x, y) { + return x << y; +} + +/*** META ((export #t) + (peephole (infix 2 2 ">>"))) +*/ +function sc_bitRsh(x, y) { + return x >> y; +} + +/*** META ((export #t) + (peephole (infix 2 2 ">>>"))) +*/ +function sc_bitUrsh(x, y) { + return x >>> y; +} + +/*** META ((export js-field js-property) + (peephole (hole 2 o "[" field "]"))) +*/ +function sc_jsField(o, field) { + return o[field]; +} + +/*** META ((export js-field-set! js-property-set!) + (peephole (hole 3 o "[" field "] = " val))) +*/ +function sc_setJsFieldBang(o, field, val) { + return o[field] = val; +} + +/*** META ((export js-field-delete! js-property-delete!) + (peephole (hole 2 "delete" o "[" field "]"))) +*/ +function sc_deleteJsFieldBang(o, field) { + delete o[field]; +} + +/*** META ((export #t) + (peephole (jsCall))) +*/ +function sc_jsCall(o, fun) { + var args = new Array(); + for (var i = 2; i < arguments.length; i++) + args[i-2] = arguments[i]; + return fun.apply(o, args); +} + +/*** META ((export #t) + (peephole (jsMethodCall))) +*/ +function sc_jsMethodCall(o, field) { + var args = new Array(); + for (var i = 2; i < arguments.length; i++) + args[i-2] = arguments[i]; + return o[field].apply(o, args); +} + +/*** META ((export new js-new) + (peephole (jsNew))) +*/ +function sc_jsNew(c) { + var evalStr = "new c("; + evalStr +=arguments.length > 1? "arguments[1]": ""; + for (var i = 2; i < arguments.length; i++) + evalStr += ", arguments[" + i + "]"; + evalStr +=")"; + return eval(evalStr); +} + +// ======================== RegExp ==================== +/*** META ((export #t)) */ +function sc_pregexp(re) { + return new RegExp(sc_string2jsstring(re)); +} + +/*** META ((export #t)) */ +function sc_pregexpMatch(re, s) { + var reg = (re instanceof RegExp) ? re : sc_pregexp(re); + var tmp = reg.exec(sc_string2jsstring(s)); + + if (tmp == null) return false; + + var res = null; + for (var i = tmp.length-1; i >= 0; i--) { + if (tmp[i] !== null) { + res = sc_cons(sc_jsstring2string(tmp[i]), res); + } else { + res = sc_cons(false, res); + } + } + return res; +} + +/*** META ((export #t)) */ +function sc_pregexpReplace(re, s1, s2) { + var reg; + var jss1 = sc_string2jsstring(s1); + var jss2 = sc_string2jsstring(s2); + + if (re instanceof RegExp) { + if (re.global) + reg = re; + else + reg = new RegExp(re.source); + } else { + reg = new RegExp(sc_string2jsstring(re)); + } + + return jss1.replace(reg, jss2); +} + +/*** META ((export pregexp-replace*)) */ +function sc_pregexpReplaceAll(re, s1, s2) { + var reg; + var jss1 = sc_string2jsstring(s1); + var jss2 = sc_string2jsstring(s2); + + if (re instanceof RegExp) { + if (re.global) + reg = re; + else + reg = new RegExp(re.source, "g"); + } else { + reg = new RegExp(sc_string2jsstring(re), "g"); + } + + return jss1.replace(reg, jss2); +} + +/*** META ((export #t)) */ +function sc_pregexpSplit(re, s) { + var reg = ((re instanceof RegExp) ? + re : + new RegExp(sc_string2jsstring(re))); + var jss = sc_string2jsstring(s); + var tmp = jss.split(reg); + + if (tmp == null) return false; + + return sc_vector2list(tmp); +} + + +/* =========================================================================== */ +/* Other library stuff */ +/* =========================================================================== */ + +/*** META ((export #t) + (peephole (hole 1 "Math.floor(Math.random()*" 'n ")"))) +*/ +function sc_random(n) { + return Math.floor(Math.random()*n); +} + +/*** META ((export current-date) + (peephole (hole 0 "new Date()"))) +*/ +function sc_currentDate() { + return new Date(); +} + +function sc_Hashtable() { +} +sc_Hashtable.prototype.toString = function() { + return "#{%hashtable}"; +}; +// sc_toWriteString == sc_toDisplayString == toString + +function sc_HashtableElement(key, val) { + this.key = key; + this.val = val; +} + +/*** META ((export #t) + (peephole (hole 0 "new sc_Hashtable()"))) +*/ +function sc_makeHashtable() { + return new sc_Hashtable(); +} + +/*** META ((export #t)) */ +function sc_hashtablePutBang(ht, key, val) { + var hash = sc_hash(key); + ht[hash] = new sc_HashtableElement(key, val); +} + +/*** META ((export #t)) */ +function sc_hashtableGet(ht, key) { + var hash = sc_hash(key); + if (hash in ht) + return ht[hash].val; + else + return false; +} + +/*** META ((export #t)) */ +function sc_hashtableForEach(ht, f) { + for (var v in ht) { + if (ht[v] instanceof sc_HashtableElement) + f(ht[v].key, ht[v].val); + } +} + +/*** META ((export hashtable-contains?) + (peephole (hole 2 "sc_hash(" 1 ") in " 0))) +*/ +function sc_hashtableContains(ht, key) { + var hash = sc_hash(key); + if (hash in ht) + return true; + else + return false; +} + +var SC_HASH_COUNTER = 0; + +function sc_hash(o) { + if (o === null) + return "null"; + else if (o === undefined) + return "undefined"; + else if (o === true) + return "true"; + else if (o === false) + return "false"; + else if (typeof o === "number") + return "num-" + o; + else if (typeof o === "string") + return "jsstr-" + o; + else if (o.sc_getHash) + return o.sc_getHash(); + else + return sc_counterHash.call(o); +} +function sc_counterHash() { + if (!this.sc_hash) { + this.sc_hash = "hash-" + SC_HASH_COUNTER; + SC_HASH_COUNTER++; + } + return this.sc_hash; +} + +function sc_Trampoline(args, maxTailCalls) { + this['__trampoline return__'] = true; + this.args = args; + this.MAX_TAIL_CALLs = maxTailCalls; +} +// TODO: call/cc stuff +sc_Trampoline.prototype.restart = function() { + var o = this; + while (true) { + // set both globals. + SC_TAIL_OBJECT.calls = o.MAX_TAIL_CALLs-1; + var fun = o.args.callee; + var res = fun.apply(SC_TAIL_OBJECT, o.args); + if (res instanceof sc_Trampoline) + o = res; + else + return res; + } +} + +/*** META ((export bind-exit-lambda)) */ +function sc_bindExitLambda(proc) { + var escape_obj = new sc_BindExitException(); + var escape = function(res) { + escape_obj.res = res; + throw escape_obj; + }; + try { + return proc(escape); + } catch(e) { + if (e === escape_obj) { + return e.res; + } + throw e; + } +} +function sc_BindExitException() { + this._internalException = true; +} + +var SC_SCM2JS_GLOBALS = new Object(); + +// default tail-call depth. +// normally the program should set it again. but just in case... +var SC_TAIL_OBJECT = new Object(); +SC_SCM2JS_GLOBALS.TAIL_OBJECT = SC_TAIL_OBJECT; +// ======================== I/O ======================= + +/*------------------------------------------------------------------*/ + +function sc_EOF() { +} +var SC_EOF_OBJECT = new sc_EOF(); + +function sc_Port() { +} + +/* --------------- Input ports -------------------------------------*/ + +function sc_InputPort() { +} +sc_InputPort.prototype = new sc_Port(); + +sc_InputPort.prototype.peekChar = function() { + if (!("peeked" in this)) + this.peeked = this.getNextChar(); + return this.peeked; +} +sc_InputPort.prototype.readChar = function() { + var tmp = this.peekChar(); + delete this.peeked; + return tmp; +} +sc_InputPort.prototype.isCharReady = function() { + return true; +} +sc_InputPort.prototype.close = function() { + // do nothing +} + +/* .............. String port ..........................*/ +function sc_ErrorInputPort() { +}; +sc_ErrorInputPort.prototype = new sc_InputPort(); +sc_ErrorInputPort.prototype.getNextChar = function() { + throw "can't read from error-port."; +}; +sc_ErrorInputPort.prototype.isCharReady = function() { + return false; +}; + + +/* .............. String port ..........................*/ + +function sc_StringInputPort(jsStr) { + // we are going to do some charAts on the str. + // instead of recreating all the time a String-object, we + // create one in the beginning. (not sure, if this is really an optim) + this.str = new String(jsStr); + this.pos = 0; +} +sc_StringInputPort.prototype = new sc_InputPort(); +sc_StringInputPort.prototype.getNextChar = function() { + if (this.pos >= this.str.length) + return SC_EOF_OBJECT; + return this.str.charAt(this.pos++); +}; + +/* ------------- Read and other lib-funs -------------------------------*/ +function sc_Token(type, val, pos) { + this.type = type; + this.val = val; + this.pos = pos; +} +sc_Token.EOF = 0/*EOF*/; +sc_Token.OPEN_PAR = 1/*OPEN_PAR*/; +sc_Token.CLOSE_PAR = 2/*CLOSE_PAR*/; +sc_Token.OPEN_BRACE = 3/*OPEN_BRACE*/; +sc_Token.CLOSE_BRACE = 4/*CLOSE_BRACE*/; +sc_Token.OPEN_BRACKET = 5/*OPEN_BRACKET*/; +sc_Token.CLOSE_BRACKET = 6/*CLOSE_BRACKET*/; +sc_Token.WHITESPACE = 7/*WHITESPACE*/; +sc_Token.QUOTE = 8/*QUOTE*/; +sc_Token.ID = 9/*ID*/; +sc_Token.DOT = 10/*DOT*/; +sc_Token.STRING = 11/*STRING*/; +sc_Token.NUMBER = 12/*NUMBER*/; +sc_Token.ERROR = 13/*ERROR*/; +sc_Token.VECTOR_BEGIN = 14/*VECTOR_BEGIN*/; +sc_Token.TRUE = 15/*TRUE*/; +sc_Token.FALSE = 16/*FALSE*/; +sc_Token.UNSPECIFIED = 17/*UNSPECIFIED*/; +sc_Token.REFERENCE = 18/*REFERENCE*/; +sc_Token.STORE = 19/*STORE*/; +sc_Token.CHAR = 20/*CHAR*/; + +var SC_ID_CLASS = SC_LOWER_CLASS + SC_UPPER_CLASS + "!$%*+-./:<=>?@^_~"; +function sc_Tokenizer(port) { + this.port = port; +} +sc_Tokenizer.prototype.peekToken = function() { + if (this.peeked) + return this.peeked; + var newToken = this.nextToken(); + this.peeked = newToken; + return newToken; +}; +sc_Tokenizer.prototype.readToken = function() { + var tmp = this.peekToken(); + delete this.peeked; + return tmp; +}; +sc_Tokenizer.prototype.nextToken = function() { + var port = this.port; + + function isNumberChar(c) { + return (c >= "0" && c <= "9"); + }; + function isIdOrNumberChar(c) { + return SC_ID_CLASS.indexOf(c) != -1 || // ID-char + (c >= "0" && c <= "9"); + } + function isWhitespace(c) { + return c === " " || c === "\r" || c === "\n" || c === "\t" || c === "\f"; + }; + function isWhitespaceOrEOF(c) { + return isWhitespace(c) || c === SC_EOF_OBJECT; + }; + + function readString() { + res = ""; + while (true) { + var c = port.readChar(); + switch (c) { + case '"': + return new sc_Token(11/*STRING*/, res); + case "\\": + var tmp = port.readChar(); + switch (tmp) { + case '0': res += "\0"; break; + case 'a': res += "\a"; break; + case 'b': res += "\b"; break; + case 'f': res += "\f"; break; + case 'n': res += "\n"; break; + case 'r': res += "\r"; break; + case 't': res += "\t"; break; + case 'v': res += "\v"; break; + case '"': res += '"'; break; + case '\\': res += '\\'; break; + case 'x': + /* hexa-number */ + var nb = 0; + while (true) { + var hexC = port.peekChar(); + if (hexC >= '0' && hexC <= '9') { + port.readChar(); + nb = nb * 16 + hexC.charCodeAt(0) - '0'.charCodeAt(0); + } else if (hexC >= 'a' && hexC <= 'f') { + port.readChar(); + nb = nb * 16 + hexC.charCodeAt(0) - 'a'.charCodeAt(0); + } else if (hexC >= 'A' && hexC <= 'F') { + port.readChar(); + nb = nb * 16 + hexC.charCodeAt(0) - 'A'.charCodeAt(0); + } else { + // next char isn't part of hex. + res += String.fromCharCode(nb); + break; + } + } + break; + default: + if (tmp === SC_EOF_OBJECT) { + return new sc_Token(13/*ERROR*/, "unclosed string-literal" + res); + } + res += tmp; + } + break; + default: + if (c === SC_EOF_OBJECT) { + return new sc_Token(13/*ERROR*/, "unclosed string-literal" + res); + } + res += c; + } + } + }; + function readIdOrNumber(firstChar) { + var res = firstChar; + while (isIdOrNumberChar(port.peekChar())) + res += port.readChar(); + if (isNaN(res)) + return new sc_Token(9/*ID*/, res); + else + return new sc_Token(12/*NUMBER*/, res - 0); + }; + + function skipWhitespaceAndComments() { + var done = false; + while (!done) { + done = true; + while (isWhitespace(port.peekChar())) + port.readChar(); + if (port.peekChar() === ';') { + port.readChar(); + done = false; + while (true) { + curChar = port.readChar(); + if (curChar === SC_EOF_OBJECT || + curChar === '\n') + break; + } + } + } + }; + + function readDot() { + if (isWhitespace(port.peekChar())) + return new sc_Token(10/*DOT*/); + else + return readIdOrNumber("."); + }; + + function readSharp() { + var c = port.readChar(); + if (isWhitespace(c)) + return new sc_Token(13/*ERROR*/, "bad #-pattern0."); + + // reference + if (isNumberChar(c)) { + var nb = c - 0; + while (isNumberChar(port.peekChar())) + nb = nb*10 + (port.readChar() - 0); + switch (port.readChar()) { + case '#': + return new sc_Token(18/*REFERENCE*/, nb); + case '=': + return new sc_Token(19/*STORE*/, nb); + default: + return new sc_Token(13/*ERROR*/, "bad #-pattern1." + nb); + } + } + + if (c === "(") + return new sc_Token(14/*VECTOR_BEGIN*/); + + if (c === "\\") { // character + var tmp = "" + while (!isWhitespaceOrEOF(port.peekChar())) + tmp += port.readChar(); + switch (tmp.length) { + case 0: // it's escaping a whitespace char: + if (sc_isEOFObject(port.peekChar)) + return new sc_Token(13/*ERROR*/, "bad #-pattern2."); + else + return new sc_Token(20/*CHAR*/, port.readChar()); + case 1: + return new sc_Token(20/*CHAR*/, tmp); + default: + var entry = sc_Char.readable2char[tmp.toLowerCase()]; + if (entry) + return new sc_Token(20/*CHAR*/, entry); + else + return new sc_Token(13/*ERROR*/, "unknown character description: #\\" + tmp); + } + } + + // some constants (#t, #f, #unspecified) + var res; + var needing; + switch (c) { + case 't': res = new sc_Token(15/*TRUE*/, true); needing = ""; break; + case 'f': res = new sc_Token(16/*FALSE*/, false); needing = ""; break; + case 'u': res = new sc_Token(17/*UNSPECIFIED*/, undefined); needing = "nspecified"; break; + default: + return new sc_Token(13/*ERROR*/, "bad #-pattern3: " + c); + } + while(true) { + c = port.peekChar(); + if ((isWhitespaceOrEOF(c) || c === ')') && + needing == "") + return res; + else if (isWhitespace(c) || needing == "") + return new sc_Token(13/*ERROR*/, "bad #-pattern4 " + c + " " + needing); + else if (needing.charAt(0) == c) { + port.readChar(); // consume + needing = needing.slice(1); + } else + return new sc_Token(13/*ERROR*/, "bad #-pattern5"); + } + + }; + + skipWhitespaceAndComments(); + var curChar = port.readChar(); + if (curChar === SC_EOF_OBJECT) + return new sc_Token(0/*EOF*/, curChar); + switch (curChar) + { + case " ": + case "\n": + case "\t": + return readWhitespace(); + case "(": + return new sc_Token(1/*OPEN_PAR*/); + case ")": + return new sc_Token(2/*CLOSE_PAR*/); + case "{": + return new sc_Token(3/*OPEN_BRACE*/); + case "}": + return new sc_Token(4/*CLOSE_BRACE*/); + case "[": + return new sc_Token(5/*OPEN_BRACKET*/); + case "]": + return new sc_Token(6/*CLOSE_BRACKET*/); + case "'": + return new sc_Token(8/*QUOTE*/); + case "#": + return readSharp(); + case ".": + return readDot(); + case '"': + return readString(); + default: + if (isIdOrNumberChar(curChar)) + return readIdOrNumber(curChar); + throw "unexpected character: " + curChar; + } +}; + +function sc_Reader(tokenizer) { + this.tokenizer = tokenizer; + this.backref = new Array(); +} +sc_Reader.prototype.read = function() { + function readList(listBeginType) { + function matchesPeer(open, close) { + return open === 1/*OPEN_PAR*/ && close === 2/*CLOSE_PAR*/ + || open === 3/*OPEN_BRACE*/ && close === 4/*CLOSE_BRACE*/ + || open === 5/*OPEN_BRACKET*/ && close === 6/*CLOSE_BRACKET*/; + }; + var res = null; + + while (true) { + var token = tokenizer.peekToken(); + + switch (token.type) { + case 2/*CLOSE_PAR*/: + case 4/*CLOSE_BRACE*/: + case 6/*CLOSE_BRACKET*/: + if (matchesPeer(listBeginType, token.type)) { + tokenizer.readToken(); // consume token + return sc_reverseBang(res); + } else + throw "closing par doesn't match: " + listBeginType + + " " + listEndType; + + case 0/*EOF*/: + throw "unexpected end of file"; + + case 10/*DOT*/: + tokenizer.readToken(); // consume token + var cdr = this.read(); + var par = tokenizer.readToken(); + if (!matchesPeer(listBeginType, par.type)) + throw "closing par doesn't match: " + listBeginType + + " " + par.type; + else + return sc_reverseAppendBang(res, cdr); + + + default: + res = sc_cons(this.read(), res); + } + } + }; + function readQuote() { + return sc_cons("quote", sc_cons(this.read(), null)); + }; + function readVector() { + // opening-parenthesis is already consumed + var a = new Array(); + while (true) { + var token = tokenizer.peekToken(); + switch (token.type) { + case 2/*CLOSE_PAR*/: + tokenizer.readToken(); + return a; + + default: + a.push(this.read()); + } + } + }; + + function storeRefence(nb) { + var tmp = this.read(); + this.backref[nb] = tmp; + return tmp; + }; + + function readReference(nb) { + if (nb in this.backref) + return this.backref[nb]; + else + throw "bad reference: " + nb; + }; + + var tokenizer = this.tokenizer; + + var token = tokenizer.readToken(); + + // handle error + if (token.type === 13/*ERROR*/) + throw token.val; + + switch (token.type) { + case 1/*OPEN_PAR*/: + case 3/*OPEN_BRACE*/: + case 5/*OPEN_BRACKET*/: + return readList.call(this, token.type); + case 8/*QUOTE*/: + return readQuote.call(this); + case 11/*STRING*/: + return sc_jsstring2string(token.val); + case 20/*CHAR*/: + return new sc_Char(token.val); + case 14/*VECTOR_BEGIN*/: + return readVector.call(this); + case 18/*REFERENCE*/: + return readReference.call(this, token.val); + case 19/*STORE*/: + return storeRefence.call(this, token.val); + case 9/*ID*/: + return sc_jsstring2symbol(token.val); + case 0/*EOF*/: + case 12/*NUMBER*/: + case 15/*TRUE*/: + case 16/*FALSE*/: + case 17/*UNSPECIFIED*/: + return token.val; + default: + throw "unexpected token " + token.type + " " + token.val; + } +}; + +/*** META ((export #t)) */ +function sc_read(port) { + if (port === undefined) // we assume the port hasn't been given. + port = SC_DEFAULT_IN; // THREAD: shared var... + var reader = new sc_Reader(new sc_Tokenizer(port)); + return reader.read(); +} +/*** META ((export #t)) */ +function sc_readChar(port) { + if (port === undefined) // we assume the port hasn't been given. + port = SC_DEFAULT_IN; // THREAD: shared var... + var t = port.readChar(); + return t === SC_EOF_OBJECT? t: new sc_Char(t); +} +/*** META ((export #t)) */ +function sc_peekChar(port) { + if (port === undefined) // we assume the port hasn't been given. + port = SC_DEFAULT_IN; // THREAD: shared var... + var t = port.peekChar(); + return t === SC_EOF_OBJECT? t: new sc_Char(t); +} +/*** META ((export #t) + (type bool)) +*/ +function sc_isCharReady(port) { + if (port === undefined) // we assume the port hasn't been given. + port = SC_DEFAULT_IN; // THREAD: shared var... + return port.isCharReady(); +} +/*** META ((export #t) + (peephole (postfix ".close()"))) +*/ +function sc_closeInputPort(p) { + return p.close(); +} + +/*** META ((export #t) + (type bool) + (peephole (postfix " instanceof sc_InputPort"))) +*/ +function sc_isInputPort(o) { + return (o instanceof sc_InputPort); +} + +/*** META ((export eof-object?) + (type bool) + (peephole (postfix " === SC_EOF_OBJECT"))) +*/ +function sc_isEOFObject(o) { + return o === SC_EOF_OBJECT; +} + +/*** META ((export #t) + (peephole (hole 0 "SC_DEFAULT_IN"))) +*/ +function sc_currentInputPort() { + return SC_DEFAULT_IN; +} + +/* ------------ file operations are not supported -----------*/ +/*** META ((export #t)) */ +function sc_callWithInputFile(s, proc) { + throw "can't open " + s; +} + +/*** META ((export #t)) */ +function sc_callWithOutputFile(s, proc) { + throw "can't open " + s; +} + +/*** META ((export #t)) */ +function sc_withInputFromFile(s, thunk) { + throw "can't open " + s; +} + +/*** META ((export #t)) */ +function sc_withOutputToFile(s, thunk) { + throw "can't open " + s; +} + +/*** META ((export #t)) */ +function sc_openInputFile(s) { + throw "can't open " + s; +} + +/*** META ((export #t)) */ +function sc_openOutputFile(s) { + throw "can't open " + s; +} + +/* ----------------------------------------------------------------------------*/ +/*** META ((export #t)) */ +function sc_basename(p) { + var i = p.lastIndexOf('/'); + + if(i >= 0) + return p.substring(i + 1, p.length); + else + return ''; +} + +/*** META ((export #t)) */ +function sc_dirname(p) { + var i = p.lastIndexOf('/'); + + if(i >= 0) + return p.substring(0, i); + else + return ''; +} + +/* ----------------------------------------------------------------------------*/ + +/*** META ((export #t)) */ +function sc_withInputFromPort(p, thunk) { + try { + var tmp = SC_DEFAULT_IN; // THREAD: shared var. + SC_DEFAULT_IN = p; + return thunk(); + } finally { + SC_DEFAULT_IN = tmp; + } +} + +/*** META ((export #t)) */ +function sc_withInputFromString(s, thunk) { + return sc_withInputFromPort(new sc_StringInputPort(sc_string2jsstring(s)), thunk); +} + +/*** META ((export #t)) */ +function sc_withOutputToPort(p, thunk) { + try { + var tmp = SC_DEFAULT_OUT; // THREAD: shared var. + SC_DEFAULT_OUT = p; + return thunk(); + } finally { + SC_DEFAULT_OUT = tmp; + } +} + +/*** META ((export #t)) */ +function sc_withOutputToString(thunk) { + var p = new sc_StringOutputPort(); + sc_withOutputToPort(p, thunk); + return p.close(); +} + +/*** META ((export #t)) */ +function sc_withOutputToProcedure(proc, thunk) { + var t = function(s) { proc(sc_jsstring2string(s)); }; + return sc_withOutputToPort(new sc_GenericOutputPort(t), thunk); +} + +/*** META ((export #t) + (peephole (hole 0 "new sc_StringOutputPort()"))) +*/ +function sc_openOutputString() { + return new sc_StringOutputPort(); +} + +/*** META ((export #t)) */ +function sc_openInputString(str) { + return new sc_StringInputPort(sc_string2jsstring(str)); +} + +/* ----------------------------------------------------------------------------*/ + +function sc_OutputPort() { +} +sc_OutputPort.prototype = new sc_Port(); +sc_OutputPort.prototype.appendJSString = function(obj) { + /* do nothing */ +} +sc_OutputPort.prototype.close = function() { + /* do nothing */ +} + +function sc_StringOutputPort() { + this.res = ""; +} +sc_StringOutputPort.prototype = new sc_OutputPort(); +sc_StringOutputPort.prototype.appendJSString = function(s) { + this.res += s; +} +sc_StringOutputPort.prototype.close = function() { + return sc_jsstring2string(this.res); +} + +/*** META ((export #t)) */ +function sc_getOutputString(sp) { + return sc_jsstring2string(sp.res); +} + + +function sc_ErrorOutputPort() { +} +sc_ErrorOutputPort.prototype = new sc_OutputPort(); +sc_ErrorOutputPort.prototype.appendJSString = function(s) { + throw "don't write on ErrorPort!"; +} +sc_ErrorOutputPort.prototype.close = function() { + /* do nothing */ +} + +function sc_GenericOutputPort(appendJSString, close) { + this.appendJSString = appendJSString; + if (close) + this.close = close; +} +sc_GenericOutputPort.prototype = new sc_OutputPort(); + +/*** META ((export #t) + (type bool) + (peephole (postfix " instanceof sc_OutputPort"))) +*/ +function sc_isOutputPort(o) { + return (o instanceof sc_OutputPort); +} + +/*** META ((export #t) + (peephole (postfix ".close()"))) +*/ +function sc_closeOutputPort(p) { + return p.close(); +} + +/* ------------------ write ---------------------------------------------------*/ + +/*** META ((export #t)) */ +function sc_write(o, p) { + if (p === undefined) // we assume not given + p = SC_DEFAULT_OUT; + p.appendJSString(sc_toWriteString(o)); +} + +function sc_toWriteString(o) { + if (o === null) + return "()"; + else if (o === true) + return "#t"; + else if (o === false) + return "#f"; + else if (o === undefined) + return "#unspecified"; + else if (typeof o === 'function') + return "#"; + else if (o.sc_toWriteString) + return o.sc_toWriteString(); + else + return o.toString(); +} + +function sc_escapeWriteString(s) { + var res = ""; + var j = 0; + for (i = 0; i < s.length; i++) { + switch (s.charAt(i)) { + case "\0": res += s.substring(j, i) + "\\0"; j = i + 1; break; + case "\b": res += s.substring(j, i) + "\\b"; j = i + 1; break; + case "\f": res += s.substring(j, i) + "\\f"; j = i + 1; break; + case "\n": res += s.substring(j, i) + "\\n"; j = i + 1; break; + case "\r": res += s.substring(j, i) + "\\r"; j = i + 1; break; + case "\t": res += s.substring(j, i) + "\\t"; j = i + 1; break; + case "\v": res += s.substring(j, i) + "\\v"; j = i + 1; break; + case '"': res += s.substring(j, i) + '\\"'; j = i + 1; break; + case "\\": res += s.substring(j, i) + "\\\\"; j = i + 1; break; + default: + var c = s.charAt(i); + if ("\a" !== "a" && c == "\a") { + res += s.substring(j, i) + "\\a"; j = i + 1; continue; + } + if ("\v" !== "v" && c == "\v") { + res += s.substring(j, i) + "\\v"; j = i + 1; continue; + } + //if (s.charAt(i) < ' ' || s.charCodeAt(i) > 127) { + // CARE: Manuel is this OK with HOP? + if (s.charAt(i) < ' ') { + /* non printable character and special chars */ + res += s.substring(j, i) + "\\x" + s.charCodeAt(i).toString(16); + j = i + 1; + } + // else just let i increase... + } + } + res += s.substring(j, i); + return res; +} + +/* ------------------ display ---------------------------------------------------*/ + +/*** META ((export #t)) */ +function sc_display(o, p) { + if (p === undefined) // we assume not given + p = SC_DEFAULT_OUT; + p.appendJSString(sc_toDisplayString(o)); +} + +function sc_toDisplayString(o) { + if (o === null) + return "()"; + else if (o === true) + return "#t"; + else if (o === false) + return "#f"; + else if (o === undefined) + return "#unspecified"; + else if (typeof o === 'function') + return "#"; + else if (o.sc_toDisplayString) + return o.sc_toDisplayString(); + else + return o.toString(); +} + +/* ------------------ newline ---------------------------------------------------*/ + +/*** META ((export #t)) */ +function sc_newline(p) { + if (p === undefined) // we assume not given + p = SC_DEFAULT_OUT; + p.appendJSString("\n"); +} + +/* ------------------ write-char ---------------------------------------------------*/ + +/*** META ((export #t)) */ +function sc_writeChar(c, p) { + if (p === undefined) // we assume not given + p = SC_DEFAULT_OUT; + p.appendJSString(c.val); +} + +/* ------------------ write-circle ---------------------------------------------------*/ + +/*** META ((export #t)) */ +function sc_writeCircle(o, p) { + if (p === undefined) // we assume not given + p = SC_DEFAULT_OUT; + p.appendJSString(sc_toWriteCircleString(o)); +} + +function sc_toWriteCircleString(o) { + var symb = sc_gensym("writeCircle"); + var nbPointer = new Object(); + nbPointer.nb = 0; + sc_prepWriteCircle(o, symb, nbPointer); + return sc_genToWriteCircleString(o, symb); +} + +function sc_prepWriteCircle(o, symb, nbPointer) { + // TODO sc_Struct + if (o instanceof sc_Pair || + o instanceof sc_Vector) { + if (o[symb] !== undefined) { + // not the first visit. + o[symb]++; + // unless there is already a number, assign one. + if (!o[symb + "nb"]) o[symb + "nb"] = nbPointer.nb++; + return; + } + o[symb] = 0; + if (o instanceof sc_Pair) { + sc_prepWriteCircle(o.car, symb, nbPointer); + sc_prepWriteCircle(o.cdr, symb, nbPointer); + } else { + for (var i = 0; i < o.length; i++) + sc_prepWriteCircle(o[i], symb, nbPointer); + } + } +} + +function sc_genToWriteCircleString(o, symb) { + if (!(o instanceof sc_Pair || + o instanceof sc_Vector)) + return sc_toWriteString(o); + return o.sc_toWriteCircleString(symb); +} +sc_Pair.prototype.sc_toWriteCircleString = function(symb, inList) { + if (this[symb + "use"]) { // use-flag is set. Just use it. + var nb = this[symb + "nb"]; + if (this[symb]-- === 0) { // if we are the last use. remove all fields. + delete this[symb]; + delete this[symb + "nb"]; + delete this[symb + "use"]; + } + if (inList) + return '. #' + nb + '#'; + else + return '#' + nb + '#'; + } + if (this[symb]-- === 0) { // if we are the last use. remove all fields. + delete this[symb]; + delete this[symb + "nb"]; + delete this[symb + "use"]; + } + + var res = ""; + + if (this[symb] !== undefined) { // implies > 0 + this[symb + "use"] = true; + if (inList) + res += '. #' + this[symb + "nb"] + '='; + else + res += '#' + this[symb + "nb"] + '='; + inList = false; + } + + if (!inList) + res += "("; + + // print car + res += sc_genToWriteCircleString(this.car, symb); + + if (sc_isPair(this.cdr)) { + res += " " + this.cdr.sc_toWriteCircleString(symb, true); + } else if (this.cdr !== null) { + res += " . " + sc_genToWriteCircleString(this.cdr, symb); + } + if (!inList) + res += ")"; + return res; +}; +sc_Vector.prototype.sc_toWriteCircleString = function(symb) { + if (this[symb + "use"]) { // use-flag is set. Just use it. + var nb = this[symb + "nb"]; + if (this[symb]-- === 0) { // if we are the last use. remove all fields. + delete this[symb]; + delete this[symb + "nb"]; + delete this[symb + "use"]; + } + return '#' + nb + '#'; + } + if (this[symb]-- === 0) { // if we are the last use. remove all fields. + delete this[symb]; + delete this[symb + "nb"]; + delete this[symb + "use"]; + } + + var res = ""; + if (this[symb] !== undefined) { // implies > 0 + this[symb + "use"] = true; + res += '#' + this[symb + "nb"] + '='; + } + res += "#("; + for (var i = 0; i < this.length; i++) { + res += sc_genToWriteCircleString(this[i], symb); + if (i < this.length - 1) res += " "; + } + res += ")"; + return res; +}; + + +/* ------------------ print ---------------------------------------------------*/ + +/*** META ((export #t)) */ +function sc_print(s) { + if (arguments.length === 1) { + sc_display(s); + sc_newline(); + } + else { + for (var i = 0; i < arguments.length; i++) + sc_display(arguments[i]); + sc_newline(); + } +} + +/* ------------------ format ---------------------------------------------------*/ +/*** META ((export #t)) */ +function sc_format(s, args) { + var len = s.length; + var p = new sc_StringOutputPort(); + var i = 0, j = 1; + + while( i < len ) { + var i2 = s.indexOf("~", i); + + if (i2 == -1) { + p.appendJSString( s.substring( i, len ) ); + return p.close(); + } else { + if (i2 > i) { + if (i2 == (len - 1)) { + p.appendJSString(s.substring(i, len)); + return p.close(); + } else { + p.appendJSString(s.substring(i, i2)); + i = i2; + } + } + + switch(s.charCodeAt(i2 + 1)) { + case 65: + case 97: + // a + sc_display(arguments[j], p); + i += 2; j++; + break; + + case 83: + case 115: + // s + sc_write(arguments[j], p); + i += 2; j++; + break; + + case 86: + case 118: + // v + sc_display(arguments[j], p); + p.appendJSString("\n"); + i += 2; j++; + break; + + case 67: + case 99: + // c + p.appendJSString(String.fromCharCode(arguments[j])); + i += 2; j++; + break; + + case 88: + case 120: + // x + p.appendJSString(arguments[j].toString(6)); + i += 2; j++; + break; + + case 79: + case 111: + // o + p.appendJSString(arguments[j].toString(8)); + i += 2; j++; + break; + + case 66: + case 98: + // b + p.appendJSString(arguments[j].toString(2)); + i += 2; j++; + break; + + case 37: + case 110: + // %, n + p.appendJSString("\n"); + i += 2; break; + + case 114: + // r + p.appendJSString("\r"); + i += 2; break; + + case 126: + // ~ + p.appendJSString("~"); + i += 2; break; + + default: + sc_error( "format: illegal ~" + + String.fromCharCode(s.charCodeAt(i2 + 1)) + + " sequence" ); + return ""; + } + } + } + + return p.close(); +} + +/* ------------------ global ports ---------------------------------------------------*/ + +var SC_DEFAULT_IN = new sc_ErrorInputPort(); +var SC_DEFAULT_OUT = new sc_ErrorOutputPort(); +var SC_ERROR_OUT = new sc_ErrorOutputPort(); + +var sc_SYMBOL_PREFIX = "\u1E9C"; +var sc_KEYWORD_PREFIX = "\u1E9D"; + +/*** META ((export #t) + (peephole (id))) */ +function sc_jsstring2string(s) { + return s; +} + +/*** META ((export #t) + (peephole (prefix "'\\u1E9C' +"))) +*/ +function sc_jsstring2symbol(s) { + return sc_SYMBOL_PREFIX + s; +} + +/*** META ((export #t) + (peephole (id))) +*/ +function sc_string2jsstring(s) { + return s; +} + +/*** META ((export #t) + (peephole (symbol2jsstring_immutable))) +*/ +function sc_symbol2jsstring(s) { + return s.slice(1); +} + +/*** META ((export #t) + (peephole (postfix ".slice(1)"))) +*/ +function sc_keyword2jsstring(k) { + return k.slice(1); +} + +/*** META ((export #t) + (peephole (prefix "'\\u1E9D' +"))) +*/ +function sc_jsstring2keyword(s) { + return sc_KEYWORD_PREFIX + s; +} + +/*** META ((export #t) + (type bool)) +*/ +function sc_isKeyword(s) { + return (typeof s === "string") && + (s.charAt(0) === sc_KEYWORD_PREFIX); +} + + +/*** META ((export #t)) */ +var sc_gensym = function() { + var counter = 1000; + return function(sym) { + counter++; + if (!sym) sym = sc_SYMBOL_PREFIX; + return sym + "s" + counter + "~" + "^sC-GeNsYm "; + }; +}(); + + +/*** META ((export #t) + (type bool)) +*/ +function sc_isEqual(o1, o2) { + return ((o1 === o2) || + (sc_isPair(o1) && sc_isPair(o2) + && sc_isPairEqual(o1, o2, sc_isEqual)) || + (sc_isVector(o1) && sc_isVector(o2) + && sc_isVectorEqual(o1, o2, sc_isEqual))); +} + +/*** META ((export number->symbol integer->symbol)) */ +function sc_number2symbol(x, radix) { + return sc_SYMBOL_PREFIX + sc_number2jsstring(x, radix); +} + +/*** META ((export number->string integer->string)) */ +var sc_number2string = sc_number2jsstring; + +/*** META ((export #t)) */ +function sc_symbol2number(s, radix) { + return sc_jsstring2number(s.slice(1), radix); +} + +/*** META ((export #t)) */ +var sc_string2number = sc_jsstring2number; + +/*** META ((export #t) + (peephole (prefix "+" s))) + ;; peephole will only apply if no radix is given. +*/ +function sc_string2integer(s, radix) { + if (!radix) return +s; + return parseInt(s, radix); +} + +/*** META ((export #t) + (peephole (prefix "+"))) +*/ +function sc_string2real(s) { + return +s; +} + + +/*** META ((export #t) + (type bool)) +*/ +function sc_isSymbol(s) { + return (typeof s === "string") && + (s.charAt(0) === sc_SYMBOL_PREFIX); +} + +/*** META ((export #t) + (peephole (symbol2string_immutable))) +*/ +function sc_symbol2string(s) { + return s.slice(1); +} + +/*** META ((export #t) + (peephole (prefix "'\\u1E9C' +"))) +*/ +function sc_string2symbol(s) { + return sc_SYMBOL_PREFIX + s; +} + +/*** META ((export symbol-append) + (peephole (symbolAppend_immutable))) +*/ +function sc_symbolAppend() { + var res = sc_SYMBOL_PREFIX; + for (var i = 0; i < arguments.length; i++) + res += arguments[i].slice(1); + return res; +} + +/*** META ((export #t) + (peephole (postfix ".val"))) +*/ +function sc_char2string(c) { return c.val; } + +/*** META ((export #t) + (peephole (hole 1 "'\\u1E9C' + " c ".val"))) +*/ +function sc_char2symbol(c) { return sc_SYMBOL_PREFIX + c.val; } + +/*** META ((export #t) + (type bool)) +*/ +function sc_isString(s) { + return (typeof s === "string") && + (s.charAt(0) !== sc_SYMBOL_PREFIX); +} + +/*** META ((export #t)) */ +var sc_makeString = sc_makejsString; + + +/*** META ((export #t)) */ +function sc_string() { + for (var i = 0; i < arguments.length; i++) + arguments[i] = arguments[i].val; + return "".concat.apply("", arguments); +} + +/*** META ((export #t) + (peephole (postfix ".length"))) +*/ +function sc_stringLength(s) { return s.length; } + +/*** META ((export #t)) */ +function sc_stringRef(s, k) { + return new sc_Char(s.charAt(k)); +} + +/* there's no stringSet in the immutable version +function sc_stringSet(s, k, c) +*/ + + +/*** META ((export string=?) + (type bool) + (peephole (hole 2 str1 " === " str2))) +*/ +function sc_isStringEqual(s1, s2) { + return s1 === s2; +} +/*** META ((export string?) + (type bool) + (peephole (hole 2 str1 " > " str2))) +*/ +function sc_isStringGreater(s1, s2) { + return s1 > s2; +} +/*** META ((export string<=?) + (type bool) + (peephole (hole 2 str1 " <= " str2))) +*/ +function sc_isStringLessEqual(s1, s2) { + return s1 <= s2; +} +/*** META ((export string>=?) + (type bool) + (peephole (hole 2 str1 " >= " str2))) +*/ +function sc_isStringGreaterEqual(s1, s2) { + return s1 >= s2; +} +/*** META ((export string-ci=?) + (type bool) + (peephole (hole 2 str1 ".toLowerCase() === " str2 ".toLowerCase()"))) +*/ +function sc_isStringCIEqual(s1, s2) { + return s1.toLowerCase() === s2.toLowerCase(); +} +/*** META ((export string-ci?) + (type bool) + (peephole (hole 2 str1 ".toLowerCase() > " str2 ".toLowerCase()"))) +*/ +function sc_isStringCIGreater(s1, s2) { + return s1.toLowerCase() > s2.toLowerCase(); +} +/*** META ((export string-ci<=?) + (type bool) + (peephole (hole 2 str1 ".toLowerCase() <= " str2 ".toLowerCase()"))) +*/ +function sc_isStringCILessEqual(s1, s2) { + return s1.toLowerCase() <= s2.toLowerCase(); +} +/*** META ((export string-ci>=?) + (type bool) + (peephole (hole 2 str1 ".toLowerCase() >= " str2 ".toLowerCase()"))) +*/ +function sc_isStringCIGreaterEqual(s1, s2) { + return s1.toLowerCase() >= s2.toLowerCase(); +} + +/*** META ((export #t) + (peephole (hole 3 s ".substring(" start ", " end ")"))) +*/ +function sc_substring(s, start, end) { + return s.substring(start, end); +} + +/*** META ((export #t)) +*/ +function sc_isSubstring_at(s1, s2, i) { + return s2 == s1.substring(i, i+ s2.length); +} + +/*** META ((export #t) + (peephole (infix 0 #f "+" "''"))) +*/ +function sc_stringAppend() { + return "".concat.apply("", arguments); +} + +/*** META ((export #t)) */ +var sc_string2list = sc_jsstring2list; + +/*** META ((export #t)) */ +var sc_list2string = sc_list2jsstring; + +/*** META ((export #t) + (peephole (id))) +*/ +function sc_stringCopy(s) { + return s; +} + +/* there's no string-fill in the immutable version +function sc_stringFill(s, c) +*/ + +/*** META ((export #t) + (peephole (postfix ".slice(1)"))) +*/ +function sc_keyword2string(o) { + return o.slice(1); +} + +/*** META ((export #t) + (peephole (prefix "'\\u1E9D' +"))) +*/ +function sc_string2keyword(o) { + return sc_KEYWORD_PREFIX + o; +} + +String.prototype.sc_toDisplayString = function() { + if (this.charAt(0) === sc_SYMBOL_PREFIX) + // TODO: care for symbols with spaces (escape-chars symbols). + return this.slice(1); + else if (this.charAt(0) === sc_KEYWORD_PREFIX) + return ":" + this.slice(1); + else + return this.toString(); +}; + +String.prototype.sc_toWriteString = function() { + if (this.charAt(0) === sc_SYMBOL_PREFIX) + // TODO: care for symbols with spaces (escape-chars symbols). + return this.slice(1); + else if (this.charAt(0) === sc_KEYWORD_PREFIX) + return ":" + this.slice(1); + else + return '"' + sc_escapeWriteString(this) + '"'; +}; +/* Exported Variables */ +var BgL_testzd2boyerzd2; +var BgL_nboyerzd2benchmarkzd2; +var BgL_setupzd2boyerzd2; +/* End Exports */ + +var translate_term_nboyer; +var translate_args_nboyer; +var untranslate_term_nboyer; +var BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer; +var BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer; +var translate_alist_nboyer; +var apply_subst_nboyer; +var apply_subst_lst_nboyer; +var tautologyp_nboyer; +var if_constructor_nboyer; +var rewrite_count_nboyer; +var rewrite_nboyer; +var rewrite_args_nboyer; +var unify_subst_nboyer; +var one_way_unify1_nboyer; +var false_term_nboyer; +var true_term_nboyer; +var trans_of_implies1_nboyer; +var is_term_equal_nboyer; +var is_term_member_nboyer; +var const_nboyer; +var sc_const_3_nboyer; +var sc_const_4_nboyer; +{ + (sc_const_4_nboyer = (new sc_Pair("\u1E9Cimplies",(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cu",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cu",(new sc_Pair("\u1E9Cw",null)))))),null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cw",null)))))),null))))))); + (sc_const_3_nboyer = sc_list((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccompile",(new sc_Pair("\u1E9Cform",null)))),(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Ccodegen",(new sc_Pair((new sc_Pair("\u1E9Coptimize",(new sc_Pair("\u1E9Cform",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ceqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreaterp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clesseqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatereqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cboolean",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ciff",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ceven1",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Codd",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccountps-",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Cpred",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccountps-loop",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Cpred",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfact-",(new sc_Pair("\u1E9Ci",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfact-loop",(new sc_Pair("\u1E9Ci",(new sc_Pair((1),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse-",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Creverse-loop",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdivides",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cassume-true",(new sc_Pair("\u1E9Cvar",(new sc_Pair("\u1E9Calist",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cvar",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))),(new sc_Pair("\u1E9Calist",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cassume-false",(new sc_Pair("\u1E9Cvar",(new sc_Pair("\u1E9Calist",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cvar",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))),(new sc_Pair("\u1E9Calist",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctautology-checker",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ctautologyp",(new sc_Pair((new sc_Pair("\u1E9Cnormalize",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfalsify",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfalsify1",(new sc_Pair((new sc_Pair("\u1E9Cnormalize",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cprime",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))),null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cprime1",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Cx",null)))),null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair("\u1E9Cp",(new sc_Pair("\u1E9Cq",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cq",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair("\u1E9Cp",(new sc_Pair("\u1E9Cq",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cq",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair("\u1E9Cp",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cp",(new sc_Pair("\u1E9Cq",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cq",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))))),(new sc_Pair("\u1E9Cd",(new sc_Pair("\u1E9Ce",null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cd",(new sc_Pair("\u1E9Ce",null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cd",(new sc_Pair("\u1E9Ce",null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Ca",null)))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cb",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cc",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair("\u1E9Ca",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair((new sc_Pair("\u1E9Cplus-fringe",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Ca",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cexec",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cpds",(new sc_Pair("\u1E9Cenvrn",null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cexec",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cexec",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cpds",(new sc_Pair("\u1E9Cenvrn",null)))))))),(new sc_Pair("\u1E9Cenvrn",null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmc-flatten",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Cy",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cb",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cy",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Cintersect",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Ck",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Ck",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Ck",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),(new sc_Pair("\u1E9Ck",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse-loop",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Cy",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse-loop",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccount-list",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Csort-lp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Ccount-list",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccount-list",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cbig-plus1",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair("\u1E9Ci",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cbig-plus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cbase",null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Ci",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cj",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cj",(new sc_Pair((1),null)))))),null)))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cpower-rep",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Ci",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cbig-plus",(new sc_Pair((new sc_Pair("\u1E9Cpower-rep",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cpower-rep",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair("\u1E9Cbase",null)))))))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair("\u1E9Cb",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Ca",null)))),null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cy",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cy",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cw",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Cx",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cb",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cy",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cz",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cvalue",(new sc_Pair((new sc_Pair("\u1E9Cnormalize",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cvalue",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnlistp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair((new sc_Pair("\u1E9Cgopher",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csamefringe",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatest-factor",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatest-factor",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((1),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((1),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair((new sc_Pair("\u1E9Cgreatest-factor",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes-list",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes-list",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ctimes-list",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cprime-list",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cprime-list",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cprime-list",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cz",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cw",(new sc_Pair((1),null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatereqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((1),null)))))),(new sc_Pair(sc_list("\u1E9Cand", (new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))), (new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cb",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))), (new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Ca",null)))), (new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cb",null)))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Ca",null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cl",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cl",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cl",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csort2",(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cl",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Csort2",(new sc_Pair("\u1E9Cl",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdsort",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Csort2",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx1",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx2",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx3",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx4",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx5",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx6",(new sc_Pair("\u1E9Cx7",null)))))),null)))))),null)))))),null)))))),null)))))),null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((6),(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cx7",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((2),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((2),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair("\u1E9Cy",(new sc_Pair((2),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csigma",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Ci",null)))),null)))))),(new sc_Pair((2),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cy",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cx",null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cz",null)))),null)))))),null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair("\u1E9Ca",null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cy",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Ci",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clast",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Clast",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Ca",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Ccar",(new sc_Pair((new sc_Pair("\u1E9Clast",(new sc_Pair("\u1E9Ca",null)))),null)))),(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair("\u1E9Cb",null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),(new sc_Pair("\u1E9Cz",null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cassignment",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cassignedp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cassignment",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cassignment",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cb",null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccar",(new sc_Pair((new sc_Pair("\u1E9Cgopher",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccar",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair((new sc_Pair("\u1E9Ccdr",(new sc_Pair((new sc_Pair("\u1E9Cgopher",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccdr",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cget",(new sc_Pair("\u1E9Cj",(new sc_Pair((new sc_Pair("\u1E9Cset",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cval",(new sc_Pair("\u1E9Cmem",null)))))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Ceqp",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair("\u1E9Cval",(new sc_Pair((new sc_Pair("\u1E9Cget",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Cmem",null)))))),null)))))))),null)))))))); + (const_nboyer = (new sc_Pair((new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cc",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cd",null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cu",(new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cb",null)))),null)))))),null)))))))),null))))))))))); + BgL_nboyerzd2benchmarkzd2 = function() { + var args = null; + for (var sc_tmp = arguments.length - 1; sc_tmp >= 0; sc_tmp--) { + args = sc_cons(arguments[sc_tmp], args); + } + var n; + return ((n = ((args === null)?(0):(args.car))), (BgL_setupzd2boyerzd2()), (BgL_runzd2benchmarkzd2(("nboyer"+(sc_number2string(n))), (1), function() { + return (BgL_testzd2boyerzd2(n)); + }, function(rewrites) { + if ((sc_isNumber(rewrites))) + switch (n) { + case (0): + assertEq(rewrites, 95024); + return true; + break; + case (1): + assertEq(rewrites, 591777); + return true; + break; + case (2): + assertEq(rewrites, 1813975); + return true; + break; + case (3): + assertEq(rewrites, 5375678); + return true; + break; + case (4): + assertEq(rewrites, 16445406); + return true; + break; + case (5): + assertEq(rewrites, 51507739); + return true; + break; + default: + return true; + break; + } + else + return false; + }))); + }; + BgL_setupzd2boyerzd2 = function() { + return true; + }; + BgL_testzd2boyerzd2 = function() { + return true; + }; + translate_term_nboyer = function(term) { + var lst; + return (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), ((lst = (term.cdr)), ((lst === null)?null:(new sc_Pair((translate_term_nboyer((lst.car))), (translate_args_nboyer((lst.cdr)))))))))); + }; + translate_args_nboyer = function(lst) { + var sc_lst_5; + var term; + return ((lst === null)?null:(new sc_Pair(((term = (lst.car)), (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr))))))), ((sc_lst_5 = (lst.cdr)), ((sc_lst_5 === null)?null:(new sc_Pair((translate_term_nboyer((sc_lst_5.car))), (translate_args_nboyer((sc_lst_5.cdr)))))))))); + }; + untranslate_term_nboyer = function(term) { + var optrOpnd; + var tail1131; + var L1127; + var falseHead1130; + var symbol_record; + if (!(term instanceof sc_Pair)) + return term; + else + { + (falseHead1130 = (new sc_Pair(null, null))); + (L1127 = (term.cdr)); + (tail1131 = falseHead1130); + while (!(L1127 === null)) { + { + (tail1131.cdr = (new sc_Pair((untranslate_term_nboyer((L1127.car))), null))); + (tail1131 = (tail1131.cdr)); + (L1127 = (L1127.cdr)); + } + } + (optrOpnd = (falseHead1130.cdr)); + return (new sc_Pair(((symbol_record = (term.car)), (symbol_record[(0)])), optrOpnd)); + } + }; + BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer = function(sym) { + var r; + var x; + return ((x = (sc_assq(sym, BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer))), ((x!== false)?(x.cdr):((r = [sym, null]), (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = (new sc_Pair((new sc_Pair(sym, r)), BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer))), r))); + }; + (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = null); + translate_alist_nboyer = function(alist) { + var sc_alist_6; + var term; + return ((alist === null)?null:(new sc_Pair((new sc_Pair((alist.car.car), ((term = (alist.car.cdr)), (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr))))))))), ((sc_alist_6 = (alist.cdr)), ((sc_alist_6 === null)?null:(new sc_Pair((new sc_Pair((sc_alist_6.car.car), (translate_term_nboyer((sc_alist_6.car.cdr))))), (translate_alist_nboyer((sc_alist_6.cdr)))))))))); + }; + apply_subst_nboyer = function(alist, term) { + var lst; + var temp_temp; + return (!(term instanceof sc_Pair)?((temp_temp = (sc_assq(term, alist))), ((temp_temp!== false)?(temp_temp.cdr):term)):(new sc_Pair((term.car), ((lst = (term.cdr)), ((lst === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (lst.car))), (apply_subst_lst_nboyer(alist, (lst.cdr)))))))))); + }; + apply_subst_lst_nboyer = function(alist, lst) { + var sc_lst_7; + return ((lst === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (lst.car))), ((sc_lst_7 = (lst.cdr)), ((sc_lst_7 === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (sc_lst_7.car))), (apply_subst_lst_nboyer(alist, (sc_lst_7.cdr)))))))))); + }; + tautologyp_nboyer = function(sc_x_11, true_lst, false_lst) { + var tmp1125; + var x; + var tmp1126; + var sc_x_8; + var sc_tmp1125_9; + var sc_tmp1126_10; + var sc_x_11; + var true_lst; + var false_lst; + while (true) { + if ((((sc_tmp1126_10 = (is_term_equal_nboyer(sc_x_11, true_term_nboyer))), ((sc_tmp1126_10!== false)?sc_tmp1126_10:(is_term_member_nboyer(sc_x_11, true_lst))))!== false)) + return true; + else + if ((((sc_tmp1125_9 = (is_term_equal_nboyer(sc_x_11, false_term_nboyer))), ((sc_tmp1125_9!== false)?sc_tmp1125_9:(is_term_member_nboyer(sc_x_11, false_lst))))!== false)) + return false; + else + if (!(sc_x_11 instanceof sc_Pair)) + return false; + else + if (((sc_x_11.car)===if_constructor_nboyer)) + if ((((sc_x_8 = (sc_x_11.cdr.car)), (tmp1126 = (is_term_equal_nboyer(sc_x_8, true_term_nboyer))), ((tmp1126!== false)?tmp1126:(is_term_member_nboyer(sc_x_8, true_lst))))!== false)) + (sc_x_11 = (sc_x_11.cdr.cdr.car)); + else + if ((((x = (sc_x_11.cdr.car)), (tmp1125 = (is_term_equal_nboyer(x, false_term_nboyer))), ((tmp1125!== false)?tmp1125:(is_term_member_nboyer(x, false_lst))))!== false)) + (sc_x_11 = (sc_x_11.cdr.cdr.cdr.car)); + else + if (((tautologyp_nboyer((sc_x_11.cdr.cdr.car), (new sc_Pair((sc_x_11.cdr.car), true_lst)), false_lst))!== false)) + { + (false_lst = (new sc_Pair((sc_x_11.cdr.car), false_lst))); + (sc_x_11 = (sc_x_11.cdr.cdr.cdr.car)); + } + else + return false; + else + return false; + } + }; + (if_constructor_nboyer = "\u1E9C*"); + (rewrite_count_nboyer = (0)); + rewrite_nboyer = function(term) { + var term2; + var sc_term_12; + var lst; + var symbol_record; + var sc_lst_13; + { + (++rewrite_count_nboyer); + if (!(term instanceof sc_Pair)) + return term; + else + { + (sc_term_12 = (new sc_Pair((term.car), ((sc_lst_13 = (term.cdr)), ((sc_lst_13 === null)?null:(new sc_Pair((rewrite_nboyer((sc_lst_13.car))), (rewrite_args_nboyer((sc_lst_13.cdr)))))))))); + (lst = ((symbol_record = (term.car)), (symbol_record[(1)]))); + while (true) { + if ((lst === null)) + return sc_term_12; + else + if ((((term2 = ((lst.car).cdr.car)), (unify_subst_nboyer = null), (one_way_unify1_nboyer(sc_term_12, term2)))!== false)) + return (rewrite_nboyer((apply_subst_nboyer(unify_subst_nboyer, ((lst.car).cdr.cdr.car))))); + else + (lst = (lst.cdr)); + } + } + } + }; + rewrite_args_nboyer = function(lst) { + var sc_lst_14; + return ((lst === null)?null:(new sc_Pair((rewrite_nboyer((lst.car))), ((sc_lst_14 = (lst.cdr)), ((sc_lst_14 === null)?null:(new sc_Pair((rewrite_nboyer((sc_lst_14.car))), (rewrite_args_nboyer((sc_lst_14.cdr)))))))))); + }; + (unify_subst_nboyer = "\u1E9C*"); + one_way_unify1_nboyer = function(term1, term2) { + var lst1; + var lst2; + var temp_temp; + if (!(term2 instanceof sc_Pair)) + { + (temp_temp = (sc_assq(term2, unify_subst_nboyer))); + if ((temp_temp!== false)) + return (is_term_equal_nboyer(term1, (temp_temp.cdr))); + else + if ((sc_isNumber(term2))) + return (sc_isEqual(term1, term2)); + else + { + (unify_subst_nboyer = (new sc_Pair((new sc_Pair(term2, term1)), unify_subst_nboyer))); + return true; + } + } + else + if (!(term1 instanceof sc_Pair)) + return false; + else + if (((term1.car)===(term2.car))) + { + (lst1 = (term1.cdr)); + (lst2 = (term2.cdr)); + while (true) { + if ((lst1 === null)) + return (lst2 === null); + else + if ((lst2 === null)) + return false; + else + if (((one_way_unify1_nboyer((lst1.car), (lst2.car)))!== false)) + { + (lst1 = (lst1.cdr)); + (lst2 = (lst2.cdr)); + } + else + return false; + } + } + else + return false; + }; + (false_term_nboyer = "\u1E9C*"); + (true_term_nboyer = "\u1E9C*"); + trans_of_implies1_nboyer = function(n) { + var sc_n_15; + return ((sc_isEqual(n, (1)))?(sc_list("\u1E9Cimplies", (0), (1))):(sc_list("\u1E9Cand", (sc_list("\u1E9Cimplies", (n-(1)), n)), ((sc_n_15 = (n-(1))), ((sc_isEqual(sc_n_15, (1)))?(sc_list("\u1E9Cimplies", (0), (1))):(sc_list("\u1E9Cand", (sc_list("\u1E9Cimplies", (sc_n_15-(1)), sc_n_15)), (trans_of_implies1_nboyer((sc_n_15-(1))))))))))); + }; + is_term_equal_nboyer = function(x, y) { + var lst1; + var lst2; + var r2; + var r1; + if ((x instanceof sc_Pair)) + if ((y instanceof sc_Pair)) + if ((((r1 = (x.car)), (r2 = (y.car)), (r1===r2))!== false)) + { + (lst1 = (x.cdr)); + (lst2 = (y.cdr)); + while (true) { + if ((lst1 === null)) + return (lst2 === null); + else + if ((lst2 === null)) + return false; + else + if (((is_term_equal_nboyer((lst1.car), (lst2.car)))!== false)) + { + (lst1 = (lst1.cdr)); + (lst2 = (lst2.cdr)); + } + else + return false; + } + } + else + return false; + else + return false; + else + return (sc_isEqual(x, y)); + }; + is_term_member_nboyer = function(x, lst) { + var x; + var lst; + while (true) { + if ((lst === null)) + return false; + else + if (((is_term_equal_nboyer(x, (lst.car)))!== false)) + return true; + else + (lst = (lst.cdr)); + } + }; + BgL_setupzd2boyerzd2 = function() { + var symbol_record; + var value; + var BgL_sc_symbolzd2record_16zd2; + var sym; + var sc_sym_17; + var term; + var lst; + var sc_term_18; + var sc_term_19; + { + (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = null); + (if_constructor_nboyer = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer("\u1E9Cif"))); + (false_term_nboyer = ((sc_term_19 = (new sc_Pair("\u1E9Cf",null))), (!(sc_term_19 instanceof sc_Pair)?sc_term_19:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_19.car))), (translate_args_nboyer((sc_term_19.cdr)))))))); + (true_term_nboyer = ((sc_term_18 = (new sc_Pair("\u1E9Ct",null))), (!(sc_term_18 instanceof sc_Pair)?sc_term_18:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_18.car))), (translate_args_nboyer((sc_term_18.cdr)))))))); + (lst = sc_const_3_nboyer); + while (!(lst === null)) { + { + (term = (lst.car)); + if (((term instanceof sc_Pair)&&(((term.car)==="\u1E9Cequal")&&((term.cdr.car) instanceof sc_Pair)))) + { + (sc_sym_17 = ((term.cdr.car).car)); + (value = (new sc_Pair((!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr)))))), ((sym = ((term.cdr.car).car)), (BgL_sc_symbolzd2record_16zd2 = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer(sym))), (BgL_sc_symbolzd2record_16zd2[(1)]))))); + (symbol_record = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer(sc_sym_17))); + (symbol_record[(1)] = value); + } + else + (sc_error("ADD-LEMMA did not like term: ", term)); + (lst = (lst.cdr)); + } + } + return true; + } + }; + BgL_testzd2boyerzd2 = function(n) { + var optrOpnd; + var term; + var sc_n_20; + var answer; + var sc_term_21; + var sc_term_22; + { + (rewrite_count_nboyer = (0)); + (term = sc_const_4_nboyer); + (sc_n_20 = n); + while (!(sc_n_20=== 0)) { + { + (term = (sc_list("\u1E9Cor", term, (new sc_Pair("\u1E9Cf",null))))); + (--sc_n_20); + } + } + (sc_term_22 = term); + if (!(sc_term_22 instanceof sc_Pair)) + (optrOpnd = sc_term_22); + else + (optrOpnd = (new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_22.car))), (translate_args_nboyer((sc_term_22.cdr)))))); + (sc_term_21 = (apply_subst_nboyer(((const_nboyer === null)?null:(new sc_Pair((new sc_Pair((const_nboyer.car.car), (translate_term_nboyer((const_nboyer.car.cdr))))), (translate_alist_nboyer((const_nboyer.cdr)))))), optrOpnd))); + (answer = (tautologyp_nboyer((rewrite_nboyer(sc_term_21)), null, null))); + (sc_write(rewrite_count_nboyer)); + (sc_display(" rewrites")); + (sc_newline()); + if ((answer!== false)) + return rewrite_count_nboyer; + else + return false; + } + }; +} +/* Exported Variables */ +var BgL_parsezd2ze3nbzd2treesze3; +var BgL_earleyzd2benchmarkzd2; +var BgL_parsezd2ze3parsedzf3zc2; +var test; +var BgL_parsezd2ze3treesz31; +var BgL_makezd2parserzd2; +/* End Exports */ + +var const_earley; +{ + (const_earley = (new sc_Pair((new sc_Pair("\u1E9Cs",(new sc_Pair((new sc_Pair("\u1E9Ca",null)),(new sc_Pair((new sc_Pair("\u1E9Cs",(new sc_Pair("\u1E9Cs",null)))),null)))))),null))); + BgL_makezd2parserzd2 = function(grammar, lexer) { + var i; + var parser_descr; + var def_loop; + var nb_nts; + var names; + var steps; + var predictors; + var enders; + var starters; + var nts; + var sc_names_1; + var sc_steps_2; + var sc_predictors_3; + var sc_enders_4; + var sc_starters_5; + var nb_confs; + var BgL_sc_defzd2loop_6zd2; + var BgL_sc_nbzd2nts_7zd2; + var sc_nts_8; + var BgL_sc_defzd2loop_9zd2; + var ind; + { + ind = function(nt, sc_nts_10) { + var i; + { + (i = ((sc_nts_10.length)-(1))); + while (true) { + if ((i>=(0))) + if ((sc_isEqual((sc_nts_10[i]), nt))) + return i; + else + (--i); + else + return false; + } + } + }; + (sc_nts_8 = ((BgL_sc_defzd2loop_9zd2 = function(defs, sc_nts_11) { + var rule_loop; + var head; + var def; + return ((defs instanceof sc_Pair)?((def = (defs.car)), (head = (def.car)), (rule_loop = function(rules, sc_nts_12) { + var nt; + var l; + var sc_nts_13; + var rule; + if ((rules instanceof sc_Pair)) + { + (rule = (rules.car)); + (l = rule); + (sc_nts_13 = sc_nts_12); + while ((l instanceof sc_Pair)) { + { + (nt = (l.car)); + (l = (l.cdr)); + (sc_nts_13 = (((sc_member(nt, sc_nts_13))!== false)?sc_nts_13:(new sc_Pair(nt, sc_nts_13)))); + } + } + return (rule_loop((rules.cdr), sc_nts_13)); + } + else + return (BgL_sc_defzd2loop_9zd2((defs.cdr), sc_nts_12)); + }), (rule_loop((def.cdr), (((sc_member(head, sc_nts_11))!== false)?sc_nts_11:(new sc_Pair(head, sc_nts_11)))))):(sc_list2vector((sc_reverse(sc_nts_11))))); + }), (BgL_sc_defzd2loop_9zd2(grammar, null)))); + (BgL_sc_nbzd2nts_7zd2 = (sc_nts_8.length)); + (nb_confs = (((BgL_sc_defzd2loop_6zd2 = function(defs, BgL_sc_nbzd2confs_14zd2) { + var rule_loop; + var def; + return ((defs instanceof sc_Pair)?((def = (defs.car)), (rule_loop = function(rules, BgL_sc_nbzd2confs_15zd2) { + var l; + var BgL_sc_nbzd2confs_16zd2; + var rule; + if ((rules instanceof sc_Pair)) + { + (rule = (rules.car)); + (l = rule); + (BgL_sc_nbzd2confs_16zd2 = BgL_sc_nbzd2confs_15zd2); + while ((l instanceof sc_Pair)) { + { + (l = (l.cdr)); + (++BgL_sc_nbzd2confs_16zd2); + } + } + return (rule_loop((rules.cdr), (BgL_sc_nbzd2confs_16zd2+(1)))); + } + else + return (BgL_sc_defzd2loop_6zd2((defs.cdr), BgL_sc_nbzd2confs_15zd2)); + }), (rule_loop((def.cdr), BgL_sc_nbzd2confs_14zd2))):BgL_sc_nbzd2confs_14zd2); + }), (BgL_sc_defzd2loop_6zd2(grammar, (0))))+BgL_sc_nbzd2nts_7zd2)); + (sc_starters_5 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null))); + (sc_enders_4 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null))); + (sc_predictors_3 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null))); + (sc_steps_2 = (sc_makeVector(nb_confs, false))); + (sc_names_1 = (sc_makeVector(nb_confs, false))); + (nts = sc_nts_8); + (starters = sc_starters_5); + (enders = sc_enders_4); + (predictors = sc_predictors_3); + (steps = sc_steps_2); + (names = sc_names_1); + (nb_nts = (sc_nts_8.length)); + (i = (nb_nts-(1))); + while ((i>=(0))) { + { + (sc_steps_2[i] = (i-nb_nts)); + (sc_names_1[i] = (sc_list((sc_nts_8[i]), (0)))); + (sc_enders_4[i] = (sc_list(i))); + (--i); + } + } + def_loop = function(defs, conf) { + var rule_loop; + var head; + var def; + return ((defs instanceof sc_Pair)?((def = (defs.car)), (head = (def.car)), (rule_loop = function(rules, conf, rule_num) { + var i; + var sc_i_17; + var nt; + var l; + var sc_conf_18; + var sc_i_19; + var rule; + if ((rules instanceof sc_Pair)) + { + (rule = (rules.car)); + (names[conf] = (sc_list(head, rule_num))); + (sc_i_19 = (ind(head, nts))); + (starters[sc_i_19] = (new sc_Pair(conf, (starters[sc_i_19])))); + (l = rule); + (sc_conf_18 = conf); + while ((l instanceof sc_Pair)) { + { + (nt = (l.car)); + (steps[sc_conf_18] = (ind(nt, nts))); + (sc_i_17 = (ind(nt, nts))); + (predictors[sc_i_17] = (new sc_Pair(sc_conf_18, (predictors[sc_i_17])))); + (l = (l.cdr)); + (++sc_conf_18); + } + } + (steps[sc_conf_18] = ((ind(head, nts))-nb_nts)); + (i = (ind(head, nts))); + (enders[i] = (new sc_Pair(sc_conf_18, (enders[i])))); + return (rule_loop((rules.cdr), (sc_conf_18+(1)), (rule_num+(1)))); + } + else + return (def_loop((defs.cdr), conf)); + }), (rule_loop((def.cdr), conf, (1)))):undefined); + }; + (def_loop(grammar, (sc_nts_8.length))); + (parser_descr = [lexer, sc_nts_8, sc_starters_5, sc_enders_4, sc_predictors_3, sc_steps_2, sc_names_1]); + return function(input) { + var optrOpnd; + var sc_optrOpnd_20; + var sc_optrOpnd_21; + var sc_optrOpnd_22; + var loop1; + var BgL_sc_stateza2_23za2; + var toks; + var BgL_sc_nbzd2nts_24zd2; + var sc_steps_25; + var sc_enders_26; + var state_num; + var BgL_sc_statesza2_27za2; + var states; + var i; + var conf; + var l; + var tok_nts; + var sc_i_28; + var sc_i_29; + var l1; + var l2; + var tok; + var tail1129; + var L1125; + var goal_enders; + var BgL_sc_statesza2_30za2; + var BgL_sc_nbzd2nts_31zd2; + var BgL_sc_nbzd2confs_32zd2; + var nb_toks; + var goal_starters; + var sc_states_33; + var BgL_sc_nbzd2confs_34zd2; + var BgL_sc_nbzd2toks_35zd2; + var sc_toks_36; + var falseHead1128; + var sc_names_37; + var sc_steps_38; + var sc_predictors_39; + var sc_enders_40; + var sc_starters_41; + var sc_nts_42; + var lexer; + var sc_ind_43; + var make_states; + var BgL_sc_confzd2setzd2getza2_44za2; + var conf_set_merge_new_bang; + var conf_set_adjoin; + var BgL_sc_confzd2setzd2adjoinza2_45za2; + var BgL_sc_confzd2setzd2adjoinza2za2_46z00; + var conf_set_union; + var forw; + var is_parsed; + var deriv_trees; + var BgL_sc_derivzd2treesza2_47z70; + var nb_deriv_trees; + var BgL_sc_nbzd2derivzd2treesza2_48za2; + { + sc_ind_43 = function(nt, sc_nts_49) { + var i; + { + (i = ((sc_nts_49.length)-(1))); + while (true) { + if ((i>=(0))) + if ((sc_isEqual((sc_nts_49[i]), nt))) + return i; + else + (--i); + else + return false; + } + } + }; + make_states = function(BgL_sc_nbzd2toks_50zd2, BgL_sc_nbzd2confs_51zd2) { + var v; + var i; + var sc_states_52; + { + (sc_states_52 = (sc_makeVector((BgL_sc_nbzd2toks_50zd2+(1)), false))); + (i = BgL_sc_nbzd2toks_50zd2); + while ((i>=(0))) { + { + (v = (sc_makeVector((BgL_sc_nbzd2confs_51zd2+(1)), false))); + (v[(0)] = (-1)); + (sc_states_52[i] = v); + (--i); + } + } + return sc_states_52; + } + }; + BgL_sc_confzd2setzd2getza2_44za2 = function(state, BgL_sc_statezd2num_53zd2, sc_conf_54) { + var conf_set; + var BgL_sc_confzd2set_55zd2; + return ((BgL_sc_confzd2set_55zd2 = (state[(sc_conf_54+(1))])), ((BgL_sc_confzd2set_55zd2!== false)?BgL_sc_confzd2set_55zd2:((conf_set = (sc_makeVector((BgL_sc_statezd2num_53zd2+(6)), false))), (conf_set[(1)] = (-3)), (conf_set[(2)] = (-1)), (conf_set[(3)] = (-1)), (conf_set[(4)] = (-1)), (state[(sc_conf_54+(1))] = conf_set), conf_set))); + }; + conf_set_merge_new_bang = function(conf_set) { + return ((conf_set[((conf_set[(1)])+(5))] = (conf_set[(4)])), (conf_set[(1)] = (conf_set[(3)])), (conf_set[(3)] = (-1)), (conf_set[(4)] = (-1))); + }; + conf_set_adjoin = function(state, conf_set, sc_conf_56, i) { + var tail; + return ((tail = (conf_set[(3)])), (conf_set[(i+(5))] = (-1)), (conf_set[(tail+(5))] = i), (conf_set[(3)] = i), ((tail<(0))?((conf_set[(0)] = (state[(0)])), (state[(0)] = sc_conf_56)):undefined)); + }; + BgL_sc_confzd2setzd2adjoinza2_45za2 = function(sc_states_57, BgL_sc_statezd2num_58zd2, l, i) { + var conf_set; + var sc_conf_59; + var l1; + var state; + { + (state = (sc_states_57[BgL_sc_statezd2num_58zd2])); + (l1 = l); + while ((l1 instanceof sc_Pair)) { + { + (sc_conf_59 = (l1.car)); + (conf_set = (BgL_sc_confzd2setzd2getza2_44za2(state, BgL_sc_statezd2num_58zd2, sc_conf_59))); + if (((conf_set[(i+(5))])=== false)) + { + (conf_set_adjoin(state, conf_set, sc_conf_59, i)); + (l1 = (l1.cdr)); + } + else + (l1 = (l1.cdr)); + } + } + return undefined; + } + }; + BgL_sc_confzd2setzd2adjoinza2za2_46z00 = function(sc_states_60, BgL_sc_statesza2_61za2, BgL_sc_statezd2num_62zd2, sc_conf_63, i) { + var BgL_sc_confzd2setza2_64z70; + var BgL_sc_stateza2_65za2; + var conf_set; + var state; + return ((state = (sc_states_60[BgL_sc_statezd2num_62zd2])), ((((conf_set = (state[(sc_conf_63+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)?((BgL_sc_stateza2_65za2 = (BgL_sc_statesza2_61za2[BgL_sc_statezd2num_62zd2])), (BgL_sc_confzd2setza2_64z70 = (BgL_sc_confzd2setzd2getza2_44za2(BgL_sc_stateza2_65za2, BgL_sc_statezd2num_62zd2, sc_conf_63))), (((BgL_sc_confzd2setza2_64z70[(i+(5))])=== false)?(conf_set_adjoin(BgL_sc_stateza2_65za2, BgL_sc_confzd2setza2_64z70, sc_conf_63, i)):undefined), true):false)); + }; + conf_set_union = function(state, conf_set, sc_conf_66, other_set) { + var i; + { + (i = (other_set[(2)])); + while ((i>=(0))) { + if (((conf_set[(i+(5))])=== false)) + { + (conf_set_adjoin(state, conf_set, sc_conf_66, i)); + (i = (other_set[(i+(5))])); + } + else + (i = (other_set[(i+(5))])); + } + return undefined; + } + }; + forw = function(sc_states_67, BgL_sc_statezd2num_68zd2, sc_starters_69, sc_enders_70, sc_predictors_71, sc_steps_72, sc_nts_73) { + var next_set; + var next; + var conf_set; + var ender; + var l; + var starter_set; + var starter; + var sc_l_74; + var sc_loop1_75; + var head; + var BgL_sc_confzd2set_76zd2; + var BgL_sc_statezd2num_77zd2; + var state; + var sc_states_78; + var preds; + var BgL_sc_confzd2set_79zd2; + var step; + var sc_conf_80; + var BgL_sc_nbzd2nts_81zd2; + var sc_state_82; + { + (sc_state_82 = (sc_states_67[BgL_sc_statezd2num_68zd2])); + (BgL_sc_nbzd2nts_81zd2 = (sc_nts_73.length)); + while (true) { + { + (sc_conf_80 = (sc_state_82[(0)])); + if ((sc_conf_80>=(0))) + { + (step = (sc_steps_72[sc_conf_80])); + (BgL_sc_confzd2set_79zd2 = (sc_state_82[(sc_conf_80+(1))])); + (head = (BgL_sc_confzd2set_79zd2[(4)])); + (sc_state_82[(0)] = (BgL_sc_confzd2set_79zd2[(0)])); + (conf_set_merge_new_bang(BgL_sc_confzd2set_79zd2)); + if ((step>=(0))) + { + (sc_l_74 = (sc_starters_69[step])); + while ((sc_l_74 instanceof sc_Pair)) { + { + (starter = (sc_l_74.car)); + (starter_set = (BgL_sc_confzd2setzd2getza2_44za2(sc_state_82, BgL_sc_statezd2num_68zd2, starter))); + if (((starter_set[(BgL_sc_statezd2num_68zd2+(5))])=== false)) + { + (conf_set_adjoin(sc_state_82, starter_set, starter, BgL_sc_statezd2num_68zd2)); + (sc_l_74 = (sc_l_74.cdr)); + } + else + (sc_l_74 = (sc_l_74.cdr)); + } + } + (l = (sc_enders_70[step])); + while ((l instanceof sc_Pair)) { + { + (ender = (l.car)); + if ((((conf_set = (sc_state_82[(ender+(1))])), ((conf_set!== false)?(conf_set[(BgL_sc_statezd2num_68zd2+(5))]):false))!== false)) + { + (next = (sc_conf_80+(1))); + (next_set = (BgL_sc_confzd2setzd2getza2_44za2(sc_state_82, BgL_sc_statezd2num_68zd2, next))); + (conf_set_union(sc_state_82, next_set, next, BgL_sc_confzd2set_79zd2)); + (l = (l.cdr)); + } + else + (l = (l.cdr)); + } + } + } + else + { + (preds = (sc_predictors_71[(step+BgL_sc_nbzd2nts_81zd2)])); + (sc_states_78 = sc_states_67); + (state = sc_state_82); + (BgL_sc_statezd2num_77zd2 = BgL_sc_statezd2num_68zd2); + (BgL_sc_confzd2set_76zd2 = BgL_sc_confzd2set_79zd2); + sc_loop1_75 = function(l) { + var sc_state_83; + var BgL_sc_nextzd2set_84zd2; + var sc_next_85; + var pred_set; + var i; + var pred; + if ((l instanceof sc_Pair)) + { + (pred = (l.car)); + (i = head); + while ((i>=(0))) { + { + (pred_set = ((sc_state_83 = (sc_states_78[i])), (sc_state_83[(pred+(1))]))); + if ((pred_set!== false)) + { + (sc_next_85 = (pred+(1))); + (BgL_sc_nextzd2set_84zd2 = (BgL_sc_confzd2setzd2getza2_44za2(state, BgL_sc_statezd2num_77zd2, sc_next_85))); + (conf_set_union(state, BgL_sc_nextzd2set_84zd2, sc_next_85, pred_set)); + } + (i = (BgL_sc_confzd2set_76zd2[(i+(5))])); + } + } + return (sc_loop1_75((l.cdr))); + } + else + return undefined; + }; + (sc_loop1_75(preds)); + } + } + else + return undefined; + } + } + } + }; + is_parsed = function(nt, i, j, sc_nts_86, sc_enders_87, sc_states_88) { + var conf_set; + var state; + var sc_conf_89; + var l; + var BgL_sc_ntza2_90za2; + { + (BgL_sc_ntza2_90za2 = (sc_ind_43(nt, sc_nts_86))); + if ((BgL_sc_ntza2_90za2!== false)) + { + (sc_nts_86.length); + (l = (sc_enders_87[BgL_sc_ntza2_90za2])); + while (true) { + if ((l instanceof sc_Pair)) + { + (sc_conf_89 = (l.car)); + if ((((state = (sc_states_88[j])), (conf_set = (state[(sc_conf_89+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)) + return true; + else + (l = (l.cdr)); + } + else + return false; + } + } + else + return false; + } + }; + deriv_trees = function(sc_conf_91, i, j, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2) { + var sc_loop1_98; + var prev; + var name; + return ((name = (sc_names_94[sc_conf_91])), ((name!== false)?((sc_conf_91=(0))) + if (((k>=i)&&(((sc_state_99 = (sc_states_96[k])), (conf_set = (sc_state_99[(prev+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))) + { + (prev_trees = (deriv_trees(prev, i, k, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2))); + (ender_trees = (deriv_trees(ender, k, j, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2))); + loop3 = function(l3, l2) { + var l4; + var sc_l2_100; + var ender_tree; + if ((l3 instanceof sc_Pair)) + { + (ender_tree = (sc_list((l3.car)))); + (l4 = prev_trees); + (sc_l2_100 = l2); + while ((l4 instanceof sc_Pair)) { + { + (sc_l2_100 = (new sc_Pair((sc_append((l4.car), ender_tree)), sc_l2_100))); + (l4 = (l4.cdr)); + } + } + return (loop3((l3.cdr), sc_l2_100)); + } + else + return (loop2((ender_set[(k+(5))]), l2)); + }; + return (loop3(ender_trees, l2)); + } + else + (k = (ender_set[(k+(5))])); + else + return (sc_loop1_98((l1.cdr), l2)); + } + }; + return (loop2((ender_set[(2)]), l2)); + } + else + (l1 = (l1.cdr)); + } + else + return l2; + } + }), (sc_loop1_98((sc_enders_92[(sc_steps_93[prev])]), null))))); + }; + BgL_sc_derivzd2treesza2_47z70 = function(nt, i, j, sc_nts_101, sc_enders_102, sc_steps_103, sc_names_104, sc_toks_105, sc_states_106) { + var conf_set; + var state; + var sc_conf_107; + var l; + var trees; + var BgL_sc_nbzd2nts_108zd2; + var BgL_sc_ntza2_109za2; + { + (BgL_sc_ntza2_109za2 = (sc_ind_43(nt, sc_nts_101))); + if ((BgL_sc_ntza2_109za2!== false)) + { + (BgL_sc_nbzd2nts_108zd2 = (sc_nts_101.length)); + (l = (sc_enders_102[BgL_sc_ntza2_109za2])); + (trees = null); + while ((l instanceof sc_Pair)) { + { + (sc_conf_107 = (l.car)); + if ((((state = (sc_states_106[j])), (conf_set = (state[(sc_conf_107+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)) + { + (l = (l.cdr)); + (trees = (sc_append((deriv_trees(sc_conf_107, i, j, sc_enders_102, sc_steps_103, sc_names_104, sc_toks_105, sc_states_106, BgL_sc_nbzd2nts_108zd2)), trees))); + } + else + (l = (l.cdr)); + } + } + return trees; + } + else + return false; + } + }; + nb_deriv_trees = function(sc_conf_110, i, j, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2) { + var sc_loop1_116; + var tmp1124; + var prev; + return ((prev = (sc_conf_110-(1))), ((((tmp1124 = (sc_conf_110=(0))) { + if (((k>=i)&&(((state = (sc_states_114[k])), (conf_set = (state[(prev+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))) + { + (nb_prev_trees = (nb_deriv_trees(prev, i, k, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2))); + (nb_ender_trees = (nb_deriv_trees(ender, k, j, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2))); + (k = (ender_set[(k+(5))])); + (n +=(nb_prev_trees*nb_ender_trees)); + } + else + (k = (ender_set[(k+(5))])); + } + return (sc_loop1_116((l.cdr), n)); + } + else + (l = (l.cdr)); + } + else + return sc_n_118; + } + }), (sc_loop1_116((sc_enders_111[(sc_steps_112[prev])]), (0)))))); + }; + BgL_sc_nbzd2derivzd2treesza2_48za2 = function(nt, i, j, sc_nts_119, sc_enders_120, sc_steps_121, sc_toks_122, sc_states_123) { + var conf_set; + var state; + var sc_conf_124; + var l; + var nb_trees; + var BgL_sc_nbzd2nts_125zd2; + var BgL_sc_ntza2_126za2; + { + (BgL_sc_ntza2_126za2 = (sc_ind_43(nt, sc_nts_119))); + if ((BgL_sc_ntza2_126za2!== false)) + { + (BgL_sc_nbzd2nts_125zd2 = (sc_nts_119.length)); + (l = (sc_enders_120[BgL_sc_ntza2_126za2])); + (nb_trees = (0)); + while ((l instanceof sc_Pair)) { + { + (sc_conf_124 = (l.car)); + if ((((state = (sc_states_123[j])), (conf_set = (state[(sc_conf_124+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)) + { + (l = (l.cdr)); + (nb_trees = ((nb_deriv_trees(sc_conf_124, i, j, sc_enders_120, sc_steps_121, sc_toks_122, sc_states_123, BgL_sc_nbzd2nts_125zd2))+nb_trees)); + } + else + (l = (l.cdr)); + } + } + return nb_trees; + } + else + return false; + } + }; + (lexer = (parser_descr[(0)])); + (sc_nts_42 = (parser_descr[(1)])); + (sc_starters_41 = (parser_descr[(2)])); + (sc_enders_40 = (parser_descr[(3)])); + (sc_predictors_39 = (parser_descr[(4)])); + (sc_steps_38 = (parser_descr[(5)])); + (sc_names_37 = (parser_descr[(6)])); + (falseHead1128 = (new sc_Pair(null, null))); + (L1125 = (lexer(input))); + (tail1129 = falseHead1128); + while (!(L1125 === null)) { + { + (tok = (L1125.car)); + (l1 = (tok.cdr)); + (l2 = null); + while ((l1 instanceof sc_Pair)) { + { + (sc_i_29 = (sc_ind_43((l1.car), sc_nts_42))); + if ((sc_i_29!== false)) + { + (l1 = (l1.cdr)); + (l2 = (new sc_Pair(sc_i_29, l2))); + } + else + (l1 = (l1.cdr)); + } + } + (sc_optrOpnd_22 = (new sc_Pair((tok.car), (sc_reverse(l2))))); + (sc_optrOpnd_21 = (new sc_Pair(sc_optrOpnd_22, null))); + (tail1129.cdr = sc_optrOpnd_21); + (tail1129 = (tail1129.cdr)); + (L1125 = (L1125.cdr)); + } + } + (sc_optrOpnd_20 = (falseHead1128.cdr)); + (sc_toks_36 = (sc_list2vector(sc_optrOpnd_20))); + (BgL_sc_nbzd2toks_35zd2 = (sc_toks_36.length)); + (BgL_sc_nbzd2confs_34zd2 = (sc_steps_38.length)); + (sc_states_33 = (make_states(BgL_sc_nbzd2toks_35zd2, BgL_sc_nbzd2confs_34zd2))); + (goal_starters = (sc_starters_41[(0)])); + (BgL_sc_confzd2setzd2adjoinza2_45za2(sc_states_33, (0), goal_starters, (0))); + (forw(sc_states_33, (0), sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_nts_42)); + (sc_i_28 = (0)); + while ((sc_i_28=(0))) { + { + (states = sc_states_33); + (BgL_sc_statesza2_27za2 = BgL_sc_statesza2_30za2); + (state_num = i); + (sc_enders_26 = sc_enders_40); + (sc_steps_25 = sc_steps_38); + (BgL_sc_nbzd2nts_24zd2 = BgL_sc_nbzd2nts_31zd2); + (toks = sc_toks_36); + (BgL_sc_stateza2_23za2 = (BgL_sc_statesza2_30za2[i])); + loop1 = function() { + var sc_loop1_127; + var prev; + var BgL_sc_statesza2_128za2; + var sc_states_129; + var j; + var i; + var sc_i_130; + var head; + var conf_set; + var sc_conf_131; + { + (sc_conf_131 = (BgL_sc_stateza2_23za2[(0)])); + if ((sc_conf_131>=(0))) + { + (conf_set = (BgL_sc_stateza2_23za2[(sc_conf_131+(1))])); + (head = (conf_set[(4)])); + (BgL_sc_stateza2_23za2[(0)] = (conf_set[(0)])); + (conf_set_merge_new_bang(conf_set)); + (sc_i_130 = head); + while ((sc_i_130>=(0))) { + { + (i = sc_i_130); + (j = state_num); + (sc_states_129 = states); + (BgL_sc_statesza2_128za2 = BgL_sc_statesza2_27za2); + (prev = (sc_conf_131-(1))); + if (((sc_conf_131>=BgL_sc_nbzd2nts_24zd2)&&((sc_steps_25[prev])>=(0)))) + { + sc_loop1_127 = function(l) { + var k; + var ender_set; + var state; + var ender; + var l; + while (true) { + if ((l instanceof sc_Pair)) + { + (ender = (l.car)); + (ender_set = ((state = (sc_states_129[j])), (state[(ender+(1))]))); + if ((ender_set!== false)) + { + (k = (ender_set[(2)])); + while ((k>=(0))) { + { + if ((k>=i)) + if (((BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_129, BgL_sc_statesza2_128za2, k, prev, i))!== false)) + (BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_129, BgL_sc_statesza2_128za2, j, ender, k)); + (k = (ender_set[(k+(5))])); + } + } + return (sc_loop1_127((l.cdr))); + } + else + (l = (l.cdr)); + } + else + return undefined; + } + }; + (sc_loop1_127((sc_enders_26[(sc_steps_25[prev])]))); + } + (sc_i_130 = (conf_set[(sc_i_130+(5))])); + } + } + return (loop1()); + } + else + return undefined; + } + }; + (loop1()); + (--i); + } + } + (optrOpnd = BgL_sc_statesza2_30za2); + return [sc_nts_42, sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_names_37, sc_toks_36, optrOpnd, is_parsed, BgL_sc_derivzd2treesza2_47z70, BgL_sc_nbzd2derivzd2treesza2_48za2]; + } + }; + } + }; + BgL_parsezd2ze3parsedzf3zc2 = function(parse, nt, i, j) { + var is_parsed; + var states; + var enders; + var nts; + return ((nts = (parse[(0)])), (enders = (parse[(2)])), (states = (parse[(7)])), (is_parsed = (parse[(8)])), (is_parsed(nt, i, j, nts, enders, states))); + }; + BgL_parsezd2ze3treesz31 = function(parse, nt, i, j) { + var BgL_sc_derivzd2treesza2_132z70; + var states; + var toks; + var names; + var steps; + var enders; + var nts; + return ((nts = (parse[(0)])), (enders = (parse[(2)])), (steps = (parse[(4)])), (names = (parse[(5)])), (toks = (parse[(6)])), (states = (parse[(7)])), (BgL_sc_derivzd2treesza2_132z70 = (parse[(9)])), (BgL_sc_derivzd2treesza2_132z70(nt, i, j, nts, enders, steps, names, toks, states))); + }; + BgL_parsezd2ze3nbzd2treesze3 = function(parse, nt, i, j) { + var BgL_sc_nbzd2derivzd2treesza2_133za2; + var states; + var toks; + var steps; + var enders; + var nts; + return ((nts = (parse[(0)])), (enders = (parse[(2)])), (steps = (parse[(4)])), (toks = (parse[(6)])), (states = (parse[(7)])), (BgL_sc_nbzd2derivzd2treesza2_133za2 = (parse[(10)])), (BgL_sc_nbzd2derivzd2treesza2_133za2(nt, i, j, nts, enders, steps, toks, states))); + }; + test = function(k) { + var x; + var p; + return ((p = (BgL_makezd2parserzd2(const_earley, function(l) { + var sc_x_134; + var tail1134; + var L1130; + var falseHead1133; + { + (falseHead1133 = (new sc_Pair(null, null))); + (tail1134 = falseHead1133); + (L1130 = l); + while (!(L1130 === null)) { + { + (tail1134.cdr = (new sc_Pair(((sc_x_134 = (L1130.car)), (sc_list(sc_x_134, sc_x_134))), null))); + (tail1134 = (tail1134.cdr)); + (L1130 = (L1130.cdr)); + } + } + return (falseHead1133.cdr); + } + }))), (x = (p((sc_vector2list((sc_makeVector(k, "\u1E9Ca"))))))), (sc_length((BgL_parsezd2ze3treesz31(x, "\u1E9Cs", (0), k))))); + }; + BgL_earleyzd2benchmarkzd2 = function() { + var args = null; + for (var sc_tmp = arguments.length - 1; sc_tmp >= 0; sc_tmp--) { + args = sc_cons(arguments[sc_tmp], args); + } + var k; + return ((k = ((args === null)?(7):(args.car))), (BgL_runzd2benchmarkzd2("earley", (1), function() { + return (test(k)); + }, function(result) { + return ((sc_display(result)), (sc_newline()), result == 132); + }))); + }; +} + + +/************* END OF GENERATED CODE *************/ +// Invoke this function to run a benchmark. +// The first argument is a string identifying the benchmark. +// The second argument is the number of times to run the benchmark. +// The third argument is a function that runs the benchmark. +// The fourth argument is a unary function that warns if the result +// returned by the benchmark is incorrect. +// +// Example: +// RunBenchmark("new Array()", +// 1, +// function () { new Array(1000000); } +// function (v) { +// return (v instanceof Array) && (v.length == 1000000); +// }); + +SC_DEFAULT_OUT = new sc_GenericOutputPort(function(s) {}); +SC_ERROR_OUT = SC_DEFAULT_OUT; + +function RunBenchmark(name, count, run, warn) { + for (var n = 0; n < count; ++n) { + result = run(); + if (!warn(result)) { + throw new Error("Earley or Boyer did incorrect number of rewrites"); + } + } +} + +var BgL_runzd2benchmarkzd2 = RunBenchmark; + + +(function () { BgL_earleyzd2benchmarkzd2(); })(); +(function () { BgL_nboyerzd2benchmarkzd2(); })(); diff --git a/js/src/jit-test/tests/v8-v5/check-raytrace.js b/js/src/jit-test/tests/v8-v5/check-raytrace.js new file mode 100644 index 0000000000..901cb3f3ec --- /dev/null +++ b/js/src/jit-test/tests/v8-v5/check-raytrace.js @@ -0,0 +1,935 @@ +// The ray tracer code in this file is written by Adam Burmister. It +// is available in its original form from: +// +// http://labs.flog.nz.co/raytracer/ +// +// It has been modified slightly by Google to work as a standalone +// benchmark, but the all the computational code remains +// untouched. This file also contains a copy of parts of the Prototype +// JavaScript framework which is used by the ray tracer. + +//var RayTrace = new BenchmarkSuite('RayTrace', 932666, [ +// new Benchmark('RayTrace', renderScene) +//]); + + +// Variable used to hold a number that can be used to verify that +// the scene was ray traced correctly. +var checkNumber; + + +// ------------------------------------------------------------------------ +// ------------------------------------------------------------------------ + +// The following is a copy of parts of the Prototype JavaScript library: + +// Prototype JavaScript framework, version 1.5.0 +// (c) 2005-2007 Sam Stephenson +// +// Prototype is freely distributable under the terms of an MIT-style license. +// For details, see the Prototype web site: http://prototype.conio.net/ + + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +}; + + +Object.extend = function(destination, source) { + for (var property in source) { + destination[property] = source[property]; + } + return destination; +}; + + +// ------------------------------------------------------------------------ +// ------------------------------------------------------------------------ + +// The rest of this file is the actual ray tracer written by Adam +// Burmister. It's a concatenation of the following files: +// +// flog/color.js +// flog/light.js +// flog/vector.js +// flog/ray.js +// flog/scene.js +// flog/material/basematerial.js +// flog/material/solid.js +// flog/material/chessboard.js +// flog/shape/baseshape.js +// flog/shape/sphere.js +// flog/shape/plane.js +// flog/intersectioninfo.js +// flog/camera.js +// flog/background.js +// flog/engine.js + + +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; + +Flog.RayTracer.Color = Class.create(); + +Flog.RayTracer.Color.prototype = { + red : 0.0, + green : 0.0, + blue : 0.0, + + initialize : function(r, g, b) { + if(!r) r = 0.0; + if(!g) g = 0.0; + if(!b) b = 0.0; + + this.red = r; + this.green = g; + this.blue = b; + }, + + add : function(c1, c2){ + var result = new Flog.RayTracer.Color(0,0,0); + + result.red = c1.red + c2.red; + result.green = c1.green + c2.green; + result.blue = c1.blue + c2.blue; + + return result; + }, + + addScalar: function(c1, s){ + var result = new Flog.RayTracer.Color(0,0,0); + + result.red = c1.red + s; + result.green = c1.green + s; + result.blue = c1.blue + s; + + result.limit(); + + return result; + }, + + subtract: function(c1, c2){ + var result = new Flog.RayTracer.Color(0,0,0); + + result.red = c1.red - c2.red; + result.green = c1.green - c2.green; + result.blue = c1.blue - c2.blue; + + return result; + }, + + multiply : function(c1, c2) { + var result = new Flog.RayTracer.Color(0,0,0); + + result.red = c1.red * c2.red; + result.green = c1.green * c2.green; + result.blue = c1.blue * c2.blue; + + return result; + }, + + multiplyScalar : function(c1, f) { + var result = new Flog.RayTracer.Color(0,0,0); + + result.red = c1.red * f; + result.green = c1.green * f; + result.blue = c1.blue * f; + + return result; + }, + + divideFactor : function(c1, f) { + var result = new Flog.RayTracer.Color(0,0,0); + + result.red = c1.red / f; + result.green = c1.green / f; + result.blue = c1.blue / f; + + return result; + }, + + limit: function(){ + this.red = (this.red > 0.0) ? ( (this.red > 1.0) ? 1.0 : this.red ) : 0.0; + this.green = (this.green > 0.0) ? ( (this.green > 1.0) ? 1.0 : this.green ) : 0.0; + this.blue = (this.blue > 0.0) ? ( (this.blue > 1.0) ? 1.0 : this.blue ) : 0.0; + }, + + distance : function(color) { + var d = Math.abs(this.red - color.red) + Math.abs(this.green - color.green) + Math.abs(this.blue - color.blue); + return d; + }, + + blend: function(c1, c2, w){ + var result = new Flog.RayTracer.Color(0,0,0); + result = Flog.RayTracer.Color.prototype.add( + Flog.RayTracer.Color.prototype.multiplyScalar(c1, 1 - w), + Flog.RayTracer.Color.prototype.multiplyScalar(c2, w) + ); + return result; + }, + + brightness : function() { + var r = Math.floor(this.red*255); + var g = Math.floor(this.green*255); + var b = Math.floor(this.blue*255); + return (r * 77 + g * 150 + b * 29) >> 8; + }, + + toString : function () { + var r = Math.floor(this.red*255); + var g = Math.floor(this.green*255); + var b = Math.floor(this.blue*255); + + return "rgb("+ r +","+ g +","+ b +")"; + } +} +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; + +Flog.RayTracer.Light = Class.create(); + +Flog.RayTracer.Light.prototype = { + position: null, + color: null, + intensity: 10.0, + + initialize : function(pos, color, intensity) { + this.position = pos; + this.color = color; + this.intensity = (intensity ? intensity : 10.0); + }, + + getIntensity: function(distance){ + if(distance >= intensity) return 0; + + return Math.pow((intensity - distance) / strength, 0.2); + }, + + toString : function () { + return 'Light [' + this.position.x + ',' + this.position.y + ',' + this.position.z + ']'; + } +} +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; + +Flog.RayTracer.Vector = Class.create(); + +Flog.RayTracer.Vector.prototype = { + x : 0.0, + y : 0.0, + z : 0.0, + + initialize : function(x, y, z) { + this.x = (x ? x : 0); + this.y = (y ? y : 0); + this.z = (z ? z : 0); + }, + + copy: function(vector){ + this.x = vector.x; + this.y = vector.y; + this.z = vector.z; + }, + + normalize : function() { + var m = this.magnitude(); + return new Flog.RayTracer.Vector(this.x / m, this.y / m, this.z / m); + }, + + magnitude : function() { + return Math.sqrt((this.x * this.x) + (this.y * this.y) + (this.z * this.z)); + }, + + cross : function(w) { + return new Flog.RayTracer.Vector( + -this.z * w.y + this.y * w.z, + this.z * w.x - this.x * w.z, + -this.y * w.x + this.x * w.y); + }, + + dot : function(w) { + return this.x * w.x + this.y * w.y + this.z * w.z; + }, + + add : function(v, w) { + return new Flog.RayTracer.Vector(w.x + v.x, w.y + v.y, w.z + v.z); + }, + + subtract : function(v, w) { + if(!w || !v) throw 'Vectors must be defined [' + v + ',' + w + ']'; + return new Flog.RayTracer.Vector(v.x - w.x, v.y - w.y, v.z - w.z); + }, + + multiplyVector : function(v, w) { + return new Flog.RayTracer.Vector(v.x * w.x, v.y * w.y, v.z * w.z); + }, + + multiplyScalar : function(v, w) { + return new Flog.RayTracer.Vector(v.x * w, v.y * w, v.z * w); + }, + + toString : function () { + return 'Vector [' + this.x + ',' + this.y + ',' + this.z + ']'; + } +} +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; + +Flog.RayTracer.Ray = Class.create(); + +Flog.RayTracer.Ray.prototype = { + position : null, + direction : null, + initialize : function(pos, dir) { + this.position = pos; + this.direction = dir; + }, + + toString : function () { + return 'Ray [' + this.position + ',' + this.direction + ']'; + } +} +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; + +Flog.RayTracer.Scene = Class.create(); + +Flog.RayTracer.Scene.prototype = { + camera : null, + shapes : [], + lights : [], + background : null, + + initialize : function() { + this.camera = new Flog.RayTracer.Camera( + new Flog.RayTracer.Vector(0,0,-5), + new Flog.RayTracer.Vector(0,0,1), + new Flog.RayTracer.Vector(0,1,0) + ); + this.shapes = new Array(); + this.lights = new Array(); + this.background = new Flog.RayTracer.Background(new Flog.RayTracer.Color(0,0,0.5), 0.2); + } +} +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; +if(typeof(Flog.RayTracer.Material) == 'undefined') Flog.RayTracer.Material = {}; + +Flog.RayTracer.Material.BaseMaterial = Class.create(); + +Flog.RayTracer.Material.BaseMaterial.prototype = { + + gloss: 2.0, // [0...infinity] 0 = matt + transparency: 0.0, // 0=opaque + reflection: 0.0, // [0...infinity] 0 = no reflection + refraction: 0.50, + hasTexture: false, + + initialize : function() { + + }, + + getColor: function(u, v){ + + }, + + wrapUp: function(t){ + t = t % 2.0; + if(t < -1) t += 2.0; + if(t >= 1) t -= 2.0; + return t; + }, + + toString : function () { + return 'Material [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']'; + } +} +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; + +Flog.RayTracer.Material.Solid = Class.create(); + +Flog.RayTracer.Material.Solid.prototype = Object.extend( + new Flog.RayTracer.Material.BaseMaterial(), { + initialize : function(color, reflection, refraction, transparency, gloss) { + this.color = color; + this.reflection = reflection; + this.transparency = transparency; + this.gloss = gloss; + this.hasTexture = false; + }, + + getColor: function(u, v){ + return this.color; + }, + + toString : function () { + return 'SolidMaterial [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']'; + } + } +); +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; + +Flog.RayTracer.Material.Chessboard = Class.create(); + +Flog.RayTracer.Material.Chessboard.prototype = Object.extend( + new Flog.RayTracer.Material.BaseMaterial(), { + colorEven: null, + colorOdd: null, + density: 0.5, + + initialize : function(colorEven, colorOdd, reflection, transparency, gloss, density) { + this.colorEven = colorEven; + this.colorOdd = colorOdd; + this.reflection = reflection; + this.transparency = transparency; + this.gloss = gloss; + this.density = density; + this.hasTexture = true; + }, + + getColor: function(u, v){ + var t = this.wrapUp(u * this.density) * this.wrapUp(v * this.density); + + if(t < 0.0) + return this.colorEven; + else + return this.colorOdd; + }, + + toString : function () { + return 'ChessMaterial [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']'; + } + } +); +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; +if(typeof(Flog.RayTracer.Shape) == 'undefined') Flog.RayTracer.Shape = {}; + +Flog.RayTracer.Shape.BaseShape = Class.create(); + +Flog.RayTracer.Shape.BaseShape.prototype = { + position: null, + material: null, + + initialize : function() { + this.position = new Vector(0,0,0); + this.material = new Flog.RayTracer.Material.SolidMaterial( + new Flog.RayTracer.Color(1,0,1), + 0, + 0, + 0 + ); + }, + + toString : function () { + return 'Material [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']'; + } +} +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; +if(typeof(Flog.RayTracer.Shape) == 'undefined') Flog.RayTracer.Shape = {}; + +Flog.RayTracer.Shape.Sphere = Class.create(); + +Flog.RayTracer.Shape.Sphere.prototype = { + initialize : function(pos, radius, material) { + this.radius = radius; + this.position = pos; + this.material = material; + }, + + intersect: function(ray){ + var info = new Flog.RayTracer.IntersectionInfo(); + info.shape = this; + + var dst = Flog.RayTracer.Vector.prototype.subtract(ray.position, this.position); + + var B = dst.dot(ray.direction); + var C = dst.dot(dst) - (this.radius * this.radius); + var D = (B * B) - C; + + if(D > 0){ // intersection! + info.isHit = true; + info.distance = (-B) - Math.sqrt(D); + info.position = Flog.RayTracer.Vector.prototype.add( + ray.position, + Flog.RayTracer.Vector.prototype.multiplyScalar( + ray.direction, + info.distance + ) + ); + info.normal = Flog.RayTracer.Vector.prototype.subtract( + info.position, + this.position + ).normalize(); + + info.color = this.material.getColor(0,0); + } else { + info.isHit = false; + } + return info; + }, + + toString : function () { + return 'Sphere [position=' + this.position + ', radius=' + this.radius + ']'; + } +} +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; +if(typeof(Flog.RayTracer.Shape) == 'undefined') Flog.RayTracer.Shape = {}; + +Flog.RayTracer.Shape.Plane = Class.create(); + +Flog.RayTracer.Shape.Plane.prototype = { + d: 0.0, + + initialize : function(pos, d, material) { + this.position = pos; + this.d = d; + this.material = material; + }, + + intersect: function(ray){ + var info = new Flog.RayTracer.IntersectionInfo(); + + var Vd = this.position.dot(ray.direction); + if(Vd == 0) return info; // no intersection + + var t = -(this.position.dot(ray.position) + this.d) / Vd; + if(t <= 0) return info; + + info.shape = this; + info.isHit = true; + info.position = Flog.RayTracer.Vector.prototype.add( + ray.position, + Flog.RayTracer.Vector.prototype.multiplyScalar( + ray.direction, + t + ) + ); + info.normal = this.position; + info.distance = t; + + if(this.material.hasTexture){ + var vU = new Flog.RayTracer.Vector(this.position.y, this.position.z, -this.position.x); + var vV = vU.cross(this.position); + var u = info.position.dot(vU); + var v = info.position.dot(vV); + info.color = this.material.getColor(u,v); + } else { + info.color = this.material.getColor(0,0); + } + + return info; + }, + + toString : function () { + return 'Plane [' + this.position + ', d=' + this.d + ']'; + } +} +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; + +Flog.RayTracer.IntersectionInfo = Class.create(); + +Flog.RayTracer.IntersectionInfo.prototype = { + isHit: false, + hitCount: 0, + shape: null, + position: null, + normal: null, + color: null, + distance: null, + + initialize : function() { + this.color = new Flog.RayTracer.Color(0,0,0); + }, + + toString : function () { + return 'Intersection [' + this.position + ']'; + } +} +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; + +Flog.RayTracer.Camera = Class.create(); + +Flog.RayTracer.Camera.prototype = { + position: null, + lookAt: null, + equator: null, + up: null, + screen: null, + + initialize : function(pos, lookAt, up) { + this.position = pos; + this.lookAt = lookAt; + this.up = up; + this.equator = lookAt.normalize().cross(this.up); + this.screen = Flog.RayTracer.Vector.prototype.add(this.position, this.lookAt); + }, + + getRay: function(vx, vy){ + var pos = Flog.RayTracer.Vector.prototype.subtract( + this.screen, + Flog.RayTracer.Vector.prototype.subtract( + Flog.RayTracer.Vector.prototype.multiplyScalar(this.equator, vx), + Flog.RayTracer.Vector.prototype.multiplyScalar(this.up, vy) + ) + ); + pos.y = pos.y * -1; + var dir = Flog.RayTracer.Vector.prototype.subtract( + pos, + this.position + ); + + var ray = new Flog.RayTracer.Ray(pos, dir.normalize()); + + return ray; + }, + + toString : function () { + return 'Ray []'; + } +} +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; + +Flog.RayTracer.Background = Class.create(); + +Flog.RayTracer.Background.prototype = { + color : null, + ambience : 0.0, + + initialize : function(color, ambience) { + this.color = color; + this.ambience = ambience; + } +} +/* Fake a Flog.* namespace */ +if(typeof(Flog) == 'undefined') var Flog = {}; +if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {}; + +Flog.RayTracer.Engine = Class.create(); + +Flog.RayTracer.Engine.prototype = { + canvas: null, /* 2d context we can render to */ + + initialize: function(options){ + this.options = Object.extend({ + canvasHeight: 100, + canvasWidth: 100, + pixelWidth: 2, + pixelHeight: 2, + renderDiffuse: false, + renderShadows: false, + renderHighlights: false, + renderReflections: false, + rayDepth: 2 + }, options || {}); + + this.options.canvasHeight /= this.options.pixelHeight; + this.options.canvasWidth /= this.options.pixelWidth; + + /* TODO: dynamically include other scripts */ + }, + + setPixel: function(x, y, color){ + var pxW, pxH; + pxW = this.options.pixelWidth; + pxH = this.options.pixelHeight; + + if (this.canvas) { + this.canvas.fillStyle = color.toString(); + this.canvas.fillRect (x * pxW, y * pxH, pxW, pxH); + } else { + if (x === y) { + checkNumber += color.brightness(); + } + // print(x * pxW, y * pxH, pxW, pxH); + } + }, + + renderScene: function(scene, canvas){ + checkNumber = 0; + /* Get canvas */ + if (canvas) { + this.canvas = canvas.getContext("2d"); + } else { + this.canvas = null; + } + + var canvasHeight = this.options.canvasHeight; + var canvasWidth = this.options.canvasWidth; + + for(var y=0; y < canvasHeight; y++){ + for(var x=0; x < canvasWidth; x++){ + var yp = y * 1.0 / canvasHeight * 2 - 1; + var xp = x * 1.0 / canvasWidth * 2 - 1; + + var ray = scene.camera.getRay(xp, yp); + + var color = this.getPixelColor(ray, scene); + + this.setPixel(x, y, color); + } + } + assertEq(checkNumber, 2321); + }, + + getPixelColor: function(ray, scene){ + var info = this.testIntersection(ray, scene, null); + if(info.isHit){ + var color = this.rayTrace(info, ray, scene, 0); + return color; + } + return scene.background.color; + }, + + testIntersection: function(ray, scene, exclude){ + var hits = 0; + var best = new Flog.RayTracer.IntersectionInfo(); + best.distance = 2000; + + for(var i=0; i= 0 && info.distance < best.distance){ + best = info; + hits++; + } + } + } + best.hitCount = hits; + return best; + }, + + getReflectionRay: function(P,N,V){ + var c1 = -N.dot(V); + var R1 = Flog.RayTracer.Vector.prototype.add( + Flog.RayTracer.Vector.prototype.multiplyScalar(N, 2*c1), + V + ); + return new Flog.RayTracer.Ray(P, R1); + }, + + rayTrace: function(info, ray, scene, depth){ + // Calc ambient + var color = Flog.RayTracer.Color.prototype.multiplyScalar(info.color, scene.background.ambience); + var oldColor = color; + var shininess = Math.pow(10, info.shape.material.gloss + 1); + + for(var i=0; i 0.0){ + color = Flog.RayTracer.Color.prototype.add( + color, + Flog.RayTracer.Color.prototype.multiply( + info.color, + Flog.RayTracer.Color.prototype.multiplyScalar( + light.color, + L + ) + ) + ); + } + } + + // The greater the depth the more accurate the colours, but + // this is exponentially (!) expensive + if(depth <= this.options.rayDepth){ + // calculate reflection ray + if(this.options.renderReflections && info.shape.material.reflection > 0) + { + var reflectionRay = this.getReflectionRay(info.position, info.normal, ray.direction); + var refl = this.testIntersection(reflectionRay, scene, info.shape); + + if (refl.isHit && refl.distance > 0){ + refl.color = this.rayTrace(refl, reflectionRay, scene, depth + 1); + } else { + refl.color = scene.background.color; + } + + color = Flog.RayTracer.Color.prototype.blend( + color, + refl.color, + info.shape.material.reflection + ); + } + + // Refraction + /* TODO */ + } + + /* Render shadows and highlights */ + + var shadowInfo = new Flog.RayTracer.IntersectionInfo(); + + if(this.options.renderShadows){ + var shadowRay = new Flog.RayTracer.Ray(info.position, v); + + shadowInfo = this.testIntersection(shadowRay, scene, info.shape); + if(shadowInfo.isHit && shadowInfo.shape != info.shape /*&& shadowInfo.shape.type != 'PLANE'*/){ + var vA = Flog.RayTracer.Color.prototype.multiplyScalar(color, 0.5); + var dB = (0.5 * Math.pow(shadowInfo.shape.material.transparency, 0.5)); + color = Flog.RayTracer.Color.prototype.addScalar(vA,dB); + } + } + + // Phong specular highlights + if(this.options.renderHighlights && !shadowInfo.isHit && info.shape.material.gloss > 0){ + var Lv = Flog.RayTracer.Vector.prototype.subtract( + info.shape.position, + light.position + ).normalize(); + + var E = Flog.RayTracer.Vector.prototype.subtract( + scene.camera.position, + info.shape.position + ).normalize(); + + var H = Flog.RayTracer.Vector.prototype.subtract( + E, + Lv + ).normalize(); + + var glossWeight = Math.pow(Math.max(info.normal.dot(H), 0), shininess); + color = Flog.RayTracer.Color.prototype.add( + Flog.RayTracer.Color.prototype.multiplyScalar(light.color, glossWeight), + color + ); + } + } + color.limit(); + return color; + } +}; + + +function renderScene(){ + var scene = new Flog.RayTracer.Scene(); + + scene.camera = new Flog.RayTracer.Camera( + new Flog.RayTracer.Vector(0, 0, -15), + new Flog.RayTracer.Vector(-0.2, 0, 5), + new Flog.RayTracer.Vector(0, 1, 0) + ); + + scene.background = new Flog.RayTracer.Background( + new Flog.RayTracer.Color(0.5, 0.5, 0.5), + 0.4 + ); + + var sphere = new Flog.RayTracer.Shape.Sphere( + new Flog.RayTracer.Vector(-1.5, 1.5, 2), + 1.5, + new Flog.RayTracer.Material.Solid( + new Flog.RayTracer.Color(0,0.5,0.5), + 0.3, + 0.0, + 0.0, + 2.0 + ) + ); + + var sphere1 = new Flog.RayTracer.Shape.Sphere( + new Flog.RayTracer.Vector(1, 0.25, 1), + 0.5, + new Flog.RayTracer.Material.Solid( + new Flog.RayTracer.Color(0.9,0.9,0.9), + 0.1, + 0.0, + 0.0, + 1.5 + ) + ); + + var plane = new Flog.RayTracer.Shape.Plane( + new Flog.RayTracer.Vector(0.1, 0.9, -0.5).normalize(), + 1.2, + new Flog.RayTracer.Material.Chessboard( + new Flog.RayTracer.Color(1,1,1), + new Flog.RayTracer.Color(0,0,0), + 0.2, + 0.0, + 1.0, + 0.7 + ) + ); + + scene.shapes.push(plane); + scene.shapes.push(sphere); + scene.shapes.push(sphere1); + + var light = new Flog.RayTracer.Light( + new Flog.RayTracer.Vector(5, 10, -1), + new Flog.RayTracer.Color(0.8, 0.8, 0.8) + ); + + var light1 = new Flog.RayTracer.Light( + new Flog.RayTracer.Vector(-3, 5, -15), + new Flog.RayTracer.Color(0.8, 0.8, 0.8), + 100 + ); + + scene.lights.push(light); + scene.lights.push(light1); + + var imageWidth = 100; // $F('imageWidth'); + var imageHeight = 100; // $F('imageHeight'); + var pixelSize = "5,5".split(','); // $F('pixelSize').split(','); + var renderDiffuse = true; // $F('renderDiffuse'); + var renderShadows = true; // $F('renderShadows'); + var renderHighlights = true; // $F('renderHighlights'); + var renderReflections = true; // $F('renderReflections'); + var rayDepth = 2;//$F('rayDepth'); + + var raytracer = new Flog.RayTracer.Engine( + { + canvasWidth: imageWidth, + canvasHeight: imageHeight, + pixelWidth: pixelSize[0], + pixelHeight: pixelSize[1], + "renderDiffuse": renderDiffuse, + "renderHighlights": renderHighlights, + "renderShadows": renderShadows, + "renderReflections": renderReflections, + "rayDepth": rayDepth + } + ); + + raytracer.renderScene(scene, null, 0); +} + +renderScene(); diff --git a/js/src/jit-test/tests/v8-v5/check-regexp.js b/js/src/jit-test/tests/v8-v5/check-regexp.js new file mode 100644 index 0000000000..9bcd72a0c1 --- /dev/null +++ b/js/src/jit-test/tests/v8-v5/check-regexp.js @@ -0,0 +1,1616 @@ +// Copyright 2009 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Automatically generated on 2009-01-30. + +// This benchmark is generated by loading 50 of the most popular pages +// on the web and logging all regexp operations performed. Each +// operation is given a weight that is calculated from an estimate of +// the popularity of the pages where it occurs and the number of times +// it is executed while loading each page. Finally the literal +// letters in the data are encoded using ROT13 in a way that does not +// affect how the regexps match their input. + +//var RegRxp = new BenchmarkSuite('RegExp', 995230, [ +// new Benchmark("RegExp", runRegExpBenchmark) +//]); + +function runRegExpBenchmark() { + var re0 = /^ba/; + var re1 = /(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/; + var re2 = /^\s*|\s*$/g; + var re3 = /\bQBZPbageby_cynprubyqre\b/; + var re4 = /,/; + var re5 = /\bQBZPbageby_cynprubyqre\b/g; + var re6 = /^[\s\xa0]+|[\s\xa0]+$/g; + var re7 = /(\d*)(\D*)/g; + var re8 = /=/; + var re9 = /(^|\s)lhv\-h(\s|$)/; + var str0 = 'Zbmvyyn/5.0 (Jvaqbjf; H; Jvaqbjf AG 5.1; ra-HF) NccyrJroXvg/528.9 (XUGZY, yvxr Trpxb) Puebzr/2.0.157.0 Fnsnev/528.9'; + var re10 = /\#/g; + var re11 = /\./g; + var re12 = /'/g; + var re13 = /\?[\w\W]*(sevraqvq|punaaryvq|tebhcvq)=([^\&\?#]*)/i; + var str1 = 'Fubpxjnir Synfu 9.0 e115'; + var re14 = /\s+/g; + var re15 = /^\s*(\S*(\s+\S+)*)\s*$/; + var re16 = /(-[a-z])/i; + function runBlock0() { + for (var i = 0; i < 6511; i++) { + re0.exec('pyvpx'); + } + for (var i = 0; i < 1844; i++) { + re1.exec('uggc://jjj.snprobbx.pbz/ybtva.cuc'); + } + for (var i = 0; i < 739; i++) { + 'QBZPbageby_cynprubyqre'.replace(re2, ''); + } + for (var i = 0; i < 598; i++) { + re1.exec('uggc://jjj.snprobbx.pbz/'); + } + for (var i = 0; i < 454; i++) { + re1.exec('uggc://jjj.snprobbx.pbz/fepu.cuc'); + } + for (var i = 0; i < 352; i++) { + /qqqq|qqq|qq|q|ZZZZ|ZZZ|ZZ|Z|llll|ll|l|uu|u|UU|U|zz|z|ff|f|gg|g|sss|ss|s|mmm|mm|m/g.exec('qqqq, ZZZ q, llll'); + } + for (var i = 0; i < 312; i++) { + re3.exec('vachggrkg QBZPbageby_cynprubyqre'); + } + for (var i = 0; i < 282; i++) { + re4.exec('/ZlFcnprUbzrcntr/Vaqrk-FvgrUbzr,10000000'); + } + for (var i = 0; i < 177; i++) { + 'vachggrkg'.replace(re5, ''); + } + for (var i = 0; i < 170; i++) { + '528.9'.replace(re6, ''); + re7.exec('528'); + } + for (var i = 0; i < 156; i++) { + re8.exec('VCPhygher=ra-HF'); + re8.exec('CersreerqPhygher=ra-HF'); + } + for (var i = 0; i < 144; i++) { + re0.exec('xrlcerff'); + } + for (var i = 0; i < 139; i++) { + '521'.replace(re6, ''); + re7.exec('521'); + re9.exec(''); + /JroXvg\/(\S+)/.exec(str0); + } + for (var i = 0; i < 137; i++) { + 'qvi .so_zrah'.replace(re10, ''); + 'qvi .so_zrah'.replace(/\[/g, ''); + 'qvi.so_zrah'.replace(re11, ''); + } + for (var i = 0; i < 117; i++) { + 'uvqqra_ryrz'.replace(re2, ''); + } + for (var i = 0; i < 95; i++) { + /(?:^|;)\s*sevraqfgre_ynat=([^;]*)/.exec('sevraqfgre_naba=nvq%3Qn6ss9p85n868ro9s059pn854735956o3%26ers%3Q%26df%3Q%26vpgl%3QHF'); + } + for (var i = 0; i < 93; i++) { + 'uggc://ubzr.zlfcnpr.pbz/vaqrk.psz'.replace(re12, ''); + re13.exec('uggc://ubzr.zlfcnpr.pbz/vaqrk.psz'); + } + for (var i = 0; i < 92; i++) { + str1.replace(/([a-zA-Z]|\s)+/, ''); + } + for (var i = 0; i < 85; i++) { + 'svefg'.replace(re14, ''); + 'svefg'.replace(re15, ''); + 'uggc://cebsvyr.zlfcnpr.pbz/vaqrk.psz'.replace(re12, ''); + 'ynfg'.replace(re14, ''); + 'ynfg'.replace(re15, ''); + re16.exec('qvfcynl'); + re13.exec('uggc://cebsvyr.zlfcnpr.pbz/vaqrk.psz'); + } + } + var re17 = /(^|[^\\])\"\\\/Qngr\((-?[0-9]+)\)\\\/\"/g; + var str2 = '{"anzr":"","ahzoreSbezng":{"PheeraplQrpvznyQvtvgf":2,"PheeraplQrpvznyFrcnengbe":".","VfErnqBayl":gehr,"PheeraplTebhcFvmrf":[3],"AhzoreTebhcFvmrf":[3],"CrepragTebhcFvmrf":[3],"PheeraplTebhcFrcnengbe":",","PheeraplFlzoby":"\xa4","AnAFlzoby":"AnA","PheeraplArtngvirCnggrea":0,"AhzoreArtngvirCnggrea":1,"CrepragCbfvgvirCnggrea":0,"CrepragArtngvirCnggrea":0,"ArtngvirVasvavglFlzoby":"-Vasvavgl","ArtngvirFvta":"-","AhzoreQrpvznyQvtvgf":2,"AhzoreQrpvznyFrcnengbe":".","AhzoreTebhcFrcnengbe":",","PheeraplCbfvgvirCnggrea":0,"CbfvgvirVasvavglFlzoby":"Vasvavgl","CbfvgvirFvta":"+","CrepragQrpvznyQvtvgf":2,"CrepragQrpvznyFrcnengbe":".","CrepragTebhcFrcnengbe":",","CrepragFlzoby":"%","CreZvyyrFlzoby":"\u2030","AngvirQvtvgf":["0","1","2","3","4","5","6","7","8","9"],"QvtvgFhofgvghgvba":1},"qngrGvzrSbezng":{"NZQrfvtangbe":"NZ","Pnyraqne":{"ZvaFhccbegrqQngrGvzr":"@-62135568000000@","ZnkFhccbegrqQngrGvzr":"@253402300799999@","NytbevguzGlcr":1,"PnyraqneGlcr":1,"Renf":[1],"GjbQvtvgLrneZnk":2029,"VfErnqBayl":gehr},"QngrFrcnengbe":"/","SvefgQnlBsJrrx":0,"PnyraqneJrrxEhyr":0,"ShyyQngrGvzrCnggrea":"qqqq, qq ZZZZ llll UU:zz:ff","YbatQngrCnggrea":"qqqq, qq ZZZZ llll","YbatGvzrCnggrea":"UU:zz:ff","ZbaguQnlCnggrea":"ZZZZ qq","CZQrfvtangbe":"CZ","ESP1123Cnggrea":"qqq, qq ZZZ llll UU\':\'zz\':\'ff \'TZG\'","FubegQngrCnggrea":"ZZ/qq/llll","FubegGvzrCnggrea":"UU:zz","FbegnoyrQngrGvzrCnggrea":"llll\'-\'ZZ\'-\'qq\'G\'UU\':\'zz\':\'ff","GvzrFrcnengbe":":","HavirefnyFbegnoyrQngrGvzrCnggrea":"llll\'-\'ZZ\'-\'qq UU\':\'zz\':\'ff\'M\'","LrneZbaguCnggrea":"llll ZZZZ","NooerivngrqQnlAnzrf":["Fha","Zba","Ghr","Jrq","Guh","Sev","Fng"],"FubegrfgQnlAnzrf":["Fh","Zb","Gh","Jr","Gu","Se","Fn"],"QnlAnzrf":["Fhaqnl","Zbaqnl","Ghrfqnl","Jrqarfqnl","Guhefqnl","Sevqnl","Fngheqnl"],"NooerivngrqZbaguAnzrf":["Wna","Sro","Zne","Nce","Znl","Wha","Why","Nht","Frc","Bpg","Abi","Qrp",""],"ZbaguAnzrf":["Wnahnel","Sroehnel","Znepu","Ncevy","Znl","Whar","Whyl","Nhthfg","Frcgrzore","Bpgbore","Abirzore","Qrprzore",""],"VfErnqBayl":gehr,"AngvirPnyraqneAnzr":"Tertbevna Pnyraqne","NooerivngrqZbaguTravgvirAnzrf":["Wna","Sro","Zne","Nce","Znl","Wha","Why","Nht","Frc","Bpg","Abi","Qrp",""],"ZbaguTravgvirAnzrf":["Wnahnel","Sroehnel","Znepu","Ncevy","Znl","Whar","Whyl","Nhthfg","Frcgrzore","Bpgbore","Abirzore","Qrprzore",""]}}'; + var str3 = '{"anzr":"ra-HF","ahzoreSbezng":{"PheeraplQrpvznyQvtvgf":2,"PheeraplQrpvznyFrcnengbe":".","VfErnqBayl":snyfr,"PheeraplTebhcFvmrf":[3],"AhzoreTebhcFvmrf":[3],"CrepragTebhcFvmrf":[3],"PheeraplTebhcFrcnengbe":",","PheeraplFlzoby":"$","AnAFlzoby":"AnA","PheeraplArtngvirCnggrea":0,"AhzoreArtngvirCnggrea":1,"CrepragCbfvgvirCnggrea":0,"CrepragArtngvirCnggrea":0,"ArtngvirVasvavglFlzoby":"-Vasvavgl","ArtngvirFvta":"-","AhzoreQrpvznyQvtvgf":2,"AhzoreQrpvznyFrcnengbe":".","AhzoreTebhcFrcnengbe":",","PheeraplCbfvgvirCnggrea":0,"CbfvgvirVasvavglFlzoby":"Vasvavgl","CbfvgvirFvta":"+","CrepragQrpvznyQvtvgf":2,"CrepragQrpvznyFrcnengbe":".","CrepragTebhcFrcnengbe":",","CrepragFlzoby":"%","CreZvyyrFlzoby":"\u2030","AngvirQvtvgf":["0","1","2","3","4","5","6","7","8","9"],"QvtvgFhofgvghgvba":1},"qngrGvzrSbezng":{"NZQrfvtangbe":"NZ","Pnyraqne":{"ZvaFhccbegrqQngrGvzr":"@-62135568000000@","ZnkFhccbegrqQngrGvzr":"@253402300799999@","NytbevguzGlcr":1,"PnyraqneGlcr":1,"Renf":[1],"GjbQvtvgLrneZnk":2029,"VfErnqBayl":snyfr},"QngrFrcnengbe":"/","SvefgQnlBsJrrx":0,"PnyraqneJrrxEhyr":0,"ShyyQngrGvzrCnggrea":"qqqq, ZZZZ qq, llll u:zz:ff gg","YbatQngrCnggrea":"qqqq, ZZZZ qq, llll","YbatGvzrCnggrea":"u:zz:ff gg","ZbaguQnlCnggrea":"ZZZZ qq","CZQrfvtangbe":"CZ","ESP1123Cnggrea":"qqq, qq ZZZ llll UU\':\'zz\':\'ff \'TZG\'","FubegQngrCnggrea":"Z/q/llll","FubegGvzrCnggrea":"u:zz gg","FbegnoyrQngrGvzrCnggrea":"llll\'-\'ZZ\'-\'qq\'G\'UU\':\'zz\':\'ff","GvzrFrcnengbe":":","HavirefnyFbegnoyrQngrGvzrCnggrea":"llll\'-\'ZZ\'-\'qq UU\':\'zz\':\'ff\'M\'","LrneZbaguCnggrea":"ZZZZ, llll","NooerivngrqQnlAnzrf":["Fha","Zba","Ghr","Jrq","Guh","Sev","Fng"],"FubegrfgQnlAnzrf":["Fh","Zb","Gh","Jr","Gu","Se","Fn"],"QnlAnzrf":["Fhaqnl","Zbaqnl","Ghrfqnl","Jrqarfqnl","Guhefqnl","Sevqnl","Fngheqnl"],"NooerivngrqZbaguAnzrf":["Wna","Sro","Zne","Nce","Znl","Wha","Why","Nht","Frc","Bpg","Abi","Qrp",""],"ZbaguAnzrf":["Wnahnel","Sroehnel","Znepu","Ncevy","Znl","Whar","Whyl","Nhthfg","Frcgrzore","Bpgbore","Abirzore","Qrprzore",""],"VfErnqBayl":snyfr,"AngvirPnyraqneAnzr":"Tertbevna Pnyraqne","NooerivngrqZbaguTravgvirAnzrf":["Wna","Sro","Zne","Nce","Znl","Wha","Why","Nht","Frc","Bpg","Abi","Qrp",""],"ZbaguTravgvirAnzrf":["Wnahnel","Sroehnel","Znepu","Ncevy","Znl","Whar","Whyl","Nhthfg","Frcgrzore","Bpgbore","Abirzore","Qrprzore",""]}}'; + var str4 = 'HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str5 = 'HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R='; + var re18 = /^\s+|\s+$/g; + var str6 = 'uggc://jjj.snprobbx.pbz/vaqrk.cuc'; + var re19 = /(?:^|\s+)ba(?:\s+|$)/; + var re20 = /[+, ]/; + var re21 = /ybnqrq|pbzcyrgr/; + var str7 = ';;jvaqbj.IjPurpxZbhfrCbfvgvbaNQ_VQ=shapgvba(r){vs(!r)ine r=jvaqbj.rirag;ine c=-1;vs(d1)c=d1.EbyybssCnary;ine bo=IjTrgBow("IjCnayNQ_VQ_"+c);vs(bo&&bo.fglyr.ivfvovyvgl=="ivfvoyr"){ine fns=IjFns?8:0;ine pheK=r.pyvragK+IjBOFpe("U")+fns,pheL=r.pyvragL+IjBOFpe("I")+fns;ine y=IjBOEC(NQ_VQ,bo,"Y"),g=IjBOEC(NQ_VQ,bo,"G");ine e=y+d1.Cnaryf[c].Jvqgu,o=g+d1.Cnaryf[c].Urvtug;vs((pheKe)||(pheLo)){vs(jvaqbj.IjBaEbyybssNQ_VQ)IjBaEbyybssNQ_VQ(c);ryfr IjPybfrNq(NQ_VQ,c,gehr,"");}ryfr erghea;}IjPnapryZbhfrYvfgrareNQ_VQ();};;jvaqbj.IjFrgEbyybssCnaryNQ_VQ=shapgvba(c){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;c=IjTc(NQ_VQ,c);vs(d1&&d1.EbyybssCnary>-1)IjPnapryZbhfrYvfgrareNQ_VQ();vs(d1)d1.EbyybssCnary=c;gel{vs(q.nqqRiragYvfgrare)q.nqqRiragYvfgrare(z,s,snyfr);ryfr vs(q.nggnpuRirag)q.nggnpuRirag("ba"+z,s);}pngpu(r){}};;jvaqbj.IjPnapryZbhfrYvfgrareNQ_VQ=shapgvba(){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;vs(d1)d1.EbyybssCnary=-1;gel{vs(q.erzbirRiragYvfgrare)q.erzbirRiragYvfgrare(z,s,snyfr);ryfr vs(q.qrgnpuRirag)q.qrgnpuRirag("ba"+z,s);}pngpu(r){}};;d1.IjTc=d2(n,c){ine nq=d1;vs(vfAnA(c)){sbe(ine v=0;v0){vs(nq.FzV.yratgu>0)nq.FzV+="/";nq.FzV+=vh[v];nq.FtZ[nq.FtZ.yratgu]=snyfr;}}};;d1.IjYvzvg0=d2(n,f){ine nq=d1,vh=f.fcyvg("/");sbe(ine v=0;v0){vs(nq.OvC.yratgu>0)nq.OvC+="/";nq.OvC+=vh[v];}}};;d1.IjRVST=d2(n,c){jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]=IjTrgBow("IjCnayNQ_VQ_"+c+"_Bow");vs(jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]==ahyy)frgGvzrbhg("IjRVST(NQ_VQ,"+c+")",d1.rvsg);};;d1.IjNavzSHC=d2(n,c){ine nq=d1;vs(c>nq.Cnaryf.yratgu)erghea;ine cna=nq.Cnaryf[c],nn=gehr,on=gehr,yn=gehr,en=gehr,cn=nq.Cnaryf[0],sf=nq.ShF,j=cn.Jvqgu,u=cn.Urvtug;vs(j=="100%"){j=sf;en=snyfr;yn=snyfr;}vs(u=="100%"){u=sf;nn=snyfr;on=snyfr;}vs(cn.YnY=="Y")yn=snyfr;vs(cn.YnY=="E")en=snyfr;vs(cn.GnY=="G")nn=snyfr;vs(cn.GnY=="O")on=snyfr;ine k=0,l=0;fjvgpu(nq.NshP%8){pnfr 0:oernx;pnfr 1:vs(nn)l=-sf;oernx;pnfr 2:k=j-sf;oernx;pnfr 3:vs(en)k=j;oernx;pnfr 4:k=j-sf;l=u-sf;oernx;pnfr 5:k=j-sf;vs(on)l=u;oernx;pnfr 6:l=u-sf;oernx;pnfr 7:vs(yn)k=-sf;l=u-sf;oernx;}vs(nq.NshP++ 0)||(nethzragf.yratgu==3&&bG>0))){pyrneGvzrbhg(cay.UgU);cay.UgU=frgGvzrbhg(cay.UvqrNpgvba,(nethzragf.yratgu==3?bG:cay.UvqrGvzrbhgInyhr));}};;d1.IjErfrgGvzrbhg=d2(n,c,bG){c=IjTc(n,c);IjPnapryGvzrbhg(n,c);riny("IjFgnegGvzrbhg(NQ_VQ,c"+(nethzragf.yratgu==3?",bG":"")+")");};;d1.IjErfrgNyyGvzrbhgf=d2(n){sbe(ine c=0;c]/g; + var str15 = 'FrffvbaQQS2=s6r4579npn4rn2135s904r0s75pp1o5334p6s6pospo12696; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669316860113296&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_dfctwzs-aowb_80=44132r503660'; + var str16 = 'FrffvbaQQS2=s6r4579npn4rn2135s904r0s75pp1o5334p6s6pospo12696; AFP_zp_dfctwzs-aowb_80=44132r503660; __hgzm=144631658.1231363638.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.965867047679498800.1231363638.1231363638.1231363638.1; __hgzo=144631658.0.10.1231363638; __hgzp=144631658; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669316860113296&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str17 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231363621014&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231363621014&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Scebsvyr.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=348699119.1231363624&tn_fvq=1231363624&tn_uvq=895511034&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22'; + var str18 = 'uggc://jjj.yrobapbva.se/yv'; + var str19 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669316860113296&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str20 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669316860113296&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R='; + function runBlock3() { + for (var i = 0; i < 27; i++) { + 'e115'.replace(/[A-Za-z]/g, ''); + } + for (var i = 0; i < 23; i++) { + 'qvfcynl'.replace(re27, ''); + 'cbfvgvba'.replace(re27, ''); + } + for (var i = 0; i < 22; i++) { + 'unaqyr'.replace(re14, ''); + 'unaqyr'.replace(re15, ''); + 'yvar'.replace(re14, ''); + 'yvar'.replace(re15, ''); + 'cnerag puebzr6 fvatyr1 gno'.replace(re14, ''); + 'cnerag puebzr6 fvatyr1 gno'.replace(re15, ''); + 'fyvqre'.replace(re14, ''); + 'fyvqre'.replace(re15, ''); + re28.exec(''); + } + for (var i = 0; i < 21; i++) { + 'uggc://jjj.zlfcnpr.pbz/'.replace(re12, ''); + re13.exec('uggc://jjj.zlfcnpr.pbz/'); + } + for (var i = 0; i < 20; i++) { + 'cntrivrj'.replace(re29, ''); + 'cntrivrj'.replace(re30, ''); + re19.exec('ynfg'); + re19.exec('ba svefg'); + re8.exec('VC=74.125.75.3'); + } + for (var i = 0; i < 19; i++) { + re31.exec('ra'); + } + for (var i = 0; i < 18; i++) { + str10.split(re32); + str11.split(re32); + str12.replace(re33, ''); + re8.exec('144631658.0.10.1231363570'); + re8.exec('144631658.1231363570.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re8.exec('144631658.3426875219718084000.1231363570.1231363570.1231363570.1'); + re8.exec(str13); + re8.exec(str14); + re8.exec('__hgzn=144631658.3426875219718084000.1231363570.1231363570.1231363570.1'); + re8.exec('__hgzo=144631658.0.10.1231363570'); + re8.exec('__hgzm=144631658.1231363570.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re34.exec(str10); + re34.exec(str11); + } + for (var i = 0; i < 17; i++) { + str0.match(/zfvr/gi); + str0.match(/bcren/gi); + str15.split(re32); + str16.split(re32); + 'ohggba'.replace(re14, ''); + 'ohggba'.replace(re15, ''); + 'puvyq p1 svefg sylbhg pybfrq'.replace(re14, ''); + 'puvyq p1 svefg sylbhg pybfrq'.replace(re15, ''); + 'pvgvrf'.replace(re14, ''); + 'pvgvrf'.replace(re15, ''); + 'pybfrq'.replace(re14, ''); + 'pybfrq'.replace(re15, ''); + 'qry'.replace(re14, ''); + 'qry'.replace(re15, ''); + 'uqy_zba'.replace(re14, ''); + 'uqy_zba'.replace(re15, ''); + str17.replace(re33, ''); + str18.replace(/%3P/g, ''); + str18.replace(/%3R/g, ''); + str18.replace(/%3q/g, ''); + str18.replace(re35, ''); + 'yvaxyvfg16'.replace(re14, ''); + 'yvaxyvfg16'.replace(re15, ''); + 'zvahf'.replace(re14, ''); + 'zvahf'.replace(re15, ''); + 'bcra'.replace(re14, ''); + 'bcra'.replace(re15, ''); + 'cnerag puebzr5 fvatyr1 ps NU'.replace(re14, ''); + 'cnerag puebzr5 fvatyr1 ps NU'.replace(re15, ''); + 'cynlre'.replace(re14, ''); + 'cynlre'.replace(re15, ''); + 'cyhf'.replace(re14, ''); + 'cyhf'.replace(re15, ''); + 'cb_uqy'.replace(re14, ''); + 'cb_uqy'.replace(re15, ''); + 'hyJVzt'.replace(re14, ''); + 'hyJVzt'.replace(re15, ''); + re8.exec('144631658.0.10.1231363638'); + re8.exec('144631658.1231363638.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re8.exec('144631658.965867047679498800.1231363638.1231363638.1231363638.1'); + re8.exec('4413268q3660'); + re8.exec('4ss747o77904333q374or84qrr1s9r0nprp8r5q81534o94n'); + re8.exec('SbeprqRkcvengvba=633669321699093060'); + re8.exec('VC=74.125.75.20'); + re8.exec(str19); + re8.exec(str20); + re8.exec('AFP_zp_tfwsbrg-aowb_80=4413268q3660'); + re8.exec('FrffvbaQQS2=4ss747o77904333q374or84qrr1s9r0nprp8r5q81534o94n'); + re8.exec('__hgzn=144631658.965867047679498800.1231363638.1231363638.1231363638.1'); + re8.exec('__hgzo=144631658.0.10.1231363638'); + re8.exec('__hgzm=144631658.1231363638.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re34.exec(str15); + re34.exec(str16); + } + } + var re36 = /uers|fep|fryrpgrq/; + var re37 = /\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g; + var re38 = /^(\w+|\*)$/; + var str21 = 'FrffvbaQQS2=s15q53p9n372sn76npr13o271n4s3p5r29p235746p908p58; ZFPhygher=VC=66.249.85.130&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669358527244818&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R='; + var str22 = 'FrffvbaQQS2=s15q53p9n372sn76npr13o271n4s3p5r29p235746p908p58; __hgzm=144631658.1231367822.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.4127520630321984500.1231367822.1231367822.1231367822.1; __hgzo=144631658.0.10.1231367822; __hgzp=144631658; ZFPhygher=VC=66.249.85.130&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669358527244818&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str23 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231367803797&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231367803797&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Szrffntvat.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1192552091.1231367807&tn_fvq=1231367807&tn_uvq=1155446857&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22'; + var str24 = 'ZFPhygher=VC=66.249.85.130&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669358527244818&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str25 = 'ZFPhygher=VC=66.249.85.130&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669358527244818&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R='; + var str26 = 'hy.ynat-fryrpgbe'; + var re39 = /\\/g; + var re40 = / /g; + var re41 = /\/\xc4\/t/; + var re42 = /\/\xd6\/t/; + var re43 = /\/\xdc\/t/; + var re44 = /\/\xdf\/t/; + var re45 = /\/\xe4\/t/; + var re46 = /\/\xf6\/t/; + var re47 = /\/\xfc\/t/; + var re48 = /\W/g; + var re49 = /uers|fep|fglyr/; + function runBlock4() { + for (var i = 0; i < 16; i++) { + ''.replace(/\*/g, ''); + /\bnpgvir\b/.exec('npgvir'); + /sversbk/i.exec(str0); + re36.exec('glcr'); + /zfvr/i.exec(str0); + /bcren/i.exec(str0); + } + for (var i = 0; i < 15; i++) { + str21.split(re32); + str22.split(re32); + 'uggc://ohyyrgvaf.zlfcnpr.pbz/vaqrk.psz'.replace(re12, ''); + str23.replace(re33, ''); + 'yv'.replace(re37, ''); + 'yv'.replace(re18, ''); + re8.exec('144631658.0.10.1231367822'); + re8.exec('144631658.1231367822.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re8.exec('144631658.4127520630321984500.1231367822.1231367822.1231367822.1'); + re8.exec(str24); + re8.exec(str25); + re8.exec('__hgzn=144631658.4127520630321984500.1231367822.1231367822.1231367822.1'); + re8.exec('__hgzo=144631658.0.10.1231367822'); + re8.exec('__hgzm=144631658.1231367822.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re34.exec(str21); + re34.exec(str22); + /\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)["']?(.*?)["']?)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g.exec(str26); + re13.exec('uggc://ohyyrgvaf.zlfcnpr.pbz/vaqrk.psz'); + re38.exec('yv'); + } + for (var i = 0; i < 14; i++) { + ''.replace(re18, ''); + '9.0 e115'.replace(/(\s+e|\s+o[0-9]+)/, ''); + 'Funer guvf tnqtrg'.replace(//g, ''); + 'Funer guvf tnqtrg'.replace(re39, ''); + 'uggc://cebsvyrrqvg.zlfcnpr.pbz/vaqrk.psz'.replace(re12, ''); + 'grnfre'.replace(re40, ''); + 'grnfre'.replace(re41, ''); + 'grnfre'.replace(re42, ''); + 'grnfre'.replace(re43, ''); + 'grnfre'.replace(re44, ''); + 'grnfre'.replace(re45, ''); + 'grnfre'.replace(re46, ''); + 'grnfre'.replace(re47, ''); + 'grnfre'.replace(re48, ''); + re16.exec('znetva-gbc'); + re16.exec('cbfvgvba'); + re19.exec('gno1'); + re9.exec('qz'); + re9.exec('qg'); + re9.exec('zbqobk'); + re9.exec('zbqobkva'); + re9.exec('zbqgvgyr'); + re13.exec('uggc://cebsvyrrqvg.zlfcnpr.pbz/vaqrk.psz'); + re26.exec('/vt/znvytnqtrg'); + re49.exec('glcr'); + } + } + var re50 = /(?:^|\s+)fryrpgrq(?:\s+|$)/; + var re51 = /\&/g; + var re52 = /\+/g; + var re53 = /\?/g; + var re54 = /\t/g; + var re55 = /(\$\{nqiHey\})|(\$nqiHey\b)/g; + var re56 = /(\$\{cngu\})|(\$cngu\b)/g; + function runBlock5() { + for (var i = 0; i < 13; i++) { + 'purpx'.replace(re14, ''); + 'purpx'.replace(re15, ''); + 'pvgl'.replace(re14, ''); + 'pvgl'.replace(re15, ''); + 'qrpe fyvqrgrkg'.replace(re14, ''); + 'qrpe fyvqrgrkg'.replace(re15, ''); + 'svefg fryrpgrq'.replace(re14, ''); + 'svefg fryrpgrq'.replace(re15, ''); + 'uqy_rag'.replace(re14, ''); + 'uqy_rag'.replace(re15, ''); + 'vape fyvqrgrkg'.replace(re14, ''); + 'vape fyvqrgrkg'.replace(re15, ''); + 'vachggrkg QBZPbageby_cynprubyqre'.replace(re5, ''); + 'cnerag puebzr6 fvatyr1 gno fryrpgrq'.replace(re14, ''); + 'cnerag puebzr6 fvatyr1 gno fryrpgrq'.replace(re15, ''); + 'cb_guz'.replace(re14, ''); + 'cb_guz'.replace(re15, ''); + 'fhozvg'.replace(re14, ''); + 'fhozvg'.replace(re15, ''); + re50.exec(''); + /NccyrJroXvg\/([^\s]*)/.exec(str0); + /XUGZY/.exec(str0); + } + for (var i = 0; i < 12; i++) { + '${cebg}://${ubfg}${cngu}/${dz}'.replace(/(\$\{cebg\})|(\$cebg\b)/g, ''); + '1'.replace(re40, ''); + '1'.replace(re10, ''); + '1'.replace(re51, ''); + '1'.replace(re52, ''); + '1'.replace(re53, ''); + '1'.replace(re39, ''); + '1'.replace(re54, ''); + '9.0 e115'.replace(/^(.*)\..*$/, ''); + '9.0 e115'.replace(/^.*e(.*)$/, ''); + ''.replace(re55, ''); + ''.replace(re55, ''); + str1.replace(/^.*\s+(\S+\s+\S+$)/, ''); + 'tzk%2Subzrcntr%2Sfgneg%2Sqr%2S'.replace(re30, ''); + 'tzk'.replace(re30, ''); + 'uggc://${ubfg}${cngu}/${dz}'.replace(/(\$\{ubfg\})|(\$ubfg\b)/g, ''); + 'uggc://nqpyvrag.hvzfrei.arg${cngu}/${dz}'.replace(re56, ''); + 'uggc://nqpyvrag.hvzfrei.arg/wf.at/${dz}'.replace(/(\$\{dz\})|(\$dz\b)/g, ''); + 'frpgvba'.replace(re29, ''); + 'frpgvba'.replace(re30, ''); + 'fvgr'.replace(re29, ''); + 'fvgr'.replace(re30, ''); + 'fcrpvny'.replace(re29, ''); + 'fcrpvny'.replace(re30, ''); + re36.exec('anzr'); + /e/.exec('9.0 e115'); + } + } + var re57 = /##yv4##/gi; + var re58 = /##yv16##/gi; + var re59 = /##yv19##/gi; + var str27 = '##yv4##Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.##yv19##Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.##yv16##Ybgf bs fgbentr (5 TO) - zber pbby fghss ba gur jnl.##OE## ##OE## ##N##Yrnea zber##/N##'; + var str28 = 'Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.##yv19##Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.##yv16##Ybgf bs fgbentr (5 TO) - zber pbby fghss ba gur jnl.##OE## ##OE## ##N##Yrnea zber##/N##'; + var str29 = 'Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.##yv19##Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.Ybgf bs fgbentr (5 TO) - zber pbby fghss ba gur jnl.##OE## ##OE## ##N##Yrnea zber##/N##'; + var str30 = 'Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.Ybgf bs fgbentr (5 TO) - zber pbby fghss ba gur jnl.##OE## ##OE## ##N##Yrnea zber##/N##'; + var str31 = 'Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.Ybgf bs fgbentr (5 TO) - zber pbby fghss ba gur jnl. ##N##Yrnea zber##/N##'; + var str32 = 'Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.Ybgf bs fgbentr (5 TO) - zber pbby fghss ba gur jnl. Yrnea zber##/N##'; + var str33 = 'Bar Jvaqbjf Yvir VQ trgf lbh vagb Ubgznvy, Zrffratre, Kobk YVIR \u2014 naq bgure cynprf lbh frr #~#argjbexybtb#~#'; + var re60 = /(?:^|\s+)bss(?:\s+|$)/; + var re61 = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/; + var re62 = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/; + var str34 = '${1}://${2}${3}${4}${5}'; + var str35 = ' O=6gnyg0g4znrrn&o=3&f=gc; Q=_lyu=K3bQZGSxnT4lZzD3OS9GNmV3ZGLkAQxRpTyxNmRlZmRmAmNkAQLRqTImqNZjOUEgpTjQnJ5xMKtgoN--; SCF=qy'; + function runBlock6() { + for (var i = 0; i < 11; i++) { + str27.replace(/##yv0##/gi, ''); + str27.replace(re57, ''); + str28.replace(re58, ''); + str29.replace(re59, ''); + str30.replace(/##\/o##/gi, ''); + str30.replace(/##\/v##/gi, ''); + str30.replace(/##\/h##/gi, ''); + str30.replace(/##o##/gi, ''); + str30.replace(/##oe##/gi, ''); + str30.replace(/##v##/gi, ''); + str30.replace(/##h##/gi, ''); + str31.replace(/##n##/gi, ''); + str32.replace(/##\/n##/gi, ''); + str33.replace(/#~#argjbexybtb#~#/g, ''); + / Zbovyr\//.exec(str0); + /##yv1##/gi.exec(str27); + /##yv10##/gi.exec(str28); + /##yv11##/gi.exec(str28); + /##yv12##/gi.exec(str28); + /##yv13##/gi.exec(str28); + /##yv14##/gi.exec(str28); + /##yv15##/gi.exec(str28); + re58.exec(str28); + /##yv17##/gi.exec(str29); + /##yv18##/gi.exec(str29); + re59.exec(str29); + /##yv2##/gi.exec(str27); + /##yv20##/gi.exec(str30); + /##yv21##/gi.exec(str30); + /##yv22##/gi.exec(str30); + /##yv23##/gi.exec(str30); + /##yv3##/gi.exec(str27); + re57.exec(str27); + /##yv5##/gi.exec(str28); + /##yv6##/gi.exec(str28); + /##yv7##/gi.exec(str28); + /##yv8##/gi.exec(str28); + /##yv9##/gi.exec(str28); + re8.exec('473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29'); + re8.exec('SbeprqRkcvengvba=633669325184628362'); + re8.exec('FrffvbaQQS2=473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29'); + /AbxvnA[^\/]*/.exec(str0); + } + for (var i = 0; i < 10; i++) { + ' bss'.replace(/(?:^|\s+)bss(?:\s+|$)/g, ''); + str34.replace(/(\$\{0\})|(\$0\b)/g, ''); + str34.replace(/(\$\{1\})|(\$1\b)/g, ''); + str34.replace(/(\$\{pbzcyrgr\})|(\$pbzcyrgr\b)/g, ''); + str34.replace(/(\$\{sentzrag\})|(\$sentzrag\b)/g, ''); + str34.replace(/(\$\{ubfgcbeg\})|(\$ubfgcbeg\b)/g, ''); + str34.replace(re56, ''); + str34.replace(/(\$\{cebgbpby\})|(\$cebgbpby\b)/g, ''); + str34.replace(/(\$\{dhrel\})|(\$dhrel\b)/g, ''); + 'nqfvmr'.replace(re29, ''); + 'nqfvmr'.replace(re30, ''); + 'uggc://${2}${3}${4}${5}'.replace(/(\$\{2\})|(\$2\b)/g, ''); + 'uggc://wf.hv-cbegny.qr${3}${4}${5}'.replace(/(\$\{3\})|(\$3\b)/g, ''); + 'arjf'.replace(re40, ''); + 'arjf'.replace(re41, ''); + 'arjf'.replace(re42, ''); + 'arjf'.replace(re43, ''); + 'arjf'.replace(re44, ''); + 'arjf'.replace(re45, ''); + 'arjf'.replace(re46, ''); + 'arjf'.replace(re47, ''); + 'arjf'.replace(re48, ''); + / PC=i=(\d+)&oe=(.)/.exec(str35); + re60.exec(' '); + re60.exec(' bss'); + re60.exec(''); + re19.exec(' '); + re19.exec('svefg ba'); + re19.exec('ynfg vtaber'); + re19.exec('ba'); + re9.exec('scnq so '); + re9.exec('zrqvgobk'); + re9.exec('hsgy'); + re9.exec('lhv-h'); + /Fnsnev|Xbadhrebe|XUGZY/gi.exec(str0); + re61.exec('uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf'); + re62.exec('#Ybtva_rznvy'); + } + } + var re63 = /\{0\}/g; + var str36 = 'FrffvbaQQS2=4ss747o77904333q374or84qrr1s9r0nprp8r5q81534o94n; ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669321699093060&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_tfwsbrg-aowb_80=4413268q3660'; + var str37 = 'FrffvbaQQS2=4ss747o77904333q374or84qrr1s9r0nprp8r5q81534o94n; AFP_zp_tfwsbrg-aowb_80=4413268q3660; __hgzm=144631658.1231364074.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.2294274870215848400.1231364074.1231364074.1231364074.1; __hgzo=144631658.0.10.1231364074; __hgzp=144631658; ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669321699093060&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str38 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231364057761&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231364057761&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Ssevraqf.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1667363813.1231364061&tn_fvq=1231364061&tn_uvq=1917563877&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22'; + var str39 = 'ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669321699093060&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str40 = 'ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669321699093060&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R='; + function runBlock7() { + for (var i = 0; i < 9; i++) { + '0'.replace(re40, ''); + '0'.replace(re10, ''); + '0'.replace(re51, ''); + '0'.replace(re52, ''); + '0'.replace(re53, ''); + '0'.replace(re39, ''); + '0'.replace(re54, ''); + 'Lrf'.replace(re40, ''); + 'Lrf'.replace(re10, ''); + 'Lrf'.replace(re51, ''); + 'Lrf'.replace(re52, ''); + 'Lrf'.replace(re53, ''); + 'Lrf'.replace(re39, ''); + 'Lrf'.replace(re54, ''); + } + for (var i = 0; i < 8; i++) { + 'Pybfr {0}'.replace(re63, ''); + 'Bcra {0}'.replace(re63, ''); + str36.split(re32); + str37.split(re32); + 'puvyq p1 svefg gnournqref'.replace(re14, ''); + 'puvyq p1 svefg gnournqref'.replace(re15, ''); + 'uqy_fcb'.replace(re14, ''); + 'uqy_fcb'.replace(re15, ''); + 'uvag'.replace(re14, ''); + 'uvag'.replace(re15, ''); + str38.replace(re33, ''); + 'yvfg'.replace(re14, ''); + 'yvfg'.replace(re15, ''); + 'at_bhgre'.replace(re30, ''); + 'cnerag puebzr5 qbhoyr2 NU'.replace(re14, ''); + 'cnerag puebzr5 qbhoyr2 NU'.replace(re15, ''); + 'cnerag puebzr5 dhnq5 ps NU osyvax zbarl'.replace(re14, ''); + 'cnerag puebzr5 dhnq5 ps NU osyvax zbarl'.replace(re15, ''); + 'cnerag puebzr6 fvatyr1'.replace(re14, ''); + 'cnerag puebzr6 fvatyr1'.replace(re15, ''); + 'cb_qrs'.replace(re14, ''); + 'cb_qrs'.replace(re15, ''); + 'gnopbagrag'.replace(re14, ''); + 'gnopbagrag'.replace(re15, ''); + 'iv_svefg_gvzr'.replace(re30, ''); + /(^|.)(ronl|qri-ehf3.wbg)(|fgberf|zbgbef|yvirnhpgvbaf|jvxv|rkcerff|punggre).(pbz(|.nh|.pa|.ux|.zl|.ft|.oe|.zk)|pb(.hx|.xe|.am)|pn|qr|se|vg|ay|or|ng|pu|vr|va|rf|cy|cu|fr)$/i.exec('cntrf.ronl.pbz'); + re8.exec('144631658.0.10.1231364074'); + re8.exec('144631658.1231364074.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re8.exec('144631658.2294274870215848400.1231364074.1231364074.1231364074.1'); + re8.exec('4413241q3660'); + re8.exec('SbeprqRkcvengvba=633669357391353591'); + re8.exec(str39); + re8.exec(str40); + re8.exec('AFP_zp_kkk-gdzogv_80=4413241q3660'); + re8.exec('FrffvbaQQS2=p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7'); + re8.exec('__hgzn=144631658.2294274870215848400.1231364074.1231364074.1231364074.1'); + re8.exec('__hgzo=144631658.0.10.1231364074'); + re8.exec('__hgzm=144631658.1231364074.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re8.exec('p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7'); + re34.exec(str36); + re34.exec(str37); + } + } + var re64 = /\b[a-z]/g; + var re65 = /^uggc:\/\//; + var re66 = /(?:^|\s+)qvfnoyrq(?:\s+|$)/; + var str41 = 'uggc://cebsvyr.zlfcnpr.pbz/Zbqhyrf/Nccyvpngvbaf/Cntrf/Pnainf.nfck'; + function runBlock8() { + for (var i = 0; i < 7; i++) { + str1.match(/\d+/g); + 'nsgre'.replace(re64, ''); + 'orsber'.replace(re64, ''); + 'obggbz'.replace(re64, ''); + 'ohvygva_jrngure.kzy'.replace(re65, ''); + 'ohggba'.replace(re37, ''); + 'ohggba'.replace(re18, ''); + 'qngrgvzr.kzy'.replace(re65, ''); + 'uggc://eff.paa.pbz/eff/paa_gbcfgbevrf.eff'.replace(re65, ''); + 'vachg'.replace(re37, ''); + 'vachg'.replace(re18, ''); + 'vafvqr'.replace(re64, ''); + 'cbvagre'.replace(re27, ''); + 'cbfvgvba'.replace(/[A-Z]/g, ''); + 'gbc'.replace(re27, ''); + 'gbc'.replace(re64, ''); + 'hy'.replace(re37, ''); + 'hy'.replace(re18, ''); + str26.replace(re37, ''); + str26.replace(re18, ''); + 'lbhghor_vtbbtyr/i2/lbhghor.kzy'.replace(re65, ''); + 'm-vaqrk'.replace(re27, ''); + /#([\w-]+)/.exec(str26); + re16.exec('urvtug'); + re16.exec('znetvaGbc'); + re16.exec('jvqgu'); + re19.exec('gno0 svefg ba'); + re19.exec('gno0 ba'); + re19.exec('gno4 ynfg'); + re19.exec('gno4'); + re19.exec('gno5'); + re19.exec('gno6'); + re19.exec('gno7'); + re19.exec('gno8'); + /NqborNVE\/([^\s]*)/.exec(str0); + /NccyrJroXvg\/([^ ]*)/.exec(str0); + /XUGZY/gi.exec(str0); + /^(?:obql|ugzy)$/i.exec('YV'); + re38.exec('ohggba'); + re38.exec('vachg'); + re38.exec('hy'); + re38.exec(str26); + /^(\w+|\*)/.exec(str26); + /znp|jva|yvahk/i.exec('Jva32'); + /eton?\([\d\s,]+\)/.exec('fgngvp'); + } + for (var i = 0; i < 6; i++) { + ''.replace(/\r/g, ''); + '/'.replace(re40, ''); + '/'.replace(re10, ''); + '/'.replace(re51, ''); + '/'.replace(re52, ''); + '/'.replace(re53, ''); + '/'.replace(re39, ''); + '/'.replace(re54, ''); + 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/{0}?[NDO]&{1}&{2}&[NDR]'.replace(re63, ''); + str41.replace(re12, ''); + 'uggc://jjj.snprobbx.pbz/fepu.cuc'.replace(re23, ''); + 'freivpr'.replace(re40, ''); + 'freivpr'.replace(re41, ''); + 'freivpr'.replace(re42, ''); + 'freivpr'.replace(re43, ''); + 'freivpr'.replace(re44, ''); + 'freivpr'.replace(re45, ''); + 'freivpr'.replace(re46, ''); + 'freivpr'.replace(re47, ''); + 'freivpr'.replace(re48, ''); + /((ZFVR\s+([6-9]|\d\d)\.))/.exec(str0); + re66.exec(''); + re50.exec('fryrpgrq'); + re8.exec('8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn'); + re8.exec('SbeprqRkcvengvba=633669340386893867'); + re8.exec('VC=74.125.75.17'); + re8.exec('FrffvbaQQS2=8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn'); + /Xbadhrebe|Fnsnev|XUGZY/.exec(str0); + re13.exec(str41); + re49.exec('unfsbphf'); + } + } + var re67 = /zrah_byq/g; + var str42 = 'FrffvbaQQS2=473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29; ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669325184628362&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R='; + var str43 = 'FrffvbaQQS2=473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29; __hgzm=144631658.1231364380.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.3931862196947939300.1231364380.1231364380.1231364380.1; __hgzo=144631658.0.10.1231364380; __hgzp=144631658; ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669325184628362&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str44 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_vzntrf_wf&qg=1231364373088&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231364373088&punaary=svz_zlfcnpr_hfre-ivrj-pbzzragf%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Spbzzrag.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1158737789.1231364375&tn_fvq=1231364375&tn_uvq=415520832&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22'; + var str45 = 'ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669325184628362&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str46 = 'ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669325184628362&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R='; + var re68 = /^([#.]?)((?:[\w\u0128-\uffff*_-]|\\.)*)/; + var re69 = /\{1\}/g; + var re70 = /\s+/; + var re71 = /(\$\{4\})|(\$4\b)/g; + var re72 = /(\$\{5\})|(\$5\b)/g; + var re73 = /\{2\}/g; + var re74 = /[^+>] [^+>]/; + var re75 = /\bucpyv\s*=\s*([^;]*)/i; + var re76 = /\bucuvqr\s*=\s*([^;]*)/i; + var re77 = /\bucfie\s*=\s*([^;]*)/i; + var re78 = /\bhfucjrn\s*=\s*([^;]*)/i; + var re79 = /\bmvc\s*=\s*([^;]*)/i; + var re80 = /^((?:[\w\u0128-\uffff*_-]|\\.)+)(#)((?:[\w\u0128-\uffff*_-]|\\.)+)/; + var re81 = /^([>+~])\s*(\w*)/i; + var re82 = /^>\s*((?:[\w\u0128-\uffff*_-]|\\.)+)/; + var re83 = /^[\s[]?shapgvba/; + var re84 = /v\/g.tvs#(.*)/i; + var str47 = '#Zbq-Vasb-Vasb-WninFpevcgUvag'; + var str48 = ',n.svryqOgaPnapry'; + var str49 = 'FrffvbaQQS2=p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7; ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669357391353591&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_kkk-gdzogv_80=4413241q3660'; + var str50 = 'FrffvbaQQS2=p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7; AFP_zp_kkk-gdzogv_80=4413241q3660; AFP_zp_kkk-aowb_80=4413235p3660; __hgzm=144631658.1231367708.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.2770915348920628700.1231367708.1231367708.1231367708.1; __hgzo=144631658.0.10.1231367708; __hgzp=144631658; ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669357391353591&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str51 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231367691141&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231367691141&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Sjjj.zlfcnpr.pbz%2S&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=320757904.1231367694&tn_fvq=1231367694&tn_uvq=1758792003&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22'; + var str52 = 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55332979829981?[NDO]&aqu=1&g=7%2S0%2S2009%2014%3N38%3N42%203%20480&af=zfacbegny&cntrAnzr=HF%20UCZFSGJ&t=uggc%3N%2S%2Sjjj.zfa.pbz%2S&f=1024k768&p=24&x=L&oj=994&ou=634&uc=A&{2}&[NDR]'; + var str53 = 'cnerag puebzr6 fvatyr1 gno fryrpgrq ovaq qbhoyr2 ps'; + var str54 = 'ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669357391353591&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str55 = 'ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669357391353591&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R='; + var str56 = 'ne;ng;nh;or;oe;pn;pu;py;pa;qr;qx;rf;sv;se;to;ux;vq;vr;va;vg;wc;xe;zk;zl;ay;ab;am;cu;cy;cg;eh;fr;ft;gu;ge;gj;mn;'; + var str57 = 'ZP1=I=3&THVQ=6nnpr9q661804s33nnop45nosqp17q85; zu=ZFSG; PHYGHER=RA-HF; SyvtugTebhcVq=97; SyvtugVq=OnfrCntr; ucfie=Z:5|S:5|G:5|R:5|Q:oyh|J:S; ucpyv=J.U|Y.|F.|E.|H.Y|P.|U.; hfucjrn=jp:HFPN0746; ZHVQ=Q783SN9O14054831N4869R51P0SO8886&GHVQ=1'; + var str58 = 'ZP1=I=3&THVQ=6nnpr9q661804s33nnop45nosqp17q85; zu=ZFSG; PHYGHER=RA-HF; SyvtugTebhcVq=97; SyvtugVq=OnfrCntr; ucfie=Z:5|S:5|G:5|R:5|Q:oyh|J:S; ucpyv=J.U|Y.|F.|E.|H.Y|P.|U.; hfucjrn=jp:HFPN0746; ZHVQ=Q783SN9O14054831N4869R51P0SO8886'; + var str59 = 'ZP1=I=3&THVQ=6nnpr9q661804s33nnop45nosqp17q85; zu=ZFSG; PHYGHER=RA-HF; SyvtugTebhcVq=97; SyvtugVq=OnfrCntr; ucfie=Z:5|S:5|G:5|R:5|Q:oyh|J:S; ucpyv=J.U|Y.|F.|E.|H.Y|P.|U.; hfucjrn=jp:HFPN0746; ZHVQ=Q783SN9O14054831N4869R51P0SO8886; mvc=m:94043|yn:37.4154|yb:-122.0585|p:HF|ue:1'; + var str60 = 'ZP1=I=3&THVQ=6nnpr9q661804s33nnop45nosqp17q85; zu=ZFSG; PHYGHER=RA-HF; SyvtugTebhcVq=97; SyvtugVq=OnfrCntr; ucfie=Z:5|S:5|G:5|R:5|Q:oyh|J:S; ucpyv=J.U|Y.|F.|E.|H.Y|P.|U.; hfucjrn=jp:HFPN0746; ZHVQ=Q783SN9O14054831N4869R51P0SO8886; mvc=m:94043|yn:37.4154|yb:-122.0585|p:HF'; + var str61 = 'uggc://gx2.fgp.f-zfa.pbz/oe/uc/11/ra-hf/pff/v/g.tvs#uggc://gx2.fgo.f-zfa.pbz/v/29/4RQP4969777N048NPS4RRR3PO2S7S.wct'; + var str62 = 'uggc://gx2.fgp.f-zfa.pbz/oe/uc/11/ra-hf/pff/v/g.tvs#uggc://gx2.fgo.f-zfa.pbz/v/OQ/63NP9O94NS5OQP1249Q9S1ROP7NS3.wct'; + var str63 = 'zbmvyyn/5.0 (jvaqbjf; h; jvaqbjf ag 5.1; ra-hf) nccyrjroxvg/528.9 (xugzy, yvxr trpxb) puebzr/2.0.157.0 fnsnev/528.9'; + function runBlock9() { + for (var i = 0; i < 5; i++) { + str42.split(re32); + str43.split(re32); + 'svz_zlfcnpr_hfre-ivrj-pbzzragf,svz_zlfcnpr_havgrq-fgngrf'.split(re20); + str44.replace(re33, ''); + 'zrah_arj zrah_arj_gbttyr zrah_gbttyr'.replace(re67, ''); + 'zrah_byq zrah_byq_gbttyr zrah_gbttyr'.replace(re67, ''); + re8.exec('102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98'); + re8.exec('144631658.0.10.1231364380'); + re8.exec('144631658.1231364380.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re8.exec('144631658.3931862196947939300.1231364380.1231364380.1231364380.1'); + re8.exec('441326q33660'); + re8.exec('SbeprqRkcvengvba=633669341278771470'); + re8.exec(str45); + re8.exec(str46); + re8.exec('AFP_zp_dfctwzssrwh-aowb_80=441326q33660'); + re8.exec('FrffvbaQQS2=102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98'); + re8.exec('__hgzn=144631658.3931862196947939300.1231364380.1231364380.1231364380.1'); + re8.exec('__hgzo=144631658.0.10.1231364380'); + re8.exec('__hgzm=144631658.1231364380.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + } + for (var i = 0; i < 4; i++) { + ' yvfg1'.replace(re14, ''); + ' yvfg1'.replace(re15, ''); + ' yvfg2'.replace(re14, ''); + ' yvfg2'.replace(re15, ''); + ' frneputebhc1'.replace(re14, ''); + ' frneputebhc1'.replace(re15, ''); + str47.replace(re68, ''); + str47.replace(re18, ''); + ''.replace(/&/g, ''); + ''.replace(re35, ''); + '(..-{0})(\|(\d+)|)'.replace(re63, ''); + str48.replace(re18, ''); + '//vzt.jro.qr/vij/FC/${cngu}/${anzr}/${inyhr}?gf=${abj}'.replace(re56, ''); + '//vzt.jro.qr/vij/FC/tzk_uc/${anzr}/${inyhr}?gf=${abj}'.replace(/(\$\{anzr\})|(\$anzr\b)/g, ''); + 'Jvaqbjf Yvir Ubgznvy{1}'.replace(re69, ''); + '{0}{1}'.replace(re63, ''); + '{1}'.replace(re69, ''); + '{1}'.replace(re63, ''); + 'Vzntrf'.replace(re15, ''); + 'ZFA'.replace(re15, ''); + 'Zncf'.replace(re15, ''); + 'Zbq-Vasb-Vasb-WninFpevcgUvag'.replace(re39, ''); + 'Arjf'.replace(re15, ''); + str49.split(re32); + str50.split(re32); + 'Ivqrb'.replace(re15, ''); + 'Jro'.replace(re15, ''); + 'n'.replace(re39, ''); + 'nwnkFgneg'.split(re70); + 'nwnkFgbc'.split(re70); + 'ovaq'.replace(re14, ''); + 'ovaq'.replace(re15, ''); + 'oevatf lbh zber. Zber fcnpr (5TO), zber frphevgl, fgvyy serr.'.replace(re63, ''); + 'puvyq p1 svefg qrpx'.replace(re14, ''); + 'puvyq p1 svefg qrpx'.replace(re15, ''); + 'puvyq p1 svefg qbhoyr2'.replace(re14, ''); + 'puvyq p1 svefg qbhoyr2'.replace(re15, ''); + 'puvyq p2 ynfg'.replace(re14, ''); + 'puvyq p2 ynfg'.replace(re15, ''); + 'puvyq p2'.replace(re14, ''); + 'puvyq p2'.replace(re15, ''); + 'puvyq p3'.replace(re14, ''); + 'puvyq p3'.replace(re15, ''); + 'puvyq p4 ynfg'.replace(re14, ''); + 'puvyq p4 ynfg'.replace(re15, ''); + 'pbclevtug'.replace(re14, ''); + 'pbclevtug'.replace(re15, ''); + 'qZFAZR_1'.replace(re14, ''); + 'qZFAZR_1'.replace(re15, ''); + 'qbhoyr2 ps'.replace(re14, ''); + 'qbhoyr2 ps'.replace(re15, ''); + 'qbhoyr2'.replace(re14, ''); + 'qbhoyr2'.replace(re15, ''); + 'uqy_arj'.replace(re14, ''); + 'uqy_arj'.replace(re15, ''); + 'uc_fubccvatobk'.replace(re30, ''); + 'ugzy%2Rvq'.replace(re29, ''); + 'ugzy%2Rvq'.replace(re30, ''); + str51.replace(re33, ''); + 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/cebgbglcr.wf${4}${5}'.replace(re71, ''); + 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/cebgbglcr.wf${5}'.replace(re72, ''); + str52.replace(re73, ''); + 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55332979829981?[NDO]&{1}&{2}&[NDR]'.replace(re69, ''); + 'vztZFSG'.replace(re14, ''); + 'vztZFSG'.replace(re15, ''); + 'zfasbbg1 ps'.replace(re14, ''); + 'zfasbbg1 ps'.replace(re15, ''); + str53.replace(re14, ''); + str53.replace(re15, ''); + 'cnerag puebzr6 fvatyr1 gno fryrpgrq ovaq'.replace(re14, ''); + 'cnerag puebzr6 fvatyr1 gno fryrpgrq ovaq'.replace(re15, ''); + 'cevznel'.replace(re14, ''); + 'cevznel'.replace(re15, ''); + 'erpgnatyr'.replace(re30, ''); + 'frpbaqnel'.replace(re14, ''); + 'frpbaqnel'.replace(re15, ''); + 'haybnq'.split(re70); + '{0}{1}1'.replace(re63, ''); + '|{1}1'.replace(re69, ''); + /(..-HF)(\|(\d+)|)/i.exec('xb-xe,ra-va,gu-gu'); + re4.exec('/ZlFcnprNccf/NccPnainf,45000012'); + re8.exec('144631658.0.10.1231367708'); + re8.exec('144631658.1231367708.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re8.exec('144631658.2770915348920628700.1231367708.1231367708.1231367708.1'); + re8.exec('4413235p3660'); + re8.exec('441327q73660'); + re8.exec('9995p6rp12rrnr893334ro7nq70o7p64p69rqn844prs1473'); + re8.exec('SbeprqRkcvengvba=633669350559478880'); + re8.exec(str54); + re8.exec(str55); + re8.exec('AFP_zp_dfctwzs-aowb_80=441327q73660'); + re8.exec('AFP_zp_kkk-aowb_80=4413235p3660'); + re8.exec('FrffvbaQQS2=9995p6rp12rrnr893334ro7nq70o7p64p69rqn844prs1473'); + re8.exec('__hgzn=144631658.2770915348920628700.1231367708.1231367708.1231367708.1'); + re8.exec('__hgzo=144631658.0.10.1231367708'); + re8.exec('__hgzm=144631658.1231367708.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re34.exec(str49); + re34.exec(str50); + /ZFVR\s+5[.]01/.exec(str0); + /HF(?=;)/i.exec(str56); + re74.exec(str47); + re28.exec('svefg npgvir svefgNpgvir'); + re28.exec('ynfg'); + /\bp:(..)/i.exec('m:94043|yn:37.4154|yb:-122.0585|p:HF'); + re75.exec(str57); + re75.exec(str58); + re76.exec(str57); + re76.exec(str58); + re77.exec(str57); + re77.exec(str58); + /\bhfucce\s*=\s*([^;]*)/i.exec(str59); + re78.exec(str57); + re78.exec(str58); + /\bjci\s*=\s*([^;]*)/i.exec(str59); + re79.exec(str58); + re79.exec(str60); + re79.exec(str59); + /\|p:([a-z]{2})/i.exec('m:94043|yn:37.4154|yb:-122.0585|p:HF|ue:1'); + re80.exec(str47); + re61.exec('cebgbglcr.wf'); + re68.exec(str47); + re81.exec(str47); + re82.exec(str47); + /^Fubpxjnir Synfu (\d)/.exec(str1); + /^Fubpxjnir Synfu (\d+)/.exec(str1); + re83.exec('[bowrpg tybony]'); + re62.exec(str47); + re84.exec(str61); + re84.exec(str62); + /jroxvg/.exec(str63); + } + } + var re85 = /eaq_zbqobkva/; + var str64 = '1231365729213'; + var str65 = '74.125.75.3-1057165600.29978900'; + var str66 = '74.125.75.3-1057165600.29978900.1231365730214'; + var str67 = 'Frnepu%20Zvpebfbsg.pbz'; + var str68 = 'FrffvbaQQS2=8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn; ZFPhygher=VC=74.125.75.17&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669340386893867&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R='; + var str69 = 'FrffvbaQQS2=8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn; __hgzm=144631658.1231365779.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.1877536177953918500.1231365779.1231365779.1231365779.1; __hgzo=144631658.0.10.1231365779; __hgzp=144631658; ZFPhygher=VC=74.125.75.17&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669340386893867&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str70 = 'I=3%26THVQ=757q3ss871q44o7o805n8113n5p72q52'; + var str71 = 'I=3&THVQ=757q3ss871q44o7o805n8113n5p72q52'; + var str72 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231365765292&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231365765292&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Sohyyrgvaf.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1579793869.1231365768&tn_fvq=1231365768&tn_uvq=2056210897&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22'; + var str73 = 'frnepu.zvpebfbsg.pbz'; + var str74 = 'frnepu.zvpebfbsg.pbz/'; + var str75 = 'ZFPhygher=VC=74.125.75.17&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669340386893867&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str76 = 'ZFPhygher=VC=74.125.75.17&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669340386893867&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R='; + function runBlock10() { + for (var i = 0; i < 3; i++) { + '%3Szxg=ra-HF'.replace(re39, ''); + '-8'.replace(re40, ''); + '-8'.replace(re10, ''); + '-8'.replace(re51, ''); + '-8'.replace(re52, ''); + '-8'.replace(re53, ''); + '-8'.replace(re39, ''); + '-8'.replace(re54, ''); + '1.5'.replace(re40, ''); + '1.5'.replace(re10, ''); + '1.5'.replace(re51, ''); + '1.5'.replace(re52, ''); + '1.5'.replace(re53, ''); + '1.5'.replace(re39, ''); + '1.5'.replace(re54, ''); + '1024k768'.replace(re40, ''); + '1024k768'.replace(re10, ''); + '1024k768'.replace(re51, ''); + '1024k768'.replace(re52, ''); + '1024k768'.replace(re53, ''); + '1024k768'.replace(re39, ''); + '1024k768'.replace(re54, ''); + str64.replace(re40, ''); + str64.replace(re10, ''); + str64.replace(re51, ''); + str64.replace(re52, ''); + str64.replace(re53, ''); + str64.replace(re39, ''); + str64.replace(re54, ''); + '14'.replace(re40, ''); + '14'.replace(re10, ''); + '14'.replace(re51, ''); + '14'.replace(re52, ''); + '14'.replace(re53, ''); + '14'.replace(re39, ''); + '14'.replace(re54, ''); + '24'.replace(re40, ''); + '24'.replace(re10, ''); + '24'.replace(re51, ''); + '24'.replace(re52, ''); + '24'.replace(re53, ''); + '24'.replace(re39, ''); + '24'.replace(re54, ''); + str65.replace(re40, ''); + str65.replace(re10, ''); + str65.replace(re51, ''); + str65.replace(re52, ''); + str65.replace(re53, ''); + str65.replace(re39, ''); + str65.replace(re54, ''); + str66.replace(re40, ''); + str66.replace(re10, ''); + str66.replace(re51, ''); + str66.replace(re52, ''); + str66.replace(re53, ''); + str66.replace(re39, ''); + str66.replace(re54, ''); + '9.0'.replace(re40, ''); + '9.0'.replace(re10, ''); + '9.0'.replace(re51, ''); + '9.0'.replace(re52, ''); + '9.0'.replace(re53, ''); + '9.0'.replace(re39, ''); + '9.0'.replace(re54, ''); + '994k634'.replace(re40, ''); + '994k634'.replace(re10, ''); + '994k634'.replace(re51, ''); + '994k634'.replace(re52, ''); + '994k634'.replace(re53, ''); + '994k634'.replace(re39, ''); + '994k634'.replace(re54, ''); + '?zxg=ra-HF'.replace(re40, ''); + '?zxg=ra-HF'.replace(re10, ''); + '?zxg=ra-HF'.replace(re51, ''); + '?zxg=ra-HF'.replace(re52, ''); + '?zxg=ra-HF'.replace(re53, ''); + '?zxg=ra-HF'.replace(re54, ''); + 'PAA.pbz'.replace(re25, ''); + 'PAA.pbz'.replace(re12, ''); + 'PAA.pbz'.replace(re39, ''); + 'Qngr & Gvzr'.replace(re25, ''); + 'Qngr & Gvzr'.replace(re12, ''); + 'Qngr & Gvzr'.replace(re39, ''); + 'Frnepu Zvpebfbsg.pbz'.replace(re40, ''); + 'Frnepu Zvpebfbsg.pbz'.replace(re54, ''); + str67.replace(re10, ''); + str67.replace(re51, ''); + str67.replace(re52, ''); + str67.replace(re53, ''); + str67.replace(re39, ''); + str68.split(re32); + str69.split(re32); + str70.replace(re52, ''); + str70.replace(re53, ''); + str70.replace(re39, ''); + str71.replace(re40, ''); + str71.replace(re10, ''); + str71.replace(re51, ''); + str71.replace(re54, ''); + 'Jrngure'.replace(re25, ''); + 'Jrngure'.replace(re12, ''); + 'Jrngure'.replace(re39, ''); + 'LbhGhor'.replace(re25, ''); + 'LbhGhor'.replace(re12, ''); + 'LbhGhor'.replace(re39, ''); + str72.replace(re33, ''); + 'erzbgr_vsenzr_1'.replace(/^erzbgr_vsenzr_/, ''); + str73.replace(re40, ''); + str73.replace(re10, ''); + str73.replace(re51, ''); + str73.replace(re52, ''); + str73.replace(re53, ''); + str73.replace(re39, ''); + str73.replace(re54, ''); + str74.replace(re40, ''); + str74.replace(re10, ''); + str74.replace(re51, ''); + str74.replace(re52, ''); + str74.replace(re53, ''); + str74.replace(re39, ''); + str74.replace(re54, ''); + 'lhv-h'.replace(/\-/g, ''); + re9.exec('p'); + re9.exec('qz p'); + re9.exec('zbqynory'); + re9.exec('lhv-h svefg'); + re8.exec('144631658.0.10.1231365779'); + re8.exec('144631658.1231365779.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re8.exec('144631658.1877536177953918500.1231365779.1231365779.1231365779.1'); + re8.exec(str75); + re8.exec(str76); + re8.exec('__hgzn=144631658.1877536177953918500.1231365779.1231365779.1231365779.1'); + re8.exec('__hgzo=144631658.0.10.1231365779'); + re8.exec('__hgzm=144631658.1231365779.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re34.exec(str68); + re34.exec(str69); + /^$/.exec(''); + re31.exec('qr'); + /^znk\d+$/.exec(''); + /^zva\d+$/.exec(''); + /^erfgber$/.exec(''); + re85.exec('zbqobkva zbqobk_abcnqqvat '); + re85.exec('zbqgvgyr'); + re85.exec('eaq_zbqobkva '); + re85.exec('eaq_zbqgvgyr '); + /frpgvba\d+_pbagragf/.exec('obggbz_ani'); + } + } + var re86 = /;\s*/; + var re87 = /(\$\{inyhr\})|(\$inyhr\b)/g; + var re88 = /(\$\{abj\})|(\$abj\b)/g; + var re89 = /\s+$/; + var re90 = /^\s+/; + var re91 = /(\\\"|\x00-|\x1f|\x7f-|\x9f|\u00ad|\u0600-|\u0604|\u070f|\u17b4|\u17b5|\u200c-|\u200f|\u2028-|\u202f|\u2060-|\u206f|\ufeff|\ufff0-|\uffff)/g; + var re92 = /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/; + var re93 = /^([:.#]*)((?:[\w\u0128-\uffff*_-]|\\.)+)/; + var re94 = /^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/; + var str77 = '#fubhgobk .pybfr'; + var str78 = 'FrffvbaQQS2=102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669341278771470&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_dfctwzssrwh-aowb_80=441326q33660'; + var str79 = 'FrffvbaQQS2=102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98; AFP_zp_dfctwzssrwh-aowb_80=441326q33660; __hgzm=144631658.1231365869.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.1670816052019209000.1231365869.1231365869.1231365869.1; __hgzo=144631658.0.10.1231365869; __hgzp=144631658; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669341278771470&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str80 = 'FrffvbaQQS2=9995p6rp12rrnr893334ro7nq70o7p64p69rqn844prs1473; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669350559478880&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_dfctwzs-aowb_80=441327q73660'; + var str81 = 'FrffvbaQQS2=9995p6rp12rrnr893334ro7nq70o7p64p69rqn844prs1473; AFP_zp_dfctwzs-aowb_80=441327q73660; __hgzm=144631658.1231367054.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.1796080716621419500.1231367054.1231367054.1231367054.1; __hgzo=144631658.0.10.1231367054; __hgzp=144631658; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669350559478880&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str82 = '[glcr=fhozvg]'; + var str83 = 'n.svryqOga,n.svryqOgaPnapry'; + var str84 = 'n.svryqOgaPnapry'; + var str85 = 'oyvpxchaxg'; + var str86 = 'qvi.bow-nppbeqvba qg'; + var str87 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_nccf_wf&qg=1231367052227&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231367052227&punaary=svz_zlfcnpr_nccf-pnainf%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Scebsvyr.zlfcnpr.pbz%2SZbqhyrf%2SNccyvpngvbaf%2SCntrf%2SPnainf.nfck&nq_glcr=grkg&rvq=6083027&rn=0&sez=1&tn_ivq=716357910.1231367056&tn_fvq=1231367056&tn_uvq=1387206491&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22'; + var str88 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231365851658&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231365851658&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Scebsvyrrqvg.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1979828129.1231365855&tn_fvq=1231365855&tn_uvq=2085229649&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22'; + var str89 = 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55023338617756?[NDO]&aqu=1&g=7%2S0%2S2009%2014%3N12%3N47%203%20480&af=zfacbegny&cntrAnzr=HF%20UCZFSGJ&t=uggc%3N%2S%2Sjjj.zfa.pbz%2S&f=0k0&p=43835816&x=A&oj=994&ou=634&uc=A&{2}&[NDR]'; + var str90 = 'zrgn[anzr=nwnkHey]'; + var str91 = 'anpuevpugra'; + var str92 = 'b oS={\'oT\':1.1};x $8n(B){z(B!=o9)};x $S(B){O(!$8n(B))z A;O(B.4L)z\'T\';b S=7t B;O(S==\'2P\'&&B.p4){23(B.7f){12 1:z\'T\';12 3:z/\S/.2g(B.8M)?\'ox\':\'oh\'}}O(S==\'2P\'||S==\'x\'){23(B.nE){12 2V:z\'1O\';12 7I:z\'5a\';12 18:z\'4B\'}O(7t B.I==\'4F\'){O(B.3u)z\'pG\';O(B.8e)z\'1p\'}}z S};x $2p(){b 4E={};Z(b v=0;v<1p.I;v++){Z(b X 1o 1p[v]){b nc=1p[v][X];b 6E=4E[X];O(6E&&$S(nc)==\'2P\'&&$S(6E)==\'2P\')4E[X]=$2p(6E,nc);17 4E[X]=nc}}z 4E};b $E=7p.E=x(){b 1d=1p;O(!1d[1])1d=[p,1d[0]];Z(b X 1o 1d[1])1d[0][X]=1d[1][X];z 1d[0]};b $4D=7p.pJ=x(){Z(b v=0,y=1p.I;v-1:p.3F(2R)>-1},nX:x(){z p.3y(/([.*+?^${}()|[\]\/\\])/t,\'\\$1\')}});2V.E({5V:x(1O){O(p.I<3)z A;O(p.I==4&&p[3]==0&&!1O)z\'p5\';b 3P=[];Z(b v=0;v<3;v++){b 52=(p[v]-0).4h(16);3P.1x((52.I==1)?\'0\'+52:52)}z 1O?3P:\'#\'+3P.2u(\'\')},5U:x(1O){O(p.I!=3)z A;b 1i=[];Z(b v=0;v<3;v++){1i.1x(5K((p[v].I==1)?p[v]+p[v]:p[v],16))}z 1O?1i:\'1i(\'+1i.2u(\',\')+\')\'}});7F.E({3n:x(P){b J=p;P=$2p({\'L\':J,\'V\':A,\'1p\':1S,\'2x\':A,\'4s\':A,\'6W\':A},P);O($2O(P.1p)&&$S(P.1p)!=\'1O\')P.1p=[P.1p];z x(V){b 1d;O(P.V){V=V||H.V;1d=[(P.V===1r)?V:Y P.V(V)];O(P.1p)1d.E(P.1p)}17 1d=P.1p||1p;b 3C=x(){z J.3H($5S(P'; + var str93 = 'hagreunyghat'; + var str94 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669341278771470&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str95 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669350559478880&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q'; + var str96 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669341278771470&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R='; + var str97 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669350559478880&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R='; + var str98 = 'shapgvba (){Cuk.Nccyvpngvba.Frghc.Pber();Cuk.Nccyvpngvba.Frghc.Nwnk();Cuk.Nccyvpngvba.Frghc.Synfu();Cuk.Nccyvpngvba.Frghc.Zbqhyrf()}'; + function runBlock11() { + for (var i = 0; i < 2; i++) { + ' .pybfr'.replace(re18, ''); + ' n.svryqOgaPnapry'.replace(re18, ''); + ' qg'.replace(re18, ''); + str77.replace(re68, ''); + str77.replace(re18, ''); + ''.replace(re39, ''); + ''.replace(/^/, ''); + ''.split(re86); + '*'.replace(re39, ''); + '*'.replace(re68, ''); + '*'.replace(re18, ''); + '.pybfr'.replace(re68, ''); + '.pybfr'.replace(re18, ''); + '//vzt.jro.qr/vij/FC/tzk_uc/fperra/${inyhr}?gf=${abj}'.replace(re87, ''); + '//vzt.jro.qr/vij/FC/tzk_uc/fperra/1024?gf=${abj}'.replace(re88, ''); + '//vzt.jro.qr/vij/FC/tzk_uc/jvafvmr/${inyhr}?gf=${abj}'.replace(re87, ''); + '//vzt.jro.qr/vij/FC/tzk_uc/jvafvmr/992/608?gf=${abj}'.replace(re88, ''); + '300k120'.replace(re30, ''); + '300k250'.replace(re30, ''); + '310k120'.replace(re30, ''); + '310k170'.replace(re30, ''); + '310k250'.replace(re30, ''); + '9.0 e115'.replace(/^.*\.(.*)\s.*$/, ''); + 'Nppbeqvba'.replace(re2, ''); + 'Nxghryy\x0a'.replace(re89, ''); + 'Nxghryy\x0a'.replace(re90, ''); + 'Nccyvpngvba'.replace(re2, ''); + 'Oyvpxchaxg\x0a'.replace(re89, ''); + 'Oyvpxchaxg\x0a'.replace(re90, ''); + 'Svanamra\x0a'.replace(re89, ''); + 'Svanamra\x0a'.replace(re90, ''); + 'Tnzrf\x0a'.replace(re89, ''); + 'Tnzrf\x0a'.replace(re90, ''); + 'Ubebfxbc\x0a'.replace(re89, ''); + 'Ubebfxbc\x0a'.replace(re90, ''); + 'Xvab\x0a'.replace(re89, ''); + 'Xvab\x0a'.replace(re90, ''); + 'Zbqhyrf'.replace(re2, ''); + 'Zhfvx\x0a'.replace(re89, ''); + 'Zhfvx\x0a'.replace(re90, ''); + 'Anpuevpugra\x0a'.replace(re89, ''); + 'Anpuevpugra\x0a'.replace(re90, ''); + 'Cuk'.replace(re2, ''); + 'ErdhrfgSvavfu'.split(re70); + 'ErdhrfgSvavfu.NWNK.Cuk'.split(re70); + 'Ebhgr\x0a'.replace(re89, ''); + 'Ebhgr\x0a'.replace(re90, ''); + str78.split(re32); + str79.split(re32); + str80.split(re32); + str81.split(re32); + 'Fcbeg\x0a'.replace(re89, ''); + 'Fcbeg\x0a'.replace(re90, ''); + 'GI-Fcbg\x0a'.replace(re89, ''); + 'GI-Fcbg\x0a'.replace(re90, ''); + 'Gbhe\x0a'.replace(re89, ''); + 'Gbhe\x0a'.replace(re90, ''); + 'Hagreunyghat\x0a'.replace(re89, ''); + 'Hagreunyghat\x0a'.replace(re90, ''); + 'Ivqrb\x0a'.replace(re89, ''); + 'Ivqrb\x0a'.replace(re90, ''); + 'Jrggre\x0a'.replace(re89, ''); + 'Jrggre\x0a'.replace(re90, ''); + str82.replace(re68, ''); + str82.replace(re18, ''); + str83.replace(re68, ''); + str83.replace(re18, ''); + str84.replace(re68, ''); + str84.replace(re18, ''); + 'nqiFreivprObk'.replace(re30, ''); + 'nqiFubccvatObk'.replace(re30, ''); + 'nwnk'.replace(re39, ''); + 'nxghryy'.replace(re40, ''); + 'nxghryy'.replace(re41, ''); + 'nxghryy'.replace(re42, ''); + 'nxghryy'.replace(re43, ''); + 'nxghryy'.replace(re44, ''); + 'nxghryy'.replace(re45, ''); + 'nxghryy'.replace(re46, ''); + 'nxghryy'.replace(re47, ''); + 'nxghryy'.replace(re48, ''); + str85.replace(re40, ''); + str85.replace(re41, ''); + str85.replace(re42, ''); + str85.replace(re43, ''); + str85.replace(re44, ''); + str85.replace(re45, ''); + str85.replace(re46, ''); + str85.replace(re47, ''); + str85.replace(re48, ''); + 'pngrtbel'.replace(re29, ''); + 'pngrtbel'.replace(re30, ''); + 'pybfr'.replace(re39, ''); + 'qvi'.replace(re39, ''); + str86.replace(re68, ''); + str86.replace(re18, ''); + 'qg'.replace(re39, ''); + 'qg'.replace(re68, ''); + 'qg'.replace(re18, ''); + 'rzorq'.replace(re39, ''); + 'rzorq'.replace(re68, ''); + 'rzorq'.replace(re18, ''); + 'svryqOga'.replace(re39, ''); + 'svryqOgaPnapry'.replace(re39, ''); + 'svz_zlfcnpr_nccf-pnainf,svz_zlfcnpr_havgrq-fgngrf'.split(re20); + 'svanamra'.replace(re40, ''); + 'svanamra'.replace(re41, ''); + 'svanamra'.replace(re42, ''); + 'svanamra'.replace(re43, ''); + 'svanamra'.replace(re44, ''); + 'svanamra'.replace(re45, ''); + 'svanamra'.replace(re46, ''); + 'svanamra'.replace(re47, ''); + 'svanamra'.replace(re48, ''); + 'sbphf'.split(re70); + 'sbphf.gno sbphfva.gno'.split(re70); + 'sbphfva'.split(re70); + 'sbez'.replace(re39, ''); + 'sbez.nwnk'.replace(re68, ''); + 'sbez.nwnk'.replace(re18, ''); + 'tnzrf'.replace(re40, ''); + 'tnzrf'.replace(re41, ''); + 'tnzrf'.replace(re42, ''); + 'tnzrf'.replace(re43, ''); + 'tnzrf'.replace(re44, ''); + 'tnzrf'.replace(re45, ''); + 'tnzrf'.replace(re46, ''); + 'tnzrf'.replace(re47, ''); + 'tnzrf'.replace(re48, ''); + 'ubzrcntr'.replace(re30, ''); + 'ubebfxbc'.replace(re40, ''); + 'ubebfxbc'.replace(re41, ''); + 'ubebfxbc'.replace(re42, ''); + 'ubebfxbc'.replace(re43, ''); + 'ubebfxbc'.replace(re44, ''); + 'ubebfxbc'.replace(re45, ''); + 'ubebfxbc'.replace(re46, ''); + 'ubebfxbc'.replace(re47, ''); + 'ubebfxbc'.replace(re48, ''); + 'uc_cebzbobk_ugzy%2Puc_cebzbobk_vzt'.replace(re30, ''); + 'uc_erpgnatyr'.replace(re30, ''); + str87.replace(re33, ''); + str88.replace(re33, ''); + 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf${4}${5}'.replace(re71, ''); + 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf${5}'.replace(re72, ''); + 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/qlaYvo.wf${4}${5}'.replace(re71, ''); + 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/qlaYvo.wf${5}'.replace(re72, ''); + 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/rssrpgYvo.wf${4}${5}'.replace(re71, ''); + 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/rssrpgYvo.wf${5}'.replace(re72, ''); + str89.replace(re73, ''); + 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55023338617756?[NDO]&{1}&{2}&[NDR]'.replace(re69, ''); + str6.replace(re23, ''); + 'xvab'.replace(re40, ''); + 'xvab'.replace(re41, ''); + 'xvab'.replace(re42, ''); + 'xvab'.replace(re43, ''); + 'xvab'.replace(re44, ''); + 'xvab'.replace(re45, ''); + 'xvab'.replace(re46, ''); + 'xvab'.replace(re47, ''); + 'xvab'.replace(re48, ''); + 'ybnq'.split(re70); + 'zrqvnzbqgno lhv-anifrg lhv-anifrg-gbc'.replace(re18, ''); + 'zrgn'.replace(re39, ''); + str90.replace(re68, ''); + str90.replace(re18, ''); + 'zbhfrzbir'.split(re70); + 'zbhfrzbir.gno'.split(re70); + str63.replace(/^.*jroxvg\/(\d+(\.\d+)?).*$/, ''); + 'zhfvx'.replace(re40, ''); + 'zhfvx'.replace(re41, ''); + 'zhfvx'.replace(re42, ''); + 'zhfvx'.replace(re43, ''); + 'zhfvx'.replace(re44, ''); + 'zhfvx'.replace(re45, ''); + 'zhfvx'.replace(re46, ''); + 'zhfvx'.replace(re47, ''); + 'zhfvx'.replace(re48, ''); + 'zlfcnpr_nccf_pnainf'.replace(re52, ''); + str91.replace(re40, ''); + str91.replace(re41, ''); + str91.replace(re42, ''); + str91.replace(re43, ''); + str91.replace(re44, ''); + str91.replace(re45, ''); + str91.replace(re46, ''); + str91.replace(re47, ''); + str91.replace(re48, ''); + 'anzr'.replace(re39, ''); + str92.replace(/\b\w+\b/g, ''); + 'bow-nppbeqvba'.replace(re39, ''); + 'bowrpg'.replace(re39, ''); + 'bowrpg'.replace(re68, ''); + 'bowrpg'.replace(re18, ''); + 'cnenzf%2Rfglyrf'.replace(re29, ''); + 'cnenzf%2Rfglyrf'.replace(re30, ''); + 'cbchc'.replace(re30, ''); + 'ebhgr'.replace(re40, ''); + 'ebhgr'.replace(re41, ''); + 'ebhgr'.replace(re42, ''); + 'ebhgr'.replace(re43, ''); + 'ebhgr'.replace(re44, ''); + 'ebhgr'.replace(re45, ''); + 'ebhgr'.replace(re46, ''); + 'ebhgr'.replace(re47, ''); + 'ebhgr'.replace(re48, ''); + 'freivprobk_uc'.replace(re30, ''); + 'fubccvatobk_uc'.replace(re30, ''); + 'fubhgobk'.replace(re39, ''); + 'fcbeg'.replace(re40, ''); + 'fcbeg'.replace(re41, ''); + 'fcbeg'.replace(re42, ''); + 'fcbeg'.replace(re43, ''); + 'fcbeg'.replace(re44, ''); + 'fcbeg'.replace(re45, ''); + 'fcbeg'.replace(re46, ''); + 'fcbeg'.replace(re47, ''); + 'fcbeg'.replace(re48, ''); + 'gbhe'.replace(re40, ''); + 'gbhe'.replace(re41, ''); + 'gbhe'.replace(re42, ''); + 'gbhe'.replace(re43, ''); + 'gbhe'.replace(re44, ''); + 'gbhe'.replace(re45, ''); + 'gbhe'.replace(re46, ''); + 'gbhe'.replace(re47, ''); + 'gbhe'.replace(re48, ''); + 'gi-fcbg'.replace(re40, ''); + 'gi-fcbg'.replace(re41, ''); + 'gi-fcbg'.replace(re42, ''); + 'gi-fcbg'.replace(re43, ''); + 'gi-fcbg'.replace(re44, ''); + 'gi-fcbg'.replace(re45, ''); + 'gi-fcbg'.replace(re46, ''); + 'gi-fcbg'.replace(re47, ''); + 'gi-fcbg'.replace(re48, ''); + 'glcr'.replace(re39, ''); + 'haqrsvarq'.replace(/\//g, ''); + str93.replace(re40, ''); + str93.replace(re41, ''); + str93.replace(re42, ''); + str93.replace(re43, ''); + str93.replace(re44, ''); + str93.replace(re45, ''); + str93.replace(re46, ''); + str93.replace(re47, ''); + str93.replace(re48, ''); + 'ivqrb'.replace(re40, ''); + 'ivqrb'.replace(re41, ''); + 'ivqrb'.replace(re42, ''); + 'ivqrb'.replace(re43, ''); + 'ivqrb'.replace(re44, ''); + 'ivqrb'.replace(re45, ''); + 'ivqrb'.replace(re46, ''); + 'ivqrb'.replace(re47, ''); + 'ivqrb'.replace(re48, ''); + 'ivfvgf=1'.split(re86); + 'jrggre'.replace(re40, ''); + 'jrggre'.replace(re41, ''); + 'jrggre'.replace(re42, ''); + 'jrggre'.replace(re43, ''); + 'jrggre'.replace(re44, ''); + 'jrggre'.replace(re45, ''); + 'jrggre'.replace(re46, ''); + 'jrggre'.replace(re47, ''); + 'jrggre'.replace(re48, ''); + /#[a-z0-9]+$/i.exec('uggc://jjj.fpuhryreim.arg/Qrsnhyg'); + re66.exec('fryrpgrq'); + /(?:^|\s+)lhv-ani(?:\s+|$)/.exec('sff lhv-ani'); + /(?:^|\s+)lhv-anifrg(?:\s+|$)/.exec('zrqvnzbqgno lhv-anifrg'); + /(?:^|\s+)lhv-anifrg-gbc(?:\s+|$)/.exec('zrqvnzbqgno lhv-anifrg'); + re91.exec('GnoThvq'); + re91.exec('thvq'); + /(pbzcngvoyr|jroxvg)/.exec(str63); + /.+(?:ei|vg|en|vr)[\/: ]([\d.]+)/.exec(str63); + re8.exec('144631658.0.10.1231365869'); + re8.exec('144631658.0.10.1231367054'); + re8.exec('144631658.1231365869.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re8.exec('144631658.1231367054.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re8.exec('144631658.1670816052019209000.1231365869.1231365869.1231365869.1'); + re8.exec('144631658.1796080716621419500.1231367054.1231367054.1231367054.1'); + re8.exec(str94); + re8.exec(str95); + re8.exec(str96); + re8.exec(str97); + re8.exec('__hgzn=144631658.1670816052019209000.1231365869.1231365869.1231365869.1'); + re8.exec('__hgzn=144631658.1796080716621419500.1231367054.1231367054.1231367054.1'); + re8.exec('__hgzo=144631658.0.10.1231365869'); + re8.exec('__hgzo=144631658.0.10.1231367054'); + re8.exec('__hgzm=144631658.1231365869.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re8.exec('__hgzm=144631658.1231367054.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)'); + re34.exec(str78); + re34.exec(str79); + re34.exec(str81); + re74.exec(str77); + re74.exec('*'); + re74.exec(str82); + re74.exec(str83); + re74.exec(str86); + re74.exec('rzorq'); + re74.exec('sbez.nwnk'); + re74.exec(str90); + re74.exec('bowrpg'); + /\/onfr.wf(\?.+)?$/.exec('/uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf'); + re28.exec('uvag ynfgUvag ynfg'); + re75.exec(''); + re76.exec(''); + re77.exec(''); + re78.exec(''); + re80.exec(str77); + re80.exec('*'); + re80.exec('.pybfr'); + re80.exec(str82); + re80.exec(str83); + re80.exec(str84); + re80.exec(str86); + re80.exec('qg'); + re80.exec('rzorq'); + re80.exec('sbez.nwnk'); + re80.exec(str90); + re80.exec('bowrpg'); + re61.exec('qlaYvo.wf'); + re61.exec('rssrpgYvo.wf'); + re61.exec('uggc://jjj.tzk.arg/qr/?fgnghf=uvajrvf'); + re92.exec(' .pybfr'); + re92.exec(' n.svryqOgaPnapry'); + re92.exec(' qg'); + re92.exec(str48); + re92.exec('.nwnk'); + re92.exec('.svryqOga,n.svryqOgaPnapry'); + re92.exec('.svryqOgaPnapry'); + re92.exec('.bow-nppbeqvba qg'); + re68.exec(str77); + re68.exec('*'); + re68.exec('.pybfr'); + re68.exec(str82); + re68.exec(str83); + re68.exec(str84); + re68.exec(str86); + re68.exec('qg'); + re68.exec('rzorq'); + re68.exec('sbez.nwnk'); + re68.exec(str90); + re68.exec('bowrpg'); + re93.exec(' .pybfr'); + re93.exec(' n.svryqOgaPnapry'); + re93.exec(' qg'); + re93.exec(str48); + re93.exec('.nwnk'); + re93.exec('.svryqOga,n.svryqOgaPnapry'); + re93.exec('.svryqOgaPnapry'); + re93.exec('.bow-nppbeqvba qg'); + re81.exec(str77); + re81.exec('*'); + re81.exec(str48); + re81.exec('.pybfr'); + re81.exec(str82); + re81.exec(str83); + re81.exec(str84); + re81.exec(str86); + re81.exec('qg'); + re81.exec('rzorq'); + re81.exec('sbez.nwnk'); + re81.exec(str90); + re81.exec('bowrpg'); + re94.exec(' .pybfr'); + re94.exec(' n.svryqOgaPnapry'); + re94.exec(' qg'); + re94.exec(str48); + re94.exec('.nwnk'); + re94.exec('.svryqOga,n.svryqOgaPnapry'); + re94.exec('.svryqOgaPnapry'); + re94.exec('.bow-nppbeqvba qg'); + re94.exec('[anzr=nwnkHey]'); + re94.exec(str82); + re31.exec('rf'); + re31.exec('wn'); + re82.exec(str77); + re82.exec('*'); + re82.exec(str48); + re82.exec('.pybfr'); + re82.exec(str82); + re82.exec(str83); + re82.exec(str84); + re82.exec(str86); + re82.exec('qg'); + re82.exec('rzorq'); + re82.exec('sbez.nwnk'); + re82.exec(str90); + re82.exec('bowrpg'); + re83.exec(str98); + re83.exec('shapgvba sbphf() { [angvir pbqr] }'); + re62.exec('#Ybtva'); + re62.exec('#Ybtva_cnffjbeq'); + re62.exec(str77); + re62.exec('#fubhgobkWf'); + re62.exec('#fubhgobkWfReebe'); + re62.exec('#fubhgobkWfFhpprff'); + re62.exec('*'); + re62.exec(str82); + re62.exec(str83); + re62.exec(str86); + re62.exec('rzorq'); + re62.exec('sbez.nwnk'); + re62.exec(str90); + re62.exec('bowrpg'); + re49.exec('pbagrag'); + re24.exec(str6); + /xbadhrebe/.exec(str63); + /znp/.exec('jva32'); + /zbmvyyn/.exec(str63); + /zfvr/.exec(str63); + /ag\s5\.1/.exec(str63); + /bcren/.exec(str63); + /fnsnev/.exec(str63); + /jva/.exec('jva32'); + /jvaqbjf/.exec(str63); + } + } + for (var i = 0; i < 5; i++) { + runBlock0(); + runBlock1(); + runBlock2(); + runBlock3(); + runBlock4(); + runBlock5(); + runBlock6(); + runBlock7(); + runBlock8(); + runBlock9(); + runBlock10(); + runBlock11(); + } +} + +runRegExpBenchmark(); diff --git a/js/src/jit-test/tests/v8-v5/check-richards.js b/js/src/jit-test/tests/v8-v5/check-richards.js new file mode 100644 index 0000000000..f91d878450 --- /dev/null +++ b/js/src/jit-test/tests/v8-v5/check-richards.js @@ -0,0 +1,536 @@ +// Copyright 2006-2008 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +// This is a JavaScript implementation of the Richards +// benchmark from: +// +// http://www.cl.cam.ac.uk/~mr10/Bench.html +// +// The benchmark was originally implemented in BCPL by +// Martin Richards. + + +//var Richards = new BenchmarkSuite('Richards', 34886, [ +// new Benchmark("Richards", runRichards) +//]); + + +/** + * The Richards benchmark simulates the task dispatcher of an + * operating system. + **/ +function runRichards() { + var scheduler = new Scheduler(); + scheduler.addIdleTask(ID_IDLE, 0, null, COUNT); + + var queue = new Packet(null, ID_WORKER, KIND_WORK); + queue = new Packet(queue, ID_WORKER, KIND_WORK); + scheduler.addWorkerTask(ID_WORKER, 1000, queue); + + queue = new Packet(null, ID_DEVICE_A, KIND_DEVICE); + queue = new Packet(queue, ID_DEVICE_A, KIND_DEVICE); + queue = new Packet(queue, ID_DEVICE_A, KIND_DEVICE); + scheduler.addHandlerTask(ID_HANDLER_A, 2000, queue); + + queue = new Packet(null, ID_DEVICE_B, KIND_DEVICE); + queue = new Packet(queue, ID_DEVICE_B, KIND_DEVICE); + queue = new Packet(queue, ID_DEVICE_B, KIND_DEVICE); + scheduler.addHandlerTask(ID_HANDLER_B, 3000, queue); + + scheduler.addDeviceTask(ID_DEVICE_A, 4000, null); + + scheduler.addDeviceTask(ID_DEVICE_B, 5000, null); + + scheduler.schedule(); + + assertEq(scheduler.queueCount, EXPECTED_QUEUE_COUNT); + assertEq(scheduler.holdCount, EXPECTED_HOLD_COUNT); +} + +var COUNT = 1000; + +/** + * These two constants specify how many times a packet is queued and + * how many times a task is put on hold in a correct run of richards. + * They don't have any meaning a such but are characteristic of a + * correct run so if the actual queue or hold count is different from + * the expected there must be a bug in the implementation. + **/ +var EXPECTED_QUEUE_COUNT = 2322; +var EXPECTED_HOLD_COUNT = 928; + + +/** + * A scheduler can be used to schedule a set of tasks based on their relative + * priorities. Scheduling is done by maintaining a list of task control blocks + * which holds tasks and the data queue they are processing. + * @constructor + */ +function Scheduler() { + this.queueCount = 0; + this.holdCount = 0; + this.blocks = new Array(NUMBER_OF_IDS); + this.list = null; + this.currentTcb = null; + this.currentId = null; +} + +var ID_IDLE = 0; +var ID_WORKER = 1; +var ID_HANDLER_A = 2; +var ID_HANDLER_B = 3; +var ID_DEVICE_A = 4; +var ID_DEVICE_B = 5; +var NUMBER_OF_IDS = 6; + +var KIND_DEVICE = 0; +var KIND_WORK = 1; + +/** + * Add an idle task to this scheduler. + * @param {int} id the identity of the task + * @param {int} priority the task's priority + * @param {Packet} queue the queue of work to be processed by the task + * @param {int} count the number of times to schedule the task + */ +Scheduler.prototype.addIdleTask = function (id, priority, queue, count) { + this.addRunningTask(id, priority, queue, new IdleTask(this, 1, count)); +}; + +/** + * Add a work task to this scheduler. + * @param {int} id the identity of the task + * @param {int} priority the task's priority + * @param {Packet} queue the queue of work to be processed by the task + */ +Scheduler.prototype.addWorkerTask = function (id, priority, queue) { + this.addTask(id, priority, queue, new WorkerTask(this, ID_HANDLER_A, 0)); +}; + +/** + * Add a handler task to this scheduler. + * @param {int} id the identity of the task + * @param {int} priority the task's priority + * @param {Packet} queue the queue of work to be processed by the task + */ +Scheduler.prototype.addHandlerTask = function (id, priority, queue) { + this.addTask(id, priority, queue, new HandlerTask(this)); +}; + +/** + * Add a handler task to this scheduler. + * @param {int} id the identity of the task + * @param {int} priority the task's priority + * @param {Packet} queue the queue of work to be processed by the task + */ +Scheduler.prototype.addDeviceTask = function (id, priority, queue) { + this.addTask(id, priority, queue, new DeviceTask(this)) +}; + +/** + * Add the specified task and mark it as running. + * @param {int} id the identity of the task + * @param {int} priority the task's priority + * @param {Packet} queue the queue of work to be processed by the task + * @param {Task} task the task to add + */ +Scheduler.prototype.addRunningTask = function (id, priority, queue, task) { + this.addTask(id, priority, queue, task); + this.currentTcb.setRunning(); +}; + +/** + * Add the specified task to this scheduler. + * @param {int} id the identity of the task + * @param {int} priority the task's priority + * @param {Packet} queue the queue of work to be processed by the task + * @param {Task} task the task to add + */ +Scheduler.prototype.addTask = function (id, priority, queue, task) { + this.currentTcb = new TaskControlBlock(this.list, id, priority, queue, task); + this.list = this.currentTcb; + this.blocks[id] = this.currentTcb; +}; + +/** + * Execute the tasks managed by this scheduler. + */ +Scheduler.prototype.schedule = function () { + this.currentTcb = this.list; + while (this.currentTcb != null) { + if (this.currentTcb.isHeldOrSuspended()) { + this.currentTcb = this.currentTcb.link; + } else { + this.currentId = this.currentTcb.id; + this.currentTcb = this.currentTcb.run(); + } + } +}; + +/** + * Release a task that is currently blocked and return the next block to run. + * @param {int} id the id of the task to suspend + */ +Scheduler.prototype.release = function (id) { + var tcb = this.blocks[id]; + if (tcb == null) return tcb; + tcb.markAsNotHeld(); + if (tcb.priority > this.currentTcb.priority) { + return tcb; + } else { + return this.currentTcb; + } +}; + +/** + * Block the currently executing task and return the next task control block + * to run. The blocked task will not be made runnable until it is explicitly + * released, even if new work is added to it. + */ +Scheduler.prototype.holdCurrent = function () { + this.holdCount++; + this.currentTcb.markAsHeld(); + return this.currentTcb.link; +}; + +/** + * Suspend the currently executing task and return the next task control block + * to run. If new work is added to the suspended task it will be made runnable. + */ +Scheduler.prototype.suspendCurrent = function () { + this.currentTcb.markAsSuspended(); + return this.currentTcb; +}; + +/** + * Add the specified packet to the end of the worklist used by the task + * associated with the packet and make the task runnable if it is currently + * suspended. + * @param {Packet} packet the packet to add + */ +Scheduler.prototype.queue = function (packet) { + var t = this.blocks[packet.id]; + if (t == null) return t; + this.queueCount++; + packet.link = null; + packet.id = this.currentId; + return t.checkPriorityAdd(this.currentTcb, packet); +}; + +/** + * A task control block manages a task and the queue of work packages associated + * with it. + * @param {TaskControlBlock} link the preceding block in the linked block list + * @param {int} id the id of this block + * @param {int} priority the priority of this block + * @param {Packet} queue the queue of packages to be processed by the task + * @param {Task} task the task + * @constructor + */ +function TaskControlBlock(link, id, priority, queue, task) { + this.link = link; + this.id = id; + this.priority = priority; + this.queue = queue; + this.task = task; + if (queue == null) { + this.state = STATE_SUSPENDED; + } else { + this.state = STATE_SUSPENDED_RUNNABLE; + } +} + +/** + * The task is running and is currently scheduled. + */ +var STATE_RUNNING = 0; + +/** + * The task has packets left to process. + */ +var STATE_RUNNABLE = 1; + +/** + * The task is not currently running. The task is not blocked as such and may +* be started by the scheduler. + */ +var STATE_SUSPENDED = 2; + +/** + * The task is blocked and cannot be run until it is explicitly released. + */ +var STATE_HELD = 4; + +var STATE_SUSPENDED_RUNNABLE = STATE_SUSPENDED | STATE_RUNNABLE; +var STATE_NOT_HELD = ~STATE_HELD; + +TaskControlBlock.prototype.setRunning = function () { + this.state = STATE_RUNNING; +}; + +TaskControlBlock.prototype.markAsNotHeld = function () { + this.state = this.state & STATE_NOT_HELD; +}; + +TaskControlBlock.prototype.markAsHeld = function () { + this.state = this.state | STATE_HELD; +}; + +TaskControlBlock.prototype.isHeldOrSuspended = function () { + return (this.state & STATE_HELD) != 0 || (this.state == STATE_SUSPENDED); +}; + +TaskControlBlock.prototype.markAsSuspended = function () { + this.state = this.state | STATE_SUSPENDED; +}; + +TaskControlBlock.prototype.markAsRunnable = function () { + this.state = this.state | STATE_RUNNABLE; +}; + +/** + * Runs this task, if it is ready to be run, and returns the next task to run. + */ +TaskControlBlock.prototype.run = function () { + var packet; + if (this.state == STATE_SUSPENDED_RUNNABLE) { + packet = this.queue; + this.queue = packet.link; + if (this.queue == null) { + this.state = STATE_RUNNING; + } else { + this.state = STATE_RUNNABLE; + } + } else { + packet = null; + } + return this.task.run(packet); +}; + +/** + * Adds a packet to the worklist of this block's task, marks this as runnable if + * necessary, and returns the next runnable object to run (the one + * with the highest priority). + */ +TaskControlBlock.prototype.checkPriorityAdd = function (task, packet) { + if (this.queue == null) { + this.queue = packet; + this.markAsRunnable(); + if (this.priority > task.priority) return this; + } else { + this.queue = packet.addTo(this.queue); + } + return task; +}; + +TaskControlBlock.prototype.toString = function () { + return "tcb { " + this.task + "@" + this.state + " }"; +}; + +/** + * An idle task doesn't do any work itself but cycles control between the two + * device tasks. + * @param {Scheduler} scheduler the scheduler that manages this task + * @param {int} v1 a seed value that controls how the device tasks are scheduled + * @param {int} count the number of times this task should be scheduled + * @constructor + */ +function IdleTask(scheduler, v1, count) { + this.scheduler = scheduler; + this.v1 = v1; + this.count = count; +} + +IdleTask.prototype.run = function (packet) { + this.count--; + if (this.count == 0) return this.scheduler.holdCurrent(); + if ((this.v1 & 1) == 0) { + this.v1 = this.v1 >> 1; + return this.scheduler.release(ID_DEVICE_A); + } else { + this.v1 = (this.v1 >> 1) ^ 0xD008; + return this.scheduler.release(ID_DEVICE_B); + } +}; + +IdleTask.prototype.toString = function () { + return "IdleTask" +}; + +/** + * A task that suspends itself after each time it has been run to simulate + * waiting for data from an external device. + * @param {Scheduler} scheduler the scheduler that manages this task + * @constructor + */ +function DeviceTask(scheduler) { + this.scheduler = scheduler; + this.v1 = null; +} + +DeviceTask.prototype.run = function (packet) { + if (packet == null) { + if (this.v1 == null) return this.scheduler.suspendCurrent(); + var v = this.v1; + this.v1 = null; + return this.scheduler.queue(v); + } else { + this.v1 = packet; + return this.scheduler.holdCurrent(); + } +}; + +DeviceTask.prototype.toString = function () { + return "DeviceTask"; +}; + +/** + * A task that manipulates work packets. + * @param {Scheduler} scheduler the scheduler that manages this task + * @param {int} v1 a seed used to specify how work packets are manipulated + * @param {int} v2 another seed used to specify how work packets are manipulated + * @constructor + */ +function WorkerTask(scheduler, v1, v2) { + this.scheduler = scheduler; + this.v1 = v1; + this.v2 = v2; +} + +WorkerTask.prototype.run = function (packet) { + if (packet == null) { + return this.scheduler.suspendCurrent(); + } else { + if (this.v1 == ID_HANDLER_A) { + this.v1 = ID_HANDLER_B; + } else { + this.v1 = ID_HANDLER_A; + } + packet.id = this.v1; + packet.a1 = 0; + for (var i = 0; i < DATA_SIZE; i++) { + this.v2++; + if (this.v2 > 26) this.v2 = 1; + packet.a2[i] = this.v2; + } + return this.scheduler.queue(packet); + } +}; + +WorkerTask.prototype.toString = function () { + return "WorkerTask"; +}; + +/** + * A task that manipulates work packets and then suspends itself. + * @param {Scheduler} scheduler the scheduler that manages this task + * @constructor + */ +function HandlerTask(scheduler) { + this.scheduler = scheduler; + this.v1 = null; + this.v2 = null; +} + +HandlerTask.prototype.run = function (packet) { + if (packet != null) { + if (packet.kind == KIND_WORK) { + this.v1 = packet.addTo(this.v1); + } else { + this.v2 = packet.addTo(this.v2); + } + } + if (this.v1 != null) { + var count = this.v1.a1; + var v; + if (count < DATA_SIZE) { + if (this.v2 != null) { + v = this.v2; + this.v2 = this.v2.link; + v.a1 = this.v1.a2[count]; + this.v1.a1 = count + 1; + return this.scheduler.queue(v); + } + } else { + v = this.v1; + this.v1 = this.v1.link; + return this.scheduler.queue(v); + } + } + return this.scheduler.suspendCurrent(); +}; + +HandlerTask.prototype.toString = function () { + return "HandlerTask"; +}; + +/* --- * + * P a c k e t + * --- */ + +var DATA_SIZE = 4; + +/** + * A simple package of data that is manipulated by the tasks. The exact layout + * of the payload data carried by a packet is not importaint, and neither is the + * nature of the work performed on packets by the tasks. + * + * Besides carrying data, packets form linked lists and are hence used both as + * data and worklists. + * @param {Packet} link the tail of the linked list of packets + * @param {int} id an ID for this packet + * @param {int} kind the type of this packet + * @constructor + */ +function Packet(link, id, kind) { + this.link = link; + this.id = id; + this.kind = kind; + this.a1 = 0; + this.a2 = new Array(DATA_SIZE); +} + +/** + * Add this packet to the end of a worklist, and return the worklist. + * @param {Packet} queue the worklist to add this packet to + */ +Packet.prototype.addTo = function (queue) { + this.link = null; + if (queue == null) return this; + var peek, next = queue; + while ((peek = next.link) != null) + next = peek; + next.link = this; + return queue; +}; + +Packet.prototype.toString = function () { + return "Packet"; +}; + +runRichards(); diff --git a/js/src/jit-test/tests/v8-v5/check-splay.js b/js/src/jit-test/tests/v8-v5/check-splay.js new file mode 100644 index 0000000000..5697ed6205 --- /dev/null +++ b/js/src/jit-test/tests/v8-v5/check-splay.js @@ -0,0 +1,430 @@ +// Copyright 2009 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// This benchmark is based on a JavaScript log processing module used +// by the V8 profiler to generate execution time profiles for runs of +// JavaScript applications, and it effectively measures how fast the +// JavaScript engine is at allocating nodes and reclaiming the memory +// used for old nodes. Because of the way splay trees work, the engine +// also has to deal with a lot of changes to the large tree object +// graph. + +//var Splay = new BenchmarkSuite('Splay', 126125, [ +// new Benchmark("Splay", SplayRun, SplaySetup, SplayTearDown) +//]); + +// This is the best random number generator available to mankind ;) +var MyMath = { + seed: 49734321, + random: function() { + // Robert Jenkins' 32 bit integer hash function. + this.seed = ((this.seed + 0x7ed55d16) + (this.seed << 12)) & 0xffffffff; + this.seed = ((this.seed ^ 0xc761c23c) ^ (this.seed >>> 19)) & 0xffffffff; + this.seed = ((this.seed + 0x165667b1) + (this.seed << 5)) & 0xffffffff; + this.seed = ((this.seed + 0xd3a2646c) ^ (this.seed << 9)) & 0xffffffff; + this.seed = ((this.seed + 0xfd7046c5) + (this.seed << 3)) & 0xffffffff; + this.seed = ((this.seed ^ 0xb55a4f09) ^ (this.seed >>> 16)) & 0xffffffff; + return (this.seed & 0xfffffff) / 0x10000000; + }, +}; + +// Configuration. +var kSplayTreeSize = 8000; +var kSplayTreeModifications = 80; +var kSplayTreePayloadDepth = 5; + +var splayTree = null; + + +function GeneratePayloadTree(depth, key) { + if (depth == 0) { + return { + array : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], + string : 'String for key ' + key + ' in leaf node' + }; + } else { + return { + left: GeneratePayloadTree(depth - 1, key), + right: GeneratePayloadTree(depth - 1, key) + }; + } +} + + +function GenerateKey() { + // The benchmark framework guarantees that Math.random is + // deterministic; see base.js. + // base.js isn't pulled in for jit-tests + return MyMath.random(); +} + + +function InsertNewNode() { + // Insert new node with a unique key. + var key; + do { + key = GenerateKey(); + } while (splayTree.find(key) != null); + splayTree.insert(key, GeneratePayloadTree(kSplayTreePayloadDepth, key)); + return key; +} + + +function SplaySetup() { + splayTree = new SplayTree(); + for (var i = 0; i < kSplayTreeSize; i++) InsertNewNode(); +} + + +function SplayTearDown() { + // Allow the garbage collector to reclaim the memory + // used by the splay tree no matter how we exit the + // tear down function. + var keys = splayTree.exportKeys(); + splayTree = null; + + // Verify that the splay tree has the right size. + var length = keys.length; + assertEq(length, kSplayTreeSize); + + // Verify that the splay tree has sorted, unique keys. + for (var i = 0; i < length - 1; i++) { + assertEq(keys[i] < keys[i + 1], true); + } +} + + +function SplayRun() { + // Replace a few nodes in the splay tree. + for (var i = 0; i < kSplayTreeModifications; i++) { + var key = InsertNewNode(); + var greatest = splayTree.findGreatestLessThan(key); + if (greatest == null) splayTree.remove(key); + else splayTree.remove(greatest.key); + } +} + + +/** + * Constructs a Splay tree. A splay tree is a self-balancing binary + * search tree with the additional property that recently accessed + * elements are quick to access again. It performs basic operations + * such as insertion, look-up and removal in O(log(n)) amortized time. + * + * @constructor + */ +function SplayTree() { +}; + + +/** + * Pointer to the root node of the tree. + * + * @type {SplayTree.Node} + * @private + */ +SplayTree.prototype.root_ = null; + + +/** + * @return {boolean} Whether the tree is empty. + */ +SplayTree.prototype.isEmpty = function() { + return !this.root_; +}; + + +/** + * Inserts a node into the tree with the specified key and value if + * the tree does not already contain a node with the specified key. If + * the value is inserted, it becomes the root of the tree. + * + * @param {number} key Key to insert into the tree. + * @param {*} value Value to insert into the tree. + */ +SplayTree.prototype.insert = function(key, value) { + if (this.isEmpty()) { + this.root_ = new SplayTree.Node(key, value); + return; + } + // Splay on the key to move the last node on the search path for + // the key to the root of the tree. + this.splay_(key); + if (this.root_.key == key) { + return; + } + var node = new SplayTree.Node(key, value); + if (key > this.root_.key) { + node.left = this.root_; + node.right = this.root_.right; + this.root_.right = null; + } else { + node.right = this.root_; + node.left = this.root_.left; + this.root_.left = null; + } + this.root_ = node; +}; + + +/** + * Removes a node with the specified key from the tree if the tree + * contains a node with this key. The removed node is returned. If the + * key is not found, an exception is thrown. + * + * @param {number} key Key to find and remove from the tree. + * @return {SplayTree.Node} The removed node. + */ +SplayTree.prototype.remove = function(key) { + if (this.isEmpty()) { + throw Error('Key not found: ' + key); + } + this.splay_(key); + if (this.root_.key != key) { + throw Error('Key not found: ' + key); + } + var removed = this.root_; + if (!this.root_.left) { + this.root_ = this.root_.right; + } else { + var right = this.root_.right; + this.root_ = this.root_.left; + // Splay to make sure that the new root has an empty right child. + this.splay_(key); + // Insert the original right child as the right child of the new + // root. + this.root_.right = right; + } + return removed; +}; + + +/** + * Returns the node having the specified key or null if the tree doesn't contain + * a node with the specified key. + * + * @param {number} key Key to find in the tree. + * @return {SplayTree.Node} Node having the specified key. + */ +SplayTree.prototype.find = function(key) { + if (this.isEmpty()) { + return null; + } + this.splay_(key); + return this.root_.key == key ? this.root_ : null; +}; + + +/** + * @return {SplayTree.Node} Node having the maximum key value that + * is less or equal to the specified key value. + */ +SplayTree.prototype.findGreatestLessThan = function(key) { + if (this.isEmpty()) { + return null; + } + // Splay on the key to move the node with the given key or the last + // node on the search path to the top of the tree. + this.splay_(key); + // Now the result is either the root node or the greatest node in + // the left subtree. + if (this.root_.key <= key) { + return this.root_; + } else if (this.root_.left) { + return this.findMax(this.root_.left); + } else { + return null; + } +}; + + +/** + * @return {Array<*>} An array containing all the keys of tree's nodes. + */ +SplayTree.prototype.exportKeys = function() { + var result = []; + if (!this.isEmpty()) { + this.root_.traverse_(function(node) { result.push(node.key); }); + } + return result; +}; + + +/** + * Perform the splay operation for the given key. Moves the node with + * the given key to the top of the tree. If no node has the given + * key, the last node on the search path is moved to the top of the + * tree. This is the simplified top-down splaying algorithm from: + * "Self-adjusting Binary Search Trees" by Sleator and Tarjan + * + * @param {number} key Key to splay the tree on. + * @private + */ +SplayTree.prototype.splay_ = function(key) { + if (this.isEmpty()) { + return; + } + // Create a dummy node. The use of the dummy node is a bit + // counter-intuitive: The right child of the dummy node will hold + // the L tree of the algorithm. The left child of the dummy node + // will hold the R tree of the algorithm. Using a dummy node, left + // and right will always be nodes and we avoid special cases. + var dummy, left, right; + dummy = left = right = new SplayTree.Node(null, null); + var current = this.root_; + while (true) { + if (key < current.key) { + if (!current.left) { + break; + } + if (key < current.left.key) { + // Rotate right. + var tmp = current.left; + current.left = tmp.right; + tmp.right = current; + current = tmp; + if (!current.left) { + break; + } + } + // Link right. + right.left = current; + right = current; + current = current.left; + } else if (key > current.key) { + if (!current.right) { + break; + } + if (key > current.right.key) { + // Rotate left. + var tmp = current.right; + current.right = tmp.left; + tmp.left = current; + current = tmp; + if (!current.right) { + break; + } + } + // Link left. + left.right = current; + left = current; + current = current.right; + } else { + break; + } + } + // Assemble. + left.right = current.left; + right.left = current.right; + current.left = dummy.right; + current.right = dummy.left; + this.root_ = current; +}; + + +/** + * Constructs a Splay tree node. + * + * @param {number} key Key. + * @param {*} value Value. + */ +SplayTree.Node = function(key, value) { + this.key = key; + this.value = value; +}; + + +/** + * @type {SplayTree.Node} + */ +SplayTree.Node.prototype.left = null; + + +/** + * @type {SplayTree.Node} + */ +SplayTree.Node.prototype.right = null; + + +/** + * Performs an ordered traversal of the subtree starting at + * this SplayTree.Node. + * + * @param {function(SplayTree.Node)} f Visitor function. + * @private + */ +SplayTree.Node.prototype.traverse_ = function(f) { + var current = this; + while (current) { + var left = current.left; + if (left) left.traverse_(f); + f(current); + current = current.right; + } +}; + +// Check initial pretenuring state. +gc(); +assertEq(nurseryStringsEnabled(), true); +assertEq(numAllocSitesPretenured(), 0); + +SplaySetup(); +SplayRun(); +SplayTearDown(); + +// Check our pretenuring system operates as expected if we are running in a +// normal-ish build. +// +// Different build configurations can affect things in a few ways: +// - We need scripts to spend time in baseline for pretenuring to collect +// data on them. +// - Fuzzing builds change the nursery sizing heuristics. +// - Various sanitizer builds affect execution speed which affects nursery +// size. + +function canCheckPretenuringState() { + if (gczeal() !== 0) { + return false; + } + + let jitOptions = getJitCompilerOptions(); + if (!jitOptions['baseline.enable'] || + jitOptions['ion.warmup.trigger'] <= jitOptions['baseline.warmup.trigger']) { + return false; + } + + let buildConfig = getBuildConfiguration(); + return !buildConfig['fuzzing-defined'] && + !buildConfig['asan'] && + !buildConfig['tsan'] && + !buildConfig['ubsan']; +} + +if (canCheckPretenuringState()) { + assertEq(nurseryStringsEnabled(), false); + assertEq(numAllocSitesPretenured() >= 3, true); +} diff --git a/js/src/jit-test/tests/warp/arguments-object-load-arg.js b/js/src/jit-test/tests/warp/arguments-object-load-arg.js new file mode 100644 index 0000000000..0598c3b1d6 --- /dev/null +++ b/js/src/jit-test/tests/warp/arguments-object-load-arg.js @@ -0,0 +1,109 @@ +// Test transpiling of LoadArgumentsObjectArgResult and cover all possible bailout conditions. + +function blackhole() { + // Direct eval prevents any compile-time optimisations. + eval(""); +} + +function testConstantArgAccess() { + blackhole(arguments); // Create an arguments object. + + for (var i = 0; i < 50; ++i) { + assertEq(arguments[0], 1); + } +} +for (var i = 0; i < 20; ++i) testConstantArgAccess(1); + +function testDynamicArgAccess() { + blackhole(arguments); // Create an arguments object. + + for (var i = 0; i < 50; ++i) { + assertEq(arguments[i & 1], 1 + (i & 1)); + } +} +for (var i = 0; i < 20; ++i) testDynamicArgAccess(1, 2); + +function markElementOveriddenIf(args, cond, value) { + with ({}) ; // Don't Warp compile to avoid cold code bailouts. + if (cond) { + Object.defineProperty(args, 0, {value}); + } +} + +function testBailoutElementReified() { + blackhole(arguments); // Create an arguments object. + + for (var i = 0; i < 50; ++i) { + markElementOveriddenIf(arguments, i === 25, 2); + + var expected = 1 + (i >= 25); + assertEq(arguments[0], expected); + } +} +for (var i = 0; i < 20; ++i) testBailoutElementReified(1); + +function markLengthOveriddenIf(args, cond, value) { + with ({}) ; // Don't Warp compile to avoid cold code bailouts. + if (cond) { + args.length = value; + } +} + +function testBailoutLengthReified() { + blackhole(arguments); // Create an arguments object. + + for (var i = 0; i < 50; ++i) { + markLengthOveriddenIf(arguments, i === 25, 0); + + assertEq(arguments[0], 1); + } +} +for (var i = 0; i < 20; ++i) testBailoutLengthReified(1); + +function deleteElementIf(args, cond) { + with ({}) ; // Don't Warp compile to avoid cold code bailouts. + if (cond) { + delete args[0]; + } +} + +function testBailoutElementDeleted() { + blackhole(arguments); // Create an arguments object. + + // Load expected values from an array to avoid possible cold code bailouts. + var values = [1, undefined]; + + for (var i = 0; i < 50; ++i) { + deleteElementIf(arguments, i === 25); + + var expected = values[0 + (i >= 25)]; + assertEq(arguments[0], expected); + } +} +for (var i = 0; i < 20; ++i) testBailoutElementDeleted(1); + +function testBailoutOutOfBounds() { + blackhole(arguments); // Create an arguments object. + + // Load expected values from an array to avoid possible cold code bailouts. + var values = [1, undefined]; + + for (var i = 0; i < 50; ++i) { + var index = 0 + (i >= 25); + var expected = values[index]; + assertEq(arguments[index], expected); + } +} +for (var i = 0; i < 20; ++i) testBailoutOutOfBounds(1); + +function testBailoutArgForwarded(arg1, arg2) { + blackhole(arguments); // Create an arguments object. + blackhole(() => arg2); // Ensure |arg2| is marked as "forwarded". + + for (var i = 0; i < 50; ++i) { + var index = 0 + (i >= 25); + var expected = 1 + (i >= 25); + assertEq(arguments[index], expected); + } +} +for (var i = 0; i < 20; ++i) testBailoutArgForwarded(1, 2); diff --git a/js/src/jit-test/tests/warp/arguments-object-load-length.js b/js/src/jit-test/tests/warp/arguments-object-load-length.js new file mode 100644 index 0000000000..935c406ac0 --- /dev/null +++ b/js/src/jit-test/tests/warp/arguments-object-load-length.js @@ -0,0 +1,57 @@ +// Test transpiling of LoadArgumentsObjectLengthResult and cover all possible bailout conditions. + +function blackhole() { + // Direct eval prevents any compile-time optimisations. + eval(""); +} + +function testLengthAccess() { + blackhole(arguments); // Create an arguments object. + + for (var i = 0; i < 50; ++i) { + assertEq(arguments.length, 1); + } +} +for (var i = 0; i < 20; ++i) testLengthAccess(1); + +function markLengthOveriddenIf(args, cond, value) { + with ({}) ; // Don't Warp compile to avoid cold code bailouts. + if (cond) { + args.length = value; + } +} + +function testBailoutLengthReified() { + blackhole(arguments); // Create an arguments object. + + for (var i = 0; i < 50; ++i) { + markLengthOveriddenIf(arguments, i === 25, 0); + + var expected = 0 + (i < 25); + assertEq(arguments.length, expected); + } +} +for (var i = 0; i < 20; ++i) testBailoutLengthReified(1); + + +function deleteLengthIf(args, cond) { + with ({}) ; // Don't Warp compile to avoid cold code bailouts. + if (cond) { + delete args.length; + } +} + +function testBailoutLengthDeleted() { + blackhole(arguments); // Create an arguments object. + + // Load expected values from an array to avoid possible cold code bailouts. + var values = [1, undefined]; + + for (var i = 0; i < 50; ++i) { + deleteLengthIf(arguments, i === 25); + + var expected = values[0 + (i >= 25)]; + assertEq(arguments.length, expected); + } +} +for (var i = 0; i < 20; ++i) testBailoutLengthDeleted(1); diff --git a/js/src/jit-test/tests/warp/bailout-inline-fun-call-no-args.js b/js/src/jit-test/tests/warp/bailout-inline-fun-call-no-args.js new file mode 100644 index 0000000000..be888552e6 --- /dev/null +++ b/js/src/jit-test/tests/warp/bailout-inline-fun-call-no-args.js @@ -0,0 +1,19 @@ +// |jit-test| --fast-warmup; --no-threads + +var iter = 0; + +function foo() { + var x = iter; + bailout(); + return x; +} + +function bar(x) { + return foo.call(); +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + iter = i; + assertEq(bar(), i); +} diff --git a/js/src/jit-test/tests/warp/bailout-inline-getter.js b/js/src/jit-test/tests/warp/bailout-inline-getter.js new file mode 100644 index 0000000000..86ef1300ec --- /dev/null +++ b/js/src/jit-test/tests/warp/bailout-inline-getter.js @@ -0,0 +1,22 @@ +// |jit-test| --fast-warmup; --no-threads + +var iter = 0; + +class A { + get foo() { + var x = iter; + bailout(); + return x; + } +} + +var a = new A(); +function bar() { + return a.foo; +} + +with ({}) {} +for(var i = 0; i < 100; i++) { + iter = i; + assertEq(bar(), i); +} diff --git a/js/src/jit-test/tests/warp/booleantostring.js b/js/src/jit-test/tests/warp/booleantostring.js new file mode 100644 index 0000000000..39ff0b1b6d --- /dev/null +++ b/js/src/jit-test/tests/warp/booleantostring.js @@ -0,0 +1,9 @@ +var a = [true, false]; +for (var i = 0; i < 1e4; i++) { + var str = "x: " + a[i & 1]; + if (i & 1) { + assertEq(str, "x: false"); + } else { + assertEq(str, "x: true"); + } +} diff --git a/js/src/jit-test/tests/warp/bug1646041.js b/js/src/jit-test/tests/warp/bug1646041.js new file mode 100644 index 0000000000..892553ed9f --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1646041.js @@ -0,0 +1,9 @@ +// |jit-test| --ion-warmup-threshold=2 +function f() { + while (true) { + return 1; + } +} +for (var i = 0; i < 100; i++) { + f(); +} diff --git a/js/src/jit-test/tests/warp/bug1646302.js b/js/src/jit-test/tests/warp/bug1646302.js new file mode 100644 index 0000000000..bf86fe702c --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1646302.js @@ -0,0 +1,9 @@ +function f(x) { + function fnc() {} + fnc.prototype = 3; + new fnc; + if (x < 50) { + new new.target(x + 1); + } +} +new f(0); diff --git a/js/src/jit-test/tests/warp/bug1647054.js b/js/src/jit-test/tests/warp/bug1647054.js new file mode 100644 index 0000000000..fa868c60a8 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1647054.js @@ -0,0 +1,8 @@ +function f() { + for (var i = 0; i < 200; ++i) { + for (var j = 0; 0 & ++i; ++j) { + i(); + } + } +} +f(); diff --git a/js/src/jit-test/tests/warp/bug1652049.js b/js/src/jit-test/tests/warp/bug1652049.js new file mode 100644 index 0000000000..a28e35d353 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1652049.js @@ -0,0 +1,7 @@ +function f() { + var o = {__proto__: null}; + for (var i = 0; i < 15; i++) { + assertEq("foo" in o, false); + } +} +f(); diff --git a/js/src/jit-test/tests/warp/bug1652732.js b/js/src/jit-test/tests/warp/bug1652732.js new file mode 100644 index 0000000000..f5df3bc648 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1652732.js @@ -0,0 +1,8 @@ +function test() { + var obj = {}; + obj[{}] = 1; + f = () => { for (var x of obj) {} }; +} +for (var i = 0; i < 5; i++) { + test(); +} diff --git a/js/src/jit-test/tests/warp/bug1653913.js b/js/src/jit-test/tests/warp/bug1653913.js new file mode 100644 index 0000000000..adaaf3c7c8 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1653913.js @@ -0,0 +1,3 @@ +var s = "aaaaaaaaaaaa"; +var a = [, [...s]]; +assertEq(a.toString(), ",a,a,a,a,a,a,a,a,a,a,a,a"); diff --git a/js/src/jit-test/tests/warp/bug1653972.js b/js/src/jit-test/tests/warp/bug1653972.js new file mode 100644 index 0000000000..953bb0077f --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1653972.js @@ -0,0 +1,11 @@ +function maybeSetLength(arr, b) { + if (b) { + arr.length = 0x8000_1111; + } +} +var arr = []; +for (var i = 0; i < 1600; i++) { + maybeSetLength(arr, i > 1500); + arr.push(2); +} +assertEq(arr.length, 0x8000_1112); diff --git a/js/src/jit-test/tests/warp/bug1661530.js b/js/src/jit-test/tests/warp/bug1661530.js new file mode 100644 index 0000000000..c4ea7fdb92 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1661530.js @@ -0,0 +1,7 @@ +Function.prototype.call = function() {}; +var sum = 0; +function foo() { sum++; } +for (var i = 0; i < 1000; i++) { + foo.call({}, 0); +} +assertEq(sum, 0); diff --git a/js/src/jit-test/tests/warp/bug1661728.js b/js/src/jit-test/tests/warp/bug1661728.js new file mode 100644 index 0000000000..ac4ad86552 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1661728.js @@ -0,0 +1,43 @@ +with ({}) {} // Don't inline anything into the top-level script. + +function foo() {} + +function inline_foo_into_bar() { + with ({}) {} // Don't inline anything into this function. + for (var i = 0; i < 10; i++) { + bar(2); + } + +} + +function bar(x) { + switch (x) { + case 1: + inline_foo_into_bar(); + + // Trigger a compacting gc to discard foo's jitscript. + // Do it while bar is on the stack to keep bar's jitscript alive. + gc(foo, 'shrinking'); + break; + case 2: + foo(); + break; + case 3: + break; + } +} + +// Warm up foo and bar. +for (var i = 0; i < 10; i++) { + foo(); + bar(3); +} + +// Inline and discard foo's jitscript. +bar(1); + +// Warp-compile bar +for (var i = 0; i < 50; i++) { + foo(); // ensure that foo has a new jitscript + bar(3); +} diff --git a/js/src/jit-test/tests/warp/bug1662146.js b/js/src/jit-test/tests/warp/bug1662146.js new file mode 100644 index 0000000000..cfc62b98f2 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1662146.js @@ -0,0 +1,12 @@ +var sum = 0; +function f1(a) { + try { + not_a_function(); + } catch (e) { + sum++; + } +} +for (var i = 0; i < 50; ++i) { + f1.call(); +} +assertEq(sum, 50); diff --git a/js/src/jit-test/tests/warp/bug1663993.js b/js/src/jit-test/tests/warp/bug1663993.js new file mode 100644 index 0000000000..c7199e85cf --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1663993.js @@ -0,0 +1,9 @@ +function r(relazify) { + "foo".substr(0); + if (relazify) relazifyFunctions(); +} + +for (var i = 0; i < 10; i++) { + r(i == 9); + r(""); +} diff --git a/js/src/jit-test/tests/warp/bug1664007.js b/js/src/jit-test/tests/warp/bug1664007.js new file mode 100644 index 0000000000..de5d8d1233 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1664007.js @@ -0,0 +1,12 @@ +function f(depth) { + function Obj() { + this.prop = null; + this.prop = this; + } + var o = new Obj(); + assertEq(o.prop, o); + if (depth < 1000) { + f(depth + 1); + } +} +f(0); diff --git a/js/src/jit-test/tests/warp/bug1665303.js b/js/src/jit-test/tests/warp/bug1665303.js new file mode 100644 index 0000000000..b2c26e01cf --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1665303.js @@ -0,0 +1,20 @@ +// |jit-test| skip-if: !('oomTest' in this); --fast-warmup + +// Prevent slowness with --ion-eager. +setJitCompilerOption("ion.warmup.trigger", 100); + +function f() { return 1; } +function test() { + oomTest(function() { + function foo() { + for (var i = 0; i < 10; i++) { + f(); + trialInline(); + } + } + evaluate(foo.toString() + "foo()"); + }); +} +for (var i = 0; i < 3; i++) { + test(); +} diff --git a/js/src/jit-test/tests/warp/bug1666070.js b/js/src/jit-test/tests/warp/bug1666070.js new file mode 100644 index 0000000000..54f737689a --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1666070.js @@ -0,0 +1,8 @@ +// |jit-test| --fast-warmup +function f() {} +for (var i = 0; i < 15; i++) { + f(); + var g = newGlobal(); + g.trialInline(); +} +trialInline(); diff --git a/js/src/jit-test/tests/warp/bug1666142-1.js b/js/src/jit-test/tests/warp/bug1666142-1.js new file mode 100644 index 0000000000..b5bb0aca77 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1666142-1.js @@ -0,0 +1,19 @@ +// |jit-test| --fast-warmup + +// This test triggers a GC in CreateThisForIC, +// without using the arguments rectifier. +var records = []; +function Record() { + return Object.create(null); +} +function init() { + records.push(new Record()); +} +function f() { + for (var i = 0; i < 100; i++) { + init(); + } +} + +gczeal(14,25); +f(); diff --git a/js/src/jit-test/tests/warp/bug1666142-2.js b/js/src/jit-test/tests/warp/bug1666142-2.js new file mode 100644 index 0000000000..9fa94e8f20 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1666142-2.js @@ -0,0 +1,19 @@ +// |jit-test| --fast-warmup + +// This test triggers a GC in CreateThisForIC, +// while using the arguments rectifier. +var records = []; +function Record(val) { + return Object.create(null); +} +function init() { + records.push(new Record()); +} +function f() { + for (var i = 0; i < 100; i++) { + init(); + } +} + +gczeal(14,25); +f(); diff --git a/js/src/jit-test/tests/warp/bug1667680.js b/js/src/jit-test/tests/warp/bug1667680.js new file mode 100644 index 0000000000..8e1b8c0097 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1667680.js @@ -0,0 +1,8 @@ +// |jit-test| --ion-limit-script-size=off +function f() { + var s = "for (var i = 0; i < 100; i++) {}; return 2;"; + s += "var x = [" + "9,".repeat(100_000) + "];"; + var g = Function(s); + assertEq(g(), 2); +} +f(); diff --git a/js/src/jit-test/tests/warp/bug1667685.js b/js/src/jit-test/tests/warp/bug1667685.js new file mode 100644 index 0000000000..2b9e392d24 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1667685.js @@ -0,0 +1,27 @@ +// |jit-test| skip-if: !('oomTest' in this); --fast-warmup + +// Prevent slowness with --ion-eager. +setJitCompilerOption("ion.warmup.trigger", 100); + +function h() { + return 1; +} +function g() { + for (var j = 0; j < 10; j++) { + h(); + } + trialInline(); +} +function f() { + for (var i = 0; i < 2; i++) { + var fun = Function(g.toString() + "g()"); + try { + fun(); + } catch {} + try { + fun(); + } catch {} + } + +} +oomTest(f); diff --git a/js/src/jit-test/tests/warp/bug1667699.js b/js/src/jit-test/tests/warp/bug1667699.js new file mode 100644 index 0000000000..a88115c7c5 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1667699.js @@ -0,0 +1,15 @@ +// |jit-test| --fast-warmup +function f(s) { + // Trial-inline self-hosted |replace| and relazify. + for (var i = 0; i < 50; i++) { + s = s.replace("a", "b"); + } + trialInline(); + relazifyFunctions(); + + // Warp-compile. + for (var j = 0; j < 50; j++) {} + + return s; +} +assertEq(f("a"), "b"); diff --git a/js/src/jit-test/tests/warp/bug1668197.js b/js/src/jit-test/tests/warp/bug1668197.js new file mode 100644 index 0000000000..2dcd6cb376 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1668197.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) +function f(x, y) { + return ~Math.hypot(x >>> 0, 2 - x >>> 0); +} +f(2, Math); +oomTest(f); diff --git a/js/src/jit-test/tests/warp/bug1669415.js b/js/src/jit-test/tests/warp/bug1669415.js new file mode 100644 index 0000000000..e22497f86d --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1669415.js @@ -0,0 +1,11 @@ +function f(x, y) { + return +(-y ? -x : (y ? x : NaN)); +} +let arr = [false, {}, {}]; +for (let i = 0; i < 9; ++i) { + f(1.1, 2); +} +for (let i = 0; i < arr.length; i++) { + output = f(true, arr[i]); +} +assertEq(output, 1); diff --git a/js/src/jit-test/tests/warp/bug1669597.js b/js/src/jit-test/tests/warp/bug1669597.js new file mode 100644 index 0000000000..c4110c581f --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1669597.js @@ -0,0 +1,14 @@ +// |jit-test| --fast-warmup +var str = ''; +function g(x) { + with(this) {} // Don't inline. + return x; +} +function f() { + var x = 0; + for (var i = 0; i < 100; i++) { + x += +g(+str); + } + return x; +} +assertEq(f(), 0); diff --git a/js/src/jit-test/tests/warp/bug1671812.js b/js/src/jit-test/tests/warp/bug1671812.js new file mode 100644 index 0000000000..560a01a871 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1671812.js @@ -0,0 +1,11 @@ +// |jit-test| --fast-warmup; --baseline-eager +function f() { + let val1 = Math.sqrt(9007199254740992); + let val2 = 0; + let arr = new Float32Array(100); + for (let i = 0; i < 100; i++) { + val2 = arr[i]; + } + return val1 + val2; +} +assertEq(f(), Math.sqrt(9007199254740992)); diff --git a/js/src/jit-test/tests/warp/bug1676631.js b/js/src/jit-test/tests/warp/bug1676631.js new file mode 100644 index 0000000000..d9f7947396 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1676631.js @@ -0,0 +1,7 @@ +function f() { + var a = arguments; + for (var i = 0; i < 10; i++) { + a[""] + } +} +f(); diff --git a/js/src/jit-test/tests/warp/bug1676639.js b/js/src/jit-test/tests/warp/bug1676639.js new file mode 100644 index 0000000000..f813c53a9a --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1676639.js @@ -0,0 +1,7 @@ +function foo() { + return Math.atanh(true === Math.fround(0) | 0) != true; +} +var results = []; +for (var j = 0; j < 50; j++) { + results.push(foo(0,0)); +} diff --git a/js/src/jit-test/tests/warp/bug1681056.js b/js/src/jit-test/tests/warp/bug1681056.js new file mode 100644 index 0000000000..6a3d094854 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1681056.js @@ -0,0 +1,9 @@ +gczeal(14,10); +let y = []; +try { + evaluate(`(function() { + for (let x10 = 0; + new class Object extends Object { v = function () {} }; + arguments << this) {} + })()`); +} catch(exc) {} diff --git a/js/src/jit-test/tests/warp/bug1681597.js b/js/src/jit-test/tests/warp/bug1681597.js new file mode 100644 index 0000000000..cc0d83f4b9 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1681597.js @@ -0,0 +1,19 @@ +// |jit-test| --fast-warmup; --no-threads + +function f(x) { + (function () { + (1 == (x & 0) * 1.1) + x; + })(); +} +let y = [,,,2147483648,0,0]; +for (let i = 0; i < 6; i++) { + f(y[i]); + f(y[i]); + f(y[i]); + f(y[i]); + f(y[i]); + f(y[i]); + f(y[i]); + f(y[i]); + f(y[i]); +} diff --git a/js/src/jit-test/tests/warp/bug1681677.js b/js/src/jit-test/tests/warp/bug1681677.js new file mode 100644 index 0000000000..157a28740b --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1681677.js @@ -0,0 +1,7 @@ +var a = [1]; +var p = {__proto__: Array.prototype}; +Object.setPrototypeOf(a, p); +for (var i = 0; i < 100; ++i) { + var x = a.slice(0); + assertEq(x.__proto__, Array.prototype); +} diff --git a/js/src/jit-test/tests/warp/bug1681806.js b/js/src/jit-test/tests/warp/bug1681806.js new file mode 100644 index 0000000000..8dfdfd1b4c --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1681806.js @@ -0,0 +1,92 @@ +// |jit-test| skip-if: !getJitCompilerOptions()['ion.enable'] + +with ({}) {} + +let foo, bar, active; + +function test(depth) { + print(depth); + + // Define two mutually recursive functions with as many locals as possible + // to maximize the size of the rematerialized frame when we bail out (~4K). + foo = new Function('n', ` + var a0,b0,c0,d0,e0,f0,g0,h0,i0,j0,k0,l0,m0,n0,o0,p0,q0,r0,s0,t0,u0,v0,w0,x0,y0,z0; + var a1,b1,c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,n1,o1,p1,q1,r1,s1,t1,u1,v1,w1,x1,y1,z1; + var a2,b2,c2,d2,e2,f2,g2,h2,i2,j2,k2,l2,m2,n2,o2,p2,q2,r2,s2,t2,u2,v2,w2,x2,y2,z2; + var a3,b3,c3,d3,e3,f3,g3,h3,i3,j3,k3,l3,m3,n3,o3,p3,q3,r3,s3,t3,u3,v3,w3,x3,y3,z3; + var a4,b4,c4,d4,e4,f4,g4,h4,i4,j4,k4,l4,m4,n4,o4,p4,q4,r4,s4,t4,u4,v4,w4,x4,y4,z4; + var a5,b5,c5,d5,e5,f5,g5,h5,i5,j5,k5,l5,m5,n5,o5,p5,q5,r5,s5,t5,u5,v5,w5,x5,y5,z5; + var a6,b6,c6,d6,e6,f6,g6,h6,i6,j6,k6,l6,m6,n6,o6,p6,q6,r6,s6,t6,u6,v6,w6,x6,y6,z6; + var a7,b7,c7,d7,e7,f7,g7,h7,i7,j7,k7,l7,m7,n7,o7,p7,q7,r7,s7,t7,u7,v7,w7,x7,y7,z7; + var a8,b8,c8,d8,e8,f8,g8,h8,i8,j8,k8,l8,m8,n8,o8,p8,q8,r8,s8,t8,u8,v8,w8,x8,y8,z8; + var a9,b9,c9,d9,e9,f9,g9,h9,i9,j9,k9,l9,m9,n9,o9,p9,q9,r9,s9,t9; + if (n == 0) { + if (active) invalidate(); + } else { + bar(n); + }`); + bar = new Function('n', ` + var a0,b0,c0,d0,e0,f0,g0,h0,i0,j0,k0,l0,m0,n0,o0,p0,q0,r0,s0,t0,u0,v0,w0,x0,y0,z0; + var a1,b1,c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,n1,o1,p1,q1,r1,s1,t1,u1,v1,w1,x1,y1,z1; + var a2,b2,c2,d2,e2,f2,g2,h2,i2,j2,k2,l2,m2,n2,o2,p2,q2,r2,s2,t2,u2,v2,w2,x2,y2,z2; + var a3,b3,c3,d3,e3,f3,g3,h3,i3,j3,k3,l3,m3,n3,o3,p3,q3,r3,s3,t3,u3,v3,w3,x3,y3,z3; + var a4,b4,c4,d4,e4,f4,g4,h4,i4,j4,k4,l4,m4,n4,o4,p4,q4,r4,s4,t4,u4,v4,w4,x4,y4,z4; + var a5,b5,c5,d5,e5,f5,g5,h5,i5,j5,k5,l5,m5,n5,o5,p5,q5,r5,s5,t5,u5,v5,w5,x5,y5,z5; + var a6,b6,c6,d6,e6,f6,g6,h6,i6,j6,k6,l6,m6,n6,o6,p6,q6,r6,s6,t6,u6,v6,w6,x6,y6,z6; + var a7,b7,c7,d7,e7,f7,g7,h7,i7,j7,k7,l7,m7,n7,o7,p7,q7,r7,s7,t7,u7,v7,w7,x7,y7,z7; + var a8,b8,c8,d8,e8,f8,g8,h8,i8,j8,k8,l8,m8,n8,o8,p8,q8,r8,s8,t8,u8,v8,w8,x8,y8,z8; + var a9,b9,c9,d9,e9,f9,g9,h9,i9,j9,k9,l9,m9,n9,o9,p9,q9,r9,s9,t9; + foo(n-1);`); + + with ({}) {} + + // Warm up the invalidate() branch of foo to avoid FirstExecution bailouts. + active = true; + for (var i = 0; i < 10; i++) { + foo(2); + } + + // Warp-compile foo, inlining bar. + active = false; + for (var i = 0; i < 30; i++) { + foo(2); + } + + // Consume stack with frames that don't have to be invalidated. + function recurse(n) { + with ({}) {} + if (n == 0) { + foo(2); + } else { + recurse(n-1); + } + } + + // Trigger an invalidation. + active = true; + recurse(depth); +} + +// Binary search to find the right recursion depth such that +// the invalidation bailout will cause stack overflow. +let depth = 0; +function probeStackLimit(increment) { + try { + while (true) { + test(depth + increment); + depth += increment; + } + } catch {} +} + +probeStackLimit(8192); +probeStackLimit(4096); +probeStackLimit(2048); +probeStackLimit(1024); +probeStackLimit(512); +probeStackLimit(256); +probeStackLimit(128); +probeStackLimit(64); +probeStackLimit(32); +probeStackLimit(16); +probeStackLimit(8); diff --git a/js/src/jit-test/tests/warp/bug1683306.js b/js/src/jit-test/tests/warp/bug1683306.js new file mode 100644 index 0000000000..3c74c3f612 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1683306.js @@ -0,0 +1,19 @@ +// |jit-test| --ion-offthread-compile=off; --ion-full-warmup-threshold=0; --ion-gvn=off; --baseline-eager +// +// Bug 1683306 - Assertion failure: !genObj->hasStackStorage() || genObj->isStackStorageEmpty(), at vm/GeneratorObject.cpp:144 + +function assert(mustBeTrue, message) { } +assert.sameValue = function (expected) { + assert._toString(expected) +}; +assert._toString = function (value) { + return String(value); +} +async function fn() { + for await ([] of []) { } +} + +fn(); +bailAfter(10); +assert.sameValue(); +evaluate("fn();"); diff --git a/js/src/jit-test/tests/warp/bug1683309.js b/js/src/jit-test/tests/warp/bug1683309.js new file mode 100644 index 0000000000..63a0defe4e --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1683309.js @@ -0,0 +1,19 @@ +// |jit-test| slow; --ion-offthread-compile=off; +// +// Bug 1683309: Assertion failure: [barrier verifier] Unmarked edge: JS Object 0xebbb6d1dee0 'object slot' edge to JS Object 0xebbb6d29f60, at gc/Verifier.cpp:392 + + +if (helperThreadCount() > 0) { + evalInWorker(` + try{ + gczeal(4); + function f86(depth) { + var x = async target => ([]); + o62 = unescape; + x(o62.prop, o62); + f86(true + 1); + } + f86(0); + } catch (e) {} + `); +} diff --git a/js/src/jit-test/tests/warp/bug1683535-1.js b/js/src/jit-test/tests/warp/bug1683535-1.js new file mode 100644 index 0000000000..c85d301c3a --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1683535-1.js @@ -0,0 +1,6 @@ +function f(x, y) { + (Math.log() ? 0 : Math.abs(~y)) ^ x ? x : x; +} +for (let i = 0; i < 52; i++) { + f(0, -2147483649); +} diff --git a/js/src/jit-test/tests/warp/bug1683535-2.js b/js/src/jit-test/tests/warp/bug1683535-2.js new file mode 100644 index 0000000000..25317b1d8d --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1683535-2.js @@ -0,0 +1,12 @@ +function foo(y) { + return (1 >>> y >> 12) % 1.5 >>> 0 +} +function bar(y) { + return (1 >>> y >> 12) / 1.5 >>> 0 +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + foo(1); + bar(1); +} diff --git a/js/src/jit-test/tests/warp/bug1683614.js b/js/src/jit-test/tests/warp/bug1683614.js new file mode 100644 index 0000000000..1d0a4724ff --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1683614.js @@ -0,0 +1,13 @@ +// |jit-test| --ion-offthread-compile=off; --ion-full-warmup-threshold=0; --baseline-eager; skip-if: !this.hasOwnProperty("ReadableStream") + +gczeal(9, 8); +function s() { } +new ReadableStream({ + start() { + test(); + } +}); +async function test() { + for (let i17 = 1; i17 <= 30; i17++) + await s(0 + function () { return i17 }); +} \ No newline at end of file diff --git a/js/src/jit-test/tests/warp/bug1686207.js b/js/src/jit-test/tests/warp/bug1686207.js new file mode 100644 index 0000000000..4a2637408c --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1686207.js @@ -0,0 +1,11 @@ +function f(x, y) { + x >> (y >>> 0) +} + +with ({}) {} + +f(-1, -1) +f(1.5, 0) +for (var i = 0; i < 100; i++) { + f(0, 0); +} diff --git a/js/src/jit-test/tests/warp/bug1686702.js b/js/src/jit-test/tests/warp/bug1686702.js new file mode 100644 index 0000000000..b5bf4e4b54 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1686702.js @@ -0,0 +1,3 @@ +for (var j = 0; j < 100; j++) { + +(Math.fround(1) && 0); +} diff --git a/js/src/jit-test/tests/warp/bug1687661.js b/js/src/jit-test/tests/warp/bug1687661.js new file mode 100644 index 0000000000..e1b90a1879 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1687661.js @@ -0,0 +1,13 @@ +function f(x,y) { + return Math.trunc(+(y ? x : y) || ~y); +} + +with ({}) {} + +for (var i = 0; i < 10; i++) { + f(0,1); + f(NaN,1); + f(0.1,0); +} + +assertEq(f(0.1, 1), 0); diff --git a/js/src/jit-test/tests/warp/bug1687672.js b/js/src/jit-test/tests/warp/bug1687672.js new file mode 100644 index 0000000000..e5d1a746f3 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1687672.js @@ -0,0 +1,14 @@ +// |jit-test| --no-threads; --baseline-warmup-threshold=1; --ion-warmup-threshold=0 + +var input = ["", 0, "", "", "", "", "", "", "", "", "", "", "", "", {}, {}, ""]; + +for (var i = 0; i < 10; i++) { + function sum_indexing(x,i) { + if (i == x.length) { + return 0; + } else { + return x[i] + sum_indexing(x, i+1); + } + } + sum_indexing(input, 0); +} diff --git a/js/src/jit-test/tests/warp/bug1688136.js b/js/src/jit-test/tests/warp/bug1688136.js new file mode 100644 index 0000000000..a7cf52097f --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1688136.js @@ -0,0 +1,13 @@ +function f(a, c) { + if (c) { + a++; + } else { + a--; + } + return (a + a) | 0; +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + f(2147483647, i % 2); +} diff --git a/js/src/jit-test/tests/warp/bug1688346.js b/js/src/jit-test/tests/warp/bug1688346.js new file mode 100644 index 0000000000..0e3bbcdd05 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1688346.js @@ -0,0 +1,12 @@ +function f(x) { + let y = Math.trunc(x); + return y - y; +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + f(0.1); +} + +assertEq(f(NaN), NaN); diff --git a/js/src/jit-test/tests/warp/bug1692857.js b/js/src/jit-test/tests/warp/bug1692857.js new file mode 100644 index 0000000000..0da271200a --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1692857.js @@ -0,0 +1,14 @@ +var arrayView = new Float32Array(new ArrayBuffer(40)); + +function foo() { + var x = arrayView[0]; + if (!x) { + x = arrayView[NaN]; + } + return x; +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + foo(); +} diff --git a/js/src/jit-test/tests/warp/bug1693062-01.js b/js/src/jit-test/tests/warp/bug1693062-01.js new file mode 100644 index 0000000000..d670360d31 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1693062-01.js @@ -0,0 +1,14 @@ +function foo(trigger) { + var x = Math.fround(1.5); + var a = Math.sqrt(2**53); + if (trigger) { + x = a + 1; + } + return x; +} + +with ({}) {} +for (var i = 0; i < 40; i++) { + foo(false); +} +assertEq(foo(true), Math.sqrt(2**53) + 1); diff --git a/js/src/jit-test/tests/warp/bug1693062-02.js b/js/src/jit-test/tests/warp/bug1693062-02.js new file mode 100644 index 0000000000..473b68773b --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1693062-02.js @@ -0,0 +1,16 @@ +function foo(x) { + var result; + if (x) { + result = Math.fround(~x); + } else { + var temp = Math.sqrt(2**53); + for (var i = 0; i < 1000; i++) {} // Trigger OSR + result = temp + 1; + } + return result; +} + +foo(true); +for (var i = 0; i < 10; i++) { + assertEq(foo(false), Math.sqrt(2**53) + 1); +} diff --git a/js/src/jit-test/tests/warp/bug1694600.js b/js/src/jit-test/tests/warp/bug1694600.js new file mode 100644 index 0000000000..7a0ee06343 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1694600.js @@ -0,0 +1,16 @@ +function foo(fn, y) { + var dummy = y > 0 ? 1 : 2; + fn(); + return y * y; +} + +function nop() {} +function throws() { throw 1; } + +with ({}) {} +for (var i = 0; i < 100; i++) { + foo(nop, 0) + try { + foo(throws, 0x7fffffff) + } catch {} +} diff --git a/js/src/jit-test/tests/warp/bug1696897.js b/js/src/jit-test/tests/warp/bug1696897.js new file mode 100644 index 0000000000..fbdd671573 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1696897.js @@ -0,0 +1,8 @@ +function foo() { + Object.defineProperty(this, "valueOf", ({value: 0, writable: true})); + Object.freeze(this); +} + +for (var i = 0; i < 100; i++) { + foo.call(''); +} diff --git a/js/src/jit-test/tests/warp/bug1697451.js b/js/src/jit-test/tests/warp/bug1697451.js new file mode 100644 index 0000000000..9e8c166c99 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1697451.js @@ -0,0 +1,15 @@ +var dummy; +function foo(a) { + dummy = arguments.length; + return a; +} + +function bar(x) { + var arg = x ? 1 : 2; + assertEq(foo(arg), arg); +} + +with({}) {} +for (var i = 0; i < 50; i++) { + bar(i % 2 == 0); +} diff --git a/js/src/jit-test/tests/warp/bug1697483.js b/js/src/jit-test/tests/warp/bug1697483.js new file mode 100644 index 0000000000..189029ab14 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1697483.js @@ -0,0 +1,46 @@ +function baz() { with({}) {}} + +function foo(a,b,c) { + var x1 = a + b; + var y1 = b + c; + var z1 = a + c; + var x2 = a * b; + var y2 = b * c; + var z2 = a * c; + var x3 = a - b; + var y3 = b - c; + var z3 = a - c; + var x4 = b - a; + var y4 = c - b; + var z4 = c - a; + var x1b = 1 + a + b; + var y1b = 1 + b + c; + var z1b = 1 + a + c; + var x2b = 1 + a * b; + var y2b = 1 + b * c; + var z2b = 1 + a * c; + var x3b = 1 + a - b; + var y3b = 1 + b - c; + var z3b = 1 + a - c; + var x4b = 1 + b - a; + var y4b = 1 + c - b; + var z4b = 1 + c - a; + + var arg = arguments[a]; + + baz(x1, y1, z1, x1b, y1b, z1b, + x2, y2, z2, x2b, y2b, z2b, + x3, y3, z3, x3b, y3b, z3b, + x4, y4, z4, x4b, y4b, z4b); + + return arg; +} + +function bar(a,b,c) { + return foo(a+b,b+c,c+a); +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + bar(0,0,0) +} diff --git a/js/src/jit-test/tests/warp/bug1698126.js b/js/src/jit-test/tests/warp/bug1698126.js new file mode 100644 index 0000000000..d0576c2487 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1698126.js @@ -0,0 +1,11 @@ +function bar() { return arguments[0]; } + +function foo() { + var arr = new Float32Array(10); + return bar(arr[0]); +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + assertEq(foo(), 0); +} diff --git a/js/src/jit-test/tests/warp/bug1698609.js b/js/src/jit-test/tests/warp/bug1698609.js new file mode 100644 index 0000000000..d28297c7c6 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1698609.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: helperThreadCount() === 0; --code-coverage +// Note: --code-coverage is a hack here to disable lazy parsing. + +var src = "function foo(x) { return /abc/.test(x) }"; +var job = offThreadCompileToStencil(src); +var stencil = finishOffThreadStencil(job); +var re = evalStencil(stencil); + +for (var i = 0; i < 200; i++) { + foo("abc"); +} diff --git a/js/src/jit-test/tests/warp/bug1699056.js b/js/src/jit-test/tests/warp/bug1699056.js new file mode 100644 index 0000000000..cb16a5ffc2 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1699056.js @@ -0,0 +1,12 @@ +var a = ''; +var b = ''; + +function foo() { + a += 'x'; + b = b + a; +} + +with ({}) {} +for (var i = 0; i < 50000; i++) { + try { foo() } catch {} +} diff --git a/js/src/jit-test/tests/warp/bug1700579.js b/js/src/jit-test/tests/warp/bug1700579.js new file mode 100644 index 0000000000..73048c3550 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1700579.js @@ -0,0 +1,28 @@ +// |jit-test| --fast-warmup; --ion-offthread-compile=off + +function foo(y) { + var a = y - 1; + + if (y) {} + + return bar(a); +} + +with ({}) {} +var bar; +function bar1 (x,y) { + "use strict"; + return x | 0; +} + +function bar2(x) { + return x; +} + +bar = bar1; +for (var i = 0; i < 100; i++) { + foo(1); +} + +bar = bar2; +assertEq(foo(-2147483648), -2147483649); diff --git a/js/src/jit-test/tests/warp/bug1700616.js b/js/src/jit-test/tests/warp/bug1700616.js new file mode 100644 index 0000000000..9bdd83c474 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1700616.js @@ -0,0 +1,32 @@ +function dummy() { with ({}) {}} + +function foo() { + var a = 0; + var b = 1; + var c = 2; + var d = 3; + + // This call will run before we enter jitcode and won't have IC + // data, so branch pruning will remove the path from the entry + // block to the OSR preheader. + dummy(); + + // We will OSR in this loop. Because there's no path from the + // function entry to the loop, the only information we have + // about a, b, c, and d is that they come from the OSR block. + for (var i = 0; i < 1000; i++) { + + // Create a bunch of phis that only depend on OsrValues. + // These phis will be specialized to MIRType::Value. + a = i % 2 ? b : c; + b = i % 3 ? c : d; + c = i % 4 ? d : a; + d = i % 5 ? a : b; + + // This phi will be optimistically specialized to + // MIRType::String and trigger a bailout. + dummy(i % 6 ? d : ""); + } + return a; +} +foo(); diff --git a/js/src/jit-test/tests/warp/bug1701208.js b/js/src/jit-test/tests/warp/bug1701208.js new file mode 100644 index 0000000000..184c8dbf24 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1701208.js @@ -0,0 +1,18 @@ +// |jit-test| --fast-warmup; --no-threads + +function dummy() { with ({}) {} } + +function foo() { + dummy(); + var x = []; + var y = []; + for (var i = 0; i < 10; i++) { } + for (var i = 0; i < 100; i++) { + var swap = x; + x = y; + y = swap; + } + return x; +} + +foo(); diff --git a/js/src/jit-test/tests/warp/bug1702465.js b/js/src/jit-test/tests/warp/bug1702465.js new file mode 100644 index 0000000000..5143b52ab7 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1702465.js @@ -0,0 +1,14 @@ +function foo() { + if (arguments[0]) { + return arguments[1]; + } +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + foo(true, 1); +} + +for (var i = 0; i < 100; i++) { + foo(false); +} diff --git a/js/src/jit-test/tests/warp/bug1703766.js b/js/src/jit-test/tests/warp/bug1703766.js new file mode 100644 index 0000000000..7c1f420e9b --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1703766.js @@ -0,0 +1,212 @@ +function bar() { return 0;} + +function foo(x) { + switch (x) { + case 0: bar(); break; + case 1: bar(); break; + case 2: bar(); break; + case 3: bar(); break; + case 4: bar(); break; + case 5: bar(); break; + case 6: bar(); break; + case 7: bar(); break; + case 8: bar(); break; + case 9: bar(); break; + case 10: bar(); break; + case 11: bar(); break; + case 12: bar(); break; + case 13: bar(); break; + case 14: bar(); break; + case 15: bar(); break; + case 16: bar(); break; + case 17: bar(); break; + case 18: bar(); break; + case 19: bar(); break; + case 20: bar(); break; + case 21: bar(); break; + case 22: bar(); break; + case 23: bar(); break; + case 24: bar(); break; + case 25: bar(); break; + case 26: bar(); break; + case 27: bar(); break; + case 28: bar(); break; + case 29: bar(); break; + case 30: bar(); break; + case 31: bar(); break; + case 32: bar(); break; + case 33: bar(); break; + case 34: bar(); break; + case 35: bar(); break; + case 36: bar(); break; + case 37: bar(); break; + case 38: bar(); break; + case 39: bar(); break; + case 40: bar(); break; + case 41: bar(); break; + case 42: bar(); break; + case 43: bar(); break; + case 44: bar(); break; + case 45: bar(); break; + case 46: bar(); break; + case 47: bar(); break; + case 48: bar(); break; + case 49: bar(); break; + case 50: bar(); break; + case 51: bar(); break; + case 52: bar(); break; + case 53: bar(); break; + case 54: bar(); break; + case 55: bar(); break; + case 56: bar(); break; + case 57: bar(); break; + case 58: bar(); break; + case 59: bar(); break; + case 60: bar(); break; + case 61: bar(); break; + case 62: bar(); break; + case 63: bar(); break; + case 64: bar(); break; + case 65: bar(); break; + case 66: bar(); break; + case 67: bar(); break; + case 68: bar(); break; + case 69: bar(); break; + case 70: bar(); break; + case 71: bar(); break; + case 72: bar(); break; + case 73: bar(); break; + case 74: bar(); break; + case 75: bar(); break; + case 76: bar(); break; + case 77: bar(); break; + case 78: bar(); break; + case 79: bar(); break; + case 80: bar(); break; + case 81: bar(); break; + case 82: bar(); break; + case 83: bar(); break; + case 84: bar(); break; + case 85: bar(); break; + case 86: bar(); break; + case 87: bar(); break; + case 88: bar(); break; + case 89: bar(); break; + case 90: bar(); break; + case 91: bar(); break; + case 92: bar(); break; + case 93: bar(); break; + case 94: bar(); break; + case 95: bar(); break; + case 96: bar(); break; + case 97: bar(); break; + case 98: bar(); break; + case 99: bar(); break; + case 100: bar(); break; + case 101: bar(); break; + case 102: bar(); break; + case 103: bar(); break; + case 104: bar(); break; + case 105: bar(); break; + case 106: bar(); break; + case 107: bar(); break; + case 108: bar(); break; + case 109: bar(); break; + case 110: bar(); break; + case 111: bar(); break; + case 112: bar(); break; + case 113: bar(); break; + case 114: bar(); break; + case 115: bar(); break; + case 116: bar(); break; + case 117: bar(); break; + case 118: bar(); break; + case 119: bar(); break; + case 120: bar(); break; + case 121: bar(); break; + case 122: bar(); break; + case 123: bar(); break; + case 124: bar(); break; + case 125: bar(); break; + case 126: bar(); break; + case 127: bar(); break; + case 128: bar(); break; + case 129: bar(); break; + case 130: bar(); break; + case 131: bar(); break; + case 132: bar(); break; + case 133: bar(); break; + case 134: bar(); break; + case 135: bar(); break; + case 136: bar(); break; + case 137: bar(); break; + case 138: bar(); break; + case 139: bar(); break; + case 140: bar(); break; + case 141: bar(); break; + case 142: bar(); break; + case 143: bar(); break; + case 144: bar(); break; + case 145: bar(); break; + case 146: bar(); break; + case 147: bar(); break; + case 148: bar(); break; + case 149: bar(); break; + case 150: bar(); break; + case 151: bar(); break; + case 152: bar(); break; + case 153: bar(); break; + case 154: bar(); break; + case 155: bar(); break; + case 156: bar(); break; + case 157: bar(); break; + case 158: bar(); break; + case 159: bar(); break; + case 160: bar(); break; + case 161: bar(); break; + case 162: bar(); break; + case 163: bar(); break; + case 164: bar(); break; + case 165: bar(); break; + case 166: bar(); break; + case 167: bar(); break; + case 168: bar(); break; + case 169: bar(); break; + case 170: bar(); break; + case 171: bar(); break; + case 172: bar(); break; + case 173: bar(); break; + case 174: bar(); break; + case 175: bar(); break; + case 176: bar(); break; + case 177: bar(); break; + case 178: bar(); break; + case 179: bar(); break; + case 180: bar(); break; + case 181: bar(); break; + case 182: bar(); break; + case 183: bar(); break; + case 184: bar(); break; + case 185: bar(); break; + case 186: bar(); break; + case 187: bar(); break; + case 188: bar(); break; + case 189: bar(); break; + case 190: bar(); break; + case 191: bar(); break; + case 192: bar(); break; + case 193: bar(); break; + case 194: bar(); break; + case 195: bar(); break; + case 196: bar(); break; + case 197: bar(); break; + case 198: bar(); break; + case 199: bar(); break; + case 200: bar(); break; + } + return x; +} + +for (var i = 0; i < 5000; i++) { + foo(1) +} diff --git a/js/src/jit-test/tests/warp/bug1703817.js b/js/src/jit-test/tests/warp/bug1703817.js new file mode 100644 index 0000000000..d495e06e5b --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1703817.js @@ -0,0 +1,9 @@ +function foo() { + new Float64Array(0x40000001)() +} + +for (var i = 0; i < 100; i++) { + try { + foo(); + } catch {} +} diff --git a/js/src/jit-test/tests/warp/bug1704467.js b/js/src/jit-test/tests/warp/bug1704467.js new file mode 100644 index 0000000000..6d9172a2ef --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1704467.js @@ -0,0 +1,9 @@ +var always_true = true; +function f() { + var obj = {x: 1}; + for (var i = 0; i < 100; i++) { + var res = always_true ? obj : null; + assertEq(res, obj); + } +} +f(); diff --git a/js/src/jit-test/tests/warp/bug1706314.js b/js/src/jit-test/tests/warp/bug1706314.js new file mode 100644 index 0000000000..210f827a2a --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1706314.js @@ -0,0 +1,9 @@ +function f(a,b) { + var o1 = {x: 1}; + var o2 = {x: 1}; + for (var i = 0; i < 100; i++) { + var res = a ? (b ? o1 : o2) : null; + assertEq(res, o1); + } +} +f(true, true); diff --git a/js/src/jit-test/tests/warp/bug1708839.js b/js/src/jit-test/tests/warp/bug1708839.js new file mode 100644 index 0000000000..93d5c5622e --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1708839.js @@ -0,0 +1,16 @@ +function f(a) { + let m = new Uint32Array([-1]); + let h = m[0]; + let r = m[0]; + if (a) { + h = undefined; + r = 0xff; + } + return h > r; +}; + +assertEq(f(false), false); +for (let i = 0; i < 100; ++i) { + f(true); +} +assertEq(f(false), false); diff --git a/js/src/jit-test/tests/warp/bug1713579.js b/js/src/jit-test/tests/warp/bug1713579.js new file mode 100644 index 0000000000..d6bb30573c --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1713579.js @@ -0,0 +1,8 @@ +function f() { + var i = 0; + while (i < (this.foo = this.foo ^ 123)) { + this.prop = 1; + } +} +new f(); +f(); diff --git a/js/src/jit-test/tests/warp/bug1716231.js b/js/src/jit-test/tests/warp/bug1716231.js new file mode 100644 index 0000000000..df51c0b08f --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1716231.js @@ -0,0 +1,25 @@ +// |jit-test| --fast-warmup; --ion-offthread-compile=off + +const too_big_for_float32 = 67109020; + +function call_with_no_ic_data() {} + +function foo() { + call_with_no_ic_data(); + + let x = too_big_for_float32; + let result; + + // We OSR in this loop. + for (let i = 0; i < 100; i++) { + const float32 = Math.fround(0); + + // Create a phi with one float32-typed input + // and one OSRValue input. + result = float32 || x; + } + + return result; +} + +assertEq(foo(), too_big_for_float32); diff --git a/js/src/jit-test/tests/warp/bug1716931.js b/js/src/jit-test/tests/warp/bug1716931.js new file mode 100644 index 0000000000..ae430f53ff --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1716931.js @@ -0,0 +1,13 @@ +// |jit-test| --fast-warmup; --no-threads + +function* foo(x) { + yield* x; + assertEq(true, false); // Unreachable +} + +for (var i = 0; i < 10; i++) { + var count = 0; + for (var o of foo(Array(50))) { + if (count++ > 40) break; + } +} \ No newline at end of file diff --git a/js/src/jit-test/tests/warp/bug1719884.js b/js/src/jit-test/tests/warp/bug1719884.js new file mode 100644 index 0000000000..cfcdbd8a2e --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1719884.js @@ -0,0 +1,19 @@ +// |jit-test| --fast-warmup; --no-threads + +var always_true = true; +var unused = 3; + +function foo(input, trigger) { + if (trigger) { + return Math.atan2(always_true ? Math.trunc(input ** -0x80000001) + : unused, + +input); + } +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + foo(1, i == 15); +} + +assertEq(foo(-Infinity, true), -Math.PI); diff --git a/js/src/jit-test/tests/warp/bug1720093-1.js b/js/src/jit-test/tests/warp/bug1720093-1.js new file mode 100644 index 0000000000..8f2286c117 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1720093-1.js @@ -0,0 +1,17 @@ +function main() { + let obj = {2294967295: 0, 2294967296: 1}; + let x; + + for (let i = 0; i < 110; i++) { + let c = 2294967296; + x = --c; + Math.fround(0); + } + + try { + throw 1; + } catch { + assertEq(obj[x], 0); + } +} +main(); diff --git a/js/src/jit-test/tests/warp/bug1720093-2.js b/js/src/jit-test/tests/warp/bug1720093-2.js new file mode 100644 index 0000000000..af66f6477c --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1720093-2.js @@ -0,0 +1,19 @@ +function throws() { with ({}) {} throw 1; } + +function main() { + let obj = {2294967295: 0, 2294967296: 1}; + let x; + + for (let i = 0; i < 110; i++) { + let c = 2294967296; + x = --c; + Math.fround(0); + } + + try { + return throws() + } catch { + assertEq(obj[x], 0); + } +} +main(); diff --git a/js/src/jit-test/tests/warp/bug1732601.js b/js/src/jit-test/tests/warp/bug1732601.js new file mode 100644 index 0000000000..af4d995cb2 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1732601.js @@ -0,0 +1,27 @@ +// |jit-test| --fast-warmup + +function Mixin(Target) { + var c = class extends Target {}; + Target.prototype.x = 1; // Add shadowing property to disable teleporting. + return c; +} +function MixinFoo(Target) { + var c = class extends Target { + get foo() { return 2; } + set foo(value) {} + }; + Target.prototype.x = 1; // Add shadowing property to disable teleporting. + return c; +} + +class Base {} +class MyClass extends Mixin(Mixin(Mixin(Mixin(Mixin(Mixin(Mixin(Mixin(Mixin(Mixin(Mixin(MixinFoo(Base)))))))))))) {} + +function test() { + var instance = new MyClass(); + assertEq(instance.x, 1); + for (var i = 0; i < 500; i++) { + assertEq(instance.foo, 2); + } +} +test(); diff --git a/js/src/jit-test/tests/warp/bug1735157.js b/js/src/jit-test/tests/warp/bug1735157.js new file mode 100644 index 0000000000..aedbe03f98 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1735157.js @@ -0,0 +1,5 @@ +const options = ["", {}]; +let value = ""; +for (let i = 0; i < 10000; i++) { + value += options[(Math.random() < 0.01) | 0]; +} diff --git a/js/src/jit-test/tests/warp/bug1738676.js b/js/src/jit-test/tests/warp/bug1738676.js new file mode 100644 index 0000000000..0d9e8fa568 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1738676.js @@ -0,0 +1,19 @@ +function verify(n) { + with ({}) {} + assertEq(n, -0); +} + +function main() { + let x; + let arr = []; + + let i = 0; + do { + x = (256 - i) * 0; + arr[x] = 0; + i++ + } while (i < 512); + verify(x); +} + +main(); diff --git a/js/src/jit-test/tests/warp/bug1741635-1.js b/js/src/jit-test/tests/warp/bug1741635-1.js new file mode 100644 index 0000000000..bf966da433 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1741635-1.js @@ -0,0 +1,11 @@ +function foo() {} + +var i; +function c(x, ...rest) { + for (i = 0; i < rest.length; i++) + foo(rest[i]) +} + +for (var j = 0; j < 100; j++) { + c(0, 0); +} diff --git a/js/src/jit-test/tests/warp/bug1741635-2.js b/js/src/jit-test/tests/warp/bug1741635-2.js new file mode 100644 index 0000000000..e16d77a139 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1741635-2.js @@ -0,0 +1,11 @@ +// |jit-test| --ion-range-analysis=off + +function f(a, ...rest) { + return rest.length; +} + +with ({}); + +for (let i = 0; i < 1000; ++i) { + assertEq(f(), 0); +} diff --git a/js/src/jit-test/tests/warp/bug1745949.js b/js/src/jit-test/tests/warp/bug1745949.js new file mode 100644 index 0000000000..0047afe7c5 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1745949.js @@ -0,0 +1,11 @@ +function foo() { + let v; + let i = -2000; + do { + v = i * -1; + v += v; + i++; + } while (i < 1); + return Object.is(v, -0); +} +assertEq(foo(), true); diff --git a/js/src/jit-test/tests/warp/bug1761947.js b/js/src/jit-test/tests/warp/bug1761947.js new file mode 100644 index 0000000000..64d6406172 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1761947.js @@ -0,0 +1,28 @@ +let trigger = false; + +function bar(x) { + with ({}) {} + if (trigger) { + gc(foo, "shrinking"); + trigger = false; + } + return Object(x); +} + +function foo() { + let result = undefined; + const arr = [8]; + for (var i = 0; i < 10; i++) { + result = bar(...arr); + assertEq(Number(result), 8); + } + return result; +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + foo(); +} + +trigger = true; +foo(); diff --git a/js/src/jit-test/tests/warp/bug1762769.js b/js/src/jit-test/tests/warp/bug1762769.js new file mode 100644 index 0000000000..2fad563b08 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1762769.js @@ -0,0 +1,8 @@ +try { + try {} + finally { + throw 1; + } +} catch {} + +for (var i = 0; i < 1000; i++) {} diff --git a/js/src/jit-test/tests/warp/bug1762770.js b/js/src/jit-test/tests/warp/bug1762770.js new file mode 100644 index 0000000000..8f693b77e6 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1762770.js @@ -0,0 +1,13 @@ +function* a() { + try { + yield 1; + } finally { + for (c = 0; c < 100; c++); + } +} + +var b = a(); +b.next(); +let result = b.return(42); +assertEq(result.value, 42); +assertEq(result.done, true); diff --git a/js/src/jit-test/tests/warp/bug1763012-1.js b/js/src/jit-test/tests/warp/bug1763012-1.js new file mode 100644 index 0000000000..fc1ce2b5d6 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1763012-1.js @@ -0,0 +1,19 @@ +// |jit-test| --fast-warmup; --no-threads + +function f() { + let counter = 0; + for (var i = 0; i < 8; i++) { + let x = i / i; + for (var j = 0; j < 6; j++) { + if (x === x) { + if (j > 6) {} else {} + } else { + counter += 1; + } + } + } + return counter; +} + +f(); +assertEq(f(), 6); diff --git a/js/src/jit-test/tests/warp/bug1763012-2.js b/js/src/jit-test/tests/warp/bug1763012-2.js new file mode 100644 index 0000000000..4802e2eef2 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1763012-2.js @@ -0,0 +1,19 @@ +// |jit-test| --fast-warmup; --no-threads + +function f() { + let counter = 0; + for (var i = 0; i < 8; i++) { + let x = 0 % i; + for (var j = 0; j < 6; j++) { + if (x === x) { + if (j > 6) {} else {} + } else { + counter += 1; + } + } + } + return counter; +} + +f(); +assertEq(f(), 6); diff --git a/js/src/jit-test/tests/warp/bug1767196.js b/js/src/jit-test/tests/warp/bug1767196.js new file mode 100644 index 0000000000..03b530518e --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1767196.js @@ -0,0 +1,15 @@ +// |jit-test| --fast-warmup; --no-threads +function foo() {} +function main() { + let value = 0.1; + let result; + foo(); + + const neverTrue = false; + for (let i = 0; i < 100; i++) { + let f32 = Math.fround(i) && 0; + result = neverTrue ? f32 : value; + } + return result; +} +assertEq(main(), 0.1); diff --git a/js/src/jit-test/tests/warp/bug1769410.js b/js/src/jit-test/tests/warp/bug1769410.js new file mode 100644 index 0000000000..9d66d96e39 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1769410.js @@ -0,0 +1,14 @@ +// |jit-test| --fast-warmup +function f(x) { + var a = Math.fround(Math.fround(false)); + var b = Math.min(a, x ? Math.fround(x) : Math.fround(x)); + return b >>> 0; +} +function test() { + with (this) {} // Don't inline. + for (var i = 0; i < 100; i++) { + assertEq(f(Infinity), 0); + } + assertEq(f(-1), 4294967295); +} +test(); diff --git a/js/src/jit-test/tests/warp/bug1770904.js b/js/src/jit-test/tests/warp/bug1770904.js new file mode 100644 index 0000000000..c664edfaa4 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1770904.js @@ -0,0 +1,7 @@ +var N = 100; +var f = Function("return 0" + "+arguments[0]".repeat(N)); + +for (let i = 0; i < 10000; ++i) { + assertEq(f(1), N); +} + diff --git a/js/src/jit-test/tests/warp/bug1789821.js b/js/src/jit-test/tests/warp/bug1789821.js new file mode 100644 index 0000000000..b1d3ee9a54 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1789821.js @@ -0,0 +1,14 @@ +function foo(x) { + Math.max(...[x]); +} + +with ({}) {} +for (let i = 0; i < 100; i++) { + foo(0); +} + +let called = false; +const evil = { valueOf: () => { called = true; } }; +foo(evil); + +assertEq(called, true); diff --git a/js/src/jit-test/tests/warp/bug1825220.js b/js/src/jit-test/tests/warp/bug1825220.js new file mode 100644 index 0000000000..11da1ef449 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1825220.js @@ -0,0 +1,11 @@ +// |jit-test| --ion-pruning=off; --fast-warmup + +function foo() { + Date.prototype.toLocaleString() +} + +for (var i = 0; i < 100; i++) { + try { + foo(); + } catch {} +} diff --git a/js/src/jit-test/tests/warp/bug1825408.js b/js/src/jit-test/tests/warp/bug1825408.js new file mode 100644 index 0000000000..1f25817c29 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1825408.js @@ -0,0 +1,20 @@ +// |jit-test| --no-threads; --fast-warmup; --ion-warmup-threshold=0 + +function a(b = (b, !b)) { + () => b +} +for (var i = 0; i < 20; i++) { + a(""); +} + +try { + a(); +} catch {} + +function f(arr) { + for (var i = 0; i < 10; i++) { + a(arr.x); + } +} +f({y: 1, x:1}); +f({x:2}); diff --git a/js/src/jit-test/tests/warp/bug1852238.js b/js/src/jit-test/tests/warp/bug1852238.js new file mode 100644 index 0000000000..eaf8eb8a95 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1852238.js @@ -0,0 +1,14 @@ +// |jit-test| --fast-warmup +(function() { + eval(""); + (function() { + var arr = []; + var res = 0; + for (var i = 2; i < 50; i++) { + for (var j = 1; j < 10; j++) { + res = JSON; + } + } + return res; + })(); +})(); diff --git a/js/src/jit-test/tests/warp/bug1852398.js b/js/src/jit-test/tests/warp/bug1852398.js new file mode 100644 index 0000000000..6e12d2a31d --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1852398.js @@ -0,0 +1,27 @@ +// |jit-test| --no-threads + +function inner(obj, f) { + return obj.x + f(); +} + +function middle(obj, f) { + return inner(obj, f); +} + +function outer(obj, f) { + return middle(obj, f); +} + +var fs = [() => 1, () => 2]; + +with ({}) {} +for (var i = 0; i < 1500; i++) { + var obj = {x: 1}; + obj["y" + i % 2] = 2; + outer(obj, fs[i % 2]); +} +for (var i = 0; i < 1500; i++) { + var obj = {x: 1}; + obj["y" + (3 + (i % 10))] = 2; + outer(obj, fs[i % 2]); +} diff --git a/js/src/jit-test/tests/warp/bug1852702.js b/js/src/jit-test/tests/warp/bug1852702.js new file mode 100644 index 0000000000..c0a5c7f3ca --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1852702.js @@ -0,0 +1,17 @@ +// |jit-test| --fast-warmup +function main() { + var f = function(x) { + x.f = f; + var f2 = x.f; + f2[Symbol.toPrimitive] = null; + try { + new f2(0); + } catch (e) {} + for (var i = 0; i < 100; i++) { } + }; + new f(f); +} +gczeal(2); +for (var i = 0; i < 100; i++) { + main(); +} diff --git a/js/src/jit-test/tests/warp/cancel-offthread-compile.js b/js/src/jit-test/tests/warp/cancel-offthread-compile.js new file mode 100644 index 0000000000..939d128ae1 --- /dev/null +++ b/js/src/jit-test/tests/warp/cancel-offthread-compile.js @@ -0,0 +1,21 @@ +// |jit-test| --fast-warmup; skip-if: helperThreadCount() === 0 + +function foo(o) { + return o.y; +} + +with ({}) {} + +var sum = 0; + +// Trigger an off-thread Warp compile. +for (var i = 0; i < 30; i++) { + sum += foo({y: 1}); +} + +// Attach a new stub and cancel that compile. +for (var i = 0; i < 30; i++) { + sum += foo({x: 1, y: 1}); +} + +assertEq(sum, 60); diff --git a/js/src/jit-test/tests/warp/catch-overflow-regexp.js b/js/src/jit-test/tests/warp/catch-overflow-regexp.js new file mode 100644 index 0000000000..a316e5636b --- /dev/null +++ b/js/src/jit-test/tests/warp/catch-overflow-regexp.js @@ -0,0 +1,8 @@ +function test() { + try { + test(); + } catch { + /a/.test("a"); + } +} +test(); diff --git a/js/src/jit-test/tests/warp/compare-constant-string.js b/js/src/jit-test/tests/warp/compare-constant-string.js new file mode 100644 index 0000000000..d7512c3171 --- /dev/null +++ b/js/src/jit-test/tests/warp/compare-constant-string.js @@ -0,0 +1,90 @@ +// Test case to cover constant string comparison. +// +// Equality comparison for short (≤32 characters), Latin-1 constant strings is +// optimised during lowering. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const ascii = [...characters( + [0x41, 0x5A], // A..Z + [0x61, 0x7A], // a..z + [0x30, 0x39], // 0..9 +)]; + +const latin1 = [...characters( + [0xC0, 0xFF], // À..ÿ +)]; + +const twoByte = [...characters( + [0x100, 0x17E], // Ā..ž +)]; + +function toRope(s) { + try { + return newRope(s[0], s.substring(1)); + } catch {} + // newRope can fail when |s| fits into an inline string. In that case simply + // return the input. + return s; +} + +function atomize(s) { + return Object.keys({[s]: 0})[0]; +} + +const operators = [ + "==", "===", "!=", "!==", +]; + +for (let i = 1; i <= 32; ++i) { + let strings = [ascii, latin1, twoByte].flatMap(codePoints => [ + // Same string as the input. + String.fromCodePoint(...codePoints.slice(0, i)), + + // Same length as the input, but a different string. + String.fromCodePoint(...codePoints.slice(1, i + 1)), + + // Shorter string than the input. + String.fromCodePoint(...codePoints.slice(0, i - 1)), + + // Longer string than the input. + String.fromCodePoint(...codePoints.slice(0, i + 1)), + ]).flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + atomize(x), + ]); + + for (let codePoints of [ascii, latin1, twoByte]) { + let str = String.fromCodePoint(...codePoints.slice(0, i)); + + for (let op of operators) { + let fn = Function("strings", ` + const expected = strings.map(x => { + // Prevent Warp compilation when computing the expected results. + with ({}) ; + return x ${op} "${str}"; + }); + + for (let i = 0; i < 250; ++i) { + let idx = i % strings.length; + let str = strings[idx]; + + let lhs = str ${op} "${str}"; + if (lhs !== expected[idx]) throw new Error(); + + let rhs = "${str}" ${op} str; + if (rhs !== expected[idx]) throw new Error(); + } + `); + fn(strings); + } + } +} diff --git a/js/src/jit-test/tests/warp/compare-empty-string.js b/js/src/jit-test/tests/warp/compare-empty-string.js new file mode 100644 index 0000000000..30cf03f874 --- /dev/null +++ b/js/src/jit-test/tests/warp/compare-empty-string.js @@ -0,0 +1,50 @@ +// Test case to cover empty string comparison folding. +// +// MCompare can fold comparison with an empty string constant and replace it +// with |string.length 0|. + +const strings = [ + // Zero length string. + "", + + // Uncommon zero length strings. + newString("", {external: true}), + + // Latin-1 strings. + "a", + "ä", + "monkey", + + // Two-byte strings. + "猿", + "🐒", + newString("monkey", {twoByte: true}), +]; + +const operators = [ + "==", "===", "!=", "!==", + "<", "<=", ">=", ">", +]; + +for (let op of operators) { + let lhs = x => `${x} ${op} ""`; + let rhs = x => `"" ${op} ${x}`; + + for (let input of [lhs, rhs]) { + let fn = Function("strings", ` + const expected = strings.map(x => { + // Prevent Warp compilation when computing the expected results. + with ({}) ; + return ${input("x")}; + }); + + for (let i = 0; i < 200; ++i) { + let idx = i % strings.length; + let str = strings[idx]; + let res = ${input("str")}; + assertEq(res, expected[idx]); + } + `); + fn(strings); + } +} diff --git a/js/src/jit-test/tests/warp/conditional-test-guard.js b/js/src/jit-test/tests/warp/conditional-test-guard.js new file mode 100644 index 0000000000..cc2cca8660 --- /dev/null +++ b/js/src/jit-test/tests/warp/conditional-test-guard.js @@ -0,0 +1,12 @@ +function f(x) { + return (+(x || 1) ? 0 : x); +} + +// Prevent top-level Ion-compilation, so we don't inline |f|. +with ({}); + +for (let i = 0; i < 100; ++i) { + assertEq(f(), 0); +} + +assertEq(f("not-a-number"), "not-a-number"); diff --git a/js/src/jit-test/tests/warp/conditional-test-undefined-1.js b/js/src/jit-test/tests/warp/conditional-test-undefined-1.js new file mode 100644 index 0000000000..382f3ca966 --- /dev/null +++ b/js/src/jit-test/tests/warp/conditional-test-undefined-1.js @@ -0,0 +1,22 @@ +function g(array) { + // 1. Absent properties return |undefined| from CacheIR. + // 2. Tests on |undefined| are changed to |false| in CacheIR. + // + // When Warp compiling the CacheIR ops, the first test will then happen on + // a boolean, whereas the phi still sees the original undefined value. + if (array.does_not_exist || array.slice) { + return 1; + } + return 0; +} + +function f() { + var array = []; + var r = 0; + for (let i = 0; i < 100; ++i) { + r += g(array); + } + assertEq(r, 100); +} + +for (let i = 0; i < 2; ++i) f(); \ No newline at end of file diff --git a/js/src/jit-test/tests/warp/conditional-test-undefined-2.js b/js/src/jit-test/tests/warp/conditional-test-undefined-2.js new file mode 100644 index 0000000000..b0dada6684 --- /dev/null +++ b/js/src/jit-test/tests/warp/conditional-test-undefined-2.js @@ -0,0 +1,22 @@ +function g(array) { + // 1. Absent properties return |undefined| from CacheIR. + // 2. Tests on |undefined| are changed to |false| in CacheIR. + // + // When Warp compiling the CacheIR ops, the first test will then happen on + // a boolean, whereas the phi still sees the original undefined value. + if (array.does_not_exist || array.does_not_exist_too || array.slice) { + return 1; + } + return 0; +} + +function f() { + var array = []; + var r = 0; + for (let i = 0; i < 100; ++i) { + r += g(array); + } + assertEq(r, 100); +} + +for (let i = 0; i < 2; ++i) f(); \ No newline at end of file diff --git a/js/src/jit-test/tests/warp/force-warp.js b/js/src/jit-test/tests/warp/force-warp.js new file mode 100644 index 0000000000..b875fc0471 --- /dev/null +++ b/js/src/jit-test/tests/warp/force-warp.js @@ -0,0 +1,11 @@ +// A simple test to ensure WarpBuilder files are included in code-coverage builds. +// See bug 1635097. + +function test() { + var o = {x: 0}; + for (var i = 0; i < 10000; i++) { + o.x++; + } + return o; +} +test(); diff --git a/js/src/jit-test/tests/warp/fun-call-not-inlined.js b/js/src/jit-test/tests/warp/fun-call-not-inlined.js new file mode 100644 index 0000000000..3428167de5 --- /dev/null +++ b/js/src/jit-test/tests/warp/fun-call-not-inlined.js @@ -0,0 +1,29 @@ +// |jit-test| --fast-warmup + +// Call a scripted function instead of Function.prototype.call. +function testScriptedAtFunCallOp() { + var f = function(x) { + if (x === 130) bailout(); + return x; + }; + f.call = f; + + for (var i = 0; i < 150; i++) { + assertEq(f.call(i), i); + } +} +testScriptedAtFunCallOp(); + +// Call Function.prototype.call instead of a "normal" function. +function testFunCallAtNormalCallOp() { + var f = function(x) { + if (x === 130) bailout(); + return x; + }; + f.myCall = Function.prototype.call; + + for (var i = 0; i < 150; i++) { + assertEq(f.myCall(null, i), i); + } +} +testFunCallAtNormalCallOp(); diff --git a/js/src/jit-test/tests/warp/function-load-length.js b/js/src/jit-test/tests/warp/function-load-length.js new file mode 100644 index 0000000000..c3ef3552eb --- /dev/null +++ b/js/src/jit-test/tests/warp/function-load-length.js @@ -0,0 +1,86 @@ +// Test transpiling of LoadFunctionLengthResult and cover possible bailout conditions. + +function empty() {} + +// Note: Typically won't use LoadFunctionLengthResult, because the "length" +// property will be resolved on the first access. +function testGlobalFunction() { + for (var i = 0; i < 200; ++i) { + assertEq(empty.length, 0); + } +} +testGlobalFunction(); + +// Note: Typically won't use LoadFunctionLengthResult, because the "length" +// property will be resolved on the first access. +function testInnerFunction() { + function f() {} + for (var i = 0; i < 200; ++i) { + assertEq(f.length, 0); + } +} +testInnerFunction(); + +function testPerLoopFunction() { + for (var i = 0; i < 200; ++i) { + assertEq(function(){}.length, 0); + } +} +testPerLoopFunction(); + +// Note: Typically won't use LoadFunctionLengthResult, because the "length" +// property will be resolved on the first access. +function testNativeFunction() { + for (var i = 0; i < 200; ++i) { + assertEq(Math.max.length, 2); + } +} +testNativeFunction(); + +// Note: Typically won't use LoadFunctionLengthResult, because the "length" +// property will be resolved on the first access. +function testSelfHostedFunction() { + for (var i = 0; i < 200; ++i) { + assertEq(Array.prototype.forEach.length, 1); + } +} +testSelfHostedFunction(); + +// Bailout when the length doesn't fit into int32. +function testBailoutLength() { + var values = [0, 0x80000000]; + var bound = empty.bind(); + + for (var i = 0; i < 10; ++i) { + var value = values[0 + (i >= 5)]; + + // Define on each iteration to get the same shape. + Object.defineProperty(bound, "length", {value}); + + for (var j = 0; j < 100; ++j) { + var f = bound.bind(); + assertEq(f.length, value); + } + } +} +testBailoutLength(); + +// Bailout when trying to read "length" from a property with a lazy script. +function testBailoutLazyFunction() { + for (var i = 0; i < 200; ++i) { + var values = [function(){}, function(a){}]; + var index = 0 + (i >= 100); + assertEq(values[index].length, index); + } +} +testBailoutLazyFunction(); + +// Bailout when trying to read "length" from a property with a lazy self-hosted script. +function testBailoutLazySelfHostedFunction() { + for (var i = 0; i < 200; ++i) { + var values = [function(){}, Array.prototype.map]; + var index = 0 + (i >= 100); + assertEq(values[index].length, index); + } +} +testBailoutLazySelfHostedFunction(); diff --git a/js/src/jit-test/tests/warp/function-load-name.js b/js/src/jit-test/tests/warp/function-load-name.js new file mode 100644 index 0000000000..686ed32629 --- /dev/null +++ b/js/src/jit-test/tests/warp/function-load-name.js @@ -0,0 +1,100 @@ +// Test transpiling of LoadFunctionNameResult and cover possible bailout conditions. + +function empty() {} + +// Note: Typically won't use LoadFunctionNameResult, because the "name" +// property will be resolved on the first access. +function testGlobalFunction() { + for (var i = 0; i < 200; ++i) { + assertEq(empty.name, "empty"); + } +} +testGlobalFunction(); + +// Note: Typically won't use LoadFunctionNameResult, because the "name" +// property will be resolved on the first access. +function testInnerFunction() { + function f() {} + for (var i = 0; i < 200; ++i) { + assertEq(f.name, "f"); + } +} +testInnerFunction(); + +function testPerLoopFunction() { + for (var i = 0; i < 200; ++i) { + assertEq(function f(){}.name, "f"); + } +} +testPerLoopFunction(); + +// Note: Typically won't use LoadFunctionNameResult, because the "name" +// property will be resolved on the first access. +function testNativeFunction() { + for (var i = 0; i < 200; ++i) { + assertEq(Math.max.name, "max"); + } +} +testNativeFunction(); + +// Note: Typically won't use LoadFunctionNameResult, because the "name" +// property will be resolved on the first access. +function testSelfHostedFunction() { + for (var i = 0; i < 200; ++i) { + assertEq(Array.prototype.forEach.name, "forEach"); + } +} +testSelfHostedFunction(); + +// Bailout when the name property is resolved. +function testBailoutResolvedName() { + function f1() {} + + // Ensure the name property of |f1| is resolved. + assertEq(f1.name, "f1"); + + var names = ["f", "f1"]; + + for (var i = 0; i < 10; ++i) { + var name = names[0 + (i >= 5)]; + + for (var j = 0; j < 100; ++j) { + var values = [function f(){}, f1]; + var value = values[0 + (i >= 5)]; + + assertEq(value.name, name); + } + } +} +testBailoutResolvedName(); + +// Bailout when the HAS_BOUND_FUNCTION_NAME_PREFIX isn't set. +function testBailoutBoundName() { + function f1() {} + function f2() {} + + var bound = f1.bind(); + + // Ensure the name property of |bound| is resolved. That way new functions + // created through |bound().bind()| will have the HAS_BOUND_FUNCTION_NAME_PREFIX + // flag set. + assertEq(bound.name, "bound f1"); + + // |bound1| and |bound2| have the same shape, but different function flags. + var bound1 = bound.bind(); // HAS_BOUND_FUNCTION_NAME_PREFIX + var bound2 = f2.bind(); // ! HAS_BOUND_FUNCTION_NAME_PREFIX + + var values = [bound1, bound2]; + var names = ["bound bound bound f1", "bound bound f2"]; + + for (var i = 0; i < 10; ++i) { + var value = values[0 + (i >= 5)]; + var name = names[0 + (i >= 5)]; + + for (var j = 0; j < 100; ++j) { + var f = value.bind(); + assertEq(f.name, name); + } + } +} +testBailoutBoundName(); diff --git a/js/src/jit-test/tests/warp/function-var-environment-inlined.js b/js/src/jit-test/tests/warp/function-var-environment-inlined.js new file mode 100644 index 0000000000..f3b9c9b3b7 --- /dev/null +++ b/js/src/jit-test/tests/warp/function-var-environment-inlined.js @@ -0,0 +1,15 @@ +function defaultValue() { return 3; } + +function testCallee(p = defaultValue()) { + var q = p + 1; + return () => q + p; +} +function test() { + var res = 0; + for (var i = 0; i < 2000; i++) { + res += testCallee()(); + res += testCallee(1)(); + } + assertEq(res, 20000); +} +test(); diff --git a/js/src/jit-test/tests/warp/function-var-environment.js b/js/src/jit-test/tests/warp/function-var-environment.js new file mode 100644 index 0000000000..dd23cb67a9 --- /dev/null +++ b/js/src/jit-test/tests/warp/function-var-environment.js @@ -0,0 +1,43 @@ +function defaultValue() { return 123; } + +// 2 environment objects: Call => Var. The lambda uses both of them. +function testBasic(p = defaultValue()) { + for (var i = 0; i < 2000; i++) {} + return () => i + p; +} +assertEq(testBasic()(), 2123); + +function testBailout(p = defaultValue()) { + for (var i = 0; i < 2000; i++) { + if (i > 1950) { + bailout(); + } + } + return () => i + p; +} +assertEq(testBailout()(), 2123); + +// 3 environment objects: Call => Var => Lexical. The lambda uses all of them. +let escaped; +function testVarAndLexical(p = defaultValue()) { + var q = p + 1; + let i = 0; + for (; i < 2000; i++) { + escaped = () => i + p + q; + } +} +testVarAndLexical(); +assertEq(escaped(), 2247); + +function testVarAndLexicalBailout(p = defaultValue()) { + var q = p + 1; + let i = 0; + for (; i < 2000; i++) { + escaped = () => i + p - q; + if (i > 1950) { + bailout(); + } + } +} +testVarAndLexicalBailout(); +assertEq(escaped(), 1999); diff --git a/js/src/jit-test/tests/warp/guard-function-is-non-builtin-ctor.js b/js/src/jit-test/tests/warp/guard-function-is-non-builtin-ctor.js new file mode 100644 index 0000000000..c2b92d4510 --- /dev/null +++ b/js/src/jit-test/tests/warp/guard-function-is-non-builtin-ctor.js @@ -0,0 +1,20 @@ +function test() { + for (var i = 0; i <= 200; ++i) { + // Create a fresh function in each iteration. + var values = [function(){}, () => {}]; + + // Use an arrow function in the last iteration. + var useArrowFn = (i === 200); + + // No conditional (?:) so we don't trigger a cold-code bailout. + var value = values[0 + useArrowFn]; + + // Set or create the "prototype" property. + value.prototype = null; + + // The "prototype" is configurable iff the function is an arrow function. + var desc = Object.getOwnPropertyDescriptor(value, "prototype"); + assertEq(desc.configurable, useArrowFn); + } +} +test(); diff --git a/js/src/jit-test/tests/warp/guard-has-getter-setter.js b/js/src/jit-test/tests/warp/guard-has-getter-setter.js new file mode 100644 index 0000000000..dc4b1d9ebd --- /dev/null +++ b/js/src/jit-test/tests/warp/guard-has-getter-setter.js @@ -0,0 +1,263 @@ +// Access property once. +function simple() { + var obj = { + get p() { + return 1; + } + }; + + // Use objects with different shapes to enter megamorphic state for + // the JSOp::GetProp opcode. + var array = [ + Object.create(obj, {a: {value: 1}}), + Object.create(obj, {b: {value: 2}}), + Object.create(obj, {c: {value: 3}}), + Object.create(obj, {d: {value: 4}}), + Object.create(obj, {e: {value: 5}}), + Object.create(obj, {f: {value: 6}}), + Object.create(obj, {g: {value: 7}}), + Object.create(obj, {h: {value: 8}}), + ]; + + var r = 0; + for (var i = 0; i < 200; ++i) { + var o = array[i & 7]; + r += o.p; + } + assertEq(r, 200); +} +simple(); + +// Access property multiple times (consecutive) to test that MGuardHasGetterSetter +// ops can be merged. +function consecutive() { + var obj = { + get p() { + return 1; + } + }; + + // Use objects with different shapes to enter megamorphic state for + // the JSOp::GetProp opcode. + var array = [ + Object.create(obj, {a: {value: 1}}), + Object.create(obj, {b: {value: 2}}), + Object.create(obj, {c: {value: 3}}), + Object.create(obj, {d: {value: 4}}), + Object.create(obj, {e: {value: 5}}), + Object.create(obj, {f: {value: 6}}), + Object.create(obj, {g: {value: 7}}), + Object.create(obj, {h: {value: 8}}), + ]; + + var r = 0; + for (var i = 0; i < 200; ++i) { + var o = array[i & 7]; + + r += o.p; + r += o.p; + r += o.p; + r += o.p; + } + assertEq(r, 4 * 200); +} +consecutive(); + +// Access property multiple times (loop) to test LICM. +function loop() { + var obj = { + get p() { + return 1; + } + }; + + // Use objects with different shapes to enter megamorphic state for + // the JSOp::GetProp opcode. + var array = [ + Object.create(obj, {a: {value: 1}}), + Object.create(obj, {b: {value: 2}}), + Object.create(obj, {c: {value: 3}}), + Object.create(obj, {d: {value: 4}}), + Object.create(obj, {e: {value: 5}}), + Object.create(obj, {f: {value: 6}}), + Object.create(obj, {g: {value: 7}}), + Object.create(obj, {h: {value: 8}}), + ]; + + var r = 0; + for (var i = 0; i < 200; ++i) { + var o = array[i & 7]; + + for (var j = 0; j < 5; ++j) { + r += o.p; + } + } + assertEq(r, 5 * 200); +} +loop(); + +// Bailout when prototype changes. +function modifyProto() { + var obj = { + get p() { + return 1; + } + }; + + var obj2 = { + get p() { + return 2; + } + }; + + // Use objects with different shapes to enter megamorphic state for + // the JSOp::GetProp opcode. + var array = [ + Object.create(obj, {a: {value: 1}}), + Object.create(obj, {b: {value: 2}}), + Object.create(obj, {c: {value: 3}}), + Object.create(obj, {d: {value: 4}}), + Object.create(obj, {e: {value: 5}}), + Object.create(obj, {f: {value: 6}}), + Object.create(obj, {g: {value: 7}}), + Object.create(obj, {h: {value: 8}}), + ]; + + var r = 0; + for (var i = 0; i < 200; ++i) { + var o = array[i & 7]; + + r += o.p; + + // Always execute Object.setPrototypeOf() to avoid cold code bailouts, + // which would happen for conditional code like if-statements. But only + // actually change |o|'s prototype once. + var j = (i === 100) | 0; + var q = [{}, o][j]; + Object.setPrototypeOf(q, obj2); + + r += o.p; + } + assertEq(r, 2 * 200 + Math.floor(100 / 8) * 2 + 1); +} +modifyProto(); + +// Bailout when property is changed to own data property. +function modifyToOwnValue() { + var obj = { + get p() { + return 1; + } + }; + + // Use objects with different shapes to enter megamorphic state for + // the JSOp::GetProp opcode. + var array = [ + Object.create(obj, {a: {value: 1}}), + Object.create(obj, {b: {value: 2}}), + Object.create(obj, {c: {value: 3}}), + Object.create(obj, {d: {value: 4}}), + Object.create(obj, {e: {value: 5}}), + Object.create(obj, {f: {value: 6}}), + Object.create(obj, {g: {value: 7}}), + Object.create(obj, {h: {value: 8}}), + ]; + + var r = 0; + for (var i = 0; i < 200; ++i) { + var o = array[i & 7]; + + r += o.p; + + // Always execute Object.setPrototypeOf() to avoid cold code bailouts, + // which would happen for conditional code like if-statements. But only + // actually change |o|'s prototype once. + var j = (i === 100) | 0; + var q = [{}, o][j]; + Object.defineProperty(q, "p", {value: 2}); + + r += o.p; + } + assertEq(r, 2 * 200 + Math.floor(100 / 8) * 2 + 1); +} +modifyToOwnValue(); + +// Bailout when property is changed to own accessor property. +function modifyToOwnAccessor() { + var obj = { + get p() { + return 1; + } + }; + + // Use objects with different shapes to enter megamorphic state for + // the JSOp::GetProp opcode. + var array = [ + Object.create(obj, {a: {value: 1}}), + Object.create(obj, {b: {value: 2}}), + Object.create(obj, {c: {value: 3}}), + Object.create(obj, {d: {value: 4}}), + Object.create(obj, {e: {value: 5}}), + Object.create(obj, {f: {value: 6}}), + Object.create(obj, {g: {value: 7}}), + Object.create(obj, {h: {value: 8}}), + ]; + + var r = 0; + for (var i = 0; i < 200; ++i) { + var o = array[i & 7]; + + r += o.p; + + // Always execute Object.setPrototypeOf() to avoid cold code bailouts, + // which would happen for conditional code like if-statements. But only + // actually change |o|'s prototype once. + var j = (i === 100) | 0; + var q = [{}, o][j]; + Object.defineProperty(q, "p", {get() { return 2; }}); + + r += o.p; + } + assertEq(r, 2 * 200 + Math.floor(100 / 8) * 2 + 1); +} +modifyToOwnAccessor(); + +// Bailout when changing accessor. +function modifyProtoAccessor() { + var obj = { + get p() { + return 1; + } + }; + + // Use objects with different shapes to enter megamorphic state for + // the JSOp::GetProp opcode. + var array = [ + Object.create(obj, {a: {value: 1}}), + Object.create(obj, {b: {value: 2}}), + Object.create(obj, {c: {value: 3}}), + Object.create(obj, {d: {value: 4}}), + Object.create(obj, {e: {value: 5}}), + Object.create(obj, {f: {value: 6}}), + Object.create(obj, {g: {value: 7}}), + Object.create(obj, {h: {value: 8}}), + ]; + + var r = 0; + for (var i = 0; i < 200; ++i) { + var o = array[i & 7]; + + r += o.p; + + // Always execute Object.setPrototypeOf() to avoid cold code bailouts, + // which would happen for conditional code like if-statements. But only + // actually change |o|'s prototype once. + var j = (i === 100) | 0; + var q = [{}, obj][j]; + Object.defineProperty(q, "p", {get() { return 2; }}); + + r += o.p; + } + assertEq(r, 2 * 200 + 100 * 2 - 1); +} +modifyProtoAccessor(); diff --git a/js/src/jit-test/tests/warp/guard-specific-atom-with-short-atom.js b/js/src/jit-test/tests/warp/guard-specific-atom-with-short-atom.js new file mode 100644 index 0000000000..84be75fbfd --- /dev/null +++ b/js/src/jit-test/tests/warp/guard-specific-atom-with-short-atom.js @@ -0,0 +1,82 @@ +// Test case to cover constant atom guards. +// +// GuardSpecificAtom for short (≤32 characters) constant atoms is optimised. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const ascii = [...characters( + [0x41, 0x5A], // A..Z + [0x61, 0x7A], // a..z + [0x30, 0x39], // 0..9 +)]; + +const latin1 = [...characters( + [0xC0, 0xFF], // À..ÿ +)]; + +const twoByte = [...characters( + [0x100, 0x17E], // Ā..ž +)]; + +function toRope(s) { + try { + return newRope(s[0], s.substring(1)); + } catch {} + // newRope can fail when |s| fits into an inline string. In that case simply + // return the input. + return s; +} + +function atomize(s) { + return Object.keys({[s]: 0})[0]; +} + +for (let i = 1; i <= 32; ++i) { + let strings = [ascii, latin1, twoByte].flatMap(codePoints => [ + // Same string as the input. + String.fromCodePoint(...codePoints.slice(0, i)), + + // Same length as the input, but a different string. + String.fromCodePoint(...codePoints.slice(1, i + 1)), + + // Shorter string than the input. + String.fromCodePoint(...codePoints.slice(0, i - 1)), + + // Longer string than the input. + String.fromCodePoint(...codePoints.slice(0, i + 1)), + ]).flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + atomize(x), + ]); + + // Must be small enough to transition to megamorphic ICs. + const stringsPerLoop = 4; + + for (let codePoints of [ascii, latin1, twoByte]) { + let str = String.fromCodePoint(...codePoints.slice(0, i)); + + for (let i = 0; i < strings.length; i += stringsPerLoop) { + let fn = Function("strings", ` + var obj = {["${str}"]: 0}; + + for (let i = 0; i < 250; ++i) { + let idx = i % strings.length; + let str = strings[idx]; + + let actual = str in obj; + let expected = str === "${str}"; + if (actual !== expected) throw new Error(); + } + `); + fn(strings.slice(i, stringsPerLoop)); + } + } +} diff --git a/js/src/jit-test/tests/warp/guard-string-to-number-or-int32.js b/js/src/jit-test/tests/warp/guard-string-to-number-or-int32.js new file mode 100644 index 0000000000..8a28d46f99 --- /dev/null +++ b/js/src/jit-test/tests/warp/guard-string-to-number-or-int32.js @@ -0,0 +1,36 @@ +function stringToNumber() { + function f(s) { + return ~~s; + } + + var q = 0; + for (var i = 0; i < 200; ++i) { + q += f("1"); + q += f("0x2"); + q += f("0b11"); + q += f("0o4"); + + // Invalid inputs: ~~Nan == 0 + q += f("z"); + q += f("0x2.3"); + q += f("0x1.fp4"); + } + assertEq(q, (1 + 2 + 3 + 4) * 200); +} +stringToNumber(); + +function stringToInt32() { + function f(s) { + return s - 0; + } + + var q = 0; + for (var i = 0; i < 200; ++i) { + q += f("1"); + q += f("0x2"); + q += f("0b11"); + q += f("0o4"); + } + assertEq(q, (1 + 2 + 3 + 4) * 200); +} +stringToInt32(); diff --git a/js/src/jit-test/tests/warp/guardproto-nursery.js b/js/src/jit-test/tests/warp/guardproto-nursery.js new file mode 100644 index 0000000000..5093298e88 --- /dev/null +++ b/js/src/jit-test/tests/warp/guardproto-nursery.js @@ -0,0 +1,13 @@ +function f() { + var o = {x: 1, y: 3}; + o.__proto__ = {x: 2}; + var p = Math; + p.__proto__ = o; + p.__proto__ = {__proto__: o}; + + for (var i = 0; i < 3000; i++) { + assertEq(p.x, 1); + assertEq(p.y, 3); + } +} +f(); diff --git a/js/src/jit-test/tests/warp/inline-array-at.js b/js/src/jit-test/tests/warp/inline-array-at.js new file mode 100644 index 0000000000..4abc06ebd5 --- /dev/null +++ b/js/src/jit-test/tests/warp/inline-array-at.js @@ -0,0 +1,15 @@ +function f(x) { + assertEq(x.at(0), 1); + assertEq(x.at(-1), 3); + assertEq(x.at(10), undefined); +} + +function g() { + for (var i = 0; i < 100; i++) { + f([1, 2, 3]); + } +} + +for (var j = 0; j < 10; j++) { + g(); +} diff --git a/js/src/jit-test/tests/warp/inlined-accessor-exc-bailout.js b/js/src/jit-test/tests/warp/inlined-accessor-exc-bailout.js new file mode 100644 index 0000000000..9346ac65bb --- /dev/null +++ b/js/src/jit-test/tests/warp/inlined-accessor-exc-bailout.js @@ -0,0 +1,45 @@ +// |jit-test| --fast-warmup + +// Tests for exception bailout from inlined getter/setter. + +function throwingGetter() { + var o = {}; + var count = 0; + Object.defineProperty(o, "getter", {get: function() { + if (count++ === 195) { + throw 1; + } + }}); + var ex = null; + try { + for (var i = 0; i < 200; i++) { + o.getter; + } + } catch(e) { + ex = e; + } + assertEq(ex, 1); + assertEq(count, 196); +} +throwingGetter(); + +function throwingSetter() { + var o = {}; + var count = 0; + Object.defineProperty(o, "setter", {set: function(v) { + if (count++ === 195) { + throw 1; + } + }}); + var ex = null; + try { + for (var i = 0; i < 200; i++) { + o.setter = i; + } + } catch(e) { + ex = e; + } + assertEq(ex, 1); + assertEq(count, 196); +} +throwingSetter(); diff --git a/js/src/jit-test/tests/warp/load-unboxed-typedarray-bigint.js b/js/src/jit-test/tests/warp/load-unboxed-typedarray-bigint.js new file mode 100644 index 0000000000..736e80f3f5 --- /dev/null +++ b/js/src/jit-test/tests/warp/load-unboxed-typedarray-bigint.js @@ -0,0 +1,7 @@ +var ta = new BigInt64Array([0n, 1n]); +var q = 0; +for (var i = 0; i < 10000; ++i) { + if (ta[i&1]) q++; +} + +assertEq(q, 5000); diff --git a/js/src/jit-test/tests/warp/map-get-bigint.js b/js/src/jit-test/tests/warp/map-get-bigint.js new file mode 100644 index 0000000000..3b746fb81c --- /dev/null +++ b/js/src/jit-test/tests/warp/map-get-bigint.js @@ -0,0 +1,211 @@ +// Similar test as "cacheir/map-get-bigint.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i + 1])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testInlineDigitsSameSign_same_map(n) { + var xs = [1n, 2n]; + var ys = [3n, 4n]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testInlineDigitsSameSign_same_map); + +function testInlineDigitsDifferentSign_same_map(n) { + var xs = [-1n, 2n]; + var ys = [1n, -2n]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testInlineDigitsDifferentSign_same_map); + +function testHeapDigitsSameSign_same_map(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [heap + 1n, heap + 2n]; + var ys = [heap + 3n, heap + 4n]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testHeapDigitsSameSign_same_map); + +function testHeapDigitsDifferentSign_same_map(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [-(heap + 1n), heap + 2n]; + var ys = [heap + 1n, -(heap + 2n)]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testHeapDigitsDifferentSign_same_map); + +// Duplicate the above tests, but this time use a different map. + +function testInlineDigitsSameSign_different_map(n) { + var xs = [1n, 2n]; + var ys = [3n, 4n]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testInlineDigitsSameSign_different_map); + +function testInlineDigitsDifferentSign_different_map(n) { + var xs = [-1n, 2n]; + var ys = [1n, -2n]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testInlineDigitsDifferentSign_different_map); + +function testHeapDigitsSameSign_different_map(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [heap + 1n, heap + 2n]; + var ys = [heap + 3n, heap + 4n]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testHeapDigitsSameSign_different_map); + +function testHeapDigitsDifferentSign_different_map(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [-(heap + 1n), heap + 2n]; + var ys = [heap + 1n, -(heap + 2n)]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testHeapDigitsDifferentSign_different_map); + +// Test the alias information is correct. + +function test_alias(n) { + var xs = [1n, 2n]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, 1); + var v = map.get(x); + + map.delete(x); + var w = map.get(x); + + c += v; + assertEq(w, undefined); + } + assertEq(c, N); +} +runTest(test_alias); diff --git a/js/src/jit-test/tests/warp/map-get-nongcthing.js b/js/src/jit-test/tests/warp/map-get-nongcthing.js new file mode 100644 index 0000000000..3a0e0f7632 --- /dev/null +++ b/js/src/jit-test/tests/warp/map-get-nongcthing.js @@ -0,0 +1,343 @@ +// Similar test as "cacheir/map-get-nongcthing.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i + 1])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testInt32_same_map(n) { + var xs = [1, 2]; + var ys = [3, 4]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testInt32_same_map); + +function testDouble_same_map(n) { + var xs = [Math.PI, Infinity]; + var ys = [Math.E, -Infinity]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testDouble_same_map); + +function testZero_same_map(n) { + var xs = [0, -0]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap([0], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N); +} +runTest(testZero_same_map); + +function testNaN_same_map(n) { + var xs = [NaN, -NaN]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap([NaN], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N); +} +runTest(testNaN_same_map); + +function testUndefinedAndNull_same_map(n) { + var xs = [undefined, null]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testUndefinedAndNull_same_map); + +function testBoolean_same_map(n) { + var xs = [true, false]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testBoolean_same_map); + +// Duplicate the above tests, but this time use a different map. + +function testInt32_different_map(n) { + var xs = [1, 2]; + var ys = [3, 4]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testInt32_different_map); + +function testDouble_different_map(n) { + var xs = [Math.PI, Infinity]; + var ys = [Math.E, -Infinity]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testDouble_different_map); + +function testZero_different_map(n) { + var xs = [0, -0]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map1 = createMap([0], n); + var map2 = createMap([0], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N); +} +runTest(testZero_different_map); + +function testNaN_different_map(n) { + var xs = [NaN, -NaN]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map1 = createMap([NaN], n); + var map2 = createMap([NaN], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N); +} +runTest(testNaN_different_map); + +function testUndefinedAndNull_different_map(n) { + var xs = [undefined, null]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testUndefinedAndNull_different_map); + +function testBoolean_different_map(n) { + var xs = [true, false]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testBoolean_different_map); + +// Test the alias information is correct. + +function testInt32_alias(n) { + var xs = [1, 2]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, 1); + var v = map.get(x); + + map.delete(x); + var w = map.get(x); + + c += v; + assertEq(w, undefined); + } + assertEq(c, N); +} +runTest(testInt32_alias); + +function testDouble_alias(n) { + var xs = [Math.PI, Infinity]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, 1); + var v = map.get(x); + + map.delete(x); + var w = map.get(x); + + c += v; + assertEq(w, undefined); + } + assertEq(c, N); +} +runTest(testDouble_alias); + +function testUndefinedAndNull_alias(n) { + var xs = [undefined, null]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, 1); + var v = map.get(x); + + map.delete(x); + var w = map.get(x); + + c += v; + assertEq(w, undefined); + } + assertEq(c, N); +} +runTest(testUndefinedAndNull_alias); + +function testBoolean_alias(n) { + var xs = [true, false]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, 1); + var v = map.get(x); + + map.delete(x); + var w = map.get(x); + + c += v; + assertEq(w, undefined); + } + assertEq(c, N); +} +runTest(testBoolean_alias); diff --git a/js/src/jit-test/tests/warp/map-get-object.js b/js/src/jit-test/tests/warp/map-get-object.js new file mode 100644 index 0000000000..0c13b6e50a --- /dev/null +++ b/js/src/jit-test/tests/warp/map-get-object.js @@ -0,0 +1,104 @@ +// Similar test as "cacheir/map-get-object.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i + 1])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function test_same_map(n) { + var xs = [{}, {}]; + var ys = [{}, {}]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(test_same_map); + +// Duplicate the above tests, but this time use a different map. + +function test_different_map(n) { + var xs = [{}, {}]; + var ys = [{}, {}]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(test_different_map); + +// Test the alias information is correct. + +function test_alias(n) { + var xs = [{}, {}]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, 1); + var v = map.get(x); + + map.delete(x); + var w = map.get(x); + + c += v; + assertEq(w, undefined); + } + assertEq(c, N); +} +runTest(test_alias); + +// And finally test that we don't actually support GVN for objects, because the +// hash changes when moving an object. + +function testRekey() { + var map = new Map(); + var c = 0; + var N = 100; + for (var i = 0; i < N; ++i) { + var k = {}; + map.set(k, 1); + + c += map.get(k); + + minorgc(); + + c += map.get(k); + } + + assertEq(c, N * 2); +} +testRekey(); diff --git a/js/src/jit-test/tests/warp/map-get-string.js b/js/src/jit-test/tests/warp/map-get-string.js new file mode 100644 index 0000000000..265c1caf94 --- /dev/null +++ b/js/src/jit-test/tests/warp/map-get-string.js @@ -0,0 +1,162 @@ +// Similar test as "cacheir/map-get-string.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i + 1])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testConstant_different_map(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testConstant_different_map); + +function testComputed_different_map(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + z = String.fromCharCode(z.charCodeAt(0)); + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testComputed_different_map); + +function testRope_different_map(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map = createMap(xs.map(x => x.repeat(100)), n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3].repeat(100); + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testRope_different_map); + +// Duplicate the above tests, but this time use a different map. + +function testConstant_different_map(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testConstant_different_map); + +function testComputed_different_map(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + z = String.fromCharCode(z.charCodeAt(0)); + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testComputed_different_map); + +function testRope_different_map(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs.map(x => x.repeat(100)), n); + var map2 = createMap(xs.map(x => x.repeat(100)), n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3].repeat(100); + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(testRope_different_map); + +// Test the alias information is correct. + +function test_alias(n) { + var xs = ["a", "b"]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, 1); + var v = map.get(x); + + map.delete(x); + var w = map.get(x); + + c += v; + assertEq(w, undefined); + } + assertEq(c, N); +} +runTest(test_alias); diff --git a/js/src/jit-test/tests/warp/map-get-symbol.js b/js/src/jit-test/tests/warp/map-get-symbol.js new file mode 100644 index 0000000000..358f79ef96 --- /dev/null +++ b/js/src/jit-test/tests/warp/map-get-symbol.js @@ -0,0 +1,82 @@ +// Similar test as "cacheir/map-get-symbol.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i + 1])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function test_same_map(n) { + var xs = [Symbol(), Symbol()]; + var ys = [Symbol(), Symbol()]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(test_same_map); + +// Duplicate the above tests, but this time use a different map. + +function test_different_map(n) { + var xs = [Symbol(), Symbol()]; + var ys = [Symbol(), Symbol()]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, N + N / 2); +} +runTest(test_different_map); + +// Test the alias information is correct. + +function test_alias(n) { + var xs = [Symbol(), Symbol()]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, 1); + var v = map.get(x); + + map.delete(x); + var w = map.get(x); + + c += v; + assertEq(w, undefined); + } + assertEq(c, N); +} +runTest(test_alias); diff --git a/js/src/jit-test/tests/warp/map-get-value.js b/js/src/jit-test/tests/warp/map-get-value.js new file mode 100644 index 0000000000..525ee4fc9b --- /dev/null +++ b/js/src/jit-test/tests/warp/map-get-value.js @@ -0,0 +1,104 @@ +// Similar test as "cacheir/map-get-value.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i + 1])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testPolymorphic_same_map(n) { + var xs = [10, 10.5, "test", Symbol("?"), 123n, -123n, {}, []]; + var ys = [-0, NaN, "bad", Symbol("!"), 42n, -99n, {}, []]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 128; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 15]; + var v = map.get(z); + if (v !== undefined) c += v; + var w = map.get(z); + if (w !== undefined) c += w; + } + assertEq(c, (8 * 9) / 2 * 8 * 2); +} +runTest(testPolymorphic_same_map); + +// Duplicate the above tests, but this time use a different map. + +function testPolymorphic_different_map(n) { + var xs = [10, 10.5, "test", Symbol("?"), 123n, -123n, {}, []]; + var ys = [-0, NaN, "bad", Symbol("!"), 42n, -99n, {}, []]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 128; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 15]; + var v = map1.get(z); + if (v !== undefined) c += v; + var w = map2.get(z); + if (w !== undefined) c += w; + } + assertEq(c, (8 * 9) / 2 * 8 * 2); +} +runTest(testPolymorphic_different_map); + +// Test the alias information is correct. + +function testPolymorphic_alias(n) { + var xs = [10, 10.5, "test", Symbol("?"), 123n, -123n, {}, []]; + var map = createMap([], n); + + var N = 128; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, 1); + var v = map.get(x); + + map.delete(x); + var w = map.get(x); + + c += v; + assertEq(w, undefined); + } + assertEq(c, N); +} +runTest(testPolymorphic_alias); + +// And finally test that we don't actually support GVN for values, because the +// hash changes when moving a value which holds an object. + +function testRekey() { + var map = new Map(); + var c = 0; + var N = 100; + for (var i = 0; i < N; ++i) { + var k = (i & 1) ? {} : null; + map.set(k, 1); + + c += map.get(k); + + minorgc(); + + c += map.get(k); + } + + assertEq(c, N * 2); +} +testRekey(); diff --git a/js/src/jit-test/tests/warp/map-has-bigint.js b/js/src/jit-test/tests/warp/map-has-bigint.js new file mode 100644 index 0000000000..64fd52de55 --- /dev/null +++ b/js/src/jit-test/tests/warp/map-has-bigint.js @@ -0,0 +1,192 @@ +// Similar test as "cacheir/map-has-bigint.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testInlineDigitsSameSign_same_map(n) { + var xs = [1n, 2n]; + var ys = [3n, 4n]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testInlineDigitsSameSign_same_map); + +function testInlineDigitsDifferentSign_same_map(n) { + var xs = [-1n, 2n]; + var ys = [1n, -2n]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testInlineDigitsDifferentSign_same_map); + +function testHeapDigitsSameSign_same_map(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [heap + 1n, heap + 2n]; + var ys = [heap + 3n, heap + 4n]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testHeapDigitsSameSign_same_map); + +function testHeapDigitsDifferentSign_same_map(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [-(heap + 1n), heap + 2n]; + var ys = [heap + 1n, -(heap + 2n)]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testHeapDigitsDifferentSign_same_map); + +// Duplicate the above tests, but this time use a different map. + +function testInlineDigitsSameSign_different_map(n) { + var xs = [1n, 2n]; + var ys = [3n, 4n]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testInlineDigitsSameSign_different_map); + +function testInlineDigitsDifferentSign_different_map(n) { + var xs = [-1n, 2n]; + var ys = [1n, -2n]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testInlineDigitsDifferentSign_different_map); + +function testHeapDigitsSameSign_different_map(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [heap + 1n, heap + 2n]; + var ys = [heap + 3n, heap + 4n]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testHeapDigitsSameSign_different_map); + +function testHeapDigitsDifferentSign_different_map(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [-(heap + 1n), heap + 2n]; + var ys = [heap + 1n, -(heap + 2n)]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testHeapDigitsDifferentSign_different_map); + +// Test the alias information is correct. + +function test_alias(n) { + var xs = [1n, 2n]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, x); + if (map.has(x)) c++; + + map.delete(x); + if (map.has(x)) c++; + } + assertEq(c, N); +} +runTest(test_alias); diff --git a/js/src/jit-test/tests/warp/map-has-nongcthing.js b/js/src/jit-test/tests/warp/map-has-nongcthing.js new file mode 100644 index 0000000000..808e1c95b0 --- /dev/null +++ b/js/src/jit-test/tests/warp/map-has-nongcthing.js @@ -0,0 +1,307 @@ +// Similar test as "cacheir/map-has-nongcthing.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testInt32_same_map(n) { + var xs = [1, 2]; + var ys = [3, 4]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testInt32_same_map); + +function testDouble_same_map(n) { + var xs = [Math.PI, Infinity]; + var ys = [Math.E, -Infinity]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testDouble_same_map); + +function testZero_same_map(n) { + var xs = [0, -0]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap([0], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testZero_same_map); + +function testNaN_same_map(n) { + var xs = [NaN, -NaN]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap([NaN], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testNaN_same_map); + +function testUndefinedAndNull_same_map(n) { + var xs = [undefined, null]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testUndefinedAndNull_same_map); + +function testBoolean_same_map(n) { + var xs = [true, false]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testBoolean_same_map); + +// Duplicate the above tests, but this time use a different map. + +function testInt32_different_map(n) { + var xs = [1, 2]; + var ys = [3, 4]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testInt32_different_map); + +function testDouble_different_map(n) { + var xs = [Math.PI, Infinity]; + var ys = [Math.E, -Infinity]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testDouble_different_map); + +function testZero_different_map(n) { + var xs = [0, -0]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map1 = createMap([0], n); + var map2 = createMap([0], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testZero_different_map); + +function testNaN_different_map(n) { + var xs = [NaN, -NaN]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map1 = createMap([NaN], n); + var map2 = createMap([NaN], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testNaN_different_map); + +function testUndefinedAndNull_different_map(n) { + var xs = [undefined, null]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testUndefinedAndNull_different_map); + +function testBoolean_different_map(n) { + var xs = [true, false]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testBoolean_different_map); + +// Test the alias information is correct. + +function testInt32_alias(n) { + var xs = [1, 2]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, x); + if (map.has(x)) c++; + + map.delete(x); + if (map.has(x)) c++; + } + assertEq(c, N); +} +runTest(testInt32_alias); + +function testDouble_alias(n) { + var xs = [Math.PI, Infinity]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, x); + if (map.has(x)) c++; + + map.delete(x); + if (map.has(x)) c++; + } + assertEq(c, N); +} +runTest(testDouble_alias); + +function testUndefinedAndNull_alias(n) { + var xs = [undefined, null]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, x); + if (map.has(x)) c++; + + map.delete(x); + if (map.has(x)) c++; + } + assertEq(c, N); +} +runTest(testUndefinedAndNull_alias); + +function testBoolean_alias(n) { + var xs = [true, false]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, x); + if (map.has(x)) c++; + + map.delete(x); + if (map.has(x)) c++; + } + assertEq(c, N); +} +runTest(testBoolean_alias); diff --git a/js/src/jit-test/tests/warp/map-has-object.js b/js/src/jit-test/tests/warp/map-has-object.js new file mode 100644 index 0000000000..189213d6d4 --- /dev/null +++ b/js/src/jit-test/tests/warp/map-has-object.js @@ -0,0 +1,97 @@ +// Similar test as "cacheir/map-has-object.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function test_same_map(n) { + var xs = [{}, {}]; + var ys = [{}, {}]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(test_same_map); + +// Duplicate the above tests, but this time use a different map. + +function test_different_map(n) { + var xs = [{}, {}]; + var ys = [{}, {}]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(test_different_map); + +// Test the alias information is correct. + +function test_alias(n) { + var xs = [{}, {}]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, x); + if (map.has(x)) c++; + + map.delete(x); + if (map.has(x)) c++; + } + assertEq(c, N); +} +runTest(test_alias); + +// And finally test that we don't actually support GVN for objects, because the +// hash changes when moving an object. + +function testRekey() { + var map = new Map(); + var c = 0; + var N = 100; + for (var i = 0; i < N; ++i) { + var k = {}; + map.set(k, i); + + if (map.has(k)) c++; + + minorgc(); + + if (map.has(k)) c++; + } + + assertEq(c, N * 2); +} +testRekey(); diff --git a/js/src/jit-test/tests/warp/map-has-string.js b/js/src/jit-test/tests/warp/map-has-string.js new file mode 100644 index 0000000000..62bca37d22 --- /dev/null +++ b/js/src/jit-test/tests/warp/map-has-string.js @@ -0,0 +1,147 @@ +// Similar test as "cacheir/map-has-string.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testConstant_same_map(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testConstant_same_map); + +function testComputed_same_map(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + z = String.fromCharCode(z.charCodeAt(0)); + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testComputed_same_map); + +function testRope_same_map(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map = createMap(xs.map(x => x.repeat(100)), n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3].repeat(100); + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testRope_same_map); + +// Duplicate the above tests, but this time use a different map. + +function testConstant_different_map(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testConstant_different_map); + +function testComputed_different_map(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + z = String.fromCharCode(z.charCodeAt(0)); + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testComputed_different_map); + +function testRope_different_map(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs.map(x => x.repeat(100)), n); + var map2 = createMap(xs.map(x => x.repeat(100)), n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3].repeat(100); + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testRope_different_map); + +// Test the alias information is correct. + +function test_alias(n) { + var xs = ["a", "b"]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, x); + if (map.has(x)) c++; + + map.delete(x); + if (map.has(x)) c++; + } + assertEq(c, N); +} +runTest(test_alias); diff --git a/js/src/jit-test/tests/warp/map-has-symbol.js b/js/src/jit-test/tests/warp/map-has-symbol.js new file mode 100644 index 0000000000..8dc8e96781 --- /dev/null +++ b/js/src/jit-test/tests/warp/map-has-symbol.js @@ -0,0 +1,75 @@ +// Similar test as "cacheir/map-has-symbol.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function test_same_map(n) { + var xs = [Symbol(), Symbol()]; + var ys = [Symbol(), Symbol()]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(test_same_map); + +// Duplicate the above tests, but this time use a different map. + +function test_different_map(n) { + var xs = [Symbol(), Symbol()]; + var ys = [Symbol(), Symbol()]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(test_different_map); + +// Test the alias information is correct. + +function test_alias(n) { + var xs = [Symbol(), Symbol()]; + var map = createMap([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + map.set(x, x); + if (map.has(x)) c++; + + map.delete(x); + if (map.has(x)) c++; + } + assertEq(c, N); +} +runTest(test_alias); diff --git a/js/src/jit-test/tests/warp/map-has-value.js b/js/src/jit-test/tests/warp/map-has-value.js new file mode 100644 index 0000000000..b203b762e4 --- /dev/null +++ b/js/src/jit-test/tests/warp/map-has-value.js @@ -0,0 +1,97 @@ +// Similar test as "cacheir/map-has-value.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new map, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createMap(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Map(xs.map((x, i) => [x, i])); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testPolymorphic_same_map(n) { + var xs = [10, 10.5, "test", Symbol("?"), 123n, -123n, {}, []]; + var ys = [-0, NaN, "bad", Symbol("!"), 42n, -99n, {}, []]; + var zs = [...xs, ...ys]; + var map = createMap(xs, n); + + var N = 128; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 15]; + if (map.has(z)) c++; + if (map.has(z)) c++; + } + assertEq(c, N); +} +runTest(testPolymorphic_same_map); + +// Duplicate the above tests, but this time use a different map. + +function testPolymorphic_different_map(n) { + var xs = [10, 10.5, "test", Symbol("?"), 123n, -123n, {}, []]; + var ys = [-0, NaN, "bad", Symbol("!"), 42n, -99n, {}, []]; + var zs = [...xs, ...ys]; + var map1 = createMap(xs, n); + var map2 = createMap(xs, n); + + var N = 128; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 15]; + if (map1.has(z)) c++; + if (map2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testPolymorphic_different_map); + +// Test the alias information is correct. + +function testPolymorphic_alias(n) { + var xs = [10, 10.5, "test", Symbol("?"), 123n, -123n, {}, []]; + var map = createMap([], n); + + var N = 128; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 15]; + + map.set(x, x); + if (map.has(x)) c++; + + map.delete(x); + if (map.has(x)) c++; + } + assertEq(c, N); +} +runTest(testPolymorphic_alias); + +// And finally test that we don't actually support GVN for values, because the +// hash changes when moving a value which holds an object. + +function testRekey() { + var map = new Map(); + var c = 0; + var N = 100; + for (var i = 0; i < N; ++i) { + var k = (i & 1) ? {} : null; + map.set(k, 1); + + if (map.has(k)) c++; + + minorgc(); + + if (map.has(k)) c++; + } + + assertEq(c, N * 2); +} +testRekey(); diff --git a/js/src/jit-test/tests/warp/math-indirect-truncate.js b/js/src/jit-test/tests/warp/math-indirect-truncate.js new file mode 100644 index 0000000000..9cc967ca33 --- /dev/null +++ b/js/src/jit-test/tests/warp/math-indirect-truncate.js @@ -0,0 +1,55 @@ +function testCeil() { + function ceil(a, b) { + return Math.ceil(a / b) | 0; + } + + // Warm-up + for (var i = 0; i < 50; i++) { + ceil(5, 5); + } + + assertEq(ceil(5, 3), 2); +} +testCeil(); + +function testFloor() { + function floor(a, b) { + return Math.floor(a / b) | 0; + } + + // Warm-up + for (var i = 0; i < 50; i++) { + floor(5, 5); + } + + assertEq(floor(-5, 3), -2); +} +testFloor(); + +function testRound() { + function round(a, b) { + return Math.round(a / b) | 0; + } + + // Warm-up + for (var i = 0; i < 50; i++) { + round(5, 5); + } + + assertEq(round(5, 3), 2); +} +testRound(); + +function testTrunc() { + function trunc(a, b) { + return Math.trunc(a / b) | 0; + } + + // Warm-up + for (var i = 0; i < 50; i++) { + trunc(5, 5); + } + + assertEq(trunc(5, 3), 1); +} +testTrunc(); diff --git a/js/src/jit-test/tests/warp/mega-morphic-load-and-has-prop.js b/js/src/jit-test/tests/warp/mega-morphic-load-and-has-prop.js new file mode 100644 index 0000000000..0d77ceb316 --- /dev/null +++ b/js/src/jit-test/tests/warp/mega-morphic-load-and-has-prop.js @@ -0,0 +1,99 @@ +function testMegamorphicLoadSlot(i) { + var xs = [ + {p: 0}, + {a: 0, p: 1}, + {a: 0, b: 0, p: 2}, + {a: 0, b: 0, c: 0, p: 3}, + {a: 0, b: 0, c: 0, d: 0, p: 4}, + {a: 0, b: 0, c: 0, d: 0, e: 0, p: 5}, + {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, p: 6}, + {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, g: 0, p: 7}, + {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, g: 0, h: 0, p: 8}, + {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, g: 0, h: 0, i: 0, p: 9}, + ]; + var called = 0; + var obj = { + get p() { + called++; + } + }; + + for (var j = 0; j <= 100; ++j) { + // Don't use if-statements to avoid cold code bailouts. + var x = xs[j % 10]; + var y = [x, obj][(i === 1 && j === 100)|0]; + + // Can't DCE this instruction. + y.p; + } + + assertEq(i === 0 || called === 1, true); +} +for (var i = 0; i < 2; ++i) testMegamorphicLoadSlot(i); + +function testMegamorphicLoadSlotByValue(i) { + var xs = [ + {p: 0}, + {a: 0, p: 1}, + {a: 0, b: 0, p: 2}, + {a: 0, b: 0, c: 0, p: 3}, + {a: 0, b: 0, c: 0, d: 0, p: 4}, + {a: 0, b: 0, c: 0, d: 0, e: 0, p: 5}, + {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, p: 6}, + {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, g: 0, p: 7}, + {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, g: 0, h: 0, p: 8}, + {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, g: 0, h: 0, i: 0, p: 9}, + ]; + var called = 0; + var obj = { + get p() { + called++; + } + }; + + var p = "p"; + for (var j = 0; j <= 100; ++j) { + // Don't use if-statements to avoid cold code bailouts. + var x = xs[j % 10]; + var y = [x, obj][(i === 1 && j === 100)|0]; + + // Can't DCE this instruction. + y[p]; + } + + assertEq(i === 0 || called === 1, true); +} +for (var i = 0; i < 2; ++i) testMegamorphicLoadSlotByValue(i); + +function testMegamorphicHasProp(i) { + var xs = [ + {p: 0}, + {a: 0, p: 1}, + {a: 0, b: 0, p: 2}, + {a: 0, b: 0, c: 0, p: 3}, + {a: 0, b: 0, c: 0, d: 0, p: 4}, + {a: 0, b: 0, c: 0, d: 0, e: 0, p: 5}, + {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, p: 6}, + {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, g: 0, p: 7}, + {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, g: 0, h: 0, p: 8}, + {a: 0, b: 0, c: 0, d: 0, e: 0, f: 0, g: 0, h: 0, i: 0, p: 9}, + ]; + var called = 0; + var obj = new Proxy({}, { + has() { + called++; + } + }); + + for (var j = 0; j <= 100; ++j) { + // Don't use if-statements to avoid cold code bailouts. + var x = xs[j % 10]; + var y = [x, obj][(i === 1 && j === 100)|0]; + + // Can't DCE this instruction. + "p" in y; + } + + assertEq(i === 0 || called === 1, true); +} +for (var i = 0; i < 2; ++i) testMegamorphicHasProp(i); diff --git a/js/src/jit-test/tests/warp/min-max-foldsTo-1.js b/js/src/jit-test/tests/warp/min-max-foldsTo-1.js new file mode 100644 index 0000000000..accc6ea416 --- /dev/null +++ b/js/src/jit-test/tests/warp/min-max-foldsTo-1.js @@ -0,0 +1,47 @@ +with ({}); // Don't inline anything into the top-level script. + +function args() { return arguments; } + +for (let xs of [ + // Array + [[], [1, 2, 3]], + + // String + ["", "asdf"], + + // ArrayBufferView + [new Int32Array(0), new Int32Array(10)], + + // Arguments + [args(), args(1, 2, 3)], +]) { + for (let cst of [0, -1]) { + // Fold `Math.min(length ≥ 0, constant ≤ 0)` to `constant`. + let min = Function("x", `return Math.min(x.length, ${cst})`); + for (let i = 0; i < 100; ++i) { + let x = xs[i & 1]; + assertEq(min(x), cst); + } + + // Reverse operands. + min = Function("x", `return Math.min(${cst}, x.length)`); + for (let i = 0; i < 100; ++i) { + let x = xs[i & 1]; + assertEq(min(x), cst); + } + + // Fold `Math.max(length ≥ 0, constant ≤ 0)` to `length`. + let max = Function("x", `return Math.max(x.length, ${cst})`); + for (let i = 0; i < 100; ++i) { + let x = xs[i & 1]; + assertEq(max(x), x.length); + } + + // Reverse operands. + max = Function("x", `return Math.max(${cst}, x.length)`); + for (let i = 0; i < 100; ++i) { + let x = xs[i & 1]; + assertEq(max(x), x.length); + } + } +} diff --git a/js/src/jit-test/tests/warp/min-max-foldsTo-2.js b/js/src/jit-test/tests/warp/min-max-foldsTo-2.js new file mode 100644 index 0000000000..f848ba824c --- /dev/null +++ b/js/src/jit-test/tests/warp/min-max-foldsTo-2.js @@ -0,0 +1,153 @@ +with ({}); // Don't inline anything into the top-level script. + +// Fold min(x, min(y, z)) to min(min(x, y), z) with constant min(x, y). +for (let x of [-Infinity, -10, 0, 10, Infinity, NaN]) { + for (let y of [-Infinity, -10, 0, 10, Infinity, NaN]) { + for (let z of [-Infinity, -10, 0, 10, Infinity, NaN]) { + let fn = Function("z", `return Math.min(${x}, Math.min(${y}, z))`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.min(x, Math.min(y, z))); + assertEq(r, Math.min(Math.min(x, y), z)); + } + + // Reverse operands. + fn = Function("z", `return Math.min(${x}, Math.min(z, ${y}))`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.min(x, Math.min(z, y))); + assertEq(r, Math.min(Math.min(x, y), z)); + } + + // Reverse operands. + fn = Function("z", `return Math.min(Math.min(${y}, z), ${x})`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.min(Math.min(y, z), x)); + assertEq(r, Math.min(Math.min(x, y), z)); + } + + // Reverse operands. + fn = Function("z", `return Math.min(Math.min(z, ${y}), ${x})`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.min(Math.min(z, y), x)); + assertEq(r, Math.min(Math.min(x, y), z)); + } + } + } +} + +// Fold max(x, max(y, z)) to max(max(x, y), z) with constant max(x, y). +for (let x of [-Infinity, -10, 0, 10, Infinity, NaN]) { + for (let y of [-Infinity, -10, 0, 10, Infinity, NaN]) { + for (let z of [-Infinity, -10, 0, 10, Infinity, NaN]) { + let fn = Function("z", `return Math.max(${x}, Math.max(${y}, z))`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.max(x, Math.max(y, z))); + assertEq(r, Math.max(Math.max(x, y), z)); + } + + // Reverse operands. + fn = Function("z", `return Math.max(${x}, Math.max(z, ${y}))`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.max(x, Math.max(z, y))); + assertEq(r, Math.max(Math.max(x, y), z)); + } + + // Reverse operands. + fn = Function("z", `return Math.max(Math.max(${y}, z), ${x})`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.max(Math.max(y, z), x)); + assertEq(r, Math.max(Math.max(x, y), z)); + } + + // Reverse operands. + fn = Function("z", `return Math.max(Math.max(z, ${y}), ${x})`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.max(Math.max(z, y), x)); + assertEq(r, Math.max(Math.max(x, y), z)); + } + } + } +} + +// Fold min(x, max(y, z)) to max(min(x, y), min(x, z)). +for (let x of [-Infinity, -10, 0, 10, Infinity, NaN]) { + for (let y of [-Infinity, -10, 0, 10, Infinity, NaN]) { + for (let z of ["", "asdf", [], [1,2,3], new Int32Array(0), new Int32Array(10)]) { + let fn = Function("z", `return Math.min(${x}, Math.max(${y}, z.length))`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.min(x, Math.max(y, z.length))); + assertEq(r, Math.max(Math.min(x, y), Math.min(x, z.length))); + } + + // Reverse operands. + fn = Function("z", `return Math.min(${x}, Math.max(z.length, ${y}))`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.min(x, Math.max(z.length, y))); + assertEq(r, Math.max(Math.min(x, y), Math.min(x, z.length))); + } + + // Reverse operands. + fn = Function("z", `return Math.min(Math.max(${y}, z.length), ${x})`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.min(Math.max(y, z.length), x)); + assertEq(r, Math.max(Math.min(x, y), Math.min(x, z.length))); + } + + // Reverse operands. + fn = Function("z", `return Math.min(Math.max(z.length, ${y}), ${x})`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.min(Math.max(z.length, y), x)); + assertEq(r, Math.max(Math.min(x, y), Math.min(x, z.length))); + } + } + } +} + +// Fold max(x, min(y, z)) to min(max(x, y), max(x, z)). +for (let x of [-Infinity, -10, 0, 10, Infinity, NaN]) { + for (let y of [-Infinity, -10, 0, 10, Infinity, NaN]) { + for (let z of ["", "asdf", [], [1,2,3], new Int32Array(0), new Int32Array(10)]) { + let fn = Function("z", `return Math.max(${x}, Math.min(${y}, z.length))`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.max(x, Math.min(y, z.length))); + assertEq(r, Math.min(Math.max(x, y), Math.max(x, z.length))); + } + + // Reverse operands. + fn = Function("z", `return Math.max(${x}, Math.min(z.length, ${y}))`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.max(x, Math.min(z.length, y))); + assertEq(r, Math.min(Math.max(x, y), Math.max(x, z.length))); + } + + // Reverse operands. + fn = Function("z", `return Math.max(Math.min(${y}, z.length), ${x})`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.max(Math.min(y, z.length), x)); + assertEq(r, Math.min(Math.max(x, y), Math.max(x, z.length))); + } + + // Reverse operands. + fn = Function("z", `return Math.max(Math.min(z.length, ${y}), ${x})`); + for (let i = 0; i < 100; ++i) { + let r = fn(z); + assertEq(r, Math.max(Math.min(z.length, y), x)); + assertEq(r, Math.min(Math.max(x, y), Math.max(x, z.length))); + } + } + } +} diff --git a/js/src/jit-test/tests/warp/min-max-foldsTo-3.js b/js/src/jit-test/tests/warp/min-max-foldsTo-3.js new file mode 100644 index 0000000000..dd52ef2ffb --- /dev/null +++ b/js/src/jit-test/tests/warp/min-max-foldsTo-3.js @@ -0,0 +1,177 @@ +with ({}); // Don't inline anything into the top-level script. + +const numbers = [ + -Infinity, -10, -5, -2, -1, -0.5, 0, 0.5, 1, 2, 5, 10, Infinity, NaN, +]; + +// Test all supported types (Int32, Float32, Float64). +const converters = [ + x => `${x}`, + x => `(${x}|0)`, + x => `Math.fround(${x})`, + x => `numberToDouble(${x})`, +]; + +// Fold min(x, min(x, y)) to min(x, y). +for (let cvt of converters) { + let x = cvt("x"); + let y = cvt("y"); + let c = Function("a", `return ${cvt("a")}`); + + let min1 = Function("x, y", `return Math.min(${x}, Math.min(${x}, ${y}))`); + let min2 = Function("x, y", `return Math.min(${y}, Math.min(${x}, ${y}))`); + let min3 = Function("x, y", `return Math.min(Math.min(${x}, ${y}), ${x})`); + let min4 = Function("x, y", `return Math.min(Math.min(${x}, ${y}), ${y})`); + + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < numbers.length; ++j) { + for (let k = 0; k < numbers.length; ++k) { + let x = numbers[j]; + let y = numbers[k] + let r1 = min1(x, y); + let r2 = min2(x, y); + let r3 = min3(x, y); + let r4 = min4(x, y); + + // Convert to the correct type before computing the expected results. + x = c(x); + y = c(y); + + assertEq(r1, Math.min(x, Math.min(x, y))); + assertEq(r1, Math.min(x, y)); + + assertEq(r2, Math.min(y, Math.min(x, y))); + assertEq(r2, Math.min(x, y)); + + assertEq(r3, Math.min(Math.min(x, y), x)); + assertEq(r3, Math.min(x, y)); + + assertEq(r4, Math.min(Math.min(x, y), y)); + assertEq(r4, Math.min(x, y)); + } + } + } +} + +// Fold max(x, max(x, y)) to max(x, y). +for (let cvt of converters) { + let x = cvt("x"); + let y = cvt("y"); + let c = Function("a", `return ${cvt("a")}`); + + let max1 = Function("x, y", `return Math.max(${x}, Math.max(${x}, ${y}))`); + let max2 = Function("x, y", `return Math.max(${y}, Math.max(${x}, ${y}))`); + let max3 = Function("x, y", `return Math.max(Math.max(${x}, ${y}), ${x})`); + let max4 = Function("x, y", `return Math.max(Math.max(${x}, ${y}), ${y})`); + + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < numbers.length; ++j) { + for (let k = 0; k < numbers.length; ++k) { + let x = numbers[j]; + let y = numbers[k] + let r1 = max1(x, y); + let r2 = max2(x, y); + let r3 = max3(x, y); + let r4 = max4(x, y); + + // Convert to the correct type before computing the expected results. + x = c(x); + y = c(y); + + assertEq(r1, Math.max(x, Math.max(x, y))); + assertEq(r1, Math.max(x, y)); + + assertEq(r2, Math.max(y, Math.max(x, y))); + assertEq(r2, Math.max(x, y)); + + assertEq(r3, Math.max(Math.max(x, y), x)); + assertEq(r3, Math.max(x, y)); + + assertEq(r4, Math.max(Math.max(x, y), y)); + assertEq(r4, Math.max(x, y)); + } + } + } +} + +// Fold max(x, min(x, y)) = x. +for (let cvt of converters) { + let x = cvt("x"); + let y = cvt("y"); + let c = Function("a", `return ${cvt("a")}`); + + let maxmin1 = Function("x, y", `return Math.max(${x}, Math.min(${x}, ${y}))`); + let maxmin2 = Function("x, y", `return Math.max(${y}, Math.min(${x}, ${y}))`); + let maxmin3 = Function("x, y", `return Math.max(Math.min(${x}, ${y}), ${x})`); + let maxmin4 = Function("x, y", `return Math.max(Math.min(${x}, ${y}), ${y})`); + + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < numbers.length; ++j) { + for (let k = 0; k < numbers.length; ++k) { + let x = numbers[j]; + let y = numbers[k] + let r1 = maxmin1(x, y); + let r2 = maxmin2(x, y); + let r3 = maxmin3(x, y); + let r4 = maxmin4(x, y); + + // Convert to the correct type before computing the expected results. + x = c(x); + y = c(y); + + assertEq(r1, Math.max(x, Math.min(x, y))); + assertEq(r1, Number.isNaN(y) ? NaN : x); + + assertEq(r2, Math.max(y, Math.min(x, y))); + assertEq(r2, Number.isNaN(x) ? NaN : y); + + assertEq(r3, Math.max(Math.min(x, y), x)); + assertEq(r3, Number.isNaN(y) ? NaN : x); + + assertEq(r4, Math.max(Math.min(x, y), y)); + assertEq(r4, Number.isNaN(x) ? NaN : y); + } + } + } +} + +// Fold min(x, max(x, y)) = x. +for (let cvt of converters) { + let x = cvt("x"); + let y = cvt("y"); + let c = Function("a", `return ${cvt("a")}`); + + let minmax1 = Function("x, y", `return Math.min(${x}, Math.max(${x}, ${y}))`); + let minmax2 = Function("x, y", `return Math.min(${y}, Math.max(${x}, ${y}))`); + let minmax3 = Function("x, y", `return Math.min(Math.max(${x}, ${y}), ${x})`); + let minmax4 = Function("x, y", `return Math.min(Math.max(${x}, ${y}), ${y})`); + + for (let i = 0; i < 20; ++i) { + for (let j = 0; j < numbers.length; ++j) { + for (let k = 0; k < numbers.length; ++k) { + let x = numbers[j]; + let y = numbers[k] + let r1 = minmax1(x, y); + let r2 = minmax2(x, y); + let r3 = minmax3(x, y); + let r4 = minmax4(x, y); + + // Convert to the correct type before computing the expected results. + x = c(x); + y = c(y); + + assertEq(r1, Math.min(x, Math.max(x, y))); + assertEq(r1, Number.isNaN(y) ? NaN : x); + + assertEq(r2, Math.min(y, Math.max(x, y))); + assertEq(r2, Number.isNaN(x) ? NaN : y); + + assertEq(r3, Math.min(Math.max(x, y), x)); + assertEq(r3, Number.isNaN(y) ? NaN : x); + + assertEq(r4, Math.min(Math.max(x, y), y)); + assertEq(r4, Number.isNaN(x) ? NaN : y); + } + } + } +} diff --git a/js/src/jit-test/tests/warp/min-max-foldsTo-4.js b/js/src/jit-test/tests/warp/min-max-foldsTo-4.js new file mode 100644 index 0000000000..aa7e09ba22 --- /dev/null +++ b/js/src/jit-test/tests/warp/min-max-foldsTo-4.js @@ -0,0 +1,11 @@ +with ({}); // Don't inline anything into the top-level script. + +function f(x) { + return Math.min(Math.max(x / x, x), x); +} + +for (var i = 0; i < 100; ++i) { + f(1); +} + +assertEq(f(0), NaN); diff --git a/js/src/jit-test/tests/warp/non-int32-array-length.js b/js/src/jit-test/tests/warp/non-int32-array-length.js new file mode 100644 index 0000000000..4213f1991c --- /dev/null +++ b/js/src/jit-test/tests/warp/non-int32-array-length.js @@ -0,0 +1,10 @@ +function f(arr, len) { + for (var i = 0; i < 2000; i++) { + assertEq(arr.length, len); + } +} +var arr = [0]; +f(arr, 1); + +arr.length = 0xffff_ffff; +f(arr, 0xffff_ffff); diff --git a/js/src/jit-test/tests/warp/null-not-zero-index.js b/js/src/jit-test/tests/warp/null-not-zero-index.js new file mode 100644 index 0000000000..b55b743b95 --- /dev/null +++ b/js/src/jit-test/tests/warp/null-not-zero-index.js @@ -0,0 +1,17 @@ +// |jit-test| --no-threads + +function f(index) { + var a = [123]; + return a[index] +} + +function g() { + for (var i = 0; i < 100; i++) { + // Make sure |null| is not treated like a |0| index. + assertEq(f(i > 90 ? null : 0), i > 90 ? undefined : 123) + } +} + +for (var j = 0; j < 10; j++) { + g(); +} diff --git a/js/src/jit-test/tests/warp/number-tostring-with-base-uppercase.js b/js/src/jit-test/tests/warp/number-tostring-with-base-uppercase.js new file mode 100644 index 0000000000..4dd6b182a8 --- /dev/null +++ b/js/src/jit-test/tests/warp/number-tostring-with-base-uppercase.js @@ -0,0 +1,92 @@ +// Copy of "warp/number-tostring-with-base.js" with `toUpperCase()` conversion +// after `Number.prototype.toString(base)`. + +function testConstantBaseFastPathTemplate(xs) { + assertEq(xs.length, $BASE * $BASE); + for (let j = 0; j < 200;) { + // The fast path can be used for all integers below |base * base|. + for (let i = 0; i < $BASE * $BASE; ++i, ++j) { + assertEq(i.toString($BASE).toUpperCase(), xs[i]); + } + } +} + +// Test when Number.prototype.toString is called with a constant base argument +// and the fast path for static strings can be used. +for (let base = 2; base <= 36; ++base) { + let fn = Function(`return ${testConstantBaseFastPathTemplate}`.replaceAll("$BASE", base))(); + let xs = Array.from({length: base * base}, (_, i) => i.toString(base).toUpperCase()); + for (let i = 0; i < 2; ++i) { + fn(xs); + } +} + +function testConstantBaseTemplate(xs) { + assertEq(xs.length, $BASE * $BASE * 2); + for (let j = 0; j < 200;) { + // The fast path can only be used for integers below |base * base|. + for (let i = 0; i < $BASE * $BASE * 2; ++i, ++j) { + assertEq(i.toString($BASE).toUpperCase(), xs[i]); + } + } +} + +// Test when Number.prototype.toString is called with a constant base argument +// and the fast path for static strings can't always be used. +for (let base = 2; base <= 36; ++base) { + let fn = Function(`return ${testConstantBaseTemplate}`.replaceAll("$BASE", base))(); + let xs = Array.from({length: base * base * 2}, (_, i) => i.toString(base).toUpperCase()); + for (let i = 0; i < 2; ++i) { + fn(xs); + } +} + +function testVariableBaseFastPathTemplate(xs, ys) { + assertEq(ys.length, 2); + assertEq(ys[0], ys[1]); + let base = ys[0]; + + assertEq(xs.length, base * base); + + for (let j = 0; j < 200;) { + // The fast path can be used for all integers below |base * base|. + for (let i = 0; i < base * base; ++i, ++j) { + assertEq(i.toString(ys[i & 1]).toUpperCase(), xs[i]); + } + } +} + +// Test when Number.prototype.toString is called with a non-constant base argument +// and the fast path for static strings can be used. +for (let base = 2; base <= 36; ++base) { + let fn = Function(`return ${testVariableBaseFastPathTemplate}`)(); + let xs = Array.from({length: base * base}, (_, i) => i.toString(base).toUpperCase()); + for (let i = 0; i < 2; ++i) { + fn(xs, [base, base]); + } +} + +function testVariableBaseTemplate(xs, ys) { + assertEq(ys.length, 2); + assertEq(ys[0], ys[1]); + let base = ys[0]; + + assertEq(xs.length, base * base * 2); + + for (let j = 0; j < 200;) { + // The fast path can only be used for integers below |base * base|. + for (let i = 0; i < base * base * 2; ++i, ++j) { + assertEq(i.toString(ys[i & 1]).toUpperCase(), xs[i]); + } + } +} + +// Test when Number.prototype.toString is called with a non-constant base argument +// and the fast path for static strings can't always be used. +for (let base = 2; base <= 36; ++base) { + let fn = Function(`return ${testVariableBaseTemplate}`)(); + let xs = Array.from({length: base * base * 2}, (_, i) => i.toString(base).toUpperCase()); + for (let i = 0; i < 2; ++i) { + fn(xs, [base, base]); + } +} diff --git a/js/src/jit-test/tests/warp/number-tostring-with-base.js b/js/src/jit-test/tests/warp/number-tostring-with-base.js new file mode 100644 index 0000000000..47842bec3f --- /dev/null +++ b/js/src/jit-test/tests/warp/number-tostring-with-base.js @@ -0,0 +1,89 @@ +function testConstantBaseFastPathTemplate(xs) { + assertEq(xs.length, $BASE * $BASE); + for (let j = 0; j < 200;) { + // The fast path can be used for all integers below |base * base|. + for (let i = 0; i < $BASE * $BASE; ++i, ++j) { + assertEq(i.toString($BASE), xs[i]); + } + } +} + +// Test when Number.prototype.toString is called with a constant base argument +// and the fast path for static strings can be used. +for (let base = 2; base <= 36; ++base) { + let fn = Function(`return ${testConstantBaseFastPathTemplate}`.replaceAll("$BASE", base))(); + let xs = Array.from({length: base * base}, (_, i) => i.toString(base)); + for (let i = 0; i < 2; ++i) { + fn(xs); + } +} + +function testConstantBaseTemplate(xs) { + assertEq(xs.length, $BASE * $BASE * 2); + for (let j = 0; j < 200;) { + // The fast path can only be used for integers below |base * base|. + for (let i = 0; i < $BASE * $BASE * 2; ++i, ++j) { + assertEq(i.toString($BASE), xs[i]); + } + } +} + +// Test when Number.prototype.toString is called with a constant base argument +// and the fast path for static strings can't always be used. +for (let base = 2; base <= 36; ++base) { + let fn = Function(`return ${testConstantBaseTemplate}`.replaceAll("$BASE", base))(); + let xs = Array.from({length: base * base * 2}, (_, i) => i.toString(base)); + for (let i = 0; i < 2; ++i) { + fn(xs); + } +} + +function testVariableBaseFastPathTemplate(xs, ys) { + assertEq(ys.length, 2); + assertEq(ys[0], ys[1]); + let base = ys[0]; + + assertEq(xs.length, base * base); + + for (let j = 0; j < 200;) { + // The fast path can be used for all integers below |base * base|. + for (let i = 0; i < base * base; ++i, ++j) { + assertEq(i.toString(ys[i & 1]), xs[i]); + } + } +} + +// Test when Number.prototype.toString is called with a non-constant base argument +// and the fast path for static strings can be used. +for (let base = 2; base <= 36; ++base) { + let fn = Function(`return ${testVariableBaseFastPathTemplate}`)(); + let xs = Array.from({length: base * base}, (_, i) => i.toString(base)); + for (let i = 0; i < 2; ++i) { + fn(xs, [base, base]); + } +} + +function testVariableBaseTemplate(xs, ys) { + assertEq(ys.length, 2); + assertEq(ys[0], ys[1]); + let base = ys[0]; + + assertEq(xs.length, base * base * 2); + + for (let j = 0; j < 200;) { + // The fast path can only be used for integers below |base * base|. + for (let i = 0; i < base * base * 2; ++i, ++j) { + assertEq(i.toString(ys[i & 1]), xs[i]); + } + } +} + +// Test when Number.prototype.toString is called with a non-constant base argument +// and the fast path for static strings can't always be used. +for (let base = 2; base <= 36; ++base) { + let fn = Function(`return ${testVariableBaseTemplate}`)(); + let xs = Array.from({length: base * base * 2}, (_, i) => i.toString(base)); + for (let i = 0; i < 2; ++i) { + fn(xs, [base, base]); + } +} diff --git a/js/src/jit-test/tests/warp/object-class-tostring.js b/js/src/jit-test/tests/warp/object-class-tostring.js new file mode 100644 index 0000000000..d26a2d95a5 --- /dev/null +++ b/js/src/jit-test/tests/warp/object-class-tostring.js @@ -0,0 +1,65 @@ +function testCongruent(i) { + var p = {}; + var o = { + // Add toString as an own property, so it'll be always found on this object, + // even when properties are changed on the prototype. + toString: Object.prototype.toString, + + // Add a custom prototype, so we can add @@toStringTag without modifying the + // shape of this object. + __proto__: p, + }; + var xs = [{}, p]; + var ys = ["[object Object]", "[object Test]"]; + + for (var j = 0; j <= 100; ++j) { + // Don't use if-statements to avoid cold code bailouts + var x = xs[(i === 1 && j === 100)|0]; + var y = ys[(i === 1 && j === 100)|0]; + + // |o.toString()| must be executed twice, because |x[Symbol.toStringTag]| may + // have modified |o|. + var r = o.toString(); + x[Symbol.toStringTag] = "Test"; + var e = o.toString(); + + assertEq(r, "[object Object]"); + assertEq(e, y); + } +} +for (var i = 0; i < 2; ++i) testCongruent(i); + +function testUnobserved(i) { + var p = {}; + var o = { + // Add toString as an own property, so it'll be always found on this object, + // even when properties are changed on the prototype. + toString: Object.prototype.toString, + + // Add a custom prototype, so we can add @@toStringTag without modifying the + // shape of this object. + __proto__: p, + }; + var xs = [{}, p]; + var ys = [false, true]; + + for (var j = 0; j <= 100; ++j) { + // Don't use if-statements to avoid cold code bailouts + var x = xs[(i === 1 && j === 100)|0]; + var y = ys[(i === 1 && j === 100)|0]; + + var executed = false; + Object.defineProperty(x, Symbol.toStringTag, { + configurable: true, + get() { + executed = true; + } + }); + + // |o.toString()| must be executed even when the result isn't observed. + o.toString(); + + assertEq(executed, y); + } +} +for (var i = 0; i < 2; ++i) testUnobserved(i); diff --git a/js/src/jit-test/tests/warp/phi-specialization.js b/js/src/jit-test/tests/warp/phi-specialization.js new file mode 100644 index 0000000000..a466a9eb9b --- /dev/null +++ b/js/src/jit-test/tests/warp/phi-specialization.js @@ -0,0 +1,42 @@ +// |jit-test| --fast-warmup + +var sum = 0; + +function foo(copy, shouldThrow) { + switch (copy) { + case 0: + var x = 0; + try { + if (shouldThrow) { throw 0;} + x = 1; + } catch { + x = "a"; + } + // We create a specialized phi for x here, which bails out. + for (var i = 0; i < 100; i++) { + sum += x; + } + break; + case 1: + var y = 0; + try { + if (shouldThrow) { throw 0;} + y = 1; + } catch { + y = "a"; + } + // We do not create a specialized phi the second time. + for (var i = 0; i < 100; i++) { + sum += y; + } + break; + } +} + +with ({}) {} +for (var i = 0; i < 2; i++) { + for (var j = 0; j < 50; j++) { + foo(i, false); + } + foo(i, true); +} diff --git a/js/src/jit-test/tests/warp/polymorphic-to-bool.js b/js/src/jit-test/tests/warp/polymorphic-to-bool.js new file mode 100644 index 0000000000..adbfe2d791 --- /dev/null +++ b/js/src/jit-test/tests/warp/polymorphic-to-bool.js @@ -0,0 +1,39 @@ +// |jit-test| --fast-warmup; --no-threads + +function runTest(src, seen, last) { + with ({}) {} + + // Make a fresh script. + var foo = eval(src); + + // Compile it with polymorphic types. + for (var j = 0; j < 100; j++) { + foo(seen[j % seen.length]); + } + + // Now test the type sorted last. + assertEq(foo(last), false); +} + +function runTests(src) { + // Each of these |seen| sets will cause the |last| type to be + // the last type tested in testValueTruthyKernel. + runTest(src, [1n, Symbol("a"), 1.5, "", {} ], 1); + runTest(src, [1n, Symbol("a"), 1.5, "", true ], {}); + runTest(src, [1n, Symbol("a"), 1.5, true, {} ], "a"); + runTest(src, [1n, Symbol("a"), true, "", {} ], 1.5); + runTest(src, [1n, true, 1.5, "", {} ], Symbol("a")); + runTest(src, [true, Symbol("a"), 1.5, "", {} ], 1n); +} + +// JumpIfFalse +runTests("(x) => { if (x) { return false; }}"); + +// And +runTests("(x) => x && false"); + +// Or +runTests("(x) => !(x || true)"); + +// Not +runTests("(x) => !x"); diff --git a/js/src/jit-test/tests/warp/property-add-shape.js b/js/src/jit-test/tests/warp/property-add-shape.js new file mode 100644 index 0000000000..88348200bf --- /dev/null +++ b/js/src/jit-test/tests/warp/property-add-shape.js @@ -0,0 +1,98 @@ +function simple() { + var o = {a: 1}; + o.b = 2; + + assertEq(o.a, 1); + assertEq(o.b, 2); +} + +function condition1(b) { + var o = {a: 1}; + + if (b) { + o.b = 2; + } + + o.c = 3; + + assertEq(o.a, 1); + if (b) { + assertEq(o.b, 2); + } else { + assertEq('b' in o, false); + } + assertEq(o.c, 3); +} + +function condition2(b) { + var o = {a: 1}; + + if (b) { + o.b = 2; + } else { + o.b = 3; + } + + o.c = 3; + + assertEq(o.a, 1); + assertEq(o.b, b ? 2 : 3); + assertEq(o.c, 3); +} + +function condition3(b) { + var o = {a: 1}; + + if (b) { + o.b = 2; + } else { + o.b = 2; + } + + o.c = 3; + + assertEq(o.a, 1); + assertEq(o.b, 2); + assertEq(o.c, 3); +} + +function condition4(b) { + var o = {a: 1}; + + o.bla = 2; + o.bla2 = 2; + o.bla3 = 2; + o.bla4 = 2; + + if (b) { + o.b = 2; + } else { + o.c = 2; + } + + o.d = 3; + + assertEq(o.a, 1); + if (b) { + assertEq(o.b, 2); + assertEq('c' in o, false); + } else { + assertEq('b' in o, false); + assertEq(o.c, 2); + } + assertEq(o.d, 3); +} + +function f() { + for (var i = 0; i < 10; i++) { + simple(); + condition1(i % 2 == 0) + condition2(i % 2 == 0) + condition3(i % 2 == 0) + condition4(i % 2 == 0) + } +} + +for (var i = 0; i < 10; i++) { + f(); +} diff --git a/js/src/jit-test/tests/warp/rest-elements.js b/js/src/jit-test/tests/warp/rest-elements.js new file mode 100644 index 0000000000..28525ad215 --- /dev/null +++ b/js/src/jit-test/tests/warp/rest-elements.js @@ -0,0 +1,40 @@ +// |jit-test| --ion-inlining=off; --fast-warmup +function calleeWithFormals(a, b, ...arr) { + assertEq(b, 2); + if (arr.length > 0) { + assertEq(arr[0], 3); + } + if (arr.length > 1) { + assertEq(arr[1], Math); + } + if (arr.length > 2) { + assertEq(arr[2], "foo"); + } + return arr; +} +function calleeWithoutFormals(...arr) { + if (arr.length > 0) { + assertEq(arr[0], 3); + } + if (arr.length > 1) { + assertEq(arr[1], Math); + } + if (arr.length > 2) { + assertEq(arr[2], "foo"); + } + return arr; +} +function f() { + for (var i = 0; i < 100; i++) { + assertEq(calleeWithFormals(1, 2).length, 0); + assertEq(calleeWithFormals(1, 2, 3).length, 1); + assertEq(calleeWithFormals(1, 2, 3, Math).length, 2); + assertEq(calleeWithFormals(1, 2, 3, Math, "foo").length, 3); + + assertEq(calleeWithoutFormals().length, 0); + assertEq(calleeWithoutFormals(3).length, 1); + assertEq(calleeWithoutFormals(3, Math).length, 2); + assertEq(calleeWithoutFormals(3, Math, "foo").length, 3); + } +} +f(); diff --git a/js/src/jit-test/tests/warp/scalar-replace-array-apply-array-01.js b/js/src/jit-test/tests/warp/scalar-replace-array-apply-array-01.js new file mode 100644 index 0000000000..0f88843615 --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-array-apply-array-01.js @@ -0,0 +1,21 @@ +function escape(x) { with ({}) {} } + +function foo(...args) { + escape(args); + return bar.apply({}, args); +} + +// |foo| must be small enough to be inlinable. +assertEq(isSmallFunction(foo), true); + +function bar(x, y) { + return x + y; +} + +with ({}) {} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1, 2); +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/warp/scalar-replace-array-apply-array-02.js b/js/src/jit-test/tests/warp/scalar-replace-array-apply-array-02.js new file mode 100644 index 0000000000..e0689189ba --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-array-apply-array-02.js @@ -0,0 +1,19 @@ +function foo(...args) { + args[0] = 3; + return bar.apply({}, args); +} + +// |foo| must be small enough to be inlinable. +assertEq(isSmallFunction(foo), true); + +function bar(x, y) { + return x + y; +} + +with ({}) {} + +var sum = 0; +for (var i = 0; i < 100; i++) { + sum += foo(1, 2); +} +assertEq(sum, 500); diff --git a/js/src/jit-test/tests/warp/scalar-replace-array-apply-array-03.js b/js/src/jit-test/tests/warp/scalar-replace-array-apply-array-03.js new file mode 100644 index 0000000000..54b88b1bdc --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-array-apply-array-03.js @@ -0,0 +1,23 @@ +function escape() { with ({}) {} } + +function foo(i) { + return i; +} + +function bar(n, ...args) { + escape(args); + return foo.apply({}, args); +} + +// |bar| must be small enough to be inlinable. +assertEq(isSmallFunction(bar), true); + +function baz(a, n) { + return bar(n, n); +} + +var sum = 0; +for (var i = 0; i < 10000; i++) { + sum += baz(0, 1); +} +assertEq(sum, 10000); diff --git a/js/src/jit-test/tests/warp/scalar-replace-array-apply-array-04.js b/js/src/jit-test/tests/warp/scalar-replace-array-apply-array-04.js new file mode 100644 index 0000000000..e83b9946a3 --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-array-apply-array-04.js @@ -0,0 +1,24 @@ +var result; + +function g(a, b) { + with ({}) {} + result = a + b; +} + +function escape() { with({}) {} } + +function f(...args) { + escape(args); + for (var i = 0; i < 50; ++i) { + g.apply(this, args); + } +} + +// |f| must be small enough to be inlinable. +assertEq(isSmallFunction(f), true); + +f(1, 2); +assertEq(result, 3); + +f(""); +assertEq(result, "undefined"); diff --git a/js/src/jit-test/tests/warp/scalar-replace-array-apply-array.js b/js/src/jit-test/tests/warp/scalar-replace-array-apply-array.js new file mode 100644 index 0000000000..7b8d12bd06 --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-array-apply-array.js @@ -0,0 +1,43 @@ +// |jit-test| --fast-warmup; --no-threads + +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("ion.warmup.trigger", 100); + +// Prevent GC from cancelling/discarding Ion compilations. +gczeal(0); + +// Create a fresh set of functions for each argument count to avoid type pollution. +function makeTest(count) { + var args = Array(count).fill(0).join(","); + + return Function(` + function g() { + return arguments.length; + } + + function f(...args) { + // When |f| is inlined into its caller, the number of arguments is fixed and + // we can scalar replace the inlined rest array. + assertRecoveredOnBailout(args, true); + return g(...args); + } + + // |f| must be small enough to be inlined into the test function. + assertEq(isSmallFunction(f), true); + + function test() { + for (let i = 0; i < 1000; ++i) { + assertEq(f(${args}), ${count}); + } + } + + return test; + `)(); +} + +// Limited by gc::CanUseFixedElementsForArray(), see also WarpBuilder::build_Rest(). +const maxRestArgs = 14; + +for (let i = 0; i <= maxRestArgs; ++i) { + makeTest(i)(); +} diff --git a/js/src/jit-test/tests/warp/scalar-replace-array-construct-array-01.js b/js/src/jit-test/tests/warp/scalar-replace-array-construct-array-01.js new file mode 100644 index 0000000000..a68a9dad0e --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-array-construct-array-01.js @@ -0,0 +1,28 @@ +setJitCompilerOption("inlining.bytecode-max-length", 200); + +function escape(x) { with ({}) {} } + +class Bar { + constructor(x, y) { + this.value = x + y; + } +} + +class Foo extends Bar { + constructor(...args) { + escape(args); + super(...args); + } +} + +// |Foo| must be small enough to be inlinable. +assertEq(isSmallFunction(Foo), true); + +with ({}) {} + +var sum = 0; +for (var i = 0; i < 100; i++) { + let obj = new Foo(1, 2); + sum += obj.value; +} +assertEq(sum, 300); diff --git a/js/src/jit-test/tests/warp/scalar-replace-array-construct-array-02.js b/js/src/jit-test/tests/warp/scalar-replace-array-construct-array-02.js new file mode 100644 index 0000000000..06d44779c1 --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-array-construct-array-02.js @@ -0,0 +1,26 @@ +setJitCompilerOption("inlining.bytecode-max-length", 200); + +class Bar { + constructor(x, y) { + this.value = x + y; + } +} + +class Foo extends Bar { + constructor(...args) { + args[0] = 3; + super(...args); + } +} + +// |Foo| must be small enough to be inlinable. +assertEq(isSmallFunction(Foo), true); + +with ({}) {} + +var sum = 0; +for (var i = 0; i < 100; i++) { + let obj = new Foo(1, 2); + sum += obj.value; +} +assertEq(sum, 500); diff --git a/js/src/jit-test/tests/warp/scalar-replace-array-construct-array-03.js b/js/src/jit-test/tests/warp/scalar-replace-array-construct-array-03.js new file mode 100644 index 0000000000..72807b9f46 --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-array-construct-array-03.js @@ -0,0 +1,32 @@ +setJitCompilerOption("inlining.bytecode-max-length", 200); + +function escape() { with ({}) {} } + +class Foo { + constructor(i) { + this.value = i; + } +} + +class Bar extends Foo { + constructor(n, ...args) { + escape(args); + super(...args); + } +} + +// |Bar| must be small enough to be inlinable. +assertEq(isSmallFunction(Bar), true); + +class Baz extends Bar { + constructor(a, n) { + super(n, n); + } +} + +var sum = 0; +for (var i = 0; i < 10000; i++) { + let obj = new Baz(0, 1); + sum += obj.value; +} +assertEq(sum, 10000); diff --git a/js/src/jit-test/tests/warp/scalar-replace-array-construct-array-04.js b/js/src/jit-test/tests/warp/scalar-replace-array-construct-array-04.js new file mode 100644 index 0000000000..290bbddcf7 --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-array-construct-array-04.js @@ -0,0 +1,26 @@ +setJitCompilerOption("inlining.bytecode-max-length", 200); + +var result; + +function g(a, b) { + with ({}) {} + result = a + b; +} + +function escape() { with({}) {} } + +function f(...args) { + escape(args); + for (var i = 0; i < 50; ++i) { + new g(...args); + } +} + +// |f| must be small enough to be inlinable. +assertEq(isSmallFunction(f), true); + +f(1, 2); +assertEq(result, 3); + +f(""); +assertEq(result, "undefined"); diff --git a/js/src/jit-test/tests/warp/scalar-replace-array-construct-array.js b/js/src/jit-test/tests/warp/scalar-replace-array-construct-array.js new file mode 100644 index 0000000000..cd3b02c4e5 --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-array-construct-array.js @@ -0,0 +1,48 @@ +// |jit-test| --fast-warmup; --no-threads + +setJitCompilerOption("baseline.warmup.trigger", 0); +setJitCompilerOption("ion.warmup.trigger", 100); + +// Prevent GC from cancelling/discarding Ion compilations. +gczeal(0); + +// Create a fresh set of functions for each argument count to avoid type pollution. +function makeTest(count) { + var args = Array(count).fill(0).join(","); + + return Function(` + class Base { + constructor() { + this.count = arguments.length; + } + } + + class C extends Base { + constructor(...args) { + // When |C| is inlined into its caller, the number of arguments is fixed and + // we can scalar replace the inlined rest array. + assertRecoveredOnBailout(args, true); + return super(...args); + } + } + + // |C| must be small enough to be inlined into the test function. + assertEq(isSmallFunction(C), true); + + function test() { + for (let i = 0; i < 1000; ++i) { + let obj = new C(${args}); + assertEq(obj.count, ${count}); + } + } + + return test; + `)(); +} + +// Limited by gc::CanUseFixedElementsForArray(), see also WarpBuilder::build_Rest(). +const maxRestArgs = 14; + +for (let i = 0; i <= maxRestArgs; ++i) { + makeTest(i)(); +} diff --git a/js/src/jit-test/tests/warp/scalar-replace-array-iterator-next.js b/js/src/jit-test/tests/warp/scalar-replace-array-iterator-next.js new file mode 100644 index 0000000000..d523bdb896 --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-array-iterator-next.js @@ -0,0 +1,24 @@ +//|jit-test| --ion-pruning=on + +// Verify that we can inline ArrayIteratorNext, +// and scalar-replace the result object. + +if (getJitCompilerOptions()["ion.warmup.trigger"] <= 150) + setJitCompilerOption("ion.warmup.trigger", 150); + +gczeal(0); + +function foo(arr) { + var iterator = arr[Symbol.iterator](); + while (true) { + var result = iterator.next(); + trialInline(); + assertRecoveredOnBailout(result, true); + if (result.done) { + break; + } + } +} + +with ({}) {} +foo(Array(1000)); diff --git a/js/src/jit-test/tests/warp/scalar-replace-rest-apply-array.js b/js/src/jit-test/tests/warp/scalar-replace-rest-apply-array.js new file mode 100644 index 0000000000..315dd58b5d --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-rest-apply-array.js @@ -0,0 +1,38 @@ +// Prevent GC from cancelling/discarding Ion compilations. +gczeal(0); + +// Create a fresh set of functions for each argument count to avoid type pollution. +function makeTest(count) { + var args = Array(count).fill(0).join(","); + + return Function(` + function g() { + return arguments.length; + } + + function f(...args) { + assertRecoveredOnBailout(args, true); + return g(...args); + } + + function test() { + // Ensure |f| isn't inlined into its caller. + with ({}); + + for (let i = 0; i < 1000; ++i) { + assertEq(f(${args}), ${count}); + } + } + + return test; + `)(); +} + +// Inline rest arguments are limited to 14 elements, cf. +// gc::CanUseFixedElementsForArray() in WarpBuilder::build_Rest(). +// There isn't such limit when the function isn't inlined. +const maxRestArgs = 20; + +for (let i = 0; i <= maxRestArgs; ++i) { + makeTest(i)(); +} diff --git a/js/src/jit-test/tests/warp/scalar-replace-rest-construct-array.js b/js/src/jit-test/tests/warp/scalar-replace-rest-construct-array.js new file mode 100644 index 0000000000..e2c0c5b354 --- /dev/null +++ b/js/src/jit-test/tests/warp/scalar-replace-rest-construct-array.js @@ -0,0 +1,43 @@ +// Prevent GC from cancelling/discarding Ion compilations. +gczeal(0); + +// Create a fresh set of functions for each argument count to avoid type pollution. +function makeTest(count) { + var args = Array(count).fill(0).join(","); + + return Function(` + class Base { + constructor() { + this.count = arguments.length; + } + } + + class C extends Base { + constructor(...args) { + assertRecoveredOnBailout(args, true); + return super(...args); + } + } + + function test() { + // Ensure |C| isn't inlined into its caller. + with ({}); + + for (let i = 0; i < 1000; ++i) { + let obj = new C(${args}); + assertEq(obj.count, ${count}); + } + } + + return test; + `)(); +} + +// Inline rest arguments are limited to 14 elements, cf. +// gc::CanUseFixedElementsForArray() in WarpBuilder::build_Rest(). +// There isn't such limit when the function isn't inlined. +const maxRestArgs = 20; + +for (let i = 0; i <= maxRestArgs; ++i) { + makeTest(i)(); +} diff --git a/js/src/jit-test/tests/warp/set-has-bigint.js b/js/src/jit-test/tests/warp/set-has-bigint.js new file mode 100644 index 0000000000..f282760eb2 --- /dev/null +++ b/js/src/jit-test/tests/warp/set-has-bigint.js @@ -0,0 +1,192 @@ +// Similar test as "cacheir/set-has-bigint.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new set, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createSet(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Set(xs); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testInlineDigitsSameSign_same_set(n) { + var xs = [1n, 2n]; + var ys = [3n, 4n]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testInlineDigitsSameSign_same_set); + +function testInlineDigitsDifferentSign_same_set(n) { + var xs = [-1n, 2n]; + var ys = [1n, -2n]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testInlineDigitsDifferentSign_same_set); + +function testHeapDigitsSameSign_same_set(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [heap + 1n, heap + 2n]; + var ys = [heap + 3n, heap + 4n]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testHeapDigitsSameSign_same_set); + +function testHeapDigitsDifferentSign_same_set(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [-(heap + 1n), heap + 2n]; + var ys = [heap + 1n, -(heap + 2n)]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testHeapDigitsDifferentSign_same_set); + +// Duplicate the above tests, but this time use a different set. + +function testInlineDigitsSameSign_different_set(n) { + var xs = [1n, 2n]; + var ys = [3n, 4n]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testInlineDigitsSameSign_different_set); + +function testInlineDigitsDifferentSign_different_set(n) { + var xs = [-1n, 2n]; + var ys = [1n, -2n]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testInlineDigitsDifferentSign_different_set); + +function testHeapDigitsSameSign_different_set(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [heap + 1n, heap + 2n]; + var ys = [heap + 3n, heap + 4n]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testHeapDigitsSameSign_different_set); + +function testHeapDigitsDifferentSign_different_set(n) { + // Definitely uses heap digits. + var heap = 2n ** 1000n; + + var xs = [-(heap + 1n), heap + 2n]; + var ys = [heap + 1n, -(heap + 2n)]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testHeapDigitsDifferentSign_different_set); + +// Test the alias information is correct. + +function test_alias(n) { + var xs = [1n, 2n]; + var set = createSet([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + set.add(x); + if (set.has(x)) c++; + + set.delete(x); + if (set.has(x)) c++; + } + assertEq(c, N); +} +runTest(test_alias); diff --git a/js/src/jit-test/tests/warp/set-has-nongcthing.js b/js/src/jit-test/tests/warp/set-has-nongcthing.js new file mode 100644 index 0000000000..845b9431b2 --- /dev/null +++ b/js/src/jit-test/tests/warp/set-has-nongcthing.js @@ -0,0 +1,307 @@ +// Similar test as "cacheir/set-has-nongcthing.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new set, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createSet(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Set(xs); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testInt32_same_set(n) { + var xs = [1, 2]; + var ys = [3, 4]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testInt32_same_set); + +function testDouble_same_set(n) { + var xs = [Math.PI, Infinity]; + var ys = [Math.E, -Infinity]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testDouble_same_set); + +function testZero_same_set(n) { + var xs = [0, -0]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var set = createSet([0], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testZero_same_set); + +function testNaN_same_set(n) { + var xs = [NaN, -NaN]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var set = createSet([NaN], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testNaN_same_set); + +function testUndefinedAndNull_same_set(n) { + var xs = [undefined, null]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testUndefinedAndNull_same_set); + +function testBoolean_same_set(n) { + var xs = [true, false]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testBoolean_same_set); + +// Duplicate the above tests, but this time use a different set. + +function testInt32_different_set(n) { + var xs = [1, 2]; + var ys = [3, 4]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testInt32_different_set); + +function testDouble_different_set(n) { + var xs = [Math.PI, Infinity]; + var ys = [Math.E, -Infinity]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testDouble_different_set); + +function testZero_different_set(n) { + var xs = [0, -0]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var set1 = createSet([0], n); + var set2 = createSet([0], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testZero_different_set); + +function testNaN_different_set(n) { + var xs = [NaN, -NaN]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var set1 = createSet([NaN], n); + var set2 = createSet([NaN], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testNaN_different_set); + +function testUndefinedAndNull_different_set(n) { + var xs = [undefined, null]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testUndefinedAndNull_different_set); + +function testBoolean_different_set(n) { + var xs = [true, false]; + var ys = [1, -1]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testBoolean_different_set); + +// Test the alias information is correct. + +function testInt32_alias(n) { + var xs = [1, 2]; + var set = createSet([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + set.add(x); + if (set.has(x)) c++; + + set.delete(x); + if (set.has(x)) c++; + } + assertEq(c, N); +} +runTest(testInt32_alias); + +function testDouble_alias(n) { + var xs = [Math.PI, Infinity]; + var set = createSet([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + set.add(x); + if (set.has(x)) c++; + + set.delete(x); + if (set.has(x)) c++; + } + assertEq(c, N); +} +runTest(testDouble_alias); + +function testUndefinedAndNull_alias(n) { + var xs = [undefined, null]; + var set = createSet([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + set.add(x); + if (set.has(x)) c++; + + set.delete(x); + if (set.has(x)) c++; + } + assertEq(c, N); +} +runTest(testUndefinedAndNull_alias); + +function testBoolean_alias(n) { + var xs = [true, false]; + var set = createSet([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + set.add(x); + if (set.has(x)) c++; + + set.delete(x); + if (set.has(x)) c++; + } + assertEq(c, N); +} +runTest(testBoolean_alias); diff --git a/js/src/jit-test/tests/warp/set-has-object.js b/js/src/jit-test/tests/warp/set-has-object.js new file mode 100644 index 0000000000..87cf85f791 --- /dev/null +++ b/js/src/jit-test/tests/warp/set-has-object.js @@ -0,0 +1,97 @@ +// Similar test as "cacheir/set-has-object.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new set, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createSet(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Set(xs); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function test_same_set(n) { + var xs = [{}, {}]; + var ys = [{}, {}]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(test_same_set); + +// Duplicate the above tests, but this time use a different set. + +function test_different_set(n) { + var xs = [{}, {}]; + var ys = [{}, {}]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(test_different_set); + +// Test the alias information is correct. + +function test_alias(n) { + var xs = [{}, {}]; + var set = createSet([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + set.add(x); + if (set.has(x)) c++; + + set.delete(x); + if (set.has(x)) c++; + } + assertEq(c, N); +} +runTest(test_alias); + +// And finally test that we don't actually support GVN for objects, because the +// hash changes when moving an object. + +function testRekey() { + var set = new Set(); + var c = 0; + var N = 100; + for (var i = 0; i < N; ++i) { + var k = {}; + set.add(k); + + if (set.has(k)) c++; + + minorgc(); + + if (set.has(k)) c++; + } + + assertEq(c, N * 2); +} +testRekey(); diff --git a/js/src/jit-test/tests/warp/set-has-string.js b/js/src/jit-test/tests/warp/set-has-string.js new file mode 100644 index 0000000000..65442a4249 --- /dev/null +++ b/js/src/jit-test/tests/warp/set-has-string.js @@ -0,0 +1,147 @@ +// Similar test as "cacheir/set-has-string.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new set, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createSet(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Set(xs); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testConstant_same_set(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testConstant_same_set); + +function testComputed_same_set(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + z = String.fromCharCode(z.charCodeAt(0)); + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testComputed_same_set); + +function testRope_same_set(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var set = createSet(xs.map(x => x.repeat(100)), n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3].repeat(100); + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testRope_same_set); + +// Duplicate the above tests, but this time use a different set. + +function testConstant_different_set(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testConstant_different_set); + +function testComputed_different_set(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + z = String.fromCharCode(z.charCodeAt(0)); + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testComputed_different_set); + +function testRope_different_set(n) { + var xs = ["a", "b"]; + var ys = ["c", "d"]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs.map(x => x.repeat(100)), n); + var set2 = createSet(xs.map(x => x.repeat(100)), n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3].repeat(100); + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testRope_different_set); + +// Test the alias information is correct. + +function test_alias(n) { + var xs = ["a", "b"]; + var set = createSet([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + set.add(x); + if (set.has(x)) c++; + + set.delete(x); + if (set.has(x)) c++; + } + assertEq(c, N); +} +runTest(test_alias); diff --git a/js/src/jit-test/tests/warp/set-has-symbol.js b/js/src/jit-test/tests/warp/set-has-symbol.js new file mode 100644 index 0000000000..0f1c697ca3 --- /dev/null +++ b/js/src/jit-test/tests/warp/set-has-symbol.js @@ -0,0 +1,75 @@ +// Similar test as "cacheir/set-has-symbol.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new set, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createSet(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Set(xs); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function test_same_set(n) { + var xs = [Symbol(), Symbol()]; + var ys = [Symbol(), Symbol()]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(test_same_set); + +// Duplicate the above tests, but this time use a different set. + +function test_different_set(n) { + var xs = [Symbol(), Symbol()]; + var ys = [Symbol(), Symbol()]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 3]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(test_different_set); + +// Test the alias information is correct. + +function test_alias(n) { + var xs = [Symbol(), Symbol()]; + var set = createSet([], n); + + var N = 100; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 1]; + + set.add(x); + if (set.has(x)) c++; + + set.delete(x); + if (set.has(x)) c++; + } + assertEq(c, N); +} +runTest(test_alias); diff --git a/js/src/jit-test/tests/warp/set-has-value.js b/js/src/jit-test/tests/warp/set-has-value.js new file mode 100644 index 0000000000..4a6a8464e0 --- /dev/null +++ b/js/src/jit-test/tests/warp/set-has-value.js @@ -0,0 +1,97 @@ +// Similar test as "cacheir/set-has-value.js", except that we now perform +// duplicate lookups to ensure GVN works properly. + +// Return a new set, possibly filling some dummy entries to enforce creating +// multiple hash buckets. +function createSet(values, n) { + var xs = [...values]; + for (var i = 0; i < n; ++i) { + xs.push({}); + } + return new Set(xs); +} + +function runTest(fn) { + fn(0); + fn(100); +} + +function testPolymorphic_same_set(n) { + var xs = [10, 10.5, "test", Symbol("?"), 123n, -123n, {}, []]; + var ys = [-0, NaN, "bad", Symbol("!"), 42n, -99n, {}, []]; + var zs = [...xs, ...ys]; + var set = createSet(xs, n); + + var N = 128; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 15]; + if (set.has(z)) c++; + if (set.has(z)) c++; + } + assertEq(c, N); +} +runTest(testPolymorphic_same_set); + +// Duplicate the above tests, but this time use a different set. + +function testPolymorphic_different_set(n) { + var xs = [10, 10.5, "test", Symbol("?"), 123n, -123n, {}, []]; + var ys = [-0, NaN, "bad", Symbol("!"), 42n, -99n, {}, []]; + var zs = [...xs, ...ys]; + var set1 = createSet(xs, n); + var set2 = createSet(xs, n); + + var N = 128; + var c = 0; + for (var i = 0; i < N; ++i) { + var z = zs[i & 15]; + if (set1.has(z)) c++; + if (set2.has(z)) c++; + } + assertEq(c, N); +} +runTest(testPolymorphic_different_set); + +// Test the alias information is correct. + +function testPolymorphic_alias(n) { + var xs = [10, 10.5, "test", Symbol("?"), 123n, -123n, {}, []]; + var set = createSet([], n); + + var N = 128; + var c = 0; + for (var i = 0; i < N; ++i) { + var x = xs[i & 15]; + + set.add(x); + if (set.has(x)) c++; + + set.delete(x); + if (set.has(x)) c++; + } + assertEq(c, N); +} +runTest(testPolymorphic_alias); + +// And finally test that we don't actually support GVN for values, because the +// hash changes when moving a value which holds an object. + +function testRekey() { + var set = new Set(); + var c = 0; + var N = 100; + for (var i = 0; i < N; ++i) { + var k = (i & 1) ? {} : null; + set.add(k); + + if (set.has(k)) c++; + + minorgc(); + + if (set.has(k)) c++; + } + + assertEq(c, N * 2); +} +testRekey(); diff --git a/js/src/jit-test/tests/warp/setelem-inlining-bailout.js b/js/src/jit-test/tests/warp/setelem-inlining-bailout.js new file mode 100644 index 0000000000..102b2d7dcc --- /dev/null +++ b/js/src/jit-test/tests/warp/setelem-inlining-bailout.js @@ -0,0 +1,26 @@ +// |jit-test| --fast-warmup; --no-threads + +// Inlining setters for SetElem ops will require bailout changes. + +with ({}) { } +var trigger = false; + +var obj = { + set f(x) { + if (trigger) { + bailout(); + } + } +}; + +var sum = 0; +function foo(x) { + for (var i = 0; i < 35; i++) { + var t = obj[x] = i; + sum += t; + trigger = i % 10 == 0; + } +} + +foo("f"); +assertEq(sum, 595); diff --git a/js/src/jit-test/tests/warp/small-inlinable-builtins.js b/js/src/jit-test/tests/warp/small-inlinable-builtins.js new file mode 100644 index 0000000000..d346894f6a --- /dev/null +++ b/js/src/jit-test/tests/warp/small-inlinable-builtins.js @@ -0,0 +1,10 @@ +// Ensure certain self-hosted built-in functions are small enough to be inlinable. + +assertEq(isSmallFunction(isFinite), true); +assertEq(isSmallFunction(isNaN), true); + +assertEq(isSmallFunction(Number.isFinite), true); +assertEq(isSmallFunction(Number.isNaN), true); + +assertEq(isSmallFunction(Number.isInteger), true); +assertEq(isSmallFunction(Number.isSafeInteger), true); diff --git a/js/src/jit-test/tests/warp/store-element-hole-negative-index.js b/js/src/jit-test/tests/warp/store-element-hole-negative-index.js new file mode 100644 index 0000000000..43d017769c --- /dev/null +++ b/js/src/jit-test/tests/warp/store-element-hole-negative-index.js @@ -0,0 +1,24 @@ +function test() { + Object.defineProperty(Array.prototype, -1, { + set() { + throw new Error("shouldn't get here"); + } + }); + + // A bunch of indices which grow the array. + var indices = []; + for (var i = 0; i < 10_000; ++i) indices.push(i); + + // And finally a negative index. + indices.push(-1); + + // Plain data properties use DefineDataProperty. + var desc = {value: 0, writable: true, enumerable: true, configurable: true}; + + var a = []; + for (var i = 0; i < indices.length; ++i) { + Object.defineProperty(a, indices[i], desc); + } +} + +test(); diff --git a/js/src/jit-test/tests/warp/store-element-hole-sparse-element.js b/js/src/jit-test/tests/warp/store-element-hole-sparse-element.js new file mode 100644 index 0000000000..2012404f51 --- /dev/null +++ b/js/src/jit-test/tests/warp/store-element-hole-sparse-element.js @@ -0,0 +1,24 @@ +function test() { + Object.defineProperty(Array.prototype, 10_000 * 50, { + set() { + throw new Error("shouldn't get here"); + } + }); + + // A bunch of indices which grow the array. + var indices = []; + for (var i = 0; i < 10_000; ++i) indices.push(i); + + // And finally an index for a sparse property. + indices.push(10_000 * 50); + + // Plain data properties use DefineDataProperty. + var desc = {value: 0, writable: true, enumerable: true, configurable: true}; + + var a = []; + for (var i = 0; i < indices.length; ++i) { + Object.defineProperty(a, indices[i], desc); + } +} + +test(); diff --git a/js/src/jit-test/tests/warp/string-char.js b/js/src/jit-test/tests/warp/string-char.js new file mode 100644 index 0000000000..fc41e5079a --- /dev/null +++ b/js/src/jit-test/tests/warp/string-char.js @@ -0,0 +1,15 @@ +function f(x) { + assertEq(x.charCodeAt(1), 0x62); + assertEq(x.charAt(1), "b"); + assertEq(x[1], "b"); +} + +function g() { + for (var i = 0; i < 100; i++) { + f("abc"); + } +} + +for (var j = 0; j < 10; j++) { + g(); +} diff --git a/js/src/jit-test/tests/warp/string-charCodeAt-constant-index-in-left-rope-child.js b/js/src/jit-test/tests/warp/string-charCodeAt-constant-index-in-left-rope-child.js new file mode 100644 index 0000000000..5835b019ad --- /dev/null +++ b/js/src/jit-test/tests/warp/string-charCodeAt-constant-index-in-left-rope-child.js @@ -0,0 +1,18 @@ +// `str.charCodeAt(0)` doesn't need to inspect the right rope child, because +// the first character is guaranteed to be in the left child. + +const ropes = [ + newRope("ABCDEFGHIJKL", "MNOPQRSTUVWXYZ"), + newRope("abcdefghijkl", "mnopqrstuvwxyz"), + + newRope("A", "BCDEFGHIJKLMNOPQRSTUVWXYZ"), + newRope("a", "bcdefghijklmnopqrstuvwxyz"), +]; + +for (let i = 0; i < 500; ++i) { + let rope = ropes[i & 3]; + + let actual = rope.charCodeAt(0); + let expected = 0x41 + (i & 1) * 0x20; + assertEq(actual, expected); +} diff --git a/js/src/jit-test/tests/warp/string-compare-char-in-bounds.js b/js/src/jit-test/tests/warp/string-compare-char-in-bounds.js new file mode 100644 index 0000000000..31c48a43fd --- /dev/null +++ b/js/src/jit-test/tests/warp/string-compare-char-in-bounds.js @@ -0,0 +1,24 @@ +// |str.char(idx) == "b"| is compiled as |str.charCodeAt(idx) == 0x62|. + +const strings = [ + "a", "b", "c", + "a-", "b-", "c-", +]; + +for (let i = 0; i < 1000; ++i) { + let str = strings[i % strings.length]; + + for (let j = 0; j < str.length; ++j) { + let ch = str.charAt(j); + let code = str.charCodeAt(j); + + assertEq(ch == "b", code == 0x62); + assertEq(ch != "b", code != 0x62); + + assertEq(ch < "b", code < 0x62); + assertEq(ch <= "b", code <= 0x62); + + assertEq(ch > "b", code > 0x62); + assertEq(ch >= "b", code >= 0x62); + } +} diff --git a/js/src/jit-test/tests/warp/string-compare-char-out-of-bounds.js b/js/src/jit-test/tests/warp/string-compare-char-out-of-bounds.js new file mode 100644 index 0000000000..842b009a0f --- /dev/null +++ b/js/src/jit-test/tests/warp/string-compare-char-out-of-bounds.js @@ -0,0 +1,28 @@ +// |str.char(idx) == "b"| is compiled as |str.charCodeAt(idx) == 0x62|. + +const strings = [ + "", + "a", "b", "c", + "a-", "b-", "c-", +]; + +for (let i = 0; i < 1000; ++i) { + let str = strings[i % strings.length]; + + // |j <= str.length| to test out-of-bounds access, too. + for (let j = 0; j <= str.length; ++j) { + let ch = str.charAt(j); + let code = j < str.length ? str.charCodeAt(j) : -1; + + assertEq(ch == "", code == -1); + + assertEq(ch == "b", code == 0x62); + assertEq(ch != "b", code != 0x62); + + assertEq(ch < "b", code < 0x62); + assertEq(ch <= "b", code <= 0x62); + + assertEq(ch > "b", code > 0x62); + assertEq(ch >= "b", code >= 0x62); + } +} diff --git a/js/src/jit-test/tests/warp/string-compare-char-string.js b/js/src/jit-test/tests/warp/string-compare-char-string.js new file mode 100644 index 0000000000..f56009f5a1 --- /dev/null +++ b/js/src/jit-test/tests/warp/string-compare-char-string.js @@ -0,0 +1,60 @@ +// Test comparison against single-element character strings. + +function makeComparator(code) { + var str = String.fromCharCode(code); + + return Function("ch", "code", ` + assertEq(ch == "${str}", code == ${code} && ch.length == 1); + assertEq(ch != "${str}", code != ${code} || ch.length != 1); + + assertEq(ch < "${str}", code < ${code} || (code == ${code} && ch.length < 1)); + assertEq(ch <= "${str}", code < ${code} || (code == ${code} && ch.length <= 1)); + assertEq(ch > "${str}", code > ${code} || (code == ${code} && ch.length > 1)); + assertEq(ch >= "${str}", code > ${code} || (code == ${code} && ch.length >= 1)); + `); +} + +function testCompare(strings, comparator) { + // Don't Ion compile to ensure |comparator| won't be inlined. + with ({}) ; + + for (let i = 0; i < 1000; ++i) { + let str = strings[i % strings.length]; + + comparator("", -1); + + for (let j = 0; j < str.length; ++j) { + let ch = str.charAt(j); + let code = str.charCodeAt(j); + + comparator(ch, code); + comparator(ch + "A", code); + } + } +} + +// Compare against the Latin-1 character U+0062 ('b'). +testCompare([ + "", + "a", "b", "c", + "a-", "b-", "c-", + "a\u{100}", "b\u{100}", "c\u{100}", +], makeComparator(0x62)); + +// Compare against the maximum Latin-1 character U+00FF. +testCompare([ + "", + "a", "b", "c", + "a-", "b-", "c-", + "\u{fe}", "\u{ff}", "\u{100}", + "\u{fe}-", "\u{ff}-", "\u{100}-", +], makeComparator(0xff)); + +// Compare against the Two-byte character U+0101. +testCompare([ + "", + "a", "b", "c", + "a-", "b-", "c-", + "\u{100}", "\u{101}", "\u{102}", + "\u{100}-", "\u{101}-", "\u{102}-", +], makeComparator(0x101)); diff --git a/js/src/jit-test/tests/warp/string-endswith-constant-string.js b/js/src/jit-test/tests/warp/string-endswith-constant-string.js new file mode 100644 index 0000000000..e815f8e376 --- /dev/null +++ b/js/src/jit-test/tests/warp/string-endswith-constant-string.js @@ -0,0 +1,81 @@ +// Test case to cover String.prototype.endsWith with a constant search string. +// +// String.prototype.endsWith with a short (≤32 characters) constant string is +// optimised during lowering. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const ascii = [...characters( + [0x41, 0x5A], // A..Z + [0x61, 0x7A], // a..z + [0x30, 0x39], // 0..9 +)]; + +const latin1 = [...characters( + [0xC0, 0xFF], // À..ÿ +)]; + +const twoByte = [...characters( + [0x100, 0x17E], // Ā..ž +)]; + +function toRope(s) { + try { + return newRope(s[0], s.substring(1)); + } catch {} + // newRope can fail when |s| fits into an inline string. In that case simply + // return the input. + return s; +} + +function atomize(s) { + return Object.keys({[s]: 0})[0]; +} + +for (let i = 1; i <= 32; ++i) { + let strings = [ascii, latin1, twoByte].flatMap(codePoints => [ + // Same string as the input. + String.fromCodePoint(...codePoints.slice(0, i)), + + // Same length as the input, but a different string. + String.fromCodePoint(...codePoints.slice(1, i + 1)), + + // Shorter string than the input. + String.fromCodePoint(...codePoints.slice(0, i - 1)), + + // Longer string than the input. + String.fromCodePoint(...codePoints.slice(0, i + 1)), + ]).flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + atomize(x), + ]); + + for (let codePoints of [ascii, latin1, twoByte]) { + let str = String.fromCodePoint(...codePoints.slice(0, i)); + + let fn = Function("strings", ` + const expected = strings.map(x => { + // Prevent Warp compilation when computing the expected results. + with ({}) ; + return x.endsWith("${str}"); + }); + + for (let i = 0; i < 250; ++i) { + let idx = i % strings.length; + let str = strings[idx]; + + let actual = str.endsWith("${str}"); + if (actual !== expected[idx]) throw new Error(); + } + `); + fn(strings); + } +} diff --git a/js/src/jit-test/tests/warp/string-indexof-constant-string-length-one.js b/js/src/jit-test/tests/warp/string-indexof-constant-string-length-one.js new file mode 100644 index 0000000000..17ae97c0ad --- /dev/null +++ b/js/src/jit-test/tests/warp/string-indexof-constant-string-length-one.js @@ -0,0 +1,74 @@ +// Test case to cover String.prototype.{indexOf,lastIndexOf,includes} with a constant string of length one. + +const strings = [ + // Empty string. + "", + + // Latin-1 string. + "abcdefgh", + + // Two-byte string. + "\u{101}\u{102}\u{103}\u{104}\u{105}\u{106}\u{107}\u{108}", +].flatMap(x => [ + x, + + // Add leading characters. + "!".repeat(10) + x, + + // Add trailing characters. + x + "!".repeat(10), +]).flatMap(x => [ + x, + + // To cover the case when the string is two-byte, but has only Latin-1 contents. + newString(x, {twoByte: true}), +]); + +const searchStrings = [ + // Latin-1 search strings: + // - at the start of the input string + "a", + // - in the middle of the input string + "d", + // - at the end of the input string + "h", + // - not in the input string + "z", + + // Two-byte search strings: + // - at the start of the input string + "\u{101}", + // - in the middle of the input string + "\u{104}", + // - at the end of the input string + "\u{108}", + // - not in the input string + "\u{1000}", +]; + +const stringFunctions = [ + "indexOf", + "lastIndexOf", + "includes", +]; + +for (let stringFunction of stringFunctions) { + for (let searchString of searchStrings) { + let fn = Function("strings", ` + const expected = strings.map(x => { + // Prevent Warp compilation when computing the expected results. + with ({}) ; + return x.${stringFunction}("${searchString}"); + }); + + for (let i = 0; i < 500; ++i) { + let idx = i % strings.length; + let str = strings[idx]; + + let actual = str.${stringFunction}("${searchString}"); + assertEq(actual, expected[idx]); + } + `); + fn(strings); + } +} diff --git a/js/src/jit-test/tests/warp/string-indexof-constant-string-length-two.js b/js/src/jit-test/tests/warp/string-indexof-constant-string-length-two.js new file mode 100644 index 0000000000..7659aee53e --- /dev/null +++ b/js/src/jit-test/tests/warp/string-indexof-constant-string-length-two.js @@ -0,0 +1,74 @@ +// Test case to cover String.prototype.{indexOf,lastIndexOf,includes} with a constant string of length two. + +const strings = [ + // Empty string. + "", + + // Latin-1 string. + "abcdefgh", + + // Two-byte string. + "\u{101}\u{102}\u{103}\u{104}\u{105}\u{106}\u{107}\u{108}", +].flatMap(x => [ + x, + + // Add leading characters. + "!".repeat(10) + x, + + // Add trailing characters. + x + "!".repeat(10), +]).flatMap(x => [ + x, + + // To cover the case when the string is two-byte, but has only Latin-1 contents. + newString(x, {twoByte: true}), +]); + +const searchStrings = [ + // Latin-1 search strings: + // - at the start of the input string + "ab", + // - in the middle of the input string + "de", + // - at the end of the input string + "gh", + // - not in the input string + "zz", + + // Two-byte search strings: + // - at the start of the input string + "\u{101}\u{102}", + // - in the middle of the input string + "\u{104}\u{105}", + // - at the end of the input string + "\u{107}\u{108}", + // - not in the input string + "\u{1000}\u{1001}", +]; + +const stringFunctions = [ + "indexOf", + "lastIndexOf", + "includes", +]; + +for (let stringFunction of stringFunctions) { + for (let searchString of searchStrings) { + let fn = Function("strings", ` + const expected = strings.map(x => { + // Prevent Warp compilation when computing the expected results. + with ({}) ; + return x.${stringFunction}("${searchString}"); + }); + + for (let i = 0; i < 500; ++i) { + let idx = i % strings.length; + let str = strings[idx]; + + let actual = str.${stringFunction}("${searchString}"); + assertEq(actual, expected[idx]); + } + `); + fn(strings); + } +} diff --git a/js/src/jit-test/tests/warp/string-indexof-constant-string.js b/js/src/jit-test/tests/warp/string-indexof-constant-string.js new file mode 100644 index 0000000000..1d737ec438 --- /dev/null +++ b/js/src/jit-test/tests/warp/string-indexof-constant-string.js @@ -0,0 +1,98 @@ +// Test case to cover String.prototype.indexOf with a constant search string. +// +// String.prototype.indexOf with a short (≤32 characters) constant string is +// optimised during lowering. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const ascii = [...characters( + [0x41, 0x5A], // A..Z + [0x61, 0x7A], // a..z + [0x30, 0x39], // 0..9 +)]; + +const latin1 = [...characters( + [0xC0, 0xFF], // À..ÿ +)]; + +const twoByte = [...characters( + [0x100, 0x17E], // Ā..ž +)]; + +function toRope(s) { + try { + return newRope(s[0], s.substring(1)); + } catch {} + // newRope can fail when |s| fits into an inline string. In that case simply + // return the input. + return s; +} + +function atomize(s) { + return Object.keys({[s]: 0})[0]; +} + +for (let i = 1; i <= 32; ++i) { + let strings = [ascii, latin1, twoByte].flatMap(codePoints => [ + // Same string as the input. + String.fromCodePoint(...codePoints.slice(0, i)), + + // Same length as the input, but a different string. + String.fromCodePoint(...codePoints.slice(1, i + 1)), + + // Shorter string than the input. + String.fromCodePoint(...codePoints.slice(0, i - 1)), + + // Longer string than the input. + String.fromCodePoint(...codePoints.slice(0, i + 1)), + ]).flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + atomize(x), + ]); + + for (let codePoints of [ascii, latin1, twoByte]) { + let str = String.fromCodePoint(...codePoints.slice(0, i)); + + let fn = Function("strings", ` + const expected = strings.map(x => { + // Prevent Warp compilation when computing the expected results. + with ({}) ; + return x.indexOf("${str}") === 0; + }); + + for (let i = 0; i < 250; ++i) { + let idx = i % strings.length; + let str = strings[idx]; + + let actual = str.indexOf("${str}") === 0; + if (actual !== expected[idx]) throw new Error(); + } + `); + fn(strings); + + let fnNot = Function("strings", ` + const expected = strings.map(x => { + // Prevent Warp compilation when computing the expected results. + with ({}) ; + return x.indexOf("${str}") !== 0; + }); + + for (let i = 0; i < 250; ++i) { + let idx = i % strings.length; + let str = strings[idx]; + + let actual = str.indexOf("${str}") !== 0; + if (actual !== expected[idx]) throw new Error(); + } + `); + fnNot(strings); + } +} diff --git a/js/src/jit-test/tests/warp/string-indexof-is-startswith.js b/js/src/jit-test/tests/warp/string-indexof-is-startswith.js new file mode 100644 index 0000000000..1d9f31e38c --- /dev/null +++ b/js/src/jit-test/tests/warp/string-indexof-is-startswith.js @@ -0,0 +1,29 @@ +// |str.indexOf(searchStr) == 0| is compiled as |str.startsWith(searchStr)|. +// |str.indexOf(searchStr) != 0| is compiled as |!str.startsWith(searchStr)|. + +const strings = [ + "", + "a", "b", + "ab", "ba", "ac", "ca", + "aba", "abb", "abc", "aca", +]; + +function StringIndexOf(str, searchStr) { + // Prevent Warp compilation when computing the expected result. + with ({}); + return str.indexOf(searchStr); +} + +for (let str of strings) { + for (let searchStr of strings) { + let startsWith = str.indexOf(searchStr) === 0; + + assertEq(startsWith, str.startsWith(searchStr)); + assertEq(startsWith, StringIndexOf(str, searchStr) === 0); + + let notStartsWith = str.indexOf(searchStr) !== 0; + + assertEq(notStartsWith, !str.startsWith(searchStr)); + assertEq(notStartsWith, StringIndexOf(str, searchStr) !== 0); + } +} diff --git a/js/src/jit-test/tests/warp/string-startswith-constant-string.js b/js/src/jit-test/tests/warp/string-startswith-constant-string.js new file mode 100644 index 0000000000..48a3f6dc73 --- /dev/null +++ b/js/src/jit-test/tests/warp/string-startswith-constant-string.js @@ -0,0 +1,81 @@ +// Test case to cover String.prototype.startsWith with a constant search string. +// +// String.prototype.startsWith with a short (≤32 characters) constant string is +// optimised during lowering. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const ascii = [...characters( + [0x41, 0x5A], // A..Z + [0x61, 0x7A], // a..z + [0x30, 0x39], // 0..9 +)]; + +const latin1 = [...characters( + [0xC0, 0xFF], // À..ÿ +)]; + +const twoByte = [...characters( + [0x100, 0x17E], // Ā..ž +)]; + +function toRope(s) { + try { + return newRope(s[0], s.substring(1)); + } catch {} + // newRope can fail when |s| fits into an inline string. In that case simply + // return the input. + return s; +} + +function atomize(s) { + return Object.keys({[s]: 0})[0]; +} + +for (let i = 1; i <= 32; ++i) { + let strings = [ascii, latin1, twoByte].flatMap(codePoints => [ + // Same string as the input. + String.fromCodePoint(...codePoints.slice(0, i)), + + // Same length as the input, but a different string. + String.fromCodePoint(...codePoints.slice(1, i + 1)), + + // Shorter string than the input. + String.fromCodePoint(...codePoints.slice(0, i - 1)), + + // Longer string than the input. + String.fromCodePoint(...codePoints.slice(0, i + 1)), + ]).flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + atomize(x), + ]); + + for (let codePoints of [ascii, latin1, twoByte]) { + let str = String.fromCodePoint(...codePoints.slice(0, i)); + + let fn = Function("strings", ` + const expected = strings.map(x => { + // Prevent Warp compilation when computing the expected results. + with ({}) ; + return x.startsWith("${str}"); + }); + + for (let i = 0; i < 250; ++i) { + let idx = i % strings.length; + let str = strings[idx]; + + let actual = str.startsWith("${str}"); + if (actual !== expected[idx]) throw new Error(); + } + `); + fn(strings); + } +} diff --git a/js/src/jit-test/tests/warp/string-substring-is-charat.js b/js/src/jit-test/tests/warp/string-substring-is-charat.js new file mode 100644 index 0000000000..0675aa2029 --- /dev/null +++ b/js/src/jit-test/tests/warp/string-substring-is-charat.js @@ -0,0 +1,13 @@ +// |str.substring(0, 1)| is compiled as |str.charAt(0)|. + +const strings = [ + "", + "a", "b", + "ab", "ba", +]; + +for (let i = 0; i < 1000; ++i) { + let str = strings[i % strings.length]; + + assertEq(str.substring(0, 1), str.charAt(0)); +} diff --git a/js/src/jit-test/tests/warp/string-substring-startswith-constant-string.js b/js/src/jit-test/tests/warp/string-substring-startswith-constant-string.js new file mode 100644 index 0000000000..f98627cfe9 --- /dev/null +++ b/js/src/jit-test/tests/warp/string-substring-startswith-constant-string.js @@ -0,0 +1,90 @@ +// Test case to cover String.prototype.substring as startsWith with a constant search string. +// +// String.prototype.substring comparison with a short (≤32 characters) constant string is +// optimised during lowering. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const ascii = [...characters( + [0x41, 0x5A], // A..Z + [0x61, 0x7A], // a..z + [0x30, 0x39], // 0..9 +)]; + +const latin1 = [...characters( + [0xC0, 0xFF], // À..ÿ +)]; + +const twoByte = [...characters( + [0x100, 0x17E], // Ā..ž +)]; + +function toRope(s) { + try { + return newRope(s[0], s.substring(1)); + } catch {} + // newRope can fail when |s| fits into an inline string. In that case simply + // return the input. + return s; +} + +function atomize(s) { + return Object.keys({[s]: 0})[0]; +} + +const operators = [ + "==", "===", "!=", "!==", +]; + +for (let i = 1; i <= 32; ++i) { + let strings = [ascii, latin1, twoByte].flatMap(codePoints => [ + // Same string as the input. + String.fromCodePoint(...codePoints.slice(0, i)), + + // Same length as the input, but a different string. + String.fromCodePoint(...codePoints.slice(1, i + 1)), + + // Shorter string than the input. + String.fromCodePoint(...codePoints.slice(0, i - 1)), + + // Longer string than the input. + String.fromCodePoint(...codePoints.slice(0, i + 1)), + ]).flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + atomize(x), + ]); + + for (let codePoints of [ascii, latin1, twoByte]) { + let str = String.fromCodePoint(...codePoints.slice(0, i)); + + for (let op of operators) { + let fn = Function("strings", ` + const expected = strings.map(x => { + // Prevent Warp compilation when computing the expected results. + with ({}) ; + return x.substring(0, ${str.length}) ${op} "${str}"; + }); + + for (let i = 0; i < 250; ++i) { + let idx = i % strings.length; + let str = strings[idx]; + + let lhs = str.substring(0, ${str.length}) ${op} "${str}"; + if (lhs !== expected[idx]) throw new Error(); + + let rhs = "${str}" ${op} str.substring(0, ${str.length}); + if (rhs !== expected[idx]) throw new Error(); + } + `); + fn(strings); + } + } +} diff --git a/js/src/jit-test/tests/warp/string-substring-static-strings.js b/js/src/jit-test/tests/warp/string-substring-static-strings.js new file mode 100644 index 0000000000..1ea8e36c31 --- /dev/null +++ b/js/src/jit-test/tests/warp/string-substring-static-strings.js @@ -0,0 +1,20 @@ +// `str.substring(...)` can return static strings. + +const strings = [ + "abcdef", + "ABCDEF", +]; + +for (let i = 0; i < 500; ++i) { + let str = strings[i & 1]; + + for (let j = 0; j < 2; ++j) { + // One element static string. + let r = str.substring(j, j + 1); + assertEq(r, str.charAt(j)); + + // Two elements static string. + let s = str.substring(j, j + 2); + assertEq(s, str.charAt(j) + str.charAt(j + 1)); + } +} diff --git a/js/src/jit-test/tests/warp/string-tolowercase-latin1.js b/js/src/jit-test/tests/warp/string-tolowercase-latin1.js new file mode 100644 index 0000000000..2d94850445 --- /dev/null +++ b/js/src/jit-test/tests/warp/string-tolowercase-latin1.js @@ -0,0 +1,85 @@ +// Test inline lower case conversion of ASCII / Latin-1 strings. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const ascii_upper = [...characters( + [0x41, 0x5A], // A..Z + [0x30, 0x39], // 0..9 +)]; + +const ascii_lower = [...characters( + [0x61, 0x7A], // a..z + [0x30, 0x39], // 0..9 +)]; + +const latin1_upper = [...characters( + [0xC0, 0xDE], // À..Þ + [0x30, 0x39], // 0..9 +)]; + +const latin1_lower = [...characters( + [0xDF, 0xFF], // ß..ÿ +)]; + +for (let upper of [ascii_upper, latin1_upper]) { + let s = String.fromCodePoint(...upper); + assertEq(isLatin1(s), true); + assertEq(s, s.toUpperCase()); +} + +for (let lower of [ascii_lower, latin1_lower]) { + let s = String.fromCodePoint(...lower); + assertEq(isLatin1(s), true); + assertEq(s, s.toLowerCase()); +} + +function toRope(s) { + try { + return newRope(s[0], s.substring(1)); + } catch {} + // newRope can fail when |s| fits into an inline string. In that case simply + // return the input. + return s; +} + +for (let i = 0; i <= 32; ++i) { + let strings = [ascii_upper, ascii_lower, latin1_upper, latin1_lower].flatMap(codePoints => [ + String.fromCodePoint(...codePoints.slice(0, i)), + + // Trailing ASCII upper case character. + String.fromCodePoint(...codePoints.slice(0, i)) + "A", + + // Trailing ASCII lower case character. + String.fromCodePoint(...codePoints.slice(0, i)) + "a", + + // Trailing Latin-1 upper case character. + String.fromCodePoint(...codePoints.slice(0, i)) + "À", + + // Trailing Latin-1 lower case character. + String.fromCodePoint(...codePoints.slice(0, i)) + "ß", + ]).flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + ]); + + const expected = strings.map(x => { + // Prevent Warp compilation when computing the expected results. + with ({}) ; + return x.toLowerCase(); + }); + + for (let i = 0; i < 1000; ++i) { + let idx = i % strings.length; + let str = strings[idx]; + + let actual = str.toLowerCase(); + if (actual !== expected[idx]) throw new Error(); + } +} diff --git a/js/src/jit-test/tests/warp/string-totitlecase.js b/js/src/jit-test/tests/warp/string-totitlecase.js new file mode 100644 index 0000000000..0237a263b3 --- /dev/null +++ b/js/src/jit-test/tests/warp/string-totitlecase.js @@ -0,0 +1,85 @@ +// Test inline title case conversion. + +function* characters(...ranges) { + for (let [start, end] of ranges) { + for (let i = start; i <= end; ++i) { + yield i; + } + } +} + +const ascii = [...characters( + [0x41, 0x5A], // A..Z + [0x61, 0x7A], // a..z + [0x30, 0x39], // 0..9 +)]; + +const latin1 = [...characters( + [0xC0, 0xFF], // À..ÿ +)]; + +const twoByte = [...characters( + [0x100, 0x17E], // Ā..ž +)]; + +String.prototype.toTitleCase = function() { + "use strict"; + + var s = String(this); + + if (s.length === 0) { + return s; + } + return s[0].toUpperCase() + s.substring(1); +}; + +function toRope(s) { + try { + return newRope(s[0], s.substring(1)); + } catch {} + // newRope can fail when |s| fits into an inline string. In that case simply + // return the input. + return s; +} + +for (let i = 0; i <= 32; ++i) { + let strings = [ascii, latin1, twoByte].flatMap(codePoints => [ + String.fromCodePoint(...codePoints.slice(0, i)), + + // Leading ASCII upper case character. + "A" + String.fromCodePoint(...codePoints.slice(0, i)), + + // Leading ASCII lower case character. + "a" + String.fromCodePoint(...codePoints.slice(0, i)), + + // Leading Latin-1 upper case character. + "À" + String.fromCodePoint(...codePoints.slice(0, i)), + + // Leading Latin-1 lower case character. + "à" + String.fromCodePoint(...codePoints.slice(0, i)), + + // Leading Two-Byte upper case character. + "Ā" + String.fromCodePoint(...codePoints.slice(0, i)), + + // Leading Two-Byte lower case character. + "ā" + String.fromCodePoint(...codePoints.slice(0, i)), + ]).flatMap(x => [ + x, + toRope(x), + newString(x, {twoByte: true}), + ]); + + const expected = strings.map(x => { + // Prevent Warp compilation when computing the expected results. + with ({}) ; + return x.toTitleCase(); + }); + + for (let i = 0; i < 1000; ++i) { + let idx = i % strings.length; + let str = strings[idx]; + + let actual = str.toTitleCase(); + if (actual !== expected[idx]) throw new Error(); + } +} diff --git a/js/src/jit-test/tests/warp/string-trim.js b/js/src/jit-test/tests/warp/string-trim.js new file mode 100644 index 0000000000..0ca05be8ac --- /dev/null +++ b/js/src/jit-test/tests/warp/string-trim.js @@ -0,0 +1,75 @@ +const whitespace = [ + // Ascii whitespace + " ", + "\t", + + // Latin-1 whitespace + "\u{a0}", + + // Two-byte whitespace + "\u{1680}", +]; + +const strings = [ + // Empty string + "", + + // Ascii strings + "a", + "abc", + + // Latin-1 strings + "á", + "áèô", + + // Two-byte strings + "\u{100}", + "\u{100}\u{101}\u{102}", +].flatMap(x => [ + x, + + // Leading whitespace + ...whitespace.flatMap(w => [w + x, w + w + x]), + + // Trailing whitespace + ...whitespace.flatMap(w => [x + w, x + w + w]), + + // Leading and trailing whitespace + ...whitespace.flatMap(w => [w + x + w, w + w + x + w + w]), + + // Interspersed whitespace + ...whitespace.flatMap(w => [x + w + x, x + w + w + x]), +]); + +function trim(strings) { + // Compute expected values using RegExp. + let expected = strings.map(x => x.replace(/(^\s+)|(\s+$)/g, "")); + + for (let i = 0; i < 1000; ++i) { + let index = i % strings.length; + assertEq(strings[index].trim(), expected[index]); + } +} +for (let i = 0; i < 2; ++i) trim(strings); + +function trimStart(strings) { + // Compute expected values using RegExp. + let expected = strings.map(x => x.replace(/(^\s+)/g, "")); + + for (let i = 0; i < 1000; ++i) { + let index = i % strings.length; + assertEq(strings[index].trimStart(), expected[index]); + } +} +for (let i = 0; i < 2; ++i) trimStart(strings); + +function trimEnd(strings) { + // Compute expected values using RegExp. + let expected = strings.map(x => x.replace(/(\s+$)/g, "")); + + for (let i = 0; i < 1000; ++i) { + let index = i % strings.length; + assertEq(strings[index].trimEnd(), expected[index]); + } +} +for (let i = 0; i < 2; ++i) trimEnd(strings); diff --git a/js/src/jit-test/tests/warp/stub-folding-add-case.js b/js/src/jit-test/tests/warp/stub-folding-add-case.js new file mode 100644 index 0000000000..a31b0f2e7e --- /dev/null +++ b/js/src/jit-test/tests/warp/stub-folding-add-case.js @@ -0,0 +1,35 @@ +// |jit-test| --fast-warmup + +var sum = 0; +function foo(o) { + sum += o.a; +} + +with({}) {} + +// Fold a stub with two cases. +for (var i = 0; i < 11; i++) { + foo({a:1}); + foo({a:1,b:2}); +} + +// Add a third case. +foo({a:1,b:2,c:3}); + +// Warp-compile. +for (var i = 0; i < 16; i++) { + foo({a:1}); +} + +// Add a fourth case. +foo({a:1,b:2,c:3,d:4}); + +// Run for a while in Warp. +for (var i = 0; i < 20; i++) { + foo({a:1}); + foo({a:1,b:2}); + foo({a:1,b:2,c:3}); + foo({a:1,b:2,c:3,d:4}); +} + +assertEq(sum, 120); diff --git a/js/src/jit-test/tests/warp/stub-folding-cross-compartment.js b/js/src/jit-test/tests/warp/stub-folding-cross-compartment.js new file mode 100644 index 0000000000..735504cf89 --- /dev/null +++ b/js/src/jit-test/tests/warp/stub-folding-cross-compartment.js @@ -0,0 +1,15 @@ +var src = ` +var p = {y: 1}; +var arr = []; +for (var i = 0; i < 10; i++) { + var o = Object.create(p); + o["x" + i] = 2; + arr.push(o); +} +arr +`; + +var wrapper = evaluate(src, {global: newGlobal({sameZoneAs: this})}); +for (var i = 0; i < 50; i++) { + assertEq(wrapper[i % 10].y, 1); +} diff --git a/js/src/jit-test/tests/warp/stub-folding-transition.js b/js/src/jit-test/tests/warp/stub-folding-transition.js new file mode 100644 index 0000000000..865e6dc189 --- /dev/null +++ b/js/src/jit-test/tests/warp/stub-folding-transition.js @@ -0,0 +1,24 @@ +var sum = 0; +function foo(o) { + sum += o.x; +} + +with({}) {} + +// Trigger stub folding in MaybeTransition +for (var i = 0; i < 200; i++) { + foo({x:1, a:1}); + foo({x:1, b:1}); + foo({x:1, c:1}); + foo({x:1, d:1}); + foo({x:1, e:1}); + foo({x:1, f:1}); + foo({x:1, g:1}); + foo({x:1, h:1}); + foo({x:1, i:1}); + foo({x:1, j:1}); + foo({x:1, k:1}); + foo({x:1, l:1}); +} + +assertEq(sum, 2400); diff --git a/js/src/jit-test/tests/warp/stub-folding.js b/js/src/jit-test/tests/warp/stub-folding.js new file mode 100644 index 0000000000..0b7d7fdda4 --- /dev/null +++ b/js/src/jit-test/tests/warp/stub-folding.js @@ -0,0 +1,35 @@ +// |jit-test| --fast-warmup + +with({}) {} + +class A { + foo() { return 3; } + get z() { return 5; } +} + +class B1 extends A { + constructor(y) { + super(); + this.y = y; + } +} + +class B2 extends A { + constructor(x,y) { + super(); + this.y = y; + this.x = x; + } +} + +var sum = 0; +function foo(o) { + sum += o.foo() + o.y + o.z; +} + +for (var i = 0; i < 50; i++) { + foo(new B1(i)); + foo(new B2(i,i)); +} + +assertEq(sum, 3250); diff --git a/js/src/jit-test/tests/warp/super-native-newtarget.js b/js/src/jit-test/tests/warp/super-native-newtarget.js new file mode 100644 index 0000000000..3f9fb24a3a --- /dev/null +++ b/js/src/jit-test/tests/warp/super-native-newtarget.js @@ -0,0 +1,20 @@ +class A {} + +class B extends A { + constructor() { + super(); + } +} + +function h() {} +h = h.bind(); + +function f() { + for (var i = 0; i < 1000; ++i) { + var o = Reflect.construct(B, [], h); + } +} + +for (var i = 0; i < 5; ++i) { + f(); +} diff --git a/js/src/jit-test/tests/warp/throw-exception-stack-location.js b/js/src/jit-test/tests/warp/throw-exception-stack-location.js new file mode 100644 index 0000000000..bcb7329b05 --- /dev/null +++ b/js/src/jit-test/tests/warp/throw-exception-stack-location.js @@ -0,0 +1,41 @@ +function throwValue(value) { + throw value; +} + +// Test try-finally keep the exception stack. +function testFinally() { + function f() { + try { + throwValue("exception-value"); + } finally { + for (let i = 0; i < 100; ++i) { + // OSR + } + } + } + + let info = getExceptionInfo(f); + assertEq(info.exception, "exception-value"); + assertEq(info.stack.includes("throwValue"), true); +} +testFinally(); + +// Test try-catch-finally keep the exception stack. +function testCatchFinally() { + function f() { + try { + throw null; + } catch { + throwValue("exception-value"); + } finally { + for (let i = 0; i < 100; ++i) { + // OSR + } + } + } + + let info = getExceptionInfo(f); + assertEq(info.exception, "exception-value"); + assertEq(info.stack.includes("throwValue"), true); +} +testCatchFinally(); diff --git a/js/src/jit-test/tests/warp/trial-inline-gc-1.js b/js/src/jit-test/tests/warp/trial-inline-gc-1.js new file mode 100644 index 0000000000..6129221bb8 --- /dev/null +++ b/js/src/jit-test/tests/warp/trial-inline-gc-1.js @@ -0,0 +1,14 @@ +// |jit-test| --fast-warmup +function g(x) { + return x + 1; +} +function f() { + for (var i = 0; i < 150; i++) { + assertEq(g("foo"), "foo1"); + assertEq(g(1), 2); + if (i === 100) { + gc(this, "shrinking"); + } + } +} +f(); diff --git a/js/src/jit-test/tests/warp/trial-inline-gc-2.js b/js/src/jit-test/tests/warp/trial-inline-gc-2.js new file mode 100644 index 0000000000..058e2ff645 --- /dev/null +++ b/js/src/jit-test/tests/warp/trial-inline-gc-2.js @@ -0,0 +1,18 @@ +// |jit-test| --fast-warmup +function h(i) { + with(this) {} // Don't inline. + if (i === 100) { + gc(this, "shrinking"); + } +} +function g(i, x) { + h(i); + return x + 1; +} +function f() { + for (var i = 0; i < 200; i++) { + g(i, "foo"); + g(i, 1); + } +} +f(); diff --git a/js/src/jit-test/tests/warp/trial-inline-gc-3.js b/js/src/jit-test/tests/warp/trial-inline-gc-3.js new file mode 100644 index 0000000000..4e64a22167 --- /dev/null +++ b/js/src/jit-test/tests/warp/trial-inline-gc-3.js @@ -0,0 +1,23 @@ +// |jit-test| --fast-warmup +function h(i) { + if (i === 150) { + with(this) {} // Don't inline. + // Trigger an invalidation of f's IonScript (with g inlined into it) on + // the stack. Before we bail out, replace g and trial-inline the new + // function. The bailout must not get confused by this. + gc(this, "shrinking"); + g = (i, x) => x + 20; + f(); + } +} +function g(i, x) { + h(i); + return x + 1; +} +function f() { + for (var i = 0; i < 300; i++) { + g(i, "foo"); + g(i, 1); + } +} +f(); diff --git a/js/src/jit-test/tests/warp/try-catch-unwind.js b/js/src/jit-test/tests/warp/try-catch-unwind.js new file mode 100644 index 0000000000..a167e03f5d --- /dev/null +++ b/js/src/jit-test/tests/warp/try-catch-unwind.js @@ -0,0 +1,29 @@ +let throwing = false; + +function bar() { + with ({}) {} + if (throwing) throw 3; +} + +function foo() { + let y = 3; + try { + let x = 3; + () => { return x + y; } + bar(); + } catch (e) { + assertEq(y, 3); + throw e; + } +} + +with ({}) {} + +for (var i = 0; i < 1000; i++) { + foo() +} + +throwing = true; +try { + foo(); +} catch {} diff --git a/js/src/jit-test/tests/warp/try-finally-1.js b/js/src/jit-test/tests/warp/try-finally-1.js new file mode 100644 index 0000000000..206286d598 --- /dev/null +++ b/js/src/jit-test/tests/warp/try-finally-1.js @@ -0,0 +1,36 @@ +let target = 3; +function throwOn(x) { + with ({}) {} + if (x == target) { + throw 3; + } +} + +// Test try-finally without catch +function foo() { + var x = 0; + try { + throwOn(0); + x = 1; + throwOn(1); + x = 2; + throwOn(2); + x = 3; + } finally { + assertEq(x, target); + } +} + +with ({}) {} +for (var i = 0; i < 1000; i++) { + try { + foo(); + } catch {} +} + +for (var i = 0; i < 4; i++) { + target = i; + try { + foo(); + } catch {} +} diff --git a/js/src/jit-test/tests/warp/try-finally-2.js b/js/src/jit-test/tests/warp/try-finally-2.js new file mode 100644 index 0000000000..4187a37e0c --- /dev/null +++ b/js/src/jit-test/tests/warp/try-finally-2.js @@ -0,0 +1,42 @@ +let catchCount = 0; + +let target = 3; +function throwOn(x) { + with ({}) {} + if (x == target) { + throw 3; + } +} + +// Test try-catch-finally +function foo() { + var x = 0; + try { + throwOn(0); + x = 1; + throwOn(1); + x = 2; + throwOn(2); + x = 3; + } catch { + catchCount++; + } finally { + assertEq(x, target); + } +} + +with ({}) {} +for (var i = 0; i < 1000; i++) { + try { + foo(); + } catch {} +} + +for (var i = 0; i < 4; i++) { + target = i; + try { + foo(); + } catch {} +} + +assertEq(catchCount, 3); diff --git a/js/src/jit-test/tests/warp/try-finally-3.js b/js/src/jit-test/tests/warp/try-finally-3.js new file mode 100644 index 0000000000..98811486db --- /dev/null +++ b/js/src/jit-test/tests/warp/try-finally-3.js @@ -0,0 +1,35 @@ +var target = undefined; +function throwOn(x) { + with ({}) {} + if (x === target) { + throw x; + } +} + +// Test nested try-finally +function foo() { + let result = 0; + try { + throwOn(1); + result += 1; + try { + throwOn(2); + result += 2; + } finally { + result += 3; + } + } finally { + return result; + } +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + assertEq(foo(), 6); +} + +target = 1; +assertEq(foo(), 0); + +target = 2; +assertEq(foo(), 4); diff --git a/js/src/jit-test/tests/warp/try-finally-unwind.js b/js/src/jit-test/tests/warp/try-finally-unwind.js new file mode 100644 index 0000000000..05860fbaa5 --- /dev/null +++ b/js/src/jit-test/tests/warp/try-finally-unwind.js @@ -0,0 +1,28 @@ +let throwing = false; + +function bar() { + with ({}) {} + if (throwing) throw 3; +} + +function foo() { + let y = 3; + try { + let x = 3; + () => { return x + y; } + bar(); + } finally { + assertEq(y, 3); + } +} + +with ({}) {} + +for (var i = 0; i < 1000; i++) { + foo() +} + +throwing = true; +try { + foo(); +} catch {} diff --git a/js/src/jit-test/tests/warp/typedarray-element-exists.js b/js/src/jit-test/tests/warp/typedarray-element-exists.js new file mode 100644 index 0000000000..623ad672cb --- /dev/null +++ b/js/src/jit-test/tests/warp/typedarray-element-exists.js @@ -0,0 +1,46 @@ +function inBounds() { + var ta = new Int32Array(10); + + for (var i = 0; i < 100; ++i) { + var index = i & 7; + assertEq(index in ta, true); + } +} +inBounds(); + +function outOfBounds() { + var ta = new Int32Array(10); + + for (var i = 0; i < 100; ++i) { + var index = 10 + (i & 7); + assertEq(index in ta, false); + + var largeIndex = 2147483647 - (i & 1); + assertEq(largeIndex in ta, false); + } +} +outOfBounds(); + +function negativeIndex() { + var ta = new Int32Array(10); + + for (var i = 0; i < 100; ++i) { + var index = -(1 + (i & 7)); + assertEq(index in ta, false); + + var largeIndex = -2147483647 - (i & 1); + assertEq(largeIndex in ta, false); + } +} +negativeIndex(); + +function emptyArray() { + var ta = new Int32Array(0); + + for (var i = 0; i < 100; ++i) { + var index = i & 7; + assertEq(index in ta, false); + assertEq(-index in ta, false); + } +} +emptyArray(); diff --git a/js/src/jit-test/tests/warp/typedarrayindextoint32.js b/js/src/jit-test/tests/warp/typedarrayindextoint32.js new file mode 100644 index 0000000000..5333ada53e --- /dev/null +++ b/js/src/jit-test/tests/warp/typedarrayindextoint32.js @@ -0,0 +1,10 @@ +function f(ta, i) { + var x = i + 0.2; + return ta[i] + ta[i | 0] + ta[x - 0.2]; +} + +var ta = new Int32Array(10); +var xs = [0, 1, 2, -1]; +for (var i = 0; i < 100_000; ++i) { + assertEq(f(ta, xs[i & 3]), (i & 3) == 3 ? NaN : 0); +} diff --git a/js/src/jit-test/tests/warp/typeof-is.js b/js/src/jit-test/tests/warp/typeof-is.js new file mode 100644 index 0000000000..df41185769 --- /dev/null +++ b/js/src/jit-test/tests/warp/typeof-is.js @@ -0,0 +1,126 @@ +// Test case |typeof| folding in simple comparison contexts. + +// Create functions to test if |typeof x| is equal to a constant string. +// - Covers all possible |typeof| results, plus the invalid string "bad". +// - Covers all four possible equality comparison operators. +function createFunctions() { + return [ + "undefined", + "object", + "function", + "string", + "number", + "boolean", + "symbol", + "bigint", + "bad", + ].flatMap(type => [ + "==", + "===", + "!=", + "!==" + ].map(op => ({ + type, + equal: op[0] === "=", + fn: Function("thing", `return typeof thing ${op} "${type}"`) + }))); +} + +let functions = createFunctions(); + +function test() { + const ccwGlobal = newGlobal({newCompartment: true}); + const xs = [ + // "undefined" + // Plain undefined and object emulating undefined, including various proxy wrapper cases. + undefined, + createIsHTMLDDA(), + wrapWithProto(createIsHTMLDDA(), null), + ccwGlobal.eval("createIsHTMLDDA()"), + + // "object" + // Plain object and various proxy wrapper cases. + {}, + this, + new Proxy({}, {}), + wrapWithProto({}, null), + transplantableObject({proxy: true}).object, + ccwGlobal.Object(), + + // "function" + // Plain function and various proxy wrapper cases. + function(){}, + new Proxy(function(){}, {}), + new Proxy(createIsHTMLDDA(), {}), + wrapWithProto(function(){}, null), + ccwGlobal.Function(), + + // "string" + "", + + // "number" + // Int32 and Double numbers. + 0, + 1.23, + + // "boolean" + true, + + // "symbol" + Symbol(), + + // "bigint" + 0n, + ]; + + for (let i = 0; i < 200; ++i) { + let x = xs[i % xs.length]; + for (let {type, equal, fn} of functions) { + assertEq(fn(x), (typeof x === type) === equal); + } + } +} +for (let i = 0; i < 2; ++i) test(); + +// Fresh set of functions to gather new type info. +let functionsObject = createFunctions(); + +// Additional test when the input is always an object. +function testObject() { + const ccwGlobal = newGlobal({newCompartment: true}); + + // All elements of this array are objects to cover the case when |MTypeOf| has + // a |MIRType::Object| input. + const xs = [ + // "undefined" + // Object emulating undefined, including various proxy wrapper cases. + createIsHTMLDDA(), + wrapWithProto(createIsHTMLDDA(), null), + ccwGlobal.eval("createIsHTMLDDA()"), + + // "object" + // Plain object and various proxy wrapper cases. + {}, + this, + new Proxy({}, {}), + wrapWithProto({}, null), + transplantableObject({proxy: true}).object, + ccwGlobal.Object(), + + // "function" + // Plain function and various proxy wrapper cases. + function(){}, + new Proxy(function(){}, {}), + new Proxy(createIsHTMLDDA(), {}), + wrapWithProto(function(){}, null), + ccwGlobal.Function(), + ]; + + for (let i = 0; i < 200; ++i) { + let x = xs[i % xs.length]; + for (let {type, equal, fn} of functionsObject) { + assertEq(fn(x), (typeof x === type) === equal); + } + } +} +for (let i = 0; i < 2; ++i) testObject(); diff --git a/js/src/jit-test/tests/warp/typeof-switch.js b/js/src/jit-test/tests/warp/typeof-switch.js new file mode 100644 index 0000000000..4dc33c3686 --- /dev/null +++ b/js/src/jit-test/tests/warp/typeof-switch.js @@ -0,0 +1,78 @@ +// Test case |typeof| folding in switch-statement contexts. + +function TypeOf(thing) { + switch (typeof thing) { + case "undefined": + return "undefined"; + case "object": + return "object"; + case "function": + return "function"; + case "string": + return "string"; + case "number": + return "number"; + case "boolean": + return "boolean"; + case "symbol": + return "symbol"; + case "bigint": + return "bigint"; + case "bad": + return "bad"; + } + return "bad2"; +} + +function test() { + const ccwGlobal = newGlobal({newCompartment: true}); + const xs = [ + // "undefined" + // Plain undefined and objects emulating undefined, including various + // proxy wrapper cases. + undefined, + createIsHTMLDDA(), + wrapWithProto(createIsHTMLDDA(), null), + ccwGlobal.eval("createIsHTMLDDA()"), + + // "object" + // Plain objects and various proxy wrapper cases. + {}, + this, + new Proxy({}, {}), + wrapWithProto({}, null), + transplantableObject({proxy: true}).object, + ccwGlobal.Object(), + + // "function" + // Plain functions and various proxy wrapper cases. + function(){}, + new Proxy(function(){}, {}), + new Proxy(createIsHTMLDDA(), {}), + wrapWithProto(function(){}, null), + ccwGlobal.Function(), + + // "string" + "", + + // "number" + // Int32 and Double numbers. + 0, + 1.23, + + // "boolean" + true, + + // "symbol" + Symbol(), + + // "bigint" + 0n, + ]; + + for (let i = 0; i < 500; ++i) { + let x = xs[i % xs.length]; + assertEq(TypeOf(x), typeof x); + } +} +for (let i = 0; i < 2; ++i) test(); diff --git a/js/src/jit-test/tests/wasm/README-codegen.md b/js/src/jit-test/tests/wasm/README-codegen.md new file mode 100644 index 0000000000..007063c20a --- /dev/null +++ b/js/src/jit-test/tests/wasm/README-codegen.md @@ -0,0 +1,36 @@ +About whitebox code generation tests (*-codegen.js) in this dir and +the simd subdir. + +Whitebox codegen tests test a couple of things: + +- that the best instructions are selected under ideal conditions: + showing that the instruction selector at least knows about these + instructions. + +- that extraneous moves are not inserted by the register allocator or + code generator under ideal conditions: when it is in principle + possible for the code generator and register allocator to use inputs + where they are and generate outputs directly in the target + registers. + +These tests are both limited in scope and brittle in the face of +changes to the register allocator and instruction selector, but how +else would we test that code generation and register allocation work +when presented with the easiest case? And if they don't work then, +when will they work? + +For a reliable test, the inputs must be known to be in the fixed +parameter registers and the result must be known to be desired in the +fixed function result register. + +Sometimes, to test optimal codegen, we need the inputs to be in +reversed or permuted locations so as to avoid generating moves that +are inserted by the regalloc to adapt to the function signature, or +there need to be some dummy parameter registers that are not used. + +In the test cases, the expected output is expressed as a multi-line +regular expression. The first line of each expected output is the +tail end of the prologue; subsequent lines comprise the operation; +finally there is the beginning of the epilogue. Sometimes there is +only the end of the prologue and the beginning of the operation, as +the operation is long and we don't care about its tail. diff --git a/js/src/jit-test/tests/wasm/arm-hwcap-madness.js b/js/src/jit-test/tests/wasm/arm-hwcap-madness.js new file mode 100644 index 0000000000..ab95fb207c --- /dev/null +++ b/js/src/jit-test/tests/wasm/arm-hwcap-madness.js @@ -0,0 +1,31 @@ +// |jit-test| skip-if: !getBuildConfiguration("arm"); test-also=--arm-hwcap=armv7,vfp + +// The command line options disable the idiv instruction and thus make the +// baseline compiler unavailable, so we must be prepared for a run-time error +// below in the baseline-only configuration. + +// The flags above should be sufficient for there to be a WebAssembly object. +assertEq(typeof WebAssembly, "object"); + +try { + var i = new WebAssembly.Instance( + new WebAssembly.Module( + wasmTextToBinary('(module (func (export "") (result i32) (i32.const 42)))'))); + assertEq(i.exports[""](), 42); +} catch (e) { + if (String(e).match(/no WebAssembly compiler available/)) { + switch (wasmCompileMode()) { + case "none": + // This is fine: the limited feature set combined with command line + // compiler selection caused all compilers to be disabled. + break; + default: + // This is not fine: if there's a compiler available then we should + // not get an error. + throw e; + } + } else { + // Some other error, propagate it. + throw e; + } +} diff --git a/js/src/jit-test/tests/wasm/arraybuffer-transfer.js b/js/src/jit-test/tests/wasm/arraybuffer-transfer.js new file mode 100644 index 0000000000..d82c305f2d --- /dev/null +++ b/js/src/jit-test/tests/wasm/arraybuffer-transfer.js @@ -0,0 +1,35 @@ +let exp = wasmEvalText(`(module + (memory 1) + (export "mem" (memory 0)) + (func $f (result i32) (i32.load (i32.const 0))) + (export "zero" (func $f)) +)`).exports; + +const byteLength = 65536; +let buffer = exp.mem.buffer; +let i32 = new Int32Array(buffer); +let zero = exp.zero; + +const magic = 0xbadf00d; + +assertEq(zero(), 0); +assertEq(i32[0], 0); + +i32[0] = magic; + +assertEq(zero(), magic); +assertEq(i32[0], magic); + +assertEq(buffer.detached, false); +assertEq(buffer.byteLength, byteLength); + +// Can't transfer Wasm prepared array buffers. +assertThrowsInstanceOf(() => buffer.transfer(), TypeError); + +// |buffer| is still attached. +assertEq(buffer.detached, false); +assertEq(buffer.byteLength, byteLength); + +// Access still returns the original value. +assertEq(zero(), magic); +assertEq(i32[0], magic); diff --git a/js/src/jit-test/tests/wasm/async-instantiate.js b/js/src/jit-test/tests/wasm/async-instantiate.js new file mode 100644 index 0000000000..12f7c3d52b --- /dev/null +++ b/js/src/jit-test/tests/wasm/async-instantiate.js @@ -0,0 +1,47 @@ +const { Module, Instance, Global, instantiate, instantiateStreaming } = WebAssembly; + +const g = new Global({value: "i32", mutable:true}, 0); + +const code = wasmTextToBinary(`(module + (global $g (import "" "g") (mut i32)) + (func $start (global.set $g (i32.add (global.get $g) (i32.const 1)))) + (start $start) +)`); +const module = new Module(code); + +const importObj = { '': { get g() { g.value++; return g } } }; + +g.value = 0; +new Instance(module, importObj); +assertEq(g.value, 2); + +g.value = 0; +instantiate(module, importObj).then(i => { + assertEq(i instanceof Instance, true); + assertEq(g.value, 2); + g.value++; +}); +assertEq(g.value, 1); +drainJobQueue(); +assertEq(g.value, 3); + +g.value = 0; +instantiate(code, importObj).then(({module,instance}) => { + assertEq(module instanceof Module, true); + assertEq(instance instanceof Instance, true); + assertEq(g.value, 2); g.value++; } +); +drainJobQueue(); +assertEq(g.value, 3); + +if (wasmStreamingEnabled()) { + g.value = 0; + instantiateStreaming(code, importObj).then(({module,instance}) => { + assertEq(module instanceof Module, true); + assertEq(instance instanceof Instance, true); + assertEq(g.value, 2); + g.value++; + }); + drainJobQueue(); + assertEq(g.value, 3); +} diff --git a/js/src/jit-test/tests/wasm/atomic.js b/js/src/jit-test/tests/wasm/atomic.js new file mode 100644 index 0000000000..bb85ec8ed1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/atomic.js @@ -0,0 +1,562 @@ +// |jit-test| skip-if: !wasmThreadsEnabled() + +const oob = /index out of bounds/; +const unaligned = /unaligned memory access/; +const RuntimeError = WebAssembly.RuntimeError; + +function valText(text) { + return WebAssembly.validate(wasmTextToBinary(text)); +} + +function assertNum(a, b) { + if (typeof a == "number" && typeof b == "number") + assertEq(a, b); + else if (typeof a == "number") { + assertEq(a, b.low); + assertEq(0, b.high); + } else if (typeof b == "number") { + assertEq(a.low, b); + assertEq(a.high, 0); + } else { + assertEq(a.high, b.high); + assertEq(a.low, b.low); + } +} + +// Check that the output of wasmTextToBinary verifies correctly. + +for ( let shared of ['shared', ''] ) { + for (let [type,width,view] of [['i32','8', '_u'],['i32','16','_u'],['i32','',''],['i64','8','_u'],['i64','16','_u'],['i64','32','_u'],['i64','','']]) { + { + let text = (shared) => `(module (memory 1 1 ${shared}) + (func (result ${type}) (${type}.atomic.load${width}${view} (i32.const 0))) + (export "" (func 0)))`; + assertEq(valText(text(shared)), true); + } + + { + let text = (shared) => `(module (memory 1 1 ${shared}) + (func (${type}.atomic.store${width} (i32.const 0) (${type}.const 1))) + (export "" (func 0)))`; + assertEq(valText(text(shared)), true); + } + + { + let text = (shared) => `(module (memory 1 1 ${shared}) + (func (result ${type}) + (${type}.atomic.rmw${width}.cmpxchg${view} (i32.const 0) (${type}.const 1) (${type}.const 2))) + (export "" (func 0)))`; + assertEq(valText(text(shared)), true); + } + + for (let op of ['add','and','or','sub','xor','xchg']) { + // Operate with appropriately-typed value 1 on address 0 + let text = (shared) => `(module (memory 1 1 ${shared}) + (func (result ${type}) (${type}.atomic.rmw${width}.${op}${view} (i32.const 0) (${type}.const 1))) + (export "" (func 0)))`; + + assertEq(valText(text(shared)), true); + } + } + + for (let type of ['i32', 'i64']) { + let text = (shared) => `(module (memory 1 1 ${shared}) + (func (result i32) (memory.atomic.wait${type.slice(1)} (i32.const 0) (${type}.const 1) (i64.const -1))) + (export "" (func 0)))`; + assertEq(valText(text(shared)), true); + } + + let text = (shared) => `(module (memory 1 1 ${shared}) + (func (result i32) \(memory.atomic.notify (i32.const 0) (i32.const 1))) + (export "" (func 0)))`; + assertEq(valText(text(shared)), true); + + // Required explicit alignment for WAIT is the size of the datum + + for (let [type,align,good] of [['i32',1,false],['i32',2,false],['i32',4,true],['i32',8,false], + ['i64',1,false],['i64',2,false],['i64',4,false],['i64',8,true]]) + { + let text = `(module (memory 1 1 shared) + (func (result i32) (memory.atomic.wait${type.slice(1)} align=${align} (i32.const 0) (${type}.const 1) (i64.const -1))) + (export "" (func 0)))`; + assertEq(valText(text), good); + } + + // Required explicit alignment for NOTIFY is 4 + + for (let align of [1, 2, 4, 8]) { + let text = `(module (memory 1 1 shared) + (func (result i32) \(memory.atomic.notify align=${align} (i32.const 0) (i32.const 1))) + (export "" (func 0)))`; + assertEq(valText(text), align == 4); + } +} + +// Test that atomic operations work. + +function I64(hi, lo) { + this.high = hi; + this.low = lo; +} +I64.prototype.toString = function () { + return "(" + this.high.toString(16) + " " + this.low.toString(16) + ")"; +} + +function Uint64Array(arg) { + let buffer = arg; + if (typeof arg == "number") + buffer = new ArrayBuffer(arg*8); + this.buf = buffer; + this.elem = new Uint32Array(buffer); +} + +Uint64Array.BYTES_PER_ELEMENT = 8; + +Uint8Array.prototype.read = function (n) { return this[n] } +Uint16Array.prototype.read = function (n) { return this[n] } +Uint32Array.prototype.read = function (n) { return this[n] } +Uint64Array.prototype.read = function (n) { + return new I64(this.elem[n*2+1], this.elem[n*2]); +} + +Uint8Array.prototype.write = function (n,v) { this[n] = v } +Uint16Array.prototype.write = function (n,v) { this[n] = v } +Uint32Array.prototype.write = function (n,v) { this[n] = v} +Uint64Array.prototype.write = function (n,v) { + if (typeof v == "number") { + // Note, this chops v if v is too large + this.elem[n*2] = v; + this.elem[n*2+1] = 0; + } else { + this.elem[n*2] = v.low; + this.elem[n*2+1] = v.high; + } +} + +// Widen a one-byte value to a k-byte value where k is TA's width. +// Complementation leads to better error checking, probably. + +function widen(TA, value, complement = true) { + let n = value; + let s = ""; + for ( let i=0; i < Math.min(TA.BYTES_PER_ELEMENT, 4); i++ ) { + let v = (256 + n).toString(16); + s = s + v.substring(v.length-2); + if (complement) + n = ~n; + } + if (TA.BYTES_PER_ELEMENT == 8) + s = s + s; + s = "0x" + s; + + n = value; + let num = 0; + for ( let i=0; i < Math.min(TA.BYTES_PER_ELEMENT, 4); i++ ) { + num = (num << 8) | (n & 255); + if (complement) + n = ~n; + } + num = num >>> 0; + + if (TA.BYTES_PER_ELEMENT == 8) { + return [s, new I64(num, num)]; + } else { + return [s, num]; + } +} + +// Atomic RMW ops are sometimes used for effect, sometimes for their value, and +// in SpiderMonkey code generation differs for the two cases, so we need to test +// both. Also, there may be different paths for constant addresses/operands and +// variable ditto, so test as many combinations as possible. + +for ( let shared of ['shared',''] ) { + let RMWOperation = { + loadStoreModule(type, width, view, address, operand) { + let bin = wasmTextToBinary( + `(module + (memory (import "" "memory") 1 1 ${shared}) + (func (export "st") (param i32) + (${type}.atomic.store${width} ${address} ${operand})) + (func $ld (param i32) (result ${type}) + (${type}.atomic.load${width}${view} ${address})) + (func (export "ld") (param i32) (result i32) + (${type}.eq (call $ld (local.get 0)) ${operand})))`); + let mod = new WebAssembly.Module(bin); + let mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared}); + let ins = new WebAssembly.Instance(mod, {"": {memory: mem}}); + return [mem, ins.exports.ld, ins.exports.st]; + }, + + opModuleEffect(type, width, view, address, op, operand, ignored) { + let bin = wasmTextToBinary( + `(module + (memory (import "" "memory") 1 1 ${shared}) + (func (export "f") (param i32) (result i32) + (drop (${type}.atomic.rmw${width}.${op}${view} ${address} ${operand})) + (i32.const 1)))`); + let mod = new WebAssembly.Module(bin); + let mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared}); + let ins = new WebAssembly.Instance(mod, {"": {memory: mem}}); + return [mem, ins.exports.f]; + }, + + opModuleReturned(type, width, view, address, op, operand, expected) { + let bin = wasmTextToBinary( + `(module + (memory (import "" "memory") 1 1 ${shared}) + (func $_f (param i32) (result ${type}) + (${type}.atomic.rmw${width}.${op}${view} ${address} ${operand})) + (func (export "f") (param i32) (result i32) + (${type}.eq (call $_f (local.get 0)) (${type}.const ${expected}))))`); + let mod = new WebAssembly.Module(bin); + let mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared}); + let ins = new WebAssembly.Instance(mod, {"": {memory: mem}}); + return [mem, ins.exports.f]; + }, + + cmpxchgModuleEffect(type, width, view, address, operand1, operand2, ignored) { + let bin = wasmTextToBinary( + `(module + (memory (import "" "memory") 1 1 ${shared}) + (func (export "f") (param i32) + (drop (${type}.atomic.rmw${width}.cmpxchg${view} ${address} ${operand1} ${operand2}))))`); + let mod = new WebAssembly.Module(bin); + let mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared}); + let ins = new WebAssembly.Instance(mod, {"": {memory: mem}}); + return [mem, ins.exports.f]; + }, + + cmpxchgModuleReturned(type, width, view, address, operand1, operand2, expected) { + let bin = wasmTextToBinary( + `(module + (memory (import "" "memory") 1 1 ${shared}) + (func $_f (param i32) (result ${type}) + (${type}.atomic.rmw${width}.cmpxchg${view} ${address} ${operand1} ${operand2})) + (func (export "f") (param i32) (result i32) + (${type}.eq (call $_f (local.get 0)) (${type}.const ${expected}))))`); + let mod = new WebAssembly.Module(bin); + let mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared}); + let ins = new WebAssembly.Instance(mod, {"": {memory: mem}}); + return [mem, ins.exports.f]; + }, + + assertZero(array, LOC) { + for ( let i=0 ; i < 100 ; i++ ) { + if (i != LOC) + assertNum(array.read(i), 0); + } + }, + + run() { + const LOC = 13; // The cell we operate on + const OPD1 = 37; // Sometimes we'll put an operand here + const OPD2 = 42; // Sometimes we'll put another operand here + + for ( let [type, variations] of + [["i32", [[Uint8Array,"8", "_u"], [Uint16Array,"16", "_u"], [Uint32Array,"",""]]], + ["i64", [[Uint8Array,"8","_u"], [Uint16Array,"16","_u"], [Uint32Array,"32","_u"], [Uint64Array,"",""]]]] ) + { + for ( let [TA, width, view] of variations ) + { + for ( let addr of [`(i32.const ${LOC * TA.BYTES_PER_ELEMENT})`, + `(local.get 0)`] ) + { + for ( let [initial, operand] of [[0x12, 0x37]] ) + { + let [opd_str, opd_num] = widen(TA, operand); + for ( let rhs of [`(${type}.const ${opd_str})`, + `(${type}.load${width}${view} (i32.const ${OPD1 * TA.BYTES_PER_ELEMENT}))`] ) + { + let [mem, ld, st] = this.loadStoreModule(type, width, view, addr, rhs); + let array = new TA(mem.buffer); + array.write(OPD1, opd_num); + array.write(LOC, initial); + st(LOC * TA.BYTES_PER_ELEMENT); + let res = ld(LOC * TA.BYTES_PER_ELEMENT); + assertEq(res, 1); + assertNum(array.read(LOC), opd_num); + array.write(OPD1, 0); + this.assertZero(array, LOC); + } + } + + for ( let [op, initial, operand, expected] of [["add", 37, 5, 42], + ["sub", 42, 5, 37], + ["and", 0x45, 0x13, 0x01], + ["or", 0x45, 0x13, 0x57], + ["xor", 0x45, 0x13, 0x56], + ["xchg", 0x45, 0x13, 0x13]] ) + { + let complement = op == "xchg"; + let [ini_str, ini_num] = widen(TA, initial, complement); + let [opd_str, opd_num] = widen(TA, operand, complement); + let [exp_str, exp_num] = widen(TA, expected, complement); + for ( let rhs of [`(${type}.const ${opd_str})`, + `(${type}.load${width}${view} (i32.const ${OPD1 * TA.BYTES_PER_ELEMENT}))`] ) + { + for ( let [generateIt, checkIt] of [["opModuleEffect", false], ["opModuleReturned", true]] ) + { + let [mem, f] = this[generateIt](type, width, view, addr, op, rhs, ini_str); + let array = new TA(mem.buffer); + array.write(OPD1, opd_num); + array.write(LOC, ini_num); + let res = f(LOC * TA.BYTES_PER_ELEMENT); + if (checkIt) + assertEq(res, 1); + assertNum(array.read(LOC), exp_num); + array.write(OPD1, 0); + this.assertZero(array, LOC); + } + } + } + + for ( let [initial, operand1, operand2, expected] of [[33, 33, 44, 44], [33, 44, 55, 33]] ) + { + let [ini_str, ini_num] = widen(TA, initial); + let [opd1_str, opd1_num] = widen(TA, operand1); + let [opd2_str, opd2_num] = widen(TA, operand2); + let [exp_str, exp_num] = widen(TA, expected); + for ( let op1 of [`(${type}.const ${opd1_str})`, + `(${type}.load${width}${view} (i32.const ${OPD1 * TA.BYTES_PER_ELEMENT}))`] ) + { + for ( let op2 of [`(${type}.const ${opd2_str})`, + `(${type}.load${width}${view} (i32.const ${OPD2 * TA.BYTES_PER_ELEMENT}))`] ) + { + for ( let [generateIt, checkIt] of [["cmpxchgModuleEffect", false], ["cmpxchgModuleReturned", true]] ) + { + let [mem, f] = this[generateIt](type, width, view, addr, op1, op2, ini_str); + let array = new TA(mem.buffer); + array.write(OPD1, opd1_num); + array.write(OPD2, opd2_num); + array.write(LOC, ini_num); + let res = f(LOC * TA.BYTES_PER_ELEMENT); + if (checkIt) + assertEq(res, 1); + assertNum(array.read(13), exp_num); + array.write(OPD1, 0); + array.write(OPD2, 0); + this.assertZero(array, LOC); + } + } + } + } + } + } + } + } + }; + + RMWOperation.run(); +} + +// Test bounds and alignment checking on atomic ops + +for ( let shared of ['shared',''] ) { + var BoundsAndAlignment = { + loadModule(type, view, width, offset) { + return wasmEvalText( + `(module + (memory 1 1 ${shared}) + (func $0 (param i32) (result ${type}) + (${type}.atomic.load${width}${view} offset=${offset} (local.get 0))) + (func (export "f") (param i32) + (drop (call $0 (local.get 0))))) + `).exports.f; + }, + + loadModuleIgnored(type, view, width, offset) { + return wasmEvalText( + `(module + (memory 1 1 ${shared}) + (func (export "f") (param i32) + (drop (${type}.atomic.load${width}${view} offset=${offset} (local.get 0))))) + `).exports.f; + }, + + storeModule(type, view, width, offset) { + return wasmEvalText( + `(module + (memory 1 1 ${shared}) + (func (export "f") (param i32) + (${type}.atomic.store${width} offset=${offset} (local.get 0) (${type}.const 37)))) + `).exports.f; + }, + + opModule(type, view, width, offset, op) { + return wasmEvalText( + `(module + (memory 1 1 ${shared}) + (func $0 (param i32) (result ${type}) + (${type}.atomic.rmw${width}.${op}${view} offset=${offset} (local.get 0) (${type}.const 37))) + (func (export "f") (param i32) + (drop (call $0 (local.get 0))))) + `).exports.f; + }, + + opModuleForEffect(type, view, width, offset, op) { + return wasmEvalText( + `(module + (memory 1 1 ${shared}) + (func (export "f") (param i32) + (drop (${type}.atomic.rmw${width}.${op}${view} offset=${offset} (local.get 0) (${type}.const 37))))) + `).exports.f; + }, + + cmpxchgModule(type, view, width, offset) { + return wasmEvalText( + `(module + (memory 1 1 ${shared}) + (func $0 (param i32) (result ${type}) + (${type}.atomic.rmw${width}.cmpxchg${view} offset=${offset} (local.get 0) (${type}.const 37) (${type}.const 42))) + (func (export "f") (param i32) + (drop (call $0 (local.get 0))))) + `).exports.f; + }, + + run() { + for ( let [type, variations] of [["i32", [["8","_u", 1], ["16","_u", 2], ["","", 4]]], + ["i64", [["8","_u",1], ["16","_u",2], ["32","_u",4], ["","",8]]]] ) + { + for ( let [width,view,size] of variations ) + { + // Aligned but out-of-bounds + let addrs = [[65536, 0, oob], [65536*2, 0, oob], [65532, 4, oob], + [65533, 3, oob], [65534, 2, oob], [65535, 1, oob]]; + if (type == "i64") + addrs.push([65536-8, 8, oob]); + + // In-bounds but unaligned + for ( let i=1 ; i < size ; i++ ) + addrs.push([65520, i, unaligned]); + + // Both out-of-bounds and unaligned. The spec leaves it unspecified + // whether we see the OOB message or the unaligned message (they are + // both "traps"). In Firefox, the unaligned check comes first. + for ( let i=1 ; i < size ; i++ ) + addrs.push([65536, i, unaligned]); + + // GC to prevent TSan builds from running out of memory. + gc(); + + for ( let [ base, offset, re ] of addrs ) + { + assertErrorMessage(() => this.loadModule(type, view, width, offset)(base), RuntimeError, re); + assertErrorMessage(() => this.loadModuleIgnored(type, view, width, offset)(base), RuntimeError, re); + assertErrorMessage(() => this.storeModule(type, view, width, offset)(base), RuntimeError, re); + for ( let op of [ "add", "sub", "and", "or", "xor", "xchg" ]) { + assertErrorMessage(() => this.opModule(type, view, width, offset, op)(base), RuntimeError, re); + assertErrorMessage(() => this.opModuleForEffect(type, view, width, offset, op)(base), RuntimeError, re); + } + assertErrorMessage(() => this.cmpxchgModule(type, view, width, offset)(base), RuntimeError, re); + } + } + } + } + } + + BoundsAndAlignment.run(); +} + +// Bounds and alignment checks on wait and notify + +// For 'wait', we check bounds and alignment after sharedness, so the memory +// must be shared always. + +assertErrorMessage(() => wasmEvalText(`(module (memory 1 1 shared) + (func (param i32) (result i32) + (memory.atomic.wait32 (local.get 0) (i32.const 1) (i64.const -1))) + (export "" (func 0)))`).exports[""](65536), + RuntimeError, oob); + +assertErrorMessage(() => wasmEvalText(`(module (memory 1 1 shared) + (func (param i32) (result i32) + (memory.atomic.wait64 (local.get 0) (i64.const 1) (i64.const -1))) + (export "" (func 0)))`).exports[""](65536), + RuntimeError, oob); + +assertErrorMessage(() => wasmEvalText(`(module (memory 1 1 shared) + (func (param i32) (result i32) + (memory.atomic.wait32 (local.get 0) (i32.const 1) (i64.const -1))) + (export "" (func 0)))`).exports[""](65501), + RuntimeError, unaligned); + +assertErrorMessage(() => wasmEvalText(`(module (memory 1 1 shared) + (func (param i32) (result i32) + (memory.atomic.wait64 (local.get 0) (i64.const 1) (i64.const -1))) + (export "" (func 0)))`).exports[""](65501), + RuntimeError, unaligned); + +// For 'notify', we check bounds and alignment before returning 0 in the case of +// non-shared memory, so both shared and non-shared memories must be checked. + +for ( let shared of ['shared',''] ) { + assertErrorMessage(() => wasmEvalText(`(module (memory 1 1 ${shared}) + (func (param i32) (result i32) + \(memory.atomic.notify (local.get 0) (i32.const 1))) + (export "" (func 0)))`).exports[""](65536), + RuntimeError, oob); + + // Minimum run-time alignment for NOTIFY is 4 + for (let addr of [1,2,3,5,6,7]) { + assertErrorMessage(() => wasmEvalText(`(module (memory 1 1 ${shared}) + (func (export "f") (param i32) (result i32) + \(memory.atomic.notify (local.get 0) (i32.const 1))))`).exports.f(addr), + RuntimeError, unaligned); + } +} + +// Sharedness check for wait + +assertErrorMessage(() => wasmEvalText(`(module (memory 1 1) + (func (param i32) (result i32) + (memory.atomic.wait32 (local.get 0) (i32.const 1) (i64.const -1))) + (export "" (func 0)))`).exports[""](0), + RuntimeError, /atomic wait on non-shared memory/); + +// Ensure that notify works on non-shared memories and returns zero. + +assertEq(wasmEvalText(` +(module (memory 1 1) + (func (export "f") (param i32) (result i32) + \(memory.atomic.notify (local.get 0) (i32.const 1)))) +`).exports.f(256), 0); + +// Ensure alias analysis works even if atomic and non-atomic accesses are +// mixed. +assertErrorMessage(() => wasmEvalText(`(module + (memory 0 1 shared) + (func (export "main") + i32.const 1 + i32.const 2816 + i32.atomic.rmw16.xchg_u align=2 + i32.load16_s offset=83 align=1 + drop + ) +)`).exports.main(), RuntimeError, unaligned); + +// Make sure we can handle wait and notify without memory + +var nomem = /memory index out of range/; + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(` +(module + (func (result i32) + \(memory.atomic.notify (i32.const 0) (i32.const 1))))`)), + WebAssembly.CompileError, + nomem); + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(` +(module + (func (result i32) + (memory.atomic.wait32 (i32.const 0) (i32.const 1) (i64.const -1))))`)), + WebAssembly.CompileError, + nomem); + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(` +(module + (func (result i32) + (memory.atomic.wait64 (i32.const 0) (i64.const 1) (i64.const -1))))`)), + WebAssembly.CompileError, + nomem); + diff --git a/js/src/jit-test/tests/wasm/atomicity.js b/js/src/jit-test/tests/wasm/atomicity.js new file mode 100644 index 0000000000..47c78632ea --- /dev/null +++ b/js/src/jit-test/tests/wasm/atomicity.js @@ -0,0 +1,381 @@ +// Test that wasm atomic operations implement correct mutual exclusion. +// +// We have several agents that attempt to hammer on a shared location with rmw +// operations in such a way that failed atomicity will lead to an incorrect +// result. Each agent attempts to clear or set specific bits in a shared datum. + +// 1 for a little bit, 2 for a lot, 3 to quit before running tests +const DEBUG = 0; + +// The longer we run, the better, really, but we don't want to time out. +const ITERATIONS = 100000; + +// If you change NUMWORKERS you must also change the tables for INIT, VAL, and +// RESULT for all the operations, below, by adding or removing bits. +const NUMWORKERS = 2; +const NUMAGENTS = NUMWORKERS + 1; + +// Need at least one thread per agent. + +if (!wasmThreadsEnabled() || helperThreadCount() < NUMWORKERS) { + if (DEBUG > 0) + print("Threads not supported"); + quit(0); +} + +// Unless there are enough actual cores the spinning threads will not interact +// in the desired way (we'll be waiting on preemption to advance), and this +// makes the test pointless and also will usually make it time out. So bail out +// if we can't have one core per agent. + +if (getCoreCount() < NUMAGENTS) { + if (DEBUG > 0) + print("Fake or feeble hardware"); + quit(0); +} + +// Most of the simulators have poor support for mutual exclusion and are anyway +// too slow; avoid intermittent failures and timeouts. + +if (getBuildConfiguration("arm-simulator") || getBuildConfiguration("arm64-simulator") || + getBuildConfiguration("mips32-simulator") || getBuildConfiguration("mips64-simulator")) +{ + if (DEBUG > 0) + print("Atomicity test disabled on simulator"); + quit(0); +} + +//////////////////////////////////////////////////////////////////////// +// +// Coordination code for bootstrapping workers - use spawn() to create a worker, +// send() to send an item to a worker. send() will send to anyone, so only one +// worker should be receiving at a time. spawn() will block until the worker is +// running; send() will block until the message has been received. + +var COORD_BUSY = 0; +var COORD_NUMLOC = 1; + +var coord = new Int32Array(new SharedArrayBuffer(COORD_NUMLOC*4)); + +function spawn(text) { + text = ` +var _coord = new Int32Array(getSharedObject()); +Atomics.store(_coord, ${COORD_BUSY}, 0); +function receive() { + while (!Atomics.load(_coord, ${COORD_BUSY})) + ; + let x = getSharedObject(); + Atomics.store(_coord, ${COORD_BUSY}, 0); + return x; +} +` + text; + setSharedObject(coord.buffer); + Atomics.store(coord, COORD_BUSY, 1); + evalInWorker(text); + while (Atomics.load(coord, COORD_BUSY)) + ; +} + +function send(x) { + while(Atomics.load(coord, COORD_BUSY)) + ; + setSharedObject(x); + Atomics.store(coord, COORD_BUSY, 1); + while(Atomics.load(coord, COORD_BUSY)) + ; +} + +///////////////////////////////////////////////////////////////////////////////// +// +// The "agents" comprise one master and one or more additional workers. We make +// a separate module for each agent so that test values can be inlined as +// constants. +// +// The master initially sets a shared location LOC to a value START. +// +// Each agent then operates atomically on LOC with an operation OP and a value +// VAL. The operation OP is the same for all agents but each agent `i` has a +// different VAL_i. +// +// To make this more interesting, the value START is distributed as many times +// through the value at LOC as there is space for, and we perform several +// operations back-to-back, with the VAL_i appropriately shifted. +// +// Each agent then spin-waits for LOC to contain a particular RESULT, which is +// always (START OP VAL_0 OP VAL_1 ... VAL_k), again repeated throughout the +// RESULT as appropriate. +// +// The process then starts over, and we repeat the process many times. If we +// fail to have atomicity at any point the program will hang (LOC will never +// attain the desired value) and the test should therefore time out. +// +// (Barriers are needed to make this all work out.) +// +// The general principle for the values is that each VAL should add (or clear) a +// bit of the stored value. +// +// OP START VAL0 VAL1 VAL2 RESULT +// +// ADD[*] 0 1 2 4 7 +// SUB 7 1 2 4 0 +// AND 7 3 6 5 0 +// OR 0 1 2 4 7 +// XOR 0 1 2 4 7 // or start with 7 and end with 0 +// CMPXCHG 0 1 2 4 7 // use nonatomic "or" to add the bit +// +// [*] Running the tests actually assumes that ADD works reasonably well. +// +// TODO - more variants we could test: +// +// - tests that do not drop the values of the atomic ops but accumulate them: +// uses different code generation on x86/x64 +// +// - Xchg needs a different method, since here the atomic thing is that we read +// the "previous value" and set the next value atomically. How can we observe +// that that fails? If we run three agents, which all set the value to X, +// X+1, ..., X+n, with the initial value being (say) X-1, each can record the +// value it observed in a table, and we should be able to predict the counts +// in that table once postprocessed. eg, the counts should all be the same. +// If atomicity fails then a value is read twice when it shouldn't be, and +// some other value is not read at all, and the counts will be off. +// +// - the different rmw operations can usually be combined so that we can test +// the atomicity of operations that may be implemented differently. +// +// - the same tests, with test values as variables instead of constants. + +function makeModule(id) { + let isMaster = id == 0; + let VALSHIFT = NUMAGENTS; // 1 bit per agent + + function makeLoop(bits, name, op, loc, initial, val, expected) { + // Exclude high bit to avoid messing with the sign. + let NUMVALS32 = Math.floor(31/VALSHIFT); + let NUMVALS = bits == 64 ? 2 * NUMVALS32 : Math.floor(Math.min(bits,31)/VALSHIFT); + let BARRIER = "(i32.const 0)"; + let barrier = ` + ;; Barrier + (local.set $barrierValue (i32.add (local.get $barrierValue) (i32.const ${NUMAGENTS}))) + (drop (i32.atomic.rmw.add ${BARRIER} (i32.const 1))) + (loop $c1 + (if (i32.lt_s (i32.atomic.load ${BARRIER}) (local.get $barrierValue)) + (then (br $c1)))) + ;; End barrier +`; + + // Distribute a value `v` across a word NUMVALs times + + function distribute(v) { + if (bits <= 32) + return '0x' + dist32(v); + return '0x' + dist32(v) + dist32(v); + } + + function dist32(v) { + let n = 0; + for (let i=0; i < Math.min(NUMVALS, NUMVALS32); i++) + n = n | (v << (i*VALSHIFT)); + assertEq(n >= 0, true); + return (n + 0x100000000).toString(16).substring(1); + } + + // Position a value `v` at position `pos` in a word + + function format(val, pos) { + if (bits <= 32) + return '0x' + format32(val, pos); + if (pos < NUMVALS32) + return '0x' + '00000000' + format32(val, pos); + return '0x' + format32(val, pos - NUMVALS32) + '00000000'; + } + + function format32(val, pos) { + return ((val << (pos * VALSHIFT)) + 0x100000000).toString(16).substring(1); + } + + let width = bits < 32 ? '' + bits : ''; + let view = bits < 32 ? '_u' : ''; + let prefix = bits == 64 ? 'i64' : 'i32'; + return ` + (func ${name} (param $barrierValue i32) (result i32) + (local $n i32) + (local $tmp ${prefix}) + (local.set $n (i32.const ${ITERATIONS})) + (loop $outer + (if (local.get $n) + (then (block + ${isMaster ? `;; Init +(${prefix}.atomic.store${width} ${loc} (${prefix}.const ${distribute(initial)}))` : ``} + ${barrier} + +${(() => { + let s = `;; Do\n`; + for (let i=0; i < NUMVALS; i++) { + let bitval = `(${prefix}.const ${format(val, i)})` + // The load must be atomic though it would be better if it were relaxed, + // we would avoid fences in that case. + if (op.match(/cmpxchg/)) { + s += `(loop $doit + (local.set $tmp (${prefix}.atomic.load${width}${view} ${loc})) + (br_if $doit (i32.eqz + (${prefix}.eq + (local.get $tmp) + (${op} ${loc} (local.get $tmp) (${prefix}.or (local.get $tmp) ${bitval})))))) + `; + } else { + s += `(drop (${op} ${loc} ${bitval})) + `; + } + } + return s +})()} + (loop $wait_done + (br_if $wait_done (${prefix}.ne (${prefix}.atomic.load${width}${view} ${loc}) (${prefix}.const ${distribute(expected)})))) + ${barrier} + (local.set $n (i32.sub (local.get $n) (i32.const 1))) + (br $outer))))) + (local.get $barrierValue))`; + } + + const ADDLOC = "(i32.const 256)"; + const ADDINIT = 0; + const ADDVAL = [1, 2, 4]; + const ADDRESULT = 7; + + const SUBLOC = "(i32.const 512)"; + const SUBINIT = 7; + const SUBVAL = [1, 2, 4]; + const SUBRESULT = 0; + + const ANDLOC = "(i32.const 768)"; + const ANDINIT = 7; + const ANDVAL = [3, 6, 5]; + const ANDRESULT = 0; + + const ORLOC = "(i32.const 1024)"; + const ORINIT = 0; + const ORVAL = [1, 2, 4]; + const ORRESULT = 7; + + const XORLOC = "(i32.const 1280)"; + const XORINIT = 0; + const XORVAL = [1, 2, 4]; + const XORRESULT = 7; + + const CMPXCHGLOC = "(i32.const 1536)"; + const CMPXCHGINIT = 0; + const CMPXCHGVAL = [1, 2, 4]; + const CMPXCHGRESULT = 7; + + return ` +(module + (import "" "memory" (memory 1 1 shared)) + (import "" "print" (func $print (param i32))) + + ${makeLoop(8, "$test_add8", "i32.atomic.rmw8.add_u", ADDLOC, ADDINIT, ADDVAL[id], ADDRESULT)} + ${makeLoop(8, "$test_sub8", "i32.atomic.rmw8.sub_u", SUBLOC, SUBINIT, SUBVAL[id], SUBRESULT)} + ${makeLoop(8, "$test_and8", "i32.atomic.rmw8.and_u", ANDLOC, ANDINIT, ANDVAL[id], ANDRESULT)} + ${makeLoop(8, "$test_or8", "i32.atomic.rmw8.or_u", ORLOC, ORINIT, ORVAL[id], ORRESULT)} + ${makeLoop(8, "$test_xor8", "i32.atomic.rmw8.xor_u", XORLOC, XORINIT, XORVAL[id], XORRESULT)} + ${makeLoop(8, "$test_cmpxchg8", "i32.atomic.rmw8.cmpxchg_u", CMPXCHGLOC, CMPXCHGINIT, CMPXCHGVAL[id], CMPXCHGRESULT)} + + ${makeLoop(16, "$test_add16", "i32.atomic.rmw16.add_u", ADDLOC, ADDINIT, ADDVAL[id], ADDRESULT)} + ${makeLoop(16, "$test_sub16", "i32.atomic.rmw16.sub_u", SUBLOC, SUBINIT, SUBVAL[id], SUBRESULT)} + ${makeLoop(16, "$test_and16", "i32.atomic.rmw16.and_u", ANDLOC, ANDINIT, ANDVAL[id], ANDRESULT)} + ${makeLoop(16, "$test_or16", "i32.atomic.rmw16.or_u", ORLOC, ORINIT, ORVAL[id], ORRESULT)} + ${makeLoop(16, "$test_xor16", "i32.atomic.rmw16.xor_u", XORLOC, XORINIT, XORVAL[id], XORRESULT)} + ${makeLoop(16, "$test_cmpxchg16", "i32.atomic.rmw16.cmpxchg_u", CMPXCHGLOC, CMPXCHGINIT, CMPXCHGVAL[id], CMPXCHGRESULT)} + + ${makeLoop(32, "$test_add", "i32.atomic.rmw.add", ADDLOC, ADDINIT, ADDVAL[id], ADDRESULT)} + ${makeLoop(32, "$test_sub", "i32.atomic.rmw.sub", SUBLOC, SUBINIT, SUBVAL[id], SUBRESULT)} + ${makeLoop(32, "$test_and", "i32.atomic.rmw.and", ANDLOC, ANDINIT, ANDVAL[id], ANDRESULT)} + ${makeLoop(32, "$test_or", "i32.atomic.rmw.or", ORLOC, ORINIT, ORVAL[id], ORRESULT)} + ${makeLoop(32, "$test_xor", "i32.atomic.rmw.xor", XORLOC, XORINIT, XORVAL[id], XORRESULT)} + ${makeLoop(32, "$test_cmpxchg", "i32.atomic.rmw.cmpxchg", CMPXCHGLOC, CMPXCHGINIT, CMPXCHGVAL[id], CMPXCHGRESULT)} + + ${makeLoop(64, "$test_add64", "i64.atomic.rmw.add", ADDLOC, ADDINIT, ADDVAL[id], ADDRESULT)} + ${makeLoop(64, "$test_sub64", "i64.atomic.rmw.sub", SUBLOC, SUBINIT, SUBVAL[id], SUBRESULT)} + ${makeLoop(64, "$test_and64", "i64.atomic.rmw.and", ANDLOC, ANDINIT, ANDVAL[id], ANDRESULT)} + ${makeLoop(64, "$test_or64", "i64.atomic.rmw.or", ORLOC, ORINIT, ORVAL[id], ORRESULT)} + ${makeLoop(64, "$test_xor64", "i64.atomic.rmw.xor", XORLOC, XORINIT, XORVAL[id], XORRESULT)} + ${makeLoop(64, "$test_cmpxchg64", "i64.atomic.rmw.cmpxchg", CMPXCHGLOC, CMPXCHGINIT, CMPXCHGVAL[id], CMPXCHGRESULT)} + + (func (export "test") + (local $barrierValue i32) + (call $print (i32.const ${10 + id})) + (local.set $barrierValue (call $test_add8 (local.get $barrierValue))) + (local.set $barrierValue (call $test_sub8 (local.get $barrierValue))) + (local.set $barrierValue (call $test_and8 (local.get $barrierValue))) + (local.set $barrierValue (call $test_or8 (local.get $barrierValue))) + (local.set $barrierValue (call $test_xor8 (local.get $barrierValue))) + (local.set $barrierValue (call $test_cmpxchg8 (local.get $barrierValue))) + (call $print (i32.const ${20 + id})) + (local.set $barrierValue (call $test_add16 (local.get $barrierValue))) + (local.set $barrierValue (call $test_sub16 (local.get $barrierValue))) + (local.set $barrierValue (call $test_and16 (local.get $barrierValue))) + (local.set $barrierValue (call $test_or16 (local.get $barrierValue))) + (local.set $barrierValue (call $test_xor16 (local.get $barrierValue))) + (local.set $barrierValue (call $test_cmpxchg16 (local.get $barrierValue))) + (call $print (i32.const ${30 + id})) + (local.set $barrierValue (call $test_add (local.get $barrierValue))) + (local.set $barrierValue (call $test_sub (local.get $barrierValue))) + (local.set $barrierValue (call $test_and (local.get $barrierValue))) + (local.set $barrierValue (call $test_or (local.get $barrierValue))) + (local.set $barrierValue (call $test_xor (local.get $barrierValue))) + (local.set $barrierValue (call $test_cmpxchg (local.get $barrierValue))) + (call $print (i32.const ${40 + id})) + (local.set $barrierValue (call $test_add64 (local.get $barrierValue))) + (local.set $barrierValue (call $test_sub64 (local.get $barrierValue))) + (local.set $barrierValue (call $test_and64 (local.get $barrierValue))) + (local.set $barrierValue (call $test_or64 (local.get $barrierValue))) + (local.set $barrierValue (call $test_xor64 (local.get $barrierValue))) + (local.set $barrierValue (call $test_cmpxchg64 (local.get $barrierValue))) + )) +`; +} + +function makeModule2(id) { + let text = makeModule(id); + if (DEBUG > 1) + print(text); + return new WebAssembly.Module(wasmTextToBinary(text)); +} + +var mods = []; +mods.push(makeModule2(0)); +for ( let i=0; i < NUMWORKERS; i++ ) + mods.push(makeModule2(i+1)); +if (DEBUG > 2) + quit(0); +var mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared: true}); + +//////////////////////////////////////////////////////////////////////// +// +// Worker code + +function startWorkers() { + for ( let i=0; i < NUMWORKERS; i++ ) { + spawn(` +var mem = receive(); +var mod = receive(); +function pr(n) { if (${DEBUG}) print(n); } +var ins = new WebAssembly.Instance(mod, {"":{memory: mem, print:pr}}); +if (${DEBUG} > 0) + print("Running ${i}"); +ins.exports.test(); + `); + send(mem); + send(mods[i+1]); + } +} + +//////////////////////////////////////////////////////////////////////// +// +// Main thread code + +startWorkers(); +function pr(n) { if (DEBUG) print(n); } +var ins = new WebAssembly.Instance(mods[0], {"":{memory: mem, print:pr}}); +if (DEBUG > 0) + print("Running master"); +ins.exports.test(); diff --git a/js/src/jit-test/tests/wasm/backtrace.js b/js/src/jit-test/tests/wasm/backtrace.js new file mode 100644 index 0000000000..ea3825ab92 --- /dev/null +++ b/js/src/jit-test/tests/wasm/backtrace.js @@ -0,0 +1,21 @@ +var code = `(module + (import "env" "test" (func $i)) + (func $t (call $i)) + (export "test" (func $t)) +)`; +var mod = wasmEvalText(code, { + env: { + test: function() { + // Expecting 3 lines in the backtrace (plus last empty). + // The middle one is for the wasm function. + var s = getBacktrace(); + var frames = s.split('\n'); + assertEq(frames.length, 4); + assertEq(/> WebAssembly.Module":wasm-function\[1\]:0x/.test(frames[1]), true); + + // Let's also run DumpBacktrace() to check if we are not crashing. + backtrace(); + } + } +}).exports; +mod.test(); diff --git a/js/src/jit-test/tests/wasm/baseline-abs-addr-opt.js b/js/src/jit-test/tests/wasm/baseline-abs-addr-opt.js new file mode 100644 index 0000000000..49528ce37c --- /dev/null +++ b/js/src/jit-test/tests/wasm/baseline-abs-addr-opt.js @@ -0,0 +1,94 @@ +// Test bounds checking at the end of memory with a constant base pointer. +// This is intended to verify a bounds check elimination optimization in +// the baseline compiler. + +// This can be only a functional test, we can't really see whether +// the optimization is being applied. However, manual inspection +// of the generated code has verified that the optimization is +// being applied. + +// Memory is one page and minimum memory is one page, so accesses across +// the end of the first page should fail. + +function gen(base, offset) { + return wasmEvalText(`(module + (memory 1) + (data (i32.const 65528) "aaaaaaaa") + (func (result i32) + (i32.load offset=${offset} (i32.const ${base}))) + (export "f" (func 0)))`).exports["f"]; +} + +// Memory is two pages but minimum memory is one page, so accesses across +// the end of the first page should succeed. + +function gen2(base, offset) { + return wasmEvalText(`(module + (memory 1) + (data (i32.const 65528) "aaaaaaaa") + (func (result i32) + (drop (memory.grow (i32.const 1))) + (i32.store (i32.const 65536) (i32.const 0x61616161)) + (i32.store (i32.const 65540) (i32.const 0x61616161)) + (i32.store (i32.const 80000) (i32.const 0x61616161)) + (i32.store (i32.const 120000) (i32.const 0x61616161)) + (i32.load offset=${offset} (i32.const ${base}))) + (export "f" (func 0)))`).exports["f"]; +} + +// Access the first page. +// None of these should have an explicit bounds check generated for them as the +// effective address is less than the sum of the minimum heap length and the +// offset guard length. + +let onfirst = [[4,65528], [3,65528], [2,65528], [1,65528], [0,65528], + [3,65529], [2,65529], [1,65529], [0,65529], + [2,65530], [1,65530], [0,65530], + [1,65531], [0,65531], + [0,65532], + [256, 65536-256-4], + [2048, 65536-2048-4], + [30000, 65536-30000-4]]; + +for ( let [x,y] of onfirst ) { + assertEq(gen(x,y)(), 0x61616161|0); + assertEq(gen(y,x)(), 0x61616161|0); +} + +// Access the second page. +// Again, no explicit bounds checks should be generated here. + +let onsecond = [[65532,1], [65532,2], [65532,3], [65532,4], [65532,5], [65532,6], [65532,7], [65532,8], + [65531,2], [65531,3], [65531,4], [65531,5], [65531,6], [65531,7], [65531,8], [65531,9], + [65530,3], [65530,4], [65530,5], [65530,6], [65530,7], [65530,8], [65530,9], [65530,10], + [65529,4], [65529,5], [65529,6], [65529,7], [65529,8], [65529,9], [65529,10], [65529,11], + [65528,5], [65528,6], [65528,7], [65528,8], [65528,9], [65528,10], [65528,11], [65528,12], + [65527,6], [65527,7], [65527,8], [65527,9], [65527,10], [65527,11], [65527,12], [65527,13], + [65526,7], [65526,8], [65526,9], [65526,10], [65526,11], [65526,12], [65526,13], [65526,14], + [65525,8], [65525,9], [65525,10], [65525,11], [65525,12], [65525,13], [65525,14], [65525,15], + [256, 65536-256], + [2048, 65536-2048], + [30000, 50000], + [30000, 90000]]; + +for ( let [x,y] of onsecond ) { + assertErrorMessage(() => { gen(x,y)() }, WebAssembly.RuntimeError, /index out of bounds/); + assertErrorMessage(() => { gen(y,x)() }, WebAssembly.RuntimeError, /index out of bounds/); + + assertEq(gen2(x,y)(), 0x61616161|0); + assertEq(gen2(y,x)(), 0x61616161|0); +} + +// Access the third page. +// Here the explicit bounds check cannot be omitted, as the access is +// beyond min + offset guard. + +let onthird = [[60000, 90000]]; + +for ( let [x,y] of onthird ) { + assertErrorMessage(() => { gen(x,y)() }, WebAssembly.RuntimeError, /index out of bounds/); + assertErrorMessage(() => { gen(y,x)() }, WebAssembly.RuntimeError, /index out of bounds/); + + assertErrorMessage(() => { gen2(x,y)() }, WebAssembly.RuntimeError, /index out of bounds/); + assertErrorMessage(() => { gen2(y,x)() }, WebAssembly.RuntimeError, /index out of bounds/); +} diff --git a/js/src/jit-test/tests/wasm/baseline-opt.js b/js/src/jit-test/tests/wasm/baseline-opt.js new file mode 100644 index 0000000000..87df25c245 --- /dev/null +++ b/js/src/jit-test/tests/wasm/baseline-opt.js @@ -0,0 +1,108 @@ +// Point-testing various optimizations in the wasm baseline compiler. + +// Boolean optimization for control (bug 1286816). +// +// These optimizations combine a test (a comparison or Eqz) with an +// immediately following conditional branch (BrIf, If, and Select), to +// avoid generating a boolean value that is then tested with a +// compare-to-zero. +// +// On AngryBots as of November 2016, 84% of all test instructions +// (measured statically) are optimized by this method. + +function testEqzBrIf(value, type, untaken, taken, expected) { + var f = wasmEvalText(`(module + (func (result i32) + (local ${type}) + (local i32) + (local.set 0 (${type}.const ${value})) + (local.set 1 (i32.const ${taken})) + (block $b + (br_if $b (${type}.eqz (local.get 0))) + (local.set 1 (i32.const ${untaken}))) + (local.get 1)) + (export "f" (func 0)))`).exports["f"]; + assertEq(f(), expected); +} + +["i32", "i64"].forEach(t => testEqzBrIf(0, t, 37, 42, 42)); // Taken +["i32", "i64"].forEach(t => testEqzBrIf(1, t, 37, 42, 37)); // Untaken + +function testCmpBrIf(value, type, untaken, taken, expected) { + var f = wasmEvalText(`(module + (func (result i32) + (local ${type}) + (local i32) + (local.set 1 (i32.const ${taken})) + (block $b + (br_if $b (${type}.eq (local.get 0) (${type}.const ${value}))) + (local.set 1 (i32.const ${untaken}))) + (local.get 1)) + (export "f" (func 0)))`).exports["f"]; + assertEq(f(), expected); +} + +["i32", "i64", "f32", "f64"].forEach(t => testCmpBrIf(0, t, 37, 42, 42)); // Branch taken +["i32", "i64", "f32", "f64"].forEach(t => testCmpBrIf(1, t, 37, 42, 37)); // Branch untaken + +function testEqzSelect(value, type, iftrue, iffalse, expected) { + var f = wasmEvalText(`(module + (func (result i32) + (local ${type}) + (local.set 0 (${type}.const ${value})) + (select (i32.const ${iftrue}) + (i32.const ${iffalse}) + (${type}.eqz (local.get 0)))) + (export "f" (func 0)))`).exports["f"]; + assertEq(f(), expected); +} + +["i32", "i64"].forEach(t => testEqzSelect(0, t, 42, 37, 42)); // Select first +["i32", "i64"].forEach(t => testEqzSelect(1, t, 42, 37, 37)); // Select second + +function testCmpSelect(value, type, iftrue, iffalse, expected) { + var f = wasmEvalText(`(module + (func (result i32) + (local ${type}) + (select (i32.const ${iftrue}) + (i32.const ${iffalse}) + (${type}.eq (local.get 0) (${type}.const ${value})))) + (export "f" (func 0)))`).exports["f"]; + assertEq(f(), expected); +} + +["i32", "i64", "f32", "f64"].forEach(t => testCmpSelect(0, t, 42, 37, 42)); // Select first +["i32", "i64", "f32", "f64"].forEach(t => testCmpSelect(1, t, 42, 37, 37)); // Select second + +function testEqzIf(value, type, trueBranch, falseBranch, expected) { + var f = wasmEvalText(`(module + (func (result i32) + (local ${type}) + (local i32) + (local.set 0 (${type}.const ${value})) + (if (${type}.eqz (local.get 0)) + (then (local.set 1 (i32.const ${trueBranch}))) + (else (local.set 1 (i32.const ${falseBranch})))) + (local.get 1)) + (export "f" (func 0)))`).exports["f"]; + assertEq(f(), expected); +} + +["i32", "i64"].forEach(t => testEqzIf(0, t, 42, 37, 42)); // Taken +["i32", "i64"].forEach(t => testEqzIf(1, t, 42, 37, 37)); // Untaken + +function testCmpIf(value, type, trueBranch, falseBranch, expected) { + var f = wasmEvalText(`(module + (func (result i32) + (local ${type}) + (local i32) + (if (${type}.eq (local.get 0) (${type}.const ${value})) + (then (local.set 1 (i32.const ${trueBranch}))) + (else (local.set 1 (i32.const ${falseBranch})))) + (local.get 1)) + (export "f" (func 0)))`).exports["f"]; + assertEq(f(), expected); +} + +["i32", "i64", "f32", "f64"].forEach(t => testCmpIf(0, t, 42, 37, 42)); // Taken +["i32", "i64", "f32", "f64"].forEach(t => testCmpIf(1, t, 42, 37, 37)); // Untaken diff --git a/js/src/jit-test/tests/wasm/basic.js b/js/src/jit-test/tests/wasm/basic.js new file mode 100644 index 0000000000..8935b36228 --- /dev/null +++ b/js/src/jit-test/tests/wasm/basic.js @@ -0,0 +1,362 @@ +const { LinkError } = WebAssembly; + +// ---------------------------------------------------------------------------- +// exports + +var o = wasmEvalText('(module)').exports; +assertEq(Object.getOwnPropertyNames(o).length, 0); + +var o = wasmEvalText('(module (func))').exports; +assertEq(Object.getOwnPropertyNames(o).length, 0); + +var o = wasmEvalText('(module (func) (export "a" (func 0)))').exports; +var names = Object.getOwnPropertyNames(o); +assertEq(names.length, 1); +assertEq(names[0], 'a'); +var desc = Object.getOwnPropertyDescriptor(o, 'a'); +assertEq(typeof desc.value, "function"); +assertEq(desc.value.name, "0"); +assertEq(desc.value.length, 0); +assertEq(desc.value(), undefined); +assertEq(desc.writable, false); +assertEq(desc.enumerable, true); +assertEq(desc.configurable, false); +assertEq(desc.value(), undefined); + +wasmValidateText('(module (func) (func) (export "a" (func 0)))'); +wasmValidateText('(module (func) (func) (export "a" (func 1)))'); +wasmValidateText('(module (func $a) (func $b) (export "a" (func $a)) (export "b" (func $b)))'); +wasmValidateText('(module (func $a) (func $b) (export "a" (func $a)) (export "b" (func $b)))'); + +wasmFailValidateText('(module (func) (export "a" (func 1)))', /exported function index out of bounds/); +wasmFailValidateText('(module (func) (func) (export "a" (func 2)))', /exported function index out of bounds/); + +var o = wasmEvalText('(module (func) (export "a" (func 0)) (export "b" (func 0)))').exports; +assertEq(Object.getOwnPropertyNames(o).sort().toString(), "a,b"); +assertEq(o.a.name, "0"); +assertEq(o.b.name, "0"); +assertEq(o.a === o.b, true); + +var o = wasmEvalText('(module (func) (func) (export "a" (func 0)) (export "b" (func 1)))').exports; +assertEq(Object.getOwnPropertyNames(o).sort().toString(), "a,b"); +assertEq(o.a.name, "0"); +assertEq(o.b.name, "1"); +assertEq(o.a === o.b, false); + +var o = wasmEvalText('(module (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) (export "a" (func 0)) (export "b" (func 1)))').exports; +assertEq(o.a(), 1); +assertEq(o.b(), 2); +var o = wasmEvalText('(module (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) (export "a" (func 1)) (export "b" (func 0)))').exports; +assertEq(o.a(), 2); +assertEq(o.b(), 1); + +wasmFailValidateText('(module (func) (export "a" (func 0)) (export "a" (func 0)))', /duplicate export/); +wasmFailValidateText('(module (func) (func) (export "a" (func 0)) (export "a" (func 1)))', /duplicate export/); + +// ---------------------------------------------------------------------------- +// signatures + +wasmFailValidateText('(module (func (result i32)))', emptyStackError); +wasmFailValidateText('(module (func (result i32) (nop)))', emptyStackError); + +wasmValidateText('(module (func (nop)))'); +wasmValidateText('(module (func (result i32) (i32.const 42)))'); +wasmValidateText('(module (func (param i32)))'); +wasmValidateText('(module (func (param i32) (result i32) (i32.const 42)))'); +wasmValidateText('(module (func (param i32) (result i32) (i32.const 42)))'); +wasmValidateText('(module (func (param f32)))'); +wasmValidateText('(module (func (param f64)))'); + +wasmFullPassI64('(module (func $run (result i64) (i64.const 123)))', 123); +wasmFullPassI64('(module (func $run (param i64) (result i64) (local.get 0)))', + '0x123400007fffffff', + {}, + '(i64.const 0x123400007fffffff)'); +wasmFullPassI64('(module (func $run (param i64) (result i64) (i64.add (local.get 0) (i64.const 1))))', + '0x1234000100000000', + {}, + '(i64.const 0x12340000ffffffff)'); + +// ---------------------------------------------------------------------------- +// imports + +const noImportObj = "second argument must be an object"; + +assertErrorMessage(() => wasmEvalText('(module (import "a" "b" (func)))', 1), TypeError, noImportObj); +assertErrorMessage(() => wasmEvalText('(module (import "a" "b" (func)))', null), TypeError, noImportObj); + +const notObject = /import object field '\w*' is not an Object/; +const notFunction = /import object field '\w*' is not a Function/; + +var code = '(module (import "a" "b" (func)))'; +assertErrorMessage(() => wasmEvalText(code), TypeError, noImportObj); +assertErrorMessage(() => wasmEvalText(code, {}), TypeError, notObject); +assertErrorMessage(() => wasmEvalText(code, {a:1}), TypeError, notObject); +assertErrorMessage(() => wasmEvalText(code, {a:{}}), LinkError, notFunction); +assertErrorMessage(() => wasmEvalText(code, {a:{b:1}}), LinkError, notFunction); +wasmEvalText(code, {a:{b:()=>{}}}); + +var code = '(module (import "" "b" (func)))'; +wasmEvalText(code, {"":{b:()=>{}}}); + +var code = '(module (import "a" "" (func)))'; +assertErrorMessage(() => wasmEvalText(code), TypeError, noImportObj); +assertErrorMessage(() => wasmEvalText(code, {}), TypeError, notObject); +assertErrorMessage(() => wasmEvalText(code, {a:1}), TypeError, notObject); +wasmEvalText(code, {a:{"":()=>{}}}); + +var code = '(module (import "a" "" (func)) (import "b" "c" (func)) (import "c" "" (func)))'; +assertErrorMessage(() => wasmEvalText(code, {a:()=>{}, b:{c:()=>{}}, c:{}}), LinkError, notFunction); +wasmEvalText(code, {a:{"":()=>{}}, b:{c:()=>{}}, c:{"":()=>{}}}); + +wasmEvalText('(module (import "a" "" (func (result i32))))', {a:{"":()=>{}}}); +wasmEvalText('(module (import "a" "" (func (result f32))))', {a:{"":()=>{}}}); +wasmEvalText('(module (import "a" "" (func (result f64))))', {a:{"":()=>{}}}); +wasmEvalText('(module (import "a" "" (func $foo (result f64))))', {a:{"":()=>{}}}); + +// ---------------------------------------------------------------------------- +// memory + +wasmValidateText('(module (memory 0))'); +wasmValidateText('(module (memory 1))'); + +var buf = wasmEvalText('(module (memory 1) (export "memory" (memory 0)))').exports.memory.buffer; +assertEq(buf instanceof ArrayBuffer, true); +assertEq(buf.byteLength, 65536); + +var obj = wasmEvalText('(module (memory 1) (func (result i32) (i32.const 42)) (func (nop)) (export "memory" (memory 0)) (export "b" (func 0)) (export "c" (func 1)))').exports; +assertEq(obj.memory.buffer instanceof ArrayBuffer, true); +assertEq(obj.b instanceof Function, true); +assertEq(obj.c instanceof Function, true); +assertEq(obj.memory.buffer.byteLength, 65536); +assertEq(obj.b(), 42); +assertEq(obj.c(), undefined); + +var buf = wasmEvalText('(module (memory 1) (data (i32.const 0) "") (export "memory" (memory 0)))').exports.memory.buffer; +assertEq(new Uint8Array(buf)[0], 0); + +var buf = wasmEvalText('(module (memory 1) (data (i32.const 65536) "") (export "memory" (memory 0)))').exports.memory.buffer; +assertEq(new Uint8Array(buf)[0], 0); + +var buf = wasmEvalText('(module (memory 1) (data (i32.const 0) "a") (export "memory" (memory 0)))').exports.memory.buffer; +assertEq(new Uint8Array(buf)[0], 'a'.charCodeAt(0)); + +var buf = wasmEvalText('(module (memory 1) (data (i32.const 0) "a") (data (i32.const 2) "b") (export "memory" (memory 0)))').exports.memory.buffer; +assertEq(new Uint8Array(buf)[0], 'a'.charCodeAt(0)); +assertEq(new Uint8Array(buf)[1], 0); +assertEq(new Uint8Array(buf)[2], 'b'.charCodeAt(0)); + +var buf = wasmEvalText('(module (memory 1) (data (i32.const 65535) "c") (export "memory" (memory 0)))').exports.memory.buffer; +assertEq(new Uint8Array(buf)[0], 0); +assertEq(new Uint8Array(buf)[65535], 'c'.charCodeAt(0)); + +// ---------------------------------------------------------------------------- +// locals + +assertEq(wasmEvalText('(module (func (param i32) (result i32) (local.get 0)) (export "" (func 0)))').exports[""](), 0); +assertEq(wasmEvalText('(module (func (param i32) (result i32) (local.get 0)) (export "" (func 0)))').exports[""](42), 42); +assertEq(wasmEvalText('(module (func (param i32) (param i32) (result i32) (local.get 0)) (export "" (func 0)))').exports[""](42, 43), 42); +assertEq(wasmEvalText('(module (func (param i32) (param i32) (result i32) (local.get 1)) (export "" (func 0)))').exports[""](42, 43), 43); + +wasmFailValidateText('(module (func (local.get 0)))', /(local.get index out of range)|(local index out of bounds)/); +wasmFailValidateText('(module (func (result f32) (local i32) (local.get 0)))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (result i32) (local f32) (local.get 0)))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (result f32) (local f32) (local.get 0)))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param i32) (result i32) (local f32) (local.get 1)))', mismatchError("f32", "i32")); + +wasmValidateText('(module (func (local i32)))'); +wasmValidateText('(module (func (local i32) (local f32)))'); + +wasmFullPass('(module (func (result i32) (local i32) (local.get 0)) (export "run" (func 0)))', 0); +wasmFullPass('(module (func (param i32) (result i32) (local f32) (local.get 0)) (export "run" (func 0)))', 0); +wasmFullPass('(module (func (param i32) (result f32) (local f32) (local.get 1)) (export "run" (func 0)))', 0); + +wasmFailValidateText('(module (func (local.set 0 (i32.const 0))))', /(local.set index out of range)|(local index out of bounds)/); +wasmFailValidateText('(module (func (local f32) (local.set 0 (i32.const 0))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (local f32) (local.set 0 (nop))))', emptyStackError); +wasmFailValidateText('(module (func (local i32) (local f32) (local.set 0 (local.get 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (local i32) (local f32) (local.set 1 (local.get 0))))', mismatchError("i32", "f32")); + +wasmValidateText('(module (func (local i32) (local.set 0 (i32.const 0))))'); +wasmValidateText('(module (func (local i32) (local f32) (local.set 0 (local.get 0))))'); +wasmValidateText('(module (func (local i32) (local f32) (local.set 1 (local.get 1))))'); + +wasmFullPass('(module (func (result i32) (local i32) (local.tee 0 (i32.const 42))) (export "run" (func 0)))', 42); +wasmFullPass('(module (func (result i32) (local i32) (local.tee 0 (local.get 0))) (export "run" (func 0)))', 0); + +wasmFullPass('(module (func (param $a i32) (result i32) (local.get $a)) (export "run" (func 0)))', 0); +wasmFullPass('(module (func (param $a i32) (result i32) (local $b i32) (block (result i32) (local.set $b (local.get $a)) (local.get $b))) (export "run" (func 0)))', 42, {}, 42); + +wasmValidateText('(module (func (local i32) (local $a f32) (local.set 0 (i32.const 1)) (local.set $a (f32.const nan))))'); + +// ---------------------------------------------------------------------------- +// blocks + +wasmFullPass('(module (func (block )) (export "run" (func 0)))', undefined); + +wasmFailValidateText('(module (func (result i32) (block )))', emptyStackError); +wasmFailValidateText('(module (func (result i32) (block (block ))))', emptyStackError); +wasmFailValidateText('(module (func (local i32) (local.set 0 (block ))))', emptyStackError); + +wasmFullPass('(module (func (block (block ))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (result i32) (block (result i32) (i32.const 42))) (export "run" (func 0)))', 42); +wasmFullPass('(module (func (result i32) (block (result i32) (block (result i32) (i32.const 42)))) (export "run" (func 0)))', 42); +wasmFailValidateText('(module (func (result f32) (block (result i32) (i32.const 0))))', mismatchError("i32", "f32")); + +wasmFullPass('(module (func (result i32) (block (result i32) (drop (i32.const 13)) (block (result i32) (i32.const 42)))) (export "run" (func 0)))', 42); +wasmFailValidateText('(module (func (param f32) (result f32) (block (result i32) (drop (local.get 0)) (i32.const 0))))', mismatchError("i32", "f32")); + +wasmFullPass('(module (func (result i32) (local i32) (local.set 0 (i32.const 42)) (local.get 0)) (export "run" (func 0)))', 42); + +// ---------------------------------------------------------------------------- +// calls + +wasmFailValidateText('(module (func (nop)) (func (call 0 (i32.const 0))))', unusedValuesError); + +wasmFailValidateText('(module (func (param i32) (nop)) (func (call 0)))', emptyStackError); +wasmFailValidateText('(module (func (param f32) (nop)) (func (call 0 (i32.const 0))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (nop)) (func (call 3)))', /(callee index out of range)|(function index out of bounds)/); + +wasmValidateText('(module (func (nop)) (func (call 0)))'); +wasmValidateText('(module (func (param i32) (nop)) (func (call 0 (i32.const 0))))'); + +wasmFullPass('(module (func (result i32) (i32.const 42)) (func (result i32) (call 0)) (export "run" (func 1)))', 42); +assertThrowsInstanceOf(() => wasmEvalText('(module (func (call 0)) (export "" (func 0)))').exports[""](), InternalError); +assertThrowsInstanceOf(() => wasmEvalText('(module (func (call 1)) (func (call 0)) (export "" (func 0)))').exports[""](), InternalError); + +wasmValidateText('(module (func (param i32 f32)) (func (call 0 (i32.const 0) (f32.const nan))))'); +wasmFailValidateText('(module (func (param i32 f32)) (func (call 0 (i32.const 0) (i32.const 0))))', mismatchError("i32", "f32")); + +wasmFailValidateText('(module (import "a" "" (func)) (func (call 0 (i32.const 0))))', unusedValuesError); +wasmFailValidateText('(module (import "a" "" (func (param i32))) (func (call 0)))', emptyStackError); +wasmFailValidateText('(module (import "a" "" (func (param f32))) (func (call 0 (i32.const 0))))', mismatchError("i32", "f32")); + +assertErrorMessage(() => wasmEvalText('(module (import "a" "" (func)) (func (call 1)))'), TypeError, noImportObj); +wasmEvalText('(module (import "" "a" (func)) (func (call 0)))', {"":{a:()=>{}}}); +wasmEvalText('(module (import "" "a" (func (param i32))) (func (call 0 (i32.const 0))))', {"":{a:()=>{}}}); + +function checkF32CallImport(v) { + wasmFullPass('(module (import "" "a" (func (result f32))) (func (result f32) (call 0)) (export "run" (func 1)))', + Math.fround(v), + {"":{a:()=>{ return v; }}}); + wasmFullPass('(module (import "" "a" (func (param f32))) (func (param f32) (call 0 (local.get 0))) (export "run" (func 1)))', + undefined, + {"":{a:x=>{ assertEq(Math.fround(v), x); }}}, + v); +} +checkF32CallImport(13.37); +checkF32CallImport(NaN); +checkF32CallImport(-Infinity); +checkF32CallImport(-0); +checkF32CallImport(Math.pow(2, 32) - 1); + +var counter = 0; +var f = wasmEvalText('(module (import "" "inc" (func)) (func (call 0)) (export "" (func 1)))', {"":{inc:()=>counter++}}).exports[""]; +var g = wasmEvalText('(module (import "" "f" (func)) (func (block (call 0) (call 0))) (export "" (func 1)))', {"":{f}}).exports[""]; +f(); +assertEq(counter, 1); +g(); +assertEq(counter, 3); + +var f = wasmEvalText('(module (import "" "callf" (func)) (func (call 0)) (export "" (func 1)))', {"":{callf:()=>f()}}).exports[""]; +assertThrowsInstanceOf(() => f(), InternalError); + +var f = wasmEvalText('(module (import "" "callg" (func)) (func (call 0)) (export "" (func 1)))', {"":{callg:()=>g()}}).exports[""]; +var g = wasmEvalText('(module (import "" "callf" (func)) (func (call 0)) (export "" (func 1)))', {"":{callf:()=>f()}}).exports[""]; +assertThrowsInstanceOf(() => f(), InternalError); + +var code = '(module (import "" "one" (func (result i32))) (import "" "two" (func (result i32))) (func (result i32) (i32.const 3)) (func (result i32) (i32.const 4)) (func (result i32) BODY) (export "run" (func 4)))'; +var imports = {"":{one:()=>1, two:()=>2}}; +wasmFullPass(code.replace('BODY', '(call 0)'), 1, imports); +wasmFullPass(code.replace('BODY', '(call 1)'), 2, imports); +wasmFullPass(code.replace('BODY', '(call 2)'), 3, imports); +wasmFullPass(code.replace('BODY', '(call 3)'), 4, imports); + +wasmFullPass(`(module (import "" "evalcx" (func (param i32) (result i32))) (func (result i32) (call 0 (i32.const 0))) (export "run" (func 1)))`, 0, {"":{evalcx}}); + +if (typeof evaluate === 'function') + evaluate(`new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module)'))) `, { fileName: null }); + +wasmFailValidateText(`(module (type $t (func)) (func (call_indirect (type $t) (i32.const 0))))`, /(can't call_indirect without a table)|(unknown table)/); + +var {v2i, i2i, i2v} = wasmEvalText(`(module + (type (func (result i32))) + (type (func (param i32) (result i32))) + (type (func (param i32))) + (func (type 0) (i32.const 13)) + (func (type 0) (i32.const 42)) + (func (type 1) (i32.add (local.get 0) (i32.const 1))) + (func (type 1) (i32.add (local.get 0) (i32.const 2))) + (func (type 1) (i32.add (local.get 0) (i32.const 3))) + (func (type 1) (i32.add (local.get 0) (i32.const 4))) + (table funcref (elem 0 1 2 3 4 5)) + (func (param i32) (result i32) (call_indirect (type 0) (local.get 0))) + (func (param i32) (param i32) (result i32) (call_indirect (type 1) (local.get 1) (local.get 0))) + (func (param i32) (call_indirect (type 2) (i32.const 0) (local.get 0))) + (export "v2i" (func 6)) + (export "i2i" (func 7)) + (export "i2v" (func 8)) +)`).exports; + +const signatureMismatch = /indirect call signature mismatch/; + +assertEq(v2i(0), 13); +assertEq(v2i(1), 42); +assertErrorMessage(() => v2i(2), Error, signatureMismatch); +assertErrorMessage(() => v2i(3), Error, signatureMismatch); +assertErrorMessage(() => v2i(4), Error, signatureMismatch); +assertErrorMessage(() => v2i(5), Error, signatureMismatch); + +assertErrorMessage(() => i2i(0), Error, signatureMismatch); +assertErrorMessage(() => i2i(1), Error, signatureMismatch); +assertEq(i2i(2, 100), 101); +assertEq(i2i(3, 100), 102); +assertEq(i2i(4, 100), 103); +assertEq(i2i(5, 100), 104); + +assertErrorMessage(() => i2v(0), Error, signatureMismatch); +assertErrorMessage(() => i2v(1), Error, signatureMismatch); +assertErrorMessage(() => i2v(2), Error, signatureMismatch); +assertErrorMessage(() => i2v(3), Error, signatureMismatch); +assertErrorMessage(() => i2v(4), Error, signatureMismatch); +assertErrorMessage(() => i2v(5), Error, signatureMismatch); + +{ + enableGeckoProfiling(); + + var stack; + wasmFullPass( + `(module + (type $v2v (func)) + (import "" "f" (func $foo)) + (func $a (call $foo)) + (func $b (result i32) (i32.const 0)) + (table funcref (elem $a $b)) + (func $bar (call_indirect (type $v2v) (i32.const 0))) + (export "run" (func $bar)) + )`, + undefined, + {"":{f:() => { stack = new Error().stack }}} + ); + + disableGeckoProfiling(); + + var inner = stack.indexOf("wasm-function[1]"); + var outer = stack.indexOf("wasm-function[3]"); + assertEq(inner === -1, false); + assertEq(outer === -1, false); + assertEq(inner < outer, true); +} + +for (bad of [6, 7, 100, Math.pow(2,31)-1, Math.pow(2,31), Math.pow(2,31)+1, Math.pow(2,32)-2, Math.pow(2,32)-1]) { + assertThrowsInstanceOf(() => v2i(bad), WebAssembly.RuntimeError); + assertThrowsInstanceOf(() => i2i(bad, 0), WebAssembly.RuntimeError); + assertThrowsInstanceOf(() => i2v(bad, 0), WebAssembly.RuntimeError); +} + +wasmValidateText('(module (func $foo (nop)) (func (call $foo)))'); +wasmValidateText('(module (func (call $foo)) (func $foo (nop)))'); +wasmValidateText('(module (import "" "a" (func $bar)) (func (call $bar)) (func $foo (nop)))'); + +var exp = wasmEvalText(`(module (func (export "f")))`).exports; +assertEq(Object.isFrozen(exp), true); diff --git a/js/src/jit-test/tests/wasm/bce-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/bce-x64-ion-codegen.js new file mode 100644 index 0000000000..9d64354bc9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/bce-x64-ion-codegen.js @@ -0,0 +1,68 @@ +// |jit-test| --wasm-compiler=optimizing; --disable-wasm-huge-memory; --spectre-mitigations=off; skip-if: !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator") || getJitCompilerOptions()["ion.check-range-analysis"]; include:codegen-x64-test.js + +// Spectre mitigation is disabled above to make the generated code simpler to +// match; ion.check-range-analysis makes a hash of the code and makes testing +// pointless. + +// White-box testing of bounds check elimination on 64-bit systems. +// +// This is probably fairly brittle, but BCE on 64-bit platforms regressed (bug +// 1735207) without us noticing, so it's not like we can do without these tests. +// +// See also bce-x86-ion-codegen.js. +// +// If this turns out to be too brittle to be practical then an alternative to +// testing the output code is to do what we do for SIMD, record (in a log or +// buffer of some kind) that certain optimizations triggered, and then check the +// log. + +var memTypes = ['']; +if (wasmMemory64Enabled()) { + memTypes.push('i64') +} + +for ( let memType of memTypes ) { + let dataType = memType ? memType : 'i32'; + + // Make sure the check for the second load is removed: the two load + // instructions should appear back-to-back in the output. + codegenTestX64_adhoc( +`(module + (memory ${memType} 1) + (func (export "f") (param ${dataType}) (result i32) + (local ${dataType}) + (local.set 1 (${dataType}.add (local.get 0) (${dataType}.const 8))) + (i32.load (local.get 1)) + drop + (i32.load (local.get 1))))`, + 'f', ` +48 3b .. cmp %r.., %r.. +0f 83 .. 00 00 00 jnb 0x00000000000000.. +41 8b .. .. movl \\(%r15,%r..,1\\), %e.. +41 8b .. .. movl \\(%r15,%r..,1\\), %eax`, + {no_prefix:true}); + + // Make sure constant indices below the heap minimum do not require a bounds + // check. + codegenTestX64_adhoc( +`(module + (memory ${memType} 1) + (func (export "f") (result i32) + (i32.load (${dataType}.const 16))))`, + 'f', + `41 8b 47 10 movl 0x10\\(%r15\\), %eax`); + + // Ditto, even at the very limit of the known heap, extending into the guard + // page. This is an OOB access, of course, but it needs no explicit bounds + // check. + codegenTestX64_adhoc( +`(module + (memory ${memType} 1) + (func (export "f") (result i32) + (i32.load (${dataType}.const 65535))))`, + 'f', +` +b8 ff ff 00 00 mov \\$0xFFFF, %eax +41 8b 04 07 movl \\(%r15,%rax,1\\), %eax`); +} + diff --git a/js/src/jit-test/tests/wasm/bce-x86-ion-codegen.js b/js/src/jit-test/tests/wasm/bce-x86-ion-codegen.js new file mode 100644 index 0000000000..d643091fc6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/bce-x86-ion-codegen.js @@ -0,0 +1,54 @@ +// |jit-test| --wasm-compiler=optimizing; --spectre-mitigations=off; skip-if: !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x86") || getBuildConfiguration("simulator") || getJitCompilerOptions()["ion.check-range-analysis"]; include:codegen-x86-test.js + +// Spectre mitigation is disabled above to make the generated code simpler to +// match; ion.check-range-analysis makes a hash of the code and makes testing +// pointless. + +// White-box testing of bounds check elimination on 32-bit systems. +// +// This is probably fairly brittle, but BCE (on 64-bit platforms) regressed (bug +// 1735207) without us noticing, so it's not like we can do without these tests. +// +// See also bce-x64-ion-codegen.js. + +// Make sure the check for the second load is removed: the two load instructions +// should appear back-to-back in the output. +codegenTestX86_adhoc( +`(module + (memory 1) + (func (export "f") (param i32) (result i32) + (local i32) + (local.set 1 (i32.add (local.get 0) (i32.const 4))) + (i32.load (local.get 1)) + drop + (i32.load (local.get 1))))`, + 'f', ` +3b .. cmp %e.., %e.. +0f 83 .. 00 00 00 jnb 0x00000000000000.. +8b .. .. movl \\(%r..,%r..,1\\), %e.. +8b .. .. movl \\(%r..,%r..,1\\), %eax`, + {no_prefix:true}); + +// Make sure constant indices below the heap minimum do not require a bounds check. +// The first movl from *rsi below loads the heap base from Tls, an x86-ism. +codegenTestX86_adhoc( +`(module + (memory 1) + (func (export "f") (result i32) + (i32.load (i32.const 16))))`, + 'f', ` +8b .. movl \\(%rsi\\), %e.. +8b .. 10 movl 0x10\\(%r..\\), %eax`); + +// Ditto, even at the very limit of the known heap, extending into the guard +// page. This is an OOB access, of course, but it needs no explicit bounds +// check. +codegenTestX86_adhoc( +`(module + (memory 1) + (func (export "f") (result i32) + (i32.load (i32.const 65535))))`, + 'f', +` +8b .. movl \\(%rsi\\), %e.. +8b .. ff ff 00 00 movl 0xFFFF\\(%r..\\), %eax`); diff --git a/js/src/jit-test/tests/wasm/bce.js b/js/src/jit-test/tests/wasm/bce.js new file mode 100644 index 0000000000..0097ad7f54 --- /dev/null +++ b/js/src/jit-test/tests/wasm/bce.js @@ -0,0 +1,190 @@ +mem='\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f'+ + '\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'+ + '\x00'.repeat(65488) + + '\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' + +let accessWidth = { + '8_s': 1, + '8_u': 1, + '16_s': 2, + '16_u': 2, + '': 4, + 'f32': 4, + 'f64': 8, +} + +let baseOp = { + '8_s': 'i32', + '8_u': 'i32', + '16_s': 'i32', + '16_u': 'i32', + '': 'i32', + 'f32': 'f32', + 'f64': 'f64', +} + +function toSigned(width, num) { + let unsignedMax = Math.pow(2, accessWidth[width] * 8) - 1; + let signedMax = Math.pow(2, accessWidth[width] * 8 - 1) - 1; + + return (num <= signedMax ? num : -(unsignedMax + 1 - num)); +} + +function fromLittleEndianNum(width, bytes) { + let base = 1; + var res = 0; + for (var i = 0; i < accessWidth[width]; i++) { + res += base * bytes[i]; + base *= 256; + } + return res; +} + +function getInt(width, offset, mem) { + var bytes = [ ]; + for (var i = offset; i < offset + accessWidth[width]; i++) { + if (i < mem.length) + bytes.push(mem.charCodeAt(i)); + else + bytes.push(0); + } + + var res = fromLittleEndianNum(width, bytes); + if (width == '8_s' || width == '16_s' || width == '') + res = toSigned(width, res); + return res; +} + +function loadTwiceModule(type, ext, offset, align) { + // TODO: Generate memory from byte string + return wasmEvalText( + `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (data (i32.const 65520) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func (param i32) (param i32) (result ${type}) + (drop (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (local.get 0) + )) + (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (local.get 1) + ) + ) (export "" (func 0)))` + ).exports[""]; +} + +function loadTwiceSameBasePlusConstModule(type, ext, offset, align, addConst) { + return wasmEvalText( + `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (data (i32.const 65520) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func (param i32) (result ${type}) + (drop (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (local.get 0) + )) + (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (i32.add (local.get 0) (i32.const ${addConst})) + ) + ) (export "" (func 0)))` + ).exports[""]; +} + +function loadTwiceSameBasePlusNonConstModule(type, ext, offset, align) { + return wasmEvalText( + `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (data (i32.const 65520) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func (param i32) (param i32) (result ${type}) + (drop (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (local.get 0) + )) + (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (i32.add (local.get 0) (local.get 1)) + ) + ) (export "" (func 0)))` + ).exports[""]; +} + +/* + * On x64 falsely removed bounds checks will be masked by the signal handlers. + * Thus it is important that these tests be run on x86. + */ + +function testOOB(mod, args) { + assertErrorMessage(() => mod(...args), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testOk(mod, args, expected, expectedType) { + assertEq(mod(...args), expected); +} + +// TODO: It would be nice to verify how many BCs are eliminated on positive tests. + +const align = 0; +for (let offset of [0, 1, 2, 3, 4, 8, 16, 41, 0xfff8]) { + + var widths = ['8_s', '8_u', '16_s', '16_u', ''] + + for (let width of widths) { + // Accesses of 1 byte. + let lastValidIndex = 0x10000 - offset - accessWidth[width]; + let op = baseOp[width]; + + var mod = loadTwiceModule(op, width, offset, align); + + // Two consecutive loads from two different bases + testOk(mod, [lastValidIndex, lastValidIndex], getInt(width, lastValidIndex + offset, mem), op); + testOOB(mod, [lastValidIndex + 42, lastValidIndex + 42]); + testOOB(mod, [lastValidIndex, lastValidIndex + 42]); + + mod = loadTwiceSameBasePlusConstModule(op, width, offset, align, 1); + + testOk(mod, [lastValidIndex-1], getInt(width, lastValidIndex + offset, mem), op); + testOOB(mod, [lastValidIndex]); + + // Two consecutive loads from same base with different offsets + mod = loadTwiceSameBasePlusConstModule(op, width, offset, align, 2); + + testOk(mod, [lastValidIndex-2], getInt(width, lastValidIndex + offset, mem), op); + testOOB(mod, [lastValidIndex-1, 2]); + + mod = loadTwiceSameBasePlusConstModule(op, width, offset, align, lastValidIndex); + + testOk(mod, [0], getInt(width, lastValidIndex + offset, mem), op); + testOOB(mod, [1]); + + mod = loadTwiceSameBasePlusNonConstModule(op, width, offset, align); + testOk(mod, [0, 1], getInt(width, 1 + offset, mem), op); + testOk(mod, [0, lastValidIndex], getInt(width, lastValidIndex + offset, mem), op); + testOOB(mod, [1, lastValidIndex]) + + // TODO: All of the above with mixed loads and stores + + // TODO: Branching - what do we want? + + // TODO: Just loops + // - loop invariant checks + // - loop dependant checks remaining inbounds + // - loop dependant checks going out-of bounds. + // + // TODO: Loops + branching + // - loop invariant checks guarded by a loop invariant branch? + } +} diff --git a/js/src/jit-test/tests/wasm/bench/README.txt b/js/src/jit-test/tests/wasm/bench/README.txt new file mode 100644 index 0000000000..4f51731541 --- /dev/null +++ b/js/src/jit-test/tests/wasm/bench/README.txt @@ -0,0 +1,12 @@ +These programs come from the embenchen benchmark suite. The source +code and Makefiles from which they were built can be found in +https://github.com/lars-t-hansen/embenchen/, in the src directory. + +Invariably, the Makefiles were set up with -DJITTEST (see comments in +those files), to configure the programs with very small input problems +that will run to completion in many configurations even on slower +systems. + +(Should that repo not be available, it should be possible to piece +together sources from https://github.com/kripken/embenchen and +https://github.com/kripken/emscripten/.) diff --git a/js/src/jit-test/tests/wasm/bench/directives.txt b/js/src/jit-test/tests/wasm/bench/directives.txt new file mode 100644 index 0000000000..8bb976be49 --- /dev/null +++ b/js/src/jit-test/tests/wasm/bench/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); include:wasm.js diff --git a/js/src/jit-test/tests/wasm/bench/wasm_box2d.js b/js/src/jit-test/tests/wasm/bench/wasm_box2d.js new file mode 100644 index 0000000000..8a6761615f --- /dev/null +++ b/js/src/jit-test/tests/wasm/bench/wasm_box2d.js @@ -0,0 +1,3068 @@ +const isSimulator = [ + "arm-simulator", "arm64-simulator", "mips32-simulator", "mips64-simulator" +].some(config => getBuildConfiguration(config)); + +// This test often times out on debug simulators due to the extreme slowdown. +if (getBuildConfiguration("debug") && isSimulator) + quit(); + +// All the glue code is wrapped in a function so it can be executed uncached and +// cached or compiled separately. +function runBox2d(cacheEntryOrModule) { + +// The Module object: Our interface to the outside world. We import +// and export values on it, and do the work to get that through +// closure compiler if necessary. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to do an eval in order to handle the closure compiler +// case, where this code here is minified but Module was defined +// elsewhere (e.g. case 4 above). We also need to check if Module +// already exists (e.g. case 3 above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module; +if (!Module) Module = (typeof Module !== 'undefined' ? Module : null) || {}; + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = {}; +for (var key in Module) { + if (Module.hasOwnProperty(key)) { + moduleOverrides[key] = Module[key]; + } +} + +if (!Module['print']) Module['print'] = print; +if (typeof printErr != 'undefined') Module['printErr'] = print; + +if (typeof read != 'undefined') { +Module['read'] = read; +} else { +Module['read'] = function read() { throw 'no read() available' }; +} + +if (typeof scriptArgs != 'undefined') { +Module['arguments'] = scriptArgs; +} else if (typeof arguments != 'undefined') { +Module['arguments'] = arguments; +} + + +function globalEval(x) { + eval.call(null, x); +} +if (!Module['load'] && Module['read']) { + Module['load'] = function load(f) { + globalEval(Module['read'](f)); + }; +} +if (!Module['print']) { + Module['print'] = function(){}; +} +if (!Module['printErr']) { + Module['printErr'] = Module['print']; +} +if (!Module['arguments']) { + Module['arguments'] = []; +} +if (!Module['thisProgram']) { + Module['thisProgram'] = './this.program'; +} + +// *** Environment setup code *** + +// Closure helpers +Module.print = Module['print']; +Module.printErr = Module['printErr']; + +// Callbacks +Module['preRun'] = []; +Module['postRun'] = []; + +// Merge back in the overrides +for (var key in moduleOverrides) { + if (moduleOverrides.hasOwnProperty(key)) { + Module[key] = moduleOverrides[key]; + } +} +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = undefined; + + + +// {{PREAMBLE_ADDITIONS}} + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + +//======================================== +// Runtime code shared with compiler +//======================================== + +var Runtime = { + setTempRet0: function (value) { + tempRet0 = value; + }, + getTempRet0: function () { + return tempRet0; + }, + stackSave: function () { + return STACKTOP; + }, + stackRestore: function (stackTop) { + STACKTOP = stackTop; + }, + getNativeTypeSize: function (type) { + switch (type) { + case 'i1': case 'i8': return 1; + case 'i16': return 2; + case 'i32': return 4; + case 'i64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length-1] === '*') { + return Runtime.QUANTUM_SIZE; // A pointer + } else if (type[0] === 'i') { + var bits = parseInt(type.substr(1)); + assert(bits % 8 === 0); + return bits/8; + } else { + return 0; + } + } + } + }, + getNativeFieldSize: function (type) { + return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE); + }, + STACK_ALIGN: 16, + prepVararg: function (ptr, type) { + if (type === 'double' || type === 'i64') { + // move so the load is aligned + if (ptr & 7) { + assert((ptr & 7) === 4); + ptr += 4; + } + } else { + assert((ptr & 3) === 0); + } + return ptr; + }, + getAlignSize: function (type, size, vararg) { + // we align i64s and doubles on 64-bit boundaries, unlike x86 + if (!vararg && (type == 'i64' || type == 'double')) return 8; + if (!type) return Math.min(size, 8); // align structures internally to 64 bits + return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE); + }, + dynCall: function (sig, ptr, args) { + if (args && args.length) { + return Module['dynCall_' + sig].apply(null, [ptr].concat(args)); + } else { + return Module['dynCall_' + sig].call(null, ptr); + } + }, + functionPointers: [], + addFunction: function (func) { + for (var i = 0; i < Runtime.functionPointers.length; i++) { + if (!Runtime.functionPointers[i]) { + Runtime.functionPointers[i] = func; + return 2*(1 + i); + } + } + throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; + }, + removeFunction: function (index) { + Runtime.functionPointers[(index-2)/2] = null; + }, + warnOnce: function (text) { + if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {}; + if (!Runtime.warnOnce.shown[text]) { + Runtime.warnOnce.shown[text] = 1; + Module.printErr(text); + } + }, + funcWrappers: {}, + getFuncWrapper: function (func, sig) { + assert(sig); + if (!Runtime.funcWrappers[sig]) { + Runtime.funcWrappers[sig] = {}; + } + var sigCache = Runtime.funcWrappers[sig]; + if (!sigCache[func]) { + // optimize away arguments usage in common cases + if (sig.length === 1) { + sigCache[func] = function dynCall_wrapper() { + return Runtime.dynCall(sig, func); + }; + } else if (sig.length === 2) { + sigCache[func] = function dynCall_wrapper(arg) { + return Runtime.dynCall(sig, func, [arg]); + }; + } else { + // general case + sigCache[func] = function dynCall_wrapper() { + return Runtime.dynCall(sig, func, Array.prototype.slice.call(arguments)); + }; + } + } + return sigCache[func]; + }, + getCompilerSetting: function (name) { + throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work'; + }, + stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = (((STACKTOP)+15)&-16); return ret; }, + staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + size)|0;STATICTOP = (((STATICTOP)+15)&-16); return ret; }, + dynamicAlloc: function (size) { var ret = HEAP32[DYNAMICTOP_PTR>>2];var end = (((ret + size + 15)|0) & -16);HEAP32[DYNAMICTOP_PTR>>2] = end;if (end >= TOTAL_MEMORY) {var success = enlargeMemory();if (!success) {HEAP32[DYNAMICTOP_PTR>>2] = ret;return 0;}}return ret;}, + alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 16))*(quantum ? quantum : 16); return ret; }, + makeBigInt: function (low,high,unsigned) { var ret = (unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0))); return ret; }, + GLOBAL_BASE: 1024, + QUANTUM_SIZE: 4, + __dummy__: 0 +} + + + +Module["Runtime"] = Runtime; + + + +//======================================== +// Runtime essentials +//======================================== + +var ABORT = 0; // whether we are quitting the application. no code should run after this. set in exit() and abort() +var EXITSTATUS = 0; + +function assert(condition, text) { + if (!condition) { + abort('Assertion failed: ' + text); + } +} + +var globalScope = this; + +// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) +function getCFunc(ident) { + var func = Module['_' + ident]; // closure exported function + if (!func) { + try { func = eval('_' + ident); } catch(e) {} + } + assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)'); + return func; +} + +var cwrap, ccall; +(function(){ + var JSfuncs = { + // Helpers for cwrap -- it can't refer to Runtime directly because it might + // be renamed by closure, instead it calls JSfuncs['stackSave'].body to find + // out what the minified function name is. + 'stackSave': function() { + Runtime.stackSave() + }, + 'stackRestore': function() { + Runtime.stackRestore() + }, + // type conversion from js to c + 'arrayToC' : function(arr) { + var ret = Runtime.stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret; + }, + 'stringToC' : function(str) { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { // null string + // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' + var len = (str.length << 2) + 1; + ret = Runtime.stackAlloc(len); + stringToUTF8(str, ret, len); + } + return ret; + } + }; + // For fast lookup of conversion functions + var toC = {'string' : JSfuncs['stringToC'], 'array' : JSfuncs['arrayToC']}; + + // C calling interface. + ccall = function ccallFunc(ident, returnType, argTypes, args, opts) { + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = Runtime.stackSave(); + cArgs[i] = converter(args[i]); + } else { + cArgs[i] = args[i]; + } + } + } + var ret = func.apply(null, cArgs); + if (returnType === 'string') ret = Pointer_stringify(ret); + if (stack !== 0) { + if (opts && opts.async) { + EmterpreterAsync.asyncFinalizers.push(function() { + Runtime.stackRestore(stack); + }); + return; + } + Runtime.stackRestore(stack); + } + return ret; + } + + var sourceRegex = /^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/; + function parseJSFunc(jsfunc) { + // Match the body and the return value of a javascript function source + var parsed = jsfunc.toString().match(sourceRegex).slice(1); + return {arguments : parsed[0], body : parsed[1], returnValue: parsed[2]} + } + + // sources of useful functions. we create this lazily as it can trigger a source decompression on this entire file + var JSsource = null; + function ensureJSsource() { + if (!JSsource) { + JSsource = {}; + for (var fun in JSfuncs) { + if (JSfuncs.hasOwnProperty(fun)) { + // Elements of toCsource are arrays of three items: + // the code, and the return value + JSsource[fun] = parseJSFunc(JSfuncs[fun]); + } + } + } + } + + cwrap = function cwrap(ident, returnType, argTypes) { + argTypes = argTypes || []; + var cfunc = getCFunc(ident); + // When the function takes numbers and returns a number, we can just return + // the original function + var numericArgs = argTypes.every(function(type){ return type === 'number'}); + var numericRet = (returnType !== 'string'); + if ( numericRet && numericArgs) { + return cfunc; + } + // Creation of the arguments list (["$1","$2",...,"$nargs"]) + var argNames = argTypes.map(function(x,i){return '$'+i}); + var funcstr = "(function(" + argNames.join(',') + ") {"; + var nargs = argTypes.length; + if (!numericArgs) { + // Generate the code needed to convert the arguments from javascript + // values to pointers + ensureJSsource(); + funcstr += 'var stack = ' + JSsource['stackSave'].body + ';'; + for (var i = 0; i < nargs; i++) { + var arg = argNames[i], type = argTypes[i]; + if (type === 'number') continue; + var convertCode = JSsource[type + 'ToC']; // [code, return] + funcstr += 'var ' + convertCode.arguments + ' = ' + arg + ';'; + funcstr += convertCode.body + ';'; + funcstr += arg + '=(' + convertCode.returnValue + ');'; + } + } + + // When the code is compressed, the name of cfunc is not literally 'cfunc' anymore + var cfuncname = parseJSFunc(function(){return cfunc}).returnValue; + // Call the function + funcstr += 'var ret = ' + cfuncname + '(' + argNames.join(',') + ');'; + if (!numericRet) { // Return type can only by 'string' or 'number' + // Convert the result to a string + var strgfy = parseJSFunc(function(){return Pointer_stringify}).returnValue; + funcstr += 'ret = ' + strgfy + '(ret);'; + } + if (!numericArgs) { + // If we had a stack, restore it + ensureJSsource(); + funcstr += JSsource['stackRestore'].body.replace('()', '(stack)') + ';'; + } + funcstr += 'return ret})'; + return eval(funcstr); + }; +})(); +Module["ccall"] = ccall; +Module["cwrap"] = cwrap; + +function setValue(ptr, value, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': HEAP8[((ptr)>>0)]=value; break; + case 'i8': HEAP8[((ptr)>>0)]=value; break; + case 'i16': HEAP16[((ptr)>>1)]=value; break; + case 'i32': HEAP32[((ptr)>>2)]=value; break; + case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; + case 'float': HEAPF32[((ptr)>>2)]=value; break; + case 'double': HEAPF64[((ptr)>>3)]=value; break; + default: abort('invalid type for setValue: ' + type); + } +} +Module["setValue"] = setValue; + + +function getValue(ptr, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': return HEAP8[((ptr)>>0)]; + case 'i8': return HEAP8[((ptr)>>0)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return HEAPF64[((ptr)>>3)]; + default: abort('invalid type for setValue: ' + type); + } + return null; +} +Module["getValue"] = getValue; + +var ALLOC_NORMAL = 0; // Tries to use _malloc() +var ALLOC_STACK = 1; // Lives for the duration of the current function call +var ALLOC_STATIC = 2; // Cannot be freed +var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk +var ALLOC_NONE = 4; // Do not allocate +Module["ALLOC_NORMAL"] = ALLOC_NORMAL; +Module["ALLOC_STACK"] = ALLOC_STACK; +Module["ALLOC_STATIC"] = ALLOC_STATIC; +Module["ALLOC_DYNAMIC"] = ALLOC_DYNAMIC; +Module["ALLOC_NONE"] = ALLOC_NONE; + +// allocate(): This is for internal use. You can use it yourself as well, but the interface +// is a little tricky (see docs right below). The reason is that it is optimized +// for multiple syntaxes to save space in generated code. So you should +// normally not use allocate(), and instead allocate memory using _malloc(), +// initialize it with setValue(), and so forth. +// @slab: An array of data, or a number. If a number, then the size of the block to allocate, +// in *bytes* (note that this is sometimes confusing: the next parameter does not +// affect this!) +// @types: Either an array of types, one for each byte (or 0 if no type at that position), +// or a single type which is used for the entire block. This only matters if there +// is initial data - if @slab is a number, then this does not matter at all and is +// ignored. +// @allocator: How to allocate memory, see ALLOC_* +function allocate(slab, types, allocator, ptr) { + var zeroinit, size; + if (typeof slab === 'number') { + zeroinit = true; + size = slab; + } else { + zeroinit = false; + size = slab.length; + } + + var singleType = typeof types === 'string' ? types : null; + + var ret; + if (allocator == ALLOC_NONE) { + ret = ptr; + } else { + ret = [typeof _malloc === 'function' ? _malloc : Runtime.staticAlloc, Runtime.stackAlloc, Runtime.staticAlloc, Runtime.dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length)); + } + + if (zeroinit) { + var ptr = ret, stop; + assert((ret & 3) == 0); + stop = ret + (size & ~3); + for (; ptr < stop; ptr += 4) { + HEAP32[((ptr)>>2)]=0; + } + stop = ret + size; + while (ptr < stop) { + HEAP8[((ptr++)>>0)]=0; + } + return ret; + } + + if (singleType === 'i8') { + if (slab.subarray || slab.slice) { + HEAPU8.set(slab, ret); + } else { + HEAPU8.set(new Uint8Array(slab), ret); + } + return ret; + } + + var i = 0, type, typeSize, previousType; + while (i < size) { + var curr = slab[i]; + + if (typeof curr === 'function') { + curr = Runtime.getFunctionIndex(curr); + } + + type = singleType || types[i]; + if (type === 0) { + i++; + continue; + } + + if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later + + setValue(ret+i, curr, type); + + // no need to look up size unless type changes, so cache it + if (previousType !== type) { + typeSize = Runtime.getNativeTypeSize(type); + previousType = type; + } + i += typeSize; + } + + return ret; +} +Module["allocate"] = allocate; + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!staticSealed) return Runtime.staticAlloc(size); + if (!runtimeInitialized) return Runtime.dynamicAlloc(size); + return _malloc(size); +} +Module["getMemory"] = getMemory; + +function Pointer_stringify(ptr, /* optional */ length) { + if (length === 0 || !ptr) return ''; + // TODO: use TextDecoder + // Find the length, and check for UTF while doing so + var hasUtf = 0; + var t; + var i = 0; + while (1) { + t = HEAPU8[(((ptr)+(i))>>0)]; + hasUtf |= t; + if (t == 0 && !length) break; + i++; + if (length && i == length) break; + } + if (!length) length = i; + + var ret = ''; + + if (hasUtf < 128) { + var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack + var curr; + while (length > 0) { + curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK))); + ret = ret ? ret + curr : curr; + ptr += MAX_CHUNK; + length -= MAX_CHUNK; + } + return ret; + } + return Module['UTF8ToString'](ptr); +} +Module["Pointer_stringify"] = Pointer_stringify; + +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAP8[((ptr++)>>0)]; + if (!ch) return str; + str += String.fromCharCode(ch); + } +} +Module["AsciiToString"] = AsciiToString; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} +Module["stringToAscii"] = stringToAscii; + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + +var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined; +function UTF8ArrayToString(u8Array, idx) { + var endPtr = idx; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + while (u8Array[endPtr]) ++endPtr; + + if (endPtr - idx > 16 && u8Array.subarray && UTF8Decoder) { + return UTF8Decoder.decode(u8Array.subarray(idx, endPtr)); + } else { + var u0, u1, u2, u3, u4, u5; + + var str = ''; + while (1) { + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + u0 = u8Array[idx++]; + if (!u0) return str; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + u1 = u8Array[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + u2 = u8Array[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + u3 = u8Array[idx++] & 63; + if ((u0 & 0xF8) == 0xF0) { + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3; + } else { + u4 = u8Array[idx++] & 63; + if ((u0 & 0xFC) == 0xF8) { + u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4; + } else { + u5 = u8Array[idx++] & 63; + u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5; + } + } + } + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + } +} +Module["UTF8ArrayToString"] = UTF8ArrayToString; + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function UTF8ToString(ptr) { + return UTF8ArrayToString(HEAPU8,ptr); +} +Module["UTF8ToString"] = UTF8ToString; + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + outU8Array[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + outU8Array[outIdx++] = 0xC0 | (u >> 6); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + outU8Array[outIdx++] = 0xE0 | (u >> 12); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x1FFFFF) { + if (outIdx + 3 >= endIdx) break; + outU8Array[outIdx++] = 0xF0 | (u >> 18); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0x3FFFFFF) { + if (outIdx + 4 >= endIdx) break; + outU8Array[outIdx++] = 0xF8 | (u >> 24); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 5 >= endIdx) break; + outU8Array[outIdx++] = 0xFC | (u >> 30); + outU8Array[outIdx++] = 0x80 | ((u >> 24) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + outU8Array[outIdx] = 0; + return outIdx - startIdx; +} +Module["stringToUTF8Array"] = stringToUTF8Array; + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} +Module["stringToUTF8"] = stringToUTF8; + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) { + ++len; + } else if (u <= 0x7FF) { + len += 2; + } else if (u <= 0xFFFF) { + len += 3; + } else if (u <= 0x1FFFFF) { + len += 4; + } else if (u <= 0x3FFFFFF) { + len += 5; + } else { + len += 6; + } + } + return len; +} +Module["lengthBytesUTF8"] = lengthBytesUTF8; + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined; +function UTF16ToString(ptr) { + var endPtr = ptr; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + var idx = endPtr >> 1; + while (HEAP16[idx]) ++idx; + endPtr = idx << 1; + + if (endPtr - ptr > 32 && UTF16Decoder) { + return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); + } else { + var i = 0; + + var str = ''; + while (1) { + var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; + if (codeUnit == 0) return str; + ++i; + // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. + str += String.fromCharCode(codeUnit); + } + } +} + + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { + // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + HEAP16[((outPtr)>>1)]=codeUnit; + outPtr += 2; + } + // Null-terminate the pointer to the HEAP. + HEAP16[((outPtr)>>1)]=0; + return outPtr - startPtr; +} + + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF16(str) { + return str.length*2; +} + + +function UTF32ToString(ptr) { + var i = 0; + + var str = ''; + while (1) { + var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; + if (utf32 == 0) + return str; + ++i; + // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + if (utf32 >= 0x10000) { + var ch = utf32 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } else { + str += String.fromCharCode(utf32); + } + } +} + + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { + var trailSurrogate = str.charCodeAt(++i); + codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); + } + HEAP32[((outPtr)>>2)]=codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; + } + // Null-terminate the pointer to the HEAP. + HEAP32[((outPtr)>>2)]=0; + return outPtr - startPtr; +} + + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; +} + + +function demangle(func) { + var __cxa_demangle_func = Module['___cxa_demangle'] || Module['__cxa_demangle']; + if (__cxa_demangle_func) { + try { + var s = + func.substr(1); + var len = lengthBytesUTF8(s)+1; + var buf = _malloc(len); + stringToUTF8(s, buf, len); + var status = _malloc(4); + var ret = __cxa_demangle_func(buf, 0, 0, status); + if (getValue(status, 'i32') === 0 && ret) { + return Pointer_stringify(ret); + } + // otherwise, libcxxabi failed + } catch(e) { + // ignore problems here + } finally { + if (buf) _free(buf); + if (status) _free(status); + if (ret) _free(ret); + } + // failure when using libcxxabi, don't demangle + return func; + } + Runtime.warnOnce('warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling'); + return func; +} + +function demangleAll(text) { + var regex = + /__Z[\w\d_]+/g; + return text.replace(regex, + function(x) { + var y = demangle(x); + return x === y ? x : (x + ' [' + y + ']'); + }); +} + +function jsStackTrace() { + var err = new Error(); + if (!err.stack) { + // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, + // so try that as a special-case. + try { + throw new Error(0); + } catch(e) { + err = e; + } + if (!err.stack) { + return '(no stack trace available)'; + } + } + return err.stack.toString(); +} + +function stackTrace() { + var js = jsStackTrace(); + if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace'](); + return demangleAll(js); +} +Module["stackTrace"] = stackTrace; + +// Memory management + +var PAGE_SIZE = 16384; +var WASM_PAGE_SIZE = 65536; +var ASMJS_PAGE_SIZE = 16777216; +var MIN_TOTAL_MEMORY = 16777216; + +function alignUp(x, multiple) { + if (x % multiple > 0) { + x += multiple - (x % multiple); + } + return x; +} + +var HEAP; +var buffer; +var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; + +function updateGlobalBuffer(buf) { + Module['buffer'] = buffer = buf; +} + +function updateGlobalBufferViews() { + Module['HEAP8'] = HEAP8 = new Int8Array(buffer); + Module['HEAP16'] = HEAP16 = new Int16Array(buffer); + Module['HEAP32'] = HEAP32 = new Int32Array(buffer); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buffer); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buffer); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buffer); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buffer); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buffer); +} + +var STATIC_BASE, STATICTOP, staticSealed; // static area +var STACK_BASE, STACKTOP, STACK_MAX; // stack area +var DYNAMIC_BASE, DYNAMICTOP_PTR; // dynamic area handled by sbrk + + STATIC_BASE = STATICTOP = STACK_BASE = STACKTOP = STACK_MAX = DYNAMIC_BASE = DYNAMICTOP_PTR = 0; + staticSealed = false; + + + +function abortOnCannotGrowMemory() { + abort('Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); +} + + +function enlargeMemory() { + abortOnCannotGrowMemory(); +} + + +var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880; +var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216; +if (TOTAL_MEMORY < TOTAL_STACK) Module.printErr('TOTAL_MEMORY should be larger than TOTAL_STACK, was ' + TOTAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')'); + +// Initialize the runtime's memory + + + +// Use a provided buffer, if there is one, or else allocate a new one +if (Module['buffer']) { + buffer = Module['buffer']; +} else { + // Use a WebAssembly memory where available + if (typeof WebAssembly === 'object' && typeof WebAssembly.Memory === 'function') { + Module['wasmMemory'] = new WebAssembly.Memory({ initial: TOTAL_MEMORY / WASM_PAGE_SIZE, maximum: TOTAL_MEMORY / WASM_PAGE_SIZE }); + buffer = Module['wasmMemory'].buffer; + } else + { + buffer = new ArrayBuffer(TOTAL_MEMORY); + } +} +updateGlobalBufferViews(); + + +function getTotalMemory() { + return TOTAL_MEMORY; +} + +// Endianness check (note: assumes compiler arch was little-endian) + HEAP32[0] = 0x63736d65; /* 'emsc' */ +HEAP16[1] = 0x6373; +if (HEAPU8[2] !== 0x73 || HEAPU8[3] !== 0x63) throw 'Runtime error: expected the system to be little-endian!'; + +Module['HEAP'] = HEAP; +Module['buffer'] = buffer; +Module['HEAP8'] = HEAP8; +Module['HEAP16'] = HEAP16; +Module['HEAP32'] = HEAP32; +Module['HEAPU8'] = HEAPU8; +Module['HEAPU16'] = HEAPU16; +Module['HEAPU32'] = HEAPU32; +Module['HEAPF32'] = HEAPF32; +Module['HEAPF64'] = HEAPF64; + +function callRuntimeCallbacks(callbacks) { + while(callbacks.length > 0) { + var callback = callbacks.shift(); + if (typeof callback == 'function') { + callback(); + continue; + } + var func = callback.func; + if (typeof func === 'number') { + if (callback.arg === undefined) { + Module['dynCall_v'](func); + } else { + Module['dynCall_vi'](func, callback.arg); + } + } else { + func(callback.arg === undefined ? null : callback.arg); + } + } +} + +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the runtime has exited + +var runtimeInitialized = false; +var runtimeExited = false; + + +function preRun() { + // compatibility - merge in anything from Module['preRun'] at this time + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + callRuntimeCallbacks(__ATPRERUN__); +} + +function ensureInitRuntime() { + if (runtimeInitialized) return; + runtimeInitialized = true; + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + callRuntimeCallbacks(__ATMAIN__); +} + +function exitRuntime() { + callRuntimeCallbacks(__ATEXIT__); + runtimeExited = true; +} + +function postRun() { + // compatibility - merge in anything from Module['postRun'] at this time + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} +Module["addOnPreRun"] = addOnPreRun; + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} +Module["addOnInit"] = addOnInit; + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} +Module["addOnPreMain"] = addOnPreMain; + +function addOnExit(cb) { + __ATEXIT__.unshift(cb); +} +Module["addOnExit"] = addOnExit; + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} +Module["addOnPostRun"] = addOnPostRun; + +// Tools + + +function intArrayFromString(stringy, dontAddNull, length /* optional */) { + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; +} +Module["intArrayFromString"] = intArrayFromString; + +function intArrayToString(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + var chr = array[i]; + if (chr > 0xFF) { + chr &= 0xFF; + } + ret.push(String.fromCharCode(chr)); + } + return ret.join(''); +} +Module["intArrayToString"] = intArrayToString; + +// Deprecated: This function should not be called because it is unsafe and does not provide +// a maximum length limit of how many bytes it is allowed to write. Prefer calling the +// function stringToUTF8Array() instead, which takes in a maximum length that can be used +// to be secure from out of bounds writes. +function writeStringToMemory(string, buffer, dontAddNull) { + Runtime.warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!'); + + var lastChar, end; + if (dontAddNull) { + // stringToUTF8Array always appends null. If we don't want to do that, remember the + // character that existed at the location where the null will be placed, and restore + // that after the write (below). + end = buffer + lengthBytesUTF8(string); + lastChar = HEAP8[end]; + } + stringToUTF8(string, buffer, Infinity); + if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character. +} +Module["writeStringToMemory"] = writeStringToMemory; + +function writeArrayToMemory(array, buffer) { + HEAP8.set(array, buffer); +} +Module["writeArrayToMemory"] = writeArrayToMemory; + +function writeAsciiToMemory(str, buffer, dontAddNull) { + for (var i = 0; i < str.length; ++i) { + HEAP8[((buffer++)>>0)]=str.charCodeAt(i); + } + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer)>>0)]=0; +} +Module["writeAsciiToMemory"] = writeAsciiToMemory; + +function unSign(value, bits, ignore) { + if (value >= 0) { + return value; + } + return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts + : Math.pow(2, bits) + value; +} +function reSign(value, bits, ignore) { + if (value <= 0) { + return value; + } + var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 + : Math.pow(2, bits-1); + if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that + // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors + // TODO: In i64 mode 1, resign the two parts separately and safely + value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts + } + return value; +} + + +// check for imul support, and also for correctness ( https://bugs.webkit.org/show_bug.cgi?id=126345 ) +if (!Math['imul'] || Math['imul'](0xffffffff, 5) !== -5) Math['imul'] = function imul(a, b) { + var ah = a >>> 16; + var al = a & 0xffff; + var bh = b >>> 16; + var bl = b & 0xffff; + return (al*bl + ((ah*bl + al*bh) << 16))|0; +}; +Math.imul = Math['imul']; + +if (!Math['fround']) { + var froundBuffer = new Float32Array(1); + Math['fround'] = function(x) { froundBuffer[0] = x; return froundBuffer[0] }; +} +Math.fround = Math['fround']; + +if (!Math['clz32']) Math['clz32'] = function(x) { + x = x >>> 0; + for (var i = 0; i < 32; i++) { + if (x & (1 << (31 - i))) return i; + } + return 32; +}; +Math.clz32 = Math['clz32'] + +if (!Math['trunc']) Math['trunc'] = function(x) { + return x < 0 ? Math.ceil(x) : Math.floor(x); +}; +Math.trunc = Math['trunc']; + +var Math_abs = Math.abs; +var Math_cos = Math.cos; +var Math_sin = Math.sin; +var Math_tan = Math.tan; +var Math_acos = Math.acos; +var Math_asin = Math.asin; +var Math_atan = Math.atan; +var Math_atan2 = Math.atan2; +var Math_exp = Math.exp; +var Math_log = Math.log; +var Math_sqrt = Math.sqrt; +var Math_ceil = Math.ceil; +var Math_floor = Math.floor; +var Math_pow = Math.pow; +var Math_imul = Math.imul; +var Math_fround = Math.fround; +var Math_round = Math.round; +var Math_min = Math.min; +var Math_clz32 = Math.clz32; +var Math_trunc = Math.trunc; + +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// PRE_RUN_ADDITIONS (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled + +function getUniqueRunDependency(id) { + return id; +} + +function addRunDependency(id) { + runDependencies++; + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } +} +Module["addRunDependency"] = addRunDependency; + +function removeRunDependency(id) { + runDependencies--; + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} +Module["removeRunDependency"] = removeRunDependency; + +Module["preloadedImages"] = {}; // maps url to image data +Module["preloadedAudios"] = {}; // maps url to audio data + + + +var memoryInitializer = null; + + + + + +function integrateWasmJS(Module) { + // wasm.js has several methods for creating the compiled code module here: + // * 'native-wasm' : use native WebAssembly support in the browser + // * 'interpret-s-expr': load s-expression code from a .wast and interpret + // * 'interpret-binary': load binary wasm and interpret + // * 'interpret-asm2wasm': load asm.js code, translate to wasm, and interpret + // * 'asmjs': no wasm, just load the asm.js code and use that (good for testing) + // The method can be set at compile time (BINARYEN_METHOD), or runtime by setting Module['wasmJSMethod']. + // The method can be a comma-separated list, in which case, we will try the + // options one by one. Some of them can fail gracefully, and then we can try + // the next. + + // inputs + + var method = Module['wasmJSMethod'] || 'native-wasm'; + Module['wasmJSMethod'] = method; + + var wasmBinaryFile = Module['wasmBinaryFile'] || scriptdir + 'wasm_box2d.wasm'; + + // utilities + + var wasmPageSize = 64*1024; + + var asm2wasmImports = { // special asm2wasm imports + "f64-rem": function(x, y) { + return x % y; + }, + "f64-to-int": function(x) { + return x | 0; + }, + "i32s-div": function(x, y) { + return ((x | 0) / (y | 0)) | 0; + }, + "i32u-div": function(x, y) { + return ((x >>> 0) / (y >>> 0)) >>> 0; + }, + "i32s-rem": function(x, y) { + return ((x | 0) % (y | 0)) | 0; + }, + "i32u-rem": function(x, y) { + return ((x >>> 0) % (y >>> 0)) >>> 0; + }, + "debugger": function() { + debugger; + }, + }; + + var info = { + 'global': null, + 'env': null, + 'asm2wasm': asm2wasmImports, + 'parent': Module // Module inside wasm-js.cpp refers to wasm-js.cpp; this allows access to the outside program. + }; + + var exports = null; + + function lookupImport(mod, base) { + var lookup = info; + if (mod.indexOf('.') < 0) { + lookup = (lookup || {})[mod]; + } else { + var parts = mod.split('.'); + lookup = (lookup || {})[parts[0]]; + lookup = (lookup || {})[parts[1]]; + } + if (base) { + lookup = (lookup || {})[base]; + } + if (lookup === undefined) { + abort('bad lookupImport to (' + mod + ').' + base); + } + return lookup; + } + + function mergeMemory(newBuffer) { + // The wasm instance creates its memory. But static init code might have written to + // buffer already, including the mem init file, and we must copy it over in a proper merge. + // TODO: avoid this copy, by avoiding such static init writes + // TODO: in shorter term, just copy up to the last static init write + var oldBuffer = Module['buffer']; + if (newBuffer.byteLength < oldBuffer.byteLength) { + Module['printErr']('the new buffer in mergeMemory is smaller than the previous one. in native wasm, we should grow memory here'); + } + var oldView = new Int8Array(oldBuffer); + var newView = new Int8Array(newBuffer); + + // If we have a mem init file, do not trample it + if (!memoryInitializer) { + oldView.set(newView.subarray(Module['STATIC_BASE'], Module['STATIC_BASE'] + Module['STATIC_BUMP']), Module['STATIC_BASE']); + } + + newView.set(oldView); + updateGlobalBuffer(newBuffer); + updateGlobalBufferViews(); + } + + var WasmTypes = { + none: 0, + i32: 1, + i64: 2, + f32: 3, + f64: 4 + }; + + function fixImports(imports) { + if (!0) return imports; + var ret = {}; + for (var i in imports) { + var fixed = i; + if (fixed[0] == '_') fixed = fixed.substr(1); + ret[fixed] = imports[i]; + } + return ret; + } + + // do-method functions + + function doJustAsm(global, env, providedBuffer) { + // if no Module.asm, or it's the method handler helper (see below), then apply + // the asmjs + if (typeof Module['asm'] !== 'function' || Module['asm'] === methodHandler) { + if (!Module['asmPreload']) { + // you can load the .asm.js file before this, to avoid this sync xhr and eval + eval(Module['read'](asmjsCodeFile)); // set Module.asm + } else { + Module['asm'] = Module['asmPreload']; + } + } + if (typeof Module['asm'] !== 'function') { + Module['printErr']('asm evalling did not set the module properly'); + return false; + } + return Module['asm'](global, env, providedBuffer); + } + + function doNativeWasm(global, env, providedBuffer) { + if (typeof WebAssembly !== 'object') { + Module['printErr']('no native wasm support detected'); + return false; + } + // prepare memory import + if (!(Module['wasmMemory'] instanceof WebAssembly.Memory)) { + Module['printErr']('no native wasm Memory in use'); + return false; + } + env['memory'] = Module['wasmMemory']; + // Load the wasm module and create an instance of using native support in the JS engine. + info['global'] = { + 'NaN': NaN, + 'Infinity': Infinity + }; + info['global.Math'] = global.Math; + info['env'] = env; + // handle a generated wasm instance, receiving its exports and + // performing other necessary setup + function receiveInstance(instance) { + exports = instance.exports; + if (exports.memory) mergeMemory(exports.memory); + Module['asm'] = exports; + Module["usingWasm"] = true; + } + Module['printErr']('asynchronously preparing wasm'); + addRunDependency('wasm-instantiate'); // we can't run yet + + (cacheEntryOrModule instanceof WebAssembly.Module + ? WebAssembly.instantiate(cacheEntryOrModule, info) + .then(instance => ({instance, module:cacheEntryOrModule})) + : wasmStreamingEnabled() + ? WebAssembly.instantiateStreaming(cacheEntryOrModule, info) + : WebAssembly.instantiate(cacheEntryOrModule.getBuffer(), info)) + .then(function(output) { + if (!cacheEntryOrModule.module) + cacheEntryOrModule.module = output.module; + + // receiveInstance() will swap in the exports (to Module.asm) so they can be called + receiveInstance(output.instance); + removeRunDependency('wasm-instantiate'); + }) + .catch(function(reason) { + Module['printErr']('failed to asynchronously prepare wasm:\n ' + reason); + }); + return {}; // no exports yet; we'll fill them in later + } + + // We may have a preloaded value in Module.asm, save it + Module['asmPreload'] = Module['asm']; + + // Memory growth integration code + Module['reallocBuffer'] = function(size) { + var PAGE_MULTIPLE = Module["usingWasm"] ? WASM_PAGE_SIZE : ASMJS_PAGE_SIZE; // In wasm, heap size must be a multiple of 64KB. In asm.js, they need to be multiples of 16MB. + size = alignUp(size, PAGE_MULTIPLE); // round up to wasm page size + var old = Module['buffer']; + var oldSize = old.byteLength; + if (Module["usingWasm"]) { + try { + var result = Module['wasmMemory'].grow((size - oldSize) / wasmPageSize); // .grow() takes a delta compared to the previous size + if (result !== (-1 | 0)) { + // success in native wasm memory growth, get the buffer from the memory + return Module['buffer'] = Module['wasmMemory'].buffer; + } else { + return null; + } + } catch(e) { + return null; + } + } else { + exports['__growWasmMemory']((size - oldSize) / wasmPageSize); // tiny wasm method that just does memory.grow + // in interpreter, we replace Module.buffer if we allocate + return Module['buffer'] !== old ? Module['buffer'] : null; // if it was reallocated, it changed + } + }; + + // Provide an "asm.js function" for the application, called to "link" the asm.js module. We instantiate + // the wasm module at that time, and it receives imports and provides exports and so forth, the app + // doesn't need to care that it is wasm or olyfilled wasm or asm.js. + + Module['asm'] = function(global, env, providedBuffer) { + global = fixImports(global); + env = fixImports(env); + + // import table + if (!env['table']) { + var TABLE_SIZE = Module['wasmTableSize']; + if (TABLE_SIZE === undefined) TABLE_SIZE = 1024; // works in binaryen interpreter at least + var MAX_TABLE_SIZE = Module['wasmMaxTableSize']; + if (typeof WebAssembly === 'object' && typeof WebAssembly.Table === 'function') { + if (MAX_TABLE_SIZE !== undefined) { + env['table'] = new WebAssembly.Table({ initial: TABLE_SIZE, maximum: MAX_TABLE_SIZE, element: 'anyfunc' }); + } else { + env['table'] = new WebAssembly.Table({ initial: TABLE_SIZE, element: 'anyfunc' }); + } + } else { + env['table'] = new Array(TABLE_SIZE); // works in binaryen interpreter at least + } + Module['wasmTable'] = env['table']; + } + + if (!env['memoryBase']) { + env['memoryBase'] = Module['STATIC_BASE']; // tell the memory segments where to place themselves + } + if (!env['tableBase']) { + env['tableBase'] = 0; // table starts at 0 by default, in dynamic linking this will change + } + + return doNativeWasm(global, env, providedBuffer); + }; + + var methodHandler = Module['asm']; // note our method handler, as we may modify Module['asm'] later +} + +integrateWasmJS(Module); + +// === Body === + +var ASM_CONSTS = []; + + + + +STATIC_BASE = 1024; + +STATICTOP = STATIC_BASE + 11904; + /* global initializers */ __ATINIT__.push(); + + +memoryInitializer = Module["wasmJSMethod"].indexOf("asmjs") >= 0 || Module["wasmJSMethod"].indexOf("interpret-asm2wasm") >= 0 ? "wasm_box2d.js.mem" : null; + + + + +var STATIC_BUMP = 11904; +Module["STATIC_BASE"] = STATIC_BASE; +Module["STATIC_BUMP"] = STATIC_BUMP; + +/* no memory initializer */ +var tempDoublePtr = STATICTOP; STATICTOP += 16; + +function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much + + HEAP8[tempDoublePtr] = HEAP8[ptr]; + + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; + +} + +function copyTempDouble(ptr) { + + HEAP8[tempDoublePtr] = HEAP8[ptr]; + + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; + + HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; + + HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; + + HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; + + HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; + +} + +// {{PRE_LIBRARY}} + + + function ___cxa_pure_virtual() { + ABORT = true; + throw 'Pure virtual function called!'; + } + + function ___assert_fail(condition, filename, line, func) { + ABORT = true; + throw 'Assertion failed: ' + Pointer_stringify(condition) + ', at: ' + [filename ? Pointer_stringify(filename) : 'unknown filename', line, func ? Pointer_stringify(func) : 'unknown function'] + ' at ' + stackTrace(); + } + + + + var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function () { + Browser.mainLoop.scheduler = null; + Browser.mainLoop.currentlyRunningMainloop++; // Incrementing this signals the previous main loop that it's now become old, and it must return. + },resume:function () { + Browser.mainLoop.currentlyRunningMainloop++; + var timingMode = Browser.mainLoop.timingMode; + var timingValue = Browser.mainLoop.timingValue; + var func = Browser.mainLoop.func; + Browser.mainLoop.func = null; + _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */); + _emscripten_set_main_loop_timing(timingMode, timingValue); + Browser.mainLoop.scheduler(); + },updateStatus:function () { + if (Module['setStatus']) { + var message = Module['statusMessage'] || 'Please wait...'; + var remaining = Browser.mainLoop.remainingBlockers; + var expected = Browser.mainLoop.expectedBlockers; + if (remaining) { + if (remaining < expected) { + Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')'); + } else { + Module['setStatus'](message); + } + } else { + Module['setStatus'](''); + } + } + },runIter:function (func) { + if (ABORT) return; + if (Module['preMainLoop']) { + var preRet = Module['preMainLoop'](); + if (preRet === false) { + return; // |return false| skips a frame + } + } + try { + func(); + } catch (e) { + if (e instanceof ExitStatus) { + return; + } else { + if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]); + throw e; + } + } + if (Module['postMainLoop']) Module['postMainLoop'](); + }},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function () { + if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; // needs to exist even in workers + + if (Browser.initted) return; + Browser.initted = true; + + try { + new Blob(); + Browser.hasBlobConstructor = true; + } catch(e) { + Browser.hasBlobConstructor = false; + console.log("warning: no blob constructor, cannot create blobs with mimetypes"); + } + Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null)); + Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : undefined; + if (!Module.noImageDecoding && typeof Browser.URLObject === 'undefined') { + console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."); + Module.noImageDecoding = true; + } + + // Support for plugins that can process preloaded files. You can add more of these to + // your app by creating and appending to Module.preloadPlugins. + // + // Each plugin is asked if it can handle a file based on the file's name. If it can, + // it is given the file's raw data. When it is done, it calls a callback with the file's + // (possibly modified) data. For example, a plugin might decompress a file, or it + // might create some side data structure for use later (like an Image element, etc.). + + var imagePlugin = {}; + imagePlugin['canHandle'] = function imagePlugin_canHandle(name) { + return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name); + }; + imagePlugin['handle'] = function imagePlugin_handle(byteArray, name, onload, onerror) { + var b = null; + if (Browser.hasBlobConstructor) { + try { + b = new Blob([byteArray], { type: Browser.getMimetype(name) }); + if (b.size !== byteArray.length) { // Safari bug #118630 + // Safari's Blob can only take an ArrayBuffer + b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) }); + } + } catch(e) { + Runtime.warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder'); + } + } + if (!b) { + var bb = new Browser.BlobBuilder(); + bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range + b = bb.getBlob(); + } + var url = Browser.URLObject.createObjectURL(b); + var img = new Image(); + img.onload = function img_onload() { + assert(img.complete, 'Image ' + name + ' could not be decoded'); + var canvas = document.createElement('canvas'); + canvas.width = img.width; + canvas.height = img.height; + var ctx = canvas.getContext('2d'); + ctx.drawImage(img, 0, 0); + Module["preloadedImages"][name] = canvas; + Browser.URLObject.revokeObjectURL(url); + if (onload) onload(byteArray); + }; + img.onerror = function img_onerror(event) { + console.log('Image ' + url + ' could not be decoded'); + if (onerror) onerror(); + }; + img.src = url; + }; + Module['preloadPlugins'].push(imagePlugin); + + var audioPlugin = {}; + audioPlugin['canHandle'] = function audioPlugin_canHandle(name) { + return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 }; + }; + audioPlugin['handle'] = function audioPlugin_handle(byteArray, name, onload, onerror) { + var done = false; + function finish(audio) { + if (done) return; + done = true; + Module["preloadedAudios"][name] = audio; + if (onload) onload(byteArray); + } + function fail() { + if (done) return; + done = true; + Module["preloadedAudios"][name] = new Audio(); // empty shim + if (onerror) onerror(); + } + if (Browser.hasBlobConstructor) { + try { + var b = new Blob([byteArray], { type: Browser.getMimetype(name) }); + } catch(e) { + return fail(); + } + var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this! + var audio = new Audio(); + audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926 + audio.onerror = function audio_onerror(event) { + if (done) return; + console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach'); + function encode64(data) { + var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + var PAD = '='; + var ret = ''; + var leftchar = 0; + var leftbits = 0; + for (var i = 0; i < data.length; i++) { + leftchar = (leftchar << 8) | data[i]; + leftbits += 8; + while (leftbits >= 6) { + var curr = (leftchar >> (leftbits-6)) & 0x3f; + leftbits -= 6; + ret += BASE[curr]; + } + } + if (leftbits == 2) { + ret += BASE[(leftchar&3) << 4]; + ret += PAD + PAD; + } else if (leftbits == 4) { + ret += BASE[(leftchar&0xf) << 2]; + ret += PAD; + } + return ret; + } + audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray); + finish(audio); // we don't wait for confirmation this worked - but it's worth trying + }; + audio.src = url; + // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror + Browser.safeSetTimeout(function() { + finish(audio); // try to use it even though it is not necessarily ready to play + }, 10000); + } else { + return fail(); + } + }; + Module['preloadPlugins'].push(audioPlugin); + + // Canvas event setup + + function pointerLockChange() { + Browser.pointerLock = document['pointerLockElement'] === Module['canvas'] || + document['mozPointerLockElement'] === Module['canvas'] || + document['webkitPointerLockElement'] === Module['canvas'] || + document['msPointerLockElement'] === Module['canvas']; + } + var canvas = Module['canvas']; + if (canvas) { + // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on Module + // Module['forcedAspectRatio'] = 4 / 3; + + canvas.requestPointerLock = canvas['requestPointerLock'] || + canvas['mozRequestPointerLock'] || + canvas['webkitRequestPointerLock'] || + canvas['msRequestPointerLock'] || + function(){}; + canvas.exitPointerLock = document['exitPointerLock'] || + document['mozExitPointerLock'] || + document['webkitExitPointerLock'] || + document['msExitPointerLock'] || + function(){}; // no-op if function does not exist + canvas.exitPointerLock = canvas.exitPointerLock.bind(document); + + document.addEventListener('pointerlockchange', pointerLockChange, false); + document.addEventListener('mozpointerlockchange', pointerLockChange, false); + document.addEventListener('webkitpointerlockchange', pointerLockChange, false); + document.addEventListener('mspointerlockchange', pointerLockChange, false); + + if (Module['elementPointerLock']) { + canvas.addEventListener("click", function(ev) { + if (!Browser.pointerLock && Module['canvas'].requestPointerLock) { + Module['canvas'].requestPointerLock(); + ev.preventDefault(); + } + }, false); + } + } + },createContext:function (canvas, useWebGL, setInModule, webGLContextAttributes) { + if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx; // no need to recreate GL context if it's already been created for this canvas. + + var ctx; + var contextHandle; + if (useWebGL) { + // For GLES2/desktop GL compatibility, adjust a few defaults to be different to WebGL defaults, so that they align better with the desktop defaults. + var contextAttributes = { + antialias: false, + alpha: false + }; + + if (webGLContextAttributes) { + for (var attribute in webGLContextAttributes) { + contextAttributes[attribute] = webGLContextAttributes[attribute]; + } + } + + contextHandle = GL.createContext(canvas, contextAttributes); + if (contextHandle) { + ctx = GL.getContext(contextHandle).GLctx; + } + } else { + ctx = canvas.getContext('2d'); + } + + if (!ctx) return null; + + if (setInModule) { + if (!useWebGL) assert(typeof GLctx === 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it'); + + Module.ctx = ctx; + if (useWebGL) GL.makeContextCurrent(contextHandle); + Module.useWebGL = useWebGL; + Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() }); + Browser.init(); + } + return ctx; + },destroyContext:function (canvas, useWebGL, setInModule) {},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function (lockPointer, resizeCanvas, vrDevice) { + Browser.lockPointer = lockPointer; + Browser.resizeCanvas = resizeCanvas; + Browser.vrDevice = vrDevice; + if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; + if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; + if (typeof Browser.vrDevice === 'undefined') Browser.vrDevice = null; + + var canvas = Module['canvas']; + function fullscreenChange() { + Browser.isFullscreen = false; + var canvasContainer = canvas.parentNode; + if ((document['fullscreenElement'] || document['mozFullScreenElement'] || + document['msFullscreenElement'] || document['webkitFullscreenElement'] || + document['webkitCurrentFullScreenElement']) === canvasContainer) { + canvas.exitFullscreen = document['exitFullscreen'] || + document['cancelFullScreen'] || + document['mozCancelFullScreen'] || + document['msExitFullscreen'] || + document['webkitCancelFullScreen'] || + function() {}; + canvas.exitFullscreen = canvas.exitFullscreen.bind(document); + if (Browser.lockPointer) canvas.requestPointerLock(); + Browser.isFullscreen = true; + if (Browser.resizeCanvas) Browser.setFullscreenCanvasSize(); + } else { + + // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen + canvasContainer.parentNode.insertBefore(canvas, canvasContainer); + canvasContainer.parentNode.removeChild(canvasContainer); + + if (Browser.resizeCanvas) Browser.setWindowedCanvasSize(); + } + if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullscreen); + if (Module['onFullscreen']) Module['onFullscreen'](Browser.isFullscreen); + Browser.updateCanvasDimensions(canvas); + } + + if (!Browser.fullscreenHandlersInstalled) { + Browser.fullscreenHandlersInstalled = true; + document.addEventListener('fullscreenchange', fullscreenChange, false); + document.addEventListener('mozfullscreenchange', fullscreenChange, false); + document.addEventListener('webkitfullscreenchange', fullscreenChange, false); + document.addEventListener('MSFullscreenChange', fullscreenChange, false); + } + + // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root + var canvasContainer = document.createElement("div"); + canvas.parentNode.insertBefore(canvasContainer, canvas); + canvasContainer.appendChild(canvas); + + // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) + canvasContainer.requestFullscreen = canvasContainer['requestFullscreen'] || + canvasContainer['mozRequestFullScreen'] || + canvasContainer['msRequestFullscreen'] || + (canvasContainer['webkitRequestFullscreen'] ? function() { canvasContainer['webkitRequestFullscreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null) || + (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); + + if (vrDevice) { + canvasContainer.requestFullscreen({ vrDisplay: vrDevice }); + } else { + canvasContainer.requestFullscreen(); + } + },requestFullScreen:function (lockPointer, resizeCanvas, vrDevice) { + Module.printErr('Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.'); + Browser.requestFullScreen = function(lockPointer, resizeCanvas, vrDevice) { + return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice); + } + return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice); + },nextRAF:0,fakeRequestAnimationFrame:function (func) { + // try to keep 60fps between calls to here + var now = Date.now(); + if (Browser.nextRAF === 0) { + Browser.nextRAF = now + 1000/60; + } else { + while (now + 2 >= Browser.nextRAF) { // fudge a little, to avoid timer jitter causing us to do lots of delay:0 + Browser.nextRAF += 1000/60; + } + } + var delay = Math.max(Browser.nextRAF - now, 0); + setTimeout(func, delay); + },requestAnimationFrame:function requestAnimationFrame(func) { + if (typeof window === 'undefined') { // Provide fallback to setTimeout if window is undefined (e.g. in Node.js) + Browser.fakeRequestAnimationFrame(func); + } else { + if (!window.requestAnimationFrame) { + window.requestAnimationFrame = window['requestAnimationFrame'] || + window['mozRequestAnimationFrame'] || + window['webkitRequestAnimationFrame'] || + window['msRequestAnimationFrame'] || + window['oRequestAnimationFrame'] || + Browser.fakeRequestAnimationFrame; + } + window.requestAnimationFrame(func); + } + },safeCallback:function (func) { + return function() { + if (!ABORT) return func.apply(null, arguments); + }; + },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function () { + Browser.allowAsyncCallbacks = false; + },resumeAsyncCallbacks:function () { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now + Browser.allowAsyncCallbacks = true; + if (Browser.queuedAsyncCallbacks.length > 0) { + var callbacks = Browser.queuedAsyncCallbacks; + Browser.queuedAsyncCallbacks = []; + callbacks.forEach(function(func) { + func(); + }); + } + },safeRequestAnimationFrame:function (func) { + return Browser.requestAnimationFrame(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } + }); + },safeSetTimeout:function (func, timeout) { + Module['noExitRuntime'] = true; + return setTimeout(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } + }, timeout); + },safeSetInterval:function (func, timeout) { + Module['noExitRuntime'] = true; + return setInterval(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } // drop it on the floor otherwise, next interval will kick in + }, timeout); + },getMimetype:function (name) { + return { + 'jpg': 'image/jpeg', + 'jpeg': 'image/jpeg', + 'png': 'image/png', + 'bmp': 'image/bmp', + 'ogg': 'audio/ogg', + 'wav': 'audio/wav', + 'mp3': 'audio/mpeg' + }[name.substr(name.lastIndexOf('.')+1)]; + },getUserMedia:function (func) { + if(!window.getUserMedia) { + window.getUserMedia = navigator['getUserMedia'] || + navigator['mozGetUserMedia']; + } + window.getUserMedia(func); + },getMovementX:function (event) { + return event['movementX'] || + event['mozMovementX'] || + event['webkitMovementX'] || + 0; + },getMovementY:function (event) { + return event['movementY'] || + event['mozMovementY'] || + event['webkitMovementY'] || + 0; + },getMouseWheelDelta:function (event) { + var delta = 0; + switch (event.type) { + case 'DOMMouseScroll': + delta = event.detail; + break; + case 'mousewheel': + delta = event.wheelDelta; + break; + case 'wheel': + delta = event['deltaY']; + break; + default: + throw 'unrecognized mouse wheel event: ' + event.type; + } + return delta; + },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function (event) { // event should be mousemove, mousedown or mouseup + if (Browser.pointerLock) { + // When the pointer is locked, calculate the coordinates + // based on the movement of the mouse. + // Workaround for Firefox bug 764498 + if (event.type != 'mousemove' && + ('mozMovementX' in event)) { + Browser.mouseMovementX = Browser.mouseMovementY = 0; + } else { + Browser.mouseMovementX = Browser.getMovementX(event); + Browser.mouseMovementY = Browser.getMovementY(event); + } + + // check if SDL is available + if (typeof SDL != "undefined") { + Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; + Browser.mouseY = SDL.mouseY + Browser.mouseMovementY; + } else { + // just add the mouse delta to the current absolut mouse position + // FIXME: ideally this should be clamped against the canvas size and zero + Browser.mouseX += Browser.mouseMovementX; + Browser.mouseY += Browser.mouseMovementY; + } + } else { + // Otherwise, calculate the movement based on the changes + // in the coordinates. + var rect = Module["canvas"].getBoundingClientRect(); + var cw = Module["canvas"].width; + var ch = Module["canvas"].height; + + // Neither .scrollX or .pageXOffset are defined in a spec, but + // we prefer .scrollX because it is currently in a spec draft. + // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/) + var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset); + var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset); + + if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchmove') { + var touch = event.touch; + if (touch === undefined) { + return; // the "touch" property is only defined in SDL + + } + var adjustedX = touch.pageX - (scrollX + rect.left); + var adjustedY = touch.pageY - (scrollY + rect.top); + + adjustedX = adjustedX * (cw / rect.width); + adjustedY = adjustedY * (ch / rect.height); + + var coords = { x: adjustedX, y: adjustedY }; + + if (event.type === 'touchstart') { + Browser.lastTouches[touch.identifier] = coords; + Browser.touches[touch.identifier] = coords; + } else if (event.type === 'touchend' || event.type === 'touchmove') { + var last = Browser.touches[touch.identifier]; + if (!last) last = coords; + Browser.lastTouches[touch.identifier] = last; + Browser.touches[touch.identifier] = coords; + } + return; + } + + var x = event.pageX - (scrollX + rect.left); + var y = event.pageY - (scrollY + rect.top); + + // the canvas might be CSS-scaled compared to its backbuffer; + // SDL-using content will want mouse coordinates in terms + // of backbuffer units. + x = x * (cw / rect.width); + y = y * (ch / rect.height); + + Browser.mouseMovementX = x - Browser.mouseX; + Browser.mouseMovementY = y - Browser.mouseY; + Browser.mouseX = x; + Browser.mouseY = y; + } + },asyncLoad:function (url, onload, onerror, noRunDep) { + var dep = !noRunDep ? getUniqueRunDependency('al ' + url) : ''; + Module['readAsync'](url, function(arrayBuffer) { + assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); + onload(new Uint8Array(arrayBuffer)); + if (dep) removeRunDependency(dep); + }, function(event) { + if (onerror) { + onerror(); + } else { + throw 'Loading data file "' + url + '" failed.'; + } + }); + if (dep) addRunDependency(dep); + },resizeListeners:[],updateResizeListeners:function () { + var canvas = Module['canvas']; + Browser.resizeListeners.forEach(function(listener) { + listener(canvas.width, canvas.height); + }); + },setCanvasSize:function (width, height, noUpdates) { + var canvas = Module['canvas']; + Browser.updateCanvasDimensions(canvas, width, height); + if (!noUpdates) Browser.updateResizeListeners(); + },windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function () { + // check if SDL is available + if (typeof SDL != "undefined") { + var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]; + flags = flags | 0x00800000; // set SDL_FULLSCREEN flag + HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags + } + Browser.updateResizeListeners(); + },setWindowedCanvasSize:function () { + // check if SDL is available + if (typeof SDL != "undefined") { + var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]; + flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag + HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags + } + Browser.updateResizeListeners(); + },updateCanvasDimensions:function (canvas, wNative, hNative) { + if (wNative && hNative) { + canvas.widthNative = wNative; + canvas.heightNative = hNative; + } else { + wNative = canvas.widthNative; + hNative = canvas.heightNative; + } + var w = wNative; + var h = hNative; + if (Module['forcedAspectRatio'] && Module['forcedAspectRatio'] > 0) { + if (w/h < Module['forcedAspectRatio']) { + w = Math.round(h * Module['forcedAspectRatio']); + } else { + h = Math.round(w / Module['forcedAspectRatio']); + } + } + if (((document['fullscreenElement'] || document['mozFullScreenElement'] || + document['msFullscreenElement'] || document['webkitFullscreenElement'] || + document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) { + var factor = Math.min(screen.width / w, screen.height / h); + w = Math.round(w * factor); + h = Math.round(h * factor); + } + if (Browser.resizeCanvas) { + if (canvas.width != w) canvas.width = w; + if (canvas.height != h) canvas.height = h; + if (typeof canvas.style != 'undefined') { + canvas.style.removeProperty( "width"); + canvas.style.removeProperty("height"); + } + } else { + if (canvas.width != wNative) canvas.width = wNative; + if (canvas.height != hNative) canvas.height = hNative; + if (typeof canvas.style != 'undefined') { + if (w != wNative || h != hNative) { + canvas.style.setProperty( "width", w + "px", "important"); + canvas.style.setProperty("height", h + "px", "important"); + } else { + canvas.style.removeProperty( "width"); + canvas.style.removeProperty("height"); + } + } + } + },wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function () { + var handle = Browser.nextWgetRequestHandle; + Browser.nextWgetRequestHandle++; + return handle; + }};function _emscripten_set_main_loop_timing(mode, value) { + Browser.mainLoop.timingMode = mode; + Browser.mainLoop.timingValue = value; + + if (!Browser.mainLoop.func) { + return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. + } + + if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { + var timeUntilNextTick = Math.max(0, Browser.mainLoop.tickStartTime + value - _emscripten_get_now())|0; + setTimeout(Browser.mainLoop.runner, timeUntilNextTick); // doing this each time means that on exception, we stop + }; + Browser.mainLoop.method = 'timeout'; + } else if (mode == 1 /*EM_TIMING_RAF*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { + Browser.requestAnimationFrame(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'rAF'; + } else if (mode == 2 /*EM_TIMING_SETIMMEDIATE*/) { + if (!window['setImmediate']) { + // Emulate setImmediate. (note: not a complete polyfill, we don't emulate clearImmediate() to keep code size to minimum, since not needed) + var setImmediates = []; + var emscriptenMainLoopMessageId = 'setimmediate'; + function Browser_setImmediate_messageHandler(event) { + if (event.source === window && event.data === emscriptenMainLoopMessageId) { + event.stopPropagation(); + setImmediates.shift()(); + } + } + window.addEventListener("message", Browser_setImmediate_messageHandler, true); + window['setImmediate'] = function Browser_emulated_setImmediate(func) { + setImmediates.push(func); + } + } + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { + window['setImmediate'](Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'immediate'; + } + return 0; + } + + function _emscripten_get_now() { abort() }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) { + Module['noExitRuntime'] = true; + + assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); + + Browser.mainLoop.func = func; + Browser.mainLoop.arg = arg; + + var browserIterationFunc; + if (typeof arg !== 'undefined') { + browserIterationFunc = function() { + Module['dynCall_vi'](func, arg); + }; + } else { + browserIterationFunc = function() { + Module['dynCall_v'](func); + }; + } + + var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop; + + Browser.mainLoop.runner = function Browser_mainLoop_runner() { + if (ABORT) return; + if (Browser.mainLoop.queue.length > 0) { + var start = Date.now(); + var blocker = Browser.mainLoop.queue.shift(); + blocker.func(blocker.arg); + if (Browser.mainLoop.remainingBlockers) { + var remaining = Browser.mainLoop.remainingBlockers; + var next = remaining%1 == 0 ? remaining-1 : Math.floor(remaining); + if (blocker.counted) { + Browser.mainLoop.remainingBlockers = next; + } else { + // not counted, but move the progress along a tiny bit + next = next + 0.5; // do not steal all the next one's progress + Browser.mainLoop.remainingBlockers = (8*remaining + next)/9; + } + } + console.log('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + ' ms'); //, left: ' + Browser.mainLoop.remainingBlockers); + Browser.mainLoop.updateStatus(); + + // catches pause/resume main loop from blocker execution + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + setTimeout(Browser.mainLoop.runner, 0); + return; + } + + // catch pauses from non-main loop sources + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + // Implement very basic swap interval control + Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0; + if (Browser.mainLoop.timingMode == 1/*EM_TIMING_RAF*/ && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) { + // Not the scheduled time to render this frame - skip. + Browser.mainLoop.scheduler(); + return; + } else if (Browser.mainLoop.timingMode == 0/*EM_TIMING_SETTIMEOUT*/) { + Browser.mainLoop.tickStartTime = _emscripten_get_now(); + } + + // Signal GL rendering layer that processing of a new frame is about to start. This helps it optimize + // VBO double-buffering and reduce GPU stalls. + + + if (Browser.mainLoop.method === 'timeout' && Module.ctx) { + Module.printErr('Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!'); + Browser.mainLoop.method = ''; // just warn once per call to set main loop + } + + Browser.mainLoop.runIter(browserIterationFunc); + + + // catch pauses from the main loop itself + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + // Queue new audio data. This is important to be right after the main loop invocation, so that we will immediately be able + // to queue the newest produced audio samples. + // TODO: Consider adding pre- and post- rAF callbacks so that GL.newRenderingFrameStarted() and SDL.audio.queueNewAudioData() + // do not need to be hardcoded into this function, but can be more generic. + if (typeof SDL === 'object' && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData(); + + Browser.mainLoop.scheduler(); + } + + if (!noSetTiming) { + if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); + else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) + + Browser.mainLoop.scheduler(); + } + + if (simulateInfiniteLoop) { + throw 'SimulateInfiniteLoop'; + } + } + + + Module["_memset"] = _memset; + + function _pthread_cleanup_push(routine, arg) { + __ATEXIT__.push(function() { Module['dynCall_vi'](routine, arg) }) + _pthread_cleanup_push.level = __ATEXIT__.length; + } + + function _pthread_cleanup_pop() { + assert(_pthread_cleanup_push.level == __ATEXIT__.length, 'cannot pop if something else added meanwhile!'); + __ATEXIT__.pop(); + _pthread_cleanup_push.level = __ATEXIT__.length; + } + + function _abort() { + Module['abort'](); + } + + + function __ZSt18uncaught_exceptionv() { // std::uncaught_exception() + return !!__ZSt18uncaught_exceptionv.uncaught_exception; + } + + var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function (adjusted) { + if (!adjusted || EXCEPTIONS.infos[adjusted]) return adjusted; + for (var ptr in EXCEPTIONS.infos) { + var info = EXCEPTIONS.infos[ptr]; + if (info.adjusted === adjusted) { + return ptr; + } + } + return adjusted; + },addRef:function (ptr) { + if (!ptr) return; + var info = EXCEPTIONS.infos[ptr]; + info.refcount++; + },decRef:function (ptr) { + if (!ptr) return; + var info = EXCEPTIONS.infos[ptr]; + assert(info.refcount > 0); + info.refcount--; + // A rethrown exception can reach refcount 0; it must not be discarded + // Its next handler will clear the rethrown flag and addRef it, prior to + // final decRef and destruction here + if (info.refcount === 0 && !info.rethrown) { + if (info.destructor) { + Module['dynCall_vi'](info.destructor, ptr); + } + delete EXCEPTIONS.infos[ptr]; + ___cxa_free_exception(ptr); + } + },clearRef:function (ptr) { + if (!ptr) return; + var info = EXCEPTIONS.infos[ptr]; + info.refcount = 0; + }};function ___cxa_begin_catch(ptr) { + var info = EXCEPTIONS.infos[ptr]; + if (info && !info.caught) { + info.caught = true; + __ZSt18uncaught_exceptionv.uncaught_exception--; + } + if (info) info.rethrown = false; + EXCEPTIONS.caught.push(ptr); + EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(ptr)); + return ptr; + } + + function _pthread_once(ptr, func) { + if (!_pthread_once.seen) _pthread_once.seen = {}; + if (ptr in _pthread_once.seen) return; + Module['dynCall_v'](func); + _pthread_once.seen[ptr] = 1; + } + + function ___lock() {} + + function ___unlock() {} + + + var SYSCALLS={varargs:0,get:function (varargs) { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function () { + var ret = Pointer_stringify(SYSCALLS.get()); + return ret; + },get64:function () { + var low = SYSCALLS.get(), high = SYSCALLS.get(); + if (low >= 0) assert(high === 0); + else assert(high === -1); + return low; + },getZero:function () { + assert(SYSCALLS.get() === 0); + }};function ___syscall6(which, varargs) {SYSCALLS.varargs = varargs; + try { + // close + var stream = SYSCALLS.getStreamFromFD(); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + + var PTHREAD_SPECIFIC={};function _pthread_getspecific(key) { + return PTHREAD_SPECIFIC[key] || 0; + } + + + function ___setErrNo(value) { + if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value; + return value; + } + Module["_sbrk"] = _sbrk; + + function _clock() { + if (_clock.start === undefined) _clock.start = Date.now(); + return ((Date.now() - _clock.start) * (1000000 / 1000))|0; + } + + + var PTHREAD_SPECIFIC_NEXT_KEY=1; + + var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _pthread_key_create(key, destructor) { + if (key == 0) { + return ERRNO_CODES.EINVAL; + } + HEAP32[((key)>>2)]=PTHREAD_SPECIFIC_NEXT_KEY; + // values start at 0 + PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY] = 0; + PTHREAD_SPECIFIC_NEXT_KEY++; + return 0; + } + + + + function ___resumeException(ptr) { + if (!EXCEPTIONS.last) { EXCEPTIONS.last = ptr; } + throw ptr + " - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."; + }function ___cxa_find_matching_catch() { + var thrown = EXCEPTIONS.last; + if (!thrown) { + // just pass through the null ptr + return ((Runtime.setTempRet0(0),0)|0); + } + var info = EXCEPTIONS.infos[thrown]; + var throwntype = info.type; + if (!throwntype) { + // just pass through the thrown ptr + return ((Runtime.setTempRet0(0),thrown)|0); + } + var typeArray = Array.prototype.slice.call(arguments); + + var pointer = Module['___cxa_is_pointer_type'](throwntype); + // can_catch receives a **, add indirection + if (!___cxa_find_matching_catch.buffer) ___cxa_find_matching_catch.buffer = _malloc(4); + HEAP32[((___cxa_find_matching_catch.buffer)>>2)]=thrown; + thrown = ___cxa_find_matching_catch.buffer; + // The different catch blocks are denoted by different types. + // Due to inheritance, those types may not precisely match the + // type of the thrown object. Find one which matches, and + // return the type of the catch block which should be called. + for (var i = 0; i < typeArray.length; i++) { + if (typeArray[i] && Module['___cxa_can_catch'](typeArray[i], throwntype, thrown)) { + thrown = HEAP32[((thrown)>>2)]; // undo indirection + info.adjusted = thrown; + return ((Runtime.setTempRet0(typeArray[i]),thrown)|0); + } + } + // Shouldn't happen unless we have bogus data in typeArray + // or encounter a type for which emscripten doesn't have suitable + // typeinfo defined. Best-efforts match just in case. + thrown = HEAP32[((thrown)>>2)]; // undo indirection + return ((Runtime.setTempRet0(throwntype),thrown)|0); + }function ___gxx_personality_v0() { + } + + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.set(HEAPU8.subarray(src, src+num), dest); + return dest; + } + Module["_memcpy"] = _memcpy; + + function ___syscall140(which, varargs) {SYSCALLS.varargs = varargs; + try { + // llseek + var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get(); + var offset = offset_low; + assert(offset_high === 0); + FS.llseek(stream, offset, whence); + HEAP32[((result)>>2)]=stream.position; + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function _pthread_setspecific(key, value) { + if (!(key in PTHREAD_SPECIFIC)) { + return ERRNO_CODES.EINVAL; + } + PTHREAD_SPECIFIC[key] = value; + return 0; + } + + + Module["_pthread_self"] = _pthread_self; + + function _emscripten_cancel_main_loop() { + Browser.mainLoop.pause(); + Browser.mainLoop.func = null; + } + + function _emscripten_run_script(ptr) { + eval(Pointer_stringify(ptr)); + } + + function ___syscall146(which, varargs) {SYSCALLS.varargs = varargs; + try { + // writev + // hack to support printf in NO_FILESYSTEM + var stream = SYSCALLS.get(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get(); + var ret = 0; + if (!___syscall146.buffer) { + ___syscall146.buffers = [null, [], []]; // 1 => stdout, 2 => stderr + ___syscall146.printChar = function(stream, curr) { + var buffer = ___syscall146.buffers[stream]; + assert(buffer); + if (curr === 0 || curr === 10) { + (stream === 1 ? Module['print'] : Module['printErr'])(UTF8ArrayToString(buffer, 0)); + buffer.length = 0; + } else { + buffer.push(curr); + } + }; + } + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + for (var j = 0; j < len; j++) { + ___syscall146.printChar(stream, HEAPU8[ptr+j]); + } + ret += len; + } + return ret; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall54(which, varargs) {SYSCALLS.varargs = varargs; + try { + // ioctl + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } +Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas, vrDevice) { Module.printErr("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead."); Module["requestFullScreen"] = Module["requestFullscreen"]; Browser.requestFullScreen(lockPointer, resizeCanvas, vrDevice) }; + Module["requestFullscreen"] = function Module_requestFullscreen(lockPointer, resizeCanvas, vrDevice) { Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice) }; + Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; + Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; + Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() }; + Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() }; + Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() } + Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes) }; + if (typeof dateNow !== 'undefined') { + _emscripten_get_now = dateNow; + } else if (typeof self === 'object' && self['performance'] && typeof self['performance']['now'] === 'function') { + _emscripten_get_now = function() { return self['performance']['now'](); }; + } else if (typeof performance === 'object' && typeof performance['now'] === 'function') { + _emscripten_get_now = function() { return performance['now'](); }; + } else { + _emscripten_get_now = Date.now; + }; +/* flush anything remaining in the buffer during shutdown */ __ATEXIT__.push(function() { var fflush = Module["_fflush"]; if (fflush) fflush(0); var printChar = ___syscall146.printChar; if (!printChar) return; var buffers = ___syscall146.buffers; if (buffers[1].length) printChar(1, 10); if (buffers[2].length) printChar(2, 10); });; +DYNAMICTOP_PTR = allocate(1, "i32", ALLOC_STATIC); + +STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP); + +STACK_MAX = STACK_BASE + TOTAL_STACK; + +DYNAMIC_BASE = Runtime.alignMemory(STACK_MAX); + +HEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE; + +staticSealed = true; // seal the static portion of memory + + + +Module['wasmTableSize'] = 120; + +Module['wasmMaxTableSize'] = 120; + +function invoke_iiii(index,a1,a2,a3) { + try { + return Module["dynCall_iiii"](index,a1,a2,a3); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_viiiii(index,a1,a2,a3,a4,a5) { + try { + Module["dynCall_viiiii"](index,a1,a2,a3,a4,a5); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_vi(index,a1) { + try { + Module["dynCall_vi"](index,a1); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_vii(index,a1,a2) { + try { + Module["dynCall_vii"](index,a1,a2); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_ii(index,a1) { + try { + return Module["dynCall_ii"](index,a1); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_viii(index,a1,a2,a3) { + try { + Module["dynCall_viii"](index,a1,a2,a3); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_v(index) { + try { + Module["dynCall_v"](index); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_viif(index,a1,a2,a3) { + try { + Module["dynCall_viif"](index,a1,a2,a3); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6) { + try { + Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_iii(index,a1,a2) { + try { + return Module["dynCall_iii"](index,a1,a2); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_iiiiii(index,a1,a2,a3,a4,a5) { + try { + return Module["dynCall_iiiiii"](index,a1,a2,a3,a4,a5); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +function invoke_viiii(index,a1,a2,a3,a4) { + try { + Module["dynCall_viiii"](index,a1,a2,a3,a4); + } catch(e) { + if (typeof e !== 'number' && e !== 'longjmp') throw e; + Module["setThrew"](1, 0); + } +} + +Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity }; + +Module.asmLibraryArg = { "abort": abort, "assert": assert, "enlargeMemory": enlargeMemory, "getTotalMemory": getTotalMemory, "abortOnCannotGrowMemory": abortOnCannotGrowMemory, "invoke_iiii": invoke_iiii, "invoke_viiiii": invoke_viiiii, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_viii": invoke_viii, "invoke_v": invoke_v, "invoke_viif": invoke_viif, "invoke_viiiiii": invoke_viiiiii, "invoke_iii": invoke_iii, "invoke_iiiiii": invoke_iiiiii, "invoke_viiii": invoke_viiii, "_pthread_cleanup_pop": _pthread_cleanup_pop, "_emscripten_run_script": _emscripten_run_script, "_pthread_key_create": _pthread_key_create, "___syscall6": ___syscall6, "___setErrNo": ___setErrNo, "___gxx_personality_v0": ___gxx_personality_v0, "___assert_fail": ___assert_fail, "__ZSt18uncaught_exceptionv": __ZSt18uncaught_exceptionv, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "___cxa_begin_catch": ___cxa_begin_catch, "_emscripten_memcpy_big": _emscripten_memcpy_big, "___resumeException": ___resumeException, "___cxa_find_matching_catch": ___cxa_find_matching_catch, "_pthread_getspecific": _pthread_getspecific, "_clock": _clock, "_pthread_once": _pthread_once, "___syscall54": ___syscall54, "___unlock": ___unlock, "_emscripten_set_main_loop": _emscripten_set_main_loop, "_emscripten_get_now": _emscripten_get_now, "_pthread_setspecific": _pthread_setspecific, "___lock": ___lock, "_abort": _abort, "_pthread_cleanup_push": _pthread_cleanup_push, "_emscripten_cancel_main_loop": _emscripten_cancel_main_loop, "___syscall140": ___syscall140, "___cxa_pure_virtual": ___cxa_pure_virtual, "___syscall146": ___syscall146, "DYNAMICTOP_PTR": DYNAMICTOP_PTR, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX }; +// EMSCRIPTEN_START_ASM +var asm =Module["asm"]// EMSCRIPTEN_END_ASM +(Module.asmGlobalArg, Module.asmLibraryArg, buffer); + +Module["asm"] = asm; +var _malloc = Module["_malloc"] = function() { return Module["asm"]["_malloc"].apply(null, arguments) }; +var ___cxa_can_catch = Module["___cxa_can_catch"] = function() { return Module["asm"]["___cxa_can_catch"].apply(null, arguments) }; +var getTempRet0 = Module["getTempRet0"] = function() { return Module["asm"]["getTempRet0"].apply(null, arguments) }; +var _free = Module["_free"] = function() { return Module["asm"]["_free"].apply(null, arguments) }; +var _main = Module["_main"] = function() { return Module["asm"]["_main"].apply(null, arguments) }; +var setTempRet0 = Module["setTempRet0"] = function() { return Module["asm"]["setTempRet0"].apply(null, arguments) }; +var ___cxa_is_pointer_type = Module["___cxa_is_pointer_type"] = function() { return Module["asm"]["___cxa_is_pointer_type"].apply(null, arguments) }; +var establishStackSpace = Module["establishStackSpace"] = function() { return Module["asm"]["establishStackSpace"].apply(null, arguments) }; +var _pthread_self = Module["_pthread_self"] = function() { return Module["asm"]["_pthread_self"].apply(null, arguments) }; +var stackSave = Module["stackSave"] = function() { return Module["asm"]["stackSave"].apply(null, arguments) }; +var _memset = Module["_memset"] = function() { return Module["asm"]["_memset"].apply(null, arguments) }; +var _sbrk = Module["_sbrk"] = function() { return Module["asm"]["_sbrk"].apply(null, arguments) }; +var stackRestore = Module["stackRestore"] = function() { return Module["asm"]["stackRestore"].apply(null, arguments) }; +var _memcpy = Module["_memcpy"] = function() { return Module["asm"]["_memcpy"].apply(null, arguments) }; +var stackAlloc = Module["stackAlloc"] = function() { return Module["asm"]["stackAlloc"].apply(null, arguments) }; +var setThrew = Module["setThrew"] = function() { return Module["asm"]["setThrew"].apply(null, arguments) }; +var _fflush = Module["_fflush"] = function() { return Module["asm"]["_fflush"].apply(null, arguments) }; +var ___errno_location = Module["___errno_location"] = function() { return Module["asm"]["___errno_location"].apply(null, arguments) }; +var runPostSets = Module["runPostSets"] = function() { return Module["asm"]["runPostSets"].apply(null, arguments) }; +var dynCall_iiii = Module["dynCall_iiii"] = function() { return Module["asm"]["dynCall_iiii"].apply(null, arguments) }; +var dynCall_viiiii = Module["dynCall_viiiii"] = function() { return Module["asm"]["dynCall_viiiii"].apply(null, arguments) }; +var dynCall_vi = Module["dynCall_vi"] = function() { return Module["asm"]["dynCall_vi"].apply(null, arguments) }; +var dynCall_vii = Module["dynCall_vii"] = function() { return Module["asm"]["dynCall_vii"].apply(null, arguments) }; +var dynCall_ii = Module["dynCall_ii"] = function() { return Module["asm"]["dynCall_ii"].apply(null, arguments) }; +var dynCall_viii = Module["dynCall_viii"] = function() { return Module["asm"]["dynCall_viii"].apply(null, arguments) }; +var dynCall_v = Module["dynCall_v"] = function() { return Module["asm"]["dynCall_v"].apply(null, arguments) }; +var dynCall_viif = Module["dynCall_viif"] = function() { return Module["asm"]["dynCall_viif"].apply(null, arguments) }; +var dynCall_viiiiii = Module["dynCall_viiiiii"] = function() { return Module["asm"]["dynCall_viiiiii"].apply(null, arguments) }; +var dynCall_iii = Module["dynCall_iii"] = function() { return Module["asm"]["dynCall_iii"].apply(null, arguments) }; +var dynCall_iiiiii = Module["dynCall_iiiiii"] = function() { return Module["asm"]["dynCall_iiiiii"].apply(null, arguments) }; +var dynCall_viiii = Module["dynCall_viiii"] = function() { return Module["asm"]["dynCall_viiii"].apply(null, arguments) }; +; + +Runtime.stackAlloc = Module['stackAlloc']; +Runtime.stackSave = Module['stackSave']; +Runtime.stackRestore = Module['stackRestore']; +Runtime.establishStackSpace = Module['establishStackSpace']; + +Runtime.setTempRet0 = Module['setTempRet0']; +Runtime.getTempRet0 = Module['getTempRet0']; + + + +// === Auto-generated postamble setup entry stuff === + +Module['asm'] = asm; + + + +if (memoryInitializer) { + if (typeof Module['locateFile'] === 'function') { + memoryInitializer = Module['locateFile'](memoryInitializer); + } else if (Module['memoryInitializerPrefixURL']) { + memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer; + } + var data = Module['readBinary'](memoryInitializer); + HEAPU8.set(data, Runtime.GLOBAL_BASE); +} + +function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; +}; +ExitStatus.prototype = new Error(); +ExitStatus.prototype.constructor = ExitStatus; + +var initialStackTop; +var preloadStartTime = null; +var calledMain = false; + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!Module['calledRun']) run(); + if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +} + +Module['callMain'] = Module.callMain = function callMain(args) { + + args = args || []; + + ensureInitRuntime(); + + var argc = args.length+1; + function pad() { + for (var i = 0; i < 4-1; i++) { + argv.push(0); + } + } + var argv = [allocate(intArrayFromString(Module['thisProgram']), 'i8', ALLOC_NORMAL) ]; + pad(); + for (var i = 0; i < argc-1; i = i + 1) { + argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_NORMAL)); + pad(); + } + argv.push(0); + argv = allocate(argv, 'i32', ALLOC_NORMAL); + + + try { + + var ret = Module['_main'](argc, argv, 0); + + + // if we're not running an evented main loop, it's time to exit + exit(ret, /* implicit = */ true); + } + catch(e) { + if (e instanceof ExitStatus) { + // exit() throws this once it's done to make sure execution + // has been stopped completely + return; + } else if (e == 'SimulateInfiniteLoop') { + // running an evented main loop, don't immediately exit + Module['noExitRuntime'] = true; + return; + } else { + if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]); + throw e; + } + } finally { + calledMain = true; + } +} + + + + +function run(args) { + args = args || Module['arguments']; + + if (preloadStartTime === null) preloadStartTime = Date.now(); + + if (runDependencies > 0) { + return; + } + + + preRun(); + + if (runDependencies > 0) return; // a preRun added a dependency, run will be called later + if (Module['calledRun']) return; // run may have just been called through dependencies being fulfilled just in this very frame + + function doRun() { + if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening + Module['calledRun'] = true; + + if (ABORT) return; + + ensureInitRuntime(); + + preMain(); + + + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + if (Module['_main'] && shouldRunNow) Module['callMain'](args); + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function() { + setTimeout(function() { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else { + doRun(); + } +} +Module['run'] = Module.run = run; + +function exit(status, implicit) { + throw new ExitStatus(status); +} +Module['exit'] = Module.exit = exit; + +var abortDecorators = []; + +function abort(what) { + if (what !== undefined) { + Module.print(what); + Module.printErr(what); + what = JSON.stringify(what) + } else { + what = ''; + } + + ABORT = true; + EXITSTATUS = 1; + + var extra = '\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.'; + + var output = 'abort(' + what + ') at ' + stackTrace() + extra; + if (abortDecorators) { + abortDecorators.forEach(function(decorator) { + output = decorator(output, what); + }); + } + throw output; +} +Module['abort'] = Module.abort = abort; + +// {{PRE_RUN_ADDITIONS}} + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + +// shouldRunNow refers to calling main(), not run(). +var shouldRunNow = true; +if (Module['noInitialRun']) { + shouldRunNow = false; +} + + +run(); +drainJobQueue(); + +}; // End of function wrapping the whole top-level Emscripten glue code + +const bytecode = os.file.readFile(scriptdir + 'wasm_box2d.wasm', 'binary'); + +if (typeof setBufferStreamParams == 'function') { + setBufferStreamParams(/* delayMillis = */ 1, /* chunkSize = */ 1000); +} +const cacheEntry = streamCacheEntry(bytecode); + +runBox2d(cacheEntry); + +while (!wasmHasTier2CompilationCompleted(cacheEntry.module)) + sleep(1); + +if (wasmCachingEnabled()) { + assertEq(cacheEntry.cached, true) +} + +runBox2d(cacheEntry); + +if (wasmCachingEnabled()) { + runBox2d(wasmCompileInSeparateProcess(bytecode)); +} diff --git a/js/src/jit-test/tests/wasm/bench/wasm_box2d.wasm b/js/src/jit-test/tests/wasm/bench/wasm_box2d.wasm new file mode 100644 index 0000000000..bafe75cc82 Binary files /dev/null and b/js/src/jit-test/tests/wasm/bench/wasm_box2d.wasm differ diff --git a/js/src/jit-test/tests/wasm/big-resize.js b/js/src/jit-test/tests/wasm/big-resize.js new file mode 100644 index 0000000000..a2dd616a6d --- /dev/null +++ b/js/src/jit-test/tests/wasm/big-resize.js @@ -0,0 +1,8 @@ +wasmFullPass(`(module + (memory 1 32768) + (func $test (result i32) + (if (i32.eq (memory.grow (i32.const 16384)) (i32.const -1)) (then (return (i32.const 42)))) + (i32.store (i32.const 1073807356) (i32.const 42)) + (i32.load (i32.const 1073807356))) + (export "run" (func $test)) +)`, 42); diff --git a/js/src/jit-test/tests/wasm/bigint/bigint.js b/js/src/jit-test/tests/wasm/bigint/bigint.js new file mode 100644 index 0000000000..e0e1671237 --- /dev/null +++ b/js/src/jit-test/tests/wasm/bigint/bigint.js @@ -0,0 +1,468 @@ +// Used to ensure tests will trigger Wasm Jit stub code. +var threshold = 2 * getJitCompilerOptions()["ion.warmup.trigger"] + 10; +function testWithJit(f) { + for (var i = 0; i < threshold; i++) { + f(); + } +} + +function testRet() { + var f = wasmEvalText(`(module + (func (export "f") (result i64) (i64.const 66)) + )`).exports.f; + + testWithJit(() => { + assertEq(typeof f(), "bigint", "should return a bigint"); + assertEq(f(), 66n, "should return the correct value"); + }); +} + +function testId() { + var exports = wasmEvalText(`(module + (func (export "f") (param i64 i64) (result i64) + (local.get 0) + ) + (func (export "f2") (param i64 i64) (result i64) + (local.get 1) + ) + )`).exports; + var f = exports.f; + var f2 = exports.f2; + + testWithJit(() => { + assertEq(f(0n, 1n), 0n); + assertEq(f(-0n, 1n), -0n); + assertEq(f(123n, 1n), 123n); + assertEq(f(-123n, 1n), -123n); + assertEq(f(2n ** 63n, 1n), -(2n ** 63n)); + assertEq(f(2n ** 64n + 123n, 1n), 123n); + assertEq(f("5", 1n), 5n); + assertEq(f(true, 1n), 1n); + assertEq(f(false, 1n), 0n); + assertEq(f({ toString() { return "5"; }, }, 1n), 5n); + assertEq(f({ valueOf() { return 5n; }, }, 1n), 5n); + + assertEq(f2(1n, 0n), 0n); + assertEq(f2(1n, -0n), -0n); + assertEq(f2(1n, 123n), 123n); + assertEq(f2(1n, -123n), -123n); + assertEq(f2(1n, 2n ** 63n), -(2n ** 63n)); + assertEq(f2(1n, 2n ** 64n + 123n), 123n); + assertEq(f2(1n, "5"), 5n); + assertEq(f2(1n, true), 1n); + assertEq(f2(1n, false), 0n); + assertEq(f2(1n, { toString() { return "5"; }, }), 5n); + assertEq(f2(1n, { valueOf() { return 5n; }, }), 5n); + }); +} + +function testNonBigIntArgs() { + var f = wasmEvalText(`(module + (func (export "f") (param i64) (result i64) + (local.get 0) + ) + )`).exports.f; + + assertErrorMessage(() => f(5), TypeError, "can't convert 5 to BigInt"); + assertErrorMessage(() => f({ valueOf() { return 5; }, }), + TypeError, + "can't convert 5 to BigInt"); + assertErrorMessage(() => f(5.3), TypeError, "can't convert 5.3 to BigInt"); + assertErrorMessage(() => f(), TypeError, "can't convert undefined to BigInt"); + assertErrorMessage( + () => f(undefined), + TypeError, + "can't convert undefined to BigInt" + ); + assertErrorMessage(() => f(null), TypeError, "can't convert null to BigInt"); + assertErrorMessage( + () => f(Symbol("foo")), + TypeError, + 'can\'t convert Symbol("foo") to BigInt' + ); + assertErrorMessage(() => f({}), SyntaxError, "invalid BigInt syntax"); + assertErrorMessage(() => f({ valueof() { return "foo"; }, }), + SyntaxError, + "invalid BigInt syntax"); + assertErrorMessage(() => f("x"), SyntaxError, "invalid BigInt syntax"); +} + +function testIdPlus() { + var f = wasmEvalText(`(module + (func (export "f") (param i64) (result i64) + (i64.const 8) + (local.get 0) + (i64.add) + ) + )`).exports.f; + + testWithJit(() => { + assertEq(f(0n), 0n + 8n); + assertEq(f(147n), 147n + 8n); + }); +} + +// Test functions with many parameters to stress ABI cases. We want to test +// spilled arguments both under and over the Ion call inlining limit. +function testManyArgs() { + var f1 = wasmEvalText(`(module + (func (export "f") + (param i64 i64 i64 i64 i64 i64 i64 i64) + (result i64) + (local.get 0) + (local.get 1) + (local.get 2) + (local.get 3) + (local.get 4) + (local.get 5) + (local.get 6) + (local.get 7) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + ) + )`).exports.f; + + var f2 = wasmEvalText(`(module + (func (export "f") + (param i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64) + (result i64) + (local.get 0) + (local.get 1) + (local.get 2) + (local.get 3) + (local.get 4) + (local.get 5) + (local.get 6) + (local.get 7) + (local.get 8) + (local.get 9) + (local.get 10) + (local.get 11) + (local.get 12) + (local.get 13) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + (i64.add) + ) + )`).exports.f; + + testWithJit(() => { + assertEq(f1(1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n), 8n); + assertEq(f2(1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n), 14n); + }); +} + +// Test import and re-export. +function testImportExport() { + var f1 = wasmEvalText( + `(module + (import "i64" "func" (func (param i64))) + (export "f" (func 0)) + )`, + { + i64: { + func(b) { + assertEq(b, 42n); + }, + }, + } + ).exports.f; + + var f2 = wasmEvalText( + `(module + (import "i64" "func" (func (param i64) (result i64))) + (export "f" (func 0)) + )`, + { + i64: { + func(n) { + return n + 1n; + }, + }, + } + ).exports.f; + + var f3 = wasmEvalText( + `(module + (import "" "i64" (func $i64 (param i64) (result i64))) + (func (export "f") (param i64) (result i64) + (local.get 0) + (call $i64)) + )`, + { + "": { + i64: n => { + return n + 1n; + }, + }, + } + ).exports.f; + + var f4 = wasmEvalText( + `(module + (import "i64" "func" (func (result i64))) + (export "f" (func 0)) + )`, + { i64: { func() {} } } + ).exports.f; + + testWithJit(() => { + assertEq(f1(42n), undefined); + assertEq(f2(42n), 43n); + assertEq(f3(42n), 43n); + assertErrorMessage(() => f4(42), TypeError, "can't convert undefined to BigInt"); + }); +} + +// Test that a mixture of I64 and other argument types works. +function testMixedArgs() { + var f = wasmEvalText(`(module + (func (export "f") + (param i64 f32 f64 i32 i64) + (result i64) + (local.get 1) + (i64.trunc_f32_s) + (local.get 2) + (i64.trunc_f64_s) + (i64.add) + (local.get 3) + (i64.extend_i32_u) + (i64.add) + (local.get 0) + (i64.add) + (local.get 4) + (i64.add) + ) + )`).exports.f; + + testWithJit(() => { + assertEq(f(1n, 1.3, 1.7, 1, 1n), 5n); + }); +} + +function testGlobalImport() { + var exports = wasmEvalText( + `(module + (import "g" "a" (global $a i64)) + (import "g" "b" (global $b i64)) + (import "g" "c" (global $c i64)) + + (export "a" (global $a)) + (export "b" (global $b)) + (export "c" (global $c)) + )`, + { g: { a: 1n, b: 2n ** 63n, c: -100n } } + ).exports; + + testWithJit(() => { + assertEq(exports.a.value, 1n); + assertEq(exports.b.value, -(2n ** 63n)); + assertEq(exports.c.value, -100n); + }); +} + +function testMutableGlobalImport() { + var exports = wasmEvalText( + `(module + (import "g" "a" (global $a (mut i64))) + (import "g" "b" (global $b (mut i64))) + + (export "a" (global $a)) + (export "b" (global $b)) + )`, + { + g: { + a: new WebAssembly.Global({ value: "i64", mutable: true }, 1n), + b: new WebAssembly.Global({ value: "i64", mutable: true }, "2"), + }, + } + ).exports; + + testWithJit(() => { + assertEq(exports.a.value, 1n); + assertEq(exports.b.value, 2n); + }); +} + +function testMutableGlobalImportLiteral() { + assertErrorMessage( + () => + wasmEvalText( + `(module + (import "g" "a" (global $a (mut i64))) + )`, + { g: { a: 1n } } + ), + WebAssembly.LinkError, + "imported global mutability mismatch" + ); +} + +function testGlobalBadImportLiteral() { + assertErrorMessage( + () => + wasmEvalText( + `(module + (import "g" "a" (global $a i64)) + (export "a" (global $a)) + )`, + { g: { a: 1 } } + ), + WebAssembly.LinkError, + "import object field 'a' is not a BigInt" + ); + + assertErrorMessage( + () => + wasmEvalText( + `(module + (import "g" "a" (global $a i64)) + (export "a" (global $a)) + )`, + { g: { a: "foo" } } + ), + WebAssembly.LinkError, + "import object field 'a' is not a BigInt" + ); +} + +// This exercises error code paths that were added due to BigInt/I64 +// conversion, though the test does not directly deal with I64 types. +function testGlobalBadImportNumber() { + assertErrorMessage( + () => + wasmEvalText( + `(module + (import "g" "a" (global $a i32)) + (export "a" (global $a)) + )`, + { g: { a: 1n } } + ), + WebAssembly.LinkError, + "import object field 'a' is not a Number" + ); + + assertErrorMessage( + () => + wasmEvalText( + `(module + (import "g" "a" (global $a i32)) + (export "a" (global $a)) + )`, + { g: { a: "foo" } } + ), + WebAssembly.LinkError, + "import object field 'a' is not a Number" + ); +} + +function testI64Global() { + var global = new WebAssembly.Global({ value: "i64", mutable: true }); + + assertEq(global.value, 0n); // initial value + + global.value = 123n; + assertEq(global.value, 123n); + + global.value = 2n ** 63n; + assertEq(global.value, -(2n ** 63n)); + + global.value = "123"; + assertEq(global.value, 123n); +} + +function testI64GlobalValueOf() { + var argument = { value: "i64" }; + + // as literal + var global = new WebAssembly.Global(argument, { + valueOf() { + return 123n; + }, + }); + assertEq(global.value, 123n); + + // as string + var global2 = new WebAssembly.Global(argument, { + valueOf() { + return "123"; + }, + }); + assertEq(global.value, 123n); +} + +function testGlobalI64ValueWrongType() { + var argument = { value: "i64" }; + assertErrorMessage( + () => new WebAssembly.Global(argument, 666), + TypeError, + "can't convert 666 to BigInt" + ); + assertErrorMessage( + () => new WebAssembly.Global(argument, "foo"), + SyntaxError, + "invalid BigInt syntax" + ); + assertErrorMessage( + () => + new WebAssembly.Global(argument, { + valueOf() { + return 5; + }, + }), + TypeError, + "can't convert 5 to BigInt" + ); +} + +function testGlobalI64SetWrongType() { + var global = new WebAssembly.Global({ value: "i64", mutable: true }); + assertErrorMessage(() => (global.value = 1), TypeError, "can't convert 1 to BigInt"); + assertErrorMessage( + () => (global.value = "foo"), + SyntaxError, + "invalid BigInt syntax" + ); + assertErrorMessage( + () => + (global.value = { + valueOf() { + return 5; + }, + }), + TypeError, + "can't convert 5 to BigInt" + ); +} + +testRet(); +testId(); +testIdPlus(); +testNonBigIntArgs(); +testManyArgs(); +testImportExport(); +testMixedArgs(); +testGlobalImport(); +testMutableGlobalImport(); +testMutableGlobalImportLiteral(); +testGlobalBadImportLiteral(); +testGlobalBadImportNumber(); +testI64Global(); +testI64GlobalValueOf(); +testGlobalI64ValueWrongType(); +testGlobalI64SetWrongType(); diff --git a/js/src/jit-test/tests/wasm/bigint/bug1633740.js b/js/src/jit-test/tests/wasm/bigint/bug1633740.js new file mode 100644 index 0000000000..773e8932d9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/bigint/bug1633740.js @@ -0,0 +1,25 @@ +// Test for bug 1633740, an intermittent GC-related crash caused by +// the bigint/i64 conversion in inlined Ion to Wasm calls. + +// Used to help ensure this will trigger the Ion inlined call path. +var threshold = 2 * getJitCompilerOptions()["ion.warmup.trigger"] + 10; +function testWithJit(f) { + for (var i = 0; i < threshold; i++) { + f(); + } +} + +function test() { + var exports = wasmEvalText(`(module + (func (export "f") (param i64) (result i64) + (local.get 0) + ))`).exports; + var f = exports.f; + + testWithJit(() => { + assertEq(f("5"), 5n); + }); +} + +gczeal(7, 1); // Collect nursery on every allocation. +test(); diff --git a/js/src/jit-test/tests/wasm/bigint/directives.txt b/js/src/jit-test/tests/wasm/bigint/directives.txt new file mode 100644 index 0000000000..6fb4fc4a49 --- /dev/null +++ b/js/src/jit-test/tests/wasm/bigint/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; include:wasm.js diff --git a/js/src/jit-test/tests/wasm/bigint/stubs.js b/js/src/jit-test/tests/wasm/bigint/stubs.js new file mode 100644 index 0000000000..89f7d78413 --- /dev/null +++ b/js/src/jit-test/tests/wasm/bigint/stubs.js @@ -0,0 +1,142 @@ +// This is similar to the corresponding JIT exit stub test in the +// wasm/import-export.js file, but it also tests BigInt cases. +(function testImportJitExit() { + let options = getJitCompilerOptions(); + if (!options["baseline.enable"]) return; + + let baselineTrigger = options["baseline.warmup.trigger"]; + + let valueToConvert = 0; + function ffi(n) { + if (n == 1337n) { + return BigInt(valueToConvert); + } + return 42n; + } + + // This case is intended to test that the I64 to BigInt argument + // filling for the JIT exit stub does not interfere with the other + // argument registers. It's important that the BigInt argument comes + // first (to test that it doesn't clobber the subsequent ones). + function ffi2(n, x1, x2, x3, x4, x5, x6) { + return ( + 42n + + BigInt(x1) + + BigInt(x2) + + BigInt(x3) + + BigInt(x4) + + BigInt(x5) + + BigInt(x6) + ); + } + + // This case is for testing issues with potential GC. + function ffi3(n1, n2, n3, n4) { + return n3; + } + + // Baseline compile ffis. + for (let i = baselineTrigger + 1; i-- > 0; ) { + ffi(BigInt(i)); + ffi2(BigInt(i), i, i, i, i, i, i); + ffi3(BigInt(i), BigInt(i), BigInt(i), BigInt(i)); + } + + let imports = { + a: { + ffi, + ffi2, + ffi3, + }, + }; + + ex = wasmEvalText( + `(module + (import "a" "ffi" (func $ffi (param i64) (result i64))) + (import "a" "ffi2" (func $ffi2 + (param i64 i32 i32 i32 i32 i32 i32) + (result i64))) + (import "a" "ffi3" (func $ffi3 (param i64 i64 i64 i64) (result i64))) + + (func (export "callffi") (param i64) (result i64) + local.get 0 + call $ffi + ) + + (func (export "callffi2") (param i32 i64) (result i64) + local.get 1 + local.get 0 + local.get 0 + local.get 0 + local.get 0 + local.get 0 + local.get 0 + call $ffi2 + ) + + (func (export "callffi3") (param i64 i64 i64 i64) (result i64) + local.get 0 + local.get 1 + local.get 2 + local.get 3 + call $ffi3 + ) + )`, + imports + ).exports; + + // Enable the jit exit for each JS callee. + assertEq(ex.callffi(0n), 42n); + assertEq(ex.callffi2(2, 0n), 54n); + assertEq(ex.callffi3(0n, 1n, 2n, 3n), 2n); + + // Test the jit exit under normal conditions. + assertEq(ex.callffi(0n), 42n); + assertEq(ex.callffi(1337n), 0n); + assertEq(ex.callffi2(2, 0n), 54n); + assertEq(ex.callffi3(0n, 1n, 2n, 3n), 2n); + + // Test the jit exit with GC stress in order to ensure that + // any trigger of GC in the stub do not cause errors. + if (this.gczeal) { + this.gczeal(2, 1); // Collect on every allocation + } + for (let i = 0; i < 1000; i++) { + assertEq(ex.callffi3(0n, 1n, 2n, 3n), 2n); + } +})(); + +// Test JIT entry stub +(function testJitEntry() { + let options = getJitCompilerOptions(); + if (!options["baseline.enable"]) return; + + let baselineTrigger = options["baseline.warmup.trigger"]; + + i = wasmEvalText( + `(module + (func (export "foo") (param i64) (result i64) + local.get 0 + i64.const 1 + i64.add + return + ) + )`, + {} + ).exports; + + function caller(n) { + return i.foo(42n); + } + + // Baseline compile ffis. + for (let i = baselineTrigger + 1; i-- > 0; ) { + caller(i); + } + + // Enable the jit entry. + assertEq(caller(0), 43n); + + // Test the jit exit under normal conditions. + assertEq(caller(0), 43n); +})(); diff --git a/js/src/jit-test/tests/wasm/binary-slow.js b/js/src/jit-test/tests/wasm/binary-slow.js new file mode 100644 index 0000000000..0bff1bda0b --- /dev/null +++ b/js/src/jit-test/tests/wasm/binary-slow.js @@ -0,0 +1,20 @@ +load(libdir + "wasm-binary.js"); + +const wasmEval = (code, imports) => new WebAssembly.Instance(new WebAssembly.Module(code), imports).exports; +const v2vSig = {args:[], ret:VoidCode}; +const v2vSigSection = sigSection([v2vSig]); + +// Deep nesting shouldn't crash or even throw. This test takes a long time to +// run with the JITs disabled, so to avoid occasional timeout, disable. Also +// in eager mode, this triggers pathological recompilation, so only run for +// "normal" JIT modes. This test is totally independent of the JITs so this +// shouldn't matter. +var jco = getJitCompilerOptions(); +if (jco["ion.enable"] && jco["baseline.enable"] && jco["baseline.warmup.trigger"] > 0 && jco["ion.warmup.trigger"] > 10) { + var manyBlocks = []; + for (var i = 0; i < 20000; i++) + manyBlocks.push(BlockCode, VoidCode); + for (var i = 0; i < 20000; i++) + manyBlocks.push(EndCode); + wasmEval(moduleWithSections([v2vSigSection, declSection([0]), bodySection([funcBody({locals:[], body:manyBlocks})])])); +} diff --git a/js/src/jit-test/tests/wasm/binary.js b/js/src/jit-test/tests/wasm/binary.js new file mode 100644 index 0000000000..5a59330768 --- /dev/null +++ b/js/src/jit-test/tests/wasm/binary.js @@ -0,0 +1,408 @@ +load(libdir + "wasm-binary.js"); + +const { extractStackFrameFunction } = WasmHelpers; + +const { Module, RuntimeError, CompileError } = WebAssembly; + +const magicError = /failed to match magic number/; +const unknownSection = /expected custom section/; + +function sectionError(section) { + return RegExp(`failed to start ${section} section`); +} + +function versionError(actual) { + var expect = encodingVersion; + var str = `binary version 0x${actual.toString(16)} does not match expected version 0x${expect.toString(16)}`; + return RegExp(str); +} + +const U32MAX_LEB = [255, 255, 255, 255, 15]; + +const wasmEval = (code, imports) => new WebAssembly.Instance(new Module(code), imports).exports; + +assertErrorMessage(() => wasmEval(toU8([])), CompileError, magicError); +assertErrorMessage(() => wasmEval(toU8([42])), CompileError, magicError); +assertErrorMessage(() => wasmEval(toU8([magic0, magic1, magic2])), CompileError, magicError); +assertErrorMessage(() => wasmEval(toU8([1,2,3,4])), CompileError, magicError); +assertErrorMessage(() => wasmEval(toU8([magic0, magic1, magic2, magic3])), CompileError, versionError(0x6d736100)); +assertErrorMessage(() => wasmEval(toU8([magic0, magic1, magic2, magic3, 1])), CompileError, versionError(0x6d736100)); +assertErrorMessage(() => wasmEval(toU8([magic0, magic1, magic2, magic3, ver0])), CompileError, versionError(0x6d736100)); +assertErrorMessage(() => wasmEval(toU8([magic0, magic1, magic2, magic3, ver0, ver1, ver2])), CompileError, versionError(0x6d736100)); + +var o = wasmEval(toU8(moduleHeaderThen())); +assertEq(Object.getOwnPropertyNames(o).length, 0); + +// unfinished known sections +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(typeId))), CompileError, sectionError("type")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(importId))), CompileError, sectionError("import")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(functionId))), CompileError, sectionError("function")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(tableId))), CompileError, sectionError("table")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(memoryId))), CompileError, sectionError("memory")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(globalId))), CompileError, sectionError("global")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(exportId))), CompileError, sectionError("export")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(startId))), CompileError, sectionError("start")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(elemId))), CompileError, sectionError("elem")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(codeId))), CompileError, sectionError("code")); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(dataId))), CompileError, sectionError("data")); + +// unknown sections are unconditionally rejected +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(37))), CompileError, unknownSection); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(37, 0))), CompileError, unknownSection); +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(37, 1, 0))), CompileError, unknownSection); + +// user sections have special rules +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(0))), CompileError, sectionError("custom")); // no length +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(0, 0))), CompileError, sectionError("custom")); // no id +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(0, 0, 0))), CompileError, sectionError("custom")); // payload too small to have id length +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(0, 1, 1))), CompileError, sectionError("custom")); // id not present +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(0, 1, 1, 65))), CompileError, sectionError("custom")); // id length doesn't fit in section +assertErrorMessage(() => wasmEval(toU8(moduleHeaderThen(0, 1, 0, 0))), CompileError, sectionError("custom")); // second, unfinished custom section +wasmEval(toU8(moduleHeaderThen(0, 1, 0))); // empty id +wasmEval(toU8(moduleHeaderThen(0, 1, 0, 0, 1, 0))); // 2x empty id +wasmEval(toU8(moduleHeaderThen(0, 2, 1, 65))); // id = "A" + +const v2vSig = {args:[], ret:VoidCode}; +const v2vSigSection = sigSection([v2vSig]); +const i2vSig = {args:[I32Code], ret:VoidCode}; +const v2vBody = funcBody({locals:[], body:[]}); + +assertErrorMessage(() => wasmEval(moduleWithSections([ {name: typeId, body: U32MAX_LEB } ])), CompileError, /too many types/); +assertErrorMessage(() => wasmEval(moduleWithSections([ {name: typeId, body: [1, 0], } ])), CompileError, /expected type form/); +assertErrorMessage(() => wasmEval(moduleWithSections([ {name: typeId, body: [1, FuncCode, ...U32MAX_LEB], } ])), CompileError, /too many arguments in signature/); + +assertThrowsInstanceOf(() => wasmEval(moduleWithSections([{name: typeId, body: [1]}])), CompileError); +assertThrowsInstanceOf(() => wasmEval(moduleWithSections([{name: typeId, body: [1, 1, 0]}])), CompileError); + +wasmEval(moduleWithSections([sigSection([])])); +wasmEval(moduleWithSections([v2vSigSection])); +wasmEval(moduleWithSections([sigSection([i2vSig])])); +wasmEval(moduleWithSections([sigSection([v2vSig, i2vSig])])); + +assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([{args:[], ret:33}])])), CompileError, /bad type/); +assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([{args:[33], ret:VoidCode}])])), CompileError, /bad type/); + +assertThrowsInstanceOf(() => wasmEval(moduleWithSections([sigSection([]), declSection([0])])), CompileError, /signature index out of range/); +assertThrowsInstanceOf(() => wasmEval(moduleWithSections([v2vSigSection, declSection([1])])), CompileError, /signature index out of range/); +assertErrorMessage(() => wasmEval(moduleWithSections([v2vSigSection, declSection([0])])), CompileError, /expected code section/); +wasmEval(moduleWithSections([v2vSigSection, declSection([0]), bodySection([v2vBody])])); + +assertErrorMessage(() => wasmEval(moduleWithSections([v2vSigSection, declSection([0]), bodySection([v2vBody.concat(v2vBody)])])), CompileError, /byte size mismatch in code section/); + +assertThrowsInstanceOf(() => wasmEval(moduleWithSections([v2vSigSection, {name: importId, body:[]}])), CompileError); +assertErrorMessage(() => wasmEval(moduleWithSections([importSection([{sigIndex:0, module:"a", func:"b"}])])), CompileError, /signature index out of range/); +assertErrorMessage(() => wasmEval(moduleWithSections([v2vSigSection, importSection([{sigIndex:1, module:"a", func:"b"}])])), CompileError, /signature index out of range/); +wasmEval(moduleWithSections([v2vSigSection, importSection([])])); +wasmEval(moduleWithSections([v2vSigSection, importSection([{sigIndex:0, module:"a", func:""}])]), {a:{"":()=>{}}}); + +wasmEval(moduleWithSections([ + v2vSigSection, + importSection([{sigIndex:0, module:"a", func:""}]), + declSection([0]), + bodySection([v2vBody]) +]), {a:{"":()=>{}}}); + +assertErrorMessage(() => wasmEval(moduleWithSections([ dataSection([{offset:1, elems:[]}]) ])), CompileError, /data segment requires a memory section/); + +wasmEval(moduleWithSections([tableSection(0)])); +wasmEval(moduleWithSections([elemSection([])])); +wasmEval(moduleWithSections([tableSection(0), elemSection([])])); +wasmEval(moduleWithSections([tableSection(1), elemSection([{offset:1, elems:[]}])])); +assertErrorMessage(() => wasmEval(moduleWithSections([tableSection(1), elemSection([{offset:0, elems:[0]}])])), CompileError, /element index out of range/); +wasmEval(moduleWithSections([v2vSigSection, declSection([0]), tableSection(1), elemSection([{offset:0, elems:[0]}]), bodySection([v2vBody])])); +wasmEval(moduleWithSections([v2vSigSection, declSection([0]), tableSection(2), elemSection([{offset:0, elems:[0,0]}]), bodySection([v2vBody])])); +assertErrorMessage(() => wasmEval(moduleWithSections([v2vSigSection, declSection([0]), tableSection(2), elemSection([{offset:0, elems:[0,1]}]), bodySection([v2vBody])])), CompileError, /element index out of range/); +wasmEval(moduleWithSections([v2vSigSection, declSection([0,0,0]), tableSection(4), elemSection([{offset:0, elems:[0,1,0,2]}]), bodySection([v2vBody, v2vBody, v2vBody])])); +wasmEval(moduleWithSections([sigSection([v2vSig,i2vSig]), declSection([0,0,1]), tableSection(3), elemSection([{offset:0,elems:[0,1,2]}]), bodySection([v2vBody, v2vBody, v2vBody])])); + +wasmEval(moduleWithSections([tableSection0()])); + +wasmEval(moduleWithSections([memorySection(0)])); + +function invalidMemorySection2() { + var body = []; + body.push(...varU32(2)); // number of memories + body.push(...varU32(0x0)); + body.push(...varU32(0)); + body.push(...varU32(0x0)); + body.push(...varU32(0)); + return { name: memoryId, body }; +} + +wasmEval(moduleWithSections([memorySection0()])); +assertErrorMessage(() => wasmEval(moduleWithSections([invalidMemorySection2()])), CompileError, /number of memories must be at most one/); + +// Test early 'end' +const bodyMismatch = /(function body length mismatch)|(operators remaining after end of function)/; +assertErrorMessage(() => wasmEval(moduleWithSections([v2vSigSection, declSection([0]), bodySection([funcBody({locals:[], body:[EndCode]})])])), CompileError, bodyMismatch); +assertErrorMessage(() => wasmEval(moduleWithSections([v2vSigSection, declSection([0]), bodySection([funcBody({locals:[], body:[UnreachableCode,EndCode]})])])), CompileError, bodyMismatch); +assertErrorMessage(() => wasmEval(moduleWithSections([v2vSigSection, declSection([0]), bodySection([funcBody({locals:[], body:[EndCode,UnreachableCode]})])])), CompileError, bodyMismatch); + +// Ignore errors in name section. +var tooBigNameSection = { + name: userDefinedId, + body: [...string(nameName), ...varU32(Math.pow(2, 31))] // declare 2**31 functions. +}; +wasmEval(moduleWithSections([tooBigNameSection])); + +// Skip custom sections before any expected section +var customDefSec = customSection("wee", 42, 13); +var declSec = declSection([0]); +var bodySec = bodySection([v2vBody]); +var nameSec = nameSection([funcNameSubsection([{name:'hi'}])]); +wasmEval(moduleWithSections([customDefSec, v2vSigSection, declSec, bodySec])); +wasmEval(moduleWithSections([v2vSigSection, customDefSec, declSec, bodySec])); +wasmEval(moduleWithSections([v2vSigSection, declSec, customDefSec, bodySec])); +wasmEval(moduleWithSections([v2vSigSection, declSec, bodySec, customDefSec])); +wasmEval(moduleWithSections([customDefSec, customDefSec, v2vSigSection, declSec, bodySec])); +wasmEval(moduleWithSections([customDefSec, customDefSec, v2vSigSection, customDefSec, declSec, customDefSec, bodySec])); + +// custom sections reflection: +function checkCustomSection(buf, val) { + assertEq(buf instanceof ArrayBuffer, true); + assertEq(buf.byteLength, 1); + assertEq(new Uint8Array(buf)[0], val); +} +var custom1 = customSection("one", 1); +var custom2 = customSection("one", 2); +var custom3 = customSection("two", 3); +var custom4 = customSection("three", 4); +var custom5 = customSection("three", 5); +var custom6 = customSection("three", 6); +var m = new Module(moduleWithSections([custom1, v2vSigSection, custom2, declSec, custom3, bodySec, custom4, nameSec, custom5, custom6])); +var arr = Module.customSections(m, "one"); +assertEq(arr.length, 2); +checkCustomSection(arr[0], 1); +checkCustomSection(arr[1], 2); +var arr = Module.customSections(m, "two"); +assertEq(arr.length, 1); +checkCustomSection(arr[0], 3); +var arr = Module.customSections(m, "three"); +assertEq(arr.length, 3); +checkCustomSection(arr[0], 4); +checkCustomSection(arr[1], 5); +checkCustomSection(arr[2], 6); +var arr = Module.customSections(m, "name"); +assertEq(arr.length, 1); +assertEq(arr[0].byteLength, nameSec.body.length - 5 /* 4name */); + +// Test name/custom section warnings: +const nameWarning = /validated with warning.*'name' custom section/; +const okNameSec = nameSection([]); +assertNoWarning(() => wasmEval(moduleWithSections([v2vSigSection, declSec, bodySec, okNameSec]))); +const badNameSec1 = nameSection([]); +badNameSec1.body.push(1); +assertWarning(() => wasmEval(moduleWithSections([v2vSigSection, declSec, bodySec, badNameSec1])), nameWarning); +const badNameSec2 = nameSection([funcNameSubsection([{name:'blah'}])]); +badNameSec2.body.push(100, 20, 42, 83); +assertWarning(() => wasmEval(moduleWithSections([v2vSigSection, declSec, bodySec, badNameSec2])), nameWarning); +const badNameSec3 = nameSection([funcNameSubsection([{name:'blah'}])]); +badNameSec3.body.pop(); +assertWarning(() => wasmEval(moduleWithSections([v2vSigSection, declSec, bodySec, badNameSec3])), nameWarning); +assertNoWarning(() => wasmEval(moduleWithSections([nameSection([moduleNameSubsection('hi')])]))); +assertWarning(() => wasmEval(moduleWithSections([nameSection([moduleNameSubsection('hi'), moduleNameSubsection('boo')])])), nameWarning); +// Unknown name subsection +assertNoWarning(() => wasmEval(moduleWithSections([nameSection([moduleNameSubsection('hi'), [4, 0]])]))); +assertWarning(() => wasmEval(moduleWithSections([nameSection([moduleNameSubsection('hi'), [4, 1]])])), nameWarning); +assertNoWarning(() => wasmEval(moduleWithSections([nameSection([moduleNameSubsection('hi'), [4, 1, 42]])]))); + +// Provide a module name but no function names. +assertErrorMessage(() => wasmEval(moduleWithSections([ + v2vSigSection, + declSection([0]), + exportSection([{funcIndex: 0, name: "f"}]), + bodySection([funcBody({locals:[], body:[UnreachableCode]})]), + nameSection([moduleNameSubsection('hi')])]) +).f(), RuntimeError, /unreachable/); + +// Diagnose invalid block signature types. +for (var bad of [0xff, 1, 0x3f]) + assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), bodySection([funcBody({locals:[], body:[BlockCode, bad, EndCode]})])])), CompileError, /(invalid .*block type)|(unknown type)/); + +const multiValueModule = moduleWithSections([sigSection([v2vSig]), declSection([0]), bodySection([funcBody({locals:[], body:[BlockCode, 0, EndCode]})])]); +// In this test module, 0 denotes a void-to-void block type. +assertEq(WebAssembly.validate(multiValueModule), true); + +// Ensure all invalid opcodes are rejected. Note that the game here (and for +// the prefixed cases below) is to present only opcodes which will be rejected by +// *both* Baseline and Ion. +for (let op of undefinedOpcodes) { + let binary = moduleWithSections([v2vSigSection, declSection([0]), bodySection([funcBody({locals:[], body:[op]})])]); + assertErrorMessage(() => wasmEval(binary), CompileError, /((unrecognized|Unknown) opcode)|(tail calls support is not enabled)|(Exceptions support is not enabled)|(Unexpected EOF)/); + assertEq(WebAssembly.validate(binary), false); +} + +// Prefixed opcodes + +function checkIllegalPrefixed(prefix, opcode) { + let binary = moduleWithSections([v2vSigSection, + declSection([0]), + bodySection([funcBody({locals:[], + body:[prefix, ...varU32(opcode)]})])]); + assertErrorMessage(() => wasmEval(binary), CompileError, /((unrecognized|Unknown) opcode)|(Unknown.*subopcode)|(Unexpected EOF)|(SIMD support is not enabled)|(invalid lane index)/); + assertEq(WebAssembly.validate(binary), false); +} + +// Illegal GcPrefix opcodes + +let reservedGc = {}; +if (wasmGcEnabled()) { + reservedGc = { + // Structure operations + 0x00: true, 0x01: true, 0x02: true, 0x03: true, 0x04: true, 0x05: true, + // Array operations + 0x06: true, 0x07: true, 0x08: true, 0x09: true, 0x0a: true, 0x0b: true, + 0x0c: true, 0x0d: true, 0x0e: true, 0x0f: true, 0x10: true, 0x11: true, + 0x12: true, 0x13: true, + // Ref operations + 0x14: true, 0x15: true, 0x16: true, 0x17: true, 0x18: true, 0x19: true, + 0x1a: true, 0x1b: true, + // i31 operations + 0x1c: true, 0x1d: true, 0x1e: true, + }; +} +for (let i = 0; i < 256; i++) { + if (reservedGc.hasOwnProperty(i)) { + continue; + } + checkIllegalPrefixed(GcPrefix, i); +} + +// Illegal ThreadPrefix opcodes +// +// June 2017 threads draft: +// +// 0x00 .. 0x03 are wait/wake/fence ops +// 0x10 .. 0x4f are primitive atomic ops + +for (let i = 0x4; i < 0x10; i++) + checkIllegalPrefixed(ThreadPrefix, i); + +for (let i = 0x4f; i < 0x100; i++) + checkIllegalPrefixed(ThreadPrefix, i); + +// Illegal Misc opcodes + +var reservedMisc = + { // Saturating conversions (standardized) + 0x00: true, 0x01: true, 0x02: true, 0x03: true, 0x04: true, 0x05: true, 0x06: true, 0x07: true, + // Bulk memory (proposed) + 0x08: true, 0x09: true, 0x0a: true, 0x0b: true, 0x0c: true, 0x0d: true, 0x0e: true, + // Table (proposed) + 0x0f: true, 0x10: true, 0x11: true, 0x12: true, + // Structure operations (experimental, internal) + 0x50: true, 0x51: true, 0x52: true, 0x53: true }; + +for (let i = 0; i < 256; i++) { + if (reservedMisc.hasOwnProperty(i)) + continue; + checkIllegalPrefixed(MiscPrefix, i); +} + +// Illegal SIMD opcodes - the upper bound is actually very large, not much to be +// done about that. + +if (!wasmSimdEnabled()) { + for (let i = 0; i < 0x130; i++) { + checkIllegalPrefixed(SimdPrefix, i); + } +} else { + let reservedSimd = [ + 0x9a, 0xa2, 0xa5, 0xa6, 0xaf, 0xb0, 0xb2, 0xb3, 0xb4, 0xbb, + 0xc2, 0xc5, 0xc6, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4, 0xe2, 0xee, + 0x115, 0x116, 0x117, + 0x118, 0x119, 0x11a, 0x11b, 0x11c, 0x11d, 0x11e, 0x11f, + 0x120, 0x121, 0x122, 0x123, 0x124, 0x125, 0x126, 0x127, + 0x128, 0x129, 0x12a, 0x12b, 0x12c, 0x12d, 0x12e, 0x12f, + ]; + for (let i of reservedSimd) { + checkIllegalPrefixed(SimdPrefix, i); + } +} + +// Illegal MozPrefix opcodes (all of them) +for (let i = 0; i < 256; i++) + checkIllegalPrefixed(MozPrefix, i); + +for (let prefix of [ThreadPrefix, MiscPrefix, SimdPrefix, MozPrefix]) { + // Prefix without a subsequent opcode. We must ask funcBody not to add an + // End code after the prefix, so the body really is just the prefix byte. + let binary = moduleWithSections([v2vSigSection, declSection([0]), bodySection([funcBody({locals:[], body:[prefix]}, /*withEndCode=*/false)])]); + assertErrorMessage(() => wasmEval(binary), CompileError, /(unable to read opcode)|(Unexpected EOF)|(Unknown opcode)/); + assertEq(WebAssembly.validate(binary), false); +} + +// Checking stack trace. +function runStackTraceTest(moduleName, funcNames, expectedName) { + var sections = [ + sigSection([v2vSig]), + importSection([{sigIndex:0, module:"env", func:"callback"}]), + declSection([0]), + exportSection([{funcIndex:1, name: "run"}]), + bodySection([funcBody({locals: [], body: [CallCode, varU32(0)]})]), + customSection("whoa"), + customSection("wee", 42), + ]; + if (moduleName || funcNames) { + var subsections = []; + if (moduleName) + subsections.push(moduleNameSubsection(moduleName)); + if (funcNames) + subsections.push(funcNameSubsection(funcNames)); + sections.push(nameSection(subsections)); + } + sections.push(customSection("yay", 13)); + + var result = ""; + var callback = () => { + result = extractStackFrameFunction(new Error().stack.split('\n')[1]); + }; + wasmEval(moduleWithSections(sections), {"env": { callback }}).run(); + assertEq(result, expectedName); +}; + +runStackTraceTest(null, null, 'wasm-function[1]'); +runStackTraceTest(null, [{name:'blah'}, {name:'test'}], 'test'); +runStackTraceTest(null, [{name:'test', index:1}], 'test'); +runStackTraceTest(null, [{name:'blah'}, {name:'test', locals: [{name: 'var1'}, {name: 'var2'}]}], 'test'); +runStackTraceTest(null, [{name:'blah'}, {name:'test', locals: [{name: 'var1'}, {name: 'var2'}]}], 'test'); +runStackTraceTest(null, [{name:'blah'}, {name:'test1'}], 'test1'); +runStackTraceTest(null, [{name:'blah'}, {name:'test☃'}], 'test☃'); +runStackTraceTest(null, [{name:'blah'}, {name:'te\xE0\xFF'}], 'te\xE0\xFF'); +runStackTraceTest(null, [{name:'blah'}], 'wasm-function[1]'); +runStackTraceTest(null, [], 'wasm-function[1]'); +runStackTraceTest("", [{name:'blah'}, {name:'test'}], 'test'); +runStackTraceTest("a", [{name:'blah'}, {name:'test'}], 'a.test'); +// Notice that invalid names section content shall not fail the parsing +runStackTraceTest(null, [{name:'blah'}, {name:'test', index: 2}], 'wasm-function[1]'); // invalid index +runStackTraceTest(null, [{name:'blah'}, {name:'test', index: 100000}], 'wasm-function[1]'); // invalid index +runStackTraceTest(null, [{name:'blah'}, {name:'test', nameLen: 100}], 'wasm-function[1]'); // invalid name size +runStackTraceTest(null, [{name:'blah'}, {name:''}], 'wasm-function[1]'); // empty name + +// Enable and disable Gecko profiling mode, to ensure all live instances +// names won't make us crash. +enableGeckoProfiling(); +disableGeckoProfiling(); + +function testValidNameSectionWithProfiling() { + enableGeckoProfiling(); + wasmEval(moduleWithSections([v2vSigSection, declSec, bodySec, nameSec])); + disableGeckoProfiling(); +} +testValidNameSectionWithProfiling(); + +// Memory alignment can use non-minimal LEB128 +wasmEval(moduleWithSections([ + v2vSigSection, + declSection([0]), + memorySection(0), + bodySection([ + funcBody({locals: [], body: [ + I32ConstCode, 0x00, // i32.const 0 + I32Load, + 0x81, 0x00, // alignment 1, non-minimal + 0x00, // offset 0 + DropCode, + ]}), + ]), +])); diff --git a/js/src/jit-test/tests/wasm/binop-arm64-ion-codegen.js b/js/src/jit-test/tests/wasm/binop-arm64-ion-codegen.js new file mode 100644 index 0000000000..8ad7c2fee4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/binop-arm64-ion-codegen.js @@ -0,0 +1,407 @@ +// |jit-test| skip-if: !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("arm64"); include:codegen-arm64-test.js + +// Basic constant folding tests + +for ( [op, lhs, rhs, expect] of + [['add', 5, 8, 'd28001a0 mov x0, #0xd'], + ['sub', 4, 5, '92800000 mov x0, #0xffffffffffffffff'], + ['mul', 8, 3, 'd2800300 mov x0, #0x18'], + ['div_s', -8, 3, '92800020 mov x0, #0xfffffffffffffffe'], + ['div_u', 8, 3, 'd2800040 mov x0, #0x2'], + ['rem_s', 8, 5, 'd2800060 mov x0, #0x3'], + ['rem_u', -7, 4, 'd2800020 mov x0, #0x1'], + ['and', 0xfe, 0x77, 'd2800ec0 mov x0, #0x76'], + ['or', 0xfe, 0x77, 'd2801fe0 mov x0, #0xff'], + ['xor', 0xfe, 0x77, 'd2801120 mov x0, #0x89'], + ['shl', 3, 4, 'd2800600 mov x0, #0x30'], + ['shr_s', -8, 1, '92800060 mov x0, #0xfffffffffffffffc'], + ['shr_u', -8, 1, 'b27ef3e0 mov x0, #0x7ffffffffffffffc']] ) { + codegenTestARM64_adhoc(` +(module + (func (export "f") (result i64) + (i64.${op} (i64.const ${lhs}) (i64.const ${rhs}))))`, + 'f', + expect); +} + +// Basic tests that addition and multiplication identities are collapsed, use +// arg 1 here to force an explicit move to be emitted. + +for ( [op, args, expect] of + [['add', '(local.get 1) (i64.const 0)', 'aa0103e0 mov x0, x1'], + ['add', '(i64.const 0) (local.get 1)', 'aa0103e0 mov x0, x1'], + ['mul', '(local.get 1) (i64.const 1)', 'aa0103e0 mov x0, x1'], + ['mul', '(i64.const 1) (local.get 1)', 'aa0103e0 mov x0, x1']] ) { + codegenTestARM64_adhoc(` +(module + (func (export "f") (param i64) (param i64) (result i64) + (i64.${op} ${args})))`, + 'f', + expect); +} + +// Test that multiplication by -1 yields negation. + +let neg32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.mul (local.get 0) (i32.const -1))))`; +codegenTestARM64_adhoc( + neg32, + 'f', + '4b0003e0 neg w0, w0'); +assertEq(wasmEvalText(neg32).exports.f(-37), 37) +assertEq(wasmEvalText(neg32).exports.f(42), -42) + +let neg64 = `(module + (func (export "f") (param i64) (result i64) + (i64.mul (local.get 0) (i64.const -1))))` +codegenTestARM64_adhoc( + neg64, + 'f', + 'cb0003e0 neg x0, x0'); +assertEq(wasmEvalText(neg64).exports.f(-37000000000n), 37000000000n) +assertEq(wasmEvalText(neg64).exports.f(42000000000n), -42000000000n) + +// Test that multiplication by zero yields zero + +let zero32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.mul (local.get 0) (i32.const 0))))`; +codegenTestARM64_adhoc( + zero32, + 'f', + '2a1f03e0 mov w0, wzr'); +assertEq(wasmEvalText(zero32).exports.f(-37), 0) +assertEq(wasmEvalText(zero32).exports.f(42), 0) + +let zero64 = `(module + (func (export "f") (param i64) (result i64) + (i64.mul (local.get 0) (i64.const 0))))` +codegenTestARM64_adhoc( + zero64, + 'f', + 'aa1f03e0 mov x0, xzr'); +assertEq(wasmEvalText(zero64).exports.f(-37000000000n), 0n) +assertEq(wasmEvalText(zero64).exports.f(42000000000n), 0n) + +// Test that multiplication by one yields no code (this optimization currently +// exists both in constant folding and in lowering). + +let one32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.mul (local.get 0) (i32.const 1))))`; +codegenTestARM64_adhoc( + one32, + 'f', + ''); +assertEq(wasmEvalText(one32).exports.f(-37), -37) +assertEq(wasmEvalText(one32).exports.f(42), 42) + +let one64 = `(module + (func (export "f") (param i64) (result i64) + (i64.mul (local.get 0) (i64.const 1))))` +codegenTestARM64_adhoc( + one64, + 'f', + ''); +assertEq(wasmEvalText(one64).exports.f(-37000000000n), -37000000000n) +assertEq(wasmEvalText(one64).exports.f(42000000000n), 42000000000n) + +// Test that multiplication by two yields an add + +let double32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.mul (local.get 0) (i32.const 2))))`; +codegenTestARM64_adhoc( + double32, + 'f', + '0b000000 add w0, w0, w0'); +assertEq(wasmEvalText(double32).exports.f(-37), -74) +assertEq(wasmEvalText(double32).exports.f(42), 84) + +let double64 = `(module + (func (export "f") (param i64) (result i64) + (i64.mul (local.get 0) (i64.const 2))))` +codegenTestARM64_adhoc( + double64, + 'f', + '8b000000 add x0, x0, x0'); +assertEq(wasmEvalText(double64).exports.f(-37000000000n), -74000000000n) +assertEq(wasmEvalText(double64).exports.f(42000000000n), 84000000000n) + +// Test that multiplication by four yields a shift + +let quad32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.mul (local.get 0) (i32.const 4))))`; +codegenTestARM64_adhoc( + quad32, + 'f', + '531e7400 lsl w0, w0, #2'); +assertEq(wasmEvalText(quad32).exports.f(-37), -148) +assertEq(wasmEvalText(quad32).exports.f(42), 168) + +let quad64 = `(module + (func (export "f") (param i64) (result i64) + (i64.mul (local.get 0) (i64.const 4))))` +codegenTestARM64_adhoc( + quad64, + 'f', + 'd37ef400 lsl x0, x0, #2'); +assertEq(wasmEvalText(quad64).exports.f(-37000000000n), -148000000000n) +assertEq(wasmEvalText(quad64).exports.f(42000000000n), 168000000000n) + +// Test that multiplication by five yields a multiply + +let quint32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.mul (local.get 0) (i32.const 5))))`; +codegenTestARM64_adhoc( + quint32, + 'f', + `528000b0 mov w16, #0x5 + 1b107c00 mul w0, w0, w16`); +assertEq(wasmEvalText(quint32).exports.f(-37), -37*5) +assertEq(wasmEvalText(quint32).exports.f(42), 42*5) + +let quint64 = `(module + (func (export "f") (param i64) (result i64) + (i64.mul (local.get 0) (i64.const 5))))` +codegenTestARM64_adhoc( + quint64, + 'f', + `d28000b0 mov x16, #0x5 + 9b107c00 mul x0, x0, x16`); +assertEq(wasmEvalText(quint64).exports.f(-37000000000n), -37000000000n*5n) +assertEq(wasmEvalText(quint64).exports.f(42000000000n), 42000000000n*5n) + +// Test that add/sub/and/or/xor don't need to reuse their input register. The +// proof here is that the destination register does not equal any of the input +// registers. +// +// We have adequate functionality tests for these elsewhere, so test only +// codegen here. + +for ( [op, imm, expectVar, expectImm] of + [['and', 64, + '8a020020 and x0, x1, x2', + '927a0020 and x0, x1, #0x40'], + ['or', 64, + 'aa020020 orr x0, x1, x2', + 'b27a0020 orr x0, x1, #0x40'], + ['xor', 64, + 'ca020020 eor x0, x1, x2', + 'd27a0020 eor x0, x1, #0x40'], + ['add', 64, + '8b020020 add x0, x1, x2', + '91010020 add x0, x1, #0x40 \\(64\\)'], + ['sub', 64, + 'cb020020 sub x0, x1, x2', + 'd1010020 sub x0, x1, #0x40 \\(64\\)']] ) { + codegenTestARM64_adhoc(` +(module + (func (export "f") (param i64) (param i64) (param i64) (result i64) + (i64.${op} (local.get 1) (local.get 2))))`, + 'f', + expectVar); + codegenTestARM64_adhoc(` +(module + (func (export "f") (param i64) (param i64) (result i64) + (i64.${op} (local.get 1) (i64.const ${imm}))))`, + 'f', + expectImm); +} + +// Test that shifts and rotates with a constant don't need to reuse their input +// register. The proof here is that the destination register does not equal any +// of the input registers. +// +// We have adequate functionality tests for these elsewhere, so test only +// codegen here. + +for ( [op, expect] of + [['shl', 'd37ef420 lsl x0, x1, #2'], + ['shr_s', '9342fc20 asr x0, x1, #2'], + ['shr_u', 'd342fc20 lsr x0, x1, #2'], + ['rotl', '93c1f820 ror x0, x1, #62'], + ['rotr', '93c10820 ror x0, x1, #2']] ) { + codegenTestARM64_adhoc(` +(module + (func (export "f") (param i64) (param i64) (result i64) + (i64.${op} (local.get 1) (i64.const 2))))`, + 'f', + expect); +} + +// Test that 0-n yields negation. + +let subneg32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.sub (i32.const 0) (local.get 0))))` +codegenTestARM64_adhoc( + subneg32, + 'f', + '4b0003e0 neg w0, w0'); +assertEq(wasmEvalText(subneg32).exports.f(-37), 37) +assertEq(wasmEvalText(subneg32).exports.f(42), -42) + +let subneg64 = `(module + (func (export "f") (param i64) (result i64) + (i64.sub (i64.const 0) (local.get 0))))` +codegenTestARM64_adhoc( + subneg64, + 'f', + 'cb0003e0 neg x0, x0'); +assertEq(wasmEvalText(subneg64).exports.f(-37000000000n), 37000000000n) +assertEq(wasmEvalText(subneg64).exports.f(42000000000n), -42000000000n) + +// Test that select does something reasonable and does not tie its output to one +// of its inputs. + +codegenTestARM64_adhoc( + `(module + (func (export "f") (param i64) (param i64) (param i64) (param i32) (result i64) + (select (local.get 1) (local.get 2) (local.get 3))))`, + 'f', + `6a03007f tst w3, w3 + 9a821020 csel x0, x1, x2, ne`) + +codegenTestARM64_adhoc( + `(module + (func (export "f") (param f64) (param f64) (param f64) (param i32) (result f64) + (select (local.get 1) (local.get 2) (local.get 3))))`, + 'f', + `6a00001f tst w0, w0 + 1e621c20 fcsel d0, d1, d2, ne`) + +// Here we test that no boolean is generated and then re-tested, and that +// operands are swapped so that we can use an immediate constant, and that the +// input is not tied to the output. + +codegenTestARM64_adhoc( + `(module + (func (export "f") (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32) + (select (local.get $b) (local.get $d) (i32.lt_s (i32.const 0) (local.get $c)))))`, + 'f', + `7100005f cmp w2, #0x0 \\(0\\) + 1a83c020 csel w0, w1, w3, gt`) + +codegenTestARM64_adhoc( + `(module + (func (export "f") (param $a f64) (param $b f64) (param $c f64) (param $d f64) (result f64) + (select (local.get $b) (local.get $d) (f64.lt (f64.const 0) (local.get $c)))))`, + 'f', + `2f00e400 movi d0, #0x0 + 1e622000 fcmp d0, d2 + 1e633c20 fcsel d0, d1, d3, lo`) + +// FP ABS should not tie its input to its output. + +codegenTestARM64_adhoc( + `(module + (func (export "f") (param f32) (param f32) (result f32) + (f32.abs (local.get 1))))`, + 'f', + '1e20c020 fabs s0, s1'); + +codegenTestARM64_adhoc( + `(module + (func (export "f") (param f64) (param f64) (result f64) + (f64.abs (local.get 1))))`, + 'f', + '1e60c020 fabs d0, d1'); + +// AND{32,64} followed by `== 0`: check the two operations are merged into a +// single 'tst' insn, and no 'and' insn. The merging isn't done for +// {OR,XOR}{32,64}. This is for both arguments being non-constant. + +for ( [ty, expect_tst] of + [['i32', '6a01001f tst w0, w1'], + ['i64', 'ea01001f tst x0, x1']] ) { + codegenTestARM64_adhoc( + `(module + (func (export "f") (param $p1 ${ty}) (param $p2 ${ty}) (result i32) + (local $x i32) + (local.set $x (i32.const 0x4D2)) + (if (${ty}.eq (${ty}.and (local.get $p1) (local.get $p2)) + (${ty}.const 0)) + (then (local.set $x (i32.const 0x11D7))) + ) + (local.get $x) + ) + )`, + 'f', + `${expect_tst} + 54000061 b\\.ne #\\+0xc \\(addr .*\\) + 52823ae0 mov w0, #0x11d7 + 14000002 b #\\+0x8 \\(addr .*\\) + 52809a40 mov w0, #0x4d2` + ); +} + +// AND64 followed by `== 0`, with one of the args being a constant. + +for ( [imm, expect1, expect2] of + [ // as a valid logical-immediate => imm in insn + ['0x0F0F0F0F0F0F0F0F', + 'f200cc1f tst x0, #0xf0f0f0f0f0f0f0f', + ''], + // anything else => imm synth'd into a reg + ['-0x4771', + '9288ee10 mov x16, #0xffffffffffffb88f', + 'ea10001f tst x0, x16']] + ) { + codegenTestARM64_adhoc( + `(module + (func (export "f") (param $p1 i64) (result i32) + (local $x i32) + (local.set $x (i32.const 0x4D2)) + (if (i64.eq (i64.and (i64.const ${imm}) (local.get $p1)) + (i64.const 0)) + (then (local.set $x (i32.const 0x11D7))) + ) + (local.get $x) + ) + )`, + 'f', + `${expect1} + ${expect2} + 54000061 b\\.ne #\\+0xc \\(addr .*\\) + 52823ae0 mov w0, #0x11d7 + 14000002 b #\\+0x8 \\(addr .*\\) + 52809a40 mov w0, #0x4d2` + ); +} + +// For integer comparison followed by select, check that the comparison result +// isn't materialised into a register, for specific types. + +for ( [cmpTy, cmpOp, selTy, cmpRegPfx, cselRegPfx, armCC] of + [ ['i32', 'le_s', 'i32', 'w', 'w', 'le'], + ['i32', 'lt_u', 'i64', 'w', 'x', 'lo'], + ['i64', 'le_s', 'i32', 'x', 'w', 'le'], + ['i64', 'lt_u', 'i64', 'x', 'x', 'lo'], + ] ) { + codegenTestARM64_adhoc( + `(module + (func (export "f") + (param $p1 ${cmpTy}) (param $p2 ${cmpTy}) + (param $p3 ${selTy}) (param $p4 ${selTy}) + (result ${selTy}) + (select (local.get $p3) + (local.get $p4) + (${cmpTy}.${cmpOp} (local.get $p1) (local.get $p2))) + ) + )`, + 'f', + `.b01001f cmp ${cmpRegPfx}0, ${cmpRegPfx}1 + .a83.040 csel ${cselRegPfx}0, ${cselRegPfx}2, ${cselRegPfx}3, ${armCC}` + ); +} diff --git a/js/src/jit-test/tests/wasm/binop-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/binop-x64-ion-codegen.js new file mode 100644 index 0000000000..4403141658 --- /dev/null +++ b/js/src/jit-test/tests/wasm/binop-x64-ion-codegen.js @@ -0,0 +1,335 @@ +// |jit-test| skip-if: !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:codegen-x64-test.js + +// There may be some redundant moves to set some operations up on x64 (that's +// bug 1701164) so we avoid those with no_prefix/no_suffix flags when the issue +// comes up. + +// Test that multiplication by -1 yields negation. + +let neg32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.mul (local.get 0) (i32.const -1))))`; +codegenTestX64_adhoc( + neg32, + 'f', + 'f7 d8 neg %eax', {no_prefix:true}); +assertEq(wasmEvalText(neg32).exports.f(-37), 37) +assertEq(wasmEvalText(neg32).exports.f(42), -42) + +let neg64 = + `(module + (func (export "f") (param i64) (result i64) + (i64.mul (local.get 0) (i64.const -1))))`; +codegenTestX64_adhoc( + neg64, + 'f', + '48 f7 d8 neg %rax', {no_prefix:true}); +assertEq(wasmEvalText(neg64).exports.f(-37000000000n), 37000000000n) +assertEq(wasmEvalText(neg64).exports.f(42000000000n), -42000000000n) + +// Test that multiplication by zero yields zero + +let zero32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.mul (local.get 0) (i32.const 0))))`; +codegenTestX64_adhoc( + zero32, + 'f', + '33 c0 xor %eax, %eax', {no_prefix:true}); +assertEq(wasmEvalText(zero32).exports.f(-37), 0) +assertEq(wasmEvalText(zero32).exports.f(42), 0) + +let zero64 = `(module + (func (export "f") (param i64) (result i64) + (i64.mul (local.get 0) (i64.const 0))))` +codegenTestX64_adhoc( + zero64, + 'f', + '48 33 c0 xor %rax, %rax', {no_prefix:true}); +assertEq(wasmEvalText(zero64).exports.f(-37000000000n), 0n) +assertEq(wasmEvalText(zero64).exports.f(42000000000n), 0n) + +// Test that multiplication by one yields no code + +let one32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.mul (local.get 0) (i32.const 1))))`; +codegenTestX64_adhoc( + one32, + 'f', + '', {no_prefix:true}); +assertEq(wasmEvalText(one32).exports.f(-37), -37) +assertEq(wasmEvalText(one32).exports.f(42), 42) + +let one64 = `(module + (func (export "f") (param i64) (result i64) + (i64.mul (local.get 0) (i64.const 1))))` +codegenTestX64_adhoc( + one64, + 'f', + '', {no_prefix:true}); +assertEq(wasmEvalText(one64).exports.f(-37000000000n), -37000000000n) +assertEq(wasmEvalText(one64).exports.f(42000000000n), 42000000000n) + +// Test that multiplication by two yields an add + +let double32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.mul (local.get 0) (i32.const 2))))`; +codegenTestX64_adhoc( + double32, + 'f', + '03 c0 add %eax, %eax', {no_prefix:true}); +assertEq(wasmEvalText(double32).exports.f(-37), -74) +assertEq(wasmEvalText(double32).exports.f(42), 84) + +let double64 = `(module + (func (export "f") (param i64) (result i64) + (i64.mul (local.get 0) (i64.const 2))))` +codegenTestX64_adhoc( + double64, + 'f', + '48 03 c0 add %rax, %rax', {no_prefix:true}); +assertEq(wasmEvalText(double64).exports.f(-37000000000n), -74000000000n) +assertEq(wasmEvalText(double64).exports.f(42000000000n), 84000000000n) + +// Test that multiplication by four yields a shift + +let quad32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.mul (local.get 0) (i32.const 4))))`; +codegenTestX64_adhoc( + quad32, + 'f', + 'c1 e0 02 shl \\$0x02, %eax', {no_prefix:true}); +assertEq(wasmEvalText(quad32).exports.f(-37), -148) +assertEq(wasmEvalText(quad32).exports.f(42), 168) + +let quad64 = `(module + (func (export "f") (param i64) (result i64) + (i64.mul (local.get 0) (i64.const 4))))` +codegenTestX64_adhoc( + quad64, + 'f', + '48 c1 e0 02 shl \\$0x02, %rax', {no_prefix:true}); +assertEq(wasmEvalText(quad64).exports.f(-37000000000n), -148000000000n) +assertEq(wasmEvalText(quad64).exports.f(42000000000n), 168000000000n) + +// Test that multiplication by five yields a multiply + +let quint32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.mul (local.get 0) (i32.const 5))))`; +codegenTestX64_adhoc( + quint32, + 'f', + '6b c0 05 imul \\$0x05, %eax, %eax', {no_prefix:true}); +assertEq(wasmEvalText(quint32).exports.f(-37), -37*5) +assertEq(wasmEvalText(quint32).exports.f(42), 42*5) + +let quint64 = `(module + (func (export "f") (param i64) (result i64) + (i64.mul (local.get 0) (i64.const 5))))` +codegenTestX64_adhoc( + quint64, + 'f', + `48 6b c0 05 imul \\$0x05, %rax, %rax`, {no_prefix:true}) +assertEq(wasmEvalText(quint64).exports.f(-37000000000n), -37000000000n*5n) +assertEq(wasmEvalText(quint64).exports.f(42000000000n), 42000000000n*5n) + +// Test that 0-n yields negation. + +let subneg32 = + `(module + (func (export "f") (param i32) (result i32) + (i32.sub (i32.const 0) (local.get 0))))` +codegenTestX64_adhoc( + subneg32, + 'f', + 'f7 d8 neg %eax', {no_prefix:true}); +assertEq(wasmEvalText(subneg32).exports.f(-37), 37) +assertEq(wasmEvalText(subneg32).exports.f(42), -42) + +let subneg64 = + `(module + (func (export "f") (param i64) (result i64) + (i64.sub (i64.const 0) (local.get 0))))` +codegenTestX64_adhoc( + subneg64, + 'f', + '48 f7 d8 neg %rax', {no_prefix:true}); +assertEq(wasmEvalText(subneg64).exports.f(-37000000000n), 37000000000n) +assertEq(wasmEvalText(subneg64).exports.f(42000000000n), -42000000000n) + +// AND{32,64} followed by `== 0`: check the two operations are merged into a +// single 'test' insn, and no 'and' insn. The merging isn't done for +// {OR,XOR}{32,64}. This is for both arguments being non-constant. + +for ( [ty, expect_test] of + [['i32', '85 .. test %e.., %e..'], + ['i64', '48 85 .. test %r.., %r..']] ) { + codegenTestX64_adhoc( + `(module + (func (export "f") (param $p1 ${ty}) (param $p2 ${ty}) (result i32) + (local $x i32) + (local.set $x (i32.const 0x4D2)) + (if (${ty}.eq (${ty}.and (local.get $p1) (local.get $p2)) + (${ty}.const 0)) + (then (local.set $x (i32.const 0x11D7))) + ) + (local.get $x) + ) + )`, + 'f', + `${expect_test} + 0f 85 .. 00 00 00 jnz 0x00000000000000.. + b8 d7 11 00 00 mov \\$0x11D7, %eax + e9 .. 00 00 00 jmp 0x00000000000000.. + b8 d2 04 00 00 mov \\$0x4D2, %eax` + ); +} + +// AND64 followed by `== 0`, with one of the args being a constant. Depending +// on the constant we can get one of three forms. + +for ( [imm, expect1, expect2] of + [ // in signed-32 range => imm in insn + ['0x17654321', + 'f7 c. 21 43 65 17 test \\$0x17654321, %e..', // edi or ecx + ''], + // in unsigned-32 range => imm in reg via movl + ['0x87654321', + '41 bb 21 43 65 87 mov \\$-0x789ABCDF, %r11d', + '4c 85 d. test %r11, %r..'], // rdi or rcx + // not in either range => imm in reg via mov(absq) + ['0x187654321', + '49 bb 21 43 65 87 01 00 00 00 mov \\$0x187654321, %r11', + '4c 85 d. test %r11, %r..']] // rdi or rcx + ) { + codegenTestX64_adhoc( + `(module + (func (export "f") (param $p1 i64) (result i32) + (local $x i32) + (local.set $x (i32.const 0x4D2)) + (if (i64.eq (i64.and (i64.const ${imm}) (local.get $p1)) + (i64.const 0)) + (then (local.set $x (i32.const 0x11D7))) + ) + (local.get $x) + ) + )`, + 'f', + `${expect1} + ${expect2} + 0f 85 .. 00 00 00 jnz 0x00000000000000.. + b8 d7 11 00 00 mov \\$0x11D7, %eax + e9 .. 00 00 00 jmp 0x00000000000000.. + b8 d2 04 00 00 mov \\$0x4D2, %eax` + ); +} + +// For integer comparison followed by select, check that the comparison result +// isn't materialised into a register, for specific types. + +function cmpSel32vs64(cmpTy, cmpOp, selTy) { + return `(module + (func (export "f") + (param $p1 ${cmpTy}) (param $p2 ${cmpTy}) + (param $p3 ${selTy}) (param $p4 ${selTy}) + (result ${selTy}) + (select (local.get $p3) + (local.get $p4) + (${cmpTy}.${cmpOp} (local.get $p1) (local.get $p2))) + ) + )`; +} +if (getBuildConfiguration("windows")) { + for ( [cmpTy, cmpOp, selTy, insn1, insn2, insn3] of + [ ['i32', 'le_s', 'i32', '8b c3 mov %ebx, %eax', + '3b ca cmp %edx, %ecx', + '41 0f 4f c1 cmovnle %r9d, %eax'], + ['i32', 'lt_u', 'i64', '48 89 d8 mov %rbx, %rax', + '3b ca cmp %edx, %ecx', + '49 0f 43 c1 cmovnb %r9, %rax'], + ['i64', 'le_s', 'i32', '8b c3 mov %ebx, %eax', + '48 3b ca cmp %rdx, %rcx', + '41 0f 4f c1 cmovnle %r9d, %eax'], + ['i64', 'lt_u', 'i64', '48 89 d8 mov %rbx, %rax', + '48 3b ca cmp %rdx, %rcx', + '49 0f 43 c1 cmovnb %r9, %rax'] + ] ) { + codegenTestX64_adhoc(cmpSel32vs64(cmpTy, cmpOp, selTy), 'f', + `4. (89 c3|8b d8) mov %r8.*, %.bx + ${insn1} + ${insn2} + ${insn3}` + ); + } +} else { + for ( [cmpTy, cmpOp, selTy, insn1, insn2, insn3] of + [ ['i32', 'le_s', 'i32', '8b c2 mov %edx, %eax', + '3b fe cmp %esi, %edi', + '0f 4f c1 cmovnle %ecx, %eax'], + ['i32', 'lt_u', 'i64', '48 89 d0 mov %rdx, %rax', + '3b fe cmp %esi, %edi', + '48 0f 43 c1 cmovnb %rcx, %rax'], + ['i64', 'le_s', 'i32', '8b c2 mov %edx, %eax', + '48 3b fe cmp %rsi, %rdi', + '0f 4f c1 cmovnle %ecx, %eax'], + ['i64', 'lt_u', 'i64', '48 89 d0 mov %rdx, %rax', + '48 3b fe cmp %rsi, %rdi', + '48 0f 43 c1 cmovnb %rcx, %rax'] + ] ) { + codegenTestX64_adhoc(cmpSel32vs64(cmpTy, cmpOp, selTy), 'f', + `${insn1} + ${insn2} + ${insn3}` + ); + } +} + +// For integer comparison followed by select, check correct use of operands in +// registers vs memory. At least for the 64-bit-cmp/64-bit-sel case. + +for ( [pAnyCmp, pAnySel, cmpBytes, cmpArgL, cmovBytes, cmovArgL ] of + [ // r, r + ['$pReg1', '$pReg2', + '4. .. ..', '%r.+', '4. .. .. ..', '%r.+'], + // r, m + ['$pReg1', '$pMem2', + '4. .. ..', '%r.+', '4. .. .. .. ..', '0x..\\(%rbp\\)'], + // m, r + ['$pMem1', '$pReg2', + '4. .. .. ..', '0x..\\(%rbp\\)', '4. .. .. ..', '%r.+'], + // m, m + ['$pMem1', '$pMem2', + '4. .. .. ..', '0x..\\(%rbp\\)', '4. .. .. .. ..', '0x..\\(%rbp\\)'] + ] ) { + codegenTestX64_adhoc( + `(module + (func (export "f") + (param $p1 i64) (param $p2 i64) ;; in regs for both ABIs + (param $pReg1 i64) (param $pReg2 i64) ;; in regs for both ABIs + (param i64) (param i64) ;; ignored + (param $pMem1 i64) (param $pMem2 i64) ;; in mem for both ABIs + (result i64) + (select (local.get $p1) + (local.get ${pAnySel}) + (i64.eq (local.get $p2) (local.get ${pAnyCmp}))) + ) + )`, + 'f', + // On Linux we have an extra move + (getBuildConfiguration("windows") ? '' : '48 89 .. mov %r.+, %r.+\n') + + // 'q*' because the disassembler shows 'q' only for the memory cases + `48 89 .. mov %r.+, %r.+ + ${cmpBytes} cmpq* ${cmpArgL}, %r.+ + ${cmovBytes} cmovnzq* ${cmovArgL}, %r.+` + ); +} diff --git a/js/src/jit-test/tests/wasm/binop-x64-ion-folding.js b/js/src/jit-test/tests/wasm/binop-x64-ion-folding.js new file mode 100644 index 0000000000..b291077d17 --- /dev/null +++ b/js/src/jit-test/tests/wasm/binop-x64-ion-folding.js @@ -0,0 +1,212 @@ +// |jit-test| skip-if: !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:codegen-x64-test.js + +// This file checks folding rules for wasm {and,or,xor}{32,64} on x64 via Ion. +// See also binop-x64-ion-codegen.js, which is similar. + +// These tests check that a folding has happened. The function is also run +// and the result value checked. Note, many of the functions ignore one or +// both of their parameters. +// +// In many cases the expected code contains an unnecessary move via a +// temporary, generally e/rcx, for example: +// +// mov %rdi, %rcx +// mov %rcx, %rax +// +// where rdi is the first arg reg (on Linux) and rax is the retval reg. This +// is documented in bug 1701164. If/when that gets fixed, we will presumably +// have to redo the expected-outputs here. +// +// The situation is complicated further because many of the expected outputs +// here depend on one of the two argument registers, but they are different in +// the ELF ABI (rdi, rsi) and the Win64 ABI (rcx, rdx). For the latter case, +// the abovementioned spurious move from the first arg reg into rcx +// disappears. Hence there is some fudging using wildcards in register names, +// and `no_prefix`, to make the tests pass with both ABIs. + +function test(ty, wasm_insn, must_appear, param0, param1, expected_result, + options = {}) { + let t = + `(module + (func (export "f") (param ${ty}) (param ${ty}) (result ${ty}) + ${wasm_insn} + ))`; + options.instanceBox = {value: null}; + codegenTestX64_adhoc(t, "f", must_appear, options); + let ins = options.instanceBox.value; + assertEq(ins.exports.f(param0, param1), expected_result); +} + +function test32(wasm_insn, must_appear, param0, param1, expected_result, + options) { + return test('i32', wasm_insn, must_appear, param0, param1, expected_result, + options); +} + +function test64(wasm_insn, must_appear, param0, param1, expected_result, + options) { + return test('i64', wasm_insn, must_appear, param0, param1, expected_result, + options); +} + +// {AND,OR,XOR}{32,64} folding: both args const + +test32('(i32.and (i32.const 0x12345678) (i32.const 0x0f0f0f0f))', + 'b8 08 06 04 02 mov \\$0x2040608, %eax', + 0,0, 0x2040608); +test64('(i64.and (i64.const 0x1234567851505150) (i64.const 0x515051500f0f0f0f))', + '48 b8 00 01 00 01 50 50 10 10 mov \\$0x1010505001000100, %rax', + 0n,0n, 0x1010505001000100n); + +test32('(i32.or (i32.const 0x12345678) (i32.const 0x0f0e0d0c))', + 'b8 7c 5f 3e 1f mov \\$0x1F3E5F7C, %eax', + 0,0, 0x1f3e5f7c); +test64('(i64.or (i64.const 0x1234567851505150) (i64.const 0x515051500f0f1337))', + '48 b8 77 53 5f 5f 78 57 74 53 mov \\$0x537457785F5F5377, %rax', + 0n,0n, 0x537457785f5f5377n); + +test32('(i32.xor (i32.const 0x12345678) (i32.const 0x0f0e0d0c))', + 'b8 74 5b 3a 1d mov \\$0x1D3A5B74, %eax', + 0,0, 0x1d3a5b74); +test64('(i64.xor (i64.const 0x1234567851505150) (i64.const 0x515051500f0f1337))', + '48 b8 67 42 5f 5e 28 07 64 43 mov \\$0x436407285E5F4267, %rax', + 0n,0n, 0x436407285e5f4267n); + +// {AND,OR,XOR}{32,64} identities: first arg is all zeroes + +test32('(i32.and (i32.const 0) (local.get 1))', + '33 c0 xor %eax, %eax', + 1234,5678, 0); +test64('(i64.and (i64.const 0) (local.get 1))', + '33 c0 xor %eax, %eax', + 1234n,5678n, 0n); + +test32('(i32.or (i32.const 0) (local.get 1))', + `8b .. mov %e.., %ecx + 8b c1 mov %ecx, %eax`, + 1234,5678, 5678); +test64('(i64.or (i64.const 0) (local.get 1))', + `48 89 .. mov %r.., %rcx + 48 89 c8 mov %rcx, %rax`, + 1234n,5678n, 5678n); + +test32('(i32.xor (i32.const 0) (local.get 1))', + `8b .. mov %e.., %ecx + 8b c1 mov %ecx, %eax`, + 1234,5678, 5678); +test64('(i64.xor (i64.const 0) (local.get 1))', + `48 89 .. mov %r.., %rcx + 48 89 c8 mov %rcx, %rax`, + 1234n,5678n, 5678n); + +// {AND,OR,XOR}{32,64} identities: second arg is all zeroes + +test32('(i32.and (local.get 0) (i32.const 0))', + '33 c0 xor %eax, %eax', + 1234,5678, 0); +test64('(i64.and (local.get 0) (i64.const 0))', + '33 c0 xor %eax, %eax', + 1234n,5678n, 0n); + +test32('(i32.or (local.get 0) (i32.const 0))', + // 8b cf mov %edi, %ecx -- expected on Linux but not on Windows + `8b c1 mov %ecx, %eax`, + 1234,5678, 1234, {no_prefix: true}); // required on Linux +test64('(i64.or (local.get 0) (i64.const 0))', + // 48 89 f9 mov %rdi, %rcx -- ditto + `48 89 c8 mov %rcx, %rax`, + 1234n,5678n, 1234n, {no_prefix: true}); + +test32('(i32.xor (local.get 0) (i32.const 0))', + // 8b cf mov %edi, %ecx -- ditto + `8b c1 mov %ecx, %eax`, + 1234,5678, 1234, {no_prefix: true}); +test64('(i64.xor (local.get 0) (i64.const 0))', + // 48 89 f9 mov %rdi, %rcx -- ditto + `48 89 c8 mov %rcx, %rax`, + 1234n,5678n, 1234n, {no_prefix: true}); + +// {AND,OR,XOR}{32,64} identities: first arg is all ones + +test32('(i32.and (i32.const 0xffffffff) (local.get 1))', + `8b .. mov %e.., %ecx + 8b c1 mov %ecx, %eax`, + 1234,5678, 5678); +test64('(i64.and (i64.const 0xffffffffffffffff) (local.get 1))', + `48 89 .. mov %r.., %rcx + 48 89 c8 mov %rcx, %rax`, + 1234n,5678n, 5678n); + +test32('(i32.or (i32.const 0xffffffff) (local.get 1))', + 'b8 ff ff ff ff mov \\$-0x01, %eax', + 1234,5678, -1/*0xffffffff*/); +test64('(i64.or (i64.const 0xffffffffffffffff) (local.get 1))', + '48 c7 c0 ff ff ff ff mov \\$-0x01, %rax', + 1234n,5678n, -1n/*0xffffffffffffffff*/); + +test32('(i32.xor (i32.const 0xffffffff) (local.get 1))', + `8b .. mov %e.., %ecx + 8b c1 mov %ecx, %eax + f7 d0 not %eax`, + 1234,5678, -5679); +test64('(i64.xor (i64.const 0xffffffffffffffff) (local.get 1))', + `48 89 .. mov %r.., %rcx + 48 89 c8 mov %rcx, %rax + 48 f7 d0 not %rax`, + 1234n,5678n, -5679n); + +// {AND,OR,XOR}{32,64} identities: second arg is all ones + +test32('(i32.and (local.get 0) (i32.const 0xffffffff))', + // 8b cf mov %edi, %ecx -- expected on Linux but not on Windows + `8b c1 mov %ecx, %eax`, + 1234,5678, 1234, {no_prefix: true}); // required on Linux +test64('(i64.and (local.get 0) (i64.const 0xffffffffffffffff))', + // 48 89 f9 mov %rdi, %rcx -- ditto + `48 89 c8 mov %rcx, %rax`, + 1234n,5678n, 1234n, {no_prefix: true}); + +test32('(i32.or (local.get 0) (i32.const 0xffffffff))', + 'b8 ff ff ff ff mov \\$-0x01, %eax', + 1234,5678, -1/*0xffffffff*/); +test64('(i64.or (local.get 0) (i64.const 0xffffffffffffffff))', + '48 c7 c0 ff ff ff ff mov \\$-0x01, %rax', + 1234n,5678n, -1n/*0xffffffffffffffff*/); + +test32('(i32.xor (local.get 0) (i32.const 0xffffffff))', + // 8b cf mov %edi, %ecx -- ditto + `8b c1 mov %ecx, %eax + f7 d0 not %eax`, + 1234,5678, -1235, {no_prefix: true}); +test64('(i64.xor (local.get 0) (i64.const 0xffffffffffffffff))', + // 48 89 f9 mov %rdi, %rcx -- ditto + `48 89 c8 mov %rcx, %rax + 48 f7 d0 not %rax`, + 1234n,5678n, -1235n, {no_prefix: true}); + +// {AND,OR,XOR}{32,64} identities: both args the same + +test32('(i32.and (local.get 0) (local.get 0))', + // 8b cf mov %edi, %ecx -- ditto + `8b c1 mov %ecx, %eax`, + 1234,5678, 1234, {no_prefix: true}); +test64('(i64.and (local.get 0) (local.get 0))', + // 48 89 f9 mov %rdi, %rcx -- ditto + `48 89 c8 mov %rcx, %rax`, + 1234n,5678n, 1234n, {no_prefix: true}); + +test32('(i32.or (local.get 0) (local.get 0))', + // 8b cf mov %edi, %ecx -- ditto + `8b c1 mov %ecx, %eax`, + 1234,5678, 1234, {no_prefix: true}); +test64('(i64.or (local.get 0) (local.get 0))', + // 48 89 f9 mov %rdi, %rcx -- ditto + `48 89 c8 mov %rcx, %rax`, + 1234n,5678n, 1234n, {no_prefix: true}); + +test32('(i32.xor (local.get 0) (local.get 0))', + '33 c0 xor %eax, %eax', + 1234,5678, 0); +test64('(i64.xor (local.get 0) (local.get 0))', + '33 c0 xor %eax, %eax', + 1234n,5678n, 0n); diff --git a/js/src/jit-test/tests/wasm/bug1693500.js b/js/src/jit-test/tests/wasm/bug1693500.js new file mode 100644 index 0000000000..795613ea34 --- /dev/null +++ b/js/src/jit-test/tests/wasm/bug1693500.js @@ -0,0 +1,73 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || wasmCompileMode() != "ion" || (!getBuildConfiguration("x86") && !getBuildConfiguration("x64")) || getBuildConfiguration("simulator") + +const avx = isAvxPresent(); +for (let [n1, n2, numInstr] of [ + [0x123456789abn, 0xffeeddccbbaa9988n, avx ? 6 : 7], + [42n, 0xFFFFFFFFn, avx ? 3 : 4], + [0n, 0n, 1], + [1n, 1n, 1], + ...iota(63).map(i => [2n << BigInt(i), 2n << BigInt(i), 1]), + ...iota(63).reduce((acc, i) => { + const base = 2n << BigInt(i); + return acc.concat(iota(i + 1).map(j => [ + base | (1n << BigInt(j)), base | (1n << BigInt(j)), + (avx ? 2 : 3) + (j == 0 ? 0 : 1)])); + }, []), + ...iota(63).map(i => [~(1n << BigInt(i)), ~(1n << BigInt(i)), avx ? 5 : 6]), + [0x7fffffffffffffffn, 0x7fffffffffffffffn, avx ? 5 : 6], + [-1n, -1n, 3], +]) { + var wasm = wasmTextToBinary(`(module + (memory (export "memory") 1 1) + (func $t (export "t") (param v128) (result v128) + local.get 0 + v128.const i64x2 ${n1} ${n2} + i64x2.mul + ) + (func $t0 (param v128 v128) (result v128) + local.get 0 + local.get 1 + i64x2.mul + ) + (func (export "run") (result i32) + i32.const 16 + i32.const 0 + v128.load + call $t + v128.store + + v128.const i64x2 ${n1} ${n2} + i32.const 0 + v128.load + call $t0 + + i32.const 16 + v128.load + i64x2.eq + i64x2.all_true + ) + )`) + + var ins = new WebAssembly.Instance(new WebAssembly.Module(wasm)); + var mem64 = new BigInt64Array(ins.exports.memory.buffer, 0, 4); + + for (let [t1, t2] of [ + [1n, 1n], [-1n, -2n], [0n, 0n], [0x123456789abn, 0xffeeddccbbaa9988n], + [0x100001111n, -0xFF0011n], [5555n, 0n], + ]) { + mem64[0] = t1; mem64[1] = t2; + assertEq(ins.exports.run(), 1); + } + + if (hasDisassembler() && getBuildConfiguration("x64")) { + const dis = wasmDis(ins.exports.t, {asString: true,}); + const lines = getFuncBody(dis).trim().split('\n'); + assertEq(lines.length, numInstr); + } +} + +// Utils. +function getFuncBody(dis) { + const parts = dis.split(/mov %rsp, %rbp\n|^[0-9A-Fa-f ]+pop %rbp/gm); + return parts.at(-2).replace(/[0-9A-F]{8} (?: [0-9a-f]{2})+[\s\n]+/g, ""); +} diff --git a/js/src/jit-test/tests/wasm/bug1776358.js b/js/src/jit-test/tests/wasm/bug1776358.js new file mode 100644 index 0000000000..d5522b689f --- /dev/null +++ b/js/src/jit-test/tests/wasm/bug1776358.js @@ -0,0 +1,28 @@ +let func = wasmEvalText(`(module + (func + (param f64) (param f64) (param f64) (param f64) (param f64) + (param f64) (param f64) (param f64) (param f64) + ) + (func + (param i32) + (result i32) + ;; Call in a dead branch. + (if (i32.const 0) (then + (call 0 + (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) + (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) + ) + )) + ;; Division to trigger a trap. + (i32.div_s (local.get 0) (local.get 0)) + ) + (export "" (func 1)) +)`).exports[""]; +assertEq(func(7), 1); +let ex; +try { + func(0); +} catch (e) { + ex = e; +} +assertEq(ex instanceof WebAssembly.RuntimeError, true); diff --git a/js/src/jit-test/tests/wasm/bug1858423.js b/js/src/jit-test/tests/wasm/bug1858423.js new file mode 100644 index 0000000000..a90d308906 --- /dev/null +++ b/js/src/jit-test/tests/wasm/bug1858423.js @@ -0,0 +1,37 @@ +// |jit-test| --wasm-gc; skip-if: !wasmCachingEnabled() || !wasmGcEnabled() + +const code = wasmTextToBinary(`(module + (type $t (struct (field i32) (field anyref))) + (type $t2 (struct (field f32) (field externref))) + (func (export "test") (param externref) (result externref) + i32.const 42 + f32.const 1.0 + local.get 0 + struct.new $t2 + struct.new $t + extern.convert_any + ) + + (func (export "check") (param externref) (result externref) + local.get 0 + any.convert_extern + ref.cast (ref $t) + struct.get $t 1 + ref.cast (ref $t2) + struct.get $t2 1 + ) +)`); + +function instantiateCached(code, imports) { + // Cache the code. + wasmCompileInSeparateProcess(code); + // Load from cache. + let m = wasmCompileInSeparateProcess(code); + assertEq(wasmLoadedFromCache(m), true); + return new WebAssembly.Instance(m, imports); +} + +const {test,check} = instantiateCached(code).exports; +let obj = test({i:1}); +gc(); +assertEq(check(obj).i, 1); diff --git a/js/src/jit-test/tests/wasm/builtin-modules/directives.txt b/js/src/jit-test/tests/wasm/builtin-modules/directives.txt new file mode 100644 index 0000000000..87d59ea13c --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; include:wasm.js diff --git a/js/src/jit-test/tests/wasm/builtin-modules/i8vecmul.js b/js/src/jit-test/tests/wasm/builtin-modules/i8vecmul.js new file mode 100644 index 0000000000..86336b5d33 --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/i8vecmul.js @@ -0,0 +1,39 @@ +let memory = new WebAssembly.Memory({initial: 1}); +let bytes = new Uint8Array(memory.buffer); + +let module = wasmBuiltinI8VecMul(); +let instance = new WebAssembly.Instance(module, { + "": {"memory": memory} +}); +let {i8vecmul} = instance.exports; + +// Test basic vector pairwise product +{ + // [0, 1, 2, 3] . [0, 2, 4, 6] = [0, 2, 8, 18] + for (let i = 0; i < 4; i++) { + bytes[i] = i; + bytes[4 + i] = i * 2; + } + i8vecmul( + /* dest */ 8, + /* src1 */ 0, + /* src2 */ 4, + /* len */ 4); + for (let i = 0; i < 4; i++) { + assertEq(bytes[8 + i], i * i * 2); + } +} + +// Test bounds checking +{ + assertErrorMessage(() => i8vecmul(PageSizeInBytes - 1, 0, 0, 2), WebAssembly.RuntimeError, /index out of bounds/); + assertErrorMessage(() => i8vecmul(0, PageSizeInBytes - 1, 0, 2), WebAssembly.RuntimeError, /index out of bounds/); + assertErrorMessage(() => i8vecmul(0, 0, PageSizeInBytes - 1, 2), WebAssembly.RuntimeError, /index out of bounds/); +} + +// Test linking of intrinsics +{ + let linkInstance = wasmEvalText(`(module + (import "" "i8vecmul" (func (param i32 i32 i32 i32))) + )`, {"": instance.exports}); +} diff --git a/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/CommonTestSetup.js b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/CommonTestSetup.js new file mode 100644 index 0000000000..0b3455ba96 --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/CommonTestSetup.js @@ -0,0 +1,27 @@ +// |jit-test| skip-if:true; + +// This file contains all the code that is common to all integer gemm intrinsics' test scripts. + +// The test setup as string that is common to all integer gemm tests +export const COMMON_TEST_SETUP_AS_STRING = ` +const libdir=${JSON.stringify(libdir)}; load(libdir + "wasm.js"); +let memory = new WebAssembly.Memory({initial: 1, maximum: 1}); +let module = WebAssembly.mozIntGemm(); +if (!module) { + throw new Error(); +} +let instance = new WebAssembly.Instance(module, {"": {"memory": memory}}); + +const ARRAY_ALIGNMENT = 64; +const ROWS_A_MULTIPLIER = 1; +const COLUMNS_A_MULTIPLIER = 64; +const ROWS_B_MULTIPLIER = COLUMNS_A_MULTIPLIER; +const COLUMNS_B_MULTIPLIER = 8; +const SELECTED_COLUMNS_B_MULTIPLIER = 8; +` + +// Run the test +export function runTest(completeTestAsString) { + const testEnvironment = newGlobal({newCompartment: true, systemPrincipal: true}); + testEnvironment.evaluate(completeTestAsString); +} diff --git a/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8MultiplyAndAddBias.js b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8MultiplyAndAddBias.js new file mode 100644 index 0000000000..d988bb2541 --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8MultiplyAndAddBias.js @@ -0,0 +1,81 @@ +// This file contains all the tests for int8_multiply_and_add_bias intrinsic. It depends +// on the CommonTestSetup.js script which contains the common functionality +// that is required for testing all the intrinsics. +const COMMON_TEST_SETUP_SCRIPT = "./CommonTestSetup.js" + +// All tests for this intrinsic as a string +const ALL_TESTS_AS_STRING =` +let {int8_multiply_and_add_bias} = instance.exports; + +const VALID = {inputA: 0, scaleA: 1.0, zeroPointA: 0.0, inputB: ARRAY_ALIGNMENT << 2, scaleB: 1.0, zeroPointB: 0.0, inputBiasPrepared: ARRAY_ALIGNMENT << 4, unquantMultiplier: -2.0, rowsA: ROWS_A_MULTIPLIER, width: ROWS_B_MULTIPLIER, colsB: COLUMNS_B_MULTIPLIER, output: ARRAY_ALIGNMENT << 5}; + +function testInvalidSize() { + let invalidSize; + + // rowsA: 0 + invalidSize = 0; + assertErrorMessage(() => int8_multiply_and_add_bias(VALID.inputA, VALID.scaleA, VALID.zeroPointA, VALID.inputB, VALID.scaleB, VALID.zeroPointB, VALID.inputBiasPrepared, VALID.unquantMultiplier, invalidSize, VALID.width, VALID.colsB, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // width: 0 + invalidSize = 0; + assertErrorMessage(() => int8_multiply_and_add_bias(VALID.inputA, VALID.scaleA, VALID.zeroPointA, VALID.inputB, VALID.scaleB, VALID.zeroPointB, VALID.inputBiasPrepared, VALID.unquantMultiplier, VALID.rowsA, invalidSize, VALID.colsB, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // width: Not an integral multiple of ROWS_B_MULTIPLIER + invalidSize = ROWS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_multiply_and_add_bias(VALID.inputA, VALID.scaleA, VALID.zeroPointA, VALID.inputB, VALID.scaleB, VALID.zeroPointB, VALID.inputBiasPrepared, VALID.unquantMultiplier, VALID.rowsA, invalidSize, VALID.colsB, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // colB: 0 + invalidSize = 0; + assertErrorMessage(() => int8_multiply_and_add_bias(VALID.inputA, VALID.scaleA, VALID.zeroPointA, VALID.inputB, VALID.scaleB, VALID.zeroPointB, VALID.inputBiasPrepared, VALID.unquantMultiplier, VALID.rowsA, VALID.width, invalidSize, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // colB: Not an integral multiple of COLUMNS_B_MULTIPLIER + invalidSize = COLUMNS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_multiply_and_add_bias(VALID.inputA, VALID.scaleA, VALID.zeroPointA, VALID.inputB, VALID.scaleB, VALID.zeroPointB, VALID.inputBiasPrepared, VALID.unquantMultiplier, VALID.rowsA, VALID.width, invalidSize, VALID.output), WebAssembly.RuntimeError, /unreachable/); +} + +function testInvalidAlignment() { + let invalidAlignment = ARRAY_ALIGNMENT + 1; + + // inputA: Not an integral multiple of ARRAY_ALIGNMENT + assertErrorMessage(() => int8_multiply_and_add_bias(invalidAlignment, VALID.scaleA, VALID.zeroPointA, VALID.inputB, VALID.scaleB, VALID.zeroPointB, VALID.inputBiasPrepared, VALID.unquantMultiplier, VALID.rowsA, VALID.width, VALID.colsB, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // inputB: Not an integral multiple of ARRAY_ALIGNMENT + assertErrorMessage(() => int8_multiply_and_add_bias(VALID.inputA, VALID.scaleA, VALID.zeroPointA, invalidAlignment, VALID.scaleB, VALID.zeroPointB, VALID.inputBiasPrepared, VALID.unquantMultiplier, VALID.rowsA, VALID.width, VALID.colsB, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testOutOfBounds() { + let outOfBound; + + // inputA: Out of Bounds + outOfBound = PageSizeInBytes - ARRAY_ALIGNMENT; + let rowsAForOutOfBound = ROWS_A_MULTIPLIER << 1; + assertErrorMessage(() => int8_multiply_and_add_bias(outOfBound, VALID.scaleA, VALID.zeroPointA, VALID.inputB, VALID.scaleB, VALID.zeroPointB, VALID.inputBiasPrepared, VALID.unquantMultiplier, rowsAForOutOfBound, VALID.width, VALID.colsB, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // inputB: Out of Bounds + outOfBound = PageSizeInBytes - ARRAY_ALIGNMENT; + assertErrorMessage(() => int8_multiply_and_add_bias(VALID.inputA, VALID.scaleA, VALID.zeroPointA, outOfBound, VALID.scaleB, VALID.zeroPointB, VALID.inputBiasPrepared, VALID.unquantMultiplier, VALID.rowsA, VALID.width, VALID.colsB, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // inputBias: Out of Bounds + outOfBound = PageSizeInBytes - VALID.colsB; + assertErrorMessage(() => int8_multiply_and_add_bias(outOfBound, VALID.scaleA, VALID.zeroPointA, VALID.inputB, VALID.scaleB, VALID.zeroPointB, outOfBound, VALID.unquantMultiplier, VALID.rowsA, VALID.width, VALID.colsB, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // output: Out of Bounds + outOfBound = PageSizeInBytes - VALID.colsB; + assertErrorMessage(() => int8_multiply_and_add_bias(VALID.inputA, VALID.scaleA, VALID.zeroPointA, VALID.inputB, VALID.scaleB, VALID.zeroPointB, VALID.inputBiasPrepared, VALID.unquantMultiplier, VALID.rowsA, VALID.width, VALID.colsB, outOfBound), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testSuccessfulCall() { + // We just test that with valid arguments the intrinsic executes without any error + int8_multiply_and_add_bias(VALID.inputA, VALID.scaleA, VALID.zeroPointA, VALID.inputB, VALID.scaleB, VALID.zeroPointB, VALID.inputBiasPrepared, VALID.unquantMultiplier, VALID.rowsA, VALID.width, VALID.colsB, VALID.output); +} + +testInvalidSize(); +testInvalidAlignment(); +testOutOfBounds(); +testSuccessfulCall(); +` + +// Run all the tests +import(COMMON_TEST_SETUP_SCRIPT).then((importedModule) => { + importedModule.runTest(importedModule.COMMON_TEST_SETUP_AS_STRING + ALL_TESTS_AS_STRING); +}); diff --git a/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareA.js b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareA.js new file mode 100644 index 0000000000..a7f9f204f1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareA.js @@ -0,0 +1,62 @@ +// This file contains all the tests for int8_prepare_a intrinsic. It depends +// on the CommonTestSetup.js script which contains the common functionality +// that is required for testing all the intrinsics. +const COMMON_TEST_SETUP_SCRIPT = "./CommonTestSetup.js" + +// All tests for this intrinsic as a string +const ALL_TESTS_AS_STRING =` +let {int8_prepare_a} = instance.exports; + +const VALID = {input: 0, scale: 1.0, zeroPoint: 0.0, rows: ROWS_A_MULTIPLIER, cols: COLUMNS_A_MULTIPLIER, output: ARRAY_ALIGNMENT << 5}; + +function testInvalidSize() { + let invalidSize; + + // row: 0 + invalidSize = 0; + assertErrorMessage(() => int8_prepare_a(VALID.input, VALID.scale, VALID.zeroPoint, invalidSize, VALID.cols, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // col: 0 + invalidSize = 0; + assertErrorMessage(() => int8_prepare_a(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, invalidSize, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // col: Not an integral multiple of COLUMNS_A_MULTIPLIER + invalidSize = COLUMNS_A_MULTIPLIER + 1; + assertErrorMessage(() => int8_prepare_a(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, invalidSize, VALID.output), WebAssembly.RuntimeError, /unreachable/); +} + +function testInvalidAlignment() { + let invalidAlignment = ARRAY_ALIGNMENT + 1; + + // input: Not an integral multiple of ARRAY_ALIGNMENT + assertErrorMessage(() => int8_prepare_a(invalidAlignment, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // output: Not an integral multiple of ARRAY_ALIGNMENT + assertErrorMessage(() => int8_prepare_a(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, invalidAlignment), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testOutOfBounds() { + let outOfBound = PageSizeInBytes - ARRAY_ALIGNMENT; + + // input: Out of Bounds + assertErrorMessage(() => int8_prepare_a(outOfBound, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // output: Out of Bounds + assertErrorMessage(() => int8_prepare_a(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, outOfBound), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testSuccessfulCall() { + // We just test that with valid arguments the intrinsic executes without any error + int8_prepare_a(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, VALID.output); +} + +testInvalidSize(); +testInvalidAlignment(); +testOutOfBounds(); +testSuccessfulCall(); +` + +// Run all the tests +import(COMMON_TEST_SETUP_SCRIPT).then((importedModule) => { + importedModule.runTest(importedModule.COMMON_TEST_SETUP_AS_STRING + ALL_TESTS_AS_STRING); +}); diff --git a/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareB.js b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareB.js new file mode 100644 index 0000000000..ca66a6af3c --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareB.js @@ -0,0 +1,66 @@ +// This file contains all the tests for int8_prepare_b intrinsic. It depends +// on the CommonTestSetup.js script which contains the common functionality +// that is required for testing all the intrinsics. +const COMMON_TEST_SETUP_SCRIPT = "./CommonTestSetup.js" + +// All tests for this intrinsic as a string +const ALL_TESTS_AS_STRING =` +let {int8_prepare_b} = instance.exports; + +const VALID = {input: 0, scale: 1.0, zeroPoint: 0.0, rows: ROWS_B_MULTIPLIER, cols: COLUMNS_B_MULTIPLIER, output: ARRAY_ALIGNMENT << 5}; + +function testInvalidSize() { + let invalidSize; + + // row: 0 + invalidSize = 0; + assertErrorMessage(() => int8_prepare_b(VALID.input, VALID.scale, VALID.zeroPoint, invalidSize, VALID.cols, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // row: Not an integral multiple of ROWS_B_MULTIPLIER + invalidSize = ROWS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_prepare_b(VALID.input, VALID.scale, VALID.zeroPoint, invalidSize, VALID.cols, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // col: 0 + invalidSize = 0; + assertErrorMessage(() => int8_prepare_b(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, invalidSize, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // col: Not an integral multiple of COLUMNS_B_MULTIPLIER + invalidSize = COLUMNS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_prepare_b(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, invalidSize, VALID.output), WebAssembly.RuntimeError, /unreachable/); +} + +function testInvalidAlignment() { + let invalidAlignment = ARRAY_ALIGNMENT + 1; + + // input: Not an integral multiple of ARRAY_ALIGNMENT + assertErrorMessage(() => int8_prepare_b(invalidAlignment, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // output: Not an integral multiple of ARRAY_ALIGNMENT + assertErrorMessage(() => int8_prepare_b(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, invalidAlignment), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testOutOfBounds() { + let outOfBound = PageSizeInBytes - ARRAY_ALIGNMENT; + + // input: Out of Bounds + assertErrorMessage(() => int8_prepare_b(outOfBound, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // output: Out of Bounds + assertErrorMessage(() => int8_prepare_b(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, outOfBound), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testSuccessfulCall() { + // We just test that with valid arguments the intrinsic executes without any error + int8_prepare_b(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, VALID.output); +} + +testInvalidSize(); +testInvalidAlignment(); +testOutOfBounds(); +testSuccessfulCall(); +` + +// Run all the tests +import(COMMON_TEST_SETUP_SCRIPT).then((importedModule) => { + importedModule.runTest(importedModule.COMMON_TEST_SETUP_AS_STRING + ALL_TESTS_AS_STRING); +}); diff --git a/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareBFromQuantizedTransposed.js b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareBFromQuantizedTransposed.js new file mode 100644 index 0000000000..191d5fdda0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareBFromQuantizedTransposed.js @@ -0,0 +1,66 @@ +// This file contains all the tests for int8_prepare_b_from_quantized_transposed intrinsic. It depends +// on the CommonTestSetup.js script which contains the common functionality +// that is required for testing all the intrinsics. +const COMMON_TEST_SETUP_SCRIPT = "./CommonTestSetup.js" + +// All tests for this intrinsic as a string +const ALL_TESTS_AS_STRING =` +let {int8_prepare_b_from_quantized_transposed} = instance.exports; + +const VALID = {input: 0, rows: ROWS_B_MULTIPLIER, cols: COLUMNS_B_MULTIPLIER, output: ARRAY_ALIGNMENT << 5}; + +function testInvalidSize() { + let invalidSize; + + // row: 0 + invalidSize = 0; + assertErrorMessage(() => int8_prepare_b_from_quantized_transposed(VALID.input, invalidSize, VALID.cols, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // row: Not an integral multiple of ROWS_B_MULTIPLIER + invalidSize = ROWS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_prepare_b_from_quantized_transposed(VALID.input, invalidSize, VALID.cols, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // col: 0 + invalidSize = 0; + assertErrorMessage(() => int8_prepare_b_from_quantized_transposed(VALID.input, VALID.rows, invalidSize, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // col: Not an integral multiple of COLUMNS_B_MULTIPLIER + invalidSize = COLUMNS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_prepare_b_from_quantized_transposed(VALID.input, VALID.rows, invalidSize, VALID.output), WebAssembly.RuntimeError, /unreachable/); +} + +function testInvalidAlignment() { + let invalidAlignment = ARRAY_ALIGNMENT + 1; + + // input: Not an integral multiple of ARRAY_ALIGNMENT + assertErrorMessage(() => int8_prepare_b_from_quantized_transposed(invalidAlignment, VALID.rows, VALID.cols, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // output: Not an integral multiple of ARRAY_ALIGNMENT + assertErrorMessage(() => int8_prepare_b_from_quantized_transposed(VALID.input, VALID.rows, VALID.cols, invalidAlignment), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testOutOfBounds() { + let outOfBound = PageSizeInBytes - ARRAY_ALIGNMENT; + + // input: Out of Bounds + assertErrorMessage(() => int8_prepare_b_from_quantized_transposed(outOfBound, VALID.rows, VALID.cols, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // output: Out of Bounds + assertErrorMessage(() => int8_prepare_b_from_quantized_transposed(VALID.input, VALID.rows, VALID.cols, outOfBound), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testSuccessfulCall() { + // We just test that with valid arguments the intrinsic executes without any error + int8_prepare_b_from_quantized_transposed(VALID.input, VALID.rows, VALID.cols, VALID.output); +} + +testInvalidSize(); +testInvalidAlignment(); +testOutOfBounds(); +testSuccessfulCall(); +` + +// Run all the tests +import(COMMON_TEST_SETUP_SCRIPT).then((importedModule) => { + importedModule.runTest(importedModule.COMMON_TEST_SETUP_AS_STRING + ALL_TESTS_AS_STRING); +}); diff --git a/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareBFromTransposed.js b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareBFromTransposed.js new file mode 100644 index 0000000000..e8e01f6b17 --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareBFromTransposed.js @@ -0,0 +1,66 @@ +// This file contains all the tests for int8_prepare_b_from_transposed intrinsic. It depends +// on the CommonTestSetup.js script which contains the common functionality +// that is required for testing all the intrinsics. +const COMMON_TEST_SETUP_SCRIPT = "./CommonTestSetup.js" + +// All tests for this intrinsic as a string +const ALL_TESTS_AS_STRING =` +let {int8_prepare_b_from_transposed} = instance.exports; + +const VALID = {input: 0, scale: 1.0, zeroPoint: 0.0, rows: ROWS_B_MULTIPLIER, cols: COLUMNS_B_MULTIPLIER, output: ARRAY_ALIGNMENT << 5}; + +function testInvalidSize() { + let invalidSize; + + // row: 0 + invalidSize = 0; + assertErrorMessage(() => int8_prepare_b_from_transposed(VALID.input, VALID.scale, VALID.zeroPoint, invalidSize, VALID.cols, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // row: Not an integral multiple of ROWS_B_MULTIPLIER + invalidSize = ROWS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_prepare_b_from_transposed(VALID.input, VALID.scale, VALID.zeroPoint, invalidSize, VALID.cols, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // col: 0 + invalidSize = 0; + assertErrorMessage(() => int8_prepare_b_from_transposed(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, invalidSize, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // col: Not an integral multiple of COLUMNS_B_MULTIPLIER + invalidSize = COLUMNS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_prepare_b_from_transposed(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, invalidSize, VALID.output), WebAssembly.RuntimeError, /unreachable/); +} + +function testInvalidAlignment() { + let invalidAlignment = ARRAY_ALIGNMENT + 1; + + // input: Not an integral multiple of ARRAY_ALIGNMENT + assertErrorMessage(() => int8_prepare_b_from_transposed(invalidAlignment, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // output: Not an integral multiple of ARRAY_ALIGNMENT + assertErrorMessage(() => int8_prepare_b_from_transposed(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, invalidAlignment), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testOutOfBounds() { + let outOfBound = PageSizeInBytes - ARRAY_ALIGNMENT; + + // input: Out of Bounds + assertErrorMessage(() => int8_prepare_b_from_transposed(outOfBound, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // output: Out of Bounds + assertErrorMessage(() => int8_prepare_b_from_transposed(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, outOfBound), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testSuccessfulCall() { + // We just test that with valid arguments the intrinsic executes without any error + int8_prepare_b_from_transposed(VALID.input, VALID.scale, VALID.zeroPoint, VALID.rows, VALID.cols, VALID.output); +} + +testInvalidSize(); +testInvalidAlignment(); +testOutOfBounds(); +testSuccessfulCall(); +` + +// Run all the tests +import(COMMON_TEST_SETUP_SCRIPT).then((importedModule) => { + importedModule.runTest(importedModule.COMMON_TEST_SETUP_AS_STRING + ALL_TESTS_AS_STRING); +}); diff --git a/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareBias.js b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareBias.js new file mode 100644 index 0000000000..49c0d3f87a --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8PrepareBias.js @@ -0,0 +1,69 @@ +// This file contains all the tests for int8_prepare_bias intrinsic. It depends +// on the CommonTestSetup.js script which contains the common functionality +// that is required for testing all the intrinsics. +const COMMON_TEST_SETUP_SCRIPT = "./CommonTestSetup.js" + +// All tests for this intrinsic as a string +const ALL_TESTS_AS_STRING =` +let {int8_prepare_bias} = instance.exports; + +const VALID = {input: 0, scaleA: 1.0, zeroPointA: 0.0, scaleB: 1.0, zeroPointB: 0.0, rows: ROWS_B_MULTIPLIER, cols: COLUMNS_B_MULTIPLIER, inputBias: ARRAY_ALIGNMENT << 4, output: ARRAY_ALIGNMENT << 5}; + +function testInvalidSize() { + let invalidSize; + + // row: 0 + invalidSize = 0; + assertErrorMessage(() => int8_prepare_bias(VALID.input, VALID.scaleA, VALID.zeroPointA, VALID.scaleB, VALID.zeroPointB, invalidSize, VALID.cols, VALID.inputBias, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // row: Not an integral multiple of ROWS_B_MULTIPLIER + invalidSize = ROWS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_prepare_bias(VALID.input, VALID.scaleA, VALID.zeroPointA, VALID.scaleB, VALID.zeroPointB, invalidSize, VALID.cols, VALID.inputBias, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // col: 0 + invalidSize = 0; + assertErrorMessage(() => int8_prepare_bias(VALID.input, VALID.scaleA, VALID.zeroPointA, VALID.scaleB, VALID.zeroPointB, VALID.rows, invalidSize, VALID.inputBias, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // col: Not an integral multiple of COLUMNS_B_MULTIPLIER + invalidSize = COLUMNS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_prepare_bias(VALID.input, VALID.scaleA, VALID.zeroPointA, VALID.scaleB, VALID.zeroPointB, VALID.rows, invalidSize, VALID.inputBias, VALID.output), WebAssembly.RuntimeError, /unreachable/); +} + +function testInvalidAlignment() { + let invalidAlignment = ARRAY_ALIGNMENT + 1; + + // input: Not an integral multiple of ARRAY_ALIGNMENT + assertErrorMessage(() => int8_prepare_bias(invalidAlignment, VALID.scaleA, VALID.zeroPointA, VALID.scaleB, VALID.zeroPointB, VALID.rows, VALID.cols, VALID.inputBias, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testOutOfBounds() { + let outOfBound; + + // input: Out of Bounds + outOfBound = PageSizeInBytes - ARRAY_ALIGNMENT; + assertErrorMessage(() => int8_prepare_bias(outOfBound, VALID.scaleA, VALID.zeroPointA, VALID.scaleB, VALID.zeroPointB, VALID.rows, VALID.cols, VALID.inputBias, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // inputBias: Out of Bounds + outOfBound = PageSizeInBytes - VALID.cols; + assertErrorMessage(() => int8_prepare_bias(VALID.input, VALID.scaleA, VALID.zeroPointA, VALID.scaleB, VALID.zeroPointB, VALID.rows, VALID.cols, outOfBound, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // output: Out of Bounds + outOfBound = PageSizeInBytes - VALID.cols; + assertErrorMessage(() => int8_prepare_bias(VALID.input, VALID.scaleA, VALID.zeroPointA, VALID.scaleB, VALID.zeroPointB, VALID.rows, VALID.cols, VALID.inputBias, outOfBound), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testSuccessfulCall() { + // We just test that with valid arguments the intrinsic executes without any error + int8_prepare_bias(VALID.input, VALID.scaleA, VALID.zeroPointA, VALID.scaleB, VALID.zeroPointB, VALID.rows, VALID.cols, VALID.inputBias, VALID.output); +} + +testInvalidSize(); +testInvalidAlignment(); +testOutOfBounds(); +testSuccessfulCall(); +` + +// Run all the tests +import(COMMON_TEST_SETUP_SCRIPT).then((importedModule) => { + importedModule.runTest(importedModule.COMMON_TEST_SETUP_AS_STRING + ALL_TESTS_AS_STRING); +}); diff --git a/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8SelectColumnsOfB.js b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8SelectColumnsOfB.js new file mode 100644 index 0000000000..7d13e18c9b --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/I8SelectColumnsOfB.js @@ -0,0 +1,77 @@ +// This file contains all the tests for int8_select_columns_of_b intrinsic. It depends +// on the CommonTestSetup.js script which contains the common functionality +// that is required for testing all the intrinsics. +const COMMON_TEST_SETUP_SCRIPT = "./CommonTestSetup.js" + +// All tests for this intrinsic as a string +const ALL_TESTS_AS_STRING =` +let {int8_select_columns_of_b} = instance.exports; + +const VALID = {input: 0, rows: ROWS_B_MULTIPLIER, cols: COLUMNS_B_MULTIPLIER, colIndexList: ARRAY_ALIGNMENT << 3, sizeColIndexList: SELECTED_COLUMNS_B_MULTIPLIER, output: ARRAY_ALIGNMENT << 5}; + +function testInvalidSize() { + let invalidSize; + + // row: 0 + invalidSize = 0; + assertErrorMessage(() => int8_select_columns_of_b(VALID.input, invalidSize, VALID.cols, VALID.colIndexList, VALID.sizeColIndexList, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // row: Not an integral multiple of ROWS_B_MULTIPLIER + invalidSize = ROWS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_select_columns_of_b(VALID.input, invalidSize, VALID.cols, VALID.colIndexList, VALID.sizeColIndexList, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // col: 0 + invalidSize = 0; + assertErrorMessage(() => int8_select_columns_of_b(VALID.input, VALID.rows, invalidSize, VALID.colIndexList, VALID.sizeColIndexList, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // col: Not an integral multiple of COLUMNS_B_MULTIPLIER + invalidSize = COLUMNS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_select_columns_of_b(VALID.input, VALID.rows, invalidSize, VALID.colIndexList, VALID.sizeColIndexList, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // sizeColIndexList: 0 + invalidSize = 0; + assertErrorMessage(() => int8_select_columns_of_b(VALID.input, VALID.rows, VALID.cols, VALID.colIndexList, invalidSize, VALID.output), WebAssembly.RuntimeError, /unreachable/); + + // sizeColIndexList: Not an integral multiple of SELECTED_COLUMNS_B_MULTIPLIER + invalidSize = SELECTED_COLUMNS_B_MULTIPLIER + 1; + assertErrorMessage(() => int8_select_columns_of_b(VALID.input, VALID.rows, VALID.cols, VALID.colIndexList, invalidSize, VALID.output), WebAssembly.RuntimeError, /unreachable/); +} + +function testInvalidAlignment() { + let invalidAlignment = ARRAY_ALIGNMENT + 1; + + // input: Not an integral multiple of ARRAY_ALIGNMENT + assertErrorMessage(() => int8_select_columns_of_b(invalidAlignment, VALID.rows, VALID.cols, VALID.colIndexList, VALID.sizeColIndexList, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testOutOfBounds() { + let outOfBound; + + // input: Out of Bounds + outOfBound = PageSizeInBytes - ARRAY_ALIGNMENT; + assertErrorMessage(() => int8_select_columns_of_b(outOfBound, VALID.rows, VALID.cols, VALID.colIndexList, VALID.sizeColIndexList, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // colIndexList: Out of Bounds + outOfBound = PageSizeInBytes - VALID.sizeColIndexList; + assertErrorMessage(() => int8_select_columns_of_b(outOfBound, VALID.rows, VALID.cols, outOfBound, VALID.sizeColIndexList, VALID.output), WebAssembly.RuntimeError, /index out of bounds/); + + // output: Out of Bounds + outOfBound = PageSizeInBytes - (VALID.rows * VALID.sizeColIndexList); + assertErrorMessage(() => int8_select_columns_of_b(VALID.input, VALID.rows, VALID.cols, VALID.colIndexList, VALID.sizeColIndexList, outOfBound), WebAssembly.RuntimeError, /index out of bounds/); +} + +function testSuccessfulCall() { + // We just test that with valid arguments the intrinsic executes without any error + int8_select_columns_of_b(VALID.input, VALID.rows, VALID.cols, VALID.colIndexList, VALID.sizeColIndexList, VALID.output); +} + +testInvalidSize(); +testInvalidAlignment(); +testOutOfBounds(); +testSuccessfulCall(); +` + +// Run all the tests +import(COMMON_TEST_SETUP_SCRIPT).then((importedModule) => { + importedModule.runTest(importedModule.COMMON_TEST_SETUP_AS_STRING + ALL_TESTS_AS_STRING); +}); diff --git a/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/directives.txt b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/directives.txt new file mode 100644 index 0000000000..46c9c504f4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/integer-gemm/directives.txt @@ -0,0 +1 @@ +|jit-test| --wasm-moz-intgemm; skip-if: (!getBuildConfiguration("x64") && !getBuildConfiguration("x86") && !getBuildConfiguration("arm64")) || getBuildConfiguration("simulator") || !wasmMozIntGemmEnabled() diff --git a/js/src/jit-test/tests/wasm/builtin-modules/js-string/basic.js b/js/src/jit-test/tests/wasm/builtin-modules/js-string/basic.js new file mode 100644 index 0000000000..dce6204fee --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/js-string/basic.js @@ -0,0 +1,316 @@ +// |jit-test| skip-if: !wasmJSStringBuiltinsEnabled(); + +let testModule = wasmTextToBinary(`(module + (func + (import "wasm:js-string" "fromWTF16Array") + (param anyref i32 i32) + (result externref) + ) + (export "fromWTF16Array" (func 0)) + + (func + (import "wasm:js-string" "toWTF16Array") + (param externref anyref i32) + (result i32) + ) + (export "toWTF16Array" (func 1)) + + (func + (import "wasm:js-string" "fromCharCode") + (param i32) + (result externref) + ) + (export "fromCharCode" (func 2)) + + (func + (import "wasm:js-string" "fromCodePoint") + (param i32) + (result externref) + ) + (export "fromCodePoint" (func 3)) + + (func + (import "wasm:js-string" "charCodeAt") + (param externref i32) + (result i32) + ) + (export "charCodeAt" (func 4)) + + (func + (import "wasm:js-string" "codePointAt") + (param externref i32) + (result i32) + ) + (export "codePointAt" (func 5)) + + (func + (import "wasm:js-string" "length") + (param externref) + (result i32) + ) + (export "length" (func 6)) + + (func + (import "wasm:js-string" "concatenate") + (param externref externref) + (result externref) + ) + (export "concatenate" (func 7)) + + (func + (import "wasm:js-string" "substring") + (param externref i32 i32) + (result externref) + ) + (export "substring" (func 8)) + + (func + (import "wasm:js-string" "equals") + (param externref externref) + (result i32) + ) + (export "equals" (func 9)) + + (func + (import "wasm:js-string" "compare") + (param externref externref) + (result i32) + ) + (export "compare" (func 10)) +)`); + +let { + createArray, + arrayLength, + arraySet, + arrayGet +} = wasmEvalText(`(module + (type $i16Array (array (mut i16))) + (func (export "createArray") (param i32) (result anyref) + i32.const 0 + local.get 0 + array.new $i16Array + ) + (func (export "arrayLength") (param arrayref) (result i32) + local.get 0 + array.len + ) + (func (export "arraySet") (param (ref $i16Array) i32 i32) + local.get 0 + local.get 1 + local.get 2 + array.set $i16Array + ) + (func (export "arrayGet") (param (ref $i16Array) i32) (result i32) + local.get 0 + local.get 1 + array.get_u $i16Array + ) +)`).exports; + +function throwIfNotString(a) { + if (typeof a !== "string") { + throw new WebAssembly.RuntimeError(); + } +} +let polyFillImports = { + fromWTF16Array: (array, arrayStart, arrayCount) => { + arrayStart |= 0; + arrayCount |= 0; + let length = arrayLength(array); + if (BigInt(arrayStart) + BigInt(arrayCount) > BigInt(length)) { + throw new WebAssembly.RuntimeError(); + } + let result = ''; + for (let i = arrayStart; i < arrayStart + arrayCount; i++) { + result += String.fromCharCode(arrayGet(array, i)); + } + return result; + }, + toWTF16Array: (string, arr, arrayStart) => { + arrayStart |= 0; + throwIfNotString(string); + let arrLength = arrayLength(arr); + let stringLength = string.length; + if (BigInt(arrayStart) + BigInt(stringLength) > BigInt(arrLength)) { + throw new WebAssembly.RuntimeError(); + } + for (let i = 0; i < stringLength; i++) { + arraySet(arr, arrayStart + i, string[i].charCodeAt(0)); + } + return stringLength; + }, + fromCharCode: (charCode) => { + charCode |= 0; + return String.fromCharCode(charCode); + }, + fromCodePoint: (codePoint) => { + codePoint |= 0; + return String.fromCodePoint(codePoint); + }, + charCodeAt: (string, stringIndex) => { + stringIndex |= 0; + throwIfNotString(string); + if (stringIndex >= string.length) + throw new WebAssembly.RuntimeError(); + return string.charCodeAt(stringIndex); + }, + codePointAt: (string, stringIndex) => { + stringIndex |= 0; + throwIfNotString(string); + if (stringIndex >= string.length) + throw new WebAssembly.RuntimeError(); + return string.codePointAt(stringIndex); + }, + length: (string) => { + throwIfNotString(string); + return string.length; + }, + concatenate: (stringA, stringB) => { + throwIfNotString(stringA); + throwIfNotString(stringB); + return stringA + stringB; + }, + substring: (string, startIndex, endIndex) => { + startIndex |= 0; + endIndex |= 0; + throwIfNotString(string); + if (startIndex > string.length, + endIndex > string.length, + endIndex < startIndex) { + return ""; + } + return string.substring(startIndex, endIndex); + }, + equals: (stringA, stringB) => { + throwIfNotString(stringA); + throwIfNotString(stringB); + return stringA === stringB; + }, + compare: (stringA, stringB) => { + throwIfNotString(stringA); + throwIfNotString(stringB); + if (stringA < stringB) { + return -1; + } + return stringA === stringB ? 0 : 1; + }, +}; + +function assertSameBehavior(funcA, funcB, ...params) { + let resultA; + let errA = null; + try { + resultA = funcA(...params); + } catch (err) { + errA = err; + } + + let resultB; + let errB = null; + try { + resultB = funcB(...params); + } catch (err) { + errB = err; + } + + if (errA || errB) { + assertEq(errA === null, errB === null, errA ? errA.message : errB.message); + assertEq(Object.getPrototypeOf(errA), Object.getPrototypeOf(errB)); + assertEq(errA.message, errB.message); + } + assertEq(resultA, resultB); + + if (errA) { + throw errA; + } + return resultA; +} + +let builtinExports = new WebAssembly.Instance(new WebAssembly.Module(testModule, {builtins: ["js-string"]}), {}).exports; +let polyfillExports = new WebAssembly.Instance(new WebAssembly.Module(testModule), { 'wasm:js-string': polyFillImports }).exports; + +let testStrings = ["", "a", "1", "ab", "hello, world", "\n", "☺", "☺smiley", String.fromCodePoint(0x10000, 0x10001)]; +let testCharCodes = [1, 2, 3, 10, 0x7f, 0xff, 0xfffe, 0xffff]; +let testCodePoints = [1, 2, 3, 10, 0x7f, 0xff, 0xfffe, 0xffff, 0x10000, 0x10001]; + +for (let a of testCharCodes) { + assertSameBehavior( + builtinExports['fromCharCode'], + polyfillExports['fromCharCode'], + a + ); +} + +for (let a of testCodePoints) { + assertSameBehavior( + builtinExports['fromCodePoint'], + polyfillExports['fromCodePoint'], + a + ); +} + +for (let a of testStrings) { + let length = assertSameBehavior( + builtinExports['length'], + polyfillExports['length'], + a + ); + + for (let i = 0; i < length; i++) { + let charCode = assertSameBehavior( + builtinExports['charCodeAt'], + polyfillExports['charCodeAt'], + a, i + ); + } + for (let i = 0; i < length; i++) { + let charCode = assertSameBehavior( + builtinExports['codePointAt'], + polyfillExports['codePointAt'], + a, i + ); + } + + let array = createArray(length); + assertSameBehavior( + builtinExports['toWTF16Array'], + polyfillExports['toWTF16Array'], + a, array, 0 + ); + assertSameBehavior( + builtinExports['fromWTF16Array'], + polyfillExports['fromWTF16Array'], + array, 0, length + ); + + for (let i = 0; i < length; i++) { + for (let j = 0; j < length; j++) { + assertSameBehavior( + builtinExports['substring'], + polyfillExports['substring'], + a, i, j + ); + } + } +} + +for (let a of testStrings) { + for (let b of testStrings) { + assertSameBehavior( + builtinExports['concatenate'], + polyfillExports['concatenate'], + a, b + ); + assertSameBehavior( + builtinExports['equals'], + polyfillExports['equals'], + a, b + ); + assertSameBehavior( + builtinExports['compare'], + polyfillExports['compare'], + a, b + ); + } +} diff --git a/js/src/jit-test/tests/wasm/builtin-modules/js-string/directives.txt b/js/src/jit-test/tests/wasm/builtin-modules/js-string/directives.txt new file mode 100644 index 0000000000..8c5e6882eb --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/js-string/directives.txt @@ -0,0 +1 @@ +|jit-test| --wasm-gc; --wasm-js-string-builtins; test-also=--wasm-compiler=optimizing; include:wasm.js diff --git a/js/src/jit-test/tests/wasm/builtin-modules/oom-test.js b/js/src/jit-test/tests/wasm/builtin-modules/oom-test.js new file mode 100644 index 0000000000..32aa1b2515 --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin-modules/oom-test.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => { + const module = wasmBuiltinI8VecMul(); + WebAssembly.Module.imports(module); +}); diff --git a/js/src/jit-test/tests/wasm/builtin.js b/js/src/jit-test/tests/wasm/builtin.js new file mode 100644 index 0000000000..65d673d9a7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/builtin.js @@ -0,0 +1,132 @@ +let values = [-Infinity, Infinity, NaN, 0, -0, -0.1, 0.1, 0.5, -1.6, 1.6, 13.37]; + +function unary(name) { + print(name); + + let imports = { + math: { + func: Math[name], + } + }; + + let f32 = x => Math.fround(Math[name](Math.fround(x))); + let f64 = Math[name]; + + let i = wasmEvalText(`(module + (import "math" "func" (func $f32 (param f32) (result f32))) + (import "math" "func" (func $f64 (param f64) (result f64))) + + (table $t 10 funcref) + (type $f_f (func (param f32) (result f32))) + (type $d_d (func (param f64) (result f64))) + (elem (i32.const 0) $f32 $f64) + + (func (export "f32") (param f32) (result f32) + local.get 0 + call $f32 + ) + (func (export "f32_t") (param f32) (result f32) + local.get 0 + i32.const 0 + call_indirect (type $f_f) + ) + (func (export "f64") (param f64) (result f64) + local.get 0 + call $f64 + ) + (func (export "f64_t") (param f64) (result f64) + local.get 0 + i32.const 1 + call_indirect (type $d_d) + ) + )`, imports).exports; + + for (let v of values) { + assertEq(i.f32(v), f32(v)); + assertEq(i.f32_t(v), f32(v)); + assertEq(i.f64(v), f64(v)); + assertEq(i.f64_t(v), f64(v)); + } +} + +function binary(name) { + print(name); + + let imports = { + math: { + func: Math[name] + } + }; + + let f32 = (x, y) => Math.fround(Math[name](Math.fround(x), Math.fround(y))); + let f64 = Math[name]; + + let i = wasmEvalText(`(module + (import "math" "func" (func $f32 (param f32) (param f32) (result f32))) + (import "math" "func" (func $f64 (param f64) (param f64) (result f64))) + + (table $t 10 funcref) + (type $ff_f (func (param f32) (param f32) (result f32))) + (type $dd_d (func (param f64) (param f64) (result f64))) + (elem (i32.const 0) $f32 $f64) + + (func (export "f32") (param f32) (param f32) (result f32) + local.get 0 + local.get 1 + call $f32 + ) + (func (export "f32_t") (param f32) (param f32) (result f32) + local.get 0 + local.get 1 + i32.const 0 + call_indirect (type $ff_f) + ) + (func (export "f64") (param f64) (param f64) (result f64) + local.get 0 + local.get 1 + call $f64 + ) + (func (export "f64_t") (param f64) (param f64) (result f64) + local.get 0 + local.get 1 + i32.const 1 + call_indirect (type $dd_d) + ) + )`, imports).exports; + + for (let v of values) { + for (let w of values) { + assertEq(i.f32(v, w), f32(v, w)); + assertEq(i.f64(v, w), f64(v, w)); + } + } +} + +unary('sin'); +unary('sin'); +unary('tan'); +unary('cos'); +unary('exp'); +unary('log'); +unary('asin'); +unary('atan'); +unary('acos'); +unary('log10'); +unary('log2'); +unary('log1p'); +unary('expm1'); +unary('sinh'); +unary('tanh'); +unary('cosh'); +unary('asinh'); +unary('atanh'); +unary('acosh'); +unary('sign'); +unary('trunc'); +unary('cbrt'); + +binary('atan2'); +binary('hypot'); +binary('pow'); + +print('done'); diff --git a/js/src/jit-test/tests/wasm/caching.js b/js/src/jit-test/tests/wasm/caching.js new file mode 100644 index 0000000000..08ef3c27e9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/caching.js @@ -0,0 +1,63 @@ +// |jit-test| skip-if: !wasmCachingEnabled() + +load(libdir + "wasm-caching.js"); +load(libdir + "wasm-binary.js"); + +testCached(`(module + (func $test (param i64) (result f64) + local.get 0 + f64.convert_i64_u + ) + (func (export "run") (result i32) + i64.const 1 + call $test + f64.const 1 + f64.eq + ) +)`, + undefined, + i => { assertEq(i.exports.run(), 1); } +); + +testCached( + `(module + (type $long-serialized-type (func (param + i64 i32 f64 f32 i64 i32 f64 f32 i64 i32 f64 f32 i64 i32 f64 f32))) + (func (export "run") (result i32) + (i32.const 42)))`, + undefined, + i => { assertEq(i.exports.run(), 42); } +); + +testCached( + `(module + (type $T (func (result i32))) + (func $t1 (import "" "t1") (type $T)) + (func $t2 (import "" "t2") (type $T)) + (func $t3 (type $T) (i32.const 30)) + (func $t4 (type $T) (i32.const 40)) + (table funcref (elem $t1 $t2 $t3 $t4)) + (func (export "run") (param i32) (result i32) + (call_indirect (type $T) (local.get 0))))`, + {'':{ t1() { return 10 }, t2() { return 20 } }}, + i => { + assertEq(i.exports.run(0), 10); + assertEq(i.exports.run(1), 20); + assertEq(i.exports.run(2), 30); + assertEq(i.exports.run(3), 40); + } +); + +testCached( + moduleWithSections([ + sigSection([{args:[], ret:VoidCode}]), + declSection([0]), + exportSection([{funcIndex:0, name:"run"}]), + bodySection([funcBody({locals:[], body:[UnreachableCode]})]), + nameSection([funcNameSubsection([{name:"wee"}])]) + ]), + undefined, + i => assertErrorMessage(() => i.exports.run(), RuntimeError, /unreachable/) +); + +// Note: a fuller behavioral test of caching is in bench/wasm_box2d.js. diff --git a/js/src/jit-test/tests/wasm/comments.js b/js/src/jit-test/tests/wasm/comments.js new file mode 100644 index 0000000000..4fc29ec19b --- /dev/null +++ b/js/src/jit-test/tests/wasm/comments.js @@ -0,0 +1,31 @@ +// sanity check +assertErrorMessage(() => wasmEvalText(''), SyntaxError, /wasm text error/); + +// single line comment +var o = wasmEvalText('(module (func)) ;; end'); +var o = wasmEvalText('(module (func)) ;; end\n'); +var o = wasmEvalText('(module (func))\n;; end'); +var o = wasmEvalText('(module (func))\n;; end'); +var o = wasmEvalText(';;start\n(module (func))'); +var o = wasmEvalText('(module (func ;; middle\n))'); +var o = wasmEvalText('(module (func) ;; middle\n (export "a" (func 0)))').exports; +assertEq(Object.getOwnPropertyNames(o)[0], "a"); + +// multi-line comments +var o = wasmEvalText('(module (func))(; end ;)'); +var o = wasmEvalText('(module (func)) (; end\nmulti;)\n'); +var o = wasmEvalText('(module (func))\n(;;)'); +var o = wasmEvalText('(;start;)(module (func))'); +var o = wasmEvalText('(;start;)\n(module (func))'); +var o = wasmEvalText('(module (func (; middle\n multi\n;)))'); +var o = wasmEvalText('(module (func)(;middle;)(export "a" (func 0)))').exports; +assertEq(Object.getOwnPropertyNames(o)[0], "a"); + +// nested comments +var o = wasmEvalText('(module (;nested(;comment;);)(func (;;;;)))'); +var o = wasmEvalText(';;;;;;;;;;\n(module ;;(;n \n(func (;\n;;;)))'); + +assertErrorMessage(() => wasmEvalText(';; only comment'), SyntaxError, /wasm text error/); +assertErrorMessage(() => wasmEvalText(';; only comment\n'), SyntaxError, /wasm text error/); +assertErrorMessage(() => wasmEvalText('(; only comment ;)'), SyntaxError, /wasm text error/); +assertErrorMessage(() => wasmEvalText(';; only comment\n'), SyntaxError, /wasm text error/); diff --git a/js/src/jit-test/tests/wasm/compare-select-i32-i64.js b/js/src/jit-test/tests/wasm/compare-select-i32-i64.js new file mode 100644 index 0000000000..34657053ac --- /dev/null +++ b/js/src/jit-test/tests/wasm/compare-select-i32-i64.js @@ -0,0 +1,269 @@ + +// Comprehensively test wasm compare-then-select, for all combinations of +// +// compare in i32 i64 +// select in i32 i64 +// compare-op in eq ne lt_s lt_u gt_s gt_u le_s le_u ge_s ge_u +// +// and using comparison values from all 4 quadrant points of the range, +// including at least one either side, so as to catch off-by-one comparison +// errors. In total 9000 tests. + +const cmpVals32 + = [ 0x00000000, 0x00000001, 0x00000002, + 0x3fffffff, 0x40000000, 0x40000001, + 0x7fffffff, 0x80000000, 0x80000001, + 0xbfffffff, 0xc0000000, 0xc0000001, + 0xfffffffd, 0xfffffffe, 0xffffffff ]; + +const cmpVals64 + = [ 0x0000000000000000n, 0x0000000000000001n, 0x0000000000000002n, + 0x3fffffffffffffffn, 0x4000000000000000n, 0x4000000000000001n, + 0x7fffffffffffffffn, 0x8000000000000000n, 0x8000000000000001n, + 0xbfffffffffffffffn, 0xc000000000000000n, 0xc000000000000001n, + 0xfffffffffffffffdn, 0xfffffffffffffffen, 0xffffffffffffffffn ]; + +const selVal32L = 0x55551234; +const selVal32R = 0x55554321; + +const selVal64L = 0x5555555555554771n; +const selVal64R = 0x5555555555551337n; + +function getCmpVals(cmpTy) { + if (cmpTy === 'i32') { + return cmpVals32; + } else { + assertEq(cmpTy, 'i64'); + return cmpVals64; + } +} + +function classifyResult(selTy, result) { + if (selTy === 'i32') { + if (result === selVal32L) { + return '0'; + } + if (result === selVal32R) { + return '1'; + } + } else { + assertEq(selTy, 'i64'); + if (result === selVal64L) { + return '2'; + } + if (result === selVal64R) { + return '3'; + } + } + // Anything that is not '0', '1', '2' or '3' will cause the final + // summary-string comparison below to fail. + return 'BAD'; +} + +let actualSummaryString = ''; + +for ( cmpTy of [ 'i32', 'i64' ] ) { + for ( selTy of [ 'i32', 'i64' ] ) { + for ( cmpOp of [ 'eq', 'ne', + 'lt_s', 'lt_u', 'gt_s', 'gt_u', + 'le_s', 'le_u', 'ge_s', 'ge_u' ] ) { + let t = + `(module + (func (export "f") + (param $p1 ${cmpTy}) (param $p2 ${cmpTy}) + (param $p3 ${selTy}) (param $p4 ${selTy}) + (result ${selTy}) + (select (local.get $p3) + (local.get $p4) + (${cmpTy}.${cmpOp} (local.get $p1) (local.get $p2))) + ) + )`; + let i = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(t))); + let cmpVals = getCmpVals(cmpTy); + let selValL, selValR; + if (selTy === 'i32') { + selValL = selVal32L; + selValR = selVal32R; + } else { + assertEq(selTy, 'i64'); + selValL = selVal64L; + selValR = selVal64R; + } + for ( cmpValL of cmpVals ) { + for ( cmpValR of cmpVals ) { + let res = i.exports.f(cmpValL, cmpValR, selValL, selValR); + // We expect res to be one of selVal{L,R} values. + // Check that and add its summary to the running string. + let classified = classifyResult(selTy, res); + actualSummaryString += classified; + } + } + } + } +} + +// We expect to run exactly 9000 tests: +// 2 cmp types x 2 sel types x 10 conditions (= 40 wasm functions) +// x 15 cmp argLs x 15 cmp argRs = 9000 +assertEq(actualSummaryString.length, 9000); + +// The expected summary string, one char for each test, encoded per +// function classifyResult above. 150 lines of 60 chars each. + +let expectedSummaryString + = + '011111111111111101111111111111110111111111111111011111111111' + + '111101111111111111110111111111111111011111111111111101111111' + + '111111110111111111111111011111111111111101111111111111110111' + + '111111111111011111111111111101111111111111110100000000000000' + + '010000000000000001000000000000000100000000000000010000000000' + + '000001000000000000000100000000000000010000000000000001000000' + + '000000000100000000000000010000000000000001000000000000000100' + + '000000000000010000000000000001100000011111111110000011111111' + + '111000011111111111100011111111111110011111111111111011111111' + + '111111111111111000000010000000000000011000000000000011100000' + + '000000011110000000000011111000000000011111100000000011111110' + + '000000011111111100000000000000110000000000000111000000000000' + + '111100000000000111110000000000111111000000000111111100000000' + + '111111110000000111111111000000111111111100000111111111110000' + + '111111111111000111111111111100111111111111110111111111111111' + + '111111100000000011111100000000001111100000000000111100000000' + + '000011100000000000001100000000000000100000000111111111111111' + + '111111101111111111111100111111111111100011111111111100001111' + + '111111100000111111111100000011111111100000001111111111111111' + + '011111111111111001111111111111000111111111111000011111111111' + + '000001111111111000000111111111000000011111111000000001111111' + + '000000000111111000000000011111000000000001111000000000000111' + + '000000000000011000000000000001000000011111111100000011111111' + + '110000011111111111000011111111111100011111111111110011111111' + + '111111011111111000000000000000000000010000000000000011000000' + + '000000011100000000000011110000000000011111000000000011111100' + + '000000011111110000000000000000100000000000000110000000000000' + + '111000000000000111100000000000111110000000000111111000000000' + + '111111100000000111111110000000111111111000000111111111100000' + + '111111111110000111111111111000111111111111100111111111111110' + + '011111100000000001111100000000000111100000000000011100000000' + + '000001100000000000000100000000000000000000000111111101111111' + + '111111100111111111111100011111111111100001111111111100000111' + + '111111100000011111111100000001111111100000000011111111111111' + + '001111111111111000111111111111000011111111111000001111111111' + + '000000111111111000000011111111000000001111111000000000111111' + + '000000000011111000000000001111000000000000111000000000000011' + + '000000000000001000000000000000233333333333333323333333333333' + + '332333333333333333233333333333333323333333333333332333333333' + + '333333233333333333333323333333333333332333333333333333233333' + + '333333333323333333333333332333333333333333233333333333333323' + + '333333333333332322222222222222232222222222222223222222222222' + + '222322222222222222232222222222222223222222222222222322222222' + + '222222232222222222222223222222222222222322222222222222232222' + + '222222222223222222222222222322222222222222232222222222222223' + + '322222233333333332222233333333333222233333333333322233333333' + + '333332233333333333333233333333333333333333333222222232222222' + + '222222233222222222222233322222222222233332222222222233333222' + + '222222233333322222222233333332222222233333333322222222222222' + + '332222222222222333222222222222333322222222222333332222222222' + + '333333222222222333333322222222333333332222222333333333222222' + + '333333333322222333333333332222333333333333222333333333333322' + + '333333333333332333333333333333333333322222222233333322222222' + + '223333322222222222333322222222222233322222222222223322222222' + + '222222322222222333333333333333333333323333333333333322333333' + + '333333322233333333333322223333333333322222333333333322222233' + + '333333322222223333333333333333233333333333333223333333333333' + + '222333333333333222233333333333222223333333333222222333333333' + + '222222233333333222222223333333222222222333333222222222233333' + + '222222222223333222222222222333222222222222233222222222222223' + + '222222233333333322222233333333332222233333333333222233333333' + + '333322233333333333332233333333333333233333333222222222222222' + + '222222232222222222222233222222222222233322222222222233332222' + + '222222233333222222222233333322222222233333332222222222222222' + + '322222222222222332222222222222333222222222222333322222222222' + + '333332222222222333333222222222333333322222222333333332222222' + + '333333333222222333333333322222333333333332222333333333333222' + + '333333333333322333333333333332233333322222222223333322222222' + + '222333322222222222233322222222222223322222222222222322222222' + + '222222222222222333333323333333333333322333333333333322233333' + + '333333322223333333333322222333333333322222233333333322222223' + + '333333322222222233333333333333223333333333333222333333333333' + + '222233333333333222223333333333222222333333333222222233333333' + + '222222223333333222222222333333222222222233333222222222223333' + + '222222222222333222222222222233222222222222223222222222222222' + + '011111111111111101111111111111110111111111111111011111111111' + + '111101111111111111110111111111111111011111111111111101111111' + + '111111110111111111111111011111111111111101111111111111110111' + + '111111111111011111111111111101111111111111110100000000000000' + + '010000000000000001000000000000000100000000000000010000000000' + + '000001000000000000000100000000000000010000000000000001000000' + + '000000000100000000000000010000000000000001000000000000000100' + + '000000000000010000000000000001100000011111111110000011111111' + + '111000011111111111100011111111111110011111111111111011111111' + + '111111111111111000000010000000000000011000000000000011100000' + + '000000011110000000000011111000000000011111100000000011111110' + + '000000011111111100000000000000110000000000000111000000000000' + + '111100000000000111110000000000111111000000000111111100000000' + + '111111110000000111111111000000111111111100000111111111110000' + + '111111111111000111111111111100111111111111110111111111111111' + + '111111100000000011111100000000001111100000000000111100000000' + + '000011100000000000001100000000000000100000000111111111111111' + + '111111101111111111111100111111111111100011111111111100001111' + + '111111100000111111111100000011111111100000001111111111111111' + + '011111111111111001111111111111000111111111111000011111111111' + + '000001111111111000000111111111000000011111111000000001111111' + + '000000000111111000000000011111000000000001111000000000000111' + + '000000000000011000000000000001000000011111111100000011111111' + + '110000011111111111000011111111111100011111111111110011111111' + + '111111011111111000000000000000000000010000000000000011000000' + + '000000011100000000000011110000000000011111000000000011111100' + + '000000011111110000000000000000100000000000000110000000000000' + + '111000000000000111100000000000111110000000000111111000000000' + + '111111100000000111111110000000111111111000000111111111100000' + + '111111111110000111111111111000111111111111100111111111111110' + + '011111100000000001111100000000000111100000000000011100000000' + + '000001100000000000000100000000000000000000000111111101111111' + + '111111100111111111111100011111111111100001111111111100000111' + + '111111100000011111111100000001111111100000000011111111111111' + + '001111111111111000111111111111000011111111111000001111111111' + + '000000111111111000000011111111000000001111111000000000111111' + + '000000000011111000000000001111000000000000111000000000000011' + + '000000000000001000000000000000233333333333333323333333333333' + + '332333333333333333233333333333333323333333333333332333333333' + + '333333233333333333333323333333333333332333333333333333233333' + + '333333333323333333333333332333333333333333233333333333333323' + + '333333333333332322222222222222232222222222222223222222222222' + + '222322222222222222232222222222222223222222222222222322222222' + + '222222232222222222222223222222222222222322222222222222232222' + + '222222222223222222222222222322222222222222232222222222222223' + + '322222233333333332222233333333333222233333333333322233333333' + + '333332233333333333333233333333333333333333333222222232222222' + + '222222233222222222222233322222222222233332222222222233333222' + + '222222233333322222222233333332222222233333333322222222222222' + + '332222222222222333222222222222333322222222222333332222222222' + + '333333222222222333333322222222333333332222222333333333222222' + + '333333333322222333333333332222333333333333222333333333333322' + + '333333333333332333333333333333333333322222222233333322222222' + + '223333322222222222333322222222222233322222222222223322222222' + + '222222322222222333333333333333333333323333333333333322333333' + + '333333322233333333333322223333333333322222333333333322222233' + + '333333322222223333333333333333233333333333333223333333333333' + + '222333333333333222233333333333222223333333333222222333333333' + + '222222233333333222222223333333222222222333333222222222233333' + + '222222222223333222222222222333222222222222233222222222222223' + + '222222233333333322222233333333332222233333333333222233333333' + + '333322233333333333332233333333333333233333333222222222222222' + + '222222232222222222222233222222222222233322222222222233332222' + + '222222233333222222222233333322222222233333332222222222222222' + + '322222222222222332222222222222333222222222222333322222222222' + + '333332222222222333333222222222333333322222222333333332222222' + + '333333333222222333333333322222333333333332222333333333333222' + + '333333333333322333333333333332233333322222222223333322222222' + + '222333322222222222233322222222222223322222222222222322222222' + + '222222222222222333333323333333333333322333333333333322233333' + + '333333322223333333333322222333333333322222233333333322222223' + + '333333322222222233333333333333223333333333333222333333333333' + + '222233333333333222223333333333222222333333333222222233333333' + + '222222223333333222222222333333222222222233333222222222223333' + + '222222222222333222222222222233222222222222223222222222222222'; + +assertEq(expectedSummaryString.length, 9000); // stay sane + +assertEq(actualSummaryString, expectedSummaryString); diff --git a/js/src/jit-test/tests/wasm/compiler-frame-depth.js b/js/src/jit-test/tests/wasm/compiler-frame-depth.js new file mode 100644 index 0000000000..319755c609 --- /dev/null +++ b/js/src/jit-test/tests/wasm/compiler-frame-depth.js @@ -0,0 +1,26 @@ +// Ensures that the postorder allows us to have very deep expression trees. + +var expr = '(local.get 0)'; + +for (var i = 1000; i --> 0; ) { + expr = `(f32.neg ${expr})`; +} + +var code = `(module + (func + (param f32) + (result f32) + ${expr} + ) + (export "run" (func 0)) +)`; + +try { + wasmFullPass(code, Math.fround(13.37), {}, 13.37); +} catch (e) { + // Some configurations, like e.g. ASAN, will fail these tests because its + // stack frames are much bigger than usual ones and the parser will bail + // out during its recursive descent. + // Ignore those errors specifically. + assertEq(e.message.includes('out of memory'), true); +} diff --git a/js/src/jit-test/tests/wasm/const.js b/js/src/jit-test/tests/wasm/const.js new file mode 100644 index 0000000000..4b900398ef --- /dev/null +++ b/js/src/jit-test/tests/wasm/const.js @@ -0,0 +1,254 @@ +function testConst(type, str, expected) { + if (type === 'i64') + wasmFullPassI64(`(module (func $run (result i64) (i64.const ${str})))`, expected); + else + wasmFullPass(`(module (func (result ${type}) (${type}.const ${str})) (export "run" (func 0)))`, expected); +} + +function testConstError(type, str) { + assertErrorMessage(() => wasmEvalText(`(module (func (result ${type}) (${type}.const ${str})) (export "" (func 0)))`).exports[""](), Error, /wasm text error/); +} + +testConst('i32', '0', 0); +testConst('i32', '-0', 0); +testConst('i32', '23', 23); +testConst('i32', '-23', -23); +testConst('i32', '0x23', 35); +testConst('i32', '-0x23', -35); +testConst('i32', '2147483647', 2147483647); +testConst('i32', '4294967295', -1); +testConst('i32', '-2147483648', -2147483648); +testConst('i32', '0x7fffffff', 2147483647); +testConst('i32', '0x80000000', -2147483648); +testConst('i32', '-0x80000000', -2147483648); +testConst('i32', '0xffffffff', -1); + +testConst('i64', '0', 0); +testConst('i64', '-0', 0); + +testConst('i64', '23', 23); +testConst('i64', '-23', -23); + +testConst('i64', '0x23', 35); +testConst('i64', '-0x23', -35); + +testConst('i64', '-0x1', -1); +testConst('i64', '-1', -1); +testConst('i64', '0xffffffffffffffff', -1); + +testConst('i64', '0xdeadc0de', 0xdeadc0de); +testConst('i64', '0x1337c0de00000000', '0x1337c0de00000000'); + +testConst('i64', '0x0102030405060708', '0x0102030405060708'); +testConst('i64', '-0x0102030405060708', '-0x0102030405060708'); + +// INT64_MAX +testConst('i64', '9223372036854775807', '0x7fffffffffffffff'); +testConst('i64', '0x7fffffffffffffff', '0x7fffffffffffffff'); + +// INT64_MAX + 1 +testConst('i64', '9223372036854775808', '0x8000000000000000'); +testConst('i64', '0x8000000000000000', '0x8000000000000000'); + +// UINT64_MAX +testConst('i64', '18446744073709551615', '0xffffffffffffffff'); + +// INT64_MIN +testConst('i64', '-9223372036854775808', '0x8000000000000000'); +testConst('i64', '-0x8000000000000000', '0x8000000000000000'); + +// INT64_MIN - 1 +testConstError('i64', '-9223372036854775809'); + +testConstError('i64', ''); +testConstError('i64', '0.0'); +testConstError('i64', 'not an i64'); + +testConst('f32', '0.0', 0.0); +testConst('f32', '-0', -0.0); +testConst('f32', '-0.0', -0.0); +testConst('f32', '0x0.0', 0.0); +testConst('f32', '-0x0.0', -0.0); +testConst('f32', '-0x0', -0.0); +testConst('f32', '0x0.0p0', 0.0); +testConst('f32', '-0x0.0p0', -0.0); +testConst('f32', 'inf', Infinity); +testConst('f32', '-inf', -Infinity); +testConst('f32', '+inf', Infinity); +testConst('f32', 'nan', NaN); +//testConst('f32', '-nan', NaN); // TODO: NYI +testConst('f32', '+nan', NaN); +//testConst('f32', 'nan:0x789', NaN); // TODO: NYI +//testConst('f32', '-nan:0x789', NaN); // TODO: NYI +//testConst('f32', '+nan:0x789', NaN); // TODO: NYI +testConst('f32', '0x01p-149', 1.401298464324817e-45); +testConst('f32', '0x1p-149', 1.401298464324817e-45); +testConst('f32', '0x1p-150', 0); +testConst('f32', '0x2p-150', 1.401298464324817e-45); +testConst('f32', '0x1.2p-149', 1.401298464324817e-45); +testConst('f32', '0x2.0p-149', 2.802596928649634e-45); +testConst('f32', '0x2.2p-149', 2.802596928649634e-45); +testConst('f32', '0x01p-148', 2.802596928649634e-45); +testConst('f32', '0x0.1p-148', 0); +testConst('f32', '0x0.1p-145', 1.401298464324817e-45); +testConst('f32', '0x1p-148', 2.802596928649634e-45); +testConst('f32', '0x1.111p-148', 2.802596928649634e-45); +testConst('f32', '0x1.2p-148', 2.802596928649634e-45); +testConst('f32', '0x2.0p-148', 5.605193857299268e-45); +testConst('f32', '0x2.2p-148', 5.605193857299268e-45); +testConst('f32', '0x1p-147', 5.605193857299268e-45); +testConst('f32', '0x1p-126', 1.1754943508222875e-38); +testConst('f32', '0x0.1fffffep+131', 3.4028234663852886e+38); +testConst('f32', '0x1.fffffep+127', 3.4028234663852886e+38); +testConstError('f32', '0x2.0p+127'); +testConstError('f32', '0x1.fffffep+128'); +testConst('f32', '0x0.1fffffep+128', 4.2535293329816107e+37); +testConst('f32', '0x1p2', 4); +testConst('f32', '0x10p2', 64); +testConst('f32', '0x100p2', 1024); +testConst('f32', '0x2p2', 8); +testConst('f32', '0x4p2', 16); +testConst('f32', '0x1p3', 8); +testConst('f32', '0x1p4', 16); +testConst('f32', '-0x1p+3', -8); +testConst('f32', '0x3p-2', .75); +testConst('f32', '-0x76.54p-32', -2.7550413506105542e-8); +testConst('f32', '0xf.ffffffffffffffffp+123', 170141183460469231731687303715884105728); +testConstError('f32', '0xf.ffffffffffffffffp+124'); +testConst('f32', '1.1754943508222875e-38', 1.1754943508222875e-38); +testConst('f32', '3.4028234663852886e+38', 3.4028234663852886e+38); +testConst('f32', '1.1754943508222875e-35', 1.1754943508222875e-35); +testConst('f32', '3.4028234663852886e+35', 3.4028234346940236e+35); +testConst('f32', '1.1754943508222875e-30', 1.1754943508222875e-30); +testConst('f32', '3.4028234663852886e+30', 3.4028233462973677e+30); +testConst('f32', '4.0', 4); +testConst('f32', '-8.', -8); +testConst('f32', '-2.7550413506105542e-8', -2.7550413506105542e-8); +testConst('f32', '2.138260e+05', 2.138260e+05); +testConst('f32', '3.891074380317903e-33', 3.891074380317903e-33); +testConst('f32', '-9465807272673280.0', -9465807272673280); +testConst('f32', '1076.1376953125', 1076.1376953125); +testConst('f32', '-13364.1376953125', -13364.1376953125); +testConst('f32', '4.133607864379883', 4.133607864379883); +testConst('f32', '2.0791168212890625', 2.0791168212890625); +testConst('f32', '0.000002414453774690628', 0.000002414453774690628); +testConst('f32', '0.5312881469726562', 0.5312881469726562); +testConst('f32', '5.570960e+05', 5.570960e+05); +testConst('f32', '5.066758603788912e-7', 5.066758603788912e-7); +testConst('f32', '-5.066758603788912e-7', -5.066758603788912e-7); +testConst('f32', '1.875000e-01', 1.875000e-01); +testConst('f32', '-0x1.b021fb98e9a17p-104', -8.322574059965897e-32); +testConst('f32', '0x1.08de5bf3f784cp-129', 1.5202715065429227e-39); +testConstError('f32', '0x1.d50b969fbbfb3p+388'); +testConst('f32', '0x3434.2p4', 2.138260e+05); +testConst('f32', '0x1434.2p-120', 3.891074380317903e-33); +testConst('f32', '-0x0434.234p43', -9465807272673280); +testConst('f32', '0x0434.234p0', 1076.1376953125); +testConst('f32', '-0x3434.234p0', -13364.1376953125); +testConst('f32', '0x4.22342p0', 4.133607864379883); +testConst('f32', '0x30000p-20', 1.875000e-01); +testConst('f32', '0x0.533fcccp-125', 7.645233588931088e-39); +testConst('f32', '0', 0); + +testConst('f64', '0.0', 0.0); +testConst('f64', '-0.0', -0.0); +testConst('f64', '-0', -0.0); +testConst('f64', '0x0.0', 0.0); +testConst('f64', '-0x0.0', -0.0); +testConst('f64', '-0x0', -0.0); +testConst('f64', '0x0.0p0', 0.0); +testConst('f64', '-0x0.0p0', -0.0); +testConst('f64', 'inf', Infinity); +testConst('f64', '-inf', -Infinity); +testConst('f64', '+inf', Infinity); +testConst('f64', 'nan', NaN); +//testConst('f64', '-nan', NaN); // TODO: NYI +testConst('f64', '+nan', NaN); +//testConst('f64', 'nan:0x789', NaN); // TODO: NYI +//testConst('f64', '-nan:0x789', NaN); // TODO: NYI +//testConst('f64', '+nan:0x789', NaN); // TODO: NYI +testConst('f64', '0x01p-149', 1.401298464324817e-45); +testConst('f64', '0x1p-149', 1.401298464324817e-45); +testConst('f64', '0x1p-150', 7.006492321624085e-46); +testConst('f64', '0x2p-150', 1.401298464324817e-45); +testConst('f64', '0x1.2p-149', 1.5764607723654192e-45); +testConst('f64', '0x2.0p-149', 2.802596928649634e-45); +testConst('f64', '0x2.2p-149', 2.977759236690236e-45); +testConst('f64', '0x01p-148', 2.802596928649634e-45); +testConst('f64', '0x0.1p-148', 1.7516230804060213e-46); +testConst('f64', '0x0.1p-145', 1.401298464324817e-45); +testConst('f64', '0x1p-148', 2.802596928649634e-45); +testConst('f64', '0x1.111p-148', 2.9893911087085575e-45); +testConst('f64', '0x1.2p-148', 3.1529215447308384e-45); +testConst('f64', '0x2.0p-148', 5.605193857299268e-45); +testConst('f64', '0x2.2p-148', 5.955518473380473e-45); +testConst('f64', '0x1p-147', 5.605193857299268e-45); +testConst('f64', '0x1p-126', 1.1754943508222875e-38); +testConst('f64', '0x0.1fffffep+131', 3.4028234663852886e+38); +testConst('f64', '0x1.fffffep+127', 3.4028234663852886e+38); +testConst('f64', '0x2.0p+127', 3.402823669209385e+38); +testConst('f64', '0x1.fffffep+128', 6.805646932770577e+38); +testConst('f64', '0x0.1fffffep+128', 4.2535293329816107e+37); +testConst('f64', '0x1p2', 4); +testConst('f64', '0x10p2', 64); +testConst('f64', '0x100p2', 1024); +testConst('f64', '0x2p2', 8); +testConst('f64', '0x4p2', 16); +testConst('f64', '0x1p3', 8); +testConst('f64', '0x1p4', 16); +testConst('f64', '-0x1p+3', -8); +testConst('f64', '0x3p-2', .75); +testConst('f64', '-0x76.54p-32', -2.7550413506105542e-8); +testConst('f64', '1.1754943508222875e-38', 1.1754943508222875e-38); +testConst('f64', '3.4028234663852886e+38', 3.4028234663852886e+38); +testConst('f64', '1.1754943508222875e-35', 1.1754943508222875e-35); +testConst('f64', '3.4028234663852886e+35', 3.4028234663852886e+35); +testConst('f64', '1.1754943508222875e-30', 1.1754943508222875e-30); +testConst('f64', '3.4028234663852886e+30', 3.402823466385289e+30); +testConst('f64', '4.0', 4); +testConst('f64', '-8.', -8); +testConst('f64', '-2.7550413506105542e-8', -2.7550413506105542e-8); +testConst('f64', '2.138260e+05', 2.138260e+05); +testConst('f64', '3.891074380317903e-33', 3.891074380317903e-33); +testConst('f64', '-9465807272673280.0', -9465807272673280); +testConst('f64', '1076.1376953125', 1076.1376953125); +testConst('f64', '-13364.1376953125', -13364.1376953125); +testConst('f64', '4.133607864379883', 4.133607864379883); +testConst('f64', '2.0791168212890625', 2.0791168212890625); +testConst('f64', '0.000002414453774690628', 0.000002414453774690628); +testConst('f64', '0.5312881469726562', 0.5312881469726562); +testConst('f64', '5.570960e+05', 5.570960e+05); +testConst('f64', '5.066758603788912e-7', 5.066758603788912e-7); +testConst('f64', '-5.066758603788912e-7', -5.066758603788912e-7); +testConst('f64', '1.875000e-01', 1.875000e-01); +testConst('f64', '0x3434.2p4', 2.138260e+05); +testConst('f64', '0x1434.2p-120', 3.891074380317903e-33); +testConst('f64', '-0x0434.234p43', -9465807272673280); +testConst('f64', '0x0434.234p0', 1076.1376953125); +testConst('f64', '-0x3434.234p0', -13364.1376953125); +testConst('f64', '0x4.22342p0', 4.133607864379883); +testConst('f64', '0x4.2882000p-1', 2.0791168212890625); +testConst('f64', '0x30000p-20', 1.875000e-01); +testConst('f64', '0x2f05.000bef2113p-1036', 1.634717678224908e-308); +testConst('f64', '0x24c6.004d0deaa3p-1036', 1.2784941357502007e-308); +testConst('f64', '0', 0); + +testConstError('i32', ''); +testConstError('i32', '0.0'); +testConstError('i32', 'not an i32'); +testConstError('i32', '4294967296'); +testConstError('i32', '-2147483649'); + +testConstError('f32', ''); +testConstError('f32', 'not an f32'); +testConstError('f32', 'nan:'); +testConstError('f32', 'nan:0'); +testConstError('f32', 'nan:0x'); +testConstError('f32', 'nan:0x0'); + +testConstError('f64', ''); +testConstError('f64', 'not an f64'); +testConstError('f64', 'nan:'); +testConstError('f64', 'nan:0'); +testConstError('f64', 'nan:0x'); +testConstError('f64', 'nan:0x0'); diff --git a/js/src/jit-test/tests/wasm/control-flow-phi-inputs.js b/js/src/jit-test/tests/wasm/control-flow-phi-inputs.js new file mode 100644 index 0000000000..4e3fb23286 --- /dev/null +++ b/js/src/jit-test/tests/wasm/control-flow-phi-inputs.js @@ -0,0 +1,80 @@ +// Test the triangle pattern where the phi-input doesn't match the initial input. +// +// initialBlock +// / \ +// trueBranch | +// \ / +// phiBlock+falseBranch +// | +// testBlock +// +// Also see bug 1768346. + +var f = wasmEvalText(`(module + (func (result i32) + block (result i32) + i32.const 0 ;; This must flow into the if below. + i32.const 1 + br_if 0 + drop + i32.const 1 + end + if + i32.const 100 + return + end + i32.const 200 + ) + (export "" (func 0)) +)`).exports[""]; + +assertEq(f(), 200); + +var g = wasmEvalText(`(module + (func (result i32) + block (result i32) + i32.const 0 ;; This must flow into the if below. + i32.const 1 + br_if 0 + drop + i32.const 1 ;; This must flow into the if below + i32.const 1 + br_if 0 + drop + i32.const 1 + end + if + i32.const 100 + return + end + i32.const 200 + ) + (export "" (func 0)) +)`).exports[""]; + +assertEq(g(), 200); + +var h = wasmEvalText(`(module + (func (param i32) (result i32) + block (result i32) + local.get 0 ;; This must flow into the if below. + local.get 0 + br_if 0 + drop + i32.const 0 ;; This must flow into the if below + i32.const 1 + br_if 0 + drop + i32.const 1 + end + if + i32.const 100 + return + end + i32.const 200 + ) + (export "" (func 0)) +)`).exports[""]; + +assertEq(h(0), 200); +assertEq(h(1), 100); diff --git a/js/src/jit-test/tests/wasm/control-flow.js b/js/src/jit-test/tests/wasm/control-flow.js new file mode 100644 index 0000000000..29ccd0d6c4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/control-flow.js @@ -0,0 +1,680 @@ +const RuntimeError = WebAssembly.RuntimeError; + +// ---------------------------------------------------------------------------- +// if + +// Condition is an int32 +wasmFailValidateText('(module (func (local f32) (if (local.get 0) (then (i32.const 1)))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (local f32) (if (local.get 0) (then (i32.const 1)) (else (i32.const 0)))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (local f64) (if (local.get 0) (then (i32.const 1)) (else (i32.const 0)))))', mismatchError("f64", "i32")); +wasmEvalText('(module (func (local i32) (if (local.get 0) (then (nop)))) (export "" (func 0)))'); +wasmEvalText('(module (func (local i32) (if (local.get 0) (then (nop)) (else (nop)))) (export "" (func 0)))'); + +// Expression values types are consistent +// Also test that we support (result t) for `if` +wasmFailValidateText('(module (func (result i32) (local f32) (if (result f32) (i32.const 42) (then (local.get 0)) (else (i32.const 0)))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (result i32) (local f64) (if (result i32) (i32.const 42) (then (i32.const 0)) (else (local.get 0)))))', mismatchError("f64", "i32")); +wasmFailValidateText('(module (func (result i64) (if (result i64) (i32.const 0) (then (i32.const 1)) (else (i32.const 2)))))', mismatchError("i32", "i64")); +assertEq(wasmEvalText('(module (func (result i32) (if (result i32) (i32.const 42) (then (i32.const 1)) (else (i32.const 2)))) (export "" (func 0)))').exports[""](), 1); +assertEq(wasmEvalText('(module (func (result i32) (if (result i32) (i32.const 0) (then (i32.const 1)) (else (i32.const 2)))) (export "" (func 0)))').exports[""](), 2); + +// Even if we don't yield, sub expressions types still have to match. +wasmFailValidateText('(module (func (param f32) (if (result i32) (i32.const 42) (then (i32.const 1)) (else (local.get 0)))) (export "" (func 0)))', mismatchError('f32', 'i32')); +wasmFailValidateText('(module (func (if (result i32) (i32.const 42) (then (i32.const 1)) (else (i32.const 0)))) (export "" (func 0)))', /(unused values not explicitly dropped by end of block)|(values remaining on stack at end of block)/); +wasmFullPass('(module (func (drop (if (result i32) (i32.const 42) (then (i32.const 1)) (else (i32.const 0))))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (param f32) (if (i32.const 42) (then (drop (i32.const 1))) (else (drop (local.get 0))))) (export "run" (func 0)))', undefined, {}, 13.37); + +// Sub-expression values are returned +// Also test that we support (result t) for `block` +wasmFullPass(`(module + (func + (result i32) + (if (result i32) + (i32.const 42) + (then + (block (result i32) + (if (result i32) + (block (result i32) + (drop (i32.const 3)) + (drop (i32.const 5)) + (i32.const 0) + ) + (then (i32.const 1)) + (else (i32.const 2)) + ) + ) + ) + (else (i32.const 0)) + ) + ) + (export "run" (func 0)) +)`, 2); + +// The if (resp. else) branch is taken iff the condition is true (resp. false) +counter = 0; +var imports = { "":{inc() { counter++ }} }; +wasmFullPass(`(module + (import "" "inc" (func (result i32))) + (func + (result i32) + (if (result i32) + (i32.const 42) + (then (i32.const 1)) + (else (call 0)) + ) + ) + (export "run" (func 1)) +)`, 1, imports); +assertEq(counter, 0); + +wasmFullPass(`(module + (import "" "inc" (func (result i32))) + (func + (result i32) + (if (result i32) + (i32.const 0) + (then (call 0)) + (else (i32.const 1)) + ) + ) + (export "run" (func 1)) +)`, 1, imports); +assertEq(counter, 0); + +wasmFullPass(`(module + (import "" "inc" (func (result i32))) + (func + (if + (i32.const 0) + (then (drop (call 0))) + ) + ) + (export "run" (func 1)) +)`, undefined, imports); +assertEq(counter, 0); + +assertEq(wasmEvalText(`(module + (import "" "inc" (func (result i32))) + (func + (if + (i32.const 1) + (then (drop (call 0))) + ) + ) + (export "" (func 1)) +)`, imports).exports[""](), undefined); +assertEq(counter, 1); + +wasmFullPass(`(module + (func + (result i32) + (if (result i32) + (i32.const 0) + (then (br 0 (i32.const 0))) + (else (br 0 (i32.const 1))) + ) + ) + (export "run" (func 0)) +)`, 1); +assertEq(counter, 1); + +wasmFullPass(`(module + (func + (if + (i32.const 1) + (then (br 0)) + ) + ) + (export "run" (func 0)) +)`, undefined); +assertEq(counter, 1); + +// One can chain if with if/if +counter = 0; +wasmFullPass(`(module + (import "" "inc" (func (result i32))) + (func + (result i32) + (if (result i32) + (i32.const 1) + (then + (if (result i32) + (i32.const 2) + (then + (if (result i32) + (i32.const 3) + (then + (if (result i32) + (i32.const 0) + (then (call 0)) + (else (i32.const 42)) + ) + ) + (else (call 0)) + ) + ) + (else (call 0)) + ) + ) + (else (call 0)) + ) + ) + (export "run" (func 1)) +)`, 42, imports); +assertEq(counter, 0); + +// "if" doesn't return an expression value +wasmFailValidateText('(module (func (result i32) (if (result i32) (i32.const 42) (then (i32.const 0)))))', /(if without else with a result value)|(type mismatch: expected i32 but nothing on stack)/); +wasmFailValidateText('(module (func (result i32) (if (result i32) (i32.const 42) (then (drop (i32.const 0))))))', emptyStackError); +wasmFailValidateText('(module (func (result i32) (if (result i32) (i32.const 1) (then (i32.const 0)) (else (if (result i32) (i32.const 1) (then (i32.const 1)))))))', /(if without else with a result value)|(type mismatch: expected i32 but nothing on stack)/); +wasmFailValidateText('(module (func (result i32) (if (result i32) (i32.const 1) (then (drop (i32.const 0))) (else (if (i32.const 1) (then (drop (i32.const 1))))))))', emptyStackError); +wasmFailValidateText('(module (func (if (result i32) (i32.const 1) (then (i32.const 0)) (else (if (result i32) (i32.const 1) (then (i32.const 1)))))))', /(if without else with a result value)|(type mismatch: expected i32 but nothing on stack)/); +wasmFailValidateText('(module (func (if (result i32) (i32.const 1) (then (i32.const 0)) (else (if (i32.const 1) (then (drop (i32.const 1))))))))', emptyStackError); +wasmFailValidateText('(module (func (if (i32.const 1) (then (drop (i32.const 0))) (else (if (result i32) (i32.const 1) (then (i32.const 1)))))))', /(if without else with a result value)|(type mismatch: expected i32 but nothing on stack)/); +wasmEvalText('(module (func (if (i32.const 1) (then (drop (i32.const 0))) (else (if (i32.const 1) (then (drop (i32.const 1))))))))'); + +// ---------------------------------------------------------------------------- +// return + +wasmFullPass('(module (func (return)) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (result i32) (return (i32.const 1))) (export "run" (func 0)))', 1); +wasmFailValidateText('(module (func (if (return) (then (i32.const 0)))) (export "run" (func 0)))', unusedValuesError); +wasmFailValidateText('(module (func (result i32) (return)) (export "" (func 0)))', emptyStackError); +wasmFullPass('(module (func (return (i32.const 1))) (export "run" (func 0)))', undefined); +wasmFailValidateText('(module (func (result f32) (return (i32.const 1))) (export "" (func 0)))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (result i32) (return)) (export "" (func 0)))', emptyStackError); + +// ---------------------------------------------------------------------------- +// br / br_if + +wasmFailValidateText('(module (func (result i32) (block (br 0))) (export "" (func 0)))', emptyStackError); +wasmFailValidateText('(module (func (result i32) (br 0)) (export "" (func 0)))', emptyStackError); +wasmFailValidateText('(module (func (result i32) (block (br_if 0 (i32.const 0)))) (export "" (func 0)))', emptyStackError); + +const DEPTH_OUT_OF_BOUNDS = /(branch depth exceeds current nesting level)|(branch depth too large)/; + +wasmFailValidateText('(module (func (br 1)))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (block (br 2))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (loop (br 2))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (if (i32.const 0) (then (br 2)))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (if (i32.const 0) (then (br 1)) (else (br 2)))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (if (i32.const 0) (then (br 2)) (else (br 1)))))', DEPTH_OUT_OF_BOUNDS); + +wasmFailValidateText('(module (func (br_if 1 (i32.const 0))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (block (br_if 2 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (loop (br_if 2 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS); + +wasmFailValidateText(`(module (func (result i32) + block + br 0 + if + i32.const 0 + i32.const 2 + end + end +) (export "" (func 0)))`, unusedValuesError); + +wasmFullPass(`(module (func (block $out (br_if $out (br 0)))) (export "run" (func 0)))`, undefined); + +wasmFullPass('(module (func (br 0)) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (block (br 0))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (block $l (br $l))) (export "run" (func 0)))', undefined); + +wasmFullPass('(module (func (block (block (br 1)))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (block $l (block (br $l)))) (export "run" (func 0)))', undefined); + +wasmFullPass('(module (func (block $l (block $m (br $l)))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (block $l (block $m (br $m)))) (export "run" (func 0)))', undefined); + +wasmFullPass(`(module (func (result i32) + (block + (br 0) + (return (i32.const 0)) + ) + (return (i32.const 1)) +) (export "run" (func 0)))`, 1); + +wasmFullPass(`(module (func (result i32) + (block + (block + (br 0) + (return (i32.const 0)) + ) + (return (i32.const 1)) + ) + (return (i32.const 2)) +) (export "run" (func 0)))`, 1); + +wasmFullPass(`(module (func (result i32) + (block $outer + (block $inner + (br $inner) + (return (i32.const 0)) + ) + (return (i32.const 1)) + ) + (return (i32.const 2)) +) (export "run" (func 0)))`, 1); + +var notcalled = false; +var called = false; +var imports = {"": { + notcalled() {notcalled = true}, + called() {called = true} +}}; +wasmFullPass(`(module +(import "" "notcalled" (func)) +(import "" "called" (func)) +(func + (block + (return (br 0)) + (call 0) + ) + (call 1) +) (export "run" (func 2)))`, undefined, imports); +assertEq(notcalled, false); +assertEq(called, true); + +wasmFullPass(`(module (func + (block + (i32.add + (i32.const 0) + (return (br 0)) + ) + drop + ) + (return) +) (export "run" (func 0)))`, undefined); + +wasmFullPass(`(module (func (result i32) + (block + (if + (i32.const 1) + (then (br 0)) + (else (return (i32.const 0))) + ) + ) + (return (i32.const 1)) +) (export "run" (func 0)))`, 1); + +wasmFullPass('(module (func (br_if 0 (i32.const 1))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (br_if 0 (i32.const 0))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (block (br_if 0 (i32.const 1)))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (block (br_if 0 (i32.const 0)))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (block $l (br_if $l (i32.const 1)))) (export "run" (func 0)))', undefined); + +var isNonZero = wasmEvalText(`(module (func (param i32) (result i32) + (block + (br_if 0 (local.get 0)) + (return (i32.const 0)) + ) + (return (i32.const 1)) +) (export "" (func 0)))`).exports[""]; + +assertEq(isNonZero(0), 0); +assertEq(isNonZero(1), 1); +assertEq(isNonZero(-1), 1); + +// branches with values +// br/br_if and block +wasmFailValidateText('(module (func (result i32) (br 0)))', emptyStackError); +wasmFailValidateText('(module (func (result i32) (br 0 (f32.const 42))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (result i32) (block (br 0))))', emptyStackError); +wasmFailValidateText('(module (func (result i32) (block (result f32) (br 0 (f32.const 42)))))', mismatchError("f32", "i32")); + +wasmFailValidateText(`(module (func (param i32) (result i32) (block (if (result i32) (local.get 0) (then (br 0 (i32.const 42)))))) (export "" (func 0)))`, /(if without else with a result value)|(type mismatch: expected i32 but nothing on stack)/); +wasmFailValidateText(`(module (func (param i32) (result i32) (block (result i32) (if (local.get 0) (then (drop (i32.const 42)))) (else (br 0 (f32.const 42))))) (export "" (func 0)))`, mismatchError("f32", "i32")); + +wasmFullPass('(module (func (result i32) (br 0 (i32.const 42)) (i32.const 13)) (export "run" (func 0)))', 42); +wasmFullPass('(module (func (result i32) (block (result i32) (br 0 (i32.const 42)) (i32.const 13))) (export "run" (func 0)))', 42); + +wasmFailValidateText('(module (func) (func (block (result i32) (br 0 (call 0)) (i32.const 13))) (export "" (func 0)))', emptyStackError); +wasmFailValidateText('(module (func) (func (block (result i32) (br_if 0 (call 0) (i32.const 1)) (i32.const 13))) (export "" (func 0)))', emptyStackError); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (block (result i32) (if (local.get 0) (then (drop (i32.const 42)))) (i32.const 43))) (export "" (func 0)))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 43); + +wasmFailValidateText(`(module (func (param i32) (result i32) (block (result i32) (if (result i32) (local.get 0) (then (br 0 (i32.const 42)))) (i32.const 43))) (export "" (func 0)))`, /(if without else with a result value)|(type mismatch: expected i32 but nothing on stack)/); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (block (result i32) (if (local.get 0) (then (br 1 (i32.const 42)))) (i32.const 43))) (export "" (func 0)))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 42); + +wasmFailValidateText(`(module (func (param i32) (result i32) (block (br_if 0 (i32.const 42) (local.get 0)) (i32.const 43))) (export "" (func 0)))`, /(unused values not explicitly dropped by end of block)|(values remaining on stack at end of block)/); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (block (result i32) (drop (br_if 0 (i32.const 42) (local.get 0))) (i32.const 43))) (export "" (func 0)))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 42); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (block (result i32) (if (local.get 0) (then (drop (i32.const 42)))) (br 0 (i32.const 43)))) (export "" (func 0)))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 43); + +wasmFailValidateText(`(module (func (param i32) (result i32) (block (result i32) (if (result i32) (local.get 0) (then (br 0 (i32.const 42)))) (br 0 (i32.const 43)))) (export "" (func 0)))`, /(if without else with a result value)|(type mismatch: expected i32 but nothing on stack)/); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (if (local.get 0) (then (br 1 (i32.const 42)))) (br 0 (i32.const 43))) (export "" (func 0)))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 42); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (block (result i32) (if (local.get 0) (then (br 1 (i32.const 42)))) (br 0 (i32.const 43)))) (export "" (func 0)))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 42); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (br_if 0 (i32.const 42) (local.get 0)) (br 0 (i32.const 43))) (export "" (func 0)))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 42); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (block (result i32) (br_if 0 (i32.const 42) (local.get 0)) (br 0 (i32.const 43)))) (export "" (func 0)))`).exports[""]; +assertEq(f(0), 43); +assertEq(f(1), 42); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block (result i32) (if (local.get 0) (then (drop (i32.const 99)))) (i32.const -1)))) (export "" (func 0)))`).exports[""]; +assertEq(f(0), 0); +assertEq(f(1), 0); + +wasmFailValidateText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block (result i32) (if (result i32) (local.get 0) (then (br 0 (i32.const 99)))) (i32.const -1)))) (export "" (func 0)))`, /(if without else with a result value)|(type mismatch: expected i32 but nothing on stack)/); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block (result i32) (if (local.get 0) (then (br 1 (i32.const 99)))) (i32.const -1)))) (export "" (func 0)))`).exports[""]; +assertEq(f(0), 0); +assertEq(f(1), 100); + +wasmFailValidateText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block (br_if 0 (i32.const 99) (local.get 0)) (i32.const -1)))) (export "" (func 0)))`, /(unused values not explicitly dropped by end of block)|(values remaining on stack at end of block)/); + +var f = wasmEvalText(`(module (func (param i32) (result i32) (i32.add (i32.const 1) (block (result i32) (drop (br_if 0 (i32.const 99) (local.get 0))) (i32.const -1)))) (export "" (func 0)))`).exports[""]; +assertEq(f(0), 0); +assertEq(f(1), 100); + +wasmFullPass(`(module (func (result i32) (block (result i32) (br 0 (return (i32.const 42))) (i32.const 0))) (export "run" (func 0)))`, 42); +wasmFullPass(`(module (func (result i32) (block (result i32) (return (br 0 (i32.const 42))))) (export "run" (func 0)))`, 42); +wasmFullPass(`(module (func (result i32) (block (result i32) (return (br 0 (i32.const 42))) (i32.const 0))) (export "run" (func 0)))`, 42); + +wasmFullPass(`(module (func (result f32) (drop (block (result i32) (br 0 (i32.const 0)))) (block (result f32) (br 0 (f32.const 42)))) (export "run" (func 0)))`, 42); + +var called = 0; +var imports = { + sideEffects: { + ifTrue(x) {assertEq(x, 13); called++;}, + ifFalse(x) {assertEq(x, 37); called--;} + } +} +var f = wasmEvalText(`(module + (import "sideEffects" "ifTrue" (func (param i32))) + (import "sideEffects" "ifFalse" (func (param i32))) + (func + (param i32) (result i32) + (block $outer + (if + (local.get 0) + (then (block (call 0 (i32.const 13)) (br $outer))) + ) + (if + (i32.eqz (local.get 0)) + (then (block (call 1 (i32.const 37)) (br $outer))) + ) + ) + (i32.const 42) + ) +(export "" (func 2)))`, imports).exports[""]; +assertEq(f(0), 42); +assertEq(called, -1); +assertEq(f(1), 42); +assertEq(called, 0); + +// br/br_if and loop +wasmFullPass(`(module (func (param i32) (result i32) (block $out (result i32) (loop $in (result i32) (br $out (local.get 0))))) (export "run" (func 0)))`, 1, {}, 1); +wasmFullPass(`(module (func (param i32) (result i32) (loop $in (result i32) (br 1 (local.get 0)))) (export "run" (func 0)))`, 1, {}, 1); +wasmFullPass(`(module (func (param i32) (result i32) (block $out (result i32) (loop $in (result i32) (br $out (local.get 0))))) (export "run" (func 0)))`, 1, {}, 1); + +wasmFailValidateText(`(module (func (param i32) (result i32) + (block $out + (loop $in + (if (local.get 0) (then (br $in (i32.const 1)))) + (if (local.get 0) (then (br $in (f32.const 2)))) + (if (local.get 0) (then (br $in (f64.const 3)))) + (if (local.get 0) (then (br $in))) + (i32.const 7) + ) + ) +) (export "" (func 0)))`, /(unused values not explicitly dropped by end of block)|(values remaining on stack at end of block)/); + +wasmFullPass(`(module + (func + (result i32) + (local i32) + (block $out (result i32) + (loop $in (result i32) + (local.set 0 (i32.add (local.get 0) (i32.const 1))) + (if + (i32.ge_s (local.get 0) (i32.const 7)) + (then (br $out (local.get 0))) + ) + (br $in) + ) + ) + ) +(export "run" (func 0)))`, 7); + +wasmFullPass(`(module + (func + (result i32) + (local i32) + (block $out (result i32) + (loop $in (result i32) + (local.set 0 (i32.add (local.get 0) (i32.const 1))) + (br_if $out (local.get 0) (i32.ge_s (local.get 0) (i32.const 7))) + (br $in) + ) + ) + ) +(export "run" (func 0)))`, 7); + +// ---------------------------------------------------------------------------- +// loop + +wasmFailValidateText('(module (func (loop (br 2))))', DEPTH_OUT_OF_BOUNDS); + +wasmFailValidateText('(module (func (result i32) (drop (loop (i32.const 2))) (i32.const 1)) (export "" (func 0)))', /(unused values not explicitly dropped by end of block)|(values remaining on stack at end of block)/); +wasmFullPass('(module (func (loop)) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (result i32) (loop (drop (i32.const 2))) (i32.const 1)) (export "run" (func 0)))', 1); + +wasmFullPass('(module (func (loop (br 1))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (loop $a (br 1))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (loop $a (br_if $a (i32.const 0)))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (block $a (loop $b (br $a)))) (export "run" (func 0)))', undefined); +wasmFullPass('(module (func (result i32) (loop (result i32) (i32.const 1))) (export "run" (func 0)))', 1); + +wasmFullPass(`(module (func (result i32) (local i32) + (block + $break + (loop + $continue + (if + (i32.gt_u (local.get 0) (i32.const 5)) + (then (br $break)) + ) + (local.set 0 (i32.add (local.get 0) (i32.const 1))) + (br $continue) + ) + ) + (return (local.get 0)) +) (export "run" (func 0)))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (block + $break + (loop + $continue + (br_if + $break + (i32.gt_u (local.get 0) (i32.const 5)) + ) + (local.set 0 (i32.add (local.get 0) (i32.const 1))) + (br $continue) + ) + ) + (return (local.get 0)) +) (export "run" (func 0)))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (block + $break + (loop + $continue + (local.set 0 (i32.add (local.get 0) (i32.const 1))) + (br_if + $continue + (i32.le_u (local.get 0) (i32.const 5)) + ) + ) + ) + (return (local.get 0)) +) (export "run" (func 0)))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (block + $break + (loop + $continue + (br_if + $break + (i32.gt_u (local.get 0) (i32.const 5)) + ) + (local.set 0 (i32.add (local.get 0) (i32.const 1))) + (loop + (br $continue) + ) + (return (i32.const 42)) + ) + ) + (return (local.get 0)) +) (export "run" (func 0)))`, 6); + +wasmFullPass(`(module (func (result i32) (local i32) + (block + $break + (loop + $continue + (local.set 0 (i32.add (local.get 0) (i32.const 1))) + (loop + (br_if + $continue + (i32.le_u (local.get 0) (i32.const 5)) + ) + ) + (br $break) + ) + ) + (return (local.get 0)) +) (export "run" (func 0)))`, 6); + +// ---------------------------------------------------------------------------- +// br_table + +wasmFailValidateText('(module (func (br_table 1 (i32.const 0))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (br_table 1 0 (i32.const 0))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (br_table 0 1 (i32.const 0))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (block (br_table 2 0 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (block (br_table 0 2 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (block (br_table 0 (f32.const 0)))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (loop (br_table 2 0 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (loop (br_table 0 2 (i32.const 0)))))', DEPTH_OUT_OF_BOUNDS); +wasmFailValidateText('(module (func (loop (br_table 0 (f32.const 0)))))', mismatchError("f32", "i32")); + +wasmFullPass(`(module (func (param i32) (result i32) + (block $default + (br_table $default (local.get 0)) + (return (i32.const 0)) + ) + (return (i32.const 1)) +) (export "run" (func 0)))`, 1); + +wasmFullPass(`(module (func (param i32) (result i32) + (block $default + (br_table $default (return (i32.const 1))) + (return (i32.const 0)) + ) + (return (i32.const 2)) +) (export "run" (func 0)))`, 1); + +wasmFullPass(`(module (func (param i32) (result i32) + (block $outer + (block $inner + (br_table $inner (local.get 0)) + (return (i32.const 0)) + ) + (return (i32.const 1)) + ) + (return (i32.const 2)) +) (export "run" (func 0)))`, 1); + +var f = wasmEvalText(`(module (func (param i32) (result i32) + (block $0 + (block $1 + (block $2 + (block $default + (br_table $0 $1 $2 $default (local.get 0)) + ) + (return (i32.const -1)) + ) + (return (i32.const 2)) + ) + ) + (return (i32.const 0)) +) (export "" (func 0)))`).exports[""]; + +assertEq(f(-2), -1); +assertEq(f(-1), -1); +assertEq(f(0), 0); +assertEq(f(1), 0); +assertEq(f(2), 2); +assertEq(f(3), -1); + +// br_table with values +wasmFailValidateText('(module (func (result i32) (block (result i32) (br_table 0 (i32.const 0)))))', emptyStackError); +wasmFailValidateText('(module (func (result i32) (block (result i32) (br_table 0 (f32.const 0) (i32.const 0)))))', mismatchError("f32", "i32")); + +wasmFailValidateText(`(module + (func + (result i32) + (block $outer (result f32) + (block $inner (result f32) + (br_table $outer $inner (f32.const 13.37) (i32.const 1)) + ) + (br $outer (i32.const 42)) + ) + ) +(export "" (func 0)))`, mismatchError("i32", "f32")); + +wasmFullPass(`(module (func (result i32) (block $default (result i32) (br_table $default (i32.const 42) (i32.const 1)))) (export "run" (func 0)))`, 42); + +var f = wasmEvalText(`(module (func (param i32) (result i32) + (i32.add + (block $1 (result i32) + (drop (block $0 (result i32) + (drop (block $default (result i32) + (br_table $0 $1 $default (local.get 0) (local.get 0)) + )) + (local.tee 0 (i32.mul (i32.const 2) (local.get 0))) + )) + (local.tee 0 (i32.add (i32.const 4) (local.get 0))) + ) + (i32.const 1) + ) + ) (export "" (func 0)))`).exports[""]; + +assertEq(f(0), 5); +assertEq(f(1), 2); +assertEq(f(2), 9); +assertEq(f(3), 11); +assertEq(f(4), 13); + +// ---------------------------------------------------------------------------- +// unreachable + +const UNREACHABLE = /unreachable/; +assertErrorMessage(wasmEvalText(`(module (func (unreachable)) (export "" (func 0)))`).exports[""], RuntimeError, UNREACHABLE); +assertErrorMessage(wasmEvalText(`(module (func (if (unreachable) (then (nop)))) (export "" (func 0)))`).exports[""], RuntimeError, UNREACHABLE); +assertErrorMessage(wasmEvalText(`(module (func (block (br_if 0 (unreachable)))) (export "" (func 0)))`).exports[""], RuntimeError, UNREACHABLE); +assertErrorMessage(wasmEvalText(`(module (func (block (br_table 0 (unreachable)))) (export "" (func 0)))`).exports[""], RuntimeError, UNREACHABLE); +assertErrorMessage(wasmEvalText(`(module (func (result i32) (i32.add (i32.const 0) (unreachable))) (export "" (func 0)))`).exports[""], RuntimeError, UNREACHABLE); diff --git a/js/src/jit-test/tests/wasm/conversion.js b/js/src/jit-test/tests/wasm/conversion.js new file mode 100644 index 0000000000..3d965ebd5d --- /dev/null +++ b/js/src/jit-test/tests/wasm/conversion.js @@ -0,0 +1,396 @@ +function testConversion0(resultType, opcode, paramType, op, expect) { + if (resultType === 'i64') { + wasmFullPassI64(`(module + (func $run (param ${paramType}) (result ${resultType}) + (${opcode} (local.get 0)) + ) + )`, expect, {}, `${paramType}.const ${op}`); + + // The same, but now the input is a constant. + wasmFullPassI64(`(module + (func $run (result ${resultType}) + (${opcode} (${paramType}.const ${op})) + ) + )`, expect); + } else if (paramType === 'i64') { + wasmFullPass(`(module + (func $f (param ${paramType}) (result ${resultType}) + (${opcode} (local.get 0)) + ) + (func (export "run") (result ${resultType}) + i64.const ${op} + call $f + ) + )`, expect, {}); + } else { + wasmFullPass(`(module + (func (param ${paramType}) (result ${resultType}) + (${opcode} (local.get 0))) + (export "run" (func 0)) + )`, expect, {}, op); + } + + for (var bad of ['i32', 'f32', 'f64', 'i64']) { + if (bad !== resultType) { + wasmFailValidateText( + `(module (func (param ${paramType}) (result ${bad}) (${opcode} (local.get 0))))`, + mismatchError(resultType, bad) + ); + } + + if (bad !== paramType) { + wasmFailValidateText( + `(module (func (param ${bad}) (result ${resultType}) (${opcode} (local.get 0))))`, + mismatchError(bad, paramType) + ); + } + } +} + +function testConversion(resultType, opcode, paramType, op, expect) { + testConversion0(resultType, `${resultType}.${opcode}`, paramType, op, expect); +} + +function testSignExtension(resultType, opcode, paramType, op, expect) { + testConversion0(resultType, `${resultType}.${opcode}`, paramType, op, expect); +} + +function testTrap(resultType, opcode, paramType, op) { + let func = wasmEvalText(`(module + (func + (param ${paramType}) + (result ${resultType}) + (${resultType}.${opcode} (local.get 0)) + ) + (func + (param ${paramType}) + local.get 0 + call 0 + drop + ) + (export "" (func 1)) + )`).exports[""]; + + let expectedError = op === 'nan' ? /invalid conversion to integer/ : /integer overflow/; + + assertErrorMessage(() => func(jsify(op)), Error, expectedError); +} + +var p = Math.pow; + +testConversion('i32', 'wrap_i64', 'i64', '0x100000028', 40); +testConversion('i32', 'wrap_i64', 'i64', -10, -10); +testConversion('i32', 'wrap_i64', 'i64', "0xffffffff7fffffff", 0x7fffffff); +testConversion('i32', 'wrap_i64', 'i64', "0xffffffff00000000", 0); +testConversion('i32', 'wrap_i64', 'i64', "0xfffffffeffffffff", -1); +testConversion('i32', 'wrap_i64', 'i64', "0x1234567801abcdef", 0x01abcdef); +testConversion('i32', 'wrap_i64', 'i64', "0x8000000000000002", 2); + +testConversion('i64', 'extend_i32_s', 'i32', 0, 0); +testConversion('i64', 'extend_i32_s', 'i32', 1234, 1234); +testConversion('i64', 'extend_i32_s', 'i32', -567, -567); +testConversion('i64', 'extend_i32_s', 'i32', 0x7fffffff, "0x000000007fffffff"); +testConversion('i64', 'extend_i32_s', 'i32', 0x80000000, "0xffffffff80000000"); + +testConversion('i64', 'extend_i32_u', 'i32', 0, 0); +testConversion('i64', 'extend_i32_u', 'i32', 1234, 1234); +testConversion('i64', 'extend_i32_u', 'i32', -567, "0x00000000fffffdc9"); +testConversion('i64', 'extend_i32_u', 'i32', -1, "0x00000000ffffffff"); +testConversion('i64', 'extend_i32_u', 'i32', 0x7fffffff, "0x000000007fffffff"); +testConversion('i64', 'extend_i32_u', 'i32', 0x80000000, "0x0000000080000000"); + +testConversion('f32', 'convert_i64_s', 'i64', 1, 1.0); +testConversion('f32', 'convert_i64_s', 'i64', -1, -1.0); +testConversion('f32', 'convert_i64_s', 'i64', 0, 0.0); +testConversion('f32', 'convert_i64_s', 'i64', "0x7fffffffffffffff", 9223372036854775807.0); +testConversion('f32', 'convert_i64_s', 'i64', "0x8000000000000000", -9223372036854775808.0); +testConversion('f32', 'convert_i64_s', 'i64', "0x11db9e76a2483", 314159275180032.0); +testConversion('f32', 'convert_i64_s', 'i64', "0x7fffffff", 2147483648.0); // closest approx. +testConversion('f32', 'convert_i64_s', 'i64', "0x80000000", 2147483648.0); +testConversion('f32', 'convert_i64_s', 'i64', "0x80000001", 2147483648.0); // closest approx. + +// Interesting values at the boundaries. +testConversion('f32', 'convert_i64_s', 'i64', "0x358a09a000000002", 3857906751034621952); +testConversion('f32', 'convert_i64_s', 'i64', "0x8000004000000001", -9223371487098961920); +testConversion('f32', 'convert_i64_s', 'i64', "0xffdfffffdfffffff", -9007200328482816); +testConversion('f32', 'convert_i64_s', 'i64', "0x0020000020000001", 9007200328482816); +testConversion('f32', 'convert_i64_s', 'i64', "0x7fffff4000000001", 9223371487098961920); + +testConversion('f64', 'convert_i64_s', 'i64', 1, 1.0); +testConversion('f64', 'convert_i64_s', 'i64', -1, -1.0); +testConversion('f64', 'convert_i64_s', 'i64', 0, 0.0); +testConversion('f64', 'convert_i64_s', 'i64', "0x7fffffffffffffff", 9223372036854775807.0); +testConversion('f64', 'convert_i64_s', 'i64', "0x8000000000000000", -9223372036854775808.0); +testConversion('f64', 'convert_i64_s', 'i64', "0x10969d374b968e", 4669201609102990); +testConversion('f64', 'convert_i64_s', 'i64', "0x7fffffff", 2147483647.0); +testConversion('f64', 'convert_i64_s', 'i64', "0x80000000", 2147483648.0); +testConversion('f64', 'convert_i64_s', 'i64', "0x80000001", 2147483649.0); + +testConversion('f32', 'convert_i64_u', 'i64', 1, 1.0); +testConversion('f32', 'convert_i64_u', 'i64', 0, 0.0); +testConversion('f32', 'convert_i64_u', 'i64', "0x7fffffffffffffff", 9223372036854775807.0); +testConversion('f32', 'convert_i64_u', 'i64', "0x8000000000000000", 9223372036854775808.0); +testConversion('f32', 'convert_i64_u', 'i64', -1, 18446744073709551616.0); +testConversion('f32', 'convert_i64_u', 'i64', "0xffff0000ffff0000", 18446462598732840000.0); + +// Interesting values at the boundaries. +testConversion('f32', 'convert_i64_u', 'i64', "0x100404900000008", 72128280609685500); +testConversion('f32', 'convert_i64_u', 'i64', "0x7fffff4000000001", 9223371487098962000); +testConversion('f32', 'convert_i64_u', 'i64', "0x0020000020000001", 9007200328482816); +testConversion('f32', 'convert_i64_u', 'i64', "0x7fffffbfffffffff", 9223371487098961920); +testConversion('f32', 'convert_i64_u', 'i64', "0x8000008000000001", 9223373136366403584); +testConversion('f32', 'convert_i64_u', 'i64', "0xfffffe8000000001", 18446742974197923840); + +testConversion('f64', 'convert_i64_u', 'i64', 1, 1.0); +testConversion('f64', 'convert_i64_u', 'i64', 0, 0.0); +testConversion('f64', 'convert_i64_u', 'i64', "0x7fffffffffffffff", 9223372036854775807.0); +testConversion('f64', 'convert_i64_u', 'i64', "0x8000000000000000", 9223372036854775808.0); +testConversion('f64', 'convert_i64_u', 'i64', -1, 18446744073709551616.0); +testConversion('f64', 'convert_i64_u', 'i64', "0xffff0000ffff0000", 18446462603027743000.0); +testConversion('f64', 'convert_i64_u', 'i64', "0xbf869c3369c26401", 13800889852755077000); +testConversion('f64', 'convert_i64_u', 'i64', "0x7fffff4000000001", 9223371212221054976); +testConversion('f64', 'convert_i64_u', 'i64', "0x8000008000000001", 9223372586610589696); +testConversion('f64', 'convert_i64_u', 'i64', "0xfffffe8000000001", 18446742424442109952); + +testConversion('i64', 'trunc_f64_s', 'f64', 0.0, 0); +testConversion('i64', 'trunc_f64_s', 'f64', "-0.0", 0); +testConversion('i64', 'trunc_f64_s', 'f64', 1.0, 1); +testConversion('i64', 'trunc_f64_s', 'f64', 1.1, 1); +testConversion('i64', 'trunc_f64_s', 'f64', 1.5, 1); +testConversion('i64', 'trunc_f64_s', 'f64', 1.99, 1); +testConversion('i64', 'trunc_f64_s', 'f64', 40.1, 40); +testConversion('i64', 'trunc_f64_s', 'f64', -1.0, -1); +testConversion('i64', 'trunc_f64_s', 'f64', -1.1, -1); +testConversion('i64', 'trunc_f64_s', 'f64', -1.5, -1); +testConversion('i64', 'trunc_f64_s', 'f64', -1.99, -1); +testConversion('i64', 'trunc_f64_s', 'f64', -2.0, -2); +testConversion('i64', 'trunc_f64_s', 'f64', 4294967296.1, "0x100000000"); +testConversion('i64', 'trunc_f64_s', 'f64', -4294967296.8, "0xffffffff00000000"); +testConversion('i64', 'trunc_f64_s', 'f64', 9223372036854774784.8, "0x7ffffffffffffc00"); +testConversion('i64', 'trunc_f64_s', 'f64', -9223372036854775808.3, "0x8000000000000000"); + +testConversion('i64', 'trunc_f64_u', 'f64', 0.0, 0); +testConversion('i64', 'trunc_f64_u', 'f64', "-0.0", 0); +testConversion('i64', 'trunc_f64_u', 'f64', 1.0, 1); +testConversion('i64', 'trunc_f64_u', 'f64', 1.1, 1); +testConversion('i64', 'trunc_f64_u', 'f64', 1.5, 1); +testConversion('i64', 'trunc_f64_u', 'f64', 1.99, 1); +testConversion('i64', 'trunc_f64_u', 'f64', -0.9, 0); +testConversion('i64', 'trunc_f64_u', 'f64', 40.1, 40); +testConversion('i64', 'trunc_f64_u', 'f64', 4294967295, "0xffffffff"); +testConversion('i64', 'trunc_f64_u', 'f64', 4294967296.1, "0x100000000"); +testConversion('i64', 'trunc_f64_u', 'f64', 1e8, "0x5f5e100"); +testConversion('i64', 'trunc_f64_u', 'f64', 1e16, "0x2386f26fc10000"); +testConversion('i64', 'trunc_f64_u', 'f64', 9223372036854775808, "0x8000000000000000"); +testConversion('i64', 'trunc_f64_u', 'f64', 18446744073709549568.1, -2048); + +testConversion('i64', 'trunc_f32_s', 'f32', 0.0, 0); +testConversion('i64', 'trunc_f32_s', 'f32', "-0.0", 0); +testConversion('i64', 'trunc_f32_s', 'f32', 1.0, 1); +testConversion('i64', 'trunc_f32_s', 'f32', 1.1, 1); +testConversion('i64', 'trunc_f32_s', 'f32', 1.5, 1); +testConversion('i64', 'trunc_f32_s', 'f32', 1.99, 1); +testConversion('i64', 'trunc_f32_s', 'f32', 40.1, 40); +testConversion('i64', 'trunc_f32_s', 'f32', -1.0, -1); +testConversion('i64', 'trunc_f32_s', 'f32', -1.1, -1); +testConversion('i64', 'trunc_f32_s', 'f32', -1.5, -1); +testConversion('i64', 'trunc_f32_s', 'f32', -1.99, -1); +testConversion('i64', 'trunc_f32_s', 'f32', -2.0, -2); +testConversion('i64', 'trunc_f32_s', 'f32', 4294967296.1, "0x100000000"); +testConversion('i64', 'trunc_f32_s', 'f32', -4294967296.8, "0xffffffff00000000"); +testConversion('i64', 'trunc_f32_s', 'f32', 9223371487098961920.0, "0x7fffff8000000000"); +testConversion('i64', 'trunc_f32_s', 'f32', -9223372036854775808.3, "0x8000000000000000"); + +testConversion('i64', 'trunc_f32_u', 'f32', 0.0, 0); +testConversion('i64', 'trunc_f32_u', 'f32', "-0.0", 0); +testConversion('i64', 'trunc_f32_u', 'f32', 1.0, 1); +testConversion('i64', 'trunc_f32_u', 'f32', 1.1, 1); +testConversion('i64', 'trunc_f32_u', 'f32', 1.5, 1); +testConversion('i64', 'trunc_f32_u', 'f32', 1.99, 1); +testConversion('i64', 'trunc_f32_u', 'f32', -0.9, 0); +testConversion('i64', 'trunc_f32_u', 'f32', 40.1, 40); +testConversion('i64', 'trunc_f32_u', 'f32', 1e8, "0x5f5e100"); +testConversion('i64', 'trunc_f32_u', 'f32', 4294967296, "0x100000000"); +testConversion('i64', 'trunc_f32_u', 'f32', 18446742974197923840.0, "0xffffff0000000000"); + +testTrap('i64', 'trunc_f64_s', 'f64', 9223372036854776000.0); +testTrap('i64', 'trunc_f64_s', 'f64', -9223372036854778000.0); +testTrap('i64', 'trunc_f64_s', 'f64', "nan"); +testTrap('i64', 'trunc_f64_s', 'f64', "inf"); +testTrap('i64', 'trunc_f64_s', 'f64', "-inf"); + +testTrap('i64', 'trunc_f64_u', 'f64', -1); +testTrap('i64', 'trunc_f64_u', 'f64', 18446744073709551616.0); +testTrap('i64', 'trunc_f64_u', 'f64', "nan"); +testTrap('i64', 'trunc_f64_u', 'f64', "inf"); +testTrap('i64', 'trunc_f64_u', 'f64', "-inf"); + +testTrap('i64', 'trunc_f32_s', 'f32', 9223372036854776000.0); +testTrap('i64', 'trunc_f32_s', 'f32', -9223372586610630000.0); +testTrap('i64', 'trunc_f32_s', 'f32', "nan"); +testTrap('i64', 'trunc_f32_s', 'f32', "inf"); +testTrap('i64', 'trunc_f32_s', 'f32', "-inf"); + +testTrap('i64', 'trunc_f32_u', 'f32', 18446744073709551616.0); +testTrap('i64', 'trunc_f32_u', 'f32', -1); +testTrap('i64', 'trunc_f32_u', 'f32', "nan"); +testTrap('i64', 'trunc_f32_u', 'f32', "inf"); +testTrap('i64', 'trunc_f32_u', 'f32', "-inf"); + +testConversion('i64', 'reinterpret_f64', 'f64', 40.09999999999968, "0x40440ccccccccca0"); +testConversion('f64', 'reinterpret_i64', 'i64', "0x40440ccccccccca0", 40.09999999999968); + +var u64max = '0xffffffffffffffff'; +var s64max = '0x7fffffffffffffff'; +var s64min = '-0x8000000000000000'; +var s32max = 2147483647; +var s32min = -2147483648; + +testConversion('i32', 'trunc_sat_f32_s', 'f32', NaN, 0); +testConversion('i32', 'trunc_sat_f32_s', 'f32', Infinity, s32max); +testConversion('i32', 'trunc_sat_f32_s', 'f32', -Infinity, s32min); +testConversion('i32', 'trunc_sat_f32_s', 'f32', p(2, 31), s32max); +testConversion('i32', 'trunc_sat_f32_s', 'f32', -p(2, 31) - 256, s32min); + +testConversion('i32', 'trunc_sat_f64_s', 'f64', NaN, 0); +testConversion('i32', 'trunc_sat_f64_s', 'f64', Infinity, s32max); +testConversion('i32', 'trunc_sat_f64_s', 'f64', -Infinity, s32min); +testConversion('i32', 'trunc_sat_f64_s', 'f64', p(2, 31), s32max); +testConversion('i32', 'trunc_sat_f64_s', 'f64', -p(2, 31) - 1, s32min); + +testConversion('i32', 'trunc_sat_f32_u', 'f32', NaN, 0); +testConversion('i32', 'trunc_sat_f32_u', 'f32', Infinity, -1); +testConversion('i32', 'trunc_sat_f32_u', 'f32', -Infinity, 0); +testConversion('i32', 'trunc_sat_f32_u', 'f32', -1, 0); +testConversion('i32', 'trunc_sat_f32_u', 'f32', p(2, 32), -1); + +testConversion('i32', 'trunc_sat_f64_u', 'f64', NaN, 0); +testConversion('i32', 'trunc_sat_f64_u', 'f64', Infinity, -1); +testConversion('i32', 'trunc_sat_f64_u', 'f64', -Infinity, 0); +testConversion('i32', 'trunc_sat_f64_u', 'f64', -1, 0); +testConversion('i32', 'trunc_sat_f64_u', 'f64', p(2, 32), -1); + +testConversion('i64', 'trunc_sat_f64_s', 'f64', 9223372036854776000.0, s64max); +testConversion('i64', 'trunc_sat_f64_s', 'f64', -9223372036854778000.0, s64min); +testConversion('i64', 'trunc_sat_f64_s', 'f64', 'nan', '0'); +testConversion('i64', 'trunc_sat_f64_s', 'f64', 'inf', s64max); +testConversion('i64', 'trunc_sat_f64_s', 'f64', '-inf', s64min); + +testConversion('i64', 'trunc_sat_f64_u', 'f64', -1, '0'); +testConversion('i64', 'trunc_sat_f64_u', 'f64', 18446744073709551616.0, u64max); +testConversion('i64', 'trunc_sat_f64_u', 'f64', 'nan', '0'); +testConversion('i64', 'trunc_sat_f64_u', 'f64', 'inf', u64max); +testConversion('i64', 'trunc_sat_f64_u', 'f64', '-inf', '0'); + +testConversion('i64', 'trunc_sat_f32_s', 'f32', 9223372036854776000.0, s64max); +testConversion('i64', 'trunc_sat_f32_s', 'f32', -9223372586610630000.0, s64min); +testConversion('i64', 'trunc_sat_f32_s', 'f32', 'nan', '0'); +testConversion('i64', 'trunc_sat_f32_s', 'f32', 'inf', s64max); +testConversion('i64', 'trunc_sat_f32_s', 'f32', '-inf', s64min); + +testConversion('i64', 'trunc_sat_f32_u', 'f32', 18446744073709551616.0, u64max); +testConversion('i64', 'trunc_sat_f32_u', 'f32', -1, '0'); +testConversion('i64', 'trunc_sat_f32_u', 'f32', 'nan', '0'); +testConversion('i64', 'trunc_sat_f32_u', 'f32', 'inf', u64max); +testConversion('i64', 'trunc_sat_f32_u', 'f32', '-inf', '0'); + +testSignExtension('i32', 'extend8_s', 'i32', 0x7F, 0x7F); +testSignExtension('i32', 'extend8_s', 'i32', 0x80, -0x80); +testSignExtension('i32', 'extend16_s', 'i32', 0x7FFF, 0x7FFF); +testSignExtension('i32', 'extend16_s', 'i32', 0x8000, -0x8000); +testSignExtension('i64', 'extend8_s', 'i64', 0x7F, 0x7F); +testSignExtension('i64', 'extend8_s', 'i64', 0x80, -0x80); +testSignExtension('i64', 'extend16_s', 'i64', 0x7FFF, 0x7FFF); +testSignExtension('i64', 'extend16_s', 'i64', 0x8000, -0x8000); +testSignExtension('i64', 'extend_i32_s', 'i32', 0x7FFFFFFF, 0x7FFFFFFF); +testSignExtension('i64', 'extend_i32_s', 'i32', "0x80000000", "0xFFFFFFFF80000000"); + +// i32.trunc_s* : all values in ] -2**31 - 1; 2**31 [ are acceptable. +// f32: +testConversion('i32', 'trunc_f32_s', 'f32', 40.1, 40); +testConversion('i32', 'trunc_f32_s', 'f32', p(2, 31) - 128, p(2, 31) - 128); // last f32 value exactly representable < 2**31. +testConversion('i32', 'trunc_f32_s', 'f32', -p(2, 31), -p(2,31)); // last f32 value exactly representable > -2**31 - 1. + +testTrap('i32', 'trunc_f32_s', 'f32', 'nan'); +testTrap('i32', 'trunc_f32_s', 'f32', 'inf'); +testTrap('i32', 'trunc_f32_s', 'f32', '-inf'); +testTrap('i32', 'trunc_f32_s', 'f32', p(2, 31)); +testTrap('i32', 'trunc_f32_s', 'f32', -p(2,31) - 256); + +testConversion('i32', 'trunc_f64_s', 'f64', 40.1, 40); +testConversion('i32', 'trunc_f64_s', 'f64', p(2,31) - 0.001, p(2,31) - 1); // example value near the top. +testConversion('i32', 'trunc_f64_s', 'f64', -p(2,31) - 0.999, -p(2,31)); // example value near the bottom. + +// f64: +testTrap('i32', 'trunc_f64_s', 'f64', 'nan'); +testTrap('i32', 'trunc_f64_s', 'f64', 'inf'); +testTrap('i32', 'trunc_f64_s', 'f64', '-inf'); +testTrap('i32', 'trunc_f64_s', 'f64', p(2,31)); +testTrap('i32', 'trunc_f64_s', 'f64', -p(2,31) - 1); + +// i32.trunc_u* : all values in ] -1; 2**32 [ are acceptable. +// f32: +testConversion('i32', 'trunc_f32_u', 'f32', 40.1, 40); +testConversion('i32', 'trunc_f32_u', 'f32', p(2,31), p(2,31)|0); +testConversion('i32', 'trunc_f32_u', 'f32', p(2,32) - 256, (p(2,32) - 256)|0); // last f32 value exactly representable < 2**32. +testConversion('i32', 'trunc_f32_u', 'f32', -0.99, 0); // example value near the bottom. + +testTrap('i32', 'trunc_f32_u', 'f32', 'nan'); +testTrap('i32', 'trunc_f32_u', 'f32', 'inf'); +testTrap('i32', 'trunc_f32_u', 'f32', '-inf'); +testTrap('i32', 'trunc_f32_u', 'f32', -1); +testTrap('i32', 'trunc_f32_u', 'f32', p(2,32)); + +// f64: +testConversion('i32', 'trunc_f64_u', 'f64', 40.1, 40); +testConversion('i32', 'trunc_f64_u', 'f64', p(2,32) - 0.001, (p(2,32) - 1)|0); // example value near the top. +testConversion('i32', 'trunc_f64_u', 'f64', -0.99999, 0); // example value near the bottom. + +testTrap('i32', 'trunc_f64_u', 'f64', 'nan'); +testTrap('i32', 'trunc_f64_u', 'f64', 'inf'); +testTrap('i32', 'trunc_f64_u', 'f64', '-inf'); +testTrap('i32', 'trunc_f64_u', 'f64', -1); +testTrap('i32', 'trunc_f64_u', 'f64', p(2,32)); + +// Other opcodes. +testConversion('i32', 'reinterpret_f32', 'f32', 40.1, 1109419622); +testConversion('f32', 'reinterpret_i32', 'i32', 40, 5.605193857299268e-44); + +testConversion('f32', 'convert_i32_s', 'i32', 40, 40); +testConversion('f32', 'convert_i32_u', 'i32', 40, 40); + +testConversion('f64', 'convert_i32_s', 'i32', 40, 40); +testConversion('f64', 'convert_i32_u', 'i32', 40, 40); + +testConversion('f32', 'demote_f64', 'f64', 40.1, 40.099998474121094); +testConversion('f64', 'promote_f32', 'f32', 40.1, 40.099998474121094); + +// Non-canonical NaNs. + +// Wasm v1.1 spec 4.3.4 "Conversions", subsection demote(z): if z is a NaN but +// not canonical, return any NaN. That is, the sign is arbitrary and the +// payload is arbitrary, except that the most significant bit of the payload +// must be set. We check simply that a quiet NaN is returned and ignore the +// sign and payload. + +wasmFullPass(` +(module + (func (result i32) + (i32.and + (i32.const 0x7FC00000) + (i32.reinterpret_f32 + (f32.demote_f64 (f64.const -nan:0x4444444444444))))) + (export "run" (func 0)))`, + 0x7FC00000); + +// Wasm v1.1 spec 4.3.4 "Conversions", subsection promote(z): if z is a NaN but +// not canonical, return any NaN. See above. + +wasmFullPass(` +(module + (func (result i64) + (i64.and + (i64.const 0x7FF8000000000000) + (i64.reinterpret_f64 (f64.promote_f32 (f32.const -nan:0x222222))))) + (export "run" (func 0)))`, + 0x7FF8_0000_0000_0000n); diff --git a/js/src/jit-test/tests/wasm/cross-global.js b/js/src/jit-test/tests/wasm/cross-global.js new file mode 100644 index 0000000000..07b705d540 --- /dev/null +++ b/js/src/jit-test/tests/wasm/cross-global.js @@ -0,0 +1,10 @@ +const Module = WebAssembly.Module; + +// Create cross-compartment wrappers to typed arrays and array buffers. +var g = newGlobal(); +var code1 = g.eval("wasmTextToBinary('(module)')"); +var code2 = g.eval("wasmTextToBinary('(module)').buffer"); + +// Should get unwrapped. +assertEq(new Module(code1) instanceof Module, true); +assertEq(new Module(code2) instanceof Module, true); diff --git a/js/src/jit-test/tests/wasm/custom-section.js b/js/src/jit-test/tests/wasm/custom-section.js new file mode 100644 index 0000000000..e0a9946242 --- /dev/null +++ b/js/src/jit-test/tests/wasm/custom-section.js @@ -0,0 +1,48 @@ +function arraysEqual(a, b) { + if (a.length !== b.length) { + return false; + } + for (let i = 0; i < b.length; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; +} + +function testCustomSection(moduleText, customSectionName, expectedBytes) { + let module = new WebAssembly.Module(wasmTextToBinary(moduleText)); + + let sections = WebAssembly.Module.customSections(module, customSectionName); + assertEq(sections.length, 1); + + let section = sections[0]; + let sectionView = new Uint8Array(section); + + if (!arraysEqual(sectionView, expectedBytes)) { + let got = JSON.stringify(Array.from(sectionView)); + let expected = JSON.stringify(Array.from(expectedBytes)); + assertEq(true, false, `got: ${got}, expected: ${expected}`) + } +} + +// Test an unknown custom section +testCustomSection( + `(module (@custom "unknown" "\\00\\01\\02\\03\\04"))`, + "unknown", + [0, 1, 2, 3, 4]); + +// Test the name section +testCustomSection( + `(module (func $test))`, + "name", + [ + /* subsection is functions */ 1, + /* subsection is 7 bytes */ 7, + /* name map has 1 entry */ 1, + /* first entry is index */ 0, + /* first entry string 4 bytes */ 4, + /* 't' */ 116, + /* 'e' */ 101, + /* 's' */ 115, + /* 't' */ 116]); diff --git a/js/src/jit-test/tests/wasm/declared-segs.js b/js/src/jit-test/tests/wasm/declared-segs.js new file mode 100644 index 0000000000..269a1440fc --- /dev/null +++ b/js/src/jit-test/tests/wasm/declared-segs.js @@ -0,0 +1,58 @@ +// Declared segments parse and validate +wasmFullPass(` + (module + (func $f1) + (elem declare func $f1) + (elem declare funcref (ref.null func)) + (func $run) + (export "run" (func $run)) + ) +`); + +// Declared segments can be used with externref +wasmFullPass(` + (module + (elem declare externref (ref.null extern)) + (func $run) + (export "run" (func $run)) + ) +`); + +// Declared segments cannot be used at runtime +{ + let inst = wasmEvalText(` + (module + (func $f1) + (table 1 1 funcref) + (elem $e1 declare func $f1) + (func (export "testfn") (table.init $e1 (i32.const 0) (i32.const 0) (i32.const 1))) + ) + `); + assertErrorMessage(() => inst.exports.testfn(), WebAssembly.RuntimeError, /index out of bounds/); +} + +// Declared segments can be dropped, although this has no effect +wasmEvalText(` + (module + (func $f1) + (table 1 1 funcref) + (elem $e1 declare func $f1) + (func $start (elem.drop $e1) (elem.drop $e1)) + (start $start) + ) +`) + +// Declared segments don't cause initialization of a table +wasmAssert(` + (module + (func $f1) + (table 1 1 funcref) + (elem declare func $f1) + (func $at (param i32) (result i32) + local.get 0 + table.get 0 + ref.is_null + ) + (export "at" (func $at)) + ) +`, [{type: 'i32', func: '$at', args: ['i32.const 0'], expected: '1'}]); diff --git a/js/src/jit-test/tests/wasm/directiveless/README.md b/js/src/jit-test/tests/wasm/directiveless/README.md new file mode 100644 index 0000000000..9687e7a9b6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/directiveless/README.md @@ -0,0 +1 @@ +DO NOT ADD A directives.txt FILE IN THIS DIRECTORY. THE TEST CASE MUST RUN WITH MINIMAL PRELIMINARIES. diff --git a/js/src/jit-test/tests/wasm/directiveless/bug1645310.js b/js/src/jit-test/tests/wasm/directiveless/bug1645310.js new file mode 100644 index 0000000000..3532886c6a --- /dev/null +++ b/js/src/jit-test/tests/wasm/directiveless/bug1645310.js @@ -0,0 +1,61 @@ +// |jit-test| --wasm-compiler=optimizing; skip-if: !wasmIsSupported() + +// In this case we're setting things up so that wasm can't be compiled, as the +// only available compiler is Ion, and enabling the Debugger will disable Ion. +// +// The test tests that the lazy creation of the WebAssembly object is not +// dependent on whether WebAssembly can be compiled or not: if wasm is supported +// then the WebAssembly object should always be created. The fact that wasm +// can't be compiled is a separate matter. +// +// IT'S IMPORTANT NOT TO MENTION THE WEBASSEMBLY OBJECT UNTIL AFTER THE DEBUGGER +// HAS BEEN CREATED, AND NOT TO LOAD lib/wasm.js OR OTHER WASM CODE HERE. + +var g7 = newGlobal({newCompartment: true}); +g7.parent = this; +g7.eval("var dbg = Debugger(parent)"); +assertEq(typeof WebAssembly, "object"); + +// Test that validation works even if compilers are not available. + +WebAssembly.validate(wasmTextToBinary('(module (func))')); + +// Test that compilation fails with a sensible error. + +var bits = wasmTextToBinary('(module (func))'); +var msg = /no WebAssembly compiler available/ +var exn; + +exn = null; +try { new WebAssembly.Module(bits); } catch (e) { exn = e; } +assertEq(Boolean(exn), true); +assertEq(Boolean(String(exn).match(msg)), true); + +exn = null; +try { WebAssembly.compile(bits); } catch (e) { exn = e; } +assertEq(Boolean(exn), true); +assertEq(Boolean(String(exn).match(msg)), true); + +exn = null; +try { WebAssembly.instantiate(bits); } catch (e) { exn = e; } +assertEq(Boolean(exn), true); +assertEq(Boolean(String(exn).match(msg)), true); + +// We do not use wasmStreamingEnabled() here because that checks whether +// compilers are available, and that is precisely what we want to be checking +// ourselves. But streaming compilation is available only if there are helper +// threads, so that's an OK proxy. + +if (helperThreadCount() > 0) { + exn = null; + WebAssembly.compileStreaming(bits).catch(e => { exn = e; }); + drainJobQueue(); + assertEq(Boolean(exn), true); + assertEq(Boolean(String(exn).match(msg)), true); + + exn = null; + WebAssembly.instantiateStreaming(bits).catch(e => { exn = e; }); + drainJobQueue(); + assertEq(Boolean(exn), true); + assertEq(Boolean(String(exn).match(msg)), true); +} diff --git a/js/src/jit-test/tests/wasm/directiveless/bug1664979.js b/js/src/jit-test/tests/wasm/directiveless/bug1664979.js new file mode 100644 index 0000000000..e6b8bd7c3c --- /dev/null +++ b/js/src/jit-test/tests/wasm/directiveless/bug1664979.js @@ -0,0 +1,21 @@ +// |jit-test| --fuzzing-safe; --ion-offthread-compile=off; skip-if: !wasmIsSupported() + +var all = [undefined, null, ]; +function AsmModule(stdlib) { + "use asm"; + var fround = stdlib.Math.fround; + function fltConvNot(y38) { + y38 = fround(y38); + var i38 = 0; + i38 = ~((~~y38) | 0); + return (!!i38) | 0; + } + return { + fltConvNot: fltConvNot, + }; +} +var asmModule = AsmModule({ + Math: Math +}); +for (var i38 = 0; i38 < 10; ++i38) + asmModule.fltConvNot(all[i38]) diff --git a/js/src/jit-test/tests/wasm/directiveless/bug1666051.js b/js/src/jit-test/tests/wasm/directiveless/bug1666051.js new file mode 100644 index 0000000000..6b94ef921e --- /dev/null +++ b/js/src/jit-test/tests/wasm/directiveless/bug1666051.js @@ -0,0 +1,12 @@ +// |jit-test| --fuzzing-safe; --no-threads; --no-baseline; --no-ion; skip-if: !wasmIsSupported() + +(function (stdlib) { + "use asm"; + var sqrt = stdlib.Math.sqrt; + function f(i0) { + i0 = i0 | 0; + i0 = ~~sqrt(-.5); + return (1 / (1 >> (.0 == .0)) & i0 >> 1); + } + return f; +})(this)(); diff --git a/js/src/jit-test/tests/wasm/directiveless/bug1877358.js b/js/src/jit-test/tests/wasm/directiveless/bug1877358.js new file mode 100644 index 0000000000..1f8fad0e43 --- /dev/null +++ b/js/src/jit-test/tests/wasm/directiveless/bug1877358.js @@ -0,0 +1,14 @@ +// |jit-test| --no-wasm-exceptions; include:wasm.js + +let {test} = wasmEvalText(`(module + (func $m (import "" "m")) + (func (export "test") + call $m + ) +)`, {"": {m: () => {throw 'wrap me';}}}).exports; + +try { + test(); +} catch (err) { + assertEq(err, 'wrap me'); +} diff --git a/js/src/jit-test/tests/wasm/directives.txt b/js/src/jit-test/tests/wasm/directives.txt new file mode 100644 index 0000000000..15c7511171 --- /dev/null +++ b/js/src/jit-test/tests/wasm/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); test-also=--wasm-test-serialization; test-also=--wasm-compiler=optimizing --no-avx; skip-variant-if: --wasm-compiler=optimizing --no-avx, !getBuildConfiguration("x86") && !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:wasm.js diff --git a/js/src/jit-test/tests/wasm/disasm.js b/js/src/jit-test/tests/wasm/disasm.js new file mode 100644 index 0000000000..9e9a3f2116 --- /dev/null +++ b/js/src/jit-test/tests/wasm/disasm.js @@ -0,0 +1,43 @@ +// |jit-test| skip-if: !hasDisassembler() + +// Test that the disassembler is reasonably sane. + +var mod = new WebAssembly.Module(wasmTextToBinary(` +(module + (func $hum (import "m" "hum") (param i32) (result f64)) + (memory 1) + (func $hi (export "f") (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32) + (i32.add (i32.load (local.get 5)) (i32.load (local.get 6)))) + (func $ho (param i32) (result i32) (i32.const 37)) +) +`)); + +// The following capture the disassembly as a string. We can't really check +// that no other output is produced. + +var s = wasmDis(mod, {tier:'best', asString:true}); +assertEq(typeof s, "string") +assertEq(s.match(/Kind = Function/g).length, 3) + +var ins = new WebAssembly.Instance(mod, {m:{hum:(x) => x+0.5}}); +var s = wasmDis(ins, {tier:'best', asString:true}); +assertEq(typeof s, "string") +assertEq(s.match(/Kind = Function/g).length, 3) + +var s = wasmDis(ins.exports.f, {tier:'best', asString:true}) +assertEq(typeof s, "string") + +var s = wasmDis(ins, {asString:true, kinds:"InterpEntry,ImportInterpExit,Function"}) +assertEq(typeof s, "string") +assertEq(s.match(/Kind = Function/g).length, 3) +assertEq(s.match(/Kind = InterpEntry/g).length, 1) +assertEq(s.match(/Kind = ImportInterpExit/g).length, 1) +assertEq(s.match(/name = hi/g).length, 2) +assertEq(s.match(/name = ho/g).length, 1) +assertEq(s.match(/name = hum/g).length, 2) + +// This one prints to stderr, we can't check the output but we can check that a +// string is not returned. + +var s = wasmDis(ins, {tier:'best'}) +assertEq(typeof s, "undefined") diff --git a/js/src/jit-test/tests/wasm/drop.js b/js/src/jit-test/tests/wasm/drop.js new file mode 100644 index 0000000000..3a2bda66e5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/drop.js @@ -0,0 +1,45 @@ +for (let type of ['i32', 'f32', 'f64']) { + assertEq(wasmEvalText(` + (module + (func $test (param $p ${type}) (param $p2 ${type}) (result ${type}) + local.get $p + local.get $p2 + (block) + drop + ) + (export "test" (func $test)) + ) + `).exports.test(0x1337abc0, 0xffffffff), 0x1337abc0); +} + +assertEq(wasmEvalText(` + (module + (func $test (param $p i32) (param $p2 f32) (param $p3 f64) (param $p4 i32) (result i32) + local.get $p + local.get $p2 + local.get $p3 + local.get $p4 + (block) + drop + (block) + (block) + drop + drop + ) + (export "test" (func $test)) + ) +`).exports.test(0x1337abc0, 0xffffffff), 0x1337abc0); + +wasmAssert(` + (module + (func $test (param $p i64) (param $p2 i64) (result i64) + local.get $p + local.get $p2 + (block) + drop + ) + (export "test" (func $test)) + ) +`, [ + { type: 'i64', func: '$test', args: ['(i64.const 0x1337abc0)', '(i64.const -1)'], expected: '0x1337abc0' } +]); diff --git a/js/src/jit-test/tests/wasm/errors.js b/js/src/jit-test/tests/wasm/errors.js new file mode 100644 index 0000000000..e118a057a2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/errors.js @@ -0,0 +1,180 @@ +load(libdir + "wasm-binary.js"); + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const CompileError = WebAssembly.CompileError; +const RuntimeError = WebAssembly.RuntimeError; + +function getWasmFunctionIndex(line) { + return Number(line.match(/^wasm-function\[(\d*)\]$/)[1]); +} + +function getWasmBytecode(column) { + return parseInt(column.match(/^0x([0-9a-f]*)$/)[1], 16); +} + +function parseStack(stack) { + var frames = stack.split('\n'); + assertEq(frames[frames.length-1], ""); + frames.length--; + return frames.map(frame => { + var res = frame.match(/^(.*)@(.*):(.*):(.*)$/); + assertEq(res !== null, true); + return {name: res[1], url: res[2], line: res[3], column: res[4]}; + }); +} + +function testExn(opcode, binary, type, msg, exn) { + assertEq(exn instanceof type, true); + assertEq(msg.test(exn.message), true); + + var stack = parseStack(exn.stack); + assertEq(stack.length > 1, true); + var innermost = stack[0]; + var funcIndex = getWasmFunctionIndex(innermost.line); + var bytecode = getWasmBytecode(innermost.column); + assertEq(exn.lineNumber, bytecode); + assertEq(exn.columnNumber, 1); + assertEq(binary[bytecode], opcode); + + return {stack, binary}; +} + +function test(opcode, text, type, msg) { + var binary = new Uint8Array(wasmTextToBinary(text)); + var exn; + try { + new Instance(new Module(binary)); + } catch (e) { + exn = e; + } + + return testExn(opcode, binary, type, msg, exn); +} + +function testAccess(opcode, text, width, type, msg) { + var binary = new Uint8Array(wasmTextToBinary(text)); + var instance = new Instance(new Module(binary)); + for (var base of [64 * 1024, 2 * 64 * 1024, Math.pow(2, 30), Math.pow(2, 31), Math.pow(2, 32) - 1]) { + for (var sub = 0; sub < width; sub++) { + var ptr = base - sub; + let exn = null; + try { + instance.exports[''](ptr); + } catch (e) { + exn = e; + } + testExn(opcode, binary, type, msg, exn); + } + } +} + +function testLoad(opcode, optext, width, type, msg) { + var text = `(module (memory 1) (func (export "") (param i32) (drop (${optext} (local.get 0)))))`; + testAccess(opcode, text, width, type, msg); +} + +function testStore(opcode, optext, consttext, width, type, msg) { + var text = `(module (memory 1) (func (export "") (param i32) (${optext} (local.get 0) (${consttext}.const 0))))`; + testAccess(opcode, text, width, type, msg); +} + +test(UnreachableCode, '(module (func unreachable) (start 0))', RuntimeError, /unreachable executed/); +test(I32DivSCode, '(module (func (drop (i32.div_s (i32.const 1) (i32.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I32DivSCode, '(module (func (drop (i32.div_s (i32.const -2147483648) (i32.const -1)))) (start 0))', RuntimeError, /integer overflow/); +test(I32DivUCode, '(module (func (drop (i32.div_u (i32.const 1) (i32.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I32RemSCode, '(module (func (drop (i32.rem_s (i32.const 1) (i32.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I32RemUCode, '(module (func (drop (i32.rem_u (i32.const 1) (i32.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I64DivSCode, '(module (func (drop (i64.div_s (i64.const 1) (i64.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I64DivSCode, '(module (func (drop (i64.div_s (i64.const -9223372036854775808) (i64.const -1)))) (start 0))', RuntimeError, /integer overflow/); +test(I64DivUCode, '(module (func (drop (i64.div_u (i64.const 1) (i64.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I64RemSCode, '(module (func (drop (i64.rem_s (i64.const 1) (i64.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I64RemUCode, '(module (func (drop (i64.rem_u (i64.const 1) (i64.const 0)))) (start 0))', RuntimeError, /integer divide by zero/); +test(I32TruncSF32Code, '(module (func (drop (i32.trunc_f32_s (f32.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I32TruncSF64Code, '(module (func (drop (i32.trunc_f64_s (f64.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I32TruncUF32Code, '(module (func (drop (i32.trunc_f32_u (f32.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I32TruncUF64Code, '(module (func (drop (i32.trunc_f64_u (f64.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I64TruncSF32Code, '(module (func (drop (i64.trunc_f32_s (f32.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I64TruncSF64Code, '(module (func (drop (i64.trunc_f64_s (f64.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I64TruncUF32Code, '(module (func (drop (i64.trunc_f32_u (f32.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I64TruncUF64Code, '(module (func (drop (i64.trunc_f64_u (f64.const 1e30)))) (start 0))', RuntimeError, /integer overflow/); +test(I32TruncSF32Code, '(module (func (drop (i32.trunc_f32_s (f32.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I32TruncSF64Code, '(module (func (drop (i32.trunc_f64_s (f64.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I32TruncUF32Code, '(module (func (drop (i32.trunc_f32_u (f32.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I32TruncUF64Code, '(module (func (drop (i32.trunc_f64_u (f64.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I64TruncSF32Code, '(module (func (drop (i64.trunc_f32_s (f32.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I64TruncSF64Code, '(module (func (drop (i64.trunc_f64_s (f64.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I64TruncUF32Code, '(module (func (drop (i64.trunc_f32_u (f32.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(I64TruncUF64Code, '(module (func (drop (i64.trunc_f64_u (f64.const nan)))) (start 0))', RuntimeError, /invalid conversion to integer/); +test(CallIndirectCode, '(module (table 1 funcref) (func (call_indirect (type 0) (i32.const 0))) (start 0))', RuntimeError, /indirect call to null/); +test(CallIndirectCode, '(module (table 1 funcref) (func (call_indirect (type 0) (i32.const 1))) (start 0))', RuntimeError, /index out of bounds/); +test(CallIndirectCode, '(module (table funcref (elem $blah)) (func (call_indirect (type 0) (i32.const 0))) (func $blah (param i32)) (start 0))', RuntimeError, /indirect call signature mismatch/); +testLoad(I32Load8S, 'i32.load8_s', 1, RuntimeError, /index out of bounds/); +testLoad(I32Load8U, 'i32.load8_u', 1, RuntimeError, /index out of bounds/); +testLoad(I32Load16S, 'i32.load16_s', 2, RuntimeError, /index out of bounds/); +testLoad(I32Load16U, 'i32.load16_u', 2, RuntimeError, /index out of bounds/); +testLoad(I64Load8S, 'i64.load8_s', 1, RuntimeError, /index out of bounds/); +testLoad(I64Load8U, 'i64.load8_u', 1, RuntimeError, /index out of bounds/); +testLoad(I64Load16S, 'i64.load16_s', 2, RuntimeError, /index out of bounds/); +testLoad(I64Load16U, 'i64.load16_u', 2, RuntimeError, /index out of bounds/); +testLoad(I64Load32S, 'i64.load32_s', 4, RuntimeError, /index out of bounds/); +testLoad(I64Load32U, 'i64.load32_u', 4, RuntimeError, /index out of bounds/); +testLoad(I32Load, 'i32.load', 4, RuntimeError, /index out of bounds/); +testLoad(I64Load, 'i64.load', 8, RuntimeError, /index out of bounds/); +testLoad(F32Load, 'f32.load', 4, RuntimeError, /index out of bounds/); +testLoad(F64Load, 'f64.load', 8, RuntimeError, /index out of bounds/); +testStore(I32Store8, 'i32.store8', 'i32', 1, RuntimeError, /index out of bounds/); +testStore(I32Store16, 'i32.store16', 'i32', 2, RuntimeError, /index out of bounds/); +testStore(I64Store8, 'i64.store8', 'i64', 1, RuntimeError, /index out of bounds/); +testStore(I64Store16, 'i64.store16', 'i64', 2, RuntimeError, /index out of bounds/); +testStore(I64Store32, 'i64.store32', 'i64', 4, RuntimeError, /index out of bounds/); +testStore(I32Store, 'i32.store', 'i32', 4, RuntimeError, /index out of bounds/); +testStore(I64Store, 'i64.store', 'i64', 8, RuntimeError, /index out of bounds/); +testStore(F32Store, 'f32.store', 'f32', 4, RuntimeError, /index out of bounds/); +testStore(F64Store, 'f64.store', 'f64', 8, RuntimeError, /index out of bounds/); + +// Stack overflow isn't really a trap or part of the formally-specified +// semantics of call so use the same InternalError as JS and use the bytecode +// offset of the function body (which happens to start with the number of +// local entries). +test(4 /* = num locals */, '(module (func (local i32 i64 f32 f64) (call 0)) (start 0))', InternalError, /too much recursion/); + +// Test whole callstack. +var {stack, binary} = test(UnreachableCode, `(module + (type $v2v (func)) + (func $a unreachable) + (func $b call $a) + (func $c call $b) + (table funcref (elem $c)) + (func $d (call_indirect (type $v2v) (i32.const 0))) + (func $e call $d) + (start $e) +)`, RuntimeError, /unreachable executed/); +const N = 5; +assertEq(stack.length > N, true); +assertEq(getWasmFunctionIndex(stack[0].line), 0); +var lastLine = stack[0].line; +for (var i = 1; i < N; i++) { + assertEq(getWasmFunctionIndex(stack[i].line), i); + assertEq(stack[i].line > lastLine, true); + lastLine = stack[i].line; + assertEq(binary[getWasmBytecode(stack[i].column)], i == 3 ? CallIndirectCode : CallCode); +} + +function testCompileError(opcode, text) { + var binary = new Uint8Array(wasmTextToBinary(text)); + var exn; + try { + new Instance(new Module(binary)); + } catch (e) { + exn = e; + } + + assertEq(exn instanceof CompileError, true); + var offset = Number(exn.message.match(/at offset (\d*)/)[1]); + assertEq(binary[offset], opcode); +} + +testCompileError(CallCode, '(module (func $f (param i32)) (func $g call $f))'); +testCompileError(I32AddCode, '(module (func (i32.add (i32.const 1) (f32.const 1))))'); +testCompileError(EndCode, '(module (func (block (result i32))))'); diff --git a/js/src/jit-test/tests/wasm/exceptions/bug-1744663-extended.js b/js/src/jit-test/tests/wasm/exceptions/bug-1744663-extended.js new file mode 100644 index 0000000000..d6bf53df5d --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/bug-1744663-extended.js @@ -0,0 +1,237 @@ +load(libdir + "eqArrayHelper.js"); + +// These tests ensure that the gc related errors in bug 1744663 are resolved. + +{ + let catchlessTry = ` + try + (call $gc) + (throw $exn) + end`; + let rethrow0 = ` + try + (call $gc) + (throw $exn) + catch $exn + (rethrow 0) + end`; + let rethrow1 = ` + try + (throw $exn) + catch_all + try + (throw $exn) + catch $exn + (rethrow 1) + end + end`; + let delegate0 = ` + try + (call $gc) + (throw $exn) + delegate 0`; + let delegate1 = ` + (block + try + (call $gc) + (throw $exn) + delegate 1)`; + let delegate0InCatch = ` + try + (throw $exn) + catch_all + try + (call $gc) + (throw $exn) + delegate 0 + end`; + let delegate1InCatch = ` + try + throw $exn + catch_all + try + (call $gc) + (throw $exn) + delegate 1 + end`; + + let rethrowingBodies = [catchlessTry, rethrow0, delegate0, delegate1, + rethrow1, delegate0InCatch, delegate1InCatch]; + + function rethrowingIndirectly(rethrowingBody) { + let exports = wasmEvalText( + `(module + (tag $exn (export "exn")) + (import "js" "gc" (func $gc)) + (func $throwExn (export "throwExn") ${rethrowingBody}))`, + {js: {gc: () => { gc(); }}} + ).exports; + + let mod = + `(module + (type $exnType (func)) + (type $indirectFunctype (func)) + (import "m" "exn" (tag $exn (type $exnType))) + (import "m" "throwExn" (func $throwExn (type $indirectFunctype))) + (table funcref (elem $throwExn)) + (func (export "testFunc") (result i32) + try (result i32) + (call_indirect (type $indirectFunctype) (i32.const 0)) + (i32.const 0) + catch $exn (i32.const 1) + end + ) + )`; + + let testFunction = wasmEvalText(mod, { m : exports}).exports.testFunc; + assertEq(testFunction(), 1); + }; + + for (let rethrowingBody of rethrowingBodies) { + //console.log("Calling rethrowingIndirectly with rethrowingBody = " + rethrowingBody); + rethrowingIndirectly(rethrowingBody); + } +} + +// The full test case that caused the original failure. + +{ + gczeal(2,1); // Collect after every allocation. + + let v128Type = " i32"; + let wrongV128 = "(i32.const 0)"; + let correctV128 = "(i32.const 1)"; + let checkV128Value = ""; + + if (wasmSimdEnabled()) { + v128Type = " v128"; + wrongV128 = "(v128.const i32x4 11 22 33 44)"; + correctV128 = "(v128.const i32x4 55 66 77 88)"; + checkV128Value = `;; Check the V128 value + (v128.const i32x4 55 66 77 88) + (i32x4.eq) + (i32x4.all_true)`; + } + + let exports = wasmEvalText( + `(module + (type $exnType (func (param i32 i64 f32 f64 externref ${v128Type}))) + (type $indirectFunctype (func (param i32 i64 f32 f64 externref ${v128Type}) + (result i32 i64 f32 f64 externref ${v128Type}))) + (tag $exn (export "exn") (type $exnType)) + (tag $emptyExn (export "emptyExn")) + (func $throwExn (export "throwExn") (param i32 i64 f32 f64 externref ${v128Type}) + (result i32 i64 f32 f64 externref ${v128Type}) + (local $ifPredicate i32) + (local.get 0) ;; i32 + (local.get 1) ;; i64 + (local.get 2) ;; f32 + (local.get 3) ;; f64 + (local.get 4) ;; ref + (local.get 5) ;; v128 or i32 + try (param i32 i64 f32 f64 externref ${v128Type}) + (if (param i32 i64 f32 f64 externref ${v128Type}) + (local.get $ifPredicate) + (then (throw $exn)) + (else (throw $exn))) + catch $exn + try (param i32 i64 f32 f64 externref ${v128Type}) + (throw $exn) + catch_all (rethrow 1) + end + catch_all + end + unreachable) + (func $throwEmptyExn (export "throwEmptyExn") + (param i32 i64 f32 f64 externref ${v128Type}) + (result i32 i64 f32 f64 externref ${v128Type}) + (throw $emptyExn) + unreachable) + (func $returnArgs (export "returnArgs") + (param i32 i64 f32 f64 externref ${v128Type}) + (result i32 i64 f32 f64 externref ${v128Type}) + (local.get 0) ;; i32 + (local.get 1) ;; i64 + (local.get 2) ;; f32 + (local.get 3) ;; f64 + (local.get 4) ;; ref + (local.get 5)) + (table (export "tab") funcref (elem $throwExn ;; 0 + $throwEmptyExn ;; 1 + $returnArgs)) ;; 2 + )`).exports; + + var mod = + `(module + (type $exnType (func (param i32 i64 f32 f64 externref ${v128Type}))) + (type $indirectFunctype (func (param i32 i64 f32 f64 externref ${v128Type}) + (result i32 i64 f32 f64 externref ${v128Type}))) + (import "m" "exn" (tag $exn (type $exnType))) + (import "m" "emptyExn" (tag $emptyExn)) + (import "m" "throwExn" (func $throwExn (type $indirectFunctype))) + (import "m" "throwEmptyExn" + (func $throwEmptyExn (type $indirectFunctype))) + (import "m" "returnArgs" + (func $returnArgs (type $indirectFunctype))) + (import "m" "tab" (table 3 funcref)) + (func (export "testFunc") (param $correctRef externref) + (param $wrongRef externref) + ;; The last i32 result is the v128 check. + (result i32 i64 f32 f64 externref i32) + (local $ifPredicate i32) + try (result i32 i64 f32 f64 externref i32) + ;; Wrong values + (i32.const 5) + (i64.const 6) + (f32.const 0.1) + (f64.const 0.6437) + (local.get $wrongRef) + ${wrongV128} + ;; throwEmptyExn + (call_indirect (type $indirectFunctype) (i32.const 1)) + drop ;; Drop the last v128 value. + (i32.const 0) + catch_all + try (result i32 i64 f32 f64 externref ${v128Type}) + ;; Values to throw. + (i32.const 2) + (i64.const 3) + (f32.const 4) + (f64.const 13.37) + (local.get $correctRef) + ${correctV128} + (call_indirect (type $indirectFunctype) (i32.const 2)) ;; returnArgs + (call_indirect (type $indirectFunctype) (i32.const 0)) ;; throwExn + drop drop ;; Drop v128 and externref to do trivial and irrelevant ops. + (f64.const 5) + (f64.add) + (local.get $wrongRef) + ${wrongV128} + ;; throwEmptyExn + (call_indirect (type $indirectFunctype) (i32.const 1)) + unreachable + catch $emptyExn + ;; Wrong values + (i32.const 5) + (i64.const 6) + (f32.const 0.1) + (f64.const 0.6437) + (local.get $wrongRef) + ${wrongV128} + catch $exn + catch_all + ;; Wrong values + (i32.const 5) + (i64.const 6) + (f32.const 0.1) + (f64.const 0.6437) + (local.get $wrongRef) + ${wrongV128} + end + ${checkV128Value} + end))`; + + let testAllValtypes = wasmEvalText(mod, { m : exports}).exports.testFunc; + assertEqArray(testAllValtypes("foo", "bar"), + [2, 3n, 4, 13.37, "foo", 1]); +} diff --git a/js/src/jit-test/tests/wasm/exceptions/bug-1744663.js b/js/src/jit-test/tests/wasm/exceptions/bug-1744663.js new file mode 100644 index 0000000000..2ab1a6b925 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/bug-1744663.js @@ -0,0 +1,71 @@ +gczeal(2,1); + +function failureCallingTestFunction() { + let exports = wasmEvalText( + `(module + (tag $exn (export "exn")) + (func $throwExn (export "throwExn") + ;; Note that this does not fail if this function body is a plain (throw $exn). + try + (throw $exn) + end + ))` + ).exports; + + let mod = + `(module + (type $exnType (func)) + (type $indirectFunctype (func)) + (import "m" "exn" (tag $exn (type $exnType))) + (import "m" "throwExn" (func $throwExn (type $indirectFunctype))) + (table funcref (elem $throwExn)) + (func (export "testFunc") (result i32) + try + (call_indirect (type $indirectFunctype) (i32.const 0)) + catch_all + end + i32.const 1))`; + + let testFunction = wasmEvalText(mod, { m : exports}).exports.testFunc; + testFunction(); +}; + +function failureRethrow1() { + let exports = wasmEvalText( + `(module + (tag $exn (export "exn")) + (func $throwExn (export "throwExn") + try + (throw $exn) + catch_all + try + throw $exn + catch_all + (rethrow 1) + end + end + ))` + ).exports; + + let mod = + `(module + (type $exnType (func)) + (type $indirectFunctype (func)) + (import "m" "exn" (tag $exn (type $exnType))) + (import "m" "throwExn" (func $throwExn (type $indirectFunctype))) + (table funcref (elem $throwExn)) + (func (export "testFunc") (result i32) + try + (call_indirect (type $indirectFunctype) (i32.const 0)) + catch_all + end + (i32.const 1)))`; + + let testFunction = wasmEvalText(mod, { m : exports}).exports.testFunc; + testFunction(); +}; + +console.log("Calling failureCallingTestFunction."); +failureCallingTestFunction(); +console.log("Calling failureRethrow1."); +failureRethrow1(); diff --git a/js/src/jit-test/tests/wasm/exceptions/bug-1747562.js b/js/src/jit-test/tests/wasm/exceptions/bug-1747562.js new file mode 100644 index 0000000000..e54b860664 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/bug-1747562.js @@ -0,0 +1,35 @@ +let bytes = wasmTextToBinary(`(module + (type (;0;) (func)) + (func (;0;) (type 0) + block ;; label = @1 + try ;; label = @2 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + call 0 + delegate 0 + end) + (export "" (func 0)))`); +let module = new WebAssembly.Module(bytes); diff --git a/js/src/jit-test/tests/wasm/exceptions/bug-1747704.js b/js/src/jit-test/tests/wasm/exceptions/bug-1747704.js new file mode 100644 index 0000000000..f9f4292961 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/bug-1747704.js @@ -0,0 +1,14 @@ +let {shouldTrap} = wasmEvalText(`(module + (func + try + i32.const 0 + table.get 0 + ref.is_null + drop + catch_all + end + ) + (table 0 funcref) + (export "shouldTrap" (func 0)) +)`).exports; +assertErrorMessage(shouldTrap, WebAssembly.RuntimeError, /table index/); diff --git a/js/src/jit-test/tests/wasm/exceptions/bug-1751699.js b/js/src/jit-test/tests/wasm/exceptions/bug-1751699.js new file mode 100644 index 0000000000..38268e7905 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/bug-1751699.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => { + wasmEvalText(` + (import "" "" (func $d)) + (func try call $d end) + `); +}); diff --git a/js/src/jit-test/tests/wasm/exceptions/bug-1767446.js b/js/src/jit-test/tests/wasm/exceptions/bug-1767446.js new file mode 100644 index 0000000000..5cf38a757c --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/bug-1767446.js @@ -0,0 +1,26 @@ +// Dead code elimination can remove wasm calls that may leave behind dangling +// try notes. +wasmEvalText(`(module + (type (;0;) (func (result i32 i32 i32))) + (func $main (type 0) (result i32 i32 i32) + try (result i32 i32 i32) ;; label = @1 + call $main + call $main + i32.const 541 + i32.const 0 + br_if 0 (;@1;) + br_if 0 (;@1;) + br_if 0 (;@1;) + br_if 0 (;@1;) + call $main + call $main + br_if 0 (;@1;) + br_if 0 (;@1;) + call $main + call $main + call $main + unreachable + end + unreachable + ) +)`); diff --git a/js/src/jit-test/tests/wasm/exceptions/bug-1788213.js b/js/src/jit-test/tests/wasm/exceptions/bug-1788213.js new file mode 100644 index 0000000000..4d0b4abcdc --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/bug-1788213.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => { + wasmEvalText(`(import "" "" (tag $undef)) (func throw 0) (func (try (do)))`); +}); diff --git a/js/src/jit-test/tests/wasm/exceptions/bug-1791361.js b/js/src/jit-test/tests/wasm/exceptions/bug-1791361.js new file mode 100644 index 0000000000..9c4432de91 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/bug-1791361.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => { + wasmEvalText(` + (tag $d) + (func $anotherLocalFuncThrowsExn) + (func throw $d) + (func (try (do + call $anotherLocalFuncThrowsExn + ))) + `); +}); diff --git a/js/src/jit-test/tests/wasm/exceptions/bug-1797685.js b/js/src/jit-test/tests/wasm/exceptions/bug-1797685.js new file mode 100644 index 0000000000..d2f02a8fd6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/bug-1797685.js @@ -0,0 +1,8 @@ +assertErrorMessage(() => wasmEvalText(`(module + (func) + (func + try + call 0 + delegate 4294967295 + ) +)`), WebAssembly.CompileError, /delegate/); diff --git a/js/src/jit-test/tests/wasm/exceptions/caching.js b/js/src/jit-test/tests/wasm/exceptions/caching.js new file mode 100644 index 0000000000..5427de5102 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/caching.js @@ -0,0 +1,28 @@ +// |jit-test| skip-if: !wasmCachingEnabled() + +load(libdir + "wasm-caching.js"); + +// Test that the tag section is cached correctly +testCached(`(module + (tag $t (export "t")) + (func (export "r") + throw $t + ) +)`, {}, i => { + assertErrorMessage(() => i.exports.r(), WebAssembly.Exception, /.*/); +}); + +// Test that try notes are cached correctly +testCached(`(module + (tag $t) + (func (export "r") (result i32) + try (result i32) + throw $t + i32.const 0 + catch $t + i32.const 1 + end + ) +)`, {}, i => { + assertEq(i.exports.r(), 1, "caught"); +}); diff --git a/js/src/jit-test/tests/wasm/exceptions/calls.js b/js/src/jit-test/tests/wasm/exceptions/calls.js new file mode 100644 index 0000000000..63a640e951 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/calls.js @@ -0,0 +1,439 @@ +// ----------------------------------------------------------------------------- +// This file contains tests checking Wasm functions with throwing functions and +// try-catch code involving more complex control flow, testing that multiple +// values returned from calls in try code are not affected by multiple branching +// towards the landing pad, as well as making sure exceptions carrying multiple +// values of any Wasm numtype transport the exception values correctly across +// calls. +// +// There are tests for local direct calls, for imported direct calls, for +// indirect calls in a local table with local functions, for indirect calls in a +// local table of imported functions, and for indirect calls in an imported +// table of imported functions. +// +// - TODO: Add reftype values, when support for reftypes in exceptions is +// implemented. +// ----------------------------------------------------------------------------- + +load(libdir + "eqArrayHelper.js"); + +// All individual tests take a string 'localThrow' as argument, and will be run +// with each element of the result of the following function. + +function generateLocalThrows(types, baseThrow) { + // Arguments: + // - 'types': A string of space separated Wasm types. + // - 'baseThrow': A string with a Wasm instruction sequence of Wasm functype + // `[${types}]-> [t*], which takes `types` arguments and ends + // up throwing the tag '$exn'. + // Result: + // - A JS array of strings, each representing a Wasm instruction sequence + // which is like `baseThrow', i.e., a Wasm instruction sequence of Wasm + // functype `[${types}]-> [t*], which takes `types` arguments and ends up + // throwing the tag '$exn'. The result does not include 'baseThrow'. + // + // All strings in Wasm text format. + + // Basic throws; + let catchlessTryThrow = + `try (param ${types}) + ${baseThrow} + end`; + + let catchlessThrowExnref = + `try_table (param ${types}) + ${baseThrow} + end`; + + let catchAndThrow = + `try (param ${types}) + ${baseThrow} + catch $exn + ${baseThrow} + catch_all + end`; + + let catchAndThrowExnref = + `(block $join (param ${types}) + (block $catch (param ${types}) (result ${types}) + (block $catchAll (param ${types}) + try_table (param ${types}) (catch $exn $catch) (catch_all $catchAll) + ${baseThrow} + unreachable + end + ) + br $join + ) + ${baseThrow} + )`; + + let blockThrow = + `(block (param ${types}) + ${baseThrow})`; + + // This Wasm code requires that the function it appears in has an i32 local + // with name "$ifPredicate". + let conditionalThrow = + `(if (param ${types}) + (local.get $ifPredicate) + (then ${baseThrow}) + (else ${baseThrow}))`; + + // Including try-delegate. + let baseDelegate = + `try (param ${types}) + ${baseThrow} + delegate 0`; + + // Delegate just outside the block. + let nestedDelegate1InBlock = + `(block $label1 (param ${types}) + try (param ${types}) + ${baseThrow} + delegate $label1)`; + + let basicThrows = [catchlessTryThrow, blockThrow, conditionalThrow, + baseDelegate, nestedDelegate1InBlock]; + if (wasmExnRefEnabled()) { + basicThrows = basicThrows.concat(catchlessThrowExnref, catchAndThrowExnref); + } + + // Secondary throws (will end up inside a catch block). + + let baseRethrow = + `(rethrow 0)`; + + let nestedRethrow = + `try (param ${types}) + ${baseThrow} + catch $exn + (rethrow 1) + catch_all + (rethrow 0) + end`; + + let catchAllRethrowOriginal = + `try (param ${types}) + ${baseThrow} + catch_all + (rethrow 1) + end`; + + let secondaryThrows = + [].concat(basicThrows, + [baseRethrow, nestedRethrow, catchAllRethrowOriginal]); + + // Nestings. + + function basicNesting (basicThrow, secondaryThrow) { + return `try (param ${types}) + ${basicThrow} + catch $exn + ${secondaryThrow} + catch_all + end`; + }; + + let result = []; + + for (let basicThrow of basicThrows) { + result.push(basicThrow); + let isExnref = basicThrow == catchlessThrowExnref || basicThrow == catchAndThrowExnref; + for (let secondaryThrow of secondaryThrows) { + let isRethrow = secondaryThrow == baseRethrow || secondaryThrow == nestedRethrow || secondaryThrow == catchAllRethrowOriginal; + if (isExnref && isRethrow) { + continue; + } + result.push(basicNesting(basicThrow, secondaryThrow)); + } + } + + return result; +}; + +{ + // Some variables to be used in all tests. + let typesJS = ["i32", "i64", "f32", "f64", "externref"]; + let types = typesJS.join(" "); + + // The following depend on whether simd is enabled or not. We write it like + // this so we can run this test also when SIMD is not enabled. + let exntype = ""; + let wrongV128 = ""; + let throwV128 = ""; + let checkV128Value = ""; + + if (wasmSimdEnabled()) { + exntype = types + " v128"; + wrongV128 = `(v128.const i32x4 11 22 33 44)`; + throwV128 = `(v128.const i32x4 55 66 77 88)`; + checkV128Value = `;; Check the V128 value + ${throwV128} + (i32x4.eq) + (i32x4.all_true)`; + } else { + exntype = types + " i32"; + wrongV128 = "(i32.const 0)"; + throwV128 = "(i32.const 1)"; + checkV128Value = ""; + } + + let exnTypeDef = `(type $exnType (func (param ${exntype})))`; + + let throwValues = + `;; Values to throw. + (i32.const 2) + (i64.const 3) + (f32.const 4) + (f64.const 13.37) + (local.get $correctRef) + ${throwV128}`; + + // The last 1 is the result of the test that the v128 value is correct, done + // in wasm code (if simd is enabled). + let correctResultsJS = [2, 3n, 4, 13.37, "foo", 1]; + + let wrongValues = + `;; Wrong values + (i32.const 5) + (i64.const 6) + (f32.const 0.1) + (f64.const 0.6437) + (local.get $wrongRef) + ${wrongV128}`; + + // The individual tests. ----------------------------------------------------- + + function testDirectCallsThrowing(localThrow) { + // Test direct function calls throwing any numeric value. + + let throwifTypeInline = + // The result of the "throwif" function will be used as an argument the + // second time "throwif" is called. + `(param $ifPredicate i32) (param $correctRef externref) (result i32)`; + + let moduleHeaderThrowif = + `(module + ${exnTypeDef} + (tag $exn (export "exn") (type $exnType)) + (func $throwif (export "throwif") ${throwifTypeInline} + (if + (local.get $ifPredicate) + (then + ${throwValues} + ${localThrow})) + (i32.const 1))`; + + let testModuleRest = + `(tag $notThrownExn) + (func $doNothing) + (func (export "testFunc") (param $correctRef externref) + (param $wrongRef externref) + (result ${types} i32) + (local $ifPredicate i32) + (local.get $ifPredicate) + try (param i32) (result ${exntype}) + (local.get $wrongRef) + (call $throwif) ;; Returns 1. + (call $doNothing) ;; Does nothing. + (local.get $correctRef) + (call $throwif) ;; Throws $exn. + (drop) + ${wrongValues} ;; Won't reach this point. + ${localThrow} + unreachable + catch $notThrownExn + ${wrongValues} + catch $exn + end + ${checkV128Value}))`; + + function testDirectLocalCallsThrowing() { + let mod = moduleHeaderThrowif + testModuleRest; + // console.log("DIRECT LOCAL MOD = " + mod); // Uncomment for debugging. + + assertEqArray(wasmEvalText(mod).exports.testFunc("foo", "bar"), + correctResultsJS); + }; + + function testDirectImportedCallsThrowing() { + let exports = wasmEvalText(moduleHeaderThrowif + `)`).exports; + // Uncomment for debugging. + //console.log("DIRECT EXPORTS = " + moduleHeaderThrowif + ")"); + + let mod = + `(module + ${exnTypeDef} + (import "m" "exn" (tag $exn (type $exnType))) + (import "m" "throwif" (func $throwif ${throwifTypeInline}))` + + testModuleRest; + // console.log("DIRECT IMPORT MOD = " + mod); // Uncomment for debugging. + + assertEqArray( + wasmEvalText(mod, { m : exports}).exports.testFunc("foo", "bar"), + correctResultsJS); + }; + + testDirectLocalCallsThrowing(); + testDirectImportedCallsThrowing(); + }; + + function testIndirectCallsThrowing(localThrow) { + // Test indirect calls throwing exceptions. + + let indirectFunctypeInline = `(param ${exntype}) + (result ${exntype})`; + let getIndirectArgs = `(local.get 0) ;; i32 + (local.get 1) ;; i64 + (local.get 2) ;; f32 + (local.get 3) ;; f64 + (local.get 4) ;; ref + ;; v128 + (local.get 5)`; + + let testFunctypeInline = `(param $correctRef externref) + (param $wrongRef externref) + ;; The last i32 result is the v128 check. + (result ${types} i32)`; + + let moduleHeader = + `(module + ${exnTypeDef} + (type $indirectFunctype (func ${indirectFunctypeInline})) + (tag $exn (export "exn") (type $exnType)) + (tag $emptyExn (export "emptyExn")) + (func $throwExn (export "throwExn") ${indirectFunctypeInline} + (local $ifPredicate i32) + ${getIndirectArgs} + ${localThrow} + unreachable) + (func $throwEmptyExn (export "throwEmptyExn") + ${indirectFunctypeInline} + (throw $emptyExn) + unreachable) + (func $returnArgs (export "returnArgs") ${indirectFunctypeInline} + ${getIndirectArgs}) + (table (export "tab") funcref (elem $throwExn ;; 0 + $throwEmptyExn ;; 1 + $returnArgs)) ;; 2 + `; + + // The main test function happens to have the same Wasm functype as the + // indirect calls. + let testFuncHeader = `(func (export "testFunc") ${testFunctypeInline} + (local $ifPredicate i32) + `; + + // To test indirect calls to a local table of local functions + function moduleIndirectLocalLocal(functionBody) { + return moduleHeader + testFuncHeader + functionBody + `))`; + }; + + let exports = wasmEvalText(moduleHeader + ")").exports; + // Uncomment for debugging. + //console.log("INDIRECT EXPORTS = " + moduleHeader + ")"); + + let moduleHeaderImporting = + `(module + ${exnTypeDef} + (type $indirectFunctype (func ${indirectFunctypeInline})) + (import "m" "exn" (tag $exn (type $exnType))) + (import "m" "emptyExn" (tag $emptyExn)) + (import "m" "throwExn" (func $throwExn (type $indirectFunctype))) + (import "m" "throwEmptyExn" + (func $throwEmptyExn (type $indirectFunctype))) + (import "m" "returnArgs" + (func $returnArgs (type $indirectFunctype)))`; + + // To test indirect calls to a local table of imported functions. + function moduleIndirectLocalImport(functionBody) { + return moduleHeaderImporting + + `(table funcref (elem $throwExn $throwEmptyExn $returnArgs))` + + testFuncHeader + functionBody + `))`; + }; + + // To test indirect calls to an imported table of imported functions. + function moduleIndirectImportImport(functionBody) { + return moduleHeaderImporting + + `(import "m" "tab" (table 3 funcref))` + + testFuncHeader + functionBody + `))`; + }; + + function getModuleTextsForFunctionBody(functionBody) { + return [moduleIndirectLocalLocal(functionBody), + moduleIndirectLocalImport(functionBody), + moduleIndirectImportImport(functionBody)]; + }; + + // The function bodies for the tests. + + // Three indirect calls, the middle of which throws and will be caught. The + // results of the first and second indirect calls are used by the next + // indirect call. This should be called from try code, to check that the + // pad-branches don't interfere with the results of each call. + let indirectThrow = `${throwValues} + (call_indirect (type $indirectFunctype) (i32.const 2)) ;; returnArgs + (call_indirect (type $indirectFunctype) (i32.const 0)) ;; throwExn + drop drop ;; Drop v128 and externref to do trivial and irrelevant ops. + (f64.const 5) + (f64.add) + (local.get $wrongRef) + ${wrongV128} + ;; throwEmptyExn + (call_indirect (type $indirectFunctype) (i32.const 1)) + unreachable`; + + // Simple try indirect throw and catch. + let simpleTryIndirect = ` + try (result ${exntype}) + ${indirectThrow} + catch $emptyExn + ${wrongValues} + catch $exn + catch_all + ${wrongValues} + end + ${checkV128Value}`; + + // Indirect throw/catch_all, with a simple try indirect throw nested in the + // catch_all. + let nestedTryIndirect = + `try (result ${types} i32) + ${wrongValues} + ;; throwEmptyExn + (call_indirect (type $indirectFunctype) (i32.const 1)) + drop ;; Drop the last v128 value. + (i32.const 0) + catch_all + ${simpleTryIndirect} + end`; + + let functionBodies = [simpleTryIndirect, nestedTryIndirect]; + + // Test throwing from indirect calls. + for (let functionBody of functionBodies) { + // console.log("functionBody = : " + functionBody); // Uncomment for debugging. + + for (let mod of getModuleTextsForFunctionBody(functionBody)) { + //console.log("mod = : " + mod); // Uncomment for debugging. + + let testFunction = wasmEvalText(mod, { m : exports}).exports.testFunc; + assertEqArray(testFunction("foo", "bar"), + correctResultsJS); + } + } + }; + + // Run all tests. ------------------------------------------------------------ + + let localThrows = + ["(throw $exn)"].concat(generateLocalThrows(exntype, "(throw $exn)")); + + for (let localThrow of localThrows) { + // Uncomment for debugging. + // console.log("Testing with localThrow = " + localThrow); + + testDirectCallsThrowing(localThrow); + testIndirectCallsThrowing(localThrow); + } +} diff --git a/js/src/jit-test/tests/wasm/exceptions/directives.txt b/js/src/jit-test/tests/wasm/exceptions/directives.txt new file mode 100644 index 0000000000..84f10ac2b3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/directives.txt @@ -0,0 +1 @@ +|jit-test| --wasm-exceptions; test-also=--wasm-exnref; test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; include:wasm.js; skip-if: !wasmExceptionsEnabled() diff --git a/js/src/jit-test/tests/wasm/exceptions/events.js b/js/src/jit-test/tests/wasm/exceptions/events.js new file mode 100644 index 0000000000..00bb244546 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/events.js @@ -0,0 +1,160 @@ +// Tests for tag section support + +load(libdir + "wasm-binary.js"); + +function wasmEval(code, imports) { + new WebAssembly.Instance(new WebAssembly.Module(code), imports).exports; +} + +function wasmError(code, errorType, regexp) { + assertErrorMessage(() => wasmEval(code, {}), errorType, regexp); +} + +const emptyType = { args: [], ret: VoidCode }; +const badExnType = { args: [], ret: I32Code }; + +wasmEvalText(` + (module + (type (func (param i32))) + (tag $exn (type 0))) +`); + +wasmError( + moduleWithSections([ + sigSection([emptyType]), + memorySection(0), + { name: tagId, body: [] }, + ]), + WebAssembly.CompileError, + /expected number of tags/ +); + +wasmError( + moduleWithSections([ + sigSection([emptyType]), + memorySection(0), + { name: tagId, body: [1, 1] }, + ]), + WebAssembly.CompileError, + /illegal tag kind/ +); + +wasmError( + moduleWithSections([ + sigSection([emptyType]), + memorySection(0), + { name: tagId, body: [1, 0] }, + ]), + WebAssembly.CompileError, + /expected function index in tag/ +); + +wasmEval( + moduleWithSections([ + sigSection([emptyType]), + memorySection(0), + tagSection([{ type: 0 }]), + ]) +); + +wasmError( + moduleWithSections([ + sigSection([badExnType]), + memorySection(0), + tagSection([{ type: 0 }]), + ]), + WebAssembly.CompileError, + /tag function types must not return anything/ +); + +wasmError( + moduleWithSections([ + sigSection([emptyType]), + memorySection(0), + tagSection([{ type: 1 }]), + ]), + WebAssembly.CompileError, + /function type index in tag out of bounds/ +); + +wasmError( + moduleWithSections([ + sigSection([emptyType]), + tagSection([{ type: 0 }]), + memorySection(0), + ]), + WebAssembly.CompileError, + /expected custom section/ +); + +(() => { + const body = [1]; + body.push(...string("mod")); + body.push(...string("exn")); + body.push(...varU32(TagCode)); + + wasmError( + moduleWithSections([ + sigSection([emptyType]), + { name: importId, body: body }, + ]), + WebAssembly.CompileError, + /expected tag kind/ + ); + + body.push(...varU32(0)); + wasmError( + moduleWithSections([ + sigSection([emptyType]), + { name: importId, body: body }, + ]), + WebAssembly.CompileError, + /expected function index in tag/ + ); + + body.push(...varU32(1)); + wasmError( + moduleWithSections([ + sigSection([emptyType]), + { name: importId, body: body }, + ]), + WebAssembly.CompileError, + /function type index in tag out of bounds/ + ); +})(); + +wasmEval( + moduleWithSections([ + sigSection([emptyType]), + memorySection(0), + tagSection([{ type: 0 }]), + exportSection([{ tagIndex: 0, name: "exn" }]), + ]) +); + +wasmError( + moduleWithSections([ + sigSection([emptyType]), + memorySection(0), + tagSection([{ type: 0 }]), + exportSection([{ tagIndex: 1, name: "exn" }]), + ]), + WebAssembly.CompileError, + /exported tag index out of bounds/ +); + +(() => { + const body = [1]; + body.push(...string("exn")); + body.push(...varU32(TagCode)); + wasmError( + moduleWithSections([ + sigSection([emptyType]), + memorySection(0), + tagSection([{ type: 0 }]), + { name: exportId, body: body }, + ]), + WebAssembly.CompileError, + /expected tag index/ + ); +})(); diff --git a/js/src/jit-test/tests/wasm/exceptions/example.js b/js/src/jit-test/tests/wasm/exceptions/example.js new file mode 100644 index 0000000000..ef9ecfdfce --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/example.js @@ -0,0 +1,29 @@ +// A diagram depicting the control flow graph of the function g below can be +// found in "js/src/wasm/WasmIonCompile.cpp". If you make any changes to this +// test file be sure to adjust the SMDOC documentation there as well. + +let g = wasmEvalText( + `(module + (tag $exn (param f64)) + (func $f) + (func (export "g") (param $arg i32) (result f64) + (local.get $arg) + try (param i32) (result f64) + (if (result f64) + (then + (f64.const 3)) + (else + (throw $exn (f64.const 6)))) + (call $f) + (f64.sub (f64.const 2)) ;; If $arg is 0 we end here, subtracting 3. + ;; If $arg is not 0 then the else-block throws $exn, caught below. + catch $exn + (f64.add (f64.const 4)) ;; Adds 4 to the value in the $exn (6). + catch_all ;; This shouldn't occur. + (f64.const 5) + end + ))` +).exports.g; + +assertEq(g(0), 10); +assertEq(g(1), 1); diff --git a/js/src/jit-test/tests/wasm/exceptions/import-export.js b/js/src/jit-test/tests/wasm/exceptions/import-export.js new file mode 100644 index 0000000000..fe7646678f --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/import-export.js @@ -0,0 +1,100 @@ +// Tests for Wasm exception import and export. + +function testImports() { + var mod = ` + (module + (type (func (param i32 i32))) + (import "m" "exn" (tag (type 0)))) + `; + + assertErrorMessage( + () => wasmEvalText(mod, { m: { exn: "not a tag" } }), + WebAssembly.LinkError, + /import object field 'exn' is not a Tag/ + ); +} + +function testExports() { + var exports1 = wasmEvalText(` + (module (type (func)) (tag (export "exn") (type 0))) + `).exports; + + assertEq(typeof exports1.exn, "object"); + assertEq(exports1.exn instanceof WebAssembly.Tag, true); + + var exports2 = wasmEvalText(` + (module + (type (func (param i32 i32))) + (tag (export "exn") (type 0))) + `).exports; + + assertEq(typeof exports2.exn, "object"); + assertEq(exports2.exn instanceof WebAssembly.Tag, true); +} + +function testImportExport() { + var exports = wasmEvalText(` + (module + (type (func (param i32))) + (tag (export "exn") (type 0))) + `).exports; + + wasmEvalText( + ` + (module + (type (func (param i32))) + (import "m" "exn" (tag (type 0)))) + `, + { m: exports } + ); + + assertErrorMessage( + () => { + wasmEvalText( + ` + (module + (type (func (param))) + (import "m" "exn" (tag (type 0)))) + `, + { m: exports } + ); + }, + WebAssembly.LinkError, + /imported tag 'm.exn' signature mismatch/ + ); +} + +// Test imports/exports descriptions. +function testDescriptions() { + const imports = WebAssembly.Module.imports( + new WebAssembly.Module( + wasmTextToBinary(` + (module $m + (type (func)) + (import "m" "e" (tag (type 0)))) + `) + ) + ); + + const exports = WebAssembly.Module.exports( + new WebAssembly.Module( + wasmTextToBinary(` + (module + (type (func)) + (tag (export "e") (type 0))) + `) + ) + ); + + assertEq(imports[0].module, "m"); + assertEq(imports[0].name, "e"); + assertEq(imports[0].kind, "tag"); + + assertEq(exports[0].name, "e"); + assertEq(exports[0].kind, "tag"); +} + +testImports(); +testExports(); +testImportExport(); +testDescriptions(); diff --git a/js/src/jit-test/tests/wasm/exceptions/instructions.js b/js/src/jit-test/tests/wasm/exceptions/instructions.js new file mode 100644 index 0000000000..a7f908704d --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/instructions.js @@ -0,0 +1,1550 @@ +// Tests for Wasm exception proposal instructions. + +// Test try blocks with no handlers. +assertEq( + wasmEvalText( + `(module + (func (export "f") (result i32) + try (result i32) (i32.const 0) end))` + ).exports.f(), + 0 +); + +assertEq( + wasmEvalText( + `(module + (func (export "f") (result i32) + try (result i32) (i32.const 0) (br 0) (i32.const 1) end))` + ).exports.f(), + 0 +); + +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + try (result i32) + (throw $exn) + (i32.const 1) + end + drop + (i32.const 2) + catch $exn + (i32.const 0) + end))` + ).exports.f(), + 0 +); + +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + try (result i32) + try + try + (throw $exn) + end + end + (i32.const 1) + end + drop + (i32.const 2) + catch $exn + (i32.const 0) + end))` + ).exports.f(), + 0 +); + +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + try (result i32) + try + try + (throw $exn) + end + catch_all + rethrow 0 + end + (i32.const 1) + end + drop + (i32.const 2) + catch $exn + (i32.const 0) + end))` + ).exports.f(), + 0 +); + +// Test trivial try-catch with empty bodies. +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) + try nop catch $exn end + (i32.const 0)))` + ).exports.f(), + 0 +); + +assertEq( + wasmEvalText( + `(module + (func (export "f") (result i32) + try nop catch_all end + (i32.const 0)))` + ).exports.f(), + 0 +); + +// Test try block with no throws +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + (i32.const 0) + catch $exn + (i32.const 1) + end))` + ).exports.f(), + 0 +); + +// Ensure catch block is really not run when no throw occurs. +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) (local i32) + try + (local.set 0 (i32.const 42)) + catch $exn + (local.set 0 (i32.const 99)) + end + (local.get 0)))` + ).exports.f(), + 42 +); + +// Simple uses of throw. +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + (i32.const 42) + (throw $exn) + catch $exn + drop + (i32.const 1) + end))` + ).exports.f(), + 1 +); + +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn (type 0)) + (func $foo (param i32) (result i32) + (local.get 0) (throw $exn)) + (func (export "f") (result i32) + try (result i32) + (i32.const 42) + (call $foo) + catch $exn + drop + (i32.const 1) + end))` + ).exports.f(), + 1 +); + +// Simple uses of throw of some Wasm vectortype values (Simd128). +if (wasmSimdEnabled()) { + assertEq( + wasmEvalText( + `(module + (type (func (param v128 v128 v128 v128))) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + (v128.const i32x4 42 41 40 39) + (v128.const f32x4 4.2 4.1 0.40 3.9) + (v128.const i64x2 42 41) + (v128.const f64x2 4.2 4.1) + (throw $exn) + catch $exn + drop drop drop + (i64x2.all_true) + end))` + ).exports.f(), + 1 + ); + + assertEq( + wasmEvalText( + `(module + (type (func (param v128 v128 v128 v128))) + (tag $exn (type 0)) + (func $foo (param v128 v128 v128 v128) (result i32) + (throw $exn (local.get 0) + (local.get 1) + (local.get 2) + (local.get 3))) + (func (export "f") (result i32) + try (result i32) + (v128.const i32x4 42 41 40 39) + (v128.const f32x4 4.2 4.1 0.40 3.9) + (v128.const i64x2 42 41) + (v128.const f64x2 4.2 4.1) + (call $foo) + catch $exn + drop drop drop + (i64x2.all_true) + end))` + ).exports.f(), + 1 + ); + + { + let imports = + wasmEvalText( + `(module + (tag $exn (export "exn") (param v128)) + (func (export "throws") (param v128) (result v128) + (throw $exn (local.get 0)) + (v128.const i32x4 9 10 11 12)))`).exports; + + let mod = + `(module + (import "m" "exn" (tag $exn (param v128))) + (import "m" "throws" (func $throws (param v128) (result v128))) + (func (export "f") (result i32) (local v128) + (v128.const i32x4 1 2 3 4) + (local.tee 0) + try (param v128) (result v128) + (call $throws) + catch $exn + catch_all (v128.const i32x4 5 6 7 8) + end + (local.get 0) + (i32x4.eq) + (i32x4.all_true)))`; + + assertEq(wasmEvalText(mod, { m : imports }).exports.f(), 1); + } +} + +// Further nested call frames should be ok. +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn (type 0)) + (func $foo (param i32) (result i32) + (local.get 0) (call $bar)) + (func $bar (param i32) (result i32) + (local.get 0) (call $quux)) + (func $quux (param i32) (result i32) + (local.get 0) (throw $exn)) + (func (export "f") (result i32) + try (result i32) + (i32.const 42) + (call $foo) + catch $exn + drop + (i32.const 1) + end))` + ).exports.f(), + 1 +); + +// Basic throwing from loop. + +assertEq( + wasmEvalText( + `(module + (tag $exn) + ;; For the purpose of this test, the params below should be increasing. + (func (export "f") (param $depth_to_throw_exn i32) + (param $maximum_loop_iterations i32) + (result i32) + (local $loop_counter i32) + ;; The loop is counting down. + (local.get $maximum_loop_iterations) + (local.set $loop_counter) + (block $catch + (loop $loop + (if (i32.eqz (local.get $loop_counter)) + (then + (return (i32.const 440))) + (else + try + (if (i32.eq (local.get $depth_to_throw_exn) + (local.get $loop_counter)) + (then + (throw $exn)) + (else + (local.set $loop_counter + (i32.sub (local.get $loop_counter) + (i32.const 1))))) + catch $exn (br $catch) + catch_all + end)) + (br $loop)) + (return (i32.const 10001))) + (i32.const 10000)))` + ).exports.f(2, 4), + 10000 +); + +// Ensure conditional throw works. +let conditional = wasmEvalText( + `(module + (type (func (param))) + (tag $exn (type 0)) + (func (export "f") (param i32) (result i32) + try (result i32) + (local.get 0) + if (result i32) + (throw $exn) + else + (i32.const 42) + end + catch $exn + (i32.const 99) + end))` +).exports.f; + +assertEq(conditional(0), 42); +assertEq(conditional(1), 99); + +// Ensure multiple & nested try-catch blocks work. +assertEq( + wasmEvalText( + `(module + (type (func (param))) + (tag $exn (type 0)) + (func $foo (throw $exn)) + (func (export "f") (result i32) (local i32) + try + nop + catch $exn + (local.set 0 (i32.const 99)) + end + try + (call $foo) + catch $exn + (local.set 0 (i32.const 42)) + end + (local.get 0)))` + ).exports.f(), + 42 +); + +assertEq( + wasmEvalText( + `(module + (type (func (param))) + (tag $exn (type 0)) + (func (export "f") (result i32) (local i32) + try + try + try + (throw $exn) + catch $exn + (local.set 0 (i32.const 42)) + end + catch $exn + (local.set 0 (i32.const 97)) + end + catch $exn + (local.set 0 (i32.const 98)) + end + (local.get 0)))` + ).exports.f(), + 42 +); + +assertEq( + wasmEvalText( + `(module + (tag $exn) + (func (export "f") (result i32) + try + throw $exn + catch $exn + try + (throw $exn) + catch $exn + end + end + (i32.const 27)))` + ).exports.f(), + 27 +); + +{ + let nested_throw_in_block_and_in_catch = + wasmEvalText( + `(module + (tag $exn) + (func $throw + (throw $exn)) + (func (export "f") (param $arg i32) (result i32) + (block (result i32) + try (result i32) + (call $throw) + (unreachable) + catch $exn + (if (result i32) + (local.get $arg) + (then + try (result i32) + (call $throw) + (unreachable) + catch $exn + (i32.const 27) + end) + (else + (i32.const 11)) + ) + end + ) + ))` + ).exports.f; + + assertEq(nested_throw_in_block_and_in_catch(1), 27); + assertEq(nested_throw_in_block_and_in_catch(0), 11); +} + +assertEq( + wasmEvalText( + `(module + (tag $thrownExn) + (tag $notThrownExn) + (func (export "f") (result i32) + try (result i32) + try (result i32) + (throw $thrownExn) + catch $notThrownExn + (i32.const 19) + catch $thrownExn + (i32.const 20) + catch_all + (i32.const 21) + end + end))` + ).exports.f(), + 20 +); + +// Test that uncaught exceptions get propagated. +assertEq( + wasmEvalText( + `(module + (tag $thrownExn) + (tag $notThrownExn) + (func (export "f") (result i32) (local i32) + try + try + try + (throw $thrownExn) + catch $notThrownExn + (local.set 0 + (i32.or (local.get 0) + (i32.const 1))) + end + catch $notThrownExn + (local.set 0 + (i32.or (local.get 0) + (i32.const 2))) + end + catch $thrownExn + (local.set 0 + (i32.or (local.get 0) + (i32.const 4))) + end + (local.get 0)))` + ).exports.f(), + 4 +); + +// Test tag dispatch for catches. +assertEq( + wasmEvalText( + `(module + (type (func (param))) + (tag $exn1 (type 0)) + (tag $exn2 (type 0)) + (tag $exn3 (type 0)) + (func (export "f") (result i32) + try (result i32) + throw $exn1 + catch $exn1 + i32.const 1 + catch $exn2 + i32.const 2 + catch $exn3 + i32.const 3 + end))` + ).exports.f(), + 1 +); + +assertEq( + wasmEvalText( + `(module + (type (func (param))) + (tag $exn1 (type 0)) + (tag $exn2 (type 0)) + (tag $exn3 (type 0)) + (func (export "f") (result i32) + try (result i32) + throw $exn2 + catch $exn1 + i32.const 1 + catch $exn2 + i32.const 2 + catch $exn3 + i32.const 3 + end))` + ).exports.f(), + 2 +); + +assertEq( + wasmEvalText( + `(module + (type (func (param))) + (tag $exn1 (type 0)) + (tag $exn2 (type 0)) + (tag $exn3 (type 0)) + (func (export "f") (result i32) + try (result i32) + throw $exn3 + catch $exn1 + i32.const 1 + catch $exn2 + i32.const 2 + catch $exn3 + i32.const 3 + end))` + ).exports.f(), + 3 +); + +assertEq( + wasmEvalText( + `(module + (type (func (param))) + (tag $exn1 (type 0)) + (tag $exn2 (type 0)) + (tag $exn3 (type 0)) + (tag $exn4 (type 0)) + (func (export "f") (result i32) + try (result i32) + try (result i32) + throw $exn4 + catch $exn1 + i32.const 1 + catch $exn2 + i32.const 2 + catch $exn3 + i32.const 3 + end + catch $exn4 + i32.const 4 + end))` + ).exports.f(), + 4 +); + +// Test usage of br before a throw. +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn (type 0)) + (func (export "f") (result i32) + try $l (result i32) + (i32.const 2) + (br $l) + (throw $exn) + catch $exn + drop + (i32.const 1) + end))` + ).exports.f(), + 2 +); + +assertEq( + wasmEvalText( + `(module + (type (func (param))) + (tag $exn (type 0)) + (func (export "f") (result i32) + try $l (result i32) + (throw $exn) + catch $exn + (i32.const 2) + (br $l) + rethrow 0 + end))` + ).exports.f(), + 2 +); + +assertEq( + wasmEvalText( + `(module + (type (func (param))) + (tag $exn (type 0)) + (func (export "f") (result i32) + try $l (result i32) + (throw $exn) + catch_all + (i32.const 2) + (br $l) + rethrow 0 + end))` + ).exports.f(), + 2 +); + +// Test br branching out of a catch block. +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn (type 0)) + (func (export "f") (result i32) + block $l (result i32) + block (result i32) + try (result i32) + (i32.const 42) + (throw $exn) + catch $exn + br $l + (i32.const 99) + end + end + end))` + ).exports.f(), + 42 +); + +// Test dead catch block. +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) + i32.const 0 + return + try nop catch $exn end))` + ).exports.f(), + 0 +); + +assertEq( + wasmEvalText( + `(module + (func (export "f") (result i32) + i32.const 0 + return + try nop catch_all end))` + ).exports.f(), + 0 +); + +// Test catch with exception values pushed to stack. +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (type (func (param i32))) + (type (func (param i64))) + (tag $exn (type 0)) + (tag $foo (type 1)) + (tag $bar (type 2)) + (func (export "f") (result i32) + try $l (result i32) + (i32.const 42) + (throw $exn) + catch $exn + catch_all + (i32.const 99) + end))` + ).exports.f(), + 42 +); + +// Throw an exception carrying more than one value. +assertEq( + wasmEvalText( + `(module + (type (func (param i32 i64 f32 f64))) + (tag $exn (type 0)) + (func (export "f") (result i32) + try $l (result i32 i64 f32 f64) + (i32.const 42) + (i64.const 84) + (f32.const 42.2) + (f64.const 84.4) + (throw $exn) + catch $exn + catch_all + (i32.const 99) + (i64.const 999) + (f32.const 99.9) + (f64.const 999.9) + end + drop drop drop))` + ).exports.f(), + 42 +); + +// This should also work inside nested frames. +assertEq( + wasmEvalText( + `(module + (type (func (param i32 i64 f32 f64))) + (tag $exn (type 0)) + (func $foo (param i32 i64 f32 f64) (result i32 i64 f32 f64) + (local.get 0) + (local.get 1) + (local.get 2) + (local.get 3) + (throw $exn)) + (func (export "f") (result i32) + try $l (result i32 i64 f32 f64) + (i32.const 42) + (i64.const 84) + (f32.const 42.2) + (f64.const 84.4) + (call $foo) + catch $exn + catch_all + (i32.const 99) + (i64.const 999) + (f32.const 99.9) + (f64.const 999.9) + end + drop drop drop))` + ).exports.f(), + 42 +); + +// Multiple tagged catch in succession. +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn1 (type 0)) + (tag $exn2 (type 0)) + (func (export "f") (result i32) + try (result i32) + (i32.const 42) + (throw $exn2) + catch $exn1 + catch $exn2 + catch_all + (i32.const 99) + end))` + ).exports.f(), + 42 +); + +assertEq( + wasmEvalText( + `(module + (tag $exn0) + (tag $exn1) + (tag $exn2) + (tag $exn3) + (tag $exn4) + (tag $exn5) + (func (export "f") (result i32) + try (result i32) + (throw $exn4) + catch $exn5 (i32.const 5) + catch $exn2 (i32.const 2) + catch $exn4 (i32.const 4) ;; Caught here. + catch $exn4 (i32.const 44) + end + ))` + ).exports.f(), + 4 +); + +// Try catch with block parameters. +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) + (i32.const 42) + try (param i32) (result i32) + nop + catch $exn + (i32.const 99) + end))` + ).exports.f(), + 42 +); + +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn (type 0)) + (func (export "f") (result i32) + (i32.const 42) + try $l (param i32) (result i32) + (throw $exn) + catch $exn + catch_all + (i32.const 99) + end))` + ).exports.f(), + 42 +); + +// Test the catch_all case. +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn1 (type 0)) + (tag $exn2 (type 0)) + (func (export "f") (result i32) + try $l (result i32) + (i32.const 42) + (throw $exn2) + catch $exn1 + catch_all + (i32.const 99) + end))` + ).exports.f(), + 99 +); + +assertEq( + wasmEvalText( + `(module + (tag $exn (param i32)) + (func (export "f") (result i32) + try (result i32) + try (result i32) + (i32.const 42) + (throw $exn) + catch_all + (i32.const 99) + end + catch $exn + end))` + ).exports.f(), + 99 +); + +// Test foreign exception catch. +assertEq( + wasmEvalText( + `(module + (type (func)) + (import "m" "foreign" (func $foreign)) + (tag $exn (type 0)) + (func (export "f") (result i32) (local i32) + try $l + (call $foreign) + catch $exn + catch_all + (local.set 0 (i32.const 42)) + end + (local.get 0)))`, + { + m: { + foreign() { + throw 5; + }, + }, + } + ).exports.f(), + 42 +); + +// Exception handlers should not catch traps. +assertErrorMessage( + () => + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) (local i32) + try $l + unreachable + catch $exn + (local.set 0 (i32.const 98)) + catch_all + (local.set 0 (i32.const 99)) + end + (local.get 0)))` + ).exports.f(), + WebAssembly.RuntimeError, + "unreachable executed" +); + +// Ensure that a RuntimeError created by the user is not filtered out +// as a trap emitted by the runtime (i.e., the filtering predicate is not +// observable from JS). +assertEq( + wasmEvalText( + `(module + (import "m" "foreign" (func $foreign)) + (func (export "f") (result i32) + try (result i32) + (call $foreign) + (i32.const 99) + catch_all + (i32.const 42) + end))`, + { + m: { + foreign() { + throw new WebAssembly.RuntimeError(); + }, + }, + } + ).exports.f(), + 42 +); + +// Test uncatchable JS exceptions (OOM & stack overflow). +{ + let f = wasmEvalText( + `(module + (import "m" "foreign" (func $foreign)) + (func (export "f") (result) + try + (call $foreign) + catch_all + end))`, + { + m: { + foreign() { + throwOutOfMemory(); + }, + }, + } + ).exports.f; + + var thrownVal; + try { + f(); + } catch (exn) { + thrownVal = exn; + } + + assertEq(thrownVal, "out of memory"); +} + +assertErrorMessage( + () => + wasmEvalText( + `(module + (import "m" "foreign" (func $foreign)) + (func (export "f") + try + (call $foreign) + catch_all + end))`, + { + m: { + foreign: function foreign() { + foreign(); + }, + }, + } + ).exports.f(), + Error, + "too much recursion" +); + +// Test all implemented instructions in a single module. +{ + let divFunctypeInline = + `(param $numerator i32) (param $denominator i32) (result i32)`; + + let safediv = wasmEvalText( + `(module + (tag $divexn (param i32 i32)) + (tag $notThrownExn (param i32)) + (func $throwingdiv ${divFunctypeInline} + (local.get $numerator) + (local.get $denominator) + (if (param i32 i32) (result i32) + (i32.eqz (local.get $denominator)) + (then + try (param i32 i32) + (throw $divexn) + delegate 0 + (i32.const 9)) + (else + i32.div_u))) + (func $safediv (export "safediv") ${divFunctypeInline} + (local.get $numerator) + (local.get $denominator) + try (param i32 i32) (result i32) + (call $throwingdiv) + catch $notThrownExn + catch $divexn + i32.add + catch_all + (i32.const 44) + end + ))` + ).exports.safediv; + + assertEq(safediv(6, 3), 2); + assertEq(safediv(6, 0), 6); +} + +// Test simple rethrow. +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + try + throw $exn + catch $exn + rethrow 0 + end + i32.const 1 + catch $exn + i32.const 27 + end))` + ).exports.f(), + 27 +); + +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + try + throw $exn + catch_all + rethrow 0 + end + i32.const 1 + catch $exn + i32.const 27 + end))` + ).exports.f(), + 27 +); + +// Test rethrows in nested blocks. +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + try + throw $exn + catch $exn + block + rethrow 1 + end + end + i32.const 1 + catch $exn + i32.const 27 + end))` + ).exports.f(), + 27 +); + +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + try + throw $exn + catch_all + block + rethrow 1 + end + end + i32.const 1 + catch $exn + i32.const 27 + end))` + ).exports.f(), + 27 +); + +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn1 (type 0)) + (tag $exn2 (type 0)) + (func (export "f") (result i32) + try (result i32) + try + throw $exn1 + catch $exn1 + try + throw $exn2 + catch $exn2 + rethrow 1 + end + end + i32.const 0 + catch $exn1 + i32.const 1 + catch $exn2 + i32.const 2 + end))` + ).exports.f(), + 1 +); + +assertEq( + wasmEvalText( + `(module + (type (func)) + (tag $exn1 (type 0)) + (tag $exn2 (type 0)) + (func (export "f") (result i32) + try (result i32) + try + throw $exn1 + catch $exn1 + try + throw $exn2 + catch_all + rethrow 1 + end + end + i32.const 0 + catch $exn1 + i32.const 1 + catch $exn2 + i32.const 2 + end))` + ).exports.f(), + 1 +); + +// Test that rethrow makes the rest of the block dead code. +assertEq( + wasmEvalText( + `(module + (tag (param i32)) + (func (export "f") (result i32) + try (result i32) + (i32.const 1) + catch 0 + (rethrow 0) + (i32.const 2) + end + ))` + ).exports.f(), + 1 +); + +assertEq( + wasmEvalText( + `(module + (tag (param i32)) + (func (export "f") (result i32) + try (result i32) + try + (i32.const 13) + (throw 0) + catch 0 + (rethrow 0) + end + (unreachable) + catch 0 + end + ))` + ).exports.f(), + 13 +); + +assertEq( + wasmEvalText( + `(module + (tag) + (func (export "f") (result i32) + try (result i32) + try + (throw 0) + catch 0 + (i32.const 4) + (rethrow 0) + end + (unreachable) + catch 0 + (i32.const 13) + end + ))` + ).exports.f(), + 13 +); + +assertEq( + wasmEvalText( + `(module + (tag (param i32)) + (func (export "f") (result i32) + try (result i32) + try + (i32.const 13) + (throw 0) + catch 0 + (i32.const 111) + (rethrow 0) + end + (i32.const 222) + catch 0 + end + ))` + ).exports.f(), + 13 +); + +// Test try-delegate blocks. + +// Dead delegate to caller +assertEq( + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") (result i32) + i32.const 1 + br 0 + try + throw $exn + delegate 0))` + ).exports.f(), + 1 +); + +// Nested try-delegate. +assertEq( + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") (result i32) + try (result i32) + try + try + throw $exn + delegate 0 + end + i32.const 0 + catch $exn + i32.const 1 + end))` + ).exports.f(), + 1 +); + +// Non-throwing and breaking try-delegate. +assertEq( + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") (result i32) + try (result i32) + i32.const 1 + br 0 + delegate 0))` + ).exports.f(), + 1 +); + +assertEq( + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") (result i32) + try (result i32) + i32.const 1 + return + delegate 0))` + ).exports.f(), + 1 + ); + +// More nested try-delegate. +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + try + i32.const 42 + throw $exn + delegate 0 + i32.const 0 + catch $exn + i32.const 1 + i32.add + end))` + ).exports.f(), + 43 +); + +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + try (result i32) + try + i32.const 42 + throw $exn + delegate 1 + i32.const 0 + catch $exn + i32.const 1 + i32.add + end + catch $exn + i32.const 2 + i32.add + end))` + ).exports.f(), + 44 +); + +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + try (result i32) + try (result i32) + try + i32.const 42 + throw $exn + delegate 1 + i32.const 0 + catch $exn + i32.const 1 + i32.add + end + delegate 0 + catch $exn + i32.const 2 + i32.add + end))` + ).exports.f(), + 44 +); + +assertEq( + wasmEvalText( + `(module + (tag $exn (param)) + (func $g (param i32) (result i32) (i32.const 42)) + (func (export "f") (result i32) + try (result i32) + try $t + block (result i32) + (i32.const 4) + (call $g) + try + throw $exn + delegate $t + end + drop + end + i32.const 0 + catch_all + i32.const 1 + end))` + ).exports.f(), + 1 +); + +// Test delegation to function body and blocks. + +// Non-throwing. +assertEq( + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") (result i32) + try (result i32) + i32.const 1 + delegate 0))` + ).exports.f(), + 1 +); + +// Block target. +assertEq( + wasmEvalText( + `(module + (tag $exn (param i32)) + (func (export "f") (result i32) + try (result i32) + block + try + i32.const 1 + throw $exn + delegate 0 + end + i32.const 0 + catch $exn + end))` + ).exports.f(), + 1 +); + +// Catch target. +assertEq( + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") (result i32) + try (result i32) + try + throw $exn + catch $exn + try + throw $exn + delegate 0 + end + i32.const 0 + catch_all + i32.const 1 + end))` + ).exports.f(), + 1 +); + +// Target function body. +assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn (type 0)) + (func (export "f") (result i32) + try (result i32) + call $g + catch $exn + end) + (func $g (result i32) + try (result i32) + try + i32.const 42 + throw $exn + delegate 1 + i32.const 0 + catch $exn + i32.const 1 + i32.add + end))` + ).exports.f(), + 42 +); + +// Try-delegate from inside a loop. +assertEq( + wasmEvalText( + `(module + (tag $exn) + ;; For the purpose of this test, the params below should be increasing. + (func (export "f") (param $depth_to_throw_exn i32) + (param $maximum_loop_iterations i32) + (result i32) + (local $loop_countdown i32) + ;; Counts how many times the loop was started. + (local $loop_verifier i32) + ;; The loop is counting down. + (local.get $maximum_loop_iterations) + (local.set $loop_countdown) + try $catch_exn (result i32) + try + (loop $loop + ;; Counts how many times the loop was started. + (local.set $loop_verifier + (i32.add (i32.const 1) + (local.get $loop_verifier))) + (if (i32.eqz (local.get $loop_countdown)) + (then (return (i32.const 440))) + (else + try $rethrow_label + (if (i32.eq (local.get $depth_to_throw_exn) + (local.get $loop_countdown)) + (then (throw $exn)) + (else + (local.set $loop_countdown + (i32.sub (local.get $loop_countdown) + (i32.const 1))))) + catch $exn try + (rethrow $rethrow_label) + delegate $catch_exn + end + )) + (br $loop)) + catch_all unreachable + end + (i32.const 2000) + catch_all (i32.const 10000) + end + (i32.add (local.get $loop_verifier))))` + ).exports.f(3, 5), + 10003 +); diff --git a/js/src/jit-test/tests/wasm/exceptions/ion-loop-phi.js b/js/src/jit-test/tests/wasm/exceptions/ion-loop-phi.js new file mode 100644 index 0000000000..bdf49ca97b --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/ion-loop-phi.js @@ -0,0 +1,59 @@ +// Finishing a loop will try to minimize phi nodes. We must properly replace +// phi nodes that escape a loop via catch block control flow patches. +wasmEvalText(`(module + (func) + (func (local i32) + try + loop + call 0 + i32.const 0 + br_if 0 + end + catch_all + end + ) +)`); + +// Same as above, but ensure that we check every enclosing try block for +// control flow patches, as delegate can tunnel outwards. +wasmEvalText(`(module + (func) + (func (local i32) + try + try + loop + call 0 + i32.const 0 + br_if 0 + end + delegate 0 + catch_all + end + ) +)`); + +// Ensure that we check the body block as delegate can target that. +wasmEvalText(`(module + (func) + (func (local i32) + loop + try + (; catch patch to try block is added ;) + call 0 + (; br_if ensures we will need a backedge ;) + i32.const 0 + br_if 1 + (; catch patches are relocated to body ;) + delegate 1 + (; finishing loop backedge must fixup patches stored in body ;) + end + + (; add another catch patch to body so that the landing pad will be a + join point between two edges, forcing a use of the dangling phi, + hitting the debug assertion + ;) + try + call 0 + delegate 0 + ) +)`); diff --git a/js/src/jit-test/tests/wasm/exceptions/js-api.js b/js/src/jit-test/tests/wasm/exceptions/js-api.js new file mode 100644 index 0000000000..4c2f018808 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/js-api.js @@ -0,0 +1,490 @@ +// Tests for wasm exception proposal JS API features. + +load(libdir + "eqArrayHelper.js"); + +// WebAssembly.Tag tests. +assertErrorMessage( + () => WebAssembly.Tag(), + TypeError, + /calling a builtin Tag constructor without new is forbidden/ +); + +assertErrorMessage( + () => new WebAssembly.Tag(), + TypeError, + /At least 1 argument required/ +); + +assertErrorMessage( + () => new WebAssembly.Tag(3), + TypeError, + /first argument must be a tag descriptor/ +); + +assertErrorMessage( + () => new WebAssembly.Tag({ parameters: ["foobar"] }), + TypeError, + /bad value type/ +); + +new WebAssembly.Tag({ parameters: [] }); +new WebAssembly.Tag({ parameters: ["i32"] }); +new WebAssembly.Tag({ parameters: ["i32", "externref"] }); + +wasmEvalText(`(module (import "m" "e" (tag)))`, { + m: { e: new WebAssembly.Tag({ parameters: [] }) }, +}); + +wasmEvalText(`(module (import "m" "e" (tag (param i32))))`, { + m: { e: new WebAssembly.Tag({ parameters: ["i32"] }) }, +}); + +wasmEvalText(`(module (import "m" "e" (tag (param i32 i64))))`, { + m: { e: new WebAssembly.Tag({ parameters: ["i32", "i64"] }) }, +}); + +assertErrorMessage( + () => + wasmEvalText(`(module (import "m" "e" (tag (param i32))))`, { + m: { e: new WebAssembly.Tag({ parameters: [] }) }, + }), + WebAssembly.LinkError, + /imported tag 'm.e' signature mismatch/ +); + +assertErrorMessage( + () => + wasmEvalText(`(module (import "m" "e" (tag (param))))`, { + m: { e: new WebAssembly.Tag({ parameters: ["i32"] }) }, + }), + WebAssembly.LinkError, + /imported tag 'm.e' signature mismatch/ +); + +// Test WebAssembly.Tag methods. +// TODO: add runtime detection for js-types +// { +// let params = [ +// [], +// ["i32"], +// ["i32", "i64"], +// ["f32", "externref"], +// ["i32", "i64", "f32", "f64"], +// ]; + +// for (const arg of params) { +// const tag = new WebAssembly.Tag({ parameters: arg }); +// assertEqArray(tag.type().parameters, arg); +// } +// } + +// WebAssembly.Exception tests. +assertErrorMessage( + () => WebAssembly.Exception(), + TypeError, + /calling a builtin Exception constructor without new is forbidden/ +); + +assertErrorMessage( + () => new WebAssembly.Exception(), + TypeError, + /At least 2 arguments required/ +); + +assertErrorMessage( + () => new WebAssembly.Exception(3, []), + TypeError, + /first argument must be a WebAssembly.Tag/ +); + +const { tag1, tag2, tag3, tag4, tag5, tag6, tag7, tag8, tag9 } = wasmEvalText( + `(module + (tag (export "tag1") (param)) + (tag (export "tag2") (param i32)) + (tag (export "tag3") (param i32 f32)) + (tag (export "tag4") (param i32 externref i32)) + (tag (export "tag5") (param i32 externref i32 externref)) + (tag (export "tag6") (param funcref)) + (tag (export "tag7") (param i64)) + (tag (export "tag8") (param i32 f64)) + (tag (export "tag9") (param externref funcref)))` +).exports; + +new WebAssembly.Exception(tag1, []); +new WebAssembly.Exception(tag2, [3]); +new WebAssembly.Exception(tag3, [3, 5.5]); +new WebAssembly.Exception(tag4, [3, "foo", 4]); +new WebAssembly.Exception(tag5, [3, "foo", 4, "bar"]); + +assertErrorMessage( + () => new WebAssembly.Exception(tag2, []), + TypeError, + /expected 1 values but got 0/ +); + +assertErrorMessage( + () => new WebAssembly.Exception(tag2, [3n]), + TypeError, + /can't convert BigInt to number/ +); + +assertErrorMessage( + () => new WebAssembly.Exception(tag6, [undefined]), + TypeError, + /can only pass WebAssembly exported functions to funcref/ +); + +assertErrorMessage( + () => new WebAssembly.Exception(tag7, [undefined]), + TypeError, + /can't convert undefined to BigInt/ +); + +assertErrorMessage( + () => new WebAssembly.Exception(tag7, {}), + TypeError, + /\({}\) is not iterable/ +); + +assertErrorMessage( + () => new WebAssembly.Exception(tag7, 1), + TypeError, + /second argument must be an object/ +); + +// Test Exception methods. +{ + const exn1 = new WebAssembly.Exception(tag1, []); + assertEq(exn1.is(tag1), true); + assertEq(exn1.is(tag2), false); + assertErrorMessage( + () => exn1.is(), + TypeError, + /At least 1 argument required/ + ); + assertErrorMessage( + () => exn1.is(5), + TypeError, + /first argument must be a WebAssembly.Tag/ + ); + + const exn2 = new WebAssembly.Exception(tag2, [3]); + assertEq(exn2.getArg(tag2, 0), 3); + + assertEq(new WebAssembly.Exception(tag2, [undefined]).getArg(tag2, 0), 0); + + const exn4 = new WebAssembly.Exception(tag4, [3, "foo", 4]); + assertEq(exn4.getArg(tag4, 0), 3); + assertEq(exn4.getArg(tag4, 1), "foo"); + assertEq(exn4.getArg(tag4, 2), 4); + + const exn5 = new WebAssembly.Exception(tag5, [3, "foo", 4, "bar"]); + assertEq(exn5.getArg(tag5, 3), "bar"); + + const { funcref } = wasmEvalText( + `(module (func (export "funcref")))` + ).exports; + const exn9 = new WebAssembly.Exception(tag9, ["foo", funcref]); + assertEq(exn9.getArg(tag9, 0), "foo"); + assertEq(exn9.getArg(tag9, 1), funcref); + + assertErrorMessage( + () => exn2.getArg(), + TypeError, + /At least 2 arguments required/ + ); + assertErrorMessage( + () => exn2.getArg(5, 0), + TypeError, + /first argument must be a WebAssembly.Tag/ + ); + assertErrorMessage( + () => exn2.getArg(tag2, "foo"), + TypeError, + /bad Exception getArg index/ + ); + assertErrorMessage( + () => exn2.getArg(tag2, 10), + RangeError, + /bad Exception getArg index/ + ); +} + +// Test throwing a JS constructed exception to Wasm. +assertEq( + wasmEvalText( + `(module + (import "m" "exn" (tag $exn (param i32))) + (import "m" "f" (func $f)) + (func (export "f") (result i32) + try (result i32) + call $f + (i32.const 0) + catch $exn + end))`, + { + m: { + exn: tag2, + f: () => { + throw new WebAssembly.Exception(tag2, [42]); + }, + }, + } + ).exports.f(), + 42 +); + +assertEqArray( + wasmEvalText( + `(module + (import "m" "exn" (tag $exn (param i32 f32))) + (import "m" "f" (func $f)) + (func (export "f") (result i32 f32) + try (result i32 f32) + call $f + (i32.const 0) + (f32.const 0) + catch $exn + end))`, + { + m: { + exn: tag3, + f: () => { + throw new WebAssembly.Exception(tag3, [42, 5.5]); + }, + }, + } + ).exports.f(), + [42, 5.5] +); + +assertEqArray( + wasmEvalText( + `(module + (import "m" "exn" (tag $exn (param i32 f64))) + (import "m" "f" (func $f)) + (func (export "f") (result i32 f64) + try (result i32 f64) + call $f + (i32.const 0) + (f64.const 0) + catch $exn + end))`, + { + m: { + exn: tag8, + f: () => { + throw new WebAssembly.Exception(tag8, [9999, 9999]); + }, + }, + } + ).exports.f(), + [9999, 9999] +); + +assertEqArray( + wasmEvalText( + `(module + (import "m" "exn" (tag $exn (param i32 externref i32))) + (import "m" "f" (func $f)) + (func (export "f") (result i32 externref i32) + try (result i32 externref i32) + call $f + (i32.const 0) + (ref.null extern) + (i32.const 0) + catch $exn + end))`, + { + m: { + exn: tag4, + f: () => { + throw new WebAssembly.Exception(tag4, [42, "foo", 42]); + }, + }, + } + ).exports.f(), + [42, "foo", 42] +); + +assertEqArray( + wasmEvalText( + `(module + (import "m" "exn" (tag $exn (param i32 externref i32 externref))) + (import "m" "f" (func $f)) + (func (export "f") (result i32 externref i32 externref) + try (result i32 externref i32 externref) + call $f + (i32.const 0) + (ref.null extern) + (i32.const 0) + (ref.null extern) + catch $exn + end))`, + { + m: { + exn: tag5, + f: () => { + throw new WebAssembly.Exception(tag5, [42, "foo", 42, "bar"]); + }, + }, + } + ).exports.f(), + [42, "foo", 42, "bar"] +); + +{ + const { funcref } = wasmEvalText( + `(module (func (export "funcref")))` + ).exports; + assertEqArray( + wasmEvalText( + `(module + (import "m" "exn" (tag $exn (param externref funcref))) + (import "m" "f" (func $f)) + (func (export "f") (result externref funcref) + try (result externref funcref) + call $f + (ref.null extern) + (ref.null func) + catch $exn + end))`, + { + m: { + exn: tag9, + f: () => { + throw new WebAssembly.Exception(tag9, ["foo", funcref]); + }, + }, + } + ).exports.f(), + ["foo", funcref] + ); +} + +assertEq( + wasmEvalText( + `(module + (import "m" "exn" (tag $exn)) + (import "m" "f" (func $f)) + (func (export "f") (result i32) + try (result i32) + call $f + (i32.const 0) + catch $exn + (i32.const 0) + catch_all + (i32.const 1) + end))`, + { + m: { + exn: tag1, + f: () => { + throw new WebAssembly.Exception(tag2, [42]); + }, + }, + } + ).exports.f(), + 1 +); + +{ + const exn = new WebAssembly.Tag({ parameters: ["i32"] }); + assertEq( + wasmEvalText( + `(module + (import "m" "exn" (tag $exn (param i32))) + (import "m" "f" (func $f)) + (func (export "f") (result i32) + try (result i32) + call $f + (i32.const 0) + catch $exn + end))`, + { + m: { + exn, + f: () => { + throw new WebAssembly.Exception(exn, [42]); + }, + }, + } + ).exports.f(), + 42 + ); +} + +{ + const exn1 = new WebAssembly.Tag({ parameters: ["i32"] }); + const exn2 = new WebAssembly.Tag({ parameters: ["i32"] }); + assertEq( + wasmEvalText( + `(module + (import "m" "exn" (tag $exn (param i32))) + (import "m" "f" (func $f)) + (func (export "f") (result i32) + try (result i32) + call $f + (i32.const 0) + catch $exn + catch_all + (i32.const 1) + end))`, + { + m: { + exn: exn1, + f: () => { + throw new WebAssembly.Exception(exn2, [42]); + }, + }, + } + ).exports.f(), + 1 + ); +} + +// Test `getArg` on a Wasm-thrown exception. +assertEq( + (() => { + try { + wasmEvalText( + `(module + (import "m" "exn" (tag $exn (param i32 f64))) + (func (export "f") + (i32.const 9999) + (f64.const 9999) + throw $exn))`, + { m: { exn: tag8 } } + ).exports.f(); + } catch (exn) { + return exn.getArg(tag8, 1); + } + })(), + 9999 +); + +assertEqArray( + (() => { + try { + wasmEvalText( + `(module + (import "m" "exn" (tag $exn (param i32 externref i32 externref))) + (func (export "f") (param externref externref) + (i32.const 1) + (local.get 0) + (i32.const 2) + (local.get 1) + throw $exn))`, + { m: { exn: tag5 } } + ).exports.f("foo", "bar"); + } catch (exn) { + return [ + exn.getArg(tag5, 0), + exn.getArg(tag5, 1), + exn.getArg(tag5, 2), + exn.getArg(tag5, 3), + ]; + } + })(), + [1, "foo", 2, "bar"] +); diff --git a/js/src/jit-test/tests/wasm/exceptions/memory.js b/js/src/jit-test/tests/wasm/exceptions/memory.js new file mode 100644 index 0000000000..61c68782ba --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/memory.js @@ -0,0 +1,78 @@ +// Ensure memory operations work after a throw coming from a function call. +// These are also testing that the InstanceReg/HeapReg are set correctly after +// catching an exception. There are some variations to the kind of calls here; +// we test for direct/indirect calls of local/imported functions, and the +// indirect calls may come from a local table or an imported table. + +// Throw from a direct/indirect call of a local/imported function. +{ + let exports = wasmEvalText( + `(module $m + (memory $mem (data "bar")) + (tag $exn (export "exn")) + (tag $dummyExn (export "dummyExn")) + (func $throwsExn (export "throwsExn") + (throw $exn)) + (func $anotherThrowsExn + (throw $exn)) + (func $throwsDummyExn (export "throwsDummyExn") + (throw $dummyExn)) + (table (export "tab") funcref (elem $anotherThrowsExn $throwsDummyExn)))` + ).exports; + + function testMemoryAfterCall(callInstruction) { + assertEq( + wasmEvalText( + `(module + (import "m" "exn" (tag $exn)) + (tag $localExn (param i32)) + (type $t (func)) + (import "m" "tab" (table $importTable 2 funcref)) + (import "m" "throwsExn" (func $importFuncThrowsExn)) + (memory $mem (data "foo")) + (func $localFuncThrowsExn + (throw $exn)) + (table $localTable funcref + (elem $localFuncThrowsExn $importFuncThrowsExn)) + (func $anotherLocalFuncThrowsExn + (throw $exn)) + (func $throwsLocalExn + (throw $localExn + (i32.const 9))) + (func (export "testFunc") (result i32) + try (result i32) + ${callInstruction} + ;; All the rest should not be reachable. + (call $anotherLocalFuncThrowsExn) + (throw $exn) + (call $throwsLocalExn) + unreachable + catch $localExn + catch $exn + (i32.load8_u + (i32.const 0)) + catch $exn + ;; This should be ignored. + unreachable + end))`, + { m: exports } + ).exports.testFunc(), + 'foo'.charCodeAt(0) + ); + }; + + // Run test for various calls. + let callInstructions = + ["(call $anotherLocalFuncThrowsExn)", + "(call $importFuncThrowsExn)", + // Calls $localFuncThrowsExn. + "(call_indirect $localTable (type $t) (i32.const 0))", + // Calls $importFuncThrowsExn. + "(call_indirect $localTable (type $t) (i32.const 1))", + // Calls non exported function of the exports module $anotherThrowsExn. + "(call_indirect $importTable (type $t) (i32.const 0))"]; + + for (let callInstruction of callInstructions) { + testMemoryAfterCall(callInstruction); + } +} diff --git a/js/src/jit-test/tests/wasm/exceptions/oom-construct-message.js b/js/src/jit-test/tests/wasm/exceptions/oom-construct-message.js new file mode 100644 index 0000000000..a7820876bc --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/oom-construct-message.js @@ -0,0 +1,6 @@ +// |jit-test| skip-if: !('oomTest' in this) + +const tag = new WebAssembly.Tag({ parameters: ["i32"] }); +oomTest(() => { + new WebAssembly.Exception(tag, []); +}); diff --git a/js/src/jit-test/tests/wasm/exceptions/oom-create-exception-data.js b/js/src/jit-test/tests/wasm/exceptions/oom-create-exception-data.js new file mode 100644 index 0000000000..0aa1e75698 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/oom-create-exception-data.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this) + +const tag = new WebAssembly.Tag({ parameters: ["i32", "i32", "i32", "i32"] }); +const params = [0, 0, 0, 0]; +oomTest(() => { + for (var i = 0; i < 5; ++i) { + new WebAssembly.Exception(tag, params); + } +}); diff --git a/js/src/jit-test/tests/wasm/exceptions/prototypes.js b/js/src/jit-test/tests/wasm/exceptions/prototypes.js new file mode 100644 index 0000000000..757ed2ddba --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/prototypes.js @@ -0,0 +1,10 @@ +class _Tag extends WebAssembly.Tag {} +class _Exception extends WebAssembly.Exception {} + +let tag = new _Tag({parameters: []}); +assertEq(tag instanceof _Tag, true); +assertEq(tag instanceof WebAssembly.Tag, true); + +let exception = new _Exception(tag, []); +assertEq(exception instanceof _Exception, true); +assertEq(exception instanceof WebAssembly.Exception, true); diff --git a/js/src/jit-test/tests/wasm/exceptions/reftypes.js b/js/src/jit-test/tests/wasm/exceptions/reftypes.js new file mode 100644 index 0000000000..efd577dec8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/reftypes.js @@ -0,0 +1,141 @@ +// Exception tests that use reference types. + +load(libdir + "eqArrayHelper.js"); + +assertEq( + wasmEvalText( + `(module + (tag $exn (param externref)) + (func (export "f") (result externref) + try (result externref) + ref.null extern + throw $exn + catch $exn + end))` + ).exports.f(), + null +); + +{ + let f = wasmEvalText( + `(module + (tag $exn (param funcref)) + (func $f (export "f") (result funcref) + try (result funcref) + ref.func $f + throw $exn + catch $exn + end))` + ).exports.f; + assertEq(f(), f); +} + +{ + let f = wasmEvalText( + `(module + (tag $exn (param externref)) + (func (export "f") (param externref) (result externref) + try (result externref) + local.get 0 + throw $exn + catch $exn + end))` + ).exports.f; + + for (v of WasmExternrefValues) { + assertEq(f(v), v); + } +} + +assertEqArray( + wasmEvalText( + `(module + (tag $exn (param externref externref)) + (func (export "f") (param externref externref) + (result externref externref) + try (result externref externref) + local.get 0 + local.get 1 + throw $exn + catch $exn + end))` + ).exports.f("foo", "bar"), + ["foo", "bar"] +); + +assertEqArray( + wasmEvalText( + `(module + (tag $exn (param i32 i32 externref f32)) + (func (export "f") (param externref) + (result i32 i32 externref f32) + try (result i32 i32 externref f32) + i32.const 0 + i32.const 1 + local.get 0 + f32.const 2.0 + throw $exn + catch $exn + end))` + ).exports.f("foo"), + [0, 1, "foo", 2.0] +); + +assertEqArray( + wasmEvalText( + `(module + (tag $exn (param i32 i32 externref f32 externref f64)) + (func (export "f") (param externref externref) + (result i32 i32 externref f32 externref f64) + try (result i32 i32 externref f32 externref f64) + i32.const 0 + i32.const 1 + local.get 0 + f32.const 2.0 + local.get 1 + f64.const 3.0 + throw $exn + catch $exn + end))` + ).exports.f("foo", "bar"), + [0, 1, "foo", 2.0, "bar", 3.0] +); + +// Test to ensure that reference typed values are tracked correctly by +// the GC within exception objects. +{ + gczeal(2, 1); // Collect on every allocation. + + var thrower; + let exports = wasmEvalText( + `(module + (tag $exn (param externref)) + (import "m" "f" (func $f (result externref))) + (func (export "thrower") (param externref) + (local.get 0) + (throw $exn)) + (func (export "catcher") (result externref) + try (result externref) + (call $f) + catch $exn + end))`, + { + m: { + f: () => { + // The purpose of this intermediate try-catch in JS is to force + // some allocation to occur after Wasm's `throw`, triggering GC, and + // then rethrow back to Wasm to observe any errors. + try { + thrower("foo"); + } catch (e) { + let v = { x: 5 }; + throw e; + } + }, + }, + } + ).exports; + + thrower = exports.thrower; + assertEq(exports.catcher(), "foo"); +} diff --git a/js/src/jit-test/tests/wasm/exceptions/side-effects-in-try.js b/js/src/jit-test/tests/wasm/exceptions/side-effects-in-try.js new file mode 100644 index 0000000000..4df38e3f3e --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/side-effects-in-try.js @@ -0,0 +1,234 @@ +// ----------------------------------------------------------------------------- +// The tests in this file assert that any side effects that happened in try code +// before an exception was thrown, will be known to the landing pad. It checks +// local throws and throws from direct calls (of local and imported functions). +// Side effects checked are changes to locals, and to globals. +// ----------------------------------------------------------------------------- + +load(libdir + "eqArrayHelper.js"); + + +function testSideEffectsOnLocals() { + // Locals set before and after throwing instructions, either locally, or from + // a direct wasm function call, for locals of all Wasm numtype and a local of + // reftype (externref), and the thrown exception carrying a value from each + // Wasm numtype and one of Wasm vectype (Simd128). Testing to see if the state + // of the locals at the moment $exn is thrown, is known to the landing pad + // when $exn is caught. + + let localThrow = "(throw $exn)"; + + // The following is taken from calls.js + // Some variables to be used in all tests. + let typesJS = ["i32", "i64", "f32", "f64"]; + let types = typesJS.join(" "); + let exnTypeDef = `(type $exnType (func (param ${types})))`; + let correctLocalValues = + `;; Correct local values + (i32.const 2) + (i64.const 3) + (f32.const 4) + (f64.const 13.37)`; + let correctLocalValuesJS = [2, 3n, 4, 13.37]; + + let wrongValues = + `;; Wrong values. + (i32.const 5) + (i64.const 6) + (f32.const 0.1) + (f64.const 0.6437)`; + let wrongValuesJS = [5, 6n, 0.1, 0.6437]; + + // These variables are specific to the tests in this file. + let throwValues = + `;; Values to throw and catch. + (i32.const 7) + (i64.const 8) + (f32.const 9) + (f64.const 27.11)`; + let thrownValuesJS = [7, 8n, 9, 27.11]; + + let correctResultsJS = function(externref) { + return [].concat(thrownValuesJS, + correctLocalValuesJS, + [externref, 1]); + } + + // Testing also locals of Wasm vectype. + // The following depend on whether simd is enabled or not. We write it like + // this so we can run this test also when SIMD is not enabled. + let wrongV128 = ""; + let correctV128 = ""; + let checkV128Value = ""; + + if (wasmSimdEnabled()) { + wrongV128 = `(v128.const i32x4 11 22 33 44)`; + correctV128 = `(v128.const i32x4 55 66 77 88)`; + checkV128Value = + ` ${correctV128} + (i32x4.eq) + (i32x4.all_true)`; + v128Type = " v128"; + } else { + wrongV128 = "(i32.const 0)"; + correctV128 = "(i32.const 1)"; + v128Type = " i32"; + } + + let localTypes = types + " externref"; + let resultTypes = types + " " + localTypes; + + // The last i32 in the results is the v128 check. + let testFuncTypeInline = + `(param $argCorrectRef externref) + (param $argWrongRef externref) + (result ${resultTypes} i32) + (local $localI32 i32) + (local $localI64 i64) + (local $localF32 f32) + (local $localF64 f64) + (local $localExternref externref) + (local $localV128 ${v128Type})`; + + let localsSet = + `;; Set locals. + (local.set $localV128) + (local.set $localExternref) + (local.set $localF64) + (local.set $localF32) + (local.set $localI64) + (local.set $localI32)`; + let localsGet = + `;; Get locals. + (local.get $localI32) + (local.get $localI64) + (local.get $localF32) + (local.get $localF64) + (local.get $localExternref) + (local.get $localV128)`; + + // The test module parts. ---------------------------------------------------- + + let importsModule = + `(module + (type $exnType (func (param ${types}))) + (tag $exn (export "exn") (type $exnType)) + (func (export "throwif") (param $ifPredicate i32) + (if (local.get $ifPredicate) + (then + ${throwValues} + ${localThrow}))))`; + + let moduleHeader = ` + (module + ${exnTypeDef} + (import "m" "exn" (tag $exn (type $exnType))) + (tag $emptyExn) + (import "m" "throwif" (func $throwif (param $ifPredicate i32))) + (func $wontThrow + (throw $emptyExn)) + (func $localCallThrow + ${throwValues} + ${localThrow}) + (func (export "testFunc") ${testFuncTypeInline} + try (result ${resultTypes} ${v128Type}) + ;; Locals not set. + (i32.const 0) ;; Predicate for $throwif. + (call $throwif) ;; So this doesn't throw. + ;; Set correct locals before throw to be caught. + ${correctLocalValues} + (local.get $argCorrectRef) + ${correctV128} + ${localsSet} + ;; Next up should be $exn being thrown locally or via a call.`; + + let moduleRest = ` ;; The above throw to $exn should be caught here --------. + ;; Set wrong locals after throw to be caught. ;; | + ${wrongValues} ;; | + (local.get $argWrongRef) ;; The wrong externref param. ;; | + ${wrongV128} ;; | + ${localsSet} ;; | + (call $wontThrow) ;; | + ${wrongValues} ;; | + ${localsGet} ;; End of try code. ;; | + catch $emptyExn ;; | + ${wrongValues} ;; | + ${localsGet} ;; | + catch $exn ;; <---------------------------------------------------' + ${localsGet} + catch_all + ${wrongValues} + ${localsGet} + end + ;; Check if the local has the correct v128 value. + ${checkV128Value}))`; + + let localThrowValues = ` + ${throwValues} + (throw $exn)`; + let directLocalCall = ` + (call $localCallThrow)`; + let directImportCall = ` + (i32.const 1) + (call $throwif)`; + + // Run test for side effects on locals before throwing an exception locally, + // or from a direct call. + + let callInstructions = [localThrowValues, directLocalCall, directImportCall]; + + for (let callThrow of callInstructions) { + console.log("callThrow = " + callThrow); // Uncomment for debugging. + moduleText = moduleHeader + callThrow + moduleRest; + console.log("moduleText = " + moduleText); // Uncomment for debugging. + assertEqArray( + wasmEvalText(moduleText, + { m : wasmEvalText(importsModule).exports } + ).exports.testFunc("foo", "wrongFoo"), + correctResultsJS("foo")); + } +} + +// Setting globals in try code, and testing to see if the changes are known to +// the landing pad. +function testGlobals() { + let test = function (type, initialValue, resultValue, wrongValue, coercion) { + let exports = wasmEvalText( + `(module + (tag (export "exn")) + (func (export "throws") + (throw 0)))` + ).exports; + + assertEq( + wasmEvalText( + `(module + (import "m" "exn" (tag $exn)) + (tag $notThrownExn) + (import "m" "throws" (func $throws)) + (global (mut ${type}) (${type}.const ${initialValue})) + (func (export "testFunc") (result ${type}) + try (result ${type}) + (global.set 0 (${type}.const ${resultValue})) + (call $throws) + (global.set 0 (${type}.const ${wrongValue})) + (global.get 0) + catch $notThrownExn + (${type}.const ${wrongValue}) + catch $exn + (global.get 0) + end))`, + { m: exports } + ).exports.testFunc(), coercion(resultValue)); + }; + + test("i32", 2, 7, 27, x => x); + test("i64", 2n, 7n, 27n, x => x); + test("f32", 0.3, 0.1, 0.6, Math.fround); + test("f64", 13.37, 0.6437244242412325666666, 4, x => x); +}; + +// Run all tests. + +testSideEffectsOnLocals(); +testGlobals(); diff --git a/js/src/jit-test/tests/wasm/exceptions/stack.js b/js/src/jit-test/tests/wasm/exceptions/stack.js new file mode 100644 index 0000000000..337ecd54b8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/stack.js @@ -0,0 +1,28 @@ +let tag = new WebAssembly.Tag({parameters: []}); + +function construct(options) { + return new WebAssembly.Exception(tag, [], options); +} +function noStack(options) { + assertEq(construct(options).stack, undefined, 'no stack'); +} +function hasStack(options) { + assertEq(typeof construct(options).stack === 'string', true, 'has stack'); +} + +// Test valid option constructors +noStack(undefined); +noStack(null); +noStack({}); +noStack({traceStack: false}); +noStack({traceStack: 0}); +hasStack({traceStack: true}); +hasStack({traceStack: 1}); + +// Test invalid option constructors +assertErrorMessage(() => construct('not an object'), TypeError, /cannot be converted/); + +// Test that 'stack' is read-only +let exception = construct({traceStack: true}); +exception.stack = 0; +assertEq(typeof exception.stack === 'string', true, 'is read-only'); diff --git a/js/src/jit-test/tests/wasm/exceptions/throw-to-js.js b/js/src/jit-test/tests/wasm/exceptions/throw-to-js.js new file mode 100644 index 0000000000..6ddc389cc1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/throw-to-js.js @@ -0,0 +1,343 @@ +// Tests for throwing exceptions to JS from Wasm. + +function assertWasmThrowsExn(thunk) { + let thrown = false; + + try { + thunk(); + } catch (exn) { + thrown = true; + assertEq(exn instanceof WebAssembly.Exception, true); + } + + assertEq(thrown, true, "missing exception"); +} + +// Test that handler-less trys don't catch anything. +assertWasmThrowsExn(() => + wasmEvalText( + `(module + (type (func (param))) + (tag $exn (type 0)) + (func (export "f") + try (throw $exn) end))` + ).exports.f() +); + +assertWasmThrowsExn(() => + wasmEvalText( + `(module + (type (func (param))) + (tag $exn (type 0)) + (func $g (throw $exn)) + (func (export "f") + try (call $g) end) +)` + ).exports.f() +); + +assertWasmThrowsExn(() => + wasmEvalText( + `(module + (type (func (param))) + (tag $exn (type 0)) + (func (export "f") + try try (throw $exn) end end))` + ).exports.f() +); + +assertWasmThrowsExn(() => + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") + try + try + throw $exn + delegate 0 + end))` + ).exports.f() +); + +assertWasmThrowsExn(() => + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") + try + try + throw $exn + delegate 1 + end))` + ).exports.f() +); + +assertWasmThrowsExn(() => + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") + block + try + throw $exn + delegate 0 + end))` + ).exports.f() +); + +assertWasmThrowsExn(() => + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") + loop + try + throw $exn + delegate 0 + end))` + ).exports.f() +); + +assertWasmThrowsExn(() => + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") + (i32.const 1) + if + try + throw $exn + delegate 0 + end))` + ).exports.f() +); + +// Test throwing simple empty exceptions to JS. +assertWasmThrowsExn(() => + wasmEvalText( + `(module + (type (func (param))) + (tag $exn (type 0)) + (func (export "f") + (throw $exn)))` + ).exports.f() +); + +// Test that wasm preserves the values of non-object exceptions that pass +// through it back to JS. +assertThrowsValue( + () => + wasmEvalText( + `(module + (tag $exn) + (import "m" "import" (func $import)) + (func (export "f") + try + (call $import) + catch $exn + ;; this block shouldn't be reached + end))`, + { + m: { + import: () => { + throw 42; + }, + }, + } + ).exports.f(), + 42 +); + +// Like previous test, but using a rethrow instruction instead. +assertThrowsValue( + () => + wasmEvalText( + `(module + (import "m" "import" (func $import)) + (func (export "f") + try + (call $import) + catch_all + (rethrow 0) + end))`, + { + m: { + import: () => { + throw 42; + }, + }, + } + ).exports.f(), + 42 +); + +// Test for throwing to JS and then back to Wasm. +{ + var wasmThrower; + let exports = wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn (type 0)) + (import "m" "import" (func $import (result i32))) + (func (export "thrower") + (i32.const 42) + (throw $exn)) + (func (export "catcher") (result i32) + try (result i32) + (call $import) + catch $exn + end))`, + { + m: { + import: () => { + return wasmThrower(); + }, + }, + } + ).exports; + + wasmThrower = exports.thrower; + assertEq(exports.catcher(), 42); +} + +// Tests for checking the tags of exceptions. +{ + let exports = wasmEvalText( + `(module + (type (func (param i32))) + (tag $exn (export "exn") (type 0)) + (func (export "thrower") + (i32.const 42) + (throw $exn)))` + ).exports; + + let imports = { + store: { + throws: () => { + return exports.thrower(); + }, + exn: exports.exn, + }, + }; + + // This passes the exception tag check and the exception is caught. + assertEq( + wasmEvalText( + `(module + (type (func (param i32))) + (import "store" "throws" (func $thrower (result i32))) + (import "store" "exn" (tag $exn (type 0))) + (func (export "catches") (result i32) + try (result i32) + (call $thrower) + catch $exn + (i32.const 15) + (i32.sub) + end))`, + imports + ).exports.catches(), + 27 + ); + + // This fails the exception tag check, despite the local exception having + // a matching signature. + assertWasmThrowsExn(() => + wasmEvalText( + `(module + (type (func (param i32))) + (import "store" "throws" (func $thrower (result i32))) + (tag $exn (type 0)) + (func (export "catchesFail") (result i32) + try (result i32) + (call $thrower) + catch $exn ;; This should not recognise $exn, thus not unpack 42. + end))`, + imports + ).exports.catchesFail() + ); +} + +// Test that JS finally block executes after a Wasm throw. +assertEq( + (() => { + try { + wasmEvalText( + `(module + (type (func (param))) + (tag $exn (type 0)) + (func (export "f") + (throw $exn)))` + ).exports.f(); + } finally { + return true; + } + return false; + })(), + true +); + +// Test that a wasm trap that passes through JS cannot be caught in Wasm. +{ + let throwTrap = wasmEvalText(`(module (func (export "f") unreachable))`) + .exports.f; + let catcher = wasmEvalText( + `(module + (type (func)) + (tag $exn (type 0)) + (import "m" "f" (func $foreign (param) (result))) + (func (export "f") + try + call $foreign + catch $exn + catch_all + end))`, + { + m: { + // JS frame that goes between the two wasm frames and just rethrows. + f: () => { + try { + throwTrap(); + } catch (e) { + throw e; + } + }, + }, + } + ).exports.f; + + assertErrorMessage( + () => catcher(), + WebAssembly.RuntimeError, + "unreachable executed" + ); +} + +// Test delegate throwing out of function. +assertWasmThrowsExn(() => + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") (result i32) + try (result i32) + throw $exn + delegate 0))` + ).exports.f() +); + +assertWasmThrowsExn(() => + wasmEvalText( + `(module + (tag $exn (param)) + (func (export "f") (result i32) + try (result i32) + i32.const 0 + if + i32.const 1 + return + else + throw $exn + end + i32.const 0 + delegate 0))` + ).exports.f() +); diff --git a/js/src/jit-test/tests/wasm/exceptions/unreachable.js b/js/src/jit-test/tests/wasm/exceptions/unreachable.js new file mode 100644 index 0000000000..f0091bc617 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/unreachable.js @@ -0,0 +1,33 @@ +// |jit-test| test-also=--wasm-function-references --wasm-gc --wasm-compiler=optimizing; test-also=--wasm-function-references --wasm-gc --wasm-compiler=baseline; + +wasmFailValidateText(`(module + (tag) + (tag) + (func (export "test") + try + throw 0 + catch 0 + unreachable + catch 1 + i32.add + end + ) +)`, /popping/); + +if (wasmGcEnabled()) { + wasmFailValidateText(`(module + (tag) + (tag) + (func (export "test") (param (ref extern)) + (local $nonNullable (ref extern)) + try + throw 0 + catch 0 + (local.set $nonNullable (local.get 0)) + catch 1 + (local.get $nonNullable) + drop + end + ) + )`, /unset local/); +} diff --git a/js/src/jit-test/tests/wasm/exceptions/validation.js b/js/src/jit-test/tests/wasm/exceptions/validation.js new file mode 100644 index 0000000000..34b208e0f1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exceptions/validation.js @@ -0,0 +1,663 @@ + +// Test wasm type validation for exception handling instructions. + +load(libdir + "wasm-binary.js"); + +function wasmValid(mod) { + assertEq(WebAssembly.validate(mod), true); +} + +function wasmInvalid(mod, pattern) { + assertEq(WebAssembly.validate(mod), false); + assertErrorMessage( + () => new WebAssembly.Module(mod), + WebAssembly.CompileError, + pattern + ); +} + +const emptyType = { args: [], ret: VoidCode }; +const i32Type = { args: [I32Code], ret: VoidCode }; +const toi32Type = { args: [], ret: I32Code }; +const i32Toi32Type = { args: [I32Code], ret: I32Code }; +const i32Toi64Type = { args: [I32Code], ret: I64Code }; +const i32i32Toi32Type = { args: [I32Code, I32Code], ret: I32Code }; + +function testValidateDecode() { + // Try blocks must have a block type code. + wasmInvalid( + moduleWithSections([ + sigSection([emptyType]), + declSection([0]), + tagSection([{ type: 0 }]), + bodySection([ + funcBody({ + locals: [], + body: [ + TryCode, + // Missing type code. + I32ConstCode, + 0x01, + CatchCode, + 0x00, + EndCode, + DropCode, + ReturnCode, + ], + }), + ]), + ]), + /bad type/ + ); + + // Catch must have a tag index. + wasmInvalid( + moduleWithSections([ + sigSection([emptyType]), + declSection([0]), + tagSection([{ type: 0 }]), + bodySection([ + funcBody( + { + locals: [], + body: [ + TryCode, + I32Code, + I32ConstCode, + 0x01, + CatchCode, + // Index missing. + ], + }, + (withEndCode = false) + ), + ]), + ]), + /expected tag index/ + ); + + // Rethrow must have a depth argument. + wasmInvalid( + moduleWithSections([ + sigSection([emptyType]), + declSection([0]), + tagSection([{ type: 0 }]), + bodySection([ + funcBody( + { + locals: [], + body: [ + RethrowCode, + // Index missing. + ], + }, + (withEndCode = false) + ), + ]), + ]), + /unable to read rethrow depth/ + ); + + // Delegate must have a depth argument. + wasmInvalid( + moduleWithSections([ + sigSection([emptyType]), + declSection([0]), + tagSection([{ type: 0 }]), + bodySection([ + funcBody( + { + locals: [], + body: [ + TryCode, + I32Code, + I32ConstCode, + 0x01, + DelegateCode, + // Index missing. + ], + }, + (withEndCode = false) + ), + ]), + ]), + /unable to read delegate depth/ + ); +} + +function testValidateThrow() { + valid = `(module + (type (func (param i32))) + (func $exn-zero + i32.const 0 + throw $exn1) + (tag $exn1 (type 0)))`; + + validSimd = `(module + (tag $exn (param v128)) + (func (export "f") (param v128) (result v128) + try (result v128) + (v128.const f64x2 1 2) + (throw $exn) + catch $exn + end))`; + + invalid0 = `(module + (type (func (param i32))) + (func $exn-zero + throw $exn1) + (tag $exn1 (type 0)))`; + error0 = /popping value from empty stack/; + + invalid1 = `(module + (type (func (param i32))) + (func $exn-zero + i64.const 0 + throw $exn1) + (tag $exn1 (type 0)))`; + error1 = /expression has type i64 but expected i32/; + + invalid2 = `(module + (type (func (param i32))) + (func $exn-zero + i32.const 0 + throw 1) + (tag $exn1 (type 0)))`; + error2 = /tag index out of range/; + + wasmValidateText(valid); + if (wasmSimdEnabled()) { + wasmValidateText(validSimd); + } + wasmFailValidateText(invalid0, error0); + wasmFailValidateText(invalid1, error1); + wasmFailValidateText(invalid2, error2); +} + +function testValidateTryCatch() { + function mod_with(fbody) { + return moduleWithSections([ + sigSection([emptyType, i32Type, i32i32Toi32Type]), + declSection([0]), + tagSection([{ type: 0 }, { type: 1 }]), + bodySection([ + funcBody({ + locals: [], + body: fbody, + }), + ]), + ]); + } + + const body1 = [ + // try (result i32) + TryCode, + I32Code, + // (i32.const 1) + I32ConstCode, + varU32(1), + // catch 1 + CatchCode, + varU32(1), + ]; + + const valid1 = mod_with(body1.concat([EndCode, DropCode, ReturnCode])); + const invalid1 = mod_with( + body1.concat([I32ConstCode, varU32(2), EndCode, DropCode, ReturnCode]) + ); + + const valid2 = mod_with([ + // (i32.const 0) (i32.const 0) + I32ConstCode, + varU32(0), + I32ConstCode, + varU32(0), + // try (param i32 i32) (result i32) drop drop (i32.const 1) + TryCode, + varS32(2), + DropCode, + DropCode, + I32ConstCode, + varU32(1), + // catch 0 (i32.const 2) end drop return + CatchCode, + varU32(0), + I32ConstCode, + varU32(2), + EndCode, + DropCode, + ReturnCode, + ]); + + wasmValid(valid1); + wasmInvalid(invalid1, /unused values not explicitly dropped/); + wasmValid(valid2); + + // Test handler-less try blocks. + wasmValidateText( + `(module (func try end))` + ); + + wasmValidateText( + `(module (func (result i32) try (result i32) (i32.const 1) end))` + ); + + wasmValidateText( + `(module + (func (result i32) + try (result i32) (i32.const 1) (br 0) end))` + ); + + wasmFailValidateText( + `(module + (func try (result i32) end))`, + /popping value from empty stack/ + ); +} + +function testValidateCatch() { + wasmInvalid( + moduleWithSections([ + sigSection([emptyType]), + declSection([0]), + bodySection([ + funcBody({ + locals: [], + body: [TryCode, VoidCode, CatchCode, varU32(0), EndCode], + }), + ]), + ]), + /tag index out of range/ + ); +} + +function testValidateCatchAll() { + wasmValidateText( + `(module + (tag $exn) + (func try catch $exn catch_all end))` + ); + + wasmValidateText( + `(module + (func (result i32) + try (result i32) + (i32.const 0) + catch_all + (i32.const 1) + end))` + ); + + wasmFailValidateText( + `(module + (tag $exn) + (func try catch_all catch 0 end))`, + /catch cannot follow a catch_all/ + ); + + wasmFailValidateText( + `(module + (tag $exn) + (func try (result i32) (i32.const 1) catch_all end drop))`, + /popping value from empty stack/ + ); + + wasmFailValidateText( + `(module + (tag $exn (param i32)) + (func try catch $exn drop catch_all drop end))`, + /popping value from empty stack/ + ); + + // We can't distinguish `else` and `catch_all` in error messages since they + // share the binary opcode. + wasmFailValidateText( + `(module + (tag $exn) + (func try catch_all catch_all end))`, + /catch_all can only be used within a try/ + ); + + wasmFailValidateText( + `(module + (tag $exn) + (func catch_all))`, + /catch_all can only be used within a try/ + ); +} + +function testValidateExnPayload() { + valid0 = moduleWithSections([ + sigSection([i32Type, i32Toi32Type]), + declSection([1]), + // (tag $exn (param i32)) + tagSection([{ type: 0 }]), + bodySection([ + // (func (param i32) (result i32) ... + funcBody({ + locals: [], + body: [ + // try (result i32) (local.get 0) (throw $exn) (i32.const 1) + TryCode, + I32Code, + LocalGetCode, + varU32(0), + ThrowCode, + varU32(0), + I32ConstCode, + varU32(1), + // catch $exn (i32.const 1) (i32.add) end + CatchCode, + varU32(0), + I32ConstCode, + varU32(1), + I32AddCode, + EndCode, + ], + }), + ]), + ]); + + // This is to ensure the following sentence from the spec overview holds: + // > "the operand stack is popped back to the size the operand stack had + // > when the try block was entered" + valid1 = moduleWithSections([ + sigSection([i32Type, toi32Type]), + declSection([1]), + // (tag $exn (param i32)) + tagSection([{ type: 0 }]), + bodySection([ + // (func (result i32) ... + funcBody({ + locals: [], + body: [ + // try (result i32) (i32.const 0) (i32.const 1) (throw $exn) drop + TryCode, + I32Code, + I32ConstCode, + varU32(0), + I32ConstCode, + varU32(1), + ThrowCode, + varU32(0), + DropCode, + // catch $exn drop (i32.const 2) end + CatchCode, + varU32(0), + DropCode, + I32ConstCode, + varU32(2), + EndCode, + ], + }), + ]), + ]); + + invalid0 = moduleWithSections([ + sigSection([i32Type, i32Toi64Type]), + declSection([1]), + // (tag $exn (param i32)) + tagSection([{ type: 0 }]), + bodySection([ + // (func (param i32) (result i64) ... + funcBody({ + locals: [], + body: [ + // try (result i64) (local.get 0) (throw $exn) (i64.const 0) + TryCode, + I64Code, + LocalGetCode, + varU32(0), + ThrowCode, + varU32(0), + I64ConstCode, + varU32(0), + // catch $exn end + CatchCode, + varU32(0), + EndCode, + ], + }), + ]), + ]); + + invalid1 = moduleWithSections([ + // (type (func)) + sigSection([emptyType]), + declSection([0]), + // (tag $exn (type 0)) + tagSection([{ type: 0 }]), + bodySection([ + // (func ... + funcBody({ + locals: [], + body: [ + // try catch 1 end + TryCode, + VoidCode, + CatchCode, + varU32(1), + EndCode, + ], + }), + ]), + ]); + + wasmValid(valid0); + wasmValid(valid1); + wasmInvalid(invalid0, /has type i32 but expected i64/); + wasmInvalid(invalid1, /tag index out of range/); +} + +function testValidateRethrow() { + wasmValidateText( + `(module + (tag $exn (param)) + (func + try + nop + catch $exn + rethrow 0 + end))` + ); + + wasmValidateText( + `(module + (tag $exn (param)) + (func + try + nop + catch_all + rethrow 0 + end))` + ); + + wasmValidateText( + `(module + (func (result i32) + try (result i32) + (i32.const 1) + catch_all + rethrow 0 + end))` + ); + + wasmValidateText( + `(module + (tag $exn (param)) + (func + try + nop + catch $exn + block + try + catch $exn + rethrow 0 + end + end + end))` + ); + + wasmValidateText( + `(module + (tag $exn (param)) + (func + try + nop + catch $exn + block + try + catch $exn + rethrow 2 + end + end + end))` + ); + + wasmFailValidateText( + `(module + (tag $exn (param)) + (func + try + nop + catch $exn + block + try + catch $exn + rethrow 1 + end + end + end))`, + /rethrow target was not a catch block/ + ); + + wasmFailValidateText( + `(module (func rethrow 0))`, + /rethrow target was not a catch block/ + ); + + wasmFailValidateText( + `(module (func try rethrow 0 end))`, + /rethrow target was not a catch block/ + ); + + wasmFailValidateText( + `(module (func try rethrow 0 catch_all end))`, + /rethrow target was not a catch block/ + ); + + wasmFailValidateText( + `(module + (tag $exn (param)) + (func + try + nop + catch $exn + block + try + catch $exn + rethrow 4 + end + end + end))`, + /rethrow depth exceeds current nesting level/ + ); +} + +function testValidateDelegate() { + wasmValidateText( + `(module + (tag $exn (param)) + (func + try + try + throw $exn + delegate 0 + catch $exn + end))` + ); + + wasmValidateText( + `(module + (tag $exn (param)) + (func + try + try + throw $exn + delegate 1 + catch $exn + end))` + ); + + wasmValidateText( + `(module + (tag $exn (param)) + (func + block + try + throw $exn + delegate 0 + end))` + ); + + wasmValidateText( + `(module + (tag $exn (param)) + (func + try + catch $exn + try + throw $exn + delegate 0 + end))` + ); + + wasmFailValidateText( + `(module + (tag $exn (param)) + (func (result i32) + try + throw $exn + delegate 0 + (i64.const 0) + end))`, + /type mismatch: expression has type i64 but expected i32/ + ); + + wasmFailValidateText( + `(module + (tag $exn (param)) + (func + try (result i32) + (i64.const 0) + delegate 0))`, + /type mismatch: expression has type i64 but expected i32/ + ); + + wasmFailValidateText( + `(module + (tag $exn (param)) + (func + try + try + throw $exn + delegate 2 + catch $exn + end))`, + /delegate depth exceeds current nesting level/ + ); + + wasmFailValidateText( + `(module (func delegate 0))`, + /delegate can only be used within a try/ + ); +} + +testValidateDecode(); +testValidateThrow(); +testValidateTryCatch(); +testValidateCatch(); +testValidateCatchAll(); +testValidateExnPayload(); +testValidateRethrow(); +testValidateDelegate(); diff --git a/js/src/jit-test/tests/wasm/exnref/casting.js b/js/src/jit-test/tests/wasm/exnref/casting.js new file mode 100644 index 0000000000..fa433fc152 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exnref/casting.js @@ -0,0 +1,110 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +const { + refCast, + refTest, + branch, + branchFail, + refCastNullable, + refTestNullable, + branchNullable, + branchFailNullable, +} = wasmEvalText(`(module + (tag $a) + (func $make (param $null i32) (result exnref) + (if (local.get $null) + (then + (return (ref.null exn)) + ) + ) + + try_table (catch_all_ref 0) + throw $a + end + unreachable + ) + + (func (export "refCast") (param $null i32) + (call $make (local.get $null)) + ref.cast (ref exn) + drop + ) + (func (export "refTest") (param $null i32) (result i32) + (call $make (local.get $null)) + ref.test (ref exn) + ) + (func (export "branch") (param $null i32) (result i32) + (block (result (ref exn)) + (call $make (local.get $null)) + br_on_cast 0 exnref (ref exn) + drop + (return (i32.const 0)) + ) + drop + (return (i32.const 1)) + ) + (func (export "branchFail") (param $null i32) (result i32) + (block (result exnref) + (call $make (local.get $null)) + br_on_cast_fail 0 exnref (ref exn) + drop + (return (i32.const 1)) + ) + drop + (return (i32.const 0)) + ) + + (func (export "refCastNullable") (param $null i32) + (call $make (local.get $null)) + ref.cast exnref + drop + ) + (func (export "refTestNullable") (param $null i32) (result i32) + (call $make (local.get $null)) + ref.test exnref + ) + (func (export "branchNullable") (param $null i32) (result i32) + (block (result exnref) + (call $make (local.get $null)) + br_on_cast 0 exnref exnref + drop + (return (i32.const 0)) + ) + drop + (return (i32.const 1)) + ) + (func (export "branchFailNullable") (param $null i32) (result i32) + (block (result exnref) + (call $make (local.get $null)) + br_on_cast_fail 0 exnref exnref + drop + (return (i32.const 1)) + ) + drop + (return (i32.const 0)) + ) +)`).exports; + +// cast non-null exnref -> (ref exn) +refCast(0); +assertEq(refTest(0), 1); +assertEq(branch(0), 1); +assertEq(branchFail(0), 1); + +// cast non-null exnref -> exnref +refCastNullable(0); +assertEq(refTestNullable(0), 1); +assertEq(branchNullable(0), 1); +assertEq(branchFailNullable(0), 1); + +// cast null exnref -> (ref exn) +assertErrorMessage(() => refCast(1), WebAssembly.RuntimeError, /bad cast/); +assertEq(refTest(1), 0); +assertEq(branch(1), 0); +assertEq(branchFail(1), 0); + +// cast null exnref -> exnref +refCastNullable(1); +assertEq(refTestNullable(1), 1); +assertEq(branchNullable(1), 1); +assertEq(branchFailNullable(1), 1); diff --git a/js/src/jit-test/tests/wasm/exnref/directives.txt b/js/src/jit-test/tests/wasm/exnref/directives.txt new file mode 100644 index 0000000000..bc17009ea8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exnref/directives.txt @@ -0,0 +1 @@ +|jit-test| --wasm-exnref; test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; include:wasm.js; skip-if: !wasmExnRefEnabled() diff --git a/js/src/jit-test/tests/wasm/exnref/throw-ref.js b/js/src/jit-test/tests/wasm/exnref/throw-ref.js new file mode 100644 index 0000000000..bed8c4eca7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/exnref/throw-ref.js @@ -0,0 +1,70 @@ +wasmFailValidateText(`(module + (func + throw_ref + ) +)`, /popping value from empty stack/); + +wasmValidateText(`(module + (func (param exnref) + local.get 0 + throw_ref + ) +)`); + +// Can rethrow a value +{ + let {test} = wasmEvalText(`(module + (tag $a) + (func (export "test") + (block (result exnref) + try_table (catch_all_ref 0) + throw $a + end + unreachable + ) + throw_ref + ) + )`).exports; + + assertErrorMessage(test, WebAssembly.Exception, /.*/); +} + +// Rethrowing a value inside a try works +{ + let {test} = wasmEvalText(`(module + (tag $E) + (func (export "test") (param $shouldRethrow i32) (result i32) + (local $e exnref) + (block $catch (result exnref) + (try_table (catch_ref $E $catch) (throw $E)) + unreachable + ) + (local.set $e) + (block $catch (result exnref) + (try_table (result i32) (catch_ref $E $catch) + (if (i32.eqz (local.get $shouldRethrow)) + (then (throw_ref (local.get $e))) + ) + (i32.const 2) + ) + (return) + ) + (drop) (i32.const 1) + ) + )`).exports; + assertEq(test(0), 1); + assertEq(test(1), 2); +} + +// Traps on null +{ + let {test} = wasmEvalText(`(module + (tag $a) + (func (export "test") + ref.null exn + throw_ref + ) + )`).exports; + + assertErrorMessage(test, WebAssembly.RuntimeError, /null/); +} diff --git a/js/src/jit-test/tests/wasm/exnref/try-table.js b/js/src/jit-test/tests/wasm/exnref/try-table.js new file mode 100644 index 0000000000..c89330917c --- /dev/null +++ b/js/src/jit-test/tests/wasm/exnref/try-table.js @@ -0,0 +1,384 @@ +// A try_table acts like a block label, with results +{ + let maxResults1 = Array.from(Array(1000).keys()); + let maxResults2 = maxResults1.map((x) => x - 1); + const TESTS = [ + ['i32', 'i32.const', [0], [1]], + ['i32 '.repeat(1000), 'i32.const', maxResults1, maxResults2], + ['i64', 'i64.const', [0], [1]], + ['i64 '.repeat(1000), 'i64.const', maxResults1, maxResults2], + ['f32', 'f32.const', [0], [1]], + ['f32 '.repeat(1000), 'f32.const', maxResults1, maxResults2], + ['f64', 'f64.const', [0], [1]], + ['f64 '.repeat(1000), 'f64.const', maxResults1, maxResults2], + ]; + for (let [types, constructor, values1, values2] of TESTS) { + let {test} = wasmEvalText(`(module + (func (export "test") (param $shouldBranch i32) (result ${types}) + try_table (result ${types}) + ${values2.map((x) => `${constructor} ${x}`).join(" ")} + (br_if 1 local.get $shouldBranch) + ${values1.map((x) => `${constructor} ${x}`).join(" ")} + br 0 + end + ) + )`).exports; + assertEqResults(test(0), values1); + assertEqResults(test(1), values2); + } +} + +// A try_table can have params +{ + let maxParams1 = Array.from(Array(1000).keys()); + const TESTS = [ + ['i32', 'i32.const', [0]], + ['i32 '.repeat(1000), 'i32.const', maxParams1], + ['i64', 'i64.const', [0]], + ['i64 '.repeat(1000), 'i64.const', maxParams1], + ['f32', 'f32.const', [0]], + ['f32 '.repeat(1000), 'f32.const', maxParams1], + ['f64', 'f64.const', [0]], + ['f64 '.repeat(1000), 'f64.const', maxParams1], + ]; + for (let [types, constructor, params] of TESTS) { + let {test} = wasmEvalText(`(module + (func (export "test") (result ${types}) + ${params.map((x) => `${constructor} ${x}`).join(" ")} + try_table (param ${types}) + return + end + unreachable + ) + )`).exports; + assertEqResults(test(), params); + } +} + +// Test try_table catching exceptions +{ + let {test} = wasmEvalText(`(module + (tag $A (param i32)) + (tag $B (param i32)) + (tag $C) + + (table funcref (elem $throwA $throwB $throwC $doNothing)) + + (type $empty (func)) + (func $throwA + i32.const 1 + throw $A + ) + (func $throwB + i32.const 2 + throw $B + ) + (func $throwC + throw $C + ) + (func $doNothing) + + (func (export "test") (param i32) (result i32) + block $handleA (result i32 exnref) + block $handleB (result i32 exnref) + block $handleUnknown (result exnref) + try_table + (catch_ref $A $handleA) + (catch_ref $B $handleB) + (catch_all_ref $handleUnknown) + + (call_indirect (type $empty) + local.get 0) + end + (; nothing threw ;) + i32.const -1 + return + end + (; $handleUnknown ;) + drop + i32.const 3 + return + end + (; $handleB ;) + drop + return + end + (; $handleA ;) + drop + return + ) + )`).exports; + // Throwing A results in 1 from the payload from the catch + assertEq(test(0), 1); + // Throwing B results in 2 from the payload from the catch + assertEq(test(1), 2); + // Throwing C results in 3 from the constant in the catch_all + assertEq(test(2), 3); + // Not throwing anything gets -1 from the fallthrough + assertEq(test(3), -1); +} + +// Test try_table catching exceptions without capturing the exnref +{ + let {test} = wasmEvalText(`(module + (tag $A (param i32)) + (tag $B (param i32)) + (tag $C) + + (table funcref (elem $throwA $throwB $throwC $doNothing)) + + (type $empty (func)) + (func $throwA + i32.const 1 + throw $A + ) + (func $throwB + i32.const 2 + throw $B + ) + (func $throwC + throw $C + ) + (func $doNothing) + + (func (export "test") (param i32) (result i32) + block $handleA (result i32) + block $handleB (result i32) + block $handleUnknown + try_table + (catch $A $handleA) + (catch $B $handleB) + (catch_all $handleUnknown) + + (call_indirect (type $empty) + local.get 0) + end + (; nothing threw ;) + i32.const -1 + return + end + (; $handleUnknown ;) + i32.const 3 + return + end + (; $handleB ;) + return + end + (; $handleA ;) + return + ) + )`).exports; + // Throwing A results in 1 from the payload from the catch + assertEq(test(0), 1); + // Throwing B results in 2 from the payload from the catch + assertEq(test(1), 2); + // Throwing C results in 3 from the constant in the catch_all + assertEq(test(2), 3); + // Not throwing anything gets -1 from the fallthrough + assertEq(test(3), -1); +} + +// Test try_table catching exceptions with various payloads +{ + let maxResults1 = Array.from(Array(999).keys()); + const TESTS = [ + ['i32', 'i32.const', [0]], + ['i32 '.repeat(999), 'i32.const', maxResults1], + ['i64', 'i64.const', [0]], + ['i64 '.repeat(999), 'i64.const', maxResults1], + ['f32', 'f32.const', [0]], + ['f32 '.repeat(999), 'f32.const', maxResults1], + ['f64', 'f64.const', [0]], + ['f64 '.repeat(999), 'f64.const', maxResults1], + ]; + for (let [types, constructor, params] of TESTS) { + let {testCatch, testCatchRef} = wasmEvalText(`(module + (tag $E (param ${types})) + + (func (export "testCatch") (result ${types}) + try_table (catch $E 0) + ${params.map((x) => `${constructor} ${x}`).join(" ")} + throw $E + end + unreachable + ) + (func (export "testCatchRef") (result ${types}) + (block (result ${types} exnref) + try_table (catch_ref $E 0) + ${params.map((x) => `${constructor} ${x}`).join(" ")} + throw $E + end + unreachable + ) + drop + return + ) + + )`).exports; + assertEqResults(testCatch(), params); + assertEqResults(testCatchRef(), params); + } +} + +// Test setting locals in conditional control flow +{ + let {test} = wasmEvalText(`(module + (tag $E) + + (func (export "test") (param $shouldThrow i32) (result i32) + (local $result i32) + + (block $join + (block $catch + try_table (catch $E $catch) + local.get $shouldThrow + if + throw $E + end + (local.set $result i32.const 0) + br $join + end + ) + (local.set $result i32.const 1) + br $join + ) + + local.get $result + ) + + )`).exports; + assertEq(test(0), 0); + assertEq(test(1), 1); +} + +// Matching catch clauses is done in order +{ + let {testCatch, testCatchRef, testCatchAll, testCatchAllRef} = wasmEvalText(`(module + (tag $E) + + (func (export "testCatch") + (block $good + (block $bad + try_table (catch $E $good) (catch $E $bad) (catch_all $bad) + throw $E + end + ) + unreachable + ) + ) + (func (export "testCatchAll") + (block $good + (block $bad + try_table (catch_all $good) (catch $E $bad) (catch $E $bad) + throw $E + end + ) + unreachable + ) + ) + (func (export "testCatchRef") + (block $good (result exnref) + (block $bad (result exnref) + try_table (catch_ref $E $good) (catch_ref $E $bad) (catch_all_ref $bad) + throw $E + end + unreachable + ) + unreachable + ) + drop + ) + (func (export "testCatchAllRef") + (block $good (result exnref) + (block $bad (result exnref) + try_table (catch_all_ref $good) (catch_ref $E $bad) (catch_ref $E $bad) + throw $E + end + unreachable + ) + unreachable + ) + drop + ) + )`).exports; + testCatch(); + testCatchAll(); + testCatchRef(); + testCatchAllRef(); +} + +// Test try_table as target of a delegate +{ + let {test} = wasmEvalText(`(module + (tag $E) + (func (export "test") + block $good + block $bad + try_table $a (catch_all $good) + try + try + throw $E + delegate $a + catch $E + br $bad + end + end + end + unreachable + end + ) + )`).exports; + test(); +} + +// Try table cannot be target of rethrow +{ + wasmFailValidateText(`(module + (func + try_table (catch_all 0) rethrow 0 end + ) + )`, /rethrow target/); +} + +// Test try_table catching and rethrowing JS exceptions +{ + let tag = new WebAssembly.Tag({parameters: []}); + let exn = new WebAssembly.Exception(tag, []); + let values = [...WasmExternrefValues, exn]; + function throwJS(value) { + throw value; + } + let {test} = wasmEvalText(`(module + (import "" "tag" (tag $tag)) + (import "" "throwJS" (func $throwJS (param externref))) + (func $innerRethrow (param externref) + (block (result exnref) + try_table (catch_ref $tag 0) (catch_all_ref 0) + local.get 0 + call $throwJS + end + return + ) + throw_ref + ) + (func (export "test") (param externref) + (block (result exnref) + try_table (catch_ref $tag 0) (catch_all_ref 0) + local.get 0 + call $innerRethrow + end + return + ) + throw_ref + ) + )`, {"": {tag, throwJS}}).exports; + + for (let value of values) { + try { + test(value); + assertEq(true, false); + } catch (thrownValue) { + assertEq(thrownValue, value); + } + } +} diff --git a/js/src/jit-test/tests/wasm/extended-const/basic.js b/js/src/jit-test/tests/wasm/extended-const/basic.js new file mode 100644 index 0000000000..bf0ce460d5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/extended-const/basic.js @@ -0,0 +1,95 @@ +// |jit-test| skip-if: !wasmExtendedConstEnabled() + +function testPrivateGlobal(valtype, expr, result) { + // Immutable private globals have a single cell for wasm. + let { get } = wasmEvalText(`(module + (global $global ${valtype} ${expr}) + (func (export "get") (result ${valtype}) + global.get $global + ) + )`).exports; + assertEq(get(), result); +} +function testExportedGlobal(valtype, expr, result) { + // Immutable exported globals have a separate cell for wasm and the exported + // global object. + let { global, get } = wasmEvalText(`(module + (global $global (export "global") ${valtype} ${expr}) + (func (export "get") (result ${valtype}) + global.get $global + ) + )`).exports; + assertEq(get(), result); + assertEq(global.value, result); +} +function testIndirectGlobal(valtype, expr, result) { + // Mutable exported globals share an indirect cell for wasm and the exported + // global object. + let { global } = wasmEvalText(`(module + (global (export "global") (mut ${valtype}) ${expr}) + )`).exports; + assertEq(global.value, result); +} + +// i32 tests + +const I32_SQ_OVERFLOW = 0xFFFF + 1; +const MAX_I32 = 0xFFFF_FFFF; +function testI32(expr, result) { + testPrivateGlobal('i32', expr, result); + testExportedGlobal('i32', expr, result); + testIndirectGlobal('i32', expr, result); +} +testI32('i32.const 1', 1); + +testI32('i32.const 1 i32.const 2 i32.add', 3); +testI32(`i32.const ${MAX_I32} i32.const 1 i32.add`, 0); + +testI32('i32.const 1 i32.const 2 i32.sub', -1); +testI32(`i32.const 1 i32.const 0 i32.sub`, 1); + +testI32('i32.const 1 i32.const 2 i32.mul', 2); +testI32(`i32.const ${I32_SQ_OVERFLOW} i32.const ${I32_SQ_OVERFLOW} i32.mul`, 0); + +// i64 tests + +const I64_SQ_OVERFLOW = 0xFFFF_FFFFn + 1n; +const MAX_I64 = 0xFFFF_FFFF_FFFF_FFFFn; +function testI64(expr, result) { + testPrivateGlobal('i64', expr, result); + testExportedGlobal('i64', expr, result); + testIndirectGlobal('i64', expr, result); +} +testI64('i64.const 1', 1n); + +testI64('i64.const 1 i64.const 2 i64.add', 3n); +testI64(`i64.const ${MAX_I64} i64.const 1 i64.add`, 0n); + +testI64('i64.const 1 i64.const 2 i64.sub', -1n); +testI64(`i64.const 1 i64.const 0 i64.sub`, 1n); + +testI64('i64.const 1 i64.const 2 i64.mul', 2n); +testI64(`i64.const ${I64_SQ_OVERFLOW} i64.const ${I64_SQ_OVERFLOW} i64.mul`, 0n); + +// test global.get + +function testGlobalGet(valtype, aExpr, bExpr, cExpr, cResult) { + let { a, b } = wasmEvalText(`(module + (global (export "a") ${valtype} ${aExpr}) + (global (export "b") ${valtype} ${bExpr}) + )`).exports; + let { c } = wasmEvalText(`(module + (global $a (import "" "a") ${valtype}) + (global $b (import "" "b") ${valtype}) + (global (export "c") ${valtype} ${cExpr}) + )`, {"": {a, b}}).exports; + assertEq(c.value, cResult); +} + +testGlobalGet('i32', 'i32.const 2', 'i32.const 3', 'global.get $a global.get $b i32.add', 5); +testGlobalGet('i32', 'i32.const 2', 'i32.const 3', 'global.get $a global.get $b i32.sub', -1); +testGlobalGet('i32', 'i32.const 2', 'i32.const 3', 'global.get $a global.get $b i32.mul', 6); + +testGlobalGet('i64', 'i64.const 2', 'i64.const 3', 'global.get $a global.get $b i64.add', 5n); +testGlobalGet('i64', 'i64.const 2', 'i64.const 3', 'global.get $a global.get $b i64.sub', -1n); +testGlobalGet('i64', 'i64.const 2', 'i64.const 3', 'global.get $a global.get $b i64.mul', 6n); diff --git a/js/src/jit-test/tests/wasm/extended-const/directives.txt b/js/src/jit-test/tests/wasm/extended-const/directives.txt new file mode 100644 index 0000000000..0d16de6524 --- /dev/null +++ b/js/src/jit-test/tests/wasm/extended-const/directives.txt @@ -0,0 +1 @@ +|jit-test| --wasm-extended-const; test-also=--wasm-compiler=optimizing; test-also=--wasm-test-serialization; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; include:wasm.js diff --git a/js/src/jit-test/tests/wasm/extended-const/disabled.js b/js/src/jit-test/tests/wasm/extended-const/disabled.js new file mode 100644 index 0000000000..01e64f6c44 --- /dev/null +++ b/js/src/jit-test/tests/wasm/extended-const/disabled.js @@ -0,0 +1,22 @@ +// |jit-test| skip-if: wasmExtendedConstEnabled() + +const { CompileError, validate } = WebAssembly; + +const DISABLED = /extended constant expressions not enabled|unrecognized opcode/; + +let tests = [ + "(module (global i32 i32.const 0 i32.const 0 i32.add))", + "(module (global i32 i32.const 0 i32.const 0 i32.sub))", + "(module (global i32 i32.const 0 i32.const 0 i32.mul))", + "(module (global i64 i64.const 0 i64.const 0 i64.add))", + "(module (global i64 i64.const 0 i64.const 0 i64.sub))", + "(module (global i64 i64.const 0 i64.const 0 i64.mul))", +]; + +// Test that use of extended constants fails when disabled. + +for (let src of tests) { + let bin = wasmTextToBinary(src); + assertEq(validate(bin), false); + wasmCompilationShouldFail(bin, DISABLED); +} diff --git a/js/src/jit-test/tests/wasm/extended-const/pathological.js b/js/src/jit-test/tests/wasm/extended-const/pathological.js new file mode 100644 index 0000000000..e3695f3625 --- /dev/null +++ b/js/src/jit-test/tests/wasm/extended-const/pathological.js @@ -0,0 +1,78 @@ +// |jit-test| skip-if: !wasmExtendedConstEnabled() + +// Let's calculate zero in some elaborate ways. +function testFancyZeroOffset(fancyZero, memType = 'i32') { + try { + const { mem } = wasmEvalText(`(module + (memory (export "mem") ${memType} 1) + (data (offset ${fancyZero}) "hi") + )`).exports; + const str = String.fromCharCode(...new Uint8Array(mem.buffer).slice(0, 2)); + assertEq(str, 'hi'); + } catch (e) { + const { getOffset } = wasmEvalText(`(module + (func (export "getOffset") (result ${memType}) + ${fancyZero} + ) + )`).exports; + console.log('Computed offset:', getOffset()); + throw e; + } +} + +// Do plus one minus one a thousand times +testFancyZeroOffset('i32.const 0 ' + ( + '(i32.add (i32.const 1)) ' + + '(i32.sub (i32.const 1)) ' +).repeat(1000)); + +// Do some jank fibonacci +{ + let fib = '(i32.const 1)\n' + let a = 1; let b = 1; let next; + for (let i = 0; i < 45; i++) { + fib += `(i32.const ${a})\n`; + fib += '(i32.add)\n'; + next = a + b; + a = b; + b = next; + } + fib += `(i32.sub (i32.const ${next}))\n`; + testFancyZeroOffset(fib); +} + +// Run the collatz conjecture as long as possible +{ + let val = 837799; // should reach 1 in 524 steps + let expr = `(i32.const ${val})\n`; + while (val != 1) { + if (val % 2 == 0) { + expr += `(i32.sub (i32.const ${val / 2}))\n`; // we can't divide in constant expressions lol + val /= 2; + } else { + expr += `(i32.mul (i32.const 3))\n`; + expr += `(i32.add (i32.const 1))\n`; + val = val * 3 + 1; + } + } + expr += `(i32.sub (i32.const 1))\n`; + testFancyZeroOffset(expr); +} + +// The collatz conjecture would be even more fun with 64-bit numbers... +if (wasmMemory64Enabled()) { + let val = 1899148184679; // should reach 1 in 1411 steps + let expr = `(i64.const ${val})\n`; + while (val != 1) { + if (val % 2 == 0) { + expr += `(i64.sub (i64.const ${val / 2}))\n`; // we can't divide in constant expressions lol + val /= 2; + } else { + expr += `(i64.mul (i64.const 3))\n`; + expr += `(i64.add (i64.const 1))\n`; + val = val * 3 + 1; + } + } + expr += `(i64.sub (i64.const 1))\n`; + testFancyZeroOffset(expr, 'i64'); +} diff --git a/js/src/jit-test/tests/wasm/extract-code.js b/js/src/jit-test/tests/wasm/extract-code.js new file mode 100644 index 0000000000..c2c3163652 --- /dev/null +++ b/js/src/jit-test/tests/wasm/extract-code.js @@ -0,0 +1,12 @@ +var module = new WebAssembly.Module(wasmTextToBinary(`(module (func (nop)))`)); +var exp = wasmExtractCode(module, "stable"); +assertEq(exp.code instanceof Uint8Array, true); +assertEq(Array.isArray(exp.segments), true); +var funcs = exp.segments.filter(s => s.kind === 0); +assertEq(funcs.length, 1); +assertEq(funcs[0].funcIndex, 0); +assertEq(funcs[0].begin >= 0, true); +assertEq(funcs[0].begin <= funcs[0].funcBodyBegin, true); +assertEq(funcs[0].funcBodyBegin < funcs[0].funcBodyEnd, true); +assertEq(funcs[0].funcBodyEnd <= funcs[0].end, true); +assertEq(funcs[0].end <= exp.code.length, true); diff --git a/js/src/jit-test/tests/wasm/fac.js b/js/src/jit-test/tests/wasm/fac.js new file mode 100644 index 0000000000..5b3435a389 --- /dev/null +++ b/js/src/jit-test/tests/wasm/fac.js @@ -0,0 +1,19 @@ +// This is fac-opt from fac.wast in the official testsuite, changed to use +// i32 instead of i64. +assertEq(wasmEvalText(`(module + (func $fac-opt (param i32) (result i32) + (local i32) + (local.set 1 (i32.const 1)) + (block + (br_if 0 (i32.lt_s (local.get 0) (i32.const 2))) + (loop + (local.set 1 (i32.mul (local.get 1) (local.get 0))) + (local.set 0 (i32.add (local.get 0) (i32.const -1))) + (br_if 0 (i32.gt_s (local.get 0) (i32.const 1))) + ) + ) + (local.get 1) + ) + + (export "" (func 0)) +)`).exports[""](10), 3628800); diff --git a/js/src/jit-test/tests/wasm/features.js b/js/src/jit-test/tests/wasm/features.js new file mode 100644 index 0000000000..904dd03e76 --- /dev/null +++ b/js/src/jit-test/tests/wasm/features.js @@ -0,0 +1,98 @@ +// |jit-test| test-also=--wasm-extended-const; test-also=--wasm-exceptions; + +// Test that if a feature is 'experimental' then we must be in a nightly build, +// and if a feature is 'released' then it must be enabled on release and beta. +// +// An experimental feature is allowed to be disabled by platform/feature flags, +// we only require that it can never be enabled on release/beta builds. +// +// A released feature is allowed to be disabled on nightly. This is useful for +// if we're testing out a new compiler/configuration where a released feature +// is not supported yet. We only require that on release/beta, the feature must +// be enabled. +// +// As features are advanced, this test must be manually updated. +// +// NOTE0: The |jit-test| directive must be updated with all opt-in shell flags +// for experimental features for this to work correctly. +// NOTE1: This test relies on feature functions accurately guarding use of the +// feature to work correctly. All features should have a 'disabled.js' +// test to verify this. Basic testing for this is included with each +// feature in this test for sanity. +// NOTE2: Keep this file in sync with: +// `dom/worklet/tests/worklet_audioWorklet_WASM_features.js`. + +let release_or_beta = getBuildConfiguration("release_or_beta"); +let nightly = !release_or_beta; + +let nightlyOnlyFeatures = [ + [ + 'relaxed-simd', + wasmRelaxedSimdEnabled(), + `(module (func (result v128) + unreachable + i16x8.relaxed_laneselect + ))` + ], +]; + +for (let [name, enabled, test] of nightlyOnlyFeatures) { + if (enabled) { + assertEq(nightly, true, `${name} must be enabled only on nightly`); + wasmEvalText(test); + } else { + assertErrorMessage(() => wasmEvalText(test), WebAssembly.CompileError, /./); + } +} + +// These are features that are enabled in beta/release but may be disabled at +// run-time for other reasons. The best we can do for these features is to say +// that if one claims to be supported then it must work, and otherwise there +// must be a CompileError. + +let releasedFeaturesMaybeDisabledAnyway = [ + // SIMD will be disabled dynamically on x86/x64 if the hardware isn't SSE4.1+. + ['simd', wasmSimdEnabled(), `(module (func (result v128) i32.const 0 i8x16.splat))`] +]; + +for (let [name, enabled, test] of releasedFeaturesMaybeDisabledAnyway) { + if (release_or_beta) { + if (enabled) { + wasmEvalText(test); + } else { + assertErrorMessage(() => wasmEvalText(test), WebAssembly.CompileError, /./); + } + } +} + +let releasedFeatures = [ + ['threads', wasmThreadsEnabled(), `(module (memory 1 1 shared))`], + [ + 'exceptions', + wasmExceptionsEnabled(), + `(module (type (func)) (tag (type 0)))` + ], + [ + 'extended-const', + wasmExtendedConstEnabled(), + `(module + (global i32 + i32.const 0 + i32.const 0 + i32.add + ) + )` + ], + [ + 'tail-calls', + wasmTailCallsEnabled(), + `(module (func) (func (return_call 0)))` + ], +]; + +for (let [name, enabled, test] of releasedFeatures) { + if (release_or_beta) { + assertEq(enabled, true, `${name} must be enabled on release and beta`); + wasmEvalText(test); + } +} diff --git a/js/src/jit-test/tests/wasm/fence.js b/js/src/jit-test/tests/wasm/fence.js new file mode 100644 index 0000000000..1b839bb9f9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/fence.js @@ -0,0 +1,24 @@ +// |jit-test| skip-if: !wasmThreadsEnabled() + +// Test that `atomic.fence` is a valid instruction of type `[] -> []` +wasmFullPass( +`(module + (func atomic.fence) + (export "run" (func 0)) +)`); + +// Test that `atomic.fence` works with non-shared memory +wasmFullPass( +`(module + (memory 1) + (func atomic.fence) + (export "run" (func 0)) +)`); + +// Test that `atomic.fence` works with shared memory +wasmFullPass( +`(module + (memory 1 1 shared) + (func atomic.fence) + (export "run" (func 0)) +)`); diff --git a/js/src/jit-test/tests/wasm/float-unaligned.js b/js/src/jit-test/tests/wasm/float-unaligned.js new file mode 100644 index 0000000000..a22ffe5fee --- /dev/null +++ b/js/src/jit-test/tests/wasm/float-unaligned.js @@ -0,0 +1,118 @@ +// Various tests for unaligned float accesses. These are specifically meant to +// test the SIGBUS handling on 32-bit ARM by exercising odd addresses and odd +// offsets. + +// For a triple of (numBallast, ty, offset), create the text for a pair of +// functions "get_ty_offset" and "set_ty_offset" where each has numBallast live +// dummy values across the operation of interest to force the use of different +// register numbers. (This is primarily for the FP registers as ARM code +// generation currently always uses the same scratch register for the base +// address of the access.) +// +// These must be augmented with a memory. Memory addresses 0-255 are reserved +// for internal use by these functions. The memory must start as zero. + +function makeLoadStore(numBallast, ty, offset) { + // The general idea of the ballast is that we occupy some FP registers and + // some int registers with non-dead values before we perform an operation, + // and then we consume the occupied registers after. + // + // In the case of load, the loaded result is stored back in memory before we + // consume the ballast, thus the ion regalloc will not simply always load + // the result into d0, but usually into some temp other than d0. Thus the + // amount of ballast affects the register. (Ditto baseline though the + // reasoning is simpler.) + // + // In the case of store, we keep the parameter value live until the end so + // that the tmp that we compute for the store is moved into a different + // register. The tmp has the same value as the parameter value but a + // non-JIT compiler can't know that. + + let loadtxt = + `(func (export "get_${ty}_${offset}") (param $p i32) (result ${ty}) + ${ballast(() => ` + (i32.const 8) + (i32.store (i32.const 8) (i32.add (i32.load (i32.const 8)) (i32.const 1))) + (${ty}.load (i32.const 8))`)} + + (${ty}.store (i32.const 0) (${ty}.load offset=${offset} (local.get $p))) + + ${ballast(() => ` + ${ty}.store`)} + + (${ty}.load (i32.const 0)))`; + + // This will assume the value at mem[16] is zero. + let storetxt = + `(func (export "set_${ty}_${offset}") (param $p i32) (param $v ${ty}) + (local $tmp ${ty}) + ${ballast(() => ` + (i32.const 8) + (i32.store (i32.const 8) (i32.add (i32.load (i32.const 8)) (i32.const 1))) + (${ty}.load (i32.const 8))`)} + + (local.set $tmp (${ty}.add (local.get $v) (${ty}.load (i32.const 16)))) + (${ty}.store offset=${offset} (local.get $p) (local.get $tmp)) + + ${ballast(() => ` + ${ty}.store`)} + (${ty}.store (i32.const 8) (local.get $v)))`; + + return `${loadtxt} + ${storetxt}`; + + function ballast(thunk) { + let s = ""; + for ( let i=0 ; i < numBallast; i++ ) + s += thunk(); + return s; + } +} + +// The complexity here comes from trying to force the source/target FP registers +// in the FP access instruction to vary. For Baseline this is not hard; for Ion +// trickier. + +function makeInstance(numBallast, offset) { + let txt = + `(module + (memory (export "memory") 1 1) + ${makeLoadStore(numBallast, 'f64', offset)} + ${makeLoadStore(numBallast, 'f32', offset)})`; + return new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(txt))); +} + +// `offset` corresponds to the "offset" directive in the instruction +for ( let offset=0 ; offset < 8; offset++ ) { + + // `numBallast` represents the amount of ballast registers we're trying to use, + // see comments above. + for ( let numBallast=0; numBallast < 16; numBallast++ ) { + let ins = makeInstance(numBallast, offset); + let mem = ins.exports.memory; + let buf = new DataView(mem.buffer); + + // `i` represents the offset in the pointer from a proper boundary + for ( let i=0; i < 9; i++ ) { + let offs = 256+i; + let val = Math.PI+i; + + buf.setFloat64(offs + offset, val, true); + assertEq(ins.exports["get_f64_" + offset](offs), val); + + ins.exports["set_f64_" + offset](offs + 32, val); + assertEq(buf.getFloat64(offs + 32 + offset, true), val); + } + + for ( let i=0; i < 9; i++ ) { + let offs = 512+i; + let val = Math.fround(Math.PI+i); + + buf.setFloat32(offs + offset, val, true); + assertEq(ins.exports["get_f32_" + offset](offs), val); + + ins.exports["set_f32_" + offset](offs + 32, val); + assertEq(buf.getFloat32(offs + 32 + offset, true), val); + } + } +} diff --git a/js/src/jit-test/tests/wasm/float.js b/js/src/jit-test/tests/wasm/float.js new file mode 100644 index 0000000000..fe86ac1801 --- /dev/null +++ b/js/src/jit-test/tests/wasm/float.js @@ -0,0 +1,103 @@ +wasmFullPass('(module (func (result f32) (f32.const -1)) (export "run" (func 0)))', -1); +wasmFullPass('(module (func (result f32) (f32.const 1)) (export "run" (func 0)))', 1); +wasmFullPass('(module (func (result f64) (f64.const -2)) (export "run" (func 0)))', -2); +wasmFullPass('(module (func (result f64) (f64.const 2)) (export "run" (func 0)))', 2); +wasmFullPass('(module (func (result f64) (f64.const 4294967296)) (export "run" (func 0)))', 4294967296); +wasmFullPass('(module (func (result f32) (f32.const 1.5)) (export "run" (func 0)))', 1.5); +wasmFullPass('(module (func (result f64) (f64.const 2.5)) (export "run" (func 0)))', 2.5); +wasmFullPass('(module (func (result f64) (f64.const 10e2)) (export "run" (func 0)))', 10e2); +wasmFullPass('(module (func (result f32) (f32.const 10e2)) (export "run" (func 0)))', 10e2); +wasmFullPass('(module (func (result f64) (f64.const -0x8000000000000000)) (export "run" (func 0)))', -0x8000000000000000); +wasmFullPass('(module (func (result f64) (f64.const -9223372036854775808)) (export "run" (func 0)))', -9223372036854775808); +wasmFullPass('(module (func (result f64) (f64.const 1797693134862315708145274e284)) (export "run" (func 0)))', 1797693134862315708145274e284); + +function testUnary(type, opcode, op, expect) { + wasmFullPass('(module (func (param ' + type + ') (result ' + type + ') (' + type + '.' + opcode + ' (local.get 0))) (export "run" (func 0)))', + expect, + {}, + op); +} + +function testBinary(type, opcode, lhs, rhs, expect) { + wasmFullPass('(module (func (param ' + type + ') (param ' + type + ') (result ' + type + ') (' + type + '.' + opcode + ' (local.get 0) (local.get 1))) (export "run" (func 0)))', + expect, + {}, + lhs, rhs); +} + +function testComparison(type, opcode, lhs, rhs, expect) { + wasmFullPass('(module (func (param ' + type + ') (param ' + type + ') (result i32) (' + type + '.' + opcode + ' (local.get 0) (local.get 1))) (export "run" (func 0)))', + expect, + {}, + lhs, rhs); +} + +testUnary('f32', 'abs', -40, 40); +testUnary('f32', 'neg', 40, -40); +testUnary('f32', 'floor', 40.9, 40); +testUnary('f32', 'ceil', 40.1, 41); +testUnary('f32', 'nearest', -41.5, -42); +testUnary('f32', 'trunc', -41.5, -41); +testUnary('f32', 'sqrt', 40, 6.324555397033691); + +testBinary('f32', 'add', 40, 2, 42); +testBinary('f32', 'sub', 40, 2, 38); +testBinary('f32', 'mul', 40, 2, 80); +testBinary('f32', 'div', 40, 3, 13.333333015441895); +testBinary('f32', 'min', 40, 2, 2); +testBinary('f32', 'max', 40, 2, 40); +testBinary('f32', 'copysign', 40, -2, -40); + +testComparison('f32', 'eq', 40, 40, 1); +testComparison('f32', 'ne', 40, 40, 0); +testComparison('f32', 'lt', 40, 40, 0); +testComparison('f32', 'le', 40, 40, 1); +testComparison('f32', 'gt', 40, 40, 0); +testComparison('f32', 'ge', 40, 40, 1); + +testUnary('f64', 'abs', -40, 40); +testUnary('f64', 'neg', 40, -40); +testUnary('f64', 'floor', 40.9, 40); +testUnary('f64', 'ceil', 40.1, 41); +testUnary('f64', 'nearest', -41.5, -42); +testUnary('f64', 'trunc', -41.5, -41); +testUnary('f64', 'sqrt', 40, 6.324555320336759); + +testBinary('f64', 'add', 40, 2, 42); +testBinary('f64', 'sub', 40, 2, 38); +testBinary('f64', 'mul', 40, 2, 80); +testBinary('f64', 'div', 40, 3, 13.333333333333334); +testBinary('f64', 'min', 40, 2, 2); +testBinary('f64', 'max', 40, 2, 40); +testBinary('f64', 'copysign', 40, -2, -40); + +testComparison('f64', 'eq', 40, 40, 1); +testComparison('f64', 'ne', 40, 40, 0); +testComparison('f64', 'lt', 40, 40, 0); +testComparison('f64', 'le', 40, 40, 1); +testComparison('f64', 'gt', 40, 40, 0); +testComparison('f64', 'ge', 40, 40, 1); + +wasmFailValidateText('(module (func (param i32) (result f32) (f32.sqrt (local.get 0))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (result i32) (f32.sqrt (local.get 0))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (result i32) (f32.sqrt (local.get 0))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param i32) (result f64) (f64.sqrt (local.get 0))))', mismatchError("i32", "f64")); +wasmFailValidateText('(module (func (param f64) (result i32) (f64.sqrt (local.get 0))))', mismatchError("f64", "i32")); +wasmFailValidateText('(module (func (param i32) (result i32) (f64.sqrt (local.get 0))))', mismatchError("i32", "f64")); +wasmFailValidateText('(module (func (f32.sqrt (nop))))', /(popping value from empty stack)|(type mismatch: expected f32 but nothing on stack)/); + +wasmFailValidateText('(module (func (param i32) (param f32) (result f32) (f32.add (local.get 0) (local.get 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (param i32) (result f32) (f32.add (local.get 0) (local.get 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (param f32) (result i32) (f32.add (local.get 0) (local.get 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (param i32) (result i32) (f32.add (local.get 0) (local.get 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param i32) (param f64) (result f64) (f64.add (local.get 0) (local.get 1))))', mismatchError("i32", "f64")); +wasmFailValidateText('(module (func (param f64) (param i32) (result f64) (f64.add (local.get 0) (local.get 1))))', mismatchError("i32", "f64")); +wasmFailValidateText('(module (func (param f64) (param f64) (result i32) (f64.add (local.get 0) (local.get 1))))', mismatchError("f64", "i32")); +wasmFailValidateText('(module (func (param i32) (param i32) (result i32) (f64.add (local.get 0) (local.get 1))))', mismatchError("i32", "f64")); + +wasmFailValidateText('(module (func (param i32) (param f32) (result f32) (f32.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (param i32) (result f32) (f32.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (param f32) (result f32) (f32.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param i32) (param f64) (result f64) (f64.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f64")); +wasmFailValidateText('(module (func (param f64) (param i32) (result f64) (f64.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f64")); +wasmFailValidateText('(module (func (param f64) (param f64) (result f64) (f64.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f64")); diff --git a/js/src/jit-test/tests/wasm/full-cycle.js b/js/src/jit-test/tests/wasm/full-cycle.js new file mode 100644 index 0000000000..7368fc0b7d --- /dev/null +++ b/js/src/jit-test/tests/wasm/full-cycle.js @@ -0,0 +1,148 @@ +wasmFullPass(`(module + (func $test (param i32) (param i32) (result i32) (i32.add (local.get 0) (local.get 1))) + (func $run (result i32) (call $test (i32.const 1) (i32.const ${Math.pow(2, 31) - 1}))) + (export "run" (func $run)) +)`, -Math.pow(2, 31)); + +wasmFullPass(`(module + (func (result i32) + i32.const 1 + i32.const 42 + i32.add + return + unreachable + i32.const 0 + call 3 + i32.const 42 + i32.add + ) + (func) (func) (func) +(export "run" (func 0)))`, 43); + +wasmFullPass(` +(module + (import "env" "a" (global $a i32)) + (import "env" "b" (func $b (param i32) (result i32))) + (func (export "run") (param $0 i32) (result i32) local.get 0 call $b) +)`, 43, { env: { a: 1337, b: x => x+1 } }, 42); + +// Global section. +wasmFullPass(`(module + (import "globals" "x" (global $imported i32)) + (global $mut_local (mut i32) (i32.const 0)) + (global $imm_local i32 (i32.const 37)) + (global $imm_local_2 i32 (global.get 0)) + (func $get (result i32) + i32.const 13 + global.set $mut_local + global.get $imported + global.get $mut_local + i32.add + global.get $imm_local + i32.add + global.get $imm_local_2 + i32.add + ) + (export "run" (func $get)) +)`, 13 + 42 + 37 + 42, { globals: {x: 42} }); + +// Memory. +wasmFullPass(`(module + (memory (export "memory") 1 2) + (data (i32.const 0) "\\00\\01\\02" "\\03\\04\\05") + (data (i32.const 6) "\\06") + (func (export "run") (result i32) + i32.const 1 + i32.load offset=2 + ) +)`, 0x06050403); + +let memory = new WebAssembly.Memory({ initial: 1, maximum: 2 }); + +wasmFullPass(`(module + (memory (import "" "memory") 1 2) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05") + (func (export "run") (result i32) + i32.const 1 + i32.load offset=2 + ) + (export "mem" (memory 0)) +)`, 0x050403, {"": {memory}}); + +// Tables. +wasmFullPass(`(module + (table (export "table") 3 funcref) + (type $t (func (result i32))) + (func $foo (result i32) (i32.const 1)) + (func $bar (result i32) (i32.const 2)) + (func $baz (result i32) (i32.const 3)) + (elem (i32.const 0) $baz $bar) + (elem (i32.const 2) $foo) + (func (export "run") (param i32) (result i32) + local.get 0 + call_indirect (type $t) + ) +)`, 3, {}, 0); + +let table = new WebAssembly.Table({ element: 'anyfunc', initial: 3, maximum: 3 }); + +wasmFullPass(`(module + (table (import "" "table") 3 4 funcref) + (type $t (func (result i32))) + (func $foo (result i32) (i32.const 1)) + (func $bar (result i32) (i32.const 2)) + (func $baz (result i32) (i32.const 3)) + (elem (i32.const 0) $baz $bar) + (elem (i32.const 2) $foo) + (func (export "run") (param i32) (result i32) + local.get 0 + call_indirect (type $t) + ) +)`, 3, {"":{table}}, 0); + +// Start function. +wasmFullPass(`(module + (global $g (mut i32) (i32.const 0)) + (func $start + global.get $g + i32.const 1 + i32.add + global.set $g + ) + (start $start) + (func (export "run") (result i32) + global.get $g + ) +)`, 1); + +// Branch table. +for (let [p, result] of [ + [0, 7], + [1, 6], + [2, 4], + [42, 4] +]) { + wasmFullPass(`(module + (func (export "run") (param $p i32) (result i32) (local $n i32) + i32.const 0 + local.set $n + block $c block $b block $a + local.get $p + br_table $a $b $c + end $a + local.get $n + i32.const 1 + i32.add + local.set $n + end $b + local.get $n + i32.const 2 + i32.add + local.set $n + end $c + local.get $n + i32.const 4 + i32.add + ) + )`, result, {}, p); +} diff --git a/js/src/jit-test/tests/wasm/function-references/as-non-null.js b/js/src/jit-test/tests/wasm/function-references/as-non-null.js new file mode 100644 index 0000000000..1280c8ee06 --- /dev/null +++ b/js/src/jit-test/tests/wasm/function-references/as-non-null.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !wasmFunctionReferencesEnabled() + +let {checkNonNull} = wasmEvalText(`(module + (func (export "checkNonNull") (param externref) (result (ref extern)) + local.get 0 + ref.as_non_null + ) +)`).exports; + +assertErrorMessage(() => checkNonNull(null), WebAssembly.RuntimeError, /dereferencing null pointer/); +for (let val of WasmNonNullExternrefValues) { + assertEq(checkNonNull(val), val, `is non-null`); +} diff --git a/js/src/jit-test/tests/wasm/function-references/binary.js b/js/src/jit-test/tests/wasm/function-references/binary.js new file mode 100644 index 0000000000..91cf807dc4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/function-references/binary.js @@ -0,0 +1,52 @@ +// |jit-test| skip-if: !wasmFunctionReferencesEnabled() + +load(libdir + "wasm-binary.js"); + +const v2vSig = {args:[], ret:VoidCode}; +const v2vSigSection = sigSection([v2vSig]); + +function checkInvalid(binary, errorMessage) { + assertErrorMessage(() => new WebAssembly.Module(binary), + WebAssembly.CompileError, + errorMessage); +} + +// The immediate of ref.null is a heap type, not a general reference type + +const invalidRefNullHeapBody = moduleWithSections([ + v2vSigSection, + declSection([0]), + bodySection([ + funcBody({locals:[], body:[ + RefNullCode, + OptRefCode, + AnyFuncCode, + DropCode, + ]}) + ]) +]); +checkInvalid(invalidRefNullHeapBody, /invalid heap type/); + +const invalidRefNullHeapElem = moduleWithSections([ + generalElemSection([ + { + flag: PassiveElemExpr, + typeCode: AnyFuncCode, + elems: [ + [RefNullCode, OptRefCode, AnyFuncCode, EndCode] + ] + } + ]) +]); +checkInvalid(invalidRefNullHeapElem, /invalid heap type/); + +const invalidRefNullHeapGlobal = moduleWithSections([ + globalSection([ + { + valType: AnyFuncCode, + flag: 0, + initExpr: [RefNullCode, OptRefCode, AnyFuncCode, EndCode] + } + ]) +]); +checkInvalid(invalidRefNullHeapGlobal, /invalid heap type/); diff --git a/js/src/jit-test/tests/wasm/function-references/br-non-null.js b/js/src/jit-test/tests/wasm/function-references/br-non-null.js new file mode 100644 index 0000000000..371cdaa40a --- /dev/null +++ b/js/src/jit-test/tests/wasm/function-references/br-non-null.js @@ -0,0 +1,76 @@ +// |jit-test| skip-if: !wasmFunctionReferencesEnabled() + +// br_on_non_null from constant +wasmValidateText(`(module + (func + block (result (ref extern)) + ref.null extern + br_on_non_null 0 + return + end + drop + ) +)`); + +// br_on_non_null from parameter +wasmValidateText(`(module + (func (param externref) (result (ref extern)) + local.get 0 + br_on_non_null 0 + unreachable + ) +)`); + +// br_on_null with multiple results +wasmValidateText(`(module + (func (param (ref null extern) (ref extern)) (result i32 i32 i32 (ref extern)) + i32.const 0 + i32.const 1 + i32.const 2 + local.get 0 + br_on_non_null 0 + local.get 1 + ) +)`); + +// no block type +wasmFailValidateText(`(module + (func + block + ref.null extern + br_on_non_null 0 + end + ) +)`, /type mismatch: target block type expected to be \[_, ref\]/); + +// in dead code +wasmValidateText(`(module + (type $t (func)) + (func (result funcref) + ref.null $t + return + br_on_non_null 0 + ) +)`); + +wasmFailValidateText(`(module + (func + return + br_on_non_null 0 + ) +)`, /type mismatch: target block type expected to be \[_, ref\]/); + +// Test the branch takes the correct path and results are passed correctly +let {ifNull} = wasmEvalText(`(module + (func (export "ifNull") (param externref externref) (result externref) + local.get 0 + br_on_non_null 0 + local.get 1 + ) +)`).exports; + +const DefaultTestVal = "default!test"; +assertEq(ifNull(null, DefaultTestVal), DefaultTestVal); +for (let val of WasmNonNullExternrefValues) { + assertEq(ifNull(val, DefaultTestVal), val); +} diff --git a/js/src/jit-test/tests/wasm/function-references/br-null.js b/js/src/jit-test/tests/wasm/function-references/br-null.js new file mode 100644 index 0000000000..26d1013de2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/function-references/br-null.js @@ -0,0 +1,58 @@ +// |jit-test| skip-if: !wasmFunctionReferencesEnabled() + +// br_on_null from constant +wasmValidateText(`(module + (func + ref.null extern + br_on_null 0 + drop + ) +)`); + +// br_on_null from parameter +wasmValidateText(`(module + (func (param externref) + local.get 0 + br_on_null 0 + drop + ) +)`); + +// br_on_null with single result +wasmValidateText(`(module + (func (result i32) + i32.const 0 + ref.null extern + br_on_null 0 + drop + ) +)`); + +// br_on_null with multiple results +wasmValidateText(`(module + (func (result i32 i32 i32) + i32.const 0 + i32.const 1 + i32.const 2 + ref.null extern + br_on_null 0 + drop + ) +)`); + +// Test the branch takes the correct path and results are passed correctly +let {isNull} = wasmEvalText(`(module + (func (export "isNull") (param externref) (result i32) + i32.const 1 + local.get 0 + br_on_null 0 + drop + drop + i32.const 0 + ) +)`).exports; + +assertEq(isNull(null), 1, `null is null`); +for (let val of WasmNonNullExternrefValues) { + assertEq(isNull(val), 0, `${typeof(val)} is not null`); +} diff --git a/js/src/jit-test/tests/wasm/function-references/call_ref.js b/js/src/jit-test/tests/wasm/function-references/call_ref.js new file mode 100644 index 0000000000..514c3145d6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/function-references/call_ref.js @@ -0,0 +1,100 @@ +// |jit-test| skip-if: !wasmFunctionReferencesEnabled() + +let { plusOne } = wasmEvalText(`(module + (; forward declaration so that ref.func works ;) + (elem declare func $plusOneRef) + (type $t (func (param i32) (result i32))) + + (func $plusOneRef (param i32) (result i32) + (i32.add + local.get 0 + i32.const 1) + ) + + (func (export "plusOne") (param i32) (result i32) + local.get 0 + ref.func $plusOneRef + call_ref $t + ) +)`).exports; + +assertEq(plusOne(3), 4); + +// pass non-funcref type +wasmFailValidateText(`(module + (type $t (func (param i32))) + (func (param $a i32) + local.get $a + call_ref $t + ) +)`, /type mismatch: expression has type i32 but expected \(ref null \d+\)/); + +wasmFailValidateText(`(module + (type $t (func (param externref))) + (func (param $a (ref extern)) + local.get $a + call_ref $t + ) +)`, /type mismatch: expression has type \(ref extern\) but expected \(ref null \d+\)/); + +// pass (non-subtype of) funcref +wasmFailValidateText(`(module + (type $t (func (param i32) (result i32))) + (func (param funcref) + local.get 0 + call_ref $t + ) +)`, /type mismatch: expression has type funcref but expected \(ref null \d+\)/); + +// signature mismatch +wasmFailValidateText(`(module + (type $t (func (param i32) (result i32))) + (elem declare func $plusOneRef) + (func $plusOneRef (param f32) (result f32) + (f32.add + local.get 0 + f32.const 1.0) + ) + + (func (export "plusOne") (param i32) (result i32) + local.get 0 + ref.func $plusOneRef + call_ref $t + ) +)`, /type mismatch: expression has type \(ref \d+\) but expected \(ref null \d+\)/); + +// Cross-instance calls +let { loadInt } = wasmEvalText(`(module + (memory 1 1) + (data (i32.const 0) "\\04\\00\\00\\00") + (func (export "loadInt") (result i32) + i32.const 0 + i32.load offset=0 + ) +)`).exports; + +let { callLoadInt } = wasmEvalText(`(module + (type $t (func (result i32))) + (elem declare func 0) + (import "" "loadInt" (func (result i32))) + (func (export "callLoadInt") (result i32) + ref.func 0 + call_ref $t + ) +)`, {"": { loadInt, }}).exports; + +assertEq(loadInt(), 4); +assertEq(callLoadInt(), 4); + +// Null call. +assertErrorMessage(function() { + let { nullCall } = wasmEvalText(`(module + (type $t (func (param i32) (result i32))) + (func (export "nullCall") (param i32) (result i32) + local.get 0 + ref.null $t + call_ref $t + ) + )`).exports; + nullCall(3); +}, WebAssembly.RuntimeError, /dereferencing null pointer/); diff --git a/js/src/jit-test/tests/wasm/function-references/directives.txt b/js/src/jit-test/tests/wasm/function-references/directives.txt new file mode 100644 index 0000000000..f7d2135421 --- /dev/null +++ b/js/src/jit-test/tests/wasm/function-references/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing --wasm-function-references; test-also=--wasm-compiler=baseline --wasm-function-references; include:wasm.js diff --git a/js/src/jit-test/tests/wasm/function-references/disabled.js b/js/src/jit-test/tests/wasm/function-references/disabled.js new file mode 100644 index 0000000000..70a66a937d --- /dev/null +++ b/js/src/jit-test/tests/wasm/function-references/disabled.js @@ -0,0 +1,17 @@ +// |jit-test| skip-if: wasmFunctionReferencesEnabled() + +const { CompileError, validate } = WebAssembly; + +const UNRECOGNIZED_OPCODE_OR_BAD_TYPE = /unrecognized opcode|bad type|\(ref T\) types not enabled/; + +let simpleTests = [ + `(module (func (param (ref 0)) (unreachable)))`, +]; + +// Test that use of function-references fails when function-references is disabled. + +for (let src of simpleTests) { + let bin = wasmTextToBinary(src); + assertEq(validate(bin), false); + wasmCompilationShouldFail(bin, UNRECOGNIZED_OPCODE_OR_BAD_TYPE); +} diff --git a/js/src/jit-test/tests/wasm/function-references/nnl-test.js b/js/src/jit-test/tests/wasm/function-references/nnl-test.js new file mode 100644 index 0000000000..9436b970d5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/function-references/nnl-test.js @@ -0,0 +1,176 @@ +// |jit-test| skip-if: !wasmFunctionReferencesEnabled() + +// Generates combinations of different block types and operations for +// non-defaultable locals (local.set / .tee / .get). +// See the function references specification on the updated algorithm +// for validating non-null references in locals. + +const KINDS = [ + "block", + "loop", + "try", + "catch", + "delegate", + "if", + "else", +] +const INITIALIZED = [ + "nowhere", + "outer", + "inner", + "outer-tee", + "inner-tee", +]; +const USED = [ + "outer", + "inner", + "after-inner", + "after-outer", +]; + +function generateBlock(kind, contents) { + switch (kind) { + case "block": { + return `block\n${contents}end\n` + } + case "loop": { + return `loop\n${contents}end\n` + } + case "try": { + return `try\n${contents}end\n` + } + case "catch": { + return `try\ncatch_all\n${contents}end\n` + } + case "delegate": { + return `try\n${contents}\ndelegate 0\n` + } + case "if": { + return `i32.const 0\nif\n${contents}end\n` + } + case "else": { + return `i32.const 0\nif\nelse\n${contents}end\n` + } + } +} + +// Generate a variation of the module below: +// +// (func +// (block +// $outer +// (block +// $inner +// ) +// $after-inner +// ) +// $after-outer +// ) +// +// Where a local is used and initialized at different points depending on the +// parameters. The block kinds of the inner and outer block may also be +// customized. +function generateModule(outerBlockKind, innerBlockKind, initializedWhere, usedWhere) { + const INITIALIZE_STMT = '(local.set 0 ref.func 0)\n'; + const INITIALIZE_STMT2 = '(drop (local.tee 0 ref.func 0))\n'; + const USE_STMT = '(drop local.get 0)\n'; + + // inner block + let innerBlockContents = ''; + if (initializedWhere === 'inner') { + innerBlockContents += INITIALIZE_STMT; + } else if (initializedWhere === 'inner-tee') { + innerBlockContents += INITIALIZE_STMT2; + } + if (usedWhere === 'inner') { + innerBlockContents += USE_STMT; + } + let innerBlock = generateBlock(innerBlockKind, innerBlockContents); + + // outer block + let outerBlockContents = ''; + if (initializedWhere === 'outer') { + outerBlockContents += INITIALIZE_STMT; + } else if (initializedWhere === 'outer-tee') { + outerBlockContents += INITIALIZE_STMT2; + } + if (usedWhere === 'outer') { + outerBlockContents += USE_STMT; + } + outerBlockContents += innerBlock; + if (usedWhere === 'after-inner') { + outerBlockContents += USE_STMT; + } + let outerBlock = generateBlock(outerBlockKind, outerBlockContents); + + // after outer block + let afterOuterBlock = ''; + if (usedWhere === 'after-outer') { + afterOuterBlock += USE_STMT; + } + + return `(module + (type $t (func)) + (func (export "test") + (local (ref $t)) +${outerBlock}${afterOuterBlock} ) +)`; +} + +const LOGGING = false; + +for (let outer of KINDS) { + for (let inner of KINDS) { + for (let initialized of INITIALIZED) { + for (let used of USED) { + let text = generateModule(outer, inner, initialized, used); + + let expectPass; + switch (initialized) { + case "outer": + case "outer-tee": { + // Defining the local in the outer block makes it valid + // in the outer block, the inner block, and after the + // inner block + expectPass = used !== "after-outer"; + break; + } + case "inner": + case "inner-tee": { + // Defining the local in the inner block makes it valid + // in the inner block + // + // NOTE: an extension to typing could make this valid + // after the inner block in some cases + expectPass = used === "inner"; + break; + } + case "nowhere": { + // Not defining the local makes it always invalid to + // use + expectPass = false; + break; + } + } + + if (LOGGING) { + console.log(); + console.log(`TEST: outer=${outer}, inner=${inner}, initialized=${initialized}, used=${used}`); + console.log(expectPass ? "EXPECT PASS" : "EXPECT FAIL"); + console.log(text); + } + + let binary = wasmTextToBinary(text); + assertEq(WebAssembly.validate(binary), expectPass); + if (!expectPass) { + // Check if the error message is right. + try { + new WebAssembly.Module(binary); + } catch (ex) { + assertEq(true, /local\.get read from unset local/.test(ex.message)); + } + } + } + } + } +} diff --git a/js/src/jit-test/tests/wasm/function-references/non-nullable-table.js b/js/src/jit-test/tests/wasm/function-references/non-nullable-table.js new file mode 100644 index 0000000000..97ab04713c --- /dev/null +++ b/js/src/jit-test/tests/wasm/function-references/non-nullable-table.js @@ -0,0 +1,79 @@ +// |jit-test| skip-if: !wasmFunctionReferencesEnabled() + +// non-null table initialization +var { get1, get2, get3, get4 } = wasmEvalText(`(module + (type $dummy (func)) + (func $dummy) + + (table $t1 10 funcref) + (table $t2 10 funcref (ref.func $dummy)) + (table $t3 10 (ref $dummy) (ref.func $dummy)) + (table $t4 10 (ref func) (ref.func $dummy)) + + (func (export "get1") (result funcref) (table.get $t1 (i32.const 1))) + (func (export "get2") (result funcref) (table.get $t2 (i32.const 4))) + (func (export "get3") (result funcref) (table.get $t3 (i32.const 7))) + (func (export "get4") (result funcref) (table.get $t4 (i32.const 5))) +)`).exports; +assertEq(get1(), null); +assertEq(get2() != null, true); +assertEq(get3() != null, true); +assertEq(get4() != null, true); + +const sampleWasmFunction = get2(); +sampleWasmFunction(); + +// Invalid initializers +for (let i of [ + `(table $t1 10 (ref $dummy) (ref.func $dummy1))`, + `(table $t2 5 10 (ref func))`, + `(table $t3 10 10 (ref func) (ref.null $dummy1))`, + `(table $t4 10 (ref $dummy))`, + '(table $t5 1 (ref $dummy) (ref.null $dummy))', +]) { + wasmFailValidateText(`(module + (type $dummy (func)) + (type $dummy1 (func (param i32))) + (func $dummy1 (param i32)) + + ${i} + )`, /(type mismatch|table with non-nullable references requires initializer)/); +} + +var t1 = new WebAssembly.Table({initial: 10, element: {ref: 'func', nullable: false }}, sampleWasmFunction); +assertEq(t1.get(2) != null, true); +assertThrows(() => { + new WebAssembly.Table({initial: 10, element: {ref: 'func', nullable: false }}); +}); +assertThrows(() => { + new WebAssembly.Table({initial: 10, element: {ref: 'func', nullable: false }}, null); +}); + +var t2 = new WebAssembly.Table({initial: 6, maximum: 20, element: {ref: 'extern', nullable: false }}, {foo: "bar"}); +assertEq(t2.get(1).foo, "bar"); +assertThrows(() => { t2.get(7) }); +assertThrows(() => { t2.grow(9, null) }); +t2.grow(8, {t: "test"}); +assertEq(t2.get(3).foo, "bar"); +assertEq(t2.get(7).t, "test"); +assertThrows(() => { + new WebAssembly.Table({initial: 10, element: {ref: 'extern', nullable: false }}, null); +}); + +// Fail because tables come before globals in the binary format, so tables +// cannot refer to globals. +wasmFailValidateText(`(module + (global $g1 externref) + (table 10 externref (global.get $g1)) +)`, /global.get index out of range/); + +function assertThrows(f) { + var ok = false; + try { + f(); + } catch (exc) { + ok = true; + } + if (!ok) + throw new TypeError("Assertion failed: " + f + " did not throw as expected"); +} diff --git a/js/src/jit-test/tests/wasm/function-references/non-nullable.js b/js/src/jit-test/tests/wasm/function-references/non-nullable.js new file mode 100644 index 0000000000..afe1d3cb43 --- /dev/null +++ b/js/src/jit-test/tests/wasm/function-references/non-nullable.js @@ -0,0 +1,176 @@ +// |jit-test| skip-if: !wasmFunctionReferencesEnabled() + +// non-null values are subtype of null values +wasmValidateText(`(module + (func (param $a (ref extern)) + local.get $a + (block (param (ref null extern)) + drop + ) + ) +)`); + +// null values are not subtype of non-null values +wasmFailValidateText(`(module + (func (param $a (ref null extern)) + local.get $a + (block (param (ref extern)) + drop + ) + ) +)`, /expression has type externref but expected \(ref extern\)/); + +// can have non-defaultable local, but not use/get if unset. +wasmValidateText(`(module + (func (local (ref extern))) +)`); +wasmFailValidateText(`(module + (func (local (ref extern)) + local.get 0 + drop + ) +)`, /local\.get read from unset local/); +wasmFailValidateText(`(module + (func + (local (ref extern)) + unreachable + block + local.get 0 + drop + end + ) +)`, /local\.get read from unset local/); +wasmFailValidateText(`(module + (func (param funcref) (result funcref) (local (ref func)) + block + local.get 0 + ref.as_non_null + local.set 1 + end + local.get 1 + ) +)`, /local\.get read from unset local/); +wasmValidateText(`(module + (func (param $r (ref extern)) + (local $var (ref extern)) + local.get $r + ref.as_non_null + local.set $var + block block block + local.get $var + drop + end end end + ) + (func + (param (ref null func) (ref null func) (ref func)) + (result funcref) + (local (ref func) i32 (ref func) (ref null func)) + local.get 0 + ref.as_non_null + local.tee 3 + block + local.get 6 + ref.as_non_null + local.set 5 + end + local.get 2 + drop + local.tee 5 + ) +)`); +wasmFailValidateText(`(module + (elem declare func 0) + (func + (local (ref func)) + i32.const 0 + if + ref.func 0 + local.set 0 + else + local.get 0 + drop + end + ) +)`, /local\.get read from unset local/); +wasmValidateText(`(module + (elem declare func 0) + (func (result funcref) + (local (ref func) (ref func)) + i32.const 0 + if (result funcref) + ref.func 0 + local.set 0 + local.get 0 + else + ref.func 0 + local.tee 1 + local.get 1 + drop + end + ) +)`); + +// exported funcs can't take null in non-nullable params +let {a} = wasmEvalText(`(module + (func (export "a") (param (ref extern))) +)`).exports; +assertErrorMessage(() => a(null), TypeError, /cannot pass null to non-nullable/); +for (let val of WasmNonNullExternrefValues) { + a(val); +} + +// imported funcs can't return null in non-nullable results +function returnNull() { + return null; +} +function returnMultiNullReg() { + return [null, null]; +} +function returnMultiNullStack() { + return [1, 2, 3, 4, 5, 6, 7, 8, null]; +} +let {runNull, runMultiNullReg, runMultiNullStack} = wasmEvalText(`(module + (func $returnNull (import "" "returnNull") (result (ref extern))) + (func $returnMultiNullReg (import "" "returnMultiNullReg") (result (ref extern) (ref extern))) + (func $returnMultiNullStack (import "" "returnMultiNullStack") (result (ref extern) (ref extern) (ref extern) (ref extern) (ref extern) (ref extern) (ref extern) (ref extern) (ref extern))) + (func (export "runNull") + call $returnNull + unreachable + ) + (func (export "runMultiNullReg") + call $returnMultiNullReg + unreachable + ) + (func (export "runMultiNullStack") + call $returnMultiNullStack + unreachable + ) +)`, { "": { returnNull, returnMultiNullReg, returnMultiNullStack } }).exports; +assertErrorMessage(() => runNull(), TypeError, /cannot pass null to non-nullable/); +assertErrorMessage(() => runMultiNullReg(), TypeError, /cannot pass null to non-nullable/); +assertErrorMessage(() => runMultiNullStack(), TypeError, /cannot pass null to non-nullable/); + +{ + // can have non-nullable globals + wasmEvalText(`(module + (func $f) + (elem declare func $f) + (global (ref func) ref.func $f) + )`); +} + +// cannot have non-nullable tables without initializer +wasmFailValidateText(`(module + (table (ref extern) (elem)) +)`, /table with non-nullable references requires initializer/); + +// Testing internal wasmLosslessInvoke to pass non-nullable as params and arguments. +let {t} = wasmEvalText(`(module + (func (export "t") (param (ref extern)) (result (ref extern)) + (local (ref extern)) + (local.set 1 (local.get 0)) + (local.get 1) + ) +)`).exports; +const ret = wasmLosslessInvoke(t, {test: 1}); +assertEq(ret.value.test, 1); diff --git a/js/src/jit-test/tests/wasm/function-references/reftype-parse.js b/js/src/jit-test/tests/wasm/function-references/reftype-parse.js new file mode 100644 index 0000000000..643f753ec8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/function-references/reftype-parse.js @@ -0,0 +1,51 @@ +// |jit-test| skip-if: !wasmFunctionReferencesEnabled() + +// RefType/ValueType as a simple string +const t01 = new WebAssembly.Table({element: 'funcref', initial: 3}); +const t02 = new WebAssembly.Table({element: 'externref', initial: 8}); +const g01 = new WebAssembly.Global({value: 'funcref', mutable: true}, null); +const g02 = new WebAssembly.Global({value: 'externref', mutable: true}, null); + +// Specify ToString() equivalents +const t05 = new WebAssembly.Table({element: {toString() { return 'funcref' },}, initial: 11}); +const t06 = new WebAssembly.Table({element: ['externref'], initial: 7}); + +assertErrorMessage( + () => new WebAssembly.Table({element: 'foo', initial: 1}), + TypeError, /bad value type/); +assertErrorMessage( + () => new WebAssembly.Table({element: true, initial: 1}), + TypeError, /bad value type/); + +// RefType/ValueType can be specified as an {ref: 'func', ...} object +const t11 = new WebAssembly.Table({element: {ref: 'func', nullable: true}, initial: 3}); +const t12 = new WebAssembly.Table({element: {ref: 'extern', nullable: true}, initial: 3}); +const t13 = new WebAssembly.Table({element: {ref: 'extern', nullable: false}, initial: 3}, {}); + +assertErrorMessage( + () => new WebAssembly.Table({element: {ref: 'func', nullable: false}, initial: 1}, null), + TypeError, /cannot pass null to non-nullable WebAssembly reference/); +assertErrorMessage( + () => new WebAssembly.Table({element: {ref: 'extern', nullable: false}, initial: 1}, null), + TypeError, /cannot pass null to non-nullable WebAssembly reference/); + +assertErrorMessage( + () => new WebAssembly.Table({element: {ref: 'bar', nullable: true}, initial: 1}), + TypeError, /bad value type/); + +const g11 = new WebAssembly.Global({value: {ref: 'func', nullable: true}, mutable: true}); +const g12 = new WebAssembly.Global({value: {ref: 'extern', nullable: true}, mutable: true}); +const g13 = new WebAssembly.Global({value: {ref: 'extern', nullable: false}, mutable: true}, {}); +const g14 = new WebAssembly.Global({value: {ref: 'extern', nullable: false}, mutable: true}); +const g15 = new WebAssembly.Global({value: {ref: 'extern', nullable: false}, mutable: true}, void 0); + +assertErrorMessage( + () => new WebAssembly.Global({value: {ref: 'func', nullable: false}, mutable: true}), + TypeError, /cannot pass null to non-nullable WebAssembly reference/); +assertErrorMessage( + () => new WebAssembly.Global({value: {ref: 'extern', nullable: false}, mutable: true}, null), + TypeError, /cannot pass null to non-nullable WebAssembly reference/); + +assertErrorMessage( + () => new WebAssembly.Global({value: {ref: 'bar', nullable: true}, mutable: true}), + TypeError, /bad value type/); diff --git a/js/src/jit-test/tests/wasm/gc/TypedObject.js b/js/src/jit-test/tests/wasm/gc/TypedObject.js new file mode 100644 index 0000000000..ce27dc1089 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/TypedObject.js @@ -0,0 +1,106 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// We can read the object fields from JS via a builtin +{ + let ins = wasmEvalText(`(module + (type $p (struct (field f64) (field (mut i32)))) + + (func (export "mkp") (result eqref) + (struct.new $p (f64.const 1.5) (i32.const 33))))`).exports; + + let p = ins.mkp(); + assertEq(wasmGcReadField(p, 0), 1.5); + assertEq(wasmGcReadField(p, 1), 33); + assertErrorMessage(() => wasmGcReadField(p, 2), WebAssembly.RuntimeError, /index out of bounds/); +} + +// Fields can't be modified from JS. +{ + let ins = wasmEvalText(`(module + (type $p (struct (field f64))) + + (func (export "mkp") (result eqref) + (struct.new $p (f64.const 1.5))))`).exports; + + let p = ins.mkp(); + assertErrorMessage(() => p[0] = 5.7, TypeError, /can't modify/); +} + +// MVA v1 restriction: structs have no prototype +{ + let ins = wasmEvalText(`(module + (type $q (struct (field (mut f64)))) + (type $p (struct (field (mut (ref null $q))))) + + (type $r (struct (field (mut eqref)))) + + (func (export "mkp") (result eqref) + (struct.new $p (ref.null $q))) + + (func (export "mkr") (result eqref) + (struct.new $r (ref.null eq))))`).exports; + + assertEq(Object.getPrototypeOf(ins.mkp()), null); + assertEq(Object.getPrototypeOf(ins.mkr()), null); +} + +// MVA v1 restriction: all fields are immutable +{ + let ins = wasmEvalText(`(module + (type $q (struct (field (mut f64)))) + (type $p (struct (field (mut (ref null $q))) (field (mut eqref)))) + + (func (export "mkq") (result eqref) + (struct.new $q (f64.const 1.5))) + + (func (export "mkp") (result eqref) + (struct.new $p (ref.null $q) (ref.null eq))))`).exports; + let q = ins.mkq(); + assertEq(typeof q, "object"); + assertEq(wasmGcReadField(q, 0), 1.5); + + let p = ins.mkp(); + assertEq(typeof p, "object"); + assertEq(wasmGcReadField(p, 0), null); + + assertErrorMessage(() => { p[0] = q }, TypeError, /can't modify/); + assertErrorMessage(() => { p[1] = q }, TypeError, /can't modify/); +} + +// MVA v1 restriction: structs that expose i64 fields make those fields +// immutable from JS, and the structs are not constructible from JS. +{ + let ins = wasmEvalText(`(module + (type $p (struct (field (mut i64)))) + (func (export "mkp") (result eqref) + (struct.new $p (i64.const 0x1234567887654321))))`).exports; + + let p = ins.mkp(); + assertEq(typeof p, "object"); + assertEq(wasmGcReadField(p, 0), 0x1234567887654321n) + + assertErrorMessage(() => { p[0] = 0 }, TypeError, /can't modify/); +} + +// A consequence of the current mapping of i64 as two i32 fields is that we run +// a risk of struct.narrow not recognizing the difference. So check this. +{ + let ins = wasmEvalText( + `(module + (type $p (struct (field i64))) + (type $q (struct (field i32) (field i32))) + (func $f (param eqref) (result i32) + local.get 0 + ref.test (ref $q) + ) + (func $g (param eqref) (result i32) + local.get 0 + ref.test (ref $p) + ) + (func (export "t1") (result i32) + (call $f (struct.new $p (i64.const 0)))) + (func (export "t2") (result i32) + (call $g (struct.new $q (i32.const 0) (i32.const 0)))))`).exports; + assertEq(ins.t1(), 0); + assertEq(ins.t2(), 0); +} diff --git a/js/src/jit-test/tests/wasm/gc/arrays.js b/js/src/jit-test/tests/wasm/gc/arrays.js new file mode 100644 index 0000000000..b3f03151bb --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/arrays.js @@ -0,0 +1,2027 @@ +// |jit-test| skip-if: !wasmGcEnabled(); test-also=--gc-zeal=2 + +// Test array instructions on different valtypes + +const GENERAL_TESTS = [ + [ + 'i32', + 0, + 0xce, + ], [ + 'i64', + 0n, + 0xabcdefn, + ], [ + 'f32', + 0, + 13.5, + ], [ + 'f64', + 0, + 13.5, + ], [ + 'externref', + null, + 'hello', + ], +]; + +for (let [valtype, def, nondef] of GENERAL_TESTS) { + let {create, createDefault, get, set, len} = wasmEvalText(`(module + (type $a (array (mut ${valtype}))) + + (; new T[0] = { 1... } ;) + (func (export "create") (param i32 ${valtype}) (result eqref) + local.get 1 + local.get 0 + array.new $a + ) + + (; new T[0] ;) + (func (export "createDefault") (param i32) (result eqref) + local.get 0 + array.new_default $a + ) + + (; 0[1] ;) + (func (export "get") (param eqref i32) (result ${valtype}) + local.get 0 + ref.cast (ref null $a) + local.get 1 + array.get $a + ) + + (; 0[1] = 2 ;) + (func (export "set") (param eqref i32 ${valtype}) + local.get 0 + ref.cast (ref null $a) + local.get 1 + local.get 2 + array.set $a + ) + + (; len(a) ;) + (func (export "len") (param eqref) (result i32) + local.get 0 + ref.cast (ref null $a) + array.len + ) + )`).exports; + + function checkArray(array, length, init, setval) { + // Check length + assertEq(len(array), length); + assertEq(wasmGcArrayLength(array), length); + + // Check init value + for (let i = 0; i < length; i++) { + assertEq(wasmGcReadField(array, i), init); + assertEq(get(array, i), init); + } + + // Set every element to setval + for (let i = 0; i < length; i++) { + set(array, i, setval); + + // Check there is no overwrite + for (let j = i + 1; j < length; j++) { + assertEq(wasmGcReadField(array, j), init); + assertEq(get(array, j), init); + } + } + + // Check out of bounds conditions + for (let loc of [-1, length, length + 1]) { + assertErrorMessage(() => { + get(array, loc); + }, WebAssembly.RuntimeError, /out of bounds/); + assertErrorMessage(() => { + set(array, loc, setval); + }, WebAssembly.RuntimeError, /out of bounds/); + } + } + + for (let arrayLength = 0; arrayLength < 5; arrayLength++) { + checkArray(createDefault(arrayLength), arrayLength, def, nondef); + checkArray(create(arrayLength, nondef), arrayLength, nondef, def); + } +} + +// Check packed array reads and writes + +for (let [fieldtype, max] of [ + [ + 'i8', + 0xff, + ], [ + 'i16', + 0xffff, + ] +]) { + let {create, getS, getU, set} = wasmEvalText(`(module + (type $a (array (mut ${fieldtype}))) + + (; new T[0] = { 1... } ;) + (func (export "create") (param i32 i32) (result eqref) + local.get 1 + local.get 0 + array.new $a + ) + + (; 0[1] ;) + (func (export "getS") (param eqref i32) (result i32) + local.get 0 + ref.cast (ref null $a) + local.get 1 + array.get_s $a + ) + + (; 0[1] ;) + (func (export "getU") (param eqref i32) (result i32) + local.get 0 + ref.cast (ref null $a) + local.get 1 + array.get_u $a + ) + + (; 0[1] = 2 ;) + (func (export "set") (param eqref i32 i32) + local.get 0 + ref.cast (ref null $a) + local.get 1 + local.get 2 + array.set $a + ) + )`).exports; + + // Check zero and sign extension + let a = create(1, 0); + set(a, 0, max); + assertEq(getS(a, 0), -1); + assertEq(getU(a, 0), max); + + // JS-API defaults to sign extension + assertEq(wasmGcReadField(a, 0), getS(a, 0)); + + // Check array.new truncates init value + assertEq(wasmGcReadField(create(1, max + 1), 0), 0); + + // Check array.set truncates + let b = create(1, 0); + set(b, 0, max + 1); + assertEq(getU(b, 0), 0); + + // Check no overwrite on set + let c = create(2, 0); + set(c, 0, max << 4); + assertEq(getU(c, 0), (max << 4) & max); + assertEq(getU(c, 1), 0); +} + +// Check arrays must be mutable to mutate + +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array i32)) + (func + (array.set $a + (array.new $a + i32.const 0xff + i32.const 10) + i32.const 0 + i32.const 0 + ) + ) +) +`), WebAssembly.CompileError, /array is not mutable/); + +// Check operations trap on null + +assertErrorMessage(() => { + wasmEvalText(`(module + (type $a (array (mut i32))) + (func + ref.null $a + i32.const 0 + array.get $a + drop + ) + (start 0) + )`); +}, WebAssembly.RuntimeError, /null/); + +assertErrorMessage(() => { + wasmEvalText(`(module + (type $a (array (mut i32))) + (func + ref.null $a + i32.const 0 + i32.const 0 + array.set $a + ) + (start 0) + )`); +}, WebAssembly.RuntimeError, /null/); + +assertErrorMessage(() => { + wasmEvalText(`(module + (type $a (array (mut i32))) + (func + ref.null $a + array.len + drop + ) + (start 0) + )`); +}, WebAssembly.RuntimeError, /null/); + +// Check an extension postfix is present iff the element is packed + +for ([fieldtype, packed] of [ + ['i8', true], + ['i16', true], + ['i32', false], + ['i64', false], + ['f32', false], + ['f64', false], +]) { + let extensionModule = `(module + (type $a (array ${fieldtype})) + (func + ref.null $a + i32.const 0 + array.get_s $a + drop + ) + (func + ref.null $a + i32.const 0 + array.get_u $a + drop + ) + )`; + let noExtensionModule = `(module + (type $a (array ${fieldtype})) + (func + ref.null $a + i32.const 0 + array.get $a + drop + ) + )`; + + if (packed) { + wasmValidateText(extensionModule); + wasmFailValidateText(noExtensionModule, /must specify signedness/); + } else { + wasmFailValidateText(extensionModule, /must not specify signedness/); + wasmValidateText(noExtensionModule); + } +} + +////////////////////////////////////////////////////////////////////////////// +// +// array.new_fixed +/* + validation: + array-type imm-operand needs to be "in range" + array-type imm-operand must refer to an array type + operands (on stack) must all match ("be compatible with") the array elem + type + number of operands (on stack) must not be less than the num-of-elems + imm-operand + zero elements doesn't fail compilation + reftypes elements doesn't fail compilation + trying to create a 1-billion-element array fails gracefully + run: + resulting 4-element array is as expected + resulting zero-element array is as expected + resulting 30-element array is as expected +*/ + +// validation: array-type imm-operand needs to be "in range" +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array i8)) + (func (result eqref) + i32.const 66 + i32.const 77 + array.new_fixed 2 2 ;; type index 2 is the first invalid one + ) +) +`), WebAssembly.CompileError, /type index out of range/); + +// validation: array-type imm-operand must refer to an array type +assertErrorMessage(() => wasmEvalText(`(module + (type $a (func (param f64) (result f64))) + (func (result eqref) + i32.const 66 + i32.const 77 + array.new_fixed $a 2 + ) +) +`), WebAssembly.CompileError, /not an array type/); + +// validation: operands (on stack) must all match ("be compatible with") +// the array elem type +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array i32)) + (func (result eqref) + f32.const 66.6 + f64.const 77.7 + array.new_fixed $a 2 + ) +) +`), WebAssembly.CompileError, /expression has type f64 but expected i32/); + +// validation: number of operands (on stack) must not be less than the +// num-of-elems imm-operand +assertNoWarning(() => wasmEvalText(`(module + (type $a (array f32)) + (func + f64.const 66.6 ;; we won't put this in the array + f32.const 77.7 + f32.const 88.8 + array.new_fixed $a 2 ;; use up 88.8 and 77.7 and replace with array + drop ;; dump the array + f64.const 99.9 + f64.mul ;; check the 66.6 value is still on the stack + drop ;; now should be empty + ) +) +`)); +// (more) +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array i64)) + (func (param i64) (result eqref) + local.get 0 + array.new_fixed $a 2 + ) +) +`), WebAssembly.CompileError, /popping value from empty stack/); + +// validation: zero elements doesn't fail compilation +assertNoWarning(() => wasmEvalText(`(module + (type $a (array i32)) + (func (result eqref) + array.new_fixed $a 0 + ) +) +`)); + +// validation: reftyped elements doesn't fail compilation +assertNoWarning(() => wasmEvalText(`(module + (type $a (array eqref)) + (func (param eqref) (result eqref) + local.get 0 + array.new_fixed $a 1 + ) +) +`)); + +// run: resulting 4-element array is as expected +{ + let { newFixed } = wasmEvalText(`(module + (type $a (array i8)) + (func (export "newFixed") (result eqref) + i32.const 66 + i32.const 77 + i32.const 88 + i32.const 99 + array.new_fixed $a 4 + ) + )`).exports; + let a = newFixed(); + assertEq(wasmGcArrayLength(a), 4); + assertEq(wasmGcReadField(a, 0), 66); + assertEq(wasmGcReadField(a, 1), 77); + assertEq(wasmGcReadField(a, 2), 88); + assertEq(wasmGcReadField(a, 3), 99); +} + +// run: resulting zero-element array is as expected +{ + let { newFixed } = wasmEvalText(`(module + (type $a (array i16)) + (func (export "newFixed") (result eqref) + array.new_fixed $a 0 + ) + )`).exports; + let a = newFixed(); + assertEq(wasmGcArrayLength(a), 0); +} + +// run: resulting 30-element array is as expected +{ + let { newFixed } = wasmEvalText(`(module + (type $a (array i16)) + (func (export "newFixed") (result eqref) + i32.const 1 + i32.const 2 + i32.const 3 + i32.const 4 + i32.const 5 + i32.const 6 + i32.const 7 + i32.const 8 + i32.const 9 + i32.const 10 + i32.const 11 + i32.const 12 + i32.const 13 + i32.const 14 + i32.const 15 + i32.const 16 + i32.const 17 + i32.const 18 + i32.const 19 + i32.const 20 + i32.const 21 + i32.const 22 + i32.const 23 + i32.const 24 + i32.const 25 + i32.const 26 + i32.const 27 + i32.const 28 + i32.const 29 + i32.const 30 + array.new_fixed $a 30 + ) + )`).exports; + let a = newFixed(); + assertEq(wasmGcArrayLength(a), 30); + for (i = 0; i < 30; i++) { + assertEq(wasmGcReadField(a, i), i + 1); + } +} + +// run: resulting 10_000-element array is as expected +{ + let initializers = ''; + for (let i = 0; i < 10_000; i++) { + initializers += `i32.const ${i + 1}\n`; + } + let { newFixed } = wasmEvalText(`(module + (type $a (array i16)) + (func (export "newFixed") (result eqref) + ${initializers} + array.new_fixed $a 10000 + ) + )`).exports; + let a = newFixed(); + assertEq(wasmGcArrayLength(a), 10000); + for (i = 0; i < 10000; i++) { + assertEq(wasmGcReadField(a, i), i + 1); + } +} + +////////////////////////////////////////////////////////////////////////////// +// +// array.new_data +/* + validation: + array-type imm-operand needs to be "in range" + array-type imm-operand must refer to an array type + array-type imm-operand must refer to an array of numeric elements + segment index must be "in range" + run: + if segment is "already used" (active, or passive that has subsequently + been dropped), then only a zero length array can be created + range to copy would require OOB read on data segment + resulting array is as expected +*/ + +// validation: array-type imm-operand needs to be "in range" +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array i8)) + (data $d "1337") + (func (export "newData") (result eqref) + (; offset=0 into data ;) i32.const 0 + (; size=4 into data ;) i32.const 4 + array.new_data 2 $d + ) +)`), WebAssembly.CompileError, /type index out of range/); + +// validation: array-type imm-operand must refer to an array type +assertErrorMessage(() => wasmEvalText(`(module + (type $a (func (param f32) (result f32))) + (data $d "1337") + (func (export "newData") (result eqref) + (; offset=0 into data ;) i32.const 0 + (; size=4 into data ;) i32.const 4 + array.new_data $a $d + ) +)`), WebAssembly.CompileError, /not an array type/); + +// validation: array-type imm-operand must refer to an array of numeric elements +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array eqref)) + (data $d "1337") + (func (export "newData") (result eqref) + (; offset=0 into data ;) i32.const 0 + (; size=4 into data ;) i32.const 4 + array.new_data $a $d + ) +)`), WebAssembly.CompileError, + /element type must be i8\/i16\/i32\/i64\/f32\/f64\/v128/); + +// validation: segment index must be "in range" +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array i8)) + (data $d "1337") + (func (export "newData") (result eqref) + (; offset=0 into data ;) i32.const 0 + (; size=4 into data ;) i32.const 4 + array.new_data $a 1 ;; 1 is the lowest invalid dseg index + ) +)`), WebAssembly.CompileError, /segment index is out of range/); + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length array can be created #1 +{ + let { newData } = wasmEvalText(`(module + (memory 1) + (type $a (array i8)) + (data $d (offset (i32.const 0)) "1337") + (func (export "newData") (result eqref) + (; offset=0 into data ;) i32.const 0 + (; size=4 into data ;) i32.const 4 + array.new_data $a $d + ) + )`).exports; + assertErrorMessage(() => { + newData(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length array can be created #2 +{ + let { newData } = wasmEvalText(`(module + (memory 1) + (type $a (array i8)) + (data $d (offset (i32.const 0)) "1337") + (func (export "newData") (result eqref) + (; offset=4 into data ;) i32.const 4 + (; size=0 into data ;) i32.const 0 + array.new_data $a $d + ) + )`).exports; + assertErrorMessage(() => { + newData(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length array can be created #3 +{ + let { newData } = wasmEvalText(`(module + (memory 1) + (type $a (array i8)) + (data $d (offset (i32.const 0)) "1337") + (func (export "newData") (result eqref) + (; offset=0 into data ;) i32.const 0 + (; size=0 into data ;) i32.const 0 + array.new_data $a $d + ) + )`).exports; + let arr = newData(); + assertEq(wasmGcArrayLength(arr), 0); +} + +// run: range to copy would require OOB read on data segment +{ + let { newData } = wasmEvalText(`(module + (type $a (array i8)) + (data $d "1337") + (func (export "newData") (result eqref) + (; offset=0 into data ;) i32.const 1 + (; size=4 into data ;) i32.const 4 + array.new_data $a $d + ) + )`).exports; + assertErrorMessage(() => { + newData(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: resulting array is as expected +{ + let { newData } = wasmEvalText(`(module + (type $a (array i8)) + (data $other "\\\\9") + (data $d "1337") + (func (export "newData") (result eqref) + (; offset=0 into data ;) i32.const 0 + (; size=4 into data ;) i32.const 4 + array.new_data $a $d + ) + )`).exports; + let arr = newData(); + assertEq(wasmGcArrayLength(arr), 4); + assertEq(wasmGcReadField(arr, 0), 48+1); + assertEq(wasmGcReadField(arr, 1), 48+3); + assertEq(wasmGcReadField(arr, 2), 48+3); + assertEq(wasmGcReadField(arr, 3), 48+7); +} + +////////////////////////////////////////////////////////////////////////////// +// +// array.new_elem +/* + validation: + array-type imm-operand needs to be "in range" + array-type imm-operand must refer to an array type + array-type imm-operand must refer to an array of ref typed elements + destination elem type must be a supertype of src elem type + segment index must be "in range" + run: + if segment is "already used" (active, or passive that has subsequently + been dropped), then only a zero length array can be created + range to copy would require OOB read on elem segment + resulting array is as expected +*/ + +// validation: array-type imm-operand needs to be "in range" +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array funcref)) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "newElem") (result eqref) + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.new_elem 3 $e + ) +)`), WebAssembly.CompileError, /type index out of range/); + +// validation: array-type imm-operand must refer to an array type +assertErrorMessage(() => wasmEvalText(`(module + (type $a (func (param i64) (result f64))) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "newElem") (result eqref) + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.new_elem $a $e + ) +)`), WebAssembly.CompileError, /not an array type/); + +// validation: array-type imm-operand must refer to an array of ref typed +// elements +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array f32)) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "newElem") (result eqref) + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.new_elem $a $e + ) +)`), WebAssembly.CompileError, /element type is not a reftype/); + +// validation: destination elem type must be a supertype of src elem type +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array eqref)) + (elem $e func $f1) + (func $f1 (export "f1")) + ;; The implied copy here is from elem-seg-of-funcrefs to + ;; array-of-eqrefs, which must fail, because funcref isn't + ;; a subtype of eqref. + (func (export "newElem") (result eqref) + (; offset=0 into elem ;) i32.const 0 + (; size=0 into elem ;) i32.const 0 + array.new_elem $a $e + ) +)`), WebAssembly.CompileError, /incompatible element types/); + +// validation: segment index must be "in range" +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array funcref)) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "newElem") (result eqref) + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.new_elem $a 1 ;; 1 is the lowest invalid eseg index + ) +)`), WebAssembly.CompileError, /segment index is out of range/); + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length array can be created #1 +{ + let { newElem } = wasmEvalText(`(module + (table 4 funcref) + (type $a (array funcref)) + (elem $e (offset (i32.const 0)) func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "newElem") (result eqref) + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.new_elem $a $e + ) + )`).exports; + assertErrorMessage(() => { + newElem(); + }, WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length array can be created #2 +{ + let { newElem } = wasmEvalText(`(module + (table 4 funcref) + (type $a (array funcref)) + (elem $e (offset (i32.const 0)) func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "newElem") (result eqref) + (; offset=4 into elem ;) i32.const 4 + (; size=0 into elem ;) i32.const 0 + array.new_elem $a $e + ) + )`).exports; + assertErrorMessage(() => { + newElem(); + }, WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length array can be created #3 +{ + let { newElem } = wasmEvalText(`(module + (table 4 funcref) + (type $a (array funcref)) + (elem $e (offset (i32.const 0)) func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "newElem") (result eqref) + (; offset=0 into elem ;) i32.const 0 + (; size=0 into elem ;) i32.const 0 + array.new_elem $a $e + ) + )`).exports; + let arr = newElem(); + assertEq(wasmGcArrayLength(arr), 0); +} + +// run: range to copy would require OOB read on elem segment +{ + let { newElem } = wasmEvalText(`(module + (type $a (array funcref)) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "newElem") (result eqref) + (; offset=0 into elem ;) i32.const 1 + (; size=4 into elem ;) i32.const 4 + array.new_elem $a $e + ) + )`).exports; + assertErrorMessage(() => { + newElem(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: resulting array is as expected +{ + let { newElem, f1, f2, f3, f4 } = wasmEvalText(`(module + (type $a (array funcref)) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "newElem") (result eqref) + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.new_elem $a $e + ) + )`).exports; + let arr = newElem(); + assertEq(wasmGcArrayLength(arr), 4); + assertEq(wasmGcReadField(arr, 0), f1); + assertEq(wasmGcReadField(arr, 1), f2); + assertEq(wasmGcReadField(arr, 2), f3); + assertEq(wasmGcReadField(arr, 3), f4); +} + +////////////////////////////////////////////////////////////////////////////// +// +// array.init_data +/* + validation: + array-type imm-operand needs to be "in range" + array-type imm-operand must refer to an array type + array-type imm-operand must refer to an array of numeric elements + array-type imm-operand must be mutable + segment index must be "in range" + run: + array must not be null + if segment is "already used" (active, or passive that has subsequently + been dropped), then only a zero length array can be created + range to copy would require OOB read on data segment + range to copy would require OOB write on array + resulting array is as expected +*/ + +// validation: array-type imm-operand needs to be "in range" +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array i8)) + (data $d "1337") + (func (export "initData") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into data ;) i32.const 0 + (; size=4 elements ;) i32.const 4 + array.init_data 2 $d + ) +)`), WebAssembly.CompileError, /type index out of range/); + +// validation: array-type imm-operand must refer to an array type +assertErrorMessage(() => wasmEvalText(`(module + (type $a (func (param f32) (result f32))) + (data $d "1337") + (func (export "initData") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into data ;) i32.const 0 + (; size=4 elements ;) i32.const 4 + array.init_data $a $d + ) +)`), WebAssembly.CompileError, /not an array type/); + +// validation: array-type imm-operand must refer to an array of numeric elements +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array eqref)) + (data $d "1337") + (func (export "initData") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into data ;) i32.const 0 + (; size=4 elements ;) i32.const 4 + array.init_data $a $d + ) +)`), WebAssembly.CompileError, /element type must be i8\/i16\/i32\/i64\/f32\/f64\/v128/); + +// validation: array-type imm-operand must be mutable +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array i8)) + (data $d "1337") + (func (export "initData") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into data ;) i32.const 0 + (; size=4 elements ;) i32.const 4 + array.init_data $a $d + ) +)`), WebAssembly.CompileError, + /destination array is not mutable/); + +// validation: segment index must be "in range" +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array (mut i8))) + (data $d "1337") + (func (export "initData") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into data ;) i32.const 0 + (; size=4 elements ;) i32.const 4 + array.init_data $a 1 ;; 1 is the lowest invalid dseg index + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 +)`), WebAssembly.CompileError, /segment index is out of range/); + +// run: array must not be null +{ + let { initData } = wasmEvalText(`(module + (type $a (array (mut i8))) + (data $d "1337") + (func (export "initData") + (; array to init ;) (ref.null $a) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into data ;) i32.const 0 + (; size=4 elements ;) i32.const 4 + array.init_data $a $d + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 + )`).exports; + assertErrorMessage(() => { + initData(); + }, WebAssembly.RuntimeError, /dereferencing null pointer/); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length init can be performed #1 +{ + let { initData } = wasmEvalText(`(module + (memory 1) + (type $a (array (mut i8))) + (data $d (offset (i32.const 0)) "1337") + (func (export "initData") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into data ;) i32.const 0 + (; size=4 elements ;) i32.const 4 + array.init_data $a $d + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 + )`).exports; + assertErrorMessage(() => { + initData(); + }, WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length init can be performed #2 +{ + let { initData } = wasmEvalText(`(module + (memory 1) + (type $a (array (mut i8))) + (data $d (offset (i32.const 0)) "1337") + (func (export "initData") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=4 into data ;) i32.const 4 + (; size=0 elements ;) i32.const 0 + array.init_data $a $d + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 + )`).exports; + assertErrorMessage(() => { + initData(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length init can be performed #3 +{ + let { initData } = wasmEvalText(`(module + (memory 1) + (type $a (array (mut i8))) + (data $d (offset (i32.const 0)) "1337") + (func (export "initData") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into data ;) i32.const 0 + (; size=0 elements ;) i32.const 0 + array.init_data $a $d + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 + )`).exports; + initData(); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length init can be performed #4 +{ + let { initData } = wasmEvalText(`(module + (type $a (array (mut i8))) + (data $d "1337") + (func (export "initData") + data.drop $d + + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into data ;) i32.const 0 + (; size=4 elements ;) i32.const 4 + array.init_data $a $d + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 + )`).exports; + assertErrorMessage(() => { + initData(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length init can be performed #5 +{ + let { initData } = wasmEvalText(`(module + (type $a (array (mut i8))) + (data $d "1337") + (func (export "initData") + data.drop $d + + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into data ;) i32.const 0 + (; size=0 elements ;) i32.const 0 + array.init_data $a $d + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 + )`).exports; + initData(); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length init can be performed #6 +{ + let { initData } = wasmEvalText(`(module + (memory 1) + (type $a (array (mut i8))) + (data $d "1337") + (func (export "initData") + data.drop $d + + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=4 into array ;) i32.const 4 + (; offset=0 into data ;) i32.const 0 + (; size=0 elements ;) i32.const 0 + array.init_data $a $d + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 + )`).exports; + initData(); +} + +// run: range to copy would require OOB read on data segment #1 +{ + let { initData } = wasmEvalText(`(module + (type $a (array (mut i8))) + (data $d "1337") + (func (export "initData") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=1 into data ;) i32.const 1 + (; size=4 elements ;) i32.const 4 + array.init_data $a $d + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 + )`).exports; + assertErrorMessage(() => { + initData(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: range to copy would require OOB read on data segment #2 +{ + let { initData } = wasmEvalText(`(module + (type $a (array (mut i16))) + (data $d "1337") + (func (export "initData") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=1 into data ;) i32.const 1 + (; size=2 elements ;) i32.const 2 ;; still 4 bytes + array.init_data $a $d + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 + )`).exports; + assertErrorMessage(() => { + initData(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: range to copy would require OOB write on array #1 +{ + let { initData } = wasmEvalText(`(module + (type $a (array (mut i8))) + (data $d "1337") + (func (export "initData") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=1 into array ;) i32.const 1 + (; offset=0 into data ;) i32.const 0 + (; size=4 elements ;) i32.const 4 + array.init_data $a $d + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 + )`).exports; + assertErrorMessage(() => { + initData(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: range to copy would require OOB write on array #2 +{ + let { initData } = wasmEvalText(`(module + (type $a (array (mut i16))) + (data $d "1337") + (func (export "initData") + (; array to init ;) (array.new_default $a (i32.const 2)) + (; offset=1 into array ;) i32.const 1 + (; offset=0 into data ;) i32.const 0 + (; size=4 elements ;) i32.const 2 + array.init_data $a $d + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 + )`).exports; + assertErrorMessage(() => { + initData(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: resulting array is as expected +{ + let { initData } = wasmEvalText(`(module + (type $a (array (mut i8))) + (data $other "\\\\9") + (data $d "1337") + (func (export "initData") (result eqref) + (local $arr (ref $a)) + (local.set $arr (array.new_default $a (i32.const 4))) + + (; array to init ;) local.get $arr + (; offset=0 into array ;) i32.const 0 + (; offset=0 into data ;) i32.const 0 + (; size=4 elements ;) i32.const 4 + array.init_data $a $d + + local.get $arr + ) + (func data.drop 0) ;; force write of data count section, see https://github.com/bytecodealliance/wasm-tools/pull/1194 + )`).exports; + let arr = initData(); + assertEq(wasmGcArrayLength(arr), 4); + assertEq(wasmGcReadField(arr, 0), 48+1); + assertEq(wasmGcReadField(arr, 1), 48+3); + assertEq(wasmGcReadField(arr, 2), 48+3); + assertEq(wasmGcReadField(arr, 3), 48+7); +} + +////////////////////////////////////////////////////////////////////////////// +// +// array.init_elem +/* + validation: + array-type imm-operand needs to be "in range" + array-type imm-operand must refer to an array type + array-type imm-operand must refer to an array of ref typed elements + array-type imm-operand must be mutable + destination elem type must be a supertype of src elem type + segment index must be "in range" + run: + array must not be null + if segment is "already used" (active, or passive that has subsequently + been dropped), then only a zero length array can be created + range to copy would require OOB read on element segment + range to copy would require OOB write on array + resulting array is as expected +*/ + +// validation: array-type imm-operand needs to be "in range" +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array (mut funcref))) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.init_elem 4 $e + ) +)`), WebAssembly.CompileError, /type index out of range/); + +// validation: array-type imm-operand must refer to an array type +assertErrorMessage(() => wasmEvalText(`(module + (type $a (func (param i64) (result f64))) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.init_elem $a $e + ) +)`), WebAssembly.CompileError, /not an array type/); + +// validation: array-type imm-operand must refer to an array of ref typed +// elements +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array (mut f32))) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.init_elem $a $e + ) +)`), WebAssembly.CompileError, /element type is not a reftype/); + +// validation: array-type imm-operand must be mutable +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array funcref)) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.init_elem $a $e + ) +)`), WebAssembly.CompileError, /destination array is not mutable/); + +// validation: destination elem type must be a supertype of src elem type +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array (mut eqref))) + (elem $e func $f1) + (func $f1 (export "f1")) + ;; The copy here is from elem-seg-of-funcrefs to + ;; array-of-eqrefs, which must fail, because funcref isn't + ;; a subtype of eqref. + (func (export "initElem") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.init_elem $a $e + ) +)`), WebAssembly.CompileError, /incompatible element types/); + +// validation: segment index must be "in range" +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array (mut funcref))) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.init_elem $a 1 ;; 1 is the lowest invalid eseg index + ) +)`), WebAssembly.CompileError, /segment index is out of range/); + +// run: array must not be null +{ + let { initElem } = wasmEvalText(`(module + (type $a (array (mut funcref))) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + (; array to init ;) (ref.null $a) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.init_elem $a $e + ) + )`).exports; + assertErrorMessage(() => { + initElem(); + }, WebAssembly.RuntimeError, /dereferencing null pointer/); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length array can be created #1 +{ + let { initElem } = wasmEvalText(`(module + (table 4 funcref) + (type $a (array (mut funcref))) + (elem $e (offset (i32.const 0)) func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.init_elem $a $e + ) + )`).exports; + assertErrorMessage(() => { + initElem(); + }, WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length array can be created #2 +{ + let { initElem } = wasmEvalText(`(module + (table 4 funcref) + (type $a (array (mut funcref))) + (elem $e (offset (i32.const 0)) func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=4 into elem ;) i32.const 4 + (; size=0 into elem ;) i32.const 0 + array.init_elem $a $e + ) + )`).exports; + assertErrorMessage(() => { + initElem(); + }, WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length array can be created #3 +{ + let { initElem } = wasmEvalText(`(module + (table 4 funcref) + (type $a (array (mut funcref))) + (elem $e (offset (i32.const 0)) func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 0 + (; size=0 into elem ;) i32.const 0 + array.init_elem $a $e + ) + )`).exports; + initElem(); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length init can be performed #4 +{ + let { initElem } = wasmEvalText(`(module + (type $a (array (mut funcref))) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + elem.drop $e + + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.init_elem $a $e + ) + )`).exports; + assertErrorMessage(() => { + initElem(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length init can be performed #5 +{ + let { initElem } = wasmEvalText(`(module + (type $a (array (mut funcref))) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + elem.drop $e + + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 0 + array.init_elem $a $e + ) + )`).exports; + initElem(); +} + +// run: if segment is "already used" (active, or passive that has subsequently +// been dropped), then only a zero length init can be performed #6 +{ + let { initElem } = wasmEvalText(`(module + (type $a (array (mut funcref))) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + elem.drop $e + + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 4 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 0 + array.init_elem $a $e + ) + )`).exports; + initElem(); +} + +// run: range to copy would require OOB read on elem segment +{ + let { initElem } = wasmEvalText(`(module + (type $a (array (mut funcref))) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 1 + (; size=4 into elem ;) i32.const 4 + array.init_elem $a $e + ) + )`).exports; + assertErrorMessage(() => { + initElem(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: range to copy would require OOB write on array +{ + let { initElem } = wasmEvalText(`(module + (type $a (array (mut funcref))) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") + (; array to init ;) (array.new_default $a (i32.const 4)) + (; offset=0 into array ;) i32.const 1 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.init_elem $a $e + ) + )`).exports; + assertErrorMessage(() => { + initElem(); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: resulting array is as expected +{ + let { initElem, f1, f2, f3, f4 } = wasmEvalText(`(module + (type $a (array (mut funcref))) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func (export "initElem") (result eqref) + (local $arr (ref $a)) + (local.set $arr (array.new_default $a (i32.const 4))) + + (; array to init ;) local.get $arr + (; offset=0 into array ;) i32.const 0 + (; offset=0 into elem ;) i32.const 0 + (; size=4 into elem ;) i32.const 4 + array.init_elem $a $e + + local.get $arr + ) + )`).exports; + let arr = initElem(); + assertEq(wasmGcArrayLength(arr), 4); + assertEq(wasmGcReadField(arr, 0), f1); + assertEq(wasmGcReadField(arr, 1), f2); + assertEq(wasmGcReadField(arr, 2), f3); + assertEq(wasmGcReadField(arr, 3), f4); +} + +////////////////////////////////////////////////////////////////////////////// +// +// array.copy +/* + validation: + dest array must be mutable + validation: src and dest arrays must have compatible element types + run: + check for OOB conditions on src/dest arrays for non-zero length copies + check for OOB conditions on src/dest arrays for zero length copies + check resulting arrays are as expected + check that null src or dest array causes a trap +*/ + +// validation: dest array must be mutable +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array i32)) + (func (param eqref) + (array.copy $a $a (local.get 0) (i32.const 1) + (local.get 0) (i32.const 2) (i32.const 3)) + ) +) +`), WebAssembly.CompileError, /array is not mutable/); + +// validation: src and dest arrays must have compatible element types #1 +assertErrorMessage(() => wasmEvalText(`(module + (type $a32 (array (mut i32))) + (type $a8 (array i8)) + (func (param eqref) + (array.copy $a32 $a8 (local.get 0) (i32.const 1) + (local.get 0) (i32.const 2) (i32.const 3)) + ) +) +`), WebAssembly.CompileError, /incompatible element types/); + +// validation: src and dest arrays must have compatible element types #2 +assertErrorMessage(() => wasmEvalText(`(module + (type $a64 (array (mut i64))) + (type $aER (array eqref)) + (func (param eqref) + (array.copy $a64 $aER (local.get 0) (i32.const 1) + (local.get 0) (i32.const 2) (i32.const 3)) + ) +) +`), WebAssembly.CompileError, /incompatible element types/); + +// validation: src and dest arrays must have compatible element types #3 +// +// We can only copy from a child (sub) reftype to a parent (super) reftype [or +// to the same reftype.] Here, we have an array of eqref and an array of +// arrays. An array is a child type of eqref, so it's invalid to try and copy +// eqrefs into the array of arrays. +assertErrorMessage(() => wasmEvalText(`(module + (type $ty (array i32)) + (type $child (array (mut (ref $ty)))) + (type $parent (array (mut eqref))) + (func (param (ref null $child) (ref null $parent)) + ;; implied copy from parent to child -> not allowed + (array.copy $child $parent (local.get 1) (i32.const 1) + (local.get 0) (i32.const 2) (i32.const 3)) + ) +) +`), WebAssembly.CompileError, /incompatible element types/); + +// run: check for OOB conditions on src/dest arrays for non-zero length copies +// run: check for OOB conditions on src/dest arrays for zero length copies +// run: check resulting arrays are as expected +const ARRAY_COPY_TESTS = [ + // Format is: + // array element type + // corresponding value type + // source array + // first expected result + // second expected result + // + // Value-type cases + [ 'i32', 'i32', + [22, 33, 44, 55, 66, 77], + [22, 55, 66, 77, 66, 77], + [22, 33, 22, 33, 44, 77] + ], + [ 'i64', 'i64', + [0x2022002220002n, 0x3033003330003n, 0x4044004440004n, + 0x5055005550005n, 0x6066006660006n, 0x7077007770007n], + [0x2022002220002n, 0x5055005550005n, 0x6066006660006n, + 0x7077007770007n, 0x6066006660006n, 0x7077007770007n], + [0x2022002220002n, 0x3033003330003n, 0x2022002220002n, + 0x3033003330003n, 0x4044004440004n, 0x7077007770007n] + ], + [ 'f32', 'f32', + [22.0, 33.0, 44.0, 55.0, 66.0, 77.0], + [22.0, 55.0, 66.0, 77.0, 66.0, 77.0], + [22.0, 33.0, 22.0, 33.0, 44.0, 77.0] + ], + [ 'f64', 'f64', + [22.0, 33.0, 44.0, 55.0, 66.0, 77.0], + [22.0, 55.0, 66.0, 77.0, 66.0, 77.0], + [22.0, 33.0, 22.0, 33.0, 44.0, 77.0] + ], + [ 'externref', 'externref', + ['two', 'three', 'four', 'five', 'six', 'seven'], + ['two', 'five', 'six', 'seven', 'six', 'seven'], + ['two', 'three', 'two', 'three', 'four', 'seven'] + ], + // non-Value-type cases + [ 'i8', 'i32', + [22, 33, 44, 55, 66, 77], + [22, 55, 66, 77, 66, 77], + [22, 33, 22, 33, 44, 77] + ], + [ 'i16', 'i32', + [22, 33, 44, 55, 66, 77], + [22, 55, 66, 77, 66, 77], + [22, 33, 22, 33, 44, 77] + ] +]; + +for (let [elemTy, valueTy, src, exp1, exp2] of ARRAY_COPY_TESTS) { + let { arrayNew, arrayCopy } = wasmEvalText( + `(module + (type $arrTy (array (mut ${elemTy}))) + (func (export "arrayNew") + (param ${valueTy} ${valueTy} ${valueTy} + ${valueTy} ${valueTy} ${valueTy}) + (result eqref) + local.get 0 + local.get 1 + local.get 2 + local.get 3 + local.get 4 + local.get 5 + array.new_fixed $arrTy 6 + ) + (func (export "arrayCopy") + (param eqref i32 eqref i32 i32) + (array.copy $arrTy $arrTy + (ref.cast (ref null $arrTy) local.get 0) (local.get 1) + (ref.cast (ref null $arrTy) local.get 2) (local.get 3) (local.get 4) + ) + ) + )` + ).exports; + + assertEq(src.length, 6); + assertEq(exp1.length, 6); + assertEq(exp2.length, 6); + + function eqArrays(a1, a2) { + function len(arr) { + return Array.isArray(arr) ? arr.length : wasmGcArrayLength(arr); + } + function get(arr, i) { + return Array.isArray(arr) ? arr[i] : wasmGcReadField(arr, i); + } + assertEq(len(a1), 6); + assertEq(len(a2), 6); + for (i = 0; i < 6; i++) { + if (get(a1, i) !== get(a2, i)) + return false; + } + return true; + } + function show(who, arr) { + print(who + ": " + arr[0] + " " + arr[1] + " " + arr[2] + " " + + arr[3] + " " + arr[4] + " " + arr[5] + " "); + } + + // Check that "normal" copying gives expected results. + let srcTO; + srcTO = arrayNew(src[0], src[1], src[2], src[3], src[4], src[5]); + arrayCopy(srcTO, 1, srcTO, 3, 3); + assertEq(eqArrays(srcTO, exp1), true); + + srcTO = arrayNew(src[0], src[1], src[2], src[3], src[4], src[5]); + arrayCopy(srcTO, 2, srcTO, 0, 3); + assertEq(eqArrays(srcTO, exp2), true); + + // Check out-of-bounds conditions + let exp1TO = arrayNew(exp1[0], exp1[1], exp1[2], exp1[3], exp1[4], exp1[5]); + let exp2TO = arrayNew(exp2[0], exp2[1], exp2[2], exp2[3], exp2[4], exp2[5]); + + // dst overrun, wants to write [5, 6] + assertErrorMessage(() => { + arrayCopy(exp1TO, 5, exp2TO, 1, 2); + },WebAssembly.RuntimeError, /index out of bounds/); + + // dst overrun, wants to write [7, 8] + assertErrorMessage(() => { + arrayCopy(exp1TO, 7, exp2TO, 1, 2); + },WebAssembly.RuntimeError, /index out of bounds/); + + // dst zero-len overrun, wants to write no elements, but starting at 9 + assertErrorMessage(() => { + arrayCopy(exp1TO, 9, exp2TO, 1, 0); + },WebAssembly.RuntimeError, /index out of bounds/); + + // src overrun, wants to read [5, 6] + assertErrorMessage(() => { + arrayCopy(exp1TO, 1, exp2TO, 5, 2); + },WebAssembly.RuntimeError, /index out of bounds/); + + // src overrun, wants to read [7, 8] + assertErrorMessage(() => { + arrayCopy(exp1TO, 1, exp2TO, 7, 2); + },WebAssembly.RuntimeError, /index out of bounds/); + + // src zero-len overrun, wants to read no elements, but starting at 9 + assertErrorMessage(() => { + arrayCopy(exp1TO, 1, exp2TO, 9, 0); + },WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: check that null src or dest array causes a trap #1 +{ + let { shouldTrap } = wasmEvalText(`(module + (type $a (array (mut f32))) + (func (export "shouldTrap") + ref.null $a + i32.const 1 + (array.new_fixed $a 3 (f32.const 1.23) (f32.const 4.56) (f32.const 7.89)) + i32.const 1 + i32.const 1 + array.copy $a $a + ) + )`).exports; + assertErrorMessage(() => { + shouldTrap(); + }, WebAssembly.RuntimeError, /null/); +} + +// run: check that null src or dest array causes a trap #2 +{ + let { shouldTrap } = wasmEvalText(`(module + (type $a (array (mut f32))) + (func (export "shouldTrap") + (array.new_fixed $a 3 (f32.const 1.23) (f32.const 4.56) (f32.const 7.89)) + i32.const 1 + ref.null $a + i32.const 1 + i32.const 1 + array.copy $a $a + ) + )`).exports; + assertErrorMessage(() => { + shouldTrap(); + }, WebAssembly.RuntimeError, /null/); +} + +////////////////////////////////////////////////////////////////////////////// +// +// array.fill +/* + validation: + array must be mutable + value must be compatible with array element type + run: + null array causes a trap + OOB conditions on array for non-zero length copies + OOB conditions on array for zero length copies + resulting arrays are as expected (all types) +*/ + +// validation: array must be mutable +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array i32)) + (func + (array.new_default $a (i32.const 8)) + i32.const 0 + i32.const 123 + i32.const 8 + array.fill $a + ) +) +`), WebAssembly.CompileError, /array is not mutable/); + +// validation: value must be compatible with array element type #1 +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array (mut i32))) + (func + (array.new_default $a (i32.const 8)) + i32.const 0 + i64.const 123 + i32.const 8 + array.fill $a + ) +) +`), WebAssembly.CompileError, /type mismatch/); + +// validation: value must be compatible with array element type #2 +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array (mut eqref))) + (func + (array.new_default $a (i32.const 8)) + i32.const 0 + ref.null any + i32.const 8 + array.fill $a + ) +) +`), WebAssembly.CompileError, /type mismatch/); + +// run: null array causes a trap +{ + const { arrayFill } = wasmEvalText(`(module + (type $a (array (mut i32))) + (func (export "arrayFill") + ref.null $a + i32.const 0 + i32.const 123 + i32.const 8 + array.fill $a + ) + )`).exports; + assertErrorMessage(() => { + arrayFill(); + }, WebAssembly.RuntimeError, /dereferencing null pointer/); +} + +// run: OOB conditions on array for non-zero length copies +{ + const { arrayFill } = wasmEvalText(`(module + (type $a (array (mut i32))) + (func (export "arrayFill") + (array.new_default $a (i32.const 8)) + i32.const 1 + i32.const 123 + i32.const 8 + array.fill $a + ) + )`).exports; + assertErrorMessage(() => { + arrayFill(); + }, WebAssembly.RuntimeError, /index out of bounds/); +} + +// run: OOB conditions on array for zero length copies +{ + const { arrayFill } = wasmEvalText(`(module + (type $a (array (mut i32))) + (func (export "arrayFill") + (array.new_default $a (i32.const 8)) + i32.const 8 + i32.const 123 + i32.const 0 + array.fill $a + ) + )`).exports; + arrayFill(); +} + +// run: arrays are as expected (all types) +{ + const TESTS = [ + { type: 'i8', val: 'i32.const 123', get: 'array.get_u', test: 'i32.eq' }, + { type: 'i16', val: 'i32.const 123', get: 'array.get_u', test: 'i32.eq' }, + { type: 'i32', val: 'i32.const 123', test: 'i32.eq' }, + { type: 'i64', val: 'i64.const 123', test: 'i64.eq' }, + { type: 'f32', val: 'f32.const 3.14', test: 'f32.eq' }, + { type: 'f64', val: 'f64.const 3.14', test: 'f64.eq' }, + { type: 'eqref', val: 'global.get 0', test: 'ref.eq' }, + ]; + if (wasmSimdEnabled()) { + TESTS.push({ type: 'v128', val: 'v128.const i32x4 111 222 333 444', test: '(v128.xor) (i32.eq (v128.any_true) (i32.const 0))' }); + } + + for (const { type, val, get = 'array.get', test } of TESTS) { + const { arrayFill, isDefault, isFilled } = wasmEvalText(`(module + (type $a (array (mut ${type}))) + (type $s (struct)) + (global (ref $s) (struct.new_default $s)) + (func (export "arrayFill") (result (ref $a)) + (local $arr (ref $a)) + (local.set $arr (array.new_default $a (i32.const 4))) + + local.get $arr + i32.const 1 + ${val} + i32.const 2 + array.fill $a + + local.get $arr + ) + (func (export "isDefault") (param (ref $a) i32) (result i32) + (${get} $a (local.get 0) (local.get 1)) + (${get} $a (array.new_default $a (i32.const 1)) (i32.const 0)) + ${test} + ) + (func (export "isFilled") (param (ref $a) i32) (result i32) + (${get} $a (local.get 0) (local.get 1)) + ${val} + ${test} + ) + )`).exports; + const arr = arrayFill(); + assertEq(isDefault(arr, 0), 1, `expected default value for ${type} but got filled`); + assertEq(isFilled(arr, 1), 1, `expected filled value for ${type} but got default`); + assertEq(isFilled(arr, 2), 1, `expected filled value for ${type} but got default`); + assertEq(isDefault(arr, 3), 1, `expected default value for ${type} but got filled`); + } +} + +////////////////////////////////////////////////////////////////////////////// +// +// Checks for requests for oversize arrays (more than MaxArrayPayloadBytes), +// where MaxArrayPayloadBytes == 1,987,654,321. + +// array.new +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array i32)) + (func (export "test") (result eqref) + ;; request exactly 2,000,000,000 bytes + (array.new $a (i32.const 0xABCD1234) (i32.const 500000000)) + ) + (func $f + call 0 + drop + ) + (start $f) +) +`), WebAssembly.RuntimeError, /too many array elements/); + +// array.new_default +assertErrorMessage(() => wasmEvalText(`(module + (type $a (array f64)) + (func (export "test") (result eqref) + ;; request exactly 2,000,000,000 bytes + (array.new_default $a (i32.const 250000000)) + ) + (func $f + call 0 + drop + ) + (start $f) +) +`), WebAssembly.RuntimeError, /too many array elements/); + +// array.new_fixed +// This is impossible to test because it would require to create, at a +// minimum, 1,987,654,321 (MaxArrayPayloadBytes) / 16 = 124.3 million +// values, if each value is a v128. However, the max number of bytes per +// function is 7,654,321 (MaxFunctionBytes). Even if it were possible to +// create a value using just one insn byte, there wouldn't be enough. + +// array.new_data +// Similarly, impossible to test because the max data segment length is 1GB +// (1,073,741,824 bytes) (MaxDataSegmentLengthPages * PageSize), which is less +// than MaxArrayPayloadBytes. + +// array.new_element +// Similarly, impossible to test because an element segment can contain at +// most 10,000,000 (MaxElemSegmentLength) entries. + +// Test whether array data pointers are correctly tracked in stack maps. +{ + const { newArray, test } = wasmEvalText(`(module + (type $a (array i32)) + (import "" "gc" (func $gc)) + (func (export "newArray") (result (ref $a)) + (array.new $a (i32.const 123) (i32.const 4)) + ) + (func (export "test") (param $arr (ref $a)) (result i32) + (local i32) + (local i32) + + (array.get $a (local.get $arr) (i32.const 1)) + local.set 1 + call $gc + (array.get $a (local.get $arr) (i32.const 2)) + local.set 2 + + (i32.add (local.get 1) (local.get 2)) + ) + )`, {"": {gc}}).exports; + const arr = newArray(); + assertEq(isNurseryAllocated(arr), true); + const res = test(arr); + assertEq(res, 246); +} + +// Test that zero-length arrays allocate correctly +{ + const { testNew, testNewDefault, testNewFixed } = wasmEvalText(`(module + (type $a (array f32)) + + (func (export "testNew") (result eqref eqref eqref eqref) + (array.new $a (f32.const 123) (i32.const 0)) + (array.new $a (f32.const 123) (i32.const 0)) + (array.new $a (f32.const 123) (i32.const 0)) + (array.new $a (f32.const 123) (i32.const 0)) + ) + (func (export "testNewDefault") (result eqref eqref eqref eqref) + (array.new_default $a (i32.const 0)) + (array.new_default $a (i32.const 0)) + (array.new_default $a (i32.const 0)) + (array.new_default $a (i32.const 0)) + ) + (func (export "testNewFixed") (result eqref eqref eqref eqref) + (array.new_fixed $a 0) + (array.new_fixed $a 0) + (array.new_fixed $a 0) + (array.new_fixed $a 0) + ) + )`).exports; + testNew(); + testNewDefault(); + testNewFixed(); +} diff --git a/js/src/jit-test/tests/wasm/gc/binary.js b/js/src/jit-test/tests/wasm/gc/binary.js new file mode 100644 index 0000000000..1ef4a586a8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/binary.js @@ -0,0 +1,29 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +load(libdir + "wasm-binary.js"); + +const v2vSig = {args:[], ret:VoidCode}; +const v2vSigSection = sigSection([v2vSig]); + +function checkInvalid(body, errorMessage) { + assertErrorMessage(() => new WebAssembly.Module( + moduleWithSections([v2vSigSection, declSection([0]), bodySection([body])])), + WebAssembly.CompileError, + errorMessage); +} + +const invalidRefBlockType = funcBody({locals:[], body:[ + BlockCode, + OptRefCode, + 0x42, + EndCode, +]}); +checkInvalid(invalidRefBlockType, /heap type/); + +const invalidTooBigRefType = funcBody({locals:[], body:[ + BlockCode, + OptRefCode, + varU32(1000000), + EndCode, +]}); +checkInvalid(invalidTooBigRefType, /heap type/); diff --git a/js/src/jit-test/tests/wasm/gc/br-on-cast-fail.js b/js/src/jit-test/tests/wasm/gc/br-on-cast-fail.js new file mode 100644 index 0000000000..3482f7815a --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/br-on-cast-fail.js @@ -0,0 +1,199 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +function typingModule(types, from, to, brParams, branchResults, fallthroughResults) { + return `(module + ${types} + (func + (param ${brParams.join(' ')}) + (result ${branchResults.join(' ')}) + + (block (result ${fallthroughResults.join(' ')}) + (; push params onto the stack in the same order as they appear, leaving + the last param at the top of the stack. ;) + ${brParams.map((_, i) => `local.get ${i}`).join('\n')} + br_on_cast_fail 1 ${from} ${to} + ) + unreachable + ) + )`; +} + +function validTyping(types, from, to, brParams, branchResults, fallthroughResults) { + wasmValidateText(typingModule(types, from, to, brParams, branchResults, fallthroughResults)); +} + +function invalidTyping(types, from, to, brParams, branchResults, fallthroughResults, error) { + wasmFailValidateText(typingModule(types, from, to, brParams, branchResults, fallthroughResults), error); +} + +// valid: eqref -> struct +validTyping('(type $a (struct))', 'eqref', '(ref $a)', ['eqref'], ['eqref'], ['(ref $a)']); +// valid: eqref -> struct (and looser types on results) +validTyping('(type $a (struct))', 'eqref', '(ref $a)', ['eqref'], ['anyref'], ['(ref null $a)']); +// valid: eqref -> nullable struct (note that branch type becomes non-nullable) +validTyping('(type $a (struct))', 'eqref', '(ref null $a)', ['eqref'], ['(ref eq)'], ['(ref null $a)']); +// valid: struct -> struct (from anyref) +validTyping('(type $a (struct))', 'anyref', '(ref $a)', ['(ref $a)'], ['anyref'], ['(ref $a)']); +// valid: struct -> struct (canonicalized) +validTyping('(type $a (struct)) (type $b (struct))', '(ref $a)', '(ref $b)', ['(ref $a)'], ['(ref $b)'], ['(ref $a)']); +// valid: nullable struct -> non-nullable struct (canonicalized) +validTyping('(type $a (struct)) (type $b (struct))', '(ref null $a)', '(ref $b)', ['(ref null $a)'], ['(ref null $a)'], ['(ref $b)']); +// valid: nullable struct -> nullable struct (canonicalized) +validTyping('(type $a (struct)) (type $b (struct))', '(ref null $a)', '(ref null $b)', ['(ref null $a)'], ['(ref $a)'], ['(ref null $a)']); +// valid: eqref -> struct with extra arg +validTyping('(type $a (struct))', 'eqref', '(ref $a)', ['i32', 'eqref'], ['i32', 'eqref'], ['i32', '(ref $a)']); +// valid: eqref -> struct with two extra args +validTyping('(type $a (struct))', 'eqref', '(ref $a)', ['i32', 'f32', 'eqref'], ['i32', 'f32', 'eqref'], ['i32', 'f32', '(ref $a)']); + +// invalid: block result type must have slot for casted-to type +invalidTyping('(type $a (struct))', 'eqref', '(ref $a)', ['eqref'], [], ['(ref $a)'], /type mismatch/); +// invalid: block result type must be supertype of casted-to type +invalidTyping('(type $a (struct)) (type $b (struct (field i32)))', 'eqref', '(ref $a)', ['eqref'], ['(ref $b)'], ['(ref $a)'], /type mismatch/); +// invalid: input is missing extra i32 from the branch target type +invalidTyping('(type $a (struct))', 'eqref', '(ref $a)', ['f32', 'eqref'], ['i32', 'f32', 'eqref'], ['i32', 'f32', '(ref $a)'], /popping value/); +// invalid: input has extra [i32, f32] swapped from the branch target type +invalidTyping('(type $a (struct))', 'eqref', '(ref $a)', ['i32', 'f32', 'eqref'], ['f32', 'i32', 'eqref'], ['i32', 'f32', '(ref $a)'], /type mismatch/); +// invalid: input has extra [i32, f32] swapped from the branch fallthrough type +invalidTyping('(type $a (struct))', 'eqref', '(ref $a)', ['i32', 'f32', 'eqref'], ['i32', 'f32', 'eqref'], ['f32', 'i32', '(ref $a)'], /type mismatch/); +// invalid: casting to non-nullable but fallthrough not nullable +invalidTyping('(type $a (struct))', 'eqref', '(ref $a)', ['eqref'], ['(ref $a)'], ['(ref eq)'], /type mismatch/); +// invalid: struct -> struct (same recursion group) +invalidTyping('(rec (type $a (struct)) (type $b (struct)))', '(ref $a)', '(ref $b)', ['(ref $a)'], ['(ref $a)'], ['(ref $b)'], /type mismatch/); + +// Simple runtime test of cast-fail-ing +{ + let { makeA, makeB, isA, isB } = wasmEvalText(`(module + (type $a (struct)) + (type $b (struct (field i32))) + + (func (export "makeA") (result eqref) + struct.new_default $a + ) + + (func (export "makeB") (result eqref) + struct.new_default $b + ) + + (func (export "isA") (param eqref) (result i32) + (block (result eqref) + local.get 0 + br_on_cast_fail 0 eqref (ref $a) + + i32.const 1 + br 1 + ) + drop + i32.const 0 + ) + + (func (export "isB") (param eqref) (result i32) + (block (result eqref) + local.get 0 + br_on_cast_fail 0 eqref (ref $b) + + i32.const 1 + br 1 + ) + drop + i32.const 0 + ) + )`).exports; + + let a = makeA(); + let b = makeB(); + + assertEq(isA(a), 1); + assertEq(isA(b), 0); + assertEq(isB(a), 0); + assertEq(isB(b), 1); +} + +// Runtime test of cast-fail-ing with extra values +{ + function assertEqResults(a, b) { + if (!(a instanceof Array)) { + a = [a]; + } + if (!(b instanceof Array)) { + b = [b]; + } + if (a.length !== b.length) { + assertEq(a.length, b.length); + } + for (let i = 0; i < a.length; i++) { + let x = a[i]; + let y = b[i]; + // intentionally use loose equality to allow bigint to compare equally + // to number, as can happen with how we use the JS-API here. + assertEq(x == y, true); + } + } + + function testExtra(values) { + let { makeT, makeF, select } = wasmEvalText(`(module + (type $t (struct)) + (type $f (struct (field i32))) + + (func (export "makeT") (result eqref) + struct.new_default $t + ) + (func (export "makeF") (result eqref) + struct.new_default $f + ) + + (func (export "select") + (param eqref) (result ${values.map((type) => type).join(" ")}) + (block (result eqref) + local.get 0 + br_on_cast_fail 0 eqref (ref $t) + + ${values.map((type, i) => `${type}.const ${values.length + i}`) + .join("\n")} + br 1 + ) + drop + ${values.map((type, i) => `${type}.const ${i}`).join("\n")} + ) + )`).exports; + + let t = makeT(); + let f = makeF(); + + let trueValues = values.map((type, i) => i); + let falseValues = values.map((type, i) => values.length + i); + + assertEqResults(select(t), falseValues); + assertEqResults(select(f), trueValues); + } + + // multiples of primitive valtypes + for (let valtype of ['i32', 'i64', 'f32', 'f64']) { + testExtra([valtype]); + testExtra([valtype, valtype]); + testExtra([valtype, valtype, valtype]); + testExtra([valtype, valtype, valtype, valtype, valtype, valtype, valtype, valtype]); + } + + // random sundry of valtypes + testExtra(['i32', 'f32', 'i64', 'f64']); + testExtra(['i32', 'f32', 'i64', 'f64', 'i32', 'f32', 'i64', 'f64']); +} + +// This test causes the `values` vector returned by +// `OpIter::readBrOnCastFail` to contain three entries, the last of +// which is the argument, hence is reftyped. This is used to verify an +// assertion to that effect in FunctionCompiler::brOnCastCommon. +{ + let tOnCastFail = + `(module + (type $a (struct)) + (func (export "onCastFail") (param f32 i32 eqref) (result f32 i32 eqref) + local.get 0 + local.get 1 + local.get 2 + br_on_cast_fail 0 eqref (ref $a) + unreachable + ) + )`; + let { onCastFail } = wasmEvalText(tOnCastFail).exports; +} diff --git a/js/src/jit-test/tests/wasm/gc/br-on-cast.js b/js/src/jit-test/tests/wasm/gc/br-on-cast.js new file mode 100644 index 0000000000..c0c0df46b4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/br-on-cast.js @@ -0,0 +1,197 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +function typingModule(types, from, to, brParams, branchResults, fallthroughResults) { + return `(module + ${types} + (func + (param ${brParams.join(' ')}) + (result ${branchResults.join(' ')}) + + (block (result ${fallthroughResults.join(' ')}) + (; push params onto the stack in the same order as they appear, leaving + the last param at the top of the stack. ;) + ${brParams.map((_, i) => `local.get ${i}`).join('\n')} + br_on_cast 1 ${from} ${to} + ) + unreachable + ) + )`; +} + +function validTyping(types, from, to, brParams, branchResults, fallthroughResults) { + wasmValidateText(typingModule(types, from, to, brParams, branchResults, fallthroughResults)); +} + +function invalidTyping(types, from, to, brParams, branchResults, fallthroughResults, error) { + wasmFailValidateText(typingModule(types, from, to, brParams, branchResults, fallthroughResults), error); +} + +// valid: eqref -> struct +validTyping('(type $a (struct))', 'eqref', '(ref $a)', ['eqref'], ['(ref $a)'], ['eqref']); +// valid: eqref -> struct (and looser types on results) +validTyping('(type $a (struct))', 'eqref', '(ref $a)', ['eqref'], ['(ref null $a)'], ['anyref']); +// valid: eqref -> nullable struct (note that fallthrough becomes non-nullable) +validTyping('(type $a (struct))', 'eqref', '(ref null $a)', ['eqref'], ['(ref null $a)'], ['(ref eq)']); +// valid: struct -> struct (from anyref) +validTyping('(type $a (struct))', 'anyref', '(ref $a)', ['(ref $a)'], ['(ref $a)'], ['anyref']); +// valid: struct -> struct (canonicalized) +validTyping('(type $a (struct)) (type $b (struct))', '(ref $a)', '(ref $b)', ['(ref $a)'], ['(ref $b)'], ['(ref $b)']); +// valid: nullable struct -> non-nullable struct (canonicalized) +validTyping('(type $a (struct)) (type $b (struct))', '(ref null $a)', '(ref $b)', ['(ref null $a)'], ['(ref $b)'], ['(ref null $a)']); +// valid: nullable struct -> nullable struct (canonicalized) +validTyping('(type $a (struct)) (type $b (struct))', '(ref null $a)', '(ref null $b)', ['(ref null $a)'], ['(ref null $a)'], ['(ref $a)']); +// valid: eqref -> struct with extra arg +validTyping('(type $a (struct))', 'eqref', '(ref $a)', ['i32', 'eqref'], ['i32', '(ref $a)'], ['i32', 'eqref']); +// valid: eqref -> struct with two extra args +validTyping('(type $a (struct))', 'eqref', '(ref $a)', ['i32', 'f32', 'eqref'], ['i32', 'f32', '(ref $a)'], ['i32', 'f32', 'eqref']); + +// invalid: block result type must have slot for casted-to type +invalidTyping('(type $a (struct))', 'eqref', '(ref $a)', ['eqref'], [], ['eqref'], /type mismatch/); +// invalid: block result type must be supertype of casted-to type +invalidTyping('(type $a (struct)) (type $b (struct (field i32)))', 'eqref', '(ref $a)', ['eqref'], ['(ref $b)'], ['(ref $a)'], /type mismatch/); +// invalid: input is missing extra i32 from the branch target type +invalidTyping('(type $a (struct))', 'eqref', '(ref $a)', ['f32', 'eqref'], ['i32', 'f32', '(ref $a)'], ['i32', 'f32', 'eqref'], /popping value/); +// invalid: input has extra [i32, f32] swapped from the branch target type +invalidTyping('(type $a (struct))', 'eqref', '(ref $a)', ['i32', 'f32', 'eqref'], ['f32', 'i32', '(ref $a)'], ['i32', 'f32', 'eqref'], /type mismatch/); +// invalid: input has extra [i32, f32] swapped from the branch fallthrough type +invalidTyping('(type $a (struct))', 'eqref', '(ref $a)', ['i32', 'f32', 'eqref'], ['i32', 'f32', '(ref $a)'], ['f32', 'i32', 'eqref'], /type mismatch/); +// invalid: casting to non-nullable but fallthrough not nullable +invalidTyping('(type $a (struct))', 'eqref', '(ref $a)', ['eqref'], ['(ref $a)'], ['(ref eq)'], /type mismatch/); +// invalid: struct -> struct (same recursion group) +invalidTyping('(rec (type $a (struct)) (type $b (struct)))', '(ref $a)', '(ref $b)', ['(ref $a)'], ['(ref $b)'], ['(ref $a)'], /type mismatch/); + +// Simple runtime test of casting +{ + let { makeA, makeB, isA, isB } = wasmEvalText(`(module + (type $a (sub (struct))) + (type $b (sub $a (struct (field i32)))) + + (func (export "makeA") (result eqref) + struct.new_default $a + ) + + (func (export "makeB") (result eqref) + struct.new_default $b + ) + + (func (export "isA") (param eqref) (result i32) + (block (result (ref $a)) + local.get 0 + br_on_cast 0 anyref (ref $a) + + i32.const 0 + br 1 + ) + drop + i32.const 1 + ) + + (func (export "isB") (param eqref) (result i32) + (block (result (ref $a)) + local.get 0 + br_on_cast 0 anyref (ref $b) + + i32.const 0 + br 1 + ) + drop + i32.const 1 + ) + )`).exports; + + let a = makeA(); + let b = makeB(); + + assertEq(isA(a), 1); + assertEq(isA(b), 1); + assertEq(isB(a), 0); + assertEq(isB(b), 1); +} + +// Runtime test of casting with extra values +{ + function assertEqResults(a, b) { + if (!(a instanceof Array)) { + a = [a]; + } + if (!(b instanceof Array)) { + b = [b]; + } + if (a.length !== b.length) { + assertEq(a.length, b.length); + } + for (let i = 0; i < a.length; i++) { + let x = a[i]; + let y = b[i]; + // intentionally use loose equality to allow bigint to compare equally + // to number, as can happen with how we use the JS-API here. + assertEq(x == y, true); + } + } + + function testExtra(values) { + let { makeT, makeF, select } = wasmEvalText(`(module + (type $t (struct)) + (type $f (struct (field i32))) + + (func (export "makeT") (result eqref) + struct.new_default $t + ) + (func (export "makeF") (result eqref) + struct.new_default $f + ) + + (func (export "select") (param eqref) (result ${values.map((type) => type).join(" ")}) + (block (result (ref $t)) + local.get 0 + br_on_cast 0 anyref (ref $t) + + ${values.map((type, i) => `${type}.const ${values.length + i}`).join("\n")} + br 1 + ) + drop + ${values.map((type, i) => `${type}.const ${i}`).join("\n")} + ) + )`).exports; + + let t = makeT(); + let f = makeF(); + + let trueValues = values.map((type, i) => i); + let falseValues = values.map((type, i) => values.length + i); + + assertEqResults(select(t), trueValues); + assertEqResults(select(f), falseValues); + } + + // multiples of primitive valtypes + for (let valtype of ['i32', 'i64', 'f32', 'f64']) { + testExtra([valtype]); + testExtra([valtype, valtype]); + testExtra([valtype, valtype, valtype]); + testExtra([valtype, valtype, valtype, valtype, valtype, valtype, valtype, valtype]); + } + + // random sundry of valtypes + testExtra(['i32', 'f32', 'i64', 'f64']); + testExtra(['i32', 'f32', 'i64', 'f64', 'i32', 'f32', 'i64', 'f64']); +} + +// This test causes the `values` vector returned by +// `OpIter::readBrOnCast` to contain three entries, the last of which +// is the argument, hence is reftyped. This is used to verify an assertion to +// that effect in FunctionCompiler::brOnCastCommon. +{ + let tOnCast = + `(module + (type $a (struct)) + (func (export "onCast") (param f32 i32 eqref) (result f32 i32 (ref $a)) + local.get 0 + local.get 1 + local.get 2 + br_on_cast 0 anyref (ref $a) + unreachable + ) + )`; + let { onCast } = wasmEvalText(tOnCast).exports; +} diff --git a/js/src/jit-test/tests/wasm/gc/bug-1841119.js b/js/src/jit-test/tests/wasm/gc/bug-1841119.js new file mode 100644 index 0000000000..42c20c4e91 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/bug-1841119.js @@ -0,0 +1,18 @@ +// |jit-test| --fuzzing-safe; --ion-offthread-compile=off; skip-if: !wasmGcEnabled() + +function f() { +} + +gczeal(9,10); + +let t = wasmEvalText(` +(module + (type (struct)) + (table (export "table") (ref null 0) + (elem ( ref.null 0 )) + ) + (global (export "global") (ref null 0) ref.null 0) + (tag (export "tag") (param (ref null 0))) +)`).exports; + +f(); diff --git a/js/src/jit-test/tests/wasm/gc/bug-1843295.js b/js/src/jit-test/tests/wasm/gc/bug-1843295.js new file mode 100644 index 0000000000..19a32263f6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/bug-1843295.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !wasmGcEnabled(); --wasm-test-serialization + +wasmEvalText(`(module + (type (sub (array (mut i32)))) + (type (sub 0 (array (mut i32)))) + (rec + (type (sub (array (mut i32)))) + (type (sub 2 (array (mut i32)))) + ) +)`); diff --git a/js/src/jit-test/tests/wasm/gc/bug-1845436.js b/js/src/jit-test/tests/wasm/gc/bug-1845436.js new file mode 100644 index 0000000000..a79c22d9a1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/bug-1845436.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !wasmGcEnabled(); --wasm-test-serialization + +// Test that serialization doesn't create a forward reference to the third +// struct when serializing the reference to the first struct, which is +// structurally identical to the first struct. +wasmEvalText(`(module + (type (;0;) (struct)) + (type (;2;) (struct (field (ref 0)))) + (type (;3;) (struct)) +)`); diff --git a/js/src/jit-test/tests/wasm/gc/bug-1845673.js b/js/src/jit-test/tests/wasm/gc/bug-1845673.js new file mode 100644 index 0000000000..e4f48f0769 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/bug-1845673.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +let {f} = wasmEvalText(`(module + (type (struct)) + (func (export "f") (result anyref) + ref.null 0 + br_on_cast_fail 0 (ref null 0) (ref null 0) + ref.null 0 + br_on_cast_fail 0 (ref null 0) (ref 0) + br_on_cast_fail 0 (ref null 0) (ref null 0) + unreachable + ) +)`).exports; +f(); diff --git a/js/src/jit-test/tests/wasm/gc/bug-1854007.js b/js/src/jit-test/tests/wasm/gc/bug-1854007.js new file mode 100644 index 0000000000..c9d6b25369 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/bug-1854007.js @@ -0,0 +1,16 @@ +// |jit-test| test-also=--wasm-test-serialization; skip-if: !wasmGcEnabled() + +let {run} = wasmEvalText(`(module + (rec (type $$t1 (func (result (ref null $$t1))))) + (rec (type $$t2 (func (result (ref null $$t2))))) + + (func $$f1 (type $$t1) (ref.null $$t1)) + (func $$f2 (type $$t2) (ref.null $$t2)) + (table funcref (elem $$f1 $$f2)) + + (func (export "run") + (call_indirect (type $$t2) (i32.const 0)) + drop + ) +)`).exports; +run(); diff --git a/js/src/jit-test/tests/wasm/gc/call-indirect-subtyping.js b/js/src/jit-test/tests/wasm/gc/call-indirect-subtyping.js new file mode 100644 index 0000000000..4301621a8c --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/call-indirect-subtyping.js @@ -0,0 +1,137 @@ +// |jit-test| test-also=--wasm-tail-calls; skip-if: !wasmGcEnabled() + +// Test that call_indirect will respect subtyping by defining a bunch of types +// and checking every combination of (expected, actual) type. +// +// NOTE: Several of these types are identical to each other to test +// canonicalization as well, and this causes some bloat in the 'subtypeOf' +// lists. +const TESTS = [ + { + // (type 0) (equivalent to 1) + type: `(type (sub (func)))`, + subtypeOf: [0, 1], + }, + { + // (type 1) (equivalent to 0) + type: `(rec (type (sub (func))))`, + subtypeOf: [0, 1], + }, + { + // (type 2) + type: `(rec (type (sub (func))) (type (sub (func))))`, + subtypeOf: [2], + }, + { + // (type 3) + // Hack entry of previous to capture that it actually defines + // two types in the recursion group. + type: undefined, + subtypeOf: [3], + }, + { + // (type 4) (equivalent to 7) + type: `(type (sub 0 (func)))`, + subtypeOf: [0, 1, 4, 7], + }, + { + // (type 5) (equivalent to 8) + type: `(type (sub 4 (func)))`, + subtypeOf: [0, 1, 4, 5, 7, 8], + }, + { + // (type 6) + type: `(type (sub 5 (func)))`, + subtypeOf: [0, 1, 4, 5, 6, 7, 8], + }, + { + // (type 7) (equivalent to 4) + type: `(type (sub 0 (func)))`, + subtypeOf: [0, 1, 4, 7], + }, + { + // (type 8) (equivalent to 5) + type: `(type (sub 7 (func)))`, + subtypeOf: [0, 1, 4, 5, 7, 8], + }, + { + // (type 9) - a final type that has an immediate form + type: `(type (func))`, + subtypeOf: [9], + } +]; + +// Build a module with all the types, functions with those types, and functions +// that call_indirect with those types, and a table with all the functions in +// it. +let typeSection = ''; +let importedFuncs = ''; +let definedFuncs = ''; +let callIndirectFuncs = ''; +let returnCallIndirectFuncs = ''; +let i = 0; +for (let {type} of TESTS) { + if (type) { + typeSection += type + '\n'; + } + importedFuncs += `(func \$import${i} (import "" "import${i}") (type ${i}))\n`; + definedFuncs += `(func \$define${i} (export "define${i}") (type ${i}))\n`; + callIndirectFuncs += `(func (export "call_indirect ${i}") (param i32) + (drop (ref.cast (ref ${i}) (table.get local.get 0))) + (call_indirect (type ${i}) local.get 0) + )\n`; + if (wasmTailCallsEnabled()) { + returnCallIndirectFuncs += `(func (export "return_call_indirect ${i}") (param i32) + (drop (ref.cast (ref ${i}) (table.get local.get 0))) + (return_call_indirect (type ${i}) local.get 0) + )\n`; + } + i++; +} +let moduleText = `(module + ${typeSection} + ${importedFuncs} + ${definedFuncs} + ${callIndirectFuncs} + ${returnCallIndirectFuncs} + (table + (export "table") + funcref + (elem ${TESTS.map((x, i) => `\$import${i} \$define${i}`).join(" ")}) + ) +)`; + +// Now go over every combination of (actual, expected). In this case the caller +// (which does the call_indirect) specifies expected and the callee will be the +// actual. +let imports = { + "": Object.fromEntries(TESTS.map((x, i) => [`import${i}`, () => {}])), +}; +let exports = wasmEvalText(moduleText, imports).exports; +for (let callerTypeIndex = 0; callerTypeIndex < TESTS.length; callerTypeIndex++) { + for (let calleeTypeIndex = 0; calleeTypeIndex < TESTS.length; calleeTypeIndex++) { + let calleeType = TESTS[calleeTypeIndex]; + + // If the callee (actual) is a subtype of caller (expected), then this + // should succeed. + let shouldPass = calleeType.subtypeOf.includes(callerTypeIndex); + + let calleeImportFuncIndex = calleeTypeIndex * 2; + let calleeDefinedFuncIndex = calleeTypeIndex * 2 + 1; + + // print(`expected (type ${callerTypeIndex}) (actual ${calleeTypeIndex})`); + let test = () => { + exports[`call_indirect ${callerTypeIndex}`](calleeImportFuncIndex) + exports[`call_indirect ${callerTypeIndex}`](calleeDefinedFuncIndex) + if (wasmTailCallsEnabled()) { + exports[`return_call_indirect ${callerTypeIndex}`](calleeImportFuncIndex) + exports[`return_call_indirect ${callerTypeIndex}`](calleeDefinedFuncIndex) + } + }; + if (shouldPass) { + test(); + } else { + assertErrorMessage(test, WebAssembly.RuntimeError, /mismatch|cast/); + } + } +} diff --git a/js/src/jit-test/tests/wasm/gc/cast-abstract.js b/js/src/jit-test/tests/wasm/gc/cast-abstract.js new file mode 100644 index 0000000000..4dd7e73e49 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/cast-abstract.js @@ -0,0 +1,298 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +load(libdir + "wasm-binary.js"); + +// Replace this with a string like 'non-null (ref $s1) -> (ref any) -> (ref any)' to test exactly one specific case. Makes debugging easier. +const specificTest = ''; + +const preamble = ` + (type $s1 (sub (struct))) + (type $s2 (sub $s1 (struct (field i32)))) + (type $a1 (sub (array (ref null $s1)))) + (type $a2 (sub $a1 (array (ref null $s2)))) + (type $ft1 (sub (func (param (ref $s1)) (result (ref null $a1))))) + (type $ft2 (sub $ft1 (func (param (ref null $s1)) (result (ref null $a2))))) + (type $ft3 (sub (func (param (ref $a2)) (result i32)))) + (type $ft4 (sub $ft3 (func (param (ref $a1)) (result i32)))) + + (func $f1 (type $ft1) ref.null $a1) + (func $f2 (type $ft2) ref.null $a2) + (func $f3 (type $ft3) i32.const 0) + (func $f4 (type $ft4) i32.const 0) + (elem declare func $f1 $f2 $f3 $f4) ;; allow funcs to be ref.func'd +`; + +// All the concrete subtype relationships present in the preamble. +// [x, y] means x <: y. +const subtypes = [ + ['$s2', '$s1'], + ['$a2', '$a1'], + ['$ft2', '$ft1'], + ['$ft4', '$ft3'], +]; + +const any = { name: 'any', top: 'anyref' }; +const eq = { name: 'eq', top: 'anyref' }; +const struct = { name: 'struct', top: 'anyref' }; +const array = { name: 'array', top: 'anyref' }; +const s1 = { + index: 0, + name: '$s1', + make: 'struct.new_default $s1', + top: 'anyref', +}; +const s2 = { + index: 1, + name: '$s2', + make: 'struct.new_default $s2', + top: 'anyref', +}; +const a1 = { + index: 2, + name: '$a1', + make: '(array.new_default $a1 (i32.const 10))', + top: 'anyref', +}; +const a2 = { + index: 3, + name: '$a2', + make: '(array.new_default $a2 (i32.const 10))', + top: 'anyref', +}; +const i31 = { name: 'i31', make: '(ref.i31 (i32.const 123))', top: 'anyref' }; +const none = { name: 'none', none: true, top: 'anyref' }; + +const func = { name: 'func', top: 'funcref' }; +const ft1 = { index: 4, name: '$ft1', make: 'ref.func $f1', top: 'funcref' }; +const ft2 = { index: 5, name: '$ft2', make: 'ref.func $f2', top: 'funcref' }; +const ft3 = { index: 6, name: '$ft3', make: 'ref.func $f3', top: 'funcref' }; +const ft4 = { index: 7, name: '$ft4', make: 'ref.func $f4', top: 'funcref' }; +const nofunc = { name: 'nofunc', none: true, top: 'funcref' }; + +const extern = { name: 'extern', make: '(extern.convert_any (struct.new_default $s1))', top: 'externref' } +const noextern = { name: 'noextern', none: true, top: 'externref' } + +const typeSets = [ + [any, eq, struct, s1, s2, none], + [any, eq, array, a1, a2, none], + [any, eq, s1, s2, a1, a2, none], + [any, eq, i31, none], + [any, eq, i31, s1, none], + [any, eq, i31, a1, none], + + [func, ft1, ft2, nofunc], + [func, ft3, ft4, nofunc], + [func, ft1, ft2, ft3, ft4, nofunc], + + [extern, noextern], +]; + +const nullables = [ // for example: + [true, true, true], // null $s1 -> null any -> null eq + [true, true, false], // null $s1 -> null any -> eq + [true, false, true], // null $s1 -> any -> null eq + [true, false, false], // null $s1 -> any -> eq + [false, true, true], // $s1 -> null any -> null eq + [false, true, false], // $s1 -> null any -> eq + [false, false, true], // $s1 -> any -> null eq + [false, false, false], // $s1 -> any -> eq +] + +function isSubtype(src, dest) { + if (src.name === dest.name) { + return true; + } + for (const [src2, dest2] of subtypes) { + if (src.name === src2 && dest.name === dest2) { + return true; + } + } + return false; +} + +let numCases = 0; + +// This will generate an enormous pile of test cases. All of these should be valid, +// as in passing WebAssembly.validate, but some may not be good casts at runtime. +for (const typeSet of typeSets) { + for (const start of typeSet) { + for (const middle of typeSet) { + for (const end of typeSet) { + for (const [nullable0, nullable1, nullable2] of nullables) { + for (const makeNull of [true, false]) { + const concrete0 = !!start.make; + const concrete1 = !!middle.make; + const concrete2 = !!end.make; + + if (!concrete0 && !makeNull) { + // We can only start with null values for abstract types + continue; + } + + if (!nullable0 && makeNull) { + // Can't use null as a valid value for a non-nullable type + continue; + } + + numCases += 1; + + let good1 = true; + let good2 = true; + + // Null values will fail casts to non-nullable types + if (makeNull) { + if (!nullable1) { + good1 = false; + } + if (!nullable2) { + good2 = false; + } + } + + // Bottom types can't represent non-null, so this will always fail + if (!makeNull) { + if (middle.none) { + good1 = false; + } + if (end.none) { + good2 = false; + } + } + + // Concrete values are subject to subtyping relationships + if (!makeNull) { + if (concrete1 && !isSubtype(start, middle)) { + good1 = false; + } + if (concrete2 && !isSubtype(start, end)) { + good2 = false; + } + } + + let emoji1 = good1 ? '✅' : '❌'; + let emoji2 = good2 ? '✅' : '❌'; + + if (!good1) { + good2 = false; + emoji2 = '❓'; + } + + const name = `${makeNull ? 'null' : 'non-null'} (ref ${nullable0 ? 'null ' : ''}${start.name}) -> (ref ${nullable1 ? 'null ' : ''}${middle.name}) -> (ref ${nullable2 ? 'null ' : ''}${end.name})`; + if (specificTest && name != specificTest) { + continue; + } + + print(`${emoji1}${emoji2} ${name}`); + const make = makeNull ? `ref.null ${start.name}` : start.make; + const type0 = `(ref ${nullable0 ? 'null ' : ''}${start.name})`; + const type1 = `(ref ${nullable1 ? 'null ' : ''}${middle.name})`; + const type2 = `(ref ${nullable2 ? 'null ' : ''}${end.name})`; + const moduleText = `(module + ${preamble} + (func (export "make") (result ${type0}) + ${make} + ) + (func (export "cast1") (param ${type0}) (result ${type1}) + local.get 0 + ref.cast ${type1} + ) + (func (export "cast2") (param ${type1}) (result ${type2}) + local.get 0 + ref.cast ${type2} + ) + + (func (export "test1") (param ${type0}) (result i32) + local.get 0 + ref.test ${type1} + ) + (func (export "test2") (param ${type1}) (result i32) + local.get 0 + ref.test ${type2} + ) + + ;; these are basically ref.test but with branches + (func (export "branch1") (param ${type0}) (result i32) + (block (result ${type1}) + local.get 0 + br_on_cast 0 ${start.top} ${type1} + drop + (return (i32.const 0)) + ) + drop + (return (i32.const 1)) + ) + (func (export "branch2") (param ${type1}) (result i32) + (block (result ${type2}) + local.get 0 + br_on_cast 0 ${middle.top} ${type2} + drop + (return (i32.const 0)) + ) + drop + (return (i32.const 1)) + ) + (func (export "branchfail1") (param ${type0}) (result i32) + (block (result ${middle.top}) + local.get 0 + br_on_cast_fail 0 ${start.top} ${type1} + drop + (return (i32.const 1)) + ) + drop + (return (i32.const 0)) + ) + (func (export "branchfail2") (param ${type1}) (result i32) + (block (result ${end.top}) + local.get 0 + br_on_cast_fail 0 ${middle.top} ${type2} + drop + (return (i32.const 1)) + ) + drop + (return (i32.const 0)) + ) + )`; + + function assertCast(func, good) { + if (good) { + return [func(), true]; + } else { + assertErrorMessage(func, WebAssembly.RuntimeError, /bad cast/); + return [null, false]; + } + } + + try { + // The casts are split up so the stack trace will show you which cast is failing. + const { + make, + cast1, cast2, + test1, test2, + branch1, branch2, + branchfail1, branchfail2, + } = wasmEvalText(moduleText).exports; + + const val = make(); + const [res1, ok1] = assertCast(() => cast1(val), good1); + assertEq(test1(val), good1 ? 1 : 0); + assertEq(branch1(val), good1 ? 1 : 0); + assertEq(branchfail1(val), good1 ? 1 : 0); + if (ok1) { + assertCast(() => cast2(res1), good2); + assertEq(test2(res1), good2 ? 1 : 0); + assertEq(branch2(res1), good2 ? 1 : 0); + assertEq(branchfail2(res1), good2 ? 1 : 0); + } + } catch (e) { + print("Failed! Module text was:"); + print(moduleText); + throw e; + } + } + } + } + } + } +} + +print(`we hope you have enjoyed these ${numCases} test cases 😁`); diff --git a/js/src/jit-test/tests/wasm/gc/cast-extern.js b/js/src/jit-test/tests/wasm/gc/cast-extern.js new file mode 100644 index 0000000000..83a6d105b6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/cast-extern.js @@ -0,0 +1,54 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Casting an external value is an expected failure +let { refCast, refTest, brOnCast, brOnCastFail } = wasmEvalText(` + (module + (; give this struct a unique identity to avoid conflict with + the struct type defined in wasm.js ;) + (type (struct (field i64 i32 i64 i32))) + + (func (export "refTest") (param externref) (result i32) + local.get 0 + any.convert_extern + ref.test (ref 0) + ) + (func (export "refCast") (param externref) (result i32) + local.get 0 + any.convert_extern + ref.cast (ref null 0) + drop + i32.const 0 + ) + (func (export "brOnCast") (param externref) (result i32) + (block (result (ref 0)) + local.get 0 + any.convert_extern + br_on_cast 0 anyref (ref 0) + drop + i32.const 0 + br 1 + ) + drop + i32.const 1 + ) + (func (export "brOnCastFail") (param externref) (result i32) + (block (result anyref) + local.get 0 + any.convert_extern + br_on_cast_fail 0 anyref (ref 0) + drop + i32.const 1 + br 1 + ) + drop + i32.const 0 + ) + ) +`).exports; + +for (let v of WasmNonNullExternrefValues) { + assertErrorMessage(() => refCast(v), WebAssembly.RuntimeError, /bad cast/); + assertEq(refTest(v), 0); + assertEq(brOnCast(v), 0); + assertEq(brOnCastFail(v), 0); +} diff --git a/js/src/jit-test/tests/wasm/gc/casting.js b/js/src/jit-test/tests/wasm/gc/casting.js new file mode 100644 index 0000000000..a71a589db8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/casting.js @@ -0,0 +1,116 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Test all possible casting combinations of the following graph: +// +// A1 A2 +// | | +// B1 B2 +// | \ | +// C1 C2 C3 +// | \ | +// D1 D2 D3 +// | \ | +// E1 E2 E3 +// | \ | +// F1 F2 F3 +// | \ | +// G1 G2 G3 +// | \ | +// H1 H2 H3 +// | \ | +// I1 I2 I3 +// | \ | +// J1 J2 J3 +// +// NOTE: this object will be mutated and needs to be ordered such that parent +// definitions come before children. Note also, to be properly effective, +// these trees need to have a depth of at least MinSuperTypeVectorLength as +// defined in wasm/WasmCodegenConstants.h; keep it in sync with that. +const TYPES = { + 'A1': { super: null }, + 'A2': { super: null }, + 'B1': { super: 'A1' }, + 'B2': { super: 'A2' }, + 'C1': { super: 'B1' }, + 'C2': { super: 'B1' }, + 'C3': { super: 'B2' }, + 'D1': { super: 'C1' }, + 'D2': { super: 'C1' }, + 'D3': { super: 'C3' }, + 'E1': { super: 'D1' }, + 'E2': { super: 'D1' }, + 'E3': { super: 'D3' }, + 'F1': { super: 'E1' }, + 'F2': { super: 'E1' }, + 'F3': { super: 'E3' }, + 'G1': { super: 'F1' }, + 'G2': { super: 'F1' }, + 'G3': { super: 'F3' }, + 'H1': { super: 'G1' }, + 'H2': { super: 'G1' }, + 'H3': { super: 'G3' }, + 'I1': { super: 'H1' }, + 'I2': { super: 'H1' }, + 'I3': { super: 'H3' }, + 'J1': { super: 'I1' }, + 'J2': { super: 'I1' }, + 'J3': { super: 'I3' }, +}; + +// The oracle method for testing the declared subtype relationship. +function manualIsSubtype(types, subType, superType) { + while (subType !== superType && subType.super !== null) { + subType = types[subType.super]; + } + return subType === superType; +} + +function testAllCasts(types) { + let typeSection = ``; + let funcSection = ``; + for (let name in types) { + let type = types[name]; + if (type.super === null) { + typeSection += `(type \$${name} (sub (struct)))\n`; + } else { + typeSection += `(type \$${name} (sub \$${type.super} (struct)))\n`; + } + funcSection += ` + (func (export "new${name}") (result externref) + struct.new_default \$${name} + extern.convert_any + ) + (func (export "is${name}") (param externref) (result i32) + local.get 0 + any.convert_extern + ref.test (ref \$${name}) + )`; + } + // NOTE: we place all types in a single recursion group to prevent + // canonicalization from + let moduleText = `(module + (rec ${typeSection}) + ${funcSection} + )`; + + // Instantiate the module and acquire the testing methods + let exports = wasmEvalText(moduleText).exports; + for (let name in types) { + let type = types[name]; + type['new'] = exports[`new${name}`]; + type['is'] = exports[`is${name}`]; + } + + // Test every combination of types, comparing the oracle method against the + // JIT'ed method. + for (let subTypeName in types) { + let subType = types[subTypeName]; + for (let superTypeName in types) { + let superType = types[subTypeName]; + assertEq( + manualIsSubtype(types, subType, superType) ? 1 : 0, + superType['is'](subType['new']())); + } + } +} +testAllCasts(TYPES); diff --git a/js/src/jit-test/tests/wasm/gc/debugger.js b/js/src/jit-test/tests/wasm/gc/debugger.js new file mode 100644 index 0000000000..dea6581eb8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/debugger.js @@ -0,0 +1,38 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() + +(function() { + let g = newGlobal({newCompartment: true}); + let dbg = new Debugger(g); + g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func (param externref) (result externref) local.get 0) (export "" (func 0)))')));`); +})(); + +(function() { + var g = newGlobal({newCompartment: true}); + g.parent = this; + + let src = ` + (module + (func (export "func") (param $ref externref) (result externref) + local.get $ref + ) + ) + `; + + g.eval(` + var obj = { somekey: 'somevalue' }; + Debugger(parent).onEnterFrame = function(frame) { + let v = frame.environment.getVariable('var0'); + assertEq(typeof v, 'object'); + + let prop = v.unwrap().getOwnPropertyDescriptor('somekey'); + assertEq(typeof prop, 'object'); + assertEq(typeof prop.value, 'string'); + assertEq(prop.value, 'somevalue'); + + // Disable onEnterFrame hook. + Debugger(parent).onEnterFrame = undefined; + }; + `); + + new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`${src}`))).exports.func(g.obj); +})(); diff --git a/js/src/jit-test/tests/wasm/gc/directives.txt b/js/src/jit-test/tests/wasm/gc/directives.txt new file mode 100644 index 0000000000..e6d978cc44 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/directives.txt @@ -0,0 +1 @@ +|jit-test| --wasm-gc; test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; include:wasm.js diff --git a/js/src/jit-test/tests/wasm/gc/disabled.js b/js/src/jit-test/tests/wasm/gc/disabled.js new file mode 100644 index 0000000000..791c6ff25e --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/disabled.js @@ -0,0 +1,25 @@ +// |jit-test| skip-if: wasmGcEnabled() + +const { CompileError, validate } = WebAssembly; + +const UNRECOGNIZED_OPCODE_OR_BAD_TYPE = /unrecognized opcode|(Structure|reference|gc) types not enabled|invalid heap type|invalid inline block type|bad type|\(ref T\) types not enabled|Invalid type|invalid function type/; + +let simpleTests = [ + "(module (func (drop (ref.null eq))))", + "(module (func $test (local eqref)))", + "(module (func $test (param eqref)))", + "(module (func $test (result eqref) (ref.null eq)))", + "(module (func $test (block (result eqref) (unreachable)) unreachable))", + "(module (func $test (result i32) (local eqref) (ref.is_null (local.get 0))))", + `(module (import "a" "b" (func (param eqref))))`, + `(module (import "a" "b" (func (result eqref))))`, + `(module (type $s (struct)))`, +]; + +// Test that use of gc-types fails when gc is disabled. + +for (let src of simpleTests) { + let bin = wasmTextToBinary(src); + assertEq(validate(bin), false); + wasmCompilationShouldFail(bin, UNRECOGNIZED_OPCODE_OR_BAD_TYPE); +} diff --git a/js/src/jit-test/tests/wasm/gc/externref-boxing-struct.js b/js/src/jit-test/tests/wasm/gc/externref-boxing-struct.js new file mode 100644 index 0000000000..71114741fc --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/externref-boxing-struct.js @@ -0,0 +1,74 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Moving a JS value through a wasm externref is a pair of boxing/unboxing +// conversions that leaves the value unchanged. There are many cases, +// along these axes: +// +// - global variables, see externref-boxing.js +// - tables, see externref-boxing.js +// - function parameters and returns, see externref-boxing.js +// - struct fields [for the gc feature], this file +// - WasmGcObject fields when we construct with the externref type; this file + +// Struct fields of externref type can receive their value in these ways: +// +// - the struct.new and struct.set instructions +// - storing into mutable fields from JS +// - from a constructor called from JS +// +// Struct fields can be read in these ways: +// +// - the struct.get instruction +// - reading the field from JS +// +// We're especially interested in two cases: where JS stores a non-object value +// into a field, in this case there should be boxing; and where JS reads a +// non-pointer value from a field, in this case there should be unboxing. + +// Write with struct.new, read with the JS getter + +for (let v of WasmExternrefValues) +{ + let ins = wasmEvalText( + `(module + (type $S (struct (field $S.x (mut externref)))) + (func (export "make") (param $v externref) (result eqref) + (struct.new $S (local.get $v))))`); + let x = ins.exports.make(v); + assertEq(wasmGcReadField(x, 0), v); +} + +// Try to make sure externrefs are properly traced + +{ + let fields = iota(10).map(() => `(field externref)`).join(' '); + let params = iota(10).map((i) => `(param $${i} externref)`).join(' '); + let args = iota(10).map((i) => `(local.get $${i})`).join(' '); + let txt = `(module + (type $S (struct ${fields})) + (func (export "make") ${params} (result eqref) + (struct.new $S ${args})))`; + let ins = wasmEvalText(txt); + let x = ins.exports.make({x:0}, {x:1}, {x:2}, {x:3}, {x:4}, {x:5}, {x:6}, {x:7}, {x:8}, {x:9}) + gc('shrinking'); + assertEq(typeof wasmGcReadField(x, 0), "object"); + assertEq(wasmGcReadField(x, 0).x, 0); + assertEq(typeof wasmGcReadField(x, 1), "object"); + assertEq(wasmGcReadField(x, 1).x, 1); + assertEq(typeof wasmGcReadField(x, 2), "object"); + assertEq(wasmGcReadField(x, 2).x, 2); + assertEq(typeof wasmGcReadField(x, 3), "object"); + assertEq(wasmGcReadField(x, 3).x, 3); + assertEq(typeof wasmGcReadField(x, 4), "object"); + assertEq(wasmGcReadField(x, 4).x, 4); + assertEq(typeof wasmGcReadField(x, 5), "object"); + assertEq(wasmGcReadField(x, 5).x, 5); + assertEq(typeof wasmGcReadField(x, 6), "object"); + assertEq(wasmGcReadField(x, 6).x, 6); + assertEq(typeof wasmGcReadField(x, 7), "object"); + assertEq(wasmGcReadField(x, 7).x, 7); + assertEq(typeof wasmGcReadField(x, 8), "object"); + assertEq(wasmGcReadField(x, 8).x, 8); + assertEq(typeof wasmGcReadField(x, 9), "object"); + assertEq(wasmGcReadField(x, 9).x, 9); +} diff --git a/js/src/jit-test/tests/wasm/gc/externref-conversions.js b/js/src/jit-test/tests/wasm/gc/externref-conversions.js new file mode 100644 index 0000000000..edfcbe9e4f --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/externref-conversions.js @@ -0,0 +1,94 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Output type is non-nullable if the input type is non-nullable +wasmValidateText(`(module + (func (param externref) (result anyref) + local.get 0 + any.convert_extern + ) + (func (param anyref) (result externref) + local.get 0 + extern.convert_any + ) + (func (param (ref extern)) (result (ref any)) + local.get 0 + any.convert_extern + ) + (func (param (ref any)) (result (ref extern)) + local.get 0 + extern.convert_any + ) + (func (result (ref any)) + unreachable + any.convert_extern + ) + (func (result (ref extern)) + unreachable + extern.convert_any + ) +)`); + +// Output type is nullable if the input type is nullable +wasmFailValidateText(`(module + (func (param externref) (result (ref any)) + local.get 0 + any.convert_extern + ) +)`, /expected/); +wasmFailValidateText(`(module + (func (param anyref) (result (ref extern)) + local.get 0 + extern.convert_any + ) +)`, /expected/); + +// Can round trip an externref through anyref and get the same thing back +let {roundtripThroughAny} = wasmEvalText(`(module + (func (export "roundtripThroughAny") (param externref) (result externref) + local.get 0 + any.convert_extern + extern.convert_any + ) +)`).exports; +for (let value of WasmExternrefValues) { + assertEq(value, roundtripThroughAny(value)); +} + +// Can round trip GC objects through externref and get the same thing back +let {testStruct, testArray} = wasmEvalText(`(module + (type $struct (struct)) + (type $array (array i32)) + + (func (export "testStruct") (result i32) + (local (ref $struct)) + (local.set 0 struct.new $struct) + local.get 0 + (ref.eq + (ref.cast (ref null $struct) + (any.convert_extern + (extern.convert_any + local.get 0 + ) + ) + ) + ) + ) + + (func (export "testArray") (result i32) + (local (ref $array)) + (local.set 0 (array.new $array i32.const 0 i32.const 0)) + local.get 0 + (ref.eq + (ref.cast (ref null $array) + (any.convert_extern + (extern.convert_any + local.get 0 + ) + ) + ) + ) + ) +)`).exports; + +assertEq(testStruct(), 1); +assertEq(testArray(), 1); diff --git a/js/src/jit-test/tests/wasm/gc/final_types.js b/js/src/jit-test/tests/wasm/gc/final_types.js new file mode 100644 index 0000000000..7787a1d3bb --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/final_types.js @@ -0,0 +1,48 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Validate that incorrect subtyping examples are failing as expected +const typeError = /incompatible super type/; + +var code =` +(module + (type $A (sub (struct (field i32)))) + (type $B (sub $A (struct (field i32) (field i32)))) + (type $C (sub $B (struct (field i32) (field i32) (field i64)))) + + ;; Can't declare a super type with the final flag + (type $D (sub final $C (struct (field i32) (field i32) (field f32)))) + (type $E (sub $D (struct (field i32) (field i32) (field f32)))) +)`; + +wasmFailValidateText(code, typeError); + +code =` +(module + (type $A (sub (struct (field i32)))) + (type $B (sub $A (struct (field i32) (field i32)))) + (type $C (sub $B (struct (field i32) (field i32)))) + + ;; $D is final, without any supertype + (type $D (sub final (struct (field i32) (field i32) (field f32)))) + (type $E (sub $D (struct (field i32) (field i32) (field f32)))) +)`; + +wasmFailValidateText(code, typeError); + +// Types are final by default. +code =` +(module + (type $A (struct (field i32))) + (type $B (sub $A (struct (field i32) (field i32)))) +)`; + +wasmFailValidateText(code, typeError); + +// A super type index must be stricly less than the current type. +code =` +(module + (type $A (sub (struct (field i32)))) + (type $B (sub $B (struct (field i32) (field i32)))) +)`; + +wasmFailValidateText(code, /invalid super type index/); diff --git a/js/src/jit-test/tests/wasm/gc/function_subtyping.js b/js/src/jit-test/tests/wasm/gc/function_subtyping.js new file mode 100644 index 0000000000..3ef0d17dd3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/function_subtyping.js @@ -0,0 +1,79 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Validate rules for function subtyping: +// - Same number of parameters and results +// - Function return types are covariant +// - Function parameter types are contravariant +wasmValidateText( +`(module + (type $A (sub (struct (field i32)))) + (type $B (sub $A (struct (field i32) (field i32)))) + (type $C (sub $B (struct (field i32) (field i32) (field i64)))) + (type $D (sub $B (struct (field i32) (field i32) (field f32)))) + + ;; Same types (invariant) + (type $func1 (sub (func (param (ref $A) (ref $A)) (result (ref $C))))) + (type $func2 (sub $func1 (func (param (ref $A) (ref $A)) (result (ref $C))))) + + ;; Covariant return types are valid + (type $func3 (sub (func (param (ref $A) (ref $A)) (result (ref $B))))) + (type $func4 (sub $func3 (func (param (ref $A) (ref $A)) (result (ref $C))))) + (type $func5 (sub (func (param (ref $A) (ref $A)) (result (ref $A) (ref $B))))) + (type $func6 (sub $func5 (func (param (ref $A) (ref $A)) (result (ref $D) (ref $C))))) + + ;; Contravariant parameter types are valid + (type $func7 (sub (func (param (ref $A) (ref $C)) (result (ref $C))))) + (type $func8 (sub $func7 (func (param (ref $A) (ref $B)) (result (ref $C))))) + (type $func9 (sub (func (param (ref $D) (ref $C)) (result (ref $C))))) + (type $func10 (sub $func9 (func (param (ref $A) (ref $B)) (result (ref $C))))) + + ;; Mixing covariance and contravariance + (type $func11 (sub (func (param (ref $D) (ref $C)) (result (ref $A))))) + (type $func12 (sub $func11 (func (param (ref $A) (ref $B)) (result (ref $C))))) +) +`); + +// Validate that incorrect subtyping examples are failing as expected +const typeError = /incompatible super type/; + +var code =` +(module + (type $A (struct (field i32))) + (type $B (sub $A (struct (field i32) (field i32)))) + (type $C (sub $B (struct (field i32) (field i32) (field i64)))) + (type $D (sub $B (struct (field i32) (field i32) (field f32)))) + + ;; Not the same number of arguments/results + (type $func1 (func (param (ref $A) (ref $A)) (result (ref $C)))) + (type $func2 (sub $func1 (func (param (ref $A) (ref $A)) (result (ref $C) (ref $A))))) +)`; + +wasmFailValidateText(code, typeError); + +code =` +(module + (type $A (sub (struct (field i32)))) + (type $B (sub $A (struct (field i32) (field i32)))) + (type $C (sub $B (struct (field i32) (field i32) (field i64)))) + (type $D (sub $B (struct (field i32) (field i32) (field f32)))) + + ;; Contravariant result types are invalid + (type $func3 (sub (func (param (ref $A) (ref $A)) (result (ref $C))))) + (type $func4 (sub $func3 (func (param (ref $A) (ref $A)) (result (ref $A))))) +)`; + +wasmFailValidateText(code, typeError); + +code =` +(module + (type $A (sub (struct (field i32)))) + (type $B (sub $A (struct (field i32) (field i32)))) + (type $C (sub $B (struct (field i32) (field i32) (field i64)))) + (type $D (sub $B (struct (field i32) (field i32) (field f32)))) + + ;; Covariant parameters are invalid + (type $func5 (sub (func (param (ref $A) (ref $A)) (result (ref $C))))) + (type $func6 (sub $func5 (func (param (ref $B) (ref $A)) (result (ref $C))))) +)`; + +wasmFailValidateText(code, typeError); diff --git a/js/src/jit-test/tests/wasm/gc/global-get.js b/js/src/jit-test/tests/wasm/gc/global-get.js new file mode 100644 index 0000000000..1409fe39cd --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/global-get.js @@ -0,0 +1,30 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// global.get cannot refer to self or after globals after self + +assertErrorMessage(() => wasmEvalText(`(module + (global i32 global.get 0) +)`), WebAssembly.CompileError, /global/); + +assertErrorMessage(() => wasmEvalText(`(module + (global i32 global.get 1) + (global i32 i32.const 0) +)`), WebAssembly.CompileError, /global/); + +// global.get works on previous globals + +{ + let {func, b, c, e} = wasmEvalText(`(module + (func $func (export "func")) + + (global $a i32 i32.const 1) + (global $b (export "b") i32 global.get $a) + (global $c (export "c") i32 global.get $b) + + (global $d funcref ref.func $func) + (global $e (export "e") funcref global.get $d) + )`).exports; + assertEq(b.value, 1); + assertEq(c.value, 1); + assertEq(e.value, func); +} diff --git a/js/src/jit-test/tests/wasm/gc/globals.js b/js/src/jit-test/tests/wasm/gc/globals.js new file mode 100644 index 0000000000..48fe4023de --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/globals.js @@ -0,0 +1,233 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Globals have identity now +{ + const { g, same } = wasmEvalText(`(module + (type (struct)) + (global (export "g") eqref (struct.new 0)) + (func $same (export "same") (param eqref) (result i32) + (ref.eq (local.get 0) (global.get 0)) + ) + (func $sanity + (if (call $same (global.get 0)) (then return)) + unreachable + ) + (start $sanity) + )`).exports; + + assertEq(same(g.value), 1, "global had different identity when exported"); +} + +// Subtypes with func refs +{ + wasmEvalText(`(module + (type $s1 (struct)) + (type $t1 (sub (func (param (ref $s1))))) + (type $t2 (sub $t1 (func (param (ref null $s1))))) + (func $a (type $t1)) + (func $b (type $t2)) + + (global (ref $t1) ref.func $a) + (global (ref null $t1) ref.func $a) + (global (ref func) ref.func $a) + (global (ref null func) ref.func $a) + + (global (ref $t2) ref.func $b) + (global (ref null $t2) ref.func $b) + (global (ref $t1) ref.func $b) + (global (ref null $t1) ref.func $b) + (global (ref func) ref.func $b) + (global (ref null func) ref.func $b) + )`); + + assertErrorMessage(() => wasmEvalText(`(module + (type $s1 (struct)) + (type $t1 (func (param (ref $s1)))) + (type $t2 (func (param (ref null $s1)))) ;; not a subtype of t1 + (func $a (type $t2)) + (global (ref $t1) ref.func $a) + )`), WebAssembly.CompileError, /type mismatch/); +} + +// Subtypes with struct refs +{ + wasmEvalText(`(module + (type $t1 (sub (struct))) + (type $t2 (sub $t1 (struct (field i32)))) + + (global (ref $t1) struct.new_default $t1) + (global (ref null $t1) struct.new_default $t1) + (global (ref struct) struct.new_default $t1) + (global (ref null struct) struct.new_default $t1) + (global (ref eq) struct.new_default $t1) + (global (ref null eq) struct.new_default $t1) + (global (ref any) struct.new_default $t1) + (global (ref null any) struct.new_default $t1) + + (global (ref $t2) struct.new_default $t2) + (global (ref null $t2) struct.new_default $t2) + (global (ref $t1) struct.new_default $t2) + (global (ref null $t1) struct.new_default $t2) + (global (ref struct) struct.new_default $t2) + (global (ref null struct) struct.new_default $t2) + (global (ref eq) struct.new_default $t2) + (global (ref null eq) struct.new_default $t2) + (global (ref any) struct.new_default $t2) + (global (ref null any) struct.new_default $t2) + )`); + + assertErrorMessage(() => wasmEvalText(`(module + (type $t1 (struct)) + (type $t2 (struct (field i32))) ;; not a subtype of t1 + (global (ref $t1) struct.new_default $t2) + )`), WebAssembly.CompileError, /type mismatch/); +} + +// Subtypes with array refs +{ + wasmEvalText(`(module + (type $s (struct)) + (type $t1 (sub (array (ref null $s)))) + (type $t2 (sub $t1 (array (ref $s)))) + + (global (ref $t1) array.new_fixed $t1 0) + (global (ref null $t1) array.new_fixed $t1 0) + (global (ref array) array.new_fixed $t1 0) + (global (ref null array) array.new_fixed $t1 0) + (global (ref eq) array.new_fixed $t1 0) + (global (ref null eq) array.new_fixed $t1 0) + (global (ref any) array.new_fixed $t1 0) + (global (ref null any) array.new_fixed $t1 0) + + (global (ref $t2) array.new_fixed $t2 0) + (global (ref null $t2) array.new_fixed $t2 0) + (global (ref $t1) array.new_fixed $t2 0) + (global (ref null $t1) array.new_fixed $t2 0) + (global (ref array) array.new_fixed $t2 0) + (global (ref null array) array.new_fixed $t2 0) + (global (ref eq) array.new_fixed $t2 0) + (global (ref null eq) array.new_fixed $t2 0) + (global (ref any) array.new_fixed $t2 0) + (global (ref null any) array.new_fixed $t2 0) + )`); + + assertErrorMessage(() => wasmEvalText(`(module + (type $s (struct)) + (type $t1 (array (ref null $s))) + (type $t2 (array (ref $s))) ;; not a subtype of t1 + (global (ref $t1) array.new_fixed $t2 0) + )`), WebAssembly.CompileError, /type mismatch/); +} + +// Subtypes should be respected on imports and exports +{ + const { struct, mut_struct, eq, mut_eq, any, mut_any } = wasmEvalText(`(module + (type (struct)) + (global (export "struct") structref (struct.new 0)) + (global (export "mut_struct") (mut structref) (struct.new 0)) + (global (export "eq") eqref (struct.new 0)) + (global (export "mut_eq") (mut eqref) (struct.new 0)) + (global (export "any") anyref (struct.new 0)) + (global (export "mut_any") (mut anyref) (struct.new 0)) + )`).exports; + + function importGlobalIntoType(g, t) { + wasmEvalText(`(module + (global (import "test" "g") ${t}) + )`, { "test": { "g": g } }); + } + + importGlobalIntoType(struct, `structref`); + importGlobalIntoType(struct, `eqref`); + importGlobalIntoType(struct, `anyref`); + + importGlobalIntoType(mut_struct, `(mut structref)`); + assertErrorMessage(() => importGlobalIntoType(mut_struct, `(mut eqref)`), WebAssembly.LinkError, /global type mismatch/); + assertErrorMessage(() => importGlobalIntoType(mut_struct, `(mut anyref)`), WebAssembly.LinkError, /global type mismatch/); + + assertErrorMessage(() => importGlobalIntoType(eq, `structref`), WebAssembly.LinkError, /global type mismatch/); + importGlobalIntoType(eq, `eqref`); + importGlobalIntoType(eq, `anyref`); + + assertErrorMessage(() => importGlobalIntoType(mut_eq, `(mut structref)`), WebAssembly.LinkError, /global type mismatch/); + importGlobalIntoType(mut_eq, `(mut eqref)`); + assertErrorMessage(() => importGlobalIntoType(mut_eq, `(mut anyref)`), WebAssembly.LinkError, /global type mismatch/); + + assertErrorMessage(() => importGlobalIntoType(any, `structref`), WebAssembly.LinkError, /global type mismatch/); + assertErrorMessage(() => importGlobalIntoType(any, `eqref`), WebAssembly.LinkError, /global type mismatch/); + importGlobalIntoType(any, `anyref`); + + assertErrorMessage(() => importGlobalIntoType(mut_any, `(mut structref)`), WebAssembly.LinkError, /global type mismatch/); + assertErrorMessage(() => importGlobalIntoType(mut_any, `(mut eqref)`), WebAssembly.LinkError, /global type mismatch/); + importGlobalIntoType(mut_any, `(mut anyref)`); +} + +// Importing globals with ref types +{ + const { struct, array, func } = wasmEvalText(`(module + (type (struct)) + (type (array i32)) + (func $f) + (global (export "struct") structref (struct.new 0)) + (global (export "array") arrayref (array.new_fixed 1 0)) + (global (export "func") funcref (ref.func $f)) + )`).exports; + + function importValueIntoType(v, t) { + wasmEvalText(`(module + (global (import "test" "v") ${t}) + )`, { "test": { "v": v } }); + } + + assertErrorMessage(() => importValueIntoType(struct.value, `(mut structref)`), WebAssembly.LinkError, /global mutability mismatch/); + + importValueIntoType(null, `structref`); + assertErrorMessage(() => importValueIntoType(null, `(ref struct)`), TypeError, /cannot pass null/); + assertErrorMessage(() => importValueIntoType(0, `structref`), TypeError, /can only pass/); + importValueIntoType(struct.value, `structref`); + assertErrorMessage(() => importValueIntoType(array.value, `structref`), TypeError, /can only pass/); + + importValueIntoType(null, `i31ref`); + assertErrorMessage(() => importValueIntoType(null, `(ref i31)`), TypeError, /cannot pass null/); + importValueIntoType(0, `i31ref`); + assertErrorMessage(() => importValueIntoType(0.1, `i31ref`), TypeError, /can only pass/); + assertErrorMessage(() => importValueIntoType("test", `i31ref`), TypeError, /can only pass/); + assertErrorMessage(() => importValueIntoType(struct.value, `i31ref`), TypeError, /can only pass/); + + importValueIntoType(null, `eqref`); + assertErrorMessage(() => importValueIntoType(null, `(ref eq)`), TypeError, /cannot pass null/); + assertErrorMessage(() => importValueIntoType(undefined, `(ref eq)`), TypeError, /can only pass/); + importValueIntoType(0, `eqref`); + assertErrorMessage(() => importValueIntoType(0.1, `eqref`), TypeError, /can only pass/); + assertErrorMessage(() => importValueIntoType((x)=>x, `eqref`), TypeError, /can only pass/); + assertErrorMessage(() => importValueIntoType("test", `eqref`), TypeError, /can only pass/); + importValueIntoType(struct.value, `eqref`); + assertErrorMessage(() => importValueIntoType(func.value, `eqref`), TypeError, /can only pass/); + + importValueIntoType(null, `anyref`); + assertErrorMessage(() => importValueIntoType(null, `(ref any)`), TypeError, /cannot pass null/); + importValueIntoType(undefined, `(ref any)`); + importValueIntoType(0, `anyref`); + importValueIntoType(0.1, `anyref`); + importValueIntoType((x)=>x, `anyref`) + importValueIntoType("test", `anyref`); + importValueIntoType(struct.value, `anyref`); + importValueIntoType(func.value, `anyref`); + + importValueIntoType(null, `externref`); + assertErrorMessage(() => importValueIntoType(null, `(ref extern)`), TypeError, /cannot pass null/); + importValueIntoType(undefined, `(ref extern)`); + importValueIntoType(0, `externref`); + importValueIntoType(0.1, `externref`); + importValueIntoType((x)=>x, `externref`) + importValueIntoType("test", `externref`); + importValueIntoType(struct.value, `externref`); + importValueIntoType(func.value, `externref`); + + importValueIntoType(null, `funcref`); + assertErrorMessage(() => importValueIntoType(null, `(ref func)`), TypeError, /cannot pass null/); + assertErrorMessage(() => importValueIntoType(0, `funcref`), TypeError, /can only pass/); + assertErrorMessage(() => importValueIntoType((x)=>x, `funcref`), TypeError, /can only pass/); + importValueIntoType(func.value, `funcref`) + importValueIntoType(func.value, `(ref func)`) +} diff --git a/js/src/jit-test/tests/wasm/gc/i31ref.js b/js/src/jit-test/tests/wasm/gc/i31ref.js new file mode 100644 index 0000000000..65f2fccc3f --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/i31ref.js @@ -0,0 +1,164 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +let InvalidI31Values = [ + null, + Number.EPSILON, + Number.MAX_SAFE_INTEGER, + Number.MIN_SAFE_INTEGER, + Number.MIN_VALUE, + Number.MAX_VALUE, + Number.NaN, + -0, + // Number objects are not coerced + ...WasmI31refValues.map(n => new Number(n)), + // Non-integers are not valid + ...WasmI31refValues.map(n => n + 0.1), + ...WasmI31refValues.map(n => n + 0.5), + ...WasmI31refValues.map(n => n + 0.9) +]; + +// Return an equivalent JS number for if a JS number is converted to i31ref +// and then zero extended back to 32-bits. +function valueAsI31GetU(value) { + // Zero extending will drop the sign bit, if any + return value & 0x7fffffff; +} + +let identity = (n) => n; + +let { + castFromAnyref, + castFromExternref, + refI31, + refI31Identity, + i31GetU, + i31GetS, + i31EqualsI31, + i31EqualsEq +} = wasmEvalText(`(module + (func $identity (import "" "identity") (param anyref) (result anyref)) + + (func (export "castFromAnyref") (param anyref) (result i32) + local.get 0 + ref.test (ref i31) + ) + (func (export "castFromExternref") (param externref) (result i32) + local.get 0 + any.convert_extern + ref.test (ref i31) + ) + (func (export "refI31") (param i32) (result anyref) + local.get 0 + ref.i31 + ) + (func (export "refI31Identity") (param i32) (result anyref) + local.get 0 + ref.i31 + call $identity + ) + (func (export "i31GetU") (param i32) (result i32) + local.get 0 + ref.i31 + i31.get_u + ) + (func (export "i31GetS") (param i32) (result i32) + local.get 0 + ref.i31 + i31.get_s + ) + (func (export "i31EqualsI31") (param i32) (param i32) (result i32) + (ref.eq + (ref.i31 local.get 0) + (ref.i31 local.get 1) + ) + ) + (func (export "i31EqualsEq") (param i32) (param eqref) (result i32) + (ref.eq + (ref.i31 local.get 0) + local.get 1 + ) + ) +)`, {"": {identity}}).exports; + +// Test that wasm will represent JS number values that are 31-bit integers as +// an i31ref +for (let i of WasmI31refValues) { + assertEq(castFromAnyref(i), 1); + assertEq(castFromExternref(i), 1); +} + +// Test that wasm will not represent a JS value that is not a 31-bit number as +// an i31ref +for (let i of InvalidI31Values) { + assertEq(castFromAnyref(i), 0); + assertEq(castFromExternref(i), 0); +} + +// Test that we can roundtrip 31-bit integers through the i31ref type +// faithfully. +for (let i of WasmI31refValues) { + assertEq(refI31(i), i); + assertEq(refI31Identity(i), i); + assertEq(i31GetU(i), valueAsI31GetU(i)); + assertEq(i31GetS(i), i); +} + +// Test that i31ref values are truncated when given a 32-bit value +for (let i of WasmI31refValues) { + let adjusted = i | 0x80000000; + assertEq(refI31(adjusted), i); +} + +// Test that comparing identical i31 values works +for (let a of WasmI31refValues) { + for (let b of WasmI31refValues) { + assertEq(!!i31EqualsI31(a, b), a === b); + } +} + +// Test that an i31ref is never mistaken for a different kind of reference +for (let a of WasmI31refValues) { + for (let b of WasmEqrefValues) { + assertEq(!!i31EqualsEq(a, b), a === b); + } +} + +// Test that i32 values get wrapped correctly +const bigI32Tests = [ + { + input: MaxI31refValue + 1, + expected: MinI31refValue, + }, + { + input: MinI31refValue - 1, + expected: MaxI31refValue, + }, +] +for (const {input, expected} of bigI32Tests) { + const { get, getElem } = wasmEvalText(`(module + (func (export "get") (param i32) (result i32) + (i31.get_s (ref.i31 (local.get 0))) + ) + + (table i31ref (elem (item (ref.i31 (i32.const ${input}))))) + (func (export "getElem") (result i32) + (i31.get_s (table.get 0 (i32.const 0))) + ) + )`).exports; + assertEq(get(input), expected); + assertEq(getElem(), expected); +} + +const { i31GetU_null, i31GetS_null } = wasmEvalText(`(module + (func (export "i31GetU_null") (result i32) + ref.null i31 + i31.get_u + ) + (func (export "i31GetS_null") (result i32) + ref.null i31 + i31.get_s + ) +)`).exports; + +assertErrorMessage(() => i31GetU_null(), WebAssembly.RuntimeError, /dereferencing null pointer/); +assertErrorMessage(() => i31GetS_null(), WebAssembly.RuntimeError, /dereferencing null pointer/); diff --git a/js/src/jit-test/tests/wasm/gc/init-expr.js b/js/src/jit-test/tests/wasm/gc/init-expr.js new file mode 100644 index 0000000000..dff4b5c028 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/init-expr.js @@ -0,0 +1,281 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Test wasm::InitExpr GC specific constant expressions + +// struct.new and struct.new_default + +const { structNew, structNewDefault, structLarge } = wasmEvalText(`(module + (type $r (struct (field i32) (field f32))) + (type $xxl (struct + (field i64) (field f64) (field i64) (field f64) + (field i64) (field f64) (field i64) (field f64) + (field i64) (field f64) (field i64) (field f64) + (field i64) (field f64) (field i64) (field f64) + (field i64) (field f64) (field i64) (field f64))) + + (global $g1 (ref null $r) (struct.new_default $r)) + + (global $g2 (ref null $r) (struct.new $r + (i32.const 2) + (f32.const 3.14))) + + (global $gx (ref null $xxl) (struct.new $xxl + (i64.const 1) (f64.const 2.) (i64.const 3) (f64.const 4.) + (i64.const 5) (f64.const 2.) (i64.const 3) (f64.const 4.) + (i64.const 1) (f64.const 8.) (i64.const 9) (f64.const 4.) + (i64.const 1) (f64.const 2.) (i64.const 12) (f64.const 3.14) + (i64.const 16) (f64.const 17.) (i64.const 18) (f64.const 19.))) + + (func (export "structNewDefault") (result eqref) global.get $g1) + (func (export "structNew") (result eqref) global.get $g2) + (func (export "structLarge") (result eqref) global.get $gx) + )`).exports; + +let result; +result = structNew(); +assertEq(wasmGcReadField(result, 0), 2); +assertEq(wasmGcReadField(result, 1), new Float32Array([3.140000104904175])[0]); +result = structNewDefault(); +assertEq(wasmGcReadField(result, 0), 0); +assertEq(wasmGcReadField(result, 1), 0); +result = structLarge(); +assertEq(wasmGcReadField(result, 2), 3n); +assertEq(wasmGcReadField(result, 19), 19); + +// array.new, array.new_default, array.new_fixed, and array.new_elem + +const { arrayNew, arrayNewDefault, arrayNewFixed, arrayNewElem } = wasmEvalText(`(module + (type $r (struct (field i32) (field f32))) + (type $a1 (array f64)) + (type $a2 (array i32)) + (type $a3 (array (ref null $r))) + + (global $g1 (ref null $a1) (array.new $a1 (f64.const 3.14) (i32.const 3))) + (global $g2 (ref null $a2) (array.new_default $a2 (i32.const 2))) + (global $g3 (ref null $a3) (array.new_fixed $a3 2 + (struct.new $r (i32.const 10) (f32.const 16.0)) + (ref.null $r))) + + (elem $a3e (ref null $r) + (item (struct.new $r (i32.const 1) (f32.const 2.0))) + (item (struct.new $r (i32.const 3) (f32.const 4.0))) + (item (struct.new $r (i32.const 5) (f32.const 6.0))) + ) + + (func (export "arrayNew") (result eqref) global.get $g1) + (func (export "arrayNewDefault") (result eqref) global.get $g2) + (func (export "arrayNewFixed") (result eqref) global.get $g3) + (func (export "arrayNewElem") (result eqref) + (array.new_elem $a3 $a3e (i32.const 0) (i32.const 3)) + ) + )`).exports; + +result = arrayNew(); +assertEq(wasmGcArrayLength(result), 3); +assertEq(wasmGcReadField(result, 0), 3.14); +assertEq(wasmGcReadField(result, 2), 3.14); + +result = arrayNewDefault(); +assertEq(wasmGcArrayLength(result), 2); +assertEq(wasmGcReadField(result, 1), 0); + +result = arrayNewFixed(); +assertEq(wasmGcArrayLength(result), 2); +assertEq(wasmGcReadField(wasmGcReadField(result, 0), 0), 10); +assertEq(wasmGcReadField(wasmGcReadField(result, 0), 1), 16); +assertEq(wasmGcReadField(result, 1), null); + +result = arrayNewElem(); +assertEq(wasmGcArrayLength(result), 3); +assertEq(wasmGcReadField(wasmGcReadField(result, 0), 0), 1); +assertEq(wasmGcReadField(wasmGcReadField(result, 0), 1), 2); +assertEq(wasmGcReadField(wasmGcReadField(result, 1), 0), 3); +assertEq(wasmGcReadField(wasmGcReadField(result, 1), 1), 4); +assertEq(wasmGcReadField(wasmGcReadField(result, 2), 0), 5); +assertEq(wasmGcReadField(wasmGcReadField(result, 2), 1), 6); + +// any.convert_extern and extern.convert_any + +let {testString, testArray} = wasmEvalText(`(module + (type $array (array i32)) + (import "env" "s" (global $s (ref extern))) + (global $s' (ref extern) (extern.convert_any (any.convert_extern (global.get $s)))) + (func (export "testString") (result (ref extern)) + (global.get $s')) + (global $a (ref $array) (array.new_fixed $array 1 (i32.const 0))) + (global $a' (ref any) (any.convert_extern (extern.convert_any (global.get $a)))) + (func (export "testArray") (result i32) + (ref.eq (global.get $a) (ref.cast (ref eq) (global.get $a')))) +)`, {env:{s:"abc"}}).exports; + +assertEq(testString(), 'abc'); +assertEq(testArray(), 1); + +wasmFailValidateText(`(module + (global $g (ref extern) (extern.convert_any (any.convert_extern (ref.null extern)))) +)`, /expected/); +wasmFailValidateText(`(module + (global $g (ref extern) (any.convert_extern (extern.convert_any (ref.null any)))) +)`, /expected/); + +// Simple table initialization +{ + const { t1, t2, t1init } = wasmEvalText(`(module + (type $s (struct (field i32))) + (type $a1 (array f64)) + (type $a2 (array (ref null $s))) + + ;; passive segment + (elem $e1 anyref + (item (struct.new $s (i32.const 123))) + (item (array.new $a1 (f64.const 234) (i32.const 3))) + (item (array.new_default $a2 (i32.const 3))) + (item (ref.i31 (i32.const 345))) + ) + (table $t1 (export "t1") 4 4 anyref) + + ;; active segment + (table $t2 (export "t2") anyref (elem + (item (struct.new $s (i32.const 321))) + (item (array.new $a1 (f64.const 432) (i32.const 3))) + (item (array.new_default $a2 (i32.const 3))) + (item (ref.i31 (i32.const 543))) + )) + + (func (export "t1init") (table.init $t1 $e1 (i32.const 0) (i32.const 0) (i32.const 4))) + )`).exports; + + assertEq(t1.get(0), null); + assertEq(t1.get(1), null); + assertEq(t1.get(2), null); + assertEq(t1.get(3), null); + + assertEq(wasmGcReadField(t2.get(0), 0), 321); + assertEq(wasmGcReadField(t2.get(1), 0), 432); + assertEq(wasmGcReadField(t2.get(1), 1), 432); + assertEq(wasmGcReadField(t2.get(1), 2), 432); + assertEq(wasmGcReadField(t2.get(2), 0), null); + assertEq(wasmGcReadField(t2.get(2), 1), null); + assertEq(wasmGcReadField(t2.get(2), 2), null); + assertEq(t2.get(3), 543); + + t1init(); + assertEq(wasmGcReadField(t1.get(0), 0), 123); + assertEq(wasmGcReadField(t1.get(1), 0), 234); + assertEq(wasmGcReadField(t1.get(1), 1), 234); + assertEq(wasmGcReadField(t1.get(1), 2), 234); + assertEq(wasmGcReadField(t1.get(2), 0), null); + assertEq(wasmGcReadField(t1.get(2), 1), null); + assertEq(wasmGcReadField(t1.get(2), 2), null); + assertEq(t1.get(3), 345); +} + +// The contents of passive segments are unique per instance and evaluated at +// instantiation time. +{ + const mod = new WebAssembly.Module(wasmTextToBinary(`(module + (type $s (struct (field (mut i32)))) + (type $a (array (mut f64))) + + (elem $e anyref + (item (struct.new $s (i32.const 123))) + (item (array.new $a (f64.const 234) (i32.const 1))) + ) + + (table $t1 (export "t1") 2 2 anyref) + (table $t2 (export "t2") 2 2 anyref) + + (start $init1) + + (func $init1 + (table.init $t1 $e (i32.const 0) (i32.const 0) (i32.const 2)) + ) + (func (export "init2") + (table.init $t2 $e (i32.const 0) (i32.const 0) (i32.const 2)) + ) + (func (export "update1") + (ref.cast (ref $s) (table.get $t1 (i32.const 0))) + (struct.set $s 0 (i32.const 321)) + (ref.cast (ref $a) (table.get $t1 (i32.const 1))) + (array.set $a (i32.const 0) (f64.const 432)) + ) + (func (export "update2") + (ref.cast (ref $s) (table.get $t1 (i32.const 0))) + (struct.set $s 0 (i32.const -321)) + (ref.cast (ref $a) (table.get $t1 (i32.const 1))) + (array.set $a (i32.const 0) (f64.const -432)) + ) + )`)); + + const { t1: t1_1, t2: t2_1, init2: init2_1, update1: update1_1, update2: update2_1 } = new WebAssembly.Instance(mod, {}).exports; + const { t1: t1_2, t2: t2_2, init2: init2_2, update1: update1_2, update2: update2_2 } = new WebAssembly.Instance(mod, {}).exports; + + assertEq(wasmGcReadField(t1_1.get(0), 0), 123); + assertEq(wasmGcReadField(t1_1.get(1), 0), 234); + assertEq(t2_1.get(0), null); + assertEq(t2_1.get(1), null); + assertEq(wasmGcReadField(t1_2.get(0), 0), 123); + assertEq(wasmGcReadField(t1_2.get(1), 0), 234); + assertEq(t2_2.get(0), null); + assertEq(t2_2.get(1), null); + + update1_1(); + assertEq(wasmGcReadField(t1_1.get(0), 0), 321); + assertEq(wasmGcReadField(t1_1.get(1), 0), 432); + assertEq(t2_1.get(0), null); + assertEq(t2_1.get(1), null); + assertEq(wasmGcReadField(t1_2.get(0), 0), 123); + assertEq(wasmGcReadField(t1_2.get(1), 0), 234); + assertEq(t2_2.get(0), null); + assertEq(t2_2.get(1), null); + + init2_1(); + assertEq(wasmGcReadField(t1_1.get(0), 0), 321); + assertEq(wasmGcReadField(t1_1.get(1), 0), 432); + assertEq(wasmGcReadField(t2_1.get(0), 0), 321); + assertEq(wasmGcReadField(t2_1.get(1), 0), 432); + assertEq(wasmGcReadField(t1_2.get(0), 0), 123); + assertEq(wasmGcReadField(t1_2.get(1), 0), 234); + assertEq(t2_2.get(0), null); + assertEq(t2_2.get(1), null); + + init2_2(); + assertEq(wasmGcReadField(t1_1.get(0), 0), 321); + assertEq(wasmGcReadField(t1_1.get(1), 0), 432); + assertEq(wasmGcReadField(t2_1.get(0), 0), 321); + assertEq(wasmGcReadField(t2_1.get(1), 0), 432); + assertEq(wasmGcReadField(t1_2.get(0), 0), 123); + assertEq(wasmGcReadField(t1_2.get(1), 0), 234); + assertEq(wasmGcReadField(t2_2.get(0), 0), 123); + assertEq(wasmGcReadField(t2_2.get(1), 0), 234); + + update2_1(); + assertEq(wasmGcReadField(t1_1.get(0), 0), -321); + assertEq(wasmGcReadField(t1_1.get(1), 0), -432); + assertEq(wasmGcReadField(t2_1.get(0), 0), -321); + assertEq(wasmGcReadField(t2_1.get(1), 0), -432); + assertEq(wasmGcReadField(t1_2.get(0), 0), 123); + assertEq(wasmGcReadField(t1_2.get(1), 0), 234); + assertEq(wasmGcReadField(t2_2.get(0), 0), 123); + assertEq(wasmGcReadField(t2_2.get(1), 0), 234); + + update1_2(); + assertEq(wasmGcReadField(t1_1.get(0), 0), -321); + assertEq(wasmGcReadField(t1_1.get(1), 0), -432); + assertEq(wasmGcReadField(t2_1.get(0), 0), -321); + assertEq(wasmGcReadField(t2_1.get(1), 0), -432); + assertEq(wasmGcReadField(t1_2.get(0), 0), 321); + assertEq(wasmGcReadField(t1_2.get(1), 0), 432); + assertEq(wasmGcReadField(t2_2.get(0), 0), 321); + assertEq(wasmGcReadField(t2_2.get(1), 0), 432); + + update2_2(); + assertEq(wasmGcReadField(t1_1.get(0), 0), -321); + assertEq(wasmGcReadField(t1_1.get(1), 0), -432); + assertEq(wasmGcReadField(t2_1.get(0), 0), -321); + assertEq(wasmGcReadField(t2_1.get(1), 0), -432); + assertEq(wasmGcReadField(t1_2.get(0), 0), -321); + assertEq(wasmGcReadField(t1_2.get(1), 0), -432); + assertEq(wasmGcReadField(t2_2.get(0), 0), -321); + assertEq(wasmGcReadField(t2_2.get(1), 0), -432); +} diff --git a/js/src/jit-test/tests/wasm/gc/ion-and-baseline.js b/js/src/jit-test/tests/wasm/gc/ion-and-baseline.js new file mode 100644 index 0000000000..5a4951c585 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/ion-and-baseline.js @@ -0,0 +1,88 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Attempt to test intercalls from ion to baseline and back. +// +// We get into this situation when the modules are compiled with different +// tiering policies, or one tiers up before the other, or (for now) one opts +// into gc and is baseline-compiled and the other does not and is ion-compiled. +// There are lots of variables here. Generally, a small module will be +// ion-compiled unless there's reason to baseline-compile it, so we're likely +// actually testing something here. +// +// Some logging with printf confirms that refmod is baseline-compiled and +// nonrefmod is ion-compiled at present, with --wasm-gc enabled. + +var refmod = new WebAssembly.Module(wasmTextToBinary( + `(module + (import "" "tbl" (table $tbl 4 funcref)) + (import "" "print" (func $print (param i32))) + + ;; Just a dummy + (type $s (struct (field i32))) + + (type $htype (func (param externref))) + (type $itype (func (result externref))) + + (elem (i32.const 0) $f $g) + + (func $f (param externref) + (call $print (i32.const 1))) + + (func $g (result externref) + (call $print (i32.const 2)) + (ref.null extern)) + + (func (export "test_h") + (call_indirect (type $htype) (ref.null extern) (i32.const 2))) + + (func (export "test_i") + (drop (call_indirect (type $itype) (i32.const 3)))) + + )`)); + +var nonrefmod = new WebAssembly.Module(wasmTextToBinary( + `(module + (import "" "tbl" (table $tbl 4 funcref)) + (import "" "print" (func $print (param i32))) + + (type $ftype (func (param i32))) + (type $gtype (func (result i32))) + + (elem (i32.const 2) $h $i) + + ;; Should fail because of the signature mismatch: parameter + (func (export "test_f") + (call_indirect (type $ftype) (i32.const 37) (i32.const 0))) + + ;; Should fail because of the signature mismatch: return value + (func (export "test_g") + (drop (call_indirect (type $gtype) (i32.const 1)))) + + (func $h (param i32) + (call $print (i32.const 2))) + + (func $i (result i32) + (call $print (i32.const 3)) + (i32.const 37)) + )`)); + +var tbl = new WebAssembly.Table({initial:4, element:"anyfunc"}); +var refins = new WebAssembly.Instance(refmod, {"":{print, tbl}}).exports; +var nonrefins = new WebAssembly.Instance(nonrefmod, {"":{print, tbl}}).exports; + +assertErrorMessage(() => nonrefins.test_f(), + WebAssembly.RuntimeError, + /indirect call signature mismatch/); + +assertErrorMessage(() => nonrefins.test_g(), + WebAssembly.RuntimeError, + /indirect call signature mismatch/); + +assertErrorMessage(() => refins.test_h(), + WebAssembly.RuntimeError, + /indirect call signature mismatch/); + +assertErrorMessage(() => refins.test_i(), + WebAssembly.RuntimeError, + /indirect call signature mismatch/); + diff --git a/js/src/jit-test/tests/wasm/gc/js-boundary.js b/js/src/jit-test/tests/wasm/gc/js-boundary.js new file mode 100644 index 0000000000..029bf576c2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/js-boundary.js @@ -0,0 +1,123 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Tests of dynamic type checks +test('anyref', WasmAnyrefValues, []); +test('eqref', WasmEqrefValues, WasmNonAnyrefValues); +test('structref', WasmStructrefValues, WasmNonAnyrefValues); +test('arrayref', WasmArrayrefValues, WasmNonAnyrefValues); +let { newStruct } = wasmEvalText(` + (module + (type $s (struct)) + (func (export "newStruct") (result anyref) + struct.new $s) + )`).exports; +test('(ref null 0)', [newStruct()], WasmNonAnyrefValues, '(type (struct))'); +test('nullref', [null], WasmNonAnyrefValues); + +function test(type, validValues, invalidValues, typeSection = "") { + const CheckError = /can only pass|bad type/; + + // 1. Exported function params + let {a} = wasmEvalText(`(module + ${typeSection} + (func (export "a") (param ${type})) + )`).exports; + for (let val of invalidValues) { + assertErrorMessage(() => a(val), TypeError, CheckError); + } + for (let val of validValues) { + a(val); + } + + // 2. Imported function results + for (let val of invalidValues) { + function returnVal() { + return val; + } + let {test} = wasmEvalText(`(module + ${typeSection} + (func $returnVal (import "" "returnVal") (result ${type})) + (func (export "test") + call $returnVal + drop + ) + )`, {"": {returnVal}}).exports; + assertErrorMessage(() => test(), TypeError, CheckError); + } + for (let val of validValues) { + function returnVal() { + return val; + } + let {test} = wasmEvalText(`(module + ${typeSection} + (func $returnVal (import "" "returnVal") (result ${type})) + (func (export "test") + call $returnVal + drop + ) + )`, {"": {returnVal}}).exports; + test(val); + } + + // TODO: the rest of the tests cannot handle type sections yet. + if (typeSection !== "") { + return; + } + + // 3. Global value setter + for (let val of validValues) { + // Construct global from JS-API with initial value + let a = new WebAssembly.Global({value: type}, val); + assertEq(a.value, val, 'roundtrip matches'); + + // Construct global from JS-API with null value, then set + let b = new WebAssembly.Global({value: type, mutable: true}, null); + b.value = val; + assertEq(b.value, val, 'roundtrip matches'); + } + for (let val of invalidValues) { + // Construct global from JS-API with initial value + assertErrorMessage(() => new WebAssembly.Global({value: type}, val), + TypeError, + CheckError); + + // Construct global from JS-API with null value, then set + let a = new WebAssembly.Global({value: type, mutable: true}, null); + assertErrorMessage(() => a.value = val, + TypeError, + CheckError); + } + + // 4. Table set method + for (let val of validValues) { + let table = new WebAssembly.Table({element: type, initial: 1, maximum: 1}); + table.set(0, val); + assertEq(table.get(0), val, 'roundtrip matches'); + } + for (let val of invalidValues) { + let table = new WebAssembly.Table({element: type, initial: 1, maximum: 1}); + assertErrorMessage(() => table.set(0, val), + TypeError, + CheckError); + } +} + +// Verify that GC objects are opaque +for (const val of WasmGcObjectValues) { + assertEq(Reflect.getPrototypeOf(val), null); + assertEq(Reflect.setPrototypeOf(val, null), true); + assertEq(Reflect.setPrototypeOf(val, {}), false); + assertEq(Reflect.isExtensible(val), false); + assertEq(Reflect.preventExtensions(val), false); + assertEq(Reflect.getOwnPropertyDescriptor(val, "anything"), undefined); + assertEq(Reflect.defineProperty(val, "anything", { value: 42 }), false); + assertEq(Reflect.has(val, "anything"), false); + assertEq(Reflect.get(val, "anything"), undefined); + assertErrorMessage(() => { Reflect.set(val, "anything", 3); }, TypeError, /can't modify/); + assertErrorMessage(() => { Reflect.deleteProperty(val, "anything"); }, TypeError, /can't modify/); + assertEq(Reflect.ownKeys(val).length, 0, `gc objects should not have keys, but this one had: ${Reflect.ownKeys(val)}`); + for (const i in val) { + throw new Error(`GC objects should have no enumerable properties, but had ${i}`); + } + assertEq(val[Symbol.iterator], undefined, "GC objects should not be iterable"); +} diff --git a/js/src/jit-test/tests/wasm/gc/limits.js b/js/src/jit-test/tests/wasm/gc/limits.js new file mode 100644 index 0000000000..e6f21b5d6b --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/limits.js @@ -0,0 +1,69 @@ +// |jit-test| skip-if: !wasmGcEnabled() || getBuildConfiguration("tsan") + +// This test has a timeout on TSAN configurations due to the large +// allocations. + +// Limit of 1 million recursion groups +wasmValidateText(`(module + ${`(rec (type (func)))`.repeat(1_000_000)} + )`); +wasmFailValidateText(`(module + ${`(rec (type (func)))`.repeat(1_000_001)} + )`, /too many/); + +// Limit of 1 million types (across all recursion groups) +wasmValidateText(`(module + (rec ${`(type (func))`.repeat(1_000_000)}) + )`); +wasmValidateText(`(module + (rec ${`(type (func))`.repeat(500_000)}) + (rec ${`(type (func))`.repeat(500_000)}) + )`); +wasmFailValidateText(`(module + (rec ${`(type (func))`.repeat(1_000_001)}) + )`, /too many/); +wasmFailValidateText(`(module + (rec ${`(type (func))`.repeat(500_000)}) + (rec ${`(type (func))`.repeat(500_001)}) + )`, /too many/); + +// Limit of subtyping hierarchy 63 deep +function testSubtypingModule(depth) { + let types = '(type (sub (func)))'; + for (let i = 1; i <= depth; i++) { + types += `(type (sub ${i - 1} (func)))`; + } + return `(module + ${types} + )`; +} +wasmValidateText(testSubtypingModule(63)); +wasmFailValidateText(testSubtypingModule(64), /too deep/); + +// Limit of 10_000 struct fields +wasmFailValidateText(`(module + (type (struct ${'(field i64)'.repeat(10_001)})) +)`, /too many/); + +{ + let {makeLargeStructDefault, makeLargeStruct} = wasmEvalText(`(module + (type $s (struct ${'(field i64)'.repeat(10_000)})) + (func (export "makeLargeStructDefault") (result anyref) + struct.new_default $s + ) + (func (export "makeLargeStruct") (result anyref) + ${'i64.const 0 '.repeat(10_000)} + struct.new $s + ) + )`).exports; + let largeStructDefault = makeLargeStructDefault(); + let largeStruct = makeLargeStruct(); +} + +// array.new_fixed has limit of 10_000 operands +wasmFailValidateText(`(module + (type $a (array i32)) + (func + array.new_fixed $a 10001 + ) +)`, /too many/); diff --git a/js/src/jit-test/tests/wasm/gc/linking.js b/js/src/jit-test/tests/wasm/gc/linking.js new file mode 100644 index 0000000000..586011219a --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/linking.js @@ -0,0 +1,72 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +function linkGlobals(typeSection, exportInit, linkType) { + let {global} = wasmEvalText(`(module + ${typeSection} + (global (export "global") ${linkType} ${exportInit}) + )`).exports; + + wasmEvalText(`(module + ${typeSection} + (import "" "global" + (global ${linkType}) + ) + )`, {"": {global}}); +} + +function linkTables(typeSection, exportInit, linkType) { + let {table} = wasmEvalText(`(module + ${typeSection} + (table (export "table") ${linkType} (elem (${exportInit}))) + )`).exports; + + wasmEvalText(`(module + ${typeSection} + (import "" "table" + (table 0 1 ${linkType}) + ) + )`, {"": {table}}); +} + +function linkFuncs(typeSection, exportInit, linkType) { + let {func} = wasmEvalText(`(module + ${typeSection} + (func + (export "func") + (param ${linkType}) + (result ${linkType}) + unreachable + ) + )`).exports; + + wasmEvalText(`(module + ${typeSection} + (import "" "func" + (func (param ${linkType}) (result ${linkType})) + ) + )`, {"": {func}}); +} + +const TESTS = [ + [ + "(type (struct (field i32)))", + "ref.null 0", + "(ref null 0)", + ], + [ + "(type (array i32))", + "ref.null 0", + "(ref null 0)", + ], + [ + "(type (struct (field i32))) (type (struct (field (ref 0))))", + "ref.null 1", + "(ref null 1)", + ] +]; + +for (let test of TESTS) { + linkGlobals(...test); + linkTables(...test); + linkFuncs(...test); +} diff --git a/js/src/jit-test/tests/wasm/gc/ref-eq.js b/js/src/jit-test/tests/wasm/gc/ref-eq.js new file mode 100644 index 0000000000..99881ced42 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/ref-eq.js @@ -0,0 +1,27 @@ +// |jit-test| skip-if: !wasmGcEnabled() +// +// ref.eq is part of the gc feature, not the reftypes feature. + +let { exports: { make, ref_eq, ref_eq_for_control } } = wasmEvalText(`(module + (type $s (struct)) + + (func (export "make") (result eqref) struct.new $s) + + (func (export "ref_eq") (param $a eqref) (param $b eqref) (result i32) + (ref.eq (local.get $a) (local.get $b))) + + (func (export "ref_eq_for_control") (param $a eqref) (param $b eqref) (result f64) + (if (result f64) (ref.eq (local.get $a) (local.get $b)) + (then (f64.const 5.0)) + (else (f64.const 3.0)))))`); + +let a = make(); +let b = make(); + +assertEq(ref_eq(null, null), 1); +assertEq(ref_eq(null, a), 0); +assertEq(ref_eq(b, b), 1); +assertEq(ref_eq_for_control(null, null), 5); +assertEq(ref_eq_for_control(null, a), 3); +assertEq(ref_eq_for_control(b, b), 5); + diff --git a/js/src/jit-test/tests/wasm/gc/ref-global.js b/js/src/jit-test/tests/wasm/gc/ref-global.js new file mode 100644 index 0000000000..1e2a87edc6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/ref-global.js @@ -0,0 +1,96 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Basic private-to-module functionality. At the moment all we have is null +// pointers, not very exciting. + +{ + let bin = wasmTextToBinary( + `(module + (type $point (struct + (field $x f64) + (field $y f64))) + + (global $g1 (mut (ref null $point)) (ref.null $point)) + (global $g2 (mut (ref null $point)) (ref.null $point)) + (global $g3 (ref null $point) (ref.null $point)) + + ;; Restriction: cannot expose Refs outside the module, not even + ;; as a return value. See ref-restrict.js. + + (func (export "get") (result eqref) + (global.get $g1)) + + (func (export "copy") + (global.set $g2 (global.get $g1))) + + (func (export "clear") + (global.set $g1 (global.get $g3)) + (global.set $g2 (ref.null $point))))`); + + let mod = new WebAssembly.Module(bin); + let ins = new WebAssembly.Instance(mod).exports; + + assertEq(ins.get(), null); + ins.copy(); // Should not crash + ins.clear(); // Should not crash +} + +// Global with struct type + +{ + let bin = wasmTextToBinary( + `(module + (type $point (struct + (field $x f64) + (field $y f64))) + + (global $glob (mut (ref null $point)) (ref.null $point)) + + (func (export "init") + (global.set $glob (struct.new $point (f64.const 0.5) (f64.const 2.75)))) + + (func (export "change") + (global.set $glob (struct.new $point (f64.const 3.5) (f64.const 37.25)))) + + (func (export "clear") + (global.set $glob (ref.null $point))) + + (func (export "x") (result f64) + (struct.get $point 0 (global.get $glob))) + + (func (export "y") (result f64) + (struct.get $point 1 (global.get $glob))))`); + + let mod = new WebAssembly.Module(bin); + let ins = new WebAssembly.Instance(mod).exports; + + assertErrorMessage(() => ins.x(), WebAssembly.RuntimeError, /dereferencing null pointer/); + + ins.init(); + assertEq(ins.x(), 0.5); + assertEq(ins.y(), 2.75); + + ins.change(); + assertEq(ins.x(), 3.5); + assertEq(ins.y(), 37.25); + + ins.clear(); + assertErrorMessage(() => ins.x(), WebAssembly.RuntimeError, /dereferencing null pointer/); +} + +// Global value of type externref for initializer from a WebAssembly.Global, +// just check that it works. +{ + let bin = wasmTextToBinary( + `(module + (import "" "g" (global $g externref)) + (global $glob externref (global.get $g)) + (func (export "get") (result externref) + (global.get $glob)))`); + + let mod = new WebAssembly.Module(bin); + let obj = {zappa:37}; + let g = new WebAssembly.Global({value: "externref"}, obj); + let ins = new WebAssembly.Instance(mod, {"":{g}}).exports; + assertEq(ins.get(), obj); +} diff --git a/js/src/jit-test/tests/wasm/gc/ref-struct.js b/js/src/jit-test/tests/wasm/gc/ref-struct.js new file mode 100644 index 0000000000..49a772d26f --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/ref-struct.js @@ -0,0 +1,333 @@ +// |jit-test| skip-if: !wasmGcEnabled(); test-also=--gc-zeal=2 + +// We'll be running some binary-format tests shortly. + +load(libdir + "wasm-binary.js"); + +const v2vSigSection = sigSection([{args:[], ret:VoidCode}]); + +function checkInvalid(body, errorMessage) { + assertErrorMessage(() => new WebAssembly.Module( + moduleWithSections([v2vSigSection, + declSection([0]), + bodySection([body])])), + WebAssembly.CompileError, + errorMessage); +} + +// General test case for struct.new, struct.get, and struct.set: binary tree +// manipulation. + +{ + let bin = wasmTextToBinary( + `(module + (import "" "print_lp" (func $print_lp)) + (import "" "print_rp" (func $print_rp)) + (import "" "print_int" (func $print_int (param i32))) + + (type $wabbit (struct + (field $x (mut i32)) + (field $left (mut (ref null $wabbit))) + (field $right (mut (ref null $wabbit))))) + + (global $g (mut (ref null $wabbit)) (ref.null $wabbit)) + + (global $k (mut i32) (i32.const 0)) + + (func (export "init") (param $n i32) + (global.set $g (call $make (local.get $n)))) + + (func $make (param $n i32) (result (ref null $wabbit)) + (local $tmp i32) + (local.set $tmp (global.get $k)) + (global.set $k (i32.add (local.get $tmp) (i32.const 1))) + (if (result (ref null $wabbit)) (i32.le_s (local.get $n) (i32.const 2)) + (then (struct.new $wabbit (local.get $tmp) (ref.null $wabbit) (ref.null $wabbit))) + (else + (block (result (ref null $wabbit)) + (struct.new $wabbit + (local.get $tmp) + (call $make (i32.sub (local.get $n) (i32.const 1))) + (call $make (i32.sub (local.get $n) (i32.const 2)))))))) + + (func (export "accumulate") (result i32) + (call $accum (global.get $g))) + + (func $accum (param $w (ref null $wabbit)) (result i32) + (if (result i32) (ref.is_null (local.get $w)) + (then (i32.const 0)) + (else + (i32.add (struct.get $wabbit 0 (local.get $w)) + (i32.sub (call $accum (struct.get $wabbit 1 (local.get $w))) + (call $accum (struct.get $wabbit 2 (local.get $w)))))))) + + (func (export "reverse") + (call $reverse (global.get $g))) + + (func $reverse (param $w (ref null $wabbit)) + (local $tmp (ref null $wabbit)) + (if (i32.eqz (ref.is_null (local.get $w))) + (then + (block + (struct.set $wabbit 0 (local.get $w) (i32.mul (i32.const 2) (struct.get $wabbit 0 (local.get $w)))) + (local.set $tmp (struct.get $wabbit 1 (local.get $w))) + (struct.set $wabbit 1 (local.get $w) (struct.get $wabbit 2 (local.get $w))) + (struct.set $wabbit 2 (local.get $w) (local.get $tmp)) + (call $reverse (struct.get $wabbit 1 (local.get $w))) + (call $reverse (struct.get $wabbit 2 (local.get $w))))))) + + (func (export "print") + (call $pr (global.get $g))) + + (func $pr (param $w (ref null $wabbit)) + (if (i32.eqz (ref.is_null (local.get $w))) + (then + (block + (call $print_lp) + (call $print_int (struct.get $wabbit 0 (local.get $w))) + (call $pr (struct.get $wabbit 1 (local.get $w))) + (call $pr (struct.get $wabbit 2 (local.get $w))) + (call $print_rp))))) + )`); + + let s = ""; + function pr_int(k) { s += k + " "; } + function pr_lp() { s += "(" }; + function pr_rp() { s += ")" } + + let mod = new WebAssembly.Module(bin); + let ins = new WebAssembly.Instance(mod, {"":{print_int:pr_int,print_lp:pr_lp,print_rp:pr_rp}}).exports; + + ins.init(6); + s = ""; ins.print(); assertEq(s, "(0 (1 (2 (3 (4 )(5 ))(6 ))(7 (8 )(9 )))(10 (11 (12 )(13 ))(14 )))"); + assertEq(ins.accumulate(), -13); + + ins.reverse(); + s = ""; ins.print(); assertEq(s, "(0 (20 (28 )(22 (26 )(24 )))(2 (14 (18 )(16 ))(4 (12 )(6 (10 )(8 )))))"); + assertEq(ins.accumulate(), 14); + + for (let i=10; i < 22; i++ ) { + ins.init(i); + ins.reverse(); + gc(); + ins.reverse(); + } +} + +// Sanity check for struct.set: we /can/ store a (ref null T) into a (ref null U) field +// with struct.set if T <: U; this should fall out of normal coercion but good +// to test. + +wasmEvalText( + `(module + (type $node (sub (struct (field (mut (ref null $node)))))) + (type $nix (sub $node (struct (field (mut (ref null $node))) (field i32)))) + (func $f (param $p (ref null $node)) (param $q (ref null $nix)) + (struct.set $node 0 (local.get $p) (local.get $q))))`); + +// ref.cast: if the downcast succeeds we get the original pointer + +assertEq(wasmEvalText( + `(module + (type $node (sub (struct (field i32)))) + (type $node2 (sub $node (struct (field i32) (field f32)))) + (func $f (param $p (ref null $node)) (result (ref null $node2)) + (ref.cast (ref null $node2) (local.get $p))) + (func (export "test") (result i32) + (local $n (ref null $node)) + (local.set $n (struct.new $node2 (i32.const 0) (f32.const 12))) + (ref.eq (call $f (local.get $n)) (local.get $n))))`).exports.test(), + 1); + +// ref.cast: if the pointer is null we trap + +assertErrorMessage(() => wasmEvalText( + `(module + (type $node (struct (field i32))) + (type $node2 (struct (field i32) (field f32))) + (func $f (param $p (ref null $node)) (result (ref null $node2)) + (ref.cast (ref $node2) (local.get $p))) + (func (export "test") (result eqref) + (call $f (ref.null $node))))`).exports.test(), + WebAssembly.RuntimeError, + /bad cast/, +); + +// ref.cast null: if the pointer is null we do not trap + +wasmEvalText( + `(module + (type $node (struct (field i32))) + (type $node2 (struct (field i32) (field f32))) + (func $f (param $p (ref null $node)) (result (ref null $node2)) + (ref.cast (ref null $node2) (local.get $p))) + (func (export "test") (result eqref) + (call $f (ref.null $node))))`).exports.test(); + + +// And once more with mutable fields + +assertEq(wasmEvalText( + `(module + (type $node (sub (struct (field (mut i32))))) + (type $node2 (sub $node (struct (field (mut i32)) (field f32)))) + (func $f (param $p (ref null $node)) (result (ref null $node2)) + (ref.cast (ref null $node2) (local.get $p))) + (func (export "test") (result i32) + (local $n (ref null $node)) + (local.set $n (struct.new $node2 (i32.const 0) (f32.const 12))) + (ref.eq (call $f (local.get $n)) (local.get $n))))`).exports.test(), + 1); + +// ref.cast: eqref -> struct when the eqref is the right struct; +// special case since eqref requires unboxing + +assertEq(wasmEvalText( + `(module + (type $node (struct (field i32))) + (func $f (param $p eqref) (result (ref null $node)) + (ref.cast (ref null $node) (local.get $p))) + (func (export "test") (result i32) + (local $n (ref null $node)) + (local.set $n (struct.new $node (i32.const 0))) + (ref.eq (call $f (local.get $n)) (local.get $n))))`).exports.test(), + 1); + +// Can default initialize a struct which zero initializes + +{ + let {makeA, makeB, makeC} = wasmEvalText(` + (module + (type $a (struct)) + (type $b (struct (field i32) (field f32))) + (type $c (struct (field eqref))) + + (func (export "makeA") (result eqref) + struct.new_default $a + ) + (func (export "makeB") (result eqref) + struct.new_default $b + ) + (func (export "makeC") (result eqref) + struct.new_default $c + ) + )`).exports; + let a = makeA(); + + let b = makeB(); + assertEq(wasmGcReadField(b, 0), 0); + assertEq(wasmGcReadField(b, 1), 0); + + let c = makeC(); + assertEq(wasmGcReadField(c, 0), null); +} + +// struct.new_default: valid if all struct fields are defaultable + +wasmFailValidateText(`(module + (type $a (struct (field (ref $a)))) + (func + struct.new_default $a + ) +)`, /defaultable/); + +wasmFailValidateText(`(module + (type $a (struct (field i32) (field i32) (field (ref $a)))) + (func + struct.new_default $a + ) +)`, /defaultable/); + +// Negative tests + +// Attempting to mutate immutable field with struct.set + +assertErrorMessage(() => wasmEvalText( + `(module + (type $node (struct (field i32))) + (func $f (param $p (ref null $node)) + (struct.set $node 0 (local.get $p) (i32.const 37))))`), + WebAssembly.CompileError, + /field is not mutable/); + +// Attempting to store incompatible value in mutable field with struct.set + +assertErrorMessage(() => wasmEvalText( + `(module + (type $node (struct (field (mut i32)))) + (func $f (param $p (ref null $node)) + (struct.set $node 0 (local.get $p) (f32.const 37))))`), + WebAssembly.CompileError, + /expression has type f32 but expected i32/); + +// Out-of-bounds reference for struct.get + +assertErrorMessage(() => wasmEvalText( + `(module + (type $node (struct (field i32))) + (func $f (param $p (ref null $node)) (result i32) + (struct.get $node 1 (local.get $p))))`), + WebAssembly.CompileError, + /field index out of range/); + +// Out-of-bounds reference for struct.set + +assertErrorMessage(() => wasmEvalText( + `(module + (type $node (struct (field (mut i32)))) + (func $f (param $p (ref null $node)) + (struct.set $node 1 (local.get $p) (i32.const 37))))`), + WebAssembly.CompileError, + /field index out of range/); + +// Base pointer is of unrelated type to stated type in struct.get + +assertErrorMessage(() => wasmEvalText( + `(module + (type $node (struct (field i32))) + (type $snort (struct (field f64))) + (func $f (param $p (ref null $snort)) (result i32) + (struct.get $node 0 (local.get $p))))`), + WebAssembly.CompileError, + /expression has type.*but expected.*/); + +// Base pointer is of unrelated type to stated type in struct.set + +assertErrorMessage(() => wasmEvalText( + `(module + (type $node (struct (field (mut i32)))) + (type $snort (struct (field f64))) + (func $f (param $p (ref null $snort)) (result i32) + (struct.set $node 0 (local.get $p) (i32.const 0))))`), + WebAssembly.CompileError, + /expression has type.*but expected.*/); + +// Null pointer dereference in struct.get + +assertErrorMessage(function() { + let ins = wasmEvalText( + `(module + (type $node (struct (field i32))) + (func (export "test") + (drop (call $f (ref.null $node)))) + (func $f (param $p (ref null $node)) (result i32) + (struct.get $node 0 (local.get $p))))`); + ins.exports.test(); +}, + WebAssembly.RuntimeError, + /dereferencing null pointer/); + +// Null pointer dereference in struct.set + +assertErrorMessage(function() { + let ins = wasmEvalText( + `(module + (type $node (struct (field (mut i32)))) + (func (export "test") + (call $f (ref.null $node))) + (func $f (param $p (ref null $node)) + (struct.set $node 0 (local.get $p) (i32.const 0))))`); + ins.exports.test(); +}, + WebAssembly.RuntimeError, + /dereferencing null pointer/); diff --git a/js/src/jit-test/tests/wasm/gc/ref.js b/js/src/jit-test/tests/wasm/gc/ref.js new file mode 100644 index 0000000000..a55b0c8f02 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/ref.js @@ -0,0 +1,202 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Parsing and resolving. + +var text = `(module + (rec + (type $cons (struct + (field $car i32) + (field $cdr (ref null $cons)))) + + (type $odd (struct + (field $odd.x i32) + (field $to_even (ref null $even)))) + + (type $even (struct + (field $even.x i32) + (field $to_odd (ref null $odd)))) + ) + + ;; Use eqref on the API since struct types cannot be exposed outside the module yet. + + (import "m" "f" (func $imp (param eqref) (result eqref))) + + ;; The bodies do nothing since we have no operations on structs yet. + ;; Note none of these functions are exported, as they use Ref types in their signatures. + + (func (param (ref null $cons)) (result i32) + (i32.const 0)) + + (func $cdr (param $p (ref null $cons)) (result (ref null $cons)) + (local $l (ref null $cons)) + ;; store null value of correct type + (local.set $l (ref.null $cons)) + ;; store local of correct type + (local.set $l (local.get $p)) + ;; store call result of correct type + (local.set $l (call $cdr (local.get $p))) + ;; TODO: eventually also a test with global.get + ;; blocks and if with result type + (block (result (ref null $cons)) + (if (result (ref null $cons)) (i32.eqz (i32.const 0)) + (then (unreachable)) + (else (ref.null $cons))))) + + (func (param (ref null $even)) (result (ref null $odd)) + (ref.null $odd)) + + (func (param (ref null $odd)) (result (ref null $even)) + (ref.null $even)) + + (func (param (ref null $cons)) + (call $cdr (local.get 0)) + drop + (call $imp (local.get 0)) + drop) + + (func (param (ref null $cons)) + (drop (ref.eq (local.get 0) (ref.null $cons))) + (drop (ref.eq (ref.null $cons) (local.get 0))) + (drop (ref.eq (local.get 0) (ref.null $cons))) + (drop (ref.eq (ref.null $cons) (local.get 0)))) + )`; + +// Validation + +wasmValidateText(text); + +// ref.is_null should work on any reference type + +new WebAssembly.Module(wasmTextToBinary(` +(module + (type $s (struct)) + (func $null (param (ref null $s)) (result i32) + (ref.is_null (local.get 0)))) +`)) + +// Automatic upcast to eqref + +new WebAssembly.Module(wasmTextToBinary(` +(module + (type $s (struct (field i32))) + (func $f (param (ref null $s)) (call $g (local.get 0))) + (func $g (param eqref) (unreachable))) +`)); + +// Misc failure modes + +assertErrorMessage(() => wasmEvalText(` +(module + (func (param (ref null $odd)) (unreachable))) +`), +SyntaxError, /failed to find name/); + +// Ref type mismatch in parameter is allowed through the prefix rule +// but not if the structs are incompatible. + +wasmEvalText(` +(module + (type $s (struct (field i32))) + (type $t (struct (field i32))) + (func $f (param (ref null $s)) (unreachable)) + (func $g (param (ref null $t)) (call $f (local.get 0))) +)`); + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (struct (field i32))) + (type $t (struct (field f32))) ;; Incompatible type + (func $f (param (ref null $s)) (unreachable)) + (func $g (param (ref null $t)) (call $f (local.get 0))) +)`), +WebAssembly.CompileError, /expression has type \(ref null.*\) but expected \(ref null.*\)/); + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (struct (field i32))) + (type $t (struct (field (mut i32)))) ;; Incompatible mutability + (func $f (param (ref null $s)) (unreachable)) + (func $g (param (ref null $t)) (call $f (local.get 0))) +)`), +WebAssembly.CompileError, /expression has type \(ref null.*\) but expected \(ref null.*\)/); + +// Ref type mismatch in assignment to local but the prefix rule allows +// the assignment to succeed if the structs are the same. + +wasmEvalText(` +(module + (type $s (struct (field i32))) + (type $t (struct (field i32))) + (func $f (param (ref null $s)) (local (ref null $t)) (local.set 1 (local.get 0)))) +`) + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (struct (field i32))) + (type $t (struct (field f32))) + (func $f (param (ref null $s)) (local (ref null $t)) (local.set 1 (local.get 0)))) +`), +WebAssembly.CompileError, /expression has type \(ref null.*\) but expected \(ref null.*\)/); + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (struct (field i32))) + (type $t (struct (field (mut i32)))) + (func $f (param (ref null $s)) (unreachable)) + (func $g (param (ref null $t)) (call $f (local.get 0))) +)`), +WebAssembly.CompileError, /expression has type \(ref null.*\) but expected \(ref null.*\)/); + +// Ref type mismatch in return but the prefix rule allows the return +// to succeed if the structs are the same. + +wasmEvalText(` +(module + (type $s (struct (field i32))) + (type $t (struct (field i32))) + (func $f (param (ref null $s)) (result (ref null $t)) (local.get 0))) +`); + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (struct (field i32))) + (type $t (struct (field f32))) + (func $f (param (ref null $s)) (result (ref null $t)) (local.get 0))) +`), +WebAssembly.CompileError, /expression has type \(ref null.*\) but expected \(ref null.*\)/); + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (struct (field i32))) + (type $t (struct (field (mut i32)))) + (func $f (param (ref null $s)) (result (ref null $t)) (local.get 0))) +`), +WebAssembly.CompileError, /expression has type \(ref null.*\) but expected \(ref null.*\)/); + +if (!wasmFunctionReferencesEnabled()) { + // Ref type can't reference a function type + + assertErrorMessage(() => wasmEvalText(` +(module + (type $x (func (param i32))) + (func $f (param (ref null $x)) (unreachable))) +`), + WebAssembly.CompileError, /does not reference a gc type/); + + assertErrorMessage(() => wasmEvalText(` +(module + (type (func (param i32))) + (func $f (param (ref null 0)) (unreachable))) +`), + WebAssembly.CompileError, /does not reference a gc type/); +} + +// No automatic downcast from eqref + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (struct (field i32))) + (func $f (param eqref) (call $g (local.get 0))) + (func $g (param (ref null $s)) (unreachable))) +`), +WebAssembly.CompileError, /expression has type eqref but expected \(ref null.*\)/); diff --git a/js/src/jit-test/tests/wasm/gc/regress-1633355.js b/js/src/jit-test/tests/wasm/gc/regress-1633355.js new file mode 100644 index 0000000000..97c611efd8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/regress-1633355.js @@ -0,0 +1,30 @@ +// |jit-test| skip-if: !wasmGcEnabled() || wasmCompileMode().includes("ion") + +load(libdir + "asserts.js"); + +var g23 = newGlobal({newCompartment: true}); +g23.parent = this; +g23.eval(` + var dbg = new Debugger(parent); + dbg.onEnterFrame = function(frame) {} +`); +let bin = wasmTextToBinary(` + (type $wabbit (struct + (field $x (mut i32)) + (field $left (mut (ref null $wabbit))) + (field $right (mut (ref null $wabbit))) + )) + (global $g (mut (ref null $wabbit)) (ref.null $wabbit)) + (func (export "init") (param $n i32) + (global.set $g (call $make (local.get $n))) + ) + (func $make (param $n i32) (result (ref null $wabbit)) + (local $tmp i32) + (struct.new $wabbit (local.get $tmp) (ref.null $wabbit) (ref.null $wabbit)) + ) +`); +let mod = new WebAssembly.Module(bin); +let ins = new WebAssembly.Instance(mod).exports; + +// Debugger can handle non-exposable fields, like (ref T). +ins.init(6) diff --git a/js/src/jit-test/tests/wasm/gc/regress-1739330.js b/js/src/jit-test/tests/wasm/gc/regress-1739330.js new file mode 100644 index 0000000000..99e519d2d9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/regress-1739330.js @@ -0,0 +1,23 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +try { + gczeal(4); + function a(b) { + binary = wasmTextToBinary(b) + c = new WebAssembly.Module(binary) + return new WebAssembly.Instance(c) + } + d = []; + let { newStruct } = a(` + (type $e (struct)) + (func (export "newStruct") + (result eqref) + struct.new $e + ) + `).exports + d.push(newStruct()); + gczeal(14, 7); + throw d; +} catch (d) { + assertEq(d instanceof Array, true); +} diff --git a/js/src/jit-test/tests/wasm/gc/regress-1745391.js b/js/src/jit-test/tests/wasm/gc/regress-1745391.js new file mode 100644 index 0000000000..5ea8989d3e --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/regress-1745391.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +let { createDefault } = wasmEvalText(` + (module (type $a (array (mut i32))) + (func (export "createDefault") (param i32) (result eqref) + local.get 0 + array.new_default $a + ) + ) +`).exports; +for (len = -1; len > -100; len--) { + assertErrorMessage(() => createDefault(len), WebAssembly.RuntimeError, /too many array elements/); +} diff --git a/js/src/jit-test/tests/wasm/gc/regress-1754701.js b/js/src/jit-test/tests/wasm/gc/regress-1754701.js new file mode 100644 index 0000000000..656aa5d625 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/regress-1754701.js @@ -0,0 +1,30 @@ +// |jit-test| skip-if: !wasmGcEnabled() || !('oomTest' in this) + +let { testArray, testStructInline, testStructOutline } = wasmEvalText(` + (module + (type $array (array i32)) + (type $structInline (struct)) + (type $structOutline + (struct + ${`(field i32)`.repeat(100)} + ) + ) + (func (export "testArray") + (param i32) + (result eqref) + local.get 0 + array.new_default $array + ) + (func (export "testStructInline") + (result eqref) + struct.new_default $structInline + ) + (func (export "testStructOutline") + (result eqref) + struct.new_default $structOutline + ) + ) +`).exports +oomTest(() => testArray(1)); +oomTest(() => testStructInline()); +oomTest(() => testStructOutline()); diff --git a/js/src/jit-test/tests/wasm/gc/regress-1830975.js b/js/src/jit-test/tests/wasm/gc/regress-1830975.js new file mode 100644 index 0000000000..53bd663ce0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/regress-1830975.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +const { test } = wasmEvalText(` + (module + (type $f (func (result i32))) + (func (export "test") (type $f) + ref.null $f + ref.test (ref null $f) + ) + ) +`).exports; +assertEq(test(), 1); diff --git a/js/src/jit-test/tests/wasm/gc/regress-outline-repr.js b/js/src/jit-test/tests/wasm/gc/regress-outline-repr.js new file mode 100644 index 0000000000..9cd4d21143 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/regress-outline-repr.js @@ -0,0 +1,151 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// White-box test for bug 1617908. The significance of this test is that the +// type $S is too large to fit in an inline WasmGcObject, and the write barrier +// logic must take this into account when storing the (ref $S2) into the last +// field of the object. + +const wat = ` +(module + (type $S2 (sub (struct))) + (type $S (sub $S2 + (struct + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut eqref))))) + + (func $main + (struct.set $S 18 + (struct.new $S + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (ref.null eq)) + (struct.new $S2))) + (start $main)) +` +wasmEvalText(wat); + +// Test subtyping across outline/inline representations works + +wasmEvalText(` +(module + (type $inline + (sub (struct + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + ))) + (type $outline (sub $inline + (struct + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64)) + (field (mut i64))))) + + (func $main + (local $outline (ref null $outline)) + (local $inline (ref null $inline)) + + (; create an outline object and acquire multiple views to it ;) + (struct.new $outline + (i64.const 0xFF) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0) + (i64.const 0)) + local.tee $outline + local.set $inline + + (; clobber the object header ;) + (struct.set $inline 0 + local.get $inline + i64.const 0 + ) + (struct.set $inline 1 + local.get $inline + i64.const 0 + ) + (struct.set $inline 2 + local.get $inline + i64.const 0 + ) + (struct.set $inline 3 + local.get $inline + i64.const 0 + ) + (struct.set $inline 4 + local.get $inline + i64.const 0 + ) + + (; try to read a field ;) + (struct.get $outline 0 + local.get $outline + ) + drop + ) + (start $main)) +`); diff --git a/js/src/jit-test/tests/wasm/gc/signal-null-check.js b/js/src/jit-test/tests/wasm/gc/signal-null-check.js new file mode 100644 index 0000000000..a69b8dc600 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/signal-null-check.js @@ -0,0 +1,180 @@ +// |jit-test| skip-if: !wasmGcEnabled() +// +// Checks if null dereference works. + +for (let [fieldType, signedness, defaultValue] of [ + ['i8', '_u', 'i32.const 42'], + ['i8', '_s', 'i32.const -42'], + ['i16', '_u', 'i32.const 1'], + ['i16', '_s', 'i32.const -1'], + ['i32', '', 'i32.const 3'], + ['i64', '', 'i64.const -77777777777'], + ['f32', '', 'f32.const 1.4'], + ['f64', '', 'f64.const 3.14'], + ['externref', '', 'ref.null extern'], +].concat( + wasmSimdEnabled() ? [['v128', '', 'v128.const i32x4 1 2 -3 4']] : [] +)) { + // Check struct.get from null struct of a field of fieldType works + // Check struct.set similarly + testStructGetSet(fieldType, signedness, defaultValue, 4); + // - Also when the field is in the outline_ data area? + testStructGetSet(fieldType, signedness, defaultValue, 1000); + // Check array.get similarly + // Check array.set from null array with element of type fieldType + testArrayGetSet(fieldType, signedness, defaultValue, 100); +} + +function testStructGetSet(fieldType, signedness, defaultValue, numFields) { + const ins = wasmEvalText(` +(module + (type $t (struct ${ + Array(numFields).fill("(field (mut " + fieldType + "))").join(' ') + })) + (global $g (mut (ref null $t)) (ref.null $t)) + (func (export "init-null") + ref.null $t + global.set $g + ) + (func (export "init-non-null") + ${ Array(numFields).fill(defaultValue).join('\n ') } + struct.new $t + global.set $g + ) + (func (export "test_get_first") + global.get $g + struct.get${signedness} $t 0 + drop + ) + (func (export "test_set_first") + global.get $g + ${defaultValue} + struct.set $t 0 + ) + (func (export "test_get_mid") + global.get $g + struct.get${signedness} $t ${numFields >> 1} + drop + ) + (func (export "test_set_mid") + global.get $g + ${defaultValue} + struct.set $t ${numFields >> 1} + ) + (func (export "test_get_last") + global.get $g + struct.get${signedness} $t ${numFields - 1} + drop + ) + (func (export "test_set_last") + global.get $g + ${defaultValue} + struct.set $t ${numFields - 1} + ) +)`); + ins.exports["init-non-null"](); + ins.exports["test_get_first"](); + ins.exports["test_get_mid"](); + ins.exports["test_get_last"](); + ins.exports["test_set_first"](); + ins.exports["test_set_mid"](); + ins.exports["test_set_last"](); + + ins.exports["init-null"](); + assertDereferenceNull(() => ins.exports["test_get_first"]()); + assertDereferenceNull(() => ins.exports["test_get_mid"]()); + assertDereferenceNull(() => ins.exports["test_get_last"]()); + assertDereferenceNull(() => ins.exports["test_set_first"]()); + assertDereferenceNull(() => ins.exports["test_set_mid"]()); + assertDereferenceNull(() => ins.exports["test_set_last"]()); + + ins.exports["init-non-null"](); + ins.exports["test_set_last"](); + ins.exports["test_get_first"](); +} + +function testArrayGetSet(fieldType, signedness, defaultValue, numItems) { + const ins = wasmEvalText(` +(module + (type $t (array (mut ${fieldType}))) + (global $g (mut (ref null $t)) (ref.null $t)) + (func (export "init-null") + ref.null $t + global.set $g + ) + (func (export "init-non-null") + ${defaultValue} + i32.const ${numItems} + array.new $t + global.set $g + ) + (func (export "test_get") (param i32) + global.get $g + local.get 0 + array.get${signedness} $t + drop + ) + (func (export "test_set") (param i32) + global.get $g + local.get 0 + ${defaultValue} + array.set $t + ) +)`); + ins.exports["init-non-null"](); + ins.exports["test_get"](0); + ins.exports["test_get"](numItems >> 1); + ins.exports["test_get"](numItems - 1); + ins.exports["test_set"](0); + ins.exports["test_set"](numItems >> 1); + ins.exports["test_set"](numItems - 1); + + ins.exports["init-null"](); + assertDereferenceNull(() => ins.exports["test_get"](0)); + assertDereferenceNull(() => ins.exports["test_get"](numItems >> 1)); + assertDereferenceNull(() => ins.exports["test_get"](numItems - 1)); + assertDereferenceNull(() => ins.exports["test_set"](0)); + assertDereferenceNull(() => ins.exports["test_set"](numItems >> 1)); + assertDereferenceNull(() => ins.exports["test_set"](numItems - 1)); + + ins.exports["init-non-null"](); + ins.exports["test_set"](3); + ins.exports["test_get"](0); +} + + +function assertDereferenceNull(fun) { + assertErrorMessage(fun, WebAssembly.RuntimeError, /dereferencing null pointer/); +} + +// Linear memory loads/stores from small constant addresses also require +// trapsites, it seems. So check that the following is compilable -- in +// particular, that it doesn't produce any TrapSite placement validation errors. + +const ins = wasmEvalText(` + (module + (memory 1) + (func (result i32) (i32.load8_s (i32.const 17))) + (func (result i32) (i32.load8_u (i32.const 17))) + (func (result i32) (i32.load16_s (i32.const 17))) + (func (result i32) (i32.load16_u (i32.const 17))) + + (func (result i64) (i64.load8_s (i32.const 17))) + (func (result i64) (i64.load8_u (i32.const 17))) + (func (result i64) (i64.load16_s (i32.const 17))) + (func (result i64) (i64.load16_u (i32.const 17))) + + (func (result i64) (i64.load32_s (i32.const 17))) + (func (result i64) (i64.load32_u (i32.const 17))) + + (func (param i32) (i32.store8 (i32.const 17) (local.get 0))) + (func (param i32) (i32.store16 (i32.const 17) (local.get 0))) + + (func (param i64) (i64.store8 (i32.const 17) (local.get 0))) + (func (param i64) (i64.store16 (i32.const 17) (local.get 0))) + (func (param i64) (i64.store32 (i32.const 17) (local.get 0))) + + (func (export "leet") (result i32) (i32.const 1337)) + )`); + +assertEq(ins.exports["leet"](), 1337); diff --git a/js/src/jit-test/tests/wasm/gc/structs.js b/js/src/jit-test/tests/wasm/gc/structs.js new file mode 100644 index 0000000000..0ff0cbd4b4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/structs.js @@ -0,0 +1,742 @@ +// |jit-test| skip-if: !wasmGcEnabled(); test-also=--gc-zeal=2 + +// This tests a bunch of wasm struct stuff, but not i8 or i16 fields. +// See structs2.js for i8/i16 field tests. + +var bin = wasmTextToBinary( + `(module + (func $x1 (import "m" "x1") (type $f1)) + (func $x2 (import "m" "x2") (type $f2)) + + (table 2 funcref) + (elem (i32.const 0) $doit $doitagain) + + ;; Type array has a mix of types + + (type $f1 (func (param i32) (result i32))) + + (type $point (struct + (field $point_x i32) + (field $point_y i32))) + + (type $f2 (func (param f64) (result f64))) + + (type $int_node (struct + (field $intbox_val (mut i32)) + (field $intbox_next (mut externref)))) + + ;; Test all the types. + + (type $omni (struct + (field $omni_i32 i32) + (field $omni_i32m (mut i32)) + (field $omni_i64 i64) + (field $omni_i64m (mut i64)) + (field $omni_f32 f32) + (field $omni_f32m (mut f32)) + (field $omni_f64 f64) + (field $omni_f64m (mut f64)) + (field $omni_externref externref) + (field $omni_externrefm (mut externref)))) + + ;; Various ways to reference a type in the middle of the + ;; type array, make sure we get the right one + + (func (export "hello") (param f64) (param i32) (result f64) + (call_indirect (type $f2) (local.get 0) (local.get 1))) + + (func $doit (param f64) (result f64) + (f64.sqrt (local.get 0))) + + (func $doitagain (param f64) (result f64) + (f64.mul (local.get 0) (local.get 0))) + + (func (export "x1") (param i32) (result i32) + (call $x1 (local.get 0))) + + (func (export "x2") (param f64) (result f64) + (call $x2 (local.get 0))) + + ;; Useful for testing to ensure that the type is not type #0 here. + + (func (export "mk_point") (result eqref) + (struct.new $point (i32.const 37) (i32.const 42))) + + (func (export "mk_int_node") (param i32) (param externref) (result eqref) + (struct.new $int_node (local.get 0) (local.get 1))) + + ;; Too big to fit in an inline WasmGcObject. + + (type $bigger (struct + (field $a i32) + (field $b i32) + (field $c i32) + (field $d i32) + (field $e i32) + (field $f i32) + (field $g i32) + (field $h i32) + (field $i i32) + (field $j i32) + (field $k i32) + (field $l i32) + (field $m i32) + (field $n i32) + (field $o i32) + (field $p i32) + (field $q i32) + (field $r i32) + (field $s i32) + (field $t i32) + (field $u i32) + (field $v i32) + (field $w i32) + (field $x i32) + (field $y i32) + (field $z i32) + (field $aa i32) + (field $ab i32) + (field $ac i32) + (field $ad i32) + (field $ae i32) + (field $af i32) + (field $ag i32) + (field $ah i32) + (field $ai i32) + (field $aj i32) + (field $ak i32) + (field $al i32) + (field $am i32) + (field $an i32) + (field $ao i32) + (field $ap i32) + (field $aq i32) + (field $ar i32) + (field $as i32) + (field $at i32) + (field $au i32) + (field $av i32) + (field $aw i32) + (field $ax i32) + (field $ay i32) + (field $az i32))) + + (func (export "mk_bigger") (result eqref) + (struct.new $bigger + (i32.const 0) + (i32.const 1) + (i32.const 2) + (i32.const 3) + (i32.const 4) + (i32.const 5) + (i32.const 6) + (i32.const 7) + (i32.const 8) + (i32.const 9) + (i32.const 10) + (i32.const 11) + (i32.const 12) + (i32.const 13) + (i32.const 14) + (i32.const 15) + (i32.const 16) + (i32.const 17) + (i32.const 18) + (i32.const 19) + (i32.const 20) + (i32.const 21) + (i32.const 22) + (i32.const 23) + (i32.const 24) + (i32.const 25) + (i32.const 26) + (i32.const 27) + (i32.const 28) + (i32.const 29) + (i32.const 30) + (i32.const 31) + (i32.const 32) + (i32.const 33) + (i32.const 34) + (i32.const 35) + (i32.const 36) + (i32.const 37) + (i32.const 38) + (i32.const 39) + (i32.const 40) + (i32.const 41) + (i32.const 42) + (i32.const 43) + (i32.const 44) + (i32.const 45) + (i32.const 46) + (i32.const 47) + (i32.const 48) + (i32.const 49) + (i32.const 50) + (i32.const 51))) + + (type $withfloats (struct + (field $f1 f32) + (field $f2 f64) + (field $f3 externref) + (field $f4 f32) + (field $f5 i32))) + + (func (export "mk_withfloats") + (param f32) (param f64) (param externref) (param f32) (param i32) + (result eqref) + (struct.new $withfloats (local.get 0) (local.get 1) (local.get 2) (local.get 3) (local.get 4))) + + )`) + +var mod = new WebAssembly.Module(bin); +var ins = new WebAssembly.Instance(mod, {m:{x1(x){ return x*3 }, x2(x){ return Math.PI }}}).exports; + +assertEq(ins.hello(4.0, 0), 2.0) +assertEq(ins.hello(4.0, 1), 16.0) + +assertEq(ins.x1(12), 36) +assertEq(ins.x2(8), Math.PI) + +var point = ins.mk_point(); +assertEq(wasmGcReadField(point, 0), 37); +assertEq(wasmGcReadField(point, 1), 42); + +var int_node = ins.mk_int_node(78, point); +assertEq(wasmGcReadField(int_node, 0), 78); +assertEq(wasmGcReadField(int_node, 1), point); + +var bigger = ins.mk_bigger(); +for ( let i=0; i < 52; i++ ) + assertEq(wasmGcReadField(bigger, i), i); + +var withfloats = ins.mk_withfloats(1/3, Math.PI, bigger, 5/6, 0x1337); +assertEq(wasmGcReadField(withfloats, 0), Math.fround(1/3)); +assertEq(wasmGcReadField(withfloats, 1), Math.PI); +assertEq(wasmGcReadField(withfloats, 2), bigger); +assertEq(wasmGcReadField(withfloats, 3), Math.fround(5/6)); +assertEq(wasmGcReadField(withfloats, 4), 0x1337); + +// A simple stress test + +var stress = wasmTextToBinary( + `(module + (type $node (struct (field i32) (field (ref null $node)))) + (func (export "iota1") (param $n i32) (result eqref) + (local $list (ref null $node)) + (block $exit + (loop $loop + (br_if $exit (i32.eqz (local.get $n))) + (local.set $list (struct.new $node (local.get $n) (local.get $list))) + (local.set $n (i32.sub (local.get $n) (i32.const 1))) + (br $loop))) + (local.get $list)))`); +var stressIns = new WebAssembly.Instance(new WebAssembly.Module(stress)).exports; +var stressLevel = + getBuildConfiguration("x64") && !getBuildConfiguration("tsan") && + !getBuildConfiguration("asan") && !getBuildConfiguration("valgrind") + ? 100000 + : 1000; +var the_list = stressIns.iota1(stressLevel); +for (let i=1; i <= stressLevel; i++) { + assertEq(wasmGcReadField(the_list, 0), i); + the_list = wasmGcReadField(the_list, 1); +} +assertEq(the_list, null); + +// Fields and their exposure in JS. We can't export types yet so hide them +// inside the module with globals. + +// i64 fields. + +{ + let txt = + `(module + (type $big (struct + (field (mut i32)) + (field (mut i64)) + (field (mut i32)))) + + (func (export "set") (param eqref) + (local (ref null $big)) + (local.set 1 (ref.cast (ref null $big) (local.get 0))) + (struct.set $big 1 (local.get 1) (i64.const 0x3333333376544567))) + + (func (export "set2") (param $p eqref) + (struct.set $big 1 + (ref.cast (ref null $big) (local.get $p)) + (i64.const 0x3141592653589793))) + + (func (export "low") (param $p eqref) (result i32) + (i32.wrap_i64 (struct.get $big 1 (ref.cast (ref null $big) (local.get $p))))) + + (func (export "high") (param $p eqref) (result i32) + (i32.wrap_i64 (i64.shr_u + (struct.get $big 1 (ref.cast (ref null $big) (local.get $p))) + (i64.const 32)))) + + (func (export "mk") (result eqref) + (struct.new $big (i32.const 0x7aaaaaaa) (i64.const 0x4201020337) (i32.const 0x6bbbbbbb))) + + )`; + + let ins = wasmEvalText(txt).exports; + + let v = ins.mk(); + assertEq(typeof v, "object"); + assertEq(wasmGcReadField(v, 0), 0x7aaaaaaa); + assertEq(wasmGcReadField(v, 1), 0x4201020337n); + assertEq(ins.low(v), 0x01020337); + assertEq(ins.high(v), 0x42); + assertEq(wasmGcReadField(v, 2), 0x6bbbbbbb); + + ins.set(v); + assertEq(wasmGcReadField(v, 0), 0x7aaaaaaa); + assertEq(wasmGcReadField(v, 1), 0x3333333376544567n); + assertEq(wasmGcReadField(v, 2), 0x6bbbbbbb); + + ins.set2(v); + assertEq(wasmGcReadField(v, 1), 0x3141592653589793n); + assertEq(ins.low(v), 0x53589793); + assertEq(ins.high(v), 0x31415926) +} + +{ + let txt = + `(module + (type $big (struct + (field (mut i32)) + (field (mut i64)) + (field (mut i32)))) + + (global $g (mut (ref null $big)) (ref.null $big)) + + (func (export "make") (result eqref) + (global.set $g + (struct.new $big (i32.const 0x7aaaaaaa) (i64.const 0x4201020337) (i32.const 0x6bbbbbbb))) + (global.get $g)) + + (func (export "update0") (param $x i32) + (struct.set $big 0 (global.get $g) (local.get $x))) + + (func (export "get0") (result i32) + (struct.get $big 0 (global.get $g))) + + (func (export "update1") (param $hi i32) (param $lo i32) + (struct.set $big 1 (global.get $g) + (i64.or + (i64.shl (i64.extend_i32_u (local.get $hi)) (i64.const 32)) + (i64.extend_i32_u (local.get $lo))))) + + (func (export "get1_low") (result i32) + (i32.wrap_i64 (struct.get $big 1 (global.get $g)))) + + (func (export "get1_high") (result i32) + (i32.wrap_i64 + (i64.shr_u (struct.get $big 1 (global.get $g)) (i64.const 32)))) + + (func (export "update2") (param $x i32) + (struct.set $big 2 (global.get $g) (local.get $x))) + + (func (export "get2") (result i32) + (struct.get $big 2 (global.get $g))) + + )`; + + let ins = wasmEvalText(txt).exports; + + let v = ins.make(); + assertEq(wasmGcReadField(v, 0), 0x7aaaaaaa); + assertEq(wasmGcReadField(v, 1), 0x4201020337n); + assertEq(wasmGcReadField(v, 2), 0x6bbbbbbb); + + ins.update0(0x45367101); + assertEq(wasmGcReadField(v, 0), 0x45367101); + assertEq(ins.get0(), 0x45367101); + assertEq(wasmGcReadField(v, 1), 0x4201020337n); + assertEq(wasmGcReadField(v, 2), 0x6bbbbbbb); + + ins.update2(0x62345123); + assertEq(wasmGcReadField(v, 0), 0x45367101); + assertEq(wasmGcReadField(v, 1), 0x4201020337n); + assertEq(ins.get2(), 0x62345123); + assertEq(wasmGcReadField(v, 2), 0x62345123); + + ins.update1(0x77777777, 0x22222222); + assertEq(wasmGcReadField(v, 0), 0x45367101); + assertEq(ins.get1_low(), 0x22222222); + assertEq(ins.get1_high(), 0x77777777); + assertEq(wasmGcReadField(v, 1), 0x7777777722222222n); + assertEq(wasmGcReadField(v, 2), 0x62345123); +} + + +var bin = wasmTextToBinary( + `(module + (type $cons (struct (field i32) (field (ref null $cons)))) + + (global $g (mut (ref null $cons)) (ref.null $cons)) + + (func (export "push") (param i32) + (global.set $g (struct.new $cons (local.get 0) (global.get $g)))) + + (func (export "top") (result i32) + (struct.get $cons 0 (global.get $g))) + + (func (export "pop") + (global.set $g (struct.get $cons 1 (global.get $g)))) + + (func (export "is_empty") (result i32) + (ref.is_null (global.get $g))) + + )`); + +var mod = new WebAssembly.Module(bin); +var ins = new WebAssembly.Instance(mod).exports; +ins.push(37); +ins.push(42); +ins.push(86); +assertEq(ins.top(), 86); +ins.pop(); +assertEq(ins.top(), 42); +ins.pop(); +assertEq(ins.top(), 37); +ins.pop(); +assertEq(ins.is_empty(), 1); +assertErrorMessage(() => ins.pop(), + WebAssembly.RuntimeError, + /dereferencing null pointer/); + +// Check that a wrapped object cannot be passed as an eqref even if the wrapper +// points to the right type. This is a temporary restriction, until we're able +// to avoid dealing with wrappers inside the engine. + +{ + var ins = wasmEvalText( + `(module + (type $Node (struct (field i32))) + (func (export "mk") (result eqref) + (struct.new $Node (i32.const 37))) + (func (export "f") (param $n eqref) (result eqref) + (ref.cast (ref null $Node) (local.get $n))))`).exports; + var n = ins.mk(); + assertEq(ins.f(n), n); + assertErrorMessage(() => ins.f(wrapWithProto(n, {})), TypeError, /can only pass a WebAssembly GC object/); +} + +// Field names. + +// Test that names map to the right fields. + +{ + let ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + `(module + (type $s (struct + (field $x i32) + (field $y i32))) + + (func $f (param $p (ref null $s)) (result i32) + (struct.get $s $x (local.get $p))) + + (func $g (param $p (ref null $s)) (result i32) + (struct.get $s $y (local.get $p))) + + (func (export "testf") (param $n i32) (result i32) + (call $f (struct.new $s (local.get $n) (i32.mul (local.get $n) (i32.const 2))))) + + (func (export "testg") (param $n i32) (result i32) + (call $g (struct.new $s (local.get $n) (i32.mul (local.get $n) (i32.const 2))))) + + )`))).exports; + + assertEq(ins.testf(10), 10); + assertEq(ins.testg(10), 20); +} + +// negative tests + +// Wrong type passed as initializer + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(` +(module + (type $r (struct (field i32))) + (func $f (param f64) (result eqref) + (struct.new $r (local.get 0))) +)`)), +WebAssembly.CompileError, /type mismatch/); + +// Too few values passed for initializer + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(` +(module + (type $r (struct (field i32) (field i32))) + (func $f (result eqref) + (struct.new $r (i32.const 0))) +)`)), +WebAssembly.CompileError, /popping value from empty stack/); + +// Too many values passed for initializer, sort of + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(` +(module + (type $r (struct (field i32) (field i32))) + (func $f (result eqref) + (i32.const 0) + (i32.const 1) + (i32.const 2) + struct.new $r) +)`)), +WebAssembly.CompileError, /unused values/); + +// Not referencing a structure type + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(` +(module + (type (func (param i32) (result i32))) + (func $f (result eqref) + (struct.new 0)) +)`)), +WebAssembly.CompileError, /not a struct type/); + +// Nominal type equivalence for structs, but the prefix rule allows this +// conversion to succeed. + +wasmEvalText(` + (module + (type $p (struct (field i32))) + (type $q (struct (field i32))) + (func $f (result (ref null $p)) + (struct.new $q (i32.const 0)))) +`); + +// The field name is optional, so this should work. + +wasmEvalText(` +(module + (type $s (struct (field i32)))) +`) + +// Empty structs are OK. + +wasmEvalText(` +(module + (type $s (struct))) +`) + +// Multiply defined structures. + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (struct (field $x i32))) + (type $s (struct (field $y i32)))) +`), +SyntaxError, /duplicate type identifier/); + +// Bogus type definition syntax. + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s)) +`), +SyntaxError, /wasm text error/); + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (field $x i32))) +`), +SyntaxError, /expected one of: `func`, `struct`, `array`/); + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (struct (field $x i31)))) +`), +SyntaxError, /wasm text error/); + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (struct (fjeld $x i32)))) +`), +SyntaxError, /wasm text error/); + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (struct abracadabra))) +`), +SyntaxError, /wasm text error/); + +// Function should not reference struct type: syntactic test + +assertErrorMessage(() => wasmEvalText(` +(module + (type $s (struct)) + (type $f (func (param i32) (result i32))) + (func (type 0) (param i32) (result i32) (unreachable))) +`), +WebAssembly.CompileError, /signature index references non-signature/); + +// Can't set immutable fields from JS + +{ + let ins = wasmEvalText( + `(module + (type $s (struct + (field i32) + (field (mut i64)))) + (func (export "make") (result eqref) + (struct.new $s (i32.const 37) (i64.const 42))))`).exports; + let v = ins.make(); + assertErrorMessage(() => v[0] = 12, TypeError, /can't modify/); + assertErrorMessage(() => v[1] = 12, TypeError, /can't modify/); +} + +// Function should not reference struct type: binary test + +var bad = new Uint8Array([0x00, 0x61, 0x73, 0x6d, + 0x01, 0x00, 0x00, 0x00, + + 0x01, // Type section + 0x03, // Section size + 0x01, // One type + 0x5f, // Struct + 0x00, // Zero fields + + 0x03, // Function section + 0x02, // Section size + 0x01, // One function + 0x00, // Type of function + + 0x0a, // Code section + 0x05, // Section size + 0x01, // One body + 0x03, // Body size + 0x00, // Zero locals + 0x00, // UNREACHABLE + 0x0b]); // END + +assertErrorMessage(() => new WebAssembly.Module(bad), + WebAssembly.CompileError, /signature index references non-signature/); + +// Exercise alias-analysis code for struct access +{ + let txt = + `(module + (type $meh (struct)) + (type $hasOOL (struct + ;; In-line storage + (field i64) (field i64) + (field $ILnonref (mut i64)) (field $ILref (mut eqref)) + (field i64) (field i64) (field i64) (field i64) + (field i64) (field i64) (field i64) (field i64) + (field i64) (field i64) (field i64) (field i64) + ;; Out-of-line storage (or maybe it starts earlier, but + ;; definitely not after this point). + (field $OOLnonref (mut i64)) (field $OOLref (mut eqref))) + ) + (func (export "create") (result eqref) + (struct.new $hasOOL + (i64.const 1) (i64.const 2) + (i64.const 9876) (ref.null $meh) + (i64.const 3) (i64.const 4) (i64.const 5) (i64.const 6) + (i64.const 7) (i64.const 8) (i64.const 9) (i64.const 10) + (i64.const 11) (i64.const 12) (i64.const 13) (i64.const 14) + (i64.const 4321) (ref.null $meh)) + ) + ;; Write to an OOL field, then an IL field, then to an OOL field, so + ;; that we can at least check (from inspection of the optimised MIR) + ;; that the GVN+alias analysis causes the OOL block pointer not to be + ;; reloaded for the second OOL write. First for non-ref fields .. + (func (export "threeSetsNonReffy") (param eqref) + (local (ref $hasOOL)) + (local.set 1 (ref.as_non_null (ref.cast (ref null $hasOOL) (local.get 0)))) + (struct.set $hasOOL 16 (local.get 1) (i64.const 1337)) ;; set $OOLnonref + (struct.set $hasOOL 2 (local.get 1) (i64.const 7331)) ;; set $ILnonref + (struct.set $hasOOL 16 (local.get 1) (i64.const 9009)) ;; set $OOLnonref + ) + ;; and the same for ref fields. + (func (export "threeSetsReffy") (param eqref) + (local (ref $hasOOL)) + (local.set 1 (ref.as_non_null (ref.cast (ref null $hasOOL) (local.get 0)))) + (struct.set $hasOOL 17 (local.get 1) (ref.null $meh)) ;; set $OOLref + (struct.set $hasOOL 3 (local.get 1) (ref.null $meh)) ;; set $ILref + (struct.set $hasOOL 17 (local.get 1) (ref.null $meh)) ;; set $OOLref + ) + )`; + let exports = wasmEvalText(txt).exports; +} + +////////////////////////////////////////////////////////////////////////////// +// +// Checks for requests to create structs with more than MaxStructFields, where +// MaxStructFields == 1000. + +function structNewOfManyFields(numFields) { + let defString = "(type $s (struct "; + for (i = 0; i < numFields; i++) { + defString += "(field i32) "; + } + defString += "))"; + + let insnString = "(struct.new $s "; + for (i = 0; i < numFields; i++) { + insnString += "(i32.const 1337) "; + } + insnString += ")"; + + return "(module " + + defString + + " (func (export \"create\") (result eqref) " + + insnString + + "))"; +} + +{ + // 10_000 fields is allowable + let exports = wasmEvalText(structNewOfManyFields(10000)).exports; + let s = exports.create(); + assertEq(s, s); +} +{ + // but 10_001 is not + assertErrorMessage(() => wasmEvalText(structNewOfManyFields(10001)), + WebAssembly.CompileError, + /too many fields in struct/); +} + +// FIXME: also check struct.new_default, once it is available in both compilers. + +// Exercise stack maps and GC +{ + // Zeal will cause us to allocate structs via instance call, requiring live registers + // to be spilled, and then GC values traced while on the stack. + gczeal(2, 1); + + { + const { test } = wasmEvalText(`(module + (type $s (struct (field i32))) + (func (export "test") (param i32) (result i32) + local.get 0 + (struct.new $s (i32.const 234)) + (struct.new $s (i32.const 345)) + drop + drop + ) + )`).exports; + assertEq(test(123), 123); + } + { + const { test } = wasmEvalText(`(module + (type $s (struct (field f32))) + (func (export "test") (param f32) (result f32) + local.get 0 + (struct.new $s (f32.const 234)) + (struct.new $s (f32.const 345)) + drop + drop + ) + )`).exports; + assertEq(test(123), 123); + } + + gczeal(0); +} diff --git a/js/src/jit-test/tests/wasm/gc/structs2.js b/js/src/jit-test/tests/wasm/gc/structs2.js new file mode 100644 index 0000000000..25651d7175 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/structs2.js @@ -0,0 +1,243 @@ +// |jit-test| skip-if: !wasmGcEnabled(); test-also=--gc-zeal=2 + +// This tests 8- and 16-bit field accesses for structs. + +// Check that struct.new writes for 8-bit fields do not overwrite subsequent +// data. Because the writes happen forwards in the address space, the only +// way I could think to do this is to force an 8-bit field to occupy the last +// byte of the OOL malloc'd block, and then hope that ASan runs in automation +// will pick up any overrun. I think it's impossible to test this from inside +// the JS+wasm universe. Hence the test is pretty pointless from a purely +// JS+wasm interpretation. +{ + let txt = + `(module + (type $hasOOL (struct + ;; In-line storage; 16 fields that preserve 16-alignment + (field i64) (field i64) (field i64) (field i64) ;; 32 + (field i64) (field i64) (field i64) (field i64) ;; 64 + (field i64) (field i64) (field i64) (field i64) ;; 96 + (field i64) (field i64) (field i64) (field i64) ;; 128 + ;; Out-of-line storage (or maybe it starts earlier, but + ;; definitely not after this point). 16 bytes on the + ;; basis that StructLayout::close will round the requested + ;; block size up to at max the next 16 byte boundary. + ;; The goal is that the last (field i8) is right at the + ;; end of the resulting malloc'd block, so that, if the + ;; struct.new initialisation code mistakenly initialises + ;; that field with a write larger than 8 bits, then we'll + ;; have a write off the end of the malloc'd block, which + ;; ASan automation runs should detect. + (field i8) (field i8) (field i8) (field i8) + (field i8) (field i8) (field i8) (field i8) + (field i8) (field i8) (field i8) (field i8) + (field i8) (field i8) (field i8) (field i8)) + ) + (func (export "build8") + (param $filler i64) (param $interesting i32) (result eqref) + (struct.new $hasOOL + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $interesting) (local.get $interesting) + (local.get $interesting) (local.get $interesting) + (local.get $interesting) (local.get $interesting) + (local.get $interesting) (local.get $interesting) + (local.get $interesting) (local.get $interesting) + (local.get $interesting) (local.get $interesting) + (local.get $interesting) (local.get $interesting) + (local.get $interesting) (local.get $interesting) + ) + ) + )`; + let exports = wasmEvalText(txt).exports; + let obj8 = exports.build8(0x1234n, 0x5678); + // The above call should trigger OOB writes if the struct.new field + // writes are too large, but those will only be visible if we're running + // on ASan or Valgrind. In any case, add a fake data dependency below, so + // that the construction of the object can't (so easily) be optimised away. + assertEq(wasmGcReadField(obj8, 0) + BigInt(wasmGcReadField(obj8, 31)), 0x12ACn); // == 0x1234 + 0x78 +} + +// And exactly the same, except for 16 bit fields. +{ + let txt = + `(module + (type $hasOOL (struct + ;; in-line storage + (field i64) (field i64) (field i64) (field i64) ;; 32 + (field i64) (field i64) (field i64) (field i64) ;; 64 + (field i64) (field i64) (field i64) (field i64) ;; 96 + (field i64) (field i64) (field i64) (field i64) ;; 128 + (field i16) (field i16) (field i16) (field i16) + (field i16) (field i16) (field i16) (field i16)) + ) + (func (export "build16") + (param $filler i64) (param $interesting i32) (result eqref) + (struct.new $hasOOL + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $filler) (local.get $filler) + (local.get $interesting) (local.get $interesting) + (local.get $interesting) (local.get $interesting) + (local.get $interesting) (local.get $interesting) + (local.get $interesting) (local.get $interesting) + ) + ) + )`; + let exports = wasmEvalText(txt).exports; + let obj16 = exports.build16(0x4321n, 0x7865); + assertEq(wasmGcReadField(obj16, 0) + BigInt(wasmGcReadField(obj16, 23)), 0xBB86n); // == 0x4321 + 0x7865 +} + +// Test that 8-bit field writes do not overwrite adjacent fields. +{ + let txt = + `(module + (type $struct8x8 + (struct (field i8) (field i8) (field i8) (field (mut i8)) + (field i8) (field i8) (field i8) (field i8) + )) + (func (export "create") (result eqref) + (struct.new $struct8x8 (i32.const 0x55) (i32.const 0x55) + (i32.const 0x55) (i32.const 0x55) + (i32.const 0x55) (i32.const 0x55) + (i32.const 0x55) (i32.const 0x55) + )) + (func (export "writeField8x8_3") (param $p eqref) (param $v i32) + (struct.set $struct8x8 3 (ref.cast (ref null $struct8x8) (local.get $p)) + (local.get $v)) + ) + )`; + let exports = wasmEvalText(txt).exports; + let theObject = exports.create(); + exports.writeField8x8_3(theObject, 0x77); + assertEq(wasmGcReadField(theObject, 0), 0x55); + assertEq(wasmGcReadField(theObject, 1), 0x55); + assertEq(wasmGcReadField(theObject, 2), 0x55); + assertEq(wasmGcReadField(theObject, 3), 0x77); + assertEq(wasmGcReadField(theObject, 4), 0x55); + assertEq(wasmGcReadField(theObject, 5), 0x55); + assertEq(wasmGcReadField(theObject, 6), 0x55); + assertEq(wasmGcReadField(theObject, 7), 0x55); +} + +// Test that 16-bit field writes do not overwrite adjacent fields. +{ + let txt = + `(module + (type $struct16x8 + (struct (field i16) (field i16) (field i16) (field (mut i16)) + (field i16) (field i16) (field i16) (field i16) + )) + (func (export "create") (result eqref) + (struct.new $struct16x8 (i32.const 0x5555) (i32.const 0x5555) + (i32.const 0x5555) (i32.const 0x5555) + (i32.const 0x5555) (i32.const 0x5555) + (i32.const 0x5555) (i32.const 0x5555) + )) + (func (export "writeField16x8_3") (param $p eqref) (param $v i32) + (struct.set $struct16x8 3 (ref.cast (ref null $struct16x8) (local.get $p)) + (local.get $v)) + ) + )`; + let exports = wasmEvalText(txt).exports; + let theObject = exports.create(); + exports.writeField16x8_3(theObject, 0x7766); + assertEq(wasmGcReadField(theObject, 0), 0x5555); + assertEq(wasmGcReadField(theObject, 1), 0x5555); + assertEq(wasmGcReadField(theObject, 2), 0x5555); + assertEq(wasmGcReadField(theObject, 3), 0x7766); + assertEq(wasmGcReadField(theObject, 4), 0x5555); + assertEq(wasmGcReadField(theObject, 5), 0x5555); + assertEq(wasmGcReadField(theObject, 6), 0x5555); + assertEq(wasmGcReadField(theObject, 7), 0x5555); +} + +// Test that 8-bit field reads sign/zero extend correctly. +{ + let txt = + `(module + (type $struct8x8 + (struct (field i8) (field i8) (field i8) (field i8) + (field i8) (field i8) (field i8) (field i8) + )) + (func (export "create") (result eqref) + (struct.new $struct8x8 (i32.const 0x11) (i32.const 0x82) + (i32.const 0x23) (i32.const 0x94) + (i32.const 0x35) (i32.const 0xA6) + (i32.const 0x47) (i32.const 0xB8) + )) + ;; read i8 from a field, unsigned extend, read value has top bit 0 + (func (export "readU8hi0") (param $p eqref) (result i32) + (struct.get_u $struct8x8 2 (ref.cast (ref null $struct8x8) (local.get $p))) + ) + ;; read i8 from a field, unsigned extend, read value has top bit 1 + (func (export "readU8hi1") (param $p eqref) (result i32) + (struct.get_u $struct8x8 3 (ref.cast (ref null $struct8x8) (local.get $p))) + ) + ;; read i8 from a field, signed extend, read value has top bit 0 + (func (export "readS8hi0") (param $p eqref) (result i32) + (struct.get_s $struct8x8 4 (ref.cast (ref null $struct8x8) (local.get $p))) + ) + ;; read i8 from a field, signed extend, read value has top bit 1 + (func (export "readS8hi1") (param $p eqref) (result i32) + (struct.get_s $struct8x8 5 (ref.cast (ref null $struct8x8) (local.get $p))) + ) + )`; + let exports = wasmEvalText(txt).exports; + let theObject = exports.create(); + assertEq(exports.readU8hi0(theObject), 0x23); // zx of 0x23 + assertEq(exports.readU8hi1(theObject), 0x94); // zx of 0x94 + assertEq(exports.readS8hi0(theObject), 0x35); // sx of 0x35 + assertEq(exports.readS8hi1(theObject), -0x5A); // sx of 0xA6 +} + +// Test that 16-bit field reads sign/zero extend correctly. +{ + let txt = + `(module + (type $struct16x8 + (struct (field i16) (field i16) (field i16) (field i16) + (field i16) (field i16) (field i16) (field i16) + )) + (func (export "create") (result eqref) + (struct.new $struct16x8 (i32.const 0x11FF) (i32.const 0x82FE) + (i32.const 0x23FD) (i32.const 0x94FC) + (i32.const 0x35FB) (i32.const 0xA6FA) + (i32.const 0x47F9) (i32.const 0xB8F8) + )) + ;; read i16 from a field, unsigned extend, read value has top bit 0 + (func (export "readU16hi0") (param $p eqref) (result i32) + (struct.get_u $struct16x8 2 (ref.cast (ref null $struct16x8) (local.get $p))) + ) + ;; read i16 from a field, unsigned extend, read value has top bit 1 + (func (export "readU16hi1") (param $p eqref) (result i32) + (struct.get_u $struct16x8 3 (ref.cast (ref null $struct16x8) (local.get $p))) + ) + ;; read i16 from a field, signed extend, read value has top bit 0 + (func (export "readS16hi0") (param $p eqref) (result i32) + (struct.get_s $struct16x8 4 (ref.cast (ref null $struct16x8) (local.get $p))) + ) + ;; read i16 from a field, signed extend, read value has top bit 1 + (func (export "readS16hi1") (param $p eqref) (result i32) + (struct.get_s $struct16x8 5 (ref.cast (ref null $struct16x8) (local.get $p))) + ) + )`; + let exports = wasmEvalText(txt).exports; + let theObject = exports.create(); + assertEq(exports.readU16hi0(theObject), 0x23FD); // zx of 0x23FD + assertEq(exports.readU16hi1(theObject), 0x94FC); // zx of 0x94FC + assertEq(exports.readS16hi0(theObject), 0x35FB); // sx of 0x35FB + assertEq(exports.readS16hi1(theObject), -0x5906); // sx of 0xA6FC +} diff --git a/js/src/jit-test/tests/wasm/gc/supertype_later_in_group.js b/js/src/jit-test/tests/wasm/gc/supertype_later_in_group.js new file mode 100644 index 0000000000..f461a4875d --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/supertype_later_in_group.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// Checking that we are correctly validating all subtyping rules. +// In this example, $b should be a subtype of $a, even if their field types +// will be loaded later. +wasmValidateText(` +(module + (rec + (type $a (sub (struct (field (ref $notParsedYet))))) + (type $b (sub $a (struct (field (ref $notParsedYet2))))) + + (type $notParsedYet (sub (struct))) + (type $notParsedYet2 (sub $notParsedYet (struct (field i32)))) + ) +)`); diff --git a/js/src/jit-test/tests/wasm/gc/tables-generalized-struct.js b/js/src/jit-test/tests/wasm/gc/tables-generalized-struct.js new file mode 100644 index 0000000000..b0bd964027 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/tables-generalized-struct.js @@ -0,0 +1,48 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// table.set in bounds with i32 x eqref - works, no value generated +// table.set with (ref null T) - works +// table.set with null - works +// table.set out of bounds - fails + +{ + let ins = wasmEvalText( + `(module + (table (export "t") 10 eqref) + (type $dummy (struct (field i32))) + (func (export "set_eqref") (param i32) (param eqref) + (table.set (local.get 0) (local.get 1))) + (func (export "set_null") (param i32) + (table.set (local.get 0) (ref.null eq))) + (func (export "set_ref") (param i32) (param eqref) + (table.set (local.get 0) (ref.cast (ref null $dummy) (local.get 1)))) + (func (export "make_struct") (result eqref) + (struct.new $dummy (i32.const 37))))`); + let a = ins.exports.make_struct(); + ins.exports.set_eqref(3, a); + assertEq(ins.exports.t.get(3), a); + ins.exports.set_null(3); + assertEq(ins.exports.t.get(3), null); + let b = ins.exports.make_struct(); + ins.exports.set_ref(5, b); + assertEq(ins.exports.t.get(5), b); + + assertErrorMessage(() => ins.exports.set_eqref(10, a), WebAssembly.RuntimeError, /index out of bounds/); + assertErrorMessage(() => ins.exports.set_eqref(-1, a), WebAssembly.RuntimeError, /index out of bounds/); +} + +// table.grow on table of eqref with non-null ref value + +{ + let ins = wasmEvalText( + `(module + (type $S (struct (field i32) (field f64))) + (table (export "t") 2 eqref) + (func (export "f") (result i32) + (table.grow (struct.new $S (i32.const 0) (f64.const 3.14)) (i32.const 1))))`); + assertEq(ins.exports.t.length, 2); + assertEq(ins.exports.f(), 2); + assertEq(ins.exports.t.length, 3); + assertEq(typeof ins.exports.t.get(2), "object"); +} + diff --git a/js/src/jit-test/tests/wasm/gc/tables.js b/js/src/jit-test/tests/wasm/gc/tables.js new file mode 100644 index 0000000000..e9c4e8f82e --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/tables.js @@ -0,0 +1,167 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +// implicit null funcref value +{ + const { t, get } = wasmEvalText(`(module + (table (export "t") 3 funcref) + (func (export "get") (param i32) (result funcref) + (table.get (local.get 0)) + ) + )`).exports; + + assertEq(t.get(0), null); + assertEq(t.get(1), null); + assertEq(t.get(2), null); + assertEq(get(0), null); + assertEq(get(1), null); + assertEq(get(2), null); +} + +// explicit null funcref value +{ + const { t, get } = wasmEvalText(`(module + (table (export "t") 3 funcref (ref.null func)) + (func (export "get") (param i32) (result funcref) + (table.get (local.get 0)) + ) + )`).exports; + + assertEq(t.get(0), null); + assertEq(t.get(1), null); + assertEq(t.get(2), null); + assertEq(get(0), null); + assertEq(get(1), null); + assertEq(get(2), null); +} + +// actual funcref value +{ + const { t, get, foo } = wasmEvalText(`(module + (func $foo (export "foo")) + + (table (export "t") 3 funcref (ref.func $foo)) + (func (export "get") (param i32) (result funcref) + (table.get (local.get 0)) + ) + )`).exports; + + assertEq(t.get(0), foo); + assertEq(t.get(1), foo); + assertEq(t.get(2), foo); + assertEq(get(0), foo); + assertEq(get(1), foo); + assertEq(get(2), foo); +} + +// implicit null anyref value +{ + const { t, get } = wasmEvalText(`(module + (table (export "t") 3 anyref) + (func (export "get") (param i32) (result anyref) + (table.get (local.get 0)) + ) + )`).exports; + + assertEq(t.get(0), null); + assertEq(t.get(1), null); + assertEq(t.get(2), null); + assertEq(get(0), null); + assertEq(get(1), null); + assertEq(get(2), null); +} + +// explicit null anyref value +{ + const { t, get } = wasmEvalText(`(module + (table (export "t") 3 anyref (ref.null any)) + (func (export "get") (param i32) (result anyref) + (table.get (local.get 0)) + ) + )`).exports; + + assertEq(t.get(0), null); + assertEq(t.get(1), null); + assertEq(t.get(2), null); + assertEq(get(0), null); + assertEq(get(1), null); + assertEq(get(2), null); +} + +// actual anyref value +{ + const { t, get } = wasmEvalText(`(module + (type $s (struct)) + + (table (export "t") 3 anyref (struct.new $s)) + (func (export "get") (param i32) (result anyref) + (table.get (local.get 0)) + ) + )`).exports; + + assertEq(!!t.get(0), true); + assertEq(!!t.get(1), true); + assertEq(!!t.get(2), true); + assertEq(!!get(0), true); + assertEq(!!get(1), true); + assertEq(!!get(2), true); +} + +// implicit null externref value +{ + const { t, get } = wasmEvalText(`(module + (table (export "t") 3 externref) + (func (export "get") (param i32) (result externref) + (table.get (local.get 0)) + ) + )`).exports; + + assertEq(t.get(0), null); + assertEq(t.get(1), null); + assertEq(t.get(2), null); + assertEq(get(0), null); + assertEq(get(1), null); + assertEq(get(2), null); +} + +// explicit null externref value +{ + const { t, get } = wasmEvalText(`(module + (table (export "t") 3 externref (ref.null extern)) + (func (export "get") (param i32) (result externref) + (table.get (local.get 0)) + ) + )`).exports; + + assertEq(t.get(0), null); + assertEq(t.get(1), null); + assertEq(t.get(2), null); + assertEq(get(0), null); + assertEq(get(1), null); + assertEq(get(2), null); +} + +// actual externref value (from an imported global, which is visible to tables) +{ + const foo = "wowzers"; + const { t, get } = wasmEvalText(`(module + (global (import "" "foo") externref) + + (table (export "t") 3 externref (global.get 0)) + (func (export "get") (param i32) (result externref) + (table.get (local.get 0)) + ) + )`, { "": { "foo": foo } }).exports; + + assertEq(t.get(0), foo); + assertEq(t.get(1), foo); + assertEq(t.get(2), foo); + assertEq(get(0), foo); + assertEq(get(1), foo); + assertEq(get(2), foo); +} + +// non-imported globals come after tables and are therefore not visible +assertErrorMessage(() => wasmEvalText(`(module + (global anyref (ref.null any)) + (table 3 anyref (global.get 0)) +)`), WebAssembly.CompileError, /global.get index out of range/); diff --git a/js/src/jit-test/tests/wasm/gc/trailers-gc-stress.js b/js/src/jit-test/tests/wasm/gc/trailers-gc-stress.js new file mode 100644 index 0000000000..59410904a7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/trailers-gc-stress.js @@ -0,0 +1,166 @@ +// |jit-test| skip-if: !wasmGcEnabled() || getBuildConfiguration("simulator") + +// This test is intended to test what was committed in +// +// Bug 1817385 - wasm-gc: reduce cost of allocation and GC paths +// and +// Bug 1820120 - Manage Wasm{Array,Struct}Object OOL-storage-blocks +// using a thread-private cache +// +// and in particular the latter. The patches in these bugs reduce the cost of +// wasm-gc struct/array allocation and collection, in part by better +// integrating those objects with our generational GC facility. +// +// Existing tests do not cover all of those paths. In particular they do not +// exercise both set-subtraction algorithms in Nursery::freeTrailerBlocks. +// This test does, though. +// +// The test first creates an "primary" array of 1500 elements. Each element +// is a reference to a secondary array of between 1 and 50 int32s. These +// secondary arrays have size chosen randomly, and the elements are also +// random. +// +// Then, elements of the primary array are replaced. An index in the range 0 +// .. N - 1 is randomly chosen, and the element there is replaced by a +// randomly-created secondary array. This is repeated 500,000 times with +// N = 800. +// +// Finally, all of the above is repeated, but with N = 1200. +// +// As a result just over a million arrays and their trailer blocks, of various +// sizes, are allocated and deallocated. With N = 800, in +// js::Nursery::freeTrailerBlocks, we end up with trailersRemovedUsed_ of +// around 800, so one of the set-subtraction algorithms is exercised. +// With N = 1200, the other is exercised. It's not entirely clear why changing +// N causes trailersRemovedUsed_ to have more or less the same value during +// nursery collection, but the correlation does seem fairly robust. +// +// The test is skipped on the simulator because it takes too long to run, and +// triggers timeouts. + +let t = +`(module + + ;; A simple pseudo-random number generator. + ;; Produces numbers in the range 0 .. 2^16-1. + (global $rngState + (mut i32) (i32.const 1) + ) + (func $rand (export "rand") (result i32) + (local $t i32) + ;; update $rngState + (local.set $t (global.get $rngState)) + (local.set $t (i32.mul (local.get $t) (i32.const 1103515245))) + (local.set $t (i32.add (local.get $t) (i32.const 12345))) + (global.set $rngState (local.get $t)) + ;; pull 16 random bits out of it + (local.set $t (i32.shr_u (local.get $t) (i32.const 15))) + (local.set $t (i32.and (local.get $t) (i32.const 0xFFFF))) + (local.get $t) + ) + + ;; Array types + (type $tArrayI32 (array (mut i32))) ;; "secondary array" above + (type $tArrayArrayI32 (array (mut (ref null $tArrayI32)))) ;; "primary array" + + ;; Create an array ("secondary array") containing random numbers, with a + ;; size between 1 and 50, also randomly chosen. + (func $createSecondaryArray (export "createSecondaryArray") + (result (ref $tArrayI32)) + (local $i i32) + (local $nElems i32) + (local $arr (ref $tArrayI32)) + (local.set $nElems (call $rand)) + (local.set $nElems (i32.rem_u (local.get $nElems) (i32.const 50))) + (local.set $nElems (i32.add (local.get $nElems) (i32.const 1))) + (local.set $arr (array.new $tArrayI32 (i32.const 0) (local.get $nElems))) + (loop $cont + (array.set $tArrayI32 (local.get $arr) (local.get $i) (call $rand)) + (local.set $i (i32.add (local.get $i) (i32.const 1))) + (br_if $cont (i32.lt_u (local.get $i) (local.get $nElems))) + ) + (local.get $arr) + ) + + ;; Create an array (the "primary array") of 1500 elements of + ;; type ref-of-tArrayI32. + (func $createPrimaryArray (export "createPrimaryArray") + (result (ref $tArrayArrayI32)) + (local $i i32) + (local $arrarr (ref $tArrayArrayI32)) + (local.set $arrarr (array.new $tArrayArrayI32 (ref.null $tArrayI32) + (i32.const 1500))) + (loop $cont + (array.set $tArrayArrayI32 (local.get $arrarr) + (local.get $i) (call $createSecondaryArray)) + (local.set $i (i32.add (local.get $i) (i32.const 1))) + (br_if $cont (i32.lt_u (local.get $i) (i32.const 1500))) + ) + (local.get $arrarr) + ) + + ;; Use $createPrimaryArray to create an initial array. Then randomly replace + ;; elements for a while. + (func $churn (export "churn") (param $thresh i32) (result i32) + (local $i i32) + (local $j i32) + (local $finalSum i32) + (local $arrarr (ref $tArrayArrayI32)) + (local $arr (ref null $tArrayI32)) + (local $arrLen i32) + (local.set $arrarr (call $createPrimaryArray)) + ;; This loop iterates 500,000 times. Each iteration, it chooses + ;; a randomly element in $arrarr and replaces it with a new + ;; random array of 32-bit ints. + (loop $cont + ;; make $j be a random number in 0 .. $thresh-1. + ;; Then replace that index in $arrarr with a new random arrayI32. + (local.set $j (i32.rem_u (call $rand) (local.get $thresh))) + (array.set $tArrayArrayI32 (local.get $arrarr) + (local.get $j) (call $createSecondaryArray)) + (local.set $i (i32.add (local.get $i) (i32.const 1))) + (br_if $cont (i32.lt_u (local.get $i) (i32.const 500000))) + ) + + ;; Finally, compute a checksum by summing all the numbers + ;; in all secondary arrays. This simply assumes that all of the refs to + ;; secondary arrays are non-null, which isn't per-se guaranteed by the + ;; previous loop, but it works in this case because the RNG + ;; produces each index value to overwrite at least once. + (local.set $finalSum (i32.const 0)) + (local.set $i (i32.const 0)) ;; loop var for the outer loop + (loop $outer + ;; body of outer loop + ;; $arr = $arrarr[i] + (local.set $arr (array.get $tArrayArrayI32 (local.get $arrarr) + (local.get $i))) + ;; iterate over $arr + (local.set $arrLen (array.len (local.get $arr))) + (local.set $j (i32.const 0)) ;; loop var for the inner loop + (loop $inner + ;; body of inner loop + (local.set $finalSum + (i32.rotl (local.get $finalSum) (i32.const 1))) + (local.set $finalSum + (i32.xor (local.get $finalSum) + (array.get $tArrayI32 (local.get $arr) + (local.get $j)))) + ;; loop control for the inner loop + (local.set $j (i32.add (local.get $j) (i32.const 1))) + (br_if $inner (i32.lt_u (local.get $j) (local.get $arrLen))) + ) + ;; loop control for the outer loop + (local.set $i (i32.add (local.get $i) (i32.const 1))) + (br_if $outer (i32.lt_u (local.get $i) (i32.const 1500))) + ) + + ;; finally, roll in the final value of the RNG state + (i32.xor (local.get $finalSum) (global.get $rngState)) + ) +)`; + +let i = wasmEvalText(t); +let fns = i.exports; + +assertEq(fns.churn(800), -575895114); +assertEq(fns.churn(1200), -1164697516); diff --git a/js/src/jit-test/tests/wasm/gc/unreachable.js b/js/src/jit-test/tests/wasm/gc/unreachable.js new file mode 100644 index 0000000000..606aad1e3b --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/unreachable.js @@ -0,0 +1,61 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +const INSTRUCTIONS = [ + "struct.new $s", + "struct.new_default $s", + "struct.get $s 0", + "struct.get_s $s 1", + "struct.get_u $s 1", + "struct.set $s 0", + "array.new $a_unpacked", + "array.new_fixed $a_unpacked 2", + "array.new_default $a_unpacked", + "array.new_data $a_data 0", + "array.new_elem $a_elem 0", + "array.get $a_unpacked", + "array.get_s $a_packed", + "array.get_u $a_packed", + "array.set $a_unpacked", + "array.copy $a_unpacked $a_unpacked", + "array.len", + "ref.i31", + "i31.get_s", + "i31.get_u", + "ref.test structref", + "ref.test (ref $s)", + "ref.test nullref", + "ref.test (ref $f)", + "ref.test nullfuncref", + "ref.test externref", + "ref.test nullexternref", + "ref.cast structref", + "ref.cast (ref $s)", + "ref.cast nullref", + "ref.cast (ref $f)", + "ref.cast nullfuncref", + "ref.cast externref", + "ref.cast nullexternref", + "br_on_cast 0 anyref (ref $s)", + "br_on_cast_fail 0 anyref (ref $s)", + "any.convert_extern", + "extern.convert_any", +]; + +for (let instruction of INSTRUCTIONS) { + print(instruction); + wasmEvalText(`(module + (type $f (func)) + (type $s (struct (field (mut i32)) (field (mut i8)))) + (type $a_unpacked (array (mut i32))) + (type $a_packed (array (mut i8))) + (type $a_data (array (mut i32))) + (type $a_elem (array (mut anyref))) + (data "") + (elem anyref) + (func (result anyref) + unreachable + ${instruction} + unreachable + ) + )`); +} diff --git a/js/src/jit-test/tests/wasm/gc/value_subtyping.js b/js/src/jit-test/tests/wasm/gc/value_subtyping.js new file mode 100644 index 0000000000..1cb20f3047 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/value_subtyping.js @@ -0,0 +1,311 @@ +// |jit-test| skip-if: !wasmGcEnabled() + +function simpleTypeSection(types) { + return types.map((x, i) => `(type \$${i} ${x})`).join('\n'); +} + +function assertSubtype(superType, subType, types) { + types = types || []; + wasmEvalText(`(module + ${types} + (func + unreachable + (block (param ${subType}) + (block (param ${superType}) + drop + ) + ) + ) + )`); +} + +function assertNotSubtype(superType, subType, types) { + assertErrorMessage(() => { + assertSubtype(superType, subType, types); + }, WebAssembly.CompileError, /type mismatch/); +} + +// Primitive trivial subtyping +assertSubtype('i32', 'i32'); +assertSubtype('i64', 'i64'); +assertSubtype('f32', 'f32'); +assertSubtype('f64', 'f64'); +assertSubtype('eqref', 'eqref'); +assertSubtype('i31ref', 'i31ref'); +assertSubtype('funcref', 'funcref'); + +// No subtyping relation between funcref, anyref, externref. These are our top +// types. +assertNotSubtype('funcref', 'anyref'); +assertNotSubtype('anyref', 'funcref'); +assertNotSubtype('funcref', 'externref'); +assertNotSubtype('externref', 'funcref'); +assertNotSubtype('externref', 'anyref'); +assertNotSubtype('anyref', 'externref'); + +// eqref is a subtype of anyref +assertSubtype('anyref', 'eqref'); + +// i31ref is a subtype of eqref +assertSubtype('anyref', 'i31ref'); +assertSubtype('eqref', 'i31ref'); + +// structref is a subtype of eqref and anyref +assertSubtype('anyref', 'structref'); +assertSubtype('eqref', 'structref'); + +// arrayref is a subtype of eqref and anyref +assertSubtype('anyref', 'arrayref'); +assertSubtype('eqref', 'arrayref'); + +// Structs are subtypes of anyref, eqref, and structref +assertSubtype( + 'anyref', + '(ref 0)', + simpleTypeSection(['(struct)'])); +assertSubtype( + 'eqref', + '(ref 0)', + simpleTypeSection(['(struct)'])); +assertSubtype( + 'structref', + '(ref 0)', + simpleTypeSection(['(struct)'])); + +// Struct identity +assertSubtype( + '(ref 0)', + '(ref 1)', + simpleTypeSection(['(struct)', '(struct)'])); +assertSubtype( + '(ref 1)', + '(ref 0)', + simpleTypeSection(['(struct)', '(struct)'])); + +// Self referential struct +assertSubtype( + '(ref 1)', + '(ref 0)', + simpleTypeSection(['(struct (field (ref 0)))', '(struct (field (ref 1)))'])); + +// Mutually referential structs +assertSubtype( + '(ref 2)', + '(ref 0)', + `(rec + (type (struct (field (ref 1)))) + (type (struct (field (ref 0)))) + ) + (rec + (type (struct (field (ref 3)))) + (type (struct (field (ref 2)))) + )`); + +// Struct subtypes can have extra fields +assertSubtype( + '(ref 0)', + '(ref 1)', + `(type (sub (struct))) + (type (sub 0 (struct (field i32))))`); +assertSubtype( + '(ref 0)', + '(ref 1)', + `(type (sub (struct))) + (type (sub 0 (struct (field i32) (field i32))))`); + +// Struct supertypes cannot have extra fields +assertNotSubtype( + '(ref 0)', + '(ref 1)', + simpleTypeSection([ + '(struct (field i32))', + '(struct)'])); + +// Struct field mutability must match +assertSubtype( + '(ref 0)', + '(ref 1)', + simpleTypeSection([ + '(struct (field (mut i32)))', + '(struct (field (mut i32)))'])); +assertSubtype( + '(ref 0)', + '(ref 1)', + simpleTypeSection([ + '(struct (field i32))', + '(struct (field i32))'])); +assertNotSubtype( + '(ref 0)', + '(ref 1)', + simpleTypeSection([ + '(struct (field (mut i32)))', + '(struct (field i32))'])); +assertNotSubtype( + '(ref 0)', + '(ref 1)', + simpleTypeSection([ + '(struct (field i32))', + '(struct (field (mut i32)))'])); + +// Struct fields are invariant when mutable +assertSubtype( + '(ref 2)', + '(ref 3)', + simpleTypeSection([ + '(struct)', + '(struct)', + '(struct (field (mut (ref 0))))', + '(struct (field (mut (ref 1))))'])); +assertNotSubtype( + '(ref 2)', + '(ref 3)', + simpleTypeSection([ + '(struct)', + '(struct (field i32))', + '(struct (field (mut (ref 0))))', + '(struct (field (mut (ref 1))))'])); + +// Struct fields are covariant when immutable +assertSubtype( + '(ref 2)', + '(ref 3)', + `(type (sub (struct))) + (type (sub 0 (struct (field i32)))) + (type (sub (struct (field (ref 0))))) + (type (sub 2 (struct (field (ref 1)))))`); + +// Arrays are subtypes of anyref, eqref, and arrayref +assertSubtype( + 'anyref', + '(ref 0)', + simpleTypeSection(['(array i32)'])); +assertSubtype( + 'eqref', + '(ref 0)', + simpleTypeSection(['(array i32)'])); +assertSubtype( + 'arrayref', + '(ref 0)', + simpleTypeSection(['(array i32)'])); + +// Array identity +assertSubtype( + '(ref 0)', + '(ref 1)', + simpleTypeSection(['(array i32)', '(array i32)'])); +assertSubtype( + '(ref 1)', + '(ref 0)', + simpleTypeSection(['(array i32)', '(array i32)'])); + +// Self referential array +assertSubtype( + '(ref 1)', + '(ref 0)', + simpleTypeSection(['(array (ref 0))', '(array (ref 1))'])); + +// Mutually referential arrays +assertSubtype( + '(ref 2)', + '(ref 0)', + `(rec + (type (array (ref 1))) + (type (array (ref 0))) + ) + (rec + (type (array (ref 3))) + (type (array (ref 2))) + )`); + +// Array mutability must match +assertSubtype( + '(ref 0)', + '(ref 1)', + simpleTypeSection([ + '(array (mut i32))', + '(array (mut i32))'])); +assertSubtype( + '(ref 0)', + '(ref 1)', + simpleTypeSection([ + '(array i32)', + '(array i32)'])); +assertNotSubtype( + '(ref 0)', + '(ref 1)', + simpleTypeSection([ + '(array (mut i32))', + '(array i32)'])); +assertNotSubtype( + '(ref 0)', + '(ref 1)', + simpleTypeSection([ + '(array i32)', + '(array (mut i32))'])); + +// Array elements are invariant when mutable +assertSubtype( + '(ref 2)', + '(ref 3)', + simpleTypeSection([ + '(struct)', + '(struct)', + '(array (mut (ref 0)))', + '(array (mut (ref 1)))'])); +assertNotSubtype( + '(ref 2)', + '(ref 3)', + simpleTypeSection([ + '(struct)', + '(struct (field i32))', + '(array (mut (ref 0)))', + '(array (mut (ref 1)))'])); + +// Array elements are covariant when immutable +assertSubtype( + '(ref 2)', + '(ref 3)', + simpleTypeSection([ + '(sub (struct))', + '(sub 0 (struct (field i32)))', + '(sub (array (ref 0)))', + '(sub 2 (array (ref 1)))'])); + +// nullref is a subtype of everything in anyref hierarchy +assertSubtype('anyref', 'nullref'); +assertSubtype('eqref', 'nullref'); +assertSubtype('structref', 'nullref'); +assertSubtype('arrayref', 'nullref'); +assertSubtype('(ref null 0)', 'nullref', simpleTypeSection(['(struct)'])); +assertSubtype('(ref null 0)', 'nullref', simpleTypeSection(['(array i32)'])); + +// nullref is not a subtype of any other hierarchy +assertNotSubtype('funcref', 'nullref'); +assertNotSubtype('(ref null 0)', 'nullref', simpleTypeSection(['(func)'])); +assertNotSubtype('externref', 'nullref'); + +// nullfuncref is a subtype of everything in funcref hierarchy +assertSubtype('funcref', 'nullfuncref'); +assertSubtype('(ref null 0)', 'nullfuncref', simpleTypeSection(['(func)'])); + +// nullfuncref is not a subtype of any other hierarchy +assertNotSubtype('anyref', 'nullfuncref'); +assertNotSubtype('eqref', 'nullfuncref'); +assertNotSubtype('structref', 'nullfuncref'); +assertNotSubtype('arrayref', 'nullfuncref'); +assertNotSubtype('externref', 'nullfuncref'); +assertNotSubtype('(ref null 0)', 'nullfuncref', simpleTypeSection(['(struct)'])); +assertNotSubtype('(ref null 0)', 'nullfuncref', simpleTypeSection(['(array i32)'])); + +// nullexternref is a subtype of everything in externref hierarchy +assertSubtype('externref', 'nullexternref'); + +// nullexternref is not a subtype of any other hierarchy +assertNotSubtype('anyref', 'nullexternref'); +assertNotSubtype('eqref', 'nullexternref'); +assertNotSubtype('structref', 'nullexternref'); +assertNotSubtype('arrayref', 'nullexternref'); +assertNotSubtype('funcref', 'nullexternref'); +assertNotSubtype('(ref null 0)', 'nullexternref', simpleTypeSection(['(struct)'])); +assertNotSubtype('(ref null 0)', 'nullexternref', simpleTypeSection(['(array i32)'])); +assertNotSubtype('(ref null 0)', 'nullexternref', simpleTypeSection(['(func)'])); diff --git a/js/src/jit-test/tests/wasm/globals-impl.js b/js/src/jit-test/tests/wasm/globals-impl.js new file mode 100644 index 0000000000..15aea8f395 --- /dev/null +++ b/js/src/jit-test/tests/wasm/globals-impl.js @@ -0,0 +1,49 @@ +// This is intended to test that Ion correctly handles the combination +// {direct, indirect} x {i32, i64} for global variables, following GVN +// improvements pertaining to globals in bug 1448277. + +let txt = + `(module + ;; -------- Globals -------- + (global $ind64 (export "ind64") (mut i64) (i64.const 4242)) + (global $ind32 (export "ind32") (mut i32) (i32.const 3141)) + (global $dir64 (mut i64) (i64.const 5927)) + (global $dir32 (mut i32) (i32.const 2718)) + ;; -------- FUNCTION 0 -------- + (func (export "function0") (result i32) + (local $loopctr i32) + (local $sum i32) + (local $tmp64 i64) + (local $tmp32 i32) + (loop + (global.set $ind64 (i64.add (global.get $ind64) (i64.const 11))) + (global.set $ind32 (i32.add (global.get $ind32) (i32.const 22))) + (global.set $dir64 (i64.add (global.get $dir64) (i64.const 33))) + (global.set $dir32 (i32.add (global.get $dir32) (i32.const 44))) + + (local.set $tmp64 (i64.and (global.get $ind64) (global.get $dir64))) + (local.set $tmp32 (i32.or (global.get $ind32) (global.get $dir32))) + + (local.set $sum + (i32.sub (local.get $sum) (i32.xor (i32.wrap_i64 (local.get $tmp64)) + (local.get $tmp32)))) + + (local.set $loopctr + (i32.add (local.get $loopctr) (i32.const 1))) + (br_if 0 + (i32.lt_u (local.get $loopctr) (i32.const 10))) + + ) + (local.get $sum) + ) + )`; + +function test_driver() +{ + let bin = wasmTextToBinary(txt); + let inst = new WebAssembly.Instance(new WebAssembly.Module(bin)); + let res = inst.exports.function0(); + assertEq(res, -79170); +} + +test_driver(); diff --git a/js/src/jit-test/tests/wasm/globals.js b/js/src/jit-test/tests/wasm/globals.js new file mode 100644 index 0000000000..5a6d83e348 --- /dev/null +++ b/js/src/jit-test/tests/wasm/globals.js @@ -0,0 +1,558 @@ +// |jit-test| test-also=--wasm-extended-const; test-also=--no-wasm-extended-const + +const { Instance, Module, LinkError } = WebAssembly; + +// Locally-defined globals +assertErrorMessage(() => wasmEvalText(`(module (global))`), SyntaxError, /wasm text error/); +// A global field in the text format is valid with an empty expression, but this produces an invalid module +assertErrorMessage(() => wasmEvalText(`(module (global i32))`), WebAssembly.CompileError, /popping value/); +assertErrorMessage(() => wasmEvalText(`(module (global (mut i32)))`), WebAssembly.CompileError, /popping value/); + +// Initializer expressions. +wasmFailValidateText(`(module (global i32 (f32.const 13.37)))`, /type mismatch/); +wasmFailValidateText(`(module (global f64 (f32.const 13.37)))`, /type mismatch/); + +wasmFailValidateText(`(module (global i32 (global.get 0)))`, /out of range/); +wasmFailValidateText(`(module (global i32 (global.get 1)) (global i32 (i32.const 1)))`, /out of range/); + +// Test a well-defined global section. +function testInner(type, initialValue, nextValue, coercion) +{ + var module = wasmEvalText(`(module + (global (mut ${type}) (${type}.const ${initialValue})) + (global ${type} (${type}.const ${initialValue})) + + (func $get (result ${type}) (global.get 0)) + (func $set (param ${type}) (global.set 0 (local.get 0))) + + (func $get_cst (result ${type}) (global.get 1)) + + (export "get" (func $get)) + (export "get_cst" (func $get_cst)) + + (export "set" (func $set)) + )`).exports; + + assertEq(module.get(), coercion(initialValue)); + assertEq(module.set(coercion(nextValue)), undefined); + assertEq(module.get(), coercion(nextValue)); + + assertEq(module.get_cst(), coercion(initialValue)); +} + +testInner('i32', 13, 37, x => x|0); +testInner('f32', 13.37, 0.1989, Math.fround); +testInner('f64', 13.37, 0.1989, x => +x); + +// Extended const stuff +if (wasmExtendedConstEnabled()) { + // Basic global shenanigans + { + const module = wasmEvalText(`(module + ;; -2 * (5 - (-10 + 20)) = 10 + (global i32 (i32.mul (i32.const -2) (i32.sub (i32.const 5) (i32.add (i32.const -10) (i32.const 20))))) + ;; ((1 + 2) - (3 * 4)) = -9 + (global i64 (i64.sub (i64.add (i64.const 1) (i64.const 2)) (i64.mul (i64.const 3) (i64.const 4)))) + + (func (export "get0") (result i32) global.get 0) + (func (export "get1") (result i64) global.get 1) + )`).exports; + + assertEq(module.get0(), 10); + assertEq(module.get1(), -9n); + } + + // Example use of dynamic linking + { + // Make a memory for two dynamically-linked modules to share. Each module gets five pages. + const mem = new WebAssembly.Memory({ initial: 15, maximum: 15 }); + + const mod1 = new WebAssembly.Module(wasmTextToBinary(`(module + (memory (import "env" "memory") 15 15) + (global $memBase (import "env" "__memory_base") i32) + (data (offset (global.get $memBase)) "Hello from module 1.") + (data (offset (i32.add (global.get $memBase) (i32.const 65536))) "Goodbye from module 1.") + )`)); + const instance1 = new WebAssembly.Instance(mod1, { + env: { + memory: mem, + __memory_base: 65536 * 5, // this module's memory starts at page 5 + }, + }); + + const mod2 = new WebAssembly.Module(wasmTextToBinary(`(module + (memory (import "env" "memory") 15 15) + (global $memBase (import "env" "__memory_base") i32) + (data (offset (global.get $memBase)) "Hello from module 2.") + (data (offset (i32.add (global.get $memBase) (i32.const 65536))) "Goodbye from module 2.") + )`)); + const instance2 = new WebAssembly.Instance(mod2, { + env: { + memory: mem, + __memory_base: 65536 * 10, // this module's memory starts at page 10 + }, + }); + + // All four strings should now be present in the memory. + + function assertStringInMem(mem, str, addr) { + const bytes = new Uint8Array(mem.buffer).slice(addr, addr + str.length); + let memStr = String.fromCharCode(...bytes); + assertEq(memStr, str); + } + + assertStringInMem(mem, "Hello from module 1.", 65536 * 5); + assertStringInMem(mem, "Goodbye from module 1.", 65536 * 6); + assertStringInMem(mem, "Hello from module 2.", 65536 * 10); + assertStringInMem(mem, "Goodbye from module 2.", 65536 * 11); + } +} + +// Semantic errors. +wasmFailValidateText(`(module (global (mut i32) (i32.const 1337)) (func (global.set 1 (i32.const 0))))`, /(out of range)|(global index out of bounds)/); +wasmFailValidateText(`(module (global i32 (i32.const 1337)) (func (global.set 0 (i32.const 0))))`, /(can't write an immutable global)|(global is immutable)/); + +// Big module with many variables: test that setting one doesn't overwrite the +// other ones. +function get_set(i, type) { + return ` + (func $get_${i} (result ${type}) (global.get ${i})) + (func $set_${i} (param ${type}) (global.set ${i} (local.get 0))) + `; +} + +var module = wasmEvalText(`(module + (global (mut i32) (i32.const 42)) + (global (mut i32) (i32.const 10)) + (global (mut f32) (f32.const 13.37)) + (global (mut f64) (f64.const 13.37)) + (global (mut i32) (i32.const -18)) + + ${get_set(0, 'i32')} + ${get_set(1, 'i32')} + ${get_set(2, 'f32')} + ${get_set(3, 'f64')} + ${get_set(4, 'i32')} + + (export "get0" (func $get_0)) (export "set0" (func $set_0)) + (export "get1" (func $get_1)) (export "set1" (func $set_1)) + (export "get2" (func $get_2)) (export "set2" (func $set_2)) + (export "get3" (func $get_3)) (export "set3" (func $set_3)) + (export "get4" (func $get_4)) (export "set4" (func $set_4)) +)`).exports; + +let values = [42, 10, Math.fround(13.37), 13.37, -18]; +let nextValues = [13, 37, Math.fround(-17.89), 9.3, -13]; +for (let i = 0; i < 5; i++) { + assertEq(module[`get${i}`](), values[i]); + assertEq(module[`set${i}`](nextValues[i]), undefined); + assertEq(module[`get${i}`](), nextValues[i]); + for (let j = 0; j < 5; j++) { + if (i === j) + continue; + assertEq(module[`get${j}`](), values[j]); + } + assertEq(module[`set${i}`](values[i]), undefined); + assertEq(module[`get${i}`](), values[i]); +} + +// Initializer expressions can also be used in elem section initializers. +wasmFailValidateText(`(module (import "globals" "a" (global f32)) (table 4 funcref) (elem (global.get 0) $f) (func $f))`, /type mismatch/); + +module = wasmEvalText(`(module + (import "globals" "a" (global i32)) + (table (export "tbl") 4 funcref) + (elem (global.get 0) $f) + (func $f) + (export "f" (func $f)) +)`, { + globals: { + a: 1 + } +}).exports; +assertEq(module.f, module.tbl.get(1)); + +// Import/export semantics. +module = wasmEvalText(`(module + (import "globals" "x" (global $g i32)) + (func $get (result i32) (global.get $g)) + (export "getter" (func $get)) + (export "value" (global 0)) +)`, { globals: {x: 42} }).exports; + +assertEq(module.getter(), 42); + +// assertEq() will not trigger @@toPrimitive, so we must have a cast here. +assertEq(Number(module.value), 42); + +// Can only import numbers (no implicit coercions). +module = new Module(wasmTextToBinary(`(module + (global (import "globs" "i32") i32) + (global (import "globs" "f32") f32) + (global (import "globs" "f64") f32) +)`)); + +const assertLinkFails = (m, imp, err) => { + assertErrorMessage(() => new Instance(m, imp), LinkError, err); +} + +var imp = { + globs: { + i32: 0, + f32: Infinity, + f64: NaN + } +}; + +let i = new Instance(module, imp); + +for (let v of [ + null, + {}, + "42", + /not a number/, + false, + undefined, + Symbol(), + { valueOf() { return 42; } } +]) { + imp.globs.i32 = v; + assertLinkFails(module, imp, /not a Number/); + + imp.globs.i32 = 0; + imp.globs.f32 = v; + assertLinkFails(module, imp, /not a Number/); + + imp.globs.f32 = Math.fround(13.37); + imp.globs.f64 = v; + assertLinkFails(module, imp, /not a Number/); + + imp.globs.f64 = 13.37; +} + +// Imported globals and locally defined globals use the same index space. +module = wasmEvalText(`(module + (import "globals" "x" (global i32)) + (global i32 (i32.const 1337)) + (export "imported" (global 0)) + (export "defined" (global 1)) +)`, { globals: {x: 42} }).exports; + +assertEq(Number(module.imported), 42); +assertEq(Number(module.defined), 1337); + +if (!wasmGcEnabled()) { + // Initializer expressions can reference an imported immutable global. + wasmFailValidateText(`(module (global f32 (f32.const 13.37)) (global i32 (global.get 0)))`, /must reference a global immutable import/); + wasmFailValidateText(`(module (global (mut f32) (f32.const 13.37)) (global i32 (global.get 0)))`, /must reference a global immutable import/); + wasmFailValidateText(`(module (global (mut i32) (i32.const 0)) (global i32 (global.get 0)))`, /must reference a global immutable import/); +} + +wasmFailValidateText(`(module (import "globals" "a" (global f32)) (global i32 (global.get 0)))`, /type mismatch/); + +function testInitExpr(type, initialValue, nextValue, coercion, assertFunc = assertEq) { + var module = wasmEvalText(`(module + (import "globals" "a" (global ${type})) + + (global $glob_mut (mut ${type}) (global.get 0)) + (global $glob_imm ${type} (global.get 0)) + + (func $get0 (result ${type}) (global.get 0)) + + (func $get1 (result ${type}) (global.get 1)) + (func $set1 (param ${type}) (global.set 1 (local.get 0))) + + (func $get_cst (result ${type}) (global.get 2)) + + (export "get0" (func $get0)) + (export "get1" (func $get1)) + (export "get_cst" (func $get_cst)) + + (export "set1" (func $set1)) + (export "global_imm" (global $glob_imm)) + )`, { + globals: { + a: coercion(initialValue) + } + }).exports; + + assertFunc(module.get0(), coercion(initialValue)); + assertFunc(module.get1(), coercion(initialValue)); + assertFunc(Number(module.global_imm), coercion(initialValue)); + + assertEq(module.set1(coercion(nextValue)), undefined); + assertFunc(module.get1(), coercion(nextValue)); + assertFunc(module.get0(), coercion(initialValue)); + assertFunc(Number(module.global_imm), coercion(initialValue)); + + assertFunc(module.get_cst(), coercion(initialValue)); +} + +testInitExpr('i32', 13, 37, x => x|0); +testInitExpr('f32', 13.37, 0.1989, Math.fround); +testInitExpr('f64', 13.37, 0.1989, x => +x); + +// Int64. + +// Import and export + +// Test inner +var initialValue = '0x123456789abcdef0'; +var nextValue = '0x531642753864975F'; +wasmAssert(`(module + (global (mut i64) (i64.const ${initialValue})) + (global i64 (i64.const ${initialValue})) + (func $get (result i64) (global.get 0)) + (func $set (param i64) (global.set 0 (local.get 0))) + (func $get_cst (result i64) (global.get 1)) + (export "get" (func $get)) + (export "get_cst" (func $get_cst)) + (export "set" (func $set)) +)`, [ + {type: 'i64', func: '$get', expected: initialValue}, + {type: 'i64', func: '$set', args: [`i64.const ${nextValue}`]}, + {type: 'i64', func: '$get', expected: nextValue}, + {type: 'i64', func: '$get_cst', expected: initialValue}, +]); + +// Custom NaN. +{ + let dv = new DataView(new ArrayBuffer(8)); + module = wasmEvalText(`(module + (global $g f64 (f64.const -nan:0xe7ffff1591120)) + (global $h f32 (f32.const -nan:0x651234)) + (export "nan64" (global $g))(export "nan32" (global $h)) + )`, {}).exports; + + dv.setFloat64(0, module.nan64, true); + assertEq(dv.getUint32(4, true), 0x7ff80000); + assertEq(dv.getUint32(0, true), 0x00000000); + + dv.setFloat32(0, module.nan32, true); + assertEq(dv.getUint32(0, true), 0x7fc00000); +} + +// WebAssembly.Global +{ + const Global = WebAssembly.Global; + + // These types should work: + assertEq(new Global({value: "i32"}) instanceof Global, true); + assertEq(new Global({value: "f32"}) instanceof Global, true); + assertEq(new Global({value: "f64"}) instanceof Global, true); + assertEq(new Global({value: "i64"}) instanceof Global, true); // No initial value works + + // Coercion of init value; ".value" accessor + assertEq((new Global({value: "i32"}, 3.14)).value, 3); + assertEq((new Global({value: "f32"}, { valueOf: () => 33.5 })).value, 33.5); + assertEq((new Global({value: "f64"}, "3.25")).value, 3.25); + + // Nothing special about NaN, it coerces just fine + assertEq((new Global({value: "i32"}, NaN)).value, 0); + + // The default init value is zero. + assertEq((new Global({value: "i32"})).value, 0); + assertEq((new Global({value: "f32"})).value, 0); + assertEq((new Global({value: "f64"})).value, 0); + let mod = wasmEvalText(`(module + (import "" "g" (global i64)) + (func (export "f") (result i32) + (i64.eqz (global.get 0))))`, + {"":{g: new Global({value: "i64"})}}); + assertEq(mod.exports.f(), 1); + + { + // "value" is enumerable + let x = new Global({value: "i32"}); + let s = ""; + for ( let i in x ) + s = s + i + ","; + if (getBuildConfiguration("release_or_beta")) { + assertEq(s, "valueOf,value,"); + } else { + assertEq(s, "type,valueOf,value,"); + } + } + + // "value" is defined on the prototype, not on the object + assertEq("value" in Global.prototype, true); + + // Can't set the value of an immutable global + assertErrorMessage(() => (new Global({value: "i32"})).value = 10, + TypeError, + /can't set value of immutable global/); + + { + // Can set the value of a mutable global + let g = new Global({value: "i32", mutable: true}, 37); + g.value = 10; + assertEq(g.value, 10); + } + + { + // Misc internal conversions + let g = new Global({value: "i32"}, 42); + + // valueOf + assertEq(g - 5, 37); + + // @@toStringTag + assertEq(g.toString(), "[object WebAssembly.Global]"); + } + + { + // An exported global should appear as a Global instance: + let i = wasmEvalText(`(module (global (export "g") i32 (i32.const 42)))`); + + assertEq(typeof i.exports.g, "object"); + assertEq(i.exports.g instanceof Global, true); + + // An exported global can be imported into another instance even if + // it is an object: + let j = wasmEvalText(`(module + (global (import "" "g") i32) + (func (export "f") (result i32) + (global.get 0)))`, + { "": { "g": i.exports.g }}); + + // And when it is then accessed it has the right value: + assertEq(j.exports.f(), 42); + } + + // Identity of Global objects (independent of mutablity). + { + // When a global is exported twice, the two objects are the same. + let i = wasmEvalText(`(module + (global i32 (i32.const 0)) + (export "a" (global 0)) + (export "b" (global 0)))`); + assertEq(i.exports.a, i.exports.b); + + // When a global is imported and then exported, the exported object is + // the same as the imported object. + let j = wasmEvalText(`(module + (import "" "a" (global i32)) + (export "x" (global 0)))`, + { "": {a: i.exports.a}}); + + assertEq(i.exports.a, j.exports.x); + + // When a global is imported twice (ie aliased) and then exported twice, + // the exported objects are the same, and are also the same as the + // imported object. + let k = wasmEvalText(`(module + (import "" "a" (global i32)) + (import "" "b" (global i32)) + (export "x" (global 0)) + (export "y" (global 1)))`, + { "": {a: i.exports.a, + b: i.exports.a}}); + + assertEq(i.exports.a, k.exports.x); + assertEq(k.exports.x, k.exports.y); + } + + // Mutability + { + let i = wasmEvalText(`(module + (global (export "g") (mut i32) (i32.const 37)) + (func (export "getter") (result i32) + (global.get 0)) + (func (export "setter") (param i32) + (global.set 0 (local.get 0))))`); + + let j = wasmEvalText(`(module + (import "" "g" (global (mut i32))) + (func (export "getter") (result i32) + (global.get 0)) + (func (export "setter") (param i32) + (global.set 0 (local.get 0))))`, + {"": {g: i.exports.g}}); + + // Initial values + assertEq(i.exports.g.value, 37); + assertEq(i.exports.getter(), 37); + assertEq(j.exports.getter(), 37); + + // Set in i, observe everywhere + i.exports.setter(42); + + assertEq(i.exports.g.value, 42); + assertEq(i.exports.getter(), 42); + assertEq(j.exports.getter(), 42); + + // Set in j, observe everywhere + j.exports.setter(78); + + assertEq(i.exports.g.value, 78); + assertEq(i.exports.getter(), 78); + assertEq(j.exports.getter(), 78); + + // Set on global object, observe everywhere + i.exports.g.value = 197; + + assertEq(i.exports.g.value, 197); + assertEq(i.exports.getter(), 197); + assertEq(j.exports.getter(), 197); + } + + // Mutability of import declaration and imported value have to match + { + const mutErr = /imported global mutability mismatch/; + + let m1 = new Module(wasmTextToBinary(`(module + (import "m" "g" (global i32)))`)); + + // Mutable Global matched to immutable import + let gm = new Global({value: "i32", mutable: true}, 42); + assertErrorMessage(() => new Instance(m1, {m: {g: gm}}), + LinkError, + mutErr); + + let m2 = new Module(wasmTextToBinary(`(module + (import "m" "g" (global (mut i32))))`)); + + // Immutable Global matched to mutable import + let gi = new Global({value: "i32", mutable: false}, 42); + assertErrorMessage(() => new Instance(m2, {m: {g: gi}}), + LinkError, + mutErr); + + // Constant value is the same as immutable Global + assertErrorMessage(() => new Instance(m2, {m: {g: 42}}), + LinkError, + mutErr); + } + + // TEST THIS LAST + + // "value" is deletable + assertEq(delete Global.prototype.value, true); + assertEq("value" in Global.prototype, false); + + // ADD NO MORE TESTS HERE! +} + +// Standard wat syntax: the parens around the initializer expression are +// optional. +{ + let i1 = wasmEvalText( + `(module + (global $g i32 i32.const 37) + (func (export "f") (result i32) (global.get $g)))`); + assertEq(i1.exports.f(), 37); + + let i2 = wasmEvalText( + `(module + (global $g (mut f64) f64.const 42.0) + (func (export "f") (result f64) (global.get $g)))`); + assertEq(i2.exports.f(), 42); + + let i3 = wasmEvalText( + `(module + (global $x (import "m" "x") i32) + (global $g i32 global.get $x) + (func (export "f") (result i32) (global.get $g)))`, + {m:{x:86}}); + assertEq(i3.exports.f(), 86); +} diff --git a/js/src/jit-test/tests/wasm/grow-memory.js b/js/src/jit-test/tests/wasm/grow-memory.js new file mode 100644 index 0000000000..702a28e653 --- /dev/null +++ b/js/src/jit-test/tests/wasm/grow-memory.js @@ -0,0 +1,45 @@ +function linearModule(min, max, ops, current_memory, grow_memory) { + var opsText = ops.map(function (op) { + if (op[0] == "CM") { + res = `(if (result i32) (i32.ne (${current_memory}) (i32.const ${op[1]})) + (then (i32.load offset=10 (i32.const 4294967295))) + (else (i32.const 0)))` + } else if (op[0] == "GM") { + res = `(if (result i32) (i32.ne (${grow_memory} (i32.const ${op[1]})) (i32.const ${op[2]})) + (then (i32.load offset=10 (i32.const 4294967295))) + (else (i32.const 0)))` + } else if (op[0] == "L") { + var type = op[1]; + var ext = op[2]; + var off = op[3]; + var loc = op[4] + var align = 0; + res = `(${type}.load${ext} offset=${off} (i32.const ${op[4]}))`; + } else if (op[0] == "S") { + var type = op[1]; + var ext = op[2]; + var off = op[3]; + var loc = op[4] + var align = 0; + res = `(${type}.store${ext} offset=${off} (i32.const ${op[4]}) (i32.const 42))`; + } + return res; + }).join("\n") + + let text = + `(module + (memory ${min} ${max}) + ` + (min != 0 ? `(data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")` + : "") + + ` + (func (result i32) + (drop ` + opsText + `) + (${current_memory}) + ) (export "run" (func 0)))`; + + return text; +} + +// Just grow some memory +wasmFullPass(linearModule(3,5, [["CM", 3]], "memory.size", "memory.grow"), 3); // New opcode names diff --git a/js/src/jit-test/tests/wasm/import-callables.js b/js/src/jit-test/tests/wasm/import-callables.js new file mode 100644 index 0000000000..9053baa575 --- /dev/null +++ b/js/src/jit-test/tests/wasm/import-callables.js @@ -0,0 +1,55 @@ +// Test importing callable object types other than plain functions. + +// Wasm function equivalent to: function run(x) { return timesSeven(x) + 3; } +let bytes = wasmTextToBinary(` + (module + (func $timesSeven (import "imports" "timesSeven") + (param i32) (result i32)) + (func $run (export "run") (param i32) (result i32) + local.get 0 + call $timesSeven + i32.const 3 + i32.add))`); +let mod = new WebAssembly.Module(bytes); + +function test(timesSeven) { + let inst = new WebAssembly.Instance(mod, {imports: {timesSeven}}); + return inst.exports.run(1) + inst.exports.run(3); +} + +// Various supported callables. +let timesSeven = x => x * 7; +assertEq(test(timesSeven), 34); +assertEq(test(timesSeven.bind(null)), 34); +assertEq(test(timesSeven.bind(null, 4)), 62); +assertEq(test(new Proxy(timesSeven, {})), 34); +assertEq(test(wrapWithProto(timesSeven, null)), 34); + +// Test proxy `apply` trap. +let traps = []; +assertEq(test(new Proxy(timesSeven, {apply(target, thisArg, args) { + traps.push(arguments); + return 5; +}})), 16); +assertEq(traps.length, 2); +for (let trap of traps) { + assertEq(trap[0], timesSeven); // target + assertEq(trap[1], undefined); // thisArg + assertEq(trap[2].length, 1); // args +} + +function testThrowsLinkError(f) { + assertErrorMessage(() => test(f), WebAssembly.LinkError, /is not a Function/); +} + +// Non-callables. +testThrowsLinkError({}); +testThrowsLinkError(null); +testThrowsLinkError(this); +testThrowsLinkError(new Proxy({}, {})); +testThrowsLinkError(wrapWithProto({}, null)); + +// Cross-compartment wrappers are currently not supported. +let g = newGlobal({newCompartment: true}); +g.evaluate(`function timesSeven(x) { return x * 7; }`); +testThrowsLinkError(g.timesSeven); diff --git a/js/src/jit-test/tests/wasm/import-export-sigs.js b/js/src/jit-test/tests/wasm/import-export-sigs.js new file mode 100644 index 0000000000..8765d56b15 --- /dev/null +++ b/js/src/jit-test/tests/wasm/import-export-sigs.js @@ -0,0 +1,52 @@ +// |jit-test| skip-if: fuzzingSafe() + +// Tests that function imports and function exports descriptors have +// signatures, in the test mode only, for fuzzers. + +var module = new WebAssembly.Module(wasmTextToBinary(`(module + (import "env" "v_v" (func $vv)) + (export "v_v" (func $vv)) + + (import "env" "v_i" (func $vi (param i32))) + (export "v_i" (func $vi)) + + (import "env" "v_I" (func $vI (param i64))) + (export "v_I" (func $vI)) + + (import "env" "v_f" (func $vf (param f32))) + (export "v_f" (func $vf)) + + (import "env" "memory" (memory $mem 0)) + (export "mem" (memory $mem)) + + (import "env" "v_d" (func $vd (param f64))) + (export "v_d" (func $vd)) + + (import "env" "v_fd" (func $vfd (param f32) (param f64))) + (export "v_fd" (func $vfd)) + + (import "env" "v_Ififd" (func $vIfifd (param i64) (param f32) (param i32) (param f32) (param f64))) + (export "v_Ififd" (func $vIfifd)) + + (import "env" "i_v" (func $iv (result i32))) + (export "i_v" (func $iv)) + + (import "env" "I_i" (func $Ii (param i32) (result i64))) + (export "I_i" (func $Ii)) + + (import "env" "table" (table $table 0 funcref)) + (export "table" (table $table)) + + (import "env" "f_d" (func $fd (param f64) (result f32))) + (export "f_d" (func $fd)) + + (import "env" "d_ffd" (func $dffd (param f32) (param f32) (param f64) (result f64))) + (export "d_ffd" (func $dffd)) +)`)); + +for (let desc of WebAssembly.Module.imports(module)) { + assertEq(typeof desc.signature, 'undefined'); +} +for (let desc of WebAssembly.Module.exports(module)) { + assertEq(typeof desc.signature, 'undefined'); +} diff --git a/js/src/jit-test/tests/wasm/import-export.js b/js/src/jit-test/tests/wasm/import-export.js new file mode 100644 index 0000000000..4845269f24 --- /dev/null +++ b/js/src/jit-test/tests/wasm/import-export.js @@ -0,0 +1,798 @@ +const { Module, Instance, Memory, Table, LinkError, RuntimeError } = WebAssembly; + +const mem1Page = new Memory({initial:1}); +const mem1PageMax1 = new Memory({initial:1, maximum: 1}); +const mem2Page = new Memory({initial:2}); +const mem2PageMax2 = new Memory({initial:2, maximum: 2}); +const mem2PageMax3 = new Memory({initial:2, maximum: 3}); +const mem2PageMax4 = new Memory({initial:2, maximum: 4}); +const mem3Page = new Memory({initial:3}); +const mem3PageMax3 = new Memory({initial:3, maximum: 3}); +const mem4Page = new Memory({initial:4}); +const mem4PageMax4 = new Memory({initial:4, maximum: 4}); +const tab1Elem = new Table({initial:1, element:"anyfunc"}); +const tab2Elem = new Table({initial:2, element:"anyfunc"}); +const tab3Elem = new Table({initial:3, element:"anyfunc"}); +const tab4Elem = new Table({initial:4, element:"anyfunc"}); + +function assertSegmentFitError(f) { + assertErrorMessage(f, RuntimeError, /out of bounds/); +} + +const m1 = new Module(wasmTextToBinary('(module (import "foo" "bar" (func)) (import "baz" "quux" (func)))')); +assertErrorMessage(() => new Instance(m1), TypeError, /second argument must be an object/); +assertErrorMessage(() => new Instance(m1, {foo:null}), TypeError, /import object field 'foo' is not an Object/); +assertErrorMessage(() => new Instance(m1, {foo:{bar:{}}}), LinkError, /import object field 'bar' is not a Function/); +assertErrorMessage(() => new Instance(m1, {foo:{bar:()=>{}}, baz:null}), TypeError, /import object field 'baz' is not an Object/); +assertErrorMessage(() => new Instance(m1, {foo:{bar:()=>{}}, baz:{}}), LinkError, /import object field 'quux' is not a Function/); +assertEq(new Instance(m1, {foo:{bar:()=>{}}, baz:{quux:()=>{}}}) instanceof Instance, true); + +const m2 = new Module(wasmTextToBinary('(module (import "x" "y" (memory 2 3)))')); +assertErrorMessage(() => new Instance(m2), TypeError, /second argument must be an object/); +assertErrorMessage(() => new Instance(m2, {x:null}), TypeError, /import object field 'x' is not an Object/); +assertErrorMessage(() => new Instance(m2, {x:{y:{}}}), LinkError, /import object field 'y' is not a Memory/); +assertErrorMessage(() => new Instance(m2, {x:{y:mem1Page}}), LinkError, /imported Memory with incompatible size/); +assertErrorMessage(() => new Instance(m2, {x:{y:mem1PageMax1}}), LinkError, /imported Memory with incompatible size/); +assertErrorMessage(() => new Instance(m2, {x:{y:mem4Page}}), LinkError, /imported Memory with incompatible size/); +assertErrorMessage(() => new Instance(m2, {x:{y:mem4PageMax4}}), LinkError, /imported Memory with incompatible size/); +assertErrorMessage(() => new Instance(m2, {x:{y:mem2Page}}), LinkError, /imported Memory with incompatible maximum size/); +assertEq(new Instance(m2, {x:{y:mem2PageMax2}}) instanceof Instance, true); +assertErrorMessage(() => new Instance(m2, {x:{y:mem3Page}}), LinkError, /imported Memory with incompatible maximum size/); +assertEq(new Instance(m2, {x:{y:mem3PageMax3}}) instanceof Instance, true); +assertEq(new Instance(m2, {x:{y:mem2PageMax3}}) instanceof Instance, true); +assertErrorMessage(() => new Instance(m2, {x:{y:mem2PageMax4}}), LinkError, /imported Memory with incompatible maximum size/); + +const m3 = new Module(wasmTextToBinary('(module (import "foo" "bar" (memory 1 1)) (import "baz" "quux" (func)))')); +assertErrorMessage(() => new Instance(m3), TypeError, /second argument must be an object/); +assertErrorMessage(() => new Instance(m3, {foo:null}), TypeError, /import object field 'foo' is not an Object/); +assertErrorMessage(() => new Instance(m3, {foo:{bar:{}}}), LinkError, /import object field 'bar' is not a Memory/); +assertErrorMessage(() => new Instance(m3, {foo:{bar:mem1Page}, baz:null}), TypeError, /import object field 'baz' is not an Object/); +assertErrorMessage(() => new Instance(m3, {foo:{bar:mem1Page}, baz:{quux:mem1Page}}), LinkError, /import object field 'quux' is not a Function/); +assertErrorMessage(() => new Instance(m3, {foo:{bar:mem1Page}, baz:{quux:()=>{}}}), LinkError, /imported Memory with incompatible maximum size/); +assertEq(new Instance(m3, {foo:{bar:mem1PageMax1}, baz:{quux:()=>{}}}) instanceof Instance, true); + +const m4 = new Module(wasmTextToBinary('(module (import "baz" "quux" (func)) (import "foo" "bar" (memory 1 1)))')); +assertErrorMessage(() => new Instance(m4), TypeError, /second argument must be an object/); +assertErrorMessage(() => new Instance(m4, {baz:null}), TypeError, /import object field 'baz' is not an Object/); +assertErrorMessage(() => new Instance(m4, {baz:{quux:{}}}), LinkError, /import object field 'quux' is not a Function/); +assertErrorMessage(() => new Instance(m4, {baz:{quux:()=>{}}, foo:null}), TypeError, /import object field 'foo' is not an Object/); +assertErrorMessage(() => new Instance(m4, {baz:{quux:()=>{}}, foo:{bar:()=>{}}}), LinkError, /import object field 'bar' is not a Memory/); +assertErrorMessage(() => new Instance(m4, {baz:{quux:()=>{}}, foo:{bar:mem1Page}}), LinkError, /imported Memory with incompatible maximum size/); +assertEq(new Instance(m3, {baz:{quux:()=>{}}, foo:{bar:mem1PageMax1}}) instanceof Instance, true); + +const m5 = new Module(wasmTextToBinary('(module (import "a" "b" (memory 2)))')); +assertErrorMessage(() => new Instance(m5, {a:{b:mem1Page}}), LinkError, /imported Memory with incompatible size/); +assertEq(new Instance(m5, {a:{b:mem2Page}}) instanceof Instance, true); +assertEq(new Instance(m5, {a:{b:mem3Page}}) instanceof Instance, true); +assertEq(new Instance(m5, {a:{b:mem4Page}}) instanceof Instance, true); + +const m6 = new Module(wasmTextToBinary('(module (import "a" "b" (table 2 funcref)))')); +assertErrorMessage(() => new Instance(m6, {a:{b:tab1Elem}}), LinkError, /imported Table with incompatible size/); +assertEq(new Instance(m6, {a:{b:tab2Elem}}) instanceof Instance, true); +assertEq(new Instance(m6, {a:{b:tab3Elem}}) instanceof Instance, true); +assertEq(new Instance(m6, {a:{b:tab4Elem}}) instanceof Instance, true); + +const m7 = new Module(wasmTextToBinary('(module (import "a" "b" (table 2 3 funcref)))')); +assertErrorMessage(() => new Instance(m7, {a:{b:tab1Elem}}), LinkError, /imported Table with incompatible size/); +assertErrorMessage(() => new Instance(m7, {a:{b:tab2Elem}}), LinkError, /imported Table with incompatible maximum size/); +assertErrorMessage(() => new Instance(m7, {a:{b:tab3Elem}}), LinkError, /imported Table with incompatible maximum size/); +assertErrorMessage(() => new Instance(m7, {a:{b:tab4Elem}}), LinkError, /imported Table with incompatible size/); + +wasmFailValidateText('(module (memory 2 1))', /maximum length 1 is less than initial length 2/); +wasmFailValidateText('(module (import "a" "b" (memory 2 1)))', /maximum length 1 is less than initial length 2/); +wasmFailValidateText('(module (table 2 1 funcref))', /maximum length 1 is less than initial length 2/); +wasmFailValidateText('(module (import "a" "b" (table 2 1 funcref)))', /maximum length 1 is less than initial length 2/); + +// Import wasm-wasm type mismatch + +var e = wasmEvalText('(module (func $i2v (param i32)) (export "i2v" (func $i2v)) (func $f2v (param f32)) (export "f2v" (func $f2v)))').exports; +var i2vm = new Module(wasmTextToBinary('(module (import "a" "b" (func (param i32))))')); +var f2vm = new Module(wasmTextToBinary('(module (import "a" "b" (func (param f32))))')); +assertEq(new Instance(i2vm, {a:{b:e.i2v}}) instanceof Instance, true); +assertErrorMessage(() => new Instance(i2vm, {a:{b:e.f2v}}), LinkError, /imported function 'a.b' signature mismatch/); +assertErrorMessage(() => new Instance(f2vm, {a:{b:e.i2v}}), LinkError, /imported function 'a.b' signature mismatch/); +assertEq(new Instance(f2vm, {a:{b:e.f2v}}) instanceof Instance, true); +var l2vm = new Module(wasmTextToBinary('(module (import "x" "y" (memory 1)) (import "c" "d" (func (param i64))))')); +assertErrorMessage(() => new Instance(l2vm, {x:{y:mem1Page}, c:{d:e.i2v}}), LinkError, /imported function 'c.d' signature mismatch/); + +// Import order: + +var arr = []; +var importObj = { + get foo() { arr.push("foo") }, + get baz() { arr.push("bad") }, +}; +assertErrorMessage(() => new Instance(m1, importObj), TypeError, /import object field 'foo' is not an Object/); +assertEq(arr.join(), "foo"); + +var arr = []; +var importObj = { + get foo() { + arr.push("foo"); + return { get bar() { arr.push("bar"); return null } } + }, + get baz() { arr.push("bad") }, +}; +assertErrorMessage(() => new Instance(m1, importObj), LinkError, /import object field 'bar' is not a Function/); +assertEq(arr.join(), "foo,bar"); + +var arr = []; +var importObj = { + get foo() { + arr.push("foo"); + return { get bar() { arr.push("bar"); return () => arr.push("bad") } } + }, + get baz() { + arr.push("baz"); + return { get quux() { arr.push("quux"); return () => arr.push("bad") } } + } +}; +assertEq(new Instance(m1, importObj) instanceof Instance, true); +assertEq(arr.join(), "foo,bar,baz,quux"); + +var arr = []; +var importObj = { + get foo() { + arr.push("foo"); + return { get bar() { arr.push("bar"); return new WebAssembly.Memory({initial:1, maximum:1}) } } + }, + get baz() { + arr.push("baz"); + return { get quux() { arr.push("quux"); return () => arr.push("bad") } } + } +}; +assertEq(new Instance(m3, importObj) instanceof Instance, true); +assertEq(arr.join(), "foo,bar,baz,quux"); +arr = []; +assertEq(new Instance(m4, importObj) instanceof Instance, true); +assertEq(arr.join(), "baz,quux,foo,bar"); + +// Export key order: + +var code = wasmTextToBinary('(module)'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).length, 0); + +var code = wasmTextToBinary('(module (func) (export "foo" (func 0)))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "foo"); +assertEq(e.foo(), undefined); + +var code = wasmTextToBinary('(module (func) (export "foo" (func 0)) (export "bar" (func 0)))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "foo,bar"); +assertEq(e.foo(), undefined); +assertEq(e.bar(), undefined); +assertEq(e.foo, e.bar); + +var code = wasmTextToBinary('(module (memory 1 1) (export "memory" (memory 0)))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "memory"); + +var code = wasmTextToBinary('(module (memory 1 1) (export "foo" (memory 0)) (export "bar" (memory 0)))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "foo,bar"); +assertEq(e.foo, e.bar); +assertEq(e.foo instanceof Memory, true); +assertEq(e.foo.buffer.byteLength, 64*1024); + +var code = wasmTextToBinary('(module (memory 1 1) (func) (export "foo" (func 0)) (export "bar" (memory 0)))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "foo,bar"); +assertEq(e.foo(), undefined); +assertEq(e.bar instanceof Memory, true); +assertEq(e.bar instanceof Memory, true); +assertEq(e.bar.buffer.byteLength, 64*1024); + +var code = wasmTextToBinary('(module (memory 1 1) (func) (export "bar" (memory 0)) (export "foo" (func 0)))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "bar,foo"); +assertEq(e.foo(), undefined); +assertEq(e.bar.buffer.byteLength, 64*1024); + +var code = wasmTextToBinary('(module (memory 1 1) (export "" (memory 0)))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).length, 1); +assertEq(String(Object.keys(e)), ""); +assertEq(e[""] instanceof Memory, true); + +var code = wasmTextToBinary('(module (table 0 funcref) (export "tbl" (table 0)))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "tbl"); +assertEq(e.tbl instanceof Table, true); +assertEq(e.tbl.length, 0); + +var code = wasmTextToBinary('(module (table 2 funcref) (export "t1" (table 0)) (export "t2" (table 0)))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "t1,t2"); +assertEq(e.t1 instanceof Table, true); +assertEq(e.t2 instanceof Table, true); +assertEq(e.t1, e.t2); +assertEq(e.t1.length, 2); + +var code = wasmTextToBinary('(module (table 2 funcref) (memory 1 1) (func) (export "t" (table 0)) (export "m" (memory 0)) (export "f" (func 0)))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "t,m,f"); +assertEq(e.f(), undefined); +assertEq(e.t instanceof Table, true); +assertEq(e.m instanceof Memory, true); +assertEq(e.t.length, 2); + +var code = wasmTextToBinary('(module (table 1 funcref) (memory 1 1) (func) (export "m" (memory 0)) (export "f" (func 0)) (export "t" (table 0)))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).join(), "m,f,t"); +assertEq(e.f(), undefined); +assertEq(e.t instanceof Table, true); +assertEq(e.m instanceof Memory, true); ++assertEq(e.t.length, 1); + +var code = wasmTextToBinary('(module (table 0 funcref) (export "" (table 0)))'); +var e = new Instance(new Module(code)).exports; +assertEq(Object.keys(e).length, 1); +assertEq(String(Object.keys(e)), ""); +assertEq(e[""] instanceof Table, true); ++assertEq(e[""].length, 0); + +// Table export function identity + +var text = `(module + (func $f (result i32) (i32.const 1)) + (func $g (result i32) (i32.const 2)) + (func $h (result i32) (i32.const 3)) + (table 4 funcref) + (elem (i32.const 0) $f) + (elem (i32.const 2) $g) + (export "f1" (func $f)) + (export "tbl1" (table 0)) + (export "f2" (func $f)) + (export "tbl2" (table 0)) + (export "f3" (func $h)) + (func (export "run") (result i32) (call_indirect (type 0) (i32.const 2))) +)`; +wasmFullPass(text, 2); +var e = new Instance(new Module(wasmTextToBinary(text))).exports; +assertEq(String(Object.keys(e)), "f1,tbl1,f2,tbl2,f3,run"); +assertEq(e.f1, e.f2); +assertEq(e.f1(), 1); +assertEq(e.f3(), 3); +assertEq(e.tbl1, e.tbl2); +assertEq(e.tbl1.get(0), e.f1); +assertEq(e.tbl1.get(0), e.tbl1.get(0)); +assertEq(e.tbl1.get(0)(), 1); +assertEq(e.tbl1.get(1), null); +assertEq(e.tbl1.get(2), e.tbl1.get(2)); +assertEq(e.tbl1.get(2)(), 2); +assertEq(e.tbl1.get(3), null); +assertErrorMessage(() => e.tbl1.get(4), RangeError, /bad Table get index/); +assertEq(e.tbl1.get(1), null); +e.tbl1.set(1, e.f3); +assertEq(e.tbl1.get(1), e.f3); +e.tbl1.set(1, null); +assertEq(e.tbl1.get(1), null); +e.tbl1.set(3, e.f1); +assertEq(e.tbl1.get(0), e.tbl1.get(3)); + +// JS re-exports + +var args; +var m = new Module(wasmTextToBinary(`(module + (export "a" (func $a)) (import "" "a" (func $a (param f32))) + (export "b" (func $b)) (import "" "b" (func $b (param i32) (result i32))) + (export "c" (func $c)) (import "" "c" (func $c (result i32))) + (export "d" (func $d)) (import "" "d" (func $d)) +)`)); +var js = function() { args = arguments; return 42 } +var e = new Instance(m, {"":{a:js, b:js, c:js, d:js}}).exports; +assertEq(e.a.length, 1); +assertEq(e.a(), undefined); +assertEq(args.length, 1); +assertEq(args[0], NaN); +assertEq(e.a(99.5), undefined); +assertEq(args.length, 1); +assertEq(args[0], 99.5); +assertEq(e.b.length, 1); +assertEq(e.b(), 42); +assertEq(args.length, 1); +assertEq(args[0], 0); +assertEq(e.b(99.5), 42); +assertEq(args.length, 1); +assertEq(args[0], 99); +assertEq(e.c.length, 0); +assertEq(e.c(), 42); +assertEq(args.length, 0); +assertEq(e.c(99), 42); +assertEq(args.length, 0); +assertEq(e.d.length, 0); +assertEq(e.d(), undefined); +assertEq(args.length, 0); +assertEq(e.d(99), undefined); +assertEq(args.length, 0); + +// Re-exports and Identity: + +var code = wasmTextToBinary('(module (import "a" "b" (memory 1 1)) (export "foo" (memory 0)) (export "bar" (memory 0)))'); +var mem = new Memory({initial:1, maximum:1}); +var e = new Instance(new Module(code), {a:{b:mem}}).exports; +assertEq(mem, e.foo); +assertEq(mem, e.bar); + +var code = wasmTextToBinary('(module (import "a" "b" (table 1 1 funcref)) (export "foo" (table 0)) (export "bar" (table 0)))'); +var tbl = new Table({initial:1, maximum:1, element:"anyfunc"}); +var e = new Instance(new Module(code), {a:{b:tbl}}).exports; +assertEq(tbl, e.foo); +assertEq(tbl, e.bar); + +var code = wasmTextToBinary('(module (import "a" "b" (table 2 2 funcref)) (func $foo) (elem (i32.const 0) $foo) (export "foo" (func $foo)))'); +var tbl = new Table({initial:2, maximum:2, element:"anyfunc"}); +var e1 = new Instance(new Module(code), {a:{b:tbl}}).exports; +assertEq(e1.foo, tbl.get(0)); +tbl.set(1, e1.foo); +assertEq(e1.foo, tbl.get(1)); +var e2 = new Instance(new Module(code), {a:{b:tbl}}).exports; +assertEq(e2.foo, tbl.get(0)); +assertEq(e1.foo, tbl.get(1)); +assertEq(tbl.get(0) === e1.foo, false); +assertEq(e1.foo === e2.foo, false); + +var m = new Module(wasmTextToBinary(`(module + (import "" "foo" (func $foo (result i32))) + (import "" "bar" (func $bar (result i32))) + (table 3 funcref) + (func $baz (result i32) (i32.const 13)) + (elem (i32.const 0) $foo $bar $baz) + (export "foo" (func $foo)) + (export "bar" (func $bar)) + (export "baz" (func $baz)) + (export "tbl" (table 0)) +)`)); +var jsFun = () => 83; +var wasmFun = new Instance(new Module(wasmTextToBinary('(module (func (result i32) (i32.const 42)) (export "foo" (func 0)))'))).exports.foo; +var e1 = new Instance(m, {"":{foo:jsFun, bar:wasmFun}}).exports; +assertEq(jsFun === e1.foo, false); +assertEq(wasmFun, e1.bar); +assertEq(e1.foo, e1.tbl.get(0)); +assertEq(e1.bar, e1.tbl.get(1)); +assertEq(e1.baz, e1.tbl.get(2)); +assertEq(e1.tbl.get(0)(), 83); +assertEq(e1.tbl.get(1)(), 42); +assertEq(e1.tbl.get(2)(), 13); +var e2 = new Instance(m, {"":{foo:jsFun, bar:jsFun}}).exports; +assertEq(jsFun === e2.foo, false); +assertEq(jsFun === e2.bar, false); +assertEq(e2.foo === e1.foo, false); +assertEq(e2.bar === e1.bar, false); +assertEq(e2.baz === e1.baz, false); +assertEq(e2.tbl === e1.tbl, false); +assertEq(e2.foo, e2.tbl.get(0)); +assertEq(e2.bar, e2.tbl.get(1)); +assertEq(e2.baz, e2.tbl.get(2)); +var e3 = new Instance(m, {"":{foo:wasmFun, bar:wasmFun}}).exports; +assertEq(wasmFun, e3.foo); +assertEq(wasmFun, e3.bar); +assertEq(e3.baz === e3.foo, false); +assertEq(e3.baz === e1.baz, false); +assertEq(e3.tbl === e1.tbl, false); +assertEq(e3.foo, e3.tbl.get(0)); +assertEq(e3.bar, e3.tbl.get(1)); +assertEq(e3.baz, e3.tbl.get(2)); +var e4 = new Instance(m, {"":{foo:e1.foo, bar:e1.foo}}).exports; +assertEq(e4.foo, e1.foo); +assertEq(e4.bar, e1.foo); +assertEq(e4.baz === e4.foo, false); +assertEq(e4.baz === e1.baz, false); +assertEq(e4.tbl === e1.tbl, false); +assertEq(e4.foo, e4.tbl.get(0)); +assertEq(e4.foo, e4.tbl.get(1)); +assertEq(e4.baz, e4.tbl.get(2)); + +// i64 is fully allowed for imported wasm functions + +var code1 = wasmTextToBinary('(module (func $exp (param i64) (result i64) (i64.add (local.get 0) (i64.const 10))) (export "exp" (func $exp)))'); +var e1 = new Instance(new Module(code1)).exports; +var code2 = wasmTextToBinary('(module (import "a" "b" (func $i (param i64) (result i64))) (func $f (result i32) (i32.wrap_i64 (call $i (i64.const 42)))) (export "f" (func $f)))'); +var e2 = new Instance(new Module(code2), {a:{b:e1.exp}}).exports; +assertEq(e2.f(), 52); + +// Non-existent export errors + +wasmFailValidateText('(module (export "a" (func 0)))', /exported function index out of bounds/); +wasmFailValidateText('(module (export "a" (global 0)))', /exported global index out of bounds/); +wasmFailValidateText('(module (export "a" (memory 0)))', /exported memory index out of bounds/); +wasmFailValidateText('(module (export "a" (table 0)))', /exported table index out of bounds/); + +// Default memory/table rules + +wasmFailValidateText('(module (import "a" "b" (memory 1 1)) (memory 1 1))', /already have default memory/); +wasmFailValidateText('(module (import "a" "b" (memory 1 1)) (import "x" "y" (memory 2 2)))', /already have default memory/); + +// Data segments on imports + +var m = new Module(wasmTextToBinary(` + (module + (import "a" "b" (memory 1 1)) + (data (i32.const 0) "\\0a\\0b") + (data (i32.const 100) "\\0c\\0d") + (func $get (param $p i32) (result i32) + (i32.load8_u (local.get $p))) + (export "get" (func $get))) +`)); +var mem = new Memory({initial:1, maximum:1}); +var {get} = new Instance(m, {a:{b:mem}}).exports; +assertEq(get(0), 0xa); +assertEq(get(1), 0xb); +assertEq(get(2), 0x0); +assertEq(get(100), 0xc); +assertEq(get(101), 0xd); +assertEq(get(102), 0x0); +var i8 = new Uint8Array(mem.buffer); +assertEq(i8[0], 0xa); +assertEq(i8[1], 0xb); +assertEq(i8[2], 0x0); +assertEq(i8[100], 0xc); +assertEq(i8[101], 0xd); +assertEq(i8[102], 0x0); + +// Data segments with imported offsets + +var m = new Module(wasmTextToBinary(` + (module + (import "glob" "a" (global i32)) + (memory 1) + (data (global.get 0) "\\0a\\0b")) +`)); +assertEq(new Instance(m, {glob:{a:0}}) instanceof Instance, true); +assertEq(new Instance(m, {glob:{a:(64*1024 - 2)}}) instanceof Instance, true); +assertSegmentFitError(() => new Instance(m, {glob:{a:(64*1024 - 1)}})); +assertSegmentFitError(() => new Instance(m, {glob:{a:64*1024}})); + +var m = new Module(wasmTextToBinary(` + (module + (memory 1) + (data (i32.const 0x10001) "\\0a\\0b")) +`)); +assertSegmentFitError(() => new Instance(m)); + +var m = new Module(wasmTextToBinary(` + (module + (memory 0) + (data (i32.const 0x10001) "")) +`)); +assertSegmentFitError(() => new Instance(m)); + +// Errors during segment initialization do not have observable effects +// and are checked against the actual memory/table length, not the declared +// initial length. + +var m = new Module(wasmTextToBinary(` + (module + (import "a" "mem" (memory 1)) + (import "a" "tbl" (table 1 funcref)) + (import "a" "memOff" (global $memOff i32)) + (import "a" "tblOff" (global $tblOff i32)) + (func $f) + (func $g) + (data (i32.const 0) "\\01") + (elem (i32.const 0) $f) + (data (global.get $memOff) "\\02") + (elem (global.get $tblOff) $g) + (export "f" (func $f)) + (export "g" (func $g))) +`)); + +// Active segments are applied in order (this is observable if they overlap). +// +// Without bulk memory, all range checking for tables and memory happens before +// any writes happen, and any OOB will force no writing to happen at all. +// +// With bulk memory, active segments are applied first for tables and then for +// memories. Bounds checking happens for each byte or table element written. +// The first OOB aborts the initialization process, leaving written data in +// place. Notably, any OOB in table initialization will prevent any memory +// initialization from happening at all. + +var npages = 2; +var mem = new Memory({initial:npages}); +var mem8 = new Uint8Array(mem.buffer); +var tbl = new Table({initial:2, element:"anyfunc"}); + +assertSegmentFitError(() => new Instance(m, {a:{mem, tbl, memOff:1, tblOff:2}})); +// The first active element segment is applied, but the second active +// element segment is completely OOB. +assertEq(typeof tbl.get(0), "function"); +assertEq(tbl.get(1), null); + +assertEq(mem8[0], 0); +assertEq(mem8[1], 0); + +tbl.set(0, null); +tbl.set(1, null); + +assertSegmentFitError(() => new Instance(m, {a:{mem, tbl, memOff:npages*64*1024, tblOff:1}})); +// The first and second active element segments are applied fully. The +// first active data segment applies, but the second one is completely OOB. +assertEq(typeof tbl.get(0), "function"); +assertEq(typeof tbl.get(1), "function"); +assertEq(mem8[0], 1); + +tbl.set(0, null); +tbl.set(1, null); +mem8[0] = 0; + +// Both element and data segments apply successfully without OOB + +var i = new Instance(m, {a:{mem, tbl, memOff:npages*64*1024-1, tblOff:1}}); +assertEq(mem8[0], 1); +assertEq(mem8[npages*64*1024-1], 2); +assertEq(tbl.get(0), i.exports.f); +assertEq(tbl.get(1), i.exports.g); + +// Element segment doesn't apply and prevents subsequent elem segment and +// data segment from being applied. + +var m = new Module(wasmTextToBinary( + `(module + (import "" "mem" (memory 1)) + (import "" "tbl" (table 3 funcref)) + (elem (i32.const 1) $f $g $h) ;; fails after $f and $g + (elem (i32.const 0) $f) ;; is not applied + (data (i32.const 0) "\\01") ;; is not applied + (func $f) + (func $g) + (func $h))`)); +var mem = new Memory({initial:1}); +var tbl = new Table({initial:3, element:"anyfunc"}); +assertSegmentFitError(() => new Instance(m, {"":{mem, tbl}})); +assertEq(tbl.get(0), null); +assertEq(tbl.get(1), null); +assertEq(tbl.get(2), null); +var v = new Uint8Array(mem.buffer); +assertEq(v[0], 0); + +// Data segment doesn't apply and prevents subsequent data segment from +// being applied. + +var m = new Module(wasmTextToBinary( + `(module + (import "" "mem" (memory 1)) + (data (i32.const 65534) "\\01\\02\\03") ;; fails after 1 and 2 + (data (i32.const 0) "\\04") ;; is not applied + )`)); +var mem = new Memory({initial:1}); +assertSegmentFitError(() => new Instance(m, {"":{mem}})); +var v = new Uint8Array(mem.buffer); +assertEq(v[65534], 0); +assertEq(v[65535], 0); +assertEq(v[0], 0); + +// Elem segments on imported tables + +var m = new Module(wasmTextToBinary(` + (module + (import "a" "b" (table 10 funcref)) + (elem (i32.const 0) $one $two) + (elem (i32.const 3) $three $four) + (func $one (result i32) (i32.const 1)) + (func $two (result i32) (i32.const 2)) + (func $three (result i32) (i32.const 3)) + (func $four (result i32) (i32.const 4))) +`)); +var tbl = new Table({initial:10, element:"anyfunc"}); +new Instance(m, {a:{b:tbl}}); +assertEq(tbl.get(0)(), 1); +assertEq(tbl.get(1)(), 2); +assertEq(tbl.get(2), null); +assertEq(tbl.get(3)(), 3); +assertEq(tbl.get(4)(), 4); +for (var i = 5; i < 10; i++) + assertEq(tbl.get(i), null); + +var m = new Module(wasmTextToBinary(` + (module + (func $their1 (import "" "func") (result i32)) + (func $their2 (import "" "func")) + (table (import "" "table") 4 funcref) + (func $my (result i32) i32.const 13) + (elem (i32.const 1) $my) + (elem (i32.const 2) $their1) + (elem (i32.const 3) $their2) + ) +`)); +var tbl = new Table({initial:4, element:"anyfunc"}); +var f = () => 42; +new Instance(m, { "": { table: tbl, func: f} }); +assertEq(tbl.get(0), null); +assertEq(tbl.get(1)(), 13); +assertEq(tbl.get(2)(), 42); +assertEq(tbl.get(3)(), undefined); + +// Cross-instance calls + +var i1 = new Instance(new Module(wasmTextToBinary(`(module (func) (func (param i32) (result i32) (i32.add (local.get 0) (i32.const 1))) (func) (export "f" (func 1)))`))); +var i2 = new Instance(new Module(wasmTextToBinary(`(module (import "a" "b" (func $imp (param i32) (result i32))) (func $g (result i32) (call $imp (i32.const 13))) (export "g" (func $g)))`)), {a:{b:i1.exports.f}}); +assertEq(i2.exports.g(), 14); + +var i1 = new Instance(new Module(wasmTextToBinary(`(module + (memory 1 1) + (data (i32.const 0) "\\42") + (func $f (result i32) (i32.load (i32.const 0))) + (export "f" (func $f)) +)`))); +var i2 = new Instance(new Module(wasmTextToBinary(`(module + (import "a" "b" (func $imp (result i32))) + (memory 1 1) + (data (i32.const 0) "\\13") + (table 2 2 funcref) + (elem (i32.const 0) $imp $def) + (func $def (result i32) (i32.load (i32.const 0))) + (type $v2i (func (result i32))) + (func $call (param i32) (result i32) (call_indirect (type $v2i) (local.get 0))) + (export "call" (func $call)) +)`)), {a:{b:i1.exports.f}}); +assertEq(i2.exports.call(0), 0x42); +assertEq(i2.exports.call(1), 0x13); + +var m = new Module(wasmTextToBinary(`(module + (import "a" "val" (global $val i32)) + (import "a" "next" (func $next (result i32))) + (memory 1) + (func $start (i32.store (i32.const 0) (global.get $val))) + (start $start) + (func $call (result i32) + (i32.add + (global.get $val) + (i32.add + (i32.load (i32.const 0)) + (call $next)))) + (export "call" (func $call)) +)`)); +var e = {call:() => 1000}; +for (var i = 0; i < 10; i++) + e = new Instance(m, {a:{val:i, next:e.call}}).exports; +assertEq(e.call(), 1090); + +(function testImportJitExit() { + let options = getJitCompilerOptions(); + if (!options['baseline.enable']) + return; + + let baselineTrigger = options['baseline.warmup.trigger']; + + let valueToConvert = 0; + function ffi(n) { if (n == 1337) { return valueToConvert }; return 42; } + + function sum(a, b, c) { + if (a === 1337) + return valueToConvert; + return (a|0) + (b|0) + (c|0) | 0; + } + + // Baseline compile ffis. + for (let i = baselineTrigger + 1; i --> 0;) { + ffi(i); + sum((i%2)?i:undefined, + (i%3)?i:undefined, + (i%4)?i:undefined); + } + + let imports = { + a: { + ffi, + sum + } + }; + + i = wasmEvalText(`(module + (import "a" "ffi" (func $ffi (param i32) (result i32))) + + (import "a" "sum" (func $missingOneArg (param i32) (param i32) (result i32))) + (import "a" "sum" (func $missingTwoArgs (param i32) (result i32))) + (import "a" "sum" (func $missingThreeArgs (result i32))) + + (func (export "foo") (param i32) (result i32) + local.get 0 + call $ffi + ) + + (func (export "missThree") (result i32) + call $missingThreeArgs + ) + + (func (export "missTwo") (param i32) (result i32) + local.get 0 + call $missingTwoArgs + ) + + (func (export "missOne") (param i32) (param i32) (result i32) + local.get 0 + local.get 1 + call $missingOneArg + ) + )`, imports).exports; + + // Enable the jit exit for each JS callee. + assertEq(i.foo(0), 42); + + assertEq(i.missThree(), 0); + assertEq(i.missTwo(42), 42); + assertEq(i.missOne(13, 37), 50); + + // Test the jit exit under normal conditions. + assertEq(i.foo(0), 42); + assertEq(i.foo(1337), 0); + + // Test the arguments rectifier. + assertEq(i.missThree(), 0); + assertEq(i.missTwo(-1), -1); + assertEq(i.missOne(23, 10), 33); + + // Test OOL coercion. + valueToConvert = 2**31; + assertEq(i.foo(1337), -(2**31)); + + // Test OOL error path. + valueToConvert = { valueOf() { throw new Error('make ffi great again'); } } + assertErrorMessage(() => i.foo(1337), Error, "make ffi great again"); + + valueToConvert = { toString() { throw new Error('a FFI to believe in'); } } + assertErrorMessage(() => i.foo(1337), Error, "a FFI to believe in"); + + // Test the error path in the arguments rectifier. + assertErrorMessage(() => i.missTwo(1337), Error, "a FFI to believe in"); +})(); + +(function testCrossRealmImport() { + var g = newGlobal({sameCompartmentAs: this}); + g.evaluate("function f1() { assertCorrectRealm(); return 123; }"); + g.mem = new Memory({initial:8}); + + // The memory.size builtin asserts cx->realm matches instance->realm so + // we call it here. + var i1 = new Instance(new Module(wasmTextToBinary(` + (module + (import "a" "f1" (func $imp1 (result i32))) + (import "a" "f2" (func $imp2 (result i32))) + (import "a" "m" (memory 1)) + (func $test (result i32) + (i32.add + (i32.add + (i32.add (memory.size) (call $imp1)) + (memory.size)) + (call $imp2))) + (export "impstub" (func $imp1)) + (export "test" (func $test))) + `)), {a:{m:g.mem, f1:g.f1, f2:g.Math.abs}}); + + for (var i = 0; i < 20; i++) { + assertEq(i1.exports.impstub(), 123); + assertEq(i1.exports.test(), 139); + } + + // Inter-module/inter-realm wasm => wasm calls. + var src = ` + (module + (import "a" "othertest" (func $imp (result i32))) + (import "a" "m" (memory 1)) + (func (result i32) (i32.add (call $imp) (memory.size))) + (export "test" (func 1))) + `; + g.i1 = i1; + g.evaluate("i2 = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`" + src + "`)), {a:{m:mem,othertest:i1.exports.test}})"); + for (var i = 0; i < 20; i++) + assertEq(g.i2.exports.test(), 147); +})(); + +// The name presented in toString and as the fn.name property is the index of the +// function within the module. See bug 1714505 for analysis. + +var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (func (export "myfunc") (result i32) + (i32.const 1337)) + (func $hi (result i32) + (i32.const 3)) + (func $abracadabra (export "bletch") (result i32) + (i32.const -1)))`))) +assertEq(String(ins.exports.myfunc), "function 0() {\n [native code]\n}") +assertEq(ins.exports.myfunc.name, "0"); +assertEq(String(ins.exports.bletch), "function 2() {\n [native code]\n}") +assertEq(ins.exports.bletch.name, "2") diff --git a/js/src/jit-test/tests/wasm/import-gc.js b/js/src/jit-test/tests/wasm/import-gc.js new file mode 100644 index 0000000000..02caea73d9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/import-gc.js @@ -0,0 +1,62 @@ +// |jit-test| --no-baseline; --no-blinterp +// Turn off baseline and since it messes up the GC finalization assertions by +// adding spurious edges to the GC graph. + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; + +const m1 = new Module(wasmTextToBinary(`(module (func $f) (export "f" (func $f)))`)); +const m2 = new Module(wasmTextToBinary(`(module (import "a" "f" (func)) (func $f) (export "g" (func $f)))`)); + +// Imported instance objects should stay alive as long as any importer is alive. +resetFinalizeCount(); +var i1 = new Instance(m1); +var i2 = new Instance(m2, {a:i1.exports}); +var f = i1.exports.f; +var g = i2.exports.g; +i1.edge = makeFinalizeObserver(); +i2.edge = makeFinalizeObserver(); +f.edge = makeFinalizeObserver(); +g.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 0); +i1.exports = null; +f = null; +gc(); +assertEq(finalizeCount(), 0); +i2 = null; +gc(); +assertEq(finalizeCount(), 0); +i1 = null; +gc(); +assertEq(finalizeCount(), 0); +g = null; +gc(); +assertEq(finalizeCount(), 4); + +// ...but the importee doesn't keep the importer alive. +resetFinalizeCount(); +var i1 = new Instance(m1); +var i2 = new Instance(m2, {a:i1.exports}); +var f = i1.exports.f; +var g = i2.exports.g; +i1.edge = makeFinalizeObserver(); +i2.edge = makeFinalizeObserver(); +f.edge = makeFinalizeObserver(); +g.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 0); +i2.exports = null; +g = null; +gc(); +assertEq(finalizeCount(), 0); +i2 = null; +gc(); +assertEq(finalizeCount(), 2); +i1.exports = null; +f = null; +gc(); +assertEq(finalizeCount(), 2); +i1 = null; +gc(); +assertEq(finalizeCount(), 4); diff --git a/js/src/jit-test/tests/wasm/integer.js b/js/src/jit-test/tests/wasm/integer.js new file mode 100644 index 0000000000..c8284cf539 --- /dev/null +++ b/js/src/jit-test/tests/wasm/integer.js @@ -0,0 +1,397 @@ +assertEq(wasmEvalText('(module (func (result i32) (i32.const -1)) (export "" (func 0)))').exports[""](), -1); +assertEq(wasmEvalText('(module (func (result i32) (i32.const -2147483648)) (export "" (func 0)))').exports[""](), -2147483648); +assertEq(wasmEvalText('(module (func (result i32) (i32.const 4294967295)) (export "" (func 0)))').exports[""](), -1); + +function testUnary(type, opcode, op, expect) { + if (type === 'i64') { + // Test with constant + wasmFullPassI64(`(module (func $run (result ${type}) (${type}.${opcode} (${type}.const ${op}))))`, expect); + // Test with param + wasmFullPassI64(`(module (func $run (param ${type}) (result ${type}) (${type}.${opcode} (local.get 0))))`, expect, {}, `i64.const ${op}`); + return; + } + // Test with constant + wasmFullPass(`(module (func (result ${type}) (${type}.${opcode} (${type}.const ${op}))) (export "run" (func 0)))`, expect); + // Test with param + wasmFullPass(`(module (func (param ${type}) (result ${type}) (${type}.${opcode} (local.get 0))) (export "run" (func 0)))`, expect, {}, op); +} + +function testBinary64(opcode, lhs, rhs, expect) { + let lsrc = `i64.const ${lhs}`; + let rsrc = `i64.const ${rhs}`; + wasmFullPassI64(`(module (func $run (param i64) (param i64) (result i64) (i64.${opcode} (local.get 0) (local.get 1))))`, expect, {}, lsrc, rsrc); + // The same, but now the RHS is a constant. + wasmFullPassI64(`(module (func $run (param i64) (result i64) (i64.${opcode} (local.get 0) (i64.const ${rhs}))))`, expect, {}, lsrc); + // LHS and RHS are constants. + wasmFullPassI64(`(module (func $run (result i64) (i64.${opcode} (i64.const ${lhs}) (i64.const ${rhs}))))`, expect); +} + +function testBinary32(opcode, lhs, rhs, expect) { + wasmFullPass(`(module (func (param i32) (param i32) (result i32) (i32.${opcode} (local.get 0) (local.get 1))) (export "run" (func 0)))`, expect, {}, lhs, rhs); + // The same, but now the RHS is a constant. + wasmFullPass(`(module (func (param i32) (result i32) (i32.${opcode} (local.get 0) (i32.const ${rhs}))) (export "run" (func 0)))`, expect, {}, lhs); + // LHS and RHS are constants. + wasmFullPass(`(module (func (result i32) (i32.${opcode} (i32.const ${lhs}) (i32.const ${rhs}))) (export "run" (func 0)))`, expect); +} + +function testComparison32(opcode, lhs, rhs, expect) { + wasmFullPass(`(module (func (param i32) (param i32) (result i32) (i32.${opcode} (local.get 0) (local.get 1))) (export "run" (func 0)))`, expect, {}, lhs, rhs); +} +function testComparison64(opcode, lhs, rhs, expect) { + let lsrc = `i64.const ${lhs}`; + let rsrc = `i64.const ${rhs}`; + + wasmFullPass(`(module + (func $cmp (param i64) (param i64) (result i32) (i64.${opcode} (local.get 0) (local.get 1))) + (func $assert (result i32) + i64.const ${lhs} + i64.const ${rhs} + call $cmp + ) + (export "run" (func $assert)))`, expect); + + // Also test `if`, for the compare-and-branch path. + wasmFullPass(`(module + (func $cmp (param i64) (param i64) (result i32) + (if (result i32) (i64.${opcode} (local.get 0) (local.get 1)) + (then (i32.const 1)) + (else (i32.const 0)))) + (func $assert (result i32) + i64.const ${lhs} + i64.const ${rhs} + call $cmp + ) + (export "run" (func $assert)))`, expect); +} + +function testI64Eqz(input, expect) { + wasmFullPass(`(module (func (result i32) (i64.eqz (i64.const ${input}))) (export "run" (func 0)))`, expect, {}); + wasmFullPass(`(module + (func (param i64) (result i32) (i64.eqz (local.get 0))) + (func $assert (result i32) (i64.const ${input}) (call 0)) + (export "run" (func $assert)))`, expect); +} + +function testTrap32(opcode, lhs, rhs, expect) { + assertErrorMessage(() => wasmEvalText(`(module (func (param i32) (param i32) (result i32) (i32.${opcode} (local.get 0) (local.get 1))) (export "" (func 0)))`).exports[""](lhs, rhs), Error, expect); + // The same, but now the RHS is a constant. + assertErrorMessage(() => wasmEvalText(`(module (func (param i32) (result i32) (i32.${opcode} (local.get 0) (i32.const ${rhs}))) (export "" (func 0)))`).exports[""](lhs), Error, expect); + // LHS and RHS are constants. + assertErrorMessage(wasmEvalText(`(module (func (result i32) (i32.${opcode} (i32.const ${lhs}) (i32.const ${rhs}))) (export "" (func 0)))`).exports[""], Error, expect); +} + +function testTrap64(opcode, lhs, rhs, expect) { + let $call = ``; + + assertErrorMessage(wasmEvalText(`(module + (func (param i64) (param i64) (result i64) (i64.${opcode} (local.get 0) (local.get 1))) + (func $f (export "") (i64.const ${lhs}) (i64.const ${rhs}) (call 0) drop) + )`).exports[""], Error, expect); + // The same, but now the RHS is a constant. + assertErrorMessage(wasmEvalText(`(module + (func (param i64) (result i64) (i64.${opcode} (local.get 0) (i64.const ${rhs}))) + (func $f (export "") (i64.const ${lhs}) (call 0) drop) + )`).exports[""], Error, expect); + // LHS and RHS are constants. + assertErrorMessage(wasmEvalText(`(module + (func (result i64) (i64.${opcode} (i64.const ${lhs}) (i64.const ${rhs}))) + (func $f (export "") (call 0) drop) + )`).exports[""], Error, expect); +} + +testUnary('i32', 'clz', 40, 26); +testUnary('i32', 'clz', 0, 32); +testUnary('i32', 'clz', 0xFFFFFFFF, 0); +testUnary('i32', 'clz', -2147483648, 0); + +testUnary('i32', 'ctz', 40, 3); +testUnary('i32', 'ctz', 0, 32); +testUnary('i32', 'ctz', -2147483648, 31); + +testUnary('i32', 'popcnt', 40, 2); +testUnary('i32', 'popcnt', 0, 0); +testUnary('i32', 'popcnt', 0xFFFFFFFF, 32); + +testUnary('i32', 'eqz', 0, 1); +testUnary('i32', 'eqz', 1, 0); +testUnary('i32', 'eqz', 0xFFFFFFFF, 0); + +testBinary32('add', 40, 2, 42); +testBinary32('sub', 40, 2, 38); +testBinary32('mul', 40, 2, 80); +testBinary32('div_s', -40, 2, -20); +testBinary32('div_s', -40, 8, -5); +testBinary32('div_s', -40, 7, -5); +testBinary32('div_s', 40, 8, 5); +testBinary32('div_s', 40, 7, 5); +testBinary32('div_u', -40, 2, 2147483628); +testBinary32('div_u', 40, 2, 20); +testBinary32('div_u', 40, 8, 5); +testBinary32('rem_s', 40, -3, 1); +testBinary32('rem_s', 0, -3, 0); +testBinary32('rem_s', 5, 2, 1); +testBinary32('rem_s', 65, 64, 1); +testBinary32('rem_s', -65, 64, -1); +testBinary32('rem_u', 40, -3, 40); +testBinary32('rem_u', 41, 8, 1); +testBinary32('and', 42, 6, 2); +testBinary32('or', 42, 6, 46); +testBinary32('xor', 42, 2, 40); +testBinary32('xor', -1, 1739168047, -1739168048); +testBinary32('xor', -1739168043, -1, 1739168042); +testBinary32('shl', 40, 0, 40); +testBinary32('shl', 40, 2, 160); +testBinary32('shr_s', -40, 0, -40); +testBinary32('shr_s', -40, 2, -10); +testBinary32('shr_u', -40, 0, -40); +testBinary32('shr_u', -40, 2, 1073741814); + +testTrap32('div_s', 42, 0, /integer divide by zero/); +testTrap32('div_s', 0x80000000 | 0, -1, /integer overflow/); +testTrap32('div_u', 42, 0, /integer divide by zero/); +testTrap32('rem_s', 42, 0, /integer divide by zero/); +testTrap32('rem_u', 42, 0, /integer divide by zero/); + +testBinary32('rotl', 40, 2, 160); +testBinary32('rotl', 40, 34, 160); +testBinary32('rotr', 40, 2, 10); +testBinary32('rotr', 40, 34, 10); +testBinary32('rotr', 40, 0, 40); +testBinary32('rotl', 40, 0, 40); + +testComparison32('eq', 40, 40, 1); +testComparison32('ne', 40, 40, 0); +testComparison32('lt_s', 40, 40, 0); +testComparison32('lt_u', 40, 40, 0); +testComparison32('le_s', 40, 40, 1); +testComparison32('le_u', 40, 40, 1); +testComparison32('gt_s', 40, 40, 0); +testComparison32('gt_u', 40, 40, 0); +testComparison32('ge_s', 40, 40, 1); +testComparison32('ge_u', 40, 40, 1); + +// On 32-bit debug builds, with --ion-eager, this test can run into our +// per-process JIT code limits and OOM. Trigger a GC to discard code. +if (getJitCompilerOptions()["ion.warmup.trigger"] === 0) + gc(); + +// Test MTest's GVN branch inversion. +var testTrunc = wasmEvalText(`(module (func (param f32) (result i32) (if (result i32) (i32.eqz (i32.trunc_f32_s (local.get 0))) (then (i32.const 0)) (else (i32.const 1)))) (export "" (func 0)))`).exports[""]; +assertEq(testTrunc(0), 0); +assertEq(testTrunc(13.37), 1); + +testBinary64('add', 40, 2, 42); +testBinary64('add', "0x1234567887654321", -1, "0x1234567887654320"); +testBinary64('add', "0xffffffffffffffff", 1, 0); +testBinary64('sub', 40, 2, 38); +testBinary64('sub', "0x1234567887654321", "0x123456789", "0x12345677641fdb98"); +testBinary64('sub', 3, 5, -2); +testBinary64('mul', 40, 2, 80); +testBinary64('mul', -1, 2, -2); +testBinary64('mul', 0x123456, "0x9876543210", "0xad77d2c5f941160"); +testBinary64('mul', 2, -1, -2); +testBinary64('mul', "0x80000000", -1, -2147483648); +testBinary64('mul', "0x7fffffff", -1, -2147483647); +testBinary64('mul', "0x7fffffffffffffff", -1, "0x8000000000000001"); +testBinary64('mul', 2, 2, 4); +testBinary64('mul', "0x80000000", 2, "0x100000000"); +testBinary64('mul', "0x7fffffff", 2, "0xfffffffe"); +testBinary64('div_s', -40, 2, -20); +testBinary64('div_s', -40, 8, -5); +testBinary64('div_s', -40, 7, -5); +testBinary64('div_s', 40, 8, 5); +testBinary64('div_s', 40, 7, 5); +testBinary64('div_s', "0x1234567887654321", 2, "0x91a2b3c43b2a190"); +testBinary64('div_s', "0x1234567887654321", "0x1000000000", "0x1234567"); +testBinary64('div_s', -1, "0x100000000", 0); +testBinary64('div_u', -40, 2, "0x7fffffffffffffec"); +testBinary64('div_u', "0x1234567887654321", 9, "0x205d0b80f0b4059"); +testBinary64('div_u', 40, 2, 20); +testBinary64('div_u', 40, 8, 5); +testBinary64('rem_s', 40, -3, 1); +testBinary64('rem_s', 0, -3, 0); +testBinary64('rem_s', 5, 2, 1); +testBinary64('rem_s', 65, 64, 1); +testBinary64('rem_s', "0x1234567887654321", "0x1000000000", "0x887654321"); +testBinary64('rem_s', "0x7fffffffffffffff", -1, 0); +testBinary64('rem_s', "0x8000000000000001", 1000, -807); +testBinary64('rem_s', "0x8000000000000000", -1, 0); +testBinary64('rem_u', 40, -3, 40); +testBinary64('rem_u', 41, 8, 1); +testBinary64('rem_u', "0x1234567887654321", "0x1000000000", "0x887654321"); +testBinary64('rem_u', "0x8000000000000000", -1, "0x8000000000000000"); +testBinary64('rem_u', "0x8ff00ff00ff00ff0", "0x100000001", "0x80000001"); + +testTrap64('div_s', 10, 0, /integer divide by zero/); +testTrap64('div_s', "0x8000000000000000", -1, /integer overflow/); +testTrap64('div_u', 0, 0, /integer divide by zero/); +testTrap64('rem_s', 10, 0, /integer divide by zero/); +testTrap64('rem_u', 10, 0, /integer divide by zero/); + +// Bitops. +testBinary64('or', 42, 6, 46); +testBinary64('or', "0x8765432112345678", "0xffff0000ffff0000", "0xffff4321ffff5678"); + +testBinary64('xor', 42, 2, 40); +testBinary64('xor', "0x8765432112345678", "0xffff0000ffff0000", "0x789a4321edcb5678"); +testBinary64('xor', "0xffffffffffffffff", "0x2c73173d985666d0", "0xd38ce8c267a9992f"); +testBinary64('xor', "0xe8f3437fe059746a", "0xffffffffffffffff", "0x170cbc801fa68b95"); + +testBinary64('shl', 0xff00ff, 28, "0x0ff00ff0000000"); +testBinary64('shl', 0xff00ff, 30, "0x3fc03fc0000000"); +testBinary64('shl', 0xff00ff, 31, "0x7f807f80000000"); +testBinary64('shl', 0xff00ff, 32, "0xff00ff00000000"); +testBinary64('shl', 1, 63, "0x8000000000000000"); +testBinary64('shl', 1, 64, 1); +testBinary64('shl', 40, 2, 160); +testBinary64('shl', 40, 0, 40); + +testBinary64('shr_s', -40, 0, -40); +testBinary64('shr_s', -40, 2, -10); +testBinary64('shr_s', "0xff00ff0000000", 28, 0xff00ff); +testBinary64('shr_s', "0xff00ff0000000", 30, 0x3fc03f); +testBinary64('shr_s', "0xff00ff0000000", 31, 0x1fe01f); +testBinary64('shr_s', "0xff00ff0000000", 32, 0x0ff00f); + +testBinary64('shr_u', -40, 0, -40); +testBinary64('shr_u', -40, 2, "0x3ffffffffffffff6"); +testBinary64('shr_u', "0x8ffff00ff0000000", 30, "0x23fffc03f"); +testBinary64('shr_u', "0x8ffff00ff0000000", 31, "0x11fffe01f"); +testBinary64('shr_u', "0x8ffff00ff0000000", 32, "0x08ffff00f"); +testBinary64('shr_u', "0x8ffff00ff0000000", 56, 0x8f); + +testBinary64('and', 42, 0, 0); +testBinary64('and', 42, 6, 2); +testBinary64('and', "0x0000000012345678", "0xffff0000ffff0000", "0x0000000012340000"); +testBinary64('and', "0x8765432112345678", "0xffff0000ffff0000", "0x8765000012340000"); + +// Rotations. +testBinary64('rotl', 40, 0, 0x28); +testBinary64('rotl', 40, 2, 0xA0); +testBinary64('rotl', 40, 8, 0x2800); +testBinary64('rotl', 40, 30, "0xA00000000"); +testBinary64('rotl', 40, 31, "0x1400000000"); +testBinary64('rotl', 40, 32, "0x2800000000"); + +testBinary64('rotl', "0x1234567812345678", 4, "0x2345678123456781"); +testBinary64('rotl', "0x1234567812345678", 30, "0x048D159E048D159E"); +testBinary64('rotl', "0x1234567812345678", 31, "0x091A2B3C091A2B3C"); +testBinary64('rotl', "0x1234567812345678", 32, "0x1234567812345678"); + +testBinary64('rotl', "0x0000000000001000", 127, "0x0000000000000800"); + +testBinary64('rotr', 40, 0, 0x28); +testBinary64('rotr', 40, 2, 0x0A); +testBinary64('rotr', 40, 30, "0xA000000000"); +testBinary64('rotr', 40, 31, "0x5000000000"); +testBinary64('rotr', 40, 32, "0x2800000000"); + +testBinary64('rotr', "0x1234567812345678", 4, "0x8123456781234567"); +testBinary64('rotr', "0x1234567812345678", 30, "0x48D159E048D159E0"); +testBinary64('rotr', "0x1234567812345678", 31, "0x2468ACF02468ACF0"); +testBinary64('rotr', "0x1234567812345678", 32, "0x1234567812345678"); +testBinary64('rotr', "0x1234567812345678", 60, "0x2345678123456781"); + +testBinary64('rotr', "0x0000000000001000", 127, "0x0000000000002000"); + +// Comparisons. +testComparison64('eq', 40, 40, 1); +testComparison64('ne', 40, 40, 0); +testComparison64('lt_s', 40, 40, 0); +testComparison64('lt_u', 40, 40, 0); +testComparison64('le_s', 40, 40, 1); +testComparison64('le_u', 40, 40, 1); +testComparison64('gt_s', 40, 40, 0); +testComparison64('gt_u', 40, 40, 0); +testComparison64('ge_s', 40, 40, 1); +testComparison64('ge_u', 40, 40, 1); +testComparison64('eq', "0x400012345678", "0x400012345678", 1); +testComparison64('eq', "0x400012345678", "0x500012345678", 0); +testComparison64('ne', "0x400012345678", "0x400012345678", 0); +testComparison64('ne', "0x400012345678", "0x500012345678", 1); +testComparison64('eq', "0xffffffffffffffff", -1, 1); +testComparison64('lt_s', "0x8000000012345678", "0x1", 1); +testComparison64('lt_s', "0x1", "0x8000000012345678", 0); +testComparison64('lt_u', "0x8000000012345678", "0x1", 0); +testComparison64('lt_u', "0x1", "0x8000000012345678", 1); +testComparison64('le_s', -1, 0, 1); +testComparison64('le_s', -1, -1, 1); +testComparison64('le_s', 0, -1, 0); +testComparison64('le_u', -1, 0, 0); +testComparison64('le_u', -1, -1, 1); +testComparison64('le_u', 0, -1, 1); +testComparison64('gt_s', 1, "0x8000000000000000", 1); +testComparison64('gt_s', "0x8000000000000000", 1, 0); +testComparison64('gt_u', 1, "0x8000000000000000", 0); +testComparison64('gt_u', "0x8000000000000000", 1, 1); +testComparison64('ge_s', 1, "0x8000000000000000", 1); +testComparison64('ge_s', "0x8000000000000000", 1, 0); +testComparison64('ge_u', 1, "0x8000000000000000", 0); +testComparison64('ge_u', "0x8000000000000000", 1, 1); + +testUnary('i64', 'clz', 40, 58); +testUnary('i64', 'clz', "0x8000000000000000", 0); +testUnary('i64', 'clz', "0x7fffffffffffffff", 1); +testUnary('i64', 'clz', "0x4000000000000000", 1); +testUnary('i64', 'clz', "0x3000000000000000", 2); +testUnary('i64', 'clz', "0x2000000000000000", 2); +testUnary('i64', 'clz', "0x1000000000000000", 3); +testUnary('i64', 'clz', "0x0030000000000000", 10); +testUnary('i64', 'clz', "0x0000800000000000", 16); +testUnary('i64', 'clz', "0x00000000ffffffff", 32); +testUnary('i64', 'clz', -1, 0); +testUnary('i64', 'clz', 0, 64); + +testUnary('i64', 'ctz', 40, 3); +testUnary('i64', 'ctz', "0x8000000000000000", 63); +testUnary('i64', 'ctz', "0x7fffffffffffffff", 0); +testUnary('i64', 'ctz', "0x4000000000000000", 62); +testUnary('i64', 'ctz', "0x3000000000000000", 60); +testUnary('i64', 'ctz', "0x2000000000000000", 61); +testUnary('i64', 'ctz', "0x1000000000000000", 60); +testUnary('i64', 'ctz', "0x0030000000000000", 52); +testUnary('i64', 'ctz', "0x0000800000000000", 47); +testUnary('i64', 'ctz', "0x00000000ffffffff", 0); +testUnary('i64', 'ctz', -1, 0); +testUnary('i64', 'ctz', 0, 64); + +testUnary('i64', 'popcnt', 40, 2); +testUnary('i64', 'popcnt', 0, 0); +testUnary('i64', 'popcnt', "0x8000000000000000", 1); +testUnary('i64', 'popcnt', "0x7fffffffffffffff", 63); +testUnary('i64', 'popcnt', "0x4000000000000000", 1); +testUnary('i64', 'popcnt', "0x3000000000000000", 2); +testUnary('i64', 'popcnt', "0x2000000000000000", 1); +testUnary('i64', 'popcnt', "0x1000000000000000", 1); +testUnary('i64', 'popcnt', "0x0030000000000000", 2); +testUnary('i64', 'popcnt', "0x0000800000000000", 1); +testUnary('i64', 'popcnt', "0x00000000ffffffff", 32); +testUnary('i64', 'popcnt', -1, 64); +testUnary('i64', 'popcnt', 0, 0); + +testI64Eqz(40, 0); +testI64Eqz(0, 1); + +wasmAssert(`(module (func $run (param i64) (result i64) (local i64) (local.set 1 (i64.shl (local.get 0) (local.get 0))) (i64.shl (local.get 1) (local.get 1))))`, + [{ type: 'i64', func: '$run', args: ['i64.const 2'], expected: 2048}]); + +// Test MTest's GVN branch inversion. +var testTrunc = wasmEvalText(`(module (func (param f32) (result i32) (if (result i32) (i64.eqz (i64.trunc_f32_s (local.get 0))) (then (i32.const 0)) (else (i32.const 1)))) (export "" (func 0)))`).exports[""]; +assertEq(testTrunc(0), 0); +assertEq(testTrunc(13.37), 1); + +wasmAssert(`(module (func $run (result i64) (local i64) (local.set 0 (i64.rem_s (i64.const 1) (i64.const 0xf))) (i64.rem_s (local.get 0) (local.get 0))))`, + [{ type: 'i64', func: '$run', expected: 0 }]); + +wasmFailValidateText('(module (func (param f32) (result i32) (i32.clz (local.get 0))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (result f32) (i32.clz (local.get 0))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (result f32) (i32.clz (local.get 0))))', mismatchError("f32", "i32")); + +wasmFailValidateText('(module (func (param f32) (param i32) (result i32) (i32.add (local.get 0) (local.get 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (param f32) (result i32) (i32.add (local.get 0) (local.get 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (param i32) (result f32) (i32.add (local.get 0) (local.get 1))))', mismatchError("i32", "f32")); +wasmFailValidateText('(module (func (param f32) (param f32) (result f32) (i32.add (local.get 0) (local.get 1))))', mismatchError("f32", "i32")); + +wasmFailValidateText('(module (func (param f32) (param i32) (result i32) (i32.eq (local.get 0) (local.get 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (param f32) (result i32) (i32.eq (local.get 0) (local.get 1))))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func (param i32) (param i32) (result f32) (i32.eq (local.get 0) (local.get 1))))', mismatchError("i32", "f32")); diff --git a/js/src/jit-test/tests/wasm/ion-adhoc-multiplatform.js b/js/src/jit-test/tests/wasm/ion-adhoc-multiplatform.js new file mode 100644 index 0000000000..b80ca9cef2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ion-adhoc-multiplatform.js @@ -0,0 +1,632 @@ +// |jit-test| skip-if: !hasDisassembler() || wasmCompileMode() != "ion" || getBuildConfiguration("windows") || (!getBuildConfiguration("x64") && !getBuildConfiguration("x86") && !getBuildConfiguration("arm64") && !getBuildConfiguration("arm")); include:adhoc-multiplatform-test.js +// +// These tests push wasm functions through the ion pipe and specify an expected +// disassembly output on all 4 primary targets, x64 / x86 / arm64 / arm(32). +// Results must be provided for the first 3, but can optionally be skipped +// for arm(32). +// +// Hence: disassembler is needed, compiler must be ion. +// +// Windows is disallowed because the argument registers are different from on +// Linux, and matching both is both difficult and not of much value. + +// Tests are "end-to-end" in the sense that we don't care whether the +// tested-for code improvement is done by MIR optimisation, or later in the +// pipe. Observed defects are marked with FIXMEs for future easy finding. + + +// Note that identities involving AND, OR and XOR are tested by +// binop-x64-ion-folding.js + +// Multiplication with magic constant on the left +// +// 0 * x => 0 +// 1 * x => x +// -1 * x => -x +// 2 * x => x + x +// 4 * x => x << 2 + +codegenTestMultiplatform_adhoc( + `(module (func (export "mul32_zeroL") (param $p1 i32) (result i32) + (i32.mul (i32.const 0) (local.get $p1))))`, + "mul32_zeroL", + {x64: // FIXME move folding to MIR level + // First we move edi to eax unnecessarily via ecx (bug 1752520), + // then we overwrite eax. Presumably because the folding + // 0 * x => 0 is done at the LIR level, not the MIR level, hence + // the now-pointless WasmParameter node is not DCE'd away, since + // DCE only happens at the MIR level. In fact all targets suffer + // from the latter problem, but on x86 no_prefix_x86:true + // hides it, and on arm32/64 the pointless move is correctly + // transformed by RA into a no-op. + `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax + 33 c0 xor %eax, %eax`, + x86: `33 c0 xor %eax, %eax`, + arm64: `2a1f03e0 mov w0, wzr`, + arm: `e3a00000 mov r0, #0`}, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "mul64_zeroL") (param $p1 i64) (result i64) + (i64.mul (i64.const 0) (local.get $p1))))`, + "mul64_zeroL", + // FIXME folding happened, zero-creation insns could be improved + {x64: // Same shenanigans as above. Also, on xor, REX.W is redundant. + `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax + 48 33 c0 xor %rax, %rax`, + x86: `33 c0 xor %eax, %eax + 33 d2 xor %edx, %edx`, + arm64: `aa1f03e0 mov x0, xzr`, + arm: // bizarrely inconsistent with the 32-bit case + `e0200000 eor r0, r0, r0 + e0211001 eor r1, r1, r1` }, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "mul32_oneL") (param $p1 i32) (result i32) + (i32.mul (i32.const 1) (local.get $p1))))`, + "mul32_oneL", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: ``, + arm: ``}, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "mul64_oneL") (param $p1 i64) (result i64) + (i64.mul (i64.const 1) (local.get $p1))))`, + "mul64_oneL", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: ``, + arm: ``}, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "mul32_minusOneL") (param $p1 i32) (result i32) + (i32.mul (i32.const -1) (local.get $p1))))`, + "mul32_minusOneL", + {x64: `f7 d8 neg %eax`, + x86: `f7 d8 neg %eax`, + arm64: `4b0003e0 neg w0, w0`, + arm: `e2600000 rsb r0, r0, #0`}, + {x86: {no_prefix:true}, x64: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "mul64_minusOneL") (param $p1 i64) (result i64) + (i64.mul (i64.const -1) (local.get $p1))))`, + "mul64_minusOneL", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax + 48 f7 d8 neg %rax`, + x86: `f7 d8 neg %eax + 83 d2 00 adc \\$0x00, %edx + f7 da neg %edx`, + arm64: `cb0003e0 neg x0, x0`, + arm: `e2700000 rsbs r0, r0, #0 + e2e11000 rsc r1, r1, #0`}, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "mul32_twoL") (param $p1 i32) (result i32) + (i32.mul (i32.const 2) (local.get $p1))))`, + "mul32_twoL", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax + 03 c0 add %eax, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax + 03 c0 add %eax, %eax`, + arm64: `0b000000 add w0, w0, w0`, + arm: `e0900000 adds r0, r0, r0`}, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "mul64_twoL") (param $p1 i64) (result i64) + (i64.mul (i64.const 2) (local.get $p1))))`, + "mul64_twoL", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax + 48 03 c0 add %rax, %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax + 03 c0 add %eax, %eax + 13 d2 adc %edx, %edx`, + arm64: `8b000000 add x0, x0, x0`, + arm: `e0900000 adds r0, r0, r0 + e0a11001 adc r1, r1, r1`}, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "mul32_fourL") (param $p1 i32) (result i32) + (i32.mul (i32.const 4) (local.get $p1))))`, + "mul32_fourL", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax + c1 e0 02 shl \\$0x02, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax + c1 e0 02 shl \\$0x02, %eax`, + arm64: `531e7400 lsl w0, w0, #2`, + arm: `e1a00100 mov r0, r0, lsl #2`}, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "mul64_fourL") (param $p1 i64) (result i64) + (i64.mul (i64.const 4) (local.get $p1))))`, + "mul64_fourL", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax + 48 c1 e0 02 shl \\$0x02, %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax + 0f a4 c2 02 shld \\$0x02, %eax, %edx + c1 e0 02 shl \\$0x02, %eax`, + arm64: `d37ef400 lsl x0, x0, #2`, + arm: `e1a01101 mov r1, r1, lsl #2 + e1811f20 orr r1, r1, r0, lsr #30 + e1a00100 mov r0, r0, lsl #2`}, + {x86: {no_prefix:true}} +); + +// Multiplication with magic constant on the right +// +// x * 0 => 0 +// x * 1 => x +// x * -1 => -x +// x * 2 => x + x +// x * 4 => x << 2 + +codegenTestMultiplatform_adhoc( + `(module (func (export "mul32_zeroR") (param $p1 i32) (result i32) + (i32.mul (local.get $p1) (i32.const 0))))`, + "mul32_zeroR", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax + 33 c0 xor %eax, %eax`, + x86: `33 c0 xor %eax, %eax`, + arm64: `2a1f03e0 mov w0, wzr`, + arm: `e3a00000 mov r0, #0`}, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "mul64_zeroR") (param $p1 i64) (result i64) + (i64.mul (local.get $p1) (i64.const 0))))`, + "mul64_zeroR", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax + 48 33 c0 xor %rax, %rax`, // REX.W is redundant + x86: `33 c0 xor %eax, %eax + 33 d2 xor %edx, %edx`, + arm64: `aa1f03e0 mov x0, xzr`, + arm: `e0200000 eor r0, r0, r0 + e0211001 eor r1, r1, r1` }, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "mul32_oneR") (param $p1 i32) (result i32) + (i32.mul (local.get $p1) (i32.const 1))))`, + "mul32_oneR", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: ``, + arm: ``}, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "mul64_oneR") (param $p1 i64) (result i64) + (i64.mul (local.get $p1) (i64.const 1))))`, + "mul64_oneR", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: ``, + arm: ``}, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "mul32_minusOneR") (param $p1 i32) (result i32) + (i32.mul (local.get $p1) (i32.const -1))))`, + "mul32_minusOneR", + {x64: `f7 d8 neg %eax`, + x86: `f7 d8 neg %eax`, + arm64: `4b0003e0 neg w0, w0`, + arm: `e2600000 rsb r0, r0, #0`}, + {x86: {no_prefix:true}, x64: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "mul64_minusOneR") (param $p1 i64) (result i64) + (i64.mul (local.get $p1) (i64.const -1))))`, + "mul64_minusOneR", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax + 48 f7 d8 neg %rax`, + x86: `f7 d8 neg %eax + 83 d2 00 adc \\$0x00, %edx + f7 da neg %edx`, + arm64: `cb0003e0 neg x0, x0`, + arm: `e2700000 rsbs r0, r0, #0 + e2e11000 rsc r1, r1, #0`}, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "mul32_twoR") (param $p1 i32) (result i32) + (i32.mul (local.get $p1) (i32.const 2))))`, + "mul32_twoR", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax + 03 c0 add %eax, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax + 03 c0 add %eax, %eax`, + arm64: `0b000000 add w0, w0, w0`, + arm: `e0900000 adds r0, r0, r0`}, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "mul64_twoR") (param $p1 i64) (result i64) + (i64.mul (local.get $p1) (i64.const 2))))`, + "mul64_twoR", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax + 48 03 c0 add %rax, %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax + 03 c0 add %eax, %eax + 13 d2 adc %edx, %edx`, + arm64: `8b000000 add x0, x0, x0`, + arm: `e0900000 adds r0, r0, r0 + e0a11001 adc r1, r1, r1`}, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "mul32_fourR") (param $p1 i32) (result i32) + (i32.mul (local.get $p1) (i32.const 4))))`, + "mul32_fourR", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax + c1 e0 02 shl \\$0x02, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax + c1 e0 02 shl \\$0x02, %eax`, + arm64: `531e7400 lsl w0, w0, #2`, + arm: `e1a00100 mov r0, r0, lsl #2`}, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "mul64_fourR") (param $p1 i64) (result i64) + (i64.mul (local.get $p1) (i64.const 4))))`, + "mul64_fourR", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax + 48 c1 e0 02 shl \\$0x02, %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax + 0f a4 c2 02 shld \\$0x02, %eax, %edx + c1 e0 02 shl \\$0x02, %eax`, + arm64: `d37ef400 lsl x0, x0, #2`, + arm: `e1a01101 mov r1, r1, lsl #2 + e1811f20 orr r1, r1, r0, lsr #30 + e1a00100 mov r0, r0, lsl #2` + }, + {x86: {no_prefix:true}} +); + +// Shifts by zero (the right arg is zero) +// +// x >> 0 => x (any shift kind: shl, shrU, shrS) + +codegenTestMultiplatform_adhoc( + `(module (func (export "shl32_zeroR") (param $p1 i32) (result i32) + (i32.shl (local.get $p1) (i32.const 0))))`, + "shl32_zeroR", + // FIXME check these are consistently folded out at the MIR level + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: // Regalloc badness, plus not folded out at the MIR level + `2a0003e2 mov w2, w0 + 2a0203e1 mov w1, w2 + 53007c20 lsr w0, w1, #0`, // Uhh. lsr ?! + arm: `e1a02000 mov r2, r0 + e1a01002 mov r1, r2 + e1a00001 mov r0, r1` + }, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "shl64_zeroR") (param $p1 i64) (result i64) + (i64.shl (local.get $p1) (i64.const 0))))`, + "shl64_zeroR", + // FIXME why is this code so much better than the 32-bit case? + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: ``, // no-op + arm: `` // no-op + }, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "shrU32_zeroR") (param $p1 i32) (result i32) + (i32.shr_u (local.get $p1) (i32.const 0))))`, + "shrU32_zeroR", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: `2a0003e2 mov w2, w0 + 2a0203e1 mov w1, w2 + 2a0103e0 mov w0, w1`, + arm: `e1a02000 mov r2, r0 + e1a01002 mov r1, r2 + e1a00001 mov r0, r1` + }, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "shrU64_zeroR") (param $p1 i64) (result i64) + (i64.shr_u (local.get $p1) (i64.const 0))))`, + "shrU64_zeroR", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: ``, + arm: `` + }, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "shrS32_zeroR") (param $p1 i32) (result i32) + (i32.shr_s (local.get $p1) (i32.const 0))))`, + "shrS32_zeroR", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: `2a0003e2 mov w2, w0 + 2a0203e1 mov w1, w2 + 13007c20 sbfx w0, w1, #0, #32`, + arm: `e1a02000 mov r2, r0 + e1a01002 mov r1, r2 + e1a00001 mov r0, r1` + }, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "shrS64_zeroR") (param $p1 i64) (result i64) + (i64.shr_s (local.get $p1) (i64.const 0))))`, + "shrS64_zeroR", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: ``, + arm: `` + }, + {x86: {no_prefix:true}} +); + +// Identities involving addition +// +// x + 0 => x +// 0 + x => x +// x + x => x << 1 + +codegenTestMultiplatform_adhoc( + `(module (func (export "add32_zeroR") (param $p1 i32) (result i32) + (i32.add (local.get $p1) (i32.const 0))))`, + "add32_zeroR", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: ``, + arm: `` + }, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "add64_zeroR") (param $p1 i64) (result i64) + (i64.add (local.get $p1) (i64.const 0))))`, + "add64_zeroR", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: ``, + arm: `` + }, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "add32_zeroL") (param $p1 i32) (result i32) + (i32.add (i32.const 0) (local.get $p1))))`, + "add32_zeroL", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: ``, + arm: `` + }, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "add64_zeroL") (param $p1 i64) (result i64) + (i64.add (i64.const 0) (local.get $p1))))`, + "add64_zeroL", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: ``, + arm: `` + }, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "add32_self") (param $p1 i32) (result i32) + (i32.add (local.get $p1) (local.get $p1))))`, + "add32_self", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax + 03 c1 add %ecx, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax + 03 45 10 addl 0x10\\(%rbp\\), %eax`, + arm64: `0b000000 add w0, w0, w0`, + arm: `e0900000 adds r0, r0, r0 ` + }, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "add64_self") (param $p1 i64) (result i64) + (i64.add (local.get $p1) (local.get $p1))))`, + "add64_self", + // FIXME outstandingly bad 32-bit sequences, probably due to the RA + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax + 48 03 c1 add %rcx, %rax`, + x86: // -0x21524111 is 0xDEADBEEF + `8b 5d 14 movl 0x14\\(%rbp\\), %ebx + 8b 4d 10 movl 0x10\\(%rbp\\), %ecx + bf ef be ad de mov \\$-0x21524111, %edi + 8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax + 03 c1 add %ecx, %eax + 13 d3 adc %ebx, %edx`, + arm64: `8b000000 add x0, x0, x0`, + arm: // play Musical Chairs for a while + `e1a03001 mov r3, r1 + e1a02000 mov r2, r0 + e1a05003 mov r5, r3 + e1a04002 mov r4, r2 + e1a01003 mov r1, r3 + e1a00002 mov r0, r2 + e0900004 adds r0, r0, r4 + e0a11005 adc r1, r1, r5` + }, + {x86: {no_prefix:true}} +); + +// Identities involving subtraction +// +// x - 0 => x +// 0 - x => -x +// x - x => 0 + +codegenTestMultiplatform_adhoc( + `(module (func (export "sub32_zeroR") (param $p1 i32) (result i32) + (i32.sub (local.get $p1) (i32.const 0))))`, + "sub32_zeroR", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax`, + arm64: ``, + arm: `` + }, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "sub64_zeroR") (param $p1 i64) (result i64) + (i64.sub (local.get $p1) (i64.const 0))))`, + "sub64_zeroR", + // FIXME folding missing for all 4 targets + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax + 48 83 e8 00 sub \\$0x00, %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax + 83 ea 00 sub \\$0x00, %edx`, + arm64: ``, + arm: `e2500000 subs r0, r0, #0 + e2c11000 sbc r1, r1, #0` + }, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "sub32_zeroL") (param $p1 i32) (result i32) + (i32.sub (i32.const 0) (local.get $p1))))`, + "sub32_zeroL", + {x64: `8b cf mov %edi, %ecx + 8b c1 mov %ecx, %eax + f7 d8 neg %eax`, + x86: `8b 45 10 movl 0x10\\(%rbp\\), %eax + f7 d8 neg %eax`, + arm64: `4b0003e0 neg w0, w0 `, + arm: `e2600000 rsb r0, r0, #0` + }, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "sub64_zeroL") (param $p1 i64) (result i64) + (i64.sub (i64.const 0) (local.get $p1))))`, + "sub64_zeroL", + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax + 48 f7 d8 neg %rax`, + x86: `8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax + f7 d8 neg %eax + 83 d2 00 adc \\$0x00, %edx + f7 da neg %edx`, + arm64: `cb0003e0 neg x0, x0`, + arm: `e2700000 rsbs r0, r0, #0 + e2e11000 rsc r1, r1, #0` + }, + {x86: {no_prefix:true}} +); + +codegenTestMultiplatform_adhoc( + `(module (func (export "sub32_self") (param $p1 i32) (result i32) + (i32.sub (local.get $p1) (local.get $p1))))`, + "sub32_self", + {x64: `33 c0 xor %eax, %eax`, + x86: `33 c0 xor %eax, %eax`, + arm64: `52800000 mov w0, #0x0`, + arm: `e3a00000 mov r0, #0` + }, + {x86: {no_prefix:true}} +); +codegenTestMultiplatform_adhoc( + `(module (func (export "sub64_self") (param $p1 i64) (result i64) + (i64.sub (local.get $p1) (local.get $p1))))`, + "sub64_self", + // FIXME folding missing for all 4 targets + {x64: `48 89 f9 mov %rdi, %rcx + 48 89 c8 mov %rcx, %rax + 48 2b c1 sub %rcx, %rax`, + x86: // -0x21524111 is 0xDEADBEEF + `8b 5d 14 movl 0x14\\(%rbp\\), %ebx + 8b 4d 10 movl 0x10\\(%rbp\\), %ecx + bf ef be ad de mov \\$-0x21524111, %edi + 8b 55 14 movl 0x14\\(%rbp\\), %edx + 8b 45 10 movl 0x10\\(%rbp\\), %eax + 2b c1 sub %ecx, %eax + 1b d3 sbb %ebx, %edx`, + arm64: `cb000000 sub x0, x0, x0`, + arm: `e1a03001 mov r3, r1 + e1a02000 mov r2, r0 + e1a05003 mov r5, r3 + e1a04002 mov r4, r2 + e1a01003 mov r1, r3 + e1a00002 mov r0, r2 + e0500004 subs r0, r0, r4 + e0c11005 sbc r1, r1, r5` + }, + {x86: {no_prefix:true}} +); diff --git a/js/src/jit-test/tests/wasm/ion-args.js b/js/src/jit-test/tests/wasm/ion-args.js new file mode 100644 index 0000000000..69c349f36e --- /dev/null +++ b/js/src/jit-test/tests/wasm/ion-args.js @@ -0,0 +1,141 @@ +let { exports } = wasmEvalText(`(module + (func (export "i32") (param i32) (result i32) + local.get 0 + ) + + (func (export "f32") (param f32) (result f32) + local.get 0 + ) + + (func (export "f64") (param f64) (result f64) + local.get 0 + ) + + (func (export "mixed_args") + (param i32) (param i32) (param i32) (param i32) (param i32) ;; 5 i32 + (param $f64 f64) ;; 1 f64 + (param i32) + (result f64) + local.get $f64 + ) +)`); + +const options = getJitCompilerOptions(); +const jitThreshold = options['ion.warmup.trigger'] * 2 + 2; + +let coercions = { + i32(x) { return x|0; }, + f32(x) { return Math.fround(x); }, + f64(x) { return +x; } +} + +function call(func, coercion, arg) { + let expected; + try { + expected = coercion(arg); + } catch(e) { + expected = e.message; + } + + for (var i = jitThreshold; i --> 0;) { + try { + assertEq(func(arg), expected); + } catch(e) { + assertEq(e.message, expected); + } + } +} + +// Test misc kinds of arguments. +(function() { + const inputs = [ + 42, + 3.5, + -0, + -Infinity, + 2**32, + true, + Symbol(), + undefined, + null, + {}, + { valueOf() { return 13.37; } }, + "bonjour" + ]; + + for (let arg of inputs) { + for (let func of ['i32', 'f32', 'f64']) { + call(exports[func], coercions[func], arg); + } + } +})(); + +// Test mixup of float and int arguments. +(function() { + for (let i = 0; i < 10; i++) { + assertEq(exports.mixed_args(i, i+1, i+2, i+3, i+4, i+0.5, i+5), i+0.5); + } +})(); + +// Test high number of arguments. +// All integers. +let {func} = wasmEvalText(`(module + (func (export "func") + ${Array(32).join('(param i32)')} + (param $last i32) + (result i32) + local.get $last + ) +)`).exports; + +(function() { + for (let i = 0; i < 10; i++) { + assertEq(func(i, i+1, i+2, i+3, i+4, i+5, i+6, i+7, i+8, i+9, i+10, i+11, i+12, i+13, i+14, i+15, + i+16, i+17, i+18, i+19, i+20, i+21, i+22, i+23, i+24, i+25, i+26, i+27, i+28, i+29, i+30, i+31 + ), i+31); + } +})(); + +// All floats. +func = wasmEvalText(`(module + (func (export "func") + ${Array(32).join('(param f64)')} + (param $last i32) + (result i32) + local.get $last + ) +)`).exports.func; + +(function() { + for (let i = 0; i < 10; i++) { + assertEq(func(i, i+1, i+2, i+3, i+4, i+5, i+6, i+7, i+8, i+9, i+10, i+11, i+12, i+13, i+14, i+15, + i+16, i+17, i+18, i+19, i+20, i+21, i+22, i+23, i+24, i+25, i+26, i+27, i+28, i+29, i+30, i+31 + ), i+31); + } +})(); + +// Mix em up! 1 i32, then 1 f32, then 1 f64, and again up to 32 args. +let params = []; +for (let i = 0; i < 32; i++) { + params.push((i % 3 == 0) ? 'i32' : + (i % 3 == 1) ? 'f32' : + 'f64' + ); +} + +func = wasmEvalText(`(module + (func (export "func") + ${Array(32).join('(param f64)')} + (param $last i32) + (result i32) + local.get $last + ) +)`).exports.func; + +(function() { + for (let i = 0; i < 10; i++) { + assertEq(func(i, i+1, i+2, i+3, i+4, i+5, i+6, i+7, i+8, i+9, i+10, i+11, i+12, i+13, i+14, i+15, + i+16, i+17, i+18, i+19, i+20, i+21, i+22, i+23, i+24, i+25, i+26, i+27, i+28, i+29, i+30, i+31 + ), i+31); + } +})(); diff --git a/js/src/jit-test/tests/wasm/ion-asmjs-ctor.js b/js/src/jit-test/tests/wasm/ion-asmjs-ctor.js new file mode 100644 index 0000000000..0cc0bcb821 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ion-asmjs-ctor.js @@ -0,0 +1,12 @@ +evaluate(` + var f = (function module() { + "use asm"; + function f(i) { + i=i|0; + if (!i) + return; + } + return f; + })(); + evaluate(\`new f({}, {});\`); +`); diff --git a/js/src/jit-test/tests/wasm/ion-debugger.js b/js/src/jit-test/tests/wasm/ion-debugger.js new file mode 100644 index 0000000000..13d09d83b6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ion-debugger.js @@ -0,0 +1,19 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("Debugger(parent).onExceptionUnwind = function () {};"); +lfModule = new WebAssembly.Module(wasmTextToBinary(` +(module + (export "f" (func $func0)) + (func $func0 (result i32) + i32.const -1 + ) +) +`)); +processModule(lfModule); +function processModule(module, jscode) { + for (let i = 0; i < 2; ++i) { + imports = {} + instance = new WebAssembly.Instance(module, imports); + } +} diff --git a/js/src/jit-test/tests/wasm/ion-error-ool.js b/js/src/jit-test/tests/wasm/ion-error-ool.js new file mode 100644 index 0000000000..910432d0ba --- /dev/null +++ b/js/src/jit-test/tests/wasm/ion-error-ool.js @@ -0,0 +1,77 @@ +// |jit-test| skip-if: !getJitCompilerOptions()['baseline.enable'] +// These tests need at least baseline to make sense. + +const { assertStackTrace, startProfiling, endProfiling, assertEqPreciseStacks } = WasmHelpers; + +const options = getJitCompilerOptions(); +const TRIGGER = options['baseline.warmup.trigger'] + 10; +const ITER = 2 * TRIGGER; +const EXCEPTION_ITER = TRIGGER + 5; + +const SLOW_ENTRY_STACK = ['', '!>', '0,!>', '!>', '']; +const FAST_ENTRY_STACK = ['', '>', '0,>', '>', '']; +const INLINED_CALL_STACK = ['', '0', '']; +const FAST_OOL_ENTRY_STACK = ['', '>', '<,>', 'ool>,>', '<,>', '>', '0,>', '>', '']; +const EXCEPTION_ENTRY_STACK = ['', '>', '<,>', 'ool>,>', '<,>', '>', '']; + +enableGeckoProfiling(); + +for (let type of ['i32', 'f32', 'f64']) { + var instance = wasmEvalText(`(module + (func (export "add") (param ${type}) (param ${type}) (result ${type}) + local.get 0 + local.get 1 + ${type}.add + ) + )`).exports; + + function loopBody(a, b) { + var caught = null; + try { + instance.add(a, b); + } catch(e) { + assertEq(e.message, "ph34r"); + assertStackTrace(e, ['innerValueOf', 'outerValueOf', 'loopBody', 'main', '']); + caught = e; + } + assertEq(!!caught, b === EXCEPTION_ITER); + } + + var x = 0; + function main() { + let observedStacks = [0, 0, 0]; + for (var i = 0; i < ITER; i++) { + startProfiling(); + loopBody(i + 1, i + EXCEPTION_ITER + 1); + assertEqPreciseStacks(endProfiling(), [INLINED_CALL_STACK, FAST_ENTRY_STACK, SLOW_ENTRY_STACK]); + + if (i === EXCEPTION_ITER) { + x = { valueOf: function innerValueOf() { throw new Error("ph34r"); }}; + } else { + x = i; + } + + startProfiling(); + loopBody({valueOf: function outerValueOf() { return x|0; }}, i); + let stack = endProfiling(); + let which = assertEqPreciseStacks(stack, [FAST_OOL_ENTRY_STACK, SLOW_ENTRY_STACK, EXCEPTION_ENTRY_STACK]); + if (which !== null) { + if (i === EXCEPTION_ITER) { + assertEq(which, 2); + } + observedStacks[which]++; + } + } + + let sum = observedStacks.reduce((acc, x) => acc + x); + assertEq(sum === 0 || sum === ITER, true); + if (sum === ITER) { + assertEq(observedStacks[0] > 0, true, "the fast entry should have been taken at least once"); + assertEq(observedStacks[2], 1, "the error path should have been taken exactly once"); + } + } + + main(); +} + +disableGeckoProfiling(); diff --git a/js/src/jit-test/tests/wasm/ion-error-throw.js b/js/src/jit-test/tests/wasm/ion-error-throw.js new file mode 100644 index 0000000000..c760dbe237 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ion-error-throw.js @@ -0,0 +1,43 @@ +// |jit-test| skip-if: !getJitCompilerOptions()['baseline.enable'] +// These tests need at least baseline to make sense. + +const { assertStackTrace, startProfiling, endProfiling, assertEqPreciseStacks } = WasmHelpers; + +enableGeckoProfiling(); + +let { add } = wasmEvalText(`(module + (func (export "add") (param i32) (param i32) (result i32) + local.get 0 + i32.const 42 + i32.eq + if + unreachable + end + + local.get 0 + local.get 1 + i32.add + ) +)`).exports; + +const SLOW_ENTRY_STACK = ['', '!>', '0,!>', '!>', '']; +const FAST_ENTRY_STACK = ['', '>', '0,>', '>', '']; +const FAST_ENTRY_STACK_THROW = ['', '>', '0,>', '>', '', '>', '']; +const INLINED_CALL_STACK = ['', '0', '']; + +function main() { + for (let i = 0; i < 50; i++) { + startProfiling(); + try { + assertEq(add(i, i+1), 2*i+1); + } catch (e) { + assertEq(i, 42); + assertEq(e.message.includes("unreachable"), true); + assertStackTrace(e, ['wasm-function[0]', 'main', '']); + } + let stack = endProfiling(); + assertEqPreciseStacks(stack, [INLINED_CALL_STACK, FAST_ENTRY_STACK, FAST_ENTRY_STACK_THROW, SLOW_ENTRY_STACK]); + } +} + +main(); diff --git a/js/src/jit-test/tests/wasm/ion-error-trace.js b/js/src/jit-test/tests/wasm/ion-error-trace.js new file mode 100644 index 0000000000..cd9d9dd1ad --- /dev/null +++ b/js/src/jit-test/tests/wasm/ion-error-trace.js @@ -0,0 +1,126 @@ +/////////////////////////////////////////////////////////////////////////////// +// FIRST TEST ///////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +(function() { + +function debug() { + throw new Error('gotcha'); +} + +var imports = { + numCalls:0, + main: { + f() { + debug(); + } + } +}; + +var instance = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`(module + (import "main" "f" (func)) + (func (export "add") (param i32) (param i32) (result i32) + local.get 0 + local.get 1 + call 2 + ) + (func (param i32) (param i32) (result i32) + local.get 0 + i32.const 5000 + i32.eq + if + call 0 + end + + local.get 0 + local.get 1 + i32.add + ) +)`)), imports).exports; + +function loopBody(i) { + var caught = null; + try { + assertEq(instance.add(i, i), 2 * i); + } catch(e) { + // TODO check stack trace + print(e.stack); + caught = e; + } + assertEq(!!caught, i === 5000); +} + +function main() { + for (var i = 0; i < 100000; i++) { + loopBody(i); + } + assertEq(i, 100000); +} + +main(); + +})(); + +/////////////////////////////////////////////////////////////////////////////// +// SECOND TEST //////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +(function() { + +function debug() { + gc(); +} + +var imports = { + numCalls:0, + main: { + f() { + debug(); + } + } +}; + +var instance = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`(module + (import "main" "f" (func)) + (func (export "add") (param i32) (param i32) (result i32) + local.get 0 + local.get 1 + call 2 + ) + (func (param i32) (param i32) (result i32) + local.get 0 + i32.const 5000 + i32.eq + if + call 0 + unreachable + end + + local.get 0 + local.get 1 + i32.add + ) +)`)), imports).exports; + +function loopBody(i) { + var caught = null; + try { + assertEq(instance.add(i, i), 2 * i); + } catch(e) { + // TODO check stack trace + print(e.stack); + caught = e; + } + assertEq(!!caught, i === 5000); +} + +function main() { + for (var i = 0; i < 100000; i++) { + loopBody(i); + } + assertEq(i, 100000); +} + +main(); + +})(); diff --git a/js/src/jit-test/tests/wasm/ion-gc.js b/js/src/jit-test/tests/wasm/ion-gc.js new file mode 100644 index 0000000000..358afb2548 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ion-gc.js @@ -0,0 +1,53 @@ +// |jit-test| skip-if: !getJitCompilerOptions()['baseline.enable'] +// These tests need at least baseline to make sense. + +const options = getJitCompilerOptions(); +const TRIGGER = options['baseline.warmup.trigger'] + 10; +const ITER = 2 * TRIGGER; +const EXCEPTION_ITER = TRIGGER + 5; + +for (let type of ['i32', 'f32', 'f64']) { + var instance = wasmEvalText(`(module + (func $add (export "add") (param ${type}) (param ${type}) (result ${type}) + local.get 0 + local.get 1 + ${type}.add + ) + )`).exports; + + function loopBody(a, b) { + var caught = null; + try { + instance.add(a, b); + } catch(e) { + caught = e; + } + assertEq(!!caught, b === EXCEPTION_ITER); + } + + var x = 0; + function main() { + for (var i = 0; i <= EXCEPTION_ITER; i++) { + loopBody(i + 1, i + EXCEPTION_ITER + 1); + + let otherArg = { valueOf() { return i|0; } }; + + if (i === EXCEPTION_ITER) { + x = { valueOf: function innerValueOf() { + // Supress callee. + instance = null; + // Suppress other arguments. + otherArg = null; + gc(); + return 42; + }}; + } else { + x = i; + } + + loopBody({valueOf: function outerValueOf() { return x|0; }}, otherArg); + } + } + + main(); +} diff --git a/js/src/jit-test/tests/wasm/ion-lazy-tables.js b/js/src/jit-test/tests/wasm/ion-lazy-tables.js new file mode 100644 index 0000000000..b4a868170e --- /dev/null +++ b/js/src/jit-test/tests/wasm/ion-lazy-tables.js @@ -0,0 +1,68 @@ +// |jit-test| skip-if: !getJitCompilerOptions()['baseline.enable'] +// These tests need at least baseline to make sense. + +const { assertStackTrace, startProfiling, endProfiling, assertEqPreciseStacks } = WasmHelpers; + +const options = getJitCompilerOptions(); +const TRIGGER = options['baseline.warmup.trigger'] + 10; +const ITER = 2 * TRIGGER; +const EXCEPTION_ITER = TRIGGER + 5; + +const SLOW_ENTRY_STACK = ['', '!>', '0,!>', '!>', '']; +const FAST_ENTRY_STACK = ['', '>', '0,>', '>', '']; +const INLINED_CALL_STACK = ['', '0', '']; +const EXPECTED_STACKS = [SLOW_ENTRY_STACK, FAST_ENTRY_STACK, INLINED_CALL_STACK]; + +function main() { + var { table } = wasmEvalText(`(module + (func (param i32) (param i32) (result i32) + local.get 0 + local.get 1 + i32.add + ) + (table (export "table") 10 funcref) + (elem (i32.const 0) 0) + )`).exports; + + for (var i = 0; i < ITER; i++) { + startProfiling(); + assertEq(table.get(0)(i, i+1), i*2+1); + assertEqPreciseStacks(endProfiling(), EXPECTED_STACKS); + } +} + +function withTier2() { + setJitCompilerOption('wasm.delay-tier2', 1); + + var module = new WebAssembly.Module(wasmTextToBinary(`(module + (func (param i32) (param i32) (result i32) + local.get 0 + local.get 1 + i32.add + ) + (table (export "table") 10 funcref) + (elem (i32.const 0) 0) + )`)); + var { table } = new WebAssembly.Instance(module).exports; + + let i = 0; + do { + i++; + startProfiling(); + assertEq(table.get(0)(i, i+1), i*2+1); + assertEqPreciseStacks(endProfiling(), EXPECTED_STACKS); + } while (!wasmHasTier2CompilationCompleted(module)); + + for (i = 0; i < ITER; i++) { + startProfiling(); + assertEq(table.get(0)(i, i+1), i*2+1); + assertEqPreciseStacks(endProfiling(), EXPECTED_STACKS); + } + + setJitCompilerOption('wasm.delay-tier2', 0); +} + +enableGeckoProfiling(); +main(); +withTier2(); +disableGeckoProfiling(); diff --git a/js/src/jit-test/tests/wasm/ion2wasm.js b/js/src/jit-test/tests/wasm/ion2wasm.js new file mode 100644 index 0000000000..abd88a0406 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ion2wasm.js @@ -0,0 +1,174 @@ +var ITERATIONS = 10; +var INNER_ITERATIONS = 100; + +let instance = wasmEvalText(`(module + (func (export "add") (param i32) (param i32) (result i32) + local.get 0 + local.get 1 + i32.add + ) + + (func (export "no_arg") (result i32) + i32.const 42 + i32.const 58 + i32.add + ) + + (global $g (mut i32) (i32.const 0)) + + (func (export "set_global_one") (param i32) + local.get 0 + global.set $g + ) + + (func (export "set_global_two") (param i32) (param i32) + local.get 0 + local.get 1 + i32.add + global.set $g + ) + + (func (export "glob") (result i32) + global.get $g + ) +)`).exports; + +function run(name, func) { + for (let i = ITERATIONS; i --> 0;) { + func(); + } +} + +function testCallKnown() { + for (let i = 0; i < INNER_ITERATIONS; i++) { + assertEq(instance.add(i, i + 1), 2*i + 1); + } +} + +function testCallKnownRectifying() { + for (let i = 0; i < INNER_ITERATIONS; i++) { + assertEq(instance.add(i + 1), i+1); + } +} + +function jsAdd(x, y) { + return (x|0) + (y|0) | 0; +} + +function testCallGeneric() { + var arr = [instance.add, jsAdd]; + for (let i = 0; i < INNER_ITERATIONS; i++) { + assertEq(arr[i%2](i, i+1), 2*i + 1); + } +} + +function testCallGenericRectifying() { + var arr = [instance.add, jsAdd]; + for (let i = 0; i < INNER_ITERATIONS; i++) { + assertEq(arr[i%2](i+1), i + 1); + } +} + +function testCallScriptedGetter() { + var obj = {}; + Object.defineProperty(obj, 'x', { + get: instance.no_arg + }); + for (let i = 0; i < INNER_ITERATIONS; i++) { + assertEq(obj.x, 100); + } +} + +function testCallScriptedGetterRectifying() { + var obj = {}; + Object.defineProperty(obj, 'x', { + // Missing two arguments. + get: instance.add + }); + for (let i = 0; i < INNER_ITERATIONS; i++) { + assertEq(obj.x, 0); + } +} + +function testCallScriptedSetter() { + var obj = {}; + Object.defineProperty(obj, 'x', { + set: instance.set_global_one + }); + for (let i = 0; i < INNER_ITERATIONS; i++) { + obj.x = i; + } + assertEq(instance.glob(), INNER_ITERATIONS-1); +} + +function testCallScriptedSetterRectifying() { + var obj = {}; + Object.defineProperty(obj, 'x', { + set: instance.set_global_two + }); + for (let i = 0; i < INNER_ITERATIONS; i++) { + obj.x = i; + } + assertEq(instance.glob(), INNER_ITERATIONS-1); +} + +function testFunctionApplyArray() { + for (let i = 0; i < INNER_ITERATIONS; i++) { + assertEq(instance.add.apply(null, [i, i + 1]), 2*i+1); + } +} + +function testFunctionApplyArrayRectifying() { + for (let i = 0; i < INNER_ITERATIONS; i++) { + assertEq(instance.add.apply(null, [i + 1]), i+1); + } +} + +function testFunctionApplyArgs() { + function wrapper() { + assertEq(instance.add.apply(null, arguments), 2*arguments[0]+1); + } + for (let i = 0; i < INNER_ITERATIONS; i++) { + wrapper(i, i + 1); + } +} + +function testFunctionApplyArgsRectifying() { + function wrapper() { + assertEq(instance.add.apply(null, arguments), arguments[0]); + } + for (let i = 0; i < INNER_ITERATIONS; i++) { + wrapper(i + 1); + } +} + +function testFunctionCall() { + for (let i = 0; i < INNER_ITERATIONS; i++) { + assertEq(instance.add.call(null, i, i + 1), 2*i+1); + } +} + +function testFunctionCallRectifying() { + for (let i = 0; i < INNER_ITERATIONS; i++) { + assertEq(instance.add.call(null, i + 1), i+1); + } +} + +run('call known', testCallKnown); +run('call known rectifying', testCallKnownRectifying); + +run('call generic', testCallGeneric); +run('call generic rectifying', testCallGenericRectifying); + +run('scripted getter', testCallScriptedGetter); +run('scripted getter rectifiying', testCallScriptedGetterRectifying); +run('scripted setter', testCallScriptedSetter); +run('scripted setter rectifiying', testCallScriptedSetterRectifying); + +run('function.apply array', testFunctionApplyArray); +run('function.apply array rectifying', testFunctionApplyArrayRectifying); +run('function.apply args', testFunctionApplyArgs); +run('function.apply args rectifying', testFunctionApplyArgsRectifying); + +run('function.call', testFunctionCall); +run('function.call rectifying', testFunctionCallRectifying); diff --git a/js/src/jit-test/tests/wasm/js-direct-call-wasm.js b/js/src/jit-test/tests/wasm/js-direct-call-wasm.js new file mode 100644 index 0000000000..d70e2fbbb6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/js-direct-call-wasm.js @@ -0,0 +1,23 @@ +// |jit-test| --fast-warmup; --ion-offthread-compile=off + +// Test that JS frames can trace wasm anyref values when they are used for +// direct calls. +{ + let {wasmFunc} = wasmEvalText(`(module + (func (import "" "gc")) + (func (export "wasmFunc") (param externref) + call 0 + ) + )`, {"": {gc}}).exports; + + function jsFunc(i) { + // Call the function twice so that the conversion to externref will be + // GVN'ed and spilled across one of the calls + wasmFunc(i); + wasmFunc(i); + } + + for (let i = 0; i < 100; i++) { + jsFunc(i); + } +} diff --git a/js/src/jit-test/tests/wasm/js-reexport.js b/js/src/jit-test/tests/wasm/js-reexport.js new file mode 100644 index 0000000000..023007728b --- /dev/null +++ b/js/src/jit-test/tests/wasm/js-reexport.js @@ -0,0 +1,62 @@ +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Memory = WebAssembly.Memory; +const Table = WebAssembly.Table; + +function accum(...args) { + var sum = 0; + for (var i = 0; i < args.length; i++) + sum += args[i]; + return sum; +} + +var e = wasmEvalText(`(module + (import "" "a" (func $a (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32))) + (import "" "b" (func $b (param f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32) (result f32))) + (import "" "c" (func $c (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64))) + (import "" "d" (func $d (param i32 f32 f64 i32 f32 f64 i32 f32 f64 i32 f32 f64 i32 f32 f64 i32 f32 f64 i32 f32) (result f64))) + (func (export "a") (result i32) + i32.const 1 i32.const 2 i32.const 3 i32.const 4 i32.const 5 + i32.const 6 i32.const 7 i32.const 8 i32.const 9 i32.const 10 + i32.const 11 i32.const 12 i32.const 13 i32.const 14 i32.const 15 + i32.const 16 i32.const 17 i32.const 18 i32.const 19 i32.const 20 + call $a + ) + (func (export "b") (result f32) + f32.const 1.1 f32.const 2.1 f32.const 3.1 f32.const 4.1 f32.const 5.1 + f32.const 6.1 f32.const 7.1 f32.const 8.1 f32.const 9.1 f32.const 10.1 + f32.const 11.1 f32.const 12.1 f32.const 13.1 f32.const 14.1 f32.const 15.1 + f32.const 16.1 f32.const 17.1 f32.const 18.1 f32.const 19.1 f32.const 20.1 + call $b + ) + (func (export "c") (result f64) + f64.const 1.2 f64.const 2.2 f64.const 3.2 f64.const 4.2 f64.const 5.2 + f64.const 6.2 f64.const 7.2 f64.const 8.2 f64.const 9.2 f64.const 10.2 + f64.const 11.2 f64.const 12.2 f64.const 13.2 f64.const 14.2 f64.const 15.2 + f64.const 16.2 f64.const 17.2 f64.const 18.2 f64.const 19.2 f64.const 20.2 + call $c + ) + (func (export "d") (result f64) + i32.const 1 f32.const 2.3 f64.const 3.3 i32.const 4 f32.const 5.3 + f64.const 6.3 i32.const 7 f32.const 8.3 f64.const 9.3 i32.const 10 + f32.const 11.3 f64.const 12.3 i32.const 13 f32.const 14.3 f64.const 15.3 + i32.const 16 f32.const 17.3 f64.const 18.3 i32.const 19 f32.const 20.3 + call $d + ) +)`, {"":{a:accum, b:accum, c:accum, d:accum, e:accum}}).exports; + +const epsilon = .00001; +assertEq(e.a(), 210); +assertEq(Math.abs(e.b() - 212) < epsilon, true); +assertEq(Math.abs(e.c() - 214) < epsilon, true); +assertEq(Math.abs(e.d() - 213.9) < epsilon, true); + +setJitCompilerOption("baseline.warmup.trigger", 5); +setJitCompilerOption("ion.warmup.trigger", 10); + +var e = wasmEvalText(`(module + (import "" "a" (func $a (param i32 f64) (result f64))) + (export "a" (func $a)) +)`, {"":{a:(a,b)=>a+b}}).exports; +for (var i = 0; i < 100; i++) + assertEq(e.a(1.5, 2.5), 3.5); diff --git a/js/src/jit-test/tests/wasm/js-types/directives.txt b/js/src/jit-test/tests/wasm/js-types/directives.txt new file mode 100644 index 0000000000..01f722ba1e --- /dev/null +++ b/js/src/jit-test/tests/wasm/js-types/directives.txt @@ -0,0 +1 @@ +|jit-test| include:wasm.js diff --git a/js/src/jit-test/tests/wasm/js-types/function-ctor-callable.js b/js/src/jit-test/tests/wasm/js-types/function-ctor-callable.js new file mode 100644 index 0000000000..d99a64eaf7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/js-types/function-ctor-callable.js @@ -0,0 +1,33 @@ +// |jit-test| skip-if: !('Function' in WebAssembly) + +load(libdir + "asserts.js"); + +function testWasmFunc(f, arg, rval) { + var func = new WebAssembly.Function({parameters: ["i32"], results: ["i32"]}, f); + assertEq(func instanceof WebAssembly.Function, true); + assertEq(func(arg), rval); +} + +let f = n => n + 5; + +// Callable objects. +testWasmFunc(f, 1, 6); +testWasmFunc(f.bind(null), 2, 7); +testWasmFunc(f.bind(null, 9), 2, 14); +testWasmFunc(new Proxy(f, {}), 3, 8); +testWasmFunc(new Proxy(f, {apply() { return 123; }}), 3, 123); + +// Cross-realm but same-compartment function. +let global1 = newGlobal({sameCompartmentAs: this}); +global1.evaluate("function f(n) { return n + 8; }"); +testWasmFunc(global1.f, 1, 9); + +// Non-callable values. +assertErrorMessage(() => testWasmFunc({}, 1, 6), TypeError, /must be a function/); +assertErrorMessage(() => testWasmFunc(null, 1, 6), TypeError, /must be a function/); +assertErrorMessage(() => testWasmFunc("", 1, 6), TypeError, /must be a function/); + +// Cross-compartment wrappers are not supported yet. See IsCallableNonCCW. +let global2 = newGlobal({newCompartment: true}); +global2.evaluate("function f() {}"); +assertErrorMessage(() => testWasmFunc(global2.f, 1, 6), TypeError, /must be a function/); diff --git a/js/src/jit-test/tests/wasm/js-types/table-js-funcs.js b/js/src/jit-test/tests/wasm/js-types/table-js-funcs.js new file mode 100644 index 0000000000..92b6c462ef --- /dev/null +++ b/js/src/jit-test/tests/wasm/js-types/table-js-funcs.js @@ -0,0 +1,26 @@ +// |jit-test| skip-if: !('Function' in WebAssembly) + +function testfunc(n) {} + +const table = new WebAssembly.Table({element: "anyfunc", initial: 3}); +const func1 = new WebAssembly.Function({parameters: ["i32"], results: []}, testfunc); +table.set(0, func1); +const func2 = new WebAssembly.Function({parameters: ["f32"], results: []}, testfunc); +table.set(1, func2); +const func3 = new WebAssembly.Function({parameters: ["i64"], results: []}, testfunc); +table.set(2, func3); + +const first = table.get(0); +assertEq(first instanceof WebAssembly.Function, true); +assertEq(first, func1); +assertEq(first.type().parameters[0], func1.type().parameters[0]); + +const second = table.get(1); +assertEq(second instanceof WebAssembly.Function, true); +assertEq(second, func2); +assertEq(second.type().parameters[0], func2.type().parameters[0]); + +const third = table.get(2); +assertEq(third instanceof WebAssembly.Function, true); +assertEq(third, func3); +assertEq(third.type().parameters[0], func3.type().parameters[0]); diff --git a/js/src/jit-test/tests/wasm/large-memory.js b/js/src/jit-test/tests/wasm/large-memory.js new file mode 100644 index 0000000000..20c9c3b371 --- /dev/null +++ b/js/src/jit-test/tests/wasm/large-memory.js @@ -0,0 +1,328 @@ +// |jit-test| skip-if: !largeArrayBufferSupported(); allow-oom + +var pagesz = PageSizeInBytes; +var pages_limit = MaxPagesIn32BitMemory; + +// 40000 is well above 2GB but not anything that might run into boundary +// conditions near 4GB. +var pages_vanilla = 40000; + +for ( let [pages,maxpages] of [[pages_vanilla, pages_vanilla+100], + [pages_limit - 3, pages_limit], + [pages_limit, pages_limit]] ) { + assertEq(pages == maxpages || maxpages - pages >= 3, true) + let ins = wasmEvalText(` +(module + (memory (export "mem") ${pages} ${maxpages}) + + (data (i32.const ${(pages-5)*pagesz}) "yabbadabbado") + (data $flintstone "yabbadabbado") + + (func (export "get_constaddr") (result i32) + (i32.load (i32.const ${pages*pagesz-4}))) + + (func (export "get_varaddr") (param $p i32) (result i32) + (i32.load (local.get $p))) + + (func (export "set_constaddr") (param $v i32) + (i32.store (i32.const ${pages*pagesz-8}) (local.get $v))) + + (func (export "set_varaddr") (param $p i32) (param $v i32) + (i32.store (local.get $p) (local.get $v))) + + (func (export "get_constaddr_large_offset") (result i32) + (i32.load offset=${(pages-100)*pagesz-4} (i32.const ${pagesz*100}))) + + (func (export "get_varaddr_large_offset") (param $p i32) (result i32) + (i32.load offset=${(pages-100)*pagesz-4} (local.get $p))) + + (func (export "get_constaddr_small_offset") (result i32) + (i32.load offset=${pagesz-4} (i32.const ${(pages-1)*pagesz}))) + + (func (export "get_varaddr_small_offset") (param $p i32) (result i32) + (i32.load offset=${pagesz-4} (local.get $p))) + + (func (export "set_constaddr_large_offset") (param $v i32) + (i32.store offset=${(pages-100)*pagesz-16} (i32.const ${pagesz*100}) (local.get $v))) + + (func (export "set_varaddr_large_offset") (param $p i32) (param $v i32) + (i32.store offset=${(pages-100)*pagesz-20} (local.get $p) (local.get $v))) + + (func (export "set_constaddr_small_offset") (param $v i32) + (i32.store offset=${pagesz-24} (i32.const ${(pages-1)*pagesz}) (local.get $v))) + + (func (export "set_varaddr_small_offset") (param $p i32) (param $v i32) + (i32.store offset=${pagesz-28} (local.get $p) (local.get $v))) + + (func (export "copy") (param $dest i32) (param $src i32) + (memory.copy (local.get $dest) (local.get $src) (i32.const 12))) + + (func (export "init") (param $dest i32) + (memory.init $flintstone (local.get $dest) (i32.const 0) (i32.const 12))) + + (func (export "fill") (param $dest i32) (param $val i32) (param $len i32) + (memory.fill (local.get 0) (local.get 1) (local.get 2))) + + (func (export "grow1") (result i32) + (memory.grow (i32.const 1))) +)`); + + let buf = new Int32Array(ins.exports.mem.buffer); + + let checkFlintstoneAt = function (addr) { + assertEq(buf[addr/4], 0x62626179) // "yabb", little-endian + assertEq(buf[addr/4+1], 0x62616461) // "adab", ditto + assertEq(buf[addr/4+2], 0x6f646162) // "bado" + } + + buf[pages*pagesz/4-1] = 0xdeadbeef; + assertEq(ins.exports.get_constaddr(), 0xdeadbeef|0); + assertEq(ins.exports.get_varaddr(pages*pagesz-4), 0xdeadbeef|0); + + assertEq(ins.exports.get_constaddr_large_offset(), 0xdeadbeef|0); + assertEq(ins.exports.get_varaddr_large_offset(pagesz*100), 0xdeadbeef|0); + + assertEq(ins.exports.get_constaddr_small_offset(), 0xdeadbeef|0); + assertEq(ins.exports.get_varaddr_small_offset((pages-1)*pagesz), 0xdeadbeef|0); + + ins.exports.set_constaddr(0xcafebab0); + assertEq(buf[pages*pagesz/4-2], 0xcafebab0|0); + + ins.exports.set_varaddr(pages*pagesz-12, 0xcafebab1); + assertEq(buf[pages*pagesz/4-3], 0xcafebab1|0); + + ins.exports.set_constaddr_large_offset(0xcafebab2); + assertEq(buf[pages*pagesz/4-4], 0xcafebab2|0); + + ins.exports.set_varaddr_large_offset(pagesz*100, 0xcafebab3); + assertEq(buf[pages*pagesz/4-5], 0xcafebab3|0); + + ins.exports.set_constaddr_small_offset(0xcafebab4); + assertEq(buf[pages*pagesz/4-6], 0xcafebab4|0); + + ins.exports.set_varaddr_small_offset((pages-1)*pagesz, 0xcafebab5); + assertEq(buf[pages*pagesz/4-7], 0xcafebab5|0); + + if (pages*pagesz < 0x1_0000_0000) { + assertErrorMessage(() => ins.exports.get_varaddr(pages*pagesz), + WebAssembly.RuntimeError, + /index out of bounds/); + } + + assertErrorMessage(() => ins.exports.get_varaddr_large_offset(pagesz*100+4), + WebAssembly.RuntimeError, + /index out of bounds/); + + assertErrorMessage(() => ins.exports.get_varaddr_small_offset((pages-1)*pagesz+4), + WebAssembly.RuntimeError, + /index out of bounds/); + + ins.exports.set_varaddr(pages*pagesz-4, 0); // Should work + if (pages*pagesz < 0x1_0000_0000) { + assertErrorMessage(() => ins.exports.set_varaddr(pages*pagesz, 0), + WebAssembly.RuntimeError, + /index out of bounds/); + } + + ins.exports.set_varaddr_large_offset(pagesz*100+16, 0); // Should work + assertErrorMessage(() => ins.exports.set_varaddr_large_offset(pagesz*100+20, 0), + WebAssembly.RuntimeError, + /index out of bounds/); + + ins.exports.set_varaddr_small_offset((pages-1)*pagesz+24); // Should work + assertErrorMessage(() => ins.exports.set_varaddr_small_offset((pages-1)*pagesz+28, 0), + WebAssembly.RuntimeError, + /index out of bounds/); + + // Active init + checkFlintstoneAt((pages-5)*pagesz); + + // memory.init + ins.exports.init((pages-6)*pagesz); + checkFlintstoneAt((pages-6)*pagesz); + + ins.exports.init(pages*pagesz-12); // Should work + // Dest goes OOB + assertErrorMessage(() => ins.exports.init(pages*pagesz-6), + WebAssembly.RuntimeError, + /index out of bounds/); + + // memory.copy + + // Dest and src are in bounds + ins.exports.copy((pages-10)*pagesz, (pages-5)*pagesz); + checkFlintstoneAt((pages-10)*pagesz); + + // Dest goes OOB + assertErrorMessage(() => ins.exports.copy((pages)*pagesz-6, (pages-5)*pagesz, 12), + WebAssembly.RuntimeError, + /index out of bounds/); + + ins.exports.copy((pages)*pagesz-12, (pages-1)*pagesz); // Should work + // Src goes OOB + assertErrorMessage(() => ins.exports.copy((pages)*pagesz-12, (pages)*pagesz-6), + WebAssembly.RuntimeError, + /index out of bounds/); + + + // memory.fill + let lastpg = (pages-1)*pagesz; + ins.exports.fill(lastpg, 0x37, pagesz); + for ( let i=0; i < pagesz/4; i++ ) + assertEq(buf[lastpg/4+i], 0x37373737); + + assertErrorMessage(() => ins.exports.fill(lastpg, 0x42, pagesz+1), + WebAssembly.RuntimeError, + /index out of bounds/); + + done: + if (pages < maxpages) { + let res = 0; + + res = ins.exports.grow1(); + if (res == -1) break done; + assertEq(res, pages); + + res = ins.exports.grow1(); + if (res == -1) break done; + assertEq(res, pages+1); + + res = ins.exports.grow1(); + if (res == -1) break done; + assertEq(res, pages+2); + + assertEq(ins.exports.get_varaddr((pages+2)*pagesz), 0); + + let i = 0; + while (ins.exports.grow1() != -1) { + i++; + } + // We can't assert equality because we might OOM before we get to the + // max, but we can assert we did not go beyond that. + assertEq(i <= maxpages-pages-3, true); + } +} + +// Very large offsets should be allowed (but may of course be OOB). Observe +// that offset=0xffffffff is accepted by the validator even though this access +// could never succeed. +{ + let ins = wasmEvalText(` +(module + (memory (export "mem") 1) + (func (export "get1") (param $p i32) (result i32) + (i32.load offset=0x80000000 (local.get $p))) + (func (export "get2") (param $p i32) (result i32) + (i32.load offset=0xfffffffc (local.get $p))) + (func (export "get3") (param $p i32) (result i32) + (i32.load offset=0xffffffff (local.get $p)))) +`); + assertErrorMessage(() => ins.exports.get1(0), + WebAssembly.RuntimeError, + /index out of bounds/); + assertErrorMessage(() => ins.exports.get2(0), + WebAssembly.RuntimeError, + /index out of bounds/); + assertErrorMessage(() => ins.exports.get3(0), + WebAssembly.RuntimeError, + /index out of bounds/); +} + +{ + let ins = wasmEvalText(` +(module + (memory (export "mem") 32768) + (func (export "get1") (param $p i32) (result i32) + (i32.load8_s offset=0x7fffffff (local.get $p)))) +`); + assertEq(ins.exports.get1(0), 0); + assertErrorMessage(() => ins.exports.get1(1), + WebAssembly.RuntimeError, + /index out of bounds/); + assertErrorMessage(() => ins.exports.get1(-1), + WebAssembly.RuntimeError, + /index out of bounds/); +} + +{ + let ins = wasmEvalText(` +(module + (memory (export "mem") 32769) + (func (export "get1") (param $p i32) (result i32) + (i32.load8_s offset=0x80000000 (local.get $p)))) +`); + assertEq(ins.exports.get1(0), 0); + assertEq(ins.exports.get1(65535), 0); + assertErrorMessage(() => ins.exports.get1(65536), + WebAssembly.RuntimeError, + /index out of bounds/); +} + +{ + let ins = wasmEvalText(` +(module + (memory (export "mem") ${pages_limit}) + (func (export "get1") (param $p i32) (result i32) + (i32.load8_s offset=${pages_limit*pagesz-1} (local.get $p)))) +`); + assertEq(ins.exports.get1(0), 0); + assertErrorMessage(() => ins.exports.get1(1), + WebAssembly.RuntimeError, + /index out of bounds/); + assertErrorMessage(() => ins.exports.get1(-1), + WebAssembly.RuntimeError, + /index out of bounds/); +} + +// Fail to grow at the declared max +// Import and export + +{ + let ins = wasmEvalText(` +(module + (memory (export "mem") ${pages_limit} ${pages_limit}) + + (func (export "set_it") (param $addr i32) (param $val i32) + (i32.store (local.get $addr) (local.get $val))) + + (func (export "grow1") (result i32) + (memory.grow (i32.const 1))) +)`); + + assertEq(ins.exports.grow1(), -1); // Because initial == max + + let ins2 = wasmEvalText(` +(module + (import "" "mem" (memory 1)) + + (func (export "get_it") (param $addr i32) (result i32) + (i32.load (local.get $addr))) +)`, + {"":ins.exports}) + + ins.exports.set_it((pages_limit*pagesz)-4, 0xbaadf00d); + assertEq(ins2.exports.get_it((pages_limit*pagesz)-4), 0xbaadf00d|0) +} + +// Fail to grow at the max heap size even if there is headroom +// in the declared max +if (pages_limit < 65536) { + let ins = wasmEvalText(` +(module + (memory (export "mem") ${pages_limit} ${pages_limit+2}) + + (func (export "grow1") (result i32) + (memory.grow (i32.const 1))) +)`); + + assertEq(ins.exports.grow1(), -1); // Because current is at the max heap size +} + +// Fail to instantiate when the minimum is larger than the max heap size +if (pages_limit < 65536) { + assertErrorMessage(() => wasmEvalText(` +(module (memory (export "mem") ${pages_limit+1} ${pages_limit+1})) +`), + WebAssembly.RuntimeError, + /too many memory pages/); +} diff --git a/js/src/jit-test/tests/wasm/lazy-stubs-jitentry.js b/js/src/jit-test/tests/wasm/lazy-stubs-jitentry.js new file mode 100644 index 0000000000..d235e52343 --- /dev/null +++ b/js/src/jit-test/tests/wasm/lazy-stubs-jitentry.js @@ -0,0 +1,36 @@ +function test() { + var table = wasmEvalText(`(module + (func $add0 (param i32) (result i32) (i32.add (local.get 0) (i32.const 0))) + (func $add1 (param i32) (result i32) (i32.add (local.get 0) (i32.const 1))) + (func $add2 (param i32) (result i32) (i32.add (local.get 0) (i32.const 2))) + (func $add3 (param i32) (result i32) (i32.add (local.get 0) (i32.const 3))) + (func $add4 (param i32) (result i32) (i32.add (local.get 0) (i32.const 4))) + (func $add5 (param i32) (result i32) (i32.add (local.get 0) (i32.const 5))) + (func $add6 (param i32) (result i32) (i32.add (local.get 0) (i32.const 6))) + (func $add7 (param i32) (result i32) (i32.add (local.get 0) (i32.const 7))) + (func $add8 (param i32) (result i32) (i32.add (local.get 0) (i32.const 8))) + (func $add9 (param i32) (result i32) (i32.add (local.get 0) (i32.const 9))) + (table (export "table") 10 funcref) + (elem (i32.const 0) $add0) + (elem (i32.const 1) $add1) + (elem (i32.const 2) $add2) + (elem (i32.const 3) $add3) + (elem (i32.const 4) $add4) + (elem (i32.const 5) $add5) + (elem (i32.const 6) $add6) + (elem (i32.const 7) $add7) + (elem (i32.const 8) $add8) + (elem (i32.const 9) $add9) + )`).exports.table; + var exps = []; + for (var i = 0; i < 10; i++) { + exps.push(table.get(i)); + } + var res = 0; + for (var i = 0; i < 80; i++) { + var exp = exps[i % exps.length]; + res = exp(res); + } + assertEq(res, 360); +} +test(); diff --git a/js/src/jit-test/tests/wasm/limits.js b/js/src/jit-test/tests/wasm/limits.js new file mode 100644 index 0000000000..efa73c35da --- /dev/null +++ b/js/src/jit-test/tests/wasm/limits.js @@ -0,0 +1,249 @@ +// Tests of limits of memory and table types + +const PageSize = PageSizeInBytes; +const MemoryMaxValid = 65536; +const MemoryMaxRuntime = MaxPagesIn32BitMemory; + +const TableMaxValid = 0xffff_ffff; +const TableMaxRuntime = 10_000_000; + +// Test that a memory type is valid within a module +function testMemoryValidate(initial, maximum, shared) { + wasmValidateText(`(module + (memory ${initial} ${maximum || ''} ${shared ? 'shared' : ''}) + )`); +} + +testMemoryValidate(0, undefined, false); +testMemoryValidate(1, undefined, false); +testMemoryValidate(0, 1, false); +testMemoryValidate(0, 1, true); +testMemoryValidate(1, 1, false); +testMemoryValidate(1, 1, true); +testMemoryValidate(MemoryMaxValid, undefined, false); +testMemoryValidate(MemoryMaxValid, MemoryMaxValid, false); +testMemoryValidate(MemoryMaxValid, MemoryMaxValid, true); + +// Test that a memory type is not valid within a module +function testMemoryFailValidate(initial, maximum, shared, pattern) { + wasmFailValidateText(`(module + (memory ${initial} ${maximum || ''} ${shared ? 'shared' : ''}) + )`, pattern); +} + +testMemoryFailValidate(2, 1, false, /size minimum must not be greater than maximum/); +testMemoryFailValidate(1, undefined, true, /maximum length required for shared memory/); +testMemoryFailValidate(MemoryMaxValid + 1, undefined, false, /initial memory size too big/); +testMemoryFailValidate(MemoryMaxValid, MemoryMaxValid + 1, false, /maximum memory size too big/); +testMemoryFailValidate(MemoryMaxValid, MemoryMaxValid + 1, true, /maximum memory size too big/); + +// Test that a memory type is invalid for constructing a WebAssembly.Memory +function testMemoryFailConstruct(initial, maximum, shared, pattern) { + assertErrorMessage(() => new WebAssembly.Memory({ + initial, + maximum, + shared + }), RangeError, pattern); +} + +// Test initial length, giving a maximum only if required due to being shared +testMemoryFailConstruct(MemoryMaxValid + 1, undefined, false, /bad Memory initial size/); +testMemoryFailConstruct(MemoryMaxValid + 1, MemoryMaxValid + 1, true, /bad Memory initial size/); +// Test maximum length +testMemoryFailConstruct(0, MemoryMaxValid + 1, false, /bad Memory maximum size/); +testMemoryFailConstruct(0, MemoryMaxValid + 1, true, /bad Memory maximum size/); + +// Test that a memory type can be instantiated within a module or constructed +// with a WebAssembly.Memory +function testMemoryCreate(initial, maximum, shared) { + // May OOM, but must not fail to validate + try { + wasmEvalText(`(module + (memory ${initial} ${maximum || ''} ${shared ? 'shared' : ''}) + )`); + } catch (e) { + assertEq(String(e).indexOf("out of memory") !== -1, true, `${e}`); + } + try { + new WebAssembly.Memory({initial, maximum, shared}); + } catch (e) { + assertEq(String(e).indexOf("out of memory") !== -1, true, `${e}`); + } +} + +testMemoryCreate(0, undefined, false); +testMemoryCreate(1, undefined, false); +testMemoryCreate(0, 1, false); +testMemoryCreate(0, 1, true); +testMemoryCreate(1, 1, false); +testMemoryCreate(1, 1, true); +testMemoryCreate(MemoryMaxRuntime, undefined, false); +testMemoryCreate(MemoryMaxRuntime, MemoryMaxValid, false); +testMemoryCreate(MemoryMaxRuntime, MemoryMaxValid, true); + +// Test that a memory type cannot be instantiated within a module or constructed +// with a WebAssembly.Memory + +if (MemoryMaxRuntime < 65536) { + let testMemoryFailCreate = function(initial, maximum, shared) { + assertErrorMessage(() => wasmEvalText(`(module + (memory ${initial} ${maximum || ''} ${shared ? 'shared' : ''}) + )`), WebAssembly.RuntimeError, /too many memory pages/); + assertErrorMessage(() => new WebAssembly.Memory({ + initial, + maximum, + shared + }), WebAssembly.RuntimeError, /too many memory pages/); + } + + testMemoryFailCreate(MemoryMaxRuntime + 1, undefined, false); + testMemoryFailCreate(MemoryMaxRuntime + 1, MemoryMaxValid, false); + testMemoryFailCreate(MemoryMaxRuntime + 1, MemoryMaxValid, true); +} else { + let testMemoryFailCreate = function(initial, maximum, shared) { + assertErrorMessage(() => wasmEvalText(`(module + (memory ${initial} ${maximum || ''} ${shared ? 'shared' : ''}) + )`), WebAssembly.CompileError, /(initial memory size too big)|(memory size minimum must not be greater than maximum)/); + assertErrorMessage(() => new WebAssembly.Memory({ + initial, + maximum, + shared + }), RangeError, /bad Memory initial size/); + } + + testMemoryFailCreate(MemoryMaxRuntime + 1, undefined, false); + testMemoryFailCreate(MemoryMaxRuntime + 1, MemoryMaxValid, false); + testMemoryFailCreate(MemoryMaxRuntime + 1, MemoryMaxValid, true); +} + + +// Test that a memory type cannot be grown from initial to a target due to an +// implementation limit +function testMemoryFailGrow(initial, maximum, target, shared) { + let {run} = wasmEvalText(`(module + (memory ${initial} ${maximum || ''} ${shared ? 'shared' : ''}) + (func (export "run") (result i32) + i32.const ${target - initial} + memory.grow + ) + )`).exports; + assertEq(run(), -1, 'failed to grow'); + + let mem = new WebAssembly.Memory({ + initial, + maximum, + shared + }); + assertErrorMessage(() => mem.grow(target - initial), RangeError, /failed to grow memory/); +} + +testMemoryFailGrow(1, undefined, MemoryMaxRuntime + 1, false); +testMemoryFailGrow(1, MemoryMaxValid, MemoryMaxRuntime + 1, false); +testMemoryFailGrow(1, MemoryMaxValid, MemoryMaxRuntime + 1, true); + +// Test that a table type is valid within a module +function testTableValidate(initial, maximum) { + wasmValidateText(`(module + (table ${initial} ${maximum || ''} funcref) + )`); +} + +testTableValidate(0, undefined); +testTableValidate(1, undefined); +testTableValidate(0, 1); +testTableValidate(1, 1); +testTableValidate(TableMaxValid, undefined); +testTableValidate(TableMaxValid, TableMaxValid); + +// Test that a table type is not valid within a module +function testTableFailValidate(initial, maximum, pattern) { + wasmFailValidateText(`(module + (table ${initial} ${maximum || ''} funcref) + )`, pattern); +} + +testTableFailValidate(2, 1, /size minimum must not be greater than maximum/); +// The maximum valid table value is equivalent to the maximum encodable limit +// value, so we cannot test too large of a table limit in a module. +assertEq(TableMaxValid + 1 > 0xffffffff, true); + +// Test that a table type is invalid for constructing a WebAssembly.Table +function testTableFailConstruct(initial, maximum, pattern) { + assertErrorMessage(() => new WebAssembly.Table({ + initial, + maximum, + element: 'funcref', + }), TypeError, pattern); +} + +testTableFailConstruct(TableMaxValid + 1, undefined, /bad Table initial size/); +testTableFailConstruct(0, TableMaxValid + 1, /bad Table maximum size/); + +// Test that a table type can be instantiated within a module or constructed +// with a WebAssembly.Table +function testTableCreate(initial, maximum) { + // May OOM, but must not fail to validate + try { + wasmEvalText(`(module + (table ${initial} ${maximum || ''} funcref) + )`); + } catch (e) { + assertEq(String(e).indexOf("out of memory") !== -1, true, `${e}`); + } + try { + new WebAssembly.Table({ + initial, + maximum, + element: 'funcref', + }); + } catch (e) { + assertEq(String(e).indexOf("out of memory") !== -1, true, `${e}`); + } +} + +testTableCreate(0, undefined); +testTableCreate(1, undefined); +testTableCreate(0, 1); +testTableCreate(1, 1); +testTableCreate(TableMaxRuntime, undefined); +testTableCreate(TableMaxRuntime, TableMaxValid); + +// Test that a table type cannot be instantiated within a module or constructed +// with a WebAssembly.Table +function testTableFailCreate(initial, maximum, pattern) { + assertErrorMessage(() => wasmEvalText(`(module + (table ${initial} ${maximum || ''} funcref) + )`), WebAssembly.RuntimeError, pattern); + assertErrorMessage(() => new WebAssembly.Table({ + initial, + maximum, + element: 'funcref', + }), WebAssembly.RuntimeError, pattern); +} + +testTableFailCreate(TableMaxRuntime + 1, undefined, /too many table elements/); +testTableFailCreate(TableMaxRuntime + 1, TableMaxValid, /too many table elements/); + +// Test that a table type cannot be grown from initial to a target due to an +// implementation limit +function testTableFailGrow(initial, maximum, target) { + let {run} = wasmEvalText(`(module + (table ${initial} ${maximum || ''} externref) + (func (export "run") (result i32) + ref.null extern + i32.const ${target - initial} + table.grow + ) + )`).exports; + assertEq(run(), -1, 'failed to grow'); + + let tab = new WebAssembly.Table({ + initial, + maximum, + element: 'externref', + }); + assertErrorMessage(() => tab.grow(target - initial), RangeError, /failed to grow table/); +} + +testTableFailGrow(1, undefined, TableMaxRuntime + 1); +testTableFailGrow(1, TableMaxValid, TableMaxRuntime + 1); diff --git a/js/src/jit-test/tests/wasm/memory-aliasing.js b/js/src/jit-test/tests/wasm/memory-aliasing.js new file mode 100644 index 0000000000..4d76c9eb16 --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory-aliasing.js @@ -0,0 +1,24 @@ +var i = wasmEvalText( +`(module + (memory 1) (data (i32.const 0) "\\01\\02\\03\\04\\05\\06\\07\\08") + (func $off1 (param $base i32) (result i32) + (i32.add + (i32.load8_u (local.get $base)) + (i32.load8_u offset=1 (local.get $base))) + ) + (export "off1" (func $off1)) + (func $off2 (param $base i32) (result i32) + (i32.add + (i32.load8_u offset=1 (local.get $base)) + (i32.load8_u offset=2 (local.get $base))) + ) + (export "off2" (func $off2)) +)`).exports; +assertEq(i.off1(0), 3); +assertEq(i.off1(1), 5); +assertEq(i.off1(2), 7); +assertEq(i.off1(3), 9); +assertEq(i.off2(0), 5); +assertEq(i.off2(1), 7); +assertEq(i.off2(2), 9); +assertEq(i.off2(3), 11); diff --git a/js/src/jit-test/tests/wasm/memory-arm64-ion-codegen.js b/js/src/jit-test/tests/wasm/memory-arm64-ion-codegen.js new file mode 100644 index 0000000000..39cda14486 --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory-arm64-ion-codegen.js @@ -0,0 +1,56 @@ +// |jit-test| skip-if: !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("arm64"); include:codegen-arm64-test.js + +// Test that loads/stores at friendly constant offsets yield expected code + +codegenTestARM64_adhoc( + `(module + (memory 1) + (func (export "f") (result i32) + (i32.load (i32.const 4000))))`, + 'f', + 'b94fa2a0 ldr w0, \\[x21, #4000\\]'); + +codegenTestARM64_adhoc( + `(module + (memory 1) + (func (export "f") (result i32) + (i32.load offset=1000 (i32.const 3000))))`, + 'f', + 'b94fa2a0 ldr w0, \\[x21, #4000\\]'); + +codegenTestARM64_adhoc( + `(module + (memory 1) + (func (export "f") (param i32) + (i32.store (i32.const 4000) (local.get 0))))`, + 'f', + 'b90fa2a0 str w0, \\[x21, #4000\\]'); + +codegenTestARM64_adhoc( + `(module + (memory 1) + (func (export "f") (param i32) + (i32.store offset=1000 (i32.const 3000) (local.get 0))))`, + 'f', + 'b90fa2a0 str w0, \\[x21, #4000\\]'); + +// Unfriendly offsets are first loaded into a scratch register + +codegenTestARM64_adhoc( + `(module + (memory 1) + (func (export "f") (result i32) + (i32.load (i32.const 4001))))`, + 'f', + `d281f430 mov x16, #0xfa1 + b8706aa0 ldr w0, \\[x21, x16\\]`); + +codegenTestARM64_adhoc( + `(module + (memory 1) + (func (export "f") (param i32) + (i32.store (i32.const 4001) (local.get 0))))`, + 'f', + `d281f430 mov x16, #0xfa1 + b8306aa0 str w0, \\[x21, x16\\]`); + diff --git a/js/src/jit-test/tests/wasm/memory-cloning-new-global.js b/js/src/jit-test/tests/wasm/memory-cloning-new-global.js new file mode 100644 index 0000000000..a7b632f3fd --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory-cloning-new-global.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !wasmThreadsEnabled() + +// Ensure we create the WebAssembly.Memory prototype object when deserializing a +// WebAssembly.Memory object in a new global. + +let mem1 = new WebAssembly.Memory({initial: 1, maximum: 1, shared: true}); +let buf = serialize(mem1, [], {SharedArrayBuffer: "allow"}); + +let g = newGlobal({sameCompartmentAs: this}); +let mem2 = g.deserialize(buf, {SharedArrayBuffer: "allow"}); +assertEq(mem2.buffer.byteLength, 65536); +assertEq(Object.getPrototypeOf(mem2), g.WebAssembly.Memory.prototype); diff --git a/js/src/jit-test/tests/wasm/memory-cloning.js b/js/src/jit-test/tests/wasm/memory-cloning.js new file mode 100644 index 0000000000..12b05e4aab --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory-cloning.js @@ -0,0 +1,103 @@ +// |jit-test| skip-if: !wasmThreadsEnabled() + +// Basic structured cloning tests (specific to SpiderMonkey shell) + +var memtypes = wasmMemory64Enabled() ? ['i32', 'i64'] : ['']; + +function makeMemoryDesc(memtype, d) { + if (memtype != '') { + d.index = memtype; + } + return d; +} + +function Zero(memtype) { + return memtype == 'i64' ? 0n : 0; +} + +// Should *not* be possible to serialize and deserialize memories that are not +// shared, whether we transfer them or not. + +for ( let memtype of memtypes ) { + let mem1 = new WebAssembly.Memory(makeMemoryDesc(memtype, {initial: 2, maximum: 4})); + assertErrorMessage(() => serialize(mem1), + TypeError, + /unsupported type for structured data/); + assertErrorMessage(() => serialize(mem1, [mem1]), + TypeError, + /invalid transferable array for structured clone/); +} + +// Should be possible to serialize and deserialize memories that are shared, and +// observe shared effects. + +for ( let memtype of memtypes ) { + let ptrtype = memtype == 'i64' ? memtype : 'i32'; + let mem1 = new WebAssembly.Memory(makeMemoryDesc(memtype, {initial: 2, maximum: 4, shared: true})); + let buf1 = mem1.buffer; + + // Serialization and deserialization of shared memories work: + + let mem2 = deserialize(serialize(mem1, [], {SharedArrayBuffer: 'allow'}), {SharedArrayBuffer: 'allow'}); + assertEq(mem2 instanceof WebAssembly.Memory, true); + let buf2 = mem2.buffer; + assertEq(buf2 instanceof SharedArrayBuffer, true); + + assertEq(buf1 !== buf2, true); + assertEq(buf1.byteLength, buf2.byteLength); + if (memtype != '' && mem2.type) { + assertEq(mem2.type().index, memtype); + } + + // Effects to one buffer must be reflected in the other: + + let v1 = new Int32Array(buf1); + let v2 = new Int32Array(buf2); + + v1[37] = 0x12345678; + assertEq(v2[37], 0x12345678); + + // Growth in a memory is reflected in its clone: + + let index = 2*65536 + 200; + let access = wasmEvalText(`(module + (memory (import "" "memory") ${memtype} 2 4 shared) + (func (export "l") (result ${ptrtype}) + (${ptrtype}.load (${ptrtype}.const ${index}))))`, + {"": {memory: mem2}}).exports.l; + + // initially mem2 cannot be accessed at index + assertErrorMessage(access, WebAssembly.RuntimeError, /out of bounds/); + + // then we grow mem1 + wasmEvalText(`(module + (memory (import "" "memory") ${memtype} 2 4 shared) + (func (export "g") (drop (memory.grow (${ptrtype}.const 1)))))`, + {"": {memory: mem1}}).exports.g(); + + // after growing mem1, mem2 can be accessed at index + assertEq(access(), Zero(memtype)); +} + +// Should not be possible to transfer a shared memory + +for ( let memtype of memtypes ) { + let mem1 = new WebAssembly.Memory(makeMemoryDesc(memtype, {initial: 2, maximum: 4, shared: true})); + assertErrorMessage(() => serialize(mem1, [mem1]), + TypeError, + /Shared memory objects must not be in the transfer list/); + +} + +// When serializing and deserializing a SAB extracted from a memory, the length +// of the SAB should not change even if the memory was grown after serialization +// and before deserialization. + +for ( let memtype of memtypes ) { + let mem = new WebAssembly.Memory(makeMemoryDesc(memtype, {initial: 2, maximum: 4, shared: true})); + let buf = mem.buffer; + let clonedbuf = serialize(buf, [], {SharedArrayBuffer: 'allow'}); + mem.grow(1); + let buf2 = deserialize(clonedbuf, {SharedArrayBuffer: 'allow'}); + assertEq(buf.byteLength, buf2.byteLength); +} diff --git a/js/src/jit-test/tests/wasm/memory-control/directives.txt b/js/src/jit-test/tests/wasm/memory-control/directives.txt new file mode 100644 index 0000000000..1092e20d8a --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory-control/directives.txt @@ -0,0 +1 @@ +|jit-test| include:wasm.js; test-also=--wasm-compiler=optimizing --wasm-memory-control; test-also=--wasm-compiler=baseline --wasm-memory-control; test-also=--wasm-compiler=optimizing --no-wasm-memory64 --wasm-memory-control; test-also=--wasm-compiler=baseline --no-wasm-memory64 --wasm-memory-control diff --git a/js/src/jit-test/tests/wasm/memory-control/disabled.js b/js/src/jit-test/tests/wasm/memory-control/disabled.js new file mode 100644 index 0000000000..48903521db --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory-control/disabled.js @@ -0,0 +1,18 @@ +// |jit-test| skip-if: wasmMemoryControlEnabled() + +const { validate } = WebAssembly; + +const UNRECOGNIZED_OPCODE = /unrecognized opcode/; + +let simpleTests = [ + "(module (func (memory.discard (i32.const 0) (i32.const 65536))))", +]; + +for (let src of simpleTests) { + let bin = wasmTextToBinary(src); + assertEq(validate(bin), false); + wasmCompilationShouldFail(bin, UNRECOGNIZED_OPCODE); +} + +const mem = new WebAssembly.Memory({ initial: 1 }); +assertEq(mem.discard, undefined); diff --git a/js/src/jit-test/tests/wasm/memory-control/memory-discard.js b/js/src/jit-test/tests/wasm/memory-control/memory-discard.js new file mode 100644 index 0000000000..87f2ae625a --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory-control/memory-discard.js @@ -0,0 +1,227 @@ +// |jit-test| skip-if: !wasmMemoryControlEnabled(); test-also=--wasm-memory64; test-also=--no-wasm-memory64 + +// This tests memory.discard and WebAssembly.Memory.discard() by placing data +// (the alphabet) halfway across a page boundary, then discarding the first +// page. The first half of the alphabet should be zeroed; the second should +// not. The memory should remain readable and writable. +// +// The ultimate goal is to release physical pages of memory back to the +// operating system, but we can't really observe memory metrics here. Oh well. + +function initModule(discardOffset, discardLen, discardViaJS, shared, memType = 'i32') { + const memProps = shared ? '4 4 shared' : '4'; // 4 pages + const text = `(module + (memory (export "memory") ${memType} ${memProps}) + (data "abcdefghijklmnopqrstuvwxyz") + (func (export "init") + ;; splat alphabet halfway across the 3/4 page boundary. + ;; 196595 = (65536 * 3) - (26 / 2) + (memory.init 0 (${memType}.const 196595) (i32.const 0) (i32.const 26)) + ) + (func (export "letter") (param i32) (result i32) + (i32.load8_u (${memType}.add (${memType}.const 196595) ${memType == 'i64' ? '(i64.extend_i32_u (local.get 0))' : '(local.get 0)'})) + ) + (func (export "discard") + (memory.discard (${memType}.const ${discardOffset}) (${memType}.const ${discardLen})) + ) + )`; + const exp = wasmEvalText(text).exports; + + return [exp, discardViaJS ? () => exp.memory.discard(discardOffset, discardLen) : exp.discard]; +} + +function checkRegion(exp, min, max, expectLetters) { + for (let i = min; i < max; i++) { + const c = "a".charCodeAt(0) + i; + const expected = expectLetters ? c : 0; + assertEq(exp.letter(i), expected, `checking position of letter ${String.fromCharCode(c)}`); + } +} +function checkFirstHalf(exp, expectLetters) { return checkRegion(exp, 0, 13, expectLetters) } +function checkSecondHalf(exp, expectLetters) { return checkRegion(exp, 13, 26, expectLetters) } +function checkWholeAlphabet(exp, expectLetters) { return checkRegion(exp, 0, 26, expectLetters) } + +function testAll(func) { + func(false, false, 'i32'); + func(false, true, 'i32'); + func(true, false, 'i32'); + func(true, true, 'i32'); + if (wasmMemory64Enabled()) { + func(false, false, 'i64'); + func(false, true, 'i64'); + func(true, false, 'i64'); + func(true, true, 'i64'); + } +} + +testAll(function testHappyPath(discardViaJS, shared, memType) { + // Only page 3 of memory, half the alphabet + const [exp, discard] = initModule(65536 * 2, 65536, discardViaJS, shared, memType); + + // All zero to start + checkWholeAlphabet(exp, false); + + // Then all alphabet + exp.init(); + checkWholeAlphabet(exp, true); + + // Discarding the first page clears the first half of the alphabet + discard(); + checkFirstHalf(exp, false); + checkSecondHalf(exp, true); + + // We should be able to write back to a discarded region of memory + exp.init(); + checkWholeAlphabet(exp, true); + + // ...and then discard again + discard(); + checkFirstHalf(exp, false); + checkSecondHalf(exp, true); +}); + +testAll(function testZeroLen(discardViaJS, shared) { + // Discard zero bytes + const [exp, discard] = initModule(PageSizeInBytes * 2, 0, discardViaJS, shared); + + // Init the stuff + exp.init(); + checkWholeAlphabet(exp, true); + + // Discarding zero bytes should be valid... + discard(); + + // ...but should have no effect. + checkWholeAlphabet(exp, true); +}); + +testAll(function testWithGrow(discardViaJS, shared, memType) { + if (shared) { + return; // shared memories cannot grow + } + + // Only page 3 of memory, half the alphabet. There is no max size on the + // memory, so it will be subject to moving grows in 32-bit mode. + const [exp, discard] = initModule(65536 * 2, 65536, discardViaJS, false, memType); + + // Start with the whole alphabet + exp.init(); + checkWholeAlphabet(exp, true); + + // Discarding the first page clears the first half of the alphabet + discard(); + checkFirstHalf(exp, false); + checkSecondHalf(exp, true); + + // Oops we just grew by a preposterous amount, time to move + exp.memory.grow(200) + + // The memory should still be readable + checkFirstHalf(exp, false); + checkSecondHalf(exp, true); + + // We should be able to write back to a discarded region of memory + exp.init(); + checkWholeAlphabet(exp, true); + + // ...and then discard again + discard(); + checkFirstHalf(exp, false); + checkSecondHalf(exp, true); +}); + +testAll(function testOOB(discardViaJS, shared) { + // Discard two pages where there is only one + const [exp, discard] = initModule(PageSizeInBytes * 3, PageSizeInBytes * 2, discardViaJS, shared); + + exp.init(); + checkWholeAlphabet(exp, true); + assertErrorMessage(() => discard(), WebAssembly.RuntimeError, /out of bounds/); + + // Ensure nothing was discarded + checkWholeAlphabet(exp, true); +}); + +testAll(function testOOB2(discardViaJS, shared) { + // Discard two pages starting near the end of 32-bit address space + // (would trigger an overflow in 32-bit world) + const [exp, discard] = initModule(2 ** 32 - PageSizeInBytes, PageSizeInBytes * 2, discardViaJS, shared); + + exp.init(); + checkWholeAlphabet(exp, true); + assertErrorMessage(() => discard(), WebAssembly.RuntimeError, /out of bounds/); + + // Ensure nothing was discarded + checkWholeAlphabet(exp, true); +}); + +testAll(function testOOB3(discardViaJS, shared) { + // Discard nearly an entire 32-bit address space's worth of pages. Very exciting! + const [exp, discard] = initModule(0, 2 ** 32 - PageSizeInBytes, discardViaJS, shared); + + exp.init(); + checkWholeAlphabet(exp, true); + assertErrorMessage(() => discard(), WebAssembly.RuntimeError, /out of bounds/); + + // Ensure nothing was discarded + checkWholeAlphabet(exp, true); +}); + +(function testOOB4() { + // Discard an entire 32-bit address space's worth of pages. JS can do this + // even to 32-bit memories because it can handle numbers bigger + // than 2^32 - 1. + const [exp, _] = initModule(0, 0, false); // pass zero to allow the wasm module to validate + const discard = () => exp.memory.discard(0, 2 ** 32); + + exp.init(); + checkWholeAlphabet(exp, true); + assertErrorMessage(() => discard(), WebAssembly.RuntimeError, /out of bounds/); + + // Ensure nothing was discarded + checkWholeAlphabet(exp, true); +})(); + +if (wasmMemory64Enabled()) { + (function testOverflow() { + // Discard UINT64_MAX - (2 pages), starting from page 4. This overflows but puts both start and end in bounds. + // This cannot be done with a JS discard because JS can't actually represent big enough integers. + + // The big ol' number here is 2^64 - (65536 * 2) + const [exp, discard] = initModule(65536 * 3, `18_446_744_073_709_420_544`, false, false, 'i64'); + + // Init the stuff + exp.init(); + checkWholeAlphabet(exp, true); + + // Discarding should not be valid when it goes out of bounds + assertErrorMessage(() => discard(), WebAssembly.RuntimeError, /out of bounds/); + + // Ensure nothing was discarded + checkWholeAlphabet(exp, true); + })(); +} + +testAll(function testMisalignedStart(discardViaJS, shared) { + // Discard only the first half of the alphabet (this misaligns the start) + const [exp, discard] = initModule(PageSizeInBytes * 3 - 13, 13, discardViaJS, shared); + + exp.init(); + checkWholeAlphabet(exp, true); + assertErrorMessage(() => discard(), WebAssembly.RuntimeError, /unaligned/); + + // Ensure nothing was discarded + checkWholeAlphabet(exp, true); +}); + +testAll(function testMisalignedEnd(discardViaJS, shared) { + // Discard only the second half of the alphabet (this misaligns the end) + const [exp, discard] = initModule(PageSizeInBytes * 3, 13, discardViaJS, shared); + + exp.init(); + checkWholeAlphabet(exp, true); + assertErrorMessage(() => discard(), WebAssembly.RuntimeError, /unaligned/); + + // Ensure nothing was discarded + checkWholeAlphabet(exp, true); +}); diff --git a/js/src/jit-test/tests/wasm/memory-maximum-clamping.js b/js/src/jit-test/tests/wasm/memory-maximum-clamping.js new file mode 100644 index 0000000000..dfd1d175d7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory-maximum-clamping.js @@ -0,0 +1,32 @@ +const MemoryMaxValid = 65536; + +// Linking should fail if the imported memory has a higher maximum than required, +// however if we internally clamp maximum values to an implementation limit +// and use that for linking we may erroneously accept some modules. + +function testLinkFail(importMax, importedMax) { + assertErrorMessage(() => { + let importedMemory = new WebAssembly.Memory({ + initial: 0, + maximum: importedMax, + }); + wasmEvalText(`(module + (memory (import "" "") 0 ${importMax}) + )`, {"": {"": importedMemory}}); + }, WebAssembly.LinkError, /incompatible maximum/); +} + +testLinkFail(0, 1); +testLinkFail(MemoryMaxValid - 1, MemoryMaxValid); + +// The type reflection interface for WebAssembly.Memory should not report +// an internally clamped maximum. + +if ('type' in WebAssembly.Memory.prototype) { + let memory = new WebAssembly.Memory({ + initial: 0, + maximum: MemoryMaxValid, + }); + let type = memory.type(); + assertEq(type.maximum, MemoryMaxValid, 'reported memory maximum is not clamped'); +} diff --git a/js/src/jit-test/tests/wasm/memory-partial-oob-store.js b/js/src/jit-test/tests/wasm/memory-partial-oob-store.js new file mode 100644 index 0000000000..1459c243fc --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory-partial-oob-store.js @@ -0,0 +1,131 @@ +// Cloned from memory.js but kept separate because it may have to be disabled on +// some devices until bugs are fixed. + +// Bug 1666747 - partially OOB unaligned stores are not handled correctly on ARM +// and ARM64. The simulators don't implement the correct semantics anyhow, so +// when the bug is fixed in the code generator they must remain excluded here. +var excluded = getBuildConfiguration("arm64") || + getBuildConfiguration("arm64-simulator") || + getBuildConfiguration("arm") || + getBuildConfiguration("arm-simulator"); +var thirtytwobit = getBuildConfiguration("pointer-byte-size") == 4; + +const RuntimeError = WebAssembly.RuntimeError; + +function storeModuleSrc(type, ext, offset, align) { + var load_ext = ext === '' ? '' : ext + '_s'; + return `(module + (memory (export "mem") 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func $store (param i32) (param ${type}) + (${type}.store${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (local.get 0) + (local.get 1) + ) + ) (export "store" (func 0)) + (func $load (param i32) (result ${type}) + (${type}.load${load_ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (local.get 0) + ) + ) (export "load" (func 1)))`; +} + +function storeModule(type, ext, offset, align, exportBox = null) { + let exports = wasmEvalText(storeModuleSrc(type, ext, offset, align)).exports; + if (exportBox !== null) + exportBox.exports = exports; + return exports; +} + +function testStoreOOB(type, ext, base, offset, align, value) { + let exportBox = {}; + if (type === 'i64') { + assertErrorMessage(() => wasmAssert( + storeModuleSrc(type, ext, offset, align), + [{type, func: '$store', args: [`i32.const ${base}`, `i64.const ${value}`]}], + {}, + exportBox + ), RuntimeError, /index out of bounds/); + } else { + assertErrorMessage(() => storeModule(type, ext, offset, align, exportBox).store(base, value), + RuntimeError, + /index out of bounds/); + } + + // Check that there were no partial writes at the end of the memory. + let buf = new Int8Array(exportBox.exports.mem.buffer); + let len = buf.length; + for ( let addr = base + offset ; addr < len; addr++ ) + assertEq(buf[addr], 0); +} + +// Test bounds checks and edge cases. + +for (let align of [0,1,2,4]) { + + for (let offset of [0, 1, 2, 3, 4, 8, 16, 41, 0xfff0, 0xfff8]) { + // Accesses of 1 byte. + let lastValidIndex = 0x10000 - 1 - offset; + if (align < 2 && !excluded) { + testStoreOOB('i32', '8', lastValidIndex + 1, offset, align, -42); + } + + // Accesses of 2 bytes. + lastValidIndex = 0x10000 - 2 - offset; + if (align < 4 && !excluded) { + testStoreOOB('i32', '16', lastValidIndex + 1, offset, align, -32768); + } + + // Accesses of 4 bytes. + lastValidIndex = 0x10000 - 4 - offset; + if (!excluded) { + testStoreOOB('i32', '', lastValidIndex + 1, offset, align, 1337); + testStoreOOB('f32', '', lastValidIndex + 1, offset, align, Math.fround(13.37)); + } + + // Accesses of 8 bytes. + lastValidIndex = 0x10000 - 8 - offset; + if (!excluded) { + testStoreOOB('f64', '', lastValidIndex + 1, offset, align, 1.23456789); + } + } + + for (let offset of [0, 1, 2, 3, 4, 8, 16, 41, 0xfff0, 0xfff8]) { + // Accesses of 1 byte. + let lastValidIndex = 0x10000 - 1 - offset; + if (align < 2 && !excluded) { + testStoreOOB('i64', '8', lastValidIndex + 1, offset, align, -42); + } + + // Accesses of 2 bytes. + lastValidIndex = 0x10000 - 2 - offset; + if (align < 4 && !excluded) { + testStoreOOB('i64', '16', lastValidIndex + 1, offset, align, -32768); + } + + // Accesses of 4 bytes. + lastValidIndex = 0x10000 - 4 - offset; + if (!excluded) { + testStoreOOB('i64', '32', lastValidIndex + 1, offset, align, 0xf1231337 | 0); + } + + // Accesses of 8 bytes. + lastValidIndex = 0x10000 - 8 - offset; + if (!excluded) { + testStoreOOB('i64', '', lastValidIndex + 1, offset, align, '0x1234567887654321'); + } + } +} + +// On 32-bit platforms, a declared-aligned i64 store is implemented as two +// presumed-aligned 32-bit stores. This tests that we don't store the low +// word before the high word if the low word is in-bounds but the high word +// is not. +if (thirtytwobit) { + testStoreOOB('i64', '', 0x10000 - 4, 0, 0, '0x0123456789abcdef'); +} diff --git a/js/src/jit-test/tests/wasm/memory-sharing-off.js b/js/src/jit-test/tests/wasm/memory-sharing-off.js new file mode 100644 index 0000000000..f3588c98b1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory-sharing-off.js @@ -0,0 +1,23 @@ +// |jit-test| --shared-memory=off; skip-if: !wasmThreadsEnabled() + +// A module using shared memory should be convertable from text to binary even +// if shared memory is disabled. + +var bin = wasmTextToBinary('(module (memory 1 1 shared))'); + +// But we should not be able to validate it: + +assertEq(WebAssembly.validate(bin), false); + +// Nor to compile it: + +assertErrorMessage(() => new WebAssembly.Module(bin), + WebAssembly.CompileError, + /shared memory is disabled/); + +// We also should not be able to create a shared memory by itself: + +assertErrorMessage(() => new WebAssembly.Memory({initial: 1, maximum: 1, shared: true}), + WebAssembly.LinkError, + /shared memory is disabled/); + diff --git a/js/src/jit-test/tests/wasm/memory-sharing.js b/js/src/jit-test/tests/wasm/memory-sharing.js new file mode 100644 index 0000000000..d67baad4fa --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory-sharing.js @@ -0,0 +1,210 @@ +// |jit-test| skip-if: !wasmThreadsEnabled() + +const WASMPAGE = 65536; + +// A shared memory should yield a SharedArrayBuffer of appropriate length + +{ + let mem = new WebAssembly.Memory({initial: 2, maximum: 4, shared: true}); + assertEq(mem.buffer instanceof SharedArrayBuffer, true); + assertEq(mem.buffer.byteLength, WASMPAGE*2); +} + +// Ditto, when the memory was created by instantiation and exported + +{ + let text = `(module + (memory (export "memory") 1 2 shared) + (func (export "l0") (result i32) (i32.load (i32.const 0))))`; + let mod = new WebAssembly.Module(wasmTextToBinary(text)); + let ins = new WebAssembly.Instance(mod); + let mem = ins.exports.memory; + let buf = mem.buffer; + assertEq(buf instanceof SharedArrayBuffer, true); + assertEq(buf.byteLength, WASMPAGE); +} + +// Shared memory requires a maximum size + +{ + assertErrorMessage(() => new WebAssembly.Memory({initial: 2, shared: true}), + TypeError, + /'shared' is true but maximum is not specified/); +} + +// Ditto, syntactically + +{ + let text = `(module + (memory 1 shared) + (func (export "l0") (result i32) (i32.load (i32.const 0))))`; + assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(text)), + WebAssembly.CompileError, + /maximum length required for shared memory/); +} + +// Ditto, in the binary. The flags field can be 0 (unshared, min only), 1 +// (unshared, min and max), or 3 (shared, min and max), but not 2 (shared, min +// only). So construct a module that has that, and make sure it's rejected. + +{ + let bin = new Uint8Array([0x00, 0x61, 0x73, 0x6d, + 0x01, 0x00, 0x00, 0x00, + 0x05, // Memory + 0x03, // Section size + 0x01, // One memory + 0x02, // Shared, min only (illegal) + 0x01]); // Min + assertErrorMessage(() => new WebAssembly.Module(bin), + WebAssembly.CompileError, + /maximum length required for shared memory/); +} + +// Importing shared memory and being provided with shared should work + +{ + let text = `(module + (memory (import "" "memory") 1 1 shared) + (func (export "id") (param i32) (result i32) (local.get 0)))`; + let mod = new WebAssembly.Module(wasmTextToBinary(text)); + let mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared: true}); + let ins = new WebAssembly.Instance(mod, {"": {memory: mem}}); + assertEq(ins.exports.id(0x12345678), 0x12345678); +} + +// Importing shared memory but being provided with unshared should fail + +{ + let text = `(module + (memory (import "" "memory") 1 1 shared) + (func (export "id") (param i32) (result i32) (local.get 0)))`; + let mod = new WebAssembly.Module(wasmTextToBinary(text)); + let mem = new WebAssembly.Memory({initial: 1, maximum: 1}); + assertErrorMessage(() => new WebAssembly.Instance(mod, {"": {memory: mem}}), + WebAssembly.LinkError, + /unshared memory but shared required/); +} + +// Importing unshared memory but being provided with shared should fail + +{ + let text = `(module + (memory (import "" "memory") 1 1) + (func (export "id") (param i32) (result i32) (local.get 0)))`; + let mod = new WebAssembly.Module(wasmTextToBinary(text)); + let mem = new WebAssembly.Memory({initial: 1, maximum: 1, shared: true}); + assertErrorMessage(() => new WebAssembly.Instance(mod, {"": {memory: mem}}), + WebAssembly.LinkError, + /shared memory but unshared required/); +} + +// Importing shared memory and being provided with shared memory with +// incompatible parameters should fail + +{ + let text = `(module + (memory (import "" "memory") 2 4 shared) + (func (export "id") (param i32) (result i32) (local.get 0)))`; + let mod = new WebAssembly.Module(wasmTextToBinary(text)); + + // some cases that are non-matching are allowed, eg, initial > declared min + + // initial < declared min + let mem3 = new WebAssembly.Memory({initial: 1, maximum: 4, shared: true}); + assertErrorMessage(() => new WebAssembly.Instance(mod, {"": {memory: mem3}}), + WebAssembly.LinkError, + /imported Memory with incompatible size/); + + // initial > declared max + let mem4 = new WebAssembly.Memory({initial: 5, maximum: 8, shared: true}); + assertErrorMessage(() => new WebAssembly.Instance(mod, {"": {memory: mem4}}), + WebAssembly.LinkError, + /imported Memory with incompatible size/); + + // max > declared max + let mem5 = new WebAssembly.Memory({initial: 2, maximum: 8, shared: true}); + assertErrorMessage(() => new WebAssembly.Instance(mod, {"": {memory: mem5}}), + WebAssembly.LinkError, + /imported Memory with incompatible maximum size/); +} + + +// basic memory.size and memory.grow operation, with bounds checking near the +// valid/invalid boundary + +{ + let text = `(module + (memory (export "memory") 2 4 shared) + (func (export "c") (result i32) memory.size) + (func (export "g") (result i32) (memory.grow (i32.const 1))) + (func (export "l") (param i32) (result i32) (i32.load (local.get 0))) + (func (export "s") (param i32) (param i32) (i32.store (local.get 0) (local.get 1))))`; + let mod = new WebAssembly.Module(wasmTextToBinary(text)); + let ins = new WebAssembly.Instance(mod); + let exp = ins.exports; + let mem = exp.memory; + + let b1 = mem.buffer; + assertEq(exp.c(), 2); + assertEq(b1.byteLength, WASMPAGE*2); + assertEq(mem.buffer === b1, true); // memory.size does not affect buffer + exp.s(WASMPAGE*2-4, 0x12345678) // access near end + assertEq(exp.l(WASMPAGE*2-4), 0x12345678); + assertErrorMessage(() => exp.l(WASMPAGE*2), // beyond current end (but below max) + WebAssembly.RuntimeError, + /index out of bounds/); + assertEq(exp.g(), 2); + assertEq(b1.byteLength, WASMPAGE*2); // growing does not affect existing buffer length + let b2 = mem.buffer; + assertEq(b1 !== b2, true); // growing produces a new buffer + assertEq(b2.byteLength, WASMPAGE*3); // new buffer has appropriate length + assertEq(exp.c(), 3); + exp.s(WASMPAGE*3-4, 0x12344321); // access near new end + assertEq(exp.l(WASMPAGE*3-4), 0x12344321); + assertErrorMessage(() => exp.l(WASMPAGE*3), // beyond current end (but below max) + WebAssembly.RuntimeError, + /index out of bounds/); + assertEq(exp.g(), 3); + assertEq(b2.byteLength, WASMPAGE*3); // growing does not affect existing buffer length + let b3 = mem.buffer; + assertEq(b2 !== b3, true); // growing produces a new buffer + assertEq(b3.byteLength, WASMPAGE*4); // new buffer has appropriate length + assertEq(exp.c(), 4); + exp.s(WASMPAGE*4-4, 0x12121212); // access near new end + assertEq(exp.l(WASMPAGE*4-4), 0x12121212); + assertErrorMessage(() => exp.l(WASMPAGE*4), // beyond current end (and beyond max) + WebAssembly.RuntimeError, + /index out of bounds/); + assertEq(exp.g(), -1); + assertEq(exp.c(), 4); // failure to grow -> no change + let b4 = mem.buffer; + assertEq(b3 === b4, true); // failure to grow -> same ol' buffer + assertEq(exp.g(), -1); // we can fail repeatedly +} + +// Test the grow() API with shared memory. In the implementation this API +// shares almost all code with the wasm instruction, so don't bother going deep. + +{ + let mem = new WebAssembly.Memory({initial: 2, maximum: 4, shared: true}); + let buf = mem.buffer; + assertEq(mem.grow(1), 2); + assertEq(buf.byteLength, WASMPAGE*2); + assertEq(mem.grow(1), 3); + assertErrorMessage(() => mem.grow(1), RangeError, /failed to grow memory/); +} + +// Initializing shared memory with data + +{ + let text = `(module + (memory (import "" "memory") 2 4 shared) + (data (i32.const 0) "abcdefghijklmnopqrstuvwxyz") + (func (export "l") (param i32) (result i32) (i32.load8_u (local.get 0))))`; + let mod = new WebAssembly.Module(wasmTextToBinary(text)); + let mem = new WebAssembly.Memory({initial: 2, maximum: 4, shared: true}); + let ins = new WebAssembly.Instance(mod, {"": {memory: mem}}); + let exp = ins.exports; + assertEq(exp.l(12), "a".charCodeAt(0) + 12); +} + diff --git a/js/src/jit-test/tests/wasm/memory.js b/js/src/jit-test/tests/wasm/memory.js new file mode 100644 index 0000000000..648a5c125d --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory.js @@ -0,0 +1,506 @@ +const RuntimeError = WebAssembly.RuntimeError; + +function loadModuleSrc(type, ext, offset, align, drop = false) { + let maybeResult = drop ? '' : `(result ${type})`; + let maybeDrop = drop ? 'drop' : ''; + return `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func $load (param i32) ${maybeResult} + (${type}.load${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (local.get 0) + ) + ${maybeDrop} + ) (export "" (func 0)))`; +} +function loadModule(type, ext, offset, align, drop = false) { + return wasmEvalText(loadModuleSrc(type, ext, offset, align, drop)).exports[""]; +} + +function storeModuleSrc(type, ext, offset, align) { + var load_ext = ext === '' ? '' : ext + '_s'; + return `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func $store (param i32) (param ${type}) + (${type}.store${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (local.get 0) + (local.get 1) + ) + ) (export "store" (func 0)) + (func $load (param i32) (result ${type}) + (${type}.load${load_ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (local.get 0) + ) + ) (export "load" (func 1)))`; +} +function storeModule(type, ext, offset, align) { + return wasmEvalText(storeModuleSrc(type, ext, offset, align)).exports; +} + +function storeModuleCstSrc(type, ext, offset, align, value) { + var load_ext = ext === '' ? '' : ext + '_s'; + return `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func $store (param i32) + (${type}.store${ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (local.get 0) + (${type}.const ${value}) + ) + ) (export "store" (func 0)) + (func $load (param i32) (result ${type}) + (${type}.load${load_ext} + offset=${offset} + ${align != 0 ? 'align=' + align : ''} + (local.get 0) + ) + ) (export "load" (func 1)))`; +} +function storeModuleCst(type, ext, offset, align, value) { + return wasmEvalText(storeModuleCstSrc(type, ext, offset, align, value)).exports; +} + +function testLoad(type, ext, base, offset, align, expect) { + if (type === 'i64') { + wasmAssert(loadModuleSrc(type, ext, offset, align), [{ + type, + func: '$load', + expected: expect, + args: [`i32.const ${base}`] + }]); + } + else { + assertEq(loadModule(type, ext, offset, align)(base), expect); + } +} + +function testLoadOOB(type, ext, base, offset, align) { + assertErrorMessage(() => loadModule(type, ext, offset, align, /*drop*/ true)(base), RuntimeError, /index out of bounds/); +} + +function testStore(type, ext, base, offset, align, value) { + if (type === 'i64') { + wasmAssert(storeModuleSrc(type, ext, offset, align), [ + {type, func: '$store', args: [`i32.const ${base}`, `i64.const ${value}`]}, + {type, func: '$load', args: [`i32.const ${base}`], expected: value}, + ]); + wasmAssert(storeModuleCstSrc(type, ext, offset, align, value), [ + {type, func: '$store', args: [`i32.const ${base}`]}, + {type, func: '$load', args: [`i32.const ${base}`], expected: value}, + ]); + } else { + let module = storeModule(type, ext, offset, align); + let moduleCst = storeModuleCst(type, ext, offset, align, value); + module.store(base, value); + assertEq(module.load(base), value); + moduleCst.store(base); + assertEq(moduleCst.load(base), value); + } +} + +function testStoreOOB(type, ext, base, offset, align, value) { + if (type === 'i64') { + assertErrorMessage(() => wasmAssert( + storeModuleSrc(type, ext, offset, align), + [{type, func: '$store', args: [`i32.const ${base}`, `i64.const ${value}`]}] + ), RuntimeError, /index out of bounds/); + } else { + assertErrorMessage(() => storeModule(type, ext, offset, align).store(base, value), RuntimeError, /index out of bounds/); + } +} + +function badLoadModule(type, ext) { + wasmFailValidateText( `(module (func (param i32) (${type}.load${ext} (local.get 0))) (export "" (func 0)))`, /memory index/); +} + +function badStoreModule(type, ext) { + wasmFailValidateText(`(module (func (param i32) (${type}.store${ext} (local.get 0) (${type}.const 0))) (export "" (func 0)))`, /memory index/); +} + +// Can't touch memory. +for (let [type, ext] of [ + ['i32', ''], + ['i32', '8_s'], + ['i32', '8_u'], + ['i32', '16_s'], + ['i32', '16_u'], + ['i64', ''], + ['i64', '8_s'], + ['i64', '8_u'], + ['i64', '16_s'], + ['i64', '16_u'], + ['i64', '32_s'], + ['i64', '32_u'], + ['f32', ''], + ['f64', ''], +]) +{ + badLoadModule(type, ext); +} + +for (let [type, ext] of [ + ['i32', ''], + ['i32', '8'], + ['i32', '16'], + ['i64', ''], + ['i64', '8'], + ['i64', '16'], + ['i64', '32'], + ['f32', ''], + ['f64', ''], +]) +{ + badStoreModule(type, ext); +} + +assertEq(getJitCompilerOptions()['wasm.fold-offsets'], 1); + +for (var foldOffsets = 0; foldOffsets <= 1; foldOffsets++) { + setJitCompilerOption('wasm.fold-offsets', foldOffsets | 0); + + testLoad('i32', '', 0, 0, 0, 0x03020100); + testLoad('i32', '', 1, 0, 1, 0x04030201); + testLoad('i32', '', 0, 4, 0, 0x07060504); + testLoad('i32', '', 1, 3, 4, 0x07060504); + testLoad('f32', '', 0, 0, 0, 3.820471434542632e-37); + testLoad('f32', '', 1, 0, 1, 1.539989614439558e-36); + testLoad('f32', '', 0, 4, 0, 1.0082513512365273e-34); + testLoad('f32', '', 1, 3, 4, 1.0082513512365273e-34); + testLoad('f64', '', 0, 0, 0, 7.949928895127363e-275); + testLoad('f64', '', 1, 0, 1, 5.447603722011605e-270); + testLoad('f64', '', 0, 8, 0, 3.6919162048650923e-236); + testLoad('f64', '', 1, 7, 8, 3.6919162048650923e-236); + + testLoad('i32', '8_s', 16, 0, 0, -0x10); + testLoad('i32', '8_u', 16, 0, 0, 0xf0); + testLoad('i32', '16_s', 16, 0, 0, -0xe10); + testLoad('i32', '16_u', 16, 0, 0, 0xf1f0); + + testStore('i32', '', 0, 0, 0, -0x3f3e2c2c); + testStore('i32', '', 1, 0, 1, -0x3f3e2c2c); + testStore('i32', '', 0, 1, 1, -0x3f3e2c2c); + testStore('i32', '', 1, 1, 4, -0x3f3e2c2c); + + testStore('f32', '', 0, 0, 0, 0.01234566979110241); + testStore('f32', '', 1, 0, 1, 0.01234566979110241); + testStore('f32', '', 0, 4, 0, 0.01234566979110241); + testStore('f32', '', 1, 3, 4, 0.01234566979110241); + testStore('f64', '', 0, 0, 0, 0.89012345); + testStore('f64', '', 1, 0, 1, 0.89012345); + testStore('f64', '', 0, 8, 0, 0.89012345); + testStore('f64', '', 1, 7, 8, 0.89012345); + + testStore('i32', '8', 0, 0, 0, 0x23); + testStore('i32', '16', 0, 0, 0, 0x2345); + + wasmFailValidateText('(module (memory 2 1))', /maximum length 1 is less than initial length 2/); + + // Test bounds checks and edge cases. + + for (let align of [0,1,2,4]) { + + for (let offset of [0, 1, 2, 3, 4, 8, 16, 41, 0xfff8]) { + // Accesses of 1 byte. + let lastValidIndex = 0x10000 - 1 - offset; + + if (align < 2) { + testLoad('i32', '8_s', lastValidIndex, offset, align, 0); + testLoadOOB('i32', '8_s', lastValidIndex + 1, offset, align); + + testLoad('i32', '8_u', lastValidIndex, offset, align, 0); + testLoadOOB('i32', '8_u', lastValidIndex + 1, offset, align); + + testStore('i32', '8', lastValidIndex, offset, align, -42); + testStoreOOB('i32', '8', lastValidIndex + 1, offset, align, -42); + } + + // Accesses of 2 bytes. + lastValidIndex = 0x10000 - 2 - offset; + + if (align < 4) { + testLoad('i32', '16_s', lastValidIndex, offset, align, 0); + testLoadOOB('i32', '16_s', lastValidIndex + 1, offset, align); + + testLoad('i32', '16_u', lastValidIndex, offset, align, 0); + testLoadOOB('i32', '16_u', lastValidIndex + 1, offset, align); + + testStore('i32', '16', lastValidIndex, offset, align, -32768); + testStoreOOB('i32', '16', lastValidIndex + 1, offset, align, -32768); + } + + // Accesses of 4 bytes. + lastValidIndex = 0x10000 - 4 - offset; + + testLoad('i32', '', lastValidIndex, offset, align, 0); + testLoadOOB('i32', '', lastValidIndex + 1, offset, align); + + testLoad('f32', '', lastValidIndex, offset, align, 0); + testLoadOOB('f32', '', lastValidIndex + 1, offset, align); + + testStore('i32', '', lastValidIndex, offset, align, 1337); + testStoreOOB('i32', '', lastValidIndex + 1, offset, align, 1337); + + testStore('f32', '', lastValidIndex, offset, align, Math.fround(13.37)); + testStoreOOB('f32', '', lastValidIndex + 1, offset, align, Math.fround(13.37)); + + // Accesses of 8 bytes. + lastValidIndex = 0x10000 - 8 - offset; + + testLoad('f64', '', lastValidIndex, offset, align, 0); + testLoadOOB('f64', '', lastValidIndex + 1, offset, align); + + testStore('f64', '', lastValidIndex, offset, align, 1.23456789); + testStoreOOB('f64', '', lastValidIndex + 1, offset, align, 1.23456789); + } + + // Ensure wrapping doesn't apply. + offset = 0x7fffffff; + for (let index of [0, 1, 2, 3, 0x7fffffff, 0x80000000, 0x80000001]) { + if (align < 2) { + testLoadOOB('i32', '8_s', index, offset, align); + } + if (align < 4) { + testLoadOOB('i32', '16_s', index, offset, align); + } + testLoadOOB('i32', '', index, offset, align); + testLoadOOB('f32', '', index, offset, align); + testLoadOOB('f64', '', index, offset, align); + } + + // Ensure out of bounds when the offset is greater than the immediate range. + index = 0; + for (let offset of [0x80000000, 0xfffffffe, 0xffffffff]) { + testLoadOOB('i32', '8_s', index, offset, 1); + testLoadOOB('i32', '16_s', index, offset, 1); + testLoadOOB('i32', '16_s', index, offset, 2); + testLoadOOB('i32', '', index, offset, 1); + testLoadOOB('i32', '', index, offset, 4); + testLoadOOB('f32', '', index, offset, 1); + testLoadOOB('f32', '', index, offset, 4); + testLoadOOB('f64', '', index, offset, 1); + testLoadOOB('f64', '', index, offset, 8); + } + + wasmFailValidateText('(module (memory 1) (func (f64.store offset=0 (i32.const 0) (i32.const 0))))', mismatchError("i32", "f64")); + wasmFailValidateText('(module (memory 1) (func (f64.store offset=0 (i32.const 0) (f32.const 0))))', mismatchError("f32", "f64")); + + wasmFailValidateText('(module (memory 1) (func (f32.store offset=0 (i32.const 0) (i32.const 0))))', mismatchError("i32", "f32")); + wasmFailValidateText('(module (memory 1) (func (f32.store offset=0 (i32.const 0) (f64.const 0))))', mismatchError("f64", "f32")); + + wasmFailValidateText('(module (memory 1) (func (i32.store offset=0 (i32.const 0) (f32.const 0))))', mismatchError("f32", "i32")); + wasmFailValidateText('(module (memory 1) (func (i32.store offset=0 (i32.const 0) (f64.const 0))))', mismatchError("f64", "i32")); + + // Test high number of registers. + function testRegisters() { + assertEq(wasmEvalText( + `(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff") + (func (param i32) (result i32) (local i32 i32 i32 i32 f32 f64) + (local.set 1 (i32.load8_s offset=4 (local.get 0))) + (local.set 2 (i32.load16_s (local.get 1))) + (i32.store8 offset=4 (local.get 0) (local.get 1)) + (local.set 3 (i32.load16_u (local.get 2))) + (i32.store16 (local.get 1) (local.get 2)) + (local.set 4 (i32.load (local.get 2))) + (i32.store (local.get 1) (local.get 2)) + (local.set 5 (f32.load (local.get 4))) + (f32.store (local.get 4) (local.get 5)) + (local.set 6 (f64.load (local.get 4))) + (f64.store (local.get 4) (local.get 6)) + (i32.add + (i32.add + (local.get 0) + (local.get 1) + ) + (i32.add + (i32.add + (local.get 2) + (local.get 3) + ) + (i32.add + (local.get 4) + (i32.reinterpret_f32 (local.get 5)) + ) + ) + ) + ) (export "" (func 0)))` + ).exports[""](1), 50464523); + } + + testRegisters(); + + testLoad('i64', '', 0, 0, 0, '0x0706050403020100'); + testLoad('i64', '', 1, 0, 0, '0x0807060504030201'); + testLoad('i64', '', 0, 1, 0, '0x0807060504030201'); + testLoad('i64', '', 1, 1, 4, '0x0908070605040302'); + + testLoad('i64', '8_s', 16, 0, 0, -0x10); + testLoad('i64', '8_u', 16, 0, 0, 0xf0); + testLoad('i64', '16_s', 16, 0, 0, -0xe10); + testLoad('i64', '16_u', 16, 0, 0, 0xf1f0); + testLoad('i64', '32_s', 16, 0, 0, 0xf3f2f1f0 | 0); + testLoad('i64', '32_u', 16, 0, 0, '0xf3f2f1f0'); + + testStore('i64', '', 0, 0, 0, '0xc0c1d3d4e6e7090a'); + testStore('i64', '', 1, 0, 0, '0xc0c1d3d4e6e7090a'); + testStore('i64', '', 0, 1, 0, '0xc0c1d3d4e6e7090a'); + testStore('i64', '', 1, 1, 4, '0xc0c1d3d4e6e7090a'); + testStore('i64', '8', 0, 0, 0, 0x23); + testStore('i64', '16', 0, 0, 0, 0x23); + testStore('i64', '32', 0, 0, 0, 0x23); + + for (let offset of [0, 1, 2, 3, 4, 8, 16, 41, 0xfff8]) { + // Accesses of 1 byte. + let lastValidIndex = 0x10000 - 1 - offset; + + if (align < 2) { + testLoad('i64', '8_s', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '8_s', lastValidIndex + 1, offset, align); + + testLoad('i64', '8_u', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '8_u', lastValidIndex + 1, offset, align); + + testStore('i64', '8', lastValidIndex, offset, align, -42); + testStoreOOB('i64', '8', lastValidIndex + 1, offset, align, -42); + } + + // Accesses of 2 bytes. + lastValidIndex = 0x10000 - 2 - offset; + + if (align < 4) { + testLoad('i64', '16_s', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '16_s', lastValidIndex + 1, offset, align); + + testLoad('i64', '16_u', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '16_u', lastValidIndex + 1, offset, align); + + testStore('i64', '16', lastValidIndex, offset, align, -32768); + testStoreOOB('i64', '16', lastValidIndex + 1, offset, align, -32768); + } + + // Accesses of 4 bytes. + lastValidIndex = 0x10000 - 4 - offset; + + testLoad('i64', '32_s', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '32_s', lastValidIndex + 1, offset, align); + + testLoad('i64', '32_u', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '32_u', lastValidIndex + 1, offset, align); + + testStore('i64', '32', lastValidIndex, offset, align, 0xf1231337 | 0); + testStoreOOB('i64', '32', lastValidIndex + 1, offset, align, 0xf1231337 | 0); + + // Accesses of 8 bytes. + lastValidIndex = 0x10000 - 8 - offset; + + testLoad('i64', '', lastValidIndex, offset, align, 0); + testLoadOOB('i64', '', lastValidIndex + 1, offset, align); + + testStore('i64', '', lastValidIndex, offset, align, '0x1234567887654321'); + testStoreOOB('i64', '', lastValidIndex + 1, offset, align, '0x1234567887654321'); + } + } +} + +setJitCompilerOption('wasm.fold-offsets', 1); + +// Test active segments with a memory index. + +{ + function makeIt(flag, memindex) { + return new Uint8Array([0x00, 0x61, 0x73, 0x6d, + 0x01, 0x00, 0x00, 0x00, + 0x05, // Memory section + 0x03, // Section size + 0x01, // One memory + 0x00, // Unshared, min only + 0x01, // Min + 0x0b, // Data section + 0x0a, // Section size + 0x01, // One data segment + flag, // Flag should be 2, or > 2 if invalid + memindex, // Memory index should be 0, or > 0 if invalid + 0x41, // Init expr: i32.const + 0x00, // Init expr: zero (payload) + 0x0b, // Init expr: end + 0x03, // Three bytes, because why not? + 0x01, + 0x02, + 0x03]); + } + + // Should succeed because this is what an active segment with index looks like + new WebAssembly.Module(makeIt(0x02, 0x00)); + + // Should fail because the kind is unknown + assertErrorMessage(() => new WebAssembly.Module(makeIt(0x03, 0x00)), + WebAssembly.CompileError, + /invalid data initializer-kind/); + + // Should fail because the memory index is bad + assertErrorMessage(() => new WebAssembly.Module(makeIt(0x02, 0x01)), + WebAssembly.CompileError, + /invalid memory index/); +} + +// Misc syntax for data. + +// When memory index is present it must be zero, and the offset must be present too; +// but it's OK for there to be neither +new WebAssembly.Module(wasmTextToBinary(`(module (memory 1) (data 0 (i32.const 0) ""))`)); +new WebAssembly.Module(wasmTextToBinary(`(module (memory 1) (data 0 (offset (i32.const 0)) ""))`)); +new WebAssembly.Module(wasmTextToBinary(`(module (memory 1) (data ""))`)); +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(`(module (memory 1) (data 0 ""))`)), + SyntaxError, + /wasm text error/); +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(`(module (memory 1) (data 1 (i32.const 0) ""))`)), + WebAssembly.CompileError, + /invalid memory index/); + + +// Make sure we handle memory instructions without memory + +var nomem = /memory index out of range/; + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(`(module (func (result i32) memory.size))`)), + WebAssembly.CompileError, + nomem); + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(`(module (func (result i32) (memory.grow (i32.const 1))))`)), + WebAssembly.CompileError, + nomem); + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(` +(module (func (param i32 i32 i32) + (memory.copy (local.get 0) (local.get 1) (local.get 2))))`)), + WebAssembly.CompileError, + nomem); + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(` +(module (func (param i32 i32 i32) + (memory.fill (local.get 0) (local.get 1) (local.get 2))))`)), + WebAssembly.CompileError, + nomem); + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(` +(module + (data $d "01234") + (func (param i32 i32) + (memory.init $d (local.get 0) (local.get 1))))`)), + WebAssembly.CompileError, + nomem); + diff --git a/js/src/jit-test/tests/wasm/memory64/basic.js b/js/src/jit-test/tests/wasm/memory64/basic.js new file mode 100644 index 0000000000..693773f25e --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory64/basic.js @@ -0,0 +1,1575 @@ +// |jit-test| allow-oom + +// Basic tests around creating and linking memories with i64 indices + +const MaxMemory64Field = 0x1_0000_0000_0000; // pages +const MaxUint32 = 0xFFFF_FFFF; + +// test the validity of different i64 memory types in validation, compilation, +// and the JS-API. +function memoryTypeModuleText(shared, initial, max) { + return `(module + (memory i64 ${initial} ${max !== undefined ? max : ''} ${shared ? `shared` : ''}))`; +} +function memoryTypeDescriptor(shared, initial, max) { + return { + // TODO: "index" is not yet part of the spec + // https://github.com/WebAssembly/memory64/issues/24 + index: 'i64', + initial, + maximum: max, + shared, + }; +} +function validMemoryType(shared, initial, max) { + wasmValidateText(memoryTypeModuleText(shared, initial, max)); + wasmEvalText(memoryTypeModuleText(shared, initial, max)); + // TODO: JS-API cannot specify pages above UINT32_MAX + // https://github.com/WebAssembly/memory64/issues/24 + new WebAssembly.Memory(memoryTypeDescriptor(shared, initial, max)); +} +function invalidMemoryType(shared, initial, max, compileMessage, jsMessage) { + wasmFailValidateText(memoryTypeModuleText(shared, initial, max), compileMessage); + assertErrorMessage(() => wasmEvalText(memoryTypeModuleText(shared, initial, max)), WebAssembly.CompileError, compileMessage); + // TODO: JS-API cannot specify pages above UINT32_MAX + // https://github.com/WebAssembly/memory64/issues/24 + assertErrorMessage(() => new WebAssembly.Memory(memoryTypeDescriptor(shared, initial, max)), Error, jsMessage); +} + +// valid to define a memory with i64 +validMemoryType(false, 0); +// valid to define max with i64 +validMemoryType(false, 0, 1); +// invalid for min to be greater than max with i64 +invalidMemoryType(false, 2, 1, /minimum must not be greater than maximum/, /bad Memory maximum size/); +// valid to define shared memory with max with i64 +validMemoryType(true, 1, 2); +// invalid to define shared memory without max with i64 +invalidMemoryType(true, 1, undefined, /maximum length required for shared memory/, /maximum is not specified/); + +// test the limits of memory64 +validMemoryType(false, 0, MaxMemory64Field); +invalidMemoryType(false, 0, MaxMemory64Field + 1, /maximum memory size too big/, /bad Memory maximum/); +validMemoryType(true, 0, MaxMemory64Field); +invalidMemoryType(true, 0, MaxMemory64Field + 1, /maximum memory size too big/, /bad Memory maximum/); + +// test that linking requires index types to be equal +function testLink(importedIndexType, importIndexType) { + let imported = new WebAssembly.Memory({ + // TODO: "index" is not yet part of the spec + // https://github.com/WebAssembly/memory64/issues/24 + index: importedIndexType, + initial: 0, + }); + let testModule = + `(module + (memory (import "" "imported") ${importIndexType} 0))`; + if (importedIndexType === importIndexType) { + wasmEvalText(testModule, {"": {imported}}); + } else { + assertErrorMessage(() => wasmEvalText(testModule, {"": {imported}}), WebAssembly.LinkError, /index type/); + } +} + +var memTypes = [ + ['i64', 'i64'], + ['i32', 'i32'], + ['i64', 'i32'], + ['i32', 'i64']]; + +for ( let [a,b] of memTypes ) { + testLink(a, b); +} + +// Active data segments use the index type for the init expression + +for ( let [memType,exprType] of memTypes ) { + assertEq(WebAssembly.validate(wasmTextToBinary(` +(module + (memory ${memType} 1) + (data (${exprType}.const 0) "abcde"))`)), memType == exprType); +} + +// Validate instructions using 32/64-bit pointers in 32/64-bit memories. + +var validOffsets = {i32: ['', 'offset=0x10000000'], + i64: ['', 'offset=0x10000000', 'offset=0x200000000']} + +// Basic load/store +for (let [memType, ptrType] of memTypes ) { + for (let offs of validOffsets[memType]) { + assertEq(WebAssembly.validate(wasmTextToBinary(` +(module + (memory ${memType} 1) + (func (param $p ${ptrType}) (param $i i32) (param $l i64) (param $f f32) (param $d f64) + (drop (i32.add (i32.const 1) (i32.load8_s ${offs} (local.get $p)))) + (drop (i32.add (i32.const 1) (i32.load8_u ${offs} (local.get $p)))) + (drop (i32.add (i32.const 1) (i32.load16_s ${offs} (local.get $p)))) + (drop (i32.add (i32.const 1) (i32.load16_u ${offs} (local.get $p)))) + (drop (i32.add (i32.const 1) (i32.load ${offs} (local.get $p)))) + (i32.store8 ${offs} (local.get $p) (local.get $i)) + (i32.store16 ${offs} (local.get $p) (local.get $i)) + (i32.store ${offs} (local.get $p) (local.get $i)) + (drop (i64.add (i64.const 1) (i64.load8_s ${offs} (local.get $p)))) + (drop (i64.add (i64.const 1) (i64.load8_u ${offs} (local.get $p)))) + (drop (i64.add (i64.const 1) (i64.load16_s ${offs} (local.get $p)))) + (drop (i64.add (i64.const 1) (i64.load16_u ${offs} (local.get $p)))) + (drop (i64.add (i64.const 1) (i64.load32_s ${offs} (local.get $p)))) + (drop (i64.add (i64.const 1) (i64.load32_u ${offs} (local.get $p)))) + (drop (i64.add (i64.const 1) (i64.load ${offs} (local.get $p)))) + (i64.store8 ${offs} (local.get $p) (local.get $l)) + (i64.store16 ${offs} (local.get $p) (local.get $l)) + (i64.store32 ${offs} (local.get $p) (local.get $l)) + (i64.store ${offs} (local.get $p) (local.get $l)) + (drop (f32.add (f32.const 1) (f32.load ${offs} (local.get $p)))) + (f32.store ${offs} (local.get $p) (local.get $f)) + (drop (f64.add (f64.const 1) (f64.load ${offs} (local.get $p)))) + (f64.store ${offs} (local.get $p) (local.get $d)) +))`)), memType == ptrType); + } +} + +// Bulk memory operations +for (let [memType, ptrType] of memTypes ) { + assertEq(WebAssembly.validate(wasmTextToBinary(` +(module + (memory ${memType} 1) + (data $seg "0123456789abcdef") + (func (param $p ${ptrType}) + (drop (${ptrType}.add (${ptrType}.const 1) (memory.size))) + (drop (${ptrType}.add (${ptrType}.const 1) (memory.grow (${ptrType}.const 1)))) + (memory.copy (local.get $p) (${ptrType}.const 0) (${ptrType}.const 628)) + (memory.fill (local.get $p) (i32.const 37) (${ptrType}.const 1024)) + (memory.init $seg (local.get $p) (i32.const 3) (i32.const 5)) +))`)), memType == ptrType); +} + +// SIMD +if (wasmSimdEnabled()) { + for (let [memType, ptrType] of memTypes ) { + for (let offs of validOffsets[memType]) { + assertEq(WebAssembly.validate(wasmTextToBinary(` +(module + (memory ${memType} 1) + (func (param $p ${ptrType}) (param $v v128) (param $w v128) + (drop (i8x16.add (local.get $w) (v128.load ${offs} (local.get $p)))) + (v128.store ${offs} (local.get $p) (local.get $v)) + (drop (i8x16.add (local.get $w) (v128.load8_splat ${offs} (local.get $p)))) + (drop (i8x16.add (local.get $w) (v128.load16_splat ${offs} (local.get $p)))) + (drop (i8x16.add (local.get $w) (v128.load32_splat ${offs} (local.get $p)))) + (drop (i8x16.add (local.get $w) (v128.load64_splat ${offs} (local.get $p)))) + (drop (i8x16.add (local.get $w) (v128.load32_zero ${offs} (local.get $p)))) + (drop (i8x16.add (local.get $w) (v128.load64_zero ${offs} (local.get $p)))) + (drop (i8x16.add (local.get $w) (v128.load8_lane ${offs} 1 (local.get $p) (local.get $v)))) + (drop (i8x16.add (local.get $w) (v128.load16_lane ${offs} 1 (local.get $p) (local.get $v)))) + (drop (i8x16.add (local.get $w) (v128.load32_lane ${offs} 1 (local.get $p) (local.get $v)))) + (drop (i8x16.add (local.get $w) (v128.load64_lane ${offs} 1 (local.get $p) (local.get $v)))) + (v128.store8_lane ${offs} 1 (local.get $p) (local.get $v)) + (v128.store16_lane ${offs} 1 (local.get $p) (local.get $v)) + (v128.store32_lane ${offs} 1 (local.get $p) (local.get $v)) + (v128.store64_lane ${offs} 1 (local.get $p) (local.get $v)) + (drop (i8x16.add (local.get $w) (v128.load8x8_s ${offs} (local.get $p)))) + (drop (i8x16.add (local.get $w) (v128.load8x8_u ${offs} (local.get $p)))) + (drop (i8x16.add (local.get $w) (v128.load16x4_s ${offs} (local.get $p)))) + (drop (i8x16.add (local.get $w) (v128.load16x4_u ${offs} (local.get $p)))) + (drop (i8x16.add (local.get $w) (v128.load32x2_s ${offs} (local.get $p)))) + (drop (i8x16.add (local.get $w) (v128.load32x2_u ${offs} (local.get $p)))) +))`)), memType == ptrType); + } + } +} + +// Threads +if (wasmThreadsEnabled()) { + for (let [memType, ptrType] of memTypes ) { + for (let offs of validOffsets[memType]) { + assertEq(WebAssembly.validate(wasmTextToBinary(` +(module + (memory ${memType} 1 100 shared) + (func (param $p ${ptrType}) (param $i i32) (param $l i64) + (drop (i32.add (i32.const 1) (memory.atomic.wait32 ${offs} (local.get $p) (i32.const 0) (i64.const 37)))) + (drop (i32.add (i32.const 1) (memory.atomic.wait64 ${offs} (local.get $p) (i64.const 0) (i64.const 37)))) + (drop (i32.add (i32.const 1) (memory.atomic.notify ${offs} (local.get $p) (i32.const 1)))) +))`)), memType == ptrType); + + for (let [ty,size,sx] of + [['i32','','','',],['i32','8','_u'],['i32','16','_u'], + ['i64','',''],['i64','8','_u'],['i64','16','_u'],['i64','32','_u']]) { + assertEq(WebAssembly.validate(wasmTextToBinary(` +(module + (memory ${memType} 1 100 shared) + (func (param $p ${ptrType}) (param $vi32 i32) (param $vi64 i64) + (drop (${ty}.add (${ty}.const 1) (${ty}.atomic.load${size}${sx} ${offs} (local.get $p)))) + (${ty}.atomic.store${size} ${offs} (local.get $p) (local.get $v${ty})) + (drop (${ty}.add (${ty}.const 1) (${ty}.atomic.rmw${size}.add${sx} ${offs} (local.get $p) (local.get $v${ty})))) + (drop (${ty}.add (${ty}.const 1) (${ty}.atomic.rmw${size}.sub${sx} ${offs} (local.get $p) (local.get $v${ty})))) + (drop (${ty}.add (${ty}.const 1) (${ty}.atomic.rmw${size}.and${sx} ${offs} (local.get $p) (local.get $v${ty})))) + (drop (${ty}.add (${ty}.const 1) (${ty}.atomic.rmw${size}.or${sx} ${offs} (local.get $p) (local.get $v${ty})))) + (drop (${ty}.add (${ty}.const 1) (${ty}.atomic.rmw${size}.xor${sx} ${offs} (local.get $p) (local.get $v${ty})))) + (drop (${ty}.add (${ty}.const 1) (${ty}.atomic.rmw${size}.xchg${sx} ${offs} (local.get $p) (local.get $v${ty})))) + (drop (${ty}.add (${ty}.const 1) (${ty}.atomic.rmw${size}.cmpxchg${sx} ${offs} (local.get $p) (local.get $v${ty}) (${ty}.const 37)))) +))`)), memType == ptrType); + } + + } + } +} + +// Cursorily check that invalid offsets are rejected. + +assertEq(WebAssembly.validate(wasmTextToBinary(` +(module + (memory i32 1) + (func (param $p i32) + (drop (i32.load offset=0x100000000 (local.get $p)))))`)), false); + + +// For Memory64, any valid wat-syntaxed offset is valid. + +assertEq(WebAssembly.validate(wasmTextToBinary(` +(module + (memory i64 1) + (func (param $p i64) + (drop (i32.load offset=0x1000000000000 (local.get $p)))))`)), true); + + +/////////////////////////////////////////////////////////////////////////////// +// +// EXECUTION + +// Smoketest: Can we actually allocate a memory larger than 4GB? + +if (getBuildConfiguration("pointer-byte-size") == 8) { + // TODO: "index" is not yet part of the spec + // https://github.com/WebAssembly/memory64/issues/24 + + try { + new WebAssembly.Memory({index:"i64", initial:65536 * 1.5, maximum:65536 * 2}); + } catch (e) { + // OOM is OK. + if (!(e instanceof WebAssembly.RuntimeError) || !String(e).match(/too many memory pages/)) { + throw e; + } + } +} + +// JS-API + +if (WebAssembly.Function) { + // TODO: "index" is not yet part of the spec + // TODO: values outside the u32 range are not yet part of the spec + // https://github.com/WebAssembly/memory64/issues/24 + + let m64 = new WebAssembly.Memory({index:"i64", initial:1}); + assertEq(m64.type().index, "i64"); + + let m32 = new WebAssembly.Memory({initial:1}); + assertEq(m32.type().index, "i32"); + + let ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (memory (export "mem") i64 1 0x100000000))`))); + assertEq(ins.exports.mem.type().minimum, 1); + assertEq(ins.exports.mem.type().maximum, 0x100000000); +} + +// Instructions + +const SMALL = 64; // < offsetguard everywhere +const BIG = 131072; // > offsetguard on 32-bit +const HUGE = 2147483656; // > offsetguard on 64-bit +const VAST = 0x112001300; // > 4GB + +function makeTest(LOC, INITIAL, MAXIMUM, SHARED) { + const v128Prefix = +` (func $stash (param v128) + (v128.store (i64.const 0) (local.get 0))) + + (func $unstash (result v128) + (v128.load (i64.const 0))) +`; + + const readV128Code = +` (func (export "readv128@0") (param $p i64) + (call $stash (v128.load (local.get $p)))) + + (func (export "readv128@small") (param $p i64) + (call $stash (v128.load offset=${SMALL} (local.get $p)))) + + (func (export "readv128@big") (param $p i64) + (call $stash (v128.load offset=${BIG} (local.get $p)))) + + (func (export "readv128@huge") (param $p i64) + (call $stash (v128.load offset=${HUGE} (local.get $p)))) + + (func (export "readv128/const@0") + (call $stash (v128.load (i64.const ${LOC})))) + + (func (export "readv128/const@small") + (call $stash (v128.load offset=${SMALL} (i64.const ${LOC})))) + + (func (export "readv128/const@big") + (call $stash (v128.load offset=${BIG} (i64.const ${LOC})))) + + (func (export "v128.load_splat@small") (param $p i64) + (call $stash (v128.load32_splat offset=${SMALL} (local.get $p)))) + + (func (export "v128.load_zero@small") (param $p i64) + (call $stash (v128.load32_zero offset=${SMALL} (local.get $p)))) + + (func (export "v128.load_extend@small") (param $p i64) + (call $stash (v128.load32x2_u offset=${SMALL} (local.get $p)))) + + (func (export "v128.load_lane@small") (param $p i64) + (call $stash (v128.load32_lane offset=${SMALL} 2 (local.get $p) (call $unstash)))) +`; + + const writeV128Code = +` (func (export "writev128@0") (param $p i64) + (v128.store (local.get $p) (call $unstash))) + + (func (export "writev128@small") (param $p i64) + (v128.store offset=${SMALL} (local.get $p) (call $unstash))) + + (func (export "writev128@big") (param $p i64) + (v128.store offset=${BIG} (local.get $p) (call $unstash))) + + (func (export "writev128@huge") (param $p i64) + (v128.store offset=${HUGE} (local.get $p) (call $unstash))) + + (func (export "writev128/const@0") + (v128.store (i64.const ${LOC}) (call $unstash))) + + (func (export "writev128/const@small") + (v128.store offset=${SMALL} (i64.const ${LOC}) (call $unstash))) + + (func (export "writev128/const@big") + (v128.store offset=${BIG} (i64.const ${LOC}) (call $unstash))) + + (func (export "v128.store_lane@small") (param $p i64) + (v128.store32_lane offset=${SMALL} 2 (local.get $p) (call $unstash))) +`; + + const ins = wasmEvalText(` +(module + (memory (export "mem") i64 ${INITIAL} ${MAXIMUM} ${SHARED}) + + ;; About the test cases: there are various optimizations in the engine + ;; for different shapes of a pointer+offset. Constant pointers are + ;; resolved early; large offsets are folded early using explicit code + ;; with an overflow check (but "large" depends on 32-bit vs 64-bit); + ;; wait/notify fold offsets early regardless; zero offsets lead to + ;; tighter code with variable pointers; and don't get me started on + ;; alignment checks. These test cases are not exhaustive but aim + ;; to test at least some things. + + ;; TODO: more sizes for all operations, though this is not critical + ;; TODO: sign extending loads, again not critical + + ${wasmSimdEnabled() ? v128Prefix : ""} + + ;; Read i32 + (func (export "readi32@0") (param $p i64) (result i32) + (i32.load (local.get $p))) + + (func (export "readi32@small") (param $p i64) (result i32) + (i32.load offset=${SMALL} (local.get $p))) + + (func (export "readi32@big") (param $p i64) (result i32) + (i32.load offset=${BIG} (local.get $p))) + + (func (export "readi32@huge") (param $p i64) (result i32) + (i32.load offset=${HUGE} (local.get $p))) + + (func (export "readi32@vast") (param $p i64) (result i32) + (i32.load offset=${VAST} (local.get $p))) + + (func (export "readi32/const@0") (result i32) + (i32.load (i64.const ${LOC}))) + + (func (export "readi32/const@small") (result i32) + (i32.load offset=${SMALL} (i64.const ${LOC}))) + + (func (export "readi32/const@big") (result i32) + (i32.load offset=${BIG} (i64.const ${LOC}))) + + (func (export "readi32/const@vast") (result i32) + (i32.load offset=${VAST} (i64.const ${LOC}))) + + ;; Read i64 + (func (export "readi64@0") (param $p i64) (result i64) + (i64.load (local.get $p))) + + (func (export "readi64@small") (param $p i64) (result i64) + (i64.load offset=${SMALL} (local.get $p))) + + (func (export "readi64@big") (param $p i64) (result i64) + (i64.load offset=${BIG} (local.get $p))) + + (func (export "readi64@huge") (param $p i64) (result i64) + (i64.load offset=${HUGE} (local.get $p))) + + (func (export "readi64@vast") (param $p i64) (result i64) + (i64.load offset=${VAST} (local.get $p))) + + (func (export "readi64/const@0") (result i64) + (i64.load (i64.const ${LOC}))) + + (func (export "readi64/const@small") (result i64) + (i64.load offset=${SMALL} (i64.const ${LOC}))) + + (func (export "readi64/const@big") (result i64) + (i64.load offset=${BIG} (i64.const ${LOC}))) + + (func (export "readi64/const@vast") (result i64) + (i64.load offset=${VAST} (i64.const ${LOC}))) + + ;; Read v128 + ${wasmSimdEnabled() ? readV128Code : ""} + + ;; write i32 + (func (export "writei32@0") (param $p i64) (param $v i32) + (i32.store (local.get $p) (local.get $v))) + + (func (export "writei32@small") (param $p i64) (param $v i32) + (i32.store offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "writei32@big") (param $p i64) (param $v i32) + (i32.store offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "writei32@huge") (param $p i64) (param $v i32) + (i32.store offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "writei32@vast") (param $p i64) (param $v i32) + (i32.store offset=${VAST} (local.get $p) (local.get $v))) + + (func (export "writei32/const@0") (param $v i32) + (i32.store (i64.const ${LOC}) (local.get $v))) + + (func (export "writei32/const@small") (param $v i32) + (i32.store offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "writei32/const@big") (param $v i32) + (i32.store offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + (func (export "writei32/const@vast") (param $v i32) + (i32.store offset=${VAST} (i64.const ${LOC}) (local.get $v))) + + ;; write i64 + (func (export "writei64@0") (param $p i64) (param $v i64) + (i64.store (local.get $p) (local.get $v))) + + (func (export "writei64@small") (param $p i64) (param $v i64) + (i64.store offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "writei64@big") (param $p i64) (param $v i64) + (i64.store offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "writei64@huge") (param $p i64) (param $v i64) + (i64.store offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "writei64@vast") (param $p i64) (param $v i64) + (i64.store offset=${VAST} (local.get $p) (local.get $v))) + + (func (export "writei64/const@0") (param $v i64) + (i64.store (i64.const ${LOC}) (local.get $v))) + + (func (export "writei64/const@small") (param $v i64) + (i64.store offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "writei64/const@big") (param $v i64) + (i64.store offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + (func (export "writei64/const@vast") (param $v i64) + (i64.store offset=${VAST} (i64.const ${LOC}) (local.get $v))) + + ;; Read v128 + ${wasmSimdEnabled() ? writeV128Code : ""} + + ;; Atomic read i32 + + (func (export "areadi32@0") (param $p i64) (result i32) + (i32.atomic.load (local.get $p))) + + (func (export "areadi32@small") (param $p i64) (result i32) + (i32.atomic.load offset=${SMALL} (local.get $p))) + + (func (export "areadi32@big") (param $p i64) (result i32) + (i32.atomic.load offset=${BIG} (local.get $p))) + + (func (export "areadi32@huge") (param $p i64) (result i32) + (i32.atomic.load offset=${HUGE} (local.get $p))) + + (func (export "areadi32@vast") (param $p i64) (result i32) + (i32.atomic.load offset=${VAST} (local.get $p))) + + (func (export "areadi32/const@0") (result i32) + (i32.atomic.load (i64.const ${LOC}))) + + (func (export "areadi32/const@small") (result i32) + (i32.atomic.load offset=${SMALL} (i64.const ${LOC}))) + + (func (export "areadi32/const@big") (result i32) + (i32.atomic.load offset=${BIG} (i64.const ${LOC}))) + + (func (export "areadi32/const@vast") (result i32) + (i32.atomic.load offset=${VAST} (i64.const ${LOC}))) + + ;; Atomic read i64 + + (func (export "areadi64@0") (param $p i64) (result i64) + (i64.atomic.load (local.get $p))) + + (func (export "areadi64@small") (param $p i64) (result i64) + (i64.atomic.load offset=${SMALL} (local.get $p))) + + (func (export "areadi64@big") (param $p i64) (result i64) + (i64.atomic.load offset=${BIG} (local.get $p))) + + (func (export "areadi64@huge") (param $p i64) (result i64) + (i64.atomic.load offset=${HUGE} (local.get $p))) + + (func (export "areadi64@vast") (param $p i64) (result i64) + (i64.atomic.load offset=${VAST} (local.get $p))) + + (func (export "areadi64/const@0") (result i64) + (i64.atomic.load (i64.const ${LOC}))) + + (func (export "areadi64/const@small") (result i64) + (i64.atomic.load offset=${SMALL} (i64.const ${LOC}))) + + (func (export "areadi64/const@big") (result i64) + (i64.atomic.load offset=${BIG} (i64.const ${LOC}))) + + (func (export "areadi64/const@vast") (result i64) + (i64.atomic.load offset=${VAST} (i64.const ${LOC}))) + + ;; Atomic write i32 + + (func (export "awritei32@0") (param $p i64) (param $v i32) + (i32.atomic.store (local.get $p) (local.get $v))) + + (func (export "awritei32@small") (param $p i64) (param $v i32) + (i32.atomic.store offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "awritei32@big") (param $p i64) (param $v i32) + (i32.atomic.store offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "awritei32@huge") (param $p i64) (param $v i32) + (i32.atomic.store offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "awritei32@vast") (param $p i64) (param $v i32) + (i32.atomic.store offset=${VAST} (local.get $p) (local.get $v))) + + (func (export "awritei32/const@0") (param $v i32) + (i32.atomic.store (i64.const ${LOC}) (local.get $v))) + + (func (export "awritei32/const@small") (param $v i32) + (i32.atomic.store offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "awritei32/const@big") (param $v i32) + (i32.atomic.store offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + (func (export "awritei32/const@vast") (param $v i32) + (i32.atomic.store offset=${VAST} (i64.const ${LOC}) (local.get $v))) + + ;; Atomic write i64 + + (func (export "awritei64@0") (param $p i64) (param $v i64) + (i64.atomic.store (local.get $p) (local.get $v))) + + (func (export "awritei64@small") (param $p i64) (param $v i64) + (i64.atomic.store offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "awritei64@big") (param $p i64) (param $v i64) + (i64.atomic.store offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "awritei64@huge") (param $p i64) (param $v i64) + (i64.atomic.store offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "awritei64@vast") (param $p i64) (param $v i64) + (i64.atomic.store offset=${VAST} (local.get $p) (local.get $v))) + + (func (export "awritei64/const@0") (param $v i64) + (i64.atomic.store (i64.const ${LOC}) (local.get $v))) + + (func (export "awritei64/const@small") (param $v i64) + (i64.atomic.store offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "awritei64/const@big") (param $v i64) + (i64.atomic.store offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + (func (export "awritei64/const@vast") (param $v i64) + (i64.atomic.store offset=${VAST} (i64.const ${LOC}) (local.get $v))) + + ;; xchg i32 + + (func (export "xchgi32@0") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.xchg (local.get $p) (local.get $v))) + + (func (export "xchgi32@small") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.xchg offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "xchgi32@big") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.xchg offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "xchgi32@huge") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.xchg offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "xchgi32/const@0") (param $v i32) (result i32) + (i32.atomic.rmw.xchg (i64.const ${LOC}) (local.get $v))) + + (func (export "xchgi32/const@small") (param $v i32) (result i32) + (i32.atomic.rmw.xchg offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "xchgi32/const@big") (param $v i32) (result i32) + (i32.atomic.rmw.xchg offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + ;; xchg i64 + + (func (export "xchgi64@0") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.xchg (local.get $p) (local.get $v))) + + (func (export "xchgi64@small") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.xchg offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "xchgi64@big") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.xchg offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "xchgi64@huge") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.xchg offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "xchgi64/const@0") (param $v i64) (result i64) + (i64.atomic.rmw.xchg (i64.const ${LOC}) (local.get $v))) + + (func (export "xchgi64/const@small") (param $v i64) (result i64) + (i64.atomic.rmw.xchg offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "xchgi64/const@big") (param $v i64) (result i64) + (i64.atomic.rmw.xchg offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + ;; add i32 + + (func (export "addi32@0") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.add (local.get $p) (local.get $v))) + + (func (export "addi32@small") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.add offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "addi32@big") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.add offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "addi32@huge") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.add offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "addi32/const@0") (param $v i32) (result i32) + (i32.atomic.rmw.add (i64.const ${LOC}) (local.get $v))) + + (func (export "addi32/const@small") (param $v i32) (result i32) + (i32.atomic.rmw.add offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "addi32/const@big") (param $v i32) (result i32) + (i32.atomic.rmw.add offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + ;; add i64 + + (func (export "addi64@0") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.add (local.get $p) (local.get $v))) + + (func (export "addi64@small") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.add offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "addi64@big") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.add offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "addi64@huge") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.add offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "addi64/const@0") (param $v i64) (result i64) + (i64.atomic.rmw.add (i64.const ${LOC}) (local.get $v))) + + (func (export "addi64/const@small") (param $v i64) (result i64) + (i64.atomic.rmw.add offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "addi64/const@big") (param $v i64) (result i64) + (i64.atomic.rmw.add offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + ;; sub i32 + + (func (export "subi32@0") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.sub (local.get $p) (local.get $v))) + + (func (export "subi32@small") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.sub offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "subi32@big") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.sub offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "subi32@huge") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.sub offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "subi32/const@0") (param $v i32) (result i32) + (i32.atomic.rmw.sub (i64.const ${LOC}) (local.get $v))) + + (func (export "subi32/const@small") (param $v i32) (result i32) + (i32.atomic.rmw.sub offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "subi32/const@big") (param $v i32) (result i32) + (i32.atomic.rmw.sub offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + ;; sub i64 + + (func (export "subi64@0") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.sub (local.get $p) (local.get $v))) + + (func (export "subi64@small") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.sub offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "subi64@big") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.sub offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "subi64@huge") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.sub offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "subi64/const@0") (param $v i64) (result i64) + (i64.atomic.rmw.sub (i64.const ${LOC}) (local.get $v))) + + (func (export "subi64/const@small") (param $v i64) (result i64) + (i64.atomic.rmw.sub offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "subi64/const@big") (param $v i64) (result i64) + (i64.atomic.rmw.sub offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + ;; and i32 + + (func (export "andi32@0") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.and (local.get $p) (local.get $v))) + + (func (export "andi32@small") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.and offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "andi32@big") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.and offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "andi32@huge") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.and offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "andi32/const@0") (param $v i32) (result i32) + (i32.atomic.rmw.and (i64.const ${LOC}) (local.get $v))) + + (func (export "andi32/const@small") (param $v i32) (result i32) + (i32.atomic.rmw.and offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "andi32/const@big") (param $v i32) (result i32) + (i32.atomic.rmw.and offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + ;; and i64 + + (func (export "andi64@0") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.and (local.get $p) (local.get $v))) + + (func (export "andi64@small") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.and offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "andi64@big") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.and offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "andi64@huge") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.and offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "andi64/const@0") (param $v i64) (result i64) + (i64.atomic.rmw.and (i64.const ${LOC}) (local.get $v))) + + (func (export "andi64/const@small") (param $v i64) (result i64) + (i64.atomic.rmw.and offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "andi64/const@big") (param $v i64) (result i64) + (i64.atomic.rmw.and offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + ;; or i32 + + (func (export "ori32@0") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.or (local.get $p) (local.get $v))) + + (func (export "ori32@small") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.or offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "ori32@big") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.or offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "ori32@huge") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.or offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "ori32/const@0") (param $v i32) (result i32) + (i32.atomic.rmw.or (i64.const ${LOC}) (local.get $v))) + + (func (export "ori32/const@small") (param $v i32) (result i32) + (i32.atomic.rmw.or offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "ori32/const@big") (param $v i32) (result i32) + (i32.atomic.rmw.or offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + ;; or i64 + + (func (export "ori64@0") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.or (local.get $p) (local.get $v))) + + (func (export "ori64@small") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.or offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "ori64@big") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.or offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "ori64@huge") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.or offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "ori64/const@0") (param $v i64) (result i64) + (i64.atomic.rmw.or (i64.const ${LOC}) (local.get $v))) + + (func (export "ori64/const@small") (param $v i64) (result i64) + (i64.atomic.rmw.or offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "ori64/const@big") (param $v i64) (result i64) + (i64.atomic.rmw.or offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + ;; xor i32 + + (func (export "xori32@0") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.xor (local.get $p) (local.get $v))) + + (func (export "xori32@small") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.xor offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "xori32@big") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.xor offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "xori32@huge") (param $p i64) (param $v i32) (result i32) + (i32.atomic.rmw.xor offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "xori32/const@0") (param $v i32) (result i32) + (i32.atomic.rmw.xor (i64.const ${LOC}) (local.get $v))) + + (func (export "xori32/const@small") (param $v i32) (result i32) + (i32.atomic.rmw.xor offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "xori32/const@big") (param $v i32) (result i32) + (i32.atomic.rmw.xor offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + ;; xor i64 + + (func (export "xori64@0") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.xor (local.get $p) (local.get $v))) + + (func (export "xori64@small") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.xor offset=${SMALL} (local.get $p) (local.get $v))) + + (func (export "xori64@big") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.xor offset=${BIG} (local.get $p) (local.get $v))) + + (func (export "xori64@huge") (param $p i64) (param $v i64) (result i64) + (i64.atomic.rmw.xor offset=${HUGE} (local.get $p) (local.get $v))) + + (func (export "xori64/const@0") (param $v i64) (result i64) + (i64.atomic.rmw.xor (i64.const ${LOC}) (local.get $v))) + + (func (export "xori64/const@small") (param $v i64) (result i64) + (i64.atomic.rmw.xor offset=${SMALL} (i64.const ${LOC}) (local.get $v))) + + (func (export "xori64/const@big") (param $v i64) (result i64) + (i64.atomic.rmw.xor offset=${BIG} (i64.const ${LOC}) (local.get $v))) + + ;; cmpxchg i32 + + (func (export "cmpxchgi32@0") (param $p i64) (param $expect i32) (param $new i32) (result i32) + (i32.atomic.rmw.cmpxchg (local.get $p) (local.get $expect) (local.get $new))) + + (func (export "cmpxchgi32@small") (param $p i64) (param $expect i32) (param $new i32) (result i32) + (i32.atomic.rmw.cmpxchg offset=${SMALL} (local.get $p) (local.get $expect) (local.get $new))) + + (func (export "cmpxchgi32@big") (param $p i64) (param $expect i32) (param $new i32) (result i32) + (i32.atomic.rmw.cmpxchg offset=${BIG} (local.get $p) (local.get $expect) (local.get $new))) + + (func (export "cmpxchgi32@huge") (param $p i64) (param $expect i32) (param $new i32) (result i32) + (i32.atomic.rmw.cmpxchg offset=${HUGE} (local.get $p) (local.get $expect) (local.get $new))) + + (func (export "cmpxchgi32/const@0") (param $expect i32) (param $new i32) (result i32) + (i32.atomic.rmw.cmpxchg (i64.const ${LOC}) (local.get $expect) (local.get $new))) + + (func (export "cmpxchgi32/const@small") (param $expect i32) (param $new i32) (result i32) + (i32.atomic.rmw.cmpxchg offset=${SMALL} (i64.const ${LOC}) (local.get $expect) (local.get $new))) + + (func (export "cmpxchgi32/const@big") (param $expect i32) (param $new i32) (result i32) + (i32.atomic.rmw.cmpxchg offset=${BIG} (i64.const ${LOC}) (local.get $expect) (local.get $new))) + + ;; cmpxchg i64 + + (func (export "cmpxchgi64@0") (param $p i64) (param $expect i64) (param $new i64) (result i64) + (i64.atomic.rmw.cmpxchg (local.get $p) (local.get $expect) (local.get $new))) + + (func (export "cmpxchgi64@small") (param $p i64) (param $expect i64) (param $new i64) (result i64) + (i64.atomic.rmw.cmpxchg offset=${SMALL} (local.get $p) (local.get $expect) (local.get $new))) + + (func (export "cmpxchgi64@big") (param $p i64) (param $expect i64) (param $new i64) (result i64) + (i64.atomic.rmw.cmpxchg offset=${BIG} (local.get $p) (local.get $expect) (local.get $new))) + + (func (export "cmpxchgi64@huge") (param $p i64) (param $expect i64) (param $new i64) (result i64) + (i64.atomic.rmw.cmpxchg offset=${HUGE} (local.get $p) (local.get $expect) (local.get $new))) + + (func (export "cmpxchgi64/const@0") (param $expect i64) (param $new i64) (result i64) + (i64.atomic.rmw.cmpxchg (i64.const ${LOC}) (local.get $expect) (local.get $new))) + + (func (export "cmpxchgi64/const@small") (param $expect i64) (param $new i64) (result i64) + (i64.atomic.rmw.cmpxchg offset=${SMALL} (i64.const ${LOC}) (local.get $expect) (local.get $new))) + + (func (export "cmpxchgi64/const@big") (param $expect i64) (param $new i64) (result i64) + (i64.atomic.rmw.cmpxchg offset=${BIG} (i64.const ${LOC}) (local.get $expect) (local.get $new))) + + ;; wait + + (func (export "waiti32@small") (param $p i64) (result i32) + (memory.atomic.wait32 offset=${SMALL} (local.get $p) (i32.const 1) (i64.const 0))) + + (func (export "waiti32@huge") (param $p i64) (result i32) + (memory.atomic.wait32 offset=${HUGE} (local.get $p) (i32.const 1) (i64.const 0))) + + (func (export "waiti64@small") (param $p i64) (result i32) + (memory.atomic.wait64 offset=${SMALL} (local.get $p) (i64.const 1) (i64.const 0))) + + (func (export "waiti64@huge") (param $p i64) (result i32) + (memory.atomic.wait64 offset=${HUGE} (local.get $p) (i64.const 1) (i64.const 0))) + + ;; wake + + (func (export "wake@0") (param $p i64) (result i32) + (memory.atomic.notify (local.get $p) (i32.const 1))) + + (func (export "wake@small") (param $p i64) (result i32) + (memory.atomic.notify offset=${SMALL} (local.get $p) (i32.const 1))) + + (func (export "wake@big") (param $p i64) (result i32) + (memory.atomic.notify offset=${BIG} (local.get $p) (i32.const 1))) + + (func (export "wake@huge") (param $p i64) (result i32) + (memory.atomic.notify offset=${HUGE} (local.get $p) (i32.const 1))) +) +`); + return ins; +} + +function i32Random() { + // Limit this to small positive numbers to keep life simple. + for (;;) { + let r = (Math.random() * 0x3FFF_FFFF) | 0; + if (r != 0) + return r; + } +} + +function i64Random() { + return (BigInt(i32Random()) << 32n) | BigInt(i32Random()); +} + +function Random(sz) { + if (sz == 4) + return i32Random(); + return i64Random(); +} + +function Random2(sz) { + return [Random(sz), Random(sz)]; +} + +function Random4(sz) { + return [Random(sz), Random(sz), Random(sz), Random(sz)]; +} + +function Zero(sz) { + if (sz == 4) + return 0; + return 0n; +} + +function testRead(ins, mem, LOC, prefix) { + let r = 0; + let SZ = mem.BYTES_PER_ELEMENT; + let len = mem.length * SZ; + let NM = prefix + "readi" + (SZ * 8); + + // Read in-bounds + + r = Random(SZ); + mem[LOC / SZ] = r; + assertEq(ins.exports[NM + "@0"](BigInt(LOC)), r); + assertEq(ins.exports[NM + "/const@0"](), r); + + mem[(len / SZ) - 1] = Zero(SZ); + assertEq(ins.exports[NM + "@0"](BigInt(len - SZ)), Zero(SZ)); // Just barely in-bounds + + r = Random(SZ); + mem[(LOC + SMALL) / SZ] = r; + assertEq(ins.exports[NM + "@small"](BigInt(LOC)), r); + assertEq(ins.exports[NM + "/const@small"](), r); + + if (len >= LOC + BIG + SZ) { + r = Random(SZ); + mem[(LOC + BIG) / SZ] = r; + assertEq(ins.exports[NM + "@big"](BigInt(LOC)), r); + assertEq(ins.exports[NM + "/const@big"](), r); + } + + if (len >= LOC + VAST + SZ) { + r = Random(SZ); + mem[(LOC + VAST) / SZ] = r; + assertEq(ins.exports[NM + "@vast"](BigInt(LOC)), r); + assertEq(ins.exports[NM + "/const@vast"](), r); + } + + // Read out-of-bounds + + assertErrorMessage(() => ins.exports[NM + "@0"](BigInt(len)), + WebAssembly.RuntimeError, + /out of bounds/); + + assertErrorMessage(() => ins.exports[NM + "@0"](BigInt(len-(SZ-1))), + WebAssembly.RuntimeError, + prefix == "" ? /out of bounds/ : /unaligned memory access/); + + // This is OOB if we consider the whole pointer as we must, but if we + // mistakenly only look at the low bits then it's in-bounds. + if (len < 0x1_0000_0000) { + assertErrorMessage(() => ins.exports[NM + "@0"](0x1_0000_0000n), + WebAssembly.RuntimeError, + /out of bounds/); + } + + if (len < HUGE) { + assertErrorMessage(() => ins.exports[NM + "@huge"](0n), + WebAssembly.RuntimeError, + /out of bounds/); + } + + if (len < VAST) { + assertErrorMessage(() => ins.exports[NM + "@vast"](0n), + WebAssembly.RuntimeError, + /out of bounds/); + } +} + +function testReadV128(ins, mem, LOC) { + let r = 0; + let SZ = mem.BYTES_PER_ELEMENT; + let len = mem.length * SZ; + let NM = "readv128"; + + assertEq(SZ, 4); + + // Read in-bounds + + r = Random4(4); + mem.set(r, LOC / SZ); + ins.exports[NM + "@0"](BigInt(LOC)) + assertSame(mem.slice(0, 4), r); + ins.exports[NM + "/const@0"](); + assertSame(mem.slice(0, 4), r); + + r = new Int32Array([0,0,0,0]); + mem.set(r, (len / SZ) - 4); + ins.exports[NM + "@0"](BigInt(len - (SZ * 4))); // Just barely in-bounds + assertSame(mem.slice(0, 4), r); + + r = Random4(SZ); + mem.set(r, (LOC + SMALL) / SZ); + ins.exports[NM + "@small"](BigInt(LOC)) + assertSame(mem.slice(0, 4), r); + ins.exports[NM + "/const@small"](); + assertSame(mem.slice(0, 4), r); + + if (len >= LOC + BIG + SZ * 4) { + r = Random4(SZ); + mem.set(r, (LOC + BIG) / SZ); + ins.exports[NM + "@big"](BigInt(LOC)); + assertSame(mem.slice(0, 4), r); + ins.exports[NM + "/const@big"](); + assertSame(mem.slice(0, 4), r); + } + + // Read out-of-bounds + + assertErrorMessage(() => ins.exports[NM + "@0"](BigInt(len)), + WebAssembly.RuntimeError, + /out of bounds/); + + assertErrorMessage(() => ins.exports[NM + "@0"](BigInt(len-((SZ*4)-1))), + WebAssembly.RuntimeError, + /out of bounds/); + + // This is OOB if we consider the whole pointer as we must, but if we + // mistakenly only look at the low bits then it's in-bounds. + if (len < 0x1_0000_0000) { + assertErrorMessage(() => ins.exports[NM + "@0"](0x1_0000_0000n), + WebAssembly.RuntimeError, + /out of bounds/); + } + + if (len < HUGE) { + assertErrorMessage(() => ins.exports[NM + "@huge"](0n), + WebAssembly.RuntimeError, + /out of bounds/); + } + + // Superficial testing of other load operations + + r = i32Random() + mem[(LOC + SMALL) / SZ] = r; + ins.exports["v128.load_splat@small"](BigInt(LOC)); + assertSame(mem.slice(0, 4), [r, r, r, r]); + + r = i32Random() + mem[(LOC + SMALL) / SZ] = r; + ins.exports["v128.load_zero@small"](BigInt(LOC)); + assertSame(mem.slice(0, 4), [r, 0, 0, 0]); + + r = Random2(SZ) + mem.set(r, (LOC + SMALL) / SZ); + ins.exports["v128.load_extend@small"](BigInt(LOC)); + assertSame(mem.slice(0, 4), [r[0], 0, r[1], 0]); + + r = Random4(SZ) + mem.set(r, 0); + let s = i32Random() + mem[(LOC + SMALL) / SZ] = s; + ins.exports["v128.load_lane@small"](BigInt(LOC)); + assertSame(mem.slice(0, 4), [r[0], r[1], s, r[3]]); +} + +function testWrite(ins, mem, LOC, prefix) { + let r = 0; + let SZ = mem.BYTES_PER_ELEMENT; + let len = mem.length * SZ; + let WNM = prefix + "writei" + (SZ * 8); + let RNM = prefix + "readi" + (SZ * 8); + + // Write in-bounds + + r = Random(SZ); + ins.exports[WNM + "@0"](BigInt(LOC), r); + assertEq(ins.exports[RNM + "@0"](BigInt(LOC)), r); + + r = Random(SZ); + ins.exports[WNM + "@small"](BigInt(LOC), r); + assertEq(ins.exports[RNM + "@small"](BigInt(LOC)), r); + + if (len >= LOC + BIG + SZ) { + r = Random(SZ); + ins.exports[WNM + "@big"](BigInt(LOC), r); + assertEq(ins.exports[RNM + "@big"](BigInt(LOC)), r); + } + + if (len >= LOC + VAST + SZ) { + r = Random(SZ); + ins.exports[WNM + "@vast"](BigInt(LOC), r); + assertEq(ins.exports[RNM + "@vast"](BigInt(LOC)), r); + } + + r = Random(SZ); + ins.exports[WNM + "@0"](BigInt(len - SZ), r); // Just barely in-bounds + assertEq(ins.exports[RNM + "@0"](BigInt(len - SZ)), r); + + // Write out-of-bounds + + assertErrorMessage(() => ins.exports[WNM + "@0"](BigInt(len), Random(SZ)), + WebAssembly.RuntimeError, + /out of bounds/); + + assertErrorMessage(() => ins.exports[WNM + "@0"](BigInt(len - (SZ - 1)), Random(SZ)), + WebAssembly.RuntimeError, + prefix == "" ? /out of bounds/ : /unaligned memory access/); + + if (len < 0x1_0000_0000) { + let xs = ins.exports[RNM + "@0"](0n); + assertErrorMessage(() => ins.exports[WNM + "@0"](0x1_0000_0000n, Random(SZ)), + WebAssembly.RuntimeError, + /out of bounds/); + // Check for scribbling + assertEq(ins.exports[RNM + "@0"](0n), xs); + } + + if (len < HUGE) { + assertErrorMessage(() => ins.exports[WNM + "@huge"](0n, Random(SZ)), + WebAssembly.RuntimeError, + /out of bounds/); + } + + if (len < VAST) { + assertErrorMessage(() => ins.exports[WNM + "@vast"](0n, Random(SZ)), + WebAssembly.RuntimeError, + /out of bounds/); + } +} + +function testWriteV128(ins, mem, LOC) { + let r = 0; + let p = 0; + let SZ = mem.BYTES_PER_ELEMENT; + let len = mem.length * SZ; + let WNM = "writev128"; + let RNM = "readv128"; + + assertEq(SZ, 4); + + // Write in-bounds + + r = Random4(SZ); + mem.set(r, 0); + p = LOC / SZ; + ins.exports[WNM + "@0"](BigInt(LOC)); + assertSame(mem.slice(p, p + 4), r); + + r = Random4(SZ); + mem.set(r, 0); + p = (LOC + SMALL) / SZ; + ins.exports[WNM + "@small"](BigInt(LOC)); + assertSame(mem.slice(p, p + 4), r); + + if (len >= LOC + BIG + SZ) { + r = Random4(SZ); + mem.set(r, 0); + p = (LOC + BIG) / SZ; + ins.exports[WNM + "@big"](BigInt(LOC)); + assertSame(mem.slice(p, p + 4), r); + } + + r = Random4(SZ); + mem.set(r, 0); + p = (len - (SZ * 4)) / SZ; + ins.exports[WNM + "@0"](BigInt(len - (SZ * 4))); // Just barely in-bounds + assertSame(mem.slice(p, p + 4), r); + + // Write out-of-bounds + + assertErrorMessage(() => ins.exports[WNM + "@0"](BigInt(len)), + WebAssembly.RuntimeError, + /out of bounds/); + + assertErrorMessage(() => ins.exports[WNM + "@0"](BigInt(len - ((SZ * 4) - 1))), + WebAssembly.RuntimeError, + /out of bounds/); + + if (len < HUGE) { + assertErrorMessage(() => ins.exports[WNM + "@huge"](0n), + WebAssembly.RuntimeError, + /out of bounds/); + } + + // Superficial testing of other store operations + + r = Random4(SZ); + mem.set(r, 0); + ins.exports["v128.store_lane@small"](BigInt(LOC)); + assertEq(mem[(LOC + SMALL) / SZ], r[2]); +} + +function testAtomicRMW(ins, mem, LOC, op, fn) { + let r = 0, s = 0; + let SZ = mem.BYTES_PER_ELEMENT; + let len = mem.length * SZ; + let NM = op + "i" + (SZ * 8); + + [r,s] = Random2(SZ); + mem[LOC / SZ] = r; + assertEq(ins.exports[NM + "@0"](BigInt(LOC), s), r); + assertEq(mem[LOC / SZ], fn(r, s)); + + [r,s] = Random2(SZ); + mem[(LOC + SMALL) / SZ] = r; + assertEq(ins.exports[NM + "@small"](BigInt(LOC), s), r); + assertEq(mem[(LOC + SMALL) / SZ], fn(r, s)); + + if (len >= LOC + BIG + SZ) { + [r,s] = Random2(SZ); + mem[(LOC + BIG) / SZ] = r; + assertEq(ins.exports[NM + "@big"](BigInt(LOC), s), r); + assertEq(mem[(LOC + BIG) / SZ], fn(r, s)); + } + + + assertErrorMessage(() => ins.exports[NM + "@0"](BigInt(len), Zero(SZ)), + WebAssembly.RuntimeError, + /out of bounds/); + + assertErrorMessage(() => ins.exports[NM + "@0"](BigInt(len - (SZ - 1)), Zero(SZ)), + WebAssembly.RuntimeError, + /unaligned memory access/); + + if (len < HUGE) { + assertErrorMessage(() => ins.exports[NM + "@huge"](0n, Zero(SZ)), + WebAssembly.RuntimeError, + /out of bounds/); + } +} + +function testAtomicCmpxchg(ins, mem, LOC) { + let r = 0, s = 0; + let SZ = mem.BYTES_PER_ELEMENT; + let len = mem.length * SZ; + let NM = "cmpxchgi" + (SZ * 8); + + [r,s] = Random2(SZ); + mem[LOC / SZ] = r; + assertEq(ins.exports[NM + "@0"](BigInt(LOC), Zero(SZ), s), r); + assertEq(ins.exports[NM + "@0"](BigInt(LOC), r, s), r); + assertEq(mem[LOC / SZ], s); + + [r,s] = Random2(SZ); + mem[(LOC + SMALL) / SZ] = r; + assertEq(ins.exports[NM + "@0"](BigInt(LOC + SMALL), Zero(SZ), s), r); + assertEq(ins.exports[NM + "@0"](BigInt(LOC + SMALL), r, s), r); + assertEq(mem[(LOC + SMALL) / SZ], s); + + if (len >= LOC + BIG + SZ) { + [r,s] = Random2(SZ); + mem[(LOC + BIG) / SZ] = r; + assertEq(ins.exports[NM + "@0"](BigInt(LOC + BIG), Zero(SZ), s), r); + assertEq(ins.exports[NM + "@0"](BigInt(LOC + BIG), r, s), r); + assertEq(mem[(LOC + BIG) / SZ], s); + } + + assertErrorMessage(() => ins.exports[NM + "@0"](BigInt(len), Zero(SZ), Zero(SZ)), + WebAssembly.RuntimeError, + /out of bounds/); + + assertErrorMessage(() => ins.exports[NM + "@0"](BigInt(len - (SZ - 1)), Zero(SZ), Zero(SZ)), + WebAssembly.RuntimeError, + /unaligned memory access/); + + if (len < HUGE) { + assertErrorMessage(() => ins.exports[NM + "@huge"](0n, Zero(SZ), Zero(SZ)), + WebAssembly.RuntimeError, + /out of bounds/); + } +} + +function testAtomicWake(ins, mem, LOC) { + let SZ = mem.BYTES_PER_ELEMENT; + let len = mem.length * SZ; + + assertEq(ins.exports["wake@0"](BigInt(LOC)), 0); + assertEq(ins.exports["wake@small"](BigInt(LOC)), 0); + if (len >= LOC + BIG + SZ) { + assertEq(ins.exports["wake@big"](BigInt(LOC)), 0); + } + + assertErrorMessage(() => ins.exports["wake@0"](BigInt(len)), + WebAssembly.RuntimeError, + /out of bounds/); + + assertErrorMessage(() => ins.exports["wake@0"](BigInt(len - (SZ - 1))), + WebAssembly.RuntimeError, + /unaligned memory access/); + + if (len < HUGE) { + assertErrorMessage(() => ins.exports["wake@huge"](BigInt(LOC)), + WebAssembly.RuntimeError, + /out of bounds/); + } +} + +// Sometimes we start memory at zero to disable certain bounds checking +// optimizations. Other times we start memory at something beyond most of +// our references to enable those optimizations. +let configs = [[40, 0, 3], [40, 3, '']]; + +// On 64-bit systems, test beyond 2GB and also beyond 4GB +if (getBuildConfiguration("pointer-byte-size") == 8) { + configs.push([Math.pow(2, 31) + 40, 32771, '']); + configs.push([Math.pow(2, 32) + 40, 65539, '']); + configs.push([Math.pow(2, 31) + 40, 32771, 32773]); + configs.push([Math.pow(2, 32) + 40, 65539, 65541]); +} + +for ( let shared of ['','shared'] ) { + for (let [LOC, start, max] of configs) { + if (shared != '' && max == '') { + continue; + } + const ins = makeTest(LOC, start, max, shared); + if (max != '') { + // This can OOM legitimately; let it. + let res = ins.exports.mem.grow(max - start); + if (res == -1) { + print("SPURIOUS OOM"); + continue; + } + assertEq(res, start); + } + + const mem32 = new Int32Array(ins.exports.mem.buffer); + const mem64 = new BigInt64Array(ins.exports.mem.buffer); + + for ( let m of [mem32, mem64] ) { + testRead(ins, m, LOC, ""); + testWrite(ins, m, LOC, ""); + testRead(ins, m, LOC, "a"); + testWrite(ins, m, LOC, "a"); + testAtomicRMW(ins, m, LOC, "add", (r,s) => r+s); + testAtomicRMW(ins, m, LOC, "sub", (r,s) => r-s); + testAtomicRMW(ins, m, LOC, "and", (r,s) => r&s); + testAtomicRMW(ins, m, LOC, "or", (r,s) => r|s); + testAtomicRMW(ins, m, LOC, "xor", (r,s) => r^s); + testAtomicRMW(ins, m, LOC, "xchg", (r,s) => s); + testAtomicCmpxchg(ins, m, LOC); + testAtomicWake(ins, m, LOC); + } + + if (wasmSimdEnabled()) { + testReadV128(ins, mem32, LOC); + testWriteV128(ins, mem32, LOC); + } + } +} + +// Bulk memory operations + +function makeModule(initial, maximum, shared) { + return ` +(module + (memory (export "mem") i64 ${initial} ${maximum} ${shared}) + + (data $seg "0123456789") + + (func (export "size") (result i64) + memory.size) + + (func (export "grow") (param $delta i64) (result i64) + (memory.grow (local.get $delta))) + + (func (export "copy") (param $to i64) (param $from i64) (param $len i64) + (memory.copy (local.get $to) (local.get $from) (local.get $len))) + + (func (export "fill") (param $to i64) (param $val i32) (param $len i64) + (memory.fill (local.get $to) (local.get $val) (local.get $len))) + + (func (export "init") (param $to i64) (param $src i32) (param $count i32) + (memory.init $seg (local.get $to) (local.get $src) (local.get $count))) +)`; +} + +for ( let shared of ['','shared'] ) { + let ins = wasmEvalText(makeModule(1, 3, shared)); + + assertEq(ins.exports.size(), 1n); + + // OOM with very low probability will result in test failure + assertEq(ins.exports.grow(2n), 1n); + assertEq(ins.exports.size(), 3n); + + // OOM with very low probability will result in test failure + assertEq(ins.exports.grow(1n), -1n); + assertEq(ins.exports.size(), 3n); + + // More than max pages + assertEq(ins.exports.grow(100000n), -1n); + assertEq(ins.exports.size(), 3n); + + // More than 2^48 pages + assertEq(ins.exports.grow(0x1_0000_0000_0000n), -1n); + assertEq(ins.exports.size(), 3n); + + // More than 2^48 pages - interpreted as unsigned + assertEq(ins.exports.grow(-1n), -1n); + assertEq(ins.exports.size(), 3n); + + var mem = new Uint8Array(ins.exports.mem.buffer); + var val = [1,2,3,4,5]; + mem.set(val, 20); + ins.exports.copy(40n, 20n, 5n); + assertSame(val, mem.slice(40, 45)); + + ins.exports.fill(39n, 37, 8n); + assertSame(iota(8).map(_ => 37), mem.slice(39, 47)); + + ins.exports.init(128n, 1, 5); + assertSame(iota(5).map(x => x+49), mem.slice(128, 133)); +} + +if (getBuildConfiguration("pointer-byte-size") == 8) { + for ( let shared of ['','shared'] ) { + let limit = wasmMaxMemoryPages('i64'); + let initial = 65537; + let maximum = limit + 1; + let pagesize = 65536n; + + let ins = wasmEvalText(makeModule(initial, maximum, shared)); + + assertEq(ins.exports.size(), BigInt(initial)); + + // This can OOM legitimately; let it. + { + let res = ins.exports.grow(2n); + if (res == -1) { + print("SPURIOUS OOM"); + continue; + } + assertEq(res, BigInt(initial)); + } + assertEq(ins.exports.size(), BigInt(initial + 2)); + + // This must fail + assertEq(ins.exports.grow(BigInt(limit - (initial + 2) + 1)), -1n); + assertEq(ins.exports.size(), BigInt(initial + 2)); + + // This can OOM legitimately; let it. + { + let res = ins.exports.grow(BigInt(limit - (initial + 2))); + if (res == -1) { + print("SPURIOUS OOM"); + continue; + } + assertEq(res, BigInt(initial + 2)); + } + assertEq(ins.exports.size(), BigInt(limit)); + + let mem = new Uint8Array(ins.exports.mem.buffer); + + let copyval = [1,2,3,4,5]; + let source = 20n; + let target = BigInt(initial) * pagesize + 40n; + let oobTarget = BigInt(limit) * pagesize - 1n; + + // Copy from memory below 4GB to memory beyond 4GB + mem.set(copyval, Number(source)); + ins.exports.copy(target, source, BigInt(copyval.length)); + assertSame(copyval, mem.slice(Number(target), Number(target) + copyval.length)) + + // Try to copy out of bounds + // src and target are both in bounds but len brings it oob + assertErrorMessage(() => ins.exports.copy(oobTarget, source, BigInt(copyval.length)), + WebAssembly.RuntimeError, + /out of bounds/); + assertEq(mem[Number(oobTarget-1n)], 0); + assertErrorMessage(() => ins.exports.copy(-1n, source, BigInt(copyval.length)), + WebAssembly.RuntimeError, + /out of bounds/); + assertEq(mem[Number(oobTarget-1n)], 0); + + // Fill above 4GB + ins.exports.fill(target, 37, 30n); + assertSame(iota(30).map(_ => 37), mem.slice(Number(target), Number(target) + 30)); + + // Try to fill out of bounds + assertErrorMessage(() => ins.exports.fill(oobTarget, 37, 2n), + WebAssembly.RuntimeError, + /out of bounds/); + assertEq(mem[Number(oobTarget-1n)], 0); + + // Init above 4GB + ins.exports.init(target, 1, 5); + assertSame(iota(5).map(x => x+49), mem.slice(Number(target), Number(target)+5)); + + // Try to init out of bounds + assertErrorMessage(() => ins.exports.init(oobTarget, 1, 5), + WebAssembly.RuntimeError, + /out of bounds/); + assertEq(mem[Number(oobTarget-1n)], 0); + } +} diff --git a/js/src/jit-test/tests/wasm/memory64/data-active.js b/js/src/jit-test/tests/wasm/memory64/data-active.js new file mode 100644 index 0000000000..7f40861aba --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory64/data-active.js @@ -0,0 +1,34 @@ +// |jit-test| allow-oom; skip-if: !canRunHugeMemoryTests() + +function testIt(s, addr) { + try { + var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (memory (export "mem") i64 65537) + (data (i64.const ${addr}) "${s}"))`))); + } catch (e) { + if (e instanceof WebAssembly.RuntimeError && String(e).match(/too many memory pages/)) { + return; + } + throw e; + } + var mem = new Uint8Array(ins.exports.mem.buffer); + assertEq(String.fromCodePoint(...mem.slice(addr, addr + s.length)), s) +} + +// Test that an active data segment targeting the area above 4GB works as expected +testIt("hello, world!", 0x100000020); + +// Ditto, but crosses the 4GB boundary +var s = "supercalifragilisticexpialidocious"; +testIt(s, 0x100000000 - Math.floor(s.length / 2)); + +// This is OOB above the 4GB boundary - throws OOB during instantiation. +// But can also throw for OOM when trying to create the memory. +assertErrorMessage(() => new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (memory (export "mem") i64 65537) + (data (i64.const ${65536*65537-10}) "supercalifragilisticexpialidocious"))`))), + WebAssembly.RuntimeError, + /(out of bounds)|(too many memory pages)/); + diff --git a/js/src/jit-test/tests/wasm/memory64/directives.txt b/js/src/jit-test/tests/wasm/memory64/directives.txt new file mode 100644 index 0000000000..98d92a7afc --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory64/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; include:wasm.js; skip-if: !wasmMemory64Enabled() diff --git a/js/src/jit-test/tests/wasm/memory64/memory-copy-shared.js b/js/src/jit-test/tests/wasm/memory64/memory-copy-shared.js new file mode 100644 index 0000000000..cffa6cb352 --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory64/memory-copy-shared.js @@ -0,0 +1,60 @@ +// |jit-test| allow-oom; slow; skip-if: !canRunHugeMemoryTests() + +// This is just like memory-copy.js, but it is marked slow because the +// C++-UB-safe operations we use for out-of-line copies on shared memory are slow +// and the >4GB copy takes a long time. + +var HEAPMIN=65538; +var HEAPMAX=65540; +var PAGESIZE=65536; + +try { + var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (memory (export "mem") i64 ${HEAPMIN} ${HEAPMAX} shared) + (func (export "f") (param $dst i64) (param $src i64) (param $n i64) + (memory.copy (local.get $dst) (local.get $src) (local.get $n))))`))); +} catch (e) { + if (e instanceof WebAssembly.RuntimeError && String(e).match(/too many memory pages/)) { + quit(0); + } + throw e; +} + +var mem = new Uint8Array(ins.exports.mem.buffer); +var lowbase = 0xffff_1000; +var highbase = 0x1_0000_8000; +for ( let n=0; n < 256; n++ ) { + mem[n + lowbase] = n + 1; + mem[n + highbase] = n + 1; +} + +// Copy from above 4GB to below +doit(0, highbase, 60); + +// Copy from above 4GB with OOB to below +assertErrorMessage(() => ins.exports.f(0n, BigInt(HEAPMIN*PAGESIZE-32768), 65536n), + WebAssembly.RuntimeError, + /out of bounds/); + +// Copy from below 4GB to above +doit(0x1_0000_0100, lowbase, 60); + +// Copy from below 4GB to above with OOB +assertErrorMessage(() => ins.exports.f(BigInt(HEAPMIN*PAGESIZE-32768), BigInt(lowbase), 65536n), + WebAssembly.RuntimeError, + /out of bounds/); + +// Copy across the 4GB boundary +doit(0xffff_ff80, lowbase, 256); + +// Copy more than 4GB. Note overlap prevents full correctness checking. +ins.exports.f(BigInt(PAGESIZE), 0n, BigInt(PAGESIZE*(HEAPMIN-1))); +for ( let i=0 ; i < PAGESIZE; i++ ) + assertEq(mem[i + PAGESIZE], mem[i]); + +function doit(dst, src, n) { + ins.exports.f(BigInt(dst), BigInt(src), BigInt(n)); + for ( let i=0 ; i < n; i++ ) + assertEq(mem[dst + i], mem[src + i]); +} diff --git a/js/src/jit-test/tests/wasm/memory64/memory-copy.js b/js/src/jit-test/tests/wasm/memory64/memory-copy.js new file mode 100644 index 0000000000..19090a079a --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory64/memory-copy.js @@ -0,0 +1,58 @@ +// |jit-test| allow-oom; skip-if: !canRunHugeMemoryTests() + +// Also see memory-copy-shared.js + +var HEAPMIN=65538; +var HEAPMAX=65540; +var PAGESIZE=65536; + +try { + var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (memory (export "mem") i64 ${HEAPMIN} ${HEAPMAX}) + (func (export "f") (param $dst i64) (param $src i64) (param $n i64) + (memory.copy (local.get $dst) (local.get $src) (local.get $n))))`))); +} catch (e) { + if (e instanceof WebAssembly.RuntimeError && String(e).match(/too many memory pages/)) { + quit(0); + } + throw e; +} + +var mem = new Uint8Array(ins.exports.mem.buffer); +var lowbase = 0xffff_1000; +var highbase = 0x1_0000_8000; +for ( let n=0; n < 256; n++ ) { + mem[n + lowbase] = n + 1; + mem[n + highbase] = n + 1; +} + +// Copy from above 4GB to below +doit(0, highbase, 60); + +// Copy from above 4GB with OOB to below +assertErrorMessage(() => ins.exports.f(0n, BigInt(HEAPMIN*PAGESIZE-32768), 65536n), + WebAssembly.RuntimeError, + /out of bounds/); + +// Copy from below 4GB to above +doit(0x1_0000_0100, lowbase, 60); + +// Copy from below 4GB to above with OOB +assertErrorMessage(() => ins.exports.f(BigInt(HEAPMIN*PAGESIZE-32768), BigInt(lowbase), 65536n), + WebAssembly.RuntimeError, + /out of bounds/); + +// Copy across the 4GB boundary +doit(0xffff_ff80, lowbase, 256); + +// Copy more than 4GB. Note overlap prevents full correctness checking. +ins.exports.f(BigInt(PAGESIZE), 0n, BigInt(PAGESIZE*(HEAPMIN-1))); +for ( let i=0 ; i < PAGESIZE; i++ ) + assertEq(mem[i + PAGESIZE], mem[i]); + +function doit(dst, src, n) { + ins.exports.f(BigInt(dst), BigInt(src), BigInt(n)); + for ( let i=0 ; i < n; i++ ) + assertEq(mem[dst + i], mem[src + i]); +} diff --git a/js/src/jit-test/tests/wasm/memory64/memory-fill-shared.js b/js/src/jit-test/tests/wasm/memory64/memory-fill-shared.js new file mode 100644 index 0000000000..cd81aeba4d --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory64/memory-fill-shared.js @@ -0,0 +1,58 @@ +// |jit-test| allow-oom; slow; skip-if: !canRunHugeMemoryTests() + +// This is just like memory-fill.js, but it is marked slow because the +// C++-UB-safe operations we use for out-of-line fills on shared memory are slow +// and the >4GB fill takes a long time. + +try { + var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (memory (export "mem") i64 65537 65537 shared) + (func (export "f") (param $p i64) (param $c i32) (param $n i64) + (memory.fill (local.get $p) (local.get $c) (local.get $n))))`))); +} catch (e) { + if (e instanceof WebAssembly.RuntimeError && String(e).match(/too many memory pages/)) { + quit(0); + } + throw e; +} + +var mem = new Uint8Array(ins.exports.mem.buffer); + +// Fill above 4GB +doit(mem, 0x100000100, 37, 14); + +// Fill OOB above 4GB +assertErrorMessage(() => ins.exports.f(0x10000FFFFn, 66, 14n), + WebAssembly.RuntimeError, + /out of bounds/); +assertEq(mem[0x10000FFFF], 0); +assertEq(mem[mem.length-1], 0); + +// Fill across 4GB +doit(mem, 0x100000000 - 16, 42, 32); + +// Fill more than 4GB... +ins.exports.f(0n, 86, 65536n*65537n); +assertEq(mem[mem.length-1], 86); +assertEq(mem[0], 86); + +// Fill OOB more than 4GB +assertErrorMessage(() => ins.exports.f(1n, 75, 65536n*65537n), + WebAssembly.RuntimeError, + /out of bounds/); +assertEq(mem[1], 86); +assertEq(mem[mem.length-1], 86); + +function doit(mem, addr, c, n) { + assertEq(mem[addr-1], 0); + assertEq(mem[addr], 0); + assertEq(mem[addr + n - 1], 0); + assertEq(mem[addr + n], 0); + ins.exports.f(BigInt(addr), c, BigInt(n)); + assertEq(mem[addr-1], 0); + assertEq(mem[addr], c); + assertEq(mem[addr + n - 1], c); + assertEq(mem[addr + n], 0); +} + diff --git a/js/src/jit-test/tests/wasm/memory64/memory-fill.js b/js/src/jit-test/tests/wasm/memory64/memory-fill.js new file mode 100644 index 0000000000..500247d13c --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory64/memory-fill.js @@ -0,0 +1,56 @@ +// |jit-test| allow-oom; skip-if: !canRunHugeMemoryTests() + +// Also see memory-fill-shared.js + +try { + var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (memory (export "mem") i64 65537) + (func (export "f") (param $p i64) (param $c i32) (param $n i64) + (memory.fill (local.get $p) (local.get $c) (local.get $n))))`))); +} catch (e) { + if (e instanceof WebAssembly.RuntimeError && String(e).match(/too many memory pages/)) { + quit(0); + } + throw e; +} + +var mem = new Uint8Array(ins.exports.mem.buffer); + +// Fill above 4GB +doit(mem, 0x100000100, 37, 14); + +// Fill OOB above 4GB +assertErrorMessage(() => ins.exports.f(0x10000FFFFn, 66, 14n), + WebAssembly.RuntimeError, + /out of bounds/); +assertEq(mem[0x10000FFFF], 0); +assertEq(mem[mem.length-1], 0); + +// Fill across 4GB +doit(mem, 0x100000000 - 16, 42, 32); + +// Fill more than 4GB... +ins.exports.f(0n, 86, 65536n*65537n); +assertEq(mem[mem.length-1], 86); +assertEq(mem[0], 86); + +// Fill OOB more than 4GB +assertErrorMessage(() => ins.exports.f(1n, 75, 65536n*65537n), + WebAssembly.RuntimeError, + /out of bounds/); +assertEq(mem[1], 86); +assertEq(mem[mem.length-1], 86); + +function doit(mem, addr, c, n) { + assertEq(mem[addr-1], 0); + assertEq(mem[addr], 0); + assertEq(mem[addr + n - 1], 0); + assertEq(mem[addr + n], 0); + ins.exports.f(BigInt(addr), c, BigInt(n)); + assertEq(mem[addr-1], 0); + assertEq(mem[addr], c); + assertEq(mem[addr + n - 1], c); + assertEq(mem[addr + n], 0); +} + diff --git a/js/src/jit-test/tests/wasm/memory64/memory-grow.js b/js/src/jit-test/tests/wasm/memory64/memory-grow.js new file mode 100644 index 0000000000..0316c01b45 --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory64/memory-grow.js @@ -0,0 +1,31 @@ +// |jit-test| allow-oom; skip-if: !canRunHugeMemoryTests() + +// This tests that we can grow the heap by more than 4GB. Other grow tests are +// in basic.js. + +for (let shared of ['', 'shared']) { + try { + var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (memory (export "mem") i64 0 65540 ${shared}) + (func (export "f") (param $delta i64) (result i64) + (memory.grow (local.get $delta))))`))); + } catch (e) { + if (e instanceof WebAssembly.RuntimeError && String(e).match(/too many memory pages/)) { + quit(0); + } + throw e; + } + + let res = ins.exports.f(65537n); + if (res === -1n) { + quit(0); // OOM + } + assertEq(ins.exports.mem.buffer.byteLength, 65537*65536); + let mem = new Uint8Array(ins.exports.mem.buffer); + mem[65537*65536-1] = 37; + assertEq(mem[65537*65536-1], 37); + + assertEq(ins.exports.f(4n), -1n); +} + diff --git a/js/src/jit-test/tests/wasm/memory64/memory-init.js b/js/src/jit-test/tests/wasm/memory64/memory-init.js new file mode 100644 index 0000000000..246fc3f2d4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory64/memory-init.js @@ -0,0 +1,45 @@ +// |jit-test| allow-oom; skip-if: !canRunHugeMemoryTests() + +var S = (function () { + let s = ""; + for ( let i=0; i < 16; i++ ) + s += "0123456789abcdef" + return s; +})(); + +for (let shared of ['', 'shared']) { + try { + var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (memory (export "mem") i64 65537 65537 ${shared}) + (data $d "${S}") + (func (export "f") (param $p i64) (param $o i32) (param $n i32) + (memory.init $d (local.get $p) (local.get $o) (local.get $n))))`))); + } catch (e) { + if (e instanceof WebAssembly.RuntimeError && String(e).match(/too many memory pages/)) { + quit(0); + } + throw e; + } + + var mem = new Uint8Array(ins.exports.mem.buffer); + + // Init above 4GB + doit(mem, 0x1_0000_1000, 1, S.length-1); + + // Init above 4GB with OOM + assertErrorMessage(() => ins.exports.f(0x1_0000_ff80n, 0, 256), + WebAssembly.RuntimeError, + /out of bounds/); + + // Init across 4GB + doit(mem, 0xffff_ff80, 3, 200); +} + +function doit(mem, addr, offs, n) { + ins.exports.f(BigInt(addr), offs, n); + for (let i=0; i < n; i++) { + assertEq(mem[addr+i], S.charCodeAt(offs+i)); + } +} + diff --git a/js/src/jit-test/tests/wasm/memory64/utility.js b/js/src/jit-test/tests/wasm/memory64/utility.js new file mode 100644 index 0000000000..510228d6ac --- /dev/null +++ b/js/src/jit-test/tests/wasm/memory64/utility.js @@ -0,0 +1,16 @@ +// Assert that we get a useful amount of memory for memory64 on tier-1 64-bit +// systems with our primary compilers. + +// Only 64-bit systems +if (getBuildConfiguration("pointer-byte-size") != 8) { + quit(0); +} + +// MIPS64 tops out below 2GB +if (getBuildConfiguration("mips64")) { + quit(0); +} + +var eightGB = 8 * 1024 * 1024 * 1024; +var pageSize = 65536; +assertEq(wasmMaxMemoryPages("i64") >= eightGB / pageSize, true); diff --git a/js/src/jit-test/tests/wasm/multi-memory/directives.txt b/js/src/jit-test/tests/wasm/multi-memory/directives.txt new file mode 100644 index 0000000000..44374e8ceb --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-memory/directives.txt @@ -0,0 +1,2 @@ +|jit-test| --wasm-multi-memory; test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; include:wasm.js; skip-if: !wasmMultiMemoryEnabled() + diff --git a/js/src/jit-test/tests/wasm/multi-memory/memory_copy.js b/js/src/jit-test/tests/wasm/multi-memory/memory_copy.js new file mode 100644 index 0000000000..e619200337 --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-memory/memory_copy.js @@ -0,0 +1,45 @@ + +// A simple test case for memory.copy between different memories. +// See bug 1861267. + +let i = wasmEvalText( +`(module + (memory $$mem0 (data "staubfaenger")) + (memory $$mem1 (data "\\ee\\22\\55\\ff")) + (memory $$mem2 (data "\\dd\\33\\66\\00")) + (memory $$mem3 (data "schnickschnack")) + + (func (export "copy0to3") (param i32 i32 i32) + (memory.copy $$mem3 $$mem0 + (local.get 0) + (local.get 1) + (local.get 2)) + ) + (func (export "copy3to0") (param i32 i32 i32) + (memory.copy $$mem0 $$mem3 + (local.get 0) + (local.get 1) + (local.get 2)) + ) + + (func (export "read0") (param i32) (result i32) + (i32.load8_u $$mem0 (local.get 0)) + ) + (func (export "read3") (param i32) (result i32) + (i32.load8_u $$mem3 (local.get 0)) + ) +)`); + +i.exports.copy0to3(4, 5, 6); +let s = ""; +for (let ix = 0; ix < 14; ix++) { + s = s + String.fromCharCode(i.exports.read3(ix)); +} + +i.exports.copy3to0(8, 2, 7); +s = s + "_"; +for (let ix = 0; ix < 12; ix++) { + s = s + String.fromCharCode(i.exports.read0(ix)); +} + +assertEq(s, "schnfaengenack_staubfaehnfa"); diff --git a/js/src/jit-test/tests/wasm/multi-value/block-run.js b/js/src/jit-test/tests/wasm/multi-value/block-run.js new file mode 100644 index 0000000000..3b6689d2f9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/block-run.js @@ -0,0 +1,268 @@ +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.add + (block (result i32 i32) + (i32.const 32) + (i32.const 10)))))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) (i32.const 10) + (block (param i32 i32) (result i32 i32)) + (i32.add)))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (block (param i32) (result i32 i32) + (i32.const 10)) + (i32.add)))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.add + (loop (result i32 i32) + (i32.const 32) + (i32.const 10)))))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) (i32.const 10) + (loop (param i32 i32) (result i32 i32)) + (i32.add)))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (loop (param i32) (result i32 i32) + (i32.const 10)) + (i32.add)))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.add + (block (result i32 i32) + (i32.const 32) + (i32.const 10) + (br 0)))))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (i32.const 10) + (block (param i32 i32) (result i32 i32) + (br 0)) + (i32.add)))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (block (param i32) (result i32 i32) + (i32.const 10) + (br 0)) + (i32.add)))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.add + (block (result i32 i32) + (i32.const 32) + (i32.const 10) + (block (param i32 i32) (result i32 i32) + (br 1))))))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (i32.const 10) + (block (param i32 i32) (result i32 i32) + (block (param i32 i32) (result i32 i32) + (br 1))) + (i32.add)))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (i32.const 10) + (block (param i32 i32) (result i32 i32) + (block (param i32 i32) (result i32 i32) + (br 0))) + (i32.add)))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (block (param i32) (result i32 i32) + (i32.const 10) + (block (param i32 i32) (result i32 i32) + (br 1))) + (i32.add)))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (i32.const 10) + (i32.const 1) + (if (param i32 i32) (result i32) + (then (i32.add)) + (else (i32.sub)))))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (i32.const 10) + (i32.const 1) + (if (param i32 i32) (result i32 i32) + (then + (drop) + (drop) + (i32.const 10) + (i32.const 32))) + (i32.sub)))`, + -22); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (i32.const 10) + (i32.const 0) + (if (param i32 i32) (result i32 i32) + (then + (drop) + (drop) + (i32.const 10) + (i32.const 32))) + (i32.sub)))`, + 22); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (i32.const 10) + (i32.const 1) + (if (param i32 i32) (result i32 i32) + (then (return))) + (i32.sub)))`, + 10); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (i32.const 10) + (i32.const 0) + (if (param i32 i32) (result i32 i32) + (then (return))) + (i32.sub)))`, + 22); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (i32.const 10) + (i32.const 1) + (if (param i32 i32) (result i32 i32) + (then) + (else (return))) + (i32.sub)))`, + 22); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (i32.const 32) + (i32.const 10) + (i32.const 0) + (if (param i32 i32) (result i32 i32) + (then) + (else (return))) + (i32.sub)))`, + 10); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (local $i i32) + (i32.const 0) ;; sum + (i32.const 10) ;; i + (loop $loop (param i32 i32) (result i32) + (local.tee $i) + (i32.add) ;; sum = i + sum + (i32.sub (local.get $i) (i32.const 1)) + (i32.eqz (local.tee $i)) + (if (param i32) (result i32) + (then) + (else (local.get $i) (br $loop))))))`, + 55); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (local i32) + i32.const 42 + local.get 0 + local.get 0 + loop (param i32 i32 i32) (result i32) + drop + drop + end))`, + 42); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (block (result i32 i32) + (i32.popcnt (i32.const 1)) + (i32.popcnt (i32.const 3)) + (block (param i32 i32) + (i32.const 6) + (i32.const 7) + (br 1)) + (unreachable)) + i32.add))`, + 13); + +wasmFullPass(` + (module + (func (export "run") (result i32) + (block (result i32 i32) + (i32.popcnt (i32.const 1)) + (i32.popcnt (i32.const 3)) + (block) ;; sync() + (i32.const 6) + (i32.const 7) + (br 0)) + i32.add))`, + 13); diff --git a/js/src/jit-test/tests/wasm/multi-value/block-validate.js b/js/src/jit-test/tests/wasm/multi-value/block-validate.js new file mode 100644 index 0000000000..7845c016e3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/block-validate.js @@ -0,0 +1,266 @@ +wasmValidateText(` + (module + (func (result i32) + (i32.add + (block (result i32 i32) + (i32.const 32) + (i32.const 10)))))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) (i32.const 10) + (block (param i32 i32) (result i32 i32)) + (i32.add)))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) + (block (param i32) (result i32 i32) + (i32.const 10)) + (i32.add)))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.add + (loop (result i32 i32) + (i32.const 32) + (i32.const 10)))))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) (i32.const 10) + (loop (param i32 i32) (result i32 i32)) + (i32.add)))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) + (loop (param i32) (result i32 i32) + (i32.const 10)) + (i32.add)))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.add + (block (result i32 i32) + (i32.const 32) + (i32.const 10) + (br 0)))))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) + (i32.const 10) + (block (param i32 i32) (result i32 i32) + (br 0)) + (i32.add)))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) + (block (param i32) (result i32 i32) + (i32.const 10) + (br 0)) + (i32.add)))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.add + (block (result i32 i32) + (i32.const 32) + (i32.const 10) + (block (param i32 i32) (result i32 i32) + (br 1))))))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) + (i32.const 10) + (block (param i32 i32) (result i32 i32) + (block (param i32 i32) (result i32 i32) + (br 1))) + (i32.add)))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) + (i32.const 10) + (block (param i32 i32) (result i32 i32) + (block (param i32 i32) (result i32 i32) + (br 0))) + (i32.add)))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) + (block (param i32) (result i32 i32) + (i32.const 10) + (block (param i32 i32) (result i32 i32) + (br 1))) + (i32.add)))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) + (i32.const 10) + (i32.const 1) + (if (param i32 i32) (result i32) + (then (i32.add)) + (else (i32.sub)))))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) + (i32.const 10) + (i32.const 1) + (if (param i32 i32) (result i32 i32) + (then + (drop) + (drop) + (i32.const 10) + (i32.const 32))) + (i32.sub)))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) + (i32.const 10) + (i32.const 1) + (if (param i32 i32) (result i32 i32) + (then (return))) + (i32.sub)))`); + +wasmValidateText(` + (module + (func (result i32) + (i32.const 32) + (i32.const 10) + (i32.const 1) + (if (param i32 i32) (result i32 i32) + (then) + (else (return))) + (i32.sub)))`); + +wasmValidateText(` + (module + (func (result i32) + (local $i i32) + (i32.const 0) ;; sum + (i32.const 10) ;; i + (loop $loop (param i32 i32) (result i32) + (local.tee $i) + (i32.add) ;; sum = i + sum + (i32.sub (local.get $i) (i32.const 1)) + (local.tee $i) + (local.get $i) + (br_if $loop (i32.eqz)) + (drop))))`); + +// Tests the encoding: with more than 64 function types, the block type encoded +// as an uleb will create a confusion with the valtype; an sleb is required. + +wasmValidateText(` + (module + ${(function () { + s = ""; + for ( let i=0; i < 64; i++ ) { + let t = []; + for ( let j=0; j < 6; j++ ) + t.push(i & (1 << j) ? "i32" : "f32"); + s += "(func (param " + t.join(" ") + "))\n"; + } + return s; + })()} + (func (result i32) + (i32.add + (block (result i32 i32) + (i32.const 32) + (i32.const 10)))))`); + +wasmValidateText(` + (module + (func (result i32) + (block $B (result i32 i32) + (br $B (i32.const 1) (i32.const 2)) + (i32.const 0x1337)) + (drop)))`); + +wasmValidateText(` + (module + (func (result i32) + (block $B (result i32 i32) + (i32.const 1) + (br $B (i32.const 2)) + (i32.const 0x1337)) + (drop)))`); + +wasmValidateText(` + (module + (func (result i32) + (block $B (result i32 i32) + (i32.const 1) + (i32.const 2) + (br $B) + (i32.const 0x1337)) + (drop)))`); + +wasmValidateText(` + (module + (func (param $cond i32) (result i32) + (block $B (result i32 i32) + (br_if $B (i32.const 1) (i32.const 2) (local.get $cond))) + (drop)))`); + +wasmValidateText(` + (module + (func (param $cond i32) (result i32) + (block $B (result i32 i32) + (i32.const 1) + (br_if $B (i32.const 2) (local.get $cond))) + (drop)))`); + +wasmValidateText(` + (module + (func (param $cond i32) (result i32) + (block $B (result i32 i32) + (i32.const 1) + (i32.const 2) + (br_if $B (local.get $cond))) + (drop)))`); + +wasmValidateText(` + (module + (func (param $cond i32) (result i32) + (block $B (result i32 i32) + (i32.const 1) + (i32.const 2) + (local.get $cond) + (br_if $B)) + (drop)))`); + +wasmValidateText(` + (module + (func (param $index i32) (result i32) + (block $OUT (result i32) + (block $B1 (result i32 i32) + (block $B2 (result i32 i32) + (block $B3 (result i32 i32) + (br_table $B1 $B2 $B3 (i32.const 1) (i32.const 2) (local.get $index))) + (br $OUT (i32.add))) + (br $OUT (i32.sub))) + (br $OUT (i32.mul)))))`); diff --git a/js/src/jit-test/tests/wasm/multi-value/call-js.js b/js/src/jit-test/tests/wasm/multi-value/call-js.js new file mode 100644 index 0000000000..7af031e5f0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/call-js.js @@ -0,0 +1,138 @@ + +wasmFullPass(` + (module + (import "env" "f" (func $f (result i32 i32 i32))) + (func (export "run") (result i32) + (call $f) + i32.sub + i32.sub))`, + 42, + { env: { f: () => [52, 10, 0] } }); + +wasmFullPass(` + (module + (import "env" "f" (func $f (result i64 i64 i64))) + (func (export "run") (result i64) + (call $f) + i64.sub + i64.sub))`, + 42n, + { env: { f: () => [52n, 10n, 0n] } }); + +wasmFullPass(` + (module + (import "env" "f" (func $f (result f32 f32 f32))) + (func (export "run") (result i32) + (call $f) + f32.sub + f32.sub + i32.trunc_f32_s))`, + 42, + { env: { f: () => [52.25, 10.5, 0.25] } }); + +wasmFullPass(` + (module + (import "env" "f" (func $f (result f64 f64 f64))) + (func (export "run") (result i32) + (call $f) + f64.sub + f64.sub + i32.trunc_f64_s))`, + 42, + { env: { f: () => [52.25, 10.5, 0.25] } }); + +// Multiple values are returned as an iterable; it doesn't have to be an array. +function expectMultiValuePass(f) { + wasmFullPass(` + (module + (import "env" "f" (func $f (result i32 i32 i32))) + (func (export "run") (result i32) + (call $f) + i32.sub + i32.sub))`, + 42, + { env: { f } }); +} +function expectMultiValueError(f, type, pattern) { + let module = new WebAssembly.Module(wasmTextToBinary(` + (module + (import "env" "f" (func $f (result i32 i32 i32))) + (func (export "run") (result i32) + (call $f) + i32.sub + i32.sub))`)); + + let instance = new WebAssembly.Instance(module, { env: { f } } ); + assertErrorMessage(() => instance.exports.run(), type, pattern); +} + +expectMultiValuePass(() => [52, 10, 0]); +expectMultiValuePass(() => [32, -10, 0]); +expectMultiValuePass(() => [52.75, 10, 0.5]); // Values converted to i32 via ToInt32. +expectMultiValuePass(() => [42, undefined, undefined]); +expectMultiValuePass(() => (function*() { yield 52; yield 10; yield 0; })()); +expectMultiValuePass(() => (function*() { yield '52'; yield '10'; yield 0; })()); + +// Multi-value result must be iterable. +expectMultiValueError(() => 1, TypeError, /iterable/); +expectMultiValueError(() => 1n, TypeError, /iterable/); + +// Check that the iterator's values are collected first, and that the +// length of the result is correct. +expectMultiValueError(() => [1], TypeError, /expected 3, got 1/); +expectMultiValueError(() => [1n], TypeError, /expected 3, got 1/); +expectMultiValueError(() => [52, 10, 0, 0], TypeError, /expected 3, got 4/); +expectMultiValueError(() => (function*() { yield 52; yield 10; yield 0; yield 0; })(), + TypeError, /expected 3, got 4/); + +// Check that side effects from conversions are done in order. +{ + let calls = []; + function log(x) { calls.push(x); return x; } + function logged(x) { return { valueOf: () => log(x) } } + expectMultiValuePass(() => [logged(52), logged(10), logged(0)]); + assertEq(calls.join(','), '52,10,0'); +} + +function expectMultiValueResult(text, expected) { + let instance = wasmEvalText(text); + assertDeepEq(instance.exports.run(), expected); +} + +expectMultiValueResult(` + (module + (func (export "run") (result i32 i32 i32) + (i32.const 0) + (i32.const 52) + (i32.const 10)))`, [0, 52, 10]); +expectMultiValueResult(` + (module + (func (export "run") (result f32 f32 f32) + (f32.const 0.5) + (f32.const 52.5) + (f32.const 10.5)))`, [0.5, 52.5, 10.5]); +expectMultiValueResult(` + (module + (func (export "run") (result f64 f64 f64) + (f64.const 0.5) + (f64.const 52.5) + (f64.const 10.5)))`, [0.5, 52.5, 10.5]); + +expectMultiValueResult(` + (module + (func (export "run") (result i32 i64 i32) + (i32.const 0) + (i64.const 52) + (i32.const 10)))`, [0, 52n, 10]); +expectMultiValueResult(` + (module + (func (export "run") (result i64 i32 i64) + (i64.const 0) + (i32.const 52) + (i64.const 10)))`, [0n, 52, 10n]); +expectMultiValueResult(` + (module + (func (export "run") (result i64 i64 i64) + (i64.const 0) + (i64.const 52) + (i64.const 10)))`, [0n, 52n, 10n]); diff --git a/js/src/jit-test/tests/wasm/multi-value/call-ref.js b/js/src/jit-test/tests/wasm/multi-value/call-ref.js new file mode 100644 index 0000000000..63b7eb271b --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/call-ref.js @@ -0,0 +1,81 @@ +let counter; +function resetCounter() { counter = 0; } + +function boxNextInt() { return {val: counter++}; } +function unboxInt(box) { return box.val; } +function boxNextThreeInts() { + return [boxNextInt(), boxNextInt(), boxNextInt()]; +} +function unboxThreeInts(x, y, z) { + return [unboxInt(x), unboxInt(y), unboxInt(z)]; +} + +function testAddNextThreeIntsInner(addNextThreeInts) { + resetCounter(); + for (let n = 0; n < 100000; n += 3) { + assertEq(addNextThreeInts(), n * 3 + 3); + } +} + +function testAddNextThreeInts(text, imports) { + let i = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(text)), { imports }); + + testAddNextThreeIntsInner(() => i.exports.addNextThreeInts()); +} + +testAddNextThreeInts(` + (module + (func $boxNextInt (import "imports" "boxNextInt") + (result externref)) + (func $unboxInt (import "imports" "unboxInt") + (param externref) (result i32)) + + (func $boxNextThreeInts (result externref externref externref) + call $boxNextInt + call $boxNextInt + call $boxNextInt) + + (func $unboxThreeInts (param externref externref externref) (result i32 i32 i32) + local.get 0 + call $unboxInt + local.get 1 + call $unboxInt + local.get 2 + call $unboxInt) + + (func $addNextThreeInts (export "addNextThreeInts") (result i32) + call $boxNextThreeInts + call $unboxThreeInts + i32.add + i32.add))`, + {boxNextInt, unboxInt}); + +testAddNextThreeInts(` + (module + (func $boxNextThreeInts (import "imports" "boxNextThreeInts") + (result externref externref externref)) + (func $unboxThreeInts (import "imports" "unboxThreeInts") + (param externref externref externref) (result i32 i32 i32)) + + (func $addNextThreeInts (export "addNextThreeInts") (result i32) + call $boxNextThreeInts + call $unboxThreeInts + i32.add + i32.add))`, + {boxNextThreeInts, unboxThreeInts}); + +{ + let i = wasmEvalText(` + (module + (func $boxNextThreeInts (import "imports" "boxNextThreeInts") + (result externref externref externref)) + + (func (export "boxNextThreeInts") (result externref externref externref) + call $boxNextThreeInts))`, + {imports: {boxNextThreeInts}}); + testAddNextThreeIntsInner(() => { + let [a, b, c] = i.exports.boxNextThreeInts(); + return unboxInt(a) + unboxInt(b) + unboxInt(c); + }); +} diff --git a/js/src/jit-test/tests/wasm/multi-value/call-run.js b/js/src/jit-test/tests/wasm/multi-value/call-run.js new file mode 100644 index 0000000000..67662a4af5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/call-run.js @@ -0,0 +1,120 @@ +wasmFullPass(` + (module + (func (result i32 i32) + (i32.const 52) + (i32.const 10)) + (func (export "run") (result i32) + (call 0) + i32.sub))`, + 42); + +wasmFullPass(` + (module + (func (param i32 i32) (result i32 i32) + (local.get 0) + (local.get 1)) + (func (export "run") (result i32) + (i32.const 52) + (i32.const 10) + (call 0) + i32.sub))`, + 42); + +wasmFullPass(` + (module + (func (param i32 i32 i32 i32 i32 + i32 i32 i32 i32 i32) + (result i32 i32) + (local.get 8) + (local.get 9)) + (func (export "run") (result i32) + (i32.const 0) + (i32.const 1) + (i32.const 2) + (i32.const 3) + (i32.const 4) + (i32.const 5) + (i32.const 6) + (i32.const 7) + (i32.const 52) + (i32.const 10) + (call 0) + i32.sub))`, + 42); + +wasmFullPass(` + (module + (func (param i32 i32 i32 i32 i32 + i32 i32 i32 i32 i32) + (result i32 i32) + (local i32 i32 i32 i32) + (local.get 8) + (local.get 9)) + (func (export "run") (result i32) + (i32.const 0) + (i32.const 1) + (i32.const 2) + (i32.const 3) + (i32.const 4) + (i32.const 5) + (i32.const 6) + (i32.const 7) + (i32.const 52) + (i32.const 10) + (call 0) + i32.sub))`, + 42); + +wasmFullPass(` + (module + (func (param i32 i32 i32 i32 i32 + i32 i32 i32 i32 i32) + (result i32 i32 i32) + (local i32 i32 i32 i32) + (local.get 7) + (local.get 8) + (local.get 9)) + (func (export "run") (result i32) + (i32.const 0) + (i32.const 1) + (i32.const 2) + (i32.const 3) + (i32.const 4) + (i32.const 5) + (i32.const 6) + (i32.const 7) + (i32.const 52) + (i32.const 10) + (call 0) + i32.sub + i32.sub))`, + -35); + +wasmFullPass(` + (module + (func (param i32 i64 i32 i64 i32 + i64 i32 i64 i32 i64) + (result i64 i32 i64) + (local i32 i64 i32 i64) + (local.get 7) + (local.get 8) + (local.get 9)) + (func (export "run") (result i32) + (i32.const 0) + (i64.const 1) + (i32.const 2) + (i64.const 3) + (i32.const 4) + (i64.const 5) + (i32.const 6) + (i64.const 7) + (i32.const 52) + (i64.const 10) + (call 0) + i32.wrap_i64 + i32.sub + i64.extend_i32_s + i64.sub + i32.wrap_i64))`, + -35); + diff --git a/js/src/jit-test/tests/wasm/multi-value/call-validate.js b/js/src/jit-test/tests/wasm/multi-value/call-validate.js new file mode 100644 index 0000000000..513e11bc6e --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/call-validate.js @@ -0,0 +1,47 @@ +wasmValidateText(` + (module + (func (result i32 i32) + (i32.const 32) + (i32.const 10)))`); + +wasmValidateText(` + (module + (type $t (func (result i32 i32))) + (func (type $t) + (i32.const 32) + (i32.const 10)))`); + +wasmValidateText(` + (module + (func (result i32 i32) + (block (result i32 i32) + (i32.const 32) + (i32.const 10))))`); + +wasmValidateText(` + (module + (func $return-2 (result i32 i32) + (i32.const 32) + (i32.const 10)) + (func $tail-call (result i32 i32) + (call 0)))`); + +wasmValidateText(` + (module + (func $return-2 (result i32 i32) + (i32.const 32) + (i32.const 10)) + (func $add (result i32) + (call 0) + i32.add))`); + +wasmValidateText(` + (module + (func $return-2 (param i32 i32) (result i32 i32) + (local.get 0) + (local.get 1)) + (func (export "run") (result i32) + (i32.const 32) + (i32.const 10) + (call 0) + i32.add))`); diff --git a/js/src/jit-test/tests/wasm/multi-value/directives.txt b/js/src/jit-test/tests/wasm/multi-value/directives.txt new file mode 100644 index 0000000000..f636e648ec --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); include:wasm.js diff --git a/js/src/jit-test/tests/wasm/multi-value/ion-inlining.js b/js/src/jit-test/tests/wasm/multi-value/ion-inlining.js new file mode 100644 index 0000000000..0d9a05214e --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/ion-inlining.js @@ -0,0 +1,14 @@ + +let instance = wasmEvalText(` + (module + (func $f (export "f") (result i32 i32 i32) + (i32.const 0) + (i32.const 32) + (i32.const 10)))`); + +const options = getJitCompilerOptions(); +const jitThreshold = options['ion.warmup.trigger'] * 2 + 2; + +for (let i = 0; i < jitThreshold; i++) { + assertDeepEq(instance.exports.f(), [0, 32, 10]); +} diff --git a/js/src/jit-test/tests/wasm/multi-value/random-tests.js b/js/src/jit-test/tests/wasm/multi-value/random-tests.js new file mode 100644 index 0000000000..828c13a7f5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/random-tests.js @@ -0,0 +1,467 @@ + +// This file tests multi-value returns. It creates a chain of wasm functions +// +// fnStart -> fnMid0 -> fnMid1 -> fnMid2 -> fnMid3 -> fnEnd +// +// When run, fnStart creates 12 (or in the non-simd case, 8) random values, of +// various types. It then passes them to fnMid0. That reorders them and +// passes them on to fnMid1, etc, until they arrive at fnEnd. +// +// fnEnd makes a small and reversible change to each value. It then reorders +// them and returns all of them. The returned values get passed back along +// the chain, being randomly reordered at each step, until they arrive back at +// fnStart. +// +// fnStart backs out the changes made in fnEnd and checks that the resulting +// values are the same as the originals it created. If they are not, the test +// has failed. +// +// If the test passes, we can be sure each value got passed along the chain +// and back again correctly, despite being in a probably different argument or +// return position each time (due to the reordering). As a side effect, this +// test also is a pretty good test of argument passing. The number of values +// (10) is chosen so as to be larger than the number of args that can be +// passed in regs on any target; hence it also tests the logic for passing +// args in regs vs memory too. +// +// The whole process (generate and run a test program) is repeated 120 times. +// +// Doing this requires some supporting functions to be defined in wasm, by +// `funcs_util` and `funcs_rng` (a random number generator). +// +// It is almost impossible to understand what the tests do by reading the JS +// below. Reading the generated wasm is required. Search for "if (0)" below. + +// Some utility functions for use in the generated code. +function funcs_util(simdEnabled) { +let t = +(simdEnabled ? +`;; Create a v128 value from 2 i64 values + (func $v128_from_i64HL (export "v128_from_i64HL") + (param $i64hi i64) (param $i64lo i64) (result v128) + (local $vec v128) + (local.set $vec (i64x2.replace_lane 0 (local.get $vec) (local.get $i64lo))) + (local.set $vec (i64x2.replace_lane 1 (local.get $vec) (local.get $i64hi))) + (local.get $vec) + ) + ;; Split a v128 up into pieces. + (func $v128hi (export "v128hi") (param $vec v128) (result i64) + (return (i64x2.extract_lane 1 (local.get $vec))) + ) + (func $v128lo (export "v128lo") (param $vec v128) (result i64) + (return (i64x2.extract_lane 0 (local.get $vec))) + ) + ;; Return an i32 value, which is 0 if the args are identical and 1 otherwise. + (func $v128ne (export "v128ne") + (param $vec1 v128) (param $vec2 v128) (result i32) + (return (v128.any_true (v128.xor (local.get $vec1) (local.get $vec2)))) + )` + : ``/* simd not enabled*/ +) + +`;; Move an i32 value forwards and backwards. + (func $step_i32 (export "step_i32") (param $n i32) (result i32) + (return (i32.add (local.get $n) (i32.const 1337))) + ) + (func $unstep_i32 (export "unstep_i32") (param $n i32) (result i32) + (return (i32.sub (local.get $n) (i32.const 1337))) + ) + ;; Move an i64 value forwards and backwards. + (func $step_i64 (export "step_i64") (param $n i64) (result i64) + (return (i64.add (local.get $n) (i64.const 4771))) + ) + (func $unstep_i64 (export "unstep_i64") (param $n i64) (result i64) + (return (i64.sub (local.get $n) (i64.const 4771))) + ) + ;; Move a f32 value forwards and backwards. This is a bit tricky because + ;; we need to guarantee that the backwards move exactly cancels out the + ;; forward move. So we multiply/divide exactly by 2 on the basis that that + ;; will change the exponent but not the mantissa, at least for normalised + ;; numbers. + (func $step_f32 (export "step_f32") (param $n f32) (result f32) + (return (f32.mul (local.get $n) (f32.const 2.0))) + ) + (func $unstep_f32 (export "unstep_f32") (param $n f32) (result f32) + (return (f32.div (local.get $n) (f32.const 2.0))) + ) + ;; Move a f64 value forwards and backwards. + (func $step_f64 (export "step_f64") (param $n f64) (result f64) + (return (f64.mul (local.get $n) (f64.const 4.0))) + ) + (func $unstep_f64 (export "unstep_f64") (param $n f64) (result f64) + (return (f64.div (local.get $n) (f64.const 4.0))) + )` ++ (simdEnabled ? +`;; Move a v128 value forwards and backwards. + (func $step_v128 (export "step_v128") (param $vec v128) (result v128) + (return (call $v128_from_i64HL + (i64.add (call $v128hi (local.get $vec)) (i64.const 1234)) + (i64.add (call $v128lo (local.get $vec)) (i64.const 4321)) + )) + ) + (func $unstep_v128 (export "unstep_v128") (param $vec v128) (result v128) + (return (call $v128_from_i64HL + (i64.sub (call $v128hi (local.get $vec)) (i64.const 1234)) + (i64.sub (call $v128lo (local.get $vec)) (i64.const 4321)) + )) + )` + : ``/* simd not enabled*/ +); +return t; +} + +// A Pseudo-RNG based on the C standard. The core function generates only 16 +// random bits. We have to use it twice to generate a 32-bit random number +// and four times for a 64-bit random number. +let decls_rng = +`;; The RNG's state + (global $rand_state + (mut i32) (i32.const 1) + )`; +function funcs_rng(simdEnabled) { +let t = +`;; Set the seed + (func $rand_setSeed (param $seed i32) + (global.set $rand_state (local.get $seed)) + ) + ;; Generate a 16-bit random number + (func $rand_i16 (export "rand_i16") (result i32) + (local $t i32) + ;; update $rand_state + (local.set $t (global.get $rand_state)) + (local.set $t (i32.mul (local.get $t) (i32.const 1103515245))) + (local.set $t (i32.add (local.get $t) (i32.const 12345))) + (global.set $rand_state (local.get $t)) + ;; pull 16 random bits out of it + (local.set $t (i32.shr_u (local.get $t) (i32.const 15))) + (local.set $t (i32.and (local.get $t) (i32.const 0xFFFF))) + (local.get $t) + ) + ;; Generate a 32-bit random number + (func $rand_i32 (export "rand_i32") (result i32) + (local $t i32) + (local.set $t (call $rand_i16)) + (local.set $t (i32.shl (local.get $t) (i32.const 16))) + (local.set $t (i32.or (local.get $t) (call $rand_i16))) + (local.get $t) + ) + ;; Generate a 64-bit random number + (func $rand_i64 (export "rand_i64") (result i64) + (local $t i64) + (local.set $t (i64.extend_i32_u (call $rand_i16))) + (local.set $t (i64.shl (local.get $t) (i64.const 16))) + (local.set $t (i64.or (local.get $t) (i64.extend_i32_u (call $rand_i16)))) + (local.set $t (i64.shl (local.get $t) (i64.const 16))) + (local.set $t (i64.or (local.get $t) (i64.extend_i32_u (call $rand_i16)))) + (local.set $t (i64.shl (local.get $t) (i64.const 16))) + (local.set $t (i64.or (local.get $t) (i64.extend_i32_u (call $rand_i16)))) + (local.get $t) + ) + ;; Generate a 32-bit random float. This is something of a kludge in as much + ;; as it does it by converting a random signed-int32 to a float32, which + ;; means that we don't get any NaNs, infinities, denorms, etc, but OTOH + ;; there's somewhat less randomness then there would be if we had allowed + ;; such denorms in. + (func $rand_f32 (export "rand_f32") (result f32) + (f32.convert_i32_s (call $rand_i32)) + ) + ;; And similarly for 64-bit random floats + (func $rand_f64 (export "rand_f64") (result f64) + (f64.convert_i64_s (call $rand_i64)) + )` ++ (simdEnabled ? +`;; Generate a random 128-bit vector. + (func $rand_v128 (export "rand_v128") (result v128) + (call $v128_from_i64HL (call $rand_i64) (call $rand_i64)) + )` +: ``/* simd not enabled*/ +); +return t; +} + +// Helpers for function generation +function strcmp(s1,s2) { + if (s1 < s2) return -1; + if (s1 > s2) return 1; + return 0; +} + +// This generates the last function in the chain. It merely returns its +// arguments in a different order, but first applies the relevant `_step` +// function to each value. This is the only place in the process where +// the passed/return values are modified. Hence it gives us a way to be +// sure that the values made it all the way from the start function to the +// end of the chain (here) and back to the start function. Back in the +// start function, we will apply the relevant `_unstep` function to each +// returned value, which should give the value that was sent up the chain +// originally. +// +// Here and below, the following naming scheme is used: +// +// * taIn -- types of arguments that come in to this function +// * taOut -- types of arguments that this function passes +// to the next in the chain +// * trOut -- types of results that this function returns +// * trIn -- types of results that the next function in the chain +// returns to this function +// +// Hence 'a' vs 'r' distinguishes argument from return types, and 'In' vs +// 'Out' distinguishes values coming "in" to the function from those going +// "out". The 'a'/'r' naming scheme is also used in the generated wasm (text). +function genEnd(myFuncName, taIn, trOut) { + assertEq(taIn.length, trOut.length); + let params = taIn.map(pair => `(param $a${pair.name} ${pair.type})`) + .join(` `); + let retTys = trOut.map(pair => pair.type).join(` `); + let t = + `(func $${myFuncName} (export "${myFuncName}") ` + + ` ${params} (result ${retTys})\n` + + trOut.map(pair => + ` (call $step_${pair.type} (local.get $a${pair.name}))`) + .join(`\n`) + `\n` + + `)`; + return t; +} + +// This generates an intermediate function in the chain. It takes args as +// specified by `taIn`, rearranges them to match `taOut`, passes those to the +// next function in the chain. From which it receives return values as +// described by `trIn`, which it rearranges to match `trOut`, and returns +// those. Overall, then, it permutes values both in the calling direction and +// in the returning direction. +function genMiddle(myFuncName, nextFuncName, taIn, trOut, taOut, trIn) { + assertEq(taIn.length, taOut.length); + assertEq(taIn.length, trIn.length); + assertEq(taIn.length, trOut.length); + let params = taIn.map(pair => `(param $a${pair.name} ${pair.type})`) + .join(` `); + let retTys = trOut.map(pair => pair.type).join(` `); + let trInSorted = trIn.toSorted((p1,p2) => strcmp(p1.name,p2.name)); + let t = + `(func $${myFuncName} (export "${myFuncName}") ` + + ` ${params} (result ${retTys})\n` + + // Declare locals + trInSorted + .map(pair => ` (local $r${pair.name} ${pair.type})`) + .join(`\n`) + `\n` + + // Make the call + ` (call $${nextFuncName} ` + + taOut.map(pair => `(local.get $a${pair.name})`).join(` `) + `)\n` + + // Capture the returned values + trIn.toReversed() + .map(pair => ` (local.set $r${pair.name})`).join(`\n`) + `\n` + + // Return + ` (return ` + trOut.map(pair => `(local.get $r${pair.name})`) + .join (` `) + `)\n` + + `)`; + return t; +} + +// This generates the first function in the chain. It creates random values +// for the initial arguments, passes them to the next arg in the chain, +// receives results, and checks that the results are as expected. +// NOTE! The generated function returns zero on success, non-zero on failure. +function genStart(myFuncName, nextFuncName, taOut, trIn) { + assertEq(taOut.length, trIn.length); + let taOutSorted = taOut.toSorted((p1,p2) => strcmp(p1.name,p2.name)); + let trInSorted = trIn.toSorted((p1,p2) => strcmp(p1.name,p2.name)); + // `taOutSorted` and `trInSorted` should be identical. + assertEq(taOutSorted.length, trInSorted.length); + for (let i = 0; i < taOutSorted.length; i++) { + assertEq(taOutSorted[i].name, trInSorted[i].name); + assertEq(taOutSorted[i].type, trInSorted[i].type); + } + let t = + `(func $${myFuncName} (export "${myFuncName}") (result i32)\n` + + // Declare locals + taOutSorted + .map(pair => ` (local $a${pair.name} ${pair.type})`) + .join(`\n`) + `\n` + + trInSorted + .map(pair => ` (local $r${pair.name} ${pair.type})`) + .join(`\n`) + `\n` + + ` (local $anyNotEqual i32)\n` + + // Set up the initial values to be fed up the chain of calls and back + // down again. We expect them to be the same when they finally arrive + // back. Note we re-initialise the (wasm-side) RNG even though this + // isn't actually necessary. + ` (call $rand_setSeed (i32.const 1))\n` + + taOutSorted + .map(pair => ` (local.set $a${pair.name} (call $rand_${pair.type}))`) + .join(`\n`) + `\n` + + // Actually make the call + ` (call $${nextFuncName} ` + + taOut.map(pair => `(local.get $a${pair.name})`).join(` `) + `)\n` + + // Capture the returned values + trIn.toReversed() + .map(pair => ` (local.set $r${pair.name})`).join(`\n`) + `\n` + + + // For each returned value, apply the relevant `_unstep` function, + // then compare it against the original. It should be the same, so + // accumulate any signs of difference in $anyNotEqual. Since + // `taOutSorted` and `trInSorted` are identical we can iterate over + // either. + taOutSorted + .map(pair => + ` (local.set $anyNotEqual \n` + + ` (i32.or (local.get $anyNotEqual)\n` + + ` (` + + // v128 doesn't have a suitable .ne operator, so call a helper fn + (pair.type === `v128` ? `call $v128ne` : `${pair.type}.ne`) + + ` (local.get $a${pair.name})` + + ` (call $unstep_${pair.type} (local.get $r${pair.name})))))` + ) + .join(`\n`) + `\n` + + ` (return (local.get $anyNotEqual))\n` + + `)`; + return t; +} + +// A pseudo-random number generator that is independent of the one baked into +// each wasm program generated. This is for use in JS only. It isn't great, +// but at least it starts from a fixed place, which Math.random doesn't. This +// produces a function `rand4js`, which takes an argument `n` and produces an +// integer value in the range `0 .. n-1` inclusive. `n` needs to be less than +// or equal to 2^21 for this to work at all, and it needs to be much less than +// 2^21 (say, no more than 2^14) in order to get a reasonably even +// distribution of the values generated. +let rand4js_txt = +`(module + (global $rand4js_state (mut i32) (i32.const 1)) + (func $rand4js (export "rand4js") (param $maxPlus1 i32) (result i32) + (local $t i32) + ;; update $rand4js_state + (local.set $t (global.get $rand4js_state)) + (local.set $t (i32.mul (local.get $t) (i32.const 1103515245))) + (local.set $t (i32.add (local.get $t) (i32.const 12345))) + (global.set $rand4js_state (local.get $t)) + ;; Note, the low order bits are not very random. Hence we dump the + ;; low-order 11 bits. This leaves us with at best 21 usable bits. + (local.set $t (i32.shr_u (local.get $t) (i32.const 11))) + (i32.rem_u (local.get $t) (local.get $maxPlus1)) + ) +)`; +let rand4js = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(rand4js_txt))) + .exports.rand4js; + +// Fisher-Yates scheme for generating random permutations of a sequence. +// Result is a new array containing the original items in a different order. +// Original is unchanged. +function toRandomPermutation(input) { + let n = input.length; + let result = input.slice(); + assertEq(result.length, n); + if (n < 2) return result; + for (let i = 0; i < n - 1; i++) { + let j = i + rand4js(n - i); + let t = result[i]; + result[i] = result[j]; + result[j] = t; + } + return result; +} + +// Top level test runner +function testMain(numIters) { + // Check whether we can use SIMD. + let simdEnabled = wasmSimdEnabled(); + + // Names tagged with types. This is set up to provide 10 values that + // potentially can be passed in integer registers (5 x i32, 5 x i64) and + // 10 values that potentially can be passed in FP/SIMD registers (3 x f32, + // 3 x f64, 4 x v128). This should cover both sides of the + // arg-passed-in-reg/arg-passed-in-mem boundary for all of the primary + // targets. + let val0 = {name: "0", type: "i32"}; + let val1 = {name: "1", type: "i32"}; + let val2 = {name: "2", type: "i32"}; + let val3 = {name: "3", type: "i32"}; + let val4 = {name: "4", type: "i32"}; + + let val5 = {name: "5", type: "i64"}; + let val6 = {name: "6", type: "i64"}; + let val7 = {name: "7", type: "i64"}; + let val8 = {name: "8", type: "i64"}; + let val9 = {name: "9", type: "i64"}; + + let vala = {name: "a", type: "f32"}; + let valb = {name: "b", type: "f32"}; + let valc = {name: "c", type: "f32"}; + + let vald = {name: "d", type: "f64"}; + let vale = {name: "e", type: "f64"}; + let valf = {name: "f", type: "f64"}; + + let valg = {name: "g", type: "v128"}; + let valh = {name: "h", type: "v128"}; + let vali = {name: "i", type: "v128"}; + let valj = {name: "j", type: "v128"}; + + // This is the base name/type vector, + // of which we will create random permutations. + let baseValVec; + if (simdEnabled) { + baseValVec + = [val0, val1, val2, val3, val4, val5, val6, val7, val8, val9, + vala, valb, valc, vald, vale, valf, valg, valh, vali, valj]; + } else { + baseValVec + = [val0, val1, val2, val3, val4, val5, val6, val7, val8, val9, + vala, valb, valc, vald, vale, valf]; + } + + function summariseVec(valVec) { + return valVec.map(pair => pair.name).join(""); + } + + print("\nsimdEnabled = " + simdEnabled + "\n"); + + for (let testRun = 0; testRun < numIters; testRun++) { + let tx0a = toRandomPermutation(baseValVec); + let tx0r = toRandomPermutation(baseValVec); + let tx1a = toRandomPermutation(baseValVec); + let tx1r = toRandomPermutation(baseValVec); + let tx2a = toRandomPermutation(baseValVec); + let tx2r = toRandomPermutation(baseValVec); + let tx3a = toRandomPermutation(baseValVec); + let tx3r = toRandomPermutation(baseValVec); + let tx4a = toRandomPermutation(baseValVec); + let tx4r = toRandomPermutation(baseValVec); + + // Generate a 5-step chain of functions, each one passing and + // returning different permutation of `baseValVec`. The chain is: + // fnStart -> fnMid0 -> fnMid1 -> fnMid2 -> fnMid3 -> fnEnd + let t_end = genEnd("fnEnd", tx4a, tx4r); + let t_mid3 = genMiddle("fnMid3", "fnEnd", tx3a, tx3r, tx4a, tx4r); + let t_mid2 = genMiddle("fnMid2", "fnMid3", tx2a, tx2r, tx3a, tx3r); + let t_mid1 = genMiddle("fnMid1", "fnMid2", tx1a, tx1r, tx2a, tx2r); + let t_mid0 = genMiddle("fnMid0", "fnMid1", tx0a, tx0r, tx1a, tx1r); + let t_start = genStart("fnStart", "fnMid0", tx0a, tx0r); + + let txt = "(module (memory 1) " + "\n" + + decls_rng + "\n" + + funcs_util(simdEnabled) + "\n" + funcs_rng(simdEnabled) + "\n" + + t_end + "\n" + + t_mid3 + "\n" + t_mid2 + "\n" + t_mid1 + "\n" + t_mid0 + "\n" + + t_start + "\n" + + ")"; + + if (0) print(txt); + + let mod = new WebAssembly.Module(wasmTextToBinary(txt)); + let ins = new WebAssembly.Instance(mod); + let fns = ins.exports; + + // result == 0 means success, any other value means failure + let result = fns.fnStart(); + if (/*failure*/result != 0 || (testRun % 120) == 0) + print(" " + testRun + " " + + [tx0a,tx0r,tx1a,tx1r,tx2a,tx2r,tx3a,tx3r,tx4a,tx4r] + .map(e => summariseVec(e)).join("/") + " " + + (result == 0 ? "pass" : "FAIL")); + + assertEq(result, 0); + } +} + +testMain(/*numIters=*/120); diff --git a/js/src/jit-test/tests/wasm/multi-value/regress-1597200.js b/js/src/jit-test/tests/wasm/multi-value/regress-1597200.js new file mode 100644 index 0000000000..542bd542ab --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/regress-1597200.js @@ -0,0 +1,41 @@ +new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (func (export "main") (result i32) + (i32.const 1) + (i32.const 2) + (i32.const 3) + (loop (param i32 i32 i32) + (i32.popcnt) + (i32.const -63) + (br 0)) + (unreachable)))`))); + +wasmFullPass(` +(module + (func (export "run") (result i32) + (block (result i32 i32 i32) + (i32.const 41) + (i32.const 42) + (i32.const 43) + (loop (param i32 i32 i32) + (i32.eqz) + (i32.const -63) + (br 1)) + (unreachable)) + (drop) + (drop)))`, + 42); + +wasmFullPass(` +(module + (func (export "run") (result i32) + (block (result i32 i32 i32) + (i32.popcnt (i32.const 0x0)) + (i32.popcnt (i32.const 0xf)) + (i32.popcnt (i32.const 0xff)) + (i32.popcnt (i32.const 0xfff)) + (block) ;; Force a sync(). + (br 0)) + (drop) + (drop)))`, + 4); diff --git a/js/src/jit-test/tests/wasm/multi-value/regress-1621645-2.js b/js/src/jit-test/tests/wasm/multi-value/regress-1621645-2.js new file mode 100644 index 0000000000..4ba4b3b116 --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/regress-1621645-2.js @@ -0,0 +1,19 @@ +wasmFullPass(` + ;; Iterative factorial without locals. + (func $pick0 (param i64) (result i64 i64) + (local.get 0) (local.get 0) + ) + (func $pick1 (param i64 i64) (result i64 i64 i64) + (local.get 0) (local.get 1) (local.get 0) + ) + (func (export "run") (param i64) (result i64) + (i64.const 1) (local.get 0) + (loop $l (param i64 i64) (result i64) + (call $pick1) (call $pick1) (i64.mul) + (call $pick1) (i64.const 1) (i64.sub) + (call $pick0) (i64.const 0) (i64.gt_u) + (br_if $l) + (drop) (return) + ) + )`, + 7034535277573963776n, {}, 25n); diff --git a/js/src/jit-test/tests/wasm/multi-value/regress-1621645.js b/js/src/jit-test/tests/wasm/multi-value/regress-1621645.js new file mode 100644 index 0000000000..dc9aaf264c --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/regress-1621645.js @@ -0,0 +1,20 @@ +wasmFullPass(` +(module + (func $f (result i64 i64 i64 i64 i64 + i64 i64 i64 i64 i64) + (i64.const 0) + (i64.const 1) + (i64.const 2) + (i64.const 3) + (i64.const 4) + (i64.const 5) + (i64.const 6) + (i64.const 7) + (i64.const 8) + (i64.const 9)) + (func (export "run") (result i32) + (call $f) + (i64.add) (i64.add) (i64.add) (i64.add) (i64.add) + (i64.add) (i64.add) (i64.add) (i64.add) + (i32.wrap_i64)))`, + 45); diff --git a/js/src/jit-test/tests/wasm/multi-value/regress-1628417.js b/js/src/jit-test/tests/wasm/multi-value/regress-1628417.js new file mode 100644 index 0000000000..eb97b2116f --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/regress-1628417.js @@ -0,0 +1,11 @@ +let bytes = wasmTextToBinary(` + (module + (func $main (export "main") (result i32 i32) + (i32.const 1) + (i32.const 2) + (i32.const 0) + (br_table 0 0)))`); + +let instance = new WebAssembly.Instance(new WebAssembly.Module(bytes)); + +instance.exports.main(); diff --git a/js/src/jit-test/tests/wasm/multi-value/regress-1628426.js b/js/src/jit-test/tests/wasm/multi-value/regress-1628426.js new file mode 100644 index 0000000000..ffb13333c4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/regress-1628426.js @@ -0,0 +1,22 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() +var g20 = newGlobal({ + newCompartment: true +}); +g20.parent = this; +g20.eval("Debugger(parent).onEnterFrame = function() {};"); + +let bytes = wasmTextToBinary(` + (module + (func $dup (param i32) (result i32 i32) + (local.get 0) + (local.get 0) + (i32.const 2) + (i32.mul)) + (func $main (export "main") (param i32 i32) (result i32) + (local.get 1) + (call $dup) + (i32.sub)))`); + +let instance = new WebAssembly.Instance(new WebAssembly.Module(bytes)); + +assertEq(instance.exports.main(0, 1), -1) diff --git a/js/src/jit-test/tests/wasm/multi-value/regress-1628429.js b/js/src/jit-test/tests/wasm/multi-value/regress-1628429.js new file mode 100644 index 0000000000..3446e0bc8b --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/regress-1628429.js @@ -0,0 +1,6 @@ +let bytes = wasmTextToBinary(` + (module + (func $f (import "imports" "f") (param i32 i32) (result i32 i32)))`); + +new WebAssembly.Instance(new WebAssembly.Module(bytes), + { 'imports': { 'f': Uint16Array } }); diff --git a/js/src/jit-test/tests/wasm/multi-value/regress-1628499.js b/js/src/jit-test/tests/wasm/multi-value/regress-1628499.js new file mode 100644 index 0000000000..e4360fcb9c --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/regress-1628499.js @@ -0,0 +1,11 @@ +let instance = wasmEvalText(` + (func $twoRefs (result externref externref) + (ref.null extern) + (ref.null extern)) + (func $fourRefs (export "run") (result externref externref externref externref externref externref) + call $twoRefs + call $twoRefs + call $twoRefs) +`); + +assertDeepEq(instance.exports.run(), [null, null, null, null, null, null]) diff --git a/js/src/jit-test/tests/wasm/multi-value/regress-1629496.js b/js/src/jit-test/tests/wasm/multi-value/regress-1629496.js new file mode 100644 index 0000000000..220fcf8d3d --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/regress-1629496.js @@ -0,0 +1,9 @@ +let bytes = wasmTextToBinary(` + (module + (func $f (param) (result i32 i32) + (local i32) + (loop) + (i32.const 0) + (i32.const 1)))`); + +new WebAssembly.Instance(new WebAssembly.Module(bytes)); diff --git a/js/src/jit-test/tests/wasm/multi-value/regress-1631423.js b/js/src/jit-test/tests/wasm/multi-value/regress-1631423.js new file mode 100644 index 0000000000..2460830dfd --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/regress-1631423.js @@ -0,0 +1,15 @@ +wasmEvalText(` + (module + (func $main (export "main") + (local i32) + i32.const 1 + i32.const 2 + i32.const 3 + (loop (param i32 i32 i32) + local.get 0 + i32.const 4 + i32.const 5 + i32.const 6 + i32.const 7 + br_if 0 + unreachable)))`); diff --git a/js/src/jit-test/tests/wasm/multi-value/regress-1661723.js b/js/src/jit-test/tests/wasm/multi-value/regress-1661723.js new file mode 100644 index 0000000000..3248c13444 --- /dev/null +++ b/js/src/jit-test/tests/wasm/multi-value/regress-1661723.js @@ -0,0 +1,23 @@ +let { exports } = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(` + (module + (func (import "module" "fn") (param f64 i32) (result i32 f64)) + (func (export "f") (result i32) + f64.const 4.2 + i32.const 7 + call 0 + drop + ) + ) + `)), + { + "module": { + fn(f32, i32) { + assertEq(f32, 4.2); + assertEq(i32, 7); + return [2, 7.3]; + }, + } + }); + +assertEq(exports.f(), 2); diff --git a/js/src/jit-test/tests/wasm/name.js b/js/src/jit-test/tests/wasm/name.js new file mode 100644 index 0000000000..ce61eb032b --- /dev/null +++ b/js/src/jit-test/tests/wasm/name.js @@ -0,0 +1,20 @@ +// An export name may contain a null terminator +let exports = wasmEvalText(`(module + (func) + (export "\\00first" (func 0)) + (export "\\00second" (func 0)) +)`).exports; +assertEq(exports["\0first"] instanceof Function, true); +assertEq(exports["\0second"] instanceof Function, true); + +// An import name may contain a null terminator +let imports = { + "\0module": { + "\0field": 10, + } +}; +let {global} = wasmEvalText(`(module + (import "\\00module" "\\00field" (global i32)) + (export "global" (global 0)) +)`, imports).exports; +assertEq(global.value, 10); diff --git a/js/src/jit-test/tests/wasm/nan-semantics.js b/js/src/jit-test/tests/wasm/nan-semantics.js new file mode 100644 index 0000000000..b2a8587a4f --- /dev/null +++ b/js/src/jit-test/tests/wasm/nan-semantics.js @@ -0,0 +1,199 @@ +var f64 = new Float64Array(2); +var f32 = new Float32Array(f64.buffer); +var u8 = new Uint8Array(f64.buffer); + +function assertSameBitPattern(from, to, offset) { + for (let i = from; i < to; i++) + assertEq(u8[i], u8[i + offset], 'non equality in assertSameBitPattern'); +} + +// Check that custom NaN can't escape to normal JS, in non-testing mode. +f32[0] = NaN; +f32[0] = f32[0]; // Force canonicalization. + +f32[1] = wasmEvalText(` +(module + (func (result f32) + (f32.const nan:0x123456)) + (export "" (func 0))) +`).exports[""](); +assertSameBitPattern(0, 4, 4); + +var checkBitPatterns = { + "": { + float32(x) { + f32[1] = x; + assertSameBitPattern(0, 4, 4); + }, + float64(x) { + f64[1] = x; + assertSameBitPattern(0, 8, 8); + } + } +} + +wasmEvalText(` +(module + (import "" "float32" (func (param f32))) + (func + (call 0 (f32.const nan:0x123456))) + (export "" (func 0))) +`, checkBitPatterns).exports[""](); + +f64[0] = NaN; +f64[0] = f64[0]; // Force canonicalization. +f64[1] = wasmEvalText(` +(module + (func (result f64) + (f64.const nan:0x123456)) + (export "" (func 0))) +`).exports[""](); +assertSameBitPattern(0, 8, 8); + +wasmEvalText(` +(module + (import "" "float64" (func (param f64))) + (func + (call 0 (f64.const nan:0x123456))) + (export "" (func 0))) +`, checkBitPatterns).exports[""](); + +// SANITY CHECKS + +// There are two kinds of NaNs: signaling and quiet. Usually, the first bit of +// the payload is used to indicate whether it is quiet (1 for quiet, 0 for +// signaling). Most operations have to transform a signaling NaN into a quiet +// NaN, which prevents some optimizations in WebAssembly. + +// A float32 has 32 bits, 23 bits of them being reserved for the mantissa +// (= NaN payload). +var f32_qnan_code = '(f32.const nan:0x600000)'; +var f32_snan_code = '(f32.const nan:0x200000)'; + +var f32_snan = '0x7fa00000'; +var f32_qnan = '0x7fe00000'; + +// A float64 has 64 bits, 1 for the sign, 11 for the exponent, the rest for the +// mantissa (payload). +var f64_nan_base_high = 0x7ff00000; + +var f64_snan_code = '(f64.const nan:0x4000000000000)'; +var f64_qnan_code = '(f64.const nan:0xc000000000000)'; + +var f64_snan = '0x7ff4000000000000'; +var f64_qnan = '0x7ffc000000000000'; + +wasmAssert(`(module + (func $f32_snan (result f32) ${f32_snan_code}) + (func $f32_qnan (result f32) ${f32_qnan_code}) + (func $f64_snan (result f64) ${f64_snan_code}) + (func $f64_qnan (result f64) ${f64_qnan_code}) +)`, [ + { type: 'f32', func: '$f32_snan', expected: f32_snan }, + { type: 'f32', func: '$f32_qnan', expected: f32_qnan }, + { type: 'f64', func: '$f64_snan', expected: f64_snan }, + { type: 'f64', func: '$f64_qnan', expected: f64_qnan }, +]); + +// Actual tests. + +// Wasm spec v1.1 section 4.3.3, sections "fadd" et seq and "NaN propagation": +// If the input NaN is not canonical then the output may be any arithmetic NaN, +// ie a quiet NaN with arbitrary payload. + +wasmAssert(`(module + (global (mut f32) (f32.const 0)) + (global (mut f64) (f64.const 0)) + + ;; An example where a signaling nan gets transformed into a quiet nan: + ;; snan + 0.0 = qnan + (func $add (result f32) (f32.add ${f32_snan_code} (f32.const 0))) + + ;; Shouldn't affect NaNess. + (func $global.set.get_f32 (result f32) + ${f32_snan_code} + global.set 0 + global.get 0 + ) + + ;; Shouldn't affect NaNess. + (func $global.set.get_f64 (result f64) + ${f64_snan_code} + global.set 1 + global.get 1 + ) +)`, [ + { type: 'f32', func: '$add', expected: 'nan:arithmetic' }, + { type: 'f32', func: '$global.set.get_f32', expected: f32_snan }, + { type: 'f64', func: '$global.set.get_f64', expected: f64_snan }, +]); + +// NaN propagation behavior. +function test(type, opcode, lhs_code, rhs_code) { + let qnan_code = type === 'f32' ? f32_qnan : f64_qnan; + + let t = type; + let op = opcode; + + // Test all forms: + // - (constant, constant), + // - (constant, variable), + // - (variable, constant), + // - (variable, variable) + wasmAssert(`(module + (func $1 (result ${t}) (${t}.${op} ${lhs_code} ${rhs_code})) + (func $2 (param ${t}) (result ${t}) (${t}.${op} (local.get 0) ${rhs_code})) + (func $3 (param ${t}) (result ${t}) (${t}.${op} ${lhs_code} (local.get 0))) + (func $4 (param ${t}) (param ${t}) (result ${t}) (${t}.${op} (local.get 0) (local.get 1))) + )`, [ + { type, func: '$1', expected: 'nan:arithmetic' }, + { type, func: '$2', args: [lhs_code], expected: 'nan:arithmetic' }, + { type, func: '$3', args: [rhs_code], expected: 'nan:arithmetic' }, + { type, func: '$4', args: [lhs_code, rhs_code], expected: 'nan:arithmetic' }, + ]); +} + +var f32_zero = '(f32.const 0)'; +var f64_zero = '(f64.const 0)'; + +var f32_one = '(f32.const 1)'; +var f64_one = '(f64.const 1)'; + +var f32_negone = '(f32.const -1)'; +var f64_negone = '(f64.const -1)'; + +// x - 0.0 doesn't get folded into x: +test('f32', 'sub', f32_snan_code, f32_zero); +test('f64', 'sub', f64_snan_code, f64_zero); + +// x * 1.0 doesn't get folded into x: +test('f32', 'mul', f32_snan_code, f32_one); +test('f32', 'mul', f32_one, f32_snan_code); + +test('f64', 'mul', f64_snan_code, f64_one); +test('f64', 'mul', f64_one, f64_snan_code); + +// x * -1.0 doesn't get folded into -x: +test('f32', 'mul', f32_snan_code, f32_negone); +test('f32', 'mul', f32_negone, f32_snan_code); + +test('f64', 'mul', f64_snan_code, f64_negone); +test('f64', 'mul', f64_negone, f64_snan_code); + +// x / -1.0 doesn't get folded into -1 * x: +test('f32', 'div', f32_snan_code, f32_negone); +test('f64', 'div', f64_snan_code, f64_negone); + +// min doesn't get folded when one of the operands is a NaN +test('f32', 'min', f32_snan_code, f32_zero); +test('f32', 'min', f32_zero, f32_snan_code); + +test('f64', 'min', f64_snan_code, f64_zero); +test('f64', 'min', f64_zero, f64_snan_code); + +// ditto for max +test('f32', 'max', f32_snan_code, f32_zero); +test('f32', 'max', f32_zero, f32_snan_code); + +test('f64', 'max', f64_snan_code, f64_zero); +test('f64', 'max', f64_zero, f64_snan_code); diff --git a/js/src/jit-test/tests/wasm/oom/breakpoints.js b/js/src/jit-test/tests/wasm/oom/breakpoints.js new file mode 100644 index 0000000000..a90f97739a --- /dev/null +++ b/js/src/jit-test/tests/wasm/oom/breakpoints.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var dbgGlobal = newGlobal({newCompartment: true}); +var dbg = new dbgGlobal.Debugger(); +dbg.addDebuggee(this); + +oomTest(() => { + wasmEvalText(` + (import "" "" (func $d)) + (func try call $d end) + `); +}); diff --git a/js/src/jit-test/tests/wasm/oom/directives.txt b/js/src/jit-test/tests/wasm/oom/directives.txt new file mode 100644 index 0000000000..6c28625dd1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/oom/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); include:wasm.js diff --git a/js/src/jit-test/tests/wasm/oom/exports.js b/js/src/jit-test/tests/wasm/oom/exports.js new file mode 100644 index 0000000000..391850fda7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/oom/exports.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => { + let text = `(module + (type (func (param i32) (result i32))) + )`; + let binary = wasmTextToBinary(text); + let module = new WebAssembly.Module(binary); + let obj = module.exports(); + assertEq(obj instanceof Object, true); +}); diff --git a/js/src/jit-test/tests/wasm/oom/jsapi-prototype.js b/js/src/jit-test/tests/wasm/oom/jsapi-prototype.js new file mode 100644 index 0000000000..4888a70db0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/oom/jsapi-prototype.js @@ -0,0 +1,29 @@ +// |jit-test| skip-if: !('oomTest' in this) + +oomTest(() => { + let memory = new WebAssembly.Memory({initial: 0}); + assertEq(Object.getPrototypeOf(memory), WebAssembly.Memory.prototype, "prototype"); +}); + +oomTest(() => { + let global = new WebAssembly.Global({value: 'i32'}); + assertEq(Object.getPrototypeOf(global), WebAssembly.Global.prototype, "prototype"); +}); + +oomTest(() => { + let table = new WebAssembly.Table({element: 'anyfunc', initial: 0}); + assertEq(Object.getPrototypeOf(table), WebAssembly.Table.prototype, "prototype"); +}); + +oomTest(() => { + let bytecode = wasmTextToBinary('(module)'); + let module = new WebAssembly.Module(bytecode); + assertEq(Object.getPrototypeOf(module), WebAssembly.Module.prototype, "prototype"); +}); + +oomTest(() => { + let bytecode = wasmTextToBinary('(module)'); + let module = new WebAssembly.Module(bytecode); + let instance = new WebAssembly.Instance(module, {}); + assertEq(Object.getPrototypeOf(instance), WebAssembly.Instance.prototype, "prototype"); +}); diff --git a/js/src/jit-test/tests/wasm/passive-segs-boundary.js b/js/src/jit-test/tests/wasm/passive-segs-boundary.js new file mode 100644 index 0000000000..d53c79fea1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/passive-segs-boundary.js @@ -0,0 +1,442 @@ +// Perform a test which, +// +// * if errKind is defined, is expected to fail with an exception +// characterised by errKind and errText. +// +// * if errKind is undefined, is expected to succeed, in which case errKind +// and errText are ignored. +// +// The function body will be [insn1, insn2] and is constructed according to +// four booleans: +// +// * isMem controls whether the module is constructed with memory or +// table initializers. +// +// * haveStorage determines whether there is actually a memory or table to +// work with. +// +// * haveInitA controls whether active initializers are added. +// +// * haveInitP controls whether passive initializers are added. + +function do_test(insn1, insn2, errKind, errText, + isMem, haveStorage, haveInitA, haveInitP) +{ + let preamble; + if (isMem) { + let mem_def = haveStorage ? "(memory 1 1)" : ""; + let mem_ia1 = `(data (i32.const 2) "\\03\\01\\04\\01")`; + let mem_ia2 = `(data (i32.const 12) "\\07\\05\\02\\03\\06")`; + let mem_ip1 = `(data "\\02\\07\\01\\08")`; + let mem_ip2 = `(data "\\05\\09\\02\\07\\06")`; + let mem_init = ``; + if (haveInitA && haveInitP) + mem_init = `${mem_ia1} ${mem_ip1} ${mem_ia2} ${mem_ip2}`; + else if (haveInitA && !haveInitP) mem_init = `${mem_ia1} ${mem_ia2}`; + else if (!haveInitA && haveInitP) mem_init = `${mem_ip1} ${mem_ip2}`; + preamble + = `;; -------- Memories -------- + ${mem_def} + ;; -------- Memory initialisers -------- + ${mem_init} + `; + } else { + let tab_def = haveStorage ? "(table 30 30 funcref)" : ""; + let tab_ia1 = `(elem (i32.const 2) 3 1 4 1)`; + let tab_ia2 = `(elem (i32.const 12) 7 5 2 3 6)`; + let tab_ip1 = `(elem func 2 7 1 8)`; + let tab_ip2 = `(elem func 5 9 2 7 6)`; + let tab_init = ``; + if (haveInitA && haveInitP) + tab_init = `${tab_ia1} ${tab_ip1} ${tab_ia2} ${tab_ip2}`; + else if (haveInitA && !haveInitP) tab_init = `${tab_ia1} ${tab_ia2}`; + else if (!haveInitA && haveInitP) tab_init = `${tab_ip1} ${tab_ip2}`; + preamble + = `;; -------- Tables -------- + ${tab_def} + ;; -------- Table initialisers -------- + ${tab_init} + ;; ------ Functions (0..9) referred by the table/esegs ------ + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + `; + } + + let txt = "(module\n" + preamble + + `;; -------- testfn -------- + (func (export "testfn") + ${insn1} + ${insn2} + ) + )`; + + if (!!errKind) { + assertErrorMessage( + () => { + let inst = wasmEvalText(txt); + inst.exports.testfn(); + }, + errKind, + errText + ); + } else { + let inst = wasmEvalText(txt); + assertEq(undefined, inst.exports.testfn()); + } +} + + +// Some handy specialisations of do_test(). + +function mem_test(insn1, insn2, errKind, errText, + haveStorage=true, haveInitA=true, haveInitP=true) { + do_test(insn1, insn2, errKind, errText, + /*isMem=*/true, haveStorage, haveInitA, haveInitP); +} + +function mem_test_nofail(insn1, insn2, + haveStorage=true, haveInitA=true, haveInitP=true) { + do_test(insn1, insn2, undefined, undefined, + /*isMem=*/true, haveStorage, haveInitA, haveInitP); +} + +function tab_test(insn1, insn2, errKind, errText, + haveStorage=true, haveInitA=true, haveInitP=true) { + do_test(insn1, insn2, errKind, errText, + /*isMem=*/false, haveStorage, haveInitA, haveInitP); +} + +function tab_test_nofail(insn1, insn2, + haveStorage=true, haveInitA=true, haveInitP=true) { + do_test(insn1, insn2, undefined, undefined, + /*isMem=*/false, haveStorage, haveInitA, haveInitP); +} + + +//---- memory.{drop,init,copy} ------------------------------------------------- + +// The tested semantics for memory.drop, in the case where there's no memory, +// are as follows. table.drop is analogous. +// +// no memory, no data segments: +// drop with any args -> fail OOB +// [because there's nothing to drop] +// +// no memory, data segments, at least one of which is active: +// -> always fails, regardless of insns +// [because active segments implicitly reference memory 0] +// +// no memory, data segments, all of which are passive: +// drop, segment index is OOB -> fail OOB +// [because it refers to non existent segment] +// +// drop, segment index is IB -> OK + +// drop with no memory and no data segments +mem_test("data.drop 0", "", + WebAssembly.CompileError, /(data.drop segment index out of range)|(unknown data segment 0)/, + /*haveStorage=*/false, /*haveInitA=*/false, /*haveInitP=*/false); + +// drop with no memory but with both passive and active segments, ix in range +// and refers to a passive segment +mem_test("data.drop 3", "", + WebAssembly.CompileError, + /active data segment requires a memory section/, + /*haveStorage=*/false, /*haveInitA=*/true, /*haveInitP=*/true); + +// drop with no memory but with passive segments only, ix out of range +mem_test("data.drop 2", "", + WebAssembly.CompileError, /(data.drop segment index out of range)|(unknown data segment 2)/, + /*haveStorage=*/false, /*haveInitA=*/false, /*haveInitP=*/true); + +// drop with no memory but with passive segments only, ix in range +mem_test_nofail("data.drop 1", "", + /*haveStorage=*/false, /*haveInitA=*/false, /*haveInitP=*/true); + + +// init with no memory and no data segs +mem_test("(memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))", "", + WebAssembly.CompileError, /memory index/, + /*haveStorage=*/false, /*haveInitA=*/false, /*haveInitP=*/false); + +// drop with data seg ix out of range +mem_test("data.drop 4", "", + WebAssembly.CompileError, /(data.drop segment index out of range)|(unknown data segment 4)/); + +// init with data seg ix out of range +mem_test("(memory.init 4 (i32.const 1234) (i32.const 1) (i32.const 1))", "", + WebAssembly.CompileError, /(memory.init segment index out of range)|(unknown data segment 4)/); + +// drop with data seg ix indicating an active segment +mem_test("data.drop 2", ""); + +// init with data seg ix indicating an active segment +mem_test("(memory.init 2 (i32.const 1234) (i32.const 1) (i32.const 1))", "", + WebAssembly.RuntimeError, /index out of bounds/); + +// init, using a data seg ix more than once is OK +mem_test_nofail( + "(memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))", + "(memory.init 1 (i32.const 4321) (i32.const 1) (i32.const 1))"); + +// drop, then drop +mem_test("data.drop 1", + "data.drop 1"); + +// drop, then init +mem_test("data.drop 1", + "(memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))", + WebAssembly.RuntimeError, /index out of bounds/); + +// init: seg ix is valid passive, but length to copy > len of seg +mem_test("", + "(memory.init 1 (i32.const 1234) (i32.const 0) (i32.const 5))", + WebAssembly.RuntimeError, /index out of bounds/); + +// init: seg ix is valid passive, but implies copying beyond end of seg +mem_test("", + "(memory.init 1 (i32.const 1234) (i32.const 2) (i32.const 3))", + WebAssembly.RuntimeError, /index out of bounds/); + +// init: seg ix is valid passive, but implies copying beyond end of dst +mem_test("", + "(memory.init 1 (i32.const 0xFFFE) (i32.const 1) (i32.const 3))", + WebAssembly.RuntimeError, /index out of bounds/); + +// init: seg ix is valid passive, zero len, but src offset out of bounds at the +// edge +mem_test("", + "(memory.init 1 (i32.const 1234) (i32.const 4) (i32.const 0))"); + +// init: seg ix is valid passive, zero len, but src offset out of bounds one +// past the edge +mem_test("", + "(memory.init 1 (i32.const 1234) (i32.const 5) (i32.const 0))", + WebAssembly.RuntimeError, /index out of bounds/); + +// init: seg ix is valid passive, zero len, but dst offset out of bounds at the +// edge +mem_test("", + "(memory.init 1 (i32.const 0x10000) (i32.const 2) (i32.const 0))"); + +// init: seg ix is valid passive, zero len, but dst offset out of bounds one +// past the edge +mem_test("", + "(memory.init 1 (i32.const 0x10001) (i32.const 2) (i32.const 0))", + WebAssembly.RuntimeError, /index out of bounds/); + +// drop: too many args +mem_test("data.drop 1 (i32.const 42)", "", + WebAssembly.CompileError, + /(unused values not explicitly dropped by end of block)|(values remaining on stack at end of block)/); + +// init: too many args +mem_test("(memory.init 1 (i32.const 1) (i32.const 1) (i32.const 1) (i32.const 1))", + "", + WebAssembly.CompileError, /(unused values)|(values remaining on stack at end of block)/); + +// init: too few args +mem_test("(memory.init 1 (i32.const 1) (i32.const 1))", "", + WebAssembly.CompileError, + /(popping value from empty stack)|(expected i32 but nothing on stack)/); + +// invalid argument types +{ + const tys = ['i32', 'f32', 'i64', 'f64']; + + for (let ty1 of tys) { + for (let ty2 of tys) { + for (let ty3 of tys) { + if (ty1 == 'i32' && ty2 == 'i32' && ty3 == 'i32') + continue; // this is the only valid case + let i1 = `(memory.init 1 (${ty1}.const 1) (${ty2}.const 1) (${ty3}.const 1))`; + mem_test(i1, "", WebAssembly.CompileError, /type mismatch/); + }}} +} + +// +//---- table.{drop,init} -------------------------------------------------- + +// drop with no tables and no elem segments +tab_test("elem.drop 0", "", + WebAssembly.CompileError, + /(element segment index out of range for elem.drop)|(segment index out of bounds)/, + /*haveStorage=*/false, /*haveInitA=*/false, /*haveInitP=*/false); + +// drop with no tables but with both passive and active segments, ix in range +// and refers to a passive segment +tab_test("elem.drop 3", "", + WebAssembly.CompileError, + /active elem segment requires a table/, + /*haveStorage=*/false, /*haveInitA=*/true, /*haveInitP=*/true); + +// drop with no tables but with passive segments only, ix out of range +tab_test("elem.drop 2", "", + WebAssembly.CompileError, + /(element segment index out of range for elem.drop)|(segment index out of bounds)/, + /*haveStorage=*/false, /*haveInitA=*/false, /*haveInitP=*/true); + +// drop with no tables but with passive segments only, ix in range +tab_test_nofail("elem.drop 1", "", + /*haveStorage=*/false, /*haveInitA=*/false, /*haveInitP=*/true); + + +// init with no table +tab_test("(table.init 1 (i32.const 12) (i32.const 1) (i32.const 1))", "", + WebAssembly.CompileError, /(table index out of range)|(table index out of bounds)/, + /*haveStorage=*/false, /*haveInitA=*/false, /*haveInitP=*/false); + +// drop with elem seg ix out of range +tab_test("elem.drop 4", "", + WebAssembly.CompileError, /(element segment index out of range for elem.drop)|(segment index out of bounds)/); + +// init with elem seg ix out of range +tab_test("(table.init 4 (i32.const 12) (i32.const 1) (i32.const 1))", "", + WebAssembly.CompileError, /(table.init segment index out of range)|(segment index out of bounds)/); + +// drop with elem seg ix indicating an active segment +tab_test("elem.drop 2", ""); + +// init with elem seg ix indicating an active segment +tab_test("(table.init 2 (i32.const 12) (i32.const 1) (i32.const 1))", "", + WebAssembly.RuntimeError, /index out of bounds/); + +// init, using an elem seg ix more than once is OK +tab_test_nofail( + "(table.init 1 (i32.const 12) (i32.const 1) (i32.const 1))", + "(table.init 1 (i32.const 21) (i32.const 1) (i32.const 1))"); + +// drop, then drop +tab_test("elem.drop 1", + "elem.drop 1"); + +// drop, then init +tab_test("elem.drop 1", + "(table.init 1 (i32.const 12) (i32.const 1) (i32.const 1))", + WebAssembly.RuntimeError, /index out of bounds/); + +// init: seg ix is valid passive, but length to copy > len of seg +tab_test("", + "(table.init 1 (i32.const 12) (i32.const 0) (i32.const 5))", + WebAssembly.RuntimeError, /index out of bounds/); + +// init: seg ix is valid passive, but implies copying beyond end of seg +tab_test("", + "(table.init 1 (i32.const 12) (i32.const 2) (i32.const 3))", + WebAssembly.RuntimeError, /index out of bounds/); + +// init: seg ix is valid passive, but implies copying beyond end of dst +tab_test("", + "(table.init 1 (i32.const 28) (i32.const 1) (i32.const 3))", + WebAssembly.RuntimeError, /index out of bounds/); + +// init: seg ix is valid passive, zero len, but src offset out of bounds at the +// edge +tab_test("", + "(table.init 1 (i32.const 12) (i32.const 4) (i32.const 0))"); + +// init: seg ix is valid passive, zero len, but src offset out of bounds one +// past the edge +tab_test("", + "(table.init 1 (i32.const 12) (i32.const 5) (i32.const 0))", + WebAssembly.RuntimeError, /index out of bounds/); + +// init: seg ix is valid passive, zero len, but dst offset out of bounds +tab_test("", + "(table.init 1 (i32.const 30) (i32.const 2) (i32.const 0))"); + +// init: seg ix is valid passive, zero len, but dst offset out of bounds one +// past the edge +tab_test("", + "(table.init 1 (i32.const 31) (i32.const 2) (i32.const 0))", + WebAssembly.RuntimeError, /index out of bounds/); + +// drop: too many args +tab_test("elem.drop 1 (i32.const 42)", "", + WebAssembly.CompileError, + /(unused values not explicitly dropped by end of block)|(values remaining on stack at end of block)/); + +// init: too many args +tab_test("(table.init 1 (i32.const 1) (i32.const 1) (i32.const 1) (i32.const 1))", + "", + WebAssembly.CompileError, /(unused values)|(values remaining on stack at end of block)/); + +// init: too few args +tab_test("(table.init 1 (i32.const 1) (i32.const 1))", "", + WebAssembly.CompileError, + /(popping value from empty stack)|(expected i32 but nothing on stack)/); + +// invalid argument types +{ + const tys = ['i32', 'f32', 'i64', 'f64']; + + const ops = ['table.init 1', 'table.copy']; + for (let ty1 of tys) { + for (let ty2 of tys) { + for (let ty3 of tys) { + for (let op of ops) { + if (ty1 == 'i32' && ty2 == 'i32' && ty3 == 'i32') + continue; // this is the only valid case + let i1 = `(${op} (${ty1}.const 1) (${ty2}.const 1) (${ty3}.const 1))`; + tab_test(i1, "", WebAssembly.CompileError, /type mismatch/); + }}}} +} + + +//---- table.copy --------------------------------------------------------- + +// There are no immediates here, only 3 dynamic args. So we're limited to +// runtime boundary checks. + +// passive-segs-smoketest.js tests the normal, non-exception cases of +// table.copy. Here we just test the boundary-failure cases. The +// table's valid indices are 0 .. 29 inclusive. + +// copy: dst range invalid +tab_test("(table.copy (i32.const 28) (i32.const 1) (i32.const 3))", + "", + WebAssembly.RuntimeError, /index out of bounds/); + +// copy: dst wraparound end of 32 bit offset space +tab_test("(table.copy (i32.const 0xFFFFFFFE) (i32.const 1) (i32.const 2))", + "", + WebAssembly.RuntimeError, /index out of bounds/); + +// copy: src range invalid +tab_test("(table.copy (i32.const 15) (i32.const 25) (i32.const 6))", + "", + WebAssembly.RuntimeError, /index out of bounds/); + +// copy: src wraparound end of 32 bit offset space +tab_test("(table.copy (i32.const 15) (i32.const 0xFFFFFFFE) (i32.const 2))", + "", + WebAssembly.RuntimeError, /index out of bounds/); + +// copy: zero length with both offsets in-bounds is OK +tab_test_nofail( + "(table.copy (i32.const 15) (i32.const 25) (i32.const 0))", + ""); + +// copy: zero length with dst offset out of bounds at the edge +tab_test("(table.copy (i32.const 30) (i32.const 15) (i32.const 0))", + ""); + +// copy: zero length with dst offset out of bounds one past the edge +tab_test("(table.copy (i32.const 31) (i32.const 15) (i32.const 0))", + "", WebAssembly.RuntimeError, /index out of bounds/); + +// copy: zero length with src offset out of bounds at the edge +tab_test("(table.copy (i32.const 15) (i32.const 30) (i32.const 0))", + ""); + +// copy: zero length with src offset out of bounds one past the edge +tab_test("(table.copy (i32.const 15) (i32.const 31) (i32.const 0))", + "", WebAssembly.RuntimeError, /index out of bounds/); diff --git a/js/src/jit-test/tests/wasm/passive-segs-nonboundary.js b/js/src/jit-test/tests/wasm/passive-segs-nonboundary.js new file mode 100644 index 0000000000..046e8cc475 --- /dev/null +++ b/js/src/jit-test/tests/wasm/passive-segs-nonboundary.js @@ -0,0 +1,1188 @@ +load(libdir + "wasm-binary.js"); + +const v2vSig = {args:[], ret:VoidCode}; +const v2vSigSection = sigSection([v2vSig]); + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; + +// Some non-boundary tests for {table,memory}.{init,drop,copy}. The table +// case is more complex and appears first. The memory case is a simplified +// version of it. + +// This module exports 5 functions .. +let tab_expmod_t = + `(module + (func (export "ef0") (result i32) (i32.const 0)) + (func (export "ef1") (result i32) (i32.const 1)) + (func (export "ef2") (result i32) (i32.const 2)) + (func (export "ef3") (result i32) (i32.const 3)) + (func (export "ef4") (result i32) (i32.const 4)) + )`; + +// .. and this one imports those 5 functions. It adds 5 of its own, creates a +// 30 element table using both active and passive initialisers, with a mixture +// of the imported and local functions. |setup| and |check| are exported. +// |setup| uses the supplied |insn| to modify the table somehow. |check| will +// indirect-call the table entry number specified as a parameter. That will +// either return a value 0 to 9 indicating the function called, or will throw an +// exception if the table entry is empty. +function gen_tab_impmod_t(insn) +{ + let t = + `(module + ;; -------- Types -------- + (type (func (result i32))) ;; type #0 + ;; -------- Imports -------- + (import "a" "if0" (func (result i32))) ;; index 0 + (import "a" "if1" (func (result i32))) + (import "a" "if2" (func (result i32))) + (import "a" "if3" (func (result i32))) + (import "a" "if4" (func (result i32))) ;; index 4 + ;; -------- Tables -------- + (table 30 30 funcref) + ;; -------- Table initialisers -------- + (elem (i32.const 2) 3 1 4 1) + (elem func 2 7 1 8) + (elem (i32.const 12) 7 5 2 3 6) + (elem func 5 9 2 7 6) + ;; -------- Functions -------- + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + + (func (export "setup") + ${insn}) + (func (export "check") (param i32) (result i32) + ;; call the selected table entry, which will either return a value, + ;; or will cause an exception. + local.get 0 ;; callIx + call_indirect (type 0) ;; and its return value is our return value. + ) + )`; + return t; +}; + +// This is the test driver. It constructs the abovementioned module, using +// the given |instruction| to modify the table, and then probes the table +// by making indirect calls, one for each element of |expected_result_vector|. +// The results are compared to those in the vector. + +function tab_test(instruction, expected_result_vector) +{ + let tab_expmod_b = wasmTextToBinary(tab_expmod_t); + let tab_expmod_i = new Instance(new Module(tab_expmod_b)); + + let tab_impmod_t = gen_tab_impmod_t(instruction); + let tab_impmod_b = wasmTextToBinary(tab_impmod_t); + + let inst = new Instance(new Module(tab_impmod_b), + {a:{if0:tab_expmod_i.exports.ef0, + if1:tab_expmod_i.exports.ef1, + if2:tab_expmod_i.exports.ef2, + if3:tab_expmod_i.exports.ef3, + if4:tab_expmod_i.exports.ef4 + }}); + inst.exports.setup(); + + for (let i = 0; i < expected_result_vector.length; i++) { + let expected = expected_result_vector[i]; + let actual = undefined; + try { + actual = inst.exports.check(i); + assertEq(actual !== null, true); + } catch (e) { + if (!(e instanceof Error && + e.message.match(/indirect call to null/))) + throw e; + // actual remains undefined + } + assertEq(actual, expected, + "tab_test fail: insn = '" + instruction + "', index = " + + i + ", expected = " + expected + ", actual = " + actual); + } +} + +// Using 'e' for empty (undefined) spaces in the table, to make it easier +// to count through the vector entries when debugging. +let e = undefined; + +// This just gives the initial state of the table, with its active +// initialisers applied +tab_test("nop", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Copy non-null over non-null +tab_test("(table.copy (i32.const 13) (i32.const 2) (i32.const 3))", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,3,1, 4,6,e,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Copy non-null over null +tab_test("(table.copy (i32.const 25) (i32.const 15) (i32.const 2))", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, 3,6,e,e,e]); + +// Copy null over non-null +tab_test("(table.copy (i32.const 13) (i32.const 25) (i32.const 3))", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,e,e, e,6,e,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Copy null over null +tab_test("(table.copy (i32.const 20) (i32.const 22) (i32.const 4))", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Copy null and non-null entries, non overlapping +tab_test("(table.copy (i32.const 25) (i32.const 1) (i32.const 3))", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,3,1,e,e]); + +// Copy null and non-null entries, overlapping, backwards +tab_test("(table.copy (i32.const 10) (i32.const 12) (i32.const 7))", + [e,e,3,1,4, 1,e,e,e,e, 7,5,2,3,6, e,e,e,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Copy null and non-null entries, overlapping, forwards +tab_test("(table.copy (i32.const 12) (i32.const 10) (i32.const 7))", + [e,e,3,1,4, 1,e,e,e,e, e,e,e,e,7, 5,2,3,6,e, e,e,e,e,e, e,e,e,e,e]); + +// Passive init that overwrites all-null entries +tab_test("(table.init 1 (i32.const 7) (i32.const 0) (i32.const 4))", + [e,e,3,1,4, 1,e,2,7,1, 8,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Passive init that overwrites existing active-init-created entries +tab_test("(table.init 3 (i32.const 15) (i32.const 1) (i32.const 3))", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 9,2,7,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Perform active and passive initialisation and then multiple copies +tab_test("(table.init 1 (i32.const 7) (i32.const 0) (i32.const 4)) \n" + + "elem.drop 1 \n" + + "(table.init 3 (i32.const 15) (i32.const 1) (i32.const 3)) \n" + + "elem.drop 3 \n" + + "(table.copy (i32.const 20) (i32.const 15) (i32.const 5)) \n" + + "(table.copy (i32.const 21) (i32.const 29) (i32.const 1)) \n" + + "(table.copy (i32.const 24) (i32.const 10) (i32.const 1)) \n" + + "(table.copy (i32.const 13) (i32.const 11) (i32.const 4)) \n" + + "(table.copy (i32.const 19) (i32.const 20) (i32.const 5))", + [e,e,3,1,4, 1,e,2,7,1, 8,e,7,e,7, 5,2,7,e,9, e,7,e,8,8, e,e,e,e,e]); + +// And now a simplified version of the above, for memory.{init,drop,copy}. + +function gen_mem_mod_t(insn) +{ + let t = + `(module + ;; -------- Memories -------- + (memory (export "memory0") 1 1) + ;; -------- Memory initialisers -------- + (data (i32.const 2) "\\03\\01\\04\\01") + (data "\\02\\07\\01\\08") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (data "\\05\\09\\02\\07\\06") + + (func (export "testfn") + ${insn} + ;; There's no return value. The JS driver can just pull out the + ;; final memory and examine it. + ) + )`; + return t; +}; + +function mem_test(instruction, expected_result_vector) +{ + let mem_mod_t = gen_mem_mod_t(instruction); + let mem_mod_b = wasmTextToBinary(mem_mod_t); + + let inst = new Instance(new Module(mem_mod_b)); + inst.exports.testfn(); + let buf = new Uint8Array(inst.exports.memory0.buffer); + + for (let i = 0; i < expected_result_vector.length; i++) { + let expected = expected_result_vector[i]; + let actual = buf[i]; + assertEq(actual, expected, + "mem_test fail: insn = '" + instruction + "', index = " + + i + ", expected = " + expected + ", actual = " + actual); + } +} + +e = 0; + +// This just gives the initial state of the memory, with its active +// initialisers applied. +mem_test("nop", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Copy non-zero over non-zero +mem_test("(memory.copy (i32.const 13) (i32.const 2) (i32.const 3))", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,3,1, 4,6,e,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Copy non-zero over zero +mem_test("(memory.copy (i32.const 25) (i32.const 15) (i32.const 2))", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, 3,6,e,e,e]); + +// Copy zero over non-zero +mem_test("(memory.copy (i32.const 13) (i32.const 25) (i32.const 3))", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,e,e, e,6,e,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Copy zero over zero +mem_test("(memory.copy (i32.const 20) (i32.const 22) (i32.const 4))", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Copy zero and non-zero entries, non overlapping +mem_test("(memory.copy (i32.const 25) (i32.const 1) (i32.const 3))", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,3,1,e,e]); + +// Copy zero and non-zero entries, overlapping, backwards +mem_test("(memory.copy (i32.const 10) (i32.const 12) (i32.const 7))", + [e,e,3,1,4, 1,e,e,e,e, 7,5,2,3,6, e,e,e,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Copy zero and non-zero entries, overlapping, forwards +mem_test("(memory.copy (i32.const 12) (i32.const 10) (i32.const 7))", + [e,e,3,1,4, 1,e,e,e,e, e,e,e,e,7, 5,2,3,6,e, e,e,e,e,e, e,e,e,e,e]); + +// Passive init that overwrites all-zero entries +mem_test("(memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4))", + [e,e,3,1,4, 1,e,2,7,1, 8,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Passive init that overwrites existing active-init-created entries +mem_test("(memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3))", + [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 9,2,7,e,e, e,e,e,e,e, e,e,e,e,e]); + +// Perform active and passive initialisation and then multiple copies +mem_test("(memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4)) \n" + + "data.drop 1 \n" + + "(memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3)) \n" + + "data.drop 3 \n" + + "(memory.copy (i32.const 20) (i32.const 15) (i32.const 5)) \n" + + "(memory.copy (i32.const 21) (i32.const 29) (i32.const 1)) \n" + + "(memory.copy (i32.const 24) (i32.const 10) (i32.const 1)) \n" + + "(memory.copy (i32.const 13) (i32.const 11) (i32.const 4)) \n" + + "(memory.copy (i32.const 19) (i32.const 20) (i32.const 5))", + [e,e,3,1,4, 1,e,2,7,1, 8,e,7,e,7, 5,2,7,e,9, e,7,e,8,8, e,e,e,e,e]); + +function checkDataCount(count, err) { + let binary = moduleWithSections( + [v2vSigSection, + dataCountSection(count), + dataSection([ + {offset: 0, elems: []}, + {offset: 0, elems: []}, + ]) + ]); + assertErrorMessage(() => new WebAssembly.Module(binary), + WebAssembly.CompileError, + err); +} + +// DataCount section is present but value is too low for the number of data segments +checkDataCount(1, /number of data segments does not match declared count/); +// DataCount section is present but value is too high for the number of data segments +checkDataCount(3, /number of data segments does not match declared count/); + +// DataCount section is not present but memory.init or data.drop uses it +function checkNoDataCount(body, err) { + let binary = moduleWithSections( + [v2vSigSection, + declSection([0]), + memorySection(1), + bodySection( + [funcBody({locals:[], body})])]); + assertErrorMessage(() => new WebAssembly.Module(binary), + WebAssembly.CompileError, + err); +} + +checkNoDataCount([I32ConstCode, 0, + I32ConstCode, 0, + I32ConstCode, 0, + MiscPrefix, MemoryInitCode, 0, 0], + /(memory.init requires a DataCount section)|(unknown data segment)/); + +checkNoDataCount([MiscPrefix, DataDropCode, 0], + /(data.drop requires a DataCount section)|(unknown data segment)/); + +//---------------------------------------------------------------------// +//---------------------------------------------------------------------// +// Some further tests for memory.copy and memory.fill. First, validation +// tests. + +// Prefixed opcodes + +function checkMiscPrefixed(opcode, expect_failure) { + let binary = moduleWithSections( + [v2vSigSection, declSection([0]), memorySection(1), + bodySection( + [funcBody( + {locals:[], + body:[I32ConstCode, 0x0, + I32ConstCode, 0x0, + I32ConstCode, 0x0, + MiscPrefix, ...opcode]})])]); + if (expect_failure) { + assertErrorMessage(() => new WebAssembly.Module(binary), + WebAssembly.CompileError, /(unrecognized opcode)|(Unknown.*subopcode)/); + } else { + assertEq(WebAssembly.validate(binary), true); + } +} + +//----------------------------------------------------------- +// Verification cases for memory.copy/fill opcode encodings + +checkMiscPrefixed([MemoryCopyCode, 0x00, 0x00], false); // memory.copy src=0 dest=0 +checkMiscPrefixed([MemoryFillCode, 0x00], false); // memory.fill mem=0 +checkMiscPrefixed([0x13], true); // table.size+1, which is currently unassigned + +//----------------------------------------------------------- +// Verification cases for memory.copy/fill arguments + +// Invalid argument types +{ + const tys = ['i32', 'f32', 'i64', 'f64']; + const ops = ['copy', 'fill']; + for (let ty1 of tys) { + for (let ty2 of tys) { + for (let ty3 of tys) { + for (let op of ops) { + if (ty1 == 'i32' && ty2 == 'i32' && ty3 == 'i32') + continue; // this is the only valid case + let text = + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.${op} (${ty1}.const 10) (${ty2}.const 20) (${ty3}.const 30)) + ) + )`; + assertErrorMessage(() => wasmEvalText(text), + WebAssembly.CompileError, /type mismatch/); + }}}} +} + +// Not enough, or too many, args +{ + for (let op of ['copy', 'fill']) { + let text1 = + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (i32.const 10) + (i32.const 20) + memory.${op} + ) + )`; + assertErrorMessage(() => wasmEvalText(text1), + WebAssembly.CompileError, + /(popping value from empty stack)|(expected i32 but nothing on stack)/); + let text2 = + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (i32.const 10) + (i32.const 20) + (i32.const 30) + (i32.const 40) + memory.${op} + ) + )`; + assertErrorMessage(() => wasmEvalText(text2), + WebAssembly.CompileError, + /(unused values not explicitly dropped by end of block)|(values remaining on stack at end of block)/); + } +} + +// Module doesn't have a memory +{ + for (let op of ['copy', 'fill']) { + let text = + `(module + (func (export "testfn") + (memory.${op} (i32.const 10) (i32.const 20) (i32.const 30)) + ) + )`; + assertErrorMessage(() => wasmEvalText(text), + WebAssembly.CompileError, + /memory index/); + } +} + +//---------------------------------------------------------------------// +//---------------------------------------------------------------------// +// Run tests + +//----------------------------------------------------------- +// Test helpers +function checkRange(arr, minIx, maxIxPlusOne, expectedValue) +{ + for (let i = minIx; i < maxIxPlusOne; i++) { + assertEq(arr[i], expectedValue); + } +} + +//----------------------------------------------------------- +// Test cases for memory.fill + +// Range valid +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.fill (i32.const 0xFF00) (i32.const 0x55) (i32.const 256)) + ) + )` + ); + inst.exports.testfn(); + let b = new Uint8Array(inst.exports.memory.buffer); + checkRange(b, 0x00000, 0x0FF00, 0x00); + checkRange(b, 0x0FF00, 0x10000, 0x55); +} + +// Range invalid +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.fill (i32.const 0xFF00) (i32.const 0x55) (i32.const 257)) + ) + )` + ); + assertErrorMessage(() => inst.exports.testfn(), + WebAssembly.RuntimeError, /index out of bounds/); +} + +// Wraparound the end of 32-bit offset space +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.fill (i32.const 0xFFFFFF00) (i32.const 0x55) (i32.const 257)) + ) + )` + ); + assertErrorMessage(() => inst.exports.testfn(), + WebAssembly.RuntimeError, /index out of bounds/); +} + +// Zero len with offset in-bounds is a no-op +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.fill (i32.const 0x12) (i32.const 0x55) (i32.const 0)) + ) + )` + ); + inst.exports.testfn(); + let b = new Uint8Array(inst.exports.memory.buffer); + checkRange(b, 0x00000, 0x10000, 0x00); +} + +// Zero len with offset out-of-bounds is OK +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.fill (i32.const 0x10000) (i32.const 0x55) (i32.const 0)) + ) + )` + ); + inst.exports.testfn(); +} + +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.fill (i32.const 0x10001) (i32.const 0x55) (i32.const 0)) + ) + )` + ); + assertErrorMessage(() => inst.exports.testfn(), + WebAssembly.RuntimeError, /index out of bounds/); +} + +// Very large range +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.fill (i32.const 0x1) (i32.const 0xAA) (i32.const 0xFFFE)) + ) + )` + ); + inst.exports.testfn(); + let b = new Uint8Array(inst.exports.memory.buffer); + checkRange(b, 0x00000, 0x00001, 0x00); + checkRange(b, 0x00001, 0x0FFFF, 0xAA); + checkRange(b, 0x0FFFF, 0x10000, 0x00); +} + +// Sequencing +{ + let i = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") (result i32) + (memory.fill (i32.const 0x12) (i32.const 0x55) (i32.const 10)) + (memory.fill (i32.const 0x15) (i32.const 0xAA) (i32.const 4)) + i32.const 99 + ) + )` + ); + i.exports.testfn(); + let b = new Uint8Array(i.exports.memory.buffer); + checkRange(b, 0x0, 0x12+0, 0x00); + checkRange(b, 0x12+0, 0x12+3, 0x55); + checkRange(b, 0x12+3, 0x12+7, 0xAA); + checkRange(b, 0x12+7, 0x12+10, 0x55); + checkRange(b, 0x12+10, 0x10000, 0x00); +} + + +//----------------------------------------------------------- +// Test cases for memory.copy + +// Both ranges valid. Copy 5 bytes backwards by 1 (overlapping). +// result = 0x00--(09) 0x55--(11) 0x00--(pagesize-20) +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (i32.const 0x55) (i32.const 10)) + (memory.copy (i32.const 9) (i32.const 10) (i32.const 5)) + ) + )` + ); + inst.exports.testfn(); + let b = new Uint8Array(inst.exports.memory.buffer); + checkRange(b, 0, 0+9, 0x00); + checkRange(b, 9, 9+11, 0x55); + checkRange(b, 9+11, 0x10000, 0x00); +} + +// Both ranges valid. Copy 5 bytes forwards by 1 (overlapping). +// result = 0x00--(10) 0x55--(11) 0x00--(pagesize-19) +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (i32.const 0x55) (i32.const 10)) + (memory.copy (i32.const 16) (i32.const 15) (i32.const 5)) + ) + )` + ); + inst.exports.testfn(); + let b = new Uint8Array(inst.exports.memory.buffer); + checkRange(b, 0, 0+10, 0x00); + checkRange(b, 10, 10+11, 0x55); + checkRange(b, 10+11, 0x10000, 0x00); +} + +// Destination range invalid +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.copy (i32.const 0xFF00) (i32.const 0x8000) (i32.const 257)) + ) + )` + ); + assertErrorMessage(() => inst.exports.testfn(), + WebAssembly.RuntimeError, /index out of bounds/); +} + +// Destination wraparound the end of 32-bit offset space +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.copy (i32.const 0xFFFFFF00) (i32.const 0x4000) (i32.const 257)) + ) + )` + ); + assertErrorMessage(() => inst.exports.testfn(), + WebAssembly.RuntimeError, /index out of bounds/); +} + +// Source range invalid +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.copy (i32.const 0x8000) (i32.const 0xFF00) (i32.const 257)) + ) + )` + ); + assertErrorMessage(() => inst.exports.testfn(), + WebAssembly.RuntimeError, /index out of bounds/); +} + +// Source wraparound the end of 32-bit offset space +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.copy (i32.const 0x4000) (i32.const 0xFFFFFF00) (i32.const 257)) + ) + )` + ); + assertErrorMessage(() => inst.exports.testfn(), + WebAssembly.RuntimeError, /index out of bounds/); +} + +// Zero len with both offsets in-bounds is a no-op +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.fill (i32.const 0x0000) (i32.const 0x55) (i32.const 0x8000)) + (memory.fill (i32.const 0x8000) (i32.const 0xAA) (i32.const 0x8000)) + (memory.copy (i32.const 0x9000) (i32.const 0x7000) (i32.const 0)) + ) + )` + ); + inst.exports.testfn(); + let b = new Uint8Array(inst.exports.memory.buffer); + checkRange(b, 0x00000, 0x08000, 0x55); + checkRange(b, 0x08000, 0x10000, 0xAA); +} + +// Zero len with dest offset out-of-bounds at the edge of memory +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.copy (i32.const 0x10000) (i32.const 0x7000) (i32.const 0)) + ) + )` + ); + inst.exports.testfn(); +} + +// Ditto, but one element further out +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.copy (i32.const 0x10001) (i32.const 0x7000) (i32.const 0)) + ) + )` + ); + assertErrorMessage(() => inst.exports.testfn(), + WebAssembly.RuntimeError, /index out of bounds/); +} + +// Zero len with src offset out-of-bounds at the edge of memory +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.copy (i32.const 0x9000) (i32.const 0x10000) (i32.const 0)) + ) + )` + ); + inst.exports.testfn(); +} + +// Ditto, but one element further out +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.copy (i32.const 0x9000) (i32.const 0x10001) (i32.const 0)) + ) + )` + ); + assertErrorMessage(() => inst.exports.testfn(), + WebAssembly.RuntimeError, /index out of bounds/); +} + +// 100 random fills followed by 100 random copies, in a single-page buffer, +// followed by verification of the (now heavily mashed-around) buffer. +{ + let inst = wasmEvalText( + `(module + (memory (export "memory") 1 1) + (func (export "testfn") + (memory.fill (i32.const 17767) (i32.const 1) (i32.const 1344)) + (memory.fill (i32.const 39017) (i32.const 2) (i32.const 1055)) + (memory.fill (i32.const 56401) (i32.const 3) (i32.const 988)) + (memory.fill (i32.const 37962) (i32.const 4) (i32.const 322)) + (memory.fill (i32.const 7977) (i32.const 5) (i32.const 1994)) + (memory.fill (i32.const 22714) (i32.const 6) (i32.const 3036)) + (memory.fill (i32.const 16882) (i32.const 7) (i32.const 2372)) + (memory.fill (i32.const 43491) (i32.const 8) (i32.const 835)) + (memory.fill (i32.const 124) (i32.const 9) (i32.const 1393)) + (memory.fill (i32.const 2132) (i32.const 10) (i32.const 2758)) + (memory.fill (i32.const 8987) (i32.const 11) (i32.const 3098)) + (memory.fill (i32.const 52711) (i32.const 12) (i32.const 741)) + (memory.fill (i32.const 3958) (i32.const 13) (i32.const 2823)) + (memory.fill (i32.const 49715) (i32.const 14) (i32.const 1280)) + (memory.fill (i32.const 50377) (i32.const 15) (i32.const 1466)) + (memory.fill (i32.const 20493) (i32.const 16) (i32.const 3158)) + (memory.fill (i32.const 47665) (i32.const 17) (i32.const 544)) + (memory.fill (i32.const 12451) (i32.const 18) (i32.const 2669)) + (memory.fill (i32.const 24869) (i32.const 19) (i32.const 2651)) + (memory.fill (i32.const 45317) (i32.const 20) (i32.const 1570)) + (memory.fill (i32.const 43096) (i32.const 21) (i32.const 1691)) + (memory.fill (i32.const 33886) (i32.const 22) (i32.const 646)) + (memory.fill (i32.const 48555) (i32.const 23) (i32.const 1858)) + (memory.fill (i32.const 53453) (i32.const 24) (i32.const 2657)) + (memory.fill (i32.const 30363) (i32.const 25) (i32.const 981)) + (memory.fill (i32.const 9300) (i32.const 26) (i32.const 1807)) + (memory.fill (i32.const 50190) (i32.const 27) (i32.const 487)) + (memory.fill (i32.const 62753) (i32.const 28) (i32.const 530)) + (memory.fill (i32.const 36316) (i32.const 29) (i32.const 943)) + (memory.fill (i32.const 6768) (i32.const 30) (i32.const 381)) + (memory.fill (i32.const 51262) (i32.const 31) (i32.const 3089)) + (memory.fill (i32.const 49729) (i32.const 32) (i32.const 658)) + (memory.fill (i32.const 44540) (i32.const 33) (i32.const 1702)) + (memory.fill (i32.const 33342) (i32.const 34) (i32.const 1092)) + (memory.fill (i32.const 50814) (i32.const 35) (i32.const 1410)) + (memory.fill (i32.const 47594) (i32.const 36) (i32.const 2204)) + (memory.fill (i32.const 54123) (i32.const 37) (i32.const 2394)) + (memory.fill (i32.const 55183) (i32.const 38) (i32.const 250)) + (memory.fill (i32.const 22620) (i32.const 39) (i32.const 2097)) + (memory.fill (i32.const 17132) (i32.const 40) (i32.const 3264)) + (memory.fill (i32.const 54331) (i32.const 41) (i32.const 3299)) + (memory.fill (i32.const 39474) (i32.const 42) (i32.const 2796)) + (memory.fill (i32.const 36156) (i32.const 43) (i32.const 2070)) + (memory.fill (i32.const 35308) (i32.const 44) (i32.const 2763)) + (memory.fill (i32.const 32731) (i32.const 45) (i32.const 312)) + (memory.fill (i32.const 63746) (i32.const 46) (i32.const 192)) + (memory.fill (i32.const 30974) (i32.const 47) (i32.const 596)) + (memory.fill (i32.const 16635) (i32.const 48) (i32.const 501)) + (memory.fill (i32.const 57002) (i32.const 49) (i32.const 686)) + (memory.fill (i32.const 34299) (i32.const 50) (i32.const 385)) + (memory.fill (i32.const 60881) (i32.const 51) (i32.const 903)) + (memory.fill (i32.const 61445) (i32.const 52) (i32.const 2390)) + (memory.fill (i32.const 46972) (i32.const 53) (i32.const 1441)) + (memory.fill (i32.const 25973) (i32.const 54) (i32.const 3162)) + (memory.fill (i32.const 5566) (i32.const 55) (i32.const 2135)) + (memory.fill (i32.const 35977) (i32.const 56) (i32.const 519)) + (memory.fill (i32.const 44892) (i32.const 57) (i32.const 3280)) + (memory.fill (i32.const 46760) (i32.const 58) (i32.const 1678)) + (memory.fill (i32.const 46607) (i32.const 59) (i32.const 3168)) + (memory.fill (i32.const 22449) (i32.const 60) (i32.const 1441)) + (memory.fill (i32.const 58609) (i32.const 61) (i32.const 663)) + (memory.fill (i32.const 32261) (i32.const 62) (i32.const 1671)) + (memory.fill (i32.const 3063) (i32.const 63) (i32.const 721)) + (memory.fill (i32.const 34025) (i32.const 64) (i32.const 84)) + (memory.fill (i32.const 33338) (i32.const 65) (i32.const 2029)) + (memory.fill (i32.const 36810) (i32.const 66) (i32.const 29)) + (memory.fill (i32.const 19147) (i32.const 67) (i32.const 3034)) + (memory.fill (i32.const 12616) (i32.const 68) (i32.const 1043)) + (memory.fill (i32.const 18276) (i32.const 69) (i32.const 3324)) + (memory.fill (i32.const 4639) (i32.const 70) (i32.const 1091)) + (memory.fill (i32.const 16158) (i32.const 71) (i32.const 1997)) + (memory.fill (i32.const 18204) (i32.const 72) (i32.const 2259)) + (memory.fill (i32.const 50532) (i32.const 73) (i32.const 3189)) + (memory.fill (i32.const 11028) (i32.const 74) (i32.const 1968)) + (memory.fill (i32.const 15962) (i32.const 75) (i32.const 1455)) + (memory.fill (i32.const 45406) (i32.const 76) (i32.const 1177)) + (memory.fill (i32.const 54137) (i32.const 77) (i32.const 1568)) + (memory.fill (i32.const 33083) (i32.const 78) (i32.const 1642)) + (memory.fill (i32.const 61028) (i32.const 79) (i32.const 3284)) + (memory.fill (i32.const 51729) (i32.const 80) (i32.const 223)) + (memory.fill (i32.const 4361) (i32.const 81) (i32.const 2171)) + (memory.fill (i32.const 57514) (i32.const 82) (i32.const 1322)) + (memory.fill (i32.const 55724) (i32.const 83) (i32.const 2648)) + (memory.fill (i32.const 24091) (i32.const 84) (i32.const 1045)) + (memory.fill (i32.const 43183) (i32.const 85) (i32.const 3097)) + (memory.fill (i32.const 32307) (i32.const 86) (i32.const 2796)) + (memory.fill (i32.const 3811) (i32.const 87) (i32.const 2010)) + (memory.fill (i32.const 54856) (i32.const 88) (i32.const 0)) + (memory.fill (i32.const 49941) (i32.const 89) (i32.const 2069)) + (memory.fill (i32.const 20411) (i32.const 90) (i32.const 2896)) + (memory.fill (i32.const 33826) (i32.const 91) (i32.const 192)) + (memory.fill (i32.const 9402) (i32.const 92) (i32.const 2195)) + (memory.fill (i32.const 12413) (i32.const 93) (i32.const 24)) + (memory.fill (i32.const 14091) (i32.const 94) (i32.const 577)) + (memory.fill (i32.const 44058) (i32.const 95) (i32.const 2089)) + (memory.fill (i32.const 36735) (i32.const 96) (i32.const 3436)) + (memory.fill (i32.const 23288) (i32.const 97) (i32.const 2765)) + (memory.fill (i32.const 6392) (i32.const 98) (i32.const 830)) + (memory.fill (i32.const 33307) (i32.const 99) (i32.const 1938)) + (memory.fill (i32.const 21941) (i32.const 100) (i32.const 2750)) + (memory.copy (i32.const 59214) (i32.const 54248) (i32.const 2098)) + (memory.copy (i32.const 63026) (i32.const 39224) (i32.const 230)) + (memory.copy (i32.const 51833) (i32.const 23629) (i32.const 2300)) + (memory.copy (i32.const 6708) (i32.const 23996) (i32.const 639)) + (memory.copy (i32.const 6990) (i32.const 33399) (i32.const 1097)) + (memory.copy (i32.const 19403) (i32.const 10348) (i32.const 3197)) + (memory.copy (i32.const 27308) (i32.const 54406) (i32.const 100)) + (memory.copy (i32.const 27221) (i32.const 43682) (i32.const 1717)) + (memory.copy (i32.const 60528) (i32.const 8629) (i32.const 119)) + (memory.copy (i32.const 5947) (i32.const 2308) (i32.const 658)) + (memory.copy (i32.const 4787) (i32.const 51631) (i32.const 2269)) + (memory.copy (i32.const 12617) (i32.const 19197) (i32.const 833)) + (memory.copy (i32.const 11854) (i32.const 46505) (i32.const 3300)) + (memory.copy (i32.const 11376) (i32.const 45012) (i32.const 2281)) + (memory.copy (i32.const 34186) (i32.const 6697) (i32.const 2572)) + (memory.copy (i32.const 4936) (i32.const 1690) (i32.const 1328)) + (memory.copy (i32.const 63164) (i32.const 7637) (i32.const 1670)) + (memory.copy (i32.const 44568) (i32.const 18344) (i32.const 33)) + (memory.copy (i32.const 43918) (i32.const 22348) (i32.const 1427)) + (memory.copy (i32.const 46637) (i32.const 49819) (i32.const 1434)) + (memory.copy (i32.const 63684) (i32.const 8755) (i32.const 834)) + (memory.copy (i32.const 33485) (i32.const 20131) (i32.const 3317)) + (memory.copy (i32.const 40575) (i32.const 54317) (i32.const 3201)) + (memory.copy (i32.const 25812) (i32.const 59254) (i32.const 2452)) + (memory.copy (i32.const 19678) (i32.const 56882) (i32.const 346)) + (memory.copy (i32.const 15852) (i32.const 35914) (i32.const 2430)) + (memory.copy (i32.const 11824) (i32.const 35574) (i32.const 300)) + (memory.copy (i32.const 59427) (i32.const 13957) (i32.const 3153)) + (memory.copy (i32.const 34299) (i32.const 60594) (i32.const 1281)) + (memory.copy (i32.const 8964) (i32.const 12276) (i32.const 943)) + (memory.copy (i32.const 2827) (i32.const 10425) (i32.const 1887)) + (memory.copy (i32.const 43194) (i32.const 43910) (i32.const 738)) + (memory.copy (i32.const 63038) (i32.const 18949) (i32.const 122)) + (memory.copy (i32.const 24044) (i32.const 44761) (i32.const 1755)) + (memory.copy (i32.const 22608) (i32.const 14755) (i32.const 702)) + (memory.copy (i32.const 11284) (i32.const 26579) (i32.const 1830)) + (memory.copy (i32.const 23092) (i32.const 20471) (i32.const 1064)) + (memory.copy (i32.const 57248) (i32.const 54770) (i32.const 2631)) + (memory.copy (i32.const 25492) (i32.const 1025) (i32.const 3113)) + (memory.copy (i32.const 49588) (i32.const 44220) (i32.const 975)) + (memory.copy (i32.const 28280) (i32.const 41722) (i32.const 2336)) + (memory.copy (i32.const 61289) (i32.const 230) (i32.const 2872)) + (memory.copy (i32.const 22480) (i32.const 52506) (i32.const 2197)) + (memory.copy (i32.const 40553) (i32.const 9578) (i32.const 1958)) + (memory.copy (i32.const 29004) (i32.const 20862) (i32.const 2186)) + (memory.copy (i32.const 53029) (i32.const 43955) (i32.const 1037)) + (memory.copy (i32.const 25476) (i32.const 35667) (i32.const 1650)) + (memory.copy (i32.const 58516) (i32.const 45819) (i32.const 1986)) + (memory.copy (i32.const 38297) (i32.const 5776) (i32.const 1955)) + (memory.copy (i32.const 28503) (i32.const 55364) (i32.const 2368)) + (memory.copy (i32.const 62619) (i32.const 18108) (i32.const 1356)) + (memory.copy (i32.const 50149) (i32.const 13861) (i32.const 382)) + (memory.copy (i32.const 16904) (i32.const 36341) (i32.const 1900)) + (memory.copy (i32.const 48098) (i32.const 11358) (i32.const 2807)) + (memory.copy (i32.const 28512) (i32.const 40362) (i32.const 323)) + (memory.copy (i32.const 35506) (i32.const 27856) (i32.const 1670)) + (memory.copy (i32.const 62970) (i32.const 53332) (i32.const 1341)) + (memory.copy (i32.const 14133) (i32.const 46312) (i32.const 644)) + (memory.copy (i32.const 29030) (i32.const 19074) (i32.const 496)) + (memory.copy (i32.const 44952) (i32.const 47577) (i32.const 2784)) + (memory.copy (i32.const 39559) (i32.const 44661) (i32.const 1350)) + (memory.copy (i32.const 10352) (i32.const 29274) (i32.const 1475)) + (memory.copy (i32.const 46911) (i32.const 46178) (i32.const 1467)) + (memory.copy (i32.const 4905) (i32.const 28740) (i32.const 1895)) + (memory.copy (i32.const 38012) (i32.const 57253) (i32.const 1751)) + (memory.copy (i32.const 26446) (i32.const 27223) (i32.const 1127)) + (memory.copy (i32.const 58835) (i32.const 24657) (i32.const 1063)) + (memory.copy (i32.const 61356) (i32.const 38790) (i32.const 766)) + (memory.copy (i32.const 44160) (i32.const 2284) (i32.const 1520)) + (memory.copy (i32.const 32740) (i32.const 47237) (i32.const 3014)) + (memory.copy (i32.const 11148) (i32.const 21260) (i32.const 1011)) + (memory.copy (i32.const 7665) (i32.const 31612) (i32.const 3034)) + (memory.copy (i32.const 18044) (i32.const 12987) (i32.const 3320)) + (memory.copy (i32.const 57306) (i32.const 55905) (i32.const 308)) + (memory.copy (i32.const 24675) (i32.const 16815) (i32.const 1155)) + (memory.copy (i32.const 19900) (i32.const 10115) (i32.const 722)) + (memory.copy (i32.const 2921) (i32.const 5935) (i32.const 2370)) + (memory.copy (i32.const 32255) (i32.const 50095) (i32.const 2926)) + (memory.copy (i32.const 15126) (i32.const 17299) (i32.const 2607)) + (memory.copy (i32.const 45575) (i32.const 28447) (i32.const 2045)) + (memory.copy (i32.const 55149) (i32.const 36113) (i32.const 2596)) + (memory.copy (i32.const 28461) (i32.const 54157) (i32.const 1168)) + (memory.copy (i32.const 47951) (i32.const 53385) (i32.const 3137)) + (memory.copy (i32.const 30646) (i32.const 45155) (i32.const 2649)) + (memory.copy (i32.const 5057) (i32.const 4295) (i32.const 52)) + (memory.copy (i32.const 6692) (i32.const 24195) (i32.const 441)) + (memory.copy (i32.const 32984) (i32.const 27117) (i32.const 3445)) + (memory.copy (i32.const 32530) (i32.const 59372) (i32.const 2785)) + (memory.copy (i32.const 34361) (i32.const 8962) (i32.const 2406)) + (memory.copy (i32.const 17893) (i32.const 54538) (i32.const 3381)) + (memory.copy (i32.const 22685) (i32.const 44151) (i32.const 136)) + (memory.copy (i32.const 59089) (i32.const 7077) (i32.const 1045)) + (memory.copy (i32.const 42945) (i32.const 55028) (i32.const 2389)) + (memory.copy (i32.const 44693) (i32.const 20138) (i32.const 877)) + (memory.copy (i32.const 36810) (i32.const 25196) (i32.const 3447)) + (memory.copy (i32.const 45742) (i32.const 31888) (i32.const 854)) + (memory.copy (i32.const 24236) (i32.const 31866) (i32.const 1377)) + (memory.copy (i32.const 33778) (i32.const 692) (i32.const 1594)) + (memory.copy (i32.const 60618) (i32.const 18585) (i32.const 2987)) + (memory.copy (i32.const 50370) (i32.const 41271) (i32.const 1406)) + ) + )` + ); + inst.exports.testfn(); + let b = new Uint8Array(inst.exports.memory.buffer); + checkRange(b, 0, 124, 0); + checkRange(b, 124, 1517, 9); + checkRange(b, 1517, 2132, 0); + checkRange(b, 2132, 2827, 10); + checkRange(b, 2827, 2921, 92); + checkRange(b, 2921, 3538, 83); + checkRange(b, 3538, 3786, 77); + checkRange(b, 3786, 4042, 97); + checkRange(b, 4042, 4651, 99); + checkRange(b, 4651, 5057, 0); + checkRange(b, 5057, 5109, 99); + checkRange(b, 5109, 5291, 0); + checkRange(b, 5291, 5524, 72); + checkRange(b, 5524, 5691, 92); + checkRange(b, 5691, 6552, 83); + checkRange(b, 6552, 7133, 77); + checkRange(b, 7133, 7665, 99); + checkRange(b, 7665, 8314, 0); + checkRange(b, 8314, 8360, 62); + checkRange(b, 8360, 8793, 86); + checkRange(b, 8793, 8979, 83); + checkRange(b, 8979, 9373, 79); + checkRange(b, 9373, 9518, 95); + checkRange(b, 9518, 9934, 59); + checkRange(b, 9934, 10087, 77); + checkRange(b, 10087, 10206, 5); + checkRange(b, 10206, 10230, 77); + checkRange(b, 10230, 10249, 41); + checkRange(b, 10249, 11148, 83); + checkRange(b, 11148, 11356, 74); + checkRange(b, 11356, 11380, 93); + checkRange(b, 11380, 11939, 74); + checkRange(b, 11939, 12159, 68); + checkRange(b, 12159, 12575, 83); + checkRange(b, 12575, 12969, 79); + checkRange(b, 12969, 13114, 95); + checkRange(b, 13114, 14133, 59); + checkRange(b, 14133, 14404, 76); + checkRange(b, 14404, 14428, 57); + checkRange(b, 14428, 14458, 59); + checkRange(b, 14458, 14580, 32); + checkRange(b, 14580, 14777, 89); + checkRange(b, 14777, 15124, 59); + checkRange(b, 15124, 15126, 36); + checkRange(b, 15126, 15192, 100); + checkRange(b, 15192, 15871, 96); + checkRange(b, 15871, 15998, 95); + checkRange(b, 15998, 17017, 59); + checkRange(b, 17017, 17288, 76); + checkRange(b, 17288, 17312, 57); + checkRange(b, 17312, 17342, 59); + checkRange(b, 17342, 17464, 32); + checkRange(b, 17464, 17661, 89); + checkRange(b, 17661, 17727, 59); + checkRange(b, 17727, 17733, 5); + checkRange(b, 17733, 17893, 96); + checkRange(b, 17893, 18553, 77); + checkRange(b, 18553, 18744, 42); + checkRange(b, 18744, 18801, 76); + checkRange(b, 18801, 18825, 57); + checkRange(b, 18825, 18876, 59); + checkRange(b, 18876, 18885, 77); + checkRange(b, 18885, 18904, 41); + checkRange(b, 18904, 19567, 83); + checkRange(b, 19567, 20403, 96); + checkRange(b, 20403, 21274, 77); + checkRange(b, 21274, 21364, 100); + checkRange(b, 21364, 21468, 74); + checkRange(b, 21468, 21492, 93); + checkRange(b, 21492, 22051, 74); + checkRange(b, 22051, 22480, 68); + checkRange(b, 22480, 22685, 100); + checkRange(b, 22685, 22694, 68); + checkRange(b, 22694, 22821, 10); + checkRange(b, 22821, 22869, 100); + checkRange(b, 22869, 24107, 97); + checkRange(b, 24107, 24111, 37); + checkRange(b, 24111, 24236, 77); + checkRange(b, 24236, 24348, 72); + checkRange(b, 24348, 24515, 92); + checkRange(b, 24515, 24900, 83); + checkRange(b, 24900, 25136, 95); + checkRange(b, 25136, 25182, 85); + checkRange(b, 25182, 25426, 68); + checkRange(b, 25426, 25613, 89); + checkRange(b, 25613, 25830, 96); + checkRange(b, 25830, 26446, 100); + checkRange(b, 26446, 26517, 10); + checkRange(b, 26517, 27468, 92); + checkRange(b, 27468, 27503, 95); + checkRange(b, 27503, 27573, 77); + checkRange(b, 27573, 28245, 92); + checkRange(b, 28245, 28280, 95); + checkRange(b, 28280, 29502, 77); + checkRange(b, 29502, 29629, 42); + checkRange(b, 29629, 30387, 83); + checkRange(b, 30387, 30646, 77); + checkRange(b, 30646, 31066, 92); + checkRange(b, 31066, 31131, 77); + checkRange(b, 31131, 31322, 42); + checkRange(b, 31322, 31379, 76); + checkRange(b, 31379, 31403, 57); + checkRange(b, 31403, 31454, 59); + checkRange(b, 31454, 31463, 77); + checkRange(b, 31463, 31482, 41); + checkRange(b, 31482, 31649, 83); + checkRange(b, 31649, 31978, 72); + checkRange(b, 31978, 32145, 92); + checkRange(b, 32145, 32530, 83); + checkRange(b, 32530, 32766, 95); + checkRange(b, 32766, 32812, 85); + checkRange(b, 32812, 33056, 68); + checkRange(b, 33056, 33660, 89); + checkRange(b, 33660, 33752, 59); + checkRange(b, 33752, 33775, 36); + checkRange(b, 33775, 33778, 32); + checkRange(b, 33778, 34603, 9); + checkRange(b, 34603, 35218, 0); + checkRange(b, 35218, 35372, 10); + checkRange(b, 35372, 35486, 77); + checkRange(b, 35486, 35605, 5); + checkRange(b, 35605, 35629, 77); + checkRange(b, 35629, 35648, 41); + checkRange(b, 35648, 36547, 83); + checkRange(b, 36547, 36755, 74); + checkRange(b, 36755, 36767, 93); + checkRange(b, 36767, 36810, 83); + checkRange(b, 36810, 36839, 100); + checkRange(b, 36839, 37444, 96); + checkRange(b, 37444, 38060, 100); + checkRange(b, 38060, 38131, 10); + checkRange(b, 38131, 39082, 92); + checkRange(b, 39082, 39117, 95); + checkRange(b, 39117, 39187, 77); + checkRange(b, 39187, 39859, 92); + checkRange(b, 39859, 39894, 95); + checkRange(b, 39894, 40257, 77); + checkRange(b, 40257, 40344, 89); + checkRange(b, 40344, 40371, 59); + checkRange(b, 40371, 40804, 77); + checkRange(b, 40804, 40909, 5); + checkRange(b, 40909, 42259, 92); + checkRange(b, 42259, 42511, 77); + checkRange(b, 42511, 42945, 83); + checkRange(b, 42945, 43115, 77); + checkRange(b, 43115, 43306, 42); + checkRange(b, 43306, 43363, 76); + checkRange(b, 43363, 43387, 57); + checkRange(b, 43387, 43438, 59); + checkRange(b, 43438, 43447, 77); + checkRange(b, 43447, 43466, 41); + checkRange(b, 43466, 44129, 83); + checkRange(b, 44129, 44958, 96); + checkRange(b, 44958, 45570, 77); + checkRange(b, 45570, 45575, 92); + checkRange(b, 45575, 45640, 77); + checkRange(b, 45640, 45742, 42); + checkRange(b, 45742, 45832, 72); + checkRange(b, 45832, 45999, 92); + checkRange(b, 45999, 46384, 83); + checkRange(b, 46384, 46596, 95); + checkRange(b, 46596, 46654, 92); + checkRange(b, 46654, 47515, 83); + checkRange(b, 47515, 47620, 77); + checkRange(b, 47620, 47817, 79); + checkRange(b, 47817, 47951, 95); + checkRange(b, 47951, 48632, 100); + checkRange(b, 48632, 48699, 97); + checkRange(b, 48699, 48703, 37); + checkRange(b, 48703, 49764, 77); + checkRange(b, 49764, 49955, 42); + checkRange(b, 49955, 50012, 76); + checkRange(b, 50012, 50036, 57); + checkRange(b, 50036, 50087, 59); + checkRange(b, 50087, 50096, 77); + checkRange(b, 50096, 50115, 41); + checkRange(b, 50115, 50370, 83); + checkRange(b, 50370, 51358, 92); + checkRange(b, 51358, 51610, 77); + checkRange(b, 51610, 51776, 83); + checkRange(b, 51776, 51833, 89); + checkRange(b, 51833, 52895, 100); + checkRange(b, 52895, 53029, 97); + checkRange(b, 53029, 53244, 68); + checkRange(b, 53244, 54066, 100); + checkRange(b, 54066, 54133, 97); + checkRange(b, 54133, 54137, 37); + checkRange(b, 54137, 55198, 77); + checkRange(b, 55198, 55389, 42); + checkRange(b, 55389, 55446, 76); + checkRange(b, 55446, 55470, 57); + checkRange(b, 55470, 55521, 59); + checkRange(b, 55521, 55530, 77); + checkRange(b, 55530, 55549, 41); + checkRange(b, 55549, 56212, 83); + checkRange(b, 56212, 57048, 96); + checkRange(b, 57048, 58183, 77); + checkRange(b, 58183, 58202, 41); + checkRange(b, 58202, 58516, 83); + checkRange(b, 58516, 58835, 95); + checkRange(b, 58835, 58855, 77); + checkRange(b, 58855, 59089, 95); + checkRange(b, 59089, 59145, 77); + checkRange(b, 59145, 59677, 99); + checkRange(b, 59677, 60134, 0); + checkRange(b, 60134, 60502, 89); + checkRange(b, 60502, 60594, 59); + checkRange(b, 60594, 60617, 36); + checkRange(b, 60617, 60618, 32); + checkRange(b, 60618, 60777, 42); + checkRange(b, 60777, 60834, 76); + checkRange(b, 60834, 60858, 57); + checkRange(b, 60858, 60909, 59); + checkRange(b, 60909, 60918, 77); + checkRange(b, 60918, 60937, 41); + checkRange(b, 60937, 61600, 83); + checkRange(b, 61600, 62436, 96); + checkRange(b, 62436, 63307, 77); + checkRange(b, 63307, 63397, 100); + checkRange(b, 63397, 63501, 74); + checkRange(b, 63501, 63525, 93); + checkRange(b, 63525, 63605, 74); + checkRange(b, 63605, 63704, 100); + checkRange(b, 63704, 63771, 97); + checkRange(b, 63771, 63775, 37); + checkRange(b, 63775, 64311, 77); + checkRange(b, 64311, 64331, 26); + checkRange(b, 64331, 64518, 92); + checkRange(b, 64518, 64827, 11); + checkRange(b, 64827, 64834, 26); + checkRange(b, 64834, 65536, 0); +} + +// Make sure dead code doesn't prevent compilation. +wasmEvalText( + `(module + (memory 0 10) + (data (i32.const 0)) + (func + (return) + (memory.init 0) + ) + )`); + +wasmEvalText( + `(module + (memory 0 10) + (func + (return) + (memory.fill) + ) + )`); + +wasmEvalText( + `(module + (table (export "t") 10 funcref) + (elem (i32.const 0) 0) + (func + (return) + (elem.drop 0) + ) + )`); diff --git a/js/src/jit-test/tests/wasm/passive-segs-partial-mem.js b/js/src/jit-test/tests/wasm/passive-segs-partial-mem.js new file mode 100644 index 0000000000..d03c7c1165 --- /dev/null +++ b/js/src/jit-test/tests/wasm/passive-segs-partial-mem.js @@ -0,0 +1,173 @@ +if (getBuildConfiguration("debug") && + (getBuildConfiguration("arm-simulator") || getBuildConfiguration("arm64-simulator") || + getBuildConfiguration("mips32-simulator") || getBuildConfiguration("mips64-simulator"))) +{ + // Will timeout, so just quit early. + quit(0); +} + +// Sundry test cases for the "partial write" bounds checking semantics. + +const PAGESIZE = 65536; + +// memory.fill: out of bounds, should not perform writes +// +// Arithmetic overflow of memory offset + len should not affect the behavior, we +// should still fill up to the limit. + +function mem_fill(min, max, shared, backup, write=backup*2) { + if (shared == "shared" && !sharedMemoryEnabled()) + return; + let ins = wasmEvalText( + `(module + (memory (export "mem") ${min} ${max} ${shared}) + (func (export "run") (param $offs i32) (param $val i32) (param $len i32) + (memory.fill (local.get $offs) (local.get $val) (local.get $len))))`); + // A fill past the end should throw *and* not have filled all the way up to + // the end + let offs = min*PAGESIZE - backup; + let val = 37; + assertErrorMessage(() => ins.exports.run(offs, val, write), + WebAssembly.RuntimeError, + /index out of bounds/); + let v = new Uint8Array(ins.exports.mem.buffer); + for (let i=0; i < backup; i++) + assertEq(v[offs+i], 0); + for (let i=0; i < offs; i++) + assertEq(v[i], 0); +} + +mem_fill(1, 1, "", 256); +mem_fill(1, 1, "", 257); +mem_fill(1, 1, "", 257, 0xFFFFFFFF); // offs + len overflows 32-bit + +mem_fill(2, 4, "shared", 256); +mem_fill(2, 4, "shared", 257); +mem_fill(2, 4, "shared", 257, 0xFFFFFFFF); // offs + len overflows 32-bit + +// memory.init: out of bounds of the memory or the segment, and should not perform +// the operation at all. +// +// Arithmetic overflow of memoffset + len or of bufferoffset + len should not +// affect the behavior. + +// Note, the length of the data segment is 16. +const mem_init_len = 16; + +function mem_init(min, max, shared, backup, write) { + if (shared == "shared" && !sharedMemoryEnabled()) + return; + let ins = wasmEvalText( + `(module + (memory (export "mem") ${min} ${max} ${shared}) + (data "\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42") + (func (export "run") (param $offs i32) (param $len i32) + (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))`); + // A fill writing past the end of the memory should throw *and* not have filled + // all the way up to the end. + // + // A fill reading past the end of the segment should throw *and* not have filled + // memory with as much data as was available. + let offs = min*PAGESIZE - backup; + assertErrorMessage(() => ins.exports.run(offs, write), + WebAssembly.RuntimeError, + /index out of bounds/); + let v = new Uint8Array(ins.exports.mem.buffer); + for (let i=0; i < min; i++) + assertEq(v[offs + i], 0); +} + +// We exceed the bounds of the memory but not of the data segment +mem_init(1, 1, "", Math.floor(mem_init_len/2), mem_init_len); +mem_init(1, 1, "", Math.floor(mem_init_len/2)+1, mem_init_len); +mem_init(2, 4, "shared", Math.floor(mem_init_len/2), mem_init_len); +mem_init(2, 4, "shared", Math.floor(mem_init_len/2)+1, mem_init_len); + +// We exceed the bounds of the data segment but not the memory +mem_init(1, 1, "", mem_init_len*4, mem_init_len*2-2); +mem_init(1, 1, "", mem_init_len*4-1, mem_init_len*2-1); +mem_init(2, 4, "shared", mem_init_len*4, mem_init_len*2-2); +mem_init(2, 4, "shared", mem_init_len*4-1, mem_init_len*2-1); + +// We arithmetically overflow the memory limit but not the segment limit +mem_init(1, "", "", Math.floor(mem_init_len/2), 0xFFFFFF00); + +// We arithmetically overflow the segment limit but not the memory limit +mem_init(1, "", "", PAGESIZE, 0xFFFFFFFC); + +// memory.copy: out of bounds of the memory for the source or target, and should +// not perform at all. Major cases: +// +// - non-overlapping regions +// - overlapping regions with src >= dest +// - overlapping regions with src == dest +// - overlapping regions with src < dest +// - arithmetic overflow on src addresses +// - arithmetic overflow on target addresses +// +// for each of those, +// +// - src address oob +// - target address oob +// - both oob + +function mem_copy(min, max, shared, srcOffs, targetOffs, len) { + if (shared == "shared" && !sharedMemoryEnabled()) + return; + let ins = wasmEvalText( + `(module + (memory (export "mem") ${min} ${max} ${shared}) + (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32) + (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))`); + + let v = new Uint8Array(ins.exports.mem.buffer); + + let copyDown = srcOffs < targetOffs; + let targetAvail = v.length - targetOffs; + let srcAvail = v.length - srcOffs; + let srcLim = srcOffs + Math.min(len, targetAvail, srcAvail); + + for (let i=srcOffs, j=0; i < srcLim; i++, j++) + v[i] = j; + assertErrorMessage(() => ins.exports.run(targetOffs, srcOffs, len), + WebAssembly.RuntimeError, + /index out of bounds/); + + for (var i=0, s=0; i < v.length; i++ ) { + if (i >= srcOffs && i < srcLim) { + assertEq(v[i], (s++) & 0xFF); + continue; + } + assertEq(v[i], 0); + } +} + +// OOB target address, nonoverlapping +mem_copy(1, 1, "", 0, PAGESIZE-20, 40); +mem_copy(1, 1, "", 0, PAGESIZE-21, 39); +mem_copy(2, 4, "shared", 0, 2*PAGESIZE-20, 40); +mem_copy(2, 4, "shared", 0, 2*PAGESIZE-21, 39); + +// OOB source address, nonoverlapping +mem_copy(1, 1, "", PAGESIZE-20, 0, 40); +mem_copy(1, 1, "", PAGESIZE-21, 0, 39); +mem_copy(2, 4, "shared", 2*PAGESIZE-20, 0, 40); +mem_copy(2, 4, "shared", 2*PAGESIZE-21, 0, 39); + +// OOB target address, overlapping, src < target +mem_copy(1, 1, "", PAGESIZE-50, PAGESIZE-20, 40); + +// OOB source address, overlapping, target < src +mem_copy(1, 1, "", PAGESIZE-20, PAGESIZE-50, 40); + +// OOB both, overlapping, including target == src +mem_copy(1, 1, "", PAGESIZE-30, PAGESIZE-20, 40); +mem_copy(1, 1, "", PAGESIZE-20, PAGESIZE-30, 40); +mem_copy(1, 1, "", PAGESIZE-20, PAGESIZE-20, 40); + +// Arithmetic overflow on source address. +mem_copy(1, "", "", PAGESIZE-20, 0, 0xFFFFF000); + +// Arithmetic overflow on target adddress is an overlapping case. +mem_copy(1, 1, "", PAGESIZE-0x1000, PAGESIZE-20, 0xFFFFFF00); + diff --git a/js/src/jit-test/tests/wasm/passive-segs-partial-table.js b/js/src/jit-test/tests/wasm/passive-segs-partial-table.js new file mode 100644 index 0000000000..2d2e8fcf72 --- /dev/null +++ b/js/src/jit-test/tests/wasm/passive-segs-partial-table.js @@ -0,0 +1,153 @@ +// Sundry test cases for the "partial write" bounds checking semantics. + +// table.init: out of bounds of the table or the element segment, and should +// not perform the operation at all. +// +// Arithmetic overflow of tableoffset + len or of segmentoffset + len should not +// affect the behavior. + +// Note, the length of the element segment is 16. +const tbl_init_len = 16; + +function tbl_init(min, max, backup, write, segoffs=0) { + let ins = wasmEvalText( + `(module + (table (export "tbl") ${min} ${max} funcref) + (elem func $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15) + (func $f0 (export "f0")) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func $f5 (export "f5")) + (func $f6 (export "f6")) + (func $f7 (export "f7")) + (func $f8 (export "f8")) + (func $f9 (export "f9")) + (func $f10 (export "f10")) + (func $f11 (export "f11")) + (func $f12 (export "f12")) + (func $f13 (export "f13")) + (func $f14 (export "f14")) + (func $f15 (export "f15")) + (func (export "run") (param $offs i32) (param $len i32) + (table.init 0 (local.get $offs) (i32.const ${segoffs}) (local.get $len))))`); + // A fill writing past the end of the table should throw *and* have filled + // all the way up to the end. + // + // A fill reading past the end of the segment should throw *and* have filled + // table with as much data as was available. + let offs = min - backup; + assertErrorMessage(() => ins.exports.run(offs, write), + WebAssembly.RuntimeError, + /index out of bounds/); + let tbl = ins.exports.tbl; + for (let i=0; i < min; i++) { + assertEq(tbl.get(i), null); + } +} + +// We exceed the bounds of the table but not of the element segment +tbl_init(tbl_init_len*2, tbl_init_len*4, Math.floor(tbl_init_len/2), tbl_init_len); +tbl_init(tbl_init_len*2, tbl_init_len*4, Math.floor(tbl_init_len/2)-1, tbl_init_len); + +// We exceed the bounds of the element segment but not the table +tbl_init(tbl_init_len*10, tbl_init_len*20, tbl_init_len*4, tbl_init_len*2); +tbl_init(tbl_init_len*10, tbl_init_len*20, tbl_init_len*4-1, tbl_init_len*2-1); + +// We arithmetically overflow the table limit but not the segment limit +tbl_init(tbl_init_len*4, tbl_init_len*4, tbl_init_len, 0xFFFFFFF0); + +// We arithmetically overflow the segment limit but not the table limit +tbl_init(tbl_init_len, tbl_init_len, tbl_init_len, 0xFFFFFFFC, Math.floor(tbl_init_len/2)); + +// table.copy: out of bounds of the table for the source or target, and should +// perform the operation at all. Major cases: +// +// - non-overlapping regions +// - overlapping regions with src > dest +// - overlapping regions with src == dest +// - overlapping regions with src < dest +// - arithmetic overflow on src addresses +// - arithmetic overflow on target addresses +// +// for each of those, +// +// - src address oob +// - target address oob +// - both oob +// +// Note we do not test the multi-table case here because that is part of the +// reftypes proposal; tests are in the gc/ subdirectory. + +const tbl_copy_len = 16; + +function tbl_copy(min, max, srcOffs, targetOffs, len) { + let ins = wasmEvalText( + `(module + (table (export "tbl") ${min} ${max} funcref) + (func $f0 (export "f0")) + (func $f1 (export "f1")) + (func $f2 (export "f2")) + (func $f3 (export "f3")) + (func $f4 (export "f4")) + (func $f5 (export "f5")) + (func $f6 (export "f6")) + (func $f7 (export "f7")) + (func $f8 (export "f8")) + (func $f9 (export "f9")) + (func $f10 (export "f10")) + (func $f11 (export "f11")) + (func $f12 (export "f12")) + (func $f13 (export "f13")) + (func $f14 (export "f14")) + (func $f15 (export "f15")) + (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32) + (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))`); + + let tbl = ins.exports.tbl; + + let copyDown = srcOffs < targetOffs; + let targetAvail = tbl.length - targetOffs; + let srcAvail = tbl.length - srcOffs; + let srcLim = srcOffs + Math.min(len, targetAvail, srcAvail); + + for (let i=srcOffs, j=0; i < srcLim; i++, j++) + tbl.set(i, ins.exports["f" + j]); + assertErrorMessage(() => ins.exports.run(targetOffs, srcOffs, len), + WebAssembly.RuntimeError, + /index out of bounds/); + + for (var i=0, s=0; i < tbl.length; i++ ) { + if (i >= srcOffs && i < srcLim) { + assertEq(tbl.get(i), ins.exports["f" + (s++)]); + continue; + } + assertEq(tbl.get(i), null); + } +} + +// OOB target address, nonoverlapping +tbl_copy(tbl_copy_len*2, tbl_copy_len*4, 0, Math.floor(1.5*tbl_copy_len), tbl_copy_len); +tbl_copy(tbl_copy_len*2, tbl_copy_len*4, 0, Math.floor(1.5*tbl_copy_len)-1, tbl_copy_len-1); + +// OOB source address, nonoverlapping +tbl_copy(tbl_copy_len*2, tbl_copy_len*4, Math.floor(1.5*tbl_copy_len), 0, tbl_copy_len); +tbl_copy(tbl_copy_len*2, tbl_copy_len*4, Math.floor(1.5*tbl_copy_len)-1, 0, tbl_copy_len-1); + +// OOB target address, overlapping, src < target +tbl_copy(tbl_copy_len*2, tbl_copy_len*4, tbl_copy_len-5, Math.floor(1.5*tbl_copy_len), tbl_copy_len); + +// OOB source address, overlapping, target < src +tbl_copy(tbl_copy_len*2, tbl_copy_len*4, Math.floor(1.5*tbl_copy_len), tbl_copy_len-5, tbl_copy_len); + +// OOB both, overlapping, including src == target +tbl_copy(tbl_copy_len*2, tbl_copy_len*4, tbl_copy_len+5, Math.floor(1.5*tbl_copy_len), tbl_copy_len); +tbl_copy(tbl_copy_len*2, tbl_copy_len*4, Math.floor(1.5*tbl_copy_len), tbl_copy_len+5, tbl_copy_len); +tbl_copy(tbl_copy_len*2, tbl_copy_len*4, tbl_copy_len+5, tbl_copy_len+5, tbl_copy_len); + +// Arithmetic overflow on source address. +tbl_copy(tbl_copy_len*8, tbl_copy_len*8, tbl_copy_len*7, 0, 0xFFFFFFE0); + +// Arithmetic overflow on target adddress is an overlapping case. +tbl_copy(tbl_copy_len*8, tbl_copy_len*8, 0, tbl_copy_len*7, 0xFFFFFFE0); diff --git a/js/src/jit-test/tests/wasm/profiling.js b/js/src/jit-test/tests/wasm/profiling.js new file mode 100644 index 0000000000..4bbab87e25 --- /dev/null +++ b/js/src/jit-test/tests/wasm/profiling.js @@ -0,0 +1,416 @@ +// |jit-test| skip-if: !WasmHelpers.isSingleStepPropfilingEnabled + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Table = WebAssembly.Table; + +const { + assertEqImpreciseStacks, + assertEqPreciseStacks, + startProfiling, + endProfiling +} = WasmHelpers; + +function test(code, importObj, expectedStacks) +{ + enableGeckoProfiling(); + + var f = wasmEvalText(code, importObj).exports[""]; + startProfiling(); + f(); + assertEqImpreciseStacks(endProfiling(), expectedStacks); + + disableGeckoProfiling(); +} + +test( +`(module + (func (result i32) (i32.const 42)) + (export "" (func 0)) +)`, +{}, +["", ">", "0,>", ">", ""]); + +test( +`(module + (func (result i32) (i32.add (call 1) (i32.const 1))) + (func (result i32) (i32.const 42)) + (export "" (func 0)) +)`, +{}, +["", ">", "0,>", "1,0,>", "0,>", ">", ""]); + +test( +`(module + (func $foo (call_indirect (type 0) (i32.const 0))) + (func $bar) + (table funcref (elem $bar)) + (export "" (func $foo)) +)`, +{}, +["", ">", "0,>", "1,0,>", "0,>", ">", ""]); + +test( +`(module + (import $foo "" "foo") + (table funcref (elem $foo)) + (func $bar (call_indirect (type 0) (i32.const 0))) + (export "" (func $bar)) +)`, +{"":{foo:()=>{}}}, +["", ">", "1,>", "0,1,>", "<,0,1,>", "0,1,>", "1,>", ">", ""]); + +test(`(module + (import $f32 "Math" "sin" (param f32) (result f32)) + (func (export "") (param f32) (result f32) + local.get 0 + call $f32 + ) +)`, +this, +["", ">", "1,>", "<,1,>", "1,>", ">", ""]); + +if (getBuildConfiguration("arm-simulator")) { + // On ARM, some int64 operations are calls to C++. + for (let op of ['div_s', 'rem_s', 'div_u', 'rem_u']) { + test(`(module + (func (export "") (param i32) (result i32) + local.get 0 + i64.extend_i32_s + i64.const 0x1a2b3c4d5e6f + i64.${op} + i32.wrap_i64 + ) + )`, + this, + ["", ">", "0,>", "<,0,>", `i64.${op},0,>`, "<,0,>", "0,>", ">", ""], + ); + } +} + +// memory.size is a callout. +test(`(module + (memory 1) + (func (export "") (result i32) + memory.size + ) +)`, +this, +["", ">", "0,>", "<,0,>", "memory.size,0,>", "<,0,>", "0,>", ">", ""], +); + +// memory.grow is a callout. +test(`(module + (memory 1) + (func (export "") (result i32) + i32.const 1 + memory.grow + ) +)`, +this, +["", ">", "0,>", "<,0,>", "memory.grow,0,>", "<,0,>", "0,>", ">", ""], +); + +// A few math builtins. +for (let type of ['f32', 'f64']) { + for (let func of ['ceil', 'floor', 'nearest', 'trunc']) { + test(`(module + (func (export "") (param ${type}) (result ${type}) + local.get 0 + ${type}.${func} + ) + )`, + this, + ["", ">", "0,>", "<,0,>", `${type}.${func},0,>`, "<,0,>", "0,>", ">", ""]); + } +} + +(function() { + // Error handling. + function testError(code, error, expect) + { + enableGeckoProfiling(); + var f = wasmEvalText(code).exports[""]; + enableSingleStepProfiling(); + assertThrowsInstanceOf(f, error); + assertEqImpreciseStacks(disableSingleStepProfiling(), expect); + disableGeckoProfiling(); + } + + testError( + `(module + (func $foo (unreachable)) + (func (export "") (call $foo)) + )`, + WebAssembly.RuntimeError, + ["", ">", "1,>", "0,1,>", "1,>", "", ">", ""]); + + testError( + `(module + (type $good (func)) + (type $bad (func (param i32))) + (func $foo (call_indirect (type $bad) (i32.const 1) (i32.const 0))) + (func $bar (type $good)) + (table funcref (elem $bar)) + (export "" (func $foo)) + )`, + WebAssembly.RuntimeError, + ["", ">", "0,>", "1,0,>", ">", "", ">", ""]); +})(); + +(function() { + // Tables fun. + var e = wasmEvalText(` + (module + (func $foo (result i32) (i32.const 42)) + (export "foo" (func $foo)) + (func $bar (result i32) (i32.const 13)) + (table 10 funcref) + (elem (i32.const 0) $foo $bar) + (export "tbl" (table 0)) + )`).exports; + assertEq(e.foo(), 42); + assertEq(e.tbl.get(0)(), 42); + assertEq(e.tbl.get(1)(), 13); + + enableGeckoProfiling(); + enableSingleStepProfiling(); + assertEq(e.tbl.get(0)(), 42); + assertEqImpreciseStacks(disableSingleStepProfiling(), ["", ">", "0,>", ">", ""]); + disableGeckoProfiling(); + + assertEq(e.foo(), 42); + assertEq(e.tbl.get(0)(), 42); + assertEq(e.tbl.get(1)(), 13); + + enableGeckoProfiling(); + enableSingleStepProfiling(); + assertEq(e.tbl.get(1)(), 13); + assertEqImpreciseStacks(disableSingleStepProfiling(), ["", ">", "1,>", ">", ""]); + disableGeckoProfiling(); + + assertEq(e.tbl.get(0)(), 42); + assertEq(e.tbl.get(1)(), 13); + assertEq(e.foo(), 42); + + enableGeckoProfiling(); + enableSingleStepProfiling(); + assertEq(e.foo(), 42); + assertEq(e.tbl.get(1)(), 13); + assertEqImpreciseStacks(disableSingleStepProfiling(), ["", ">", "0,>", ">", "", ">", "1,>", ">", ""]); + disableGeckoProfiling(); + + var e2 = wasmEvalText(` + (module + (type $v2i (func (result i32))) + (import "a" "b" (table 10 funcref)) + (elem (i32.const 2) $bar) + (func $bar (result i32) (i32.const 99)) + (func $baz (param $i i32) (result i32) (call_indirect (type $v2i) (local.get $i))) + (export "baz" (func $baz)) + )`, {a:{b:e.tbl}}).exports; + + enableGeckoProfiling(); + enableSingleStepProfiling(); + assertEq(e2.baz(0), 42); + assertEqImpreciseStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]); + disableGeckoProfiling(); + + enableGeckoProfiling(); + enableSingleStepProfiling(); + assertEq(e2.baz(1), 13); + assertEqImpreciseStacks(disableSingleStepProfiling(), ["", ">", "1,>", "1,1,>", "1,>", ">", ""]); + disableGeckoProfiling(); + + enableGeckoProfiling(); + enableSingleStepProfiling(); + assertEq(e2.baz(2), 99); + assertEqImpreciseStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]); + disableGeckoProfiling(); +})(); + +(function() { + // Optimized wasm->wasm import. + var m1 = new Module(wasmTextToBinary(`(module + (func $foo (result i32) (i32.const 42)) + (export "foo" (func $foo)) + )`)); + var m2 = new Module(wasmTextToBinary(`(module + (import $foo "a" "foo" (result i32)) + (func $bar (result i32) (call $foo)) + (export "bar" (func $bar)) + )`)); + + // Instantiate while not active: + var e1 = new Instance(m1).exports; + var e2 = new Instance(m2, {a:e1}).exports; + enableGeckoProfiling(); + enableSingleStepProfiling(); + assertEq(e2.bar(), 42); + assertEqImpreciseStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]); + disableGeckoProfiling(); + assertEq(e2.bar(), 42); + + // Instantiate while active: + enableGeckoProfiling(); + var e3 = new Instance(m1).exports; + var e4 = new Instance(m2, {a:e3}).exports; + enableSingleStepProfiling(); + assertEq(e4.bar(), 42); + assertEqImpreciseStacks(disableSingleStepProfiling(), ["", ">", "1,>", "0,1,>", "1,>", ">", ""]); + disableGeckoProfiling(); + assertEq(e4.bar(), 42); +})(); + +(function() { + // FFIs test. + let prevOptions = getJitCompilerOptions(); + + // Skip tests if baseline isn't enabled, since the stacks might differ by + // a few instructions. + if (prevOptions['baseline.enable'] === 0) + return; + + setJitCompilerOption("baseline.warmup.trigger", 10); + + enableGeckoProfiling(); + + var m = new Module(wasmTextToBinary(`(module + (import $ffi "a" "ffi" (param i32) (result i32)) + + (import $missingOneArg "a" "sumTwo" (param i32) (result i32)) + + (func (export "foo") (param i32) (result i32) + local.get 0 + call $ffi) + + (func (export "id") (param i32) (result i32) + local.get 0 + call $missingOneArg + ) + )`)); + + var valueToConvert = 0; + function ffi(n) { + new Error().stack; // enter VM to clobber FP register. + if (n == 1337) { return valueToConvert }; + return 42; + } + + function sumTwo(a, b) { + return (a|0)+(b|0)|0; + } + + // Baseline compile ffi. + for (var i = 20; i --> 0;) { + ffi(i); + sumTwo(i-1, i+1); + } + + var imports = { + a: { + ffi, + sumTwo + } + }; + + var i = new Instance(m, imports).exports; + + // Enable the jit exit. + assertEq(i.foo(0), 42); + assertEq(i.id(13), 13); + + // Test normal conditions. + enableSingleStepProfiling(); + assertEq(i.foo(0), 42); + assertEqImpreciseStacks(disableSingleStepProfiling(), ["", ">", "2,>", "<,2,>", + // Losing stack information while the JIT func prologue sets profiler + // virtual FP. + "", + // Callee time. + "<,2,>", + // Losing stack information while we're exiting JIT func epilogue and + // recovering wasm FP. + "", + // Back into the jit exit (frame info has been recovered). + "<,2,>", + // Normal unwinding. + "2,>", ">", ""]); + + // Test rectifier frame. + enableSingleStepProfiling(); + assertEq(i.id(100), 100); + assertEqImpreciseStacks(disableSingleStepProfiling(), ["", ">", "3,>", "<,3,>", + // Rectifier frame time is spent here (lastProfilingFrame has not been + // set). + "", + "<,3,>", + // Rectifier frame unwinding time is spent here. + "", + "<,3,>", + "3,>", ">", ""]); + + // Test OOL coercion path. + valueToConvert = 2**31; + + enableSingleStepProfiling(); + assertEq(i.foo(1337), -(2**31)); + assertEqImpreciseStacks(disableSingleStepProfiling(), ["", ">", "2,>", "<,2,>", "", "<,2,>", "", + // Back into the jit exit (frame info has been recovered). + // Inline conversion fails, we skip to the OOL path, call from there + // and get back to the jit exit. + "<,2,>", + // Normal unwinding. + "2,>", ">", ""]); + + disableGeckoProfiling(); + setJitCompilerOption("baseline.warmup.trigger", prevOptions["baseline.warmup.trigger"]); +})(); + +// Make sure it's possible to single-step through call through debug-enabled code. +(function() { + enableGeckoProfiling(); + + let g = newGlobal(''); + let dbg = new Debugger(g); + dbg.onEnterFrame = () => {}; + enableSingleStepProfiling(); + g.eval(` + var code = wasmTextToBinary('(module (func (export "run") (result i32) i32.const 42))'); + var i = new WebAssembly.Instance(new WebAssembly.Module(code)); + assertEq(i.exports.run(), 42); + `); + + disableSingleStepProfiling(); + disableGeckoProfiling(); +})(); + +// Ion->wasm calls. +let func = wasmEvalText(`(module + (func $inner (result i32) (param i32) (param i32) + local.get 0 + local.get 1 + i32.add + ) + (func (export "add") (result i32) (param i32) (param i32) + local.get 0 + local.get 1 + call $inner + ) +)`).exports.add; + +(function() { + enableGeckoProfiling(); + // 10 is enough in ion eager mode. + for (let i = 0; i < 10; i++) { + enableSingleStepProfiling(); + let res = func(i - 1, i + 1); + assertEqPreciseStacks(disableSingleStepProfiling(), [ + ['', '>', '1,>', '0,1,>' , '1,>', '>', ''], // slow entry + ['', '!>', '1,!>', '0,1,!>' , '1,!>', '!>', ''], // fast entry + ['', '1', '0,1' , '1', ''], // inlined jit call + ]); + assertEq(res, i+i); + } + disableGeckoProfiling(); +})(); diff --git a/js/src/jit-test/tests/wasm/prototypes.js b/js/src/jit-test/tests/wasm/prototypes.js new file mode 100644 index 0000000000..2c57009b2c --- /dev/null +++ b/js/src/jit-test/tests/wasm/prototypes.js @@ -0,0 +1,27 @@ +class _Module extends WebAssembly.Module {} +class _Instance extends WebAssembly.Instance {} +class _Memory extends WebAssembly.Memory {} +class _Table extends WebAssembly.Table {} +class _Global extends WebAssembly.Global {} + +let binary = wasmTextToBinary('(module)'); + +let module = new _Module(binary); +assertEq(module instanceof _Module, true); +assertEq(module instanceof WebAssembly.Module, true); + +let instance = new _Instance(module); +assertEq(instance instanceof _Instance, true); +assertEq(instance instanceof WebAssembly.Instance, true); + +let memory = new _Memory({initial: 0, maximum: 1}); +assertEq(memory instanceof _Memory, true); +assertEq(memory instanceof WebAssembly.Memory, true); + +let table = new _Table({initial: 0, element: 'anyfunc'}); +assertEq(table instanceof _Table, true); +assertEq(table instanceof WebAssembly.Table, true); + +let global = new _Global({value: 'i32', mutable: false}, 0); +assertEq(global instanceof _Global, true); +assertEq(global instanceof WebAssembly.Global, true); diff --git a/js/src/jit-test/tests/wasm/ref-types/directives.txt b/js/src/jit-test/tests/wasm/ref-types/directives.txt new file mode 100644 index 0000000000..ed90b6bd5f --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); test-also=--wasm-test-serialization; include:wasm.js diff --git a/js/src/jit-test/tests/wasm/ref-types/externref-boxing.js b/js/src/jit-test/tests/wasm/ref-types/externref-boxing.js new file mode 100644 index 0000000000..854f3e7815 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/externref-boxing.js @@ -0,0 +1,140 @@ +// Moving a JS value through a wasm externref is a pair of boxing/unboxing +// conversions that leaves the value unchanged. There are many cases, +// along these axes: +// +// - global variables +// - tables +// - function parameters and returns +// - struct fields [for the gc feature], see externref-boxing-struct.js + +// Global variables can receive values via several mechanisms: +// +// - on initialization when created from JS +// - on initialization when created in Wasm, from an imported global +// - through the "value" property if the value is mutable +// - through the global.set wasm instruction, ditto +// +// Their values can be obtained in several ways: +// +// - through the "value" property +// - through the global.get wasm instruction +// - read when other globals are initialized from them + +// Set via initialization and read via 'value' + +for (let v of WasmExternrefValues) +{ + let g = new WebAssembly.Global({value: "externref"}, v); + assertEq(g.value, v); +} + +// Set via 'value' and read via 'value' + +for (let v of WasmExternrefValues) +{ + let g = new WebAssembly.Global({value: "externref", mutable: true}); + g.value = v; + assertEq(g.value, v); +} + +// Set via initialization, then read via global.get and returned + +for (let v of WasmExternrefValues) +{ + let g = new WebAssembly.Global({value: "externref"}, v); + let ins = wasmEvalText( + `(module + (import "m" "g" (global $glob externref)) + (func (export "f") (result externref) + (global.get $glob)))`, + {m:{g}}); + assertEq(ins.exports.f(), v); +} + +// Set via global.set, then read via 'value' + +for (let v of WasmExternrefValues) +{ + let g = new WebAssembly.Global({value: "externref", mutable: true}); + let ins = wasmEvalText( + `(module + (import "m" "g" (global $glob (mut externref))) + (func (export "f") (param $v externref) + (global.set $glob (local.get $v))))`, + {m:{g}}); + ins.exports.f(v); + assertEq(g.value, v); +} + +// Tables of externref can receive values via several mechanisms: +// +// - through WebAssembly.Table.prototype.set() +// - through the table.set, table.copy, and table.grow instructions +// - through table.fill +// - through WebAssembly.Table.prototype.grow() +// +// Their values can be read in several ways: +// +// - through WebAssembly.Table.prototype.get() +// - through the table.get and table.copy instructions +// +// (Note, tables are always initialized to null when created from JS) + +// .set() and .get() + +for (let v of WasmExternrefValues) +{ + let t = new WebAssembly.Table({element: "externref", initial: 10}); + t.set(3, v); + assertEq(t.get(3), v); +} + +// write with table.set, read with .get() + +for (let v of WasmExternrefValues) +{ + let t = new WebAssembly.Table({element: "externref", initial: 10}); + let ins = wasmEvalText( + `(module + (import "m" "t" (table $t 10 externref)) + (func (export "f") (param $v externref) + (table.set $t (i32.const 3) (local.get $v))))`, + {m:{t}}); + ins.exports.f(v); + assertEq(t.get(3), v); +} + +// write with .set(), read with table.get + +for (let v of WasmExternrefValues) +{ + let t = new WebAssembly.Table({element: "externref", initial: 10}); + let ins = wasmEvalText( + `(module + (import "m" "t" (table $t 10 externref)) + (func (export "f") (result externref) + (table.get $t (i32.const 3))))`, + {m:{t}}); + t.set(3, v); + assertEq(ins.exports.f(), v); +} + +// Imported JS functions can receive externref values as parameters and return +// them. + +for (let v of WasmExternrefValues) +{ + let returner = function () { return v; }; + let receiver = function (w) { assertEq(w, v); }; + let ins = wasmEvalText( + `(module + (import "m" "returner" (func $returner (result externref))) + (import "m" "receiver" (func $receiver (param externref))) + (func (export "test_returner") (result externref) + (call $returner)) + (func (export "test_receiver") (param $v externref) + (call $receiver (local.get $v))))`, + {m:{returner, receiver}}); + assertEq(ins.exports.test_returner(), v); + ins.exports.test_receiver(v); +} diff --git a/js/src/jit-test/tests/wasm/ref-types/externref-fastpaths.js b/js/src/jit-test/tests/wasm/ref-types/externref-fastpaths.js new file mode 100644 index 0000000000..14349a15d5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/externref-fastpaths.js @@ -0,0 +1,100 @@ +setJitCompilerOption("baseline.warmup.trigger", 5); +setJitCompilerOption("ion.warmup.trigger", 10); + +var iter = 1000; +let objs = WasmExternrefValues; +var index = 0; + +// Tests that: +// +// * wasm->js calls along the fast path unbox externref correctly on entry to JS. +// This is tested by JS observing that the value that it receives is the same +// that was passed into wasm in the first place. +// +// * js->wasm calls along the fast path box JS values into externref correctly on +// entry into wasm. This is tested by the precise same test as the case +// above. +// +// * js->wasm calls along the fast path unbox externref correctly on return from +// wasm. This is tested by returning the passed-in value and observing in +// JS that the value is the same as the value that was passed in. + +// `p` will be a register argument on most platforms. + +function js_externref_regarg(p) { + if (p !== objs[index] && !Number.isNaN(objs[index])) + throw new Error("Bad argument at " + index); +} + +// `p` will be a stack argument on all platforms. In the internal ABI, the +// externref parameter ends up in a stack slot in the call to js_externref_stackarg, +// thus we're testing a different path in the stub code. (This holds for +// architectures with up to 10 register arguments, which covers all tier-1 +// platforms as of 2019.) + +function js_externref_stackarg(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, p) { + if (p !== objs[index] && !Number.isNaN(objs[index])) + throw new Error("Bad argument at " + index); +} + +var ins1 = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + `(module + (import "" "f" (func $f (param externref))) + (import "" "g" (func $g (param i32) (param i32) (param i32) (param i32) (param i32) + (param i32) (param i32) (param i32) (param i32) (param i32) + (param externref))) + (func (export "run1") (param externref) (result externref) + (call $f (local.get 0)) + (local.get 0)) + (func (export "run2") (param externref) (result externref) + (call $g (i32.const 0) (i32.const 1) (i32.const 2) (i32.const 3) (i32.const 4) + (i32.const 5) (i32.const 6) (i32.const 7) (i32.const 8) (i32.const 9) + (local.get 0)) + (local.get 0)))`)), + {"":{f: js_externref_regarg, g: js_externref_stackarg}}); + +index = 0; +for ( let i=0; i < iter; i++ ) { + let res = ins1.exports.run1(objs[index]); + if (res !== objs[index] && !Number.isNaN(objs[index])) + throw new Error("Bad return at " + index); + index = (index + 1) % objs.length; +} + +index = 0; +for ( let i=0; i < iter; i++ ) { + let res = ins1.exports.run2(objs[index]); + if (res !== objs[index] && !Number.isNaN(objs[index])) + throw new Error("Bad return at " + index); + index = (index + 1) % objs.length; +} + +// Test that: +// +// * wasm->js calls along the fast path box JS values into externref correctly on +// return from JS. This is tested by returing a value from JS through wasm +// back into JS and then checking that the object is the same as the one that +// was returned. + +function js_returns_externref(p) { + return objs[index]; +} + +var ins2 = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + `(module + (import "" "f" (func $f (result externref))) + (import "" "g" (func $g (param externref))) + (func (export "run1") (result externref) + (local $tmp externref) + (local.set $tmp (call $f)) + (call $g (local.get $tmp)) + (local.get $tmp)))`)), + {"":{f: js_returns_externref, g: js_externref_regarg}}); + +index = 0; +for ( let i=0; i < iter; i++ ) { + let res = ins2.exports.run1(); + if (res !== objs[index] && !Number.isNaN(objs[index])) + throw new Error("Bad return at " + index); + index = (index + 1) % objs.length; +} diff --git a/js/src/jit-test/tests/wasm/ref-types/externref-global-object.js b/js/src/jit-test/tests/wasm/ref-types/externref-global-object.js new file mode 100644 index 0000000000..806896e9b8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/externref-global-object.js @@ -0,0 +1,91 @@ +// |jit-test| skip-if: typeof WebAssembly.Global !== 'function' + +// Dummy object. +function Baguette(calories) { + this.calories = calories; +} + +assertEq(new WebAssembly.Global({value: "externref"}) instanceof WebAssembly.Global, true); + +(function() { + // Test initialization without a value. + let g = new WebAssembly.Global({value: "externref"}); + assertEq(g.value, void 0); + assertErrorMessage(() => g.value = 42, TypeError, /immutable global/); +})(); + +(function() { + // Test initialization with a value. + let g = new WebAssembly.Global({value: "externref"}, null); + assertEq(g.value, null); + assertErrorMessage(() => g.value = 42, TypeError, /immutable global/); + + let obj = {}; + g = new WebAssembly.Global({value: "externref"}, obj); + assertEq(g.value, obj); + assertErrorMessage(() => g.value = 42, TypeError, /immutable global/); + + g = new WebAssembly.Global({value: "externref"}, 1337); + assertEq(typeof g.value, "number"); + assertEq(+g.value, 1337); + + g = new WebAssembly.Global({value: "externref"}, 13.37); + assertEq(typeof g.value, "number"); + assertEq(+g.value, 13.37); + + g = new WebAssembly.Global({value: "externref"}, "string"); + assertEq(typeof g.value, "string"); + assertEq(g.value.toString(), "string"); + + g = new WebAssembly.Global({value: "externref"}, true); + assertEq(typeof g.value, "boolean"); + assertEq(!!g.value, true); + + g = new WebAssembly.Global({value: "externref"}, Symbol("status")); + assertEq(typeof g.value, "symbol"); + assertEq(g.value.toString(), "Symbol(status)"); + + g = new WebAssembly.Global({value: "externref"}, undefined); + assertEq(g.value, undefined); +})(); + +(function() { + // Test mutable property and assignment. + let g = new WebAssembly.Global({value: "externref", mutable: true}, null); + assertEq(g.value, null); + + let obj = { x: 42 }; + g.value = obj; + assertEq(g.value, obj); + assertEq(g.value.x, 42); + + obj = null; + assertEq(g.value.x, 42); + + let otherObj = { y : 35 }; + g.value = otherObj; + assertEq(g.value, otherObj); +})(); + +(function() { + // Test tracing. + let nom = new Baguette(1); + let g = new WebAssembly.Global({value: "externref"}, nom); + nom = null; + gc(); + assertEq(g.value.calories, 1); +})(); + +var global = new WebAssembly.Global({ value: "externref", mutable: true }, null); + +// GCZeal mode 2 implies that every allocation (second parameter = every single +// allocation) will trigger a full GC. +gczeal(2, 1); + +{ + let nomnom = new Baguette(42); + global.value = nomnom; + nomnom = null; +} +new Baguette(); +assertEq(global.value.calories, 42); diff --git a/js/src/jit-test/tests/wasm/ref-types/externref-global-postbarrier.js b/js/src/jit-test/tests/wasm/ref-types/externref-global-postbarrier.js new file mode 100644 index 0000000000..06d9521504 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/externref-global-postbarrier.js @@ -0,0 +1,89 @@ +const { startProfiling, endProfiling, assertEqPreciseStacks, isSingleStepProfilingEnabled } = WasmHelpers; + +// Dummy constructor. +function Baguette(calories) { + this.calories = calories; +} + +// Ensure the baseline compiler sync's before the postbarrier. +(function() { + wasmEvalText(`(module + (global (mut externref) (ref.null extern)) + (func (export "f") + global.get 0 + ref.null extern + global.set 0 + global.set 0 + ) + )`).exports.f(); +})(); + +let exportsPlain = wasmEvalText(`(module + (global i32 (i32.const 42)) + (global $g (mut externref) (ref.null extern)) + (func (export "set") (param externref) local.get 0 global.set $g) + (func (export "get") (result externref) global.get $g) +)`).exports; + +let exportsObj = wasmEvalText(`(module + (global $g (export "g") (mut externref) (ref.null extern)) + (func (export "set") (param externref) local.get 0 global.set $g) + (func (export "get") (result externref) global.get $g) +)`).exports; + +// 7 => Generational GC zeal. +gczeal(7, 1); + +for (var i = 0; i < 100; i++) { + new Baguette(i); +} + +function test(exports) { + // Test post-write barrier in wasm code. + { + let nomnom = new Baguette(15); + exports.set(nomnom); + nomnom = null; + } + new Baguette(); + assertEq(exports.get().calories, 15); +} + +test(exportsPlain); +test(exportsObj); + +// Test stacks reported in profiling mode in a separate way, to not perturb +// the behavior of the tested functions. +if (!isSingleStepProfilingEnabled) + quit(0); + +enableGeckoProfiling(); + +const EXPECTED_STACKS = [ + // Expected output for (simulator+baseline). + ['', '!>', '0,!>', '<,0,!>', 'GC postbarrier,0,!>', + '<,0,!>', '0,!>', '!>', ''], + + // Expected output for (simulator+via-Ion). + ['', '!>', '0,!>', '<,0,!>', 'filtering GC postbarrier,0,!>', + '<,0,!>', '0,!>', '!>', ''], + + // Expected output for other configurations. + ['', '!>', '0,!>', '!>', ''], +]; + +function testStacks(exports) { + // Test post-write barrier in wasm code. + { + let nomnom = new Baguette(15); + startProfiling(); + exports.set(nomnom); + assertEqPreciseStacks(endProfiling(), EXPECTED_STACKS); + nomnom = null; + } + new Baguette(); + assertEq(exports.get().calories, 15); +} + +testStacks(exportsPlain); +testStacks(exportsObj); diff --git a/js/src/jit-test/tests/wasm/ref-types/externref-global-prebarrier.js b/js/src/jit-test/tests/wasm/ref-types/externref-global-prebarrier.js new file mode 100644 index 0000000000..139f71e758 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/externref-global-prebarrier.js @@ -0,0 +1,61 @@ +// Do not run the test if we're jit-compiling JS, since it's the wasm frames +// we're interested in and eager JS compilation can upset the test. + +opts = getJitCompilerOptions(); +if (opts['ion.enable'] || opts['baseline.enable']) + quit(); + +const { startProfiling, endProfiling, assertEqPreciseStacks, isSingleStepProfilingEnabled } = WasmHelpers; + +let e = wasmEvalText(`(module + (global $g (mut externref) (ref.null extern)) + (func (export "set") (param externref) local.get 0 global.set $g) +)`).exports; + +let obj = { field: null }; + +// GCZeal mode 4 implies that prebarriers are being verified at many +// locations in the interpreter, during interrupt checks, etc. It can be ultra +// slow, so disable it with gczeal(0) when it's not strictly needed. +gczeal(4, 1); +e.set(obj); +e.set(null); +gczeal(0); + +if (!isSingleStepProfilingEnabled) { + quit(0); +} + +enableGeckoProfiling(); +startProfiling(); +gczeal(4, 1); +e.set(obj); +gczeal(0); +assertEqPreciseStacks( + endProfiling(), + [ + // Expected output for (simulator+via-Ion/baseline). + ['', '!>', '0,!>', '<,0,!>', 'GC postbarrier,0,!>', + '<,0,!>', '0,!>', '!>', ''], + + // Expected output for other configurations. + ['', '!>', '0,!>', '!>', ''], + ]); + +startProfiling(); +gczeal(4, 1); +e.set(null); +gczeal(0); + +// We're losing stack info in the prebarrier code. +assertEqPreciseStacks( + endProfiling(), + [ + // Expected output for (simulator+via-Ion/baseline). + ['', '!>', '0,!>', '', '0,!>', '<,0,!>', 'GC postbarrier,0,!>', + '<,0,!>', '0,!>', '!>', ''], + + // Expected output for other configurations. + ['', '!>', '0,!>', '', '0,!>', '!>', ''], + ]); + diff --git a/js/src/jit-test/tests/wasm/ref-types/externref-val-tracing.js b/js/src/jit-test/tests/wasm/ref-types/externref-val-tracing.js new file mode 100644 index 0000000000..3c7e596d12 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/externref-val-tracing.js @@ -0,0 +1,10 @@ +gczeal(14, 1); +let { exports } = wasmEvalText(`(module + (global $externref (import "glob" "externref") externref) + (func (export "get") (result externref) global.get $externref) +)`, { + glob: { + externref: { sentinel: "lol" }, + } +}); +assertEq(exports.get().sentinel, "lol"); diff --git a/js/src/jit-test/tests/wasm/ref-types/externref.js b/js/src/jit-test/tests/wasm/ref-types/externref.js new file mode 100644 index 0000000000..37a9de1da0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/externref.js @@ -0,0 +1,482 @@ +// Dummy constructor. +function Baguette(calories) { + this.calories = calories; +} + +// Type checking. + +const { validate, CompileError } = WebAssembly; + +assertErrorMessage(() => wasmEvalText(`(module + (func (result externref) + i32.const 42 + ) +)`), CompileError, mismatchError('i32', 'externref')); + +assertErrorMessage(() => wasmEvalText(`(module + (func (result externref) + i32.const 0 + ref.null extern + i32.const 42 + select (result externref) + ) +)`), CompileError, /type mismatch/); + +assertErrorMessage(() => wasmEvalText(`(module + (func (result i32) + ref.null extern + if + i32.const 42 + end + ) +)`), CompileError, mismatchError('externref', 'i32')); + + +// Basic compilation tests. + +let simpleTests = [ + "(module (func (drop (ref.null extern))))", + "(module (func $test (local externref)))", + "(module (func $test (param externref)))", + "(module (func $test (result externref) (ref.null extern)))", + "(module (func $test (block (result externref) (unreachable)) unreachable))", + "(module (func $test (result i32) (local externref) (ref.is_null (local.get 0))))", + `(module (import "a" "b" (func (param externref))))`, + `(module (import "a" "b" (func (result externref))))`, + `(module (global externref (ref.null extern)))`, + `(module (global (mut externref) (ref.null extern)))`, +]; + +for (let src of simpleTests) { + wasmEvalText(src, {a:{b(){}}}); + assertEq(validate(wasmTextToBinary(src)), true); +} + +// Basic behavioral tests. + +let { exports } = wasmEvalText(`(module + (func (export "is_null") (result i32) + ref.null extern + ref.is_null + ) + + (func $sum (param i32) (result i32) + local.get 0 + i32.const 42 + i32.add + ) + + (func (export "is_null_spill") (result i32) + ref.null extern + i32.const 58 + call $sum + drop + ref.is_null + ) + + (func (export "is_null_local") (result i32) (local externref) + ref.null extern + local.set 0 + i32.const 58 + call $sum + drop + local.get 0 + ref.is_null + ) + )`); + +assertEq(exports.is_null(), 1); +assertEq(exports.is_null_spill(), 1); +assertEq(exports.is_null_local(), 1); + +// ExternRef param and result in wasm functions. + +exports = wasmEvalText(`(module + (func (export "is_null") (param $ref externref) (result i32) + local.get $ref + ref.is_null + ) + + (func (export "ref_or_null") (param $ref externref) (param $selector i32) (result externref) + local.get $ref + ref.null extern + local.get $selector + select (result externref) + ) + + (func $recursive (export "nested") (param $ref externref) (param $i i32) (result externref) + ;; i == 10 => ret $ref + local.get $i + i32.const 10 + i32.eq + if + local.get $ref + return + end + + local.get $ref + + local.get $i + i32.const 1 + i32.add + + call $recursive + ) +)`).exports; + +assertEq(exports.is_null(undefined), 0); +assertEq(exports.is_null(null), 1); +assertEq(exports.is_null({}), 0); +assertEq(exports.is_null("hi"), 0); +assertEq(exports.is_null(3), 0); +assertEq(exports.is_null(3.5), 0); +assertEq(exports.is_null(true), 0); +assertEq(exports.is_null(Symbol("croissant")), 0); +assertEq(exports.is_null(new Baguette(100)), 0); + +let baguette = new Baguette(42); +assertEq(exports.ref_or_null(null, 0), null); +assertEq(exports.ref_or_null(baguette, 0), null); + +let ref = exports.ref_or_null(baguette, 1); +assertEq(ref, baguette); +assertEq(ref.calories, baguette.calories); + +ref = exports.nested(baguette, 0); +assertEq(ref, baguette); +assertEq(ref.calories, baguette.calories); + +// Make sure grow-memory isn't blocked by the lack of gc. +(function() { + assertEq(wasmEvalText(`(module + (memory 0 64) + (func (export "f") (param externref) (result i32) + i32.const 10 + memory.grow + drop + memory.size + ) +)`).exports.f({}), 10); +})(); + +// More interesting use cases about control flow joins. + +function assertJoin(body) { + let val = { i: -1 }; + assertEq(wasmEvalText(`(module + (func (export "test") (param $ref externref) (param $i i32) (result externref) + ${body} + ) + )`).exports.test(val), val); + assertEq(val.i, -1); +} + +assertJoin("(block (result externref) local.get $ref)"); +assertJoin("(block $out (result externref) local.get $ref br $out)"); +assertJoin("(loop (result externref) local.get $ref)"); + +assertJoin(`(block $out (result externref) (loop $top (result externref) + local.get $i + i32.const 1 + i32.add + local.tee $i + i32.const 10 + i32.eq + if + local.get $ref + return + end + br $top)) +`); + +assertJoin(`(block $out (loop $top + local.get $i + i32.const 1 + i32.add + local.tee $i + i32.const 10 + i32.le_s + if + br $top + else + local.get $ref + return + end + )) unreachable +`); + +assertJoin(`(block $out (result externref) (loop $top + local.get $ref + local.get $i + i32.const 1 + i32.add + local.tee $i + i32.const 10 + i32.eq + br_if $out + br $top + ) unreachable) +`); + +assertJoin(`(block $out (result externref) (block $unreachable (result externref) (loop $top + local.get $ref + local.get $i + i32.const 1 + i32.add + local.tee $i + br_table $unreachable $out + ) unreachable)) +`); + +let x = { i: 42 }, y = { f: 53 }; +exports = wasmEvalText(`(module + (func (export "test") (param $lhs externref) (param $rhs externref) (param $i i32) (result externref) + local.get $lhs + local.get $rhs + local.get $i + select (result externref) + ) +)`).exports; + +let result = exports.test(x, y, 0); +assertEq(result, y); +assertEq(result.i, undefined); +assertEq(result.f, 53); +assertEq(x.i, 42); + +result = exports.test(x, y, 1); +assertEq(result, x); +assertEq(result.i, 42); +assertEq(result.f, undefined); +assertEq(y.f, 53); + +// ExternRef in params/result of imported functions. + +let firstBaguette = new Baguette(13), + secondBaguette = new Baguette(37); + +let imports = { + i: 0, + myBaguette: null, + funcs: { + param(x) { + if (this.i === 0) { + assertEq(x, firstBaguette); + assertEq(x.calories, 13); + assertEq(secondBaguette !== null, true); + } else if (this.i === 1 || this.i === 2) { + assertEq(x, secondBaguette); + assertEq(x.calories, 37); + assertEq(firstBaguette !== null, true); + } else if (this.i === 3) { + assertEq(x, null); + } else { + firstBaguette = null; + secondBaguette = null; + gc(); // evil mode + } + this.i++; + }, + ret() { + return imports.myBaguette; + } + } +}; + +exports = wasmEvalText(`(module + (import "funcs" "ret" (func $ret (result externref))) + (import "funcs" "param" (func $param (param externref))) + + (func (export "param") (param $x externref) (param $y externref) + local.get $y + local.get $x + call $param + call $param + ) + + (func (export "ret") (result externref) + call $ret + ) +)`, imports).exports; + +exports.param(firstBaguette, secondBaguette); +exports.param(secondBaguette, null); +exports.param(firstBaguette, secondBaguette); + +imports.myBaguette = null; +assertEq(exports.ret(), null); + +imports.myBaguette = new Baguette(1337); +assertEq(exports.ret(), imports.myBaguette); + +// Check lazy stubs generation. + +exports = wasmEvalText(`(module + (import "funcs" "mirror" (func $mirror (param externref) (result externref))) + (import "funcs" "augment" (func $augment (param externref) (result externref))) + + (global $count_f (mut i32) (i32.const 0)) + (global $count_g (mut i32) (i32.const 0)) + + (func $f (param $param externref) (result externref) + i32.const 1 + global.get $count_f + i32.add + global.set $count_f + + local.get $param + call $augment + ) + + (func $g (param $param externref) (result externref) + i32.const 1 + global.get $count_g + i32.add + global.set $count_g + + local.get $param + call $mirror + ) + + (table (export "table") 10 funcref) + (elem (i32.const 0) $f $g $mirror $augment) + (type $table_type (func (param externref) (result externref))) + + (func (export "call_indirect") (param $i i32) (param $ref externref) (result externref) + local.get $ref + local.get $i + call_indirect (type $table_type) + ) + + (func (export "count_f") (result i32) global.get $count_f) + (func (export "count_g") (result i32) global.get $count_g) +)`, { + funcs: { + mirror(x) { + return x; + }, + augment(x) { + x.i++; + x.newProp = "hello"; + return x; + } + } +}).exports; + +x = { i: 19 }; +assertEq(exports.table.get(0)(x), x); +assertEq(x.i, 20); +assertEq(x.newProp, "hello"); +assertEq(exports.count_f(), 1); +assertEq(exports.count_g(), 0); + +x = { i: 21 }; +assertEq(exports.table.get(1)(x), x); +assertEq(x.i, 21); +assertEq(typeof x.newProp, "undefined"); +assertEq(exports.count_f(), 1); +assertEq(exports.count_g(), 1); + +x = { i: 22 }; +assertEq(exports.table.get(2)(x), x); +assertEq(x.i, 22); +assertEq(typeof x.newProp, "undefined"); +assertEq(exports.count_f(), 1); +assertEq(exports.count_g(), 1); + +x = { i: 23 }; +assertEq(exports.table.get(3)(x), x); +assertEq(x.i, 24); +assertEq(x.newProp, "hello"); +assertEq(exports.count_f(), 1); +assertEq(exports.count_g(), 1); + +// Globals. + +// ExternRef globals in wasm modules. + +assertErrorMessage(() => wasmEvalText(`(module (global (import "glob" "externref") externref))`, { glob: { externref: new WebAssembly.Global({ value: 'i32' }, 42) } }), + WebAssembly.LinkError, + /imported global type mismatch/); + +assertErrorMessage(() => wasmEvalText(`(module (global (import "glob" "i32") i32))`, { glob: { i32: {} } }), + WebAssembly.LinkError, + /import object field 'i32' is not a Number/); + +imports = { + constants: { + imm_null: null, + imm_bread: new Baguette(321), + mut_null: new WebAssembly.Global({ value: "externref", mutable: true }, null), + mut_bread: new WebAssembly.Global({ value: "externref", mutable: true }, new Baguette(123)) + } +}; + +exports = wasmEvalText(`(module + (global $g_imp_imm_null (import "constants" "imm_null") externref) + (global $g_imp_imm_bread (import "constants" "imm_bread") externref) + + (global $g_imp_mut_null (import "constants" "mut_null") (mut externref)) + (global $g_imp_mut_bread (import "constants" "mut_bread") (mut externref)) + + (global $g_imm_null externref (ref.null extern)) + (global $g_imm_getglob externref (global.get $g_imp_imm_bread)) + (global $g_mut (mut externref) (ref.null extern)) + + (func (export "imm_null") (result externref) global.get $g_imm_null) + (func (export "imm_getglob") (result externref) global.get $g_imm_getglob) + + (func (export "imp_imm_null") (result externref) global.get $g_imp_imm_null) + (func (export "imp_imm_bread") (result externref) global.get $g_imp_imm_bread) + (func (export "imp_mut_null") (result externref) global.get $g_imp_mut_null) + (func (export "imp_mut_bread") (result externref) global.get $g_imp_mut_bread) + + (func (export "set_imp_null") (param externref) local.get 0 global.set $g_imp_mut_null) + (func (export "set_imp_bread") (param externref) local.get 0 global.set $g_imp_mut_bread) + + (func (export "set_mut") (param externref) local.get 0 global.set $g_mut) + (func (export "get_mut") (result externref) global.get $g_mut) +)`, imports).exports; + +assertEq(exports.imp_imm_null(), imports.constants.imm_null); +assertEq(exports.imp_imm_bread(), imports.constants.imm_bread); + +assertEq(exports.imm_null(), null); +assertEq(exports.imm_getglob(), imports.constants.imm_bread); + +assertEq(exports.imp_mut_null(), imports.constants.mut_null.value); +assertEq(exports.imp_mut_bread(), imports.constants.mut_bread.value); + +let brandNewBaguette = new Baguette(1000); +exports.set_imp_null(brandNewBaguette); +assertEq(exports.imp_mut_null(), brandNewBaguette); +assertEq(exports.imp_mut_bread(), imports.constants.mut_bread.value); + +exports.set_imp_bread(null); +assertEq(exports.imp_mut_null(), brandNewBaguette); +assertEq(exports.imp_mut_bread(), null); + +assertEq(exports.get_mut(), null); +let glutenFreeBaguette = new Baguette("calories-free bread"); +exports.set_mut(glutenFreeBaguette); +assertEq(exports.get_mut(), glutenFreeBaguette); +assertEq(exports.get_mut().calories, "calories-free bread"); + +// Make sure that dead code doesn't prevent compilation. +wasmEvalText( + `(module + (func + (return) + (ref.null extern) + (drop) + ) + )`); + +wasmEvalText( + `(module + (func (param externref) + (return) + (ref.is_null (local.get 0)) + (drop) + ) + )`); diff --git a/js/src/jit-test/tests/wasm/ref-types/funcref-fastpaths.js b/js/src/jit-test/tests/wasm/ref-types/funcref-fastpaths.js new file mode 100644 index 0000000000..1650deda3f --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/funcref-fastpaths.js @@ -0,0 +1,76 @@ +// Test the fast paths along which funcref values flow between wasm and JS. +// Currently, these paths always go from wasm into JS; never from JS into wasm. + +setJitCompilerOption("baseline.warmup.trigger", 5); +setJitCompilerOption("ion.warmup.trigger", 10); + +var iter = 10000; +var objs = []; +var index = 0; + +var ins0 = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + `(module + (func $f (export "f") (result i32) (i32.const 37)) + (func $g (export "g") (result i32) (i32.const 42)))`))); +objs.push(ins0.exports.f); +objs.push(ins0.exports.g); + +// Tests that: +// +// * wasm->js calls along the fast path pass funcref correctly on entry to JS. +// This is tested by JS observing that the value that it receives is the same +// that was passed into wasm in the first place. +// +// * js->wasm calls along the fast path pass funcref correctly on return from +// wasm. This is tested by returning the passed-in value and observing in +// JS that the value is the same as the value that was passed in. + +// `p` will be a register argument on most platforms. + +function js_funcref_regarg(p) { + if (p !== objs[index]) + throw new Error("Bad argument at " + index); +} + +// `p` will be a stack argument on all platforms. In the internal ABI, the +// funcref parameter ends up in a stack slot in the call to js_funcref_stackarg, +// thus we're testing a different path in the stub code. (This holds for +// architectures with up to 10 register arguments, which covers all tier-1 +// platforms as of 2019.) + +function js_funcref_stackarg(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, p) { + if (p !== objs[index]) + throw new Error("Bad argument at " + index); +} + +var ins1 = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + `(module + (import "" "f" (func $f (param funcref))) + (import "" "g" (func $g (param i32) (param i32) (param i32) (param i32) (param i32) + (param i32) (param i32) (param i32) (param i32) (param i32) + (param funcref))) + (func (export "run1") (param funcref) (result funcref) + (call $f (local.get 0)) + (local.get 0)) + (func (export "run2") (param funcref) (result funcref) + (call $g (i32.const 0) (i32.const 1) (i32.const 2) (i32.const 3) (i32.const 4) + (i32.const 5) (i32.const 6) (i32.const 7) (i32.const 8) (i32.const 9) + (local.get 0)) + (local.get 0)))`)), + {"":{f: js_funcref_regarg, g: js_funcref_stackarg}}); + +index = 0; +for ( let i=0; i < iter; i++ ) { + let res = ins1.exports.run1(objs[index]); + if (res !== objs[index]) + throw new Error("Bad return at " + index); + index = (index + 1) % objs.length; +} + +index = 0; +for ( let i=0; i < iter; i++ ) { + let res = ins1.exports.run2(objs[index]); + if (res !== objs[index]) + throw new Error("Bad return at " + index); + index = (index + 1) % objs.length; +} diff --git a/js/src/jit-test/tests/wasm/ref-types/funcref.js b/js/src/jit-test/tests/wasm/ref-types/funcref.js new file mode 100644 index 0000000000..21ce95c0cb --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/funcref.js @@ -0,0 +1,135 @@ +const {Module,Instance,Global,RuntimeError} = WebAssembly; + +const badWasmFunc = /can only pass WebAssembly exported functions to funcref/; +const typeErr = /type mismatch/; + + +// Validation: + +wasmFailValidateText(`(module (func (local externref funcref) (local.set 0 (local.get 1))))`, typeErr); +wasmEvalText(`(module (func (local funcref funcref) (local.set 0 (local.get 1))))`); +wasmEvalText(`(module (func (local funcref) (local.set 0 (ref.null func))))`); +wasmFailValidateText(`(module (func (local funcref externref) (local.set 0 (local.get 1))))`, typeErr); +wasmEvalText(`(module (global (mut funcref) (ref.null func)) (func (param funcref) (global.set 0 (local.get 0))))`); +wasmFailValidateText(`(module (global (mut externref) (ref.null extern)) (func (param funcref) (global.set 0 (local.get 0))))`, typeErr); +wasmFailValidateText(`(module (global (mut funcref) (ref.null func)) (func (param externref) (global.set 0 (local.get 0))))`, typeErr); +wasmEvalText(`(module (func (param funcref)) (func (param funcref) (call 0 (local.get 0))))`); +wasmFailValidateText(`(module (func (param externref)) (func (param funcref) (call 0 (local.get 0))))`, typeErr); +wasmFailValidateText(`(module (func (param funcref)) (func (param externref) (call 0 (local.get 0))))`, typeErr); +wasmEvalText(`(module (func (param funcref) (result funcref) (block (result funcref) (local.get 0) (br 0))))`); +wasmFailValidateText(`(module (func (param funcref) (result externref) (block (result externref) (local.get 0) (br 0))))`, typeErr); +wasmFailValidateText(`(module (func (param externref) (result externref) (block (result funcref) (local.get 0) (br 0))))`, typeErr); +wasmEvalText(`(module (func (param funcref funcref) (result funcref) (select (result funcref) (local.get 0) (local.get 1) (i32.const 0))))`); +wasmFailValidateText(`(module (func (param externref funcref) (result externref) (select (result externref) (local.get 0) (local.get 1) (i32.const 0))))`, typeErr); +wasmFailValidateText(`(module (func (param funcref externref) (result externref) (select (result externref)(local.get 0) (local.get 1) (i32.const 0))))`, typeErr); +wasmFailValidateText(`(module (func (param externref funcref) (result funcref) (select (result funcref) (local.get 0) (local.get 1) (i32.const 0))))`, typeErr); +wasmFailValidateText(`(module (func (param funcref externref) (result funcref) (select (result funcref) (local.get 0) (local.get 1) (i32.const 0))))`, typeErr); + + +// Runtime: + +var m = new Module(wasmTextToBinary(`(module (func (export "wasmFun")))`)); +const wasmFun1 = new Instance(m).exports.wasmFun; +const wasmFun2 = new Instance(m).exports.wasmFun; +const wasmFun3 = new Instance(m).exports.wasmFun; + +var run = wasmEvalText(`(module + (global (mut funcref) (ref.null func)) + (func (param $x funcref) (param $test i32) (result funcref) + local.get $x + global.get 0 + local.get $test + select (result funcref) + ) + (func (export "run") (param $a funcref) (param $b funcref) (param $c funcref) (param $test1 i32) (param $test2 i32) (result funcref) + local.get $a + global.set 0 + block (result funcref) + local.get $b + local.get $test1 + br_if 0 + drop + local.get $c + end + local.get $test2 + call 0 + ) +)`).exports.run; +assertEq(run(wasmFun1, wasmFun2, wasmFun3, false, false), wasmFun1); +assertEq(run(wasmFun1, wasmFun2, wasmFun3, true, false), wasmFun1); +assertEq(run(wasmFun1, wasmFun2, wasmFun3, true, true), wasmFun2); +assertEq(run(wasmFun1, wasmFun2, wasmFun3, false, true), wasmFun3); + +var run = wasmEvalText(`(module + (type $t0 (func (param externref) (result externref))) + (type $t1 (func (param funcref) (result externref))) + (type $t2 (func (param funcref funcref) (result externref))) + (func $f0 (type $t0) ref.null extern) + (func $f1 (type $t1) ref.null extern) + (func $f2 (type $t2) ref.null extern) + (table funcref (elem $f0 $f1 $f2)) + (func (export "run") (param i32 i32) (result externref) + block $b2 block $b1 block $b0 + local.get 0 + br_table $b0 $b1 $b2 + end $b0 + ref.null extern + local.get 1 + call_indirect (type $t0) + return + end $b1 + ref.null func + local.get 1 + call_indirect (type $t1) + return + end $b2 + ref.null func + ref.null func + local.get 1 + call_indirect (type $t2) + return + ) +)`).exports.run; + +for (var i = 0; i < 3; i++) { + for (var j = 0; j < 3; j++) { + if (i == j) + assertEq(run(i, j), null); + else + assertErrorMessage(() => run(i, j), RuntimeError, /indirect call signature mismatch/); + } +} + + +// JS API: + +const wasmFun = wasmEvalText(`(module (func (export "x")))`).exports.x; + +var run = wasmEvalText(`(module (func (export "run") (param funcref) (result funcref) (local.get 0)))`).exports.run; +assertEq(run(wasmFun), wasmFun); +assertEq(run(null), null); +assertErrorMessage(() => run(() => {}), TypeError, badWasmFunc); + +var importReturnValue; +var importFun = () => importReturnValue; +var run = wasmEvalText(`(module (func (import "" "i") (result funcref)) (func (export "run") (result funcref) (call 0)))`, {'':{i:importFun}}).exports.run; +importReturnValue = wasmFun; +assertEq(run(), wasmFun); +importReturnValue = null; +assertEq(run(), null); +importReturnValue = undefined; +assertErrorMessage(() => run(), TypeError, badWasmFunc); +importReturnValue = () => {}; +assertErrorMessage(() => run(), TypeError, badWasmFunc); + +var g = new Global({value:'anyfunc', mutable:true}, wasmFun); +assertEq(g.value, wasmFun); +g.value = null; +assertEq(g.value, null); +Math.sin(); +assertErrorMessage(() => g.value = () => {}, TypeError, badWasmFunc); +var g = new Global({value:'anyfunc', mutable:true}, null); +assertEq(g.value, null); +g.value = wasmFun; +assertEq(g.value, wasmFun); +assertErrorMessage(() => new Global({value:'anyfunc'}, () => {}), TypeError, badWasmFunc); diff --git a/js/src/jit-test/tests/wasm/ref-types/fuzz-gc-while-allocating-global.js b/js/src/jit-test/tests/wasm/ref-types/fuzz-gc-while-allocating-global.js new file mode 100644 index 0000000000..0b51622397 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/fuzz-gc-while-allocating-global.js @@ -0,0 +1,3 @@ +enableShellAllocationMetadataBuilder(); +gczeal(9, 1); +new WebAssembly.Global({ value: 'i32' }, 42); diff --git a/js/src/jit-test/tests/wasm/ref-types/ref-func.js b/js/src/jit-test/tests/wasm/ref-types/ref-func.js new file mode 100644 index 0000000000..ac7b059f4b --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/ref-func.js @@ -0,0 +1,290 @@ +load(libdir + "wasm-binary.js"); + +const v2vSig = {args:[], ret:VoidCode}; +const v2vSigSection = sigSection([v2vSig]); + +// 'ref.func' parses, validates and returns a non-null value +wasmFullPass(` + (module + (elem declare func $run) + (func $run (result i32) + ref.func $run + ref.is_null + ) + (export "run" (func $run)) + ) +`, 0); + +// function returning reference to itself +{ + let {f1} = wasmEvalText(` + (module + (elem declare func $f1) + (func $f1 (result funcref) ref.func $f1) + (export "f1" (func $f1)) + ) + `).exports; + assertEq(f1(), f1); +} + +// function returning reference to a different function +{ + let {f1, f2} = wasmEvalText(` + (module + (elem declare func $f1) + (func $f1) + (func $f2 (result funcref) ref.func $f1) + (export "f1" (func $f1)) + (export "f2" (func $f2)) + ) + `).exports; + assertEq(f2(), f1); +} + +// function returning reference to function in a different module +{ + let i1 = wasmEvalText(` + (module + (elem declare func $f1) + (func $f1) + (export "f1" (func $f1)) + ) + `); + let i2 = wasmEvalText(` + (module + (import "" "f1" (func $f1)) + (elem declare func $f1) + (func $f2 (result funcref) ref.func $f1) + (export "f1" (func $f1)) + (export "f2" (func $f2)) + ) + `, {"": i1.exports}); + + let f1 = i1.exports.f1; + let f2 = i2.exports.f2; + assertEq(f2(), f1); +} + +// function index must be valid +assertErrorMessage(() => { + wasmEvalText(` + (module + (func (result funcref) ref.func 10) + ) + `); +}, WebAssembly.CompileError, /(function index out of range)|(function index out of bounds)/); + +function validFuncRefText(forwardDeclare, tbl_type) { + return wasmEvalText(` + (module + (table 1 ${tbl_type}) + (func $test (result funcref) ref.func $referenced) + (func $referenced) + ${forwardDeclare} + ) + `); +} + +// referenced function must be forward declared somehow +assertErrorMessage(() => validFuncRefText('', 'funcref'), WebAssembly.CompileError, /(function index is not declared in a section before the code section)|(undeclared function reference)/); + +// referenced function can be forward declared via segments +assertEq(validFuncRefText('(elem 0 (i32.const 0) func $referenced)', 'funcref') instanceof WebAssembly.Instance, true); +assertEq(validFuncRefText('(elem func $referenced)', 'funcref') instanceof WebAssembly.Instance, true); +assertEq(validFuncRefText('(elem declare func $referenced)', 'funcref') instanceof WebAssembly.Instance, true); + +// also when the segment is passive or active 'funcref' +assertEq(validFuncRefText('(elem 0 (i32.const 0) funcref (ref.func $referenced))', 'funcref') instanceof WebAssembly.Instance, true); +assertEq(validFuncRefText('(elem funcref (ref.func $referenced))', 'funcref') instanceof WebAssembly.Instance, true); + +// reference function can be forward declared via globals +assertEq(validFuncRefText('(global funcref (ref.func $referenced))', 'externref') instanceof WebAssembly.Instance, true); + +// reference function can be forward declared via export +assertEq(validFuncRefText('(export "referenced" (func $referenced))', 'externref') instanceof WebAssembly.Instance, true); + +// reference function cannot be forward declared via start +assertErrorMessage(() => validFuncRefText('(start $referenced)', 'externref'), WebAssembly.CompileError, /(function index is not declared in a section before the code section)|(undeclared function reference)/); + +// Tests not expressible in the text format. + +// element segment with elemexpr can carry non-reference type, but this must be +// rejected. + +assertErrorMessage(() => new WebAssembly.Module( + moduleWithSections([generalElemSection([{ flag: PassiveElemExpr, + typeCode: I32Code, + elems: [] }])])), + WebAssembly.CompileError, + /bad type/); + +// Test case for bug 1596026: when taking the ref.func of an imported function, +// the value obtained should not be the JS function. This would assert (even in +// a release build), so the test is merely that the code runs. + +var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` + (module + (import "m" "f" (func $f (param i32) (result i32))) + (elem declare func $f) + (table 1 funcref) + (func (export "f") + (table.set 0 (i32.const 0) (ref.func $f))))`)), + {m:{f:(x) => 37+x}}); +ins.exports.f(); + +// Verification that we can handle encoding errors for passive element segments +// properly. + +function checkPassiveElemSegment(mangle, err) { + let bin = moduleWithSections( + [v2vSigSection, declSection([0]), // One function + tableSection(1), // One table + { name: elemId, // One passive segment + body: (function () { + let body = []; + body.push(1); // 1 element segment + body.push(0x1 | 0x4); // Flags: Passive and uses element expression + body.push(mangle == "type" ? BadType : AnyFuncCode); // always anyfunc + body.push(1); // Element count + body.push(mangle == "ref.func" ? BadType : RefFuncCode); // always ref.func + body.push(0); // func index + body.push(EndCode + (mangle == "end" ? 1 : 0)); + return body; + })() }, + bodySection( // Empty function + [funcBody( + {locals:[], + body:[]})]) + ]); + if (err) { + assertErrorMessage(() => new WebAssembly.Module(bin), + WebAssembly.CompileError, + err); + } else { + new WebAssembly.Module(bin); + } +} + +checkPassiveElemSegment(""); +checkPassiveElemSegment("type", /bad type/); +checkPassiveElemSegment("ref.func", /unrecognized opcode/); +checkPassiveElemSegment("end", /unrecognized opcode/); + +// Passive element segments can contain literal null values. + +{ + let txt = + `(module + (table (export "t") 10 funcref) + (elem (i32.const 1) $m) + (elem (i32.const 3) $m) + (elem (i32.const 6) $m) + (elem (i32.const 8) $m) + (elem funcref (ref.func $f) (ref.null func) (ref.func $g) (ref.null func) (ref.func $h)) + (func $m) + (func $f) + (func $g) + (func $h) + (func (export "doit") (param $idx i32) + (table.init 4 (local.get $idx) (i32.const 0) (i32.const 5))))`; + let ins = wasmEvalText(txt); + ins.exports.doit(0); + ins.exports.doit(5); + assertEq(typeof ins.exports.t.get(0), "function"); + assertEq(ins.exports.t.get(1), null); + assertEq(typeof ins.exports.t.get(2), "function"); + assertEq(ins.exports.t.get(0) == ins.exports.t.get(2), false); + assertEq(ins.exports.t.get(3), null); + assertEq(typeof ins.exports.t.get(4), "function"); + assertEq(typeof ins.exports.t.get(5), "function"); + assertEq(ins.exports.t.get(6), null); + assertEq(typeof ins.exports.t.get(7), "function"); + assertEq(ins.exports.t.get(8), null); + assertEq(typeof ins.exports.t.get(9), "function"); +} + +// Test ref.func in global initializer expressions + +for (let mutable of [true, false]) { + for (let imported of [true, false]) { + for (let exported of [true, false]) { + let globalType = mutable ? `(mut funcref)` : `funcref`; + + let imports = {}; + + if (imported) { + imports = wasmEvalText(` + (module + (global $g (export "g") ${globalType} (ref.func $f)) + (func $f (export "f") (result i32) i32.const 42) + ) + `).exports; + } + + let exports = wasmEvalText(` + (module + (global $g ${exported ? `(export "g")` : ``} ${imported ? `(import "" "g")` : ``} ${globalType} ${imported ? `` : `(ref.func $f)`}) + ${exported ? `` : `(func (export "get_g") (result funcref) global.get $g)`} + (func $f (export "f") (result i32) i32.const 42) + ) + `, { "": imports }).exports; + + let targetFunc = imported ? imports.f : exports.f; + let globalVal = exported ? exports.g.value : exports.get_g(); + assertEq(targetFunc(), 42); + assertEq(globalVal(), 42); + assertEq(targetFunc, globalVal); + if (imported && exported) { + assertEq(imports.g, exports.g); + } + } + } +} + +// Test invalid ref.func indices + +function testCodeRefFuncIndex(index) { + assertErrorMessage(() => { + new WebAssembly.Module(moduleWithSections( + [v2vSigSection, + declSection([0]), // One function + bodySection( + [funcBody( + {locals:[], + body:[ + RefFuncCode, + ...varU32(index), + DropCode + ]})]) + ])) + }, + WebAssembly.CompileError, + /(function index out of range)|(function index out of bounds)/); +} + +testCodeRefFuncIndex(1); +testCodeRefFuncIndex(2); +testCodeRefFuncIndex(10); +testCodeRefFuncIndex(1000); + +function testGlobalRefFuncIndex(index) { + assertErrorMessage(() => { + new WebAssembly.Module(moduleWithSections( + [v2vSigSection, + globalSection([ + { + valType: AnyFuncCode, + flags: 0, + initExpr: [RefFuncCode, ...varU32(index), EndCode], + } + ]) + ])) + }, + WebAssembly.CompileError, + /(function index out of range)|(function index out of bounds)/); +} + +testGlobalRefFuncIndex(1); +testGlobalRefFuncIndex(2); +testGlobalRefFuncIndex(10); +testGlobalRefFuncIndex(1000); diff --git a/js/src/jit-test/tests/wasm/ref-types/stackmaps1.js b/js/src/jit-test/tests/wasm/ref-types/stackmaps1.js new file mode 100644 index 0000000000..0776b490b2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/stackmaps1.js @@ -0,0 +1,85 @@ +// Tests wasm frame tracing. Only tests for direct and indirect call chains +// in wasm that lead to JS allocation. Does not test any timeout or interrupt +// related aspects. The structure is +// +// test top level: call fn2 +// fn2: call fn1 +// fn1: do 100k times { call-direct fn0; call-indirect fn0; } +// fn0: call out to JS that does allocation +// +// Eventually fn0 will trigger GC and we expect the chain of resulting frames +// to be traced correctly. fn2, fn1 and fn0 have some ref-typed args, so +// there will be traceable stack words to follow, in the sequence of frames. + +const {Module,Instance} = WebAssembly; + +let t = + `(module + (import "" "check3" (func $check3 (param externref) (param externref) (param externref))) + (import "" "alloc" (func $alloc (result externref))) + (type $typeOfFn0 + (func (param i32) (param externref) (param i32) + (param externref) (param externref) (param i32) (result i32))) + (table 1 1 funcref) + (elem (i32.const 0) $fn0) + + ;; -- fn 0 + (func $fn0 (export "fn0") + (param $arg1 i32) (param $arg2 externref) (param $arg3 i32) + (param $arg4 externref) (param $arg5 externref) (param $arg6 i32) (result i32) + (call $alloc) + drop + (i32.add (i32.add (local.get $arg1) (local.get $arg3)) (local.get $arg6)) + + ;; Poke the ref-typed arguments, to be sure that they got kept alive + ;; properly across any GC that the |alloc| call might have done. + (call $check3 (local.get $arg2) (local.get $arg4) (local.get $arg5)) + ) + + ;; -- fn 1 + (func $fn1 (export "fn1") (param $arg1 externref) (result i32) + (local $i i32) + + (loop (result i32) + ;; call direct 0 + (call $fn0 (i32.const 10) (local.get $arg1) (i32.const 12) + (local.get $arg1) (local.get $arg1) (i32.const 15)) + + ;; call indirect 0 + (call_indirect (type $typeOfFn0) + (i32.const 10) (local.get $arg1) (i32.const 12) + (local.get $arg1) (local.get $arg1) (i32.const 15) + (i32.const 0)) ;; table index + + i32.add + + ;; Do 60k iterations of this loop, to get a good amount of allocation + (local.set $i (i32.add (local.get $i) (i32.const 1))) + (br_if 0 (i32.lt_s (local.get $i) (i32.const 60000))) + ) + ) + + ;; -- fn 2 + (func $fn2 (export "fn2") (param $arg1 externref) (result i32) + (call $fn1 (local.get $arg1)) + ) + )`; + +function Croissant(chocolate, number) { + this.chocolate = chocolate; + this.number = number; +} + +function allocates() { + return new Croissant(true, 271828); +} + +function check3(a1, a2, a3) { + assertEq(a1.number, 31415927); + assertEq(a2.number, 31415927); + assertEq(a3.number, 31415927); +} + +let i = wasmEvalText(t, {"":{alloc: allocates, check3: check3}}); + +print(i.exports.fn2( new Croissant(false, 31415927) )); diff --git a/js/src/jit-test/tests/wasm/ref-types/stackmaps2.js b/js/src/jit-test/tests/wasm/ref-types/stackmaps2.js new file mode 100644 index 0000000000..986d378a75 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/stackmaps2.js @@ -0,0 +1,132 @@ +// Tests wasm frame tracing in the presence of interrupt handlers that perform +// allocation. The structure is +// +// test top level: call fn2 +// fn2: call fn1 +// fn1: repeat { call-direct fn0; call-indirect fn0; } +// fn0: a 100-iteration loop that does nothing except waste time +// +// At the same time we are asynchronously runnning handler(), which does a lot +// of allocation. At some point that will trigger a GC. Assuming that +// handler() runs whilst fn0 is running (the most likely scenario, since fn0 +// consumes the majority of the wasm running time), then the runtime will walk +// the stack from the wasm exit frame, through fn0, fn1 and finally fn2. As +// with stackmaps1.js, there are some ref-typed args in use so as provide +// traceable stack slots to follow. +// +// The test runs until the loop in fn1 determines that handler() has allocated +// sufficient memory as to have caused at least three collections. This helps +// keep the test effective in the face of wide variations in the rate of +// progress of the handler()'s loop (eg x86+native is fast, arm64+simulator is +// slow). + +const {Module,Instance} = WebAssembly; + +const DEBUG = false; + +let t = + `(module + (type $typeOfFn0 + (func (param i32) (param externref) (param i32) + (param externref) (param externref) (param i32) (result i32))) + + (import "" "alloc" (func $alloc (result externref))) + (import "" "quitp" (func $quitp (result i32))) + (import "" "check3" (func $check3 (param externref) (param externref) (param externref))) + + (table 1 1 funcref) + (elem (i32.const 0) $fn0) + + ;; -- fn 0 + (func $fn0 (export "fn0") + (param $arg1 i32) (param $arg2 externref) (param $arg3 i32) + (param $arg4 externref) (param $arg5 externref) (param $arg6 i32) (result i32) + (local $i i32) + + ;; spinloop to waste time + (loop + (local.set $i (i32.add (local.get $i) (i32.const 1))) + (br_if 0 (i32.lt_s (local.get $i) (i32.const 100))) + ) + + (i32.add (i32.add (local.get $arg1) (local.get $arg3)) (local.get $arg6)) + + ;; Poke the ref-typed arguments, to be sure that they got kept alive + ;; properly across any GC that might have happened. + (call $check3 (local.get $arg2) (local.get $arg4) (local.get $arg5)) + ) + + ;; -- fn 1 + (func $fn1 (export "fn1") (param $arg1 externref) (result i32) + (loop (result i32) + ;; call direct to $fn0 + (call $fn0 (i32.const 10) (local.get $arg1) (i32.const 12) + (local.get $arg1) (local.get $arg1) (i32.const 15)) + + ;; call indirect to table index 0, which is $fn0 + (call_indirect (type $typeOfFn0) + (i32.const 10) (local.get $arg1) (i32.const 12) + (local.get $arg1) (local.get $arg1) (i32.const 15) + (i32.const 0)) ;; table index + + i32.add + + ;; Continue iterating until handler() has allocated enough + (br_if 0 (i32.eq (call $quitp) (i32.const 0))) + ) + ) + + ;; -- fn 2 + (func $fn2 (export "fn2") (param $arg1 externref) (result i32) + (call $fn1 (local.get $arg1)) + ) + )`; + +function Croissant(chocolate, number) { + this.chocolate = chocolate; + this.number = number; +} + +function allocates() { + return new Croissant(true, 271828); +} + +let totAllocs = 0; + +function handler() { + if (DEBUG) { + print('XXXXXXXX icallback: START'); + } + let q = allocates(); + let sum = 0; + let iters = 15000; + for (let i = 0; i < iters; i++) { + let x = allocates(); + // Without this hoop jumping to create an apparent use of |x|, Ion + // will remove the allocation call and make the test pointless. + if (x == q) { sum++; } + } + totAllocs += iters; + // Artificial use of |sum|. See comment above. + if (sum == 133713371337) { print("unlikely!"); } + timeout(0.5, handler); + if (DEBUG) { + print('XXXXXXXX icallback: END'); + } + return true; +} + +function quitp() { + return totAllocs > 200000 ? 1 : 0; +} + +function check3(a1, a2, a3) { + assertEq(a1.number, 31415927); + assertEq(a2.number, 31415927); + assertEq(a3.number, 31415927); +} + +let i = wasmEvalText(t, {"":{alloc: allocates, quitp: quitp, check3: check3}}); + +timeout(0.5, handler); +print(i.exports.fn2( new Croissant(false, 31415927) )); diff --git a/js/src/jit-test/tests/wasm/ref-types/stackmaps3.js b/js/src/jit-test/tests/wasm/ref-types/stackmaps3.js new file mode 100644 index 0000000000..1b4c15abd2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/stackmaps3.js @@ -0,0 +1,201 @@ +// Generates a bunch of numbers-on-the-heap, and tries to ensure that they are +// held live -- at least for a short while -- only by references from the wasm +// evaluation stack. Then assembles them in a list and checks that the list +// is as expected (and we don't segfault). While all this is running we also +// have an regular interrupt whose handler does a bunch of allocation, so as +// to cause as much disruption as possible. + +// Note this makes an assumption about how the wasm compiler works. There's +// no particular reason that the wasm compiler needs to keep the results of +// the $mkBoxedInt calls on the machine stack. It could equally cache them in +// registers or even reorder the call sequences so as to interleave +// construction of the list elements with construction of the list itself. It +// just happens that our baseline compiler will behave as described. That +// said, however, it's hard to imagine how an implementation could complete +// the list construction without having at least one root in a register or on +// the stack, so the test still has value regardless of how the underlying +// implementation works. + +const {Module,Instance} = WebAssembly; + +const DEBUG = false; + +let t = + `(module + (import "" "mkCons" (func $mkCons (param externref) (param externref) (result externref))) + (import "" "mkBoxedInt" (func $mkBoxedInt (result externref))) + + (func $mkNil (result externref) + ref.null extern + ) + + (func $mkConsIgnoringScalar + (param $hd externref) (param i32) (param $tl externref) + (result externref) + (local.get $hd) + (local.get $tl) + call $mkCons + ) + + (func $mkList (export "mkList") (result externref) + call $mkList20 + ) + + (func $mkList20 (result externref) + ;; create 20 pointers to boxed ints on the stack, plus a few + ;; scalars for added confusion + (local $scalar99 i32) + (local $scalar97 i32) + (local.set $scalar99 (i32.const 99)) + (local.set $scalar97 (i32.const 97)) + + call $mkBoxedInt + local.get $scalar99 + call $mkBoxedInt + call $mkBoxedInt + local.get $scalar97 + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkBoxedInt + call $mkNil + ;; Now we have (pointers to) 20 boxed ints and a NIL on the stack, and + ;; nothing else holding them live. Build a list from the elements. + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkCons + call $mkConsIgnoringScalar + call $mkCons + call $mkConsIgnoringScalar + ) + )`; + +let boxedIntCounter = 0; + +function BoxedInt() { + this.theInt = boxedIntCounter; + boxedIntCounter++; +} + +function mkBoxedInt() { + return new BoxedInt(); +} + +function printBoxedInt(bi) { + print(bi.theInt); +} + +function Cons(hd, tl) { + this.hd = hd; + this.tl = tl; +} + +function mkCons(hd, tl) { + return new Cons(hd, tl); +} + +function showList(list) { + print("["); + while (list) { + printBoxedInt(list.hd); + print(","); + list = list.tl; + } + print("]"); +} + +function checkList(list, expectedHdValue, expectedLength) { + while (list) { + if (expectedLength <= 0) + return false; + if (list.hd.theInt !== expectedHdValue) { + return false; + } + list = list.tl; + expectedHdValue++; + expectedLength--; + } + if (expectedLength == 0) { + return true; + } else { + return false; + } +} + +let i = wasmEvalText(t, {"":{mkCons: mkCons, mkBoxedInt: mkBoxedInt}}); + + +function Croissant(chocolate) { + this.chocolate = chocolate; +} + +function allocates() { + return new Croissant(true); +} + +function handler() { + if (DEBUG) { + print('XXXXXXXX icallback: START'); + } + let q = allocates(); + let sum = 0; + for (let i = 0; i < 15000; i++) { + let x = allocates(); + // Without this hoop jumping to create an apparent use of |x|, Ion + // will remove the allocation call and make the test pointless. + if (x == q) { sum++; } + } + // Artificial use of |sum|. See comment above. + if (sum == 133713371337) { print("unlikely!"); } + timeout(1, handler); + if (DEBUG) { + print('XXXXXXXX icallback: END'); + } + return true; +} + +timeout(1, handler); + +for (let n = 0; n < 10000; n++) { + let listLowest = boxedIntCounter; + + // Create the list in wasm land, possibly inducing GC on the way + let aList = i.exports.mkList(); + + // Check it is as we expect + let ok = checkList(aList, listLowest, 20/*expected length*/); + if (!ok) { + print("Failed on list: "); + showList(aList); + } + assertEq(ok, true); +} + +// If we get here, the test finished successfully. diff --git a/js/src/jit-test/tests/wasm/ref-types/stackmaps4-params-n-locals.js b/js/src/jit-test/tests/wasm/ref-types/stackmaps4-params-n-locals.js new file mode 100644 index 0000000000..2b95ea14a6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/stackmaps4-params-n-locals.js @@ -0,0 +1,143 @@ +// A stress test for stackmap creation as it relates to params and locals. + +function Stuff(n) { + this.n = n; +} +function allocate(n) { + const res = new Stuff(n); + // The webassembly loop below will provide us with 254 as an arg after not + // very long. + if (n == 254) { + gc(); + } + return res; +} + +function visit(aStuff) { + return aStuff.n; +} + +let bin = wasmTextToBinary( +` +(module + (import "" "allocate" (func $allocate (param i32) (result externref))) + (import "" "visit" (func $visit (param externref) (result i32))) + + ;; A function with many params and locals, most of which are ref-typed. + ;; The purpose of having so many is to defeat any reasonable attempt at + ;; allocating them all in registers. The asymmetrically-placed i32s are + ;; an attempt to expose any misalignment or inversion of the stack layout + ;; vs what the stackmap claims the layout to be. + + (func $manyParamsAndLocals (export "manyParamsAndLocals") + (param $p1 externref) (param $p2 i32) (param $p3 externref) + (param $p4 externref) (param $p5 externref) (param $p6 externref) + (param $p7 externref) (param $p8 externref) (param $p9 i32) + (result i32) + (local $l1 externref) (local $l2 externref) (local $l3 externref) + (local $l4 i32) (local $l5 externref) (local $l6 i32) + (local $l7 externref) (local $l8 externref) (local $l9 externref) + + (local $i i32) + (local $runningTotal i32) + + ;; Bind some objects to l1 .. l9. The JS harness will already + ;; have done the same for p1 .. p9. + (local.set $l1 (call $allocate (i32.const 1))) + (local.set $l2 (call $allocate (i32.const 3))) + (local.set $l3 (call $allocate (i32.const 5))) + (local.set $l4 (i32.const 7)) + (local.set $l5 (call $allocate (i32.const 9))) + (local.set $l6 (i32.const 11)) + (local.set $l7 (call $allocate (i32.const 13))) + (local.set $l8 (call $allocate (i32.const 15))) + (local.set $l9 (call $allocate (i32.const 17))) + + ;; Now loop, allocating as we go, and forcing GC every 256 iterations. + ;; Also in each iteration, visit all the locals and params, in the hope + ;; of exposing any cases where they are not held live across GC. + (loop $CONT + ;; Allocate, and hold on to the resulting value, so that Ion can't + ;; delete the allocation. + (local.set $l9 (call $allocate (i32.and (local.get $i) (i32.const 255)))) + + ;; Visit all params and locals + + local.get $runningTotal + + (call $visit (local.get $p1)) + i32.add + local.get $p2 + i32.add + (call $visit (local.get $p3)) + i32.add + (call $visit (local.get $p4)) + i32.add + (call $visit (local.get $p5)) + i32.add + (call $visit (local.get $p6)) + i32.add + (call $visit (local.get $p7)) + i32.add + (call $visit (local.get $p8)) + i32.add + local.get $p9 + i32.add + + (call $visit (local.get $l1)) + i32.add + (call $visit (local.get $l2)) + i32.add + (call $visit (local.get $l3)) + i32.add + local.get $l4 + i32.add + (call $visit (local.get $l5)) + i32.add + local.get $l6 + i32.add + (call $visit (local.get $l7)) + i32.add + (call $visit (local.get $l8)) + i32.add + (call $visit (local.get $l9)) + i32.add + + local.set $runningTotal + + (local.set $i (i32.add (local.get $i) (i32.const 1))) + (br_if $CONT (i32.lt_s (local.get $i) (i32.const 10000))) + ) ;; loop + + local.get $runningTotal + ) ;; func +) +`); + +let mod = new WebAssembly.Module(bin); +let ins = new WebAssembly.Instance(mod, {"":{allocate, visit}}); + +let p1 = allocate(97); +let p2 = 93; +let p3 = allocate(91); +let p4 = allocate(83); +let p5 = allocate(79); +let p6 = allocate(73); +let p7 = allocate(71); +let p8 = allocate(67); +let p9 = 61; + +let res = ins.exports.manyParamsAndLocals(p1, p2, p3, p4, p5, p6, p7, p8, p9); + +// Check that GC didn't mess up p1 .. p9 +res += visit(p1); +res += p2; +res += visit(p3); +res += visit(p4); +res += visit(p5); +res += visit(p6); +res += visit(p7); +res += visit(p8); +res += p9; + +assertEq(res, 9063795); diff --git a/js/src/jit-test/tests/wasm/ref-types/stackmaps5.js b/js/src/jit-test/tests/wasm/ref-types/stackmaps5.js new file mode 100644 index 0000000000..e6ec806079 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/stackmaps5.js @@ -0,0 +1,21 @@ +// Test for Bug 1739683. Tests that stackmaps are properly associated with +// an Ion call to a builtin Wasm instance method. + +gczeal(2, 1); // Collect on every allocation. + +let exports = wasmEvalText( + `(module + (table $tab (export "tab") 5 externref) + (elem declare funcref (ref.func $g)) + (func $g) + (func $f (export "f") (param externref) (result) + (ref.func $g) ;; force a collection via allocation in instance call + (ref.is_null) + (if + (then) + (else (i32.const 0) (local.get 0) (table.set $tab))) + ) + )`, + {} +).exports; +exports.f("foo"); diff --git a/js/src/jit-test/tests/wasm/ref-types/tables-api.js b/js/src/jit-test/tests/wasm/ref-types/tables-api.js new file mode 100644 index 0000000000..a2ae3c45f0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/tables-api.js @@ -0,0 +1,93 @@ +// Test changes to the WebAssembly.Table API by reference-types + +function assertTableFilled(table, length, element) { + assertEq(table.length, length); + for (let i = 0; i < length; i++) { + assertEq(table.get(i), element); + } +} + +const tableLength = 10; + +// Test table constructor can accept a default value to fill elements to +for (let value of WasmExternrefValues) { + let table = new WebAssembly.Table({'element': 'externref', initial: tableLength}, value); + assertTableFilled(table, tableLength, value); +} +for (let value of WasmFuncrefValues) { + let table = new WebAssembly.Table({'element': 'anyfunc', initial: tableLength}, value); + assertTableFilled(table, tableLength, value); +} + +// Test not specifying default value in constructor yields 'undefined' for externref +{ + let table = new WebAssembly.Table({'element': 'externref', initial: tableLength}); + assertTableFilled(table, tableLength, undefined); +} + +// Test not specifying default value in constructor yields 'null' for funcref +{ + let table = new WebAssembly.Table({'element': 'anyfunc', initial: tableLength}); + assertTableFilled(table, tableLength, null); +} + +// Test omitting the value in table set defaults to undefined for externref and +// null for funcref. +{ + let t = new WebAssembly.Table({element:"externref", initial: 1}); + // Clear out initial value + t.set(0, ''); + // Set with an omitted value + t.set(0); + // Assert the omitted value is undefined + assertEq(t.get(0), undefined); +} +{ + let t = new WebAssembly.Table({element:"anyfunc", initial: 1}); + // Clear out initial value + t.set(0, WasmFuncrefValues[0]); + // Set with an omitted value + t.set(0); + // Assert the omitted value is null + assertEq(t.get(0), null); +} + +// Test table grow. There is an optional fill argument that defaults to +// undefined with externref, and null with funcref. +{ + let t = new WebAssembly.Table({element:"externref", initial:0}); + t.grow(1); + assertEq(t.get(t.length-1), undefined); + let prev = undefined; + for (let v of WasmExternrefValues) { + t.grow(2, v); + assertEq(t.get(t.length-3), prev); + assertEq(t.get(t.length-2), v); + + assertEq(t.get(t.length-1), v); + prev = v; + } +} + +{ + let t = new WebAssembly.Table({element:"anyfunc", initial:0}); + t.grow(1); + assertEq(t.get(t.length-1), null); + let prev = null; + for (let v of WasmFuncrefValues) { + t.grow(2, v); + assertEq(t.get(t.length-3), prev); + assertEq(t.get(t.length-2), v); + + assertEq(t.get(t.length-1), v); + prev = v; + } +} + +// If growing by zero elements there are no spurious writes +{ + let t = new WebAssembly.Table({element:"externref", initial:1}); + t.set(0, 1337); + t.grow(0, 1789); + assertEq(t.get(0), 1337); +} diff --git a/js/src/jit-test/tests/wasm/ref-types/tables-fill.js b/js/src/jit-test/tests/wasm/ref-types/tables-fill.js new file mode 100644 index 0000000000..b6b821f1d0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/tables-fill.js @@ -0,0 +1,212 @@ +const N = 8; + +function testTableFill(tbl_type, val_type, obj) { + assertEq(obj.length, N); + + let ins + = wasmEvalText( + `(module + (table 8 ${tbl_type}) ;; table 0 + (table $t 10 ${tbl_type}) ;; table 1 + + ;; fill/get for table 0, referenced implicitly + (func (export "fill0") (param $i i32) (param $r ${val_type}) (param $n i32) + (table.fill (local.get $i) (local.get $r) (local.get $n)) + ) + (func (export "get0") (param $i i32) (result ${tbl_type}) + (table.get (local.get $i)) + ) + + ;; fill/get for table 1, referenced explicitly + (func (export "fill1") (param $i i32) (param $r ${val_type}) (param $n i32) + (table.fill $t (local.get $i) (local.get $r) (local.get $n)) + ) + (func (export "get1") (param $i i32) (result ${tbl_type}) + (table.get $t (local.get $i)) + ) + )`); + + // An initial test to ascertain that tables 0 and 1 are independent + + // Fill in table 0, then check it. + assertEq(ins.exports.fill0(2, obj[6], 5), undefined) + assertEq(ins.exports.fill0(1, obj[7], 3), undefined); + + function check_table0() { + assertEq(ins.exports.get0(0), null); + assertEq(ins.exports.get0(1), obj[7]); + assertEq(ins.exports.get0(2), obj[7]); + assertEq(ins.exports.get0(3), obj[7]); + assertEq(ins.exports.get0(4), obj[6]); + assertEq(ins.exports.get0(5), obj[6]); + assertEq(ins.exports.get0(6), obj[6]); + assertEq(ins.exports.get0(7), null); + } + + // Check that table 0 has the expected content. + check_table0(); + + // Check that messing with table 0 above hasn't changed table 1. + for (let i = 0; i < 10; i++) { + assertEq(ins.exports.get1(i), null); + } + + // Now a bunch of tests involving only table 1. + + // Partly outside the table + assertErrorMessage(() => ins.exports.fill1(8, obj[5], 3), + WebAssembly.RuntimeError, /index out of bounds/); + + assertEq(ins.exports.get1(7), null); + assertEq(ins.exports.get1(8), null); + assertEq(ins.exports.get1(9), null); + + // Within the table + assertEq(ins.exports.fill1(2, obj[0], 3), undefined); + assertEq(ins.exports.get1(1), null); + assertEq(ins.exports.get1(2), obj[0]); + assertEq(ins.exports.get1(3), obj[0]); + assertEq(ins.exports.get1(4), obj[0]); + assertEq(ins.exports.get1(5), null); + + // Within the table + assertEq(ins.exports.fill1(4, obj[1], 2), undefined); + assertEq(ins.exports.get1(3), obj[0]); + assertEq(ins.exports.get1(4), obj[1]); + assertEq(ins.exports.get1(5), obj[1]); + assertEq(ins.exports.get1(6), null); + + // Within the table + assertEq(ins.exports.fill1(4, obj[2], 0), undefined); + assertEq(ins.exports.get1(3), obj[0]); + assertEq(ins.exports.get1(4), obj[1]); + assertEq(ins.exports.get1(5), obj[1]); + + // Within the table + assertEq(ins.exports.fill1(8, obj[3], 2), undefined); + assertEq(ins.exports.get1(7), null); + assertEq(ins.exports.get1(8), obj[3]); + assertEq(ins.exports.get1(9), obj[3]); + + // Within the table + assertEq(ins.exports.fill1(9, null, 1), undefined); + assertEq(ins.exports.get1(8), obj[3]); + assertEq(ins.exports.get1(9), null); + + // Within the table + assertEq(ins.exports.fill1(10, obj[4], 0), undefined); + assertEq(ins.exports.get1(9), null); + + // Boundary tests on table 1: at the edge of the table. + + // Length-zero fill1 at the edge of the table must succeed + assertEq(ins.exports.fill1(10, null, 0), undefined); + + // Length-one fill1 at the edge of the table fails + assertErrorMessage(() => ins.exports.fill1(10, null, 1), + WebAssembly.RuntimeError, /index out of bounds/); + + // Length-more-than-one fill1 at the edge of the table fails + assertErrorMessage(() => ins.exports.fill1(10, null, 2), + WebAssembly.RuntimeError, /index out of bounds/); + + + // Boundary tests on table 1: beyond the edge of the table: + + // Length-zero fill1 beyond the edge of the table fails + assertErrorMessage(() => ins.exports.fill1(11, null, 0), + WebAssembly.RuntimeError, /index out of bounds/); + + // Length-one fill1 beyond the edge of the table fails + assertErrorMessage(() => ins.exports.fill1(11, null, 1), + WebAssembly.RuntimeError, /index out of bounds/); + + // Length-more-than-one fill1 beyond the edge of the table fails + assertErrorMessage(() => ins.exports.fill1(11, null, 2), + WebAssembly.RuntimeError, /index out of bounds/); + + // Following all the above tests on table 1, check table 0 hasn't changed. + check_table0(); +} + +var objs = []; +for (var i = 0; i < N; i++) + objs[i] = {n:i}; +testTableFill('externref', 'externref', objs); + +var funcs = []; +for (var i = 0; i < N; i++) + funcs[i] = wasmEvalText(`(module (func (export "x") (result i32) (i32.const ${i})))`).exports.x; +testTableFill('funcref', 'funcref', funcs); + + +// Type errors. Required sig is: (i32, externref, i32) -> void + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t 10 externref) + (func $expected-3-args-got-0 + (table.fill $t) + ))`), + WebAssembly.CompileError, /(popping value from empty stack)|(nothing on stack)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t 10 externref) + (func $expected-3-args-got-1 + (table.fill $t (i32.const 0)) + ))`), + WebAssembly.CompileError, /(popping value from empty stack)|(nothing on stack)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t 10 externref) + (func $expected-3-args-got-2 + (table.fill $t (ref.null extern) (i32.const 0)) + ))`), + WebAssembly.CompileError, /(popping value from empty stack)|(nothing on stack)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t 10 externref) + (func $argty-1-wrong + (table.fill $t (i32.const 0) (ref.null extern) (f64.const 0)) + ))`), + WebAssembly.CompileError, + /(type mismatch: expression has type f64 but expected i32)|(type mismatch: expected i32, found f64)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t 10 externref) + (func $argty-2-wrong + (table.fill $t (i32.const 0) (f32.const 0) (i32.const 0)) + ))`), + WebAssembly.CompileError, + /(type mismatch: expression has type f32 but expected externref)|(type mismatch: expected externref, found f32)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t 10 externref) + (func $argty-3-wrong + (table.fill $t (i64.const 0) (ref.null extern) (i32.const 0)) + ))`), + WebAssembly.CompileError, + /(type mismatch: expression has type i64 but expected i32)|(type mismatch: expected i32, found i64)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t 10 externref) + (func $retty-wrong (result i32) + (table.fill $t (i32.const 0) (ref.null extern) (i32.const 0)) + ))`), + WebAssembly.CompileError, + /(popping value from empty stack)|(nothing on stack)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table 8 funcref) + (func (param $v externref) + (table.fill (i32.const 0) (local.get $v) (i32.const 0))) + )`), + WebAssembly.CompileError, + /(expression has type externref but expected funcref)|(type mismatch: expected funcref, found externref)/); diff --git a/js/src/jit-test/tests/wasm/ref-types/tables-generalized.js b/js/src/jit-test/tests/wasm/ref-types/tables-generalized.js new file mode 100644 index 0000000000..19e530baae --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/tables-generalized.js @@ -0,0 +1,432 @@ +/////////////////////////////////////////////////////////////////////////// +// +// General table management in wasm + +// Wasm: Create table-of-externref + +new WebAssembly.Module(wasmTextToBinary( + `(module + (table 10 externref))`)); + +// Wasm: Import table-of-externref +// JS: create table-of-externref + +new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + `(module + (table (import "m" "t") 10 externref))`)), + {m:{t: new WebAssembly.Table({element:"externref", initial:10})}}); + +new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + `(module + (import "m" "t" (table 10 externref)))`)), + {m:{t: new WebAssembly.Table({element:"externref", initial:10})}}); + +// Wasm: Export table-of-externref, initial values shall be null + +{ + let ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + `(module + (table (export "t") 10 externref))`))); + let t = ins.exports.t; + assertEq(t.length, 10); + for (let i=0; i < t.length; i++) + assertEq(t.get(0), null); +} + +// JS: Exported table can be grown, and values are preserved + +{ + let ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + `(module + (table (export "t") 10 externref))`))); + let t = ins.exports.t; + let objs = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]; + for (let i in objs) + t.set(i, objs[i]); + ins.exports.t.grow(10); + assertEq(ins.exports.t.length, 20); + for (let i in objs) + assertEq(t.get(i), objs[i]); +} + +// Wasm: table.copy between tables of externref (currently source and destination +// are both table zero) + +{ + let ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + `(module + (table (export "t") 10 externref) + (func (export "f") + (table.copy (i32.const 5) (i32.const 0) (i32.const 3))))`))); + let t = ins.exports.t; + let objs = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]; + for (let i in objs) + t.set(i, objs[i]); + ins.exports.f(); + assertEq(t.get(0), objs[0]); + assertEq(t.get(1), objs[1]); + assertEq(t.get(2), objs[2]); + assertEq(t.get(3), objs[3]); + assertEq(t.get(4), objs[4]); + assertEq(t.get(5), objs[0]); + assertEq(t.get(6), objs[1]); + assertEq(t.get(7), objs[2]); + assertEq(t.get(8), objs[8]); + assertEq(t.get(9), objs[9]); +} + +// Wasm: table.copy from table(funcref) to table(externref) should not work + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (table (export "t") 10 externref) + (func $f1) + (func $f2) + (func $f3) + (func $f4) + (func $f5) + (table 5 funcref) + (elem (table 1) (i32.const 0) func $f1 $f2 $f3 $f4 $f5) + (func (export "f") + (table.copy 0 1 (i32.const 5) (i32.const 0) (i32.const 5))))`)), + WebAssembly.CompileError, + /(expression has type funcref but expected externref)|(type mismatch)/); + +// Wasm: table.copy from table(externref) to table(funcref) should not work + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (table 10 funcref) + (table 10 externref) + (func (export "f") + (table.copy 0 1 (i32.const 0) (i32.const 0) (i32.const 5))))`)), + WebAssembly.CompileError, + /(expression has type externref but expected funcref)|(type mismatch)/); + +// Wasm: Element segments of funcref can't target tables of externref + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (func $f1 (result i32) (i32.const 0)) + (table (export "t") 10 externref) + (elem 0 (i32.const 0) funcref (ref.func $f1)))`)), + WebAssembly.CompileError, + /type mismatch/); + + +// Wasm: Element segments of externref can't target tables of funcref + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (table (export "t") 10 funcref) + (elem 0 (i32.const 0) externref (ref.null extern)))`)), + WebAssembly.CompileError, + /type mismatch/); + +// Wasm: table.init on table-of-externref is not allowed when the segment has +// funcref. + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (func $f1 (result i32) (i32.const 0)) + (table 10 externref) + (elem funcref (ref.func $f1)) + (func + (table.init 0 (i32.const 0) (i32.const 0) (i32.const 0))))`)), + WebAssembly.CompileError, + /(expression has type funcref but expected externref)|(type mismatch)/); + + +// Wasm: table.init on table-of-funcref is not allowed when the segment has +// externref. + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (table 10 funcref) + (elem externref (ref.null extern)) + (func + (table.init 0 (i32.const 0) (i32.const 0) (i32.const 0))))`)), + WebAssembly.CompileError, + /(expression has type externref but expected funcref)|(type mismatch)/); + +// Wasm: table types must match at link time + +assertErrorMessage( + () => new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + `(module + (import "m" "t" (table 10 externref)))`)), + {m:{t: new WebAssembly.Table({element:"anyfunc", initial:10})}}), + WebAssembly.LinkError, + /imported table type mismatch/); + +// call_indirect cannot reference table-of-externref + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (table 10 externref) + (type $t (func (param i32) (result i32))) + (func (result i32) + (call_indirect (type $t) (i32.const 37))))`)), + WebAssembly.CompileError, + /(indirect calls must go through a table of 'funcref')|(indirect calls must go through a table of funcref)/); + +/////////////////////////////////////////////////////////////////////////// +// +// additional js api tests + +{ + let tbl = new WebAssembly.Table({element:"externref", initial:10}); + + // Initial value is undefined. This is different from when tables are + // created inside wasm. + assertEq(tbl.get(0), undefined); + + // Identity preserving. + let x = {hi: 48}; + tbl.set(0, x); + assertEq(tbl.get(0), x); + tbl.set(2, dummy); + assertEq(tbl.get(2), dummy); + tbl.set(2, null); + assertEq(tbl.get(2), null); + + // Temporary semantics is to convert to object and leave as object; once we + // have a better wrapped externref this will change, we won't be able to + // observe the boxing. + tbl.set(1, 42); + let y = tbl.get(1); + assertEq(typeof y, "number"); + assertEq(y, 42); +} + +function dummy() { return 37 } + +/////////////////////////////////////////////////////////////////////////// +// +// table.get and table.set + +const wasmFun = wasmEvalText(`(module (func (export "x")))`).exports.x; + +// table.get in bounds - returns right value type & value +// table.get out of bounds - fails + +function testTableGet(type, x) { + let ins = wasmEvalText( + `(module + (table (export "t") 10 ${type}) + (func (export "f") (param i32) (result ${type}) + (table.get (local.get 0))))`); + ins.exports.t.set(0, x); + assertEq(ins.exports.f(0), x); + assertEq(ins.exports.f(1), null); + assertErrorMessage(() => ins.exports.f(10), WebAssembly.RuntimeError, /index out of bounds/); + assertErrorMessage(() => ins.exports.f(-5), WebAssembly.RuntimeError, /index out of bounds/); +} +testTableGet('externref', {}); +testTableGet('funcref', wasmFun); + +// table.get with non-i32 index - fails validation + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (table 10 externref) + (func (export "f") (param f64) (result externref) + (table.get (local.get 0))))`)), + WebAssembly.CompileError, + /type mismatch/); + +// table.get when there are no tables - fails validation + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (func (export "f") (param i32) + (drop (table.get (local.get 0)))))`)), + WebAssembly.CompileError, + /(table index out of range for table.get)|(table index out of bounds)/); + +// table.set in bounds with i32 x externref - works, no value generated +// table.set with null - works +// table.set out of bounds - fails + +function testTableSet(lhs_type, rhs_type, rhs_reftype, x) { + let ins = wasmEvalText( + `(module + (table (export "t") 10 ${lhs_type}) + (func (export "set_ref") (param i32) (param ${rhs_type}) + (table.set (local.get 0) (local.get 1))) + (func (export "set_null") (param i32) + (table.set (local.get 0) (ref.null ${rhs_reftype}))))`); + ins.exports.set_ref(3, x); + assertEq(ins.exports.t.get(3), x); + ins.exports.set_null(3); + assertEq(ins.exports.t.get(3), null); + + assertErrorMessage(() => ins.exports.set_ref(10, x), WebAssembly.RuntimeError, /index out of bounds/); + assertErrorMessage(() => ins.exports.set_ref(-1, x), WebAssembly.RuntimeError, /index out of bounds/); +} +testTableSet('externref', 'externref', 'extern', {}); +testTableSet('funcref', 'funcref', 'func', wasmFun); + +// Wasm: table.set on table(funcref) with externref value should fail + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (table (export "t") 10 funcref) + (func (export "set_ref") (param i32) (param externref) + (table.set (local.get 0) (local.get 1))))`)), + WebAssembly.CompileError, + /(type mismatch: expression has type externref but expected funcref)|(type mismatch: expected funcref, found externref)/); + +// table.set with non-i32 index - fails validation + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (table 10 externref) + (func (export "f") (param f64) + (table.set (local.get 0) (ref.null extern))))`)), + WebAssembly.CompileError, + /type mismatch/); + +// table.set with non-ref value - fails validation + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (table 10 externref) + (func (export "f") (param f64) + (table.set (i32.const 0) (local.get 0))))`)), + WebAssembly.CompileError, + /type mismatch/); +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (table 10 funcref) + (func (export "f") (param f64) + (table.set (i32.const 0) (local.get 0))))`)), + WebAssembly.CompileError, + /type mismatch/); + +// table.set when there are no tables - fails validation + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (func (export "f") (param externref) + (table.set (i32.const 0) (local.get 0))))`)), + WebAssembly.CompileError, + /(table index out of range for table.set)|(table index out of bounds)/); + +function testTableGrow(lhs_type, lhs_reftype, rhs_type, x) { + let ins = wasmEvalText( + `(module + (table (export "t") 10 20 ${lhs_type}) + (func (export "grow") (param i32) (result i32) + (table.grow (ref.null ${lhs_reftype}) (local.get 0))) + (func (export "grow2") (param i32) (param ${rhs_type}) (result i32) + (table.grow (local.get 1) (local.get 0))))`); + + // we can grow table of references + // table.grow with zero delta - always works even at maximum + // table.grow with delta - works and returns correct old value + // table.grow with delta at upper limit - fails + // table.grow with negative delta - fails + assertEq(ins.exports.grow(0), 10); + assertEq(ins.exports.t.length, 10); + assertEq(ins.exports.grow(1), 10); + assertEq(ins.exports.t.length, 11); + assertEq(ins.exports.t.get(10), null); + assertEq(ins.exports.grow2(9, x), 11); + assertEq(ins.exports.t.length, 20); + for (var i = 11; i < 20; i++) + assertEq(ins.exports.t.get(i), x); + assertEq(ins.exports.grow(0), 20); + + // The JS API throws if it can't grow + assertErrorMessage(() => ins.exports.t.grow(1), RangeError, /failed to grow table/); + assertErrorMessage(() => ins.exports.t.grow(-1), TypeError, /bad [Tt]able grow delta/); + + // The wasm API does not throw if it can't grow, but returns -1 + assertEq(ins.exports.grow(1), -1); + assertEq(ins.exports.t.length, 20); + assertEq(ins.exports.grow(-1), -1); + assertEq(ins.exports.t.length, 20) +} +testTableGrow('externref', 'extern', 'externref', 42); +testTableGrow('funcref', 'func', 'funcref', wasmFun); + +// Wasm: table.grow on table(funcref) with externref initializer should fail + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (table (export "t") 10 20 funcref) + (func (export "grow2") (param i32) (param externref) (result i32) + (table.grow (local.get 1) (local.get 0))))`)), + WebAssembly.CompileError, + /(type mismatch: expression has type externref but expected funcref)|(type mismatch: expected funcref, found externref)/); + +// Special case for private tables without a maximum + +{ + let ins = wasmEvalText( + `(module + (table 10 externref) + (func (export "grow") (param i32) (result i32) + (table.grow (ref.null extern) (local.get 0))))`); + assertEq(ins.exports.grow(0), 10); + assertEq(ins.exports.grow(1), 10); + assertEq(ins.exports.grow(9), 11); + assertEq(ins.exports.grow(0), 20); +} + +// table.grow with non-i32 argument - fails validation + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (table 10 externref) + (func (export "f") (param f64) + (table.grow (ref.null extern) (local.get 0))))`)), + WebAssembly.CompileError, + /type mismatch/); + +// table.grow when there are no tables - fails validation + +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary( + `(module + (func (export "f") (param i32) + (table.grow (ref.null extern) (local.get 0))))`)), + WebAssembly.CompileError, + /(table index out of range for table.grow)|(table index out of bounds)/); + +// table.size on table of externref + +for (let visibility of ['', '(export "t")', '(import "m" "t")']) { + let exp = {m:{t: new WebAssembly.Table({element:"externref", + initial: 10, + maximum: 20})}}; + let ins = wasmEvalText( + `(module + (table ${visibility} 10 20 externref) + (func (export "grow") (param i32) (result i32) + (table.grow (ref.null extern) (local.get 0))) + (func (export "size") (result i32) + (table.size)))`, + exp); + assertEq(ins.exports.grow(0), 10); + assertEq(ins.exports.size(), 10); + assertEq(ins.exports.grow(1), 10); + assertEq(ins.exports.size(), 11); + assertEq(ins.exports.grow(9), 11); + assertEq(ins.exports.size(), 20); + assertEq(ins.exports.grow(0), 20); + assertEq(ins.exports.size(), 20); +} + +// table.size on table of funcref + +{ + let ins = wasmEvalText( + `(module + (table (export "t") 2 funcref) + (func (export "f") (result i32) + (table.size)))`); + assertEq(ins.exports.f(), 2); + ins.exports.t.grow(1); + assertEq(ins.exports.f(), 3); +} diff --git a/js/src/jit-test/tests/wasm/ref-types/tables-multiple.js b/js/src/jit-test/tests/wasm/ref-types/tables-multiple.js new file mode 100644 index 0000000000..15686d1bcc --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/tables-multiple.js @@ -0,0 +1,465 @@ +// Note that negative tests not having to do with table indices have been taken +// care of by tables-generalized.js. + +/////////////////////////////////////////////////////////////////////////// +// +// Positive tests + +// - multiple local tables of misc type: syntax, validation, instantiation +// - element segments can point to a table +// - call-indirect can specify a table and will use it + +var ins = wasmEvalText( + `(module + (table $t1 2 funcref) + (table $t2 2 funcref) + (type $ftype (func (param i32) (result i32))) + (elem (table $t1) (i32.const 0) func $f1 $f2) + (elem (table $t2) (i32.const 0) func $f3 $f4) + (func $f1 (param $n i32) (result i32) + (i32.add (local.get $n) (i32.const 1))) + (func $f2 (param $n i32) (result i32) + (i32.add (local.get $n) (i32.const 2))) + (func $f3 (param $n i32) (result i32) + (i32.add (local.get $n) (i32.const 3))) + (func $f4 (param $n i32) (result i32) + (i32.add (local.get $n) (i32.const 4))) + (func (export "f") (param $fn i32) (param $n i32) (result i32) + (call_indirect $t1 (type $ftype) (local.get $n) (local.get $fn))) + (func (export "g") (param $fn i32) (param $n i32) (result i32) + (call_indirect $t2 (type $ftype) (local.get $n) (local.get $fn))))`).exports; + +assertEq(ins.f(0, 10), 11); +assertEq(ins.f(1, 10), 12); +assertEq(ins.g(0, 10), 13); +assertEq(ins.g(1, 10), 14); + +// - export multiple tables. +// note the first and third tables make the export list not start at zero, +// and make it sparse + +var ins = wasmEvalText( + `(module + (table $t0 (import "m" "t") 2 funcref) + (table $t1 (export "t1") 2 funcref) + (table 1 externref) + (table $t2 (export "t2") 3 funcref))`, + {m:{t: new WebAssembly.Table({element:"anyfunc", initial:2})}}).exports; + +assertEq(ins.t1 instanceof WebAssembly.Table, true); +assertEq(ins.t1.length, 2); +assertEq(ins.t2 instanceof WebAssembly.Table, true); +assertEq(ins.t2.length, 3); + +// - multiple imported tables of misc type +// - table.get and table.set can point to a table + +var exp = {m:{t0: new WebAssembly.Table({element:"anyfunc", initial:2}), + t1: new WebAssembly.Table({element:"externref", initial:3}), + t2: new WebAssembly.Table({element:"anyfunc", initial:4}), + t3: new WebAssembly.Table({element:"externref", initial:5})}}; +var ins = wasmEvalText( + `(module + (table $t0 (import "m" "t0") 2 funcref) + (table $t1 (import "m" "t1") 3 externref) + (table $t2 (import "m" "t2") 4 funcref) + (table $t3 (import "m" "t3") 5 externref) + + (type $id_i32_t (func (param i32) (result i32))) + (func $id_i32 (param i32) (result i32) (local.get 0)) + (elem (table $t0) (i32.const 1) func $id_i32) + + (type $id_f64_t (func (param f64) (result f64))) + (func $id_f64 (param f64) (result f64) (local.get 0)) + (elem (table $t2) (i32.const 3) func $id_f64) + + (func (export "f0") (param i32) (result i32) + (call_indirect $t0 (type $id_i32_t) (local.get 0) (i32.const 1))) + + (func (export "f1") (param externref) + (table.set $t1 (i32.const 2) (local.get 0))) + + (func (export "f2") (param f64) (result f64) + (call_indirect $t2 (type $id_f64_t) (local.get 0) (i32.const 3))) + + (func (export "f3") + (table.set $t3 (i32.const 4) (table.get $t1 (i32.const 2)))))`, + + exp).exports; + +assertEq(ins.f0(37), 37); + +var x = {} +ins.f1(x); +assertEq(exp.m.t1.get(2), x); + +assertEq(ins.f2(3.25), 3.25); + +ins.f3(); +assertEq(exp.m.t3.get(4), x); + +// - table.grow can point to a table +// - growing a table grows the right table but not the others +// - table.size on tables other than table 0 + +var exp = {m:{t0: new WebAssembly.Table({element:"externref", initial:2}), + t1: new WebAssembly.Table({element:"externref", initial:3})}}; +var ins = wasmEvalText( + `(module + (table $t0 (import "m" "t0") 2 externref) + (table $t1 (import "m" "t1") 3 externref) + (func (export "f") (result i32) + (table.grow $t1 (ref.null extern) (i32.const 5))) + (func (export "size0") (result i32) + (table.size $t0)) + (func (export "size1") (result i32) + (table.size $t1)))`, + exp); + +assertEq(ins.exports.f(), 3); +assertEq(exp.m.t1.length, 8); +assertEq(ins.exports.size0(), 2); +assertEq(ins.exports.size1(), 8); + +// - table.copy can point to tables + +var exp = {m:{t0: new WebAssembly.Table({element:"externref", initial:2}), + t1: new WebAssembly.Table({element:"externref", initial:3})}}; +var ins = wasmEvalText( + `(module + (table $t0 (import "m" "t0") 2 externref) + (table $t1 (import "m" "t1") 3 externref) + (func (export "f") (param $dest i32) (param $src i32) (param $len i32) + (table.copy $t1 $t0 (local.get $dest) (local.get $src) (local.get $len))))`, + exp); + +exp.m.t0.set(0, {x:0}); +exp.m.t0.set(1, {x:1}); +ins.exports.f(1, 0, 2); +assertEq(exp.m.t1.get(1), exp.m.t0.get(0)); +assertEq(exp.m.t1.get(2), exp.m.t0.get(1)); + +// - the table.copy syntax makes sense even in the non-parenthesized case + +var ins = wasmEvalText( + `(module + (table $t0 2 externref) + (table $t1 2 externref) + (func (export "copy") (param $dest i32) (param $src i32) (param $len i32) + local.get $dest + local.get $src + local.get $len + table.copy $t1 $t0) + (func (export "set") (param $n i32) (param $v externref) + (table.set $t0 (local.get $n) (local.get $v))) + (func (export "get") (param $n i32) (result externref) + (table.get $t1 (local.get $n))))`, + exp); + +var values = [{x:0}, {x:1}]; +ins.exports.set(0, values[0]); +ins.exports.set(1, values[1]); +ins.exports.copy(0, 0, 2); +assertEq(ins.exports.get(0), values[0]); +assertEq(ins.exports.get(1), values[1]); + +// Copy beween an external table and a local table. These cases are interesting +// mostly because the representations of the tables must be compatible; the copy +// in effect forces a representation for the function in the local table that +// captures the function's instance, at the latest at the time the copy is +// executed. +// +// In the case where the function is imported, it comes from a different module. +// +// Also tests: +// - local tables can be exported and re-imported in another module + +var arg = 4; +for (let [a,b,x,y,result,init] of [['$t0', '$t1', '(export "t")', '', arg*13, true], + ['$t0', '$t1', '', '(export "t")', arg*13, true], + ['$t0', '$t1', '(import "m" "t")', '', arg*13, true], + ['$t1', '$t0', '(import "m" "t")', '', arg-11, false]]) +{ + var otherins = wasmEvalText( + `(module + (table $t (export "t") 2 funcref) + (type $fn1 (func (param i32) (result i32))) + (func $f1 (param $n i32) (result i32) + (i32.sub (local.get $n) (i32.const 11))) + (elem (table $t) (i32.const 1) func $f1))`); + + let text = + `(module + (table ${a} ${x} 2 funcref) + + (table ${b} ${y} 2 funcref) + (type $fn1 (func (param i32) (result i32))) + (func $f1 (param $n i32) (result i32) + (i32.mul (local.get $n) (i32.const 13))) + ${init ? "(elem (table $t1) (i32.const 1) func $f1)" : ""} + + (func (export "f") (param $n i32) (result i32) + (table.copy $t0 $t1 (i32.const 0) (i32.const 0) (i32.const 2)) + (call_indirect $t0 (type $fn1) (local.get $n) (i32.const 1))))`; + var ins = wasmEvalText(text, {m: otherins.exports}); + + assertEq(ins.exports.f(arg), result); +} + +// - a table can be imported multiple times, and when it is, and one of them is grown, +// they are all grown. +// - test the (import "m" "t" (table ...)) syntax +// - if table is grown from JS, wasm can observe the growth + +var tbl = new WebAssembly.Table({element:"externref", initial:1}); +var exp = {m: {t0: tbl, t1:tbl}}; + +var ins = wasmEvalText( + `(module + (import "m" "t0" (table $t0 1 externref)) + (import "m" "t1" (table $t1 1 externref)) + (table $t2 (export "t2") 1 funcref) + (func (export "f") (result i32) + (table.grow $t0 (ref.null extern) (i32.const 1))) + (func (export "g") (result i32) + (table.grow $t1 (ref.null extern) (i32.const 1))) + (func (export "size") (result i32) + (table.size $t2)))`, + exp); + +assertEq(ins.exports.f(), 1); +assertEq(ins.exports.g(), 2); +assertEq(ins.exports.f(), 3); +assertEq(ins.exports.g(), 4); +assertEq(tbl.length, 5); +ins.exports.t2.grow(3); +assertEq(ins.exports.size(), 4); + +// - table.init on tables other than table 0 + +var ins = wasmEvalText( + `(module + (table $t0 2 funcref) + (table $t1 2 funcref) + (elem func $f0 $f1) ;; 0 + (type $ftype (func (param i32) (result i32))) + (func $f0 (param i32) (result i32) + (i32.mul (local.get 0) (i32.const 13))) + (func $f1 (param i32) (result i32) + (i32.sub (local.get 0) (i32.const 11))) + (func (export "call") (param i32) (param i32) (result i32) + (call_indirect $t1 (type $ftype) (local.get 1) (local.get 0))) + (func (export "init") + (table.init $t1 0 (i32.const 0) (i32.const 0) (i32.const 2))))`); + +ins.exports.init(); +assertEq(ins.exports.call(0, 10), 130); +assertEq(ins.exports.call(1, 10), -1); + +// - [white-box] if a multi-imported table of funcref is grown and the grown +// part is properly initialized with functions then calls through both tables +// in the grown area should succeed, ie, bounds checks should pass. this is +// an interesting case because we cache the table bounds for the benefit of +// call_indirect, so here we're testing that the caches are updated properly +// even when a table is observed multiple times (also by multiple modules). +// there's some extra hair here because a table of funcref can be grown only +// from JS at the moment. +// - also test that bounds checking continues to catch OOB calls + +var tbl = new WebAssembly.Table({element:"anyfunc", initial:2}); +var exp = {m:{t0: tbl, t1: tbl}}; +var ins = wasmEvalText( + `(module + (import "m" "t0" (table $t0 2 funcref)) + (import "m" "t1" (table $t1 2 funcref)) + (type $ftype (func (param f64) (result f64))) + (func (export "f") (param $n f64) (result f64) + (f64.mul (local.get $n) (f64.const 3.25))) + (func (export "do0") (param $i i32) (param $n f64) (result f64) + (call_indirect $t0 (type $ftype) (local.get $n) (local.get $i))) + (func (export "do1") (param $i i32) (param $n f64) (result f64) + (call_indirect $t1 (type $ftype) (local.get $n) (local.get $i))))`, + exp); +var ins2 = wasmEvalText( + `(module + (import "m" "t0" (table $t0 2 funcref)) + (import "m" "t1" (table $t1 2 funcref)) + (type $ftype (func (param f64) (result f64))) + (func (export "do0") (param $i i32) (param $n f64) (result f64) + (call_indirect $t0 (type $ftype) (local.get $n) (local.get $i))) + (func (export "do1") (param $i i32) (param $n f64) (result f64) + (call_indirect $t1 (type $ftype) (local.get $n) (local.get $i))))`, + exp); + +assertEq(tbl.grow(10), 2); +tbl.set(11, ins.exports.f); +assertEq(ins.exports.do0(11, 2.0), 6.5); +assertEq(ins.exports.do1(11, 4.0), 13.0); +assertEq(ins2.exports.do0(11, 2.0), 6.5); +assertEq(ins2.exports.do1(11, 4.0), 13.0); +assertErrorMessage(() => ins.exports.do0(12, 2.0), + WebAssembly.RuntimeError, + /index out of bounds/); +assertErrorMessage(() => ins2.exports.do0(12, 2.0), + WebAssembly.RuntimeError, + /index out of bounds/); +assertErrorMessage(() => ins.exports.do1(12, 2.0), + WebAssembly.RuntimeError, + /index out of bounds/); +assertErrorMessage(() => ins2.exports.do1(12, 2.0), + WebAssembly.RuntimeError, + /index out of bounds/); + +/////////////////////////////////////////////////////////////////////////// +// +// Negative tests + +// Table index (statically) out of bounds + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t0 2 externref) + (table $t1 2 externref) + (func $f (result externref) + (table.get 2 (i32.const 0))))`), + WebAssembly.CompileError, + /(table index out of range for table.get)|(table index out of bounds)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t0 2 externref) + (table $t1 2 externref) + (func $f (param externref) + (table.set 2 (i32.const 0) (local.get 0))))`), + WebAssembly.CompileError, + /(table index out of range for table.set)|(table index out of bounds)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t0 2 externref) + (table $t1 2 externref) + (func $f (param externref) + (table.copy 0 2 (i32.const 0) (i32.const 0) (i32.const 2))))`), + WebAssembly.CompileError, + /(table index out of range for table.copy)|(table index out of bounds)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t0 2 externref) + (table $t1 2 externref) + (func $f (param externref) + (table.copy 2 0 (i32.const 0) (i32.const 0) (i32.const 2))))`), + WebAssembly.CompileError, + /(table index out of range for table.copy)|(table index out of bounds)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t0 2 externref) + (table $t1 2 externref) + (func $f (result i32) + (table.size 2)))`), + WebAssembly.CompileError, + /(table index out of range for table.size)|(table index out of bounds)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t0 2 externref) + (table $t1 2 externref) + (func $f (result i32) + (table.grow 2 (ref.null extern) (i32.const 1))))`), + WebAssembly.CompileError, + /(table index out of range for table.grow)|(table index out of bounds)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t0 2 funcref) + (elem func) ;; 0 + (func $f (result i32) + (table.init 2 0 (i32.const 0) (i32.const 0) (i32.const 0))))`), + WebAssembly.CompileError, + /(table index out of range for table.init)|(table index out of bounds)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t0 2 funcref) + (elem 2 (i32.const 0) func))`), + WebAssembly.CompileError, + /(table index out of range for element segment)|(table index out of bounds)/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t0 2 funcref) + (type $ft (func (param f64) (result i32))) + (func $f (result i32) + (call_indirect 2 (type $ft) (f64.const 3.14) (i32.const 0))))`), + WebAssembly.CompileError, + /(table index out of range for call_indirect)|(table index out of bounds)/); + +// Syntax errors when parsing text + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t0 2 funcref) + (elem func) ;; 0 + (func $f (result i32) + (table.init $t0 (i32.const 0) (i32.const 0) (i32.const 0))))`), // no segment + SyntaxError, + /failed to find name/); + +assertErrorMessage(() => wasmEvalText( + `(module + (table $t0 2 funcref) + (table $t1 2 funcref) + (func $f + (table.copy 0 (i32.const 0) (i32.const 0) (i32.const 2))))`), // target without source + SyntaxError, + /unexpected token, expected an index or an identifier/); + +// Make sure that dead code doesn't prevent compilation. +wasmEvalText( + `(module + (table (export "t") 10 externref) + (func (param i32) + (return) + (table.get (local.get 0)) + (drop) + ) + )`); + +wasmEvalText( + `(module + (table (export "t") 10 externref) + (func (param i32) (param i32) + (return) + (table.grow (local.get 1)) + (drop) + ) + )`); + +wasmEvalText( + `(module + (table (export "t") 10 externref) + (func (param i32) (param externref) + (return) + (table.set (local.get 0) (local.get 1)) + ) + )`); + +wasmEvalText( + `(module + (table (export "t") 10 externref) + (func + (return) + (table.size) + (drop) + ) + )`); + +wasmEvalText( + `(module + (table (export "t") 10 externref) + (func + (return) + (table.copy (i32.const 0) (i32.const 1)) + ) + )`); diff --git a/js/src/jit-test/tests/wasm/ref-types/tables-postbarrier-grow.js b/js/src/jit-test/tests/wasm/ref-types/tables-postbarrier-grow.js new file mode 100644 index 0000000000..20086e6579 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/tables-postbarrier-grow.js @@ -0,0 +1,21 @@ +// Add test for issue with a post-write barrier that doesn't remove +// store buffer entries when used on a table that may grow. + +let {set, table} = wasmEvalText(`(module + (table (export "table") 1 externref) + (func (export "set") (param externref) + i32.const 0 + local.get 0 + table.set + ) +)`).exports; + +let tenured = {}; +gc(tenured); +assertEq(isNurseryAllocated(tenured), false); +let nursery = {}; +assertEq(isNurseryAllocated(nursery), true); +set(nursery); +set(null); +assertEq(table.grow(1000), 1, 'table grows'); +gc(); diff --git a/js/src/jit-test/tests/wasm/ref-types/tables-stress.js b/js/src/jit-test/tests/wasm/ref-types/tables-stress.js new file mode 100644 index 0000000000..ccee9100b1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/ref-types/tables-stress.js @@ -0,0 +1,46 @@ +for ( let prefix of ['', '(table $prefix 0 32 funcref)']) { + let mod = new WebAssembly.Module(wasmTextToBinary( + `(module + (import "m" "item" (func $item (result externref))) + ${prefix} + (table $tbl 0 externref) + (func (export "run") (param $numiters i32) + (local $i i32) + (local $j i32) + (local $last i32) + (local $iters i32) + (local $tmp externref) + (local.set $last (table.grow $tbl (ref.null extern) (i32.const 1))) + (table.set $tbl (local.get $last) (call $item)) + (loop $iter_continue + (local.set $i (i32.const 0)) + (local.set $j (local.get $last)) + (block $l_break + (loop $l_continue + (br_if $l_break (i32.ge_s (local.get $j) (local.get $i))) + (local.set $tmp (table.get $tbl (local.get $i))) + (if (i32.eqz (i32.rem_s (local.get $i) (i32.const 3))) + (then (local.set $tmp (call $item)))) + (table.set $tbl (local.get $i) (table.get $tbl (local.get $j))) + (table.set $tbl (local.get $j) (local.get $tmp)) + (local.set $i (i32.add (local.get $i) (i32.const 1))) + (local.set $j (i32.sub (local.get $j) (i32.const 1))) + (br $l_continue)) + (local.set $iters (i32.add (local.get $iters) (i32.const 1))) + (br_if $iter_continue (i32.lt_s (local.get $iters) (local.get $numiters)))))))`)); + + for (let [mode,freq] of [[14,100], // Compact every 100 allocations + [2,12], // Collect every 12 allocations + [7,100], // Minor gc every 100 allocations + [15,100]]) // Verify heap integrity + { + if (this.gczeal) + this.gczeal(mode,freq); + let k = 0; + let ins = new WebAssembly.Instance(mod, {m:{item:() => { return { x: k++ } }}}).exports; + for ( let i=0; i < 1000; i++ ) + ins.run(1000); + } +} + + diff --git a/js/src/jit-test/tests/wasm/regress/baseline-arm64-chunk-pop.js b/js/src/jit-test/tests/wasm/regress/baseline-arm64-chunk-pop.js new file mode 100644 index 0000000000..a951b6747a --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-arm64-chunk-pop.js @@ -0,0 +1,31 @@ +var bin = wasmTextToBinary( + `(module + (func (export "f4786") (result i32) + (local i32 i64 i64 i64 f32) + i32.const 1 + local.tee 0 + local.get 0 + local.get 0 + local.get 0 + local.get 0 + local.get 0 + local.get 0 + local.get 0 + if (result i32) + local.get 0 + else + local.get 0 + local.tee 0 + local.get 0 + br_if 1 + end + drop + drop + drop + drop + drop + drop + drop))`); +var ins = new WebAssembly.Instance(new WebAssembly.Module(bin)); +ins.exports.f4786(); + diff --git a/js/src/jit-test/tests/wasm/regress/baseline-builtin-abi.js b/js/src/jit-test/tests/wasm/regress/baseline-builtin-abi.js new file mode 100644 index 0000000000..16de2dc400 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-builtin-abi.js @@ -0,0 +1,20 @@ +// Bug 1488515 - ABI issues on Android because both the baseline compiler and +// the builtin thunks converted between hardFP and softFP. + +var prog = wasmEvalText( + `(module + (func $f64div (export "test") (param $a f64) (param $b f64) (result f64) + (local $dummy0 i32) + (local $dummy1 i32) + (local $dummy2 i32) + (local $dummy3 i32) + (local $dummy4 i32) + (local $x f64) + (local $y f64) + (local $z f64) + (local.set $x (local.get $a)) + (local.set $y (local.get $b)) + (local.set $z (f64.floor (f64.div (local.get $x) (local.get $y)))) + (local.get $z)))`); + +assertEq(prog.exports.test(16096, 32), 503); diff --git a/js/src/jit-test/tests/wasm/regress/baseline-bytereg.js b/js/src/jit-test/tests/wasm/regress/baseline-bytereg.js new file mode 100644 index 0000000000..8bdcc32618 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-bytereg.js @@ -0,0 +1,34 @@ +// Bug 1322450 is about the baseline compiler not properly handling a byte store +// from a wider datum on 32-bit x86 because it does not move the value to be +// stored to a valid byte register if it is in a 32-bit register that does not +// have a byte part (EDI/ESI/EBP). +// +// This test is white-box because it knows about the register allocation order: +// the two values pushed onto the stack occupy EAX and ECX, and the i64.store8 +// will use EDX for the index and (EDI or ESI or EBP) for the low register of +// the value to be stored. The i64.store8 instruction will then assert in the +// assembler. +// +// If the baseline compiler starts allocating registers in a different order +// then this test will be ineffective. + +wasmEvalText(`(module + (memory 1) + (func $run (param i64) (param i32) (param i32) + local.get 1 + local.get 2 + i32.add + + local.get 1 + local.get 2 + i32.add + + i32.const 0 + local.get 0 + i64.store8 + + drop + drop + ) + (export "run" (func $run)) +)`); diff --git a/js/src/jit-test/tests/wasm/regress/baseline-extend8.js b/js/src/jit-test/tests/wasm/regress/baseline-extend8.js new file mode 100644 index 0000000000..6e637e97c9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-extend8.js @@ -0,0 +1,34 @@ +// This attempts to test that we can do an 8-bit sign extend no matter what the +// source register. This test is arguably somewhat tied to the baseline +// compiler's register allocator, but is still appropriate for most simple +// register allocators. It works by filling an increasing number of registers +// with values so as eventually to force the source operand for extend8_s into a +// register that does not have a byte personality. + +for ( let i=0; i < 8; i++) { + let txt = + `(module + (func (export "f") (param i32) (result i32) + ${adds(i)} + (local.set 0 (i32.extend8_s (i32.add (local.get 0) (i32.const 1)))) + ${drops(i)} + (local.get 0)))`; + let ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(txt))); + assertEq(ins.exports.f(254), -1); +} + +function adds(n) { + let s = "" + for ( let i=0; i < n; i++ ) + s += "(i32.add (local.get 0) (i32.const 1))\n"; + return s; +} + +function drops(n) { + let s = ""; + for ( let i=0; i < n; i++ ) + s += "drop\n"; + return s; +} + + diff --git a/js/src/jit-test/tests/wasm/regress/baseline-getglobal-scratch.js b/js/src/jit-test/tests/wasm/regress/baseline-getglobal-scratch.js new file mode 100644 index 0000000000..2f4d74b912 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-getglobal-scratch.js @@ -0,0 +1,58 @@ +new WebAssembly.Module(wasmTextToBinary(` +(module + (global $g (mut i32) (i32.const 42)) + (func (param $i i32) + local.get $i + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + unreachable + ) +) +`)); + +new WebAssembly.Module(wasmTextToBinary(` +(module + (global $g (mut i32) (i32.const 42)) + (func (param $i i32) + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + global.get $g + local.get $i + global.set $g + unreachable + ) +) +`)); diff --git a/js/src/jit-test/tests/wasm/regress/baseline-i64-opt-cmp.js b/js/src/jit-test/tests/wasm/regress/baseline-i64-opt-cmp.js new file mode 100644 index 0000000000..eb6cafb8f0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-i64-opt-cmp.js @@ -0,0 +1,16 @@ +// Bug 1404760: Optimized compare-and-branch with a preserved value would fail +// the baseline compiler on x86 debug builds (and would just generate bad code +// on non-debug builds) because of register starvation. + +wasmEvalText( + `(module + (func $run (param i64) (param i64) (result i64) + block (result i64) + i64.const 1 + (i64.lt_s (local.get 0) (local.get 1)) + br_if 0 + drop + i64.const 2 + end) + (export "run" (func $run)))` +); diff --git a/js/src/jit-test/tests/wasm/regress/baseline-joinreg.js b/js/src/jit-test/tests/wasm/regress/baseline-joinreg.js new file mode 100644 index 0000000000..01bc3d5bbc --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-joinreg.js @@ -0,0 +1,16 @@ +// Bug 1322288 is about the floating join register not being reserved properly +// in the presence of boolean evaluation for control. The situation is that a +// conditional branch passes a floating point value to the join point; the join register +// must be available when it does that, but could have been allocated to the operands of +// the conditional expression of the control flow. +// +// This test is white-box: it depends on the floating join reg being among the first +// floating registers to be allocated. + +wasmEvalText(` +(module + (func $run + (drop (block (result f64) + (drop (br_if 0 (f64.const 1) (f64.eq (f64.const 1) (f64.const 0)))) + (drop (br 0 (f64.const 2)))))) + (export "run" (func $run)))`); diff --git a/js/src/jit-test/tests/wasm/regress/baseline-many-results.js b/js/src/jit-test/tests/wasm/regress/baseline-many-results.js new file mode 100644 index 0000000000..ff4d9c35dd --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-many-results.js @@ -0,0 +1,63 @@ +// This provokes a crash in baseline if its Stk reservation logic is not up to +// snuff, bug 1675844. + +var txt = ` +(module + (type (;0;) (func (result f32 f32 i32))) + (func $main (type 0) (result f32 f32 i32) + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + memory.size + call $main + call $main + call $main + call_indirect (type 0) + call $main + call $main + call $main + call $main + call $main + call $main + memory.size + call $main + call $main + call $main + call_indirect (type 0) + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + call $main + memory.size) + (table (;0;) 62 255 funcref) + (memory (;0;) 15 18) + (export "t1" (table 0)) + (export "memory" (memory 0)))`; +assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(txt)), + WebAssembly.CompileError, + /(unused values not explicitly dropped)|(expected f32, found i32)/); + diff --git a/js/src/jit-test/tests/wasm/regress/baseline-nops-jumptable.js b/js/src/jit-test/tests/wasm/regress/baseline-nops-jumptable.js new file mode 100644 index 0000000000..e4388296fb --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-nops-jumptable.js @@ -0,0 +1,12 @@ +// |jit-test| --arm-asm-nop-fill=1 +var f = wasmEvalText(`(module (func (param i32) (result i32) + (block $0 + (block $1 + (block $2 + (block $default + (br_table $0 $1 $2 $default (local.get 0)))))) + (return (i32.const 0))) + (export "" (func 0)) +)`).exports[""]; + +f(0); diff --git a/js/src/jit-test/tests/wasm/regress/baseline-pop-along-edge.js b/js/src/jit-test/tests/wasm/regress/baseline-pop-along-edge.js new file mode 100644 index 0000000000..650931c99a --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-pop-along-edge.js @@ -0,0 +1,66 @@ +// Bug 1316181 + +// There are locals with different values here to ensure that the +// local.get at the end picks up the right one even if the stack might +// have become unbalanced by a failure to adjust SP along the branch +// edge. The logic is that we use SP-relative addressing, and if the +// actual SP is not what the compiler thinks it is we will read +// something other than the expected value. + +var o = wasmEvalText( + `(module + (func (result i32) + (local $v0 i32) + (local $v1 i32) + (local $v2 i32) + (local $v3 i32) + (local $v4 i32) + (local $v5 i32) + (local $v6 i32) + (local $v7 i32) + (local $res i32) + (local.set $v0 (i32.const 0xDEADBEEF)) + (local.set $v1 (i32.const 0xFDEADBEE)) + (local.set $v2 (i32.const 0xEFDEADBE)) + (local.set $v3 (i32.const 0xEEFDEADB)) + (local.set $v4 (i32.const 0xBEEFDEAD)) + (local.set $v5 (i32.const 0xDBEEFDEA)) + (local.set $v6 (i32.const 0xADBEEFDE)) + (local.set $v7 (i32.const 0xEADBEEFD)) + (block $b + (local.set $res + (i32.add + (i32.add (i32.const 1) (i32.const 2)) + (i32.add + (i32.add (i32.const 3) (i32.const 4)) + (i32.add + (i32.add (i32.const 5) (i32.const 6)) + (i32.add + (i32.add (i32.const 7) (i32.const 8)) + (i32.add + (i32.add (i32.const 9) (i32.const 10)) + (i32.add + (i32.add (i32.const 11) (i32.const 12)) + (i32.add + (i32.add (i32.const 13) (i32.const 14)) + (i32.add + (i32.add (i32.const 15) (i32.const 16)) + (i32.add + (i32.add (i32.const 17) (i32.const 18)) + (i32.add + (i32.add (i32.const 19) (i32.const 20)) + (i32.add + (i32.add (i32.const 21) (i32.const 22)) + (i32.add + (i32.add (i32.const 23) (i32.const 24)) + (i32.add + (i32.add (i32.const 25) (i32.const 26)) + (i32.add + (i32.add (i32.const 27) (i32.const 28)) + (i32.add + (i32.add (i32.const 29) (i32.const 30)) + (br_if $b (i32.const 31) (i32.const 1))))))))))))))))))) + (return (local.get $v3))) + (export "a" (func 0)))`).exports; + +assertEq(o["a"](), 0xEEFDEADB|0); diff --git a/js/src/jit-test/tests/wasm/regress/baseline-pop-before-capture.js b/js/src/jit-test/tests/wasm/regress/baseline-pop-before-capture.js new file mode 100644 index 0000000000..b3a41f6949 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-pop-before-capture.js @@ -0,0 +1,12 @@ +// Bug 1319415 + +var src = +`(module + (func (result i32) + i32.const 0 + i32.const 1 + br_if 0 + unreachable) + (export "run" (func 0)))`; + +wasmFullPass(src, 0); diff --git a/js/src/jit-test/tests/wasm/regress/baseline-stack-height.js b/js/src/jit-test/tests/wasm/regress/baseline-stack-height.js new file mode 100644 index 0000000000..185a7c3069 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/baseline-stack-height.js @@ -0,0 +1 @@ +new WebAssembly.Module(os.file.readFile(scriptdir + "/baseline-stack-height.wasm", 'binary')); diff --git a/js/src/jit-test/tests/wasm/regress/baseline-stack-height.wasm b/js/src/jit-test/tests/wasm/regress/baseline-stack-height.wasm new file mode 100644 index 0000000000..cc25a1dac8 Binary files /dev/null and b/js/src/jit-test/tests/wasm/regress/baseline-stack-height.wasm differ diff --git a/js/src/jit-test/tests/wasm/regress/brtable-conditionblock-folding.js b/js/src/jit-test/tests/wasm/regress/brtable-conditionblock-folding.js new file mode 100644 index 0000000000..c1c4e9970c --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/brtable-conditionblock-folding.js @@ -0,0 +1,17 @@ +assertEq(wasmEvalText(` +(module + (func $f (param $p i32) + block $out + i32.const 0 + if + i32.const 1 + local.tee $p + br_table $out $out + end + end + local.get $p + br_if 0 + ) + (export "f" (func $f)) +) +`).exports.f(42), undefined); diff --git a/js/src/jit-test/tests/wasm/regress/bug-1833339.js b/js/src/jit-test/tests/wasm/regress/bug-1833339.js new file mode 100644 index 0000000000..fb99428f88 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug-1833339.js @@ -0,0 +1,17 @@ +let {a} = wasmEvalText(`(module + (tag (param ${'i32 '.repeat(10)})) + + (func (result ${'i32 '.repeat(130)}) + unreachable + ) + (func (export "a") + call 0 + try + catch 0 + unreachable + end + unreachable + ) +) +`).exports; +assertErrorMessage(a, WebAssembly.RuntimeError, /unreachable/); diff --git a/js/src/jit-test/tests/wasm/regress/bug1300546.js b/js/src/jit-test/tests/wasm/regress/bug1300546.js new file mode 100644 index 0000000000..2897995deb --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1300546.js @@ -0,0 +1,28 @@ +try { + wasmEvalText(` + (module + (type $type0 (func)) + (func $func0 + (nop) + (f64.load offset=59 align=1 (i32.const 0)) + (memory.size) + (memory.size) + (memory.size) + (memory.size) + (memory.size) + (memory.size) + (memory.size) + (memory.size) + (i64.rem_s (i64.const 17) (i64.xor (i64.const 17) (i64.xor (i64.const 17) (i64.xor (i64.xor (i64.const 17) (i64.const 17)) (i64.xor (i64.const 17) (i64.const 17)))))) + + (i64.rem_s + (i64.const 17) + (i64.xor + (i64.rem_s (i64.const 17) (i64.const 17)) + (i64.xor (i64.rem_s (i64.const 17) (i64.const 17)) (i64.xor (i64.const 17) (i64.const 17))))) + ) + (memory 1 1) + ) + `); +} catch(e) { +} diff --git a/js/src/jit-test/tests/wasm/regress/bug1311019.js b/js/src/jit-test/tests/wasm/regress/bug1311019.js new file mode 100644 index 0000000000..0a9e5bbb1e --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1311019.js @@ -0,0 +1,9 @@ +new WebAssembly.Module(wasmTextToBinary(`(module + (memory 1) + (func + (i64.trunc_f32_s (f32.const 6.96875)) + (i32.load8_s (i32.const 0)) + (f32.const -7.66028056e-31) + (unreachable) + ) +)`)); diff --git a/js/src/jit-test/tests/wasm/regress/bug1392105.js b/js/src/jit-test/tests/wasm/regress/bug1392105.js new file mode 100644 index 0000000000..4752da8ddf --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1392105.js @@ -0,0 +1,8 @@ +// |jit-test| --arm-asm-nop-fill=1 + +var code = "(module "; +for (var i = 0; i < 100; i++) + code += "(func (param i32) (result i32) (i32.add (i32.const 1) (local.get 0))) "; +code += ")"; +var buf = wasmTextToBinary(code); +WebAssembly.compile(buf); diff --git a/js/src/jit-test/tests/wasm/regress/bug1440512.js b/js/src/jit-test/tests/wasm/regress/bug1440512.js new file mode 100644 index 0000000000..1997b34f7f --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1440512.js @@ -0,0 +1,216 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() +var g = newGlobal({newCompartment: true}); +var dbg = new g.Debugger(this); +var dbg = new Debugger; +var kWasmH0 = 0; +var kWasmH1 = 0x61; +var kWasmH2 = 0x73; +var kWasmH3 = 0x6d; +var kWasmV0 = 0x1; +var kWasmV1 = 0; +var kWasmV2 = 0; +var kWasmV3 = 0; +let kTypeSectionCode = 1; // Function signature declarations +let kImportSectionCode = 2; // Import declarations +let kFunctionSectionCode = 3; // Function declarations +let kExportSectionCode = 7; // Exports +let kCodeSectionCode = 10; // Function code +let kWasmFunctionTypeForm = 0x60; +let kWasmI32 = 0x7f; +let kExternalFunction = 0; +let kSig_i_i = makeSig([kWasmI32], [kWasmI32]); +function makeSig(params, results) { + return { + params: params, + results: results + }; +} +let kExprEnd = 0x0b; +let kExprGetLocal = 0x20; +class Binary extends Array { + emit_u8(val) { + this.push(val); + } + emit_u32v(val) { + while (true) { + let v = val & 0xff; + val = val >>> 7; + this.push(v); + break; + } + } + emit_bytes(data) { + for (let i = 0; i < data.length; i++) { + this.push(data[i] & 0xff); + } + } + emit_string(string) { + let string_utf8 = unescape(encodeURIComponent(string)); + this.emit_u32v(string_utf8.length); + for (let i = 0; i < string_utf8.length; i++) { + this.emit_u8(string_utf8.charCodeAt(i)); + } + } + emit_header() { + this.push(kWasmH0, kWasmH1, kWasmH2, kWasmH3, kWasmV0, kWasmV1, kWasmV2, kWasmV3); + } + emit_section(section_code, content_generator) { + this.emit_u8(section_code); + let section = new Binary; + content_generator(section); + this.emit_u32v(section.length); + for (var i = 0; i < section.length; i++) this.push(section[i]); + } +} +class WasmFunctionBuilder { + constructor(module, name, type_index) { + this.module = module; + } + exportAs(name) { + this.module.addExport(name, this.index); + } + addBody(body) { + this.body = body.slice(); + this.body.push(kExprEnd); + return this; + } +} +class WasmModuleBuilder { + constructor() { + this.types = []; + this.imports = []; + this.exports = []; + this.functions = []; + } + addType(type) { + this.types.push(type); + } + addFunction(name, type) { + let type_index = (typeof type) == "number" ? type : this.addType(type); + let func = new WasmFunctionBuilder(this, name, type_index); + this.functions.push(func); + return func; + } + addImport(module = "", name, type) { + this.imports.push({ + module: module, + name: name, + kind: kExternalFunction, + }); + } + addExport(name, index) { + this.exports.push({ + name: name, + }); + } + toArray(debug = false) { + let binary = new Binary; + let wasm = this; + binary.emit_header(); + if (wasm.types.length > 0) { + binary.emit_section(kTypeSectionCode, section => { + section.emit_u32v(wasm.types.length); + for (let type of wasm.types) { + section.emit_u8(kWasmFunctionTypeForm); + section.emit_u32v(type.params.length); + for (let param of type.params) { + section.emit_u8(param); + } + section.emit_u32v(type.results.length); + for (let result of type.results) { + section.emit_u8(result); + } + } + }); + binary.emit_section(kImportSectionCode, section => { + section.emit_u32v(wasm.imports.length); + for (let imp of wasm.imports) { + section.emit_string(imp.module); + section.emit_string(imp.name || ''); + section.emit_u8(imp.kind); + if (imp.kind == kExternalFunction) { + section.emit_u32v(imp.type); + } + } + }); + binary.emit_section(kFunctionSectionCode, section => { + section.emit_u32v(wasm.functions.length); + for (let func of wasm.functions) { + section.emit_u32v(func.type_index); + } + }); + } + var mem_export = (wasm.memory !== undefined && wasm.memory.exp); + var exports_count = wasm.exports.length + (mem_export ? 1 : 0); + if (exports_count > 0) { + binary.emit_section(kExportSectionCode, section => { + section.emit_u32v(exports_count); + for (let exp of wasm.exports) { + section.emit_string(exp.name); + section.emit_u8(exp.kind); + section.emit_u8(0); + } + }); + } + if (wasm.start_index !== undefined) { + } + if (wasm.functions.length > 0) { + binary.emit_section(kCodeSectionCode, section => { + section.emit_u32v(wasm.functions.length); + for (let func of wasm.functions) { + let local_decls = []; + let header = new Binary; + header.emit_u32v(local_decls.length); + section.emit_u32v(header.length + func.body.length); + section.emit_bytes(header); + section.emit_bytes(func.body); + } + }); + } + let num_function_names = 0; + let num_functions_with_local_names = 0; + if (num_function_names > 0 || num_functions_with_local_names > 0 || wasm.name !== undefined) { + binary.emit_section(kUnknownSectionCode, section => { + if (num_function_names > 0) { + } + }); + } + return binary; + } + toBuffer(debug = false) { + let bytes = this.toArray(debug); + let buffer = new ArrayBuffer(bytes.length); + let view = new Uint8Array(buffer); + for (let i = 0; i < bytes.length; i++) { + let val = bytes[i]; + view[i] = val | 0; + } + return buffer; + } + toModule(debug = false) { + return new WebAssembly.Module(this.toBuffer(debug)); + } +} +const verifyHeap = gc; +function testProperties(obj) { + for (let i = 0; i < 3; i++) { + verifyHeap(); + } +} +(function ExportedFunctionTest() { + var builder = new WasmModuleBuilder(); + builder.addFunction("exp", kSig_i_i).addBody([ + kExprGetLocal, 0, + ]).exportAs("exp"); + let module1 = builder.toModule(); + let instance1 = new WebAssembly.Instance(module1); + let g = instance1.exports.exp; + testProperties(g); + builder.addImport("imp", "func", kSig_i_i); + let module2 = builder.toModule(); + let instance2 = new WebAssembly.Instance(module2, { + imp: { + func: g + } + }); +})(); diff --git a/js/src/jit-test/tests/wasm/regress/bug1450800.js b/js/src/jit-test/tests/wasm/regress/bug1450800.js new file mode 100644 index 0000000000..fb8493c102 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1450800.js @@ -0,0 +1,27 @@ +// |jit-test| skip-if: !this.gczeal || !WebAssembly.Global + +gczeal(9, 10); +function wasmEvalText(str, imports) { + let binary = wasmTextToBinary(str); + m = new WebAssembly.Module(binary); + return new WebAssembly.Instance(m, imports); +} +assertEq(wasmEvalText(`(module + (global (import "a" "b") i32) + (export "g" (global 0)) + (func (export "get") (result i32) global.get 0))`, + { a: { b: 42 }}).exports.get(), + 42); +for (let v of []) {} +function testInitExpr(type, initialValue, nextValue, coercion, assertFunc = assertEq) { + var module = wasmEvalText(`(module + (import "globals" "a" (global ${type})) + (global $glob_imm ${type} (global.get 0)) + (export "global_imm" (global $glob_imm)) + )`, { + globals: { + a: coercion(initialValue) + } + }).exports; +} +testInitExpr('i32', 13, 37, x => x | 0); diff --git a/js/src/jit-test/tests/wasm/regress/bug1467415.js b/js/src/jit-test/tests/wasm/regress/bug1467415.js new file mode 100644 index 0000000000..177e67ba08 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1467415.js @@ -0,0 +1,29 @@ + +// This exposed an alias analysis bug in the Wasm Ion machinery. It should +// compute 125 (88 + 37) but with the bug would compute 176 (88 + 88) instead. +// See bug 1467415. + +let mt = ` +(module + (import "m" "g" (global (mut i32))) + (import "m" "h" (global (mut i32))) + (memory 1 1) + (data (i32.const 0) "\\01\\00\\00\\00\\01\\00\\00\\00\\01\\00\\00\\00") + (func (export "f") (result i32) + (local i32) + (local i32) + (block (result i32) + (local.set 0 (global.get 0)) + (block (result i32) + (global.set 1 (i32.const 37)) + (block (result i32) + (local.set 1 (global.get 0)) + (i32.add (local.get 0) (local.get 1))))))) +`; + +let glob = new WebAssembly.Global({value:'i32', mutable:true}, 88); +let module = new WebAssembly.Module(wasmTextToBinary(mt)); +let ins = new WebAssembly.Instance(module, {m:{g:glob, h:glob}}); + +let shouldBe125 = ins.exports.f(); +assertEq(shouldBe125, 125); diff --git a/js/src/jit-test/tests/wasm/regress/bug1491322.js b/js/src/jit-test/tests/wasm/regress/bug1491322.js new file mode 100644 index 0000000000..ae3d6a0e73 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1491322.js @@ -0,0 +1,35 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() +var evalInFrame = (function(global) { + var dbgGlobal = newGlobal({newCompartment: true}); + var dbg = new dbgGlobal.Debugger(); + dbg.addDebuggee(global); +})(this); +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +var m = new Module(wasmTextToBinary(`(module + (import "" "foo" (func $foo (result i32))) + (import "" "bar" (func $bar (result i32))) + (table 3 funcref) + (func $baz (result i32) (i32.const 13)) + (elem (i32.const 0) $foo $bar $baz) + (export "tbl" (table 0)) +)`)); +var jsFun = () => 83; +var wasmFun = new Instance( + new Module( + wasmTextToBinary('(module (func (result i32) (i32.const 42)) (export "foo" (func 0)))') + ) +).exports.foo; +var e1 = new Instance(m, { + "": { + foo: jsFun, + bar: wasmFun + } +}).exports; +var e2 = new Instance(m, { + "": { + foo: jsFun, + bar: jsFun + } +}).exports; +e2.tbl.get(0); diff --git a/js/src/jit-test/tests/wasm/regress/bug1502886.js b/js/src/jit-test/tests/wasm/regress/bug1502886.js new file mode 100644 index 0000000000..a45bf774a4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1502886.js @@ -0,0 +1,30 @@ +newGlobal({newCompartment: true}); +g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +gczeal(2, 100); +function f(x, initFunc) { + newGlobal({newCompartment: true}); + g.eval(` + var binary = wasmTextToBinary('${x}'); + new WebAssembly.Instance(new WebAssembly.Module(binary)); + `); + var wasmScript = dbg.findScripts().filter(s => s.format == 'wasm')[0]; + var offsets = wasmScript.getPossibleBreakpointOffsets(); + initFunc({ + wasmScript, + breakpoints: offsets + }) +}; +try { + f('(module (func nop nop) (export "" (func 0)))', + function({ + wasmScript, + breakpoints + }) { + breakpoints.forEach(function(offset) { + wasmScript.setBreakpoint(offset, s = {}); + }); + } + ); + f(); +} catch (e) {} diff --git a/js/src/jit-test/tests/wasm/regress/bug1507314.js b/js/src/jit-test/tests/wasm/regress/bug1507314.js new file mode 100644 index 0000000000..db07593d87 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1507314.js @@ -0,0 +1,6 @@ +// |jit-test| --no-sse4 +if (!wasmCachingEnabled()) + quit(0); + +var m = wasmCompileInSeparateProcess(wasmTextToBinary('(module (func (export "run") (result i32) (i32.const 42)))')); +assertEq(new WebAssembly.Instance(m).exports.run(), 42); diff --git a/js/src/jit-test/tests/wasm/regress/bug1533204.js b/js/src/jit-test/tests/wasm/regress/bug1533204.js new file mode 100644 index 0000000000..e901fd066b --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1533204.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: helperThreadCount() === 0 +enableOsiPointRegisterChecks(); +evalInWorker(` +function DiagModule(stdlib, foreign) { + "use asm"; + function diag() { + while(1) {} + } + return {}; +`); diff --git a/js/src/jit-test/tests/wasm/regress/bug1566992.js b/js/src/jit-test/tests/wasm/regress/bug1566992.js new file mode 100644 index 0000000000..52d2c0710c --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1566992.js @@ -0,0 +1,14 @@ +let { exports: { f } } = wasmEvalText(` +(module + (func (export "f") + (block + i64.const 0xfffffffe00000000 + i32.wrap_i64 + br_table 0 1 + ) + unreachable + ) +) +`); + +assertErrorMessage(f, WebAssembly.RuntimeError, /unreachable/); diff --git a/js/src/jit-test/tests/wasm/regress/bug1569137.js b/js/src/jit-test/tests/wasm/regress/bug1569137.js new file mode 100644 index 0000000000..d80ae95486 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1569137.js @@ -0,0 +1,67 @@ +let { exports: { f } } = wasmEvalText(` +(module + (memory $0 1 1) + + (func (export "f") (result f32) + (local $0 i32) (local $1 f64) (local $2 i32) + + (local.set 0 (i32.const 134219779)) + (local.set 1 (f64.const 3810600700439633677210579e165)) + + (f32.floor + (loop $label$2 (result f32) + (br_if $label$2 + (i32.load offset=3 align=2 + (block $label$4 (result i32) + (drop + (if (result f64) + (br_if $label$4 + (i32.const 4883) + (i32.const -124) + ) + (then (f64.const 77)) + (else + (block (result f64) + (drop + (br_if $label$4 + (i32.const 4194304) + (i32.const -8192) + ) + ) + (return + (f32.const 4294967296) + ) + ) + ) + ) + ) + (br_if $label$4 + (br_if $label$4 + (i32.const -90) + (br_if $label$4 + (br_if $label$4 + (local.get $2) + (i32.const -16) + ) + (i32.const 15656) + ) + ) + (block $label$18 (result i32) + (i32.eqz + (br_if $label$4 + (i32.const -1) + (i32.const 15) + ) + ) + ) + ) + ) + ) + ) + (f32.const 23) + ) + ) + ) +)`); + +f(); diff --git a/js/src/jit-test/tests/wasm/regress/bug1590920.js b/js/src/jit-test/tests/wasm/regress/bug1590920.js new file mode 100644 index 0000000000..4317a53b26 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1590920.js @@ -0,0 +1,11 @@ +let { exports } = new WebAssembly.Instance(new WebAssembly.Module( + wasmTextToBinary(` + (module + (func (export "g") + (drop + (block (result i32) + (i32.clz (i32.const 1)) + (if + (i32.const 1) + (then (return)))))))`))); +exports.g(); diff --git a/js/src/jit-test/tests/wasm/regress/bug1678542.js b/js/src/jit-test/tests/wasm/regress/bug1678542.js new file mode 100644 index 0000000000..8c3f44fa6d --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1678542.js @@ -0,0 +1,11 @@ +var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (global $g (export "g") (mut f64) (f64.const 0)) + (func $p (param f64) (result f64) (local.get 0)) + (func (export "f") (param f64) (result f64) + (global.set $g (f64.neg (local.get 0))) + (call $p (local.get 0))))`))); +assertEq(ins.exports.f(3), 3); +assertEq(ins.exports.g.value, -3); + + diff --git a/js/src/jit-test/tests/wasm/regress/bug1678785.js b/js/src/jit-test/tests/wasm/regress/bug1678785.js new file mode 100644 index 0000000000..b04ac8480b --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1678785.js @@ -0,0 +1,20 @@ + +// This exposed a bug in CL's aarch64 isel, in which the -4098 was +// incorrectly sign-extended out to 64 bits. + +let { exports } = new WebAssembly.Instance(new WebAssembly.Module( + wasmTextToBinary(` + (module + (type (;0;) (func)) + (type (;1;) (func (result i32))) + (type (;2;) (func (result i64))) + (func (;0;) (type 0) + i32.const -4098 + i32.load16_s offset=1 + drop) + (memory (;0;) 1) + (export "g" (func 0)))` ))); +try { + exports.g(); +} catch (e) {} + diff --git a/js/src/jit-test/tests/wasm/regress/bug1684861.js b/js/src/jit-test/tests/wasm/regress/bug1684861.js new file mode 100644 index 0000000000..4cb9bb2383 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1684861.js @@ -0,0 +1,54 @@ +const oob = /index out of bounds/; +const unaligned = /unaligned memory access/; +const RuntimeError = WebAssembly.RuntimeError; + +// Test memory.atomic.notify unaligned access. +const module = new WebAssembly.Module(wasmTextToBinary(`(module + (type (;0;) (func)) + (func $main (type 0) + i32.const -64 + i32.const -63 + memory.atomic.notify offset=1 + unreachable) + (memory (;0;) 4 4) + (export "main" (func $main)))`)); + +const instance = new WebAssembly.Instance(module); +assertErrorMessage(() => instance.exports.main(), RuntimeError, unaligned); + +// Test memory.atomic.notify oob access. +const module2 = new WebAssembly.Module(wasmTextToBinary(`(module + (type (;0;) (func)) + (func $main (type 0) + i32.const -64 + i32.const -63 + memory.atomic.notify offset=65536 + unreachable) + (memory (;0;) 4 4) + (export "main" (func $main)))`)); + +const instance2 = new WebAssembly.Instance(module2); +assertErrorMessage(() => instance2.exports.main(), RuntimeError, oob); + +// Test memory.atomic.wait32 and .wait64 unaligned access. +const module3 = new WebAssembly.Module(wasmTextToBinary(`(module + (type (;0;) (func)) + (func $wait32 (type 0) + i32.const -64 + i32.const 42 + i64.const 0 + memory.atomic.wait32 offset=1 + unreachable) + (func $wait64 (type 0) + i32.const -64 + i64.const 43 + i64.const 0 + memory.atomic.wait64 offset=3 + unreachable) + (memory (;0;) 4 4 shared) + (export "wait32" (func $wait32)) + (export "wait64" (func $wait64)))`)); + +const instance3 = new WebAssembly.Instance(module3); +assertErrorMessage(() => instance3.exports.wait32(), RuntimeError, unaligned); +assertErrorMessage(() => instance3.exports.wait64(), RuntimeError, unaligned); diff --git a/js/src/jit-test/tests/wasm/regress/bug1699647.js b/js/src/jit-test/tests/wasm/regress/bug1699647.js new file mode 100644 index 0000000000..4e51013b85 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1699647.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !getBuildConfiguration("x86") + +const module = new Uint8Array([ + 0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0, + 5,4,1,1,0,0,7,10,1,6,109,101,109,111,114,121,2,0,10,49, + 1,47,0,65,16,253,1,1,1,253,253,1,253,131,1,65,158,232, + 68,253,1,1,1,253,100,65,16,253,1,1,1,253,11,0,0,253,1,1, + 1,65,158,232,68,253,1,1,0,0,11,0,14,4,110,97,109,101,1, + 7,1,0,4,109,97,105,110]); +new WebAssembly.Module(module) diff --git a/js/src/jit-test/tests/wasm/regress/bug1700610.js b/js/src/jit-test/tests/wasm/regress/bug1700610.js new file mode 100644 index 0000000000..adeca4cb88 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1700610.js @@ -0,0 +1,8 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !getBuildConfiguration("x86") + +const module = new Uint8Array([ + 0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,111,3,2,1,0,5,4,1,1,0,0,10,38,1,36, + 0,65,1,253,4,0,81,253,21,1,253,4,0,81,253,21,0,253,1,0,81,253,21,1,253,4, + 0,81,253,21,0,50,0,0,0,11,0,14,4,110,97,109,101,1,7,1,0,4,109,97,105,110 +]); +new WebAssembly.Module(module) diff --git a/js/src/jit-test/tests/wasm/regress/bug1708124.js b/js/src/jit-test/tests/wasm/regress/bug1708124.js new file mode 100644 index 0000000000..dc035b02e5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1708124.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('oomTest' in this) +// Ensure that trap reporting mechanism doesn't crash under OOM conditions. + +oomTest( + wasmEvalText( + `(module + (func (export "f") (result) + unreachable))` + ).exports.f +); diff --git a/js/src/jit-test/tests/wasm/regress/bug1713581.js b/js/src/jit-test/tests/wasm/regress/bug1713581.js new file mode 100644 index 0000000000..a7201ccb22 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1713581.js @@ -0,0 +1,13 @@ +function wasmEvalText(str, imports, options) { + let binary = wasmTextToBinary(str); + m = new WebAssembly.Module(binary, options); + return new WebAssembly.Instance(m, imports); +} +let ins = wasmEvalText(` + (module + (func (export "fill0") (param $r externref)) + ) +`); +for (let i53 = 0; i53 < 1000; i53++) { + ins.exports.fill0("hello") +} diff --git a/js/src/jit-test/tests/wasm/regress/bug1727284/directives.txt b/js/src/jit-test/tests/wasm/regress/bug1727284/directives.txt new file mode 100644 index 0000000000..82e51d5a01 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1727284/directives.txt @@ -0,0 +1 @@ +|jit-test| --fast-warmup; --ion-warmup-threshold=0; --wasm-compiler=optimizing; include:wasm.js diff --git a/js/src/jit-test/tests/wasm/regress/bug1727284/test.js b/js/src/jit-test/tests/wasm/regress/bug1727284/test.js new file mode 100644 index 0000000000..54d7350be9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1727284/test.js @@ -0,0 +1,12 @@ +function test() { + let instance = wasmEvalText(` + (module + (global $g (mut externref) (ref.null extern)) + (func (export "set") (param externref) local.get 0 global.set $g) + ) + `).exports; + let obj = { field: null }; + instance.set(obj); + for (var v4 = 0; v4 < 10; v4++) {} +} +test(); diff --git a/js/src/jit-test/tests/wasm/regress/bug1747870.js b/js/src/jit-test/tests/wasm/regress/bug1747870.js new file mode 100644 index 0000000000..2625e965fb --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1747870.js @@ -0,0 +1,19 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// This should not release-assert, which it could previously do on some 32-bit +// platforms due to the too-limited size of a bitfield. + +const MaxParams = 1000; // Per spec + +var params = ''; +for ( var i=0 ; i < MaxParams-1; i++ ) { + params += '(param v128) ' +} +params += '(param externref)' + +new WebAssembly.Module(wasmTextToBinary(` +(module + (func $f) + (func ${params} (result externref) + (call $f) + (local.get ${MaxParams-1})))`)); diff --git a/js/src/jit-test/tests/wasm/regress/bug1761850.js b/js/src/jit-test/tests/wasm/regress/bug1761850.js new file mode 100644 index 0000000000..609991bde4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1761850.js @@ -0,0 +1,79 @@ +// Testing runtime execution of select + comparison operations. +// Normally they are folded into shorter/faster sequence than select alone. + +const floatOps = { + lt(a, b) { return a < b ? 0 : 1; }, + le(a, b) { return a <= b ? 0 : 1; }, + gt(a, b) { return a > b ? 0 : 1; }, + ge(a, b) { return a >= b ? 0 : 1; }, + eq(a, b) { return a === b ? 0 : 1; }, + ne(a, b) { return a !== b ? 0 : 1; }, +} + +for (let ty of ['f32', 'f64']) { + for (let op of ['lt', 'le', 'gt', 'ge', 'eq', 'ne']) { + const module = new WebAssembly.Module(wasmTextToBinary(`(module + (memory (export "memory") 1 1) + (func (export "test") (result i32) + i32.const 128 + i32.load8_u + i32.const 129 + i32.load8_u + i32.const 0 + ${ty}.load + i32.const ${ty == 'f32' ? 4 : 8} + ${ty}.load + ${ty}.${op} + select + ) + (data (i32.const 128) "\\00\\01"))`)); + const instance = new WebAssembly.Instance(module); + const arr = new (ty == 'f32' ? Float32Array : Float64Array)(instance.exports.memory.buffer); + for (let [a, b] of cross( + [0, 1, -1e100, Infinity, -Infinity, 1e100, -1e-10, 1/-Infinity, NaN] + )) { + arr[0] = a; arr[1] = b; + assertEq(instance.exports.test(), floatOps[op](arr[0], arr[1])) + } + } +} + +const intOps = { + lt(a, b) { return a < b ? 0 : 1; }, + le(a, b) { return a <= b ? 0 : 1; }, + gt(a, b) { return a > b ? 0 : 1; }, + ge(a, b) { return a >= b ? 0 : 1; }, + eq(a, b) { return a === b ? 0 : 1; }, + ne(a, b) { return a !== b ? 0 : 1; }, +} + +for (let [ty, signed] of [['i32', true], ['i32', false], ['i64', true], ['i64', false]]) { + for (let op of ['lt', 'le', 'gt', 'ge', 'eq', 'ne']) { + const module = new WebAssembly.Module(wasmTextToBinary(`(module + (memory (export "memory") 1 1) + (func (export "test") (result i32) + i32.const 128 + i32.load8_u + i32.const 129 + i32.load8_u + i32.const 0 + ${ty}.load + i32.const ${ty == 'i32' ? 4 : 8} + ${ty}.load + ${ty}.${op}${op[0] == 'l' || op[0] == 'g' ? (signed ? '_s' : '_u') : ''} + select + ) + (data (i32.const 128) "\\00\\01"))`)); + const instance = new WebAssembly.Instance(module); + const arr = new (ty == 'i32' ? (signed ? Int32Array : Uint32Array) : + (signed ? BigInt64Array : BigUint64Array)) + (instance.exports.memory.buffer); + const c = ty == 'i32' ? (a => a|0) : BigInt; + for (let [a, b] of cross( + [c(0), ~c(0), c(1), ~c(1), c(1) << c(8), ~c(1) << c(12)] + )) { + arr[0] = a; arr[1] = b; + assertEq(instance.exports.test(), intOps[op](arr[0], arr[1])) + } + } +} diff --git a/js/src/jit-test/tests/wasm/regress/bug1762899.js b/js/src/jit-test/tests/wasm/regress/bug1762899.js new file mode 100644 index 0000000000..3938c93a02 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1762899.js @@ -0,0 +1,34 @@ +var ins = wasmEvalText(` +(module + (func (export "copysign_f64") (param f64 f64) (result f64) + f64.const 0x1.921fb54442d18p+0 (;=1.5708;) + local.get 0 + f64.copysign + ) + (func (export "copysign_f32") (param f32 f32) (result f32) + f32.const 0x1.921fb54442d18p+0 (;=1.5708;) + local.get 0 + f32.copysign + ) + (func (export "copysign_f64_2") (param f64 f64) (result f64) + local.get 1 + f64.const 0x1.921fb54442d18p+0 (;=1.5708;) + f64.copysign + ) + (func (export "copysign_f32_2") (param f32 f32) (result f32) + local.get 1 + f32.const -0x1.921fb54442d18p+0 (;=1.5708;) + f32.copysign + ) + +) +`); + +assertEq(ins.exports.copysign_f64(1, 0), 1.5707963267948966); +assertEq(ins.exports.copysign_f64(-1, 0), -1.5707963267948966); +assertEq(ins.exports.copysign_f32(1, 0), 1.5707963705062866); +assertEq(ins.exports.copysign_f32(-1, 0), -1.5707963705062866); +assertEq(ins.exports.copysign_f64_2(0, 1), 1); +assertEq(ins.exports.copysign_f64_2(0, -1), 1); +assertEq(ins.exports.copysign_f32_2(0, 1), -1); +assertEq(ins.exports.copysign_f32_2(0, -1), -1); diff --git a/js/src/jit-test/tests/wasm/regress/bug1770335.js b/js/src/jit-test/tests/wasm/regress/bug1770335.js new file mode 100644 index 0000000000..569d7bd35e --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1770335.js @@ -0,0 +1,33 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// Check if GVN indentifies two non-indentical shuffles. During value numbering +// the control field/data might look the same. Shuffle or permute kind, and +// operands order have to be taking into account during value numbering. +// If GVN fails to recognize the following shuffles as different, the v128.xor +// produces zero output. +var ins = wasmEvalText(`(module + (memory (export "memory") 1 1) + (func $test (param v128) (result v128) + local.get 0 + v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000 + i8x16.shuffle 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000 + local.get 0 + i8x16.shuffle 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + v128.xor + ) + (func (export "run") + i32.const 16 + i32.const 0 + v128.load + call $test + v128.store + ) +)`); + +const mem64 = new BigInt64Array(ins.exports.memory.buffer, 0, 4); +mem64[0] = 0x123456789n; +mem64[1] = -0xFDCBA000n; +ins.exports.run(); +assertEq(mem64[2], -0xFDCBA000n); +assertEq(mem64[3], 0x123456789n); diff --git a/js/src/jit-test/tests/wasm/regress/bug1777604/directives.txt b/js/src/jit-test/tests/wasm/regress/bug1777604/directives.txt new file mode 100644 index 0000000000..e627a21880 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1777604/directives.txt @@ -0,0 +1 @@ +|jit-test| --ion-offthread-compile=off; --ion-eager; include:wasm.js diff --git a/js/src/jit-test/tests/wasm/regress/bug1777604/test.js b/js/src/jit-test/tests/wasm/regress/bug1777604/test.js new file mode 100644 index 0000000000..5accdbdd14 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1777604/test.js @@ -0,0 +1,35 @@ +// |jit-test| skip-if: !wasmStreamingEnabled() + +const { Instance, compile, compileStreaming } = WebAssembly; + +for (let i = 0; i < 200; i++) { + // Possibly free code from a previous iteration, increasing probability + // new code will be allocated in a location previous code was. + gc(undefined, "shrinking"); + + function compileAndRun(x, g) { + var cache = streamCacheEntry(wasmTextToBinary(x)); + + compileStreaming(cache).then(function (m) { + g(new Instance(m, undefined)); + return compileStreaming(cache); + }).then(function (m) { + g(new Instance(m, undefined)); + }); + + // Serialize the promise execution at this point + drainJobQueue(); + } + + // Compile two different modules to increase probability that a module is + // is compiled to a page that a different module resided in previously. + compileAndRun('(module \ + (func $test (param i64) (result f64) local.get 0 f64.convert_i64_u )\ + (func (export "run") (result i32) i64.const 1 call $test f64.const 1 f64.eq )\ + )', function (i) {}); + compileAndRun('(module \ + (func (export "run") (result i64) (i64.const 1))\ + )', function (i) { + i.exports.run(); + }); +} diff --git a/js/src/jit-test/tests/wasm/regress/bug1836708.js b/js/src/jit-test/tests/wasm/regress/bug1836708.js new file mode 100644 index 0000000000..87b7483bd6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1836708.js @@ -0,0 +1,19 @@ +// Testing i64.mul in wasm with a 2 ** n +- 1 value as operand, which may +// be optimized in code generation. +var mulImmOperands = []; + +for (let i = 0n; i < 64n; i++) { + mulImmOperands.push(2n ** i - 1n); + mulImmOperands.push(2n ** i + 1n); +} + +for (const immVal of mulImmOperands) { + const ins = wasmEvalText(`(module + (func (export "mul_i64") (param i64) (result i64) + local.get 0 + i64.const ${immVal} + i64.mul + ))`); + + assertEq(ins.exports.mul_i64(42n), BigInt.asIntN(64, 42n * immVal)); +} diff --git a/js/src/jit-test/tests/wasm/regress/bug1837686.js b/js/src/jit-test/tests/wasm/regress/bug1837686.js new file mode 100644 index 0000000000..3ae29ceac9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1837686.js @@ -0,0 +1,50 @@ + +// A bug in Ion's alias analysis was causing the two `global.get 0`s +// to be GVNd together, despite the fact that the call inside the try +// block changes the value. In this case, this caused the returned +// value to be 7 rather than the correct value 5. + +const wasm = wasmTextToBinary(`(module + (global $g (mut i32) (i32.const 0)) + (func $f0 + i32.const 1 + global.set 0 + ) + (func $f1 (param i32) (param i32) (result i32) + global.get 0 + + i32.eqz + if + local.get 0 + i32.const 1 + i32.or + local.set 0 + end + + try + call $f0 + + global.get 0 + i32.eqz + if + local.get 0 + i32.const 2 + i32.or + local.set 0 + end + catch_all + i32.const 15 + local.set 0 + end + local.get 0 +) + (func (export "test") (result i32) + i32.const 4 + i32.const 0 + call $f1 + ) +)`); + +const mod = new WebAssembly.Module(wasm); +const ins = new WebAssembly.Instance(mod); +assertEq(ins.exports.test(), 5); diff --git a/js/src/jit-test/tests/wasm/regress/bug1839065.js b/js/src/jit-test/tests/wasm/regress/bug1839065.js new file mode 100644 index 0000000000..ecc4c1b90c --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1839065.js @@ -0,0 +1,28 @@ +// |jit-test| --wasm-gc; --wasm-function-references; skip-if: !wasmGcEnabled() || !wasmFunctionReferencesEnabled() +function wasmEvalText(str, imports) { + let binary = wasmTextToBinary(str); + m = new WebAssembly.Module(binary); + return new WebAssembly.Instance(m, imports); +} +let { newElem, f1, f2, f3, f4 } = wasmEvalText(` + (type $a (array funcref)) + (elem $e func $f1 $f2 $f3 $f4) + (func $f1 ) + (func $f2 ) + (func $f3 ) + (func $f4 ) + (func (export "newElem") (result eqref) + i32.const 0 + i32.const 4 + array.new_elem $a $e + )`).exports; + +let s = "no exception"; +try { + wasmGcReadField(newElem(), -1.5); +} catch (e) { + s = "" + e; +} + +assertEq(s, "Error: Second argument must be a non-negative integer. " + + "Usage: wasmGcReadField(obj, index)"); diff --git a/js/src/jit-test/tests/wasm/regress/bug1839142.js b/js/src/jit-test/tests/wasm/regress/bug1839142.js new file mode 100644 index 0000000000..339c1d7cb9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1839142.js @@ -0,0 +1,6 @@ +// |jit-test| --wasm-gc; --wasm-function-references; skip-if: !wasmSimdEnabled() || !wasmGcEnabled() || !wasmFunctionReferencesEnabled() +var wasm_code = new Uint8Array([0,97,115,109,1,0,0,0,1,152,128,128,128,0,4,80,0,95,1,126,0,80,0,94,124,1,80,0,96,3,127,127,127,1,127,96,0,0,3,130,128,128,128,0,1,2,4,133,128,128,128,0,1,112,1,1,1,5,132,128,128,128,0,1,1,16,32,13,131,128,128,128,0,1,0,3,6,204,131,128,128,0,62,100,107,0,66,197,129,131,134,140,152,176,224,64,251,0,0,11,127,0,65,196,129,131,134,124,11,100,107,0,66,192,129,131,134,204,132,137,146,36,251,0,0,11,124,1,68,0,0,0,0,0,0,0,0,11,124,1,68,0,0,0,0,0,0,0,0,11,124,1,68,0,0,0,0,0,0,0,0,11,124,1,68,0,0,0,0,0,0,0,0,11,100,107,0,66,192,129,131,134,140,216,53,251,0,0,11,100,107,1,66,210,164,201,146,165,202,148,169,210,0,66,210,164,201,146,165,202,212,156,218,0,66,192,129,131,134,140,152,176,224,64,66,192,129,131,134,140,152,176,224,64,126,125,66,192,129,131,128,130,152,176,224,64,125,66,192,129,131,190,130,152,176,224,36,125,66,164,200,0,125,125,66,0,125,66,0,125,66,0,125,251,0,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,127,0,65,0,11,7,136,128,128,128,0,1,4,109,97,105,110,0,0,9,139,128,128,128,0,1,6,0,65,0,11,112,1,210,0,11,10,141,133,128,128,0,1,138,5,0,65,238,235,177,226,126,253,15,253,83,32,0,65,235,146,246,155,122,65,244,231,246,248,124,253,15,253,164,1,65,230,152,157,154,7,253,15,253,164,1,118,65,167,184,218,133,127,253,15,253,164,1,118,118,66,149,131,127,66,164,128,218,132,206,227,209,231,254,0,65,230,133,189,200,126,65,252,208,237,164,5,254,32,0,132,245,241,222,13,27,254,71,2,211,226,246,158,7,66,243,213,226,237,209,166,141,199,0,68,76,189,205,180,194,110,195,89,36,3,131,253,18,253,127,253,127,253,127,253,127,253,164,1,65,138,173,198,47,65,138,248,237,203,120,65,205,162,146,252,5,65,190,148,192,156,5,254,53,0,200,229,139,195,9,65,167,139,216,173,5,65,215,146,221,45,254,53,0,169,255,135,252,1,254,53,0,193,209,131,217,7,40,2,134,242,184,197,3,65,228,191,145,146,6,65,142,162,226,169,4,254,53,0,168,178,151,189,15,113,109,71,109,107,254,46,0,191,232,145,230,9,67,66,84,34,11,67,88,147,220,200,91,68,233,240,20,66,52,37,190,38,182,187,182,187,182,187,182,187,182,187,57,3,168,169,148,198,10,65,226,162,208,167,7,65,221,226,226,242,120,107,65,140,215,139,233,5,65,141,151,153,19,107,107,65,188,134,175,165,5,65,183,219,200,136,121,107,65,250,197,157,214,123,65,139,168,173,167,126,107,107,107,42,1,249,156,171,169,13,187,182,187,182,187,182,187,182,187,182,65,191,253,243,170,122,253,15,65,203,195,202,169,122,253,15,65,179,204,244,234,123,253,15,253,119,65,166,184,138,186,122,253,15,65,129,140,243,163,6,253,15,253,119,65,229,139,254,233,121,253,15,65,183,191,195,183,122,253,15,253,119,253,119,65,151,211,231,151,122,253,15,253,119,253,119,253,119,65,192,156,192,215,3,65,178,193,209,198,7,107,65,240,157,246,199,6,65,221,225,148,169,1,107,65,145,183,142,141,127,65,188,218,139,244,7,107,107,65,236,243,250,169,127,65,146,241,174,181,120,107,65,139,147,232,229,124,65,255,203,253,217,3,107,107,65,250,197,224,140,2,65,202,242,215,181,3,107,65,135,244,246,28,65,140,170,229,200,123,107,107,107,65,154,217,196,153,1,65,137,128,243,231,123,107,107,107,107,65,227,146,143,180,126,40,1,245,130,139,196,13,40,2,244,172,225,238,10,40,0,216,160,178,215,11,40,1,197,193,230,178,3,40,2,195,241,223,254,2,65,158,240,247,204,124,40,2,140,190,218,180,14,40,2,215,128,167,146,8,40,0,141,143,157,196,10,40,0,147,146,185,143,13,40,1,195,168,134,179,5,107,107,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,253,15,253,119,253,31,0,91,254,46,0,203,243,148,239,8,11]); +var wasm_module = new WebAssembly.Module(wasm_code); +var wasm_instance = new WebAssembly.Instance(wasm_module); +var f = wasm_instance.exports.main; +assertErrorMessage(f, WebAssembly.RuntimeError, /index out of bounds/); diff --git a/js/src/jit-test/tests/wasm/regress/bug1856733.js b/js/src/jit-test/tests/wasm/regress/bug1856733.js new file mode 100644 index 0000000000..0f3e59dcfe --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1856733.js @@ -0,0 +1,45 @@ +// |jit-test| --wasm-gc; skip-if: !wasmGcEnabled() + +// Validates if imported globals are accounted for in init expressions. + +var ins = wasmEvalText(`(module + (import "" "d" (global $g0 i32)) + (global $g i32 (i32.const 1)) + (global $g2 (mut i32) (global.get $g)) + (global $g3 (mut i32) (global.get $g0)) + (func (export "test1") (result i32) global.get $g2) + (func (export "test2") (result i32) global.get $g3) +)`, {"": {d: 2},}); +assertEq(ins.exports.test1(), 1); +assertEq(ins.exports.test2(), 2); + +wasmFailValidateText(`(module + (import "" "d" (global $g0 (mut i32))) + (global $g (mut i32) (global.get $g0)) +)`, /must reference a global immutable import/); + +wasmFailValidateText(`(module + (import "" "d" (global $g0 i32)) + (global $g i32 (global.get $g)) +)`, /global\.get index out of range/); + +// Other tests from the bug. + +wasmValidateText(`(module + (import "xx" "d" (global $g0 i32)) + (global $int i32 (i32.const 251)) + (global $tbl2 (ref i31) (ref.i31 + (global.get $int) + )) +)`); +wasmValidateText(`(module + (import "xx" "d" (global $g0 i32)) + (type $block (array (ref eq))) + (global $len i32 (i32.const 256)) + (global $tbl (ref $block) (array.new $block + (ref.i31 + (i32.const 0) + ) + (global.get $len) + )) +)`); diff --git a/js/src/jit-test/tests/wasm/regress/bug1857829.js b/js/src/jit-test/tests/wasm/regress/bug1857829.js new file mode 100644 index 0000000000..037855a4b1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1857829.js @@ -0,0 +1,23 @@ +// |jit-test| --wasm-gc; skip-if: !wasmGcEnabled() + +// Tests if i31ref global value is normalized. +var ins = wasmEvalText(`(module + (global $i (ref i31) (ref.i31 (i32.const -1))) + (func (export "f") (result i32) + (ref.eq (ref.i31 (i32.const -1)) (global.get $i)) + ) + )`); +assertEq(ins.exports.f(), 1); + +// OP test +var ins = wasmEvalText(`(module + (import "env" "v" (func $g (result (ref eq)))) + (func (export "f") + (local $v (ref eq)) + (local.set $v (call $g)) + (if (i32.eq (i31.get_s (ref.cast (ref i31) (local.get $v))) (i32.const -1)) + (then + (if (i32.eqz (ref.eq (local.get $v) (ref.i31 (i32.const -1)))) + (then (unreachable)))))) +)`, {env:{v:()=>-1}}); +ins.exports.f(); diff --git a/js/src/jit-test/tests/wasm/regress/bug1858982.js b/js/src/jit-test/tests/wasm/regress/bug1858982.js new file mode 100644 index 0000000000..574c4bfe24 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/bug1858982.js @@ -0,0 +1,46 @@ +// |jit-test| --wasm-tail-calls; --wasm-gc; skip-if: !wasmGcEnabled() || !wasmTailCallsEnabled() + +// Tests if instance registers were restored properly when call_ref is used +// with tail calls. +var t = wasmEvalText(`(module + (type $t1 (func)) + (func $f0 (param funcref i32 i32 i32 i32 i32 i32 i32 i32 i32) + local.get 0 + ref.cast (ref $t1) + return_call_ref $t1 + ) + (func $f1 (param i32)) + (elem declare func $f) + (func $f (param funcref) + (local i32 i32 i32 i32) + local.get 0 + i32.const 1 + i32.const 1 + i32.const 1 + i32.const 1 + i32.const 1 + i32.const 1 + i32.const 1 + i32.const 1 + i32.const 1 + return_call $f0 + ) + (func (export "f") (result funcref) + ref.func $f + ) +)`); + +var t2 = wasmEvalText(`(module + (import "" "f" (func $fi (result funcref))) + (type $t1 (func (param funcref))) + (elem declare func $f2) + (func $f2) + (func (export "test") + ref.func $f2 + call $fi + ref.cast (ref $t1) + call_ref $t1 + ) +)`, {"": {f:t.exports.f},}); + +t2.exports.test(); diff --git a/js/src/jit-test/tests/wasm/regress/builtin-import-sigs.js b/js/src/jit-test/tests/wasm/regress/builtin-import-sigs.js new file mode 100644 index 0000000000..50aa2a41d1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/builtin-import-sigs.js @@ -0,0 +1,15 @@ +var code = wasmTextToBinary(`(module + (import "" "builtin" (func $one)) + (import "" "builtin" (func $two (param i32))) + (import "" "builtin" (func $three (result i32))) + (import "" "builtin" (func $four (param f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32) (result f32))) + (func (export "run") + (call $one) + (call $two (i32.const 0)) + (drop (call $three)) + (drop (call $four (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0))) + ) +)`); +var m = new WebAssembly.Module(code); +var i = new WebAssembly.Instance(m, {'':{builtin:Math.sin}}); +i.exports.run(); diff --git a/js/src/jit-test/tests/wasm/regress/caller-property.js b/js/src/jit-test/tests/wasm/regress/caller-property.js new file mode 100644 index 0000000000..8b9a95a989 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/caller-property.js @@ -0,0 +1,7 @@ +const { g } = wasmEvalText(`(module (func $f) (export "g" (func $f)))`).exports; + +function testCaller() { + return g.caller; +} + +assertErrorMessage(testCaller, TypeError, /caller/); diff --git a/js/src/jit-test/tests/wasm/regress/current-memory-tls.js b/js/src/jit-test/tests/wasm/regress/current-memory-tls.js new file mode 100644 index 0000000000..5c36364a36 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/current-memory-tls.js @@ -0,0 +1,95 @@ +// Bug 1341650: +// - when compiled with Ion, pass the TLS register to memory.size; +// - when compiled with Baseline, don't clobber the last stack slot when +// calling into memory.size/memory.grow; + +// This toy module starts with an empty memory, then tries to set values at different +// indexes, automatically growing memory when that would trigger an out of +// bounds access, for the exact right amount of pages. Note it's not made for +// efficiency, but optimizing it doesn't trigger the bugs mentioned above. + +let i = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (memory $mem (export "mem") 0 65535) + + (func (export "cur_mem") (result i32) (memory.size)) + + (func $maybeGrow (param $i i32) (local $smem i32) + ;; get memory.size in number of bytes, not pages. + memory.size + i64.extend_i32_u + i64.const 65536 + i64.mul + + ;; get the last byte index accessed by an int32 access. + local.get $i + i32.const 3 + i32.add + local.tee $i + i64.extend_i32_u + + ;; if the memory is too small, grow it. + i64.le_u + if + ;; get the floor of the accessed *page* index. + local.get $i + i64.extend_i32_u + i64.const 65536 + i64.div_u + + ;; subtract to that the size of the current memory in pages; + ;; that's the amount of pages we want to grow, minus one. + memory.size + i64.extend_i32_u + + i64.sub + + ;; add 1 to that amount. + i64.const 1 + i64.add + + ;; get back to i32 and grow memory. + i32.wrap_i64 + memory.grow + drop + end + ) + + (func (export "set") (param $i i32) (param $v i32) + local.get $i + call $maybeGrow + local.get $i + local.get $v + i32.store + ) + + (func (export "get") (param $i i32) (result i32) + local.get $i + i32.load + ) +) +`))).exports; + +assertEq(i.cur_mem(), 0); + +i.set(0, 1); +assertEq(i.get(0), 1); + +assertEq(i.cur_mem(), 1); + +i.set(1234, 1); +assertEq(i.get(1234), 1); + +assertEq(i.cur_mem(), 1); + +i.set(65532, 1); +assertEq(i.get(65532), 1); + +assertErrorMessage(() => i.get(65533), WebAssembly.RuntimeError, /index out of bounds/); + +assertEq(i.cur_mem(), 1); + +i.set(65533, 1); +assertEq(i.get(65533), 1); + +assertEq(i.cur_mem(), 2); diff --git a/js/src/jit-test/tests/wasm/regress/debug-clone-segment.js b/js/src/jit-test/tests/wasm/regress/debug-clone-segment.js new file mode 100644 index 0000000000..f91f62df32 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/debug-clone-segment.js @@ -0,0 +1,36 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() +// +var mod = new WebAssembly.Module(wasmTextToBinary(` + (module + (func (export "func_0") (result i32) + call 0 + ) + ) +`)); + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("(" + function() { + var dbg = Debugger(parent); + dbg.onEnterFrame = function(frame) {} +} + ")()"); + +processModule(mod); +processModule(mod); +processModule(mod); +processModule(mod); + +mod = new WebAssembly.Module(wasmTextToBinary(` +(module (export "func_0" (func $func1)) (func $func1)) +`)); + +processModule(mod); +processModule(mod); +processModule(mod); +processModule(mod); + +function processModule(module) { + try { + new WebAssembly.Instance(module).exports.func_0(); + } catch(ex) {} +} diff --git a/js/src/jit-test/tests/wasm/regress/debug-exception-in-fast-import.js b/js/src/jit-test/tests/wasm/regress/debug-exception-in-fast-import.js new file mode 100644 index 0000000000..bba37b38b0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/debug-exception-in-fast-import.js @@ -0,0 +1,21 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("(" + function() { + Debugger(parent).onExceptionUnwind = function(frame) {} +} + ")()") + +o = {}; + +let { exports } = wasmEvalText(` + (module (import "" "inc" (func $imp)) (func) (func $start (call $imp)) (start $start) (export "" (func $start))) +`, { + "": { + inc: function() { o = o.p; } + } +}); + +// after instanciation, the start function has been executed and o is undefined. +// This second call will throw in the imported function: + +assertErrorMessage(exports[""], TypeError, /undefined/); diff --git a/js/src/jit-test/tests/wasm/regress/debug-osr.js b/js/src/jit-test/tests/wasm/regress/debug-osr.js new file mode 100644 index 0000000000..e8d3285ed4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/debug-osr.js @@ -0,0 +1,16 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("(" + function() { + Debugger(parent).onExceptionUnwind = function(frame) { + frame.older + } +} + ")()"); + +let o = {}; + +let func = wasmEvalText(` + (module (import "" "inc" (func $imp)) (func) (func $start (call $imp)) (start $start) (export "" (func $start))) +`, { "": { inc: function() { o = o.set; } } }).exports[""]; + +assertErrorMessage(func, TypeError, /(is|of) undefined/); diff --git a/js/src/jit-test/tests/wasm/regress/directives.txt b/js/src/jit-test/tests/wasm/regress/directives.txt new file mode 100644 index 0000000000..8bb976be49 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); include:wasm.js diff --git a/js/src/jit-test/tests/wasm/regress/enable-profiling-in-import.js b/js/src/jit-test/tests/wasm/regress/enable-profiling-in-import.js new file mode 100644 index 0000000000..dd17b2089f --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/enable-profiling-in-import.js @@ -0,0 +1,9 @@ +var module = new WebAssembly.Module(wasmTextToBinary(` + (module + (import "global" "func" (func)) + (func (export "f") + call 0 + ) + ) +`)); +new WebAssembly.Instance(module, { global: { func: enableGeckoProfiling } }).exports.f(); diff --git a/js/src/jit-test/tests/wasm/regress/frame-offset-stack-arg.js b/js/src/jit-test/tests/wasm/regress/frame-offset-stack-arg.js new file mode 100644 index 0000000000..6ab2834d79 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/frame-offset-stack-arg.js @@ -0,0 +1,38 @@ +// We have some register args and the rest are on the stack in the wasm->js +// call. This tests a case where the wrong frame offset was used (on ARM64, +// which is weird in this regard) to read the stack arg in an optimized callout +// stub. + +var loop_counter = 0; + +function f(a,b,c,d,e,f,g,h,i,j) { + assertEq(a, loop_counter); + assertEq(b, a+1); + assertEq(c, b+1); + assertEq(d, c+1); + assertEq(e, d+1); + assertEq(f, e+1); + assertEq(g, f+1); + assertEq(h, g+1); + assertEq(i, h+1); + assertEq(j, i+1); +} + +var bin = wasmTextToBinary( + `(module + (import "m" "f" (func $f (param i32) (param i32) (param i32) (param i32) (param i32) + (param i32) (param i32) (param i32) (param i32) (param i32))) + (func (export "test") (param $a i32) (param $b i32) (param $c i32) (param $d i32) (param $e i32) + (param $f i32) (param $g i32) (param $h i32) (param $i i32) (param $j i32) + (call $f (local.get $a) (local.get $b) (local.get $c) (local.get $d) (local.get $e) + (local.get $f) (local.get $g) (local.get $h) (local.get $i) (local.get $j))))`); + +var mod = new WebAssembly.Module(bin); +var ins = new WebAssembly.Instance(mod, {m:{f}}); + +// Enough iterations for the jit to kick in and the stub to become optimized. + +for ( let i=0; i < 100; i++ ) { + loop_counter = i; + ins.exports.test(i, i+1, i+2, i+3, i+4, i+5, i+6, i+7, i+8, i+9); +} diff --git a/js/src/jit-test/tests/wasm/regress/fuzzsafe-bug1645610.js b/js/src/jit-test/tests/wasm/regress/fuzzsafe-bug1645610.js new file mode 100644 index 0000000000..6bd88e95bc --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/fuzzsafe-bug1645610.js @@ -0,0 +1,15 @@ +// |jit-test| --fuzzing-safe; skip-if: this.getErrorNotes +// +// The meaning of the line above is that the test case is to be run only with +// --fuzzing-safe and only if that setting (or similar settings) is effectful. + +WebAssembly.Module.exports(new WebAssembly.Module(wasmTextToBinary(` +(module + (func (;0;)) + (func (;1;)) + (func (;2;)) + (func (;3;) (result i32) + i32.const 42) + (export "memo" (func 3)) + (export "main" (func 3))) +`))); diff --git a/js/src/jit-test/tests/wasm/regress/gvn-unremovable-phi.js b/js/src/jit-test/tests/wasm/regress/gvn-unremovable-phi.js new file mode 100644 index 0000000000..98869a6427 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/gvn-unremovable-phi.js @@ -0,0 +1,20 @@ +wasmEvalText(`(module + (type $type0 (func (param i32))) + (func $f (param $p i32) + (local $x i32) (local $y i32) + loop $top + local.get $x + local.get $p + local.get $x + br_if $top + i32.const 1 + local.tee $p + local.get $y + local.set $x + i32.add + call $f + br_if $top + return + end + ) +)`); diff --git a/js/src/jit-test/tests/wasm/regress/imul64-ion-negative-power-of-two.js b/js/src/jit-test/tests/wasm/regress/imul64-ion-negative-power-of-two.js new file mode 100644 index 0000000000..0fe59546d7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/imul64-ion-negative-power-of-two.js @@ -0,0 +1,11 @@ +new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (func (param i64)) + (func (export "f") + i64.const 2 + i64.const -9223372036854775808 + i64.mul + call 0 + ) +) +`))).exports.f(); diff --git a/js/src/jit-test/tests/wasm/regress/ion-callerfp-tag.js b/js/src/jit-test/tests/wasm/regress/ion-callerfp-tag.js new file mode 100644 index 0000000000..936fba24fd --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/ion-callerfp-tag.js @@ -0,0 +1,28 @@ +var lfModule = new WebAssembly.Module(wasmTextToBinary(` + (module + (import "global" "func" (func (result i32))) + (func (export "func_0") (result i32) + call 0 ;; calls the import, which is func #0 + ) + ) +`)); + +enableGeckoProfiling(); +WasmHelpers.startProfiling(); +setJitCompilerOption("ion.warmup.trigger", 20); + +Object.prototype[3] = 3; + +var imports = { + global: { + func: function() {} + } +} + +for (let i = 0; i < 100; ++i) { + for (dmod in imports) + for (dname in imports[dmod]) + if (imports[dmod][dname] == undefined) {} + instance = new WebAssembly.Instance(lfModule, imports); + print(i, instance.exports.func_0()); +} diff --git a/js/src/jit-test/tests/wasm/regress/ion-error-gc-fakeexitframe.js b/js/src/jit-test/tests/wasm/regress/ion-error-gc-fakeexitframe.js new file mode 100644 index 0000000000..5b184611d7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/ion-error-gc-fakeexitframe.js @@ -0,0 +1,81 @@ +var lfLogBuffer = ` +//corefuzz-dcd-endofdata +for (var i = 0; gczeal(4,10); g(buffer)) + assertEq(assignParameterGetElement(42), 17); +//corefuzz-dcd-endofdata +//corefuzz-dcd-endofdata +//corefuzz-dcd-endofdata +g = newGlobal({newCompartment: true}); +g.parent = this +g.eval("Debugger(parent).onExceptionUnwind=(function(){})") +`; +lfLogBuffer = lfLogBuffer.split('\n'); + +gcPreserveCode(); + +var letext =`(module + (type $type0 (func (param i32 i64))) + (type $type1 (func (param i32) (result i64))) + (type $type2 (func (result i32))) + (memory 1) + (export "store" (func $func0)) + (export "load" (func $func1)) + (export "assert_0" (func $func2)) + (func $func0 (param $var0 i32) (param $var1 i64) + local.get $var0 + local.get $var1 + i64.store16 offset=16 + ) + (func $func1 (param $var0 i32) (result i64) + local.get $var0 + i64.load16_s offset=16 + ) + (func $func2 (result i32) + i32.const 65519 + i64.const -32768 + call $func0 + i32.const 1 + ) + (data (i32.const 0) + "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\t\\n\\0b\\0c\\0d\\0e\\0f" + ) + (data (i32.const 16) + "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff" + ) +)`; + +var binary = wasmTextToBinary(letext); +var module = new WebAssembly.Module(binary); + +var lfCodeBuffer = ""; +while (true) { + var line = lfLogBuffer.shift(); + if (line == null) { + break; + } else if (line == "//corefuzz-dcd-endofdata") { + processCode(lfCodeBuffer); + } else { + lfCodeBuffer += line + "\n"; + } +} + +if (lfCodeBuffer) processCode(lfCodeBuffer); + +function processCode(code) { + evaluate(code); + while (true) { + imports = {} + try { + instance = new WebAssembly.Instance(module, imports); + break; + } catch (exc) {} + } + for (let descriptor of WebAssembly.Module.exports(module)) { + switch (descriptor.kind) { + case "function": + try { + print(instance.exports[descriptor.name]()) + } catch (exc1) {} + } + } +} diff --git a/js/src/jit-test/tests/wasm/regress/ion-inlinedcall-resumepoint.js b/js/src/jit-test/tests/wasm/regress/ion-inlinedcall-resumepoint.js new file mode 100644 index 0000000000..9b9c8209bc --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/ion-inlinedcall-resumepoint.js @@ -0,0 +1,50 @@ +var invalidatedFunction = function() { return false; } + +var counter = 0; + +function maybeInvalidate(iplusk) { + if (iplusk === 0) { + // This should happen only once; it will invalidate the call frame of + // the ion() function, which should rewind to just after the wasm call + // (if it got its own resume point). + // Before the patch, the wasm call doesn't get its resume point, so + // it's repeated and the importedFunc() is called once too many. + counter++; + invalidatedFunction = function () { return true; }; + } +} + +function importedFunc(k) { + for (let i = 100; i --> 0 ;) { + maybeInvalidate(i + k); + } +} + +let { exports } = new WebAssembly.Instance( + new WebAssembly.Module( + wasmTextToBinary(` + (module + (func $imp (import "env" "importedFunc") (param i32)) + (func (export "exp") (param i32) + local.get 0 + call $imp + ) + ) + `) + ), { + env: { + importedFunc + } + } +); + +function ion(k) { + exports.exp(k); + invalidatedFunction(); +} + +for (let k = 100; k --> 0 ;) { + ion(k); +} + +assertEq(counter, 1); diff --git a/js/src/jit-test/tests/wasm/regress/ion-lazy-stubs-jit.js b/js/src/jit-test/tests/wasm/regress/ion-lazy-stubs-jit.js new file mode 100644 index 0000000000..f7592b14fb --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/ion-lazy-stubs-jit.js @@ -0,0 +1,13 @@ +(function coerceinplace() { + var { table } = wasmEvalText(`(module + (func $add (param i32) (param i32) (result i32) + local.get 0 + ) + (table (export "table") 10 funcref) + (elem (i32.const 0) $add) + )`).exports; + + for (var i = 0; i < 100; i++) { + table.get(0)((true).get++, i*2+1); + } +})(); diff --git a/js/src/jit-test/tests/wasm/regress/ion-many-results.js b/js/src/jit-test/tests/wasm/regress/ion-many-results.js new file mode 100644 index 0000000000..bc4df59e20 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/ion-many-results.js @@ -0,0 +1,17 @@ +// This provokes a crash in ion if its tempalloc reservation logic is not +// up to snuff, bug 1675844. + +for ( let i=100; i < 300; i++ ) { + let xs = new Array(i).fill(1); + + // Should not crash the compiler but should fail validation + assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(` +(module + (func $f (result ${xs.map(_ => 'i32 ').join(' ')}) + ${xs.map((_) => '(i32.const 1)').join(' ')}) + (func $g + (call $f)))`)), + WebAssembly.CompileError, + /(unused values not explicitly dropped)|(values remaining on stack)/); + +} diff --git a/js/src/jit-test/tests/wasm/regress/jit-updatepcquad.js b/js/src/jit-test/tests/wasm/regress/jit-updatepcquad.js new file mode 100644 index 0000000000..69f9371b84 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/jit-updatepcquad.js @@ -0,0 +1,31 @@ +var evalInFrame = (function (global) { + var dbgGlobal = newGlobal({newCompartment: true}); + var dbg = new dbgGlobal.Debugger(); + return function evalInFrame(code) { + dbg.addDebuggee(global); + var frame = dbg.getNewestFrame().older; + frame = frame.older || frame; + let completion = frame.eval(code); + return completion.return; + }; +})(this); + +const { exports } = wasmEvalText(` + (module + (import "global" "func" (func (param i32) (result i32))) + (func (export "func_0") (param i32)(result i32) + local.get 0 + call 0 + ) + ) +`, { + global: { + func: function jscode(i) { + return evalInFrame(`a = ${i}`); + } + } +}); + +for (i = 0; i < 20; ++i) { + assertEq(exports.func_0(i), i); +} diff --git a/js/src/jit-test/tests/wasm/regress/lazy-table-nan.js b/js/src/jit-test/tests/wasm/regress/lazy-table-nan.js new file mode 100644 index 0000000000..aa7bda7485 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/lazy-table-nan.js @@ -0,0 +1,10 @@ +let i = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (func $f (result f32) + f32.const nan:0x42 + ) + (table (export "table") 10 funcref) + (elem (i32.const 0) $f) +) +`))).exports; +i.table.get(0)(); diff --git a/js/src/jit-test/tests/wasm/regress/load-lane-oob.js b/js/src/jit-test/tests/wasm/regress/load-lane-oob.js new file mode 100644 index 0000000000..02fea77daf --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/load-lane-oob.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// Bug 1735128 - useless load should not be eliminated by Ion + +var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( +`(module + (memory 0) + (func (export "f") (param i32) + (v128.load64_lane 1 (local.get 0) (v128.const i32x4 0 0 0 0)) + drop))`))); +assertErrorMessage(() => ins.exports.f(100), + WebAssembly.RuntimeError, + /out of bounds/); + diff --git a/js/src/jit-test/tests/wasm/regress/long-select.js b/js/src/jit-test/tests/wasm/regress/long-select.js new file mode 100644 index 0000000000..dfda4e6799 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/long-select.js @@ -0,0 +1,38 @@ +// Bug 1337060 causes too much register pressure on x86 by requiring four int64 +// values in registers at the same time. + +wasmFullPassI64(` +(module + (func $run (result i64) + i64.const 0x2800000033 + i64.const 0x9900000044 + i64.const 0x1000000012 + i64.const 0x1000000013 + i64.lt_s + select))`, "0x2800000033"); + +wasmFullPassI64(` +(module + (func $run (result i64) + i64.const 0x2800000033 + i64.const 0x9900000044 + i64.const 0x1000000013 + i64.const 0x1000000012 + i64.lt_s + select))`, "0x9900000044"); + +wasmFullPassI64(` +(module + (func $run (param f32) (result i64) + i64.const 0x13100000001 + i64.const 0x23370000002 + i64.const 0x34480000003 + i32.const 1 + select + i32.const 1 + select + i64.const 0x45590000004 + i32.const 1 + select + ) +)`, "0x13100000001", {}, 'f32.const 0'); diff --git a/js/src/jit-test/tests/wasm/regress/misc-control-flow.js b/js/src/jit-test/tests/wasm/regress/misc-control-flow.js new file mode 100644 index 0000000000..6363cb1f5f --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/misc-control-flow.js @@ -0,0 +1,227 @@ +wasmFailValidateText(`(module + (func (param i32) (result i32) + (loop (if (i32.const 0) (then (br 0))) (local.get 0))) + (export "" (func 0)) +)`, /(unused values not explicitly dropped by end of block)|(values remaining on stack at end of block)/); + +wasmFailValidateText(`(module + (func (param i32) + (loop (if (i32.const 0) (then (br 0))) (local.get 0))) + (export "" (func 0)) +)`, /(unused values not explicitly dropped by end of block)|(values remaining on stack at end of block)/); + +wasmFailValidateText(`(module + (func (param i32) (result i32) + (loop (if (i32.const 0) (then (br 0))) (drop (local.get 0)))) + (export "" (func 0)) +)`, emptyStackError); + +assertEq(wasmEvalText(`(module + (func (param i32) (result i32) + (loop (if (i32.const 0) (then (br 0)))) (local.get 0)) + (export "" (func 0)) +)`).exports[""](42), 42); + +wasmEvalText(`(module (func $func$0 + (block (if (i32.const 1) (then (loop (br_table 0 (br 0)))))) + ) +)`); + +wasmEvalText(`(module (func + (block $out (loop $in (br_table $out $out $in (i32.const 0)))) + ) +)`); + +wasmEvalText(`(module (func (result i32) + (select + (block (result i32) + (drop (block (result i32) + (br_table + 1 + 0 + (i32.const 1) + (i32.const 0) + ) + )) + (i32.const 2) + ) + (i32.const 3) + (i32.const 4) + ) +)) +`); + +wasmEvalText(`(module + (func (param i32) (param i32) (result i32) (i32.const 0)) + (func (result i32) + (call 0 (i32.const 1) (call 0 (i32.const 2) (i32.const 3))) + (call 0 (unreachable) (i32.const 4)) + ) +)`); + +wasmEvalText(` +(module + + (func + (param i32) (param i32) (param i32) (param i32) + (result i32) + (i32.const 0) + ) + + (func (result i32) + (call 0 + (i32.const 42) + (i32.const 53) + (call 0 (i32.const 100) (i32.const 13) (i32.const 37) (i32.const 128)) + (return (i32.const 42)) + ) + ) + + (export "" (func 1)) +) +`).exports[""](); + +wasmEvalText(` +(module + (import "check" "one" (func (param i32))) + (import "check" "two" (func (param i32) (param i32))) + (func (param i32) (call 0 (local.get 0))) + (func (param i32) (param i32) (call 1 (local.get 0) (local.get 1))) + (func + (call 1 + (i32.const 43) + (block $b (result i32) + (if (i32.const 1) + (then (call 0 + (block (result i32) + (call 0 (i32.const 42)) + (br $b (i32.const 10)))))) + (i32.const 44)))) + (export "foo" (func 4))) +`, { + check: { + one(x) { + assertEq(x, 42); + }, + two(x, y) { + assertEq(x, 43); + assertEq(y, 10); + } + } +}).exports.foo(); + +assertEq(wasmEvalText(`(module (func + return + (select + (loop (result i32) (i32.const 1)) + (loop (result i32) (i32.const 2)) + (i32.const 3) + ) + drop +) (export "" (func 0)))`).exports[""](), undefined); + +wasmEvalText(`(module (func (result i32) + (return (i32.const 0)) + (select + (loop (result i32) (i32.const 1)) + (loop (result i32) (i32.const 2)) + (i32.const 3) + ) +))`); + +wasmEvalText(`(module (func + (block $return + (block $beforeReturn + (block $out + (loop $in + (block $otherTable + (br_table + $return + $return + $otherTable + $beforeReturn + (i32.const 0) + ) + ) + (block $backTop + (br_table + $backTop + $backTop + $beforeReturn + (i32.const 0) + ) + ) + (br $in) + ) + ) + ) + ) +))`); + +wasmFailValidateText( +`(module + (func $func$0 + (select + (if (result f32) + (i32.const 0) + (then (f32.const 0)) + (else (i32.const 0)) + ) + (if (result f32) + (i32.const 0) + (then (f32.const 0)) + (else (i32.const 0)) + ) + (i32.const 0) + ) + ) +)`, mismatchError("i32", "f32")); + +wasmEvalText(` +(module + (func (result i32) + (i32.add + (block $outer (result i32) + (drop (block $middle (result i32) + (block $inner (result i32) + (br_table $middle $outer $inner (i32.const 42) (i32.const 1)) + ) + (nop) + )) + (i32.const 0) + ) + (i32.const 13) + ) + ) +) +`); + +wasmFailValidateText(` +(module + (func (result i32) + (loop + (i32.const 0) + (br_table 1 0 (i32.const 15)) + ) + ) +)`, /(br_table targets must all have the same arity)|(br_table target labels have different types)/); + +wasmFailValidateText(` +(module + (func (result i32) + (loop (result i32) + (i32.const 0) + (br_table 1 0 (i32.const 15)) + ) + ) +)`, /(br_table targets must all have the same arity)|(br_table target labels have different types)/); + +wasmValidateText(` +(module + (func + (loop + (i32.const 0) + (br_table 1 0 (i32.const 15)) + ) + ) +)`); diff --git a/js/src/jit-test/tests/wasm/regress/movable-traps.js b/js/src/jit-test/tests/wasm/regress/movable-traps.js new file mode 100644 index 0000000000..17aa224b32 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/movable-traps.js @@ -0,0 +1,38 @@ +let bodies = [ + ` + i32.const 1 + i32.const 0 + i32.div_s + `, + ` + i32.const 1 + i32.const 0 + i32.rem_s + `, + ` + f64.const 1.7976931348623157e+308 + i64.trunc_f64_s + `, + ` + f32.const 3.40282347e+38 + i32.trunc_f32_s + ` +]; + +for (let body of bodies) { + wasmFullPass(` + (module + (func $f (param $x i32) (result i32) + loop $top (result i32) + local.get $x + if + local.get $x + br 2 + end + ${body} + br $top + end + ) + (export "run" (func $f)) + )`, 42, {}, 42); +} diff --git a/js/src/jit-test/tests/wasm/regress/no-directives/debugger-no-script.js b/js/src/jit-test/tests/wasm/regress/no-directives/debugger-no-script.js new file mode 100644 index 0000000000..1072e9268e --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/no-directives/debugger-no-script.js @@ -0,0 +1,19 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled(); exitstatus:3 + +function userError() {}; + +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); + +g.eval(` + var wasm = wasmTextToBinary('(module (func (export "test") (nop)))'); + var m = new WebAssembly.Instance(new WebAssembly.Module(wasm)); +`); + +dbg.onEnterFrame = function(frame) { + if (frame.type == "wasmcall") { + throw new userError() + } +} + +result = g.eval("m.exports.test()"); diff --git a/js/src/jit-test/tests/wasm/regress/nop-fill-jit-exit.js b/js/src/jit-test/tests/wasm/regress/nop-fill-jit-exit.js new file mode 100644 index 0000000000..0aadbc22a5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/nop-fill-jit-exit.js @@ -0,0 +1,28 @@ +// |jit-test| --arm-asm-nop-fill=1 +// +try { + enableSingleStepProfiling(); + disableSingleStepProfiling(); +} catch (e) { + // Early quit on platforms not supporting single step profiling. + quit(); +} + +load(libdir + "asm.js"); + +var ffi = function(enable) { + enableGeckoProfiling(); + enableSingleStepProfiling(); +} +var f = asmLink(asmCompile('global', 'ffis', + USE_ASM + ` + var ffi=ffis.ffi; + function f(i) { + i=i|0; + ffi(i|0); + } return f + `), null, { + ffi +}); +f(0); +f(+1); diff --git a/js/src/jit-test/tests/wasm/regress/null-call.js b/js/src/jit-test/tests/wasm/regress/null-call.js new file mode 100644 index 0000000000..b7ed4b46e3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/null-call.js @@ -0,0 +1,14 @@ +// Bug 1747540 - two trap descriptors at the same address led to some confusion. + +var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` + (table 1 funcref) + (memory 1) + (func $test (export "test") (result i32) + (call_indirect (i32.const 0)) + (i32.load (i32.const 0)) +) +`))) +assertErrorMessage(() => ins.exports.test(), + WebAssembly.RuntimeError, + /indirect call to null/); + diff --git a/js/src/jit-test/tests/wasm/regress/null-metadata-filename.js b/js/src/jit-test/tests/wasm/regress/null-metadata-filename.js new file mode 100644 index 0000000000..638fef6c40 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/null-metadata-filename.js @@ -0,0 +1,20 @@ +// |jit-test| skip-if: !isAsmJSCompilationAvailable() + +enableGeckoProfiling(); +var code = evaluate("(function() { 'use asm'; function g() { return 43 } return g })", { + fileName: null +}); + +assertEq(code()(), 43); + +evaluate(` +let f = evalReturningScope.bind(null, ''); + +(function(glob, stdlib) { + "use asm"; + var f = stdlib.f; + function _() { f(); } + return _; +})(this, { f })(); +`, { fileName: null }); + diff --git a/js/src/jit-test/tests/wasm/regress/onlyjsiter-while-wasm.js b/js/src/jit-test/tests/wasm/regress/onlyjsiter-while-wasm.js new file mode 100644 index 0000000000..f67b6d27b8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/onlyjsiter-while-wasm.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: typeof evalInCooperativeThread === 'undefined' + +try { + evalInCooperativeThread(` + var { f } = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(\` + (module + (func $f (export "f") call $f) + ) + \`))).exports; + gczeal(9); + f(); + `); +} catch(e) {} diff --git a/js/src/jit-test/tests/wasm/regress/oom-eval.js b/js/src/jit-test/tests/wasm/regress/oom-eval.js new file mode 100644 index 0000000000..1ce7c26df1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/oom-eval.js @@ -0,0 +1,7 @@ +// |jit-test| slow; allow-oom; skip-if: !wasmIsSupported() || !('oomTest' in this) + +function foo() { + var g = newGlobal({sameZoneAs: this}); + g.eval(`o = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func) (export "" (func 0)))')));`); +} +oomTest(foo); diff --git a/js/src/jit-test/tests/wasm/regress/oom-init.js b/js/src/jit-test/tests/wasm/regress/oom-init.js new file mode 100644 index 0000000000..f08b088107 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/oom-init.js @@ -0,0 +1,21 @@ +// |jit-test| slow; allow-oom; skip-if: !wasmIsSupported() || !('oomTest' in this) + +Object.getOwnPropertyNames(this); +s = newGlobal(); +evalcx("\ + /x/;\ + oomTest(function() {\ + this[\"\"];\ + void 0;\ + Object.freeze(this);\ + l(undefined)();\ + O;\ + t;\ + 0;\ + ({e});\ + i;\ + 0;\ + ({ z: p ? 0 : 0});\ + s;\ + });\ +", s); diff --git a/js/src/jit-test/tests/wasm/regress/oom-masm-baseline.js b/js/src/jit-test/tests/wasm/regress/oom-masm-baseline.js new file mode 100644 index 0000000000..3f74666d0a --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/oom-masm-baseline.js @@ -0,0 +1,31 @@ +// |jit-test| slow; skip-if: !('oomTest' in this) + +// Test baseline compiler only. +if (typeof wasmCompileMode === 'undefined' || wasmCompileMode() != 'baseline') + quit(); + +try { + var bin = wasmTextToBinary( + `(module (func (result i32) (param f64) (param f32) + i64.const 0 + local.get 0 + drop + i32.wrap_i64 + f64.const 0 + f64.const 0 + i32.const 0 + select + f32.const 0 + f32.const 0 + f32.const 0 + i32.const 0 + select + i32.const 0 + i32.const 0 + i32.const 0 + select + select + drop + drop))`); + oomTest(() => new WebAssembly.Module(bin)); +} catch(e) { } diff --git a/js/src/jit-test/tests/wasm/regress/oom-wasm-streaming.js b/js/src/jit-test/tests/wasm/regress/oom-wasm-streaming.js new file mode 100644 index 0000000000..5d7e719912 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/oom-wasm-streaming.js @@ -0,0 +1,14 @@ +// |jit-test| skip-if: !('oomAfterAllocations' in this) + +ignoreUnhandledRejections(); + +try { + WebAssembly.compileStreaming(); +} catch (err) { + assertEq(String(err).indexOf("not supported with --no-threads") !== -1, true); + quit(); +} +oomAfterAllocations(1, 2); +var x = wasmTextToBinary('(module (func (export "run") (result i32) i32.const 42))'); +WebAssembly.compileStreaming(x); +drainJobQueue(); diff --git a/js/src/jit-test/tests/wasm/regress/oom-wasmtexttobinary-block.js b/js/src/jit-test/tests/wasm/regress/oom-wasmtexttobinary-block.js new file mode 100644 index 0000000000..6f3b666873 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/oom-wasmtexttobinary-block.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !('oomTest' in this) + +try { + oomTest((function () { + wasmTextToBinary("(module(func(loop $label1 $label0)))"); + })); +} catch(e) { } diff --git a/js/src/jit-test/tests/wasm/regress/oom-wrong-argument-number-for-import-call.js b/js/src/jit-test/tests/wasm/regress/oom-wrong-argument-number-for-import-call.js new file mode 100644 index 0000000000..2d41b466ea --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/oom-wrong-argument-number-for-import-call.js @@ -0,0 +1,24 @@ +// |jit-test| skip-if: !('oomTest' in this) + +function f() { + // Too many results returned. + return [52, 10, 0, 0]; +} + +let binary = wasmTextToBinary(` + (module + (import "env" "f" (func $f (result i32 i32 i32))) + (func (export "run") (result i32) + (call $f) + i32.sub + i32.sub)) +`); + +let module = new WebAssembly.Module(binary); +let instance = new WebAssembly.Instance(module, { env: { f } }); +let run = instance.exports.run; + +// Run once for setup. +try { run(); } catch {} + +oomTest(run); diff --git a/js/src/jit-test/tests/wasm/regress/pass-stack-int64.js b/js/src/jit-test/tests/wasm/regress/pass-stack-int64.js new file mode 100644 index 0000000000..94497f35de --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/pass-stack-int64.js @@ -0,0 +1,15 @@ +var params = ''; +var locals = ''; +for (let i = 0; i < 20; i++) { + params += '(param i64) '; + locals += `(local.get ${i}) `; +} + +wasmEvalText(` +(module + (func + ${params} + (call 0 ${locals}) + ) +) +`); diff --git a/js/src/jit-test/tests/wasm/regress/proxy-get-trap-table.js b/js/src/jit-test/tests/wasm/regress/proxy-get-trap-table.js new file mode 100644 index 0000000000..56158e7b15 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/proxy-get-trap-table.js @@ -0,0 +1,14 @@ +// The 'get' handler should be invoked directly when reading fields of the +// descriptor. + +assertErrorMessage(() => { + var desc = { + element: "anyfunc", + initial: 1 + }; + var proxy = new Proxy({}, { + get: true + }); + Object.setPrototypeOf(desc, proxy); + let table = new WebAssembly.Table(desc); +}, TypeError, /proxy handler's get trap/); diff --git a/js/src/jit-test/tests/wasm/regress/regalloc-i64-load-store-global.js b/js/src/jit-test/tests/wasm/regress/regalloc-i64-load-store-global.js new file mode 100644 index 0000000000..da971d1aa2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/regalloc-i64-load-store-global.js @@ -0,0 +1,20 @@ +wasmFullPassI64(` + (module + (global (mut i64) (i64.const 9970292656026947164)) + (func (export "global.get_0") (result i64) global.get 0) + + (func $run (param i32) (result i64) + i64.const 8692897571457488645 + i64.const 1028567229461950342 + i64.mul + global.get 0 + f32.const 3.141592653 + f32.floor + f32.const -13.37 + f32.floor + f32.copysign + drop + i64.div_u + ) + ) +`, 1, {}, 'i32.const 0'); diff --git a/js/src/jit-test/tests/wasm/regress/regalloc-muli64.js b/js/src/jit-test/tests/wasm/regress/regalloc-muli64.js new file mode 100644 index 0000000000..991ceeb3ba --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/regalloc-muli64.js @@ -0,0 +1,14 @@ +// Bug 1298808. +assertEq(wasmEvalText(`(module + (func + (result i32) + (i32.wrap_i64 + (i64.mul + ;; Conditions: rhs == lhs, rhs is not a constant. + (i64.add (i64.const 1) (i64.const 10)) + (i64.add (i64.const 1) (i64.const 10)) + ) + ) + ) + (export "" (func 0)) +)`).exports[""](), 121); diff --git a/js/src/jit-test/tests/wasm/regress/reserve-enough.js b/js/src/jit-test/tests/wasm/regress/reserve-enough.js new file mode 100644 index 0000000000..c591fa3153 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/reserve-enough.js @@ -0,0 +1,13 @@ +// Bug 1281131 - be sure to reserve enough stack space + +wasmEvalText( +`(module + (func $func0 + ${loopy(100)} + (nop)))`); + +function loopy(n) { + if (n == 0) + return "(nop)"; + return `(block $out${n} (loop $in${n} ${loopy(n-1)}))`; +} diff --git a/js/src/jit-test/tests/wasm/regress/reserve-joinreg.js b/js/src/jit-test/tests/wasm/regress/reserve-joinreg.js new file mode 100644 index 0000000000..05497a7b5d --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/reserve-joinreg.js @@ -0,0 +1,22 @@ +// Bug 1280933, excerpted from binary test case provided there. + +wasmEvalText( +`(module + (func $func0 (param $arg0 i32) (result i32) (local $var0 i64) + (local.set $var0 (i64.extend_i32_u (local.get $arg0))) + (i32.wrap_i64 + (i64.add + (block (result i64) + (block $label1 + (loop $label0 + (drop + (block $label2 (result i64) + (br_table $label2 (i64.const 0) (local.get $arg0)) + ) + ) + (local.set $var0 (i64.mul (i64.const 2) (local.get $var0))) + ) + ) + (local.tee $var0 (i64.add (i64.const 4) (local.get $var0)))) + (i64.const 1)))) + (export "" (func 0)))`); diff --git a/js/src/jit-test/tests/wasm/regress/savedframe-lookup-in-wasm.js b/js/src/jit-test/tests/wasm/regress/savedframe-lookup-in-wasm.js new file mode 100644 index 0000000000..6527c78efa --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/savedframe-lookup-in-wasm.js @@ -0,0 +1,17 @@ +g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval(`(function() { + Debugger(parent).onExceptionUnwind = function(frame) { return frame.eval(""); } +})()`); + +var module = new WebAssembly.Module(wasmTextToBinary(` + (module (import $imp "" "inc") (func) (func $start (call $imp)) (start $start) (export "" (func $start))) +`)); + +var imports = { + "": { + inc: function() { undefined_function(); } + } +}; + +new WebAssembly.Instance(module, imports).exports[''](); diff --git a/js/src/jit-test/tests/wasm/regress/select-any.js b/js/src/jit-test/tests/wasm/regress/select-any.js new file mode 100644 index 0000000000..9e85d33897 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/select-any.js @@ -0,0 +1,41 @@ +// Bug 1280921 + +var m1 = wasmEvalText( +`(module + (type $type0 (func)) + (func $func0 + (select + (unreachable) + (return (nop)) + (loop (result i32) (i32.const 1)) + ) + drop + ) + (export "" (func 0)))`).exports[""]; + +try { + m1(); +} catch (e) { + if (!(e instanceof Error && e.message.match(/unreachable executed/))) + throw e; +} + +var m2 = wasmEvalText( +`(module + (type $type0 (func)) + (func $func0 + (select + (i32.const 26) + (unreachable) + (i32.const 3) + ) + drop + ) + (export "" (func 0)))`).exports[""]; + +try { + m2(); +} catch (e) { + if (!(e instanceof Error && e.message.match(/unreachable executed/))) + throw e; +} diff --git a/js/src/jit-test/tests/wasm/regress/shift-counts.js b/js/src/jit-test/tests/wasm/regress/shift-counts.js new file mode 100644 index 0000000000..aadc9e5d76 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/shift-counts.js @@ -0,0 +1,8 @@ +// Bug 1280926, extracted from binary + +wasmEvalText( +`(module + (type $type0 (func (result i32))) + (export "" (func $func0)) + (func $func0 (result i32) + (i32.shr_s (i32.const -40) (i32.const 34))))`); diff --git a/js/src/jit-test/tests/wasm/regress/signed-unsigned-div-mod.js b/js/src/jit-test/tests/wasm/regress/signed-unsigned-div-mod.js new file mode 100644 index 0000000000..370676d2c4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/signed-unsigned-div-mod.js @@ -0,0 +1,75 @@ +// The result should be -1 because it is (i32.rem_s -1 10000) and the spec +// stipulates "result has the sign of the dividend". This test uncovers a bug +// in SpiderMonkey wherein the shape of the lhs (it looks like an unsigned +// value) causes an unsigned modulo to be emitted. + +assertEq(wasmEvalText( + `(module + (func (result i32) + (i32.const -1) + (i32.const 0) + i32.shr_u + (i32.const 10000) + i32.rem_s) + (export "f" (func 0)))`).exports.f(), -1); + +// Ditto for int64 + +wasmAssert( + `(module + (func $run (result i64) + (i64.const -1) + (i64.const 0) + i64.shr_u + (i64.const 10000) + i64.rem_s) + )`, [{type:'i64', expected:'0xffffffffffffffff', func:'$run'}]); + +// Despite the signed shift this is 0x80000000 % 10000 (rem_u) +// and the result is positive. + +assertEq(wasmEvalText( + `(module + (func (result i32) + (i32.const -1) + (i32.const 0) + i32.shl + (i32.const 10000) + i32.rem_u) + (export "f" (func 0)))`).exports.f(), 7295); + +// 0x80000000 is really -0x80000000 so the result of signed division shall be +// negative. + +assertEq(wasmEvalText( + `(module + (func (result i32) + (i32.const 0x80000000) + (i32.const 0) + i32.shr_u + (i32.const 10000) + i32.div_s) + (export "f" (func 0)))`).exports.f(), -214748); + +assertEq(wasmEvalText( + `(module + (func (result i32) + (i32.const 0x80000000) + (i32.const 0) + i32.shr_u + (i32.const -10000) + i32.div_s) + (export "f" (func 0)))`).exports.f(), 214748); + +// And the result of unsigned division shall be positive. + +assertEq(wasmEvalText( + `(module + (func (result i32) + (i32.const 0x80000000) + (i32.const 0) + i32.shr_u + (i32.const 10000) + i32.div_u) + (export "f" (func 0)))`).exports.f(), 214748); + diff --git a/js/src/jit-test/tests/wasm/regress/startfunc-in-table.js b/js/src/jit-test/tests/wasm/regress/startfunc-in-table.js new file mode 100644 index 0000000000..5a0ce1e25f --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/startfunc-in-table.js @@ -0,0 +1,6 @@ +wasmEvalText(`(module + (func) + (start 0) + (table $0 1 funcref) + (elem 0 (i32.const 0) func 0) +)`); diff --git a/js/src/jit-test/tests/wasm/regress/table-of-anyref.js b/js/src/jit-test/tests/wasm/regress/table-of-anyref.js new file mode 100644 index 0000000000..e8c02843ad --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/table-of-anyref.js @@ -0,0 +1,9 @@ +// Faulty prebarrier for tables. +gczeal(4, 8); +let ins = wasmEvalText( + `(module + (table (export "t") 10 externref) + (func (export "set_externref") (param i32) (param externref) + (table.set (local.get 0) (local.get 1))))`); +ins.exports.set_externref(3, {}); +ins.exports.set_externref(3, null); diff --git a/js/src/jit-test/tests/wasm/regress/teavm-bugs.js b/js/src/jit-test/tests/wasm/regress/teavm-bugs.js new file mode 100644 index 0000000000..bd81820951 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/teavm-bugs.js @@ -0,0 +1,53 @@ +// Register allocation issue with LCompareI64AndBranch. +let params = ''; +let locals = ''; +let tests = '(i64.const 0)'; + +for (let i = 15; i --> 0;) { + params += `\n(param i64)`; + locals += `\n(local i64)`; + tests = ` + (if (result i64) + (i64.eq + (local.get ${i + 8}) + (local.get ${i}) + ) + (then (local.get ${i + 8})) + (else ${tests}) + )`; +} + +let code = `(module + (func $i64 + ${params} (result i64) ${locals} + ${tests} + ) +)` + +wasmEvalText(code); + +// Bounds check elimination. +assertEq(wasmEvalText(`(module + (memory 1) + (func (param $p i32) (result i32) (local $l i32) + (local.set $l (i32.const 0)) + (if + (local.get $p) + (then (local.set $l + (i32.add + (local.get $l) + (i32.load8_s (local.get $p)) + ) + )) + ) + (local.set $l + (i32.add + (local.get $l) + (i32.load8_s (local.get $p)) + ) + ) + (local.get $l) + ) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") + (export "test" (func 0)) +)`).exports["test"](3), 6); diff --git a/js/src/jit-test/tests/wasm/regress/too-large-frame.js b/js/src/jit-test/tests/wasm/regress/too-large-frame.js new file mode 100644 index 0000000000..b91f8f6381 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/too-large-frame.js @@ -0,0 +1,27 @@ +// Bug 1280934, equivalent test case. + +try { + +wasmEvalText( +`(module + (func $func0 (result i32) ${locals()} + (i32.const 0)) + (export "" (func 0)))`); + +} catch (e) { + // The wasm baseline compiler throws OOM on too-large frames, so + // handle that. + if (!String(e).match(/out of memory/)) + throw e; +} + +// The wasm baseline compiler cuts off frames at 256KB at the moment; +// the test case for bug 1280934 constructed a frame around 512KB so +// duplicate that here. + +function locals() { + var s = ""; + for ( var i=0 ; i < 50000 ; i++ ) + s += "(local f64)\n"; + return s; +} diff --git a/js/src/jit-test/tests/wasm/regress/unaligned-store64.js b/js/src/jit-test/tests/wasm/regress/unaligned-store64.js new file mode 100644 index 0000000000..b878093451 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/unaligned-store64.js @@ -0,0 +1,35 @@ +var ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary( + `(module + (memory (export "mem") 1 1) + (func (export "store_32_1") (param $ptr i32) + (i64.store32 align=1 (local.get $ptr) (i64.const 0xabba1337))) + (func (export "store_32_2") (param $ptr i32) + (i64.store32 align=2 (local.get $ptr) (i64.const 0xabba1337))) + (func (export "store_16") (param $ptr i32) + (i64.store16 align=1 (local.get $ptr) (i64.const 0x1337))))`))).exports; + +var mem = new Uint8Array(ins.mem.buffer); + +ins.store_16(1); +assertEq(mem[1], 0x37); +assertEq(mem[2], 0x13); + +ins.store_32_1(11); +assertEq(mem[11], 0x37); +assertEq(mem[12], 0x13); +assertEq(mem[13], 0xba); +assertEq(mem[14], 0xab); + +ins.store_32_2(18); +assertEq(mem[18], 0x37); +assertEq(mem[19], 0x13); +assertEq(mem[20], 0xba); +assertEq(mem[21], 0xab); + +// This must also work on all platforms even though we're lying about the +// alignment. +ins.store_32_2(29); +assertEq(mem[29], 0x37); +assertEq(mem[30], 0x13); +assertEq(mem[31], 0xba); +assertEq(mem[32], 0xab); diff --git a/js/src/jit-test/tests/wasm/regress/upper-maximum-memory.js b/js/src/jit-test/tests/wasm/regress/upper-maximum-memory.js new file mode 100644 index 0000000000..d2d099f4fe --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/upper-maximum-memory.js @@ -0,0 +1,4 @@ +new WebAssembly.Memory({ + initial: 1, + maximum: 65536 +}); diff --git a/js/src/jit-test/tests/wasm/resizing.js b/js/src/jit-test/tests/wasm/resizing.js new file mode 100644 index 0000000000..3142b21721 --- /dev/null +++ b/js/src/jit-test/tests/wasm/resizing.js @@ -0,0 +1,235 @@ +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Table = WebAssembly.Table; +const Memory = WebAssembly.Memory; +const RuntimeError = WebAssembly.RuntimeError; + +// ====== +// MEMORY +// ====== + +// Test for stale heap pointers after resize + +// Grow directly from builtin call: +wasmFullPass(`(module + (memory 1) + (func $test (result i32) + (i32.store (i32.const 0) (i32.const 1)) + (i32.store (i32.const 65532) (i32.const 10)) + (drop (memory.grow (i32.const 99))) + (i32.store (i32.const 6553596) (i32.const 100)) + (i32.add + (i32.load (i32.const 0)) + (i32.add + (i32.load (i32.const 65532)) + (i32.load (i32.const 6553596))))) + (export "run" (func $test)) +)`, 111); + +// Grow during import call: +var exports = wasmEvalText(`(module + (import "" "imp" (func $imp)) + (memory 1) + (func $grow (drop (memory.grow (i32.const 99)))) + (export "grow" (func $grow)) + (func $test (result i32) + (i32.store (i32.const 0) (i32.const 1)) + (i32.store (i32.const 65532) (i32.const 10)) + (call $imp) + (i32.store (i32.const 6553596) (i32.const 100)) + (i32.add + (i32.load (i32.const 0)) + (i32.add + (i32.load (i32.const 65532)) + (i32.load (i32.const 6553596))))) + (export "test" (func $test)) +)`, {"":{imp() { exports.grow() }}}).exports; + +setJitCompilerOption("baseline.warmup.trigger", 2); +setJitCompilerOption("ion.warmup.trigger", 4); +for (var i = 0; i < 10; i++) + assertEq(exports.test(), 111); + +// Grow during call_indirect: +var mem = new Memory({initial:1}); +var tbl = new Table({initial:1, element:"anyfunc"}); +var exports1 = wasmEvalText(`(module + (import "" "mem" (memory 1)) + (func $grow + (i32.store (i32.const 65532) (i32.const 10)) + (drop (memory.grow (i32.const 99))) + (i32.store (i32.const 6553596) (i32.const 100))) + (export "grow" (func $grow)) +)`, {"":{mem}}).exports; +var exports2 = wasmEvalText(`(module + (import "" "tbl" (table 1 funcref)) + (import "" "mem" (memory 1)) + (type $v2v (func)) + (func $test (result i32) + (i32.store (i32.const 0) (i32.const 1)) + (call_indirect (type $v2v) (i32.const 0)) + (i32.add + (i32.load (i32.const 0)) + (i32.add + (i32.load (i32.const 65532)) + (i32.load (i32.const 6553596))))) + (export "test" (func $test)) +)`, {"":{tbl, mem}}).exports; +tbl.set(0, exports1.grow); +assertEq(exports2.test(), 111); + +// Test for coherent length/contents + +var mem = new Memory({initial:1}); +new Int32Array(mem.buffer)[0] = 42; +var mod = new Module(wasmTextToBinary(`(module + (import "" "mem" (memory 1)) + (func $gm (param i32) (result i32) (memory.grow (local.get 0))) + (export "grow_memory" (func $gm)) + (func $cm (result i32) (memory.size)) + (export "current_memory" (func $cm)) + (func $ld (param i32) (result i32) (i32.load (local.get 0))) + (export "load" (func $ld)) + (func $st (param i32) (param i32) (i32.store (local.get 0) (local.get 1))) + (export "store" (func $st)) +)`)); +var exp1 = new Instance(mod, {"":{mem}}).exports; +var exp2 = new Instance(mod, {"":{mem}}).exports; +assertEq(exp1.current_memory(), 1); +assertEq(exp1.load(0), 42); +assertEq(exp2.current_memory(), 1); +assertEq(exp2.load(0), 42); +mem.grow(1); +assertEq(mem.buffer.byteLength, 2*64*1024); +new Int32Array(mem.buffer)[64*1024/4] = 13; +assertEq(exp1.current_memory(), 2); +assertEq(exp1.load(0), 42); +assertEq(exp1.load(64*1024), 13); +assertEq(exp2.current_memory(), 2); +assertEq(exp2.load(0), 42); +assertEq(exp2.load(64*1024), 13); +exp1.grow_memory(2); +assertEq(exp1.current_memory(), 4); +exp1.store(3*64*1024, 99); +assertEq(exp2.current_memory(), 4); +assertEq(exp2.load(3*64*1024), 99); +assertEq(mem.buffer.byteLength, 4*64*1024); +assertEq(new Int32Array(mem.buffer)[3*64*1024/4], 99); + +// Fail at maximum + +var mem = new Memory({initial:1, maximum:2}); +assertEq(mem.buffer.byteLength, 1 * 64*1024); +assertEq(mem.grow(1), 1); +assertEq(mem.buffer.byteLength, 2 * 64*1024); +assertErrorMessage(() => mem.grow(1), RangeError, /failed to grow memory/); +assertEq(mem.buffer.byteLength, 2 * 64*1024); + +// Do not misinterpret the maximum @ max for the current size. + +(new WebAssembly.Memory({initial: 1, maximum: 65536})).grow(1) + +// ====== +// TABLE +// ====== + +// Test for stale table base pointers after resize + +// Grow during import call: +var exports = wasmEvalText(`(module + (type $v2i (func (result i32))) + (import "" "grow" (func $grow)) + (table (export "tbl") 1 funcref) + (func $test (result i32) + (i32.add + (call_indirect (type $v2i) (i32.const 0)) + (block (result i32) + (call $grow) + (call_indirect (type $v2i) (i32.const 1))))) + (func $one (result i32) (i32.const 1)) + (elem (i32.const 0) $one) + (func $two (result i32) (i32.const 2)) + (export "test" (func $test)) + (export "two" (func $two)) +)`, {"":{grow() { exports.tbl.grow(1); exports.tbl.set(1, exports.two) }}}).exports; + +setJitCompilerOption("baseline.warmup.trigger", 2); +setJitCompilerOption("ion.warmup.trigger", 4); +for (var i = 0; i < 10; i++) + assertEq(exports.test(), 3); +assertEq(exports.tbl.length, 11); + +// Grow during call_indirect: +var exports1 = wasmEvalText(`(module + (import "" "grow" (func $grow)) + (func $exp (call $grow)) + (export "exp" (func $exp)) +)`, {"":{grow() { exports2.tbl.grow(1); exports2.tbl.set(2, exports2.eleven) }}}).exports; +var exports2 = wasmEvalText(`(module + (type $v2v (func)) + (type $v2i (func (result i32))) + (import "" "imp" (func $imp)) + (elem (i32.const 0) $imp) + (table 2 funcref) + (func $test (result i32) + (i32.add + (call_indirect (type $v2i) (i32.const 1)) + (block (result i32) + (call_indirect (type $v2v) (i32.const 0)) + (call_indirect (type $v2i) (i32.const 2))))) + (func $ten (result i32) (i32.const 10)) + (elem (i32.const 1) $ten) + (func $eleven (result i32) (i32.const 11)) + (export "tbl" (table 0)) + (export "test" (func $test)) + (export "eleven" (func $eleven)) +)`, {"":{imp:exports1.exp}}).exports; +assertEq(exports2.test(), 21); + +// Test for coherent length/contents + +var src = wasmEvalText(`(module + (func $one (result i32) (i32.const 1)) + (export "one" (func $one)) + (func $two (result i32) (i32.const 2)) + (export "two" (func $two)) + (func $three (result i32) (i32.const 3)) + (export "three" (func $three)) +)`).exports; +var tbl = new Table({element:"anyfunc", initial:1}); +tbl.set(0, src.one); + +var mod = new Module(wasmTextToBinary(`(module + (type $v2i (func (result i32))) + (table (import "" "tbl") 1 funcref) + (func $ci (param i32) (result i32) (call_indirect (type $v2i) (local.get 0))) + (export "call_indirect" (func $ci)) +)`)); +var exp1 = new Instance(mod, {"":{tbl}}).exports; +var exp2 = new Instance(mod, {"":{tbl}}).exports; +assertEq(exp1.call_indirect(0), 1); +assertErrorMessage(() => exp1.call_indirect(1), RuntimeError, /index out of bounds/); +assertEq(exp2.call_indirect(0), 1); +assertErrorMessage(() => exp2.call_indirect(1), RuntimeError, /index out of bounds/); +assertEq(tbl.grow(1), 1); +assertEq(tbl.length, 2); +assertEq(exp1.call_indirect(0), 1); +assertErrorMessage(() => exp1.call_indirect(1), Error, /indirect call to null/); +tbl.set(1, src.two); +assertEq(exp1.call_indirect(1), 2); +assertErrorMessage(() => exp1.call_indirect(2), RuntimeError, /index out of bounds/); +assertEq(tbl.grow(2), 2); +assertEq(tbl.length, 4); +assertEq(exp2.call_indirect(0), 1); +assertEq(exp2.call_indirect(1), 2); +assertErrorMessage(() => exp2.call_indirect(2), Error, /indirect call to null/); +assertErrorMessage(() => exp2.call_indirect(3), Error, /indirect call to null/); + +// Fail at maximum + +var tbl = new Table({initial:1, maximum:2, element:"anyfunc"}); +assertEq(tbl.length, 1); +assertEq(tbl.grow(1), 1); +assertEq(tbl.length, 2); +assertErrorMessage(() => tbl.grow(1), RangeError, /failed to grow table/); +assertEq(tbl.length, 2); diff --git a/js/src/jit-test/tests/wasm/select-int32.js b/js/src/jit-test/tests/wasm/select-int32.js new file mode 100644 index 0000000000..80b062d9f6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/select-int32.js @@ -0,0 +1,123 @@ + +// Checks that optimised handling, via Ion, of select-of-I32-values as driven +// by comparison-of-I32-values, works correctly. See bug 1532286 comment 7. + +function moduleText(cmp_kind /* "eq", "ne", "le_u" etc */) +{ + return `(module + (func (export "cmpI32_selI32") + (param i32) (param i32) (param i32) (param i32) + (result i32) + (select (local.get 2) + (local.get 3) + (i32.${cmp_kind} (local.get 0) (local.get 1)) + ) + ))`; +} + +// Make sure both endpoints and the middlepoint are covered, with one value +// either side, so as to expose both signedness and off-by-one failures. +// Ditto quarter points for good measure. +const vals = [0x0, 0x1, + 0x3fffffff, 0x40000000, 0x40000001, + 0x7fffffff, 0x80000000, 0x80000001, + 0xbfffffff, 0xC0000000, 0xC0000001, + 0xfffffffe, 0xffffffff]; + +const testNames + = ["eq", "ne", "lt_s", "lt_u", "gt_s", "gt_u", + "le_s", "le_u", "ge_s", "ge_u"]; + +const expected_eq + = [0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, + 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1, + 0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, + 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1, + 0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0]; + +const expected_ne + = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1]; + +const expected_lt_s + = [1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1, + 1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0, + 0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1, + 1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1]; + +const expected_lt_u + = [1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0, + 0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1, + 1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,1, + 1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1, + 1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1]; + +const expected_gt_s + = [1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0, + 0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0, + 1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1, + 1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0, + 1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1]; + +const expected_gt_u + = [1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1, + 1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0, + 1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0, + 0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0, + 1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1]; + +const expected_le_s + = [0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1, + 1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1, + 0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0, + 0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1, + 0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0]; + +const expected_le_u + = [0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0, + 0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1, + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,1, + 1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1, + 0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0]; + +const expected_ge_s + = [0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0, + 0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1, + 1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0, + 0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0]; + +const expected_ge_u + = [0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1, + 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0, + 0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,0, + 0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0, + 0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0]; + +const testExpVecs + = [expected_eq, expected_ne, + expected_lt_s, expected_lt_u, expected_gt_s, expected_gt_u, + expected_le_s, expected_le_u, expected_ge_s, expected_ge_u] + +assertEq(testNames.length, testExpVecs.length); + +for (i in testNames) { + const testExp = testExpVecs[i]; + assertEq(testExp.length, vals.length * vals.length); + + const inst = wasmEvalText(moduleText(testNames[i])); + + let ctr = 0; + for (let a of vals) { + for (let b of vals) { + const actual = inst.exports.cmpI32_selI32(a, b, 42, 1337); + const expected = testExp[ctr] == 0 ? 42 : 1337; + assertEq(expected, actual); + ctr++; + } + } +} diff --git a/js/src/jit-test/tests/wasm/select.js b/js/src/jit-test/tests/wasm/select.js new file mode 100644 index 0000000000..de325ccd48 --- /dev/null +++ b/js/src/jit-test/tests/wasm/select.js @@ -0,0 +1,260 @@ +// Test the select instruction + +wasmFailValidateText('(module (func (select (i32.const 0) (i32.const 0) (f32.const 0))))', mismatchError("f32", "i32")); + +wasmFailValidateText('(module (func (select (i32.const 0) (f32.const 0) (i32.const 0))) (export "" (func 0)))', /(select operand types must match)|(type mismatch: expected f32, found i32)/); +wasmFailValidateText('(module (func (select (block ) (i32.const 0) (i32.const 0))) (export "" (func 0)))', emptyStackError); +wasmFailValidateText('(module (func (select (return) (i32.const 0) (i32.const 0))) (export "" (func 0)))', unusedValuesError); +assertEq(wasmEvalText('(module (func (drop (select (return) (i32.const 0) (i32.const 0)))) (export "" (func 0)))').exports[""](), undefined); +assertEq(wasmEvalText('(module (func (result i32) (i32.add (i32.const 0) (select (return (i32.const 42)) (i32.const 0) (i32.const 0)))) (export "" (func 0)))').exports[""](), 42); +wasmFailValidateText('(module (func (select (if (result i32) (i32.const 1) (then (i32.const 0)) (else (f32.const 0))) (i32.const 0) (i32.const 0))) (export "" (func 0)))', mismatchError("f32", "i32")); +wasmFailValidateText('(module (func) (func (select (call 0) (call 0) (i32.const 0))) (export "" (func 0)))', emptyStackError); + +(function testSideEffects() { + +var numT = 0; +var numF = 0; + +var imports = {"": { + ifTrue: () => 1 + numT++, + ifFalse: () => -1 + numF++, +}} + +// Test that side-effects are applied on both branches. +var f = wasmEvalText(` +(module + (import "" "ifTrue" (func (result i32))) + (import "" "ifFalse" (func (result i32))) + (func (param i32) (result i32) + (select + (call 0) + (call 1) + (local.get 0) + ) + ) + (export "" (func 2)) +) +`, imports).exports[""]; + +assertEq(f(-1), numT); +assertEq(numT, 1); +assertEq(numF, 1); + +assertEq(f(0), numF - 2); +assertEq(numT, 2); +assertEq(numF, 2); + +assertEq(f(1), numT); +assertEq(numT, 3); +assertEq(numF, 3); + +assertEq(f(0), numF - 2); +assertEq(numT, 4); +assertEq(numF, 4); + +assertEq(f(0), numF - 2); +assertEq(numT, 5); +assertEq(numF, 5); + +assertEq(f(1), numT); +assertEq(numT, 6); +assertEq(numF, 6); + +})(); + +function testNumSelect(type, trueVal, falseVal) { + var trueJS = jsify(trueVal); + var falseJS = jsify(falseVal); + + // Always true condition + var alwaysTrue = wasmEvalText(` + (module + (func (param i32) (result ${type}) + (select + (${type}.const ${trueVal}) + (${type}.const ${falseVal}) + (i32.const 1) + ) + ) + (export "" (func 0)) + ) + `, {}).exports[""]; + + assertEq(alwaysTrue(0), trueJS); + assertEq(alwaysTrue(1), trueJS); + assertEq(alwaysTrue(-1), trueJS); + + // Always false condition + var alwaysFalse = wasmEvalText(` + (module + (func (param i32) (result ${type}) + (select + (${type}.const ${trueVal}) + (${type}.const ${falseVal}) + (i32.const 0) + ) + ) + (export "" (func 0)) + ) + `, {}).exports[""]; + + assertEq(alwaysFalse(0), falseJS); + assertEq(alwaysFalse(1), falseJS); + assertEq(alwaysFalse(-1), falseJS); + + // Variable condition + var f = wasmEvalText(` + (module + (func (param i32) (result ${type}) + (select + (${type}.const ${trueVal}) + (${type}.const ${falseVal}) + (local.get 0) + ) + ) + (export "" (func 0)) + ) + `, {}).exports[""]; + + assertEq(f(0), falseJS); + assertEq(f(1), trueJS); + assertEq(f(-1), trueJS); + + wasmFullPass(` + (module + (func (param i32) (result ${type}) + (select + (${type}.const ${trueVal}) + (${type}.const ${falseVal}) + (local.get 0) + ) + ) + (export "run" (func 0)) + )`, + trueJS, + {}, + 1); +} + +testNumSelect('i32', 13, 37); +testNumSelect('i32', Math.pow(2, 31) - 1, -Math.pow(2, 31)); + +testNumSelect('f32', Math.fround(13.37), Math.fround(19.89)); +testNumSelect('f32', 'inf', '-0'); +testNumSelect('f32', 'nan', Math.pow(2, -31)); + +testNumSelect('f64', 13.37, 19.89); +testNumSelect('f64', 'inf', '-0'); +testNumSelect('f64', 'nan', Math.pow(2, -31)); + +wasmAssert(` +(module + (func $f (param i32) (result i64) + (select + (i64.const 0xc0010ff08badf00d) + (i64.const 0x12345678deadc0de) + (local.get 0) + ) + ) + (export "" (func 0)) +)`, [ + { type: 'i64', func: '$f', args: ['i32.const 0'], expected: '0x12345678deadc0de' }, + { type: 'i64', func: '$f', args: ['i32.const 1'], expected: '0xc0010ff08badf00d' }, + { type: 'i64', func: '$f', args: ['i32.const -1'], expected: '0xc0010ff08badf00d' }, +], {}); + +wasmFailValidateText(`(module + (func (param externref) + (select (local.get 0) (local.get 0) (i32.const 0)) + drop + ))`, + /(untyped select)|(type mismatch: select only takes integral types)/); + +wasmFailValidateText(`(module + (func (param funcref) + (select (local.get 0) (local.get 0) (i32.const 0)) + drop + ))`, + /(untyped select)|(type mismatch: select only takes integral types)/); + +function testRefSelect(type, trueVal, falseVal) { + // Always true condition + var alwaysTrue = wasmEvalText(` + (module + (func (param i32 ${type} ${type}) (result ${type}) + (select (result ${type}) + local.get 1 + local.get 2 + (i32.const 1) + ) + ) + (export "" (func 0)) + ) + `, {}).exports[""]; + + assertEq(alwaysTrue(0, trueVal, falseVal), trueVal); + assertEq(alwaysTrue(1, trueVal, falseVal), trueVal); + assertEq(alwaysTrue(-1, trueVal, falseVal), trueVal); + + // Always false condition + var alwaysFalse = wasmEvalText(` + (module + (func (param i32 ${type} ${type}) (result ${type}) + (select (result ${type}) + local.get 1 + local.get 2 + (i32.const 0) + ) + ) + (export "" (func 0)) + ) + `, {}).exports[""]; + + assertEq(alwaysFalse(0, trueVal, falseVal), falseVal); + assertEq(alwaysFalse(1, trueVal, falseVal), falseVal); + assertEq(alwaysFalse(-1, trueVal, falseVal), falseVal); + + // Variable condition + var f = wasmEvalText(` + (module + (func (param i32 ${type} ${type}) (result ${type}) + (select (result ${type}) + local.get 1 + local.get 2 + (local.get 0) + ) + ) + (export "" (func 0)) + ) + `, {}).exports[""]; + + assertEq(f(0, trueVal, falseVal), falseVal); + assertEq(f(1, trueVal, falseVal), trueVal); + assertEq(f(-1, trueVal, falseVal), trueVal); + + wasmFullPass(` + (module + (func (param i32 ${type} ${type}) (result ${type}) + (select (result ${type}) + local.get 1 + local.get 2 + (local.get 0) + ) + ) + (export "run" (func 0)) + )`, + trueVal, + {}, + 1, + trueVal, + falseVal); +} + +testRefSelect('externref', {}, {}); + +let {export1, export2} = wasmEvalText(`(module + (func (export "export1")) + (func (export "export2")) +)`).exports; + +testRefSelect('funcref', export1, export2); diff --git a/js/src/jit-test/tests/wasm/simd/ad-hack-binop-preamble.js b/js/src/jit-test/tests/wasm/simd/ad-hack-binop-preamble.js new file mode 100644 index 0000000000..dd1443a1e7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/ad-hack-binop-preamble.js @@ -0,0 +1,334 @@ +// |jit-test| skip-if: true + +// Common code to test simple binary operators. See runSimpleBinopTest below. + +function expandConstantBinopInputs(op, memtype, inputs) { + let s = ''; + let ident = 0; + for ( let [a, b] of inputs ) { + let constlhs = `${memtype.layoutName} ${a.map(jsValueToWasmName).join(' ')}`; + let constrhs = `${memtype.layoutName} ${b.map(jsValueToWasmName).join(' ')}`; + s += ` + ;; lhs is constant, rhs is variable + (func (export "run_constlhs${ident}") + (v128.store (i32.const 0) + (call $doit_constlhs${ident} (v128.const ${constrhs})))) + (func $doit_constlhs${ident} (param $b v128) (result v128) + (${op} (v128.const ${constlhs}) (local.get $b))) + + ;; rhs is constant, lhs is variable + (func (export "run_constrhs${ident}") + (v128.store (i32.const 0) + (call $doit_constrhs${ident} (v128.const ${constlhs})))) + (func $doit_constrhs${ident} (param $a v128) (result v128) + (${op} (local.get $a) (v128.const ${constrhs}))) + + ;; both operands are constant + (func (export "run_constboth${ident}") + (v128.store (i32.const 0) + (call $doit_constboth${ident}))) + (func $doit_constboth${ident} (result v128) + (${op} (v128.const ${constlhs}) (v128.const ${constrhs})))` + ident++; + } + return s; +} + +function insAndMemBinop(op, memtype, resultmemtype, inputs) { + var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + + ;; both arguments are variable + (func (export "run") + (v128.store (i32.const 0) + (call $doit (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $doit (param $a v128) (param $b v128) (result v128) + (${op} (local.get $a) (local.get $b))) + + ${expandConstantBinopInputs(op, memtype, inputs)})`); + var mem = new memtype(ins.exports.mem.buffer); + var resultmem = !resultmemtype || memtype == resultmemtype ? mem : new resultmemtype(ins.exports.mem.buffer); + return [ins, mem, resultmem]; +} + +function add(bits) { return (x, y) => sign_extend(x+y, bits) } +function add64(x, y) { return sign_extend(BigInt(x)+BigInt(y), 64) } +function sub(bits) { return (x, y) => sign_extend(x-y, bits) } +function sub64(x, y) { return sign_extend(BigInt(x)-BigInt(y), 64) } +// Even 32-bit multiply can overflow a Number, so always use BigInt +function mul(bits) { return (x, y) => sign_extend(BigInt(x)*BigInt(y), bits) } +function div(x, y) { return x/y } +function min(x, y) { return x < y ? x : y } +function max(x, y) { return x > y ? x : y } +function and(x, y) { return zero_extend(x&y, 8) } +function or(x, y) { return zero_extend(x|y, 8) } +function xor(x, y) { return zero_extend(x^y, 8) } +function andnot(x, y) { return zero_extend(x&~y, 8) } +function avgr(x, y) { return (x + y + 1) >> 1; } +function eq(truth) { return (x,y) => x==y ? truth : 0 } +function ne(truth) { return (x,y) => x!=y ? truth : 0 } +function lt(truth) { return (x, y) => x < y ? truth : 0 } +function gt(truth) { return (x, y) => x > y ? truth : 0 } +function le(truth) { return (x, y) => x <= y ? truth : 0 } +function ge(truth) { return (x, y) => x >= y ? truth : 0 } + +function fadd(x, y) { return Math.fround(x+y) } +function fsub(x, y) { return Math.fround(x-y) } +function fmul(x, y) { return Math.fround(x*y) } +function fdiv(x, y) { return Math.fround(x/y) } +function fmin(x, y) { + if (x == y) return x; + if (x < y) return x; + if (y < x) return y; + if (isNaN(x)) return x; + return y; +} +function fmax(x, y) { + if (x == y) return x; + if (x > y) return x; + if (y > x) return y; + if (isNaN(x)) return x; + return y; +} +function dadd(x, y) { return x+y } +function dsub(x, y) { return x-y } +function dmul(x, y) { return x*y } +function ddiv(x, y) { return x/y } +var dmax = fmax; +var dmin = fmin; + +function op_sat_s(bits, op) { + return (x, y) => { + return signed_saturate(op(sign_extend(x, bits), + sign_extend(y, bits)), + bits); + } +} + +function op_sat_u(bits, op) { + return (x, y) => { + return unsigned_saturate(op(zero_extend(x, bits), + zero_extend(y, bits)), + bits); + } +} + +function add_sat_s(bits) { + return op_sat_s(bits, (x,y) => x+y); +} +function sub_sat_s(bits) { + return op_sat_s(bits, (x,y) => x-y); +} +function add_sat_u(bits) { + return op_sat_u(bits, (x,y) => x+y); +} +function sub_sat_u(bits) { + return op_sat_u(bits, (x,y) => x-y); +} + +function max_s(bits) { + return (x, y) => { + return sign_extend(max(sign_extend(x, bits), + sign_extend(y, bits)), + bits); + } +} + +function min_s(bits) { + return (x, y) => { + return sign_extend(min(sign_extend(x, bits), + sign_extend(y, bits)), + bits); + } +} + +function max_u(bits) { + return (x, y) => { + return max(zero_extend(x, bits), + zero_extend(y, bits)); + } +} + +function min_u(bits) { + return (x, y) => { + return min(zero_extend(x, bits), + zero_extend(y, bits)); + } +} + +function pmin(x, y) { return y < x ? y : x } +function pmax(x, y) { return x < y ? y : x } + +assertEq(max_s(8)(1, 2), 2); +assertEq(max_s(8)(1, 128), 1); +assertEq(min_s(8)(1, 2), 1); +assertEq(min_s(8)(1, 128), -128); +assertEq(max_u(8)(1, 2), 2); +assertEq(max_u(8)(1, 128), 128); +assertEq(min_u(8)(1, 2), 1); +assertEq(min_u(8)(1, 128), 1); + +var binopTests = + [['i8x16.add', Int8Array, add(8)], + ['i16x8.add', Int16Array, add(16)], + ['i32x4.add', Int32Array, add(32)], + ['i64x2.add', BigInt64Array, add64], + ['i8x16.sub', Int8Array, sub(8)], + ['i16x8.sub', Int16Array, sub(16)], + ['i32x4.sub', Int32Array, sub(32)], + ['i64x2.sub', BigInt64Array, sub64], + ['i8x16.add_sat_s', Int8Array, add_sat_s(8)], + ['i8x16.add_sat_u', Uint8Array, add_sat_u(8)], + ['i16x8.add_sat_s', Int16Array, add_sat_s(16)], + ['i16x8.add_sat_u', Uint16Array, add_sat_u(16)], + ['i8x16.sub_sat_s', Int8Array, sub_sat_s(8)], + ['i8x16.sub_sat_u', Uint8Array, sub_sat_u(8)], + ['i16x8.sub_sat_s', Int16Array, sub_sat_s(16)], + ['i16x8.sub_sat_u', Uint16Array, sub_sat_u(16)], + ['i16x8.mul', Int16Array, mul(16)], + ['i32x4.mul', Int32Array, mul(32)], + ['i64x2.mul', BigInt64Array, mul(64)], + ['i8x16.avgr_u', Uint8Array, avgr], + ['i16x8.avgr_u', Uint16Array, avgr], + ['i8x16.max_s', Int8Array, max_s(8)], + ['i8x16.max_u', Uint8Array, max_u(8)], + ['i8x16.min_s', Int8Array, min_s(8)], + ['i8x16.min_u', Uint8Array, min_u(8)], + ['i16x8.max_s', Int16Array, max_s(16)], + ['i16x8.max_u', Uint16Array, max_u(16)], + ['i16x8.min_s', Int16Array, min_s(16)], + ['i16x8.min_u', Uint16Array, min_u(16)], + ['i32x4.max_s', Int32Array, max_s(32)], + ['i32x4.max_u', Uint32Array, max_u(32)], + ['i32x4.min_s', Int32Array, min_s(32)], + ['i32x4.min_u', Uint32Array, min_u(32)], + ['v128.and', Uint8Array, and], + ['v128.or', Uint8Array, or], + ['v128.xor', Uint8Array, xor], + ['v128.andnot', Uint8Array, andnot], + ['f32x4.add', Float32Array, fadd], + ['f32x4.sub', Float32Array, fsub], + ['f32x4.mul', Float32Array, fmul], + ['f32x4.div', Float32Array, fdiv], + ['f32x4.min', Float32Array, fmin], + ['f32x4.max', Float32Array, fmax], + ['f64x2.add', Float64Array, dadd], + ['f64x2.sub', Float64Array, dsub], + ['f64x2.mul', Float64Array, dmul], + ['f64x2.div', Float64Array, ddiv], + ['f64x2.min', Float64Array, dmin], + ['f64x2.max', Float64Array, dmax], + ['i8x16.eq', Int8Array, eq(-1)], + ['i8x16.ne', Int8Array, ne(-1)], + ['i8x16.lt_s', Int8Array, lt(-1)], + ['i8x16.gt_s', Int8Array, gt(-1)], + ['i8x16.le_s', Int8Array, le(-1)], + ['i8x16.ge_s', Int8Array, ge(-1)], + ['i8x16.gt_u', Uint8Array, gt(0xFF)], + ['i8x16.ge_u', Uint8Array, ge(0xFF)], + ['i8x16.lt_u', Uint8Array, lt(0xFF)], + ['i8x16.le_u', Uint8Array, le(0xFF)], + ['i16x8.eq', Int16Array, eq(-1)], + ['i16x8.ne', Int16Array, ne(-1)], + ['i16x8.lt_s', Int16Array, lt(-1)], + ['i16x8.gt_s', Int16Array, gt(-1)], + ['i16x8.le_s', Int16Array, le(-1)], + ['i16x8.ge_s', Int16Array, ge(-1)], + ['i16x8.gt_u', Uint16Array, gt(0xFFFF)], + ['i16x8.ge_u', Uint16Array, ge(0xFFFF)], + ['i16x8.lt_u', Uint16Array, lt(0xFFFF)], + ['i16x8.le_u', Uint16Array, le(0xFFFF)], + ['i32x4.eq', Int32Array, eq(-1)], + ['i32x4.ne', Int32Array, ne(-1)], + ['i32x4.lt_s', Int32Array, lt(-1)], + ['i32x4.gt_s', Int32Array, gt(-1)], + ['i32x4.le_s', Int32Array, le(-1)], + ['i32x4.ge_s', Int32Array, ge(-1)], + ['i32x4.gt_u', Uint32Array, gt(0xFFFFFFFF)], + ['i32x4.ge_u', Uint32Array, ge(0xFFFFFFFF)], + ['i32x4.lt_u', Uint32Array, lt(0xFFFFFFFF)], + ['i32x4.le_u', Uint32Array, le(0xFFFFFFFF)], + ['f32x4.eq', Float32Array, eq(-1), Int32Array], + ['f32x4.ne', Float32Array, ne(-1), Int32Array], + ['f32x4.lt', Float32Array, lt(-1), Int32Array], + ['f32x4.gt', Float32Array, gt(-1), Int32Array], + ['f32x4.le', Float32Array, le(-1), Int32Array], + ['f32x4.ge', Float32Array, ge(-1), Int32Array], + ['f64x2.eq', Float64Array, eq(-1), BigInt64Array], + ['f64x2.ne', Float64Array, ne(-1), BigInt64Array], + ['f64x2.lt', Float64Array, lt(-1), BigInt64Array], + ['f64x2.gt', Float64Array, gt(-1), BigInt64Array], + ['f64x2.le', Float64Array, le(-1), BigInt64Array], + ['f64x2.ge', Float64Array, ge(-1), BigInt64Array], + ['f32x4.pmin', Float32Array, pmin], + ['f32x4.pmax', Float32Array, pmax], + ['f64x2.pmin', Float64Array, pmin], + ['f64x2.pmax', Float64Array, pmax]] + +// Run v128 x v128 -> v128 tests. Inputs are taken from the common input sets, +// placed in memory, the test is run, and the result is extracted and checked. +// +// Runs tests with both operands as variables, either as constant, or both as +// constant. Also checks NaN behavior when appropriate. +// +// All runners that call this should use the same value for `ofParts` and should +// pass different values for `part`, up to `ofParts` - 1. + +function runSimpleBinopTest(part, ofParts) { + let partSize = Math.ceil(binopTests.length / ofParts); + let start = part * partSize; + let end = Math.min((part + 1) * partSize, binopTests.length); + for ( let [op, memtype, rop, resultmemtype] of binopTests.slice(start, end) ) { + let inputs = cross(memtype.inputs); + let len = 16/memtype.BYTES_PER_ELEMENT; + let xs = iota(len); + let zero = xs.map(_ => 0); + let [ins, mem, resultmem] = insAndMemBinop(op, memtype, resultmemtype, inputs); + let bitsForF32 = memtype == Float32Array ? new Uint32Array(mem.buffer) : null; + let bitsForF64 = memtype == Float64Array ? new BigInt64Array(mem.buffer) : null; + + function testIt(a,b,r) { + set(mem, len, a); + set(mem, len*2, b); + ins.exports.run(); + assertSame(get(resultmem, 0, len), r); + + // Test signalling NaN superficially by replacing QNaN inputs with SNaN + if (bitsForF32 != null && (a.some(isNaN) || b.some(isNaN))) { + a.forEach((x, i) => { if (isNaN(x)) { bitsForF32[len+i] = 0x7FA0_0000; } }); + b.forEach((x, i) => { if (isNaN(x)) { bitsForF32[(len*2)+i] = 0x7FA0_0000; } }); + ins.exports.run(); + assertSame(get(resultmem, 0, len), r); + } + if (bitsForF64 != null && (a.some(isNaN) || b.some(isNaN))) { + a.forEach((x, i) => { if (isNaN(x)) { bitsForF64[len+i] = 0x7FF4_0000_0000_0000n; } }); + b.forEach((x, i) => { if (isNaN(x)) { bitsForF64[(len*2)+i] = 0x7FF4_0000_0000_0000n; } }); + ins.exports.run(); + assertSame(get(resultmem, 0, len), r); + } + } + + function testConstIt(i,r) { + set(resultmem, 0, zero); + ins.exports["run_constlhs" + i](); + assertSame(get(resultmem, 0, len), r); + + set(resultmem, 0, zero); + ins.exports["run_constrhs" + i](); + assertSame(get(resultmem, 0, len), r); + + set(resultmem, 0, zero); + ins.exports["run_constboth" + i](); + assertSame(get(resultmem, 0, len), r); + } + + let i = 0; + for (let [a,b] of inputs) { + let r = xs.map((i) => rop(a[i], b[i])); + testIt(a,b,r); + testConstIt(i,r); + i++; + } + } +} diff --git a/js/src/jit-test/tests/wasm/simd/ad-hack-extra.js b/js/src/jit-test/tests/wasm/simd/ad-hack-extra.js new file mode 100644 index 0000000000..9e68b1cf20 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/ad-hack-extra.js @@ -0,0 +1,697 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// Do not include this in the preamble, it must be loaded after lib/wasm.js +load(scriptdir + "ad-hack-preamble.js") + +// Widening multiplication. +// This is to be moved into ad-hack.js +// +// (iMxN.extmul_{high,low}_iKxL_{s,u} A B) +// +// is equivalent to +// +// (iMxN.mul (iMxN.extend_{high,low}_iKxL_{s,u} A) +// (iMxN.extend_{high,low}_iKxL_{s,u} B)) +// +// It doesn't really matter what the inputs are, we can test this almost +// blindly. +// +// Unfortunately, we do not yet have i64x2.extend_* so we introduce a helper +// function to compute that. + +function makeExtMulTest(wide, narrow, part, signed) { + let widener = (wide == 'i64x2') ? + `call $${wide}_extend_${part}_${narrow}_${signed}` : + `${wide}.extend_${part}_${narrow}_${signed}`; + return ` + (func (export "${wide}_extmul_${part}_${narrow}_${signed}") + (v128.store (i32.const 0) + (${wide}.extmul_${part}_${narrow}_${signed} (v128.load (i32.const 16)) + (v128.load (i32.const 32)))) + (v128.store (i32.const 48) + (${wide}.mul (${widener} (v128.load (i32.const 16))) + (${widener} (v128.load (i32.const 32)))))) +`; +} + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func $i64x2_extend_low_i32x4_s (param v128) (result v128) + (i64x2.shr_s (i8x16.shuffle 16 16 16 16 0 1 2 3 16 16 16 16 4 5 6 7 + (local.get 0) + (v128.const i32x4 0 0 0 0)) + (i32.const 32))) + (func $i64x2_extend_high_i32x4_s (param v128) (result v128) + (i64x2.shr_s (i8x16.shuffle 16 16 16 16 8 9 10 11 16 16 16 16 12 13 14 15 + (local.get 0) + (v128.const i32x4 0 0 0 0)) + (i32.const 32))) + (func $i64x2_extend_low_i32x4_u (param v128) (result v128) + (i8x16.shuffle 0 1 2 3 16 16 16 16 4 5 6 7 16 16 16 16 + (local.get 0) + (v128.const i32x4 0 0 0 0))) + (func $i64x2_extend_high_i32x4_u (param v128) (result v128) + (i8x16.shuffle 8 9 10 11 16 16 16 16 12 13 14 15 16 16 16 16 + (local.get 0) + (v128.const i32x4 0 0 0 0))) + ${makeExtMulTest('i64x2','i32x4','low','s')} + ${makeExtMulTest('i64x2','i32x4','high','s')} + ${makeExtMulTest('i64x2','i32x4','low','u')} + ${makeExtMulTest('i64x2','i32x4','high','u')} + ${makeExtMulTest('i32x4','i16x8','low','s')} + ${makeExtMulTest('i32x4','i16x8','high','s')} + ${makeExtMulTest('i32x4','i16x8','low','u')} + ${makeExtMulTest('i32x4','i16x8','high','u')} + ${makeExtMulTest('i16x8','i8x16','low','s')} + ${makeExtMulTest('i16x8','i8x16','high','s')} + ${makeExtMulTest('i16x8','i8x16','low','u')} + ${makeExtMulTest('i16x8','i8x16','high','u')})`); + +for ( let [ WideArray, NarrowArray ] of + [ [ Int16Array, Int8Array ], + [ Int32Array, Int16Array ], + [ BigInt64Array, Int32Array ] ] ) { + let narrowMem = new NarrowArray(ins.exports.mem.buffer); + let narrowSrc0 = 16/NarrowArray.BYTES_PER_ELEMENT; + let narrowSrc1 = 32/NarrowArray.BYTES_PER_ELEMENT; + let wideMem = new WideArray(ins.exports.mem.buffer); + let wideElems = 16/WideArray.BYTES_PER_ELEMENT; + let wideRes0 = 0; + let wideRes1 = 48/WideArray.BYTES_PER_ELEMENT; + let zero = iota(wideElems).map(_ => 0); + for ( let part of [ 'low', 'high' ] ) { + for ( let signed of [ 's', 'u' ] ) { + for ( let [a, b] of cross(NarrowArray.inputs) ) { + set(wideMem, wideRes0, zero); + set(wideMem, wideRes1, zero); + set(narrowMem, narrowSrc0, a); + set(narrowMem, narrowSrc1, b); + let test = `${WideArray.layoutName}_extmul_${part}_${NarrowArray.layoutName}_${signed}`; + ins.exports[test](); + assertSame(get(wideMem, wideRes0, wideElems), + get(wideMem, wideRes1, wideElems)); + } + } + } +} + +// Bitmask. Ion constant folds, so test that too. +// This is to be merged into the existing bitmask tests in ad-hack.js. + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "bitmask_i64x2") (result i32) + (i64x2.bitmask (v128.load (i32.const 16)))) + (func (export "const_bitmask_i64x2") (result i32) + (i64x2.bitmask (v128.const i64x2 0xff337f8012345678 0x0001984212345678))))`); + +var mem8 = new Uint8Array(ins.exports.mem.buffer); +var mem64 = new BigUint64Array(ins.exports.mem.buffer); + +set(mem8, 16, iota(16).map((_) => 0)); +assertEq(ins.exports.bitmask_i64x2(), 0); + +set(mem64, 2, [0x8000000000000000n, 0x8000000000000000n]); +assertEq(ins.exports.bitmask_i64x2(), 3); + +set(mem64, 2, [0x7FFFFFFFFFFFFFFFn, 0x7FFFFFFFFFFFFFFFn]); +assertEq(ins.exports.bitmask_i64x2(), 0); + +set(mem64, 2, [0n, 0x8000000000000000n]); +assertEq(ins.exports.bitmask_i64x2(), 2); + +set(mem64, 2, [0x8000000000000000n, 0n]); +assertEq(ins.exports.bitmask_i64x2(), 1); + +assertEq(ins.exports.const_bitmask_i64x2(), 1); + +// Widen low/high. +// This is to be merged into the existing widening tests in ad-hack.js. + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "extend_low_i32x4_s") + (v128.store (i32.const 0) (i64x2.extend_low_i32x4_s (v128.load (i32.const 16))))) + (func (export "extend_high_i32x4_s") + (v128.store (i32.const 0) (i64x2.extend_high_i32x4_s (v128.load (i32.const 16))))) + (func (export "extend_low_i32x4_u") + (v128.store (i32.const 0) (i64x2.extend_low_i32x4_u (v128.load (i32.const 16))))) + (func (export "extend_high_i32x4_u") + (v128.store (i32.const 0) (i64x2.extend_high_i32x4_u (v128.load (i32.const 16))))))`); + +var mem32 = new Int32Array(ins.exports.mem.buffer); +var mem64 = new BigInt64Array(ins.exports.mem.buffer); +var mem64u = new BigUint64Array(ins.exports.mem.buffer); + +var as = [205, 1, 192, 3].map((x) => x << 24); +set(mem32, 4, as); + +ins.exports.extend_low_i32x4_s(); +assertSame(get(mem64, 0, 2), iota(2).map((n) => BigInt(as[n]))) + +ins.exports.extend_high_i32x4_s(); +assertSame(get(mem64, 0, 2), iota(2).map((n) => BigInt(as[n+2]))); + +ins.exports.extend_low_i32x4_u(); +assertSame(get(mem64u, 0, 2), iota(2).map((n) => BigInt(as[n] >>> 0))); + +ins.exports.extend_high_i32x4_u(); +assertSame(get(mem64u, 0, 2), iota(2).map((n) => BigInt(as[n+2] >>> 0))); + +// Saturating rounding q-format multiplication. +// This is to be moved into ad-hack.js + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "q15mulr_sat_s") + (v128.store (i32.const 0) (i16x8.q15mulr_sat_s (v128.load (i32.const 16)) (v128.load (i32.const 32))))))`); + +var mem16 = new Int16Array(ins.exports.mem.buffer); +for ( let [as, bs] of cross(Int16Array.inputs) ) { + set(mem16, 8, as); + set(mem16, 16, bs); + ins.exports.q15mulr_sat_s(); + assertSame(get(mem16, 0, 8), + iota(8).map((i) => signed_saturate((as[i] * bs[i] + 0x4000) >> 15, 16))); +} + + +// i64.all_true + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "i64_all_true") (result i32) + (i64x2.all_true (v128.load (i32.const 16)) ) ) )`); + +var mem32 = new Int32Array(ins.exports.mem.buffer); + +set(mem32, 4, [0, 0, 0, 0]); +assertEq(0, ins.exports.i64_all_true()); +set(mem32, 4, [1, 0, 0, 0]); +assertEq(0, ins.exports.i64_all_true()); +set(mem32, 4, [1, 0, 0, 1]); +assertEq(1, ins.exports.i64_all_true()); +set(mem32, 4, [0, 0, 10, 0]); +assertEq(0, ins.exports.i64_all_true()); +set(mem32, 4, [0, -250, 1, 0]); +assertEq(1, ins.exports.i64_all_true()); +set(mem32, 4, [-1, -1, -1, -1]); +assertEq(1, ins.exports.i64_all_true()); + +if (this.wasmSimdAnalysis && wasmCompileMode() == "ion") { + const positive = + wasmCompile( + `(module + (memory (export "mem") 1 1) + (func $f (param v128) (result i32) + (if (result i32) (i64x2.all_true (local.get 0)) + (then (i32.const 42)) + (else (i32.const 37)))) + (func (export "run") (result i32) + (call $f (v128.load (i32.const 16)))))`); + assertEq(wasmSimdAnalysis(), "simd128-to-scalar-and-branch -> folded"); + + const negative = + wasmCompile( + `(module + (memory (export "mem") 1 1) + (func $f (param v128) (result i32) + (if (result i32) (i32.eqz (i64x2.all_true (local.get 0))) + (then (i32.const 42)) + (else (i32.const 37)))) + (func (export "run") (result i32) + (call $f (v128.load (i32.const 16)))))`); + assertEq(wasmSimdAnalysis(), "simd128-to-scalar-and-branch -> folded"); + + for ( let inp of [[1n, 2n], [4n, 0n], [0n, 0n]]) { + const all_true = inp.every(v => v != 0n) + let mem = new BigInt64Array(positive.exports.mem.buffer); + set(mem, 2, inp); + assertEq(positive.exports.run(), all_true ? 42 : 37); + + mem = new BigInt64Array(negative.exports.mem.buffer); + set(mem, 2, inp); + assertEq(negative.exports.run(), all_true ? 37 : 42); + } + + wasmCompile(`(module (func (result i32) (i64x2.all_true (v128.const i64x2 0 0))))`); + assertEq(wasmSimdAnalysis(), "simd128-to-scalar -> constant folded"); +} + + +// i64x2.eq and i64x2.ne + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "i64_eq") + (v128.store (i32.const 0) + (i64x2.eq (v128.load (i32.const 16)) (v128.load (i32.const 32))) )) + (func (export "i64_ne") + (v128.store (i32.const 0) + (i64x2.ne (v128.load (i32.const 16)) (v128.load (i32.const 32))) )) )`); + +var mem64 = new BigInt64Array(ins.exports.mem.buffer); + +set(mem64, 2, [0n, 1n, 0n, 1n]); +ins.exports.i64_eq(); +assertSame(get(mem64, 0, 2), [-1n, -1n]); +ins.exports.i64_ne(); +assertSame(get(mem64, 0, 2), [0n, 0n]); +set(mem64, 2, [0x0n, -1n, 0x100000000n, -1n]); +ins.exports.i64_eq(); +assertSame(get(mem64, 0, 2), [0n, -1n]); +set(mem64, 2, [-1n, 0x0n, -1n, 0x100000000n]); +ins.exports.i64_ne(); +assertSame(get(mem64, 0, 2), [0n, -1n]); + + +// i64x2.lt, i64x2.gt, i64x2.le, and i64.ge + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "i64_lt_s") + (v128.store (i32.const 0) + (i64x2.lt_s (v128.load (i32.const 16)) (v128.load (i32.const 32))) )) + (func (export "i64_gt_s") + (v128.store (i32.const 0) + (i64x2.gt_s (v128.load (i32.const 16)) (v128.load (i32.const 32))) )) + (func (export "i64_le_s") + (v128.store (i32.const 0) + (i64x2.le_s (v128.load (i32.const 16)) (v128.load (i32.const 32))) )) + (func (export "i64_ge_s") + (v128.store (i32.const 0) + (i64x2.ge_s (v128.load (i32.const 16)) (v128.load (i32.const 32))) )) )`); + +var mem64 = new BigInt64Array(ins.exports.mem.buffer); + +set(mem64, 2, [0n, 1n, 1n, 0n]); +ins.exports.i64_lt_s(); +assertSame(get(mem64, 0, 2), [-1n, 0n]); +ins.exports.i64_gt_s(); +assertSame(get(mem64, 0, 2), [0n, -1n]); +ins.exports.i64_le_s(); +assertSame(get(mem64, 0, 2), [-1n, 0n]); +ins.exports.i64_ge_s(); +assertSame(get(mem64, 0, 2), [0n, -1n]); + +set(mem64, 2, [0n, -1n, -1n, 0n]); +ins.exports.i64_lt_s(); +assertSame(get(mem64, 0, 2), [0n, -1n]); +ins.exports.i64_gt_s(); +assertSame(get(mem64, 0, 2), [-1n, 0n]); +ins.exports.i64_le_s(); +assertSame(get(mem64, 0, 2), [0n, -1n]); +ins.exports.i64_ge_s(); +assertSame(get(mem64, 0, 2), [-1n, 0n]); + +set(mem64, 2, [-2n, 2n, -1n, 1n]); +ins.exports.i64_lt_s(); +assertSame(get(mem64, 0, 2), [-1n, 0n]); +ins.exports.i64_gt_s(); +assertSame(get(mem64, 0, 2), [0n, -1n]); +ins.exports.i64_le_s(); +assertSame(get(mem64, 0, 2), [-1n, 0n]); +ins.exports.i64_ge_s(); +assertSame(get(mem64, 0, 2), [0n, -1n]); + +set(mem64, 2, [-2n, 1n, -2n, 1n]); +ins.exports.i64_lt_s(); +assertSame(get(mem64, 0, 2), [0n, 0n]); +ins.exports.i64_gt_s(); +assertSame(get(mem64, 0, 2), [0n, 0n]); +ins.exports.i64_le_s(); +assertSame(get(mem64, 0, 2), [-1n, -1n]); +ins.exports.i64_ge_s(); +assertSame(get(mem64, 0, 2), [-1n, -1n]); + + +function wasmCompile(text) { + return new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(text))) +} + + +// i64x2.abs + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "i64_abs") + (v128.store (i32.const 0) + (i64x2.abs (v128.load (i32.const 16))) )) )`); + +var mem64 = new BigInt64Array(ins.exports.mem.buffer); + +set(mem64, 2, [-3n, 42n]); +ins.exports.i64_abs(); +assertSame(get(mem64, 0, 2), [3n, 42n]); +set(mem64, 2, [0n, -0x8000000000000000n]); +ins.exports.i64_abs(); +assertSame(get(mem64, 0, 2), [0n, -0x8000000000000000n]); + + +// Load lane + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + ${iota(16).map(i => `(func (export "load8_lane_${i}") (param i32) + (v128.store (i32.const 0) + (v128.load8_lane offset=0 ${i} (local.get 0) (v128.load (i32.const 16))))) + `).join('')} + ${iota(8).map(i => `(func (export "load16_lane_${i}") (param i32) + (v128.store (i32.const 0) + (v128.load16_lane offset=0 ${i} (local.get 0) (v128.load (i32.const 16))))) + `).join('')} + ${iota(4).map(i => `(func (export "load32_lane_${i}") (param i32) + (v128.store (i32.const 0) + (v128.load32_lane offset=0 ${i} (local.get 0) (v128.load (i32.const 16))))) + `).join('')} + ${iota(2).map(i => `(func (export "load64_lane_${i}") (param i32) + (v128.store (i32.const 0) + (v128.load64_lane offset=0 ${i} (local.get 0) (v128.load (i32.const 16))))) + `).join('')} + (func (export "load_lane_const_and_align") + (v128.store (i32.const 0) + (v128.load64_lane offset=32 1 (i32.const 1) + (v128.load32_lane offset=32 1 (i32.const 3) + (v128.load16_lane offset=32 0 (i32.const 5) + (v128.load (i32.const 16))))) + )) + )`); + +var mem8 = new Int8Array(ins.exports.mem.buffer); +var mem32 = new Int32Array(ins.exports.mem.buffer); +var mem64 = new BigInt64Array(ins.exports.mem.buffer); + +var as = [0x12345678, 0x23456789, 0x3456789A, 0x456789AB]; +set(mem32, 4, as); set(mem8, 32, [0xC2]); + +ins.exports["load8_lane_0"](32); +assertSame(get(mem32, 0, 4), [0x123456C2, 0x23456789, 0x3456789A, 0x456789AB]); +ins.exports["load8_lane_1"](32); +assertSame(get(mem32, 0, 4), [0x1234C278, 0x23456789, 0x3456789A, 0x456789AB]); +ins.exports["load8_lane_2"](32); +assertSame(get(mem32, 0, 4), [0x12C25678, 0x23456789, 0x3456789A, 0x456789AB]); +ins.exports["load8_lane_3"](32); +assertSame(get(mem32, 0, 4), [0xC2345678|0, 0x23456789, 0x3456789A, 0x456789AB]); +ins.exports["load8_lane_4"](32); +assertSame(get(mem32, 0, 4), [0x12345678, 0x234567C2, 0x3456789A, 0x456789AB]); +ins.exports["load8_lane_6"](32); +assertSame(get(mem32, 0, 4), [0x12345678, 0x23C26789, 0x3456789A, 0x456789AB]); +ins.exports["load8_lane_9"](32); +assertSame(get(mem32, 0, 4), [0x12345678, 0x23456789, 0x3456C29A, 0x456789AB]); +ins.exports["load8_lane_14"](32); +assertSame(get(mem32, 0, 4), [0x12345678, 0x23456789, 0x3456789A, 0x45C289AB]); + +set(mem8, 32, [0xC2, 0xD1]); + +ins.exports["load16_lane_0"](32); +assertSame(get(mem32, 0, 4), [0x1234D1C2, 0x23456789, 0x3456789A, 0x456789AB]); +ins.exports["load16_lane_1"](32); +assertSame(get(mem32, 0, 4), [0xD1C25678|0, 0x23456789, 0x3456789A, 0x456789AB]); +ins.exports["load16_lane_2"](32); +assertSame(get(mem32, 0, 4), [0x12345678, 0x2345D1C2, 0x3456789A, 0x456789AB]); +ins.exports["load16_lane_5"](32); +assertSame(get(mem32, 0, 4), [0x12345678, 0x23456789, 0xD1C2789A|0, 0x456789AB]); +ins.exports["load16_lane_7"](32); +assertSame(get(mem32, 0, 4), [0x12345678, 0x23456789, 0x3456789A, 0xD1C289AB|0]); + +set(mem32, 8, [0x16B5C3D0]); + +ins.exports["load32_lane_0"](32); +assertSame(get(mem32, 0, 4), [0x16B5C3D0, 0x23456789, 0x3456789A, 0x456789AB]); +ins.exports["load32_lane_1"](32); +assertSame(get(mem32, 0, 4), [0x12345678, 0x16B5C3D0, 0x3456789A, 0x456789AB]); +ins.exports["load32_lane_2"](32); +assertSame(get(mem32, 0, 4), [0x12345678, 0x23456789, 0x16B5C3D0, 0x456789AB]); +ins.exports["load32_lane_3"](32); +assertSame(get(mem32, 0, 4), [0x12345678, 0x23456789, 0x3456789A, 0x16B5C3D0]); + +set(mem64, 4, [0x3300AA4416B5C3D0n]); + +ins.exports["load64_lane_0"](32); +assertSame(get(mem64, 0, 2), [0x3300AA4416B5C3D0n, 0x456789AB3456789An]); +ins.exports["load64_lane_1"](32); +assertSame(get(mem64, 0, 2), [0x2345678912345678n, 0x3300AA4416B5C3D0n]); + +// .. (mis)align load lane + +var as = [0x12345678, 0x23456789, 0x3456789A, 0x456789AB]; +set(mem32, 4, as); set(mem64, 4, [0x3300AA4416B5C3D0n, 0x300AA4416B5C3D03n]); + +ins.exports["load16_lane_5"](33); +assertSame(get(mem32, 0, 4), [0x12345678,0x23456789,0xb5c3789a|0,0x456789ab]); +ins.exports["load32_lane_1"](34); +assertSame(get(mem32, 0, 4), [0x12345678, 0xaa4416b5|0,0x3456789a,0x456789ab]); +ins.exports["load64_lane_0"](35); +assertSame(get(mem64, 0, 2), [0x5c3d033300aa4416n, 0x456789ab3456789an]); + +ins.exports["load_lane_const_and_align"](); +assertSame(get(mem32, 0, 4), [0x123400aa,0x00AA4416,0x4416b5c3,0x033300aa]); + +// Store lane + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + ${iota(16).map(i => `(func (export "store8_lane_${i}") (param i32) (param i32) + (v128.store8_lane ${i} (local.get 1) (v128.load (local.get 0)))) + `).join('')} + ${iota(8).map(i => `(func (export "store16_lane_${i}") (param i32) (param i32) + (v128.store16_lane ${i} (local.get 1) (v128.load (local.get 0)))) + `).join('')} + ${iota(4).map(i => `(func (export "store32_lane_${i}") (param i32) (param i32) + (v128.store32_lane ${i} (local.get 1) (v128.load (local.get 0)))) + `).join('')} + ${iota(2).map(i => `(func (export "store64_lane_${i}") (param i32) (param i32) + (v128.store64_lane ${i} (local.get 1) (v128.load (local.get 0)))) + `).join('')} + (func (export "store_lane_const_and_align") + (v128.store16_lane 1 (i32.const 33) (v128.load (i32.const 16))) + (v128.store32_lane 2 (i32.const 37) (v128.load (i32.const 16))) + (v128.store64_lane 0 (i32.const 47) (v128.load (i32.const 16))) + ))`); + + +var mem8 = new Int8Array(ins.exports.mem.buffer); +var mem32 = new Int32Array(ins.exports.mem.buffer); +var mem64 = new BigInt64Array(ins.exports.mem.buffer); + +var as = [0x12345678, 0x23456789, 0x3456789A, 0x456789AB]; +set(mem32, 4, as); set(mem32, 0, [0x7799AA00, 42, 3, 0]); + +ins.exports["store8_lane_0"](16, 0); assertSame(get(mem32, 0, 1), [0x7799AA78]); +ins.exports["store8_lane_1"](16, 0); assertSame(get(mem32, 0, 1), [0x7799AA56]); +ins.exports["store8_lane_2"](16, 0); assertSame(get(mem32, 0, 1), [0x7799AA34]); +ins.exports["store8_lane_3"](16, 0); assertSame(get(mem32, 0, 1), [0x7799AA12]); +ins.exports["store8_lane_5"](16, 0); assertSame(get(mem32, 0, 1), [0x7799AA67]); +ins.exports["store8_lane_7"](16, 0); assertSame(get(mem32, 0, 1), [0x7799AA23]); +ins.exports["store8_lane_8"](16, 0); assertSame(get(mem32, 0, 1), [0x7799AA9A]); +ins.exports["store8_lane_15"](16, 0); assertSame(get(mem32, 0, 1), [0x7799AA45]); + +ins.exports["store16_lane_0"](16, 0); assertSame(get(mem32, 0, 1), [0x77995678]); +ins.exports["store16_lane_1"](16, 0); assertSame(get(mem32, 0, 1), [0x77991234]); +ins.exports["store16_lane_2"](16, 0); assertSame(get(mem32, 0, 1), [0x77996789]); +ins.exports["store16_lane_5"](16, 0); assertSame(get(mem32, 0, 1), [0x77993456]); +ins.exports["store16_lane_7"](16, 0); assertSame(get(mem32, 0, 1), [0x77994567]); + +ins.exports["store32_lane_0"](16, 0); assertSame(get(mem32, 0, 2), [0x12345678, 42]); +ins.exports["store32_lane_1"](16, 0); assertSame(get(mem32, 0, 2), [0x23456789, 42]); +ins.exports["store32_lane_2"](16, 0); assertSame(get(mem32, 0, 2), [0x3456789A, 42]); +ins.exports["store32_lane_3"](16, 0); assertSame(get(mem32, 0, 2), [0x456789AB, 42]); + +ins.exports["store64_lane_0"](16, 0); assertSame(get(mem64, 0, 2), [0x2345678912345678n, 3]); +ins.exports["store64_lane_1"](16, 0); assertSame(get(mem64, 0, 2), [0x456789AB3456789An, 3]); + +// .. (mis)align store lane + +var as = [0x12345678, 0x23456789, 0x3456789A, 0x456789AB]; +set(mem32, 4, as); set(mem32, 0, [0x7799AA01, 42, 3, 0]); +ins.exports["store16_lane_1"](16, 1); assertSame(get(mem32, 0, 2), [0x77123401, 42]); +set(mem32, 0, [0x7799AA01, 42, 3, 0]); +ins.exports["store32_lane_1"](16, 2); assertSame(get(mem32, 0, 2), [0x6789AA01, 0x2345]); +set(mem32, 0, [0x7799AA01, 42, 5, 3]); +ins.exports["store64_lane_0"](16, 1); +assertSame(get(mem64, 0, 2), [0x4567891234567801n, 0x0300000023]); + +set(mem32, 4, [ + 0x12345678, 0x23456789, 0x3456789A, 0x456789AB, + 0x55AA55AA, 0xCC44CC44, 0x55AA55AA, 0xCC44CC44, + 0x55AA55AA, 0xCC44CC44, 0x55AA55AA, 0xCC44CC44, +]); +ins.exports["store_lane_const_and_align"](); +assertSame(get(mem32, 8, 8), [ + 0x551234aa, 0x56789a44, 0x55aa5534, 0x7844cc44, + 0x89123456|0, 0xcc234567|0, 0x55aa55aa, 0xcc44cc44|0, +]); + + +// i8x16.popcnt + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "i8x16_popcnt") + (v128.store (i32.const 0) (i8x16.popcnt (v128.load (i32.const 16)) ))) + )`); + +var mem8 = new Int8Array(ins.exports.mem.buffer); + +set(mem8, 16, [0, 1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80, 3, -1, 0xF0, 0x11, 0xFE, 0x0F, 0xE]); +ins.exports.i8x16_popcnt(); +assertSame(get(mem8, 0, 16), [0,1,1,1,1,1,1,1,1,2,8,4,2,7,4,3]); + + +/// Double-precision conversion instructions. +/// f64x2.convert_low_i32x4_{u,s} / i32x4.trunc_sat_f64x2_{u,s}_zero +/// f32x4.demote_f64x2_zero / f64x2.promote_low_f32x4 + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "f64x2_convert_low_i32x4_s") + (v128.store (i32.const 0) (f64x2.convert_low_i32x4_s (v128.load (i32.const 16)) ))) + (func (export "f64x2_convert_low_i32x4_u") + (v128.store (i32.const 0) (f64x2.convert_low_i32x4_u (v128.load (i32.const 16)) ))) + + (func (export "i32x4_trunc_sat_f64x2_s_zero") + (v128.store (i32.const 0) (i32x4.trunc_sat_f64x2_s_zero (v128.load (i32.const 16)) ))) + (func (export "i32x4_trunc_sat_f64x2_u_zero") + (v128.store (i32.const 0) (i32x4.trunc_sat_f64x2_u_zero (v128.load (i32.const 16)) ))) + + (func (export "f32x4_demote_f64x2") + (v128.store (i32.const 0) (f32x4.demote_f64x2_zero (v128.load (i32.const 16)) ))) + (func (export "f64x2_protomote_f32x4") + (v128.store (i32.const 0) (f64x2.promote_low_f32x4 (v128.load (i32.const 16)) ))) + )`); + +var mem32 = new Int32Array(ins.exports.mem.buffer); +var memU32 = new Uint32Array(ins.exports.mem.buffer); +var memF32 = new Float32Array(ins.exports.mem.buffer); +var memF64 = new Float64Array(ins.exports.mem.buffer); + +// f64x2.convert_low_i32x4_u / f64x2.convert_low_i32x4_s + +set(mem32, 4, [1, -2, 0, -2]); +ins.exports.f64x2_convert_low_i32x4_s(); +assertSame(get(memF64, 0, 2), [1, -2]); +set(mem32, 4, [-1, 0, 5, -212312312]); +ins.exports.f64x2_convert_low_i32x4_s(); +assertSame(get(memF64, 0, 2), [-1, 0]); + +set(memU32, 4, [1, 4045646797, 4, 0]); +ins.exports.f64x2_convert_low_i32x4_u(); +assertSame(get(memF64, 0, 2), [1, 4045646797]); +set(memU32, 4, [0, 2, 4, 3]); +ins.exports.f64x2_convert_low_i32x4_u(); +assertSame(get(memF64, 0, 2), [0, 2]); + +// i32x4.trunc_sat_f64x2_u_zero / i32x4.trunc_sat_f64x2_s_zero + +set(memF64, 2, [0,0]) +ins.exports.i32x4_trunc_sat_f64x2_s_zero(); +assertSame(get(mem32, 0, 4), [0,0,0,0]); +ins.exports.i32x4_trunc_sat_f64x2_u_zero(); +assertSame(get(memU32, 0, 4), [0,0,0,0]); + +set(memF64, 2, [-1.23,65535.12]) +ins.exports.i32x4_trunc_sat_f64x2_s_zero(); +assertSame(get(mem32, 0, 4), [-1,65535,0,0]); +set(memF64, 2, [1.99,65535.12]) +ins.exports.i32x4_trunc_sat_f64x2_u_zero(); +assertSame(get(memU32, 0, 4), [1,65535,0,0]); + +set(memF64, 2, [10e+100,-10e+100]) +ins.exports.i32x4_trunc_sat_f64x2_s_zero(); +assertSame(get(mem32, 0, 4), [0x7fffffff,-0x80000000,0,0]); +ins.exports.i32x4_trunc_sat_f64x2_u_zero(); +assertSame(get(memU32, 0, 4), [0xffffffff,0,0,0]); + +// f32x4.demote_f64x2_zero + +set(memF64, 2, [1, 2]) +ins.exports.f32x4_demote_f64x2(); +assertSame(get(memF32, 0, 4), [1,2,0,0]); + +set(memF64, 2, [-4e38, 4e38]) +ins.exports.f32x4_demote_f64x2(); +assertSame(get(memF32, 0, 4), [-Infinity,Infinity,0,0]); + +set(memF64, 2, [-1e-46, 1e-46]) +ins.exports.f32x4_demote_f64x2(); +assertSame(get(memF32, 0, 4), [1/-Infinity,0,0,0]); + +set(memF64, 2, [0, NaN]) +ins.exports.f32x4_demote_f64x2(); +assertSame(get(memF32, 0, 4), [0, NaN,0,0]); + +set(memF64, 2, [Infinity, -Infinity]) +ins.exports.f32x4_demote_f64x2(); +assertSame(get(memF32, 0, 4), [Infinity, -Infinity,0,0]); + +// f64x2.promote_low_f32x4 + +set(memF32, 4, [4, 3, 1, 2]) +ins.exports.f64x2_protomote_f32x4(); +assertSame(get(memF64, 0, 2), [4, 3]); + +set(memF32, 4, [NaN, 0, 0, 0]) +ins.exports.f64x2_protomote_f32x4(); +assertSame(get(memF64, 0, 2), [NaN, 0]); + +set(memF32, 4, [Infinity, -Infinity, 0, 0]) +ins.exports.f64x2_protomote_f32x4(); +assertSame(get(memF64, 0, 2), [Infinity, -Infinity]); + + +// i16x8.extadd_pairwise_i8x16_{s,u} / i32x4.extadd_pairwise_i16x8_{s,u} + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "i16x8_extadd_pairwise_i8x16_s") + (v128.store (i32.const 0) (i16x8.extadd_pairwise_i8x16_s (v128.load (i32.const 16)) ))) + (func (export "i16x8_extadd_pairwise_i8x16_u") + (v128.store (i32.const 0) (i16x8.extadd_pairwise_i8x16_u (v128.load (i32.const 16)) ))) + + (func (export "i32x4_extadd_pairwise_i16x8_s") + (v128.store (i32.const 0) (i32x4.extadd_pairwise_i16x8_s (v128.load (i32.const 16)) ))) + (func (export "i32x4_extadd_pairwise_i16x8_u") + (v128.store (i32.const 0) (i32x4.extadd_pairwise_i16x8_u (v128.load (i32.const 16)) ))) + )`); + +var mem8 = new Int8Array(ins.exports.mem.buffer); +var memU8 = new Uint8Array(ins.exports.mem.buffer); +var mem16 = new Int16Array(ins.exports.mem.buffer); +var memU16 = new Uint16Array(ins.exports.mem.buffer); +var mem32 = new Int32Array(ins.exports.mem.buffer); +var memU32 = new Uint32Array(ins.exports.mem.buffer); + +set(mem8, 16, [0, 0, 1, 1, 2, -2, 0, 42, 1, -101, 101, -1, 127, 125, -1, -2]); +ins.exports.i16x8_extadd_pairwise_i8x16_s(); +assertSame(get(mem16, 0, 8), [0, 2, 0, 42, -100, 100, 252, -3]); + +set(memU8, 16, [0, 0, 1, 1, 2, 255, 0, 42, 0, 255, 254, 0, 127, 125, 255, 255]); +ins.exports.i16x8_extadd_pairwise_i8x16_u(); +assertSame(get(memU16, 0, 8), [0, 2, 257, 42, 255, 254, 252, 510]); + +set(mem16, 8, [0, 0, 1, 1, 2, -2, -1, -2]); +ins.exports.i32x4_extadd_pairwise_i16x8_s(); +assertSame(get(mem32, 0, 4), [0, 2, 0, -3]); +set(mem16, 8, [0, 42, 1, -32760, 32766, -1, 32761, 32762]); +ins.exports.i32x4_extadd_pairwise_i16x8_s(); +assertSame(get(mem32, 0, 4), [42, -32759, 32765, 65523]); + +set(memU16, 8, [0, 0, 1, 1, 2, 65535, 65535, 65535]); +ins.exports.i32x4_extadd_pairwise_i16x8_u(); +assertSame(get(memU32, 0, 4), [0, 2, 65537, 131070]); +set(memU16, 8, [0, 42, 0, 65535, 65534, 0, 32768, 32765]); +ins.exports.i32x4_extadd_pairwise_i16x8_u(); +assertSame(get(memU32, 0, 4), [42, 65535, 65534, 65533]); diff --git a/js/src/jit-test/tests/wasm/simd/ad-hack-preamble.js b/js/src/jit-test/tests/wasm/simd/ad-hack-preamble.js new file mode 100644 index 0000000000..407b59476f --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/ad-hack-preamble.js @@ -0,0 +1,211 @@ +// |jit-test| skip-if: true + +// Common code for the ad-hack test cases. + +function get(arr, loc, len) { + let res = []; + for ( let i=0; i < len; i++ ) { + res.push(arr[loc+i]); + } + return res; +} + +function getUnaligned(arr, width, loc, len) { + assertEq(arr.constructor, Uint8Array); + assertEq(width <= 4, true); + let res = []; + for ( let i=0; i < len; i++ ) { + let x = 0; + for ( let j=width-1; j >=0; j-- ) + x = (x << 8) | arr[loc+i*width+j]; + res.push(x); + } + return res; +} + +function set(arr, loc, vals) { + for ( let i=0; i < vals.length; i++ ) { + if (arr instanceof BigInt64Array) { + arr[loc+i] = BigInt(vals[i]); + } else { + arr[loc+i] = vals[i]; + } + } +} + +function setUnaligned(arr, width, loc, vals) { + assertEq(arr.constructor, Uint8Array); + assertEq(width <= 4, true); + for ( let i=0; i < vals.length; i++ ) { + let x = vals[i]; + for ( let j=0 ; j < width ; j++ ) { + arr[loc+i*width + j] = x & 255; + x >>= 8; + } + } +} + +function equal(a, b) { + return a === b || isNaN(a) && isNaN(b); +} + +function upd(xs, at, val) { + let ys = Array.from(xs); + ys[at] = val; + return ys; +} + +// The following operations are not always generalized fully, they are just +// functional enough for the existing test cases to pass. + +function sign_extend(n, bits) { + if (bits < 32) { + n = Number(n); + return (n << (32 - bits)) >> (32 - bits); + } + if (typeof n == "bigint") { + if (bits == 32) + return Number(n & 0xFFFF_FFFFn) | 0; + assertEq(bits, 64); + n = (n & 0xFFFF_FFFF_FFFF_FFFFn) + if (n > 0x7FFF_FFFF_FFFF_FFFFn) + return n - 0x1_0000_0000_0000_0000n; + return n; + } + assertEq(bits, 32); + return n|0; +} + +function zero_extend(n, bits) { + if (bits < 32) { + return n & ((1 << bits) - 1); + } + if (n < 0) + n = 0x100000000 + n; + return n; +} + +function signed_saturate(z, bits) { + let min = -(1 << (bits-1)); + if (z <= min) { + return min; + } + let max = (1 << (bits-1)) - 1; + if (z > max) { + return max; + } + return z; +} + +function unsigned_saturate(z, bits) { + if (z <= 0) { + return 0; + } + let max = (1 << bits) - 1; + if (z > max) { + return max; + } + return z; +} + +function shl(count, width) { + if (width == 64) { + count = BigInt(count); + return (v) => { + v = BigInt(v); + if (v < 0) + v = (1n << 64n) + v; + let r = (v << count) & ((1n << 64n) - 1n); + if (r & (1n << 63n)) + r = -((1n << 64n) - r); + return r; + } + } else { + return (v) => { + let mask = (width == 32) ? -1 : ((1 << width) - 1); + return (v << count) & mask; + } + } +} + +function popcount(n) { + n = n - ((n >> 1) & 0x55555555) + n = (n & 0x33333333) + ((n >> 2) & 0x33333333) + return ((n + (n >> 4) & 0xF0F0F0F) * 0x1010101) >> 24 +} + +function jsValueToWasmName(x) { + if (typeof x == "number") { + if (x == 0) return 1 / x < 0 ? "-0" : "0"; + if (isNaN(x)) return "+nan"; + if (!isFinite(x)) return (x < 0 ? "-" : "+") + "inf"; + } + return x; +} + +// For each input array, a set of arrays of the proper length for v128, with +// values in range but possibly of the wrong signedness (eg, for Int8Array, 128 +// is in range but is really -128). Also a unary operator `rectify` that +// transforms the value to the proper sign and bitwidth. + +Int8Array.inputs = [iota(16).map((x) => (x+1) * (x % 3 == 0 ? -1 : 1)), + iota(16).map((x) => (x*2+3) * (x % 3 == 1 ? -1 : 1)), + [1,2,128,127,1,4,128,127,1,2,129,125,1,2,254,0], + [2,1,127,128,5,1,127,128,2,1,126,130,2,1,1,255], + iota(16).map((x) => ((x + 37) * 8 + 12) % 256), + iota(16).map((x) => ((x + 12) * 4 + 9) % 256)]; +Int8Array.rectify = (x) => sign_extend(x,8); +Int8Array.layoutName = 'i8x16'; + +Uint8Array.inputs = Int8Array.inputs; +Uint8Array.rectify = (x) => zero_extend(x,8); +Uint8Array.layoutName = 'i8x16'; + +Int16Array.inputs = [iota(8).map((x) => (x+1) * (x % 3 == 0 ? -1 : 1)), + iota(8).map((x) => (x*2+3) * (x % 3 == 1 ? -1 : 1)), + [1,2,32768,32767,1,4,32768,32767], + [2,1,32767,32768,5,1,32767,32768], + [1,2,128,127,1,4,128,127].map((x) => (x << 8) + x*2), + [2,1,127,128,1,1,128,128].map((x) => (x << 8) + x*3)]; +Int16Array.rectify = (x) => sign_extend(x,16); +Int16Array.layoutName = 'i16x8'; + +Uint16Array.inputs = Int16Array.inputs; +Uint16Array.rectify = (x) => zero_extend(x,16); +Uint16Array.layoutName = 'i16x8'; + +Int32Array.inputs = [iota(4).map((x) => (x+1) * (x % 3 == 0 ? -1 : 1)), + iota(4).map((x) => (x*2+3) * (x % 3 == 1 ? -1 : 1)), + [1,2,32768 << 16,32767 << 16], + [2,1,32767 << 16,32768 << 16], + [1,2,128,127].map((x) => (x << 24) + (x << 8) + x*3), + [2,1,127,128].map((x) => (x << 24) + (x << 8) + x*4)]; +Int32Array.rectify = (x) => sign_extend(x,32); +Int32Array.layoutName = 'i32x4'; + +Uint32Array.inputs = Int32Array.inputs; +Uint32Array.rectify = (x) => zero_extend(x,32); +Uint32Array.layoutName = 'i32x4'; + +BigInt64Array.inputs = [[1,2],[2,1],[-1,-2],[-2,-1],[2n ** 32n, 2n ** 32n - 5n], + [(2n ** 38n) / 5n, (2n ** 41n) / 7n], + [-((2n ** 38n) / 5n), (2n ** 41n) / 7n]]; +BigInt64Array.rectify = (x) => BigInt(x); +BigInt64Array.layoutName = 'i64x2'; + +Float32Array.inputs = [[1, -1, 1e10, -1e10], + [-1, -2, -1e10, 1e10], + [5.1, -1.1, -4.3, -0], + ...permute([1, -10, NaN, Infinity])]; +Float32Array.rectify = (x) => Math.fround(x); +Float32Array.layoutName = 'f32x4'; + +Float64Array.inputs = Float32Array.inputs.map((x) => x.slice(0, 2)) +Float64Array.rectify = (x) => x; +Float64Array.layoutName = 'f64x2'; + +// Tidy up all the inputs +for ( let A of [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, BigInt64Array, + Float32Array, Float64Array]) { + A.inputs = A.inputs.map((xs) => xs.map(A.rectify)); +} diff --git a/js/src/jit-test/tests/wasm/simd/ad-hack-simple-binops0.js b/js/src/jit-test/tests/wasm/simd/ad-hack-simple-binops0.js new file mode 100644 index 0000000000..f3406ac44a --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/ad-hack-simple-binops0.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// Do not include these in the preamble, they must be loaded after lib/wasm.js +load(scriptdir + "ad-hack-preamble.js") +load(scriptdir + "ad-hack-binop-preamble.js") + +runSimpleBinopTest(0, 3); diff --git a/js/src/jit-test/tests/wasm/simd/ad-hack-simple-binops1.js b/js/src/jit-test/tests/wasm/simd/ad-hack-simple-binops1.js new file mode 100644 index 0000000000..e6d6f7e2fc --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/ad-hack-simple-binops1.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// Do not include these in the preamble, they must be loaded after lib/wasm.js +load(scriptdir + "ad-hack-preamble.js") +load(scriptdir + "ad-hack-binop-preamble.js") + +runSimpleBinopTest(1, 3); diff --git a/js/src/jit-test/tests/wasm/simd/ad-hack-simple-binops2.js b/js/src/jit-test/tests/wasm/simd/ad-hack-simple-binops2.js new file mode 100644 index 0000000000..a196aa28fc --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/ad-hack-simple-binops2.js @@ -0,0 +1,7 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// Do not include these in the preamble, they must be loaded after lib/wasm.js +load(scriptdir + "ad-hack-preamble.js") +load(scriptdir + "ad-hack-binop-preamble.js") + +runSimpleBinopTest(2, 3); diff --git a/js/src/jit-test/tests/wasm/simd/ad-hack-simple-unops.js b/js/src/jit-test/tests/wasm/simd/ad-hack-simple-unops.js new file mode 100644 index 0000000000..6e562a97a1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/ad-hack-simple-unops.js @@ -0,0 +1,122 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// Do not include this in the preamble, it must be loaded after lib/wasm.js +load(scriptdir + "ad-hack-preamble.js") + +// Simple unary operators. Place parameter in memory at offset 16, +// read the result at offset 0. + +function expandConstantUnopInputs(op, memtype, inputs) { + let s = ''; + let ident = 0; + for ( let a of inputs ) { + let constval = `${memtype.layoutName} ${a.map(jsValueToWasmName).join(' ')}`; + s += ` + (func (export "run_const${ident}") + (v128.store (i32.const 0) + (${op} (v128.const ${constval})))) +`; + ident++; + } + return s; +} + +function insAndMemUnop(op, memtype, resultmemtype, inputs) { + var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + + (func (export "run") + (v128.store (i32.const 0) + (call $doit (v128.load (i32.const 16))))) + + (func $doit (param $a v128) (result v128) + (${op} (local.get $a))) + + ${expandConstantUnopInputs(op, memtype, inputs)})`); + var mem = new memtype(ins.exports.mem.buffer); + var resultmem = !resultmemtype || memtype == resultmemtype ? mem : new resultmemtype(ins.exports.mem.buffer); + return [ins, mem, resultmem]; +} + +function ineg(bits) { return (a) => sign_extend(!a ? a : -a,bits) } +function iabs(bits) { return (a) => zero_extend(a < 0 ? -a : a, bits) } +function fneg(a) { return -a } +function fabs(a) { return Math.abs(a) } +function fsqrt(a) { return Math.fround(Math.sqrt(Math.fround(a))) } +function dsqrt(a) { return Math.sqrt(a) } +function bitnot(a) { return (~a) & 255 } +function ffloor(x) { return Math.fround(Math.floor(x)) } +function fceil(x) { return Math.fround(Math.ceil(x)) } +function ftrunc(x) { return Math.fround(Math.sign(x)*Math.floor(Math.abs(x))) } +function fnearest(x) { return Math.fround(Math.round(x)) } +function dfloor(x) { return Math.floor(x) } +function dceil(x) { return Math.ceil(x) } +function dtrunc(x) { return Math.sign(x)*Math.floor(Math.abs(x)) } +function dnearest(x) { return Math.round(x) } + +for ( let [op, memtype, rop, resultmemtype] of + [['i8x16.neg', Int8Array, ineg(8)], + ['i16x8.neg', Int16Array, ineg(16)], + ['i32x4.neg', Int32Array, ineg(32)], + ['i64x2.neg', BigInt64Array, ineg(64)], + ['i8x16.abs', Int8Array, iabs(8), Uint8Array], + ['i16x8.abs', Int16Array, iabs(16), Uint16Array], + ['i32x4.abs', Int32Array, iabs(32), Uint32Array], + ['f32x4.neg', Float32Array, fneg], + ['f64x2.neg', Float64Array, fneg], + ['f32x4.abs', Float32Array, fabs], + ['f64x2.abs', Float64Array, fabs], + ['f32x4.sqrt', Float32Array, fsqrt], + ['f64x2.sqrt', Float64Array, dsqrt], + ['f32x4.ceil', Float32Array, fceil], + ['f32x4.floor', Float32Array, ffloor], + ['f32x4.trunc', Float32Array, ftrunc], + ['f32x4.nearest', Float32Array, fnearest], + ['f64x2.ceil', Float64Array, dceil], + ['f64x2.floor', Float64Array, dfloor], + ['f64x2.trunc', Float64Array, dtrunc], + ['f64x2.nearest', Float64Array, dnearest], + ['v128.not', Uint8Array, bitnot], + ]) +{ + let [ins, mem, resultmem] = insAndMemUnop(op, memtype, resultmemtype, memtype.inputs); + let len = 16/memtype.BYTES_PER_ELEMENT; + let xs = iota(len); + let zero = xs.map(_ => 0); + let bitsForF32 = memtype == Float32Array ? new Uint32Array(mem.buffer) : null; + let bitsForF64 = memtype == Float64Array ? new BigInt64Array(mem.buffer) : null; + + function testIt(a, r) { + set(mem, len, a); + ins.exports.run(); + assertSame(get(resultmem, 0, len), r); + + // Test signalling NaN superficially by replacing QNaN inputs with SNaN + if (bitsForF32 != null && a.some(isNaN)) { + a.forEach((x, i) => { if (isNaN(x)) { bitsForF32[len+i] = 0x7FA0_0000; } }); + ins.exports.run(); + assertSame(get(resultmem, 0, len), r); + } + if (bitsForF64 != null && a.some(isNaN)) { + a.forEach((x, i) => { if (isNaN(x)) { bitsForF64[len+i] = 0x7FF4_0000_0000_0000n; } }); + ins.exports.run(); + assertSame(get(resultmem, 0, len), r); + } + } + + function testConstIt(i,r) { + set(resultmem, 0, zero); + ins.exports["run_const" + i](); + assertSame(get(resultmem, 0, len), r); + } + + let i = 0; + for (let a of memtype.inputs) { + let r = xs.map((i) => rop(a[i])); + testIt(a, r); + testConstIt(i, r); + i++; + } +} + diff --git a/js/src/jit-test/tests/wasm/simd/ad-hack.js b/js/src/jit-test/tests/wasm/simd/ad-hack.js new file mode 100644 index 0000000000..e176aeb4b4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/ad-hack.js @@ -0,0 +1,1747 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// Ad-hoc test cases used during development. Generally these are ordered from +// easier toward harder. +// +// The test cases here are usually those that require some special processing. +// Simple binary operators (v128 x v128 -> v128) and unary operators (v128 -> +// v128) are tested in ad-hack-simple-binops*.js and ad-hack-simple-unops.js. + +// Do not include this in the preamble, it must be loaded after lib/wasm.js +load(scriptdir + "ad-hack-preamble.js") + +// v128.store +// oob store +// v128.const + +for ( let offset of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) { + var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "f") (param $loc i32) + (v128.store offset=${offset} (local.get $loc) (v128.const i32x4 ${1+offset} 2 3 ${4+offset*2}))))`); + var mem8 = new Uint8Array(ins.exports.mem.buffer); + ins.exports.f(160); + assertSame(getUnaligned(mem8, 4, 160 + offset, 4), [1+offset, 2, 3, 4+offset*2]); + + // OOB write should trap + assertErrorMessage(() => ins.exports.f(65536-15), + WebAssembly.RuntimeError, + /index out of bounds/) + + // Ensure that OOB writes don't write anything: moved to simd-partial-oob-store.js +} + +// v128.load +// oob load +// v128.store +// temp register + +for ( let offset of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) { + var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "copy") (param $dest i32) (param $src i32) + (v128.store (local.get $dest) (v128.load offset=${offset} (local.get $src)))))`); + var mem32 = new Uint32Array(ins.exports.mem.buffer); + var mem8 = new Uint8Array(ins.exports.mem.buffer); + setUnaligned(mem8, 4, 4*4 + offset, [8+offset, 10, 12, 14+offset*2]); + ins.exports.copy(40*4, 4*4); + assertSame(get(mem32, 40, 4), [8+offset, 10, 12, 14+offset*2]); + assertErrorMessage(() => ins.exports.copy(40*4, 65536-15), + WebAssembly.RuntimeError, + /index out of bounds/); +} + +// call [with register params] +// parameters [in registers] +// return [with register values] +// locals +// +// local.get +// local.set +// v128.const +// v128.store + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func $g (param $param v128) (result v128) + (local $tmp v128) + (local.set $tmp (local.get $param)) + (local.get $tmp)) + (func (export "f") + (v128.store (i32.const 160) (call $g (v128.const i32x4 1 2 3 4)))))`); +var mem = new Uint32Array(ins.exports.mem.buffer); +ins.exports.f(); +assertSame(get(mem, 40, 4), [1, 2, 3, 4]); + +// Same test but with local.tee + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func $g (param $param v128) (result v128) + (local $tmp v128) + (local.tee $tmp (local.get $param))) + (func (export "f") + (v128.store (i32.const 160) (call $g (v128.const i32x4 1 2 3 4)))))`); +var mem = new Uint32Array(ins.exports.mem.buffer); +ins.exports.f(); +assertSame(get(mem, 40, 4), [1, 2, 3, 4]); + +// Locals that end up on the stack. Try to create unaligned placement (in the +// baseline compiler anyway) by inserting i32 locals before or after and +// inbetween the v128 ones and by having so many locals that we run out of +// registers. + +var nlocals = 64; +for ( let start of [0, 1]) { + let decl = ""; + let set = ""; + let sum = "(v128.const i32x4 0 0 0 0)"; + var res = [0,0,0,0]; + var locno = start; + for ( let i=start ; i < start + nlocals ; i++ ) { + decl += "(local v128) "; + set += `(local.set ${locno} (v128.const i32x4 ${i} ${i+1} ${i+2} ${i+3})) `; + sum = `(i32x4.add ${sum} (local.get ${locno}))`; + locno++; + res[0] += i; + res[1] += i+1; + res[2] += i+2; + res[3] += i+3; + if ((i % 5) == 3) { + decl += "(local i32) "; + locno++; + } + } + if (start) + decl = "(local i32) " + decl; + else + decl += "(local i32) "; + var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func $g (result v128) + ${decl} + ${set} + ${sum}) + (func (export "f") + (v128.store (i32.const 160) (call $g))))`); + + var mem = new Uint32Array(ins.exports.mem.buffer); + ins.exports.f(); + assertSame(get(mem, 40, 4), res); +} + +// Ditto parameters. This is like the case above but values are passed rather +// than set. +// +// call +// call_indirect + +var nlocals = 64; +for ( let start of [0, 1]) { + let decl = ""; + let pass = ""; + let sum = "(v128.const i32x4 0 0 0 0)"; + var res = [0,0,0,0]; + var locno = start; + for ( let i=start ; i < start + nlocals ; i++ ) { + decl += "(param v128) "; + pass += `(v128.const i32x4 ${i} ${i+1} ${i+2} ${i+3}) `; + sum = `(i32x4.add ${sum} (local.get ${locno}))`; + locno++; + res[0] += i; + res[1] += i+1; + res[2] += i+2; + res[3] += i+3; + if ((i % 5) == 3) { + decl += "(param i32) "; + pass += "(i32.const 0) "; + locno++; + } + } + if (start) { + decl = "(param i32) " + decl; + pass = "(i32.const 0) " + pass; + } else { + decl += "(param i32) "; + pass += "(i32.const 0) "; + } + var txt = ` + (module + (memory (export "mem") 1 1) + (type $t1 (func ${decl} (result v128))) + (table funcref (elem $h)) + (func $g ${decl} (result v128) + ${sum}) + (func (export "f1") + (v128.store (i32.const 160) (call $g ${pass}))) + (func $h ${decl} (result v128) + ${sum}) + (func (export "f2") + (v128.store (i32.const 512) (call_indirect (type $t1) ${pass} (i32.const 0)))))`; + var ins = wasmEvalText(txt); + + var mem = new Uint32Array(ins.exports.mem.buffer); + ins.exports.f1(); + assertSame(get(mem, 40, 4), res); + ins.exports.f2(); + assertSame(get(mem, 128, 4), res); +} + +// Widening integer dot product + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) + (i32x4.dot_i16x8_s (v128.load (i32.const 16)) (v128.load (i32.const 32))))))`); + +var xs = [5, 1, -4, 2, 20, -15, 12, 3]; +var ys = [6, 0, -7, 3, 8, -1, -3, 7]; +var ans = [xs[0]*ys[0] + xs[1]*ys[1], + xs[2]*ys[2] + xs[3]*ys[3], + xs[4]*ys[4] + xs[5]*ys[5], + xs[6]*ys[6] + xs[7]*ys[7]]; + +var mem16 = new Int16Array(ins.exports.mem.buffer); +var mem32 = new Int32Array(ins.exports.mem.buffer); +set(mem16, 8, xs); +set(mem16, 16, ys); +ins.exports.run(); +var result = get(mem32, 0, 4); +assertSame(result, ans); + +// Splat, with and without constants (different code paths in ion) + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "splat_i8x16") (param $src i32) + (v128.store (i32.const 0) (i8x16.splat (local.get $src)))) + (func (export "csplat_i8x16") + (v128.store (i32.const 0) (i8x16.splat (i32.const 37)))) + (func (export "splat_i16x8") (param $src i32) + (v128.store (i32.const 0) (i16x8.splat (local.get $src)))) + (func (export "csplat_i16x8") + (v128.store (i32.const 0) (i16x8.splat (i32.const 1175)))) + (func (export "splat_i32x4") (param $src i32) + (v128.store (i32.const 0) (i32x4.splat (local.get $src)))) + (func (export "csplat_i32x4") + (v128.store (i32.const 0) (i32x4.splat (i32.const 127639)))) + (func (export "splat_i64x2") (param $src i64) + (v128.store (i32.const 0) (i64x2.splat (local.get $src)))) + (func (export "csplat_i64x2") + (v128.store (i32.const 0) (i64x2.splat (i64.const 0x1234_5678_4365)))) + (func (export "splat_f32x4") (param $src f32) + (v128.store (i32.const 0) (f32x4.splat (local.get $src)))) + (func (export "csplat_f32x4") + (v128.store (i32.const 0) (f32x4.splat (f32.const 9121.25)))) + (func (export "splat_f64x2") (param $src f64) + (v128.store (i32.const 0) (f64x2.splat (local.get $src)))) + (func (export "csplat_f64x2") + (v128.store (i32.const 0) (f64x2.splat (f64.const 26789.125)))) +)`); + +var mem8 = new Uint8Array(ins.exports.mem.buffer); +ins.exports.splat_i8x16(3); +assertSame(get(mem8, 0, 16), iota(16).map(_=>3)); +ins.exports.csplat_i8x16(); +assertSame(get(mem8, 0, 16), iota(16).map(_=>37)); + +var mem16 = new Uint16Array(ins.exports.mem.buffer); +ins.exports.splat_i16x8(976); +assertSame(get(mem16, 0, 8), iota(8).map(_=>976)); +ins.exports.csplat_i16x8(); +assertSame(get(mem16, 0, 8), iota(8).map(_=>1175)); + +var mem32 = new Uint32Array(ins.exports.mem.buffer); +ins.exports.splat_i32x4(147812); +assertSame(get(mem32, 0, 4), [147812, 147812, 147812, 147812]); +ins.exports.csplat_i32x4(); +assertSame(get(mem32, 0, 4), [127639, 127639, 127639, 127639]); + +var mem64 = new BigInt64Array(ins.exports.mem.buffer); +ins.exports.splat_i64x2(147812n); +assertSame(get(mem64, 0, 2), [147812, 147812]); +ins.exports.csplat_i64x2(); +assertSame(get(mem64, 0, 2), [0x1234_5678_4365n, 0x1234_5678_4365n]); + +var memf32 = new Float32Array(ins.exports.mem.buffer); +ins.exports.splat_f32x4(147812.5); +assertSame(get(memf32, 0, 4), [147812.5, 147812.5, 147812.5, 147812.5]); +ins.exports.csplat_f32x4(); +assertSame(get(memf32, 0, 4), [9121.25, 9121.25, 9121.25, 9121.25]); + +var memf64 = new Float64Array(ins.exports.mem.buffer); +ins.exports.splat_f64x2(147812.5); +assertSame(get(memf64, 0, 2), [147812.5, 147812.5]); +ins.exports.csplat_f64x2(); +assertSame(get(memf64, 0, 2), [26789.125, 26789.125]); + +// AnyTrue. Ion constant folds, so test that too. + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "anytrue_i8x16") (result i32) + (v128.any_true (v128.load (i32.const 16)))) + (func (export "true_anytrue_i8x16") (result i32) + (v128.any_true (v128.const i8x16 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0))) + (func (export "false_anytrue_i8x16") (result i32) + (v128.any_true (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))`); + +var mem = new Uint8Array(ins.exports.mem.buffer); +set(mem, 16, iota(16).map((_) => 0)); +assertEq(ins.exports.anytrue_i8x16(), 0); + +for ( let dope of [1, 7, 32, 195 ] ) { + set(mem, 16, iota(16).map((x) => x == 7 ? dope : 0)); + assertEq(ins.exports.anytrue_i8x16(), 1); +} + +assertEq(ins.exports.true_anytrue_i8x16(), 1); +assertEq(ins.exports.false_anytrue_i8x16(), 0); + +// AllTrue. Ion constant folds, so test that too. + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "alltrue_i8x16") (result i32) + (i8x16.all_true (v128.load (i32.const 16)))) + (func (export "true_alltrue_i8x16") (result i32) + (i8x16.all_true (v128.const i8x16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16))) + (func (export "false_alltrue_i8x16") (result i32) + (i8x16.all_true (v128.const i8x16 1 2 3 4 5 6 0 8 9 10 11 12 13 14 15 16))) + (func (export "alltrue_i16x8") (result i32) + (i16x8.all_true (v128.load (i32.const 16)))) + (func (export "true_alltrue_i16x8") (result i32) + (i16x8.all_true (v128.const i16x8 1 2 3 4 5 6 7 8))) + (func (export "false_alltrue_i16x8") (result i32) + (i16x8.all_true (v128.const i16x8 1 2 3 4 5 0 7 8))) + (func (export "alltrue_i32x4") (result i32) + (i32x4.all_true (v128.load (i32.const 16)))) + (func (export "true_alltrue_i32x4") (result i32) + (i32x4.all_true (v128.const i32x4 1 2 3 4))) + (func (export "false_alltrue_i32x4") (result i32) + (i32x4.all_true (v128.const i32x4 1 2 3 0))))`); + +var mem8 = new Uint8Array(ins.exports.mem.buffer); +var mem16 = new Uint16Array(ins.exports.mem.buffer); +var mem32 = new Uint32Array(ins.exports.mem.buffer); + +set(mem8, 16, iota(16).map((_) => 0)); +assertEq(ins.exports.alltrue_i8x16(), 0); +assertEq(ins.exports.alltrue_i16x8(), 0); +assertEq(ins.exports.alltrue_i32x4(), 0); + +set(mem8, 16, iota(16).map((_) => 1)); +assertEq(ins.exports.alltrue_i8x16(), 1); + +set(mem16, 8, iota(8).map((_) => 1)); +assertEq(ins.exports.alltrue_i16x8(), 1); + +set(mem32, 4, iota(4).map((_) => 1)); +assertEq(ins.exports.alltrue_i32x4(), 1); + +for ( let dope of [1, 7, 32, 195 ] ) { + set(mem8, 16, iota(16).map((x) => x == 7 ? 0 : dope)); + assertEq(ins.exports.alltrue_i8x16(), 0); + + set(mem16, 8, iota(8).map((x) => x == 4 ? 0 : dope)); + assertEq(ins.exports.alltrue_i16x8(), 0); + + set(mem32, 4, iota(4).map((x) => x == 2 ? 0 : dope)); + assertEq(ins.exports.alltrue_i32x4(), 0); +} + +assertEq(ins.exports.true_alltrue_i8x16(), 1); +assertEq(ins.exports.false_alltrue_i8x16(), 0); +assertEq(ins.exports.true_alltrue_i16x8(), 1); +assertEq(ins.exports.false_alltrue_i16x8(), 0); +assertEq(ins.exports.true_alltrue_i32x4(), 1); +assertEq(ins.exports.false_alltrue_i32x4(), 0); + +// Bitmask. Ion constant folds, so test that too. + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "bitmask_i8x16") (result i32) + (i8x16.bitmask (v128.load (i32.const 16)))) + (func (export "const_bitmask_i8x16") (result i32) + (i8x16.bitmask (v128.const i8x16 0x80 0x7f 0xff 0x33 0x42 0x98 0x01 0x00 + 0x31 0xcc 0xdd 0x12 0xf0 0x40 0x02 0xa0))) + (func (export "bitmask_i16x8") (result i32) + (i16x8.bitmask (v128.load (i32.const 16)))) + (func (export "const_bitmask_i16x8") (result i32) + (i16x8.bitmask (v128.const i16x8 0x7f80 0xff33 0x9842 0x0001 0xcc31 0x12dd 0x40f0 0xa002))) + (func (export "bitmask_i32x4") (result i32) + (i32x4.bitmask (v128.load (i32.const 16)))) + (func (export "const_bitmask_i32x4") (result i32) + (i32x4.bitmask (v128.const i32x4 0xff337f80 0x00019842 0xcc3112dd 0xa00240f0))))`); + +var mem8 = new Uint8Array(ins.exports.mem.buffer); +var mem16 = new Uint16Array(ins.exports.mem.buffer); +var mem32 = new Uint32Array(ins.exports.mem.buffer); + +set(mem8, 16, iota(16).map((_) => 0)); +assertEq(ins.exports.bitmask_i8x16(), 0); +assertEq(ins.exports.bitmask_i16x8(), 0); +assertEq(ins.exports.bitmask_i32x4(), 0); + +set(mem8, 16, iota(16).map((_) => 0x80)); +assertEq(ins.exports.bitmask_i8x16(), 0xFFFF); + +set(mem8, 16, iota(16).map((_) => 0x7F)); +assertEq(ins.exports.bitmask_i8x16(), 0); + +set(mem8, 16, iota(16).map((i) => popcount(i) == 1 ? 0x80 : 0)); +assertEq(ins.exports.bitmask_i8x16(), (1 << 1) | (1 << 2) | (1 << 4) | (1 << 8)); + +assertEq(ins.exports.const_bitmask_i8x16(), 0x9625); + +set(mem16, 8, iota(8).map((i) => 0x8000)) +assertEq(ins.exports.bitmask_i16x8(), 0xFF) + +set(mem16, 8, iota(8).map((i) => 0x7FFF)) +assertEq(ins.exports.bitmask_i16x8(), 0) + +set(mem16, 8, iota(8).map((i) => popcount(i) == 1 ? 0x8000 : 0)) +assertEq(ins.exports.bitmask_i16x8(), (1 << 1) | (1 << 2) | (1 << 4)); + +assertEq(ins.exports.const_bitmask_i16x8(), 0x96); + +set(mem32, 4, iota(4).map((_) => 0x80000000)) +assertEq(ins.exports.bitmask_i32x4(), 0xF); + +set(mem32, 4, iota(4).map((_) => 0x7FFFFFFF)) +assertEq(ins.exports.bitmask_i32x4(), 0); + +set(mem32, 4, iota(4).map((i) => popcount(i) == 1 ? 0x80000000 : 0)) +assertEq(ins.exports.bitmask_i32x4(), (1 << 1) | (1 << 2)); + +assertEq(ins.exports.const_bitmask_i32x4(), 0xd); + +// Shifts +// +// lhs is v128 in memory +// rhs is i32 (passed directly) +// result is v128 in memory + +function shr(count, width) { + return (v) => { + if (count == 0) + return v; + if (width == 64) { + if (v < 0) { + // This basically mirrors what the SIMD code does, so if there's + // a bug there then there's a bug here too. Seems OK though. + let s = 0x1_0000_0000_0000_0000n + BigInt(v); + let t = s / (1n << BigInt(count)); + let u = ((1n << BigInt(count)) - 1n) * (2n ** BigInt(64-count)); + let w = t + u; + return w - 0x1_0000_0000_0000_0000n; + } + return BigInt(v) / (1n << BigInt(count)); + } else { + let mask = (width == 32) ? -1 : ((1 << width) - 1); + return (sign_extend(v, width) >> count) & mask; + } + } +} + +function shru(count, width) { + if (width == 64) { + return (v) => { + if (count == 0) + return v; + if (v < 0) { + v = 0x1_0000_0000_0000_0000n + BigInt(v); + } + return BigInt(v) / (1n << BigInt(count)); + } + } else { + return (v) => { + let mask = (width == 32) ? -1 : ((1 << width) - 1); + return (v >>> count) & mask; + } + } +} + +var constantI8Shifts = ""; +for ( let i of iota(10).concat([-7]) ) { + constantI8Shifts += ` + (func (export "shl_i8x16_${i}") + (v128.store (i32.const 0) (i8x16.shl (v128.load (i32.const 16)) (i32.const ${i})))) + (func (export "shr_i8x16_${i}") + (v128.store (i32.const 0) (i8x16.shr_s (v128.load (i32.const 16)) (i32.const ${i})))) + (func (export "shr_u8x16_${i}") + (v128.store (i32.const 0) (i8x16.shr_u (v128.load (i32.const 16)) (i32.const ${i}))))`; +} + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "shl_i8x16") (param $count i32) + (v128.store (i32.const 0) (i8x16.shl (v128.load (i32.const 16)) (local.get $count)))) + (func (export "shr_i8x16") (param $count i32) + (v128.store (i32.const 0) (i8x16.shr_s (v128.load (i32.const 16)) (local.get $count)))) + (func (export "shr_u8x16") (param $count i32) + (v128.store (i32.const 0) (i8x16.shr_u (v128.load (i32.const 16)) (local.get $count)))) + ${constantI8Shifts} + (func (export "shl_i16x8") (param $count i32) + (v128.store (i32.const 0) (i16x8.shl (v128.load (i32.const 16)) (local.get $count)))) + (func (export "shl_i16x8_3") + (v128.store (i32.const 0) (i16x8.shl (v128.load (i32.const 16)) (i32.const 3)))) + (func (export "shl_i16x8_15") + (v128.store (i32.const 0) (i16x8.shl (v128.load (i32.const 16)) (i32.const 15)))) + (func (export "shl_i16x8_16") + (v128.store (i32.const 0) (i16x8.shl (v128.load (i32.const 16)) (i32.const 16)))) + (func (export "shl_i16x8_-15") + (v128.store (i32.const 0) (i16x8.shl (v128.load (i32.const 16)) (i32.const -15)))) + (func (export "shr_i16x8") (param $count i32) + (v128.store (i32.const 0) (i16x8.shr_s (v128.load (i32.const 16)) (local.get $count)))) + (func (export "shr_i16x8_3") + (v128.store (i32.const 0) (i16x8.shr_s (v128.load (i32.const 16)) (i32.const 3)))) + (func (export "shr_i16x8_15") + (v128.store (i32.const 0) (i16x8.shr_s (v128.load (i32.const 16)) (i32.const 15)))) + (func (export "shr_i16x8_16") + (v128.store (i32.const 0) (i16x8.shr_s (v128.load (i32.const 16)) (i32.const 16)))) + (func (export "shr_i16x8_-15") + (v128.store (i32.const 0) (i16x8.shr_s (v128.load (i32.const 16)) (i32.const -15)))) + (func (export "shr_u16x8") (param $count i32) + (v128.store (i32.const 0) (i16x8.shr_u (v128.load (i32.const 16)) (local.get $count)))) + (func (export "shr_u16x8_3") + (v128.store (i32.const 0) (i16x8.shr_u (v128.load (i32.const 16)) (i32.const 3)))) + (func (export "shr_u16x8_15") + (v128.store (i32.const 0) (i16x8.shr_u (v128.load (i32.const 16)) (i32.const 15)))) + (func (export "shr_u16x8_16") + (v128.store (i32.const 0) (i16x8.shr_u (v128.load (i32.const 16)) (i32.const 16)))) + (func (export "shr_u16x8_-15") + (v128.store (i32.const 0) (i16x8.shr_u (v128.load (i32.const 16)) (i32.const -15)))) + (func (export "shl_i32x4") (param $count i32) + (v128.store (i32.const 0) (i32x4.shl (v128.load (i32.const 16)) (local.get $count)))) + (func (export "shl_i32x4_12") + (v128.store (i32.const 0) (i32x4.shl (v128.load (i32.const 16)) (i32.const 12)))) + (func (export "shl_i32x4_31") + (v128.store (i32.const 0) (i32x4.shl (v128.load (i32.const 16)) (i32.const 31)))) + (func (export "shl_i32x4_32") + (v128.store (i32.const 0) (i32x4.shl (v128.load (i32.const 16)) (i32.const 32)))) + (func (export "shl_i32x4_-27") + (v128.store (i32.const 0) (i32x4.shl (v128.load (i32.const 16)) (i32.const -27)))) + (func (export "shr_i32x4") (param $count i32) + (v128.store (i32.const 0) (i32x4.shr_s (v128.load (i32.const 16)) (local.get $count)))) + (func (export "shr_i32x4_12") + (v128.store (i32.const 0) (i32x4.shr_s (v128.load (i32.const 16)) (i32.const 12)))) + (func (export "shr_i32x4_31") + (v128.store (i32.const 0) (i32x4.shr_s (v128.load (i32.const 16)) (i32.const 31)))) + (func (export "shr_i32x4_32") + (v128.store (i32.const 0) (i32x4.shr_s (v128.load (i32.const 16)) (i32.const 32)))) + (func (export "shr_i32x4_-27") + (v128.store (i32.const 0) (i32x4.shr_s (v128.load (i32.const 16)) (i32.const -27)))) + (func (export "shr_u32x4") (param $count i32) + (v128.store (i32.const 0) (i32x4.shr_u (v128.load (i32.const 16)) (local.get $count)))) + (func (export "shr_u32x4_12") + (v128.store (i32.const 0) (i32x4.shr_u (v128.load (i32.const 16)) (i32.const 12)))) + (func (export "shr_u32x4_31") + (v128.store (i32.const 0) (i32x4.shr_u (v128.load (i32.const 16)) (i32.const 31)))) + (func (export "shr_u32x4_32") + (v128.store (i32.const 0) (i32x4.shr_u (v128.load (i32.const 16)) (i32.const 32)))) + (func (export "shr_u32x4_-27") + (v128.store (i32.const 0) (i32x4.shr_u (v128.load (i32.const 16)) (i32.const -27)))) + (func (export "shl_i64x2") (param $count i32) + (v128.store (i32.const 0) (i64x2.shl (v128.load (i32.const 16)) (local.get $count)))) + (func (export "shl_i64x2_27") + (v128.store (i32.const 0) (i64x2.shl (v128.load (i32.const 16)) (i32.const 27)))) + (func (export "shl_i64x2_63") + (v128.store (i32.const 0) (i64x2.shl (v128.load (i32.const 16)) (i32.const 63)))) + (func (export "shl_i64x2_64") + (v128.store (i32.const 0) (i64x2.shl (v128.load (i32.const 16)) (i32.const 64)))) + (func (export "shl_i64x2_-231") + (v128.store (i32.const 0) (i64x2.shl (v128.load (i32.const 16)) (i32.const -231)))) + (func (export "shr_i64x2") (param $count i32) + (v128.store (i32.const 0) (i64x2.shr_s (v128.load (i32.const 16)) (local.get $count)))) + (func (export "shr_i64x2_27") + (v128.store (i32.const 0) (i64x2.shr_s (v128.load (i32.const 16)) (i32.const 27)))) + (func (export "shr_i64x2_45") + (v128.store (i32.const 0) (i64x2.shr_s (v128.load (i32.const 16)) (i32.const 45)))) + (func (export "shr_i64x2_63") + (v128.store (i32.const 0) (i64x2.shr_s (v128.load (i32.const 16)) (i32.const 63)))) + (func (export "shr_i64x2_64") + (v128.store (i32.const 0) (i64x2.shr_s (v128.load (i32.const 16)) (i32.const 64)))) + (func (export "shr_i64x2_-231") + (v128.store (i32.const 0) (i64x2.shr_s (v128.load (i32.const 16)) (i32.const -231)))) + (func (export "shr_i64x2_-1") + (v128.store (i32.const 0) (i64x2.shr_s (v128.load (i32.const 16)) (i32.const -1)))) + (func (export "shr_u64x2") (param $count i32) + (v128.store (i32.const 0) (i64x2.shr_u (v128.load (i32.const 16)) (local.get $count)))) + (func (export "shr_u64x2_27") + (v128.store (i32.const 0) (i64x2.shr_u (v128.load (i32.const 16)) (i32.const 27)))) + (func (export "shr_u64x2_63") + (v128.store (i32.const 0) (i64x2.shr_u (v128.load (i32.const 16)) (i32.const 63)))) + (func (export "shr_u64x2_64") + (v128.store (i32.const 0) (i64x2.shr_u (v128.load (i32.const 16)) (i32.const 64)))) + (func (export "shr_u64x2_-231") + (v128.store (i32.const 0) (i64x2.shr_u (v128.load (i32.const 16)) (i32.const -231)))))`); + +var mem8 = new Uint8Array(ins.exports.mem.buffer); +var as = [1, 2, 4, 8, 16, 32, 64, 128, 129, 130, 132, 136, 144, 160, 192, 255]; + +set(mem8, 16, as); + +for (let [meth,op] of [["shl_i8x16",shl], ["shr_i8x16",shr], ["shr_u8x16",shru]]) { + for ( let i=0 ; i < 8 ; i++ ) { + ins.exports[meth](i); + assertSame(get(mem8, 0, 16), as.map(op(i, 8))) + ins.exports[meth + "_" + i](); + assertSame(get(mem8, 0, 16), as.map(op(i, 8))) + } + + ins.exports[meth](1); + let a = get(mem8, 0, 16); + ins.exports[meth](9); + let b = get(mem8, 0, 16); + assertSame(a, b); + ins.exports[meth](-7); + let c = get(mem8, 0, 16); + assertSame(a, c); + + ins.exports[meth + "_1"](); + let x = get(mem8, 0, 16); + ins.exports[meth + "_9"](); + let y = get(mem8, 0, 16); + ins.exports[meth + "_-7"](); + let z = get(mem8, 0, 16); + assertSame(x, y); + assertSame(x, z); +} + +var mem16 = new Uint16Array(ins.exports.mem.buffer); +var as = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000]; +set(mem16, 8, as) + +ins.exports.shl_i16x8(2); +var res = get(mem16, 0, 8); +assertSame(res, as.map(shl(2, 16))) + +ins.exports.shl_i16x8(18); // Masked count +assertSame(get(mem16, 0, 8), res); + +ins.exports.shl_i16x8(-14); // Masked count +assertSame(get(mem16, 0, 8), res); + +for ( let shift of [3, 15, 16, -15] ) { + ins.exports["shl_i16x8_" + shift](); + assertSame(get(mem16, 0, 8), as.map(shl(shift & 15, 16))) +} + +ins.exports.shr_i16x8(1); +var res = get(mem16, 0, 8); +assertSame(res, as.map(shr(1, 16))) + +ins.exports.shr_i16x8(17); // Masked count +assertSame(get(mem16, 0, 8), res); + +ins.exports.shr_i16x8(-15); // Masked count +assertSame(get(mem16, 0, 8), res); + +for ( let shift of [3, 15, 16, -15] ) { + ins.exports["shr_i16x8_" + shift](); + assertSame(get(mem16, 0, 8), as.map(shr(shift & 15, 16))) +} + +ins.exports.shr_u16x8(1); +var res = get(mem16, 0, 8); +assertSame(res, as.map(shru(1, 16))) + +ins.exports.shr_u16x8(17); // Masked count +assertSame(get(mem16, 0, 8), res); + +ins.exports.shr_u16x8(-15); // Masked count +assertSame(get(mem16, 0, 8), res); + +for ( let shift of [3, 15, 16, -15] ) { + ins.exports["shr_u16x8_" + shift](); + assertSame(get(mem16, 0, 8), as.map(shru(shift & 15, 16))) +} + +var mem32 = new Uint32Array(ins.exports.mem.buffer); +var as = [5152, 6768, 7074, 800811]; + +set(mem32, 4, as) +ins.exports.shl_i32x4(2); +var res = get(mem32, 0, 4); +assertSame(res, as.map(shl(2, 32))) + +ins.exports.shl_i32x4(34); // Masked count +assertSame(get(mem32, 0, 4), res); + +ins.exports.shl_i32x4(-30); // Masked count +assertSame(get(mem32, 0, 4), res); + +for ( let shift of [12, 31, 32, -27] ) { + ins.exports["shl_i32x4_" + shift](); + assertSame(get(mem32, 0, 4), as.map(shl(shift & 31, 32)).map(x => x>>>0)) +} + +ins.exports.shr_i32x4(1); +var res = get(mem32, 0, 4); +assertSame(res, as.map(shr(1, 32))) + +ins.exports.shr_i32x4(33); // Masked count +assertSame(get(mem32, 0, 4), res); + +ins.exports.shr_i32x4(-31); // Masked count +assertSame(get(mem32, 0, 4), res); + +for ( let shift of [12, 31, 32, -27] ) { + ins.exports["shr_i32x4_" + shift](); + assertSame(get(mem32, 0, 4), as.map(shr(shift & 31, 32))) +} + +ins.exports.shr_u32x4(1); +var res = get(mem32, 0, 4); +assertSame(res, as.map(shru(1, 32))) + +ins.exports.shr_u32x4(33); // Masked count +assertSame(get(mem32, 0, 4), res); + +ins.exports.shr_u32x4(-31); // Masked count +assertSame(get(mem32, 0, 4), res); + +for ( let shift of [12, 31, 32, -27] ) { + ins.exports["shr_u32x4_" + shift](); + assertSame(get(mem32, 0, 4), as.map(shru(shift & 31, 32))) +} + +var mem64 = new BigInt64Array(ins.exports.mem.buffer); +var as = [50515253, -616263]; + +set(mem64, 2, as) +ins.exports.shl_i64x2(2); +var res = get(mem64, 0, 2); +assertSame(res, as.map(shl(2, 64))) + +ins.exports.shl_i64x2(66); // Masked count +assertSame(get(mem64, 0, 2), res); + +ins.exports.shl_i64x2(-62); // Masked count +assertSame(get(mem64, 0, 2), res); + +for ( let shift of [27, 63, 64, -231] ) { + ins.exports["shl_i64x2_" + shift](); + assertSame(get(mem64, 0, 2), as.map(shl(shift & 63, 64))) +} + +ins.exports.shr_u64x2(1); +var res = get(mem64, 0, 2); +assertSame(res, as.map(shru(1, 64))) + +ins.exports.shr_u64x2(65); // Masked count +assertSame(get(mem64, 0, 2), res); + +ins.exports.shr_u64x2(-63); // Masked count +assertSame(get(mem64, 0, 2), res); + +for ( let shift of [27, 63, 64, -231] ) { + ins.exports["shr_u64x2_" + shift](); + assertSame(get(mem64, 0, 2), as.map(shru(shift & 63, 64))) +} + +ins.exports.shr_i64x2(2); +var res = get(mem64, 0, 2); +assertSame(res, as.map(shr(2, 64))) + +ins.exports.shr_i64x2(66); // Masked count +assertSame(get(mem64, 0, 2), res); + +ins.exports.shr_i64x2(-62); // Masked count +assertSame(get(mem64, 0, 2), res); + +// The ion code generator has multiple paths here, for < 32 and >= 32 +for ( let shift of [27, 45, 63, 64, -1, -231] ) { + ins.exports["shr_i64x2_" + shift](); + assertSame(get(mem64, 0, 2), as.map(shr(shift & 63, 64))) +} + +// Narrow + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "narrow_i16x8_s") + (v128.store (i32.const 0) (i8x16.narrow_i16x8_s (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func (export "narrow_i16x8_u") + (v128.store (i32.const 0) (i8x16.narrow_i16x8_u (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func (export "narrow_i32x4_s") + (v128.store (i32.const 0) (i16x8.narrow_i32x4_s (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func (export "narrow_i32x4_u") + (v128.store (i32.const 0) (i16x8.narrow_i32x4_u (v128.load (i32.const 16)) (v128.load (i32.const 32))))))`); + +var mem8 = new Int8Array(ins.exports.mem.buffer); +var mem8u = new Uint8Array(ins.exports.mem.buffer); +var mem16 = new Int16Array(ins.exports.mem.buffer); +var mem16u = new Uint16Array(ins.exports.mem.buffer); +var mem32 = new Int32Array(ins.exports.mem.buffer); + +var as = [1, 267, 3987, 14523, 32768, 3, 312, 4876].map((x) => sign_extend(x, 16)); +var bs = [2, 312, 4876, 15987, 33777, 1, 267, 3987].map((x) => sign_extend(x, 16)); + +set(mem16, 8, as); +set(mem16, 16, bs); + +ins.exports.narrow_i16x8_s(); +var cs = as.concat(...bs).map((x) => signed_saturate(x, 8)); +assertSame(get(mem8, 0, 16), cs); + +ins.exports.narrow_i16x8_u(); +var cs = as.concat(...bs).map((x) => unsigned_saturate(x, 8)); +assertSame(get(mem8u, 0, 16), cs); + +var xs = [1, 3987, 14523, 32768].map((x) => x << 16).map((x) => sign_extend(x, 32)); +var ys = [2, 4876, 15987, 33777].map((x) => x << 16).map((x) => sign_extend(x, 32)); + +set(mem32, 4, xs); +set(mem32, 8, ys); + +ins.exports.narrow_i32x4_s(); +var cs = xs.concat(...ys).map((x) => signed_saturate(x, 16)); +assertSame(get(mem16, 0, 8), cs); + +ins.exports.narrow_i32x4_u(); +var cs = xs.concat(...ys).map((x) => unsigned_saturate(x, 16)); +assertSame(get(mem16u, 0, 8), cs); + +// Extend low/high + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "extend_low_i8x16_s") + (v128.store (i32.const 0) (i16x8.extend_low_i8x16_s (v128.load (i32.const 16))))) + (func (export "extend_high_i8x16_s") + (v128.store (i32.const 0) (i16x8.extend_high_i8x16_s (v128.load (i32.const 16))))) + (func (export "extend_low_i8x16_u") + (v128.store (i32.const 0) (i16x8.extend_low_i8x16_u (v128.load (i32.const 16))))) + (func (export "extend_high_i8x16_u") + (v128.store (i32.const 0) (i16x8.extend_high_i8x16_u (v128.load (i32.const 16))))) + (func (export "extend_low_i16x8_s") + (v128.store (i32.const 0) (i32x4.extend_low_i16x8_s (v128.load (i32.const 16))))) + (func (export "extend_high_i16x8_s") + (v128.store (i32.const 0) (i32x4.extend_high_i16x8_s (v128.load (i32.const 16))))) + (func (export "extend_low_i16x8_u") + (v128.store (i32.const 0) (i32x4.extend_low_i16x8_u (v128.load (i32.const 16))))) + (func (export "extend_high_i16x8_u") + (v128.store (i32.const 0) (i32x4.extend_high_i16x8_u (v128.load (i32.const 16))))))`); + +var mem16 = new Int16Array(ins.exports.mem.buffer); +var mem16u = new Uint16Array(ins.exports.mem.buffer); +var mem8 = new Int8Array(ins.exports.mem.buffer); +var as = [0, 1, 192, 3, 205, 5, 6, 133, 8, 9, 129, 11, 201, 13, 14, 255]; + +set(mem8, 16, as); + +ins.exports.extend_low_i8x16_s(); +assertSame(get(mem16, 0, 8), iota(8).map((n) => sign_extend(as[n], 8))); + +ins.exports.extend_high_i8x16_s(); +assertSame(get(mem16, 0, 8), iota(8).map((n) => sign_extend(as[n+8], 8))); + +ins.exports.extend_low_i8x16_u(); +assertSame(get(mem16u, 0, 8), iota(8).map((n) => zero_extend(as[n], 8))); + +ins.exports.extend_high_i8x16_u(); +assertSame(get(mem16u, 0, 8), iota(8).map((n) => zero_extend(as[n+8], 8))); + +var mem32 = new Int32Array(ins.exports.mem.buffer); +var mem32u = new Uint32Array(ins.exports.mem.buffer); + +var as = [0, 1, 192, 3, 205, 5, 6, 133].map((x) => x << 8); + +set(mem16, 8, as); + +ins.exports.extend_low_i16x8_s(); +assertSame(get(mem32, 0, 4), iota(4).map((n) => sign_extend(as[n], 16))); + +ins.exports.extend_high_i16x8_s(); +assertSame(get(mem32, 0, 4), iota(4).map((n) => sign_extend(as[n+4], 16))); + +ins.exports.extend_low_i16x8_u(); +assertSame(get(mem32u, 0, 4), iota(4).map((n) => zero_extend(as[n], 16))); + +ins.exports.extend_high_i16x8_u(); +assertSame(get(mem32u, 0, 4), iota(4).map((n) => zero_extend(as[n+4], 16))); + + +// Extract lane. Ion constant folds, so test that too. +// +// operand is v128 in memory (or constant) +// lane index is immediate so we're testing something randomish but not zero +// result is scalar (returned directly) + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "extract_i8x16_9") (result i32) + (i8x16.extract_lane_s 9 (v128.load (i32.const 16)))) + (func (export "const_extract_i8x16_9") (result i32) + (i8x16.extract_lane_s 9 (v128.const i8x16 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16))) + (func (export "extract_u8x16_6") (result i32) + (i8x16.extract_lane_u 6 (v128.load (i32.const 16)))) + (func (export "const_extract_u8x16_9") (result i32) + (i8x16.extract_lane_u 9 (v128.const i8x16 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16))) + (func (export "extract_i16x8_5") (result i32) + (i16x8.extract_lane_s 5 (v128.load (i32.const 16)))) + (func (export "const_extract_i16x8_5") (result i32) + (i16x8.extract_lane_s 5 (v128.const i16x8 -1 -2 -3 -4 -5 -6 -7 -8))) + (func (export "extract_u16x8_3") (result i32) + (i16x8.extract_lane_u 3 (v128.load (i32.const 16)))) + (func (export "const_extract_u16x8_3") (result i32) + (i16x8.extract_lane_u 3 (v128.const i16x8 -1 -2 -3 -4 -5 -6 -7 -8))) + (func (export "extract_i32x4_2") (result i32) + (i32x4.extract_lane 2 (v128.load (i32.const 16)))) + (func (export "const_extract_i32x4_2") (result i32) + (i32x4.extract_lane 2 (v128.const i32x4 -1 -2 -3 -4))) + (func (export "extract_i64x2_1") (result i64) + (i64x2.extract_lane 1 (v128.load (i32.const 16)))) + (func (export "const_extract_i64x2_1") (result i64) + (i64x2.extract_lane 1 (v128.const i64x2 -1 -2))) + (func (export "extract_f32x4_2") (result f32) + (f32x4.extract_lane 2 (v128.load (i32.const 16)))) + (func (export "const_extract_f32x4_2") (result f32) + (f32x4.extract_lane 2 (v128.const f32x4 -1 -2 -3 -4))) + (func (export "extract_f64x2_1") (result f64) + (f64x2.extract_lane 1 (v128.load (i32.const 16)))) + (func (export "const_extract_f64x2_1") (result f64) + (f64x2.extract_lane 1 (v128.const f64x2 -1 -2))))`); + +var mem8 = new Uint8Array(ins.exports.mem.buffer); +var as = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; +var bs = as.map((x) => -x); + +set(mem8, 16, as) +assertEq(ins.exports.extract_i8x16_9(), as[9]); + +set(mem8, 16, bs) +assertEq(ins.exports.extract_u8x16_6(), 256 - as[6]); + +assertEq(ins.exports.const_extract_i8x16_9(), -10); +assertEq(ins.exports.const_extract_u8x16_9(), 256-10); + +var mem16 = new Uint16Array(ins.exports.mem.buffer); +var as = [1, 2, 3, 4, 5, 6, 7, 8]; +var bs = as.map((x) => -x); + +set(mem16, 8, as) +assertEq(ins.exports.extract_i16x8_5(), as[5]); + +set(mem16, 8, bs) +assertEq(ins.exports.extract_u16x8_3(), 65536 - as[3]); + +assertEq(ins.exports.const_extract_i16x8_5(), -6); +assertEq(ins.exports.const_extract_u16x8_3(), 65536-4); + +var mem32 = new Uint32Array(ins.exports.mem.buffer); +var as = [1, 2, 3, 4]; + +set(mem32, 4, as) +assertEq(ins.exports.extract_i32x4_2(), as[2]); + +assertEq(ins.exports.const_extract_i32x4_2(), -3); + +var mem32 = new Float32Array(ins.exports.mem.buffer); +var as = [1.5, 2.5, 3.5, 4.5]; + +set(mem32, 4, as) +assertEq(ins.exports.extract_f32x4_2(), as[2]); + +assertEq(ins.exports.const_extract_f32x4_2(), -3); + +var mem64 = new Float64Array(ins.exports.mem.buffer); +var as = [1.5, 2.5]; + +set(mem64, 2, as) +assertEq(ins.exports.extract_f64x2_1(), as[1]); + +assertEq(ins.exports.const_extract_f64x2_1(), -2); + +var mem64 = new BigInt64Array(ins.exports.mem.buffer); +var as = [12345, 67890]; + +set(mem64, 2, as) +assertSame(ins.exports.extract_i64x2_1(), as[1]); + +assertEq(ins.exports.const_extract_i64x2_1(), -2n); + +// Replace lane +// +// operand 1 is v128 in memory +// operand 2 is immediate scalar +// lane index is immediate so we're testing something randomish but not zero +// (note though that fp operations have special cases for zero) +// result is v128 in memory + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "replace_i8x16_9") (param $value i32) + (v128.store (i32.const 0) + (i8x16.replace_lane 9 (v128.load (i32.const 16)) (local.get $value)))) + (func (export "replace_i16x8_5") (param $value i32) + (v128.store (i32.const 0) + (i16x8.replace_lane 5 (v128.load (i32.const 16)) (local.get $value)))) + (func (export "replace_i32x4_3") (param $value i32) + (v128.store (i32.const 0) + (i32x4.replace_lane 3 (v128.load (i32.const 16)) (local.get $value)))) + (func (export "replace_i64x2_1") (param $value i64) + (v128.store (i32.const 0) + (i64x2.replace_lane 1 (v128.load (i32.const 16)) (local.get $value)))) + (func (export "replace_f32x4_0") (param $value f32) + (v128.store (i32.const 0) + (f32x4.replace_lane 0 (v128.load (i32.const 16)) (local.get $value)))) + (func (export "replace_f32x4_3") (param $value f32) + (v128.store (i32.const 0) + (f32x4.replace_lane 3 (v128.load (i32.const 16)) (local.get $value)))) + (func (export "replace_f64x2_0") (param $value f64) + (v128.store (i32.const 0) + (f64x2.replace_lane 0 (v128.load (i32.const 16)) (local.get $value)))) + (func (export "replace_f64x2_1") (param $value f64) + (v128.store (i32.const 0) + (f64x2.replace_lane 1 (v128.load (i32.const 16)) (local.get $value)))))`); + + +var mem8 = new Uint8Array(ins.exports.mem.buffer); +var as = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; + +set(mem8, 16, as) +ins.exports.replace_i8x16_9(42); +assertSame(get(mem8, 0, 16), upd(as, 9, 42)); + +var mem16 = new Uint16Array(ins.exports.mem.buffer); +var as = [1, 2, 3, 4, 5, 6, 7, 8]; + +set(mem16, 8, as) +ins.exports.replace_i16x8_5(42); +assertSame(get(mem16, 0, 8), upd(as, 5, 42)); + +var mem32 = new Uint32Array(ins.exports.mem.buffer); +var as = [1, 2, 3, 4]; + +set(mem32, 4, as) +ins.exports.replace_i32x4_3(42); +assertSame(get(mem32, 0, 4), upd(as, 3, 42)); + +var mem64 = new BigInt64Array(ins.exports.mem.buffer); +var as = [1, 2]; + +set(mem64, 2, as) +ins.exports.replace_i64x2_1(42n); +assertSame(get(mem64, 0, 2), upd(as, 1, 42)); + +var mem32 = new Float32Array(ins.exports.mem.buffer); +var as = [1.5, 2.5, 3.5, 4.5]; + +set(mem32, 4, as) +ins.exports.replace_f32x4_0(42.5); +assertSame(get(mem32, 0, 4), upd(as, 0, 42.5)); + +set(mem32, 4, as) +ins.exports.replace_f32x4_3(42.5); +assertSame(get(mem32, 0, 4), upd(as, 3, 42.5)); + +var mem64 = new Float64Array(ins.exports.mem.buffer); +var as = [1.5, 2.5]; + +set(mem64, 2, as) +ins.exports.replace_f64x2_0(42.5); +assertSame(get(mem64, 0, 2), upd(as, 0, 42.5)); + +set(mem64, 2, as) +ins.exports.replace_f64x2_1(42.5); +assertSame(get(mem64, 0, 2), upd(as, 1, 42.5)); + +// Load and splat +// +// Operand is memory address of scalar +// Result is v128 in memory + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "load_splat_v8x16") (param $addr i32) + (v128.store (i32.const 0) (v128.load8_splat (local.get $addr)))) + (func (export "load_splat_v16x8") (param $addr i32) + (v128.store (i32.const 0) (v128.load16_splat (local.get $addr)))) + (func (export "load_splat_v32x4") (param $addr i32) + (v128.store (i32.const 0) (v128.load32_splat (local.get $addr)))) + (func (export "load_splat_v64x2") (param $addr i32) + (v128.store (i32.const 0) (v128.load64_splat (local.get $addr)))))`); + +var mem8 = new Uint8Array(ins.exports.mem.buffer); +mem8[37] = 42; +ins.exports.load_splat_v8x16(37); +assertSame(get(mem8, 0, 16), [42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42]); + +var mem16 = new Uint16Array(ins.exports.mem.buffer); +mem16[37] = 69; +ins.exports.load_splat_v16x8(37*2); +assertSame(get(mem16, 0, 8), [69, 69, 69, 69, 69, 69, 69, 69]); + +var mem32 = new Int32Array(ins.exports.mem.buffer); +mem32[37] = 83; +ins.exports.load_splat_v32x4(37*4); +assertSame(get(mem32, 0, 4), [83, 83, 83, 83]); + +var mem64 = new BigInt64Array(ins.exports.mem.buffer); +mem64[37] = 83n; +ins.exports.load_splat_v64x2(37*8); +assertSame(get(mem64, 0, 2), [83, 83]); + +// Load and zero +// +// Operand is memory address of scalar +// Result is v128 in memory + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "load32_zero") (param $addr i32) + (v128.store (i32.const 0) (v128.load32_zero (local.get $addr)))) + (func (export "load64_zero") (param $addr i32) + (v128.store (i32.const 0) (v128.load64_zero (local.get $addr)))))`); + +var mem32 = new Int32Array(ins.exports.mem.buffer); +mem32[37] = 0x12345678; +mem32[38] = 0xffffffff; +mem32[39] = 0xfffffffe; +mem32[40] = 0xfffffffd; +ins.exports.load32_zero(37*4); +assertSame(get(mem32, 0, 4), [0x12345678, 0, 0, 0]); + +var mem64 = new BigInt64Array(ins.exports.mem.buffer); +mem64[37] = 0x12345678abcdef01n; +mem64[38] = 0xffffffffffffffffn; +ins.exports.load64_zero(37*8); +assertSame(get(mem64, 0, 2), [0x12345678abcdef01n, 0n]); + +// Load and extend +// +// Operand is memory address of 64-bit scalar representing 8, 4, or 2 values +// Result is v128 in memory + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "load8x8_s") (param $addr i32) + (v128.store (i32.const 0) (v128.load8x8_s (local.get $addr)))) + (func (export "load8x8_u") (param $addr i32) + (v128.store (i32.const 0) (v128.load8x8_u (local.get $addr)))) + (func (export "load16x4_s") (param $addr i32) + (v128.store (i32.const 0) (v128.load16x4_s (local.get $addr)))) + (func (export "load16x4_u") (param $addr i32) + (v128.store (i32.const 0) (v128.load16x4_u (local.get $addr)))) + (func (export "load32x2_s") (param $addr i32) + (v128.store (i32.const 0) (v128.load32x2_s (local.get $addr)))) + (func (export "load32x2_u") (param $addr i32) + (v128.store (i32.const 0) (v128.load32x2_u (local.get $addr)))))`); + +var mem8 = new Uint8Array(ins.exports.mem.buffer); +var mem16s = new Int16Array(ins.exports.mem.buffer); +var mem16u = new Uint16Array(ins.exports.mem.buffer); +var mem32s = new Int32Array(ins.exports.mem.buffer); +var mem32u = new Uint32Array(ins.exports.mem.buffer); +var mem64s = new BigInt64Array(ins.exports.mem.buffer); +var mem64u = new BigUint64Array(ins.exports.mem.buffer); +var xs = [42, 129, 2, 212, 44, 27, 12, 199]; +set(mem8, 48, xs); + +ins.exports.load8x8_s(48); +assertSame(get(mem16s, 0, 8), xs.map((x) => sign_extend(x, 8))); + +ins.exports.load8x8_u(48); +assertSame(get(mem16u, 0, 8), xs.map((x) => zero_extend(x, 8))); + +var xs = [(42 << 8) | 129, (212 << 8) | 2, (44 << 8) | 27, (199 << 8) | 12]; +set(mem16u, 24, xs); + +ins.exports.load16x4_s(48); +assertSame(get(mem32s, 0, 4), xs.map((x) => sign_extend(x, 16))); + +ins.exports.load16x4_u(48); +assertSame(get(mem32u, 0, 4), xs.map((x) => zero_extend(x, 16))); + +var xs = [5, -8]; +set(mem32u, 12, xs); + +ins.exports.load32x2_s(48); +assertSame(get(mem64s, 0, 2), xs.map((x) => sign_extend(x, 32))); + +ins.exports.load32x2_u(48); +assertSame(get(mem64s, 0, 2), xs.map((x) => zero_extend(x, 32))); + +// Vector select +// +// Operands and results are all in memory + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "bitselect_v128") + (v128.store (i32.const 0) + (v128.bitselect (v128.load (i32.const 16)) + (v128.load (i32.const 32)) + (v128.load (i32.const 48))))))`); + +var mem8 = new Uint8Array(ins.exports.mem.buffer); +set(mem8, 16, iota(16).map((_) => 0xAA)); +set(mem8, 32, iota(16).map((_) => 0x55)); + +set(mem8, 48, iota(16).map((_) => 0x99)); +ins.exports.bitselect_v128(); +assertSame(get(mem8, 0, 16), iota(16).map((_) => 0xCC)); + +set(mem8, 48, iota(16).map((_) => 0x77)); +ins.exports.bitselect_v128(); +assertSame(get(mem8, 0, 16), iota(16).map((_) => 0x22)); + +// Vector shuffle +// +// Operands and results are all in memory + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + ;; the result interleaves the low eight bytes of the inputs + (func (export "shuffle1") + (v128.store (i32.const 0) + (i8x16.shuffle 0 16 1 17 2 18 3 19 4 20 5 21 6 22 7 23 + (v128.load (i32.const 16)) + (v128.load (i32.const 32))))) + ;; ditto the high eight bytes + (func (export "shuffle2") + (v128.store (i32.const 0) + (i8x16.shuffle 8 24 9 25 10 26 11 27 12 28 13 29 14 30 15 31 + (v128.load (i32.const 16)) + (v128.load (i32.const 32))))))`); + +var mem8 = new Uint8Array(ins.exports.mem.buffer); +var xs = iota(16).map((n) => 0xA0 + n); +var ys = iota(16).map((n) => 0x50 + n); +set(mem8, 16, xs); +set(mem8, 32, ys); + +ins.exports.shuffle1(); +assertSame(get(mem8, 0, 16), iota(16).map((x) => ((x & 1) ? ys : xs)[x >>> 1])) + +ins.exports.shuffle2(); +assertSame(get(mem8, 0, 16), iota(32).map((x) => ((x & 1) ? ys : xs)[x >>> 1]).slice(16)); + +// Vector swizzle (variable permute). +// +// Case 1: Operands and results are all in memory + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "swizzle") + (v128.store (i32.const 0) + (i8x16.swizzle (v128.load (i32.const 16)) (v128.load (i32.const 32))))))`); + +var mem8 = new Uint8Array(ins.exports.mem.buffer); + +var xs = [100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115]; +set(mem8, 16, xs); + +set(mem8, 32, [1,0,3,2,5,4,7,6,9,8,11,10,13,12,15,14]); +ins.exports.swizzle(); +assertSame(get(mem8, 0, 16), [101,100,103,102,105,104,107,106,109,108,111,110,113,112,115,114]); + +set(mem8, 32, [9,8,11,10,13,12,16,14,1,0,3,2,5,192,7,6]); +ins.exports.swizzle(); +assertSame(get(mem8, 0, 16), [109,108,111,110,113,112,0,114,101,100,103,102,105,0,107,106]); + +// Case 2: The mask operand is a constant; the swizzle gets optimized into a +// shuffle (also see ion-analysis.js). + +for ( let [mask, expected] of [[[1,0,3,2,5,4,7,6,9,8,11,10,13,12,15,14], + [101,100,103,102,105,104,107,106,109,108,111,110,113,112,115,114]], + [[9,8,11,10,13,12,16,14,1,0,3,2,5,192,7,6], + [109,108,111,110,113,112,0,114,101,100,103,102,105,0,107,106]]] ) { + + let ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "swizzle") + (v128.store (i32.const 0) + (i8x16.swizzle (v128.load (i32.const 16)) (v128.const i8x16 ${mask.join(' ')}))))) +`); + + let mem8 = new Uint8Array(ins.exports.mem.buffer); + set(mem8, 16, [100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115]); + ins.exports.swizzle(); + assertSame(get(mem8, 0, 16), expected); +} + +// Convert integer to floating point + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "convert_s") + (v128.store (i32.const 0) + (f32x4.convert_i32x4_s (v128.load (i32.const 16))))) + (func (export "convert_u") + (v128.store (i32.const 0) + (f32x4.convert_i32x4_u (v128.load (i32.const 16))))))`); + +var mem32s = new Int32Array(ins.exports.mem.buffer); +var mem32f = new Float32Array(ins.exports.mem.buffer); +var xs = [1, -9, 77987, -34512]; + +set(mem32s, 4, xs); +ins.exports.convert_s(); +assertSame(get(mem32f, 0, 4), xs); + +var mem32u = new Uint32Array(ins.exports.mem.buffer); +var ys = xs.map((x) => x>>>0); + +set(mem32u, 4, ys); +ins.exports.convert_u(); +assertSame(get(mem32f, 0, 4), ys.map(Math.fround)); + +// Convert floating point to integer with saturating truncation + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "trunc_sat_s") + (v128.store (i32.const 0) + (i32x4.trunc_sat_f32x4_s (v128.load (i32.const 16))))) + (func (export "trunc_sat_u") + (v128.store (i32.const 0) + (i32x4.trunc_sat_f32x4_u (v128.load (i32.const 16))))))`); + +var mem32s = new Int32Array(ins.exports.mem.buffer); +var mem32u = new Uint32Array(ins.exports.mem.buffer); +var mem32f = new Float32Array(ins.exports.mem.buffer); +var xs = [1.5, -9.5, 7.5e12, -8e13]; + +set(mem32f, 4, xs); +ins.exports.trunc_sat_s(); +assertSame(get(mem32s, 0, 4), [1, -9, 0x7FFFFFFF, -0x80000000]); + +var xs = [1.5, -9.5, 7.5e12, 812]; +set(mem32f, 4, xs); +ins.exports.trunc_sat_u(); +assertSame(get(mem32u, 0, 4), [1, 0, 0xFFFFFFFF, 812]); + +var xs = [0, -0, 0x80860000, 0x100000000]; +set(mem32f, 4, xs); +ins.exports.trunc_sat_u(); +assertSame(get(mem32u, 0, 4), [0, 0, 0x80860000, 0xFFFFFFFF]); + +// Loops and blocks. This should at least test "sync" in the baseline compiler. + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func $f (param $count i32) (param $v v128) (result v128) + (local $tmp v128) + (block $B1 + (loop $L1 + (br_if $B1 (i32.eqz (local.get $count))) + (local.set $tmp (i32x4.add (local.get $tmp) (local.get $v))) + (local.set $count (i32.sub (local.get $count) (i32.const 1))) + (br $L1))) + (local.get $tmp)) + (func (export "run") (param $count i32) + (v128.store (i32.const 0) + (call $f (local.get $count) (v128.load (i32.const 16))))))`); + +var mem32 = new Int32Array(ins.exports.mem.buffer); +set(mem32, 4, [1,2,3,4]); +ins.exports.run(7); +assertSame(get(mem32, 0, 4), [7,14,21,28]); + +// Lots of parameters, this should trigger stack parameter passing +// +// 10 parameters in memory, we load them and pass them and operate on them. + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func $f (param $v0 v128) (param $v1 v128) (param $v2 v128) (param $v3 v128) (param $v4 v128) + (param $v5 v128) (param $v6 v128) (param $v7 v128) (param $v8 v128) (param $v9 v128) + (result v128) + (i32x4.add (local.get $v0) + (i32x4.add (local.get $v1) + (i32x4.add (local.get $v2) + (i32x4.add (local.get $v3) + (i32x4.add (local.get $v4) + (i32x4.add (local.get $v5) + (i32x4.add (local.get $v6) + (i32x4.add (local.get $v7) + (i32x4.add (local.get $v8) (local.get $v9))))))))))) + (func (export "run") + (v128.store (i32.const 0) + (call $f (v128.load (i32.const ${16*1})) + (v128.load (i32.const ${16*2})) + (v128.load (i32.const ${16*3})) + (v128.load (i32.const ${16*4})) + (v128.load (i32.const ${16*5})) + (v128.load (i32.const ${16*6})) + (v128.load (i32.const ${16*7})) + (v128.load (i32.const ${16*8})) + (v128.load (i32.const ${16*9})) + (v128.load (i32.const ${16*10}))))))`); + + +var mem32 = new Int32Array(ins.exports.mem.buffer); +var sum = [0, 0, 0, 0]; +for ( let i=1; i <= 10; i++ ) { + let v = [1,2,3,4].map((x) => x*i); + set(mem32, 4*i, v); + for ( let j=0; j < 4; j++ ) + sum[j] += v[j]; +} + +ins.exports.run(); + +assertSame(get(mem32, 0, 4), sum); + +// Globals. +// +// We have a number of different code paths and representations and +// need to test them all. +// +// Cases: +// - private global, mutable / immutable, initialized from constant or imported immutable global +// - exported global, mutable / immutable, initialized from constant or imported immutable global +// - imported global, mutable / immutable +// - imported global that's re-exported, mutable / immutable + +// Global used for initialization below. + +var init = (function () { + var ins = wasmEvalText(` + (module + (global (export "init") v128 (v128.const i32x4 9 8 7 6)))`); + return ins.exports; +})(); + +for ( let exportspec of ['', '(export "g")'] ) { + + // Private/exported immutable initialized from constant + + let ins1 = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (global $g ${exportspec} v128 (v128.const i32x4 9 8 7 6)) + (func (export "get") (param $dest i32) + (v128.store (local.get $dest) (global.get $g))))`); + + let mem1 = new Int32Array(ins1.exports.mem.buffer); + ins1.exports.get(0); + assertSame(get(mem1, 0, 4), [9, 8, 7, 6]); + + // Private/exported mutable initialized from constant + + let ins2 = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (global $g ${exportspec} (mut v128) (v128.const i32x4 9 8 7 6)) + (func (export "put") (param $val i32) + (global.set $g (i32x4.splat (local.get $val)))) + (func (export "get") (param $dest i32) + (v128.store (local.get $dest) (global.get $g))))`); + + let mem2 = new Int32Array(ins2.exports.mem.buffer); + ins2.exports.get(0); + assertSame(get(mem2, 0, 4), [9, 8, 7, 6]); + ins2.exports.put(37); + ins2.exports.get(0); + assertSame(get(mem2, 0, 4), [37, 37, 37, 37]); + + // Private/exported immutable initialized from imported immutable global + + let ins3 = wasmEvalText(` + (module + (global $init (import "m" "init") v128) + (memory (export "mem") 1 1) + (global $g ${exportspec} v128 (global.get $init)) + (func (export "get") (param $dest i32) + (v128.store (local.get $dest) (global.get $g))))`, + {m:init}); + + let mem3 = new Int32Array(ins3.exports.mem.buffer); + ins3.exports.get(0); + assertSame(get(mem3, 0, 4), [9, 8, 7, 6]); + + // Private/exported mutable initialized from imported immutable global + + let ins4 = wasmEvalText(` + (module + (global $init (import "m" "init") v128) + (memory (export "mem") 1 1) + (global $g ${exportspec} (mut v128) (global.get $init)) + (func (export "put") (param $val i32) + (global.set $g (i32x4.splat (local.get $val)))) + (func (export "get") (param $dest i32) + (v128.store (local.get $dest) (global.get $g))))`, + {m:init}); + + let mem4 = new Int32Array(ins4.exports.mem.buffer); + ins4.exports.get(0); + assertSame(get(mem4, 0, 4), [9, 8, 7, 6]); + ins4.exports.put(37); + ins4.exports.get(0); + assertSame(get(mem4, 0, 4), [37, 37, 37, 37]); + + // Imported private/re-exported immutable + + let ins5 = wasmEvalText(` + (module + (global $g ${exportspec} (import "m" "init") v128) + (memory (export "mem") 1 1) + (func (export "get") (param $dest i32) + (v128.store (local.get $dest) (global.get $g))))`, + {m:init}); + + let mem5 = new Int32Array(ins5.exports.mem.buffer); + ins5.exports.get(0); + assertSame(get(mem5, 0, 4), [9, 8, 7, 6]); + + // Imported private/re-exported mutable + + let mutg = (function () { + var ins = wasmEvalText(` + (module + (global (export "mutg") (mut v128) (v128.const i32x4 19 18 17 16)))`); + return ins.exports; + })(); + + let ins6 = wasmEvalText(` + (module + (global $g ${exportspec} (import "m" "mutg") (mut v128)) + (memory (export "mem") 1 1) + (func (export "put") (param $val i32) + (global.set $g (i32x4.splat (local.get $val)))) + (func (export "get") (param $dest i32) + (v128.store (local.get $dest) (global.get $g))))`, + {m:mutg}); + + let mem6 = new Int32Array(ins6.exports.mem.buffer); + ins6.exports.get(0); + assertSame(get(mem6, 0, 4), [19, 18, 17, 16]); + ins6.exports.put(37); + ins6.exports.get(0); + assertSame(get(mem6, 0, 4), [37, 37, 37, 37]); +} + +// Imports and exports that pass and return v128 + +var insworker = wasmEvalText(` + (module + (func (export "worker") (param v128) (result v128) + (i8x16.add (local.get 0) (v128.const i8x16 ${iota(16).join(' ')}))))`); + +var insrun = wasmEvalText(` + (module + (import "" "worker" (func $worker (param v128) (result v128))) + (memory (export "mem") 1 1) + (func (export "run") (param $srcloc i32) (param $destloc i32) + (v128.store (local.get $destloc) + (call $worker (v128.load (local.get $srcloc))))))`, + {"":insworker.exports}); + +var mem = new Uint8Array(insrun.exports.mem.buffer); +var xs = iota(16).map((x) => x+5); +set(mem, 0, xs); +insrun.exports.run(0, 16); +assertSame(get(mem, 16, 16), xs.map((x,i) => x+i)) + +// Make sure JS<->wasm call guards are sensible. + +// Calling from JS to export that accepts v128. +assertErrorMessage(() => insworker.exports.worker(), + TypeError, + /cannot pass.*value.*to or from JS/); + +// Calling from wasm with v128 to import that comes from JS. The instantiation +// will succeed even if the param type of the import is v128 (see "create a host +// function" in the Wasm JSAPI spec), it is the act of invoking it that checks +// that verboten types are not used (see "run a host function", ibid.). +var badImporter = wasmEvalText(` + (module + (import "" "worker" (func $worker (param v128) (result v128))) + (func (export "run") + (drop (call $worker (v128.const i32x4 0 1 2 3)))))`, + {"":{worker: function(a) { return a; }}}); + +assertErrorMessage(() => badImporter.exports.run(), + TypeError, + /cannot pass.*value.*to or from JS/); + +// Imports and exports that pass and return v128 as stack (not register) args. + +var exportWithStackArgs = wasmEvalText(` + (module + (func (export "worker") (param v128) (param v128) (param v128) (param v128) + (param v128) (param v128) (param v128) (param v128) + (param v128) (param v128) (param v128) (param v128) + (param v128) (param v128) + (result v128 v128) + (i8x16.add (local.get 3) (local.get 12)) + (local.get 7)))`); + +var importWithStackArgs = wasmEvalText(` + (module + (type $t1 (func (param v128) (param v128) (param v128) (param v128) + (param v128) (param v128) (param v128) (param v128) + (param v128) (param v128) (param v128) (param v128) + (param v128) (param v128) + (result v128 v128))) + (import "" "worker" (func $worker (type $t1))) + (memory (export "mem") 1 1) + (table funcref (elem $worker)) + (func (export "run") + (i32.const 16) + (call_indirect (type $t1) (v128.const i32x4 1 1 1 1) (v128.const i32x4 2 2 2 2) (v128.const i32x4 3 3 3 3) + (v128.const i32x4 4 4 4 4) (v128.const i32x4 5 5 5 5) (v128.const i32x4 6 6 6 6) + (v128.const i32x4 7 7 7 7) (v128.const i32x4 8 8 8 8) (v128.const i32x4 9 9 9 9) + (v128.const i32x4 10 10 10 10) (v128.const i32x4 11 11 11 11) (v128.const i32x4 12 12 12 12) + (v128.const i32x4 13 13 13 13) (v128.const i32x4 14 14 14 14) + (i32.const 0)) + drop + v128.store + (i32.const 0) + (call $worker (v128.const i32x4 1 1 1 1) (v128.const i32x4 2 2 2 2) (v128.const i32x4 3 3 3 3) + (v128.const i32x4 4 4 4 4) (v128.const i32x4 5 5 5 5) (v128.const i32x4 6 6 6 6) + (v128.const i32x4 7 7 7 7) (v128.const i32x4 8 8 8 8) (v128.const i32x4 9 9 9 9) + (v128.const i32x4 10 10 10 10) (v128.const i32x4 11 11 11 11) (v128.const i32x4 12 12 12 12) + (v128.const i32x4 13 13 13 13) (v128.const i32x4 14 14 14 14)) + drop + v128.store))`, + {"": exportWithStackArgs.exports}); + +var mem = new Int32Array(importWithStackArgs.exports.mem.buffer); +importWithStackArgs.exports.run(); +assertSame(get(mem, 0, 4), [17, 17, 17, 17]); +assertSame(get(mem, 4, 4), [17, 17, 17, 17]); + +// Imports and exports of v128 globals + +var insexporter = wasmEvalText(` + (module + (global (export "myglobal") (mut v128) (v128.const i8x16 ${iota(16).join(' ')})))`); + +var insimporter = wasmEvalText(` + (module + (import "m" "myglobal" (global $g (mut v128))) + (memory (export "mem") 1 1) + (func (export "run") (param $dest i32) + (v128.store (local.get $dest) (global.get $g))))`, + {m:insexporter.exports}); + +var mem = new Uint8Array(insimporter.exports.mem.buffer); +insimporter.exports.run(16); +assertSame(get(mem, 16, 16), iota(16)); + +// Guards on accessing v128 globals from JS + +assertErrorMessage(() => insexporter.exports.myglobal.value = 0, + TypeError, + /cannot pass.*value.*to or from JS/); + +assertErrorMessage(function () { let v = insexporter.exports.myglobal.value }, + TypeError, + /cannot pass.*value.*to or from JS/); + +// Multi-value cases + v128 parameters to if, block, loop + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func $mvreturn (result v128 v128 v128) + (v128.load (i32.const 16)) + (v128.load (i32.const 0)) + (v128.load (i32.const 32))) + (func (export "runreturn") + i32.const 48 + (call $mvreturn) + i32x4.sub ;; [-20, -20, -20, -20] + i32x4.sub ;; [31, 32, 33, 34] + v128.store) + (func (export "runif") (param $cond i32) + i32.const 48 + (v128.load (i32.const 0)) + (v128.load (i32.const 16)) + (if (param v128) (param v128) (result v128 v128) + (local.get $cond) + (then i32x4.add + (v128.load (i32.const 32))) + (else i32x4.sub + (v128.load (i32.const 0)))) + i32x4.add + v128.store) + (func (export "runblock") + i32.const 48 + (v128.load (i32.const 0)) + (v128.load (i32.const 16)) + (block (param v128 v128) (result v128 v128) + i32x4.add + (v128.load (i32.const 32))) + i32x4.add + v128.store) + (func (export "runloop") (param $count i32) + i32.const 48 + (v128.load (i32.const 0)) + (v128.load (i32.const 16)) + (block $B (param v128 v128) (result v128 v128) + (loop $L (param v128 v128) (result v128 v128) + i32x4.add + (v128.load (i32.const 32)) + (local.set $count (i32.sub (local.get $count) (i32.const 1))) + (br_if $B (i32.eqz (local.get $count))) + (br $L))) + i32x4.add + v128.store))`); + +var mem = new Int32Array(ins.exports.mem.buffer); +set(mem, 0, [1, 2, 3, 4]); +set(mem, 4, [11, 12, 13, 14]); +set(mem, 8, [21, 22, 23, 24]); + +// Multi-value returns + +ins.exports.runreturn(); +assertSame(get(mem, 12, 4), [31, 32, 33, 34]); + +// Multi-parameters to and multi-returns from "if" + +// This should be vector@0 + vector@16 + vector@32 +ins.exports.runif(1); +assertSame(get(mem, 12, 4), + [33, 36, 39, 42]); + +// This should be vector@0 - vector@16 + vector@0 +ins.exports.runif(0); +assertSame(get(mem, 12, 4), + [-9, -8, -7, -6]); + +// This should be vector@0 + vector@16 + vector@32 +ins.exports.runblock(); +assertSame(get(mem, 12, 4), + [33, 36, 39, 42]); + +// This should be vector@0 + vector@16 + N * vector@32 where +// N is the parameter to runloop. +ins.exports.runloop(3); +assertSame(get(mem, 12, 4), + [12+3*21, 14+3*22, 16+3*23, 18+3*24]); diff --git a/js/src/jit-test/tests/wasm/simd/avx2-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/avx2-x64-ion-codegen.js new file mode 100644 index 0000000000..9c91430e85 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/avx2-x64-ion-codegen.js @@ -0,0 +1,584 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator") || !isAvxPresent(); include:codegen-x64-test.js + +// Test that there are no extraneous moves for various SIMD conversion +// operations. See README-codegen.md for general information about this type of +// test case. + +// Note, these tests test the beginning of the output but not the end. + +// Currently AVX2 exhibits a defect when function uses its first v128 arg and +// returns v128: the register allocator adds unneeded extra moves from xmm0, +// then into different temporary, and then the latter temporary is used as arg. +// In the tests below, to simplify things, don't use/ignore the first arg. +// v128 OP v128 -> v128 +// inputs: [[complete-opname, expected-pattern], ...] +function codegenTestX64_v128xv128_v128_avxhack(inputs, options = {}) { + for ( let [op, expected] of inputs ) { + codegenTestX64_adhoc(wrap(options, ` + (func (export "f") (param v128 v128 v128) (result v128) + (${op} (local.get 1) (local.get 2)))`), + 'f', + expected, + options); + } +} +// (see codegenTestX64_v128xv128_v128_avxhack comment about AVX defect) +// v128 OP const -> v128 +// inputs: [[complete-opname, const, expected-pattern], ...] +function codegenTestX64_v128xLITERAL_v128_avxhack(inputs, options = {}) { + for ( let [op, const_, expected] of inputs ) { + codegenTestX64_adhoc(wrap(options, ` + (func (export "f") (param v128 v128) (result v128) + (${op} (local.get 1) ${const_}))`), + 'f', + expected, + options); + } +} +// (see codegenTestX64_v128xv128_v128_avxhack comment about AVX defect) +// const OP v128 -> v128 +// inputs: [[complete-opname, const, expected-pattern], ...] +function codegenTestX64_LITERALxv128_v128_avxhack(inputs, options = {}) { + for ( let [op, const_, expected] of inputs ) { + codegenTestX64_adhoc(wrap(options, ` + (func (export "f") (param v128 v128) (result v128) + (${op} ${const_} (local.get 1)))`), + 'f', + expected, + options); + } +} + +// Utility function to test SIMD operations encoding, where the input argument +// has the specified type (T). +// inputs: [[type, complete-opname, expected-pattern], ...] +function codegenTestX64_T_v128_avxhack(inputs, options = {}) { + for ( let [ty, op, expected] of inputs ) { + codegenTestX64_adhoc(wrap(options, ` + (func (export "f") (param ${ty}) (result v128) + (${op} (local.get 0)))`), + 'f', + expected, + options); + } +} + +// Machers for any 64- and 32-bit registers. +var GPR_I64 = "%r\\w+"; +var GPR_I32 = "%(?:e\\w+|r\\d+d)"; + +// Simple binary ops: e.g. add, sub, mul +codegenTestX64_v128xv128_v128_avxhack( + [['i8x16.avgr_u', `c5 f1 e0 c2 vpavgb %xmm2, %xmm1, %xmm0`], + ['i16x8.avgr_u', `c5 f1 e3 c2 vpavgw %xmm2, %xmm1, %xmm0`], + ['i8x16.add', `c5 f1 fc c2 vpaddb %xmm2, %xmm1, %xmm0`], + ['i8x16.add_sat_s', `c5 f1 ec c2 vpaddsb %xmm2, %xmm1, %xmm0`], + ['i8x16.add_sat_u', `c5 f1 dc c2 vpaddusb %xmm2, %xmm1, %xmm0`], + ['i8x16.sub', `c5 f1 f8 c2 vpsubb %xmm2, %xmm1, %xmm0`], + ['i8x16.sub_sat_s', `c5 f1 e8 c2 vpsubsb %xmm2, %xmm1, %xmm0`], + ['i8x16.sub_sat_u', `c5 f1 d8 c2 vpsubusb %xmm2, %xmm1, %xmm0`], + ['i16x8.mul', `c5 f1 d5 c2 vpmullw %xmm2, %xmm1, %xmm0`], + ['i16x8.min_s', `c5 f1 ea c2 vpminsw %xmm2, %xmm1, %xmm0`], + ['i16x8.min_u', `c4 e2 71 3a c2 vpminuw %xmm2, %xmm1, %xmm0`], + ['i16x8.max_s', `c5 f1 ee c2 vpmaxsw %xmm2, %xmm1, %xmm0`], + ['i16x8.max_u', `c4 e2 71 3e c2 vpmaxuw %xmm2, %xmm1, %xmm0`], + ['i32x4.add', `c5 f1 fe c2 vpaddd %xmm2, %xmm1, %xmm0`], + ['i32x4.sub', `c5 f1 fa c2 vpsubd %xmm2, %xmm1, %xmm0`], + ['i32x4.mul', `c4 e2 71 40 c2 vpmulld %xmm2, %xmm1, %xmm0`], + ['i32x4.min_s', `c4 e2 71 39 c2 vpminsd %xmm2, %xmm1, %xmm0`], + ['i32x4.min_u', `c4 e2 71 3b c2 vpminud %xmm2, %xmm1, %xmm0`], + ['i32x4.max_s', `c4 e2 71 3d c2 vpmaxsd %xmm2, %xmm1, %xmm0`], + ['i32x4.max_u', `c4 e2 71 3f c2 vpmaxud %xmm2, %xmm1, %xmm0`], + ['i64x2.add', `c5 f1 d4 c2 vpaddq %xmm2, %xmm1, %xmm0`], + ['i64x2.sub', `c5 f1 fb c2 vpsubq %xmm2, %xmm1, %xmm0`], + ['i64x2.mul', ` +c5 e1 73 d1 20 vpsrlq \\$0x20, %xmm1, %xmm3 +66 0f f4 da pmuludq %xmm2, %xmm3 +c5 81 73 d2 20 vpsrlq \\$0x20, %xmm2, %xmm15 +66 44 0f f4 f9 pmuludq %xmm1, %xmm15 +66 44 0f d4 fb paddq %xmm3, %xmm15 +66 41 0f 73 f7 20 psllq \\$0x20, %xmm15 +c5 f1 f4 c2 vpmuludq %xmm2, %xmm1, %xmm0 +66 41 0f d4 c7 paddq %xmm15, %xmm0`], + ['f32x4.add', `c5 f0 58 c2 vaddps %xmm2, %xmm1, %xmm0`], + ['f32x4.sub', `c5 f0 5c c2 vsubps %xmm2, %xmm1, %xmm0`], + ['f32x4.mul', `c5 f0 59 c2 vmulps %xmm2, %xmm1, %xmm0`], + ['f32x4.div', `c5 f0 5e c2 vdivps %xmm2, %xmm1, %xmm0`], + ['f64x2.add', `c5 f1 58 c2 vaddpd %xmm2, %xmm1, %xmm0`], + ['f64x2.sub', `c5 f1 5c c2 vsubpd %xmm2, %xmm1, %xmm0`], + ['f64x2.mul', `c5 f1 59 c2 vmulpd %xmm2, %xmm1, %xmm0`], + ['f64x2.div', `c5 f1 5e c2 vdivpd %xmm2, %xmm1, %xmm0`], + ['i8x16.narrow_i16x8_s', `c5 f1 63 c2 vpacksswb %xmm2, %xmm1, %xmm0`], + ['i8x16.narrow_i16x8_u', `c5 f1 67 c2 vpackuswb %xmm2, %xmm1, %xmm0`], + ['i16x8.narrow_i32x4_s', `c5 f1 6b c2 vpackssdw %xmm2, %xmm1, %xmm0`], + ['i16x8.narrow_i32x4_u', `c4 e2 71 2b c2 vpackusdw %xmm2, %xmm1, %xmm0`], + ['i32x4.dot_i16x8_s', `c5 f1 f5 c2 vpmaddwd %xmm2, %xmm1, %xmm0`]]); + +// Simple comparison ops +codegenTestX64_v128xv128_v128_avxhack( + [['i8x16.eq', `c5 f1 74 c2 vpcmpeqb %xmm2, %xmm1, %xmm0`], + ['i8x16.ne', ` +c5 f1 74 c2 vpcmpeqb %xmm2, %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i8x16.lt_s', `c5 e9 64 c1 vpcmpgtb %xmm1, %xmm2, %xmm0`], + ['i8x16.gt_u', ` +c5 f1 de c2 vpmaxub %xmm2, %xmm1, %xmm0 +66 0f 74 c2 pcmpeqb %xmm2, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i16x8.eq', `c5 f1 75 c2 vpcmpeqw %xmm2, %xmm1, %xmm0`], + ['i16x8.ne', ` +c5 f1 75 c2 vpcmpeqw %xmm2, %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i16x8.le_s', ` +c5 f1 65 c2 vpcmpgtw %xmm2, %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i16x8.ge_u', ` +c4 e2 71 3a c2 vpminuw %xmm2, %xmm1, %xmm0 +66 0f 75 c2 pcmpeqw %xmm2, %xmm0`], + ['i32x4.eq', `c5 f1 76 c2 vpcmpeqd %xmm2, %xmm1, %xmm0`], + ['i32x4.ne', ` +c5 f1 76 c2 vpcmpeqd %xmm2, %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i32x4.lt_s', `c5 e9 66 c1 vpcmpgtd %xmm1, %xmm2, %xmm0`], + ['i32x4.gt_u', ` +c4 e2 71 3f c2 vpmaxud %xmm2, %xmm1, %xmm0 +66 0f 76 c2 pcmpeqd %xmm2, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i64x2.eq', `c4 e2 71 29 c2 vpcmpeqq %xmm2, %xmm1, %xmm0`], + ['i64x2.ne', ` +c4 e2 71 29 c2 vpcmpeqq %xmm2, %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i64x2.lt_s', `c4 e2 69 37 c1 vpcmpgtq %xmm1, %xmm2, %xmm0`], + ['i64x2.ge_s', ` +c4 e2 69 37 c1 vpcmpgtq %xmm1, %xmm2, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['f32x4.eq', `c5 f0 c2 c2 00 vcmpps \\$0x00, %xmm2, %xmm1, %xmm0`], + ['f32x4.lt', `c5 f0 c2 c2 01 vcmpps \\$0x01, %xmm2, %xmm1, %xmm0`], + ['f32x4.ge', `c5 e8 c2 c1 02 vcmpps \\$0x02, %xmm1, %xmm2, %xmm0`], + ['f64x2.eq', `c5 f1 c2 c2 00 vcmppd \\$0x00, %xmm2, %xmm1, %xmm0`], + ['f64x2.lt', `c5 f1 c2 c2 01 vcmppd \\$0x01, %xmm2, %xmm1, %xmm0`], + ['f64x2.ge', `c5 e9 c2 c1 02 vcmppd \\$0x02, %xmm1, %xmm2, %xmm0`], + ['f32x4.pmin', `c5 e8 5d c1 vminps %xmm1, %xmm2, %xmm0`], + ['f32x4.pmax', `c5 e8 5f c1 vmaxps %xmm1, %xmm2, %xmm0`], + ['f64x2.pmin', `c5 e9 5d c1 vminpd %xmm1, %xmm2, %xmm0`], + ['f64x2.pmax', `c5 e9 5f c1 vmaxpd %xmm1, %xmm2, %xmm0`], + ['i8x16.swizzle', ` +c5 69 dc 3d ${RIPRADDR} vpaddusbx ${RIPR}, %xmm2, %xmm15 +c4 c2 71 00 c7 vpshufb %xmm15, %xmm1, %xmm0`], + ['i16x8.extmul_high_i8x16_s', ` +66 44 0f 3a 0f fa 08 palignr \\$0x08, %xmm2, %xmm15 +c4 42 79 20 ff vpmovsxbw %xmm15, %xmm15 +66 0f 3a 0f c1 08 palignr \\$0x08, %xmm1, %xmm0 +c4 e2 79 20 c0 vpmovsxbw %xmm0, %xmm0 +66 41 0f d5 c7 pmullw %xmm15, %xmm0`], + ['i32x4.extmul_low_i16x8_u', ` +c5 71 e4 fa vpmulhuw %xmm2, %xmm1, %xmm15 +c5 f1 d5 c2 vpmullw %xmm2, %xmm1, %xmm0 +66 41 0f 61 c7 punpcklwd %xmm15, %xmm0`], + ['i64x2.extmul_low_i32x4_s', ` +c5 79 70 f9 10 vpshufd \\$0x10, %xmm1, %xmm15 +c5 f9 70 c2 10 vpshufd \\$0x10, %xmm2, %xmm0 +66 41 0f 38 28 c7 pmuldq %xmm15, %xmm0`], + ['i16x8.q15mulr_sat_s', ` +c4 e2 71 0b c2 vpmulhrsw %xmm2, %xmm1, %xmm0 +c5 79 75 3d ${RIPRADDR} vpcmpeqwx ${RIPR}, %xmm0, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], +]); + +// Bitwise binary ops +codegenTestX64_v128xv128_v128_avxhack( + [['v128.and', `c5 f1 db c2 vpand %xmm2, %xmm1, %xmm0`], + ['v128.andnot', `c5 e9 df c1 vpandn %xmm1, %xmm2, %xmm0`], + ['v128.or', `c5 f1 eb c2 vpor %xmm2, %xmm1, %xmm0`], + ['v128.xor', `c5 f1 ef c2 vpxor %xmm2, %xmm1, %xmm0`]]); + + +// Replace lane ops. +codegenTestX64_adhoc(`(module + (func (export "f") (param v128 v128 i32) (result v128) + (i8x16.replace_lane 7 (local.get 1) (local.get 2))))`, 'f', ` +c4 .. 71 20 .. 07 vpinsrb \\$0x07, ${GPR_I32}, %xmm1, %xmm0`); +codegenTestX64_adhoc(`(module + (func (export "f") (param v128 v128 i32) (result v128) + (i16x8.replace_lane 3 (local.get 1) (local.get 2))))`, 'f', ` +(?:c4 .. 71|c5 f1) c4 .. 03 vpinsrw \\$0x03, ${GPR_I32}, %xmm1, %xmm0`); +codegenTestX64_adhoc(`(module + (func (export "f") (param v128 v128 i32) (result v128) + (i32x4.replace_lane 2 (local.get 1) (local.get 2))))`, 'f', ` +c4 .. 71 22 .. 02 vpinsrd \\$0x02, ${GPR_I32}, %xmm1, %xmm0`); +codegenTestX64_adhoc(`(module + (func (export "f") (param v128 v128 i64) (result v128) + (i64x2.replace_lane 1 (local.get 1) (local.get 2))))`, 'f', ` +c4 .. f1 22 .. 01 vpinsrq \\$0x01, ${GPR_I64}, %xmm1, %xmm0`); + + +if (isAvxPresent(2)) { + codegenTestX64_T_v128_avxhack( + [['i32', 'i8x16.splat', ` +c5 f9 6e .. vmovd ${GPR_I32}, %xmm0 +c4 e2 79 78 c0 vpbroadcastb %xmm0, %xmm0`], + ['i32', 'i16x8.splat', ` +c5 f9 6e .. vmovd ${GPR_I32}, %xmm0 +c4 e2 79 79 c0 vpbroadcastw %xmm0, %xmm0`], + ['i32', 'i32x4.splat', ` +c5 f9 6e .. vmovd ${GPR_I32}, %xmm0 +c4 e2 79 58 c0 vpbroadcastd %xmm0, %xmm0`], + ['i64', 'i64x2.splat', ` +c4 e1 f9 6e .. vmovq ${GPR_I64}, %xmm0 +c4 e2 79 59 c0 vpbroadcastq %xmm0, %xmm0`], + ['f32', 'f32x4.splat', `c4 e2 79 18 c0 vbroadcastss %xmm0, %xmm0`]], {log:true}); + + codegenTestX64_T_v128_avxhack( + [['i32', 'v128.load8_splat', + 'c4 c2 79 78 04 .. vpbroadcastbb \\(%r15,%r\\w+,1\\), %xmm0'], + ['i32', 'v128.load16_splat', + 'c4 c2 79 79 04 .. vpbroadcastww \\(%r15,%r\\w+,1\\), %xmm0'], + ['i32', 'v128.load32_splat', + 'c4 c2 79 18 04 .. vbroadcastssl \\(%r15,%r\\w+,1\\), %xmm0']], {memory: 1}); +} + +// Using VEX during shuffle ops +codegenTestX64_v128xv128_v128_avxhack([ + // Identity op on second argument should generate a move + ['i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15', + 'c5 f9 6f c1 vmovdqa %xmm1, %xmm0'], + + // Broadcast a byte from first argument + ['i8x16.shuffle 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5', + ` +c5 f1 60 c1 vpunpcklbw %xmm1, %xmm1, %xmm0 +c5 fa 70 c0 55 vpshufhw \\$0x55, %xmm0, %xmm0 +c5 f9 70 c0 aa vpshufd \\$0xAA, %xmm0, %xmm0`], + + // Broadcast a word from first argument + ['i8x16.shuffle 4 5 4 5 4 5 4 5 4 5 4 5 4 5 4 5', + ` +c5 fb 70 c1 aa vpshuflw \\$0xAA, %xmm1, %xmm0 +c5 f9 70 c0 00 vpshufd \\$0x00, %xmm0, %xmm0`], + + // Permute words + ['i8x16.shuffle 2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13', +` +c5 fb 70 c1 b1 vpshuflw \\$0xB1, %xmm1, %xmm0 +c5 fa 70 c0 b1 vpshufhw \\$0xB1, %xmm0, %xmm0`], + + // Permute doublewords + ['i8x16.shuffle 4 5 6 7 0 1 2 3 12 13 14 15 8 9 10 11', + 'c5 f9 70 c1 b1 vpshufd \\$0xB1, %xmm1, %xmm0'], + + // Interleave doublewords + ['i8x16.shuffle 0 1 2 3 16 17 18 19 4 5 6 7 20 21 22 23', + 'c5 f1 62 c2 vpunpckldq %xmm2, %xmm1, %xmm0'], + + // Interleave quadwords + ['i8x16.shuffle 24 25 26 27 28 29 30 31 8 9 10 11 12 13 14 15', + 'c5 e9 6d c1 vpunpckhqdq %xmm1, %xmm2, %xmm0'], + + // Rotate right + ['i8x16.shuffle 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12', + `c4 e3 71 0f c1 0d vpalignr \\$0x0D, %xmm1, %xmm1, %xmm0`], + ['i8x16.shuffle 28 29 30 31 0 1 2 3 4 5 6 7 8 9 10 11', + `c4 e3 71 0f c2 0c vpalignr \\$0x0C, %xmm2, %xmm1, %xmm0`]]); + +if (isAvxPresent(2)) { + codegenTestX64_v128xv128_v128_avxhack([ + // Broadcast low byte from second argument + ['i8x16.shuffle 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0', + 'c4 e2 79 78 c1 vpbroadcastb %xmm1, %xmm0'], + + // Broadcast low word from third argument + ['i8x16.shuffle 16 17 16 17 16 17 16 17 16 17 16 17 16 17 16 17', + 'c4 e2 79 79 c2 vpbroadcastw %xmm2, %xmm0'], + + // Broadcast low doubleword from second argument + ['i8x16.shuffle 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3', + 'c4 e2 79 58 c1 vpbroadcastd %xmm1, %xmm0']]); +} + +// Testing AVX optimization where VPBLENDVB accepts four XMM registers as args. +codegenTestX64_adhoc( + `(func (export "f") (param v128 v128 v128 v128) (result v128) + (i8x16.shuffle 0 17 2 3 4 5 6 7 24 25 26 11 12 13 30 15 + (local.get 2)(local.get 3)))`, + 'f', +` +66 0f 6f 0d ${RIPRADDR} movdqax ${RIPR}, %xmm1 +c4 e3 69 4c c3 10 vpblendvb %xmm1, %xmm3, %xmm2, %xmm0`); + +// Constant arguments that are folded into the instruction +codegenTestX64_v128xLITERAL_v128_avxhack( + [['i8x16.add', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 fc 05 ${RIPRADDR} vpaddbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.sub', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 f8 05 ${RIPRADDR} vpsubbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.add_sat_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 ec 05 ${RIPRADDR} vpaddsbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.add_sat_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 dc 05 ${RIPRADDR} vpaddusbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.sub_sat_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 e8 05 ${RIPRADDR} vpsubsbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.sub_sat_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 d8 05 ${RIPRADDR} vpsubusbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.min_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c4 e2 71 38 05 ${RIPRADDR} vpminsbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.min_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 da 05 ${RIPRADDR} vpminubx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.max_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c4 e2 71 3c 05 ${RIPRADDR} vpmaxsbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.max_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 de 05 ${RIPRADDR} vpmaxubx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.eq', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 74 05 ${RIPRADDR} vpcmpeqbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.ne', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', ` + c5 f1 74 05 ${RIPRADDR} vpcmpeqbx ${RIPR}, %xmm1, %xmm0 + 66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 + 66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i8x16.gt_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 64 05 ${RIPRADDR} vpcmpgtbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.le_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', ` + c5 f1 64 05 ${RIPRADDR} vpcmpgtbx ${RIPR}, %xmm1, %xmm0 + 66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 + 66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i8x16.narrow_i16x8_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 63 05 ${RIPRADDR} vpacksswbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.narrow_i16x8_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 67 05 ${RIPRADDR} vpackuswbx ${RIPR}, %xmm1, %xmm0`], + + ['i16x8.add', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 fd 05 ${RIPRADDR} vpaddwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.sub', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 f9 05 ${RIPRADDR} vpsubwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.mul', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 d5 05 ${RIPRADDR} vpmullwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.add_sat_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 ed 05 ${RIPRADDR} vpaddswx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.add_sat_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 dd 05 ${RIPRADDR} vpadduswx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.sub_sat_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 e9 05 ${RIPRADDR} vpsubswx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.sub_sat_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 d9 05 ${RIPRADDR} vpsubuswx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.min_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 ea 05 ${RIPRADDR} vpminswx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.min_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c4 e2 71 3a 05 ${RIPRADDR} vpminuwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.max_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 ee 05 ${RIPRADDR} vpmaxswx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.max_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c4 e2 71 3e 05 ${RIPRADDR} vpmaxuwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.eq', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 75 05 ${RIPRADDR} vpcmpeqwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.ne', '(v128.const i16x8 1 2 1 2 1 2 1 2)', ` + c5 f1 75 05 ${RIPRADDR} vpcmpeqwx ${RIPR}, %xmm1, %xmm0 + 66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 + 66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i16x8.gt_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 65 05 ${RIPRADDR} vpcmpgtwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.le_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', ` + c5 f1 65 05 ${RIPRADDR} vpcmpgtwx ${RIPR}, %xmm1, %xmm0 + 66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 + 66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i16x8.narrow_i32x4_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 6b 05 ${RIPRADDR} vpackssdwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.narrow_i32x4_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c4 e2 71 2b 05 ${RIPRADDR} vpackusdwx ${RIPR}, %xmm1, %xmm0`], + + ['i32x4.add', '(v128.const i32x4 1 2 1 2)', + `c5 f1 fe 05 ${RIPRADDR} vpadddx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.sub', '(v128.const i32x4 1 2 1 2)', + `c5 f1 fa 05 ${RIPRADDR} vpsubdx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.mul', '(v128.const i32x4 1 2 1 2)', + `c4 e2 71 40 05 ${RIPRADDR} vpmulldx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.min_s', '(v128.const i32x4 1 2 1 2)', + `c4 e2 71 39 05 ${RIPRADDR} vpminsdx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.min_u', '(v128.const i32x4 1 2 1 2)', + `c4 e2 71 3b 05 ${RIPRADDR} vpminudx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.max_s', '(v128.const i32x4 1 2 1 2)', + `c4 e2 71 3d 05 ${RIPRADDR} vpmaxsdx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.max_u', '(v128.const i32x4 1 2 1 2)', + `c4 e2 71 3f 05 ${RIPRADDR} vpmaxudx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.eq', '(v128.const i32x4 1 2 1 2)', + `c5 f1 76 05 ${RIPRADDR} vpcmpeqdx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.ne', '(v128.const i32x4 1 2 1 2)', ` + c5 f1 76 05 ${RIPRADDR} vpcmpeqdx ${RIPR}, %xmm1, %xmm0 + 66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 + 66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i32x4.gt_s', '(v128.const i32x4 1 2 1 2)', + `c5 f1 66 05 ${RIPRADDR} vpcmpgtdx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.le_s', '(v128.const i32x4 1 2 1 2)', ` + c5 f1 66 05 ${RIPRADDR} vpcmpgtdx ${RIPR}, %xmm1, %xmm0 + 66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 + 66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i32x4.dot_i16x8_s', '(v128.const i32x4 1 2 1 2)', + `c5 f1 f5 05 ${RIPRADDR} vpmaddwdx ${RIPR}, %xmm1, %xmm0`], + + ['i64x2.add', '(v128.const i64x2 1 2)', + `c5 f1 d4 05 ${RIPRADDR} vpaddqx ${RIPR}, %xmm1, %xmm0`], + ['i64x2.sub', '(v128.const i64x2 1 2)', + `c5 f1 fb 05 ${RIPRADDR} vpsubqx ${RIPR}, %xmm1, %xmm0`], + + ['v128.and', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 db 05 ${RIPRADDR} vpandx ${RIPR}, %xmm1, %xmm0`], + ['v128.or', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 eb 05 ${RIPRADDR} vporx ${RIPR}, %xmm1, %xmm0`], + ['v128.xor', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 ef 05 ${RIPRADDR} vpxorx ${RIPR}, %xmm1, %xmm0`], + + ['f32x4.add', '(v128.const f32x4 1 2 3 4)', + `c5 f0 58 05 ${RIPRADDR} vaddpsx ${RIPR}, %xmm1, %xmm0`], + ['f32x4.sub', '(v128.const f32x4 1 2 3 4)', + `c5 f0 5c 05 ${RIPRADDR} vsubpsx ${RIPR}, %xmm1, %xmm0`], + ['f32x4.mul', '(v128.const f32x4 1 2 3 4)', + `c5 f0 59 05 ${RIPRADDR} vmulpsx ${RIPR}, %xmm1, %xmm0`], + ['f32x4.div', '(v128.const f32x4 1 2 3 4)', + `c5 f0 5e 05 ${RIPRADDR} vdivpsx ${RIPR}, %xmm1, %xmm0`], + + ['f64x2.add', '(v128.const f64x2 1 2)', + `c5 f1 58 05 ${RIPRADDR} vaddpdx ${RIPR}, %xmm1, %xmm0`], + ['f64x2.sub', '(v128.const f64x2 1 2)', + `c5 f1 5c 05 ${RIPRADDR} vsubpdx ${RIPR}, %xmm1, %xmm0`], + ['f64x2.mul', '(v128.const f64x2 1 2)', + `c5 f1 59 05 ${RIPRADDR} vmulpdx ${RIPR}, %xmm1, %xmm0`], + ['f64x2.div', '(v128.const f64x2 1 2)', + `c5 f1 5e 05 ${RIPRADDR} vdivpdx ${RIPR}, %xmm1, %xmm0`], + + ['f32x4.eq', '(v128.const f32x4 1 2 3 4)', + `c5 f0 c2 05 ${RIPRADDR} 00 vcmppsx \\$0x00, ${RIPR}, %xmm1, %xmm0`], + ['f32x4.ne', '(v128.const f32x4 1 2 3 4)', + `c5 f0 c2 05 ${RIPRADDR} 04 vcmppsx \\$0x04, ${RIPR}, %xmm1, %xmm0`], + ['f32x4.lt', '(v128.const f32x4 1 2 3 4)', + `c5 f0 c2 05 ${RIPRADDR} 01 vcmppsx \\$0x01, ${RIPR}, %xmm1, %xmm0`], + ['f32x4.le', '(v128.const f32x4 1 2 3 4)', + `c5 f0 c2 05 ${RIPRADDR} 02 vcmppsx \\$0x02, ${RIPR}, %xmm1, %xmm0`], + + ['f64x2.eq', '(v128.const f64x2 1 2)', + `c5 f1 c2 05 ${RIPRADDR} 00 vcmppdx \\$0x00, ${RIPR}, %xmm1, %xmm0`], + ['f64x2.ne', '(v128.const f64x2 1 2)', + `c5 f1 c2 05 ${RIPRADDR} 04 vcmppdx \\$0x04, ${RIPR}, %xmm1, %xmm0`], + ['f64x2.lt', '(v128.const f64x2 1 2)', + `c5 f1 c2 05 ${RIPRADDR} 01 vcmppdx \\$0x01, ${RIPR}, %xmm1, %xmm0`], + ['f64x2.le', '(v128.const f64x2 1 2)', + `c5 f1 c2 05 ${RIPRADDR} 02 vcmppdx \\$0x02, ${RIPR}, %xmm1, %xmm0`]]); + + // Commutative operations with constants on the lhs should generate the same + // code as with the constant on the rhs. + codegenTestX64_LITERALxv128_v128_avxhack( + [['i8x16.add', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 fc 05 ${RIPRADDR} vpaddbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.add_sat_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 ec 05 ${RIPRADDR} vpaddsbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.add_sat_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 dc 05 ${RIPRADDR} vpaddusbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.min_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c4 e2 71 38 05 ${RIPRADDR} vpminsbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.min_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 da 05 ${RIPRADDR} vpminubx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.max_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c4 e2 71 3c 05 ${RIPRADDR} vpmaxsbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.max_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 de 05 ${RIPRADDR} vpmaxubx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.eq', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 74 05 ${RIPRADDR} vpcmpeqbx ${RIPR}, %xmm1, %xmm0`], + ['i8x16.ne', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', ` + c5 f1 74 05 ${RIPRADDR} vpcmpeqbx ${RIPR}, %xmm1, %xmm0 + 66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 + 66 41 0f ef c7 pxor %xmm15, %xmm0`], + + ['i16x8.add', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 fd 05 ${RIPRADDR} vpaddwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.mul', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 d5 05 ${RIPRADDR} vpmullwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.add_sat_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 ed 05 ${RIPRADDR} vpaddswx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.add_sat_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 dd 05 ${RIPRADDR} vpadduswx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.min_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 ea 05 ${RIPRADDR} vpminswx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.min_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c4 e2 71 3a 05 ${RIPRADDR} vpminuwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.max_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 ee 05 ${RIPRADDR} vpmaxswx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.max_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c4 e2 71 3e 05 ${RIPRADDR} vpmaxuwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.eq', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `c5 f1 75 05 ${RIPRADDR} vpcmpeqwx ${RIPR}, %xmm1, %xmm0`], + ['i16x8.ne', '(v128.const i16x8 1 2 1 2 1 2 1 2)', ` + c5 f1 75 05 ${RIPRADDR} vpcmpeqwx ${RIPR}, %xmm1, %xmm0 + 66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 + 66 41 0f ef c7 pxor %xmm15, %xmm0`], + + ['i32x4.add', '(v128.const i32x4 1 2 1 2)', + `c5 f1 fe 05 ${RIPRADDR} vpadddx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.mul', '(v128.const i32x4 1 2 1 2)', + `c4 e2 71 40 05 ${RIPRADDR} vpmulldx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.min_s', '(v128.const i32x4 1 2 1 2)', + `c4 e2 71 39 05 ${RIPRADDR} vpminsdx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.min_u', '(v128.const i32x4 1 2 1 2)', + `c4 e2 71 3b 05 ${RIPRADDR} vpminudx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.max_s', '(v128.const i32x4 1 2 1 2)', + `c4 e2 71 3d 05 ${RIPRADDR} vpmaxsdx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.max_u', '(v128.const i32x4 1 2 1 2)', + `c4 e2 71 3f 05 ${RIPRADDR} vpmaxudx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.eq', '(v128.const i32x4 1 2 1 2)', + `c5 f1 76 05 ${RIPRADDR} vpcmpeqdx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.ne', '(v128.const i32x4 1 2 1 2)', ` + c5 f1 76 05 ${RIPRADDR} vpcmpeqdx ${RIPR}, %xmm1, %xmm0 + 66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 + 66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i32x4.dot_i16x8_s', '(v128.const i32x4 1 2 1 2)', + `c5 f1 f5 05 ${RIPRADDR} vpmaddwdx ${RIPR}, %xmm1, %xmm0`], + + ['i64x2.add', '(v128.const i64x2 1 2)', + `c5 f1 d4 05 ${RIPRADDR} vpaddqx ${RIPR}, %xmm1, %xmm0`], + + ['v128.and', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 db 05 ${RIPRADDR} vpandx ${RIPR}, %xmm1, %xmm0`], + ['v128.or', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 eb 05 ${RIPRADDR} vporx ${RIPR}, %xmm1, %xmm0`], + ['v128.xor', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `c5 f1 ef 05 ${RIPRADDR} vpxorx ${RIPR}, %xmm1, %xmm0`]]); + +// Shift by constant encodings +codegenTestX64_v128xLITERAL_v128_avxhack( + [['i8x16.shl', '(i32.const 2)', ` +c5 f1 fc c1 vpaddb %xmm1, %xmm1, %xmm0 +66 0f fc c0 paddb %xmm0, %xmm0`], + ['i8x16.shl', '(i32.const 4)', ` +c5 f1 db 05 ${RIPRADDR} vpandx ${RIPR}, %xmm1, %xmm0 +66 0f 71 f0 04 psllw \\$0x04, %xmm0`], + ['i16x8.shl', '(i32.const 1)', + 'c5 f9 71 f1 01 vpsllw \\$0x01, %xmm1, %xmm0'], + ['i16x8.shr_s', '(i32.const 3)', + 'c5 f9 71 e1 03 vpsraw \\$0x03, %xmm1, %xmm0'], + ['i16x8.shr_u', '(i32.const 2)', + 'c5 f9 71 d1 02 vpsrlw \\$0x02, %xmm1, %xmm0'], + ['i32x4.shl', '(i32.const 5)', + 'c5 f9 72 f1 05 vpslld \\$0x05, %xmm1, %xmm0'], + ['i32x4.shr_s', '(i32.const 2)', + 'c5 f9 72 e1 02 vpsrad \\$0x02, %xmm1, %xmm0'], + ['i32x4.shr_u', '(i32.const 5)', + 'c5 f9 72 d1 05 vpsrld \\$0x05, %xmm1, %xmm0'], + ['i64x2.shr_s', '(i32.const 7)', ` +c5 79 70 f9 f5 vpshufd \\$0xF5, %xmm1, %xmm15 +66 41 0f 72 e7 1f psrad \\$0x1F, %xmm15 +c4 c1 71 ef c7 vpxor %xmm15, %xmm1, %xmm0 +66 0f 73 d0 07 psrlq \\$0x07, %xmm0 +66 41 0f ef c7 pxor %xmm15, %xmm0`]]); + +// vpblendvp optimization when bitselect follows comparison. +codegenTestX64_adhoc( + `(module + (func (export "f") (param v128) (param v128) (param v128) (param v128) (result v128) + (v128.bitselect (local.get 2) (local.get 3) + (i32x4.eq (local.get 0) (local.get 1)))))`, + 'f', ` +66 0f 76 c1 pcmpeqd %xmm1, %xmm0 +c4 e3 61 4c c2 00 vpblendvb %xmm0, %xmm2, %xmm3, %xmm0`); diff --git a/js/src/jit-test/tests/wasm/simd/baseline-bug1636235.js b/js/src/jit-test/tests/wasm/simd/baseline-bug1636235.js new file mode 100644 index 0000000000..25600b671e --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/baseline-bug1636235.js @@ -0,0 +1,113 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// Bug 1636235: assorted corner case baseline SIMD bugs. + +function get(arr, loc, len) { + let res = []; + for ( let i=0; i < len; i++ ) { + res.push(arr[loc+i]); + } + return res; +} + +// Pass v128 along a control flow edge in br_table + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "run") (param $k i32) + (v128.store (i32.const 0) (call $f (local.get $k)))) + (func $f (param $k i32) (result v128) + (block $B2 (result v128) + (block $B1 (result v128) + (v128.const i32x4 1 2 3 4) + (br_table $B1 $B2 (local.get $k))) + (drop) + (v128.const i32x4 5 6 7 8))))`); + +var mem = new Int32Array(ins.exports.mem.buffer); +ins.exports.run(0); +assertDeepEq(get(mem, 0, 4), [5, 6, 7, 8]); + +ins.exports.run(1); +assertDeepEq(get(mem, 0, 4), [1, 2, 3, 4]); + +// Materialize a ConstV128 off the value stack in popStackResults (also: check +// that br passing v128 values works as it should). + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + + (func (export "run") (param $k i32) + (local $t0 v128) (local $t1 v128) (local $t2 v128) + (call $f (local.get $k)) + (local.set $t2) + (local.set $t1) + (local.set $t0) + (v128.store (i32.const 32) (local.get $t2)) + (v128.store (i32.const 16) (local.get $t1)) + (v128.store (i32.const 0) (local.get $t0))) + + (func $f (param $k i32) (result v128 v128 v128) + (block $B2 (result v128 v128 v128) + (if (local.get $k) + (then + (br $B2 (v128.const i32x4 5 6 7 8) + (v128.const i32x4 9 10 11 12) + (v128.const i32x4 13 14 15 16))) + (else + (br $B2 (v128.const i32x4 -5 -6 -7 -8) + (v128.const i32x4 -9 -10 -11 -12) + (v128.const i32x4 -13 -14 -15 -16)))) + (unreachable))))`); + +var mem = new Int32Array(ins.exports.mem.buffer); +ins.exports.run(0); +assertDeepEq(get(mem, 0, 4), [-5, -6, -7, -8]); +assertDeepEq(get(mem, 4, 4), [-9, -10, -11, -12]); +assertDeepEq(get(mem, 8, 4), [-13, -14, -15, -16]); + +ins.exports.run(1); +assertDeepEq(get(mem, 0, 4), [5, 6, 7, 8]); +assertDeepEq(get(mem, 4, 4), [9, 10, 11, 12]); +assertDeepEq(get(mem, 8, 4), [13, 14, 15, 16]); + +// Check that br_if passing v128 values works as it should. + +var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + + (func (export "run") (param $k i32) + (local $t0 v128) (local $t1 v128) (local $t2 v128) + (call $f (local.get $k)) + (local.set $t2) + (local.set $t1) + (local.set $t0) + (v128.store (i32.const 32) (local.get $t2)) + (v128.store (i32.const 16) (local.get $t1)) + (v128.store (i32.const 0) (local.get $t0))) + + (func $f (param $k i32) (result v128 v128 v128) + (block $B2 (result v128 v128 v128) + (v128.const i32x4 5 6 7 8) + (v128.const i32x4 9 10 11 12) + (v128.const i32x4 13 14 15 16) + (br_if $B2 (local.get $k)) + drop drop drop + (v128.const i32x4 -5 -6 -7 -8) + (v128.const i32x4 -9 -10 -11 -12) + (v128.const i32x4 -13 -14 -15 -16))))`); + +var mem = new Int32Array(ins.exports.mem.buffer); +ins.exports.run(0); +assertDeepEq(get(mem, 0, 4), [-5, -6, -7, -8]); +assertDeepEq(get(mem, 4, 4), [-9, -10, -11, -12]); +assertDeepEq(get(mem, 8, 4), [-13, -14, -15, -16]); + +ins.exports.run(1); +assertDeepEq(get(mem, 0, 4), [5, 6, 7, 8]); +assertDeepEq(get(mem, 4, 4), [9, 10, 11, 12]); +assertDeepEq(get(mem, 8, 4), [13, 14, 15, 16]); + diff --git a/js/src/jit-test/tests/wasm/simd/binop-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/binop-x64-ion-codegen.js new file mode 100644 index 0000000000..f2a27ac7b1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/binop-x64-ion-codegen.js @@ -0,0 +1,255 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:codegen-x64-test.js + +// Test that there are no extraneous moves or fixups for sundry SIMD binary +// operations. See README-codegen.md for general information about this type of +// test case. + +// Inputs (xmm0, xmm1) + +codegenTestX64_v128xPTYPE_v128( + [['f32x4.replace_lane 0', 'f32', `f3 0f 10 c1 movss %xmm1, %xmm0`], + ['f32x4.replace_lane 1', 'f32', `66 0f 3a 21 c1 10 insertps \\$0x10, %xmm1, %xmm0`], + ['f32x4.replace_lane 3', 'f32', `66 0f 3a 21 c1 30 insertps \\$0x30, %xmm1, %xmm0`], + ['f64x2.replace_lane 0', 'f64', `f2 0f 10 c1 movsd %xmm1, %xmm0`], + ['f64x2.replace_lane 1', 'f64', `66 0f c6 c1 00 shufpd \\$0x00, %xmm1, %xmm0`]] ); + +// Inputs (xmm1, xmm0) + +codegenTestX64_v128xv128_v128_reversed( + [['f32x4.pmin', `0f 5d c1 minps %xmm1, %xmm0`], + ['f32x4.pmax', `0f 5f c1 maxps %xmm1, %xmm0`], + ['f64x2.pmin', `66 0f 5d c1 minpd %xmm1, %xmm0`], + ['f64x2.pmax', `66 0f 5f c1 maxpd %xmm1, %xmm0`]] ); + +// Constant arguments that are folded into the instruction + +codegenTestX64_v128xLITERAL_v128( + [['i8x16.add', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f fc 05 ${RIPRADDR} paddbx ${RIPR}, %xmm0`], + ['i8x16.sub', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f f8 05 ${RIPRADDR} psubbx ${RIPR}, %xmm0`], + ['i8x16.add_sat_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f ec 05 ${RIPRADDR} paddsbx ${RIPR}, %xmm0`], + ['i8x16.add_sat_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f dc 05 ${RIPRADDR} paddusbx ${RIPR}, %xmm0`], + ['i8x16.sub_sat_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f e8 05 ${RIPRADDR} psubsbx ${RIPR}, %xmm0`], + ['i8x16.sub_sat_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f d8 05 ${RIPRADDR} psubusbx ${RIPR}, %xmm0`], + ['i8x16.min_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f 38 38 05 ${RIPRADDR} pminsbx ${RIPR}, %xmm0`], + ['i8x16.min_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f da 05 ${RIPRADDR} pminubx ${RIPR}, %xmm0`], + ['i8x16.max_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f 38 3c 05 ${RIPRADDR} pmaxsbx ${RIPR}, %xmm0`], + ['i8x16.max_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f de 05 ${RIPRADDR} pmaxubx ${RIPR}, %xmm0`], + ['i8x16.eq', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f 74 05 ${RIPRADDR} pcmpeqbx ${RIPR}, %xmm0`], + ['i8x16.ne', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', ` +66 0f 74 05 ${RIPRADDR} pcmpeqbx ${RIPR}, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i8x16.gt_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f 64 05 ${RIPRADDR} pcmpgtbx ${RIPR}, %xmm0`], + ['i8x16.le_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', ` +66 0f 64 05 ${RIPRADDR} pcmpgtbx ${RIPR}, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i8x16.narrow_i16x8_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f 63 05 ${RIPRADDR} packsswbx ${RIPR}, %xmm0`], + ['i8x16.narrow_i16x8_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f 67 05 ${RIPRADDR} packuswbx ${RIPR}, %xmm0`], + + ['i16x8.add', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f fd 05 ${RIPRADDR} paddwx ${RIPR}, %xmm0`], + ['i16x8.sub', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f f9 05 ${RIPRADDR} psubwx ${RIPR}, %xmm0`], + ['i16x8.mul', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f d5 05 ${RIPRADDR} pmullwx ${RIPR}, %xmm0`], + ['i16x8.add_sat_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f ed 05 ${RIPRADDR} paddswx ${RIPR}, %xmm0`], + ['i16x8.add_sat_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f dd 05 ${RIPRADDR} padduswx ${RIPR}, %xmm0`], + ['i16x8.sub_sat_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f e9 05 ${RIPRADDR} psubswx ${RIPR}, %xmm0`], + ['i16x8.sub_sat_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f d9 05 ${RIPRADDR} psubuswx ${RIPR}, %xmm0`], + ['i16x8.min_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f ea 05 ${RIPRADDR} pminswx ${RIPR}, %xmm0`], + ['i16x8.min_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f 38 3a 05 ${RIPRADDR} pminuwx ${RIPR}, %xmm0`], + ['i16x8.max_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f ee 05 ${RIPRADDR} pmaxswx ${RIPR}, %xmm0`], + ['i16x8.max_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f 38 3e 05 ${RIPRADDR} pmaxuwx ${RIPR}, %xmm0`], + ['i16x8.eq', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f 75 05 ${RIPRADDR} pcmpeqwx ${RIPR}, %xmm0`], + ['i16x8.ne', '(v128.const i16x8 1 2 1 2 1 2 1 2)', ` +66 0f 75 05 ${RIPRADDR} pcmpeqwx ${RIPR}, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i16x8.gt_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f 65 05 ${RIPRADDR} pcmpgtwx ${RIPR}, %xmm0`], + ['i16x8.le_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', ` +66 0f 65 05 ${RIPRADDR} pcmpgtwx ${RIPR}, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i16x8.narrow_i32x4_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f 6b 05 ${RIPRADDR} packssdwx ${RIPR}, %xmm0`], + ['i16x8.narrow_i32x4_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f 38 2b 05 ${RIPRADDR} packusdwx ${RIPR}, %xmm0`], + + ['i32x4.add', '(v128.const i32x4 1 2 1 2)', + `66 0f fe 05 ${RIPRADDR} padddx ${RIPR}, %xmm0`], + ['i32x4.sub', '(v128.const i32x4 1 2 1 2)', + `66 0f fa 05 ${RIPRADDR} psubdx ${RIPR}, %xmm0`], + ['i32x4.mul', '(v128.const i32x4 1 2 1 2)', + `66 0f 38 40 05 ${RIPRADDR} pmulldx ${RIPR}, %xmm0`], + ['i32x4.min_s', '(v128.const i32x4 1 2 1 2)', + `66 0f 38 39 05 ${RIPRADDR} pminsdx ${RIPR}, %xmm0`], + ['i32x4.min_u', '(v128.const i32x4 1 2 1 2)', + `66 0f 38 3b 05 ${RIPRADDR} pminudx ${RIPR}, %xmm0`], + ['i32x4.max_s', '(v128.const i32x4 1 2 1 2)', + `66 0f 38 3d 05 ${RIPRADDR} pmaxsdx ${RIPR}, %xmm0`], + ['i32x4.max_u', '(v128.const i32x4 1 2 1 2)', + `66 0f 38 3f 05 ${RIPRADDR} pmaxudx ${RIPR}, %xmm0`], + ['i32x4.eq', '(v128.const i32x4 1 2 1 2)', + `66 0f 76 05 ${RIPRADDR} pcmpeqdx ${RIPR}, %xmm0`], + ['i32x4.ne', '(v128.const i32x4 1 2 1 2)', ` +66 0f 76 05 ${RIPRADDR} pcmpeqdx ${RIPR}, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i32x4.gt_s', '(v128.const i32x4 1 2 1 2)', + `66 0f 66 05 ${RIPRADDR} pcmpgtdx ${RIPR}, %xmm0`], + ['i32x4.le_s', '(v128.const i32x4 1 2 1 2)', ` +66 0f 66 05 ${RIPRADDR} pcmpgtdx ${RIPR}, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i32x4.dot_i16x8_s', '(v128.const i32x4 1 2 1 2)', + `66 0f f5 05 ${RIPRADDR} pmaddwdx ${RIPR}, %xmm0`], + + ['i64x2.add', '(v128.const i64x2 1 2)', + `66 0f d4 05 ${RIPRADDR} paddqx ${RIPR}, %xmm0`], + ['i64x2.sub', '(v128.const i64x2 1 2)', + `66 0f fb 05 ${RIPRADDR} psubqx ${RIPR}, %xmm0`], + + ['v128.and', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f db 05 ${RIPRADDR} pandx ${RIPR}, %xmm0`], + ['v128.or', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f eb 05 ${RIPRADDR} porx ${RIPR}, %xmm0`], + ['v128.xor', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f ef 05 ${RIPRADDR} pxorx ${RIPR}, %xmm0`], + + ['f32x4.add', '(v128.const f32x4 1 2 3 4)', + `0f 58 05 ${RIPRADDR} addpsx ${RIPR}, %xmm0`], + ['f32x4.sub', '(v128.const f32x4 1 2 3 4)', + `0f 5c 05 ${RIPRADDR} subpsx ${RIPR}, %xmm0`], + ['f32x4.mul', '(v128.const f32x4 1 2 3 4)', + `0f 59 05 ${RIPRADDR} mulpsx ${RIPR}, %xmm0`], + ['f32x4.div', '(v128.const f32x4 1 2 3 4)', + `0f 5e 05 ${RIPRADDR} divpsx ${RIPR}, %xmm0`], + ['f32x4.eq', '(v128.const f32x4 1 2 3 4)', + `0f c2 05 ${RIPRADDR} 00 cmppsx \\$0x00, ${RIPR}, %xmm0`], + ['f32x4.ne', '(v128.const f32x4 1 2 3 4)', + `0f c2 05 ${RIPRADDR} 04 cmppsx \\$0x04, ${RIPR}, %xmm0`], + ['f32x4.lt', '(v128.const f32x4 1 2 3 4)', + `0f c2 05 ${RIPRADDR} 01 cmppsx \\$0x01, ${RIPR}, %xmm0`], + ['f32x4.le', '(v128.const f32x4 1 2 3 4)', + `0f c2 05 ${RIPRADDR} 02 cmppsx \\$0x02, ${RIPR}, %xmm0`], + + ['f64x2.add', '(v128.const f64x2 1 2)', + `66 0f 58 05 ${RIPRADDR} addpdx ${RIPR}, %xmm0`], + ['f64x2.sub', '(v128.const f64x2 1 2)', + `66 0f 5c 05 ${RIPRADDR} subpdx ${RIPR}, %xmm0`], + ['f64x2.mul', '(v128.const f64x2 1 2)', + `66 0f 59 05 ${RIPRADDR} mulpdx ${RIPR}, %xmm0`], + ['f64x2.div', '(v128.const f64x2 1 2)', + `66 0f 5e 05 ${RIPRADDR} divpdx ${RIPR}, %xmm0`], + ['f64x2.eq', '(v128.const f64x2 1 2)', + `66 0f c2 05 ${RIPRADDR} 00 cmppdx \\$0x00, ${RIPR}, %xmm0`], + ['f64x2.ne', '(v128.const f64x2 1 2)', + `66 0f c2 05 ${RIPRADDR} 04 cmppdx \\$0x04, ${RIPR}, %xmm0`], + ['f64x2.lt', '(v128.const f64x2 1 2)', + `66 0f c2 05 ${RIPRADDR} 01 cmppdx \\$0x01, ${RIPR}, %xmm0`], + ['f64x2.le', '(v128.const f64x2 1 2)', + `66 0f c2 05 ${RIPRADDR} 02 cmppdx \\$0x02, ${RIPR}, %xmm0`]]); + +// Commutative operations with constants on the lhs should generate the same +// code as with the constant on the rhs. + +codegenTestX64_LITERALxv128_v128( + [['i8x16.add', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f fc 05 ${RIPRADDR} paddbx ${RIPR}, %xmm0`], + ['i8x16.add_sat_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f ec 05 ${RIPRADDR} paddsbx ${RIPR}, %xmm0`], + ['i8x16.add_sat_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f dc 05 ${RIPRADDR} paddusbx ${RIPR}, %xmm0`], + ['i8x16.min_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f 38 38 05 ${RIPRADDR} pminsbx ${RIPR}, %xmm0`], + ['i8x16.min_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f da 05 ${RIPRADDR} pminubx ${RIPR}, %xmm0`], + ['i8x16.max_s', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f 38 3c 05 ${RIPRADDR} pmaxsbx ${RIPR}, %xmm0`], + ['i8x16.max_u', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f de 05 ${RIPRADDR} pmaxubx ${RIPR}, %xmm0`], + ['i8x16.eq', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f 74 05 ${RIPRADDR} pcmpeqbx ${RIPR}, %xmm0`], + ['i8x16.ne', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', ` +66 0f 74 05 ${RIPRADDR} pcmpeqbx ${RIPR}, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + + ['i16x8.add', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f fd 05 ${RIPRADDR} paddwx ${RIPR}, %xmm0`], + ['i16x8.mul', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f d5 05 ${RIPRADDR} pmullwx ${RIPR}, %xmm0`], + ['i16x8.add_sat_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f ed 05 ${RIPRADDR} paddswx ${RIPR}, %xmm0`], + ['i16x8.add_sat_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f dd 05 ${RIPRADDR} padduswx ${RIPR}, %xmm0`], + ['i16x8.min_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f ea 05 ${RIPRADDR} pminswx ${RIPR}, %xmm0`], + ['i16x8.min_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f 38 3a 05 ${RIPRADDR} pminuwx ${RIPR}, %xmm0`], + ['i16x8.max_s', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f ee 05 ${RIPRADDR} pmaxswx ${RIPR}, %xmm0`], + ['i16x8.max_u', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f 38 3e 05 ${RIPRADDR} pmaxuwx ${RIPR}, %xmm0`], + ['i16x8.eq', '(v128.const i16x8 1 2 1 2 1 2 1 2)', + `66 0f 75 05 ${RIPRADDR} pcmpeqwx ${RIPR}, %xmm0`], + ['i16x8.ne', '(v128.const i16x8 1 2 1 2 1 2 1 2)', ` +66 0f 75 05 ${RIPRADDR} pcmpeqwx ${RIPR}, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + + ['i32x4.add', '(v128.const i32x4 1 2 1 2)', + `66 0f fe 05 ${RIPRADDR} padddx ${RIPR}, %xmm0`], + ['i32x4.mul', '(v128.const i32x4 1 2 1 2)', + `66 0f 38 40 05 ${RIPRADDR} pmulldx ${RIPR}, %xmm0`], + ['i32x4.min_s', '(v128.const i32x4 1 2 1 2)', + `66 0f 38 39 05 ${RIPRADDR} pminsdx ${RIPR}, %xmm0`], + ['i32x4.min_u', '(v128.const i32x4 1 2 1 2)', + `66 0f 38 3b 05 ${RIPRADDR} pminudx ${RIPR}, %xmm0`], + ['i32x4.max_s', '(v128.const i32x4 1 2 1 2)', + `66 0f 38 3d 05 ${RIPRADDR} pmaxsdx ${RIPR}, %xmm0`], + ['i32x4.max_u', '(v128.const i32x4 1 2 1 2)', + `66 0f 38 3f 05 ${RIPRADDR} pmaxudx ${RIPR}, %xmm0`], + ['i32x4.eq', '(v128.const i32x4 1 2 1 2)', + `66 0f 76 05 ${RIPRADDR} pcmpeqdx ${RIPR}, %xmm0`], + ['i32x4.ne', '(v128.const i32x4 1 2 1 2)', ` +66 0f 76 05 ${RIPRADDR} pcmpeqdx ${RIPR}, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i32x4.dot_i16x8_s', '(v128.const i32x4 1 2 1 2)', + `66 0f f5 05 ${RIPRADDR} pmaddwdx ${RIPR}, %xmm0`], + + ['i64x2.add', '(v128.const i64x2 1 2)', + `66 0f d4 05 ${RIPRADDR} paddqx ${RIPR}, %xmm0`], + + ['v128.and', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f db 05 ${RIPRADDR} pandx ${RIPR}, %xmm0`], + ['v128.or', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f eb 05 ${RIPRADDR} porx ${RIPR}, %xmm0`], + ['v128.xor', '(v128.const i8x16 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2)', + `66 0f ef 05 ${RIPRADDR} pxorx ${RIPR}, %xmm0`]]); diff --git a/js/src/jit-test/tests/wasm/simd/binop-x86-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/binop-x86-ion-codegen.js new file mode 100644 index 0000000000..312a2f94eb --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/binop-x86-ion-codegen.js @@ -0,0 +1,20 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x86") || getBuildConfiguration("simulator") || isAvxPresent(); include:codegen-x86-test.js + +codegenTestX86_v128xLITERAL_v128( + [['f32x4.eq', '(v128.const f32x4 1 2 3 4)', + `0f c2 05 ${ABSADDR} 00 cmppsx \\$0x00, ${ABS}, %xmm0`], + ['f32x4.ne', '(v128.const f32x4 1 2 3 4)', + `0f c2 05 ${ABSADDR} 04 cmppsx \\$0x04, ${ABS}, %xmm0`], + ['f32x4.lt', '(v128.const f32x4 1 2 3 4)', + `0f c2 05 ${ABSADDR} 01 cmppsx \\$0x01, ${ABS}, %xmm0`], + ['f32x4.le', '(v128.const f32x4 1 2 3 4)', + `0f c2 05 ${ABSADDR} 02 cmppsx \\$0x02, ${ABS}, %xmm0`], + + ['f64x2.eq', '(v128.const f64x2 1 2)', + `66 0f c2 05 ${ABSADDR} 00 cmppdx \\$0x00, ${ABS}, %xmm0`], + ['f64x2.ne', '(v128.const f64x2 1 2)', + `66 0f c2 05 ${ABSADDR} 04 cmppdx \\$0x04, ${ABS}, %xmm0`], + ['f64x2.lt', '(v128.const f64x2 1 2)', + `66 0f c2 05 ${ABSADDR} 01 cmppdx \\$0x01, ${ABS}, %xmm0`], + ['f64x2.le', '(v128.const f64x2 1 2)', + `66 0f c2 05 ${ABSADDR} 02 cmppdx \\$0x02, ${ABS}, %xmm0`]]); diff --git a/js/src/jit-test/tests/wasm/simd/bitselect-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/bitselect-x64-ion-codegen.js new file mode 100644 index 0000000000..6d2a105d12 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/bitselect-x64-ion-codegen.js @@ -0,0 +1,45 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator") || isAvxPresent(); include:codegen-x64-test.js + +// Test that there are no extraneous moves or fixups for SIMD bitselect +// operations. See README-codegen.md for general information about this type of +// test case. + +// The codegen enforces onTrue == output so we avoid a move to set that up. +// +// The remaining movdqa is currently unavoidable, it moves the control mask into a temp. +// The temp should be identical to the mask but the regalloc does not currently +// allow this constraint to be enforced. + +// Inputs (xmm0, xmm1, xmm2) + +codegenTestX64_adhoc( +`(module + (func (export "f") (param v128) (param v128) (param v128) (param v128) (result v128) + (v128.bitselect (local.get 0) (local.get 1) (local.get 2))))`, + 'f', +`66 0f 6f da movdqa %xmm2, %xmm3 +66 0f db c3 pand %xmm3, %xmm0 +66 0f df d9 pandn %xmm1, %xmm3 +66 0f eb c3 por %xmm3, %xmm0`); + +// Blend constant optimizations + +codegenTestX64_adhoc( + `(module + (func (export "f") (param v128) (param v128) (param v128) (result v128) + (v128.bitselect (local.get 0) (local.get 1) (v128.const i32x4 -1 0 0 -1))))`, + 'f', + `66 0f 3a 0e c1 c3 pblendw \\$0xC3, %xmm1, %xmm0`); + +// vpblendvp optimization when bitselect follows comparison. +// Non-AVX pblendvb uses xmm0 as an implicit read-only operand. +codegenTestX64_adhoc( + `(module + (func (export "f") (param v128) (param v128) (param v128) (param v128) (result v128) + (v128.bitselect (local.get 2) (local.get 3) + (i32x4.eq (local.get 0) (local.get 1)))))`, + 'f', ` +66 0f 76 c1 pcmpeqd %xmm1, %xmm0 +66 0f 6f cb movdqa %xmm3, %xmm1 +66 0f 38 10 ca pblendvb %xmm2, %xmm1 +66 0f 6f c1 movdqa %xmm1, %xmm0`); diff --git a/js/src/jit-test/tests/wasm/simd/cmp-bitselect.js b/js/src/jit-test/tests/wasm/simd/cmp-bitselect.js new file mode 100644 index 0000000000..8d50cd275e --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/cmp-bitselect.js @@ -0,0 +1,107 @@ +// |jit-test| skip-if: !wasmSimdEnabled() +// Tests if combination of comparsion and bitselect produces correct result. +// On x86/64 platforms, it is expected to replace slow bitselect emulation, +// with its faster laneselect equivalent (pblendvb). +// See bug 1751488 for more information. + +let verifyCodegen = _method => {}; +if (hasDisassembler() && wasmCompileMode() == "ion" && + getBuildConfiguration("x64") && !getBuildConfiguration("simulator")) { + if (isAvxPresent()) { + verifyCodegen = method => { + assertEq(wasmDis(method, {asString: true}).includes('vpblendvb'), true); + }; + } else { + verifyCodegen = method => { + assertEq(wasmDis(method, {asString: true}).includes("pblendvb"), true); + }; + } +} + +const checkOps = { + eq(a, b) { return a == b; }, + ne(a, b) { return a != b; }, + lt(a, b) { return a < b; }, + le(a, b) { return a <= b; }, + gt(a, b) { return a > b; }, + ge(a, b) { return a >= b; }, +}; +const checkPattern = new Uint8Array(Array(32).fill(null).map((_, i) => i)); + +for (let [laneSize, aty_s, aty_u] of [ + [8, Int8Array, Uint8Array], [16, Int16Array, Uint16Array], + [32, Int32Array, Uint32Array], [64, BigInt64Array, BigUint64Array]]) { + const laneCount = 128 / laneSize; + const ty = `i${laneSize}x${laneCount}`; + for (let op of ['eq', 'ne', 'lt_s', 'le_s', 'gt_s', 'ge_s', 'lt_u', 'le_u', 'gt_u', 'ge_u']) { + if (laneSize == 64 && op.includes('_u')) continue; + const wrap = laneSize < 64 ? x => x : x => BigInt(x); + const aty = op.includes('_u') ? aty_u : aty_s; + const check = checkOps[op.replace(/_[us]$/, "")]; + // Items to test: 0, 1, all 1s, top half 1s, low half 1s, top bit 1 + const testData = new aty([wrap(0), wrap(1), ~wrap(0), ~wrap(0) << wrap(laneSize / 2), + ~((~wrap(0)) << wrap(laneSize / 2)), wrap(1) << wrap(laneSize - 1)]); + const ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`(module + (memory (export "memory") 1) + (func (export "run") + (v128.store (i32.const 32) + (v128.bitselect (v128.load (i32.const 64)) (v128.load (i32.const 80)) (${ty}.${op} (v128.load (i32.const 0)) (v128.load (i32.const 16))))) ))`))); + const mem = new aty(ins.exports.memory.buffer); + const memI8 = new Uint8Array(ins.exports.memory.buffer); + memI8.subarray(64, 96).set(checkPattern); + verifyCodegen(ins.exports.run); + for (let i = 0; i < testData.length; i++) { + for (let j = 0; j < testData.length; j++) { + for (let q = 0; q < laneCount; q++) { + mem[q] = testData[(i + q) % testData.length]; + mem[q + laneCount] = testData[(j + q) % testData.length]; + } + ins.exports.run(); + for (let q = 0; q < laneCount; q++) { + const val = check(mem[q], mem[q + laneCount]); + const n = laneSize >> 3; + for (let k = 0; k < n; k++) { + assertEq(checkPattern[q * n + k + (val ? 0 : 16)], + memI8[32 + q * n + k]); + } + } + } + } + } +} + +for (let [laneSize, aty] of [[32, Float32Array], [64, Float64Array]]) { + const laneCount = 128 / laneSize; + const ty = `f${laneSize}x${laneCount}`; + for (let op of ['eq', 'ne', 'lt', 'le', 'gt', 'ge']) { + const check = checkOps[op]; + // Items to test: 0, 1, -1, PI, NaN, Inf, -0, -Inf + const testData = new aty([0, 1, -1, Math.PI, NaN, Infinity, 0/-Infinity, -Infinity]); + const ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`(module + (memory (export "memory") 1) + (func (export "run") + (v128.store (i32.const 32) + (v128.bitselect (v128.load (i32.const 64)) (v128.load (i32.const 80)) (${ty}.${op} (v128.load (i32.const 0)) (v128.load (i32.const 16))))) ))`))); + const mem = new aty(ins.exports.memory.buffer); + const memI8 = new Uint8Array(ins.exports.memory.buffer); + memI8.subarray(64, 96).set(checkPattern); + verifyCodegen(ins.exports.run); + for (let i = 0; i < testData.length; i++) { + for (let j = 0; j < testData.length; j++) { + for (let q = 0; q < laneCount; q++) { + mem[q] = testData[(i + q) % testData.length]; + mem[q + laneCount] = testData[(j + q) % testData.length]; + } + ins.exports.run(); + for (let q = 0; q < laneCount; q++) { + const val = check(mem[q], mem[q + laneCount]); + const n = laneSize >> 3; + for (let k = 0; k < n; k++) { + assertEq(checkPattern[q * n + k + (val ? 0 : 16)], + memI8[32 + q * n + k]); + } + } + } + } + } +} diff --git a/js/src/jit-test/tests/wasm/simd/cmp-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/cmp-x64-ion-codegen.js new file mode 100644 index 0000000000..bb1ac9da19 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/cmp-x64-ion-codegen.js @@ -0,0 +1,77 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:codegen-x64-test.js + +// Test that there are no extraneous moves or fixups for various SIMD comparison +// operations. See README-codegen.md for general information about this type of +// test case. + +// Inputs (xmm0, xmm1) + +codegenTestX64_v128xv128_v128( + [['i8x16.gt_s', `66 0f 64 c1 pcmpgtb %xmm1, %xmm0`], + ['i16x8.gt_s', `66 0f 65 c1 pcmpgtw %xmm1, %xmm0`], + ['i32x4.gt_s', `66 0f 66 c1 pcmpgtd %xmm1, %xmm0`], + ['i8x16.le_s', ` +66 0f 64 c1 pcmpgtb %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0 +`], + ['i16x8.le_s', ` +66 0f 65 c1 pcmpgtw %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0 +`], + ['i32x4.le_s', ` +66 0f 66 c1 pcmpgtd %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0 +`], + ['i8x16.eq', `66 0f 74 c1 pcmpeqb %xmm1, %xmm0`], + ['i16x8.eq', `66 0f 75 c1 pcmpeqw %xmm1, %xmm0`], + ['i32x4.eq', `66 0f 76 c1 pcmpeqd %xmm1, %xmm0`], + ['i8x16.ne', ` +66 0f 74 c1 pcmpeqb %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0 +`], + ['i16x8.ne', ` +66 0f 75 c1 pcmpeqw %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0 +`], + ['i32x4.ne', ` +66 0f 76 c1 pcmpeqd %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0 +`], + ['f32x4.eq', `0f c2 c1 00 cmpps \\$0x00, %xmm1, %xmm0`], + ['f32x4.ne', `0f c2 c1 04 cmpps \\$0x04, %xmm1, %xmm0`], + ['f32x4.lt', `0f c2 c1 01 cmpps \\$0x01, %xmm1, %xmm0`], + ['f32x4.le', `0f c2 c1 02 cmpps \\$0x02, %xmm1, %xmm0`], + ['f64x2.eq', `66 0f c2 c1 00 cmppd \\$0x00, %xmm1, %xmm0`], + ['f64x2.ne', `66 0f c2 c1 04 cmppd \\$0x04, %xmm1, %xmm0`], + ['f64x2.lt', `66 0f c2 c1 01 cmppd \\$0x01, %xmm1, %xmm0`], + ['f64x2.le', `66 0f c2 c1 02 cmppd \\$0x02, %xmm1, %xmm0`]] ); + +// Inputs (xmm1, xmm0) because the operation reverses its arguments. + +codegenTestX64_v128xv128_v128_reversed( + [['i8x16.ge_s', ` +66 0f 64 c1 pcmpgtb %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i16x8.ge_s', +` +66 0f 65 c1 pcmpgtw %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i32x4.ge_s', ` +66 0f 66 c1 pcmpgtd %xmm1, %xmm0 +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`], + ['i8x16.lt_s', `66 0f 64 c1 pcmpgtb %xmm1, %xmm0`], + ['i16x8.lt_s', `66 0f 65 c1 pcmpgtw %xmm1, %xmm0`], + ['i32x4.lt_s', `66 0f 66 c1 pcmpgtd %xmm1, %xmm0`], + ['f32x4.gt', `0f c2 c1 01 cmpps \\$0x01, %xmm1, %xmm0`], + ['f32x4.ge', `0f c2 c1 02 cmpps \\$0x02, %xmm1, %xmm0`], + ['f64x2.gt', `66 0f c2 c1 01 cmppd \\$0x01, %xmm1, %xmm0`], + ['f64x2.ge', `66 0f c2 c1 02 cmppd \\$0x02, %xmm1, %xmm0`]] ); diff --git a/js/src/jit-test/tests/wasm/simd/const-arm64-vixl-codegen.js b/js/src/jit-test/tests/wasm/simd/const-arm64-vixl-codegen.js new file mode 100644 index 0000000000..411c7da9e9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/const-arm64-vixl-codegen.js @@ -0,0 +1,109 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "baseline" || !getBuildConfiguration("arm64") + +// Test that the vixl logic for v128 constant loads is at least somewhat +// reasonable. + +var lead = `0x[0-9a-f]+ +[0-9a-f]{8} +`; + +var prefix = `${lead}sub sp, sp, #0x.. \\(..\\) +${lead}str x23, \\[sp, #..\\]`; + +var suffix = +`${lead}b #\\+0x8 \\(addr 0x.*\\) +${lead}brk #0xf000`; + +for ( let [bits, expected, values] of [ + // If high == low and the byte is 0 or ff then a single movi is sufficient. + ['i8x16 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00', ` +${prefix} +${lead}movi v0\\.2d, #0x0 +${suffix} +`, + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], + + ['i8x16 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0', ` +${prefix} +${lead}movi v0\\.2d, #0xff00ff00ff00ff +${suffix} +`, + [-1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0]], + + // Splattable small things (up to a byte, at a byte location) + // can also use just one instruction + ['i32x4 1 1 1 1', ` +${prefix} +${lead}movi v0\\.4s, #0x1, lsl #0 +${suffix} +`, + [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0]], + + ['i32x4 0x300 0x300 0x300 0x300', ` +${prefix} +${lead}movi v0\\.4s, #0x3, lsl #8 +${suffix} +`, + [0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0]], + + // If high == low but the value is more complex then a constant load + // plus a dup is sufficient. x16 is the designated temp. + ['i32x4 1 2 1 2', ` +${prefix} +${lead}mov x16, #0x1 +${lead}movk x16, #0x2, lsl #32 +${lead}dup v0\\.2d, x16 +${suffix} +`, + [1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0]], + + // If high != low then we degenerate to a more complicated pattern: dup the low value + // and then overwrite the high part with the high value. + ['i32x4 1 2 2 1', ` +${prefix} +${lead}mov x16, #0x1 +${lead}movk x16, #0x2, lsl #32 +${lead}dup v0\\.2d, x16 +${lead}mov x16, #0x2 +${lead}movk x16, #0x1, lsl #32 +${lead}mov v0\\.d\\[1\\], x16 +${suffix} +`, + [1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0]], + + // Things are not always bleak, and vixl finds a way. + ['i32x4 1 1 2 2', ` +${prefix} +${lead}movi v0\\.4s, #0x1, lsl #0 +${lead}mov x16, #0x200000002 +${lead}mov v0\\.d\\[1\\], x16 +${suffix} +`, + [1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0]], +] ) { + let ins = wasmEvalText(` + (module + (memory (export "mem") 1) + (func (export "run") + (v128.store (i32.const 0) (call $f))) + (func $f (export "f") (result v128) + (v128.const ${bits})))`); + let output = wasmDis(ins.exports.f, {tier:"baseline", asString:true}); + assertEq(output.match(new RegExp(expected)) != null, true); + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 0, iota(16).map(x => -1-x)); + ins.exports.run(); + assertSame(get(mem, 0, 16), values); +} + +function get(arr, loc, len) { + let res = []; + for ( let i=0; i < len; i++ ) { + res.push(arr[loc+i]); + } + return res; +} + +function set(arr, loc, vals) { + for ( let i=0; i < vals.length; i++ ) { + arr[loc+i] = vals[i]; + } +} diff --git a/js/src/jit-test/tests/wasm/simd/const-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/const-x64-ion-codegen.js new file mode 100644 index 0000000000..dd08939e3a --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/const-x64-ion-codegen.js @@ -0,0 +1,28 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:codegen-x64-test.js + +// Test that constants that can be synthesized are synthesized. See README-codegen.md +// for general information about this type of test case. + +codegenTestX64_unit_v128( + [['v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0', + `66 0f ef c0 pxor %xmm0, %xmm0`], + ['v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1', + `66 0f 75 c0 pcmpeqw %xmm0, %xmm0`], + ['v128.const i16x8 0 0 0 0 0 0 0 0', + `66 0f ef c0 pxor %xmm0, %xmm0`], + ['v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1', + `66 0f 75 c0 pcmpeqw %xmm0, %xmm0`], + ['v128.const i32x4 0 0 0 0', + `66 0f ef c0 pxor %xmm0, %xmm0`], + ['v128.const i32x4 -1 -1 -1 -1', + `66 0f 75 c0 pcmpeqw %xmm0, %xmm0`], + ['v128.const i64x2 0 0', + `66 0f ef c0 pxor %xmm0, %xmm0`], + ['v128.const i64x2 -1 -1', + `66 0f 75 c0 pcmpeqw %xmm0, %xmm0`], + ['v128.const f32x4 0 0 0 0', + // Arguably this should be xorps but that's for later + `66 0f ef c0 pxor %xmm0, %xmm0`], + ['v128.const f64x2 0 0', + // Arguably this should be xorpd but that's for later + `66 0f ef c0 pxor %xmm0, %xmm0`]] ); diff --git a/js/src/jit-test/tests/wasm/simd/cvt-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/cvt-x64-ion-codegen.js new file mode 100644 index 0000000000..5455e08db5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/cvt-x64-ion-codegen.js @@ -0,0 +1,27 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator") || isAvxPresent(); include:codegen-x64-test.js + +// Test that there are no extraneous moves for various SIMD conversion +// operations. See README-codegen.md for general information about this type of +// test case. + +// Note, these tests test the beginning of the output but not the end. + +codegenTestX64_v128_v128( + [['i32x4.trunc_sat_f32x4_s', + // The movaps is dest -> scratch and needs to be here. The test is + // asserting that there is not an additional (redundant) move here. +` +44 0f 28 f8 movaps %xmm0, %xmm15 +45 0f c2 ff 00 cmpps \\$0x00, %xmm15, %xmm15 +66 41 0f db c7 pand %xmm15, %xmm0`], + ['i32x4.trunc_sat_f32x4_u', ` +45 0f 57 ff xorps %xmm15, %xmm15 +41 0f 5f c7 maxps %xmm15, %xmm0`], + ['f32x4.convert_i32x4_u', ` +66 45 0f ef ff pxor %xmm15, %xmm15 +66 44 0f 3a 0e f8 55 pblendw \\$0x55, %xmm0, %xmm15 +66 41 0f fa c7 psubd %xmm15, %xmm0 +45 0f 5b ff cvtdq2ps %xmm15, %xmm15`]], + {no_suffix:true}); + + diff --git a/js/src/jit-test/tests/wasm/simd/debug-bug1644759.js b/js/src/jit-test/tests/wasm/simd/debug-bug1644759.js new file mode 100644 index 0000000000..0de46e0f0c --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/debug-bug1644759.js @@ -0,0 +1,20 @@ +// |jit-test| skip-if: !wasmDebuggingEnabled() || !wasmSimdEnabled() + +var g7 = newGlobal({newCompartment: true}); +g7.parent = this; +g7.eval(` + Debugger(parent).onEnterFrame = function(frame) { }; +`); +var ins = wasmEvalText(` + (memory (export "mem") 1 1) + (func (export "run") + (param $k i32) + (v128.store (i32.const 0) (call $f (local.get $k))) + ) + (func $f + (param $k i32) + (result v128) + (v128.const i32x4 5 6 7 8) + ) +`); +ins.exports.run(0); diff --git a/js/src/jit-test/tests/wasm/simd/directives.txt b/js/src/jit-test/tests/wasm/simd/directives.txt new file mode 100644 index 0000000000..651282ecb5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=baseline; test-also=--wasm-compiler=optimizing; test-also=--wasm-test-serialization; test-also=--wasm-compiler=optimizing --no-avx; skip-variant-if: --wasm-compiler=optimizing --no-avx, !getBuildConfiguration("x86") && !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:wasm.js diff --git a/js/src/jit-test/tests/wasm/simd/disabled.js b/js/src/jit-test/tests/wasm/simd/disabled.js new file mode 100644 index 0000000000..feae414697 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/disabled.js @@ -0,0 +1,28 @@ +// |jit-test| skip-if: wasmSimdEnabled() + +// ../binary.js checks that all SIMD extended opcodes in the 0..255 range are +// rejected if !wasmSimdEnabled, so no need to check that here. + +// Non-opcode cases that should also be rejected, lest feature sniffing may +// erroneously conclude that simd is available when it's not. The error message +// may differ depending on ENABLE_WASM_SIMD: if SIMD is compiled in we usually +// get a sensible error about v128; if not, we get something generic. + +wasmFailValidateText(`(module (func (param v128)))`, + /(v128 not enabled)|(bad type)/); + +wasmFailValidateText(`(module (func (result v128)))`, + /(v128 not enabled)|(bad type)/); + +wasmFailValidateText(`(module (func (local v128)))`, + /(v128 not enabled)|(bad type)|(SIMD support is not enabled)/); + +wasmFailValidateText(`(module (global (import "m" "g") v128))`, + /expected global type/); + +wasmFailValidateText(`(module (global (import "m" "g") (mut v128)))`, + /expected global type/); + +wasmFailValidateText(`(module (global i32 (v128.const i32x4 0 0 0 0)))`, + /(v128 not enabled)|(unrecognized opcode)/); + diff --git a/js/src/jit-test/tests/wasm/simd/experimental.js b/js/src/jit-test/tests/wasm/simd/experimental.js new file mode 100644 index 0000000000..3076cce80b --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/experimental.js @@ -0,0 +1,411 @@ +// |jit-test| --wasm-relaxed-simd; skip-if: !wasmRelaxedSimdEnabled() + +// Experimental opcodes. We have no text parsing support for these yet. The +// tests will be cleaned up and moved into ad-hack.js if the opcodes are +// adopted. + +load(libdir + "wasm-binary.js"); + +function wasmEval(bytes, imports) { + return new WebAssembly.Instance(new WebAssembly.Module(bytes), imports); +} + +function wasmValidateAndEval(bytes, imports) { + assertEq(WebAssembly.validate(bytes), true, "test of WasmValidate.cpp"); + return wasmEval(bytes, imports); +} + +function get(arr, loc, len) { + let res = []; + for ( let i=0; i < len; i++ ) { + res.push(arr[loc+i]); + } + return res; +} + +function set(arr, loc, vals) { + for ( let i=0; i < vals.length; i++ ) { + if (arr instanceof BigInt64Array) { + arr[loc+i] = BigInt(vals[i]); + } else { + arr[loc+i] = vals[i]; + } + } +} + +const v2vSig = {args:[], ret:VoidCode}; + +function V128Load(addr) { + return [I32ConstCode, varS32(addr), + SimdPrefix, V128LoadCode, 4, varU32(0)] +} + +function V128StoreExpr(addr, v) { + return [I32ConstCode, varS32(addr), + ...v, + SimdPrefix, V128StoreCode, 4, varU32(0)]; +} + +// FMA/FNMA, https://github.com/WebAssembly/relaxed-simd/issues/27 and +// https://github.com/WebAssembly/relaxed-simd/pull/81 + +function fma(x, y, a) { return (x * y) + a; } +function fnma(x, y, a) { return - (x * y) + a; } + +var fxs = [10, 20, 30, 40]; +var fys = [-2, -3, -4, -5]; +var fas = [0, 100, 500, 700]; +var dxs = [10, 20]; +var dys = [-2, -3]; +var das = [0, 100]; + +for ( let [opcode, xs, ys, as, operator] of [[F32x4RelaxedMaddCode, fxs, fys, fas, fma], + [F32x4RelaxedNmaddCode, fxs, fys, fas, fnma], + [F64x2RelaxedMaddCode, dxs, dys, das, fma], + [F64x2RelaxedNmaddCode, dxs, dys, das, fnma]] ) { + var k = xs.length; + var ans = iota(k).map((i) => operator(xs[i], ys[i], as[i])) + + var ins = wasmValidateAndEval(moduleWithSections([ + sigSection([v2vSig]), + declSection([0]), + memorySection(1), + exportSection([{funcIndex: 0, name: "run"}, + {memIndex: 0, name: "mem"}]), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + ...V128Load(32), + ...V128Load(48), + SimdPrefix, varU32(opcode)])]})])])); + + var mem = new (k == 4 ? Float32Array : Float64Array)(ins.exports.mem.buffer); + set(mem, k, xs); + set(mem, 2*k, ys); + set(mem, 3*k, as); + ins.exports.run(); + var result = get(mem, 0, k); + assertSame(result, ans); + + assertEq(false, WebAssembly.validate(moduleWithSections([ + sigSection([v2vSig]), + declSection([0]), + memorySection(1), + exportSection([{funcIndex: 0, name: "run"}, + {memIndex: 0, name: "mem"}]), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(0), + ...V128Load(0), + SimdPrefix, varU32(opcode)])]})])]))); +} + +// Relaxed swizzle, https://github.com/WebAssembly/relaxed-simd/issues/22 + +var ins = wasmValidateAndEval(moduleWithSections([ + sigSection([v2vSig]), + declSection([0]), + memorySection(1), + exportSection([{funcIndex: 0, name: "run"}, + {memIndex: 0, name: "mem"}]), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + ...V128Load(32), + SimdPrefix, varU32(I8x16RelaxedSwizzleCode)])]})])])); +var mem = new Uint8Array(ins.exports.mem.buffer); +var test = [1, 4, 3, 7, 123, 0, 8, 222]; +set(mem, 16, test); +for (let [i, s] of [[0, 0], [0, 1], [1,1], [1, 3], [7,5]]) { + var ans = new Uint8Array(16); + for (let j = 0; j < 16; j++) { + mem[32 + j] = (j * s + i) & 15; + ans[j] = test[(j * s + i) & 15]; + } + ins.exports.run(); + var result = get(mem, 0, 16); + assertSame(result, ans); +} + +assertEq(false, WebAssembly.validate(moduleWithSections([ + sigSection([v2vSig]), + declSection([0]), + memorySection(1), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + SimdPrefix, varU32(I8x16RelaxedSwizzleCode)])]})])]))); + + +// Relaxed MIN/MAX, https://github.com/WebAssembly/relaxed-simd/issues/33 + +const Neg0 = -1/Infinity; +var minMaxTests = [ + {a: 0, b: 0, min: 0, max: 0, }, + {a: Neg0, b: Neg0, min: Neg0, max: Neg0, }, + {a: 1/3, b: 2/3, min: 1/3, max: 2/3, }, + {a: -1/3, b: -2/3, min: -2/3, max: -1/3, }, + {a: -1000, b: 1, min: -1000, max: 1, }, + {a: 10, b: -2, min: -2, max: 10, }, +]; + +for (let k of [4, 2]) { + const minOpcode = k == 4 ? F32x4RelaxedMinCode : F64x2RelaxedMinCode; + const maxOpcode = k == 4 ? F32x4RelaxedMaxCode : F64x2RelaxedMaxCode; + + var ins = wasmValidateAndEval(moduleWithSections([ + sigSection([v2vSig]), + declSection([0, 0]), + memorySection(1), + exportSection([{funcIndex: 0, name: "min"}, + {funcIndex: 1, name: "max"}, + {memIndex: 0, name: "mem"}]), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + ...V128Load(32), + SimdPrefix, varU32(minOpcode)])]}), + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + ...V128Load(32), + SimdPrefix, varU32(maxOpcode)])]})])])); + for (let i = 0; i < minMaxTests.length; i++) { + var Ty = k == 4 ? Float32Array : Float64Array; + var mem = new Ty(ins.exports.mem.buffer); + var minResult = new Ty(k); + var maxResult = new Ty(k); + for (let j = 0; j < k; j++) { + const {a, b, min, max } = minMaxTests[(j + i) % minMaxTests.length]; + mem[j + k] = a; + mem[j + k * 2] = b; + minResult[j] = min; + maxResult[j] = max; + } + ins.exports.min(); + var result = get(mem, 0, k); + assertSame(result, minResult); + ins.exports.max(); + var result = get(mem, 0, k); + assertSame(result, maxResult); + } + + for (let op of [minOpcode, maxOpcode]) { + assertEq(false, WebAssembly.validate(moduleWithSections([ + sigSection([v2vSig]), + declSection([0, 0]), + memorySection(1), + exportSection([]), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(0), + SimdPrefix, varU32(op)])]})])]))); + } +} + +// Relaxed I32x4.TruncFXXX, https://github.com/WebAssembly/relaxed-simd/issues/21 + +var ins = wasmValidateAndEval(moduleWithSections([ + sigSection([v2vSig]), + declSection([0, 0, 0, 0]), + memorySection(1), + exportSection([{funcIndex: 0, name: "from32s"}, + {funcIndex: 1, name: "from32u"}, + {funcIndex: 2, name: "from64s"}, + {funcIndex: 3, name: "from64u"}, + {memIndex: 0, name: "mem"}]), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + SimdPrefix, varU32(I32x4RelaxedTruncSSatF32x4Code)])]}), + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + SimdPrefix, varU32(I32x4RelaxedTruncUSatF32x4Code)])]}), + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + SimdPrefix, varU32(I32x4RelaxedTruncSatF64x2SZeroCode)])]}), + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + SimdPrefix, varU32(I32x4RelaxedTruncSatF64x2UZeroCode)])]})])])); + +var mem = ins.exports.mem.buffer; +set(new Float32Array(mem), 4, [0, 2.3, -3.4, 100000]); +ins.exports.from32s(); +var result = get(new Int32Array(mem), 0, 4); +assertSame(result, [0, 2, -3, 100000]); + +set(new Float32Array(mem), 4, [0, 3.3, 0x80000000, 200000]); +ins.exports.from32u(); +var result = get(new Uint32Array(mem), 0, 4); +assertSame(result, [0, 3, 0x80000000, 200000]); +set(new Float32Array(mem), 4, [0, 0x80000100, 0x80000101, 0xFFFFFF00]); +ins.exports.from32u(); +var result = get(new Uint32Array(mem), 0, 4); +assertSame(result, [0, 0x80000100, 0x80000100, 0xFFFFFF00]); + +set(new Float64Array(mem), 2, [200000.3, -3.4]); +ins.exports.from64s(); +var result = get(new Int32Array(mem), 0, 4); +assertSame(result, [200000, -3, 0, 0]); +set(new Float64Array(mem), 2, [0x90000000 + 0.1, 0]); +ins.exports.from64u(); +var result = get(new Uint32Array(mem), 0, 4); +assertSame(result, [0x90000000, 0, 0, 0]); + +for (let op of [I32x4RelaxedTruncSSatF32x4Code, I32x4RelaxedTruncUSatF32x4Code, + I32x4RelaxedTruncSatF64x2SZeroCode, I32x4RelaxedTruncSatF64x2UZeroCode]) { + assertEq(false, WebAssembly.validate(moduleWithSections([ + sigSection([v2vSig]), + declSection([0]), + memorySection(1), + exportSection([]), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [SimdPrefix, varU32(op)])]})])]))); +} + +// Relaxed blend / laneselect, https://github.com/WebAssembly/relaxed-simd/issues/17 + +for (let [k, opcode, AT] of [[1, I8x16RelaxedLaneSelectCode, Int8Array], + [2, I16x8RelaxedLaneSelectCode, Int16Array], + [4, I32x4RelaxedLaneSelectCode, Int32Array], + [8, I64x2RelaxedLaneSelectCode, BigInt64Array]]) { + + var ins = wasmValidateAndEval(moduleWithSections([ + sigSection([v2vSig]), + declSection([0]), + memorySection(1), + exportSection([{funcIndex: 0, name: "run"}, + {memIndex: 0, name: "mem"}]), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + ...V128Load(32), + ...V128Load(48), + SimdPrefix, varU32(opcode)])]})])])); + + var mem = ins.exports.mem.buffer; + var mem8 = new Uint8Array(mem); + set(mem8, 16, [1,2,3,4,0,0,0,0,100,0,102,0,0,250,251,252,253]); + set(mem8, 32, [0,0,0,0,5,6,7,8,0,101,0,103,0,254,255,0,1]); + var c = new AT(mem, 48, 16 / k); + for (let i = 0; i < c.length; i++) { + // Use popcnt to randomize 0 and ~0 + const popcnt_i = i.toString(2).replace(/0/g, "").length; + const v = popcnt_i & 1 ? -1 : 0 + c[i] = k == 8 ? BigInt(v) : v; + } + ins.exports.run(); + for (let i = 0; i < 16; i++) { + const r = c[(i / k) | 0] ? mem8[16 + i] : mem8[32 + i]; + assertEq(r, mem8[i]); + } + + assertEq(false, WebAssembly.validate(moduleWithSections([ + sigSection([v2vSig]), + declSection([0]), + memorySection(1), + exportSection([{funcIndex: 0, name: "run"}, + {memIndex: 0, name: "mem"}]), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(0), + ...V128Load(0), + SimdPrefix, varU32(opcode)])]})])]))); +} + + +// Relaxed rounding q-format multiplication. +var ins = wasmValidateAndEval(moduleWithSections([ + sigSection([v2vSig]), + declSection([0]), + memorySection(1), + exportSection([{funcIndex: 0, name: "relaxed_q15mulr_s"}, + {memIndex: 0, name: "mem"}]), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + ...V128Load(32), + SimdPrefix, varU32(I16x8RelaxedQ15MulrSCode)])]})])])); + +var mem16 = new Int16Array(ins.exports.mem.buffer); +for (let [as, bs] of cross([ + [1, -3, 5, -7, 11, -13, -17, 19], + [-1, 0, 16, -32, 64, 128, -1024, 0, 1], + [1,2,-32768,32767,1,4,-32768,32767]]) ) { + set(mem16, 8, as); + set(mem16, 16, bs); + ins.exports.relaxed_q15mulr_s(); + const result = get(mem16, 0, 8); + for (let i = 0; i < 8; i++) { + const expected = (as[i] * bs[i] + 0x4000) >> 15; + if (as[i] == -32768 && bs[i] == -32768) continue; + assertEq(expected, result[i], `result of ${as[i]} * ${bs[i]}`); + } +} + + +// Check relaxed dot product results. +var ins = wasmValidateAndEval(moduleWithSections([ + sigSection([v2vSig]), + declSection([0]), + memorySection(1), + exportSection([{funcIndex: 0, name: "dot_i8x16_i7x16_s"}, + {memIndex: 0, name: "mem"}]), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + ...V128Load(32), + SimdPrefix, varU32(I16x8DotI8x16I7x16SCode)])]})])])); +var mem8 = new Int8Array(ins.exports.mem.buffer); +var mem16 = new Int16Array(ins.exports.mem.buffer); +var test7bit = [1, 2, 3, 4, 5, 64, 65, 127, 127, 0, 0, + 1, 65, 64, 2, 3, 0, 0, 127, 127, 5, 4]; +var testNeg = test7bit.concat(test7bit.map(i => ~i)); +for (let ai = 0; ai < testNeg.length - 15; ai++) + for (let bi = 0; bi < test7bit.length - 15; bi++) { + set(mem8, 16, testNeg.slice(ai, ai + 16)); + set(mem8, 32, test7bit.slice(bi, bi + 16)); + ins.exports.dot_i8x16_i7x16_s(); + const result = get(mem16, 0, 8); + for (let i = 0; i < 8; i++) { + const expected = ((testNeg[ai + i * 2] * test7bit[bi + i * 2]) + + (testNeg[ai + i * 2 + 1] * test7bit[bi + i * 2 + 1])) | 0; + assertEq(expected, result[i]); + } + } + +var ins = wasmValidateAndEval(moduleWithSections([ + sigSection([v2vSig]), + declSection([0]), + memorySection(1), + exportSection([{funcIndex: 0, name: "dot_i8x16_i7x16_add_s"}, + {memIndex: 0, name: "mem"}]), + bodySection([ + funcBody({locals:[], + body: [...V128StoreExpr(0, [...V128Load(16), + ...V128Load(32), + ...V128Load(48), + SimdPrefix, varU32(I32x4DotI8x16I7x16AddSCode)])]})])])); +var mem8 = new Int8Array(ins.exports.mem.buffer); +var mem32 = new Int32Array(ins.exports.mem.buffer); +var test7bit = [1, 2, 3, 4, 5, 64, 65, 127, 127, 0, 0, + 1, 65, 64, 2, 3, 0, 0, 127, 127, 5, 4]; +var testNeg = test7bit.concat(test7bit.map(i => ~i)); +var testAcc = [0, 12, 65336, -1, 0x10000000, -0xffffff]; +for (let ai = 0; ai < testNeg.length - 15; ai++) + for (let bi = 0; bi < test7bit.length - 15; bi++) + for (let ci = 0; ci < testAcc.length - 3; ci++) { + set(mem8, 16, testNeg.slice(ai, ai + 16)); + set(mem8, 32, test7bit.slice(bi, bi + 16)); + set(mem32, 48/4, testAcc.slice(ci, ci + 4)); + ins.exports.dot_i8x16_i7x16_add_s(); + const result = get(mem32, 0, 4); + for (let i = 0; i < 4; i++) { + const a1 = (testNeg[ai + i * 4] * test7bit[bi + i * 4]) + + (testNeg[ai + i * 4 + 1] * test7bit[bi + i * 4 + 1]); + const a2 = (testNeg[ai + i * 4 + 2] * test7bit[bi + i * 4 + 2]) + + (testNeg[ai + i * 4 + 3] * test7bit[bi + i * 4 + 3]); + const expected = (testAcc[ci + i] + a1 + a2) | 0; + assertEq(expected, result[i]); + } + } diff --git a/js/src/jit-test/tests/wasm/simd/ion-analysis.js b/js/src/jit-test/tests/wasm/simd/ion-analysis.js new file mode 100644 index 0000000000..d12af6e6fb --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/ion-analysis.js @@ -0,0 +1,956 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || wasmCompileMode() != "ion" || !this.wasmSimdAnalysis + +// White-box tests for SIMD optimizations. These are sensitive to internal +// details of the front-end and lowering logic, which is partly platform-dependent. +// +// In DEBUG builds, the testing function wasmSimdAnalysis() returns a string +// describing the last decision made by the SIMD lowering code: to perform an +// optimized lowering or the default byte shuffle+blend for i8x16.shuffle; to +// shift by a constant or a variable for the various shifts; and so on. +// +// We test that the expected transformation applies, and that the machine code +// generates the expected result. + +var isArm64 = getBuildConfiguration("arm64"); + +// 32-bit permutation that is not a rotation. +let perm32x4_pattern = [4, 5, 6, 7, 12, 13, 14, 15, 8, 9, 10, 11, 0, 1, 2, 3]; + +// Operands the same, dword permutation +{ + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${perm32x4_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 32x4"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), perm32x4_pattern); +} + +// Right operand ignored, dword permutation +{ + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${perm32x4_pattern.join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 32x4"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + set(mem, 32, iota(16).map(x => x+16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), perm32x4_pattern); +} + +// Left operand ignored, dword permutation +{ + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${perm32x4_pattern.map(x => x+16).join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 32x4"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16).map(x => x+16)); + set(mem, 32, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), perm32x4_pattern); +} + +// Operands the same, word permutation on both sides of the qword divide, with a qword swap +{ + let perm16x8_pattern = [12, 13, 14, 15, 10, 11, 8, 9, + 6, 7, 4, 5, 2, 3, 0, 1]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${perm16x8_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 16x8"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), perm16x8_pattern); +} + +// Operands the same, word permutation on both sides of the qword divide, no qword swap +{ + let perm16x8_pattern = [ 6, 7, 4, 5, 2, 3, 0, 1, + 12, 13, 14, 15, 10, 11, 8, 9]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${perm16x8_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 16x8"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), perm16x8_pattern); +} + +// Operands the same, word permutation on low side of the qword divide, no qword swap +{ + let perm16x8_pattern = [ 6, 7, 4, 5, 2, 3, 0, 1, + 8, 9, 10, 11, 12, 13, 14, 15]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${perm16x8_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 16x8"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), perm16x8_pattern); +} + +// Operands the same, word permutation on high side of the qword divide, no qword swap +{ + let perm16x8_pattern = [ 0, 1, 2, 3, 4, 5, 6, 7, + 12, 13, 14, 15, 10, 11, 8, 9]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${perm16x8_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 16x8"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), perm16x8_pattern); +} + +// Same operands, byte rotate +{ + // 8-bit permutation that is a rotation + let rot8x16_pattern = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${rot8x16_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> rotate-right 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), rot8x16_pattern); +} + +// Operands the same, random jumble => byte permutation +{ + // 8-bit permutation that is not a rotation + let perm8x16_pattern = [5, 7, 6, 8, 9, 10, 11, 4, 13, 14, 15, 0, 1, 2, 3, 12]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${perm8x16_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), perm8x16_pattern); +} + +// Operands differ, both accessed, rhs is constant zero, left-shift pattern +{ + // 8-bit shift with zeroes shifted in at the right end + let shift8x16_pattern = [16, 16, 16, 16, 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${shift8x16_pattern.join(' ')} (local.get 0) (v128.const i32x4 0 0 0 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> shift-left 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), shift8x16_pattern.map(x => x >= 16 ? 0 : x)); +} + +// The same as above but the constant is lhs. +{ + // 8-bit shift with zeroes shifted in at the right end + let shift8x16_pattern = [16, 16, 16, 16, 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(x => x ^ 16); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${shift8x16_pattern.join(' ')} (v128.const i32x4 0 0 0 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> shift-left 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), shift8x16_pattern.map(x => x < 16 ? 0 : x - 16)); +} + +// Operands differ, both accessed, rhs is constant zero, left-shift pattern that +// does not start properly. +{ + // 8-bit shift with zeroes shifted in at the right end + let shift8x16_pattern = [16, 16, 16, 16, 16, 16, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${shift8x16_pattern.join(' ')} (local.get 0) (v128.const i32x4 0 0 0 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> shuffle+blend 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), shift8x16_pattern.map(x => x >= 16 ? 0 : x)); +} + +// Operands differ, both accessed, rhs is constant zero, right-shift pattern +{ + // 8-bit shift with zeroes shifted in at the right end + let shift8x16_pattern = [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 20, 20, 20, 20, 20, 20]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${shift8x16_pattern.join(' ')} (local.get 0) (v128.const i32x4 0 0 0 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> shift-right 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), shift8x16_pattern.map(x => x >= 16 ? 0 : x)); +} + +// Operands differ, both accessed, rhs is constant zero, right-shift pattern +// that does not end properly. +{ + // 8-bit shift with zeroes shifted in at the right end + let shift8x16_pattern = [6, 7, 8, 9, 10, 11, 12, 13, 14, 20, 20, 20, 20, 20, 20, 20]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${shift8x16_pattern.join(' ')} (local.get 0) (v128.const i32x4 0 0 0 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> shuffle+blend 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), shift8x16_pattern.map(x => x >= 16 ? 0 : x)); +} + +// Operands differ and are variable, both accessed, (lhs ++ rhs) >> k +{ + let concat8x16_pattern = [27, 28, 29, 30, 31, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${concat8x16_pattern.join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> concat+shift-right 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + set(mem, 32, iota(16).map(k => k+16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), concat8x16_pattern); +} + +// Operands differ and are variable, both accessed, (rhs ++ lhs) >> k +{ + let concat8x16_pattern = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${concat8x16_pattern.join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> concat+shift-right 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + set(mem, 32, iota(16).map(k => k+16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), concat8x16_pattern); +} + +// Operands differ, both accessed, but inputs stay in their lanes => byte blend +{ + let blend8x16_pattern = iota(16).map(x => (x % 3 == 0) ? x + 16 : x); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${blend8x16_pattern.join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> blend 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + let lhs = iota(16); + let rhs = iota(16).map(x => x+16); + set(mem, 16, lhs); + set(mem, 32, rhs); + ins.exports.run(); + assertSame(get(mem, 0, 16), blend8x16_pattern); +} + +// Operands differ, both accessed, but inputs stay in their lanes => word blend +{ + let blend16x8_pattern = iota(16).map(x => (x & 2) ? x + 16 : x); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${blend16x8_pattern.join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> blend 16x8"); + + let mem = new Int8Array(ins.exports.mem.buffer); + let lhs = iota(16); + let rhs = iota(16).map(x => x+16); + set(mem, 16, lhs); + set(mem, 32, rhs); + ins.exports.run(); + assertSame(get(mem, 0, 16), blend16x8_pattern); +} + +// Interleave i32x4s +for ( let [lhs, rhs, expected] of + [[[0, 1], [4, 5], "shuffle -> interleave-low 32x4"], + [[2, 3], [6, 7], "shuffle -> interleave-high 32x4"]] ) { + for (let swap of [false, true]) { + if (swap) + [lhs, rhs] = [rhs, lhs]; + let interleave_pattern = i32ToI8(interleave(lhs, rhs)); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${interleave_pattern.join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), expected); + + let mem = new Int8Array(ins.exports.mem.buffer); + let lhsval = iota(16); + let rhsval = iota(16).map(x => x+16); + set(mem, 16, lhsval); + set(mem, 32, rhsval); + ins.exports.run(); + assertSame(get(mem, 0, 16), interleave_pattern); + } +} + +// Interleave i64x2s +for ( let [lhs, rhs, expected] of + [[[0], [2], "shuffle -> interleave-low 64x2"], + [[1], [3], "shuffle -> interleave-high 64x2"]] ) { + for (let swap of [false, true]) { + if (swap) + [lhs, rhs] = [rhs, lhs]; + let interleave_pattern = i64ToI2(interleave(lhs, rhs)); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${interleave_pattern.join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), expected); + + let mem = new Int8Array(ins.exports.mem.buffer); + let lhsval = iota(16); + let rhsval = iota(16).map(x => x+16); + set(mem, 16, lhsval); + set(mem, 32, rhsval); + ins.exports.run(); + assertSame(get(mem, 0, 16), interleave_pattern); + } +} + +// Interleave i16x8s +for ( let [lhs, rhs, expected] of + [[[0, 1, 2, 3], [8, 9, 10, 11], "shuffle -> interleave-low 16x8"], + [[4, 5, 6, 7], [12, 13, 14, 15], "shuffle -> interleave-high 16x8"]] ) { + for (let swap of [false, true]) { + if (swap) + [lhs, rhs] = [rhs, lhs]; + let interleave_pattern = i16ToI8(interleave(lhs, rhs)); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${interleave_pattern.join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), expected); + + let mem = new Int8Array(ins.exports.mem.buffer); + let lhsval = iota(16); + let rhsval = iota(16).map(x => x+16); + set(mem, 16, lhsval); + set(mem, 32, rhsval); + ins.exports.run(); + assertSame(get(mem, 0, 16), interleave_pattern); + } +} + +// Interleave i8x16s +for ( let [lhs, rhs, expected] of + [[[0, 1, 2, 3, 4, 5, 6, 7], [16, 17, 18, 19, 20, 21, 22, 23], "shuffle -> interleave-low 8x16"], + [[8, 9, 10, 11, 12, 13, 14, 15],[24, 25, 26, 27, 28, 29, 30, 31], "shuffle -> interleave-high 8x16"]] ) { + for (let swap of [false, true]) { + if (swap) + [lhs, rhs] = [rhs, lhs]; + let interleave_pattern = interleave(lhs, rhs); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${interleave_pattern.join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), expected); + + let mem = new Int8Array(ins.exports.mem.buffer); + let lhsval = iota(16); + let rhsval = iota(16).map(x => x+16); + set(mem, 16, lhsval); + set(mem, 32, rhsval); + ins.exports.run(); + assertSame(get(mem, 0, 16), interleave_pattern); + } +} + +// Operands differ, both accessed, random jumble => byte shuffle+blend +{ + let blend_perm8x16_pattern = [5, 23, 6, 24, 9, 10, 11, 7, 7, 14, 15, 19, 1, 2, 3, 12]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${blend_perm8x16_pattern.join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> shuffle+blend 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + let lhs = iota(16).map(x => x+16); + let rhs = iota(16); + set(mem, 16, lhs); + set(mem, 32, rhs); + ins.exports.run(); + assertSame(get(mem, 0, 16), + blend_perm8x16_pattern.map(x => x < 16 ? lhs[x] : rhs[x-16])); +} + +// No-op, ignoring right operand, should turn into a move. +{ + let nop8x16_pattern = iota(16); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${nop8x16_pattern.join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> move"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + set(mem, 32, iota(16).map(x => x+16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), nop8x16_pattern); +} + +// No-op, ignoring left operand, should turn into a move. +{ + let nop8x16_pattern = iota(16).map(x => x+16); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16)) (v128.load (i32.const 32))))) + (func $f (param v128) (param v128) (result v128) + (i8x16.shuffle ${nop8x16_pattern.join(' ')} (local.get 0) (local.get 1))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> move"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + set(mem, 32, iota(16).map(x => x+16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), nop8x16_pattern); +} + +// Broadcast byte +for ( let byte of [3, 11, 8, 2] ) { + let broadcast8x16_pattern = iota(16).map(_ => byte); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${broadcast8x16_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> broadcast 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), broadcast8x16_pattern); +} + +// Broadcast word from high quadword +{ + let broadcast16x8_pattern = [10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${broadcast16x8_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> broadcast 16x8"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), broadcast16x8_pattern); +} + +// Broadcast word from low quadword +{ + let broadcast16x8_pattern = [4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${broadcast16x8_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> broadcast 16x8"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), broadcast16x8_pattern); +} + +// Broadcast dword from low quadword should turn into a dword permute +{ + let broadcast32x4_pattern = [4, 5, 6, 7, 4, 5, 6, 7, 4, 5, 6, 7, 4, 5, 6, 7]; + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${broadcast32x4_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 32x4"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), broadcast32x4_pattern); +} + +// Broadcast high qword should turn into a dword permute +{ + let broadcast64x2_pattern = [8, 9, 10, 11, 12, 13, 14, 15, 8, 9, 10, 11, 12, 13, 14, 15] + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${broadcast64x2_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 32x4"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), broadcast64x2_pattern); +} + +// Byte reversal should be a byte permute +{ + let rev8x16_pattern = iota(16).reverse(); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${rev8x16_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 8x16"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), rev8x16_pattern); +} + +// Byteswap of half-word, word and quad-word groups should be +// reverse bytes analysis +for (let k of [2, 4, 8]) { + let rev8_pattern = iota(16).map(i => i ^ (k - 1)); + let ins = wasmCompile(` +(module +(memory (export "mem") 1 1) +(func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) +(func $f (param v128) (result v128) + (i8x16.shuffle ${rev8_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), `shuffle -> reverse bytes in ${8 * k}-bit lanes`); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), rev8_pattern); +} + +// Word reversal should be a word permute +{ + let rev16x8_pattern = i16ToI8(iota(8).reverse()); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${rev16x8_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 16x8"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), rev16x8_pattern); +} + +// Dword reversal should be a dword permute +{ + let rev32x4_pattern = i32ToI8([3, 2, 1, 0]); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${rev32x4_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 32x4"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), rev32x4_pattern); +} + +// Qword reversal should be a dword permute +{ + let rev64x2_pattern = i32ToI8([2, 3, 0, 1]); + let ins = wasmCompile(` +(module + (memory (export "mem") 1 1) + (func (export "run") + (v128.store (i32.const 0) (call $f (v128.load (i32.const 16))))) + (func $f (param v128) (result v128) + (i8x16.shuffle ${rev64x2_pattern.join(' ')} (local.get 0) (local.get 0))))`); + + assertEq(wasmSimdAnalysis(), "shuffle -> permute 32x4"); + + let mem = new Int8Array(ins.exports.mem.buffer); + set(mem, 16, iota(16)); + ins.exports.run(); + assertSame(get(mem, 0, 16), rev64x2_pattern); +} + +// In the case of shifts, we have separate tests that constant shifts work +// correctly, so no such testing is done here. + +for ( let lanes of ['i8x16', 'i16x8', 'i32x4', 'i64x2'] ) { + for ( let shift of ['shl', 'shr_s', 'shr_u'] ) { + for ( let [count, result] of [['(i32.const 5)', /shift -> constant shift/], + ['(local.get 1)', /shift -> variable(?: scalarized)? shift/]] ) { + wasmCompile(`(module (func (param v128) (param i32) (result v128) (${lanes}.${shift} (local.get 0) ${count})))`); + assertEq(wasmSimdAnalysis().match(result).length, 1); + } + } +} + +// Zero extending int values. +{ + const zeroExtTypes = [ + {ty: '8x16', size: 1, ch: 'b'}, + {ty: '16x8', size: 2, ch: 'w'}, + {ty: '32x4', size: 4, ch: 'd'}, + {ty: '64x2', size: 8, ch: 'q'}]; + function generateZeroExtend (src, dest, inv) { + const ar = new Array(16); + for (let i = 0, j = 0; i < ar.length; i++) { + if ((i % dest) >= src) { + ar[i] = (inv ? 0 : 16) + (i % 16); + continue; + } + ar[i] = j++ + (inv ? 16 : 0); + } + return ar.join(' '); + } + for (let i = 0; i < 3; i++) { + for (let j = i + 1; j < 4; j++) { + const result = `shuffle -> zero-extend ${zeroExtTypes[i].ty} to ${zeroExtTypes[j].ty}`; + const pat = generateZeroExtend(zeroExtTypes[i].size, zeroExtTypes[j].size, false); + wasmCompile(`(module (func (param v128) (result v128) (i8x16.shuffle ${pat} (local.get 0) (v128.const i32x4 0 0 0 0))))`); + assertEq(wasmSimdAnalysis(), result); + + const patInv = generateZeroExtend(zeroExtTypes[i].size, zeroExtTypes[j].size, true); + wasmCompile(`(module (func (param v128) (result v128) (i8x16.shuffle ${patInv} (v128.const i32x4 0 0 0 0) (local.get 0))))`); + assertEq(wasmSimdAnalysis(), result); + + // Test in wasm by "hidding" zero constant as an argument. + const ins = wasmEvalText(`(module + (func $t (param v128) (result v128) (i8x16.shuffle ${pat} (local.get 0) (v128.const i32x4 0 0 0 0))) + (func $check (param v128) (param v128) (result v128) (i8x16.shuffle ${pat} (local.get 0) (local.get 1))) + (func (export "test") (result i32) + v128.const i32x4 0xff01ee02 0xdd03cc04 0xaa059906 0x88776655 + call $t + v128.const i32x4 0xff01ee02 0xdd03cc04 0xaa059906 0x88776655 + v128.const i32x4 0 0 0 0 + call $check + i8x16.eq + i8x16.bitmask + ))`); + assertEq(ins.exports.test(), 0xffff); + } + } + + // Some patterns that look like zero extend. + for (let pat of ["0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30"]) { + wasmCompile(`(module (func (param v128) (result v128) (i8x16.shuffle ${pat} (local.get 0) (v128.const i32x4 0 0 0 0))))`); + const res = wasmSimdAnalysis(); + assertEq(!res.includes("shuffle -> zero-extend"), true); + } +} + +// Constant folding scalar->simd. There are functional tests for all these in +// ad-hack.js so here we only check that the transformation is triggered. + +for ( let [ty128, ty] of [['i8x16', 'i32'], ['i16x8', 'i32'], ['i32x4', 'i32'], + ['i64x2', 'i64'], ['f32x4', 'f32'], ['f64x2', 'f64']] ) +{ + wasmCompile(`(module (func (result v128) (${ty128}.splat (${ty}.const 37))))`); + assertEq(wasmSimdAnalysis(), "scalar-to-simd128 -> constant folded"); +} + +// Ditto simd->scalar. + +for ( let [ty128, suffix] of [['i8x16', '_s'], ['i8x16', '_u'], ['i16x8','_s'], ['i16x8','_u'], ['i32x4', '']] ) { + for ( let op of ['any_true', 'all_true', 'bitmask', `extract_lane${suffix} 0`] ) { + let operation = op == 'any_true' ? 'v128.any_true' : `${ty128}.${op}`; + wasmCompile(`(module (func (result i32) (${operation} (v128.const i64x2 0 0))))`); + assertEq(wasmSimdAnalysis(), "simd128-to-scalar -> constant folded"); + } +} + +for ( let ty128 of ['f32x4','f64x2','i64x2'] ) { + wasmCompile(`(module (func (result ${ty128.match(/(...)x.*/)[1]}) (${ty128}.extract_lane 0 (v128.const i64x2 0 0))))`); + assertEq(wasmSimdAnalysis(), "simd128-to-scalar -> constant folded"); +} + +// Optimizing all_true, any_true, and bitmask that are used for control flow, also when negated. + +for ( let [ty128,size] of [['i8x16',1], ['i16x8',2], ['i32x4',4]] ) { + let all = iota(16/size).map(n => n*n); + let some = iota(16/size).map(n => n*(n % 3)); + let none = iota(16/size).map(n => 0); + let inputs = [all, some, none]; + let ops = { all_true: allTrue, any_true: anyTrue, bitmask }; + + for ( let op of ['any_true', 'all_true', 'bitmask'] ) { + let folded = op != 'bitmask' || (size == 2 && !isArm64); + let operation = op == 'any_true' ? 'v128.any_true' : `${ty128}.${op}`; + let positive = + wasmCompile( + `(module + (memory (export "mem") 1 1) + (func $f (param v128) (result i32) + (if (result i32) (${operation} (local.get 0)) + (then (i32.const 42)) + (else (i32.const 37)))) + (func (export "run") (result i32) + (call $f (v128.load (i32.const 16)))))`); + assertEq(wasmSimdAnalysis(), folded ? "simd128-to-scalar-and-branch -> folded" : "none"); + + let negative = + wasmCompile( + `(module + (memory (export "mem") 1 1) + (func $f (param v128) (result i32) + (if (result i32) (i32.eqz (${operation} (local.get 0))) + (then (i32.const 42)) + (else (i32.const 37)))) + (func (export "run") (result i32) + (call $f (v128.load (i32.const 16)))))`); + assertEq(wasmSimdAnalysis(), folded ? "simd128-to-scalar-and-branch -> folded" : "none"); + + for ( let inp of inputs ) { + let mem = new this[`Int${8*size}Array`](positive.exports.mem.buffer); + set(mem, 16/size, inp); + assertEq(positive.exports.run(), ops[op](inp) ? 42 : 37); + + mem = new this[`Int${8*size}Array`](negative.exports.mem.buffer); + set(mem, 16/size, inp); + assertEq(negative.exports.run(), ops[op](inp) ? 37 : 42); + } + } +} + +// Constant folding + +{ + // Swizzle-with-constant rewritten as shuffle, and then further optimized + // into a dword permute. Correctness is tested in ad-hack.js. + wasmCompile(` +(module (func (param v128) (result v128) + (i8x16.swizzle (local.get 0) (v128.const i8x16 4 5 6 7 0 1 2 3 12 13 14 15 8 9 10 11)))) +`); + assertEq(wasmSimdAnalysis(), "shuffle -> permute 32x4"); +} + +// Bitselect with constant mask folded into shuffle operation + +if (!isArm64) { + wasmCompile(` + (module (func (param v128) (param v128) (result v128) + (v128.bitselect (local.get 0) (local.get 1) (v128.const i8x16 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 -1 0 0)))) + `); + assertEq(wasmSimdAnalysis(), "shuffle -> blend 8x16"); +} + +// Library + +function wasmCompile(text) { + return new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(text))) +} + +function get(arr, loc, len) { + let res = []; + for ( let i=0; i < len; i++ ) { + res.push(arr[loc+i]); + } + return res; +} + +function set(arr, loc, vals) { + for ( let i=0; i < vals.length; i++ ) { + arr[loc+i] = vals[i]; + } +} + +function i32ToI8(xs) { + return xs.map(x => [x*4, x*4+1, x*4+2, x*4+3]).flat(); +} + +function i64ToI2(xs) { + return xs.map(x => [x*8, x*8+1, x*8+2, x*8+3, + x*8+4, x*8+5, x*8+6, x*8+7]).flat(); +} + +function i16ToI8(xs) { + return xs.map(x => [x*2, x*2+1]).flat(); +} + +function allTrue(xs) { + return xs.every(v => v != 0); +} + +function anyTrue(xs) { + return xs.some(v => v != 0); +} + +function bitmask(xs) { + let shift = 128/xs.length - 1; + let res = 0; + let k = 0; + xs.forEach(v => { res |= ((v >>> shift) & 1) << k; k++; }); + return res; +} diff --git a/js/src/jit-test/tests/wasm/simd/ion-bug1641973.js b/js/src/jit-test/tests/wasm/simd/ion-bug1641973.js new file mode 100644 index 0000000000..7dfdf3afad --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/ion-bug1641973.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// Fuzz test case. The initial unreachable will result in the subsequent +// i8x16.shuffle popping null pointers off the value stack. Due to a missing +// isDeadCode() check in WasmIonCompile.cpp the compiler would dereference those +// null pointers. +new WebAssembly.Module(wasmTextToBinary(` +(module + (func (result v128) + (unreachable) + (i8x16.shuffle 0 0 23 0 4 4 4 4 4 16 1 0 4 4 4 4))) +`)) + diff --git a/js/src/jit-test/tests/wasm/simd/ion-bug1688262.js b/js/src/jit-test/tests/wasm/simd/ion-bug1688262.js new file mode 100644 index 0000000000..ebb2f72864 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/ion-bug1688262.js @@ -0,0 +1,22 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// Shuffle pattern incorrectly recognized as a rotate due to a missing guard in +// the optimizer. + +let ins = wasmEvalText(` + (module + (memory (export "mem") 1) + (func (export "test") + (v128.store (i32.const 0) + (i8x16.shuffle 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 + (v128.load (i32.const 16)) + (v128.const i32x4 0 0 0 0))))) +`); + +let mem = new Int8Array(ins.exports.mem.buffer); +let input = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]; +let output = [10, 11, 12, 13, 14, 15, 16, 17, 18, 10, 11, 12, 13, 14, 15, 16]; +mem.set(input, 16); +ins.exports.test(); +let result = Array.from(mem.subarray(0, 16)); +assertDeepEq(output, result); diff --git a/js/src/jit-test/tests/wasm/simd/ion-bug1688713.js b/js/src/jit-test/tests/wasm/simd/ion-bug1688713.js new file mode 100644 index 0000000000..506615cc6f --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/ion-bug1688713.js @@ -0,0 +1,24 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator") || isAvxPresent(); include:codegen-x64-test.js + +// This checks that we emit a REX prefix that includes the SIB index when +// appropriate. +// +// This test case is a little tricky. On Win64, the arg registers are rcx, rdx, +// r8, r9; so we want to use local 2 or 3 as the index. But on other x64 +// platforms, the arg registers are rdi, rsi, rdx, rcx, r8, r9; so we want to +// use local 4 or 5 as the index. This test uses both, and then looks for a hit +// on the REX byte which must be 0x43. Before the bugfix, since the index +// register was ignored, the byte would always be 0x41, as it will continue to +// be for the access that does not use an extended register. +// +// The test is brittle: the register allocator can easily make a mess of it. +// But for now it works. + +codegenTestX64_adhoc( +`(module + (memory 1) + (func $f (export "f") (param i32) (param i32) (param i32) (param i32) (param i32) (result v128) + (i32x4.add (v128.load8x8_s (local.get 4)) (v128.load8x8_s (local.get 2)))))`, + 'f', + `66 43 0f 38 20 .. .. pmovsxbwq \\(%r15,%r(8|9|10|11|12|13),1\\), %xmm[0-9]+`, + {no_prefix: true, no_suffix: true, log:true}); diff --git a/js/src/jit-test/tests/wasm/simd/js-api.js b/js/src/jit-test/tests/wasm/simd/js-api.js new file mode 100644 index 0000000000..1bea3611ed --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/js-api.js @@ -0,0 +1,130 @@ +// |jit-test| test-also=--no-threads; skip-if: !wasmSimdEnabled() + +// SIMD JS API +// +// As of 31 March 2020 the SIMD spec is very light on information about the JS +// API, and what it has is ridden with misspellings, grammatical errors, and +// apparent redundancies. The rules below represent my best effort at +// understanding the intent of the spec. As far as I can tell, the rules for +// v128 are intended to match the rules for i64 in the Wasm MVP. + +// Hopefully, these are enough to test that various JIT stubs are generated and +// used if we run the tests in a loop. + +setJitCompilerOption("baseline.warmup.trigger", 2); +setJitCompilerOption("ion.warmup.trigger", 4); + +// RULE: v128 cannot cross the JS/wasm boundary as a function parameter. +// +// A wasm function that: +// - takes or returns v128 +// - was imported into wasm +// - is ultimately a JS function +// should always throw TypeError when called from wasm. +// +// Note, JIT exit stubs should be generated here because settings above should +// cause the JIT to tier up. + +var ins = wasmEvalText(` + (module + (import "m" "v128_param" (func $f (param v128))) + (import "m" "v128_return" (func $g (result v128))) + (func (export "v128_param") + (call $f (v128.const i32x4 0 0 0 0))) + (func (export "v128_result") + (drop (call $g))))`, + {m:{v128_param: (x) => 0, + v128_return: () => 0}}); + +function call_v128_param() { ins.exports.v128_param(); } +function call_v128_result() { ins.exports.v128_result(); } + +for ( let i = 0 ; i < 100; i++ ) { + assertErrorMessage(call_v128_param, + TypeError, + /cannot pass.*value.*to or from JS/); + assertErrorMessage(call_v128_result, + TypeError, + /cannot pass.*value.*to or from JS/); +} + +// RULE: v128 cannot cross the JS/wasm boundary as a function parameter. +// +// A wasm function that: +// - takes or returns v128 +// - is exported from wasm +// - is ultimately a true wasm function +// should always throw TypeError when called from JS. +// +// Note, JIT entry stubs should be generated here because settings above should +// cause the JIT to tier up. + +var ins2 = wasmEvalText(` + (module + (func (export "v128_param") (param v128) (result i32) + (i32.const 0)) + (func (export "v128_result") (result v128) + (v128.const i32x4 0 0 0 0)))`); + +function call_v128_param2() { ins2.exports.v128_param(); } +function call_v128_result2() { ins2.exports.v128_result(); } + +for ( let i = 0 ; i < 100; i++ ) { + assertErrorMessage(call_v128_param2, + TypeError, + /cannot pass.*value.*to or from JS/); + assertErrorMessage(call_v128_result2, + TypeError, + /cannot pass.*value.*to or from JS/); +} + +// RULE: The rules about v128 passing into or out of a function apply even when +// an imported JS function is re-exported and is then called. + +var newfn = (x) => x; +var ins = wasmEvalText(` + (module + (import "m" "fn" (func $f (param v128) (result v128))) + (export "newfn" (func $f)))`, + {m:{fn: newfn}}); +assertErrorMessage(() => ins.exports.newfn(3), + TypeError, + /cannot pass.*value.*to or from JS/); + +// RULE: WebAssembly.Global of type v128 is constructable from JS with a default +// value. + + +// RULE: WebAssembly.Global constructor for type v128 is not constructable with +// or without a default value. + +assertErrorMessage(() => new WebAssembly.Global({value: "v128"}, 37), + TypeError, + /cannot pass.*value.*to or from JS/); +assertErrorMessage(() => new WebAssembly.Global({value: "v128"}), + TypeError, + /cannot pass.*value.*to or from JS/); +assertErrorMessage(() => new WebAssembly.Global({value: "v128", mutable: true}), + TypeError, + /cannot pass.*value.*to or from JS/); + +// RULE: WebAssembly.Global of type v128 have getters and setters that throw +// TypeError when called from JS. + +let {gi, gm} = wasmEvalText(` + (module + (global (export "gi") v128 v128.const i64x2 0 0) + (global (export "gm") (mut v128) v128.const i64x2 0 0) + )`).exports; + +assertErrorMessage(() => gi.value, + TypeError, + /cannot pass.*value.*to or from JS/); +assertErrorMessage(() => gi.valueOf(), + TypeError, + /cannot pass.*value.*to or from JS/); +assertErrorMessage(() => gm.value = 0, + TypeError, + /cannot pass.*value.*to or from JS/); + + diff --git a/js/src/jit-test/tests/wasm/simd/neg-abs-not-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/neg-abs-not-x64-ion-codegen.js new file mode 100644 index 0000000000..ba3429236a --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/neg-abs-not-x64-ion-codegen.js @@ -0,0 +1,34 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:codegen-x64-test.js + +// Test that there are no extraneous moves for variable SIMD negate, abs, and +// not instructions. See README-codegen.md for general information about this +// type of test case. + +// Integer negates don't have to reuse the input for the output, and prefer for +// the registers to be different. So use parameter 1 and ignore parameter 0. + +codegenTestX64_IGNOREDxv128_v128( + [['i8x16.neg', ` +66 0f ef c0 pxor %xmm0, %xmm0 +66 0f f8 c1 psubb %xmm1, %xmm0`], + ['i16x8.neg', ` +66 0f ef c0 pxor %xmm0, %xmm0 +66 0f f9 c1 psubw %xmm1, %xmm0`], + ['i32x4.neg', ` +66 0f ef c0 pxor %xmm0, %xmm0 +66 0f fa c1 psubd %xmm1, %xmm0`], + ['i64x2.neg', ` +66 0f ef c0 pxor %xmm0, %xmm0 +66 0f fb c1 psubq %xmm1, %xmm0`]] ); + +// Floating point negate and absolute value, and bitwise not, prefer for the +// registers to be the same and guarantee that no move is inserted if so. + +codegenTestX64_v128_v128( + [['f32x4.neg', `66 0f ef 05 ${RIPRADDR} pxorx ${RIPR}, %xmm0`], + ['f64x2.neg', `66 0f ef 05 ${RIPRADDR} pxorx ${RIPR}, %xmm0`], + ['f32x4.abs', `66 0f db 05 ${RIPRADDR} pandx ${RIPR}, %xmm0`], + ['f64x2.abs', `66 0f db 05 ${RIPRADDR} pandx ${RIPR}, %xmm0`], + ['v128.not', ` +66 45 0f 75 ff pcmpeqw %xmm15, %xmm15 +66 41 0f ef c7 pxor %xmm15, %xmm0`]] ); diff --git a/js/src/jit-test/tests/wasm/simd/pairwise-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/pairwise-x64-ion-codegen.js new file mode 100644 index 0000000000..6d8d995695 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/pairwise-x64-ion-codegen.js @@ -0,0 +1,38 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:codegen-x64-test.js + +// Tests for SIMD add pairwise instructions. + +if (!isAvxPresent()) { + + codegenTestX64_IGNOREDxv128_v128( + [['i16x8.extadd_pairwise_i8x16_s', ` +66 0f 6f 05 ${RIPRADDR} movdqax ${RIPR}, %xmm0 +66 0f 38 04 c1 pmaddubsw %xmm1, %xmm0`], + ['i16x8.extadd_pairwise_i8x16_u', ` +66 0f 6f c1 movdqa %xmm1, %xmm0 +66 0f 38 04 05 ${RIPRADDR} pmaddubswx ${RIPR}, %xmm0`], + ['i32x4.extadd_pairwise_i16x8_s', ` +66 0f 6f c1 movdqa %xmm1, %xmm0 +66 0f f5 05 ${RIPRADDR} pmaddwdx ${RIPR}, %xmm0`], + ['i32x4.extadd_pairwise_i16x8_u', ` +66 0f 6f c1 movdqa %xmm1, %xmm0 +66 0f ef 05 ${RIPRADDR} pxorx ${RIPR}, %xmm0 +66 0f f5 05 ${RIPRADDR} pmaddwdx ${RIPR}, %xmm0 +66 0f fe 05 ${RIPRADDR} padddx ${RIPR}, %xmm0`]]); + +} else { + + codegenTestX64_IGNOREDxv128_v128( + [['i16x8.extadd_pairwise_i8x16_s', ` +66 0f 6f 05 ${RIPRADDR} movdqax ${RIPR}, %xmm0 +66 0f 38 04 c1 pmaddubsw %xmm1, %xmm0`], + ['i16x8.extadd_pairwise_i8x16_u', ` +c4 e2 71 04 05 ${RIPRADDR} vpmaddubswx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.extadd_pairwise_i16x8_s', ` +c5 f1 f5 05 ${RIPRADDR} vpmaddwdx ${RIPR}, %xmm1, %xmm0`], + ['i32x4.extadd_pairwise_i16x8_u', ` +c5 f1 ef 05 ${RIPRADDR} vpxorx ${RIPR}, %xmm1, %xmm0 +66 0f f5 05 ${RIPRADDR} pmaddwdx ${RIPR}, %xmm0 +66 0f fe 05 ${RIPRADDR} padddx ${RIPR}, %xmm0`]]); + +} diff --git a/js/src/jit-test/tests/wasm/simd/pmaddubsw-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/pmaddubsw-x64-ion-codegen.js new file mode 100644 index 0000000000..17125e3dc3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/pmaddubsw-x64-ion-codegen.js @@ -0,0 +1,154 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || wasmCompileMode() != "ion" + +// Testing _mm_maddubs_epi16 / vpmaddubsw behavoir for all platforms. +// +// Bug 1762413 adds specialization for emscripten's pattern to directly +// emit PMADDUBSW machine code. + +const isX64 = getBuildConfiguration("x64") && !getBuildConfiguration("simulator"); + +// Simple test. +const simple = wasmTextToBinary(`(module + (memory (export "memory") 1 1) + (func $_mm_maddubs_epi16 (export "t") (param v128 v128) (result v128) + local.get 1 + i32.const 8 + i16x8.shl + i32.const 8 + i16x8.shr_s + local.get 0 + v128.const i32x4 0x00ff00ff 0x00ff00ff 0x00ff00ff 0x00ff00ff + v128.and + i16x8.mul + local.get 1 + i32.const 8 + i16x8.shr_s + local.get 0 + i32.const 8 + i16x8.shr_u + i16x8.mul + i16x8.add_sat_s) + (func (export "run") + i32.const 0 + v128.const i8x16 0 2 1 2 1 2 -1 1 255 255 255 255 0 0 255 255 + v128.const i8x16 1 0 3 4 -3 -4 -128 127 127 127 -128 -128 0 0 -128 127 + call $_mm_maddubs_epi16 + v128.store + ) +)`); +var ins = new WebAssembly.Instance(new WebAssembly.Module(simple)); +ins.exports.run(); +var mem16 = new Int16Array(ins.exports.memory.buffer, 0, 8); +assertSame(mem16, [0, 11, -11, -32513, 32767, -32768, 0, -255]); + +if (hasDisassembler() && isX64) { + assertEq(wasmDis(ins.exports.t, {tier:"ion", asString:true}).includes('pmaddubsw'), true); +} + +if (hasDisassembler() && isX64) { + // Two pmaddubsw has common operand, and code was optimized. + const realWorldOutput = wasmTextToBinary(`(module + (memory 1 1) + (func (export "test") + (local i32 i32 i32 i32 v128 v128 v128 v128 v128 v128) + local.get 0 + local.get 1 + i32.add + local.set 2 + local.get 0 + i32.const 16 + i32.add + local.set 0 + local.get 3 + local.set 1 + loop + local.get 5 + local.get 0 + v128.load + local.tee 5 + i32.const 7 + i8x16.shr_s + local.tee 8 + local.get 1 + v128.load offset=240 + local.get 5 + v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000 + i8x16.eq + local.tee 7 + v128.andnot + i8x16.add + local.get 8 + v128.xor + local.tee 4 + i32.const 8 + i16x8.shl + i32.const 8 + i16x8.shr_s + local.get 5 + i8x16.abs + local.tee 5 + v128.const i32x4 0x00ff00ff 0x00ff00ff 0x00ff00ff 0x00ff00ff + v128.and + local.tee 9 + i16x8.mul + local.get 4 + i32.const 8 + i16x8.shr_s + local.get 5 + i32.const 8 + i16x8.shr_u + local.tee 4 + i16x8.mul + i16x8.add_sat_s + i16x8.add_sat_s + local.set 5 + + local.get 6 + local.get 8 + local.get 1 + v128.load offset=224 + local.get 7 + v128.andnot + i8x16.add + local.get 8 + v128.xor + local.tee 6 + i32.const 8 + i16x8.shl + i32.const 8 + i16x8.shr_s + local.get 9 + i16x8.mul + local.get 6 + i32.const 8 + i16x8.shr_s + local.get 4 + i16x8.mul + i16x8.add_sat_s + i16x8.add_sat_s + local.set 6 + + local.get 1 + i32.const 128 + i32.add + local.set 1 + local.get 0 + i32.const 16 + i32.add + local.tee 0 + local.get 2 + i32.ne + br_if 0 + end +))`); + + var ins = new WebAssembly.Instance(new WebAssembly.Module(realWorldOutput)); + const output = wasmDis(ins.exports.test, {tier:"ion", asString:true}).replace(/^[0-9a-f]{8} (?:[0-9a-f]{2} )+\n?\s+/gmi, ""); + // Find two pmaddubsw+paddsw. + const re = /\bv?pmaddubsw[^\n]+\nv?paddsw /g; + assertEq(re.exec(output) != null, true); + assertEq(re.exec(output) != null, true); + assertEq(re.exec(output) == null, true); + // No leftover PMULL, PSLLW, or PSRAW. + assertEq(/pmullw|psllw|psraw/.test(output), false); +} diff --git a/js/src/jit-test/tests/wasm/simd/reduce-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/reduce-x64-ion-codegen.js new file mode 100644 index 0000000000..a58af28f48 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/reduce-x64-ion-codegen.js @@ -0,0 +1,46 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator") || isAvxPresent(); include:codegen-x64-test.js + +// Test encoding of the all_true, and any_true operations. + +codegenTestX64_v128_i32( + [['v128.any_true', ` +66 0f 38 17 c0 ptest %xmm0, %xmm0 +0f 95 c0 setnz %al +0f b6 c0 movzx %al, %eax`], + ['i8x16.all_true', ` +66 45 0f ef ff pxor %xmm15, %xmm15 +66 44 0f 74 f8 pcmpeqb %xmm0, %xmm15 +66 45 0f 38 17 ff ptest %xmm15, %xmm15 +0f 94 c0 setz %al +0f b6 c0 movzx %al, %eax`], + ['i16x8.all_true', ` +66 45 0f ef ff pxor %xmm15, %xmm15 +66 44 0f 75 f8 pcmpeqw %xmm0, %xmm15 +66 45 0f 38 17 ff ptest %xmm15, %xmm15 +0f 94 c0 setz %al +0f b6 c0 movzx %al, %eax`], + ['i32x4.all_true', ` +66 45 0f ef ff pxor %xmm15, %xmm15 +66 44 0f 76 f8 pcmpeqd %xmm0, %xmm15 +66 45 0f 38 17 ff ptest %xmm15, %xmm15 +0f 94 c0 setz %al +0f b6 c0 movzx %al, %eax`], + ['i64x2.all_true', ` +66 45 0f ef ff pxor %xmm15, %xmm15 +66 44 0f 38 29 f8 pcmpeqq %xmm0, %xmm15 +66 45 0f 38 17 ff ptest %xmm15, %xmm15 +0f 94 c0 setz %al +0f b6 c0 movzx %al, %eax`]], {} +) + +// Utils. +function codegenTestX64_v128_i32(inputs, options = {}) { + for ( let [op, expected] of inputs ) { + codegenTestX64_adhoc(wrap(options, ` + (func (export "f") (param v128) (result i32) + (${op} (local.get 0)))`), + 'f', + expected, + options); + } + } diff --git a/js/src/jit-test/tests/wasm/simd/select.js b/js/src/jit-test/tests/wasm/simd/select.js new file mode 100644 index 0000000000..b3535d3039 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/select.js @@ -0,0 +1,33 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +wasmAssert(` +(module + (func $f (param i32) (result v128) + (select ;; no type + (v128.const i32x4 1 2 3 4) + (v128.const i32x4 4 3 2 1) + (local.get 0) + ) + ) + (export "" (func 0)) +)`, [ + { type: 'v128', func: '$f', args: ['i32.const 0'], expected: 'i32x4 4 3 2 1' }, + { type: 'v128', func: '$f', args: ['i32.const 1'], expected: 'i32x4 1 2 3 4' }, + { type: 'v128', func: '$f', args: ['i32.const -1'], expected: 'i32x4 1 2 3 4' }, +], {}); + +wasmAssert(` +(module + (func $f (param i32) (result v128) + (select (result v128) + (v128.const i32x4 1 2 3 4) + (v128.const i32x4 4 3 2 1) + (local.get 0) + ) + ) + (export "" (func 0)) +)`, [ + { type: 'v128', func: '$f', args: ['i32.const 0'], expected: 'i32x4 4 3 2 1' }, + { type: 'v128', func: '$f', args: ['i32.const 1'], expected: 'i32x4 1 2 3 4' }, + { type: 'v128', func: '$f', args: ['i32.const -1'], expected: 'i32x4 1 2 3 4' }, +], {}); diff --git a/js/src/jit-test/tests/wasm/simd/shift-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/shift-x64-ion-codegen.js new file mode 100644 index 0000000000..b5b1d00251 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/shift-x64-ion-codegen.js @@ -0,0 +1,26 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:codegen-x64-test.js + +// Test that there are no extraneous moves for a constant integer SIMD shift +// that can reuse its input for its output. See README-codegen.md for general +// information about this type of test case. +// +// There are test cases here for all codegen cases that include a potential move +// to set up the operation, but not for all shift operations in general. + +codegenTestX64_v128xLITERAL_v128( + [['i8x16.shl', '(i32.const 2)', ` +66 0f fc c0 paddb %xmm0, %xmm0 +66 0f fc c0 paddb %xmm0, %xmm0`], + ['i16x8.shl', '(i32.const 2)', `66 0f 71 f0 02 psllw \\$0x02, %xmm0`], + ['i32x4.shl', '(i32.const 2)', `66 0f 72 f0 02 pslld \\$0x02, %xmm0`], + ['i64x2.shl', '(i32.const 2)', `66 0f 73 f0 02 psllq \\$0x02, %xmm0`], + ['i8x16.shr_u', '(i32.const 2)', ` +66 0f db 05 ${RIPRADDR} pandx ${RIPR}, %xmm0 +66 0f 71 d0 02 psrlw \\$0x02, %xmm0`], + ['i16x8.shr_s', '(i32.const 2)', `66 0f 71 e0 02 psraw \\$0x02, %xmm0`], + ['i16x8.shr_u', '(i32.const 2)', `66 0f 71 d0 02 psrlw \\$0x02, %xmm0`], + ['i32x4.shr_s', '(i32.const 2)', `66 0f 72 e0 02 psrad \\$0x02, %xmm0`], + ['i32x4.shr_u', '(i32.const 2)', `66 0f 72 d0 02 psrld \\$0x02, %xmm0`], + ['i64x2.shr_u', '(i32.const 2)', `66 0f 73 d0 02 psrlq \\$0x02, %xmm0`]] ); + + diff --git a/js/src/jit-test/tests/wasm/simd/shuffle-x86-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/shuffle-x86-ion-codegen.js new file mode 100644 index 0000000000..1d0d6ea97f --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/shuffle-x86-ion-codegen.js @@ -0,0 +1,88 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator") || isAvxPresent(); include:codegen-x64-test.js + +// Test that there are no extraneous moves or fixups for SIMD shuffle +// operations. See README-codegen.md for general information about this type of +// test case. + +codegenTestX64_v128xv128_v128([ + // Identity op on first argument should generate no code + ['i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15', + ''], + + // Identity op on second argument should generate a move + ['i8x16.shuffle 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31', + `66 0f 6f c1 movdqa %xmm1, %xmm0`], + + // Broadcast a byte from first argument + ['i8x16.shuffle 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5', + ` +66 0f 60 c0 punpcklbw %xmm0, %xmm0 +f3 0f 70 c0 55 pshufhw \\$0x55, %xmm0, %xmm0 +66 0f 70 c0 aa pshufd \\$0xAA, %xmm0, %xmm0`], + + // Broadcast a word from first argument + ['i8x16.shuffle 4 5 4 5 4 5 4 5 4 5 4 5 4 5 4 5', + ` +f2 0f 70 c0 aa pshuflw \\$0xAA, %xmm0, %xmm0 +66 0f 70 c0 00 pshufd \\$0x00, %xmm0, %xmm0`], + + // Permute bytes + ['i8x16.shuffle 2 1 4 3 6 5 8 7 10 9 12 11 14 13 0 15', +` +66 0f 38 00 05 ${RIPRADDR} pshufbx ${RIPR}, %xmm0`], + + // Permute words + ['i8x16.shuffle 2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13', +` +f2 0f 70 c0 b1 pshuflw \\$0xB1, %xmm0, %xmm0 +f3 0f 70 c0 b1 pshufhw \\$0xB1, %xmm0, %xmm0`], + + // Permute doublewords + ['i8x16.shuffle 4 5 6 7 0 1 2 3 12 13 14 15 8 9 10 11', + `66 0f 70 c0 b1 pshufd \\$0xB1, %xmm0, %xmm0`], + + // Rotate right + ['i8x16.shuffle 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12', + `66 0f 3a 0f c0 0d palignr \\$0x0D, %xmm0, %xmm0`], + + // General shuffle + blend. The initial movdqa to scratch is unavoidable + // unless we can convince the compiler that it's OK to destroy xmm1. + ['i8x16.shuffle 15 29 0 1 2 1 2 0 3 4 7 8 16 8 17 9', +` +66 44 0f 6f f9 movdqa %xmm1, %xmm15 +66 44 0f 38 00 3d ${RIPRADDR} pshufbx ${RIPR}, %xmm15 +66 0f 38 00 05 ${RIPRADDR} pshufbx ${RIPR}, %xmm0 +66 41 0f eb c7 por %xmm15, %xmm0`]]); + +codegenTestX64_v128xLITERAL_v128( + [// Shift left bytes, shifting in zeroes + // + // Remember the low-order bytes are at the "right" end + // + // The pxor is a code generation bug: the operand is unused, and no + // code should need to be generated for it, and no register should + // be allocated to it. The lowering does not use that operand, but + // code generation still touches it. + ['i8x16.shuffle 16 16 16 0 1 2 3 4 5 6 7 8 9 10 11 12', + '(v128.const i32x4 0 0 0 0)', +` +66 0f 73 f8 03 pslldq \\$0x03, %xmm0`], + + // Shift right bytes, shifting in zeroes. See above. + ['i8x16.shuffle 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18', + '(v128.const i32x4 0 0 0 0)', +` +66 0f 73 d8 03 psrldq \\$0x03, %xmm0`]]); + +// SSE4.1 PBLENDVB instruction is using XMM0, checking if blend +// operation generated as expected. +codegenTestX64_adhoc( + `(func (export "f") (param v128 v128 v128 v128) (result v128) + (i8x16.shuffle 0 17 2 3 4 5 6 7 24 25 26 11 12 13 30 15 + (local.get 2)(local.get 3)))`, + 'f', +` +66 0f 6f ca movdqa %xmm2, %xmm1 +66 0f 6f 05 ${RIPRADDR} movdqax ${RIPR}, %xmm0 +66 0f 38 10 cb pblendvb %xmm3, %xmm1 +66 0f 6f c1 movdqa %xmm1, %xmm0`); diff --git a/js/src/jit-test/tests/wasm/simd/simd-partial-oob-store.js b/js/src/jit-test/tests/wasm/simd/simd-partial-oob-store.js new file mode 100644 index 0000000000..94a9034848 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/simd-partial-oob-store.js @@ -0,0 +1,39 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +// Cloned from ad-hack.js but kept separate because it may have to be disabled +// on some devices until bugs are fixed. + +// Bug 1666747 - partially OOB stores are not handled correctly on ARM and ARM64. +// The simulators don't implement the correct semantics anyhow, so when the bug +// is fixed in the code generator they must remain excluded here. +if (getBuildConfiguration("arm64") || getBuildConfiguration("arm64-simulator") || + getBuildConfiguration("arm") || getBuildConfiguration("arm-simulator")) { + quit(0); +} + +function get(arr, loc, len) { + let res = []; + for ( let i=0; i < len; i++ ) { + res.push(arr[loc+i]); + } + return res; +} + +for ( let offset of iota(16) ) { + var ins = wasmEvalText(` + (module + (memory (export "mem") 1 1) + (func (export "f") (param $loc i32) + (v128.store offset=${offset} (local.get $loc) (v128.const i32x4 ${1+offset} 2 3 ${4+offset*2}))))`); + + // OOB write should trap + assertErrorMessage(() => ins.exports.f(65536-15), + WebAssembly.RuntimeError, + /index out of bounds/) + + // Ensure that OOB writes don't write anything. + let start = 65536 - 15 + offset; + let legalBytes = 65536 - start; + var mem8 = new Uint8Array(ins.exports.mem.buffer); + assertSame(get(mem8, start, legalBytes), iota(legalBytes).map((_) => 0)); +} diff --git a/js/src/jit-test/tests/wasm/simd/splat-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/splat-x64-ion-codegen.js new file mode 100644 index 0000000000..27393d756e --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/splat-x64-ion-codegen.js @@ -0,0 +1,29 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator") || isAvxPresent(); include:codegen-x64-test.js + +// Test that there are no extraneous moves or other instructions for splat and +// other splat-like operations that can reuse its input for its output and/or +// has a specializable code path. See README-codegen.md for general information +// about this type of test case. + +codegenTestX64_PTYPE_v128( + [['f32x4.splat', 'f32', `0f c6 c0 00 shufps \\$0x00, %xmm0, %xmm0`], + ['f64x2.splat', 'f64', `f2 0f 12 c0 movddup %xmm0, %xmm0`]] , {log:true}); + +// Skip these on Win64 because the ABI differs and there's a different parameter +// register, this changes not just the name slightly but the binary encoding in +// larger ways. + +if (!getBuildConfiguration("windows")) { + codegenTestX64_PTYPE_v128( + [['v128.load32_splat', 'i32', ` +f3 41 0f 10 04 3f movssl \\(%r15,%rdi,1\\), %xmm0 +0f c6 c0 00 shufps \\$0x00, %xmm0, %xmm0`], + ['v128.load64_splat', 'i32', `f2 41 0f 12 04 3f movddupq \\(%r15,%rdi,1\\), %xmm0`], + ['v128.load8x8_s', 'i32', `66 41 0f 38 20 04 3f pmovsxbwq \\(%r15,%rdi,1\\), %xmm0`], + ['v128.load8x8_u', 'i32', `66 41 0f 38 30 04 3f pmovzxbwq \\(%r15,%rdi,1\\), %xmm0`], + ['v128.load16x4_s', 'i32', `66 41 0f 38 23 04 3f pmovsxwdq \\(%r15,%rdi,1\\), %xmm0`], + ['v128.load16x4_u', 'i32', `66 41 0f 38 33 04 3f pmovzxwdq \\(%r15,%rdi,1\\), %xmm0`], + ['v128.load32x2_s', 'i32', `66 41 0f 38 25 04 3f pmovsxdqq \\(%r15,%rdi,1\\), %xmm0`], + ['v128.load32x2_u', 'i32', `66 41 0f 38 35 04 3f pmovzxdqq \\(%r15,%rdi,1\\), %xmm0`]], + {memory:1}); +} diff --git a/js/src/jit-test/tests/wasm/simd/validation.js b/js/src/jit-test/tests/wasm/simd/validation.js new file mode 100644 index 0000000000..46b8df620f --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/validation.js @@ -0,0 +1,368 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +function testValid(code) { + assertEq(WebAssembly.validate(wasmTextToBinary(code)), true); +} + +function testInvalid(code) { + assertEq(WebAssembly.validate(wasmTextToBinary(code)), false); +} + +// v128 -> v128 + +for (let op of [ + 'i8x16.neg', + 'i8x16.abs', + 'i16x8.neg', + 'i16x8.abs', + 'i16x8.extend_low_i8x16_s', + 'i16x8.extend_high_i8x16_s', + 'i16x8.extend_low_i8x16_u', + 'i16x8.extend_high_i8x16_u', + 'i32x4.neg', + 'i32x4.abs', + 'i32x4.extend_low_i16x8_s', + 'i32x4.extend_high_i16x8_s', + 'i32x4.extend_low_i16x8_u', + 'i32x4.extend_high_i16x8_u', + 'i32x4.trunc_sat_f32x4_s', + 'i32x4.trunc_sat_f32x4_u', + 'i64x2.neg', + 'f32x4.abs', + 'f32x4.neg', + 'f32x4.sqrt', + 'f32x4.convert_i32x4_s', + 'f32x4.convert_i32x4_s', + 'f64x2.abs', + 'f64x2.neg', + 'f64x2.sqrt', + 'v128.not']) +{ + testValid(`(module + (func (param v128) (result v128) + (${op} (local.get 0))))`); +} + +for (let [prefix, result, suffix] of [['i8x16', 'i32', '_s'], + ['i8x16', 'i32', '_u'], + ['i16x8', 'i32', '_s'], + ['i16x8', 'i32', '_u'], + ['i32x4', 'i32', ''], + ['i64x2', 'i64', ''], + ['f32x4', 'f32', ''], + ['f64x2', 'f64', '']]) +{ + testValid(`(module + (func (param v128) (result ${result}) + (${prefix}.extract_lane${suffix} 1 (local.get 0))))`); +} + +// The wat parser accepts small out-of-range lane indices, but they must be +// caught in validation. + +testInvalid( + `(module + (func (param v128) (result i32) + (i8x16.extract_lane_u 16 (local.get 0))))`); + +// (v128, v128) -> v128 + +for (let op of [ + 'i8x16.eq', + 'i8x16.ne', + 'i8x16.lt_s', + 'i8x16.lt_u', + 'i8x16.gt_s', + 'i8x16.gt_u', + 'i8x16.le_s', + 'i8x16.le_u', + 'i8x16.ge_s', + 'i8x16.ge_u', + 'i16x8.eq', + 'i16x8.ne', + 'i16x8.lt_s', + 'i16x8.lt_u', + 'i16x8.gt_s', + 'i16x8.gt_u', + 'i16x8.le_s', + 'i16x8.le_u', + 'i16x8.ge_s', + 'i16x8.ge_u', + 'i32x4.eq', + 'i32x4.ne', + 'i32x4.lt_s', + 'i32x4.lt_u', + 'i32x4.gt_s', + 'i32x4.gt_u', + 'i32x4.le_s', + 'i32x4.le_u', + 'i32x4.ge_s', + 'i32x4.ge_u', + 'f32x4.eq', + 'f32x4.ne', + 'f32x4.lt', + 'f32x4.gt', + 'f32x4.le', + 'f32x4.ge', + 'f64x2.eq', + 'f64x2.ne', + 'f64x2.lt', + 'f64x2.gt', + 'f64x2.le', + 'f64x2.ge', + 'v128.and', + 'v128.or', + 'v128.xor', + 'v128.andnot', + 'i8x16.avgr_u', + 'i16x8.avgr_u', + 'i8x16.add', + 'i8x16.add_sat_s', + 'i8x16.add_sat_u', + 'i8x16.sub', + 'i8x16.sub_sat_s', + 'i8x16.sub_sat_u', + 'i8x16.min_s', + 'i8x16.max_s', + 'i8x16.min_u', + 'i8x16.max_u', + 'i16x8.add', + 'i16x8.add_sat_s', + 'i16x8.add_sat_u', + 'i16x8.sub', + 'i16x8.sub_sat_s', + 'i16x8.sub_sat_u', + 'i16x8.mul', + 'i16x8.min_s', + 'i16x8.max_s', + 'i16x8.min_u', + 'i16x8.max_u', + 'i32x4.add', + 'i32x4.sub', + 'i32x4.mul', + 'i32x4.min_s', + 'i32x4.max_s', + 'i32x4.min_u', + 'i32x4.max_u', + 'i64x2.add', + 'i64x2.sub', + 'i64x2.mul', + 'f32x4.add', + 'f32x4.sub', + 'f32x4.mul', + 'f32x4.div', + 'f32x4.min', + 'f32x4.max', + 'f64x2.add', + 'f64x2.sub', + 'f64x2.mul', + 'f64x2.div', + 'f64x2.min', + 'f64x2.max', + 'i8x16.narrow_i16x8_s', + 'i8x16.narrow_i16x8_u', + 'i16x8.narrow_i32x4_s', + 'i16x8.narrow_i32x4_u', + 'i8x16.swizzle']) +{ + testValid(`(module + (func (param v128) (param v128) (result v128) + (${op} (local.get 0) (local.get 1))))`); +} + +testValid(`(module + (func (param v128) (param v128) (result v128) + (i8x16.shuffle 0 16 1 17 2 18 3 19 4 20 5 21 6 22 7 23 (local.get 0) (local.get 1))))`); + +assertErrorMessage(() => testValid( + `(module + (func (param v128) (param v128) (result v128) + (i8x16.shuffle 0 16 1 17 2 18 3 19 4 20 5 21 6 22 7 (local.get 0) (local.get 1))))`), + SyntaxError, + /expected a u8/); + +// (v128, i32) -> v128 + +for (let op of [ + 'i8x16.shl', + 'i8x16.shr_s', + 'i8x16.shr_u', + 'i16x8.shl', + 'i16x8.shr_s', + 'i16x8.shr_u', + 'i32x4.shl', + 'i32x4.shr_s', + 'i32x4.shr_u', + 'i64x2.shl', + 'i64x2.shr_s', + 'i64x2.shr_u']) +{ + testValid(`(module + (func (param v128) (param i32) (result v128) + (${op} (local.get 0) (local.get 1))))`); +} + +// v128 -> i32 + +for (let op of [ + 'v128.any_true', + 'i8x16.all_true', + 'i16x8.all_true', + 'i32x4.all_true', + 'i8x16.bitmask', + 'i16x8.bitmask', + 'i32x4.bitmask']) +{ + testValid(`(module + (func (param v128) (result i32) + (${op} (local.get 0))))`); +} + +// T -> V128 + +for (let [op, input] of [ + ['i8x16.splat', 'i32'], + ['i16x8.splat', 'i32'], + ['i32x4.splat', 'i32'], + ['i64x2.splat', 'i64'], + ['f32x4.splat', 'f32'], + ['f64x2.splat', 'f64']]) +{ + testValid(`(module + (func (param ${input}) (result v128) + (${op} (local.get 0))))`); +} + +// i32 -> v128 + +for (let op of [ + 'v128.load', + 'v128.load8_splat', + 'v128.load16_splat', + 'v128.load32_splat', + 'v128.load64_splat', + 'v128.load8x8_s', + 'v128.load8x8_u', + 'v128.load16x4_s', + 'v128.load16x4_u', + 'v128.load32x2_s', + 'v128.load32x2_u']) +{ + testValid(`(module + (memory 1 1) + (func (param i32) (result v128) + (${op} (local.get 0))))`); +} + +testValid(`(module + (func (result v128) + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)) + (func (result v128) + (v128.const i16x8 0 1 2 3 4 5 6 7)) + (func (result v128) + (v128.const i32x4 0 1 2 3)) + (func (result v128) + (v128.const i64x2 0 1)) + (func (result v128) + (v128.const f32x4 0 1 2 3)) + (func (result v128) + (v128.const f32x4 0.5 1.5 2.5 3.5)) + (func (result v128) + (v128.const f64x2 0 1)) + (func (result v128) + (v128.const f64x2 0.5 1.5)))`); + +assertErrorMessage(() => testValid( + `(module + (func (result v128) + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14)))`), + SyntaxError, + /expected a i8/); + +assertErrorMessage(() => testValid( + `(module + (func (result v128) + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 256 15)))`), + SyntaxError, + /invalid i8 number/); + +assertErrorMessage(() => testValid( + `(module + (func (result v128) + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 3.14 15)))`), + SyntaxError, + /expected a i8/); + +assertErrorMessage(() => testValid( + `(module + (func (result v128) + (v128.const f32x4 0.5 1.5 2.5))`), + SyntaxError, + /expected a float/); + +assertErrorMessage(() => testValid( + `(module + (func (result v128) + (v128.const i8x8 0 1 2 3 4 5 6 7)))`), + SyntaxError, + /expected one of/); + +// v128 -> () + +testValid(`(module + (memory 1 1) + (func (param i32) (param v128) + (v128.store (local.get 0) (local.get 1))))`); + +// (v128, v128, v128) -> v128 + +testValid(`(module + (func (param v128) (param v128) (param v128) (result v128) + (v128.bitselect (local.get 0) (local.get 1) (local.get 2))))`); + +// (v128, t) -> v128 + +for (let [prefix, input] of [['i8x16', 'i32'], + ['i16x8', 'i32'], + ['i32x4', 'i32'], + ['i64x2', 'i64'], + ['f32x4', 'f32'], + ['f64x2', 'f64']]) +{ + testValid(`(module + (func (param v128) (param ${input}) (result v128) + (${prefix}.replace_lane 1 (local.get 0) (local.get 1))))`); +} + +testInvalid( + `(module + (func (param v128) (param i32) (result v128) + (i8x16.replace_lane 16 (local.get 0) (local.get 1))))`); + +// Global variables + +testValid(`(module + (global $g (mut v128) (v128.const f32x4 1 2 3 4)))`); + +testValid(`(module + (global $g (import "m" "g") v128) + (global $h (mut v128) (global.get $g)))`); + +testValid(`(module + (global $g (export "g") v128 (v128.const f32x4 1 2 3 4)))`); + +testValid(`(module + (global $g (export "g") (mut v128) (v128.const f32x4 1 2 3 4)))`); + +// Imports, exports, calls + +testValid(`(module + (import "m" "g" (func (param v128) (result v128))) + (func (export "f") (param v128) (result v128) + (f64x2.add (local.get 0) (v128.const f64x2 1 2))))`); + +testValid(`(module + (func $f (param v128) (result v128) + (i8x16.neg (local.get 0))) + (func $g (export "g") (param v128) (result v128) + (call $f (local.get 0))))`); diff --git a/js/src/jit-test/tests/wasm/single-cpu.js b/js/src/jit-test/tests/wasm/single-cpu.js new file mode 100644 index 0000000000..afc4beee84 --- /dev/null +++ b/js/src/jit-test/tests/wasm/single-cpu.js @@ -0,0 +1,23 @@ +// |jit-test| --test-wasm-await-tier2; --cpu-count=1 + +// Test that compilation works when there's only one core available. + +// This is fac-opt from fac.wast in the official testsuite, changed to use +// i32 instead of i64. +assertEq(wasmEvalText(`(module + (func $fac-opt (param i32) (result i32) + (local i32) + (local.set 1 (i32.const 1)) + (block + (br_if 0 (i32.lt_s (local.get 0) (i32.const 2))) + (loop + (local.set 1 (i32.mul (local.get 1) (local.get 0))) + (local.set 0 (i32.add (local.get 0) (i32.const -1))) + (br_if 0 (i32.gt_s (local.get 0) (i32.const 1))) + ) + ) + (local.get 1) + ) + + (export "" (func 0)) +)`).exports[""](10), 3628800); diff --git a/js/src/jit-test/tests/wasm/spec/README.md b/js/src/jit-test/tests/wasm/spec/README.md new file mode 100644 index 0000000000..bc1e89348e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/README.md @@ -0,0 +1,5 @@ +# Wasm Spec Tests + +These tests are autogenerated using a tool, do not edit. + +See `jit-test/etc/wasm/` for more information. diff --git a/js/src/jit-test/tests/wasm/spec/exception-handling/directives.txt b/js/src/jit-test/tests/wasm/spec/exception-handling/directives.txt new file mode 100644 index 0000000000..51f58354cb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/exception-handling/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-exceptions; --wasm-exnref; skip-if: !wasmExceptionsEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/exception-handling/harness/directives.txt b/js/src/jit-test/tests/wasm/spec/exception-handling/harness/directives.txt new file mode 100644 index 0000000000..d41243abbb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/exception-handling/harness/directives.txt @@ -0,0 +1 @@ +|jit-test| skip-if: true \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/exception-handling/harness/harness.js b/js/src/jit-test/tests/wasm/spec/exception-handling/harness/harness.js new file mode 100644 index 0000000000..a96781e8ed --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/exception-handling/harness/harness.js @@ -0,0 +1,448 @@ +"use strict"; + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +if (!wasmIsSupported()) { + quit(); +} + +function bytes(type, bytes) { + var typedBuffer = new Uint8Array(bytes); + return wasmGlobalFromArrayBuffer(type, typedBuffer.buffer); +} +function value(type, value) { + return new WebAssembly.Global({ + value: type, + mutable: false, + }, value); +} + +function i8x16(elements) { + let typedBuffer = new Uint8Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i16x8(elements) { + let typedBuffer = new Uint16Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i32x4(elements) { + let typedBuffer = new Uint32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i64x2(elements) { + let typedBuffer = new BigUint64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f32x4(elements) { + let typedBuffer = new Float32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f64x2(elements) { + let typedBuffer = new Float64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} + +function either(...arr) { + return new EitherVariants(arr); +} + +class F32x4Pattern { + constructor(x, y, z, w) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } +} + +class F64x2Pattern { + constructor(x, y) { + this.x = x; + this.y = y; + } +} + +class RefWithType { + constructor(type) { + this.type = type; + } + + formatExpected() { + return `RefWithType(${this.type})`; + } + + test(refGlobal) { + try { + new WebAssembly.Global({value: this.type}, refGlobal.value); + return true; + } catch (err) { + assertEq(err instanceof TypeError, true, `wrong type of error when creating global: ${err}`); + assertEq(!!err.message.match(/can only pass/), true, `wrong type of error when creating global: ${err}`); + return false; + } + } +} + +// ref.extern values created by spec tests will be JS objects of the form +// { [externsym]: }. Other externref values are possible to observe +// if extern.convert_any is used. +let externsym = Symbol("externref"); +function externref(s) { + return { [externsym]: s }; +} +function is_externref(x) { + return (x !== null && externsym in x) ? 1 : 0; +} +function is_funcref(x) { + return typeof x === "function" ? 1 : 0; +} +function eq_externref(x, y) { + return x === y ? 1 : 0; +} +function eq_funcref(x, y) { + return x === y ? 1 : 0; +} + +class ExternRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.extern ${this.n}`; + } + + test(global) { + // the global's value can either be an externref or just a plain old JS number + let result = global.value; + if (typeof global.value === "object" && externsym in global.value) { + result = global.value[externsym]; + } + return result === this.n; + } +} + +// ref.host values created by spectests will be whatever the JS API does to +// convert the given value to anyref. It should implicitly be like any.convert_extern. +function hostref(v) { + if (!wasmGcEnabled()) { + throw new Error("ref.host only works when wasm GC is enabled"); + } + + const { internalizeNum } = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(`(module + (func (import "test" "coerce") (param i32) (result anyref)) + (func (export "internalizeNum") (param i32) (result anyref) + (call 0 (local.get 0)) + ) + )`)), + { "test": { "coerce": x => x } }, + ).exports; + return internalizeNum(v); +} + +class HostRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.host ${this.n}`; + } + + test(externrefGlobal) { + assertEq(externsym in externrefGlobal.value, true, `HostRefResult only works with externref inputs`); + return externrefGlobal.value[externsym] === this.n; + } +} + +let spectest = { + externref: externref, + is_externref: is_externref, + is_funcref: is_funcref, + eq_externref: eq_externref, + eq_funcref: eq_funcref, + print: console.log.bind(console), + print_i32: console.log.bind(console), + print_i32_f32: console.log.bind(console), + print_f64_f64: console.log.bind(console), + print_f32: console.log.bind(console), + print_f64: console.log.bind(console), + global_i32: 666, + global_i64: 666n, + global_f32: 666, + global_f64: 666, + table: new WebAssembly.Table({ + initial: 10, + maximum: 20, + element: "anyfunc", + }), + memory: new WebAssembly.Memory({ initial: 1, maximum: 2 }), +}; + +let linkage = { + spectest, +}; + +function getInstance(instanceish) { + if (typeof instanceish === "string") { + assertEq( + instanceish in linkage, + true, + `'${instanceish}'' must be registered`, + ); + return linkage[instanceish]; + } + return instanceish; +} + +function instantiate(source) { + let bytecode = wasmTextToBinary(source); + let module = new WebAssembly.Module(bytecode); + let instance = new WebAssembly.Instance(module, linkage); + return instance.exports; +} + +function register(instanceish, name) { + linkage[name] = getInstance(instanceish); +} + +function invoke(instanceish, field, params) { + let func = getInstance(instanceish)[field]; + assertEq(func instanceof Function, true, "expected a function"); + return wasmLosslessInvoke(func, ...params); +} + +function get(instanceish, field) { + let global = getInstance(instanceish)[field]; + assertEq( + global instanceof WebAssembly.Global, + true, + "expected a WebAssembly.Global", + ); + return global; +} + +function assert_trap(thunk, message) { + try { + thunk(); + throw new Error("expected trap"); + } catch (err) { + if (err instanceof WebAssembly.RuntimeError) { + return; + } + throw err; + } +} + +let StackOverflow; +try { + (function f() { + 1 + f(); + })(); +} catch (e) { + StackOverflow = e.constructor; +} +function assert_exhaustion(thunk, message) { + try { + thunk(); + assertEq("normal return", "exhaustion"); + } catch (err) { + assertEq( + err instanceof StackOverflow, + true, + "expected exhaustion", + ); + } +} + +function assert_invalid(thunk, message) { + try { + thunk(); + assertEq("valid module", "invalid module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an invalid module", + ); + } +} + +function assert_unlinkable(thunk, message) { + try { + thunk(); + assertEq(true, false, "expected an unlinkable module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an unlinkable module", + ); + } +} + +function assert_malformed(thunk, message) { + try { + thunk(); + assertEq("valid module", "malformed module"); + } catch (err) { + assertEq( + err instanceof TypeError || + err instanceof SyntaxError || + err instanceof WebAssembly.CompileError || + err instanceof WebAssembly.LinkError, + true, + `expected a malformed module`, + ); + } +} + +function assert_exception(thunk) { + let thrown = false; + try { + thunk(); + } catch (err) { + thrown = true; + } + assertEq(thrown, true, "expected an exception to be thrown"); +} + +function assert_return(thunk, expected) { + let results = thunk(); + + if (results === undefined) { + results = []; + } else if (!Array.isArray(results)) { + results = [results]; + } + if (!Array.isArray(expected)) { + expected = [expected]; + } + + if (!compareResults(results, expected)) { + let got = results.map((x) => formatResult(x)).join(", "); + let wanted = expected.map((x) => formatExpected(x)).join(", "); + assertEq( + `[${got}]`, + `[${wanted}]`, + ); + assertEq(true, false, `${got} !== ${wanted}`); + } +} + +function formatResult(result) { + if (typeof (result) === "object") { + return wasmGlobalToString(result); + } else { + return `${result}`; + } +} + +function formatExpected(expected) { + if ( + expected === `f32_canonical_nan` || + expected === `f32_arithmetic_nan` || + expected === `f64_canonical_nan` || + expected === `f64_arithmetic_nan` + ) { + return expected; + } else if (expected instanceof F32x4Pattern) { + return `f32x4(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + }, ${formatExpected(expected.z)}, ${formatExpected(expected.w)})`; + } else if (expected instanceof F64x2Pattern) { + return `f64x2(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + })`; + } else if (expected instanceof EitherVariants) { + return expected.formatExpected(); + } else if (expected instanceof RefWithType) { + return expected.formatExpected(); + } else if (expected instanceof ExternRefResult) { + return expected.formatExpected(); + } else if (expected instanceof HostRefResult) { + return expected.formatExpected(); + } else if (typeof (expected) === "object") { + return wasmGlobalToString(expected); + } else { + throw new Error("unknown expected result"); + } +} + +class EitherVariants { + constructor(arr) { + this.arr = arr; + } + matches(v) { + return this.arr.some((e) => compareResult(v, e)); + } + formatExpected() { + return `either(${this.arr.map(formatExpected).join(", ")})`; + } +} + +function compareResults(results, expected) { + if (results.length !== expected.length) { + return false; + } + for (let i in results) { + if (expected[i] instanceof EitherVariants) { + return expected[i].matches(results[i]); + } + if (!compareResult(results[i], expected[i])) { + return false; + } + } + return true; +} + +function compareResult(result, expected) { + if ( + expected === `canonical_nan` || + expected === `arithmetic_nan` + ) { + return wasmGlobalIsNaN(result, expected); + } else if (expected === null) { + return result.value === null; + } else if (expected instanceof F32x4Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f32x4", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 1), expected.y) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 2), expected.z) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 3), expected.w); + } else if (expected instanceof F64x2Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f64x2", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f64x2", 1), expected.y); + } else if (expected instanceof RefWithType) { + return expected.test(result); + } else if (expected instanceof ExternRefResult) { + return expected.test(result); + } else if (expected instanceof HostRefResult) { + return expected.test(result); + } else if (typeof (expected) === "object") { + return wasmGlobalsEqual(result, expected); + } else { + throw new Error("unknown expected result"); + } +} diff --git a/js/src/jit-test/tests/wasm/spec/exception-handling/tag.wast.js b/js/src/jit-test/tests/wasm/spec/exception-handling/tag.wast.js new file mode 100644 index 0000000000..70e75a12d1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/exception-handling/tag.wast.js @@ -0,0 +1,40 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/tag.wast + +// ./test/core/tag.wast:3 +let $0 = instantiate(`(module + (tag) + (tag (param i32)) + (tag (export "t2") (param i32)) + (tag $$t3 (param i32 f32)) + (export "t3" (tag 3)) +)`); + +// ./test/core/tag.wast:11 +register($0, `test`); + +// ./test/core/tag.wast:13 +let $1 = instantiate(`(module + (tag $$t0 (import "test" "t2") (param i32)) + (import "test" "t3" (tag $$t1 (param i32 f32))) +)`); + +// ./test/core/tag.wast:18 +assert_invalid( + () => instantiate(`(module (tag (result i32)))`), + `non-empty tag result type`, +); diff --git a/js/src/jit-test/tests/wasm/spec/exception-handling/throw.wast.js b/js/src/jit-test/tests/wasm/spec/exception-handling/throw.wast.js new file mode 100644 index 0000000000..2bb83c6ef0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/exception-handling/throw.wast.js @@ -0,0 +1,94 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/throw.wast + +// ./test/core/throw.wast:3 +let $0 = instantiate(`(module + (tag $$e0) + (tag $$e-i32 (param i32)) + (tag $$e-f32 (param f32)) + (tag $$e-i64 (param i64)) + (tag $$e-f64 (param f64)) + (tag $$e-i32-i32 (param i32 i32)) + + (func $$throw-if (export "throw-if") (param i32) (result i32) + (local.get 0) + (i32.const 0) (if (i32.ne) (then (throw $$e0))) + (i32.const 0) + ) + + (func (export "throw-param-f32") (param f32) (local.get 0) (throw $$e-f32)) + + (func (export "throw-param-i64") (param i64) (local.get 0) (throw $$e-i64)) + + (func (export "throw-param-f64") (param f64) (local.get 0) (throw $$e-f64)) + + (func (export "throw-polymorphic") (throw $$e0) (throw $$e-i32)) + + (func (export "throw-polymorphic-block") (block (result i32) (throw $$e0)) (throw $$e-i32)) + + (func $$throw-1-2 (i32.const 1) (i32.const 2) (throw $$e-i32-i32)) + (func (export "test-throw-1-2") + (block $$h (result i32 i32) + (try_table (catch $$e-i32-i32 $$h) (call $$throw-1-2)) + (return) + ) + (if (i32.ne (i32.const 2)) (then (unreachable))) + (if (i32.ne (i32.const 1)) (then (unreachable))) + ) +)`); + +// ./test/core/throw.wast:38 +assert_return(() => invoke($0, `throw-if`, [0]), [value("i32", 0)]); + +// ./test/core/throw.wast:39 +assert_exception(() => invoke($0, `throw-if`, [10])); + +// ./test/core/throw.wast:40 +assert_exception(() => invoke($0, `throw-if`, [-1])); + +// ./test/core/throw.wast:42 +assert_exception(() => invoke($0, `throw-param-f32`, [value("f32", 5)])); + +// ./test/core/throw.wast:43 +assert_exception(() => invoke($0, `throw-param-i64`, [5n])); + +// ./test/core/throw.wast:44 +assert_exception(() => invoke($0, `throw-param-f64`, [value("f64", 5)])); + +// ./test/core/throw.wast:46 +assert_exception(() => invoke($0, `throw-polymorphic`, [])); + +// ./test/core/throw.wast:47 +assert_exception(() => invoke($0, `throw-polymorphic-block`, [])); + +// ./test/core/throw.wast:49 +assert_return(() => invoke($0, `test-throw-1-2`, []), []); + +// ./test/core/throw.wast:51 +assert_invalid(() => instantiate(`(module (func (throw 0)))`), `unknown tag 0`); + +// ./test/core/throw.wast:52 +assert_invalid( + () => instantiate(`(module (tag (param i32)) (func (throw 0)))`), + `type mismatch: instruction requires [i32] but stack has []`, +); + +// ./test/core/throw.wast:54 +assert_invalid( + () => instantiate(`(module (tag (param i32)) (func (i64.const 5) (throw 0)))`), + `type mismatch: instruction requires [i32] but stack has [i64]`, +); diff --git a/js/src/jit-test/tests/wasm/spec/exception-handling/throw_ref.wast.js b/js/src/jit-test/tests/wasm/spec/exception-handling/throw_ref.wast.js new file mode 100644 index 0000000000..50b7b49837 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/exception-handling/throw_ref.wast.js @@ -0,0 +1,155 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/throw_ref.wast + +// ./test/core/throw_ref.wast:3 +let $0 = instantiate(`(module + (tag $$e0) + (tag $$e1) + + (func (export "catch-throw_ref-0") + (block $$h (result exnref) + (try_table (catch_ref $$e0 $$h) (throw $$e0)) + (unreachable) + ) + (throw_ref) + ) + + (func (export "catch-throw_ref-1") (param i32) (result i32) + (block $$h (result exnref) + (try_table (result i32) (catch_ref $$e0 $$h) (throw $$e0)) + (return) + ) + (if (param exnref) (i32.eqz (local.get 0)) + (then (throw_ref)) + (else (drop)) + ) + (i32.const 23) + ) + + (func (export "catchall-throw_ref-0") + (block $$h (result exnref) + (try_table (result exnref) (catch_all_ref $$h) (throw $$e0)) + ) + (throw_ref) + ) + + (func (export "catchall-throw_ref-1") (param i32) (result i32) + (block $$h (result exnref) + (try_table (result i32) (catch_all_ref $$h) (throw $$e0)) + (return) + ) + (if (param exnref) (i32.eqz (local.get 0)) + (then (throw_ref)) + (else (drop)) + ) + (i32.const 23) + ) + + (func (export "throw_ref-nested") (param i32) (result i32) + (local $$exn1 exnref) + (local $$exn2 exnref) + (block $$h1 (result exnref) + (try_table (result i32) (catch_ref $$e1 $$h1) (throw $$e1)) + (return) + ) + (local.set $$exn1) + (block $$h2 (result exnref) + (try_table (result i32) (catch_ref $$e0 $$h2) (throw $$e0)) + (return) + ) + (local.set $$exn2) + (if (i32.eq (local.get 0) (i32.const 0)) + (then (throw_ref (local.get $$exn1))) + ) + (if (i32.eq (local.get 0) (i32.const 1)) + (then (throw_ref (local.get $$exn2))) + ) + (i32.const 23) + ) + + (func (export "throw_ref-recatch") (param i32) (result i32) + (local $$e exnref) + (block $$h1 (result exnref) + (try_table (result i32) (catch_ref $$e0 $$h1) (throw $$e0)) + (return) + ) + (local.set $$e) + (block $$h2 (result exnref) + (try_table (result i32) (catch_ref $$e0 $$h2) + (if (i32.eqz (local.get 0)) + (then (throw_ref (local.get $$e))) + ) + (i32.const 42) + ) + (return) + ) + (drop) (i32.const 23) + ) + + (func (export "throw_ref-stack-polymorphism") + (local $$e exnref) + (block $$h (result exnref) + (try_table (result f64) (catch_ref $$e0 $$h) (throw $$e0)) + (unreachable) + ) + (local.set $$e) + (i32.const 1) + (throw_ref (local.get $$e)) + ) +)`); + +// ./test/core/throw_ref.wast:99 +assert_exception(() => invoke($0, `catch-throw_ref-0`, [])); + +// ./test/core/throw_ref.wast:101 +assert_exception(() => invoke($0, `catch-throw_ref-1`, [0])); + +// ./test/core/throw_ref.wast:102 +assert_return(() => invoke($0, `catch-throw_ref-1`, [1]), [value("i32", 23)]); + +// ./test/core/throw_ref.wast:104 +assert_exception(() => invoke($0, `catchall-throw_ref-0`, [])); + +// ./test/core/throw_ref.wast:106 +assert_exception(() => invoke($0, `catchall-throw_ref-1`, [0])); + +// ./test/core/throw_ref.wast:107 +assert_return(() => invoke($0, `catchall-throw_ref-1`, [1]), [value("i32", 23)]); + +// ./test/core/throw_ref.wast:108 +assert_exception(() => invoke($0, `throw_ref-nested`, [0])); + +// ./test/core/throw_ref.wast:109 +assert_exception(() => invoke($0, `throw_ref-nested`, [1])); + +// ./test/core/throw_ref.wast:110 +assert_return(() => invoke($0, `throw_ref-nested`, [2]), [value("i32", 23)]); + +// ./test/core/throw_ref.wast:112 +assert_return(() => invoke($0, `throw_ref-recatch`, [0]), [value("i32", 23)]); + +// ./test/core/throw_ref.wast:113 +assert_return(() => invoke($0, `throw_ref-recatch`, [1]), [value("i32", 42)]); + +// ./test/core/throw_ref.wast:115 +assert_exception(() => invoke($0, `throw_ref-stack-polymorphism`, [])); + +// ./test/core/throw_ref.wast:117 +assert_invalid(() => instantiate(`(module (func (throw_ref)))`), `type mismatch`); + +// ./test/core/throw_ref.wast:118 +assert_invalid(() => instantiate(`(module (func (block (throw_ref))))`), `type mismatch`); diff --git a/js/src/jit-test/tests/wasm/spec/extended-const/directives.txt b/js/src/jit-test/tests/wasm/spec/extended-const/directives.txt new file mode 100644 index 0000000000..5b3d5f6d83 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/extended-const/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-extended-const; --no-wasm-gc; skip-if: !wasmExtendedConstEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/extended-const/global.wast.js b/js/src/jit-test/tests/wasm/spec/extended-const/global.wast.js new file mode 100644 index 0000000000..b0b4beed95 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/extended-const/global.wast.js @@ -0,0 +1,828 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/global.wast + +// ./test/core/global.wast:3 +let $0 = instantiate(`(module + (global (import "spectest" "global_i32") i32) + (global (import "spectest" "global_i64") i64) + + (global $$a i32 (i32.const -2)) + (global (;3;) f32 (f32.const -3)) + (global (;4;) f64 (f64.const -4)) + (global $$b i64 (i64.const -5)) + + (global $$x (mut i32) (i32.const -12)) + (global (;7;) (mut f32) (f32.const -13)) + (global (;8;) (mut f64) (f64.const -14)) + (global $$y (mut i64) (i64.const -15)) + + (global $$z1 i32 (global.get 0)) + (global $$z2 i64 (global.get 1)) + (global $$z3 i32 (i32.add (i32.sub (i32.mul (i32.const 20) (i32.const 2)) (i32.const 2)) (i32.const 4))) + (global $$z4 i64 (i64.add (i64.sub (i64.mul (i64.const 20) (i64.const 2)) (i64.const 2)) (i64.const 5))) + (global $$z5 i32 (i32.add (global.get 0) (i32.const 42))) + (global $$z6 i64 (i64.add (global.get 1) (i64.const 42))) + + (global $$r externref (ref.null extern)) + (global $$mr (mut externref) (ref.null extern)) + (global funcref (ref.null func)) + + (func (export "get-a") (result i32) (global.get $$a)) + (func (export "get-b") (result i64) (global.get $$b)) + (func (export "get-r") (result externref) (global.get $$r)) + (func (export "get-mr") (result externref) (global.get $$mr)) + (func (export "get-x") (result i32) (global.get $$x)) + (func (export "get-y") (result i64) (global.get $$y)) + (func (export "get-z1") (result i32) (global.get $$z1)) + (func (export "get-z2") (result i64) (global.get $$z2)) + (func (export "get-z3") (result i32) (global.get $$z3)) + (func (export "get-z4") (result i64) (global.get $$z4)) + (func (export "get-z5") (result i32) (global.get $$z5)) + (func (export "get-z6") (result i64) (global.get $$z6)) + (func (export "set-x") (param i32) (global.set $$x (local.get 0))) + (func (export "set-y") (param i64) (global.set $$y (local.get 0))) + (func (export "set-mr") (param externref) (global.set $$mr (local.get 0))) + + (func (export "get-3") (result f32) (global.get 3)) + (func (export "get-4") (result f64) (global.get 4)) + (func (export "get-7") (result f32) (global.get 7)) + (func (export "get-8") (result f64) (global.get 8)) + (func (export "set-7") (param f32) (global.set 7 (local.get 0))) + (func (export "set-8") (param f64) (global.set 8 (local.get 0))) + + ;; As the argument of control constructs and instructions + + (memory 1) + + (func $$dummy) + + (func (export "as-select-first") (result i32) + (select (global.get $$x) (i32.const 2) (i32.const 3)) + ) + (func (export "as-select-mid") (result i32) + (select (i32.const 2) (global.get $$x) (i32.const 3)) + ) + (func (export "as-select-last") (result i32) + (select (i32.const 2) (i32.const 3) (global.get $$x)) + ) + + (func (export "as-loop-first") (result i32) + (loop (result i32) + (global.get $$x) (call $$dummy) (call $$dummy) + ) + ) + (func (export "as-loop-mid") (result i32) + (loop (result i32) + (call $$dummy) (global.get $$x) (call $$dummy) + ) + ) + (func (export "as-loop-last") (result i32) + (loop (result i32) + (call $$dummy) (call $$dummy) (global.get $$x) + ) + ) + + (func (export "as-if-condition") (result i32) + (if (result i32) (global.get $$x) + (then (call $$dummy) (i32.const 2)) + (else (call $$dummy) (i32.const 3)) + ) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) + (then (global.get $$x)) (else (i32.const 2)) + ) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 0) + (then (i32.const 2)) (else (global.get $$x)) + ) + ) + + (func (export "as-br_if-first") (result i32) + (block (result i32) + (br_if 0 (global.get $$x) (i32.const 2)) + (return (i32.const 3)) + ) + ) + (func (export "as-br_if-last") (result i32) + (block (result i32) + (br_if 0 (i32.const 2) (global.get $$x)) + (return (i32.const 3)) + ) + ) + + (func (export "as-br_table-first") (result i32) + (block (result i32) + (global.get $$x) (i32.const 2) (br_table 0 0) + ) + ) + (func (export "as-br_table-last") (result i32) + (block (result i32) + (i32.const 2) (global.get $$x) (br_table 0 0) + ) + ) + + (func $$func (param i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (call_indirect (type $$check) + (global.get $$x) (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (global.get $$x) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (i32.const 0) (global.get $$x) + ) + ) + ) + + (func (export "as-store-first") + (global.get $$x) (i32.const 1) (i32.store) + ) + (func (export "as-store-last") + (i32.const 0) (global.get $$x) (i32.store) + ) + (func (export "as-load-operand") (result i32) + (i32.load (global.get $$x)) + ) + (func (export "as-memory.grow-value") (result i32) + (memory.grow (global.get $$x)) + ) + + (func $$f (param i32) (result i32) (local.get 0)) + (func (export "as-call-value") (result i32) + (call $$f (global.get $$x)) + ) + + (func (export "as-return-value") (result i32) + (global.get $$x) (return) + ) + (func (export "as-drop-operand") + (drop (global.get $$x)) + ) + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (global.get $$x))) + ) + + (func (export "as-local.set-value") (param i32) (result i32) + (local.set 0 (global.get $$x)) + (local.get 0) + ) + (func (export "as-local.tee-value") (param i32) (result i32) + (local.tee 0 (global.get $$x)) + ) + (func (export "as-global.set-value") (result i32) + (global.set $$x (global.get $$x)) + (global.get $$x) + ) + + (func (export "as-unary-operand") (result i32) + (i32.eqz (global.get $$x)) + ) + (func (export "as-binary-operand") (result i32) + (i32.mul + (global.get $$x) (global.get $$x) + ) + ) + (func (export "as-compare-operand") (result i32) + (i32.gt_u + (global.get 0) (i32.const 1) + ) + ) +)`); + +// ./test/core/global.wast:204 +assert_return(() => invoke($0, `get-a`, []), [value("i32", -2)]); + +// ./test/core/global.wast:205 +assert_return(() => invoke($0, `get-b`, []), [value("i64", -5n)]); + +// ./test/core/global.wast:206 +assert_return(() => invoke($0, `get-r`, []), [value('externref', null)]); + +// ./test/core/global.wast:207 +assert_return(() => invoke($0, `get-mr`, []), [value('externref', null)]); + +// ./test/core/global.wast:208 +assert_return(() => invoke($0, `get-x`, []), [value("i32", -12)]); + +// ./test/core/global.wast:209 +assert_return(() => invoke($0, `get-y`, []), [value("i64", -15n)]); + +// ./test/core/global.wast:210 +assert_return(() => invoke($0, `get-z1`, []), [value("i32", 666)]); + +// ./test/core/global.wast:211 +assert_return(() => invoke($0, `get-z2`, []), [value("i64", 666n)]); + +// ./test/core/global.wast:212 +assert_return(() => invoke($0, `get-z3`, []), [value("i32", 42)]); + +// ./test/core/global.wast:213 +assert_return(() => invoke($0, `get-z4`, []), [value("i64", 43n)]); + +// ./test/core/global.wast:214 +assert_return(() => invoke($0, `get-z5`, []), [value("i32", 708)]); + +// ./test/core/global.wast:215 +assert_return(() => invoke($0, `get-z6`, []), [value("i64", 708n)]); + +// ./test/core/global.wast:217 +assert_return(() => invoke($0, `get-3`, []), [value("f32", -3)]); + +// ./test/core/global.wast:218 +assert_return(() => invoke($0, `get-4`, []), [value("f64", -4)]); + +// ./test/core/global.wast:219 +assert_return(() => invoke($0, `get-7`, []), [value("f32", -13)]); + +// ./test/core/global.wast:220 +assert_return(() => invoke($0, `get-8`, []), [value("f64", -14)]); + +// ./test/core/global.wast:222 +assert_return(() => invoke($0, `set-x`, [6]), []); + +// ./test/core/global.wast:223 +assert_return(() => invoke($0, `set-y`, [7n]), []); + +// ./test/core/global.wast:225 +assert_return(() => invoke($0, `set-7`, [value("f32", 8)]), []); + +// ./test/core/global.wast:226 +assert_return(() => invoke($0, `set-8`, [value("f64", 9)]), []); + +// ./test/core/global.wast:228 +assert_return(() => invoke($0, `get-x`, []), [value("i32", 6)]); + +// ./test/core/global.wast:229 +assert_return(() => invoke($0, `get-y`, []), [value("i64", 7n)]); + +// ./test/core/global.wast:230 +assert_return(() => invoke($0, `get-7`, []), [value("f32", 8)]); + +// ./test/core/global.wast:231 +assert_return(() => invoke($0, `get-8`, []), [value("f64", 9)]); + +// ./test/core/global.wast:233 +assert_return(() => invoke($0, `set-7`, [value("f32", 8)]), []); + +// ./test/core/global.wast:234 +assert_return(() => invoke($0, `set-8`, [value("f64", 9)]), []); + +// ./test/core/global.wast:235 +assert_return(() => invoke($0, `set-mr`, [externref(10)]), []); + +// ./test/core/global.wast:237 +assert_return(() => invoke($0, `get-x`, []), [value("i32", 6)]); + +// ./test/core/global.wast:238 +assert_return(() => invoke($0, `get-y`, []), [value("i64", 7n)]); + +// ./test/core/global.wast:239 +assert_return(() => invoke($0, `get-7`, []), [value("f32", 8)]); + +// ./test/core/global.wast:240 +assert_return(() => invoke($0, `get-8`, []), [value("f64", 9)]); + +// ./test/core/global.wast:241 +assert_return(() => invoke($0, `get-mr`, []), [new ExternRefResult(10)]); + +// ./test/core/global.wast:243 +assert_return(() => invoke($0, `as-select-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:244 +assert_return(() => invoke($0, `as-select-mid`, []), [value("i32", 2)]); + +// ./test/core/global.wast:245 +assert_return(() => invoke($0, `as-select-last`, []), [value("i32", 2)]); + +// ./test/core/global.wast:247 +assert_return(() => invoke($0, `as-loop-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:248 +assert_return(() => invoke($0, `as-loop-mid`, []), [value("i32", 6)]); + +// ./test/core/global.wast:249 +assert_return(() => invoke($0, `as-loop-last`, []), [value("i32", 6)]); + +// ./test/core/global.wast:251 +assert_return(() => invoke($0, `as-if-condition`, []), [value("i32", 2)]); + +// ./test/core/global.wast:252 +assert_return(() => invoke($0, `as-if-then`, []), [value("i32", 6)]); + +// ./test/core/global.wast:253 +assert_return(() => invoke($0, `as-if-else`, []), [value("i32", 6)]); + +// ./test/core/global.wast:255 +assert_return(() => invoke($0, `as-br_if-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:256 +assert_return(() => invoke($0, `as-br_if-last`, []), [value("i32", 2)]); + +// ./test/core/global.wast:258 +assert_return(() => invoke($0, `as-br_table-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:259 +assert_return(() => invoke($0, `as-br_table-last`, []), [value("i32", 2)]); + +// ./test/core/global.wast:261 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:262 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 2)]); + +// ./test/core/global.wast:263 +assert_trap(() => invoke($0, `as-call_indirect-last`, []), `undefined element`); + +// ./test/core/global.wast:265 +assert_return(() => invoke($0, `as-store-first`, []), []); + +// ./test/core/global.wast:266 +assert_return(() => invoke($0, `as-store-last`, []), []); + +// ./test/core/global.wast:267 +assert_return(() => invoke($0, `as-load-operand`, []), [value("i32", 1)]); + +// ./test/core/global.wast:268 +assert_return(() => invoke($0, `as-memory.grow-value`, []), [value("i32", 1)]); + +// ./test/core/global.wast:270 +assert_return(() => invoke($0, `as-call-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:272 +assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:273 +assert_return(() => invoke($0, `as-drop-operand`, []), []); + +// ./test/core/global.wast:274 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:276 +assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 6)]); + +// ./test/core/global.wast:277 +assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 6)]); + +// ./test/core/global.wast:278 +assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:280 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("i32", 0)]); + +// ./test/core/global.wast:281 +assert_return(() => invoke($0, `as-binary-operand`, []), [value("i32", 36)]); + +// ./test/core/global.wast:282 +assert_return(() => invoke($0, `as-compare-operand`, []), [value("i32", 1)]); + +// ./test/core/global.wast:284 +assert_invalid( + () => instantiate(`(module (global f32 (f32.const 0)) (func (global.set 0 (f32.const 1))))`), + `global is immutable`, +); + +// ./test/core/global.wast:289 +assert_invalid( + () => instantiate(`(module (import "spectest" "global_i32" (global i32)) (func (global.set 0 (i32.const 1))))`), + `global is immutable`, +); + +// ./test/core/global.wast:295 +let $1 = instantiate(`(module (global (mut f32) (f32.const 0)) (export "a" (global 0)))`); + +// ./test/core/global.wast:296 +let $2 = instantiate(`(module (global (export "a") (mut f32) (f32.const 0)))`); + +// ./test/core/global.wast:298 +assert_invalid( + () => instantiate(`(module (global f32 (f32.neg (f32.const 0))))`), + `constant expression required`, +); + +// ./test/core/global.wast:303 +assert_invalid( + () => instantiate(`(module (global f32 (local.get 0)))`), + `constant expression required`, +); + +// ./test/core/global.wast:308 +assert_invalid( + () => instantiate(`(module (global f32 (f32.neg (f32.const 1))))`), + `constant expression required`, +); + +// ./test/core/global.wast:313 +assert_invalid( + () => instantiate(`(module (global i32 (i32.const 0) (nop)))`), + `constant expression required`, +); + +// ./test/core/global.wast:318 +assert_invalid( + () => instantiate(`(module (global i32 (i32.ctz (i32.const 0))))`), + `constant expression required`, +); + +// ./test/core/global.wast:323 +assert_invalid( + () => instantiate(`(module (global i32 (nop)))`), + `constant expression required`, +); + +// ./test/core/global.wast:328 +assert_invalid(() => instantiate(`(module (global i32 (f32.const 0)))`), `type mismatch`); + +// ./test/core/global.wast:333 +assert_invalid( + () => instantiate(`(module (global i32 (i32.const 0) (i32.const 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:338 +assert_invalid( + () => instantiate(`(module (global i32 (;empty instruction sequence;)))`), + `type mismatch`, +); + +// ./test/core/global.wast:343 +assert_invalid( + () => instantiate(`(module (global (import "" "") externref) (global funcref (global.get 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:348 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-i32") i32) (global i32 (global.get 0) (global.get 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:353 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-i32") i32) (global i32 (i32.const 0) (global.get 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:358 +assert_invalid( + () => instantiate(`(module (global i32 (global.get 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:363 +assert_invalid( + () => instantiate(`(module (global i32 (i32.const 0)) (global i32 (global.get 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:367 +assert_invalid( + () => instantiate(`(module (global $$g i32 (i32.const 0)) (global i32 (global.get $$g)))`), + `unknown global`, +); + +// ./test/core/global.wast:372 +assert_invalid( + () => instantiate(`(module (global i32 (global.get 1)) (global i32 (i32.const 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:377 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-i32") i32) (global i32 (global.get 2)))`), + `unknown global`, +); + +// ./test/core/global.wast:382 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-mut-i32") (mut i32)) (global i32 (global.get 0)))`), + `constant expression required`, +); + +// ./test/core/global.wast:387 +let $3 = instantiate(`(module + (import "spectest" "global_i32" (global i32)) +)`); + +// ./test/core/global.wast:390 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\98\\80\\80\\80\\00" ;; import section + "\\01" ;; length 1 + "\\08\\73\\70\\65\\63\\74\\65\\73\\74" ;; "spectest" + "\\0a\\67\\6c\\6f\\62\\61\\6c\\5f\\69\\33\\32" ;; "global_i32" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\02" ;; malformed mutability + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:403 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\98\\80\\80\\80\\00" ;; import section + "\\01" ;; length 1 + "\\08\\73\\70\\65\\63\\74\\65\\73\\74" ;; "spectest" + "\\0a\\67\\6c\\6f\\62\\61\\6c\\5f\\69\\33\\32" ;; "global_i32" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\ff" ;; malformed mutability + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:417 +let $4 = instantiate(`(module + (global i32 (i32.const 0)) +)`); + +// ./test/core/global.wast:420 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\06\\86\\80\\80\\80\\00" ;; global section + "\\01" ;; length 1 + "\\7f" ;; i32 + "\\02" ;; malformed mutability + "\\41\\00" ;; i32.const 0 + "\\0b" ;; end + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:432 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\06\\86\\80\\80\\80\\00" ;; global section + "\\01" ;; length 1 + "\\7f" ;; i32 + "\\ff" ;; malformed mutability + "\\41\\00" ;; i32.const 0 + "\\0b" ;; end + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:446 +assert_invalid( + () => instantiate(`(module (func (result i32) (global.get 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:451 +assert_invalid( + () => instantiate(`(module + (global i32 (i32.const 0)) + (func (result i32) (global.get 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:459 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (func (result i32) (global.get 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:467 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (global i32 (i32.const 0)) + (func (result i32) (global.get 2)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:477 +assert_invalid( + () => instantiate(`(module (func (i32.const 0) (global.set 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:482 +assert_invalid( + () => instantiate(`(module + (global i32 (i32.const 0)) + (func (i32.const 0) (global.set 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:490 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (func (i32.const 0) (global.set 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:498 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (global i32 (i32.const 0)) + (func (i32.const 0) (global.set 2)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:508 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty + (global.set $$x) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:517 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-block + (i32.const 0) + (block (global.set $$x)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:527 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-loop + (i32.const 0) + (loop (global.set $$x)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:537 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:547 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:557 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-br + (i32.const 0) + (block (br 0 (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:567 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-br_if + (i32.const 0) + (block (br_if 0 (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:577 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-br_table + (i32.const 0) + (block (br_table 0 (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:587 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-return + (return (global.set $$x)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:596 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-select + (select (global.set $$x) (i32.const 1) (i32.const 2)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:605 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-call + (call 1 (global.set $$x)) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:615 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-global.set-value-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (global.set $$x) (i32.const 0) + ) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:634 +assert_malformed( + () => instantiate(`(global $$foo i32 (i32.const 0)) (global $$foo i32 (i32.const 0)) `), + `duplicate global`, +); + +// ./test/core/global.wast:638 +assert_malformed( + () => instantiate(`(import "" "" (global $$foo i32)) (global $$foo i32 (i32.const 0)) `), + `duplicate global`, +); + +// ./test/core/global.wast:642 +assert_malformed( + () => instantiate(`(import "" "" (global $$foo i32)) (import "" "" (global $$foo i32)) `), + `duplicate global`, +); diff --git a/js/src/jit-test/tests/wasm/spec/extended-const/harness/directives.txt b/js/src/jit-test/tests/wasm/spec/extended-const/harness/directives.txt new file mode 100644 index 0000000000..d41243abbb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/extended-const/harness/directives.txt @@ -0,0 +1 @@ +|jit-test| skip-if: true \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/extended-const/harness/harness.js b/js/src/jit-test/tests/wasm/spec/extended-const/harness/harness.js new file mode 100644 index 0000000000..a96781e8ed --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/extended-const/harness/harness.js @@ -0,0 +1,448 @@ +"use strict"; + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +if (!wasmIsSupported()) { + quit(); +} + +function bytes(type, bytes) { + var typedBuffer = new Uint8Array(bytes); + return wasmGlobalFromArrayBuffer(type, typedBuffer.buffer); +} +function value(type, value) { + return new WebAssembly.Global({ + value: type, + mutable: false, + }, value); +} + +function i8x16(elements) { + let typedBuffer = new Uint8Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i16x8(elements) { + let typedBuffer = new Uint16Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i32x4(elements) { + let typedBuffer = new Uint32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i64x2(elements) { + let typedBuffer = new BigUint64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f32x4(elements) { + let typedBuffer = new Float32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f64x2(elements) { + let typedBuffer = new Float64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} + +function either(...arr) { + return new EitherVariants(arr); +} + +class F32x4Pattern { + constructor(x, y, z, w) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } +} + +class F64x2Pattern { + constructor(x, y) { + this.x = x; + this.y = y; + } +} + +class RefWithType { + constructor(type) { + this.type = type; + } + + formatExpected() { + return `RefWithType(${this.type})`; + } + + test(refGlobal) { + try { + new WebAssembly.Global({value: this.type}, refGlobal.value); + return true; + } catch (err) { + assertEq(err instanceof TypeError, true, `wrong type of error when creating global: ${err}`); + assertEq(!!err.message.match(/can only pass/), true, `wrong type of error when creating global: ${err}`); + return false; + } + } +} + +// ref.extern values created by spec tests will be JS objects of the form +// { [externsym]: }. Other externref values are possible to observe +// if extern.convert_any is used. +let externsym = Symbol("externref"); +function externref(s) { + return { [externsym]: s }; +} +function is_externref(x) { + return (x !== null && externsym in x) ? 1 : 0; +} +function is_funcref(x) { + return typeof x === "function" ? 1 : 0; +} +function eq_externref(x, y) { + return x === y ? 1 : 0; +} +function eq_funcref(x, y) { + return x === y ? 1 : 0; +} + +class ExternRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.extern ${this.n}`; + } + + test(global) { + // the global's value can either be an externref or just a plain old JS number + let result = global.value; + if (typeof global.value === "object" && externsym in global.value) { + result = global.value[externsym]; + } + return result === this.n; + } +} + +// ref.host values created by spectests will be whatever the JS API does to +// convert the given value to anyref. It should implicitly be like any.convert_extern. +function hostref(v) { + if (!wasmGcEnabled()) { + throw new Error("ref.host only works when wasm GC is enabled"); + } + + const { internalizeNum } = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(`(module + (func (import "test" "coerce") (param i32) (result anyref)) + (func (export "internalizeNum") (param i32) (result anyref) + (call 0 (local.get 0)) + ) + )`)), + { "test": { "coerce": x => x } }, + ).exports; + return internalizeNum(v); +} + +class HostRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.host ${this.n}`; + } + + test(externrefGlobal) { + assertEq(externsym in externrefGlobal.value, true, `HostRefResult only works with externref inputs`); + return externrefGlobal.value[externsym] === this.n; + } +} + +let spectest = { + externref: externref, + is_externref: is_externref, + is_funcref: is_funcref, + eq_externref: eq_externref, + eq_funcref: eq_funcref, + print: console.log.bind(console), + print_i32: console.log.bind(console), + print_i32_f32: console.log.bind(console), + print_f64_f64: console.log.bind(console), + print_f32: console.log.bind(console), + print_f64: console.log.bind(console), + global_i32: 666, + global_i64: 666n, + global_f32: 666, + global_f64: 666, + table: new WebAssembly.Table({ + initial: 10, + maximum: 20, + element: "anyfunc", + }), + memory: new WebAssembly.Memory({ initial: 1, maximum: 2 }), +}; + +let linkage = { + spectest, +}; + +function getInstance(instanceish) { + if (typeof instanceish === "string") { + assertEq( + instanceish in linkage, + true, + `'${instanceish}'' must be registered`, + ); + return linkage[instanceish]; + } + return instanceish; +} + +function instantiate(source) { + let bytecode = wasmTextToBinary(source); + let module = new WebAssembly.Module(bytecode); + let instance = new WebAssembly.Instance(module, linkage); + return instance.exports; +} + +function register(instanceish, name) { + linkage[name] = getInstance(instanceish); +} + +function invoke(instanceish, field, params) { + let func = getInstance(instanceish)[field]; + assertEq(func instanceof Function, true, "expected a function"); + return wasmLosslessInvoke(func, ...params); +} + +function get(instanceish, field) { + let global = getInstance(instanceish)[field]; + assertEq( + global instanceof WebAssembly.Global, + true, + "expected a WebAssembly.Global", + ); + return global; +} + +function assert_trap(thunk, message) { + try { + thunk(); + throw new Error("expected trap"); + } catch (err) { + if (err instanceof WebAssembly.RuntimeError) { + return; + } + throw err; + } +} + +let StackOverflow; +try { + (function f() { + 1 + f(); + })(); +} catch (e) { + StackOverflow = e.constructor; +} +function assert_exhaustion(thunk, message) { + try { + thunk(); + assertEq("normal return", "exhaustion"); + } catch (err) { + assertEq( + err instanceof StackOverflow, + true, + "expected exhaustion", + ); + } +} + +function assert_invalid(thunk, message) { + try { + thunk(); + assertEq("valid module", "invalid module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an invalid module", + ); + } +} + +function assert_unlinkable(thunk, message) { + try { + thunk(); + assertEq(true, false, "expected an unlinkable module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an unlinkable module", + ); + } +} + +function assert_malformed(thunk, message) { + try { + thunk(); + assertEq("valid module", "malformed module"); + } catch (err) { + assertEq( + err instanceof TypeError || + err instanceof SyntaxError || + err instanceof WebAssembly.CompileError || + err instanceof WebAssembly.LinkError, + true, + `expected a malformed module`, + ); + } +} + +function assert_exception(thunk) { + let thrown = false; + try { + thunk(); + } catch (err) { + thrown = true; + } + assertEq(thrown, true, "expected an exception to be thrown"); +} + +function assert_return(thunk, expected) { + let results = thunk(); + + if (results === undefined) { + results = []; + } else if (!Array.isArray(results)) { + results = [results]; + } + if (!Array.isArray(expected)) { + expected = [expected]; + } + + if (!compareResults(results, expected)) { + let got = results.map((x) => formatResult(x)).join(", "); + let wanted = expected.map((x) => formatExpected(x)).join(", "); + assertEq( + `[${got}]`, + `[${wanted}]`, + ); + assertEq(true, false, `${got} !== ${wanted}`); + } +} + +function formatResult(result) { + if (typeof (result) === "object") { + return wasmGlobalToString(result); + } else { + return `${result}`; + } +} + +function formatExpected(expected) { + if ( + expected === `f32_canonical_nan` || + expected === `f32_arithmetic_nan` || + expected === `f64_canonical_nan` || + expected === `f64_arithmetic_nan` + ) { + return expected; + } else if (expected instanceof F32x4Pattern) { + return `f32x4(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + }, ${formatExpected(expected.z)}, ${formatExpected(expected.w)})`; + } else if (expected instanceof F64x2Pattern) { + return `f64x2(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + })`; + } else if (expected instanceof EitherVariants) { + return expected.formatExpected(); + } else if (expected instanceof RefWithType) { + return expected.formatExpected(); + } else if (expected instanceof ExternRefResult) { + return expected.formatExpected(); + } else if (expected instanceof HostRefResult) { + return expected.formatExpected(); + } else if (typeof (expected) === "object") { + return wasmGlobalToString(expected); + } else { + throw new Error("unknown expected result"); + } +} + +class EitherVariants { + constructor(arr) { + this.arr = arr; + } + matches(v) { + return this.arr.some((e) => compareResult(v, e)); + } + formatExpected() { + return `either(${this.arr.map(formatExpected).join(", ")})`; + } +} + +function compareResults(results, expected) { + if (results.length !== expected.length) { + return false; + } + for (let i in results) { + if (expected[i] instanceof EitherVariants) { + return expected[i].matches(results[i]); + } + if (!compareResult(results[i], expected[i])) { + return false; + } + } + return true; +} + +function compareResult(result, expected) { + if ( + expected === `canonical_nan` || + expected === `arithmetic_nan` + ) { + return wasmGlobalIsNaN(result, expected); + } else if (expected === null) { + return result.value === null; + } else if (expected instanceof F32x4Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f32x4", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 1), expected.y) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 2), expected.z) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 3), expected.w); + } else if (expected instanceof F64x2Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f64x2", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f64x2", 1), expected.y); + } else if (expected instanceof RefWithType) { + return expected.test(result); + } else if (expected instanceof ExternRefResult) { + return expected.test(result); + } else if (expected instanceof HostRefResult) { + return expected.test(result); + } else if (typeof (expected) === "object") { + return wasmGlobalsEqual(result, expected); + } else { + throw new Error("unknown expected result"); + } +} diff --git a/js/src/jit-test/tests/wasm/spec/function-references/br_if.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/br_if.wast.js new file mode 100644 index 0000000000..511ee003fb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/br_if.wast.js @@ -0,0 +1,886 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/br_if.wast + +// ./test/core/br_if.wast:3 +let $0 = instantiate(`(module + (func $$dummy) + + (func (export "type-i32") + (block (drop (i32.ctz (br_if 0 (i32.const 0) (i32.const 1))))) + ) + (func (export "type-i64") + (block (drop (i64.ctz (br_if 0 (i64.const 0) (i32.const 1))))) + ) + (func (export "type-f32") + (block (drop (f32.neg (br_if 0 (f32.const 0) (i32.const 1))))) + ) + (func (export "type-f64") + (block (drop (f64.neg (br_if 0 (f64.const 0) (i32.const 1))))) + ) + + (func (export "type-i32-value") (result i32) + (block (result i32) (i32.ctz (br_if 0 (i32.const 1) (i32.const 1)))) + ) + (func (export "type-i64-value") (result i64) + (block (result i64) (i64.ctz (br_if 0 (i64.const 2) (i32.const 1)))) + ) + (func (export "type-f32-value") (result f32) + (block (result f32) (f32.neg (br_if 0 (f32.const 3) (i32.const 1)))) + ) + (func (export "type-f64-value") (result f64) + (block (result f64) (f64.neg (br_if 0 (f64.const 4) (i32.const 1)))) + ) + + (func (export "as-block-first") (param i32) (result i32) + (block (br_if 0 (local.get 0)) (return (i32.const 2))) (i32.const 3) + ) + (func (export "as-block-mid") (param i32) (result i32) + (block (call $$dummy) (br_if 0 (local.get 0)) (return (i32.const 2))) + (i32.const 3) + ) + (func (export "as-block-last") (param i32) + (block (call $$dummy) (call $$dummy) (br_if 0 (local.get 0))) + ) + (func (export "as-block-first-value") (param i32) (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 10) (local.get 0))) (return (i32.const 11)) + ) + ) + (func (export "as-block-mid-value") (param i32) (result i32) + (block (result i32) + (call $$dummy) + (drop (br_if 0 (i32.const 20) (local.get 0))) + (return (i32.const 21)) + ) + ) + (func (export "as-block-last-value") (param i32) (result i32) + (block (result i32) + (call $$dummy) (call $$dummy) (br_if 0 (i32.const 11) (local.get 0)) + ) + ) + + (func (export "as-loop-first") (param i32) (result i32) + (block (loop (br_if 1 (local.get 0)) (return (i32.const 2)))) (i32.const 3) + ) + (func (export "as-loop-mid") (param i32) (result i32) + (block (loop (call $$dummy) (br_if 1 (local.get 0)) (return (i32.const 2)))) + (i32.const 4) + ) + (func (export "as-loop-last") (param i32) + (loop (call $$dummy) (br_if 1 (local.get 0))) + ) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (br_if 0 (i32.const 1) (i32.const 2)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (br_if 0 (i32.const 1) (i32.const 1)))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (br_if 0 (i32.const 1) (i32.const 2)) (i32.const 3))) + (i32.const 4) + ) + ) + (func (export "as-br_if-value-cond") (param i32) (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 2) (br_if 0 (i32.const 1) (local.get 0)))) + (i32.const 4) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (br_if 0 (i32.const 1) (i32.const 2)))) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (br_if 0 (i32.const 1) (i32.const 2)) (i32.const 3)) (i32.const 4) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 2) (br_if 0 (i32.const 1) (i32.const 3))) (i32.const 4) + ) + ) + (func (export "as-return-value") (result i64) + (block (result i64) (return (br_if 0 (i64.const 1) (i32.const 2)))) + ) + + (func (export "as-if-cond") (param i32) (result i32) + (block (result i32) + (if (result i32) + (br_if 0 (i32.const 1) (local.get 0)) + (then (i32.const 2)) + (else (i32.const 3)) + ) + ) + ) + (func (export "as-if-then") (param i32 i32) + (block + (if (local.get 0) (then (br_if 1 (local.get 1))) (else (call $$dummy))) + ) + ) + (func (export "as-if-else") (param i32 i32) + (block + (if (local.get 0) (then (call $$dummy)) (else (br_if 1 (local.get 1)))) + ) + ) + + (func (export "as-select-first") (param i32) (result i32) + (block (result i32) + (select (br_if 0 (i32.const 3) (i32.const 10)) (i32.const 2) (local.get 0)) + ) + ) + (func (export "as-select-second") (param i32) (result i32) + (block (result i32) + (select (i32.const 1) (br_if 0 (i32.const 3) (i32.const 10)) (local.get 0)) + ) + ) + (func (export "as-select-cond") (result i32) + (block (result i32) + (select (i32.const 1) (i32.const 2) (br_if 0 (i32.const 3) (i32.const 10))) + ) + ) + + (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (block (result i32) + (call $$f + (br_if 0 (i32.const 12) (i32.const 1)) (i32.const 2) (i32.const 3) + ) + ) + ) + (func (export "as-call-mid") (result i32) + (block (result i32) + (call $$f + (i32.const 1) (br_if 0 (i32.const 13) (i32.const 1)) (i32.const 3) + ) + ) + ) + (func (export "as-call-last") (result i32) + (block (result i32) + (call $$f + (i32.const 1) (i32.const 2) (br_if 0 (i32.const 14) (i32.const 1)) + ) + ) + ) + + (func $$func (param i32 i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-func") (result i32) + (block (result i32) + (call_indirect (type $$check) + (br_if 0 (i32.const 4) (i32.const 10)) + (i32.const 1) (i32.const 2) (i32.const 0) + ) + ) + ) + + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 1) (br_if 0 (i32.const 4) (i32.const 10)) (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 1) (i32.const 2) (br_if 0 (i32.const 4) (i32.const 10)) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 1) (i32.const 2) (i32.const 3) (br_if 0 (i32.const 4) (i32.const 10)) + ) + ) + ) + + (func (export "as-local.set-value") (param i32) (result i32) + (local i32) + (block (result i32) + (local.set 0 (br_if 0 (i32.const 17) (local.get 0))) + (i32.const -1) + ) + ) + (func (export "as-local.tee-value") (param i32) (result i32) + (block (result i32) + (local.tee 0 (br_if 0 (i32.const 1) (local.get 0))) + (return (i32.const -1)) + ) + ) + (global $$a (mut i32) (i32.const 10)) + (func (export "as-global.set-value") (param i32) (result i32) + (block (result i32) + (global.set $$a (br_if 0 (i32.const 1) (local.get 0))) + (return (i32.const -1)) + ) + ) + + (memory 1) + (func (export "as-load-address") (result i32) + (block (result i32) (i32.load (br_if 0 (i32.const 1) (i32.const 1)))) + ) + (func (export "as-loadN-address") (result i32) + (block (result i32) (i32.load8_s (br_if 0 (i32.const 30) (i32.const 1)))) + ) + + (func (export "as-store-address") (result i32) + (block (result i32) + (i32.store (br_if 0 (i32.const 30) (i32.const 1)) (i32.const 7)) (i32.const -1) + ) + ) + (func (export "as-store-value") (result i32) + (block (result i32) + (i32.store (i32.const 2) (br_if 0 (i32.const 31) (i32.const 1))) (i32.const -1) + ) + ) + + (func (export "as-storeN-address") (result i32) + (block (result i32) + (i32.store8 (br_if 0 (i32.const 32) (i32.const 1)) (i32.const 7)) (i32.const -1) + ) + ) + (func (export "as-storeN-value") (result i32) + (block (result i32) + (i32.store16 (i32.const 2) (br_if 0 (i32.const 33) (i32.const 1))) (i32.const -1) + ) + ) + + (func (export "as-unary-operand") (result f64) + (block (result f64) (f64.neg (br_if 0 (f64.const 1.0) (i32.const 1)))) + ) + (func (export "as-binary-left") (result i32) + (block (result i32) (i32.add (br_if 0 (i32.const 1) (i32.const 1)) (i32.const 10))) + ) + (func (export "as-binary-right") (result i32) + (block (result i32) (i32.sub (i32.const 10) (br_if 0 (i32.const 1) (i32.const 1)))) + ) + (func (export "as-test-operand") (result i32) + (block (result i32) (i32.eqz (br_if 0 (i32.const 0) (i32.const 1)))) + ) + (func (export "as-compare-left") (result i32) + (block (result i32) (i32.le_u (br_if 0 (i32.const 1) (i32.const 1)) (i32.const 10))) + ) + (func (export "as-compare-right") (result i32) + (block (result i32) (i32.ne (i32.const 10) (br_if 0 (i32.const 1) (i32.const 42)))) + ) + + (func (export "as-memory.grow-size") (result i32) + (block (result i32) (memory.grow (br_if 0 (i32.const 1) (i32.const 1)))) + ) + + (func (export "nested-block-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (i32.add + (i32.const 4) + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) + (i32.const 16) + ) + ) + ) + ) + ) + + (func (export "nested-br-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (br 0 + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4) + ) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_if-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (drop (br_if 0 + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4) + ) + (i32.const 1) + )) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_if-value-cond") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (drop (br_if 0 + (i32.const 4) + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 1) + ) + )) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_table-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (br_table 0 + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4) + ) + (i32.const 1) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_table-value-index") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (br_table 0 + (i32.const 4) + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 1) + ) + ) + (i32.const 16) + ) + ) + ) + +)`); + +// ./test/core/br_if.wast:372 +assert_return(() => invoke($0, `type-i32`, []), []); + +// ./test/core/br_if.wast:373 +assert_return(() => invoke($0, `type-i64`, []), []); + +// ./test/core/br_if.wast:374 +assert_return(() => invoke($0, `type-f32`, []), []); + +// ./test/core/br_if.wast:375 +assert_return(() => invoke($0, `type-f64`, []), []); + +// ./test/core/br_if.wast:377 +assert_return(() => invoke($0, `type-i32-value`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:378 +assert_return(() => invoke($0, `type-i64-value`, []), [value("i64", 2n)]); + +// ./test/core/br_if.wast:379 +assert_return(() => invoke($0, `type-f32-value`, []), [value("f32", 3)]); + +// ./test/core/br_if.wast:380 +assert_return(() => invoke($0, `type-f64-value`, []), [value("f64", 4)]); + +// ./test/core/br_if.wast:382 +assert_return(() => invoke($0, `as-block-first`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:383 +assert_return(() => invoke($0, `as-block-first`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:384 +assert_return(() => invoke($0, `as-block-mid`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:385 +assert_return(() => invoke($0, `as-block-mid`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:386 +assert_return(() => invoke($0, `as-block-last`, [0]), []); + +// ./test/core/br_if.wast:387 +assert_return(() => invoke($0, `as-block-last`, [1]), []); + +// ./test/core/br_if.wast:389 +assert_return(() => invoke($0, `as-block-first-value`, [0]), [value("i32", 11)]); + +// ./test/core/br_if.wast:390 +assert_return(() => invoke($0, `as-block-first-value`, [1]), [value("i32", 10)]); + +// ./test/core/br_if.wast:391 +assert_return(() => invoke($0, `as-block-mid-value`, [0]), [value("i32", 21)]); + +// ./test/core/br_if.wast:392 +assert_return(() => invoke($0, `as-block-mid-value`, [1]), [value("i32", 20)]); + +// ./test/core/br_if.wast:393 +assert_return(() => invoke($0, `as-block-last-value`, [0]), [value("i32", 11)]); + +// ./test/core/br_if.wast:394 +assert_return(() => invoke($0, `as-block-last-value`, [1]), [value("i32", 11)]); + +// ./test/core/br_if.wast:396 +assert_return(() => invoke($0, `as-loop-first`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:397 +assert_return(() => invoke($0, `as-loop-first`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:398 +assert_return(() => invoke($0, `as-loop-mid`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:399 +assert_return(() => invoke($0, `as-loop-mid`, [1]), [value("i32", 4)]); + +// ./test/core/br_if.wast:400 +assert_return(() => invoke($0, `as-loop-last`, [0]), []); + +// ./test/core/br_if.wast:401 +assert_return(() => invoke($0, `as-loop-last`, [1]), []); + +// ./test/core/br_if.wast:403 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:405 +assert_return(() => invoke($0, `as-br_if-cond`, []), []); + +// ./test/core/br_if.wast:406 +assert_return(() => invoke($0, `as-br_if-value`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:407 +assert_return(() => invoke($0, `as-br_if-value-cond`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:408 +assert_return(() => invoke($0, `as-br_if-value-cond`, [1]), [value("i32", 1)]); + +// ./test/core/br_if.wast:410 +assert_return(() => invoke($0, `as-br_table-index`, []), []); + +// ./test/core/br_if.wast:411 +assert_return(() => invoke($0, `as-br_table-value`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:412 +assert_return(() => invoke($0, `as-br_table-value-index`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:414 +assert_return(() => invoke($0, `as-return-value`, []), [value("i64", 1n)]); + +// ./test/core/br_if.wast:416 +assert_return(() => invoke($0, `as-if-cond`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:417 +assert_return(() => invoke($0, `as-if-cond`, [1]), [value("i32", 1)]); + +// ./test/core/br_if.wast:418 +assert_return(() => invoke($0, `as-if-then`, [0, 0]), []); + +// ./test/core/br_if.wast:419 +assert_return(() => invoke($0, `as-if-then`, [4, 0]), []); + +// ./test/core/br_if.wast:420 +assert_return(() => invoke($0, `as-if-then`, [0, 1]), []); + +// ./test/core/br_if.wast:421 +assert_return(() => invoke($0, `as-if-then`, [4, 1]), []); + +// ./test/core/br_if.wast:422 +assert_return(() => invoke($0, `as-if-else`, [0, 0]), []); + +// ./test/core/br_if.wast:423 +assert_return(() => invoke($0, `as-if-else`, [3, 0]), []); + +// ./test/core/br_if.wast:424 +assert_return(() => invoke($0, `as-if-else`, [0, 1]), []); + +// ./test/core/br_if.wast:425 +assert_return(() => invoke($0, `as-if-else`, [3, 1]), []); + +// ./test/core/br_if.wast:427 +assert_return(() => invoke($0, `as-select-first`, [0]), [value("i32", 3)]); + +// ./test/core/br_if.wast:428 +assert_return(() => invoke($0, `as-select-first`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:429 +assert_return(() => invoke($0, `as-select-second`, [0]), [value("i32", 3)]); + +// ./test/core/br_if.wast:430 +assert_return(() => invoke($0, `as-select-second`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:431 +assert_return(() => invoke($0, `as-select-cond`, []), [value("i32", 3)]); + +// ./test/core/br_if.wast:433 +assert_return(() => invoke($0, `as-call-first`, []), [value("i32", 12)]); + +// ./test/core/br_if.wast:434 +assert_return(() => invoke($0, `as-call-mid`, []), [value("i32", 13)]); + +// ./test/core/br_if.wast:435 +assert_return(() => invoke($0, `as-call-last`, []), [value("i32", 14)]); + +// ./test/core/br_if.wast:437 +assert_return(() => invoke($0, `as-call_indirect-func`, []), [value("i32", 4)]); + +// ./test/core/br_if.wast:438 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 4)]); + +// ./test/core/br_if.wast:439 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 4)]); + +// ./test/core/br_if.wast:440 +assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", 4)]); + +// ./test/core/br_if.wast:442 +assert_return(() => invoke($0, `as-local.set-value`, [0]), [value("i32", -1)]); + +// ./test/core/br_if.wast:443 +assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 17)]); + +// ./test/core/br_if.wast:445 +assert_return(() => invoke($0, `as-local.tee-value`, [0]), [value("i32", -1)]); + +// ./test/core/br_if.wast:446 +assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 1)]); + +// ./test/core/br_if.wast:448 +assert_return(() => invoke($0, `as-global.set-value`, [0]), [value("i32", -1)]); + +// ./test/core/br_if.wast:449 +assert_return(() => invoke($0, `as-global.set-value`, [1]), [value("i32", 1)]); + +// ./test/core/br_if.wast:451 +assert_return(() => invoke($0, `as-load-address`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:452 +assert_return(() => invoke($0, `as-loadN-address`, []), [value("i32", 30)]); + +// ./test/core/br_if.wast:454 +assert_return(() => invoke($0, `as-store-address`, []), [value("i32", 30)]); + +// ./test/core/br_if.wast:455 +assert_return(() => invoke($0, `as-store-value`, []), [value("i32", 31)]); + +// ./test/core/br_if.wast:456 +assert_return(() => invoke($0, `as-storeN-address`, []), [value("i32", 32)]); + +// ./test/core/br_if.wast:457 +assert_return(() => invoke($0, `as-storeN-value`, []), [value("i32", 33)]); + +// ./test/core/br_if.wast:459 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("f64", 1)]); + +// ./test/core/br_if.wast:460 +assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:461 +assert_return(() => invoke($0, `as-binary-right`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:462 +assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 0)]); + +// ./test/core/br_if.wast:463 +assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:464 +assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:465 +assert_return(() => invoke($0, `as-memory.grow-size`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:467 +assert_return(() => invoke($0, `nested-block-value`, [0]), [value("i32", 21)]); + +// ./test/core/br_if.wast:468 +assert_return(() => invoke($0, `nested-block-value`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:469 +assert_return(() => invoke($0, `nested-br-value`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:470 +assert_return(() => invoke($0, `nested-br-value`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:471 +assert_return(() => invoke($0, `nested-br_if-value`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:472 +assert_return(() => invoke($0, `nested-br_if-value`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:473 +assert_return(() => invoke($0, `nested-br_if-value-cond`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:474 +assert_return(() => invoke($0, `nested-br_if-value-cond`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:475 +assert_return(() => invoke($0, `nested-br_table-value`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:476 +assert_return(() => invoke($0, `nested-br_table-value`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:477 +assert_return(() => invoke($0, `nested-br_table-value-index`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:478 +assert_return(() => invoke($0, `nested-br_table-value-index`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:480 +assert_invalid( + () => instantiate(`(module (func $$type-false-i32 (block (i32.ctz (br_if 0 (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:484 +assert_invalid( + () => instantiate(`(module (func $$type-false-i64 (block (i64.ctz (br_if 0 (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:488 +assert_invalid( + () => instantiate(`(module (func $$type-false-f32 (block (f32.neg (br_if 0 (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:492 +assert_invalid( + () => instantiate(`(module (func $$type-false-f64 (block (f64.neg (br_if 0 (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:497 +assert_invalid( + () => instantiate(`(module (func $$type-true-i32 (block (i32.ctz (br_if 0 (i32.const 1))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:501 +assert_invalid( + () => instantiate(`(module (func $$type-true-i64 (block (i64.ctz (br_if 0 (i64.const 1))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:505 +assert_invalid( + () => instantiate(`(module (func $$type-true-f32 (block (f32.neg (br_if 0 (f32.const 1))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:509 +assert_invalid( + () => instantiate(`(module (func $$type-true-f64 (block (f64.neg (br_if 0 (i64.const 1))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:514 +assert_invalid( + () => instantiate(`(module (func $$type-false-arg-void-vs-num (result i32) + (block (result i32) (br_if 0 (i32.const 0)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:520 +assert_invalid( + () => instantiate(`(module (func $$type-true-arg-void-vs-num (result i32) + (block (result i32) (br_if 0 (i32.const 1)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:526 +assert_invalid( + () => instantiate(`(module (func $$type-false-arg-num-vs-void + (block (br_if 0 (i32.const 0) (i32.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:532 +assert_invalid( + () => instantiate(`(module (func $$type-true-arg-num-vs-void + (block (br_if 0 (i32.const 0) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:539 +assert_invalid( + () => instantiate(`(module (func $$type-false-arg-void-vs-num (result i32) + (block (result i32) (br_if 0 (nop) (i32.const 0)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:545 +assert_invalid( + () => instantiate(`(module (func $$type-true-arg-void-vs-num (result i32) + (block (result i32) (br_if 0 (nop) (i32.const 1)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:551 +assert_invalid( + () => instantiate(`(module (func $$type-false-arg-num-vs-num (result i32) + (block (result i32) + (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1) + ) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:559 +assert_invalid( + () => instantiate(`(module (func $$type-true-arg-num-vs-num (result i32) + (block (result i32) + (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1) + ) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:568 +assert_invalid( + () => instantiate(`(module (func $$type-cond-empty-vs-i32 + (block (br_if 0)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:574 +assert_invalid( + () => instantiate(`(module (func $$type-cond-void-vs-i32 + (block (br_if 0 (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:580 +assert_invalid( + () => instantiate(`(module (func $$type-cond-num-vs-i32 + (block (br_if 0 (i64.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:586 +assert_invalid( + () => instantiate(`(module (func $$type-arg-cond-void-vs-i32 (result i32) + (block (result i32) (br_if 0 (i32.const 0) (nop)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:592 +assert_invalid( + () => instantiate(`(module (func $$type-arg-void-vs-num-nested (result i32) + (block (result i32) (i32.const 0) (block (br_if 1 (i32.const 1)))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:598 +assert_invalid( + () => instantiate(`(module (func $$type-arg-cond-num-vs-i32 (result i32) + (block (result i32) (br_if 0 (i32.const 0) (i64.const 0)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:605 +assert_invalid( + () => instantiate(`(module + (func $$type-1st-cond-empty-in-then + (block + (i32.const 0) (i32.const 0) + (if (result i32) (then (br_if 0))) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br_if.wast:617 +assert_invalid( + () => instantiate(`(module + (func $$type-2nd-cond-empty-in-then + (block + (i32.const 0) (i32.const 0) + (if (result i32) (then (br_if 0 (i32.const 1)))) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br_if.wast:629 +assert_invalid( + () => instantiate(`(module + (func $$type-1st-cond-empty-in-return + (block (result i32) + (return (br_if 0)) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br_if.wast:640 +assert_invalid( + () => instantiate(`(module + (func $$type-2nd-cond-empty-in-return + (block (result i32) + (return (br_if 0 (i32.const 1))) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br_if.wast:653 +assert_invalid( + () => instantiate(`(module (func $$unbound-label (br_if 1 (i32.const 1))))`), + `unknown label`, +); + +// ./test/core/br_if.wast:657 +assert_invalid( + () => instantiate(`(module (func $$unbound-nested-label (block (block (br_if 5 (i32.const 1))))))`), + `unknown label`, +); + +// ./test/core/br_if.wast:661 +assert_invalid( + () => instantiate(`(module (func $$large-label (br_if 0x10000001 (i32.const 1))))`), + `unknown label`, +); diff --git a/js/src/jit-test/tests/wasm/spec/function-references/br_on_non_null.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/br_on_non_null.wast.js new file mode 100644 index 0000000000..16a778a8e4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/br_on_non_null.wast.js @@ -0,0 +1,101 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/br_on_non_null.wast + +// ./test/core/br_on_non_null.wast:1 +let $0 = instantiate(`(module + (type $$t (func (result i32))) + + (func $$nn (param $$r (ref $$t)) (result i32) + (call_ref $$t + (block $$l (result (ref $$t)) + (br_on_non_null $$l (local.get $$r)) + (return (i32.const -1)) + ) + ) + ) + (func $$n (param $$r (ref null $$t)) (result i32) + (call_ref $$t + (block $$l (result (ref $$t)) + (br_on_non_null $$l (local.get $$r)) + (return (i32.const -1)) + ) + ) + ) + + (elem func $$f) + (func $$f (result i32) (i32.const 7)) + + (func (export "nullable-null") (result i32) (call $$n (ref.null $$t))) + (func (export "nonnullable-f") (result i32) (call $$nn (ref.func $$f))) + (func (export "nullable-f") (result i32) (call $$n (ref.func $$f))) + + (func (export "unreachable") (result i32) + (block $$l (result (ref $$t)) + (br_on_non_null $$l (unreachable)) + (return (i32.const -1)) + ) + (call_ref $$t) + ) +)`); + +// ./test/core/br_on_non_null.wast:37 +assert_trap(() => invoke($0, `unreachable`, []), `unreachable`); + +// ./test/core/br_on_non_null.wast:39 +assert_return(() => invoke($0, `nullable-null`, []), [value("i32", -1)]); + +// ./test/core/br_on_non_null.wast:40 +assert_return(() => invoke($0, `nonnullable-f`, []), [value("i32", 7)]); + +// ./test/core/br_on_non_null.wast:41 +assert_return(() => invoke($0, `nullable-f`, []), [value("i32", 7)]); + +// ./test/core/br_on_non_null.wast:43 +let $1 = instantiate(`(module + (type $$t (func)) + (func (param $$r (ref null $$t)) (drop (block (result (ref $$t)) (br_on_non_null 0 (local.get $$r)) (unreachable)))) + (func (param $$r (ref null func)) (drop (block (result (ref func)) (br_on_non_null 0 (local.get $$r)) (unreachable)))) + (func (param $$r (ref null extern)) (drop (block (result (ref extern)) (br_on_non_null 0 (local.get $$r)) (unreachable)))) +)`); + +// ./test/core/br_on_non_null.wast:51 +let $2 = instantiate(`(module + (type $$t (func (param i32) (result i32))) + (elem func $$f) + (func $$f (param i32) (result i32) (i32.mul (local.get 0) (local.get 0))) + + (func $$a (param $$n i32) (param $$r (ref null $$t)) (result i32) + (call_ref $$t + (block $$l (result i32 (ref $$t)) + (return (br_on_non_null $$l (local.get $$n) (local.get $$r))) + ) + ) + ) + + (func (export "args-null") (param $$n i32) (result i32) + (call $$a (local.get $$n) (ref.null $$t)) + ) + (func (export "args-f") (param $$n i32) (result i32) + (call $$a (local.get $$n) (ref.func $$f)) + ) +)`); + +// ./test/core/br_on_non_null.wast:72 +assert_return(() => invoke($2, `args-null`, [3]), [value("i32", 3)]); + +// ./test/core/br_on_non_null.wast:73 +assert_return(() => invoke($2, `args-f`, [3]), [value("i32", 9)]); diff --git a/js/src/jit-test/tests/wasm/spec/function-references/br_on_null.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/br_on_null.wast.js new file mode 100644 index 0000000000..3335e22930 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/br_on_null.wast.js @@ -0,0 +1,94 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/br_on_null.wast + +// ./test/core/br_on_null.wast:1 +let $0 = instantiate(`(module + (type $$t (func (result i32))) + + (func $$nn (param $$r (ref $$t)) (result i32) + (block $$l + (return (call_ref $$t (br_on_null $$l (local.get $$r)))) + ) + (i32.const -1) + ) + (func $$n (param $$r (ref null $$t)) (result i32) + (block $$l + (return (call_ref $$t (br_on_null $$l (local.get $$r)))) + ) + (i32.const -1) + ) + + (elem func $$f) + (func $$f (result i32) (i32.const 7)) + + (func (export "nullable-null") (result i32) (call $$n (ref.null $$t))) + (func (export "nonnullable-f") (result i32) (call $$nn (ref.func $$f))) + (func (export "nullable-f") (result i32) (call $$n (ref.func $$f))) + + (func (export "unreachable") (result i32) + (block $$l + (return (call_ref $$t (br_on_null $$l (unreachable)))) + ) + (i32.const -1) + ) +)`); + +// ./test/core/br_on_null.wast:32 +assert_trap(() => invoke($0, `unreachable`, []), `unreachable`); + +// ./test/core/br_on_null.wast:34 +assert_return(() => invoke($0, `nullable-null`, []), [value("i32", -1)]); + +// ./test/core/br_on_null.wast:35 +assert_return(() => invoke($0, `nonnullable-f`, []), [value("i32", 7)]); + +// ./test/core/br_on_null.wast:36 +assert_return(() => invoke($0, `nullable-f`, []), [value("i32", 7)]); + +// ./test/core/br_on_null.wast:38 +let $1 = instantiate(`(module + (type $$t (func)) + (func (param $$r (ref null $$t)) (drop (br_on_null 0 (local.get $$r)))) + (func (param $$r (ref null func)) (drop (br_on_null 0 (local.get $$r)))) + (func (param $$r (ref null extern)) (drop (br_on_null 0 (local.get $$r)))) +)`); + +// ./test/core/br_on_null.wast:46 +let $2 = instantiate(`(module + (type $$t (func (param i32) (result i32))) + (elem func $$f) + (func $$f (param i32) (result i32) (i32.mul (local.get 0) (local.get 0))) + + (func $$a (param $$n i32) (param $$r (ref null $$t)) (result i32) + (block $$l (result i32) + (return (call_ref $$t (br_on_null $$l (local.get $$n) (local.get $$r)))) + ) + ) + + (func (export "args-null") (param $$n i32) (result i32) + (call $$a (local.get $$n) (ref.null $$t)) + ) + (func (export "args-f") (param $$n i32) (result i32) + (call $$a (local.get $$n) (ref.func $$f)) + ) +)`); + +// ./test/core/br_on_null.wast:65 +assert_return(() => invoke($2, `args-null`, [3]), [value("i32", 3)]); + +// ./test/core/br_on_null.wast:66 +assert_return(() => invoke($2, `args-f`, [3]), [value("i32", 9)]); diff --git a/js/src/jit-test/tests/wasm/spec/function-references/call_ref.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/call_ref.wast.js new file mode 100644 index 0000000000..4b430e1dae --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/call_ref.wast.js @@ -0,0 +1,275 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/call_ref.wast + +// ./test/core/call_ref.wast:1 +let $0 = instantiate(`(module + (type $$ii (func (param i32) (result i32))) + + (func $$apply (param $$f (ref $$ii)) (param $$x i32) (result i32) + (call_ref $$ii (local.get $$x) (local.get $$f)) + ) + + (func $$f (type $$ii) (i32.mul (local.get 0) (local.get 0))) + (func $$g (type $$ii) (i32.sub (i32.const 0) (local.get 0))) + + (elem declare func $$f $$g) + + (func (export "run") (param $$x i32) (result i32) + (local $$rf (ref null $$ii)) + (local $$rg (ref null $$ii)) + (local.set $$rf (ref.func $$f)) + (local.set $$rg (ref.func $$g)) + (call_ref $$ii (call_ref $$ii (local.get $$x) (local.get $$rf)) (local.get $$rg)) + ) + + (func (export "null") (result i32) + (call_ref $$ii (i32.const 1) (ref.null $$ii)) + ) + + ;; Recursion + + (type $$ll (func (param i64) (result i64))) + (type $$lll (func (param i64 i64) (result i64))) + + (elem declare func $$fac) + (global $$fac (ref $$ll) (ref.func $$fac)) + + (func $$fac (export "fac") (type $$ll) + (if (result i64) (i64.eqz (local.get 0)) + (then (i64.const 1)) + (else + (i64.mul + (local.get 0) + (call_ref $$ll (i64.sub (local.get 0) (i64.const 1)) (global.get $$fac)) + ) + ) + ) + ) + + (elem declare func $$fac-acc) + (global $$fac-acc (ref $$lll) (ref.func $$fac-acc)) + + (func $$fac-acc (export "fac-acc") (type $$lll) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (call_ref $$lll + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + (global.get $$fac-acc) + ) + ) + ) + ) + + (elem declare func $$fib) + (global $$fib (ref $$ll) (ref.func $$fib)) + + (func $$fib (export "fib") (type $$ll) + (if (result i64) (i64.le_u (local.get 0) (i64.const 1)) + (then (i64.const 1)) + (else + (i64.add + (call_ref $$ll (i64.sub (local.get 0) (i64.const 2)) (global.get $$fib)) + (call_ref $$ll (i64.sub (local.get 0) (i64.const 1)) (global.get $$fib)) + ) + ) + ) + ) + + (elem declare func $$even $$odd) + (global $$even (ref $$ll) (ref.func $$even)) + (global $$odd (ref $$ll) (ref.func $$odd)) + + (func $$even (export "even") (type $$ll) + (if (result i64) (i64.eqz (local.get 0)) + (then (i64.const 44)) + (else (call_ref $$ll (i64.sub (local.get 0) (i64.const 1)) (global.get $$odd))) + ) + ) + (func $$odd (export "odd") (type $$ll) + (if (result i64) (i64.eqz (local.get 0)) + (then (i64.const 99)) + (else (call_ref $$ll (i64.sub (local.get 0) (i64.const 1)) (global.get $$even))) + ) + ) +)`); + +// ./test/core/call_ref.wast:94 +assert_return(() => invoke($0, `run`, [0]), [value("i32", 0)]); + +// ./test/core/call_ref.wast:95 +assert_return(() => invoke($0, `run`, [3]), [value("i32", -9)]); + +// ./test/core/call_ref.wast:97 +assert_trap(() => invoke($0, `null`, []), `null function`); + +// ./test/core/call_ref.wast:99 +assert_return(() => invoke($0, `fac`, [0n]), [value("i64", 1n)]); + +// ./test/core/call_ref.wast:100 +assert_return(() => invoke($0, `fac`, [1n]), [value("i64", 1n)]); + +// ./test/core/call_ref.wast:101 +assert_return(() => invoke($0, `fac`, [5n]), [value("i64", 120n)]); + +// ./test/core/call_ref.wast:102 +assert_return(() => invoke($0, `fac`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/call_ref.wast:103 +assert_return(() => invoke($0, `fac-acc`, [0n, 1n]), [value("i64", 1n)]); + +// ./test/core/call_ref.wast:104 +assert_return(() => invoke($0, `fac-acc`, [1n, 1n]), [value("i64", 1n)]); + +// ./test/core/call_ref.wast:105 +assert_return(() => invoke($0, `fac-acc`, [5n, 1n]), [value("i64", 120n)]); + +// ./test/core/call_ref.wast:106 +assert_return(() => invoke($0, `fac-acc`, [25n, 1n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/call_ref.wast:111 +assert_return(() => invoke($0, `fib`, [0n]), [value("i64", 1n)]); + +// ./test/core/call_ref.wast:112 +assert_return(() => invoke($0, `fib`, [1n]), [value("i64", 1n)]); + +// ./test/core/call_ref.wast:113 +assert_return(() => invoke($0, `fib`, [2n]), [value("i64", 2n)]); + +// ./test/core/call_ref.wast:114 +assert_return(() => invoke($0, `fib`, [5n]), [value("i64", 8n)]); + +// ./test/core/call_ref.wast:115 +assert_return(() => invoke($0, `fib`, [20n]), [value("i64", 10946n)]); + +// ./test/core/call_ref.wast:117 +assert_return(() => invoke($0, `even`, [0n]), [value("i64", 44n)]); + +// ./test/core/call_ref.wast:118 +assert_return(() => invoke($0, `even`, [1n]), [value("i64", 99n)]); + +// ./test/core/call_ref.wast:119 +assert_return(() => invoke($0, `even`, [100n]), [value("i64", 44n)]); + +// ./test/core/call_ref.wast:120 +assert_return(() => invoke($0, `even`, [77n]), [value("i64", 99n)]); + +// ./test/core/call_ref.wast:121 +assert_return(() => invoke($0, `odd`, [0n]), [value("i64", 99n)]); + +// ./test/core/call_ref.wast:122 +assert_return(() => invoke($0, `odd`, [1n]), [value("i64", 44n)]); + +// ./test/core/call_ref.wast:123 +assert_return(() => invoke($0, `odd`, [200n]), [value("i64", 99n)]); + +// ./test/core/call_ref.wast:124 +assert_return(() => invoke($0, `odd`, [77n]), [value("i64", 44n)]); + +// ./test/core/call_ref.wast:129 +let $1 = instantiate(`(module + (type $$t (func)) + (func (export "unreachable") (result i32) + (unreachable) + (call_ref $$t) + ) +)`); + +// ./test/core/call_ref.wast:136 +assert_trap(() => invoke($1, `unreachable`, []), `unreachable`); + +// ./test/core/call_ref.wast:138 +let $2 = instantiate(`(module + (elem declare func $$f) + (type $$t (func (param i32) (result i32))) + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "unreachable") (result i32) + (unreachable) + (ref.func $$f) + (call_ref $$t) + ) +)`); + +// ./test/core/call_ref.wast:149 +assert_trap(() => invoke($2, `unreachable`, []), `unreachable`); + +// ./test/core/call_ref.wast:151 +let $3 = instantiate(`(module + (elem declare func $$f) + (type $$t (func (param i32) (result i32))) + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "unreachable") (result i32) + (unreachable) + (i32.const 0) + (ref.func $$f) + (call_ref $$t) + (drop) + (i32.const 0) + ) +)`); + +// ./test/core/call_ref.wast:165 +assert_trap(() => invoke($3, `unreachable`, []), `unreachable`); + +// ./test/core/call_ref.wast:167 +assert_invalid( + () => instantiate(`(module + (elem declare func $$f) + (type $$t (func (param i32) (result i32))) + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "unreachable") (result i32) + (unreachable) + (i64.const 0) + (ref.func $$f) + (call_ref $$t) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_ref.wast:183 +assert_invalid( + () => instantiate(`(module + (elem declare func $$f) + (type $$t (func (param i32) (result i32))) + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "unreachable") (result i32) + (unreachable) + (ref.func $$f) + (call_ref $$t) + (drop) + (i64.const 0) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_ref.wast:200 +assert_invalid( + () => instantiate(`(module + (type $$t (func)) + (func $$f (param $$r externref) + (call_ref $$t (local.get $$r)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/function-references/directives.txt b/js/src/jit-test/tests/wasm/spec/function-references/directives.txt new file mode 100644 index 0000000000..bb76560525 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-function-references; skip-if: !wasmFunctionReferencesEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/function-references/func.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/func.wast.js new file mode 100644 index 0000000000..8521cbbd18 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/func.wast.js @@ -0,0 +1,1240 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/func.wast + +// ./test/core/func.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definition + (type $$sig (func)) + (func $$dummy) + + ;; Syntax + + (func) + (func (export "f")) + (func $$f) + (func $$h (export "g")) + + (func (local)) + (func (local) (local)) + (func (local i32)) + (func (local $$x i32)) + (func (local i32 f64 i64)) + (func (local i32) (local f64)) + (func (local i32 f32) (local $$x i64) (local) (local i32 f64)) + + (func (param)) + (func (param) (param)) + (func (param i32)) + (func (param $$x i32)) + (func (param i32 f64 i64)) + (func (param i32) (param f64)) + (func (param i32 f32) (param $$x i64) (param) (param i32 f64)) + + (func (result)) + (func (result) (result)) + (func (result i32) (unreachable)) + (func (result i32 f64 f32) (unreachable)) + (func (result i32) (result f64) (unreachable)) + (func (result i32 f32) (result i64) (result) (result i32 f64) (unreachable)) + + (type $$sig-1 (func)) + (type $$sig-2 (func (result i32))) + (type $$sig-3 (func (param $$x i32))) + (type $$sig-4 (func (param i32 f64 i32) (result i32))) + + (func (export "type-use-1") (type $$sig-1)) + (func (export "type-use-2") (type $$sig-2) (i32.const 0)) + (func (export "type-use-3") (type $$sig-3)) + (func (export "type-use-4") (type $$sig-4) (i32.const 0)) + (func (export "type-use-5") (type $$sig-2) (result i32) (i32.const 0)) + (func (export "type-use-6") (type $$sig-3) (param i32)) + (func (export "type-use-7") + (type $$sig-4) (param i32) (param f64 i32) (result i32) (i32.const 0) + ) + + (func (type $$sig)) + (func (type $$forward)) ;; forward reference + + (func $$complex + (param i32 f32) (param $$x i64) (param) (param i32) + (result) (result i32) (result) (result i64 i32) + (local f32) (local $$y i32) (local i64 i32) (local) (local f64 i32) + (unreachable) (unreachable) + ) + (func $$complex-sig + (type $$sig) + (local f32) (local $$y i32) (local i64 i32) (local) (local f64 i32) + (unreachable) (unreachable) + ) + + (type $$forward (func)) + + ;; Typing of locals + + (func (export "local-first-i32") (result i32) (local i32 i32) (local.get 0)) + (func (export "local-first-i64") (result i64) (local i64 i64) (local.get 0)) + (func (export "local-first-f32") (result f32) (local f32 f32) (local.get 0)) + (func (export "local-first-f64") (result f64) (local f64 f64) (local.get 0)) + (func (export "local-second-i32") (result i32) (local i32 i32) (local.get 1)) + (func (export "local-second-i64") (result i64) (local i64 i64) (local.get 1)) + (func (export "local-second-f32") (result f32) (local f32 f32) (local.get 1)) + (func (export "local-second-f64") (result f64) (local f64 f64) (local.get 1)) + (func (export "local-mixed") (result f64) + (local f32) (local $$x i32) (local i64 i32) (local) (local f64 i32) + (drop (f32.neg (local.get 0))) + (drop (i32.eqz (local.get 1))) + (drop (i64.eqz (local.get 2))) + (drop (i32.eqz (local.get 3))) + (drop (f64.neg (local.get 4))) + (drop (i32.eqz (local.get 5))) + (local.get 4) + ) + + ;; Typing of parameters + + (func (export "param-first-i32") (param i32 i32) (result i32) (local.get 0)) + (func (export "param-first-i64") (param i64 i64) (result i64) (local.get 0)) + (func (export "param-first-f32") (param f32 f32) (result f32) (local.get 0)) + (func (export "param-first-f64") (param f64 f64) (result f64) (local.get 0)) + (func (export "param-second-i32") (param i32 i32) (result i32) (local.get 1)) + (func (export "param-second-i64") (param i64 i64) (result i64) (local.get 1)) + (func (export "param-second-f32") (param f32 f32) (result f32) (local.get 1)) + (func (export "param-second-f64") (param f64 f64) (result f64) (local.get 1)) + (func (export "param-mixed") (param f32 i32) (param) (param $$x i64) (param i32 f64 i32) + (result f64) + (drop (f32.neg (local.get 0))) + (drop (i32.eqz (local.get 1))) + (drop (i64.eqz (local.get 2))) + (drop (i32.eqz (local.get 3))) + (drop (f64.neg (local.get 4))) + (drop (i32.eqz (local.get 5))) + (local.get 4) + ) + + ;; Typing of results + + (func (export "empty")) + (func (export "value-void") (call $$dummy)) + (func (export "value-i32") (result i32) (i32.const 77)) + (func (export "value-i64") (result i64) (i64.const 7777)) + (func (export "value-f32") (result f32) (f32.const 77.7)) + (func (export "value-f64") (result f64) (f64.const 77.77)) + (func (export "value-i32-f64") (result i32 f64) (i32.const 77) (f64.const 7)) + (func (export "value-i32-i32-i32") (result i32 i32 i32) + (i32.const 1) (i32.const 2) (i32.const 3) + ) + (func (export "value-block-void") (block (call $$dummy) (call $$dummy))) + (func (export "value-block-i32") (result i32) + (block (result i32) (call $$dummy) (i32.const 77)) + ) + (func (export "value-block-i32-i64") (result i32 i64) + (block (result i32 i64) (call $$dummy) (i32.const 1) (i64.const 2)) + ) + + (func (export "return-empty") (return)) + (func (export "return-i32") (result i32) (return (i32.const 78))) + (func (export "return-i64") (result i64) (return (i64.const 7878))) + (func (export "return-f32") (result f32) (return (f32.const 78.7))) + (func (export "return-f64") (result f64) (return (f64.const 78.78))) + (func (export "return-i32-f64") (result i32 f64) + (return (i32.const 78) (f64.const 78.78)) + ) + (func (export "return-i32-i32-i32") (result i32 i32 i32) + (return (i32.const 1) (i32.const 2) (i32.const 3)) + ) + (func (export "return-block-i32") (result i32) + (return (block (result i32) (call $$dummy) (i32.const 77))) + ) + (func (export "return-block-i32-i64") (result i32 i64) + (return (block (result i32 i64) (call $$dummy) (i32.const 1) (i64.const 2))) + ) + + (func (export "break-empty") (br 0)) + (func (export "break-i32") (result i32) (br 0 (i32.const 79))) + (func (export "break-i64") (result i64) (br 0 (i64.const 7979))) + (func (export "break-f32") (result f32) (br 0 (f32.const 79.9))) + (func (export "break-f64") (result f64) (br 0 (f64.const 79.79))) + (func (export "break-i32-f64") (result i32 f64) + (br 0 (i32.const 79) (f64.const 79.79)) + ) + (func (export "break-i32-i32-i32") (result i32 i32 i32) + (br 0 (i32.const 1) (i32.const 2) (i32.const 3)) + ) + (func (export "break-block-i32") (result i32) + (br 0 (block (result i32) (call $$dummy) (i32.const 77))) + ) + (func (export "break-block-i32-i64") (result i32 i64) + (br 0 (block (result i32 i64) (call $$dummy) (i32.const 1) (i64.const 2))) + ) + + (func (export "break-br_if-empty") (param i32) + (br_if 0 (local.get 0)) + ) + (func (export "break-br_if-num") (param i32) (result i32) + (drop (br_if 0 (i32.const 50) (local.get 0))) (i32.const 51) + ) + (func (export "break-br_if-num-num") (param i32) (result i32 i64) + (drop (drop (br_if 0 (i32.const 50) (i64.const 51) (local.get 0)))) + (i32.const 51) (i64.const 52) + ) + + (func (export "break-br_table-empty") (param i32) + (br_table 0 0 0 (local.get 0)) + ) + (func (export "break-br_table-num") (param i32) (result i32) + (br_table 0 0 (i32.const 50) (local.get 0)) (i32.const 51) + ) + (func (export "break-br_table-num-num") (param i32) (result f32 i64) + (br_table 0 0 (f32.const 50) (i64.const 51) (local.get 0)) + (f32.const 51) (i64.const 52) + ) + (func (export "break-br_table-nested-empty") (param i32) + (block (br_table 0 1 0 (local.get 0))) + ) + (func (export "break-br_table-nested-num") (param i32) (result i32) + (i32.add + (block (result i32) + (br_table 0 1 0 (i32.const 50) (local.get 0)) (i32.const 51) + ) + (i32.const 2) + ) + ) + (func (export "break-br_table-nested-num-num") (param i32) (result i32 i32) + (i32.add + (block (result i32 i32) + (br_table 0 1 0 (i32.const 50) (i32.const 51) (local.get 0)) + (i32.const 51) (i32.const -3) + ) + ) + (i32.const 52) + ) + + ;; Large signatures + + (func (export "large-sig") + (param i32 i64 f32 f32 i32 f64 f32 i32 i32 i32 f32 f64 f64 f64 i32 i32 f32) + (result f64 f32 i32 i32 i32 i64 f32 i32 i32 f32 f64 f64 i32 f32 i32 f64) + (local.get 5) + (local.get 2) + (local.get 0) + (local.get 8) + (local.get 7) + (local.get 1) + (local.get 3) + (local.get 9) + (local.get 4) + (local.get 6) + (local.get 13) + (local.get 11) + (local.get 15) + (local.get 16) + (local.get 14) + (local.get 12) + ) + + ;; Default initialization of locals + + (func (export "init-local-i32") (result i32) (local i32) (local.get 0)) + (func (export "init-local-i64") (result i64) (local i64) (local.get 0)) + (func (export "init-local-f32") (result f32) (local f32) (local.get 0)) + (func (export "init-local-f64") (result f64) (local f64) (local.get 0)) +)`); + +// ./test/core/func.wast:241 +assert_return(() => invoke($0, `type-use-1`, []), []); + +// ./test/core/func.wast:242 +assert_return(() => invoke($0, `type-use-2`, []), [value("i32", 0)]); + +// ./test/core/func.wast:243 +assert_return(() => invoke($0, `type-use-3`, [1]), []); + +// ./test/core/func.wast:244 +assert_return(() => invoke($0, `type-use-4`, [1, value("f64", 1), 1]), [value("i32", 0)]); + +// ./test/core/func.wast:248 +assert_return(() => invoke($0, `type-use-5`, []), [value("i32", 0)]); + +// ./test/core/func.wast:249 +assert_return(() => invoke($0, `type-use-6`, [1]), []); + +// ./test/core/func.wast:250 +assert_return(() => invoke($0, `type-use-7`, [1, value("f64", 1), 1]), [value("i32", 0)]); + +// ./test/core/func.wast:255 +assert_return(() => invoke($0, `local-first-i32`, []), [value("i32", 0)]); + +// ./test/core/func.wast:256 +assert_return(() => invoke($0, `local-first-i64`, []), [value("i64", 0n)]); + +// ./test/core/func.wast:257 +assert_return(() => invoke($0, `local-first-f32`, []), [value("f32", 0)]); + +// ./test/core/func.wast:258 +assert_return(() => invoke($0, `local-first-f64`, []), [value("f64", 0)]); + +// ./test/core/func.wast:259 +assert_return(() => invoke($0, `local-second-i32`, []), [value("i32", 0)]); + +// ./test/core/func.wast:260 +assert_return(() => invoke($0, `local-second-i64`, []), [value("i64", 0n)]); + +// ./test/core/func.wast:261 +assert_return(() => invoke($0, `local-second-f32`, []), [value("f32", 0)]); + +// ./test/core/func.wast:262 +assert_return(() => invoke($0, `local-second-f64`, []), [value("f64", 0)]); + +// ./test/core/func.wast:263 +assert_return(() => invoke($0, `local-mixed`, []), [value("f64", 0)]); + +// ./test/core/func.wast:265 +assert_return(() => invoke($0, `param-first-i32`, [2, 3]), [value("i32", 2)]); + +// ./test/core/func.wast:268 +assert_return(() => invoke($0, `param-first-i64`, [2n, 3n]), [value("i64", 2n)]); + +// ./test/core/func.wast:271 +assert_return( + () => invoke($0, `param-first-f32`, [value("f32", 2), value("f32", 3)]), + [value("f32", 2)], +); + +// ./test/core/func.wast:274 +assert_return( + () => invoke($0, `param-first-f64`, [value("f64", 2), value("f64", 3)]), + [value("f64", 2)], +); + +// ./test/core/func.wast:277 +assert_return(() => invoke($0, `param-second-i32`, [2, 3]), [value("i32", 3)]); + +// ./test/core/func.wast:280 +assert_return(() => invoke($0, `param-second-i64`, [2n, 3n]), [value("i64", 3n)]); + +// ./test/core/func.wast:283 +assert_return( + () => invoke($0, `param-second-f32`, [value("f32", 2), value("f32", 3)]), + [value("f32", 3)], +); + +// ./test/core/func.wast:286 +assert_return( + () => invoke($0, `param-second-f64`, [value("f64", 2), value("f64", 3)]), + [value("f64", 3)], +); + +// ./test/core/func.wast:290 +assert_return( + () => invoke($0, `param-mixed`, [value("f32", 1), 2, 3n, 4, value("f64", 5.5), 6]), + [value("f64", 5.5)], +); + +// ./test/core/func.wast:298 +assert_return(() => invoke($0, `empty`, []), []); + +// ./test/core/func.wast:299 +assert_return(() => invoke($0, `value-void`, []), []); + +// ./test/core/func.wast:300 +assert_return(() => invoke($0, `value-i32`, []), [value("i32", 77)]); + +// ./test/core/func.wast:301 +assert_return(() => invoke($0, `value-i64`, []), [value("i64", 7777n)]); + +// ./test/core/func.wast:302 +assert_return(() => invoke($0, `value-f32`, []), [value("f32", 77.7)]); + +// ./test/core/func.wast:303 +assert_return(() => invoke($0, `value-f64`, []), [value("f64", 77.77)]); + +// ./test/core/func.wast:304 +assert_return(() => invoke($0, `value-i32-f64`, []), [value("i32", 77), value("f64", 7)]); + +// ./test/core/func.wast:305 +assert_return( + () => invoke($0, `value-i32-i32-i32`, []), + [value("i32", 1), value("i32", 2), value("i32", 3)], +); + +// ./test/core/func.wast:308 +assert_return(() => invoke($0, `value-block-void`, []), []); + +// ./test/core/func.wast:309 +assert_return(() => invoke($0, `value-block-i32`, []), [value("i32", 77)]); + +// ./test/core/func.wast:310 +assert_return(() => invoke($0, `value-block-i32-i64`, []), [value("i32", 1), value("i64", 2n)]); + +// ./test/core/func.wast:312 +assert_return(() => invoke($0, `return-empty`, []), []); + +// ./test/core/func.wast:313 +assert_return(() => invoke($0, `return-i32`, []), [value("i32", 78)]); + +// ./test/core/func.wast:314 +assert_return(() => invoke($0, `return-i64`, []), [value("i64", 7878n)]); + +// ./test/core/func.wast:315 +assert_return(() => invoke($0, `return-f32`, []), [value("f32", 78.7)]); + +// ./test/core/func.wast:316 +assert_return(() => invoke($0, `return-f64`, []), [value("f64", 78.78)]); + +// ./test/core/func.wast:317 +assert_return(() => invoke($0, `return-i32-f64`, []), [value("i32", 78), value("f64", 78.78)]); + +// ./test/core/func.wast:318 +assert_return( + () => invoke($0, `return-i32-i32-i32`, []), + [value("i32", 1), value("i32", 2), value("i32", 3)], +); + +// ./test/core/func.wast:321 +assert_return(() => invoke($0, `return-block-i32`, []), [value("i32", 77)]); + +// ./test/core/func.wast:322 +assert_return(() => invoke($0, `return-block-i32-i64`, []), [value("i32", 1), value("i64", 2n)]); + +// ./test/core/func.wast:324 +assert_return(() => invoke($0, `break-empty`, []), []); + +// ./test/core/func.wast:325 +assert_return(() => invoke($0, `break-i32`, []), [value("i32", 79)]); + +// ./test/core/func.wast:326 +assert_return(() => invoke($0, `break-i64`, []), [value("i64", 7979n)]); + +// ./test/core/func.wast:327 +assert_return(() => invoke($0, `break-f32`, []), [value("f32", 79.9)]); + +// ./test/core/func.wast:328 +assert_return(() => invoke($0, `break-f64`, []), [value("f64", 79.79)]); + +// ./test/core/func.wast:329 +assert_return(() => invoke($0, `break-i32-f64`, []), [value("i32", 79), value("f64", 79.79)]); + +// ./test/core/func.wast:330 +assert_return( + () => invoke($0, `break-i32-i32-i32`, []), + [value("i32", 1), value("i32", 2), value("i32", 3)], +); + +// ./test/core/func.wast:333 +assert_return(() => invoke($0, `break-block-i32`, []), [value("i32", 77)]); + +// ./test/core/func.wast:334 +assert_return(() => invoke($0, `break-block-i32-i64`, []), [value("i32", 1), value("i64", 2n)]); + +// ./test/core/func.wast:336 +assert_return(() => invoke($0, `break-br_if-empty`, [0]), []); + +// ./test/core/func.wast:337 +assert_return(() => invoke($0, `break-br_if-empty`, [2]), []); + +// ./test/core/func.wast:338 +assert_return(() => invoke($0, `break-br_if-num`, [0]), [value("i32", 51)]); + +// ./test/core/func.wast:339 +assert_return(() => invoke($0, `break-br_if-num`, [1]), [value("i32", 50)]); + +// ./test/core/func.wast:340 +assert_return(() => invoke($0, `break-br_if-num-num`, [0]), [value("i32", 51), value("i64", 52n)]); + +// ./test/core/func.wast:343 +assert_return(() => invoke($0, `break-br_if-num-num`, [1]), [value("i32", 50), value("i64", 51n)]); + +// ./test/core/func.wast:347 +assert_return(() => invoke($0, `break-br_table-empty`, [0]), []); + +// ./test/core/func.wast:348 +assert_return(() => invoke($0, `break-br_table-empty`, [1]), []); + +// ./test/core/func.wast:349 +assert_return(() => invoke($0, `break-br_table-empty`, [5]), []); + +// ./test/core/func.wast:350 +assert_return(() => invoke($0, `break-br_table-empty`, [-1]), []); + +// ./test/core/func.wast:351 +assert_return(() => invoke($0, `break-br_table-num`, [0]), [value("i32", 50)]); + +// ./test/core/func.wast:352 +assert_return(() => invoke($0, `break-br_table-num`, [1]), [value("i32", 50)]); + +// ./test/core/func.wast:353 +assert_return(() => invoke($0, `break-br_table-num`, [10]), [value("i32", 50)]); + +// ./test/core/func.wast:354 +assert_return(() => invoke($0, `break-br_table-num`, [-100]), [value("i32", 50)]); + +// ./test/core/func.wast:355 +assert_return(() => invoke($0, `break-br_table-num-num`, [0]), [value("f32", 50), value("i64", 51n)]); + +// ./test/core/func.wast:358 +assert_return(() => invoke($0, `break-br_table-num-num`, [1]), [value("f32", 50), value("i64", 51n)]); + +// ./test/core/func.wast:361 +assert_return(() => invoke($0, `break-br_table-num-num`, [10]), [value("f32", 50), value("i64", 51n)]); + +// ./test/core/func.wast:364 +assert_return(() => invoke($0, `break-br_table-num-num`, [-100]), [value("f32", 50), value("i64", 51n)]); + +// ./test/core/func.wast:367 +assert_return(() => invoke($0, `break-br_table-nested-empty`, [0]), []); + +// ./test/core/func.wast:368 +assert_return(() => invoke($0, `break-br_table-nested-empty`, [1]), []); + +// ./test/core/func.wast:369 +assert_return(() => invoke($0, `break-br_table-nested-empty`, [3]), []); + +// ./test/core/func.wast:370 +assert_return(() => invoke($0, `break-br_table-nested-empty`, [-2]), []); + +// ./test/core/func.wast:371 +assert_return(() => invoke($0, `break-br_table-nested-num`, [0]), [value("i32", 52)]); + +// ./test/core/func.wast:374 +assert_return(() => invoke($0, `break-br_table-nested-num`, [1]), [value("i32", 50)]); + +// ./test/core/func.wast:377 +assert_return(() => invoke($0, `break-br_table-nested-num`, [2]), [value("i32", 52)]); + +// ./test/core/func.wast:380 +assert_return(() => invoke($0, `break-br_table-nested-num`, [-3]), [value("i32", 52)]); + +// ./test/core/func.wast:383 +assert_return( + () => invoke($0, `break-br_table-nested-num-num`, [0]), + [value("i32", 101), value("i32", 52)], +); + +// ./test/core/func.wast:387 +assert_return( + () => invoke($0, `break-br_table-nested-num-num`, [1]), + [value("i32", 50), value("i32", 51)], +); + +// ./test/core/func.wast:391 +assert_return( + () => invoke($0, `break-br_table-nested-num-num`, [2]), + [value("i32", 101), value("i32", 52)], +); + +// ./test/core/func.wast:395 +assert_return( + () => invoke($0, `break-br_table-nested-num-num`, [-3]), + [value("i32", 101), value("i32", 52)], +); + +// ./test/core/func.wast:400 +assert_return( + () => invoke($0, `large-sig`, [ + 0, + 1n, + value("f32", 2), + value("f32", 3), + 4, + value("f64", 5), + value("f32", 6), + 7, + 8, + 9, + value("f32", 10), + value("f64", 11), + value("f64", 12), + value("f64", 13), + 14, + 15, + value("f32", 16), + ]), + [ + value("f64", 5), + value("f32", 2), + value("i32", 0), + value("i32", 8), + value("i32", 7), + value("i64", 1n), + value("f32", 3), + value("i32", 9), + value("i32", 4), + value("f32", 6), + value("f64", 13), + value("f64", 11), + value("i32", 15), + value("f32", 16), + value("i32", 14), + value("f64", 12), + ], +); + +// ./test/core/func.wast:414 +assert_return(() => invoke($0, `init-local-i32`, []), [value("i32", 0)]); + +// ./test/core/func.wast:415 +assert_return(() => invoke($0, `init-local-i64`, []), [value("i64", 0n)]); + +// ./test/core/func.wast:416 +assert_return(() => invoke($0, `init-local-f32`, []), [value("f32", 0)]); + +// ./test/core/func.wast:417 +assert_return(() => invoke($0, `init-local-f64`, []), [value("f64", 0)]); + +// ./test/core/func.wast:422 +let $1 = instantiate(`(module + (func $$f (result f64) (f64.const 0)) ;; adds implicit type definition + (func $$g (param i32)) ;; reuses explicit type definition + (type $$t (func (param i32))) + + (func $$i32->void (type 0)) ;; (param i32) + (func $$void->f64 (type 1) (f64.const 0)) ;; (result f64) + (func $$check + (call $$i32->void (i32.const 0)) + (drop (call $$void->f64)) + ) +)`); + +// ./test/core/func.wast:435 +assert_invalid( + () => instantiate(`(module + (func $$f (result f64) (f64.const 0)) ;; adds implicit type definition + (func $$g (param i32)) ;; reuses explicit type definition + (func $$h (result f64) (f64.const 1)) ;; reuses implicit type definition + (type $$t (func (param i32))) + + (func (type 2)) ;; does not exist + )`), + `unknown type`, +); + +// ./test/core/func.wast:447 +assert_malformed( + () => instantiate(`(func $$f (result f64) (f64.const 0)) (func $$g (param i32)) (func $$h (result f64) (f64.const 1)) (type $$t (func (param i32))) (func (type 2) (param i32)) `), + `unknown type`, +); + +// ./test/core/func.wast:459 +let $2 = instantiate(`(module + (type $$proc (func (result i32))) + (type $$sig (func (param i32) (result i32))) + + (func (export "f") (type $$sig) + (local $$var i32) + (local.get $$var) + ) + + (func $$g (type $$sig) + (local $$var i32) + (local.get $$var) + ) + (func (export "g") (type $$sig) + (call $$g (local.get 0)) + ) + + (func (export "p") (type $$proc) + (local $$var i32) + (local.set 0 (i32.const 42)) + (local.get $$var) + ) +)`); + +// ./test/core/func.wast:483 +assert_return(() => invoke($2, `f`, [42]), [value("i32", 0)]); + +// ./test/core/func.wast:484 +assert_return(() => invoke($2, `g`, [42]), [value("i32", 0)]); + +// ./test/core/func.wast:485 +assert_return(() => invoke($2, `p`, []), [value("i32", 42)]); + +// ./test/core/func.wast:488 +let $3 = instantiate(`(module + (type $$sig (func)) + + (func $$empty-sig-1) ;; should be assigned type $$sig + (func $$complex-sig-1 (param f64 i64 f64 i64 f64 i64 f32 i32)) + (func $$empty-sig-2) ;; should be assigned type $$sig + (func $$complex-sig-2 (param f64 i64 f64 i64 f64 i64 f32 i32)) + (func $$complex-sig-3 (param f64 i64 f64 i64 f64 i64 f32 i32)) + (func $$complex-sig-4 (param i64 i64 f64 i64 f64 i64 f32 i32)) + (func $$complex-sig-5 (param i64 i64 f64 i64 f64 i64 f32 i32)) + + (type $$empty-sig-duplicate (func)) + (type $$complex-sig-duplicate (func (param i64 i64 f64 i64 f64 i64 f32 i32))) + (table funcref + (elem + $$complex-sig-3 $$empty-sig-2 $$complex-sig-1 $$complex-sig-3 $$empty-sig-1 + $$complex-sig-4 $$complex-sig-5 + ) + ) + + (func (export "signature-explicit-reused") + (call_indirect (type $$sig) (i32.const 1)) + (call_indirect (type $$sig) (i32.const 4)) + ) + + (func (export "signature-implicit-reused") + ;; The implicit index 3 in this test depends on the function and + ;; type definitions, and may need adapting if they change. + (call_indirect (type 3) + (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 0) + ) + (call_indirect (type 3) + (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 2) + ) + (call_indirect (type 3) + (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 3) + ) + ) + + (func (export "signature-explicit-duplicate") + (call_indirect (type $$empty-sig-duplicate) (i32.const 1)) + ) + + (func (export "signature-implicit-duplicate") + (call_indirect (type $$complex-sig-duplicate) + (i64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 5) + ) + (call_indirect (type $$complex-sig-duplicate) + (i64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 6) + ) + ) +)`); + +// ./test/core/func.wast:551 +assert_return(() => invoke($3, `signature-explicit-reused`, []), []); + +// ./test/core/func.wast:552 +assert_return(() => invoke($3, `signature-implicit-reused`, []), []); + +// ./test/core/func.wast:553 +assert_return(() => invoke($3, `signature-explicit-duplicate`, []), []); + +// ./test/core/func.wast:554 +assert_return(() => invoke($3, `signature-implicit-duplicate`, []), []); + +// ./test/core/func.wast:559 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (type $$sig) (result i32) (param i32) (i32.const 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:566 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (param i32) (type $$sig) (result i32) (i32.const 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:573 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (param i32) (result i32) (type $$sig) (i32.const 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:580 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (result i32) (type $$sig) (param i32) (i32.const 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:587 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (result i32) (param i32) (type $$sig) (i32.const 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:594 +assert_malformed( + () => instantiate(`(func (result i32) (param i32) (i32.const 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:601 +assert_malformed( + () => instantiate(`(type $$sig (func)) (func (type $$sig) (result i32) (i32.const 0)) `), + `inline function type`, +); + +// ./test/core/func.wast:608 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (type $$sig) (result i32) (i32.const 0)) `), + `inline function type`, +); + +// ./test/core/func.wast:615 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (type $$sig) (param i32) (i32.const 0)) `), + `inline function type`, +); + +// ./test/core/func.wast:622 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32 i32) (result i32))) (func (type $$sig) (param i32) (result i32) (unreachable)) `), + `inline function type`, +); + +// ./test/core/func.wast:630 +assert_invalid(() => instantiate(`(module (func $$g (type 4)))`), `unknown type`); + +// ./test/core/func.wast:634 +assert_invalid( + () => instantiate(`(module + (func $$f (drop (ref.func $$g))) + (func $$g (type 4)) + (elem declare func $$g) + )`), + `unknown type`, +); + +// ./test/core/func.wast:646 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (result i64) (local i32) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/func.wast:650 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (local f32) (i32.eqz (local.get 0))))`), + `type mismatch`, +); + +// ./test/core/func.wast:654 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (local f64 i64) (f64.neg (local.get 1))))`), + `type mismatch`, +); + +// ./test/core/func.wast:659 +assert_invalid( + () => instantiate(`(module + (type $$t (func)) + (func $$type-local-uninitialized (local $$x (ref $$t)) (drop (local.get $$x))) + )`), + `uninitialized local`, +); + +// ./test/core/func.wast:670 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param i32) (result i64) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/func.wast:674 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param f32) (i32.eqz (local.get 0))))`), + `type mismatch`, +); + +// ./test/core/func.wast:678 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param f64 i64) (f64.neg (local.get 1))))`), + `type mismatch`, +); + +// ./test/core/func.wast:686 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i32 (result i32)))`), + `type mismatch`, +); + +// ./test/core/func.wast:690 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i64 (result i64)))`), + `type mismatch`, +); + +// ./test/core/func.wast:694 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f32 (result f32)))`), + `type mismatch`, +); + +// ./test/core/func.wast:698 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f64 (result f64)))`), + `type mismatch`, +); + +// ./test/core/func.wast:702 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f64-i32 (result f64 i32)))`), + `type mismatch`, +); + +// ./test/core/func.wast:707 +assert_invalid( + () => instantiate(`(module (func $$type-value-void-vs-num (result i32) + (nop) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:713 +assert_invalid( + () => instantiate(`(module (func $$type-value-void-vs-nums (result i32 i32) + (nop) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:719 +assert_invalid( + () => instantiate(`(module (func $$type-value-num-vs-void + (i32.const 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:725 +assert_invalid( + () => instantiate(`(module (func $$type-value-nums-vs-void + (i32.const 0) (i64.const 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:731 +assert_invalid( + () => instantiate(`(module (func $$type-value-num-vs-num (result i32) + (f32.const 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:737 +assert_invalid( + () => instantiate(`(module (func $$type-value-num-vs-nums (result f32 f32) + (f32.const 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:743 +assert_invalid( + () => instantiate(`(module (func $$type-value-nums-vs-num (result f32) + (f32.const 0) (f32.const 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:750 +assert_invalid( + () => instantiate(`(module (func $$type-return-last-empty-vs-num (result i32) + (return) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:756 +assert_invalid( + () => instantiate(`(module (func $$type-return-last-empty-vs-nums (result i32 i32) + (return) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:762 +assert_invalid( + () => instantiate(`(module (func $$type-return-last-void-vs-num (result i32) + (return (nop)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:768 +assert_invalid( + () => instantiate(`(module (func $$type-return-last-void-vs-nums (result i32 i64) + (return (nop)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:774 +assert_invalid( + () => instantiate(`(module (func $$type-return-last-num-vs-num (result i32) + (return (i64.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:780 +assert_invalid( + () => instantiate(`(module (func $$type-return-last-num-vs-nums (result i64 i64) + (return (i64.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:787 +assert_invalid( + () => instantiate(`(module (func $$type-return-empty-vs-num (result i32) + (return) (i32.const 1) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:793 +assert_invalid( + () => instantiate(`(module (func $$type-return-empty-vs-nums (result i32 i32) + (return) (i32.const 1) (i32.const 2) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:799 +assert_invalid( + () => instantiate(`(module (func $$type-return-partial-vs-nums (result i32 i32) + (i32.const 1) (return) (i32.const 2) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:805 +assert_invalid( + () => instantiate(`(module (func $$type-return-void-vs-num (result i32) + (return (nop)) (i32.const 1) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:811 +assert_invalid( + () => instantiate(`(module (func $$type-return-void-vs-nums (result i32 i32) + (return (nop)) (i32.const 1) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:817 +assert_invalid( + () => instantiate(`(module (func $$type-return-num-vs-num (result i32) + (return (i64.const 1)) (i32.const 1) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:823 +assert_invalid( + () => instantiate(`(module (func $$type-return-num-vs-nums (result i32 i32) + (return (i64.const 1)) (i32.const 1) (i32.const 2) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:829 +assert_invalid( + () => instantiate(`(module (func $$type-return-first-num-vs-num (result i32) + (return (i64.const 1)) (return (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:835 +assert_invalid( + () => instantiate(`(module (func $$type-return-first-num-vs-nums (result i32 i32) + (return (i32.const 1)) (return (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:842 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-void-vs-num (result i32) + (br 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:848 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-void-vs-nums (result i32 i32) + (br 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:854 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-num-vs-num (result i32) + (br 0 (f32.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:860 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-num-vs-nums (result i32 i32) + (br 0 (i32.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:866 +assert_invalid( + () => instantiate(`(module (func $$type-break-void-vs-num (result i32) + (br 0) (i32.const 1) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:872 +assert_invalid( + () => instantiate(`(module (func $$type-break-void-vs-nums (result i32 i32) + (br 0) (i32.const 1) (i32.const 2) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:878 +assert_invalid( + () => instantiate(`(module (func $$type-break-num-vs-num (result i32) + (br 0 (i64.const 1)) (i32.const 1) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:884 +assert_invalid( + () => instantiate(`(module (func $$type-break-num-vs-nums (result i32 i32) + (br 0 (i32.const 1)) (i32.const 1) (i32.const 2) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:890 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-num-vs-num (result i32) + (br 0 (i64.const 1)) (br 0 (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:897 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-empty-vs-num (result i32) + (block (br 1)) (br 0 (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:903 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-empty-vs-nums (result i32 i32) + (block (br 1)) (br 0 (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:909 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-void-vs-num (result i32) + (block (br 1 (nop))) (br 0 (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:915 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-void-vs-nums (result i32 i32) + (block (br 1 (nop))) (br 0 (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:921 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-num-vs-num (result i32) + (block (br 1 (i64.const 1))) (br 0 (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:927 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-num-vs-nums (result i32 i32) + (block (result i32) (br 1 (i32.const 1))) (br 0 (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:937 +assert_malformed(() => instantiate(`(func (nop) (local i32)) `), `unexpected token`); + +// ./test/core/func.wast:941 +assert_malformed(() => instantiate(`(func (nop) (param i32)) `), `unexpected token`); + +// ./test/core/func.wast:945 +assert_malformed(() => instantiate(`(func (nop) (result i32)) `), `unexpected token`); + +// ./test/core/func.wast:949 +assert_malformed(() => instantiate(`(func (local i32) (param i32)) `), `unexpected token`); + +// ./test/core/func.wast:953 +assert_malformed( + () => instantiate(`(func (local i32) (result i32) (local.get 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:957 +assert_malformed( + () => instantiate(`(func (result i32) (param i32) (local.get 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:964 +assert_malformed(() => instantiate(`(func $$foo) (func $$foo) `), `duplicate func`); + +// ./test/core/func.wast:968 +assert_malformed( + () => instantiate(`(import "" "" (func $$foo)) (func $$foo) `), + `duplicate func`, +); + +// ./test/core/func.wast:972 +assert_malformed( + () => instantiate(`(import "" "" (func $$foo)) (import "" "" (func $$foo)) `), + `duplicate func`, +); + +// ./test/core/func.wast:977 +assert_malformed( + () => instantiate(`(func (param $$foo i32) (param $$foo i32)) `), + `duplicate local`, +); + +// ./test/core/func.wast:981 +assert_malformed( + () => instantiate(`(func (param $$foo i32) (local $$foo i32)) `), + `duplicate local`, +); + +// ./test/core/func.wast:985 +assert_malformed( + () => instantiate(`(func (local $$foo i32) (local $$foo i32)) `), + `duplicate local`, +); diff --git a/js/src/jit-test/tests/wasm/spec/function-references/global.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/global.wast.js new file mode 100644 index 0000000000..de27027554 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/global.wast.js @@ -0,0 +1,796 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/global.wast + +// ./test/core/global.wast:3 +let $0 = instantiate(`(module + (global (import "spectest" "global_i32") i32) + (global (import "spectest" "global_i64") i64) + + (global $$a i32 (i32.const -2)) + (global (;3;) f32 (f32.const -3)) + (global (;4;) f64 (f64.const -4)) + (global $$b i64 (i64.const -5)) + + (global $$x (mut i32) (i32.const -12)) + (global (;7;) (mut f32) (f32.const -13)) + (global (;8;) (mut f64) (f64.const -14)) + (global $$y (mut i64) (i64.const -15)) + + (global $$z1 i32 (global.get 0)) + (global $$z2 i64 (global.get 1)) + + (global $$r externref (ref.null extern)) + (global $$mr (mut externref) (ref.null extern)) + (global funcref (ref.null func)) + + (func (export "get-a") (result i32) (global.get $$a)) + (func (export "get-b") (result i64) (global.get $$b)) + (func (export "get-r") (result externref) (global.get $$r)) + (func (export "get-mr") (result externref) (global.get $$mr)) + (func (export "get-x") (result i32) (global.get $$x)) + (func (export "get-y") (result i64) (global.get $$y)) + (func (export "get-z1") (result i32) (global.get $$z1)) + (func (export "get-z2") (result i64) (global.get $$z2)) + (func (export "set-x") (param i32) (global.set $$x (local.get 0))) + (func (export "set-y") (param i64) (global.set $$y (local.get 0))) + (func (export "set-mr") (param externref) (global.set $$mr (local.get 0))) + + (func (export "get-3") (result f32) (global.get 3)) + (func (export "get-4") (result f64) (global.get 4)) + (func (export "get-7") (result f32) (global.get 7)) + (func (export "get-8") (result f64) (global.get 8)) + (func (export "set-7") (param f32) (global.set 7 (local.get 0))) + (func (export "set-8") (param f64) (global.set 8 (local.get 0))) + + ;; As the argument of control constructs and instructions + + (memory 1) + + (func $$dummy) + + (func (export "as-select-first") (result i32) + (select (global.get $$x) (i32.const 2) (i32.const 3)) + ) + (func (export "as-select-mid") (result i32) + (select (i32.const 2) (global.get $$x) (i32.const 3)) + ) + (func (export "as-select-last") (result i32) + (select (i32.const 2) (i32.const 3) (global.get $$x)) + ) + + (func (export "as-loop-first") (result i32) + (loop (result i32) + (global.get $$x) (call $$dummy) (call $$dummy) + ) + ) + (func (export "as-loop-mid") (result i32) + (loop (result i32) + (call $$dummy) (global.get $$x) (call $$dummy) + ) + ) + (func (export "as-loop-last") (result i32) + (loop (result i32) + (call $$dummy) (call $$dummy) (global.get $$x) + ) + ) + + (func (export "as-if-condition") (result i32) + (if (result i32) (global.get $$x) + (then (call $$dummy) (i32.const 2)) + (else (call $$dummy) (i32.const 3)) + ) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) + (then (global.get $$x)) (else (i32.const 2)) + ) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 0) + (then (i32.const 2)) (else (global.get $$x)) + ) + ) + + (func (export "as-br_if-first") (result i32) + (block (result i32) + (br_if 0 (global.get $$x) (i32.const 2)) + (return (i32.const 3)) + ) + ) + (func (export "as-br_if-last") (result i32) + (block (result i32) + (br_if 0 (i32.const 2) (global.get $$x)) + (return (i32.const 3)) + ) + ) + + (func (export "as-br_table-first") (result i32) + (block (result i32) + (global.get $$x) (i32.const 2) (br_table 0 0) + ) + ) + (func (export "as-br_table-last") (result i32) + (block (result i32) + (i32.const 2) (global.get $$x) (br_table 0 0) + ) + ) + + (func $$func (param i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (call_indirect (type $$check) + (global.get $$x) (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (global.get $$x) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (i32.const 0) (global.get $$x) + ) + ) + ) + + (func (export "as-store-first") + (global.get $$x) (i32.const 1) (i32.store) + ) + (func (export "as-store-last") + (i32.const 0) (global.get $$x) (i32.store) + ) + (func (export "as-load-operand") (result i32) + (i32.load (global.get $$x)) + ) + (func (export "as-memory.grow-value") (result i32) + (memory.grow (global.get $$x)) + ) + + (func $$f (param i32) (result i32) (local.get 0)) + (func (export "as-call-value") (result i32) + (call $$f (global.get $$x)) + ) + + (func (export "as-return-value") (result i32) + (global.get $$x) (return) + ) + (func (export "as-drop-operand") + (drop (global.get $$x)) + ) + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (global.get $$x))) + ) + + (func (export "as-local.set-value") (param i32) (result i32) + (local.set 0 (global.get $$x)) + (local.get 0) + ) + (func (export "as-local.tee-value") (param i32) (result i32) + (local.tee 0 (global.get $$x)) + ) + (func (export "as-global.set-value") (result i32) + (global.set $$x (global.get $$x)) + (global.get $$x) + ) + + (func (export "as-unary-operand") (result i32) + (i32.eqz (global.get $$x)) + ) + (func (export "as-binary-operand") (result i32) + (i32.mul + (global.get $$x) (global.get $$x) + ) + ) + (func (export "as-compare-operand") (result i32) + (i32.gt_u + (global.get 0) (i32.const 1) + ) + ) +)`); + +// ./test/core/global.wast:196 +assert_return(() => invoke($0, `get-a`, []), [value("i32", -2)]); + +// ./test/core/global.wast:197 +assert_return(() => invoke($0, `get-b`, []), [value("i64", -5n)]); + +// ./test/core/global.wast:198 +assert_return(() => invoke($0, `get-r`, []), [value('externref', null)]); + +// ./test/core/global.wast:199 +assert_return(() => invoke($0, `get-mr`, []), [value('externref', null)]); + +// ./test/core/global.wast:200 +assert_return(() => invoke($0, `get-x`, []), [value("i32", -12)]); + +// ./test/core/global.wast:201 +assert_return(() => invoke($0, `get-y`, []), [value("i64", -15n)]); + +// ./test/core/global.wast:202 +assert_return(() => invoke($0, `get-z1`, []), [value("i32", 666)]); + +// ./test/core/global.wast:203 +assert_return(() => invoke($0, `get-z2`, []), [value("i64", 666n)]); + +// ./test/core/global.wast:205 +assert_return(() => invoke($0, `get-3`, []), [value("f32", -3)]); + +// ./test/core/global.wast:206 +assert_return(() => invoke($0, `get-4`, []), [value("f64", -4)]); + +// ./test/core/global.wast:207 +assert_return(() => invoke($0, `get-7`, []), [value("f32", -13)]); + +// ./test/core/global.wast:208 +assert_return(() => invoke($0, `get-8`, []), [value("f64", -14)]); + +// ./test/core/global.wast:210 +assert_return(() => invoke($0, `set-x`, [6]), []); + +// ./test/core/global.wast:211 +assert_return(() => invoke($0, `set-y`, [7n]), []); + +// ./test/core/global.wast:213 +assert_return(() => invoke($0, `set-7`, [value("f32", 8)]), []); + +// ./test/core/global.wast:214 +assert_return(() => invoke($0, `set-8`, [value("f64", 9)]), []); + +// ./test/core/global.wast:216 +assert_return(() => invoke($0, `get-x`, []), [value("i32", 6)]); + +// ./test/core/global.wast:217 +assert_return(() => invoke($0, `get-y`, []), [value("i64", 7n)]); + +// ./test/core/global.wast:218 +assert_return(() => invoke($0, `get-7`, []), [value("f32", 8)]); + +// ./test/core/global.wast:219 +assert_return(() => invoke($0, `get-8`, []), [value("f64", 9)]); + +// ./test/core/global.wast:221 +assert_return(() => invoke($0, `set-7`, [value("f32", 8)]), []); + +// ./test/core/global.wast:222 +assert_return(() => invoke($0, `set-8`, [value("f64", 9)]), []); + +// ./test/core/global.wast:223 +assert_return(() => invoke($0, `set-mr`, [externref(10)]), []); + +// ./test/core/global.wast:225 +assert_return(() => invoke($0, `get-x`, []), [value("i32", 6)]); + +// ./test/core/global.wast:226 +assert_return(() => invoke($0, `get-y`, []), [value("i64", 7n)]); + +// ./test/core/global.wast:227 +assert_return(() => invoke($0, `get-7`, []), [value("f32", 8)]); + +// ./test/core/global.wast:228 +assert_return(() => invoke($0, `get-8`, []), [value("f64", 9)]); + +// ./test/core/global.wast:229 +assert_return(() => invoke($0, `get-mr`, []), [new ExternRefResult(10)]); + +// ./test/core/global.wast:231 +assert_return(() => invoke($0, `as-select-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:232 +assert_return(() => invoke($0, `as-select-mid`, []), [value("i32", 2)]); + +// ./test/core/global.wast:233 +assert_return(() => invoke($0, `as-select-last`, []), [value("i32", 2)]); + +// ./test/core/global.wast:235 +assert_return(() => invoke($0, `as-loop-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:236 +assert_return(() => invoke($0, `as-loop-mid`, []), [value("i32", 6)]); + +// ./test/core/global.wast:237 +assert_return(() => invoke($0, `as-loop-last`, []), [value("i32", 6)]); + +// ./test/core/global.wast:239 +assert_return(() => invoke($0, `as-if-condition`, []), [value("i32", 2)]); + +// ./test/core/global.wast:240 +assert_return(() => invoke($0, `as-if-then`, []), [value("i32", 6)]); + +// ./test/core/global.wast:241 +assert_return(() => invoke($0, `as-if-else`, []), [value("i32", 6)]); + +// ./test/core/global.wast:243 +assert_return(() => invoke($0, `as-br_if-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:244 +assert_return(() => invoke($0, `as-br_if-last`, []), [value("i32", 2)]); + +// ./test/core/global.wast:246 +assert_return(() => invoke($0, `as-br_table-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:247 +assert_return(() => invoke($0, `as-br_table-last`, []), [value("i32", 2)]); + +// ./test/core/global.wast:249 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:250 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 2)]); + +// ./test/core/global.wast:251 +assert_trap(() => invoke($0, `as-call_indirect-last`, []), `undefined element`); + +// ./test/core/global.wast:253 +assert_return(() => invoke($0, `as-store-first`, []), []); + +// ./test/core/global.wast:254 +assert_return(() => invoke($0, `as-store-last`, []), []); + +// ./test/core/global.wast:255 +assert_return(() => invoke($0, `as-load-operand`, []), [value("i32", 1)]); + +// ./test/core/global.wast:256 +assert_return(() => invoke($0, `as-memory.grow-value`, []), [value("i32", 1)]); + +// ./test/core/global.wast:258 +assert_return(() => invoke($0, `as-call-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:260 +assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:261 +assert_return(() => invoke($0, `as-drop-operand`, []), []); + +// ./test/core/global.wast:262 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:264 +assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 6)]); + +// ./test/core/global.wast:265 +assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 6)]); + +// ./test/core/global.wast:266 +assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:268 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("i32", 0)]); + +// ./test/core/global.wast:269 +assert_return(() => invoke($0, `as-binary-operand`, []), [value("i32", 36)]); + +// ./test/core/global.wast:270 +assert_return(() => invoke($0, `as-compare-operand`, []), [value("i32", 1)]); + +// ./test/core/global.wast:272 +assert_invalid( + () => instantiate(`(module (global f32 (f32.const 0)) (func (global.set 0 (f32.const 1))))`), + `immutable global`, +); + +// ./test/core/global.wast:277 +assert_invalid( + () => instantiate(`(module (import "spectest" "global_i32" (global i32)) (func (global.set 0 (i32.const 1))))`), + `immutable global`, +); + +// ./test/core/global.wast:283 +let $1 = instantiate(`(module (global (mut f32) (f32.const 0)) (export "a" (global 0)))`); + +// ./test/core/global.wast:284 +let $2 = instantiate(`(module (global (export "a") (mut f32) (f32.const 0)))`); + +// ./test/core/global.wast:286 +assert_invalid( + () => instantiate(`(module (global f32 (f32.neg (f32.const 0))))`), + `constant expression required`, +); + +// ./test/core/global.wast:291 +assert_invalid( + () => instantiate(`(module (global f32 (local.get 0)))`), + `constant expression required`, +); + +// ./test/core/global.wast:296 +assert_invalid( + () => instantiate(`(module (global f32 (f32.neg (f32.const 1))))`), + `constant expression required`, +); + +// ./test/core/global.wast:301 +assert_invalid( + () => instantiate(`(module (global i32 (i32.const 0) (nop)))`), + `constant expression required`, +); + +// ./test/core/global.wast:306 +assert_invalid( + () => instantiate(`(module (global i32 (i32.ctz (i32.const 0))))`), + `constant expression required`, +); + +// ./test/core/global.wast:311 +assert_invalid( + () => instantiate(`(module (global i32 (nop)))`), + `constant expression required`, +); + +// ./test/core/global.wast:316 +assert_invalid(() => instantiate(`(module (global i32 (f32.const 0)))`), `type mismatch`); + +// ./test/core/global.wast:321 +assert_invalid( + () => instantiate(`(module (global i32 (i32.const 0) (i32.const 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:326 +assert_invalid( + () => instantiate(`(module (global i32 (;empty instruction sequence;)))`), + `type mismatch`, +); + +// ./test/core/global.wast:331 +assert_invalid( + () => instantiate(`(module (global (import "" "") externref) (global funcref (global.get 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:336 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-i32") i32) (global i32 (global.get 0) (global.get 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:341 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-i32") i32) (global i32 (i32.const 0) (global.get 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:346 +assert_invalid( + () => instantiate(`(module (global i32 (global.get 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:351 +assert_invalid( + () => instantiate(`(module (global i32 (global.get 1)) (global i32 (i32.const 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:356 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-i32") i32) (global i32 (global.get 2)))`), + `unknown global`, +); + +// ./test/core/global.wast:361 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-mut-i32") (mut i32)) (global i32 (global.get 0)))`), + `constant expression required`, +); + +// ./test/core/global.wast:366 +let $3 = instantiate(`(module + (import "spectest" "global_i32" (global i32)) +)`); + +// ./test/core/global.wast:369 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\98\\80\\80\\80\\00" ;; import section + "\\01" ;; length 1 + "\\08\\73\\70\\65\\63\\74\\65\\73\\74" ;; "spectest" + "\\0a\\67\\6c\\6f\\62\\61\\6c\\5f\\69\\33\\32" ;; "global_i32" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\02" ;; malformed mutability + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:382 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\98\\80\\80\\80\\00" ;; import section + "\\01" ;; length 1 + "\\08\\73\\70\\65\\63\\74\\65\\73\\74" ;; "spectest" + "\\0a\\67\\6c\\6f\\62\\61\\6c\\5f\\69\\33\\32" ;; "global_i32" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\ff" ;; malformed mutability + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:396 +let $4 = instantiate(`(module + (global i32 (i32.const 0)) +)`); + +// ./test/core/global.wast:399 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\06\\86\\80\\80\\80\\00" ;; global section + "\\01" ;; length 1 + "\\7f" ;; i32 + "\\02" ;; malformed mutability + "\\41\\00" ;; i32.const 0 + "\\0b" ;; end + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:411 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\06\\86\\80\\80\\80\\00" ;; global section + "\\01" ;; length 1 + "\\7f" ;; i32 + "\\ff" ;; malformed mutability + "\\41\\00" ;; i32.const 0 + "\\0b" ;; end + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:425 +assert_invalid( + () => instantiate(`(module (func (result i32) (global.get 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:430 +assert_invalid( + () => instantiate(`(module + (global i32 (i32.const 0)) + (func (result i32) (global.get 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:438 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (func (result i32) (global.get 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:446 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (global i32 (i32.const 0)) + (func (result i32) (global.get 2)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:456 +assert_invalid( + () => instantiate(`(module (func (i32.const 0) (global.set 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:461 +assert_invalid( + () => instantiate(`(module + (global i32 (i32.const 0)) + (func (i32.const 0) (global.set 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:469 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (func (i32.const 0) (global.set 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:477 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (global i32 (i32.const 0)) + (func (i32.const 0) (global.set 2)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:487 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty + (global.set $$x) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:496 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-block + (i32.const 0) + (block (global.set $$x)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:506 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-loop + (i32.const 0) + (loop (global.set $$x)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:516 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:526 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:536 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-br + (i32.const 0) + (block (br 0 (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:546 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-br_if + (i32.const 0) + (block (br_if 0 (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:556 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-br_table + (i32.const 0) + (block (br_table 0 (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:566 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-return + (return (global.set $$x)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:575 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-select + (select (global.set $$x) (i32.const 1) (i32.const 2)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:584 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-call + (call 1 (global.set $$x)) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:594 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-global.set-value-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (global.set $$x) (i32.const 0) + ) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:613 +assert_malformed( + () => instantiate(`(global $$foo i32 (i32.const 0)) (global $$foo i32 (i32.const 0)) `), + `duplicate global`, +); + +// ./test/core/global.wast:617 +assert_malformed( + () => instantiate(`(import "" "" (global $$foo i32)) (global $$foo i32 (i32.const 0)) `), + `duplicate global`, +); + +// ./test/core/global.wast:621 +assert_malformed( + () => instantiate(`(import "" "" (global $$foo i32)) (import "" "" (global $$foo i32)) `), + `duplicate global`, +); diff --git a/js/src/jit-test/tests/wasm/spec/function-references/harness/directives.txt b/js/src/jit-test/tests/wasm/spec/function-references/harness/directives.txt new file mode 100644 index 0000000000..d41243abbb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/harness/directives.txt @@ -0,0 +1 @@ +|jit-test| skip-if: true \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/function-references/harness/harness.js b/js/src/jit-test/tests/wasm/spec/function-references/harness/harness.js new file mode 100644 index 0000000000..a96781e8ed --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/harness/harness.js @@ -0,0 +1,448 @@ +"use strict"; + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +if (!wasmIsSupported()) { + quit(); +} + +function bytes(type, bytes) { + var typedBuffer = new Uint8Array(bytes); + return wasmGlobalFromArrayBuffer(type, typedBuffer.buffer); +} +function value(type, value) { + return new WebAssembly.Global({ + value: type, + mutable: false, + }, value); +} + +function i8x16(elements) { + let typedBuffer = new Uint8Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i16x8(elements) { + let typedBuffer = new Uint16Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i32x4(elements) { + let typedBuffer = new Uint32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i64x2(elements) { + let typedBuffer = new BigUint64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f32x4(elements) { + let typedBuffer = new Float32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f64x2(elements) { + let typedBuffer = new Float64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} + +function either(...arr) { + return new EitherVariants(arr); +} + +class F32x4Pattern { + constructor(x, y, z, w) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } +} + +class F64x2Pattern { + constructor(x, y) { + this.x = x; + this.y = y; + } +} + +class RefWithType { + constructor(type) { + this.type = type; + } + + formatExpected() { + return `RefWithType(${this.type})`; + } + + test(refGlobal) { + try { + new WebAssembly.Global({value: this.type}, refGlobal.value); + return true; + } catch (err) { + assertEq(err instanceof TypeError, true, `wrong type of error when creating global: ${err}`); + assertEq(!!err.message.match(/can only pass/), true, `wrong type of error when creating global: ${err}`); + return false; + } + } +} + +// ref.extern values created by spec tests will be JS objects of the form +// { [externsym]: }. Other externref values are possible to observe +// if extern.convert_any is used. +let externsym = Symbol("externref"); +function externref(s) { + return { [externsym]: s }; +} +function is_externref(x) { + return (x !== null && externsym in x) ? 1 : 0; +} +function is_funcref(x) { + return typeof x === "function" ? 1 : 0; +} +function eq_externref(x, y) { + return x === y ? 1 : 0; +} +function eq_funcref(x, y) { + return x === y ? 1 : 0; +} + +class ExternRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.extern ${this.n}`; + } + + test(global) { + // the global's value can either be an externref or just a plain old JS number + let result = global.value; + if (typeof global.value === "object" && externsym in global.value) { + result = global.value[externsym]; + } + return result === this.n; + } +} + +// ref.host values created by spectests will be whatever the JS API does to +// convert the given value to anyref. It should implicitly be like any.convert_extern. +function hostref(v) { + if (!wasmGcEnabled()) { + throw new Error("ref.host only works when wasm GC is enabled"); + } + + const { internalizeNum } = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(`(module + (func (import "test" "coerce") (param i32) (result anyref)) + (func (export "internalizeNum") (param i32) (result anyref) + (call 0 (local.get 0)) + ) + )`)), + { "test": { "coerce": x => x } }, + ).exports; + return internalizeNum(v); +} + +class HostRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.host ${this.n}`; + } + + test(externrefGlobal) { + assertEq(externsym in externrefGlobal.value, true, `HostRefResult only works with externref inputs`); + return externrefGlobal.value[externsym] === this.n; + } +} + +let spectest = { + externref: externref, + is_externref: is_externref, + is_funcref: is_funcref, + eq_externref: eq_externref, + eq_funcref: eq_funcref, + print: console.log.bind(console), + print_i32: console.log.bind(console), + print_i32_f32: console.log.bind(console), + print_f64_f64: console.log.bind(console), + print_f32: console.log.bind(console), + print_f64: console.log.bind(console), + global_i32: 666, + global_i64: 666n, + global_f32: 666, + global_f64: 666, + table: new WebAssembly.Table({ + initial: 10, + maximum: 20, + element: "anyfunc", + }), + memory: new WebAssembly.Memory({ initial: 1, maximum: 2 }), +}; + +let linkage = { + spectest, +}; + +function getInstance(instanceish) { + if (typeof instanceish === "string") { + assertEq( + instanceish in linkage, + true, + `'${instanceish}'' must be registered`, + ); + return linkage[instanceish]; + } + return instanceish; +} + +function instantiate(source) { + let bytecode = wasmTextToBinary(source); + let module = new WebAssembly.Module(bytecode); + let instance = new WebAssembly.Instance(module, linkage); + return instance.exports; +} + +function register(instanceish, name) { + linkage[name] = getInstance(instanceish); +} + +function invoke(instanceish, field, params) { + let func = getInstance(instanceish)[field]; + assertEq(func instanceof Function, true, "expected a function"); + return wasmLosslessInvoke(func, ...params); +} + +function get(instanceish, field) { + let global = getInstance(instanceish)[field]; + assertEq( + global instanceof WebAssembly.Global, + true, + "expected a WebAssembly.Global", + ); + return global; +} + +function assert_trap(thunk, message) { + try { + thunk(); + throw new Error("expected trap"); + } catch (err) { + if (err instanceof WebAssembly.RuntimeError) { + return; + } + throw err; + } +} + +let StackOverflow; +try { + (function f() { + 1 + f(); + })(); +} catch (e) { + StackOverflow = e.constructor; +} +function assert_exhaustion(thunk, message) { + try { + thunk(); + assertEq("normal return", "exhaustion"); + } catch (err) { + assertEq( + err instanceof StackOverflow, + true, + "expected exhaustion", + ); + } +} + +function assert_invalid(thunk, message) { + try { + thunk(); + assertEq("valid module", "invalid module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an invalid module", + ); + } +} + +function assert_unlinkable(thunk, message) { + try { + thunk(); + assertEq(true, false, "expected an unlinkable module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an unlinkable module", + ); + } +} + +function assert_malformed(thunk, message) { + try { + thunk(); + assertEq("valid module", "malformed module"); + } catch (err) { + assertEq( + err instanceof TypeError || + err instanceof SyntaxError || + err instanceof WebAssembly.CompileError || + err instanceof WebAssembly.LinkError, + true, + `expected a malformed module`, + ); + } +} + +function assert_exception(thunk) { + let thrown = false; + try { + thunk(); + } catch (err) { + thrown = true; + } + assertEq(thrown, true, "expected an exception to be thrown"); +} + +function assert_return(thunk, expected) { + let results = thunk(); + + if (results === undefined) { + results = []; + } else if (!Array.isArray(results)) { + results = [results]; + } + if (!Array.isArray(expected)) { + expected = [expected]; + } + + if (!compareResults(results, expected)) { + let got = results.map((x) => formatResult(x)).join(", "); + let wanted = expected.map((x) => formatExpected(x)).join(", "); + assertEq( + `[${got}]`, + `[${wanted}]`, + ); + assertEq(true, false, `${got} !== ${wanted}`); + } +} + +function formatResult(result) { + if (typeof (result) === "object") { + return wasmGlobalToString(result); + } else { + return `${result}`; + } +} + +function formatExpected(expected) { + if ( + expected === `f32_canonical_nan` || + expected === `f32_arithmetic_nan` || + expected === `f64_canonical_nan` || + expected === `f64_arithmetic_nan` + ) { + return expected; + } else if (expected instanceof F32x4Pattern) { + return `f32x4(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + }, ${formatExpected(expected.z)}, ${formatExpected(expected.w)})`; + } else if (expected instanceof F64x2Pattern) { + return `f64x2(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + })`; + } else if (expected instanceof EitherVariants) { + return expected.formatExpected(); + } else if (expected instanceof RefWithType) { + return expected.formatExpected(); + } else if (expected instanceof ExternRefResult) { + return expected.formatExpected(); + } else if (expected instanceof HostRefResult) { + return expected.formatExpected(); + } else if (typeof (expected) === "object") { + return wasmGlobalToString(expected); + } else { + throw new Error("unknown expected result"); + } +} + +class EitherVariants { + constructor(arr) { + this.arr = arr; + } + matches(v) { + return this.arr.some((e) => compareResult(v, e)); + } + formatExpected() { + return `either(${this.arr.map(formatExpected).join(", ")})`; + } +} + +function compareResults(results, expected) { + if (results.length !== expected.length) { + return false; + } + for (let i in results) { + if (expected[i] instanceof EitherVariants) { + return expected[i].matches(results[i]); + } + if (!compareResult(results[i], expected[i])) { + return false; + } + } + return true; +} + +function compareResult(result, expected) { + if ( + expected === `canonical_nan` || + expected === `arithmetic_nan` + ) { + return wasmGlobalIsNaN(result, expected); + } else if (expected === null) { + return result.value === null; + } else if (expected instanceof F32x4Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f32x4", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 1), expected.y) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 2), expected.z) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 3), expected.w); + } else if (expected instanceof F64x2Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f64x2", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f64x2", 1), expected.y); + } else if (expected instanceof RefWithType) { + return expected.test(result); + } else if (expected instanceof ExternRefResult) { + return expected.test(result); + } else if (expected instanceof HostRefResult) { + return expected.test(result); + } else if (typeof (expected) === "object") { + return wasmGlobalsEqual(result, expected); + } else { + throw new Error("unknown expected result"); + } +} diff --git a/js/src/jit-test/tests/wasm/spec/function-references/if.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/if.wast.js new file mode 100644 index 0000000000..ada0bd224a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/if.wast.js @@ -0,0 +1,1911 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/if.wast + +// ./test/core/if.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definition + (memory 1) + + (func $$dummy) + + (func (export "empty") (param i32) + (if (local.get 0) (then)) + (if (local.get 0) (then) (else)) + (if $$l (local.get 0) (then)) + (if $$l (local.get 0) (then) (else)) + ) + + (func (export "singular") (param i32) (result i32) + (if (local.get 0) (then (nop))) + (if (local.get 0) (then (nop)) (else (nop))) + (if (result i32) (local.get 0) (then (i32.const 7)) (else (i32.const 8))) + ) + + (func (export "multi") (param i32) (result i32 i32) + (if (local.get 0) (then (call $$dummy) (call $$dummy) (call $$dummy))) + (if (local.get 0) (then) (else (call $$dummy) (call $$dummy) (call $$dummy))) + (if (result i32) (local.get 0) + (then (call $$dummy) (call $$dummy) (i32.const 8) (call $$dummy)) + (else (call $$dummy) (call $$dummy) (i32.const 9) (call $$dummy)) + ) + (if (result i32 i64 i32) (local.get 0) + (then + (call $$dummy) (call $$dummy) (i32.const 1) (call $$dummy) + (call $$dummy) (call $$dummy) (i64.const 2) (call $$dummy) + (call $$dummy) (call $$dummy) (i32.const 3) (call $$dummy) + ) + (else + (call $$dummy) (call $$dummy) (i32.const -1) (call $$dummy) + (call $$dummy) (call $$dummy) (i64.const -2) (call $$dummy) + (call $$dummy) (call $$dummy) (i32.const -3) (call $$dummy) + ) + ) + (drop) (drop) + ) + + (func (export "nested") (param i32 i32) (result i32) + (if (result i32) (local.get 0) + (then + (if (local.get 1) (then (call $$dummy) (block) (nop))) + (if (local.get 1) (then) (else (call $$dummy) (block) (nop))) + (if (result i32) (local.get 1) + (then (call $$dummy) (i32.const 9)) + (else (call $$dummy) (i32.const 10)) + ) + ) + (else + (if (local.get 1) (then (call $$dummy) (block) (nop))) + (if (local.get 1) (then) (else (call $$dummy) (block) (nop))) + (if (result i32) (local.get 1) + (then (call $$dummy) (i32.const 10)) + (else (call $$dummy) (i32.const 11)) + ) + ) + ) + ) + + (func (export "as-select-first") (param i32) (result i32) + (select + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) (i32.const 3) + ) + ) + (func (export "as-select-mid") (param i32) (result i32) + (select + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 3) + ) + ) + (func (export "as-select-last") (param i32) (result i32) + (select + (i32.const 2) (i32.const 3) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + ) + ) + + (func (export "as-loop-first") (param i32) (result i32) + (loop (result i32) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (call $$dummy) (call $$dummy) + ) + ) + (func (export "as-loop-mid") (param i32) (result i32) + (loop (result i32) + (call $$dummy) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (call $$dummy) + ) + ) + (func (export "as-loop-last") (param i32) (result i32) + (loop (result i32) + (call $$dummy) (call $$dummy) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + ) + ) + + (func (export "as-if-condition") (param i32) (result i32) + (if (result i32) + (if (result i32) (local.get 0) + (then (i32.const 1)) (else (i32.const 0)) + ) + (then (call $$dummy) (i32.const 2)) + (else (call $$dummy) (i32.const 3)) + ) + ) + + (func (export "as-br_if-first") (param i32) (result i32) + (block (result i32) + (br_if 0 + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) + ) + (return (i32.const 3)) + ) + ) + (func (export "as-br_if-last") (param i32) (result i32) + (block (result i32) + (br_if 0 + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + ) + (return (i32.const 3)) + ) + ) + + (func (export "as-br_table-first") (param i32) (result i32) + (block (result i32) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) + (br_table 0 0) + ) + ) + (func (export "as-br_table-last") (param i32) (result i32) + (block (result i32) + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (br_table 0 0) + ) + ) + + (func $$func (param i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-first") (param i32) (result i32) + (block (result i32) + (call_indirect (type $$check) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (param i32) (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (param i32) (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (i32.const 0) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + ) + ) + ) + + (func (export "as-store-first") (param i32) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) + (i32.store) + ) + (func (export "as-store-last") (param i32) + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.store) + ) + + (func (export "as-memory.grow-value") (param i32) (result i32) + (memory.grow + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "as-call-value") (param i32) (result i32) + (call $$f + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + (func (export "as-return-value") (param i32) (result i32) + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0))) + (return) + ) + (func (export "as-drop-operand") (param i32) + (drop + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + (func (export "as-br-value") (param i32) (result i32) + (block (result i32) + (br 0 + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + ) + (func (export "as-local.set-value") (param i32) (result i32) + (local i32) + (local.set 0 + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + (local.get 0) + ) + (func (export "as-local.tee-value") (param i32) (result i32) + (local.tee 0 + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + (global $$a (mut i32) (i32.const 10)) + (func (export "as-global.set-value") (param i32) (result i32) + (global.set $$a + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) (global.get $$a) + ) + (func (export "as-load-operand") (param i32) (result i32) + (i32.load + (if (result i32) (local.get 0) + (then (i32.const 11)) + (else (i32.const 10)) + ) + ) + ) + + (func (export "as-unary-operand") (param i32) (result i32) + (i32.ctz + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 13)) + (else (call $$dummy) (i32.const -13)) + ) + ) + ) + (func (export "as-binary-operand") (param i32 i32) (result i32) + (i32.mul + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 3)) + (else (call $$dummy) (i32.const -3)) + ) + (if (result i32) (local.get 1) + (then (call $$dummy) (i32.const 4)) + (else (call $$dummy) (i32.const -5)) + ) + ) + ) + (func (export "as-test-operand") (param i32) (result i32) + (i32.eqz + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 13)) + (else (call $$dummy) (i32.const 0)) + ) + ) + ) + (func (export "as-compare-operand") (param i32 i32) (result i32) + (f32.gt + (if (result f32) (local.get 0) + (then (call $$dummy) (f32.const 3)) + (else (call $$dummy) (f32.const -3)) + ) + (if (result f32) (local.get 1) + (then (call $$dummy) (f32.const 4)) + (else (call $$dummy) (f32.const -4)) + ) + ) + ) + (func (export "as-binary-operands") (param i32) (result i32) + (i32.mul + (if (result i32 i32) (local.get 0) + (then (call $$dummy) (i32.const 3) (call $$dummy) (i32.const 4)) + (else (call $$dummy) (i32.const 3) (call $$dummy) (i32.const -4)) + ) + ) + ) + (func (export "as-compare-operands") (param i32) (result i32) + (f32.gt + (if (result f32 f32) (local.get 0) + (then (call $$dummy) (f32.const 3) (call $$dummy) (f32.const 3)) + (else (call $$dummy) (f32.const -2) (call $$dummy) (f32.const -3)) + ) + ) + ) + (func (export "as-mixed-operands") (param i32) (result i32) + (if (result i32 i32) (local.get 0) + (then (call $$dummy) (i32.const 3) (call $$dummy) (i32.const 4)) + (else (call $$dummy) (i32.const -3) (call $$dummy) (i32.const -4)) + ) + (i32.const 5) + (i32.add) + (i32.mul) + ) + + (func (export "break-bare") (result i32) + (if (i32.const 1) (then (br 0) (unreachable))) + (if (i32.const 1) (then (br 0) (unreachable)) (else (unreachable))) + (if (i32.const 0) (then (unreachable)) (else (br 0) (unreachable))) + (if (i32.const 1) (then (br_if 0 (i32.const 1)) (unreachable))) + (if (i32.const 1) (then (br_if 0 (i32.const 1)) (unreachable)) (else (unreachable))) + (if (i32.const 0) (then (unreachable)) (else (br_if 0 (i32.const 1)) (unreachable))) + (if (i32.const 1) (then (br_table 0 (i32.const 0)) (unreachable))) + (if (i32.const 1) (then (br_table 0 (i32.const 0)) (unreachable)) (else (unreachable))) + (if (i32.const 0) (then (unreachable)) (else (br_table 0 (i32.const 0)) (unreachable))) + (i32.const 19) + ) + + (func (export "break-value") (param i32) (result i32) + (if (result i32) (local.get 0) + (then (br 0 (i32.const 18)) (i32.const 19)) + (else (br 0 (i32.const 21)) (i32.const 20)) + ) + ) + (func (export "break-multi-value") (param i32) (result i32 i32 i64) + (if (result i32 i32 i64) (local.get 0) + (then + (br 0 (i32.const 18) (i32.const -18) (i64.const 18)) + (i32.const 19) (i32.const -19) (i64.const 19) + ) + (else + (br 0 (i32.const -18) (i32.const 18) (i64.const -18)) + (i32.const -19) (i32.const 19) (i64.const -19) + ) + ) + ) + + (func (export "param") (param i32) (result i32) + (i32.const 1) + (if (param i32) (result i32) (local.get 0) + (then (i32.const 2) (i32.add)) + (else (i32.const -2) (i32.add)) + ) + ) + (func (export "params") (param i32) (result i32) + (i32.const 1) + (i32.const 2) + (if (param i32 i32) (result i32) (local.get 0) + (then (i32.add)) + (else (i32.sub)) + ) + ) + (func (export "params-id") (param i32) (result i32) + (i32.const 1) + (i32.const 2) + (if (param i32 i32) (result i32 i32) (local.get 0) (then)) + (i32.add) + ) + (func (export "param-break") (param i32) (result i32) + (i32.const 1) + (if (param i32) (result i32) (local.get 0) + (then (i32.const 2) (i32.add) (br 0)) + (else (i32.const -2) (i32.add) (br 0)) + ) + ) + (func (export "params-break") (param i32) (result i32) + (i32.const 1) + (i32.const 2) + (if (param i32 i32) (result i32) (local.get 0) + (then (i32.add) (br 0)) + (else (i32.sub) (br 0)) + ) + ) + (func (export "params-id-break") (param i32) (result i32) + (i32.const 1) + (i32.const 2) + (if (param i32 i32) (result i32 i32) (local.get 0) (then (br 0))) + (i32.add) + ) + + (func (export "effects") (param i32) (result i32) + (local i32) + (if + (block (result i32) (local.set 1 (i32.const 1)) (local.get 0)) + (then + (local.set 1 (i32.mul (local.get 1) (i32.const 3))) + (local.set 1 (i32.sub (local.get 1) (i32.const 5))) + (local.set 1 (i32.mul (local.get 1) (i32.const 7))) + (br 0) + (local.set 1 (i32.mul (local.get 1) (i32.const 100))) + ) + (else + (local.set 1 (i32.mul (local.get 1) (i32.const 5))) + (local.set 1 (i32.sub (local.get 1) (i32.const 7))) + (local.set 1 (i32.mul (local.get 1) (i32.const 3))) + (br 0) + (local.set 1 (i32.mul (local.get 1) (i32.const 1000))) + ) + ) + (local.get 1) + ) + + ;; Examples + + (func $$add64_u_with_carry (export "add64_u_with_carry") + (param $$i i64) (param $$j i64) (param $$c i32) (result i64 i32) + (local $$k i64) + (local.set $$k + (i64.add + (i64.add (local.get $$i) (local.get $$j)) + (i64.extend_i32_u (local.get $$c)) + ) + ) + (return (local.get $$k) (i64.lt_u (local.get $$k) (local.get $$i))) + ) + + (func $$add64_u_saturated (export "add64_u_saturated") + (param i64 i64) (result i64) + (call $$add64_u_with_carry (local.get 0) (local.get 1) (i32.const 0)) + (if (param i64) (result i64) + (then (drop) (i64.const -1)) + ) + ) + + ;; Block signature syntax + + (type $$block-sig-1 (func)) + (type $$block-sig-2 (func (result i32))) + (type $$block-sig-3 (func (param $$x i32))) + (type $$block-sig-4 (func (param i32 f64 i32) (result i32 f64 i32))) + + (func (export "type-use") + (if (type $$block-sig-1) (i32.const 1) (then)) + (if (type $$block-sig-2) (i32.const 1) + (then (i32.const 0)) (else (i32.const 2)) + ) + (if (type $$block-sig-3) (i32.const 1) (then (drop)) (else (drop))) + (i32.const 0) (f64.const 0) (i32.const 0) + (if (type $$block-sig-4) (i32.const 1) (then)) + (drop) (drop) (drop) + (if (type $$block-sig-2) (result i32) (i32.const 1) + (then (i32.const 0)) (else (i32.const 2)) + ) + (if (type $$block-sig-3) (param i32) (i32.const 1) + (then (drop)) (else (drop)) + ) + (i32.const 0) (f64.const 0) (i32.const 0) + (if (type $$block-sig-4) + (param i32) (param f64 i32) (result i32 f64) (result i32) + (i32.const 1) (then) + ) + (drop) (drop) (drop) + ) +)`); + +// ./test/core/if.wast:529 +assert_return(() => invoke($0, `empty`, [0]), []); + +// ./test/core/if.wast:530 +assert_return(() => invoke($0, `empty`, [1]), []); + +// ./test/core/if.wast:531 +assert_return(() => invoke($0, `empty`, [100]), []); + +// ./test/core/if.wast:532 +assert_return(() => invoke($0, `empty`, [-2]), []); + +// ./test/core/if.wast:534 +assert_return(() => invoke($0, `singular`, [0]), [value("i32", 8)]); + +// ./test/core/if.wast:535 +assert_return(() => invoke($0, `singular`, [1]), [value("i32", 7)]); + +// ./test/core/if.wast:536 +assert_return(() => invoke($0, `singular`, [10]), [value("i32", 7)]); + +// ./test/core/if.wast:537 +assert_return(() => invoke($0, `singular`, [-10]), [value("i32", 7)]); + +// ./test/core/if.wast:539 +assert_return(() => invoke($0, `multi`, [0]), [value("i32", 9), value("i32", -1)]); + +// ./test/core/if.wast:540 +assert_return(() => invoke($0, `multi`, [1]), [value("i32", 8), value("i32", 1)]); + +// ./test/core/if.wast:541 +assert_return(() => invoke($0, `multi`, [13]), [value("i32", 8), value("i32", 1)]); + +// ./test/core/if.wast:542 +assert_return(() => invoke($0, `multi`, [-5]), [value("i32", 8), value("i32", 1)]); + +// ./test/core/if.wast:544 +assert_return(() => invoke($0, `nested`, [0, 0]), [value("i32", 11)]); + +// ./test/core/if.wast:545 +assert_return(() => invoke($0, `nested`, [1, 0]), [value("i32", 10)]); + +// ./test/core/if.wast:546 +assert_return(() => invoke($0, `nested`, [0, 1]), [value("i32", 10)]); + +// ./test/core/if.wast:547 +assert_return(() => invoke($0, `nested`, [3, 2]), [value("i32", 9)]); + +// ./test/core/if.wast:548 +assert_return(() => invoke($0, `nested`, [0, -100]), [value("i32", 10)]); + +// ./test/core/if.wast:549 +assert_return(() => invoke($0, `nested`, [10, 10]), [value("i32", 9)]); + +// ./test/core/if.wast:550 +assert_return(() => invoke($0, `nested`, [0, -1]), [value("i32", 10)]); + +// ./test/core/if.wast:551 +assert_return(() => invoke($0, `nested`, [-111, -2]), [value("i32", 9)]); + +// ./test/core/if.wast:553 +assert_return(() => invoke($0, `as-select-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:554 +assert_return(() => invoke($0, `as-select-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:555 +assert_return(() => invoke($0, `as-select-mid`, [0]), [value("i32", 2)]); + +// ./test/core/if.wast:556 +assert_return(() => invoke($0, `as-select-mid`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:557 +assert_return(() => invoke($0, `as-select-last`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:558 +assert_return(() => invoke($0, `as-select-last`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:560 +assert_return(() => invoke($0, `as-loop-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:561 +assert_return(() => invoke($0, `as-loop-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:562 +assert_return(() => invoke($0, `as-loop-mid`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:563 +assert_return(() => invoke($0, `as-loop-mid`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:564 +assert_return(() => invoke($0, `as-loop-last`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:565 +assert_return(() => invoke($0, `as-loop-last`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:567 +assert_return(() => invoke($0, `as-if-condition`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:568 +assert_return(() => invoke($0, `as-if-condition`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:570 +assert_return(() => invoke($0, `as-br_if-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:571 +assert_return(() => invoke($0, `as-br_if-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:572 +assert_return(() => invoke($0, `as-br_if-last`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:573 +assert_return(() => invoke($0, `as-br_if-last`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:575 +assert_return(() => invoke($0, `as-br_table-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:576 +assert_return(() => invoke($0, `as-br_table-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:577 +assert_return(() => invoke($0, `as-br_table-last`, [0]), [value("i32", 2)]); + +// ./test/core/if.wast:578 +assert_return(() => invoke($0, `as-br_table-last`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:580 +assert_return(() => invoke($0, `as-call_indirect-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:581 +assert_return(() => invoke($0, `as-call_indirect-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:582 +assert_return(() => invoke($0, `as-call_indirect-mid`, [0]), [value("i32", 2)]); + +// ./test/core/if.wast:583 +assert_return(() => invoke($0, `as-call_indirect-mid`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:584 +assert_return(() => invoke($0, `as-call_indirect-last`, [0]), [value("i32", 2)]); + +// ./test/core/if.wast:585 +assert_trap(() => invoke($0, `as-call_indirect-last`, [1]), `undefined element`); + +// ./test/core/if.wast:587 +assert_return(() => invoke($0, `as-store-first`, [0]), []); + +// ./test/core/if.wast:588 +assert_return(() => invoke($0, `as-store-first`, [1]), []); + +// ./test/core/if.wast:589 +assert_return(() => invoke($0, `as-store-last`, [0]), []); + +// ./test/core/if.wast:590 +assert_return(() => invoke($0, `as-store-last`, [1]), []); + +// ./test/core/if.wast:592 +assert_return(() => invoke($0, `as-memory.grow-value`, [0]), [value("i32", 1)]); + +// ./test/core/if.wast:593 +assert_return(() => invoke($0, `as-memory.grow-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:595 +assert_return(() => invoke($0, `as-call-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:596 +assert_return(() => invoke($0, `as-call-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:598 +assert_return(() => invoke($0, `as-return-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:599 +assert_return(() => invoke($0, `as-return-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:601 +assert_return(() => invoke($0, `as-drop-operand`, [0]), []); + +// ./test/core/if.wast:602 +assert_return(() => invoke($0, `as-drop-operand`, [1]), []); + +// ./test/core/if.wast:604 +assert_return(() => invoke($0, `as-br-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:605 +assert_return(() => invoke($0, `as-br-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:607 +assert_return(() => invoke($0, `as-local.set-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:608 +assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:610 +assert_return(() => invoke($0, `as-local.tee-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:611 +assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:613 +assert_return(() => invoke($0, `as-global.set-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:614 +assert_return(() => invoke($0, `as-global.set-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:616 +assert_return(() => invoke($0, `as-load-operand`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:617 +assert_return(() => invoke($0, `as-load-operand`, [1]), [value("i32", 0)]); + +// ./test/core/if.wast:619 +assert_return(() => invoke($0, `as-unary-operand`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:620 +assert_return(() => invoke($0, `as-unary-operand`, [1]), [value("i32", 0)]); + +// ./test/core/if.wast:621 +assert_return(() => invoke($0, `as-unary-operand`, [-1]), [value("i32", 0)]); + +// ./test/core/if.wast:623 +assert_return(() => invoke($0, `as-binary-operand`, [0, 0]), [value("i32", 15)]); + +// ./test/core/if.wast:624 +assert_return(() => invoke($0, `as-binary-operand`, [0, 1]), [value("i32", -12)]); + +// ./test/core/if.wast:625 +assert_return(() => invoke($0, `as-binary-operand`, [1, 0]), [value("i32", -15)]); + +// ./test/core/if.wast:626 +assert_return(() => invoke($0, `as-binary-operand`, [1, 1]), [value("i32", 12)]); + +// ./test/core/if.wast:628 +assert_return(() => invoke($0, `as-test-operand`, [0]), [value("i32", 1)]); + +// ./test/core/if.wast:629 +assert_return(() => invoke($0, `as-test-operand`, [1]), [value("i32", 0)]); + +// ./test/core/if.wast:631 +assert_return(() => invoke($0, `as-compare-operand`, [0, 0]), [value("i32", 1)]); + +// ./test/core/if.wast:632 +assert_return(() => invoke($0, `as-compare-operand`, [0, 1]), [value("i32", 0)]); + +// ./test/core/if.wast:633 +assert_return(() => invoke($0, `as-compare-operand`, [1, 0]), [value("i32", 1)]); + +// ./test/core/if.wast:634 +assert_return(() => invoke($0, `as-compare-operand`, [1, 1]), [value("i32", 0)]); + +// ./test/core/if.wast:636 +assert_return(() => invoke($0, `as-binary-operands`, [0]), [value("i32", -12)]); + +// ./test/core/if.wast:637 +assert_return(() => invoke($0, `as-binary-operands`, [1]), [value("i32", 12)]); + +// ./test/core/if.wast:639 +assert_return(() => invoke($0, `as-compare-operands`, [0]), [value("i32", 1)]); + +// ./test/core/if.wast:640 +assert_return(() => invoke($0, `as-compare-operands`, [1]), [value("i32", 0)]); + +// ./test/core/if.wast:642 +assert_return(() => invoke($0, `as-mixed-operands`, [0]), [value("i32", -3)]); + +// ./test/core/if.wast:643 +assert_return(() => invoke($0, `as-mixed-operands`, [1]), [value("i32", 27)]); + +// ./test/core/if.wast:645 +assert_return(() => invoke($0, `break-bare`, []), [value("i32", 19)]); + +// ./test/core/if.wast:646 +assert_return(() => invoke($0, `break-value`, [1]), [value("i32", 18)]); + +// ./test/core/if.wast:647 +assert_return(() => invoke($0, `break-value`, [0]), [value("i32", 21)]); + +// ./test/core/if.wast:648 +assert_return( + () => invoke($0, `break-multi-value`, [0]), + [value("i32", -18), value("i32", 18), value("i64", -18n)], +); + +// ./test/core/if.wast:651 +assert_return( + () => invoke($0, `break-multi-value`, [1]), + [value("i32", 18), value("i32", -18), value("i64", 18n)], +); + +// ./test/core/if.wast:655 +assert_return(() => invoke($0, `param`, [0]), [value("i32", -1)]); + +// ./test/core/if.wast:656 +assert_return(() => invoke($0, `param`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:657 +assert_return(() => invoke($0, `params`, [0]), [value("i32", -1)]); + +// ./test/core/if.wast:658 +assert_return(() => invoke($0, `params`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:659 +assert_return(() => invoke($0, `params-id`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:660 +assert_return(() => invoke($0, `params-id`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:661 +assert_return(() => invoke($0, `param-break`, [0]), [value("i32", -1)]); + +// ./test/core/if.wast:662 +assert_return(() => invoke($0, `param-break`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:663 +assert_return(() => invoke($0, `params-break`, [0]), [value("i32", -1)]); + +// ./test/core/if.wast:664 +assert_return(() => invoke($0, `params-break`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:665 +assert_return(() => invoke($0, `params-id-break`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:666 +assert_return(() => invoke($0, `params-id-break`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:668 +assert_return(() => invoke($0, `effects`, [1]), [value("i32", -14)]); + +// ./test/core/if.wast:669 +assert_return(() => invoke($0, `effects`, [0]), [value("i32", -6)]); + +// ./test/core/if.wast:671 +assert_return(() => invoke($0, `add64_u_with_carry`, [0n, 0n, 0]), [value("i64", 0n), value("i32", 0)]); + +// ./test/core/if.wast:675 +assert_return( + () => invoke($0, `add64_u_with_carry`, [100n, 124n, 0]), + [value("i64", 224n), value("i32", 0)], +); + +// ./test/core/if.wast:679 +assert_return( + () => invoke($0, `add64_u_with_carry`, [-1n, 0n, 0]), + [value("i64", -1n), value("i32", 0)], +); + +// ./test/core/if.wast:683 +assert_return(() => invoke($0, `add64_u_with_carry`, [-1n, 1n, 0]), [value("i64", 0n), value("i32", 1)]); + +// ./test/core/if.wast:687 +assert_return( + () => invoke($0, `add64_u_with_carry`, [-1n, -1n, 0]), + [value("i64", -2n), value("i32", 1)], +); + +// ./test/core/if.wast:691 +assert_return(() => invoke($0, `add64_u_with_carry`, [-1n, 0n, 1]), [value("i64", 0n), value("i32", 1)]); + +// ./test/core/if.wast:695 +assert_return(() => invoke($0, `add64_u_with_carry`, [-1n, 1n, 1]), [value("i64", 1n), value("i32", 1)]); + +// ./test/core/if.wast:699 +assert_return( + () => invoke($0, `add64_u_with_carry`, [ + -9223372036854775808n, + -9223372036854775808n, + 0, + ]), + [value("i64", 0n), value("i32", 1)], +); + +// ./test/core/if.wast:704 +assert_return(() => invoke($0, `add64_u_saturated`, [0n, 0n]), [value("i64", 0n)]); + +// ./test/core/if.wast:707 +assert_return(() => invoke($0, `add64_u_saturated`, [1230n, 23n]), [value("i64", 1253n)]); + +// ./test/core/if.wast:710 +assert_return(() => invoke($0, `add64_u_saturated`, [-1n, 0n]), [value("i64", -1n)]); + +// ./test/core/if.wast:713 +assert_return(() => invoke($0, `add64_u_saturated`, [-1n, 1n]), [value("i64", -1n)]); + +// ./test/core/if.wast:716 +assert_return(() => invoke($0, `add64_u_saturated`, [-1n, -1n]), [value("i64", -1n)]); + +// ./test/core/if.wast:719 +assert_return( + () => invoke($0, `add64_u_saturated`, [-9223372036854775808n, -9223372036854775808n]), + [value("i64", -1n)], +); + +// ./test/core/if.wast:723 +assert_return(() => invoke($0, `type-use`, []), []); + +// ./test/core/if.wast:725 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (type $$sig) (result i32) (param i32) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:734 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (param i32) (type $$sig) (result i32) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:743 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (param i32) (result i32) (type $$sig) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:752 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (result i32) (type $$sig) (param i32) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:761 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (result i32) (param i32) (type $$sig) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:770 +assert_malformed( + () => instantiate(`(func (i32.const 0) (if (result i32) (param i32) (i32.const 1) (then))) `), + `unexpected token`, +); + +// ./test/core/if.wast:777 +assert_malformed( + () => instantiate(`(func (i32.const 0) (i32.const 1) (if (param $$x i32) (then (drop)) (else (drop))) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:785 +assert_malformed( + () => instantiate(`(type $$sig (func)) (func (i32.const 1) (if (type $$sig) (result i32) (then (i32.const 0)) (else (i32.const 2))) (unreachable) ) `), + `inline function type`, +); + +// ./test/core/if.wast:795 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 1) (if (type $$sig) (result i32) (then (i32.const 0)) (else (i32.const 2))) (unreachable) ) `), + `inline function type`, +); + +// ./test/core/if.wast:805 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (i32.const 1) (if (type $$sig) (param i32) (then (drop)) (else (drop))) (unreachable) ) `), + `inline function type`, +); + +// ./test/core/if.wast:815 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32 i32) (result i32))) (func (i32.const 0) (i32.const 1) (if (type $$sig) (param i32) (result i32) (then)) (unreachable) ) `), + `inline function type`, +); + +// ./test/core/if.wast:825 +assert_invalid( + () => instantiate(`(module + (type $$sig (func)) + (func (i32.const 1) (if (type $$sig) (i32.const 0) (then))) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:833 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i32 (result i32) (if (i32.const 0) (then))))`), + `type mismatch`, +); + +// ./test/core/if.wast:837 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i64 (result i64) (if (i32.const 0) (then))))`), + `type mismatch`, +); + +// ./test/core/if.wast:841 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f32 (result f32) (if (i32.const 0) (then))))`), + `type mismatch`, +); + +// ./test/core/if.wast:845 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f64 (result f64) (if (i32.const 0) (then))))`), + `type mismatch`, +); + +// ./test/core/if.wast:850 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i32 (result i32) (if (i32.const 0) (then) (else))))`), + `type mismatch`, +); + +// ./test/core/if.wast:854 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i64 (result i64) (if (i32.const 0) (then) (else))))`), + `type mismatch`, +); + +// ./test/core/if.wast:858 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f32 (result f32) (if (i32.const 0) (then) (else))))`), + `type mismatch`, +); + +// ./test/core/if.wast:862 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f64 (result f64) (if (i32.const 0) (then) (else))))`), + `type mismatch`, +); + +// ./test/core/if.wast:867 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-num-vs-void + (if (i32.const 1) (then (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:873 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-num-vs-void-else + (if (i32.const 1) (then (i32.const 1)) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:879 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-num-vs-void + (if (i32.const 1) (then) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:885 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-num-vs-void + (if (i32.const 1) (then (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:892 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-nums-vs-void + (if (i32.const 1) (then (i32.const 1) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:898 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-nums-vs-void-else + (if (i32.const 1) (then (i32.const 1) (i32.const 2)) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:904 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-nums-vs-void + (if (i32.const 1) (then) (else (i32.const 1) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:910 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-nums-vs-void + (if (i32.const 1) (then (i32.const 1) (i32.const 2)) (else (i32.const 2) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:917 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-empty-vs-num (result i32) + (if (result i32) (i32.const 1) (then) (else (i32.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:923 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-empty-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 0)) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:929 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-empty-vs-num (result i32) + (if (result i32) (i32.const 1) (then) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:936 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then) (else (i32.const 0) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:942 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 0) (i32.const 1)) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:948 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:955 +assert_invalid( + () => instantiate(`(module (func $$type-no-else-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:961 +assert_invalid( + () => instantiate(`(module (func $$type-no-else-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:968 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (nop)) (else (i32.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:974 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 0)) (else (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:980 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (nop)) (else (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:987 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (nop)) (else (i32.const 0) (i32.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:993 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 0) (i32.const 0)) (else (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:999 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (nop)) (else (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1006 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-num-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i64.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1012 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-num-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1)) (else (i64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1018 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-num-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i64.const 1)) (else (i64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1025 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1031 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1037 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1044 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-partial-vs-nums (result i32 i32) + (i32.const 0) + (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1051 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-partial-vs-nums (result i32 i32) + (i32.const 0) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1058 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-partial-vs-nums (result i32 i32) + (i32.const 0) + (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1066 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-nums-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1072 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-nums-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1078 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-nums-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1085 +assert_invalid( + () => instantiate(`(module (func $$type-both-different-value-num-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i64.const 1)) (else (f64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1091 +assert_invalid( + () => instantiate(`(module (func $$type-both-different-value-nums-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1) (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1098 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-unreached-select (result i32) + (if (result i64) + (i32.const 0) + (then (select (unreachable) (unreachable) (unreachable))) + (else (i64.const 0)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1108 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-unreached-select (result i32) + (if (result i64) + (i32.const 1) + (then (i64.const 0)) + (else (select (unreachable) (unreachable) (unreachable))) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1118 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-unreached-select (result i32) + (if (result i64) + (i32.const 1) + (then (select (unreachable) (unreachable) (unreachable))) + (else (select (unreachable) (unreachable) (unreachable))) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1129 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-last-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (br 0)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1135 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-last-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1)) (else (br 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1141 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-last-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (br 0)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1147 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-last-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (br 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1154 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-empty-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (br 0) (i32.const 1)) + (else (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1163 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-empty-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (i32.const 1)) + (else (br 0) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1172 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (br 0) (i32.const 1) (i32.const 1)) + (else (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1181 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (i32.const 1) (i32.const 1)) + (else (br 0) (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1191 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-void-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (br 0 (nop)) (i32.const 1)) + (else (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1200 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-void-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (i32.const 1)) + (else (br 0 (nop)) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1209 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (br 0 (nop)) (i32.const 1) (i32.const 1)) + (else (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1218 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (i32.const 1) (i32.const 1)) + (else (br 0 (nop)) (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1228 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-num-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (br 0 (i64.const 1)) (i32.const 1)) + (else (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1237 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-num-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (i32.const 1)) + (else (br 0 (i64.const 1)) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1246 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (br 0 (i64.const 1)) (i32.const 1) (i32.const 1)) + (else (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1255 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (i32.const 1) (i32.const 1)) + (else (br 0 (i64.const 1)) (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1264 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-partial-vs-nums (result i32 i32) + (i32.const 1) + (if (result i32 i32) (i32.const 1) + (then (br 0 (i64.const 1)) (i32.const 1)) + (else (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1274 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-partial-vs-nums (result i32 i32) + (i32.const 1) + (if (result i32 i32) (i32.const 1) + (then (i32.const 1)) + (else (br 0 (i64.const 1)) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1285 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty + (if (then)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1293 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-block + (i32.const 0) + (block (if (then))) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1302 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-loop + (i32.const 0) + (loop (if (then))) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1311 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (if (then)))) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1320 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (if (then)) (i32.const 0))) + (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1330 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-br + (i32.const 0) + (block (br 0 (if(then))) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1339 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-br_if + (i32.const 0) + (block (br_if 0 (if(then)) (i32.const 1)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1348 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-br_table + (i32.const 0) + (block (br_table 0 (if(then))) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1357 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-return + (return (if(then))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1365 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-select + (select (if(then)) (i32.const 1) (i32.const 2)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1373 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-call + (call 1 (if(then))) (drop) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1382 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-condition-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (if(then)) (i32.const 0) + ) + (drop) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1398 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-local.set + (local i32) + (local.set 0 (if(then))) (local.get 0) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1407 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-local.tee + (local i32) + (local.tee 0 (if(then))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1416 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-condition-empty-in-global.set + (global.set $$x (if(then))) (global.get $$x) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1425 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-condition-empty-in-memory.grow + (memory.grow (if(then))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1434 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-condition-empty-in-load + (i32.load (if(then))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1443 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-condition-empty-in-store + (i32.store (if(then)) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1453 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-num + (if (param i32) (i32.const 1) (then (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1459 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-nums + (if (param i32 f64) (i32.const 1) (then (drop) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1465 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num + (f32.const 0) (if (param i32) (i32.const 1) (then (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1471 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-nums + (f32.const 0) (if (param f32 i32) (i32.const 1) (then (drop) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1477 +assert_invalid( + () => instantiate(`(module (func $$type-param-nested-void-vs-num + (block (if (param i32) (i32.const 1) (then (drop)))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1483 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-nums + (block (if (param i32 f64) (i32.const 1) (then (drop) (drop)))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1489 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num + (block (f32.const 0) (if (param i32) (i32.const 1) (then (drop)))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1495 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-nums + (block (f32.const 0) (if (param f32 i32) (i32.const 1) (then (drop) (drop)))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1502 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) if (param $$x i32) end) `), + `unexpected token`, +); + +// ./test/core/if.wast:1506 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) (if (param $$x i32) (then))) `), + `unexpected token`, +); + +// ./test/core/if.wast:1511 +assert_malformed(() => instantiate(`(func i32.const 0 if end $$l) `), `mismatching label`); + +// ./test/core/if.wast:1515 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1519 +assert_malformed( + () => instantiate(`(func i32.const 0 if else $$l end) `), + `mismatching label`, +); + +// ./test/core/if.wast:1523 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a else $$l end) `), + `mismatching label`, +); + +// ./test/core/if.wast:1527 +assert_malformed( + () => instantiate(`(func i32.const 0 if else end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1531 +assert_malformed( + () => instantiate(`(func i32.const 0 if else $$l end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1535 +assert_malformed( + () => instantiate(`(func i32.const 0 if else $$l1 end $$l2) `), + `mismatching label`, +); + +// ./test/core/if.wast:1539 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a else end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1543 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a else $$a end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1547 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a else $$l end $$l) `), + `mismatching label`, +); diff --git a/js/src/jit-test/tests/wasm/spec/function-references/local_get.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/local_get.wast.js new file mode 100644 index 0000000000..c51b00bd31 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/local_get.wast.js @@ -0,0 +1,279 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/local_get.wast + +// ./test/core/local_get.wast:3 +let $0 = instantiate(`(module + ;; Typing + + (func (export "type-local-i32") (result i32) (local i32) (local.get 0)) + (func (export "type-local-i64") (result i64) (local i64) (local.get 0)) + (func (export "type-local-f32") (result f32) (local f32) (local.get 0)) + (func (export "type-local-f64") (result f64) (local f64) (local.get 0)) + + (func (export "type-param-i32") (param i32) (result i32) (local.get 0)) + (func (export "type-param-i64") (param i64) (result i64) (local.get 0)) + (func (export "type-param-f32") (param f32) (result f32) (local.get 0)) + (func (export "type-param-f64") (param f64) (result f64) (local.get 0)) + + (func (export "type-mixed") (param i64 f32 f64 i32 i32) + (local f32 i64 i64 f64) + (drop (i64.eqz (local.get 0))) + (drop (f32.neg (local.get 1))) + (drop (f64.neg (local.get 2))) + (drop (i32.eqz (local.get 3))) + (drop (i32.eqz (local.get 4))) + (drop (f32.neg (local.get 5))) + (drop (i64.eqz (local.get 6))) + (drop (i64.eqz (local.get 7))) + (drop (f64.neg (local.get 8))) + ) + + ;; Reading + + (func (export "read") (param i64 f32 f64 i32 i32) (result f64) + (local f32 i64 i64 f64) + (local.set 5 (f32.const 5.5)) + (local.set 6 (i64.const 6)) + (local.set 8 (f64.const 8)) + (f64.add + (f64.convert_i64_u (local.get 0)) + (f64.add + (f64.promote_f32 (local.get 1)) + (f64.add + (local.get 2) + (f64.add + (f64.convert_i32_u (local.get 3)) + (f64.add + (f64.convert_i32_s (local.get 4)) + (f64.add + (f64.promote_f32 (local.get 5)) + (f64.add + (f64.convert_i64_u (local.get 6)) + (f64.add + (f64.convert_i64_u (local.get 7)) + (local.get 8) + ) + ) + ) + ) + ) + ) + ) + ) + ) + + ;; As parameter of control constructs and instructions + + (func (export "as-block-value") (param i32) (result i32) + (block (result i32) (local.get 0)) + ) + (func (export "as-loop-value") (param i32) (result i32) + (loop (result i32) (local.get 0)) + ) + (func (export "as-br-value") (param i32) (result i32) + (block (result i32) (br 0 (local.get 0))) + ) + (func (export "as-br_if-value") (param i32) (result i32) + (block $$l0 (result i32) (br_if $$l0 (local.get 0) (i32.const 1))) + ) + + (func (export "as-br_if-value-cond") (param i32) (result i32) + (block (result i32) + (br_if 0 (local.get 0) (local.get 0)) + ) + ) + (func (export "as-br_table-value") (param i32) (result i32) + (block + (block + (block + (br_table 0 1 2 (local.get 0)) + (return (i32.const 0)) + ) + (return (i32.const 1)) + ) + (return (i32.const 2)) + ) + (i32.const 3) + ) + + (func (export "as-return-value") (param i32) (result i32) + (return (local.get 0)) + ) + + (func (export "as-if-then") (param i32) (result i32) + (if (result i32) (local.get 0) (then (local.get 0)) (else (i32.const 0))) + ) + (func (export "as-if-else") (param i32) (result i32) + (if (result i32) (local.get 0) (then (i32.const 1)) (else (local.get 0))) + ) +)`); + +// ./test/core/local_get.wast:109 +assert_return(() => invoke($0, `type-local-i32`, []), [value("i32", 0)]); + +// ./test/core/local_get.wast:110 +assert_return(() => invoke($0, `type-local-i64`, []), [value("i64", 0n)]); + +// ./test/core/local_get.wast:111 +assert_return(() => invoke($0, `type-local-f32`, []), [value("f32", 0)]); + +// ./test/core/local_get.wast:112 +assert_return(() => invoke($0, `type-local-f64`, []), [value("f64", 0)]); + +// ./test/core/local_get.wast:114 +assert_return(() => invoke($0, `type-param-i32`, [2]), [value("i32", 2)]); + +// ./test/core/local_get.wast:115 +assert_return(() => invoke($0, `type-param-i64`, [3n]), [value("i64", 3n)]); + +// ./test/core/local_get.wast:116 +assert_return(() => invoke($0, `type-param-f32`, [value("f32", 4.4)]), [value("f32", 4.4)]); + +// ./test/core/local_get.wast:117 +assert_return(() => invoke($0, `type-param-f64`, [value("f64", 5.5)]), [value("f64", 5.5)]); + +// ./test/core/local_get.wast:119 +assert_return(() => invoke($0, `as-block-value`, [6]), [value("i32", 6)]); + +// ./test/core/local_get.wast:120 +assert_return(() => invoke($0, `as-loop-value`, [7]), [value("i32", 7)]); + +// ./test/core/local_get.wast:122 +assert_return(() => invoke($0, `as-br-value`, [8]), [value("i32", 8)]); + +// ./test/core/local_get.wast:123 +assert_return(() => invoke($0, `as-br_if-value`, [9]), [value("i32", 9)]); + +// ./test/core/local_get.wast:124 +assert_return(() => invoke($0, `as-br_if-value-cond`, [10]), [value("i32", 10)]); + +// ./test/core/local_get.wast:125 +assert_return(() => invoke($0, `as-br_table-value`, [1]), [value("i32", 2)]); + +// ./test/core/local_get.wast:127 +assert_return(() => invoke($0, `as-return-value`, [0]), [value("i32", 0)]); + +// ./test/core/local_get.wast:129 +assert_return(() => invoke($0, `as-if-then`, [1]), [value("i32", 1)]); + +// ./test/core/local_get.wast:130 +assert_return(() => invoke($0, `as-if-else`, [0]), [value("i32", 0)]); + +// ./test/core/local_get.wast:132 +assert_return(() => invoke($0, `type-mixed`, [1n, value("f32", 2.2), value("f64", 3.3), 4, 5]), []); + +// ./test/core/local_get.wast:138 +assert_return( + () => invoke($0, `read`, [1n, value("f32", 2), value("f64", 3.3), 4, 5]), + [value("f64", 34.8)], +); + +// ./test/core/local_get.wast:148 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (result i64) (local i32) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:152 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (result i32) (local f32) (i32.eqz (local.get 0))))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:156 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (result f64) (local f64 i64) (f64.neg (local.get 1))))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:164 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param i32) (result i64) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:168 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param f32) (result i32) (i32.eqz (local.get 0))))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:172 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param f64 i64) (result f64) (f64.neg (local.get 1))))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:180 +assert_invalid( + () => instantiate(`(module (func $$type-empty-vs-i32 (local i32) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:184 +assert_invalid( + () => instantiate(`(module (func $$type-empty-vs-i64 (local i64) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:188 +assert_invalid( + () => instantiate(`(module (func $$type-empty-vs-f32 (local f32) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:192 +assert_invalid( + () => instantiate(`(module (func $$type-empty-vs-f64 (local f64) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:200 +assert_invalid( + () => instantiate(`(module (func $$unbound-local (local i32 i64) (local.get 3) drop))`), + `unknown local`, +); + +// ./test/core/local_get.wast:204 +assert_invalid( + () => instantiate(`(module (func $$large-local (local i32 i64) (local.get 14324343) drop))`), + `unknown local`, +); + +// ./test/core/local_get.wast:209 +assert_invalid( + () => instantiate(`(module (func $$unbound-param (param i32 i64) (local.get 2) drop))`), + `unknown local`, +); + +// ./test/core/local_get.wast:213 +assert_invalid( + () => instantiate(`(module (func $$large-param (param i32 i64) (local.get 714324343) drop))`), + `unknown local`, +); + +// ./test/core/local_get.wast:218 +assert_invalid( + () => instantiate(`(module (func $$unbound-mixed (param i32) (local i32 i64) (local.get 3) drop))`), + `unknown local`, +); + +// ./test/core/local_get.wast:222 +assert_invalid( + () => instantiate(`(module (func $$large-mixed (param i64) (local i32 i64) (local.get 214324343) drop))`), + `unknown local`, +); diff --git a/js/src/jit-test/tests/wasm/spec/function-references/ref.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/ref.wast.js new file mode 100644 index 0000000000..5d2fce2314 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/ref.wast.js @@ -0,0 +1,110 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/ref.wast + +// ./test/core/ref.wast:3 +let $0 = instantiate(`(module + (type $$t (func)) + + (func + (param + funcref + externref + (ref func) + (ref extern) + (ref 0) + (ref $$t) + (ref 0) + (ref $$t) + (ref null func) + (ref null extern) + (ref null 0) + (ref null $$t) + ) + ) +)`); + +// ./test/core/ref.wast:27 +assert_invalid( + () => instantiate(`(module (type $$type-func-param-invalid (func (param (ref 1)))))`), + `unknown type`, +); + +// ./test/core/ref.wast:31 +assert_invalid( + () => instantiate(`(module (type $$type-func-result-invalid (func (result (ref 1)))))`), + `unknown type`, +); + +// ./test/core/ref.wast:36 +assert_invalid( + () => instantiate(`(module (global $$global-invalid (ref null 1) (ref.null 1)))`), + `unknown type`, +); + +// ./test/core/ref.wast:41 +assert_invalid( + () => instantiate(`(module (table $$table-invalid 10 (ref null 1)))`), + `unknown type`, +); + +// ./test/core/ref.wast:46 +assert_invalid( + () => instantiate(`(module (elem $$elem-invalid (ref 1)))`), + `unknown type`, +); + +// ./test/core/ref.wast:51 +assert_invalid( + () => instantiate(`(module (func $$func-param-invalid (param (ref 1))))`), + `unknown type`, +); + +// ./test/core/ref.wast:55 +assert_invalid( + () => instantiate(`(module (func $$func-result-invalid (result (ref 1))))`), + `unknown type`, +); + +// ./test/core/ref.wast:59 +assert_invalid( + () => instantiate(`(module (func $$func-local-invalid (local (ref null 1))))`), + `unknown type`, +); + +// ./test/core/ref.wast:64 +assert_invalid( + () => instantiate(`(module (func $$block-result-invalid (drop (block (result (ref 1)) (unreachable)))))`), + `unknown type`, +); + +// ./test/core/ref.wast:68 +assert_invalid( + () => instantiate(`(module (func $$loop-result-invalid (drop (loop (result (ref 1)) (unreachable)))))`), + `unknown type`, +); + +// ./test/core/ref.wast:72 +assert_invalid( + () => instantiate(`(module (func $$if-invalid (drop (if (result (ref 1)) (then) (else)))))`), + `unknown type`, +); + +// ./test/core/ref.wast:77 +assert_invalid( + () => instantiate(`(module (func $$select-result-invalid (drop (select (result (ref 1)) (unreachable)))))`), + `unknown type`, +); diff --git a/js/src/jit-test/tests/wasm/spec/function-references/ref_as_non_null.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/ref_as_non_null.wast.js new file mode 100644 index 0000000000..af2628a7b6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/ref_as_non_null.wast.js @@ -0,0 +1,71 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/ref_as_non_null.wast + +// ./test/core/ref_as_non_null.wast:1 +let $0 = instantiate(`(module + (type $$t (func (result i32))) + + (func $$nn (param $$r (ref $$t)) (result i32) + (call_ref $$t (ref.as_non_null (local.get $$r))) + ) + (func $$n (param $$r (ref null $$t)) (result i32) + (call_ref $$t (ref.as_non_null (local.get $$r))) + ) + + (elem func $$f) + (func $$f (result i32) (i32.const 7)) + + (func (export "nullable-null") (result i32) (call $$n (ref.null $$t))) + (func (export "nonnullable-f") (result i32) (call $$nn (ref.func $$f))) + (func (export "nullable-f") (result i32) (call $$n (ref.func $$f))) + + (func (export "unreachable") (result i32) + (unreachable) + (ref.as_non_null) + (call $$nn) + ) +)`); + +// ./test/core/ref_as_non_null.wast:25 +assert_trap(() => invoke($0, `unreachable`, []), `unreachable`); + +// ./test/core/ref_as_non_null.wast:27 +assert_trap(() => invoke($0, `nullable-null`, []), `null reference`); + +// ./test/core/ref_as_non_null.wast:28 +assert_return(() => invoke($0, `nonnullable-f`, []), [value("i32", 7)]); + +// ./test/core/ref_as_non_null.wast:29 +assert_return(() => invoke($0, `nullable-f`, []), [value("i32", 7)]); + +// ./test/core/ref_as_non_null.wast:31 +assert_invalid( + () => instantiate(`(module + (type $$t (func (result i32))) + (func $$g (param $$r (ref $$t)) (drop (ref.as_non_null (local.get $$r)))) + (func (call $$g (ref.null $$t))) + )`), + `type mismatch`, +); + +// ./test/core/ref_as_non_null.wast:41 +let $1 = instantiate(`(module + (type $$t (func)) + (func (param $$r (ref $$t)) (drop (ref.as_non_null (local.get $$r)))) + (func (param $$r (ref func)) (drop (ref.as_non_null (local.get $$r)))) + (func (param $$r (ref extern)) (drop (ref.as_non_null (local.get $$r)))) +)`); diff --git a/js/src/jit-test/tests/wasm/spec/function-references/ref_func.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/ref_func.wast.js new file mode 100644 index 0000000000..3ca5cea002 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/ref_func.wast.js @@ -0,0 +1,156 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/ref_func.wast + +// ./test/core/ref_func.wast:1 +let $0 = instantiate(`(module + (func (export "f") (param $$x i32) (result i32) (local.get $$x)) +)`); + +// ./test/core/ref_func.wast:4 +register($0, `M`); + +// ./test/core/ref_func.wast:6 +let $1 = instantiate(`(module + (func $$f (import "M" "f") (param i32) (result i32)) + (func $$g (param $$x i32) (result i32) + (i32.add (local.get $$x) (i32.const 1)) + ) + + (global funcref (ref.func $$f)) + (global funcref (ref.func $$g)) + (global $$v (mut funcref) (ref.func $$f)) + + (global funcref (ref.func $$gf1)) + (global funcref (ref.func $$gf2)) + (func (drop (ref.func $$ff1)) (drop (ref.func $$ff2))) + (elem declare func $$gf1 $$ff1) + (elem declare funcref (ref.func $$gf2) (ref.func $$ff2)) + (func $$gf1) + (func $$gf2) + (func $$ff1) + (func $$ff2) + + (func (export "is_null-f") (result i32) + (ref.is_null (ref.func $$f)) + ) + (func (export "is_null-g") (result i32) + (ref.is_null (ref.func $$g)) + ) + (func (export "is_null-v") (result i32) + (ref.is_null (global.get $$v)) + ) + + (func (export "set-f") (global.set $$v (ref.func $$f))) + (func (export "set-g") (global.set $$v (ref.func $$g))) + + (table $$t 1 funcref) + (elem declare func $$f $$g) + + (func (export "call-f") (param $$x i32) (result i32) + (table.set $$t (i32.const 0) (ref.func $$f)) + (call_indirect $$t (param i32) (result i32) (local.get $$x) (i32.const 0)) + ) + (func (export "call-g") (param $$x i32) (result i32) + (table.set $$t (i32.const 0) (ref.func $$g)) + (call_indirect $$t (param i32) (result i32) (local.get $$x) (i32.const 0)) + ) + (func (export "call-v") (param $$x i32) (result i32) + (table.set $$t (i32.const 0) (global.get $$v)) + (call_indirect $$t (param i32) (result i32) (local.get $$x) (i32.const 0)) + ) +)`); + +// ./test/core/ref_func.wast:56 +assert_return(() => invoke($1, `is_null-f`, []), [value("i32", 0)]); + +// ./test/core/ref_func.wast:57 +assert_return(() => invoke($1, `is_null-g`, []), [value("i32", 0)]); + +// ./test/core/ref_func.wast:58 +assert_return(() => invoke($1, `is_null-v`, []), [value("i32", 0)]); + +// ./test/core/ref_func.wast:60 +assert_return(() => invoke($1, `call-f`, [4]), [value("i32", 4)]); + +// ./test/core/ref_func.wast:61 +assert_return(() => invoke($1, `call-g`, [4]), [value("i32", 5)]); + +// ./test/core/ref_func.wast:62 +assert_return(() => invoke($1, `call-v`, [4]), [value("i32", 4)]); + +// ./test/core/ref_func.wast:63 +invoke($1, `set-g`, []); + +// ./test/core/ref_func.wast:64 +assert_return(() => invoke($1, `call-v`, [4]), [value("i32", 5)]); + +// ./test/core/ref_func.wast:65 +invoke($1, `set-f`, []); + +// ./test/core/ref_func.wast:66 +assert_return(() => invoke($1, `call-v`, [4]), [value("i32", 4)]); + +// ./test/core/ref_func.wast:68 +assert_invalid( + () => instantiate(`(module + (func $$f (import "M" "f") (param i32) (result i32)) + (func $$g (import "M" "g") (param i32) (result i32)) + (global funcref (ref.func 7)) + )`), + `unknown function 7`, +); + +// ./test/core/ref_func.wast:80 +let $2 = instantiate(`(module + (func $$f1) + (func $$f2) + (func $$f3) + (func $$f4) + (func $$f5) + (func $$f6) + + (table $$t 1 funcref) + + (global funcref (ref.func $$f1)) + (export "f" (func $$f2)) + (elem (table $$t) (i32.const 0) func $$f3) + (elem (table $$t) (i32.const 0) funcref (ref.func $$f4)) + (elem func $$f5) + (elem funcref (ref.func $$f6)) + + (func + (ref.func $$f1) + (ref.func $$f2) + (ref.func $$f3) + (ref.func $$f4) + (ref.func $$f5) + (ref.func $$f6) + (return) + ) +)`); + +// ./test/core/ref_func.wast:108 +assert_invalid( + () => instantiate(`(module (func $$f (drop (ref.func $$f))))`), + `undeclared function reference`, +); + +// ./test/core/ref_func.wast:112 +assert_invalid( + () => instantiate(`(module (start $$f) (func $$f (drop (ref.func $$f))))`), + `undeclared function reference`, +); diff --git a/js/src/jit-test/tests/wasm/spec/function-references/return_call_ref.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/return_call_ref.wast.js new file mode 100644 index 0000000000..3ea51a8cb0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/return_call_ref.wast.js @@ -0,0 +1,460 @@ +// |jit-test| --wasm-tail-calls; skip-if: !wasmTailCallsEnabled() +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/return_call_ref.wast + +// ./test/core/return_call_ref.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definitions + (type $$proc (func)) + (type $$-i32 (func (result i32))) + (type $$-i64 (func (result i64))) + (type $$-f32 (func (result f32))) + (type $$-f64 (func (result f64))) + + (type $$i32-i32 (func (param i32) (result i32))) + (type $$i64-i64 (func (param i64) (result i64))) + (type $$f32-f32 (func (param f32) (result f32))) + (type $$f64-f64 (func (param f64) (result f64))) + + (type $$f32-i32 (func (param f32 i32) (result i32))) + (type $$i32-i64 (func (param i32 i64) (result i64))) + (type $$f64-f32 (func (param f64 f32) (result f32))) + (type $$i64-f64 (func (param i64 f64) (result f64))) + + (type $$i64i64-i64 (func (param i64 i64) (result i64))) + + (func $$const-i32 (result i32) (i32.const 0x132)) + (func $$const-i64 (result i64) (i64.const 0x164)) + (func $$const-f32 (result f32) (f32.const 0xf32)) + (func $$const-f64 (result f64) (f64.const 0xf64)) + + (func $$id-i32 (param i32) (result i32) (local.get 0)) + (func $$id-i64 (param i64) (result i64) (local.get 0)) + (func $$id-f32 (param f32) (result f32) (local.get 0)) + (func $$id-f64 (param f64) (result f64) (local.get 0)) + + (func $$f32-i32 (param f32 i32) (result i32) (local.get 1)) + (func $$i32-i64 (param i32 i64) (result i64) (local.get 1)) + (func $$f64-f32 (param f64 f32) (result f32) (local.get 1)) + (func $$i64-f64 (param i64 f64) (result f64) (local.get 1)) + + (global $$const-i32 (ref $$-i32) (ref.func $$const-i32)) + (global $$const-i64 (ref $$-i64) (ref.func $$const-i64)) + (global $$const-f32 (ref $$-f32) (ref.func $$const-f32)) + (global $$const-f64 (ref $$-f64) (ref.func $$const-f64)) + + (global $$id-i32 (ref $$i32-i32) (ref.func $$id-i32)) + (global $$id-i64 (ref $$i64-i64) (ref.func $$id-i64)) + (global $$id-f32 (ref $$f32-f32) (ref.func $$id-f32)) + (global $$id-f64 (ref $$f64-f64) (ref.func $$id-f64)) + + (global $$f32-i32 (ref $$f32-i32) (ref.func $$f32-i32)) + (global $$i32-i64 (ref $$i32-i64) (ref.func $$i32-i64)) + (global $$f64-f32 (ref $$f64-f32) (ref.func $$f64-f32)) + (global $$i64-f64 (ref $$i64-f64) (ref.func $$i64-f64)) + + (elem declare func + $$const-i32 $$const-i64 $$const-f32 $$const-f64 + $$id-i32 $$id-i64 $$id-f32 $$id-f64 + $$f32-i32 $$i32-i64 $$f64-f32 $$i64-f64 + ) + + ;; Typing + + (func (export "type-i32") (result i32) + (return_call_ref $$-i32 (global.get $$const-i32)) + ) + (func (export "type-i64") (result i64) + (return_call_ref $$-i64 (global.get $$const-i64)) + ) + (func (export "type-f32") (result f32) + (return_call_ref $$-f32 (global.get $$const-f32)) + ) + (func (export "type-f64") (result f64) + (return_call_ref $$-f64 (global.get $$const-f64)) + ) + + (func (export "type-first-i32") (result i32) + (return_call_ref $$i32-i32 (i32.const 32) (global.get $$id-i32)) + ) + (func (export "type-first-i64") (result i64) + (return_call_ref $$i64-i64 (i64.const 64) (global.get $$id-i64)) + ) + (func (export "type-first-f32") (result f32) + (return_call_ref $$f32-f32 (f32.const 1.32) (global.get $$id-f32)) + ) + (func (export "type-first-f64") (result f64) + (return_call_ref $$f64-f64 (f64.const 1.64) (global.get $$id-f64)) + ) + + (func (export "type-second-i32") (result i32) + (return_call_ref $$f32-i32 (f32.const 32.1) (i32.const 32) (global.get $$f32-i32)) + ) + (func (export "type-second-i64") (result i64) + (return_call_ref $$i32-i64 (i32.const 32) (i64.const 64) (global.get $$i32-i64)) + ) + (func (export "type-second-f32") (result f32) + (return_call_ref $$f64-f32 (f64.const 64) (f32.const 32) (global.get $$f64-f32)) + ) + (func (export "type-second-f64") (result f64) + (return_call_ref $$i64-f64 (i64.const 64) (f64.const 64.1) (global.get $$i64-f64)) + ) + + ;; Null + + (func (export "null") + (return_call_ref $$proc (ref.null $$proc)) + ) + + ;; Recursion + + (global $$fac-acc (ref $$i64i64-i64) (ref.func $$fac-acc)) + + (elem declare func $$fac-acc) + (func $$fac-acc (export "fac-acc") (param i64 i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (return_call_ref $$i64i64-i64 + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + (global.get $$fac-acc) + ) + ) + ) + ) + + (global $$count (ref $$i64-i64) (ref.func $$count)) + + (elem declare func $$count) + (func $$count (export "count") (param i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 0)) + (else + (return_call_ref $$i64-i64 + (i64.sub (local.get 0) (i64.const 1)) + (global.get $$count) + ) + ) + ) + ) + + (global $$even (ref $$i64-i64) (ref.func $$even)) + (global $$odd (ref $$i64-i64) (ref.func $$odd)) + + (elem declare func $$even) + (func $$even (export "even") (param i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (i64.const 44)) + (else + (return_call_ref $$i64-i64 + (i64.sub (local.get 0) (i64.const 1)) + (global.get $$odd) + ) + ) + ) + ) + (elem declare func $$odd) + (func $$odd (export "odd") (param i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (i64.const 99)) + (else + (return_call_ref $$i64-i64 + (i64.sub (local.get 0) (i64.const 1)) + (global.get $$even) + ) + ) + ) + ) +)`); + +// ./test/core/return_call_ref.wast:168 +assert_return(() => invoke($0, `type-i32`, []), [value("i32", 306)]); + +// ./test/core/return_call_ref.wast:169 +assert_return(() => invoke($0, `type-i64`, []), [value("i64", 356n)]); + +// ./test/core/return_call_ref.wast:170 +assert_return(() => invoke($0, `type-f32`, []), [value("f32", 3890)]); + +// ./test/core/return_call_ref.wast:171 +assert_return(() => invoke($0, `type-f64`, []), [value("f64", 3940)]); + +// ./test/core/return_call_ref.wast:173 +assert_return(() => invoke($0, `type-first-i32`, []), [value("i32", 32)]); + +// ./test/core/return_call_ref.wast:174 +assert_return(() => invoke($0, `type-first-i64`, []), [value("i64", 64n)]); + +// ./test/core/return_call_ref.wast:175 +assert_return(() => invoke($0, `type-first-f32`, []), [value("f32", 1.32)]); + +// ./test/core/return_call_ref.wast:176 +assert_return(() => invoke($0, `type-first-f64`, []), [value("f64", 1.64)]); + +// ./test/core/return_call_ref.wast:178 +assert_return(() => invoke($0, `type-second-i32`, []), [value("i32", 32)]); + +// ./test/core/return_call_ref.wast:179 +assert_return(() => invoke($0, `type-second-i64`, []), [value("i64", 64n)]); + +// ./test/core/return_call_ref.wast:180 +assert_return(() => invoke($0, `type-second-f32`, []), [value("f32", 32)]); + +// ./test/core/return_call_ref.wast:181 +assert_return(() => invoke($0, `type-second-f64`, []), [value("f64", 64.1)]); + +// ./test/core/return_call_ref.wast:183 +assert_trap(() => invoke($0, `null`, []), `null function`); + +// ./test/core/return_call_ref.wast:185 +assert_return(() => invoke($0, `fac-acc`, [0n, 1n]), [value("i64", 1n)]); + +// ./test/core/return_call_ref.wast:186 +assert_return(() => invoke($0, `fac-acc`, [1n, 1n]), [value("i64", 1n)]); + +// ./test/core/return_call_ref.wast:187 +assert_return(() => invoke($0, `fac-acc`, [5n, 1n]), [value("i64", 120n)]); + +// ./test/core/return_call_ref.wast:188 +assert_return(() => invoke($0, `fac-acc`, [25n, 1n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/return_call_ref.wast:193 +assert_return(() => invoke($0, `count`, [0n]), [value("i64", 0n)]); + +// ./test/core/return_call_ref.wast:194 +assert_return(() => invoke($0, `count`, [1000n]), [value("i64", 0n)]); + +// ./test/core/return_call_ref.wast:195 +assert_return(() => invoke($0, `count`, [1000000n]), [value("i64", 0n)]); + +// ./test/core/return_call_ref.wast:197 +assert_return(() => invoke($0, `even`, [0n]), [value("i64", 44n)]); + +// ./test/core/return_call_ref.wast:198 +assert_return(() => invoke($0, `even`, [1n]), [value("i64", 99n)]); + +// ./test/core/return_call_ref.wast:199 +assert_return(() => invoke($0, `even`, [100n]), [value("i64", 44n)]); + +// ./test/core/return_call_ref.wast:200 +assert_return(() => invoke($0, `even`, [77n]), [value("i64", 99n)]); + +// ./test/core/return_call_ref.wast:201 +assert_return(() => invoke($0, `even`, [1000000n]), [value("i64", 44n)]); + +// ./test/core/return_call_ref.wast:202 +assert_return(() => invoke($0, `even`, [1000001n]), [value("i64", 99n)]); + +// ./test/core/return_call_ref.wast:203 +assert_return(() => invoke($0, `odd`, [0n]), [value("i64", 99n)]); + +// ./test/core/return_call_ref.wast:204 +assert_return(() => invoke($0, `odd`, [1n]), [value("i64", 44n)]); + +// ./test/core/return_call_ref.wast:205 +assert_return(() => invoke($0, `odd`, [200n]), [value("i64", 99n)]); + +// ./test/core/return_call_ref.wast:206 +assert_return(() => invoke($0, `odd`, [77n]), [value("i64", 44n)]); + +// ./test/core/return_call_ref.wast:207 +assert_return(() => invoke($0, `odd`, [1000000n]), [value("i64", 99n)]); + +// ./test/core/return_call_ref.wast:208 +assert_return(() => invoke($0, `odd`, [999999n]), [value("i64", 44n)]); + +// ./test/core/return_call_ref.wast:213 +let $1 = instantiate(`(module + (type $$t (func)) + (type $$t1 (func (result (ref $$t)))) + (type $$t2 (func (result (ref null $$t)))) + (type $$t3 (func (result (ref func)))) + (type $$t4 (func (result (ref null func)))) + (elem declare func $$f11 $$f22 $$f33 $$f44) + (func $$f11 (result (ref $$t)) (return_call_ref $$t1 (ref.func $$f11))) + (func $$f21 (result (ref null $$t)) (return_call_ref $$t1 (ref.func $$f11))) + (func $$f22 (result (ref null $$t)) (return_call_ref $$t2 (ref.func $$f22))) + (func $$f31 (result (ref func)) (return_call_ref $$t1 (ref.func $$f11))) + (func $$f33 (result (ref func)) (return_call_ref $$t3 (ref.func $$f33))) + (func $$f41 (result (ref null func)) (return_call_ref $$t1 (ref.func $$f11))) + (func $$f42 (result (ref null func)) (return_call_ref $$t2 (ref.func $$f22))) + (func $$f43 (result (ref null func)) (return_call_ref $$t3 (ref.func $$f33))) + (func $$f44 (result (ref null func)) (return_call_ref $$t4 (ref.func $$f44))) +)`); + +// ./test/core/return_call_ref.wast:231 +assert_invalid( + () => instantiate(`(module + (type $$t (func)) + (type $$t2 (func (result (ref null $$t)))) + (elem declare func $$f22) + (func $$f12 (result (ref $$t)) (return_call_ref $$t2 (ref.func $$f22))) + (func $$f22 (result (ref null $$t)) (return_call_ref $$t2 (ref.func $$f22))) + )`), + `type mismatch`, +); + +// ./test/core/return_call_ref.wast:242 +assert_invalid( + () => instantiate(`(module + (type $$t (func)) + (type $$t3 (func (result (ref func)))) + (elem declare func $$f33) + (func $$f13 (result (ref $$t)) (return_call_ref $$t3 (ref.func $$f33))) + (func $$f33 (result (ref func)) (return_call_ref $$t3 (ref.func $$f33))) + )`), + `type mismatch`, +); + +// ./test/core/return_call_ref.wast:253 +assert_invalid( + () => instantiate(`(module + (type $$t (func)) + (type $$t4 (func (result (ref null func)))) + (elem declare func $$f44) + (func $$f14 (result (ref $$t)) (return_call_ref $$t4 (ref.func $$f44))) + (func $$f44 (result (ref null func)) (return_call_ref $$t4 (ref.func $$f44))) + )`), + `type mismatch`, +); + +// ./test/core/return_call_ref.wast:264 +assert_invalid( + () => instantiate(`(module + (type $$t (func)) + (type $$t3 (func (result (ref func)))) + (elem declare func $$f33) + (func $$f23 (result (ref null $$t)) (return_call_ref $$t3 (ref.func $$f33))) + (func $$f33 (result (ref func)) (return_call_ref $$t3 (ref.func $$f33))) + )`), + `type mismatch`, +); + +// ./test/core/return_call_ref.wast:275 +assert_invalid( + () => instantiate(`(module + (type $$t (func)) + (type $$t4 (func (result (ref null func)))) + (elem declare func $$f44) + (func $$f24 (result (ref null $$t)) (return_call_ref $$t4 (ref.func $$f44))) + (func $$f44 (result (ref null func)) (return_call_ref $$t4 (ref.func $$f44))) + )`), + `type mismatch`, +); + +// ./test/core/return_call_ref.wast:286 +assert_invalid( + () => instantiate(`(module + (type $$t4 (func (result (ref null func)))) + (elem declare func $$f44) + (func $$f34 (result (ref func)) (return_call_ref $$t4 (ref.func $$f44))) + (func $$f44 (result (ref null func)) (return_call_ref $$t4 (ref.func $$f44))) + )`), + `type mismatch`, +); + +// ./test/core/return_call_ref.wast:299 +let $2 = instantiate(`(module + (type $$t (func (result i32))) + (func (export "unreachable") (result i32) + (unreachable) + (return_call_ref $$t) + ) +)`); + +// ./test/core/return_call_ref.wast:306 +assert_trap(() => invoke($2, `unreachable`, []), `unreachable`); + +// ./test/core/return_call_ref.wast:308 +let $3 = instantiate(`(module + (elem declare func $$f) + (type $$t (func (param i32) (result i32))) + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "unreachable") (result i32) + (unreachable) + (ref.func $$f) + (return_call_ref $$t) + ) +)`); + +// ./test/core/return_call_ref.wast:319 +assert_trap(() => invoke($3, `unreachable`, []), `unreachable`); + +// ./test/core/return_call_ref.wast:321 +let $4 = instantiate(`(module + (elem declare func $$f) + (type $$t (func (param i32) (result i32))) + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "unreachable") (result i32) + (unreachable) + (i32.const 0) + (ref.func $$f) + (return_call_ref $$t) + (i32.const 0) + ) +)`); + +// ./test/core/return_call_ref.wast:334 +assert_trap(() => invoke($4, `unreachable`, []), `unreachable`); + +// ./test/core/return_call_ref.wast:336 +assert_invalid( + () => instantiate(`(module + (elem declare func $$f) + (type $$t (func (param i32) (result i32))) + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "unreachable") (result i32) + (unreachable) + (i64.const 0) + (ref.func $$f) + (return_call_ref $$t) + ) + )`), + `type mismatch`, +); + +// ./test/core/return_call_ref.wast:352 +assert_invalid( + () => instantiate(`(module + (elem declare func $$f) + (type $$t (func (param i32) (result i32))) + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "unreachable") (result i32) + (unreachable) + (ref.func $$f) + (return_call_ref $$t) + (i64.const 0) + ) + )`), + `type mismatch`, +); + +// ./test/core/return_call_ref.wast:368 +assert_invalid( + () => instantiate(`(module + (type $$t (func)) + (func $$f (param $$r externref) + (return_call_ref $$t (local.get $$r)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/function-references/unreached-valid.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/unreached-valid.wast.js new file mode 100644 index 0000000000..e25a157431 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/function-references/unreached-valid.wast.js @@ -0,0 +1,109 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/unreached-valid.wast + +// ./test/core/unreached-valid.wast:1 +let $0 = instantiate(`(module + + ;; Check that both sides of the select are evaluated + (func (export "select-trap-left") (param $$cond i32) (result i32) + (select (unreachable) (i32.const 0) (local.get $$cond)) + ) + (func (export "select-trap-right") (param $$cond i32) (result i32) + (select (i32.const 0) (unreachable) (local.get $$cond)) + ) + + (func (export "select-unreached") + (unreachable) (select) + (unreachable) (i32.const 0) (select) + (unreachable) (i32.const 0) (i32.const 0) (select) + (unreachable) (i32.const 0) (i32.const 0) (i32.const 0) (select) + (unreachable) (f32.const 0) (i32.const 0) (select) + (unreachable) + ) + + (func (export "select-unreached-result1") (result i32) + (unreachable) (i32.add (select)) + ) + + (func (export "select-unreached-result2") (result i64) + (unreachable) (i64.add (select (i64.const 0) (i32.const 0))) + ) + + (func (export "select-unreached-num") + (unreachable) + (select) + (i32.eqz) + (drop) + ) + (func (export "select-unreached-ref") + (unreachable) + (select) + (ref.is_null) + (drop) + ) + + (type $$t (func (param i32) (result i32))) + (func (export "call_ref-unreached") (result i32) + (unreachable) + (call_ref $$t) + ) +)`); + +// ./test/core/unreached-valid.wast:48 +assert_trap(() => invoke($0, `select-trap-left`, [1]), `unreachable`); + +// ./test/core/unreached-valid.wast:49 +assert_trap(() => invoke($0, `select-trap-left`, [0]), `unreachable`); + +// ./test/core/unreached-valid.wast:50 +assert_trap(() => invoke($0, `select-trap-right`, [1]), `unreachable`); + +// ./test/core/unreached-valid.wast:51 +assert_trap(() => invoke($0, `select-trap-right`, [0]), `unreachable`); + +// ./test/core/unreached-valid.wast:53 +assert_trap(() => invoke($0, `select-unreached-result1`, []), `unreachable`); + +// ./test/core/unreached-valid.wast:54 +assert_trap(() => invoke($0, `select-unreached-result2`, []), `unreachable`); + +// ./test/core/unreached-valid.wast:55 +assert_trap(() => invoke($0, `select-unreached-num`, []), `unreachable`); + +// ./test/core/unreached-valid.wast:56 +assert_trap(() => invoke($0, `select-unreached-ref`, []), `unreachable`); + +// ./test/core/unreached-valid.wast:58 +assert_trap(() => invoke($0, `call_ref-unreached`, []), `unreachable`); + +// ./test/core/unreached-valid.wast:63 +let $1 = instantiate(`(module + (func (export "meet-bottom") + (block (result f64) + (block (result f32) + (unreachable) + (br_table 0 1 1 (i32.const 1)) + ) + (drop) + (f64.const 0) + ) + (drop) + ) +)`); + +// ./test/core/unreached-valid.wast:77 +assert_trap(() => invoke($1, `meet-bottom`, []), `unreachable`); diff --git a/js/src/jit-test/tests/wasm/spec/gc/array.wast.js b/js/src/jit-test/tests/wasm/spec/gc/array.wast.js new file mode 100644 index 0000000000..4161a6b5f9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/array.wast.js @@ -0,0 +1,385 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/array.wast + +// ./test/core/gc/array.wast:3 +let $0 = instantiate(`(module + (type (array i8)) + (type (array i16)) + (type (array i32)) + (type (array i64)) + (type (array f32)) + (type (array f64)) + (type (array anyref)) + (type (array (ref struct))) + (type (array (ref 0))) + (type (array (ref null 1))) + (type (array (mut i8))) + (type (array (mut i16))) + (type (array (mut i32))) + (type (array (mut i64))) + (type (array (mut i32))) + (type (array (mut i64))) + (type (array (mut anyref))) + (type (array (mut (ref struct)))) + (type (array (mut (ref 0)))) + (type (array (mut (ref null i31)))) +)`); + +// ./test/core/gc/array.wast:27 +assert_invalid( + () => instantiate(`(module + (type (array (mut (ref null 10)))) + )`), + `unknown type`, +); + +// ./test/core/gc/array.wast:37 +let $1 = instantiate(`(module + (rec + (type $$s0 (array (ref $$s1))) + (type $$s1 (array (ref $$s0))) + ) + + (func (param (ref $$forward))) + + (type $$forward (array i32)) +)`); + +// ./test/core/gc/array.wast:48 +assert_invalid(() => instantiate(`(module (type (array (ref 1))))`), `unknown type`); + +// ./test/core/gc/array.wast:52 +assert_invalid(() => instantiate(`(module (type (array (mut (ref 1)))))`), `unknown type`); + +// ./test/core/gc/array.wast:60 +let $2 = instantiate(`(module + (type $$vec (array f32)) + (type $$mvec (array (mut f32))) + + (global (ref $$vec) (array.new $$vec (f32.const 1) (i32.const 3))) + (global (ref $$vec) (array.new_default $$vec (i32.const 3))) + + (func $$new (export "new") (result (ref $$vec)) + (array.new_default $$vec (i32.const 3)) + ) + + (func $$get (param $$i i32) (param $$v (ref $$vec)) (result f32) + (array.get $$vec (local.get $$v) (local.get $$i)) + ) + (func (export "get") (param $$i i32) (result f32) + (call $$get (local.get $$i) (call $$new)) + ) + + (func $$set_get (param $$i i32) (param $$v (ref $$mvec)) (param $$y f32) (result f32) + (array.set $$mvec (local.get $$v) (local.get $$i) (local.get $$y)) + (array.get $$mvec (local.get $$v) (local.get $$i)) + ) + (func (export "set_get") (param $$i i32) (param $$y f32) (result f32) + (call $$set_get (local.get $$i) + (array.new_default $$mvec (i32.const 3)) + (local.get $$y) + ) + ) + + (func $$len (param $$v (ref array)) (result i32) + (array.len (local.get $$v)) + ) + (func (export "len") (result i32) + (call $$len (call $$new)) + ) +)`); + +// ./test/core/gc/array.wast:97 +assert_return(() => invoke($2, `new`, []), [new RefWithType('arrayref')]); + +// ./test/core/gc/array.wast:98 +assert_return(() => invoke($2, `new`, []), [new RefWithType('eqref')]); + +// ./test/core/gc/array.wast:99 +assert_return(() => invoke($2, `get`, [0]), [value("f32", 0)]); + +// ./test/core/gc/array.wast:100 +assert_return(() => invoke($2, `set_get`, [1, value("f32", 7)]), [value("f32", 7)]); + +// ./test/core/gc/array.wast:101 +assert_return(() => invoke($2, `len`, []), [value("i32", 3)]); + +// ./test/core/gc/array.wast:103 +assert_trap(() => invoke($2, `get`, [10]), `out of bounds array access`); + +// ./test/core/gc/array.wast:104 +assert_trap(() => invoke($2, `set_get`, [10, value("f32", 7)]), `out of bounds array access`); + +// ./test/core/gc/array.wast:106 +let $3 = instantiate(`(module + (type $$vec (array f32)) + (type $$mvec (array (mut f32))) + + (global (ref $$vec) (array.new_fixed $$vec 2 (f32.const 1) (f32.const 2))) + + (func $$new (export "new") (result (ref $$vec)) + (array.new_fixed $$vec 2 (f32.const 1) (f32.const 2)) + ) + + (func $$get (param $$i i32) (param $$v (ref $$vec)) (result f32) + (array.get $$vec (local.get $$v) (local.get $$i)) + ) + (func (export "get") (param $$i i32) (result f32) + (call $$get (local.get $$i) (call $$new)) + ) + + (func $$set_get (param $$i i32) (param $$v (ref $$mvec)) (param $$y f32) (result f32) + (array.set $$mvec (local.get $$v) (local.get $$i) (local.get $$y)) + (array.get $$mvec (local.get $$v) (local.get $$i)) + ) + (func (export "set_get") (param $$i i32) (param $$y f32) (result f32) + (call $$set_get (local.get $$i) + (array.new_fixed $$mvec 3 (f32.const 1) (f32.const 2) (f32.const 3)) + (local.get $$y) + ) + ) + + (func $$len (param $$v (ref array)) (result i32) + (array.len (local.get $$v)) + ) + (func (export "len") (result i32) + (call $$len (call $$new)) + ) +)`); + +// ./test/core/gc/array.wast:142 +assert_return(() => invoke($3, `new`, []), [new RefWithType('arrayref')]); + +// ./test/core/gc/array.wast:143 +assert_return(() => invoke($3, `new`, []), [new RefWithType('eqref')]); + +// ./test/core/gc/array.wast:144 +assert_return(() => invoke($3, `get`, [0]), [value("f32", 1)]); + +// ./test/core/gc/array.wast:145 +assert_return(() => invoke($3, `set_get`, [1, value("f32", 7)]), [value("f32", 7)]); + +// ./test/core/gc/array.wast:146 +assert_return(() => invoke($3, `len`, []), [value("i32", 2)]); + +// ./test/core/gc/array.wast:148 +assert_trap(() => invoke($3, `get`, [10]), `out of bounds array access`); + +// ./test/core/gc/array.wast:149 +assert_trap(() => invoke($3, `set_get`, [10, value("f32", 7)]), `out of bounds array access`); + +// ./test/core/gc/array.wast:151 +let $4 = instantiate(`(module + (type $$vec (array i8)) + (type $$mvec (array (mut i8))) + + (data $$d "\\00\\01\\02\\ff\\04") + + (func $$new (export "new") (result (ref $$vec)) + (array.new_data $$vec $$d (i32.const 1) (i32.const 3)) + ) + + (func $$get_u (param $$i i32) (param $$v (ref $$vec)) (result i32) + (array.get_u $$vec (local.get $$v) (local.get $$i)) + ) + (func (export "get_u") (param $$i i32) (result i32) + (call $$get_u (local.get $$i) (call $$new)) + ) + + (func $$get_s (param $$i i32) (param $$v (ref $$vec)) (result i32) + (array.get_s $$vec (local.get $$v) (local.get $$i)) + ) + (func (export "get_s") (param $$i i32) (result i32) + (call $$get_s (local.get $$i) (call $$new)) + ) + + (func $$set_get (param $$i i32) (param $$v (ref $$mvec)) (param $$y i32) (result i32) + (array.set $$mvec (local.get $$v) (local.get $$i) (local.get $$y)) + (array.get_u $$mvec (local.get $$v) (local.get $$i)) + ) + (func (export "set_get") (param $$i i32) (param $$y i32) (result i32) + (call $$set_get (local.get $$i) + (array.new_data $$mvec $$d (i32.const 1) (i32.const 3)) + (local.get $$y) + ) + ) + + (func $$len (param $$v (ref array)) (result i32) + (array.len (local.get $$v)) + ) + (func (export "len") (result i32) + (call $$len (call $$new)) + ) +)`); + +// ./test/core/gc/array.wast:194 +assert_return(() => invoke($4, `new`, []), [new RefWithType('arrayref')]); + +// ./test/core/gc/array.wast:195 +assert_return(() => invoke($4, `new`, []), [new RefWithType('eqref')]); + +// ./test/core/gc/array.wast:196 +assert_return(() => invoke($4, `get_u`, [2]), [value("i32", 255)]); + +// ./test/core/gc/array.wast:197 +assert_return(() => invoke($4, `get_s`, [2]), [value("i32", -1)]); + +// ./test/core/gc/array.wast:198 +assert_return(() => invoke($4, `set_get`, [1, 7]), [value("i32", 7)]); + +// ./test/core/gc/array.wast:199 +assert_return(() => invoke($4, `len`, []), [value("i32", 3)]); + +// ./test/core/gc/array.wast:201 +assert_trap(() => invoke($4, `get_u`, [10]), `out of bounds array access`); + +// ./test/core/gc/array.wast:202 +assert_trap(() => invoke($4, `get_s`, [10]), `out of bounds array access`); + +// ./test/core/gc/array.wast:203 +assert_trap(() => invoke($4, `set_get`, [10, 7]), `out of bounds array access`); + +// ./test/core/gc/array.wast:205 +let $5 = instantiate(`(module + (type $$bvec (array i8)) + (type $$vec (array (ref $$bvec))) + (type $$mvec (array (mut (ref $$bvec)))) + (type $$nvec (array (ref null $$bvec))) + (type $$avec (array (mut anyref))) + + (elem $$e (ref $$bvec) + (array.new $$bvec (i32.const 7) (i32.const 3)) + (array.new_fixed $$bvec 2 (i32.const 1) (i32.const 2)) + ) + + (func $$new (export "new") (result (ref $$vec)) + (array.new_elem $$vec $$e (i32.const 0) (i32.const 2)) + ) + + (func $$sub1 (result (ref $$nvec)) + (array.new_elem $$nvec $$e (i32.const 0) (i32.const 2)) + ) + (func $$sub2 (result (ref $$avec)) + (array.new_elem $$avec $$e (i32.const 0) (i32.const 2)) + ) + + (func $$get (param $$i i32) (param $$j i32) (param $$v (ref $$vec)) (result i32) + (array.get_u $$bvec (array.get $$vec (local.get $$v) (local.get $$i)) (local.get $$j)) + ) + (func (export "get") (param $$i i32) (param $$j i32) (result i32) + (call $$get (local.get $$i) (local.get $$j) (call $$new)) + ) + + (func $$set_get (param $$i i32) (param $$j i32) (param $$v (ref $$mvec)) (param $$y i32) (result i32) + (array.set $$mvec (local.get $$v) (local.get $$i) (array.get $$mvec (local.get $$v) (local.get $$y))) + (array.get_u $$bvec (array.get $$mvec (local.get $$v) (local.get $$i)) (local.get $$j)) + ) + (func (export "set_get") (param $$i i32) (param $$j i32) (param $$y i32) (result i32) + (call $$set_get (local.get $$i) (local.get $$j) + (array.new_elem $$mvec $$e (i32.const 0) (i32.const 2)) + (local.get $$y) + ) + ) + + (func $$len (param $$v (ref array)) (result i32) + (array.len (local.get $$v)) + ) + (func (export "len") (result i32) + (call $$len (call $$new)) + ) +)`); + +// ./test/core/gc/array.wast:254 +assert_return(() => invoke($5, `new`, []), [new RefWithType('arrayref')]); + +// ./test/core/gc/array.wast:255 +assert_return(() => invoke($5, `new`, []), [new RefWithType('eqref')]); + +// ./test/core/gc/array.wast:256 +assert_return(() => invoke($5, `get`, [0, 0]), [value("i32", 7)]); + +// ./test/core/gc/array.wast:257 +assert_return(() => invoke($5, `get`, [1, 0]), [value("i32", 1)]); + +// ./test/core/gc/array.wast:258 +assert_return(() => invoke($5, `set_get`, [0, 1, 1]), [value("i32", 2)]); + +// ./test/core/gc/array.wast:259 +assert_return(() => invoke($5, `len`, []), [value("i32", 2)]); + +// ./test/core/gc/array.wast:261 +assert_trap(() => invoke($5, `get`, [10, 0]), `out of bounds array access`); + +// ./test/core/gc/array.wast:262 +assert_trap(() => invoke($5, `set_get`, [10, 0, 0]), `out of bounds array access`); + +// ./test/core/gc/array.wast:264 +assert_invalid( + () => instantiate(`(module + (type $$a (array i64)) + (func (export "array.set-immutable") (param $$a (ref $$a)) + (array.set $$a (local.get $$a) (i32.const 0) (i64.const 1)) + ) + )`), + `array is immutable`, +); + +// ./test/core/gc/array.wast:274 +assert_invalid( + () => instantiate(`(module + (type $$bvec (array i8)) + + (data $$d "\\00\\01\\02\\03\\04") + + (global (ref $$bvec) + (array.new_data $$bvec $$d (i32.const 1) (i32.const 3)) + ) + )`), + `constant expression required`, +); + +// ./test/core/gc/array.wast:287 +assert_invalid( + () => instantiate(`(module + (type $$bvec (array i8)) + (type $$vvec (array (ref $$bvec))) + + (elem $$e (ref $$bvec) (ref.null $$bvec)) + + (global (ref $$vvec) + (array.new_elem $$vvec $$e (i32.const 0) (i32.const 1)) + ) + )`), + `constant expression required`, +); + +// ./test/core/gc/array.wast:304 +let $6 = instantiate(`(module + (type $$t (array (mut i32))) + (func (export "array.get-null") + (local (ref null $$t)) (drop (array.get $$t (local.get 0) (i32.const 0))) + ) + (func (export "array.set-null") + (local (ref null $$t)) (array.set $$t (local.get 0) (i32.const 0) (i32.const 0)) + ) +)`); + +// ./test/core/gc/array.wast:314 +assert_trap(() => invoke($6, `array.get-null`, []), `null array reference`); + +// ./test/core/gc/array.wast:315 +assert_trap(() => invoke($6, `array.set-null`, []), `null array reference`); diff --git a/js/src/jit-test/tests/wasm/spec/gc/array_copy.wast.js b/js/src/jit-test/tests/wasm/spec/gc/array_copy.wast.js new file mode 100644 index 0000000000..0109df19e9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/array_copy.wast.js @@ -0,0 +1,202 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/array_copy.wast + +// ./test/core/gc/array_copy.wast:5 +assert_invalid( + () => instantiate(`(module + (type $$a (array i8)) + (type $$b (array (mut i8))) + + (func (export "array.copy-immutable") (param $$1 (ref $$a)) (param $$2 (ref $$b)) + (array.copy $$a $$b (local.get $$1) (i32.const 0) (local.get $$2) (i32.const 0) (i32.const 0)) + ) + )`), + `array is immutable`, +); + +// ./test/core/gc/array_copy.wast:17 +assert_invalid( + () => instantiate(`(module + (type $$a (array (mut i8))) + (type $$b (array i16)) + + (func (export "array.copy-packed-invalid") (param $$1 (ref $$a)) (param $$2 (ref $$b)) + (array.copy $$a $$b (local.get $$1) (i32.const 0) (local.get $$2) (i32.const 0) (i32.const 0)) + ) + )`), + `array types do not match`, +); + +// ./test/core/gc/array_copy.wast:29 +assert_invalid( + () => instantiate(`(module + (type $$a (array (mut i8))) + (type $$b (array (mut (ref $$a)))) + + (func (export "array.copy-ref-invalid-1") (param $$1 (ref $$a)) (param $$2 (ref $$b)) + (array.copy $$a $$b (local.get $$1) (i32.const 0) (local.get $$2) (i32.const 0) (i32.const 0)) + ) + )`), + `array types do not match`, +); + +// ./test/core/gc/array_copy.wast:41 +assert_invalid( + () => instantiate(`(module + (type $$a (array (mut i8))) + (type $$b (array (mut (ref $$a)))) + (type $$c (array (mut (ref $$b)))) + + (func (export "array.copy-ref-invalid-1") (param $$1 (ref $$b)) (param $$2 (ref $$c)) + (array.copy $$b $$c (local.get $$1) (i32.const 0) (local.get $$2) (i32.const 0) (i32.const 0)) + ) + )`), + `array types do not match`, +); + +// ./test/core/gc/array_copy.wast:54 +let $0 = instantiate(`(module + (type $$arr8 (array i8)) + (type $$arr8_mut (array (mut i8))) + + (global $$g_arr8 (ref $$arr8) (array.new $$arr8 (i32.const 10) (i32.const 12))) + (global $$g_arr8_mut (mut (ref $$arr8_mut)) (array.new_default $$arr8_mut (i32.const 12))) + + (data $$d1 "abcdefghijkl") + + (func (export "array_get_nth") (param $$1 i32) (result i32) + (array.get_u $$arr8_mut (global.get $$g_arr8_mut) (local.get $$1)) + ) + + (func (export "array_copy-null-left") + (array.copy $$arr8_mut $$arr8 (ref.null $$arr8_mut) (i32.const 0) (global.get $$g_arr8) (i32.const 0) (i32.const 0)) + ) + + (func (export "array_copy-null-right") + (array.copy $$arr8_mut $$arr8 (global.get $$g_arr8_mut) (i32.const 0) (ref.null $$arr8) (i32.const 0) (i32.const 0)) + ) + + (func (export "array_copy") (param $$1 i32) (param $$2 i32) (param $$3 i32) + (array.copy $$arr8_mut $$arr8 (global.get $$g_arr8_mut) (local.get $$1) (global.get $$g_arr8) (local.get $$2) (local.get $$3)) + ) + + (func (export "array_copy_overlap_test-1") + (local $$1 (ref $$arr8_mut)) + (array.new_data $$arr8_mut $$d1 (i32.const 0) (i32.const 12)) + (local.set $$1) + (array.copy $$arr8_mut $$arr8_mut (local.get $$1) (i32.const 1) (local.get $$1) (i32.const 0) (i32.const 11)) + (global.set $$g_arr8_mut (local.get $$1)) + ) + + (func (export "array_copy_overlap_test-2") + (local $$1 (ref $$arr8_mut)) + (array.new_data $$arr8_mut $$d1 (i32.const 0) (i32.const 12)) + (local.set $$1) + (array.copy $$arr8_mut $$arr8_mut (local.get $$1) (i32.const 0) (local.get $$1) (i32.const 1) (i32.const 11)) + (global.set $$g_arr8_mut (local.get $$1)) + ) +)`); + +// ./test/core/gc/array_copy.wast:97 +assert_trap(() => invoke($0, `array_copy-null-left`, []), `null array reference`); + +// ./test/core/gc/array_copy.wast:98 +assert_trap(() => invoke($0, `array_copy-null-right`, []), `null array reference`); + +// ./test/core/gc/array_copy.wast:101 +assert_trap(() => invoke($0, `array_copy`, [13, 0, 0]), `out of bounds array access`); + +// ./test/core/gc/array_copy.wast:102 +assert_trap(() => invoke($0, `array_copy`, [0, 13, 0]), `out of bounds array access`); + +// ./test/core/gc/array_copy.wast:105 +assert_trap(() => invoke($0, `array_copy`, [0, 0, 13]), `out of bounds array access`); + +// ./test/core/gc/array_copy.wast:106 +assert_trap(() => invoke($0, `array_copy`, [0, 0, 13]), `out of bounds array access`); + +// ./test/core/gc/array_copy.wast:109 +assert_return(() => invoke($0, `array_copy`, [12, 0, 0]), []); + +// ./test/core/gc/array_copy.wast:110 +assert_return(() => invoke($0, `array_copy`, [0, 12, 0]), []); + +// ./test/core/gc/array_copy.wast:113 +assert_return(() => invoke($0, `array_get_nth`, [0]), [value("i32", 0)]); + +// ./test/core/gc/array_copy.wast:114 +assert_return(() => invoke($0, `array_get_nth`, [5]), [value("i32", 0)]); + +// ./test/core/gc/array_copy.wast:115 +assert_return(() => invoke($0, `array_get_nth`, [11]), [value("i32", 0)]); + +// ./test/core/gc/array_copy.wast:116 +assert_trap(() => invoke($0, `array_get_nth`, [12]), `out of bounds array access`); + +// ./test/core/gc/array_copy.wast:119 +assert_return(() => invoke($0, `array_copy`, [0, 0, 2]), []); + +// ./test/core/gc/array_copy.wast:120 +assert_return(() => invoke($0, `array_get_nth`, [0]), [value("i32", 10)]); + +// ./test/core/gc/array_copy.wast:121 +assert_return(() => invoke($0, `array_get_nth`, [1]), [value("i32", 10)]); + +// ./test/core/gc/array_copy.wast:122 +assert_return(() => invoke($0, `array_get_nth`, [2]), [value("i32", 0)]); + +// ./test/core/gc/array_copy.wast:125 +assert_return(() => invoke($0, `array_copy_overlap_test-1`, []), []); + +// ./test/core/gc/array_copy.wast:126 +assert_return(() => invoke($0, `array_get_nth`, [0]), [value("i32", 97)]); + +// ./test/core/gc/array_copy.wast:127 +assert_return(() => invoke($0, `array_get_nth`, [1]), [value("i32", 97)]); + +// ./test/core/gc/array_copy.wast:128 +assert_return(() => invoke($0, `array_get_nth`, [2]), [value("i32", 98)]); + +// ./test/core/gc/array_copy.wast:129 +assert_return(() => invoke($0, `array_get_nth`, [5]), [value("i32", 101)]); + +// ./test/core/gc/array_copy.wast:130 +assert_return(() => invoke($0, `array_get_nth`, [10]), [value("i32", 106)]); + +// ./test/core/gc/array_copy.wast:131 +assert_return(() => invoke($0, `array_get_nth`, [11]), [value("i32", 107)]); + +// ./test/core/gc/array_copy.wast:133 +assert_return(() => invoke($0, `array_copy_overlap_test-2`, []), []); + +// ./test/core/gc/array_copy.wast:134 +assert_return(() => invoke($0, `array_get_nth`, [0]), [value("i32", 98)]); + +// ./test/core/gc/array_copy.wast:135 +assert_return(() => invoke($0, `array_get_nth`, [1]), [value("i32", 99)]); + +// ./test/core/gc/array_copy.wast:136 +assert_return(() => invoke($0, `array_get_nth`, [5]), [value("i32", 103)]); + +// ./test/core/gc/array_copy.wast:137 +assert_return(() => invoke($0, `array_get_nth`, [9]), [value("i32", 107)]); + +// ./test/core/gc/array_copy.wast:138 +assert_return(() => invoke($0, `array_get_nth`, [10]), [value("i32", 108)]); + +// ./test/core/gc/array_copy.wast:139 +assert_return(() => invoke($0, `array_get_nth`, [11]), [value("i32", 108)]); diff --git a/js/src/jit-test/tests/wasm/spec/gc/array_fill.wast.js b/js/src/jit-test/tests/wasm/spec/gc/array_fill.wast.js new file mode 100644 index 0000000000..271b1690c4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/array_fill.wast.js @@ -0,0 +1,112 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/array_fill.wast + +// ./test/core/gc/array_fill.wast:5 +assert_invalid( + () => instantiate(`(module + (type $$a (array i8)) + + (func (export "array.fill-immutable") (param $$1 (ref $$a)) (param $$2 i32) + (array.fill $$a (local.get $$1) (i32.const 0) (local.get $$2) (i32.const 0)) + ) + )`), + `array is immutable`, +); + +// ./test/core/gc/array_fill.wast:16 +assert_invalid( + () => instantiate(`(module + (type $$a (array (mut i8))) + + (func (export "array.fill-invalid-1") (param $$1 (ref $$a)) (param $$2 funcref) + (array.fill $$a (local.get $$1) (i32.const 0) (local.get $$2) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/array_fill.wast:27 +assert_invalid( + () => instantiate(`(module + (type $$b (array (mut funcref))) + + (func (export "array.fill-invalid-1") (param $$1 (ref $$b)) (param $$2 i32) + (array.fill $$b (local.get $$1) (i32.const 0) (local.get $$2) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/array_fill.wast:38 +let $0 = instantiate(`(module + (type $$arr8 (array i8)) + (type $$arr8_mut (array (mut i8))) + + (global $$g_arr8 (ref $$arr8) (array.new $$arr8 (i32.const 10) (i32.const 12))) + (global $$g_arr8_mut (mut (ref $$arr8_mut)) (array.new_default $$arr8_mut (i32.const 12))) + + (func (export "array_get_nth") (param $$1 i32) (result i32) + (array.get_u $$arr8_mut (global.get $$g_arr8_mut) (local.get $$1)) + ) + + (func (export "array_fill-null") + (array.fill $$arr8_mut (ref.null $$arr8_mut) (i32.const 0) (i32.const 0) (i32.const 0)) + ) + + (func (export "array_fill") (param $$1 i32) (param $$2 i32) (param $$3 i32) + (array.fill $$arr8_mut (global.get $$g_arr8_mut) (local.get $$1) (local.get $$2) (local.get $$3)) + ) +)`); + +// ./test/core/gc/array_fill.wast:59 +assert_trap(() => invoke($0, `array_fill-null`, []), `null array reference`); + +// ./test/core/gc/array_fill.wast:62 +assert_trap(() => invoke($0, `array_fill`, [13, 0, 0]), `out of bounds array access`); + +// ./test/core/gc/array_fill.wast:65 +assert_trap(() => invoke($0, `array_fill`, [0, 0, 13]), `out of bounds array access`); + +// ./test/core/gc/array_fill.wast:68 +assert_return(() => invoke($0, `array_fill`, [12, 0, 0]), []); + +// ./test/core/gc/array_fill.wast:71 +assert_return(() => invoke($0, `array_get_nth`, [0]), [value("i32", 0)]); + +// ./test/core/gc/array_fill.wast:72 +assert_return(() => invoke($0, `array_get_nth`, [5]), [value("i32", 0)]); + +// ./test/core/gc/array_fill.wast:73 +assert_return(() => invoke($0, `array_get_nth`, [11]), [value("i32", 0)]); + +// ./test/core/gc/array_fill.wast:74 +assert_trap(() => invoke($0, `array_get_nth`, [12]), `out of bounds array access`); + +// ./test/core/gc/array_fill.wast:77 +assert_return(() => invoke($0, `array_fill`, [2, 11, 2]), []); + +// ./test/core/gc/array_fill.wast:78 +assert_return(() => invoke($0, `array_get_nth`, [1]), [value("i32", 0)]); + +// ./test/core/gc/array_fill.wast:79 +assert_return(() => invoke($0, `array_get_nth`, [2]), [value("i32", 11)]); + +// ./test/core/gc/array_fill.wast:80 +assert_return(() => invoke($0, `array_get_nth`, [3]), [value("i32", 11)]); + +// ./test/core/gc/array_fill.wast:81 +assert_return(() => invoke($0, `array_get_nth`, [4]), [value("i32", 0)]); diff --git a/js/src/jit-test/tests/wasm/spec/gc/binary-gc.wast.js b/js/src/jit-test/tests/wasm/spec/gc/binary-gc.wast.js new file mode 100644 index 0000000000..e63be7b2fd --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/binary-gc.wast.js @@ -0,0 +1,30 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/binary-gc.wast + +// ./test/core/gc/binary-gc.wast:1 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\01" ;; Type section id + "\\04" ;; Type section length + "\\01" ;; Types vector length + "\\5e" ;; Array type, -0x22 + "\\78" ;; Storage type: i8 or -0x08 + "\\02" ;; Mutability, should be 0 or 1, but isn't + )`), + `malformed mutability`, +); diff --git a/js/src/jit-test/tests/wasm/spec/gc/br_if.wast.js b/js/src/jit-test/tests/wasm/spec/gc/br_if.wast.js new file mode 100644 index 0000000000..511ee003fb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/br_if.wast.js @@ -0,0 +1,886 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/br_if.wast + +// ./test/core/br_if.wast:3 +let $0 = instantiate(`(module + (func $$dummy) + + (func (export "type-i32") + (block (drop (i32.ctz (br_if 0 (i32.const 0) (i32.const 1))))) + ) + (func (export "type-i64") + (block (drop (i64.ctz (br_if 0 (i64.const 0) (i32.const 1))))) + ) + (func (export "type-f32") + (block (drop (f32.neg (br_if 0 (f32.const 0) (i32.const 1))))) + ) + (func (export "type-f64") + (block (drop (f64.neg (br_if 0 (f64.const 0) (i32.const 1))))) + ) + + (func (export "type-i32-value") (result i32) + (block (result i32) (i32.ctz (br_if 0 (i32.const 1) (i32.const 1)))) + ) + (func (export "type-i64-value") (result i64) + (block (result i64) (i64.ctz (br_if 0 (i64.const 2) (i32.const 1)))) + ) + (func (export "type-f32-value") (result f32) + (block (result f32) (f32.neg (br_if 0 (f32.const 3) (i32.const 1)))) + ) + (func (export "type-f64-value") (result f64) + (block (result f64) (f64.neg (br_if 0 (f64.const 4) (i32.const 1)))) + ) + + (func (export "as-block-first") (param i32) (result i32) + (block (br_if 0 (local.get 0)) (return (i32.const 2))) (i32.const 3) + ) + (func (export "as-block-mid") (param i32) (result i32) + (block (call $$dummy) (br_if 0 (local.get 0)) (return (i32.const 2))) + (i32.const 3) + ) + (func (export "as-block-last") (param i32) + (block (call $$dummy) (call $$dummy) (br_if 0 (local.get 0))) + ) + (func (export "as-block-first-value") (param i32) (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 10) (local.get 0))) (return (i32.const 11)) + ) + ) + (func (export "as-block-mid-value") (param i32) (result i32) + (block (result i32) + (call $$dummy) + (drop (br_if 0 (i32.const 20) (local.get 0))) + (return (i32.const 21)) + ) + ) + (func (export "as-block-last-value") (param i32) (result i32) + (block (result i32) + (call $$dummy) (call $$dummy) (br_if 0 (i32.const 11) (local.get 0)) + ) + ) + + (func (export "as-loop-first") (param i32) (result i32) + (block (loop (br_if 1 (local.get 0)) (return (i32.const 2)))) (i32.const 3) + ) + (func (export "as-loop-mid") (param i32) (result i32) + (block (loop (call $$dummy) (br_if 1 (local.get 0)) (return (i32.const 2)))) + (i32.const 4) + ) + (func (export "as-loop-last") (param i32) + (loop (call $$dummy) (br_if 1 (local.get 0))) + ) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (br_if 0 (i32.const 1) (i32.const 2)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (br_if 0 (i32.const 1) (i32.const 1)))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (br_if 0 (i32.const 1) (i32.const 2)) (i32.const 3))) + (i32.const 4) + ) + ) + (func (export "as-br_if-value-cond") (param i32) (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 2) (br_if 0 (i32.const 1) (local.get 0)))) + (i32.const 4) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (br_if 0 (i32.const 1) (i32.const 2)))) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (br_if 0 (i32.const 1) (i32.const 2)) (i32.const 3)) (i32.const 4) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 2) (br_if 0 (i32.const 1) (i32.const 3))) (i32.const 4) + ) + ) + (func (export "as-return-value") (result i64) + (block (result i64) (return (br_if 0 (i64.const 1) (i32.const 2)))) + ) + + (func (export "as-if-cond") (param i32) (result i32) + (block (result i32) + (if (result i32) + (br_if 0 (i32.const 1) (local.get 0)) + (then (i32.const 2)) + (else (i32.const 3)) + ) + ) + ) + (func (export "as-if-then") (param i32 i32) + (block + (if (local.get 0) (then (br_if 1 (local.get 1))) (else (call $$dummy))) + ) + ) + (func (export "as-if-else") (param i32 i32) + (block + (if (local.get 0) (then (call $$dummy)) (else (br_if 1 (local.get 1)))) + ) + ) + + (func (export "as-select-first") (param i32) (result i32) + (block (result i32) + (select (br_if 0 (i32.const 3) (i32.const 10)) (i32.const 2) (local.get 0)) + ) + ) + (func (export "as-select-second") (param i32) (result i32) + (block (result i32) + (select (i32.const 1) (br_if 0 (i32.const 3) (i32.const 10)) (local.get 0)) + ) + ) + (func (export "as-select-cond") (result i32) + (block (result i32) + (select (i32.const 1) (i32.const 2) (br_if 0 (i32.const 3) (i32.const 10))) + ) + ) + + (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (block (result i32) + (call $$f + (br_if 0 (i32.const 12) (i32.const 1)) (i32.const 2) (i32.const 3) + ) + ) + ) + (func (export "as-call-mid") (result i32) + (block (result i32) + (call $$f + (i32.const 1) (br_if 0 (i32.const 13) (i32.const 1)) (i32.const 3) + ) + ) + ) + (func (export "as-call-last") (result i32) + (block (result i32) + (call $$f + (i32.const 1) (i32.const 2) (br_if 0 (i32.const 14) (i32.const 1)) + ) + ) + ) + + (func $$func (param i32 i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-func") (result i32) + (block (result i32) + (call_indirect (type $$check) + (br_if 0 (i32.const 4) (i32.const 10)) + (i32.const 1) (i32.const 2) (i32.const 0) + ) + ) + ) + + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 1) (br_if 0 (i32.const 4) (i32.const 10)) (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 1) (i32.const 2) (br_if 0 (i32.const 4) (i32.const 10)) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 1) (i32.const 2) (i32.const 3) (br_if 0 (i32.const 4) (i32.const 10)) + ) + ) + ) + + (func (export "as-local.set-value") (param i32) (result i32) + (local i32) + (block (result i32) + (local.set 0 (br_if 0 (i32.const 17) (local.get 0))) + (i32.const -1) + ) + ) + (func (export "as-local.tee-value") (param i32) (result i32) + (block (result i32) + (local.tee 0 (br_if 0 (i32.const 1) (local.get 0))) + (return (i32.const -1)) + ) + ) + (global $$a (mut i32) (i32.const 10)) + (func (export "as-global.set-value") (param i32) (result i32) + (block (result i32) + (global.set $$a (br_if 0 (i32.const 1) (local.get 0))) + (return (i32.const -1)) + ) + ) + + (memory 1) + (func (export "as-load-address") (result i32) + (block (result i32) (i32.load (br_if 0 (i32.const 1) (i32.const 1)))) + ) + (func (export "as-loadN-address") (result i32) + (block (result i32) (i32.load8_s (br_if 0 (i32.const 30) (i32.const 1)))) + ) + + (func (export "as-store-address") (result i32) + (block (result i32) + (i32.store (br_if 0 (i32.const 30) (i32.const 1)) (i32.const 7)) (i32.const -1) + ) + ) + (func (export "as-store-value") (result i32) + (block (result i32) + (i32.store (i32.const 2) (br_if 0 (i32.const 31) (i32.const 1))) (i32.const -1) + ) + ) + + (func (export "as-storeN-address") (result i32) + (block (result i32) + (i32.store8 (br_if 0 (i32.const 32) (i32.const 1)) (i32.const 7)) (i32.const -1) + ) + ) + (func (export "as-storeN-value") (result i32) + (block (result i32) + (i32.store16 (i32.const 2) (br_if 0 (i32.const 33) (i32.const 1))) (i32.const -1) + ) + ) + + (func (export "as-unary-operand") (result f64) + (block (result f64) (f64.neg (br_if 0 (f64.const 1.0) (i32.const 1)))) + ) + (func (export "as-binary-left") (result i32) + (block (result i32) (i32.add (br_if 0 (i32.const 1) (i32.const 1)) (i32.const 10))) + ) + (func (export "as-binary-right") (result i32) + (block (result i32) (i32.sub (i32.const 10) (br_if 0 (i32.const 1) (i32.const 1)))) + ) + (func (export "as-test-operand") (result i32) + (block (result i32) (i32.eqz (br_if 0 (i32.const 0) (i32.const 1)))) + ) + (func (export "as-compare-left") (result i32) + (block (result i32) (i32.le_u (br_if 0 (i32.const 1) (i32.const 1)) (i32.const 10))) + ) + (func (export "as-compare-right") (result i32) + (block (result i32) (i32.ne (i32.const 10) (br_if 0 (i32.const 1) (i32.const 42)))) + ) + + (func (export "as-memory.grow-size") (result i32) + (block (result i32) (memory.grow (br_if 0 (i32.const 1) (i32.const 1)))) + ) + + (func (export "nested-block-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (i32.add + (i32.const 4) + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) + (i32.const 16) + ) + ) + ) + ) + ) + + (func (export "nested-br-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (br 0 + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4) + ) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_if-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (drop (br_if 0 + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4) + ) + (i32.const 1) + )) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_if-value-cond") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (drop (br_if 0 + (i32.const 4) + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 1) + ) + )) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_table-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (br_table 0 + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4) + ) + (i32.const 1) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_table-value-index") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (br_table 0 + (i32.const 4) + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 1) + ) + ) + (i32.const 16) + ) + ) + ) + +)`); + +// ./test/core/br_if.wast:372 +assert_return(() => invoke($0, `type-i32`, []), []); + +// ./test/core/br_if.wast:373 +assert_return(() => invoke($0, `type-i64`, []), []); + +// ./test/core/br_if.wast:374 +assert_return(() => invoke($0, `type-f32`, []), []); + +// ./test/core/br_if.wast:375 +assert_return(() => invoke($0, `type-f64`, []), []); + +// ./test/core/br_if.wast:377 +assert_return(() => invoke($0, `type-i32-value`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:378 +assert_return(() => invoke($0, `type-i64-value`, []), [value("i64", 2n)]); + +// ./test/core/br_if.wast:379 +assert_return(() => invoke($0, `type-f32-value`, []), [value("f32", 3)]); + +// ./test/core/br_if.wast:380 +assert_return(() => invoke($0, `type-f64-value`, []), [value("f64", 4)]); + +// ./test/core/br_if.wast:382 +assert_return(() => invoke($0, `as-block-first`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:383 +assert_return(() => invoke($0, `as-block-first`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:384 +assert_return(() => invoke($0, `as-block-mid`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:385 +assert_return(() => invoke($0, `as-block-mid`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:386 +assert_return(() => invoke($0, `as-block-last`, [0]), []); + +// ./test/core/br_if.wast:387 +assert_return(() => invoke($0, `as-block-last`, [1]), []); + +// ./test/core/br_if.wast:389 +assert_return(() => invoke($0, `as-block-first-value`, [0]), [value("i32", 11)]); + +// ./test/core/br_if.wast:390 +assert_return(() => invoke($0, `as-block-first-value`, [1]), [value("i32", 10)]); + +// ./test/core/br_if.wast:391 +assert_return(() => invoke($0, `as-block-mid-value`, [0]), [value("i32", 21)]); + +// ./test/core/br_if.wast:392 +assert_return(() => invoke($0, `as-block-mid-value`, [1]), [value("i32", 20)]); + +// ./test/core/br_if.wast:393 +assert_return(() => invoke($0, `as-block-last-value`, [0]), [value("i32", 11)]); + +// ./test/core/br_if.wast:394 +assert_return(() => invoke($0, `as-block-last-value`, [1]), [value("i32", 11)]); + +// ./test/core/br_if.wast:396 +assert_return(() => invoke($0, `as-loop-first`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:397 +assert_return(() => invoke($0, `as-loop-first`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:398 +assert_return(() => invoke($0, `as-loop-mid`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:399 +assert_return(() => invoke($0, `as-loop-mid`, [1]), [value("i32", 4)]); + +// ./test/core/br_if.wast:400 +assert_return(() => invoke($0, `as-loop-last`, [0]), []); + +// ./test/core/br_if.wast:401 +assert_return(() => invoke($0, `as-loop-last`, [1]), []); + +// ./test/core/br_if.wast:403 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:405 +assert_return(() => invoke($0, `as-br_if-cond`, []), []); + +// ./test/core/br_if.wast:406 +assert_return(() => invoke($0, `as-br_if-value`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:407 +assert_return(() => invoke($0, `as-br_if-value-cond`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:408 +assert_return(() => invoke($0, `as-br_if-value-cond`, [1]), [value("i32", 1)]); + +// ./test/core/br_if.wast:410 +assert_return(() => invoke($0, `as-br_table-index`, []), []); + +// ./test/core/br_if.wast:411 +assert_return(() => invoke($0, `as-br_table-value`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:412 +assert_return(() => invoke($0, `as-br_table-value-index`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:414 +assert_return(() => invoke($0, `as-return-value`, []), [value("i64", 1n)]); + +// ./test/core/br_if.wast:416 +assert_return(() => invoke($0, `as-if-cond`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:417 +assert_return(() => invoke($0, `as-if-cond`, [1]), [value("i32", 1)]); + +// ./test/core/br_if.wast:418 +assert_return(() => invoke($0, `as-if-then`, [0, 0]), []); + +// ./test/core/br_if.wast:419 +assert_return(() => invoke($0, `as-if-then`, [4, 0]), []); + +// ./test/core/br_if.wast:420 +assert_return(() => invoke($0, `as-if-then`, [0, 1]), []); + +// ./test/core/br_if.wast:421 +assert_return(() => invoke($0, `as-if-then`, [4, 1]), []); + +// ./test/core/br_if.wast:422 +assert_return(() => invoke($0, `as-if-else`, [0, 0]), []); + +// ./test/core/br_if.wast:423 +assert_return(() => invoke($0, `as-if-else`, [3, 0]), []); + +// ./test/core/br_if.wast:424 +assert_return(() => invoke($0, `as-if-else`, [0, 1]), []); + +// ./test/core/br_if.wast:425 +assert_return(() => invoke($0, `as-if-else`, [3, 1]), []); + +// ./test/core/br_if.wast:427 +assert_return(() => invoke($0, `as-select-first`, [0]), [value("i32", 3)]); + +// ./test/core/br_if.wast:428 +assert_return(() => invoke($0, `as-select-first`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:429 +assert_return(() => invoke($0, `as-select-second`, [0]), [value("i32", 3)]); + +// ./test/core/br_if.wast:430 +assert_return(() => invoke($0, `as-select-second`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:431 +assert_return(() => invoke($0, `as-select-cond`, []), [value("i32", 3)]); + +// ./test/core/br_if.wast:433 +assert_return(() => invoke($0, `as-call-first`, []), [value("i32", 12)]); + +// ./test/core/br_if.wast:434 +assert_return(() => invoke($0, `as-call-mid`, []), [value("i32", 13)]); + +// ./test/core/br_if.wast:435 +assert_return(() => invoke($0, `as-call-last`, []), [value("i32", 14)]); + +// ./test/core/br_if.wast:437 +assert_return(() => invoke($0, `as-call_indirect-func`, []), [value("i32", 4)]); + +// ./test/core/br_if.wast:438 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 4)]); + +// ./test/core/br_if.wast:439 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 4)]); + +// ./test/core/br_if.wast:440 +assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", 4)]); + +// ./test/core/br_if.wast:442 +assert_return(() => invoke($0, `as-local.set-value`, [0]), [value("i32", -1)]); + +// ./test/core/br_if.wast:443 +assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 17)]); + +// ./test/core/br_if.wast:445 +assert_return(() => invoke($0, `as-local.tee-value`, [0]), [value("i32", -1)]); + +// ./test/core/br_if.wast:446 +assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 1)]); + +// ./test/core/br_if.wast:448 +assert_return(() => invoke($0, `as-global.set-value`, [0]), [value("i32", -1)]); + +// ./test/core/br_if.wast:449 +assert_return(() => invoke($0, `as-global.set-value`, [1]), [value("i32", 1)]); + +// ./test/core/br_if.wast:451 +assert_return(() => invoke($0, `as-load-address`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:452 +assert_return(() => invoke($0, `as-loadN-address`, []), [value("i32", 30)]); + +// ./test/core/br_if.wast:454 +assert_return(() => invoke($0, `as-store-address`, []), [value("i32", 30)]); + +// ./test/core/br_if.wast:455 +assert_return(() => invoke($0, `as-store-value`, []), [value("i32", 31)]); + +// ./test/core/br_if.wast:456 +assert_return(() => invoke($0, `as-storeN-address`, []), [value("i32", 32)]); + +// ./test/core/br_if.wast:457 +assert_return(() => invoke($0, `as-storeN-value`, []), [value("i32", 33)]); + +// ./test/core/br_if.wast:459 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("f64", 1)]); + +// ./test/core/br_if.wast:460 +assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:461 +assert_return(() => invoke($0, `as-binary-right`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:462 +assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 0)]); + +// ./test/core/br_if.wast:463 +assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:464 +assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:465 +assert_return(() => invoke($0, `as-memory.grow-size`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:467 +assert_return(() => invoke($0, `nested-block-value`, [0]), [value("i32", 21)]); + +// ./test/core/br_if.wast:468 +assert_return(() => invoke($0, `nested-block-value`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:469 +assert_return(() => invoke($0, `nested-br-value`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:470 +assert_return(() => invoke($0, `nested-br-value`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:471 +assert_return(() => invoke($0, `nested-br_if-value`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:472 +assert_return(() => invoke($0, `nested-br_if-value`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:473 +assert_return(() => invoke($0, `nested-br_if-value-cond`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:474 +assert_return(() => invoke($0, `nested-br_if-value-cond`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:475 +assert_return(() => invoke($0, `nested-br_table-value`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:476 +assert_return(() => invoke($0, `nested-br_table-value`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:477 +assert_return(() => invoke($0, `nested-br_table-value-index`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:478 +assert_return(() => invoke($0, `nested-br_table-value-index`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:480 +assert_invalid( + () => instantiate(`(module (func $$type-false-i32 (block (i32.ctz (br_if 0 (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:484 +assert_invalid( + () => instantiate(`(module (func $$type-false-i64 (block (i64.ctz (br_if 0 (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:488 +assert_invalid( + () => instantiate(`(module (func $$type-false-f32 (block (f32.neg (br_if 0 (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:492 +assert_invalid( + () => instantiate(`(module (func $$type-false-f64 (block (f64.neg (br_if 0 (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:497 +assert_invalid( + () => instantiate(`(module (func $$type-true-i32 (block (i32.ctz (br_if 0 (i32.const 1))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:501 +assert_invalid( + () => instantiate(`(module (func $$type-true-i64 (block (i64.ctz (br_if 0 (i64.const 1))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:505 +assert_invalid( + () => instantiate(`(module (func $$type-true-f32 (block (f32.neg (br_if 0 (f32.const 1))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:509 +assert_invalid( + () => instantiate(`(module (func $$type-true-f64 (block (f64.neg (br_if 0 (i64.const 1))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:514 +assert_invalid( + () => instantiate(`(module (func $$type-false-arg-void-vs-num (result i32) + (block (result i32) (br_if 0 (i32.const 0)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:520 +assert_invalid( + () => instantiate(`(module (func $$type-true-arg-void-vs-num (result i32) + (block (result i32) (br_if 0 (i32.const 1)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:526 +assert_invalid( + () => instantiate(`(module (func $$type-false-arg-num-vs-void + (block (br_if 0 (i32.const 0) (i32.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:532 +assert_invalid( + () => instantiate(`(module (func $$type-true-arg-num-vs-void + (block (br_if 0 (i32.const 0) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:539 +assert_invalid( + () => instantiate(`(module (func $$type-false-arg-void-vs-num (result i32) + (block (result i32) (br_if 0 (nop) (i32.const 0)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:545 +assert_invalid( + () => instantiate(`(module (func $$type-true-arg-void-vs-num (result i32) + (block (result i32) (br_if 0 (nop) (i32.const 1)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:551 +assert_invalid( + () => instantiate(`(module (func $$type-false-arg-num-vs-num (result i32) + (block (result i32) + (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1) + ) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:559 +assert_invalid( + () => instantiate(`(module (func $$type-true-arg-num-vs-num (result i32) + (block (result i32) + (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1) + ) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:568 +assert_invalid( + () => instantiate(`(module (func $$type-cond-empty-vs-i32 + (block (br_if 0)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:574 +assert_invalid( + () => instantiate(`(module (func $$type-cond-void-vs-i32 + (block (br_if 0 (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:580 +assert_invalid( + () => instantiate(`(module (func $$type-cond-num-vs-i32 + (block (br_if 0 (i64.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:586 +assert_invalid( + () => instantiate(`(module (func $$type-arg-cond-void-vs-i32 (result i32) + (block (result i32) (br_if 0 (i32.const 0) (nop)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:592 +assert_invalid( + () => instantiate(`(module (func $$type-arg-void-vs-num-nested (result i32) + (block (result i32) (i32.const 0) (block (br_if 1 (i32.const 1)))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:598 +assert_invalid( + () => instantiate(`(module (func $$type-arg-cond-num-vs-i32 (result i32) + (block (result i32) (br_if 0 (i32.const 0) (i64.const 0)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:605 +assert_invalid( + () => instantiate(`(module + (func $$type-1st-cond-empty-in-then + (block + (i32.const 0) (i32.const 0) + (if (result i32) (then (br_if 0))) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br_if.wast:617 +assert_invalid( + () => instantiate(`(module + (func $$type-2nd-cond-empty-in-then + (block + (i32.const 0) (i32.const 0) + (if (result i32) (then (br_if 0 (i32.const 1)))) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br_if.wast:629 +assert_invalid( + () => instantiate(`(module + (func $$type-1st-cond-empty-in-return + (block (result i32) + (return (br_if 0)) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br_if.wast:640 +assert_invalid( + () => instantiate(`(module + (func $$type-2nd-cond-empty-in-return + (block (result i32) + (return (br_if 0 (i32.const 1))) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br_if.wast:653 +assert_invalid( + () => instantiate(`(module (func $$unbound-label (br_if 1 (i32.const 1))))`), + `unknown label`, +); + +// ./test/core/br_if.wast:657 +assert_invalid( + () => instantiate(`(module (func $$unbound-nested-label (block (block (br_if 5 (i32.const 1))))))`), + `unknown label`, +); + +// ./test/core/br_if.wast:661 +assert_invalid( + () => instantiate(`(module (func $$large-label (br_if 0x10000001 (i32.const 1))))`), + `unknown label`, +); diff --git a/js/src/jit-test/tests/wasm/spec/gc/br_on_cast.wast.js b/js/src/jit-test/tests/wasm/spec/gc/br_on_cast.wast.js new file mode 100644 index 0000000000..23ea05818a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/br_on_cast.wast.js @@ -0,0 +1,337 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/br_on_cast.wast + +// ./test/core/gc/br_on_cast.wast:3 +let $0 = instantiate(`(module + (type $$ft (func (result i32))) + (type $$st (struct (field i16))) + (type $$at (array i8)) + + (table 10 anyref) + + (elem declare func $$f) + (func $$f (result i32) (i32.const 9)) + + (func (export "init") (param $$x externref) + (table.set (i32.const 0) (ref.null any)) + (table.set (i32.const 1) (ref.i31 (i32.const 7))) + (table.set (i32.const 2) (struct.new $$st (i32.const 6))) + (table.set (i32.const 3) (array.new $$at (i32.const 5) (i32.const 3))) + (table.set (i32.const 4) (any.convert_extern (local.get $$x))) + ) + + (func (export "br_on_null") (param $$i i32) (result i32) + (block $$l + (br_on_null $$l (table.get (local.get $$i))) + (return (i32.const -1)) + ) + (i32.const 0) + ) + (func (export "br_on_i31") (param $$i i32) (result i32) + (block $$l (result (ref i31)) + (br_on_cast $$l anyref (ref i31) (table.get (local.get $$i))) + (return (i32.const -1)) + ) + (i31.get_u) + ) + (func (export "br_on_struct") (param $$i i32) (result i32) + (block $$l (result (ref struct)) + (br_on_cast $$l anyref (ref struct) (table.get (local.get $$i))) + (return (i32.const -1)) + ) + (block $$l2 (param structref) (result (ref $$st)) + (block $$l3 (param structref) (result (ref $$at)) + (br_on_cast $$l2 structref (ref $$st)) + (br_on_cast $$l3 anyref (ref $$at)) + (return (i32.const -2)) + ) + (return (array.get_u $$at (i32.const 0))) + ) + (struct.get_s $$st 0) + ) + (func (export "br_on_array") (param $$i i32) (result i32) + (block $$l (result (ref array)) + (br_on_cast $$l anyref (ref array) (table.get (local.get $$i))) + (return (i32.const -1)) + ) + (array.len) + ) + + (func (export "null-diff") (param $$i i32) (result i32) + (block $$l (result (ref null struct)) + (block (result (ref any)) + (br_on_cast $$l (ref null any) (ref null struct) (table.get (local.get $$i))) + ) + (return (i32.const 0)) + ) + (return (i32.const 1)) + ) +)`); + +// ./test/core/gc/br_on_cast.wast:69 +invoke($0, `init`, [externref(0)]); + +// ./test/core/gc/br_on_cast.wast:71 +assert_return(() => invoke($0, `br_on_null`, [0]), [value("i32", 0)]); + +// ./test/core/gc/br_on_cast.wast:72 +assert_return(() => invoke($0, `br_on_null`, [1]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:73 +assert_return(() => invoke($0, `br_on_null`, [2]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:74 +assert_return(() => invoke($0, `br_on_null`, [3]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:75 +assert_return(() => invoke($0, `br_on_null`, [4]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:77 +assert_return(() => invoke($0, `br_on_i31`, [0]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:78 +assert_return(() => invoke($0, `br_on_i31`, [1]), [value("i32", 7)]); + +// ./test/core/gc/br_on_cast.wast:79 +assert_return(() => invoke($0, `br_on_i31`, [2]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:80 +assert_return(() => invoke($0, `br_on_i31`, [3]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:81 +assert_return(() => invoke($0, `br_on_i31`, [4]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:83 +assert_return(() => invoke($0, `br_on_struct`, [0]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:84 +assert_return(() => invoke($0, `br_on_struct`, [1]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:85 +assert_return(() => invoke($0, `br_on_struct`, [2]), [value("i32", 6)]); + +// ./test/core/gc/br_on_cast.wast:86 +assert_return(() => invoke($0, `br_on_struct`, [3]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:87 +assert_return(() => invoke($0, `br_on_struct`, [4]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:89 +assert_return(() => invoke($0, `br_on_array`, [0]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:90 +assert_return(() => invoke($0, `br_on_array`, [1]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:91 +assert_return(() => invoke($0, `br_on_array`, [2]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:92 +assert_return(() => invoke($0, `br_on_array`, [3]), [value("i32", 3)]); + +// ./test/core/gc/br_on_cast.wast:93 +assert_return(() => invoke($0, `br_on_array`, [4]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast.wast:95 +assert_return(() => invoke($0, `null-diff`, [0]), [value("i32", 1)]); + +// ./test/core/gc/br_on_cast.wast:96 +assert_return(() => invoke($0, `null-diff`, [1]), [value("i32", 0)]); + +// ./test/core/gc/br_on_cast.wast:97 +assert_return(() => invoke($0, `null-diff`, [2]), [value("i32", 1)]); + +// ./test/core/gc/br_on_cast.wast:98 +assert_return(() => invoke($0, `null-diff`, [3]), [value("i32", 0)]); + +// ./test/core/gc/br_on_cast.wast:99 +assert_return(() => invoke($0, `null-diff`, [4]), [value("i32", 0)]); + +// ./test/core/gc/br_on_cast.wast:104 +let $1 = instantiate(`(module + (type $$t0 (sub (struct))) + (type $$t1 (sub $$t0 (struct (field i32)))) + (type $$t1' (sub $$t0 (struct (field i32)))) + (type $$t2 (sub $$t1 (struct (field i32 i32)))) + (type $$t2' (sub $$t1' (struct (field i32 i32)))) + (type $$t3 (sub $$t0 (struct (field i32 i32)))) + (type $$t0' (sub $$t0 (struct))) + (type $$t4 (sub $$t0' (struct (field i32 i32)))) + + (table 20 structref) + + (func $$init + (table.set (i32.const 0) (struct.new_default $$t0)) + (table.set (i32.const 10) (struct.new_default $$t0')) + (table.set (i32.const 1) (struct.new_default $$t1)) + (table.set (i32.const 11) (struct.new_default $$t1')) + (table.set (i32.const 2) (struct.new_default $$t2)) + (table.set (i32.const 12) (struct.new_default $$t2')) + (table.set (i32.const 3) (struct.new_default $$t3)) + (table.set (i32.const 4) (struct.new_default $$t4)) + ) + + (func (export "test-sub") + (call $$init) + (block $$l (result structref) + ;; must succeed + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0) (ref.null struct)))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0) (table.get (i32.const 0))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0) (table.get (i32.const 1))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0) (table.get (i32.const 2))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0) (table.get (i32.const 3))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0) (table.get (i32.const 4))))) + + (drop (block (result structref) (br_on_cast 0 structref (ref $$t1) (ref.null struct)))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t1) (table.get (i32.const 1))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t1) (table.get (i32.const 2))))) + + (drop (block (result structref) (br_on_cast 0 structref (ref $$t2) (ref.null struct)))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t2) (table.get (i32.const 2))))) + + (drop (block (result structref) (br_on_cast 0 structref (ref $$t3) (ref.null struct)))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t3) (table.get (i32.const 3))))) + + (drop (block (result structref) (br_on_cast 0 structref (ref $$t4) (ref.null struct)))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t4) (table.get (i32.const 4))))) + + ;; must not succeed + (br_on_cast $$l anyref (ref $$t1) (table.get (i32.const 0))) + (br_on_cast $$l anyref (ref $$t1) (table.get (i32.const 3))) + (br_on_cast $$l anyref (ref $$t1) (table.get (i32.const 4))) + + (br_on_cast $$l anyref (ref $$t2) (table.get (i32.const 0))) + (br_on_cast $$l anyref (ref $$t2) (table.get (i32.const 1))) + (br_on_cast $$l anyref (ref $$t2) (table.get (i32.const 3))) + (br_on_cast $$l anyref (ref $$t2) (table.get (i32.const 4))) + + (br_on_cast $$l anyref (ref $$t3) (table.get (i32.const 0))) + (br_on_cast $$l anyref (ref $$t3) (table.get (i32.const 1))) + (br_on_cast $$l anyref (ref $$t3) (table.get (i32.const 2))) + (br_on_cast $$l anyref (ref $$t3) (table.get (i32.const 4))) + + (br_on_cast $$l anyref (ref $$t4) (table.get (i32.const 0))) + (br_on_cast $$l anyref (ref $$t4) (table.get (i32.const 1))) + (br_on_cast $$l anyref (ref $$t4) (table.get (i32.const 2))) + (br_on_cast $$l anyref (ref $$t4) (table.get (i32.const 3))) + + (return) + ) + (unreachable) + ) + + (func (export "test-canon") + (call $$init) + (block $$l + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0') (table.get (i32.const 0))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0') (table.get (i32.const 1))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0') (table.get (i32.const 2))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0') (table.get (i32.const 3))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0') (table.get (i32.const 4))))) + + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0) (table.get (i32.const 10))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0) (table.get (i32.const 11))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t0) (table.get (i32.const 12))))) + + (drop (block (result structref) (br_on_cast 0 structref (ref $$t1') (table.get (i32.const 1))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t1') (table.get (i32.const 2))))) + + (drop (block (result structref) (br_on_cast 0 structref (ref $$t1) (table.get (i32.const 11))))) + (drop (block (result structref) (br_on_cast 0 structref (ref $$t1) (table.get (i32.const 12))))) + + (drop (block (result structref) (br_on_cast 0 structref (ref $$t2') (table.get (i32.const 2))))) + + (drop (block (result structref) (br_on_cast 0 structref (ref $$t2) (table.get (i32.const 12))))) + + (return) + ) + (unreachable) + ) +)`); + +// ./test/core/gc/br_on_cast.wast:205 +invoke($1, `test-sub`, []); + +// ./test/core/gc/br_on_cast.wast:206 +invoke($1, `test-canon`, []); + +// ./test/core/gc/br_on_cast.wast:211 +let $2 = instantiate(`(module + (type $$t (struct)) + + (func (param (ref any)) (result (ref $$t)) + (block (result (ref any)) (br_on_cast 1 (ref any) (ref $$t) (local.get 0))) (unreachable) + ) + (func (param (ref null any)) (result (ref $$t)) + (block (result (ref null any)) (br_on_cast 1 (ref null any) (ref $$t) (local.get 0))) (unreachable) + ) + (func (param (ref null any)) (result (ref null $$t)) + (block (result (ref null any)) (br_on_cast 1 (ref null any) (ref null $$t) (local.get 0))) (unreachable) + ) +)`); + +// ./test/core/gc/br_on_cast.wast:225 +assert_invalid( + () => instantiate(`(module + (type $$t (struct)) + (func (param (ref any)) (result (ref $$t)) + (block (result (ref any)) (br_on_cast 1 (ref null any) (ref null $$t) (local.get 0))) (unreachable) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/br_on_cast.wast:234 +assert_invalid( + () => instantiate(`(module + (type $$t (struct)) + (func (param (ref any)) (result (ref null $$t)) + (block (result (ref any)) (br_on_cast 1 (ref any) (ref null $$t) (local.get 0))) (unreachable) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/br_on_cast.wast:243 +assert_invalid( + () => instantiate(`(module + (type $$t (struct)) + (func (param (ref null any)) (result (ref $$t)) + (block (result (ref any)) (br_on_cast 1 (ref null any) (ref $$t) (local.get 0))) (unreachable) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/br_on_cast.wast:252 +assert_invalid( + () => instantiate(`(module + (func (result anyref) + (br_on_cast 0 eqref anyref (unreachable)) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/br_on_cast.wast:260 +assert_invalid( + () => instantiate(`(module + (func (result anyref) + (br_on_cast 0 structref arrayref (unreachable)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/gc/br_on_cast_fail.wast.js b/js/src/jit-test/tests/wasm/spec/gc/br_on_cast_fail.wast.js new file mode 100644 index 0000000000..4d402f2803 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/br_on_cast_fail.wast.js @@ -0,0 +1,352 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/br_on_cast_fail.wast + +// ./test/core/gc/br_on_cast_fail.wast:3 +let $0 = instantiate(`(module + (type $$ft (func (result i32))) + (type $$st (struct (field i16))) + (type $$at (array i8)) + + (table 10 anyref) + + (elem declare func $$f) + (func $$f (result i32) (i32.const 9)) + + (func (export "init") (param $$x externref) + (table.set (i32.const 0) (ref.null any)) + (table.set (i32.const 1) (ref.i31 (i32.const 7))) + (table.set (i32.const 2) (struct.new $$st (i32.const 6))) + (table.set (i32.const 3) (array.new $$at (i32.const 5) (i32.const 3))) + (table.set (i32.const 4) (any.convert_extern (local.get $$x))) + ) + + (func (export "br_on_non_null") (param $$i i32) (result i32) + (block $$l (result (ref any)) + (br_on_non_null $$l (table.get (local.get $$i))) + (return (i32.const 0)) + ) + (return (i32.const -1)) + ) + (func (export "br_on_non_i31") (param $$i i32) (result i32) + (block $$l (result anyref) + (br_on_cast_fail $$l anyref (ref i31) (table.get (local.get $$i))) + (return (i31.get_u)) + ) + (return (i32.const -1)) + ) + (func (export "br_on_non_struct") (param $$i i32) (result i32) + (block $$l (result anyref) + (br_on_cast_fail $$l anyref (ref struct) (table.get (local.get $$i))) + (block $$l2 (param structref) (result (ref $$st)) + (block $$l3 (param structref) (result (ref $$at)) + (br_on_cast $$l2 structref (ref $$st)) + (br_on_cast $$l3 anyref (ref $$at)) + (return (i32.const -2)) + ) + (return (array.get_u $$at (i32.const 0))) + ) + (return (struct.get_s $$st 0)) + ) + (return (i32.const -1)) + ) + (func (export "br_on_non_array") (param $$i i32) (result i32) + (block $$l (result anyref) + (br_on_cast_fail $$l anyref (ref array) (table.get (local.get $$i))) + (return (array.len)) + ) + (return (i32.const -1)) + ) + + (func (export "null-diff") (param $$i i32) (result i32) + (block $$l (result (ref any)) + (block (result (ref null struct)) + (br_on_cast_fail $$l (ref null any) (ref null struct) (table.get (local.get $$i))) + ) + (return (i32.const 1)) + ) + (return (i32.const 0)) + ) +)`); + +// ./test/core/gc/br_on_cast_fail.wast:69 +invoke($0, `init`, [externref(0)]); + +// ./test/core/gc/br_on_cast_fail.wast:71 +assert_return(() => invoke($0, `br_on_non_null`, [0]), [value("i32", 0)]); + +// ./test/core/gc/br_on_cast_fail.wast:72 +assert_return(() => invoke($0, `br_on_non_null`, [1]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:73 +assert_return(() => invoke($0, `br_on_non_null`, [2]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:74 +assert_return(() => invoke($0, `br_on_non_null`, [3]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:75 +assert_return(() => invoke($0, `br_on_non_null`, [4]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:77 +assert_return(() => invoke($0, `br_on_non_i31`, [0]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:78 +assert_return(() => invoke($0, `br_on_non_i31`, [1]), [value("i32", 7)]); + +// ./test/core/gc/br_on_cast_fail.wast:79 +assert_return(() => invoke($0, `br_on_non_i31`, [2]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:80 +assert_return(() => invoke($0, `br_on_non_i31`, [3]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:81 +assert_return(() => invoke($0, `br_on_non_i31`, [4]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:83 +assert_return(() => invoke($0, `br_on_non_struct`, [0]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:84 +assert_return(() => invoke($0, `br_on_non_struct`, [1]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:85 +assert_return(() => invoke($0, `br_on_non_struct`, [2]), [value("i32", 6)]); + +// ./test/core/gc/br_on_cast_fail.wast:86 +assert_return(() => invoke($0, `br_on_non_struct`, [3]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:87 +assert_return(() => invoke($0, `br_on_non_struct`, [4]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:89 +assert_return(() => invoke($0, `br_on_non_array`, [0]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:90 +assert_return(() => invoke($0, `br_on_non_array`, [1]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:91 +assert_return(() => invoke($0, `br_on_non_array`, [2]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:92 +assert_return(() => invoke($0, `br_on_non_array`, [3]), [value("i32", 3)]); + +// ./test/core/gc/br_on_cast_fail.wast:93 +assert_return(() => invoke($0, `br_on_non_array`, [4]), [value("i32", -1)]); + +// ./test/core/gc/br_on_cast_fail.wast:95 +assert_return(() => invoke($0, `null-diff`, [0]), [value("i32", 1)]); + +// ./test/core/gc/br_on_cast_fail.wast:96 +assert_return(() => invoke($0, `null-diff`, [1]), [value("i32", 0)]); + +// ./test/core/gc/br_on_cast_fail.wast:97 +assert_return(() => invoke($0, `null-diff`, [2]), [value("i32", 1)]); + +// ./test/core/gc/br_on_cast_fail.wast:98 +assert_return(() => invoke($0, `null-diff`, [3]), [value("i32", 0)]); + +// ./test/core/gc/br_on_cast_fail.wast:99 +assert_return(() => invoke($0, `null-diff`, [4]), [value("i32", 0)]); + +// ./test/core/gc/br_on_cast_fail.wast:104 +let $1 = instantiate(`(module + (type $$t0 (sub (struct))) + (type $$t1 (sub $$t0 (struct (field i32)))) + (type $$t1' (sub $$t0 (struct (field i32)))) + (type $$t2 (sub $$t1 (struct (field i32 i32)))) + (type $$t2' (sub $$t1' (struct (field i32 i32)))) + (type $$t3 (sub $$t0 (struct (field i32 i32)))) + (type $$t0' (sub $$t0 (struct))) + (type $$t4 (sub $$t0' (struct (field i32 i32)))) + + (table 20 structref) + + (func $$init + (table.set (i32.const 0) (struct.new_default $$t0)) + (table.set (i32.const 10) (struct.new_default $$t0)) + (table.set (i32.const 1) (struct.new_default $$t1)) + (table.set (i32.const 11) (struct.new_default $$t1')) + (table.set (i32.const 2) (struct.new_default $$t2)) + (table.set (i32.const 12) (struct.new_default $$t2')) + (table.set (i32.const 3) (struct.new_default $$t3 )) + (table.set (i32.const 4) (struct.new_default $$t4)) + ) + + (func (export "test-sub") + (call $$init) + (block $$l (result structref) + ;; must not succeed + (br_on_cast_fail $$l structref (ref null $$t0) (ref.null struct)) + (br_on_cast_fail $$l structref (ref null $$t0) (table.get (i32.const 0))) + (br_on_cast_fail $$l structref (ref null $$t0) (table.get (i32.const 1))) + (br_on_cast_fail $$l structref (ref null $$t0) (table.get (i32.const 2))) + (br_on_cast_fail $$l structref (ref null $$t0) (table.get (i32.const 3))) + (br_on_cast_fail $$l structref (ref null $$t0) (table.get (i32.const 4))) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 0))) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 1))) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 2))) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 3))) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 4))) + + (br_on_cast_fail $$l structref (ref null $$t1) (ref.null struct)) + (br_on_cast_fail $$l structref (ref null $$t1) (table.get (i32.const 1))) + (br_on_cast_fail $$l structref (ref null $$t1) (table.get (i32.const 2))) + (br_on_cast_fail $$l structref (ref $$t1) (table.get (i32.const 1))) + (br_on_cast_fail $$l structref (ref $$t1) (table.get (i32.const 2))) + + (br_on_cast_fail $$l structref (ref null $$t2) (ref.null struct)) + (br_on_cast_fail $$l structref (ref null $$t2) (table.get (i32.const 2))) + (br_on_cast_fail $$l structref (ref $$t2) (table.get (i32.const 2))) + + (br_on_cast_fail $$l structref (ref null $$t3) (ref.null struct)) + (br_on_cast_fail $$l structref (ref null $$t3) (table.get (i32.const 3))) + (br_on_cast_fail $$l structref (ref $$t3) (table.get (i32.const 3))) + + (br_on_cast_fail $$l structref (ref null $$t4) (ref.null struct)) + (br_on_cast_fail $$l structref (ref null $$t4) (table.get (i32.const 4))) + (br_on_cast_fail $$l structref (ref $$t4) (table.get (i32.const 4))) + + ;; must succeed + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t0) (ref.null struct)))) + + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t1) (ref.null struct)))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t1) (table.get (i32.const 0))))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t1) (table.get (i32.const 3))))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t1) (table.get (i32.const 4))))) + + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t2) (ref.null struct)))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t2) (table.get (i32.const 0))))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t2) (table.get (i32.const 1))))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t2) (table.get (i32.const 3))))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t2) (table.get (i32.const 4))))) + + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t3) (ref.null struct)))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t3) (table.get (i32.const 0))))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t3) (table.get (i32.const 1))))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t3) (table.get (i32.const 2))))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t3) (table.get (i32.const 4))))) + + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t4) (ref.null struct)))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t4) (table.get (i32.const 0))))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t4) (table.get (i32.const 1))))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t4) (table.get (i32.const 2))))) + (drop (block (result structref) (br_on_cast_fail 0 structref (ref $$t4) (table.get (i32.const 3))))) + + (return) + ) + (unreachable) + ) + + (func (export "test-canon") + (call $$init) + (block $$l (result structref) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 0))) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 1))) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 2))) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 3))) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 4))) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 10))) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 11))) + (br_on_cast_fail $$l structref (ref $$t0) (table.get (i32.const 12))) + + (br_on_cast_fail $$l structref (ref $$t1') (table.get (i32.const 1))) + (br_on_cast_fail $$l structref (ref $$t1') (table.get (i32.const 2))) + + (br_on_cast_fail $$l structref (ref $$t1) (table.get (i32.const 11))) + (br_on_cast_fail $$l structref (ref $$t1) (table.get (i32.const 12))) + + (br_on_cast_fail $$l structref (ref $$t2') (table.get (i32.const 2))) + + (br_on_cast_fail $$l structref (ref $$t2) (table.get (i32.const 12))) + + (return) + ) + (unreachable) + ) +)`); + +// ./test/core/gc/br_on_cast_fail.wast:220 +invoke($1, `test-sub`, []); + +// ./test/core/gc/br_on_cast_fail.wast:221 +invoke($1, `test-canon`, []); + +// ./test/core/gc/br_on_cast_fail.wast:226 +let $2 = instantiate(`(module + (type $$t (struct)) + + (func (param (ref any)) (result (ref any)) + (block (result (ref $$t)) (br_on_cast_fail 1 (ref any) (ref $$t) (local.get 0))) + ) + (func (param (ref null any)) (result (ref null any)) + (block (result (ref $$t)) (br_on_cast_fail 1 (ref null any) (ref $$t) (local.get 0))) + ) + (func (param (ref null any)) (result (ref null any)) + (block (result (ref null $$t)) (br_on_cast_fail 1 (ref null any) (ref null $$t) (local.get 0))) + ) +)`); + +// ./test/core/gc/br_on_cast_fail.wast:240 +assert_invalid( + () => instantiate(`(module + (type $$t (struct)) + (func (param (ref any)) (result (ref any)) + (block (result (ref $$t)) (br_on_cast_fail 1 (ref null any) (ref null $$t) (local.get 0))) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/br_on_cast_fail.wast:249 +assert_invalid( + () => instantiate(`(module + (type $$t (struct)) + (func (param (ref any)) (result (ref any)) + (block (result (ref null $$t)) (br_on_cast_fail 1 (ref any) (ref null $$t) (local.get 0))) (ref.as_non_null) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/br_on_cast_fail.wast:258 +assert_invalid( + () => instantiate(`(module + (type $$t (struct)) + (func (param (ref null any)) (result (ref any)) + (block (result (ref $$t)) (br_on_cast_fail 1 (ref null any) (ref $$t) (local.get 0))) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/br_on_cast_fail.wast:267 +assert_invalid( + () => instantiate(`(module + (func (result anyref) + (br_on_cast_fail 0 eqref anyref (unreachable)) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/br_on_cast_fail.wast:275 +assert_invalid( + () => instantiate(`(module + (func (result anyref) + (br_on_cast_fail 0 structref arrayref (unreachable)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/gc/comments.wast.js b/js/src/jit-test/tests/wasm/spec/gc/comments.wast.js new file mode 100644 index 0000000000..32a78a1e3c --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/comments.wast.js @@ -0,0 +1,51 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/comments.wast + +// ./test/core/comments.wast:10:0 +let $0 = instantiate(`(module;;comment +)`); + +// ./test/core/comments.wast:57:11 +let $1 = instantiate(`(module(;comment;) +(;comment;))`); + +// ./test/core/comments.wast:67 +let $2 = instantiate(`(module + (;comment(;nested(;further;)nested;)comment;) +)`); + +// ./test/core/comments.wast:76 +let $3 = instantiate(`(module + (;comment;;comment(;nested;)comment;) +)`); + +// ./test/core/comments.wast:83:8 +let $4 = instantiate(`(func (export "f1") (result i32) (i32.const 1) ;; comment + (return (i32.const 2)) + ) (func (export "f2") (result i32) (i32.const 1) ;; comment (return (i32.const 2)) + ) (func (export "f3") (result i32) (i32.const 1) ;; comment + (return (i32.const 2)) + ) `); + +// ./test/core/comments.wast:104 +assert_return(() => invoke($4, `f1`, []), [value("i32", 2)]); + +// ./test/core/comments.wast:105 +assert_return(() => invoke($4, `f2`, []), [value("i32", 2)]); + +// ./test/core/comments.wast:106 +assert_return(() => invoke($4, `f3`, []), [value("i32", 2)]); diff --git a/js/src/jit-test/tests/wasm/spec/gc/directives.txt b/js/src/jit-test/tests/wasm/spec/gc/directives.txt new file mode 100644 index 0000000000..c071d8b980 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-gc; skip-if: !wasmGcEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/gc/extern.wast.js b/js/src/jit-test/tests/wasm/spec/gc/extern.wast.js new file mode 100644 index 0000000000..d292e157da --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/extern.wast.js @@ -0,0 +1,101 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/extern.wast + +// ./test/core/gc/extern.wast:1 +let $0 = instantiate(`(module + (type $$ft (func)) + (type $$st (struct)) + (type $$at (array i8)) + + (table 10 anyref) + + (elem declare func $$f) + (func $$f) + + (func (export "init") (param $$x externref) + (table.set (i32.const 0) (ref.null any)) + (table.set (i32.const 1) (ref.i31 (i32.const 7))) + (table.set (i32.const 2) (struct.new_default $$st)) + (table.set (i32.const 3) (array.new_default $$at (i32.const 0))) + (table.set (i32.const 4) (any.convert_extern (local.get $$x))) + ) + + (func (export "internalize") (param externref) (result anyref) + (any.convert_extern (local.get 0)) + ) + (func (export "externalize") (param anyref) (result externref) + (extern.convert_any (local.get 0)) + ) + + (func (export "externalize-i") (param i32) (result externref) + (extern.convert_any (table.get (local.get 0))) + ) + (func (export "externalize-ii") (param i32) (result anyref) + (any.convert_extern (extern.convert_any (table.get (local.get 0)))) + ) +)`); + +// ./test/core/gc/extern.wast:34 +invoke($0, `init`, [externref(0)]); + +// ./test/core/gc/extern.wast:36 +assert_return(() => invoke($0, `internalize`, [externref(1)]), [new HostRefResult(1)]); + +// ./test/core/gc/extern.wast:37 +assert_return(() => invoke($0, `internalize`, [null]), [value('anyref', null)]); + +// ./test/core/gc/extern.wast:39 +assert_return(() => invoke($0, `externalize`, [hostref(2)]), [new ExternRefResult(2)]); + +// ./test/core/gc/extern.wast:40 +assert_return(() => invoke($0, `externalize`, [null]), [value('externref', null)]); + +// ./test/core/gc/extern.wast:42 +assert_return(() => invoke($0, `externalize-i`, [0]), [value('externref', null)]); + +// ./test/core/gc/extern.wast:43 +assert_return(() => invoke($0, `externalize-i`, [1]), [new RefWithType('externref')]); + +// ./test/core/gc/extern.wast:44 +assert_return(() => invoke($0, `externalize-i`, [2]), [new RefWithType('externref')]); + +// ./test/core/gc/extern.wast:45 +assert_return(() => invoke($0, `externalize-i`, [3]), [new RefWithType('externref')]); + +// ./test/core/gc/extern.wast:46 +assert_return(() => invoke($0, `externalize-i`, [4]), [new RefWithType('externref')]); + +// ./test/core/gc/extern.wast:47 +assert_return(() => invoke($0, `externalize-i`, [5]), [value('externref', null)]); + +// ./test/core/gc/extern.wast:49 +assert_return(() => invoke($0, `externalize-ii`, [0]), [value('anyref', null)]); + +// ./test/core/gc/extern.wast:50 +assert_return(() => invoke($0, `externalize-ii`, [1]), [new RefWithType('i31ref')]); + +// ./test/core/gc/extern.wast:51 +assert_return(() => invoke($0, `externalize-ii`, [2]), [new RefWithType('structref')]); + +// ./test/core/gc/extern.wast:52 +assert_return(() => invoke($0, `externalize-ii`, [3]), [new RefWithType('arrayref')]); + +// ./test/core/gc/extern.wast:53 +assert_return(() => invoke($0, `externalize-ii`, [4]), [new HostRefResult(0)]); + +// ./test/core/gc/extern.wast:54 +assert_return(() => invoke($0, `externalize-ii`, [5]), [value('anyref', null)]); diff --git a/js/src/jit-test/tests/wasm/spec/gc/float_literals.wast.js b/js/src/jit-test/tests/wasm/spec/gc/float_literals.wast.js new file mode 100644 index 0000000000..c352ebec75 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/float_literals.wast.js @@ -0,0 +1,776 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/float_literals.wast + +// ./test/core/float_literals.wast:3 +let $0 = instantiate(`(module + ;; f32 special values + (func (export "f32.nan") (result i32) (i32.reinterpret_f32 (f32.const nan))) + (func (export "f32.positive_nan") (result i32) (i32.reinterpret_f32 (f32.const +nan))) + (func (export "f32.negative_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan))) + (func (export "f32.plain_nan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x400000))) + (func (export "f32.informally_known_as_plain_snan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x200000))) + (func (export "f32.all_ones_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan:0x7fffff))) + (func (export "f32.misc_nan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x012345))) + (func (export "f32.misc_positive_nan") (result i32) (i32.reinterpret_f32 (f32.const +nan:0x304050))) + (func (export "f32.misc_negative_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan:0x2abcde))) + (func (export "f32.infinity") (result i32) (i32.reinterpret_f32 (f32.const inf))) + (func (export "f32.positive_infinity") (result i32) (i32.reinterpret_f32 (f32.const +inf))) + (func (export "f32.negative_infinity") (result i32) (i32.reinterpret_f32 (f32.const -inf))) + + ;; f32 numbers + (func (export "f32.zero") (result i32) (i32.reinterpret_f32 (f32.const 0x0.0p0))) + (func (export "f32.positive_zero") (result i32) (i32.reinterpret_f32 (f32.const +0x0.0p0))) + (func (export "f32.negative_zero") (result i32) (i32.reinterpret_f32 (f32.const -0x0.0p0))) + (func (export "f32.misc") (result i32) (i32.reinterpret_f32 (f32.const 0x1.921fb6p+2))) + (func (export "f32.min_positive") (result i32) (i32.reinterpret_f32 (f32.const 0x1p-149))) + (func (export "f32.min_normal") (result i32) (i32.reinterpret_f32 (f32.const 0x1p-126))) + (func (export "f32.max_finite") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffep+127))) + (func (export "f32.max_subnormal") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffcp-127))) + (func (export "f32.trailing_dot") (result i32) (i32.reinterpret_f32 (f32.const 0x1.p10))) + + ;; f32 in decimal format + (func (export "f32_dec.zero") (result i32) (i32.reinterpret_f32 (f32.const 0.0e0))) + (func (export "f32_dec.positive_zero") (result i32) (i32.reinterpret_f32 (f32.const +0.0e0))) + (func (export "f32_dec.negative_zero") (result i32) (i32.reinterpret_f32 (f32.const -0.0e0))) + (func (export "f32_dec.misc") (result i32) (i32.reinterpret_f32 (f32.const 6.28318548202514648))) + (func (export "f32_dec.min_positive") (result i32) (i32.reinterpret_f32 (f32.const 1.4013e-45))) + (func (export "f32_dec.min_normal") (result i32) (i32.reinterpret_f32 (f32.const 1.1754944e-38))) + (func (export "f32_dec.max_subnormal") (result i32) (i32.reinterpret_f32 (f32.const 1.1754942e-38))) + (func (export "f32_dec.max_finite") (result i32) (i32.reinterpret_f32 (f32.const 3.4028234e+38))) + (func (export "f32_dec.trailing_dot") (result i32) (i32.reinterpret_f32 (f32.const 1.e10))) + + ;; https://twitter.com/Archivd/status/994637336506912768 + (func (export "f32_dec.root_beer_float") (result i32) (i32.reinterpret_f32 (f32.const 1.000000119))) + + ;; f64 special values + (func (export "f64.nan") (result i64) (i64.reinterpret_f64 (f64.const nan))) + (func (export "f64.positive_nan") (result i64) (i64.reinterpret_f64 (f64.const +nan))) + (func (export "f64.negative_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan))) + (func (export "f64.plain_nan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x8000000000000))) + (func (export "f64.informally_known_as_plain_snan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x4000000000000))) + (func (export "f64.all_ones_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan:0xfffffffffffff))) + (func (export "f64.misc_nan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x0123456789abc))) + (func (export "f64.misc_positive_nan") (result i64) (i64.reinterpret_f64 (f64.const +nan:0x3040506070809))) + (func (export "f64.misc_negative_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan:0x2abcdef012345))) + (func (export "f64.infinity") (result i64) (i64.reinterpret_f64 (f64.const inf))) + (func (export "f64.positive_infinity") (result i64) (i64.reinterpret_f64 (f64.const +inf))) + (func (export "f64.negative_infinity") (result i64) (i64.reinterpret_f64 (f64.const -inf))) + + ;; f64 numbers + (func (export "f64.zero") (result i64) (i64.reinterpret_f64 (f64.const 0x0.0p0))) + (func (export "f64.positive_zero") (result i64) (i64.reinterpret_f64 (f64.const +0x0.0p0))) + (func (export "f64.negative_zero") (result i64) (i64.reinterpret_f64 (f64.const -0x0.0p0))) + (func (export "f64.misc") (result i64) (i64.reinterpret_f64 (f64.const 0x1.921fb54442d18p+2))) + (func (export "f64.min_positive") (result i64) (i64.reinterpret_f64 (f64.const 0x0.0000000000001p-1022))) + (func (export "f64.min_normal") (result i64) (i64.reinterpret_f64 (f64.const 0x1p-1022))) + (func (export "f64.max_subnormal") (result i64) (i64.reinterpret_f64 (f64.const 0x0.fffffffffffffp-1022))) + (func (export "f64.max_finite") (result i64) (i64.reinterpret_f64 (f64.const 0x1.fffffffffffffp+1023))) + (func (export "f64.trailing_dot") (result i64) (i64.reinterpret_f64 (f64.const 0x1.p100))) + + ;; f64 numbers in decimal format + (func (export "f64_dec.zero") (result i64) (i64.reinterpret_f64 (f64.const 0.0e0))) + (func (export "f64_dec.positive_zero") (result i64) (i64.reinterpret_f64 (f64.const +0.0e0))) + (func (export "f64_dec.negative_zero") (result i64) (i64.reinterpret_f64 (f64.const -0.0e0))) + (func (export "f64_dec.misc") (result i64) (i64.reinterpret_f64 (f64.const 6.28318530717958623))) + (func (export "f64_dec.min_positive") (result i64) (i64.reinterpret_f64 (f64.const 4.94066e-324))) + (func (export "f64_dec.min_normal") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072012e-308))) + (func (export "f64_dec.max_subnormal") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072011e-308))) + (func (export "f64_dec.max_finite") (result i64) (i64.reinterpret_f64 (f64.const 1.7976931348623157e+308))) + (func (export "f64_dec.trailing_dot") (result i64) (i64.reinterpret_f64 (f64.const 1.e100))) + + ;; https://twitter.com/Archivd/status/994637336506912768 + (func (export "f64_dec.root_beer_float") (result i64) (i64.reinterpret_f64 (f64.const 1.000000119))) + + (func (export "f32-dec-sep1") (result f32) (f32.const 1_000_000)) + (func (export "f32-dec-sep2") (result f32) (f32.const 1_0_0_0)) + (func (export "f32-dec-sep3") (result f32) (f32.const 100_3.141_592)) + (func (export "f32-dec-sep4") (result f32) (f32.const 99e+1_3)) + (func (export "f32-dec-sep5") (result f32) (f32.const 122_000.11_3_54E0_2_3)) + (func (export "f32-hex-sep1") (result f32) (f32.const 0xa_0f_00_99)) + (func (export "f32-hex-sep2") (result f32) (f32.const 0x1_a_A_0_f)) + (func (export "f32-hex-sep3") (result f32) (f32.const 0xa0_ff.f141_a59a)) + (func (export "f32-hex-sep4") (result f32) (f32.const 0xf0P+1_3)) + (func (export "f32-hex-sep5") (result f32) (f32.const 0x2a_f00a.1f_3_eep2_3)) + + (func (export "f64-dec-sep1") (result f64) (f64.const 1_000_000)) + (func (export "f64-dec-sep2") (result f64) (f64.const 1_0_0_0)) + (func (export "f64-dec-sep3") (result f64) (f64.const 100_3.141_592)) + (func (export "f64-dec-sep4") (result f64) (f64.const 99e-1_23)) + (func (export "f64-dec-sep5") (result f64) (f64.const 122_000.11_3_54e0_2_3)) + (func (export "f64-hex-sep1") (result f64) (f64.const 0xa_f00f_0000_9999)) + (func (export "f64-hex-sep2") (result f64) (f64.const 0x1_a_A_0_f)) + (func (export "f64-hex-sep3") (result f64) (f64.const 0xa0_ff.f141_a59a)) + (func (export "f64-hex-sep4") (result f64) (f64.const 0xf0P+1_3)) + (func (export "f64-hex-sep5") (result f64) (f64.const 0x2a_f00a.1f_3_eep2_3)) +)`); + +// ./test/core/float_literals.wast:105 +assert_return(() => invoke($0, `f32.nan`, []), [value("i32", 2143289344)]); + +// ./test/core/float_literals.wast:106 +assert_return(() => invoke($0, `f32.positive_nan`, []), [value("i32", 2143289344)]); + +// ./test/core/float_literals.wast:107 +assert_return(() => invoke($0, `f32.negative_nan`, []), [value("i32", -4194304)]); + +// ./test/core/float_literals.wast:108 +assert_return(() => invoke($0, `f32.plain_nan`, []), [value("i32", 2143289344)]); + +// ./test/core/float_literals.wast:109 +assert_return(() => invoke($0, `f32.informally_known_as_plain_snan`, []), [value("i32", 2141192192)]); + +// ./test/core/float_literals.wast:110 +assert_return(() => invoke($0, `f32.all_ones_nan`, []), [value("i32", -1)]); + +// ./test/core/float_literals.wast:111 +assert_return(() => invoke($0, `f32.misc_nan`, []), [value("i32", 2139169605)]); + +// ./test/core/float_literals.wast:112 +assert_return(() => invoke($0, `f32.misc_positive_nan`, []), [value("i32", 2142257232)]); + +// ./test/core/float_literals.wast:113 +assert_return(() => invoke($0, `f32.misc_negative_nan`, []), [value("i32", -5587746)]); + +// ./test/core/float_literals.wast:114 +assert_return(() => invoke($0, `f32.infinity`, []), [value("i32", 2139095040)]); + +// ./test/core/float_literals.wast:115 +assert_return(() => invoke($0, `f32.positive_infinity`, []), [value("i32", 2139095040)]); + +// ./test/core/float_literals.wast:116 +assert_return(() => invoke($0, `f32.negative_infinity`, []), [value("i32", -8388608)]); + +// ./test/core/float_literals.wast:117 +assert_return(() => invoke($0, `f32.zero`, []), [value("i32", 0)]); + +// ./test/core/float_literals.wast:118 +assert_return(() => invoke($0, `f32.positive_zero`, []), [value("i32", 0)]); + +// ./test/core/float_literals.wast:119 +assert_return(() => invoke($0, `f32.negative_zero`, []), [value("i32", -2147483648)]); + +// ./test/core/float_literals.wast:120 +assert_return(() => invoke($0, `f32.misc`, []), [value("i32", 1086918619)]); + +// ./test/core/float_literals.wast:121 +assert_return(() => invoke($0, `f32.min_positive`, []), [value("i32", 1)]); + +// ./test/core/float_literals.wast:122 +assert_return(() => invoke($0, `f32.min_normal`, []), [value("i32", 8388608)]); + +// ./test/core/float_literals.wast:123 +assert_return(() => invoke($0, `f32.max_subnormal`, []), [value("i32", 8388607)]); + +// ./test/core/float_literals.wast:124 +assert_return(() => invoke($0, `f32.max_finite`, []), [value("i32", 2139095039)]); + +// ./test/core/float_literals.wast:125 +assert_return(() => invoke($0, `f32.trailing_dot`, []), [value("i32", 1149239296)]); + +// ./test/core/float_literals.wast:126 +assert_return(() => invoke($0, `f32_dec.zero`, []), [value("i32", 0)]); + +// ./test/core/float_literals.wast:127 +assert_return(() => invoke($0, `f32_dec.positive_zero`, []), [value("i32", 0)]); + +// ./test/core/float_literals.wast:128 +assert_return(() => invoke($0, `f32_dec.negative_zero`, []), [value("i32", -2147483648)]); + +// ./test/core/float_literals.wast:129 +assert_return(() => invoke($0, `f32_dec.misc`, []), [value("i32", 1086918619)]); + +// ./test/core/float_literals.wast:130 +assert_return(() => invoke($0, `f32_dec.min_positive`, []), [value("i32", 1)]); + +// ./test/core/float_literals.wast:131 +assert_return(() => invoke($0, `f32_dec.min_normal`, []), [value("i32", 8388608)]); + +// ./test/core/float_literals.wast:132 +assert_return(() => invoke($0, `f32_dec.max_subnormal`, []), [value("i32", 8388607)]); + +// ./test/core/float_literals.wast:133 +assert_return(() => invoke($0, `f32_dec.max_finite`, []), [value("i32", 2139095039)]); + +// ./test/core/float_literals.wast:134 +assert_return(() => invoke($0, `f32_dec.trailing_dot`, []), [value("i32", 1343554297)]); + +// ./test/core/float_literals.wast:135 +assert_return(() => invoke($0, `f32_dec.root_beer_float`, []), [value("i32", 1065353217)]); + +// ./test/core/float_literals.wast:137 +assert_return(() => invoke($0, `f64.nan`, []), [value("i64", 9221120237041090560n)]); + +// ./test/core/float_literals.wast:138 +assert_return(() => invoke($0, `f64.positive_nan`, []), [value("i64", 9221120237041090560n)]); + +// ./test/core/float_literals.wast:139 +assert_return(() => invoke($0, `f64.negative_nan`, []), [value("i64", -2251799813685248n)]); + +// ./test/core/float_literals.wast:140 +assert_return(() => invoke($0, `f64.plain_nan`, []), [value("i64", 9221120237041090560n)]); + +// ./test/core/float_literals.wast:141 +assert_return( + () => invoke($0, `f64.informally_known_as_plain_snan`, []), + [value("i64", 9219994337134247936n)], +); + +// ./test/core/float_literals.wast:142 +assert_return(() => invoke($0, `f64.all_ones_nan`, []), [value("i64", -1n)]); + +// ./test/core/float_literals.wast:143 +assert_return(() => invoke($0, `f64.misc_nan`, []), [value("i64", 9218888453225749180n)]); + +// ./test/core/float_literals.wast:144 +assert_return(() => invoke($0, `f64.misc_positive_nan`, []), [value("i64", 9219717281780008969n)]); + +// ./test/core/float_literals.wast:145 +assert_return(() => invoke($0, `f64.misc_negative_nan`, []), [value("i64", -3751748707474619n)]); + +// ./test/core/float_literals.wast:146 +assert_return(() => invoke($0, `f64.infinity`, []), [value("i64", 9218868437227405312n)]); + +// ./test/core/float_literals.wast:147 +assert_return(() => invoke($0, `f64.positive_infinity`, []), [value("i64", 9218868437227405312n)]); + +// ./test/core/float_literals.wast:148 +assert_return(() => invoke($0, `f64.negative_infinity`, []), [value("i64", -4503599627370496n)]); + +// ./test/core/float_literals.wast:149 +assert_return(() => invoke($0, `f64.zero`, []), [value("i64", 0n)]); + +// ./test/core/float_literals.wast:150 +assert_return(() => invoke($0, `f64.positive_zero`, []), [value("i64", 0n)]); + +// ./test/core/float_literals.wast:151 +assert_return(() => invoke($0, `f64.negative_zero`, []), [value("i64", -9223372036854775808n)]); + +// ./test/core/float_literals.wast:152 +assert_return(() => invoke($0, `f64.misc`, []), [value("i64", 4618760256179416344n)]); + +// ./test/core/float_literals.wast:153 +assert_return(() => invoke($0, `f64.min_positive`, []), [value("i64", 1n)]); + +// ./test/core/float_literals.wast:154 +assert_return(() => invoke($0, `f64.min_normal`, []), [value("i64", 4503599627370496n)]); + +// ./test/core/float_literals.wast:155 +assert_return(() => invoke($0, `f64.max_subnormal`, []), [value("i64", 4503599627370495n)]); + +// ./test/core/float_literals.wast:156 +assert_return(() => invoke($0, `f64.max_finite`, []), [value("i64", 9218868437227405311n)]); + +// ./test/core/float_literals.wast:157 +assert_return(() => invoke($0, `f64.trailing_dot`, []), [value("i64", 5057542381537067008n)]); + +// ./test/core/float_literals.wast:158 +assert_return(() => invoke($0, `f64_dec.zero`, []), [value("i64", 0n)]); + +// ./test/core/float_literals.wast:159 +assert_return(() => invoke($0, `f64_dec.positive_zero`, []), [value("i64", 0n)]); + +// ./test/core/float_literals.wast:160 +assert_return(() => invoke($0, `f64_dec.negative_zero`, []), [value("i64", -9223372036854775808n)]); + +// ./test/core/float_literals.wast:161 +assert_return(() => invoke($0, `f64_dec.misc`, []), [value("i64", 4618760256179416344n)]); + +// ./test/core/float_literals.wast:162 +assert_return(() => invoke($0, `f64_dec.min_positive`, []), [value("i64", 1n)]); + +// ./test/core/float_literals.wast:163 +assert_return(() => invoke($0, `f64_dec.min_normal`, []), [value("i64", 4503599627370496n)]); + +// ./test/core/float_literals.wast:164 +assert_return(() => invoke($0, `f64_dec.max_subnormal`, []), [value("i64", 4503599627370495n)]); + +// ./test/core/float_literals.wast:165 +assert_return(() => invoke($0, `f64_dec.max_finite`, []), [value("i64", 9218868437227405311n)]); + +// ./test/core/float_literals.wast:166 +assert_return(() => invoke($0, `f64_dec.trailing_dot`, []), [value("i64", 6103021453049119613n)]); + +// ./test/core/float_literals.wast:167 +assert_return(() => invoke($0, `f64_dec.root_beer_float`, []), [value("i64", 4607182419335945764n)]); + +// ./test/core/float_literals.wast:169 +assert_return(() => invoke($0, `f32-dec-sep1`, []), [value("f32", 1000000)]); + +// ./test/core/float_literals.wast:170 +assert_return(() => invoke($0, `f32-dec-sep2`, []), [value("f32", 1000)]); + +// ./test/core/float_literals.wast:171 +assert_return(() => invoke($0, `f32-dec-sep3`, []), [value("f32", 1003.1416)]); + +// ./test/core/float_literals.wast:172 +assert_return(() => invoke($0, `f32-dec-sep4`, []), [value("f32", 990000000000000)]); + +// ./test/core/float_literals.wast:173 +assert_return(() => invoke($0, `f32-dec-sep5`, []), [value("f32", 12200012000000000000000000000)]); + +// ./test/core/float_literals.wast:174 +assert_return(() => invoke($0, `f32-hex-sep1`, []), [value("f32", 168755360)]); + +// ./test/core/float_literals.wast:175 +assert_return(() => invoke($0, `f32-hex-sep2`, []), [value("f32", 109071)]); + +// ./test/core/float_literals.wast:176 +assert_return(() => invoke($0, `f32-hex-sep3`, []), [value("f32", 41215.94)]); + +// ./test/core/float_literals.wast:177 +assert_return(() => invoke($0, `f32-hex-sep4`, []), [value("f32", 1966080)]); + +// ./test/core/float_literals.wast:178 +assert_return(() => invoke($0, `f32-hex-sep5`, []), [value("f32", 23605224000000)]); + +// ./test/core/float_literals.wast:180 +assert_return(() => invoke($0, `f64-dec-sep1`, []), [value("f64", 1000000)]); + +// ./test/core/float_literals.wast:181 +assert_return(() => invoke($0, `f64-dec-sep2`, []), [value("f64", 1000)]); + +// ./test/core/float_literals.wast:182 +assert_return(() => invoke($0, `f64-dec-sep3`, []), [value("f64", 1003.141592)]); + +// ./test/core/float_literals.wast:183 +assert_return( + () => invoke($0, `f64-dec-sep4`, []), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000099), + ], +); + +// ./test/core/float_literals.wast:184 +assert_return(() => invoke($0, `f64-dec-sep5`, []), [value("f64", 12200011354000000000000000000)]); + +// ./test/core/float_literals.wast:185 +assert_return(() => invoke($0, `f64-hex-sep1`, []), [value("f64", 3078696982321561)]); + +// ./test/core/float_literals.wast:186 +assert_return(() => invoke($0, `f64-hex-sep2`, []), [value("f64", 109071)]); + +// ./test/core/float_literals.wast:187 +assert_return(() => invoke($0, `f64-hex-sep3`, []), [value("f64", 41215.94240794191)]); + +// ./test/core/float_literals.wast:188 +assert_return(() => invoke($0, `f64-hex-sep4`, []), [value("f64", 1966080)]); + +// ./test/core/float_literals.wast:189 +assert_return(() => invoke($0, `f64-hex-sep5`, []), [value("f64", 23605225168752)]); + +// ./test/core/float_literals.wast:192 +let $1 = instantiate(`(module binary + ;; (func (export "4294967249") (result f64) (f64.const 4294967249)) + "\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\85\\80\\80\\80\\00\\01\\60" + "\\00\\01\\7c\\03\\82\\80\\80\\80\\00\\01\\00\\07\\8e\\80\\80\\80" + "\\00\\01\\0a\\34\\32\\39\\34\\39\\36\\37\\32\\34\\39\\00\\00\\0a" + "\\91\\80\\80\\80\\00\\01\\8b\\80\\80\\80\\00\\00\\44\\00\\00\\20" + "\\fa\\ff\\ff\\ef\\41\\0b" +)`); + +// ./test/core/float_literals.wast:201 +assert_return(() => invoke($1, `4294967249`, []), [value("f64", 4294967249)]); + +// ./test/core/float_literals.wast:203 +assert_malformed(() => instantiate(`(global f32 (f32.const _100)) `), `unknown operator`); + +// ./test/core/float_literals.wast:207 +assert_malformed(() => instantiate(`(global f32 (f32.const +_100)) `), `unknown operator`); + +// ./test/core/float_literals.wast:211 +assert_malformed(() => instantiate(`(global f32 (f32.const -_100)) `), `unknown operator`); + +// ./test/core/float_literals.wast:215 +assert_malformed(() => instantiate(`(global f32 (f32.const 99_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:219 +assert_malformed( + () => instantiate(`(global f32 (f32.const 1__000)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:223 +assert_malformed(() => instantiate(`(global f32 (f32.const _1.0)) `), `unknown operator`); + +// ./test/core/float_literals.wast:227 +assert_malformed(() => instantiate(`(global f32 (f32.const 1.0_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:231 +assert_malformed(() => instantiate(`(global f32 (f32.const 1_.0)) `), `unknown operator`); + +// ./test/core/float_literals.wast:235 +assert_malformed(() => instantiate(`(global f32 (f32.const 1._0)) `), `unknown operator`); + +// ./test/core/float_literals.wast:239 +assert_malformed(() => instantiate(`(global f32 (f32.const _1e1)) `), `unknown operator`); + +// ./test/core/float_literals.wast:243 +assert_malformed(() => instantiate(`(global f32 (f32.const 1e1_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:247 +assert_malformed(() => instantiate(`(global f32 (f32.const 1_e1)) `), `unknown operator`); + +// ./test/core/float_literals.wast:251 +assert_malformed(() => instantiate(`(global f32 (f32.const 1e_1)) `), `unknown operator`); + +// ./test/core/float_literals.wast:255 +assert_malformed( + () => instantiate(`(global f32 (f32.const _1.0e1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:259 +assert_malformed( + () => instantiate(`(global f32 (f32.const 1.0e1_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:263 +assert_malformed( + () => instantiate(`(global f32 (f32.const 1.0_e1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:267 +assert_malformed( + () => instantiate(`(global f32 (f32.const 1.0e_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:271 +assert_malformed( + () => instantiate(`(global f32 (f32.const 1.0e+_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:275 +assert_malformed( + () => instantiate(`(global f32 (f32.const 1.0e_+1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:279 +assert_malformed( + () => instantiate(`(global f32 (f32.const _0x100)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:283 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0_x100)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:287 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x_100)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:291 +assert_malformed(() => instantiate(`(global f32 (f32.const 0x00_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:295 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0xff__ffff)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:299 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x_1.0)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:303 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1.0_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:307 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1_.0)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:311 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1._0)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:315 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x_1p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:319 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1p1_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:323 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1_p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:327 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1p_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:331 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x_1.0p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:335 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1.0p1_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:339 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1.0_p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:343 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1.0p_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:347 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1.0p+_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:351 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1.0p_+1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:355 +assert_malformed( + () => instantiate(`(global f32 (f32.const nan:0x80_0000)) `), + `constant out of range`, +); + +// ./test/core/float_literals.wast:360 +assert_malformed(() => instantiate(`(global f64 (f64.const _100)) `), `unknown operator`); + +// ./test/core/float_literals.wast:364 +assert_malformed(() => instantiate(`(global f64 (f64.const +_100)) `), `unknown operator`); + +// ./test/core/float_literals.wast:368 +assert_malformed(() => instantiate(`(global f64 (f64.const -_100)) `), `unknown operator`); + +// ./test/core/float_literals.wast:372 +assert_malformed(() => instantiate(`(global f64 (f64.const 99_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:376 +assert_malformed( + () => instantiate(`(global f64 (f64.const 1__000)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:380 +assert_malformed(() => instantiate(`(global f64 (f64.const _1.0)) `), `unknown operator`); + +// ./test/core/float_literals.wast:384 +assert_malformed(() => instantiate(`(global f64 (f64.const 1.0_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:388 +assert_malformed(() => instantiate(`(global f64 (f64.const 1_.0)) `), `unknown operator`); + +// ./test/core/float_literals.wast:392 +assert_malformed(() => instantiate(`(global f64 (f64.const 1._0)) `), `unknown operator`); + +// ./test/core/float_literals.wast:396 +assert_malformed(() => instantiate(`(global f64 (f64.const _1e1)) `), `unknown operator`); + +// ./test/core/float_literals.wast:400 +assert_malformed(() => instantiate(`(global f64 (f64.const 1e1_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:404 +assert_malformed(() => instantiate(`(global f64 (f64.const 1_e1)) `), `unknown operator`); + +// ./test/core/float_literals.wast:408 +assert_malformed(() => instantiate(`(global f64 (f64.const 1e_1)) `), `unknown operator`); + +// ./test/core/float_literals.wast:412 +assert_malformed( + () => instantiate(`(global f64 (f64.const _1.0e1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:416 +assert_malformed( + () => instantiate(`(global f64 (f64.const 1.0e1_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:420 +assert_malformed( + () => instantiate(`(global f64 (f64.const 1.0_e1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:424 +assert_malformed( + () => instantiate(`(global f64 (f64.const 1.0e_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:428 +assert_malformed( + () => instantiate(`(global f64 (f64.const 1.0e+_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:432 +assert_malformed( + () => instantiate(`(global f64 (f64.const 1.0e_+1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:436 +assert_malformed( + () => instantiate(`(global f64 (f64.const _0x100)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:440 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0_x100)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:444 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x_100)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:448 +assert_malformed(() => instantiate(`(global f64 (f64.const 0x00_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:452 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0xff__ffff)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:456 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x_1.0)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:460 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1.0_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:464 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1_.0)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:468 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1._0)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:472 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x_1p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:476 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1p1_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:480 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1_p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:484 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1p_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:488 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x_1.0p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:492 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1.0p1_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:496 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1.0_p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:500 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1.0p_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:504 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1.0p+_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:508 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1.0p_+1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:512 +assert_malformed( + () => instantiate(`(global f64 (f64.const nan:0x10_0000_0000_0000)) `), + `constant out of range`, +); diff --git a/js/src/jit-test/tests/wasm/spec/gc/global.wast.js b/js/src/jit-test/tests/wasm/spec/gc/global.wast.js new file mode 100644 index 0000000000..21ace9e66d --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/global.wast.js @@ -0,0 +1,869 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/global.wast + +// ./test/core/global.wast:3 +let $0 = instantiate(`(module + (global (import "spectest" "global_i32") i32) + (global (import "spectest" "global_i64") i64) + + (global $$a i32 (i32.const -2)) + (global (;3;) f32 (f32.const -3)) + (global (;4;) f64 (f64.const -4)) + (global $$b i64 (i64.const -5)) + + (global $$x (mut i32) (i32.const -12)) + (global (;7;) (mut f32) (f32.const -13)) + (global (;8;) (mut f64) (f64.const -14)) + (global $$y (mut i64) (i64.const -15)) + + (global $$z1 i32 (global.get 0)) + (global $$z2 i64 (global.get 1)) + + (global $$r externref (ref.null extern)) + (global $$mr (mut externref) (ref.null extern)) + (global funcref (ref.null func)) + + (func (export "get-a") (result i32) (global.get $$a)) + (func (export "get-b") (result i64) (global.get $$b)) + (func (export "get-r") (result externref) (global.get $$r)) + (func (export "get-mr") (result externref) (global.get $$mr)) + (func (export "get-x") (result i32) (global.get $$x)) + (func (export "get-y") (result i64) (global.get $$y)) + (func (export "get-z1") (result i32) (global.get $$z1)) + (func (export "get-z2") (result i64) (global.get $$z2)) + (func (export "set-x") (param i32) (global.set $$x (local.get 0))) + (func (export "set-y") (param i64) (global.set $$y (local.get 0))) + (func (export "set-mr") (param externref) (global.set $$mr (local.get 0))) + + (func (export "get-3") (result f32) (global.get 3)) + (func (export "get-4") (result f64) (global.get 4)) + (func (export "get-7") (result f32) (global.get 7)) + (func (export "get-8") (result f64) (global.get 8)) + (func (export "set-7") (param f32) (global.set 7 (local.get 0))) + (func (export "set-8") (param f64) (global.set 8 (local.get 0))) + + ;; As the argument of control constructs and instructions + + (memory 1) + + (func $$dummy) + + (func (export "as-select-first") (result i32) + (select (global.get $$x) (i32.const 2) (i32.const 3)) + ) + (func (export "as-select-mid") (result i32) + (select (i32.const 2) (global.get $$x) (i32.const 3)) + ) + (func (export "as-select-last") (result i32) + (select (i32.const 2) (i32.const 3) (global.get $$x)) + ) + + (func (export "as-loop-first") (result i32) + (loop (result i32) + (global.get $$x) (call $$dummy) (call $$dummy) + ) + ) + (func (export "as-loop-mid") (result i32) + (loop (result i32) + (call $$dummy) (global.get $$x) (call $$dummy) + ) + ) + (func (export "as-loop-last") (result i32) + (loop (result i32) + (call $$dummy) (call $$dummy) (global.get $$x) + ) + ) + + (func (export "as-if-condition") (result i32) + (if (result i32) (global.get $$x) + (then (call $$dummy) (i32.const 2)) + (else (call $$dummy) (i32.const 3)) + ) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) + (then (global.get $$x)) (else (i32.const 2)) + ) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 0) + (then (i32.const 2)) (else (global.get $$x)) + ) + ) + + (func (export "as-br_if-first") (result i32) + (block (result i32) + (br_if 0 (global.get $$x) (i32.const 2)) + (return (i32.const 3)) + ) + ) + (func (export "as-br_if-last") (result i32) + (block (result i32) + (br_if 0 (i32.const 2) (global.get $$x)) + (return (i32.const 3)) + ) + ) + + (func (export "as-br_table-first") (result i32) + (block (result i32) + (global.get $$x) (i32.const 2) (br_table 0 0) + ) + ) + (func (export "as-br_table-last") (result i32) + (block (result i32) + (i32.const 2) (global.get $$x) (br_table 0 0) + ) + ) + + (func $$func (param i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (call_indirect (type $$check) + (global.get $$x) (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (global.get $$x) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (i32.const 0) (global.get $$x) + ) + ) + ) + + (func (export "as-store-first") + (global.get $$x) (i32.const 1) (i32.store) + ) + (func (export "as-store-last") + (i32.const 0) (global.get $$x) (i32.store) + ) + (func (export "as-load-operand") (result i32) + (i32.load (global.get $$x)) + ) + (func (export "as-memory.grow-value") (result i32) + (memory.grow (global.get $$x)) + ) + + (func $$f (param i32) (result i32) (local.get 0)) + (func (export "as-call-value") (result i32) + (call $$f (global.get $$x)) + ) + + (func (export "as-return-value") (result i32) + (global.get $$x) (return) + ) + (func (export "as-drop-operand") + (drop (global.get $$x)) + ) + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (global.get $$x))) + ) + + (func (export "as-local.set-value") (param i32) (result i32) + (local.set 0 (global.get $$x)) + (local.get 0) + ) + (func (export "as-local.tee-value") (param i32) (result i32) + (local.tee 0 (global.get $$x)) + ) + (func (export "as-global.set-value") (result i32) + (global.set $$x (global.get $$x)) + (global.get $$x) + ) + + (func (export "as-unary-operand") (result i32) + (i32.eqz (global.get $$x)) + ) + (func (export "as-binary-operand") (result i32) + (i32.mul + (global.get $$x) (global.get $$x) + ) + ) + (func (export "as-compare-operand") (result i32) + (i32.gt_u + (global.get 0) (i32.const 1) + ) + ) +)`); + +// ./test/core/global.wast:196 +assert_return(() => invoke($0, `get-a`, []), [value("i32", -2)]); + +// ./test/core/global.wast:197 +assert_return(() => invoke($0, `get-b`, []), [value("i64", -5n)]); + +// ./test/core/global.wast:198 +assert_return(() => invoke($0, `get-r`, []), [value('externref', null)]); + +// ./test/core/global.wast:199 +assert_return(() => invoke($0, `get-mr`, []), [value('externref', null)]); + +// ./test/core/global.wast:200 +assert_return(() => invoke($0, `get-x`, []), [value("i32", -12)]); + +// ./test/core/global.wast:201 +assert_return(() => invoke($0, `get-y`, []), [value("i64", -15n)]); + +// ./test/core/global.wast:202 +assert_return(() => invoke($0, `get-z1`, []), [value("i32", 666)]); + +// ./test/core/global.wast:203 +assert_return(() => invoke($0, `get-z2`, []), [value("i64", 666n)]); + +// ./test/core/global.wast:205 +assert_return(() => invoke($0, `get-3`, []), [value("f32", -3)]); + +// ./test/core/global.wast:206 +assert_return(() => invoke($0, `get-4`, []), [value("f64", -4)]); + +// ./test/core/global.wast:207 +assert_return(() => invoke($0, `get-7`, []), [value("f32", -13)]); + +// ./test/core/global.wast:208 +assert_return(() => invoke($0, `get-8`, []), [value("f64", -14)]); + +// ./test/core/global.wast:210 +assert_return(() => invoke($0, `set-x`, [6]), []); + +// ./test/core/global.wast:211 +assert_return(() => invoke($0, `set-y`, [7n]), []); + +// ./test/core/global.wast:213 +assert_return(() => invoke($0, `set-7`, [value("f32", 8)]), []); + +// ./test/core/global.wast:214 +assert_return(() => invoke($0, `set-8`, [value("f64", 9)]), []); + +// ./test/core/global.wast:216 +assert_return(() => invoke($0, `get-x`, []), [value("i32", 6)]); + +// ./test/core/global.wast:217 +assert_return(() => invoke($0, `get-y`, []), [value("i64", 7n)]); + +// ./test/core/global.wast:218 +assert_return(() => invoke($0, `get-7`, []), [value("f32", 8)]); + +// ./test/core/global.wast:219 +assert_return(() => invoke($0, `get-8`, []), [value("f64", 9)]); + +// ./test/core/global.wast:221 +assert_return(() => invoke($0, `set-7`, [value("f32", 8)]), []); + +// ./test/core/global.wast:222 +assert_return(() => invoke($0, `set-8`, [value("f64", 9)]), []); + +// ./test/core/global.wast:223 +assert_return(() => invoke($0, `set-mr`, [externref(10)]), []); + +// ./test/core/global.wast:225 +assert_return(() => invoke($0, `get-x`, []), [value("i32", 6)]); + +// ./test/core/global.wast:226 +assert_return(() => invoke($0, `get-y`, []), [value("i64", 7n)]); + +// ./test/core/global.wast:227 +assert_return(() => invoke($0, `get-7`, []), [value("f32", 8)]); + +// ./test/core/global.wast:228 +assert_return(() => invoke($0, `get-8`, []), [value("f64", 9)]); + +// ./test/core/global.wast:229 +assert_return(() => invoke($0, `get-mr`, []), [new ExternRefResult(10)]); + +// ./test/core/global.wast:231 +assert_return(() => invoke($0, `as-select-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:232 +assert_return(() => invoke($0, `as-select-mid`, []), [value("i32", 2)]); + +// ./test/core/global.wast:233 +assert_return(() => invoke($0, `as-select-last`, []), [value("i32", 2)]); + +// ./test/core/global.wast:235 +assert_return(() => invoke($0, `as-loop-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:236 +assert_return(() => invoke($0, `as-loop-mid`, []), [value("i32", 6)]); + +// ./test/core/global.wast:237 +assert_return(() => invoke($0, `as-loop-last`, []), [value("i32", 6)]); + +// ./test/core/global.wast:239 +assert_return(() => invoke($0, `as-if-condition`, []), [value("i32", 2)]); + +// ./test/core/global.wast:240 +assert_return(() => invoke($0, `as-if-then`, []), [value("i32", 6)]); + +// ./test/core/global.wast:241 +assert_return(() => invoke($0, `as-if-else`, []), [value("i32", 6)]); + +// ./test/core/global.wast:243 +assert_return(() => invoke($0, `as-br_if-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:244 +assert_return(() => invoke($0, `as-br_if-last`, []), [value("i32", 2)]); + +// ./test/core/global.wast:246 +assert_return(() => invoke($0, `as-br_table-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:247 +assert_return(() => invoke($0, `as-br_table-last`, []), [value("i32", 2)]); + +// ./test/core/global.wast:249 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:250 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 2)]); + +// ./test/core/global.wast:251 +assert_trap(() => invoke($0, `as-call_indirect-last`, []), `undefined element`); + +// ./test/core/global.wast:253 +assert_return(() => invoke($0, `as-store-first`, []), []); + +// ./test/core/global.wast:254 +assert_return(() => invoke($0, `as-store-last`, []), []); + +// ./test/core/global.wast:255 +assert_return(() => invoke($0, `as-load-operand`, []), [value("i32", 1)]); + +// ./test/core/global.wast:256 +assert_return(() => invoke($0, `as-memory.grow-value`, []), [value("i32", 1)]); + +// ./test/core/global.wast:258 +assert_return(() => invoke($0, `as-call-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:260 +assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:261 +assert_return(() => invoke($0, `as-drop-operand`, []), []); + +// ./test/core/global.wast:262 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:264 +assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 6)]); + +// ./test/core/global.wast:265 +assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 6)]); + +// ./test/core/global.wast:266 +assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:268 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("i32", 0)]); + +// ./test/core/global.wast:269 +assert_return(() => invoke($0, `as-binary-operand`, []), [value("i32", 36)]); + +// ./test/core/global.wast:270 +assert_return(() => invoke($0, `as-compare-operand`, []), [value("i32", 1)]); + +// ./test/core/global.wast:272 +assert_invalid( + () => instantiate(`(module (global f32 (f32.const 0)) (func (global.set 0 (f32.const 1))))`), + `immutable global`, +); + +// ./test/core/global.wast:277 +assert_invalid( + () => instantiate(`(module (import "spectest" "global_i32" (global i32)) (func (global.set 0 (i32.const 1))))`), + `immutable global`, +); + +// ./test/core/global.wast:283 +let $1 = instantiate(`(module (global (mut f32) (f32.const 0)) (export "a" (global 0)))`); + +// ./test/core/global.wast:284 +let $2 = instantiate(`(module (global (export "a") (mut f32) (f32.const 0)))`); + +// ./test/core/global.wast:286 +assert_invalid( + () => instantiate(`(module (global f32 (f32.neg (f32.const 0))))`), + `constant expression required`, +); + +// ./test/core/global.wast:291 +assert_invalid( + () => instantiate(`(module (global f32 (local.get 0)))`), + `constant expression required`, +); + +// ./test/core/global.wast:296 +assert_invalid( + () => instantiate(`(module (global f32 (f32.neg (f32.const 1))))`), + `constant expression required`, +); + +// ./test/core/global.wast:301 +assert_invalid( + () => instantiate(`(module (global i32 (i32.const 0) (nop)))`), + `constant expression required`, +); + +// ./test/core/global.wast:306 +assert_invalid( + () => instantiate(`(module (global i32 (i32.ctz (i32.const 0))))`), + `constant expression required`, +); + +// ./test/core/global.wast:311 +assert_invalid( + () => instantiate(`(module (global i32 (nop)))`), + `constant expression required`, +); + +// ./test/core/global.wast:316 +assert_invalid(() => instantiate(`(module (global i32 (f32.const 0)))`), `type mismatch`); + +// ./test/core/global.wast:321 +assert_invalid( + () => instantiate(`(module (global i32 (i32.const 0) (i32.const 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:326 +assert_invalid( + () => instantiate(`(module (global i32 (;empty instruction sequence;)))`), + `type mismatch`, +); + +// ./test/core/global.wast:331 +assert_invalid( + () => instantiate(`(module (global (import "" "") externref) (global funcref (global.get 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:336 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-i32") i32) (global i32 (global.get 0) (global.get 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:341 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-i32") i32) (global i32 (i32.const 0) (global.get 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:346 +assert_invalid( + () => instantiate(`(module (global i32 (global.get 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:351 +assert_invalid( + () => instantiate(`(module (global i32 (global.get 1)) (global i32 (i32.const 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:356 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-i32") i32) (global i32 (global.get 2)))`), + `unknown global`, +); + +// ./test/core/global.wast:361 +let $3 = instantiate(`(module (global i32 (i32.const 0)) (global i32 (global.get 0)))`); + +// ./test/core/global.wast:362 +let $4 = instantiate(`(module (global $$g i32 (i32.const 0)) (global i32 (global.get $$g)))`); + +// ./test/core/global.wast:364 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-mut-i32") (mut i32)) (global i32 (global.get 0)))`), + `constant expression required`, +); + +// ./test/core/global.wast:369 +let $5 = instantiate(`(module + (import "spectest" "global_i32" (global i32)) +)`); + +// ./test/core/global.wast:372 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\98\\80\\80\\80\\00" ;; import section + "\\01" ;; length 1 + "\\08\\73\\70\\65\\63\\74\\65\\73\\74" ;; "spectest" + "\\0a\\67\\6c\\6f\\62\\61\\6c\\5f\\69\\33\\32" ;; "global_i32" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\02" ;; malformed mutability + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:385 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\98\\80\\80\\80\\00" ;; import section + "\\01" ;; length 1 + "\\08\\73\\70\\65\\63\\74\\65\\73\\74" ;; "spectest" + "\\0a\\67\\6c\\6f\\62\\61\\6c\\5f\\69\\33\\32" ;; "global_i32" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\ff" ;; malformed mutability + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:399 +let $6 = instantiate(`(module + (global i32 (i32.const 0)) +)`); + +// ./test/core/global.wast:402 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\06\\86\\80\\80\\80\\00" ;; global section + "\\01" ;; length 1 + "\\7f" ;; i32 + "\\02" ;; malformed mutability + "\\41\\00" ;; i32.const 0 + "\\0b" ;; end + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:414 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\06\\86\\80\\80\\80\\00" ;; global section + "\\01" ;; length 1 + "\\7f" ;; i32 + "\\ff" ;; malformed mutability + "\\41\\00" ;; i32.const 0 + "\\0b" ;; end + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:428 +assert_invalid( + () => instantiate(`(module (func (result i32) (global.get 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:433 +assert_invalid( + () => instantiate(`(module + (global i32 (i32.const 0)) + (func (result i32) (global.get 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:441 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (func (result i32) (global.get 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:449 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (global i32 (i32.const 0)) + (func (result i32) (global.get 2)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:459 +assert_invalid( + () => instantiate(`(module (func (i32.const 0) (global.set 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:464 +assert_invalid( + () => instantiate(`(module + (global i32 (i32.const 0)) + (func (i32.const 0) (global.set 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:472 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (func (i32.const 0) (global.set 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:480 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (global i32 (i32.const 0)) + (func (i32.const 0) (global.set 2)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:490 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty + (global.set $$x) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:499 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-block + (i32.const 0) + (block (global.set $$x)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:509 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-loop + (i32.const 0) + (loop (global.set $$x)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:519 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:529 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:539 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-br + (i32.const 0) + (block (br 0 (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:549 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-br_if + (i32.const 0) + (block (br_if 0 (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:559 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-br_table + (i32.const 0) + (block (br_table 0 (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:569 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-return + (return (global.set $$x)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:578 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-select + (select (global.set $$x) (i32.const 1) (i32.const 2)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:587 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-call + (call 1 (global.set $$x)) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:597 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-global.set-value-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (global.set $$x) (i32.const 0) + ) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:617 +let $7 = instantiate(`(module + (global (export "g") i32 (i32.const 4)) +)`); + +// ./test/core/global.wast:620 +register($7, `G`); + +// ./test/core/global.wast:622 +let $8 = instantiate(`(module + (global $$g0 (import "G" "g") i32) + (global $$g1 i32 (i32.const 8)) + (global $$g2 i32 (global.get $$g0)) + (global $$g3 i32 (global.get $$g1)) + + (global $$gf funcref (ref.func $$f)) + (func $$f) + + (table $$t 10 funcref (ref.null func)) + (elem (table $$t) (global.get $$g2) funcref (ref.func $$f)) + (elem (table $$t) (global.get $$g3) funcref (global.get $$gf)) + + (memory $$m 1) + (data (global.get $$g2) "\\44\\44\\44\\44") + (data (global.get $$g3) "\\88\\88\\88\\88") + + (func (export "get-elem") (param $$i i32) (result funcref) + (table.get $$t (local.get $$i)) + ) + (func (export "get-data") (param $$i i32) (result i32) + (i32.load (local.get $$i)) + ) +)`); + +// ./test/core/global.wast:647 +assert_return(() => invoke($8, `get-elem`, [0]), [null]); + +// ./test/core/global.wast:648 +assert_return(() => invoke($8, `get-elem`, [4]), [new RefWithType('funcref')]); + +// ./test/core/global.wast:649 +assert_return(() => invoke($8, `get-elem`, [8]), [new RefWithType('funcref')]); + +// ./test/core/global.wast:651 +assert_return(() => invoke($8, `get-data`, [4]), [value("i32", 1145324612)]); + +// ./test/core/global.wast:652 +assert_return(() => invoke($8, `get-data`, [8]), [value("i32", -2004318072)]); + +// ./test/core/global.wast:654 +assert_invalid( + () => instantiate(`(module + (global $$g1 i32 (global.get $$g2)) + (global $$g2 i32 (i32.const 0)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:662 +assert_invalid( + () => instantiate(`(module + (global $$g funcref (ref.null func)) + (table $$t 10 funcref (global.get $$g)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:673 +assert_malformed( + () => instantiate(`(global $$foo i32 (i32.const 0)) (global $$foo i32 (i32.const 0)) `), + `duplicate global`, +); + +// ./test/core/global.wast:680 +assert_malformed( + () => instantiate(`(import "" "" (global $$foo i32)) (global $$foo i32 (i32.const 0)) `), + `duplicate global`, +); + +// ./test/core/global.wast:687 +assert_malformed( + () => instantiate(`(import "" "" (global $$foo i32)) (import "" "" (global $$foo i32)) `), + `duplicate global`, +); diff --git a/js/src/jit-test/tests/wasm/spec/gc/harness/directives.txt b/js/src/jit-test/tests/wasm/spec/gc/harness/directives.txt new file mode 100644 index 0000000000..d41243abbb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/harness/directives.txt @@ -0,0 +1 @@ +|jit-test| skip-if: true \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/gc/harness/harness.js b/js/src/jit-test/tests/wasm/spec/gc/harness/harness.js new file mode 100644 index 0000000000..a96781e8ed --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/harness/harness.js @@ -0,0 +1,448 @@ +"use strict"; + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +if (!wasmIsSupported()) { + quit(); +} + +function bytes(type, bytes) { + var typedBuffer = new Uint8Array(bytes); + return wasmGlobalFromArrayBuffer(type, typedBuffer.buffer); +} +function value(type, value) { + return new WebAssembly.Global({ + value: type, + mutable: false, + }, value); +} + +function i8x16(elements) { + let typedBuffer = new Uint8Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i16x8(elements) { + let typedBuffer = new Uint16Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i32x4(elements) { + let typedBuffer = new Uint32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i64x2(elements) { + let typedBuffer = new BigUint64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f32x4(elements) { + let typedBuffer = new Float32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f64x2(elements) { + let typedBuffer = new Float64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} + +function either(...arr) { + return new EitherVariants(arr); +} + +class F32x4Pattern { + constructor(x, y, z, w) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } +} + +class F64x2Pattern { + constructor(x, y) { + this.x = x; + this.y = y; + } +} + +class RefWithType { + constructor(type) { + this.type = type; + } + + formatExpected() { + return `RefWithType(${this.type})`; + } + + test(refGlobal) { + try { + new WebAssembly.Global({value: this.type}, refGlobal.value); + return true; + } catch (err) { + assertEq(err instanceof TypeError, true, `wrong type of error when creating global: ${err}`); + assertEq(!!err.message.match(/can only pass/), true, `wrong type of error when creating global: ${err}`); + return false; + } + } +} + +// ref.extern values created by spec tests will be JS objects of the form +// { [externsym]: }. Other externref values are possible to observe +// if extern.convert_any is used. +let externsym = Symbol("externref"); +function externref(s) { + return { [externsym]: s }; +} +function is_externref(x) { + return (x !== null && externsym in x) ? 1 : 0; +} +function is_funcref(x) { + return typeof x === "function" ? 1 : 0; +} +function eq_externref(x, y) { + return x === y ? 1 : 0; +} +function eq_funcref(x, y) { + return x === y ? 1 : 0; +} + +class ExternRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.extern ${this.n}`; + } + + test(global) { + // the global's value can either be an externref or just a plain old JS number + let result = global.value; + if (typeof global.value === "object" && externsym in global.value) { + result = global.value[externsym]; + } + return result === this.n; + } +} + +// ref.host values created by spectests will be whatever the JS API does to +// convert the given value to anyref. It should implicitly be like any.convert_extern. +function hostref(v) { + if (!wasmGcEnabled()) { + throw new Error("ref.host only works when wasm GC is enabled"); + } + + const { internalizeNum } = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(`(module + (func (import "test" "coerce") (param i32) (result anyref)) + (func (export "internalizeNum") (param i32) (result anyref) + (call 0 (local.get 0)) + ) + )`)), + { "test": { "coerce": x => x } }, + ).exports; + return internalizeNum(v); +} + +class HostRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.host ${this.n}`; + } + + test(externrefGlobal) { + assertEq(externsym in externrefGlobal.value, true, `HostRefResult only works with externref inputs`); + return externrefGlobal.value[externsym] === this.n; + } +} + +let spectest = { + externref: externref, + is_externref: is_externref, + is_funcref: is_funcref, + eq_externref: eq_externref, + eq_funcref: eq_funcref, + print: console.log.bind(console), + print_i32: console.log.bind(console), + print_i32_f32: console.log.bind(console), + print_f64_f64: console.log.bind(console), + print_f32: console.log.bind(console), + print_f64: console.log.bind(console), + global_i32: 666, + global_i64: 666n, + global_f32: 666, + global_f64: 666, + table: new WebAssembly.Table({ + initial: 10, + maximum: 20, + element: "anyfunc", + }), + memory: new WebAssembly.Memory({ initial: 1, maximum: 2 }), +}; + +let linkage = { + spectest, +}; + +function getInstance(instanceish) { + if (typeof instanceish === "string") { + assertEq( + instanceish in linkage, + true, + `'${instanceish}'' must be registered`, + ); + return linkage[instanceish]; + } + return instanceish; +} + +function instantiate(source) { + let bytecode = wasmTextToBinary(source); + let module = new WebAssembly.Module(bytecode); + let instance = new WebAssembly.Instance(module, linkage); + return instance.exports; +} + +function register(instanceish, name) { + linkage[name] = getInstance(instanceish); +} + +function invoke(instanceish, field, params) { + let func = getInstance(instanceish)[field]; + assertEq(func instanceof Function, true, "expected a function"); + return wasmLosslessInvoke(func, ...params); +} + +function get(instanceish, field) { + let global = getInstance(instanceish)[field]; + assertEq( + global instanceof WebAssembly.Global, + true, + "expected a WebAssembly.Global", + ); + return global; +} + +function assert_trap(thunk, message) { + try { + thunk(); + throw new Error("expected trap"); + } catch (err) { + if (err instanceof WebAssembly.RuntimeError) { + return; + } + throw err; + } +} + +let StackOverflow; +try { + (function f() { + 1 + f(); + })(); +} catch (e) { + StackOverflow = e.constructor; +} +function assert_exhaustion(thunk, message) { + try { + thunk(); + assertEq("normal return", "exhaustion"); + } catch (err) { + assertEq( + err instanceof StackOverflow, + true, + "expected exhaustion", + ); + } +} + +function assert_invalid(thunk, message) { + try { + thunk(); + assertEq("valid module", "invalid module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an invalid module", + ); + } +} + +function assert_unlinkable(thunk, message) { + try { + thunk(); + assertEq(true, false, "expected an unlinkable module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an unlinkable module", + ); + } +} + +function assert_malformed(thunk, message) { + try { + thunk(); + assertEq("valid module", "malformed module"); + } catch (err) { + assertEq( + err instanceof TypeError || + err instanceof SyntaxError || + err instanceof WebAssembly.CompileError || + err instanceof WebAssembly.LinkError, + true, + `expected a malformed module`, + ); + } +} + +function assert_exception(thunk) { + let thrown = false; + try { + thunk(); + } catch (err) { + thrown = true; + } + assertEq(thrown, true, "expected an exception to be thrown"); +} + +function assert_return(thunk, expected) { + let results = thunk(); + + if (results === undefined) { + results = []; + } else if (!Array.isArray(results)) { + results = [results]; + } + if (!Array.isArray(expected)) { + expected = [expected]; + } + + if (!compareResults(results, expected)) { + let got = results.map((x) => formatResult(x)).join(", "); + let wanted = expected.map((x) => formatExpected(x)).join(", "); + assertEq( + `[${got}]`, + `[${wanted}]`, + ); + assertEq(true, false, `${got} !== ${wanted}`); + } +} + +function formatResult(result) { + if (typeof (result) === "object") { + return wasmGlobalToString(result); + } else { + return `${result}`; + } +} + +function formatExpected(expected) { + if ( + expected === `f32_canonical_nan` || + expected === `f32_arithmetic_nan` || + expected === `f64_canonical_nan` || + expected === `f64_arithmetic_nan` + ) { + return expected; + } else if (expected instanceof F32x4Pattern) { + return `f32x4(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + }, ${formatExpected(expected.z)}, ${formatExpected(expected.w)})`; + } else if (expected instanceof F64x2Pattern) { + return `f64x2(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + })`; + } else if (expected instanceof EitherVariants) { + return expected.formatExpected(); + } else if (expected instanceof RefWithType) { + return expected.formatExpected(); + } else if (expected instanceof ExternRefResult) { + return expected.formatExpected(); + } else if (expected instanceof HostRefResult) { + return expected.formatExpected(); + } else if (typeof (expected) === "object") { + return wasmGlobalToString(expected); + } else { + throw new Error("unknown expected result"); + } +} + +class EitherVariants { + constructor(arr) { + this.arr = arr; + } + matches(v) { + return this.arr.some((e) => compareResult(v, e)); + } + formatExpected() { + return `either(${this.arr.map(formatExpected).join(", ")})`; + } +} + +function compareResults(results, expected) { + if (results.length !== expected.length) { + return false; + } + for (let i in results) { + if (expected[i] instanceof EitherVariants) { + return expected[i].matches(results[i]); + } + if (!compareResult(results[i], expected[i])) { + return false; + } + } + return true; +} + +function compareResult(result, expected) { + if ( + expected === `canonical_nan` || + expected === `arithmetic_nan` + ) { + return wasmGlobalIsNaN(result, expected); + } else if (expected === null) { + return result.value === null; + } else if (expected instanceof F32x4Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f32x4", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 1), expected.y) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 2), expected.z) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 3), expected.w); + } else if (expected instanceof F64x2Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f64x2", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f64x2", 1), expected.y); + } else if (expected instanceof RefWithType) { + return expected.test(result); + } else if (expected instanceof ExternRefResult) { + return expected.test(result); + } else if (expected instanceof HostRefResult) { + return expected.test(result); + } else if (typeof (expected) === "object") { + return wasmGlobalsEqual(result, expected); + } else { + throw new Error("unknown expected result"); + } +} diff --git a/js/src/jit-test/tests/wasm/spec/gc/i31.wast.js b/js/src/jit-test/tests/wasm/spec/gc/i31.wast.js new file mode 100644 index 0000000000..5799deefbf --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/i31.wast.js @@ -0,0 +1,104 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/i31.wast + +// ./test/core/gc/i31.wast:1 +let $0 = instantiate(`(module + (func (export "new") (param $$i i32) (result (ref i31)) + (ref.i31 (local.get $$i)) + ) + + (func (export "get_u") (param $$i i32) (result i32) + (i31.get_u (ref.i31 (local.get $$i))) + ) + (func (export "get_s") (param $$i i32) (result i32) + (i31.get_s (ref.i31 (local.get $$i))) + ) + + (func (export "get_u-null") (result i32) + (i31.get_u (ref.null i31)) + ) + (func (export "get_s-null") (result i32) + (i31.get_u (ref.null i31)) + ) + + (global $$i (ref i31) (ref.i31 (i32.const 2))) + (global $$m (mut (ref i31)) (ref.i31 (i32.const 3))) + (func (export "get_globals") (result i32 i32) + (i31.get_u (global.get $$i)) + (i31.get_u (global.get $$m)) + ) +)`); + +// ./test/core/gc/i31.wast:28 +assert_return(() => invoke($0, `new`, [1]), [new RefWithType('i31ref')]); + +// ./test/core/gc/i31.wast:30 +assert_return(() => invoke($0, `get_u`, [0]), [value("i32", 0)]); + +// ./test/core/gc/i31.wast:31 +assert_return(() => invoke($0, `get_u`, [100]), [value("i32", 100)]); + +// ./test/core/gc/i31.wast:32 +assert_return(() => invoke($0, `get_u`, [-1]), [value("i32", 2147483647)]); + +// ./test/core/gc/i31.wast:33 +assert_return(() => invoke($0, `get_u`, [1073741823]), [value("i32", 1073741823)]); + +// ./test/core/gc/i31.wast:34 +assert_return(() => invoke($0, `get_u`, [1073741824]), [value("i32", 1073741824)]); + +// ./test/core/gc/i31.wast:35 +assert_return(() => invoke($0, `get_u`, [2147483647]), [value("i32", 2147483647)]); + +// ./test/core/gc/i31.wast:36 +assert_return(() => invoke($0, `get_u`, [-1431655766]), [value("i32", 715827882)]); + +// ./test/core/gc/i31.wast:37 +assert_return(() => invoke($0, `get_u`, [-894784854]), [value("i32", 1252698794)]); + +// ./test/core/gc/i31.wast:39 +assert_return(() => invoke($0, `get_s`, [0]), [value("i32", 0)]); + +// ./test/core/gc/i31.wast:40 +assert_return(() => invoke($0, `get_s`, [100]), [value("i32", 100)]); + +// ./test/core/gc/i31.wast:41 +assert_return(() => invoke($0, `get_s`, [-1]), [value("i32", -1)]); + +// ./test/core/gc/i31.wast:42 +assert_return(() => invoke($0, `get_s`, [1073741823]), [value("i32", 1073741823)]); + +// ./test/core/gc/i31.wast:43 +assert_return(() => invoke($0, `get_s`, [1073741824]), [value("i32", -1073741824)]); + +// ./test/core/gc/i31.wast:44 +assert_return(() => invoke($0, `get_s`, [2147483647]), [value("i32", -1)]); + +// ./test/core/gc/i31.wast:45 +assert_return(() => invoke($0, `get_s`, [-1431655766]), [value("i32", 715827882)]); + +// ./test/core/gc/i31.wast:46 +assert_return(() => invoke($0, `get_s`, [-894784854]), [value("i32", -894784854)]); + +// ./test/core/gc/i31.wast:48 +assert_trap(() => invoke($0, `get_u-null`, []), `null i31 reference`); + +// ./test/core/gc/i31.wast:49 +assert_trap(() => invoke($0, `get_s-null`, []), `null i31 reference`); + +// ./test/core/gc/i31.wast:51 +assert_return(() => invoke($0, `get_globals`, []), [value("i32", 2), value("i32", 3)]); diff --git a/js/src/jit-test/tests/wasm/spec/gc/if.wast.js b/js/src/jit-test/tests/wasm/spec/gc/if.wast.js new file mode 100644 index 0000000000..cc79fbf00f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/if.wast.js @@ -0,0 +1,1928 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/if.wast + +// ./test/core/if.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definition + (memory 1) + + (func $$dummy) + + (func (export "empty") (param i32) + (if (local.get 0) (then)) + (if (local.get 0) (then) (else)) + (if $$l (local.get 0) (then)) + (if $$l (local.get 0) (then) (else)) + ) + + (func (export "singular") (param i32) (result i32) + (if (local.get 0) (then (nop))) + (if (local.get 0) (then (nop)) (else (nop))) + (if (result i32) (local.get 0) (then (i32.const 7)) (else (i32.const 8))) + ) + + (func (export "multi") (param i32) (result i32 i32) + (if (local.get 0) (then (call $$dummy) (call $$dummy) (call $$dummy))) + (if (local.get 0) (then) (else (call $$dummy) (call $$dummy) (call $$dummy))) + (if (result i32) (local.get 0) + (then (call $$dummy) (call $$dummy) (i32.const 8) (call $$dummy)) + (else (call $$dummy) (call $$dummy) (i32.const 9) (call $$dummy)) + ) + (if (result i32 i64 i32) (local.get 0) + (then + (call $$dummy) (call $$dummy) (i32.const 1) (call $$dummy) + (call $$dummy) (call $$dummy) (i64.const 2) (call $$dummy) + (call $$dummy) (call $$dummy) (i32.const 3) (call $$dummy) + ) + (else + (call $$dummy) (call $$dummy) (i32.const -1) (call $$dummy) + (call $$dummy) (call $$dummy) (i64.const -2) (call $$dummy) + (call $$dummy) (call $$dummy) (i32.const -3) (call $$dummy) + ) + ) + (drop) (drop) + ) + + (func (export "nested") (param i32 i32) (result i32) + (if (result i32) (local.get 0) + (then + (if (local.get 1) (then (call $$dummy) (block) (nop))) + (if (local.get 1) (then) (else (call $$dummy) (block) (nop))) + (if (result i32) (local.get 1) + (then (call $$dummy) (i32.const 9)) + (else (call $$dummy) (i32.const 10)) + ) + ) + (else + (if (local.get 1) (then (call $$dummy) (block) (nop))) + (if (local.get 1) (then) (else (call $$dummy) (block) (nop))) + (if (result i32) (local.get 1) + (then (call $$dummy) (i32.const 10)) + (else (call $$dummy) (i32.const 11)) + ) + ) + ) + ) + + (func (export "as-select-first") (param i32) (result i32) + (select + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) (i32.const 3) + ) + ) + (func (export "as-select-mid") (param i32) (result i32) + (select + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 3) + ) + ) + (func (export "as-select-last") (param i32) (result i32) + (select + (i32.const 2) (i32.const 3) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + ) + ) + + (func (export "as-loop-first") (param i32) (result i32) + (loop (result i32) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (call $$dummy) (call $$dummy) + ) + ) + (func (export "as-loop-mid") (param i32) (result i32) + (loop (result i32) + (call $$dummy) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (call $$dummy) + ) + ) + (func (export "as-loop-last") (param i32) (result i32) + (loop (result i32) + (call $$dummy) (call $$dummy) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + ) + ) + + (func (export "as-if-condition") (param i32) (result i32) + (if (result i32) + (if (result i32) (local.get 0) + (then (i32.const 1)) (else (i32.const 0)) + ) + (then (call $$dummy) (i32.const 2)) + (else (call $$dummy) (i32.const 3)) + ) + ) + + (func (export "as-br_if-first") (param i32) (result i32) + (block (result i32) + (br_if 0 + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) + ) + (return (i32.const 3)) + ) + ) + (func (export "as-br_if-last") (param i32) (result i32) + (block (result i32) + (br_if 0 + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + ) + (return (i32.const 3)) + ) + ) + + (func (export "as-br_table-first") (param i32) (result i32) + (block (result i32) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) + (br_table 0 0) + ) + ) + (func (export "as-br_table-last") (param i32) (result i32) + (block (result i32) + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (br_table 0 0) + ) + ) + + (func $$func (param i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-first") (param i32) (result i32) + (block (result i32) + (call_indirect (type $$check) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (param i32) (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (param i32) (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (i32.const 0) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + ) + ) + ) + + (func (export "as-store-first") (param i32) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) + (i32.store) + ) + (func (export "as-store-last") (param i32) + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.store) + ) + + (func (export "as-memory.grow-value") (param i32) (result i32) + (memory.grow + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "as-call-value") (param i32) (result i32) + (call $$f + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + (func (export "as-return-value") (param i32) (result i32) + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0))) + (return) + ) + (func (export "as-drop-operand") (param i32) + (drop + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + (func (export "as-br-value") (param i32) (result i32) + (block (result i32) + (br 0 + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + ) + (func (export "as-local.set-value") (param i32) (result i32) + (local i32) + (local.set 0 + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + (local.get 0) + ) + (func (export "as-local.tee-value") (param i32) (result i32) + (local.tee 0 + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + (global $$a (mut i32) (i32.const 10)) + (func (export "as-global.set-value") (param i32) (result i32) + (global.set $$a + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) (global.get $$a) + ) + (func (export "as-load-operand") (param i32) (result i32) + (i32.load + (if (result i32) (local.get 0) + (then (i32.const 11)) + (else (i32.const 10)) + ) + ) + ) + + (func (export "as-unary-operand") (param i32) (result i32) + (i32.ctz + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 13)) + (else (call $$dummy) (i32.const -13)) + ) + ) + ) + (func (export "as-binary-operand") (param i32 i32) (result i32) + (i32.mul + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 3)) + (else (call $$dummy) (i32.const -3)) + ) + (if (result i32) (local.get 1) + (then (call $$dummy) (i32.const 4)) + (else (call $$dummy) (i32.const -5)) + ) + ) + ) + (func (export "as-test-operand") (param i32) (result i32) + (i32.eqz + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 13)) + (else (call $$dummy) (i32.const 0)) + ) + ) + ) + (func (export "as-compare-operand") (param i32 i32) (result i32) + (f32.gt + (if (result f32) (local.get 0) + (then (call $$dummy) (f32.const 3)) + (else (call $$dummy) (f32.const -3)) + ) + (if (result f32) (local.get 1) + (then (call $$dummy) (f32.const 4)) + (else (call $$dummy) (f32.const -4)) + ) + ) + ) + (func (export "as-binary-operands") (param i32) (result i32) + (i32.mul + (if (result i32 i32) (local.get 0) + (then (call $$dummy) (i32.const 3) (call $$dummy) (i32.const 4)) + (else (call $$dummy) (i32.const 3) (call $$dummy) (i32.const -4)) + ) + ) + ) + (func (export "as-compare-operands") (param i32) (result i32) + (f32.gt + (if (result f32 f32) (local.get 0) + (then (call $$dummy) (f32.const 3) (call $$dummy) (f32.const 3)) + (else (call $$dummy) (f32.const -2) (call $$dummy) (f32.const -3)) + ) + ) + ) + (func (export "as-mixed-operands") (param i32) (result i32) + (if (result i32 i32) (local.get 0) + (then (call $$dummy) (i32.const 3) (call $$dummy) (i32.const 4)) + (else (call $$dummy) (i32.const -3) (call $$dummy) (i32.const -4)) + ) + (i32.const 5) + (i32.add) + (i32.mul) + ) + + (func (export "break-bare") (result i32) + (if (i32.const 1) (then (br 0) (unreachable))) + (if (i32.const 1) (then (br 0) (unreachable)) (else (unreachable))) + (if (i32.const 0) (then (unreachable)) (else (br 0) (unreachable))) + (if (i32.const 1) (then (br_if 0 (i32.const 1)) (unreachable))) + (if (i32.const 1) (then (br_if 0 (i32.const 1)) (unreachable)) (else (unreachable))) + (if (i32.const 0) (then (unreachable)) (else (br_if 0 (i32.const 1)) (unreachable))) + (if (i32.const 1) (then (br_table 0 (i32.const 0)) (unreachable))) + (if (i32.const 1) (then (br_table 0 (i32.const 0)) (unreachable)) (else (unreachable))) + (if (i32.const 0) (then (unreachable)) (else (br_table 0 (i32.const 0)) (unreachable))) + (i32.const 19) + ) + + (func (export "break-value") (param i32) (result i32) + (if (result i32) (local.get 0) + (then (br 0 (i32.const 18)) (i32.const 19)) + (else (br 0 (i32.const 21)) (i32.const 20)) + ) + ) + (func (export "break-multi-value") (param i32) (result i32 i32 i64) + (if (result i32 i32 i64) (local.get 0) + (then + (br 0 (i32.const 18) (i32.const -18) (i64.const 18)) + (i32.const 19) (i32.const -19) (i64.const 19) + ) + (else + (br 0 (i32.const -18) (i32.const 18) (i64.const -18)) + (i32.const -19) (i32.const 19) (i64.const -19) + ) + ) + ) + + (func (export "param") (param i32) (result i32) + (i32.const 1) + (if (param i32) (result i32) (local.get 0) + (then (i32.const 2) (i32.add)) + (else (i32.const -2) (i32.add)) + ) + ) + (func (export "params") (param i32) (result i32) + (i32.const 1) + (i32.const 2) + (if (param i32 i32) (result i32) (local.get 0) + (then (i32.add)) + (else (i32.sub)) + ) + ) + (func (export "params-id") (param i32) (result i32) + (i32.const 1) + (i32.const 2) + (if (param i32 i32) (result i32 i32) (local.get 0) (then)) + (i32.add) + ) + (func (export "param-break") (param i32) (result i32) + (i32.const 1) + (if (param i32) (result i32) (local.get 0) + (then (i32.const 2) (i32.add) (br 0)) + (else (i32.const -2) (i32.add) (br 0)) + ) + ) + (func (export "params-break") (param i32) (result i32) + (i32.const 1) + (i32.const 2) + (if (param i32 i32) (result i32) (local.get 0) + (then (i32.add) (br 0)) + (else (i32.sub) (br 0)) + ) + ) + (func (export "params-id-break") (param i32) (result i32) + (i32.const 1) + (i32.const 2) + (if (param i32 i32) (result i32 i32) (local.get 0) (then (br 0))) + (i32.add) + ) + + (func (export "effects") (param i32) (result i32) + (local i32) + (if + (block (result i32) (local.set 1 (i32.const 1)) (local.get 0)) + (then + (local.set 1 (i32.mul (local.get 1) (i32.const 3))) + (local.set 1 (i32.sub (local.get 1) (i32.const 5))) + (local.set 1 (i32.mul (local.get 1) (i32.const 7))) + (br 0) + (local.set 1 (i32.mul (local.get 1) (i32.const 100))) + ) + (else + (local.set 1 (i32.mul (local.get 1) (i32.const 5))) + (local.set 1 (i32.sub (local.get 1) (i32.const 7))) + (local.set 1 (i32.mul (local.get 1) (i32.const 3))) + (br 0) + (local.set 1 (i32.mul (local.get 1) (i32.const 1000))) + ) + ) + (local.get 1) + ) + + ;; Examples + + (func $$add64_u_with_carry (export "add64_u_with_carry") + (param $$i i64) (param $$j i64) (param $$c i32) (result i64 i32) + (local $$k i64) + (local.set $$k + (i64.add + (i64.add (local.get $$i) (local.get $$j)) + (i64.extend_i32_u (local.get $$c)) + ) + ) + (return (local.get $$k) (i64.lt_u (local.get $$k) (local.get $$i))) + ) + + (func $$add64_u_saturated (export "add64_u_saturated") + (param i64 i64) (result i64) + (call $$add64_u_with_carry (local.get 0) (local.get 1) (i32.const 0)) + (if (param i64) (result i64) + (then (drop) (i64.const -1)) + ) + ) + + ;; Block signature syntax + + (type $$block-sig-1 (func)) + (type $$block-sig-2 (func (result i32))) + (type $$block-sig-3 (func (param $$x i32))) + (type $$block-sig-4 (func (param i32 f64 i32) (result i32 f64 i32))) + + (func (export "type-use") + (if (type $$block-sig-1) (i32.const 1) (then)) + (if (type $$block-sig-2) (i32.const 1) + (then (i32.const 0)) (else (i32.const 2)) + ) + (if (type $$block-sig-3) (i32.const 1) (then (drop)) (else (drop))) + (i32.const 0) (f64.const 0) (i32.const 0) + (if (type $$block-sig-4) (i32.const 1) (then)) + (drop) (drop) (drop) + (if (type $$block-sig-2) (result i32) (i32.const 1) + (then (i32.const 0)) (else (i32.const 2)) + ) + (if (type $$block-sig-3) (param i32) (i32.const 1) + (then (drop)) (else (drop)) + ) + (i32.const 0) (f64.const 0) (i32.const 0) + (if (type $$block-sig-4) + (param i32) (param f64 i32) (result i32 f64) (result i32) + (i32.const 1) (then) + ) + (drop) (drop) (drop) + ) + + ;; Atypical folded condition syntax + + (func (export "atypical-condition") + i32.const 0 + (if (then) (else)) + (if (i32.const 1) (i32.eqz) (then) (else)) + ) +)`); + +// ./test/core/if.wast:537 +assert_return(() => invoke($0, `empty`, [0]), []); + +// ./test/core/if.wast:538 +assert_return(() => invoke($0, `empty`, [1]), []); + +// ./test/core/if.wast:539 +assert_return(() => invoke($0, `empty`, [100]), []); + +// ./test/core/if.wast:540 +assert_return(() => invoke($0, `empty`, [-2]), []); + +// ./test/core/if.wast:542 +assert_return(() => invoke($0, `singular`, [0]), [value("i32", 8)]); + +// ./test/core/if.wast:543 +assert_return(() => invoke($0, `singular`, [1]), [value("i32", 7)]); + +// ./test/core/if.wast:544 +assert_return(() => invoke($0, `singular`, [10]), [value("i32", 7)]); + +// ./test/core/if.wast:545 +assert_return(() => invoke($0, `singular`, [-10]), [value("i32", 7)]); + +// ./test/core/if.wast:547 +assert_return(() => invoke($0, `multi`, [0]), [value("i32", 9), value("i32", -1)]); + +// ./test/core/if.wast:548 +assert_return(() => invoke($0, `multi`, [1]), [value("i32", 8), value("i32", 1)]); + +// ./test/core/if.wast:549 +assert_return(() => invoke($0, `multi`, [13]), [value("i32", 8), value("i32", 1)]); + +// ./test/core/if.wast:550 +assert_return(() => invoke($0, `multi`, [-5]), [value("i32", 8), value("i32", 1)]); + +// ./test/core/if.wast:552 +assert_return(() => invoke($0, `nested`, [0, 0]), [value("i32", 11)]); + +// ./test/core/if.wast:553 +assert_return(() => invoke($0, `nested`, [1, 0]), [value("i32", 10)]); + +// ./test/core/if.wast:554 +assert_return(() => invoke($0, `nested`, [0, 1]), [value("i32", 10)]); + +// ./test/core/if.wast:555 +assert_return(() => invoke($0, `nested`, [3, 2]), [value("i32", 9)]); + +// ./test/core/if.wast:556 +assert_return(() => invoke($0, `nested`, [0, -100]), [value("i32", 10)]); + +// ./test/core/if.wast:557 +assert_return(() => invoke($0, `nested`, [10, 10]), [value("i32", 9)]); + +// ./test/core/if.wast:558 +assert_return(() => invoke($0, `nested`, [0, -1]), [value("i32", 10)]); + +// ./test/core/if.wast:559 +assert_return(() => invoke($0, `nested`, [-111, -2]), [value("i32", 9)]); + +// ./test/core/if.wast:561 +assert_return(() => invoke($0, `as-select-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:562 +assert_return(() => invoke($0, `as-select-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:563 +assert_return(() => invoke($0, `as-select-mid`, [0]), [value("i32", 2)]); + +// ./test/core/if.wast:564 +assert_return(() => invoke($0, `as-select-mid`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:565 +assert_return(() => invoke($0, `as-select-last`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:566 +assert_return(() => invoke($0, `as-select-last`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:568 +assert_return(() => invoke($0, `as-loop-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:569 +assert_return(() => invoke($0, `as-loop-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:570 +assert_return(() => invoke($0, `as-loop-mid`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:571 +assert_return(() => invoke($0, `as-loop-mid`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:572 +assert_return(() => invoke($0, `as-loop-last`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:573 +assert_return(() => invoke($0, `as-loop-last`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:575 +assert_return(() => invoke($0, `as-if-condition`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:576 +assert_return(() => invoke($0, `as-if-condition`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:578 +assert_return(() => invoke($0, `as-br_if-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:579 +assert_return(() => invoke($0, `as-br_if-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:580 +assert_return(() => invoke($0, `as-br_if-last`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:581 +assert_return(() => invoke($0, `as-br_if-last`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:583 +assert_return(() => invoke($0, `as-br_table-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:584 +assert_return(() => invoke($0, `as-br_table-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:585 +assert_return(() => invoke($0, `as-br_table-last`, [0]), [value("i32", 2)]); + +// ./test/core/if.wast:586 +assert_return(() => invoke($0, `as-br_table-last`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:588 +assert_return(() => invoke($0, `as-call_indirect-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:589 +assert_return(() => invoke($0, `as-call_indirect-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:590 +assert_return(() => invoke($0, `as-call_indirect-mid`, [0]), [value("i32", 2)]); + +// ./test/core/if.wast:591 +assert_return(() => invoke($0, `as-call_indirect-mid`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:592 +assert_return(() => invoke($0, `as-call_indirect-last`, [0]), [value("i32", 2)]); + +// ./test/core/if.wast:593 +assert_trap(() => invoke($0, `as-call_indirect-last`, [1]), `undefined element`); + +// ./test/core/if.wast:595 +assert_return(() => invoke($0, `as-store-first`, [0]), []); + +// ./test/core/if.wast:596 +assert_return(() => invoke($0, `as-store-first`, [1]), []); + +// ./test/core/if.wast:597 +assert_return(() => invoke($0, `as-store-last`, [0]), []); + +// ./test/core/if.wast:598 +assert_return(() => invoke($0, `as-store-last`, [1]), []); + +// ./test/core/if.wast:600 +assert_return(() => invoke($0, `as-memory.grow-value`, [0]), [value("i32", 1)]); + +// ./test/core/if.wast:601 +assert_return(() => invoke($0, `as-memory.grow-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:603 +assert_return(() => invoke($0, `as-call-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:604 +assert_return(() => invoke($0, `as-call-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:606 +assert_return(() => invoke($0, `as-return-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:607 +assert_return(() => invoke($0, `as-return-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:609 +assert_return(() => invoke($0, `as-drop-operand`, [0]), []); + +// ./test/core/if.wast:610 +assert_return(() => invoke($0, `as-drop-operand`, [1]), []); + +// ./test/core/if.wast:612 +assert_return(() => invoke($0, `as-br-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:613 +assert_return(() => invoke($0, `as-br-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:615 +assert_return(() => invoke($0, `as-local.set-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:616 +assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:618 +assert_return(() => invoke($0, `as-local.tee-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:619 +assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:621 +assert_return(() => invoke($0, `as-global.set-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:622 +assert_return(() => invoke($0, `as-global.set-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:624 +assert_return(() => invoke($0, `as-load-operand`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:625 +assert_return(() => invoke($0, `as-load-operand`, [1]), [value("i32", 0)]); + +// ./test/core/if.wast:627 +assert_return(() => invoke($0, `as-unary-operand`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:628 +assert_return(() => invoke($0, `as-unary-operand`, [1]), [value("i32", 0)]); + +// ./test/core/if.wast:629 +assert_return(() => invoke($0, `as-unary-operand`, [-1]), [value("i32", 0)]); + +// ./test/core/if.wast:631 +assert_return(() => invoke($0, `as-binary-operand`, [0, 0]), [value("i32", 15)]); + +// ./test/core/if.wast:632 +assert_return(() => invoke($0, `as-binary-operand`, [0, 1]), [value("i32", -12)]); + +// ./test/core/if.wast:633 +assert_return(() => invoke($0, `as-binary-operand`, [1, 0]), [value("i32", -15)]); + +// ./test/core/if.wast:634 +assert_return(() => invoke($0, `as-binary-operand`, [1, 1]), [value("i32", 12)]); + +// ./test/core/if.wast:636 +assert_return(() => invoke($0, `as-test-operand`, [0]), [value("i32", 1)]); + +// ./test/core/if.wast:637 +assert_return(() => invoke($0, `as-test-operand`, [1]), [value("i32", 0)]); + +// ./test/core/if.wast:639 +assert_return(() => invoke($0, `as-compare-operand`, [0, 0]), [value("i32", 1)]); + +// ./test/core/if.wast:640 +assert_return(() => invoke($0, `as-compare-operand`, [0, 1]), [value("i32", 0)]); + +// ./test/core/if.wast:641 +assert_return(() => invoke($0, `as-compare-operand`, [1, 0]), [value("i32", 1)]); + +// ./test/core/if.wast:642 +assert_return(() => invoke($0, `as-compare-operand`, [1, 1]), [value("i32", 0)]); + +// ./test/core/if.wast:644 +assert_return(() => invoke($0, `as-binary-operands`, [0]), [value("i32", -12)]); + +// ./test/core/if.wast:645 +assert_return(() => invoke($0, `as-binary-operands`, [1]), [value("i32", 12)]); + +// ./test/core/if.wast:647 +assert_return(() => invoke($0, `as-compare-operands`, [0]), [value("i32", 1)]); + +// ./test/core/if.wast:648 +assert_return(() => invoke($0, `as-compare-operands`, [1]), [value("i32", 0)]); + +// ./test/core/if.wast:650 +assert_return(() => invoke($0, `as-mixed-operands`, [0]), [value("i32", -3)]); + +// ./test/core/if.wast:651 +assert_return(() => invoke($0, `as-mixed-operands`, [1]), [value("i32", 27)]); + +// ./test/core/if.wast:653 +assert_return(() => invoke($0, `break-bare`, []), [value("i32", 19)]); + +// ./test/core/if.wast:654 +assert_return(() => invoke($0, `break-value`, [1]), [value("i32", 18)]); + +// ./test/core/if.wast:655 +assert_return(() => invoke($0, `break-value`, [0]), [value("i32", 21)]); + +// ./test/core/if.wast:656 +assert_return( + () => invoke($0, `break-multi-value`, [0]), + [value("i32", -18), value("i32", 18), value("i64", -18n)], +); + +// ./test/core/if.wast:659 +assert_return( + () => invoke($0, `break-multi-value`, [1]), + [value("i32", 18), value("i32", -18), value("i64", 18n)], +); + +// ./test/core/if.wast:663 +assert_return(() => invoke($0, `param`, [0]), [value("i32", -1)]); + +// ./test/core/if.wast:664 +assert_return(() => invoke($0, `param`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:665 +assert_return(() => invoke($0, `params`, [0]), [value("i32", -1)]); + +// ./test/core/if.wast:666 +assert_return(() => invoke($0, `params`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:667 +assert_return(() => invoke($0, `params-id`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:668 +assert_return(() => invoke($0, `params-id`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:669 +assert_return(() => invoke($0, `param-break`, [0]), [value("i32", -1)]); + +// ./test/core/if.wast:670 +assert_return(() => invoke($0, `param-break`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:671 +assert_return(() => invoke($0, `params-break`, [0]), [value("i32", -1)]); + +// ./test/core/if.wast:672 +assert_return(() => invoke($0, `params-break`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:673 +assert_return(() => invoke($0, `params-id-break`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:674 +assert_return(() => invoke($0, `params-id-break`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:676 +assert_return(() => invoke($0, `effects`, [1]), [value("i32", -14)]); + +// ./test/core/if.wast:677 +assert_return(() => invoke($0, `effects`, [0]), [value("i32", -6)]); + +// ./test/core/if.wast:679 +assert_return(() => invoke($0, `add64_u_with_carry`, [0n, 0n, 0]), [value("i64", 0n), value("i32", 0)]); + +// ./test/core/if.wast:683 +assert_return( + () => invoke($0, `add64_u_with_carry`, [100n, 124n, 0]), + [value("i64", 224n), value("i32", 0)], +); + +// ./test/core/if.wast:687 +assert_return( + () => invoke($0, `add64_u_with_carry`, [-1n, 0n, 0]), + [value("i64", -1n), value("i32", 0)], +); + +// ./test/core/if.wast:691 +assert_return(() => invoke($0, `add64_u_with_carry`, [-1n, 1n, 0]), [value("i64", 0n), value("i32", 1)]); + +// ./test/core/if.wast:695 +assert_return( + () => invoke($0, `add64_u_with_carry`, [-1n, -1n, 0]), + [value("i64", -2n), value("i32", 1)], +); + +// ./test/core/if.wast:699 +assert_return(() => invoke($0, `add64_u_with_carry`, [-1n, 0n, 1]), [value("i64", 0n), value("i32", 1)]); + +// ./test/core/if.wast:703 +assert_return(() => invoke($0, `add64_u_with_carry`, [-1n, 1n, 1]), [value("i64", 1n), value("i32", 1)]); + +// ./test/core/if.wast:707 +assert_return( + () => invoke($0, `add64_u_with_carry`, [ + -9223372036854775808n, + -9223372036854775808n, + 0, + ]), + [value("i64", 0n), value("i32", 1)], +); + +// ./test/core/if.wast:712 +assert_return(() => invoke($0, `add64_u_saturated`, [0n, 0n]), [value("i64", 0n)]); + +// ./test/core/if.wast:715 +assert_return(() => invoke($0, `add64_u_saturated`, [1230n, 23n]), [value("i64", 1253n)]); + +// ./test/core/if.wast:718 +assert_return(() => invoke($0, `add64_u_saturated`, [-1n, 0n]), [value("i64", -1n)]); + +// ./test/core/if.wast:721 +assert_return(() => invoke($0, `add64_u_saturated`, [-1n, 1n]), [value("i64", -1n)]); + +// ./test/core/if.wast:724 +assert_return(() => invoke($0, `add64_u_saturated`, [-1n, -1n]), [value("i64", -1n)]); + +// ./test/core/if.wast:727 +assert_return( + () => invoke($0, `add64_u_saturated`, [-9223372036854775808n, -9223372036854775808n]), + [value("i64", -1n)], +); + +// ./test/core/if.wast:731 +assert_return(() => invoke($0, `type-use`, []), []); + +// ./test/core/if.wast:733 +assert_return(() => invoke($0, `atypical-condition`, []), []); + +// ./test/core/if.wast:735 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (type $$sig) (result i32) (param i32) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:744 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (param i32) (type $$sig) (result i32) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:753 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (param i32) (result i32) (type $$sig) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:762 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (result i32) (type $$sig) (param i32) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:771 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (result i32) (param i32) (type $$sig) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:780 +assert_malformed( + () => instantiate(`(func (i32.const 0) (if (result i32) (param i32) (i32.const 1) (then))) `), + `unexpected token`, +); + +// ./test/core/if.wast:787 +assert_malformed( + () => instantiate(`(func (i32.const 0) (i32.const 1) (if (param $$x i32) (then (drop)) (else (drop))) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:795 +assert_malformed( + () => instantiate(`(type $$sig (func)) (func (i32.const 1) (if (type $$sig) (result i32) (then (i32.const 0)) (else (i32.const 2))) (unreachable) ) `), + `inline function type`, +); + +// ./test/core/if.wast:805 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 1) (if (type $$sig) (result i32) (then (i32.const 0)) (else (i32.const 2))) (unreachable) ) `), + `inline function type`, +); + +// ./test/core/if.wast:815 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (i32.const 1) (if (type $$sig) (param i32) (then (drop)) (else (drop))) (unreachable) ) `), + `inline function type`, +); + +// ./test/core/if.wast:825 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32 i32) (result i32))) (func (i32.const 0) (i32.const 1) (if (type $$sig) (param i32) (result i32) (then)) (unreachable) ) `), + `inline function type`, +); + +// ./test/core/if.wast:835 +assert_invalid( + () => instantiate(`(module + (type $$sig (func)) + (func (i32.const 1) (if (type $$sig) (i32.const 0) (then))) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:843 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i32 (result i32) (if (i32.const 0) (then))))`), + `type mismatch`, +); + +// ./test/core/if.wast:847 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i64 (result i64) (if (i32.const 0) (then))))`), + `type mismatch`, +); + +// ./test/core/if.wast:851 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f32 (result f32) (if (i32.const 0) (then))))`), + `type mismatch`, +); + +// ./test/core/if.wast:855 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f64 (result f64) (if (i32.const 0) (then))))`), + `type mismatch`, +); + +// ./test/core/if.wast:860 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i32 (result i32) (if (i32.const 0) (then) (else))))`), + `type mismatch`, +); + +// ./test/core/if.wast:864 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i64 (result i64) (if (i32.const 0) (then) (else))))`), + `type mismatch`, +); + +// ./test/core/if.wast:868 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f32 (result f32) (if (i32.const 0) (then) (else))))`), + `type mismatch`, +); + +// ./test/core/if.wast:872 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f64 (result f64) (if (i32.const 0) (then) (else))))`), + `type mismatch`, +); + +// ./test/core/if.wast:877 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-num-vs-void + (if (i32.const 1) (then (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:883 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-num-vs-void-else + (if (i32.const 1) (then (i32.const 1)) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:889 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-num-vs-void + (if (i32.const 1) (then) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:895 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-num-vs-void + (if (i32.const 1) (then (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:902 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-nums-vs-void + (if (i32.const 1) (then (i32.const 1) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:908 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-nums-vs-void-else + (if (i32.const 1) (then (i32.const 1) (i32.const 2)) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:914 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-nums-vs-void + (if (i32.const 1) (then) (else (i32.const 1) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:920 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-nums-vs-void + (if (i32.const 1) (then (i32.const 1) (i32.const 2)) (else (i32.const 2) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:927 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-empty-vs-num (result i32) + (if (result i32) (i32.const 1) (then) (else (i32.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:933 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-empty-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 0)) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:939 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-empty-vs-num (result i32) + (if (result i32) (i32.const 1) (then) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:946 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then) (else (i32.const 0) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:952 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 0) (i32.const 1)) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:958 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:965 +assert_invalid( + () => instantiate(`(module (func $$type-no-else-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:971 +assert_invalid( + () => instantiate(`(module (func $$type-no-else-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:978 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (nop)) (else (i32.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:984 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 0)) (else (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:990 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (nop)) (else (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:997 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (nop)) (else (i32.const 0) (i32.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1003 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 0) (i32.const 0)) (else (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1009 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (nop)) (else (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1016 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-num-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i64.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1022 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-num-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1)) (else (i64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1028 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-num-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i64.const 1)) (else (i64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1035 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1041 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1047 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1054 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-partial-vs-nums (result i32 i32) + (i32.const 0) + (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1061 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-partial-vs-nums (result i32 i32) + (i32.const 0) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1068 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-partial-vs-nums (result i32 i32) + (i32.const 0) + (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1076 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-nums-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1082 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-nums-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1088 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-nums-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1095 +assert_invalid( + () => instantiate(`(module (func $$type-both-different-value-num-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i64.const 1)) (else (f64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1101 +assert_invalid( + () => instantiate(`(module (func $$type-both-different-value-nums-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1) (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1108 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-unreached-select (result i32) + (if (result i64) + (i32.const 0) + (then (select (unreachable) (unreachable) (unreachable))) + (else (i64.const 0)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1118 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-unreached-select (result i32) + (if (result i64) + (i32.const 1) + (then (i64.const 0)) + (else (select (unreachable) (unreachable) (unreachable))) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1128 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-unreached-select (result i32) + (if (result i64) + (i32.const 1) + (then (select (unreachable) (unreachable) (unreachable))) + (else (select (unreachable) (unreachable) (unreachable))) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1139 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-last-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (br 0)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1145 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-last-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1)) (else (br 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1151 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-last-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (br 0)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1157 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-last-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (br 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1164 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-empty-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (br 0) (i32.const 1)) + (else (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1173 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-empty-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (i32.const 1)) + (else (br 0) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1182 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (br 0) (i32.const 1) (i32.const 1)) + (else (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1191 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (i32.const 1) (i32.const 1)) + (else (br 0) (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1201 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-void-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (br 0 (nop)) (i32.const 1)) + (else (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1210 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-void-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (i32.const 1)) + (else (br 0 (nop)) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1219 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (br 0 (nop)) (i32.const 1) (i32.const 1)) + (else (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1228 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (i32.const 1) (i32.const 1)) + (else (br 0 (nop)) (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1238 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-num-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (br 0 (i64.const 1)) (i32.const 1)) + (else (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1247 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-num-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (i32.const 1)) + (else (br 0 (i64.const 1)) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1256 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (br 0 (i64.const 1)) (i32.const 1) (i32.const 1)) + (else (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1265 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (i32.const 1) (i32.const 1)) + (else (br 0 (i64.const 1)) (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1274 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-partial-vs-nums (result i32 i32) + (i32.const 1) + (if (result i32 i32) (i32.const 1) + (then (br 0 (i64.const 1)) (i32.const 1)) + (else (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1284 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-partial-vs-nums (result i32 i32) + (i32.const 1) + (if (result i32 i32) (i32.const 1) + (then (i32.const 1)) + (else (br 0 (i64.const 1)) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1295 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty + (if (then)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1303 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-block + (i32.const 0) + (block (if (then))) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1312 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-loop + (i32.const 0) + (loop (if (then))) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1321 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (if (then)))) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1330 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (if (then)) (i32.const 0))) + (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1340 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-br + (i32.const 0) + (block (br 0 (if(then))) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1349 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-br_if + (i32.const 0) + (block (br_if 0 (if(then)) (i32.const 1)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1358 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-br_table + (i32.const 0) + (block (br_table 0 (if(then))) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1367 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-return + (return (if(then))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1375 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-select + (select (if(then)) (i32.const 1) (i32.const 2)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1383 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-call + (call 1 (if(then))) (drop) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1392 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-condition-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (if(then)) (i32.const 0) + ) + (drop) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1408 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-local.set + (local i32) + (local.set 0 (if(then))) (local.get 0) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1417 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-local.tee + (local i32) + (local.tee 0 (if(then))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1426 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-condition-empty-in-global.set + (global.set $$x (if(then))) (global.get $$x) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1435 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-condition-empty-in-memory.grow + (memory.grow (if(then))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1444 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-condition-empty-in-load + (i32.load (if(then))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1453 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-condition-empty-in-store + (i32.store (if(then)) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1463 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-num + (if (param i32) (i32.const 1) (then (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1469 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-nums + (if (param i32 f64) (i32.const 1) (then (drop) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1475 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num + (f32.const 0) (if (param i32) (i32.const 1) (then (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1481 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-nums + (f32.const 0) (if (param f32 i32) (i32.const 1) (then (drop) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1487 +assert_invalid( + () => instantiate(`(module (func $$type-param-nested-void-vs-num + (block (if (param i32) (i32.const 1) (then (drop)))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1493 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-nums + (block (if (param i32 f64) (i32.const 1) (then (drop) (drop)))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1499 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num + (block (f32.const 0) (if (param i32) (i32.const 1) (then (drop)))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1505 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-nums + (block (f32.const 0) (if (param f32 i32) (i32.const 1) (then (drop) (drop)))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1512 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) if (param $$x i32) end) `), + `unexpected token`, +); + +// ./test/core/if.wast:1516 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) (if (param $$x i32) (then))) `), + `unexpected token`, +); + +// ./test/core/if.wast:1521 +assert_malformed(() => instantiate(`(func i32.const 0 if end $$l) `), `mismatching label`); + +// ./test/core/if.wast:1525 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1529 +assert_malformed( + () => instantiate(`(func i32.const 0 if else $$l end) `), + `mismatching label`, +); + +// ./test/core/if.wast:1533 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a else $$l end) `), + `mismatching label`, +); + +// ./test/core/if.wast:1537 +assert_malformed( + () => instantiate(`(func i32.const 0 if else end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1541 +assert_malformed( + () => instantiate(`(func i32.const 0 if else $$l end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1545 +assert_malformed( + () => instantiate(`(func i32.const 0 if else $$l1 end $$l2) `), + `mismatching label`, +); + +// ./test/core/if.wast:1549 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a else end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1553 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a else $$a end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1557 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a else $$l end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1561 +assert_malformed( + () => instantiate(`(func (if i32.const 0 (then) (else))) `), + `unexpected token`, +); diff --git a/js/src/jit-test/tests/wasm/spec/gc/obsolete-keywords.wast.js b/js/src/jit-test/tests/wasm/spec/gc/obsolete-keywords.wast.js new file mode 100644 index 0000000000..9f51433917 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/obsolete-keywords.wast.js @@ -0,0 +1,82 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/obsolete-keywords.wast + +// ./test/core/obsolete-keywords.wast:2 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (current_memory))) `), + `unknown operator current_memory`, +); + +// ./test/core/obsolete-keywords.wast:10 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (grow_memory (i32.const 0)))) `), + `unknown operator grow_memory`, +); + +// ./test/core/obsolete-keywords.wast:19 +assert_malformed( + () => instantiate(`(func (local $$i i32) (drop (get_local $$i))) `), + `unknown operator get_local`, +); + +// ./test/core/obsolete-keywords.wast:26 +assert_malformed( + () => instantiate(`(func (local $$i i32) (set_local $$i (i32.const 0))) `), + `unknown operator set_local`, +); + +// ./test/core/obsolete-keywords.wast:33 +assert_malformed( + () => instantiate(`(func (local $$i i32) (drop (tee_local $$i (i32.const 0)))) `), + `unknown operator tee_local`, +); + +// ./test/core/obsolete-keywords.wast:40 +assert_malformed( + () => instantiate(`(global $$g anyfunc (ref.null func)) `), + `unknown operator anyfunc`, +); + +// ./test/core/obsolete-keywords.wast:47 +assert_malformed( + () => instantiate(`(global $$g i32 (i32.const 0)) (func (drop (get_global $$g))) `), + `unknown operator get_global`, +); + +// ./test/core/obsolete-keywords.wast:55 +assert_malformed( + () => instantiate(`(global $$g (mut i32) (i32.const 0)) (func (set_global $$g (i32.const 0))) `), + `unknown operator set_global`, +); + +// ./test/core/obsolete-keywords.wast:63 +assert_malformed( + () => instantiate(`(func (drop (i32.wrap/i64 (i64.const 0)))) `), + `unknown operator i32.wrap/i64`, +); + +// ./test/core/obsolete-keywords.wast:70 +assert_malformed( + () => instantiate(`(func (drop (i32.trunc_s:sat/f32 (f32.const 0)))) `), + `unknown operator i32.trunc_s:sat/f32`, +); + +// ./test/core/obsolete-keywords.wast:77 +assert_malformed( + () => instantiate(`(func (drop (f32x4.convert_s/i32x4 (v128.const i64x2 0 0)))) `), + `unknown operator f32x4.convert_s/i32x4`, +); diff --git a/js/src/jit-test/tests/wasm/spec/gc/ref_cast.wast.js b/js/src/jit-test/tests/wasm/spec/gc/ref_cast.wast.js new file mode 100644 index 0000000000..e5dcd20a95 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/ref_cast.wast.js @@ -0,0 +1,279 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/ref_cast.wast + +// ./test/core/gc/ref_cast.wast:3 +let $0 = instantiate(`(module + (type $$ft (func)) + (type $$st (struct)) + (type $$at (array i8)) + + (table 10 anyref) + + (elem declare func $$f) + (func $$f) + + (func (export "init") (param $$x externref) + (table.set (i32.const 0) (ref.null any)) + (table.set (i32.const 1) (ref.i31 (i32.const 7))) + (table.set (i32.const 2) (struct.new_default $$st)) + (table.set (i32.const 3) (array.new_default $$at (i32.const 0))) + (table.set (i32.const 4) (any.convert_extern (local.get $$x))) + (table.set (i32.const 5) (ref.null i31)) + (table.set (i32.const 6) (ref.null struct)) + (table.set (i32.const 7) (ref.null none)) + ) + + (func (export "ref_cast_non_null") (param $$i i32) + (drop (ref.as_non_null (table.get (local.get $$i)))) + (drop (ref.cast (ref null any) (table.get (local.get $$i)))) + ) + (func (export "ref_cast_null") (param $$i i32) + (drop (ref.cast anyref (table.get (local.get $$i)))) + (drop (ref.cast structref (table.get (local.get $$i)))) + (drop (ref.cast arrayref (table.get (local.get $$i)))) + (drop (ref.cast i31ref (table.get (local.get $$i)))) + (drop (ref.cast nullref (table.get (local.get $$i)))) + ) + (func (export "ref_cast_i31") (param $$i i32) + (drop (ref.cast (ref i31) (table.get (local.get $$i)))) + (drop (ref.cast i31ref (table.get (local.get $$i)))) + ) + (func (export "ref_cast_struct") (param $$i i32) + (drop (ref.cast (ref struct) (table.get (local.get $$i)))) + (drop (ref.cast structref (table.get (local.get $$i)))) + ) + (func (export "ref_cast_array") (param $$i i32) + (drop (ref.cast (ref array) (table.get (local.get $$i)))) + (drop (ref.cast arrayref (table.get (local.get $$i)))) + ) +)`); + +// ./test/core/gc/ref_cast.wast:49 +invoke($0, `init`, [externref(0)]); + +// ./test/core/gc/ref_cast.wast:51 +assert_trap(() => invoke($0, `ref_cast_non_null`, [0]), `null reference`); + +// ./test/core/gc/ref_cast.wast:52 +assert_return(() => invoke($0, `ref_cast_non_null`, [1]), []); + +// ./test/core/gc/ref_cast.wast:53 +assert_return(() => invoke($0, `ref_cast_non_null`, [2]), []); + +// ./test/core/gc/ref_cast.wast:54 +assert_return(() => invoke($0, `ref_cast_non_null`, [3]), []); + +// ./test/core/gc/ref_cast.wast:55 +assert_return(() => invoke($0, `ref_cast_non_null`, [4]), []); + +// ./test/core/gc/ref_cast.wast:56 +assert_trap(() => invoke($0, `ref_cast_non_null`, [5]), `null reference`); + +// ./test/core/gc/ref_cast.wast:57 +assert_trap(() => invoke($0, `ref_cast_non_null`, [6]), `null reference`); + +// ./test/core/gc/ref_cast.wast:58 +assert_trap(() => invoke($0, `ref_cast_non_null`, [7]), `null reference`); + +// ./test/core/gc/ref_cast.wast:60 +assert_return(() => invoke($0, `ref_cast_null`, [0]), []); + +// ./test/core/gc/ref_cast.wast:61 +assert_trap(() => invoke($0, `ref_cast_null`, [1]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:62 +assert_trap(() => invoke($0, `ref_cast_null`, [2]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:63 +assert_trap(() => invoke($0, `ref_cast_null`, [3]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:64 +assert_trap(() => invoke($0, `ref_cast_null`, [4]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:65 +assert_return(() => invoke($0, `ref_cast_null`, [5]), []); + +// ./test/core/gc/ref_cast.wast:66 +assert_return(() => invoke($0, `ref_cast_null`, [6]), []); + +// ./test/core/gc/ref_cast.wast:67 +assert_return(() => invoke($0, `ref_cast_null`, [7]), []); + +// ./test/core/gc/ref_cast.wast:69 +assert_trap(() => invoke($0, `ref_cast_i31`, [0]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:70 +assert_return(() => invoke($0, `ref_cast_i31`, [1]), []); + +// ./test/core/gc/ref_cast.wast:71 +assert_trap(() => invoke($0, `ref_cast_i31`, [2]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:72 +assert_trap(() => invoke($0, `ref_cast_i31`, [3]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:73 +assert_trap(() => invoke($0, `ref_cast_i31`, [4]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:74 +assert_trap(() => invoke($0, `ref_cast_i31`, [5]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:75 +assert_trap(() => invoke($0, `ref_cast_i31`, [6]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:76 +assert_trap(() => invoke($0, `ref_cast_i31`, [7]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:78 +assert_trap(() => invoke($0, `ref_cast_struct`, [0]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:79 +assert_trap(() => invoke($0, `ref_cast_struct`, [1]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:80 +assert_return(() => invoke($0, `ref_cast_struct`, [2]), []); + +// ./test/core/gc/ref_cast.wast:81 +assert_trap(() => invoke($0, `ref_cast_struct`, [3]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:82 +assert_trap(() => invoke($0, `ref_cast_struct`, [4]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:83 +assert_trap(() => invoke($0, `ref_cast_struct`, [5]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:84 +assert_trap(() => invoke($0, `ref_cast_struct`, [6]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:85 +assert_trap(() => invoke($0, `ref_cast_struct`, [7]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:87 +assert_trap(() => invoke($0, `ref_cast_array`, [0]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:88 +assert_trap(() => invoke($0, `ref_cast_array`, [1]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:89 +assert_trap(() => invoke($0, `ref_cast_array`, [2]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:90 +assert_return(() => invoke($0, `ref_cast_array`, [3]), []); + +// ./test/core/gc/ref_cast.wast:91 +assert_trap(() => invoke($0, `ref_cast_array`, [4]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:92 +assert_trap(() => invoke($0, `ref_cast_array`, [5]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:93 +assert_trap(() => invoke($0, `ref_cast_array`, [6]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:94 +assert_trap(() => invoke($0, `ref_cast_array`, [7]), `cast failure`); + +// ./test/core/gc/ref_cast.wast:99 +let $1 = instantiate(`(module + (type $$t0 (sub (struct))) + (type $$t1 (sub $$t0 (struct (field i32)))) + (type $$t1' (sub $$t0 (struct (field i32)))) + (type $$t2 (sub $$t1 (struct (field i32 i32)))) + (type $$t2' (sub $$t1' (struct (field i32 i32)))) + (type $$t3 (sub $$t0 (struct (field i32 i32)))) + (type $$t0' (sub $$t0 (struct))) + (type $$t4 (sub $$t0' (struct (field i32 i32)))) + + (table 20 (ref null struct)) + + (func $$init + (table.set (i32.const 0) (struct.new_default $$t0)) + (table.set (i32.const 10) (struct.new_default $$t0)) + (table.set (i32.const 1) (struct.new_default $$t1)) + (table.set (i32.const 11) (struct.new_default $$t1')) + (table.set (i32.const 2) (struct.new_default $$t2)) + (table.set (i32.const 12) (struct.new_default $$t2')) + (table.set (i32.const 3) (struct.new_default $$t3)) + (table.set (i32.const 4) (struct.new_default $$t4)) + ) + + (func (export "test-sub") + (call $$init) + + (drop (ref.cast (ref null $$t0) (ref.null struct))) + (drop (ref.cast (ref null $$t0) (table.get (i32.const 0)))) + (drop (ref.cast (ref null $$t0) (table.get (i32.const 1)))) + (drop (ref.cast (ref null $$t0) (table.get (i32.const 2)))) + (drop (ref.cast (ref null $$t0) (table.get (i32.const 3)))) + (drop (ref.cast (ref null $$t0) (table.get (i32.const 4)))) + + (drop (ref.cast (ref null $$t0) (ref.null struct))) + (drop (ref.cast (ref null $$t1) (table.get (i32.const 1)))) + (drop (ref.cast (ref null $$t1) (table.get (i32.const 2)))) + + (drop (ref.cast (ref null $$t0) (ref.null struct))) + (drop (ref.cast (ref null $$t2) (table.get (i32.const 2)))) + + (drop (ref.cast (ref null $$t0) (ref.null struct))) + (drop (ref.cast (ref null $$t3) (table.get (i32.const 3)))) + + (drop (ref.cast (ref null $$t4) (table.get (i32.const 4)))) + + (drop (ref.cast (ref $$t0) (table.get (i32.const 0)))) + (drop (ref.cast (ref $$t0) (table.get (i32.const 1)))) + (drop (ref.cast (ref $$t0) (table.get (i32.const 2)))) + (drop (ref.cast (ref $$t0) (table.get (i32.const 3)))) + (drop (ref.cast (ref $$t0) (table.get (i32.const 4)))) + + (drop (ref.cast (ref $$t1) (table.get (i32.const 1)))) + (drop (ref.cast (ref $$t1) (table.get (i32.const 2)))) + + (drop (ref.cast (ref $$t2) (table.get (i32.const 2)))) + + (drop (ref.cast (ref $$t3) (table.get (i32.const 3)))) + + (drop (ref.cast (ref $$t4) (table.get (i32.const 4)))) + ) + + (func (export "test-canon") + (call $$init) + + (drop (ref.cast (ref $$t0) (table.get (i32.const 0)))) + (drop (ref.cast (ref $$t0) (table.get (i32.const 1)))) + (drop (ref.cast (ref $$t0) (table.get (i32.const 2)))) + (drop (ref.cast (ref $$t0) (table.get (i32.const 3)))) + (drop (ref.cast (ref $$t0) (table.get (i32.const 4)))) + + (drop (ref.cast (ref $$t0) (table.get (i32.const 10)))) + (drop (ref.cast (ref $$t0) (table.get (i32.const 11)))) + (drop (ref.cast (ref $$t0) (table.get (i32.const 12)))) + + (drop (ref.cast (ref $$t1') (table.get (i32.const 1)))) + (drop (ref.cast (ref $$t1') (table.get (i32.const 2)))) + + (drop (ref.cast (ref $$t1) (table.get (i32.const 11)))) + (drop (ref.cast (ref $$t1) (table.get (i32.const 12)))) + + (drop (ref.cast (ref $$t2') (table.get (i32.const 2)))) + + (drop (ref.cast (ref $$t2) (table.get (i32.const 12)))) + ) +)`); + +// ./test/core/gc/ref_cast.wast:185 +invoke($1, `test-sub`, []); + +// ./test/core/gc/ref_cast.wast:186 +invoke($1, `test-canon`, []); diff --git a/js/src/jit-test/tests/wasm/spec/gc/ref_eq.wast.js b/js/src/jit-test/tests/wasm/spec/gc/ref_eq.wast.js new file mode 100644 index 0000000000..098e7a1396 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/ref_eq.wast.js @@ -0,0 +1,351 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/ref_eq.wast + +// ./test/core/gc/ref_eq.wast:1 +let $0 = instantiate(`(module + (type $$st (sub (struct))) + (type $$st' (sub (struct (field i32)))) + (type $$at (array i8)) + (type $$st-sub1 (sub $$st (struct))) + (type $$st-sub2 (sub $$st (struct))) + (type $$st'-sub1 (sub $$st' (struct (field i32)))) + (type $$st'-sub2 (sub $$st' (struct (field i32)))) + + (table 20 (ref null eq)) + + (func (export "init") + (table.set (i32.const 0) (ref.null eq)) + (table.set (i32.const 1) (ref.null i31)) + (table.set (i32.const 2) (ref.i31 (i32.const 7))) + (table.set (i32.const 3) (ref.i31 (i32.const 7))) + (table.set (i32.const 4) (ref.i31 (i32.const 8))) + (table.set (i32.const 5) (struct.new_default $$st)) + (table.set (i32.const 6) (struct.new_default $$st)) + (table.set (i32.const 7) (array.new_default $$at (i32.const 0))) + (table.set (i32.const 8) (array.new_default $$at (i32.const 0))) + ) + + (func (export "eq") (param $$i i32) (param $$j i32) (result i32) + (ref.eq (table.get (local.get $$i)) (table.get (local.get $$j))) + ) +)`); + +// ./test/core/gc/ref_eq.wast:29 +invoke($0, `init`, []); + +// ./test/core/gc/ref_eq.wast:31 +assert_return(() => invoke($0, `eq`, [0, 0]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:32 +assert_return(() => invoke($0, `eq`, [0, 1]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:33 +assert_return(() => invoke($0, `eq`, [0, 2]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:34 +assert_return(() => invoke($0, `eq`, [0, 3]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:35 +assert_return(() => invoke($0, `eq`, [0, 4]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:36 +assert_return(() => invoke($0, `eq`, [0, 5]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:37 +assert_return(() => invoke($0, `eq`, [0, 6]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:38 +assert_return(() => invoke($0, `eq`, [0, 7]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:39 +assert_return(() => invoke($0, `eq`, [0, 8]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:41 +assert_return(() => invoke($0, `eq`, [1, 0]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:42 +assert_return(() => invoke($0, `eq`, [1, 1]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:43 +assert_return(() => invoke($0, `eq`, [1, 2]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:44 +assert_return(() => invoke($0, `eq`, [1, 3]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:45 +assert_return(() => invoke($0, `eq`, [1, 4]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:46 +assert_return(() => invoke($0, `eq`, [1, 5]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:47 +assert_return(() => invoke($0, `eq`, [1, 6]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:48 +assert_return(() => invoke($0, `eq`, [1, 7]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:49 +assert_return(() => invoke($0, `eq`, [1, 8]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:51 +assert_return(() => invoke($0, `eq`, [2, 0]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:52 +assert_return(() => invoke($0, `eq`, [2, 1]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:53 +assert_return(() => invoke($0, `eq`, [2, 2]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:54 +assert_return(() => invoke($0, `eq`, [2, 3]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:55 +assert_return(() => invoke($0, `eq`, [2, 4]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:56 +assert_return(() => invoke($0, `eq`, [2, 5]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:57 +assert_return(() => invoke($0, `eq`, [2, 6]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:58 +assert_return(() => invoke($0, `eq`, [2, 7]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:59 +assert_return(() => invoke($0, `eq`, [2, 8]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:61 +assert_return(() => invoke($0, `eq`, [3, 0]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:62 +assert_return(() => invoke($0, `eq`, [3, 1]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:63 +assert_return(() => invoke($0, `eq`, [3, 2]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:64 +assert_return(() => invoke($0, `eq`, [3, 3]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:65 +assert_return(() => invoke($0, `eq`, [3, 4]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:66 +assert_return(() => invoke($0, `eq`, [3, 5]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:67 +assert_return(() => invoke($0, `eq`, [3, 6]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:68 +assert_return(() => invoke($0, `eq`, [3, 7]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:69 +assert_return(() => invoke($0, `eq`, [3, 8]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:71 +assert_return(() => invoke($0, `eq`, [4, 0]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:72 +assert_return(() => invoke($0, `eq`, [4, 1]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:73 +assert_return(() => invoke($0, `eq`, [4, 2]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:74 +assert_return(() => invoke($0, `eq`, [4, 3]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:75 +assert_return(() => invoke($0, `eq`, [4, 4]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:76 +assert_return(() => invoke($0, `eq`, [4, 5]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:77 +assert_return(() => invoke($0, `eq`, [4, 6]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:78 +assert_return(() => invoke($0, `eq`, [4, 7]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:79 +assert_return(() => invoke($0, `eq`, [4, 8]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:81 +assert_return(() => invoke($0, `eq`, [5, 0]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:82 +assert_return(() => invoke($0, `eq`, [5, 1]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:83 +assert_return(() => invoke($0, `eq`, [5, 2]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:84 +assert_return(() => invoke($0, `eq`, [5, 3]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:85 +assert_return(() => invoke($0, `eq`, [5, 4]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:86 +assert_return(() => invoke($0, `eq`, [5, 5]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:87 +assert_return(() => invoke($0, `eq`, [5, 6]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:88 +assert_return(() => invoke($0, `eq`, [5, 7]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:89 +assert_return(() => invoke($0, `eq`, [5, 8]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:91 +assert_return(() => invoke($0, `eq`, [6, 0]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:92 +assert_return(() => invoke($0, `eq`, [6, 1]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:93 +assert_return(() => invoke($0, `eq`, [6, 2]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:94 +assert_return(() => invoke($0, `eq`, [6, 3]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:95 +assert_return(() => invoke($0, `eq`, [6, 4]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:96 +assert_return(() => invoke($0, `eq`, [6, 5]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:97 +assert_return(() => invoke($0, `eq`, [6, 6]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:98 +assert_return(() => invoke($0, `eq`, [6, 7]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:99 +assert_return(() => invoke($0, `eq`, [6, 8]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:101 +assert_return(() => invoke($0, `eq`, [7, 0]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:102 +assert_return(() => invoke($0, `eq`, [7, 1]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:103 +assert_return(() => invoke($0, `eq`, [7, 2]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:104 +assert_return(() => invoke($0, `eq`, [7, 3]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:105 +assert_return(() => invoke($0, `eq`, [7, 4]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:106 +assert_return(() => invoke($0, `eq`, [7, 5]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:107 +assert_return(() => invoke($0, `eq`, [7, 6]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:108 +assert_return(() => invoke($0, `eq`, [7, 7]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:109 +assert_return(() => invoke($0, `eq`, [7, 8]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:111 +assert_return(() => invoke($0, `eq`, [8, 0]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:112 +assert_return(() => invoke($0, `eq`, [8, 1]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:113 +assert_return(() => invoke($0, `eq`, [8, 2]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:114 +assert_return(() => invoke($0, `eq`, [8, 3]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:115 +assert_return(() => invoke($0, `eq`, [8, 4]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:116 +assert_return(() => invoke($0, `eq`, [8, 5]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:117 +assert_return(() => invoke($0, `eq`, [8, 6]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:118 +assert_return(() => invoke($0, `eq`, [8, 7]), [value("i32", 0)]); + +// ./test/core/gc/ref_eq.wast:119 +assert_return(() => invoke($0, `eq`, [8, 8]), [value("i32", 1)]); + +// ./test/core/gc/ref_eq.wast:121 +assert_invalid( + () => instantiate(`(module + (func (export "eq") (param $$r (ref any)) (result i32) + (ref.eq (local.get $$r) (local.get $$r)) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/ref_eq.wast:129 +assert_invalid( + () => instantiate(`(module + (func (export "eq") (param $$r (ref null any)) (result i32) + (ref.eq (local.get $$r) (local.get $$r)) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/ref_eq.wast:137 +assert_invalid( + () => instantiate(`(module + (func (export "eq") (param $$r (ref func)) (result i32) + (ref.eq (local.get $$r) (local.get $$r)) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/ref_eq.wast:145 +assert_invalid( + () => instantiate(`(module + (func (export "eq") (param $$r (ref null func)) (result i32) + (ref.eq (local.get $$r) (local.get $$r)) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/ref_eq.wast:153 +assert_invalid( + () => instantiate(`(module + (func (export "eq") (param $$r (ref extern)) (result i32) + (ref.eq (local.get $$r) (local.get $$r)) + ) + )`), + `type mismatch`, +); + +// ./test/core/gc/ref_eq.wast:161 +assert_invalid( + () => instantiate(`(module + (func (export "eq") (param $$r (ref null extern)) (result i32) + (ref.eq (local.get $$r) (local.get $$r)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/gc/ref_null.wast.js b/js/src/jit-test/tests/wasm/spec/gc/ref_null.wast.js new file mode 100644 index 0000000000..46f1e2d50a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/ref_null.wast.js @@ -0,0 +1,127 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/ref_null.wast + +// ./test/core/ref_null.wast:1 +let $0 = instantiate(`(module + (type $$t (func)) + (func (export "anyref") (result anyref) (ref.null any)) + (func (export "funcref") (result funcref) (ref.null func)) + (func (export "ref") (result (ref null $$t)) (ref.null $$t)) + + (global anyref (ref.null any)) + (global funcref (ref.null func)) + (global (ref null $$t) (ref.null $$t)) +)`); + +// ./test/core/ref_null.wast:12 +assert_return(() => invoke($0, `anyref`, []), [value('anyref', null)]); + +// ./test/core/ref_null.wast:13 +assert_return(() => invoke($0, `funcref`, []), [value('anyfunc', null)]); + +// ./test/core/ref_null.wast:14 +assert_return(() => invoke($0, `ref`, []), [null]); + +// ./test/core/ref_null.wast:17 +let $1 = instantiate(`(module + (type $$t (func)) + (global $$null nullref (ref.null none)) + (global $$nullfunc nullfuncref (ref.null nofunc)) + (global $$nullextern nullexternref (ref.null noextern)) + (func (export "anyref") (result anyref) (global.get $$null)) + (func (export "nullref") (result nullref) (global.get $$null)) + (func (export "funcref") (result funcref) (global.get $$nullfunc)) + (func (export "nullfuncref") (result nullfuncref) (global.get $$nullfunc)) + (func (export "externref") (result externref) (global.get $$nullextern)) + (func (export "nullexternref") (result nullexternref) (global.get $$nullextern)) + (func (export "ref") (result (ref null $$t)) (global.get $$nullfunc)) + + (global anyref (ref.null any)) + (global anyref (ref.null none)) + (global funcref (ref.null func)) + (global funcref (ref.null nofunc)) + (global externref (ref.null extern)) + (global externref (ref.null noextern)) + (global nullref (ref.null none)) + (global nullfuncref (ref.null nofunc)) + (global nullexternref (ref.null noextern)) + (global (ref null $$t) (ref.null $$t)) + (global (ref null $$t) (ref.null nofunc)) +)`); + +// ./test/core/ref_null.wast:43 +assert_return(() => invoke($1, `anyref`, []), [value('anyref', null)]); + +// ./test/core/ref_null.wast:44 +assert_return(() => invoke($1, `anyref`, []), [value('nullref', null)]); + +// ./test/core/ref_null.wast:45 +assert_return(() => invoke($1, `anyref`, []), [null]); + +// ./test/core/ref_null.wast:46 +assert_return(() => invoke($1, `nullref`, []), [value('anyref', null)]); + +// ./test/core/ref_null.wast:47 +assert_return(() => invoke($1, `nullref`, []), [value('nullref', null)]); + +// ./test/core/ref_null.wast:48 +assert_return(() => invoke($1, `nullref`, []), [null]); + +// ./test/core/ref_null.wast:49 +assert_return(() => invoke($1, `funcref`, []), [value('anyfunc', null)]); + +// ./test/core/ref_null.wast:50 +assert_return(() => invoke($1, `funcref`, []), [value('nullfuncref', null)]); + +// ./test/core/ref_null.wast:51 +assert_return(() => invoke($1, `funcref`, []), [null]); + +// ./test/core/ref_null.wast:52 +assert_return(() => invoke($1, `nullfuncref`, []), [value('anyfunc', null)]); + +// ./test/core/ref_null.wast:53 +assert_return(() => invoke($1, `nullfuncref`, []), [value('nullfuncref', null)]); + +// ./test/core/ref_null.wast:54 +assert_return(() => invoke($1, `nullfuncref`, []), [null]); + +// ./test/core/ref_null.wast:55 +assert_return(() => invoke($1, `externref`, []), [value('externref', null)]); + +// ./test/core/ref_null.wast:56 +assert_return(() => invoke($1, `externref`, []), [value('nullexternref', null)]); + +// ./test/core/ref_null.wast:57 +assert_return(() => invoke($1, `externref`, []), [null]); + +// ./test/core/ref_null.wast:58 +assert_return(() => invoke($1, `nullexternref`, []), [value('externref', null)]); + +// ./test/core/ref_null.wast:59 +assert_return(() => invoke($1, `nullexternref`, []), [value('nullexternref', null)]); + +// ./test/core/ref_null.wast:60 +assert_return(() => invoke($1, `nullexternref`, []), [null]); + +// ./test/core/ref_null.wast:61 +assert_return(() => invoke($1, `ref`, []), [value('anyfunc', null)]); + +// ./test/core/ref_null.wast:62 +assert_return(() => invoke($1, `ref`, []), [value('nullfuncref', null)]); + +// ./test/core/ref_null.wast:63 +assert_return(() => invoke($1, `ref`, []), [null]); diff --git a/js/src/jit-test/tests/wasm/spec/gc/ref_test.wast.js b/js/src/jit-test/tests/wasm/spec/gc/ref_test.wast.js new file mode 100644 index 0000000000..fc0f2c0a4c --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/ref_test.wast.js @@ -0,0 +1,470 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/ref_test.wast + +// ./test/core/gc/ref_test.wast:3 +let $0 = instantiate(`(module + (type $$ft (func)) + (type $$st (struct)) + (type $$at (array i8)) + + (table $$ta 10 anyref) + (table $$tf 10 funcref) + (table $$te 10 externref) + + (elem declare func $$f) + (func $$f) + + (func (export "init") (param $$x externref) + (table.set $$ta (i32.const 0) (ref.null any)) + (table.set $$ta (i32.const 1) (ref.null struct)) + (table.set $$ta (i32.const 2) (ref.null none)) + (table.set $$ta (i32.const 3) (ref.i31 (i32.const 7))) + (table.set $$ta (i32.const 4) (struct.new_default $$st)) + (table.set $$ta (i32.const 5) (array.new_default $$at (i32.const 0))) + (table.set $$ta (i32.const 6) (any.convert_extern (local.get $$x))) + (table.set $$ta (i32.const 7) (any.convert_extern (ref.null extern))) + + (table.set $$tf (i32.const 0) (ref.null nofunc)) + (table.set $$tf (i32.const 1) (ref.null func)) + (table.set $$tf (i32.const 2) (ref.func $$f)) + + (table.set $$te (i32.const 0) (ref.null noextern)) + (table.set $$te (i32.const 1) (ref.null extern)) + (table.set $$te (i32.const 2) (local.get $$x)) + (table.set $$te (i32.const 3) (extern.convert_any (ref.i31 (i32.const 8)))) + (table.set $$te (i32.const 4) (extern.convert_any (struct.new_default $$st))) + (table.set $$te (i32.const 5) (extern.convert_any (ref.null any))) + ) + + (func (export "ref_test_null_data") (param $$i i32) (result i32) + (i32.add + (ref.is_null (table.get $$ta (local.get $$i))) + (ref.test nullref (table.get $$ta (local.get $$i))) + ) + ) + (func (export "ref_test_any") (param $$i i32) (result i32) + (i32.add + (ref.test (ref any) (table.get $$ta (local.get $$i))) + (ref.test anyref (table.get $$ta (local.get $$i))) + ) + ) + (func (export "ref_test_eq") (param $$i i32) (result i32) + (i32.add + (ref.test (ref eq) (table.get $$ta (local.get $$i))) + (ref.test eqref (table.get $$ta (local.get $$i))) + ) + ) + (func (export "ref_test_i31") (param $$i i32) (result i32) + (i32.add + (ref.test (ref i31) (table.get $$ta (local.get $$i))) + (ref.test i31ref (table.get $$ta (local.get $$i))) + ) + ) + (func (export "ref_test_struct") (param $$i i32) (result i32) + (i32.add + (ref.test (ref struct) (table.get $$ta (local.get $$i))) + (ref.test structref (table.get $$ta (local.get $$i))) + ) + ) + (func (export "ref_test_array") (param $$i i32) (result i32) + (i32.add + (ref.test (ref array) (table.get $$ta (local.get $$i))) + (ref.test arrayref (table.get $$ta (local.get $$i))) + ) + ) + + (func (export "ref_test_null_func") (param $$i i32) (result i32) + (i32.add + (ref.is_null (table.get $$tf (local.get $$i))) + (ref.test (ref null nofunc) (table.get $$tf (local.get $$i))) + ) + ) + (func (export "ref_test_func") (param $$i i32) (result i32) + (i32.add + (ref.test (ref func) (table.get $$tf (local.get $$i))) + (ref.test funcref (table.get $$tf (local.get $$i))) + ) + ) + + (func (export "ref_test_null_extern") (param $$i i32) (result i32) + (i32.add + (ref.is_null (table.get $$te (local.get $$i))) + (ref.test (ref null noextern) (table.get $$te (local.get $$i))) + ) + ) + (func (export "ref_test_extern") (param $$i i32) (result i32) + (i32.add + (ref.test (ref extern) (table.get $$te (local.get $$i))) + (ref.test externref (table.get $$te (local.get $$i))) + ) + ) +)`); + +// ./test/core/gc/ref_test.wast:101 +invoke($0, `init`, [externref(0)]); + +// ./test/core/gc/ref_test.wast:103 +assert_return(() => invoke($0, `ref_test_null_data`, [0]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:104 +assert_return(() => invoke($0, `ref_test_null_data`, [1]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:105 +assert_return(() => invoke($0, `ref_test_null_data`, [2]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:106 +assert_return(() => invoke($0, `ref_test_null_data`, [3]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:107 +assert_return(() => invoke($0, `ref_test_null_data`, [4]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:108 +assert_return(() => invoke($0, `ref_test_null_data`, [5]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:109 +assert_return(() => invoke($0, `ref_test_null_data`, [6]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:110 +assert_return(() => invoke($0, `ref_test_null_data`, [7]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:112 +assert_return(() => invoke($0, `ref_test_any`, [0]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:113 +assert_return(() => invoke($0, `ref_test_any`, [1]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:114 +assert_return(() => invoke($0, `ref_test_any`, [2]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:115 +assert_return(() => invoke($0, `ref_test_any`, [3]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:116 +assert_return(() => invoke($0, `ref_test_any`, [4]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:117 +assert_return(() => invoke($0, `ref_test_any`, [5]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:118 +assert_return(() => invoke($0, `ref_test_any`, [6]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:119 +assert_return(() => invoke($0, `ref_test_any`, [7]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:121 +assert_return(() => invoke($0, `ref_test_eq`, [0]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:122 +assert_return(() => invoke($0, `ref_test_eq`, [1]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:123 +assert_return(() => invoke($0, `ref_test_eq`, [2]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:124 +assert_return(() => invoke($0, `ref_test_eq`, [3]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:125 +assert_return(() => invoke($0, `ref_test_eq`, [4]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:126 +assert_return(() => invoke($0, `ref_test_eq`, [5]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:127 +assert_return(() => invoke($0, `ref_test_eq`, [6]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:128 +assert_return(() => invoke($0, `ref_test_eq`, [7]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:130 +assert_return(() => invoke($0, `ref_test_i31`, [0]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:131 +assert_return(() => invoke($0, `ref_test_i31`, [1]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:132 +assert_return(() => invoke($0, `ref_test_i31`, [2]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:133 +assert_return(() => invoke($0, `ref_test_i31`, [3]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:134 +assert_return(() => invoke($0, `ref_test_i31`, [4]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:135 +assert_return(() => invoke($0, `ref_test_i31`, [5]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:136 +assert_return(() => invoke($0, `ref_test_i31`, [6]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:137 +assert_return(() => invoke($0, `ref_test_i31`, [7]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:139 +assert_return(() => invoke($0, `ref_test_struct`, [0]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:140 +assert_return(() => invoke($0, `ref_test_struct`, [1]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:141 +assert_return(() => invoke($0, `ref_test_struct`, [2]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:142 +assert_return(() => invoke($0, `ref_test_struct`, [3]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:143 +assert_return(() => invoke($0, `ref_test_struct`, [4]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:144 +assert_return(() => invoke($0, `ref_test_struct`, [5]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:145 +assert_return(() => invoke($0, `ref_test_struct`, [6]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:146 +assert_return(() => invoke($0, `ref_test_struct`, [7]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:148 +assert_return(() => invoke($0, `ref_test_array`, [0]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:149 +assert_return(() => invoke($0, `ref_test_array`, [1]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:150 +assert_return(() => invoke($0, `ref_test_array`, [2]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:151 +assert_return(() => invoke($0, `ref_test_array`, [3]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:152 +assert_return(() => invoke($0, `ref_test_array`, [4]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:153 +assert_return(() => invoke($0, `ref_test_array`, [5]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:154 +assert_return(() => invoke($0, `ref_test_array`, [6]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:155 +assert_return(() => invoke($0, `ref_test_array`, [7]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:157 +assert_return(() => invoke($0, `ref_test_null_func`, [0]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:158 +assert_return(() => invoke($0, `ref_test_null_func`, [1]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:159 +assert_return(() => invoke($0, `ref_test_null_func`, [2]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:161 +assert_return(() => invoke($0, `ref_test_func`, [0]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:162 +assert_return(() => invoke($0, `ref_test_func`, [1]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:163 +assert_return(() => invoke($0, `ref_test_func`, [2]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:165 +assert_return(() => invoke($0, `ref_test_null_extern`, [0]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:166 +assert_return(() => invoke($0, `ref_test_null_extern`, [1]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:167 +assert_return(() => invoke($0, `ref_test_null_extern`, [2]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:168 +assert_return(() => invoke($0, `ref_test_null_extern`, [3]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:169 +assert_return(() => invoke($0, `ref_test_null_extern`, [4]), [value("i32", 0)]); + +// ./test/core/gc/ref_test.wast:170 +assert_return(() => invoke($0, `ref_test_null_extern`, [5]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:172 +assert_return(() => invoke($0, `ref_test_extern`, [0]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:173 +assert_return(() => invoke($0, `ref_test_extern`, [1]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:174 +assert_return(() => invoke($0, `ref_test_extern`, [2]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:175 +assert_return(() => invoke($0, `ref_test_extern`, [3]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:176 +assert_return(() => invoke($0, `ref_test_extern`, [4]), [value("i32", 2)]); + +// ./test/core/gc/ref_test.wast:177 +assert_return(() => invoke($0, `ref_test_extern`, [5]), [value("i32", 1)]); + +// ./test/core/gc/ref_test.wast:182 +let $1 = instantiate(`(module + (type $$t0 (sub (struct))) + (type $$t1 (sub $$t0 (struct (field i32)))) + (type $$t1' (sub $$t0 (struct (field i32)))) + (type $$t2 (sub $$t1 (struct (field i32 i32)))) + (type $$t2' (sub $$t1' (struct (field i32 i32)))) + (type $$t3 (sub $$t0 (struct (field i32 i32)))) + (type $$t0' (sub $$t0 (struct))) + (type $$t4 (sub $$t0' (struct (field i32 i32)))) + + (table 20 (ref null struct)) + + (func $$init + (table.set (i32.const 0) (struct.new_default $$t0)) + (table.set (i32.const 10) (struct.new_default $$t0)) + (table.set (i32.const 1) (struct.new_default $$t1)) + (table.set (i32.const 11) (struct.new_default $$t1')) + (table.set (i32.const 2) (struct.new_default $$t2)) + (table.set (i32.const 12) (struct.new_default $$t2')) + (table.set (i32.const 3) (struct.new_default $$t3)) + (table.set (i32.const 4) (struct.new_default $$t4)) + ) + + (func (export "test-sub") + (call $$init) + (block $$l + ;; must hold + (br_if $$l (i32.eqz (ref.test (ref null $$t0) (ref.null struct)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t0) (ref.null $$t0)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t0) (ref.null $$t1)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t0) (ref.null $$t2)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t0) (ref.null $$t3)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t0) (ref.null $$t4)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t0) (table.get (i32.const 0))))) + (br_if $$l (i32.eqz (ref.test (ref null $$t0) (table.get (i32.const 1))))) + (br_if $$l (i32.eqz (ref.test (ref null $$t0) (table.get (i32.const 2))))) + (br_if $$l (i32.eqz (ref.test (ref null $$t0) (table.get (i32.const 3))))) + (br_if $$l (i32.eqz (ref.test (ref null $$t0) (table.get (i32.const 4))))) + + (br_if $$l (i32.eqz (ref.test (ref null $$t1) (ref.null struct)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t1) (ref.null $$t0)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t1) (ref.null $$t1)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t1) (ref.null $$t2)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t1) (ref.null $$t3)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t1) (ref.null $$t4)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t1) (table.get (i32.const 1))))) + (br_if $$l (i32.eqz (ref.test (ref null $$t1) (table.get (i32.const 2))))) + + (br_if $$l (i32.eqz (ref.test (ref null $$t2) (ref.null struct)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t2) (ref.null $$t0)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t2) (ref.null $$t1)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t2) (ref.null $$t2)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t2) (ref.null $$t3)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t2) (ref.null $$t4)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t2) (table.get (i32.const 2))))) + + (br_if $$l (i32.eqz (ref.test (ref null $$t3) (ref.null struct)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t3) (ref.null $$t0)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t3) (ref.null $$t1)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t3) (ref.null $$t2)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t3) (ref.null $$t3)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t3) (ref.null $$t4)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t3) (table.get (i32.const 3))))) + + (br_if $$l (i32.eqz (ref.test (ref null $$t4) (ref.null struct)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t4) (ref.null $$t0)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t4) (ref.null $$t1)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t4) (ref.null $$t2)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t4) (ref.null $$t3)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t4) (ref.null $$t4)))) + (br_if $$l (i32.eqz (ref.test (ref null $$t4) (table.get (i32.const 4))))) + + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 0))))) + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 1))))) + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 2))))) + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 3))))) + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 4))))) + + (br_if $$l (i32.eqz (ref.test (ref $$t1) (table.get (i32.const 1))))) + (br_if $$l (i32.eqz (ref.test (ref $$t1) (table.get (i32.const 2))))) + + (br_if $$l (i32.eqz (ref.test (ref $$t2) (table.get (i32.const 2))))) + + (br_if $$l (i32.eqz (ref.test (ref $$t3) (table.get (i32.const 3))))) + + (br_if $$l (i32.eqz (ref.test (ref $$t4) (table.get (i32.const 4))))) + + ;; must not hold + (br_if $$l (ref.test (ref $$t0) (ref.null struct))) + (br_if $$l (ref.test (ref $$t1) (ref.null struct))) + (br_if $$l (ref.test (ref $$t2) (ref.null struct))) + (br_if $$l (ref.test (ref $$t3) (ref.null struct))) + (br_if $$l (ref.test (ref $$t4) (ref.null struct))) + + (br_if $$l (ref.test (ref $$t1) (table.get (i32.const 0)))) + (br_if $$l (ref.test (ref $$t1) (table.get (i32.const 3)))) + (br_if $$l (ref.test (ref $$t1) (table.get (i32.const 4)))) + + (br_if $$l (ref.test (ref $$t2) (table.get (i32.const 0)))) + (br_if $$l (ref.test (ref $$t2) (table.get (i32.const 1)))) + (br_if $$l (ref.test (ref $$t2) (table.get (i32.const 3)))) + (br_if $$l (ref.test (ref $$t2) (table.get (i32.const 4)))) + + (br_if $$l (ref.test (ref $$t3) (table.get (i32.const 0)))) + (br_if $$l (ref.test (ref $$t3) (table.get (i32.const 1)))) + (br_if $$l (ref.test (ref $$t3) (table.get (i32.const 2)))) + (br_if $$l (ref.test (ref $$t3) (table.get (i32.const 4)))) + + (br_if $$l (ref.test (ref $$t4) (table.get (i32.const 0)))) + (br_if $$l (ref.test (ref $$t4) (table.get (i32.const 1)))) + (br_if $$l (ref.test (ref $$t4) (table.get (i32.const 2)))) + (br_if $$l (ref.test (ref $$t4) (table.get (i32.const 3)))) + + (return) + ) + (unreachable) + ) + + (func (export "test-canon") + (call $$init) + (block $$l + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 0))))) + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 1))))) + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 2))))) + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 3))))) + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 4))))) + + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 10))))) + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 11))))) + (br_if $$l (i32.eqz (ref.test (ref $$t0) (table.get (i32.const 12))))) + + (br_if $$l (i32.eqz (ref.test (ref $$t1') (table.get (i32.const 1))))) + (br_if $$l (i32.eqz (ref.test (ref $$t1') (table.get (i32.const 2))))) + + (br_if $$l (i32.eqz (ref.test (ref $$t1) (table.get (i32.const 11))))) + (br_if $$l (i32.eqz (ref.test (ref $$t1) (table.get (i32.const 12))))) + + (br_if $$l (i32.eqz (ref.test (ref $$t2') (table.get (i32.const 2))))) + + (br_if $$l (i32.eqz (ref.test (ref $$t2) (table.get (i32.const 12))))) + + (return) + ) + (unreachable) + ) +)`); + +// ./test/core/gc/ref_test.wast:329 +assert_return(() => invoke($1, `test-sub`, []), []); + +// ./test/core/gc/ref_test.wast:330 +assert_return(() => invoke($1, `test-canon`, []), []); diff --git a/js/src/jit-test/tests/wasm/spec/gc/struct.wast.js b/js/src/jit-test/tests/wasm/spec/gc/struct.wast.js new file mode 100644 index 0000000000..24b57b8466 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/struct.wast.js @@ -0,0 +1,271 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/struct.wast + +// ./test/core/gc/struct.wast:3 +let $0 = instantiate(`(module + (type (struct)) + (type (struct (field))) + (type (struct (field i8))) + (type (struct (field i8 i8 i8 i8))) + (type (struct (field $$x1 i32) (field $$y1 i32))) + (type (struct (field i8 i16 i32 i64 f32 f64 anyref funcref (ref 0) (ref null 1)))) + (type (struct (field i32 i64 i8) (field) (field) (field (ref null i31) anyref))) + (type (struct (field $$x2 i32) (field f32 f64) (field $$y2 i32))) +)`); + +// ./test/core/gc/struct.wast:15 +assert_malformed( + () => instantiate(`(type (struct (field $$x i32) (field $$x i32))) `), + `duplicate field`, +); + +// ./test/core/gc/struct.wast:25 +let $1 = instantiate(`(module + (rec + (type $$s0 (struct (field (ref 0) (ref 1) (ref $$s0) (ref $$s1)))) + (type $$s1 (struct (field (ref 0) (ref 1) (ref $$s0) (ref $$s1)))) + ) + + (func (param (ref $$forward))) + + (type $$forward (struct)) +)`); + +// ./test/core/gc/struct.wast:36 +assert_invalid( + () => instantiate(`(module (type (struct (field (ref 1)))))`), + `unknown type`, +); + +// ./test/core/gc/struct.wast:40 +assert_invalid( + () => instantiate(`(module (type (struct (field (mut (ref 1))))))`), + `unknown type`, +); + +// ./test/core/gc/struct.wast:48 +let $2 = instantiate(`(module + (type (struct (field $$x i32))) + (type $$t1 (struct (field i32) (field $$x f32))) + (type $$t2 (struct (field i32 i32) (field $$x i64))) + + (func (param (ref 0)) (result i32) (struct.get 0 $$x (local.get 0))) + (func (param (ref $$t1)) (result f32) (struct.get 1 $$x (local.get 0))) + (func (param (ref $$t2)) (result i64) (struct.get $$t2 $$x (local.get 0))) +)`); + +// ./test/core/gc/struct.wast:58 +assert_invalid( + () => instantiate(`(module + (type (struct (field $$x i64))) + (type $$t (struct (field $$x i32))) + (func (param (ref 0)) (result i32) (struct.get 0 $$x (local.get 0))) + )`), + `type mismatch`, +); + +// ./test/core/gc/struct.wast:70 +let $3 = instantiate(`(module + (type $$vec (struct (field f32) (field $$y (mut f32)) (field $$z f32))) + + (global (ref $$vec) (struct.new $$vec (f32.const 1) (f32.const 2) (f32.const 3))) + (global (ref $$vec) (struct.new_default $$vec)) + + (func (export "new") (result anyref) + (struct.new_default $$vec) + ) + + (func $$get_0_0 (param $$v (ref $$vec)) (result f32) + (struct.get 0 0 (local.get $$v)) + ) + (func (export "get_0_0") (result f32) + (call $$get_0_0 (struct.new_default $$vec)) + ) + (func $$get_vec_0 (param $$v (ref $$vec)) (result f32) + (struct.get $$vec 0 (local.get $$v)) + ) + (func (export "get_vec_0") (result f32) + (call $$get_vec_0 (struct.new_default $$vec)) + ) + (func $$get_0_y (param $$v (ref $$vec)) (result f32) + (struct.get 0 $$y (local.get $$v)) + ) + (func (export "get_0_y") (result f32) + (call $$get_0_y (struct.new_default $$vec)) + ) + (func $$get_vec_y (param $$v (ref $$vec)) (result f32) + (struct.get $$vec $$y (local.get $$v)) + ) + (func (export "get_vec_y") (result f32) + (call $$get_vec_y (struct.new_default $$vec)) + ) + + (func $$set_get_y (param $$v (ref $$vec)) (param $$y f32) (result f32) + (struct.set $$vec $$y (local.get $$v) (local.get $$y)) + (struct.get $$vec $$y (local.get $$v)) + ) + (func (export "set_get_y") (param $$y f32) (result f32) + (call $$set_get_y (struct.new_default $$vec) (local.get $$y)) + ) + + (func $$set_get_1 (param $$v (ref $$vec)) (param $$y f32) (result f32) + (struct.set $$vec 1 (local.get $$v) (local.get $$y)) + (struct.get $$vec $$y (local.get $$v)) + ) + (func (export "set_get_1") (param $$y f32) (result f32) + (call $$set_get_1 (struct.new_default $$vec) (local.get $$y)) + ) +)`); + +// ./test/core/gc/struct.wast:122 +assert_return(() => invoke($3, `new`, []), [new RefWithType('structref')]); + +// ./test/core/gc/struct.wast:124 +assert_return(() => invoke($3, `get_0_0`, []), [value("f32", 0)]); + +// ./test/core/gc/struct.wast:125 +assert_return(() => invoke($3, `get_vec_0`, []), [value("f32", 0)]); + +// ./test/core/gc/struct.wast:126 +assert_return(() => invoke($3, `get_0_y`, []), [value("f32", 0)]); + +// ./test/core/gc/struct.wast:127 +assert_return(() => invoke($3, `get_vec_y`, []), [value("f32", 0)]); + +// ./test/core/gc/struct.wast:129 +assert_return(() => invoke($3, `set_get_y`, [value("f32", 7)]), [value("f32", 7)]); + +// ./test/core/gc/struct.wast:130 +assert_return(() => invoke($3, `set_get_1`, [value("f32", 7)]), [value("f32", 7)]); + +// ./test/core/gc/struct.wast:132 +assert_invalid( + () => instantiate(`(module + (type $$s (struct (field i64))) + (func (export "struct.set-immutable") (param $$s (ref $$s)) + (struct.set $$s 0 (local.get $$s) (i64.const 1)) + ) + )`), + `field is immutable`, +); + +// ./test/core/gc/struct.wast:145 +let $4 = instantiate(`(module + (type $$t (struct (field i32 (mut i32)))) + (func (export "struct.get-null") + (local (ref null $$t)) (drop (struct.get $$t 1 (local.get 0))) + ) + (func (export "struct.set-null") + (local (ref null $$t)) (struct.set $$t 1 (local.get 0) (i32.const 0)) + ) +)`); + +// ./test/core/gc/struct.wast:155 +assert_trap(() => invoke($4, `struct.get-null`, []), `null structure reference`); + +// ./test/core/gc/struct.wast:156 +assert_trap(() => invoke($4, `struct.set-null`, []), `null structure reference`); + +// ./test/core/gc/struct.wast:160 +let $5 = instantiate(`(module + (type $$s (struct (field i8) (field (mut i8)) (field i16) (field (mut i16)))) + + (global (export "g0") (ref $$s) (struct.new $$s (i32.const 0) (i32.const 1) (i32.const 2) (i32.const 3))) + (global (export "g1") (ref $$s) (struct.new $$s (i32.const 254) (i32.const 255) (i32.const 65534) (i32.const 65535))) + + (func (export "get_packed_g0_0") (result i32 i32) + (struct.get_s 0 0 (global.get 0)) + (struct.get_u 0 0 (global.get 0)) + ) + + (func (export "get_packed_g1_0") (result i32 i32) + (struct.get_s 0 0 (global.get 1)) + (struct.get_u 0 0 (global.get 1)) + ) + + (func (export "get_packed_g0_1") (result i32 i32) + (struct.get_s 0 1 (global.get 0)) + (struct.get_u 0 1 (global.get 0)) + ) + + (func (export "get_packed_g1_1") (result i32 i32) + (struct.get_s 0 1 (global.get 1)) + (struct.get_u 0 1 (global.get 1)) + ) + + (func (export "get_packed_g0_2") (result i32 i32) + (struct.get_s 0 2 (global.get 0)) + (struct.get_u 0 2 (global.get 0)) + ) + + (func (export "get_packed_g1_2") (result i32 i32) + (struct.get_s 0 2 (global.get 1)) + (struct.get_u 0 2 (global.get 1)) + ) + + (func (export "get_packed_g0_3") (result i32 i32) + (struct.get_s 0 3 (global.get 0)) + (struct.get_u 0 3 (global.get 0)) + ) + + (func (export "get_packed_g1_3") (result i32 i32) + (struct.get_s 0 3 (global.get 1)) + (struct.get_u 0 3 (global.get 1)) + ) + + (func (export "set_get_packed_g0_1") (param i32) (result i32 i32) + (struct.set 0 1 (global.get 0) (local.get 0)) + (struct.get_s 0 1 (global.get 0)) + (struct.get_u 0 1 (global.get 0)) + ) + + (func (export "set_get_packed_g0_3") (param i32) (result i32 i32) + (struct.set 0 3 (global.get 0) (local.get 0)) + (struct.get_s 0 3 (global.get 0)) + (struct.get_u 0 3 (global.get 0)) + ) +)`); + +// ./test/core/gc/struct.wast:219 +assert_return(() => invoke($5, `get_packed_g0_0`, []), [value("i32", 0), value("i32", 0)]); + +// ./test/core/gc/struct.wast:220 +assert_return(() => invoke($5, `get_packed_g1_0`, []), [value("i32", -2), value("i32", 254)]); + +// ./test/core/gc/struct.wast:221 +assert_return(() => invoke($5, `get_packed_g0_1`, []), [value("i32", 1), value("i32", 1)]); + +// ./test/core/gc/struct.wast:222 +assert_return(() => invoke($5, `get_packed_g1_1`, []), [value("i32", -1), value("i32", 255)]); + +// ./test/core/gc/struct.wast:223 +assert_return(() => invoke($5, `get_packed_g0_2`, []), [value("i32", 2), value("i32", 2)]); + +// ./test/core/gc/struct.wast:224 +assert_return(() => invoke($5, `get_packed_g1_2`, []), [value("i32", -2), value("i32", 65534)]); + +// ./test/core/gc/struct.wast:225 +assert_return(() => invoke($5, `get_packed_g0_3`, []), [value("i32", 3), value("i32", 3)]); + +// ./test/core/gc/struct.wast:226 +assert_return(() => invoke($5, `get_packed_g1_3`, []), [value("i32", -1), value("i32", 65535)]); + +// ./test/core/gc/struct.wast:228 +assert_return(() => invoke($5, `set_get_packed_g0_1`, [257]), [value("i32", 1), value("i32", 1)]); + +// ./test/core/gc/struct.wast:229 +assert_return(() => invoke($5, `set_get_packed_g0_3`, [257]), [value("i32", 257), value("i32", 257)]); diff --git a/js/src/jit-test/tests/wasm/spec/gc/token.wast.js b/js/src/jit-test/tests/wasm/spec/gc/token.wast.js new file mode 100644 index 0000000000..6d8f63faae --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/token.wast.js @@ -0,0 +1,289 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/token.wast + +// ./test/core/token.wast:3 +assert_malformed(() => instantiate(`(func (drop (i32.const0))) `), `unknown operator`); + +// ./test/core/token.wast:7 +assert_malformed(() => instantiate(`(func br 0drop) `), `unknown operator`); + +// ./test/core/token.wast:15 +let $0 = instantiate(`(module + (func(nop)) +)`); + +// ./test/core/token.wast:18 +let $1 = instantiate(`(module + (func (nop)nop) +)`); + +// ./test/core/token.wast:21 +let $2 = instantiate(`(module + (func nop(nop)) +)`); + +// ./test/core/token.wast:24 +let $3 = instantiate(`(module + (func(nop)(nop)) +)`); + +// ./test/core/token.wast:27 +let $4 = instantiate(`(module + (func $$f(nop)) +)`); + +// ./test/core/token.wast:30 +let $5 = instantiate(`(module + (func br 0(nop)) +)`); + +// ./test/core/token.wast:33 +let $6 = instantiate(`(module + (table 1 funcref) + (func) + (elem (i32.const 0)0) +)`); + +// ./test/core/token.wast:38 +let $7 = instantiate(`(module + (table 1 funcref) + (func $$f) + (elem (i32.const 0)$$f) +)`); + +// ./test/core/token.wast:43 +let $8 = instantiate(`(module + (memory 1) + (data (i32.const 0)"a") +)`); + +// ./test/core/token.wast:47 +let $9 = instantiate(`(module + (import "spectest" "print"(func)) +)`); + +// ./test/core/token.wast:54 +let $10 = instantiate(`(module + (func;;bla + ) +)`); + +// ./test/core/token.wast:58 +let $11 = instantiate(`(module + (func (nop);;bla + ) +)`); + +// ./test/core/token.wast:62 +let $12 = instantiate(`(module + (func nop;;bla + ) +)`); + +// ./test/core/token.wast:66 +let $13 = instantiate(`(module + (func $$f;;bla + ) +)`); + +// ./test/core/token.wast:70 +let $14 = instantiate(`(module + (func br 0;;bla + ) +)`); + +// ./test/core/token.wast:74 +let $15 = instantiate(`(module + (data "a";;bla + ) +)`); + +// ./test/core/token.wast:82 +let $16 = instantiate(`(module + (func (block $$l (i32.const 0) (br_table 0 $$l))) +)`); + +// ./test/core/token.wast:85 +assert_malformed( + () => instantiate(`(func (block $$l (i32.const 0) (br_table 0$$l))) `), + `unknown operator`, +); + +// ./test/core/token.wast:92 +let $17 = instantiate(`(module + (func (block $$l (i32.const 0) (br_table $$l 0))) +)`); + +// ./test/core/token.wast:95 +assert_malformed( + () => instantiate(`(func (block $$l (i32.const 0) (br_table $$l0))) `), + `unknown label`, +); + +// ./test/core/token.wast:102 +let $18 = instantiate(`(module + (func (block $$l (i32.const 0) (br_table $$l $$l))) +)`); + +// ./test/core/token.wast:105 +assert_malformed( + () => instantiate(`(func (block $$l (i32.const 0) (br_table $$l$$l))) `), + `unknown label`, +); + +// ./test/core/token.wast:112 +let $19 = instantiate(`(module + (func (block $$l0 (i32.const 0) (br_table $$l0))) +)`); + +// ./test/core/token.wast:115 +let $20 = instantiate(`(module + (func (block $$l$$l (i32.const 0) (br_table $$l$$l))) +)`); + +// ./test/core/token.wast:122 +let $21 = instantiate(`(module + (data "a") +)`); + +// ./test/core/token.wast:125 +assert_malformed(() => instantiate(`(data"a") `), `unknown operator`); + +// ./test/core/token.wast:132 +let $22 = instantiate(`(module + (data $$l "a") +)`); + +// ./test/core/token.wast:135 +assert_malformed(() => instantiate(`(data $$l"a") `), `unknown operator`); + +// ./test/core/token.wast:142 +let $23 = instantiate(`(module + (data $$l " a") +)`); + +// ./test/core/token.wast:145 +assert_malformed(() => instantiate(`(data $$l" a") `), `unknown operator`); + +// ./test/core/token.wast:152 +let $24 = instantiate(`(module + (data $$l "a ") +)`); + +// ./test/core/token.wast:155 +assert_malformed(() => instantiate(`(data $$l"a ") `), `unknown operator`); + +// ./test/core/token.wast:162 +let $25 = instantiate(`(module + (data $$l "a " "b") +)`); + +// ./test/core/token.wast:165 +assert_malformed(() => instantiate(`(data $$l"a ""b") `), `unknown operator`); + +// ./test/core/token.wast:172 +let $26 = instantiate(`(module + (data $$l "\u{f61a}\u{f4a9}") +)`); + +// ./test/core/token.wast:175 +assert_malformed(() => instantiate(`(data $$l"\u{f61a}\u{f4a9}") `), `unknown operator`); + +// ./test/core/token.wast:182 +let $27 = instantiate(`(module + (data $$l " \u{f61a}\u{f4a9}") +)`); + +// ./test/core/token.wast:185 +assert_malformed(() => instantiate(`(data $$l" \u{f61a}\u{f4a9}") `), `unknown operator`); + +// ./test/core/token.wast:192 +let $28 = instantiate(`(module + (data $$l "\u{f61a}\u{f4a9} ") +)`); + +// ./test/core/token.wast:195 +assert_malformed(() => instantiate(`(data $$l"\u{f61a}\u{f4a9} ") `), `unknown operator`); + +// ./test/core/token.wast:202 +let $29 = instantiate(`(module + (data "a" "b") +)`); + +// ./test/core/token.wast:205 +assert_malformed(() => instantiate(`(data "a""b") `), `unknown operator`); + +// ./test/core/token.wast:212 +let $30 = instantiate(`(module + (data "a" " b") +)`); + +// ./test/core/token.wast:215 +assert_malformed(() => instantiate(`(data "a"" b") `), `unknown operator`); + +// ./test/core/token.wast:222 +let $31 = instantiate(`(module + (data "a " "b") +)`); + +// ./test/core/token.wast:225 +assert_malformed(() => instantiate(`(data "a ""b") `), `unknown operator`); + +// ./test/core/token.wast:232 +let $32 = instantiate(`(module + (data "\u{f61a}\u{f4a9}" "\u{f61a}\u{f4a9}") +)`); + +// ./test/core/token.wast:235 +assert_malformed( + () => instantiate(`(data "\u{f61a}\u{f4a9}""\u{f61a}\u{f4a9}") `), + `unknown operator`, +); + +// ./test/core/token.wast:242 +let $33 = instantiate(`(module + (data "\u{f61a}\u{f4a9}" " \u{f61a}\u{f4a9}") +)`); + +// ./test/core/token.wast:245 +assert_malformed( + () => instantiate(`(data "\u{f61a}\u{f4a9}"" \u{f61a}\u{f4a9}") `), + `unknown operator`, +); + +// ./test/core/token.wast:252 +let $34 = instantiate(`(module + (data "\u{f61a}\u{f4a9} " "\u{f61a}\u{f4a9}") +)`); + +// ./test/core/token.wast:255 +assert_malformed( + () => instantiate(`(data "\u{f61a}\u{f4a9} ""\u{f61a}\u{f4a9}") `), + `unknown operator`, +); + +// ./test/core/token.wast:263 +assert_malformed(() => instantiate(`(func "a"x) `), `unknown operator`); + +// ./test/core/token.wast:269 +assert_malformed(() => instantiate(`(func "a"0) `), `unknown operator`); + +// ./test/core/token.wast:275 +assert_malformed(() => instantiate(`(func 0"a") `), `unknown operator`); + +// ./test/core/token.wast:281 +assert_malformed(() => instantiate(`(func "a"$$x) `), `unknown operator`); diff --git a/js/src/jit-test/tests/wasm/spec/gc/type-canon.wast.js b/js/src/jit-test/tests/wasm/spec/gc/type-canon.wast.js new file mode 100644 index 0000000000..52d48143ee --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/type-canon.wast.js @@ -0,0 +1,36 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/type-canon.wast + +// ./test/core/type-canon.wast:1 +let $0 = instantiate(`(module + (rec + (type $$t1 (func (param i32 (ref $$t3)))) + (type $$t2 (func (param i32 (ref $$t1)))) + (type $$t3 (func (param i32 (ref $$t2)))) + ) +)`); + +// ./test/core/type-canon.wast:9 +let $1 = instantiate(`(module + (rec + (type $$t0 (func (param i32 (ref $$t2) (ref $$t3)))) + (type $$t1 (func (param i32 (ref $$t0) i32 (ref $$t4)))) + (type $$t2 (func (param i32 (ref $$t2) (ref $$t1)))) + (type $$t3 (func (param i32 (ref $$t2) i32 (ref $$t4)))) + (type $$t4 (func (param (ref $$t0) (ref $$t2)))) + ) +)`); diff --git a/js/src/jit-test/tests/wasm/spec/gc/type-equivalence.wast.js b/js/src/jit-test/tests/wasm/spec/gc/type-equivalence.wast.js new file mode 100644 index 0000000000..447729927e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/type-equivalence.wast.js @@ -0,0 +1,345 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/type-equivalence.wast + +// ./test/core/type-equivalence.wast:5 +let $0 = instantiate(`(module + (type $$t1 (func (param f32 f32) (result f32))) + (type $$t2 (func (param $$x f32) (param $$y f32) (result f32))) + + (func $$f1 (param $$r (ref $$t1)) (call $$f2 (local.get $$r))) + (func $$f2 (param $$r (ref $$t2)) (call $$f1 (local.get $$r))) +)`); + +// ./test/core/type-equivalence.wast:16 +let $1 = instantiate(`(module + (type $$s0 (func (param i32) (result f32))) + (type $$s1 (func (param i32 (ref $$s0)) (result (ref $$s0)))) + (type $$s2 (func (param i32 (ref $$s0)) (result (ref $$s0)))) + (type $$t1 (func (param (ref $$s1)) (result (ref $$s2)))) + (type $$t2 (func (param (ref $$s2)) (result (ref $$s1)))) + + (func $$f1 (param $$r (ref $$t1)) (call $$f2 (local.get $$r))) + (func $$f2 (param $$r (ref $$t2)) (call $$f1 (local.get $$r))) +)`); + +// ./test/core/type-equivalence.wast:30 +let $2 = instantiate(`(module + (rec (type $$t1 (func (param i32 (ref $$t1))))) + (rec (type $$t2 (func (param i32 (ref $$t2))))) + + (func $$f1 (param $$r (ref $$t1)) (call $$f2 (local.get $$r))) + (func $$f2 (param $$r (ref $$t2)) (call $$f1 (local.get $$r))) +)`); + +// ./test/core/type-equivalence.wast:38 +let $3 = instantiate(`(module + (type $$t1 (func (param i32 (ref $$t1)))) + (type $$t2 (func (param i32 (ref $$t2)))) + + (func $$f1 (param $$r (ref $$t1)) (call $$f2 (local.get $$r))) + (func $$f2 (param $$r (ref $$t2)) (call $$f1 (local.get $$r))) +)`); + +// ./test/core/type-equivalence.wast:49 +let $4 = instantiate(`(module + (rec + (type $$t0 (func (param i32 (ref $$t1)))) + (type $$t1 (func (param i32 (ref $$t0)))) + ) + (rec + (type $$t2 (func (param i32 (ref $$t3)))) + (type $$t3 (func (param i32 (ref $$t2)))) + ) + + (func $$f0 (param $$r (ref $$t0)) + (call $$f2 (local.get $$r)) + ) + (func $$f1 (param $$r (ref $$t1)) + (call $$f3 (local.get $$r)) + ) + (func $$f2 (param $$r (ref $$t2)) + (call $$f0 (local.get $$r)) + ) + (func $$f3 (param $$r (ref $$t3)) + (call $$f1 (local.get $$r)) + ) +)`); + +// ./test/core/type-equivalence.wast:76 +assert_invalid( + () => instantiate(`(module + (type $$t1 (func (param (ref $$t2)))) + (type $$t2 (func (param (ref $$t1)))) + )`), + `unknown type`, +); + +// ./test/core/type-equivalence.wast:89 +let $5 = instantiate(`(module + (type $$t1 (func (param f32 f32))) + (type $$t2 (func (param $$x f32) (param $$y f32))) + + (func $$f1 (type $$t1)) + (func $$f2 (type $$t2)) + (table funcref (elem $$f1 $$f2)) + + (func (export "run") + (call_indirect (type $$t1) (f32.const 1) (f32.const 2) (i32.const 1)) + (call_indirect (type $$t2) (f32.const 1) (f32.const 2) (i32.const 0)) + ) +)`); + +// ./test/core/type-equivalence.wast:102 +assert_return(() => invoke($5, `run`, []), []); + +// ./test/core/type-equivalence.wast:107 +let $6 = instantiate(`(module + (type $$s0 (func (param i32))) + (type $$s1 (func (param i32 (ref $$s0)))) + (type $$s2 (func (param i32 (ref $$s0)))) + (type $$t1 (func (param (ref $$s1)))) + (type $$t2 (func (param (ref $$s2)))) + + (func $$s1 (type $$s1)) + (func $$s2 (type $$s2)) + (func $$f1 (type $$t1)) + (func $$f2 (type $$t2)) + (table funcref (elem $$f1 $$f2 $$s1 $$s2)) + + (func (export "run") + (call_indirect (type $$t1) (ref.func $$s1) (i32.const 0)) + (call_indirect (type $$t1) (ref.func $$s1) (i32.const 1)) + (call_indirect (type $$t1) (ref.func $$s2) (i32.const 0)) + (call_indirect (type $$t1) (ref.func $$s2) (i32.const 1)) + (call_indirect (type $$t2) (ref.func $$s1) (i32.const 0)) + (call_indirect (type $$t2) (ref.func $$s1) (i32.const 1)) + (call_indirect (type $$t2) (ref.func $$s2) (i32.const 0)) + (call_indirect (type $$t2) (ref.func $$s2) (i32.const 1)) + ) +)`); + +// ./test/core/type-equivalence.wast:131 +assert_return(() => invoke($6, `run`, []), []); + +// ./test/core/type-equivalence.wast:136 +let $7 = instantiate(`(module + (rec (type $$t1 (func (result (ref null $$t1))))) + (rec (type $$t2 (func (result (ref null $$t2))))) + + (func $$f1 (type $$t1) (ref.null $$t1)) + (func $$f2 (type $$t2) (ref.null $$t2)) + (table funcref (elem $$f1 $$f2)) + + (func (export "run") + (block (result (ref null $$t1)) (call_indirect (type $$t1) (i32.const 0))) + (block (result (ref null $$t1)) (call_indirect (type $$t2) (i32.const 0))) + (block (result (ref null $$t2)) (call_indirect (type $$t1) (i32.const 0))) + (block (result (ref null $$t2)) (call_indirect (type $$t2) (i32.const 0))) + (block (result (ref null $$t1)) (call_indirect (type $$t1) (i32.const 1))) + (block (result (ref null $$t1)) (call_indirect (type $$t2) (i32.const 1))) + (block (result (ref null $$t2)) (call_indirect (type $$t1) (i32.const 1))) + (block (result (ref null $$t2)) (call_indirect (type $$t2) (i32.const 1))) + (br 0) + ) +)`); + +// ./test/core/type-equivalence.wast:156 +assert_return(() => invoke($7, `run`, []), []); + +// ./test/core/type-equivalence.wast:161 +let $8 = instantiate(`(module + (rec + (type $$t1 (func (param i32 (ref $$t1)))) + (type $$t2 (func (param i32 (ref $$t3)))) + (type $$t3 (func (param i32 (ref $$t2)))) + ) + + (rec + (type $$u1 (func (param i32 (ref $$u1)))) + (type $$u2 (func (param i32 (ref $$u3)))) + (type $$u3 (func (param i32 (ref $$u2)))) + ) + + (func $$f1 (type $$t1)) + (func $$f2 (type $$t2)) + (func $$f3 (type $$t3)) + (table funcref (elem $$f1 $$f2 $$f3)) + + (func (export "run") + (call_indirect (type $$t1) (i32.const 1) (ref.func $$f1) (i32.const 0)) + (call_indirect (type $$t2) (i32.const 1) (ref.func $$f3) (i32.const 1)) + (call_indirect (type $$t3) (i32.const 1) (ref.func $$f2) (i32.const 2)) + (call_indirect (type $$u1) (i32.const 1) (ref.func $$f1) (i32.const 0)) + (call_indirect (type $$u2) (i32.const 1) (ref.func $$f3) (i32.const 1)) + (call_indirect (type $$u3) (i32.const 1) (ref.func $$f2) (i32.const 2)) + ) +)`); + +// ./test/core/type-equivalence.wast:188 +assert_return(() => invoke($8, `run`, []), []); + +// ./test/core/type-equivalence.wast:195 +let $9 = instantiate(`(module + (type $$t1 (func (param f32 f32) (result f32))) + (func (export "f") (param (ref $$t1))) +)`); + +// ./test/core/type-equivalence.wast:199 +register($9, `M`); + +// ./test/core/type-equivalence.wast:200 +let $10 = instantiate(`(module + (type $$t2 (func (param $$x f32) (param $$y f32) (result f32))) + (func (import "M" "f") (param (ref $$t2))) +)`); + +// ./test/core/type-equivalence.wast:208 +let $11 = instantiate(`(module + (type $$s0 (func (param i32) (result f32))) + (type $$s1 (func (param i32 (ref $$s0)) (result (ref $$s0)))) + (type $$s2 (func (param i32 (ref $$s0)) (result (ref $$s0)))) + (type $$t1 (func (param (ref $$s1)) (result (ref $$s2)))) + (type $$t2 (func (param (ref $$s2)) (result (ref $$s1)))) + (func (export "f1") (param (ref $$t1))) + (func (export "f2") (param (ref $$t1))) +)`); + +// ./test/core/type-equivalence.wast:217 +register($11, `N`); + +// ./test/core/type-equivalence.wast:218 +let $12 = instantiate(`(module + (type $$s0 (func (param i32) (result f32))) + (type $$s1 (func (param i32 (ref $$s0)) (result (ref $$s0)))) + (type $$s2 (func (param i32 (ref $$s0)) (result (ref $$s0)))) + (type $$t1 (func (param (ref $$s1)) (result (ref $$s2)))) + (type $$t2 (func (param (ref $$s2)) (result (ref $$s1)))) + (func (import "N" "f1") (param (ref $$t1))) + (func (import "N" "f1") (param (ref $$t2))) + (func (import "N" "f2") (param (ref $$t1))) + (func (import "N" "f2") (param (ref $$t1))) +)`); + +// ./test/core/type-equivalence.wast:233 +let $13 = instantiate(`(module + (rec (type $$t1 (func (param i32 (ref $$t1))))) + (func (export "f") (param (ref $$t1))) +)`); + +// ./test/core/type-equivalence.wast:237 +register($13, `Mr1`); + +// ./test/core/type-equivalence.wast:238 +let $14 = instantiate(`(module + (rec (type $$t2 (func (param i32 (ref $$t2))))) + (func (import "Mr1" "f") (param (ref $$t2))) +)`); + +// ./test/core/type-equivalence.wast:246 +let $15 = instantiate(`(module + (rec + (type $$t1 (func (param i32 (ref $$t1)))) + (type $$t2 (func (param i32 (ref $$t3)))) + (type $$t3 (func (param i32 (ref $$t2)))) + ) + (func (export "f1") (param (ref $$t1))) + (func (export "f2") (param (ref $$t2))) + (func (export "f3") (param (ref $$t3))) +)`); + +// ./test/core/type-equivalence.wast:256 +register($15, `Mr2`); + +// ./test/core/type-equivalence.wast:257 +let $16 = instantiate(`(module + (rec + (type $$t1 (func (param i32 (ref $$t1)))) + (type $$t2 (func (param i32 (ref $$t3)))) + (type $$t3 (func (param i32 (ref $$t2)))) + ) + (func (import "Mr2" "f1") (param (ref $$t1))) + (func (import "Mr2" "f2") (param (ref $$t2))) + (func (import "Mr2" "f3") (param (ref $$t3))) +)`); + +// ./test/core/type-equivalence.wast:268 +let $17 = instantiate(`(module + (rec + (type $$t1 (func (param i32 (ref $$t3)))) + (type $$t2 (func (param i32 (ref $$t1)))) + (type $$t3 (func (param i32 (ref $$t2)))) + ) + (func (export "f1") (param (ref $$t1))) + (func (export "f2") (param (ref $$t2))) + (func (export "f3") (param (ref $$t3))) +)`); + +// ./test/core/type-equivalence.wast:278 +register($17, `Mr3`); + +// ./test/core/type-equivalence.wast:279 +let $18 = instantiate(`(module + (rec + (type $$t1 (func (param i32 (ref $$t3)))) + (type $$t2 (func (param i32 (ref $$t1)))) + (type $$t3 (func (param i32 (ref $$t2)))) + ) + (func (import "Mr3" "f1") (param (ref $$t1))) + (func (import "Mr3" "f2") (param (ref $$t2))) + (func (import "Mr3" "f3") (param (ref $$t3))) +)`); + +// ./test/core/type-equivalence.wast:290 +let $19 = instantiate(`(module + (rec + (type $$t1 (func (param i32 (ref $$u1)))) + (type $$u1 (func (param f32 (ref $$t1)))) + ) + + (rec + (type $$t2 (func (param i32 (ref $$u3)))) + (type $$u2 (func (param f32 (ref $$t3)))) + (type $$t3 (func (param i32 (ref $$u2)))) + (type $$u3 (func (param f32 (ref $$t2)))) + ) + + (func (export "f1") (param (ref $$t1))) + (func (export "f2") (param (ref $$t2))) + (func (export "f3") (param (ref $$t3))) +)`); + +// ./test/core/type-equivalence.wast:307 +register($19, `Mr4`); + +// ./test/core/type-equivalence.wast:308 +let $20 = instantiate(`(module + (rec + (type $$t1 (func (param i32 (ref $$u1)))) + (type $$u1 (func (param f32 (ref $$t1)))) + ) + + (rec + (type $$t2 (func (param i32 (ref $$u3)))) + (type $$u2 (func (param f32 (ref $$t3)))) + (type $$t3 (func (param i32 (ref $$u2)))) + (type $$u3 (func (param f32 (ref $$t2)))) + ) + + (func (import "Mr4" "f1") (param (ref $$t1))) + (func (import "Mr4" "f2") (param (ref $$t2))) + (func (import "Mr4" "f3") (param (ref $$t3))) +)`); diff --git a/js/src/jit-test/tests/wasm/spec/gc/type-rec.wast.js b/js/src/jit-test/tests/wasm/spec/gc/type-rec.wast.js new file mode 100644 index 0000000000..8bf18cb6e5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/type-rec.wast.js @@ -0,0 +1,189 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/type-rec.wast + +// ./test/core/type-rec.wast:3 +let $0 = instantiate(`(module + (rec (type $$f1 (func)) (type (struct (field (ref $$f1))))) + (rec (type $$f2 (func)) (type (struct (field (ref $$f2))))) + (func $$f (type $$f2)) + (global (ref $$f1) (ref.func $$f)) +)`); + +// ./test/core/type-rec.wast:10 +let $1 = instantiate(`(module + (rec (type $$f1 (func)) (type (struct (field (ref $$f1))))) + (rec (type $$f2 (func)) (type (struct (field (ref $$f2))))) + (rec + (type $$g1 (func)) + (type (struct (field (ref $$f1) (ref $$f1) (ref $$f2) (ref $$f2) (ref $$g1)))) + ) + (rec + (type $$g2 (func)) + (type (struct (field (ref $$f1) (ref $$f2) (ref $$f1) (ref $$f2) (ref $$g2)))) + ) + (func $$g (type $$g2)) + (global (ref $$g1) (ref.func $$g)) +)`); + +// ./test/core/type-rec.wast:25 +assert_invalid( + () => instantiate(`(module + (rec (type $$f1 (func)) (type (struct (field (ref $$f1))))) + (rec (type $$f2 (func)) (type (struct (field (ref $$f1))))) + (func $$f (type $$f2)) + (global (ref $$f1) (ref.func $$f)) + )`), + `type mismatch`, +); + +// ./test/core/type-rec.wast:35 +assert_invalid( + () => instantiate(`(module + (rec (type $$f0 (func)) (type (struct (field (ref $$f0))))) + (rec (type $$f1 (func)) (type (struct (field (ref $$f0))))) + (rec (type $$f2 (func)) (type (struct (field (ref $$f1))))) + (func $$f (type $$f2)) + (global (ref $$f1) (ref.func $$f)) + )`), + `type mismatch`, +); + +// ./test/core/type-rec.wast:46 +assert_invalid( + () => instantiate(`(module + (rec (type $$f1 (func)) (type (struct))) + (rec (type (struct)) (type $$f2 (func))) + (global (ref $$f1) (ref.func $$f)) + (func $$f (type $$f2)) + )`), + `type mismatch`, +); + +// ./test/core/type-rec.wast:56 +assert_invalid( + () => instantiate(`(module + (rec (type $$f1 (func)) (type (struct))) + (rec (type $$f2 (func)) (type (struct)) (type (func))) + (global (ref $$f1) (ref.func $$f)) + (func $$f (type $$f2)) + )`), + `type mismatch`, +); + +// ./test/core/type-rec.wast:69 +let $2 = instantiate(`(module $$M + (rec (type $$f1 (func)) (type (struct))) + (func (export "f") (type $$f1)) +)`); +register($2, `M`); + +// ./test/core/type-rec.wast:73 +register(`M`, `M`); + +// ./test/core/type-rec.wast:75 +let $3 = instantiate(`(module + (rec (type $$f2 (func)) (type (struct))) + (func (import "M" "f") (type $$f2)) +)`); + +// ./test/core/type-rec.wast:80 +assert_unlinkable( + () => instantiate(`(module + (rec (type (struct)) (type $$f2 (func))) + (func (import "M" "f") (type $$f2)) + )`), + `incompatible import type`, +); + +// ./test/core/type-rec.wast:88 +assert_unlinkable( + () => instantiate(`(module + (rec (type $$f2 (func))) + (func (import "M" "f") (type $$f2)) + )`), + `incompatible import type`, +); + +// ./test/core/type-rec.wast:99 +let $4 = instantiate(`(module + (rec (type $$f1 (func)) (type (struct))) + (rec (type $$f2 (func)) (type (struct))) + (table funcref (elem $$f1)) + (func $$f1 (type $$f1)) + (func (export "run") (call_indirect (type $$f2) (i32.const 0))) +)`); + +// ./test/core/type-rec.wast:106 +assert_return(() => invoke($4, `run`, []), []); + +// ./test/core/type-rec.wast:108 +let $5 = instantiate(`(module + (rec (type $$f1 (func)) (type (struct))) + (rec (type (struct)) (type $$f2 (func))) + (table funcref (elem $$f1)) + (func $$f1 (type $$f1)) + (func (export "run") (call_indirect (type $$f2) (i32.const 0))) +)`); + +// ./test/core/type-rec.wast:115 +assert_trap(() => invoke($5, `run`, []), `indirect call type mismatch`); + +// ./test/core/type-rec.wast:117 +let $6 = instantiate(`(module + (rec (type $$f1 (func)) (type (struct))) + (rec (type $$f2 (func))) + (table funcref (elem $$f1)) + (func $$f1 (type $$f1)) + (func (export "run") (call_indirect (type $$f2) (i32.const 0))) +)`); + +// ./test/core/type-rec.wast:124 +assert_trap(() => invoke($6, `run`, []), `indirect call type mismatch`); + +// ./test/core/type-rec.wast:129 +let $7 = instantiate(`(module + (rec (type $$s (struct))) + (rec (type $$t (func (param (ref $$s))))) + (func $$f (param (ref $$s))) ;; okay, type is equivalent to $$t + (global (ref $$t) (ref.func $$f)) +)`); + +// ./test/core/type-rec.wast:136 +assert_invalid( + () => instantiate(`(module + (rec + (type $$s (struct)) + (type $$t (func (param (ref $$s)))) + ) + (func $$f (param (ref $$s))) ;; type is not equivalent to $$t + (global (ref $$t) (ref.func $$f)) + )`), + `type mismatch`, +); + +// ./test/core/type-rec.wast:148 +assert_invalid( + () => instantiate(`(module + (rec + (type (struct)) + (type $$t (func)) + ) + (func $$f) ;; type is not equivalent to $$t + (global (ref $$t) (ref.func $$f)) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/gc/type-subtyping.wast.js b/js/src/jit-test/tests/wasm/spec/gc/type-subtyping.wast.js new file mode 100644 index 0000000000..474789c145 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/type-subtyping.wast.js @@ -0,0 +1,943 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/gc/type-subtyping.wast + +// ./test/core/gc/type-subtyping.wast:3 +let $0 = instantiate(`(module + (type $$e0 (sub (array i32))) + (type $$e1 (sub $$e0 (array i32))) + + (type $$e2 (sub (array anyref))) + (type $$e3 (sub (array (ref null $$e0)))) + (type $$e4 (sub (array (ref $$e1)))) + + (type $$m1 (sub (array (mut i32)))) + (type $$m2 (sub $$m1 (array (mut i32)))) +)`); + +// ./test/core/gc/type-subtyping.wast:15 +let $1 = instantiate(`(module + (type $$e0 (sub (struct))) + (type $$e1 (sub $$e0 (struct))) + (type $$e2 (sub $$e1 (struct (field i32)))) + (type $$e3 (sub $$e2 (struct (field i32 (ref null $$e0))))) + (type $$e4 (sub $$e3 (struct (field i32 (ref $$e0) (mut i64))))) + (type $$e5 (sub $$e4 (struct (field i32 (ref $$e1) (mut i64))))) +)`); + +// ./test/core/gc/type-subtyping.wast:24 +let $2 = instantiate(`(module + (type $$s (sub (struct))) + (type $$s' (sub $$s (struct))) + + (type $$f1 (sub (func (param (ref $$s')) (result anyref)))) + (type $$f2 (sub $$f1 (func (param (ref $$s)) (result (ref any))))) + (type $$f3 (sub $$f2 (func (param (ref null $$s)) (result (ref $$s))))) + (type $$f4 (sub $$f3 (func (param (ref null struct)) (result (ref $$s'))))) +)`); + +// ./test/core/gc/type-subtyping.wast:37 +let $3 = instantiate(`(module + (type $$t (sub (struct (field anyref)))) + (rec (type $$r (sub $$t (struct (field (ref $$r)))))) + (type $$t' (sub $$r (struct (field (ref $$r) i32)))) +)`); + +// ./test/core/gc/type-subtyping.wast:43 +let $4 = instantiate(`(module + (rec + (type $$r1 (sub (struct (field i32 (ref $$r1))))) + ) + (rec + (type $$r2 (sub $$r1 (struct (field i32 (ref $$r3))))) + (type $$r3 (sub $$r1 (struct (field i32 (ref $$r2))))) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:53 +let $5 = instantiate(`(module + (rec + (type $$a1 (sub (struct (field i32 (ref $$a2))))) + (type $$a2 (sub (struct (field i64 (ref $$a1))))) + ) + (rec + (type $$b1 (sub $$a2 (struct (field i64 (ref $$a1) i32)))) + (type $$b2 (sub $$a1 (struct (field i32 (ref $$a2) i32)))) + (type $$b3 (sub $$a2 (struct (field i64 (ref $$b2) i32)))) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:68 +let $6 = instantiate(`(module + (rec + (type $$t1 (sub (func (param i32 (ref $$t3))))) + (type $$t2 (sub $$t1 (func (param i32 (ref $$t2))))) + (type $$t3 (sub $$t2 (func (param i32 (ref $$t1))))) + ) + + (func $$f1 (param $$r (ref $$t1)) + (call $$f1 (local.get $$r)) + ) + (func $$f2 (param $$r (ref $$t2)) + (call $$f1 (local.get $$r)) + (call $$f2 (local.get $$r)) + ) + (func $$f3 (param $$r (ref $$t3)) + (call $$f1 (local.get $$r)) + (call $$f2 (local.get $$r)) + (call $$f3 (local.get $$r)) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:89 +let $7 = instantiate(`(module + (rec + (type $$t1 (sub (func (result i32 (ref $$u1))))) + (type $$u1 (sub (func (result f32 (ref $$t1))))) + ) + + (rec + (type $$t2 (sub $$t1 (func (result i32 (ref $$u3))))) + (type $$u2 (sub $$u1 (func (result f32 (ref $$t3))))) + (type $$t3 (sub $$t1 (func (result i32 (ref $$u2))))) + (type $$u3 (sub $$u1 (func (result f32 (ref $$t2))))) + ) + + (func $$f1 (param $$r (ref $$t1)) + (call $$f1 (local.get $$r)) + ) + (func $$f2 (param $$r (ref $$t2)) + (call $$f1 (local.get $$r)) + (call $$f2 (local.get $$r)) + ) + (func $$f3 (param $$r (ref $$t3)) + (call $$f1 (local.get $$r)) + (call $$f3 (local.get $$r)) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:115 +let $8 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$f2 (sub (func))) (type (struct (field (ref $$f2))))) + (rec (type $$g1 (sub $$f1 (func))) (type (struct))) + (rec (type $$g2 (sub $$f2 (func))) (type (struct))) + (func $$g (type $$g2)) + (global (ref $$g1) (ref.func $$g)) +)`); + +// ./test/core/gc/type-subtyping.wast:124 +let $9 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type $$s1 (sub (struct (field (ref $$f1)))))) + (rec (type $$f2 (sub (func))) (type $$s2 (sub (struct (field (ref $$f2)))))) + (rec + (type $$g1 (sub $$f1 (func))) + (type (sub $$s1 (struct (field (ref $$f1) (ref $$f1) (ref $$f2) (ref $$f2) (ref $$g1))))) + ) + (rec + (type $$g2 (sub $$f2 (func))) + (type (sub $$s2 (struct (field (ref $$f1) (ref $$f2) (ref $$f1) (ref $$f2) (ref $$g2))))) + ) + (func $$g (type $$g2)) + (global (ref $$g1) (ref.func $$g)) +)`); + +// ./test/core/gc/type-subtyping.wast:139 +assert_invalid( + () => instantiate(`(module + (rec (type $$f1 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$f2 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$g1 (sub $$f1 (func))) (type (struct))) + (rec (type $$g2 (sub $$f2 (func))) (type (struct))) + (func $$g (type $$g2)) + (global (ref $$g1) (ref.func $$g)) + )`), + `type mismatch`, +); + +// ./test/core/gc/type-subtyping.wast:151 +let $10 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$f2 (sub (func))) (type (struct (field (ref $$f2))))) + (rec (type $$g (sub $$f1 (func))) (type (struct))) + (func $$g (type $$g)) + (global (ref $$f1) (ref.func $$g)) +)`); + +// ./test/core/gc/type-subtyping.wast:159 +let $11 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type $$s1 (sub (struct (field (ref $$f1)))))) + (rec (type $$f2 (sub (func))) (type $$s2 (sub (struct (field (ref $$f2)))))) + (rec + (type $$g1 (sub $$f1 (func))) + (type (sub $$s1 (struct (field (ref $$f1) (ref $$f1) (ref $$f2) (ref $$f2) (ref $$g1))))) + ) + (rec + (type $$g2 (sub $$f2 (func))) + (type (sub $$s2 (struct (field (ref $$f1) (ref $$f2) (ref $$f1) (ref $$f2) (ref $$g2))))) + ) + (rec (type $$h (sub $$g2 (func))) (type (struct))) + (func $$h (type $$h)) + (global (ref $$f1) (ref.func $$h)) + (global (ref $$g1) (ref.func $$h)) +)`); + +// ./test/core/gc/type-subtyping.wast:177 +let $12 = instantiate(`(module + (rec (type $$f11 (sub (func (result (ref func))))) (type $$f12 (sub $$f11 (func (result (ref $$f11)))))) + (rec (type $$f21 (sub (func (result (ref func))))) (type $$f22 (sub $$f21 (func (result (ref $$f21)))))) + (func $$f11 (type $$f11) (unreachable)) + (func $$f12 (type $$f12) (unreachable)) + (global (ref $$f11) (ref.func $$f11)) + (global (ref $$f21) (ref.func $$f11)) + (global (ref $$f12) (ref.func $$f12)) + (global (ref $$f22) (ref.func $$f12)) +)`); + +// ./test/core/gc/type-subtyping.wast:188 +let $13 = instantiate(`(module + (rec (type $$f11 (sub (func (result (ref func))))) (type $$f12 (sub $$f11 (func (result (ref $$f11)))))) + (rec (type $$f21 (sub (func (result (ref func))))) (type $$f22 (sub $$f21 (func (result (ref $$f21)))))) + (rec (type $$g11 (sub $$f11 (func (result (ref func))))) (type $$g12 (sub $$g11 (func (result (ref $$g11)))))) + (rec (type $$g21 (sub $$f21 (func (result (ref func))))) (type $$g22 (sub $$g21 (func (result (ref $$g21)))))) + (func $$g11 (type $$g11) (unreachable)) + (func $$g12 (type $$g12) (unreachable)) + (global (ref $$f11) (ref.func $$g11)) + (global (ref $$f21) (ref.func $$g11)) + (global (ref $$f11) (ref.func $$g12)) + (global (ref $$f21) (ref.func $$g12)) + (global (ref $$g11) (ref.func $$g11)) + (global (ref $$g21) (ref.func $$g11)) + (global (ref $$g12) (ref.func $$g12)) + (global (ref $$g22) (ref.func $$g12)) +)`); + +// ./test/core/gc/type-subtyping.wast:205 +assert_invalid( + () => instantiate(`(module + (rec (type $$f11 (sub (func))) (type $$f12 (sub $$f11 (func)))) + (rec (type $$f21 (sub (func))) (type $$f22 (sub $$f11 (func)))) + (func $$f (type $$f21)) + (global (ref $$f11) (ref.func $$f)) + )`), + `type mismatch`, +); + +// ./test/core/gc/type-subtyping.wast:215 +assert_invalid( + () => instantiate(`(module + (rec (type $$f01 (sub (func))) (type $$f02 (sub $$f01 (func)))) + (rec (type $$f11 (sub (func))) (type $$f12 (sub $$f01 (func)))) + (rec (type $$f21 (sub (func))) (type $$f22 (sub $$f11 (func)))) + (func $$f (type $$f21)) + (global (ref $$f11) (ref.func $$f)) + )`), + `type mismatch`, +); + +// ./test/core/gc/type-subtyping.wast:229 +let $14 = instantiate(`(module + (type $$t0 (sub (func (result (ref null func))))) + (rec (type $$t1 (sub $$t0 (func (result (ref null $$t1)))))) + (rec (type $$t2 (sub $$t1 (func (result (ref null $$t2)))))) + + (func $$f0 (type $$t0) (ref.null func)) + (func $$f1 (type $$t1) (ref.null $$t1)) + (func $$f2 (type $$t2) (ref.null $$t2)) + (table funcref (elem $$f0 $$f1 $$f2)) + + (func (export "run") + (block (result (ref null func)) (call_indirect (type $$t0) (i32.const 0))) + (block (result (ref null func)) (call_indirect (type $$t0) (i32.const 1))) + (block (result (ref null func)) (call_indirect (type $$t0) (i32.const 2))) + (block (result (ref null $$t1)) (call_indirect (type $$t1) (i32.const 1))) + (block (result (ref null $$t1)) (call_indirect (type $$t1) (i32.const 2))) + (block (result (ref null $$t2)) (call_indirect (type $$t2) (i32.const 2))) + + (block (result (ref null $$t0)) (ref.cast (ref $$t0) (table.get (i32.const 0)))) + (block (result (ref null $$t0)) (ref.cast (ref $$t0) (table.get (i32.const 1)))) + (block (result (ref null $$t0)) (ref.cast (ref $$t0) (table.get (i32.const 2)))) + (block (result (ref null $$t1)) (ref.cast (ref $$t1) (table.get (i32.const 1)))) + (block (result (ref null $$t1)) (ref.cast (ref $$t1) (table.get (i32.const 2)))) + (block (result (ref null $$t2)) (ref.cast (ref $$t2) (table.get (i32.const 2)))) + (br 0) + ) + + (func (export "fail1") + (block (result (ref null $$t1)) (call_indirect (type $$t1) (i32.const 0))) + (br 0) + ) + (func (export "fail2") + (block (result (ref null $$t1)) (call_indirect (type $$t2) (i32.const 0))) + (br 0) + ) + (func (export "fail3") + (block (result (ref null $$t1)) (call_indirect (type $$t2) (i32.const 1))) + (br 0) + ) + + (func (export "fail4") + (ref.cast (ref $$t1) (table.get (i32.const 0))) + (br 0) + ) + (func (export "fail5") + (ref.cast (ref $$t2) (table.get (i32.const 0))) + (br 0) + ) + (func (export "fail6") + (ref.cast (ref $$t2) (table.get (i32.const 1))) + (br 0) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:282 +assert_return(() => invoke($14, `run`, []), []); + +// ./test/core/gc/type-subtyping.wast:283 +assert_trap(() => invoke($14, `fail1`, []), `indirect call`); + +// ./test/core/gc/type-subtyping.wast:284 +assert_trap(() => invoke($14, `fail2`, []), `indirect call`); + +// ./test/core/gc/type-subtyping.wast:285 +assert_trap(() => invoke($14, `fail3`, []), `indirect call`); + +// ./test/core/gc/type-subtyping.wast:286 +assert_trap(() => invoke($14, `fail4`, []), `cast`); + +// ./test/core/gc/type-subtyping.wast:287 +assert_trap(() => invoke($14, `fail5`, []), `cast`); + +// ./test/core/gc/type-subtyping.wast:288 +assert_trap(() => invoke($14, `fail6`, []), `cast`); + +// ./test/core/gc/type-subtyping.wast:290 +let $15 = instantiate(`(module + (type $$t1 (sub (func))) + (type $$t2 (sub final (func))) + + (func $$f1 (type $$t1)) + (func $$f2 (type $$t2)) + (table funcref (elem $$f1 $$f2)) + + (func (export "fail1") + (block (call_indirect (type $$t1) (i32.const 1))) + ) + (func (export "fail2") + (block (call_indirect (type $$t2) (i32.const 0))) + ) + + (func (export "fail3") + (ref.cast (ref $$t1) (table.get (i32.const 1))) + (drop) + ) + (func (export "fail4") + (ref.cast (ref $$t2) (table.get (i32.const 0))) + (drop) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:314 +assert_trap(() => invoke($15, `fail1`, []), `indirect call`); + +// ./test/core/gc/type-subtyping.wast:315 +assert_trap(() => invoke($15, `fail2`, []), `indirect call`); + +// ./test/core/gc/type-subtyping.wast:316 +assert_trap(() => invoke($15, `fail3`, []), `cast`); + +// ./test/core/gc/type-subtyping.wast:317 +assert_trap(() => invoke($15, `fail4`, []), `cast`); + +// ./test/core/gc/type-subtyping.wast:320 +let $16 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$f2 (sub (func))) (type (struct (field (ref $$f2))))) + (rec (type $$g1 (sub $$f1 (func))) (type (struct))) + (rec (type $$g2 (sub $$f2 (func))) (type (struct))) + (func $$g (type $$g2)) (elem declare func $$g) + (func (export "run") (result i32) + (ref.test (ref $$g1) (ref.func $$g)) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:330 +assert_return(() => invoke($16, `run`, []), [value("i32", 1)]); + +// ./test/core/gc/type-subtyping.wast:332 +let $17 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type $$s1 (sub (struct (field (ref $$f1)))))) + (rec (type $$f2 (sub (func))) (type $$s2 (sub (struct (field (ref $$f2)))))) + (rec + (type $$g1 (sub $$f1 (func))) + (type (sub $$s1 (struct (field (ref $$f1) (ref $$f1) (ref $$f2) (ref $$f2) (ref $$g1))))) + ) + (rec + (type $$g2 (sub $$f2 (func))) + (type (sub $$s2 (struct (field (ref $$f1) (ref $$f2) (ref $$f1) (ref $$f2) (ref $$g2))))) + ) + (func $$g (type $$g2)) (elem declare func $$g) + (func (export "run") (result i32) + (ref.test (ref $$g1) (ref.func $$g)) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:348 +assert_return(() => invoke($17, `run`, []), [value("i32", 1)]); + +// ./test/core/gc/type-subtyping.wast:350 +let $18 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$f2 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$g1 (sub $$f1 (func))) (type (struct))) + (rec (type $$g2 (sub $$f2 (func))) (type (struct))) + (func $$g (type $$g2)) (elem declare func $$g) + (func (export "run") (result i32) + (ref.test (ref $$g1) (ref.func $$g)) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:360 +assert_return(() => invoke($18, `run`, []), [value("i32", 0)]); + +// ./test/core/gc/type-subtyping.wast:362 +let $19 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$f2 (sub (func))) (type (struct (field (ref $$f2))))) + (rec (type $$g (sub $$f1 (func))) (type (struct))) + (func $$g (type $$g)) (elem declare func $$g) + (func (export "run") (result i32) + (ref.test (ref $$f1) (ref.func $$g)) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:371 +assert_return(() => invoke($19, `run`, []), [value("i32", 1)]); + +// ./test/core/gc/type-subtyping.wast:373 +let $20 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type $$s1 (sub (struct (field (ref $$f1)))))) + (rec (type $$f2 (sub (func))) (type $$s2 (sub (struct (field (ref $$f2)))))) + (rec + (type $$g1 (sub $$f1 (func))) + (type (sub $$s1 (struct (field (ref $$f1) (ref $$f1) (ref $$f2) (ref $$f2) (ref $$g1))))) + ) + (rec + (type $$g2 (sub $$f2 (func))) + (type (sub $$s2 (struct (field (ref $$f1) (ref $$f2) (ref $$f1) (ref $$f2) (ref $$g2))))) + ) + (rec (type $$h (sub $$g2 (func))) (type (struct))) + (func $$h (type $$h)) (elem declare func $$h) + (func (export "run") (result i32 i32) + (ref.test (ref $$f1) (ref.func $$h)) + (ref.test (ref $$g1) (ref.func $$h)) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:391 +assert_return(() => invoke($20, `run`, []), [value("i32", 1), value("i32", 1)]); + +// ./test/core/gc/type-subtyping.wast:394 +let $21 = instantiate(`(module + (rec (type $$f11 (sub (func (result (ref func))))) (type $$f12 (sub $$f11 (func (result (ref $$f11)))))) + (rec (type $$f21 (sub (func (result (ref func))))) (type $$f22 (sub $$f21 (func (result (ref $$f21)))))) + (func $$f11 (type $$f11) (unreachable)) (elem declare func $$f11) + (func $$f12 (type $$f12) (unreachable)) (elem declare func $$f12) + (func (export "run") (result i32 i32 i32 i32) + (ref.test (ref $$f11) (ref.func $$f11)) + (ref.test (ref $$f21) (ref.func $$f11)) + (ref.test (ref $$f12) (ref.func $$f12)) + (ref.test (ref $$f22) (ref.func $$f12)) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:406 +assert_return( + () => invoke($21, `run`, []), + [value("i32", 1), value("i32", 1), value("i32", 1), value("i32", 1)], +); + +// ./test/core/gc/type-subtyping.wast:410 +let $22 = instantiate(`(module + (rec (type $$f11 (sub (func (result (ref func))))) (type $$f12 (sub $$f11 (func (result (ref $$f11)))))) + (rec (type $$f21 (sub (func (result (ref func))))) (type $$f22 (sub $$f21 (func (result (ref $$f21)))))) + (rec (type $$g11 (sub $$f11 (func (result (ref func))))) (type $$g12 (sub $$g11 (func (result (ref $$g11)))))) + (rec (type $$g21 (sub $$f21 (func (result (ref func))))) (type $$g22 (sub $$g21 (func (result (ref $$g21)))))) + (func $$g11 (type $$g11) (unreachable)) (elem declare func $$g11) + (func $$g12 (type $$g12) (unreachable)) (elem declare func $$g12) + (func (export "run") (result i32 i32 i32 i32 i32 i32 i32 i32) + (ref.test (ref $$f11) (ref.func $$g11)) + (ref.test (ref $$f21) (ref.func $$g11)) + (ref.test (ref $$f11) (ref.func $$g12)) + (ref.test (ref $$f21) (ref.func $$g12)) + (ref.test (ref $$g11) (ref.func $$g11)) + (ref.test (ref $$g21) (ref.func $$g11)) + (ref.test (ref $$g12) (ref.func $$g12)) + (ref.test (ref $$g22) (ref.func $$g12)) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:428 +assert_return( + () => invoke($22, `run`, []), + [ + value("i32", 1), + value("i32", 1), + value("i32", 1), + value("i32", 1), + value("i32", 1), + value("i32", 1), + value("i32", 1), + value("i32", 1), + ], +); + +// ./test/core/gc/type-subtyping.wast:433 +let $23 = instantiate(`(module + (rec (type $$f11 (sub (func))) (type $$f12 (sub $$f11 (func)))) + (rec (type $$f21 (sub (func))) (type $$f22 (sub $$f11 (func)))) + (func $$f (type $$f21)) (elem declare func $$f) + (func (export "run") (result i32) + (ref.test (ref $$f11) (ref.func $$f)) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:441 +assert_return(() => invoke($23, `run`, []), [value("i32", 0)]); + +// ./test/core/gc/type-subtyping.wast:443 +let $24 = instantiate(`(module + (rec (type $$f01 (sub (func))) (type $$f02 (sub $$f01 (func)))) + (rec (type $$f11 (sub (func))) (type $$f12 (sub $$f01 (func)))) + (rec (type $$f21 (sub (func))) (type $$f22 (sub $$f11 (func)))) + (func $$f (type $$f21)) (elem declare func $$f) + (func (export "run") (result i32) + (ref.test (ref $$f11) (ref.func $$f)) + ) +)`); + +// ./test/core/gc/type-subtyping.wast:452 +assert_return(() => invoke($24, `run`, []), [value("i32", 0)]); + +// ./test/core/gc/type-subtyping.wast:458 +let $25 = instantiate(`(module + (type $$t0 (sub (func (result (ref null func))))) + (rec (type $$t1 (sub $$t0 (func (result (ref null $$t1)))))) + (rec (type $$t2 (sub $$t1 (func (result (ref null $$t2)))))) + + (func (export "f0") (type $$t0) (ref.null func)) + (func (export "f1") (type $$t1) (ref.null $$t1)) + (func (export "f2") (type $$t2) (ref.null $$t2)) +)`); + +// ./test/core/gc/type-subtyping.wast:467 +register($25, `M`); + +// ./test/core/gc/type-subtyping.wast:469 +let $26 = instantiate(`(module + (type $$t0 (sub (func (result (ref null func))))) + (rec (type $$t1 (sub $$t0 (func (result (ref null $$t1)))))) + (rec (type $$t2 (sub $$t1 (func (result (ref null $$t2)))))) + + (func (import "M" "f0") (type $$t0)) + (func (import "M" "f1") (type $$t0)) + (func (import "M" "f1") (type $$t1)) + (func (import "M" "f2") (type $$t0)) + (func (import "M" "f2") (type $$t1)) + (func (import "M" "f2") (type $$t2)) +)`); + +// ./test/core/gc/type-subtyping.wast:482 +assert_unlinkable( + () => instantiate(`(module + (type $$t0 (sub (func (result (ref null func))))) + (rec (type $$t1 (sub $$t0 (func (result (ref null $$t1)))))) + (rec (type $$t2 (sub $$t1 (func (result (ref null $$t2)))))) + (func (import "M" "f0") (type $$t1)) + )`), + `incompatible import type`, +); + +// ./test/core/gc/type-subtyping.wast:492 +assert_unlinkable( + () => instantiate(`(module + (type $$t0 (sub (func (result (ref null func))))) + (rec (type $$t1 (sub $$t0 (func (result (ref null $$t1)))))) + (rec (type $$t2 (sub $$t1 (func (result (ref null $$t2)))))) + (func (import "M" "f0") (type $$t2)) + )`), + `incompatible import type`, +); + +// ./test/core/gc/type-subtyping.wast:502 +assert_unlinkable( + () => instantiate(`(module + (type $$t0 (sub (func (result (ref null func))))) + (rec (type $$t1 (sub $$t0 (func (result (ref null $$t1)))))) + (rec (type $$t2 (sub $$t1 (func (result (ref null $$t2)))))) + (func (import "M" "f1") (type $$t2)) + )`), + `incompatible import type`, +); + +// ./test/core/gc/type-subtyping.wast:512 +let $27 = instantiate(`(module + (type $$t1 (sub (func))) + (type $$t2 (sub final (func))) + (func (export "f1") (type $$t1)) + (func (export "f2") (type $$t2)) +)`); + +// ./test/core/gc/type-subtyping.wast:518 +register($27, `M2`); + +// ./test/core/gc/type-subtyping.wast:520 +assert_unlinkable( + () => instantiate(`(module + (type $$t1 (sub (func))) + (type $$t2 (sub final (func))) + (func (import "M2" "f1") (type $$t2)) + )`), + `incompatible import type`, +); + +// ./test/core/gc/type-subtyping.wast:528 +assert_unlinkable( + () => instantiate(`(module + (type $$t1 (sub (func))) + (type $$t2 (sub final (func))) + (func (import "M2" "f2") (type $$t1)) + )`), + `incompatible import type`, +); + +// ./test/core/gc/type-subtyping.wast:538 +let $28 = instantiate(`(module + (rec (type $$f2 (sub (func))) (type (struct (field (ref $$f2))))) + (rec (type $$g2 (sub $$f2 (func))) (type (struct))) + (func (export "g") (type $$g2)) +)`); + +// ./test/core/gc/type-subtyping.wast:543 +register($28, `M3`); + +// ./test/core/gc/type-subtyping.wast:544 +let $29 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$g1 (sub $$f1 (func))) (type (struct))) + (func (import "M3" "g") (type $$g1)) +)`); + +// ./test/core/gc/type-subtyping.wast:550 +let $30 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type $$s1 (sub (struct (field (ref $$f1)))))) + (rec (type $$f2 (sub (func))) (type $$s2 (sub (struct (field (ref $$f2)))))) + (rec + (type $$g2 (sub $$f2 (func))) + (type (sub $$s2 (struct (field (ref $$f1) (ref $$f2) (ref $$f1) (ref $$f2) (ref $$g2))))) + ) + (func (export "g") (type $$g2)) +)`); + +// ./test/core/gc/type-subtyping.wast:559 +register($30, `M4`); + +// ./test/core/gc/type-subtyping.wast:560 +let $31 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type $$s1 (sub (struct (field (ref $$f1)))))) + (rec (type $$f2 (sub (func))) (type $$s2 (sub (struct (field (ref $$f2)))))) + (rec + (type $$g1 (sub $$f1 (func))) + (type (sub $$s1 (struct (field (ref $$f1) (ref $$f1) (ref $$f2) (ref $$f2) (ref $$g1))))) + ) + (func (import "M4" "g") (type $$g1)) +)`); + +// ./test/core/gc/type-subtyping.wast:570 +let $32 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$f2 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$g2 (sub $$f2 (func))) (type (struct))) + (func (export "g") (type $$g2)) +)`); + +// ./test/core/gc/type-subtyping.wast:576 +register($32, `M5`); + +// ./test/core/gc/type-subtyping.wast:577 +assert_unlinkable( + () => instantiate(`(module + (rec (type $$f1 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$g1 (sub $$f1 (func))) (type (struct))) + (func (import "M5" "g") (type $$g1)) + )`), + `incompatible import`, +); + +// ./test/core/gc/type-subtyping.wast:586 +let $33 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$f2 (sub (func))) (type (struct (field (ref $$f2))))) + (rec (type $$g (sub $$f1 (func))) (type (struct))) + (func (export "g") (type $$g)) +)`); + +// ./test/core/gc/type-subtyping.wast:592 +register($33, `M6`); + +// ./test/core/gc/type-subtyping.wast:593 +let $34 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type (struct (field (ref $$f1))))) + (rec (type $$f2 (sub (func))) (type (struct (field (ref $$f2))))) + (rec (type $$g (sub $$f1 (func))) (type (struct))) + (func (import "M6" "g") (type $$f1)) +)`); + +// ./test/core/gc/type-subtyping.wast:600 +let $35 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type $$s1 (sub (struct (field (ref $$f1)))))) + (rec (type $$f2 (sub (func))) (type $$s2 (sub (struct (field (ref $$f2)))))) + (rec + (type $$g2 (sub $$f2 (func))) + (type (sub $$s2 (struct (field (ref $$f1) (ref $$f2) (ref $$f1) (ref $$f2) (ref $$g2))))) + ) + (rec (type $$h (sub $$g2 (func))) (type (struct))) + (func (export "h") (type $$h)) +)`); + +// ./test/core/gc/type-subtyping.wast:610 +register($35, `M7`); + +// ./test/core/gc/type-subtyping.wast:611 +let $36 = instantiate(`(module + (rec (type $$f1 (sub (func))) (type $$s1 (sub (struct (field (ref $$f1)))))) + (rec (type $$f2 (sub (func))) (type $$s2 (sub (struct (field (ref $$f2)))))) + (rec + (type $$g1 (sub $$f1 (func))) + (type (sub $$s1 (struct (field (ref $$f1) (ref $$f1) (ref $$f2) (ref $$f2) (ref $$g1))))) + ) + (rec (type $$h (sub $$g1 (func))) (type (struct))) + (func (import "M7" "h") (type $$f1)) + (func (import "M7" "h") (type $$g1)) +)`); + +// ./test/core/gc/type-subtyping.wast:624 +let $37 = instantiate(`(module + (rec (type $$f11 (sub (func (result (ref func))))) (type $$f12 (sub $$f11 (func (result (ref $$f11)))))) + (rec (type $$f21 (sub (func (result (ref func))))) (type $$f22 (sub $$f21 (func (result (ref $$f21)))))) + (func (export "f11") (type $$f11) (unreachable)) + (func (export "f12") (type $$f12) (unreachable)) +)`); + +// ./test/core/gc/type-subtyping.wast:630 +register($37, `M8`); + +// ./test/core/gc/type-subtyping.wast:631 +let $38 = instantiate(`(module + (rec (type $$f11 (sub (func (result (ref func))))) (type $$f12 (sub $$f11 (func (result (ref $$f11)))))) + (rec (type $$f21 (sub (func (result (ref func))))) (type $$f22 (sub $$f21 (func (result (ref $$f21)))))) + (func (import "M8" "f11") (type $$f11)) + (func (import "M8" "f11") (type $$f21)) + (func (import "M8" "f12") (type $$f12)) + (func (import "M8" "f12") (type $$f22)) +)`); + +// ./test/core/gc/type-subtyping.wast:640 +let $39 = instantiate(`(module + (rec (type $$f11 (sub (func (result (ref func))))) (type $$f12 (sub $$f11 (func (result (ref $$f11)))))) + (rec (type $$f21 (sub (func (result (ref func))))) (type $$f22 (sub $$f21 (func (result (ref $$f21)))))) + (rec (type $$g11 (sub $$f11 (func (result (ref func))))) (type $$g12 (sub $$g11 (func (result (ref $$g11)))))) + (rec (type $$g21 (sub $$f21 (func (result (ref func))))) (type $$g22 (sub $$g21 (func (result (ref $$g21)))))) + (func (export "g11") (type $$g11) (unreachable)) + (func (export "g12") (type $$g12) (unreachable)) +)`); + +// ./test/core/gc/type-subtyping.wast:648 +register($39, `M9`); + +// ./test/core/gc/type-subtyping.wast:649 +let $40 = instantiate(`(module + (rec (type $$f11 (sub (func (result (ref func))))) (type $$f12 (sub $$f11 (func (result (ref $$f11)))))) + (rec (type $$f21 (sub (func (result (ref func))))) (type $$f22 (sub $$f21 (func (result (ref $$f21)))))) + (rec (type $$g11 (sub $$f11 (func (result (ref func))))) (type $$g12 (sub $$g11 (func (result (ref $$g11)))))) + (rec (type $$g21 (sub $$f21 (func (result (ref func))))) (type $$g22 (sub $$g21 (func (result (ref $$g21)))))) + (func (import "M9" "g11") (type $$f11)) + (func (import "M9" "g11") (type $$f21)) + (func (import "M9" "g12") (type $$f11)) + (func (import "M9" "g12") (type $$f21)) + (func (import "M9" "g11") (type $$g11)) + (func (import "M9" "g11") (type $$g21)) + (func (import "M9" "g12") (type $$g12)) + (func (import "M9" "g12") (type $$g22)) +)`); + +// ./test/core/gc/type-subtyping.wast:664 +let $41 = instantiate(`(module + (rec (type $$f11 (sub (func))) (type $$f12 (sub $$f11 (func)))) + (rec (type $$f21 (sub (func))) (type $$f22 (sub $$f11 (func)))) + (func (export "f") (type $$f21)) +)`); + +// ./test/core/gc/type-subtyping.wast:669 +register($41, `M10`); + +// ./test/core/gc/type-subtyping.wast:670 +assert_unlinkable( + () => instantiate(`(module + (rec (type $$f11 (sub (func))) (type $$f12 (sub $$f11 (func)))) + (func (import "M10" "f") (type $$f11)) + )`), + `incompatible import`, +); + +// ./test/core/gc/type-subtyping.wast:678 +let $42 = instantiate(`(module + (rec (type $$f01 (sub (func))) (type $$f02 (sub $$f01 (func)))) + (rec (type $$f11 (sub (func))) (type $$f12 (sub $$f01 (func)))) + (rec (type $$f21 (sub (func))) (type $$f22 (sub $$f11 (func)))) + (func (export "f") (type $$f21)) +)`); + +// ./test/core/gc/type-subtyping.wast:684 +register($42, `M11`); + +// ./test/core/gc/type-subtyping.wast:685 +assert_unlinkable( + () => instantiate(`(module + (rec (type $$f01 (sub (func))) (type $$f02 (sub $$f01 (func)))) + (rec (type $$f11 (sub (func))) (type $$f12 (sub $$f01 (func)))) + (func (import "M11" "f") (type $$f11)) + )`), + `incompatible import`, +); + +// ./test/core/gc/type-subtyping.wast:698 +assert_invalid( + () => instantiate(`(module + (type $$t (func)) + (type $$s (sub $$t (func))) + )`), + `sub type`, +); + +// ./test/core/gc/type-subtyping.wast:706 +assert_invalid( + () => instantiate(`(module + (type $$t (struct)) + (type $$s (sub $$t (struct))) + )`), + `sub type`, +); + +// ./test/core/gc/type-subtyping.wast:714 +assert_invalid( + () => instantiate(`(module + (type $$t (sub final (func))) + (type $$s (sub $$t (func))) + )`), + `sub type`, +); + +// ./test/core/gc/type-subtyping.wast:722 +assert_invalid( + () => instantiate(`(module + (type $$t (sub (func))) + (type $$s (sub final $$t (func))) + (type $$u (sub $$s (func))) + )`), + `sub type`, +); + +// ./test/core/gc/type-subtyping.wast:735 +assert_invalid( + () => instantiate(`(module + (type $$a0 (sub (array i32))) + (type $$s0 (sub $$a0 (struct))) + )`), + `sub type`, +); + +// ./test/core/gc/type-subtyping.wast:743 +assert_invalid( + () => instantiate(`(module + (type $$f0 (sub (func (param i32) (result i32)))) + (type $$s0 (sub $$f0 (struct))) + )`), + `sub type`, +); + +// ./test/core/gc/type-subtyping.wast:751 +assert_invalid( + () => instantiate(`(module + (type $$s0 (sub (struct))) + (type $$a0 (sub $$s0 (array i32))) + )`), + `sub type`, +); + +// ./test/core/gc/type-subtyping.wast:759 +assert_invalid( + () => instantiate(`(module + (type $$f0 (sub (func (param i32) (result i32)))) + (type $$a0 (sub $$f0 (array i32))) + )`), + `sub type`, +); + +// ./test/core/gc/type-subtyping.wast:767 +assert_invalid( + () => instantiate(`(module + (type $$s0 (sub (struct))) + (type $$f0 (sub $$s0 (func (param i32) (result i32)))) + )`), + `sub type`, +); + +// ./test/core/gc/type-subtyping.wast:775 +assert_invalid( + () => instantiate(`(module + (type $$a0 (sub (array i32))) + (type $$f0 (sub $$a0 (func (param i32) (result i32)))) + )`), + `sub type`, +); + +// ./test/core/gc/type-subtyping.wast:783 +assert_invalid( + () => instantiate(`(module + (type $$a0 (sub (array i32))) + (type $$a1 (sub $$a0 (array i64))) + )`), + `sub type`, +); + +// ./test/core/gc/type-subtyping.wast:791 +assert_invalid( + () => instantiate(`(module + (type $$s0 (sub (struct (field i32)))) + (type $$s1 (sub $$s0 (struct (field i64)))) + )`), + `sub type`, +); + +// ./test/core/gc/type-subtyping.wast:799 +assert_invalid( + () => instantiate(`(module + (type $$f0 (sub (func))) + (type $$f1 (sub $$f0 (func (param i32)))) + )`), + `sub type`, +); diff --git a/js/src/jit-test/tests/wasm/spec/gc/unreachable.wast.js b/js/src/jit-test/tests/wasm/spec/gc/unreachable.wast.js new file mode 100644 index 0000000000..68401d21d0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/unreachable.wast.js @@ -0,0 +1,424 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/unreachable.wast + +// ./test/core/unreachable.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definitions + (func $$dummy) + (func $$dummy3 (param i32 i32 i32)) + + (func (export "type-i32") (result i32) (unreachable)) + (func (export "type-i64") (result i64) (unreachable)) + (func (export "type-f32") (result f32) (unreachable)) + (func (export "type-f64") (result f64) (unreachable)) + + (func (export "as-func-first") (result i32) + (unreachable) (i32.const -1) + ) + (func (export "as-func-mid") (result i32) + (call $$dummy) (unreachable) (i32.const -1) + ) + (func (export "as-func-last") + (call $$dummy) (unreachable) + ) + (func (export "as-func-value") (result i32) + (call $$dummy) (unreachable) + ) + + (func (export "as-block-first") (result i32) + (block (result i32) (unreachable) (i32.const 2)) + ) + (func (export "as-block-mid") (result i32) + (block (result i32) (call $$dummy) (unreachable) (i32.const 2)) + ) + (func (export "as-block-last") + (block (nop) (call $$dummy) (unreachable)) + ) + (func (export "as-block-value") (result i32) + (block (result i32) (nop) (call $$dummy) (unreachable)) + ) + (func (export "as-block-broke") (result i32) + (block (result i32) (call $$dummy) (br 0 (i32.const 1)) (unreachable)) + ) + + (func (export "as-loop-first") (result i32) + (loop (result i32) (unreachable) (i32.const 2)) + ) + (func (export "as-loop-mid") (result i32) + (loop (result i32) (call $$dummy) (unreachable) (i32.const 2)) + ) + (func (export "as-loop-last") + (loop (nop) (call $$dummy) (unreachable)) + ) + (func (export "as-loop-broke") (result i32) + (block (result i32) + (loop (result i32) (call $$dummy) (br 1 (i32.const 1)) (unreachable)) + ) + ) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (unreachable))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (unreachable))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (unreachable) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 6) (unreachable))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (unreachable))) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (unreachable) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-2") (result i32) + (block (result i32) + (block (result i32) (br_table 0 1 (unreachable) (i32.const 1))) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 6) (unreachable)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-and-index") (result i32) + (block (result i32) (br_table 0 0 (unreachable)) (i32.const 8)) + ) + + (func (export "as-return-value") (result i64) + (return (unreachable)) + ) + + (func (export "as-if-cond") (result i32) + (if (result i32) (unreachable) (then (i32.const 0)) (else (i32.const 1))) + ) + (func (export "as-if-then") (param i32 i32) (result i32) + (if (result i32) (local.get 0) (then (unreachable)) (else (local.get 1))) + ) + (func (export "as-if-else") (param i32 i32) (result i32) + (if (result i32) (local.get 0) (then (local.get 1)) (else (unreachable))) + ) + (func (export "as-if-then-no-else") (param i32 i32) (result i32) + (if (local.get 0) (then (unreachable))) (local.get 1) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (select (unreachable) (local.get 0) (local.get 1)) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (select (local.get 0) (unreachable) (local.get 1)) + ) + (func (export "as-select-cond") (result i32) + (select (i32.const 0) (i32.const 1) (unreachable)) + ) + + (func (export "as-call-first") + (call $$dummy3 (unreachable) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call-mid") + (call $$dummy3 (i32.const 1) (unreachable) (i32.const 3)) + ) + (func (export "as-call-last") + (call $$dummy3 (i32.const 1) (i32.const 2) (unreachable)) + ) + + (type $$sig (func (param i32 i32 i32))) + (table funcref (elem $$dummy3)) + (func (export "as-call_indirect-func") + (call_indirect (type $$sig) + (unreachable) (i32.const 1) (i32.const 2) (i32.const 3) + ) + ) + (func (export "as-call_indirect-first") + (call_indirect (type $$sig) + (i32.const 0) (unreachable) (i32.const 2) (i32.const 3) + ) + ) + (func (export "as-call_indirect-mid") + (call_indirect (type $$sig) + (i32.const 0) (i32.const 1) (unreachable) (i32.const 3) + ) + ) + (func (export "as-call_indirect-last") + (call_indirect (type $$sig) + (i32.const 0) (i32.const 1) (i32.const 2) (unreachable) + ) + ) + + (func (export "as-local.set-value") (local f32) + (local.set 0 (unreachable)) + ) + (func (export "as-local.tee-value") (result f32) (local f32) + (local.tee 0 (unreachable)) + ) + (global $$a (mut f32) (f32.const 0)) + (func (export "as-global.set-value") (result f32) + (global.set $$a (unreachable)) + ) + + (memory 1) + (func (export "as-load-address") (result f32) + (f32.load (unreachable)) + ) + (func (export "as-loadN-address") (result i64) + (i64.load8_s (unreachable)) + ) + + (func (export "as-store-address") + (f64.store (unreachable) (f64.const 7)) + ) + (func (export "as-store-value") + (i64.store (i32.const 2) (unreachable)) + ) + + (func (export "as-storeN-address") + (i32.store8 (unreachable) (i32.const 7)) + ) + (func (export "as-storeN-value") + (i64.store16 (i32.const 2) (unreachable)) + ) + + (func (export "as-unary-operand") (result f32) + (f32.neg (unreachable)) + ) + + (func (export "as-binary-left") (result i32) + (i32.add (unreachable) (i32.const 10)) + ) + (func (export "as-binary-right") (result i64) + (i64.sub (i64.const 10) (unreachable)) + ) + + (func (export "as-test-operand") (result i32) + (i32.eqz (unreachable)) + ) + + (func (export "as-compare-left") (result i32) + (f64.le (unreachable) (f64.const 10)) + ) + (func (export "as-compare-right") (result i32) + (f32.ne (f32.const 10) (unreachable)) + ) + + (func (export "as-convert-operand") (result i32) + (i32.wrap_i64 (unreachable)) + ) + + (func (export "as-memory.grow-size") (result i32) + (memory.grow (unreachable)) + ) +)`); + +// ./test/core/unreachable.wast:221 +assert_trap(() => invoke($0, `type-i32`, []), `unreachable`); + +// ./test/core/unreachable.wast:222 +assert_trap(() => invoke($0, `type-i64`, []), `unreachable`); + +// ./test/core/unreachable.wast:223 +assert_trap(() => invoke($0, `type-f32`, []), `unreachable`); + +// ./test/core/unreachable.wast:224 +assert_trap(() => invoke($0, `type-f64`, []), `unreachable`); + +// ./test/core/unreachable.wast:226 +assert_trap(() => invoke($0, `as-func-first`, []), `unreachable`); + +// ./test/core/unreachable.wast:227 +assert_trap(() => invoke($0, `as-func-mid`, []), `unreachable`); + +// ./test/core/unreachable.wast:228 +assert_trap(() => invoke($0, `as-func-last`, []), `unreachable`); + +// ./test/core/unreachable.wast:229 +assert_trap(() => invoke($0, `as-func-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:231 +assert_trap(() => invoke($0, `as-block-first`, []), `unreachable`); + +// ./test/core/unreachable.wast:232 +assert_trap(() => invoke($0, `as-block-mid`, []), `unreachable`); + +// ./test/core/unreachable.wast:233 +assert_trap(() => invoke($0, `as-block-last`, []), `unreachable`); + +// ./test/core/unreachable.wast:234 +assert_trap(() => invoke($0, `as-block-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:235 +assert_return(() => invoke($0, `as-block-broke`, []), [value("i32", 1)]); + +// ./test/core/unreachable.wast:237 +assert_trap(() => invoke($0, `as-loop-first`, []), `unreachable`); + +// ./test/core/unreachable.wast:238 +assert_trap(() => invoke($0, `as-loop-mid`, []), `unreachable`); + +// ./test/core/unreachable.wast:239 +assert_trap(() => invoke($0, `as-loop-last`, []), `unreachable`); + +// ./test/core/unreachable.wast:240 +assert_return(() => invoke($0, `as-loop-broke`, []), [value("i32", 1)]); + +// ./test/core/unreachable.wast:242 +assert_trap(() => invoke($0, `as-br-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:244 +assert_trap(() => invoke($0, `as-br_if-cond`, []), `unreachable`); + +// ./test/core/unreachable.wast:245 +assert_trap(() => invoke($0, `as-br_if-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:246 +assert_trap(() => invoke($0, `as-br_if-value-cond`, []), `unreachable`); + +// ./test/core/unreachable.wast:248 +assert_trap(() => invoke($0, `as-br_table-index`, []), `unreachable`); + +// ./test/core/unreachable.wast:249 +assert_trap(() => invoke($0, `as-br_table-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:250 +assert_trap(() => invoke($0, `as-br_table-value-2`, []), `unreachable`); + +// ./test/core/unreachable.wast:251 +assert_trap(() => invoke($0, `as-br_table-value-index`, []), `unreachable`); + +// ./test/core/unreachable.wast:252 +assert_trap(() => invoke($0, `as-br_table-value-and-index`, []), `unreachable`); + +// ./test/core/unreachable.wast:254 +assert_trap(() => invoke($0, `as-return-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:256 +assert_trap(() => invoke($0, `as-if-cond`, []), `unreachable`); + +// ./test/core/unreachable.wast:257 +assert_trap(() => invoke($0, `as-if-then`, [1, 6]), `unreachable`); + +// ./test/core/unreachable.wast:258 +assert_return(() => invoke($0, `as-if-then`, [0, 6]), [value("i32", 6)]); + +// ./test/core/unreachable.wast:259 +assert_trap(() => invoke($0, `as-if-else`, [0, 6]), `unreachable`); + +// ./test/core/unreachable.wast:260 +assert_return(() => invoke($0, `as-if-else`, [1, 6]), [value("i32", 6)]); + +// ./test/core/unreachable.wast:261 +assert_trap(() => invoke($0, `as-if-then-no-else`, [1, 6]), `unreachable`); + +// ./test/core/unreachable.wast:262 +assert_return(() => invoke($0, `as-if-then-no-else`, [0, 6]), [value("i32", 6)]); + +// ./test/core/unreachable.wast:264 +assert_trap(() => invoke($0, `as-select-first`, [0, 6]), `unreachable`); + +// ./test/core/unreachable.wast:265 +assert_trap(() => invoke($0, `as-select-first`, [1, 6]), `unreachable`); + +// ./test/core/unreachable.wast:266 +assert_trap(() => invoke($0, `as-select-second`, [0, 6]), `unreachable`); + +// ./test/core/unreachable.wast:267 +assert_trap(() => invoke($0, `as-select-second`, [1, 6]), `unreachable`); + +// ./test/core/unreachable.wast:268 +assert_trap(() => invoke($0, `as-select-cond`, []), `unreachable`); + +// ./test/core/unreachable.wast:270 +assert_trap(() => invoke($0, `as-call-first`, []), `unreachable`); + +// ./test/core/unreachable.wast:271 +assert_trap(() => invoke($0, `as-call-mid`, []), `unreachable`); + +// ./test/core/unreachable.wast:272 +assert_trap(() => invoke($0, `as-call-last`, []), `unreachable`); + +// ./test/core/unreachable.wast:274 +assert_trap(() => invoke($0, `as-call_indirect-func`, []), `unreachable`); + +// ./test/core/unreachable.wast:275 +assert_trap(() => invoke($0, `as-call_indirect-first`, []), `unreachable`); + +// ./test/core/unreachable.wast:276 +assert_trap(() => invoke($0, `as-call_indirect-mid`, []), `unreachable`); + +// ./test/core/unreachable.wast:277 +assert_trap(() => invoke($0, `as-call_indirect-last`, []), `unreachable`); + +// ./test/core/unreachable.wast:279 +assert_trap(() => invoke($0, `as-local.set-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:280 +assert_trap(() => invoke($0, `as-local.tee-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:281 +assert_trap(() => invoke($0, `as-global.set-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:283 +assert_trap(() => invoke($0, `as-load-address`, []), `unreachable`); + +// ./test/core/unreachable.wast:284 +assert_trap(() => invoke($0, `as-loadN-address`, []), `unreachable`); + +// ./test/core/unreachable.wast:286 +assert_trap(() => invoke($0, `as-store-address`, []), `unreachable`); + +// ./test/core/unreachable.wast:287 +assert_trap(() => invoke($0, `as-store-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:288 +assert_trap(() => invoke($0, `as-storeN-address`, []), `unreachable`); + +// ./test/core/unreachable.wast:289 +assert_trap(() => invoke($0, `as-storeN-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:291 +assert_trap(() => invoke($0, `as-unary-operand`, []), `unreachable`); + +// ./test/core/unreachable.wast:293 +assert_trap(() => invoke($0, `as-binary-left`, []), `unreachable`); + +// ./test/core/unreachable.wast:294 +assert_trap(() => invoke($0, `as-binary-right`, []), `unreachable`); + +// ./test/core/unreachable.wast:296 +assert_trap(() => invoke($0, `as-test-operand`, []), `unreachable`); + +// ./test/core/unreachable.wast:298 +assert_trap(() => invoke($0, `as-compare-left`, []), `unreachable`); + +// ./test/core/unreachable.wast:299 +assert_trap(() => invoke($0, `as-compare-right`, []), `unreachable`); + +// ./test/core/unreachable.wast:301 +assert_trap(() => invoke($0, `as-convert-operand`, []), `unreachable`); + +// ./test/core/unreachable.wast:303 +assert_trap(() => invoke($0, `as-memory.grow-size`, []), `unreachable`); diff --git a/js/src/jit-test/tests/wasm/spec/gc/unreached-valid.wast.js b/js/src/jit-test/tests/wasm/spec/gc/unreached-valid.wast.js new file mode 100644 index 0000000000..ced4b9df3c --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/gc/unreached-valid.wast.js @@ -0,0 +1,138 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/unreached-valid.wast + +// ./test/core/unreached-valid.wast:1 +let $0 = instantiate(`(module + + ;; Check that both sides of the select are evaluated + (func (export "select-trap-left") (param $$cond i32) (result i32) + (select (unreachable) (i32.const 0) (local.get $$cond)) + ) + (func (export "select-trap-right") (param $$cond i32) (result i32) + (select (i32.const 0) (unreachable) (local.get $$cond)) + ) + + (func (export "select-unreached") + (unreachable) (select) + (unreachable) (i32.const 0) (select) + (unreachable) (i32.const 0) (i32.const 0) (select) + (unreachable) (i32.const 0) (i32.const 0) (i32.const 0) (select) + (unreachable) (f32.const 0) (i32.const 0) (select) + (unreachable) + ) + + (func (export "select-unreached-result1") (result i32) + (unreachable) (i32.add (select)) + ) + + (func (export "select-unreached-result2") (result i64) + (unreachable) (i64.add (select (i64.const 0) (i32.const 0))) + ) + + (func (export "select-unreached-num") + (unreachable) + (select) + (i32.eqz) + (drop) + ) + (func (export "select-unreached-ref") + (unreachable) + (select) + (ref.is_null) + (drop) + ) + + (type $$t (func (param i32) (result i32))) + (func (export "call_ref-unreached") (result i32) + (unreachable) + (call_ref $$t) + ) +)`); + +// ./test/core/unreached-valid.wast:48 +assert_trap(() => invoke($0, `select-trap-left`, [1]), `unreachable`); + +// ./test/core/unreached-valid.wast:49 +assert_trap(() => invoke($0, `select-trap-left`, [0]), `unreachable`); + +// ./test/core/unreached-valid.wast:50 +assert_trap(() => invoke($0, `select-trap-right`, [1]), `unreachable`); + +// ./test/core/unreached-valid.wast:51 +assert_trap(() => invoke($0, `select-trap-right`, [0]), `unreachable`); + +// ./test/core/unreached-valid.wast:53 +assert_trap(() => invoke($0, `select-unreached-result1`, []), `unreachable`); + +// ./test/core/unreached-valid.wast:54 +assert_trap(() => invoke($0, `select-unreached-result2`, []), `unreachable`); + +// ./test/core/unreached-valid.wast:55 +assert_trap(() => invoke($0, `select-unreached-num`, []), `unreachable`); + +// ./test/core/unreached-valid.wast:56 +assert_trap(() => invoke($0, `select-unreached-ref`, []), `unreachable`); + +// ./test/core/unreached-valid.wast:58 +assert_trap(() => invoke($0, `call_ref-unreached`, []), `unreachable`); + +// ./test/core/unreached-valid.wast:63 +let $1 = instantiate(`(module + (func (export "meet-bottom") + (block (result f64) + (block (result f32) + (unreachable) + (br_table 0 1 1 (i32.const 1)) + ) + (drop) + (f64.const 0) + ) + (drop) + ) +)`); + +// ./test/core/unreached-valid.wast:77 +assert_trap(() => invoke($1, `meet-bottom`, []), `unreachable`); + +// ./test/core/unreached-valid.wast:82 +let $2 = instantiate(`(module + (func (result (ref func)) + (unreachable) + (ref.as_non_null) + ) + (func (result (ref extern)) + (unreachable) + (ref.as_non_null) + ) + + (func (result (ref func)) + (block (result funcref) + (unreachable) + (br_on_null 0) + (return) + ) + (unreachable) + ) + (func (result (ref extern)) + (block (result externref) + (unreachable) + (br_on_null 0) + (return) + ) + (unreachable) + ) +)`); diff --git a/js/src/jit-test/tests/wasm/spec/memory64/address64.wast.js b/js/src/jit-test/tests/wasm/spec/memory64/address64.wast.js new file mode 100644 index 0000000000..c6de7e8ed7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory64/address64.wast.js @@ -0,0 +1,1025 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/address64.wast + +// ./test/core/address64.wast:3 +let $0 = instantiate(`(module + (memory i64 1) + (data (i64.const 0) "abcdefghijklmnopqrstuvwxyz") + + (func (export "8u_good1") (param $$i i64) (result i32) + (i32.load8_u offset=0 (local.get $$i)) ;; 97 'a' + ) + (func (export "8u_good2") (param $$i i64) (result i32) + (i32.load8_u align=1 (local.get $$i)) ;; 97 'a' + ) + (func (export "8u_good3") (param $$i i64) (result i32) + (i32.load8_u offset=1 align=1 (local.get $$i)) ;; 98 'b' + ) + (func (export "8u_good4") (param $$i i64) (result i32) + (i32.load8_u offset=2 align=1 (local.get $$i)) ;; 99 'c' + ) + (func (export "8u_good5") (param $$i i64) (result i32) + (i32.load8_u offset=25 align=1 (local.get $$i)) ;; 122 'z' + ) + + (func (export "8s_good1") (param $$i i64) (result i32) + (i32.load8_s offset=0 (local.get $$i)) ;; 97 'a' + ) + (func (export "8s_good2") (param $$i i64) (result i32) + (i32.load8_s align=1 (local.get $$i)) ;; 97 'a' + ) + (func (export "8s_good3") (param $$i i64) (result i32) + (i32.load8_s offset=1 align=1 (local.get $$i)) ;; 98 'b' + ) + (func (export "8s_good4") (param $$i i64) (result i32) + (i32.load8_s offset=2 align=1 (local.get $$i)) ;; 99 'c' + ) + (func (export "8s_good5") (param $$i i64) (result i32) + (i32.load8_s offset=25 align=1 (local.get $$i)) ;; 122 'z' + ) + + (func (export "16u_good1") (param $$i i64) (result i32) + (i32.load16_u offset=0 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16u_good2") (param $$i i64) (result i32) + (i32.load16_u align=1 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16u_good3") (param $$i i64) (result i32) + (i32.load16_u offset=1 align=1 (local.get $$i)) ;; 25442 'bc' + ) + (func (export "16u_good4") (param $$i i64) (result i32) + (i32.load16_u offset=2 align=2 (local.get $$i)) ;; 25699 'cd' + ) + (func (export "16u_good5") (param $$i i64) (result i32) + (i32.load16_u offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' + ) + + (func (export "16s_good1") (param $$i i64) (result i32) + (i32.load16_s offset=0 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16s_good2") (param $$i i64) (result i32) + (i32.load16_s align=1 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16s_good3") (param $$i i64) (result i32) + (i32.load16_s offset=1 align=1 (local.get $$i)) ;; 25442 'bc' + ) + (func (export "16s_good4") (param $$i i64) (result i32) + (i32.load16_s offset=2 align=2 (local.get $$i)) ;; 25699 'cd' + ) + (func (export "16s_good5") (param $$i i64) (result i32) + (i32.load16_s offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' + ) + + (func (export "32_good1") (param $$i i64) (result i32) + (i32.load offset=0 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32_good2") (param $$i i64) (result i32) + (i32.load align=1 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32_good3") (param $$i i64) (result i32) + (i32.load offset=1 align=1 (local.get $$i)) ;; 1701077858 'bcde' + ) + (func (export "32_good4") (param $$i i64) (result i32) + (i32.load offset=2 align=2 (local.get $$i)) ;; 1717920867 'cdef' + ) + (func (export "32_good5") (param $$i i64) (result i32) + (i32.load offset=25 align=4 (local.get $$i)) ;; 122 'z\\0\\0\\0' + ) + + (func (export "8u_bad") (param $$i i64) + (drop (i32.load8_u offset=4294967295 (local.get $$i))) + ) + (func (export "8s_bad") (param $$i i64) + (drop (i32.load8_s offset=4294967295 (local.get $$i))) + ) + (func (export "16u_bad") (param $$i i64) + (drop (i32.load16_u offset=4294967295 (local.get $$i))) + ) + (func (export "16s_bad") (param $$i i64) + (drop (i32.load16_s offset=4294967295 (local.get $$i))) + ) + (func (export "32_bad") (param $$i i64) + (drop (i32.load offset=4294967295 (local.get $$i))) + ) +)`); + +// ./test/core/address64.wast:104 +assert_return(() => invoke($0, `8u_good1`, [0n]), [value("i32", 97)]); + +// ./test/core/address64.wast:105 +assert_return(() => invoke($0, `8u_good2`, [0n]), [value("i32", 97)]); + +// ./test/core/address64.wast:106 +assert_return(() => invoke($0, `8u_good3`, [0n]), [value("i32", 98)]); + +// ./test/core/address64.wast:107 +assert_return(() => invoke($0, `8u_good4`, [0n]), [value("i32", 99)]); + +// ./test/core/address64.wast:108 +assert_return(() => invoke($0, `8u_good5`, [0n]), [value("i32", 122)]); + +// ./test/core/address64.wast:110 +assert_return(() => invoke($0, `8s_good1`, [0n]), [value("i32", 97)]); + +// ./test/core/address64.wast:111 +assert_return(() => invoke($0, `8s_good2`, [0n]), [value("i32", 97)]); + +// ./test/core/address64.wast:112 +assert_return(() => invoke($0, `8s_good3`, [0n]), [value("i32", 98)]); + +// ./test/core/address64.wast:113 +assert_return(() => invoke($0, `8s_good4`, [0n]), [value("i32", 99)]); + +// ./test/core/address64.wast:114 +assert_return(() => invoke($0, `8s_good5`, [0n]), [value("i32", 122)]); + +// ./test/core/address64.wast:116 +assert_return(() => invoke($0, `16u_good1`, [0n]), [value("i32", 25185)]); + +// ./test/core/address64.wast:117 +assert_return(() => invoke($0, `16u_good2`, [0n]), [value("i32", 25185)]); + +// ./test/core/address64.wast:118 +assert_return(() => invoke($0, `16u_good3`, [0n]), [value("i32", 25442)]); + +// ./test/core/address64.wast:119 +assert_return(() => invoke($0, `16u_good4`, [0n]), [value("i32", 25699)]); + +// ./test/core/address64.wast:120 +assert_return(() => invoke($0, `16u_good5`, [0n]), [value("i32", 122)]); + +// ./test/core/address64.wast:122 +assert_return(() => invoke($0, `16s_good1`, [0n]), [value("i32", 25185)]); + +// ./test/core/address64.wast:123 +assert_return(() => invoke($0, `16s_good2`, [0n]), [value("i32", 25185)]); + +// ./test/core/address64.wast:124 +assert_return(() => invoke($0, `16s_good3`, [0n]), [value("i32", 25442)]); + +// ./test/core/address64.wast:125 +assert_return(() => invoke($0, `16s_good4`, [0n]), [value("i32", 25699)]); + +// ./test/core/address64.wast:126 +assert_return(() => invoke($0, `16s_good5`, [0n]), [value("i32", 122)]); + +// ./test/core/address64.wast:128 +assert_return(() => invoke($0, `32_good1`, [0n]), [value("i32", 1684234849)]); + +// ./test/core/address64.wast:129 +assert_return(() => invoke($0, `32_good2`, [0n]), [value("i32", 1684234849)]); + +// ./test/core/address64.wast:130 +assert_return(() => invoke($0, `32_good3`, [0n]), [value("i32", 1701077858)]); + +// ./test/core/address64.wast:131 +assert_return(() => invoke($0, `32_good4`, [0n]), [value("i32", 1717920867)]); + +// ./test/core/address64.wast:132 +assert_return(() => invoke($0, `32_good5`, [0n]), [value("i32", 122)]); + +// ./test/core/address64.wast:134 +assert_return(() => invoke($0, `8u_good1`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:135 +assert_return(() => invoke($0, `8u_good2`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:136 +assert_return(() => invoke($0, `8u_good3`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:137 +assert_return(() => invoke($0, `8u_good4`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:138 +assert_return(() => invoke($0, `8u_good5`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:140 +assert_return(() => invoke($0, `8s_good1`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:141 +assert_return(() => invoke($0, `8s_good2`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:142 +assert_return(() => invoke($0, `8s_good3`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:143 +assert_return(() => invoke($0, `8s_good4`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:144 +assert_return(() => invoke($0, `8s_good5`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:146 +assert_return(() => invoke($0, `16u_good1`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:147 +assert_return(() => invoke($0, `16u_good2`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:148 +assert_return(() => invoke($0, `16u_good3`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:149 +assert_return(() => invoke($0, `16u_good4`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:150 +assert_return(() => invoke($0, `16u_good5`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:152 +assert_return(() => invoke($0, `16s_good1`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:153 +assert_return(() => invoke($0, `16s_good2`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:154 +assert_return(() => invoke($0, `16s_good3`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:155 +assert_return(() => invoke($0, `16s_good4`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:156 +assert_return(() => invoke($0, `16s_good5`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:158 +assert_return(() => invoke($0, `32_good1`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:159 +assert_return(() => invoke($0, `32_good2`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:160 +assert_return(() => invoke($0, `32_good3`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:161 +assert_return(() => invoke($0, `32_good4`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:162 +assert_return(() => invoke($0, `32_good5`, [65507n]), [value("i32", 0)]); + +// ./test/core/address64.wast:164 +assert_return(() => invoke($0, `8u_good1`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:165 +assert_return(() => invoke($0, `8u_good2`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:166 +assert_return(() => invoke($0, `8u_good3`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:167 +assert_return(() => invoke($0, `8u_good4`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:168 +assert_return(() => invoke($0, `8u_good5`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:170 +assert_return(() => invoke($0, `8s_good1`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:171 +assert_return(() => invoke($0, `8s_good2`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:172 +assert_return(() => invoke($0, `8s_good3`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:173 +assert_return(() => invoke($0, `8s_good4`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:174 +assert_return(() => invoke($0, `8s_good5`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:176 +assert_return(() => invoke($0, `16u_good1`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:177 +assert_return(() => invoke($0, `16u_good2`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:178 +assert_return(() => invoke($0, `16u_good3`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:179 +assert_return(() => invoke($0, `16u_good4`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:180 +assert_return(() => invoke($0, `16u_good5`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:182 +assert_return(() => invoke($0, `16s_good1`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:183 +assert_return(() => invoke($0, `16s_good2`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:184 +assert_return(() => invoke($0, `16s_good3`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:185 +assert_return(() => invoke($0, `16s_good4`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:186 +assert_return(() => invoke($0, `16s_good5`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:188 +assert_return(() => invoke($0, `32_good1`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:189 +assert_return(() => invoke($0, `32_good2`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:190 +assert_return(() => invoke($0, `32_good3`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:191 +assert_return(() => invoke($0, `32_good4`, [65508n]), [value("i32", 0)]); + +// ./test/core/address64.wast:192 +assert_trap(() => invoke($0, `32_good5`, [65508n]), `out of bounds memory access`); + +// ./test/core/address64.wast:194 +assert_trap(() => invoke($0, `8u_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:195 +assert_trap(() => invoke($0, `8s_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:196 +assert_trap(() => invoke($0, `16u_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:197 +assert_trap(() => invoke($0, `16s_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:198 +assert_trap(() => invoke($0, `32_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:200 +assert_trap(() => invoke($0, `8u_bad`, [1n]), `out of bounds memory access`); + +// ./test/core/address64.wast:201 +assert_trap(() => invoke($0, `8s_bad`, [1n]), `out of bounds memory access`); + +// ./test/core/address64.wast:202 +assert_trap(() => invoke($0, `16u_bad`, [1n]), `out of bounds memory access`); + +// ./test/core/address64.wast:203 +assert_trap(() => invoke($0, `16s_bad`, [1n]), `out of bounds memory access`); + +// ./test/core/address64.wast:204 +assert_trap(() => invoke($0, `32_bad`, [1n]), `out of bounds memory access`); + +// ./test/core/address64.wast:209 +let $1 = instantiate(`(module + (memory i64 1) + (data (i64.const 0) "abcdefghijklmnopqrstuvwxyz") + + (func (export "8u_good1") (param $$i i64) (result i64) + (i64.load8_u offset=0 (local.get $$i)) ;; 97 'a' + ) + (func (export "8u_good2") (param $$i i64) (result i64) + (i64.load8_u align=1 (local.get $$i)) ;; 97 'a' + ) + (func (export "8u_good3") (param $$i i64) (result i64) + (i64.load8_u offset=1 align=1 (local.get $$i)) ;; 98 'b' + ) + (func (export "8u_good4") (param $$i i64) (result i64) + (i64.load8_u offset=2 align=1 (local.get $$i)) ;; 99 'c' + ) + (func (export "8u_good5") (param $$i i64) (result i64) + (i64.load8_u offset=25 align=1 (local.get $$i)) ;; 122 'z' + ) + + (func (export "8s_good1") (param $$i i64) (result i64) + (i64.load8_s offset=0 (local.get $$i)) ;; 97 'a' + ) + (func (export "8s_good2") (param $$i i64) (result i64) + (i64.load8_s align=1 (local.get $$i)) ;; 97 'a' + ) + (func (export "8s_good3") (param $$i i64) (result i64) + (i64.load8_s offset=1 align=1 (local.get $$i)) ;; 98 'b' + ) + (func (export "8s_good4") (param $$i i64) (result i64) + (i64.load8_s offset=2 align=1 (local.get $$i)) ;; 99 'c' + ) + (func (export "8s_good5") (param $$i i64) (result i64) + (i64.load8_s offset=25 align=1 (local.get $$i)) ;; 122 'z' + ) + + (func (export "16u_good1") (param $$i i64) (result i64) + (i64.load16_u offset=0 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16u_good2") (param $$i i64) (result i64) + (i64.load16_u align=1 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16u_good3") (param $$i i64) (result i64) + (i64.load16_u offset=1 align=1 (local.get $$i)) ;; 25442 'bc' + ) + (func (export "16u_good4") (param $$i i64) (result i64) + (i64.load16_u offset=2 align=2 (local.get $$i)) ;; 25699 'cd' + ) + (func (export "16u_good5") (param $$i i64) (result i64) + (i64.load16_u offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' + ) + + (func (export "16s_good1") (param $$i i64) (result i64) + (i64.load16_s offset=0 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16s_good2") (param $$i i64) (result i64) + (i64.load16_s align=1 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16s_good3") (param $$i i64) (result i64) + (i64.load16_s offset=1 align=1 (local.get $$i)) ;; 25442 'bc' + ) + (func (export "16s_good4") (param $$i i64) (result i64) + (i64.load16_s offset=2 align=2 (local.get $$i)) ;; 25699 'cd' + ) + (func (export "16s_good5") (param $$i i64) (result i64) + (i64.load16_s offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' + ) + + (func (export "32u_good1") (param $$i i64) (result i64) + (i64.load32_u offset=0 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32u_good2") (param $$i i64) (result i64) + (i64.load32_u align=1 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32u_good3") (param $$i i64) (result i64) + (i64.load32_u offset=1 align=1 (local.get $$i)) ;; 1701077858 'bcde' + ) + (func (export "32u_good4") (param $$i i64) (result i64) + (i64.load32_u offset=2 align=2 (local.get $$i)) ;; 1717920867 'cdef' + ) + (func (export "32u_good5") (param $$i i64) (result i64) + (i64.load32_u offset=25 align=4 (local.get $$i)) ;; 122 'z\\0\\0\\0' + ) + + (func (export "32s_good1") (param $$i i64) (result i64) + (i64.load32_s offset=0 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32s_good2") (param $$i i64) (result i64) + (i64.load32_s align=1 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32s_good3") (param $$i i64) (result i64) + (i64.load32_s offset=1 align=1 (local.get $$i)) ;; 1701077858 'bcde' + ) + (func (export "32s_good4") (param $$i i64) (result i64) + (i64.load32_s offset=2 align=2 (local.get $$i)) ;; 1717920867 'cdef' + ) + (func (export "32s_good5") (param $$i i64) (result i64) + (i64.load32_s offset=25 align=4 (local.get $$i)) ;; 122 'z\\0\\0\\0' + ) + + (func (export "64_good1") (param $$i i64) (result i64) + (i64.load offset=0 (local.get $$i)) ;; 0x6867666564636261 'abcdefgh' + ) + (func (export "64_good2") (param $$i i64) (result i64) + (i64.load align=1 (local.get $$i)) ;; 0x6867666564636261 'abcdefgh' + ) + (func (export "64_good3") (param $$i i64) (result i64) + (i64.load offset=1 align=1 (local.get $$i)) ;; 0x6968676665646362 'bcdefghi' + ) + (func (export "64_good4") (param $$i i64) (result i64) + (i64.load offset=2 align=2 (local.get $$i)) ;; 0x6a69686766656463 'cdefghij' + ) + (func (export "64_good5") (param $$i i64) (result i64) + (i64.load offset=25 align=8 (local.get $$i)) ;; 122 'z\\0\\0\\0\\0\\0\\0\\0' + ) + + (func (export "8u_bad") (param $$i i64) + (drop (i64.load8_u offset=4294967295 (local.get $$i))) + ) + (func (export "8s_bad") (param $$i i64) + (drop (i64.load8_s offset=4294967295 (local.get $$i))) + ) + (func (export "16u_bad") (param $$i i64) + (drop (i64.load16_u offset=4294967295 (local.get $$i))) + ) + (func (export "16s_bad") (param $$i i64) + (drop (i64.load16_s offset=4294967295 (local.get $$i))) + ) + (func (export "32u_bad") (param $$i i64) + (drop (i64.load32_u offset=4294967295 (local.get $$i))) + ) + (func (export "32s_bad") (param $$i i64) + (drop (i64.load32_s offset=4294967295 (local.get $$i))) + ) + (func (export "64_bad") (param $$i i64) + (drop (i64.load offset=4294967295 (local.get $$i))) + ) +)`); + +// ./test/core/address64.wast:348 +assert_return(() => invoke($1, `8u_good1`, [0n]), [value("i64", 97n)]); + +// ./test/core/address64.wast:349 +assert_return(() => invoke($1, `8u_good2`, [0n]), [value("i64", 97n)]); + +// ./test/core/address64.wast:350 +assert_return(() => invoke($1, `8u_good3`, [0n]), [value("i64", 98n)]); + +// ./test/core/address64.wast:351 +assert_return(() => invoke($1, `8u_good4`, [0n]), [value("i64", 99n)]); + +// ./test/core/address64.wast:352 +assert_return(() => invoke($1, `8u_good5`, [0n]), [value("i64", 122n)]); + +// ./test/core/address64.wast:354 +assert_return(() => invoke($1, `8s_good1`, [0n]), [value("i64", 97n)]); + +// ./test/core/address64.wast:355 +assert_return(() => invoke($1, `8s_good2`, [0n]), [value("i64", 97n)]); + +// ./test/core/address64.wast:356 +assert_return(() => invoke($1, `8s_good3`, [0n]), [value("i64", 98n)]); + +// ./test/core/address64.wast:357 +assert_return(() => invoke($1, `8s_good4`, [0n]), [value("i64", 99n)]); + +// ./test/core/address64.wast:358 +assert_return(() => invoke($1, `8s_good5`, [0n]), [value("i64", 122n)]); + +// ./test/core/address64.wast:360 +assert_return(() => invoke($1, `16u_good1`, [0n]), [value("i64", 25185n)]); + +// ./test/core/address64.wast:361 +assert_return(() => invoke($1, `16u_good2`, [0n]), [value("i64", 25185n)]); + +// ./test/core/address64.wast:362 +assert_return(() => invoke($1, `16u_good3`, [0n]), [value("i64", 25442n)]); + +// ./test/core/address64.wast:363 +assert_return(() => invoke($1, `16u_good4`, [0n]), [value("i64", 25699n)]); + +// ./test/core/address64.wast:364 +assert_return(() => invoke($1, `16u_good5`, [0n]), [value("i64", 122n)]); + +// ./test/core/address64.wast:366 +assert_return(() => invoke($1, `16s_good1`, [0n]), [value("i64", 25185n)]); + +// ./test/core/address64.wast:367 +assert_return(() => invoke($1, `16s_good2`, [0n]), [value("i64", 25185n)]); + +// ./test/core/address64.wast:368 +assert_return(() => invoke($1, `16s_good3`, [0n]), [value("i64", 25442n)]); + +// ./test/core/address64.wast:369 +assert_return(() => invoke($1, `16s_good4`, [0n]), [value("i64", 25699n)]); + +// ./test/core/address64.wast:370 +assert_return(() => invoke($1, `16s_good5`, [0n]), [value("i64", 122n)]); + +// ./test/core/address64.wast:372 +assert_return(() => invoke($1, `32u_good1`, [0n]), [value("i64", 1684234849n)]); + +// ./test/core/address64.wast:373 +assert_return(() => invoke($1, `32u_good2`, [0n]), [value("i64", 1684234849n)]); + +// ./test/core/address64.wast:374 +assert_return(() => invoke($1, `32u_good3`, [0n]), [value("i64", 1701077858n)]); + +// ./test/core/address64.wast:375 +assert_return(() => invoke($1, `32u_good4`, [0n]), [value("i64", 1717920867n)]); + +// ./test/core/address64.wast:376 +assert_return(() => invoke($1, `32u_good5`, [0n]), [value("i64", 122n)]); + +// ./test/core/address64.wast:378 +assert_return(() => invoke($1, `32s_good1`, [0n]), [value("i64", 1684234849n)]); + +// ./test/core/address64.wast:379 +assert_return(() => invoke($1, `32s_good2`, [0n]), [value("i64", 1684234849n)]); + +// ./test/core/address64.wast:380 +assert_return(() => invoke($1, `32s_good3`, [0n]), [value("i64", 1701077858n)]); + +// ./test/core/address64.wast:381 +assert_return(() => invoke($1, `32s_good4`, [0n]), [value("i64", 1717920867n)]); + +// ./test/core/address64.wast:382 +assert_return(() => invoke($1, `32s_good5`, [0n]), [value("i64", 122n)]); + +// ./test/core/address64.wast:384 +assert_return(() => invoke($1, `64_good1`, [0n]), [value("i64", 7523094288207667809n)]); + +// ./test/core/address64.wast:385 +assert_return(() => invoke($1, `64_good2`, [0n]), [value("i64", 7523094288207667809n)]); + +// ./test/core/address64.wast:386 +assert_return(() => invoke($1, `64_good3`, [0n]), [value("i64", 7595434461045744482n)]); + +// ./test/core/address64.wast:387 +assert_return(() => invoke($1, `64_good4`, [0n]), [value("i64", 7667774633883821155n)]); + +// ./test/core/address64.wast:388 +assert_return(() => invoke($1, `64_good5`, [0n]), [value("i64", 122n)]); + +// ./test/core/address64.wast:390 +assert_return(() => invoke($1, `8u_good1`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:391 +assert_return(() => invoke($1, `8u_good2`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:392 +assert_return(() => invoke($1, `8u_good3`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:393 +assert_return(() => invoke($1, `8u_good4`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:394 +assert_return(() => invoke($1, `8u_good5`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:396 +assert_return(() => invoke($1, `8s_good1`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:397 +assert_return(() => invoke($1, `8s_good2`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:398 +assert_return(() => invoke($1, `8s_good3`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:399 +assert_return(() => invoke($1, `8s_good4`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:400 +assert_return(() => invoke($1, `8s_good5`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:402 +assert_return(() => invoke($1, `16u_good1`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:403 +assert_return(() => invoke($1, `16u_good2`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:404 +assert_return(() => invoke($1, `16u_good3`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:405 +assert_return(() => invoke($1, `16u_good4`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:406 +assert_return(() => invoke($1, `16u_good5`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:408 +assert_return(() => invoke($1, `16s_good1`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:409 +assert_return(() => invoke($1, `16s_good2`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:410 +assert_return(() => invoke($1, `16s_good3`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:411 +assert_return(() => invoke($1, `16s_good4`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:412 +assert_return(() => invoke($1, `16s_good5`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:414 +assert_return(() => invoke($1, `32u_good1`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:415 +assert_return(() => invoke($1, `32u_good2`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:416 +assert_return(() => invoke($1, `32u_good3`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:417 +assert_return(() => invoke($1, `32u_good4`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:418 +assert_return(() => invoke($1, `32u_good5`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:420 +assert_return(() => invoke($1, `32s_good1`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:421 +assert_return(() => invoke($1, `32s_good2`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:422 +assert_return(() => invoke($1, `32s_good3`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:423 +assert_return(() => invoke($1, `32s_good4`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:424 +assert_return(() => invoke($1, `32s_good5`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:426 +assert_return(() => invoke($1, `64_good1`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:427 +assert_return(() => invoke($1, `64_good2`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:428 +assert_return(() => invoke($1, `64_good3`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:429 +assert_return(() => invoke($1, `64_good4`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:430 +assert_return(() => invoke($1, `64_good5`, [65503n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:432 +assert_return(() => invoke($1, `8u_good1`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:433 +assert_return(() => invoke($1, `8u_good2`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:434 +assert_return(() => invoke($1, `8u_good3`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:435 +assert_return(() => invoke($1, `8u_good4`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:436 +assert_return(() => invoke($1, `8u_good5`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:438 +assert_return(() => invoke($1, `8s_good1`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:439 +assert_return(() => invoke($1, `8s_good2`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:440 +assert_return(() => invoke($1, `8s_good3`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:441 +assert_return(() => invoke($1, `8s_good4`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:442 +assert_return(() => invoke($1, `8s_good5`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:444 +assert_return(() => invoke($1, `16u_good1`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:445 +assert_return(() => invoke($1, `16u_good2`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:446 +assert_return(() => invoke($1, `16u_good3`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:447 +assert_return(() => invoke($1, `16u_good4`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:448 +assert_return(() => invoke($1, `16u_good5`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:450 +assert_return(() => invoke($1, `16s_good1`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:451 +assert_return(() => invoke($1, `16s_good2`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:452 +assert_return(() => invoke($1, `16s_good3`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:453 +assert_return(() => invoke($1, `16s_good4`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:454 +assert_return(() => invoke($1, `16s_good5`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:456 +assert_return(() => invoke($1, `32u_good1`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:457 +assert_return(() => invoke($1, `32u_good2`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:458 +assert_return(() => invoke($1, `32u_good3`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:459 +assert_return(() => invoke($1, `32u_good4`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:460 +assert_return(() => invoke($1, `32u_good5`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:462 +assert_return(() => invoke($1, `32s_good1`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:463 +assert_return(() => invoke($1, `32s_good2`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:464 +assert_return(() => invoke($1, `32s_good3`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:465 +assert_return(() => invoke($1, `32s_good4`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:466 +assert_return(() => invoke($1, `32s_good5`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:468 +assert_return(() => invoke($1, `64_good1`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:469 +assert_return(() => invoke($1, `64_good2`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:470 +assert_return(() => invoke($1, `64_good3`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:471 +assert_return(() => invoke($1, `64_good4`, [65504n]), [value("i64", 0n)]); + +// ./test/core/address64.wast:472 +assert_trap(() => invoke($1, `64_good5`, [65504n]), `out of bounds memory access`); + +// ./test/core/address64.wast:474 +assert_trap(() => invoke($1, `8u_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:475 +assert_trap(() => invoke($1, `8s_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:476 +assert_trap(() => invoke($1, `16u_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:477 +assert_trap(() => invoke($1, `16s_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:478 +assert_trap(() => invoke($1, `32u_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:479 +assert_trap(() => invoke($1, `32s_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:480 +assert_trap(() => invoke($1, `64_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:482 +assert_trap(() => invoke($1, `8u_bad`, [1n]), `out of bounds memory access`); + +// ./test/core/address64.wast:483 +assert_trap(() => invoke($1, `8s_bad`, [1n]), `out of bounds memory access`); + +// ./test/core/address64.wast:484 +assert_trap(() => invoke($1, `16u_bad`, [1n]), `out of bounds memory access`); + +// ./test/core/address64.wast:485 +assert_trap(() => invoke($1, `16s_bad`, [1n]), `out of bounds memory access`); + +// ./test/core/address64.wast:486 +assert_trap(() => invoke($1, `32u_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:487 +assert_trap(() => invoke($1, `32s_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:488 +assert_trap(() => invoke($1, `64_bad`, [1n]), `out of bounds memory access`); + +// ./test/core/address64.wast:492 +let $2 = instantiate(`(module + (memory i64 1) + (data (i64.const 0) "\\00\\00\\00\\00\\00\\00\\a0\\7f\\01\\00\\d0\\7f") + + (func (export "32_good1") (param $$i i64) (result f32) + (f32.load offset=0 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00' + ) + (func (export "32_good2") (param $$i i64) (result f32) + (f32.load align=1 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00' + ) + (func (export "32_good3") (param $$i i64) (result f32) + (f32.load offset=1 align=1 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00' + ) + (func (export "32_good4") (param $$i i64) (result f32) + (f32.load offset=2 align=2 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00' + ) + (func (export "32_good5") (param $$i i64) (result f32) + (f32.load offset=8 align=4 (local.get $$i)) ;; nan:0x500001 '\\01\\00\\d0\\7f' + ) + (func (export "32_bad") (param $$i i64) + (drop (f32.load offset=4294967295 (local.get $$i))) + ) +)`); + +// ./test/core/address64.wast:516 +assert_return(() => invoke($2, `32_good1`, [0n]), [value("f32", 0)]); + +// ./test/core/address64.wast:517 +assert_return(() => invoke($2, `32_good2`, [0n]), [value("f32", 0)]); + +// ./test/core/address64.wast:518 +assert_return(() => invoke($2, `32_good3`, [0n]), [value("f32", 0)]); + +// ./test/core/address64.wast:519 +assert_return(() => invoke($2, `32_good4`, [0n]), [value("f32", 0)]); + +// ./test/core/address64.wast:520 +assert_return(() => invoke($2, `32_good5`, [0n]), [bytes("f32", [0x1, 0x0, 0xd0, 0x7f])]); + +// ./test/core/address64.wast:522 +assert_return(() => invoke($2, `32_good1`, [65524n]), [value("f32", 0)]); + +// ./test/core/address64.wast:523 +assert_return(() => invoke($2, `32_good2`, [65524n]), [value("f32", 0)]); + +// ./test/core/address64.wast:524 +assert_return(() => invoke($2, `32_good3`, [65524n]), [value("f32", 0)]); + +// ./test/core/address64.wast:525 +assert_return(() => invoke($2, `32_good4`, [65524n]), [value("f32", 0)]); + +// ./test/core/address64.wast:526 +assert_return(() => invoke($2, `32_good5`, [65524n]), [value("f32", 0)]); + +// ./test/core/address64.wast:528 +assert_return(() => invoke($2, `32_good1`, [65525n]), [value("f32", 0)]); + +// ./test/core/address64.wast:529 +assert_return(() => invoke($2, `32_good2`, [65525n]), [value("f32", 0)]); + +// ./test/core/address64.wast:530 +assert_return(() => invoke($2, `32_good3`, [65525n]), [value("f32", 0)]); + +// ./test/core/address64.wast:531 +assert_return(() => invoke($2, `32_good4`, [65525n]), [value("f32", 0)]); + +// ./test/core/address64.wast:532 +assert_trap(() => invoke($2, `32_good5`, [65525n]), `out of bounds memory access`); + +// ./test/core/address64.wast:534 +assert_trap(() => invoke($2, `32_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:535 +assert_trap(() => invoke($2, `32_bad`, [1n]), `out of bounds memory access`); + +// ./test/core/address64.wast:539 +let $3 = instantiate(`(module + (memory i64 1) + (data (i64.const 0) "\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\f4\\7f\\01\\00\\00\\00\\00\\00\\fc\\7f") + + (func (export "64_good1") (param $$i i64) (result f64) + (f64.load offset=0 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00' + ) + (func (export "64_good2") (param $$i i64) (result f64) + (f64.load align=1 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00' + ) + (func (export "64_good3") (param $$i i64) (result f64) + (f64.load offset=1 align=1 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00' + ) + (func (export "64_good4") (param $$i i64) (result f64) + (f64.load offset=2 align=2 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00' + ) + (func (export "64_good5") (param $$i i64) (result f64) + (f64.load offset=18 align=8 (local.get $$i)) ;; nan:0xc000000000001 '\\01\\00\\00\\00\\00\\00\\fc\\7f' + ) + (func (export "64_bad") (param $$i i64) + (drop (f64.load offset=4294967295 (local.get $$i))) + ) +)`); + +// ./test/core/address64.wast:563 +assert_return(() => invoke($3, `64_good1`, [0n]), [value("f64", 0)]); + +// ./test/core/address64.wast:564 +assert_return(() => invoke($3, `64_good2`, [0n]), [value("f64", 0)]); + +// ./test/core/address64.wast:565 +assert_return(() => invoke($3, `64_good3`, [0n]), [value("f64", 0)]); + +// ./test/core/address64.wast:566 +assert_return(() => invoke($3, `64_good4`, [0n]), [value("f64", 0)]); + +// ./test/core/address64.wast:567 +assert_return( + () => invoke($3, `64_good5`, [0n]), + [bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f])], +); + +// ./test/core/address64.wast:569 +assert_return(() => invoke($3, `64_good1`, [65510n]), [value("f64", 0)]); + +// ./test/core/address64.wast:570 +assert_return(() => invoke($3, `64_good2`, [65510n]), [value("f64", 0)]); + +// ./test/core/address64.wast:571 +assert_return(() => invoke($3, `64_good3`, [65510n]), [value("f64", 0)]); + +// ./test/core/address64.wast:572 +assert_return(() => invoke($3, `64_good4`, [65510n]), [value("f64", 0)]); + +// ./test/core/address64.wast:573 +assert_return(() => invoke($3, `64_good5`, [65510n]), [value("f64", 0)]); + +// ./test/core/address64.wast:575 +assert_return(() => invoke($3, `64_good1`, [65511n]), [value("f64", 0)]); + +// ./test/core/address64.wast:576 +assert_return(() => invoke($3, `64_good2`, [65511n]), [value("f64", 0)]); + +// ./test/core/address64.wast:577 +assert_return(() => invoke($3, `64_good3`, [65511n]), [value("f64", 0)]); + +// ./test/core/address64.wast:578 +assert_return(() => invoke($3, `64_good4`, [65511n]), [value("f64", 0)]); + +// ./test/core/address64.wast:579 +assert_trap(() => invoke($3, `64_good5`, [65511n]), `out of bounds memory access`); + +// ./test/core/address64.wast:581 +assert_trap(() => invoke($3, `64_bad`, [0n]), `out of bounds memory access`); + +// ./test/core/address64.wast:582 +assert_trap(() => invoke($3, `64_bad`, [1n]), `out of bounds memory access`); diff --git a/js/src/jit-test/tests/wasm/spec/memory64/align64.wast.js b/js/src/jit-test/tests/wasm/spec/memory64/align64.wast.js new file mode 100644 index 0000000000..34b4990f8f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory64/align64.wast.js @@ -0,0 +1,1090 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/align64.wast + +// ./test/core/align64.wast:3 +let $0 = instantiate(`(module (memory i64 0) (func (drop (i32.load8_s align=1 (i64.const 0)))))`); + +// ./test/core/align64.wast:4 +let $1 = instantiate(`(module (memory i64 0) (func (drop (i32.load8_u align=1 (i64.const 0)))))`); + +// ./test/core/align64.wast:5 +let $2 = instantiate(`(module (memory i64 0) (func (drop (i32.load16_s align=2 (i64.const 0)))))`); + +// ./test/core/align64.wast:6 +let $3 = instantiate(`(module (memory i64 0) (func (drop (i32.load16_u align=2 (i64.const 0)))))`); + +// ./test/core/align64.wast:7 +let $4 = instantiate(`(module (memory i64 0) (func (drop (i32.load align=4 (i64.const 0)))))`); + +// ./test/core/align64.wast:8 +let $5 = instantiate(`(module (memory i64 0) (func (drop (i64.load8_s align=1 (i64.const 0)))))`); + +// ./test/core/align64.wast:9 +let $6 = instantiate(`(module (memory i64 0) (func (drop (i64.load8_u align=1 (i64.const 0)))))`); + +// ./test/core/align64.wast:10 +let $7 = instantiate(`(module (memory i64 0) (func (drop (i64.load16_s align=2 (i64.const 0)))))`); + +// ./test/core/align64.wast:11 +let $8 = instantiate(`(module (memory i64 0) (func (drop (i64.load16_u align=2 (i64.const 0)))))`); + +// ./test/core/align64.wast:12 +let $9 = instantiate(`(module (memory i64 0) (func (drop (i64.load32_s align=4 (i64.const 0)))))`); + +// ./test/core/align64.wast:13 +let $10 = instantiate(`(module (memory i64 0) (func (drop (i64.load32_u align=4 (i64.const 0)))))`); + +// ./test/core/align64.wast:14 +let $11 = instantiate(`(module (memory i64 0) (func (drop (i64.load align=8 (i64.const 0)))))`); + +// ./test/core/align64.wast:15 +let $12 = instantiate(`(module (memory i64 0) (func (drop (f32.load align=4 (i64.const 0)))))`); + +// ./test/core/align64.wast:16 +let $13 = instantiate(`(module (memory i64 0) (func (drop (f64.load align=8 (i64.const 0)))))`); + +// ./test/core/align64.wast:17 +let $14 = instantiate(`(module (memory i64 0) (func (i32.store8 align=1 (i64.const 0) (i32.const 1))))`); + +// ./test/core/align64.wast:18 +let $15 = instantiate(`(module (memory i64 0) (func (i32.store16 align=2 (i64.const 0) (i32.const 1))))`); + +// ./test/core/align64.wast:19 +let $16 = instantiate(`(module (memory i64 0) (func (i32.store align=4 (i64.const 0) (i32.const 1))))`); + +// ./test/core/align64.wast:20 +let $17 = instantiate(`(module (memory i64 0) (func (i64.store8 align=1 (i64.const 0) (i64.const 1))))`); + +// ./test/core/align64.wast:21 +let $18 = instantiate(`(module (memory i64 0) (func (i64.store16 align=2 (i64.const 0) (i64.const 1))))`); + +// ./test/core/align64.wast:22 +let $19 = instantiate(`(module (memory i64 0) (func (i64.store32 align=4 (i64.const 0) (i64.const 1))))`); + +// ./test/core/align64.wast:23 +let $20 = instantiate(`(module (memory i64 0) (func (i64.store align=8 (i64.const 0) (i64.const 1))))`); + +// ./test/core/align64.wast:24 +let $21 = instantiate(`(module (memory i64 0) (func (f32.store align=4 (i64.const 0) (f32.const 1.0))))`); + +// ./test/core/align64.wast:25 +let $22 = instantiate(`(module (memory i64 0) (func (f64.store align=8 (i64.const 0) (f64.const 1.0))))`); + +// ./test/core/align64.wast:27 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load8_s align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:33 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load8_s align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:39 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load8_u align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:45 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load8_u align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:51 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load16_s align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:57 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load16_s align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:63 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load16_u align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:69 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load16_u align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:75 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:81 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:87 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load8_s align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:93 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load8_s align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:99 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load8_u align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:105 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load8_u align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:111 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load16_s align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:117 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load16_s align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:123 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load16_u align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:129 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load16_u align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:135 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load32_s align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:141 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load32_s align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:147 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load32_u align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:153 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load32_u align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:159 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:165 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:171 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (f32.load align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:177 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (f32.load align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:183 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (f64.load align=0 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:189 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (drop (f64.load align=7 (i64.const 0))))) `), + `alignment`, +); + +// ./test/core/align64.wast:196 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i32.store8 align=0 (i64.const 0) (i32.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:202 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i32.store8 align=7 (i64.const 0) (i32.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:208 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i32.store16 align=0 (i64.const 0) (i32.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:214 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i32.store16 align=7 (i64.const 0) (i32.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:220 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i32.store align=0 (i64.const 0) (i32.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:226 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i32.store align=7 (i64.const 0) (i32.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:232 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i64.store8 align=0 (i64.const 0) (i64.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:238 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i64.store8 align=7 (i64.const 0) (i64.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:244 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i64.store16 align=0 (i64.const 0) (i64.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:250 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i64.store16 align=7 (i64.const 0) (i64.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:256 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i64.store32 align=0 (i64.const 0) (i64.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:262 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i64.store32 align=7 (i64.const 0) (i64.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:268 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i64.store align=0 (i64.const 0) (i64.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:274 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (i64.store align=7 (i64.const 0) (i64.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:280 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (f32.store align=0 (i64.const 0) (f32.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:286 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (f32.store align=7 (i64.const 0) (f32.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:292 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (f64.store align=0 (i64.const 0) (f32.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:298 +assert_malformed( + () => instantiate(`(module (memory i64 0) (func (f64.store align=7 (i64.const 0) (f32.const 0)))) `), + `alignment`, +); + +// ./test/core/align64.wast:305 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load8_s align=2 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:309 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load8_u align=2 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:313 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load16_s align=4 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:317 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load16_u align=4 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:321 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load align=8 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:325 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load8_s align=2 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:329 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load8_u align=2 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:333 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load16_s align=4 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:337 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load16_u align=4 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:341 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load32_s align=8 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:345 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load32_u align=8 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:349 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load align=16 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:353 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (f32.load align=8 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:357 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (f64.load align=16 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:362 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load8_s align=2 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:366 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load8_u align=2 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:370 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load16_s align=4 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:374 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load16_u align=4 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:378 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i32.load align=8 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:382 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load8_s align=2 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:386 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load8_u align=2 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:390 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load16_s align=4 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:394 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load16_u align=4 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:398 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load32_s align=8 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:402 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load32_u align=8 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:406 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (i64.load align=16 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:410 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (f32.load align=8 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:414 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (drop (f64.load align=16 (i64.const 0)))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:419 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (i32.store8 align=2 (i64.const 0) (i32.const 0))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:423 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (i32.store16 align=4 (i64.const 0) (i32.const 0))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:427 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (i32.store align=8 (i64.const 0) (i32.const 0))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:431 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (i64.store8 align=2 (i64.const 0) (i64.const 0))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:435 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (i64.store16 align=4 (i64.const 0) (i64.const 0))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:439 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (i64.store32 align=8 (i64.const 0) (i64.const 0))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:443 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (i64.store align=16 (i64.const 0) (i64.const 0))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:447 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (f32.store align=8 (i64.const 0) (f32.const 0))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:451 +assert_invalid( + () => instantiate(`(module (memory i64 0) (func (f64.store align=16 (i64.const 0) (f64.const 0))))`), + `alignment must not be larger than natural`, +); + +// ./test/core/align64.wast:458 +let $23 = instantiate(`(module + (memory i64 1) + + ;; $$default: natural alignment, $$1: align=1, $$2: align=2, $$4: align=4, $$8: align=8 + + (func (export "f32_align_switch") (param i32) (result f32) + (local f32 f32) + (local.set 1 (f32.const 10.0)) + (block $$4 + (block $$2 + (block $$1 + (block $$default + (block $$0 + (br_table $$0 $$default $$1 $$2 $$4 (local.get 0)) + ) ;; 0 + (f32.store (i64.const 0) (local.get 1)) + (local.set 2 (f32.load (i64.const 0))) + (br $$4) + ) ;; default + (f32.store align=1 (i64.const 0) (local.get 1)) + (local.set 2 (f32.load align=1 (i64.const 0))) + (br $$4) + ) ;; 1 + (f32.store align=2 (i64.const 0) (local.get 1)) + (local.set 2 (f32.load align=2 (i64.const 0))) + (br $$4) + ) ;; 2 + (f32.store align=4 (i64.const 0) (local.get 1)) + (local.set 2 (f32.load align=4 (i64.const 0))) + ) ;; 4 + (local.get 2) + ) + + (func (export "f64_align_switch") (param i32) (result f64) + (local f64 f64) + (local.set 1 (f64.const 10.0)) + (block $$8 + (block $$4 + (block $$2 + (block $$1 + (block $$default + (block $$0 + (br_table $$0 $$default $$1 $$2 $$4 $$8 (local.get 0)) + ) ;; 0 + (f64.store (i64.const 0) (local.get 1)) + (local.set 2 (f64.load (i64.const 0))) + (br $$8) + ) ;; default + (f64.store align=1 (i64.const 0) (local.get 1)) + (local.set 2 (f64.load align=1 (i64.const 0))) + (br $$8) + ) ;; 1 + (f64.store align=2 (i64.const 0) (local.get 1)) + (local.set 2 (f64.load align=2 (i64.const 0))) + (br $$8) + ) ;; 2 + (f64.store align=4 (i64.const 0) (local.get 1)) + (local.set 2 (f64.load align=4 (i64.const 0))) + (br $$8) + ) ;; 4 + (f64.store align=8 (i64.const 0) (local.get 1)) + (local.set 2 (f64.load align=8 (i64.const 0))) + ) ;; 8 + (local.get 2) + ) + + ;; $$8s: i32/i64.load8_s, $$8u: i32/i64.load8_u, $$16s: i32/i64.load16_s, $$16u: i32/i64.load16_u, $$32: i32.load + ;; $$32s: i64.load32_s, $$32u: i64.load32_u, $$64: i64.load + + (func (export "i32_align_switch") (param i32 i32) (result i32) + (local i32 i32) + (local.set 2 (i32.const 10)) + (block $$32 + (block $$16u + (block $$16s + (block $$8u + (block $$8s + (block $$0 + (br_table $$0 $$8s $$8u $$16s $$16u $$32 (local.get 0)) + ) ;; 0 + (if (i32.eq (local.get 1) (i32.const 0)) + (then + (i32.store8 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load8_s (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 1)) + (then + (i32.store8 align=1 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load8_s align=1 (i64.const 0))) + ) + ) + (br $$32) + ) ;; 8s + (if (i32.eq (local.get 1) (i32.const 0)) + (then + (i32.store8 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load8_u (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 1)) + (then + (i32.store8 align=1 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load8_u align=1 (i64.const 0))) + ) + ) + (br $$32) + ) ;; 8u + (if (i32.eq (local.get 1) (i32.const 0)) + (then + (i32.store16 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load16_s (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 1)) + (then + (i32.store16 align=1 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load16_s align=1 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 2)) + (then + (i32.store16 align=2 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load16_s align=2 (i64.const 0))) + ) + ) + (br $$32) + ) ;; 16s + (if (i32.eq (local.get 1) (i32.const 0)) + (then + (i32.store16 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load16_u (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 1)) + (then + (i32.store16 align=1 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load16_u align=1 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 2)) + (then + (i32.store16 align=2 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load16_u align=2 (i64.const 0))) + ) + ) + (br $$32) + ) ;; 16u + (if (i32.eq (local.get 1) (i32.const 0)) + (then + (i32.store (i64.const 0) (local.get 2)) + (local.set 3 (i32.load (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 1)) + (then + (i32.store align=1 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load align=1 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 2)) + (then + (i32.store align=2 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load align=2 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 4)) + (then + (i32.store align=4 (i64.const 0) (local.get 2)) + (local.set 3 (i32.load align=4 (i64.const 0))) + ) + ) + ) ;; 32 + (local.get 3) + ) + + (func (export "i64_align_switch") (param i32 i32) (result i64) + (local i64 i64) + (local.set 2 (i64.const 10)) + (block $$64 + (block $$32u + (block $$32s + (block $$16u + (block $$16s + (block $$8u + (block $$8s + (block $$0 + (br_table $$0 $$8s $$8u $$16s $$16u $$32s $$32u $$64 (local.get 0)) + ) ;; 0 + (if (i32.eq (local.get 1) (i32.const 0)) + (then + (i64.store8 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load8_s (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 1)) + (then + (i64.store8 align=1 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load8_s align=1 (i64.const 0))) + ) + ) + (br $$64) + ) ;; 8s + (if (i32.eq (local.get 1) (i32.const 0)) + (then + (i64.store8 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load8_u (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 1)) + (then + (i64.store8 align=1 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load8_u align=1 (i64.const 0))) + ) + ) + (br $$64) + ) ;; 8u + (if (i32.eq (local.get 1) (i32.const 0)) + (then + (i64.store16 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load16_s (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 1)) + (then + (i64.store16 align=1 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load16_s align=1 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 2)) + (then + (i64.store16 align=2 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load16_s align=2 (i64.const 0))) + ) + ) + (br $$64) + ) ;; 16s + (if (i32.eq (local.get 1) (i32.const 0)) + (then + (i64.store16 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load16_u (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 1)) + (then + (i64.store16 align=1 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load16_u align=1 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 2)) + (then + (i64.store16 align=2 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load16_u align=2 (i64.const 0))) + ) + ) + (br $$64) + ) ;; 16u + (if (i32.eq (local.get 1) (i32.const 0)) + (then + (i64.store32 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load32_s (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 1)) + (then + (i64.store32 align=1 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load32_s align=1 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 2)) + (then + (i64.store32 align=2 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load32_s align=2 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 4)) + (then + (i64.store32 align=4 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load32_s align=4 (i64.const 0))) + ) + ) + (br $$64) + ) ;; 32s + (if (i32.eq (local.get 1) (i32.const 0)) + (then + (i64.store32 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load32_u (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 1)) + (then + (i64.store32 align=1 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load32_u align=1 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 2)) + (then + (i64.store32 align=2 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load32_u align=2 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 4)) + (then + (i64.store32 align=4 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load32_u align=4 (i64.const 0))) + ) + ) + (br $$64) + ) ;; 32u + (if (i32.eq (local.get 1) (i32.const 0)) + (then + (i64.store (i64.const 0) (local.get 2)) + (local.set 3 (i64.load (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 1)) + (then + (i64.store align=1 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load align=1 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 2)) + (then + (i64.store align=2 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load align=2 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 4)) + (then + (i64.store align=4 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load align=4 (i64.const 0))) + ) + ) + (if (i32.eq (local.get 1) (i32.const 8)) + (then + (i64.store align=8 (i64.const 0) (local.get 2)) + (local.set 3 (i64.load align=8 (i64.const 0))) + ) + ) + ) ;; 64 + (local.get 3) + ) +)`); + +// ./test/core/align64.wast:802 +assert_return(() => invoke($23, `f32_align_switch`, [0]), [value("f32", 10)]); + +// ./test/core/align64.wast:803 +assert_return(() => invoke($23, `f32_align_switch`, [1]), [value("f32", 10)]); + +// ./test/core/align64.wast:804 +assert_return(() => invoke($23, `f32_align_switch`, [2]), [value("f32", 10)]); + +// ./test/core/align64.wast:805 +assert_return(() => invoke($23, `f32_align_switch`, [3]), [value("f32", 10)]); + +// ./test/core/align64.wast:807 +assert_return(() => invoke($23, `f64_align_switch`, [0]), [value("f64", 10)]); + +// ./test/core/align64.wast:808 +assert_return(() => invoke($23, `f64_align_switch`, [1]), [value("f64", 10)]); + +// ./test/core/align64.wast:809 +assert_return(() => invoke($23, `f64_align_switch`, [2]), [value("f64", 10)]); + +// ./test/core/align64.wast:810 +assert_return(() => invoke($23, `f64_align_switch`, [3]), [value("f64", 10)]); + +// ./test/core/align64.wast:811 +assert_return(() => invoke($23, `f64_align_switch`, [4]), [value("f64", 10)]); + +// ./test/core/align64.wast:813 +assert_return(() => invoke($23, `i32_align_switch`, [0, 0]), [value("i32", 10)]); + +// ./test/core/align64.wast:814 +assert_return(() => invoke($23, `i32_align_switch`, [0, 1]), [value("i32", 10)]); + +// ./test/core/align64.wast:815 +assert_return(() => invoke($23, `i32_align_switch`, [1, 0]), [value("i32", 10)]); + +// ./test/core/align64.wast:816 +assert_return(() => invoke($23, `i32_align_switch`, [1, 1]), [value("i32", 10)]); + +// ./test/core/align64.wast:817 +assert_return(() => invoke($23, `i32_align_switch`, [2, 0]), [value("i32", 10)]); + +// ./test/core/align64.wast:818 +assert_return(() => invoke($23, `i32_align_switch`, [2, 1]), [value("i32", 10)]); + +// ./test/core/align64.wast:819 +assert_return(() => invoke($23, `i32_align_switch`, [2, 2]), [value("i32", 10)]); + +// ./test/core/align64.wast:820 +assert_return(() => invoke($23, `i32_align_switch`, [3, 0]), [value("i32", 10)]); + +// ./test/core/align64.wast:821 +assert_return(() => invoke($23, `i32_align_switch`, [3, 1]), [value("i32", 10)]); + +// ./test/core/align64.wast:822 +assert_return(() => invoke($23, `i32_align_switch`, [3, 2]), [value("i32", 10)]); + +// ./test/core/align64.wast:823 +assert_return(() => invoke($23, `i32_align_switch`, [4, 0]), [value("i32", 10)]); + +// ./test/core/align64.wast:824 +assert_return(() => invoke($23, `i32_align_switch`, [4, 1]), [value("i32", 10)]); + +// ./test/core/align64.wast:825 +assert_return(() => invoke($23, `i32_align_switch`, [4, 2]), [value("i32", 10)]); + +// ./test/core/align64.wast:826 +assert_return(() => invoke($23, `i32_align_switch`, [4, 4]), [value("i32", 10)]); + +// ./test/core/align64.wast:828 +assert_return(() => invoke($23, `i64_align_switch`, [0, 0]), [value("i64", 10n)]); + +// ./test/core/align64.wast:829 +assert_return(() => invoke($23, `i64_align_switch`, [0, 1]), [value("i64", 10n)]); + +// ./test/core/align64.wast:830 +assert_return(() => invoke($23, `i64_align_switch`, [1, 0]), [value("i64", 10n)]); + +// ./test/core/align64.wast:831 +assert_return(() => invoke($23, `i64_align_switch`, [1, 1]), [value("i64", 10n)]); + +// ./test/core/align64.wast:832 +assert_return(() => invoke($23, `i64_align_switch`, [2, 0]), [value("i64", 10n)]); + +// ./test/core/align64.wast:833 +assert_return(() => invoke($23, `i64_align_switch`, [2, 1]), [value("i64", 10n)]); + +// ./test/core/align64.wast:834 +assert_return(() => invoke($23, `i64_align_switch`, [2, 2]), [value("i64", 10n)]); + +// ./test/core/align64.wast:835 +assert_return(() => invoke($23, `i64_align_switch`, [3, 0]), [value("i64", 10n)]); + +// ./test/core/align64.wast:836 +assert_return(() => invoke($23, `i64_align_switch`, [3, 1]), [value("i64", 10n)]); + +// ./test/core/align64.wast:837 +assert_return(() => invoke($23, `i64_align_switch`, [3, 2]), [value("i64", 10n)]); + +// ./test/core/align64.wast:838 +assert_return(() => invoke($23, `i64_align_switch`, [4, 0]), [value("i64", 10n)]); + +// ./test/core/align64.wast:839 +assert_return(() => invoke($23, `i64_align_switch`, [4, 1]), [value("i64", 10n)]); + +// ./test/core/align64.wast:840 +assert_return(() => invoke($23, `i64_align_switch`, [4, 2]), [value("i64", 10n)]); + +// ./test/core/align64.wast:841 +assert_return(() => invoke($23, `i64_align_switch`, [4, 4]), [value("i64", 10n)]); + +// ./test/core/align64.wast:842 +assert_return(() => invoke($23, `i64_align_switch`, [5, 0]), [value("i64", 10n)]); + +// ./test/core/align64.wast:843 +assert_return(() => invoke($23, `i64_align_switch`, [5, 1]), [value("i64", 10n)]); + +// ./test/core/align64.wast:844 +assert_return(() => invoke($23, `i64_align_switch`, [5, 2]), [value("i64", 10n)]); + +// ./test/core/align64.wast:845 +assert_return(() => invoke($23, `i64_align_switch`, [5, 4]), [value("i64", 10n)]); + +// ./test/core/align64.wast:846 +assert_return(() => invoke($23, `i64_align_switch`, [6, 0]), [value("i64", 10n)]); + +// ./test/core/align64.wast:847 +assert_return(() => invoke($23, `i64_align_switch`, [6, 1]), [value("i64", 10n)]); + +// ./test/core/align64.wast:848 +assert_return(() => invoke($23, `i64_align_switch`, [6, 2]), [value("i64", 10n)]); + +// ./test/core/align64.wast:849 +assert_return(() => invoke($23, `i64_align_switch`, [6, 4]), [value("i64", 10n)]); + +// ./test/core/align64.wast:850 +assert_return(() => invoke($23, `i64_align_switch`, [6, 8]), [value("i64", 10n)]); + +// ./test/core/align64.wast:854 +let $24 = instantiate(`(module + (memory i64 1) + (func (export "store") (param i64 i64) + (i64.store align=4 (local.get 0) (local.get 1)) + ) + (func (export "load") (param i64) (result i32) + (i32.load (local.get 0)) + ) +)`); + +// Bug 1737225 - do not observe the partial store caused by bug 1666747 on +// some native platforms. +if (!partialOobWriteMayWritePartialData()) { + // ./test/core/align64.wast:864 + assert_trap( + () => invoke($24, `store`, [65532n, -1n]), + `out of bounds memory access`, + ); + + // ./test/core/align64.wast:866 + assert_return(() => invoke($24, `load`, [65532n]), [value("i32", 0)]); +} diff --git a/js/src/jit-test/tests/wasm/spec/memory64/directives.txt b/js/src/jit-test/tests/wasm/spec/memory64/directives.txt new file mode 100644 index 0000000000..bbc47fb788 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory64/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; skip-if: !wasmMemory64Enabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/memory64/endianness64.wast.js b/js/src/jit-test/tests/wasm/spec/memory64/endianness64.wast.js new file mode 100644 index 0000000000..651714be6f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory64/endianness64.wast.js @@ -0,0 +1,385 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/endianness64.wast + +// ./test/core/endianness64.wast:1 +let $0 = instantiate(`(module + (memory i64 1) + + ;; Stores an i16 value in little-endian-format + (func $$i16_store_little (param $$address i64) (param $$value i32) + (i32.store8 (local.get $$address) (local.get $$value)) + (i32.store8 (i64.add (local.get $$address) (i64.const 1)) (i32.shr_u (local.get $$value) (i32.const 8))) + ) + + ;; Stores an i32 value in little-endian format + (func $$i32_store_little (param $$address i64) (param $$value i32) + (call $$i16_store_little (local.get $$address) (local.get $$value)) + (call $$i16_store_little (i64.add (local.get $$address) (i64.const 2)) (i32.shr_u (local.get $$value) (i32.const 16))) + ) + + ;; Stores an i64 value in little-endian format + (func $$i64_store_little (param $$address i64) (param $$value i64) + (call $$i32_store_little (local.get $$address) (i32.wrap_i64 (local.get $$value))) + (call $$i32_store_little (i64.add (local.get $$address) (i64.const 4)) (i32.wrap_i64 (i64.shr_u (local.get $$value) (i64.const 32)))) + ) + + ;; Loads an i16 value in little-endian format + (func $$i16_load_little (param $$address i64) (result i32) + (i32.or + (i32.load8_u (local.get $$address)) + (i32.shl (i32.load8_u (i64.add (local.get $$address) (i64.const 1))) (i32.const 8)) + ) + ) + + ;; Loads an i32 value in little-endian format + (func $$i32_load_little (param $$address i64) (result i32) + (i32.or + (call $$i16_load_little (local.get $$address)) + (i32.shl (call $$i16_load_little (i64.add (local.get $$address) (i64.const 2))) (i32.const 16)) + ) + ) + + ;; Loads an i64 value in little-endian format + (func $$i64_load_little (param $$address i64) (result i64) + (i64.or + (i64.extend_i32_u (call $$i32_load_little (local.get $$address))) + (i64.shl (i64.extend_i32_u (call $$i32_load_little (i64.add (local.get $$address) (i64.const 4)))) (i64.const 32)) + ) + ) + + (func (export "i32_load16_s") (param $$value i32) (result i32) + (call $$i16_store_little (i64.const 0) (local.get $$value)) + (i32.load16_s (i64.const 0)) + ) + + (func (export "i32_load16_u") (param $$value i32) (result i32) + (call $$i16_store_little (i64.const 0) (local.get $$value)) + (i32.load16_u (i64.const 0)) + ) + + (func (export "i32_load") (param $$value i32) (result i32) + (call $$i32_store_little (i64.const 0) (local.get $$value)) + (i32.load (i64.const 0)) + ) + + (func (export "i64_load16_s") (param $$value i64) (result i64) + (call $$i16_store_little (i64.const 0) (i32.wrap_i64 (local.get $$value))) + (i64.load16_s (i64.const 0)) + ) + + (func (export "i64_load16_u") (param $$value i64) (result i64) + (call $$i16_store_little (i64.const 0) (i32.wrap_i64 (local.get $$value))) + (i64.load16_u (i64.const 0)) + ) + + (func (export "i64_load32_s") (param $$value i64) (result i64) + (call $$i32_store_little (i64.const 0) (i32.wrap_i64 (local.get $$value))) + (i64.load32_s (i64.const 0)) + ) + + (func (export "i64_load32_u") (param $$value i64) (result i64) + (call $$i32_store_little (i64.const 0) (i32.wrap_i64 (local.get $$value))) + (i64.load32_u (i64.const 0)) + ) + + (func (export "i64_load") (param $$value i64) (result i64) + (call $$i64_store_little (i64.const 0) (local.get $$value)) + (i64.load (i64.const 0)) + ) + + (func (export "f32_load") (param $$value f32) (result f32) + (call $$i32_store_little (i64.const 0) (i32.reinterpret_f32 (local.get $$value))) + (f32.load (i64.const 0)) + ) + + (func (export "f64_load") (param $$value f64) (result f64) + (call $$i64_store_little (i64.const 0) (i64.reinterpret_f64 (local.get $$value))) + (f64.load (i64.const 0)) + ) + + + (func (export "i32_store16") (param $$value i32) (result i32) + (i32.store16 (i64.const 0) (local.get $$value)) + (call $$i16_load_little (i64.const 0)) + ) + + (func (export "i32_store") (param $$value i32) (result i32) + (i32.store (i64.const 0) (local.get $$value)) + (call $$i32_load_little (i64.const 0)) + ) + + (func (export "i64_store16") (param $$value i64) (result i64) + (i64.store16 (i64.const 0) (local.get $$value)) + (i64.extend_i32_u (call $$i16_load_little (i64.const 0))) + ) + + (func (export "i64_store32") (param $$value i64) (result i64) + (i64.store32 (i64.const 0) (local.get $$value)) + (i64.extend_i32_u (call $$i32_load_little (i64.const 0))) + ) + + (func (export "i64_store") (param $$value i64) (result i64) + (i64.store (i64.const 0) (local.get $$value)) + (call $$i64_load_little (i64.const 0)) + ) + + (func (export "f32_store") (param $$value f32) (result f32) + (f32.store (i64.const 0) (local.get $$value)) + (f32.reinterpret_i32 (call $$i32_load_little (i64.const 0))) + ) + + (func (export "f64_store") (param $$value f64) (result f64) + (f64.store (i64.const 0) (local.get $$value)) + (f64.reinterpret_i64 (call $$i64_load_little (i64.const 0))) + ) +)`); + +// ./test/core/endianness64.wast:133 +assert_return(() => invoke($0, `i32_load16_s`, [-1]), [value("i32", -1)]); + +// ./test/core/endianness64.wast:134 +assert_return(() => invoke($0, `i32_load16_s`, [-4242]), [value("i32", -4242)]); + +// ./test/core/endianness64.wast:135 +assert_return(() => invoke($0, `i32_load16_s`, [42]), [value("i32", 42)]); + +// ./test/core/endianness64.wast:136 +assert_return(() => invoke($0, `i32_load16_s`, [12816]), [value("i32", 12816)]); + +// ./test/core/endianness64.wast:138 +assert_return(() => invoke($0, `i32_load16_u`, [-1]), [value("i32", 65535)]); + +// ./test/core/endianness64.wast:139 +assert_return(() => invoke($0, `i32_load16_u`, [-4242]), [value("i32", 61294)]); + +// ./test/core/endianness64.wast:140 +assert_return(() => invoke($0, `i32_load16_u`, [42]), [value("i32", 42)]); + +// ./test/core/endianness64.wast:141 +assert_return(() => invoke($0, `i32_load16_u`, [51966]), [value("i32", 51966)]); + +// ./test/core/endianness64.wast:143 +assert_return(() => invoke($0, `i32_load`, [-1]), [value("i32", -1)]); + +// ./test/core/endianness64.wast:144 +assert_return(() => invoke($0, `i32_load`, [-42424242]), [value("i32", -42424242)]); + +// ./test/core/endianness64.wast:145 +assert_return(() => invoke($0, `i32_load`, [42424242]), [value("i32", 42424242)]); + +// ./test/core/endianness64.wast:146 +assert_return(() => invoke($0, `i32_load`, [-1414717974]), [value("i32", -1414717974)]); + +// ./test/core/endianness64.wast:148 +assert_return(() => invoke($0, `i64_load16_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/endianness64.wast:149 +assert_return(() => invoke($0, `i64_load16_s`, [-4242n]), [value("i64", -4242n)]); + +// ./test/core/endianness64.wast:150 +assert_return(() => invoke($0, `i64_load16_s`, [42n]), [value("i64", 42n)]); + +// ./test/core/endianness64.wast:151 +assert_return(() => invoke($0, `i64_load16_s`, [12816n]), [value("i64", 12816n)]); + +// ./test/core/endianness64.wast:153 +assert_return(() => invoke($0, `i64_load16_u`, [-1n]), [value("i64", 65535n)]); + +// ./test/core/endianness64.wast:154 +assert_return(() => invoke($0, `i64_load16_u`, [-4242n]), [value("i64", 61294n)]); + +// ./test/core/endianness64.wast:155 +assert_return(() => invoke($0, `i64_load16_u`, [42n]), [value("i64", 42n)]); + +// ./test/core/endianness64.wast:156 +assert_return(() => invoke($0, `i64_load16_u`, [51966n]), [value("i64", 51966n)]); + +// ./test/core/endianness64.wast:158 +assert_return(() => invoke($0, `i64_load32_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/endianness64.wast:159 +assert_return(() => invoke($0, `i64_load32_s`, [-42424242n]), [value("i64", -42424242n)]); + +// ./test/core/endianness64.wast:160 +assert_return(() => invoke($0, `i64_load32_s`, [42424242n]), [value("i64", 42424242n)]); + +// ./test/core/endianness64.wast:161 +assert_return(() => invoke($0, `i64_load32_s`, [305419896n]), [value("i64", 305419896n)]); + +// ./test/core/endianness64.wast:163 +assert_return(() => invoke($0, `i64_load32_u`, [-1n]), [value("i64", 4294967295n)]); + +// ./test/core/endianness64.wast:164 +assert_return(() => invoke($0, `i64_load32_u`, [-42424242n]), [value("i64", 4252543054n)]); + +// ./test/core/endianness64.wast:165 +assert_return(() => invoke($0, `i64_load32_u`, [42424242n]), [value("i64", 42424242n)]); + +// ./test/core/endianness64.wast:166 +assert_return(() => invoke($0, `i64_load32_u`, [2880249322n]), [value("i64", 2880249322n)]); + +// ./test/core/endianness64.wast:168 +assert_return(() => invoke($0, `i64_load`, [-1n]), [value("i64", -1n)]); + +// ./test/core/endianness64.wast:169 +assert_return(() => invoke($0, `i64_load`, [-42424242n]), [value("i64", -42424242n)]); + +// ./test/core/endianness64.wast:170 +assert_return(() => invoke($0, `i64_load`, [2880249322n]), [value("i64", 2880249322n)]); + +// ./test/core/endianness64.wast:171 +assert_return( + () => invoke($0, `i64_load`, [-6075977126246539798n]), + [value("i64", -6075977126246539798n)], +); + +// ./test/core/endianness64.wast:173 +assert_return(() => invoke($0, `f32_load`, [value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/endianness64.wast:174 +assert_return(() => invoke($0, `f32_load`, [value("f32", 0.01234)]), [value("f32", 0.01234)]); + +// ./test/core/endianness64.wast:175 +assert_return(() => invoke($0, `f32_load`, [value("f32", 4242.4243)]), [value("f32", 4242.4243)]); + +// ./test/core/endianness64.wast:176 +assert_return( + () => invoke($0, `f32_load`, [value("f32", 340282350000000000000000000000000000000)]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/endianness64.wast:178 +assert_return(() => invoke($0, `f64_load`, [value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/endianness64.wast:179 +assert_return(() => invoke($0, `f64_load`, [value("f64", 1234.56789)]), [value("f64", 1234.56789)]); + +// ./test/core/endianness64.wast:180 +assert_return( + () => invoke($0, `f64_load`, [value("f64", 424242.424242)]), + [value("f64", 424242.424242)], +); + +// ./test/core/endianness64.wast:181 +assert_return( + () => invoke($0, `f64_load`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/endianness64.wast:184 +assert_return(() => invoke($0, `i32_store16`, [-1]), [value("i32", 65535)]); + +// ./test/core/endianness64.wast:185 +assert_return(() => invoke($0, `i32_store16`, [-4242]), [value("i32", 61294)]); + +// ./test/core/endianness64.wast:186 +assert_return(() => invoke($0, `i32_store16`, [42]), [value("i32", 42)]); + +// ./test/core/endianness64.wast:187 +assert_return(() => invoke($0, `i32_store16`, [51966]), [value("i32", 51966)]); + +// ./test/core/endianness64.wast:189 +assert_return(() => invoke($0, `i32_store`, [-1]), [value("i32", -1)]); + +// ./test/core/endianness64.wast:190 +assert_return(() => invoke($0, `i32_store`, [-4242]), [value("i32", -4242)]); + +// ./test/core/endianness64.wast:191 +assert_return(() => invoke($0, `i32_store`, [42424242]), [value("i32", 42424242)]); + +// ./test/core/endianness64.wast:192 +assert_return(() => invoke($0, `i32_store`, [-559035650]), [value("i32", -559035650)]); + +// ./test/core/endianness64.wast:194 +assert_return(() => invoke($0, `i64_store16`, [-1n]), [value("i64", 65535n)]); + +// ./test/core/endianness64.wast:195 +assert_return(() => invoke($0, `i64_store16`, [-4242n]), [value("i64", 61294n)]); + +// ./test/core/endianness64.wast:196 +assert_return(() => invoke($0, `i64_store16`, [42n]), [value("i64", 42n)]); + +// ./test/core/endianness64.wast:197 +assert_return(() => invoke($0, `i64_store16`, [51966n]), [value("i64", 51966n)]); + +// ./test/core/endianness64.wast:199 +assert_return(() => invoke($0, `i64_store32`, [-1n]), [value("i64", 4294967295n)]); + +// ./test/core/endianness64.wast:200 +assert_return(() => invoke($0, `i64_store32`, [-4242n]), [value("i64", 4294963054n)]); + +// ./test/core/endianness64.wast:201 +assert_return(() => invoke($0, `i64_store32`, [42424242n]), [value("i64", 42424242n)]); + +// ./test/core/endianness64.wast:202 +assert_return(() => invoke($0, `i64_store32`, [3735931646n]), [value("i64", 3735931646n)]); + +// ./test/core/endianness64.wast:204 +assert_return(() => invoke($0, `i64_store`, [-1n]), [value("i64", -1n)]); + +// ./test/core/endianness64.wast:205 +assert_return(() => invoke($0, `i64_store`, [-42424242n]), [value("i64", -42424242n)]); + +// ./test/core/endianness64.wast:206 +assert_return(() => invoke($0, `i64_store`, [2880249322n]), [value("i64", 2880249322n)]); + +// ./test/core/endianness64.wast:207 +assert_return( + () => invoke($0, `i64_store`, [-6075977126246539798n]), + [value("i64", -6075977126246539798n)], +); + +// ./test/core/endianness64.wast:209 +assert_return(() => invoke($0, `f32_store`, [value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/endianness64.wast:210 +assert_return(() => invoke($0, `f32_store`, [value("f32", 0.01234)]), [value("f32", 0.01234)]); + +// ./test/core/endianness64.wast:211 +assert_return(() => invoke($0, `f32_store`, [value("f32", 4242.4243)]), [value("f32", 4242.4243)]); + +// ./test/core/endianness64.wast:212 +assert_return( + () => invoke($0, `f32_store`, [value("f32", 340282350000000000000000000000000000000)]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/endianness64.wast:214 +assert_return(() => invoke($0, `f64_store`, [value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/endianness64.wast:215 +assert_return(() => invoke($0, `f64_store`, [value("f64", 1234.56789)]), [value("f64", 1234.56789)]); + +// ./test/core/endianness64.wast:216 +assert_return( + () => invoke($0, `f64_store`, [value("f64", 424242.424242)]), + [value("f64", 424242.424242)], +); + +// ./test/core/endianness64.wast:217 +assert_return( + () => invoke($0, `f64_store`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); diff --git a/js/src/jit-test/tests/wasm/spec/memory64/float_memory64.wast.js b/js/src/jit-test/tests/wasm/spec/memory64/float_memory64.wast.js new file mode 100644 index 0000000000..70f5605577 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory64/float_memory64.wast.js @@ -0,0 +1,361 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/float_memory64.wast + +// ./test/core/float_memory64.wast:5 +let $0 = instantiate(`(module + (memory i64 (data "\\00\\00\\a0\\7f")) + + (func (export "f32.load") (result f32) (f32.load (i64.const 0))) + (func (export "i32.load") (result i32) (i32.load (i64.const 0))) + (func (export "f32.store") (f32.store (i64.const 0) (f32.const nan:0x200000))) + (func (export "i32.store") (i32.store (i64.const 0) (i32.const 0x7fa00000))) + (func (export "reset") (i32.store (i64.const 0) (i32.const 0))) +)`); + +// ./test/core/float_memory64.wast:15 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory64.wast:16 +assert_return(() => invoke($0, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory64.wast:17 +invoke($0, `reset`, []); + +// ./test/core/float_memory64.wast:18 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory64.wast:19 +assert_return(() => invoke($0, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory64.wast:20 +invoke($0, `f32.store`, []); + +// ./test/core/float_memory64.wast:21 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory64.wast:22 +assert_return(() => invoke($0, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory64.wast:23 +invoke($0, `reset`, []); + +// ./test/core/float_memory64.wast:24 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory64.wast:25 +assert_return(() => invoke($0, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory64.wast:26 +invoke($0, `i32.store`, []); + +// ./test/core/float_memory64.wast:27 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory64.wast:28 +assert_return(() => invoke($0, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory64.wast:30 +let $1 = instantiate(`(module + (memory i64 (data "\\00\\00\\00\\00\\00\\00\\f4\\7f")) + + (func (export "f64.load") (result f64) (f64.load (i64.const 0))) + (func (export "i64.load") (result i64) (i64.load (i64.const 0))) + (func (export "f64.store") (f64.store (i64.const 0) (f64.const nan:0x4000000000000))) + (func (export "i64.store") (i64.store (i64.const 0) (i64.const 0x7ff4000000000000))) + (func (export "reset") (i64.store (i64.const 0) (i64.const 0))) +)`); + +// ./test/core/float_memory64.wast:40 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory64.wast:41 +assert_return( + () => invoke($1, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory64.wast:42 +invoke($1, `reset`, []); + +// ./test/core/float_memory64.wast:43 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory64.wast:44 +assert_return(() => invoke($1, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory64.wast:45 +invoke($1, `f64.store`, []); + +// ./test/core/float_memory64.wast:46 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory64.wast:47 +assert_return( + () => invoke($1, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory64.wast:48 +invoke($1, `reset`, []); + +// ./test/core/float_memory64.wast:49 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory64.wast:50 +assert_return(() => invoke($1, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory64.wast:51 +invoke($1, `i64.store`, []); + +// ./test/core/float_memory64.wast:52 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory64.wast:53 +assert_return( + () => invoke($1, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory64.wast:57 +let $2 = instantiate(`(module + (memory i64 (data "\\00\\00\\00\\a0\\7f")) + + (func (export "f32.load") (result f32) (f32.load (i64.const 1))) + (func (export "i32.load") (result i32) (i32.load (i64.const 1))) + (func (export "f32.store") (f32.store (i64.const 1) (f32.const nan:0x200000))) + (func (export "i32.store") (i32.store (i64.const 1) (i32.const 0x7fa00000))) + (func (export "reset") (i32.store (i64.const 1) (i32.const 0))) +)`); + +// ./test/core/float_memory64.wast:67 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory64.wast:68 +assert_return(() => invoke($2, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory64.wast:69 +invoke($2, `reset`, []); + +// ./test/core/float_memory64.wast:70 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory64.wast:71 +assert_return(() => invoke($2, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory64.wast:72 +invoke($2, `f32.store`, []); + +// ./test/core/float_memory64.wast:73 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory64.wast:74 +assert_return(() => invoke($2, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory64.wast:75 +invoke($2, `reset`, []); + +// ./test/core/float_memory64.wast:76 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory64.wast:77 +assert_return(() => invoke($2, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory64.wast:78 +invoke($2, `i32.store`, []); + +// ./test/core/float_memory64.wast:79 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory64.wast:80 +assert_return(() => invoke($2, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory64.wast:82 +let $3 = instantiate(`(module + (memory i64 (data "\\00\\00\\00\\00\\00\\00\\00\\f4\\7f")) + + (func (export "f64.load") (result f64) (f64.load (i64.const 1))) + (func (export "i64.load") (result i64) (i64.load (i64.const 1))) + (func (export "f64.store") (f64.store (i64.const 1) (f64.const nan:0x4000000000000))) + (func (export "i64.store") (i64.store (i64.const 1) (i64.const 0x7ff4000000000000))) + (func (export "reset") (i64.store (i64.const 1) (i64.const 0))) +)`); + +// ./test/core/float_memory64.wast:92 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory64.wast:93 +assert_return( + () => invoke($3, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory64.wast:94 +invoke($3, `reset`, []); + +// ./test/core/float_memory64.wast:95 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory64.wast:96 +assert_return(() => invoke($3, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory64.wast:97 +invoke($3, `f64.store`, []); + +// ./test/core/float_memory64.wast:98 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory64.wast:99 +assert_return( + () => invoke($3, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory64.wast:100 +invoke($3, `reset`, []); + +// ./test/core/float_memory64.wast:101 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory64.wast:102 +assert_return(() => invoke($3, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory64.wast:103 +invoke($3, `i64.store`, []); + +// ./test/core/float_memory64.wast:104 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory64.wast:105 +assert_return( + () => invoke($3, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory64.wast:109 +let $4 = instantiate(`(module + (memory i64 (data "\\01\\00\\d0\\7f")) + + (func (export "f32.load") (result f32) (f32.load (i64.const 0))) + (func (export "i32.load") (result i32) (i32.load (i64.const 0))) + (func (export "f32.store") (f32.store (i64.const 0) (f32.const nan:0x500001))) + (func (export "i32.store") (i32.store (i64.const 0) (i32.const 0x7fd00001))) + (func (export "reset") (i32.store (i64.const 0) (i32.const 0))) +)`); + +// ./test/core/float_memory64.wast:119 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 2144337921)]); + +// ./test/core/float_memory64.wast:120 +assert_return(() => invoke($4, `f32.load`, []), [bytes("f32", [0x1, 0x0, 0xd0, 0x7f])]); + +// ./test/core/float_memory64.wast:121 +invoke($4, `reset`, []); + +// ./test/core/float_memory64.wast:122 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory64.wast:123 +assert_return(() => invoke($4, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory64.wast:124 +invoke($4, `f32.store`, []); + +// ./test/core/float_memory64.wast:125 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 2144337921)]); + +// ./test/core/float_memory64.wast:126 +assert_return(() => invoke($4, `f32.load`, []), [bytes("f32", [0x1, 0x0, 0xd0, 0x7f])]); + +// ./test/core/float_memory64.wast:127 +invoke($4, `reset`, []); + +// ./test/core/float_memory64.wast:128 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory64.wast:129 +assert_return(() => invoke($4, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory64.wast:130 +invoke($4, `i32.store`, []); + +// ./test/core/float_memory64.wast:131 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 2144337921)]); + +// ./test/core/float_memory64.wast:132 +assert_return(() => invoke($4, `f32.load`, []), [bytes("f32", [0x1, 0x0, 0xd0, 0x7f])]); + +// ./test/core/float_memory64.wast:134 +let $5 = instantiate(`(module + (memory i64 (data "\\01\\00\\00\\00\\00\\00\\fc\\7f")) + + (func (export "f64.load") (result f64) (f64.load (i64.const 0))) + (func (export "i64.load") (result i64) (i64.load (i64.const 0))) + (func (export "f64.store") (f64.store (i64.const 0) (f64.const nan:0xc000000000001))) + (func (export "i64.store") (i64.store (i64.const 0) (i64.const 0x7ffc000000000001))) + (func (export "reset") (i64.store (i64.const 0) (i64.const 0))) +)`); + +// ./test/core/float_memory64.wast:144 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 9222246136947933185n)]); + +// ./test/core/float_memory64.wast:145 +assert_return( + () => invoke($5, `f64.load`, []), + [bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f])], +); + +// ./test/core/float_memory64.wast:146 +invoke($5, `reset`, []); + +// ./test/core/float_memory64.wast:147 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory64.wast:148 +assert_return(() => invoke($5, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory64.wast:149 +invoke($5, `f64.store`, []); + +// ./test/core/float_memory64.wast:150 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 9222246136947933185n)]); + +// ./test/core/float_memory64.wast:151 +assert_return( + () => invoke($5, `f64.load`, []), + [bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f])], +); + +// ./test/core/float_memory64.wast:152 +invoke($5, `reset`, []); + +// ./test/core/float_memory64.wast:153 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory64.wast:154 +assert_return(() => invoke($5, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory64.wast:155 +invoke($5, `i64.store`, []); + +// ./test/core/float_memory64.wast:156 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 9222246136947933185n)]); + +// ./test/core/float_memory64.wast:157 +assert_return( + () => invoke($5, `f64.load`, []), + [bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f])], +); diff --git a/js/src/jit-test/tests/wasm/spec/memory64/harness/directives.txt b/js/src/jit-test/tests/wasm/spec/memory64/harness/directives.txt new file mode 100644 index 0000000000..d41243abbb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory64/harness/directives.txt @@ -0,0 +1 @@ +|jit-test| skip-if: true \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/memory64/harness/harness.js b/js/src/jit-test/tests/wasm/spec/memory64/harness/harness.js new file mode 100644 index 0000000000..9bc1c17c0a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory64/harness/harness.js @@ -0,0 +1,457 @@ +"use strict"; + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +if (!wasmIsSupported()) { + quit(); +} + +function partialOobWriteMayWritePartialData() { + let arm_native = getBuildConfiguration("arm") && !getBuildConfiguration("arm-simulator"); + let arm64_native = getBuildConfiguration("arm64") && !getBuildConfiguration("arm64-simulator"); + return arm_native || arm64_native; +} + +let native_arm = getBuildConfiguration("arm") && !getBuildConfiguration("arm-simulator"); +let native_arm64 = getBuildConfiguration("arm64") && !getBuildConfiguration("arm64-simulator"); + +function bytes(type, bytes) { + var typedBuffer = new Uint8Array(bytes); + return wasmGlobalFromArrayBuffer(type, typedBuffer.buffer); +} +function value(type, value) { + return new WebAssembly.Global({ + value: type, + mutable: false, + }, value); +} + +function i8x16(elements) { + let typedBuffer = new Uint8Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i16x8(elements) { + let typedBuffer = new Uint16Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i32x4(elements) { + let typedBuffer = new Uint32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i64x2(elements) { + let typedBuffer = new BigUint64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f32x4(elements) { + let typedBuffer = new Float32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f64x2(elements) { + let typedBuffer = new Float64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} + +function either(...arr) { + return new EitherVariants(arr); +} + +class F32x4Pattern { + constructor(x, y, z, w) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } +} + +class F64x2Pattern { + constructor(x, y) { + this.x = x; + this.y = y; + } +} + +class RefWithType { + constructor(type) { + this.type = type; + } + + formatExpected() { + return `RefWithType(${this.type})`; + } + + test(refGlobal) { + try { + new WebAssembly.Global({value: this.type}, refGlobal.value); + return true; + } catch (err) { + assertEq(err instanceof TypeError, true, `wrong type of error when creating global: ${err}`); + assertEq(!!err.message.match(/can only pass/), true, `wrong type of error when creating global: ${err}`); + return false; + } + } +} + +// ref.extern values created by spec tests will be JS objects of the form +// { [externsym]: }. Other externref values are possible to observe +// if extern.convert_any is used. +let externsym = Symbol("externref"); +function externref(s) { + return { [externsym]: s }; +} +function is_externref(x) { + return (x !== null && externsym in x) ? 1 : 0; +} +function is_funcref(x) { + return typeof x === "function" ? 1 : 0; +} +function eq_externref(x, y) { + return x === y ? 1 : 0; +} +function eq_funcref(x, y) { + return x === y ? 1 : 0; +} + +class ExternRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.extern ${this.n}`; + } + + test(global) { + // the global's value can either be an externref or just a plain old JS number + let result = global.value; + if (typeof global.value === "object" && externsym in global.value) { + result = global.value[externsym]; + } + return result === this.n; + } +} + +// ref.host values created by spectests will be whatever the JS API does to +// convert the given value to anyref. It should implicitly be like any.convert_extern. +function hostref(v) { + if (!wasmGcEnabled()) { + throw new Error("ref.host only works when wasm GC is enabled"); + } + + const { internalizeNum } = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(`(module + (func (import "test" "coerce") (param i32) (result anyref)) + (func (export "internalizeNum") (param i32) (result anyref) + (call 0 (local.get 0)) + ) + )`)), + { "test": { "coerce": x => x } }, + ).exports; + return internalizeNum(v); +} + +class HostRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.host ${this.n}`; + } + + test(externrefGlobal) { + assertEq(externsym in externrefGlobal.value, true, `HostRefResult only works with externref inputs`); + return externrefGlobal.value[externsym] === this.n; + } +} + +let spectest = { + externref: externref, + is_externref: is_externref, + is_funcref: is_funcref, + eq_externref: eq_externref, + eq_funcref: eq_funcref, + print: console.log.bind(console), + print_i32: console.log.bind(console), + print_i32_f32: console.log.bind(console), + print_f64_f64: console.log.bind(console), + print_f32: console.log.bind(console), + print_f64: console.log.bind(console), + global_i32: 666, + global_i64: 666n, + global_f32: 666, + global_f64: 666, + table: new WebAssembly.Table({ + initial: 10, + maximum: 20, + element: "anyfunc", + }), + memory: new WebAssembly.Memory({ initial: 1, maximum: 2 }), +}; + +let linkage = { + spectest, +}; + +function getInstance(instanceish) { + if (typeof instanceish === "string") { + assertEq( + instanceish in linkage, + true, + `'${instanceish}'' must be registered`, + ); + return linkage[instanceish]; + } + return instanceish; +} + +function instantiate(source) { + let bytecode = wasmTextToBinary(source); + let module = new WebAssembly.Module(bytecode); + let instance = new WebAssembly.Instance(module, linkage); + return instance.exports; +} + +function register(instanceish, name) { + linkage[name] = getInstance(instanceish); +} + +function invoke(instanceish, field, params) { + let func = getInstance(instanceish)[field]; + assertEq(func instanceof Function, true, "expected a function"); + return wasmLosslessInvoke(func, ...params); +} + +function get(instanceish, field) { + let global = getInstance(instanceish)[field]; + assertEq( + global instanceof WebAssembly.Global, + true, + "expected a WebAssembly.Global", + ); + return global; +} + +function assert_trap(thunk, message) { + try { + thunk(); + throw new Error("expected trap"); + } catch (err) { + if (err instanceof WebAssembly.RuntimeError) { + return; + } + throw err; + } +} + +let StackOverflow; +try { + (function f() { + 1 + f(); + })(); +} catch (e) { + StackOverflow = e.constructor; +} +function assert_exhaustion(thunk, message) { + try { + thunk(); + assertEq("normal return", "exhaustion"); + } catch (err) { + assertEq( + err instanceof StackOverflow, + true, + "expected exhaustion", + ); + } +} + +function assert_invalid(thunk, message) { + try { + thunk(); + assertEq("valid module", "invalid module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an invalid module", + ); + } +} + +function assert_unlinkable(thunk, message) { + try { + thunk(); + assertEq(true, false, "expected an unlinkable module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an unlinkable module", + ); + } +} + +function assert_malformed(thunk, message) { + try { + thunk(); + assertEq("valid module", "malformed module"); + } catch (err) { + assertEq( + err instanceof TypeError || + err instanceof SyntaxError || + err instanceof WebAssembly.CompileError || + err instanceof WebAssembly.LinkError, + true, + `expected a malformed module`, + ); + } +} + +function assert_exception(thunk) { + let thrown = false; + try { + thunk(); + } catch (err) { + thrown = true; + } + assertEq(thrown, true, "expected an exception to be thrown"); +} + +function assert_return(thunk, expected) { + let results = thunk(); + + if (results === undefined) { + results = []; + } else if (!Array.isArray(results)) { + results = [results]; + } + if (!Array.isArray(expected)) { + expected = [expected]; + } + + if (!compareResults(results, expected)) { + let got = results.map((x) => formatResult(x)).join(", "); + let wanted = expected.map((x) => formatExpected(x)).join(", "); + assertEq( + `[${got}]`, + `[${wanted}]`, + ); + assertEq(true, false, `${got} !== ${wanted}`); + } +} + +function formatResult(result) { + if (typeof (result) === "object") { + return wasmGlobalToString(result); + } else { + return `${result}`; + } +} + +function formatExpected(expected) { + if ( + expected === `f32_canonical_nan` || + expected === `f32_arithmetic_nan` || + expected === `f64_canonical_nan` || + expected === `f64_arithmetic_nan` + ) { + return expected; + } else if (expected instanceof F32x4Pattern) { + return `f32x4(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + }, ${formatExpected(expected.z)}, ${formatExpected(expected.w)})`; + } else if (expected instanceof F64x2Pattern) { + return `f64x2(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + })`; + } else if (expected instanceof EitherVariants) { + return expected.formatExpected(); + } else if (expected instanceof RefWithType) { + return expected.formatExpected(); + } else if (expected instanceof ExternRefResult) { + return expected.formatExpected(); + } else if (expected instanceof HostRefResult) { + return expected.formatExpected(); + } else if (typeof (expected) === "object") { + return wasmGlobalToString(expected); + } else { + throw new Error("unknown expected result"); + } +} + +class EitherVariants { + constructor(arr) { + this.arr = arr; + } + matches(v) { + return this.arr.some((e) => compareResult(v, e)); + } + formatExpected() { + return `either(${this.arr.map(formatExpected).join(", ")})`; + } +} + +function compareResults(results, expected) { + if (results.length !== expected.length) { + return false; + } + for (let i in results) { + if (expected[i] instanceof EitherVariants) { + return expected[i].matches(results[i]); + } + if (!compareResult(results[i], expected[i])) { + return false; + } + } + return true; +} + +function compareResult(result, expected) { + if ( + expected === `canonical_nan` || + expected === `arithmetic_nan` + ) { + return wasmGlobalIsNaN(result, expected); + } else if (expected === null) { + return result.value === null; + } else if (expected instanceof F32x4Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f32x4", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 1), expected.y) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 2), expected.z) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 3), expected.w); + } else if (expected instanceof F64x2Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f64x2", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f64x2", 1), expected.y); + } else if (expected instanceof RefWithType) { + return expected.test(result); + } else if (expected instanceof ExternRefResult) { + return expected.test(result); + } else if (expected instanceof HostRefResult) { + return expected.test(result); + } else if (typeof (expected) === "object") { + return wasmGlobalsEqual(result, expected); + } else { + throw new Error("unknown expected result"); + } +} diff --git a/js/src/jit-test/tests/wasm/spec/memory64/load64.wast.js b/js/src/jit-test/tests/wasm/spec/memory64/load64.wast.js new file mode 100644 index 0000000000..c353960337 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory64/load64.wast.js @@ -0,0 +1,749 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/load64.wast + +// ./test/core/load64.wast:3 +let $0 = instantiate(`(module + (memory i64 1) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (i32.load (i64.const 0)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (i32.load (i64.const 0)))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (i32.load (i64.const 0)) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 6) (i32.load (i64.const 0)))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (i32.load (i64.const 0)))) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (i32.load (i64.const 0)) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 6) (i32.load (i64.const 0))) (i32.const 7) + ) + ) + + (func (export "as-return-value") (result i32) + (return (i32.load (i64.const 0))) + ) + + (func (export "as-if-cond") (result i32) + (if (result i32) (i32.load (i64.const 0)) + (then (i32.const 0)) (else (i32.const 1)) + ) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) + (then (i32.load (i64.const 0))) (else (i32.const 0)) + ) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 0) + (then (i32.const 0)) (else (i32.load (i64.const 0))) + ) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (select (i32.load (i64.const 0)) (local.get 0) (local.get 1)) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (select (local.get 0) (i32.load (i64.const 0)) (local.get 1)) + ) + (func (export "as-select-cond") (result i32) + (select (i32.const 0) (i32.const 1) (i32.load (i64.const 0))) + ) + + (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (call $$f (i32.load (i64.const 0)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call-mid") (result i32) + (call $$f (i32.const 1) (i32.load (i64.const 0)) (i32.const 3)) + ) + (func (export "as-call-last") (result i32) + (call $$f (i32.const 1) (i32.const 2) (i32.load (i64.const 0))) + ) + + (type $$sig (func (param i32 i32 i32) (result i32))) + (table funcref (elem $$f)) + (func (export "as-call_indirect-first") (result i32) + (call_indirect (type $$sig) + (i32.load (i64.const 0)) (i32.const 2) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.load (i64.const 0)) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (i32.load (i64.const 0)) (i32.const 0) + ) + ) + (func (export "as-call_indirect-index") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (i32.const 3) (i32.load (i64.const 0)) + ) + ) + + (func (export "as-local.set-value") (local i32) + (local.set 0 (i32.load (i64.const 0))) + ) + (func (export "as-local.tee-value") (result i32) (local i32) + (local.tee 0 (i32.load (i64.const 0))) + ) + (global $$g (mut i32) (i32.const 0)) + (func (export "as-global.set-value") (local i32) + (global.set $$g (i32.load (i64.const 0))) + ) + + (func (export "as-load-address") (result i32) + (i32.load (i64.load (i64.const 0))) + ) + (func (export "as-loadN-address") (result i32) + (i32.load8_s (i64.load (i64.const 0))) + ) + + (func (export "as-store-address") + (i32.store (i64.load (i64.const 0)) (i32.const 7)) + ) + (func (export "as-store-value") + (i32.store (i64.const 2) (i32.load (i64.const 0))) + ) + + (func (export "as-storeN-address") + (i32.store8 (i64.load8_s (i64.const 0)) (i32.const 7)) + ) + (func (export "as-storeN-value") + (i32.store16 (i64.const 2) (i32.load (i64.const 0))) + ) + + (func (export "as-unary-operand") (result i32) + (i32.clz (i32.load (i64.const 100))) + ) + + (func (export "as-binary-left") (result i32) + (i32.add (i32.load (i64.const 100)) (i32.const 10)) + ) + (func (export "as-binary-right") (result i32) + (i32.sub (i32.const 10) (i32.load (i64.const 100))) + ) + + (func (export "as-test-operand") (result i32) + (i32.eqz (i32.load (i64.const 100))) + ) + + (func (export "as-compare-left") (result i32) + (i32.le_s (i32.load (i64.const 100)) (i32.const 10)) + ) + (func (export "as-compare-right") (result i32) + (i32.ne (i32.const 10) (i32.load (i64.const 100))) + ) + + (func (export "as-memory.grow-size") (result i64) + (memory.grow (i64.load (i64.const 100))) + ) +)`); + +// ./test/core/load64.wast:161 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 0)]); + +// ./test/core/load64.wast:163 +assert_return(() => invoke($0, `as-br_if-cond`, []), []); + +// ./test/core/load64.wast:164 +assert_return(() => invoke($0, `as-br_if-value`, []), [value("i32", 0)]); + +// ./test/core/load64.wast:165 +assert_return(() => invoke($0, `as-br_if-value-cond`, []), [value("i32", 7)]); + +// ./test/core/load64.wast:167 +assert_return(() => invoke($0, `as-br_table-index`, []), []); + +// ./test/core/load64.wast:168 +assert_return(() => invoke($0, `as-br_table-value`, []), [value("i32", 0)]); + +// ./test/core/load64.wast:169 +assert_return(() => invoke($0, `as-br_table-value-index`, []), [value("i32", 6)]); + +// ./test/core/load64.wast:171 +assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 0)]); + +// ./test/core/load64.wast:173 +assert_return(() => invoke($0, `as-if-cond`, []), [value("i32", 1)]); + +// ./test/core/load64.wast:174 +assert_return(() => invoke($0, `as-if-then`, []), [value("i32", 0)]); + +// ./test/core/load64.wast:175 +assert_return(() => invoke($0, `as-if-else`, []), [value("i32", 0)]); + +// ./test/core/load64.wast:177 +assert_return(() => invoke($0, `as-select-first`, [0, 1]), [value("i32", 0)]); + +// ./test/core/load64.wast:178 +assert_return(() => invoke($0, `as-select-second`, [0, 0]), [value("i32", 0)]); + +// ./test/core/load64.wast:179 +assert_return(() => invoke($0, `as-select-cond`, []), [value("i32", 1)]); + +// ./test/core/load64.wast:181 +assert_return(() => invoke($0, `as-call-first`, []), [value("i32", -1)]); + +// ./test/core/load64.wast:182 +assert_return(() => invoke($0, `as-call-mid`, []), [value("i32", -1)]); + +// ./test/core/load64.wast:183 +assert_return(() => invoke($0, `as-call-last`, []), [value("i32", -1)]); + +// ./test/core/load64.wast:185 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", -1)]); + +// ./test/core/load64.wast:186 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", -1)]); + +// ./test/core/load64.wast:187 +assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", -1)]); + +// ./test/core/load64.wast:188 +assert_return(() => invoke($0, `as-call_indirect-index`, []), [value("i32", -1)]); + +// ./test/core/load64.wast:190 +assert_return(() => invoke($0, `as-local.set-value`, []), []); + +// ./test/core/load64.wast:191 +assert_return(() => invoke($0, `as-local.tee-value`, []), [value("i32", 0)]); + +// ./test/core/load64.wast:192 +assert_return(() => invoke($0, `as-global.set-value`, []), []); + +// ./test/core/load64.wast:194 +assert_return(() => invoke($0, `as-load-address`, []), [value("i32", 0)]); + +// ./test/core/load64.wast:195 +assert_return(() => invoke($0, `as-loadN-address`, []), [value("i32", 0)]); + +// ./test/core/load64.wast:196 +assert_return(() => invoke($0, `as-store-address`, []), []); + +// ./test/core/load64.wast:197 +assert_return(() => invoke($0, `as-store-value`, []), []); + +// ./test/core/load64.wast:198 +assert_return(() => invoke($0, `as-storeN-address`, []), []); + +// ./test/core/load64.wast:199 +assert_return(() => invoke($0, `as-storeN-value`, []), []); + +// ./test/core/load64.wast:201 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("i32", 32)]); + +// ./test/core/load64.wast:203 +assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 10)]); + +// ./test/core/load64.wast:204 +assert_return(() => invoke($0, `as-binary-right`, []), [value("i32", 10)]); + +// ./test/core/load64.wast:206 +assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 1)]); + +// ./test/core/load64.wast:208 +assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 1)]); + +// ./test/core/load64.wast:209 +assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 1)]); + +// ./test/core/load64.wast:211 +assert_return(() => invoke($0, `as-memory.grow-size`, []), [value("i64", 1n)]); + +// ./test/core/load64.wast:213 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result i32) (i32.load32 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:220 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result i32) (i32.load32_u (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:227 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result i32) (i32.load32_s (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:234 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result i32) (i32.load64 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:241 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result i32) (i32.load64_u (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:248 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result i32) (i32.load64_s (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:256 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result i64) (i64.load64 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:263 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result i64) (i64.load64_u (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:270 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result i64) (i64.load64_s (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:278 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result f32) (f32.load32 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:285 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result f32) (f32.load64 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:293 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result f64) (f64.load32 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:300 +assert_malformed( + () => instantiate(`(memory i64 1) (func (param i64) (result f64) (f64.load64 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load64.wast:311 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load_i32 (i32.load (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:315 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load8_s_i32 (i32.load8_s (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:319 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load8_u_i32 (i32.load8_u (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:323 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load16_s_i32 (i32.load16_s (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:327 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load16_u_i32 (i32.load16_u (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:331 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load_i64 (i64.load (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:335 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load8_s_i64 (i64.load8_s (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:339 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load8_u_i64 (i64.load8_u (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:343 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load16_s_i64 (i64.load16_s (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:347 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load16_u_i64 (i64.load16_u (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:351 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load32_s_i64 (i64.load32_s (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:355 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load32_u_i64 (i64.load32_u (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:359 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load_f32 (f32.load (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:363 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func $$load_f64 (f64.load (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:371 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result i32) (i32.load (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:372 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result i32) (i32.load8_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:373 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result i32) (i32.load8_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:374 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result i32) (i32.load16_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:375 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result i32) (i32.load16_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:376 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result i64) (i64.load (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:377 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result i64) (i64.load8_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:378 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result i64) (i64.load8_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:379 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result i64) (i64.load16_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:380 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result i64) (i64.load16_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:381 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result i64) (i64.load32_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:382 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result i64) (i64.load32_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:383 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result f32) (f32.load (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:384 +assert_invalid( + () => instantiate(`(module (memory i64 1) (func (result f64) (f64.load (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load64.wast:387 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty + (i32.load) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:396 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-block + (i32.const 0) + (block (i32.load) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:406 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-loop + (i32.const 0) + (loop (i32.load) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:416 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (i32.load) (drop))) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:426 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (i32.load))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:436 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-br + (i32.const 0) + (block (br 0 (i32.load)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:446 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-br_if + (i32.const 0) + (block (br_if 0 (i32.load) (i32.const 1)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:456 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-br_table + (i32.const 0) + (block (br_table 0 (i32.load)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:466 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-return + (return (i32.load)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:475 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-select + (select (i32.load) (i32.const 1) (i32.const 2)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:484 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-call + (call 1 (i32.load)) (drop) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:494 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-address-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (i32.load) (i32.const 0) + ) + (drop) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:511 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-local.set + (local i32) + (local.set 0 (i32.load)) (local.get 0) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:521 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-local.tee + (local i32) + (local.tee 0 (i32.load)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:531 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (global $$x (mut i32) (i32.const 0)) + (func $$type-address-empty-in-global.set + (global.set $$x (i32.load)) (global.get $$x) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:541 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-memory.grow + (memory.grow (i64.load)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:550 +assert_invalid( + () => instantiate(`(module + (memory i64 0) + (func $$type-address-empty-in-load + (i32.load (i32.load)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load64.wast:559 +assert_invalid( + () => instantiate(`(module + (memory i64 1) + (func $$type-address-empty-in-store + (i32.store (i32.load) (i32.const 1)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/memory64/memory64.wast.js b/js/src/jit-test/tests/wasm/spec/memory64/memory64.wast.js new file mode 100644 index 0000000000..341742ab86 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory64/memory64.wast.js @@ -0,0 +1,324 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory64.wast + +// ./test/core/memory64.wast:3 +let $0 = instantiate(`(module (memory i64 0 0))`); + +// ./test/core/memory64.wast:4 +let $1 = instantiate(`(module (memory i64 0 1))`); + +// ./test/core/memory64.wast:5 +let $2 = instantiate(`(module (memory i64 1 256))`); + +// ./test/core/memory64.wast:6 +let $3 = instantiate(`(module (memory i64 0 65536))`); + +// ./test/core/memory64.wast:8 +assert_invalid( + () => instantiate(`(module (memory i64 0) (memory i64 0))`), + `multiple memories`, +); + +// ./test/core/memory64.wast:9 +assert_invalid( + () => instantiate(`(module (memory (import "spectest" "memory") i64 0) (memory i64 0))`), + `multiple memories`, +); + +// ./test/core/memory64.wast:11 +let $4 = instantiate(`(module (memory i64 (data)) (func (export "memsize") (result i64) (memory.size)))`); + +// ./test/core/memory64.wast:12 +assert_return(() => invoke($4, `memsize`, []), [value("i64", 0n)]); + +// ./test/core/memory64.wast:13 +let $5 = instantiate(`(module (memory i64 (data "")) (func (export "memsize") (result i64) (memory.size)))`); + +// ./test/core/memory64.wast:14 +assert_return(() => invoke($5, `memsize`, []), [value("i64", 0n)]); + +// ./test/core/memory64.wast:15 +let $6 = instantiate(`(module (memory i64 (data "x")) (func (export "memsize") (result i64) (memory.size)))`); + +// ./test/core/memory64.wast:16 +assert_return(() => invoke($6, `memsize`, []), [value("i64", 1n)]); + +// ./test/core/memory64.wast:18 +assert_invalid(() => instantiate(`(module (data (i64.const 0)))`), `unknown memory`); + +// ./test/core/memory64.wast:19 +assert_invalid(() => instantiate(`(module (data (i64.const 0) ""))`), `unknown memory`); + +// ./test/core/memory64.wast:20 +assert_invalid(() => instantiate(`(module (data (i64.const 0) "x"))`), `unknown memory`); + +// ./test/core/memory64.wast:22 +assert_invalid( + () => instantiate(`(module (func (drop (f32.load (i64.const 0)))))`), + `unknown memory`, +); + +// ./test/core/memory64.wast:26 +assert_invalid( + () => instantiate(`(module (func (f32.store (i64.const 0) (f32.const 0))))`), + `unknown memory`, +); + +// ./test/core/memory64.wast:30 +assert_invalid( + () => instantiate(`(module (func (drop (i32.load8_s (i64.const 0)))))`), + `unknown memory`, +); + +// ./test/core/memory64.wast:34 +assert_invalid( + () => instantiate(`(module (func (i32.store8 (i64.const 0) (i32.const 0))))`), + `unknown memory`, +); + +// ./test/core/memory64.wast:38 +assert_invalid( + () => instantiate(`(module (func (drop (memory.size))))`), + `unknown memory`, +); + +// ./test/core/memory64.wast:42 +assert_invalid( + () => instantiate(`(module (func (drop (memory.grow (i64.const 0)))))`), + `unknown memory`, +); + +// ./test/core/memory64.wast:48 +assert_invalid( + () => instantiate(`(module (memory i64 1 0))`), + `size minimum must not be greater than maximum`, +); + +// ./test/core/memory64.wast:53 +let $7 = instantiate(`(module + (memory i64 1) + (data (i64.const 0) "ABC\\a7D") (data (i64.const 20) "WASM") + + ;; Data section + (func (export "data") (result i32) + (i32.and + (i32.and + (i32.and + (i32.eq (i32.load8_u (i64.const 0)) (i32.const 65)) + (i32.eq (i32.load8_u (i64.const 3)) (i32.const 167)) + ) + (i32.and + (i32.eq (i32.load8_u (i64.const 6)) (i32.const 0)) + (i32.eq (i32.load8_u (i64.const 19)) (i32.const 0)) + ) + ) + (i32.and + (i32.and + (i32.eq (i32.load8_u (i64.const 20)) (i32.const 87)) + (i32.eq (i32.load8_u (i64.const 23)) (i32.const 77)) + ) + (i32.and + (i32.eq (i32.load8_u (i64.const 24)) (i32.const 0)) + (i32.eq (i32.load8_u (i64.const 1023)) (i32.const 0)) + ) + ) + ) + ) + + ;; Memory cast + (func (export "cast") (result f64) + (i64.store (i64.const 8) (i64.const -12345)) + (if + (f64.eq + (f64.load (i64.const 8)) + (f64.reinterpret_i64 (i64.const -12345)) + ) + (then (return (f64.const 0))) + ) + (i64.store align=1 (i64.const 9) (i64.const 0)) + (i32.store16 align=1 (i64.const 15) (i32.const 16453)) + (f64.load align=1 (i64.const 9)) + ) + + ;; Sign and zero extending memory loads + (func (export "i32_load8_s") (param $$i i32) (result i32) + (i32.store8 (i64.const 8) (local.get $$i)) + (i32.load8_s (i64.const 8)) + ) + (func (export "i32_load8_u") (param $$i i32) (result i32) + (i32.store8 (i64.const 8) (local.get $$i)) + (i32.load8_u (i64.const 8)) + ) + (func (export "i32_load16_s") (param $$i i32) (result i32) + (i32.store16 (i64.const 8) (local.get $$i)) + (i32.load16_s (i64.const 8)) + ) + (func (export "i32_load16_u") (param $$i i32) (result i32) + (i32.store16 (i64.const 8) (local.get $$i)) + (i32.load16_u (i64.const 8)) + ) + (func (export "i64_load8_s") (param $$i i64) (result i64) + (i64.store8 (i64.const 8) (local.get $$i)) + (i64.load8_s (i64.const 8)) + ) + (func (export "i64_load8_u") (param $$i i64) (result i64) + (i64.store8 (i64.const 8) (local.get $$i)) + (i64.load8_u (i64.const 8)) + ) + (func (export "i64_load16_s") (param $$i i64) (result i64) + (i64.store16 (i64.const 8) (local.get $$i)) + (i64.load16_s (i64.const 8)) + ) + (func (export "i64_load16_u") (param $$i i64) (result i64) + (i64.store16 (i64.const 8) (local.get $$i)) + (i64.load16_u (i64.const 8)) + ) + (func (export "i64_load32_s") (param $$i i64) (result i64) + (i64.store32 (i64.const 8) (local.get $$i)) + (i64.load32_s (i64.const 8)) + ) + (func (export "i64_load32_u") (param $$i i64) (result i64) + (i64.store32 (i64.const 8) (local.get $$i)) + (i64.load32_u (i64.const 8)) + ) +)`); + +// ./test/core/memory64.wast:141 +assert_return(() => invoke($7, `data`, []), [value("i32", 1)]); + +// ./test/core/memory64.wast:142 +assert_return(() => invoke($7, `cast`, []), [value("f64", 42)]); + +// ./test/core/memory64.wast:144 +assert_return(() => invoke($7, `i32_load8_s`, [-1]), [value("i32", -1)]); + +// ./test/core/memory64.wast:145 +assert_return(() => invoke($7, `i32_load8_u`, [-1]), [value("i32", 255)]); + +// ./test/core/memory64.wast:146 +assert_return(() => invoke($7, `i32_load16_s`, [-1]), [value("i32", -1)]); + +// ./test/core/memory64.wast:147 +assert_return(() => invoke($7, `i32_load16_u`, [-1]), [value("i32", 65535)]); + +// ./test/core/memory64.wast:149 +assert_return(() => invoke($7, `i32_load8_s`, [100]), [value("i32", 100)]); + +// ./test/core/memory64.wast:150 +assert_return(() => invoke($7, `i32_load8_u`, [200]), [value("i32", 200)]); + +// ./test/core/memory64.wast:151 +assert_return(() => invoke($7, `i32_load16_s`, [20000]), [value("i32", 20000)]); + +// ./test/core/memory64.wast:152 +assert_return(() => invoke($7, `i32_load16_u`, [40000]), [value("i32", 40000)]); + +// ./test/core/memory64.wast:154 +assert_return(() => invoke($7, `i32_load8_s`, [-19110589]), [value("i32", 67)]); + +// ./test/core/memory64.wast:155 +assert_return(() => invoke($7, `i32_load8_s`, [878104047]), [value("i32", -17)]); + +// ./test/core/memory64.wast:156 +assert_return(() => invoke($7, `i32_load8_u`, [-19110589]), [value("i32", 67)]); + +// ./test/core/memory64.wast:157 +assert_return(() => invoke($7, `i32_load8_u`, [878104047]), [value("i32", 239)]); + +// ./test/core/memory64.wast:158 +assert_return(() => invoke($7, `i32_load16_s`, [-19110589]), [value("i32", 25923)]); + +// ./test/core/memory64.wast:159 +assert_return(() => invoke($7, `i32_load16_s`, [878104047]), [value("i32", -12817)]); + +// ./test/core/memory64.wast:160 +assert_return(() => invoke($7, `i32_load16_u`, [-19110589]), [value("i32", 25923)]); + +// ./test/core/memory64.wast:161 +assert_return(() => invoke($7, `i32_load16_u`, [878104047]), [value("i32", 52719)]); + +// ./test/core/memory64.wast:163 +assert_return(() => invoke($7, `i64_load8_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/memory64.wast:164 +assert_return(() => invoke($7, `i64_load8_u`, [-1n]), [value("i64", 255n)]); + +// ./test/core/memory64.wast:165 +assert_return(() => invoke($7, `i64_load16_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/memory64.wast:166 +assert_return(() => invoke($7, `i64_load16_u`, [-1n]), [value("i64", 65535n)]); + +// ./test/core/memory64.wast:167 +assert_return(() => invoke($7, `i64_load32_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/memory64.wast:168 +assert_return(() => invoke($7, `i64_load32_u`, [-1n]), [value("i64", 4294967295n)]); + +// ./test/core/memory64.wast:170 +assert_return(() => invoke($7, `i64_load8_s`, [100n]), [value("i64", 100n)]); + +// ./test/core/memory64.wast:171 +assert_return(() => invoke($7, `i64_load8_u`, [200n]), [value("i64", 200n)]); + +// ./test/core/memory64.wast:172 +assert_return(() => invoke($7, `i64_load16_s`, [20000n]), [value("i64", 20000n)]); + +// ./test/core/memory64.wast:173 +assert_return(() => invoke($7, `i64_load16_u`, [40000n]), [value("i64", 40000n)]); + +// ./test/core/memory64.wast:174 +assert_return(() => invoke($7, `i64_load32_s`, [20000n]), [value("i64", 20000n)]); + +// ./test/core/memory64.wast:175 +assert_return(() => invoke($7, `i64_load32_u`, [40000n]), [value("i64", 40000n)]); + +// ./test/core/memory64.wast:177 +assert_return(() => invoke($7, `i64_load8_s`, [-81985529755441853n]), [value("i64", 67n)]); + +// ./test/core/memory64.wast:178 +assert_return(() => invoke($7, `i64_load8_s`, [3771275841602506223n]), [value("i64", -17n)]); + +// ./test/core/memory64.wast:179 +assert_return(() => invoke($7, `i64_load8_u`, [-81985529755441853n]), [value("i64", 67n)]); + +// ./test/core/memory64.wast:180 +assert_return(() => invoke($7, `i64_load8_u`, [3771275841602506223n]), [value("i64", 239n)]); + +// ./test/core/memory64.wast:181 +assert_return(() => invoke($7, `i64_load16_s`, [-81985529755441853n]), [value("i64", 25923n)]); + +// ./test/core/memory64.wast:182 +assert_return(() => invoke($7, `i64_load16_s`, [3771275841602506223n]), [value("i64", -12817n)]); + +// ./test/core/memory64.wast:183 +assert_return(() => invoke($7, `i64_load16_u`, [-81985529755441853n]), [value("i64", 25923n)]); + +// ./test/core/memory64.wast:184 +assert_return(() => invoke($7, `i64_load16_u`, [3771275841602506223n]), [value("i64", 52719n)]); + +// ./test/core/memory64.wast:185 +assert_return(() => invoke($7, `i64_load32_s`, [-81985529755441853n]), [value("i64", 1446274371n)]); + +// ./test/core/memory64.wast:186 +assert_return(() => invoke($7, `i64_load32_s`, [3771275841602506223n]), [value("i64", -1732588049n)]); + +// ./test/core/memory64.wast:187 +assert_return(() => invoke($7, `i64_load32_u`, [-81985529755441853n]), [value("i64", 1446274371n)]); + +// ./test/core/memory64.wast:188 +assert_return(() => invoke($7, `i64_load32_u`, [3771275841602506223n]), [value("i64", 2562379247n)]); diff --git a/js/src/jit-test/tests/wasm/spec/memory64/memory_grow64.wast.js b/js/src/jit-test/tests/wasm/spec/memory64/memory_grow64.wast.js new file mode 100644 index 0000000000..5286d975d8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory64/memory_grow64.wast.js @@ -0,0 +1,199 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory_grow64.wast + +// ./test/core/memory_grow64.wast:1 +let $0 = instantiate(`(module + (memory i64 0) + + (func (export "load_at_zero") (result i32) (i32.load (i64.const 0))) + (func (export "store_at_zero") (i32.store (i64.const 0) (i32.const 2))) + + (func (export "load_at_page_size") (result i32) (i32.load (i64.const 0x10000))) + (func (export "store_at_page_size") (i32.store (i64.const 0x10000) (i32.const 3))) + + (func (export "grow") (param $$sz i64) (result i64) (memory.grow (local.get $$sz))) + (func (export "size") (result i64) (memory.size)) +)`); + +// ./test/core/memory_grow64.wast:14 +assert_return(() => invoke($0, `size`, []), [value("i64", 0n)]); + +// ./test/core/memory_grow64.wast:15 +assert_trap(() => invoke($0, `store_at_zero`, []), `out of bounds memory access`); + +// ./test/core/memory_grow64.wast:16 +assert_trap(() => invoke($0, `load_at_zero`, []), `out of bounds memory access`); + +// ./test/core/memory_grow64.wast:17 +assert_trap(() => invoke($0, `store_at_page_size`, []), `out of bounds memory access`); + +// ./test/core/memory_grow64.wast:18 +assert_trap(() => invoke($0, `load_at_page_size`, []), `out of bounds memory access`); + +// ./test/core/memory_grow64.wast:19 +assert_return(() => invoke($0, `grow`, [1n]), [value("i64", 0n)]); + +// ./test/core/memory_grow64.wast:20 +assert_return(() => invoke($0, `size`, []), [value("i64", 1n)]); + +// ./test/core/memory_grow64.wast:21 +assert_return(() => invoke($0, `load_at_zero`, []), [value("i32", 0)]); + +// ./test/core/memory_grow64.wast:22 +assert_return(() => invoke($0, `store_at_zero`, []), []); + +// ./test/core/memory_grow64.wast:23 +assert_return(() => invoke($0, `load_at_zero`, []), [value("i32", 2)]); + +// ./test/core/memory_grow64.wast:24 +assert_trap(() => invoke($0, `store_at_page_size`, []), `out of bounds memory access`); + +// ./test/core/memory_grow64.wast:25 +assert_trap(() => invoke($0, `load_at_page_size`, []), `out of bounds memory access`); + +// ./test/core/memory_grow64.wast:26 +assert_return(() => invoke($0, `grow`, [4n]), [value("i64", 1n)]); + +// ./test/core/memory_grow64.wast:27 +assert_return(() => invoke($0, `size`, []), [value("i64", 5n)]); + +// ./test/core/memory_grow64.wast:28 +assert_return(() => invoke($0, `load_at_zero`, []), [value("i32", 2)]); + +// ./test/core/memory_grow64.wast:29 +assert_return(() => invoke($0, `store_at_zero`, []), []); + +// ./test/core/memory_grow64.wast:30 +assert_return(() => invoke($0, `load_at_zero`, []), [value("i32", 2)]); + +// ./test/core/memory_grow64.wast:31 +assert_return(() => invoke($0, `load_at_page_size`, []), [value("i32", 0)]); + +// ./test/core/memory_grow64.wast:32 +assert_return(() => invoke($0, `store_at_page_size`, []), []); + +// ./test/core/memory_grow64.wast:33 +assert_return(() => invoke($0, `load_at_page_size`, []), [value("i32", 3)]); + +// ./test/core/memory_grow64.wast:36 +let $1 = instantiate(`(module + (memory i64 0) + (func (export "grow") (param i64) (result i64) (memory.grow (local.get 0))) +)`); + +// ./test/core/memory_grow64.wast:41 +assert_return(() => invoke($1, `grow`, [0n]), [value("i64", 0n)]); + +// ./test/core/memory_grow64.wast:42 +assert_return(() => invoke($1, `grow`, [1n]), [value("i64", 0n)]); + +// ./test/core/memory_grow64.wast:43 +assert_return(() => invoke($1, `grow`, [0n]), [value("i64", 1n)]); + +// ./test/core/memory_grow64.wast:44 +assert_return(() => invoke($1, `grow`, [2n]), [value("i64", 1n)]); + +// ./test/core/memory_grow64.wast:45 +assert_return(() => invoke($1, `grow`, [800n]), [value("i64", 3n)]); + +// ./test/core/memory_grow64.wast:46 +assert_return(() => invoke($1, `grow`, [1n]), [value("i64", 803n)]); + +// ./test/core/memory_grow64.wast:48 +let $2 = instantiate(`(module + (memory i64 0 10) + (func (export "grow") (param i64) (result i64) (memory.grow (local.get 0))) +)`); + +// ./test/core/memory_grow64.wast:53 +assert_return(() => invoke($2, `grow`, [0n]), [value("i64", 0n)]); + +// ./test/core/memory_grow64.wast:54 +assert_return(() => invoke($2, `grow`, [1n]), [value("i64", 0n)]); + +// ./test/core/memory_grow64.wast:55 +assert_return(() => invoke($2, `grow`, [1n]), [value("i64", 1n)]); + +// ./test/core/memory_grow64.wast:56 +assert_return(() => invoke($2, `grow`, [2n]), [value("i64", 2n)]); + +// ./test/core/memory_grow64.wast:57 +assert_return(() => invoke($2, `grow`, [6n]), [value("i64", 4n)]); + +// ./test/core/memory_grow64.wast:58 +assert_return(() => invoke($2, `grow`, [0n]), [value("i64", 10n)]); + +// ./test/core/memory_grow64.wast:59 +assert_return(() => invoke($2, `grow`, [1n]), [value("i64", -1n)]); + +// ./test/core/memory_grow64.wast:60 +assert_return(() => invoke($2, `grow`, [65536n]), [value("i64", -1n)]); + +// ./test/core/memory_grow64.wast:64 +let $3 = instantiate(`(module + (memory i64 1) + (func (export "grow") (param i64) (result i64) + (memory.grow (local.get 0)) + ) + (func (export "check-memory-zero") (param i64 i64) (result i32) + (local i32) + (local.set 2 (i32.const 1)) + (block + (loop + (local.set 2 (i32.load8_u (local.get 0))) + (br_if 1 (i32.ne (local.get 2) (i32.const 0))) + (br_if 1 (i64.ge_u (local.get 0) (local.get 1))) + (local.set 0 (i64.add (local.get 0) (i64.const 1))) + (br_if 0 (i64.le_u (local.get 0) (local.get 1))) + ) + ) + (local.get 2) + ) +)`); + +// ./test/core/memory_grow64.wast:85 +assert_return(() => invoke($3, `check-memory-zero`, [0n, 65535n]), [value("i32", 0)]); + +// ./test/core/memory_grow64.wast:86 +assert_return(() => invoke($3, `grow`, [1n]), [value("i64", 1n)]); + +// ./test/core/memory_grow64.wast:87 +assert_return(() => invoke($3, `check-memory-zero`, [65536n, 131071n]), [value("i32", 0)]); + +// ./test/core/memory_grow64.wast:88 +assert_return(() => invoke($3, `grow`, [1n]), [value("i64", 2n)]); + +// ./test/core/memory_grow64.wast:89 +assert_return(() => invoke($3, `check-memory-zero`, [131072n, 196607n]), [value("i32", 0)]); + +// ./test/core/memory_grow64.wast:90 +assert_return(() => invoke($3, `grow`, [1n]), [value("i64", 3n)]); + +// ./test/core/memory_grow64.wast:91 +assert_return(() => invoke($3, `check-memory-zero`, [196608n, 262143n]), [value("i32", 0)]); + +// ./test/core/memory_grow64.wast:92 +assert_return(() => invoke($3, `grow`, [1n]), [value("i64", 4n)]); + +// ./test/core/memory_grow64.wast:93 +assert_return(() => invoke($3, `check-memory-zero`, [262144n, 327679n]), [value("i32", 0)]); + +// ./test/core/memory_grow64.wast:94 +assert_return(() => invoke($3, `grow`, [1n]), [value("i64", 5n)]); + +// ./test/core/memory_grow64.wast:95 +assert_return(() => invoke($3, `check-memory-zero`, [327680n, 393215n]), [value("i32", 0)]); diff --git a/js/src/jit-test/tests/wasm/spec/memory64/memory_redundancy64.wast.js b/js/src/jit-test/tests/wasm/spec/memory64/memory_redundancy64.wast.js new file mode 100644 index 0000000000..5801c3057e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory64/memory_redundancy64.wast.js @@ -0,0 +1,95 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory_redundancy64.wast + +// ./test/core/memory_redundancy64.wast:5 +let $0 = instantiate(`(module + (memory i64 1 1) + + (func (export "zero_everything") + (i32.store (i64.const 0) (i32.const 0)) + (i32.store (i64.const 4) (i32.const 0)) + (i32.store (i64.const 8) (i32.const 0)) + (i32.store (i64.const 12) (i32.const 0)) + ) + + (func (export "test_store_to_load") (result i32) + (i32.store (i64.const 8) (i32.const 0)) + (f32.store (i64.const 5) (f32.const -0.0)) + (i32.load (i64.const 8)) + ) + + (func (export "test_redundant_load") (result i32) + (local $$t i32) + (local $$s i32) + (local.set $$t (i32.load (i64.const 8))) + (i32.store (i64.const 5) (i32.const 0x80000000)) + (local.set $$s (i32.load (i64.const 8))) + (i32.add (local.get $$t) (local.get $$s)) + ) + + (func (export "test_dead_store") (result f32) + (local $$t f32) + (i32.store (i64.const 8) (i32.const 0x23232323)) + (local.set $$t (f32.load (i64.const 11))) + (i32.store (i64.const 8) (i32.const 0)) + (local.get $$t) + ) + + ;; A function named "malloc" which implementations nonetheless shouldn't + ;; assume behaves like C malloc. + (func $$malloc (export "malloc") + (param $$size i64) + (result i64) + (i64.const 16) + ) + + ;; Call malloc twice, but unlike C malloc, we don't get non-aliasing pointers. + (func (export "malloc_aliasing") + (result i32) + (local $$x i64) + (local $$y i64) + (local.set $$x (call $$malloc (i64.const 4))) + (local.set $$y (call $$malloc (i64.const 4))) + (i32.store (local.get $$x) (i32.const 42)) + (i32.store (local.get $$y) (i32.const 43)) + (i32.load (local.get $$x)) + ) +)`); + +// ./test/core/memory_redundancy64.wast:59 +assert_return(() => invoke($0, `test_store_to_load`, []), [value("i32", 128)]); + +// ./test/core/memory_redundancy64.wast:60 +invoke($0, `zero_everything`, []); + +// ./test/core/memory_redundancy64.wast:61 +assert_return(() => invoke($0, `test_redundant_load`, []), [value("i32", 128)]); + +// ./test/core/memory_redundancy64.wast:62 +invoke($0, `zero_everything`, []); + +// ./test/core/memory_redundancy64.wast:63 +assert_return( + () => invoke($0, `test_dead_store`, []), + [value("f32", 0.000000000000000000000000000000000000000000049)], +); + +// ./test/core/memory_redundancy64.wast:64 +invoke($0, `zero_everything`, []); + +// ./test/core/memory_redundancy64.wast:65 +assert_return(() => invoke($0, `malloc_aliasing`, []), [value("i32", 43)]); diff --git a/js/src/jit-test/tests/wasm/spec/memory64/memory_trap64.wast.js b/js/src/jit-test/tests/wasm/spec/memory64/memory_trap64.wast.js new file mode 100644 index 0000000000..ffc8eb2cb3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/memory64/memory_trap64.wast.js @@ -0,0 +1,632 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory_trap64.wast + +// ./test/core/memory_trap64.wast:1 +let $0 = instantiate(`(module + (memory i64 1) + + (func $$addr_limit (result i64) + (i64.mul (memory.size) (i64.const 0x10000)) + ) + + (func (export "store") (param $$i i64) (param $$v i32) + (i32.store (i64.add (call $$addr_limit) (local.get $$i)) (local.get $$v)) + ) + + (func (export "load") (param $$i i64) (result i32) + (i32.load (i64.add (call $$addr_limit) (local.get $$i))) + ) + + (func (export "memory.grow") (param i64) (result i64) + (memory.grow (local.get 0)) + ) +)`); + +// ./test/core/memory_trap64.wast:21 +assert_return(() => invoke($0, `store`, [-4n, 42]), []); + +// ./test/core/memory_trap64.wast:22 +assert_return(() => invoke($0, `load`, [-4n]), [value("i32", 42)]); + +// ./test/core/memory_trap64.wast:23 +assert_trap(() => invoke($0, `store`, [-3n, 13]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:24 +assert_trap(() => invoke($0, `load`, [-3n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:25 +assert_trap(() => invoke($0, `store`, [-2n, 13]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:26 +assert_trap(() => invoke($0, `load`, [-2n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:27 +assert_trap(() => invoke($0, `store`, [-1n, 13]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:28 +assert_trap(() => invoke($0, `load`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:29 +assert_trap(() => invoke($0, `store`, [0n, 13]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:30 +assert_trap(() => invoke($0, `load`, [0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:31 +assert_trap(() => invoke($0, `store`, [2147483648n, 13]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:32 +assert_trap(() => invoke($0, `load`, [2147483648n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:34 +let $1 = instantiate(`(module + (memory i64 1) + (data (i64.const 0) "abcdefgh") + (data (i64.const 0xfff8) "abcdefgh") + + (func (export "i32.load") (param $$a i64) (result i32) + (i32.load (local.get $$a)) + ) + (func (export "i64.load") (param $$a i64) (result i64) + (i64.load (local.get $$a)) + ) + (func (export "f32.load") (param $$a i64) (result f32) + (f32.load (local.get $$a)) + ) + (func (export "f64.load") (param $$a i64) (result f64) + (f64.load (local.get $$a)) + ) + (func (export "i32.load8_s") (param $$a i64) (result i32) + (i32.load8_s (local.get $$a)) + ) + (func (export "i32.load8_u") (param $$a i64) (result i32) + (i32.load8_u (local.get $$a)) + ) + (func (export "i32.load16_s") (param $$a i64) (result i32) + (i32.load16_s (local.get $$a)) + ) + (func (export "i32.load16_u") (param $$a i64) (result i32) + (i32.load16_u (local.get $$a)) + ) + (func (export "i64.load8_s") (param $$a i64) (result i64) + (i64.load8_s (local.get $$a)) + ) + (func (export "i64.load8_u") (param $$a i64) (result i64) + (i64.load8_u (local.get $$a)) + ) + (func (export "i64.load16_s") (param $$a i64) (result i64) + (i64.load16_s (local.get $$a)) + ) + (func (export "i64.load16_u") (param $$a i64) (result i64) + (i64.load16_u (local.get $$a)) + ) + (func (export "i64.load32_s") (param $$a i64) (result i64) + (i64.load32_s (local.get $$a)) + ) + (func (export "i64.load32_u") (param $$a i64) (result i64) + (i64.load32_u (local.get $$a)) + ) + (func (export "i32.store") (param $$a i64) (param $$v i32) + (i32.store (local.get $$a) (local.get $$v)) + ) + (func (export "i64.store") (param $$a i64) (param $$v i64) + (i64.store (local.get $$a) (local.get $$v)) + ) + (func (export "f32.store") (param $$a i64) (param $$v f32) + (f32.store (local.get $$a) (local.get $$v)) + ) + (func (export "f64.store") (param $$a i64) (param $$v f64) + (f64.store (local.get $$a) (local.get $$v)) + ) + (func (export "i32.store8") (param $$a i64) (param $$v i32) + (i32.store8 (local.get $$a) (local.get $$v)) + ) + (func (export "i32.store16") (param $$a i64) (param $$v i32) + (i32.store16 (local.get $$a) (local.get $$v)) + ) + (func (export "i64.store8") (param $$a i64) (param $$v i64) + (i64.store8 (local.get $$a) (local.get $$v)) + ) + (func (export "i64.store16") (param $$a i64) (param $$v i64) + (i64.store16 (local.get $$a) (local.get $$v)) + ) + (func (export "i64.store32") (param $$a i64) (param $$v i64) + (i64.store32 (local.get $$a) (local.get $$v)) + ) +)`); + +// ./test/core/memory_trap64.wast:110 +assert_trap(() => invoke($1, `i32.store`, [65536n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:111 +assert_trap(() => invoke($1, `i32.store`, [65535n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:112 +assert_trap(() => invoke($1, `i32.store`, [65534n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:113 +assert_trap(() => invoke($1, `i32.store`, [65533n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:114 +assert_trap(() => invoke($1, `i32.store`, [-1n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:115 +assert_trap(() => invoke($1, `i32.store`, [-2n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:116 +assert_trap(() => invoke($1, `i32.store`, [-3n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:117 +assert_trap(() => invoke($1, `i32.store`, [-4n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:118 +assert_trap(() => invoke($1, `i64.store`, [65536n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:119 +assert_trap(() => invoke($1, `i64.store`, [65535n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:120 +assert_trap(() => invoke($1, `i64.store`, [65534n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:121 +assert_trap(() => invoke($1, `i64.store`, [65533n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:122 +assert_trap(() => invoke($1, `i64.store`, [65532n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:123 +assert_trap(() => invoke($1, `i64.store`, [65531n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:124 +assert_trap(() => invoke($1, `i64.store`, [65530n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:125 +assert_trap(() => invoke($1, `i64.store`, [65529n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:126 +assert_trap(() => invoke($1, `i64.store`, [-1n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:127 +assert_trap(() => invoke($1, `i64.store`, [-2n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:128 +assert_trap(() => invoke($1, `i64.store`, [-3n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:129 +assert_trap(() => invoke($1, `i64.store`, [-4n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:130 +assert_trap(() => invoke($1, `i64.store`, [-5n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:131 +assert_trap(() => invoke($1, `i64.store`, [-6n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:132 +assert_trap(() => invoke($1, `i64.store`, [-7n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:133 +assert_trap(() => invoke($1, `i64.store`, [-8n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:134 +assert_trap(() => invoke($1, `f32.store`, [65536n, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:135 +assert_trap(() => invoke($1, `f32.store`, [65535n, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:136 +assert_trap(() => invoke($1, `f32.store`, [65534n, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:137 +assert_trap(() => invoke($1, `f32.store`, [65533n, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:138 +assert_trap(() => invoke($1, `f32.store`, [-1n, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:139 +assert_trap(() => invoke($1, `f32.store`, [-2n, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:140 +assert_trap(() => invoke($1, `f32.store`, [-3n, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:141 +assert_trap(() => invoke($1, `f32.store`, [-4n, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:142 +assert_trap(() => invoke($1, `f64.store`, [65536n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:143 +assert_trap(() => invoke($1, `f64.store`, [65535n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:144 +assert_trap(() => invoke($1, `f64.store`, [65534n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:145 +assert_trap(() => invoke($1, `f64.store`, [65533n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:146 +assert_trap(() => invoke($1, `f64.store`, [65532n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:147 +assert_trap(() => invoke($1, `f64.store`, [65531n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:148 +assert_trap(() => invoke($1, `f64.store`, [65530n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:149 +assert_trap(() => invoke($1, `f64.store`, [65529n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:150 +assert_trap(() => invoke($1, `f64.store`, [-1n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:151 +assert_trap(() => invoke($1, `f64.store`, [-2n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:152 +assert_trap(() => invoke($1, `f64.store`, [-3n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:153 +assert_trap(() => invoke($1, `f64.store`, [-4n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:154 +assert_trap(() => invoke($1, `f64.store`, [-5n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:155 +assert_trap(() => invoke($1, `f64.store`, [-6n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:156 +assert_trap(() => invoke($1, `f64.store`, [-7n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:157 +assert_trap(() => invoke($1, `f64.store`, [-8n, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:158 +assert_trap(() => invoke($1, `i32.store8`, [65536n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:159 +assert_trap(() => invoke($1, `i32.store8`, [-1n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:160 +assert_trap(() => invoke($1, `i32.store16`, [65536n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:161 +assert_trap(() => invoke($1, `i32.store16`, [65535n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:162 +assert_trap(() => invoke($1, `i32.store16`, [-1n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:163 +assert_trap(() => invoke($1, `i32.store16`, [-2n, 0]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:164 +assert_trap(() => invoke($1, `i64.store8`, [65536n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:165 +assert_trap(() => invoke($1, `i64.store8`, [-1n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:166 +assert_trap(() => invoke($1, `i64.store16`, [65536n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:167 +assert_trap(() => invoke($1, `i64.store16`, [65535n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:168 +assert_trap(() => invoke($1, `i64.store16`, [-1n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:169 +assert_trap(() => invoke($1, `i64.store16`, [-2n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:170 +assert_trap(() => invoke($1, `i64.store32`, [65536n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:171 +assert_trap(() => invoke($1, `i64.store32`, [65535n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:172 +assert_trap(() => invoke($1, `i64.store32`, [65534n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:173 +assert_trap(() => invoke($1, `i64.store32`, [65533n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:174 +assert_trap(() => invoke($1, `i64.store32`, [-1n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:175 +assert_trap(() => invoke($1, `i64.store32`, [-2n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:176 +assert_trap(() => invoke($1, `i64.store32`, [-3n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:177 +assert_trap(() => invoke($1, `i64.store32`, [-4n, 0n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:178 +assert_trap(() => invoke($1, `i32.load`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:179 +assert_trap(() => invoke($1, `i32.load`, [65535n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:180 +assert_trap(() => invoke($1, `i32.load`, [65534n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:181 +assert_trap(() => invoke($1, `i32.load`, [65533n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:182 +assert_trap(() => invoke($1, `i32.load`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:183 +assert_trap(() => invoke($1, `i32.load`, [-2n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:184 +assert_trap(() => invoke($1, `i32.load`, [-3n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:185 +assert_trap(() => invoke($1, `i32.load`, [-4n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:186 +assert_trap(() => invoke($1, `i64.load`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:187 +assert_trap(() => invoke($1, `i64.load`, [65535n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:188 +assert_trap(() => invoke($1, `i64.load`, [65534n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:189 +assert_trap(() => invoke($1, `i64.load`, [65533n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:190 +assert_trap(() => invoke($1, `i64.load`, [65532n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:191 +assert_trap(() => invoke($1, `i64.load`, [65531n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:192 +assert_trap(() => invoke($1, `i64.load`, [65530n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:193 +assert_trap(() => invoke($1, `i64.load`, [65529n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:194 +assert_trap(() => invoke($1, `i64.load`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:195 +assert_trap(() => invoke($1, `i64.load`, [-2n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:196 +assert_trap(() => invoke($1, `i64.load`, [-3n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:197 +assert_trap(() => invoke($1, `i64.load`, [-4n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:198 +assert_trap(() => invoke($1, `i64.load`, [-5n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:199 +assert_trap(() => invoke($1, `i64.load`, [-6n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:200 +assert_trap(() => invoke($1, `i64.load`, [-7n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:201 +assert_trap(() => invoke($1, `i64.load`, [-8n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:202 +assert_trap(() => invoke($1, `f32.load`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:203 +assert_trap(() => invoke($1, `f32.load`, [65535n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:204 +assert_trap(() => invoke($1, `f32.load`, [65534n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:205 +assert_trap(() => invoke($1, `f32.load`, [65533n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:206 +assert_trap(() => invoke($1, `f32.load`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:207 +assert_trap(() => invoke($1, `f32.load`, [-2n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:208 +assert_trap(() => invoke($1, `f32.load`, [-3n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:209 +assert_trap(() => invoke($1, `f32.load`, [-4n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:210 +assert_trap(() => invoke($1, `f64.load`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:211 +assert_trap(() => invoke($1, `f64.load`, [65535n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:212 +assert_trap(() => invoke($1, `f64.load`, [65534n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:213 +assert_trap(() => invoke($1, `f64.load`, [65533n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:214 +assert_trap(() => invoke($1, `f64.load`, [65532n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:215 +assert_trap(() => invoke($1, `f64.load`, [65531n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:216 +assert_trap(() => invoke($1, `f64.load`, [65530n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:217 +assert_trap(() => invoke($1, `f64.load`, [65529n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:218 +assert_trap(() => invoke($1, `f64.load`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:219 +assert_trap(() => invoke($1, `f64.load`, [-2n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:220 +assert_trap(() => invoke($1, `f64.load`, [-3n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:221 +assert_trap(() => invoke($1, `f64.load`, [-4n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:222 +assert_trap(() => invoke($1, `f64.load`, [-5n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:223 +assert_trap(() => invoke($1, `f64.load`, [-6n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:224 +assert_trap(() => invoke($1, `f64.load`, [-7n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:225 +assert_trap(() => invoke($1, `f64.load`, [-8n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:226 +assert_trap(() => invoke($1, `i32.load8_s`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:227 +assert_trap(() => invoke($1, `i32.load8_s`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:228 +assert_trap(() => invoke($1, `i32.load8_u`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:229 +assert_trap(() => invoke($1, `i32.load8_u`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:230 +assert_trap(() => invoke($1, `i32.load16_s`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:231 +assert_trap(() => invoke($1, `i32.load16_s`, [65535n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:232 +assert_trap(() => invoke($1, `i32.load16_s`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:233 +assert_trap(() => invoke($1, `i32.load16_s`, [-2n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:234 +assert_trap(() => invoke($1, `i32.load16_u`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:235 +assert_trap(() => invoke($1, `i32.load16_u`, [65535n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:236 +assert_trap(() => invoke($1, `i32.load16_u`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:237 +assert_trap(() => invoke($1, `i32.load16_u`, [-2n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:238 +assert_trap(() => invoke($1, `i64.load8_s`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:239 +assert_trap(() => invoke($1, `i64.load8_s`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:240 +assert_trap(() => invoke($1, `i64.load8_u`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:241 +assert_trap(() => invoke($1, `i64.load8_u`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:242 +assert_trap(() => invoke($1, `i64.load16_s`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:243 +assert_trap(() => invoke($1, `i64.load16_s`, [65535n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:244 +assert_trap(() => invoke($1, `i64.load16_s`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:245 +assert_trap(() => invoke($1, `i64.load16_s`, [-2n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:246 +assert_trap(() => invoke($1, `i64.load16_u`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:247 +assert_trap(() => invoke($1, `i64.load16_u`, [65535n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:248 +assert_trap(() => invoke($1, `i64.load16_u`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:249 +assert_trap(() => invoke($1, `i64.load16_u`, [-2n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:250 +assert_trap(() => invoke($1, `i64.load32_s`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:251 +assert_trap(() => invoke($1, `i64.load32_s`, [65535n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:252 +assert_trap(() => invoke($1, `i64.load32_s`, [65534n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:253 +assert_trap(() => invoke($1, `i64.load32_s`, [65533n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:254 +assert_trap(() => invoke($1, `i64.load32_s`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:255 +assert_trap(() => invoke($1, `i64.load32_s`, [-2n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:256 +assert_trap(() => invoke($1, `i64.load32_s`, [-3n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:257 +assert_trap(() => invoke($1, `i64.load32_s`, [-4n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:258 +assert_trap(() => invoke($1, `i64.load32_u`, [65536n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:259 +assert_trap(() => invoke($1, `i64.load32_u`, [65535n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:260 +assert_trap(() => invoke($1, `i64.load32_u`, [65534n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:261 +assert_trap(() => invoke($1, `i64.load32_u`, [65533n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:262 +assert_trap(() => invoke($1, `i64.load32_u`, [-1n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:263 +assert_trap(() => invoke($1, `i64.load32_u`, [-2n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:264 +assert_trap(() => invoke($1, `i64.load32_u`, [-3n]), `out of bounds memory access`); + +// ./test/core/memory_trap64.wast:265 +assert_trap(() => invoke($1, `i64.load32_u`, [-4n]), `out of bounds memory access`); + +// Bug 1737225 - do not observe the partial store caused by bug 1666747 on +// some native platforms. +if (!partialOobWriteMayWritePartialData()) { + // ./test/core/memory_trap64.wast:268 + assert_return(() => invoke($1, `i64.load`, [65528n]), [ + value("i64", 7523094288207667809n), + ]); + + // ./test/core/memory_trap64.wast:269 + assert_return(() => invoke($1, `i64.load`, [0n]), [ + value("i64", 7523094288207667809n), + ]); +} diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/address0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/address0.wast.js new file mode 100644 index 0000000000..62b3c985d6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/address0.wast.js @@ -0,0 +1,392 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/address0.wast + +// ./test/core/multi-memory/address0.wast:3 +let $0 = instantiate(`(module + (memory $$mem0 0) + (memory $$mem1 1) + (data (memory $$mem1) (i32.const 0) "abcdefghijklmnopqrstuvwxyz") + + (func (export "8u_good1") (param $$i i32) (result i32) + (i32.load8_u $$mem1 offset=0 (local.get $$i)) ;; 97 'a' + ) + (func (export "8u_good2") (param $$i i32) (result i32) + (i32.load8_u $$mem1 align=1 (local.get $$i)) ;; 97 'a' + ) + (func (export "8u_good3") (param $$i i32) (result i32) + (i32.load8_u $$mem1 offset=1 align=1 (local.get $$i)) ;; 98 'b' + ) + (func (export "8u_good4") (param $$i i32) (result i32) + (i32.load8_u $$mem1 offset=2 align=1 (local.get $$i)) ;; 99 'c' + ) + (func (export "8u_good5") (param $$i i32) (result i32) + (i32.load8_u $$mem1 offset=25 align=1 (local.get $$i)) ;; 122 'z' + ) + + (func (export "8s_good1") (param $$i i32) (result i32) + (i32.load8_s $$mem1 offset=0 (local.get $$i)) ;; 97 'a' + ) + (func (export "8s_good2") (param $$i i32) (result i32) + (i32.load8_s $$mem1 align=1 (local.get $$i)) ;; 97 'a' + ) + (func (export "8s_good3") (param $$i i32) (result i32) + (i32.load8_s $$mem1 offset=1 align=1 (local.get $$i)) ;; 98 'b' + ) + (func (export "8s_good4") (param $$i i32) (result i32) + (i32.load8_s $$mem1 offset=2 align=1 (local.get $$i)) ;; 99 'c' + ) + (func (export "8s_good5") (param $$i i32) (result i32) + (i32.load8_s $$mem1 offset=25 align=1 (local.get $$i)) ;; 122 'z' + ) + + (func (export "16u_good1") (param $$i i32) (result i32) + (i32.load16_u $$mem1 offset=0 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16u_good2") (param $$i i32) (result i32) + (i32.load16_u $$mem1 align=1 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16u_good3") (param $$i i32) (result i32) + (i32.load16_u $$mem1 offset=1 align=1 (local.get $$i)) ;; 25442 'bc' + ) + (func (export "16u_good4") (param $$i i32) (result i32) + (i32.load16_u $$mem1 offset=2 align=2 (local.get $$i)) ;; 25699 'cd' + ) + (func (export "16u_good5") (param $$i i32) (result i32) + (i32.load16_u $$mem1 offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' + ) + + (func (export "16s_good1") (param $$i i32) (result i32) + (i32.load16_s $$mem1 offset=0 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16s_good2") (param $$i i32) (result i32) + (i32.load16_s $$mem1 align=1 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16s_good3") (param $$i i32) (result i32) + (i32.load16_s $$mem1 offset=1 align=1 (local.get $$i)) ;; 25442 'bc' + ) + (func (export "16s_good4") (param $$i i32) (result i32) + (i32.load16_s $$mem1 offset=2 align=2 (local.get $$i)) ;; 25699 'cd' + ) + (func (export "16s_good5") (param $$i i32) (result i32) + (i32.load16_s $$mem1 offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' + ) + + (func (export "32_good1") (param $$i i32) (result i32) + (i32.load $$mem1 offset=0 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32_good2") (param $$i i32) (result i32) + (i32.load $$mem1 align=1 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32_good3") (param $$i i32) (result i32) + (i32.load $$mem1 offset=1 align=1 (local.get $$i)) ;; 1701077858 'bcde' + ) + (func (export "32_good4") (param $$i i32) (result i32) + (i32.load $$mem1 offset=2 align=2 (local.get $$i)) ;; 1717920867 'cdef' + ) + (func (export "32_good5") (param $$i i32) (result i32) + (i32.load $$mem1 offset=25 align=4 (local.get $$i)) ;; 122 'z\\0\\0\\0' + ) + + (func (export "8u_bad") (param $$i i32) + (drop (i32.load8_u $$mem1 offset=4294967295 (local.get $$i))) + ) + (func (export "8s_bad") (param $$i i32) + (drop (i32.load8_s $$mem1 offset=4294967295 (local.get $$i))) + ) + (func (export "16u_bad") (param $$i i32) + (drop (i32.load16_u $$mem1 offset=4294967295 (local.get $$i))) + ) + (func (export "16s_bad") (param $$i i32) + (drop (i32.load16_s $$mem1 offset=4294967295 (local.get $$i))) + ) + (func (export "32_bad") (param $$i i32) + (drop (i32.load $$mem1 offset=4294967295 (local.get $$i))) + ) +)`); + +// ./test/core/multi-memory/address0.wast:105 +assert_return(() => invoke($0, `8u_good1`, [0]), [value("i32", 97)]); + +// ./test/core/multi-memory/address0.wast:106 +assert_return(() => invoke($0, `8u_good2`, [0]), [value("i32", 97)]); + +// ./test/core/multi-memory/address0.wast:107 +assert_return(() => invoke($0, `8u_good3`, [0]), [value("i32", 98)]); + +// ./test/core/multi-memory/address0.wast:108 +assert_return(() => invoke($0, `8u_good4`, [0]), [value("i32", 99)]); + +// ./test/core/multi-memory/address0.wast:109 +assert_return(() => invoke($0, `8u_good5`, [0]), [value("i32", 122)]); + +// ./test/core/multi-memory/address0.wast:111 +assert_return(() => invoke($0, `8s_good1`, [0]), [value("i32", 97)]); + +// ./test/core/multi-memory/address0.wast:112 +assert_return(() => invoke($0, `8s_good2`, [0]), [value("i32", 97)]); + +// ./test/core/multi-memory/address0.wast:113 +assert_return(() => invoke($0, `8s_good3`, [0]), [value("i32", 98)]); + +// ./test/core/multi-memory/address0.wast:114 +assert_return(() => invoke($0, `8s_good4`, [0]), [value("i32", 99)]); + +// ./test/core/multi-memory/address0.wast:115 +assert_return(() => invoke($0, `8s_good5`, [0]), [value("i32", 122)]); + +// ./test/core/multi-memory/address0.wast:117 +assert_return(() => invoke($0, `16u_good1`, [0]), [value("i32", 25185)]); + +// ./test/core/multi-memory/address0.wast:118 +assert_return(() => invoke($0, `16u_good2`, [0]), [value("i32", 25185)]); + +// ./test/core/multi-memory/address0.wast:119 +assert_return(() => invoke($0, `16u_good3`, [0]), [value("i32", 25442)]); + +// ./test/core/multi-memory/address0.wast:120 +assert_return(() => invoke($0, `16u_good4`, [0]), [value("i32", 25699)]); + +// ./test/core/multi-memory/address0.wast:121 +assert_return(() => invoke($0, `16u_good5`, [0]), [value("i32", 122)]); + +// ./test/core/multi-memory/address0.wast:123 +assert_return(() => invoke($0, `16s_good1`, [0]), [value("i32", 25185)]); + +// ./test/core/multi-memory/address0.wast:124 +assert_return(() => invoke($0, `16s_good2`, [0]), [value("i32", 25185)]); + +// ./test/core/multi-memory/address0.wast:125 +assert_return(() => invoke($0, `16s_good3`, [0]), [value("i32", 25442)]); + +// ./test/core/multi-memory/address0.wast:126 +assert_return(() => invoke($0, `16s_good4`, [0]), [value("i32", 25699)]); + +// ./test/core/multi-memory/address0.wast:127 +assert_return(() => invoke($0, `16s_good5`, [0]), [value("i32", 122)]); + +// ./test/core/multi-memory/address0.wast:129 +assert_return(() => invoke($0, `32_good1`, [0]), [value("i32", 1684234849)]); + +// ./test/core/multi-memory/address0.wast:130 +assert_return(() => invoke($0, `32_good2`, [0]), [value("i32", 1684234849)]); + +// ./test/core/multi-memory/address0.wast:131 +assert_return(() => invoke($0, `32_good3`, [0]), [value("i32", 1701077858)]); + +// ./test/core/multi-memory/address0.wast:132 +assert_return(() => invoke($0, `32_good4`, [0]), [value("i32", 1717920867)]); + +// ./test/core/multi-memory/address0.wast:133 +assert_return(() => invoke($0, `32_good5`, [0]), [value("i32", 122)]); + +// ./test/core/multi-memory/address0.wast:135 +assert_return(() => invoke($0, `8u_good1`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:136 +assert_return(() => invoke($0, `8u_good2`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:137 +assert_return(() => invoke($0, `8u_good3`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:138 +assert_return(() => invoke($0, `8u_good4`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:139 +assert_return(() => invoke($0, `8u_good5`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:141 +assert_return(() => invoke($0, `8s_good1`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:142 +assert_return(() => invoke($0, `8s_good2`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:143 +assert_return(() => invoke($0, `8s_good3`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:144 +assert_return(() => invoke($0, `8s_good4`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:145 +assert_return(() => invoke($0, `8s_good5`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:147 +assert_return(() => invoke($0, `16u_good1`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:148 +assert_return(() => invoke($0, `16u_good2`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:149 +assert_return(() => invoke($0, `16u_good3`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:150 +assert_return(() => invoke($0, `16u_good4`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:151 +assert_return(() => invoke($0, `16u_good5`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:153 +assert_return(() => invoke($0, `16s_good1`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:154 +assert_return(() => invoke($0, `16s_good2`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:155 +assert_return(() => invoke($0, `16s_good3`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:156 +assert_return(() => invoke($0, `16s_good4`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:157 +assert_return(() => invoke($0, `16s_good5`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:159 +assert_return(() => invoke($0, `32_good1`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:160 +assert_return(() => invoke($0, `32_good2`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:161 +assert_return(() => invoke($0, `32_good3`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:162 +assert_return(() => invoke($0, `32_good4`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:163 +assert_return(() => invoke($0, `32_good5`, [65507]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:165 +assert_return(() => invoke($0, `8u_good1`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:166 +assert_return(() => invoke($0, `8u_good2`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:167 +assert_return(() => invoke($0, `8u_good3`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:168 +assert_return(() => invoke($0, `8u_good4`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:169 +assert_return(() => invoke($0, `8u_good5`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:171 +assert_return(() => invoke($0, `8s_good1`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:172 +assert_return(() => invoke($0, `8s_good2`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:173 +assert_return(() => invoke($0, `8s_good3`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:174 +assert_return(() => invoke($0, `8s_good4`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:175 +assert_return(() => invoke($0, `8s_good5`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:177 +assert_return(() => invoke($0, `16u_good1`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:178 +assert_return(() => invoke($0, `16u_good2`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:179 +assert_return(() => invoke($0, `16u_good3`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:180 +assert_return(() => invoke($0, `16u_good4`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:181 +assert_return(() => invoke($0, `16u_good5`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:183 +assert_return(() => invoke($0, `16s_good1`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:184 +assert_return(() => invoke($0, `16s_good2`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:185 +assert_return(() => invoke($0, `16s_good3`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:186 +assert_return(() => invoke($0, `16s_good4`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:187 +assert_return(() => invoke($0, `16s_good5`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:189 +assert_return(() => invoke($0, `32_good1`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:190 +assert_return(() => invoke($0, `32_good2`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:191 +assert_return(() => invoke($0, `32_good3`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:192 +assert_return(() => invoke($0, `32_good4`, [65508]), [value("i32", 0)]); + +// ./test/core/multi-memory/address0.wast:193 +assert_trap(() => invoke($0, `32_good5`, [65508]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:195 +assert_trap(() => invoke($0, `8u_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:196 +assert_trap(() => invoke($0, `8s_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:197 +assert_trap(() => invoke($0, `16u_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:198 +assert_trap(() => invoke($0, `16s_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:199 +assert_trap(() => invoke($0, `32_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:200 +assert_trap(() => invoke($0, `32_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:202 +assert_trap(() => invoke($0, `8u_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:203 +assert_trap(() => invoke($0, `8s_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:204 +assert_trap(() => invoke($0, `16u_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:205 +assert_trap(() => invoke($0, `16s_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:206 +assert_trap(() => invoke($0, `32_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:208 +assert_trap(() => invoke($0, `8u_bad`, [1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:209 +assert_trap(() => invoke($0, `8s_bad`, [1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:210 +assert_trap(() => invoke($0, `16u_bad`, [1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:211 +assert_trap(() => invoke($0, `16s_bad`, [1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address0.wast:212 +assert_trap(() => invoke($0, `32_bad`, [1]), `out of bounds memory access`); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/address1.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/address1.wast.js new file mode 100644 index 0000000000..602de2a5ce --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/address1.wast.js @@ -0,0 +1,538 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/address1.wast + +// ./test/core/multi-memory/address1.wast:3 +let $0 = instantiate(`(module + (memory $$mem0 0) + (memory $$mem1 0) + (memory $$mem2 0) + (memory $$mem3 0) + (memory $$mem4 1) + (data (memory $$mem4) (i32.const 0) "abcdefghijklmnopqrstuvwxyz") + + (func (export "8u_good1") (param $$i i32) (result i64) + (i64.load8_u $$mem4 offset=0 (local.get $$i)) ;; 97 'a' + ) + (func (export "8u_good2") (param $$i i32) (result i64) + (i64.load8_u $$mem4 align=1 (local.get $$i)) ;; 97 'a' + ) + (func (export "8u_good3") (param $$i i32) (result i64) + (i64.load8_u $$mem4 offset=1 align=1 (local.get $$i)) ;; 98 'b' + ) + (func (export "8u_good4") (param $$i i32) (result i64) + (i64.load8_u $$mem4 offset=2 align=1 (local.get $$i)) ;; 99 'c' + ) + (func (export "8u_good5") (param $$i i32) (result i64) + (i64.load8_u $$mem4 offset=25 align=1 (local.get $$i)) ;; 122 'z' + ) + + (func (export "8s_good1") (param $$i i32) (result i64) + (i64.load8_s $$mem4 offset=0 (local.get $$i)) ;; 97 'a' + ) + (func (export "8s_good2") (param $$i i32) (result i64) + (i64.load8_s $$mem4 align=1 (local.get $$i)) ;; 97 'a' + ) + (func (export "8s_good3") (param $$i i32) (result i64) + (i64.load8_s $$mem4 offset=1 align=1 (local.get $$i)) ;; 98 'b' + ) + (func (export "8s_good4") (param $$i i32) (result i64) + (i64.load8_s $$mem4 offset=2 align=1 (local.get $$i)) ;; 99 'c' + ) + (func (export "8s_good5") (param $$i i32) (result i64) + (i64.load8_s $$mem4 offset=25 align=1 (local.get $$i)) ;; 122 'z' + ) + + (func (export "16u_good1") (param $$i i32) (result i64) + (i64.load16_u $$mem4 offset=0 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16u_good2") (param $$i i32) (result i64) + (i64.load16_u $$mem4 align=1 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16u_good3") (param $$i i32) (result i64) + (i64.load16_u $$mem4 offset=1 align=1 (local.get $$i)) ;; 25442 'bc' + ) + (func (export "16u_good4") (param $$i i32) (result i64) + (i64.load16_u $$mem4 offset=2 align=2 (local.get $$i)) ;; 25699 'cd' + ) + (func (export "16u_good5") (param $$i i32) (result i64) + (i64.load16_u $$mem4 offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' + ) + + (func (export "16s_good1") (param $$i i32) (result i64) + (i64.load16_s $$mem4 offset=0 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16s_good2") (param $$i i32) (result i64) + (i64.load16_s $$mem4 align=1 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16s_good3") (param $$i i32) (result i64) + (i64.load16_s $$mem4 offset=1 align=1 (local.get $$i)) ;; 25442 'bc' + ) + (func (export "16s_good4") (param $$i i32) (result i64) + (i64.load16_s $$mem4 offset=2 align=2 (local.get $$i)) ;; 25699 'cd' + ) + (func (export "16s_good5") (param $$i i32) (result i64) + (i64.load16_s $$mem4 offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' + ) + + (func (export "32u_good1") (param $$i i32) (result i64) + (i64.load32_u $$mem4 offset=0 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32u_good2") (param $$i i32) (result i64) + (i64.load32_u $$mem4 align=1 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32u_good3") (param $$i i32) (result i64) + (i64.load32_u $$mem4 offset=1 align=1 (local.get $$i)) ;; 1701077858 'bcde' + ) + (func (export "32u_good4") (param $$i i32) (result i64) + (i64.load32_u $$mem4 offset=2 align=2 (local.get $$i)) ;; 1717920867 'cdef' + ) + (func (export "32u_good5") (param $$i i32) (result i64) + (i64.load32_u $$mem4 offset=25 align=4 (local.get $$i)) ;; 122 'z\\0\\0\\0' + ) + + (func (export "32s_good1") (param $$i i32) (result i64) + (i64.load32_s $$mem4 offset=0 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32s_good2") (param $$i i32) (result i64) + (i64.load32_s $$mem4 align=1 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32s_good3") (param $$i i32) (result i64) + (i64.load32_s $$mem4 offset=1 align=1 (local.get $$i)) ;; 1701077858 'bcde' + ) + (func (export "32s_good4") (param $$i i32) (result i64) + (i64.load32_s $$mem4 offset=2 align=2 (local.get $$i)) ;; 1717920867 'cdef' + ) + (func (export "32s_good5") (param $$i i32) (result i64) + (i64.load32_s $$mem4 offset=25 align=4 (local.get $$i)) ;; 122 'z\\0\\0\\0' + ) + + (func (export "64_good1") (param $$i i32) (result i64) + (i64.load $$mem4 offset=0 (local.get $$i)) ;; 0x6867666564636261 'abcdefgh' + ) + (func (export "64_good2") (param $$i i32) (result i64) + (i64.load $$mem4 align=1 (local.get $$i)) ;; 0x6867666564636261 'abcdefgh' + ) + (func (export "64_good3") (param $$i i32) (result i64) + (i64.load $$mem4 offset=1 align=1 (local.get $$i)) ;; 0x6968676665646362 'bcdefghi' + ) + (func (export "64_good4") (param $$i i32) (result i64) + (i64.load $$mem4 offset=2 align=2 (local.get $$i)) ;; 0x6a69686766656463 'cdefghij' + ) + (func (export "64_good5") (param $$i i32) (result i64) + (i64.load $$mem4 offset=25 align=8 (local.get $$i)) ;; 122 'z\\0\\0\\0\\0\\0\\0\\0' + ) + + (func (export "8u_bad") (param $$i i32) + (drop (i64.load8_u $$mem4 offset=4294967295 (local.get $$i))) + ) + (func (export "8s_bad") (param $$i i32) + (drop (i64.load8_s $$mem4 offset=4294967295 (local.get $$i))) + ) + (func (export "16u_bad") (param $$i i32) + (drop (i64.load16_u $$mem4 offset=4294967295 (local.get $$i))) + ) + (func (export "16s_bad") (param $$i i32) + (drop (i64.load16_s $$mem4 offset=4294967295 (local.get $$i))) + ) + (func (export "32u_bad") (param $$i i32) + (drop (i64.load32_u $$mem4 offset=4294967295 (local.get $$i))) + ) + (func (export "32s_bad") (param $$i i32) + (drop (i64.load32_s $$mem4 offset=4294967295 (local.get $$i))) + ) + (func (export "64_bad") (param $$i i32) + (drop (i64.load $$mem4 offset=4294967295 (local.get $$i))) + ) +)`); + +// ./test/core/multi-memory/address1.wast:146 +assert_return(() => invoke($0, `8u_good1`, [0]), [value("i64", 97n)]); + +// ./test/core/multi-memory/address1.wast:147 +assert_return(() => invoke($0, `8u_good2`, [0]), [value("i64", 97n)]); + +// ./test/core/multi-memory/address1.wast:148 +assert_return(() => invoke($0, `8u_good3`, [0]), [value("i64", 98n)]); + +// ./test/core/multi-memory/address1.wast:149 +assert_return(() => invoke($0, `8u_good4`, [0]), [value("i64", 99n)]); + +// ./test/core/multi-memory/address1.wast:150 +assert_return(() => invoke($0, `8u_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/multi-memory/address1.wast:152 +assert_return(() => invoke($0, `8s_good1`, [0]), [value("i64", 97n)]); + +// ./test/core/multi-memory/address1.wast:153 +assert_return(() => invoke($0, `8s_good2`, [0]), [value("i64", 97n)]); + +// ./test/core/multi-memory/address1.wast:154 +assert_return(() => invoke($0, `8s_good3`, [0]), [value("i64", 98n)]); + +// ./test/core/multi-memory/address1.wast:155 +assert_return(() => invoke($0, `8s_good4`, [0]), [value("i64", 99n)]); + +// ./test/core/multi-memory/address1.wast:156 +assert_return(() => invoke($0, `8s_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/multi-memory/address1.wast:158 +assert_return(() => invoke($0, `16u_good1`, [0]), [value("i64", 25185n)]); + +// ./test/core/multi-memory/address1.wast:159 +assert_return(() => invoke($0, `16u_good2`, [0]), [value("i64", 25185n)]); + +// ./test/core/multi-memory/address1.wast:160 +assert_return(() => invoke($0, `16u_good3`, [0]), [value("i64", 25442n)]); + +// ./test/core/multi-memory/address1.wast:161 +assert_return(() => invoke($0, `16u_good4`, [0]), [value("i64", 25699n)]); + +// ./test/core/multi-memory/address1.wast:162 +assert_return(() => invoke($0, `16u_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/multi-memory/address1.wast:164 +assert_return(() => invoke($0, `16s_good1`, [0]), [value("i64", 25185n)]); + +// ./test/core/multi-memory/address1.wast:165 +assert_return(() => invoke($0, `16s_good2`, [0]), [value("i64", 25185n)]); + +// ./test/core/multi-memory/address1.wast:166 +assert_return(() => invoke($0, `16s_good3`, [0]), [value("i64", 25442n)]); + +// ./test/core/multi-memory/address1.wast:167 +assert_return(() => invoke($0, `16s_good4`, [0]), [value("i64", 25699n)]); + +// ./test/core/multi-memory/address1.wast:168 +assert_return(() => invoke($0, `16s_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/multi-memory/address1.wast:170 +assert_return(() => invoke($0, `32u_good1`, [0]), [value("i64", 1684234849n)]); + +// ./test/core/multi-memory/address1.wast:171 +assert_return(() => invoke($0, `32u_good2`, [0]), [value("i64", 1684234849n)]); + +// ./test/core/multi-memory/address1.wast:172 +assert_return(() => invoke($0, `32u_good3`, [0]), [value("i64", 1701077858n)]); + +// ./test/core/multi-memory/address1.wast:173 +assert_return(() => invoke($0, `32u_good4`, [0]), [value("i64", 1717920867n)]); + +// ./test/core/multi-memory/address1.wast:174 +assert_return(() => invoke($0, `32u_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/multi-memory/address1.wast:176 +assert_return(() => invoke($0, `32s_good1`, [0]), [value("i64", 1684234849n)]); + +// ./test/core/multi-memory/address1.wast:177 +assert_return(() => invoke($0, `32s_good2`, [0]), [value("i64", 1684234849n)]); + +// ./test/core/multi-memory/address1.wast:178 +assert_return(() => invoke($0, `32s_good3`, [0]), [value("i64", 1701077858n)]); + +// ./test/core/multi-memory/address1.wast:179 +assert_return(() => invoke($0, `32s_good4`, [0]), [value("i64", 1717920867n)]); + +// ./test/core/multi-memory/address1.wast:180 +assert_return(() => invoke($0, `32s_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/multi-memory/address1.wast:182 +assert_return(() => invoke($0, `64_good1`, [0]), [value("i64", 7523094288207667809n)]); + +// ./test/core/multi-memory/address1.wast:183 +assert_return(() => invoke($0, `64_good2`, [0]), [value("i64", 7523094288207667809n)]); + +// ./test/core/multi-memory/address1.wast:184 +assert_return(() => invoke($0, `64_good3`, [0]), [value("i64", 7595434461045744482n)]); + +// ./test/core/multi-memory/address1.wast:185 +assert_return(() => invoke($0, `64_good4`, [0]), [value("i64", 7667774633883821155n)]); + +// ./test/core/multi-memory/address1.wast:186 +assert_return(() => invoke($0, `64_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/multi-memory/address1.wast:188 +assert_return(() => invoke($0, `8u_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:189 +assert_return(() => invoke($0, `8u_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:190 +assert_return(() => invoke($0, `8u_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:191 +assert_return(() => invoke($0, `8u_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:192 +assert_return(() => invoke($0, `8u_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:194 +assert_return(() => invoke($0, `8s_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:195 +assert_return(() => invoke($0, `8s_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:196 +assert_return(() => invoke($0, `8s_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:197 +assert_return(() => invoke($0, `8s_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:198 +assert_return(() => invoke($0, `8s_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:200 +assert_return(() => invoke($0, `16u_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:201 +assert_return(() => invoke($0, `16u_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:202 +assert_return(() => invoke($0, `16u_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:203 +assert_return(() => invoke($0, `16u_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:204 +assert_return(() => invoke($0, `16u_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:206 +assert_return(() => invoke($0, `16s_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:207 +assert_return(() => invoke($0, `16s_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:208 +assert_return(() => invoke($0, `16s_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:209 +assert_return(() => invoke($0, `16s_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:210 +assert_return(() => invoke($0, `16s_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:212 +assert_return(() => invoke($0, `32u_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:213 +assert_return(() => invoke($0, `32u_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:214 +assert_return(() => invoke($0, `32u_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:215 +assert_return(() => invoke($0, `32u_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:216 +assert_return(() => invoke($0, `32u_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:218 +assert_return(() => invoke($0, `32s_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:219 +assert_return(() => invoke($0, `32s_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:220 +assert_return(() => invoke($0, `32s_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:221 +assert_return(() => invoke($0, `32s_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:222 +assert_return(() => invoke($0, `32s_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:224 +assert_return(() => invoke($0, `64_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:225 +assert_return(() => invoke($0, `64_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:226 +assert_return(() => invoke($0, `64_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:227 +assert_return(() => invoke($0, `64_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:228 +assert_return(() => invoke($0, `64_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:230 +assert_return(() => invoke($0, `8u_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:231 +assert_return(() => invoke($0, `8u_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:232 +assert_return(() => invoke($0, `8u_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:233 +assert_return(() => invoke($0, `8u_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:234 +assert_return(() => invoke($0, `8u_good5`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:236 +assert_return(() => invoke($0, `8s_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:237 +assert_return(() => invoke($0, `8s_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:238 +assert_return(() => invoke($0, `8s_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:239 +assert_return(() => invoke($0, `8s_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:240 +assert_return(() => invoke($0, `8s_good5`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:242 +assert_return(() => invoke($0, `16u_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:243 +assert_return(() => invoke($0, `16u_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:244 +assert_return(() => invoke($0, `16u_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:245 +assert_return(() => invoke($0, `16u_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:246 +assert_return(() => invoke($0, `16u_good5`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:248 +assert_return(() => invoke($0, `16s_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:249 +assert_return(() => invoke($0, `16s_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:250 +assert_return(() => invoke($0, `16s_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:251 +assert_return(() => invoke($0, `16s_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:252 +assert_return(() => invoke($0, `16s_good5`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:254 +assert_return(() => invoke($0, `32u_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:255 +assert_return(() => invoke($0, `32u_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:256 +assert_return(() => invoke($0, `32u_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:257 +assert_return(() => invoke($0, `32u_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:258 +assert_return(() => invoke($0, `32u_good5`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:260 +assert_return(() => invoke($0, `32s_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:261 +assert_return(() => invoke($0, `32s_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:262 +assert_return(() => invoke($0, `32s_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:263 +assert_return(() => invoke($0, `32s_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:264 +assert_return(() => invoke($0, `32s_good5`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:266 +assert_return(() => invoke($0, `64_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:267 +assert_return(() => invoke($0, `64_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:268 +assert_return(() => invoke($0, `64_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:269 +assert_return(() => invoke($0, `64_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/multi-memory/address1.wast:270 +assert_trap(() => invoke($0, `64_good5`, [65504]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:272 +assert_trap(() => invoke($0, `8u_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:273 +assert_trap(() => invoke($0, `8s_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:274 +assert_trap(() => invoke($0, `16u_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:275 +assert_trap(() => invoke($0, `16s_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:276 +assert_trap(() => invoke($0, `32u_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:277 +assert_trap(() => invoke($0, `32s_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:278 +assert_trap(() => invoke($0, `64_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:280 +assert_trap(() => invoke($0, `8u_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:281 +assert_trap(() => invoke($0, `8s_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:282 +assert_trap(() => invoke($0, `16u_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:283 +assert_trap(() => invoke($0, `16s_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:284 +assert_trap(() => invoke($0, `32u_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:285 +assert_trap(() => invoke($0, `32s_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:286 +assert_trap(() => invoke($0, `64_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:288 +assert_trap(() => invoke($0, `8u_bad`, [1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:289 +assert_trap(() => invoke($0, `8s_bad`, [1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:290 +assert_trap(() => invoke($0, `16u_bad`, [1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:291 +assert_trap(() => invoke($0, `16s_bad`, [1]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:292 +assert_trap(() => invoke($0, `32u_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:293 +assert_trap(() => invoke($0, `32s_bad`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/address1.wast:294 +assert_trap(() => invoke($0, `64_bad`, [1]), `out of bounds memory access`); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/align0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/align0.wast.js new file mode 100644 index 0000000000..bafbd476e2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/align0.wast.js @@ -0,0 +1,65 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/align0.wast + +// ./test/core/multi-memory/align0.wast:3 +let $0 = instantiate(`(module + (memory $$mem0 0) + (memory $$mem1 1) + (memory $$mem2 0) + + ;; $$default: natural alignment, $$1: align=1, $$2: align=2, $$4: align=4, $$8: align=8 + + (func (export "f32_align_switch") (param i32) (result f32) + (local f32 f32) + (local.set 1 (f32.const 10.0)) + (block $$4 + (block $$2 + (block $$1 + (block $$default + (block $$0 + (br_table $$0 $$default $$1 $$2 $$4 (local.get 0)) + ) ;; 0 + (f32.store $$mem1 (i32.const 0) (local.get 1)) + (local.set 2 (f32.load $$mem1 (i32.const 0))) + (br $$4) + ) ;; default + (f32.store $$mem1 align=1 (i32.const 0) (local.get 1)) + (local.set 2 (f32.load $$mem1 align=1 (i32.const 0))) + (br $$4) + ) ;; 1 + (f32.store $$mem1 align=2 (i32.const 0) (local.get 1)) + (local.set 2 (f32.load $$mem1 align=2 (i32.const 0))) + (br $$4) + ) ;; 2 + (f32.store $$mem1 align=4 (i32.const 0) (local.get 1)) + (local.set 2 (f32.load $$mem1 align=4 (i32.const 0))) + ) ;; 4 + (local.get 2) + ) +)`); + +// ./test/core/multi-memory/align0.wast:39 +assert_return(() => invoke($0, `f32_align_switch`, [0]), [value("f32", 10)]); + +// ./test/core/multi-memory/align0.wast:40 +assert_return(() => invoke($0, `f32_align_switch`, [1]), [value("f32", 10)]); + +// ./test/core/multi-memory/align0.wast:41 +assert_return(() => invoke($0, `f32_align_switch`, [2]), [value("f32", 10)]); + +// ./test/core/multi-memory/align0.wast:42 +assert_return(() => invoke($0, `f32_align_switch`, [3]), [value("f32", 10)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/binary0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/binary0.wast.js new file mode 100644 index 0000000000..db6f0bd879 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/binary0.wast.js @@ -0,0 +1,88 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/binary0.wast + +// ./test/core/multi-memory/binary0.wast:2 +let $0 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\05\\07\\02" ;; Memory section with 2 entries + "\\00\\82\\00" ;; no max, minimum 2 + "\\00\\82\\00" ;; no max, minimum 2 +)`); + +// ./test/core/multi-memory/binary0.wast:8 +let $1 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\05\\13\\03" ;; Memory section with 3 entries + "\\00\\83\\80\\80\\80\\00" ;; no max, minimum 3 + "\\00\\84\\80\\80\\80\\00" ;; no max, minimum 4 + "\\00\\85\\80\\80\\80\\00" ;; no max, minimum 5 +)`); + +// ./test/core/multi-memory/binary0.wast:16 +let $2 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\05\\05\\02" ;; Memory section with 2 entries + "\\00\\00" ;; no max, minimum 0 + "\\00\\00" ;; no max, minimum 0 + "\\0b\\06\\01" ;; Data section with 1 entry + "\\00" ;; Memory index 0 + "\\41\\00\\0b\\00" ;; (i32.const 0) with contents "" +)`); + +// ./test/core/multi-memory/binary0.wast:26 +let $3 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\05\\05\\02" ;; Memory section with 2 entries + "\\00\\00" ;; no max, minimum 0 + "\\00\\01" ;; no max, minimum 1 + "\\0b\\07\\01" ;; Data section with 1 entry + "\\02\\01" ;; Memory index 1 + "\\41\\00\\0b\\00" ;; (i32.const 0) with contents "" +)`); + +// ./test/core/multi-memory/binary0.wast:36 +let $4 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\05\\05\\02" ;; Memory section with 2 entries + "\\00\\00" ;; no max, minimum 0 + "\\00\\01" ;; no max, minimum 1 + "\\0b\\0a\\01" ;; Data section with 1 entry + "\\02\\81\\80\\80\\00" ;; Memory index 1 + "\\41\\00\\0b\\00" ;; (i32.const 0) with contents "" +)`); + +// ./test/core/multi-memory/binary0.wast:47 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\05\\0a\\02" ;; Memory section with 2 entries + "\\00\\01" ;; no max, minimum 1 + "\\00\\82\\80\\80\\80\\80\\00" ;; no max, minimum 2 with one byte too many + )`), + `integer representation too long`, +); + +// ./test/core/multi-memory/binary0.wast:58 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\05\\03\\02" ;; memory section with inconsistent count (1 declared, 0 given) + "\\00\\00" ;; memory 0 (missed) + ;; "\\00\\00" ;; memory 1 (missing) + )`), + `unexpected end of section or function`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/data0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/data0.wast.js new file mode 100644 index 0000000000..5fa85e426c --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/data0.wast.js @@ -0,0 +1,93 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/data0.wast + +// ./test/core/multi-memory/data0.wast:5 +let $0 = instantiate(`(module + (memory $$mem0 1) + (memory $$mem1 1) + (memory $$mem2 1) + + (data (i32.const 0)) + (data (i32.const 1) "a" "" "bcd") + (data (offset (i32.const 0))) + (data (offset (i32.const 0)) "" "a" "bc" "") + (data (memory 0) (i32.const 0)) + (data (memory 0x0) (i32.const 1) "a" "" "bcd") + (data (memory 0x000) (offset (i32.const 0))) + (data (memory 0) (offset (i32.const 0)) "" "a" "bc" "") + (data (memory $$mem0) (i32.const 0)) + (data (memory $$mem1) (i32.const 1) "a" "" "bcd") + (data (memory $$mem2) (offset (i32.const 0))) + (data (memory $$mem0) (offset (i32.const 0)) "" "a" "bc" "") + + (data $$d1 (i32.const 0)) + (data $$d2 (i32.const 1) "a" "" "bcd") + (data $$d3 (offset (i32.const 0))) + (data $$d4 (offset (i32.const 0)) "" "a" "bc" "") + (data $$d5 (memory 0) (i32.const 0)) + (data $$d6 (memory 0x0) (i32.const 1) "a" "" "bcd") + (data $$d7 (memory 0x000) (offset (i32.const 0))) + (data $$d8 (memory 0) (offset (i32.const 0)) "" "a" "bc" "") + (data $$d9 (memory $$mem0) (i32.const 0)) + (data $$d10 (memory $$mem1) (i32.const 1) "a" "" "bcd") + (data $$d11 (memory $$mem2) (offset (i32.const 0))) + (data $$d12 (memory $$mem0) (offset (i32.const 0)) "" "a" "bc" "") +)`); + +// ./test/core/multi-memory/data0.wast:39 +let $1 = instantiate(`(module + (memory 1) + (data (i32.const 0) "a") +)`); + +// ./test/core/multi-memory/data0.wast:43 +let $2 = instantiate(`(module + (import "spectest" "memory" (memory 1)) + (import "spectest" "memory" (memory 1)) + (import "spectest" "memory" (memory 1)) + (data (memory 0) (i32.const 0) "a") + (data (memory 1) (i32.const 0) "a") + (data (memory 2) (i32.const 0) "a") +)`); + +// ./test/core/multi-memory/data0.wast:52 +let $3 = instantiate(`(module + (global (import "spectest" "global_i32") i32) + (memory 1) + (data (global.get 0) "a") +)`); + +// ./test/core/multi-memory/data0.wast:57 +let $4 = instantiate(`(module + (global (import "spectest" "global_i32") i32) + (import "spectest" "memory" (memory 1)) + (data (global.get 0) "a") +)`); + +// ./test/core/multi-memory/data0.wast:63 +let $5 = instantiate(`(module + (global $$g (import "spectest" "global_i32") i32) + (memory 1) + (data (global.get $$g) "a") +)`); + +// ./test/core/multi-memory/data0.wast:68 +let $6 = instantiate(`(module + (global $$g (import "spectest" "global_i32") i32) + (import "spectest" "memory" (memory 1)) + (data (global.get $$g) "a") +)`); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/data1.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/data1.wast.js new file mode 100644 index 0000000000..953cc7c729 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/data1.wast.js @@ -0,0 +1,170 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/data1.wast + +// ./test/core/multi-memory/data1.wast:3 +assert_trap( + () => instantiate(`(module + (memory 1) + (memory 0) + (memory 2) + (data (memory 1) (i32.const 0) "a") + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:13 +assert_trap( + () => instantiate(`(module + (memory 1 1) + (memory 1 1) + (memory 0 0) + (data (memory 2) (i32.const 0) "a") + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:23 +assert_trap( + () => instantiate(`(module + (memory 1 1) + (memory 0 1) + (memory 1 1) + (data (memory 1) (i32.const 0) "a") + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:32 +assert_trap( + () => instantiate(`(module + (memory 1) + (memory 1) + (memory 0) + (data (memory 2) (i32.const 1)) + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:41 +assert_trap( + () => instantiate(`(module + (memory 1 1) + (memory 1 1) + (memory 0 1) + (data (memory 2) (i32.const 1)) + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:60 +assert_trap( + () => instantiate(`(module + (global (import "spectest" "global_i32") i32) + (memory 3) + (memory 0) + (memory 3) + (data (memory 1) (global.get 0) "a") + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:71 +assert_trap( + () => instantiate(`(module + (memory 2 2) + (memory 1 2) + (memory 2 2) + (data (memory 1) (i32.const 0x1_0000) "a") + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:80 +assert_trap( + () => instantiate(`(module + (import "spectest" "memory" (memory 1)) + (data (i32.const 0x1_0000) "a") + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:88 +assert_trap( + () => instantiate(`(module + (memory 3) + (memory 3) + (memory 2) + (data (memory 2) (i32.const 0x2_0000) "a") + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:98 +assert_trap( + () => instantiate(`(module + (memory 3 3) + (memory 2 3) + (memory 3 3) + (data (memory 1) (i32.const 0x2_0000) "a") + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:108 +assert_trap( + () => instantiate(`(module + (memory 0) + (memory 0) + (memory 1) + (data (memory 2) (i32.const -1) "a") + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:117 +assert_trap( + () => instantiate(`(module + (import "spectest" "memory" (memory 1)) + (import "spectest" "memory" (memory 1)) + (import "spectest" "memory" (memory 1)) + (data (memory 2) (i32.const -1) "a") + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:127 +assert_trap( + () => instantiate(`(module + (memory 2) + (memory 2) + (memory 2) + (data (memory 2) (i32.const -100) "a") + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/data1.wast:136 +assert_trap( + () => instantiate(`(module + (import "spectest" "memory" (memory 1)) + (import "spectest" "memory" (memory 1)) + (import "spectest" "memory" (memory 1)) + (import "spectest" "memory" (memory 1)) + (data (memory 3) (i32.const -100) "a") + )`), + `out of bounds memory access`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/data_drop0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/data_drop0.wast.js new file mode 100644 index 0000000000..7e0b28f4ac --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/data_drop0.wast.js @@ -0,0 +1,63 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/data_drop0.wast + +// ./test/core/multi-memory/data_drop0.wast:2 +let $0 = instantiate(`(module + (memory $$mem0 0) + (memory $$mem1 1) + (memory $$mem2 0) + (data $$p "x") + (data $$a (memory 1) (i32.const 0) "x") + + (func (export "drop_passive") (data.drop $$p)) + (func (export "init_passive") (param $$len i32) + (memory.init $$mem1 $$p (i32.const 0) (i32.const 0) (local.get $$len))) + + (func (export "drop_active") (data.drop $$a)) + (func (export "init_active") (param $$len i32) + (memory.init $$mem1 $$a (i32.const 0) (i32.const 0) (local.get $$len))) +)`); + +// ./test/core/multi-memory/data_drop0.wast:18 +invoke($0, `init_passive`, [1]); + +// ./test/core/multi-memory/data_drop0.wast:19 +invoke($0, `drop_passive`, []); + +// ./test/core/multi-memory/data_drop0.wast:20 +invoke($0, `drop_passive`, []); + +// ./test/core/multi-memory/data_drop0.wast:21 +assert_return(() => invoke($0, `init_passive`, [0]), []); + +// ./test/core/multi-memory/data_drop0.wast:22 +assert_trap(() => invoke($0, `init_passive`, [1]), `out of bounds memory access`); + +// ./test/core/multi-memory/data_drop0.wast:23 +invoke($0, `init_passive`, [0]); + +// ./test/core/multi-memory/data_drop0.wast:24 +invoke($0, `drop_active`, []); + +// ./test/core/multi-memory/data_drop0.wast:25 +assert_return(() => invoke($0, `init_active`, [0]), []); + +// ./test/core/multi-memory/data_drop0.wast:26 +assert_trap(() => invoke($0, `init_active`, [1]), `out of bounds memory access`); + +// ./test/core/multi-memory/data_drop0.wast:27 +invoke($0, `init_active`, [0]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/directives.txt b/js/src/jit-test/tests/wasm/spec/multi-memory/directives.txt new file mode 100644 index 0000000000..9211583549 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-multi-memory; skip-if: !wasmMultiMemoryEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/exports0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/exports0.wast.js new file mode 100644 index 0000000000..2d94a23440 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/exports0.wast.js @@ -0,0 +1,78 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/exports0.wast + +// ./test/core/multi-memory/exports0.wast:3 +let $0 = instantiate(`(module (memory 0) (export "a" (memory 0)))`); + +// ./test/core/multi-memory/exports0.wast:4 +let $1 = instantiate(`(module (memory 0) (export "a" (memory 0)) (export "b" (memory 0)))`); + +// ./test/core/multi-memory/exports0.wast:5 +let $2 = instantiate(`(module (memory 0) (memory 0) (export "a" (memory 0)) (export "b" (memory 1)))`); + +// ./test/core/multi-memory/exports0.wast:6 +let $3 = instantiate(`(module + (memory $$mem0 0) + (memory $$mem1 0) + (memory $$mem2 0) + (memory $$mem3 0) + (memory $$mem4 0) + (memory $$mem5 0) + (memory $$mem6 0) + + (export "a" (memory $$mem0)) + (export "b" (memory $$mem1)) + (export "ac" (memory $$mem2)) + (export "bc" (memory $$mem3)) + (export "ad" (memory $$mem4)) + (export "bd" (memory $$mem5)) + (export "be" (memory $$mem6)) + + (export "za" (memory $$mem0)) + (export "zb" (memory $$mem1)) + (export "zac" (memory $$mem2)) + (export "zbc" (memory $$mem3)) + (export "zad" (memory $$mem4)) + (export "zbd" (memory $$mem5)) + (export "zbe" (memory $$mem6)) +)`); + +// ./test/core/multi-memory/exports0.wast:32 +let $4 = instantiate(`(module + (export "a" (memory 0)) + (memory 6) + + (export "b" (memory 1)) + (memory 3) +)`); + +// ./test/core/multi-memory/exports0.wast:40 +let $5 = instantiate(`(module + (export "a" (memory 0)) + (memory 0 1) + (memory 0 1) + (memory 0 1) + (memory 0 1) + + (export "b" (memory 3)) +)`); + +// ./test/core/multi-memory/exports0.wast:49 +let $6 = instantiate(`(module (export "a" (memory $$a)) (memory $$a 0))`); + +// ./test/core/multi-memory/exports0.wast:50 +let $7 = instantiate(`(module (export "a" (memory $$a)) (memory $$a 0 1))`); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/float_exprs0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/float_exprs0.wast.js new file mode 100644 index 0000000000..fe1c12a5ee --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/float_exprs0.wast.js @@ -0,0 +1,80 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/float_exprs0.wast + +// ./test/core/multi-memory/float_exprs0.wast:1 +let $0 = instantiate(`(module + (memory 0 0) + (memory $$m 1 1) + (memory 0 0) + (func (export "init") (param $$i i32) (param $$x f64) + (f64.store $$m (local.get $$i) (local.get $$x))) + + (func (export "run") (param $$n i32) (param $$z f64) + (local $$i i32) + (block $$exit + (loop $$cont + (f64.store $$m + (local.get $$i) + (f64.div (f64.load $$m (local.get $$i)) (local.get $$z)) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 8))) + (br_if $$cont (i32.lt_u (local.get $$i) (local.get $$n))) + ) + ) + ) + + (func (export "check") (param $$i i32) (result f64) (f64.load $$m (local.get $$i))) +)`); + +// ./test/core/multi-memory/float_exprs0.wast:25 +invoke($0, `init`, [0, value("f64", 15.1)]); + +// ./test/core/multi-memory/float_exprs0.wast:26 +invoke($0, `init`, [8, value("f64", 15.2)]); + +// ./test/core/multi-memory/float_exprs0.wast:27 +invoke($0, `init`, [16, value("f64", 15.3)]); + +// ./test/core/multi-memory/float_exprs0.wast:28 +invoke($0, `init`, [24, value("f64", 15.4)]); + +// ./test/core/multi-memory/float_exprs0.wast:29 +assert_return(() => invoke($0, `check`, [0]), [value("f64", 15.1)]); + +// ./test/core/multi-memory/float_exprs0.wast:30 +assert_return(() => invoke($0, `check`, [8]), [value("f64", 15.2)]); + +// ./test/core/multi-memory/float_exprs0.wast:31 +assert_return(() => invoke($0, `check`, [16]), [value("f64", 15.3)]); + +// ./test/core/multi-memory/float_exprs0.wast:32 +assert_return(() => invoke($0, `check`, [24]), [value("f64", 15.4)]); + +// ./test/core/multi-memory/float_exprs0.wast:33 +invoke($0, `run`, [32, value("f64", 3)]); + +// ./test/core/multi-memory/float_exprs0.wast:34 +assert_return(() => invoke($0, `check`, [0]), [value("f64", 5.033333333333333)]); + +// ./test/core/multi-memory/float_exprs0.wast:35 +assert_return(() => invoke($0, `check`, [8]), [value("f64", 5.066666666666666)]); + +// ./test/core/multi-memory/float_exprs0.wast:36 +assert_return(() => invoke($0, `check`, [16]), [value("f64", 5.1000000000000005)]); + +// ./test/core/multi-memory/float_exprs0.wast:37 +assert_return(() => invoke($0, `check`, [24]), [value("f64", 5.133333333333334)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/float_exprs1.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/float_exprs1.wast.js new file mode 100644 index 0000000000..3f7c1052fa --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/float_exprs1.wast.js @@ -0,0 +1,128 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/float_exprs1.wast + +// ./test/core/multi-memory/float_exprs1.wast:4 +let $0 = instantiate(`(module + (memory 0 0) + (memory 0 0) + (memory 0 0) + (memory 0 0) + (memory 0 0) + (memory $$m (data + "\\c4\\c5\\57\\24\\a5\\84\\c8\\0b\\6d\\b8\\4b\\2e\\f2\\76\\17\\1c\\ca\\4a\\56\\1e\\1b\\6e\\71\\22" + "\\5d\\17\\1e\\6e\\bf\\cd\\14\\5c\\c7\\21\\55\\51\\39\\9c\\1f\\b2\\51\\f0\\a3\\93\\d7\\c1\\2c\\ae" + "\\7e\\a8\\28\\3a\\01\\21\\f4\\0a\\58\\93\\f8\\42\\77\\9f\\83\\39\\6a\\5f\\ba\\f7\\0a\\d8\\51\\6a" + "\\34\\ca\\ad\\c6\\34\\0e\\d8\\26\\dc\\4c\\33\\1c\\ed\\29\\90\\a8\\78\\0f\\d1\\ce\\76\\31\\23\\83" + "\\b8\\35\\e8\\f2\\44\\b0\\d3\\a1\\fc\\bb\\32\\e1\\b0\\ba\\69\\44\\09\\d6\\d9\\7d\\ff\\2e\\c0\\5a" + "\\36\\14\\33\\14\\3e\\a9\\fa\\87\\6d\\8b\\bc\\ce\\9d\\a7\\fd\\c4\\e9\\85\\3f\\dd\\d7\\e1\\18\\a6" + "\\50\\26\\72\\6e\\3f\\73\\0f\\f8\\12\\93\\23\\34\\61\\76\\12\\48\\c0\\9b\\05\\93\\eb\\ac\\86\\de" + "\\94\\3e\\55\\e8\\8c\\e8\\dd\\e4\\fc\\95\\47\\be\\56\\03\\21\\20\\4c\\e6\\bf\\7b\\f6\\7f\\d5\\ba" + "\\73\\1c\\c1\\14\\8f\\c4\\27\\96\\b3\\bd\\33\\ff\\78\\41\\5f\\c0\\5a\\ce\\f6\\67\\6e\\73\\9a\\17" + "\\66\\70\\03\\f8\\ce\\27\\a3\\52\\b2\\9f\\3b\\bf\\fb\\ae\\ed\\d3\\5a\\f8\\37\\57\\f0\\f5\\6e\\ef" + "\\b1\\4d\\70\\3d\\54\\a7\\01\\9a\\85\\08\\48\\91\\f5\\9d\\0c\\60\\87\\5b\\d9\\54\\1e\\51\\6d\\88" + "\\8e\\08\\8c\\a5\\71\\3a\\56\\08\\67\\46\\8f\\8f\\13\\2a\\2c\\ec\\2c\\1f\\b4\\62\\2b\\6f\\41\\0a" + "\\c4\\65\\42\\a2\\31\\6b\\2c\\7d\\3e\\bb\\75\\ac\\86\\97\\30\\d9\\48\\cd\\9a\\1f\\56\\c4\\c6\\e4" + "\\12\\c0\\9d\\fb\\ee\\02\\8c\\ce\\1c\\f2\\1e\\a1\\78\\23\\db\\c4\\1e\\49\\03\\d3\\71\\cc\\08\\50" + "\\c5\\d8\\5c\\ed\\d5\\b5\\65\\ac\\b5\\c9\\21\\d2\\c9\\29\\76\\de\\f0\\30\\1a\\5b\\3c\\f2\\3b\\db" + "\\3a\\39\\82\\3a\\16\\08\\6f\\a8\\f1\\be\\69\\69\\99\\71\\a6\\05\\d3\\14\\93\\2a\\16\\f2\\2f\\11" + "\\c7\\7e\\20\\bb\\91\\44\\ee\\f8\\e4\\01\\53\\c0\\b9\\7f\\f0\\bf\\f0\\03\\9c\\6d\\b1\\df\\a2\\44" + "\\01\\6d\\6b\\71\\2b\\5c\\b3\\21\\19\\46\\5e\\8f\\db\\91\\d3\\7c\\78\\6b\\b7\\12\\00\\8f\\eb\\bd" + "\\8a\\f5\\d4\\2e\\c4\\c1\\1e\\df\\73\\63\\59\\47\\49\\03\\0a\\b7\\cf\\24\\cf\\9c\\0e\\44\\7a\\9e" + "\\14\\fb\\42\\bf\\9d\\39\\30\\9e\\a0\\ab\\2f\\d1\\ae\\9e\\6a\\83\\43\\e3\\55\\7d\\85\\bf\\63\\8a" + "\\f8\\96\\10\\1f\\fe\\6d\\e7\\22\\1b\\e1\\69\\46\\8a\\44\\c8\\c8\\f9\\0c\\2b\\19\\07\\a5\\02\\3e" + "\\f2\\30\\10\\9a\\85\\8a\\5f\\ef\\81\\45\\a0\\77\\b1\\03\\10\\73\\4b\\ae\\98\\9d\\47\\bf\\9a\\2d" + "\\3a\\d5\\0f\\03\\66\\e3\\3d\\53\\d9\\40\\ce\\1f\\6f\\32\\2f\\21\\2b\\23\\21\\6c\\62\\d4\\a7\\3e" + "\\a8\\ce\\28\\31\\2d\\00\\3d\\67\\5e\\af\\a0\\cf\\2e\\d2\\b9\\6b\\84\\eb\\69\\08\\3c\\62\\36\\be" + "\\12\\fd\\36\\7f\\88\\3e\\ad\\bc\\0b\\c0\\41\\c4\\50\\b6\\e3\\50\\31\\e8\\ce\\e2\\96\\65\\55\\9c" + "\\16\\46\\e6\\b0\\2d\\3a\\e8\\81\\05\\b0\\bf\\34\\f7\\bc\\10\\1c\\fb\\cc\\3c\\f1\\85\\97\\42\\9f" + "\\eb\\14\\8d\\3c\\bf\\d7\\17\\88\\49\\9d\\8b\\2b\\b2\\3a\\83\\d1\\4f\\04\\9e\\a1\\0f\\ad\\08\\9d" + "\\54\\af\\d1\\82\\c3\\ec\\32\\2f\\02\\8f\\05\\21\\2d\\a2\\b7\\e4\\f4\\6f\\2e\\81\\2b\\0b\\9c\\fc" + "\\cb\\fe\\74\\02\\f9\\db\\f4\\f3\\ea\\00\\a8\\ec\\d1\\99\\74\\26\\dd\\d6\\34\\d5\\25\\b1\\46\\dd" + "\\9c\\aa\\71\\f5\\60\\b0\\88\\c8\\e0\\0b\\59\\5a\\25\\4f\\29\\66\\f9\\e3\\2e\\fe\\e9\\da\\e5\\18" + "\\4f\\27\\62\\f4\\ce\\a4\\21\\95\\74\\c7\\57\\64\\27\\9a\\4c\\fd\\54\\7d\\61\\ce\\c3\\ac\\87\\46" + "\\9c\\fa\\ff\\09\\ca\\79\\97\\67\\24\\74\\ca\\d4\\21\\83\\26\\25\\19\\12\\37\\64\\19\\e5\\65\\e0" + "\\74\\75\\8e\\dd\\c8\\ef\\74\\c7\\d8\\21\\2b\\79\\04\\51\\46\\65\\60\\03\\5d\\fa\\d8\\f4\\65\\a4" + "\\9e\\5d\\23\\da\\d7\\8a\\92\\80\\a4\\de\\78\\3c\\f1\\57\\42\\6d\\cd\\c9\\2f\\d5\\a4\\9e\\ab\\40" + "\\f4\\cb\\1b\\d7\\a3\\ca\\fc\\eb\\a7\\01\\b2\\9a\\69\\4e\\46\\9b\\18\\4e\\dd\\79\\a7\\aa\\a6\\52" + "\\39\\1e\\ef\\30\\cc\\9b\\bd\\5b\\ee\\4c\\21\\6d\\30\\00\\72\\b0\\46\\5f\\08\\cf\\c5\\b9\\e0\\3e" + "\\c2\\b3\\0c\\dc\\8e\\64\\de\\19\\42\\79\\cf\\43\\ea\\43\\5d\\8e\\88\\f7\\ab\\15\\dc\\3f\\c8\\67" + "\\20\\db\\b8\\64\\b1\\47\\1f\\de\\f2\\cb\\3f\\59\\9f\\d8\\46\\90\\dc\\ae\\2f\\22\\f9\\e2\\31\\89" + "\\d9\\9c\\1c\\4c\\d3\\a9\\4a\\57\\84\\9c\\9f\\ea\\2c\\3c\\ae\\3c\\c3\\1e\\8b\\e5\\4e\\17\\01\\25" + "\\db\\34\\46\\5f\\15\\ea\\05\\0c\\7c\\d9\\45\\8c\\19\\d0\\73\\8a\\96\\16\\dd\\44\\f9\\05\\b7\\5b" + "\\71\\b0\\e6\\21\\36\\5f\\75\\89\\91\\73\\75\\ab\\7d\\ae\\d3\\73\\ec\\37\\c6\\ea\\55\\75\\ef\\ea" + "\\ab\\8b\\7b\\11\\dc\\6d\\1a\\b2\\6a\\c4\\25\\cf\\aa\\e3\\9f\\49\\49\\89\\cb\\37\\9b\\0a\\a7\\01" + "\\60\\70\\dc\\b7\\c8\\83\\e1\\42\\f5\\be\\ad\\62\\94\\ad\\8d\\a1" + )) + (memory 0 0) + (memory 0 0) + (memory 0 0) + + (func (export "f32.kahan_sum") (param $$p i32) (param $$n i32) (result f32) + (local $$sum f32) + (local $$c f32) + (local $$t f32) + (block $$exit + (loop $$top + (local.set $$t + (f32.sub + (f32.sub + (local.tee $$sum + (f32.add + (local.get $$c) + (local.tee $$t + (f32.sub (f32.load $$m (local.get $$p)) (local.get $$t)) + ) + ) + ) + (local.get $$c) + ) + (local.get $$t) + ) + ) + (local.set $$p (i32.add (local.get $$p) (i32.const 4))) + (local.set $$c (local.get $$sum)) + (br_if $$top (local.tee $$n (i32.add (local.get $$n) (i32.const -1)))) + ) + ) + (local.get $$sum) + ) + + (func (export "f32.plain_sum") (param $$p i32) (param $$n i32) (result f32) + (local $$sum f32) + (block $$exit + (loop $$top + (local.set $$sum (f32.add (local.get $$sum) (f32.load $$m (local.get $$p)))) + (local.set $$p (i32.add (local.get $$p) (i32.const 4))) + (local.set $$n (i32.add (local.get $$n) (i32.const -1))) + (br_if $$top (local.get $$n)) + ) + ) + (local.get $$sum) + ) +)`); + +// ./test/core/multi-memory/float_exprs1.wast:103 +assert_return( + () => invoke($0, `f32.kahan_sum`, [0, 256]), + [value("f32", -21558138000000000000000000000000)], +); + +// ./test/core/multi-memory/float_exprs1.wast:104 +assert_return( + () => invoke($0, `f32.plain_sum`, [0, 256]), + [value("f32", -16487540000000000000000000000000)], +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/float_memory.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/float_memory.wast.js new file mode 100644 index 0000000000..8f01f424e8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/float_memory.wast.js @@ -0,0 +1,361 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/float_memory.wast + +// ./test/core/float_memory.wast:5 +let $0 = instantiate(`(module + (memory (data "\\00\\00\\a0\\7f")) + + (func (export "f32.load") (result f32) (f32.load (i32.const 0))) + (func (export "i32.load") (result i32) (i32.load (i32.const 0))) + (func (export "f32.store") (f32.store (i32.const 0) (f32.const nan:0x200000))) + (func (export "i32.store") (i32.store (i32.const 0) (i32.const 0x7fa00000))) + (func (export "reset") (i32.store (i32.const 0) (i32.const 0))) +)`); + +// ./test/core/float_memory.wast:15 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory.wast:16 +assert_return(() => invoke($0, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory.wast:17 +invoke($0, `reset`, []); + +// ./test/core/float_memory.wast:18 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory.wast:19 +assert_return(() => invoke($0, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory.wast:20 +invoke($0, `f32.store`, []); + +// ./test/core/float_memory.wast:21 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory.wast:22 +assert_return(() => invoke($0, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory.wast:23 +invoke($0, `reset`, []); + +// ./test/core/float_memory.wast:24 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory.wast:25 +assert_return(() => invoke($0, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory.wast:26 +invoke($0, `i32.store`, []); + +// ./test/core/float_memory.wast:27 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory.wast:28 +assert_return(() => invoke($0, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory.wast:30 +let $1 = instantiate(`(module + (memory (data "\\00\\00\\00\\00\\00\\00\\f4\\7f")) + + (func (export "f64.load") (result f64) (f64.load (i32.const 0))) + (func (export "i64.load") (result i64) (i64.load (i32.const 0))) + (func (export "f64.store") (f64.store (i32.const 0) (f64.const nan:0x4000000000000))) + (func (export "i64.store") (i64.store (i32.const 0) (i64.const 0x7ff4000000000000))) + (func (export "reset") (i64.store (i32.const 0) (i64.const 0))) +)`); + +// ./test/core/float_memory.wast:40 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory.wast:41 +assert_return( + () => invoke($1, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory.wast:42 +invoke($1, `reset`, []); + +// ./test/core/float_memory.wast:43 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory.wast:44 +assert_return(() => invoke($1, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory.wast:45 +invoke($1, `f64.store`, []); + +// ./test/core/float_memory.wast:46 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory.wast:47 +assert_return( + () => invoke($1, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory.wast:48 +invoke($1, `reset`, []); + +// ./test/core/float_memory.wast:49 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory.wast:50 +assert_return(() => invoke($1, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory.wast:51 +invoke($1, `i64.store`, []); + +// ./test/core/float_memory.wast:52 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory.wast:53 +assert_return( + () => invoke($1, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory.wast:57 +let $2 = instantiate(`(module + (memory (data "\\00\\00\\00\\a0\\7f")) + + (func (export "f32.load") (result f32) (f32.load (i32.const 1))) + (func (export "i32.load") (result i32) (i32.load (i32.const 1))) + (func (export "f32.store") (f32.store (i32.const 1) (f32.const nan:0x200000))) + (func (export "i32.store") (i32.store (i32.const 1) (i32.const 0x7fa00000))) + (func (export "reset") (i32.store (i32.const 1) (i32.const 0))) +)`); + +// ./test/core/float_memory.wast:67 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory.wast:68 +assert_return(() => invoke($2, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory.wast:69 +invoke($2, `reset`, []); + +// ./test/core/float_memory.wast:70 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory.wast:71 +assert_return(() => invoke($2, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory.wast:72 +invoke($2, `f32.store`, []); + +// ./test/core/float_memory.wast:73 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory.wast:74 +assert_return(() => invoke($2, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory.wast:75 +invoke($2, `reset`, []); + +// ./test/core/float_memory.wast:76 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory.wast:77 +assert_return(() => invoke($2, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory.wast:78 +invoke($2, `i32.store`, []); + +// ./test/core/float_memory.wast:79 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory.wast:80 +assert_return(() => invoke($2, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory.wast:82 +let $3 = instantiate(`(module + (memory (data "\\00\\00\\00\\00\\00\\00\\00\\f4\\7f")) + + (func (export "f64.load") (result f64) (f64.load (i32.const 1))) + (func (export "i64.load") (result i64) (i64.load (i32.const 1))) + (func (export "f64.store") (f64.store (i32.const 1) (f64.const nan:0x4000000000000))) + (func (export "i64.store") (i64.store (i32.const 1) (i64.const 0x7ff4000000000000))) + (func (export "reset") (i64.store (i32.const 1) (i64.const 0))) +)`); + +// ./test/core/float_memory.wast:92 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory.wast:93 +assert_return( + () => invoke($3, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory.wast:94 +invoke($3, `reset`, []); + +// ./test/core/float_memory.wast:95 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory.wast:96 +assert_return(() => invoke($3, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory.wast:97 +invoke($3, `f64.store`, []); + +// ./test/core/float_memory.wast:98 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory.wast:99 +assert_return( + () => invoke($3, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory.wast:100 +invoke($3, `reset`, []); + +// ./test/core/float_memory.wast:101 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory.wast:102 +assert_return(() => invoke($3, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory.wast:103 +invoke($3, `i64.store`, []); + +// ./test/core/float_memory.wast:104 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory.wast:105 +assert_return( + () => invoke($3, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory.wast:109 +let $4 = instantiate(`(module + (memory (data "\\01\\00\\d0\\7f")) + + (func (export "f32.load") (result f32) (f32.load (i32.const 0))) + (func (export "i32.load") (result i32) (i32.load (i32.const 0))) + (func (export "f32.store") (f32.store (i32.const 0) (f32.const nan:0x500001))) + (func (export "i32.store") (i32.store (i32.const 0) (i32.const 0x7fd00001))) + (func (export "reset") (i32.store (i32.const 0) (i32.const 0))) +)`); + +// ./test/core/float_memory.wast:119 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 2144337921)]); + +// ./test/core/float_memory.wast:120 +assert_return(() => invoke($4, `f32.load`, []), [bytes("f32", [0x1, 0x0, 0xd0, 0x7f])]); + +// ./test/core/float_memory.wast:121 +invoke($4, `reset`, []); + +// ./test/core/float_memory.wast:122 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory.wast:123 +assert_return(() => invoke($4, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory.wast:124 +invoke($4, `f32.store`, []); + +// ./test/core/float_memory.wast:125 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 2144337921)]); + +// ./test/core/float_memory.wast:126 +assert_return(() => invoke($4, `f32.load`, []), [bytes("f32", [0x1, 0x0, 0xd0, 0x7f])]); + +// ./test/core/float_memory.wast:127 +invoke($4, `reset`, []); + +// ./test/core/float_memory.wast:128 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory.wast:129 +assert_return(() => invoke($4, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory.wast:130 +invoke($4, `i32.store`, []); + +// ./test/core/float_memory.wast:131 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 2144337921)]); + +// ./test/core/float_memory.wast:132 +assert_return(() => invoke($4, `f32.load`, []), [bytes("f32", [0x1, 0x0, 0xd0, 0x7f])]); + +// ./test/core/float_memory.wast:134 +let $5 = instantiate(`(module + (memory (data "\\01\\00\\00\\00\\00\\00\\fc\\7f")) + + (func (export "f64.load") (result f64) (f64.load (i32.const 0))) + (func (export "i64.load") (result i64) (i64.load (i32.const 0))) + (func (export "f64.store") (f64.store (i32.const 0) (f64.const nan:0xc000000000001))) + (func (export "i64.store") (i64.store (i32.const 0) (i64.const 0x7ffc000000000001))) + (func (export "reset") (i64.store (i32.const 0) (i64.const 0))) +)`); + +// ./test/core/float_memory.wast:144 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 9222246136947933185n)]); + +// ./test/core/float_memory.wast:145 +assert_return( + () => invoke($5, `f64.load`, []), + [bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f])], +); + +// ./test/core/float_memory.wast:146 +invoke($5, `reset`, []); + +// ./test/core/float_memory.wast:147 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory.wast:148 +assert_return(() => invoke($5, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory.wast:149 +invoke($5, `f64.store`, []); + +// ./test/core/float_memory.wast:150 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 9222246136947933185n)]); + +// ./test/core/float_memory.wast:151 +assert_return( + () => invoke($5, `f64.load`, []), + [bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f])], +); + +// ./test/core/float_memory.wast:152 +invoke($5, `reset`, []); + +// ./test/core/float_memory.wast:153 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory.wast:154 +assert_return(() => invoke($5, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory.wast:155 +invoke($5, `i64.store`, []); + +// ./test/core/float_memory.wast:156 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 9222246136947933185n)]); + +// ./test/core/float_memory.wast:157 +assert_return( + () => invoke($5, `f64.load`, []), + [bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f])], +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/float_memory0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/float_memory0.wast.js new file mode 100644 index 0000000000..3647fc1164 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/float_memory0.wast.js @@ -0,0 +1,137 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/float_memory0.wast + +// ./test/core/multi-memory/float_memory0.wast:5 +let $0 = instantiate(`(module + (memory 0 0) + (memory 0 0) + (memory 0 0) + (memory $$m (data "\\00\\00\\a0\\7f")) + (memory 0 0) + (memory 0 0) + + (func (export "f32.load") (result f32) (f32.load $$m (i32.const 0))) + (func (export "i32.load") (result i32) (i32.load $$m (i32.const 0))) + (func (export "f32.store") (f32.store $$m (i32.const 0) (f32.const nan:0x200000))) + (func (export "i32.store") (i32.store $$m (i32.const 0) (i32.const 0x7fa00000))) + (func (export "reset") (i32.store $$m (i32.const 0) (i32.const 0))) +)`); + +// ./test/core/multi-memory/float_memory0.wast:20 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/multi-memory/float_memory0.wast:21 +assert_return(() => invoke($0, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/multi-memory/float_memory0.wast:22 +invoke($0, `reset`, []); + +// ./test/core/multi-memory/float_memory0.wast:23 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/float_memory0.wast:24 +assert_return(() => invoke($0, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/multi-memory/float_memory0.wast:25 +invoke($0, `f32.store`, []); + +// ./test/core/multi-memory/float_memory0.wast:26 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/multi-memory/float_memory0.wast:27 +assert_return(() => invoke($0, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/multi-memory/float_memory0.wast:28 +invoke($0, `reset`, []); + +// ./test/core/multi-memory/float_memory0.wast:29 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/float_memory0.wast:30 +assert_return(() => invoke($0, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/multi-memory/float_memory0.wast:31 +invoke($0, `i32.store`, []); + +// ./test/core/multi-memory/float_memory0.wast:32 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/multi-memory/float_memory0.wast:33 +assert_return(() => invoke($0, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/multi-memory/float_memory0.wast:35 +let $1 = instantiate(`(module + (memory 0 0) + (memory $$m (data "\\00\\00\\00\\00\\00\\00\\f4\\7f")) + + (func (export "f64.load") (result f64) (f64.load $$m (i32.const 0))) + (func (export "i64.load") (result i64) (i64.load $$m (i32.const 0))) + (func (export "f64.store") (f64.store $$m (i32.const 0) (f64.const nan:0x4000000000000))) + (func (export "i64.store") (i64.store $$m (i32.const 0) (i64.const 0x7ff4000000000000))) + (func (export "reset") (i64.store $$m (i32.const 0) (i64.const 0))) +)`); + +// ./test/core/multi-memory/float_memory0.wast:46 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/multi-memory/float_memory0.wast:47 +assert_return( + () => invoke($1, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/multi-memory/float_memory0.wast:48 +invoke($1, `reset`, []); + +// ./test/core/multi-memory/float_memory0.wast:49 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/multi-memory/float_memory0.wast:50 +assert_return(() => invoke($1, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/multi-memory/float_memory0.wast:51 +invoke($1, `f64.store`, []); + +// ./test/core/multi-memory/float_memory0.wast:52 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/multi-memory/float_memory0.wast:53 +assert_return( + () => invoke($1, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/multi-memory/float_memory0.wast:54 +invoke($1, `reset`, []); + +// ./test/core/multi-memory/float_memory0.wast:55 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/multi-memory/float_memory0.wast:56 +assert_return(() => invoke($1, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/multi-memory/float_memory0.wast:57 +invoke($1, `i64.store`, []); + +// ./test/core/multi-memory/float_memory0.wast:58 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/multi-memory/float_memory0.wast:59 +assert_return( + () => invoke($1, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/harness/directives.txt b/js/src/jit-test/tests/wasm/spec/multi-memory/harness/directives.txt new file mode 100644 index 0000000000..d41243abbb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/harness/directives.txt @@ -0,0 +1 @@ +|jit-test| skip-if: true \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/harness/harness.js b/js/src/jit-test/tests/wasm/spec/multi-memory/harness/harness.js new file mode 100644 index 0000000000..a96781e8ed --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/harness/harness.js @@ -0,0 +1,448 @@ +"use strict"; + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +if (!wasmIsSupported()) { + quit(); +} + +function bytes(type, bytes) { + var typedBuffer = new Uint8Array(bytes); + return wasmGlobalFromArrayBuffer(type, typedBuffer.buffer); +} +function value(type, value) { + return new WebAssembly.Global({ + value: type, + mutable: false, + }, value); +} + +function i8x16(elements) { + let typedBuffer = new Uint8Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i16x8(elements) { + let typedBuffer = new Uint16Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i32x4(elements) { + let typedBuffer = new Uint32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i64x2(elements) { + let typedBuffer = new BigUint64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f32x4(elements) { + let typedBuffer = new Float32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f64x2(elements) { + let typedBuffer = new Float64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} + +function either(...arr) { + return new EitherVariants(arr); +} + +class F32x4Pattern { + constructor(x, y, z, w) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } +} + +class F64x2Pattern { + constructor(x, y) { + this.x = x; + this.y = y; + } +} + +class RefWithType { + constructor(type) { + this.type = type; + } + + formatExpected() { + return `RefWithType(${this.type})`; + } + + test(refGlobal) { + try { + new WebAssembly.Global({value: this.type}, refGlobal.value); + return true; + } catch (err) { + assertEq(err instanceof TypeError, true, `wrong type of error when creating global: ${err}`); + assertEq(!!err.message.match(/can only pass/), true, `wrong type of error when creating global: ${err}`); + return false; + } + } +} + +// ref.extern values created by spec tests will be JS objects of the form +// { [externsym]: }. Other externref values are possible to observe +// if extern.convert_any is used. +let externsym = Symbol("externref"); +function externref(s) { + return { [externsym]: s }; +} +function is_externref(x) { + return (x !== null && externsym in x) ? 1 : 0; +} +function is_funcref(x) { + return typeof x === "function" ? 1 : 0; +} +function eq_externref(x, y) { + return x === y ? 1 : 0; +} +function eq_funcref(x, y) { + return x === y ? 1 : 0; +} + +class ExternRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.extern ${this.n}`; + } + + test(global) { + // the global's value can either be an externref or just a plain old JS number + let result = global.value; + if (typeof global.value === "object" && externsym in global.value) { + result = global.value[externsym]; + } + return result === this.n; + } +} + +// ref.host values created by spectests will be whatever the JS API does to +// convert the given value to anyref. It should implicitly be like any.convert_extern. +function hostref(v) { + if (!wasmGcEnabled()) { + throw new Error("ref.host only works when wasm GC is enabled"); + } + + const { internalizeNum } = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(`(module + (func (import "test" "coerce") (param i32) (result anyref)) + (func (export "internalizeNum") (param i32) (result anyref) + (call 0 (local.get 0)) + ) + )`)), + { "test": { "coerce": x => x } }, + ).exports; + return internalizeNum(v); +} + +class HostRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.host ${this.n}`; + } + + test(externrefGlobal) { + assertEq(externsym in externrefGlobal.value, true, `HostRefResult only works with externref inputs`); + return externrefGlobal.value[externsym] === this.n; + } +} + +let spectest = { + externref: externref, + is_externref: is_externref, + is_funcref: is_funcref, + eq_externref: eq_externref, + eq_funcref: eq_funcref, + print: console.log.bind(console), + print_i32: console.log.bind(console), + print_i32_f32: console.log.bind(console), + print_f64_f64: console.log.bind(console), + print_f32: console.log.bind(console), + print_f64: console.log.bind(console), + global_i32: 666, + global_i64: 666n, + global_f32: 666, + global_f64: 666, + table: new WebAssembly.Table({ + initial: 10, + maximum: 20, + element: "anyfunc", + }), + memory: new WebAssembly.Memory({ initial: 1, maximum: 2 }), +}; + +let linkage = { + spectest, +}; + +function getInstance(instanceish) { + if (typeof instanceish === "string") { + assertEq( + instanceish in linkage, + true, + `'${instanceish}'' must be registered`, + ); + return linkage[instanceish]; + } + return instanceish; +} + +function instantiate(source) { + let bytecode = wasmTextToBinary(source); + let module = new WebAssembly.Module(bytecode); + let instance = new WebAssembly.Instance(module, linkage); + return instance.exports; +} + +function register(instanceish, name) { + linkage[name] = getInstance(instanceish); +} + +function invoke(instanceish, field, params) { + let func = getInstance(instanceish)[field]; + assertEq(func instanceof Function, true, "expected a function"); + return wasmLosslessInvoke(func, ...params); +} + +function get(instanceish, field) { + let global = getInstance(instanceish)[field]; + assertEq( + global instanceof WebAssembly.Global, + true, + "expected a WebAssembly.Global", + ); + return global; +} + +function assert_trap(thunk, message) { + try { + thunk(); + throw new Error("expected trap"); + } catch (err) { + if (err instanceof WebAssembly.RuntimeError) { + return; + } + throw err; + } +} + +let StackOverflow; +try { + (function f() { + 1 + f(); + })(); +} catch (e) { + StackOverflow = e.constructor; +} +function assert_exhaustion(thunk, message) { + try { + thunk(); + assertEq("normal return", "exhaustion"); + } catch (err) { + assertEq( + err instanceof StackOverflow, + true, + "expected exhaustion", + ); + } +} + +function assert_invalid(thunk, message) { + try { + thunk(); + assertEq("valid module", "invalid module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an invalid module", + ); + } +} + +function assert_unlinkable(thunk, message) { + try { + thunk(); + assertEq(true, false, "expected an unlinkable module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an unlinkable module", + ); + } +} + +function assert_malformed(thunk, message) { + try { + thunk(); + assertEq("valid module", "malformed module"); + } catch (err) { + assertEq( + err instanceof TypeError || + err instanceof SyntaxError || + err instanceof WebAssembly.CompileError || + err instanceof WebAssembly.LinkError, + true, + `expected a malformed module`, + ); + } +} + +function assert_exception(thunk) { + let thrown = false; + try { + thunk(); + } catch (err) { + thrown = true; + } + assertEq(thrown, true, "expected an exception to be thrown"); +} + +function assert_return(thunk, expected) { + let results = thunk(); + + if (results === undefined) { + results = []; + } else if (!Array.isArray(results)) { + results = [results]; + } + if (!Array.isArray(expected)) { + expected = [expected]; + } + + if (!compareResults(results, expected)) { + let got = results.map((x) => formatResult(x)).join(", "); + let wanted = expected.map((x) => formatExpected(x)).join(", "); + assertEq( + `[${got}]`, + `[${wanted}]`, + ); + assertEq(true, false, `${got} !== ${wanted}`); + } +} + +function formatResult(result) { + if (typeof (result) === "object") { + return wasmGlobalToString(result); + } else { + return `${result}`; + } +} + +function formatExpected(expected) { + if ( + expected === `f32_canonical_nan` || + expected === `f32_arithmetic_nan` || + expected === `f64_canonical_nan` || + expected === `f64_arithmetic_nan` + ) { + return expected; + } else if (expected instanceof F32x4Pattern) { + return `f32x4(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + }, ${formatExpected(expected.z)}, ${formatExpected(expected.w)})`; + } else if (expected instanceof F64x2Pattern) { + return `f64x2(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + })`; + } else if (expected instanceof EitherVariants) { + return expected.formatExpected(); + } else if (expected instanceof RefWithType) { + return expected.formatExpected(); + } else if (expected instanceof ExternRefResult) { + return expected.formatExpected(); + } else if (expected instanceof HostRefResult) { + return expected.formatExpected(); + } else if (typeof (expected) === "object") { + return wasmGlobalToString(expected); + } else { + throw new Error("unknown expected result"); + } +} + +class EitherVariants { + constructor(arr) { + this.arr = arr; + } + matches(v) { + return this.arr.some((e) => compareResult(v, e)); + } + formatExpected() { + return `either(${this.arr.map(formatExpected).join(", ")})`; + } +} + +function compareResults(results, expected) { + if (results.length !== expected.length) { + return false; + } + for (let i in results) { + if (expected[i] instanceof EitherVariants) { + return expected[i].matches(results[i]); + } + if (!compareResult(results[i], expected[i])) { + return false; + } + } + return true; +} + +function compareResult(result, expected) { + if ( + expected === `canonical_nan` || + expected === `arithmetic_nan` + ) { + return wasmGlobalIsNaN(result, expected); + } else if (expected === null) { + return result.value === null; + } else if (expected instanceof F32x4Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f32x4", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 1), expected.y) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 2), expected.z) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 3), expected.w); + } else if (expected instanceof F64x2Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f64x2", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f64x2", 1), expected.y); + } else if (expected instanceof RefWithType) { + return expected.test(result); + } else if (expected instanceof ExternRefResult) { + return expected.test(result); + } else if (expected instanceof HostRefResult) { + return expected.test(result); + } else if (typeof (expected) === "object") { + return wasmGlobalsEqual(result, expected); + } else { + throw new Error("unknown expected result"); + } +} diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/imports0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/imports0.wast.js new file mode 100644 index 0000000000..140457d1d9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/imports0.wast.js @@ -0,0 +1,73 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/imports0.wast + +// ./test/core/multi-memory/imports0.wast:1 +let $0 = instantiate(`(module + (func (export "func")) + (func (export "func-i32") (param i32)) + (func (export "func-f32") (param f32)) + (func (export "func->i32") (result i32) (i32.const 22)) + (func (export "func->f32") (result f32) (f32.const 11)) + (func (export "func-i32->i32") (param i32) (result i32) (local.get 0)) + (func (export "func-i64->i64") (param i64) (result i64) (local.get 0)) + (global (export "global-i32") i32 (i32.const 55)) + (global (export "global-f32") f32 (f32.const 44)) + (global (export "global-mut-i64") (mut i64) (i64.const 66)) + (table (export "table-10-inf") 10 funcref) + (table (export "table-10-20") 10 20 funcref) + (memory (export "memory-2-inf") 2) + (memory (export "memory-2-4") 2 4) +)`); + +// ./test/core/multi-memory/imports0.wast:18 +register($0, `test`); + +// ./test/core/multi-memory/imports0.wast:20 +assert_unlinkable( + () => instantiate(`(module (import "test" "memory-2-inf" (func)))`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports0.wast:24 +assert_unlinkable( + () => instantiate(`(module (import "test" "memory-2-4" (func)))`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports0.wast:29 +assert_unlinkable( + () => instantiate(`(module (import "test" "memory-2-inf" (global i32)))`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports0.wast:33 +assert_unlinkable( + () => instantiate(`(module (import "test" "memory-2-4" (global i32)))`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports0.wast:38 +assert_unlinkable( + () => instantiate(`(module (import "test" "memory-2-inf" (table 10 funcref)))`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports0.wast:42 +assert_unlinkable( + () => instantiate(`(module (import "test" "memory-2-4" (table 10 funcref)))`), + `incompatible import type`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/imports1.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/imports1.wast.js new file mode 100644 index 0000000000..db3cc392dd --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/imports1.wast.js @@ -0,0 +1,40 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/imports1.wast + +// ./test/core/multi-memory/imports1.wast:1 +let $0 = instantiate(`(module + (import "spectest" "memory" (memory 1 2)) + (import "spectest" "memory" (memory 1 2)) + (memory $$m (import "spectest" "memory") 1 2) + (import "spectest" "memory" (memory 1 2)) + + (data (memory 2) (i32.const 10) "\\10") + + (func (export "load") (param i32) (result i32) (i32.load $$m (local.get 0))) +)`); + +// ./test/core/multi-memory/imports1.wast:12 +assert_return(() => invoke($0, `load`, [0]), [value("i32", 0)]); + +// ./test/core/multi-memory/imports1.wast:13 +assert_return(() => invoke($0, `load`, [10]), [value("i32", 16)]); + +// ./test/core/multi-memory/imports1.wast:14 +assert_return(() => invoke($0, `load`, [8]), [value("i32", 1048576)]); + +// ./test/core/multi-memory/imports1.wast:15 +assert_trap(() => invoke($0, `load`, [1000000]), `out of bounds memory access`); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/imports2.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/imports2.wast.js new file mode 100644 index 0000000000..aa2bec179a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/imports2.wast.js @@ -0,0 +1,120 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/imports2.wast + +// ./test/core/multi-memory/imports2.wast:1 +let $0 = instantiate(`(module + (memory (export "z") 0 0) + (memory (export "memory-2-inf") 2) + (memory (export "memory-2-4") 2 4) +)`); + +// ./test/core/multi-memory/imports2.wast:7 +register($0, `test`); + +// ./test/core/multi-memory/imports2.wast:9 +let $1 = instantiate(`(module + (import "test" "z" (memory 0)) + (memory $$m (import "spectest" "memory") 1 2) + (data (memory 1) (i32.const 10) "\\10") + + (func (export "load") (param i32) (result i32) (i32.load $$m (local.get 0))) +)`); + +// ./test/core/multi-memory/imports2.wast:17 +assert_return(() => invoke($1, `load`, [0]), [value("i32", 0)]); + +// ./test/core/multi-memory/imports2.wast:18 +assert_return(() => invoke($1, `load`, [10]), [value("i32", 16)]); + +// ./test/core/multi-memory/imports2.wast:19 +assert_return(() => invoke($1, `load`, [8]), [value("i32", 1048576)]); + +// ./test/core/multi-memory/imports2.wast:20 +assert_trap(() => invoke($1, `load`, [1000000]), `out of bounds memory access`); + +// ./test/core/multi-memory/imports2.wast:22 +let $2 = instantiate(`(module + (memory (import "spectest" "memory") 1 2) + (data (memory 0) (i32.const 10) "\\10") + + (func (export "load") (param i32) (result i32) (i32.load (local.get 0))) +)`); + +// ./test/core/multi-memory/imports2.wast:28 +assert_return(() => invoke($2, `load`, [0]), [value("i32", 0)]); + +// ./test/core/multi-memory/imports2.wast:29 +assert_return(() => invoke($2, `load`, [10]), [value("i32", 16)]); + +// ./test/core/multi-memory/imports2.wast:30 +assert_return(() => invoke($2, `load`, [8]), [value("i32", 1048576)]); + +// ./test/core/multi-memory/imports2.wast:31 +assert_trap(() => invoke($2, `load`, [1000000]), `out of bounds memory access`); + +// ./test/core/multi-memory/imports2.wast:33 +let $3 = instantiate(`(module + (import "test" "memory-2-inf" (memory 2)) + (import "test" "memory-2-inf" (memory 1)) + (import "test" "memory-2-inf" (memory 0)) +)`); + +// ./test/core/multi-memory/imports2.wast:39 +let $4 = instantiate(`(module + (import "spectest" "memory" (memory 1)) + (import "spectest" "memory" (memory 0)) + (import "spectest" "memory" (memory 1 2)) + (import "spectest" "memory" (memory 0 2)) + (import "spectest" "memory" (memory 1 3)) + (import "spectest" "memory" (memory 0 3)) +)`); + +// ./test/core/multi-memory/imports2.wast:48 +assert_unlinkable( + () => instantiate(`(module (import "test" "unknown" (memory 1)))`), + `unknown import`, +); + +// ./test/core/multi-memory/imports2.wast:52 +assert_unlinkable( + () => instantiate(`(module (import "spectest" "unknown" (memory 1)))`), + `unknown import`, +); + +// ./test/core/multi-memory/imports2.wast:57 +assert_unlinkable( + () => instantiate(`(module (import "test" "memory-2-inf" (memory 3)))`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports2.wast:61 +assert_unlinkable( + () => instantiate(`(module (import "test" "memory-2-inf" (memory 2 3)))`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports2.wast:65 +assert_unlinkable( + () => instantiate(`(module (import "spectest" "memory" (memory 2)))`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports2.wast:69 +assert_unlinkable( + () => instantiate(`(module (import "spectest" "memory" (memory 1 1)))`), + `incompatible import type`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/imports3.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/imports3.wast.js new file mode 100644 index 0000000000..9669f1dea0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/imports3.wast.js @@ -0,0 +1,109 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/imports3.wast + +// ./test/core/multi-memory/imports3.wast:1 +let $0 = instantiate(`(module + (func (export "func")) + (func (export "func-i32") (param i32)) + (func (export "func-f32") (param f32)) + (func (export "func->i32") (result i32) (i32.const 22)) + (func (export "func->f32") (result f32) (f32.const 11)) + (func (export "func-i32->i32") (param i32) (result i32) (local.get 0)) + (func (export "func-i64->i64") (param i64) (result i64) (local.get 0)) + (global (export "global-i32") i32 (i32.const 55)) + (global (export "global-f32") f32 (f32.const 44)) + (global (export "global-mut-i64") (mut i64) (i64.const 66)) + (table (export "table-10-inf") 10 funcref) + (table (export "table-10-20") 10 20 funcref) + (memory (export "memory-2-inf") 2) + (memory (export "memory-2-4") 2 4) +)`); + +// ./test/core/multi-memory/imports3.wast:18 +register($0, `test`); + +// ./test/core/multi-memory/imports3.wast:19 +assert_unlinkable( + () => instantiate(`(module + (import "test" "memory-2-4" (memory 1)) + (import "test" "func-i32" (memory 1)) + )`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports3.wast:26 +assert_unlinkable( + () => instantiate(`(module + (import "test" "memory-2-4" (memory 1)) + (import "test" "global-i32" (memory 1)) + )`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports3.wast:33 +assert_unlinkable( + () => instantiate(`(module + (import "test" "memory-2-4" (memory 1)) + (import "test" "table-10-inf" (memory 1)) + )`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports3.wast:40 +assert_unlinkable( + () => instantiate(`(module + (import "test" "memory-2-4" (memory 1)) + (import "spectest" "print_i32" (memory 1)) + )`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports3.wast:47 +assert_unlinkable( + () => instantiate(`(module + (import "test" "memory-2-4" (memory 1)) + (import "spectest" "global_i32" (memory 1)) + )`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports3.wast:54 +assert_unlinkable( + () => instantiate(`(module + (import "test" "memory-2-4" (memory 1)) + (import "spectest" "table" (memory 1)) + )`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports3.wast:62 +assert_unlinkable( + () => instantiate(`(module + (import "test" "memory-2-4" (memory 1)) + (import "spectest" "memory" (memory 2)) + )`), + `incompatible import type`, +); + +// ./test/core/multi-memory/imports3.wast:69 +assert_unlinkable( + () => instantiate(`(module + (import "test" "memory-2-4" (memory 1)) + (import "spectest" "memory" (memory 1 1)) + )`), + `incompatible import type`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/imports4.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/imports4.wast.js new file mode 100644 index 0000000000..86320fe685 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/imports4.wast.js @@ -0,0 +1,93 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/imports4.wast + +// ./test/core/multi-memory/imports4.wast:1 +let $0 = instantiate(`(module + (memory (export "memory-2-inf") 2) + (memory (export "memory-2-4") 2 4) +)`); + +// ./test/core/multi-memory/imports4.wast:6 +register($0, `test`); + +// ./test/core/multi-memory/imports4.wast:8 +let $1 = instantiate(`(module + (import "test" "memory-2-4" (memory 1)) + (memory $$m (import "spectest" "memory") 0 3) ;; actual has max size 2 + (func (export "grow") (param i32) (result i32) (memory.grow $$m (local.get 0))) +)`); + +// ./test/core/multi-memory/imports4.wast:13 +assert_return(() => invoke($1, `grow`, [0]), [value("i32", 1)]); + +// ./test/core/multi-memory/imports4.wast:14 +assert_return(() => invoke($1, `grow`, [1]), [value("i32", 1)]); + +// ./test/core/multi-memory/imports4.wast:15 +assert_return(() => invoke($1, `grow`, [0]), [value("i32", 2)]); + +// ./test/core/multi-memory/imports4.wast:16 +assert_return(() => invoke($1, `grow`, [1]), [value("i32", -1)]); + +// ./test/core/multi-memory/imports4.wast:17 +assert_return(() => invoke($1, `grow`, [0]), [value("i32", 2)]); + +// ./test/core/multi-memory/imports4.wast:19 +let $2 = instantiate(`(module $$Mgm + (memory 0) + (memory 0) + (memory $$m (export "memory") 1) ;; initial size is 1 + (func (export "grow") (result i32) (memory.grow $$m (i32.const 1))) +)`); +register($2, `Mgm`); + +// ./test/core/multi-memory/imports4.wast:25 +register(`Mgm`, `grown-memory`); + +// ./test/core/multi-memory/imports4.wast:26 +assert_return(() => invoke(`Mgm`, `grow`, []), [value("i32", 1)]); + +// ./test/core/multi-memory/imports4.wast:28 +let $3 = instantiate(`(module $$Mgim1 + ;; imported memory limits should match, because external memory size is 2 now + (import "test" "memory-2-4" (memory 1)) + (memory $$m (export "memory") (import "grown-memory" "memory") 2) + (memory 0) + (memory 0) + (func (export "grow") (result i32) (memory.grow $$m (i32.const 1))) +)`); +register($3, `Mgim1`); + +// ./test/core/multi-memory/imports4.wast:36 +register(`Mgim1`, `grown-imported-memory`); + +// ./test/core/multi-memory/imports4.wast:37 +assert_return(() => invoke(`Mgim1`, `grow`, []), [value("i32", 2)]); + +// ./test/core/multi-memory/imports4.wast:39 +let $4 = instantiate(`(module $$Mgim2 + ;; imported memory limits should match, because external memory size is 3 now + (import "test" "memory-2-4" (memory 1)) + (memory $$m (import "grown-imported-memory" "memory") 3) + (memory 0) + (memory 0) + (func (export "size") (result i32) (memory.size $$m)) +)`); +register($4, `Mgim2`); + +// ./test/core/multi-memory/imports4.wast:47 +assert_return(() => invoke(`Mgim2`, `size`, []), [value("i32", 3)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/linking0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/linking0.wast.js new file mode 100644 index 0000000000..64c4680a48 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/linking0.wast.js @@ -0,0 +1,68 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/linking0.wast + +// ./test/core/multi-memory/linking0.wast:1 +let $0 = instantiate(`(module $$Mt + (type (func (result i32))) + (type (func)) + + (table (export "tab") 10 funcref) + (elem (i32.const 2) $$g $$g $$g $$g) + (func $$g (result i32) (i32.const 4)) + (func (export "h") (result i32) (i32.const -4)) + + (func (export "call") (param i32) (result i32) + (call_indirect (type 0) (local.get 0)) + ) +)`); +register($0, `Mt`); + +// ./test/core/multi-memory/linking0.wast:14 +register(`Mt`, `Mt`); + +// ./test/core/multi-memory/linking0.wast:16 +assert_unlinkable( + () => instantiate(`(module + (table (import "Mt" "tab") 10 funcref) + (memory (import "spectest" "memory") 1) + (memory (import "Mt" "mem") 1) ;; does not exist + (func $$f (result i32) (i32.const 0)) + (elem (i32.const 7) $$f) + (elem (i32.const 9) $$f) + )`), + `unknown import`, +); + +// ./test/core/multi-memory/linking0.wast:27 +assert_trap(() => invoke(`Mt`, `call`, [7]), `uninitialized element`); + +// ./test/core/multi-memory/linking0.wast:30 +assert_trap( + () => instantiate(`(module + (table (import "Mt" "tab") 10 funcref) + (func $$f (result i32) (i32.const 0)) + (elem (i32.const 7) $$f) + (memory 0) + (memory $$m 1) + (memory 0) + (data $$m (i32.const 0x10000) "d") ;; out of bounds + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/linking0.wast:42 +assert_return(() => invoke(`Mt`, `call`, [7]), [value("i32", 0)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/linking1.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/linking1.wast.js new file mode 100644 index 0000000000..aacf570e77 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/linking1.wast.js @@ -0,0 +1,104 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/linking1.wast + +// ./test/core/multi-memory/linking1.wast:1 +let $0 = instantiate(`(module $$Mm + (memory $$mem0 (export "mem0") 0 0) + (memory $$mem1 (export "mem1") 1 5) + (memory $$mem2 (export "mem2") 0 0) + + (data (memory 1) (i32.const 10) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09") + + (func (export "load") (param $$a i32) (result i32) + (i32.load8_u $$mem1 (local.get 0)) + ) +)`); +register($0, `Mm`); + +// ./test/core/multi-memory/linking1.wast:12 +register(`Mm`, `Mm`); + +// ./test/core/multi-memory/linking1.wast:14 +let $1 = instantiate(`(module $$Nm + (func $$loadM (import "Mm" "load") (param i32) (result i32)) + (memory (import "Mm" "mem0") 0) + + (memory $$m 1) + (data (memory 1) (i32.const 10) "\\f0\\f1\\f2\\f3\\f4\\f5") + + (export "Mm.load" (func $$loadM)) + (func (export "load") (param $$a i32) (result i32) + (i32.load8_u $$m (local.get 0)) + ) +)`); +register($1, `Nm`); + +// ./test/core/multi-memory/linking1.wast:27 +assert_return(() => invoke(`Mm`, `load`, [12]), [value("i32", 2)]); + +// ./test/core/multi-memory/linking1.wast:28 +assert_return(() => invoke(`Nm`, `Mm.load`, [12]), [value("i32", 2)]); + +// ./test/core/multi-memory/linking1.wast:29 +assert_return(() => invoke(`Nm`, `load`, [12]), [value("i32", 242)]); + +// ./test/core/multi-memory/linking1.wast:31 +let $2 = instantiate(`(module $$Om + (memory (import "Mm" "mem1") 1) + (data (i32.const 5) "\\a0\\a1\\a2\\a3\\a4\\a5\\a6\\a7") + + (func (export "load") (param $$a i32) (result i32) + (i32.load8_u (local.get 0)) + ) +)`); +register($2, `Om`); + +// ./test/core/multi-memory/linking1.wast:40 +assert_return(() => invoke(`Mm`, `load`, [12]), [value("i32", 167)]); + +// ./test/core/multi-memory/linking1.wast:41 +assert_return(() => invoke(`Nm`, `Mm.load`, [12]), [value("i32", 167)]); + +// ./test/core/multi-memory/linking1.wast:42 +assert_return(() => invoke(`Nm`, `load`, [12]), [value("i32", 242)]); + +// ./test/core/multi-memory/linking1.wast:43 +assert_return(() => invoke(`Om`, `load`, [12]), [value("i32", 167)]); + +// ./test/core/multi-memory/linking1.wast:45 +let $3 = instantiate(`(module + (memory (import "Mm" "mem1") 0) + (data (i32.const 0xffff) "a") +)`); + +// ./test/core/multi-memory/linking1.wast:50 +assert_trap( + () => instantiate(`(module + (memory (import "Mm" "mem0") 0) + (data (i32.const 0xffff) "a") + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/linking1.wast:58 +assert_trap( + () => instantiate(`(module + (memory (import "Mm" "mem1") 0) + (data (i32.const 0x10000) "a") + )`), + `out of bounds memory access`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/linking2.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/linking2.wast.js new file mode 100644 index 0000000000..8dacb51e9d --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/linking2.wast.js @@ -0,0 +1,67 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/linking2.wast + +// ./test/core/multi-memory/linking2.wast:1 +let $0 = instantiate(`(module $$Mm + (memory $$mem0 (export "mem0") 0 0) + (memory $$mem1 (export "mem1") 1 5) + (memory $$mem2 (export "mem2") 0 0) + + (data (memory 1) (i32.const 10) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09") + + (func (export "load") (param $$a i32) (result i32) + (i32.load8_u $$mem1 (local.get 0)) + ) +)`); +register($0, `Mm`); + +// ./test/core/multi-memory/linking2.wast:12 +register(`Mm`, `Mm`); + +// ./test/core/multi-memory/linking2.wast:14 +let $1 = instantiate(`(module $$Pm + (memory (import "Mm" "mem1") 1 8) + + (func (export "grow") (param $$a i32) (result i32) + (memory.grow (local.get 0)) + ) +)`); +register($1, `Pm`); + +// ./test/core/multi-memory/linking2.wast:22 +assert_return(() => invoke(`Pm`, `grow`, [0]), [value("i32", 1)]); + +// ./test/core/multi-memory/linking2.wast:23 +assert_return(() => invoke(`Pm`, `grow`, [2]), [value("i32", 1)]); + +// ./test/core/multi-memory/linking2.wast:24 +assert_return(() => invoke(`Pm`, `grow`, [0]), [value("i32", 3)]); + +// ./test/core/multi-memory/linking2.wast:25 +assert_return(() => invoke(`Pm`, `grow`, [1]), [value("i32", 3)]); + +// ./test/core/multi-memory/linking2.wast:26 +assert_return(() => invoke(`Pm`, `grow`, [1]), [value("i32", 4)]); + +// ./test/core/multi-memory/linking2.wast:27 +assert_return(() => invoke(`Pm`, `grow`, [0]), [value("i32", 5)]); + +// ./test/core/multi-memory/linking2.wast:28 +assert_return(() => invoke(`Pm`, `grow`, [1]), [value("i32", -1)]); + +// ./test/core/multi-memory/linking2.wast:29 +assert_return(() => invoke(`Pm`, `grow`, [0]), [value("i32", 5)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/linking3.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/linking3.wast.js new file mode 100644 index 0000000000..0f6d60bacd --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/linking3.wast.js @@ -0,0 +1,120 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/linking3.wast + +// ./test/core/multi-memory/linking3.wast:1 +let $0 = instantiate(`(module $$Mm + (memory $$mem0 (export "mem0") 0 0) + (memory $$mem1 (export "mem1") 5 5) + (memory $$mem2 (export "mem2") 0 0) + + (data (memory 1) (i32.const 10) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09") + + (func (export "load") (param $$a i32) (result i32) + (i32.load8_u $$mem1 (local.get 0)) + ) +)`); +register($0, `Mm`); + +// ./test/core/multi-memory/linking3.wast:12 +register(`Mm`, `Mm`); + +// ./test/core/multi-memory/linking3.wast:14 +assert_unlinkable( + () => instantiate(`(module + (func $$host (import "spectest" "print")) + (memory (import "Mm" "mem1") 1) + (table (import "Mm" "tab") 0 funcref) ;; does not exist + (data (i32.const 0) "abc") + )`), + `unknown import`, +); + +// ./test/core/multi-memory/linking3.wast:23 +assert_return(() => invoke(`Mm`, `load`, [0]), [value("i32", 0)]); + +// ./test/core/multi-memory/linking3.wast:27 +assert_trap( + () => instantiate(`(module + ;; Note: the memory is 5 pages large by the time we get here. + (memory (import "Mm" "mem1") 1) + (data (i32.const 0) "abc") + (data (i32.const 327670) "zzzzzzzzzzzzzzzzzz") ;; (partially) out of bounds + )`), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/linking3.wast:36 +assert_return(() => invoke(`Mm`, `load`, [0]), [value("i32", 97)]); + +// ./test/core/multi-memory/linking3.wast:37 +assert_return(() => invoke(`Mm`, `load`, [327670]), [value("i32", 0)]); + +// ./test/core/multi-memory/linking3.wast:39 +assert_trap( + () => instantiate(`(module + (memory (import "Mm" "mem1") 1) + (data (i32.const 0) "abc") + (table 0 funcref) + (func) + (elem (i32.const 0) 0) ;; out of bounds + )`), + `out of bounds table access`, +); + +// ./test/core/multi-memory/linking3.wast:49 +assert_return(() => invoke(`Mm`, `load`, [0]), [value("i32", 97)]); + +// ./test/core/multi-memory/linking3.wast:52 +let $1 = instantiate(`(module $$Ms + (type $$t (func (result i32))) + (memory (export "memory") 1) + (table (export "table") 1 funcref) + (func (export "get memory[0]") (type $$t) + (i32.load8_u (i32.const 0)) + ) + (func (export "get table[0]") (type $$t) + (call_indirect (type $$t) (i32.const 0)) + ) +)`); +register($1, `Ms`); + +// ./test/core/multi-memory/linking3.wast:63 +register(`Ms`, `Ms`); + +// ./test/core/multi-memory/linking3.wast:65 +assert_trap( + () => instantiate(`(module + (import "Ms" "memory" (memory 1)) + (import "Ms" "table" (table 1 funcref)) + (data (i32.const 0) "hello") + (elem (i32.const 0) $$f) + (func $$f (result i32) + (i32.const 0xdead) + ) + (func $$main + (unreachable) + ) + (start $$main) + )`), + `unreachable`, +); + +// ./test/core/multi-memory/linking3.wast:82 +assert_return(() => invoke(`Ms`, `get memory[0]`, []), [value("i32", 104)]); + +// ./test/core/multi-memory/linking3.wast:83 +assert_return(() => invoke(`Ms`, `get table[0]`, []), [value("i32", 57005)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/load.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/load.wast.js new file mode 100644 index 0000000000..79d90437b9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/load.wast.js @@ -0,0 +1,845 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/load.wast + +// ./test/core/load.wast:3 +let $0 = instantiate(`(module + (memory $$mem1 1) + (memory $$mem2 1) + + (func (export "load1") (param i32) (result i64) + (i64.load $$mem1 (local.get 0)) + ) + (func (export "load2") (param i32) (result i64) + (i64.load $$mem2 (local.get 0)) + ) + + (data (memory $$mem1) (i32.const 0) "\\01") + (data (memory $$mem2) (i32.const 0) "\\02") +)`); + +// ./test/core/load.wast:18 +assert_return(() => invoke($0, `load1`, [0]), [value("i64", 1n)]); + +// ./test/core/load.wast:19 +assert_return(() => invoke($0, `load2`, [0]), [value("i64", 2n)]); + +// ./test/core/load.wast:22 +let $1 = instantiate(`(module $$M + (memory (export "mem") 2) + + (func (export "read") (param i32) (result i32) + (i32.load8_u (local.get 0)) + ) +)`); +register($1, `M`); + +// ./test/core/load.wast:29 +register($1, `M`); + +// ./test/core/load.wast:31 +let $2 = instantiate(`(module + (memory $$mem1 (import "M" "mem") 2) + (memory $$mem2 3) + + (data (memory $$mem1) (i32.const 20) "\\01\\02\\03\\04\\05") + (data (memory $$mem2) (i32.const 50) "\\0A\\0B\\0C\\0D\\0E") + + (func (export "read1") (param i32) (result i32) + (i32.load8_u $$mem1 (local.get 0)) + ) + (func (export "read2") (param i32) (result i32) + (i32.load8_u $$mem2 (local.get 0)) + ) +)`); + +// ./test/core/load.wast:46 +assert_return(() => invoke(`M`, `read`, [20]), [value("i32", 1)]); + +// ./test/core/load.wast:47 +assert_return(() => invoke(`M`, `read`, [21]), [value("i32", 2)]); + +// ./test/core/load.wast:48 +assert_return(() => invoke(`M`, `read`, [22]), [value("i32", 3)]); + +// ./test/core/load.wast:49 +assert_return(() => invoke(`M`, `read`, [23]), [value("i32", 4)]); + +// ./test/core/load.wast:50 +assert_return(() => invoke(`M`, `read`, [24]), [value("i32", 5)]); + +// ./test/core/load.wast:52 +assert_return(() => invoke($2, `read1`, [20]), [value("i32", 1)]); + +// ./test/core/load.wast:53 +assert_return(() => invoke($2, `read1`, [21]), [value("i32", 2)]); + +// ./test/core/load.wast:54 +assert_return(() => invoke($2, `read1`, [22]), [value("i32", 3)]); + +// ./test/core/load.wast:55 +assert_return(() => invoke($2, `read1`, [23]), [value("i32", 4)]); + +// ./test/core/load.wast:56 +assert_return(() => invoke($2, `read1`, [24]), [value("i32", 5)]); + +// ./test/core/load.wast:58 +assert_return(() => invoke($2, `read2`, [50]), [value("i32", 10)]); + +// ./test/core/load.wast:59 +assert_return(() => invoke($2, `read2`, [51]), [value("i32", 11)]); + +// ./test/core/load.wast:60 +assert_return(() => invoke($2, `read2`, [52]), [value("i32", 12)]); + +// ./test/core/load.wast:61 +assert_return(() => invoke($2, `read2`, [53]), [value("i32", 13)]); + +// ./test/core/load.wast:62 +assert_return(() => invoke($2, `read2`, [54]), [value("i32", 14)]); + +// ./test/core/load.wast:67 +let $3 = instantiate(`(module + (memory 1) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (i32.load (i32.const 0)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (i32.load (i32.const 0)))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (i32.load (i32.const 0)) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 6) (i32.load (i32.const 0)))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (i32.load (i32.const 0)))) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (i32.load (i32.const 0)) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 6) (i32.load (i32.const 0))) (i32.const 7) + ) + ) + + (func (export "as-return-value") (result i32) + (return (i32.load (i32.const 0))) + ) + + (func (export "as-if-cond") (result i32) + (if (result i32) (i32.load (i32.const 0)) + (then (i32.const 0)) (else (i32.const 1)) + ) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) + (then (i32.load (i32.const 0))) (else (i32.const 0)) + ) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 0) + (then (i32.const 0)) (else (i32.load (i32.const 0))) + ) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (select (i32.load (i32.const 0)) (local.get 0) (local.get 1)) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (select (local.get 0) (i32.load (i32.const 0)) (local.get 1)) + ) + (func (export "as-select-cond") (result i32) + (select (i32.const 0) (i32.const 1) (i32.load (i32.const 0))) + ) + + (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (call $$f (i32.load (i32.const 0)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call-mid") (result i32) + (call $$f (i32.const 1) (i32.load (i32.const 0)) (i32.const 3)) + ) + (func (export "as-call-last") (result i32) + (call $$f (i32.const 1) (i32.const 2) (i32.load (i32.const 0))) + ) + + (type $$sig (func (param i32 i32 i32) (result i32))) + (table funcref (elem $$f)) + (func (export "as-call_indirect-first") (result i32) + (call_indirect (type $$sig) + (i32.load (i32.const 0)) (i32.const 2) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.load (i32.const 0)) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (i32.load (i32.const 0)) (i32.const 0) + ) + ) + (func (export "as-call_indirect-index") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (i32.const 3) (i32.load (i32.const 0)) + ) + ) + + (func (export "as-local.set-value") (local i32) + (local.set 0 (i32.load (i32.const 0))) + ) + (func (export "as-local.tee-value") (result i32) (local i32) + (local.tee 0 (i32.load (i32.const 0))) + ) + (global $$g (mut i32) (i32.const 0)) + (func (export "as-global.set-value") (local i32) + (global.set $$g (i32.load (i32.const 0))) + ) + + (func (export "as-load-address") (result i32) + (i32.load (i32.load (i32.const 0))) + ) + (func (export "as-loadN-address") (result i32) + (i32.load8_s (i32.load (i32.const 0))) + ) + + (func (export "as-store-address") + (i32.store (i32.load (i32.const 0)) (i32.const 7)) + ) + (func (export "as-store-value") + (i32.store (i32.const 2) (i32.load (i32.const 0))) + ) + + (func (export "as-storeN-address") + (i32.store8 (i32.load8_s (i32.const 0)) (i32.const 7)) + ) + (func (export "as-storeN-value") + (i32.store16 (i32.const 2) (i32.load (i32.const 0))) + ) + + (func (export "as-unary-operand") (result i32) + (i32.clz (i32.load (i32.const 100))) + ) + + (func (export "as-binary-left") (result i32) + (i32.add (i32.load (i32.const 100)) (i32.const 10)) + ) + (func (export "as-binary-right") (result i32) + (i32.sub (i32.const 10) (i32.load (i32.const 100))) + ) + + (func (export "as-test-operand") (result i32) + (i32.eqz (i32.load (i32.const 100))) + ) + + (func (export "as-compare-left") (result i32) + (i32.le_s (i32.load (i32.const 100)) (i32.const 10)) + ) + (func (export "as-compare-right") (result i32) + (i32.ne (i32.const 10) (i32.load (i32.const 100))) + ) + + (func (export "as-memory.grow-size") (result i32) + (memory.grow (i32.load (i32.const 100))) + ) +)`); + +// ./test/core/load.wast:225 +assert_return(() => invoke($3, `as-br-value`, []), [value("i32", 0)]); + +// ./test/core/load.wast:227 +assert_return(() => invoke($3, `as-br_if-cond`, []), []); + +// ./test/core/load.wast:228 +assert_return(() => invoke($3, `as-br_if-value`, []), [value("i32", 0)]); + +// ./test/core/load.wast:229 +assert_return(() => invoke($3, `as-br_if-value-cond`, []), [value("i32", 7)]); + +// ./test/core/load.wast:231 +assert_return(() => invoke($3, `as-br_table-index`, []), []); + +// ./test/core/load.wast:232 +assert_return(() => invoke($3, `as-br_table-value`, []), [value("i32", 0)]); + +// ./test/core/load.wast:233 +assert_return(() => invoke($3, `as-br_table-value-index`, []), [value("i32", 6)]); + +// ./test/core/load.wast:235 +assert_return(() => invoke($3, `as-return-value`, []), [value("i32", 0)]); + +// ./test/core/load.wast:237 +assert_return(() => invoke($3, `as-if-cond`, []), [value("i32", 1)]); + +// ./test/core/load.wast:238 +assert_return(() => invoke($3, `as-if-then`, []), [value("i32", 0)]); + +// ./test/core/load.wast:239 +assert_return(() => invoke($3, `as-if-else`, []), [value("i32", 0)]); + +// ./test/core/load.wast:241 +assert_return(() => invoke($3, `as-select-first`, [0, 1]), [value("i32", 0)]); + +// ./test/core/load.wast:242 +assert_return(() => invoke($3, `as-select-second`, [0, 0]), [value("i32", 0)]); + +// ./test/core/load.wast:243 +assert_return(() => invoke($3, `as-select-cond`, []), [value("i32", 1)]); + +// ./test/core/load.wast:245 +assert_return(() => invoke($3, `as-call-first`, []), [value("i32", -1)]); + +// ./test/core/load.wast:246 +assert_return(() => invoke($3, `as-call-mid`, []), [value("i32", -1)]); + +// ./test/core/load.wast:247 +assert_return(() => invoke($3, `as-call-last`, []), [value("i32", -1)]); + +// ./test/core/load.wast:249 +assert_return(() => invoke($3, `as-call_indirect-first`, []), [value("i32", -1)]); + +// ./test/core/load.wast:250 +assert_return(() => invoke($3, `as-call_indirect-mid`, []), [value("i32", -1)]); + +// ./test/core/load.wast:251 +assert_return(() => invoke($3, `as-call_indirect-last`, []), [value("i32", -1)]); + +// ./test/core/load.wast:252 +assert_return(() => invoke($3, `as-call_indirect-index`, []), [value("i32", -1)]); + +// ./test/core/load.wast:254 +assert_return(() => invoke($3, `as-local.set-value`, []), []); + +// ./test/core/load.wast:255 +assert_return(() => invoke($3, `as-local.tee-value`, []), [value("i32", 0)]); + +// ./test/core/load.wast:256 +assert_return(() => invoke($3, `as-global.set-value`, []), []); + +// ./test/core/load.wast:258 +assert_return(() => invoke($3, `as-load-address`, []), [value("i32", 0)]); + +// ./test/core/load.wast:259 +assert_return(() => invoke($3, `as-loadN-address`, []), [value("i32", 0)]); + +// ./test/core/load.wast:260 +assert_return(() => invoke($3, `as-store-address`, []), []); + +// ./test/core/load.wast:261 +assert_return(() => invoke($3, `as-store-value`, []), []); + +// ./test/core/load.wast:262 +assert_return(() => invoke($3, `as-storeN-address`, []), []); + +// ./test/core/load.wast:263 +assert_return(() => invoke($3, `as-storeN-value`, []), []); + +// ./test/core/load.wast:265 +assert_return(() => invoke($3, `as-unary-operand`, []), [value("i32", 32)]); + +// ./test/core/load.wast:267 +assert_return(() => invoke($3, `as-binary-left`, []), [value("i32", 10)]); + +// ./test/core/load.wast:268 +assert_return(() => invoke($3, `as-binary-right`, []), [value("i32", 10)]); + +// ./test/core/load.wast:270 +assert_return(() => invoke($3, `as-test-operand`, []), [value("i32", 1)]); + +// ./test/core/load.wast:272 +assert_return(() => invoke($3, `as-compare-left`, []), [value("i32", 1)]); + +// ./test/core/load.wast:273 +assert_return(() => invoke($3, `as-compare-right`, []), [value("i32", 1)]); + +// ./test/core/load.wast:275 +assert_return(() => invoke($3, `as-memory.grow-size`, []), [value("i32", 1)]); + +// ./test/core/load.wast:277 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i32) (i32.load32 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:284 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i32) (i32.load32_u (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:291 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i32) (i32.load32_s (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:298 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i32) (i32.load64 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:305 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i32) (i32.load64_u (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:312 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i32) (i32.load64_s (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:320 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i64) (i64.load64 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:327 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i64) (i64.load64_u (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:334 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i64) (i64.load64_s (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:342 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result f32) (f32.load32 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:349 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result f32) (f32.load64 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:357 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result f64) (f64.load32 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:364 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result f64) (f64.load64 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:375 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load_i32 (i32.load (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:379 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load8_s_i32 (i32.load8_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:383 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load8_u_i32 (i32.load8_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:387 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load16_s_i32 (i32.load16_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:391 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load16_u_i32 (i32.load16_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:395 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load_i64 (i64.load (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:399 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load8_s_i64 (i64.load8_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:403 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load8_u_i64 (i64.load8_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:407 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load16_s_i64 (i64.load16_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:411 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load16_u_i64 (i64.load16_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:415 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load32_s_i64 (i64.load32_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:419 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load32_u_i64 (i64.load32_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:423 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load_f32 (f32.load (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:427 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load_f64 (f64.load (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:435 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i32) (i32.load (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:436 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i32) (i32.load8_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:437 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i32) (i32.load8_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:438 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i32) (i32.load16_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:439 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i32) (i32.load16_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:440 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:441 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load8_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:442 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load8_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:443 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load16_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:444 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load16_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:445 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load32_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:446 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load32_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:447 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result f32) (f32.load (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:448 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result f64) (f64.load (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:451 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty + (i32.load) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:460 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-block + (i32.const 0) + (block (i32.load) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:470 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-loop + (i32.const 0) + (loop (i32.load) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:480 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (i32.load) (drop))) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:490 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (i32.load))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:500 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-br + (i32.const 0) + (block (br 0 (i32.load)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:510 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-br_if + (i32.const 0) + (block (br_if 0 (i32.load) (i32.const 1)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:520 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-br_table + (i32.const 0) + (block (br_table 0 (i32.load)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:530 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-return + (return (i32.load)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:539 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-select + (select (i32.load) (i32.const 1) (i32.const 2)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:548 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-call + (call 1 (i32.load)) (drop) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:558 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-address-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (i32.load) (i32.const 0) + ) + (drop) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:575 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-local.set + (local i32) + (local.set 0 (i32.load)) (local.get 0) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:585 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-local.tee + (local i32) + (local.tee 0 (i32.load)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:595 +assert_invalid( + () => instantiate(`(module + (memory 0) + (global $$x (mut i32) (i32.const 0)) + (func $$type-address-empty-in-global.set + (global.set $$x (i32.load)) (global.get $$x) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:605 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-memory.grow + (memory.grow (i32.load)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:614 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-load + (i32.load (i32.load)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:623 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-store + (i32.store (i32.load) (i32.const 1)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/load0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/load0.wast.js new file mode 100644 index 0000000000..67638b1111 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/load0.wast.js @@ -0,0 +1,38 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/load0.wast + +// ./test/core/multi-memory/load0.wast:3 +let $0 = instantiate(`(module + (memory $$mem1 1) + (memory $$mem2 1) + + (func (export "load1") (param i32) (result i64) + (i64.load $$mem1 (local.get 0)) + ) + (func (export "load2") (param i32) (result i64) + (i64.load $$mem2 (local.get 0)) + ) + + (data (memory $$mem1) (i32.const 0) "\\01") + (data (memory $$mem2) (i32.const 0) "\\02") +)`); + +// ./test/core/multi-memory/load0.wast:18 +assert_return(() => invoke($0, `load1`, [0]), [value("i64", 1n)]); + +// ./test/core/multi-memory/load0.wast:19 +assert_return(() => invoke($0, `load2`, [0]), [value("i64", 2n)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/load1.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/load1.wast.js new file mode 100644 index 0000000000..6ba5204bc7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/load1.wast.js @@ -0,0 +1,90 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/load1.wast + +// ./test/core/multi-memory/load1.wast:1 +let $0 = instantiate(`(module $$M + (memory (export "mem") 2) + + (func (export "read") (param i32) (result i32) + (i32.load8_u (local.get 0)) + ) +)`); +register($0, `M`); + +// ./test/core/multi-memory/load1.wast:8 +register($0, `M`); + +// ./test/core/multi-memory/load1.wast:10 +let $1 = instantiate(`(module + (memory $$mem1 (import "M" "mem") 2) + (memory $$mem2 3) + + (data (memory $$mem1) (i32.const 20) "\\01\\02\\03\\04\\05") + (data (memory $$mem2) (i32.const 50) "\\0A\\0B\\0C\\0D\\0E") + + (func (export "read1") (param i32) (result i32) + (i32.load8_u $$mem1 (local.get 0)) + ) + (func (export "read2") (param i32) (result i32) + (i32.load8_u $$mem2 (local.get 0)) + ) +)`); + +// ./test/core/multi-memory/load1.wast:25 +assert_return(() => invoke(`M`, `read`, [20]), [value("i32", 1)]); + +// ./test/core/multi-memory/load1.wast:26 +assert_return(() => invoke(`M`, `read`, [21]), [value("i32", 2)]); + +// ./test/core/multi-memory/load1.wast:27 +assert_return(() => invoke(`M`, `read`, [22]), [value("i32", 3)]); + +// ./test/core/multi-memory/load1.wast:28 +assert_return(() => invoke(`M`, `read`, [23]), [value("i32", 4)]); + +// ./test/core/multi-memory/load1.wast:29 +assert_return(() => invoke(`M`, `read`, [24]), [value("i32", 5)]); + +// ./test/core/multi-memory/load1.wast:31 +assert_return(() => invoke($1, `read1`, [20]), [value("i32", 1)]); + +// ./test/core/multi-memory/load1.wast:32 +assert_return(() => invoke($1, `read1`, [21]), [value("i32", 2)]); + +// ./test/core/multi-memory/load1.wast:33 +assert_return(() => invoke($1, `read1`, [22]), [value("i32", 3)]); + +// ./test/core/multi-memory/load1.wast:34 +assert_return(() => invoke($1, `read1`, [23]), [value("i32", 4)]); + +// ./test/core/multi-memory/load1.wast:35 +assert_return(() => invoke($1, `read1`, [24]), [value("i32", 5)]); + +// ./test/core/multi-memory/load1.wast:37 +assert_return(() => invoke($1, `read2`, [50]), [value("i32", 10)]); + +// ./test/core/multi-memory/load1.wast:38 +assert_return(() => invoke($1, `read2`, [51]), [value("i32", 11)]); + +// ./test/core/multi-memory/load1.wast:39 +assert_return(() => invoke($1, `read2`, [52]), [value("i32", 12)]); + +// ./test/core/multi-memory/load1.wast:40 +assert_return(() => invoke($1, `read2`, [53]), [value("i32", 13)]); + +// ./test/core/multi-memory/load1.wast:41 +assert_return(() => invoke($1, `read2`, [54]), [value("i32", 14)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/load2.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/load2.wast.js new file mode 100644 index 0000000000..de549b845f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/load2.wast.js @@ -0,0 +1,289 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/load2.wast + +// ./test/core/multi-memory/load2.wast:1 +let $0 = instantiate(`(module + (memory 0) + (memory 0) + (memory 0) + (memory $$m 1) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (i32.load $$m (i32.const 0)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (i32.load $$m (i32.const 0)))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (i32.load $$m (i32.const 0)) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 6) (i32.load $$m (i32.const 0)))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (i32.load $$m (i32.const 0)))) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (i32.load $$m (i32.const 0)) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 6) (i32.load $$m (i32.const 0))) (i32.const 7) + ) + ) + + (func (export "as-return-value") (result i32) + (return (i32.load $$m (i32.const 0))) + ) + + (func (export "as-if-cond") (result i32) + (if (result i32) (i32.load $$m (i32.const 0)) + (then (i32.const 0)) (else (i32.const 1)) + ) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) + (then (i32.load $$m (i32.const 0))) (else (i32.const 0)) + ) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 0) + (then (i32.const 0)) (else (i32.load $$m (i32.const 0))) + ) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (select (i32.load $$m (i32.const 0)) (local.get 0) (local.get 1)) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (select (local.get 0) (i32.load $$m (i32.const 0)) (local.get 1)) + ) + (func (export "as-select-cond") (result i32) + (select (i32.const 0) (i32.const 1) (i32.load $$m (i32.const 0))) + ) + + (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (call $$f (i32.load $$m (i32.const 0)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call-mid") (result i32) + (call $$f (i32.const 1) (i32.load $$m (i32.const 0)) (i32.const 3)) + ) + (func (export "as-call-last") (result i32) + (call $$f (i32.const 1) (i32.const 2) (i32.load $$m (i32.const 0))) + ) + + (type $$sig (func (param i32 i32 i32) (result i32))) + (table funcref (elem $$f)) + (func (export "as-call_indirect-first") (result i32) + (call_indirect (type $$sig) + (i32.load $$m (i32.const 0)) (i32.const 2) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.load $$m (i32.const 0)) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (i32.load $$m (i32.const 0)) (i32.const 0) + ) + ) + (func (export "as-call_indirect-index") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (i32.const 3) (i32.load $$m (i32.const 0)) + ) + ) + + (func (export "as-local.set-value") (local i32) + (local.set 0 (i32.load $$m (i32.const 0))) + ) + (func (export "as-local.tee-value") (result i32) (local i32) + (local.tee 0 (i32.load $$m (i32.const 0))) + ) + (global $$g (mut i32) (i32.const 0)) + (func (export "as-global.set-value") (local i32) + (global.set $$g (i32.load $$m (i32.const 0))) + ) + + (func (export "as-load-address") (result i32) + (i32.load $$m (i32.load $$m (i32.const 0))) + ) + (func (export "as-loadN-address") (result i32) + (i32.load8_s $$m (i32.load $$m (i32.const 0))) + ) + + (func (export "as-store-address") + (i32.store $$m (i32.load $$m (i32.const 0)) (i32.const 7)) + ) + (func (export "as-store-value") + (i32.store $$m (i32.const 2) (i32.load $$m (i32.const 0))) + ) + + (func (export "as-storeN-address") + (i32.store8 $$m (i32.load8_s $$m (i32.const 0)) (i32.const 7)) + ) + (func (export "as-storeN-value") + (i32.store16 $$m (i32.const 2) (i32.load $$m (i32.const 0))) + ) + + (func (export "as-unary-operand") (result i32) + (i32.clz (i32.load $$m (i32.const 100))) + ) + + (func (export "as-binary-left") (result i32) + (i32.add (i32.load $$m (i32.const 100)) (i32.const 10)) + ) + (func (export "as-binary-right") (result i32) + (i32.sub (i32.const 10) (i32.load $$m (i32.const 100))) + ) + + (func (export "as-test-operand") (result i32) + (i32.eqz (i32.load $$m (i32.const 100))) + ) + + (func (export "as-compare-left") (result i32) + (i32.le_s (i32.load $$m (i32.const 100)) (i32.const 10)) + ) + (func (export "as-compare-right") (result i32) + (i32.ne (i32.const 10) (i32.load $$m (i32.const 100))) + ) + + (func (export "as-memory.grow-size") (result i32) + (memory.grow $$m (i32.load $$m (i32.const 100))) + ) +)`); + +// ./test/core/multi-memory/load2.wast:162 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/load2.wast:164 +assert_return(() => invoke($0, `as-br_if-cond`, []), []); + +// ./test/core/multi-memory/load2.wast:165 +assert_return(() => invoke($0, `as-br_if-value`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/load2.wast:166 +assert_return(() => invoke($0, `as-br_if-value-cond`, []), [value("i32", 7)]); + +// ./test/core/multi-memory/load2.wast:168 +assert_return(() => invoke($0, `as-br_table-index`, []), []); + +// ./test/core/multi-memory/load2.wast:169 +assert_return(() => invoke($0, `as-br_table-value`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/load2.wast:170 +assert_return(() => invoke($0, `as-br_table-value-index`, []), [value("i32", 6)]); + +// ./test/core/multi-memory/load2.wast:172 +assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/load2.wast:174 +assert_return(() => invoke($0, `as-if-cond`, []), [value("i32", 1)]); + +// ./test/core/multi-memory/load2.wast:175 +assert_return(() => invoke($0, `as-if-then`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/load2.wast:176 +assert_return(() => invoke($0, `as-if-else`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/load2.wast:178 +assert_return(() => invoke($0, `as-select-first`, [0, 1]), [value("i32", 0)]); + +// ./test/core/multi-memory/load2.wast:179 +assert_return(() => invoke($0, `as-select-second`, [0, 0]), [value("i32", 0)]); + +// ./test/core/multi-memory/load2.wast:180 +assert_return(() => invoke($0, `as-select-cond`, []), [value("i32", 1)]); + +// ./test/core/multi-memory/load2.wast:182 +assert_return(() => invoke($0, `as-call-first`, []), [value("i32", -1)]); + +// ./test/core/multi-memory/load2.wast:183 +assert_return(() => invoke($0, `as-call-mid`, []), [value("i32", -1)]); + +// ./test/core/multi-memory/load2.wast:184 +assert_return(() => invoke($0, `as-call-last`, []), [value("i32", -1)]); + +// ./test/core/multi-memory/load2.wast:186 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", -1)]); + +// ./test/core/multi-memory/load2.wast:187 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", -1)]); + +// ./test/core/multi-memory/load2.wast:188 +assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", -1)]); + +// ./test/core/multi-memory/load2.wast:189 +assert_return(() => invoke($0, `as-call_indirect-index`, []), [value("i32", -1)]); + +// ./test/core/multi-memory/load2.wast:191 +assert_return(() => invoke($0, `as-local.set-value`, []), []); + +// ./test/core/multi-memory/load2.wast:192 +assert_return(() => invoke($0, `as-local.tee-value`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/load2.wast:193 +assert_return(() => invoke($0, `as-global.set-value`, []), []); + +// ./test/core/multi-memory/load2.wast:195 +assert_return(() => invoke($0, `as-load-address`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/load2.wast:196 +assert_return(() => invoke($0, `as-loadN-address`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/load2.wast:197 +assert_return(() => invoke($0, `as-store-address`, []), []); + +// ./test/core/multi-memory/load2.wast:198 +assert_return(() => invoke($0, `as-store-value`, []), []); + +// ./test/core/multi-memory/load2.wast:199 +assert_return(() => invoke($0, `as-storeN-address`, []), []); + +// ./test/core/multi-memory/load2.wast:200 +assert_return(() => invoke($0, `as-storeN-value`, []), []); + +// ./test/core/multi-memory/load2.wast:202 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("i32", 32)]); + +// ./test/core/multi-memory/load2.wast:204 +assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 10)]); + +// ./test/core/multi-memory/load2.wast:205 +assert_return(() => invoke($0, `as-binary-right`, []), [value("i32", 10)]); + +// ./test/core/multi-memory/load2.wast:207 +assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 1)]); + +// ./test/core/multi-memory/load2.wast:209 +assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 1)]); + +// ./test/core/multi-memory/load2.wast:210 +assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 1)]); + +// ./test/core/multi-memory/load2.wast:212 +assert_return(() => invoke($0, `as-memory.grow-size`, []), [value("i32", 1)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory-multi.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory-multi.wast.js new file mode 100644 index 0000000000..8d9503ee59 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory-multi.wast.js @@ -0,0 +1,62 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory-multi.wast + +// ./test/core/memory-multi.wast:5 +let $0 = instantiate(`(module + (memory $$mem1 1) + (memory $$mem2 1) + + (func (export "init1") (result i32) + (memory.init $$mem1 $$d (i32.const 1) (i32.const 0) (i32.const 4)) + (i32.load $$mem1 (i32.const 1)) + ) + + (func (export "init2") (result i32) + (memory.init $$mem2 $$d (i32.const 1) (i32.const 4) (i32.const 4)) + (i32.load $$mem2 (i32.const 1)) + ) + + (data $$d "\\01\\00\\00\\00" "\\02\\00\\00\\00") +)`); + +// ./test/core/memory-multi.wast:22 +assert_return(() => invoke($0, `init1`, []), [value("i32", 1)]); + +// ./test/core/memory-multi.wast:23 +assert_return(() => invoke($0, `init2`, []), [value("i32", 2)]); + +// ./test/core/memory-multi.wast:26 +let $1 = instantiate(`(module + (memory $$mem1 1) + (memory $$mem2 1) + + (func (export "fill1") (result i32) + (memory.fill $$mem1 (i32.const 1) (i32.const 0x01) (i32.const 4)) + (i32.load $$mem1 (i32.const 1)) + ) + + (func (export "fill2") (result i32) + (memory.fill $$mem2 (i32.const 1) (i32.const 0x02) (i32.const 2)) + (i32.load $$mem2 (i32.const 1)) + ) +)`); + +// ./test/core/memory-multi.wast:41 +assert_return(() => invoke($1, `fill1`, []), [value("i32", 16843009)]); + +// ./test/core/memory-multi.wast:42 +assert_return(() => invoke($1, `fill2`, []), [value("i32", 514)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory.wast.js new file mode 100644 index 0000000000..170b4f860f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory.wast.js @@ -0,0 +1,390 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory.wast + +// ./test/core/memory.wast:3 +let $0 = instantiate(`(module (memory 0))`); + +// ./test/core/memory.wast:4 +let $1 = instantiate(`(module (memory 1))`); + +// ./test/core/memory.wast:5 +let $2 = instantiate(`(module (memory 0 0))`); + +// ./test/core/memory.wast:6 +let $3 = instantiate(`(module (memory 0 1))`); + +// ./test/core/memory.wast:7 +let $4 = instantiate(`(module (memory 1 256))`); + +// ./test/core/memory.wast:8 +let $5 = instantiate(`(module (memory 0 65536))`); + +// ./test/core/memory.wast:10 +let $6 = instantiate(`(module (memory (data)) (func (export "memsize") (result i32) (memory.size)))`); + +// ./test/core/memory.wast:11 +assert_return(() => invoke($6, `memsize`, []), [value("i32", 0)]); + +// ./test/core/memory.wast:12 +let $7 = instantiate(`(module (memory (data "")) (func (export "memsize") (result i32) (memory.size)))`); + +// ./test/core/memory.wast:13 +assert_return(() => invoke($7, `memsize`, []), [value("i32", 0)]); + +// ./test/core/memory.wast:14 +let $8 = instantiate(`(module (memory (data "x")) (func (export "memsize") (result i32) (memory.size)))`); + +// ./test/core/memory.wast:15 +assert_return(() => invoke($8, `memsize`, []), [value("i32", 1)]); + +// ./test/core/memory.wast:17 +assert_invalid(() => instantiate(`(module (data (i32.const 0)))`), `unknown memory`); + +// ./test/core/memory.wast:18 +assert_invalid(() => instantiate(`(module (data (i32.const 0) ""))`), `unknown memory`); + +// ./test/core/memory.wast:19 +assert_invalid(() => instantiate(`(module (data (i32.const 0) "x"))`), `unknown memory`); + +// ./test/core/memory.wast:21 +assert_invalid( + () => instantiate(`(module (func (drop (f32.load (i32.const 0)))))`), + `unknown memory`, +); + +// ./test/core/memory.wast:25 +assert_invalid( + () => instantiate(`(module (func (f32.store (i32.const 0) (f32.const 0))))`), + `unknown memory`, +); + +// ./test/core/memory.wast:29 +assert_invalid( + () => instantiate(`(module (func (drop (i32.load8_s (i32.const 0)))))`), + `unknown memory`, +); + +// ./test/core/memory.wast:33 +assert_invalid( + () => instantiate(`(module (func (i32.store8 (i32.const 0) (i32.const 0))))`), + `unknown memory`, +); + +// ./test/core/memory.wast:37 +assert_invalid( + () => instantiate(`(module (func (drop (memory.size))))`), + `unknown memory`, +); + +// ./test/core/memory.wast:41 +assert_invalid( + () => instantiate(`(module (func (drop (memory.grow (i32.const 0)))))`), + `unknown memory`, +); + +// ./test/core/memory.wast:47 +assert_invalid( + () => instantiate(`(module (memory 1 0))`), + `size minimum must not be greater than maximum`, +); + +// ./test/core/memory.wast:51 +assert_invalid( + () => instantiate(`(module (memory 65537))`), + `memory size must be at most 65536 pages (4GiB)`, +); + +// ./test/core/memory.wast:55 +assert_invalid( + () => instantiate(`(module (memory 2147483648))`), + `memory size must be at most 65536 pages (4GiB)`, +); + +// ./test/core/memory.wast:59 +assert_invalid( + () => instantiate(`(module (memory 4294967295))`), + `memory size must be at most 65536 pages (4GiB)`, +); + +// ./test/core/memory.wast:63 +assert_invalid( + () => instantiate(`(module (memory 0 65537))`), + `memory size must be at most 65536 pages (4GiB)`, +); + +// ./test/core/memory.wast:67 +assert_invalid( + () => instantiate(`(module (memory 0 2147483648))`), + `memory size must be at most 65536 pages (4GiB)`, +); + +// ./test/core/memory.wast:71 +assert_invalid( + () => instantiate(`(module (memory 0 4294967295))`), + `memory size must be at most 65536 pages (4GiB)`, +); + +// ./test/core/memory.wast:76 +assert_malformed( + () => instantiate(`(memory 0x1_0000_0000) `), + `i32 constant out of range`, +); + +// ./test/core/memory.wast:80 +assert_malformed( + () => instantiate(`(memory 0x1_0000_0000 0x1_0000_0000) `), + `i32 constant out of range`, +); + +// ./test/core/memory.wast:84 +assert_malformed( + () => instantiate(`(memory 0 0x1_0000_0000) `), + `i32 constant out of range`, +); + +// ./test/core/memory.wast:89 +let $9 = instantiate(`(module + (memory 1) + (data (i32.const 0) "ABC\\a7D") (data (i32.const 20) "WASM") + + ;; Data section + (func (export "data") (result i32) + (i32.and + (i32.and + (i32.and + (i32.eq (i32.load8_u (i32.const 0)) (i32.const 65)) + (i32.eq (i32.load8_u (i32.const 3)) (i32.const 167)) + ) + (i32.and + (i32.eq (i32.load8_u (i32.const 6)) (i32.const 0)) + (i32.eq (i32.load8_u (i32.const 19)) (i32.const 0)) + ) + ) + (i32.and + (i32.and + (i32.eq (i32.load8_u (i32.const 20)) (i32.const 87)) + (i32.eq (i32.load8_u (i32.const 23)) (i32.const 77)) + ) + (i32.and + (i32.eq (i32.load8_u (i32.const 24)) (i32.const 0)) + (i32.eq (i32.load8_u (i32.const 1023)) (i32.const 0)) + ) + ) + ) + ) + + ;; Memory cast + (func (export "cast") (result f64) + (i64.store (i32.const 8) (i64.const -12345)) + (if + (f64.eq + (f64.load (i32.const 8)) + (f64.reinterpret_i64 (i64.const -12345)) + ) + (then (return (f64.const 0))) + ) + (i64.store align=1 (i32.const 9) (i64.const 0)) + (i32.store16 align=1 (i32.const 15) (i32.const 16453)) + (f64.load align=1 (i32.const 9)) + ) + + ;; Sign and zero extending memory loads + (func (export "i32_load8_s") (param $$i i32) (result i32) + (i32.store8 (i32.const 8) (local.get $$i)) + (i32.load8_s (i32.const 8)) + ) + (func (export "i32_load8_u") (param $$i i32) (result i32) + (i32.store8 (i32.const 8) (local.get $$i)) + (i32.load8_u (i32.const 8)) + ) + (func (export "i32_load16_s") (param $$i i32) (result i32) + (i32.store16 (i32.const 8) (local.get $$i)) + (i32.load16_s (i32.const 8)) + ) + (func (export "i32_load16_u") (param $$i i32) (result i32) + (i32.store16 (i32.const 8) (local.get $$i)) + (i32.load16_u (i32.const 8)) + ) + (func (export "i64_load8_s") (param $$i i64) (result i64) + (i64.store8 (i32.const 8) (local.get $$i)) + (i64.load8_s (i32.const 8)) + ) + (func (export "i64_load8_u") (param $$i i64) (result i64) + (i64.store8 (i32.const 8) (local.get $$i)) + (i64.load8_u (i32.const 8)) + ) + (func (export "i64_load16_s") (param $$i i64) (result i64) + (i64.store16 (i32.const 8) (local.get $$i)) + (i64.load16_s (i32.const 8)) + ) + (func (export "i64_load16_u") (param $$i i64) (result i64) + (i64.store16 (i32.const 8) (local.get $$i)) + (i64.load16_u (i32.const 8)) + ) + (func (export "i64_load32_s") (param $$i i64) (result i64) + (i64.store32 (i32.const 8) (local.get $$i)) + (i64.load32_s (i32.const 8)) + ) + (func (export "i64_load32_u") (param $$i i64) (result i64) + (i64.store32 (i32.const 8) (local.get $$i)) + (i64.load32_u (i32.const 8)) + ) +)`); + +// ./test/core/memory.wast:177 +assert_return(() => invoke($9, `data`, []), [value("i32", 1)]); + +// ./test/core/memory.wast:178 +assert_return(() => invoke($9, `cast`, []), [value("f64", 42)]); + +// ./test/core/memory.wast:180 +assert_return(() => invoke($9, `i32_load8_s`, [-1]), [value("i32", -1)]); + +// ./test/core/memory.wast:181 +assert_return(() => invoke($9, `i32_load8_u`, [-1]), [value("i32", 255)]); + +// ./test/core/memory.wast:182 +assert_return(() => invoke($9, `i32_load16_s`, [-1]), [value("i32", -1)]); + +// ./test/core/memory.wast:183 +assert_return(() => invoke($9, `i32_load16_u`, [-1]), [value("i32", 65535)]); + +// ./test/core/memory.wast:185 +assert_return(() => invoke($9, `i32_load8_s`, [100]), [value("i32", 100)]); + +// ./test/core/memory.wast:186 +assert_return(() => invoke($9, `i32_load8_u`, [200]), [value("i32", 200)]); + +// ./test/core/memory.wast:187 +assert_return(() => invoke($9, `i32_load16_s`, [20000]), [value("i32", 20000)]); + +// ./test/core/memory.wast:188 +assert_return(() => invoke($9, `i32_load16_u`, [40000]), [value("i32", 40000)]); + +// ./test/core/memory.wast:190 +assert_return(() => invoke($9, `i32_load8_s`, [-19110589]), [value("i32", 67)]); + +// ./test/core/memory.wast:191 +assert_return(() => invoke($9, `i32_load8_s`, [878104047]), [value("i32", -17)]); + +// ./test/core/memory.wast:192 +assert_return(() => invoke($9, `i32_load8_u`, [-19110589]), [value("i32", 67)]); + +// ./test/core/memory.wast:193 +assert_return(() => invoke($9, `i32_load8_u`, [878104047]), [value("i32", 239)]); + +// ./test/core/memory.wast:194 +assert_return(() => invoke($9, `i32_load16_s`, [-19110589]), [value("i32", 25923)]); + +// ./test/core/memory.wast:195 +assert_return(() => invoke($9, `i32_load16_s`, [878104047]), [value("i32", -12817)]); + +// ./test/core/memory.wast:196 +assert_return(() => invoke($9, `i32_load16_u`, [-19110589]), [value("i32", 25923)]); + +// ./test/core/memory.wast:197 +assert_return(() => invoke($9, `i32_load16_u`, [878104047]), [value("i32", 52719)]); + +// ./test/core/memory.wast:199 +assert_return(() => invoke($9, `i64_load8_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/memory.wast:200 +assert_return(() => invoke($9, `i64_load8_u`, [-1n]), [value("i64", 255n)]); + +// ./test/core/memory.wast:201 +assert_return(() => invoke($9, `i64_load16_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/memory.wast:202 +assert_return(() => invoke($9, `i64_load16_u`, [-1n]), [value("i64", 65535n)]); + +// ./test/core/memory.wast:203 +assert_return(() => invoke($9, `i64_load32_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/memory.wast:204 +assert_return(() => invoke($9, `i64_load32_u`, [-1n]), [value("i64", 4294967295n)]); + +// ./test/core/memory.wast:206 +assert_return(() => invoke($9, `i64_load8_s`, [100n]), [value("i64", 100n)]); + +// ./test/core/memory.wast:207 +assert_return(() => invoke($9, `i64_load8_u`, [200n]), [value("i64", 200n)]); + +// ./test/core/memory.wast:208 +assert_return(() => invoke($9, `i64_load16_s`, [20000n]), [value("i64", 20000n)]); + +// ./test/core/memory.wast:209 +assert_return(() => invoke($9, `i64_load16_u`, [40000n]), [value("i64", 40000n)]); + +// ./test/core/memory.wast:210 +assert_return(() => invoke($9, `i64_load32_s`, [20000n]), [value("i64", 20000n)]); + +// ./test/core/memory.wast:211 +assert_return(() => invoke($9, `i64_load32_u`, [40000n]), [value("i64", 40000n)]); + +// ./test/core/memory.wast:213 +assert_return(() => invoke($9, `i64_load8_s`, [-81985529755441853n]), [value("i64", 67n)]); + +// ./test/core/memory.wast:214 +assert_return(() => invoke($9, `i64_load8_s`, [3771275841602506223n]), [value("i64", -17n)]); + +// ./test/core/memory.wast:215 +assert_return(() => invoke($9, `i64_load8_u`, [-81985529755441853n]), [value("i64", 67n)]); + +// ./test/core/memory.wast:216 +assert_return(() => invoke($9, `i64_load8_u`, [3771275841602506223n]), [value("i64", 239n)]); + +// ./test/core/memory.wast:217 +assert_return(() => invoke($9, `i64_load16_s`, [-81985529755441853n]), [value("i64", 25923n)]); + +// ./test/core/memory.wast:218 +assert_return(() => invoke($9, `i64_load16_s`, [3771275841602506223n]), [value("i64", -12817n)]); + +// ./test/core/memory.wast:219 +assert_return(() => invoke($9, `i64_load16_u`, [-81985529755441853n]), [value("i64", 25923n)]); + +// ./test/core/memory.wast:220 +assert_return(() => invoke($9, `i64_load16_u`, [3771275841602506223n]), [value("i64", 52719n)]); + +// ./test/core/memory.wast:221 +assert_return(() => invoke($9, `i64_load32_s`, [-81985529755441853n]), [value("i64", 1446274371n)]); + +// ./test/core/memory.wast:222 +assert_return(() => invoke($9, `i64_load32_s`, [3771275841602506223n]), [value("i64", -1732588049n)]); + +// ./test/core/memory.wast:223 +assert_return(() => invoke($9, `i64_load32_u`, [-81985529755441853n]), [value("i64", 1446274371n)]); + +// ./test/core/memory.wast:224 +assert_return(() => invoke($9, `i64_load32_u`, [3771275841602506223n]), [value("i64", 2562379247n)]); + +// ./test/core/memory.wast:228 +assert_malformed( + () => instantiate(`(memory $$foo 1) (memory $$foo 1) `), + `duplicate memory`, +); + +// ./test/core/memory.wast:232 +assert_malformed( + () => instantiate(`(import "" "" (memory $$foo 1)) (memory $$foo 1) `), + `duplicate memory`, +); + +// ./test/core/memory.wast:236 +assert_malformed( + () => instantiate(`(import "" "" (memory $$foo 1)) (import "" "" (memory $$foo 1)) `), + `duplicate memory`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_copy0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_copy0.wast.js new file mode 100644 index 0000000000..abd99c0597 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_copy0.wast.js @@ -0,0 +1,117 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/memory_copy0.wast + +// ./test/core/multi-memory/memory_copy0.wast:2 +let $0 = instantiate(`(module + (memory $$mem0 (data "\\ff\\11\\44\\ee")) + (memory $$mem1 (data "\\ee\\22\\55\\ff")) + (memory $$mem2 (data "\\dd\\33\\66\\00")) + (memory $$mem3 (data "\\aa\\bb\\cc\\dd")) + + (func (export "copy") (param i32 i32 i32) + (memory.copy $$mem3 $$mem3 + (local.get 0) + (local.get 1) + (local.get 2))) + + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u $$mem3 (local.get 0))) +)`); + +// ./test/core/multi-memory/memory_copy0.wast:19 +invoke($0, `copy`, [10, 0, 4]); + +// ./test/core/multi-memory/memory_copy0.wast:21 +assert_return(() => invoke($0, `load8_u`, [9]), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_copy0.wast:22 +assert_return(() => invoke($0, `load8_u`, [10]), [value("i32", 170)]); + +// ./test/core/multi-memory/memory_copy0.wast:23 +assert_return(() => invoke($0, `load8_u`, [11]), [value("i32", 187)]); + +// ./test/core/multi-memory/memory_copy0.wast:24 +assert_return(() => invoke($0, `load8_u`, [12]), [value("i32", 204)]); + +// ./test/core/multi-memory/memory_copy0.wast:25 +assert_return(() => invoke($0, `load8_u`, [13]), [value("i32", 221)]); + +// ./test/core/multi-memory/memory_copy0.wast:26 +assert_return(() => invoke($0, `load8_u`, [14]), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_copy0.wast:29 +invoke($0, `copy`, [8, 10, 4]); + +// ./test/core/multi-memory/memory_copy0.wast:30 +assert_return(() => invoke($0, `load8_u`, [8]), [value("i32", 170)]); + +// ./test/core/multi-memory/memory_copy0.wast:31 +assert_return(() => invoke($0, `load8_u`, [9]), [value("i32", 187)]); + +// ./test/core/multi-memory/memory_copy0.wast:32 +assert_return(() => invoke($0, `load8_u`, [10]), [value("i32", 204)]); + +// ./test/core/multi-memory/memory_copy0.wast:33 +assert_return(() => invoke($0, `load8_u`, [11]), [value("i32", 221)]); + +// ./test/core/multi-memory/memory_copy0.wast:34 +assert_return(() => invoke($0, `load8_u`, [12]), [value("i32", 204)]); + +// ./test/core/multi-memory/memory_copy0.wast:35 +assert_return(() => invoke($0, `load8_u`, [13]), [value("i32", 221)]); + +// ./test/core/multi-memory/memory_copy0.wast:38 +invoke($0, `copy`, [10, 7, 6]); + +// ./test/core/multi-memory/memory_copy0.wast:39 +assert_return(() => invoke($0, `load8_u`, [10]), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_copy0.wast:40 +assert_return(() => invoke($0, `load8_u`, [11]), [value("i32", 170)]); + +// ./test/core/multi-memory/memory_copy0.wast:41 +assert_return(() => invoke($0, `load8_u`, [12]), [value("i32", 187)]); + +// ./test/core/multi-memory/memory_copy0.wast:42 +assert_return(() => invoke($0, `load8_u`, [13]), [value("i32", 204)]); + +// ./test/core/multi-memory/memory_copy0.wast:43 +assert_return(() => invoke($0, `load8_u`, [14]), [value("i32", 221)]); + +// ./test/core/multi-memory/memory_copy0.wast:44 +assert_return(() => invoke($0, `load8_u`, [15]), [value("i32", 204)]); + +// ./test/core/multi-memory/memory_copy0.wast:45 +assert_return(() => invoke($0, `load8_u`, [16]), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_copy0.wast:48 +invoke($0, `copy`, [65280, 0, 256]); + +// ./test/core/multi-memory/memory_copy0.wast:49 +invoke($0, `copy`, [65024, 65280, 256]); + +// ./test/core/multi-memory/memory_copy0.wast:52 +invoke($0, `copy`, [65536, 0, 0]); + +// ./test/core/multi-memory/memory_copy0.wast:53 +invoke($0, `copy`, [0, 65536, 0]); + +// ./test/core/multi-memory/memory_copy0.wast:56 +assert_trap(() => invoke($0, `copy`, [65537, 0, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_copy0.wast:58 +assert_trap(() => invoke($0, `copy`, [0, 65537, 0]), `out of bounds memory access`); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_fill0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_fill0.wast.js new file mode 100644 index 0000000000..2bc3eef0c8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_fill0.wast.js @@ -0,0 +1,77 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/memory_fill0.wast + +// ./test/core/multi-memory/memory_fill0.wast:2 +let $0 = instantiate(`(module + (memory $$mem0 0) + (memory $$mem1 0) + (memory $$mem2 1) + + (func (export "fill") (param i32 i32 i32) + (memory.fill $$mem2 + (local.get 0) + (local.get 1) + (local.get 2))) + + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u $$mem2 (local.get 0))) +)`); + +// ./test/core/multi-memory/memory_fill0.wast:18 +invoke($0, `fill`, [1, 255, 3]); + +// ./test/core/multi-memory/memory_fill0.wast:19 +assert_return(() => invoke($0, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_fill0.wast:20 +assert_return(() => invoke($0, `load8_u`, [1]), [value("i32", 255)]); + +// ./test/core/multi-memory/memory_fill0.wast:21 +assert_return(() => invoke($0, `load8_u`, [2]), [value("i32", 255)]); + +// ./test/core/multi-memory/memory_fill0.wast:22 +assert_return(() => invoke($0, `load8_u`, [3]), [value("i32", 255)]); + +// ./test/core/multi-memory/memory_fill0.wast:23 +assert_return(() => invoke($0, `load8_u`, [4]), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_fill0.wast:26 +invoke($0, `fill`, [0, 48042, 2]); + +// ./test/core/multi-memory/memory_fill0.wast:27 +assert_return(() => invoke($0, `load8_u`, [0]), [value("i32", 170)]); + +// ./test/core/multi-memory/memory_fill0.wast:28 +assert_return(() => invoke($0, `load8_u`, [1]), [value("i32", 170)]); + +// ./test/core/multi-memory/memory_fill0.wast:31 +invoke($0, `fill`, [0, 0, 65536]); + +// ./test/core/multi-memory/memory_fill0.wast:34 +assert_trap(() => invoke($0, `fill`, [65280, 1, 257]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_fill0.wast:36 +assert_return(() => invoke($0, `load8_u`, [65280]), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_fill0.wast:37 +assert_return(() => invoke($0, `load8_u`, [65535]), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_fill0.wast:40 +invoke($0, `fill`, [65536, 0, 0]); + +// ./test/core/multi-memory/memory_fill0.wast:43 +assert_trap(() => invoke($0, `fill`, [65537, 0, 0]), `out of bounds memory access`); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_grow.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_grow.wast.js new file mode 100644 index 0000000000..6cef74d6ba --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_grow.wast.js @@ -0,0 +1,773 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory_grow.wast + +// ./test/core/memory_grow.wast:1 +let $0 = instantiate(`(module + (memory 0) + (func (export "grow") (param i32) (result i32) (memory.grow (local.get 0))) +)`); + +// ./test/core/memory_grow.wast:6 +assert_return(() => invoke($0, `grow`, [0]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:7 +assert_return(() => invoke($0, `grow`, [1]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:8 +assert_return(() => invoke($0, `grow`, [0]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:9 +assert_return(() => invoke($0, `grow`, [2]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:10 +assert_return(() => invoke($0, `grow`, [800]), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:11 +assert_return(() => invoke($0, `grow`, [65536]), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:12 +assert_return(() => invoke($0, `grow`, [64736]), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:13 +assert_return(() => invoke($0, `grow`, [1]), [value("i32", 803)]); + +// ./test/core/memory_grow.wast:15 +let $1 = instantiate(`(module + (memory 0 10) + (func (export "grow") (param i32) (result i32) (memory.grow (local.get 0))) +)`); + +// ./test/core/memory_grow.wast:20 +assert_return(() => invoke($1, `grow`, [0]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:21 +assert_return(() => invoke($1, `grow`, [1]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:22 +assert_return(() => invoke($1, `grow`, [1]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:23 +assert_return(() => invoke($1, `grow`, [2]), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:24 +assert_return(() => invoke($1, `grow`, [6]), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:25 +assert_return(() => invoke($1, `grow`, [0]), [value("i32", 10)]); + +// ./test/core/memory_grow.wast:26 +assert_return(() => invoke($1, `grow`, [1]), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:27 +assert_return(() => invoke($1, `grow`, [65536]), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:32 +let $2 = instantiate(`(module + (memory 1) + (func (export "grow") (param i32) (result i32) + (memory.grow (local.get 0)) + ) + (func (export "check-memory-zero") (param i32 i32) (result i32) + (local i32) + (local.set 2 (i32.const 1)) + (block + (loop + (local.set 2 (i32.load8_u (local.get 0))) + (br_if 1 (i32.ne (local.get 2) (i32.const 0))) + (br_if 1 (i32.ge_u (local.get 0) (local.get 1))) + (local.set 0 (i32.add (local.get 0) (i32.const 1))) + (br_if 0 (i32.le_u (local.get 0) (local.get 1))) + ) + ) + (local.get 2) + ) +)`); + +// ./test/core/memory_grow.wast:53 +assert_return(() => invoke($2, `check-memory-zero`, [0, 65535]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:54 +assert_return(() => invoke($2, `grow`, [1]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:55 +assert_return(() => invoke($2, `check-memory-zero`, [65536, 131071]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:56 +assert_return(() => invoke($2, `grow`, [1]), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:57 +assert_return(() => invoke($2, `check-memory-zero`, [131072, 196607]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:58 +assert_return(() => invoke($2, `grow`, [1]), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:59 +assert_return(() => invoke($2, `check-memory-zero`, [196608, 262143]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:60 +assert_return(() => invoke($2, `grow`, [1]), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:61 +assert_return(() => invoke($2, `check-memory-zero`, [262144, 327679]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:62 +assert_return(() => invoke($2, `grow`, [1]), [value("i32", 5)]); + +// ./test/core/memory_grow.wast:63 +assert_return(() => invoke($2, `check-memory-zero`, [327680, 393215]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:68 +let $3 = instantiate(`(module + (memory 0) + + (func (export "load_at_zero") (result i32) (i32.load (i32.const 0))) + (func (export "store_at_zero") (i32.store (i32.const 0) (i32.const 2))) + + (func (export "load_at_page_size") (result i32) + (i32.load (i32.const 0x10000)) + ) + (func (export "store_at_page_size") + (i32.store (i32.const 0x10000) (i32.const 3)) + ) + + (func (export "grow") (param i32) (result i32) (memory.grow (local.get 0))) + (func (export "size") (result i32) (memory.size)) +)`); + +// ./test/core/memory_grow.wast:85 +assert_return(() => invoke($3, `size`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:86 +assert_trap(() => invoke($3, `store_at_zero`, []), `out of bounds memory access`); + +// ./test/core/memory_grow.wast:87 +assert_trap(() => invoke($3, `load_at_zero`, []), `out of bounds memory access`); + +// ./test/core/memory_grow.wast:88 +assert_trap(() => invoke($3, `store_at_page_size`, []), `out of bounds memory access`); + +// ./test/core/memory_grow.wast:89 +assert_trap(() => invoke($3, `load_at_page_size`, []), `out of bounds memory access`); + +// ./test/core/memory_grow.wast:90 +assert_return(() => invoke($3, `grow`, [1]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:91 +assert_return(() => invoke($3, `size`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:92 +assert_return(() => invoke($3, `load_at_zero`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:93 +assert_return(() => invoke($3, `store_at_zero`, []), []); + +// ./test/core/memory_grow.wast:94 +assert_return(() => invoke($3, `load_at_zero`, []), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:95 +assert_trap(() => invoke($3, `store_at_page_size`, []), `out of bounds memory access`); + +// ./test/core/memory_grow.wast:96 +assert_trap(() => invoke($3, `load_at_page_size`, []), `out of bounds memory access`); + +// ./test/core/memory_grow.wast:97 +assert_return(() => invoke($3, `grow`, [4]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:98 +assert_return(() => invoke($3, `size`, []), [value("i32", 5)]); + +// ./test/core/memory_grow.wast:99 +assert_return(() => invoke($3, `load_at_zero`, []), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:100 +assert_return(() => invoke($3, `store_at_zero`, []), []); + +// ./test/core/memory_grow.wast:101 +assert_return(() => invoke($3, `load_at_zero`, []), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:102 +assert_return(() => invoke($3, `load_at_page_size`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:103 +assert_return(() => invoke($3, `store_at_page_size`, []), []); + +// ./test/core/memory_grow.wast:104 +assert_return(() => invoke($3, `load_at_page_size`, []), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:109 +let $4 = instantiate(`(module + (memory (export "mem1") 2 5) + (memory (export "mem2") 0) +)`); + +// ./test/core/memory_grow.wast:113 +register($4, `M`); + +// ./test/core/memory_grow.wast:115 +let $5 = instantiate(`(module + (memory $$mem1 (import "M" "mem1") 1 6) + (memory $$mem2 (import "M" "mem2") 0) + (memory $$mem3 3) + (memory $$mem4 4 5) + + (func (export "size1") (result i32) (memory.size $$mem1)) + (func (export "size2") (result i32) (memory.size $$mem2)) + (func (export "size3") (result i32) (memory.size $$mem3)) + (func (export "size4") (result i32) (memory.size $$mem4)) + + (func (export "grow1") (param i32) (result i32) + (memory.grow $$mem1 (local.get 0)) + ) + (func (export "grow2") (param i32) (result i32) + (memory.grow $$mem2 (local.get 0)) + ) + (func (export "grow3") (param i32) (result i32) + (memory.grow $$mem3 (local.get 0)) + ) + (func (export "grow4") (param i32) (result i32) + (memory.grow $$mem4 (local.get 0)) + ) +)`); + +// ./test/core/memory_grow.wast:140 +assert_return(() => invoke($5, `size1`, []), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:141 +assert_return(() => invoke($5, `size2`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:142 +assert_return(() => invoke($5, `size3`, []), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:143 +assert_return(() => invoke($5, `size4`, []), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:145 +assert_return(() => invoke($5, `grow1`, [1]), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:146 +assert_return(() => invoke($5, `size1`, []), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:147 +assert_return(() => invoke($5, `size2`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:148 +assert_return(() => invoke($5, `size3`, []), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:149 +assert_return(() => invoke($5, `size4`, []), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:151 +assert_return(() => invoke($5, `grow1`, [2]), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:152 +assert_return(() => invoke($5, `size1`, []), [value("i32", 5)]); + +// ./test/core/memory_grow.wast:153 +assert_return(() => invoke($5, `size2`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:154 +assert_return(() => invoke($5, `size3`, []), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:155 +assert_return(() => invoke($5, `size4`, []), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:157 +assert_return(() => invoke($5, `grow1`, [1]), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:158 +assert_return(() => invoke($5, `size1`, []), [value("i32", 5)]); + +// ./test/core/memory_grow.wast:159 +assert_return(() => invoke($5, `size2`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:160 +assert_return(() => invoke($5, `size3`, []), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:161 +assert_return(() => invoke($5, `size4`, []), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:163 +assert_return(() => invoke($5, `grow2`, [10]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:164 +assert_return(() => invoke($5, `size1`, []), [value("i32", 5)]); + +// ./test/core/memory_grow.wast:165 +assert_return(() => invoke($5, `size2`, []), [value("i32", 10)]); + +// ./test/core/memory_grow.wast:166 +assert_return(() => invoke($5, `size3`, []), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:167 +assert_return(() => invoke($5, `size4`, []), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:169 +assert_return(() => invoke($5, `grow3`, [268435456]), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:170 +assert_return(() => invoke($5, `size1`, []), [value("i32", 5)]); + +// ./test/core/memory_grow.wast:171 +assert_return(() => invoke($5, `size2`, []), [value("i32", 10)]); + +// ./test/core/memory_grow.wast:172 +assert_return(() => invoke($5, `size3`, []), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:173 +assert_return(() => invoke($5, `size4`, []), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:175 +assert_return(() => invoke($5, `grow3`, [3]), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:176 +assert_return(() => invoke($5, `size1`, []), [value("i32", 5)]); + +// ./test/core/memory_grow.wast:177 +assert_return(() => invoke($5, `size2`, []), [value("i32", 10)]); + +// ./test/core/memory_grow.wast:178 +assert_return(() => invoke($5, `size3`, []), [value("i32", 6)]); + +// ./test/core/memory_grow.wast:179 +assert_return(() => invoke($5, `size4`, []), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:181 +assert_return(() => invoke($5, `grow4`, [1]), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:182 +assert_return(() => invoke($5, `grow4`, [1]), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:183 +assert_return(() => invoke($5, `size1`, []), [value("i32", 5)]); + +// ./test/core/memory_grow.wast:184 +assert_return(() => invoke($5, `size2`, []), [value("i32", 10)]); + +// ./test/core/memory_grow.wast:185 +assert_return(() => invoke($5, `size3`, []), [value("i32", 6)]); + +// ./test/core/memory_grow.wast:186 +assert_return(() => invoke($5, `size4`, []), [value("i32", 5)]); + +// ./test/core/memory_grow.wast:191 +let $6 = instantiate(`(module + (memory 1) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (memory.grow (i32.const 0)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (memory.grow (i32.const 0)))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (memory.grow (i32.const 0)) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 6) (memory.grow (i32.const 0)))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (memory.grow (i32.const 0)))) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (memory.grow (i32.const 0)) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 6) (memory.grow (i32.const 0))) (i32.const 7) + ) + ) + + (func (export "as-return-value") (result i32) + (return (memory.grow (i32.const 0))) + ) + + (func (export "as-if-cond") (result i32) + (if (result i32) (memory.grow (i32.const 0)) + (then (i32.const 0)) (else (i32.const 1)) + ) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) + (then (memory.grow (i32.const 0))) (else (i32.const 0)) + ) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 0) + (then (i32.const 0)) (else (memory.grow (i32.const 0))) + ) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (select (memory.grow (i32.const 0)) (local.get 0) (local.get 1)) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (select (local.get 0) (memory.grow (i32.const 0)) (local.get 1)) + ) + (func (export "as-select-cond") (result i32) + (select (i32.const 0) (i32.const 1) (memory.grow (i32.const 0))) + ) + + (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (call $$f (memory.grow (i32.const 0)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call-mid") (result i32) + (call $$f (i32.const 1) (memory.grow (i32.const 0)) (i32.const 3)) + ) + (func (export "as-call-last") (result i32) + (call $$f (i32.const 1) (i32.const 2) (memory.grow (i32.const 0))) + ) + + (type $$sig (func (param i32 i32 i32) (result i32))) + (table funcref (elem $$f)) + (func (export "as-call_indirect-first") (result i32) + (call_indirect (type $$sig) + (memory.grow (i32.const 0)) (i32.const 2) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (memory.grow (i32.const 0)) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (memory.grow (i32.const 0)) (i32.const 0) + ) + ) + (func (export "as-call_indirect-index") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (i32.const 3) (memory.grow (i32.const 0)) + ) + ) + + (func (export "as-local.set-value") (local i32) + (local.set 0 (memory.grow (i32.const 0))) + ) + (func (export "as-local.tee-value") (result i32) (local i32) + (local.tee 0 (memory.grow (i32.const 0))) + ) + (global $$g (mut i32) (i32.const 0)) + (func (export "as-global.set-value") (local i32) + (global.set $$g (memory.grow (i32.const 0))) + ) + + (func (export "as-load-address") (result i32) + (i32.load (memory.grow (i32.const 0))) + ) + (func (export "as-loadN-address") (result i32) + (i32.load8_s (memory.grow (i32.const 0))) + ) + + (func (export "as-store-address") + (i32.store (memory.grow (i32.const 0)) (i32.const 7)) + ) + (func (export "as-store-value") + (i32.store (i32.const 2) (memory.grow (i32.const 0))) + ) + + (func (export "as-storeN-address") + (i32.store8 (memory.grow (i32.const 0)) (i32.const 7)) + ) + (func (export "as-storeN-value") + (i32.store16 (i32.const 2) (memory.grow (i32.const 0))) + ) + + (func (export "as-unary-operand") (result i32) + (i32.clz (memory.grow (i32.const 0))) + ) + + (func (export "as-binary-left") (result i32) + (i32.add (memory.grow (i32.const 0)) (i32.const 10)) + ) + (func (export "as-binary-right") (result i32) + (i32.sub (i32.const 10) (memory.grow (i32.const 0))) + ) + + (func (export "as-test-operand") (result i32) + (i32.eqz (memory.grow (i32.const 0))) + ) + + (func (export "as-compare-left") (result i32) + (i32.le_s (memory.grow (i32.const 0)) (i32.const 10)) + ) + (func (export "as-compare-right") (result i32) + (i32.ne (i32.const 10) (memory.grow (i32.const 0))) + ) + + (func (export "as-memory.grow-size") (result i32) + (memory.grow (memory.grow (i32.const 0))) + ) +)`); + +// ./test/core/memory_grow.wast:349 +assert_return(() => invoke($6, `as-br-value`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:351 +assert_return(() => invoke($6, `as-br_if-cond`, []), []); + +// ./test/core/memory_grow.wast:352 +assert_return(() => invoke($6, `as-br_if-value`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:353 +assert_return(() => invoke($6, `as-br_if-value-cond`, []), [value("i32", 6)]); + +// ./test/core/memory_grow.wast:355 +assert_return(() => invoke($6, `as-br_table-index`, []), []); + +// ./test/core/memory_grow.wast:356 +assert_return(() => invoke($6, `as-br_table-value`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:357 +assert_return(() => invoke($6, `as-br_table-value-index`, []), [value("i32", 6)]); + +// ./test/core/memory_grow.wast:359 +assert_return(() => invoke($6, `as-return-value`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:361 +assert_return(() => invoke($6, `as-if-cond`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:362 +assert_return(() => invoke($6, `as-if-then`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:363 +assert_return(() => invoke($6, `as-if-else`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:365 +assert_return(() => invoke($6, `as-select-first`, [0, 1]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:366 +assert_return(() => invoke($6, `as-select-second`, [0, 0]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:367 +assert_return(() => invoke($6, `as-select-cond`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:369 +assert_return(() => invoke($6, `as-call-first`, []), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:370 +assert_return(() => invoke($6, `as-call-mid`, []), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:371 +assert_return(() => invoke($6, `as-call-last`, []), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:373 +assert_return(() => invoke($6, `as-call_indirect-first`, []), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:374 +assert_return(() => invoke($6, `as-call_indirect-mid`, []), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:375 +assert_return(() => invoke($6, `as-call_indirect-last`, []), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:376 +assert_trap(() => invoke($6, `as-call_indirect-index`, []), `undefined element`); + +// ./test/core/memory_grow.wast:378 +assert_return(() => invoke($6, `as-local.set-value`, []), []); + +// ./test/core/memory_grow.wast:379 +assert_return(() => invoke($6, `as-local.tee-value`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:380 +assert_return(() => invoke($6, `as-global.set-value`, []), []); + +// ./test/core/memory_grow.wast:382 +assert_return(() => invoke($6, `as-load-address`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:383 +assert_return(() => invoke($6, `as-loadN-address`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:384 +assert_return(() => invoke($6, `as-store-address`, []), []); + +// ./test/core/memory_grow.wast:385 +assert_return(() => invoke($6, `as-store-value`, []), []); + +// ./test/core/memory_grow.wast:386 +assert_return(() => invoke($6, `as-storeN-address`, []), []); + +// ./test/core/memory_grow.wast:387 +assert_return(() => invoke($6, `as-storeN-value`, []), []); + +// ./test/core/memory_grow.wast:389 +assert_return(() => invoke($6, `as-unary-operand`, []), [value("i32", 31)]); + +// ./test/core/memory_grow.wast:391 +assert_return(() => invoke($6, `as-binary-left`, []), [value("i32", 11)]); + +// ./test/core/memory_grow.wast:392 +assert_return(() => invoke($6, `as-binary-right`, []), [value("i32", 9)]); + +// ./test/core/memory_grow.wast:394 +assert_return(() => invoke($6, `as-test-operand`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:396 +assert_return(() => invoke($6, `as-compare-left`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:397 +assert_return(() => invoke($6, `as-compare-right`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:399 +assert_return(() => invoke($6, `as-memory.grow-size`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:404 +let $7 = instantiate(`(module + (memory $$mem1 1) + (memory $$mem2 2) + + (func (export "grow1") (param i32) (result i32) + (memory.grow $$mem1 (local.get 0)) + ) + (func (export "grow2") (param i32) (result i32) + (memory.grow $$mem2 (local.get 0)) + ) + + (func (export "size1") (result i32) (memory.size $$mem1)) + (func (export "size2") (result i32) (memory.size $$mem2)) +)`); + +// ./test/core/memory_grow.wast:419 +assert_return(() => invoke($7, `size1`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:420 +assert_return(() => invoke($7, `size2`, []), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:421 +assert_return(() => invoke($7, `grow1`, [3]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:422 +assert_return(() => invoke($7, `grow1`, [4]), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:423 +assert_return(() => invoke($7, `grow1`, [1]), [value("i32", 8)]); + +// ./test/core/memory_grow.wast:424 +assert_return(() => invoke($7, `grow2`, [1]), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:425 +assert_return(() => invoke($7, `grow2`, [1]), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:430 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-i32-vs-f32 (result i32) + (memory.grow (f32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:439 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-size-empty-vs-i32 (result i32) + (memory.grow) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:448 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-size-empty-vs-i32-in-block (result i32) + (i32.const 0) + (block (result i32) (memory.grow)) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:458 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-size-empty-vs-i32-in-loop (result i32) + (i32.const 0) + (loop (result i32) (memory.grow)) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:468 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-size-empty-vs-i32-in-then (result i32) + (i32.const 0) (i32.const 0) + (if (result i32) (then (memory.grow))) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:479 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-result-i32-vs-empty + (memory.grow (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:488 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-size-f32-vs-i32 (result i32) + (memory.grow (f32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:498 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-result-i32-vs-empty + (memory.grow (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:507 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-result-i32-vs-f32 (result f32) + (memory.grow (i32.const 0)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_init0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_init0.wast.js new file mode 100644 index 0000000000..17eb4cc186 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_init0.wast.js @@ -0,0 +1,70 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/memory_init0.wast + +// ./test/core/multi-memory/memory_init0.wast:2 +let $0 = instantiate(`(module + (memory $$mem0 0) + (memory $$mem1 0) + (memory $$mem2 1) + (memory $$mem3 0) + (data $$mem2 "\\aa\\bb\\cc\\dd") + + (func (export "init") (param i32 i32 i32) + (memory.init $$mem2 0 + (local.get 0) + (local.get 1) + (local.get 2))) + + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u $$mem2 (local.get 0))) +)`); + +// ./test/core/multi-memory/memory_init0.wast:19 +invoke($0, `init`, [0, 1, 2]); + +// ./test/core/multi-memory/memory_init0.wast:20 +assert_return(() => invoke($0, `load8_u`, [0]), [value("i32", 187)]); + +// ./test/core/multi-memory/memory_init0.wast:21 +assert_return(() => invoke($0, `load8_u`, [1]), [value("i32", 204)]); + +// ./test/core/multi-memory/memory_init0.wast:22 +assert_return(() => invoke($0, `load8_u`, [2]), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_init0.wast:25 +invoke($0, `init`, [65532, 0, 4]); + +// ./test/core/multi-memory/memory_init0.wast:28 +assert_trap(() => invoke($0, `init`, [65534, 0, 3]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_init0.wast:30 +assert_return(() => invoke($0, `load8_u`, [65534]), [value("i32", 204)]); + +// ./test/core/multi-memory/memory_init0.wast:31 +assert_return(() => invoke($0, `load8_u`, [65535]), [value("i32", 221)]); + +// ./test/core/multi-memory/memory_init0.wast:34 +invoke($0, `init`, [65536, 0, 0]); + +// ./test/core/multi-memory/memory_init0.wast:35 +invoke($0, `init`, [0, 4, 0]); + +// ./test/core/multi-memory/memory_init0.wast:38 +assert_trap(() => invoke($0, `init`, [65537, 0, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_init0.wast:40 +assert_trap(() => invoke($0, `init`, [0, 5, 0]), `out of bounds memory access`); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size.wast.js new file mode 100644 index 0000000000..60d2bd604f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size.wast.js @@ -0,0 +1,208 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory_size.wast + +// ./test/core/memory_size.wast:1 +let $0 = instantiate(`(module + (memory 0) + (func (export "size") (result i32) (memory.size)) + (func (export "grow") (param $$sz i32) (drop (memory.grow (local.get $$sz)))) +)`); + +// ./test/core/memory_size.wast:7 +assert_return(() => invoke($0, `size`, []), [value("i32", 0)]); + +// ./test/core/memory_size.wast:8 +assert_return(() => invoke($0, `grow`, [1]), []); + +// ./test/core/memory_size.wast:9 +assert_return(() => invoke($0, `size`, []), [value("i32", 1)]); + +// ./test/core/memory_size.wast:10 +assert_return(() => invoke($0, `grow`, [4]), []); + +// ./test/core/memory_size.wast:11 +assert_return(() => invoke($0, `size`, []), [value("i32", 5)]); + +// ./test/core/memory_size.wast:12 +assert_return(() => invoke($0, `grow`, [0]), []); + +// ./test/core/memory_size.wast:13 +assert_return(() => invoke($0, `size`, []), [value("i32", 5)]); + +// ./test/core/memory_size.wast:15 +let $1 = instantiate(`(module + (memory 1) + (func (export "size") (result i32) (memory.size)) + (func (export "grow") (param $$sz i32) (drop (memory.grow (local.get $$sz)))) +)`); + +// ./test/core/memory_size.wast:21 +assert_return(() => invoke($1, `size`, []), [value("i32", 1)]); + +// ./test/core/memory_size.wast:22 +assert_return(() => invoke($1, `grow`, [1]), []); + +// ./test/core/memory_size.wast:23 +assert_return(() => invoke($1, `size`, []), [value("i32", 2)]); + +// ./test/core/memory_size.wast:24 +assert_return(() => invoke($1, `grow`, [4]), []); + +// ./test/core/memory_size.wast:25 +assert_return(() => invoke($1, `size`, []), [value("i32", 6)]); + +// ./test/core/memory_size.wast:26 +assert_return(() => invoke($1, `grow`, [0]), []); + +// ./test/core/memory_size.wast:27 +assert_return(() => invoke($1, `size`, []), [value("i32", 6)]); + +// ./test/core/memory_size.wast:29 +let $2 = instantiate(`(module + (memory 0 2) + (func (export "size") (result i32) (memory.size)) + (func (export "grow") (param $$sz i32) (drop (memory.grow (local.get $$sz)))) +)`); + +// ./test/core/memory_size.wast:35 +assert_return(() => invoke($2, `size`, []), [value("i32", 0)]); + +// ./test/core/memory_size.wast:36 +assert_return(() => invoke($2, `grow`, [3]), []); + +// ./test/core/memory_size.wast:37 +assert_return(() => invoke($2, `size`, []), [value("i32", 0)]); + +// ./test/core/memory_size.wast:38 +assert_return(() => invoke($2, `grow`, [1]), []); + +// ./test/core/memory_size.wast:39 +assert_return(() => invoke($2, `size`, []), [value("i32", 1)]); + +// ./test/core/memory_size.wast:40 +assert_return(() => invoke($2, `grow`, [0]), []); + +// ./test/core/memory_size.wast:41 +assert_return(() => invoke($2, `size`, []), [value("i32", 1)]); + +// ./test/core/memory_size.wast:42 +assert_return(() => invoke($2, `grow`, [4]), []); + +// ./test/core/memory_size.wast:43 +assert_return(() => invoke($2, `size`, []), [value("i32", 1)]); + +// ./test/core/memory_size.wast:44 +assert_return(() => invoke($2, `grow`, [1]), []); + +// ./test/core/memory_size.wast:45 +assert_return(() => invoke($2, `size`, []), [value("i32", 2)]); + +// ./test/core/memory_size.wast:47 +let $3 = instantiate(`(module + (memory 3 8) + (func (export "size") (result i32) (memory.size)) + (func (export "grow") (param $$sz i32) (drop (memory.grow (local.get $$sz)))) +)`); + +// ./test/core/memory_size.wast:53 +assert_return(() => invoke($3, `size`, []), [value("i32", 3)]); + +// ./test/core/memory_size.wast:54 +assert_return(() => invoke($3, `grow`, [1]), []); + +// ./test/core/memory_size.wast:55 +assert_return(() => invoke($3, `size`, []), [value("i32", 4)]); + +// ./test/core/memory_size.wast:56 +assert_return(() => invoke($3, `grow`, [3]), []); + +// ./test/core/memory_size.wast:57 +assert_return(() => invoke($3, `size`, []), [value("i32", 7)]); + +// ./test/core/memory_size.wast:58 +assert_return(() => invoke($3, `grow`, [0]), []); + +// ./test/core/memory_size.wast:59 +assert_return(() => invoke($3, `size`, []), [value("i32", 7)]); + +// ./test/core/memory_size.wast:60 +assert_return(() => invoke($3, `grow`, [2]), []); + +// ./test/core/memory_size.wast:61 +assert_return(() => invoke($3, `size`, []), [value("i32", 7)]); + +// ./test/core/memory_size.wast:62 +assert_return(() => invoke($3, `grow`, [1]), []); + +// ./test/core/memory_size.wast:63 +assert_return(() => invoke($3, `size`, []), [value("i32", 8)]); + +// ./test/core/memory_size.wast:68 +let $4 = instantiate(`(module + (memory (export "mem1") 2 4) + (memory (export "mem2") 0) +)`); + +// ./test/core/memory_size.wast:72 +register($4, `M`); + +// ./test/core/memory_size.wast:74 +let $5 = instantiate(`(module + (memory $$mem1 (import "M" "mem1") 1 5) + (memory $$mem2 (import "M" "mem2") 0) + (memory $$mem3 3) + (memory $$mem4 4 5) + + (func (export "size1") (result i32) (memory.size $$mem1)) + (func (export "size2") (result i32) (memory.size $$mem2)) + (func (export "size3") (result i32) (memory.size $$mem3)) + (func (export "size4") (result i32) (memory.size $$mem4)) +)`); + +// ./test/core/memory_size.wast:86 +assert_return(() => invoke($5, `size1`, []), [value("i32", 2)]); + +// ./test/core/memory_size.wast:87 +assert_return(() => invoke($5, `size2`, []), [value("i32", 0)]); + +// ./test/core/memory_size.wast:88 +assert_return(() => invoke($5, `size3`, []), [value("i32", 3)]); + +// ./test/core/memory_size.wast:89 +assert_return(() => invoke($5, `size4`, []), [value("i32", 4)]); + +// ./test/core/memory_size.wast:94 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-result-i32-vs-empty + (memory.size) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_size.wast:103 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-result-i32-vs-f32 (result f32) + (memory.size) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size0.wast.js new file mode 100644 index 0000000000..78995555a1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size0.wast.js @@ -0,0 +1,49 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/memory_size0.wast + +// ./test/core/multi-memory/memory_size0.wast:1 +let $0 = instantiate(`(module + (memory 0) + (memory 0) + (memory 0) + (memory 0) + (memory $$m 0) + + (func (export "size") (result i32) (memory.size $$m)) + (func (export "grow") (param $$sz i32) (drop (memory.grow $$m (local.get $$sz)))) +)`); + +// ./test/core/multi-memory/memory_size0.wast:12 +assert_return(() => invoke($0, `size`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size0.wast:13 +assert_return(() => invoke($0, `grow`, [1]), []); + +// ./test/core/multi-memory/memory_size0.wast:14 +assert_return(() => invoke($0, `size`, []), [value("i32", 1)]); + +// ./test/core/multi-memory/memory_size0.wast:15 +assert_return(() => invoke($0, `grow`, [4]), []); + +// ./test/core/multi-memory/memory_size0.wast:16 +assert_return(() => invoke($0, `size`, []), [value("i32", 5)]); + +// ./test/core/multi-memory/memory_size0.wast:17 +assert_return(() => invoke($0, `grow`, [0]), []); + +// ./test/core/multi-memory/memory_size0.wast:18 +assert_return(() => invoke($0, `size`, []), [value("i32", 5)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size1.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size1.wast.js new file mode 100644 index 0000000000..fa14876f09 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size1.wast.js @@ -0,0 +1,73 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/memory_size1.wast + +// ./test/core/multi-memory/memory_size1.wast:1 +let $0 = instantiate(`(module + (memory 0) + (memory 0) + (memory $$n 0) + (memory 0) + (memory $$m 0) + + (func (export "size") (result i32) (memory.size $$m)) + (func (export "grow") (param $$sz i32) (drop (memory.grow $$m (local.get $$sz)))) + + (func (export "sizen") (result i32) (memory.size $$n)) + (func (export "grown") (param $$sz i32) (drop (memory.grow $$n (local.get $$sz)))) +)`); + +// ./test/core/multi-memory/memory_size1.wast:15 +assert_return(() => invoke($0, `size`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size1.wast:16 +assert_return(() => invoke($0, `sizen`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size1.wast:17 +assert_return(() => invoke($0, `grow`, [1]), []); + +// ./test/core/multi-memory/memory_size1.wast:18 +assert_return(() => invoke($0, `size`, []), [value("i32", 1)]); + +// ./test/core/multi-memory/memory_size1.wast:19 +assert_return(() => invoke($0, `sizen`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size1.wast:20 +assert_return(() => invoke($0, `grow`, [4]), []); + +// ./test/core/multi-memory/memory_size1.wast:21 +assert_return(() => invoke($0, `size`, []), [value("i32", 5)]); + +// ./test/core/multi-memory/memory_size1.wast:22 +assert_return(() => invoke($0, `sizen`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size1.wast:23 +assert_return(() => invoke($0, `grow`, [0]), []); + +// ./test/core/multi-memory/memory_size1.wast:24 +assert_return(() => invoke($0, `size`, []), [value("i32", 5)]); + +// ./test/core/multi-memory/memory_size1.wast:25 +assert_return(() => invoke($0, `sizen`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size1.wast:27 +assert_return(() => invoke($0, `grown`, [1]), []); + +// ./test/core/multi-memory/memory_size1.wast:28 +assert_return(() => invoke($0, `size`, []), [value("i32", 5)]); + +// ./test/core/multi-memory/memory_size1.wast:29 +assert_return(() => invoke($0, `sizen`, []), [value("i32", 1)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size2.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size2.wast.js new file mode 100644 index 0000000000..8feeadb2ee --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size2.wast.js @@ -0,0 +1,90 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/memory_size2.wast + +// ./test/core/multi-memory/memory_size2.wast:1 +let $0 = instantiate(`(module + (memory 0 0) + (memory 0 0) + (memory $$n 0 0) + (memory $$m 0 2) + + (func (export "size") (result i32) (memory.size $$m)) + (func (export "grow") (param $$sz i32) (drop (memory.grow $$m (local.get $$sz)))) + + (func (export "sizen") (result i32) (memory.size $$n)) + (func (export "grown") (param $$sz i32) (drop (memory.grow $$n (local.get $$sz)))) +)`); + +// ./test/core/multi-memory/memory_size2.wast:14 +assert_return(() => invoke($0, `size`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size2.wast:15 +assert_return(() => invoke($0, `sizen`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size2.wast:16 +assert_return(() => invoke($0, `grow`, [3]), []); + +// ./test/core/multi-memory/memory_size2.wast:17 +assert_return(() => invoke($0, `sizen`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size2.wast:18 +assert_return(() => invoke($0, `size`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size2.wast:19 +assert_return(() => invoke($0, `grow`, [1]), []); + +// ./test/core/multi-memory/memory_size2.wast:20 +assert_return(() => invoke($0, `sizen`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size2.wast:21 +assert_return(() => invoke($0, `size`, []), [value("i32", 1)]); + +// ./test/core/multi-memory/memory_size2.wast:22 +assert_return(() => invoke($0, `grow`, [0]), []); + +// ./test/core/multi-memory/memory_size2.wast:23 +assert_return(() => invoke($0, `sizen`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size2.wast:24 +assert_return(() => invoke($0, `size`, []), [value("i32", 1)]); + +// ./test/core/multi-memory/memory_size2.wast:25 +assert_return(() => invoke($0, `grow`, [4]), []); + +// ./test/core/multi-memory/memory_size2.wast:26 +assert_return(() => invoke($0, `sizen`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size2.wast:27 +assert_return(() => invoke($0, `size`, []), [value("i32", 1)]); + +// ./test/core/multi-memory/memory_size2.wast:28 +assert_return(() => invoke($0, `grow`, [1]), []); + +// ./test/core/multi-memory/memory_size2.wast:29 +assert_return(() => invoke($0, `sizen`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size2.wast:30 +assert_return(() => invoke($0, `size`, []), [value("i32", 2)]); + +// ./test/core/multi-memory/memory_size2.wast:32 +assert_return(() => invoke($0, `grown`, [1]), []); + +// ./test/core/multi-memory/memory_size2.wast:33 +assert_return(() => invoke($0, `sizen`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_size2.wast:34 +assert_return(() => invoke($0, `size`, []), [value("i32", 2)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size3.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size3.wast.js new file mode 100644 index 0000000000..f30a09f73a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_size3.wast.js @@ -0,0 +1,43 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/memory_size3.wast + +// ./test/core/multi-memory/memory_size3.wast:3 +assert_invalid( + () => instantiate(`(module + (memory 0) + (memory $$m 1) + (memory 0) + (func $$type-result-i32-vs-empty + (memory.size $$m) + ) + )`), + `type mismatch`, +); + +// ./test/core/multi-memory/memory_size3.wast:14 +assert_invalid( + () => instantiate(`(module + (memory 0) + (memory 0) + (memory 0) + (memory $$m 1) + (func $$type-result-i32-vs-f32 (result f32) + (memory.size $$m) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_trap0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_trap0.wast.js new file mode 100644 index 0000000000..1739a5bcb6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_trap0.wast.js @@ -0,0 +1,78 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/memory_trap0.wast + +// ./test/core/multi-memory/memory_trap0.wast:1 +let $0 = instantiate(`(module + (memory 0) + (memory 0) + (memory $$m 1) + + (func $$addr_limit (result i32) + (i32.mul (memory.size $$m) (i32.const 0x10000)) + ) + + (func (export "store") (param $$i i32) (param $$v i32) + (i32.store $$m (i32.add (call $$addr_limit) (local.get $$i)) (local.get $$v)) + ) + + (func (export "load") (param $$i i32) (result i32) + (i32.load $$m (i32.add (call $$addr_limit) (local.get $$i))) + ) + + (func (export "memory.grow") (param i32) (result i32) + (memory.grow $$m (local.get 0)) + ) +)`); + +// ./test/core/multi-memory/memory_trap0.wast:23 +assert_return(() => invoke($0, `store`, [-4, 42]), []); + +// ./test/core/multi-memory/memory_trap0.wast:24 +assert_return(() => invoke($0, `load`, [-4]), [value("i32", 42)]); + +// ./test/core/multi-memory/memory_trap0.wast:25 +assert_trap(() => invoke($0, `store`, [-3, 305419896]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap0.wast:26 +assert_trap(() => invoke($0, `load`, [-3]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap0.wast:27 +assert_trap(() => invoke($0, `store`, [-2, 13]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap0.wast:28 +assert_trap(() => invoke($0, `load`, [-2]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap0.wast:29 +assert_trap(() => invoke($0, `store`, [-1, 13]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap0.wast:30 +assert_trap(() => invoke($0, `load`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap0.wast:31 +assert_trap(() => invoke($0, `store`, [0, 13]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap0.wast:32 +assert_trap(() => invoke($0, `load`, [0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap0.wast:33 +assert_trap(() => invoke($0, `store`, [-2147483648, 13]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap0.wast:34 +assert_trap(() => invoke($0, `load`, [-2147483648]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap0.wast:35 +assert_return(() => invoke($0, `memory.grow`, [65537]), [value("i32", -1)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_trap1.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_trap1.wast.js new file mode 100644 index 0000000000..ef68a1c0ec --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_trap1.wast.js @@ -0,0 +1,602 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/memory_trap1.wast + +// ./test/core/multi-memory/memory_trap1.wast:1 +let $0 = instantiate(`(module + (memory 0) + (memory 0) + (memory $$m 1) + (data (memory 2) (i32.const 0) "abcdefgh") + (data (memory 2) (i32.const 0xfff8) "abcdefgh") + + (func (export "i32.load") (param $$a i32) (result i32) + (i32.load $$m (local.get $$a)) + ) + (func (export "i64.load") (param $$a i32) (result i64) + (i64.load $$m (local.get $$a)) + ) + (func (export "f32.load") (param $$a i32) (result f32) + (f32.load $$m (local.get $$a)) + ) + (func (export "f64.load") (param $$a i32) (result f64) + (f64.load $$m (local.get $$a)) + ) + (func (export "i32.load8_s") (param $$a i32) (result i32) + (i32.load8_s $$m (local.get $$a)) + ) + (func (export "i32.load8_u") (param $$a i32) (result i32) + (i32.load8_u $$m (local.get $$a)) + ) + (func (export "i32.load16_s") (param $$a i32) (result i32) + (i32.load16_s $$m (local.get $$a)) + ) + (func (export "i32.load16_u") (param $$a i32) (result i32) + (i32.load16_u $$m (local.get $$a)) + ) + (func (export "i64.load8_s") (param $$a i32) (result i64) + (i64.load8_s $$m (local.get $$a)) + ) + (func (export "i64.load8_u") (param $$a i32) (result i64) + (i64.load8_u $$m (local.get $$a)) + ) + (func (export "i64.load16_s") (param $$a i32) (result i64) + (i64.load16_s $$m (local.get $$a)) + ) + (func (export "i64.load16_u") (param $$a i32) (result i64) + (i64.load16_u $$m (local.get $$a)) + ) + (func (export "i64.load32_s") (param $$a i32) (result i64) + (i64.load32_s $$m (local.get $$a)) + ) + (func (export "i64.load32_u") (param $$a i32) (result i64) + (i64.load32_u $$m (local.get $$a)) + ) + (func (export "i32.store") (param $$a i32) (param $$v i32) + (i32.store $$m (local.get $$a) (local.get $$v)) + ) + (func (export "i64.store") (param $$a i32) (param $$v i64) + (i64.store $$m (local.get $$a) (local.get $$v)) + ) + (func (export "f32.store") (param $$a i32) (param $$v f32) + (f32.store $$m (local.get $$a) (local.get $$v)) + ) + (func (export "f64.store") (param $$a i32) (param $$v f64) + (f64.store $$m (local.get $$a) (local.get $$v)) + ) + (func (export "i32.store8") (param $$a i32) (param $$v i32) + (i32.store8 $$m (local.get $$a) (local.get $$v)) + ) + (func (export "i32.store16") (param $$a i32) (param $$v i32) + (i32.store16 $$m (local.get $$a) (local.get $$v)) + ) + (func (export "i64.store8") (param $$a i32) (param $$v i64) + (i64.store8 $$m (local.get $$a) (local.get $$v)) + ) + (func (export "i64.store16") (param $$a i32) (param $$v i64) + (i64.store16 $$m (local.get $$a) (local.get $$v)) + ) + (func (export "i64.store32") (param $$a i32) (param $$v i64) + (i64.store32 $$m (local.get $$a) (local.get $$v)) + ) +)`); + +// ./test/core/multi-memory/memory_trap1.wast:79 +assert_trap(() => invoke($0, `i32.store`, [65536, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:80 +assert_trap(() => invoke($0, `i32.store`, [65535, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:81 +assert_trap(() => invoke($0, `i32.store`, [65534, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:82 +assert_trap(() => invoke($0, `i32.store`, [65533, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:83 +assert_trap(() => invoke($0, `i32.store`, [-1, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:84 +assert_trap(() => invoke($0, `i32.store`, [-2, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:85 +assert_trap(() => invoke($0, `i32.store`, [-3, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:86 +assert_trap(() => invoke($0, `i32.store`, [-4, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:87 +assert_trap(() => invoke($0, `i64.store`, [65536, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:88 +assert_trap(() => invoke($0, `i64.store`, [65535, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:89 +assert_trap(() => invoke($0, `i64.store`, [65534, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:90 +assert_trap(() => invoke($0, `i64.store`, [65533, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:91 +assert_trap(() => invoke($0, `i64.store`, [65532, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:92 +assert_trap(() => invoke($0, `i64.store`, [65531, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:93 +assert_trap(() => invoke($0, `i64.store`, [65530, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:94 +assert_trap(() => invoke($0, `i64.store`, [65529, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:95 +assert_trap(() => invoke($0, `i64.store`, [-1, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:96 +assert_trap(() => invoke($0, `i64.store`, [-2, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:97 +assert_trap(() => invoke($0, `i64.store`, [-3, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:98 +assert_trap(() => invoke($0, `i64.store`, [-4, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:99 +assert_trap(() => invoke($0, `i64.store`, [-5, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:100 +assert_trap(() => invoke($0, `i64.store`, [-6, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:101 +assert_trap(() => invoke($0, `i64.store`, [-7, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:102 +assert_trap(() => invoke($0, `i64.store`, [-8, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:103 +assert_trap(() => invoke($0, `f32.store`, [65536, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:104 +assert_trap(() => invoke($0, `f32.store`, [65535, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:105 +assert_trap(() => invoke($0, `f32.store`, [65534, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:106 +assert_trap(() => invoke($0, `f32.store`, [65533, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:107 +assert_trap(() => invoke($0, `f32.store`, [-1, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:108 +assert_trap(() => invoke($0, `f32.store`, [-2, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:109 +assert_trap(() => invoke($0, `f32.store`, [-3, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:110 +assert_trap(() => invoke($0, `f32.store`, [-4, value("f32", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:111 +assert_trap(() => invoke($0, `f64.store`, [65536, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:112 +assert_trap(() => invoke($0, `f64.store`, [65535, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:113 +assert_trap(() => invoke($0, `f64.store`, [65534, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:114 +assert_trap(() => invoke($0, `f64.store`, [65533, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:115 +assert_trap(() => invoke($0, `f64.store`, [65532, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:116 +assert_trap(() => invoke($0, `f64.store`, [65531, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:117 +assert_trap(() => invoke($0, `f64.store`, [65530, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:118 +assert_trap(() => invoke($0, `f64.store`, [65529, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:119 +assert_trap(() => invoke($0, `f64.store`, [-1, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:120 +assert_trap(() => invoke($0, `f64.store`, [-2, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:121 +assert_trap(() => invoke($0, `f64.store`, [-3, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:122 +assert_trap(() => invoke($0, `f64.store`, [-4, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:123 +assert_trap(() => invoke($0, `f64.store`, [-5, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:124 +assert_trap(() => invoke($0, `f64.store`, [-6, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:125 +assert_trap(() => invoke($0, `f64.store`, [-7, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:126 +assert_trap(() => invoke($0, `f64.store`, [-8, value("f64", 0)]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:127 +assert_trap(() => invoke($0, `i32.store8`, [65536, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:128 +assert_trap(() => invoke($0, `i32.store8`, [-1, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:129 +assert_trap(() => invoke($0, `i32.store16`, [65536, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:130 +assert_trap(() => invoke($0, `i32.store16`, [65535, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:131 +assert_trap(() => invoke($0, `i32.store16`, [-1, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:132 +assert_trap(() => invoke($0, `i32.store16`, [-2, 0]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:133 +assert_trap(() => invoke($0, `i64.store8`, [65536, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:134 +assert_trap(() => invoke($0, `i64.store8`, [-1, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:135 +assert_trap(() => invoke($0, `i64.store16`, [65536, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:136 +assert_trap(() => invoke($0, `i64.store16`, [65535, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:137 +assert_trap(() => invoke($0, `i64.store16`, [-1, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:138 +assert_trap(() => invoke($0, `i64.store16`, [-2, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:139 +assert_trap(() => invoke($0, `i64.store32`, [65536, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:140 +assert_trap(() => invoke($0, `i64.store32`, [65535, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:141 +assert_trap(() => invoke($0, `i64.store32`, [65534, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:142 +assert_trap(() => invoke($0, `i64.store32`, [65533, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:143 +assert_trap(() => invoke($0, `i64.store32`, [-1, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:144 +assert_trap(() => invoke($0, `i64.store32`, [-2, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:145 +assert_trap(() => invoke($0, `i64.store32`, [-3, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:146 +assert_trap(() => invoke($0, `i64.store32`, [-4, 0n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:147 +assert_trap(() => invoke($0, `i32.load`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:148 +assert_trap(() => invoke($0, `i32.load`, [65535]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:149 +assert_trap(() => invoke($0, `i32.load`, [65534]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:150 +assert_trap(() => invoke($0, `i32.load`, [65533]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:151 +assert_trap(() => invoke($0, `i32.load`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:152 +assert_trap(() => invoke($0, `i32.load`, [-2]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:153 +assert_trap(() => invoke($0, `i32.load`, [-3]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:154 +assert_trap(() => invoke($0, `i32.load`, [-4]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:155 +assert_trap(() => invoke($0, `i64.load`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:156 +assert_trap(() => invoke($0, `i64.load`, [65535]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:157 +assert_trap(() => invoke($0, `i64.load`, [65534]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:158 +assert_trap(() => invoke($0, `i64.load`, [65533]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:159 +assert_trap(() => invoke($0, `i64.load`, [65532]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:160 +assert_trap(() => invoke($0, `i64.load`, [65531]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:161 +assert_trap(() => invoke($0, `i64.load`, [65530]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:162 +assert_trap(() => invoke($0, `i64.load`, [65529]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:163 +assert_trap(() => invoke($0, `i64.load`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:164 +assert_trap(() => invoke($0, `i64.load`, [-2]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:165 +assert_trap(() => invoke($0, `i64.load`, [-3]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:166 +assert_trap(() => invoke($0, `i64.load`, [-4]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:167 +assert_trap(() => invoke($0, `i64.load`, [-5]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:168 +assert_trap(() => invoke($0, `i64.load`, [-6]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:169 +assert_trap(() => invoke($0, `i64.load`, [-7]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:170 +assert_trap(() => invoke($0, `i64.load`, [-8]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:171 +assert_trap(() => invoke($0, `f32.load`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:172 +assert_trap(() => invoke($0, `f32.load`, [65535]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:173 +assert_trap(() => invoke($0, `f32.load`, [65534]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:174 +assert_trap(() => invoke($0, `f32.load`, [65533]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:175 +assert_trap(() => invoke($0, `f32.load`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:176 +assert_trap(() => invoke($0, `f32.load`, [-2]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:177 +assert_trap(() => invoke($0, `f32.load`, [-3]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:178 +assert_trap(() => invoke($0, `f32.load`, [-4]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:179 +assert_trap(() => invoke($0, `f64.load`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:180 +assert_trap(() => invoke($0, `f64.load`, [65535]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:181 +assert_trap(() => invoke($0, `f64.load`, [65534]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:182 +assert_trap(() => invoke($0, `f64.load`, [65533]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:183 +assert_trap(() => invoke($0, `f64.load`, [65532]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:184 +assert_trap(() => invoke($0, `f64.load`, [65531]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:185 +assert_trap(() => invoke($0, `f64.load`, [65530]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:186 +assert_trap(() => invoke($0, `f64.load`, [65529]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:187 +assert_trap(() => invoke($0, `f64.load`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:188 +assert_trap(() => invoke($0, `f64.load`, [-2]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:189 +assert_trap(() => invoke($0, `f64.load`, [-3]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:190 +assert_trap(() => invoke($0, `f64.load`, [-4]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:191 +assert_trap(() => invoke($0, `f64.load`, [-5]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:192 +assert_trap(() => invoke($0, `f64.load`, [-6]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:193 +assert_trap(() => invoke($0, `f64.load`, [-7]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:194 +assert_trap(() => invoke($0, `f64.load`, [-8]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:195 +assert_trap(() => invoke($0, `i32.load8_s`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:196 +assert_trap(() => invoke($0, `i32.load8_s`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:197 +assert_trap(() => invoke($0, `i32.load8_u`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:198 +assert_trap(() => invoke($0, `i32.load8_u`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:199 +assert_trap(() => invoke($0, `i32.load16_s`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:200 +assert_trap(() => invoke($0, `i32.load16_s`, [65535]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:201 +assert_trap(() => invoke($0, `i32.load16_s`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:202 +assert_trap(() => invoke($0, `i32.load16_s`, [-2]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:203 +assert_trap(() => invoke($0, `i32.load16_u`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:204 +assert_trap(() => invoke($0, `i32.load16_u`, [65535]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:205 +assert_trap(() => invoke($0, `i32.load16_u`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:206 +assert_trap(() => invoke($0, `i32.load16_u`, [-2]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:207 +assert_trap(() => invoke($0, `i64.load8_s`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:208 +assert_trap(() => invoke($0, `i64.load8_s`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:209 +assert_trap(() => invoke($0, `i64.load8_u`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:210 +assert_trap(() => invoke($0, `i64.load8_u`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:211 +assert_trap(() => invoke($0, `i64.load16_s`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:212 +assert_trap(() => invoke($0, `i64.load16_s`, [65535]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:213 +assert_trap(() => invoke($0, `i64.load16_s`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:214 +assert_trap(() => invoke($0, `i64.load16_s`, [-2]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:215 +assert_trap(() => invoke($0, `i64.load16_u`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:216 +assert_trap(() => invoke($0, `i64.load16_u`, [65535]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:217 +assert_trap(() => invoke($0, `i64.load16_u`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:218 +assert_trap(() => invoke($0, `i64.load16_u`, [-2]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:219 +assert_trap(() => invoke($0, `i64.load32_s`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:220 +assert_trap(() => invoke($0, `i64.load32_s`, [65535]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:221 +assert_trap(() => invoke($0, `i64.load32_s`, [65534]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:222 +assert_trap(() => invoke($0, `i64.load32_s`, [65533]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:223 +assert_trap(() => invoke($0, `i64.load32_s`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:224 +assert_trap(() => invoke($0, `i64.load32_s`, [-2]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:225 +assert_trap(() => invoke($0, `i64.load32_s`, [-3]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:226 +assert_trap(() => invoke($0, `i64.load32_s`, [-4]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:227 +assert_trap(() => invoke($0, `i64.load32_u`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:228 +assert_trap(() => invoke($0, `i64.load32_u`, [65535]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:229 +assert_trap(() => invoke($0, `i64.load32_u`, [65534]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:230 +assert_trap(() => invoke($0, `i64.load32_u`, [65533]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:231 +assert_trap(() => invoke($0, `i64.load32_u`, [-1]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:232 +assert_trap(() => invoke($0, `i64.load32_u`, [-2]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:233 +assert_trap(() => invoke($0, `i64.load32_u`, [-3]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:234 +assert_trap(() => invoke($0, `i64.load32_u`, [-4]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:237 +assert_return(() => invoke($0, `i64.load`, [65528]), [value("i64", 7523094288207667809n)]); + +// ./test/core/multi-memory/memory_trap1.wast:238 +assert_return(() => invoke($0, `i64.load`, [0]), [value("i64", 7523094288207667809n)]); + +// ./test/core/multi-memory/memory_trap1.wast:242 +assert_return(() => invoke($0, `i64.store`, [65528, 0n]), []); + +// ./test/core/multi-memory/memory_trap1.wast:243 +assert_trap(() => invoke($0, `i32.store`, [65533, 305419896]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:244 +assert_return(() => invoke($0, `i32.load`, [65532]), [value("i32", 0)]); + +// ./test/core/multi-memory/memory_trap1.wast:245 +assert_trap(() => invoke($0, `i64.store`, [65529, 1311768467294899695n]), `out of bounds memory access`); + +// ./test/core/multi-memory/memory_trap1.wast:246 +assert_return(() => invoke($0, `i64.load`, [65528]), [value("i64", 0n)]); + +// ./test/core/multi-memory/memory_trap1.wast:247 +assert_trap( + () => invoke($0, `f32.store`, [65533, value("f32", 305419900)]), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/memory_trap1.wast:248 +assert_return(() => invoke($0, `f32.load`, [65532]), [value("f32", 0)]); + +// ./test/core/multi-memory/memory_trap1.wast:249 +assert_trap( + () => invoke($0, `f64.store`, [65529, value("f64", 1311768467294899700)]), + `out of bounds memory access`, +); + +// ./test/core/multi-memory/memory_trap1.wast:250 +assert_return(() => invoke($0, `f64.load`, [65528]), [value("f64", 0)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/simd_load.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/simd_load.wast.js new file mode 100644 index 0000000000..e609e1fe58 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/simd_load.wast.js @@ -0,0 +1,295 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_load.wast + +// ./test/core/simd/simd_load.wast:3 +let $0 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\00\\01\\02\\03") + (func (export "v128.load") (result v128) + (v128.load (i32.const 0)) + ) +)`); + +// ./test/core/simd/simd_load.wast:11 +assert_return( + () => invoke($0, `v128.load`, []), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_load.wast:12 +assert_return( + () => invoke($0, `v128.load`, []), + [i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e])], +); + +// ./test/core/simd/simd_load.wast:13 +assert_return(() => invoke($0, `v128.load`, []), [i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c])]); + +// ./test/core/simd/simd_load.wast:18 +let $1 = instantiate(`(module (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\00\\01\\02\\03") + (func (export "as-i8x16_extract_lane_s-value/0") (result i32) + (i8x16.extract_lane_s 0 (v128.load (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_load.wast:24 +assert_return(() => invoke($1, `as-i8x16_extract_lane_s-value/0`, []), [value("i32", 0)]); + +// ./test/core/simd/simd_load.wast:26 +let $2 = instantiate(`(module (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\00\\01\\02\\03") + (func (export "as-i8x16.eq-operand") (result v128) + (i8x16.eq (v128.load offset=0 (i32.const 0)) (v128.load offset=16 (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_load.wast:32 +assert_return(() => invoke($2, `as-i8x16.eq-operand`, []), [i32x4([0xffffffff, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_load.wast:34 +let $3 = instantiate(`(module (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\00\\01\\02\\03") + (func (export "as-v128.not-operand") (result v128) + (v128.not (v128.load (i32.const 0))) + ) + (func (export "as-i8x16.all_true-operand") (result i32) + (i8x16.all_true (v128.load (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_load.wast:43 +assert_return( + () => invoke($3, `as-v128.not-operand`, []), + [i32x4([0xfcfdfeff, 0xf8f9fafb, 0xf4f5f6f7, 0xf0f1f2f3])], +); + +// ./test/core/simd/simd_load.wast:44 +assert_return(() => invoke($3, `as-i8x16.all_true-operand`, []), [value("i32", 0)]); + +// ./test/core/simd/simd_load.wast:46 +let $4 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA") + (data (offset (i32.const 16)) "\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB") + (data (offset (i32.const 32)) "\\F0\\F0\\F0\\F0\\FF\\FF\\FF\\FF\\00\\00\\00\\00\\FF\\00\\FF\\00") + (func (export "as-v128.bitselect-operand") (result v128) + (v128.bitselect (v128.load (i32.const 0)) (v128.load (i32.const 16)) (v128.load (i32.const 32))) + ) +)`); + +// ./test/core/simd/simd_load.wast:54 +assert_return( + () => invoke($4, `as-v128.bitselect-operand`, []), + [i32x4([0xabababab, 0xaaaaaaaa, 0xbbbbbbbb, 0xbbaabbaa])], +); + +// ./test/core/simd/simd_load.wast:56 +let $5 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA") + (func (export "as-i8x16.shl-operand") (result v128) + (i8x16.shl (v128.load (i32.const 0)) (i32.const 1)) + ) +)`); + +// ./test/core/simd/simd_load.wast:62 +assert_return( + () => invoke($5, `as-i8x16.shl-operand`, []), + [i32x4([0x54545454, 0x54545454, 0x54545454, 0x54545454])], +); + +// ./test/core/simd/simd_load.wast:64 +let $6 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\02\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00") + (data (offset (i32.const 16)) "\\03\\00\\00\\00\\03\\00\\00\\00\\03\\00\\00\\00\\03\\00\\00\\00") + (func (export "as-add/sub-operand") (result v128) + ;; 2 2 2 2 + 3 3 3 3 = 5 5 5 5 + ;; 5 5 5 5 - 3 3 3 3 = 2 2 2 2 + (i8x16.sub + (i8x16.add (v128.load (i32.const 0)) (v128.load (i32.const 16))) + (v128.load (i32.const 16)) + ) + ) +)`); + +// ./test/core/simd/simd_load.wast:76 +assert_return(() => invoke($6, `as-add/sub-operand`, []), [i32x4([0x2, 0x2, 0x2, 0x2])]); + +// ./test/core/simd/simd_load.wast:78 +let $7 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\00\\00\\00\\43\\00\\00\\80\\3f\\66\\66\\e6\\3f\\00\\00\\80\\bf") ;; 128 1.0 1.8 -1 + (data (offset (i32.const 16)) "\\00\\00\\00\\40\\00\\00\\00\\40\\00\\00\\00\\40\\00\\00\\00\\40") ;; 2.0 2.0 2.0 2.0 + (func (export "as-f32x4.mul-operand") (result v128) + (f32x4.mul (v128.load (i32.const 0)) (v128.load (i32.const 16))) + ) +)`); + +// ./test/core/simd/simd_load.wast:85 +assert_return( + () => invoke($7, `as-f32x4.mul-operand`, []), + [ + new F32x4Pattern( + value("f32", 256), + value("f32", 2), + value("f32", 3.6), + value("f32", -2), + ), + ], +); + +// ./test/core/simd/simd_load.wast:87 +let $8 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff") ;; 1111 ... + (func (export "as-f32x4.abs-operand") (result v128) + (f32x4.abs (v128.load (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_load.wast:93 +assert_return( + () => invoke($8, `as-f32x4.abs-operand`, []), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_load.wast:95 +let $9 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA") + (data (offset (i32.const 16)) "\\02\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00") + (func (export "as-f32x4.min-operand") (result v128) + (f32x4.min (v128.load (i32.const 0)) (v128.load offset=16 (i32.const 1))) + ) +)`); + +// ./test/core/simd/simd_load.wast:102 +assert_return( + () => invoke($9, `as-f32x4.min-operand`, []), + [i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa])], +); + +// ./test/core/simd/simd_load.wast:104 +let $10 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\00\\00\\00\\43\\00\\00\\80\\3f\\66\\66\\e6\\3f\\00\\00\\80\\bf") ;; 128 1.0 1.8 -1 + (func (export "as-i32x4.trunc_sat_f32x4_s-operand") (result v128) + (i32x4.trunc_sat_f32x4_s (v128.load (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_load.wast:110 +assert_return( + () => invoke($10, `as-i32x4.trunc_sat_f32x4_s-operand`, []), + [i32x4([0x80, 0x1, 0x1, 0xffffffff])], +); + +// ./test/core/simd/simd_load.wast:112 +let $11 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\02\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00") + (func (export "as-f32x4.convert_i32x4_u-operand") (result v128) + (f32x4.convert_i32x4_u (v128.load (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_load.wast:118 +assert_return( + () => invoke($11, `as-f32x4.convert_i32x4_u-operand`, []), + [ + new F32x4Pattern( + value("f32", 2), + value("f32", 2), + value("f32", 2), + value("f32", 2), + ), + ], +); + +// ./test/core/simd/simd_load.wast:120 +let $12 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\64\\65\\66\\67\\68\\69\\6a\\6b\\6c\\6d\\6e\\6f\\70\\71\\72\\73") ;; 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 + (data (offset (i32.const 16)) "\\0f\\0e\\0d\\0c\\0b\\0a\\09\\08\\07\\06\\05\\04\\03\\02\\01\\00") ;; 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 + (func (export "as-i8x16.swizzle-operand") (result v128) + (i8x16.swizzle (v128.load (i32.const 0)) (v128.load offset=15 (i32.const 1))) + ) +)`); + +// ./test/core/simd/simd_load.wast:127 +assert_return( + () => invoke($12, `as-i8x16.swizzle-operand`, []), + [ + i8x16([0x73, 0x72, 0x71, 0x70, 0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x69, 0x68, 0x67, 0x66, 0x65, 0x64]), + ], +); + +// ./test/core/simd/simd_load.wast:129 +let $13 = instantiate(`(module (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\00\\01\\02\\03") + (func (export "as-br-value") (result v128) + (block (result v128) (br 0 (v128.load (i32.const 0)))) + ) +)`); + +// ./test/core/simd/simd_load.wast:135 +assert_return(() => invoke($13, `as-br-value`, []), [i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c])]); + +// ./test/core/simd/simd_load.wast:140 +assert_malformed( + () => instantiate(`(memory 1) (func (local v128) (drop (v128.load8 (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load.wast:147 +assert_malformed( + () => instantiate(`(memory 1) (func (local v128) (drop (v128.load16 (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load.wast:154 +assert_malformed( + () => instantiate(`(memory 1) (func (local v128) (drop (v128.load32 (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load.wast:165 +assert_invalid( + () => instantiate(`(module (memory 1) (func (local v128) (drop (v128.load (f32.const 0)))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load.wast:169 +assert_invalid( + () => instantiate(`(module (memory 1) (func (local v128) (block (br_if 0 (v128.load (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load.wast:173 +assert_invalid( + () => instantiate(`(module (memory 1) (func (local v128) (v128.load (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load.wast:181 +assert_invalid( + () => instantiate(`(module (memory 1) (func (drop (v128.load (local.get 2)))))`), + `unknown local 2`, +); + +// ./test/core/simd/simd_load.wast:185 +assert_invalid( + () => instantiate(`(module (memory 1) (func (drop (v128.load))))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/simd_memory-multi.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/simd_memory-multi.wast.js new file mode 100644 index 0000000000..7214d0785e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/simd_memory-multi.wast.js @@ -0,0 +1,58 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_memory-multi.wast + +// ./test/core/simd/simd_memory-multi.wast:5 +let $0 = instantiate(`(module + (memory 1) + (memory $$m 1) + + (func + (local $$v v128) + + (drop (v128.load8_lane 1 (i32.const 0) (local.get $$v))) + (drop (v128.load8_lane 1 offset=0 1 (i32.const 0) (local.get $$v))) + (drop (v128.load8_lane 1 offset=0 align=1 1 (i32.const 0) (local.get $$v))) + (drop (v128.load8_lane 1 align=1 1 (i32.const 0) (local.get $$v))) + + (drop (v128.load8_lane $$m 1 (i32.const 0) (local.get $$v))) + (drop (v128.load8_lane $$m offset=0 1 (i32.const 0) (local.get $$v))) + (drop (v128.load8_lane $$m offset=0 align=1 1 (i32.const 0) (local.get $$v))) + (drop (v128.load8_lane $$m align=1 1 (i32.const 0) (local.get $$v))) + + (drop (v128.load8_lane 1 1 (i32.const 0) (local.get $$v))) + (drop (v128.load8_lane 1 offset=0 1 (i32.const 0) (local.get $$v))) + (drop (v128.load8_lane 1 offset=0 align=1 1 (i32.const 0) (local.get $$v))) + (drop (v128.load8_lane 1 align=1 1 (i32.const 0) (local.get $$v))) + + (v128.store8_lane 1 (i32.const 0) (local.get $$v)) + (v128.store8_lane offset=0 1 (i32.const 0) (local.get $$v)) + (v128.store8_lane offset=0 align=1 1 (i32.const 0) (local.get $$v)) + (v128.store8_lane align=1 1 (i32.const 0) (local.get $$v)) + + (v128.store8_lane $$m 1 (i32.const 0) (local.get $$v)) + (v128.store8_lane $$m offset=0 1 (i32.const 0) (local.get $$v)) + (v128.store8_lane $$m offset=0 align=1 1 (i32.const 0) (local.get $$v)) + (v128.store8_lane $$m align=1 1 (i32.const 0) (local.get $$v)) + + (v128.store8_lane 1 1 (i32.const 0) (local.get $$v)) + (v128.store8_lane 1 offset=0 1 (i32.const 0) (local.get $$v)) + (v128.store8_lane 1 offset=0 align=1 1 (i32.const 0) (local.get $$v)) + (v128.store8_lane 1 align=1 1 (i32.const 0) (local.get $$v)) + ) +)`); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/simd_store.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/simd_store.wast.js new file mode 100644 index 0000000000..aaecc09ddd --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/simd_store.wast.js @@ -0,0 +1,238 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_store.wast + +// ./test/core/simd/simd_store.wast:3 +let $0 = instantiate(`(module + (memory 1) + (func (export "v128.store_i8x16") (result v128) + (v128.store (i32.const 0) (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)) + (v128.load (i32.const 0)) + ) + (func (export "v128.store_i16x8") (result v128) + (v128.store (i32.const 0) (v128.const i16x8 0 1 2 3 4 5 6 7)) + (v128.load (i32.const 0)) + ) + (func (export "v128.store_i16x8_2") (result v128) + (v128.store (i32.const 0) (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345)) + (v128.load (i32.const 0)) + ) + (func (export "v128.store_i16x8_3") (result v128) + (v128.store (i32.const 0) (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234)) + (v128.load (i32.const 0)) + ) + (func (export "v128.store_i32x4") (result v128) + (v128.store (i32.const 0) (v128.const i32x4 0 1 2 3)) + (v128.load (i32.const 0)) + ) + (func (export "v128.store_i32x4_2") (result v128) + (v128.store (i32.const 0) (v128.const i32x4 0_123_456_789 0_123_456_789 0_123_456_789 0_123_456_789)) + (v128.load (i32.const 0)) + ) + (func (export "v128.store_i32x4_3") (result v128) + (v128.store (i32.const 0) (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678)) + (v128.load (i32.const 0)) + ) + + (func (export "v128.store_f32x4") (result v128) + (v128.store (i32.const 0) (v128.const f32x4 0 1 2 3)) + (v128.load (i32.const 0)) + ) +)`); + +// ./test/core/simd/simd_store.wast:40 +assert_return( + () => invoke($0, `v128.store_i8x16`, []), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_store.wast:41 +assert_return(() => invoke($0, `v128.store_i16x8`, []), [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])]); + +// ./test/core/simd/simd_store.wast:42 +assert_return( + () => invoke($0, `v128.store_i16x8_2`, []), + [i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039])], +); + +// ./test/core/simd/simd_store.wast:43 +assert_return( + () => invoke($0, `v128.store_i16x8_3`, []), + [i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234])], +); + +// ./test/core/simd/simd_store.wast:44 +assert_return(() => invoke($0, `v128.store_i32x4`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_store.wast:45 +assert_return( + () => invoke($0, `v128.store_i32x4_2`, []), + [i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15])], +); + +// ./test/core/simd/simd_store.wast:46 +assert_return( + () => invoke($0, `v128.store_i32x4_3`, []), + [i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678])], +); + +// ./test/core/simd/simd_store.wast:47 +assert_return( + () => invoke($0, `v128.store_f32x4`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 2), + value("f32", 3), + ), + ], +); + +// ./test/core/simd/simd_store.wast:52 +let $1 = instantiate(`(module + (memory 1) + (func (export "as-block-value") + (block (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0))) + ) + (func (export "as-loop-value") + (loop (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0))) + ) + (func (export "as-br-value") + (block (br 0 (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0)))) + ) + (func (export "as-br_if-value") + (block + (br_if 0 (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0)) (i32.const 1)) + ) + ) + (func (export "as-br_if-value-cond") + (block + (br_if 0 (i32.const 6) (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0))) + ) + ) + (func (export "as-br_table-value") + (block + (br_table 0 (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0)) (i32.const 1)) + ) + ) + (func (export "as-return-value") + (return (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0))) + ) + (func (export "as-if-then") + (if (i32.const 1) (then (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0)))) + ) + (func (export "as-if-else") + (if (i32.const 0) (then) (else (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0)))) + ) +)`); + +// ./test/core/simd/simd_store.wast:89 +assert_return(() => invoke($1, `as-block-value`, []), []); + +// ./test/core/simd/simd_store.wast:90 +assert_return(() => invoke($1, `as-loop-value`, []), []); + +// ./test/core/simd/simd_store.wast:91 +assert_return(() => invoke($1, `as-br-value`, []), []); + +// ./test/core/simd/simd_store.wast:92 +assert_return(() => invoke($1, `as-br_if-value`, []), []); + +// ./test/core/simd/simd_store.wast:93 +assert_return(() => invoke($1, `as-br_if-value-cond`, []), []); + +// ./test/core/simd/simd_store.wast:94 +assert_return(() => invoke($1, `as-br_table-value`, []), []); + +// ./test/core/simd/simd_store.wast:95 +assert_return(() => invoke($1, `as-return-value`, []), []); + +// ./test/core/simd/simd_store.wast:96 +assert_return(() => invoke($1, `as-if-then`, []), []); + +// ./test/core/simd/simd_store.wast:97 +assert_return(() => invoke($1, `as-if-else`, []), []); + +// ./test/core/simd/simd_store.wast:102 +assert_malformed( + () => instantiate(`(memory 1) (func (v128.store8 (i32.const 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_store.wast:109 +assert_malformed( + () => instantiate(`(memory 1) (func (v128.store16 (i32.const 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_store.wast:116 +assert_malformed( + () => instantiate(`(memory 1) (func (v128.store32 (i32.const 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_store.wast:127 +assert_invalid( + () => instantiate(`(module (memory 1) (func (v128.store (f32.const 0) (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_store.wast:131 +assert_invalid( + () => instantiate(`(module (memory 1) (func (local v128) (block (br_if 0 (v128.store)))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_store.wast:135 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result v128) (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_store.wast:143 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.store-1st-arg-empty + (v128.store (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_store.wast:151 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.store-2nd-arg-empty + (v128.store (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_store.wast:159 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.store-arg-empty + (v128.store) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/start0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/start0.wast.js new file mode 100644 index 0000000000..90cd5d63ac --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/start0.wast.js @@ -0,0 +1,73 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/start0.wast + +// ./test/core/multi-memory/start0.wast:1 +let $0 = instantiate(`(module + (memory 0) + (memory $$m (data "A")) + (memory $$n 1) + + (func $$inc + (i32.store8 $$m + (i32.const 0) + (i32.add + (i32.load8_u $$m (i32.const 0)) + (i32.const 1) + ) + ) + ) + (func $$get (result i32) + (return (i32.load8_u $$m (i32.const 0))) + ) + (func $$getn (result i32) + (return (i32.load8_u $$n (i32.const 0))) + ) + (func $$main + (call $$inc) + (call $$inc) + (call $$inc) + ) + + (start $$main) + (export "inc" (func $$inc)) + (export "get" (func $$get)) + (export "getn" (func $$getn)) +)`); + +// ./test/core/multi-memory/start0.wast:32 +assert_return(() => invoke($0, `get`, []), [value("i32", 68)]); + +// ./test/core/multi-memory/start0.wast:33 +assert_return(() => invoke($0, `getn`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/start0.wast:35 +invoke($0, `inc`, []); + +// ./test/core/multi-memory/start0.wast:36 +assert_return(() => invoke($0, `get`, []), [value("i32", 69)]); + +// ./test/core/multi-memory/start0.wast:37 +assert_return(() => invoke($0, `getn`, []), [value("i32", 0)]); + +// ./test/core/multi-memory/start0.wast:39 +invoke($0, `inc`, []); + +// ./test/core/multi-memory/start0.wast:40 +assert_return(() => invoke($0, `get`, []), [value("i32", 70)]); + +// ./test/core/multi-memory/start0.wast:41 +assert_return(() => invoke($0, `getn`, []), [value("i32", 0)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/store.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/store.wast.js new file mode 100644 index 0000000000..8c9a75f0c2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/store.wast.js @@ -0,0 +1,803 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/store.wast + +// ./test/core/store.wast:3 +let $0 = instantiate(`(module + (memory $$mem1 1) + (memory $$mem2 1) + + (func (export "load1") (param i32) (result i64) + (i64.load $$mem1 (local.get 0)) + ) + (func (export "load2") (param i32) (result i64) + (i64.load $$mem2 (local.get 0)) + ) + + (func (export "store1") (param i32 i64) + (i64.store $$mem1 (local.get 0) (local.get 1)) + ) + (func (export "store2") (param i32 i64) + (i64.store $$mem2 (local.get 0) (local.get 1)) + ) +)`); + +// ./test/core/store.wast:22 +invoke($0, `store1`, [0, 1n]); + +// ./test/core/store.wast:23 +invoke($0, `store2`, [0, 2n]); + +// ./test/core/store.wast:24 +assert_return(() => invoke($0, `load1`, [0]), [value("i64", 1n)]); + +// ./test/core/store.wast:25 +assert_return(() => invoke($0, `load2`, [0]), [value("i64", 2n)]); + +// ./test/core/store.wast:28 +let $1 = instantiate(`(module $$M1 + (memory (export "mem") 1) + + (func (export "load") (param i32) (result i64) + (i64.load (local.get 0)) + ) + (func (export "store") (param i32 i64) + (i64.store (local.get 0) (local.get 1)) + ) +)`); +register($1, `M1`); + +// ./test/core/store.wast:38 +register($1, `M1`); + +// ./test/core/store.wast:40 +let $2 = instantiate(`(module $$M2 + (memory (export "mem") 1) + + (func (export "load") (param i32) (result i64) + (i64.load (local.get 0)) + ) + (func (export "store") (param i32 i64) + (i64.store (local.get 0) (local.get 1)) + ) +)`); +register($2, `M2`); + +// ./test/core/store.wast:50 +register($2, `M2`); + +// ./test/core/store.wast:52 +invoke(`M1`, `store`, [0, 1n]); + +// ./test/core/store.wast:53 +invoke(`M2`, `store`, [0, 2n]); + +// ./test/core/store.wast:54 +assert_return(() => invoke(`M1`, `load`, [0]), [value("i64", 1n)]); + +// ./test/core/store.wast:55 +assert_return(() => invoke(`M2`, `load`, [0]), [value("i64", 2n)]); + +// ./test/core/store.wast:57 +let $3 = instantiate(`(module + (memory $$mem1 (import "M1" "mem") 1) + (memory $$mem2 (import "M2" "mem") 1) + + (func (export "load1") (param i32) (result i64) + (i64.load $$mem1 (local.get 0)) + ) + (func (export "load2") (param i32) (result i64) + (i64.load $$mem2 (local.get 0)) + ) + + (func (export "store1") (param i32 i64) + (i64.store $$mem1 (local.get 0) (local.get 1)) + ) + (func (export "store2") (param i32 i64) + (i64.store $$mem2 (local.get 0) (local.get 1)) + ) +)`); + +// ./test/core/store.wast:76 +invoke($3, `store1`, [0, 1n]); + +// ./test/core/store.wast:77 +invoke($3, `store2`, [0, 2n]); + +// ./test/core/store.wast:78 +assert_return(() => invoke($3, `load1`, [0]), [value("i64", 1n)]); + +// ./test/core/store.wast:79 +assert_return(() => invoke($3, `load2`, [0]), [value("i64", 2n)]); + +// ./test/core/store.wast:82 +let $4 = instantiate(`(module + (memory (export "mem") 2) +)`); + +// ./test/core/store.wast:85 +register($4, `M`); + +// ./test/core/store.wast:87 +let $5 = instantiate(`(module + (memory $$mem1 (import "M" "mem") 2) + (memory $$mem2 3) + + (data (memory $$mem1) (i32.const 20) "\\01\\02\\03\\04\\05") + (data (memory $$mem2) (i32.const 50) "\\0A\\0B\\0C\\0D\\0E") + + (func (export "read1") (param i32) (result i32) + (i32.load8_u $$mem1 (local.get 0)) + ) + (func (export "read2") (param i32) (result i32) + (i32.load8_u $$mem2 (local.get 0)) + ) + + (func (export "copy-1-to-2") + (local $$i i32) + (local.set $$i (i32.const 20)) + (loop $$cont + (br_if 1 (i32.eq (local.get $$i) (i32.const 23))) + (i32.store8 $$mem2 (local.get $$i) (i32.load8_u $$mem1 (local.get $$i))) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (br $$cont) + ) + ) + + (func (export "copy-2-to-1") + (local $$i i32) + (local.set $$i (i32.const 50)) + (loop $$cont + (br_if 1 (i32.eq (local.get $$i) (i32.const 54))) + (i32.store8 $$mem1 (local.get $$i) (i32.load8_u $$mem2 (local.get $$i))) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (br $$cont) + ) + ) +)`); + +// ./test/core/store.wast:124 +assert_return(() => invoke($5, `read2`, [20]), [value("i32", 0)]); + +// ./test/core/store.wast:125 +assert_return(() => invoke($5, `read2`, [21]), [value("i32", 0)]); + +// ./test/core/store.wast:126 +assert_return(() => invoke($5, `read2`, [22]), [value("i32", 0)]); + +// ./test/core/store.wast:127 +assert_return(() => invoke($5, `read2`, [23]), [value("i32", 0)]); + +// ./test/core/store.wast:128 +assert_return(() => invoke($5, `read2`, [24]), [value("i32", 0)]); + +// ./test/core/store.wast:129 +invoke($5, `copy-1-to-2`, []); + +// ./test/core/store.wast:130 +assert_return(() => invoke($5, `read2`, [20]), [value("i32", 1)]); + +// ./test/core/store.wast:131 +assert_return(() => invoke($5, `read2`, [21]), [value("i32", 2)]); + +// ./test/core/store.wast:132 +assert_return(() => invoke($5, `read2`, [22]), [value("i32", 3)]); + +// ./test/core/store.wast:133 +assert_return(() => invoke($5, `read2`, [23]), [value("i32", 0)]); + +// ./test/core/store.wast:134 +assert_return(() => invoke($5, `read2`, [24]), [value("i32", 0)]); + +// ./test/core/store.wast:136 +assert_return(() => invoke($5, `read1`, [50]), [value("i32", 0)]); + +// ./test/core/store.wast:137 +assert_return(() => invoke($5, `read1`, [51]), [value("i32", 0)]); + +// ./test/core/store.wast:138 +assert_return(() => invoke($5, `read1`, [52]), [value("i32", 0)]); + +// ./test/core/store.wast:139 +assert_return(() => invoke($5, `read1`, [53]), [value("i32", 0)]); + +// ./test/core/store.wast:140 +assert_return(() => invoke($5, `read1`, [54]), [value("i32", 0)]); + +// ./test/core/store.wast:141 +invoke($5, `copy-2-to-1`, []); + +// ./test/core/store.wast:142 +assert_return(() => invoke($5, `read1`, [50]), [value("i32", 10)]); + +// ./test/core/store.wast:143 +assert_return(() => invoke($5, `read1`, [51]), [value("i32", 11)]); + +// ./test/core/store.wast:144 +assert_return(() => invoke($5, `read1`, [52]), [value("i32", 12)]); + +// ./test/core/store.wast:145 +assert_return(() => invoke($5, `read1`, [53]), [value("i32", 13)]); + +// ./test/core/store.wast:146 +assert_return(() => invoke($5, `read1`, [54]), [value("i32", 0)]); + +// ./test/core/store.wast:151 +let $6 = instantiate(`(module + (memory 1) + + (func (export "as-block-value") + (block (i32.store (i32.const 0) (i32.const 1))) + ) + (func (export "as-loop-value") + (loop (i32.store (i32.const 0) (i32.const 1))) + ) + + (func (export "as-br-value") + (block (br 0 (i32.store (i32.const 0) (i32.const 1)))) + ) + (func (export "as-br_if-value") + (block + (br_if 0 (i32.store (i32.const 0) (i32.const 1)) (i32.const 1)) + ) + ) + (func (export "as-br_if-value-cond") + (block + (br_if 0 (i32.const 6) (i32.store (i32.const 0) (i32.const 1))) + ) + ) + (func (export "as-br_table-value") + (block + (br_table 0 (i32.store (i32.const 0) (i32.const 1)) (i32.const 1)) + ) + ) + + (func (export "as-return-value") + (return (i32.store (i32.const 0) (i32.const 1))) + ) + + (func (export "as-if-then") + (if (i32.const 1) (then (i32.store (i32.const 0) (i32.const 1)))) + ) + (func (export "as-if-else") + (if (i32.const 0) (then) (else (i32.store (i32.const 0) (i32.const 1)))) + ) +)`); + +// ./test/core/store.wast:192 +assert_return(() => invoke($6, `as-block-value`, []), []); + +// ./test/core/store.wast:193 +assert_return(() => invoke($6, `as-loop-value`, []), []); + +// ./test/core/store.wast:195 +assert_return(() => invoke($6, `as-br-value`, []), []); + +// ./test/core/store.wast:196 +assert_return(() => invoke($6, `as-br_if-value`, []), []); + +// ./test/core/store.wast:197 +assert_return(() => invoke($6, `as-br_if-value-cond`, []), []); + +// ./test/core/store.wast:198 +assert_return(() => invoke($6, `as-br_table-value`, []), []); + +// ./test/core/store.wast:200 +assert_return(() => invoke($6, `as-return-value`, []), []); + +// ./test/core/store.wast:202 +assert_return(() => invoke($6, `as-if-then`, []), []); + +// ./test/core/store.wast:203 +assert_return(() => invoke($6, `as-if-else`, []), []); + +// ./test/core/store.wast:205 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (i32.store32 (local.get 0) (i32.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:212 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (i32.store64 (local.get 0) (i64.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:220 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (i64.store64 (local.get 0) (i64.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:228 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (f32.store32 (local.get 0) (f32.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:235 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (f32.store64 (local.get 0) (f64.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:243 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (f64.store32 (local.get 0) (f32.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:250 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (f64.store64 (local.get 0) (f64.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:259 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i32) (result i32) (i32.store (i32.const 0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:263 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i64) (result i64) (i64.store (i32.const 0) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:267 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param f32) (result f32) (f32.store (i32.const 0) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:271 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param f64) (result f64) (f64.store (i32.const 0) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:275 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i32) (result i32) (i32.store8 (i32.const 0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:279 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i32) (result i32) (i32.store16 (i32.const 0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:283 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i64) (result i64) (i64.store8 (i32.const 0) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:287 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i64) (result i64) (i64.store16 (i32.const 0) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:291 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i64) (result i64) (i64.store32 (i32.const 0) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:297 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty + (i32.store) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:306 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty + (i32.const 0) (i32.store) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:315 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-block + (i32.const 0) (i32.const 0) + (block (i32.store)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:325 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-block + (i32.const 0) + (block (i32.const 0) (i32.store)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:335 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-loop + (i32.const 0) (i32.const 0) + (loop (i32.store)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:345 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-loop + (i32.const 0) + (loop (i32.const 0) (i32.store)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:355 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:365 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-then + (i32.const 0) + (if (then (i32.const 0) (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:375 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:385 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-else + (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (i32.const 0) (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:395 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-br + (i32.const 0) (i32.const 0) + (block (br 0 (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:405 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-br + (i32.const 0) + (block (br 0 (i32.const 0) (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:415 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-br_if + (i32.const 0) (i32.const 0) + (block (br_if 0 (i32.store) (i32.const 1)) ) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:425 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-br_if + (i32.const 0) + (block (br_if 0 (i32.const 0) (i32.store) (i32.const 1)) ) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:435 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-br_table + (i32.const 0) (i32.const 0) + (block (br_table 0 (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:445 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-br_table + (i32.const 0) + (block (br_table 0 (i32.const 0) (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:455 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-return + (return (i32.store)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:464 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-return + (return (i32.const 0) (i32.store)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:473 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-select + (select (i32.store) (i32.const 1) (i32.const 2)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:482 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-select + (select (i32.const 0) (i32.store) (i32.const 1) (i32.const 2)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:491 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-call + (call 1 (i32.store)) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:501 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-call + (call 1 (i32.const 0) (i32.store)) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:511 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-address-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (i32.store) (i32.const 0) + ) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:527 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-value-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (i32.const 0) (i32.store) (i32.const 0) + ) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:547 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i32.store (f32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:548 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i32.store8 (f32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:549 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i32.store16 (f32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:550 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store (f32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:551 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store8 (f32.const 0) (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:552 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store16 (f32.const 0) (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:553 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store32 (f32.const 0) (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:554 +assert_invalid( + () => instantiate(`(module (memory 1) (func (f32.store (f32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:555 +assert_invalid( + () => instantiate(`(module (memory 1) (func (f64.store (f32.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:557 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i32.store (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:558 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i32.store8 (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:559 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i32.store16 (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:560 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:561 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store8 (i32.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:562 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store16 (i32.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:563 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store32 (i32.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:564 +assert_invalid( + () => instantiate(`(module (memory 1) (func (f32.store (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:565 +assert_invalid( + () => instantiate(`(module (memory 1) (func (f64.store (i32.const 0) (i64.const 0))))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/store0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/store0.wast.js new file mode 100644 index 0000000000..9850d62a5a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/store0.wast.js @@ -0,0 +1,48 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/store0.wast + +// ./test/core/multi-memory/store0.wast:3 +let $0 = instantiate(`(module + (memory $$mem1 1) + (memory $$mem2 1) + + (func (export "load1") (param i32) (result i64) + (i64.load $$mem1 (local.get 0)) + ) + (func (export "load2") (param i32) (result i64) + (i64.load $$mem2 (local.get 0)) + ) + + (func (export "store1") (param i32 i64) + (i64.store $$mem1 (local.get 0) (local.get 1)) + ) + (func (export "store2") (param i32 i64) + (i64.store $$mem2 (local.get 0) (local.get 1)) + ) +)`); + +// ./test/core/multi-memory/store0.wast:22 +invoke($0, `store1`, [0, 1n]); + +// ./test/core/multi-memory/store0.wast:23 +invoke($0, `store2`, [0, 2n]); + +// ./test/core/multi-memory/store0.wast:24 +assert_return(() => invoke($0, `load1`, [0]), [value("i64", 1n)]); + +// ./test/core/multi-memory/store0.wast:25 +assert_return(() => invoke($0, `load2`, [0]), [value("i64", 2n)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/store1.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/store1.wast.js new file mode 100644 index 0000000000..e79c256871 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/store1.wast.js @@ -0,0 +1,92 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/store1.wast + +// ./test/core/multi-memory/store1.wast:1 +let $0 = instantiate(`(module $$M1 + (memory (export "mem") 1) + + (func (export "load") (param i32) (result i64) + (i64.load (local.get 0)) + ) + (func (export "store") (param i32 i64) + (i64.store (local.get 0) (local.get 1)) + ) +)`); +register($0, `M1`); + +// ./test/core/multi-memory/store1.wast:11 +register($0, `M1`); + +// ./test/core/multi-memory/store1.wast:13 +let $1 = instantiate(`(module $$M2 + (memory (export "mem") 1) + + (func (export "load") (param i32) (result i64) + (i64.load (local.get 0)) + ) + (func (export "store") (param i32 i64) + (i64.store (local.get 0) (local.get 1)) + ) +)`); +register($1, `M2`); + +// ./test/core/multi-memory/store1.wast:23 +register($1, `M2`); + +// ./test/core/multi-memory/store1.wast:25 +invoke(`M1`, `store`, [0, 1n]); + +// ./test/core/multi-memory/store1.wast:26 +invoke(`M2`, `store`, [0, 2n]); + +// ./test/core/multi-memory/store1.wast:27 +assert_return(() => invoke(`M1`, `load`, [0]), [value("i64", 1n)]); + +// ./test/core/multi-memory/store1.wast:28 +assert_return(() => invoke(`M2`, `load`, [0]), [value("i64", 2n)]); + +// ./test/core/multi-memory/store1.wast:30 +let $2 = instantiate(`(module + (memory $$mem1 (import "M1" "mem") 1) + (memory $$mem2 (import "M2" "mem") 1) + + (func (export "load1") (param i32) (result i64) + (i64.load $$mem1 (local.get 0)) + ) + (func (export "load2") (param i32) (result i64) + (i64.load $$mem2 (local.get 0)) + ) + + (func (export "store1") (param i32 i64) + (i64.store $$mem1 (local.get 0) (local.get 1)) + ) + (func (export "store2") (param i32 i64) + (i64.store $$mem2 (local.get 0) (local.get 1)) + ) +)`); + +// ./test/core/multi-memory/store1.wast:49 +invoke($2, `store1`, [0, 1n]); + +// ./test/core/multi-memory/store1.wast:50 +invoke($2, `store2`, [0, 2n]); + +// ./test/core/multi-memory/store1.wast:51 +assert_return(() => invoke($2, `load1`, [0]), [value("i64", 1n)]); + +// ./test/core/multi-memory/store1.wast:52 +assert_return(() => invoke($2, `load2`, [0]), [value("i64", 2n)]); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/traps0.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/traps0.wast.js new file mode 100644 index 0000000000..ff6a6baa7a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/traps0.wast.js @@ -0,0 +1,80 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/multi-memory/traps0.wast + +// ./test/core/multi-memory/traps0.wast:1 +let $0 = instantiate(`(module + (memory $$mem0 1) + (memory $$mem1 1) + (memory $$mem2 1) + + (func (export "no_dce.i32.load") (param $$i i32) (drop (i32.load $$mem1 (local.get $$i)))) + (func (export "no_dce.i32.load16_s") (param $$i i32) (drop (i32.load16_s $$mem1 (local.get $$i)))) + (func (export "no_dce.i32.load16_u") (param $$i i32) (drop (i32.load16_u $$mem1 (local.get $$i)))) + (func (export "no_dce.i32.load8_s") (param $$i i32) (drop (i32.load8_s $$mem1 (local.get $$i)))) + (func (export "no_dce.i32.load8_u") (param $$i i32) (drop (i32.load8_u $$mem1 (local.get $$i)))) + (func (export "no_dce.i64.load") (param $$i i32) (drop (i64.load $$mem1 (local.get $$i)))) + (func (export "no_dce.i64.load32_s") (param $$i i32) (drop (i64.load32_s $$mem1 (local.get $$i)))) + (func (export "no_dce.i64.load32_u") (param $$i i32) (drop (i64.load32_u $$mem2 (local.get $$i)))) + (func (export "no_dce.i64.load16_s") (param $$i i32) (drop (i64.load16_s $$mem2 (local.get $$i)))) + (func (export "no_dce.i64.load16_u") (param $$i i32) (drop (i64.load16_u $$mem2 (local.get $$i)))) + (func (export "no_dce.i64.load8_s") (param $$i i32) (drop (i64.load8_s $$mem2 (local.get $$i)))) + (func (export "no_dce.i64.load8_u") (param $$i i32) (drop (i64.load8_u $$mem2 (local.get $$i)))) + (func (export "no_dce.f32.load") (param $$i i32) (drop (f32.load $$mem2 (local.get $$i)))) + (func (export "no_dce.f64.load") (param $$i i32) (drop (f64.load $$mem2 (local.get $$i)))) +)`); + +// ./test/core/multi-memory/traps0.wast:22 +assert_trap(() => invoke($0, `no_dce.i32.load`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:23 +assert_trap(() => invoke($0, `no_dce.i32.load16_s`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:24 +assert_trap(() => invoke($0, `no_dce.i32.load16_u`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:25 +assert_trap(() => invoke($0, `no_dce.i32.load8_s`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:26 +assert_trap(() => invoke($0, `no_dce.i32.load8_u`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:27 +assert_trap(() => invoke($0, `no_dce.i64.load`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:28 +assert_trap(() => invoke($0, `no_dce.i64.load32_s`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:29 +assert_trap(() => invoke($0, `no_dce.i64.load32_u`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:30 +assert_trap(() => invoke($0, `no_dce.i64.load16_s`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:31 +assert_trap(() => invoke($0, `no_dce.i64.load16_u`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:32 +assert_trap(() => invoke($0, `no_dce.i64.load8_s`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:33 +assert_trap(() => invoke($0, `no_dce.i64.load8_u`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:34 +assert_trap(() => invoke($0, `no_dce.f32.load`, [65536]), `out of bounds memory access`); + +// ./test/core/multi-memory/traps0.wast:35 +assert_trap(() => invoke($0, `no_dce.f64.load`, [65536]), `out of bounds memory access`); diff --git a/js/src/jit-test/tests/wasm/spec/relaxed-simd/directives.txt b/js/src/jit-test/tests/wasm/spec/relaxed-simd/directives.txt new file mode 100644 index 0000000000..625758af79 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/relaxed-simd/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-relaxed-simd; skip-if: !wasmRelaxedSimdEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/relaxed-simd/harness/directives.txt b/js/src/jit-test/tests/wasm/spec/relaxed-simd/harness/directives.txt new file mode 100644 index 0000000000..d41243abbb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/relaxed-simd/harness/directives.txt @@ -0,0 +1 @@ +|jit-test| skip-if: true \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/relaxed-simd/harness/harness.js b/js/src/jit-test/tests/wasm/spec/relaxed-simd/harness/harness.js new file mode 100644 index 0000000000..a96781e8ed --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/relaxed-simd/harness/harness.js @@ -0,0 +1,448 @@ +"use strict"; + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +if (!wasmIsSupported()) { + quit(); +} + +function bytes(type, bytes) { + var typedBuffer = new Uint8Array(bytes); + return wasmGlobalFromArrayBuffer(type, typedBuffer.buffer); +} +function value(type, value) { + return new WebAssembly.Global({ + value: type, + mutable: false, + }, value); +} + +function i8x16(elements) { + let typedBuffer = new Uint8Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i16x8(elements) { + let typedBuffer = new Uint16Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i32x4(elements) { + let typedBuffer = new Uint32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i64x2(elements) { + let typedBuffer = new BigUint64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f32x4(elements) { + let typedBuffer = new Float32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f64x2(elements) { + let typedBuffer = new Float64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} + +function either(...arr) { + return new EitherVariants(arr); +} + +class F32x4Pattern { + constructor(x, y, z, w) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } +} + +class F64x2Pattern { + constructor(x, y) { + this.x = x; + this.y = y; + } +} + +class RefWithType { + constructor(type) { + this.type = type; + } + + formatExpected() { + return `RefWithType(${this.type})`; + } + + test(refGlobal) { + try { + new WebAssembly.Global({value: this.type}, refGlobal.value); + return true; + } catch (err) { + assertEq(err instanceof TypeError, true, `wrong type of error when creating global: ${err}`); + assertEq(!!err.message.match(/can only pass/), true, `wrong type of error when creating global: ${err}`); + return false; + } + } +} + +// ref.extern values created by spec tests will be JS objects of the form +// { [externsym]: }. Other externref values are possible to observe +// if extern.convert_any is used. +let externsym = Symbol("externref"); +function externref(s) { + return { [externsym]: s }; +} +function is_externref(x) { + return (x !== null && externsym in x) ? 1 : 0; +} +function is_funcref(x) { + return typeof x === "function" ? 1 : 0; +} +function eq_externref(x, y) { + return x === y ? 1 : 0; +} +function eq_funcref(x, y) { + return x === y ? 1 : 0; +} + +class ExternRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.extern ${this.n}`; + } + + test(global) { + // the global's value can either be an externref or just a plain old JS number + let result = global.value; + if (typeof global.value === "object" && externsym in global.value) { + result = global.value[externsym]; + } + return result === this.n; + } +} + +// ref.host values created by spectests will be whatever the JS API does to +// convert the given value to anyref. It should implicitly be like any.convert_extern. +function hostref(v) { + if (!wasmGcEnabled()) { + throw new Error("ref.host only works when wasm GC is enabled"); + } + + const { internalizeNum } = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(`(module + (func (import "test" "coerce") (param i32) (result anyref)) + (func (export "internalizeNum") (param i32) (result anyref) + (call 0 (local.get 0)) + ) + )`)), + { "test": { "coerce": x => x } }, + ).exports; + return internalizeNum(v); +} + +class HostRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.host ${this.n}`; + } + + test(externrefGlobal) { + assertEq(externsym in externrefGlobal.value, true, `HostRefResult only works with externref inputs`); + return externrefGlobal.value[externsym] === this.n; + } +} + +let spectest = { + externref: externref, + is_externref: is_externref, + is_funcref: is_funcref, + eq_externref: eq_externref, + eq_funcref: eq_funcref, + print: console.log.bind(console), + print_i32: console.log.bind(console), + print_i32_f32: console.log.bind(console), + print_f64_f64: console.log.bind(console), + print_f32: console.log.bind(console), + print_f64: console.log.bind(console), + global_i32: 666, + global_i64: 666n, + global_f32: 666, + global_f64: 666, + table: new WebAssembly.Table({ + initial: 10, + maximum: 20, + element: "anyfunc", + }), + memory: new WebAssembly.Memory({ initial: 1, maximum: 2 }), +}; + +let linkage = { + spectest, +}; + +function getInstance(instanceish) { + if (typeof instanceish === "string") { + assertEq( + instanceish in linkage, + true, + `'${instanceish}'' must be registered`, + ); + return linkage[instanceish]; + } + return instanceish; +} + +function instantiate(source) { + let bytecode = wasmTextToBinary(source); + let module = new WebAssembly.Module(bytecode); + let instance = new WebAssembly.Instance(module, linkage); + return instance.exports; +} + +function register(instanceish, name) { + linkage[name] = getInstance(instanceish); +} + +function invoke(instanceish, field, params) { + let func = getInstance(instanceish)[field]; + assertEq(func instanceof Function, true, "expected a function"); + return wasmLosslessInvoke(func, ...params); +} + +function get(instanceish, field) { + let global = getInstance(instanceish)[field]; + assertEq( + global instanceof WebAssembly.Global, + true, + "expected a WebAssembly.Global", + ); + return global; +} + +function assert_trap(thunk, message) { + try { + thunk(); + throw new Error("expected trap"); + } catch (err) { + if (err instanceof WebAssembly.RuntimeError) { + return; + } + throw err; + } +} + +let StackOverflow; +try { + (function f() { + 1 + f(); + })(); +} catch (e) { + StackOverflow = e.constructor; +} +function assert_exhaustion(thunk, message) { + try { + thunk(); + assertEq("normal return", "exhaustion"); + } catch (err) { + assertEq( + err instanceof StackOverflow, + true, + "expected exhaustion", + ); + } +} + +function assert_invalid(thunk, message) { + try { + thunk(); + assertEq("valid module", "invalid module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an invalid module", + ); + } +} + +function assert_unlinkable(thunk, message) { + try { + thunk(); + assertEq(true, false, "expected an unlinkable module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an unlinkable module", + ); + } +} + +function assert_malformed(thunk, message) { + try { + thunk(); + assertEq("valid module", "malformed module"); + } catch (err) { + assertEq( + err instanceof TypeError || + err instanceof SyntaxError || + err instanceof WebAssembly.CompileError || + err instanceof WebAssembly.LinkError, + true, + `expected a malformed module`, + ); + } +} + +function assert_exception(thunk) { + let thrown = false; + try { + thunk(); + } catch (err) { + thrown = true; + } + assertEq(thrown, true, "expected an exception to be thrown"); +} + +function assert_return(thunk, expected) { + let results = thunk(); + + if (results === undefined) { + results = []; + } else if (!Array.isArray(results)) { + results = [results]; + } + if (!Array.isArray(expected)) { + expected = [expected]; + } + + if (!compareResults(results, expected)) { + let got = results.map((x) => formatResult(x)).join(", "); + let wanted = expected.map((x) => formatExpected(x)).join(", "); + assertEq( + `[${got}]`, + `[${wanted}]`, + ); + assertEq(true, false, `${got} !== ${wanted}`); + } +} + +function formatResult(result) { + if (typeof (result) === "object") { + return wasmGlobalToString(result); + } else { + return `${result}`; + } +} + +function formatExpected(expected) { + if ( + expected === `f32_canonical_nan` || + expected === `f32_arithmetic_nan` || + expected === `f64_canonical_nan` || + expected === `f64_arithmetic_nan` + ) { + return expected; + } else if (expected instanceof F32x4Pattern) { + return `f32x4(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + }, ${formatExpected(expected.z)}, ${formatExpected(expected.w)})`; + } else if (expected instanceof F64x2Pattern) { + return `f64x2(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + })`; + } else if (expected instanceof EitherVariants) { + return expected.formatExpected(); + } else if (expected instanceof RefWithType) { + return expected.formatExpected(); + } else if (expected instanceof ExternRefResult) { + return expected.formatExpected(); + } else if (expected instanceof HostRefResult) { + return expected.formatExpected(); + } else if (typeof (expected) === "object") { + return wasmGlobalToString(expected); + } else { + throw new Error("unknown expected result"); + } +} + +class EitherVariants { + constructor(arr) { + this.arr = arr; + } + matches(v) { + return this.arr.some((e) => compareResult(v, e)); + } + formatExpected() { + return `either(${this.arr.map(formatExpected).join(", ")})`; + } +} + +function compareResults(results, expected) { + if (results.length !== expected.length) { + return false; + } + for (let i in results) { + if (expected[i] instanceof EitherVariants) { + return expected[i].matches(results[i]); + } + if (!compareResult(results[i], expected[i])) { + return false; + } + } + return true; +} + +function compareResult(result, expected) { + if ( + expected === `canonical_nan` || + expected === `arithmetic_nan` + ) { + return wasmGlobalIsNaN(result, expected); + } else if (expected === null) { + return result.value === null; + } else if (expected instanceof F32x4Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f32x4", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 1), expected.y) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 2), expected.z) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 3), expected.w); + } else if (expected instanceof F64x2Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f64x2", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f64x2", 1), expected.y); + } else if (expected instanceof RefWithType) { + return expected.test(result); + } else if (expected instanceof ExternRefResult) { + return expected.test(result); + } else if (expected instanceof HostRefResult) { + return expected.test(result); + } else if (typeof (expected) === "object") { + return wasmGlobalsEqual(result, expected); + } else { + throw new Error("unknown expected result"); + } +} diff --git a/js/src/jit-test/tests/wasm/spec/relaxed-simd/i16x8_relaxed_q15mulr_s.wast.js b/js/src/jit-test/tests/wasm/spec/relaxed-simd/i16x8_relaxed_q15mulr_s.wast.js new file mode 100644 index 0000000000..401f55986e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/relaxed-simd/i16x8_relaxed_q15mulr_s.wast.js @@ -0,0 +1,49 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/relaxed-simd/i16x8_relaxed_q15mulr_s.wast + +// ./test/core/relaxed-simd/i16x8_relaxed_q15mulr_s.wast:4 +let $0 = instantiate(`(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)))) +)`); + +// ./test/core/relaxed-simd/i16x8_relaxed_q15mulr_s.wast:14 +assert_return( + () => invoke($0, `i16x8.relaxed_q15mulr_s`, [ + i16x8([0x8000, 0x8001, 0x7fff, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x8000, 0x8000, 0x7fff, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + either( + i16x8([0x8000, 0x7fff, 0x7ffe, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x7fff, 0x7fff, 0x7ffe, 0x0, 0x0, 0x0, 0x0, 0x0]), + ), + ], +); + +// ./test/core/relaxed-simd/i16x8_relaxed_q15mulr_s.wast:23 +assert_return( + () => invoke($0, `i16x8.relaxed_q15mulr_s_cmp`, [ + i16x8([0x8000, 0x8001, 0x7fff, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x8000, 0x8000, 0x7fff, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); diff --git a/js/src/jit-test/tests/wasm/spec/relaxed-simd/i32x4_relaxed_trunc.wast.js b/js/src/jit-test/tests/wasm/spec/relaxed-simd/i32x4_relaxed_trunc.wast.js new file mode 100644 index 0000000000..542955765e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/relaxed-simd/i32x4_relaxed_trunc.wast.js @@ -0,0 +1,338 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:4 +let $0 = instantiate(`(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/core/relaxed-simd/i32x4_relaxed_trunc.wast:36 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f32x4_s`, [ + f32x4([-2147483600, -2147484000, 2, 2147484000]), + ]), + [ + either( + i32x4([0x80000000, 0x80000000, 0x2, 0x7fffffff]), + i32x4([0x80000000, 0x80000000, 0x2, 0x80000000]), + ), + ], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:43 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f32x4_s`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x44, + 0x44, + 0xc4, + 0x7f, + 0x44, + 0x44, + 0xc4, + 0xff, + ]), + ]), + [ + either( + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ), + ], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:49 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f32x4_u`, [ + f32x4([0, -1, 4294967000, 4294967300]), + ]), + [ + either( + i32x4([0x0, 0x0, 0xffffff00, 0xffffffff]), + i32x4([0x0, 0xffffffff, 0xffffff00, 0xffffffff]), + i32x4([0x0, 0xffffffff, 0xffffff00, 0x0]), + ), + ], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:56 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f32x4_u`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x44, + 0x44, + 0xc4, + 0x7f, + 0x44, + 0x44, + 0xc4, + 0xff, + ]), + ]), + [ + either( + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ), + ], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:62 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f64x2_s_zero`, [ + f64x2([-2147483904, 2147483904]), + ]), + [ + either( + i32x4([0x80000000, 0x7fffffff, 0x0, 0x0]), + i32x4([0x80000000, 0x80000000, 0x0, 0x0]), + ), + ], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:68 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f64x2_s_zero`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + either(i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x80000000, 0x80000000, 0x0, 0x0])), + ], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:73 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f64x2_u_zero`, [f64x2([-1, 4294967296])]), + [ + either( + i32x4([0x0, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xfffffffe, 0x0, 0x0, 0x0]), + ), + ], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:79 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f64x2_u_zero`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + either(i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])), + ], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:86 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f32x4_s_cmp`, [ + f32x4([-2147483600, -2147484000, 2147483600, 2147484000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:92 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f32x4_s_cmp`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x44, + 0x44, + 0xc4, + 0x7f, + 0x44, + 0x44, + 0xc4, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:97 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f32x4_u_cmp`, [ + f32x4([0, -1, 4294967000, 4294967300]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:103 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f32x4_u_cmp`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x44, + 0x44, + 0xc4, + 0x7f, + 0x44, + 0x44, + 0xc4, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:108 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f64x2_s_zero_cmp`, [ + f64x2([-2147483904, 2147483904]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:113 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f64x2_s_zero_cmp`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:117 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f64x2_u_zero_cmp`, [f64x2([-1, 4294967296])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/i32x4_relaxed_trunc.wast:122 +assert_return( + () => invoke($0, `i32x4.relaxed_trunc_f64x2_u_zero_cmp`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); diff --git a/js/src/jit-test/tests/wasm/spec/relaxed-simd/i8x16_relaxed_swizzle.wast.js b/js/src/jit-test/tests/wasm/spec/relaxed-simd/i8x16_relaxed_swizzle.wast.js new file mode 100644 index 0000000000..09ed934c02 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/relaxed-simd/i8x16_relaxed_swizzle.wast.js @@ -0,0 +1,90 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/relaxed-simd/i8x16_relaxed_swizzle.wast + +// ./test/core/relaxed-simd/i8x16_relaxed_swizzle.wast:4 +let $0 = instantiate(`(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)))) +)`); + +// ./test/core/relaxed-simd/i8x16_relaxed_swizzle.wast:13 +assert_return( + () => invoke($0, `i8x16.relaxed_swizzle`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [ + either( + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ), + ], +); + +// ./test/core/relaxed-simd/i8x16_relaxed_swizzle.wast:20 +assert_return( + () => invoke($0, `i8x16.relaxed_swizzle`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f]), + ]), + [ + either( + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ), + ], +); + +// ./test/core/relaxed-simd/i8x16_relaxed_swizzle.wast:27 +assert_return( + () => invoke($0, `i8x16.relaxed_swizzle`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + ]), + [ + either( + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ), + ], +); + +// ./test/core/relaxed-simd/i8x16_relaxed_swizzle.wast:36 +assert_return( + () => invoke($0, `i8x16.relaxed_swizzle_cmp`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/relaxed-simd/i8x16_relaxed_swizzle.wast:42 +assert_return( + () => invoke($0, `i8x16.relaxed_swizzle_cmp`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); diff --git a/js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_dot_product.wast.js b/js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_dot_product.wast.js new file mode 100644 index 0000000000..b3b8776e01 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_dot_product.wast.js @@ -0,0 +1,139 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/relaxed-simd/relaxed_dot_product.wast + +// ./test/core/relaxed-simd/relaxed_dot_product.wast:4 +let $0 = instantiate(`(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)))) +)`); + +// ./test/core/relaxed-simd/relaxed_dot_product.wast:19 +assert_return( + () => invoke($0, `i16x8.relaxed_dot_i8x16_i7x16_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i16x8([0x1, 0xd, 0x29, 0x55, 0x91, 0xdd, 0x139, 0x1a5])], +); + +// ./test/core/relaxed-simd/relaxed_dot_product.wast:25 +assert_return( + () => invoke($0, `i16x8.relaxed_dot_i8x16_i7x16_s`, [ + i8x16([0x80, 0x80, 0x7f, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x8100, 0x7e02, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/relaxed-simd/relaxed_dot_product.wast:33 +assert_return( + () => invoke($0, `i16x8.relaxed_dot_i8x16_i7x16_s`, [ + i8x16([0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x81, 0x81, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + either( + i16x8([0x8000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x7f00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x8100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_dot_product.wast:42 +assert_return( + () => invoke($0, `i32x4.relaxed_dot_i8x16_i7x16_add_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i32x4([0x0, 0x1, 0x2, 0x3]), + ]), + [i32x4([0xe, 0x7f, 0x170, 0x2e1])], +); + +// ./test/core/relaxed-simd/relaxed_dot_product.wast:50 +assert_return( + () => invoke($0, `i32x4.relaxed_dot_i8x16_i7x16_add_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x2, 0x3, 0x4]), + ]), + [i32x4([0xffff0201, 0xfc06, 0x3, 0x4])], +); + +// ./test/core/relaxed-simd/relaxed_dot_product.wast:63 +assert_return( + () => invoke($0, `i32x4.relaxed_dot_i8x16_i7x16_add_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x81, 0x81, 0x81, 0x81, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x2, 0x3, 0x4]), + ]), + [ + either( + i32x4([0xfffefe01, 0x2, 0x3, 0x4]), + i32x4([0xffff0001, 0x2, 0x3, 0x4]), + i32x4([0xfe01, 0x2, 0x3, 0x4]), + i32x4([0x10201, 0x2, 0x3, 0x4]), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_dot_product.wast:76 +assert_return( + () => invoke($0, `i16x8.relaxed_dot_i8x16_i7x16_s_cmp`, [ + i8x16([0x80, 0x80, 0x7f, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/relaxed-simd/relaxed_dot_product.wast:82 +assert_return( + () => invoke($0, `i32x4.relaxed_dot_i8x16_i7x16_add_s_cmp`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x2, 0x3, 0x4]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/relaxed_dot_product.wast:92 +assert_return( + () => invoke($0, `i16x8.relaxed_dot_i8x16_i7x16_s_cmp`, [ + i8x16([0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x81, 0x81, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/relaxed-simd/relaxed_dot_product.wast:103 +assert_return( + () => invoke($0, `i32x4.relaxed_dot_i8x16_i7x16_add_s_cmp`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x81, 0x81, 0x81, 0x81, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x2, 0x3, 0x4]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); diff --git a/js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_laneselect.wast.js b/js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_laneselect.wast.js new file mode 100644 index 0000000000..e86d85e08b --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_laneselect.wast.js @@ -0,0 +1,179 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/relaxed-simd/relaxed_laneselect.wast + +// ./test/core/relaxed-simd/relaxed_laneselect.wast:4 +let $0 = instantiate(`(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)))) +)`); + +// ./test/core/relaxed-simd/relaxed_laneselect.wast:28 +assert_return( + () => invoke($0, `i8x16.relaxed_laneselect`, [ + i8x16([0x0, 0x1, 0x12, 0x12, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x10, 0x11, 0x34, 0x34, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f]), + i8x16([0xff, 0x0, 0xf0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + either( + i8x16([0x0, 0x11, 0x14, 0x32, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f]), + i8x16([0x0, 0x11, 0x12, 0x34, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f]), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_laneselect.wast:35 +assert_return( + () => invoke($0, `i16x8.relaxed_laneselect`, [ + i16x8([0x0, 0x1, 0x1234, 0x1234, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x8, 0x9, 0x5678, 0x5678, 0xc, 0xd, 0xe, 0xf]), + i16x8([0xffff, 0x0, 0xff00, 0xff, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + either( + i16x8([0x0, 0x9, 0x1278, 0x5634, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x0, 0x9, 0x1234, 0x5678, 0xc, 0xd, 0xe, 0xf]), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_laneselect.wast:43 +assert_return( + () => invoke($0, `i16x8.relaxed_laneselect`, [ + i16x8([0x0, 0x1, 0x1234, 0x1234, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x8, 0x9, 0x5678, 0x5678, 0xc, 0xd, 0xe, 0xf]), + i16x8([0xffff, 0x0, 0xff00, 0x80, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + either( + i16x8([0x0, 0x9, 0x1278, 0x5678, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x0, 0x9, 0x1234, 0x5678, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x0, 0x9, 0x1278, 0x5634, 0xc, 0xd, 0xe, 0xf]), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_laneselect.wast:52 +assert_return( + () => invoke($0, `i32x4.relaxed_laneselect`, [ + i32x4([0x0, 0x1, 0x12341234, 0x12341234]), + i32x4([0x4, 0x5, 0x56785678, 0x56785678]), + i32x4([0xffffffff, 0x0, 0xffff0000, 0xffff]), + ]), + [ + either( + i32x4([0x0, 0x5, 0x12345678, 0x56781234]), + i32x4([0x0, 0x5, 0x12341234, 0x56785678]), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_laneselect.wast:59 +assert_return( + () => invoke($0, `i64x2.relaxed_laneselect`, [ + i64x2([0x0n, 0x1n]), + i64x2([0x2n, 0x3n]), + i64x2([0xffffffffffffffffn, 0x0n]), + ]), + [either(i64x2([0x0n, 0x3n]), i64x2([0x0n, 0x3n]))], +); + +// ./test/core/relaxed-simd/relaxed_laneselect.wast:66 +assert_return( + () => invoke($0, `i64x2.relaxed_laneselect`, [ + i64x2([0x1234123412341234n, 0x1234123412341234n]), + i64x2([0x5678567856785678n, 0x5678567856785678n]), + i64x2([0xffffffff00000000n, 0xffffffffn]), + ]), + [ + either( + i64x2([0x1234123456785678n, 0x5678567812341234n]), + i64x2([0x1234123412341234n, 0x5678567856785678n]), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_laneselect.wast:75 +assert_return( + () => invoke($0, `i8x16.relaxed_laneselect_cmp`, [ + i8x16([0x0, 0x1, 0x12, 0x12, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x10, 0x11, 0x34, 0x34, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f]), + i8x16([0xff, 0x0, 0xf0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/relaxed-simd/relaxed_laneselect.wast:81 +assert_return( + () => invoke($0, `i16x8.relaxed_laneselect_cmp`, [ + i16x8([0x0, 0x1, 0x1234, 0x1234, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x8, 0x9, 0x5678, 0x5678, 0xc, 0xd, 0xe, 0xf]), + i16x8([0xffff, 0x0, 0xff00, 0xff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/relaxed-simd/relaxed_laneselect.wast:87 +assert_return( + () => invoke($0, `i32x4.relaxed_laneselect_cmp`, [ + i32x4([0x0, 0x1, 0x12341234, 0x12341234]), + i32x4([0x4, 0x5, 0x56785678, 0x56785678]), + i32x4([0xffffffff, 0x0, 0xffff0000, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/relaxed_laneselect.wast:93 +assert_return( + () => invoke($0, `i64x2.relaxed_laneselect_cmp`, [ + i64x2([0x0n, 0x1n]), + i64x2([0x2n, 0x3n]), + i64x2([0xffffffffffffffffn, 0x0n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/relaxed-simd/relaxed_laneselect.wast:99 +assert_return( + () => invoke($0, `i64x2.relaxed_laneselect_cmp`, [ + i64x2([0x1234123412341234n, 0x1234123412341234n]), + i64x2([0x5678567856785678n, 0x5678567856785678n]), + i64x2([0xffffffff00000000n, 0xffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); diff --git a/js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_madd_nmadd.wast.js b/js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_madd_nmadd.wast.js new file mode 100644 index 0000000000..6b3c8f912c --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_madd_nmadd.wast.js @@ -0,0 +1,325 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:4 +let $0 = instantiate(`(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)))) +)`); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:34 +assert_return( + () => invoke($0, `f32x4.relaxed_madd`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([2, 2, 2, 2]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + either( + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:50 +assert_return( + () => invoke($0, `f32x4.relaxed_madd`, [ + f32x4([1.0000002, 1.0000002, 1.0000002, 1.0000002]), + f32x4([1.0000305, 1.0000305, 1.0000305, 1.0000305]), + f32x4([-1.0000308, -1.0000308, -1.0000308, -1.0000308]), + ]), + [ + either( + new F32x4Pattern( + value("f32", 0.000000000007275958), + value("f32", 0.000000000007275958), + value("f32", 0.000000000007275958), + value("f32", 0.000000000007275958), + ), + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:57 +assert_return( + () => invoke($0, `f32x4.relaxed_nmadd`, [ + f32x4([-1.0000002, -1.0000002, -1.0000002, -1.0000002]), + f32x4([1.0000305, 1.0000305, 1.0000305, 1.0000305]), + f32x4([-1.0000308, -1.0000308, -1.0000308, -1.0000308]), + ]), + [ + either( + new F32x4Pattern( + value("f32", 0.000000000007275958), + value("f32", 0.000000000007275958), + value("f32", 0.000000000007275958), + value("f32", 0.000000000007275958), + ), + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:64 +assert_return( + () => invoke($0, `f32x4.relaxed_nmadd`, [ + f32x4([1.0000002, 1.0000002, 1.0000002, 1.0000002]), + f32x4([-1.0000305, -1.0000305, -1.0000305, -1.0000305]), + f32x4([-1.0000308, -1.0000308, -1.0000308, -1.0000308]), + ]), + [ + either( + new F32x4Pattern( + value("f32", 0.000000000007275958), + value("f32", 0.000000000007275958), + value("f32", 0.000000000007275958), + value("f32", 0.000000000007275958), + ), + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:77 +assert_return( + () => invoke($0, `f64x2.relaxed_madd`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2, 2]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + either( + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + new F64x2Pattern(value("f64", Infinity), value("f64", Infinity)), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:93 +assert_return( + () => invoke($0, `f64x2.relaxed_madd`, [ + f64x2([1.0000000009313226, 1.0000000009313226]), + f64x2([1.0000001192092896, 1.0000001192092896]), + f64x2([-1.0000001201406121, -1.0000001201406121]), + ]), + [ + either( + new F64x2Pattern( + value("f64", 0.00000000000000011102230246251565), + value("f64", 0.00000000000000011102230246251565), + ), + new F64x2Pattern(value("f64", 0), value("f64", 0)), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:100 +assert_return( + () => invoke($0, `f64x2.relaxed_nmadd`, [ + f64x2([-1.0000000009313226, -1.0000000009313226]), + f64x2([1.0000001192092896, 1.0000001192092896]), + f64x2([-1.0000001201406121, -1.0000001201406121]), + ]), + [ + either( + new F64x2Pattern( + value("f64", 0.00000000000000011102230246251565), + value("f64", 0.00000000000000011102230246251565), + ), + new F64x2Pattern(value("f64", 0), value("f64", 0)), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:107 +assert_return( + () => invoke($0, `f64x2.relaxed_nmadd`, [ + f64x2([1.0000000009313226, 1.0000000009313226]), + f64x2([-1.0000001192092896, -1.0000001192092896]), + f64x2([-1.0000001201406121, -1.0000001201406121]), + ]), + [ + either( + new F64x2Pattern( + value("f64", 0.00000000000000011102230246251565), + value("f64", 0.00000000000000011102230246251565), + ), + new F64x2Pattern(value("f64", 0), value("f64", 0)), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:121 +assert_return( + () => invoke($0, `f32x4.relaxed_madd_cmp`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([2, 2, 2, 2]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:136 +assert_return( + () => invoke($0, `f32x4.relaxed_madd_cmp`, [ + f32x4([1.0000002, 1.0000002, 1.0000002, 1.0000002]), + f32x4([1.0000305, 1.0000305, 1.0000305, 1.0000305]), + f32x4([-1.0000308, -1.0000308, -1.0000308, -1.0000308]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:142 +assert_return( + () => invoke($0, `f32x4.relaxed_nmadd_cmp`, [ + f32x4([-1.0000002, -1.0000002, -1.0000002, -1.0000002]), + f32x4([1.0000305, 1.0000305, 1.0000305, 1.0000305]), + f32x4([-1.0000308, -1.0000308, -1.0000308, -1.0000308]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:148 +assert_return( + () => invoke($0, `f32x4.relaxed_nmadd_cmp`, [ + f32x4([1.0000002, 1.0000002, 1.0000002, 1.0000002]), + f32x4([-1.0000305, -1.0000305, -1.0000305, -1.0000305]), + f32x4([-1.0000308, -1.0000308, -1.0000308, -1.0000308]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:160 +assert_return( + () => invoke($0, `f64x2.relaxed_madd_cmp`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2, 2]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:175 +assert_return( + () => invoke($0, `f64x2.relaxed_madd_cmp`, [ + f64x2([1.0000000009313226, 1.0000000009313226]), + f64x2([1.0000001192092896, 1.0000001192092896]), + f64x2([-1.0000001201406121, -1.0000001201406121]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:181 +assert_return( + () => invoke($0, `f64x2.relaxed_nmadd_cmp`, [ + f64x2([-1.0000000009313226, -1.0000000009313226]), + f64x2([1.0000001192092896, 1.0000001192092896]), + f64x2([-1.0000001201406121, -1.0000001201406121]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/relaxed-simd/relaxed_madd_nmadd.wast:187 +assert_return( + () => invoke($0, `f64x2.relaxed_nmadd_cmp`, [ + f64x2([1.0000000009313226, 1.0000000009313226]), + f64x2([-1.0000001192092896, -1.0000001192092896]), + f64x2([-1.0000001201406121, -1.0000001201406121]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); diff --git a/js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_min_max.wast.js b/js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_min_max.wast.js new file mode 100644 index 0000000000..9123d605d9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/relaxed-simd/relaxed_min_max.wast.js @@ -0,0 +1,663 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/relaxed-simd/relaxed_min_max.wast + +// ./test/core/relaxed-simd/relaxed_min_max.wast:4 +let $0 = instantiate(`(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)))) +)`); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:28 +assert_return( + () => invoke($0, `f32x4.relaxed_min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + either( + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + value("f32", 0), + value("f32", 0), + ), + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + `canonical_nan`, + `canonical_nan`, + ), + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:36 +assert_return( + () => invoke($0, `f32x4.relaxed_min`, [f32x4([0, -0, 0, -0]), f32x4([-0, 0, 0, -0])]), + [ + either( + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", 0), + value("f32", -0), + ), + new F32x4Pattern( + value("f32", 0), + value("f32", -0), + value("f32", 0), + value("f32", -0), + ), + new F32x4Pattern( + value("f32", -0), + value("f32", 0), + value("f32", 0), + value("f32", -0), + ), + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", 0), + value("f32", -0), + ), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:44 +assert_return( + () => invoke($0, `f32x4.relaxed_max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + either( + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + value("f32", 0), + value("f32", 0), + ), + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + `canonical_nan`, + `canonical_nan`, + ), + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:52 +assert_return( + () => invoke($0, `f32x4.relaxed_max`, [f32x4([0, -0, 0, -0]), f32x4([-0, 0, 0, -0])]), + [ + either( + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", -0), + ), + new F32x4Pattern( + value("f32", 0), + value("f32", -0), + value("f32", 0), + value("f32", -0), + ), + new F32x4Pattern( + value("f32", -0), + value("f32", 0), + value("f32", 0), + value("f32", -0), + ), + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", 0), + value("f32", -0), + ), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:60 +assert_return( + () => invoke($0, `f64x2.relaxed_min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [ + either( + new F64x2Pattern(`canonical_nan`, `canonical_nan`), + new F64x2Pattern(`canonical_nan`, `canonical_nan`), + new F64x2Pattern(value("f64", 0), value("f64", 0)), + new F64x2Pattern(value("f64", 0), value("f64", 0)), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:68 +assert_return( + () => invoke($0, `f64x2.relaxed_min`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + either( + new F64x2Pattern(`canonical_nan`, `canonical_nan`), + new F64x2Pattern(value("f64", 0), value("f64", 0)), + new F64x2Pattern(`canonical_nan`, `canonical_nan`), + new F64x2Pattern(value("f64", 0), value("f64", 0)), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:76 +assert_return( + () => invoke($0, `f64x2.relaxed_min`, [f64x2([0, -0]), f64x2([-0, 0])]), + [ + either( + new F64x2Pattern(value("f64", -0), value("f64", -0)), + new F64x2Pattern(value("f64", 0), value("f64", -0)), + new F64x2Pattern(value("f64", -0), value("f64", 0)), + new F64x2Pattern(value("f64", -0), value("f64", -0)), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:84 +assert_return( + () => invoke($0, `f64x2.relaxed_min`, [f64x2([0, -0]), f64x2([0, -0])]), + [ + either( + new F64x2Pattern(value("f64", 0), value("f64", -0)), + new F64x2Pattern(value("f64", 0), value("f64", -0)), + new F64x2Pattern(value("f64", 0), value("f64", -0)), + new F64x2Pattern(value("f64", 0), value("f64", -0)), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:92 +assert_return( + () => invoke($0, `f64x2.relaxed_max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [ + either( + new F64x2Pattern(`canonical_nan`, `canonical_nan`), + new F64x2Pattern(`canonical_nan`, `canonical_nan`), + new F64x2Pattern(value("f64", 0), value("f64", 0)), + new F64x2Pattern(value("f64", 0), value("f64", 0)), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:100 +assert_return( + () => invoke($0, `f64x2.relaxed_max`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + either( + new F64x2Pattern(`canonical_nan`, `canonical_nan`), + new F64x2Pattern(value("f64", 0), value("f64", 0)), + new F64x2Pattern(`canonical_nan`, `canonical_nan`), + new F64x2Pattern(value("f64", 0), value("f64", 0)), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:108 +assert_return( + () => invoke($0, `f64x2.relaxed_max`, [f64x2([0, -0]), f64x2([-0, 0])]), + [ + either( + new F64x2Pattern(value("f64", 0), value("f64", 0)), + new F64x2Pattern(value("f64", 0), value("f64", -0)), + new F64x2Pattern(value("f64", -0), value("f64", 0)), + new F64x2Pattern(value("f64", -0), value("f64", -0)), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:116 +assert_return( + () => invoke($0, `f64x2.relaxed_max`, [f64x2([0, -0]), f64x2([0, -0])]), + [ + either( + new F64x2Pattern(value("f64", 0), value("f64", -0)), + new F64x2Pattern(value("f64", 0), value("f64", -0)), + new F64x2Pattern(value("f64", 0), value("f64", -0)), + new F64x2Pattern(value("f64", 0), value("f64", -0)), + ), + ], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:126 +assert_return( + () => invoke($0, `f32x4.relaxed_min_cmp`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:131 +assert_return( + () => invoke($0, `f32x4.relaxed_min_cmp`, [ + f32x4([0, -0, 0, -0]), + f32x4([-0, 0, 0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:136 +assert_return( + () => invoke($0, `f32x4.relaxed_max_cmp`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:141 +assert_return( + () => invoke($0, `f32x4.relaxed_max_cmp`, [ + f32x4([0, -0, 0, -0]), + f32x4([-0, 0, 0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:146 +assert_return( + () => invoke($0, `f64x2.relaxed_min_cmp`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:151 +assert_return( + () => invoke($0, `f64x2.relaxed_min_cmp`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:156 +assert_return( + () => invoke($0, `f64x2.relaxed_min_cmp`, [f64x2([0, -0]), f64x2([-0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:161 +assert_return( + () => invoke($0, `f64x2.relaxed_min_cmp`, [f64x2([0, -0]), f64x2([0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:166 +assert_return( + () => invoke($0, `f64x2.relaxed_max_cmp`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:171 +assert_return( + () => invoke($0, `f64x2.relaxed_max_cmp`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:176 +assert_return( + () => invoke($0, `f64x2.relaxed_max_cmp`, [f64x2([0, -0]), f64x2([-0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/relaxed-simd/relaxed_min_max.wast:181 +assert_return( + () => invoke($0, `f64x2.relaxed_max_cmp`, [f64x2([0, -0]), f64x2([0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/address.wast.js b/js/src/jit-test/tests/wasm/spec/spec/address.wast.js new file mode 100644 index 0000000000..317c5fdc07 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/address.wast.js @@ -0,0 +1,1082 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/address.wast + +// ./test/core/address.wast:3 +let $0 = instantiate(`(module + (memory 1) + (data (i32.const 0) "abcdefghijklmnopqrstuvwxyz") + + (func (export "8u_good1") (param $$i i32) (result i32) + (i32.load8_u offset=0 (local.get $$i)) ;; 97 'a' + ) + (func (export "8u_good2") (param $$i i32) (result i32) + (i32.load8_u align=1 (local.get $$i)) ;; 97 'a' + ) + (func (export "8u_good3") (param $$i i32) (result i32) + (i32.load8_u offset=1 align=1 (local.get $$i)) ;; 98 'b' + ) + (func (export "8u_good4") (param $$i i32) (result i32) + (i32.load8_u offset=2 align=1 (local.get $$i)) ;; 99 'c' + ) + (func (export "8u_good5") (param $$i i32) (result i32) + (i32.load8_u offset=25 align=1 (local.get $$i)) ;; 122 'z' + ) + + (func (export "8s_good1") (param $$i i32) (result i32) + (i32.load8_s offset=0 (local.get $$i)) ;; 97 'a' + ) + (func (export "8s_good2") (param $$i i32) (result i32) + (i32.load8_s align=1 (local.get $$i)) ;; 97 'a' + ) + (func (export "8s_good3") (param $$i i32) (result i32) + (i32.load8_s offset=1 align=1 (local.get $$i)) ;; 98 'b' + ) + (func (export "8s_good4") (param $$i i32) (result i32) + (i32.load8_s offset=2 align=1 (local.get $$i)) ;; 99 'c' + ) + (func (export "8s_good5") (param $$i i32) (result i32) + (i32.load8_s offset=25 align=1 (local.get $$i)) ;; 122 'z' + ) + + (func (export "16u_good1") (param $$i i32) (result i32) + (i32.load16_u offset=0 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16u_good2") (param $$i i32) (result i32) + (i32.load16_u align=1 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16u_good3") (param $$i i32) (result i32) + (i32.load16_u offset=1 align=1 (local.get $$i)) ;; 25442 'bc' + ) + (func (export "16u_good4") (param $$i i32) (result i32) + (i32.load16_u offset=2 align=2 (local.get $$i)) ;; 25699 'cd' + ) + (func (export "16u_good5") (param $$i i32) (result i32) + (i32.load16_u offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' + ) + + (func (export "16s_good1") (param $$i i32) (result i32) + (i32.load16_s offset=0 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16s_good2") (param $$i i32) (result i32) + (i32.load16_s align=1 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16s_good3") (param $$i i32) (result i32) + (i32.load16_s offset=1 align=1 (local.get $$i)) ;; 25442 'bc' + ) + (func (export "16s_good4") (param $$i i32) (result i32) + (i32.load16_s offset=2 align=2 (local.get $$i)) ;; 25699 'cd' + ) + (func (export "16s_good5") (param $$i i32) (result i32) + (i32.load16_s offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' + ) + + (func (export "32_good1") (param $$i i32) (result i32) + (i32.load offset=0 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32_good2") (param $$i i32) (result i32) + (i32.load align=1 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32_good3") (param $$i i32) (result i32) + (i32.load offset=1 align=1 (local.get $$i)) ;; 1701077858 'bcde' + ) + (func (export "32_good4") (param $$i i32) (result i32) + (i32.load offset=2 align=2 (local.get $$i)) ;; 1717920867 'cdef' + ) + (func (export "32_good5") (param $$i i32) (result i32) + (i32.load offset=25 align=4 (local.get $$i)) ;; 122 'z\\0\\0\\0' + ) + + (func (export "8u_bad") (param $$i i32) + (drop (i32.load8_u offset=4294967295 (local.get $$i))) + ) + (func (export "8s_bad") (param $$i i32) + (drop (i32.load8_s offset=4294967295 (local.get $$i))) + ) + (func (export "16u_bad") (param $$i i32) + (drop (i32.load16_u offset=4294967295 (local.get $$i))) + ) + (func (export "16s_bad") (param $$i i32) + (drop (i32.load16_s offset=4294967295 (local.get $$i))) + ) + (func (export "32_bad") (param $$i i32) + (drop (i32.load offset=4294967295 (local.get $$i))) + ) +)`); + +// ./test/core/address.wast:104 +assert_return(() => invoke($0, `8u_good1`, [0]), [value("i32", 97)]); + +// ./test/core/address.wast:105 +assert_return(() => invoke($0, `8u_good2`, [0]), [value("i32", 97)]); + +// ./test/core/address.wast:106 +assert_return(() => invoke($0, `8u_good3`, [0]), [value("i32", 98)]); + +// ./test/core/address.wast:107 +assert_return(() => invoke($0, `8u_good4`, [0]), [value("i32", 99)]); + +// ./test/core/address.wast:108 +assert_return(() => invoke($0, `8u_good5`, [0]), [value("i32", 122)]); + +// ./test/core/address.wast:110 +assert_return(() => invoke($0, `8s_good1`, [0]), [value("i32", 97)]); + +// ./test/core/address.wast:111 +assert_return(() => invoke($0, `8s_good2`, [0]), [value("i32", 97)]); + +// ./test/core/address.wast:112 +assert_return(() => invoke($0, `8s_good3`, [0]), [value("i32", 98)]); + +// ./test/core/address.wast:113 +assert_return(() => invoke($0, `8s_good4`, [0]), [value("i32", 99)]); + +// ./test/core/address.wast:114 +assert_return(() => invoke($0, `8s_good5`, [0]), [value("i32", 122)]); + +// ./test/core/address.wast:116 +assert_return(() => invoke($0, `16u_good1`, [0]), [value("i32", 25185)]); + +// ./test/core/address.wast:117 +assert_return(() => invoke($0, `16u_good2`, [0]), [value("i32", 25185)]); + +// ./test/core/address.wast:118 +assert_return(() => invoke($0, `16u_good3`, [0]), [value("i32", 25442)]); + +// ./test/core/address.wast:119 +assert_return(() => invoke($0, `16u_good4`, [0]), [value("i32", 25699)]); + +// ./test/core/address.wast:120 +assert_return(() => invoke($0, `16u_good5`, [0]), [value("i32", 122)]); + +// ./test/core/address.wast:122 +assert_return(() => invoke($0, `16s_good1`, [0]), [value("i32", 25185)]); + +// ./test/core/address.wast:123 +assert_return(() => invoke($0, `16s_good2`, [0]), [value("i32", 25185)]); + +// ./test/core/address.wast:124 +assert_return(() => invoke($0, `16s_good3`, [0]), [value("i32", 25442)]); + +// ./test/core/address.wast:125 +assert_return(() => invoke($0, `16s_good4`, [0]), [value("i32", 25699)]); + +// ./test/core/address.wast:126 +assert_return(() => invoke($0, `16s_good5`, [0]), [value("i32", 122)]); + +// ./test/core/address.wast:128 +assert_return(() => invoke($0, `32_good1`, [0]), [value("i32", 1684234849)]); + +// ./test/core/address.wast:129 +assert_return(() => invoke($0, `32_good2`, [0]), [value("i32", 1684234849)]); + +// ./test/core/address.wast:130 +assert_return(() => invoke($0, `32_good3`, [0]), [value("i32", 1701077858)]); + +// ./test/core/address.wast:131 +assert_return(() => invoke($0, `32_good4`, [0]), [value("i32", 1717920867)]); + +// ./test/core/address.wast:132 +assert_return(() => invoke($0, `32_good5`, [0]), [value("i32", 122)]); + +// ./test/core/address.wast:134 +assert_return(() => invoke($0, `8u_good1`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:135 +assert_return(() => invoke($0, `8u_good2`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:136 +assert_return(() => invoke($0, `8u_good3`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:137 +assert_return(() => invoke($0, `8u_good4`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:138 +assert_return(() => invoke($0, `8u_good5`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:140 +assert_return(() => invoke($0, `8s_good1`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:141 +assert_return(() => invoke($0, `8s_good2`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:142 +assert_return(() => invoke($0, `8s_good3`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:143 +assert_return(() => invoke($0, `8s_good4`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:144 +assert_return(() => invoke($0, `8s_good5`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:146 +assert_return(() => invoke($0, `16u_good1`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:147 +assert_return(() => invoke($0, `16u_good2`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:148 +assert_return(() => invoke($0, `16u_good3`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:149 +assert_return(() => invoke($0, `16u_good4`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:150 +assert_return(() => invoke($0, `16u_good5`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:152 +assert_return(() => invoke($0, `16s_good1`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:153 +assert_return(() => invoke($0, `16s_good2`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:154 +assert_return(() => invoke($0, `16s_good3`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:155 +assert_return(() => invoke($0, `16s_good4`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:156 +assert_return(() => invoke($0, `16s_good5`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:158 +assert_return(() => invoke($0, `32_good1`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:159 +assert_return(() => invoke($0, `32_good2`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:160 +assert_return(() => invoke($0, `32_good3`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:161 +assert_return(() => invoke($0, `32_good4`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:162 +assert_return(() => invoke($0, `32_good5`, [65507]), [value("i32", 0)]); + +// ./test/core/address.wast:164 +assert_return(() => invoke($0, `8u_good1`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:165 +assert_return(() => invoke($0, `8u_good2`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:166 +assert_return(() => invoke($0, `8u_good3`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:167 +assert_return(() => invoke($0, `8u_good4`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:168 +assert_return(() => invoke($0, `8u_good5`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:170 +assert_return(() => invoke($0, `8s_good1`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:171 +assert_return(() => invoke($0, `8s_good2`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:172 +assert_return(() => invoke($0, `8s_good3`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:173 +assert_return(() => invoke($0, `8s_good4`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:174 +assert_return(() => invoke($0, `8s_good5`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:176 +assert_return(() => invoke($0, `16u_good1`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:177 +assert_return(() => invoke($0, `16u_good2`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:178 +assert_return(() => invoke($0, `16u_good3`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:179 +assert_return(() => invoke($0, `16u_good4`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:180 +assert_return(() => invoke($0, `16u_good5`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:182 +assert_return(() => invoke($0, `16s_good1`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:183 +assert_return(() => invoke($0, `16s_good2`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:184 +assert_return(() => invoke($0, `16s_good3`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:185 +assert_return(() => invoke($0, `16s_good4`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:186 +assert_return(() => invoke($0, `16s_good5`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:188 +assert_return(() => invoke($0, `32_good1`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:189 +assert_return(() => invoke($0, `32_good2`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:190 +assert_return(() => invoke($0, `32_good3`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:191 +assert_return(() => invoke($0, `32_good4`, [65508]), [value("i32", 0)]); + +// ./test/core/address.wast:192 +assert_trap(() => invoke($0, `32_good5`, [65508]), `out of bounds memory access`); + +// ./test/core/address.wast:194 +assert_trap(() => invoke($0, `8u_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:195 +assert_trap(() => invoke($0, `8s_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:196 +assert_trap(() => invoke($0, `16u_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:197 +assert_trap(() => invoke($0, `16s_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:198 +assert_trap(() => invoke($0, `32_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:199 +assert_trap(() => invoke($0, `32_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:201 +assert_trap(() => invoke($0, `8u_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:202 +assert_trap(() => invoke($0, `8s_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:203 +assert_trap(() => invoke($0, `16u_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:204 +assert_trap(() => invoke($0, `16s_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:205 +assert_trap(() => invoke($0, `32_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:207 +assert_trap(() => invoke($0, `8u_bad`, [1]), `out of bounds memory access`); + +// ./test/core/address.wast:208 +assert_trap(() => invoke($0, `8s_bad`, [1]), `out of bounds memory access`); + +// ./test/core/address.wast:209 +assert_trap(() => invoke($0, `16u_bad`, [1]), `out of bounds memory access`); + +// ./test/core/address.wast:210 +assert_trap(() => invoke($0, `16s_bad`, [1]), `out of bounds memory access`); + +// ./test/core/address.wast:211 +assert_trap(() => invoke($0, `32_bad`, [1]), `out of bounds memory access`); + +// ./test/core/address.wast:213 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i32.load offset=4294967296 (i32.const 0)))) `), + `i32 constant`, +); + +// ./test/core/address.wast:223 +let $1 = instantiate(`(module + (memory 1) + (data (i32.const 0) "abcdefghijklmnopqrstuvwxyz") + + (func (export "8u_good1") (param $$i i32) (result i64) + (i64.load8_u offset=0 (local.get $$i)) ;; 97 'a' + ) + (func (export "8u_good2") (param $$i i32) (result i64) + (i64.load8_u align=1 (local.get $$i)) ;; 97 'a' + ) + (func (export "8u_good3") (param $$i i32) (result i64) + (i64.load8_u offset=1 align=1 (local.get $$i)) ;; 98 'b' + ) + (func (export "8u_good4") (param $$i i32) (result i64) + (i64.load8_u offset=2 align=1 (local.get $$i)) ;; 99 'c' + ) + (func (export "8u_good5") (param $$i i32) (result i64) + (i64.load8_u offset=25 align=1 (local.get $$i)) ;; 122 'z' + ) + + (func (export "8s_good1") (param $$i i32) (result i64) + (i64.load8_s offset=0 (local.get $$i)) ;; 97 'a' + ) + (func (export "8s_good2") (param $$i i32) (result i64) + (i64.load8_s align=1 (local.get $$i)) ;; 97 'a' + ) + (func (export "8s_good3") (param $$i i32) (result i64) + (i64.load8_s offset=1 align=1 (local.get $$i)) ;; 98 'b' + ) + (func (export "8s_good4") (param $$i i32) (result i64) + (i64.load8_s offset=2 align=1 (local.get $$i)) ;; 99 'c' + ) + (func (export "8s_good5") (param $$i i32) (result i64) + (i64.load8_s offset=25 align=1 (local.get $$i)) ;; 122 'z' + ) + + (func (export "16u_good1") (param $$i i32) (result i64) + (i64.load16_u offset=0 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16u_good2") (param $$i i32) (result i64) + (i64.load16_u align=1 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16u_good3") (param $$i i32) (result i64) + (i64.load16_u offset=1 align=1 (local.get $$i)) ;; 25442 'bc' + ) + (func (export "16u_good4") (param $$i i32) (result i64) + (i64.load16_u offset=2 align=2 (local.get $$i)) ;; 25699 'cd' + ) + (func (export "16u_good5") (param $$i i32) (result i64) + (i64.load16_u offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' + ) + + (func (export "16s_good1") (param $$i i32) (result i64) + (i64.load16_s offset=0 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16s_good2") (param $$i i32) (result i64) + (i64.load16_s align=1 (local.get $$i)) ;; 25185 'ab' + ) + (func (export "16s_good3") (param $$i i32) (result i64) + (i64.load16_s offset=1 align=1 (local.get $$i)) ;; 25442 'bc' + ) + (func (export "16s_good4") (param $$i i32) (result i64) + (i64.load16_s offset=2 align=2 (local.get $$i)) ;; 25699 'cd' + ) + (func (export "16s_good5") (param $$i i32) (result i64) + (i64.load16_s offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' + ) + + (func (export "32u_good1") (param $$i i32) (result i64) + (i64.load32_u offset=0 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32u_good2") (param $$i i32) (result i64) + (i64.load32_u align=1 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32u_good3") (param $$i i32) (result i64) + (i64.load32_u offset=1 align=1 (local.get $$i)) ;; 1701077858 'bcde' + ) + (func (export "32u_good4") (param $$i i32) (result i64) + (i64.load32_u offset=2 align=2 (local.get $$i)) ;; 1717920867 'cdef' + ) + (func (export "32u_good5") (param $$i i32) (result i64) + (i64.load32_u offset=25 align=4 (local.get $$i)) ;; 122 'z\\0\\0\\0' + ) + + (func (export "32s_good1") (param $$i i32) (result i64) + (i64.load32_s offset=0 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32s_good2") (param $$i i32) (result i64) + (i64.load32_s align=1 (local.get $$i)) ;; 1684234849 'abcd' + ) + (func (export "32s_good3") (param $$i i32) (result i64) + (i64.load32_s offset=1 align=1 (local.get $$i)) ;; 1701077858 'bcde' + ) + (func (export "32s_good4") (param $$i i32) (result i64) + (i64.load32_s offset=2 align=2 (local.get $$i)) ;; 1717920867 'cdef' + ) + (func (export "32s_good5") (param $$i i32) (result i64) + (i64.load32_s offset=25 align=4 (local.get $$i)) ;; 122 'z\\0\\0\\0' + ) + + (func (export "64_good1") (param $$i i32) (result i64) + (i64.load offset=0 (local.get $$i)) ;; 0x6867666564636261 'abcdefgh' + ) + (func (export "64_good2") (param $$i i32) (result i64) + (i64.load align=1 (local.get $$i)) ;; 0x6867666564636261 'abcdefgh' + ) + (func (export "64_good3") (param $$i i32) (result i64) + (i64.load offset=1 align=1 (local.get $$i)) ;; 0x6968676665646362 'bcdefghi' + ) + (func (export "64_good4") (param $$i i32) (result i64) + (i64.load offset=2 align=2 (local.get $$i)) ;; 0x6a69686766656463 'cdefghij' + ) + (func (export "64_good5") (param $$i i32) (result i64) + (i64.load offset=25 align=8 (local.get $$i)) ;; 122 'z\\0\\0\\0\\0\\0\\0\\0' + ) + + (func (export "8u_bad") (param $$i i32) + (drop (i64.load8_u offset=4294967295 (local.get $$i))) + ) + (func (export "8s_bad") (param $$i i32) + (drop (i64.load8_s offset=4294967295 (local.get $$i))) + ) + (func (export "16u_bad") (param $$i i32) + (drop (i64.load16_u offset=4294967295 (local.get $$i))) + ) + (func (export "16s_bad") (param $$i i32) + (drop (i64.load16_s offset=4294967295 (local.get $$i))) + ) + (func (export "32u_bad") (param $$i i32) + (drop (i64.load32_u offset=4294967295 (local.get $$i))) + ) + (func (export "32s_bad") (param $$i i32) + (drop (i64.load32_s offset=4294967295 (local.get $$i))) + ) + (func (export "64_bad") (param $$i i32) + (drop (i64.load offset=4294967295 (local.get $$i))) + ) +)`); + +// ./test/core/address.wast:362 +assert_return(() => invoke($1, `8u_good1`, [0]), [value("i64", 97n)]); + +// ./test/core/address.wast:363 +assert_return(() => invoke($1, `8u_good2`, [0]), [value("i64", 97n)]); + +// ./test/core/address.wast:364 +assert_return(() => invoke($1, `8u_good3`, [0]), [value("i64", 98n)]); + +// ./test/core/address.wast:365 +assert_return(() => invoke($1, `8u_good4`, [0]), [value("i64", 99n)]); + +// ./test/core/address.wast:366 +assert_return(() => invoke($1, `8u_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/address.wast:368 +assert_return(() => invoke($1, `8s_good1`, [0]), [value("i64", 97n)]); + +// ./test/core/address.wast:369 +assert_return(() => invoke($1, `8s_good2`, [0]), [value("i64", 97n)]); + +// ./test/core/address.wast:370 +assert_return(() => invoke($1, `8s_good3`, [0]), [value("i64", 98n)]); + +// ./test/core/address.wast:371 +assert_return(() => invoke($1, `8s_good4`, [0]), [value("i64", 99n)]); + +// ./test/core/address.wast:372 +assert_return(() => invoke($1, `8s_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/address.wast:374 +assert_return(() => invoke($1, `16u_good1`, [0]), [value("i64", 25185n)]); + +// ./test/core/address.wast:375 +assert_return(() => invoke($1, `16u_good2`, [0]), [value("i64", 25185n)]); + +// ./test/core/address.wast:376 +assert_return(() => invoke($1, `16u_good3`, [0]), [value("i64", 25442n)]); + +// ./test/core/address.wast:377 +assert_return(() => invoke($1, `16u_good4`, [0]), [value("i64", 25699n)]); + +// ./test/core/address.wast:378 +assert_return(() => invoke($1, `16u_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/address.wast:380 +assert_return(() => invoke($1, `16s_good1`, [0]), [value("i64", 25185n)]); + +// ./test/core/address.wast:381 +assert_return(() => invoke($1, `16s_good2`, [0]), [value("i64", 25185n)]); + +// ./test/core/address.wast:382 +assert_return(() => invoke($1, `16s_good3`, [0]), [value("i64", 25442n)]); + +// ./test/core/address.wast:383 +assert_return(() => invoke($1, `16s_good4`, [0]), [value("i64", 25699n)]); + +// ./test/core/address.wast:384 +assert_return(() => invoke($1, `16s_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/address.wast:386 +assert_return(() => invoke($1, `32u_good1`, [0]), [value("i64", 1684234849n)]); + +// ./test/core/address.wast:387 +assert_return(() => invoke($1, `32u_good2`, [0]), [value("i64", 1684234849n)]); + +// ./test/core/address.wast:388 +assert_return(() => invoke($1, `32u_good3`, [0]), [value("i64", 1701077858n)]); + +// ./test/core/address.wast:389 +assert_return(() => invoke($1, `32u_good4`, [0]), [value("i64", 1717920867n)]); + +// ./test/core/address.wast:390 +assert_return(() => invoke($1, `32u_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/address.wast:392 +assert_return(() => invoke($1, `32s_good1`, [0]), [value("i64", 1684234849n)]); + +// ./test/core/address.wast:393 +assert_return(() => invoke($1, `32s_good2`, [0]), [value("i64", 1684234849n)]); + +// ./test/core/address.wast:394 +assert_return(() => invoke($1, `32s_good3`, [0]), [value("i64", 1701077858n)]); + +// ./test/core/address.wast:395 +assert_return(() => invoke($1, `32s_good4`, [0]), [value("i64", 1717920867n)]); + +// ./test/core/address.wast:396 +assert_return(() => invoke($1, `32s_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/address.wast:398 +assert_return(() => invoke($1, `64_good1`, [0]), [value("i64", 7523094288207667809n)]); + +// ./test/core/address.wast:399 +assert_return(() => invoke($1, `64_good2`, [0]), [value("i64", 7523094288207667809n)]); + +// ./test/core/address.wast:400 +assert_return(() => invoke($1, `64_good3`, [0]), [value("i64", 7595434461045744482n)]); + +// ./test/core/address.wast:401 +assert_return(() => invoke($1, `64_good4`, [0]), [value("i64", 7667774633883821155n)]); + +// ./test/core/address.wast:402 +assert_return(() => invoke($1, `64_good5`, [0]), [value("i64", 122n)]); + +// ./test/core/address.wast:404 +assert_return(() => invoke($1, `8u_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:405 +assert_return(() => invoke($1, `8u_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:406 +assert_return(() => invoke($1, `8u_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:407 +assert_return(() => invoke($1, `8u_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:408 +assert_return(() => invoke($1, `8u_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:410 +assert_return(() => invoke($1, `8s_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:411 +assert_return(() => invoke($1, `8s_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:412 +assert_return(() => invoke($1, `8s_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:413 +assert_return(() => invoke($1, `8s_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:414 +assert_return(() => invoke($1, `8s_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:416 +assert_return(() => invoke($1, `16u_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:417 +assert_return(() => invoke($1, `16u_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:418 +assert_return(() => invoke($1, `16u_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:419 +assert_return(() => invoke($1, `16u_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:420 +assert_return(() => invoke($1, `16u_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:422 +assert_return(() => invoke($1, `16s_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:423 +assert_return(() => invoke($1, `16s_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:424 +assert_return(() => invoke($1, `16s_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:425 +assert_return(() => invoke($1, `16s_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:426 +assert_return(() => invoke($1, `16s_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:428 +assert_return(() => invoke($1, `32u_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:429 +assert_return(() => invoke($1, `32u_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:430 +assert_return(() => invoke($1, `32u_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:431 +assert_return(() => invoke($1, `32u_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:432 +assert_return(() => invoke($1, `32u_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:434 +assert_return(() => invoke($1, `32s_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:435 +assert_return(() => invoke($1, `32s_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:436 +assert_return(() => invoke($1, `32s_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:437 +assert_return(() => invoke($1, `32s_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:438 +assert_return(() => invoke($1, `32s_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:440 +assert_return(() => invoke($1, `64_good1`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:441 +assert_return(() => invoke($1, `64_good2`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:442 +assert_return(() => invoke($1, `64_good3`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:443 +assert_return(() => invoke($1, `64_good4`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:444 +assert_return(() => invoke($1, `64_good5`, [65503]), [value("i64", 0n)]); + +// ./test/core/address.wast:446 +assert_return(() => invoke($1, `8u_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:447 +assert_return(() => invoke($1, `8u_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:448 +assert_return(() => invoke($1, `8u_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:449 +assert_return(() => invoke($1, `8u_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:450 +assert_return(() => invoke($1, `8u_good5`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:452 +assert_return(() => invoke($1, `8s_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:453 +assert_return(() => invoke($1, `8s_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:454 +assert_return(() => invoke($1, `8s_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:455 +assert_return(() => invoke($1, `8s_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:456 +assert_return(() => invoke($1, `8s_good5`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:458 +assert_return(() => invoke($1, `16u_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:459 +assert_return(() => invoke($1, `16u_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:460 +assert_return(() => invoke($1, `16u_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:461 +assert_return(() => invoke($1, `16u_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:462 +assert_return(() => invoke($1, `16u_good5`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:464 +assert_return(() => invoke($1, `16s_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:465 +assert_return(() => invoke($1, `16s_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:466 +assert_return(() => invoke($1, `16s_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:467 +assert_return(() => invoke($1, `16s_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:468 +assert_return(() => invoke($1, `16s_good5`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:470 +assert_return(() => invoke($1, `32u_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:471 +assert_return(() => invoke($1, `32u_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:472 +assert_return(() => invoke($1, `32u_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:473 +assert_return(() => invoke($1, `32u_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:474 +assert_return(() => invoke($1, `32u_good5`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:476 +assert_return(() => invoke($1, `32s_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:477 +assert_return(() => invoke($1, `32s_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:478 +assert_return(() => invoke($1, `32s_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:479 +assert_return(() => invoke($1, `32s_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:480 +assert_return(() => invoke($1, `32s_good5`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:482 +assert_return(() => invoke($1, `64_good1`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:483 +assert_return(() => invoke($1, `64_good2`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:484 +assert_return(() => invoke($1, `64_good3`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:485 +assert_return(() => invoke($1, `64_good4`, [65504]), [value("i64", 0n)]); + +// ./test/core/address.wast:486 +assert_trap(() => invoke($1, `64_good5`, [65504]), `out of bounds memory access`); + +// ./test/core/address.wast:488 +assert_trap(() => invoke($1, `8u_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:489 +assert_trap(() => invoke($1, `8s_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:490 +assert_trap(() => invoke($1, `16u_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:491 +assert_trap(() => invoke($1, `16s_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:492 +assert_trap(() => invoke($1, `32u_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:493 +assert_trap(() => invoke($1, `32s_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:494 +assert_trap(() => invoke($1, `64_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:496 +assert_trap(() => invoke($1, `8u_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:497 +assert_trap(() => invoke($1, `8s_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:498 +assert_trap(() => invoke($1, `16u_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:499 +assert_trap(() => invoke($1, `16s_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:500 +assert_trap(() => invoke($1, `32u_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:501 +assert_trap(() => invoke($1, `32s_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:502 +assert_trap(() => invoke($1, `64_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:504 +assert_trap(() => invoke($1, `8u_bad`, [1]), `out of bounds memory access`); + +// ./test/core/address.wast:505 +assert_trap(() => invoke($1, `8s_bad`, [1]), `out of bounds memory access`); + +// ./test/core/address.wast:506 +assert_trap(() => invoke($1, `16u_bad`, [1]), `out of bounds memory access`); + +// ./test/core/address.wast:507 +assert_trap(() => invoke($1, `16s_bad`, [1]), `out of bounds memory access`); + +// ./test/core/address.wast:508 +assert_trap(() => invoke($1, `32u_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:509 +assert_trap(() => invoke($1, `32s_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:510 +assert_trap(() => invoke($1, `64_bad`, [1]), `out of bounds memory access`); + +// ./test/core/address.wast:514 +let $2 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\00\\00\\00\\00\\00\\a0\\7f\\01\\00\\d0\\7f") + + (func (export "32_good1") (param $$i i32) (result f32) + (f32.load offset=0 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00' + ) + (func (export "32_good2") (param $$i i32) (result f32) + (f32.load align=1 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00' + ) + (func (export "32_good3") (param $$i i32) (result f32) + (f32.load offset=1 align=1 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00' + ) + (func (export "32_good4") (param $$i i32) (result f32) + (f32.load offset=2 align=2 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00' + ) + (func (export "32_good5") (param $$i i32) (result f32) + (f32.load offset=8 align=4 (local.get $$i)) ;; nan:0x500001 '\\01\\00\\d0\\7f' + ) + (func (export "32_bad") (param $$i i32) + (drop (f32.load offset=4294967295 (local.get $$i))) + ) +)`); + +// ./test/core/address.wast:538 +assert_return(() => invoke($2, `32_good1`, [0]), [value("f32", 0)]); + +// ./test/core/address.wast:539 +assert_return(() => invoke($2, `32_good2`, [0]), [value("f32", 0)]); + +// ./test/core/address.wast:540 +assert_return(() => invoke($2, `32_good3`, [0]), [value("f32", 0)]); + +// ./test/core/address.wast:541 +assert_return(() => invoke($2, `32_good4`, [0]), [value("f32", 0)]); + +// ./test/core/address.wast:542 +assert_return(() => invoke($2, `32_good5`, [0]), [bytes("f32", [0x1, 0x0, 0xd0, 0x7f])]); + +// ./test/core/address.wast:544 +assert_return(() => invoke($2, `32_good1`, [65524]), [value("f32", 0)]); + +// ./test/core/address.wast:545 +assert_return(() => invoke($2, `32_good2`, [65524]), [value("f32", 0)]); + +// ./test/core/address.wast:546 +assert_return(() => invoke($2, `32_good3`, [65524]), [value("f32", 0)]); + +// ./test/core/address.wast:547 +assert_return(() => invoke($2, `32_good4`, [65524]), [value("f32", 0)]); + +// ./test/core/address.wast:548 +assert_return(() => invoke($2, `32_good5`, [65524]), [value("f32", 0)]); + +// ./test/core/address.wast:550 +assert_return(() => invoke($2, `32_good1`, [65525]), [value("f32", 0)]); + +// ./test/core/address.wast:551 +assert_return(() => invoke($2, `32_good2`, [65525]), [value("f32", 0)]); + +// ./test/core/address.wast:552 +assert_return(() => invoke($2, `32_good3`, [65525]), [value("f32", 0)]); + +// ./test/core/address.wast:553 +assert_return(() => invoke($2, `32_good4`, [65525]), [value("f32", 0)]); + +// ./test/core/address.wast:554 +assert_trap(() => invoke($2, `32_good5`, [65525]), `out of bounds memory access`); + +// ./test/core/address.wast:556 +assert_trap(() => invoke($2, `32_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:557 +assert_trap(() => invoke($2, `32_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:559 +assert_trap(() => invoke($2, `32_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:560 +assert_trap(() => invoke($2, `32_bad`, [1]), `out of bounds memory access`); + +// ./test/core/address.wast:564 +let $3 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\f4\\7f\\01\\00\\00\\00\\00\\00\\fc\\7f") + + (func (export "64_good1") (param $$i i32) (result f64) + (f64.load offset=0 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00' + ) + (func (export "64_good2") (param $$i i32) (result f64) + (f64.load align=1 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00' + ) + (func (export "64_good3") (param $$i i32) (result f64) + (f64.load offset=1 align=1 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00' + ) + (func (export "64_good4") (param $$i i32) (result f64) + (f64.load offset=2 align=2 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00' + ) + (func (export "64_good5") (param $$i i32) (result f64) + (f64.load offset=18 align=8 (local.get $$i)) ;; nan:0xc000000000001 '\\01\\00\\00\\00\\00\\00\\fc\\7f' + ) + (func (export "64_bad") (param $$i i32) + (drop (f64.load offset=4294967295 (local.get $$i))) + ) +)`); + +// ./test/core/address.wast:588 +assert_return(() => invoke($3, `64_good1`, [0]), [value("f64", 0)]); + +// ./test/core/address.wast:589 +assert_return(() => invoke($3, `64_good2`, [0]), [value("f64", 0)]); + +// ./test/core/address.wast:590 +assert_return(() => invoke($3, `64_good3`, [0]), [value("f64", 0)]); + +// ./test/core/address.wast:591 +assert_return(() => invoke($3, `64_good4`, [0]), [value("f64", 0)]); + +// ./test/core/address.wast:592 +assert_return( + () => invoke($3, `64_good5`, [0]), + [bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f])], +); + +// ./test/core/address.wast:594 +assert_return(() => invoke($3, `64_good1`, [65510]), [value("f64", 0)]); + +// ./test/core/address.wast:595 +assert_return(() => invoke($3, `64_good2`, [65510]), [value("f64", 0)]); + +// ./test/core/address.wast:596 +assert_return(() => invoke($3, `64_good3`, [65510]), [value("f64", 0)]); + +// ./test/core/address.wast:597 +assert_return(() => invoke($3, `64_good4`, [65510]), [value("f64", 0)]); + +// ./test/core/address.wast:598 +assert_return(() => invoke($3, `64_good5`, [65510]), [value("f64", 0)]); + +// ./test/core/address.wast:600 +assert_return(() => invoke($3, `64_good1`, [65511]), [value("f64", 0)]); + +// ./test/core/address.wast:601 +assert_return(() => invoke($3, `64_good2`, [65511]), [value("f64", 0)]); + +// ./test/core/address.wast:602 +assert_return(() => invoke($3, `64_good3`, [65511]), [value("f64", 0)]); + +// ./test/core/address.wast:603 +assert_return(() => invoke($3, `64_good4`, [65511]), [value("f64", 0)]); + +// ./test/core/address.wast:604 +assert_trap(() => invoke($3, `64_good5`, [65511]), `out of bounds memory access`); + +// ./test/core/address.wast:606 +assert_trap(() => invoke($3, `64_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:607 +assert_trap(() => invoke($3, `64_good3`, [-1]), `out of bounds memory access`); + +// ./test/core/address.wast:609 +assert_trap(() => invoke($3, `64_bad`, [0]), `out of bounds memory access`); + +// ./test/core/address.wast:610 +assert_trap(() => invoke($3, `64_bad`, [1]), `out of bounds memory access`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/block.wast.js b/js/src/jit-test/tests/wasm/spec/spec/block.wast.js new file mode 100644 index 0000000000..17a8db0774 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/block.wast.js @@ -0,0 +1,1878 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/block.wast + +// ./test/core/block.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definition + (memory 1) + + (func $$dummy) + + (func (export "empty") + (block) + (block $$l) + ) + + (func (export "singular") (result i32) + (block (nop)) + (block (result i32) (i32.const 7)) + ) + + (func (export "multi") (result i32) + (block (call $$dummy) (call $$dummy) (call $$dummy) (call $$dummy)) + (block (result i32) + (call $$dummy) (call $$dummy) (call $$dummy) (i32.const 7) (call $$dummy) + ) + (drop) + (block (result i32 i64 i32) + (call $$dummy) (call $$dummy) (call $$dummy) (i32.const 8) (call $$dummy) + (call $$dummy) (call $$dummy) (call $$dummy) (i64.const 7) (call $$dummy) + (call $$dummy) (call $$dummy) (call $$dummy) (i32.const 9) (call $$dummy) + ) + (drop) (drop) + ) + + (func (export "nested") (result i32) + (block (result i32) + (block (call $$dummy) (block) (nop)) + (block (result i32) (call $$dummy) (i32.const 9)) + ) + ) + + (func (export "deep") (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (block (result i32) (block (result i32) + (call $$dummy) (i32.const 150) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + ) + + (func (export "as-select-first") (result i32) + (select (block (result i32) (i32.const 1)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-select-mid") (result i32) + (select (i32.const 2) (block (result i32) (i32.const 1)) (i32.const 3)) + ) + (func (export "as-select-last") (result i32) + (select (i32.const 2) (i32.const 3) (block (result i32) (i32.const 1))) + ) + + (func (export "as-loop-first") (result i32) + (loop (result i32) (block (result i32) (i32.const 1)) (call $$dummy) (call $$dummy)) + ) + (func (export "as-loop-mid") (result i32) + (loop (result i32) (call $$dummy) (block (result i32) (i32.const 1)) (call $$dummy)) + ) + (func (export "as-loop-last") (result i32) + (loop (result i32) (call $$dummy) (call $$dummy) (block (result i32) (i32.const 1))) + ) + + (func (export "as-if-condition") + (block (result i32) (i32.const 1)) (if (then (call $$dummy))) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) (then (block (result i32) (i32.const 1))) (else (i32.const 2))) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 1) (then (i32.const 2)) (else (block (result i32) (i32.const 1)))) + ) + + (func (export "as-br_if-first") (result i32) + (block (result i32) (br_if 0 (block (result i32) (i32.const 1)) (i32.const 2))) + ) + (func (export "as-br_if-last") (result i32) + (block (result i32) (br_if 0 (i32.const 2) (block (result i32) (i32.const 1)))) + ) + + (func (export "as-br_table-first") (result i32) + (block (result i32) (block (result i32) (i32.const 1)) (i32.const 2) (br_table 0 0)) + ) + (func (export "as-br_table-last") (result i32) + (block (result i32) (i32.const 2) (block (result i32) (i32.const 1)) (br_table 0 0)) + ) + + (func $$func (param i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (call_indirect (type $$check) + (block (result i32) (i32.const 1)) (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (block (result i32) (i32.const 1)) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 1) (i32.const 2) (block (result i32) (i32.const 0)) + ) + ) + ) + + (func (export "as-store-first") + (block (result i32) (i32.const 1)) (i32.const 1) (i32.store) + ) + (func (export "as-store-last") + (i32.const 10) (block (result i32) (i32.const 1)) (i32.store) + ) + + (func (export "as-memory.grow-value") (result i32) + (memory.grow (block (result i32) (i32.const 1))) + ) + + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "as-call-value") (result i32) + (call $$f (block (result i32) (i32.const 1))) + ) + (func (export "as-return-value") (result i32) + (block (result i32) (i32.const 1)) (return) + ) + (func (export "as-drop-operand") + (drop (block (result i32) (i32.const 1))) + ) + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (block (result i32) (i32.const 1)))) + ) + (func (export "as-local.set-value") (result i32) + (local i32) (local.set 0 (block (result i32) (i32.const 1))) (local.get 0) + ) + (func (export "as-local.tee-value") (result i32) + (local i32) (local.tee 0 (block (result i32) (i32.const 1))) + ) + (global $$a (mut i32) (i32.const 10)) + (func (export "as-global.set-value") (result i32) + (global.set $$a (block (result i32) (i32.const 1))) + (global.get $$a) + ) + + (func (export "as-load-operand") (result i32) + (i32.load (block (result i32) (i32.const 1))) + ) + + (func (export "as-unary-operand") (result i32) + (i32.ctz (block (result i32) (call $$dummy) (i32.const 13))) + ) + (func (export "as-binary-operand") (result i32) + (i32.mul + (block (result i32) (call $$dummy) (i32.const 3)) + (block (result i32) (call $$dummy) (i32.const 4)) + ) + ) + (func (export "as-test-operand") (result i32) + (i32.eqz (block (result i32) (call $$dummy) (i32.const 13))) + ) + (func (export "as-compare-operand") (result i32) + (f32.gt + (block (result f32) (call $$dummy) (f32.const 3)) + (block (result f32) (call $$dummy) (f32.const 3)) + ) + ) + (func (export "as-binary-operands") (result i32) + (i32.mul + (block (result i32 i32) + (call $$dummy) (i32.const 3) (call $$dummy) (i32.const 4) + ) + ) + ) + (func (export "as-compare-operands") (result i32) + (f32.gt + (block (result f32 f32) + (call $$dummy) (f32.const 3) (call $$dummy) (f32.const 3) + ) + ) + ) + (func (export "as-mixed-operands") (result i32) + (block (result i32 i32) + (call $$dummy) (i32.const 3) (call $$dummy) (i32.const 4) + ) + (i32.const 5) + (i32.add) + (i32.mul) + ) + + (func (export "break-bare") (result i32) + (block (br 0) (unreachable)) + (block (br_if 0 (i32.const 1)) (unreachable)) + (block (br_table 0 (i32.const 0)) (unreachable)) + (block (br_table 0 0 0 (i32.const 1)) (unreachable)) + (i32.const 19) + ) + (func (export "break-value") (result i32) + (block (result i32) (br 0 (i32.const 18)) (i32.const 19)) + ) + (func (export "break-multi-value") (result i32 i32 i64) + (block (result i32 i32 i64) + (br 0 (i32.const 18) (i32.const -18) (i64.const 18)) + (i32.const 19) (i32.const -19) (i64.const 19) + ) + ) + (func (export "break-repeated") (result i32) + (block (result i32) + (br 0 (i32.const 18)) + (br 0 (i32.const 19)) + (drop (br_if 0 (i32.const 20) (i32.const 0))) + (drop (br_if 0 (i32.const 20) (i32.const 1))) + (br 0 (i32.const 21)) + (br_table 0 (i32.const 22) (i32.const 4)) + (br_table 0 0 0 (i32.const 23) (i32.const 1)) + (i32.const 21) + ) + ) + (func (export "break-inner") (result i32) + (local i32) + (local.set 0 (i32.const 0)) + (local.set 0 (i32.add (local.get 0) (block (result i32) (block (result i32) (br 1 (i32.const 0x1)))))) + (local.set 0 (i32.add (local.get 0) (block (result i32) (block (br 0)) (i32.const 0x2)))) + (local.set 0 + (i32.add (local.get 0) (block (result i32) (i32.ctz (br 0 (i32.const 0x4))))) + ) + (local.set 0 + (i32.add (local.get 0) (block (result i32) (i32.ctz (block (result i32) (br 1 (i32.const 0x8)))))) + ) + (local.get 0) + ) + + (func (export "param") (result i32) + (i32.const 1) + (block (param i32) (result i32) + (i32.const 2) + (i32.add) + ) + ) + (func (export "params") (result i32) + (i32.const 1) + (i32.const 2) + (block (param i32 i32) (result i32) + (i32.add) + ) + ) + (func (export "params-id") (result i32) + (i32.const 1) + (i32.const 2) + (block (param i32 i32) (result i32 i32)) + (i32.add) + ) + (func (export "param-break") (result i32) + (i32.const 1) + (block (param i32) (result i32) + (i32.const 2) + (i32.add) + (br 0) + ) + ) + (func (export "params-break") (result i32) + (i32.const 1) + (i32.const 2) + (block (param i32 i32) (result i32) + (i32.add) + (br 0) + ) + ) + (func (export "params-id-break") (result i32) + (i32.const 1) + (i32.const 2) + (block (param i32 i32) (result i32 i32) (br 0)) + (i32.add) + ) + + (func (export "effects") (result i32) + (local i32) + (block + (local.set 0 (i32.const 1)) + (local.set 0 (i32.mul (local.get 0) (i32.const 3))) + (local.set 0 (i32.sub (local.get 0) (i32.const 5))) + (local.set 0 (i32.mul (local.get 0) (i32.const 7))) + (br 0) + (local.set 0 (i32.mul (local.get 0) (i32.const 100))) + ) + (i32.eq (local.get 0) (i32.const -14)) + ) + + (type $$block-sig-1 (func)) + (type $$block-sig-2 (func (result i32))) + (type $$block-sig-3 (func (param $$x i32))) + (type $$block-sig-4 (func (param i32 f64 i32) (result i32 f64 i32))) + + (func (export "type-use") + (block (type $$block-sig-1)) + (block (type $$block-sig-2) (i32.const 0)) + (block (type $$block-sig-3) (drop)) + (i32.const 0) (f64.const 0) (i32.const 0) + (block (type $$block-sig-4)) + (drop) (drop) (drop) + (block (type $$block-sig-2) (result i32) (i32.const 0)) + (block (type $$block-sig-3) (param i32) (drop)) + (i32.const 0) (f64.const 0) (i32.const 0) + (block (type $$block-sig-4) + (param i32) (param f64 i32) (result i32 f64) (result i32) + ) + (drop) (drop) (drop) + ) +)`); + +// ./test/core/block.wast:353 +assert_return(() => invoke($0, `empty`, []), []); + +// ./test/core/block.wast:354 +assert_return(() => invoke($0, `singular`, []), [value("i32", 7)]); + +// ./test/core/block.wast:355 +assert_return(() => invoke($0, `multi`, []), [value("i32", 8)]); + +// ./test/core/block.wast:356 +assert_return(() => invoke($0, `nested`, []), [value("i32", 9)]); + +// ./test/core/block.wast:357 +assert_return(() => invoke($0, `deep`, []), [value("i32", 150)]); + +// ./test/core/block.wast:359 +assert_return(() => invoke($0, `as-select-first`, []), [value("i32", 1)]); + +// ./test/core/block.wast:360 +assert_return(() => invoke($0, `as-select-mid`, []), [value("i32", 2)]); + +// ./test/core/block.wast:361 +assert_return(() => invoke($0, `as-select-last`, []), [value("i32", 2)]); + +// ./test/core/block.wast:363 +assert_return(() => invoke($0, `as-loop-first`, []), [value("i32", 1)]); + +// ./test/core/block.wast:364 +assert_return(() => invoke($0, `as-loop-mid`, []), [value("i32", 1)]); + +// ./test/core/block.wast:365 +assert_return(() => invoke($0, `as-loop-last`, []), [value("i32", 1)]); + +// ./test/core/block.wast:367 +assert_return(() => invoke($0, `as-if-condition`, []), []); + +// ./test/core/block.wast:368 +assert_return(() => invoke($0, `as-if-then`, []), [value("i32", 1)]); + +// ./test/core/block.wast:369 +assert_return(() => invoke($0, `as-if-else`, []), [value("i32", 2)]); + +// ./test/core/block.wast:371 +assert_return(() => invoke($0, `as-br_if-first`, []), [value("i32", 1)]); + +// ./test/core/block.wast:372 +assert_return(() => invoke($0, `as-br_if-last`, []), [value("i32", 2)]); + +// ./test/core/block.wast:374 +assert_return(() => invoke($0, `as-br_table-first`, []), [value("i32", 1)]); + +// ./test/core/block.wast:375 +assert_return(() => invoke($0, `as-br_table-last`, []), [value("i32", 2)]); + +// ./test/core/block.wast:377 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 1)]); + +// ./test/core/block.wast:378 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 2)]); + +// ./test/core/block.wast:379 +assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", 1)]); + +// ./test/core/block.wast:381 +assert_return(() => invoke($0, `as-store-first`, []), []); + +// ./test/core/block.wast:382 +assert_return(() => invoke($0, `as-store-last`, []), []); + +// ./test/core/block.wast:384 +assert_return(() => invoke($0, `as-memory.grow-value`, []), [value("i32", 1)]); + +// ./test/core/block.wast:385 +assert_return(() => invoke($0, `as-call-value`, []), [value("i32", 1)]); + +// ./test/core/block.wast:386 +assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 1)]); + +// ./test/core/block.wast:387 +assert_return(() => invoke($0, `as-drop-operand`, []), []); + +// ./test/core/block.wast:388 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 1)]); + +// ./test/core/block.wast:389 +assert_return(() => invoke($0, `as-local.set-value`, []), [value("i32", 1)]); + +// ./test/core/block.wast:390 +assert_return(() => invoke($0, `as-local.tee-value`, []), [value("i32", 1)]); + +// ./test/core/block.wast:391 +assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 1)]); + +// ./test/core/block.wast:392 +assert_return(() => invoke($0, `as-load-operand`, []), [value("i32", 1)]); + +// ./test/core/block.wast:394 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("i32", 0)]); + +// ./test/core/block.wast:395 +assert_return(() => invoke($0, `as-binary-operand`, []), [value("i32", 12)]); + +// ./test/core/block.wast:396 +assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 0)]); + +// ./test/core/block.wast:397 +assert_return(() => invoke($0, `as-compare-operand`, []), [value("i32", 0)]); + +// ./test/core/block.wast:398 +assert_return(() => invoke($0, `as-binary-operands`, []), [value("i32", 12)]); + +// ./test/core/block.wast:399 +assert_return(() => invoke($0, `as-compare-operands`, []), [value("i32", 0)]); + +// ./test/core/block.wast:400 +assert_return(() => invoke($0, `as-mixed-operands`, []), [value("i32", 27)]); + +// ./test/core/block.wast:402 +assert_return(() => invoke($0, `break-bare`, []), [value("i32", 19)]); + +// ./test/core/block.wast:403 +assert_return(() => invoke($0, `break-value`, []), [value("i32", 18)]); + +// ./test/core/block.wast:404 +assert_return( + () => invoke($0, `break-multi-value`, []), + [value("i32", 18), value("i32", -18), value("i64", 18n)], +); + +// ./test/core/block.wast:407 +assert_return(() => invoke($0, `break-repeated`, []), [value("i32", 18)]); + +// ./test/core/block.wast:408 +assert_return(() => invoke($0, `break-inner`, []), [value("i32", 15)]); + +// ./test/core/block.wast:410 +assert_return(() => invoke($0, `param`, []), [value("i32", 3)]); + +// ./test/core/block.wast:411 +assert_return(() => invoke($0, `params`, []), [value("i32", 3)]); + +// ./test/core/block.wast:412 +assert_return(() => invoke($0, `params-id`, []), [value("i32", 3)]); + +// ./test/core/block.wast:413 +assert_return(() => invoke($0, `param-break`, []), [value("i32", 3)]); + +// ./test/core/block.wast:414 +assert_return(() => invoke($0, `params-break`, []), [value("i32", 3)]); + +// ./test/core/block.wast:415 +assert_return(() => invoke($0, `params-id-break`, []), [value("i32", 3)]); + +// ./test/core/block.wast:417 +assert_return(() => invoke($0, `effects`, []), [value("i32", 1)]); + +// ./test/core/block.wast:419 +assert_return(() => invoke($0, `type-use`, []), []); + +// ./test/core/block.wast:421 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (block (type $$sig) (result i32) (param i32))) `), + `unexpected token`, +); + +// ./test/core/block.wast:428 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (block (param i32) (type $$sig) (result i32))) `), + `unexpected token`, +); + +// ./test/core/block.wast:435 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (block (param i32) (result i32) (type $$sig))) `), + `unexpected token`, +); + +// ./test/core/block.wast:442 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (block (result i32) (type $$sig) (param i32))) `), + `unexpected token`, +); + +// ./test/core/block.wast:449 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (block (result i32) (param i32) (type $$sig))) `), + `unexpected token`, +); + +// ./test/core/block.wast:456 +assert_malformed( + () => instantiate(`(func (i32.const 0) (block (result i32) (param i32))) `), + `unexpected token`, +); + +// ./test/core/block.wast:463 +assert_malformed( + () => instantiate(`(func (i32.const 0) (block (param $$x i32) (drop))) `), + `unexpected token`, +); + +// ./test/core/block.wast:467 +assert_malformed( + () => instantiate(`(type $$sig (func)) (func (block (type $$sig) (result i32) (i32.const 0)) (unreachable)) `), + `inline function type`, +); + +// ./test/core/block.wast:474 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (block (type $$sig) (result i32) (i32.const 0)) (unreachable)) `), + `inline function type`, +); + +// ./test/core/block.wast:481 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (block (type $$sig) (param i32) (drop)) (unreachable)) `), + `inline function type`, +); + +// ./test/core/block.wast:488 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32 i32) (result i32))) (func (i32.const 0) (block (type $$sig) (param i32) (result i32)) (unreachable)) `), + `inline function type`, +); + +// ./test/core/block.wast:496 +assert_invalid( + () => instantiate(`(module + (type $$sig (func)) + (func (block (type $$sig) (i32.const 0))) + )`), + `type mismatch`, +); + +// ./test/core/block.wast:504 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i32 (result i32) (block)))`), + `type mismatch`, +); + +// ./test/core/block.wast:508 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i64 (result i64) (block)))`), + `type mismatch`, +); + +// ./test/core/block.wast:512 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f32 (result f32) (block)))`), + `type mismatch`, +); + +// ./test/core/block.wast:516 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f64 (result f64) (block)))`), + `type mismatch`, +); + +// ./test/core/block.wast:521 +assert_invalid( + () => instantiate(`(module (func $$type-value-i32-vs-void + (block (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:527 +assert_invalid( + () => instantiate(`(module (func $$type-value-i64-vs-void + (block (i64.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:533 +assert_invalid( + () => instantiate(`(module (func $$type-value-f32-vs-void + (block (f32.const 1.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:539 +assert_invalid( + () => instantiate(`(module (func $$type-value-f64-vs-void + (block (f64.const 1.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:545 +assert_invalid( + () => instantiate(`(module (func $$type-value-nums-vs-void + (block (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:551 +assert_invalid( + () => instantiate(`(module (func $$type-value-empty-vs-i32 (result i32) + (block (result i32)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:557 +assert_invalid( + () => instantiate(`(module (func $$type-value-empty-vs-i64 (result i64) + (block (result i64)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:563 +assert_invalid( + () => instantiate(`(module (func $$type-value-empty-vs-f32 (result f32) + (block (result f32)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:569 +assert_invalid( + () => instantiate(`(module (func $$type-value-empty-vs-f64 (result f64) + (block (result f64)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:575 +assert_invalid( + () => instantiate(`(module (func $$type-value-empty-vs-nums (result i32 i32) + (block (result i32 i32)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:582 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-in-block + (i32.const 0) + (block (block (result i32)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/block.wast:591 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-in-loop + (i32.const 0) + (loop (block (result i32)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/block.wast:600 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (block (result i32)) (drop))) + ) + )`), + `type mismatch`, +); + +// ./test/core/block.wast:610 +assert_invalid( + () => instantiate(`(module (func $$type-value-void-vs-i32 (result i32) + (block (result i32) (nop)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:616 +assert_invalid( + () => instantiate(`(module (func $$type-value-void-vs-i64 (result i64) + (block (result i64) (nop)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:622 +assert_invalid( + () => instantiate(`(module (func $$type-value-void-vs-f32 (result f32) + (block (result f32) (nop)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:628 +assert_invalid( + () => instantiate(`(module (func $$type-value-void-vs-f64 (result f64) + (block (result f64) (nop)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:634 +assert_invalid( + () => instantiate(`(module (func $$type-value-void-vs-nums (result i32 i32) + (block (result i32 i32) (nop)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:640 +assert_invalid( + () => instantiate(`(module (func $$type-value-i32-vs-i64 (result i32) + (block (result i32) (i64.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:646 +assert_invalid( + () => instantiate(`(module (func $$type-value-i32-vs-f32 (result i32) + (block (result i32) (f32.const 0.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:652 +assert_invalid( + () => instantiate(`(module (func $$type-value-i32-vs-f64 (result i32) + (block (result i32) (f64.const 0.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:658 +assert_invalid( + () => instantiate(`(module (func $$type-value-i64-vs-i32 (result i64) + (block (result i64) (i32.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:664 +assert_invalid( + () => instantiate(`(module (func $$type-value-i64-vs-f32 (result i64) + (block (result i64) (f32.const 0.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:670 +assert_invalid( + () => instantiate(`(module (func $$type-value-i64-vs-f64 (result i64) + (block (result i64) (f64.const 0.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:676 +assert_invalid( + () => instantiate(`(module (func $$type-value-f32-vs-i32 (result f32) + (block (result f32) (i32.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:682 +assert_invalid( + () => instantiate(`(module (func $$type-value-f32-vs-i64 (result f32) + (block (result f32) (i64.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:688 +assert_invalid( + () => instantiate(`(module (func $$type-value-f32-vs-f64 (result f32) + (block (result f32) (f64.const 0.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:694 +assert_invalid( + () => instantiate(`(module (func $$type-value-f64-vs-i32 (result f64) + (block (result f64) (i32.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:700 +assert_invalid( + () => instantiate(`(module (func $$type-value-f64-vs-i64 (result f64) + (block (result f64) (i64.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:706 +assert_invalid( + () => instantiate(`(module (func $$type-value-f64-vs-f32 (result f32) + (block (result f64) (f32.const 0.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:712 +assert_invalid( + () => instantiate(`(module (func $$type-value-num-vs-nums (result i32 i32) + (block (result i32 i32) (i32.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:718 +assert_invalid( + () => instantiate(`(module (func $$type-value-partial-vs-nums (result i32 i32) + (i32.const 1) (block (result i32 i32) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:724 +assert_invalid( + () => instantiate(`(module (func $$type-value-nums-vs-num (result i32) + (block (result i32) (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:731 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select-i32-i64 (result i32) + (block (result i64) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:737 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select-i32-f32 (result i32) + (block (result f32) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:743 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select-i32-f64 (result i32) + (block (result f64) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:749 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select-i64-i32 (result i64) + (block (result i32) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:755 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select-i64-f32 (result i64) + (block (result f32) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:761 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select-i64-f64 (result i64) + (block (result f64) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:767 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select-f32-i32 (result f32) + (block (result i32) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:773 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select-f32-i64 (result f32) + (block (result i64) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:779 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select-f32-f64 (result f32) + (block (result f64) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:785 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select-f64-i32 (result f64) + (block (result i32) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:791 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select-f64-i64 (result f64) + (block (result i64) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:797 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select-f64-f32 (result f64) + (block (result f32) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:804 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-void-vs-i32 (result i32) + (block (result i32) (br 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:810 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-void-vs-i64 (result i64) + (block (result i64) (br 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:816 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-void-vs-f32 (result f32) + (block (result f32) (br 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:822 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-void-vs-f64 (result f64) + (block (result f64) (br 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:828 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-void-vs-nums (result i32 i32) + (block (result i32 i32) (br 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:835 +assert_invalid( + () => instantiate(`(module (func $$type-break-empty-vs-i32 (result i32) + (block (result i32) (br 0) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:841 +assert_invalid( + () => instantiate(`(module (func $$type-break-empty-vs-i64 (result i64) + (block (result i64) (br 0) (i64.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:847 +assert_invalid( + () => instantiate(`(module (func $$type-break-empty-vs-f32 (result f32) + (block (result f32) (br 0) (f32.const 1.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:853 +assert_invalid( + () => instantiate(`(module (func $$type-break-empty-vs-f64 (result f64) + (block (result f64) (br 0) (f64.const 1.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:859 +assert_invalid( + () => instantiate(`(module (func $$type-break-empty-vs-nums (result i32 i32) + (block (result i32 i32) (br 0) (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:866 +assert_invalid( + () => instantiate(`(module (func $$type-break-void-vs-i32 (result i32) + (block (result i32) (br 0 (nop)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:872 +assert_invalid( + () => instantiate(`(module (func $$type-break-void-vs-i64 (result i64) + (block (result i64) (br 0 (nop)) (i64.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:878 +assert_invalid( + () => instantiate(`(module (func $$type-break-void-vs-f32 (result f32) + (block (result f32) (br 0 (nop)) (f32.const 1.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:884 +assert_invalid( + () => instantiate(`(module (func $$type-break-void-vs-f64 (result f64) + (block (result f64) (br 0 (nop)) (f64.const 1.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:891 +assert_invalid( + () => instantiate(`(module (func $$type-break-i32-vs-i64 (result i32) + (block (result i32) (br 0 (i64.const 1)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:897 +assert_invalid( + () => instantiate(`(module (func $$type-break-i32-vs-f32 (result i32) + (block (result i32) (br 0 (f32.const 1.0)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:903 +assert_invalid( + () => instantiate(`(module (func $$type-break-i32-vs-f64 (result i32) + (block (result i32) (br 0 (f64.const 1.0)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:909 +assert_invalid( + () => instantiate(`(module (func $$type-break-i64-vs-i32 (result i64) + (block (result i64) (br 0 (i32.const 1)) (i64.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:915 +assert_invalid( + () => instantiate(`(module (func $$type-break-i64-vs-f32 (result i64) + (block (result i64) (br 0 (f32.const 1.0)) (i64.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:921 +assert_invalid( + () => instantiate(`(module (func $$type-break-i64-vs-f64 (result i64) + (block (result i64) (br 0 (f64.const 1.0)) (i64.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:927 +assert_invalid( + () => instantiate(`(module (func $$type-break-f32-vs-i32 (result f32) + (block (result f32) (br 0 (i32.const 1)) (f32.const 1.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:933 +assert_invalid( + () => instantiate(`(module (func $$type-break-f32-vs-i64 (result f32) + (block (result f32) (br 0 (i64.const 1)) (f32.const 1.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:939 +assert_invalid( + () => instantiate(`(module (func $$type-break-f32-vs-f64 (result f32) + (block (result f32) (br 0 (f64.const 1.0)) (f32.const 1.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:945 +assert_invalid( + () => instantiate(`(module (func $$type-break-f64-vs-i32 (result f64) + (block (result i64) (br 0 (i32.const 1)) (f64.const 1.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:951 +assert_invalid( + () => instantiate(`(module (func $$type-break-f64-vs-i64 (result f64) + (block (result f64) (br 0 (i64.const 1)) (f64.const 1.0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:957 +assert_invalid( + () => instantiate(`(module (func $$type-break-f64-vs-f32 (result f64) + (block (result f64) (br 0 (f32.const 1.0)) (f64.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:963 +assert_invalid( + () => instantiate(`(module (func $$type-break-num-vs-nums (result i32 i32) + (block (result i32 i32) (br 0 (i32.const 0)) (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:969 +assert_invalid( + () => instantiate(`(module (func $$type-break-partial-vs-nums (result i32 i32) + (i32.const 1) (block (result i32 i32) (br 0 (i32.const 0)) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:976 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-void-vs-i32 (result i32) + (block (result i32) (br 0 (nop)) (br 0 (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:982 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-void-vs-i64 (result i64) + (block (result i64) (br 0 (nop)) (br 0 (i64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:988 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-void-vs-f32 (result f32) + (block (result f32) (br 0 (nop)) (br 0 (f32.const 1.0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:994 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-void-vs-f64 (result f64) + (block (result f64) (br 0 (nop)) (br 0 (f64.const 1.0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1000 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-void-vs-nums (result i32 i32) + (block (result i32 i32) (br 0 (nop)) (br 0 (i32.const 1) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1007 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-i32-vs-i64 (result i32) + (block (result i32) (br 0 (i64.const 1)) (br 0 (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1013 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-i32-vs-f32 (result i32) + (block (result i32) (br 0 (f32.const 1.0)) (br 0 (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1019 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-i32-vs-f64 (result i32) + (block (result i32) (br 0 (f64.const 1.0)) (br 0 (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1025 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-i64-vs-i32 (result i64) + (block (result i64) (br 0 (i32.const 1)) (br 0 (i64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1031 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-i64-vs-f32 (result i64) + (block (result i64) (br 0 (f32.const 1.0)) (br 0 (i64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1037 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-i64-vs-f64 (result i64) + (block (result i64) (br 0 (f64.const 1.0)) (br 0 (i64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1043 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-f32-vs-i32 (result f32) + (block (result f32) (br 0 (i32.const 1)) (br 0 (f32.const 1.0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1049 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-f32-vs-i64 (result f32) + (block (result f32) (br 0 (i64.const 1)) (br 0 (f32.const 1.0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1055 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-f32-vs-f64 (result f32) + (block (result f32) (br 0 (f64.const 1.0)) (br 0 (f32.const 1.0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1061 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-f64-vs-i32 (result f64) + (block (result f64) (br 0 (i32.const 1)) (br 0 (f64.const 1.0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1067 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-f64-vs-i64 (result f64) + (block (result f64) (br 0 (i64.const 1)) (br 0 (f64.const 1.0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1073 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-f64-vs-f32 (result f64) + (block (result f64) (br 0 (f32.const 1.0)) (br 0 (f64.const 1.0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1079 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-num-vs-nums (result i32 i32) + (block (result i32 i32) (br 0 (i32.const 0)) (br 0 (i32.const 1) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1086 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-i32-vs-void + (block (result i32) (block (result i32) (br 1 (i32.const 1))) (br 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1092 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-i64-vs-void + (block (result i64) (block (result i64) (br 1 (i64.const 1))) (br 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1098 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-f32-vs-void + (block (result f32) (block (result f32) (br 1 (f32.const 1.0))) (br 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1104 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-f64-vs-void + (block (result f64) (block (result f64) (br 1 (f64.const 1.0))) (br 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1110 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-nums-vs-void + (block (result i32 i32) (block (result i32 i32) (br 1 (i32.const 1) (i32.const 2))) (br 0)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1117 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-empty-vs-i32 (result i32) + (block (result i32) (block (br 1)) (br 0 (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1123 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-empty-vs-i64 (result i64) + (block (result i64) (block (br 1)) (br 0 (i64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1129 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-empty-vs-f32 (result f32) + (block (result f32) (block (br 1)) (br 0 (f32.const 1.0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1135 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-empty-vs-f64 (result f64) + (block (result f64) (block (br 1)) (br 0 (f64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1141 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-empty-vs-nums (result i32 i32) + (block (result i32 i32) (block (br 1)) (br 0 (i32.const 1) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1148 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-void-vs-i32 (result i32) + (block (result i32) (block (result i32) (br 1 (nop))) (br 0 (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1154 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-void-vs-i64 (result i64) + (block (result i64) (block (result i64) (br 1 (nop))) (br 0 (i64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1160 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-void-vs-f32 (result f32) + (block (result f32) (block (result f32) (br 1 (nop))) (br 0 (f32.const 1.0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1166 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-void-vs-f64 (result f64) + (block (result f64) (block (result f64) (br 1 (nop))) (br 0 (f64.const 1.0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1172 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-void-vs-nums (result i32 i32) + (block (result i32 i32) (block (result i32 i32) (br 1 (nop))) (br 0 (i32.const 1) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1179 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-i32-vs-i64 (result i32) + (block (result i32) + (block (result i32) (br 1 (i64.const 1))) (br 0 (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1187 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-i32-vs-f32 (result i32) + (block (result i32) + (block (result i32) (br 1 (f32.const 1.0))) (br 0 (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1195 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-i32-vs-f64 (result i32) + (block (result i32) + (block (result i32) (br 1 (f64.const 1.0))) (br 0 (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1203 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-i64-vs-i32 (result i64) + (block (result i64) + (block (result i64) (br 1 (i32.const 1))) (br 0 (i64.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1211 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-i64-vs-f32 (result i64) + (block (result i64) + (block (result i64) (br 1 (f32.const 1.0))) (br 0 (i64.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1219 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-i64-vs-f64 (result i64) + (block (result i64) + (block (result i64) (br 1 (f64.const 1.0))) (br 0 (i64.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1227 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-f32-vs-i32 (result f32) + (block (result f32) + (block (result f32) (br 1 (i32.const 1))) (br 0 (f32.const 1.0)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1235 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-f32-vs-i64 (result f32) + (block (result f32) + (block (result f32) (br 1 (i64.const 1))) (br 0 (f32.const 1.0)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1243 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-f32-vs-f64 (result f32) + (block (result f32) + (block (result f32) (br 1 (f64.const 1.0))) (br 0 (f32.const 1.0)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1251 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-f64-vs-i32 (result f64) + (block (result f64) + (block (result f64) (br 1 (i32.const 1))) (br 0 (f64.const 1.0)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1259 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-f64-vs-i64 (result f64) + (block (result f64) + (block (result f64) (br 1 (i64.const 1))) (br 0 (f64.const 1.0)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1267 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-f64-vs-f32 (result f64) + (block (result f64) + (block (result f64) (br 1 (f32.const 1.0))) (br 0 (f64.const 1.0)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1275 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-num-vs-nums (result i32 i32) + (block (result i32 i32) + (block (result i32 i32) (br 1 (i32.const 0))) (br 0 (i32.const 1) (i32.const 2)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1284 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-empty-vs-i32 (result i32) + (i32.ctz (block (br 0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1290 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-empty-vs-i64 (result i64) + (i64.ctz (block (br 0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1296 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-empty-vs-f32 (result f32) + (f32.floor (block (br 0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1302 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-empty-vs-f64 (result f64) + (f64.floor (block (br 0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1308 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-empty-vs-nums (result i32) + (i32.add (block (br 0))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1315 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-void-vs-i32 (result i32) + (i32.ctz (block (br 0 (nop)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1321 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-void-vs-i64 (result i64) + (i64.ctz (block (br 0 (nop)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1327 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-void-vs-f32 (result f32) + (f32.floor (block (br 0 (nop)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1333 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-void-vs-f64 (result f64) + (f64.floor (block (br 0 (nop)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1339 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-void-vs-nums (result i32) + (i32.add (block (br 0 (nop)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1346 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-i32-vs-i64 (result i32) + (i64.ctz (block (br 0 (i64.const 9)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1352 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-i32-vs-f32 (result i32) + (f32.floor (block (br 0 (f32.const 9.0)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1358 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-i32-vs-f64 (result i32) + (f64.floor (block (br 0 (f64.const 9.0)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1364 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-i64-vs-i32 (result i64) + (i32.ctz (block (br 0 (i32.const 9)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1370 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-i64-vs-f32 (result i64) + (f32.floor (block (br 0 (f32.const 9.0)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1376 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-i64-vs-f64 (result i64) + (f64.floor (block (br 0 (f64.const 9.0)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1382 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-f32-vs-i32 (result f32) + (i32.ctz (block (br 0 (i32.const 9)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1388 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-f32-vs-i64 (result f32) + (i64.ctz (block (br 0 (i64.const 9)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1394 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-f32-vs-f64 (result f32) + (f64.floor (block (br 0 (f64.const 9.0)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1400 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-f64-vs-i32 (result f64) + (i32.ctz (block (br 0 (i32.const 9)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1406 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-f64-vs-i64 (result f64) + (i64.ctz (block (br 0 (i64.const 9)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1412 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-f64-vs-f32 (result f64) + (f32.floor (block (br 0 (f32.const 9.0)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1418 +assert_invalid( + () => instantiate(`(module (func $$type-break-operand-num-vs-nums (result i32) + (i32.add (block (br 0 (i64.const 9) (i32.const 10)))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1425 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-num + (block (param i32) (drop)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1431 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-nums + (block (param i32 f64) (drop) (drop)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1437 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num + (f32.const 0) (block (param i32) (drop)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1443 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-nums + (f32.const 0) (block (param f32 i32) (drop) (drop)) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1449 +assert_invalid( + () => instantiate(`(module (func $$type-param-nested-void-vs-num + (block (block (param i32) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1455 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-nums + (block (block (param i32 f64) (drop) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1461 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num + (block (f32.const 0) (block (param i32) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1467 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-nums + (block (f32.const 0) (block (param f32 i32) (drop) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/block.wast:1474 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) block (param $$x i32) end) `), + `unexpected token`, +); + +// ./test/core/block.wast:1478 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) (block (param $$x i32))) `), + `unexpected token`, +); + +// ./test/core/block.wast:1484 +assert_malformed(() => instantiate(`(func block end $$l) `), `mismatching label`); + +// ./test/core/block.wast:1488 +assert_malformed(() => instantiate(`(func block $$a end $$l) `), `mismatching label`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/br.wast.js b/js/src/jit-test/tests/wasm/spec/spec/br.wast.js new file mode 100644 index 0000000000..e4febec2ea --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/br.wast.js @@ -0,0 +1,839 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/br.wast + +// ./test/core/br.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definition + (func $$dummy) + + (func (export "type-i32") (block (drop (i32.ctz (br 0))))) + (func (export "type-i64") (block (drop (i64.ctz (br 0))))) + (func (export "type-f32") (block (drop (f32.neg (br 0))))) + (func (export "type-f64") (block (drop (f64.neg (br 0))))) + (func (export "type-i32-i32") (block (drop (i32.add (br 0))))) + (func (export "type-i64-i64") (block (drop (i64.add (br 0))))) + (func (export "type-f32-f32") (block (drop (f32.add (br 0))))) + (func (export "type-f64-f64") (block (drop (f64.add (br 0))))) + + (func (export "type-i32-value") (result i32) + (block (result i32) (i32.ctz (br 0 (i32.const 1)))) + ) + (func (export "type-i64-value") (result i64) + (block (result i64) (i64.ctz (br 0 (i64.const 2)))) + ) + (func (export "type-f32-value") (result f32) + (block (result f32) (f32.neg (br 0 (f32.const 3)))) + ) + (func (export "type-f64-value") (result f64) + (block (result f64) (f64.neg (br 0 (f64.const 4)))) + ) + (func (export "type-f64-f64-value") (result f64 f64) + (block (result f64 f64) + (f64.add (br 0 (f64.const 4) (f64.const 5))) (f64.const 6) + ) + ) + + (func (export "as-block-first") + (block (br 0) (call $$dummy)) + ) + (func (export "as-block-mid") + (block (call $$dummy) (br 0) (call $$dummy)) + ) + (func (export "as-block-last") + (block (nop) (call $$dummy) (br 0)) + ) + (func (export "as-block-value") (result i32) + (block (result i32) (nop) (call $$dummy) (br 0 (i32.const 2))) + ) + + (func (export "as-loop-first") (result i32) + (block (result i32) (loop (result i32) (br 1 (i32.const 3)) (i32.const 2))) + ) + (func (export "as-loop-mid") (result i32) + (block (result i32) + (loop (result i32) (call $$dummy) (br 1 (i32.const 4)) (i32.const 2)) + ) + ) + (func (export "as-loop-last") (result i32) + (block (result i32) + (loop (result i32) (nop) (call $$dummy) (br 1 (i32.const 5))) + ) + ) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (br 0 (i32.const 9)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (br 0))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (br 0 (i32.const 8)) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 6) (br 0 (i32.const 9)))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (br 0))) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (br 0 (i32.const 10)) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 6) (br 0 (i32.const 11))) (i32.const 7) + ) + ) + + (func (export "as-return-value") (result i64) + (block (result i64) (return (br 0 (i64.const 7)))) + ) + (func (export "as-return-values") (result i32 i64) + (i32.const 2) + (block (result i64) (return (br 0 (i32.const 1) (i64.const 7)))) + ) + + (func (export "as-if-cond") (result i32) + (block (result i32) + (if (result i32) (br 0 (i32.const 2)) + (then (i32.const 0)) + (else (i32.const 1)) + ) + ) + ) + (func (export "as-if-then") (param i32 i32) (result i32) + (block (result i32) + (if (result i32) (local.get 0) + (then (br 1 (i32.const 3))) + (else (local.get 1)) + ) + ) + ) + (func (export "as-if-else") (param i32 i32) (result i32) + (block (result i32) + (if (result i32) (local.get 0) + (then (local.get 1)) + (else (br 1 (i32.const 4))) + ) + ) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (block (result i32) + (select (br 0 (i32.const 5)) (local.get 0) (local.get 1)) + ) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (block (result i32) + (select (local.get 0) (br 0 (i32.const 6)) (local.get 1)) + ) + ) + (func (export "as-select-cond") (result i32) + (block (result i32) + (select (i32.const 0) (i32.const 1) (br 0 (i32.const 7))) + ) + ) + (func (export "as-select-all") (result i32) + (block (result i32) (select (br 0 (i32.const 8)))) + ) + + (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (block (result i32) + (call $$f (br 0 (i32.const 12)) (i32.const 2) (i32.const 3)) + ) + ) + (func (export "as-call-mid") (result i32) + (block (result i32) + (call $$f (i32.const 1) (br 0 (i32.const 13)) (i32.const 3)) + ) + ) + (func (export "as-call-last") (result i32) + (block (result i32) + (call $$f (i32.const 1) (i32.const 2) (br 0 (i32.const 14))) + ) + ) + (func (export "as-call-all") (result i32) + (block (result i32) (call $$f (br 0 (i32.const 15)))) + ) + + (type $$sig (func (param i32 i32 i32) (result i32))) + (table funcref (elem $$f)) + (func (export "as-call_indirect-func") (result i32) + (block (result i32) + (call_indirect (type $$sig) + (br 0 (i32.const 20)) + (i32.const 1) (i32.const 2) (i32.const 3) + ) + ) + ) + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (call_indirect (type $$sig) + (i32.const 0) + (br 0 (i32.const 21)) (i32.const 2) (i32.const 3) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block (result i32) + (call_indirect (type $$sig) + (i32.const 0) + (i32.const 1) (br 0 (i32.const 22)) (i32.const 3) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (call_indirect (type $$sig) + (i32.const 0) + (i32.const 1) (i32.const 2) (br 0 (i32.const 23)) + ) + ) + ) + (func (export "as-call_indirect-all") (result i32) + (block (result i32) (call_indirect (type $$sig) (br 0 (i32.const 24)))) + ) + + (func (export "as-local.set-value") (result i32) (local f32) + (block (result i32) (local.set 0 (br 0 (i32.const 17))) (i32.const -1)) + ) + (func (export "as-local.tee-value") (result i32) (local i32) + (block (result i32) (local.tee 0 (br 0 (i32.const 1)))) + ) + (global $$a (mut i32) (i32.const 10)) + (func (export "as-global.set-value") (result i32) + (block (result i32) (global.set $$a (br 0 (i32.const 1)))) + ) + + (memory 1) + (func (export "as-load-address") (result f32) + (block (result f32) (f32.load (br 0 (f32.const 1.7)))) + ) + (func (export "as-loadN-address") (result i64) + (block (result i64) (i64.load8_s (br 0 (i64.const 30)))) + ) + + (func (export "as-store-address") (result i32) + (block (result i32) + (f64.store (br 0 (i32.const 30)) (f64.const 7)) (i32.const -1) + ) + ) + (func (export "as-store-value") (result i32) + (block (result i32) + (i64.store (i32.const 2) (br 0 (i32.const 31))) (i32.const -1) + ) + ) + (func (export "as-store-both") (result i32) + (block (result i32) + (i64.store (br 0 (i32.const 32))) (i32.const -1) + ) + ) + + (func (export "as-storeN-address") (result i32) + (block (result i32) + (i32.store8 (br 0 (i32.const 32)) (i32.const 7)) (i32.const -1) + ) + ) + (func (export "as-storeN-value") (result i32) + (block (result i32) + (i64.store16 (i32.const 2) (br 0 (i32.const 33))) (i32.const -1) + ) + ) + (func (export "as-storeN-both") (result i32) + (block (result i32) + (i64.store16 (br 0 (i32.const 34))) (i32.const -1) + ) + ) + + (func (export "as-unary-operand") (result f32) + (block (result f32) (f32.neg (br 0 (f32.const 3.4)))) + ) + + (func (export "as-binary-left") (result i32) + (block (result i32) (i32.add (br 0 (i32.const 3)) (i32.const 10))) + ) + (func (export "as-binary-right") (result i64) + (block (result i64) (i64.sub (i64.const 10) (br 0 (i64.const 45)))) + ) + (func (export "as-binary-both") (result i32) + (block (result i32) (i32.add (br 0 (i32.const 46)))) + ) + + (func (export "as-test-operand") (result i32) + (block (result i32) (i32.eqz (br 0 (i32.const 44)))) + ) + + (func (export "as-compare-left") (result i32) + (block (result i32) (f64.le (br 0 (i32.const 43)) (f64.const 10))) + ) + (func (export "as-compare-right") (result i32) + (block (result i32) (f32.ne (f32.const 10) (br 0 (i32.const 42)))) + ) + (func (export "as-compare-both") (result i32) + (block (result i32) (f64.le (br 0 (i32.const 44)))) + ) + + (func (export "as-convert-operand") (result i32) + (block (result i32) (i32.wrap_i64 (br 0 (i32.const 41)))) + ) + + (func (export "as-memory.grow-size") (result i32) + (block (result i32) (memory.grow (br 0 (i32.const 40)))) + ) + + (func (export "nested-block-value") (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (call $$dummy) + (i32.add (i32.const 4) (br 0 (i32.const 8))) + ) + ) + ) + + (func (export "nested-br-value") (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (drop + (block (result i32) + (drop (i32.const 4)) + (br 0 (br 1 (i32.const 8))) + ) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_if-value") (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (drop + (block (result i32) + (drop (i32.const 4)) + (drop (br_if 0 (br 1 (i32.const 8)) (i32.const 1))) + (i32.const 32) + ) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_if-value-cond") (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (drop (br_if 0 (i32.const 4) (br 0 (i32.const 8)))) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_table-value") (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (drop + (block (result i32) + (drop (i32.const 4)) + (br_table 0 (br 1 (i32.const 8)) (i32.const 1)) + ) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_table-value-index") (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (br_table 0 (i32.const 4) (br 0 (i32.const 8))) + (i32.const 16) + ) + ) + ) +)`); + +// ./test/core/br.wast:372 +assert_return(() => invoke($0, `type-i32`, []), []); + +// ./test/core/br.wast:373 +assert_return(() => invoke($0, `type-i64`, []), []); + +// ./test/core/br.wast:374 +assert_return(() => invoke($0, `type-f32`, []), []); + +// ./test/core/br.wast:375 +assert_return(() => invoke($0, `type-f64`, []), []); + +// ./test/core/br.wast:376 +assert_return(() => invoke($0, `type-i32-i32`, []), []); + +// ./test/core/br.wast:377 +assert_return(() => invoke($0, `type-i64-i64`, []), []); + +// ./test/core/br.wast:378 +assert_return(() => invoke($0, `type-f32-f32`, []), []); + +// ./test/core/br.wast:379 +assert_return(() => invoke($0, `type-f64-f64`, []), []); + +// ./test/core/br.wast:381 +assert_return(() => invoke($0, `type-i32-value`, []), [value("i32", 1)]); + +// ./test/core/br.wast:382 +assert_return(() => invoke($0, `type-i64-value`, []), [value("i64", 2n)]); + +// ./test/core/br.wast:383 +assert_return(() => invoke($0, `type-f32-value`, []), [value("f32", 3)]); + +// ./test/core/br.wast:384 +assert_return(() => invoke($0, `type-f64-value`, []), [value("f64", 4)]); + +// ./test/core/br.wast:385 +assert_return(() => invoke($0, `type-f64-f64-value`, []), [value("f64", 4), value("f64", 5)]); + +// ./test/core/br.wast:387 +assert_return(() => invoke($0, `as-block-first`, []), []); + +// ./test/core/br.wast:388 +assert_return(() => invoke($0, `as-block-mid`, []), []); + +// ./test/core/br.wast:389 +assert_return(() => invoke($0, `as-block-last`, []), []); + +// ./test/core/br.wast:390 +assert_return(() => invoke($0, `as-block-value`, []), [value("i32", 2)]); + +// ./test/core/br.wast:392 +assert_return(() => invoke($0, `as-loop-first`, []), [value("i32", 3)]); + +// ./test/core/br.wast:393 +assert_return(() => invoke($0, `as-loop-mid`, []), [value("i32", 4)]); + +// ./test/core/br.wast:394 +assert_return(() => invoke($0, `as-loop-last`, []), [value("i32", 5)]); + +// ./test/core/br.wast:396 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 9)]); + +// ./test/core/br.wast:398 +assert_return(() => invoke($0, `as-br_if-cond`, []), []); + +// ./test/core/br.wast:399 +assert_return(() => invoke($0, `as-br_if-value`, []), [value("i32", 8)]); + +// ./test/core/br.wast:400 +assert_return(() => invoke($0, `as-br_if-value-cond`, []), [value("i32", 9)]); + +// ./test/core/br.wast:402 +assert_return(() => invoke($0, `as-br_table-index`, []), []); + +// ./test/core/br.wast:403 +assert_return(() => invoke($0, `as-br_table-value`, []), [value("i32", 10)]); + +// ./test/core/br.wast:404 +assert_return(() => invoke($0, `as-br_table-value-index`, []), [value("i32", 11)]); + +// ./test/core/br.wast:406 +assert_return(() => invoke($0, `as-return-value`, []), [value("i64", 7n)]); + +// ./test/core/br.wast:407 +assert_return(() => invoke($0, `as-return-values`, []), [value("i32", 2), value("i64", 7n)]); + +// ./test/core/br.wast:409 +assert_return(() => invoke($0, `as-if-cond`, []), [value("i32", 2)]); + +// ./test/core/br.wast:410 +assert_return(() => invoke($0, `as-if-then`, [1, 6]), [value("i32", 3)]); + +// ./test/core/br.wast:411 +assert_return(() => invoke($0, `as-if-then`, [0, 6]), [value("i32", 6)]); + +// ./test/core/br.wast:412 +assert_return(() => invoke($0, `as-if-else`, [0, 6]), [value("i32", 4)]); + +// ./test/core/br.wast:413 +assert_return(() => invoke($0, `as-if-else`, [1, 6]), [value("i32", 6)]); + +// ./test/core/br.wast:415 +assert_return(() => invoke($0, `as-select-first`, [0, 6]), [value("i32", 5)]); + +// ./test/core/br.wast:416 +assert_return(() => invoke($0, `as-select-first`, [1, 6]), [value("i32", 5)]); + +// ./test/core/br.wast:417 +assert_return(() => invoke($0, `as-select-second`, [0, 6]), [value("i32", 6)]); + +// ./test/core/br.wast:418 +assert_return(() => invoke($0, `as-select-second`, [1, 6]), [value("i32", 6)]); + +// ./test/core/br.wast:419 +assert_return(() => invoke($0, `as-select-cond`, []), [value("i32", 7)]); + +// ./test/core/br.wast:420 +assert_return(() => invoke($0, `as-select-all`, []), [value("i32", 8)]); + +// ./test/core/br.wast:422 +assert_return(() => invoke($0, `as-call-first`, []), [value("i32", 12)]); + +// ./test/core/br.wast:423 +assert_return(() => invoke($0, `as-call-mid`, []), [value("i32", 13)]); + +// ./test/core/br.wast:424 +assert_return(() => invoke($0, `as-call-last`, []), [value("i32", 14)]); + +// ./test/core/br.wast:425 +assert_return(() => invoke($0, `as-call-all`, []), [value("i32", 15)]); + +// ./test/core/br.wast:427 +assert_return(() => invoke($0, `as-call_indirect-func`, []), [value("i32", 20)]); + +// ./test/core/br.wast:428 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 21)]); + +// ./test/core/br.wast:429 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 22)]); + +// ./test/core/br.wast:430 +assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", 23)]); + +// ./test/core/br.wast:431 +assert_return(() => invoke($0, `as-call_indirect-all`, []), [value("i32", 24)]); + +// ./test/core/br.wast:433 +assert_return(() => invoke($0, `as-local.set-value`, []), [value("i32", 17)]); + +// ./test/core/br.wast:434 +assert_return(() => invoke($0, `as-local.tee-value`, []), [value("i32", 1)]); + +// ./test/core/br.wast:435 +assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 1)]); + +// ./test/core/br.wast:437 +assert_return(() => invoke($0, `as-load-address`, []), [value("f32", 1.7)]); + +// ./test/core/br.wast:438 +assert_return(() => invoke($0, `as-loadN-address`, []), [value("i64", 30n)]); + +// ./test/core/br.wast:440 +assert_return(() => invoke($0, `as-store-address`, []), [value("i32", 30)]); + +// ./test/core/br.wast:441 +assert_return(() => invoke($0, `as-store-value`, []), [value("i32", 31)]); + +// ./test/core/br.wast:442 +assert_return(() => invoke($0, `as-store-both`, []), [value("i32", 32)]); + +// ./test/core/br.wast:443 +assert_return(() => invoke($0, `as-storeN-address`, []), [value("i32", 32)]); + +// ./test/core/br.wast:444 +assert_return(() => invoke($0, `as-storeN-value`, []), [value("i32", 33)]); + +// ./test/core/br.wast:445 +assert_return(() => invoke($0, `as-storeN-both`, []), [value("i32", 34)]); + +// ./test/core/br.wast:447 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("f32", 3.4)]); + +// ./test/core/br.wast:449 +assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 3)]); + +// ./test/core/br.wast:450 +assert_return(() => invoke($0, `as-binary-right`, []), [value("i64", 45n)]); + +// ./test/core/br.wast:451 +assert_return(() => invoke($0, `as-binary-both`, []), [value("i32", 46)]); + +// ./test/core/br.wast:453 +assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 44)]); + +// ./test/core/br.wast:455 +assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 43)]); + +// ./test/core/br.wast:456 +assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 42)]); + +// ./test/core/br.wast:457 +assert_return(() => invoke($0, `as-compare-both`, []), [value("i32", 44)]); + +// ./test/core/br.wast:459 +assert_return(() => invoke($0, `as-convert-operand`, []), [value("i32", 41)]); + +// ./test/core/br.wast:461 +assert_return(() => invoke($0, `as-memory.grow-size`, []), [value("i32", 40)]); + +// ./test/core/br.wast:463 +assert_return(() => invoke($0, `nested-block-value`, []), [value("i32", 9)]); + +// ./test/core/br.wast:464 +assert_return(() => invoke($0, `nested-br-value`, []), [value("i32", 9)]); + +// ./test/core/br.wast:465 +assert_return(() => invoke($0, `nested-br_if-value`, []), [value("i32", 9)]); + +// ./test/core/br.wast:466 +assert_return(() => invoke($0, `nested-br_if-value-cond`, []), [value("i32", 9)]); + +// ./test/core/br.wast:467 +assert_return(() => invoke($0, `nested-br_table-value`, []), [value("i32", 9)]); + +// ./test/core/br.wast:468 +assert_return(() => invoke($0, `nested-br_table-value-index`, []), [value("i32", 9)]); + +// ./test/core/br.wast:470 +assert_invalid( + () => instantiate(`(module (func $$type-arg-empty-vs-num (result i32) + (block (result i32) (br 0) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br.wast:477 +assert_invalid( + () => instantiate(`(module (func $$type-arg-void-vs-num (result i32) + (block (result i32) (br 0 (nop)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br.wast:483 +assert_invalid( + () => instantiate(`(module (func $$type-arg-void-vs-num-nested (result i32) + (block (result i32) (i32.const 0) (block (br 1))) + ))`), + `type mismatch`, +); + +// ./test/core/br.wast:489 +assert_invalid( + () => instantiate(`(module (func $$type-arg-num-vs-num (result i32) + (block (result i32) (br 0 (i64.const 1)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br.wast:496 +assert_invalid( + () => instantiate(`(module + (func $$type-arg-empty-in-br + (i32.const 0) + (block (result i32) (br 0 (br 0))) (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:505 +assert_invalid( + () => instantiate(`(module + (func $$type-arg-empty-in-br_if + (i32.const 0) + (block (result i32) (br_if 0 (br 0) (i32.const 1))) (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:514 +assert_invalid( + () => instantiate(`(module + (func $$type-arg-empty-in-br_table + (i32.const 0) + (block (result i32) (br_table 0 (br 0))) (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:523 +assert_invalid( + () => instantiate(`(module + (func $$type-arg-empty-in-return + (block (result i32) + (return (br 0)) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:534 +assert_invalid( + () => instantiate(`(module + (func $$type-arg-empty-in-select + (block (result i32) + (select (br 0) (i32.const 1) (i32.const 2)) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:545 +assert_invalid( + () => instantiate(`(module + (func $$type-arg-empty-in-call + (block (result i32) + (call 1 (br 0)) + ) + (i32.eqz) (drop) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:557 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-arg-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (br 0) (i32.const 0) + ) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:573 +assert_invalid( + () => instantiate(`(module + (func $$type-arg-empty-in-local.set + (local i32) + (block (result i32) + (local.set 0 (br 0)) (local.get 0) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:585 +assert_invalid( + () => instantiate(`(module + (func $$type-arg-empty-in-local.tee + (local i32) + (block (result i32) + (local.tee 0 (br 0)) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:597 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-arg-empty-in-global.set + (block (result i32) + (global.set $$x (br 0)) (global.get $$x) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:609 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-arg-empty-in-memory.grow + (block (result i32) + (memory.grow (br 0)) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:621 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-arg-empty-in-load + (block (result i32) + (i32.load (br 0)) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:633 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-arg-empty-in-store + (block (result i32) + (i32.store (br 0) (i32.const 0)) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br.wast:646 +assert_invalid( + () => instantiate(`(module (func $$unbound-label (br 1)))`), + `unknown label`, +); + +// ./test/core/br.wast:650 +assert_invalid( + () => instantiate(`(module (func $$unbound-nested-label (block (block (br 5)))))`), + `unknown label`, +); + +// ./test/core/br.wast:654 +assert_invalid( + () => instantiate(`(module (func $$large-label (br 0x10000001)))`), + `unknown label`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/br_if.wast.js b/js/src/jit-test/tests/wasm/spec/spec/br_if.wast.js new file mode 100644 index 0000000000..511ee003fb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/br_if.wast.js @@ -0,0 +1,886 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/br_if.wast + +// ./test/core/br_if.wast:3 +let $0 = instantiate(`(module + (func $$dummy) + + (func (export "type-i32") + (block (drop (i32.ctz (br_if 0 (i32.const 0) (i32.const 1))))) + ) + (func (export "type-i64") + (block (drop (i64.ctz (br_if 0 (i64.const 0) (i32.const 1))))) + ) + (func (export "type-f32") + (block (drop (f32.neg (br_if 0 (f32.const 0) (i32.const 1))))) + ) + (func (export "type-f64") + (block (drop (f64.neg (br_if 0 (f64.const 0) (i32.const 1))))) + ) + + (func (export "type-i32-value") (result i32) + (block (result i32) (i32.ctz (br_if 0 (i32.const 1) (i32.const 1)))) + ) + (func (export "type-i64-value") (result i64) + (block (result i64) (i64.ctz (br_if 0 (i64.const 2) (i32.const 1)))) + ) + (func (export "type-f32-value") (result f32) + (block (result f32) (f32.neg (br_if 0 (f32.const 3) (i32.const 1)))) + ) + (func (export "type-f64-value") (result f64) + (block (result f64) (f64.neg (br_if 0 (f64.const 4) (i32.const 1)))) + ) + + (func (export "as-block-first") (param i32) (result i32) + (block (br_if 0 (local.get 0)) (return (i32.const 2))) (i32.const 3) + ) + (func (export "as-block-mid") (param i32) (result i32) + (block (call $$dummy) (br_if 0 (local.get 0)) (return (i32.const 2))) + (i32.const 3) + ) + (func (export "as-block-last") (param i32) + (block (call $$dummy) (call $$dummy) (br_if 0 (local.get 0))) + ) + (func (export "as-block-first-value") (param i32) (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 10) (local.get 0))) (return (i32.const 11)) + ) + ) + (func (export "as-block-mid-value") (param i32) (result i32) + (block (result i32) + (call $$dummy) + (drop (br_if 0 (i32.const 20) (local.get 0))) + (return (i32.const 21)) + ) + ) + (func (export "as-block-last-value") (param i32) (result i32) + (block (result i32) + (call $$dummy) (call $$dummy) (br_if 0 (i32.const 11) (local.get 0)) + ) + ) + + (func (export "as-loop-first") (param i32) (result i32) + (block (loop (br_if 1 (local.get 0)) (return (i32.const 2)))) (i32.const 3) + ) + (func (export "as-loop-mid") (param i32) (result i32) + (block (loop (call $$dummy) (br_if 1 (local.get 0)) (return (i32.const 2)))) + (i32.const 4) + ) + (func (export "as-loop-last") (param i32) + (loop (call $$dummy) (br_if 1 (local.get 0))) + ) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (br_if 0 (i32.const 1) (i32.const 2)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (br_if 0 (i32.const 1) (i32.const 1)))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (br_if 0 (i32.const 1) (i32.const 2)) (i32.const 3))) + (i32.const 4) + ) + ) + (func (export "as-br_if-value-cond") (param i32) (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 2) (br_if 0 (i32.const 1) (local.get 0)))) + (i32.const 4) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (br_if 0 (i32.const 1) (i32.const 2)))) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (br_if 0 (i32.const 1) (i32.const 2)) (i32.const 3)) (i32.const 4) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 2) (br_if 0 (i32.const 1) (i32.const 3))) (i32.const 4) + ) + ) + (func (export "as-return-value") (result i64) + (block (result i64) (return (br_if 0 (i64.const 1) (i32.const 2)))) + ) + + (func (export "as-if-cond") (param i32) (result i32) + (block (result i32) + (if (result i32) + (br_if 0 (i32.const 1) (local.get 0)) + (then (i32.const 2)) + (else (i32.const 3)) + ) + ) + ) + (func (export "as-if-then") (param i32 i32) + (block + (if (local.get 0) (then (br_if 1 (local.get 1))) (else (call $$dummy))) + ) + ) + (func (export "as-if-else") (param i32 i32) + (block + (if (local.get 0) (then (call $$dummy)) (else (br_if 1 (local.get 1)))) + ) + ) + + (func (export "as-select-first") (param i32) (result i32) + (block (result i32) + (select (br_if 0 (i32.const 3) (i32.const 10)) (i32.const 2) (local.get 0)) + ) + ) + (func (export "as-select-second") (param i32) (result i32) + (block (result i32) + (select (i32.const 1) (br_if 0 (i32.const 3) (i32.const 10)) (local.get 0)) + ) + ) + (func (export "as-select-cond") (result i32) + (block (result i32) + (select (i32.const 1) (i32.const 2) (br_if 0 (i32.const 3) (i32.const 10))) + ) + ) + + (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (block (result i32) + (call $$f + (br_if 0 (i32.const 12) (i32.const 1)) (i32.const 2) (i32.const 3) + ) + ) + ) + (func (export "as-call-mid") (result i32) + (block (result i32) + (call $$f + (i32.const 1) (br_if 0 (i32.const 13) (i32.const 1)) (i32.const 3) + ) + ) + ) + (func (export "as-call-last") (result i32) + (block (result i32) + (call $$f + (i32.const 1) (i32.const 2) (br_if 0 (i32.const 14) (i32.const 1)) + ) + ) + ) + + (func $$func (param i32 i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-func") (result i32) + (block (result i32) + (call_indirect (type $$check) + (br_if 0 (i32.const 4) (i32.const 10)) + (i32.const 1) (i32.const 2) (i32.const 0) + ) + ) + ) + + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 1) (br_if 0 (i32.const 4) (i32.const 10)) (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 1) (i32.const 2) (br_if 0 (i32.const 4) (i32.const 10)) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 1) (i32.const 2) (i32.const 3) (br_if 0 (i32.const 4) (i32.const 10)) + ) + ) + ) + + (func (export "as-local.set-value") (param i32) (result i32) + (local i32) + (block (result i32) + (local.set 0 (br_if 0 (i32.const 17) (local.get 0))) + (i32.const -1) + ) + ) + (func (export "as-local.tee-value") (param i32) (result i32) + (block (result i32) + (local.tee 0 (br_if 0 (i32.const 1) (local.get 0))) + (return (i32.const -1)) + ) + ) + (global $$a (mut i32) (i32.const 10)) + (func (export "as-global.set-value") (param i32) (result i32) + (block (result i32) + (global.set $$a (br_if 0 (i32.const 1) (local.get 0))) + (return (i32.const -1)) + ) + ) + + (memory 1) + (func (export "as-load-address") (result i32) + (block (result i32) (i32.load (br_if 0 (i32.const 1) (i32.const 1)))) + ) + (func (export "as-loadN-address") (result i32) + (block (result i32) (i32.load8_s (br_if 0 (i32.const 30) (i32.const 1)))) + ) + + (func (export "as-store-address") (result i32) + (block (result i32) + (i32.store (br_if 0 (i32.const 30) (i32.const 1)) (i32.const 7)) (i32.const -1) + ) + ) + (func (export "as-store-value") (result i32) + (block (result i32) + (i32.store (i32.const 2) (br_if 0 (i32.const 31) (i32.const 1))) (i32.const -1) + ) + ) + + (func (export "as-storeN-address") (result i32) + (block (result i32) + (i32.store8 (br_if 0 (i32.const 32) (i32.const 1)) (i32.const 7)) (i32.const -1) + ) + ) + (func (export "as-storeN-value") (result i32) + (block (result i32) + (i32.store16 (i32.const 2) (br_if 0 (i32.const 33) (i32.const 1))) (i32.const -1) + ) + ) + + (func (export "as-unary-operand") (result f64) + (block (result f64) (f64.neg (br_if 0 (f64.const 1.0) (i32.const 1)))) + ) + (func (export "as-binary-left") (result i32) + (block (result i32) (i32.add (br_if 0 (i32.const 1) (i32.const 1)) (i32.const 10))) + ) + (func (export "as-binary-right") (result i32) + (block (result i32) (i32.sub (i32.const 10) (br_if 0 (i32.const 1) (i32.const 1)))) + ) + (func (export "as-test-operand") (result i32) + (block (result i32) (i32.eqz (br_if 0 (i32.const 0) (i32.const 1)))) + ) + (func (export "as-compare-left") (result i32) + (block (result i32) (i32.le_u (br_if 0 (i32.const 1) (i32.const 1)) (i32.const 10))) + ) + (func (export "as-compare-right") (result i32) + (block (result i32) (i32.ne (i32.const 10) (br_if 0 (i32.const 1) (i32.const 42)))) + ) + + (func (export "as-memory.grow-size") (result i32) + (block (result i32) (memory.grow (br_if 0 (i32.const 1) (i32.const 1)))) + ) + + (func (export "nested-block-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (i32.add + (i32.const 4) + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) + (i32.const 16) + ) + ) + ) + ) + ) + + (func (export "nested-br-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (br 0 + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4) + ) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_if-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (drop (br_if 0 + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4) + ) + (i32.const 1) + )) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_if-value-cond") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (drop (br_if 0 + (i32.const 4) + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 1) + ) + )) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_table-value") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (br_table 0 + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4) + ) + (i32.const 1) + ) + (i32.const 16) + ) + ) + ) + + (func (export "nested-br_table-value-index") (param i32) (result i32) + (i32.add + (i32.const 1) + (block (result i32) + (drop (i32.const 2)) + (br_table 0 + (i32.const 4) + (block (result i32) + (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 1) + ) + ) + (i32.const 16) + ) + ) + ) + +)`); + +// ./test/core/br_if.wast:372 +assert_return(() => invoke($0, `type-i32`, []), []); + +// ./test/core/br_if.wast:373 +assert_return(() => invoke($0, `type-i64`, []), []); + +// ./test/core/br_if.wast:374 +assert_return(() => invoke($0, `type-f32`, []), []); + +// ./test/core/br_if.wast:375 +assert_return(() => invoke($0, `type-f64`, []), []); + +// ./test/core/br_if.wast:377 +assert_return(() => invoke($0, `type-i32-value`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:378 +assert_return(() => invoke($0, `type-i64-value`, []), [value("i64", 2n)]); + +// ./test/core/br_if.wast:379 +assert_return(() => invoke($0, `type-f32-value`, []), [value("f32", 3)]); + +// ./test/core/br_if.wast:380 +assert_return(() => invoke($0, `type-f64-value`, []), [value("f64", 4)]); + +// ./test/core/br_if.wast:382 +assert_return(() => invoke($0, `as-block-first`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:383 +assert_return(() => invoke($0, `as-block-first`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:384 +assert_return(() => invoke($0, `as-block-mid`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:385 +assert_return(() => invoke($0, `as-block-mid`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:386 +assert_return(() => invoke($0, `as-block-last`, [0]), []); + +// ./test/core/br_if.wast:387 +assert_return(() => invoke($0, `as-block-last`, [1]), []); + +// ./test/core/br_if.wast:389 +assert_return(() => invoke($0, `as-block-first-value`, [0]), [value("i32", 11)]); + +// ./test/core/br_if.wast:390 +assert_return(() => invoke($0, `as-block-first-value`, [1]), [value("i32", 10)]); + +// ./test/core/br_if.wast:391 +assert_return(() => invoke($0, `as-block-mid-value`, [0]), [value("i32", 21)]); + +// ./test/core/br_if.wast:392 +assert_return(() => invoke($0, `as-block-mid-value`, [1]), [value("i32", 20)]); + +// ./test/core/br_if.wast:393 +assert_return(() => invoke($0, `as-block-last-value`, [0]), [value("i32", 11)]); + +// ./test/core/br_if.wast:394 +assert_return(() => invoke($0, `as-block-last-value`, [1]), [value("i32", 11)]); + +// ./test/core/br_if.wast:396 +assert_return(() => invoke($0, `as-loop-first`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:397 +assert_return(() => invoke($0, `as-loop-first`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:398 +assert_return(() => invoke($0, `as-loop-mid`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:399 +assert_return(() => invoke($0, `as-loop-mid`, [1]), [value("i32", 4)]); + +// ./test/core/br_if.wast:400 +assert_return(() => invoke($0, `as-loop-last`, [0]), []); + +// ./test/core/br_if.wast:401 +assert_return(() => invoke($0, `as-loop-last`, [1]), []); + +// ./test/core/br_if.wast:403 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:405 +assert_return(() => invoke($0, `as-br_if-cond`, []), []); + +// ./test/core/br_if.wast:406 +assert_return(() => invoke($0, `as-br_if-value`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:407 +assert_return(() => invoke($0, `as-br_if-value-cond`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:408 +assert_return(() => invoke($0, `as-br_if-value-cond`, [1]), [value("i32", 1)]); + +// ./test/core/br_if.wast:410 +assert_return(() => invoke($0, `as-br_table-index`, []), []); + +// ./test/core/br_if.wast:411 +assert_return(() => invoke($0, `as-br_table-value`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:412 +assert_return(() => invoke($0, `as-br_table-value-index`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:414 +assert_return(() => invoke($0, `as-return-value`, []), [value("i64", 1n)]); + +// ./test/core/br_if.wast:416 +assert_return(() => invoke($0, `as-if-cond`, [0]), [value("i32", 2)]); + +// ./test/core/br_if.wast:417 +assert_return(() => invoke($0, `as-if-cond`, [1]), [value("i32", 1)]); + +// ./test/core/br_if.wast:418 +assert_return(() => invoke($0, `as-if-then`, [0, 0]), []); + +// ./test/core/br_if.wast:419 +assert_return(() => invoke($0, `as-if-then`, [4, 0]), []); + +// ./test/core/br_if.wast:420 +assert_return(() => invoke($0, `as-if-then`, [0, 1]), []); + +// ./test/core/br_if.wast:421 +assert_return(() => invoke($0, `as-if-then`, [4, 1]), []); + +// ./test/core/br_if.wast:422 +assert_return(() => invoke($0, `as-if-else`, [0, 0]), []); + +// ./test/core/br_if.wast:423 +assert_return(() => invoke($0, `as-if-else`, [3, 0]), []); + +// ./test/core/br_if.wast:424 +assert_return(() => invoke($0, `as-if-else`, [0, 1]), []); + +// ./test/core/br_if.wast:425 +assert_return(() => invoke($0, `as-if-else`, [3, 1]), []); + +// ./test/core/br_if.wast:427 +assert_return(() => invoke($0, `as-select-first`, [0]), [value("i32", 3)]); + +// ./test/core/br_if.wast:428 +assert_return(() => invoke($0, `as-select-first`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:429 +assert_return(() => invoke($0, `as-select-second`, [0]), [value("i32", 3)]); + +// ./test/core/br_if.wast:430 +assert_return(() => invoke($0, `as-select-second`, [1]), [value("i32", 3)]); + +// ./test/core/br_if.wast:431 +assert_return(() => invoke($0, `as-select-cond`, []), [value("i32", 3)]); + +// ./test/core/br_if.wast:433 +assert_return(() => invoke($0, `as-call-first`, []), [value("i32", 12)]); + +// ./test/core/br_if.wast:434 +assert_return(() => invoke($0, `as-call-mid`, []), [value("i32", 13)]); + +// ./test/core/br_if.wast:435 +assert_return(() => invoke($0, `as-call-last`, []), [value("i32", 14)]); + +// ./test/core/br_if.wast:437 +assert_return(() => invoke($0, `as-call_indirect-func`, []), [value("i32", 4)]); + +// ./test/core/br_if.wast:438 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 4)]); + +// ./test/core/br_if.wast:439 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 4)]); + +// ./test/core/br_if.wast:440 +assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", 4)]); + +// ./test/core/br_if.wast:442 +assert_return(() => invoke($0, `as-local.set-value`, [0]), [value("i32", -1)]); + +// ./test/core/br_if.wast:443 +assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 17)]); + +// ./test/core/br_if.wast:445 +assert_return(() => invoke($0, `as-local.tee-value`, [0]), [value("i32", -1)]); + +// ./test/core/br_if.wast:446 +assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 1)]); + +// ./test/core/br_if.wast:448 +assert_return(() => invoke($0, `as-global.set-value`, [0]), [value("i32", -1)]); + +// ./test/core/br_if.wast:449 +assert_return(() => invoke($0, `as-global.set-value`, [1]), [value("i32", 1)]); + +// ./test/core/br_if.wast:451 +assert_return(() => invoke($0, `as-load-address`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:452 +assert_return(() => invoke($0, `as-loadN-address`, []), [value("i32", 30)]); + +// ./test/core/br_if.wast:454 +assert_return(() => invoke($0, `as-store-address`, []), [value("i32", 30)]); + +// ./test/core/br_if.wast:455 +assert_return(() => invoke($0, `as-store-value`, []), [value("i32", 31)]); + +// ./test/core/br_if.wast:456 +assert_return(() => invoke($0, `as-storeN-address`, []), [value("i32", 32)]); + +// ./test/core/br_if.wast:457 +assert_return(() => invoke($0, `as-storeN-value`, []), [value("i32", 33)]); + +// ./test/core/br_if.wast:459 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("f64", 1)]); + +// ./test/core/br_if.wast:460 +assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:461 +assert_return(() => invoke($0, `as-binary-right`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:462 +assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 0)]); + +// ./test/core/br_if.wast:463 +assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:464 +assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:465 +assert_return(() => invoke($0, `as-memory.grow-size`, []), [value("i32", 1)]); + +// ./test/core/br_if.wast:467 +assert_return(() => invoke($0, `nested-block-value`, [0]), [value("i32", 21)]); + +// ./test/core/br_if.wast:468 +assert_return(() => invoke($0, `nested-block-value`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:469 +assert_return(() => invoke($0, `nested-br-value`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:470 +assert_return(() => invoke($0, `nested-br-value`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:471 +assert_return(() => invoke($0, `nested-br_if-value`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:472 +assert_return(() => invoke($0, `nested-br_if-value`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:473 +assert_return(() => invoke($0, `nested-br_if-value-cond`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:474 +assert_return(() => invoke($0, `nested-br_if-value-cond`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:475 +assert_return(() => invoke($0, `nested-br_table-value`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:476 +assert_return(() => invoke($0, `nested-br_table-value`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:477 +assert_return(() => invoke($0, `nested-br_table-value-index`, [0]), [value("i32", 5)]); + +// ./test/core/br_if.wast:478 +assert_return(() => invoke($0, `nested-br_table-value-index`, [1]), [value("i32", 9)]); + +// ./test/core/br_if.wast:480 +assert_invalid( + () => instantiate(`(module (func $$type-false-i32 (block (i32.ctz (br_if 0 (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:484 +assert_invalid( + () => instantiate(`(module (func $$type-false-i64 (block (i64.ctz (br_if 0 (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:488 +assert_invalid( + () => instantiate(`(module (func $$type-false-f32 (block (f32.neg (br_if 0 (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:492 +assert_invalid( + () => instantiate(`(module (func $$type-false-f64 (block (f64.neg (br_if 0 (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:497 +assert_invalid( + () => instantiate(`(module (func $$type-true-i32 (block (i32.ctz (br_if 0 (i32.const 1))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:501 +assert_invalid( + () => instantiate(`(module (func $$type-true-i64 (block (i64.ctz (br_if 0 (i64.const 1))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:505 +assert_invalid( + () => instantiate(`(module (func $$type-true-f32 (block (f32.neg (br_if 0 (f32.const 1))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:509 +assert_invalid( + () => instantiate(`(module (func $$type-true-f64 (block (f64.neg (br_if 0 (i64.const 1))))))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:514 +assert_invalid( + () => instantiate(`(module (func $$type-false-arg-void-vs-num (result i32) + (block (result i32) (br_if 0 (i32.const 0)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:520 +assert_invalid( + () => instantiate(`(module (func $$type-true-arg-void-vs-num (result i32) + (block (result i32) (br_if 0 (i32.const 1)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:526 +assert_invalid( + () => instantiate(`(module (func $$type-false-arg-num-vs-void + (block (br_if 0 (i32.const 0) (i32.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:532 +assert_invalid( + () => instantiate(`(module (func $$type-true-arg-num-vs-void + (block (br_if 0 (i32.const 0) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:539 +assert_invalid( + () => instantiate(`(module (func $$type-false-arg-void-vs-num (result i32) + (block (result i32) (br_if 0 (nop) (i32.const 0)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:545 +assert_invalid( + () => instantiate(`(module (func $$type-true-arg-void-vs-num (result i32) + (block (result i32) (br_if 0 (nop) (i32.const 1)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:551 +assert_invalid( + () => instantiate(`(module (func $$type-false-arg-num-vs-num (result i32) + (block (result i32) + (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1) + ) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:559 +assert_invalid( + () => instantiate(`(module (func $$type-true-arg-num-vs-num (result i32) + (block (result i32) + (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1) + ) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:568 +assert_invalid( + () => instantiate(`(module (func $$type-cond-empty-vs-i32 + (block (br_if 0)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:574 +assert_invalid( + () => instantiate(`(module (func $$type-cond-void-vs-i32 + (block (br_if 0 (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:580 +assert_invalid( + () => instantiate(`(module (func $$type-cond-num-vs-i32 + (block (br_if 0 (i64.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:586 +assert_invalid( + () => instantiate(`(module (func $$type-arg-cond-void-vs-i32 (result i32) + (block (result i32) (br_if 0 (i32.const 0) (nop)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:592 +assert_invalid( + () => instantiate(`(module (func $$type-arg-void-vs-num-nested (result i32) + (block (result i32) (i32.const 0) (block (br_if 1 (i32.const 1)))) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:598 +assert_invalid( + () => instantiate(`(module (func $$type-arg-cond-num-vs-i32 (result i32) + (block (result i32) (br_if 0 (i32.const 0) (i64.const 0)) (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/br_if.wast:605 +assert_invalid( + () => instantiate(`(module + (func $$type-1st-cond-empty-in-then + (block + (i32.const 0) (i32.const 0) + (if (result i32) (then (br_if 0))) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br_if.wast:617 +assert_invalid( + () => instantiate(`(module + (func $$type-2nd-cond-empty-in-then + (block + (i32.const 0) (i32.const 0) + (if (result i32) (then (br_if 0 (i32.const 1)))) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br_if.wast:629 +assert_invalid( + () => instantiate(`(module + (func $$type-1st-cond-empty-in-return + (block (result i32) + (return (br_if 0)) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br_if.wast:640 +assert_invalid( + () => instantiate(`(module + (func $$type-2nd-cond-empty-in-return + (block (result i32) + (return (br_if 0 (i32.const 1))) + ) + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/br_if.wast:653 +assert_invalid( + () => instantiate(`(module (func $$unbound-label (br_if 1 (i32.const 1))))`), + `unknown label`, +); + +// ./test/core/br_if.wast:657 +assert_invalid( + () => instantiate(`(module (func $$unbound-nested-label (block (block (br_if 5 (i32.const 1))))))`), + `unknown label`, +); + +// ./test/core/br_if.wast:661 +assert_invalid( + () => instantiate(`(module (func $$large-label (br_if 0x10000001 (i32.const 1))))`), + `unknown label`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/bulk.wast.js b/js/src/jit-test/tests/wasm/spec/spec/bulk.wast.js new file mode 100644 index 0000000000..b0cefa4a73 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/bulk.wast.js @@ -0,0 +1,499 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/bulk.wast + +// ./test/core/bulk.wast:2 +let $0 = instantiate(`(module + (memory 1) + (data "foo"))`); + +// ./test/core/bulk.wast:6 +let $1 = instantiate(`(module + (table 3 funcref) + (elem funcref (ref.func 0) (ref.null func) (ref.func 1)) + (func) + (func))`); + +// ./test/core/bulk.wast:13 +let $2 = instantiate(`(module + (memory 1) + + (func (export "fill") (param i32 i32 i32) + (memory.fill + (local.get 0) + (local.get 1) + (local.get 2))) + + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))) +)`); + +// ./test/core/bulk.wast:27 +invoke($2, `fill`, [1, 255, 3]); + +// ./test/core/bulk.wast:28 +assert_return(() => invoke($2, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/bulk.wast:29 +assert_return(() => invoke($2, `load8_u`, [1]), [value("i32", 255)]); + +// ./test/core/bulk.wast:30 +assert_return(() => invoke($2, `load8_u`, [2]), [value("i32", 255)]); + +// ./test/core/bulk.wast:31 +assert_return(() => invoke($2, `load8_u`, [3]), [value("i32", 255)]); + +// ./test/core/bulk.wast:32 +assert_return(() => invoke($2, `load8_u`, [4]), [value("i32", 0)]); + +// ./test/core/bulk.wast:35 +invoke($2, `fill`, [0, 48042, 2]); + +// ./test/core/bulk.wast:36 +assert_return(() => invoke($2, `load8_u`, [0]), [value("i32", 170)]); + +// ./test/core/bulk.wast:37 +assert_return(() => invoke($2, `load8_u`, [1]), [value("i32", 170)]); + +// ./test/core/bulk.wast:40 +invoke($2, `fill`, [0, 0, 65536]); + +// ./test/core/bulk.wast:43 +assert_trap(() => invoke($2, `fill`, [65280, 1, 257]), `out of bounds memory access`); + +// ./test/core/bulk.wast:45 +assert_return(() => invoke($2, `load8_u`, [65280]), [value("i32", 0)]); + +// ./test/core/bulk.wast:46 +assert_return(() => invoke($2, `load8_u`, [65535]), [value("i32", 0)]); + +// ./test/core/bulk.wast:49 +invoke($2, `fill`, [65536, 0, 0]); + +// ./test/core/bulk.wast:52 +assert_trap(() => invoke($2, `fill`, [65537, 0, 0]), `out of bounds memory access`); + +// ./test/core/bulk.wast:57 +let $3 = instantiate(`(module + (memory (data "\\aa\\bb\\cc\\dd")) + + (func (export "copy") (param i32 i32 i32) + (memory.copy + (local.get 0) + (local.get 1) + (local.get 2))) + + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))) +)`); + +// ./test/core/bulk.wast:71 +invoke($3, `copy`, [10, 0, 4]); + +// ./test/core/bulk.wast:73 +assert_return(() => invoke($3, `load8_u`, [9]), [value("i32", 0)]); + +// ./test/core/bulk.wast:74 +assert_return(() => invoke($3, `load8_u`, [10]), [value("i32", 170)]); + +// ./test/core/bulk.wast:75 +assert_return(() => invoke($3, `load8_u`, [11]), [value("i32", 187)]); + +// ./test/core/bulk.wast:76 +assert_return(() => invoke($3, `load8_u`, [12]), [value("i32", 204)]); + +// ./test/core/bulk.wast:77 +assert_return(() => invoke($3, `load8_u`, [13]), [value("i32", 221)]); + +// ./test/core/bulk.wast:78 +assert_return(() => invoke($3, `load8_u`, [14]), [value("i32", 0)]); + +// ./test/core/bulk.wast:81 +invoke($3, `copy`, [8, 10, 4]); + +// ./test/core/bulk.wast:82 +assert_return(() => invoke($3, `load8_u`, [8]), [value("i32", 170)]); + +// ./test/core/bulk.wast:83 +assert_return(() => invoke($3, `load8_u`, [9]), [value("i32", 187)]); + +// ./test/core/bulk.wast:84 +assert_return(() => invoke($3, `load8_u`, [10]), [value("i32", 204)]); + +// ./test/core/bulk.wast:85 +assert_return(() => invoke($3, `load8_u`, [11]), [value("i32", 221)]); + +// ./test/core/bulk.wast:86 +assert_return(() => invoke($3, `load8_u`, [12]), [value("i32", 204)]); + +// ./test/core/bulk.wast:87 +assert_return(() => invoke($3, `load8_u`, [13]), [value("i32", 221)]); + +// ./test/core/bulk.wast:90 +invoke($3, `copy`, [10, 7, 6]); + +// ./test/core/bulk.wast:91 +assert_return(() => invoke($3, `load8_u`, [10]), [value("i32", 0)]); + +// ./test/core/bulk.wast:92 +assert_return(() => invoke($3, `load8_u`, [11]), [value("i32", 170)]); + +// ./test/core/bulk.wast:93 +assert_return(() => invoke($3, `load8_u`, [12]), [value("i32", 187)]); + +// ./test/core/bulk.wast:94 +assert_return(() => invoke($3, `load8_u`, [13]), [value("i32", 204)]); + +// ./test/core/bulk.wast:95 +assert_return(() => invoke($3, `load8_u`, [14]), [value("i32", 221)]); + +// ./test/core/bulk.wast:96 +assert_return(() => invoke($3, `load8_u`, [15]), [value("i32", 204)]); + +// ./test/core/bulk.wast:97 +assert_return(() => invoke($3, `load8_u`, [16]), [value("i32", 0)]); + +// ./test/core/bulk.wast:100 +invoke($3, `copy`, [65280, 0, 256]); + +// ./test/core/bulk.wast:101 +invoke($3, `copy`, [65024, 65280, 256]); + +// ./test/core/bulk.wast:104 +invoke($3, `copy`, [65536, 0, 0]); + +// ./test/core/bulk.wast:105 +invoke($3, `copy`, [0, 65536, 0]); + +// ./test/core/bulk.wast:108 +assert_trap(() => invoke($3, `copy`, [65537, 0, 0]), `out of bounds memory access`); + +// ./test/core/bulk.wast:110 +assert_trap(() => invoke($3, `copy`, [0, 65537, 0]), `out of bounds memory access`); + +// ./test/core/bulk.wast:115 +let $4 = instantiate(`(module + (memory 1) + (data "\\aa\\bb\\cc\\dd") + + (func (export "init") (param i32 i32 i32) + (memory.init 0 + (local.get 0) + (local.get 1) + (local.get 2))) + + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))) +)`); + +// ./test/core/bulk.wast:129 +invoke($4, `init`, [0, 1, 2]); + +// ./test/core/bulk.wast:130 +assert_return(() => invoke($4, `load8_u`, [0]), [value("i32", 187)]); + +// ./test/core/bulk.wast:131 +assert_return(() => invoke($4, `load8_u`, [1]), [value("i32", 204)]); + +// ./test/core/bulk.wast:132 +assert_return(() => invoke($4, `load8_u`, [2]), [value("i32", 0)]); + +// ./test/core/bulk.wast:135 +invoke($4, `init`, [65532, 0, 4]); + +// ./test/core/bulk.wast:138 +assert_trap(() => invoke($4, `init`, [65534, 0, 3]), `out of bounds memory access`); + +// ./test/core/bulk.wast:140 +assert_return(() => invoke($4, `load8_u`, [65534]), [value("i32", 204)]); + +// ./test/core/bulk.wast:141 +assert_return(() => invoke($4, `load8_u`, [65535]), [value("i32", 221)]); + +// ./test/core/bulk.wast:144 +invoke($4, `init`, [65536, 0, 0]); + +// ./test/core/bulk.wast:145 +invoke($4, `init`, [0, 4, 0]); + +// ./test/core/bulk.wast:148 +assert_trap(() => invoke($4, `init`, [65537, 0, 0]), `out of bounds memory access`); + +// ./test/core/bulk.wast:150 +assert_trap(() => invoke($4, `init`, [0, 5, 0]), `out of bounds memory access`); + +// ./test/core/bulk.wast:154 +let $5 = instantiate(`(module + (memory 1) + (data $$p "x") + (data $$a (memory 0) (i32.const 0) "x") + + (func (export "drop_passive") (data.drop $$p)) + (func (export "init_passive") (param $$len i32) + (memory.init $$p (i32.const 0) (i32.const 0) (local.get $$len))) + + (func (export "drop_active") (data.drop $$a)) + (func (export "init_active") (param $$len i32) + (memory.init $$a (i32.const 0) (i32.const 0) (local.get $$len))) +)`); + +// ./test/core/bulk.wast:168 +invoke($5, `init_passive`, [1]); + +// ./test/core/bulk.wast:169 +invoke($5, `drop_passive`, []); + +// ./test/core/bulk.wast:170 +invoke($5, `drop_passive`, []); + +// ./test/core/bulk.wast:171 +assert_return(() => invoke($5, `init_passive`, [0]), []); + +// ./test/core/bulk.wast:172 +assert_trap(() => invoke($5, `init_passive`, [1]), `out of bounds memory access`); + +// ./test/core/bulk.wast:173 +invoke($5, `init_passive`, [0]); + +// ./test/core/bulk.wast:174 +invoke($5, `drop_active`, []); + +// ./test/core/bulk.wast:175 +assert_return(() => invoke($5, `init_active`, [0]), []); + +// ./test/core/bulk.wast:176 +assert_trap(() => invoke($5, `init_active`, [1]), `out of bounds memory access`); + +// ./test/core/bulk.wast:177 +invoke($5, `init_active`, [0]); + +// ./test/core/bulk.wast:181 +let $6 = instantiate(`(module + ;; 65 data segments. 64 is the smallest positive number that is encoded + ;; differently as a signed LEB. + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") + (func (data.drop 64)))`); + +// ./test/core/bulk.wast:196 +let $7 = instantiate(`(module (data "goodbye") (func (data.drop 0)))`); + +// ./test/core/bulk.wast:199 +let $8 = instantiate(`(module + (table 3 funcref) + (elem funcref + (ref.func $$zero) (ref.func $$one) (ref.func $$zero) (ref.func $$one)) + + (func $$zero (result i32) (i32.const 0)) + (func $$one (result i32) (i32.const 1)) + + (func (export "init") (param i32 i32 i32) + (table.init 0 + (local.get 0) + (local.get 1) + (local.get 2))) + + (func (export "call") (param i32) (result i32) + (call_indirect (result i32) + (local.get 0))) +)`); + +// ./test/core/bulk.wast:219 +assert_trap(() => invoke($8, `init`, [2, 0, 2]), `out of bounds table access`); + +// ./test/core/bulk.wast:221 +assert_trap(() => invoke($8, `call`, [2]), `uninitialized element 2`); + +// ./test/core/bulk.wast:224 +invoke($8, `init`, [0, 1, 2]); + +// ./test/core/bulk.wast:225 +assert_return(() => invoke($8, `call`, [0]), [value("i32", 1)]); + +// ./test/core/bulk.wast:226 +assert_return(() => invoke($8, `call`, [1]), [value("i32", 0)]); + +// ./test/core/bulk.wast:227 +assert_trap(() => invoke($8, `call`, [2]), `uninitialized element`); + +// ./test/core/bulk.wast:230 +invoke($8, `init`, [1, 2, 2]); + +// ./test/core/bulk.wast:233 +invoke($8, `init`, [3, 0, 0]); + +// ./test/core/bulk.wast:234 +invoke($8, `init`, [0, 4, 0]); + +// ./test/core/bulk.wast:237 +assert_trap(() => invoke($8, `init`, [4, 0, 0]), `out of bounds table access`); + +// ./test/core/bulk.wast:239 +assert_trap(() => invoke($8, `init`, [0, 5, 0]), `out of bounds table access`); + +// ./test/core/bulk.wast:244 +let $9 = instantiate(`(module + (table 1 funcref) + (func $$f) + (elem $$p funcref (ref.func $$f)) + (elem $$a (table 0) (i32.const 0) func $$f) + + (func (export "drop_passive") (elem.drop $$p)) + (func (export "init_passive") (param $$len i32) + (table.init $$p (i32.const 0) (i32.const 0) (local.get $$len)) + ) + + (func (export "drop_active") (elem.drop $$a)) + (func (export "init_active") (param $$len i32) + (table.init $$a (i32.const 0) (i32.const 0) (local.get $$len)) + ) +)`); + +// ./test/core/bulk.wast:261 +invoke($9, `init_passive`, [1]); + +// ./test/core/bulk.wast:262 +invoke($9, `drop_passive`, []); + +// ./test/core/bulk.wast:263 +invoke($9, `drop_passive`, []); + +// ./test/core/bulk.wast:264 +assert_return(() => invoke($9, `init_passive`, [0]), []); + +// ./test/core/bulk.wast:265 +assert_trap(() => invoke($9, `init_passive`, [1]), `out of bounds table access`); + +// ./test/core/bulk.wast:266 +invoke($9, `init_passive`, [0]); + +// ./test/core/bulk.wast:267 +invoke($9, `drop_active`, []); + +// ./test/core/bulk.wast:268 +assert_return(() => invoke($9, `init_active`, [0]), []); + +// ./test/core/bulk.wast:269 +assert_trap(() => invoke($9, `init_active`, [1]), `out of bounds table access`); + +// ./test/core/bulk.wast:270 +invoke($9, `init_active`, [0]); + +// ./test/core/bulk.wast:274 +let $10 = instantiate(`(module + ;; 65 elem segments. 64 is the smallest positive number that is encoded + ;; differently as a signed LEB. + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) + (func (elem.drop 64)))`); + +// ./test/core/bulk.wast:297 +let $11 = instantiate(`(module (elem funcref (ref.func 0)) (func (elem.drop 0)))`); + +// ./test/core/bulk.wast:300 +let $12 = instantiate(`(module + (table 10 funcref) + (elem (i32.const 0) $$zero $$one $$two) + (func $$zero (result i32) (i32.const 0)) + (func $$one (result i32) (i32.const 1)) + (func $$two (result i32) (i32.const 2)) + + (func (export "copy") (param i32 i32 i32) + (table.copy + (local.get 0) + (local.get 1) + (local.get 2))) + + (func (export "call") (param i32) (result i32) + (call_indirect (result i32) + (local.get 0))) +)`); + +// ./test/core/bulk.wast:319 +invoke($12, `copy`, [3, 0, 3]); + +// ./test/core/bulk.wast:321 +assert_return(() => invoke($12, `call`, [3]), [value("i32", 0)]); + +// ./test/core/bulk.wast:322 +assert_return(() => invoke($12, `call`, [4]), [value("i32", 1)]); + +// ./test/core/bulk.wast:323 +assert_return(() => invoke($12, `call`, [5]), [value("i32", 2)]); + +// ./test/core/bulk.wast:326 +invoke($12, `copy`, [0, 1, 3]); + +// ./test/core/bulk.wast:328 +assert_return(() => invoke($12, `call`, [0]), [value("i32", 1)]); + +// ./test/core/bulk.wast:329 +assert_return(() => invoke($12, `call`, [1]), [value("i32", 2)]); + +// ./test/core/bulk.wast:330 +assert_return(() => invoke($12, `call`, [2]), [value("i32", 0)]); + +// ./test/core/bulk.wast:333 +invoke($12, `copy`, [2, 0, 3]); + +// ./test/core/bulk.wast:335 +assert_return(() => invoke($12, `call`, [2]), [value("i32", 1)]); + +// ./test/core/bulk.wast:336 +assert_return(() => invoke($12, `call`, [3]), [value("i32", 2)]); + +// ./test/core/bulk.wast:337 +assert_return(() => invoke($12, `call`, [4]), [value("i32", 0)]); + +// ./test/core/bulk.wast:340 +invoke($12, `copy`, [6, 8, 2]); + +// ./test/core/bulk.wast:341 +invoke($12, `copy`, [8, 6, 2]); + +// ./test/core/bulk.wast:344 +invoke($12, `copy`, [10, 0, 0]); + +// ./test/core/bulk.wast:345 +invoke($12, `copy`, [0, 10, 0]); + +// ./test/core/bulk.wast:348 +assert_trap(() => invoke($12, `copy`, [11, 0, 0]), `out of bounds table access`); + +// ./test/core/bulk.wast:350 +assert_trap(() => invoke($12, `copy`, [0, 11, 0]), `out of bounds table access`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/call.wast.js b/js/src/jit-test/tests/wasm/spec/spec/call.wast.js new file mode 100644 index 0000000000..4595cf4df0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/call.wast.js @@ -0,0 +1,683 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/call.wast + +// ./test/core/call.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definitions + (func $$const-i32 (result i32) (i32.const 0x132)) + (func $$const-i64 (result i64) (i64.const 0x164)) + (func $$const-f32 (result f32) (f32.const 0xf32)) + (func $$const-f64 (result f64) (f64.const 0xf64)) + (func $$const-i32-i64 (result i32 i64) (i32.const 0x132) (i64.const 0x164)) + + (func $$id-i32 (param i32) (result i32) (local.get 0)) + (func $$id-i64 (param i64) (result i64) (local.get 0)) + (func $$id-f32 (param f32) (result f32) (local.get 0)) + (func $$id-f64 (param f64) (result f64) (local.get 0)) + (func $$id-i32-f64 (param i32 f64) (result i32 f64) + (local.get 0) (local.get 1) + ) + + (func $$swap-i32-i32 (param i32 i32) (result i32 i32) + (local.get 1) (local.get 0) + ) + (func $$swap-f32-f64 (param f32 f64) (result f64 f32) + (local.get 1) (local.get 0) + ) + (func $$swap-f64-i32 (param f64 i32) (result i32 f64) + (local.get 1) (local.get 0) + ) + + (func $$f32-i32 (param f32 i32) (result i32) (local.get 1)) + (func $$i32-i64 (param i32 i64) (result i64) (local.get 1)) + (func $$f64-f32 (param f64 f32) (result f32) (local.get 1)) + (func $$i64-f64 (param i64 f64) (result f64) (local.get 1)) + + ;; Typing + + (func (export "type-i32") (result i32) (call $$const-i32)) + (func (export "type-i64") (result i64) (call $$const-i64)) + (func (export "type-f32") (result f32) (call $$const-f32)) + (func (export "type-f64") (result f64) (call $$const-f64)) + (func (export "type-i32-i64") (result i32 i64) (call $$const-i32-i64)) + + (func (export "type-first-i32") (result i32) (call $$id-i32 (i32.const 32))) + (func (export "type-first-i64") (result i64) (call $$id-i64 (i64.const 64))) + (func (export "type-first-f32") (result f32) (call $$id-f32 (f32.const 1.32))) + (func (export "type-first-f64") (result f64) (call $$id-f64 (f64.const 1.64))) + + (func (export "type-second-i32") (result i32) + (call $$f32-i32 (f32.const 32.1) (i32.const 32)) + ) + (func (export "type-second-i64") (result i64) + (call $$i32-i64 (i32.const 32) (i64.const 64)) + ) + (func (export "type-second-f32") (result f32) + (call $$f64-f32 (f64.const 64) (f32.const 32)) + ) + (func (export "type-second-f64") (result f64) + (call $$i64-f64 (i64.const 64) (f64.const 64.1)) + ) + + (func (export "type-all-i32-f64") (result i32 f64) + (call $$id-i32-f64 (i32.const 32) (f64.const 1.64)) + ) + (func (export "type-all-i32-i32") (result i32 i32) + (call $$swap-i32-i32 (i32.const 1) (i32.const 2)) + ) + (func (export "type-all-f32-f64") (result f64 f32) + (call $$swap-f32-f64 (f32.const 1) (f64.const 2)) + ) + (func (export "type-all-f64-i32") (result i32 f64) + (call $$swap-f64-i32 (f64.const 1) (i32.const 2)) + ) + + ;; Composition + + (func (export "as-binary-all-operands") (result i32) + (i32.add (call $$swap-i32-i32 (i32.const 3) (i32.const 4))) + ) + + (func (export "as-mixed-operands") (result i32) + (call $$swap-i32-i32 (i32.const 3) (i32.const 4)) + (i32.const 5) + (i32.add) + (i32.mul) + ) + + (func (export "as-call-all-operands") (result i32 i32) + (call $$swap-i32-i32 (call $$swap-i32-i32 (i32.const 3) (i32.const 4))) + ) + + ;; Recursion + + (func $$fac (export "fac") (param i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (i64.const 1)) + (else + (i64.mul + (local.get 0) + (call $$fac (i64.sub (local.get 0) (i64.const 1))) + ) + ) + ) + ) + + (func $$fac-acc (export "fac-acc") (param i64 i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (call $$fac-acc + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + ) + ) + ) + ) + + (func $$fib (export "fib") (param i64) (result i64) + (if (result i64) (i64.le_u (local.get 0) (i64.const 1)) + (then (i64.const 1)) + (else + (i64.add + (call $$fib (i64.sub (local.get 0) (i64.const 2))) + (call $$fib (i64.sub (local.get 0) (i64.const 1))) + ) + ) + ) + ) + + (func $$even (export "even") (param i64) (result i32) + (if (result i32) (i64.eqz (local.get 0)) + (then (i32.const 44)) + (else (call $$odd (i64.sub (local.get 0) (i64.const 1)))) + ) + ) + (func $$odd (export "odd") (param i64) (result i32) + (if (result i32) (i64.eqz (local.get 0)) + (then (i32.const 99)) + (else (call $$even (i64.sub (local.get 0) (i64.const 1)))) + ) + ) + + ;; Stack exhaustion + + ;; Implementations are required to have every call consume some abstract + ;; resource towards exhausting some abstract finite limit, such that + ;; infinitely recursive test cases reliably trap in finite time. This is + ;; because otherwise applications could come to depend on it on those + ;; implementations and be incompatible with implementations that don't do + ;; it (or don't do it under the same circumstances). + + (func $$runaway (export "runaway") (call $$runaway)) + + (func $$mutual-runaway1 (export "mutual-runaway") (call $$mutual-runaway2)) + (func $$mutual-runaway2 (call $$mutual-runaway1)) + + ;; As parameter of control constructs and instructions + + (memory 1) + + (func (export "as-select-first") (result i32) + (select (call $$const-i32) (i32.const 2) (i32.const 3)) + ) + (func (export "as-select-mid") (result i32) + (select (i32.const 2) (call $$const-i32) (i32.const 3)) + ) + (func (export "as-select-last") (result i32) + (select (i32.const 2) (i32.const 3) (call $$const-i32)) + ) + + (func (export "as-if-condition") (result i32) + (if (result i32) (call $$const-i32) (then (i32.const 1)) (else (i32.const 2))) + ) + + (func (export "as-br_if-first") (result i32) + (block (result i32) (br_if 0 (call $$const-i32) (i32.const 2))) + ) + (func (export "as-br_if-last") (result i32) + (block (result i32) (br_if 0 (i32.const 2) (call $$const-i32))) + ) + + (func (export "as-br_table-first") (result i32) + (block (result i32) (call $$const-i32) (i32.const 2) (br_table 0 0)) + ) + (func (export "as-br_table-last") (result i32) + (block (result i32) (i32.const 2) (call $$const-i32) (br_table 0 0)) + ) + + (func $$func (param i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (call_indirect (type $$check) + (call $$const-i32) (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (call $$const-i32) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 1) (i32.const 2) (call $$const-i32) + ) + ) + ) + + (func (export "as-store-first") + (call $$const-i32) (i32.const 1) (i32.store) + ) + (func (export "as-store-last") + (i32.const 10) (call $$const-i32) (i32.store) + ) + + (func (export "as-memory.grow-value") (result i32) + (memory.grow (call $$const-i32)) + ) + (func (export "as-return-value") (result i32) + (call $$const-i32) (return) + ) + (func (export "as-drop-operand") + (call $$const-i32) (drop) + ) + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (call $$const-i32))) + ) + (func (export "as-local.set-value") (result i32) + (local i32) (local.set 0 (call $$const-i32)) (local.get 0) + ) + (func (export "as-local.tee-value") (result i32) + (local i32) (local.tee 0 (call $$const-i32)) + ) + (global $$a (mut i32) (i32.const 10)) + (func (export "as-global.set-value") (result i32) + (global.set $$a (call $$const-i32)) + (global.get $$a) + ) + (func (export "as-load-operand") (result i32) + (i32.load (call $$const-i32)) + ) + + (func $$dummy (param i32) (result i32) (local.get 0)) + (func $$du (param f32) (result f32) (local.get 0)) + (func (export "as-unary-operand") (result f32) + (block (result f32) (f32.sqrt (call $$du (f32.const 0x0p+0)))) + ) + + (func (export "as-binary-left") (result i32) + (block (result i32) (i32.add (call $$dummy (i32.const 1)) (i32.const 10))) + ) + (func (export "as-binary-right") (result i32) + (block (result i32) (i32.sub (i32.const 10) (call $$dummy (i32.const 1)))) + ) + + (func (export "as-test-operand") (result i32) + (block (result i32) (i32.eqz (call $$dummy (i32.const 1)))) + ) + + (func (export "as-compare-left") (result i32) + (block (result i32) (i32.le_u (call $$dummy (i32.const 1)) (i32.const 10))) + ) + (func (export "as-compare-right") (result i32) + (block (result i32) (i32.ne (i32.const 10) (call $$dummy (i32.const 1)))) + ) + + (func (export "as-convert-operand") (result i64) + (block (result i64) (i64.extend_i32_s (call $$dummy (i32.const 1)))) + ) + + ;; Test correct argument passing + + (func $$return-from-long-argument-list-helper (param f32 i32 i32 f64 f32 f32 f32 f64 f32 i32 i32 f32 f64 i64 i64 i32 i64 i64 f32 i64 i64 i64 i32 f32 f32 f32 f64 f32 i32 i64 f32 f64 f64 f32 i32 f32 f32 f64 i64 f64 i32 i64 f32 f64 i32 i32 i32 i64 f64 i32 i64 i64 f64 f64 f64 f64 f64 f64 i32 f32 f64 f64 i32 i64 f32 f32 f32 i32 f64 f64 f64 f64 f64 f32 i64 i64 i32 i32 i32 f32 f64 i32 i64 f32 f32 f32 i32 i32 f32 f64 i64 f32 f64 f32 f32 f32 i32 f32 i64 i32) (result i32) + (local.get 99) + ) + + (func (export "return-from-long-argument-list") (param i32) (result i32) + (call $$return-from-long-argument-list-helper (f32.const 0) (i32.const 0) (i32.const 0) (f64.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f64.const 0) (f32.const 0) (i32.const 0) (i32.const 0) (f32.const 0) (f64.const 0) (i64.const 0) (i64.const 0) (i32.const 0) (i64.const 0) (i64.const 0) (f32.const 0) (i64.const 0) (i64.const 0) (i64.const 0) (i32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f64.const 0) (f32.const 0) (i32.const 0) (i64.const 0) (f32.const 0) (f64.const 0) (f64.const 0) (f32.const 0) (i32.const 0) (f32.const 0) (f32.const 0) (f64.const 0) (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (f32.const 0) (f64.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (i64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (i32.const 0) (f32.const 0) (f64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (i32.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f32.const 0) (i64.const 0) (i64.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (f32.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (i32.const 0) (i32.const 0) (f32.const 0) (f64.const 0) (i64.const 0) (f32.const 0) (f64.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (i32.const 0) (f32.const 0) (i64.const 0) (local.get 0)) + ) +)`); + +// ./test/core/call.wast:285 +assert_return(() => invoke($0, `type-i32`, []), [value("i32", 306)]); + +// ./test/core/call.wast:286 +assert_return(() => invoke($0, `type-i64`, []), [value("i64", 356n)]); + +// ./test/core/call.wast:287 +assert_return(() => invoke($0, `type-f32`, []), [value("f32", 3890)]); + +// ./test/core/call.wast:288 +assert_return(() => invoke($0, `type-f64`, []), [value("f64", 3940)]); + +// ./test/core/call.wast:289 +assert_return(() => invoke($0, `type-i32-i64`, []), [value("i32", 306), value("i64", 356n)]); + +// ./test/core/call.wast:291 +assert_return(() => invoke($0, `type-first-i32`, []), [value("i32", 32)]); + +// ./test/core/call.wast:292 +assert_return(() => invoke($0, `type-first-i64`, []), [value("i64", 64n)]); + +// ./test/core/call.wast:293 +assert_return(() => invoke($0, `type-first-f32`, []), [value("f32", 1.32)]); + +// ./test/core/call.wast:294 +assert_return(() => invoke($0, `type-first-f64`, []), [value("f64", 1.64)]); + +// ./test/core/call.wast:296 +assert_return(() => invoke($0, `type-second-i32`, []), [value("i32", 32)]); + +// ./test/core/call.wast:297 +assert_return(() => invoke($0, `type-second-i64`, []), [value("i64", 64n)]); + +// ./test/core/call.wast:298 +assert_return(() => invoke($0, `type-second-f32`, []), [value("f32", 32)]); + +// ./test/core/call.wast:299 +assert_return(() => invoke($0, `type-second-f64`, []), [value("f64", 64.1)]); + +// ./test/core/call.wast:301 +assert_return(() => invoke($0, `type-all-i32-f64`, []), [value("i32", 32), value("f64", 1.64)]); + +// ./test/core/call.wast:302 +assert_return(() => invoke($0, `type-all-i32-i32`, []), [value("i32", 2), value("i32", 1)]); + +// ./test/core/call.wast:303 +assert_return(() => invoke($0, `type-all-f32-f64`, []), [value("f64", 2), value("f32", 1)]); + +// ./test/core/call.wast:304 +assert_return(() => invoke($0, `type-all-f64-i32`, []), [value("i32", 2), value("f64", 1)]); + +// ./test/core/call.wast:306 +assert_return(() => invoke($0, `as-binary-all-operands`, []), [value("i32", 7)]); + +// ./test/core/call.wast:307 +assert_return(() => invoke($0, `as-mixed-operands`, []), [value("i32", 32)]); + +// ./test/core/call.wast:308 +assert_return(() => invoke($0, `as-call-all-operands`, []), [value("i32", 3), value("i32", 4)]); + +// ./test/core/call.wast:310 +assert_return(() => invoke($0, `fac`, [0n]), [value("i64", 1n)]); + +// ./test/core/call.wast:311 +assert_return(() => invoke($0, `fac`, [1n]), [value("i64", 1n)]); + +// ./test/core/call.wast:312 +assert_return(() => invoke($0, `fac`, [5n]), [value("i64", 120n)]); + +// ./test/core/call.wast:313 +assert_return(() => invoke($0, `fac`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/call.wast:314 +assert_return(() => invoke($0, `fac-acc`, [0n, 1n]), [value("i64", 1n)]); + +// ./test/core/call.wast:315 +assert_return(() => invoke($0, `fac-acc`, [1n, 1n]), [value("i64", 1n)]); + +// ./test/core/call.wast:316 +assert_return(() => invoke($0, `fac-acc`, [5n, 1n]), [value("i64", 120n)]); + +// ./test/core/call.wast:317 +assert_return(() => invoke($0, `fac-acc`, [25n, 1n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/call.wast:322 +assert_return(() => invoke($0, `fib`, [0n]), [value("i64", 1n)]); + +// ./test/core/call.wast:323 +assert_return(() => invoke($0, `fib`, [1n]), [value("i64", 1n)]); + +// ./test/core/call.wast:324 +assert_return(() => invoke($0, `fib`, [2n]), [value("i64", 2n)]); + +// ./test/core/call.wast:325 +assert_return(() => invoke($0, `fib`, [5n]), [value("i64", 8n)]); + +// ./test/core/call.wast:326 +assert_return(() => invoke($0, `fib`, [20n]), [value("i64", 10946n)]); + +// ./test/core/call.wast:328 +assert_return(() => invoke($0, `even`, [0n]), [value("i32", 44)]); + +// ./test/core/call.wast:329 +assert_return(() => invoke($0, `even`, [1n]), [value("i32", 99)]); + +// ./test/core/call.wast:330 +assert_return(() => invoke($0, `even`, [100n]), [value("i32", 44)]); + +// ./test/core/call.wast:331 +assert_return(() => invoke($0, `even`, [77n]), [value("i32", 99)]); + +// ./test/core/call.wast:332 +assert_return(() => invoke($0, `odd`, [0n]), [value("i32", 99)]); + +// ./test/core/call.wast:333 +assert_return(() => invoke($0, `odd`, [1n]), [value("i32", 44)]); + +// ./test/core/call.wast:334 +assert_return(() => invoke($0, `odd`, [200n]), [value("i32", 99)]); + +// ./test/core/call.wast:335 +assert_return(() => invoke($0, `odd`, [77n]), [value("i32", 44)]); + +// ./test/core/call.wast:337 +assert_exhaustion(() => invoke($0, `runaway`, []), `call stack exhausted`); + +// ./test/core/call.wast:338 +assert_exhaustion(() => invoke($0, `mutual-runaway`, []), `call stack exhausted`); + +// ./test/core/call.wast:340 +assert_return(() => invoke($0, `as-select-first`, []), [value("i32", 306)]); + +// ./test/core/call.wast:341 +assert_return(() => invoke($0, `as-select-mid`, []), [value("i32", 2)]); + +// ./test/core/call.wast:342 +assert_return(() => invoke($0, `as-select-last`, []), [value("i32", 2)]); + +// ./test/core/call.wast:344 +assert_return(() => invoke($0, `as-if-condition`, []), [value("i32", 1)]); + +// ./test/core/call.wast:346 +assert_return(() => invoke($0, `as-br_if-first`, []), [value("i32", 306)]); + +// ./test/core/call.wast:347 +assert_return(() => invoke($0, `as-br_if-last`, []), [value("i32", 2)]); + +// ./test/core/call.wast:349 +assert_return(() => invoke($0, `as-br_table-first`, []), [value("i32", 306)]); + +// ./test/core/call.wast:350 +assert_return(() => invoke($0, `as-br_table-last`, []), [value("i32", 2)]); + +// ./test/core/call.wast:352 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 306)]); + +// ./test/core/call.wast:353 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 2)]); + +// ./test/core/call.wast:354 +assert_trap(() => invoke($0, `as-call_indirect-last`, []), `undefined element`); + +// ./test/core/call.wast:356 +assert_return(() => invoke($0, `as-store-first`, []), []); + +// ./test/core/call.wast:357 +assert_return(() => invoke($0, `as-store-last`, []), []); + +// ./test/core/call.wast:359 +assert_return(() => invoke($0, `as-memory.grow-value`, []), [value("i32", 1)]); + +// ./test/core/call.wast:360 +assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 306)]); + +// ./test/core/call.wast:361 +assert_return(() => invoke($0, `as-drop-operand`, []), []); + +// ./test/core/call.wast:362 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 306)]); + +// ./test/core/call.wast:363 +assert_return(() => invoke($0, `as-local.set-value`, []), [value("i32", 306)]); + +// ./test/core/call.wast:364 +assert_return(() => invoke($0, `as-local.tee-value`, []), [value("i32", 306)]); + +// ./test/core/call.wast:365 +assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 306)]); + +// ./test/core/call.wast:366 +assert_return(() => invoke($0, `as-load-operand`, []), [value("i32", 1)]); + +// ./test/core/call.wast:368 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("f32", 0)]); + +// ./test/core/call.wast:369 +assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 11)]); + +// ./test/core/call.wast:370 +assert_return(() => invoke($0, `as-binary-right`, []), [value("i32", 9)]); + +// ./test/core/call.wast:371 +assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 0)]); + +// ./test/core/call.wast:372 +assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 1)]); + +// ./test/core/call.wast:373 +assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 1)]); + +// ./test/core/call.wast:374 +assert_return(() => invoke($0, `as-convert-operand`, []), [value("i64", 1n)]); + +// ./test/core/call.wast:376 +assert_return(() => invoke($0, `return-from-long-argument-list`, [42]), [value("i32", 42)]); + +// ./test/core/call.wast:380 +assert_invalid( + () => instantiate(`(module + (func $$type-void-vs-num (i32.eqz (call 1))) + (func) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:387 +assert_invalid( + () => instantiate(`(module + (func $$type-num-vs-num (i32.eqz (call 1))) + (func (result i64) (i64.const 1)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:395 +assert_invalid( + () => instantiate(`(module + (func $$arity-0-vs-1 (call 1)) + (func (param i32)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:402 +assert_invalid( + () => instantiate(`(module + (func $$arity-0-vs-2 (call 1)) + (func (param f64 i32)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:409 +assert_invalid( + () => instantiate(`(module + (func $$arity-1-vs-0 (call 1 (i32.const 1))) + (func) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:416 +assert_invalid( + () => instantiate(`(module + (func $$arity-2-vs-0 (call 1 (f64.const 2) (i32.const 1))) + (func) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:424 +assert_invalid( + () => instantiate(`(module + (func $$type-first-void-vs-num (call 1 (nop) (i32.const 1))) + (func (param i32 i32)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:431 +assert_invalid( + () => instantiate(`(module + (func $$type-second-void-vs-num (call 1 (i32.const 1) (nop))) + (func (param i32 i32)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:438 +assert_invalid( + () => instantiate(`(module + (func $$type-first-num-vs-num (call 1 (f64.const 1) (i32.const 1))) + (func (param i32 f64)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:445 +assert_invalid( + () => instantiate(`(module + (func $$type-second-num-vs-num (call 1 (i32.const 1) (f64.const 1))) + (func (param f64 i32)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:453 +assert_invalid( + () => instantiate(`(module + (func $$type-first-empty-in-block + (block (call 1)) + ) + (func (param i32)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:462 +assert_invalid( + () => instantiate(`(module + (func $$type-second-empty-in-block + (block (call 1 (i32.const 0))) + ) + (func (param i32 i32)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:471 +assert_invalid( + () => instantiate(`(module + (func $$type-first-empty-in-loop + (loop (call 1)) + ) + (func (param i32)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:480 +assert_invalid( + () => instantiate(`(module + (func $$type-second-empty-in-loop + (loop (call 1 (i32.const 0))) + ) + (func (param i32 i32)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:489 +assert_invalid( + () => instantiate(`(module + (func $$type-first-empty-in-then + (if (i32.const 0) (then (call 1))) + ) + (func (param i32)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:498 +assert_invalid( + () => instantiate(`(module + (func $$type-second-empty-in-then + (if (i32.const 0) (then (call 1 (i32.const 0)))) + ) + (func (param i32 i32)) + )`), + `type mismatch`, +); + +// ./test/core/call.wast:511 +assert_invalid( + () => instantiate(`(module (func $$unbound-func (call 1)))`), + `unknown function`, +); + +// ./test/core/call.wast:515 +assert_invalid( + () => instantiate(`(module (func $$large-func (call 1012321300)))`), + `unknown function`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/call_indirect.wast.js b/js/src/jit-test/tests/wasm/spec/spec/call_indirect.wast.js new file mode 100644 index 0000000000..9d62c42427 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/call_indirect.wast.js @@ -0,0 +1,1256 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/call_indirect.wast + +// ./test/core/call_indirect.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definitions + (type $$proc (func)) + (type $$out-i32 (func (result i32))) + (type $$out-i64 (func (result i64))) + (type $$out-f32 (func (result f32))) + (type $$out-f64 (func (result f64))) + (type $$out-f64-i32 (func (result f64 i32))) + (type $$over-i32 (func (param i32) (result i32))) + (type $$over-i64 (func (param i64) (result i64))) + (type $$over-f32 (func (param f32) (result f32))) + (type $$over-f64 (func (param f64) (result f64))) + (type $$over-i32-f64 (func (param i32 f64) (result i32 f64))) + (type $$swap-i32-i64 (func (param i32 i64) (result i64 i32))) + (type $$f32-i32 (func (param f32 i32) (result i32))) + (type $$i32-i64 (func (param i32 i64) (result i64))) + (type $$f64-f32 (func (param f64 f32) (result f32))) + (type $$i64-f64 (func (param i64 f64) (result f64))) + (type $$over-i32-duplicate (func (param i32) (result i32))) + (type $$over-i64-duplicate (func (param i64) (result i64))) + (type $$over-f32-duplicate (func (param f32) (result f32))) + (type $$over-f64-duplicate (func (param f64) (result f64))) + + (func $$const-i32 (type $$out-i32) (i32.const 0x132)) + (func $$const-i64 (type $$out-i64) (i64.const 0x164)) + (func $$const-f32 (type $$out-f32) (f32.const 0xf32)) + (func $$const-f64 (type $$out-f64) (f64.const 0xf64)) + (func $$const-f64-i32 (type $$out-f64-i32) (f64.const 0xf64) (i32.const 32)) + + (func $$id-i32 (type $$over-i32) (local.get 0)) + (func $$id-i64 (type $$over-i64) (local.get 0)) + (func $$id-f32 (type $$over-f32) (local.get 0)) + (func $$id-f64 (type $$over-f64) (local.get 0)) + (func $$id-i32-f64 (type $$over-i32-f64) (local.get 0) (local.get 1)) + (func $$swap-i32-i64 (type $$swap-i32-i64) (local.get 1) (local.get 0)) + + (func $$i32-i64 (type $$i32-i64) (local.get 1)) + (func $$i64-f64 (type $$i64-f64) (local.get 1)) + (func $$f32-i32 (type $$f32-i32) (local.get 1)) + (func $$f64-f32 (type $$f64-f32) (local.get 1)) + + (func $$over-i32-duplicate (type $$over-i32-duplicate) (local.get 0)) + (func $$over-i64-duplicate (type $$over-i64-duplicate) (local.get 0)) + (func $$over-f32-duplicate (type $$over-f32-duplicate) (local.get 0)) + (func $$over-f64-duplicate (type $$over-f64-duplicate) (local.get 0)) + + (table funcref + (elem + $$const-i32 $$const-i64 $$const-f32 $$const-f64 ;; 0..3 + $$id-i32 $$id-i64 $$id-f32 $$id-f64 ;; 4..7 + $$f32-i32 $$i32-i64 $$f64-f32 $$i64-f64 ;; 9..11 + $$fac-i64 $$fib-i64 $$even $$odd ;; 12..15 + $$runaway $$mutual-runaway1 $$mutual-runaway2 ;; 16..18 + $$over-i32-duplicate $$over-i64-duplicate ;; 19..20 + $$over-f32-duplicate $$over-f64-duplicate ;; 21..22 + $$fac-i32 $$fac-f32 $$fac-f64 ;; 23..25 + $$fib-i32 $$fib-f32 $$fib-f64 ;; 26..28 + $$const-f64-i32 $$id-i32-f64 $$swap-i32-i64 ;; 29..31 + ) + ) + + ;; Syntax + + (func + (call_indirect (i32.const 0)) + (call_indirect (param i64) (i64.const 0) (i32.const 0)) + (call_indirect (param i64) (param) (param f64 i32 i64) + (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (i32.const 0) + ) + (call_indirect (result) (i32.const 0)) + (drop (i32.eqz (call_indirect (result i32) (i32.const 0)))) + (drop (i32.eqz (call_indirect (result i32) (result) (i32.const 0)))) + (drop (i32.eqz + (call_indirect (param i64) (result i32) (i64.const 0) (i32.const 0)) + )) + (drop (i32.eqz + (call_indirect + (param) (param i64) (param) (param f64 i32 i64) (param) (param) + (result) (result i32) (result) (result) + (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (i32.const 0) + ) + )) + (drop (i64.eqz + (call_indirect (type $$over-i64) (param i64) (result i64) + (i64.const 0) (i32.const 0) + ) + )) + ) + + ;; Typing + + (func (export "type-i32") (result i32) + (call_indirect (type $$out-i32) (i32.const 0)) + ) + (func (export "type-i64") (result i64) + (call_indirect (type $$out-i64) (i32.const 1)) + ) + (func (export "type-f32") (result f32) + (call_indirect (type $$out-f32) (i32.const 2)) + ) + (func (export "type-f64") (result f64) + (call_indirect (type $$out-f64) (i32.const 3)) + ) + (func (export "type-f64-i32") (result f64 i32) + (call_indirect (type $$out-f64-i32) (i32.const 29)) + ) + + (func (export "type-index") (result i64) + (call_indirect (type $$over-i64) (i64.const 100) (i32.const 5)) + ) + + (func (export "type-first-i32") (result i32) + (call_indirect (type $$over-i32) (i32.const 32) (i32.const 4)) + ) + (func (export "type-first-i64") (result i64) + (call_indirect (type $$over-i64) (i64.const 64) (i32.const 5)) + ) + (func (export "type-first-f32") (result f32) + (call_indirect (type $$over-f32) (f32.const 1.32) (i32.const 6)) + ) + (func (export "type-first-f64") (result f64) + (call_indirect (type $$over-f64) (f64.const 1.64) (i32.const 7)) + ) + + (func (export "type-second-i32") (result i32) + (call_indirect (type $$f32-i32) (f32.const 32.1) (i32.const 32) (i32.const 8)) + ) + (func (export "type-second-i64") (result i64) + (call_indirect (type $$i32-i64) (i32.const 32) (i64.const 64) (i32.const 9)) + ) + (func (export "type-second-f32") (result f32) + (call_indirect (type $$f64-f32) (f64.const 64) (f32.const 32) (i32.const 10)) + ) + (func (export "type-second-f64") (result f64) + (call_indirect (type $$i64-f64) (i64.const 64) (f64.const 64.1) (i32.const 11)) + ) + + (func (export "type-all-f64-i32") (result f64 i32) + (call_indirect (type $$out-f64-i32) (i32.const 29)) + ) + (func (export "type-all-i32-f64") (result i32 f64) + (call_indirect (type $$over-i32-f64) + (i32.const 1) (f64.const 2) (i32.const 30) + ) + ) + (func (export "type-all-i32-i64") (result i64 i32) + (call_indirect (type $$swap-i32-i64) + (i32.const 1) (i64.const 2) (i32.const 31) + ) + ) + + ;; Dispatch + + (func (export "dispatch") (param i32 i64) (result i64) + (call_indirect (type $$over-i64) (local.get 1) (local.get 0)) + ) + + (func (export "dispatch-structural-i64") (param i32) (result i64) + (call_indirect (type $$over-i64-duplicate) (i64.const 9) (local.get 0)) + ) + (func (export "dispatch-structural-i32") (param i32) (result i32) + (call_indirect (type $$over-i32-duplicate) (i32.const 9) (local.get 0)) + ) + (func (export "dispatch-structural-f32") (param i32) (result f32) + (call_indirect (type $$over-f32-duplicate) (f32.const 9.0) (local.get 0)) + ) + (func (export "dispatch-structural-f64") (param i32) (result f64) + (call_indirect (type $$over-f64-duplicate) (f64.const 9.0) (local.get 0)) + ) + + ;; Recursion + + (func $$fac-i64 (export "fac-i64") (type $$over-i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (i64.const 1)) + (else + (i64.mul + (local.get 0) + (call_indirect (type $$over-i64) + (i64.sub (local.get 0) (i64.const 1)) + (i32.const 12) + ) + ) + ) + ) + ) + + (func $$fib-i64 (export "fib-i64") (type $$over-i64) + (if (result i64) (i64.le_u (local.get 0) (i64.const 1)) + (then (i64.const 1)) + (else + (i64.add + (call_indirect (type $$over-i64) + (i64.sub (local.get 0) (i64.const 2)) + (i32.const 13) + ) + (call_indirect (type $$over-i64) + (i64.sub (local.get 0) (i64.const 1)) + (i32.const 13) + ) + ) + ) + ) + ) + + (func $$fac-i32 (export "fac-i32") (type $$over-i32) + (if (result i32) (i32.eqz (local.get 0)) + (then (i32.const 1)) + (else + (i32.mul + (local.get 0) + (call_indirect (type $$over-i32) + (i32.sub (local.get 0) (i32.const 1)) + (i32.const 23) + ) + ) + ) + ) + ) + + (func $$fac-f32 (export "fac-f32") (type $$over-f32) + (if (result f32) (f32.eq (local.get 0) (f32.const 0.0)) + (then (f32.const 1.0)) + (else + (f32.mul + (local.get 0) + (call_indirect (type $$over-f32) + (f32.sub (local.get 0) (f32.const 1.0)) + (i32.const 24) + ) + ) + ) + ) + ) + + (func $$fac-f64 (export "fac-f64") (type $$over-f64) + (if (result f64) (f64.eq (local.get 0) (f64.const 0.0)) + (then (f64.const 1.0)) + (else + (f64.mul + (local.get 0) + (call_indirect (type $$over-f64) + (f64.sub (local.get 0) (f64.const 1.0)) + (i32.const 25) + ) + ) + ) + ) + ) + + (func $$fib-i32 (export "fib-i32") (type $$over-i32) + (if (result i32) (i32.le_u (local.get 0) (i32.const 1)) + (then (i32.const 1)) + (else + (i32.add + (call_indirect (type $$over-i32) + (i32.sub (local.get 0) (i32.const 2)) + (i32.const 26) + ) + (call_indirect (type $$over-i32) + (i32.sub (local.get 0) (i32.const 1)) + (i32.const 26) + ) + ) + ) + ) + ) + + (func $$fib-f32 (export "fib-f32") (type $$over-f32) + (if (result f32) (f32.le (local.get 0) (f32.const 1.0)) + (then (f32.const 1.0)) + (else + (f32.add + (call_indirect (type $$over-f32) + (f32.sub (local.get 0) (f32.const 2.0)) + (i32.const 27) + ) + (call_indirect (type $$over-f32) + (f32.sub (local.get 0) (f32.const 1.0)) + (i32.const 27) + ) + ) + ) + ) + ) + + (func $$fib-f64 (export "fib-f64") (type $$over-f64) + (if (result f64) (f64.le (local.get 0) (f64.const 1.0)) + (then (f64.const 1.0)) + (else + (f64.add + (call_indirect (type $$over-f64) + (f64.sub (local.get 0) (f64.const 2.0)) + (i32.const 28) + ) + (call_indirect (type $$over-f64) + (f64.sub (local.get 0) (f64.const 1.0)) + (i32.const 28) + ) + ) + ) + ) + ) + + (func $$even (export "even") (param i32) (result i32) + (if (result i32) (i32.eqz (local.get 0)) + (then (i32.const 44)) + (else + (call_indirect (type $$over-i32) + (i32.sub (local.get 0) (i32.const 1)) + (i32.const 15) + ) + ) + ) + ) + (func $$odd (export "odd") (param i32) (result i32) + (if (result i32) (i32.eqz (local.get 0)) + (then (i32.const 99)) + (else + (call_indirect (type $$over-i32) + (i32.sub (local.get 0) (i32.const 1)) + (i32.const 14) + ) + ) + ) + ) + + ;; Stack exhaustion + + ;; Implementations are required to have every call consume some abstract + ;; resource towards exhausting some abstract finite limit, such that + ;; infinitely recursive test cases reliably trap in finite time. This is + ;; because otherwise applications could come to depend on it on those + ;; implementations and be incompatible with implementations that don't do + ;; it (or don't do it under the same circumstances). + + (func $$runaway (export "runaway") (call_indirect (type $$proc) (i32.const 16))) + + (func $$mutual-runaway1 (export "mutual-runaway") (call_indirect (type $$proc) (i32.const 18))) + (func $$mutual-runaway2 (call_indirect (type $$proc) (i32.const 17))) + + ;; As parameter of control constructs and instructions + + (memory 1) + + (func (export "as-select-first") (result i32) + (select (call_indirect (type $$out-i32) (i32.const 0)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-select-mid") (result i32) + (select (i32.const 2) (call_indirect (type $$out-i32) (i32.const 0)) (i32.const 3)) + ) + (func (export "as-select-last") (result i32) + (select (i32.const 2) (i32.const 3) (call_indirect (type $$out-i32) (i32.const 0))) + ) + + (func (export "as-if-condition") (result i32) + (if (result i32) (call_indirect (type $$out-i32) (i32.const 0)) (then (i32.const 1)) (else (i32.const 2))) + ) + + (func (export "as-br_if-first") (result i64) + (block (result i64) (br_if 0 (call_indirect (type $$out-i64) (i32.const 1)) (i32.const 2))) + ) + (func (export "as-br_if-last") (result i32) + (block (result i32) (br_if 0 (i32.const 2) (call_indirect (type $$out-i32) (i32.const 0)))) + ) + + (func (export "as-br_table-first") (result f32) + (block (result f32) (call_indirect (type $$out-f32) (i32.const 2)) (i32.const 2) (br_table 0 0)) + ) + (func (export "as-br_table-last") (result i32) + (block (result i32) (i32.const 2) (call_indirect (type $$out-i32) (i32.const 0)) (br_table 0 0)) + ) + + (func (export "as-store-first") + (call_indirect (type $$out-i32) (i32.const 0)) (i32.const 1) (i32.store) + ) + (func (export "as-store-last") + (i32.const 10) (call_indirect (type $$out-f64) (i32.const 3)) (f64.store) + ) + + (func (export "as-memory.grow-value") (result i32) + (memory.grow (call_indirect (type $$out-i32) (i32.const 0))) + ) + (func (export "as-return-value") (result i32) + (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) (return) + ) + (func (export "as-drop-operand") + (call_indirect (type $$over-i64) (i64.const 1) (i32.const 5)) (drop) + ) + (func (export "as-br-value") (result f32) + (block (result f32) (br 0 (call_indirect (type $$over-f32) (f32.const 1) (i32.const 6)))) + ) + (func (export "as-local.set-value") (result f64) + (local f64) (local.set 0 (call_indirect (type $$over-f64) (f64.const 1) (i32.const 7))) (local.get 0) + ) + (func (export "as-local.tee-value") (result f64) + (local f64) (local.tee 0 (call_indirect (type $$over-f64) (f64.const 1) (i32.const 7))) + ) + (global $$a (mut f64) (f64.const 10.0)) + (func (export "as-global.set-value") (result f64) + (global.set $$a (call_indirect (type $$over-f64) (f64.const 1.0) (i32.const 7))) + (global.get $$a) + ) + + (func (export "as-load-operand") (result i32) + (i32.load (call_indirect (type $$out-i32) (i32.const 0))) + ) + + (func (export "as-unary-operand") (result f32) + (block (result f32) + (f32.sqrt + (call_indirect (type $$over-f32) (f32.const 0x0p+0) (i32.const 6)) + ) + ) + ) + + (func (export "as-binary-left") (result i32) + (block (result i32) + (i32.add + (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) + (i32.const 10) + ) + ) + ) + (func (export "as-binary-right") (result i32) + (block (result i32) + (i32.sub + (i32.const 10) + (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) + ) + ) + ) + + (func (export "as-test-operand") (result i32) + (block (result i32) + (i32.eqz + (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) + ) + ) + ) + + (func (export "as-compare-left") (result i32) + (block (result i32) + (i32.le_u + (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) + (i32.const 10) + ) + ) + ) + (func (export "as-compare-right") (result i32) + (block (result i32) + (i32.ne + (i32.const 10) + (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) + ) + ) + ) + + (func (export "as-convert-operand") (result i64) + (block (result i64) + (i64.extend_i32_s + (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) + ) + ) + ) + +)`); + +// ./test/core/call_indirect.wast:471 +assert_return(() => invoke($0, `type-i32`, []), [value("i32", 306)]); + +// ./test/core/call_indirect.wast:472 +assert_return(() => invoke($0, `type-i64`, []), [value("i64", 356n)]); + +// ./test/core/call_indirect.wast:473 +assert_return(() => invoke($0, `type-f32`, []), [value("f32", 3890)]); + +// ./test/core/call_indirect.wast:474 +assert_return(() => invoke($0, `type-f64`, []), [value("f64", 3940)]); + +// ./test/core/call_indirect.wast:475 +assert_return(() => invoke($0, `type-f64-i32`, []), [value("f64", 3940), value("i32", 32)]); + +// ./test/core/call_indirect.wast:477 +assert_return(() => invoke($0, `type-index`, []), [value("i64", 100n)]); + +// ./test/core/call_indirect.wast:479 +assert_return(() => invoke($0, `type-first-i32`, []), [value("i32", 32)]); + +// ./test/core/call_indirect.wast:480 +assert_return(() => invoke($0, `type-first-i64`, []), [value("i64", 64n)]); + +// ./test/core/call_indirect.wast:481 +assert_return(() => invoke($0, `type-first-f32`, []), [value("f32", 1.32)]); + +// ./test/core/call_indirect.wast:482 +assert_return(() => invoke($0, `type-first-f64`, []), [value("f64", 1.64)]); + +// ./test/core/call_indirect.wast:484 +assert_return(() => invoke($0, `type-second-i32`, []), [value("i32", 32)]); + +// ./test/core/call_indirect.wast:485 +assert_return(() => invoke($0, `type-second-i64`, []), [value("i64", 64n)]); + +// ./test/core/call_indirect.wast:486 +assert_return(() => invoke($0, `type-second-f32`, []), [value("f32", 32)]); + +// ./test/core/call_indirect.wast:487 +assert_return(() => invoke($0, `type-second-f64`, []), [value("f64", 64.1)]); + +// ./test/core/call_indirect.wast:489 +assert_return(() => invoke($0, `type-all-f64-i32`, []), [value("f64", 3940), value("i32", 32)]); + +// ./test/core/call_indirect.wast:490 +assert_return(() => invoke($0, `type-all-i32-f64`, []), [value("i32", 1), value("f64", 2)]); + +// ./test/core/call_indirect.wast:491 +assert_return(() => invoke($0, `type-all-i32-i64`, []), [value("i64", 2n), value("i32", 1)]); + +// ./test/core/call_indirect.wast:493 +assert_return(() => invoke($0, `dispatch`, [5, 2n]), [value("i64", 2n)]); + +// ./test/core/call_indirect.wast:494 +assert_return(() => invoke($0, `dispatch`, [5, 5n]), [value("i64", 5n)]); + +// ./test/core/call_indirect.wast:495 +assert_return(() => invoke($0, `dispatch`, [12, 5n]), [value("i64", 120n)]); + +// ./test/core/call_indirect.wast:496 +assert_return(() => invoke($0, `dispatch`, [13, 5n]), [value("i64", 8n)]); + +// ./test/core/call_indirect.wast:497 +assert_return(() => invoke($0, `dispatch`, [20, 2n]), [value("i64", 2n)]); + +// ./test/core/call_indirect.wast:498 +assert_trap(() => invoke($0, `dispatch`, [0, 2n]), `indirect call type mismatch`); + +// ./test/core/call_indirect.wast:499 +assert_trap(() => invoke($0, `dispatch`, [15, 2n]), `indirect call type mismatch`); + +// ./test/core/call_indirect.wast:500 +assert_trap(() => invoke($0, `dispatch`, [32, 2n]), `undefined element`); + +// ./test/core/call_indirect.wast:501 +assert_trap(() => invoke($0, `dispatch`, [-1, 2n]), `undefined element`); + +// ./test/core/call_indirect.wast:502 +assert_trap(() => invoke($0, `dispatch`, [1213432423, 2n]), `undefined element`); + +// ./test/core/call_indirect.wast:504 +assert_return(() => invoke($0, `dispatch-structural-i64`, [5]), [value("i64", 9n)]); + +// ./test/core/call_indirect.wast:505 +assert_return(() => invoke($0, `dispatch-structural-i64`, [12]), [value("i64", 362880n)]); + +// ./test/core/call_indirect.wast:506 +assert_return(() => invoke($0, `dispatch-structural-i64`, [13]), [value("i64", 55n)]); + +// ./test/core/call_indirect.wast:507 +assert_return(() => invoke($0, `dispatch-structural-i64`, [20]), [value("i64", 9n)]); + +// ./test/core/call_indirect.wast:508 +assert_trap(() => invoke($0, `dispatch-structural-i64`, [11]), `indirect call type mismatch`); + +// ./test/core/call_indirect.wast:509 +assert_trap(() => invoke($0, `dispatch-structural-i64`, [22]), `indirect call type mismatch`); + +// ./test/core/call_indirect.wast:511 +assert_return(() => invoke($0, `dispatch-structural-i32`, [4]), [value("i32", 9)]); + +// ./test/core/call_indirect.wast:512 +assert_return(() => invoke($0, `dispatch-structural-i32`, [23]), [value("i32", 362880)]); + +// ./test/core/call_indirect.wast:513 +assert_return(() => invoke($0, `dispatch-structural-i32`, [26]), [value("i32", 55)]); + +// ./test/core/call_indirect.wast:514 +assert_return(() => invoke($0, `dispatch-structural-i32`, [19]), [value("i32", 9)]); + +// ./test/core/call_indirect.wast:515 +assert_trap(() => invoke($0, `dispatch-structural-i32`, [9]), `indirect call type mismatch`); + +// ./test/core/call_indirect.wast:516 +assert_trap(() => invoke($0, `dispatch-structural-i32`, [21]), `indirect call type mismatch`); + +// ./test/core/call_indirect.wast:518 +assert_return(() => invoke($0, `dispatch-structural-f32`, [6]), [value("f32", 9)]); + +// ./test/core/call_indirect.wast:519 +assert_return(() => invoke($0, `dispatch-structural-f32`, [24]), [value("f32", 362880)]); + +// ./test/core/call_indirect.wast:520 +assert_return(() => invoke($0, `dispatch-structural-f32`, [27]), [value("f32", 55)]); + +// ./test/core/call_indirect.wast:521 +assert_return(() => invoke($0, `dispatch-structural-f32`, [21]), [value("f32", 9)]); + +// ./test/core/call_indirect.wast:522 +assert_trap(() => invoke($0, `dispatch-structural-f32`, [8]), `indirect call type mismatch`); + +// ./test/core/call_indirect.wast:523 +assert_trap(() => invoke($0, `dispatch-structural-f32`, [19]), `indirect call type mismatch`); + +// ./test/core/call_indirect.wast:525 +assert_return(() => invoke($0, `dispatch-structural-f64`, [7]), [value("f64", 9)]); + +// ./test/core/call_indirect.wast:526 +assert_return(() => invoke($0, `dispatch-structural-f64`, [25]), [value("f64", 362880)]); + +// ./test/core/call_indirect.wast:527 +assert_return(() => invoke($0, `dispatch-structural-f64`, [28]), [value("f64", 55)]); + +// ./test/core/call_indirect.wast:528 +assert_return(() => invoke($0, `dispatch-structural-f64`, [22]), [value("f64", 9)]); + +// ./test/core/call_indirect.wast:529 +assert_trap(() => invoke($0, `dispatch-structural-f64`, [10]), `indirect call type mismatch`); + +// ./test/core/call_indirect.wast:530 +assert_trap(() => invoke($0, `dispatch-structural-f64`, [18]), `indirect call type mismatch`); + +// ./test/core/call_indirect.wast:532 +assert_return(() => invoke($0, `fac-i64`, [0n]), [value("i64", 1n)]); + +// ./test/core/call_indirect.wast:533 +assert_return(() => invoke($0, `fac-i64`, [1n]), [value("i64", 1n)]); + +// ./test/core/call_indirect.wast:534 +assert_return(() => invoke($0, `fac-i64`, [5n]), [value("i64", 120n)]); + +// ./test/core/call_indirect.wast:535 +assert_return(() => invoke($0, `fac-i64`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/call_indirect.wast:537 +assert_return(() => invoke($0, `fac-i32`, [0]), [value("i32", 1)]); + +// ./test/core/call_indirect.wast:538 +assert_return(() => invoke($0, `fac-i32`, [1]), [value("i32", 1)]); + +// ./test/core/call_indirect.wast:539 +assert_return(() => invoke($0, `fac-i32`, [5]), [value("i32", 120)]); + +// ./test/core/call_indirect.wast:540 +assert_return(() => invoke($0, `fac-i32`, [10]), [value("i32", 3628800)]); + +// ./test/core/call_indirect.wast:542 +assert_return(() => invoke($0, `fac-f32`, [value("f32", 0)]), [value("f32", 1)]); + +// ./test/core/call_indirect.wast:543 +assert_return(() => invoke($0, `fac-f32`, [value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/call_indirect.wast:544 +assert_return(() => invoke($0, `fac-f32`, [value("f32", 5)]), [value("f32", 120)]); + +// ./test/core/call_indirect.wast:545 +assert_return(() => invoke($0, `fac-f32`, [value("f32", 10)]), [value("f32", 3628800)]); + +// ./test/core/call_indirect.wast:547 +assert_return(() => invoke($0, `fac-f64`, [value("f64", 0)]), [value("f64", 1)]); + +// ./test/core/call_indirect.wast:548 +assert_return(() => invoke($0, `fac-f64`, [value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/call_indirect.wast:549 +assert_return(() => invoke($0, `fac-f64`, [value("f64", 5)]), [value("f64", 120)]); + +// ./test/core/call_indirect.wast:550 +assert_return(() => invoke($0, `fac-f64`, [value("f64", 10)]), [value("f64", 3628800)]); + +// ./test/core/call_indirect.wast:552 +assert_return(() => invoke($0, `fib-i64`, [0n]), [value("i64", 1n)]); + +// ./test/core/call_indirect.wast:553 +assert_return(() => invoke($0, `fib-i64`, [1n]), [value("i64", 1n)]); + +// ./test/core/call_indirect.wast:554 +assert_return(() => invoke($0, `fib-i64`, [2n]), [value("i64", 2n)]); + +// ./test/core/call_indirect.wast:555 +assert_return(() => invoke($0, `fib-i64`, [5n]), [value("i64", 8n)]); + +// ./test/core/call_indirect.wast:556 +assert_return(() => invoke($0, `fib-i64`, [20n]), [value("i64", 10946n)]); + +// ./test/core/call_indirect.wast:558 +assert_return(() => invoke($0, `fib-i32`, [0]), [value("i32", 1)]); + +// ./test/core/call_indirect.wast:559 +assert_return(() => invoke($0, `fib-i32`, [1]), [value("i32", 1)]); + +// ./test/core/call_indirect.wast:560 +assert_return(() => invoke($0, `fib-i32`, [2]), [value("i32", 2)]); + +// ./test/core/call_indirect.wast:561 +assert_return(() => invoke($0, `fib-i32`, [5]), [value("i32", 8)]); + +// ./test/core/call_indirect.wast:562 +assert_return(() => invoke($0, `fib-i32`, [20]), [value("i32", 10946)]); + +// ./test/core/call_indirect.wast:564 +assert_return(() => invoke($0, `fib-f32`, [value("f32", 0)]), [value("f32", 1)]); + +// ./test/core/call_indirect.wast:565 +assert_return(() => invoke($0, `fib-f32`, [value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/call_indirect.wast:566 +assert_return(() => invoke($0, `fib-f32`, [value("f32", 2)]), [value("f32", 2)]); + +// ./test/core/call_indirect.wast:567 +assert_return(() => invoke($0, `fib-f32`, [value("f32", 5)]), [value("f32", 8)]); + +// ./test/core/call_indirect.wast:568 +assert_return(() => invoke($0, `fib-f32`, [value("f32", 20)]), [value("f32", 10946)]); + +// ./test/core/call_indirect.wast:570 +assert_return(() => invoke($0, `fib-f64`, [value("f64", 0)]), [value("f64", 1)]); + +// ./test/core/call_indirect.wast:571 +assert_return(() => invoke($0, `fib-f64`, [value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/call_indirect.wast:572 +assert_return(() => invoke($0, `fib-f64`, [value("f64", 2)]), [value("f64", 2)]); + +// ./test/core/call_indirect.wast:573 +assert_return(() => invoke($0, `fib-f64`, [value("f64", 5)]), [value("f64", 8)]); + +// ./test/core/call_indirect.wast:574 +assert_return(() => invoke($0, `fib-f64`, [value("f64", 20)]), [value("f64", 10946)]); + +// ./test/core/call_indirect.wast:576 +assert_return(() => invoke($0, `even`, [0]), [value("i32", 44)]); + +// ./test/core/call_indirect.wast:577 +assert_return(() => invoke($0, `even`, [1]), [value("i32", 99)]); + +// ./test/core/call_indirect.wast:578 +assert_return(() => invoke($0, `even`, [100]), [value("i32", 44)]); + +// ./test/core/call_indirect.wast:579 +assert_return(() => invoke($0, `even`, [77]), [value("i32", 99)]); + +// ./test/core/call_indirect.wast:580 +assert_return(() => invoke($0, `odd`, [0]), [value("i32", 99)]); + +// ./test/core/call_indirect.wast:581 +assert_return(() => invoke($0, `odd`, [1]), [value("i32", 44)]); + +// ./test/core/call_indirect.wast:582 +assert_return(() => invoke($0, `odd`, [200]), [value("i32", 99)]); + +// ./test/core/call_indirect.wast:583 +assert_return(() => invoke($0, `odd`, [77]), [value("i32", 44)]); + +// ./test/core/call_indirect.wast:585 +assert_exhaustion(() => invoke($0, `runaway`, []), `call stack exhausted`); + +// ./test/core/call_indirect.wast:586 +assert_exhaustion(() => invoke($0, `mutual-runaway`, []), `call stack exhausted`); + +// ./test/core/call_indirect.wast:588 +assert_return(() => invoke($0, `as-select-first`, []), [value("i32", 306)]); + +// ./test/core/call_indirect.wast:589 +assert_return(() => invoke($0, `as-select-mid`, []), [value("i32", 2)]); + +// ./test/core/call_indirect.wast:590 +assert_return(() => invoke($0, `as-select-last`, []), [value("i32", 2)]); + +// ./test/core/call_indirect.wast:592 +assert_return(() => invoke($0, `as-if-condition`, []), [value("i32", 1)]); + +// ./test/core/call_indirect.wast:594 +assert_return(() => invoke($0, `as-br_if-first`, []), [value("i64", 356n)]); + +// ./test/core/call_indirect.wast:595 +assert_return(() => invoke($0, `as-br_if-last`, []), [value("i32", 2)]); + +// ./test/core/call_indirect.wast:597 +assert_return(() => invoke($0, `as-br_table-first`, []), [value("f32", 3890)]); + +// ./test/core/call_indirect.wast:598 +assert_return(() => invoke($0, `as-br_table-last`, []), [value("i32", 2)]); + +// ./test/core/call_indirect.wast:600 +assert_return(() => invoke($0, `as-store-first`, []), []); + +// ./test/core/call_indirect.wast:601 +assert_return(() => invoke($0, `as-store-last`, []), []); + +// ./test/core/call_indirect.wast:603 +assert_return(() => invoke($0, `as-memory.grow-value`, []), [value("i32", 1)]); + +// ./test/core/call_indirect.wast:604 +assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 1)]); + +// ./test/core/call_indirect.wast:605 +assert_return(() => invoke($0, `as-drop-operand`, []), []); + +// ./test/core/call_indirect.wast:606 +assert_return(() => invoke($0, `as-br-value`, []), [value("f32", 1)]); + +// ./test/core/call_indirect.wast:607 +assert_return(() => invoke($0, `as-local.set-value`, []), [value("f64", 1)]); + +// ./test/core/call_indirect.wast:608 +assert_return(() => invoke($0, `as-local.tee-value`, []), [value("f64", 1)]); + +// ./test/core/call_indirect.wast:609 +assert_return(() => invoke($0, `as-global.set-value`, []), [value("f64", 1)]); + +// ./test/core/call_indirect.wast:610 +assert_return(() => invoke($0, `as-load-operand`, []), [value("i32", 1)]); + +// ./test/core/call_indirect.wast:612 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("f32", 0)]); + +// ./test/core/call_indirect.wast:613 +assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 11)]); + +// ./test/core/call_indirect.wast:614 +assert_return(() => invoke($0, `as-binary-right`, []), [value("i32", 9)]); + +// ./test/core/call_indirect.wast:615 +assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 0)]); + +// ./test/core/call_indirect.wast:616 +assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 1)]); + +// ./test/core/call_indirect.wast:617 +assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 1)]); + +// ./test/core/call_indirect.wast:618 +assert_return(() => invoke($0, `as-convert-operand`, []), [value("i64", 1n)]); + +// ./test/core/call_indirect.wast:623 +let $1 = instantiate(`(module + (type $$ii-i (func (param i32 i32) (result i32))) + + (table $$t1 funcref (elem $$f $$g)) + (table $$t2 funcref (elem $$h $$i $$j)) + (table $$t3 4 funcref) + (elem (table $$t3) (i32.const 0) func $$g $$h) + (elem (table $$t3) (i32.const 3) func $$z) + + (func $$f (type $$ii-i) (i32.add (local.get 0) (local.get 1))) + (func $$g (type $$ii-i) (i32.sub (local.get 0) (local.get 1))) + (func $$h (type $$ii-i) (i32.mul (local.get 0) (local.get 1))) + (func $$i (type $$ii-i) (i32.div_u (local.get 0) (local.get 1))) + (func $$j (type $$ii-i) (i32.rem_u (local.get 0) (local.get 1))) + (func $$z) + + (func (export "call-1") (param i32 i32 i32) (result i32) + (call_indirect $$t1 (type $$ii-i) (local.get 0) (local.get 1) (local.get 2)) + ) + (func (export "call-2") (param i32 i32 i32) (result i32) + (call_indirect $$t2 (type $$ii-i) (local.get 0) (local.get 1) (local.get 2)) + ) + (func (export "call-3") (param i32 i32 i32) (result i32) + (call_indirect $$t3 (type $$ii-i) (local.get 0) (local.get 1) (local.get 2)) + ) +)`); + +// ./test/core/call_indirect.wast:650 +assert_return(() => invoke($1, `call-1`, [2, 3, 0]), [value("i32", 5)]); + +// ./test/core/call_indirect.wast:651 +assert_return(() => invoke($1, `call-1`, [2, 3, 1]), [value("i32", -1)]); + +// ./test/core/call_indirect.wast:652 +assert_trap(() => invoke($1, `call-1`, [2, 3, 2]), `undefined element`); + +// ./test/core/call_indirect.wast:654 +assert_return(() => invoke($1, `call-2`, [2, 3, 0]), [value("i32", 6)]); + +// ./test/core/call_indirect.wast:655 +assert_return(() => invoke($1, `call-2`, [2, 3, 1]), [value("i32", 0)]); + +// ./test/core/call_indirect.wast:656 +assert_return(() => invoke($1, `call-2`, [2, 3, 2]), [value("i32", 2)]); + +// ./test/core/call_indirect.wast:657 +assert_trap(() => invoke($1, `call-2`, [2, 3, 3]), `undefined element`); + +// ./test/core/call_indirect.wast:659 +assert_return(() => invoke($1, `call-3`, [2, 3, 0]), [value("i32", -1)]); + +// ./test/core/call_indirect.wast:660 +assert_return(() => invoke($1, `call-3`, [2, 3, 1]), [value("i32", 6)]); + +// ./test/core/call_indirect.wast:661 +assert_trap(() => invoke($1, `call-3`, [2, 3, 2]), `uninitialized element`); + +// ./test/core/call_indirect.wast:662 +assert_trap(() => invoke($1, `call-3`, [2, 3, 3]), `indirect call type mismatch`); + +// ./test/core/call_indirect.wast:663 +assert_trap(() => invoke($1, `call-3`, [2, 3, 4]), `undefined element`); + +// ./test/core/call_indirect.wast:668 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (type $$sig) (result i32) (param i32) (i32.const 0) (i32.const 0) ) ) `), + `unexpected token`, +); + +// ./test/core/call_indirect.wast:680 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (param i32) (type $$sig) (result i32) (i32.const 0) (i32.const 0) ) ) `), + `unexpected token`, +); + +// ./test/core/call_indirect.wast:692 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (param i32) (result i32) (type $$sig) (i32.const 0) (i32.const 0) ) ) `), + `unexpected token`, +); + +// ./test/core/call_indirect.wast:704 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (result i32) (type $$sig) (param i32) (i32.const 0) (i32.const 0) ) ) `), + `unexpected token`, +); + +// ./test/core/call_indirect.wast:716 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (result i32) (param i32) (type $$sig) (i32.const 0) (i32.const 0) ) ) `), + `unexpected token`, +); + +// ./test/core/call_indirect.wast:728 +assert_malformed( + () => instantiate(`(table 0 funcref) (func (result i32) (call_indirect (result i32) (param i32) (i32.const 0) (i32.const 0)) ) `), + `unexpected token`, +); + +// ./test/core/call_indirect.wast:738 +assert_malformed( + () => instantiate(`(table 0 funcref) (func (call_indirect (param $$x i32) (i32.const 0) (i32.const 0))) `), + `unexpected token`, +); + +// ./test/core/call_indirect.wast:745 +assert_malformed( + () => instantiate(`(type $$sig (func)) (table 0 funcref) (func (result i32) (call_indirect (type $$sig) (result i32) (i32.const 0)) ) `), + `inline function type`, +); + +// ./test/core/call_indirect.wast:755 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (type $$sig) (result i32) (i32.const 0)) ) `), + `inline function type`, +); + +// ./test/core/call_indirect.wast:765 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (call_indirect (type $$sig) (param i32) (i32.const 0) (i32.const 0)) ) `), + `inline function type`, +); + +// ./test/core/call_indirect.wast:775 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32 i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (type $$sig) (param i32) (result i32) (i32.const 0) (i32.const 0) ) ) `), + `inline function type`, +); + +// ./test/core/call_indirect.wast:790 +assert_invalid( + () => instantiate(`(module + (type (func)) + (func $$no-table (call_indirect (type 0) (i32.const 0))) + )`), + `unknown table`, +); + +// ./test/core/call_indirect.wast:798 +assert_invalid( + () => instantiate(`(module + (type (func)) + (table 0 funcref) + (func $$type-void-vs-num (i32.eqz (call_indirect (type 0) (i32.const 0)))) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:806 +assert_invalid( + () => instantiate(`(module + (type (func (result i64))) + (table 0 funcref) + (func $$type-num-vs-num (i32.eqz (call_indirect (type 0) (i32.const 0)))) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:815 +assert_invalid( + () => instantiate(`(module + (type (func (param i32))) + (table 0 funcref) + (func $$arity-0-vs-1 (call_indirect (type 0) (i32.const 0))) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:823 +assert_invalid( + () => instantiate(`(module + (type (func (param f64 i32))) + (table 0 funcref) + (func $$arity-0-vs-2 (call_indirect (type 0) (i32.const 0))) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:831 +assert_invalid( + () => instantiate(`(module + (type (func)) + (table 0 funcref) + (func $$arity-1-vs-0 (call_indirect (type 0) (i32.const 1) (i32.const 0))) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:839 +assert_invalid( + () => instantiate(`(module + (type (func)) + (table 0 funcref) + (func $$arity-2-vs-0 + (call_indirect (type 0) (f64.const 2) (i32.const 1) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:850 +assert_invalid( + () => instantiate(`(module + (type (func (param i32))) + (table 0 funcref) + (func $$type-func-void-vs-i32 (call_indirect (type 0) (i32.const 1) (nop))) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:858 +assert_invalid( + () => instantiate(`(module + (type (func (param i32))) + (table 0 funcref) + (func $$type-func-num-vs-i32 (call_indirect (type 0) (i32.const 0) (i64.const 1))) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:867 +assert_invalid( + () => instantiate(`(module + (type (func (param i32 i32))) + (table 0 funcref) + (func $$type-first-void-vs-num + (call_indirect (type 0) (nop) (i32.const 1) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:877 +assert_invalid( + () => instantiate(`(module + (type (func (param i32 i32))) + (table 0 funcref) + (func $$type-second-void-vs-num + (call_indirect (type 0) (i32.const 1) (nop) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:887 +assert_invalid( + () => instantiate(`(module + (type (func (param i32 f64))) + (table 0 funcref) + (func $$type-first-num-vs-num + (call_indirect (type 0) (f64.const 1) (i32.const 1) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:897 +assert_invalid( + () => instantiate(`(module + (type (func (param f64 i32))) + (table 0 funcref) + (func $$type-second-num-vs-num + (call_indirect (type 0) (i32.const 1) (f64.const 1) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:908 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32)) + (type $$sig (func (param i32))) + (table funcref (elem $$f)) + (func $$type-first-empty-in-block + (block + (call_indirect (type $$sig) (i32.const 0)) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:921 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32 i32)) + (type $$sig (func (param i32 i32))) + (table funcref (elem $$f)) + (func $$type-second-empty-in-block + (block + (call_indirect (type $$sig) (i32.const 0) (i32.const 0)) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:934 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32)) + (type $$sig (func (param i32))) + (table funcref (elem $$f)) + (func $$type-first-empty-in-loop + (loop + (call_indirect (type $$sig) (i32.const 0)) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:947 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32 i32)) + (type $$sig (func (param i32 i32))) + (table funcref (elem $$f)) + (func $$type-second-empty-in-loop + (loop + (call_indirect (type $$sig) (i32.const 0) (i32.const 0)) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:960 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32)) + (type $$sig (func (param i32))) + (table funcref (elem $$f)) + (func $$type-first-empty-in-then + (i32.const 0) (i32.const 0) + (if + (then + (call_indirect (type $$sig) (i32.const 0)) + ) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:976 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32 i32)) + (type $$sig (func (param i32 i32))) + (table funcref (elem $$f)) + (func $$type-second-empty-in-then + (i32.const 0) (i32.const 0) + (if + (then + (call_indirect (type $$sig) (i32.const 0) (i32.const 0)) + ) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/call_indirect.wast:996 +assert_invalid( + () => instantiate(`(module + (table 0 funcref) + (func $$unbound-type (call_indirect (type 1) (i32.const 0))) + )`), + `unknown type`, +); + +// ./test/core/call_indirect.wast:1003 +assert_invalid( + () => instantiate(`(module + (table 0 funcref) + (func $$large-type (call_indirect (type 1012321300) (i32.const 0))) + )`), + `unknown type`, +); + +// ./test/core/call_indirect.wast:1014 +assert_invalid( + () => instantiate(`(module (table funcref (elem 0 0)))`), + `unknown function`, +); + +// ./test/core/call_indirect.wast:1024 +let $2 = instantiate(`(module + (table 1 funcref) + (func unreachable call_indirect) + (func unreachable call_indirect nop) + (func unreachable call_indirect call_indirect) + (func unreachable call_indirect (call_indirect)) + (func unreachable call_indirect call_indirect call_indirect) + (func unreachable call_indirect (result)) + (func unreachable call_indirect (result) (result)) + (func unreachable call_indirect (result) (result) call_indirect) + (func unreachable call_indirect (result) (result) call_indirect (result)) + (func (result i32) unreachable call_indirect select) + (func (result i32) unreachable call_indirect select call_indirect) +)`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/comments.wast.js b/js/src/jit-test/tests/wasm/spec/spec/comments.wast.js new file mode 100644 index 0000000000..8eee0e3cc2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/comments.wast.js @@ -0,0 +1,34 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/comments.wast + +// ./test/core/comments.wast:10:0 +let $0 = instantiate(`(module;;comment +)`); + +// ./test/core/comments.wast:56:11 +let $1 = instantiate(`(module(;comment;) +(;comment;))`); + +// ./test/core/comments.wast:66 +let $2 = instantiate(`(module + (;comment(;nested(;further;)nested;)comment;) +)`); + +// ./test/core/comments.wast:75 +let $3 = instantiate(`(module + (;comment;;comment(;nested;)comment;) +)`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/const.wast.js b/js/src/jit-test/tests/wasm/spec/spec/const.wast.js new file mode 100644 index 0000000000..c8c02698da --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/const.wast.js @@ -0,0 +1,3114 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/const.wast + +// ./test/core/const.wast:5 +let $0 = instantiate(`(module (func (i32.const 0_123_456_789) drop))`); + +// ./test/core/const.wast:6 +let $1 = instantiate(`(module (func (i32.const 0x0_9acf_fBDF) drop))`); + +// ./test/core/const.wast:7 +assert_malformed(() => instantiate(`(func (i32.const) drop) `), `unexpected token`); + +// ./test/core/const.wast:11 +assert_malformed(() => instantiate(`(func (i32.const 0x) drop) `), `unknown operator`); + +// ./test/core/const.wast:15 +assert_malformed(() => instantiate(`(func (i32.const 1x) drop) `), `unknown operator`); + +// ./test/core/const.wast:19 +assert_malformed(() => instantiate(`(func (i32.const 0xg) drop) `), `unknown operator`); + +// ./test/core/const.wast:24 +let $2 = instantiate(`(module (func (i64.const 0_123_456_789) drop))`); + +// ./test/core/const.wast:25 +let $3 = instantiate(`(module (func (i64.const 0x0125_6789_ADEF_bcef) drop))`); + +// ./test/core/const.wast:26 +assert_malformed(() => instantiate(`(func (i64.const) drop) `), `unexpected token`); + +// ./test/core/const.wast:30 +assert_malformed(() => instantiate(`(func (i64.const 0x) drop) `), `unknown operator`); + +// ./test/core/const.wast:34 +assert_malformed(() => instantiate(`(func (i64.const 1x) drop) `), `unknown operator`); + +// ./test/core/const.wast:38 +assert_malformed(() => instantiate(`(func (i64.const 0xg) drop) `), `unknown operator`); + +// ./test/core/const.wast:43 +let $4 = instantiate(`(module (func (f32.const 0123456789) drop))`); + +// ./test/core/const.wast:44 +let $5 = instantiate(`(module (func (f32.const 0123456789e019) drop))`); + +// ./test/core/const.wast:45 +let $6 = instantiate(`(module (func (f32.const 0123456789e+019) drop))`); + +// ./test/core/const.wast:46 +let $7 = instantiate(`(module (func (f32.const 0123456789e-019) drop))`); + +// ./test/core/const.wast:47 +let $8 = instantiate(`(module (func (f32.const 0123456789.) drop))`); + +// ./test/core/const.wast:48 +let $9 = instantiate(`(module (func (f32.const 0123456789.e019) drop))`); + +// ./test/core/const.wast:49 +let $10 = instantiate(`(module (func (f32.const 0123456789.e+019) drop))`); + +// ./test/core/const.wast:50 +let $11 = instantiate(`(module (func (f32.const 0123456789.e-019) drop))`); + +// ./test/core/const.wast:51 +let $12 = instantiate(`(module (func (f32.const 0123456789.0123456789) drop))`); + +// ./test/core/const.wast:52 +let $13 = instantiate(`(module (func (f32.const 0123456789.0123456789e019) drop))`); + +// ./test/core/const.wast:53 +let $14 = instantiate(`(module (func (f32.const 0123456789.0123456789e+019) drop))`); + +// ./test/core/const.wast:54 +let $15 = instantiate(`(module (func (f32.const 0123456789.0123456789e-019) drop))`); + +// ./test/core/const.wast:55 +let $16 = instantiate(`(module (func (f32.const 0x0123456789ABCDEF) drop))`); + +// ./test/core/const.wast:56 +let $17 = instantiate(`(module (func (f32.const 0x0123456789ABCDEFp019) drop))`); + +// ./test/core/const.wast:57 +let $18 = instantiate(`(module (func (f32.const 0x0123456789ABCDEFp+019) drop))`); + +// ./test/core/const.wast:58 +let $19 = instantiate(`(module (func (f32.const 0x0123456789ABCDEFp-019) drop))`); + +// ./test/core/const.wast:59 +let $20 = instantiate(`(module (func (f32.const 0x0123456789ABCDEF.) drop))`); + +// ./test/core/const.wast:60 +let $21 = instantiate(`(module (func (f32.const 0x0123456789ABCDEF.p019) drop))`); + +// ./test/core/const.wast:61 +let $22 = instantiate(`(module (func (f32.const 0x0123456789ABCDEF.p+019) drop))`); + +// ./test/core/const.wast:62 +let $23 = instantiate(`(module (func (f32.const 0x0123456789ABCDEF.p-019) drop))`); + +// ./test/core/const.wast:63 +let $24 = instantiate(`(module (func (f32.const 0x0123456789ABCDEF.019aF) drop))`); + +// ./test/core/const.wast:64 +let $25 = instantiate(`(module (func (f32.const 0x0123456789ABCDEF.019aFp019) drop))`); + +// ./test/core/const.wast:65 +let $26 = instantiate(`(module (func (f32.const 0x0123456789ABCDEF.019aFp+019) drop))`); + +// ./test/core/const.wast:66 +let $27 = instantiate(`(module (func (f32.const 0x0123456789ABCDEF.019aFp-019) drop))`); + +// ./test/core/const.wast:67 +assert_malformed(() => instantiate(`(func (f32.const) drop) `), `unexpected token`); + +// ./test/core/const.wast:71 +assert_malformed(() => instantiate(`(func (f32.const .0) drop) `), `unknown operator`); + +// ./test/core/const.wast:75 +assert_malformed(() => instantiate(`(func (f32.const .0e0) drop) `), `unknown operator`); + +// ./test/core/const.wast:79 +assert_malformed(() => instantiate(`(func (f32.const 0e) drop) `), `unknown operator`); + +// ./test/core/const.wast:83 +assert_malformed(() => instantiate(`(func (f32.const 0e+) drop) `), `unknown operator`); + +// ./test/core/const.wast:87 +assert_malformed(() => instantiate(`(func (f32.const 0.0e) drop) `), `unknown operator`); + +// ./test/core/const.wast:91 +assert_malformed(() => instantiate(`(func (f32.const 0.0e-) drop) `), `unknown operator`); + +// ./test/core/const.wast:95 +assert_malformed(() => instantiate(`(func (f32.const 0x) drop) `), `unknown operator`); + +// ./test/core/const.wast:99 +assert_malformed(() => instantiate(`(func (f32.const 1x) drop) `), `unknown operator`); + +// ./test/core/const.wast:103 +assert_malformed(() => instantiate(`(func (f32.const 0xg) drop) `), `unknown operator`); + +// ./test/core/const.wast:107 +assert_malformed(() => instantiate(`(func (f32.const 0x.) drop) `), `unknown operator`); + +// ./test/core/const.wast:111 +assert_malformed(() => instantiate(`(func (f32.const 0x0.g) drop) `), `unknown operator`); + +// ./test/core/const.wast:115 +assert_malformed(() => instantiate(`(func (f32.const 0x0p) drop) `), `unknown operator`); + +// ./test/core/const.wast:119 +assert_malformed(() => instantiate(`(func (f32.const 0x0p+) drop) `), `unknown operator`); + +// ./test/core/const.wast:123 +assert_malformed(() => instantiate(`(func (f32.const 0x0p-) drop) `), `unknown operator`); + +// ./test/core/const.wast:127 +assert_malformed(() => instantiate(`(func (f32.const 0x0.0p) drop) `), `unknown operator`); + +// ./test/core/const.wast:131 +assert_malformed( + () => instantiate(`(func (f32.const 0x0.0p+) drop) `), + `unknown operator`, +); + +// ./test/core/const.wast:135 +assert_malformed( + () => instantiate(`(func (f32.const 0x0.0p-) drop) `), + `unknown operator`, +); + +// ./test/core/const.wast:139 +assert_malformed(() => instantiate(`(func (f32.const 0x0pA) drop) `), `unknown operator`); + +// ./test/core/const.wast:145 +let $28 = instantiate(`(module (func (f64.const 0123456789) drop))`); + +// ./test/core/const.wast:146 +let $29 = instantiate(`(module (func (f64.const 0123456789e019) drop))`); + +// ./test/core/const.wast:147 +let $30 = instantiate(`(module (func (f64.const 0123456789e+019) drop))`); + +// ./test/core/const.wast:148 +let $31 = instantiate(`(module (func (f64.const 0123456789e-019) drop))`); + +// ./test/core/const.wast:149 +let $32 = instantiate(`(module (func (f64.const 0123456789.) drop))`); + +// ./test/core/const.wast:150 +let $33 = instantiate(`(module (func (f64.const 0123456789.e019) drop))`); + +// ./test/core/const.wast:151 +let $34 = instantiate(`(module (func (f64.const 0123456789.e+019) drop))`); + +// ./test/core/const.wast:152 +let $35 = instantiate(`(module (func (f64.const 0123456789.e-019) drop))`); + +// ./test/core/const.wast:153 +let $36 = instantiate(`(module (func (f64.const 0123456789.0123456789) drop))`); + +// ./test/core/const.wast:154 +let $37 = instantiate(`(module (func (f64.const 0123456789.0123456789e019) drop))`); + +// ./test/core/const.wast:155 +let $38 = instantiate(`(module (func (f64.const 0123456789.0123456789e+019) drop))`); + +// ./test/core/const.wast:156 +let $39 = instantiate(`(module (func (f64.const 0123456789.0123456789e-019) drop))`); + +// ./test/core/const.wast:157 +let $40 = instantiate(`(module (func (f64.const 0_1_2_3_4_5_6_7_8_9) drop))`); + +// ./test/core/const.wast:158 +let $41 = instantiate(`(module (func (f64.const 0_1_2_3_4_5_6_7_8_9.) drop))`); + +// ./test/core/const.wast:159 +let $42 = instantiate(`(module (func (f64.const 0_1_2_3_4_5_6_7_8_9.0_1_2_3_4_5_6_7_8_9) drop))`); + +// ./test/core/const.wast:160 +let $43 = instantiate(`(module (func (f64.const 0_1_2_3_4_5_6_7_8_9e+0_1_9) drop))`); + +// ./test/core/const.wast:161 +let $44 = instantiate(`(module (func (f64.const 0_1_2_3_4_5_6_7_8_9.e+0_1_9) drop))`); + +// ./test/core/const.wast:162 +let $45 = instantiate(`(module (func (f64.const 0_1_2_3_4_5_6_7_8_9.0_1_2_3_4_5_6_7_8_9e0_1_9) drop))`); + +// ./test/core/const.wast:164 +let $46 = instantiate(`(module (func (f64.const 0x0123456789ABCDEFabcdef) drop))`); + +// ./test/core/const.wast:165 +let $47 = instantiate(`(module (func (f64.const 0x0123456789ABCDEFabcdefp019) drop))`); + +// ./test/core/const.wast:166 +let $48 = instantiate(`(module (func (f64.const 0x0123456789ABCDEFabcdefp+019) drop))`); + +// ./test/core/const.wast:167 +let $49 = instantiate(`(module (func (f64.const 0x0123456789ABCDEFabcdefp-019) drop))`); + +// ./test/core/const.wast:168 +let $50 = instantiate(`(module (func (f64.const 0x0123456789ABCDEFabcdef.) drop))`); + +// ./test/core/const.wast:169 +let $51 = instantiate(`(module (func (f64.const 0x0123456789ABCDEFabcdef.p019) drop))`); + +// ./test/core/const.wast:170 +let $52 = instantiate(`(module (func (f64.const 0x0123456789ABCDEFabcdef.p+019) drop))`); + +// ./test/core/const.wast:171 +let $53 = instantiate(`(module (func (f64.const 0x0123456789ABCDEFabcdef.p-019) drop))`); + +// ./test/core/const.wast:172 +let $54 = instantiate(`(module (func (f64.const 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdef) drop))`); + +// ./test/core/const.wast:173 +let $55 = instantiate(`(module (func (f64.const 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp019) drop))`); + +// ./test/core/const.wast:174 +let $56 = instantiate(`(module (func (f64.const 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp+019) drop))`); + +// ./test/core/const.wast:175 +let $57 = instantiate(`(module (func (f64.const 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp-019) drop))`); + +// ./test/core/const.wast:176 +let $58 = instantiate(`(module (func (f64.const 0x0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_f) drop))`); + +// ./test/core/const.wast:177 +let $59 = instantiate(`(module (func (f64.const 0x0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_f.) drop))`); + +// ./test/core/const.wast:178 +let $60 = instantiate(`(module (func (f64.const 0x0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_f.0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_f) drop))`); + +// ./test/core/const.wast:179 +let $61 = instantiate(`(module (func (f64.const 0x0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_fp0_1_9) drop))`); + +// ./test/core/const.wast:180 +let $62 = instantiate(`(module (func (f64.const 0x0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_f.p0_1_9) drop))`); + +// ./test/core/const.wast:181 +let $63 = instantiate(`(module (func (f64.const 0x0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_f.0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_fp0_1_9) drop))`); + +// ./test/core/const.wast:184 +assert_malformed(() => instantiate(`(func (f64.const) drop) `), `unexpected token`); + +// ./test/core/const.wast:188 +assert_malformed(() => instantiate(`(func (f64.const .0) drop) `), `unknown operator`); + +// ./test/core/const.wast:192 +assert_malformed(() => instantiate(`(func (f64.const .0e0) drop) `), `unknown operator`); + +// ./test/core/const.wast:196 +assert_malformed(() => instantiate(`(func (f64.const 0e) drop) `), `unknown operator`); + +// ./test/core/const.wast:200 +assert_malformed(() => instantiate(`(func (f64.const 0e+) drop) `), `unknown operator`); + +// ./test/core/const.wast:204 +assert_malformed(() => instantiate(`(func (f64.const 0.0e) drop) `), `unknown operator`); + +// ./test/core/const.wast:208 +assert_malformed(() => instantiate(`(func (f64.const 0.0e-) drop) `), `unknown operator`); + +// ./test/core/const.wast:212 +assert_malformed(() => instantiate(`(func (f64.const 0x) drop) `), `unknown operator`); + +// ./test/core/const.wast:216 +assert_malformed(() => instantiate(`(func (f64.const 1x) drop) `), `unknown operator`); + +// ./test/core/const.wast:220 +assert_malformed(() => instantiate(`(func (f64.const 0xg) drop) `), `unknown operator`); + +// ./test/core/const.wast:224 +assert_malformed(() => instantiate(`(func (f64.const 0x.) drop) `), `unknown operator`); + +// ./test/core/const.wast:228 +assert_malformed(() => instantiate(`(func (f64.const 0x0.g) drop) `), `unknown operator`); + +// ./test/core/const.wast:232 +assert_malformed(() => instantiate(`(func (f64.const 0x0p) drop) `), `unknown operator`); + +// ./test/core/const.wast:236 +assert_malformed(() => instantiate(`(func (f64.const 0x0p+) drop) `), `unknown operator`); + +// ./test/core/const.wast:240 +assert_malformed(() => instantiate(`(func (f64.const 0x0p-) drop) `), `unknown operator`); + +// ./test/core/const.wast:244 +assert_malformed(() => instantiate(`(func (f64.const 0x0.0p) drop) `), `unknown operator`); + +// ./test/core/const.wast:248 +assert_malformed( + () => instantiate(`(func (f64.const 0x0.0p+) drop) `), + `unknown operator`, +); + +// ./test/core/const.wast:252 +assert_malformed( + () => instantiate(`(func (f64.const 0x0.0p-) drop) `), + `unknown operator`, +); + +// ./test/core/const.wast:256 +assert_malformed(() => instantiate(`(func (f64.const 0x0pA) drop) `), `unknown operator`); + +// ./test/core/const.wast:264 +let $64 = instantiate(`(module (func (i32.const 0xffffffff) drop))`); + +// ./test/core/const.wast:265 +let $65 = instantiate(`(module (func (i32.const -0x80000000) drop))`); + +// ./test/core/const.wast:266 +assert_malformed( + () => instantiate(`(func (i32.const 0x100000000) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:270 +assert_malformed( + () => instantiate(`(func (i32.const -0x80000001) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:275 +let $66 = instantiate(`(module (func (i32.const 4294967295) drop))`); + +// ./test/core/const.wast:276 +let $67 = instantiate(`(module (func (i32.const -2147483648) drop))`); + +// ./test/core/const.wast:277 +assert_malformed( + () => instantiate(`(func (i32.const 4294967296) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:281 +assert_malformed( + () => instantiate(`(func (i32.const -2147483649) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:286 +let $68 = instantiate(`(module (func (i64.const 0xffffffffffffffff) drop))`); + +// ./test/core/const.wast:287 +let $69 = instantiate(`(module (func (i64.const -0x8000000000000000) drop))`); + +// ./test/core/const.wast:288 +assert_malformed( + () => instantiate(`(func (i64.const 0x10000000000000000) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:292 +assert_malformed( + () => instantiate(`(func (i64.const -0x8000000000000001) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:297 +let $70 = instantiate(`(module (func (i64.const 18446744073709551615) drop))`); + +// ./test/core/const.wast:298 +let $71 = instantiate(`(module (func (i64.const -9223372036854775808) drop))`); + +// ./test/core/const.wast:299 +assert_malformed( + () => instantiate(`(func (i64.const 18446744073709551616) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:303 +assert_malformed( + () => instantiate(`(func (i64.const -9223372036854775809) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:308 +let $72 = instantiate(`(module (func (f32.const 0x1p127) drop))`); + +// ./test/core/const.wast:309 +let $73 = instantiate(`(module (func (f32.const -0x1p127) drop))`); + +// ./test/core/const.wast:310 +let $74 = instantiate(`(module (func (f32.const 0x1.fffffep127) drop))`); + +// ./test/core/const.wast:311 +let $75 = instantiate(`(module (func (f32.const -0x1.fffffep127) drop))`); + +// ./test/core/const.wast:312 +let $76 = instantiate(`(module (func (f32.const 0x1.fffffe7p127) drop))`); + +// ./test/core/const.wast:313 +let $77 = instantiate(`(module (func (f32.const -0x1.fffffe7p127) drop))`); + +// ./test/core/const.wast:314 +let $78 = instantiate(`(module (func (f32.const 0x1.fffffefffffff8000000p127) drop))`); + +// ./test/core/const.wast:315 +let $79 = instantiate(`(module (func (f32.const -0x1.fffffefffffff8000000p127) drop))`); + +// ./test/core/const.wast:316 +let $80 = instantiate(`(module (func (f32.const 0x1.fffffefffffffffffffp127) drop))`); + +// ./test/core/const.wast:317 +let $81 = instantiate(`(module (func (f32.const -0x1.fffffefffffffffffffp127) drop))`); + +// ./test/core/const.wast:318 +assert_malformed( + () => instantiate(`(func (f32.const 0x1p128) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:322 +assert_malformed( + () => instantiate(`(func (f32.const -0x1p128) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:326 +assert_malformed( + () => instantiate(`(func (f32.const 0x1.ffffffp127) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:330 +assert_malformed( + () => instantiate(`(func (f32.const -0x1.ffffffp127) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:335 +let $82 = instantiate(`(module (func (f32.const 1e38) drop))`); + +// ./test/core/const.wast:336 +let $83 = instantiate(`(module (func (f32.const -1e38) drop))`); + +// ./test/core/const.wast:337 +assert_malformed( + () => instantiate(`(func (f32.const 1e39) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:341 +assert_malformed( + () => instantiate(`(func (f32.const -1e39) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:346 +let $84 = instantiate(`(module (func (f32.const 340282356779733623858607532500980858880) drop))`); + +// ./test/core/const.wast:347 +let $85 = instantiate(`(module (func (f32.const -340282356779733623858607532500980858880) drop))`); + +// ./test/core/const.wast:348 +assert_malformed( + () => instantiate(`(func (f32.const 340282356779733661637539395458142568448) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:352 +assert_malformed( + () => instantiate(`(func (f32.const -340282356779733661637539395458142568448) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:357 +let $86 = instantiate(`(module (func (f64.const 0x1p1023) drop))`); + +// ./test/core/const.wast:358 +let $87 = instantiate(`(module (func (f64.const -0x1p1023) drop))`); + +// ./test/core/const.wast:359 +let $88 = instantiate(`(module (func (f64.const 0x1.fffffffffffffp1023) drop))`); + +// ./test/core/const.wast:360 +let $89 = instantiate(`(module (func (f64.const -0x1.fffffffffffffp1023) drop))`); + +// ./test/core/const.wast:361 +let $90 = instantiate(`(module (func (f64.const 0x1.fffffffffffff7p1023) drop))`); + +// ./test/core/const.wast:362 +let $91 = instantiate(`(module (func (f64.const -0x1.fffffffffffff7p1023) drop))`); + +// ./test/core/const.wast:363 +let $92 = instantiate(`(module (func (f64.const 0x1.fffffffffffff7ffffffp1023) drop))`); + +// ./test/core/const.wast:364 +let $93 = instantiate(`(module (func (f64.const -0x1.fffffffffffff7ffffffp1023) drop))`); + +// ./test/core/const.wast:365 +assert_malformed( + () => instantiate(`(func (f64.const 0x1p1024) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:369 +assert_malformed( + () => instantiate(`(func (f64.const -0x1p1024) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:373 +assert_malformed( + () => instantiate(`(func (f64.const 0x1.fffffffffffff8p1023) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:377 +assert_malformed( + () => instantiate(`(func (f64.const -0x1.fffffffffffff8p1023) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:382 +let $94 = instantiate(`(module (func (f64.const 1e308) drop))`); + +// ./test/core/const.wast:383 +let $95 = instantiate(`(module (func (f64.const -1e308) drop))`); + +// ./test/core/const.wast:384 +assert_malformed( + () => instantiate(`(func (f64.const 1e309) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:388 +assert_malformed( + () => instantiate(`(func (f64.const -1e309) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:393 +let $96 = instantiate(`(module (func (f64.const 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))`); + +// ./test/core/const.wast:394 +let $97 = instantiate(`(module (func (f64.const -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))`); + +// ./test/core/const.wast:395 +assert_malformed( + () => instantiate(`(func (f64.const 269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:399 +assert_malformed( + () => instantiate(`(func (f64.const -269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:404 +let $98 = instantiate(`(module (func (f32.const nan:0x1) drop))`); + +// ./test/core/const.wast:405 +let $99 = instantiate(`(module (func (f64.const nan:0x1) drop))`); + +// ./test/core/const.wast:406 +let $100 = instantiate(`(module (func (f32.const nan:0x7f_ffff) drop))`); + +// ./test/core/const.wast:407 +let $101 = instantiate(`(module (func (f64.const nan:0xf_ffff_ffff_ffff) drop))`); + +// ./test/core/const.wast:409 +assert_malformed(() => instantiate(`(func (f32.const nan:1) drop) `), `unknown operator`); + +// ./test/core/const.wast:413 +assert_malformed(() => instantiate(`(func (f64.const nan:1) drop) `), `unknown operator`); + +// ./test/core/const.wast:418 +assert_malformed( + () => instantiate(`(func (f32.const nan:0x0) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:422 +assert_malformed( + () => instantiate(`(func (f64.const nan:0x0) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:427 +assert_malformed( + () => instantiate(`(func (f32.const nan:0x80_0000) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:431 +assert_malformed( + () => instantiate(`(func (f64.const nan:0x10_0000_0000_0000) drop) `), + `constant out of range`, +); + +// ./test/core/const.wast:440 +let $102 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000100000000000p-50)))`); + +// ./test/core/const.wast:441 +assert_return(() => invoke($102, `f`, []), [value("f32", 0.0000000000000008881784)]); + +// ./test/core/const.wast:442 +let $103 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000100000000000p-50)))`); + +// ./test/core/const.wast:443 +assert_return(() => invoke($103, `f`, []), [value("f32", -0.0000000000000008881784)]); + +// ./test/core/const.wast:444 +let $104 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000100000000001p-50)))`); + +// ./test/core/const.wast:445 +assert_return(() => invoke($104, `f`, []), [value("f32", 0.0000000000000008881785)]); + +// ./test/core/const.wast:446 +let $105 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000100000000001p-50)))`); + +// ./test/core/const.wast:447 +assert_return(() => invoke($105, `f`, []), [value("f32", -0.0000000000000008881785)]); + +// ./test/core/const.wast:448 +let $106 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.000001fffffffffffp-50)))`); + +// ./test/core/const.wast:449 +assert_return(() => invoke($106, `f`, []), [value("f32", 0.0000000000000008881785)]); + +// ./test/core/const.wast:450 +let $107 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.000001fffffffffffp-50)))`); + +// ./test/core/const.wast:451 +assert_return(() => invoke($107, `f`, []), [value("f32", -0.0000000000000008881785)]); + +// ./test/core/const.wast:452 +let $108 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000200000000000p-50)))`); + +// ./test/core/const.wast:453 +assert_return(() => invoke($108, `f`, []), [value("f32", 0.0000000000000008881785)]); + +// ./test/core/const.wast:454 +let $109 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000200000000000p-50)))`); + +// ./test/core/const.wast:455 +assert_return(() => invoke($109, `f`, []), [value("f32", -0.0000000000000008881785)]); + +// ./test/core/const.wast:456 +let $110 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000200000000001p-50)))`); + +// ./test/core/const.wast:457 +assert_return(() => invoke($110, `f`, []), [value("f32", 0.0000000000000008881785)]); + +// ./test/core/const.wast:458 +let $111 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000200000000001p-50)))`); + +// ./test/core/const.wast:459 +assert_return(() => invoke($111, `f`, []), [value("f32", -0.0000000000000008881785)]); + +// ./test/core/const.wast:460 +let $112 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.000002fffffffffffp-50)))`); + +// ./test/core/const.wast:461 +assert_return(() => invoke($112, `f`, []), [value("f32", 0.0000000000000008881785)]); + +// ./test/core/const.wast:462 +let $113 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.000002fffffffffffp-50)))`); + +// ./test/core/const.wast:463 +assert_return(() => invoke($113, `f`, []), [value("f32", -0.0000000000000008881785)]); + +// ./test/core/const.wast:464 +let $114 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000300000000000p-50)))`); + +// ./test/core/const.wast:465 +assert_return(() => invoke($114, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:466 +let $115 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000300000000000p-50)))`); + +// ./test/core/const.wast:467 +assert_return(() => invoke($115, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:468 +let $116 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000300000000001p-50)))`); + +// ./test/core/const.wast:469 +assert_return(() => invoke($116, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:470 +let $117 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000300000000001p-50)))`); + +// ./test/core/const.wast:471 +assert_return(() => invoke($117, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:472 +let $118 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.000003fffffffffffp-50)))`); + +// ./test/core/const.wast:473 +assert_return(() => invoke($118, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:474 +let $119 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.000003fffffffffffp-50)))`); + +// ./test/core/const.wast:475 +assert_return(() => invoke($119, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:476 +let $120 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000400000000000p-50)))`); + +// ./test/core/const.wast:477 +assert_return(() => invoke($120, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:478 +let $121 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000400000000000p-50)))`); + +// ./test/core/const.wast:479 +assert_return(() => invoke($121, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:480 +let $122 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000400000000001p-50)))`); + +// ./test/core/const.wast:481 +assert_return(() => invoke($122, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:482 +let $123 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000400000000001p-50)))`); + +// ./test/core/const.wast:483 +assert_return(() => invoke($123, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:484 +let $124 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.000004fffffffffffp-50)))`); + +// ./test/core/const.wast:485 +assert_return(() => invoke($124, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:486 +let $125 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.000004fffffffffffp-50)))`); + +// ./test/core/const.wast:487 +assert_return(() => invoke($125, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:488 +let $126 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000500000000000p-50)))`); + +// ./test/core/const.wast:489 +assert_return(() => invoke($126, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:490 +let $127 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000500000000000p-50)))`); + +// ./test/core/const.wast:491 +assert_return(() => invoke($127, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:492 +let $128 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000500000000001p-50)))`); + +// ./test/core/const.wast:493 +assert_return(() => invoke($128, `f`, []), [value("f32", 0.0000000000000008881787)]); + +// ./test/core/const.wast:494 +let $129 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000500000000001p-50)))`); + +// ./test/core/const.wast:495 +assert_return(() => invoke($129, `f`, []), [value("f32", -0.0000000000000008881787)]); + +// ./test/core/const.wast:497 +let $130 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000.004000000p-64)))`); + +// ./test/core/const.wast:498 +assert_return(() => invoke($130, `f`, []), [value("f32", 0.0000000000000008881784)]); + +// ./test/core/const.wast:499 +let $131 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000.004000000p-64)))`); + +// ./test/core/const.wast:500 +assert_return(() => invoke($131, `f`, []), [value("f32", -0.0000000000000008881784)]); + +// ./test/core/const.wast:501 +let $132 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000.004000001p-64)))`); + +// ./test/core/const.wast:502 +assert_return(() => invoke($132, `f`, []), [value("f32", 0.0000000000000008881785)]); + +// ./test/core/const.wast:503 +let $133 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000.004000001p-64)))`); + +// ./test/core/const.wast:504 +assert_return(() => invoke($133, `f`, []), [value("f32", -0.0000000000000008881785)]); + +// ./test/core/const.wast:505 +let $134 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000.007ffffffp-64)))`); + +// ./test/core/const.wast:506 +assert_return(() => invoke($134, `f`, []), [value("f32", 0.0000000000000008881785)]); + +// ./test/core/const.wast:507 +let $135 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000.007ffffffp-64)))`); + +// ./test/core/const.wast:508 +assert_return(() => invoke($135, `f`, []), [value("f32", -0.0000000000000008881785)]); + +// ./test/core/const.wast:509 +let $136 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000.008000000p-64)))`); + +// ./test/core/const.wast:510 +assert_return(() => invoke($136, `f`, []), [value("f32", 0.0000000000000008881785)]); + +// ./test/core/const.wast:511 +let $137 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000.008000000p-64)))`); + +// ./test/core/const.wast:512 +assert_return(() => invoke($137, `f`, []), [value("f32", -0.0000000000000008881785)]); + +// ./test/core/const.wast:513 +let $138 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000.008000001p-64)))`); + +// ./test/core/const.wast:514 +assert_return(() => invoke($138, `f`, []), [value("f32", 0.0000000000000008881785)]); + +// ./test/core/const.wast:515 +let $139 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000.008000001p-64)))`); + +// ./test/core/const.wast:516 +assert_return(() => invoke($139, `f`, []), [value("f32", -0.0000000000000008881785)]); + +// ./test/core/const.wast:517 +let $140 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000.00bffffffp-64)))`); + +// ./test/core/const.wast:518 +assert_return(() => invoke($140, `f`, []), [value("f32", 0.0000000000000008881785)]); + +// ./test/core/const.wast:519 +let $141 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000.00bffffffp-64)))`); + +// ./test/core/const.wast:520 +assert_return(() => invoke($141, `f`, []), [value("f32", -0.0000000000000008881785)]); + +// ./test/core/const.wast:521 +let $142 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000.00c000000p-64)))`); + +// ./test/core/const.wast:522 +assert_return(() => invoke($142, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:523 +let $143 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000.00c000000p-64)))`); + +// ./test/core/const.wast:524 +assert_return(() => invoke($143, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:525 +let $144 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000.00c000001p-64)))`); + +// ./test/core/const.wast:526 +assert_return(() => invoke($144, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:527 +let $145 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000.00c000001p-64)))`); + +// ./test/core/const.wast:528 +assert_return(() => invoke($145, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:529 +let $146 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000.00fffffffp-64)))`); + +// ./test/core/const.wast:530 +assert_return(() => invoke($146, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:531 +let $147 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000.00fffffffp-64)))`); + +// ./test/core/const.wast:532 +assert_return(() => invoke($147, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:533 +let $148 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000.010000001p-64)))`); + +// ./test/core/const.wast:534 +assert_return(() => invoke($148, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:535 +let $149 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000.010000001p-64)))`); + +// ./test/core/const.wast:536 +assert_return(() => invoke($149, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:537 +let $150 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000.013ffffffp-64)))`); + +// ./test/core/const.wast:538 +assert_return(() => invoke($150, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:539 +let $151 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000.013ffffffp-64)))`); + +// ./test/core/const.wast:540 +assert_return(() => invoke($151, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:541 +let $152 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000.014000001p-64)))`); + +// ./test/core/const.wast:542 +assert_return(() => invoke($152, `f`, []), [value("f32", 0.0000000000000008881787)]); + +// ./test/core/const.wast:543 +let $153 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000.014000001p-64)))`); + +// ./test/core/const.wast:544 +assert_return(() => invoke($153, `f`, []), [value("f32", -0.0000000000000008881787)]); + +// ./test/core/const.wast:546 +let $154 = instantiate(`(module (func (export "f") (result f32) (f32.const +8.8817847263968443573e-16)))`); + +// ./test/core/const.wast:547 +assert_return(() => invoke($154, `f`, []), [value("f32", 0.0000000000000008881784)]); + +// ./test/core/const.wast:548 +let $155 = instantiate(`(module (func (export "f") (result f32) (f32.const -8.8817847263968443573e-16)))`); + +// ./test/core/const.wast:549 +assert_return(() => invoke($155, `f`, []), [value("f32", -0.0000000000000008881784)]); + +// ./test/core/const.wast:550 +let $156 = instantiate(`(module (func (export "f") (result f32) (f32.const +8.8817847263968443574e-16)))`); + +// ./test/core/const.wast:551 +assert_return(() => invoke($156, `f`, []), [value("f32", 0.0000000000000008881785)]); + +// ./test/core/const.wast:552 +let $157 = instantiate(`(module (func (export "f") (result f32) (f32.const -8.8817847263968443574e-16)))`); + +// ./test/core/const.wast:553 +assert_return(() => invoke($157, `f`, []), [value("f32", -0.0000000000000008881785)]); + +// ./test/core/const.wast:554 +let $158 = instantiate(`(module (func (export "f") (result f32) (f32.const +8.8817857851880284252e-16)))`); + +// ./test/core/const.wast:555 +assert_return(() => invoke($158, `f`, []), [value("f32", 0.0000000000000008881785)]); + +// ./test/core/const.wast:556 +let $159 = instantiate(`(module (func (export "f") (result f32) (f32.const -8.8817857851880284252e-16)))`); + +// ./test/core/const.wast:557 +assert_return(() => invoke($159, `f`, []), [value("f32", -0.0000000000000008881785)]); + +// ./test/core/const.wast:558 +let $160 = instantiate(`(module (func (export "f") (result f32) (f32.const +8.8817857851880284253e-16)))`); + +// ./test/core/const.wast:559 +assert_return(() => invoke($160, `f`, []), [value("f32", 0.0000000000000008881786)]); + +// ./test/core/const.wast:560 +let $161 = instantiate(`(module (func (export "f") (result f32) (f32.const -8.8817857851880284253e-16)))`); + +// ./test/core/const.wast:561 +assert_return(() => invoke($161, `f`, []), [value("f32", -0.0000000000000008881786)]); + +// ./test/core/const.wast:564 +let $162 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000100000000000p+50)))`); + +// ./test/core/const.wast:565 +assert_return(() => invoke($162, `f`, []), [value("f32", 1125899900000000)]); + +// ./test/core/const.wast:566 +let $163 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000100000000000p+50)))`); + +// ./test/core/const.wast:567 +assert_return(() => invoke($163, `f`, []), [value("f32", -1125899900000000)]); + +// ./test/core/const.wast:568 +let $164 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000100000000001p+50)))`); + +// ./test/core/const.wast:569 +assert_return(() => invoke($164, `f`, []), [value("f32", 1125900000000000)]); + +// ./test/core/const.wast:570 +let $165 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000100000000001p+50)))`); + +// ./test/core/const.wast:571 +assert_return(() => invoke($165, `f`, []), [value("f32", -1125900000000000)]); + +// ./test/core/const.wast:572 +let $166 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.000001fffffffffffp+50)))`); + +// ./test/core/const.wast:573 +assert_return(() => invoke($166, `f`, []), [value("f32", 1125900000000000)]); + +// ./test/core/const.wast:574 +let $167 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.000001fffffffffffp+50)))`); + +// ./test/core/const.wast:575 +assert_return(() => invoke($167, `f`, []), [value("f32", -1125900000000000)]); + +// ./test/core/const.wast:576 +let $168 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000200000000000p+50)))`); + +// ./test/core/const.wast:577 +assert_return(() => invoke($168, `f`, []), [value("f32", 1125900000000000)]); + +// ./test/core/const.wast:578 +let $169 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000200000000000p+50)))`); + +// ./test/core/const.wast:579 +assert_return(() => invoke($169, `f`, []), [value("f32", -1125900000000000)]); + +// ./test/core/const.wast:580 +let $170 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000200000000001p+50)))`); + +// ./test/core/const.wast:581 +assert_return(() => invoke($170, `f`, []), [value("f32", 1125900000000000)]); + +// ./test/core/const.wast:582 +let $171 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000200000000001p+50)))`); + +// ./test/core/const.wast:583 +assert_return(() => invoke($171, `f`, []), [value("f32", -1125900000000000)]); + +// ./test/core/const.wast:584 +let $172 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.000002fffffffffffp+50)))`); + +// ./test/core/const.wast:585 +assert_return(() => invoke($172, `f`, []), [value("f32", 1125900000000000)]); + +// ./test/core/const.wast:586 +let $173 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.000002fffffffffffp+50)))`); + +// ./test/core/const.wast:587 +assert_return(() => invoke($173, `f`, []), [value("f32", -1125900000000000)]); + +// ./test/core/const.wast:588 +let $174 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000300000000000p+50)))`); + +// ./test/core/const.wast:589 +assert_return(() => invoke($174, `f`, []), [value("f32", 1125900200000000)]); + +// ./test/core/const.wast:590 +let $175 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000300000000000p+50)))`); + +// ./test/core/const.wast:591 +assert_return(() => invoke($175, `f`, []), [value("f32", -1125900200000000)]); + +// ./test/core/const.wast:592 +let $176 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000300000000001p+50)))`); + +// ./test/core/const.wast:593 +assert_return(() => invoke($176, `f`, []), [value("f32", 1125900200000000)]); + +// ./test/core/const.wast:594 +let $177 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000300000000001p+50)))`); + +// ./test/core/const.wast:595 +assert_return(() => invoke($177, `f`, []), [value("f32", -1125900200000000)]); + +// ./test/core/const.wast:596 +let $178 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.000003fffffffffffp+50)))`); + +// ./test/core/const.wast:597 +assert_return(() => invoke($178, `f`, []), [value("f32", 1125900200000000)]); + +// ./test/core/const.wast:598 +let $179 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.000003fffffffffffp+50)))`); + +// ./test/core/const.wast:599 +assert_return(() => invoke($179, `f`, []), [value("f32", -1125900200000000)]); + +// ./test/core/const.wast:600 +let $180 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000400000000000p+50)))`); + +// ./test/core/const.wast:601 +assert_return(() => invoke($180, `f`, []), [value("f32", 1125900200000000)]); + +// ./test/core/const.wast:602 +let $181 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000400000000000p+50)))`); + +// ./test/core/const.wast:603 +assert_return(() => invoke($181, `f`, []), [value("f32", -1125900200000000)]); + +// ./test/core/const.wast:604 +let $182 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000400000000001p+50)))`); + +// ./test/core/const.wast:605 +assert_return(() => invoke($182, `f`, []), [value("f32", 1125900200000000)]); + +// ./test/core/const.wast:606 +let $183 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000400000000001p+50)))`); + +// ./test/core/const.wast:607 +assert_return(() => invoke($183, `f`, []), [value("f32", -1125900200000000)]); + +// ./test/core/const.wast:608 +let $184 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.000004fffffffffffp+50)))`); + +// ./test/core/const.wast:609 +assert_return(() => invoke($184, `f`, []), [value("f32", 1125900200000000)]); + +// ./test/core/const.wast:610 +let $185 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.000004fffffffffffp+50)))`); + +// ./test/core/const.wast:611 +assert_return(() => invoke($185, `f`, []), [value("f32", -1125900200000000)]); + +// ./test/core/const.wast:612 +let $186 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000500000000000p+50)))`); + +// ./test/core/const.wast:613 +assert_return(() => invoke($186, `f`, []), [value("f32", 1125900200000000)]); + +// ./test/core/const.wast:614 +let $187 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000500000000000p+50)))`); + +// ./test/core/const.wast:615 +assert_return(() => invoke($187, `f`, []), [value("f32", -1125900200000000)]); + +// ./test/core/const.wast:616 +let $188 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.00000500000000001p+50)))`); + +// ./test/core/const.wast:617 +assert_return(() => invoke($188, `f`, []), [value("f32", 1125900300000000)]); + +// ./test/core/const.wast:618 +let $189 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.00000500000000001p+50)))`); + +// ./test/core/const.wast:619 +assert_return(() => invoke($189, `f`, []), [value("f32", -1125900300000000)]); + +// ./test/core/const.wast:621 +let $190 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000004000000)))`); + +// ./test/core/const.wast:622 +assert_return(() => invoke($190, `f`, []), [value("f32", 1125899900000000)]); + +// ./test/core/const.wast:623 +let $191 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000004000000)))`); + +// ./test/core/const.wast:624 +assert_return(() => invoke($191, `f`, []), [value("f32", -1125899900000000)]); + +// ./test/core/const.wast:625 +let $192 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000004000001)))`); + +// ./test/core/const.wast:626 +assert_return(() => invoke($192, `f`, []), [value("f32", 1125900000000000)]); + +// ./test/core/const.wast:627 +let $193 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000004000001)))`); + +// ./test/core/const.wast:628 +assert_return(() => invoke($193, `f`, []), [value("f32", -1125900000000000)]); + +// ./test/core/const.wast:629 +let $194 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000007ffffff)))`); + +// ./test/core/const.wast:630 +assert_return(() => invoke($194, `f`, []), [value("f32", 1125900000000000)]); + +// ./test/core/const.wast:631 +let $195 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000007ffffff)))`); + +// ./test/core/const.wast:632 +assert_return(() => invoke($195, `f`, []), [value("f32", -1125900000000000)]); + +// ./test/core/const.wast:633 +let $196 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000008000000)))`); + +// ./test/core/const.wast:634 +assert_return(() => invoke($196, `f`, []), [value("f32", 1125900000000000)]); + +// ./test/core/const.wast:635 +let $197 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000008000000)))`); + +// ./test/core/const.wast:636 +assert_return(() => invoke($197, `f`, []), [value("f32", -1125900000000000)]); + +// ./test/core/const.wast:637 +let $198 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x4000008000001)))`); + +// ./test/core/const.wast:638 +assert_return(() => invoke($198, `f`, []), [value("f32", 1125900000000000)]); + +// ./test/core/const.wast:639 +let $199 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x4000008000001)))`); + +// ./test/core/const.wast:640 +assert_return(() => invoke($199, `f`, []), [value("f32", -1125900000000000)]); + +// ./test/core/const.wast:641 +let $200 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x400000bffffff)))`); + +// ./test/core/const.wast:642 +assert_return(() => invoke($200, `f`, []), [value("f32", 1125900000000000)]); + +// ./test/core/const.wast:643 +let $201 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x400000bffffff)))`); + +// ./test/core/const.wast:644 +assert_return(() => invoke($201, `f`, []), [value("f32", -1125900000000000)]); + +// ./test/core/const.wast:645 +let $202 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x400000c000000)))`); + +// ./test/core/const.wast:646 +assert_return(() => invoke($202, `f`, []), [value("f32", 1125900200000000)]); + +// ./test/core/const.wast:647 +let $203 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x400000c000000)))`); + +// ./test/core/const.wast:648 +assert_return(() => invoke($203, `f`, []), [value("f32", -1125900200000000)]); + +// ./test/core/const.wast:650 +let $204 = instantiate(`(module (func (export "f") (result f32) (f32.const +1125899973951488)))`); + +// ./test/core/const.wast:651 +assert_return(() => invoke($204, `f`, []), [value("f32", 1125899900000000)]); + +// ./test/core/const.wast:652 +let $205 = instantiate(`(module (func (export "f") (result f32) (f32.const -1125899973951488)))`); + +// ./test/core/const.wast:653 +assert_return(() => invoke($205, `f`, []), [value("f32", -1125899900000000)]); + +// ./test/core/const.wast:654 +let $206 = instantiate(`(module (func (export "f") (result f32) (f32.const +1125899973951489)))`); + +// ./test/core/const.wast:655 +assert_return(() => invoke($206, `f`, []), [value("f32", 1125900000000000)]); + +// ./test/core/const.wast:656 +let $207 = instantiate(`(module (func (export "f") (result f32) (f32.const -1125899973951489)))`); + +// ./test/core/const.wast:657 +assert_return(() => invoke($207, `f`, []), [value("f32", -1125900000000000)]); + +// ./test/core/const.wast:658 +let $208 = instantiate(`(module (func (export "f") (result f32) (f32.const +1125900108169215)))`); + +// ./test/core/const.wast:659 +assert_return(() => invoke($208, `f`, []), [value("f32", 1125900000000000)]); + +// ./test/core/const.wast:660 +let $209 = instantiate(`(module (func (export "f") (result f32) (f32.const -1125900108169215)))`); + +// ./test/core/const.wast:661 +assert_return(() => invoke($209, `f`, []), [value("f32", -1125900000000000)]); + +// ./test/core/const.wast:662 +let $210 = instantiate(`(module (func (export "f") (result f32) (f32.const +1125900108169216)))`); + +// ./test/core/const.wast:663 +assert_return(() => invoke($210, `f`, []), [value("f32", 1125900200000000)]); + +// ./test/core/const.wast:664 +let $211 = instantiate(`(module (func (export "f") (result f32) (f32.const -1125900108169216)))`); + +// ./test/core/const.wast:665 +assert_return(() => invoke($211, `f`, []), [value("f32", -1125900200000000)]); + +// ./test/core/const.wast:668 +let $212 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.00000100000000000p-126)))`); + +// ./test/core/const.wast:669 +assert_return(() => invoke($212, `f`, []), [value("f32", 0)]); + +// ./test/core/const.wast:670 +let $213 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.00000100000000000p-126)))`); + +// ./test/core/const.wast:671 +assert_return(() => invoke($213, `f`, []), [value("f32", -0)]); + +// ./test/core/const.wast:672 +let $214 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.00000100000000001p-126)))`); + +// ./test/core/const.wast:673 +assert_return( + () => invoke($214, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/const.wast:674 +let $215 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.00000100000000001p-126)))`); + +// ./test/core/const.wast:675 +assert_return( + () => invoke($215, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/const.wast:676 +let $216 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.000001fffffffffffp-126)))`); + +// ./test/core/const.wast:677 +assert_return( + () => invoke($216, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/const.wast:678 +let $217 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.000001fffffffffffp-126)))`); + +// ./test/core/const.wast:679 +assert_return( + () => invoke($217, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/const.wast:680 +let $218 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.00000200000000000p-126)))`); + +// ./test/core/const.wast:681 +assert_return( + () => invoke($218, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/const.wast:682 +let $219 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.00000200000000000p-126)))`); + +// ./test/core/const.wast:683 +assert_return( + () => invoke($219, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/const.wast:684 +let $220 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.00000200000000001p-126)))`); + +// ./test/core/const.wast:685 +assert_return( + () => invoke($220, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/const.wast:686 +let $221 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.00000200000000001p-126)))`); + +// ./test/core/const.wast:687 +assert_return( + () => invoke($221, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/const.wast:688 +let $222 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.000002fffffffffffp-126)))`); + +// ./test/core/const.wast:689 +assert_return( + () => invoke($222, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/const.wast:690 +let $223 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.000002fffffffffffp-126)))`); + +// ./test/core/const.wast:691 +assert_return( + () => invoke($223, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/const.wast:692 +let $224 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.00000300000000000p-126)))`); + +// ./test/core/const.wast:693 +assert_return( + () => invoke($224, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:694 +let $225 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.00000300000000000p-126)))`); + +// ./test/core/const.wast:695 +assert_return( + () => invoke($225, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:696 +let $226 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.00000300000000001p-126)))`); + +// ./test/core/const.wast:697 +assert_return( + () => invoke($226, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:698 +let $227 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.00000300000000001p-126)))`); + +// ./test/core/const.wast:699 +assert_return( + () => invoke($227, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:700 +let $228 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.000003fffffffffffp-126)))`); + +// ./test/core/const.wast:701 +assert_return( + () => invoke($228, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:702 +let $229 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.000003fffffffffffp-126)))`); + +// ./test/core/const.wast:703 +assert_return( + () => invoke($229, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:704 +let $230 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.00000400000000000p-126)))`); + +// ./test/core/const.wast:705 +assert_return( + () => invoke($230, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:706 +let $231 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.00000400000000000p-126)))`); + +// ./test/core/const.wast:707 +assert_return( + () => invoke($231, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:708 +let $232 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.00000400000000001p-126)))`); + +// ./test/core/const.wast:709 +assert_return( + () => invoke($232, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:710 +let $233 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.00000400000000001p-126)))`); + +// ./test/core/const.wast:711 +assert_return( + () => invoke($233, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:712 +let $234 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.000004fffffffffffp-126)))`); + +// ./test/core/const.wast:713 +assert_return( + () => invoke($234, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:714 +let $235 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.000004fffffffffffp-126)))`); + +// ./test/core/const.wast:715 +assert_return( + () => invoke($235, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:716 +let $236 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.00000500000000000p-126)))`); + +// ./test/core/const.wast:717 +assert_return( + () => invoke($236, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:718 +let $237 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.00000500000000000p-126)))`); + +// ./test/core/const.wast:719 +assert_return( + () => invoke($237, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/const.wast:720 +let $238 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x0.00000500000000001p-126)))`); + +// ./test/core/const.wast:721 +assert_return( + () => invoke($238, `f`, []), + [value("f32", 0.000000000000000000000000000000000000000000004)], +); + +// ./test/core/const.wast:722 +let $239 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x0.00000500000000001p-126)))`); + +// ./test/core/const.wast:723 +assert_return( + () => invoke($239, `f`, []), + [value("f32", -0.000000000000000000000000000000000000000000004)], +); + +// ./test/core/const.wast:726 +let $240 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.fffffe8p127)))`); + +// ./test/core/const.wast:727 +assert_return(() => invoke($240, `f`, []), [value("f32", 340282350000000000000000000000000000000)]); + +// ./test/core/const.wast:728 +let $241 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.fffffe8p127)))`); + +// ./test/core/const.wast:729 +assert_return(() => invoke($241, `f`, []), [value("f32", -340282350000000000000000000000000000000)]); + +// ./test/core/const.wast:730 +let $242 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.fffffefffffff8p127)))`); + +// ./test/core/const.wast:731 +assert_return(() => invoke($242, `f`, []), [value("f32", 340282350000000000000000000000000000000)]); + +// ./test/core/const.wast:732 +let $243 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.fffffefffffff8p127)))`); + +// ./test/core/const.wast:733 +assert_return(() => invoke($243, `f`, []), [value("f32", -340282350000000000000000000000000000000)]); + +// ./test/core/const.wast:734 +let $244 = instantiate(`(module (func (export "f") (result f32) (f32.const +0x1.fffffefffffffffffp127)))`); + +// ./test/core/const.wast:735 +assert_return(() => invoke($244, `f`, []), [value("f32", 340282350000000000000000000000000000000)]); + +// ./test/core/const.wast:736 +let $245 = instantiate(`(module (func (export "f") (result f32) (f32.const -0x1.fffffefffffffffffp127)))`); + +// ./test/core/const.wast:737 +assert_return(() => invoke($245, `f`, []), [value("f32", -340282350000000000000000000000000000000)]); + +// ./test/core/const.wast:740 +let $246 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000000p-600)))`); + +// ./test/core/const.wast:741 +assert_return( + () => invoke($246, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102884), + ], +); + +// ./test/core/const.wast:742 +let $247 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000000p-600)))`); + +// ./test/core/const.wast:743 +assert_return( + () => invoke($247, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102884), + ], +); + +// ./test/core/const.wast:744 +let $248 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000001p-600)))`); + +// ./test/core/const.wast:745 +assert_return( + () => invoke($248, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:746 +let $249 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000001p-600)))`); + +// ./test/core/const.wast:747 +assert_return( + () => invoke($249, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:748 +let $250 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.0000000000000fffffffffffp-600)))`); + +// ./test/core/const.wast:749 +assert_return( + () => invoke($250, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:750 +let $251 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.0000000000000fffffffffffp-600)))`); + +// ./test/core/const.wast:751 +assert_return( + () => invoke($251, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:752 +let $252 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000000p-600)))`); + +// ./test/core/const.wast:753 +assert_return( + () => invoke($252, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:754 +let $253 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000000p-600)))`); + +// ./test/core/const.wast:755 +assert_return( + () => invoke($253, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:756 +let $254 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000001p-600)))`); + +// ./test/core/const.wast:757 +assert_return( + () => invoke($254, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:758 +let $255 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000001p-600)))`); + +// ./test/core/const.wast:759 +assert_return( + () => invoke($255, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:760 +let $256 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.00000000000017ffffffffffp-600)))`); + +// ./test/core/const.wast:761 +assert_return( + () => invoke($256, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:762 +let $257 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.00000000000017ffffffffffp-600)))`); + +// ./test/core/const.wast:763 +assert_return( + () => invoke($257, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:764 +let $258 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000000p-600)))`); + +// ./test/core/const.wast:765 +assert_return( + () => invoke($258, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:766 +let $259 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000000p-600)))`); + +// ./test/core/const.wast:767 +assert_return( + () => invoke($259, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:768 +let $260 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000001p-600)))`); + +// ./test/core/const.wast:769 +assert_return( + () => invoke($260, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:770 +let $261 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000001p-600)))`); + +// ./test/core/const.wast:771 +assert_return( + () => invoke($261, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:772 +let $262 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.0000000000001fffffffffffp-600)))`); + +// ./test/core/const.wast:773 +assert_return( + () => invoke($262, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:774 +let $263 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.0000000000001fffffffffffp-600)))`); + +// ./test/core/const.wast:775 +assert_return( + () => invoke($263, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:776 +let $264 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000000p-600)))`); + +// ./test/core/const.wast:777 +assert_return( + () => invoke($264, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:778 +let $265 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000000p-600)))`); + +// ./test/core/const.wast:779 +assert_return( + () => invoke($265, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:780 +let $266 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000001p-600)))`); + +// ./test/core/const.wast:781 +assert_return( + () => invoke($266, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:782 +let $267 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000001p-600)))`); + +// ./test/core/const.wast:783 +assert_return( + () => invoke($267, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:784 +let $268 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.00000000000027ffffffffffp-600)))`); + +// ./test/core/const.wast:785 +assert_return( + () => invoke($268, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:786 +let $269 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.00000000000027ffffffffffp-600)))`); + +// ./test/core/const.wast:787 +assert_return( + () => invoke($269, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:788 +let $270 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000001p-600)))`); + +// ./test/core/const.wast:789 +assert_return( + () => invoke($270, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028857), + ], +); + +// ./test/core/const.wast:790 +let $271 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000001p-600)))`); + +// ./test/core/const.wast:791 +assert_return( + () => invoke($271, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028857), + ], +); + +// ./test/core/const.wast:793 +let $272 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000400000000000p-627)))`); + +// ./test/core/const.wast:794 +assert_return( + () => invoke($272, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102884), + ], +); + +// ./test/core/const.wast:795 +let $273 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000400000000000p-627)))`); + +// ./test/core/const.wast:796 +assert_return( + () => invoke($273, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102884), + ], +); + +// ./test/core/const.wast:797 +let $274 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000400000000001p-627)))`); + +// ./test/core/const.wast:798 +assert_return( + () => invoke($274, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:799 +let $275 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000400000000001p-627)))`); + +// ./test/core/const.wast:800 +assert_return( + () => invoke($275, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:801 +let $276 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.0000007fffffffffffp-627)))`); + +// ./test/core/const.wast:802 +assert_return( + () => invoke($276, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:803 +let $277 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.0000007fffffffffffp-627)))`); + +// ./test/core/const.wast:804 +assert_return( + () => invoke($277, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:805 +let $278 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000800000000000p-627)))`); + +// ./test/core/const.wast:806 +assert_return( + () => invoke($278, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:807 +let $279 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000800000000000p-627)))`); + +// ./test/core/const.wast:808 +assert_return( + () => invoke($279, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:809 +let $280 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000800000000001p-627)))`); + +// ./test/core/const.wast:810 +assert_return( + () => invoke($280, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:811 +let $281 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000800000000001p-627)))`); + +// ./test/core/const.wast:812 +assert_return( + () => invoke($281, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:813 +let $282 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000bfffffffffffp-627)))`); + +// ./test/core/const.wast:814 +assert_return( + () => invoke($282, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:815 +let $283 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000bfffffffffffp-627)))`); + +// ./test/core/const.wast:816 +assert_return( + () => invoke($283, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/const.wast:817 +let $284 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000c00000000000p-627)))`); + +// ./test/core/const.wast:818 +assert_return( + () => invoke($284, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:819 +let $285 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000c00000000000p-627)))`); + +// ./test/core/const.wast:820 +assert_return( + () => invoke($285, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:821 +let $286 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000c00000000001p-627)))`); + +// ./test/core/const.wast:822 +assert_return( + () => invoke($286, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:823 +let $287 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000c00000000001p-627)))`); + +// ./test/core/const.wast:824 +assert_return( + () => invoke($287, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:825 +let $288 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000ffffffffffffp-627)))`); + +// ./test/core/const.wast:826 +assert_return( + () => invoke($288, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:827 +let $289 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000ffffffffffffp-627)))`); + +// ./test/core/const.wast:828 +assert_return( + () => invoke($289, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:829 +let $290 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000001000000000000p-627)))`); + +// ./test/core/const.wast:830 +assert_return( + () => invoke($290, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:831 +let $291 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000001000000000000p-627)))`); + +// ./test/core/const.wast:832 +assert_return( + () => invoke($291, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:833 +let $292 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000001000000000001p-627)))`); + +// ./test/core/const.wast:834 +assert_return( + () => invoke($292, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:835 +let $293 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000001000000000001p-627)))`); + +// ./test/core/const.wast:836 +assert_return( + () => invoke($293, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:837 +let $294 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.0000013fffffffffffp-627)))`); + +// ./test/core/const.wast:838 +assert_return( + () => invoke($294, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:839 +let $295 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.0000013fffffffffffp-627)))`); + +// ./test/core/const.wast:840 +assert_return( + () => invoke($295, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/const.wast:841 +let $296 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000001400000000001p-627)))`); + +// ./test/core/const.wast:842 +assert_return( + () => invoke($296, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028857), + ], +); + +// ./test/core/const.wast:843 +let $297 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000001400000000001p-627)))`); + +// ./test/core/const.wast:844 +assert_return( + () => invoke($297, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028857), + ], +); + +// ./test/core/const.wast:846 +let $298 = instantiate(`(module (func (export "f") (result f64) (f64.const +5.3575430359313371995e+300)))`); + +// ./test/core/const.wast:847 +assert_return( + () => invoke($298, `f`, []), + [ + value("f64", 5357543035931337000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:848 +let $299 = instantiate(`(module (func (export "f") (result f64) (f64.const -5.3575430359313371995e+300)))`); + +// ./test/core/const.wast:849 +assert_return( + () => invoke($299, `f`, []), + [ + value("f64", -5357543035931337000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:850 +let $300 = instantiate(`(module (func (export "f") (result f64) (f64.const +5.3575430359313371996e+300)))`); + +// ./test/core/const.wast:851 +assert_return( + () => invoke($300, `f`, []), + [ + value("f64", 5357543035931338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:852 +let $301 = instantiate(`(module (func (export "f") (result f64) (f64.const -5.3575430359313371996e+300)))`); + +// ./test/core/const.wast:853 +assert_return( + () => invoke($301, `f`, []), + [ + value("f64", -5357543035931338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:854 +let $302 = instantiate(`(module (func (export "f") (result f64) (f64.const +5.3575430359313383891e+300)))`); + +// ./test/core/const.wast:855 +assert_return( + () => invoke($302, `f`, []), + [ + value("f64", 5357543035931338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:856 +let $303 = instantiate(`(module (func (export "f") (result f64) (f64.const -5.3575430359313383891e+300)))`); + +// ./test/core/const.wast:857 +assert_return( + () => invoke($303, `f`, []), + [ + value("f64", -5357543035931338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:858 +let $304 = instantiate(`(module (func (export "f") (result f64) (f64.const +5.3575430359313383892e+300)))`); + +// ./test/core/const.wast:859 +assert_return( + () => invoke($304, `f`, []), + [ + value("f64", 5357543035931339000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:860 +let $305 = instantiate(`(module (func (export "f") (result f64) (f64.const -5.3575430359313383892e+300)))`); + +// ./test/core/const.wast:861 +assert_return( + () => invoke($305, `f`, []), + [ + value("f64", -5357543035931339000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:864 +let $306 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000000p+600)))`); + +// ./test/core/const.wast:865 +assert_return( + () => invoke($306, `f`, []), + [ + value("f64", 4149515568880993000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:866 +let $307 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000000p+600)))`); + +// ./test/core/const.wast:867 +assert_return( + () => invoke($307, `f`, []), + [ + value("f64", -4149515568880993000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:868 +let $308 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000001p+600)))`); + +// ./test/core/const.wast:869 +assert_return( + () => invoke($308, `f`, []), + [ + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:870 +let $309 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000001p+600)))`); + +// ./test/core/const.wast:871 +assert_return( + () => invoke($309, `f`, []), + [ + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:872 +let $310 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.0000000000000fffffffffffp+600)))`); + +// ./test/core/const.wast:873 +assert_return( + () => invoke($310, `f`, []), + [ + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:874 +let $311 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.0000000000000fffffffffffp+600)))`); + +// ./test/core/const.wast:875 +assert_return( + () => invoke($311, `f`, []), + [ + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:876 +let $312 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000000p+600)))`); + +// ./test/core/const.wast:877 +assert_return( + () => invoke($312, `f`, []), + [ + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:878 +let $313 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000000p+600)))`); + +// ./test/core/const.wast:879 +assert_return( + () => invoke($313, `f`, []), + [ + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:880 +let $314 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000001p+600)))`); + +// ./test/core/const.wast:881 +assert_return( + () => invoke($314, `f`, []), + [ + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:882 +let $315 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000001p+600)))`); + +// ./test/core/const.wast:883 +assert_return( + () => invoke($315, `f`, []), + [ + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:884 +let $316 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.00000000000017ffffffffffp+600)))`); + +// ./test/core/const.wast:885 +assert_return( + () => invoke($316, `f`, []), + [ + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:886 +let $317 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.00000000000017ffffffffffp+600)))`); + +// ./test/core/const.wast:887 +assert_return( + () => invoke($317, `f`, []), + [ + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:888 +let $318 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000000p+600)))`); + +// ./test/core/const.wast:889 +assert_return( + () => invoke($318, `f`, []), + [ + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:890 +let $319 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000000p+600)))`); + +// ./test/core/const.wast:891 +assert_return( + () => invoke($319, `f`, []), + [ + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:892 +let $320 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000001p+600)))`); + +// ./test/core/const.wast:893 +assert_return( + () => invoke($320, `f`, []), + [ + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:894 +let $321 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000001p+600)))`); + +// ./test/core/const.wast:895 +assert_return( + () => invoke($321, `f`, []), + [ + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:896 +let $322 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.0000000000001fffffffffffp+600)))`); + +// ./test/core/const.wast:897 +assert_return( + () => invoke($322, `f`, []), + [ + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:898 +let $323 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.0000000000001fffffffffffp+600)))`); + +// ./test/core/const.wast:899 +assert_return( + () => invoke($323, `f`, []), + [ + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:900 +let $324 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000000p+600)))`); + +// ./test/core/const.wast:901 +assert_return( + () => invoke($324, `f`, []), + [ + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:902 +let $325 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000000p+600)))`); + +// ./test/core/const.wast:903 +assert_return( + () => invoke($325, `f`, []), + [ + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:904 +let $326 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000001p+600)))`); + +// ./test/core/const.wast:905 +assert_return( + () => invoke($326, `f`, []), + [ + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:906 +let $327 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000001p+600)))`); + +// ./test/core/const.wast:907 +assert_return( + () => invoke($327, `f`, []), + [ + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:908 +let $328 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.00000000000027ffffffffffp+600)))`); + +// ./test/core/const.wast:909 +assert_return( + () => invoke($328, `f`, []), + [ + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:910 +let $329 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.00000000000027ffffffffffp+600)))`); + +// ./test/core/const.wast:911 +assert_return( + () => invoke($329, `f`, []), + [ + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:912 +let $330 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000000p+600)))`); + +// ./test/core/const.wast:913 +assert_return( + () => invoke($330, `f`, []), + [ + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:914 +let $331 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000000p+600)))`); + +// ./test/core/const.wast:915 +assert_return( + () => invoke($331, `f`, []), + [ + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:916 +let $332 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000001p+600)))`); + +// ./test/core/const.wast:917 +assert_return( + () => invoke($332, `f`, []), + [ + value("f64", 4149515568880996000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:918 +let $333 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000001p+600)))`); + +// ./test/core/const.wast:919 +assert_return( + () => invoke($333, `f`, []), + [ + value("f64", -4149515568880996000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:921 +let $334 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x2000000000000100000000000)))`); + +// ./test/core/const.wast:922 +assert_return(() => invoke($334, `f`, []), [value("f64", 158456325028528680000000000000)]); + +// ./test/core/const.wast:923 +let $335 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x2000000000000100000000000)))`); + +// ./test/core/const.wast:924 +assert_return(() => invoke($335, `f`, []), [value("f64", -158456325028528680000000000000)]); + +// ./test/core/const.wast:925 +let $336 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x2000000000000100000000001)))`); + +// ./test/core/const.wast:926 +assert_return(() => invoke($336, `f`, []), [value("f64", 158456325028528700000000000000)]); + +// ./test/core/const.wast:927 +let $337 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x2000000000000100000000001)))`); + +// ./test/core/const.wast:928 +assert_return(() => invoke($337, `f`, []), [value("f64", -158456325028528700000000000000)]); + +// ./test/core/const.wast:929 +let $338 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x20000000000001fffffffffff)))`); + +// ./test/core/const.wast:930 +assert_return(() => invoke($338, `f`, []), [value("f64", 158456325028528700000000000000)]); + +// ./test/core/const.wast:931 +let $339 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x20000000000001fffffffffff)))`); + +// ./test/core/const.wast:932 +assert_return(() => invoke($339, `f`, []), [value("f64", -158456325028528700000000000000)]); + +// ./test/core/const.wast:933 +let $340 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x2000000000000200000000000)))`); + +// ./test/core/const.wast:934 +assert_return(() => invoke($340, `f`, []), [value("f64", 158456325028528700000000000000)]); + +// ./test/core/const.wast:935 +let $341 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x2000000000000200000000000)))`); + +// ./test/core/const.wast:936 +assert_return(() => invoke($341, `f`, []), [value("f64", -158456325028528700000000000000)]); + +// ./test/core/const.wast:937 +let $342 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x2000000000000200000000001)))`); + +// ./test/core/const.wast:938 +assert_return(() => invoke($342, `f`, []), [value("f64", 158456325028528700000000000000)]); + +// ./test/core/const.wast:939 +let $343 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x2000000000000200000000001)))`); + +// ./test/core/const.wast:940 +assert_return(() => invoke($343, `f`, []), [value("f64", -158456325028528700000000000000)]); + +// ./test/core/const.wast:941 +let $344 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x20000000000002fffffffffff)))`); + +// ./test/core/const.wast:942 +assert_return(() => invoke($344, `f`, []), [value("f64", 158456325028528700000000000000)]); + +// ./test/core/const.wast:943 +let $345 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x20000000000002fffffffffff)))`); + +// ./test/core/const.wast:944 +assert_return(() => invoke($345, `f`, []), [value("f64", -158456325028528700000000000000)]); + +// ./test/core/const.wast:945 +let $346 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x2000000000000300000000000)))`); + +// ./test/core/const.wast:946 +assert_return(() => invoke($346, `f`, []), [value("f64", 158456325028528750000000000000)]); + +// ./test/core/const.wast:947 +let $347 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x2000000000000300000000000)))`); + +// ./test/core/const.wast:948 +assert_return(() => invoke($347, `f`, []), [value("f64", -158456325028528750000000000000)]); + +// ./test/core/const.wast:949 +let $348 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x2000000000000300000000001)))`); + +// ./test/core/const.wast:950 +assert_return(() => invoke($348, `f`, []), [value("f64", 158456325028528750000000000000)]); + +// ./test/core/const.wast:951 +let $349 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x2000000000000300000000001)))`); + +// ./test/core/const.wast:952 +assert_return(() => invoke($349, `f`, []), [value("f64", -158456325028528750000000000000)]); + +// ./test/core/const.wast:953 +let $350 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x20000000000003fffffffffff)))`); + +// ./test/core/const.wast:954 +assert_return(() => invoke($350, `f`, []), [value("f64", 158456325028528750000000000000)]); + +// ./test/core/const.wast:955 +let $351 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x20000000000003fffffffffff)))`); + +// ./test/core/const.wast:956 +assert_return(() => invoke($351, `f`, []), [value("f64", -158456325028528750000000000000)]); + +// ./test/core/const.wast:957 +let $352 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x2000000000000400000000000)))`); + +// ./test/core/const.wast:958 +assert_return(() => invoke($352, `f`, []), [value("f64", 158456325028528750000000000000)]); + +// ./test/core/const.wast:959 +let $353 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x2000000000000400000000000)))`); + +// ./test/core/const.wast:960 +assert_return(() => invoke($353, `f`, []), [value("f64", -158456325028528750000000000000)]); + +// ./test/core/const.wast:961 +let $354 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x2000000000000400000000001)))`); + +// ./test/core/const.wast:962 +assert_return(() => invoke($354, `f`, []), [value("f64", 158456325028528750000000000000)]); + +// ./test/core/const.wast:963 +let $355 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x2000000000000400000000001)))`); + +// ./test/core/const.wast:964 +assert_return(() => invoke($355, `f`, []), [value("f64", -158456325028528750000000000000)]); + +// ./test/core/const.wast:965 +let $356 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x20000000000004fffffffffff)))`); + +// ./test/core/const.wast:966 +assert_return(() => invoke($356, `f`, []), [value("f64", 158456325028528750000000000000)]); + +// ./test/core/const.wast:967 +let $357 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x20000000000004fffffffffff)))`); + +// ./test/core/const.wast:968 +assert_return(() => invoke($357, `f`, []), [value("f64", -158456325028528750000000000000)]); + +// ./test/core/const.wast:969 +let $358 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x2000000000000500000000000)))`); + +// ./test/core/const.wast:970 +assert_return(() => invoke($358, `f`, []), [value("f64", 158456325028528750000000000000)]); + +// ./test/core/const.wast:971 +let $359 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x2000000000000500000000000)))`); + +// ./test/core/const.wast:972 +assert_return(() => invoke($359, `f`, []), [value("f64", -158456325028528750000000000000)]); + +// ./test/core/const.wast:973 +let $360 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x2000000000000500000000001)))`); + +// ./test/core/const.wast:974 +assert_return(() => invoke($360, `f`, []), [value("f64", 158456325028528780000000000000)]); + +// ./test/core/const.wast:975 +let $361 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x2000000000000500000000001)))`); + +// ./test/core/const.wast:976 +assert_return(() => invoke($361, `f`, []), [value("f64", -158456325028528780000000000000)]); + +// ./test/core/const.wast:978 +let $362 = instantiate(`(module (func (export "f") (result f64) (f64.const +1152921504606847104)))`); + +// ./test/core/const.wast:979 +assert_return(() => invoke($362, `f`, []), [value("f64", 1152921504606847000)]); + +// ./test/core/const.wast:980 +let $363 = instantiate(`(module (func (export "f") (result f64) (f64.const -1152921504606847104)))`); + +// ./test/core/const.wast:981 +assert_return(() => invoke($363, `f`, []), [value("f64", -1152921504606847000)]); + +// ./test/core/const.wast:982 +let $364 = instantiate(`(module (func (export "f") (result f64) (f64.const +1152921504606847105)))`); + +// ./test/core/const.wast:983 +assert_return(() => invoke($364, `f`, []), [value("f64", 1152921504606847200)]); + +// ./test/core/const.wast:984 +let $365 = instantiate(`(module (func (export "f") (result f64) (f64.const -1152921504606847105)))`); + +// ./test/core/const.wast:985 +assert_return(() => invoke($365, `f`, []), [value("f64", -1152921504606847200)]); + +// ./test/core/const.wast:986 +let $366 = instantiate(`(module (func (export "f") (result f64) (f64.const +1152921504606847359)))`); + +// ./test/core/const.wast:987 +assert_return(() => invoke($366, `f`, []), [value("f64", 1152921504606847200)]); + +// ./test/core/const.wast:988 +let $367 = instantiate(`(module (func (export "f") (result f64) (f64.const -1152921504606847359)))`); + +// ./test/core/const.wast:989 +assert_return(() => invoke($367, `f`, []), [value("f64", -1152921504606847200)]); + +// ./test/core/const.wast:990 +let $368 = instantiate(`(module (func (export "f") (result f64) (f64.const +1152921504606847360)))`); + +// ./test/core/const.wast:991 +assert_return(() => invoke($368, `f`, []), [value("f64", 1152921504606847500)]); + +// ./test/core/const.wast:992 +let $369 = instantiate(`(module (func (export "f") (result f64) (f64.const -1152921504606847360)))`); + +// ./test/core/const.wast:993 +assert_return(() => invoke($369, `f`, []), [value("f64", -1152921504606847500)]); + +// ./test/core/const.wast:996 +let $370 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.000000000000080000000000p-1022)))`); + +// ./test/core/const.wast:997 +assert_return(() => invoke($370, `f`, []), [value("f64", 0)]); + +// ./test/core/const.wast:998 +let $371 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.000000000000080000000000p-1022)))`); + +// ./test/core/const.wast:999 +assert_return(() => invoke($371, `f`, []), [value("f64", -0)]); + +// ./test/core/const.wast:1000 +let $372 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.000000000000080000000001p-1022)))`); + +// ./test/core/const.wast:1001 +assert_return( + () => invoke($372, `f`, []), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/const.wast:1002 +let $373 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.000000000000080000000001p-1022)))`); + +// ./test/core/const.wast:1003 +assert_return( + () => invoke($373, `f`, []), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/const.wast:1004 +let $374 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.0000000000000fffffffffffp-1022)))`); + +// ./test/core/const.wast:1005 +assert_return( + () => invoke($374, `f`, []), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/const.wast:1006 +let $375 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.0000000000000fffffffffffp-1022)))`); + +// ./test/core/const.wast:1007 +assert_return( + () => invoke($375, `f`, []), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/const.wast:1008 +let $376 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.000000000000100000000000p-1022)))`); + +// ./test/core/const.wast:1009 +assert_return( + () => invoke($376, `f`, []), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/const.wast:1010 +let $377 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.000000000000100000000000p-1022)))`); + +// ./test/core/const.wast:1011 +assert_return( + () => invoke($377, `f`, []), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/const.wast:1012 +let $378 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.000000000000100000000001p-1022)))`); + +// ./test/core/const.wast:1013 +assert_return( + () => invoke($378, `f`, []), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/const.wast:1014 +let $379 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.000000000000100000000001p-1022)))`); + +// ./test/core/const.wast:1015 +assert_return( + () => invoke($379, `f`, []), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/const.wast:1016 +let $380 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.00000000000017ffffffffffp-1022)))`); + +// ./test/core/const.wast:1017 +assert_return( + () => invoke($380, `f`, []), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/const.wast:1018 +let $381 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.00000000000017ffffffffffp-1022)))`); + +// ./test/core/const.wast:1019 +assert_return( + () => invoke($381, `f`, []), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/const.wast:1020 +let $382 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.000000000000180000000000p-1022)))`); + +// ./test/core/const.wast:1021 +assert_return( + () => invoke($382, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1022 +let $383 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.000000000000180000000000p-1022)))`); + +// ./test/core/const.wast:1023 +assert_return( + () => invoke($383, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1024 +let $384 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.000000000000180000000001p-1022)))`); + +// ./test/core/const.wast:1025 +assert_return( + () => invoke($384, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1026 +let $385 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.000000000000180000000001p-1022)))`); + +// ./test/core/const.wast:1027 +assert_return( + () => invoke($385, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1028 +let $386 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.0000000000001fffffffffffp-1022)))`); + +// ./test/core/const.wast:1029 +assert_return( + () => invoke($386, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1030 +let $387 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.0000000000001fffffffffffp-1022)))`); + +// ./test/core/const.wast:1031 +assert_return( + () => invoke($387, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1032 +let $388 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.000000000000200000000000p-1022)))`); + +// ./test/core/const.wast:1033 +assert_return( + () => invoke($388, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1034 +let $389 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.000000000000200000000000p-1022)))`); + +// ./test/core/const.wast:1035 +assert_return( + () => invoke($389, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1036 +let $390 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.000000000000200000000001p-1022)))`); + +// ./test/core/const.wast:1037 +assert_return( + () => invoke($390, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1038 +let $391 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.000000000000200000000001p-1022)))`); + +// ./test/core/const.wast:1039 +assert_return( + () => invoke($391, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1040 +let $392 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.00000000000027ffffffffffp-1022)))`); + +// ./test/core/const.wast:1041 +assert_return( + () => invoke($392, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1042 +let $393 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.00000000000027ffffffffffp-1022)))`); + +// ./test/core/const.wast:1043 +assert_return( + () => invoke($393, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1044 +let $394 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x0.000000000000280000000000p-1022)))`); + +// ./test/core/const.wast:1045 +assert_return( + () => invoke($394, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1046 +let $395 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x0.000000000000280000000000p-1022)))`); + +// ./test/core/const.wast:1047 +assert_return( + () => invoke($395, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/const.wast:1048 +let $396 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000001p-1022)))`); + +// ./test/core/const.wast:1049 +assert_return( + () => invoke($396, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507203), + ], +); + +// ./test/core/const.wast:1050 +let $397 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000001p-1022)))`); + +// ./test/core/const.wast:1051 +assert_return( + () => invoke($397, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507203), + ], +); + +// ./test/core/const.wast:1054 +let $398 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.fffffffffffff4p1023)))`); + +// ./test/core/const.wast:1055 +assert_return( + () => invoke($398, `f`, []), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:1056 +let $399 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.fffffffffffff4p1023)))`); + +// ./test/core/const.wast:1057 +assert_return( + () => invoke($399, `f`, []), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:1058 +let $400 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.fffffffffffff7ffffffp1023)))`); + +// ./test/core/const.wast:1059 +assert_return( + () => invoke($400, `f`, []), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/const.wast:1060 +let $401 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.fffffffffffff7ffffffp1023)))`); + +// ./test/core/const.wast:1061 +assert_return( + () => invoke($401, `f`, []), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/conversions.wast.js b/js/src/jit-test/tests/wasm/spec/spec/conversions.wast.js new file mode 100644 index 0000000000..b845545c23 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/conversions.wast.js @@ -0,0 +1,3109 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/conversions.wast + +// ./test/core/conversions.wast:1 +let $0 = instantiate(`(module + (func (export "i64.extend_i32_s") (param $$x i32) (result i64) (i64.extend_i32_s (local.get $$x))) + (func (export "i64.extend_i32_u") (param $$x i32) (result i64) (i64.extend_i32_u (local.get $$x))) + (func (export "i32.wrap_i64") (param $$x i64) (result i32) (i32.wrap_i64 (local.get $$x))) + (func (export "i32.trunc_f32_s") (param $$x f32) (result i32) (i32.trunc_f32_s (local.get $$x))) + (func (export "i32.trunc_f32_u") (param $$x f32) (result i32) (i32.trunc_f32_u (local.get $$x))) + (func (export "i32.trunc_f64_s") (param $$x f64) (result i32) (i32.trunc_f64_s (local.get $$x))) + (func (export "i32.trunc_f64_u") (param $$x f64) (result i32) (i32.trunc_f64_u (local.get $$x))) + (func (export "i64.trunc_f32_s") (param $$x f32) (result i64) (i64.trunc_f32_s (local.get $$x))) + (func (export "i64.trunc_f32_u") (param $$x f32) (result i64) (i64.trunc_f32_u (local.get $$x))) + (func (export "i64.trunc_f64_s") (param $$x f64) (result i64) (i64.trunc_f64_s (local.get $$x))) + (func (export "i64.trunc_f64_u") (param $$x f64) (result i64) (i64.trunc_f64_u (local.get $$x))) + (func (export "i32.trunc_sat_f32_s") (param $$x f32) (result i32) (i32.trunc_sat_f32_s (local.get $$x))) + (func (export "i32.trunc_sat_f32_u") (param $$x f32) (result i32) (i32.trunc_sat_f32_u (local.get $$x))) + (func (export "i32.trunc_sat_f64_s") (param $$x f64) (result i32) (i32.trunc_sat_f64_s (local.get $$x))) + (func (export "i32.trunc_sat_f64_u") (param $$x f64) (result i32) (i32.trunc_sat_f64_u (local.get $$x))) + (func (export "i64.trunc_sat_f32_s") (param $$x f32) (result i64) (i64.trunc_sat_f32_s (local.get $$x))) + (func (export "i64.trunc_sat_f32_u") (param $$x f32) (result i64) (i64.trunc_sat_f32_u (local.get $$x))) + (func (export "i64.trunc_sat_f64_s") (param $$x f64) (result i64) (i64.trunc_sat_f64_s (local.get $$x))) + (func (export "i64.trunc_sat_f64_u") (param $$x f64) (result i64) (i64.trunc_sat_f64_u (local.get $$x))) + (func (export "f32.convert_i32_s") (param $$x i32) (result f32) (f32.convert_i32_s (local.get $$x))) + (func (export "f32.convert_i64_s") (param $$x i64) (result f32) (f32.convert_i64_s (local.get $$x))) + (func (export "f64.convert_i32_s") (param $$x i32) (result f64) (f64.convert_i32_s (local.get $$x))) + (func (export "f64.convert_i64_s") (param $$x i64) (result f64) (f64.convert_i64_s (local.get $$x))) + (func (export "f32.convert_i32_u") (param $$x i32) (result f32) (f32.convert_i32_u (local.get $$x))) + (func (export "f32.convert_i64_u") (param $$x i64) (result f32) (f32.convert_i64_u (local.get $$x))) + (func (export "f64.convert_i32_u") (param $$x i32) (result f64) (f64.convert_i32_u (local.get $$x))) + (func (export "f64.convert_i64_u") (param $$x i64) (result f64) (f64.convert_i64_u (local.get $$x))) + (func (export "f64.promote_f32") (param $$x f32) (result f64) (f64.promote_f32 (local.get $$x))) + (func (export "f32.demote_f64") (param $$x f64) (result f32) (f32.demote_f64 (local.get $$x))) + (func (export "f32.reinterpret_i32") (param $$x i32) (result f32) (f32.reinterpret_i32 (local.get $$x))) + (func (export "f64.reinterpret_i64") (param $$x i64) (result f64) (f64.reinterpret_i64 (local.get $$x))) + (func (export "i32.reinterpret_f32") (param $$x f32) (result i32) (i32.reinterpret_f32 (local.get $$x))) + (func (export "i64.reinterpret_f64") (param $$x f64) (result i64) (i64.reinterpret_f64 (local.get $$x))) +)`); + +// ./test/core/conversions.wast:37 +assert_return(() => invoke($0, `i64.extend_i32_s`, [0]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:38 +assert_return(() => invoke($0, `i64.extend_i32_s`, [10000]), [value("i64", 10000n)]); + +// ./test/core/conversions.wast:39 +assert_return(() => invoke($0, `i64.extend_i32_s`, [-10000]), [value("i64", -10000n)]); + +// ./test/core/conversions.wast:40 +assert_return(() => invoke($0, `i64.extend_i32_s`, [-1]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:41 +assert_return(() => invoke($0, `i64.extend_i32_s`, [2147483647]), [value("i64", 2147483647n)]); + +// ./test/core/conversions.wast:42 +assert_return(() => invoke($0, `i64.extend_i32_s`, [-2147483648]), [value("i64", -2147483648n)]); + +// ./test/core/conversions.wast:44 +assert_return(() => invoke($0, `i64.extend_i32_u`, [0]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:45 +assert_return(() => invoke($0, `i64.extend_i32_u`, [10000]), [value("i64", 10000n)]); + +// ./test/core/conversions.wast:46 +assert_return(() => invoke($0, `i64.extend_i32_u`, [-10000]), [value("i64", 4294957296n)]); + +// ./test/core/conversions.wast:47 +assert_return(() => invoke($0, `i64.extend_i32_u`, [-1]), [value("i64", 4294967295n)]); + +// ./test/core/conversions.wast:48 +assert_return(() => invoke($0, `i64.extend_i32_u`, [2147483647]), [value("i64", 2147483647n)]); + +// ./test/core/conversions.wast:49 +assert_return(() => invoke($0, `i64.extend_i32_u`, [-2147483648]), [value("i64", 2147483648n)]); + +// ./test/core/conversions.wast:51 +assert_return(() => invoke($0, `i32.wrap_i64`, [-1n]), [value("i32", -1)]); + +// ./test/core/conversions.wast:52 +assert_return(() => invoke($0, `i32.wrap_i64`, [-100000n]), [value("i32", -100000)]); + +// ./test/core/conversions.wast:53 +assert_return(() => invoke($0, `i32.wrap_i64`, [2147483648n]), [value("i32", -2147483648)]); + +// ./test/core/conversions.wast:54 +assert_return(() => invoke($0, `i32.wrap_i64`, [-2147483649n]), [value("i32", 2147483647)]); + +// ./test/core/conversions.wast:55 +assert_return(() => invoke($0, `i32.wrap_i64`, [-4294967296n]), [value("i32", 0)]); + +// ./test/core/conversions.wast:56 +assert_return(() => invoke($0, `i32.wrap_i64`, [-4294967297n]), [value("i32", -1)]); + +// ./test/core/conversions.wast:57 +assert_return(() => invoke($0, `i32.wrap_i64`, [-4294967295n]), [value("i32", 1)]); + +// ./test/core/conversions.wast:58 +assert_return(() => invoke($0, `i32.wrap_i64`, [0n]), [value("i32", 0)]); + +// ./test/core/conversions.wast:59 +assert_return(() => invoke($0, `i32.wrap_i64`, [1311768467463790320n]), [value("i32", -1698898192)]); + +// ./test/core/conversions.wast:60 +assert_return(() => invoke($0, `i32.wrap_i64`, [4294967295n]), [value("i32", -1)]); + +// ./test/core/conversions.wast:61 +assert_return(() => invoke($0, `i32.wrap_i64`, [4294967296n]), [value("i32", 0)]); + +// ./test/core/conversions.wast:62 +assert_return(() => invoke($0, `i32.wrap_i64`, [4294967297n]), [value("i32", 1)]); + +// ./test/core/conversions.wast:64 +assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:65 +assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:66 +assert_return( + () => invoke($0, `i32.trunc_f32_s`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:67 +assert_return( + () => invoke($0, `i32.trunc_f32_s`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:68 +assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:69 +assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", 1.1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:70 +assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", 1.5)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:71 +assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -1)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:72 +assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -1.1)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:73 +assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -1.5)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:74 +assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -1.9)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:75 +assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -2)]), [value("i32", -2)]); + +// ./test/core/conversions.wast:76 +assert_return( + () => invoke($0, `i32.trunc_f32_s`, [value("f32", 2147483500)]), + [value("i32", 2147483520)], +); + +// ./test/core/conversions.wast:77 +assert_return( + () => invoke($0, `i32.trunc_f32_s`, [value("f32", -2147483600)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:78 +assert_trap(() => invoke($0, `i32.trunc_f32_s`, [value("f32", 2147483600)]), `integer overflow`); + +// ./test/core/conversions.wast:79 +assert_trap(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -2147484000)]), `integer overflow`); + +// ./test/core/conversions.wast:80 +assert_trap(() => invoke($0, `i32.trunc_f32_s`, [value("f32", Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:81 +assert_trap(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:82 +assert_trap( + () => invoke($0, `i32.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:83 +assert_trap( + () => invoke($0, `i32.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:84 +assert_trap( + () => invoke($0, `i32.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:85 +assert_trap( + () => invoke($0, `i32.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:87 +assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:88 +assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:89 +assert_return( + () => invoke($0, `i32.trunc_f32_u`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:90 +assert_return( + () => invoke($0, `i32.trunc_f32_u`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:91 +assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:92 +assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 1.1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:93 +assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 1.5)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:94 +assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 1.9)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:95 +assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 2)]), [value("i32", 2)]); + +// ./test/core/conversions.wast:96 +assert_return( + () => invoke($0, `i32.trunc_f32_u`, [value("f32", 2147483600)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:97 +assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 4294967000)]), [value("i32", -256)]); + +// ./test/core/conversions.wast:98 +assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", -0.9)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:99 +assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", -0.99999994)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:100 +assert_trap(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 4294967300)]), `integer overflow`); + +// ./test/core/conversions.wast:101 +assert_trap(() => invoke($0, `i32.trunc_f32_u`, [value("f32", -1)]), `integer overflow`); + +// ./test/core/conversions.wast:102 +assert_trap(() => invoke($0, `i32.trunc_f32_u`, [value("f32", Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:103 +assert_trap(() => invoke($0, `i32.trunc_f32_u`, [value("f32", -Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:104 +assert_trap( + () => invoke($0, `i32.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:105 +assert_trap( + () => invoke($0, `i32.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:106 +assert_trap( + () => invoke($0, `i32.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:107 +assert_trap( + () => invoke($0, `i32.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:109 +assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:110 +assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:111 +assert_return( + () => invoke($0, `i32.trunc_f64_s`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:112 +assert_return( + () => invoke($0, `i32.trunc_f64_s`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:113 +assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:114 +assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", 1.1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:115 +assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", 1.5)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:116 +assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -1)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:117 +assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -1.1)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:118 +assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -1.5)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:119 +assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -1.9)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:120 +assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -2)]), [value("i32", -2)]); + +// ./test/core/conversions.wast:121 +assert_return( + () => invoke($0, `i32.trunc_f64_s`, [value("f64", 2147483647)]), + [value("i32", 2147483647)], +); + +// ./test/core/conversions.wast:122 +assert_return( + () => invoke($0, `i32.trunc_f64_s`, [value("f64", -2147483648)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:123 +assert_return( + () => invoke($0, `i32.trunc_f64_s`, [value("f64", -2147483648.9)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:124 +assert_return( + () => invoke($0, `i32.trunc_f64_s`, [value("f64", 2147483647.9)]), + [value("i32", 2147483647)], +); + +// ./test/core/conversions.wast:125 +assert_trap(() => invoke($0, `i32.trunc_f64_s`, [value("f64", 2147483648)]), `integer overflow`); + +// ./test/core/conversions.wast:126 +assert_trap(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -2147483649)]), `integer overflow`); + +// ./test/core/conversions.wast:127 +assert_trap(() => invoke($0, `i32.trunc_f64_s`, [value("f64", Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:128 +assert_trap(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:129 +assert_trap( + () => invoke($0, `i32.trunc_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:130 +assert_trap( + () => invoke($0, `i32.trunc_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:131 +assert_trap( + () => invoke($0, `i32.trunc_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:132 +assert_trap( + () => invoke($0, `i32.trunc_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:134 +assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:135 +assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:136 +assert_return( + () => invoke($0, `i32.trunc_f64_u`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:137 +assert_return( + () => invoke($0, `i32.trunc_f64_u`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:138 +assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:139 +assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 1.1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:140 +assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 1.5)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:141 +assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 1.9)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:142 +assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 2)]), [value("i32", 2)]); + +// ./test/core/conversions.wast:143 +assert_return( + () => invoke($0, `i32.trunc_f64_u`, [value("f64", 2147483648)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:144 +assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 4294967295)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:145 +assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", -0.9)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:146 +assert_return( + () => invoke($0, `i32.trunc_f64_u`, [value("f64", -0.9999999999999999)]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:147 +assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 100000000)]), [value("i32", 100000000)]); + +// ./test/core/conversions.wast:148 +assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", -0.9)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:149 +assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 4294967295.9)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:150 +assert_trap(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 4294967296)]), `integer overflow`); + +// ./test/core/conversions.wast:151 +assert_trap(() => invoke($0, `i32.trunc_f64_u`, [value("f64", -1)]), `integer overflow`); + +// ./test/core/conversions.wast:152 +assert_trap(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 10000000000000000)]), `integer overflow`); + +// ./test/core/conversions.wast:153 +assert_trap( + () => invoke($0, `i32.trunc_f64_u`, [value("f64", 1000000000000000000000000000000)]), + `integer overflow`, +); + +// ./test/core/conversions.wast:154 +assert_trap( + () => invoke($0, `i32.trunc_f64_u`, [value("f64", 9223372036854776000)]), + `integer overflow`, +); + +// ./test/core/conversions.wast:155 +assert_trap(() => invoke($0, `i32.trunc_f64_u`, [value("f64", Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:156 +assert_trap(() => invoke($0, `i32.trunc_f64_u`, [value("f64", -Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:157 +assert_trap( + () => invoke($0, `i32.trunc_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:158 +assert_trap( + () => invoke($0, `i32.trunc_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:159 +assert_trap( + () => invoke($0, `i32.trunc_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:160 +assert_trap( + () => invoke($0, `i32.trunc_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:162 +assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", 0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:163 +assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:164 +assert_return( + () => invoke($0, `i64.trunc_f32_s`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:165 +assert_return( + () => invoke($0, `i64.trunc_f32_s`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:166 +assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", 1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:167 +assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", 1.1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:168 +assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", 1.5)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:169 +assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -1)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:170 +assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -1.1)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:171 +assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -1.5)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:172 +assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -1.9)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:173 +assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -2)]), [value("i64", -2n)]); + +// ./test/core/conversions.wast:174 +assert_return( + () => invoke($0, `i64.trunc_f32_s`, [value("f32", 4294967300)]), + [value("i64", 4294967296n)], +); + +// ./test/core/conversions.wast:175 +assert_return( + () => invoke($0, `i64.trunc_f32_s`, [value("f32", -4294967300)]), + [value("i64", -4294967296n)], +); + +// ./test/core/conversions.wast:176 +assert_return( + () => invoke($0, `i64.trunc_f32_s`, [value("f32", 9223371500000000000)]), + [value("i64", 9223371487098961920n)], +); + +// ./test/core/conversions.wast:177 +assert_return( + () => invoke($0, `i64.trunc_f32_s`, [value("f32", -9223372000000000000)]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/conversions.wast:178 +assert_trap( + () => invoke($0, `i64.trunc_f32_s`, [value("f32", 9223372000000000000)]), + `integer overflow`, +); + +// ./test/core/conversions.wast:179 +assert_trap( + () => invoke($0, `i64.trunc_f32_s`, [value("f32", -9223373000000000000)]), + `integer overflow`, +); + +// ./test/core/conversions.wast:180 +assert_trap(() => invoke($0, `i64.trunc_f32_s`, [value("f32", Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:181 +assert_trap(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:182 +assert_trap( + () => invoke($0, `i64.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:183 +assert_trap( + () => invoke($0, `i64.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:184 +assert_trap( + () => invoke($0, `i64.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:185 +assert_trap( + () => invoke($0, `i64.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:187 +assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", 0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:188 +assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", -0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:189 +assert_return( + () => invoke($0, `i64.trunc_f32_u`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:190 +assert_return( + () => invoke($0, `i64.trunc_f32_u`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:191 +assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", 1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:192 +assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", 1.1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:193 +assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", 1.5)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:194 +assert_return( + () => invoke($0, `i64.trunc_f32_u`, [value("f32", 4294967300)]), + [value("i64", 4294967296n)], +); + +// ./test/core/conversions.wast:195 +assert_return( + () => invoke($0, `i64.trunc_f32_u`, [value("f32", 18446743000000000000)]), + [value("i64", -1099511627776n)], +); + +// ./test/core/conversions.wast:196 +assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", -0.9)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:197 +assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", -0.99999994)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:198 +assert_trap( + () => invoke($0, `i64.trunc_f32_u`, [value("f32", 18446744000000000000)]), + `integer overflow`, +); + +// ./test/core/conversions.wast:199 +assert_trap(() => invoke($0, `i64.trunc_f32_u`, [value("f32", -1)]), `integer overflow`); + +// ./test/core/conversions.wast:200 +assert_trap(() => invoke($0, `i64.trunc_f32_u`, [value("f32", Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:201 +assert_trap(() => invoke($0, `i64.trunc_f32_u`, [value("f32", -Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:202 +assert_trap( + () => invoke($0, `i64.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:203 +assert_trap( + () => invoke($0, `i64.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:204 +assert_trap( + () => invoke($0, `i64.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:205 +assert_trap( + () => invoke($0, `i64.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:207 +assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", 0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:208 +assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:209 +assert_return( + () => invoke($0, `i64.trunc_f64_s`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:210 +assert_return( + () => invoke($0, `i64.trunc_f64_s`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:211 +assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", 1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:212 +assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", 1.1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:213 +assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", 1.5)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:214 +assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -1)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:215 +assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -1.1)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:216 +assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -1.5)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:217 +assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -1.9)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:218 +assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -2)]), [value("i64", -2n)]); + +// ./test/core/conversions.wast:219 +assert_return( + () => invoke($0, `i64.trunc_f64_s`, [value("f64", 4294967296)]), + [value("i64", 4294967296n)], +); + +// ./test/core/conversions.wast:220 +assert_return( + () => invoke($0, `i64.trunc_f64_s`, [value("f64", -4294967296)]), + [value("i64", -4294967296n)], +); + +// ./test/core/conversions.wast:221 +assert_return( + () => invoke($0, `i64.trunc_f64_s`, [value("f64", 9223372036854775000)]), + [value("i64", 9223372036854774784n)], +); + +// ./test/core/conversions.wast:222 +assert_return( + () => invoke($0, `i64.trunc_f64_s`, [value("f64", -9223372036854776000)]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/conversions.wast:223 +assert_trap( + () => invoke($0, `i64.trunc_f64_s`, [value("f64", 9223372036854776000)]), + `integer overflow`, +); + +// ./test/core/conversions.wast:224 +assert_trap( + () => invoke($0, `i64.trunc_f64_s`, [value("f64", -9223372036854778000)]), + `integer overflow`, +); + +// ./test/core/conversions.wast:225 +assert_trap(() => invoke($0, `i64.trunc_f64_s`, [value("f64", Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:226 +assert_trap(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:227 +assert_trap( + () => invoke($0, `i64.trunc_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:228 +assert_trap( + () => invoke($0, `i64.trunc_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:229 +assert_trap( + () => invoke($0, `i64.trunc_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:230 +assert_trap( + () => invoke($0, `i64.trunc_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:232 +assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", 0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:233 +assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", -0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:234 +assert_return( + () => invoke($0, `i64.trunc_f64_u`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:235 +assert_return( + () => invoke($0, `i64.trunc_f64_u`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:236 +assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", 1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:237 +assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", 1.1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:238 +assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", 1.5)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:239 +assert_return( + () => invoke($0, `i64.trunc_f64_u`, [value("f64", 4294967295)]), + [value("i64", 4294967295n)], +); + +// ./test/core/conversions.wast:240 +assert_return( + () => invoke($0, `i64.trunc_f64_u`, [value("f64", 4294967296)]), + [value("i64", 4294967296n)], +); + +// ./test/core/conversions.wast:241 +assert_return( + () => invoke($0, `i64.trunc_f64_u`, [value("f64", 18446744073709550000)]), + [value("i64", -2048n)], +); + +// ./test/core/conversions.wast:242 +assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", -0.9)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:243 +assert_return( + () => invoke($0, `i64.trunc_f64_u`, [value("f64", -0.9999999999999999)]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:244 +assert_return( + () => invoke($0, `i64.trunc_f64_u`, [value("f64", 100000000)]), + [value("i64", 100000000n)], +); + +// ./test/core/conversions.wast:245 +assert_return( + () => invoke($0, `i64.trunc_f64_u`, [value("f64", 10000000000000000)]), + [value("i64", 10000000000000000n)], +); + +// ./test/core/conversions.wast:246 +assert_return( + () => invoke($0, `i64.trunc_f64_u`, [value("f64", 9223372036854776000)]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/conversions.wast:247 +assert_trap( + () => invoke($0, `i64.trunc_f64_u`, [value("f64", 18446744073709552000)]), + `integer overflow`, +); + +// ./test/core/conversions.wast:248 +assert_trap(() => invoke($0, `i64.trunc_f64_u`, [value("f64", -1)]), `integer overflow`); + +// ./test/core/conversions.wast:249 +assert_trap(() => invoke($0, `i64.trunc_f64_u`, [value("f64", Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:250 +assert_trap(() => invoke($0, `i64.trunc_f64_u`, [value("f64", -Infinity)]), `integer overflow`); + +// ./test/core/conversions.wast:251 +assert_trap( + () => invoke($0, `i64.trunc_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:252 +assert_trap( + () => invoke($0, `i64.trunc_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:253 +assert_trap( + () => invoke($0, `i64.trunc_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:254 +assert_trap( + () => invoke($0, `i64.trunc_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/conversions.wast:256 +assert_return(() => invoke($0, `f32.convert_i32_s`, [1]), [value("f32", 1)]); + +// ./test/core/conversions.wast:257 +assert_return(() => invoke($0, `f32.convert_i32_s`, [-1]), [value("f32", -1)]); + +// ./test/core/conversions.wast:258 +assert_return(() => invoke($0, `f32.convert_i32_s`, [0]), [value("f32", 0)]); + +// ./test/core/conversions.wast:259 +assert_return(() => invoke($0, `f32.convert_i32_s`, [2147483647]), [value("f32", 2147483600)]); + +// ./test/core/conversions.wast:260 +assert_return(() => invoke($0, `f32.convert_i32_s`, [-2147483648]), [value("f32", -2147483600)]); + +// ./test/core/conversions.wast:261 +assert_return(() => invoke($0, `f32.convert_i32_s`, [1234567890]), [value("f32", 1234568000)]); + +// ./test/core/conversions.wast:265 +assert_return(() => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:266 +assert_return(() => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:267 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_s`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:268 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_s`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:269 +assert_return(() => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:270 +assert_return(() => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", 1.1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:271 +assert_return(() => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", 1.5)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:272 +assert_return(() => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", -1)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:273 +assert_return(() => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", -1.1)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:274 +assert_return(() => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", -1.5)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:275 +assert_return(() => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", -1.9)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:276 +assert_return(() => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", -2)]), [value("i32", -2)]); + +// ./test/core/conversions.wast:277 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", 2147483500)]), + [value("i32", 2147483520)], +); + +// ./test/core/conversions.wast:278 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", -2147483600)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:279 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", 2147483600)]), + [value("i32", 2147483647)], +); + +// ./test/core/conversions.wast:280 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", -2147484000)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:281 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", Infinity)]), + [value("i32", 2147483647)], +); + +// ./test/core/conversions.wast:282 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_s`, [value("f32", -Infinity)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:283 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:284 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_s`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:285 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:286 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_s`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:288 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:289 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:290 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_u`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:291 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_u`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:292 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:293 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", 1.1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:294 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", 1.5)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:295 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", 1.9)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:296 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", 2)]), [value("i32", 2)]); + +// ./test/core/conversions.wast:297 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", 2147483600)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:298 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", 4294967000)]), [value("i32", -256)]); + +// ./test/core/conversions.wast:299 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", -0.9)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:300 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", -0.99999994)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:301 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", 4294967300)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:302 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:303 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", Infinity)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:304 +assert_return(() => invoke($0, `i32.trunc_sat_f32_u`, [value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:305 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:306 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_u`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:307 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:308 +assert_return( + () => invoke($0, `i32.trunc_sat_f32_u`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:310 +assert_return(() => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:311 +assert_return(() => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:312 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_s`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:313 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_s`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:314 +assert_return(() => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:315 +assert_return(() => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", 1.1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:316 +assert_return(() => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", 1.5)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:317 +assert_return(() => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", -1)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:318 +assert_return(() => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", -1.1)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:319 +assert_return(() => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", -1.5)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:320 +assert_return(() => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", -1.9)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:321 +assert_return(() => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", -2)]), [value("i32", -2)]); + +// ./test/core/conversions.wast:322 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", 2147483647)]), + [value("i32", 2147483647)], +); + +// ./test/core/conversions.wast:323 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", -2147483648)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:324 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", 2147483648)]), + [value("i32", 2147483647)], +); + +// ./test/core/conversions.wast:325 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", -2147483649)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:326 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", Infinity)]), + [value("i32", 2147483647)], +); + +// ./test/core/conversions.wast:327 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_s`, [value("f64", -Infinity)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:328 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:329 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:330 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:331 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:333 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:334 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:335 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_u`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:336 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_u`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:337 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:338 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", 1.1)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:339 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", 1.5)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:340 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", 1.9)]), [value("i32", 1)]); + +// ./test/core/conversions.wast:341 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", 2)]), [value("i32", 2)]); + +// ./test/core/conversions.wast:342 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", 2147483648)]), + [value("i32", -2147483648)], +); + +// ./test/core/conversions.wast:343 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", 4294967295)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:344 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", -0.9)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:345 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", -0.9999999999999999)]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:346 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", 100000000)]), + [value("i32", 100000000)], +); + +// ./test/core/conversions.wast:347 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", 4294967296)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:348 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:349 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", 10000000000000000)]), + [value("i32", -1)], +); + +// ./test/core/conversions.wast:350 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_u`, [ + value("f64", 1000000000000000000000000000000), + ]), + [value("i32", -1)], +); + +// ./test/core/conversions.wast:351 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", 9223372036854776000)]), + [value("i32", -1)], +); + +// ./test/core/conversions.wast:352 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", Infinity)]), [value("i32", -1)]); + +// ./test/core/conversions.wast:353 +assert_return(() => invoke($0, `i32.trunc_sat_f64_u`, [value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:354 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:355 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:356 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:357 +assert_return( + () => invoke($0, `i32.trunc_sat_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/conversions.wast:359 +assert_return(() => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", 0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:360 +assert_return(() => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", -0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:361 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:362 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:363 +assert_return(() => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", 1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:364 +assert_return(() => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", 1.1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:365 +assert_return(() => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", 1.5)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:366 +assert_return(() => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", -1)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:367 +assert_return(() => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", -1.1)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:368 +assert_return(() => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", -1.5)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:369 +assert_return(() => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", -1.9)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:370 +assert_return(() => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", -2)]), [value("i64", -2n)]); + +// ./test/core/conversions.wast:371 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", 4294967300)]), + [value("i64", 4294967296n)], +); + +// ./test/core/conversions.wast:372 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", -4294967300)]), + [value("i64", -4294967296n)], +); + +// ./test/core/conversions.wast:373 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", 9223371500000000000)]), + [value("i64", 9223371487098961920n)], +); + +// ./test/core/conversions.wast:374 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", -9223372000000000000)]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/conversions.wast:375 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", 9223372000000000000)]), + [value("i64", 9223372036854775807n)], +); + +// ./test/core/conversions.wast:376 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", -9223373000000000000)]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/conversions.wast:377 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", Infinity)]), + [value("i64", 9223372036854775807n)], +); + +// ./test/core/conversions.wast:378 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [value("f32", -Infinity)]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/conversions.wast:379 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:380 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:381 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:382 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_s`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:384 +assert_return(() => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", 0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:385 +assert_return(() => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", -0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:386 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_u`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:387 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_u`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:388 +assert_return(() => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", 1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:389 +assert_return(() => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", 1.1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:390 +assert_return(() => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", 1.5)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:391 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", 4294967300)]), + [value("i64", 4294967296n)], +); + +// ./test/core/conversions.wast:392 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", 18446743000000000000)]), + [value("i64", -1099511627776n)], +); + +// ./test/core/conversions.wast:393 +assert_return(() => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", -0.9)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:394 +assert_return(() => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", -0.99999994)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:395 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", 18446744000000000000)]), + [value("i64", -1n)], +); + +// ./test/core/conversions.wast:396 +assert_return(() => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", -1)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:397 +assert_return(() => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", Infinity)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:398 +assert_return(() => invoke($0, `i64.trunc_sat_f32_u`, [value("f32", -Infinity)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:399 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:400 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_u`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:401 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:402 +assert_return( + () => invoke($0, `i64.trunc_sat_f32_u`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:404 +assert_return(() => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", 0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:405 +assert_return(() => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", -0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:406 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:407 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:408 +assert_return(() => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", 1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:409 +assert_return(() => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", 1.1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:410 +assert_return(() => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", 1.5)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:411 +assert_return(() => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", -1)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:412 +assert_return(() => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", -1.1)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:413 +assert_return(() => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", -1.5)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:414 +assert_return(() => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", -1.9)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:415 +assert_return(() => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", -2)]), [value("i64", -2n)]); + +// ./test/core/conversions.wast:416 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", 4294967296)]), + [value("i64", 4294967296n)], +); + +// ./test/core/conversions.wast:417 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", -4294967296)]), + [value("i64", -4294967296n)], +); + +// ./test/core/conversions.wast:418 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", 9223372036854775000)]), + [value("i64", 9223372036854774784n)], +); + +// ./test/core/conversions.wast:419 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", -9223372036854776000)]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/conversions.wast:420 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", 9223372036854776000)]), + [value("i64", 9223372036854775807n)], +); + +// ./test/core/conversions.wast:421 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", -9223372036854778000)]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/conversions.wast:422 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", Infinity)]), + [value("i64", 9223372036854775807n)], +); + +// ./test/core/conversions.wast:423 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [value("f64", -Infinity)]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/conversions.wast:424 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:425 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:426 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:427 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:429 +assert_return(() => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", 0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:430 +assert_return(() => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", -0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:431 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:432 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:433 +assert_return(() => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", 1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:434 +assert_return(() => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", 1.1)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:435 +assert_return(() => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", 1.5)]), [value("i64", 1n)]); + +// ./test/core/conversions.wast:436 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", 4294967295)]), + [value("i64", 4294967295n)], +); + +// ./test/core/conversions.wast:437 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", 4294967296)]), + [value("i64", 4294967296n)], +); + +// ./test/core/conversions.wast:438 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", 18446744073709550000)]), + [value("i64", -2048n)], +); + +// ./test/core/conversions.wast:439 +assert_return(() => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", -0.9)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:440 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", -0.9999999999999999)]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:441 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", 100000000)]), + [value("i64", 100000000n)], +); + +// ./test/core/conversions.wast:442 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", 10000000000000000)]), + [value("i64", 10000000000000000n)], +); + +// ./test/core/conversions.wast:443 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", 9223372036854776000)]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/conversions.wast:444 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", 18446744073709552000)]), + [value("i64", -1n)], +); + +// ./test/core/conversions.wast:445 +assert_return(() => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", -1)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:446 +assert_return(() => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", Infinity)]), [value("i64", -1n)]); + +// ./test/core/conversions.wast:447 +assert_return(() => invoke($0, `i64.trunc_sat_f64_u`, [value("f64", -Infinity)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:448 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:449 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:450 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:451 +assert_return( + () => invoke($0, `i64.trunc_sat_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i64", 0n)], +); + +// ./test/core/conversions.wast:454 +assert_return(() => invoke($0, `f32.convert_i32_s`, [16777217]), [value("f32", 16777216)]); + +// ./test/core/conversions.wast:455 +assert_return(() => invoke($0, `f32.convert_i32_s`, [-16777217]), [value("f32", -16777216)]); + +// ./test/core/conversions.wast:456 +assert_return(() => invoke($0, `f32.convert_i32_s`, [16777219]), [value("f32", 16777220)]); + +// ./test/core/conversions.wast:457 +assert_return(() => invoke($0, `f32.convert_i32_s`, [-16777219]), [value("f32", -16777220)]); + +// ./test/core/conversions.wast:459 +assert_return(() => invoke($0, `f32.convert_i64_s`, [1n]), [value("f32", 1)]); + +// ./test/core/conversions.wast:460 +assert_return(() => invoke($0, `f32.convert_i64_s`, [-1n]), [value("f32", -1)]); + +// ./test/core/conversions.wast:461 +assert_return(() => invoke($0, `f32.convert_i64_s`, [0n]), [value("f32", 0)]); + +// ./test/core/conversions.wast:462 +assert_return( + () => invoke($0, `f32.convert_i64_s`, [9223372036854775807n]), + [value("f32", 9223372000000000000)], +); + +// ./test/core/conversions.wast:463 +assert_return( + () => invoke($0, `f32.convert_i64_s`, [-9223372036854775808n]), + [value("f32", -9223372000000000000)], +); + +// ./test/core/conversions.wast:464 +assert_return( + () => invoke($0, `f32.convert_i64_s`, [314159265358979n]), + [value("f32", 314159280000000)], +); + +// ./test/core/conversions.wast:466 +assert_return(() => invoke($0, `f32.convert_i64_s`, [16777217n]), [value("f32", 16777216)]); + +// ./test/core/conversions.wast:467 +assert_return(() => invoke($0, `f32.convert_i64_s`, [-16777217n]), [value("f32", -16777216)]); + +// ./test/core/conversions.wast:468 +assert_return(() => invoke($0, `f32.convert_i64_s`, [16777219n]), [value("f32", 16777220)]); + +// ./test/core/conversions.wast:469 +assert_return(() => invoke($0, `f32.convert_i64_s`, [-16777219n]), [value("f32", -16777220)]); + +// ./test/core/conversions.wast:471 +assert_return( + () => invoke($0, `f32.convert_i64_s`, [9223371212221054977n]), + [value("f32", 9223371500000000000)], +); + +// ./test/core/conversions.wast:472 +assert_return( + () => invoke($0, `f32.convert_i64_s`, [-9223371761976868863n]), + [value("f32", -9223371500000000000)], +); + +// ./test/core/conversions.wast:473 +assert_return( + () => invoke($0, `f32.convert_i64_s`, [9007199791611905n]), + [value("f32", 9007200000000000)], +); + +// ./test/core/conversions.wast:474 +assert_return( + () => invoke($0, `f32.convert_i64_s`, [-9007199791611905n]), + [value("f32", -9007200000000000)], +); + +// ./test/core/conversions.wast:476 +assert_return(() => invoke($0, `f64.convert_i32_s`, [1]), [value("f64", 1)]); + +// ./test/core/conversions.wast:477 +assert_return(() => invoke($0, `f64.convert_i32_s`, [-1]), [value("f64", -1)]); + +// ./test/core/conversions.wast:478 +assert_return(() => invoke($0, `f64.convert_i32_s`, [0]), [value("f64", 0)]); + +// ./test/core/conversions.wast:479 +assert_return(() => invoke($0, `f64.convert_i32_s`, [2147483647]), [value("f64", 2147483647)]); + +// ./test/core/conversions.wast:480 +assert_return(() => invoke($0, `f64.convert_i32_s`, [-2147483648]), [value("f64", -2147483648)]); + +// ./test/core/conversions.wast:481 +assert_return(() => invoke($0, `f64.convert_i32_s`, [987654321]), [value("f64", 987654321)]); + +// ./test/core/conversions.wast:483 +assert_return(() => invoke($0, `f64.convert_i64_s`, [1n]), [value("f64", 1)]); + +// ./test/core/conversions.wast:484 +assert_return(() => invoke($0, `f64.convert_i64_s`, [-1n]), [value("f64", -1)]); + +// ./test/core/conversions.wast:485 +assert_return(() => invoke($0, `f64.convert_i64_s`, [0n]), [value("f64", 0)]); + +// ./test/core/conversions.wast:486 +assert_return( + () => invoke($0, `f64.convert_i64_s`, [9223372036854775807n]), + [value("f64", 9223372036854776000)], +); + +// ./test/core/conversions.wast:487 +assert_return( + () => invoke($0, `f64.convert_i64_s`, [-9223372036854775808n]), + [value("f64", -9223372036854776000)], +); + +// ./test/core/conversions.wast:488 +assert_return( + () => invoke($0, `f64.convert_i64_s`, [4669201609102990n]), + [value("f64", 4669201609102990)], +); + +// ./test/core/conversions.wast:490 +assert_return( + () => invoke($0, `f64.convert_i64_s`, [9007199254740993n]), + [value("f64", 9007199254740992)], +); + +// ./test/core/conversions.wast:491 +assert_return( + () => invoke($0, `f64.convert_i64_s`, [-9007199254740993n]), + [value("f64", -9007199254740992)], +); + +// ./test/core/conversions.wast:492 +assert_return( + () => invoke($0, `f64.convert_i64_s`, [9007199254740995n]), + [value("f64", 9007199254740996)], +); + +// ./test/core/conversions.wast:493 +assert_return( + () => invoke($0, `f64.convert_i64_s`, [-9007199254740995n]), + [value("f64", -9007199254740996)], +); + +// ./test/core/conversions.wast:495 +assert_return(() => invoke($0, `f32.convert_i32_u`, [1]), [value("f32", 1)]); + +// ./test/core/conversions.wast:496 +assert_return(() => invoke($0, `f32.convert_i32_u`, [0]), [value("f32", 0)]); + +// ./test/core/conversions.wast:497 +assert_return(() => invoke($0, `f32.convert_i32_u`, [2147483647]), [value("f32", 2147483600)]); + +// ./test/core/conversions.wast:498 +assert_return(() => invoke($0, `f32.convert_i32_u`, [-2147483648]), [value("f32", 2147483600)]); + +// ./test/core/conversions.wast:499 +assert_return(() => invoke($0, `f32.convert_i32_u`, [305419896]), [value("f32", 305419900)]); + +// ./test/core/conversions.wast:500 +assert_return(() => invoke($0, `f32.convert_i32_u`, [-1]), [value("f32", 4294967300)]); + +// ./test/core/conversions.wast:501 +assert_return(() => invoke($0, `f32.convert_i32_u`, [-2147483520]), [value("f32", 2147483600)]); + +// ./test/core/conversions.wast:502 +assert_return(() => invoke($0, `f32.convert_i32_u`, [-2147483519]), [value("f32", 2147484000)]); + +// ./test/core/conversions.wast:503 +assert_return(() => invoke($0, `f32.convert_i32_u`, [-2147483518]), [value("f32", 2147484000)]); + +// ./test/core/conversions.wast:504 +assert_return(() => invoke($0, `f32.convert_i32_u`, [-384]), [value("f32", 4294966800)]); + +// ./test/core/conversions.wast:505 +assert_return(() => invoke($0, `f32.convert_i32_u`, [-383]), [value("f32", 4294967000)]); + +// ./test/core/conversions.wast:506 +assert_return(() => invoke($0, `f32.convert_i32_u`, [-382]), [value("f32", 4294967000)]); + +// ./test/core/conversions.wast:508 +assert_return(() => invoke($0, `f32.convert_i32_u`, [16777217]), [value("f32", 16777216)]); + +// ./test/core/conversions.wast:509 +assert_return(() => invoke($0, `f32.convert_i32_u`, [16777219]), [value("f32", 16777220)]); + +// ./test/core/conversions.wast:511 +assert_return(() => invoke($0, `f32.convert_i64_u`, [1n]), [value("f32", 1)]); + +// ./test/core/conversions.wast:512 +assert_return(() => invoke($0, `f32.convert_i64_u`, [0n]), [value("f32", 0)]); + +// ./test/core/conversions.wast:513 +assert_return( + () => invoke($0, `f32.convert_i64_u`, [9223372036854775807n]), + [value("f32", 9223372000000000000)], +); + +// ./test/core/conversions.wast:514 +assert_return( + () => invoke($0, `f32.convert_i64_u`, [-9223372036854775808n]), + [value("f32", 9223372000000000000)], +); + +// ./test/core/conversions.wast:515 +assert_return(() => invoke($0, `f32.convert_i64_u`, [-1n]), [value("f32", 18446744000000000000)]); + +// ./test/core/conversions.wast:517 +assert_return(() => invoke($0, `f32.convert_i64_u`, [16777217n]), [value("f32", 16777216)]); + +// ./test/core/conversions.wast:518 +assert_return(() => invoke($0, `f32.convert_i64_u`, [16777219n]), [value("f32", 16777220)]); + +// ./test/core/conversions.wast:520 +assert_return( + () => invoke($0, `f32.convert_i64_u`, [9007199791611905n]), + [value("f32", 9007200000000000)], +); + +// ./test/core/conversions.wast:521 +assert_return( + () => invoke($0, `f32.convert_i64_u`, [9223371761976868863n]), + [value("f32", 9223371500000000000)], +); + +// ./test/core/conversions.wast:522 +assert_return( + () => invoke($0, `f32.convert_i64_u`, [-9223371487098961919n]), + [value("f32", 9223373000000000000)], +); + +// ./test/core/conversions.wast:523 +assert_return( + () => invoke($0, `f32.convert_i64_u`, [-1649267441663n]), + [value("f32", 18446743000000000000)], +); + +// ./test/core/conversions.wast:525 +assert_return(() => invoke($0, `f64.convert_i32_u`, [1]), [value("f64", 1)]); + +// ./test/core/conversions.wast:526 +assert_return(() => invoke($0, `f64.convert_i32_u`, [0]), [value("f64", 0)]); + +// ./test/core/conversions.wast:527 +assert_return(() => invoke($0, `f64.convert_i32_u`, [2147483647]), [value("f64", 2147483647)]); + +// ./test/core/conversions.wast:528 +assert_return(() => invoke($0, `f64.convert_i32_u`, [-2147483648]), [value("f64", 2147483648)]); + +// ./test/core/conversions.wast:529 +assert_return(() => invoke($0, `f64.convert_i32_u`, [-1]), [value("f64", 4294967295)]); + +// ./test/core/conversions.wast:531 +assert_return(() => invoke($0, `f64.convert_i64_u`, [1n]), [value("f64", 1)]); + +// ./test/core/conversions.wast:532 +assert_return(() => invoke($0, `f64.convert_i64_u`, [0n]), [value("f64", 0)]); + +// ./test/core/conversions.wast:533 +assert_return( + () => invoke($0, `f64.convert_i64_u`, [9223372036854775807n]), + [value("f64", 9223372036854776000)], +); + +// ./test/core/conversions.wast:534 +assert_return( + () => invoke($0, `f64.convert_i64_u`, [-9223372036854775808n]), + [value("f64", 9223372036854776000)], +); + +// ./test/core/conversions.wast:535 +assert_return(() => invoke($0, `f64.convert_i64_u`, [-1n]), [value("f64", 18446744073709552000)]); + +// ./test/core/conversions.wast:536 +assert_return( + () => invoke($0, `f64.convert_i64_u`, [-9223372036854774784n]), + [value("f64", 9223372036854776000)], +); + +// ./test/core/conversions.wast:537 +assert_return( + () => invoke($0, `f64.convert_i64_u`, [-9223372036854774783n]), + [value("f64", 9223372036854778000)], +); + +// ./test/core/conversions.wast:538 +assert_return( + () => invoke($0, `f64.convert_i64_u`, [-9223372036854774782n]), + [value("f64", 9223372036854778000)], +); + +// ./test/core/conversions.wast:539 +assert_return(() => invoke($0, `f64.convert_i64_u`, [-3072n]), [value("f64", 18446744073709548000)]); + +// ./test/core/conversions.wast:540 +assert_return(() => invoke($0, `f64.convert_i64_u`, [-3071n]), [value("f64", 18446744073709550000)]); + +// ./test/core/conversions.wast:541 +assert_return(() => invoke($0, `f64.convert_i64_u`, [-3070n]), [value("f64", 18446744073709550000)]); + +// ./test/core/conversions.wast:543 +assert_return( + () => invoke($0, `f64.convert_i64_u`, [9007199254740993n]), + [value("f64", 9007199254740992)], +); + +// ./test/core/conversions.wast:544 +assert_return( + () => invoke($0, `f64.convert_i64_u`, [9007199254740995n]), + [value("f64", 9007199254740996)], +); + +// ./test/core/conversions.wast:546 +assert_return(() => invoke($0, `f64.promote_f32`, [value("f32", 0)]), [value("f64", 0)]); + +// ./test/core/conversions.wast:547 +assert_return(() => invoke($0, `f64.promote_f32`, [value("f32", -0)]), [value("f64", -0)]); + +// ./test/core/conversions.wast:548 +assert_return( + () => invoke($0, `f64.promote_f32`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f64", 0.000000000000000000000000000000000000000000001401298464324817)], +); + +// ./test/core/conversions.wast:549 +assert_return( + () => invoke($0, `f64.promote_f32`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000001401298464324817), + ], +); + +// ./test/core/conversions.wast:550 +assert_return(() => invoke($0, `f64.promote_f32`, [value("f32", 1)]), [value("f64", 1)]); + +// ./test/core/conversions.wast:551 +assert_return(() => invoke($0, `f64.promote_f32`, [value("f32", -1)]), [value("f64", -1)]); + +// ./test/core/conversions.wast:552 +assert_return( + () => invoke($0, `f64.promote_f32`, [ + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f64", -340282346638528860000000000000000000000)], +); + +// ./test/core/conversions.wast:553 +assert_return( + () => invoke($0, `f64.promote_f32`, [ + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f64", 340282346638528860000000000000000000000)], +); + +// ./test/core/conversions.wast:555 +assert_return( + () => invoke($0, `f64.promote_f32`, [ + value("f32", 0.0000000000000000000000000000000000015046328), + ]), + [value("f64", 0.000000000000000000000000000000000001504632769052528)], +); + +// ./test/core/conversions.wast:557 +assert_return( + () => invoke($0, `f64.promote_f32`, [ + value("f32", 66382537000000000000000000000000000000), + ]), + [value("f64", 66382536710104395000000000000000000000)], +); + +// ./test/core/conversions.wast:558 +assert_return(() => invoke($0, `f64.promote_f32`, [value("f32", Infinity)]), [value("f64", Infinity)]); + +// ./test/core/conversions.wast:559 +assert_return(() => invoke($0, `f64.promote_f32`, [value("f32", -Infinity)]), [value("f64", -Infinity)]); + +// ./test/core/conversions.wast:560 +assert_return( + () => invoke($0, `f64.promote_f32`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/conversions.wast:561 +assert_return( + () => invoke($0, `f64.promote_f32`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/conversions.wast:562 +assert_return( + () => invoke($0, `f64.promote_f32`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/conversions.wast:563 +assert_return( + () => invoke($0, `f64.promote_f32`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/conversions.wast:565 +assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", 0)]), [value("f32", 0)]); + +// ./test/core/conversions.wast:566 +assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", -0)]), [value("f32", -0)]); + +// ./test/core/conversions.wast:567 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f32", 0)], +); + +// ./test/core/conversions.wast:568 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f32", -0)], +); + +// ./test/core/conversions.wast:569 +assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", 1)]), [value("f32", 1)]); + +// ./test/core/conversions.wast:570 +assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", -1)]), [value("f32", -1)]); + +// ./test/core/conversions.wast:571 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 0.000000000000000000000000000000000000011754942807573643), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/conversions.wast:572 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -0.000000000000000000000000000000000000011754942807573643), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/conversions.wast:573 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 0.000000000000000000000000000000000000011754942807573642), + ]), + [value("f32", 0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/conversions.wast:574 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -0.000000000000000000000000000000000000011754942807573642), + ]), + [value("f32", -0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/conversions.wast:575 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 0.000000000000000000000000000000000000000000001401298464324817), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/conversions.wast:576 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -0.000000000000000000000000000000000000000000001401298464324817), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/conversions.wast:577 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 340282336497324060000000000000000000000), + ]), + [value("f32", 340282330000000000000000000000000000000)], +); + +// ./test/core/conversions.wast:578 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -340282336497324060000000000000000000000), + ]), + [value("f32", -340282330000000000000000000000000000000)], +); + +// ./test/core/conversions.wast:579 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 340282336497324100000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/conversions.wast:580 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -340282336497324100000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/conversions.wast:581 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 340282346638528860000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/conversions.wast:582 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -340282346638528860000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/conversions.wast:583 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 340282356779733620000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/conversions.wast:584 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -340282356779733620000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/conversions.wast:585 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 340282356779733660000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/conversions.wast:586 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -340282356779733660000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/conversions.wast:587 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 0.000000000000000000000000000000000001504632769052528), + ]), + [value("f32", 0.0000000000000000000000000000000000015046328)], +); + +// ./test/core/conversions.wast:588 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 66382536710104395000000000000000000000), + ]), + [value("f32", 66382537000000000000000000000000000000)], +); + +// ./test/core/conversions.wast:589 +assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", Infinity)]), [value("f32", Infinity)]); + +// ./test/core/conversions.wast:590 +assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", -Infinity)]), [value("f32", -Infinity)]); + +// ./test/core/conversions.wast:591 +assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", 1.0000000000000002)]), [value("f32", 1)]); + +// ./test/core/conversions.wast:592 +assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", 0.9999999999999999)]), [value("f32", 1)]); + +// ./test/core/conversions.wast:593 +assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", 1.0000000596046448)]), [value("f32", 1)]); + +// ./test/core/conversions.wast:594 +assert_return( + () => invoke($0, `f32.demote_f64`, [value("f64", 1.000000059604645)]), + [value("f32", 1.0000001)], +); + +// ./test/core/conversions.wast:595 +assert_return( + () => invoke($0, `f32.demote_f64`, [value("f64", 1.000000178813934)]), + [value("f32", 1.0000001)], +); + +// ./test/core/conversions.wast:596 +assert_return( + () => invoke($0, `f32.demote_f64`, [value("f64", 1.0000001788139343)]), + [value("f32", 1.0000002)], +); + +// ./test/core/conversions.wast:597 +assert_return( + () => invoke($0, `f32.demote_f64`, [value("f64", 1.0000002980232239)]), + [value("f32", 1.0000002)], +); + +// ./test/core/conversions.wast:598 +assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", 16777217)]), [value("f32", 16777216)]); + +// ./test/core/conversions.wast:599 +assert_return( + () => invoke($0, `f32.demote_f64`, [value("f64", 16777217.000000004)]), + [value("f32", 16777218)], +); + +// ./test/core/conversions.wast:600 +assert_return( + () => invoke($0, `f32.demote_f64`, [value("f64", 16777218.999999996)]), + [value("f32", 16777218)], +); + +// ./test/core/conversions.wast:601 +assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", 16777219)]), [value("f32", 16777220)]); + +// ./test/core/conversions.wast:602 +assert_return( + () => invoke($0, `f32.demote_f64`, [value("f64", 424258443299142700000000000000000)]), + [value("f32", 424258450000000000000000000000000)], +); + +// ./test/core/conversions.wast:603 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 0.0000000000000000000000000000000001569262107843488), + ]), + [value("f32", 0.00000000000000000000000000000000015692621)], +); + +// ./test/core/conversions.wast:604 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 0.000000000000000000000000000000000000010551773688605172), + ]), + [value("f32", 0.000000000000000000000000000000000000010551773)], +); + +// ./test/core/conversions.wast:605 +assert_return( + () => invoke($0, `f32.demote_f64`, [value("f64", -2.8238128484141933)]), + [value("f32", -2.823813)], +); + +// ./test/core/conversions.wast:606 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -9063376370095757000000000000000000), + ]), + [value("f32", -9063376000000000000000000000000000)], +); + +// ./test/core/conversions.wast:607 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/conversions.wast:608 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/conversions.wast:609 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/conversions.wast:610 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/conversions.wast:611 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f32", 0)], +); + +// ./test/core/conversions.wast:612 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f32", -0)], +); + +// ./test/core/conversions.wast:613 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 0.0000000000000000000000000000000000000000000007006492321624085), + ]), + [value("f32", 0)], +); + +// ./test/core/conversions.wast:614 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -0.0000000000000000000000000000000000000000000007006492321624085), + ]), + [value("f32", -0)], +); + +// ./test/core/conversions.wast:615 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", 0.0000000000000000000000000000000000000000000007006492321624087), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/conversions.wast:616 +assert_return( + () => invoke($0, `f32.demote_f64`, [ + value("f64", -0.0000000000000000000000000000000000000000000007006492321624087), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/conversions.wast:618 +assert_return(() => invoke($0, `f32.reinterpret_i32`, [0]), [value("f32", 0)]); + +// ./test/core/conversions.wast:619 +assert_return(() => invoke($0, `f32.reinterpret_i32`, [-2147483648]), [value("f32", -0)]); + +// ./test/core/conversions.wast:620 +assert_return( + () => invoke($0, `f32.reinterpret_i32`, [1]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/conversions.wast:621 +assert_return(() => invoke($0, `f32.reinterpret_i32`, [-1]), [bytes("f32", [0xff, 0xff, 0xff, 0xff])]); + +// ./test/core/conversions.wast:622 +assert_return( + () => invoke($0, `f32.reinterpret_i32`, [123456789]), + [value("f32", 0.00000000000000000000000000000000016535997)], +); + +// ./test/core/conversions.wast:623 +assert_return( + () => invoke($0, `f32.reinterpret_i32`, [-2147483647]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/conversions.wast:624 +assert_return(() => invoke($0, `f32.reinterpret_i32`, [2139095040]), [value("f32", Infinity)]); + +// ./test/core/conversions.wast:625 +assert_return(() => invoke($0, `f32.reinterpret_i32`, [-8388608]), [value("f32", -Infinity)]); + +// ./test/core/conversions.wast:626 +assert_return( + () => invoke($0, `f32.reinterpret_i32`, [2143289344]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/conversions.wast:627 +assert_return( + () => invoke($0, `f32.reinterpret_i32`, [-4194304]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/conversions.wast:628 +assert_return( + () => invoke($0, `f32.reinterpret_i32`, [2141192192]), + [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])], +); + +// ./test/core/conversions.wast:629 +assert_return( + () => invoke($0, `f32.reinterpret_i32`, [-6291456]), + [bytes("f32", [0x0, 0x0, 0xa0, 0xff])], +); + +// ./test/core/conversions.wast:631 +assert_return(() => invoke($0, `f64.reinterpret_i64`, [0n]), [value("f64", 0)]); + +// ./test/core/conversions.wast:632 +assert_return( + () => invoke($0, `f64.reinterpret_i64`, [1n]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/conversions.wast:633 +assert_return( + () => invoke($0, `f64.reinterpret_i64`, [-1n]), + [bytes("f64", [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/conversions.wast:634 +assert_return(() => invoke($0, `f64.reinterpret_i64`, [-9223372036854775808n]), [value("f64", -0)]); + +// ./test/core/conversions.wast:635 +assert_return( + () => invoke($0, `f64.reinterpret_i64`, [1234567890n]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000609957582), + ], +); + +// ./test/core/conversions.wast:636 +assert_return( + () => invoke($0, `f64.reinterpret_i64`, [-9223372036854775807n]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/conversions.wast:637 +assert_return(() => invoke($0, `f64.reinterpret_i64`, [9218868437227405312n]), [value("f64", Infinity)]); + +// ./test/core/conversions.wast:638 +assert_return(() => invoke($0, `f64.reinterpret_i64`, [-4503599627370496n]), [value("f64", -Infinity)]); + +// ./test/core/conversions.wast:639 +assert_return( + () => invoke($0, `f64.reinterpret_i64`, [9221120237041090560n]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/conversions.wast:640 +assert_return( + () => invoke($0, `f64.reinterpret_i64`, [-2251799813685248n]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/conversions.wast:641 +assert_return( + () => invoke($0, `f64.reinterpret_i64`, [9219994337134247936n]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/conversions.wast:642 +assert_return( + () => invoke($0, `f64.reinterpret_i64`, [-3377699720527872n]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff])], +); + +// ./test/core/conversions.wast:644 +assert_return(() => invoke($0, `i32.reinterpret_f32`, [value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/conversions.wast:645 +assert_return(() => invoke($0, `i32.reinterpret_f32`, [value("f32", -0)]), [value("i32", -2147483648)]); + +// ./test/core/conversions.wast:646 +assert_return( + () => invoke($0, `i32.reinterpret_f32`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/conversions.wast:647 +assert_return( + () => invoke($0, `i32.reinterpret_f32`, [bytes("f32", [0xff, 0xff, 0xff, 0xff])]), + [value("i32", -1)], +); + +// ./test/core/conversions.wast:648 +assert_return( + () => invoke($0, `i32.reinterpret_f32`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", -2147483647)], +); + +// ./test/core/conversions.wast:649 +assert_return(() => invoke($0, `i32.reinterpret_f32`, [value("f32", 1)]), [value("i32", 1065353216)]); + +// ./test/core/conversions.wast:650 +assert_return( + () => invoke($0, `i32.reinterpret_f32`, [value("f32", 3.1415925)]), + [value("i32", 1078530010)], +); + +// ./test/core/conversions.wast:651 +assert_return( + () => invoke($0, `i32.reinterpret_f32`, [ + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 2139095039)], +); + +// ./test/core/conversions.wast:652 +assert_return( + () => invoke($0, `i32.reinterpret_f32`, [ + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", -8388609)], +); + +// ./test/core/conversions.wast:653 +assert_return( + () => invoke($0, `i32.reinterpret_f32`, [value("f32", Infinity)]), + [value("i32", 2139095040)], +); + +// ./test/core/conversions.wast:654 +assert_return( + () => invoke($0, `i32.reinterpret_f32`, [value("f32", -Infinity)]), + [value("i32", -8388608)], +); + +// ./test/core/conversions.wast:655 +assert_return( + () => invoke($0, `i32.reinterpret_f32`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 2143289344)], +); + +// ./test/core/conversions.wast:656 +assert_return( + () => invoke($0, `i32.reinterpret_f32`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", -4194304)], +); + +// ./test/core/conversions.wast:657 +assert_return( + () => invoke($0, `i32.reinterpret_f32`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 2141192192)], +); + +// ./test/core/conversions.wast:658 +assert_return( + () => invoke($0, `i32.reinterpret_f32`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", -6291456)], +); + +// ./test/core/conversions.wast:660 +assert_return(() => invoke($0, `i64.reinterpret_f64`, [value("f64", 0)]), [value("i64", 0n)]); + +// ./test/core/conversions.wast:661 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [value("f64", -0)]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/conversions.wast:662 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i64", 1n)], +); + +// ./test/core/conversions.wast:663 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [ + bytes("f64", [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i64", -1n)], +); + +// ./test/core/conversions.wast:664 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i64", -9223372036854775807n)], +); + +// ./test/core/conversions.wast:665 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [value("f64", 1)]), + [value("i64", 4607182418800017408n)], +); + +// ./test/core/conversions.wast:666 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [value("f64", 3.14159265358979)]), + [value("i64", 4614256656552045841n)], +); + +// ./test/core/conversions.wast:667 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i64", 9218868437227405311n)], +); + +// ./test/core/conversions.wast:668 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i64", -4503599627370497n)], +); + +// ./test/core/conversions.wast:669 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [value("f64", Infinity)]), + [value("i64", 9218868437227405312n)], +); + +// ./test/core/conversions.wast:670 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [value("f64", -Infinity)]), + [value("i64", -4503599627370496n)], +); + +// ./test/core/conversions.wast:671 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/conversions.wast:672 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i64", -2251799813685248n)], +); + +// ./test/core/conversions.wast:673 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i64", 9219994337134247936n)], +); + +// ./test/core/conversions.wast:674 +assert_return( + () => invoke($0, `i64.reinterpret_f64`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i64", -3377699720527872n)], +); + +// ./test/core/conversions.wast:678 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.wrap_i64 (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:679 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.trunc_f32_s (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:680 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.trunc_f32_u (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:681 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.trunc_f64_s (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:682 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.trunc_f64_u (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:683 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.reinterpret_f32 (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:684 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.extend_i32_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:685 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.extend_i32_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:686 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.trunc_f32_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:687 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.trunc_f32_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:688 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.trunc_f64_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:689 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.trunc_f64_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:690 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.reinterpret_f64 (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:691 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.convert_i32_s (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:692 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.convert_i32_u (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:693 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.convert_i64_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:694 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.convert_i64_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:695 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.demote_f64 (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:696 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.reinterpret_i32 (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:697 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.convert_i32_s (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:698 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.convert_i32_u (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:699 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.convert_i64_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:700 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.convert_i64_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:701 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.promote_f32 (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/conversions.wast:702 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.reinterpret_i64 (i32.const 0))))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/custom.wast.js b/js/src/jit-test/tests/wasm/spec/spec/custom.wast.js new file mode 100644 index 0000000000..c2883feba5 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/custom.wast.js @@ -0,0 +1,157 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/custom.wast + +// ./test/core/custom.wast:1 +let $0 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\00\\24\\10" "a custom section" "this is the payload" + "\\00\\20\\10" "a custom section" "this is payload" + "\\00\\11\\10" "a custom section" "" + "\\00\\10\\00" "" "this is payload" + "\\00\\01\\00" "" "" + "\\00\\24\\10" "\\00\\00custom sectio\\00" "this is the payload" + "\\00\\24\\10" "\\ef\\bb\\bfa custom sect" "this is the payload" + "\\00\\24\\10" "a custom sect\\e2\\8c\\a3" "this is the payload" + "\\00\\1f\\16" "module within a module" "\\00asm" "\\01\\00\\00\\00" +)`); + +// ./test/core/custom.wast:14 +let $1 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\00\\0e\\06" "custom" "payload" + "\\00\\0e\\06" "custom" "payload" + "\\01\\01\\00" ;; type section + "\\00\\0e\\06" "custom" "payload" + "\\00\\0e\\06" "custom" "payload" + "\\02\\01\\00" ;; import section + "\\00\\0e\\06" "custom" "payload" + "\\00\\0e\\06" "custom" "payload" + "\\03\\01\\00" ;; function section + "\\00\\0e\\06" "custom" "payload" + "\\00\\0e\\06" "custom" "payload" + "\\04\\01\\00" ;; table section + "\\00\\0e\\06" "custom" "payload" + "\\00\\0e\\06" "custom" "payload" + "\\05\\01\\00" ;; memory section + "\\00\\0e\\06" "custom" "payload" + "\\00\\0e\\06" "custom" "payload" + "\\06\\01\\00" ;; global section + "\\00\\0e\\06" "custom" "payload" + "\\00\\0e\\06" "custom" "payload" + "\\07\\01\\00" ;; export section + "\\00\\0e\\06" "custom" "payload" + "\\00\\0e\\06" "custom" "payload" + "\\09\\01\\00" ;; element section + "\\00\\0e\\06" "custom" "payload" + "\\00\\0e\\06" "custom" "payload" + "\\0a\\01\\00" ;; code section + "\\00\\0e\\06" "custom" "payload" + "\\00\\0e\\06" "custom" "payload" + "\\0b\\01\\00" ;; data section + "\\00\\0e\\06" "custom" "payload" + "\\00\\0e\\06" "custom" "payload" +)`); + +// ./test/core/custom.wast:50 +let $2 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\01\\07\\01\\60\\02\\7f\\7f\\01\\7f" ;; type section + "\\00\\1a\\06" "custom" "this is the payload" ;; custom section + "\\03\\02\\01\\00" ;; function section + "\\07\\0a\\01\\06\\61\\64\\64\\54\\77\\6f\\00\\00" ;; export section + "\\0a\\09\\01\\07\\00\\20\\00\\20\\01\\6a\\0b" ;; code section + "\\00\\1b\\07" "custom2" "this is the payload" ;; custom section +)`); + +// ./test/core/custom.wast:60 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\00" + )`), + `unexpected end`, +); + +// ./test/core/custom.wast:68 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\00\\00" + )`), + `unexpected end`, +); + +// ./test/core/custom.wast:76 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\00\\00\\00\\05\\01\\00\\07\\00\\00" + )`), + `unexpected end`, +); + +// ./test/core/custom.wast:84 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\00\\26\\10" "a custom section" "this is the payload" + )`), + `length out of bounds`, +); + +// ./test/core/custom.wast:92 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\00\\25\\10" "a custom section" "this is the payload" + "\\00\\24\\10" "a custom section" "this is the payload" + )`), + `malformed section id`, +); + +// ./test/core/custom.wast:101 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\01\\07\\01\\60\\02\\7f\\7f\\01\\7f" ;; type section + "\\00\\25\\10" "a custom section" "this is the payload" ;; wrong length! + "\\03\\02\\01\\00" ;; function section + "\\0a\\09\\01\\07\\00\\20\\00\\20\\01\\6a\\0b" ;; code section + "\\00\\1b\\07" "custom2" "this is the payload" ;; custom section + )`), + `function and code section have inconsistent lengths`, +); + +// ./test/core/custom.wast:114 +assert_malformed( + () => instantiate(`(module binary + "\\00asm\\01\\00\\00\\00" + "\\00asm\\01\\00\\00\\00" + )`), + `length out of bounds`, +); + +// ./test/core/custom.wast:122 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\05\\03\\01\\00\\01" ;; memory section + "\\0c\\01\\02" ;; data count section (2 segments) + "\\0b\\06\\01\\00\\41\\00\\0b\\00" ;; data section (1 segment) + )`), + `data count and data section have inconsistent lengths`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/directives.txt b/js/src/jit-test/tests/wasm/spec/spec/directives.txt new file mode 100644 index 0000000000..9fa4f75347 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; test-also=--no-avx; skip-variant-if: --no-avx, !getBuildConfiguration('x86') && !getBuildConfiguration('x64') || getBuildConfiguration('simulator') \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/spec/endianness.wast.js b/js/src/jit-test/tests/wasm/spec/spec/endianness.wast.js new file mode 100644 index 0000000000..e408d9e677 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/endianness.wast.js @@ -0,0 +1,385 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/endianness.wast + +// ./test/core/endianness.wast:1 +let $0 = instantiate(`(module + (memory 1) + + ;; Stores an i16 value in little-endian-format + (func $$i16_store_little (param $$address i32) (param $$value i32) + (i32.store8 (local.get $$address) (local.get $$value)) + (i32.store8 (i32.add (local.get $$address) (i32.const 1)) (i32.shr_u (local.get $$value) (i32.const 8))) + ) + + ;; Stores an i32 value in little-endian format + (func $$i32_store_little (param $$address i32) (param $$value i32) + (call $$i16_store_little (local.get $$address) (local.get $$value)) + (call $$i16_store_little (i32.add (local.get $$address) (i32.const 2)) (i32.shr_u (local.get $$value) (i32.const 16))) + ) + + ;; Stores an i64 value in little-endian format + (func $$i64_store_little (param $$address i32) (param $$value i64) + (call $$i32_store_little (local.get $$address) (i32.wrap_i64 (local.get $$value))) + (call $$i32_store_little (i32.add (local.get $$address) (i32.const 4)) (i32.wrap_i64 (i64.shr_u (local.get $$value) (i64.const 32)))) + ) + + ;; Loads an i16 value in little-endian format + (func $$i16_load_little (param $$address i32) (result i32) + (i32.or + (i32.load8_u (local.get $$address)) + (i32.shl (i32.load8_u (i32.add (local.get $$address) (i32.const 1))) (i32.const 8)) + ) + ) + + ;; Loads an i32 value in little-endian format + (func $$i32_load_little (param $$address i32) (result i32) + (i32.or + (call $$i16_load_little (local.get $$address)) + (i32.shl (call $$i16_load_little (i32.add (local.get $$address) (i32.const 2))) (i32.const 16)) + ) + ) + + ;; Loads an i64 value in little-endian format + (func $$i64_load_little (param $$address i32) (result i64) + (i64.or + (i64.extend_i32_u (call $$i32_load_little (local.get $$address))) + (i64.shl (i64.extend_i32_u (call $$i32_load_little (i32.add (local.get $$address) (i32.const 4)))) (i64.const 32)) + ) + ) + + (func (export "i32_load16_s") (param $$value i32) (result i32) + (call $$i16_store_little (i32.const 0) (local.get $$value)) + (i32.load16_s (i32.const 0)) + ) + + (func (export "i32_load16_u") (param $$value i32) (result i32) + (call $$i16_store_little (i32.const 0) (local.get $$value)) + (i32.load16_u (i32.const 0)) + ) + + (func (export "i32_load") (param $$value i32) (result i32) + (call $$i32_store_little (i32.const 0) (local.get $$value)) + (i32.load (i32.const 0)) + ) + + (func (export "i64_load16_s") (param $$value i64) (result i64) + (call $$i16_store_little (i32.const 0) (i32.wrap_i64 (local.get $$value))) + (i64.load16_s (i32.const 0)) + ) + + (func (export "i64_load16_u") (param $$value i64) (result i64) + (call $$i16_store_little (i32.const 0) (i32.wrap_i64 (local.get $$value))) + (i64.load16_u (i32.const 0)) + ) + + (func (export "i64_load32_s") (param $$value i64) (result i64) + (call $$i32_store_little (i32.const 0) (i32.wrap_i64 (local.get $$value))) + (i64.load32_s (i32.const 0)) + ) + + (func (export "i64_load32_u") (param $$value i64) (result i64) + (call $$i32_store_little (i32.const 0) (i32.wrap_i64 (local.get $$value))) + (i64.load32_u (i32.const 0)) + ) + + (func (export "i64_load") (param $$value i64) (result i64) + (call $$i64_store_little (i32.const 0) (local.get $$value)) + (i64.load (i32.const 0)) + ) + + (func (export "f32_load") (param $$value f32) (result f32) + (call $$i32_store_little (i32.const 0) (i32.reinterpret_f32 (local.get $$value))) + (f32.load (i32.const 0)) + ) + + (func (export "f64_load") (param $$value f64) (result f64) + (call $$i64_store_little (i32.const 0) (i64.reinterpret_f64 (local.get $$value))) + (f64.load (i32.const 0)) + ) + + + (func (export "i32_store16") (param $$value i32) (result i32) + (i32.store16 (i32.const 0) (local.get $$value)) + (call $$i16_load_little (i32.const 0)) + ) + + (func (export "i32_store") (param $$value i32) (result i32) + (i32.store (i32.const 0) (local.get $$value)) + (call $$i32_load_little (i32.const 0)) + ) + + (func (export "i64_store16") (param $$value i64) (result i64) + (i64.store16 (i32.const 0) (local.get $$value)) + (i64.extend_i32_u (call $$i16_load_little (i32.const 0))) + ) + + (func (export "i64_store32") (param $$value i64) (result i64) + (i64.store32 (i32.const 0) (local.get $$value)) + (i64.extend_i32_u (call $$i32_load_little (i32.const 0))) + ) + + (func (export "i64_store") (param $$value i64) (result i64) + (i64.store (i32.const 0) (local.get $$value)) + (call $$i64_load_little (i32.const 0)) + ) + + (func (export "f32_store") (param $$value f32) (result f32) + (f32.store (i32.const 0) (local.get $$value)) + (f32.reinterpret_i32 (call $$i32_load_little (i32.const 0))) + ) + + (func (export "f64_store") (param $$value f64) (result f64) + (f64.store (i32.const 0) (local.get $$value)) + (f64.reinterpret_i64 (call $$i64_load_little (i32.const 0))) + ) +)`); + +// ./test/core/endianness.wast:133 +assert_return(() => invoke($0, `i32_load16_s`, [-1]), [value("i32", -1)]); + +// ./test/core/endianness.wast:134 +assert_return(() => invoke($0, `i32_load16_s`, [-4242]), [value("i32", -4242)]); + +// ./test/core/endianness.wast:135 +assert_return(() => invoke($0, `i32_load16_s`, [42]), [value("i32", 42)]); + +// ./test/core/endianness.wast:136 +assert_return(() => invoke($0, `i32_load16_s`, [12816]), [value("i32", 12816)]); + +// ./test/core/endianness.wast:138 +assert_return(() => invoke($0, `i32_load16_u`, [-1]), [value("i32", 65535)]); + +// ./test/core/endianness.wast:139 +assert_return(() => invoke($0, `i32_load16_u`, [-4242]), [value("i32", 61294)]); + +// ./test/core/endianness.wast:140 +assert_return(() => invoke($0, `i32_load16_u`, [42]), [value("i32", 42)]); + +// ./test/core/endianness.wast:141 +assert_return(() => invoke($0, `i32_load16_u`, [51966]), [value("i32", 51966)]); + +// ./test/core/endianness.wast:143 +assert_return(() => invoke($0, `i32_load`, [-1]), [value("i32", -1)]); + +// ./test/core/endianness.wast:144 +assert_return(() => invoke($0, `i32_load`, [-42424242]), [value("i32", -42424242)]); + +// ./test/core/endianness.wast:145 +assert_return(() => invoke($0, `i32_load`, [42424242]), [value("i32", 42424242)]); + +// ./test/core/endianness.wast:146 +assert_return(() => invoke($0, `i32_load`, [-1414717974]), [value("i32", -1414717974)]); + +// ./test/core/endianness.wast:148 +assert_return(() => invoke($0, `i64_load16_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/endianness.wast:149 +assert_return(() => invoke($0, `i64_load16_s`, [-4242n]), [value("i64", -4242n)]); + +// ./test/core/endianness.wast:150 +assert_return(() => invoke($0, `i64_load16_s`, [42n]), [value("i64", 42n)]); + +// ./test/core/endianness.wast:151 +assert_return(() => invoke($0, `i64_load16_s`, [12816n]), [value("i64", 12816n)]); + +// ./test/core/endianness.wast:153 +assert_return(() => invoke($0, `i64_load16_u`, [-1n]), [value("i64", 65535n)]); + +// ./test/core/endianness.wast:154 +assert_return(() => invoke($0, `i64_load16_u`, [-4242n]), [value("i64", 61294n)]); + +// ./test/core/endianness.wast:155 +assert_return(() => invoke($0, `i64_load16_u`, [42n]), [value("i64", 42n)]); + +// ./test/core/endianness.wast:156 +assert_return(() => invoke($0, `i64_load16_u`, [51966n]), [value("i64", 51966n)]); + +// ./test/core/endianness.wast:158 +assert_return(() => invoke($0, `i64_load32_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/endianness.wast:159 +assert_return(() => invoke($0, `i64_load32_s`, [-42424242n]), [value("i64", -42424242n)]); + +// ./test/core/endianness.wast:160 +assert_return(() => invoke($0, `i64_load32_s`, [42424242n]), [value("i64", 42424242n)]); + +// ./test/core/endianness.wast:161 +assert_return(() => invoke($0, `i64_load32_s`, [305419896n]), [value("i64", 305419896n)]); + +// ./test/core/endianness.wast:163 +assert_return(() => invoke($0, `i64_load32_u`, [-1n]), [value("i64", 4294967295n)]); + +// ./test/core/endianness.wast:164 +assert_return(() => invoke($0, `i64_load32_u`, [-42424242n]), [value("i64", 4252543054n)]); + +// ./test/core/endianness.wast:165 +assert_return(() => invoke($0, `i64_load32_u`, [42424242n]), [value("i64", 42424242n)]); + +// ./test/core/endianness.wast:166 +assert_return(() => invoke($0, `i64_load32_u`, [2880249322n]), [value("i64", 2880249322n)]); + +// ./test/core/endianness.wast:168 +assert_return(() => invoke($0, `i64_load`, [-1n]), [value("i64", -1n)]); + +// ./test/core/endianness.wast:169 +assert_return(() => invoke($0, `i64_load`, [-42424242n]), [value("i64", -42424242n)]); + +// ./test/core/endianness.wast:170 +assert_return(() => invoke($0, `i64_load`, [2880249322n]), [value("i64", 2880249322n)]); + +// ./test/core/endianness.wast:171 +assert_return( + () => invoke($0, `i64_load`, [-6075977126246539798n]), + [value("i64", -6075977126246539798n)], +); + +// ./test/core/endianness.wast:173 +assert_return(() => invoke($0, `f32_load`, [value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/endianness.wast:174 +assert_return(() => invoke($0, `f32_load`, [value("f32", 0.01234)]), [value("f32", 0.01234)]); + +// ./test/core/endianness.wast:175 +assert_return(() => invoke($0, `f32_load`, [value("f32", 4242.4243)]), [value("f32", 4242.4243)]); + +// ./test/core/endianness.wast:176 +assert_return( + () => invoke($0, `f32_load`, [value("f32", 340282350000000000000000000000000000000)]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/endianness.wast:178 +assert_return(() => invoke($0, `f64_load`, [value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/endianness.wast:179 +assert_return(() => invoke($0, `f64_load`, [value("f64", 1234.56789)]), [value("f64", 1234.56789)]); + +// ./test/core/endianness.wast:180 +assert_return( + () => invoke($0, `f64_load`, [value("f64", 424242.424242)]), + [value("f64", 424242.424242)], +); + +// ./test/core/endianness.wast:181 +assert_return( + () => invoke($0, `f64_load`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/endianness.wast:184 +assert_return(() => invoke($0, `i32_store16`, [-1]), [value("i32", 65535)]); + +// ./test/core/endianness.wast:185 +assert_return(() => invoke($0, `i32_store16`, [-4242]), [value("i32", 61294)]); + +// ./test/core/endianness.wast:186 +assert_return(() => invoke($0, `i32_store16`, [42]), [value("i32", 42)]); + +// ./test/core/endianness.wast:187 +assert_return(() => invoke($0, `i32_store16`, [51966]), [value("i32", 51966)]); + +// ./test/core/endianness.wast:189 +assert_return(() => invoke($0, `i32_store`, [-1]), [value("i32", -1)]); + +// ./test/core/endianness.wast:190 +assert_return(() => invoke($0, `i32_store`, [-4242]), [value("i32", -4242)]); + +// ./test/core/endianness.wast:191 +assert_return(() => invoke($0, `i32_store`, [42424242]), [value("i32", 42424242)]); + +// ./test/core/endianness.wast:192 +assert_return(() => invoke($0, `i32_store`, [-559035650]), [value("i32", -559035650)]); + +// ./test/core/endianness.wast:194 +assert_return(() => invoke($0, `i64_store16`, [-1n]), [value("i64", 65535n)]); + +// ./test/core/endianness.wast:195 +assert_return(() => invoke($0, `i64_store16`, [-4242n]), [value("i64", 61294n)]); + +// ./test/core/endianness.wast:196 +assert_return(() => invoke($0, `i64_store16`, [42n]), [value("i64", 42n)]); + +// ./test/core/endianness.wast:197 +assert_return(() => invoke($0, `i64_store16`, [51966n]), [value("i64", 51966n)]); + +// ./test/core/endianness.wast:199 +assert_return(() => invoke($0, `i64_store32`, [-1n]), [value("i64", 4294967295n)]); + +// ./test/core/endianness.wast:200 +assert_return(() => invoke($0, `i64_store32`, [-4242n]), [value("i64", 4294963054n)]); + +// ./test/core/endianness.wast:201 +assert_return(() => invoke($0, `i64_store32`, [42424242n]), [value("i64", 42424242n)]); + +// ./test/core/endianness.wast:202 +assert_return(() => invoke($0, `i64_store32`, [3735931646n]), [value("i64", 3735931646n)]); + +// ./test/core/endianness.wast:204 +assert_return(() => invoke($0, `i64_store`, [-1n]), [value("i64", -1n)]); + +// ./test/core/endianness.wast:205 +assert_return(() => invoke($0, `i64_store`, [-42424242n]), [value("i64", -42424242n)]); + +// ./test/core/endianness.wast:206 +assert_return(() => invoke($0, `i64_store`, [2880249322n]), [value("i64", 2880249322n)]); + +// ./test/core/endianness.wast:207 +assert_return( + () => invoke($0, `i64_store`, [-6075977126246539798n]), + [value("i64", -6075977126246539798n)], +); + +// ./test/core/endianness.wast:209 +assert_return(() => invoke($0, `f32_store`, [value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/endianness.wast:210 +assert_return(() => invoke($0, `f32_store`, [value("f32", 0.01234)]), [value("f32", 0.01234)]); + +// ./test/core/endianness.wast:211 +assert_return(() => invoke($0, `f32_store`, [value("f32", 4242.4243)]), [value("f32", 4242.4243)]); + +// ./test/core/endianness.wast:212 +assert_return( + () => invoke($0, `f32_store`, [value("f32", 340282350000000000000000000000000000000)]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/endianness.wast:214 +assert_return(() => invoke($0, `f64_store`, [value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/endianness.wast:215 +assert_return(() => invoke($0, `f64_store`, [value("f64", 1234.56789)]), [value("f64", 1234.56789)]); + +// ./test/core/endianness.wast:216 +assert_return( + () => invoke($0, `f64_store`, [value("f64", 424242.424242)]), + [value("f64", 424242.424242)], +); + +// ./test/core/endianness.wast:217 +assert_return( + () => invoke($0, `f64_store`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/f32.wast.js b/js/src/jit-test/tests/wasm/spec/spec/f32.wast.js new file mode 100644 index 0000000000..c80cfd6421 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/f32.wast.js @@ -0,0 +1,18629 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/f32.wast + +// ./test/core/f32.wast:5 +let $0 = instantiate(`(module + (func (export "add") (param $$x f32) (param $$y f32) (result f32) (f32.add (local.get $$x) (local.get $$y))) + (func (export "sub") (param $$x f32) (param $$y f32) (result f32) (f32.sub (local.get $$x) (local.get $$y))) + (func (export "mul") (param $$x f32) (param $$y f32) (result f32) (f32.mul (local.get $$x) (local.get $$y))) + (func (export "div") (param $$x f32) (param $$y f32) (result f32) (f32.div (local.get $$x) (local.get $$y))) + (func (export "sqrt") (param $$x f32) (result f32) (f32.sqrt (local.get $$x))) + (func (export "min") (param $$x f32) (param $$y f32) (result f32) (f32.min (local.get $$x) (local.get $$y))) + (func (export "max") (param $$x f32) (param $$y f32) (result f32) (f32.max (local.get $$x) (local.get $$y))) + (func (export "ceil") (param $$x f32) (result f32) (f32.ceil (local.get $$x))) + (func (export "floor") (param $$x f32) (result f32) (f32.floor (local.get $$x))) + (func (export "trunc") (param $$x f32) (result f32) (f32.trunc (local.get $$x))) + (func (export "nearest") (param $$x f32) (result f32) (f32.nearest (local.get $$x))) +)`); + +// ./test/core/f32.wast:19 +assert_return(() => invoke($0, `add`, [value("f32", -0), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:20 +assert_return(() => invoke($0, `add`, [value("f32", -0), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:21 +assert_return(() => invoke($0, `add`, [value("f32", 0), value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:22 +assert_return(() => invoke($0, `add`, [value("f32", 0), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:23 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:24 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:25 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:26 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:27 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:28 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:29 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:30 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:31 +assert_return(() => invoke($0, `add`, [value("f32", -0), value("f32", -0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:32 +assert_return(() => invoke($0, `add`, [value("f32", -0), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:33 +assert_return(() => invoke($0, `add`, [value("f32", 0), value("f32", -0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:34 +assert_return(() => invoke($0, `add`, [value("f32", 0), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:35 +assert_return(() => invoke($0, `add`, [value("f32", -0), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:36 +assert_return(() => invoke($0, `add`, [value("f32", -0), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:37 +assert_return(() => invoke($0, `add`, [value("f32", 0), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:38 +assert_return(() => invoke($0, `add`, [value("f32", 0), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:39 +assert_return( + () => invoke($0, `add`, [value("f32", -0), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:40 +assert_return( + () => invoke($0, `add`, [value("f32", -0), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:41 +assert_return( + () => invoke($0, `add`, [value("f32", 0), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:42 +assert_return( + () => invoke($0, `add`, [value("f32", 0), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:43 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:44 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:45 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:46 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:47 +assert_return( + () => invoke($0, `add`, [value("f32", -0), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:48 +assert_return( + () => invoke($0, `add`, [value("f32", -0), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:49 +assert_return( + () => invoke($0, `add`, [value("f32", 0), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:50 +assert_return( + () => invoke($0, `add`, [value("f32", 0), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:51 +assert_return( + () => invoke($0, `add`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:52 +assert_return( + () => invoke($0, `add`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:53 +assert_return( + () => invoke($0, `add`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:54 +assert_return( + () => invoke($0, `add`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:55 +assert_return( + () => invoke($0, `add`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:56 +assert_return( + () => invoke($0, `add`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:57 +assert_return( + () => invoke($0, `add`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:58 +assert_return( + () => invoke($0, `add`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:59 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:60 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:61 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:62 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:63 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/f32.wast:64 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:65 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:66 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/f32.wast:67 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754945)], +); + +// ./test/core/f32.wast:68 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/f32.wast:69 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/f32.wast:70 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754945)], +); + +// ./test/core/f32.wast:71 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:72 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:73 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:74 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:75 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:76 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:77 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:78 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:79 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:80 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:81 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:82 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:83 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:84 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:85 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:86 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:87 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:88 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:89 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:90 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:91 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:92 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:93 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:94 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:95 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:96 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:97 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:98 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:99 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:100 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:101 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:102 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:103 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000011754945)], +); + +// ./test/core/f32.wast:104 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/f32.wast:105 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/f32.wast:106 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000011754945)], +); + +// ./test/core/f32.wast:107 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000023509887)], +); + +// ./test/core/f32.wast:108 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:109 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:110 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000023509887)], +); + +// ./test/core/f32.wast:111 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:112 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:113 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:114 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:115 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:116 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:117 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:118 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:119 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:120 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:121 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:122 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:123 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:124 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:125 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:126 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:127 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:128 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:129 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:130 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:131 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:132 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:133 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:134 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:135 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:136 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:137 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:138 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:139 +assert_return(() => invoke($0, `add`, [value("f32", -0.5), value("f32", -0)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:140 +assert_return(() => invoke($0, `add`, [value("f32", -0.5), value("f32", 0)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:141 +assert_return(() => invoke($0, `add`, [value("f32", 0.5), value("f32", -0)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:142 +assert_return(() => invoke($0, `add`, [value("f32", 0.5), value("f32", 0)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:143 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:144 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:145 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:146 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:147 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:148 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:149 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:150 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:151 +assert_return(() => invoke($0, `add`, [value("f32", -0.5), value("f32", -0.5)]), [value("f32", -1)]); + +// ./test/core/f32.wast:152 +assert_return(() => invoke($0, `add`, [value("f32", -0.5), value("f32", 0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:153 +assert_return(() => invoke($0, `add`, [value("f32", 0.5), value("f32", -0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:154 +assert_return(() => invoke($0, `add`, [value("f32", 0.5), value("f32", 0.5)]), [value("f32", 1)]); + +// ./test/core/f32.wast:155 +assert_return(() => invoke($0, `add`, [value("f32", -0.5), value("f32", -1)]), [value("f32", -1.5)]); + +// ./test/core/f32.wast:156 +assert_return(() => invoke($0, `add`, [value("f32", -0.5), value("f32", 1)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:157 +assert_return(() => invoke($0, `add`, [value("f32", 0.5), value("f32", -1)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:158 +assert_return(() => invoke($0, `add`, [value("f32", 0.5), value("f32", 1)]), [value("f32", 1.5)]); + +// ./test/core/f32.wast:159 +assert_return( + () => invoke($0, `add`, [value("f32", -0.5), value("f32", -6.2831855)]), + [value("f32", -6.7831855)], +); + +// ./test/core/f32.wast:160 +assert_return( + () => invoke($0, `add`, [value("f32", -0.5), value("f32", 6.2831855)]), + [value("f32", 5.7831855)], +); + +// ./test/core/f32.wast:161 +assert_return( + () => invoke($0, `add`, [value("f32", 0.5), value("f32", -6.2831855)]), + [value("f32", -5.7831855)], +); + +// ./test/core/f32.wast:162 +assert_return( + () => invoke($0, `add`, [value("f32", 0.5), value("f32", 6.2831855)]), + [value("f32", 6.7831855)], +); + +// ./test/core/f32.wast:163 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:164 +assert_return( + () => invoke($0, `add`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:165 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:166 +assert_return( + () => invoke($0, `add`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:167 +assert_return( + () => invoke($0, `add`, [value("f32", -0.5), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:168 +assert_return( + () => invoke($0, `add`, [value("f32", -0.5), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:169 +assert_return( + () => invoke($0, `add`, [value("f32", 0.5), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:170 +assert_return( + () => invoke($0, `add`, [value("f32", 0.5), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:171 +assert_return( + () => invoke($0, `add`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:172 +assert_return( + () => invoke($0, `add`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:173 +assert_return( + () => invoke($0, `add`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:174 +assert_return( + () => invoke($0, `add`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:175 +assert_return( + () => invoke($0, `add`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:176 +assert_return( + () => invoke($0, `add`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:177 +assert_return( + () => invoke($0, `add`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:178 +assert_return( + () => invoke($0, `add`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:179 +assert_return(() => invoke($0, `add`, [value("f32", -1), value("f32", -0)]), [value("f32", -1)]); + +// ./test/core/f32.wast:180 +assert_return(() => invoke($0, `add`, [value("f32", -1), value("f32", 0)]), [value("f32", -1)]); + +// ./test/core/f32.wast:181 +assert_return(() => invoke($0, `add`, [value("f32", 1), value("f32", -0)]), [value("f32", 1)]); + +// ./test/core/f32.wast:182 +assert_return(() => invoke($0, `add`, [value("f32", 1), value("f32", 0)]), [value("f32", 1)]); + +// ./test/core/f32.wast:183 +assert_return( + () => invoke($0, `add`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:184 +assert_return( + () => invoke($0, `add`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:185 +assert_return( + () => invoke($0, `add`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:186 +assert_return( + () => invoke($0, `add`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:187 +assert_return( + () => invoke($0, `add`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:188 +assert_return( + () => invoke($0, `add`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:189 +assert_return( + () => invoke($0, `add`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:190 +assert_return( + () => invoke($0, `add`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:191 +assert_return(() => invoke($0, `add`, [value("f32", -1), value("f32", -0.5)]), [value("f32", -1.5)]); + +// ./test/core/f32.wast:192 +assert_return(() => invoke($0, `add`, [value("f32", -1), value("f32", 0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:193 +assert_return(() => invoke($0, `add`, [value("f32", 1), value("f32", -0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:194 +assert_return(() => invoke($0, `add`, [value("f32", 1), value("f32", 0.5)]), [value("f32", 1.5)]); + +// ./test/core/f32.wast:195 +assert_return(() => invoke($0, `add`, [value("f32", -1), value("f32", -1)]), [value("f32", -2)]); + +// ./test/core/f32.wast:196 +assert_return(() => invoke($0, `add`, [value("f32", -1), value("f32", 1)]), [value("f32", 0)]); + +// ./test/core/f32.wast:197 +assert_return(() => invoke($0, `add`, [value("f32", 1), value("f32", -1)]), [value("f32", 0)]); + +// ./test/core/f32.wast:198 +assert_return(() => invoke($0, `add`, [value("f32", 1), value("f32", 1)]), [value("f32", 2)]); + +// ./test/core/f32.wast:199 +assert_return( + () => invoke($0, `add`, [value("f32", -1), value("f32", -6.2831855)]), + [value("f32", -7.2831855)], +); + +// ./test/core/f32.wast:200 +assert_return( + () => invoke($0, `add`, [value("f32", -1), value("f32", 6.2831855)]), + [value("f32", 5.2831855)], +); + +// ./test/core/f32.wast:201 +assert_return( + () => invoke($0, `add`, [value("f32", 1), value("f32", -6.2831855)]), + [value("f32", -5.2831855)], +); + +// ./test/core/f32.wast:202 +assert_return( + () => invoke($0, `add`, [value("f32", 1), value("f32", 6.2831855)]), + [value("f32", 7.2831855)], +); + +// ./test/core/f32.wast:203 +assert_return( + () => invoke($0, `add`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:204 +assert_return( + () => invoke($0, `add`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:205 +assert_return( + () => invoke($0, `add`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:206 +assert_return( + () => invoke($0, `add`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:207 +assert_return( + () => invoke($0, `add`, [value("f32", -1), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:208 +assert_return( + () => invoke($0, `add`, [value("f32", -1), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:209 +assert_return( + () => invoke($0, `add`, [value("f32", 1), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:210 +assert_return( + () => invoke($0, `add`, [value("f32", 1), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:211 +assert_return( + () => invoke($0, `add`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:212 +assert_return( + () => invoke($0, `add`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:213 +assert_return( + () => invoke($0, `add`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:214 +assert_return( + () => invoke($0, `add`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:215 +assert_return( + () => invoke($0, `add`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:216 +assert_return( + () => invoke($0, `add`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:217 +assert_return( + () => invoke($0, `add`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:218 +assert_return( + () => invoke($0, `add`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:219 +assert_return( + () => invoke($0, `add`, [value("f32", -6.2831855), value("f32", -0)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:220 +assert_return( + () => invoke($0, `add`, [value("f32", -6.2831855), value("f32", 0)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:221 +assert_return( + () => invoke($0, `add`, [value("f32", 6.2831855), value("f32", -0)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:222 +assert_return( + () => invoke($0, `add`, [value("f32", 6.2831855), value("f32", 0)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:223 +assert_return( + () => invoke($0, `add`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:224 +assert_return( + () => invoke($0, `add`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:225 +assert_return( + () => invoke($0, `add`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:226 +assert_return( + () => invoke($0, `add`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:227 +assert_return( + () => invoke($0, `add`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:228 +assert_return( + () => invoke($0, `add`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:229 +assert_return( + () => invoke($0, `add`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:230 +assert_return( + () => invoke($0, `add`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:231 +assert_return( + () => invoke($0, `add`, [value("f32", -6.2831855), value("f32", -0.5)]), + [value("f32", -6.7831855)], +); + +// ./test/core/f32.wast:232 +assert_return( + () => invoke($0, `add`, [value("f32", -6.2831855), value("f32", 0.5)]), + [value("f32", -5.7831855)], +); + +// ./test/core/f32.wast:233 +assert_return( + () => invoke($0, `add`, [value("f32", 6.2831855), value("f32", -0.5)]), + [value("f32", 5.7831855)], +); + +// ./test/core/f32.wast:234 +assert_return( + () => invoke($0, `add`, [value("f32", 6.2831855), value("f32", 0.5)]), + [value("f32", 6.7831855)], +); + +// ./test/core/f32.wast:235 +assert_return( + () => invoke($0, `add`, [value("f32", -6.2831855), value("f32", -1)]), + [value("f32", -7.2831855)], +); + +// ./test/core/f32.wast:236 +assert_return( + () => invoke($0, `add`, [value("f32", -6.2831855), value("f32", 1)]), + [value("f32", -5.2831855)], +); + +// ./test/core/f32.wast:237 +assert_return( + () => invoke($0, `add`, [value("f32", 6.2831855), value("f32", -1)]), + [value("f32", 5.2831855)], +); + +// ./test/core/f32.wast:238 +assert_return( + () => invoke($0, `add`, [value("f32", 6.2831855), value("f32", 1)]), + [value("f32", 7.2831855)], +); + +// ./test/core/f32.wast:239 +assert_return( + () => invoke($0, `add`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("f32", -12.566371)], +); + +// ./test/core/f32.wast:240 +assert_return( + () => invoke($0, `add`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:241 +assert_return( + () => invoke($0, `add`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:242 +assert_return( + () => invoke($0, `add`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("f32", 12.566371)], +); + +// ./test/core/f32.wast:243 +assert_return( + () => invoke($0, `add`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:244 +assert_return( + () => invoke($0, `add`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:245 +assert_return( + () => invoke($0, `add`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:246 +assert_return( + () => invoke($0, `add`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:247 +assert_return( + () => invoke($0, `add`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:248 +assert_return( + () => invoke($0, `add`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:249 +assert_return( + () => invoke($0, `add`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:250 +assert_return( + () => invoke($0, `add`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:251 +assert_return( + () => invoke($0, `add`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:252 +assert_return( + () => invoke($0, `add`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:253 +assert_return( + () => invoke($0, `add`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:254 +assert_return( + () => invoke($0, `add`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:255 +assert_return( + () => invoke($0, `add`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:256 +assert_return( + () => invoke($0, `add`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:257 +assert_return( + () => invoke($0, `add`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:258 +assert_return( + () => invoke($0, `add`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:259 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:260 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:261 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:262 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:263 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:264 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:265 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:266 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:267 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:268 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:269 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:270 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:271 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:272 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:273 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:274 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:275 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:276 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:277 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:278 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:279 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:280 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:281 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:282 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:283 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:284 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:285 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:286 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:287 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:288 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:289 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:290 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:291 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:292 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:293 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:294 +assert_return( + () => invoke($0, `add`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:295 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:296 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:297 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:298 +assert_return( + () => invoke($0, `add`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:299 +assert_return( + () => invoke($0, `add`, [value("f32", -Infinity), value("f32", -0)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:300 +assert_return( + () => invoke($0, `add`, [value("f32", -Infinity), value("f32", 0)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:301 +assert_return( + () => invoke($0, `add`, [value("f32", Infinity), value("f32", -0)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:302 +assert_return( + () => invoke($0, `add`, [value("f32", Infinity), value("f32", 0)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:303 +assert_return( + () => invoke($0, `add`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:304 +assert_return( + () => invoke($0, `add`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:305 +assert_return( + () => invoke($0, `add`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:306 +assert_return( + () => invoke($0, `add`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:307 +assert_return( + () => invoke($0, `add`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:308 +assert_return( + () => invoke($0, `add`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:309 +assert_return( + () => invoke($0, `add`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:310 +assert_return( + () => invoke($0, `add`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:311 +assert_return( + () => invoke($0, `add`, [value("f32", -Infinity), value("f32", -0.5)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:312 +assert_return( + () => invoke($0, `add`, [value("f32", -Infinity), value("f32", 0.5)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:313 +assert_return( + () => invoke($0, `add`, [value("f32", Infinity), value("f32", -0.5)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:314 +assert_return( + () => invoke($0, `add`, [value("f32", Infinity), value("f32", 0.5)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:315 +assert_return( + () => invoke($0, `add`, [value("f32", -Infinity), value("f32", -1)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:316 +assert_return( + () => invoke($0, `add`, [value("f32", -Infinity), value("f32", 1)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:317 +assert_return( + () => invoke($0, `add`, [value("f32", Infinity), value("f32", -1)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:318 +assert_return( + () => invoke($0, `add`, [value("f32", Infinity), value("f32", 1)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:319 +assert_return( + () => invoke($0, `add`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:320 +assert_return( + () => invoke($0, `add`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:321 +assert_return( + () => invoke($0, `add`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:322 +assert_return( + () => invoke($0, `add`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:323 +assert_return( + () => invoke($0, `add`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:324 +assert_return( + () => invoke($0, `add`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:325 +assert_return( + () => invoke($0, `add`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:326 +assert_return( + () => invoke($0, `add`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:327 +assert_return( + () => invoke($0, `add`, [value("f32", -Infinity), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:328 +assert_return( + () => invoke($0, `add`, [value("f32", -Infinity), value("f32", Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:329 +assert_return( + () => invoke($0, `add`, [value("f32", Infinity), value("f32", -Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:330 +assert_return( + () => invoke($0, `add`, [value("f32", Infinity), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:331 +assert_return( + () => invoke($0, `add`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:332 +assert_return( + () => invoke($0, `add`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:333 +assert_return( + () => invoke($0, `add`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:334 +assert_return( + () => invoke($0, `add`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:335 +assert_return( + () => invoke($0, `add`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:336 +assert_return( + () => invoke($0, `add`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:337 +assert_return( + () => invoke($0, `add`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:338 +assert_return( + () => invoke($0, `add`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:339 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:340 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:341 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:342 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:343 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:344 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:345 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:346 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:347 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:348 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:349 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:350 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:351 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:352 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:353 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:354 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:355 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:356 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:357 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:358 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:359 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:360 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:361 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:362 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:363 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:364 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:365 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:366 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:367 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:368 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:369 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:370 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:371 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:372 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:373 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:374 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:375 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:376 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:377 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:378 +assert_return( + () => invoke($0, `add`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:379 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:380 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:381 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:382 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:383 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:384 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:385 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:386 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:387 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:388 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:389 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:390 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:391 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:392 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:393 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:394 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:395 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:396 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:397 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:398 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:399 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:400 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:401 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:402 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:403 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:404 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:405 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:406 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:407 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:408 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:409 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:410 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:411 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:412 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:413 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:414 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:415 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:416 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:417 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:418 +assert_return( + () => invoke($0, `add`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:419 +assert_return(() => invoke($0, `sub`, [value("f32", -0), value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:420 +assert_return(() => invoke($0, `sub`, [value("f32", -0), value("f32", 0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:421 +assert_return(() => invoke($0, `sub`, [value("f32", 0), value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:422 +assert_return(() => invoke($0, `sub`, [value("f32", 0), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:423 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:424 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:425 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:426 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:427 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:428 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:429 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:430 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:431 +assert_return(() => invoke($0, `sub`, [value("f32", -0), value("f32", -0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:432 +assert_return(() => invoke($0, `sub`, [value("f32", -0), value("f32", 0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:433 +assert_return(() => invoke($0, `sub`, [value("f32", 0), value("f32", -0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:434 +assert_return(() => invoke($0, `sub`, [value("f32", 0), value("f32", 0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:435 +assert_return(() => invoke($0, `sub`, [value("f32", -0), value("f32", -1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:436 +assert_return(() => invoke($0, `sub`, [value("f32", -0), value("f32", 1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:437 +assert_return(() => invoke($0, `sub`, [value("f32", 0), value("f32", -1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:438 +assert_return(() => invoke($0, `sub`, [value("f32", 0), value("f32", 1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:439 +assert_return( + () => invoke($0, `sub`, [value("f32", -0), value("f32", -6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:440 +assert_return( + () => invoke($0, `sub`, [value("f32", -0), value("f32", 6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:441 +assert_return( + () => invoke($0, `sub`, [value("f32", 0), value("f32", -6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:442 +assert_return( + () => invoke($0, `sub`, [value("f32", 0), value("f32", 6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:443 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:444 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:445 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:446 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:447 +assert_return( + () => invoke($0, `sub`, [value("f32", -0), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:448 +assert_return( + () => invoke($0, `sub`, [value("f32", -0), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:449 +assert_return( + () => invoke($0, `sub`, [value("f32", 0), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:450 +assert_return( + () => invoke($0, `sub`, [value("f32", 0), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:451 +assert_return( + () => invoke($0, `sub`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:452 +assert_return( + () => invoke($0, `sub`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:453 +assert_return( + () => invoke($0, `sub`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:454 +assert_return( + () => invoke($0, `sub`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:455 +assert_return( + () => invoke($0, `sub`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:456 +assert_return( + () => invoke($0, `sub`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:457 +assert_return( + () => invoke($0, `sub`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:458 +assert_return( + () => invoke($0, `sub`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:459 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:460 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:461 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:462 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:463 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:464 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/f32.wast:465 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/f32.wast:466 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:467 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/f32.wast:468 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754945)], +); + +// ./test/core/f32.wast:469 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754945)], +); + +// ./test/core/f32.wast:470 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/f32.wast:471 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:472 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:473 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:474 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:475 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:476 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:477 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:478 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:479 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:480 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:481 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:482 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:483 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:484 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:485 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:486 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:487 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:488 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:489 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:490 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:491 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:492 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:493 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:494 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:495 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:496 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:497 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:498 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:499 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:500 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:501 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:502 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:503 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/f32.wast:504 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000011754945)], +); + +// ./test/core/f32.wast:505 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000011754945)], +); + +// ./test/core/f32.wast:506 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/f32.wast:507 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:508 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000023509887)], +); + +// ./test/core/f32.wast:509 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000023509887)], +); + +// ./test/core/f32.wast:510 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:511 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:512 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:513 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:514 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:515 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:516 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:517 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:518 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:519 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:520 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:521 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:522 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:523 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:524 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:525 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:526 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:527 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:528 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:529 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:530 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:531 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:532 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:533 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:534 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:535 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:536 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:537 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:538 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:539 +assert_return(() => invoke($0, `sub`, [value("f32", -0.5), value("f32", -0)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:540 +assert_return(() => invoke($0, `sub`, [value("f32", -0.5), value("f32", 0)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:541 +assert_return(() => invoke($0, `sub`, [value("f32", 0.5), value("f32", -0)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:542 +assert_return(() => invoke($0, `sub`, [value("f32", 0.5), value("f32", 0)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:543 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:544 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:545 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:546 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:547 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:548 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:549 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:550 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:551 +assert_return(() => invoke($0, `sub`, [value("f32", -0.5), value("f32", -0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:552 +assert_return(() => invoke($0, `sub`, [value("f32", -0.5), value("f32", 0.5)]), [value("f32", -1)]); + +// ./test/core/f32.wast:553 +assert_return(() => invoke($0, `sub`, [value("f32", 0.5), value("f32", -0.5)]), [value("f32", 1)]); + +// ./test/core/f32.wast:554 +assert_return(() => invoke($0, `sub`, [value("f32", 0.5), value("f32", 0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:555 +assert_return(() => invoke($0, `sub`, [value("f32", -0.5), value("f32", -1)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:556 +assert_return(() => invoke($0, `sub`, [value("f32", -0.5), value("f32", 1)]), [value("f32", -1.5)]); + +// ./test/core/f32.wast:557 +assert_return(() => invoke($0, `sub`, [value("f32", 0.5), value("f32", -1)]), [value("f32", 1.5)]); + +// ./test/core/f32.wast:558 +assert_return(() => invoke($0, `sub`, [value("f32", 0.5), value("f32", 1)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:559 +assert_return( + () => invoke($0, `sub`, [value("f32", -0.5), value("f32", -6.2831855)]), + [value("f32", 5.7831855)], +); + +// ./test/core/f32.wast:560 +assert_return( + () => invoke($0, `sub`, [value("f32", -0.5), value("f32", 6.2831855)]), + [value("f32", -6.7831855)], +); + +// ./test/core/f32.wast:561 +assert_return( + () => invoke($0, `sub`, [value("f32", 0.5), value("f32", -6.2831855)]), + [value("f32", 6.7831855)], +); + +// ./test/core/f32.wast:562 +assert_return( + () => invoke($0, `sub`, [value("f32", 0.5), value("f32", 6.2831855)]), + [value("f32", -5.7831855)], +); + +// ./test/core/f32.wast:563 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:564 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:565 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:566 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:567 +assert_return( + () => invoke($0, `sub`, [value("f32", -0.5), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:568 +assert_return( + () => invoke($0, `sub`, [value("f32", -0.5), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:569 +assert_return( + () => invoke($0, `sub`, [value("f32", 0.5), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:570 +assert_return( + () => invoke($0, `sub`, [value("f32", 0.5), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:571 +assert_return( + () => invoke($0, `sub`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:572 +assert_return( + () => invoke($0, `sub`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:573 +assert_return( + () => invoke($0, `sub`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:574 +assert_return( + () => invoke($0, `sub`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:575 +assert_return( + () => invoke($0, `sub`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:576 +assert_return( + () => invoke($0, `sub`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:577 +assert_return( + () => invoke($0, `sub`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:578 +assert_return( + () => invoke($0, `sub`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:579 +assert_return(() => invoke($0, `sub`, [value("f32", -1), value("f32", -0)]), [value("f32", -1)]); + +// ./test/core/f32.wast:580 +assert_return(() => invoke($0, `sub`, [value("f32", -1), value("f32", 0)]), [value("f32", -1)]); + +// ./test/core/f32.wast:581 +assert_return(() => invoke($0, `sub`, [value("f32", 1), value("f32", -0)]), [value("f32", 1)]); + +// ./test/core/f32.wast:582 +assert_return(() => invoke($0, `sub`, [value("f32", 1), value("f32", 0)]), [value("f32", 1)]); + +// ./test/core/f32.wast:583 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:584 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:585 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:586 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:587 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:588 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:589 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:590 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:591 +assert_return(() => invoke($0, `sub`, [value("f32", -1), value("f32", -0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:592 +assert_return(() => invoke($0, `sub`, [value("f32", -1), value("f32", 0.5)]), [value("f32", -1.5)]); + +// ./test/core/f32.wast:593 +assert_return(() => invoke($0, `sub`, [value("f32", 1), value("f32", -0.5)]), [value("f32", 1.5)]); + +// ./test/core/f32.wast:594 +assert_return(() => invoke($0, `sub`, [value("f32", 1), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:595 +assert_return(() => invoke($0, `sub`, [value("f32", -1), value("f32", -1)]), [value("f32", 0)]); + +// ./test/core/f32.wast:596 +assert_return(() => invoke($0, `sub`, [value("f32", -1), value("f32", 1)]), [value("f32", -2)]); + +// ./test/core/f32.wast:597 +assert_return(() => invoke($0, `sub`, [value("f32", 1), value("f32", -1)]), [value("f32", 2)]); + +// ./test/core/f32.wast:598 +assert_return(() => invoke($0, `sub`, [value("f32", 1), value("f32", 1)]), [value("f32", 0)]); + +// ./test/core/f32.wast:599 +assert_return( + () => invoke($0, `sub`, [value("f32", -1), value("f32", -6.2831855)]), + [value("f32", 5.2831855)], +); + +// ./test/core/f32.wast:600 +assert_return( + () => invoke($0, `sub`, [value("f32", -1), value("f32", 6.2831855)]), + [value("f32", -7.2831855)], +); + +// ./test/core/f32.wast:601 +assert_return( + () => invoke($0, `sub`, [value("f32", 1), value("f32", -6.2831855)]), + [value("f32", 7.2831855)], +); + +// ./test/core/f32.wast:602 +assert_return( + () => invoke($0, `sub`, [value("f32", 1), value("f32", 6.2831855)]), + [value("f32", -5.2831855)], +); + +// ./test/core/f32.wast:603 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:604 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:605 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:606 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:607 +assert_return( + () => invoke($0, `sub`, [value("f32", -1), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:608 +assert_return( + () => invoke($0, `sub`, [value("f32", -1), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:609 +assert_return( + () => invoke($0, `sub`, [value("f32", 1), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:610 +assert_return( + () => invoke($0, `sub`, [value("f32", 1), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:611 +assert_return( + () => invoke($0, `sub`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:612 +assert_return( + () => invoke($0, `sub`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:613 +assert_return( + () => invoke($0, `sub`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:614 +assert_return( + () => invoke($0, `sub`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:615 +assert_return( + () => invoke($0, `sub`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:616 +assert_return( + () => invoke($0, `sub`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:617 +assert_return( + () => invoke($0, `sub`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:618 +assert_return( + () => invoke($0, `sub`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:619 +assert_return( + () => invoke($0, `sub`, [value("f32", -6.2831855), value("f32", -0)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:620 +assert_return( + () => invoke($0, `sub`, [value("f32", -6.2831855), value("f32", 0)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:621 +assert_return( + () => invoke($0, `sub`, [value("f32", 6.2831855), value("f32", -0)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:622 +assert_return( + () => invoke($0, `sub`, [value("f32", 6.2831855), value("f32", 0)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:623 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:624 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:625 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:626 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:627 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:628 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:629 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:630 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:631 +assert_return( + () => invoke($0, `sub`, [value("f32", -6.2831855), value("f32", -0.5)]), + [value("f32", -5.7831855)], +); + +// ./test/core/f32.wast:632 +assert_return( + () => invoke($0, `sub`, [value("f32", -6.2831855), value("f32", 0.5)]), + [value("f32", -6.7831855)], +); + +// ./test/core/f32.wast:633 +assert_return( + () => invoke($0, `sub`, [value("f32", 6.2831855), value("f32", -0.5)]), + [value("f32", 6.7831855)], +); + +// ./test/core/f32.wast:634 +assert_return( + () => invoke($0, `sub`, [value("f32", 6.2831855), value("f32", 0.5)]), + [value("f32", 5.7831855)], +); + +// ./test/core/f32.wast:635 +assert_return( + () => invoke($0, `sub`, [value("f32", -6.2831855), value("f32", -1)]), + [value("f32", -5.2831855)], +); + +// ./test/core/f32.wast:636 +assert_return( + () => invoke($0, `sub`, [value("f32", -6.2831855), value("f32", 1)]), + [value("f32", -7.2831855)], +); + +// ./test/core/f32.wast:637 +assert_return( + () => invoke($0, `sub`, [value("f32", 6.2831855), value("f32", -1)]), + [value("f32", 7.2831855)], +); + +// ./test/core/f32.wast:638 +assert_return( + () => invoke($0, `sub`, [value("f32", 6.2831855), value("f32", 1)]), + [value("f32", 5.2831855)], +); + +// ./test/core/f32.wast:639 +assert_return( + () => invoke($0, `sub`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:640 +assert_return( + () => invoke($0, `sub`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("f32", -12.566371)], +); + +// ./test/core/f32.wast:641 +assert_return( + () => invoke($0, `sub`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("f32", 12.566371)], +); + +// ./test/core/f32.wast:642 +assert_return( + () => invoke($0, `sub`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:643 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:644 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:645 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:646 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:647 +assert_return( + () => invoke($0, `sub`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:648 +assert_return( + () => invoke($0, `sub`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:649 +assert_return( + () => invoke($0, `sub`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:650 +assert_return( + () => invoke($0, `sub`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:651 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:652 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:653 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:654 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:655 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:656 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:657 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:658 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:659 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:660 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:661 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:662 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:663 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:664 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:665 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:666 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:667 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:668 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:669 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:670 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:671 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:672 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:673 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:674 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:675 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:676 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:677 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:678 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:679 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:680 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:681 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:682 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:683 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:684 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:685 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:686 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:687 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:688 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:689 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:690 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:691 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:692 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:693 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:694 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:695 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:696 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:697 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:698 +assert_return( + () => invoke($0, `sub`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:699 +assert_return( + () => invoke($0, `sub`, [value("f32", -Infinity), value("f32", -0)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:700 +assert_return( + () => invoke($0, `sub`, [value("f32", -Infinity), value("f32", 0)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:701 +assert_return( + () => invoke($0, `sub`, [value("f32", Infinity), value("f32", -0)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:702 +assert_return( + () => invoke($0, `sub`, [value("f32", Infinity), value("f32", 0)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:703 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:704 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:705 +assert_return( + () => invoke($0, `sub`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:706 +assert_return( + () => invoke($0, `sub`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:707 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:708 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:709 +assert_return( + () => invoke($0, `sub`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:710 +assert_return( + () => invoke($0, `sub`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:711 +assert_return( + () => invoke($0, `sub`, [value("f32", -Infinity), value("f32", -0.5)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:712 +assert_return( + () => invoke($0, `sub`, [value("f32", -Infinity), value("f32", 0.5)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:713 +assert_return( + () => invoke($0, `sub`, [value("f32", Infinity), value("f32", -0.5)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:714 +assert_return( + () => invoke($0, `sub`, [value("f32", Infinity), value("f32", 0.5)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:715 +assert_return( + () => invoke($0, `sub`, [value("f32", -Infinity), value("f32", -1)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:716 +assert_return( + () => invoke($0, `sub`, [value("f32", -Infinity), value("f32", 1)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:717 +assert_return( + () => invoke($0, `sub`, [value("f32", Infinity), value("f32", -1)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:718 +assert_return( + () => invoke($0, `sub`, [value("f32", Infinity), value("f32", 1)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:719 +assert_return( + () => invoke($0, `sub`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:720 +assert_return( + () => invoke($0, `sub`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:721 +assert_return( + () => invoke($0, `sub`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:722 +assert_return( + () => invoke($0, `sub`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:723 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:724 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:725 +assert_return( + () => invoke($0, `sub`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:726 +assert_return( + () => invoke($0, `sub`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:727 +assert_return( + () => invoke($0, `sub`, [value("f32", -Infinity), value("f32", -Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:728 +assert_return( + () => invoke($0, `sub`, [value("f32", -Infinity), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:729 +assert_return( + () => invoke($0, `sub`, [value("f32", Infinity), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:730 +assert_return( + () => invoke($0, `sub`, [value("f32", Infinity), value("f32", Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:731 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:732 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:733 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:734 +assert_return( + () => invoke($0, `sub`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:735 +assert_return( + () => invoke($0, `sub`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:736 +assert_return( + () => invoke($0, `sub`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:737 +assert_return( + () => invoke($0, `sub`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:738 +assert_return( + () => invoke($0, `sub`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:739 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:740 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:741 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:742 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:743 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:744 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:745 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:746 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:747 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:748 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:749 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:750 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:751 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:752 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:753 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:754 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:755 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:756 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:757 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:758 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:759 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:760 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:761 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:762 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:763 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:764 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:765 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:766 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:767 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:768 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:769 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:770 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:771 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:772 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:773 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:774 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:775 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:776 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:777 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:778 +assert_return( + () => invoke($0, `sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:779 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:780 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:781 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:782 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:783 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:784 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:785 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:786 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:787 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:788 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:789 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:790 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:791 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:792 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:793 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:794 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:795 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:796 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:797 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:798 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:799 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:800 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:801 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:802 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:803 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:804 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:805 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:806 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:807 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:808 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:809 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:810 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:811 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:812 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:813 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:814 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:815 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:816 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:817 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:818 +assert_return( + () => invoke($0, `sub`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:819 +assert_return(() => invoke($0, `mul`, [value("f32", -0), value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:820 +assert_return(() => invoke($0, `mul`, [value("f32", -0), value("f32", 0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:821 +assert_return(() => invoke($0, `mul`, [value("f32", 0), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:822 +assert_return(() => invoke($0, `mul`, [value("f32", 0), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:823 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:824 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:825 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:826 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:827 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:828 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:829 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:830 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:831 +assert_return(() => invoke($0, `mul`, [value("f32", -0), value("f32", -0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:832 +assert_return(() => invoke($0, `mul`, [value("f32", -0), value("f32", 0.5)]), [value("f32", -0)]); + +// ./test/core/f32.wast:833 +assert_return(() => invoke($0, `mul`, [value("f32", 0), value("f32", -0.5)]), [value("f32", -0)]); + +// ./test/core/f32.wast:834 +assert_return(() => invoke($0, `mul`, [value("f32", 0), value("f32", 0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:835 +assert_return(() => invoke($0, `mul`, [value("f32", -0), value("f32", -1)]), [value("f32", 0)]); + +// ./test/core/f32.wast:836 +assert_return(() => invoke($0, `mul`, [value("f32", -0), value("f32", 1)]), [value("f32", -0)]); + +// ./test/core/f32.wast:837 +assert_return(() => invoke($0, `mul`, [value("f32", 0), value("f32", -1)]), [value("f32", -0)]); + +// ./test/core/f32.wast:838 +assert_return(() => invoke($0, `mul`, [value("f32", 0), value("f32", 1)]), [value("f32", 0)]); + +// ./test/core/f32.wast:839 +assert_return(() => invoke($0, `mul`, [value("f32", -0), value("f32", -6.2831855)]), [value("f32", 0)]); + +// ./test/core/f32.wast:840 +assert_return(() => invoke($0, `mul`, [value("f32", -0), value("f32", 6.2831855)]), [value("f32", -0)]); + +// ./test/core/f32.wast:841 +assert_return(() => invoke($0, `mul`, [value("f32", 0), value("f32", -6.2831855)]), [value("f32", -0)]); + +// ./test/core/f32.wast:842 +assert_return(() => invoke($0, `mul`, [value("f32", 0), value("f32", 6.2831855)]), [value("f32", 0)]); + +// ./test/core/f32.wast:843 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:844 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:845 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:846 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:847 +assert_return(() => invoke($0, `mul`, [value("f32", -0), value("f32", -Infinity)]), [`canonical_nan`]); + +// ./test/core/f32.wast:848 +assert_return(() => invoke($0, `mul`, [value("f32", -0), value("f32", Infinity)]), [`canonical_nan`]); + +// ./test/core/f32.wast:849 +assert_return(() => invoke($0, `mul`, [value("f32", 0), value("f32", -Infinity)]), [`canonical_nan`]); + +// ./test/core/f32.wast:850 +assert_return(() => invoke($0, `mul`, [value("f32", 0), value("f32", Infinity)]), [`canonical_nan`]); + +// ./test/core/f32.wast:851 +assert_return( + () => invoke($0, `mul`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:852 +assert_return( + () => invoke($0, `mul`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:853 +assert_return( + () => invoke($0, `mul`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:854 +assert_return( + () => invoke($0, `mul`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:855 +assert_return( + () => invoke($0, `mul`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:856 +assert_return( + () => invoke($0, `mul`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:857 +assert_return( + () => invoke($0, `mul`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:858 +assert_return( + () => invoke($0, `mul`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:859 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:860 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:861 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:862 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:863 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:864 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:865 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:866 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:867 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:868 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:869 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:870 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:871 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:872 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:873 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:874 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:875 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:876 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:877 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:878 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:879 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", 0.000000000000000000000000000000000000000000008)], +); + +// ./test/core/f32.wast:880 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", -0.000000000000000000000000000000000000000000008)], +); + +// ./test/core/f32.wast:881 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", -0.000000000000000000000000000000000000000000008)], +); + +// ./test/core/f32.wast:882 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", 0.000000000000000000000000000000000000000000008)], +); + +// ./test/core/f32.wast:883 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0.00000047683713)], +); + +// ./test/core/f32.wast:884 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -0.00000047683713)], +); + +// ./test/core/f32.wast:885 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.00000047683713)], +); + +// ./test/core/f32.wast:886 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.00000047683713)], +); + +// ./test/core/f32.wast:887 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:888 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:889 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:890 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:891 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:892 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:893 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:894 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:895 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:896 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:897 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:898 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:899 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:900 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:901 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:902 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:903 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:904 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:905 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:906 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:907 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:908 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:909 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:910 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:911 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000005877472)], +); + +// ./test/core/f32.wast:912 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000005877472)], +); + +// ./test/core/f32.wast:913 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000005877472)], +); + +// ./test/core/f32.wast:914 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000005877472)], +); + +// ./test/core/f32.wast:915 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:916 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:917 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:918 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:919 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", 0.00000000000000000000000000000000000007385849)], +); + +// ./test/core/f32.wast:920 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", -0.00000000000000000000000000000000000007385849)], +); + +// ./test/core/f32.wast:921 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", -0.00000000000000000000000000000000000007385849)], +); + +// ./test/core/f32.wast:922 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", 0.00000000000000000000000000000000000007385849)], +); + +// ./test/core/f32.wast:923 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 3.9999998)], +); + +// ./test/core/f32.wast:924 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -3.9999998)], +); + +// ./test/core/f32.wast:925 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -3.9999998)], +); + +// ./test/core/f32.wast:926 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 3.9999998)], +); + +// ./test/core/f32.wast:927 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:928 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:929 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:930 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:931 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:932 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:933 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:934 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:935 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:936 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:937 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:938 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:939 +assert_return(() => invoke($0, `mul`, [value("f32", -0.5), value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:940 +assert_return(() => invoke($0, `mul`, [value("f32", -0.5), value("f32", 0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:941 +assert_return(() => invoke($0, `mul`, [value("f32", 0.5), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:942 +assert_return(() => invoke($0, `mul`, [value("f32", 0.5), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:943 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:944 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:945 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:946 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:947 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000005877472)], +); + +// ./test/core/f32.wast:948 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000005877472)], +); + +// ./test/core/f32.wast:949 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000005877472)], +); + +// ./test/core/f32.wast:950 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000005877472)], +); + +// ./test/core/f32.wast:951 +assert_return(() => invoke($0, `mul`, [value("f32", -0.5), value("f32", -0.5)]), [value("f32", 0.25)]); + +// ./test/core/f32.wast:952 +assert_return(() => invoke($0, `mul`, [value("f32", -0.5), value("f32", 0.5)]), [value("f32", -0.25)]); + +// ./test/core/f32.wast:953 +assert_return(() => invoke($0, `mul`, [value("f32", 0.5), value("f32", -0.5)]), [value("f32", -0.25)]); + +// ./test/core/f32.wast:954 +assert_return(() => invoke($0, `mul`, [value("f32", 0.5), value("f32", 0.5)]), [value("f32", 0.25)]); + +// ./test/core/f32.wast:955 +assert_return(() => invoke($0, `mul`, [value("f32", -0.5), value("f32", -1)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:956 +assert_return(() => invoke($0, `mul`, [value("f32", -0.5), value("f32", 1)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:957 +assert_return(() => invoke($0, `mul`, [value("f32", 0.5), value("f32", -1)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:958 +assert_return(() => invoke($0, `mul`, [value("f32", 0.5), value("f32", 1)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:959 +assert_return( + () => invoke($0, `mul`, [value("f32", -0.5), value("f32", -6.2831855)]), + [value("f32", 3.1415927)], +); + +// ./test/core/f32.wast:960 +assert_return( + () => invoke($0, `mul`, [value("f32", -0.5), value("f32", 6.2831855)]), + [value("f32", -3.1415927)], +); + +// ./test/core/f32.wast:961 +assert_return( + () => invoke($0, `mul`, [value("f32", 0.5), value("f32", -6.2831855)]), + [value("f32", -3.1415927)], +); + +// ./test/core/f32.wast:962 +assert_return( + () => invoke($0, `mul`, [value("f32", 0.5), value("f32", 6.2831855)]), + [value("f32", 3.1415927)], +); + +// ./test/core/f32.wast:963 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 170141170000000000000000000000000000000)], +); + +// ./test/core/f32.wast:964 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -170141170000000000000000000000000000000)], +); + +// ./test/core/f32.wast:965 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -170141170000000000000000000000000000000)], +); + +// ./test/core/f32.wast:966 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 170141170000000000000000000000000000000)], +); + +// ./test/core/f32.wast:967 +assert_return( + () => invoke($0, `mul`, [value("f32", -0.5), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:968 +assert_return( + () => invoke($0, `mul`, [value("f32", -0.5), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:969 +assert_return( + () => invoke($0, `mul`, [value("f32", 0.5), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:970 +assert_return( + () => invoke($0, `mul`, [value("f32", 0.5), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:971 +assert_return( + () => invoke($0, `mul`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:972 +assert_return( + () => invoke($0, `mul`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:973 +assert_return( + () => invoke($0, `mul`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:974 +assert_return( + () => invoke($0, `mul`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:975 +assert_return( + () => invoke($0, `mul`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:976 +assert_return( + () => invoke($0, `mul`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:977 +assert_return( + () => invoke($0, `mul`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:978 +assert_return( + () => invoke($0, `mul`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:979 +assert_return(() => invoke($0, `mul`, [value("f32", -1), value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:980 +assert_return(() => invoke($0, `mul`, [value("f32", -1), value("f32", 0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:981 +assert_return(() => invoke($0, `mul`, [value("f32", 1), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:982 +assert_return(() => invoke($0, `mul`, [value("f32", 1), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:983 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:984 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:985 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:986 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:987 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:988 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:989 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:990 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:991 +assert_return(() => invoke($0, `mul`, [value("f32", -1), value("f32", -0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:992 +assert_return(() => invoke($0, `mul`, [value("f32", -1), value("f32", 0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:993 +assert_return(() => invoke($0, `mul`, [value("f32", 1), value("f32", -0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:994 +assert_return(() => invoke($0, `mul`, [value("f32", 1), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:995 +assert_return(() => invoke($0, `mul`, [value("f32", -1), value("f32", -1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:996 +assert_return(() => invoke($0, `mul`, [value("f32", -1), value("f32", 1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:997 +assert_return(() => invoke($0, `mul`, [value("f32", 1), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:998 +assert_return(() => invoke($0, `mul`, [value("f32", 1), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:999 +assert_return( + () => invoke($0, `mul`, [value("f32", -1), value("f32", -6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:1000 +assert_return( + () => invoke($0, `mul`, [value("f32", -1), value("f32", 6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1001 +assert_return( + () => invoke($0, `mul`, [value("f32", 1), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1002 +assert_return( + () => invoke($0, `mul`, [value("f32", 1), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:1003 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1004 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1005 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1006 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1007 +assert_return( + () => invoke($0, `mul`, [value("f32", -1), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1008 +assert_return( + () => invoke($0, `mul`, [value("f32", -1), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1009 +assert_return( + () => invoke($0, `mul`, [value("f32", 1), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1010 +assert_return( + () => invoke($0, `mul`, [value("f32", 1), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1011 +assert_return( + () => invoke($0, `mul`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1012 +assert_return( + () => invoke($0, `mul`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1013 +assert_return( + () => invoke($0, `mul`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1014 +assert_return( + () => invoke($0, `mul`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1015 +assert_return( + () => invoke($0, `mul`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1016 +assert_return( + () => invoke($0, `mul`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1017 +assert_return( + () => invoke($0, `mul`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1018 +assert_return( + () => invoke($0, `mul`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1019 +assert_return(() => invoke($0, `mul`, [value("f32", -6.2831855), value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1020 +assert_return(() => invoke($0, `mul`, [value("f32", -6.2831855), value("f32", 0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1021 +assert_return(() => invoke($0, `mul`, [value("f32", 6.2831855), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1022 +assert_return(() => invoke($0, `mul`, [value("f32", 6.2831855), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1023 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000008)], +); + +// ./test/core/f32.wast:1024 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000008)], +); + +// ./test/core/f32.wast:1025 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000008)], +); + +// ./test/core/f32.wast:1026 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000008)], +); + +// ./test/core/f32.wast:1027 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.00000000000000000000000000000000000007385849)], +); + +// ./test/core/f32.wast:1028 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.00000000000000000000000000000000000007385849)], +); + +// ./test/core/f32.wast:1029 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.00000000000000000000000000000000000007385849)], +); + +// ./test/core/f32.wast:1030 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.00000000000000000000000000000000000007385849)], +); + +// ./test/core/f32.wast:1031 +assert_return( + () => invoke($0, `mul`, [value("f32", -6.2831855), value("f32", -0.5)]), + [value("f32", 3.1415927)], +); + +// ./test/core/f32.wast:1032 +assert_return( + () => invoke($0, `mul`, [value("f32", -6.2831855), value("f32", 0.5)]), + [value("f32", -3.1415927)], +); + +// ./test/core/f32.wast:1033 +assert_return( + () => invoke($0, `mul`, [value("f32", 6.2831855), value("f32", -0.5)]), + [value("f32", -3.1415927)], +); + +// ./test/core/f32.wast:1034 +assert_return( + () => invoke($0, `mul`, [value("f32", 6.2831855), value("f32", 0.5)]), + [value("f32", 3.1415927)], +); + +// ./test/core/f32.wast:1035 +assert_return( + () => invoke($0, `mul`, [value("f32", -6.2831855), value("f32", -1)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:1036 +assert_return( + () => invoke($0, `mul`, [value("f32", -6.2831855), value("f32", 1)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1037 +assert_return( + () => invoke($0, `mul`, [value("f32", 6.2831855), value("f32", -1)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1038 +assert_return( + () => invoke($0, `mul`, [value("f32", 6.2831855), value("f32", 1)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:1039 +assert_return( + () => invoke($0, `mul`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("f32", 39.47842)], +); + +// ./test/core/f32.wast:1040 +assert_return( + () => invoke($0, `mul`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("f32", -39.47842)], +); + +// ./test/core/f32.wast:1041 +assert_return( + () => invoke($0, `mul`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("f32", -39.47842)], +); + +// ./test/core/f32.wast:1042 +assert_return( + () => invoke($0, `mul`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("f32", 39.47842)], +); + +// ./test/core/f32.wast:1043 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1044 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1045 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1046 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1047 +assert_return( + () => invoke($0, `mul`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1048 +assert_return( + () => invoke($0, `mul`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1049 +assert_return( + () => invoke($0, `mul`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1050 +assert_return( + () => invoke($0, `mul`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1051 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1052 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1053 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1054 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1055 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1056 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1057 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1058 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1059 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1060 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1061 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1062 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1063 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.00000047683713)], +); + +// ./test/core/f32.wast:1064 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.00000047683713)], +); + +// ./test/core/f32.wast:1065 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.00000047683713)], +); + +// ./test/core/f32.wast:1066 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.00000047683713)], +); + +// ./test/core/f32.wast:1067 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 3.9999998)], +); + +// ./test/core/f32.wast:1068 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -3.9999998)], +); + +// ./test/core/f32.wast:1069 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -3.9999998)], +); + +// ./test/core/f32.wast:1070 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 3.9999998)], +); + +// ./test/core/f32.wast:1071 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", 170141170000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1072 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", -170141170000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1073 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", -170141170000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1074 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", 170141170000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1075 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1076 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1077 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1078 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1079 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1080 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1081 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1082 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1083 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1084 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1085 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1086 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1087 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1088 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1089 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1090 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1091 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1092 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1093 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1094 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1095 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1096 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1097 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1098 +assert_return( + () => invoke($0, `mul`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1099 +assert_return(() => invoke($0, `mul`, [value("f32", -Infinity), value("f32", -0)]), [`canonical_nan`]); + +// ./test/core/f32.wast:1100 +assert_return(() => invoke($0, `mul`, [value("f32", -Infinity), value("f32", 0)]), [`canonical_nan`]); + +// ./test/core/f32.wast:1101 +assert_return(() => invoke($0, `mul`, [value("f32", Infinity), value("f32", -0)]), [`canonical_nan`]); + +// ./test/core/f32.wast:1102 +assert_return(() => invoke($0, `mul`, [value("f32", Infinity), value("f32", 0)]), [`canonical_nan`]); + +// ./test/core/f32.wast:1103 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1104 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1105 +assert_return( + () => invoke($0, `mul`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1106 +assert_return( + () => invoke($0, `mul`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1107 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1108 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1109 +assert_return( + () => invoke($0, `mul`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1110 +assert_return( + () => invoke($0, `mul`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1111 +assert_return( + () => invoke($0, `mul`, [value("f32", -Infinity), value("f32", -0.5)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1112 +assert_return( + () => invoke($0, `mul`, [value("f32", -Infinity), value("f32", 0.5)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1113 +assert_return( + () => invoke($0, `mul`, [value("f32", Infinity), value("f32", -0.5)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1114 +assert_return( + () => invoke($0, `mul`, [value("f32", Infinity), value("f32", 0.5)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1115 +assert_return( + () => invoke($0, `mul`, [value("f32", -Infinity), value("f32", -1)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1116 +assert_return( + () => invoke($0, `mul`, [value("f32", -Infinity), value("f32", 1)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1117 +assert_return( + () => invoke($0, `mul`, [value("f32", Infinity), value("f32", -1)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1118 +assert_return( + () => invoke($0, `mul`, [value("f32", Infinity), value("f32", 1)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1119 +assert_return( + () => invoke($0, `mul`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1120 +assert_return( + () => invoke($0, `mul`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1121 +assert_return( + () => invoke($0, `mul`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1122 +assert_return( + () => invoke($0, `mul`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1123 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1124 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1125 +assert_return( + () => invoke($0, `mul`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1126 +assert_return( + () => invoke($0, `mul`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1127 +assert_return( + () => invoke($0, `mul`, [value("f32", -Infinity), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1128 +assert_return( + () => invoke($0, `mul`, [value("f32", -Infinity), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1129 +assert_return( + () => invoke($0, `mul`, [value("f32", Infinity), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1130 +assert_return( + () => invoke($0, `mul`, [value("f32", Infinity), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1131 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1132 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1133 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1134 +assert_return( + () => invoke($0, `mul`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1135 +assert_return( + () => invoke($0, `mul`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1136 +assert_return( + () => invoke($0, `mul`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1137 +assert_return( + () => invoke($0, `mul`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1138 +assert_return( + () => invoke($0, `mul`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1139 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1140 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1141 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1142 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1143 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1144 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1145 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1146 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1147 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1148 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1149 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1150 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1151 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1152 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1153 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1154 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1155 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1156 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1157 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1158 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1159 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1160 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1161 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1162 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1163 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1164 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1165 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1166 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1167 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1168 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1169 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1170 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1171 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1172 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1173 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1174 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1175 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1176 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1177 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1178 +assert_return( + () => invoke($0, `mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1179 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1180 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1181 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1182 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1183 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1184 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1185 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1186 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1187 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1188 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1189 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1190 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1191 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1192 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1193 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1194 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1195 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1196 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1197 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1198 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1199 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1200 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1201 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1202 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1203 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1204 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1205 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1206 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1207 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1208 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1209 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1210 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1211 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1212 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1213 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1214 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1215 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1216 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1217 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1218 +assert_return( + () => invoke($0, `mul`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1219 +assert_return(() => invoke($0, `div`, [value("f32", -0), value("f32", -0)]), [`canonical_nan`]); + +// ./test/core/f32.wast:1220 +assert_return(() => invoke($0, `div`, [value("f32", -0), value("f32", 0)]), [`canonical_nan`]); + +// ./test/core/f32.wast:1221 +assert_return(() => invoke($0, `div`, [value("f32", 0), value("f32", -0)]), [`canonical_nan`]); + +// ./test/core/f32.wast:1222 +assert_return(() => invoke($0, `div`, [value("f32", 0), value("f32", 0)]), [`canonical_nan`]); + +// ./test/core/f32.wast:1223 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1224 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1225 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1226 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1227 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1228 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1229 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1230 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1231 +assert_return(() => invoke($0, `div`, [value("f32", -0), value("f32", -0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1232 +assert_return(() => invoke($0, `div`, [value("f32", -0), value("f32", 0.5)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1233 +assert_return(() => invoke($0, `div`, [value("f32", 0), value("f32", -0.5)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1234 +assert_return(() => invoke($0, `div`, [value("f32", 0), value("f32", 0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1235 +assert_return(() => invoke($0, `div`, [value("f32", -0), value("f32", -1)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1236 +assert_return(() => invoke($0, `div`, [value("f32", -0), value("f32", 1)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1237 +assert_return(() => invoke($0, `div`, [value("f32", 0), value("f32", -1)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1238 +assert_return(() => invoke($0, `div`, [value("f32", 0), value("f32", 1)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1239 +assert_return(() => invoke($0, `div`, [value("f32", -0), value("f32", -6.2831855)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1240 +assert_return(() => invoke($0, `div`, [value("f32", -0), value("f32", 6.2831855)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1241 +assert_return(() => invoke($0, `div`, [value("f32", 0), value("f32", -6.2831855)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1242 +assert_return(() => invoke($0, `div`, [value("f32", 0), value("f32", 6.2831855)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1243 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1244 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1245 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1246 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1247 +assert_return(() => invoke($0, `div`, [value("f32", -0), value("f32", -Infinity)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1248 +assert_return(() => invoke($0, `div`, [value("f32", -0), value("f32", Infinity)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1249 +assert_return(() => invoke($0, `div`, [value("f32", 0), value("f32", -Infinity)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1250 +assert_return(() => invoke($0, `div`, [value("f32", 0), value("f32", Infinity)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1251 +assert_return( + () => invoke($0, `div`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1252 +assert_return( + () => invoke($0, `div`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1253 +assert_return( + () => invoke($0, `div`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1254 +assert_return( + () => invoke($0, `div`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1255 +assert_return( + () => invoke($0, `div`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1256 +assert_return( + () => invoke($0, `div`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1257 +assert_return( + () => invoke($0, `div`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1258 +assert_return( + () => invoke($0, `div`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1259 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1260 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1261 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1262 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1263 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:1264 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1265 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1266 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:1267 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.00000011920929)], +); + +// ./test/core/f32.wast:1268 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.00000011920929)], +); + +// ./test/core/f32.wast:1269 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.00000011920929)], +); + +// ./test/core/f32.wast:1270 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.00000011920929)], +); + +// ./test/core/f32.wast:1271 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/f32.wast:1272 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/f32.wast:1273 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/f32.wast:1274 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/f32.wast:1275 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1276 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1277 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1278 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1279 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1280 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1281 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1282 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1283 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1284 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1285 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1286 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1287 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1288 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1289 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1290 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1291 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1292 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1293 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1294 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1295 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1296 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1297 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1298 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1299 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1300 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1301 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1302 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1303 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 8388608)], +); + +// ./test/core/f32.wast:1304 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -8388608)], +); + +// ./test/core/f32.wast:1305 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -8388608)], +); + +// ./test/core/f32.wast:1306 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 8388608)], +); + +// ./test/core/f32.wast:1307 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:1308 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1309 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1310 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:1311 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000023509887)], +); + +// ./test/core/f32.wast:1312 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000023509887)], +); + +// ./test/core/f32.wast:1313 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000023509887)], +); + +// ./test/core/f32.wast:1314 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000023509887)], +); + +// ./test/core/f32.wast:1315 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1316 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1317 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1318 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1319 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", 0.000000000000000000000000000000000000001870857)], +); + +// ./test/core/f32.wast:1320 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", -0.000000000000000000000000000000000000001870857)], +); + +// ./test/core/f32.wast:1321 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", -0.000000000000000000000000000000000000001870857)], +); + +// ./test/core/f32.wast:1322 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", 0.000000000000000000000000000000000000001870857)], +); + +// ./test/core/f32.wast:1323 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1324 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1325 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1326 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1327 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1328 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1329 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1330 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1331 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1332 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1333 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1334 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1335 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1336 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1337 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1338 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1339 +assert_return(() => invoke($0, `div`, [value("f32", -0.5), value("f32", -0)]), [value("f32", Infinity)]); + +// ./test/core/f32.wast:1340 +assert_return(() => invoke($0, `div`, [value("f32", -0.5), value("f32", 0)]), [value("f32", -Infinity)]); + +// ./test/core/f32.wast:1341 +assert_return(() => invoke($0, `div`, [value("f32", 0.5), value("f32", -0)]), [value("f32", -Infinity)]); + +// ./test/core/f32.wast:1342 +assert_return(() => invoke($0, `div`, [value("f32", 0.5), value("f32", 0)]), [value("f32", Infinity)]); + +// ./test/core/f32.wast:1343 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1344 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1345 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1346 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1347 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 42535296000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1348 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -42535296000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1349 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -42535296000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1350 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 42535296000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1351 +assert_return(() => invoke($0, `div`, [value("f32", -0.5), value("f32", -0.5)]), [value("f32", 1)]); + +// ./test/core/f32.wast:1352 +assert_return(() => invoke($0, `div`, [value("f32", -0.5), value("f32", 0.5)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1353 +assert_return(() => invoke($0, `div`, [value("f32", 0.5), value("f32", -0.5)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1354 +assert_return(() => invoke($0, `div`, [value("f32", 0.5), value("f32", 0.5)]), [value("f32", 1)]); + +// ./test/core/f32.wast:1355 +assert_return(() => invoke($0, `div`, [value("f32", -0.5), value("f32", -1)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:1356 +assert_return(() => invoke($0, `div`, [value("f32", -0.5), value("f32", 1)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:1357 +assert_return(() => invoke($0, `div`, [value("f32", 0.5), value("f32", -1)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:1358 +assert_return(() => invoke($0, `div`, [value("f32", 0.5), value("f32", 1)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:1359 +assert_return( + () => invoke($0, `div`, [value("f32", -0.5), value("f32", -6.2831855)]), + [value("f32", 0.07957747)], +); + +// ./test/core/f32.wast:1360 +assert_return( + () => invoke($0, `div`, [value("f32", -0.5), value("f32", 6.2831855)]), + [value("f32", -0.07957747)], +); + +// ./test/core/f32.wast:1361 +assert_return( + () => invoke($0, `div`, [value("f32", 0.5), value("f32", -6.2831855)]), + [value("f32", -0.07957747)], +); + +// ./test/core/f32.wast:1362 +assert_return( + () => invoke($0, `div`, [value("f32", 0.5), value("f32", 6.2831855)]), + [value("f32", 0.07957747)], +); + +// ./test/core/f32.wast:1363 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000001469368)], +); + +// ./test/core/f32.wast:1364 +assert_return( + () => invoke($0, `div`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000001469368)], +); + +// ./test/core/f32.wast:1365 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000001469368)], +); + +// ./test/core/f32.wast:1366 +assert_return( + () => invoke($0, `div`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000001469368)], +); + +// ./test/core/f32.wast:1367 +assert_return(() => invoke($0, `div`, [value("f32", -0.5), value("f32", -Infinity)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1368 +assert_return(() => invoke($0, `div`, [value("f32", -0.5), value("f32", Infinity)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1369 +assert_return(() => invoke($0, `div`, [value("f32", 0.5), value("f32", -Infinity)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1370 +assert_return(() => invoke($0, `div`, [value("f32", 0.5), value("f32", Infinity)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1371 +assert_return( + () => invoke($0, `div`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1372 +assert_return( + () => invoke($0, `div`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1373 +assert_return( + () => invoke($0, `div`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1374 +assert_return( + () => invoke($0, `div`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1375 +assert_return( + () => invoke($0, `div`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1376 +assert_return( + () => invoke($0, `div`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1377 +assert_return( + () => invoke($0, `div`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1378 +assert_return( + () => invoke($0, `div`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1379 +assert_return(() => invoke($0, `div`, [value("f32", -1), value("f32", -0)]), [value("f32", Infinity)]); + +// ./test/core/f32.wast:1380 +assert_return(() => invoke($0, `div`, [value("f32", -1), value("f32", 0)]), [value("f32", -Infinity)]); + +// ./test/core/f32.wast:1381 +assert_return(() => invoke($0, `div`, [value("f32", 1), value("f32", -0)]), [value("f32", -Infinity)]); + +// ./test/core/f32.wast:1382 +assert_return(() => invoke($0, `div`, [value("f32", 1), value("f32", 0)]), [value("f32", Infinity)]); + +// ./test/core/f32.wast:1383 +assert_return( + () => invoke($0, `div`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1384 +assert_return( + () => invoke($0, `div`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1385 +assert_return( + () => invoke($0, `div`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1386 +assert_return( + () => invoke($0, `div`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1387 +assert_return( + () => invoke($0, `div`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 85070590000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1388 +assert_return( + () => invoke($0, `div`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -85070590000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1389 +assert_return( + () => invoke($0, `div`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -85070590000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1390 +assert_return( + () => invoke($0, `div`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 85070590000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1391 +assert_return(() => invoke($0, `div`, [value("f32", -1), value("f32", -0.5)]), [value("f32", 2)]); + +// ./test/core/f32.wast:1392 +assert_return(() => invoke($0, `div`, [value("f32", -1), value("f32", 0.5)]), [value("f32", -2)]); + +// ./test/core/f32.wast:1393 +assert_return(() => invoke($0, `div`, [value("f32", 1), value("f32", -0.5)]), [value("f32", -2)]); + +// ./test/core/f32.wast:1394 +assert_return(() => invoke($0, `div`, [value("f32", 1), value("f32", 0.5)]), [value("f32", 2)]); + +// ./test/core/f32.wast:1395 +assert_return(() => invoke($0, `div`, [value("f32", -1), value("f32", -1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:1396 +assert_return(() => invoke($0, `div`, [value("f32", -1), value("f32", 1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1397 +assert_return(() => invoke($0, `div`, [value("f32", 1), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1398 +assert_return(() => invoke($0, `div`, [value("f32", 1), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:1399 +assert_return( + () => invoke($0, `div`, [value("f32", -1), value("f32", -6.2831855)]), + [value("f32", 0.15915494)], +); + +// ./test/core/f32.wast:1400 +assert_return( + () => invoke($0, `div`, [value("f32", -1), value("f32", 6.2831855)]), + [value("f32", -0.15915494)], +); + +// ./test/core/f32.wast:1401 +assert_return( + () => invoke($0, `div`, [value("f32", 1), value("f32", -6.2831855)]), + [value("f32", -0.15915494)], +); + +// ./test/core/f32.wast:1402 +assert_return( + () => invoke($0, `div`, [value("f32", 1), value("f32", 6.2831855)]), + [value("f32", 0.15915494)], +); + +// ./test/core/f32.wast:1403 +assert_return( + () => invoke($0, `div`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000002938736)], +); + +// ./test/core/f32.wast:1404 +assert_return( + () => invoke($0, `div`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000002938736)], +); + +// ./test/core/f32.wast:1405 +assert_return( + () => invoke($0, `div`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000002938736)], +); + +// ./test/core/f32.wast:1406 +assert_return( + () => invoke($0, `div`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000002938736)], +); + +// ./test/core/f32.wast:1407 +assert_return(() => invoke($0, `div`, [value("f32", -1), value("f32", -Infinity)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1408 +assert_return(() => invoke($0, `div`, [value("f32", -1), value("f32", Infinity)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1409 +assert_return(() => invoke($0, `div`, [value("f32", 1), value("f32", -Infinity)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1410 +assert_return(() => invoke($0, `div`, [value("f32", 1), value("f32", Infinity)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1411 +assert_return( + () => invoke($0, `div`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1412 +assert_return( + () => invoke($0, `div`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1413 +assert_return( + () => invoke($0, `div`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1414 +assert_return( + () => invoke($0, `div`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1415 +assert_return( + () => invoke($0, `div`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1416 +assert_return( + () => invoke($0, `div`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1417 +assert_return( + () => invoke($0, `div`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1418 +assert_return( + () => invoke($0, `div`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1419 +assert_return( + () => invoke($0, `div`, [value("f32", -6.2831855), value("f32", -0)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1420 +assert_return( + () => invoke($0, `div`, [value("f32", -6.2831855), value("f32", 0)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1421 +assert_return( + () => invoke($0, `div`, [value("f32", 6.2831855), value("f32", -0)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1422 +assert_return( + () => invoke($0, `div`, [value("f32", 6.2831855), value("f32", 0)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1423 +assert_return( + () => invoke($0, `div`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1424 +assert_return( + () => invoke($0, `div`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1425 +assert_return( + () => invoke($0, `div`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1426 +assert_return( + () => invoke($0, `div`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1427 +assert_return( + () => invoke($0, `div`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1428 +assert_return( + () => invoke($0, `div`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1429 +assert_return( + () => invoke($0, `div`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1430 +assert_return( + () => invoke($0, `div`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1431 +assert_return( + () => invoke($0, `div`, [value("f32", -6.2831855), value("f32", -0.5)]), + [value("f32", 12.566371)], +); + +// ./test/core/f32.wast:1432 +assert_return( + () => invoke($0, `div`, [value("f32", -6.2831855), value("f32", 0.5)]), + [value("f32", -12.566371)], +); + +// ./test/core/f32.wast:1433 +assert_return( + () => invoke($0, `div`, [value("f32", 6.2831855), value("f32", -0.5)]), + [value("f32", -12.566371)], +); + +// ./test/core/f32.wast:1434 +assert_return( + () => invoke($0, `div`, [value("f32", 6.2831855), value("f32", 0.5)]), + [value("f32", 12.566371)], +); + +// ./test/core/f32.wast:1435 +assert_return( + () => invoke($0, `div`, [value("f32", -6.2831855), value("f32", -1)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:1436 +assert_return( + () => invoke($0, `div`, [value("f32", -6.2831855), value("f32", 1)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1437 +assert_return( + () => invoke($0, `div`, [value("f32", 6.2831855), value("f32", -1)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1438 +assert_return( + () => invoke($0, `div`, [value("f32", 6.2831855), value("f32", 1)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:1439 +assert_return( + () => invoke($0, `div`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:1440 +assert_return( + () => invoke($0, `div`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1441 +assert_return( + () => invoke($0, `div`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1442 +assert_return( + () => invoke($0, `div`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:1443 +assert_return( + () => invoke($0, `div`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000018464624)], +); + +// ./test/core/f32.wast:1444 +assert_return( + () => invoke($0, `div`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000018464624)], +); + +// ./test/core/f32.wast:1445 +assert_return( + () => invoke($0, `div`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000018464624)], +); + +// ./test/core/f32.wast:1446 +assert_return( + () => invoke($0, `div`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000018464624)], +); + +// ./test/core/f32.wast:1447 +assert_return( + () => invoke($0, `div`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1448 +assert_return( + () => invoke($0, `div`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1449 +assert_return( + () => invoke($0, `div`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1450 +assert_return( + () => invoke($0, `div`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1451 +assert_return( + () => invoke($0, `div`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1452 +assert_return( + () => invoke($0, `div`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1453 +assert_return( + () => invoke($0, `div`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1454 +assert_return( + () => invoke($0, `div`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1455 +assert_return( + () => invoke($0, `div`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1456 +assert_return( + () => invoke($0, `div`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1457 +assert_return( + () => invoke($0, `div`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1458 +assert_return( + () => invoke($0, `div`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1459 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1460 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1461 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1462 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1463 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1464 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1465 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1466 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1467 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1468 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1469 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1470 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1471 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1472 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1473 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1474 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1475 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1476 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1477 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1478 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1479 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", 54157613000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1480 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", -54157613000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1481 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", -54157613000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1482 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", 54157613000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1483 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:1484 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1485 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1486 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:1487 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1488 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1489 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1490 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1491 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1492 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1493 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1494 +assert_return( + () => invoke($0, `div`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1495 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1496 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1497 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1498 +assert_return( + () => invoke($0, `div`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1499 +assert_return( + () => invoke($0, `div`, [value("f32", -Infinity), value("f32", -0)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1500 +assert_return( + () => invoke($0, `div`, [value("f32", -Infinity), value("f32", 0)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1501 +assert_return( + () => invoke($0, `div`, [value("f32", Infinity), value("f32", -0)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1502 +assert_return( + () => invoke($0, `div`, [value("f32", Infinity), value("f32", 0)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1503 +assert_return( + () => invoke($0, `div`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1504 +assert_return( + () => invoke($0, `div`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1505 +assert_return( + () => invoke($0, `div`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1506 +assert_return( + () => invoke($0, `div`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1507 +assert_return( + () => invoke($0, `div`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1508 +assert_return( + () => invoke($0, `div`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1509 +assert_return( + () => invoke($0, `div`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1510 +assert_return( + () => invoke($0, `div`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1511 +assert_return( + () => invoke($0, `div`, [value("f32", -Infinity), value("f32", -0.5)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1512 +assert_return( + () => invoke($0, `div`, [value("f32", -Infinity), value("f32", 0.5)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1513 +assert_return( + () => invoke($0, `div`, [value("f32", Infinity), value("f32", -0.5)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1514 +assert_return( + () => invoke($0, `div`, [value("f32", Infinity), value("f32", 0.5)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1515 +assert_return( + () => invoke($0, `div`, [value("f32", -Infinity), value("f32", -1)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1516 +assert_return( + () => invoke($0, `div`, [value("f32", -Infinity), value("f32", 1)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1517 +assert_return( + () => invoke($0, `div`, [value("f32", Infinity), value("f32", -1)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1518 +assert_return( + () => invoke($0, `div`, [value("f32", Infinity), value("f32", 1)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1519 +assert_return( + () => invoke($0, `div`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1520 +assert_return( + () => invoke($0, `div`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1521 +assert_return( + () => invoke($0, `div`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1522 +assert_return( + () => invoke($0, `div`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1523 +assert_return( + () => invoke($0, `div`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1524 +assert_return( + () => invoke($0, `div`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1525 +assert_return( + () => invoke($0, `div`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1526 +assert_return( + () => invoke($0, `div`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1527 +assert_return( + () => invoke($0, `div`, [value("f32", -Infinity), value("f32", -Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1528 +assert_return( + () => invoke($0, `div`, [value("f32", -Infinity), value("f32", Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1529 +assert_return( + () => invoke($0, `div`, [value("f32", Infinity), value("f32", -Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1530 +assert_return( + () => invoke($0, `div`, [value("f32", Infinity), value("f32", Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1531 +assert_return( + () => invoke($0, `div`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1532 +assert_return( + () => invoke($0, `div`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1533 +assert_return( + () => invoke($0, `div`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1534 +assert_return( + () => invoke($0, `div`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1535 +assert_return( + () => invoke($0, `div`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1536 +assert_return( + () => invoke($0, `div`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1537 +assert_return( + () => invoke($0, `div`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1538 +assert_return( + () => invoke($0, `div`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1539 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1540 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1541 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1542 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1543 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1544 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1545 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1546 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1547 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1548 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1549 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1550 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1551 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1552 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1553 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1554 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1555 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1556 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1557 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1558 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1559 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1560 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1561 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1562 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1563 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1564 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1565 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1566 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1567 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1568 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1569 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1570 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1571 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1572 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1573 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1574 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1575 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1576 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1577 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1578 +assert_return( + () => invoke($0, `div`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1579 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1580 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1581 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1582 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1583 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1584 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1585 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1586 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1587 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1588 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1589 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1590 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1591 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1592 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1593 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1594 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1595 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1596 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1597 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1598 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1599 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1600 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1601 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1602 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1603 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1604 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1605 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1606 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1607 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1608 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1609 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1610 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1611 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1612 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1613 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1614 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1615 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1616 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1617 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1618 +assert_return( + () => invoke($0, `div`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1619 +assert_return(() => invoke($0, `min`, [value("f32", -0), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1620 +assert_return(() => invoke($0, `min`, [value("f32", -0), value("f32", 0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1621 +assert_return(() => invoke($0, `min`, [value("f32", 0), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1622 +assert_return(() => invoke($0, `min`, [value("f32", 0), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1623 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1624 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1625 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1626 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1627 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1628 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1629 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1630 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1631 +assert_return(() => invoke($0, `min`, [value("f32", -0), value("f32", -0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:1632 +assert_return(() => invoke($0, `min`, [value("f32", -0), value("f32", 0.5)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1633 +assert_return(() => invoke($0, `min`, [value("f32", 0), value("f32", -0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:1634 +assert_return(() => invoke($0, `min`, [value("f32", 0), value("f32", 0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1635 +assert_return(() => invoke($0, `min`, [value("f32", -0), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1636 +assert_return(() => invoke($0, `min`, [value("f32", -0), value("f32", 1)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1637 +assert_return(() => invoke($0, `min`, [value("f32", 0), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1638 +assert_return(() => invoke($0, `min`, [value("f32", 0), value("f32", 1)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1639 +assert_return( + () => invoke($0, `min`, [value("f32", -0), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1640 +assert_return(() => invoke($0, `min`, [value("f32", -0), value("f32", 6.2831855)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1641 +assert_return( + () => invoke($0, `min`, [value("f32", 0), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1642 +assert_return(() => invoke($0, `min`, [value("f32", 0), value("f32", 6.2831855)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1643 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1644 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1645 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1646 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1647 +assert_return( + () => invoke($0, `min`, [value("f32", -0), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1648 +assert_return(() => invoke($0, `min`, [value("f32", -0), value("f32", Infinity)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1649 +assert_return( + () => invoke($0, `min`, [value("f32", 0), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1650 +assert_return(() => invoke($0, `min`, [value("f32", 0), value("f32", Infinity)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1651 +assert_return( + () => invoke($0, `min`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1652 +assert_return( + () => invoke($0, `min`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1653 +assert_return( + () => invoke($0, `min`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1654 +assert_return( + () => invoke($0, `min`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1655 +assert_return( + () => invoke($0, `min`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1656 +assert_return( + () => invoke($0, `min`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1657 +assert_return( + () => invoke($0, `min`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1658 +assert_return( + () => invoke($0, `min`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1659 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1660 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1661 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1662 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1663 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1664 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1665 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1666 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1667 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1668 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1669 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1670 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1671 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1672 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1673 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1674 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1675 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1676 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1677 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1678 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1679 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1680 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1681 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1682 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1683 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1684 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1685 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1686 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1687 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1688 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1689 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1690 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1691 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1692 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1693 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1694 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1695 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1696 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1697 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1698 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1699 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1700 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1701 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1702 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1703 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1704 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1705 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1706 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1707 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1708 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1709 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1710 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1711 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1712 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1713 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1714 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1715 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1716 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1717 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1718 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1719 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1720 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1721 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1722 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1723 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1724 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1725 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1726 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1727 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1728 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1729 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1730 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1731 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1732 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1733 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1734 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1735 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1736 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1737 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1738 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1739 +assert_return(() => invoke($0, `min`, [value("f32", -0.5), value("f32", -0)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:1740 +assert_return(() => invoke($0, `min`, [value("f32", -0.5), value("f32", 0)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:1741 +assert_return(() => invoke($0, `min`, [value("f32", 0.5), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1742 +assert_return(() => invoke($0, `min`, [value("f32", 0.5), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1743 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1744 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1745 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1746 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1747 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1748 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1749 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1750 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1751 +assert_return(() => invoke($0, `min`, [value("f32", -0.5), value("f32", -0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:1752 +assert_return(() => invoke($0, `min`, [value("f32", -0.5), value("f32", 0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:1753 +assert_return(() => invoke($0, `min`, [value("f32", 0.5), value("f32", -0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:1754 +assert_return(() => invoke($0, `min`, [value("f32", 0.5), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:1755 +assert_return(() => invoke($0, `min`, [value("f32", -0.5), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1756 +assert_return(() => invoke($0, `min`, [value("f32", -0.5), value("f32", 1)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:1757 +assert_return(() => invoke($0, `min`, [value("f32", 0.5), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1758 +assert_return(() => invoke($0, `min`, [value("f32", 0.5), value("f32", 1)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:1759 +assert_return( + () => invoke($0, `min`, [value("f32", -0.5), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1760 +assert_return( + () => invoke($0, `min`, [value("f32", -0.5), value("f32", 6.2831855)]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1761 +assert_return( + () => invoke($0, `min`, [value("f32", 0.5), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1762 +assert_return( + () => invoke($0, `min`, [value("f32", 0.5), value("f32", 6.2831855)]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:1763 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1764 +assert_return( + () => invoke($0, `min`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1765 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1766 +assert_return( + () => invoke($0, `min`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:1767 +assert_return( + () => invoke($0, `min`, [value("f32", -0.5), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1768 +assert_return( + () => invoke($0, `min`, [value("f32", -0.5), value("f32", Infinity)]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1769 +assert_return( + () => invoke($0, `min`, [value("f32", 0.5), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1770 +assert_return(() => invoke($0, `min`, [value("f32", 0.5), value("f32", Infinity)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:1771 +assert_return( + () => invoke($0, `min`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1772 +assert_return( + () => invoke($0, `min`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1773 +assert_return( + () => invoke($0, `min`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1774 +assert_return( + () => invoke($0, `min`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1775 +assert_return( + () => invoke($0, `min`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1776 +assert_return( + () => invoke($0, `min`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1777 +assert_return( + () => invoke($0, `min`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1778 +assert_return( + () => invoke($0, `min`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1779 +assert_return(() => invoke($0, `min`, [value("f32", -1), value("f32", -0)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1780 +assert_return(() => invoke($0, `min`, [value("f32", -1), value("f32", 0)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1781 +assert_return(() => invoke($0, `min`, [value("f32", 1), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1782 +assert_return(() => invoke($0, `min`, [value("f32", 1), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1783 +assert_return( + () => invoke($0, `min`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1784 +assert_return( + () => invoke($0, `min`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1785 +assert_return( + () => invoke($0, `min`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1786 +assert_return( + () => invoke($0, `min`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1787 +assert_return( + () => invoke($0, `min`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1788 +assert_return( + () => invoke($0, `min`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1789 +assert_return( + () => invoke($0, `min`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1790 +assert_return( + () => invoke($0, `min`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1791 +assert_return(() => invoke($0, `min`, [value("f32", -1), value("f32", -0.5)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1792 +assert_return(() => invoke($0, `min`, [value("f32", -1), value("f32", 0.5)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1793 +assert_return(() => invoke($0, `min`, [value("f32", 1), value("f32", -0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:1794 +assert_return(() => invoke($0, `min`, [value("f32", 1), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:1795 +assert_return(() => invoke($0, `min`, [value("f32", -1), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1796 +assert_return(() => invoke($0, `min`, [value("f32", -1), value("f32", 1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1797 +assert_return(() => invoke($0, `min`, [value("f32", 1), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1798 +assert_return(() => invoke($0, `min`, [value("f32", 1), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:1799 +assert_return( + () => invoke($0, `min`, [value("f32", -1), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1800 +assert_return(() => invoke($0, `min`, [value("f32", -1), value("f32", 6.2831855)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1801 +assert_return( + () => invoke($0, `min`, [value("f32", 1), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1802 +assert_return(() => invoke($0, `min`, [value("f32", 1), value("f32", 6.2831855)]), [value("f32", 1)]); + +// ./test/core/f32.wast:1803 +assert_return( + () => invoke($0, `min`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1804 +assert_return( + () => invoke($0, `min`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1805 +assert_return( + () => invoke($0, `min`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1806 +assert_return( + () => invoke($0, `min`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:1807 +assert_return( + () => invoke($0, `min`, [value("f32", -1), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1808 +assert_return(() => invoke($0, `min`, [value("f32", -1), value("f32", Infinity)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1809 +assert_return( + () => invoke($0, `min`, [value("f32", 1), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1810 +assert_return(() => invoke($0, `min`, [value("f32", 1), value("f32", Infinity)]), [value("f32", 1)]); + +// ./test/core/f32.wast:1811 +assert_return( + () => invoke($0, `min`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1812 +assert_return( + () => invoke($0, `min`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1813 +assert_return( + () => invoke($0, `min`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1814 +assert_return( + () => invoke($0, `min`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1815 +assert_return( + () => invoke($0, `min`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1816 +assert_return( + () => invoke($0, `min`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1817 +assert_return( + () => invoke($0, `min`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1818 +assert_return( + () => invoke($0, `min`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1819 +assert_return( + () => invoke($0, `min`, [value("f32", -6.2831855), value("f32", -0)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1820 +assert_return( + () => invoke($0, `min`, [value("f32", -6.2831855), value("f32", 0)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1821 +assert_return(() => invoke($0, `min`, [value("f32", 6.2831855), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1822 +assert_return(() => invoke($0, `min`, [value("f32", 6.2831855), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1823 +assert_return( + () => invoke($0, `min`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1824 +assert_return( + () => invoke($0, `min`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1825 +assert_return( + () => invoke($0, `min`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1826 +assert_return( + () => invoke($0, `min`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1827 +assert_return( + () => invoke($0, `min`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1828 +assert_return( + () => invoke($0, `min`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1829 +assert_return( + () => invoke($0, `min`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1830 +assert_return( + () => invoke($0, `min`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1831 +assert_return( + () => invoke($0, `min`, [value("f32", -6.2831855), value("f32", -0.5)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1832 +assert_return( + () => invoke($0, `min`, [value("f32", -6.2831855), value("f32", 0.5)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1833 +assert_return( + () => invoke($0, `min`, [value("f32", 6.2831855), value("f32", -0.5)]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1834 +assert_return( + () => invoke($0, `min`, [value("f32", 6.2831855), value("f32", 0.5)]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:1835 +assert_return( + () => invoke($0, `min`, [value("f32", -6.2831855), value("f32", -1)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1836 +assert_return( + () => invoke($0, `min`, [value("f32", -6.2831855), value("f32", 1)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1837 +assert_return(() => invoke($0, `min`, [value("f32", 6.2831855), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1838 +assert_return(() => invoke($0, `min`, [value("f32", 6.2831855), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:1839 +assert_return( + () => invoke($0, `min`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1840 +assert_return( + () => invoke($0, `min`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1841 +assert_return( + () => invoke($0, `min`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1842 +assert_return( + () => invoke($0, `min`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:1843 +assert_return( + () => invoke($0, `min`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1844 +assert_return( + () => invoke($0, `min`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1845 +assert_return( + () => invoke($0, `min`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1846 +assert_return( + () => invoke($0, `min`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:1847 +assert_return( + () => invoke($0, `min`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1848 +assert_return( + () => invoke($0, `min`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1849 +assert_return( + () => invoke($0, `min`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1850 +assert_return( + () => invoke($0, `min`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:1851 +assert_return( + () => invoke($0, `min`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1852 +assert_return( + () => invoke($0, `min`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1853 +assert_return( + () => invoke($0, `min`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1854 +assert_return( + () => invoke($0, `min`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1855 +assert_return( + () => invoke($0, `min`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1856 +assert_return( + () => invoke($0, `min`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1857 +assert_return( + () => invoke($0, `min`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1858 +assert_return( + () => invoke($0, `min`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1859 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1860 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1861 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:1862 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:1863 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1864 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1865 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1866 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1867 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1868 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1869 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1870 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1871 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1872 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1873 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1874 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:1875 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1876 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1877 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:1878 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:1879 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1880 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1881 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1882 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:1883 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1884 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1885 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1886 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1887 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1888 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1889 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1890 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1891 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1892 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1893 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1894 +assert_return( + () => invoke($0, `min`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1895 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1896 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1897 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1898 +assert_return( + () => invoke($0, `min`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1899 +assert_return( + () => invoke($0, `min`, [value("f32", -Infinity), value("f32", -0)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1900 +assert_return( + () => invoke($0, `min`, [value("f32", -Infinity), value("f32", 0)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1901 +assert_return(() => invoke($0, `min`, [value("f32", Infinity), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:1902 +assert_return(() => invoke($0, `min`, [value("f32", Infinity), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:1903 +assert_return( + () => invoke($0, `min`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1904 +assert_return( + () => invoke($0, `min`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1905 +assert_return( + () => invoke($0, `min`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1906 +assert_return( + () => invoke($0, `min`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:1907 +assert_return( + () => invoke($0, `min`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1908 +assert_return( + () => invoke($0, `min`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1909 +assert_return( + () => invoke($0, `min`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1910 +assert_return( + () => invoke($0, `min`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:1911 +assert_return( + () => invoke($0, `min`, [value("f32", -Infinity), value("f32", -0.5)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1912 +assert_return( + () => invoke($0, `min`, [value("f32", -Infinity), value("f32", 0.5)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1913 +assert_return( + () => invoke($0, `min`, [value("f32", Infinity), value("f32", -0.5)]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:1914 +assert_return(() => invoke($0, `min`, [value("f32", Infinity), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:1915 +assert_return( + () => invoke($0, `min`, [value("f32", -Infinity), value("f32", -1)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1916 +assert_return( + () => invoke($0, `min`, [value("f32", -Infinity), value("f32", 1)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1917 +assert_return(() => invoke($0, `min`, [value("f32", Infinity), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:1918 +assert_return(() => invoke($0, `min`, [value("f32", Infinity), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:1919 +assert_return( + () => invoke($0, `min`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1920 +assert_return( + () => invoke($0, `min`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1921 +assert_return( + () => invoke($0, `min`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:1922 +assert_return( + () => invoke($0, `min`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:1923 +assert_return( + () => invoke($0, `min`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1924 +assert_return( + () => invoke($0, `min`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1925 +assert_return( + () => invoke($0, `min`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1926 +assert_return( + () => invoke($0, `min`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:1927 +assert_return( + () => invoke($0, `min`, [value("f32", -Infinity), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1928 +assert_return( + () => invoke($0, `min`, [value("f32", -Infinity), value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1929 +assert_return( + () => invoke($0, `min`, [value("f32", Infinity), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:1930 +assert_return( + () => invoke($0, `min`, [value("f32", Infinity), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:1931 +assert_return( + () => invoke($0, `min`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1932 +assert_return( + () => invoke($0, `min`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1933 +assert_return( + () => invoke($0, `min`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1934 +assert_return( + () => invoke($0, `min`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1935 +assert_return( + () => invoke($0, `min`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1936 +assert_return( + () => invoke($0, `min`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1937 +assert_return( + () => invoke($0, `min`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1938 +assert_return( + () => invoke($0, `min`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1939 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1940 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1941 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1942 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1943 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1944 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1945 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1946 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1947 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1948 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1949 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1950 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1951 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1952 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1953 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1954 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1955 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1956 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1957 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1958 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1959 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1960 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1961 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1962 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1963 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1964 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1965 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1966 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1967 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1968 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1969 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1970 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1971 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1972 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1973 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1974 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1975 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1976 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1977 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1978 +assert_return( + () => invoke($0, `min`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1979 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1980 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1981 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1982 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1983 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1984 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1985 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1986 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1987 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1988 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1989 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1990 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1991 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1992 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1993 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1994 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1995 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1996 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1997 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:1998 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:1999 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2000 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2001 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2002 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2003 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2004 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2005 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2006 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2007 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2008 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2009 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2010 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2011 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2012 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2013 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2014 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2015 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2016 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2017 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2018 +assert_return( + () => invoke($0, `min`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2019 +assert_return(() => invoke($0, `max`, [value("f32", -0), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2020 +assert_return(() => invoke($0, `max`, [value("f32", -0), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2021 +assert_return(() => invoke($0, `max`, [value("f32", 0), value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2022 +assert_return(() => invoke($0, `max`, [value("f32", 0), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2023 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:2024 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2025 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:2026 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2027 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:2028 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2029 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:2030 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2031 +assert_return(() => invoke($0, `max`, [value("f32", -0), value("f32", -0.5)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2032 +assert_return(() => invoke($0, `max`, [value("f32", -0), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:2033 +assert_return(() => invoke($0, `max`, [value("f32", 0), value("f32", -0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2034 +assert_return(() => invoke($0, `max`, [value("f32", 0), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:2035 +assert_return(() => invoke($0, `max`, [value("f32", -0), value("f32", -1)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2036 +assert_return(() => invoke($0, `max`, [value("f32", -0), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2037 +assert_return(() => invoke($0, `max`, [value("f32", 0), value("f32", -1)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2038 +assert_return(() => invoke($0, `max`, [value("f32", 0), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2039 +assert_return(() => invoke($0, `max`, [value("f32", -0), value("f32", -6.2831855)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2040 +assert_return( + () => invoke($0, `max`, [value("f32", -0), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2041 +assert_return(() => invoke($0, `max`, [value("f32", 0), value("f32", -6.2831855)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2042 +assert_return( + () => invoke($0, `max`, [value("f32", 0), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2043 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:2044 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2045 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:2046 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2047 +assert_return(() => invoke($0, `max`, [value("f32", -0), value("f32", -Infinity)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2048 +assert_return( + () => invoke($0, `max`, [value("f32", -0), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2049 +assert_return(() => invoke($0, `max`, [value("f32", 0), value("f32", -Infinity)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2050 +assert_return( + () => invoke($0, `max`, [value("f32", 0), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2051 +assert_return( + () => invoke($0, `max`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2052 +assert_return( + () => invoke($0, `max`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2053 +assert_return( + () => invoke($0, `max`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2054 +assert_return( + () => invoke($0, `max`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2055 +assert_return( + () => invoke($0, `max`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2056 +assert_return( + () => invoke($0, `max`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2057 +assert_return( + () => invoke($0, `max`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2058 +assert_return( + () => invoke($0, `max`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2059 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:2060 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:2061 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2062 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2063 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2064 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2065 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2066 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2067 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2068 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2069 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2070 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2071 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2072 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2073 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2074 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2075 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2076 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:2077 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2078 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:2079 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2080 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2081 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2082 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2083 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2084 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2085 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2086 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2087 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2088 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2089 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2090 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2091 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2092 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2093 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2094 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2095 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2096 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2097 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2098 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2099 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:2100 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:2101 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2102 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2103 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2104 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2105 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2106 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2107 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2108 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2109 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2110 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2111 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2112 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2113 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2114 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2115 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2116 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:2117 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2118 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:2119 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2120 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2121 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2122 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2123 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2124 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2125 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2126 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2127 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2128 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2129 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2130 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2131 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2132 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2133 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2134 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2135 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2136 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2137 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2138 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2139 +assert_return(() => invoke($0, `max`, [value("f32", -0.5), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2140 +assert_return(() => invoke($0, `max`, [value("f32", -0.5), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2141 +assert_return(() => invoke($0, `max`, [value("f32", 0.5), value("f32", -0)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:2142 +assert_return(() => invoke($0, `max`, [value("f32", 0.5), value("f32", 0)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:2143 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2144 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2145 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2146 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2147 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2148 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2149 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2150 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2151 +assert_return(() => invoke($0, `max`, [value("f32", -0.5), value("f32", -0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:2152 +assert_return(() => invoke($0, `max`, [value("f32", -0.5), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:2153 +assert_return(() => invoke($0, `max`, [value("f32", 0.5), value("f32", -0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:2154 +assert_return(() => invoke($0, `max`, [value("f32", 0.5), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:2155 +assert_return(() => invoke($0, `max`, [value("f32", -0.5), value("f32", -1)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:2156 +assert_return(() => invoke($0, `max`, [value("f32", -0.5), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2157 +assert_return(() => invoke($0, `max`, [value("f32", 0.5), value("f32", -1)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:2158 +assert_return(() => invoke($0, `max`, [value("f32", 0.5), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2159 +assert_return( + () => invoke($0, `max`, [value("f32", -0.5), value("f32", -6.2831855)]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:2160 +assert_return( + () => invoke($0, `max`, [value("f32", -0.5), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2161 +assert_return( + () => invoke($0, `max`, [value("f32", 0.5), value("f32", -6.2831855)]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2162 +assert_return( + () => invoke($0, `max`, [value("f32", 0.5), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2163 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:2164 +assert_return( + () => invoke($0, `max`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2165 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2166 +assert_return( + () => invoke($0, `max`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2167 +assert_return( + () => invoke($0, `max`, [value("f32", -0.5), value("f32", -Infinity)]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:2168 +assert_return( + () => invoke($0, `max`, [value("f32", -0.5), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2169 +assert_return( + () => invoke($0, `max`, [value("f32", 0.5), value("f32", -Infinity)]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2170 +assert_return( + () => invoke($0, `max`, [value("f32", 0.5), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2171 +assert_return( + () => invoke($0, `max`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2172 +assert_return( + () => invoke($0, `max`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2173 +assert_return( + () => invoke($0, `max`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2174 +assert_return( + () => invoke($0, `max`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2175 +assert_return( + () => invoke($0, `max`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2176 +assert_return( + () => invoke($0, `max`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2177 +assert_return( + () => invoke($0, `max`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2178 +assert_return( + () => invoke($0, `max`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2179 +assert_return(() => invoke($0, `max`, [value("f32", -1), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2180 +assert_return(() => invoke($0, `max`, [value("f32", -1), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2181 +assert_return(() => invoke($0, `max`, [value("f32", 1), value("f32", -0)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2182 +assert_return(() => invoke($0, `max`, [value("f32", 1), value("f32", 0)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2183 +assert_return( + () => invoke($0, `max`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2184 +assert_return( + () => invoke($0, `max`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2185 +assert_return( + () => invoke($0, `max`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:2186 +assert_return( + () => invoke($0, `max`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:2187 +assert_return( + () => invoke($0, `max`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2188 +assert_return( + () => invoke($0, `max`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2189 +assert_return( + () => invoke($0, `max`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:2190 +assert_return( + () => invoke($0, `max`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:2191 +assert_return(() => invoke($0, `max`, [value("f32", -1), value("f32", -0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32.wast:2192 +assert_return(() => invoke($0, `max`, [value("f32", -1), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32.wast:2193 +assert_return(() => invoke($0, `max`, [value("f32", 1), value("f32", -0.5)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2194 +assert_return(() => invoke($0, `max`, [value("f32", 1), value("f32", 0.5)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2195 +assert_return(() => invoke($0, `max`, [value("f32", -1), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:2196 +assert_return(() => invoke($0, `max`, [value("f32", -1), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2197 +assert_return(() => invoke($0, `max`, [value("f32", 1), value("f32", -1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2198 +assert_return(() => invoke($0, `max`, [value("f32", 1), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2199 +assert_return(() => invoke($0, `max`, [value("f32", -1), value("f32", -6.2831855)]), [value("f32", -1)]); + +// ./test/core/f32.wast:2200 +assert_return( + () => invoke($0, `max`, [value("f32", -1), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2201 +assert_return(() => invoke($0, `max`, [value("f32", 1), value("f32", -6.2831855)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2202 +assert_return( + () => invoke($0, `max`, [value("f32", 1), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2203 +assert_return( + () => invoke($0, `max`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:2204 +assert_return( + () => invoke($0, `max`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2205 +assert_return( + () => invoke($0, `max`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:2206 +assert_return( + () => invoke($0, `max`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2207 +assert_return(() => invoke($0, `max`, [value("f32", -1), value("f32", -Infinity)]), [value("f32", -1)]); + +// ./test/core/f32.wast:2208 +assert_return( + () => invoke($0, `max`, [value("f32", -1), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2209 +assert_return(() => invoke($0, `max`, [value("f32", 1), value("f32", -Infinity)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2210 +assert_return( + () => invoke($0, `max`, [value("f32", 1), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2211 +assert_return( + () => invoke($0, `max`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2212 +assert_return( + () => invoke($0, `max`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2213 +assert_return( + () => invoke($0, `max`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2214 +assert_return( + () => invoke($0, `max`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2215 +assert_return( + () => invoke($0, `max`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2216 +assert_return( + () => invoke($0, `max`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2217 +assert_return( + () => invoke($0, `max`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2218 +assert_return( + () => invoke($0, `max`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2219 +assert_return(() => invoke($0, `max`, [value("f32", -6.2831855), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2220 +assert_return(() => invoke($0, `max`, [value("f32", -6.2831855), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2221 +assert_return( + () => invoke($0, `max`, [value("f32", 6.2831855), value("f32", -0)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2222 +assert_return( + () => invoke($0, `max`, [value("f32", 6.2831855), value("f32", 0)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2223 +assert_return( + () => invoke($0, `max`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2224 +assert_return( + () => invoke($0, `max`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2225 +assert_return( + () => invoke($0, `max`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2226 +assert_return( + () => invoke($0, `max`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2227 +assert_return( + () => invoke($0, `max`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2228 +assert_return( + () => invoke($0, `max`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2229 +assert_return( + () => invoke($0, `max`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2230 +assert_return( + () => invoke($0, `max`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2231 +assert_return( + () => invoke($0, `max`, [value("f32", -6.2831855), value("f32", -0.5)]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:2232 +assert_return( + () => invoke($0, `max`, [value("f32", -6.2831855), value("f32", 0.5)]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2233 +assert_return( + () => invoke($0, `max`, [value("f32", 6.2831855), value("f32", -0.5)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2234 +assert_return( + () => invoke($0, `max`, [value("f32", 6.2831855), value("f32", 0.5)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2235 +assert_return(() => invoke($0, `max`, [value("f32", -6.2831855), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:2236 +assert_return(() => invoke($0, `max`, [value("f32", -6.2831855), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2237 +assert_return( + () => invoke($0, `max`, [value("f32", 6.2831855), value("f32", -1)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2238 +assert_return( + () => invoke($0, `max`, [value("f32", 6.2831855), value("f32", 1)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2239 +assert_return( + () => invoke($0, `max`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:2240 +assert_return( + () => invoke($0, `max`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2241 +assert_return( + () => invoke($0, `max`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2242 +assert_return( + () => invoke($0, `max`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2243 +assert_return( + () => invoke($0, `max`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:2244 +assert_return( + () => invoke($0, `max`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2245 +assert_return( + () => invoke($0, `max`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2246 +assert_return( + () => invoke($0, `max`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2247 +assert_return( + () => invoke($0, `max`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:2248 +assert_return( + () => invoke($0, `max`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2249 +assert_return( + () => invoke($0, `max`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2250 +assert_return( + () => invoke($0, `max`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2251 +assert_return( + () => invoke($0, `max`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2252 +assert_return( + () => invoke($0, `max`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2253 +assert_return( + () => invoke($0, `max`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2254 +assert_return( + () => invoke($0, `max`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2255 +assert_return( + () => invoke($0, `max`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2256 +assert_return( + () => invoke($0, `max`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2257 +assert_return( + () => invoke($0, `max`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2258 +assert_return( + () => invoke($0, `max`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2259 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:2260 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:2261 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2262 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2263 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2264 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2265 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2266 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2267 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2268 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2269 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2270 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2271 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:2272 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2273 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2274 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2275 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:2276 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:2277 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2278 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2279 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:2280 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2281 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2282 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2283 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2284 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2285 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2286 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2287 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2288 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2289 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2290 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2291 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2292 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2293 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2294 +assert_return( + () => invoke($0, `max`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2295 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2296 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2297 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2298 +assert_return( + () => invoke($0, `max`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2299 +assert_return(() => invoke($0, `max`, [value("f32", -Infinity), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2300 +assert_return(() => invoke($0, `max`, [value("f32", -Infinity), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2301 +assert_return( + () => invoke($0, `max`, [value("f32", Infinity), value("f32", -0)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2302 +assert_return( + () => invoke($0, `max`, [value("f32", Infinity), value("f32", 0)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2303 +assert_return( + () => invoke($0, `max`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2304 +assert_return( + () => invoke($0, `max`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32.wast:2305 +assert_return( + () => invoke($0, `max`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2306 +assert_return( + () => invoke($0, `max`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2307 +assert_return( + () => invoke($0, `max`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2308 +assert_return( + () => invoke($0, `max`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32.wast:2309 +assert_return( + () => invoke($0, `max`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2310 +assert_return( + () => invoke($0, `max`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2311 +assert_return( + () => invoke($0, `max`, [value("f32", -Infinity), value("f32", -0.5)]), + [value("f32", -0.5)], +); + +// ./test/core/f32.wast:2312 +assert_return( + () => invoke($0, `max`, [value("f32", -Infinity), value("f32", 0.5)]), + [value("f32", 0.5)], +); + +// ./test/core/f32.wast:2313 +assert_return( + () => invoke($0, `max`, [value("f32", Infinity), value("f32", -0.5)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2314 +assert_return( + () => invoke($0, `max`, [value("f32", Infinity), value("f32", 0.5)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2315 +assert_return(() => invoke($0, `max`, [value("f32", -Infinity), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:2316 +assert_return(() => invoke($0, `max`, [value("f32", -Infinity), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2317 +assert_return( + () => invoke($0, `max`, [value("f32", Infinity), value("f32", -1)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2318 +assert_return( + () => invoke($0, `max`, [value("f32", Infinity), value("f32", 1)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2319 +assert_return( + () => invoke($0, `max`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32.wast:2320 +assert_return( + () => invoke($0, `max`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32.wast:2321 +assert_return( + () => invoke($0, `max`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2322 +assert_return( + () => invoke($0, `max`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2323 +assert_return( + () => invoke($0, `max`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2324 +assert_return( + () => invoke($0, `max`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2325 +assert_return( + () => invoke($0, `max`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2326 +assert_return( + () => invoke($0, `max`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2327 +assert_return( + () => invoke($0, `max`, [value("f32", -Infinity), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32.wast:2328 +assert_return( + () => invoke($0, `max`, [value("f32", -Infinity), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2329 +assert_return( + () => invoke($0, `max`, [value("f32", Infinity), value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2330 +assert_return( + () => invoke($0, `max`, [value("f32", Infinity), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32.wast:2331 +assert_return( + () => invoke($0, `max`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2332 +assert_return( + () => invoke($0, `max`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2333 +assert_return( + () => invoke($0, `max`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2334 +assert_return( + () => invoke($0, `max`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2335 +assert_return( + () => invoke($0, `max`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2336 +assert_return( + () => invoke($0, `max`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2337 +assert_return( + () => invoke($0, `max`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2338 +assert_return( + () => invoke($0, `max`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2339 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2340 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2341 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2342 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2343 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2344 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2345 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2346 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2347 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2348 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2349 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2350 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2351 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2352 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2353 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2354 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2355 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2356 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2357 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2358 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2359 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2360 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2361 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2362 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2363 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2364 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2365 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2366 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2367 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2368 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2369 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0.5)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2370 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0.5)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2371 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2372 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2373 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2374 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2375 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2376 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2377 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2378 +assert_return( + () => invoke($0, `max`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 1)]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2379 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2380 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2381 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2382 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2383 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2384 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2385 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2386 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 6.2831855), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2387 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2388 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2389 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2390 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2391 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2392 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2393 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2394 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2395 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2396 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2397 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2398 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2399 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2400 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2401 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2402 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2403 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2404 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2405 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2406 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2407 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2408 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2409 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2410 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2411 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2412 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2413 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2414 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2415 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2416 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2417 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2418 +assert_return( + () => invoke($0, `max`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f32.wast:2419 +assert_return(() => invoke($0, `sqrt`, [value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2420 +assert_return(() => invoke($0, `sqrt`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2421 +assert_return( + () => invoke($0, `sqrt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2422 +assert_return( + () => invoke($0, `sqrt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.00000000000000000000003743392)], +); + +// ./test/core/f32.wast:2423 +assert_return( + () => invoke($0, `sqrt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2424 +assert_return( + () => invoke($0, `sqrt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.00000000000000000010842022)], +); + +// ./test/core/f32.wast:2425 +assert_return(() => invoke($0, `sqrt`, [value("f32", -0.5)]), [`canonical_nan`]); + +// ./test/core/f32.wast:2426 +assert_return(() => invoke($0, `sqrt`, [value("f32", 0.5)]), [value("f32", 0.70710677)]); + +// ./test/core/f32.wast:2427 +assert_return(() => invoke($0, `sqrt`, [value("f32", -1)]), [`canonical_nan`]); + +// ./test/core/f32.wast:2428 +assert_return(() => invoke($0, `sqrt`, [value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2429 +assert_return(() => invoke($0, `sqrt`, [value("f32", -6.2831855)]), [`canonical_nan`]); + +// ./test/core/f32.wast:2430 +assert_return(() => invoke($0, `sqrt`, [value("f32", 6.2831855)]), [value("f32", 2.5066283)]); + +// ./test/core/f32.wast:2431 +assert_return( + () => invoke($0, `sqrt`, [value("f32", -340282350000000000000000000000000000000)]), + [`canonical_nan`], +); + +// ./test/core/f32.wast:2432 +assert_return( + () => invoke($0, `sqrt`, [value("f32", 340282350000000000000000000000000000000)]), + [value("f32", 18446743000000000000)], +); + +// ./test/core/f32.wast:2433 +assert_return(() => invoke($0, `sqrt`, [value("f32", -Infinity)]), [`canonical_nan`]); + +// ./test/core/f32.wast:2434 +assert_return(() => invoke($0, `sqrt`, [value("f32", Infinity)]), [value("f32", Infinity)]); + +// ./test/core/f32.wast:2435 +assert_return(() => invoke($0, `sqrt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), [`canonical_nan`]); + +// ./test/core/f32.wast:2436 +assert_return(() => invoke($0, `sqrt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), [`arithmetic_nan`]); + +// ./test/core/f32.wast:2437 +assert_return(() => invoke($0, `sqrt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), [`canonical_nan`]); + +// ./test/core/f32.wast:2438 +assert_return(() => invoke($0, `sqrt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), [`arithmetic_nan`]); + +// ./test/core/f32.wast:2439 +assert_return(() => invoke($0, `floor`, [value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2440 +assert_return(() => invoke($0, `floor`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2441 +assert_return( + () => invoke($0, `floor`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:2442 +assert_return( + () => invoke($0, `floor`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:2443 +assert_return( + () => invoke($0, `floor`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -1)], +); + +// ./test/core/f32.wast:2444 +assert_return( + () => invoke($0, `floor`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:2445 +assert_return(() => invoke($0, `floor`, [value("f32", -0.5)]), [value("f32", -1)]); + +// ./test/core/f32.wast:2446 +assert_return(() => invoke($0, `floor`, [value("f32", 0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2447 +assert_return(() => invoke($0, `floor`, [value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:2448 +assert_return(() => invoke($0, `floor`, [value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2449 +assert_return(() => invoke($0, `floor`, [value("f32", -6.2831855)]), [value("f32", -7)]); + +// ./test/core/f32.wast:2450 +assert_return(() => invoke($0, `floor`, [value("f32", 6.2831855)]), [value("f32", 6)]); + +// ./test/core/f32.wast:2451 +assert_return( + () => invoke($0, `floor`, [value("f32", -340282350000000000000000000000000000000)]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2452 +assert_return( + () => invoke($0, `floor`, [value("f32", 340282350000000000000000000000000000000)]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2453 +assert_return(() => invoke($0, `floor`, [value("f32", -Infinity)]), [value("f32", -Infinity)]); + +// ./test/core/f32.wast:2454 +assert_return(() => invoke($0, `floor`, [value("f32", Infinity)]), [value("f32", Infinity)]); + +// ./test/core/f32.wast:2455 +assert_return(() => invoke($0, `floor`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), [`canonical_nan`]); + +// ./test/core/f32.wast:2456 +assert_return(() => invoke($0, `floor`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), [`arithmetic_nan`]); + +// ./test/core/f32.wast:2457 +assert_return(() => invoke($0, `floor`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), [`canonical_nan`]); + +// ./test/core/f32.wast:2458 +assert_return(() => invoke($0, `floor`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), [`arithmetic_nan`]); + +// ./test/core/f32.wast:2459 +assert_return(() => invoke($0, `ceil`, [value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2460 +assert_return(() => invoke($0, `ceil`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2461 +assert_return( + () => invoke($0, `ceil`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:2462 +assert_return( + () => invoke($0, `ceil`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:2463 +assert_return( + () => invoke($0, `ceil`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:2464 +assert_return( + () => invoke($0, `ceil`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 1)], +); + +// ./test/core/f32.wast:2465 +assert_return(() => invoke($0, `ceil`, [value("f32", -0.5)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2466 +assert_return(() => invoke($0, `ceil`, [value("f32", 0.5)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2467 +assert_return(() => invoke($0, `ceil`, [value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:2468 +assert_return(() => invoke($0, `ceil`, [value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2469 +assert_return(() => invoke($0, `ceil`, [value("f32", -6.2831855)]), [value("f32", -6)]); + +// ./test/core/f32.wast:2470 +assert_return(() => invoke($0, `ceil`, [value("f32", 6.2831855)]), [value("f32", 7)]); + +// ./test/core/f32.wast:2471 +assert_return( + () => invoke($0, `ceil`, [value("f32", -340282350000000000000000000000000000000)]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2472 +assert_return( + () => invoke($0, `ceil`, [value("f32", 340282350000000000000000000000000000000)]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2473 +assert_return(() => invoke($0, `ceil`, [value("f32", -Infinity)]), [value("f32", -Infinity)]); + +// ./test/core/f32.wast:2474 +assert_return(() => invoke($0, `ceil`, [value("f32", Infinity)]), [value("f32", Infinity)]); + +// ./test/core/f32.wast:2475 +assert_return(() => invoke($0, `ceil`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), [`canonical_nan`]); + +// ./test/core/f32.wast:2476 +assert_return(() => invoke($0, `ceil`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), [`arithmetic_nan`]); + +// ./test/core/f32.wast:2477 +assert_return(() => invoke($0, `ceil`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), [`canonical_nan`]); + +// ./test/core/f32.wast:2478 +assert_return(() => invoke($0, `ceil`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), [`arithmetic_nan`]); + +// ./test/core/f32.wast:2479 +assert_return(() => invoke($0, `trunc`, [value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2480 +assert_return(() => invoke($0, `trunc`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2481 +assert_return( + () => invoke($0, `trunc`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:2482 +assert_return( + () => invoke($0, `trunc`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:2483 +assert_return( + () => invoke($0, `trunc`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:2484 +assert_return( + () => invoke($0, `trunc`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:2485 +assert_return(() => invoke($0, `trunc`, [value("f32", -0.5)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2486 +assert_return(() => invoke($0, `trunc`, [value("f32", 0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2487 +assert_return(() => invoke($0, `trunc`, [value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:2488 +assert_return(() => invoke($0, `trunc`, [value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2489 +assert_return(() => invoke($0, `trunc`, [value("f32", -6.2831855)]), [value("f32", -6)]); + +// ./test/core/f32.wast:2490 +assert_return(() => invoke($0, `trunc`, [value("f32", 6.2831855)]), [value("f32", 6)]); + +// ./test/core/f32.wast:2491 +assert_return( + () => invoke($0, `trunc`, [value("f32", -340282350000000000000000000000000000000)]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2492 +assert_return( + () => invoke($0, `trunc`, [value("f32", 340282350000000000000000000000000000000)]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2493 +assert_return(() => invoke($0, `trunc`, [value("f32", -Infinity)]), [value("f32", -Infinity)]); + +// ./test/core/f32.wast:2494 +assert_return(() => invoke($0, `trunc`, [value("f32", Infinity)]), [value("f32", Infinity)]); + +// ./test/core/f32.wast:2495 +assert_return(() => invoke($0, `trunc`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), [`canonical_nan`]); + +// ./test/core/f32.wast:2496 +assert_return(() => invoke($0, `trunc`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), [`arithmetic_nan`]); + +// ./test/core/f32.wast:2497 +assert_return(() => invoke($0, `trunc`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), [`canonical_nan`]); + +// ./test/core/f32.wast:2498 +assert_return(() => invoke($0, `trunc`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), [`arithmetic_nan`]); + +// ./test/core/f32.wast:2499 +assert_return(() => invoke($0, `nearest`, [value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2500 +assert_return(() => invoke($0, `nearest`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2501 +assert_return( + () => invoke($0, `nearest`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:2502 +assert_return( + () => invoke($0, `nearest`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:2503 +assert_return( + () => invoke($0, `nearest`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32.wast:2504 +assert_return( + () => invoke($0, `nearest`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32.wast:2505 +assert_return(() => invoke($0, `nearest`, [value("f32", -0.5)]), [value("f32", -0)]); + +// ./test/core/f32.wast:2506 +assert_return(() => invoke($0, `nearest`, [value("f32", 0.5)]), [value("f32", 0)]); + +// ./test/core/f32.wast:2507 +assert_return(() => invoke($0, `nearest`, [value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32.wast:2508 +assert_return(() => invoke($0, `nearest`, [value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32.wast:2509 +assert_return(() => invoke($0, `nearest`, [value("f32", -6.2831855)]), [value("f32", -6)]); + +// ./test/core/f32.wast:2510 +assert_return(() => invoke($0, `nearest`, [value("f32", 6.2831855)]), [value("f32", 6)]); + +// ./test/core/f32.wast:2511 +assert_return( + () => invoke($0, `nearest`, [value("f32", -340282350000000000000000000000000000000)]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2512 +assert_return( + () => invoke($0, `nearest`, [value("f32", 340282350000000000000000000000000000000)]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32.wast:2513 +assert_return(() => invoke($0, `nearest`, [value("f32", -Infinity)]), [value("f32", -Infinity)]); + +// ./test/core/f32.wast:2514 +assert_return(() => invoke($0, `nearest`, [value("f32", Infinity)]), [value("f32", Infinity)]); + +// ./test/core/f32.wast:2515 +assert_return(() => invoke($0, `nearest`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), [`canonical_nan`]); + +// ./test/core/f32.wast:2516 +assert_return(() => invoke($0, `nearest`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), [`arithmetic_nan`]); + +// ./test/core/f32.wast:2517 +assert_return(() => invoke($0, `nearest`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), [`canonical_nan`]); + +// ./test/core/f32.wast:2518 +assert_return(() => invoke($0, `nearest`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), [`arithmetic_nan`]); + +// ./test/core/f32.wast:2523 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.add (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32.wast:2524 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.div (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32.wast:2525 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.max (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32.wast:2526 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.min (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32.wast:2527 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.mul (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32.wast:2528 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.sub (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32.wast:2529 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.ceil (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32.wast:2530 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.floor (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32.wast:2531 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.nearest (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32.wast:2532 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.sqrt (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32.wast:2533 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.trunc (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32.wast:2536 +assert_malformed( + () => instantiate(`(func (result f32) (f32.const nan:arithmetic)) `), + `unexpected token`, +); + +// ./test/core/f32.wast:2540 +assert_malformed( + () => instantiate(`(func (result f32) (f32.const nan:canonical)) `), + `unexpected token`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/f32_bitwise.wast.js b/js/src/jit-test/tests/wasm/spec/spec/f32_bitwise.wast.js new file mode 100644 index 0000000000..7a27263671 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/f32_bitwise.wast.js @@ -0,0 +1,2688 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/f32_bitwise.wast + +// ./test/core/f32_bitwise.wast:4 +let $0 = instantiate(`(module + (func (export "abs") (param $$x f32) (result f32) (f32.abs (local.get $$x))) + (func (export "neg") (param $$x f32) (result f32) (f32.neg (local.get $$x))) + (func (export "copysign") (param $$x f32) (param $$y f32) (result f32) (f32.copysign (local.get $$x) (local.get $$y))) +)`); + +// ./test/core/f32_bitwise.wast:10 +assert_return(() => invoke($0, `copysign`, [value("f32", -0), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32_bitwise.wast:11 +assert_return(() => invoke($0, `copysign`, [value("f32", -0), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32_bitwise.wast:12 +assert_return(() => invoke($0, `copysign`, [value("f32", 0), value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/f32_bitwise.wast:13 +assert_return(() => invoke($0, `copysign`, [value("f32", 0), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32_bitwise.wast:14 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32_bitwise.wast:15 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32_bitwise.wast:16 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0)], +); + +// ./test/core/f32_bitwise.wast:17 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0)], +); + +// ./test/core/f32_bitwise.wast:18 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32_bitwise.wast:19 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32_bitwise.wast:20 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0)], +); + +// ./test/core/f32_bitwise.wast:21 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0)], +); + +// ./test/core/f32_bitwise.wast:22 +assert_return(() => invoke($0, `copysign`, [value("f32", -0), value("f32", -0.5)]), [value("f32", -0)]); + +// ./test/core/f32_bitwise.wast:23 +assert_return(() => invoke($0, `copysign`, [value("f32", -0), value("f32", 0.5)]), [value("f32", 0)]); + +// ./test/core/f32_bitwise.wast:24 +assert_return(() => invoke($0, `copysign`, [value("f32", 0), value("f32", -0.5)]), [value("f32", -0)]); + +// ./test/core/f32_bitwise.wast:25 +assert_return(() => invoke($0, `copysign`, [value("f32", 0), value("f32", 0.5)]), [value("f32", 0)]); + +// ./test/core/f32_bitwise.wast:26 +assert_return(() => invoke($0, `copysign`, [value("f32", -0), value("f32", -1)]), [value("f32", -0)]); + +// ./test/core/f32_bitwise.wast:27 +assert_return(() => invoke($0, `copysign`, [value("f32", -0), value("f32", 1)]), [value("f32", 0)]); + +// ./test/core/f32_bitwise.wast:28 +assert_return(() => invoke($0, `copysign`, [value("f32", 0), value("f32", -1)]), [value("f32", -0)]); + +// ./test/core/f32_bitwise.wast:29 +assert_return(() => invoke($0, `copysign`, [value("f32", 0), value("f32", 1)]), [value("f32", 0)]); + +// ./test/core/f32_bitwise.wast:30 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0), value("f32", -6.2831855)]), + [value("f32", -0)], +); + +// ./test/core/f32_bitwise.wast:31 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0), value("f32", 6.2831855)]), + [value("f32", 0)], +); + +// ./test/core/f32_bitwise.wast:32 +assert_return( + () => invoke($0, `copysign`, [value("f32", 0), value("f32", -6.2831855)]), + [value("f32", -0)], +); + +// ./test/core/f32_bitwise.wast:33 +assert_return( + () => invoke($0, `copysign`, [value("f32", 0), value("f32", 6.2831855)]), + [value("f32", 0)], +); + +// ./test/core/f32_bitwise.wast:34 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/f32_bitwise.wast:35 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32_bitwise.wast:36 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/f32_bitwise.wast:37 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/f32_bitwise.wast:38 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0), value("f32", -Infinity)]), + [value("f32", -0)], +); + +// ./test/core/f32_bitwise.wast:39 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0), value("f32", Infinity)]), + [value("f32", 0)], +); + +// ./test/core/f32_bitwise.wast:40 +assert_return( + () => invoke($0, `copysign`, [value("f32", 0), value("f32", -Infinity)]), + [value("f32", -0)], +); + +// ./test/core/f32_bitwise.wast:41 +assert_return( + () => invoke($0, `copysign`, [value("f32", 0), value("f32", Infinity)]), + [value("f32", 0)], +); + +// ./test/core/f32_bitwise.wast:42 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("f32", -0)], +); + +// ./test/core/f32_bitwise.wast:43 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("f32", 0)], +); + +// ./test/core/f32_bitwise.wast:44 +assert_return( + () => invoke($0, `copysign`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("f32", -0)], +); + +// ./test/core/f32_bitwise.wast:45 +assert_return( + () => invoke($0, `copysign`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("f32", 0)], +); + +// ./test/core/f32_bitwise.wast:46 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:47 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:48 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:49 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:50 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:51 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:52 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:53 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:54 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:55 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:56 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:57 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:58 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:59 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:60 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:61 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:62 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:63 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:64 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:65 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:66 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:67 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:68 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:69 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:70 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:71 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:72 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:73 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:74 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:75 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:76 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:77 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:78 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:79 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:80 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:81 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:82 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:83 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:84 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:85 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:86 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:87 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:88 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:89 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:90 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:91 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:92 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:93 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:94 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:95 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:96 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:97 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:98 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:99 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:100 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:101 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:102 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:103 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:104 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:105 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:106 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:107 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:108 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:109 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:110 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:111 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:112 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:113 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:114 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:115 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:116 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:117 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:118 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0.5), value("f32", -0)]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:119 +assert_return(() => invoke($0, `copysign`, [value("f32", -0.5), value("f32", 0)]), [value("f32", 0.5)]); + +// ./test/core/f32_bitwise.wast:120 +assert_return(() => invoke($0, `copysign`, [value("f32", 0.5), value("f32", -0)]), [value("f32", -0.5)]); + +// ./test/core/f32_bitwise.wast:121 +assert_return(() => invoke($0, `copysign`, [value("f32", 0.5), value("f32", 0)]), [value("f32", 0.5)]); + +// ./test/core/f32_bitwise.wast:122 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:123 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:124 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:125 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:126 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:127 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:128 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:129 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:130 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0.5), value("f32", -0.5)]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:131 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0.5), value("f32", 0.5)]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:132 +assert_return( + () => invoke($0, `copysign`, [value("f32", 0.5), value("f32", -0.5)]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:133 +assert_return(() => invoke($0, `copysign`, [value("f32", 0.5), value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32_bitwise.wast:134 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0.5), value("f32", -1)]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:135 +assert_return(() => invoke($0, `copysign`, [value("f32", -0.5), value("f32", 1)]), [value("f32", 0.5)]); + +// ./test/core/f32_bitwise.wast:136 +assert_return(() => invoke($0, `copysign`, [value("f32", 0.5), value("f32", -1)]), [value("f32", -0.5)]); + +// ./test/core/f32_bitwise.wast:137 +assert_return(() => invoke($0, `copysign`, [value("f32", 0.5), value("f32", 1)]), [value("f32", 0.5)]); + +// ./test/core/f32_bitwise.wast:138 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0.5), value("f32", -6.2831855)]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:139 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0.5), value("f32", 6.2831855)]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:140 +assert_return( + () => invoke($0, `copysign`, [value("f32", 0.5), value("f32", -6.2831855)]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:141 +assert_return( + () => invoke($0, `copysign`, [value("f32", 0.5), value("f32", 6.2831855)]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:142 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:143 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:144 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:145 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:146 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0.5), value("f32", -Infinity)]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:147 +assert_return( + () => invoke($0, `copysign`, [value("f32", -0.5), value("f32", Infinity)]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:148 +assert_return( + () => invoke($0, `copysign`, [value("f32", 0.5), value("f32", -Infinity)]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:149 +assert_return( + () => invoke($0, `copysign`, [value("f32", 0.5), value("f32", Infinity)]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:150 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.5), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:151 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -0.5), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:152 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.5), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("f32", -0.5)], +); + +// ./test/core/f32_bitwise.wast:153 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 0.5), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("f32", 0.5)], +); + +// ./test/core/f32_bitwise.wast:154 +assert_return(() => invoke($0, `copysign`, [value("f32", -1), value("f32", -0)]), [value("f32", -1)]); + +// ./test/core/f32_bitwise.wast:155 +assert_return(() => invoke($0, `copysign`, [value("f32", -1), value("f32", 0)]), [value("f32", 1)]); + +// ./test/core/f32_bitwise.wast:156 +assert_return(() => invoke($0, `copysign`, [value("f32", 1), value("f32", -0)]), [value("f32", -1)]); + +// ./test/core/f32_bitwise.wast:157 +assert_return(() => invoke($0, `copysign`, [value("f32", 1), value("f32", 0)]), [value("f32", 1)]); + +// ./test/core/f32_bitwise.wast:158 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -1)], +); + +// ./test/core/f32_bitwise.wast:159 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 1)], +); + +// ./test/core/f32_bitwise.wast:160 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -1)], +); + +// ./test/core/f32_bitwise.wast:161 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 1)], +); + +// ./test/core/f32_bitwise.wast:162 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -1)], +); + +// ./test/core/f32_bitwise.wast:163 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 1)], +); + +// ./test/core/f32_bitwise.wast:164 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -1)], +); + +// ./test/core/f32_bitwise.wast:165 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 1)], +); + +// ./test/core/f32_bitwise.wast:166 +assert_return(() => invoke($0, `copysign`, [value("f32", -1), value("f32", -0.5)]), [value("f32", -1)]); + +// ./test/core/f32_bitwise.wast:167 +assert_return(() => invoke($0, `copysign`, [value("f32", -1), value("f32", 0.5)]), [value("f32", 1)]); + +// ./test/core/f32_bitwise.wast:168 +assert_return(() => invoke($0, `copysign`, [value("f32", 1), value("f32", -0.5)]), [value("f32", -1)]); + +// ./test/core/f32_bitwise.wast:169 +assert_return(() => invoke($0, `copysign`, [value("f32", 1), value("f32", 0.5)]), [value("f32", 1)]); + +// ./test/core/f32_bitwise.wast:170 +assert_return(() => invoke($0, `copysign`, [value("f32", -1), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32_bitwise.wast:171 +assert_return(() => invoke($0, `copysign`, [value("f32", -1), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32_bitwise.wast:172 +assert_return(() => invoke($0, `copysign`, [value("f32", 1), value("f32", -1)]), [value("f32", -1)]); + +// ./test/core/f32_bitwise.wast:173 +assert_return(() => invoke($0, `copysign`, [value("f32", 1), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32_bitwise.wast:174 +assert_return( + () => invoke($0, `copysign`, [value("f32", -1), value("f32", -6.2831855)]), + [value("f32", -1)], +); + +// ./test/core/f32_bitwise.wast:175 +assert_return( + () => invoke($0, `copysign`, [value("f32", -1), value("f32", 6.2831855)]), + [value("f32", 1)], +); + +// ./test/core/f32_bitwise.wast:176 +assert_return( + () => invoke($0, `copysign`, [value("f32", 1), value("f32", -6.2831855)]), + [value("f32", -1)], +); + +// ./test/core/f32_bitwise.wast:177 +assert_return( + () => invoke($0, `copysign`, [value("f32", 1), value("f32", 6.2831855)]), + [value("f32", 1)], +); + +// ./test/core/f32_bitwise.wast:178 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -1)], +); + +// ./test/core/f32_bitwise.wast:179 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 1)], +); + +// ./test/core/f32_bitwise.wast:180 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -1)], +); + +// ./test/core/f32_bitwise.wast:181 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 1)], +); + +// ./test/core/f32_bitwise.wast:182 +assert_return( + () => invoke($0, `copysign`, [value("f32", -1), value("f32", -Infinity)]), + [value("f32", -1)], +); + +// ./test/core/f32_bitwise.wast:183 +assert_return( + () => invoke($0, `copysign`, [value("f32", -1), value("f32", Infinity)]), + [value("f32", 1)], +); + +// ./test/core/f32_bitwise.wast:184 +assert_return( + () => invoke($0, `copysign`, [value("f32", 1), value("f32", -Infinity)]), + [value("f32", -1)], +); + +// ./test/core/f32_bitwise.wast:185 +assert_return( + () => invoke($0, `copysign`, [value("f32", 1), value("f32", Infinity)]), + [value("f32", 1)], +); + +// ./test/core/f32_bitwise.wast:186 +assert_return( + () => invoke($0, `copysign`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("f32", -1)], +); + +// ./test/core/f32_bitwise.wast:187 +assert_return( + () => invoke($0, `copysign`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("f32", 1)], +); + +// ./test/core/f32_bitwise.wast:188 +assert_return( + () => invoke($0, `copysign`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("f32", -1)], +); + +// ./test/core/f32_bitwise.wast:189 +assert_return( + () => invoke($0, `copysign`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("f32", 1)], +); + +// ./test/core/f32_bitwise.wast:190 +assert_return( + () => invoke($0, `copysign`, [value("f32", -6.2831855), value("f32", -0)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:191 +assert_return( + () => invoke($0, `copysign`, [value("f32", -6.2831855), value("f32", 0)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:192 +assert_return( + () => invoke($0, `copysign`, [value("f32", 6.2831855), value("f32", -0)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:193 +assert_return( + () => invoke($0, `copysign`, [value("f32", 6.2831855), value("f32", 0)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:194 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:195 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:196 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:197 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:198 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:199 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:200 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:201 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:202 +assert_return( + () => invoke($0, `copysign`, [value("f32", -6.2831855), value("f32", -0.5)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:203 +assert_return( + () => invoke($0, `copysign`, [value("f32", -6.2831855), value("f32", 0.5)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:204 +assert_return( + () => invoke($0, `copysign`, [value("f32", 6.2831855), value("f32", -0.5)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:205 +assert_return( + () => invoke($0, `copysign`, [value("f32", 6.2831855), value("f32", 0.5)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:206 +assert_return( + () => invoke($0, `copysign`, [value("f32", -6.2831855), value("f32", -1)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:207 +assert_return( + () => invoke($0, `copysign`, [value("f32", -6.2831855), value("f32", 1)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:208 +assert_return( + () => invoke($0, `copysign`, [value("f32", 6.2831855), value("f32", -1)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:209 +assert_return( + () => invoke($0, `copysign`, [value("f32", 6.2831855), value("f32", 1)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:210 +assert_return( + () => invoke($0, `copysign`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:211 +assert_return( + () => invoke($0, `copysign`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:212 +assert_return( + () => invoke($0, `copysign`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:213 +assert_return( + () => invoke($0, `copysign`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:214 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:215 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:216 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:217 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:218 +assert_return( + () => invoke($0, `copysign`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:219 +assert_return( + () => invoke($0, `copysign`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:220 +assert_return( + () => invoke($0, `copysign`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:221 +assert_return( + () => invoke($0, `copysign`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:222 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:223 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:224 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("f32", -6.2831855)], +); + +// ./test/core/f32_bitwise.wast:225 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("f32", 6.2831855)], +); + +// ./test/core/f32_bitwise.wast:226 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:227 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:228 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:229 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:230 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:231 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:232 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:233 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:234 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:235 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:236 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:237 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:238 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:239 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:240 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:241 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:242 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:243 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:244 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:245 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:246 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:247 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:248 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:249 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:250 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:251 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:252 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:253 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:254 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:255 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:256 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:257 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:258 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:259 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:260 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:261 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:262 +assert_return( + () => invoke($0, `copysign`, [value("f32", -Infinity), value("f32", -0)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:263 +assert_return( + () => invoke($0, `copysign`, [value("f32", -Infinity), value("f32", 0)]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:264 +assert_return( + () => invoke($0, `copysign`, [value("f32", Infinity), value("f32", -0)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:265 +assert_return( + () => invoke($0, `copysign`, [value("f32", Infinity), value("f32", 0)]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:266 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:267 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:268 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:269 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:270 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:271 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:272 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:273 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:274 +assert_return( + () => invoke($0, `copysign`, [value("f32", -Infinity), value("f32", -0.5)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:275 +assert_return( + () => invoke($0, `copysign`, [value("f32", -Infinity), value("f32", 0.5)]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:276 +assert_return( + () => invoke($0, `copysign`, [value("f32", Infinity), value("f32", -0.5)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:277 +assert_return( + () => invoke($0, `copysign`, [value("f32", Infinity), value("f32", 0.5)]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:278 +assert_return( + () => invoke($0, `copysign`, [value("f32", -Infinity), value("f32", -1)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:279 +assert_return( + () => invoke($0, `copysign`, [value("f32", -Infinity), value("f32", 1)]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:280 +assert_return( + () => invoke($0, `copysign`, [value("f32", Infinity), value("f32", -1)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:281 +assert_return( + () => invoke($0, `copysign`, [value("f32", Infinity), value("f32", 1)]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:282 +assert_return( + () => invoke($0, `copysign`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:283 +assert_return( + () => invoke($0, `copysign`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:284 +assert_return( + () => invoke($0, `copysign`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:285 +assert_return( + () => invoke($0, `copysign`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:286 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:287 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:288 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:289 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:290 +assert_return( + () => invoke($0, `copysign`, [value("f32", -Infinity), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:291 +assert_return( + () => invoke($0, `copysign`, [value("f32", -Infinity), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:292 +assert_return( + () => invoke($0, `copysign`, [value("f32", Infinity), value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:293 +assert_return( + () => invoke($0, `copysign`, [value("f32", Infinity), value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:294 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:295 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:296 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/f32_bitwise.wast:297 +assert_return( + () => invoke($0, `copysign`, [ + value("f32", Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("f32", Infinity)], +); + +// ./test/core/f32_bitwise.wast:298 +assert_return( + () => invoke($0, `copysign`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:299 +assert_return( + () => invoke($0, `copysign`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:300 +assert_return( + () => invoke($0, `copysign`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:301 +assert_return( + () => invoke($0, `copysign`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:302 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:303 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:304 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:305 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:306 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:307 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:308 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:309 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:310 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.5), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:311 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.5), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:312 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.5), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:313 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.5), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:314 +assert_return( + () => invoke($0, `copysign`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:315 +assert_return( + () => invoke($0, `copysign`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:316 +assert_return( + () => invoke($0, `copysign`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:317 +assert_return( + () => invoke($0, `copysign`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:318 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:319 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:320 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:321 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:322 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:323 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:324 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:325 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:326 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:327 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", Infinity), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:328 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:329 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", Infinity), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:330 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:331 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:332 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:333 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:334 +assert_return(() => invoke($0, `abs`, [value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/f32_bitwise.wast:335 +assert_return(() => invoke($0, `abs`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/f32_bitwise.wast:336 +assert_return( + () => invoke($0, `abs`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:337 +assert_return( + () => invoke($0, `abs`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:338 +assert_return( + () => invoke($0, `abs`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:339 +assert_return( + () => invoke($0, `abs`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:340 +assert_return(() => invoke($0, `abs`, [value("f32", -0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32_bitwise.wast:341 +assert_return(() => invoke($0, `abs`, [value("f32", 0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32_bitwise.wast:342 +assert_return(() => invoke($0, `abs`, [value("f32", -1)]), [value("f32", 1)]); + +// ./test/core/f32_bitwise.wast:343 +assert_return(() => invoke($0, `abs`, [value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/f32_bitwise.wast:344 +assert_return(() => invoke($0, `abs`, [value("f32", -6.2831855)]), [value("f32", 6.2831855)]); + +// ./test/core/f32_bitwise.wast:345 +assert_return(() => invoke($0, `abs`, [value("f32", 6.2831855)]), [value("f32", 6.2831855)]); + +// ./test/core/f32_bitwise.wast:346 +assert_return( + () => invoke($0, `abs`, [value("f32", -340282350000000000000000000000000000000)]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:347 +assert_return( + () => invoke($0, `abs`, [value("f32", 340282350000000000000000000000000000000)]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:348 +assert_return(() => invoke($0, `abs`, [value("f32", -Infinity)]), [value("f32", Infinity)]); + +// ./test/core/f32_bitwise.wast:349 +assert_return(() => invoke($0, `abs`, [value("f32", Infinity)]), [value("f32", Infinity)]); + +// ./test/core/f32_bitwise.wast:350 +assert_return( + () => invoke($0, `abs`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:351 +assert_return( + () => invoke($0, `abs`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:352 +assert_return(() => invoke($0, `neg`, [value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/f32_bitwise.wast:353 +assert_return(() => invoke($0, `neg`, [value("f32", 0)]), [value("f32", -0)]); + +// ./test/core/f32_bitwise.wast:354 +assert_return( + () => invoke($0, `neg`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:355 +assert_return( + () => invoke($0, `neg`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/f32_bitwise.wast:356 +assert_return( + () => invoke($0, `neg`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:357 +assert_return( + () => invoke($0, `neg`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/f32_bitwise.wast:358 +assert_return(() => invoke($0, `neg`, [value("f32", -0.5)]), [value("f32", 0.5)]); + +// ./test/core/f32_bitwise.wast:359 +assert_return(() => invoke($0, `neg`, [value("f32", 0.5)]), [value("f32", -0.5)]); + +// ./test/core/f32_bitwise.wast:360 +assert_return(() => invoke($0, `neg`, [value("f32", -1)]), [value("f32", 1)]); + +// ./test/core/f32_bitwise.wast:361 +assert_return(() => invoke($0, `neg`, [value("f32", 1)]), [value("f32", -1)]); + +// ./test/core/f32_bitwise.wast:362 +assert_return(() => invoke($0, `neg`, [value("f32", -6.2831855)]), [value("f32", 6.2831855)]); + +// ./test/core/f32_bitwise.wast:363 +assert_return(() => invoke($0, `neg`, [value("f32", 6.2831855)]), [value("f32", -6.2831855)]); + +// ./test/core/f32_bitwise.wast:364 +assert_return( + () => invoke($0, `neg`, [value("f32", -340282350000000000000000000000000000000)]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:365 +assert_return( + () => invoke($0, `neg`, [value("f32", 340282350000000000000000000000000000000)]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/f32_bitwise.wast:366 +assert_return(() => invoke($0, `neg`, [value("f32", -Infinity)]), [value("f32", Infinity)]); + +// ./test/core/f32_bitwise.wast:367 +assert_return(() => invoke($0, `neg`, [value("f32", Infinity)]), [value("f32", -Infinity)]); + +// ./test/core/f32_bitwise.wast:368 +assert_return( + () => invoke($0, `neg`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/f32_bitwise.wast:369 +assert_return( + () => invoke($0, `neg`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/f32_bitwise.wast:374 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.copysign (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32_bitwise.wast:375 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.abs (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32_bitwise.wast:376 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.neg (i64.const 0))))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/f32_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/f32_cmp.wast.js new file mode 100644 index 0000000000..290c82783a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/f32_cmp.wast.js @@ -0,0 +1,17342 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/f32_cmp.wast + +// ./test/core/f32_cmp.wast:4 +let $0 = instantiate(`(module + (func (export "eq") (param $$x f32) (param $$y f32) (result i32) (f32.eq (local.get $$x) (local.get $$y))) + (func (export "ne") (param $$x f32) (param $$y f32) (result i32) (f32.ne (local.get $$x) (local.get $$y))) + (func (export "lt") (param $$x f32) (param $$y f32) (result i32) (f32.lt (local.get $$x) (local.get $$y))) + (func (export "le") (param $$x f32) (param $$y f32) (result i32) (f32.le (local.get $$x) (local.get $$y))) + (func (export "gt") (param $$x f32) (param $$y f32) (result i32) (f32.gt (local.get $$x) (local.get $$y))) + (func (export "ge") (param $$x f32) (param $$y f32) (result i32) (f32.ge (local.get $$x) (local.get $$y))) +)`); + +// ./test/core/f32_cmp.wast:13 +assert_return(() => invoke($0, `eq`, [value("f32", -0), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:14 +assert_return(() => invoke($0, `eq`, [value("f32", -0), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:15 +assert_return(() => invoke($0, `eq`, [value("f32", 0), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:16 +assert_return(() => invoke($0, `eq`, [value("f32", 0), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:17 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:18 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:19 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:20 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:21 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:22 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:23 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:24 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:25 +assert_return(() => invoke($0, `eq`, [value("f32", -0), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:26 +assert_return(() => invoke($0, `eq`, [value("f32", -0), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:27 +assert_return(() => invoke($0, `eq`, [value("f32", 0), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:28 +assert_return(() => invoke($0, `eq`, [value("f32", 0), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:29 +assert_return(() => invoke($0, `eq`, [value("f32", -0), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:30 +assert_return(() => invoke($0, `eq`, [value("f32", -0), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:31 +assert_return(() => invoke($0, `eq`, [value("f32", 0), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:32 +assert_return(() => invoke($0, `eq`, [value("f32", 0), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:33 +assert_return(() => invoke($0, `eq`, [value("f32", -0), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:34 +assert_return(() => invoke($0, `eq`, [value("f32", -0), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:35 +assert_return(() => invoke($0, `eq`, [value("f32", 0), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:36 +assert_return(() => invoke($0, `eq`, [value("f32", 0), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:37 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:38 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:39 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:40 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:41 +assert_return(() => invoke($0, `eq`, [value("f32", -0), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:42 +assert_return(() => invoke($0, `eq`, [value("f32", -0), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:43 +assert_return(() => invoke($0, `eq`, [value("f32", 0), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:44 +assert_return(() => invoke($0, `eq`, [value("f32", 0), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:45 +assert_return( + () => invoke($0, `eq`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:46 +assert_return( + () => invoke($0, `eq`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:47 +assert_return( + () => invoke($0, `eq`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:48 +assert_return( + () => invoke($0, `eq`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:49 +assert_return( + () => invoke($0, `eq`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:50 +assert_return( + () => invoke($0, `eq`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:51 +assert_return( + () => invoke($0, `eq`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:52 +assert_return( + () => invoke($0, `eq`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:53 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:54 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:55 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:56 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:57 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:58 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:59 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:60 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:61 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:62 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:63 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:64 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:65 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:66 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:67 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:68 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:69 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:70 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:71 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:72 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:73 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:74 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:75 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:76 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:77 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:78 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:79 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:80 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:81 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:82 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:83 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:84 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:85 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:86 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:87 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:88 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:89 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:90 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:91 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:92 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:93 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:94 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:95 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:96 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:97 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:98 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:99 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:100 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:101 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:102 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:103 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:104 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:105 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:106 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:107 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:108 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:109 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:110 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:111 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:112 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:113 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:114 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:115 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:116 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:117 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:118 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:119 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:120 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:121 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:122 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:123 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:124 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:125 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:126 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:127 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:128 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:129 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:130 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:131 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:132 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:133 +assert_return(() => invoke($0, `eq`, [value("f32", -0.5), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:134 +assert_return(() => invoke($0, `eq`, [value("f32", -0.5), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:135 +assert_return(() => invoke($0, `eq`, [value("f32", 0.5), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:136 +assert_return(() => invoke($0, `eq`, [value("f32", 0.5), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:137 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:138 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:139 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:140 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:141 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:142 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:143 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:144 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:145 +assert_return(() => invoke($0, `eq`, [value("f32", -0.5), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:146 +assert_return(() => invoke($0, `eq`, [value("f32", -0.5), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:147 +assert_return(() => invoke($0, `eq`, [value("f32", 0.5), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:148 +assert_return(() => invoke($0, `eq`, [value("f32", 0.5), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:149 +assert_return(() => invoke($0, `eq`, [value("f32", -0.5), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:150 +assert_return(() => invoke($0, `eq`, [value("f32", -0.5), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:151 +assert_return(() => invoke($0, `eq`, [value("f32", 0.5), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:152 +assert_return(() => invoke($0, `eq`, [value("f32", 0.5), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:153 +assert_return(() => invoke($0, `eq`, [value("f32", -0.5), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:154 +assert_return(() => invoke($0, `eq`, [value("f32", -0.5), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:155 +assert_return(() => invoke($0, `eq`, [value("f32", 0.5), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:156 +assert_return(() => invoke($0, `eq`, [value("f32", 0.5), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:157 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:158 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:159 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:160 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:161 +assert_return(() => invoke($0, `eq`, [value("f32", -0.5), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:162 +assert_return(() => invoke($0, `eq`, [value("f32", -0.5), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:163 +assert_return(() => invoke($0, `eq`, [value("f32", 0.5), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:164 +assert_return(() => invoke($0, `eq`, [value("f32", 0.5), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:165 +assert_return( + () => invoke($0, `eq`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:166 +assert_return( + () => invoke($0, `eq`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:167 +assert_return( + () => invoke($0, `eq`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:168 +assert_return( + () => invoke($0, `eq`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:169 +assert_return( + () => invoke($0, `eq`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:170 +assert_return( + () => invoke($0, `eq`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:171 +assert_return( + () => invoke($0, `eq`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:172 +assert_return( + () => invoke($0, `eq`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:173 +assert_return(() => invoke($0, `eq`, [value("f32", -1), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:174 +assert_return(() => invoke($0, `eq`, [value("f32", -1), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:175 +assert_return(() => invoke($0, `eq`, [value("f32", 1), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:176 +assert_return(() => invoke($0, `eq`, [value("f32", 1), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:177 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:178 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:179 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:180 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:181 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:182 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:183 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:184 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:185 +assert_return(() => invoke($0, `eq`, [value("f32", -1), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:186 +assert_return(() => invoke($0, `eq`, [value("f32", -1), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:187 +assert_return(() => invoke($0, `eq`, [value("f32", 1), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:188 +assert_return(() => invoke($0, `eq`, [value("f32", 1), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:189 +assert_return(() => invoke($0, `eq`, [value("f32", -1), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:190 +assert_return(() => invoke($0, `eq`, [value("f32", -1), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:191 +assert_return(() => invoke($0, `eq`, [value("f32", 1), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:192 +assert_return(() => invoke($0, `eq`, [value("f32", 1), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:193 +assert_return(() => invoke($0, `eq`, [value("f32", -1), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:194 +assert_return(() => invoke($0, `eq`, [value("f32", -1), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:195 +assert_return(() => invoke($0, `eq`, [value("f32", 1), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:196 +assert_return(() => invoke($0, `eq`, [value("f32", 1), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:197 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:198 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:199 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:200 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:201 +assert_return(() => invoke($0, `eq`, [value("f32", -1), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:202 +assert_return(() => invoke($0, `eq`, [value("f32", -1), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:203 +assert_return(() => invoke($0, `eq`, [value("f32", 1), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:204 +assert_return(() => invoke($0, `eq`, [value("f32", 1), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:205 +assert_return( + () => invoke($0, `eq`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:206 +assert_return( + () => invoke($0, `eq`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:207 +assert_return( + () => invoke($0, `eq`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:208 +assert_return( + () => invoke($0, `eq`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:209 +assert_return( + () => invoke($0, `eq`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:210 +assert_return( + () => invoke($0, `eq`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:211 +assert_return( + () => invoke($0, `eq`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:212 +assert_return( + () => invoke($0, `eq`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:213 +assert_return(() => invoke($0, `eq`, [value("f32", -6.2831855), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:214 +assert_return(() => invoke($0, `eq`, [value("f32", -6.2831855), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:215 +assert_return(() => invoke($0, `eq`, [value("f32", 6.2831855), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:216 +assert_return(() => invoke($0, `eq`, [value("f32", 6.2831855), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:217 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:218 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:219 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:220 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:221 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:222 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:223 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:224 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:225 +assert_return(() => invoke($0, `eq`, [value("f32", -6.2831855), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:226 +assert_return(() => invoke($0, `eq`, [value("f32", -6.2831855), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:227 +assert_return(() => invoke($0, `eq`, [value("f32", 6.2831855), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:228 +assert_return(() => invoke($0, `eq`, [value("f32", 6.2831855), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:229 +assert_return(() => invoke($0, `eq`, [value("f32", -6.2831855), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:230 +assert_return(() => invoke($0, `eq`, [value("f32", -6.2831855), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:231 +assert_return(() => invoke($0, `eq`, [value("f32", 6.2831855), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:232 +assert_return(() => invoke($0, `eq`, [value("f32", 6.2831855), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:233 +assert_return( + () => invoke($0, `eq`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:234 +assert_return( + () => invoke($0, `eq`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:235 +assert_return( + () => invoke($0, `eq`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:236 +assert_return( + () => invoke($0, `eq`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:237 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:238 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:239 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:240 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:241 +assert_return( + () => invoke($0, `eq`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:242 +assert_return( + () => invoke($0, `eq`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:243 +assert_return( + () => invoke($0, `eq`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:244 +assert_return( + () => invoke($0, `eq`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:245 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:246 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:247 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:248 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:249 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:250 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:251 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:252 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:253 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:254 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:255 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:256 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:257 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:258 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:259 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:260 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:261 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:262 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:263 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:264 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:265 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:266 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:267 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:268 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:269 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:270 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:271 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:272 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:273 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:274 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:275 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:276 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:277 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:278 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:279 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:280 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:281 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:282 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:283 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:284 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:285 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:286 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:287 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:288 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:289 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:290 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:291 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:292 +assert_return( + () => invoke($0, `eq`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:293 +assert_return(() => invoke($0, `eq`, [value("f32", -Infinity), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:294 +assert_return(() => invoke($0, `eq`, [value("f32", -Infinity), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:295 +assert_return(() => invoke($0, `eq`, [value("f32", Infinity), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:296 +assert_return(() => invoke($0, `eq`, [value("f32", Infinity), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:297 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:298 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:299 +assert_return( + () => invoke($0, `eq`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:300 +assert_return( + () => invoke($0, `eq`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:301 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:302 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:303 +assert_return( + () => invoke($0, `eq`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:304 +assert_return( + () => invoke($0, `eq`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:305 +assert_return(() => invoke($0, `eq`, [value("f32", -Infinity), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:306 +assert_return(() => invoke($0, `eq`, [value("f32", -Infinity), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:307 +assert_return(() => invoke($0, `eq`, [value("f32", Infinity), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:308 +assert_return(() => invoke($0, `eq`, [value("f32", Infinity), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:309 +assert_return(() => invoke($0, `eq`, [value("f32", -Infinity), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:310 +assert_return(() => invoke($0, `eq`, [value("f32", -Infinity), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:311 +assert_return(() => invoke($0, `eq`, [value("f32", Infinity), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:312 +assert_return(() => invoke($0, `eq`, [value("f32", Infinity), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:313 +assert_return( + () => invoke($0, `eq`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:314 +assert_return( + () => invoke($0, `eq`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:315 +assert_return( + () => invoke($0, `eq`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:316 +assert_return( + () => invoke($0, `eq`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:317 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:318 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:319 +assert_return( + () => invoke($0, `eq`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:320 +assert_return( + () => invoke($0, `eq`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:321 +assert_return( + () => invoke($0, `eq`, [value("f32", -Infinity), value("f32", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:322 +assert_return( + () => invoke($0, `eq`, [value("f32", -Infinity), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:323 +assert_return( + () => invoke($0, `eq`, [value("f32", Infinity), value("f32", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:324 +assert_return( + () => invoke($0, `eq`, [value("f32", Infinity), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:325 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:326 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:327 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:328 +assert_return( + () => invoke($0, `eq`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:329 +assert_return( + () => invoke($0, `eq`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:330 +assert_return( + () => invoke($0, `eq`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:331 +assert_return( + () => invoke($0, `eq`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:332 +assert_return( + () => invoke($0, `eq`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:333 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:334 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:335 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:336 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:337 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:338 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:339 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:340 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:341 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:342 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:343 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:344 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:345 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:346 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:347 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:348 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:349 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:350 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:351 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:352 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:353 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:354 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:355 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:356 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:357 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:358 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:359 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:360 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:361 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:362 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:363 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:364 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:365 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:366 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:367 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:368 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:369 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:370 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:371 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:372 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:373 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:374 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:375 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:376 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:377 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:378 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:379 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:380 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:381 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:382 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:383 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:384 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:385 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:386 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:387 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:388 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:389 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:390 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:391 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:392 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:393 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:394 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:395 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:396 +assert_return( + () => invoke($0, `eq`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:397 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:398 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:399 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:400 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:401 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:402 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:403 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:404 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:405 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:406 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:407 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:408 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:409 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:410 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:411 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:412 +assert_return( + () => invoke($0, `eq`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:413 +assert_return(() => invoke($0, `ne`, [value("f32", -0), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:414 +assert_return(() => invoke($0, `ne`, [value("f32", -0), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:415 +assert_return(() => invoke($0, `ne`, [value("f32", 0), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:416 +assert_return(() => invoke($0, `ne`, [value("f32", 0), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:417 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:418 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:419 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:420 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:421 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:422 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:423 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:424 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:425 +assert_return(() => invoke($0, `ne`, [value("f32", -0), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:426 +assert_return(() => invoke($0, `ne`, [value("f32", -0), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:427 +assert_return(() => invoke($0, `ne`, [value("f32", 0), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:428 +assert_return(() => invoke($0, `ne`, [value("f32", 0), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:429 +assert_return(() => invoke($0, `ne`, [value("f32", -0), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:430 +assert_return(() => invoke($0, `ne`, [value("f32", -0), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:431 +assert_return(() => invoke($0, `ne`, [value("f32", 0), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:432 +assert_return(() => invoke($0, `ne`, [value("f32", 0), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:433 +assert_return(() => invoke($0, `ne`, [value("f32", -0), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:434 +assert_return(() => invoke($0, `ne`, [value("f32", -0), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:435 +assert_return(() => invoke($0, `ne`, [value("f32", 0), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:436 +assert_return(() => invoke($0, `ne`, [value("f32", 0), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:437 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:438 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:439 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:440 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:441 +assert_return(() => invoke($0, `ne`, [value("f32", -0), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:442 +assert_return(() => invoke($0, `ne`, [value("f32", -0), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:443 +assert_return(() => invoke($0, `ne`, [value("f32", 0), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:444 +assert_return(() => invoke($0, `ne`, [value("f32", 0), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:445 +assert_return( + () => invoke($0, `ne`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:446 +assert_return( + () => invoke($0, `ne`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:447 +assert_return( + () => invoke($0, `ne`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:448 +assert_return( + () => invoke($0, `ne`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:449 +assert_return( + () => invoke($0, `ne`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:450 +assert_return( + () => invoke($0, `ne`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:451 +assert_return( + () => invoke($0, `ne`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:452 +assert_return( + () => invoke($0, `ne`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:453 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:454 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:455 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:456 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:457 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:458 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:459 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:460 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:461 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:462 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:463 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:464 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:465 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:466 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:467 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:468 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:469 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:470 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:471 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:472 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:473 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:474 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:475 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:476 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:477 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:478 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:479 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:480 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:481 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:482 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:483 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:484 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:485 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:486 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:487 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:488 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:489 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:490 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:491 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:492 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:493 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:494 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:495 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:496 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:497 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:498 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:499 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:500 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:501 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:502 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:503 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:504 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:505 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:506 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:507 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:508 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:509 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:510 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:511 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:512 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:513 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:514 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:515 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:516 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:517 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:518 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:519 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:520 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:521 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:522 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:523 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:524 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:525 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:526 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:527 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:528 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:529 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:530 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:531 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:532 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:533 +assert_return(() => invoke($0, `ne`, [value("f32", -0.5), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:534 +assert_return(() => invoke($0, `ne`, [value("f32", -0.5), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:535 +assert_return(() => invoke($0, `ne`, [value("f32", 0.5), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:536 +assert_return(() => invoke($0, `ne`, [value("f32", 0.5), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:537 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:538 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:539 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:540 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:541 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:542 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:543 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:544 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:545 +assert_return(() => invoke($0, `ne`, [value("f32", -0.5), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:546 +assert_return(() => invoke($0, `ne`, [value("f32", -0.5), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:547 +assert_return(() => invoke($0, `ne`, [value("f32", 0.5), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:548 +assert_return(() => invoke($0, `ne`, [value("f32", 0.5), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:549 +assert_return(() => invoke($0, `ne`, [value("f32", -0.5), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:550 +assert_return(() => invoke($0, `ne`, [value("f32", -0.5), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:551 +assert_return(() => invoke($0, `ne`, [value("f32", 0.5), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:552 +assert_return(() => invoke($0, `ne`, [value("f32", 0.5), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:553 +assert_return(() => invoke($0, `ne`, [value("f32", -0.5), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:554 +assert_return(() => invoke($0, `ne`, [value("f32", -0.5), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:555 +assert_return(() => invoke($0, `ne`, [value("f32", 0.5), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:556 +assert_return(() => invoke($0, `ne`, [value("f32", 0.5), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:557 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:558 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:559 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:560 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:561 +assert_return(() => invoke($0, `ne`, [value("f32", -0.5), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:562 +assert_return(() => invoke($0, `ne`, [value("f32", -0.5), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:563 +assert_return(() => invoke($0, `ne`, [value("f32", 0.5), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:564 +assert_return(() => invoke($0, `ne`, [value("f32", 0.5), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:565 +assert_return( + () => invoke($0, `ne`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:566 +assert_return( + () => invoke($0, `ne`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:567 +assert_return( + () => invoke($0, `ne`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:568 +assert_return( + () => invoke($0, `ne`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:569 +assert_return( + () => invoke($0, `ne`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:570 +assert_return( + () => invoke($0, `ne`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:571 +assert_return( + () => invoke($0, `ne`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:572 +assert_return( + () => invoke($0, `ne`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:573 +assert_return(() => invoke($0, `ne`, [value("f32", -1), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:574 +assert_return(() => invoke($0, `ne`, [value("f32", -1), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:575 +assert_return(() => invoke($0, `ne`, [value("f32", 1), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:576 +assert_return(() => invoke($0, `ne`, [value("f32", 1), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:577 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:578 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:579 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:580 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:581 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:582 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:583 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:584 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:585 +assert_return(() => invoke($0, `ne`, [value("f32", -1), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:586 +assert_return(() => invoke($0, `ne`, [value("f32", -1), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:587 +assert_return(() => invoke($0, `ne`, [value("f32", 1), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:588 +assert_return(() => invoke($0, `ne`, [value("f32", 1), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:589 +assert_return(() => invoke($0, `ne`, [value("f32", -1), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:590 +assert_return(() => invoke($0, `ne`, [value("f32", -1), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:591 +assert_return(() => invoke($0, `ne`, [value("f32", 1), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:592 +assert_return(() => invoke($0, `ne`, [value("f32", 1), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:593 +assert_return(() => invoke($0, `ne`, [value("f32", -1), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:594 +assert_return(() => invoke($0, `ne`, [value("f32", -1), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:595 +assert_return(() => invoke($0, `ne`, [value("f32", 1), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:596 +assert_return(() => invoke($0, `ne`, [value("f32", 1), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:597 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:598 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:599 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:600 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:601 +assert_return(() => invoke($0, `ne`, [value("f32", -1), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:602 +assert_return(() => invoke($0, `ne`, [value("f32", -1), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:603 +assert_return(() => invoke($0, `ne`, [value("f32", 1), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:604 +assert_return(() => invoke($0, `ne`, [value("f32", 1), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:605 +assert_return( + () => invoke($0, `ne`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:606 +assert_return( + () => invoke($0, `ne`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:607 +assert_return( + () => invoke($0, `ne`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:608 +assert_return( + () => invoke($0, `ne`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:609 +assert_return( + () => invoke($0, `ne`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:610 +assert_return( + () => invoke($0, `ne`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:611 +assert_return( + () => invoke($0, `ne`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:612 +assert_return( + () => invoke($0, `ne`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:613 +assert_return(() => invoke($0, `ne`, [value("f32", -6.2831855), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:614 +assert_return(() => invoke($0, `ne`, [value("f32", -6.2831855), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:615 +assert_return(() => invoke($0, `ne`, [value("f32", 6.2831855), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:616 +assert_return(() => invoke($0, `ne`, [value("f32", 6.2831855), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:617 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:618 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:619 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:620 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:621 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:622 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:623 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:624 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:625 +assert_return(() => invoke($0, `ne`, [value("f32", -6.2831855), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:626 +assert_return(() => invoke($0, `ne`, [value("f32", -6.2831855), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:627 +assert_return(() => invoke($0, `ne`, [value("f32", 6.2831855), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:628 +assert_return(() => invoke($0, `ne`, [value("f32", 6.2831855), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:629 +assert_return(() => invoke($0, `ne`, [value("f32", -6.2831855), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:630 +assert_return(() => invoke($0, `ne`, [value("f32", -6.2831855), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:631 +assert_return(() => invoke($0, `ne`, [value("f32", 6.2831855), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:632 +assert_return(() => invoke($0, `ne`, [value("f32", 6.2831855), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:633 +assert_return( + () => invoke($0, `ne`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:634 +assert_return( + () => invoke($0, `ne`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:635 +assert_return( + () => invoke($0, `ne`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:636 +assert_return( + () => invoke($0, `ne`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:637 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:638 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:639 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:640 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:641 +assert_return( + () => invoke($0, `ne`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:642 +assert_return( + () => invoke($0, `ne`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:643 +assert_return( + () => invoke($0, `ne`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:644 +assert_return( + () => invoke($0, `ne`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:645 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:646 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:647 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:648 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:649 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:650 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:651 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:652 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:653 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:654 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:655 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:656 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:657 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:658 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:659 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:660 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:661 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:662 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:663 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:664 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:665 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:666 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:667 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:668 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:669 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:670 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:671 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:672 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:673 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:674 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:675 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:676 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:677 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:678 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:679 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:680 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:681 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:682 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:683 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:684 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:685 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:686 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:687 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:688 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:689 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:690 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:691 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:692 +assert_return( + () => invoke($0, `ne`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:693 +assert_return(() => invoke($0, `ne`, [value("f32", -Infinity), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:694 +assert_return(() => invoke($0, `ne`, [value("f32", -Infinity), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:695 +assert_return(() => invoke($0, `ne`, [value("f32", Infinity), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:696 +assert_return(() => invoke($0, `ne`, [value("f32", Infinity), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:697 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:698 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:699 +assert_return( + () => invoke($0, `ne`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:700 +assert_return( + () => invoke($0, `ne`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:701 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:702 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:703 +assert_return( + () => invoke($0, `ne`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:704 +assert_return( + () => invoke($0, `ne`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:705 +assert_return(() => invoke($0, `ne`, [value("f32", -Infinity), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:706 +assert_return(() => invoke($0, `ne`, [value("f32", -Infinity), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:707 +assert_return(() => invoke($0, `ne`, [value("f32", Infinity), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:708 +assert_return(() => invoke($0, `ne`, [value("f32", Infinity), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:709 +assert_return(() => invoke($0, `ne`, [value("f32", -Infinity), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:710 +assert_return(() => invoke($0, `ne`, [value("f32", -Infinity), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:711 +assert_return(() => invoke($0, `ne`, [value("f32", Infinity), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:712 +assert_return(() => invoke($0, `ne`, [value("f32", Infinity), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:713 +assert_return( + () => invoke($0, `ne`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:714 +assert_return( + () => invoke($0, `ne`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:715 +assert_return( + () => invoke($0, `ne`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:716 +assert_return( + () => invoke($0, `ne`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:717 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:718 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:719 +assert_return( + () => invoke($0, `ne`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:720 +assert_return( + () => invoke($0, `ne`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:721 +assert_return( + () => invoke($0, `ne`, [value("f32", -Infinity), value("f32", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:722 +assert_return( + () => invoke($0, `ne`, [value("f32", -Infinity), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:723 +assert_return( + () => invoke($0, `ne`, [value("f32", Infinity), value("f32", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:724 +assert_return( + () => invoke($0, `ne`, [value("f32", Infinity), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:725 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:726 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:727 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:728 +assert_return( + () => invoke($0, `ne`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:729 +assert_return( + () => invoke($0, `ne`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:730 +assert_return( + () => invoke($0, `ne`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:731 +assert_return( + () => invoke($0, `ne`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:732 +assert_return( + () => invoke($0, `ne`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:733 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:734 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:735 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:736 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:737 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:738 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:739 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:740 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:741 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:742 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:743 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:744 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:745 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:746 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:747 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:748 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:749 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:750 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:751 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:752 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:753 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:754 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:755 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:756 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:757 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0.5)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:758 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0.5)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:759 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0.5)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:760 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0.5)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:761 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0.5)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:762 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0.5)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:763 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0.5)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:764 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0.5)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:765 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:766 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -1)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:767 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:768 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 1)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:769 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:770 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -1)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:771 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:772 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 1)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:773 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:774 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:775 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:776 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:777 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:778 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:779 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:780 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:781 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:782 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:783 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:784 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:785 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:786 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:787 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:788 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:789 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:790 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:791 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:792 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:793 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:794 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:795 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:796 +assert_return( + () => invoke($0, `ne`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:797 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:798 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:799 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:800 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:801 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:802 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:803 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:804 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:805 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:806 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:807 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:808 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:809 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:810 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:811 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:812 +assert_return( + () => invoke($0, `ne`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:813 +assert_return(() => invoke($0, `lt`, [value("f32", -0), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:814 +assert_return(() => invoke($0, `lt`, [value("f32", -0), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:815 +assert_return(() => invoke($0, `lt`, [value("f32", 0), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:816 +assert_return(() => invoke($0, `lt`, [value("f32", 0), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:817 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:818 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:819 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:820 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:821 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:822 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:823 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:824 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:825 +assert_return(() => invoke($0, `lt`, [value("f32", -0), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:826 +assert_return(() => invoke($0, `lt`, [value("f32", -0), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:827 +assert_return(() => invoke($0, `lt`, [value("f32", 0), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:828 +assert_return(() => invoke($0, `lt`, [value("f32", 0), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:829 +assert_return(() => invoke($0, `lt`, [value("f32", -0), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:830 +assert_return(() => invoke($0, `lt`, [value("f32", -0), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:831 +assert_return(() => invoke($0, `lt`, [value("f32", 0), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:832 +assert_return(() => invoke($0, `lt`, [value("f32", 0), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:833 +assert_return(() => invoke($0, `lt`, [value("f32", -0), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:834 +assert_return(() => invoke($0, `lt`, [value("f32", -0), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:835 +assert_return(() => invoke($0, `lt`, [value("f32", 0), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:836 +assert_return(() => invoke($0, `lt`, [value("f32", 0), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:837 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:838 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:839 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:840 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:841 +assert_return(() => invoke($0, `lt`, [value("f32", -0), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:842 +assert_return(() => invoke($0, `lt`, [value("f32", -0), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:843 +assert_return(() => invoke($0, `lt`, [value("f32", 0), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:844 +assert_return(() => invoke($0, `lt`, [value("f32", 0), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:845 +assert_return( + () => invoke($0, `lt`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:846 +assert_return( + () => invoke($0, `lt`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:847 +assert_return( + () => invoke($0, `lt`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:848 +assert_return( + () => invoke($0, `lt`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:849 +assert_return( + () => invoke($0, `lt`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:850 +assert_return( + () => invoke($0, `lt`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:851 +assert_return( + () => invoke($0, `lt`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:852 +assert_return( + () => invoke($0, `lt`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:853 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:854 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:855 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:856 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:857 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:858 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:859 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:860 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:861 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:862 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:863 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:864 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:865 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:866 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:867 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:868 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:869 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:870 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:871 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:872 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:873 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:874 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:875 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:876 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:877 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:878 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:879 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:880 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:881 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:882 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:883 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:884 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:885 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:886 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:887 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:888 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:889 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:890 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:891 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:892 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:893 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:894 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:895 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:896 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:897 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:898 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:899 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:900 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:901 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:902 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:903 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:904 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:905 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:906 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:907 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:908 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:909 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:910 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:911 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:912 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:913 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:914 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:915 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:916 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:917 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:918 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:919 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:920 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:921 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:922 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:923 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:924 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:925 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:926 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:927 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:928 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:929 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:930 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:931 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:932 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:933 +assert_return(() => invoke($0, `lt`, [value("f32", -0.5), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:934 +assert_return(() => invoke($0, `lt`, [value("f32", -0.5), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:935 +assert_return(() => invoke($0, `lt`, [value("f32", 0.5), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:936 +assert_return(() => invoke($0, `lt`, [value("f32", 0.5), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:937 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:938 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:939 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:940 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:941 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:942 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:943 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:944 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:945 +assert_return(() => invoke($0, `lt`, [value("f32", -0.5), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:946 +assert_return(() => invoke($0, `lt`, [value("f32", -0.5), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:947 +assert_return(() => invoke($0, `lt`, [value("f32", 0.5), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:948 +assert_return(() => invoke($0, `lt`, [value("f32", 0.5), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:949 +assert_return(() => invoke($0, `lt`, [value("f32", -0.5), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:950 +assert_return(() => invoke($0, `lt`, [value("f32", -0.5), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:951 +assert_return(() => invoke($0, `lt`, [value("f32", 0.5), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:952 +assert_return(() => invoke($0, `lt`, [value("f32", 0.5), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:953 +assert_return(() => invoke($0, `lt`, [value("f32", -0.5), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:954 +assert_return(() => invoke($0, `lt`, [value("f32", -0.5), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:955 +assert_return(() => invoke($0, `lt`, [value("f32", 0.5), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:956 +assert_return(() => invoke($0, `lt`, [value("f32", 0.5), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:957 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:958 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:959 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:960 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:961 +assert_return(() => invoke($0, `lt`, [value("f32", -0.5), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:962 +assert_return(() => invoke($0, `lt`, [value("f32", -0.5), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:963 +assert_return(() => invoke($0, `lt`, [value("f32", 0.5), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:964 +assert_return(() => invoke($0, `lt`, [value("f32", 0.5), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:965 +assert_return( + () => invoke($0, `lt`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:966 +assert_return( + () => invoke($0, `lt`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:967 +assert_return( + () => invoke($0, `lt`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:968 +assert_return( + () => invoke($0, `lt`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:969 +assert_return( + () => invoke($0, `lt`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:970 +assert_return( + () => invoke($0, `lt`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:971 +assert_return( + () => invoke($0, `lt`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:972 +assert_return( + () => invoke($0, `lt`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:973 +assert_return(() => invoke($0, `lt`, [value("f32", -1), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:974 +assert_return(() => invoke($0, `lt`, [value("f32", -1), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:975 +assert_return(() => invoke($0, `lt`, [value("f32", 1), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:976 +assert_return(() => invoke($0, `lt`, [value("f32", 1), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:977 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:978 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:979 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:980 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:981 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:982 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:983 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:984 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:985 +assert_return(() => invoke($0, `lt`, [value("f32", -1), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:986 +assert_return(() => invoke($0, `lt`, [value("f32", -1), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:987 +assert_return(() => invoke($0, `lt`, [value("f32", 1), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:988 +assert_return(() => invoke($0, `lt`, [value("f32", 1), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:989 +assert_return(() => invoke($0, `lt`, [value("f32", -1), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:990 +assert_return(() => invoke($0, `lt`, [value("f32", -1), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:991 +assert_return(() => invoke($0, `lt`, [value("f32", 1), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:992 +assert_return(() => invoke($0, `lt`, [value("f32", 1), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:993 +assert_return(() => invoke($0, `lt`, [value("f32", -1), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:994 +assert_return(() => invoke($0, `lt`, [value("f32", -1), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:995 +assert_return(() => invoke($0, `lt`, [value("f32", 1), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:996 +assert_return(() => invoke($0, `lt`, [value("f32", 1), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:997 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:998 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:999 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1000 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1001 +assert_return(() => invoke($0, `lt`, [value("f32", -1), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1002 +assert_return(() => invoke($0, `lt`, [value("f32", -1), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1003 +assert_return(() => invoke($0, `lt`, [value("f32", 1), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1004 +assert_return(() => invoke($0, `lt`, [value("f32", 1), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1005 +assert_return( + () => invoke($0, `lt`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1006 +assert_return( + () => invoke($0, `lt`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1007 +assert_return( + () => invoke($0, `lt`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1008 +assert_return( + () => invoke($0, `lt`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1009 +assert_return( + () => invoke($0, `lt`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1010 +assert_return( + () => invoke($0, `lt`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1011 +assert_return( + () => invoke($0, `lt`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1012 +assert_return( + () => invoke($0, `lt`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1013 +assert_return(() => invoke($0, `lt`, [value("f32", -6.2831855), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1014 +assert_return(() => invoke($0, `lt`, [value("f32", -6.2831855), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1015 +assert_return(() => invoke($0, `lt`, [value("f32", 6.2831855), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1016 +assert_return(() => invoke($0, `lt`, [value("f32", 6.2831855), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1017 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1018 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1019 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1020 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1021 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1022 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1023 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1024 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1025 +assert_return(() => invoke($0, `lt`, [value("f32", -6.2831855), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1026 +assert_return(() => invoke($0, `lt`, [value("f32", -6.2831855), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1027 +assert_return(() => invoke($0, `lt`, [value("f32", 6.2831855), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1028 +assert_return(() => invoke($0, `lt`, [value("f32", 6.2831855), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1029 +assert_return(() => invoke($0, `lt`, [value("f32", -6.2831855), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1030 +assert_return(() => invoke($0, `lt`, [value("f32", -6.2831855), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1031 +assert_return(() => invoke($0, `lt`, [value("f32", 6.2831855), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1032 +assert_return(() => invoke($0, `lt`, [value("f32", 6.2831855), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1033 +assert_return( + () => invoke($0, `lt`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1034 +assert_return( + () => invoke($0, `lt`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1035 +assert_return( + () => invoke($0, `lt`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1036 +assert_return( + () => invoke($0, `lt`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1037 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1038 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1039 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1040 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1041 +assert_return( + () => invoke($0, `lt`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1042 +assert_return( + () => invoke($0, `lt`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1043 +assert_return( + () => invoke($0, `lt`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1044 +assert_return( + () => invoke($0, `lt`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1045 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1046 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1047 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1048 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1049 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1050 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1051 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1052 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1053 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1054 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1055 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1056 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1057 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1058 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1059 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1060 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1061 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1062 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1063 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1064 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1065 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1066 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1067 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1068 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1069 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1070 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1071 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1072 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1073 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1074 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1075 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1076 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1077 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1078 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1079 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1080 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1081 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1082 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1083 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1084 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1085 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1086 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1087 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1088 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1089 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1090 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1091 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1092 +assert_return( + () => invoke($0, `lt`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1093 +assert_return(() => invoke($0, `lt`, [value("f32", -Infinity), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1094 +assert_return(() => invoke($0, `lt`, [value("f32", -Infinity), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1095 +assert_return(() => invoke($0, `lt`, [value("f32", Infinity), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1096 +assert_return(() => invoke($0, `lt`, [value("f32", Infinity), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1097 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1098 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1099 +assert_return( + () => invoke($0, `lt`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1100 +assert_return( + () => invoke($0, `lt`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1101 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1102 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1103 +assert_return( + () => invoke($0, `lt`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1104 +assert_return( + () => invoke($0, `lt`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1105 +assert_return(() => invoke($0, `lt`, [value("f32", -Infinity), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1106 +assert_return(() => invoke($0, `lt`, [value("f32", -Infinity), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1107 +assert_return(() => invoke($0, `lt`, [value("f32", Infinity), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1108 +assert_return(() => invoke($0, `lt`, [value("f32", Infinity), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1109 +assert_return(() => invoke($0, `lt`, [value("f32", -Infinity), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1110 +assert_return(() => invoke($0, `lt`, [value("f32", -Infinity), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1111 +assert_return(() => invoke($0, `lt`, [value("f32", Infinity), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1112 +assert_return(() => invoke($0, `lt`, [value("f32", Infinity), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1113 +assert_return( + () => invoke($0, `lt`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1114 +assert_return( + () => invoke($0, `lt`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1115 +assert_return( + () => invoke($0, `lt`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1116 +assert_return( + () => invoke($0, `lt`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1117 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1118 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1119 +assert_return( + () => invoke($0, `lt`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1120 +assert_return( + () => invoke($0, `lt`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1121 +assert_return( + () => invoke($0, `lt`, [value("f32", -Infinity), value("f32", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1122 +assert_return( + () => invoke($0, `lt`, [value("f32", -Infinity), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1123 +assert_return( + () => invoke($0, `lt`, [value("f32", Infinity), value("f32", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1124 +assert_return( + () => invoke($0, `lt`, [value("f32", Infinity), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1125 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1126 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1127 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1128 +assert_return( + () => invoke($0, `lt`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1129 +assert_return( + () => invoke($0, `lt`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1130 +assert_return( + () => invoke($0, `lt`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1131 +assert_return( + () => invoke($0, `lt`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1132 +assert_return( + () => invoke($0, `lt`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1133 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1134 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1135 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1136 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1137 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1138 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1139 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1140 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1141 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1142 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1143 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1144 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1145 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1146 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1147 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1148 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1149 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1150 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1151 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1152 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1153 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1154 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1155 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1156 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1157 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1158 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1159 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1160 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1161 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1162 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1163 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1164 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1165 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1166 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1167 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1168 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1169 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1170 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1171 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1172 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1173 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1174 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1175 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1176 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1177 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1178 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1179 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1180 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1181 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1182 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1183 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1184 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1185 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1186 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1187 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1188 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1189 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1190 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1191 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1192 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1193 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1194 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1195 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1196 +assert_return( + () => invoke($0, `lt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1197 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1198 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1199 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1200 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1201 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1202 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1203 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1204 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1205 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1206 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1207 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1208 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1209 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1210 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1211 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1212 +assert_return( + () => invoke($0, `lt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1213 +assert_return(() => invoke($0, `le`, [value("f32", -0), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1214 +assert_return(() => invoke($0, `le`, [value("f32", -0), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1215 +assert_return(() => invoke($0, `le`, [value("f32", 0), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1216 +assert_return(() => invoke($0, `le`, [value("f32", 0), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1217 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1218 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1219 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1220 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1221 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1222 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1223 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1224 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1225 +assert_return(() => invoke($0, `le`, [value("f32", -0), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1226 +assert_return(() => invoke($0, `le`, [value("f32", -0), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1227 +assert_return(() => invoke($0, `le`, [value("f32", 0), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1228 +assert_return(() => invoke($0, `le`, [value("f32", 0), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1229 +assert_return(() => invoke($0, `le`, [value("f32", -0), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1230 +assert_return(() => invoke($0, `le`, [value("f32", -0), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1231 +assert_return(() => invoke($0, `le`, [value("f32", 0), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1232 +assert_return(() => invoke($0, `le`, [value("f32", 0), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1233 +assert_return(() => invoke($0, `le`, [value("f32", -0), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1234 +assert_return(() => invoke($0, `le`, [value("f32", -0), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1235 +assert_return(() => invoke($0, `le`, [value("f32", 0), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1236 +assert_return(() => invoke($0, `le`, [value("f32", 0), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1237 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1238 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1239 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1240 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1241 +assert_return(() => invoke($0, `le`, [value("f32", -0), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1242 +assert_return(() => invoke($0, `le`, [value("f32", -0), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1243 +assert_return(() => invoke($0, `le`, [value("f32", 0), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1244 +assert_return(() => invoke($0, `le`, [value("f32", 0), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1245 +assert_return( + () => invoke($0, `le`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1246 +assert_return( + () => invoke($0, `le`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1247 +assert_return( + () => invoke($0, `le`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1248 +assert_return( + () => invoke($0, `le`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1249 +assert_return( + () => invoke($0, `le`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1250 +assert_return( + () => invoke($0, `le`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1251 +assert_return( + () => invoke($0, `le`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1252 +assert_return( + () => invoke($0, `le`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1253 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1254 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1255 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1256 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1257 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1258 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1259 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1260 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1261 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1262 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1263 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1264 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1265 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1266 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1267 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1268 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1269 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1270 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1271 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1272 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1273 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1274 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1275 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1276 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1277 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1278 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1279 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1280 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1281 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1282 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1283 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1284 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1285 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1286 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1287 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1288 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1289 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1290 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1291 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1292 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1293 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1294 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1295 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1296 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1297 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1298 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1299 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1300 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1301 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1302 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1303 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1304 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1305 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1306 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1307 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1308 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1309 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1310 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1311 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1312 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1313 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1314 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1315 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1316 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1317 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1318 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1319 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1320 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1321 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1322 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1323 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1324 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1325 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1326 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1327 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1328 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1329 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1330 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1331 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1332 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1333 +assert_return(() => invoke($0, `le`, [value("f32", -0.5), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1334 +assert_return(() => invoke($0, `le`, [value("f32", -0.5), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1335 +assert_return(() => invoke($0, `le`, [value("f32", 0.5), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1336 +assert_return(() => invoke($0, `le`, [value("f32", 0.5), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1337 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1338 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1339 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1340 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1341 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1342 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1343 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1344 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1345 +assert_return(() => invoke($0, `le`, [value("f32", -0.5), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1346 +assert_return(() => invoke($0, `le`, [value("f32", -0.5), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1347 +assert_return(() => invoke($0, `le`, [value("f32", 0.5), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1348 +assert_return(() => invoke($0, `le`, [value("f32", 0.5), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1349 +assert_return(() => invoke($0, `le`, [value("f32", -0.5), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1350 +assert_return(() => invoke($0, `le`, [value("f32", -0.5), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1351 +assert_return(() => invoke($0, `le`, [value("f32", 0.5), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1352 +assert_return(() => invoke($0, `le`, [value("f32", 0.5), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1353 +assert_return(() => invoke($0, `le`, [value("f32", -0.5), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1354 +assert_return(() => invoke($0, `le`, [value("f32", -0.5), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1355 +assert_return(() => invoke($0, `le`, [value("f32", 0.5), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1356 +assert_return(() => invoke($0, `le`, [value("f32", 0.5), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1357 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1358 +assert_return( + () => invoke($0, `le`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1359 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1360 +assert_return( + () => invoke($0, `le`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1361 +assert_return(() => invoke($0, `le`, [value("f32", -0.5), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1362 +assert_return(() => invoke($0, `le`, [value("f32", -0.5), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1363 +assert_return(() => invoke($0, `le`, [value("f32", 0.5), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1364 +assert_return(() => invoke($0, `le`, [value("f32", 0.5), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1365 +assert_return( + () => invoke($0, `le`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1366 +assert_return( + () => invoke($0, `le`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1367 +assert_return( + () => invoke($0, `le`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1368 +assert_return( + () => invoke($0, `le`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1369 +assert_return( + () => invoke($0, `le`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1370 +assert_return( + () => invoke($0, `le`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1371 +assert_return( + () => invoke($0, `le`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1372 +assert_return( + () => invoke($0, `le`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1373 +assert_return(() => invoke($0, `le`, [value("f32", -1), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1374 +assert_return(() => invoke($0, `le`, [value("f32", -1), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1375 +assert_return(() => invoke($0, `le`, [value("f32", 1), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1376 +assert_return(() => invoke($0, `le`, [value("f32", 1), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1377 +assert_return( + () => invoke($0, `le`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1378 +assert_return( + () => invoke($0, `le`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1379 +assert_return( + () => invoke($0, `le`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1380 +assert_return( + () => invoke($0, `le`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1381 +assert_return( + () => invoke($0, `le`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1382 +assert_return( + () => invoke($0, `le`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1383 +assert_return( + () => invoke($0, `le`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1384 +assert_return( + () => invoke($0, `le`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1385 +assert_return(() => invoke($0, `le`, [value("f32", -1), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1386 +assert_return(() => invoke($0, `le`, [value("f32", -1), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1387 +assert_return(() => invoke($0, `le`, [value("f32", 1), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1388 +assert_return(() => invoke($0, `le`, [value("f32", 1), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1389 +assert_return(() => invoke($0, `le`, [value("f32", -1), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1390 +assert_return(() => invoke($0, `le`, [value("f32", -1), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1391 +assert_return(() => invoke($0, `le`, [value("f32", 1), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1392 +assert_return(() => invoke($0, `le`, [value("f32", 1), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1393 +assert_return(() => invoke($0, `le`, [value("f32", -1), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1394 +assert_return(() => invoke($0, `le`, [value("f32", -1), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1395 +assert_return(() => invoke($0, `le`, [value("f32", 1), value("f32", -6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1396 +assert_return(() => invoke($0, `le`, [value("f32", 1), value("f32", 6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1397 +assert_return( + () => invoke($0, `le`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1398 +assert_return( + () => invoke($0, `le`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1399 +assert_return( + () => invoke($0, `le`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1400 +assert_return( + () => invoke($0, `le`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1401 +assert_return(() => invoke($0, `le`, [value("f32", -1), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1402 +assert_return(() => invoke($0, `le`, [value("f32", -1), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1403 +assert_return(() => invoke($0, `le`, [value("f32", 1), value("f32", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1404 +assert_return(() => invoke($0, `le`, [value("f32", 1), value("f32", Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1405 +assert_return( + () => invoke($0, `le`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1406 +assert_return( + () => invoke($0, `le`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1407 +assert_return( + () => invoke($0, `le`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1408 +assert_return( + () => invoke($0, `le`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1409 +assert_return( + () => invoke($0, `le`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1410 +assert_return( + () => invoke($0, `le`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1411 +assert_return( + () => invoke($0, `le`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1412 +assert_return( + () => invoke($0, `le`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1413 +assert_return(() => invoke($0, `le`, [value("f32", -6.2831855), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1414 +assert_return(() => invoke($0, `le`, [value("f32", -6.2831855), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1415 +assert_return(() => invoke($0, `le`, [value("f32", 6.2831855), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1416 +assert_return(() => invoke($0, `le`, [value("f32", 6.2831855), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1417 +assert_return( + () => invoke($0, `le`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1418 +assert_return( + () => invoke($0, `le`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1419 +assert_return( + () => invoke($0, `le`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1420 +assert_return( + () => invoke($0, `le`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1421 +assert_return( + () => invoke($0, `le`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1422 +assert_return( + () => invoke($0, `le`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1423 +assert_return( + () => invoke($0, `le`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1424 +assert_return( + () => invoke($0, `le`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1425 +assert_return(() => invoke($0, `le`, [value("f32", -6.2831855), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1426 +assert_return(() => invoke($0, `le`, [value("f32", -6.2831855), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1427 +assert_return(() => invoke($0, `le`, [value("f32", 6.2831855), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1428 +assert_return(() => invoke($0, `le`, [value("f32", 6.2831855), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1429 +assert_return(() => invoke($0, `le`, [value("f32", -6.2831855), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1430 +assert_return(() => invoke($0, `le`, [value("f32", -6.2831855), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1431 +assert_return(() => invoke($0, `le`, [value("f32", 6.2831855), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1432 +assert_return(() => invoke($0, `le`, [value("f32", 6.2831855), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1433 +assert_return( + () => invoke($0, `le`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1434 +assert_return( + () => invoke($0, `le`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1435 +assert_return( + () => invoke($0, `le`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1436 +assert_return( + () => invoke($0, `le`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1437 +assert_return( + () => invoke($0, `le`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1438 +assert_return( + () => invoke($0, `le`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1439 +assert_return( + () => invoke($0, `le`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1440 +assert_return( + () => invoke($0, `le`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1441 +assert_return( + () => invoke($0, `le`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1442 +assert_return( + () => invoke($0, `le`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1443 +assert_return( + () => invoke($0, `le`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1444 +assert_return( + () => invoke($0, `le`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1445 +assert_return( + () => invoke($0, `le`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1446 +assert_return( + () => invoke($0, `le`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1447 +assert_return( + () => invoke($0, `le`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1448 +assert_return( + () => invoke($0, `le`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1449 +assert_return( + () => invoke($0, `le`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1450 +assert_return( + () => invoke($0, `le`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1451 +assert_return( + () => invoke($0, `le`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1452 +assert_return( + () => invoke($0, `le`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1453 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1454 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1455 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1456 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1457 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1458 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1459 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1460 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1461 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1462 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1463 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1464 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1465 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1466 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1467 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1468 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1469 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1470 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1471 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1472 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1473 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1474 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1475 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1476 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1477 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1478 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1479 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1480 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1481 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1482 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1483 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1484 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1485 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1486 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1487 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1488 +assert_return( + () => invoke($0, `le`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1489 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1490 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1491 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1492 +assert_return( + () => invoke($0, `le`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1493 +assert_return(() => invoke($0, `le`, [value("f32", -Infinity), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1494 +assert_return(() => invoke($0, `le`, [value("f32", -Infinity), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1495 +assert_return(() => invoke($0, `le`, [value("f32", Infinity), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1496 +assert_return(() => invoke($0, `le`, [value("f32", Infinity), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1497 +assert_return( + () => invoke($0, `le`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1498 +assert_return( + () => invoke($0, `le`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1499 +assert_return( + () => invoke($0, `le`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1500 +assert_return( + () => invoke($0, `le`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1501 +assert_return( + () => invoke($0, `le`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1502 +assert_return( + () => invoke($0, `le`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1503 +assert_return( + () => invoke($0, `le`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1504 +assert_return( + () => invoke($0, `le`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1505 +assert_return(() => invoke($0, `le`, [value("f32", -Infinity), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1506 +assert_return(() => invoke($0, `le`, [value("f32", -Infinity), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1507 +assert_return(() => invoke($0, `le`, [value("f32", Infinity), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1508 +assert_return(() => invoke($0, `le`, [value("f32", Infinity), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1509 +assert_return(() => invoke($0, `le`, [value("f32", -Infinity), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1510 +assert_return(() => invoke($0, `le`, [value("f32", -Infinity), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1511 +assert_return(() => invoke($0, `le`, [value("f32", Infinity), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1512 +assert_return(() => invoke($0, `le`, [value("f32", Infinity), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1513 +assert_return( + () => invoke($0, `le`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1514 +assert_return( + () => invoke($0, `le`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1515 +assert_return( + () => invoke($0, `le`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1516 +assert_return( + () => invoke($0, `le`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1517 +assert_return( + () => invoke($0, `le`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1518 +assert_return( + () => invoke($0, `le`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1519 +assert_return( + () => invoke($0, `le`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1520 +assert_return( + () => invoke($0, `le`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1521 +assert_return( + () => invoke($0, `le`, [value("f32", -Infinity), value("f32", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1522 +assert_return( + () => invoke($0, `le`, [value("f32", -Infinity), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1523 +assert_return( + () => invoke($0, `le`, [value("f32", Infinity), value("f32", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1524 +assert_return( + () => invoke($0, `le`, [value("f32", Infinity), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1525 +assert_return( + () => invoke($0, `le`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1526 +assert_return( + () => invoke($0, `le`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1527 +assert_return( + () => invoke($0, `le`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1528 +assert_return( + () => invoke($0, `le`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1529 +assert_return( + () => invoke($0, `le`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1530 +assert_return( + () => invoke($0, `le`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1531 +assert_return( + () => invoke($0, `le`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1532 +assert_return( + () => invoke($0, `le`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1533 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1534 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1535 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1536 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1537 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1538 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1539 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1540 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1541 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1542 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1543 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1544 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1545 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1546 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1547 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1548 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1549 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1550 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1551 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1552 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1553 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1554 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1555 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1556 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1557 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1558 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1559 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1560 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1561 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1562 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1563 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1564 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1565 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1566 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1567 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1568 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1569 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1570 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1571 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1572 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1573 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1574 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1575 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1576 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1577 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1578 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1579 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1580 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1581 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1582 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1583 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1584 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1585 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1586 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1587 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1588 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1589 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1590 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1591 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1592 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1593 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1594 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1595 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1596 +assert_return( + () => invoke($0, `le`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1597 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1598 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1599 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1600 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1601 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1602 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1603 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1604 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1605 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1606 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1607 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1608 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1609 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1610 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1611 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1612 +assert_return( + () => invoke($0, `le`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1613 +assert_return(() => invoke($0, `gt`, [value("f32", -0), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1614 +assert_return(() => invoke($0, `gt`, [value("f32", -0), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1615 +assert_return(() => invoke($0, `gt`, [value("f32", 0), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1616 +assert_return(() => invoke($0, `gt`, [value("f32", 0), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1617 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1618 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1619 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1620 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1621 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1622 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1623 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1624 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1625 +assert_return(() => invoke($0, `gt`, [value("f32", -0), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1626 +assert_return(() => invoke($0, `gt`, [value("f32", -0), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1627 +assert_return(() => invoke($0, `gt`, [value("f32", 0), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1628 +assert_return(() => invoke($0, `gt`, [value("f32", 0), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1629 +assert_return(() => invoke($0, `gt`, [value("f32", -0), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1630 +assert_return(() => invoke($0, `gt`, [value("f32", -0), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1631 +assert_return(() => invoke($0, `gt`, [value("f32", 0), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1632 +assert_return(() => invoke($0, `gt`, [value("f32", 0), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1633 +assert_return(() => invoke($0, `gt`, [value("f32", -0), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1634 +assert_return(() => invoke($0, `gt`, [value("f32", -0), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1635 +assert_return(() => invoke($0, `gt`, [value("f32", 0), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1636 +assert_return(() => invoke($0, `gt`, [value("f32", 0), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1637 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1638 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1639 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1640 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1641 +assert_return(() => invoke($0, `gt`, [value("f32", -0), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1642 +assert_return(() => invoke($0, `gt`, [value("f32", -0), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1643 +assert_return(() => invoke($0, `gt`, [value("f32", 0), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1644 +assert_return(() => invoke($0, `gt`, [value("f32", 0), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1645 +assert_return( + () => invoke($0, `gt`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1646 +assert_return( + () => invoke($0, `gt`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1647 +assert_return( + () => invoke($0, `gt`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1648 +assert_return( + () => invoke($0, `gt`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1649 +assert_return( + () => invoke($0, `gt`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1650 +assert_return( + () => invoke($0, `gt`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1651 +assert_return( + () => invoke($0, `gt`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1652 +assert_return( + () => invoke($0, `gt`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1653 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1654 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1655 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1656 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1657 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1658 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1659 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1660 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1661 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1662 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1663 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1664 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1665 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1666 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1667 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1668 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1669 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1670 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1671 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1672 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1673 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1674 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1675 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1676 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1677 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1678 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1679 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1680 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1681 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1682 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1683 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1684 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1685 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1686 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1687 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1688 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1689 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1690 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1691 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1692 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1693 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1694 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1695 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1696 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1697 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1698 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1699 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1700 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1701 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1702 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1703 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1704 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1705 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1706 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1707 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1708 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1709 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1710 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1711 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1712 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1713 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1714 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1715 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1716 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1717 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1718 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1719 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1720 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1721 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1722 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1723 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1724 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1725 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1726 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1727 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1728 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1729 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1730 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1731 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1732 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1733 +assert_return(() => invoke($0, `gt`, [value("f32", -0.5), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1734 +assert_return(() => invoke($0, `gt`, [value("f32", -0.5), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1735 +assert_return(() => invoke($0, `gt`, [value("f32", 0.5), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1736 +assert_return(() => invoke($0, `gt`, [value("f32", 0.5), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1737 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1738 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1739 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1740 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1741 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1742 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1743 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1744 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1745 +assert_return(() => invoke($0, `gt`, [value("f32", -0.5), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1746 +assert_return(() => invoke($0, `gt`, [value("f32", -0.5), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1747 +assert_return(() => invoke($0, `gt`, [value("f32", 0.5), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1748 +assert_return(() => invoke($0, `gt`, [value("f32", 0.5), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1749 +assert_return(() => invoke($0, `gt`, [value("f32", -0.5), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1750 +assert_return(() => invoke($0, `gt`, [value("f32", -0.5), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1751 +assert_return(() => invoke($0, `gt`, [value("f32", 0.5), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1752 +assert_return(() => invoke($0, `gt`, [value("f32", 0.5), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1753 +assert_return(() => invoke($0, `gt`, [value("f32", -0.5), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1754 +assert_return(() => invoke($0, `gt`, [value("f32", -0.5), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1755 +assert_return(() => invoke($0, `gt`, [value("f32", 0.5), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1756 +assert_return(() => invoke($0, `gt`, [value("f32", 0.5), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1757 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1758 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1759 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1760 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1761 +assert_return(() => invoke($0, `gt`, [value("f32", -0.5), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1762 +assert_return(() => invoke($0, `gt`, [value("f32", -0.5), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1763 +assert_return(() => invoke($0, `gt`, [value("f32", 0.5), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1764 +assert_return(() => invoke($0, `gt`, [value("f32", 0.5), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1765 +assert_return( + () => invoke($0, `gt`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1766 +assert_return( + () => invoke($0, `gt`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1767 +assert_return( + () => invoke($0, `gt`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1768 +assert_return( + () => invoke($0, `gt`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1769 +assert_return( + () => invoke($0, `gt`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1770 +assert_return( + () => invoke($0, `gt`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1771 +assert_return( + () => invoke($0, `gt`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1772 +assert_return( + () => invoke($0, `gt`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1773 +assert_return(() => invoke($0, `gt`, [value("f32", -1), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1774 +assert_return(() => invoke($0, `gt`, [value("f32", -1), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1775 +assert_return(() => invoke($0, `gt`, [value("f32", 1), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1776 +assert_return(() => invoke($0, `gt`, [value("f32", 1), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1777 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1778 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1779 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1780 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1781 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1782 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1783 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1784 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1785 +assert_return(() => invoke($0, `gt`, [value("f32", -1), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1786 +assert_return(() => invoke($0, `gt`, [value("f32", -1), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1787 +assert_return(() => invoke($0, `gt`, [value("f32", 1), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1788 +assert_return(() => invoke($0, `gt`, [value("f32", 1), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1789 +assert_return(() => invoke($0, `gt`, [value("f32", -1), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1790 +assert_return(() => invoke($0, `gt`, [value("f32", -1), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1791 +assert_return(() => invoke($0, `gt`, [value("f32", 1), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1792 +assert_return(() => invoke($0, `gt`, [value("f32", 1), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1793 +assert_return(() => invoke($0, `gt`, [value("f32", -1), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1794 +assert_return(() => invoke($0, `gt`, [value("f32", -1), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1795 +assert_return(() => invoke($0, `gt`, [value("f32", 1), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1796 +assert_return(() => invoke($0, `gt`, [value("f32", 1), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1797 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1798 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1799 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1800 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1801 +assert_return(() => invoke($0, `gt`, [value("f32", -1), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1802 +assert_return(() => invoke($0, `gt`, [value("f32", -1), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1803 +assert_return(() => invoke($0, `gt`, [value("f32", 1), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1804 +assert_return(() => invoke($0, `gt`, [value("f32", 1), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1805 +assert_return( + () => invoke($0, `gt`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1806 +assert_return( + () => invoke($0, `gt`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1807 +assert_return( + () => invoke($0, `gt`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1808 +assert_return( + () => invoke($0, `gt`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1809 +assert_return( + () => invoke($0, `gt`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1810 +assert_return( + () => invoke($0, `gt`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1811 +assert_return( + () => invoke($0, `gt`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1812 +assert_return( + () => invoke($0, `gt`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1813 +assert_return(() => invoke($0, `gt`, [value("f32", -6.2831855), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1814 +assert_return(() => invoke($0, `gt`, [value("f32", -6.2831855), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1815 +assert_return(() => invoke($0, `gt`, [value("f32", 6.2831855), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1816 +assert_return(() => invoke($0, `gt`, [value("f32", 6.2831855), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1817 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1818 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1819 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1820 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1821 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1822 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1823 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1824 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1825 +assert_return(() => invoke($0, `gt`, [value("f32", -6.2831855), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1826 +assert_return(() => invoke($0, `gt`, [value("f32", -6.2831855), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1827 +assert_return(() => invoke($0, `gt`, [value("f32", 6.2831855), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1828 +assert_return(() => invoke($0, `gt`, [value("f32", 6.2831855), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1829 +assert_return(() => invoke($0, `gt`, [value("f32", -6.2831855), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1830 +assert_return(() => invoke($0, `gt`, [value("f32", -6.2831855), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1831 +assert_return(() => invoke($0, `gt`, [value("f32", 6.2831855), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1832 +assert_return(() => invoke($0, `gt`, [value("f32", 6.2831855), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1833 +assert_return( + () => invoke($0, `gt`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1834 +assert_return( + () => invoke($0, `gt`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1835 +assert_return( + () => invoke($0, `gt`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1836 +assert_return( + () => invoke($0, `gt`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1837 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1838 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1839 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1840 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1841 +assert_return( + () => invoke($0, `gt`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1842 +assert_return( + () => invoke($0, `gt`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1843 +assert_return( + () => invoke($0, `gt`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1844 +assert_return( + () => invoke($0, `gt`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1845 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1846 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1847 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1848 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1849 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1850 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1851 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1852 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1853 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1854 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1855 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1856 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1857 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1858 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1859 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1860 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1861 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1862 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1863 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1864 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1865 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1866 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1867 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1868 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1869 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1870 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1871 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1872 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1873 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1874 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1875 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1876 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1877 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1878 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1879 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1880 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1881 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1882 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1883 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1884 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1885 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1886 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1887 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1888 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1889 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1890 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1891 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1892 +assert_return( + () => invoke($0, `gt`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1893 +assert_return(() => invoke($0, `gt`, [value("f32", -Infinity), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1894 +assert_return(() => invoke($0, `gt`, [value("f32", -Infinity), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1895 +assert_return(() => invoke($0, `gt`, [value("f32", Infinity), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1896 +assert_return(() => invoke($0, `gt`, [value("f32", Infinity), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1897 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1898 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1899 +assert_return( + () => invoke($0, `gt`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1900 +assert_return( + () => invoke($0, `gt`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1901 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1902 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1903 +assert_return( + () => invoke($0, `gt`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1904 +assert_return( + () => invoke($0, `gt`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1905 +assert_return(() => invoke($0, `gt`, [value("f32", -Infinity), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1906 +assert_return(() => invoke($0, `gt`, [value("f32", -Infinity), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1907 +assert_return(() => invoke($0, `gt`, [value("f32", Infinity), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1908 +assert_return(() => invoke($0, `gt`, [value("f32", Infinity), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1909 +assert_return(() => invoke($0, `gt`, [value("f32", -Infinity), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1910 +assert_return(() => invoke($0, `gt`, [value("f32", -Infinity), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:1911 +assert_return(() => invoke($0, `gt`, [value("f32", Infinity), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1912 +assert_return(() => invoke($0, `gt`, [value("f32", Infinity), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:1913 +assert_return( + () => invoke($0, `gt`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1914 +assert_return( + () => invoke($0, `gt`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1915 +assert_return( + () => invoke($0, `gt`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1916 +assert_return( + () => invoke($0, `gt`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1917 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1918 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1919 +assert_return( + () => invoke($0, `gt`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1920 +assert_return( + () => invoke($0, `gt`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1921 +assert_return( + () => invoke($0, `gt`, [value("f32", -Infinity), value("f32", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1922 +assert_return( + () => invoke($0, `gt`, [value("f32", -Infinity), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1923 +assert_return( + () => invoke($0, `gt`, [value("f32", Infinity), value("f32", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:1924 +assert_return( + () => invoke($0, `gt`, [value("f32", Infinity), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1925 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1926 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1927 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1928 +assert_return( + () => invoke($0, `gt`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1929 +assert_return( + () => invoke($0, `gt`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1930 +assert_return( + () => invoke($0, `gt`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1931 +assert_return( + () => invoke($0, `gt`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1932 +assert_return( + () => invoke($0, `gt`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1933 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1934 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1935 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1936 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1937 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1938 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1939 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1940 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1941 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1942 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1943 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1944 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1945 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1946 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1947 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1948 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1949 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1950 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1951 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1952 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1953 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1954 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1955 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1956 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1957 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1958 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1959 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1960 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1961 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1962 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1963 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1964 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1965 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1966 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1967 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1968 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1969 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1970 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1971 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1972 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1973 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1974 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1975 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1976 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1977 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1978 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1979 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1980 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1981 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1982 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1983 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1984 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1985 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1986 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1987 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1988 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1989 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1990 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1991 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1992 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1993 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1994 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1995 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1996 +assert_return( + () => invoke($0, `gt`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1997 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1998 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:1999 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2000 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2001 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2002 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2003 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2004 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2005 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2006 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2007 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2008 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2009 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2010 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2011 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2012 +assert_return( + () => invoke($0, `gt`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2013 +assert_return(() => invoke($0, `ge`, [value("f32", -0), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2014 +assert_return(() => invoke($0, `ge`, [value("f32", -0), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2015 +assert_return(() => invoke($0, `ge`, [value("f32", 0), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2016 +assert_return(() => invoke($0, `ge`, [value("f32", 0), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2017 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2018 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2019 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2020 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2021 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2022 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2023 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2024 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2025 +assert_return(() => invoke($0, `ge`, [value("f32", -0), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2026 +assert_return(() => invoke($0, `ge`, [value("f32", -0), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2027 +assert_return(() => invoke($0, `ge`, [value("f32", 0), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2028 +assert_return(() => invoke($0, `ge`, [value("f32", 0), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2029 +assert_return(() => invoke($0, `ge`, [value("f32", -0), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2030 +assert_return(() => invoke($0, `ge`, [value("f32", -0), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2031 +assert_return(() => invoke($0, `ge`, [value("f32", 0), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2032 +assert_return(() => invoke($0, `ge`, [value("f32", 0), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2033 +assert_return(() => invoke($0, `ge`, [value("f32", -0), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2034 +assert_return(() => invoke($0, `ge`, [value("f32", -0), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2035 +assert_return(() => invoke($0, `ge`, [value("f32", 0), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2036 +assert_return(() => invoke($0, `ge`, [value("f32", 0), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2037 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2038 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2039 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2040 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2041 +assert_return(() => invoke($0, `ge`, [value("f32", -0), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2042 +assert_return(() => invoke($0, `ge`, [value("f32", -0), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2043 +assert_return(() => invoke($0, `ge`, [value("f32", 0), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2044 +assert_return(() => invoke($0, `ge`, [value("f32", 0), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2045 +assert_return( + () => invoke($0, `ge`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2046 +assert_return( + () => invoke($0, `ge`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2047 +assert_return( + () => invoke($0, `ge`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2048 +assert_return( + () => invoke($0, `ge`, [value("f32", -0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2049 +assert_return( + () => invoke($0, `ge`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2050 +assert_return( + () => invoke($0, `ge`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2051 +assert_return( + () => invoke($0, `ge`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2052 +assert_return( + () => invoke($0, `ge`, [value("f32", 0), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2053 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2054 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2055 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2056 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2057 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2058 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2059 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2060 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2061 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2062 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2063 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2064 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2065 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2066 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2067 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2068 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2069 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2070 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2071 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2072 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2073 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2074 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2075 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2076 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2077 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2078 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2079 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2080 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2081 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2082 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2083 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2084 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2085 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2086 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2087 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2088 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2089 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2090 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2091 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2092 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2093 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2094 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2095 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2096 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2097 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2098 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2099 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2100 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2101 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2102 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2103 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2104 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2105 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2106 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2107 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2108 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2109 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2110 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2111 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2112 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2113 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2114 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2115 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2116 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2117 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2118 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2119 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2120 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2121 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2122 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2123 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2124 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2125 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2126 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2127 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2128 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2129 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2130 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2131 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2132 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2133 +assert_return(() => invoke($0, `ge`, [value("f32", -0.5), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2134 +assert_return(() => invoke($0, `ge`, [value("f32", -0.5), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2135 +assert_return(() => invoke($0, `ge`, [value("f32", 0.5), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2136 +assert_return(() => invoke($0, `ge`, [value("f32", 0.5), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2137 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2138 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2139 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2140 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2141 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2142 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2143 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.5), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2144 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.5), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2145 +assert_return(() => invoke($0, `ge`, [value("f32", -0.5), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2146 +assert_return(() => invoke($0, `ge`, [value("f32", -0.5), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2147 +assert_return(() => invoke($0, `ge`, [value("f32", 0.5), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2148 +assert_return(() => invoke($0, `ge`, [value("f32", 0.5), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2149 +assert_return(() => invoke($0, `ge`, [value("f32", -0.5), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2150 +assert_return(() => invoke($0, `ge`, [value("f32", -0.5), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2151 +assert_return(() => invoke($0, `ge`, [value("f32", 0.5), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2152 +assert_return(() => invoke($0, `ge`, [value("f32", 0.5), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2153 +assert_return(() => invoke($0, `ge`, [value("f32", -0.5), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2154 +assert_return(() => invoke($0, `ge`, [value("f32", -0.5), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2155 +assert_return(() => invoke($0, `ge`, [value("f32", 0.5), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2156 +assert_return(() => invoke($0, `ge`, [value("f32", 0.5), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2157 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2158 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2159 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.5), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2160 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 0.5), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2161 +assert_return(() => invoke($0, `ge`, [value("f32", -0.5), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2162 +assert_return(() => invoke($0, `ge`, [value("f32", -0.5), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2163 +assert_return(() => invoke($0, `ge`, [value("f32", 0.5), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2164 +assert_return(() => invoke($0, `ge`, [value("f32", 0.5), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2165 +assert_return( + () => invoke($0, `ge`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2166 +assert_return( + () => invoke($0, `ge`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2167 +assert_return( + () => invoke($0, `ge`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2168 +assert_return( + () => invoke($0, `ge`, [value("f32", -0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2169 +assert_return( + () => invoke($0, `ge`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2170 +assert_return( + () => invoke($0, `ge`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2171 +assert_return( + () => invoke($0, `ge`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2172 +assert_return( + () => invoke($0, `ge`, [value("f32", 0.5), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2173 +assert_return(() => invoke($0, `ge`, [value("f32", -1), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2174 +assert_return(() => invoke($0, `ge`, [value("f32", -1), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2175 +assert_return(() => invoke($0, `ge`, [value("f32", 1), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2176 +assert_return(() => invoke($0, `ge`, [value("f32", 1), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2177 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2178 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2179 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2180 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2181 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2182 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2183 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 1), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2184 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2185 +assert_return(() => invoke($0, `ge`, [value("f32", -1), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2186 +assert_return(() => invoke($0, `ge`, [value("f32", -1), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2187 +assert_return(() => invoke($0, `ge`, [value("f32", 1), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2188 +assert_return(() => invoke($0, `ge`, [value("f32", 1), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2189 +assert_return(() => invoke($0, `ge`, [value("f32", -1), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2190 +assert_return(() => invoke($0, `ge`, [value("f32", -1), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2191 +assert_return(() => invoke($0, `ge`, [value("f32", 1), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2192 +assert_return(() => invoke($0, `ge`, [value("f32", 1), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2193 +assert_return(() => invoke($0, `ge`, [value("f32", -1), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2194 +assert_return(() => invoke($0, `ge`, [value("f32", -1), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2195 +assert_return(() => invoke($0, `ge`, [value("f32", 1), value("f32", -6.2831855)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2196 +assert_return(() => invoke($0, `ge`, [value("f32", 1), value("f32", 6.2831855)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2197 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2198 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2199 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 1), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2200 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 1), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2201 +assert_return(() => invoke($0, `ge`, [value("f32", -1), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2202 +assert_return(() => invoke($0, `ge`, [value("f32", -1), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2203 +assert_return(() => invoke($0, `ge`, [value("f32", 1), value("f32", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2204 +assert_return(() => invoke($0, `ge`, [value("f32", 1), value("f32", Infinity)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2205 +assert_return( + () => invoke($0, `ge`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2206 +assert_return( + () => invoke($0, `ge`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2207 +assert_return( + () => invoke($0, `ge`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2208 +assert_return( + () => invoke($0, `ge`, [value("f32", -1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2209 +assert_return( + () => invoke($0, `ge`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2210 +assert_return( + () => invoke($0, `ge`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2211 +assert_return( + () => invoke($0, `ge`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2212 +assert_return( + () => invoke($0, `ge`, [value("f32", 1), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2213 +assert_return(() => invoke($0, `ge`, [value("f32", -6.2831855), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2214 +assert_return(() => invoke($0, `ge`, [value("f32", -6.2831855), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2215 +assert_return(() => invoke($0, `ge`, [value("f32", 6.2831855), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2216 +assert_return(() => invoke($0, `ge`, [value("f32", 6.2831855), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2217 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2218 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2219 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2220 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2221 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2222 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2223 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 6.2831855), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2224 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 6.2831855), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2225 +assert_return(() => invoke($0, `ge`, [value("f32", -6.2831855), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2226 +assert_return(() => invoke($0, `ge`, [value("f32", -6.2831855), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2227 +assert_return(() => invoke($0, `ge`, [value("f32", 6.2831855), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2228 +assert_return(() => invoke($0, `ge`, [value("f32", 6.2831855), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2229 +assert_return(() => invoke($0, `ge`, [value("f32", -6.2831855), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2230 +assert_return(() => invoke($0, `ge`, [value("f32", -6.2831855), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2231 +assert_return(() => invoke($0, `ge`, [value("f32", 6.2831855), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2232 +assert_return(() => invoke($0, `ge`, [value("f32", 6.2831855), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2233 +assert_return( + () => invoke($0, `ge`, [value("f32", -6.2831855), value("f32", -6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2234 +assert_return( + () => invoke($0, `ge`, [value("f32", -6.2831855), value("f32", 6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2235 +assert_return( + () => invoke($0, `ge`, [value("f32", 6.2831855), value("f32", -6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2236 +assert_return( + () => invoke($0, `ge`, [value("f32", 6.2831855), value("f32", 6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2237 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2238 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2239 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 6.2831855), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2240 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 6.2831855), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2241 +assert_return( + () => invoke($0, `ge`, [value("f32", -6.2831855), value("f32", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2242 +assert_return( + () => invoke($0, `ge`, [value("f32", -6.2831855), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2243 +assert_return( + () => invoke($0, `ge`, [value("f32", 6.2831855), value("f32", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2244 +assert_return( + () => invoke($0, `ge`, [value("f32", 6.2831855), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2245 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2246 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2247 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2248 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2249 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2250 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2251 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2252 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 6.2831855), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2253 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2254 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2255 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2256 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2257 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2258 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2259 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2260 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2261 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2262 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2263 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2264 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2265 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2266 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2267 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2268 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2269 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2270 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2271 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2272 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2273 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2274 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2275 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2276 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 6.2831855), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2277 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2278 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2279 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2280 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2281 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2282 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2283 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2284 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2285 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2286 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2287 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2288 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2289 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2290 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2291 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2292 +assert_return( + () => invoke($0, `ge`, [ + value("f32", 340282350000000000000000000000000000000), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2293 +assert_return(() => invoke($0, `ge`, [value("f32", -Infinity), value("f32", -0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2294 +assert_return(() => invoke($0, `ge`, [value("f32", -Infinity), value("f32", 0)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2295 +assert_return(() => invoke($0, `ge`, [value("f32", Infinity), value("f32", -0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2296 +assert_return(() => invoke($0, `ge`, [value("f32", Infinity), value("f32", 0)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2297 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2298 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2299 +assert_return( + () => invoke($0, `ge`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2300 +assert_return( + () => invoke($0, `ge`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2301 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2302 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2303 +assert_return( + () => invoke($0, `ge`, [ + value("f32", Infinity), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2304 +assert_return( + () => invoke($0, `ge`, [ + value("f32", Infinity), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2305 +assert_return(() => invoke($0, `ge`, [value("f32", -Infinity), value("f32", -0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2306 +assert_return(() => invoke($0, `ge`, [value("f32", -Infinity), value("f32", 0.5)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2307 +assert_return(() => invoke($0, `ge`, [value("f32", Infinity), value("f32", -0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2308 +assert_return(() => invoke($0, `ge`, [value("f32", Infinity), value("f32", 0.5)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2309 +assert_return(() => invoke($0, `ge`, [value("f32", -Infinity), value("f32", -1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2310 +assert_return(() => invoke($0, `ge`, [value("f32", -Infinity), value("f32", 1)]), [value("i32", 0)]); + +// ./test/core/f32_cmp.wast:2311 +assert_return(() => invoke($0, `ge`, [value("f32", Infinity), value("f32", -1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2312 +assert_return(() => invoke($0, `ge`, [value("f32", Infinity), value("f32", 1)]), [value("i32", 1)]); + +// ./test/core/f32_cmp.wast:2313 +assert_return( + () => invoke($0, `ge`, [value("f32", -Infinity), value("f32", -6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2314 +assert_return( + () => invoke($0, `ge`, [value("f32", -Infinity), value("f32", 6.2831855)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2315 +assert_return( + () => invoke($0, `ge`, [value("f32", Infinity), value("f32", -6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2316 +assert_return( + () => invoke($0, `ge`, [value("f32", Infinity), value("f32", 6.2831855)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2317 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2318 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2319 +assert_return( + () => invoke($0, `ge`, [ + value("f32", Infinity), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2320 +assert_return( + () => invoke($0, `ge`, [ + value("f32", Infinity), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2321 +assert_return( + () => invoke($0, `ge`, [value("f32", -Infinity), value("f32", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2322 +assert_return( + () => invoke($0, `ge`, [value("f32", -Infinity), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2323 +assert_return( + () => invoke($0, `ge`, [value("f32", Infinity), value("f32", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2324 +assert_return( + () => invoke($0, `ge`, [value("f32", Infinity), value("f32", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f32_cmp.wast:2325 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2326 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2327 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2328 +assert_return( + () => invoke($0, `ge`, [ + value("f32", -Infinity), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2329 +assert_return( + () => invoke($0, `ge`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2330 +assert_return( + () => invoke($0, `ge`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2331 +assert_return( + () => invoke($0, `ge`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2332 +assert_return( + () => invoke($0, `ge`, [value("f32", Infinity), bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2333 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2334 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2335 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2336 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2337 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2338 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2339 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2340 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2341 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2342 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2343 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2344 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2345 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2346 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2347 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2348 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2349 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2350 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2351 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2352 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2353 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2354 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2355 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2356 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2357 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2358 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2359 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2360 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2361 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2362 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2363 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2364 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2365 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2366 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2367 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2368 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2369 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2370 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", -1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2371 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2372 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2373 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2374 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2375 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2376 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2377 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2378 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2379 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2380 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 6.2831855), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2381 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2382 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2383 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2384 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2385 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2386 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2387 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2388 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2389 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2390 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2391 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2392 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2393 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2394 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + value("f32", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2395 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2396 +assert_return( + () => invoke($0, `ge`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), value("f32", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2397 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2398 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2399 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2400 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2401 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2402 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2403 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2404 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2405 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2406 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2407 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2408 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2409 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2410 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2411 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2412 +assert_return( + () => invoke($0, `ge`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f32_cmp.wast:2417 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.eq (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32_cmp.wast:2418 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.ge (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32_cmp.wast:2419 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.gt (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32_cmp.wast:2420 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.le (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32_cmp.wast:2421 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.lt (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f32_cmp.wast:2422 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32.ne (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/f64.wast.js b/js/src/jit-test/tests/wasm/spec/spec/f64.wast.js new file mode 100644 index 0000000000..6bce2a366e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/f64.wast.js @@ -0,0 +1,20658 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/f64.wast + +// ./test/core/f64.wast:5 +let $0 = instantiate(`(module + (func (export "add") (param $$x f64) (param $$y f64) (result f64) (f64.add (local.get $$x) (local.get $$y))) + (func (export "sub") (param $$x f64) (param $$y f64) (result f64) (f64.sub (local.get $$x) (local.get $$y))) + (func (export "mul") (param $$x f64) (param $$y f64) (result f64) (f64.mul (local.get $$x) (local.get $$y))) + (func (export "div") (param $$x f64) (param $$y f64) (result f64) (f64.div (local.get $$x) (local.get $$y))) + (func (export "sqrt") (param $$x f64) (result f64) (f64.sqrt (local.get $$x))) + (func (export "min") (param $$x f64) (param $$y f64) (result f64) (f64.min (local.get $$x) (local.get $$y))) + (func (export "max") (param $$x f64) (param $$y f64) (result f64) (f64.max (local.get $$x) (local.get $$y))) + (func (export "ceil") (param $$x f64) (result f64) (f64.ceil (local.get $$x))) + (func (export "floor") (param $$x f64) (result f64) (f64.floor (local.get $$x))) + (func (export "trunc") (param $$x f64) (result f64) (f64.trunc (local.get $$x))) + (func (export "nearest") (param $$x f64) (result f64) (f64.nearest (local.get $$x))) +)`); + +// ./test/core/f64.wast:19 +assert_return(() => invoke($0, `add`, [value("f64", -0), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:20 +assert_return(() => invoke($0, `add`, [value("f64", -0), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:21 +assert_return(() => invoke($0, `add`, [value("f64", 0), value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:22 +assert_return(() => invoke($0, `add`, [value("f64", 0), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:23 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:24 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:25 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:26 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:27 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:28 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:29 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:30 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:31 +assert_return(() => invoke($0, `add`, [value("f64", -0), value("f64", -0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:32 +assert_return(() => invoke($0, `add`, [value("f64", -0), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:33 +assert_return(() => invoke($0, `add`, [value("f64", 0), value("f64", -0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:34 +assert_return(() => invoke($0, `add`, [value("f64", 0), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:35 +assert_return(() => invoke($0, `add`, [value("f64", -0), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:36 +assert_return(() => invoke($0, `add`, [value("f64", -0), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:37 +assert_return(() => invoke($0, `add`, [value("f64", 0), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:38 +assert_return(() => invoke($0, `add`, [value("f64", 0), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:39 +assert_return( + () => invoke($0, `add`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:40 +assert_return( + () => invoke($0, `add`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:41 +assert_return( + () => invoke($0, `add`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:42 +assert_return( + () => invoke($0, `add`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:43 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:44 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:45 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:46 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:47 +assert_return( + () => invoke($0, `add`, [value("f64", -0), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:48 +assert_return( + () => invoke($0, `add`, [value("f64", -0), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:49 +assert_return( + () => invoke($0, `add`, [value("f64", 0), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:50 +assert_return( + () => invoke($0, `add`, [value("f64", 0), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:51 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:52 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:53 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:54 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:55 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:56 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:57 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:58 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:59 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:60 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:61 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:62 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:63 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/f64.wast:64 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:65 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:66 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/f64.wast:67 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ], +); + +// ./test/core/f64.wast:68 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ], +); + +// ./test/core/f64.wast:69 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ], +); + +// ./test/core/f64.wast:70 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ], +); + +// ./test/core/f64.wast:71 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:72 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:73 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:74 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:75 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:76 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:77 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:78 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:79 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:80 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:81 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:82 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:83 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:84 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:85 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:86 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:87 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:88 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:89 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:90 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:91 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:92 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:93 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:94 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:95 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:96 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:97 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:98 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:99 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:100 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:101 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:102 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:103 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ], +); + +// ./test/core/f64.wast:104 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ], +); + +// ./test/core/f64.wast:105 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ], +); + +// ./test/core/f64.wast:106 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ], +); + +// ./test/core/f64.wast:107 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ], +); + +// ./test/core/f64.wast:108 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:109 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:110 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ], +); + +// ./test/core/f64.wast:111 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:112 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:113 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:114 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:115 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:116 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:117 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:118 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:119 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:120 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:121 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:122 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:123 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:124 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:125 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:126 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:127 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:128 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:129 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:130 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:131 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:132 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:133 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:134 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:135 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:136 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:137 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:138 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:139 +assert_return(() => invoke($0, `add`, [value("f64", -0.5), value("f64", -0)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:140 +assert_return(() => invoke($0, `add`, [value("f64", -0.5), value("f64", 0)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:141 +assert_return(() => invoke($0, `add`, [value("f64", 0.5), value("f64", -0)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:142 +assert_return(() => invoke($0, `add`, [value("f64", 0.5), value("f64", 0)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:143 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:144 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:145 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:146 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:147 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:148 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:149 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:150 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:151 +assert_return(() => invoke($0, `add`, [value("f64", -0.5), value("f64", -0.5)]), [value("f64", -1)]); + +// ./test/core/f64.wast:152 +assert_return(() => invoke($0, `add`, [value("f64", -0.5), value("f64", 0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:153 +assert_return(() => invoke($0, `add`, [value("f64", 0.5), value("f64", -0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:154 +assert_return(() => invoke($0, `add`, [value("f64", 0.5), value("f64", 0.5)]), [value("f64", 1)]); + +// ./test/core/f64.wast:155 +assert_return(() => invoke($0, `add`, [value("f64", -0.5), value("f64", -1)]), [value("f64", -1.5)]); + +// ./test/core/f64.wast:156 +assert_return(() => invoke($0, `add`, [value("f64", -0.5), value("f64", 1)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:157 +assert_return(() => invoke($0, `add`, [value("f64", 0.5), value("f64", -1)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:158 +assert_return(() => invoke($0, `add`, [value("f64", 0.5), value("f64", 1)]), [value("f64", 1.5)]); + +// ./test/core/f64.wast:159 +assert_return( + () => invoke($0, `add`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("f64", -6.783185307179586)], +); + +// ./test/core/f64.wast:160 +assert_return( + () => invoke($0, `add`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("f64", 5.783185307179586)], +); + +// ./test/core/f64.wast:161 +assert_return( + () => invoke($0, `add`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("f64", -5.783185307179586)], +); + +// ./test/core/f64.wast:162 +assert_return( + () => invoke($0, `add`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("f64", 6.783185307179586)], +); + +// ./test/core/f64.wast:163 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:164 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:165 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:166 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:167 +assert_return( + () => invoke($0, `add`, [value("f64", -0.5), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:168 +assert_return( + () => invoke($0, `add`, [value("f64", -0.5), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:169 +assert_return( + () => invoke($0, `add`, [value("f64", 0.5), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:170 +assert_return( + () => invoke($0, `add`, [value("f64", 0.5), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:171 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:172 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:173 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:174 +assert_return( + () => invoke($0, `add`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:175 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:176 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:177 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:178 +assert_return( + () => invoke($0, `add`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:179 +assert_return(() => invoke($0, `add`, [value("f64", -1), value("f64", -0)]), [value("f64", -1)]); + +// ./test/core/f64.wast:180 +assert_return(() => invoke($0, `add`, [value("f64", -1), value("f64", 0)]), [value("f64", -1)]); + +// ./test/core/f64.wast:181 +assert_return(() => invoke($0, `add`, [value("f64", 1), value("f64", -0)]), [value("f64", 1)]); + +// ./test/core/f64.wast:182 +assert_return(() => invoke($0, `add`, [value("f64", 1), value("f64", 0)]), [value("f64", 1)]); + +// ./test/core/f64.wast:183 +assert_return( + () => invoke($0, `add`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:184 +assert_return( + () => invoke($0, `add`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:185 +assert_return( + () => invoke($0, `add`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:186 +assert_return( + () => invoke($0, `add`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:187 +assert_return( + () => invoke($0, `add`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:188 +assert_return( + () => invoke($0, `add`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:189 +assert_return( + () => invoke($0, `add`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:190 +assert_return( + () => invoke($0, `add`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:191 +assert_return(() => invoke($0, `add`, [value("f64", -1), value("f64", -0.5)]), [value("f64", -1.5)]); + +// ./test/core/f64.wast:192 +assert_return(() => invoke($0, `add`, [value("f64", -1), value("f64", 0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:193 +assert_return(() => invoke($0, `add`, [value("f64", 1), value("f64", -0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:194 +assert_return(() => invoke($0, `add`, [value("f64", 1), value("f64", 0.5)]), [value("f64", 1.5)]); + +// ./test/core/f64.wast:195 +assert_return(() => invoke($0, `add`, [value("f64", -1), value("f64", -1)]), [value("f64", -2)]); + +// ./test/core/f64.wast:196 +assert_return(() => invoke($0, `add`, [value("f64", -1), value("f64", 1)]), [value("f64", 0)]); + +// ./test/core/f64.wast:197 +assert_return(() => invoke($0, `add`, [value("f64", 1), value("f64", -1)]), [value("f64", 0)]); + +// ./test/core/f64.wast:198 +assert_return(() => invoke($0, `add`, [value("f64", 1), value("f64", 1)]), [value("f64", 2)]); + +// ./test/core/f64.wast:199 +assert_return( + () => invoke($0, `add`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("f64", -7.283185307179586)], +); + +// ./test/core/f64.wast:200 +assert_return( + () => invoke($0, `add`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("f64", 5.283185307179586)], +); + +// ./test/core/f64.wast:201 +assert_return( + () => invoke($0, `add`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("f64", -5.283185307179586)], +); + +// ./test/core/f64.wast:202 +assert_return( + () => invoke($0, `add`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("f64", 7.283185307179586)], +); + +// ./test/core/f64.wast:203 +assert_return( + () => invoke($0, `add`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:204 +assert_return( + () => invoke($0, `add`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:205 +assert_return( + () => invoke($0, `add`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:206 +assert_return( + () => invoke($0, `add`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:207 +assert_return( + () => invoke($0, `add`, [value("f64", -1), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:208 +assert_return( + () => invoke($0, `add`, [value("f64", -1), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:209 +assert_return( + () => invoke($0, `add`, [value("f64", 1), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:210 +assert_return( + () => invoke($0, `add`, [value("f64", 1), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:211 +assert_return( + () => invoke($0, `add`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:212 +assert_return( + () => invoke($0, `add`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:213 +assert_return( + () => invoke($0, `add`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:214 +assert_return( + () => invoke($0, `add`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:215 +assert_return( + () => invoke($0, `add`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:216 +assert_return( + () => invoke($0, `add`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:217 +assert_return( + () => invoke($0, `add`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:218 +assert_return( + () => invoke($0, `add`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:219 +assert_return( + () => invoke($0, `add`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:220 +assert_return( + () => invoke($0, `add`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:221 +assert_return( + () => invoke($0, `add`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:222 +assert_return( + () => invoke($0, `add`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:223 +assert_return( + () => invoke($0, `add`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:224 +assert_return( + () => invoke($0, `add`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:225 +assert_return( + () => invoke($0, `add`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:226 +assert_return( + () => invoke($0, `add`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:227 +assert_return( + () => invoke($0, `add`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:228 +assert_return( + () => invoke($0, `add`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:229 +assert_return( + () => invoke($0, `add`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:230 +assert_return( + () => invoke($0, `add`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:231 +assert_return( + () => invoke($0, `add`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("f64", -6.783185307179586)], +); + +// ./test/core/f64.wast:232 +assert_return( + () => invoke($0, `add`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("f64", -5.783185307179586)], +); + +// ./test/core/f64.wast:233 +assert_return( + () => invoke($0, `add`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("f64", 5.783185307179586)], +); + +// ./test/core/f64.wast:234 +assert_return( + () => invoke($0, `add`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("f64", 6.783185307179586)], +); + +// ./test/core/f64.wast:235 +assert_return( + () => invoke($0, `add`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("f64", -7.283185307179586)], +); + +// ./test/core/f64.wast:236 +assert_return( + () => invoke($0, `add`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("f64", -5.283185307179586)], +); + +// ./test/core/f64.wast:237 +assert_return( + () => invoke($0, `add`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("f64", 5.283185307179586)], +); + +// ./test/core/f64.wast:238 +assert_return( + () => invoke($0, `add`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("f64", 7.283185307179586)], +); + +// ./test/core/f64.wast:239 +assert_return( + () => invoke($0, `add`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", -12.566370614359172)], +); + +// ./test/core/f64.wast:240 +assert_return( + () => invoke($0, `add`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:241 +assert_return( + () => invoke($0, `add`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:242 +assert_return( + () => invoke($0, `add`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", 12.566370614359172)], +); + +// ./test/core/f64.wast:243 +assert_return( + () => invoke($0, `add`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:244 +assert_return( + () => invoke($0, `add`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:245 +assert_return( + () => invoke($0, `add`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:246 +assert_return( + () => invoke($0, `add`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:247 +assert_return( + () => invoke($0, `add`, [value("f64", -6.283185307179586), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:248 +assert_return( + () => invoke($0, `add`, [value("f64", -6.283185307179586), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:249 +assert_return( + () => invoke($0, `add`, [value("f64", 6.283185307179586), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:250 +assert_return( + () => invoke($0, `add`, [value("f64", 6.283185307179586), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:251 +assert_return( + () => invoke($0, `add`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:252 +assert_return( + () => invoke($0, `add`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:253 +assert_return( + () => invoke($0, `add`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:254 +assert_return( + () => invoke($0, `add`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:255 +assert_return( + () => invoke($0, `add`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:256 +assert_return( + () => invoke($0, `add`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:257 +assert_return( + () => invoke($0, `add`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:258 +assert_return( + () => invoke($0, `add`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:259 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:260 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:261 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:262 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:263 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:264 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:265 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:266 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:267 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:268 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:269 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:270 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:271 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:272 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:273 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:274 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:275 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:276 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:277 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:278 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:279 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:280 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:281 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:282 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:283 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:284 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:285 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:286 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:287 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:288 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:289 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:290 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:291 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:292 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:293 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:294 +assert_return( + () => invoke($0, `add`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:295 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:296 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:297 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:298 +assert_return( + () => invoke($0, `add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:299 +assert_return( + () => invoke($0, `add`, [value("f64", -Infinity), value("f64", -0)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:300 +assert_return( + () => invoke($0, `add`, [value("f64", -Infinity), value("f64", 0)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:301 +assert_return( + () => invoke($0, `add`, [value("f64", Infinity), value("f64", -0)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:302 +assert_return( + () => invoke($0, `add`, [value("f64", Infinity), value("f64", 0)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:303 +assert_return( + () => invoke($0, `add`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:304 +assert_return( + () => invoke($0, `add`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:305 +assert_return( + () => invoke($0, `add`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:306 +assert_return( + () => invoke($0, `add`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:307 +assert_return( + () => invoke($0, `add`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:308 +assert_return( + () => invoke($0, `add`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:309 +assert_return( + () => invoke($0, `add`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:310 +assert_return( + () => invoke($0, `add`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:311 +assert_return( + () => invoke($0, `add`, [value("f64", -Infinity), value("f64", -0.5)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:312 +assert_return( + () => invoke($0, `add`, [value("f64", -Infinity), value("f64", 0.5)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:313 +assert_return( + () => invoke($0, `add`, [value("f64", Infinity), value("f64", -0.5)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:314 +assert_return( + () => invoke($0, `add`, [value("f64", Infinity), value("f64", 0.5)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:315 +assert_return( + () => invoke($0, `add`, [value("f64", -Infinity), value("f64", -1)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:316 +assert_return( + () => invoke($0, `add`, [value("f64", -Infinity), value("f64", 1)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:317 +assert_return( + () => invoke($0, `add`, [value("f64", Infinity), value("f64", -1)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:318 +assert_return( + () => invoke($0, `add`, [value("f64", Infinity), value("f64", 1)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:319 +assert_return( + () => invoke($0, `add`, [value("f64", -Infinity), value("f64", -6.283185307179586)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:320 +assert_return( + () => invoke($0, `add`, [value("f64", -Infinity), value("f64", 6.283185307179586)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:321 +assert_return( + () => invoke($0, `add`, [value("f64", Infinity), value("f64", -6.283185307179586)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:322 +assert_return( + () => invoke($0, `add`, [value("f64", Infinity), value("f64", 6.283185307179586)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:323 +assert_return( + () => invoke($0, `add`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:324 +assert_return( + () => invoke($0, `add`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:325 +assert_return( + () => invoke($0, `add`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:326 +assert_return( + () => invoke($0, `add`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:327 +assert_return( + () => invoke($0, `add`, [value("f64", -Infinity), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:328 +assert_return( + () => invoke($0, `add`, [value("f64", -Infinity), value("f64", Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:329 +assert_return( + () => invoke($0, `add`, [value("f64", Infinity), value("f64", -Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:330 +assert_return( + () => invoke($0, `add`, [value("f64", Infinity), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:331 +assert_return( + () => invoke($0, `add`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:332 +assert_return( + () => invoke($0, `add`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:333 +assert_return( + () => invoke($0, `add`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:334 +assert_return( + () => invoke($0, `add`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:335 +assert_return( + () => invoke($0, `add`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:336 +assert_return( + () => invoke($0, `add`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:337 +assert_return( + () => invoke($0, `add`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:338 +assert_return( + () => invoke($0, `add`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:339 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:340 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:341 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:342 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:343 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:344 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:345 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:346 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:347 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:348 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:349 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:350 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:351 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:352 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:353 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:354 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:355 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:356 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:357 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:358 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:359 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:360 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:361 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:362 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:363 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:364 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:365 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:366 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:367 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:368 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:369 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:370 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:371 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:372 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:373 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:374 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:375 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:376 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:377 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:378 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:379 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:380 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:381 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:382 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:383 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:384 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:385 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:386 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:387 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:388 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:389 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:390 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:391 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:392 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:393 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:394 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:395 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:396 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:397 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:398 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:399 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:400 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:401 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:402 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:403 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:404 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:405 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:406 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:407 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:408 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:409 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:410 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:411 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:412 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:413 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:414 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:415 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:416 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:417 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:418 +assert_return( + () => invoke($0, `add`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:419 +assert_return(() => invoke($0, `sub`, [value("f64", -0), value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:420 +assert_return(() => invoke($0, `sub`, [value("f64", -0), value("f64", 0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:421 +assert_return(() => invoke($0, `sub`, [value("f64", 0), value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:422 +assert_return(() => invoke($0, `sub`, [value("f64", 0), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:423 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:424 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:425 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:426 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:427 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:428 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:429 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:430 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:431 +assert_return(() => invoke($0, `sub`, [value("f64", -0), value("f64", -0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:432 +assert_return(() => invoke($0, `sub`, [value("f64", -0), value("f64", 0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:433 +assert_return(() => invoke($0, `sub`, [value("f64", 0), value("f64", -0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:434 +assert_return(() => invoke($0, `sub`, [value("f64", 0), value("f64", 0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:435 +assert_return(() => invoke($0, `sub`, [value("f64", -0), value("f64", -1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:436 +assert_return(() => invoke($0, `sub`, [value("f64", -0), value("f64", 1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:437 +assert_return(() => invoke($0, `sub`, [value("f64", 0), value("f64", -1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:438 +assert_return(() => invoke($0, `sub`, [value("f64", 0), value("f64", 1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:439 +assert_return( + () => invoke($0, `sub`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:440 +assert_return( + () => invoke($0, `sub`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:441 +assert_return( + () => invoke($0, `sub`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:442 +assert_return( + () => invoke($0, `sub`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:443 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:444 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:445 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:446 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:447 +assert_return( + () => invoke($0, `sub`, [value("f64", -0), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:448 +assert_return( + () => invoke($0, `sub`, [value("f64", -0), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:449 +assert_return( + () => invoke($0, `sub`, [value("f64", 0), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:450 +assert_return( + () => invoke($0, `sub`, [value("f64", 0), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:451 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:452 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:453 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:454 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:455 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:456 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:457 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:458 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:459 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:460 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:461 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:462 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:463 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:464 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/f64.wast:465 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/f64.wast:466 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:467 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ], +); + +// ./test/core/f64.wast:468 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ], +); + +// ./test/core/f64.wast:469 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ], +); + +// ./test/core/f64.wast:470 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ], +); + +// ./test/core/f64.wast:471 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:472 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:473 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:474 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:475 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:476 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:477 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:478 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:479 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:480 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:481 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:482 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:483 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:484 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:485 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:486 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:487 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:488 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:489 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:490 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:491 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:492 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:493 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:494 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:495 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:496 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:497 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:498 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:499 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:500 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:501 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:502 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:503 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ], +); + +// ./test/core/f64.wast:504 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ], +); + +// ./test/core/f64.wast:505 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ], +); + +// ./test/core/f64.wast:506 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ], +); + +// ./test/core/f64.wast:507 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:508 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ], +); + +// ./test/core/f64.wast:509 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ], +); + +// ./test/core/f64.wast:510 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:511 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:512 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:513 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:514 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:515 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:516 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:517 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:518 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:519 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:520 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:521 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:522 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:523 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:524 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:525 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:526 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:527 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:528 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:529 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:530 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:531 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:532 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:533 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:534 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:535 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:536 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:537 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:538 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:539 +assert_return(() => invoke($0, `sub`, [value("f64", -0.5), value("f64", -0)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:540 +assert_return(() => invoke($0, `sub`, [value("f64", -0.5), value("f64", 0)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:541 +assert_return(() => invoke($0, `sub`, [value("f64", 0.5), value("f64", -0)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:542 +assert_return(() => invoke($0, `sub`, [value("f64", 0.5), value("f64", 0)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:543 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:544 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:545 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:546 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:547 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:548 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:549 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:550 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:551 +assert_return(() => invoke($0, `sub`, [value("f64", -0.5), value("f64", -0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:552 +assert_return(() => invoke($0, `sub`, [value("f64", -0.5), value("f64", 0.5)]), [value("f64", -1)]); + +// ./test/core/f64.wast:553 +assert_return(() => invoke($0, `sub`, [value("f64", 0.5), value("f64", -0.5)]), [value("f64", 1)]); + +// ./test/core/f64.wast:554 +assert_return(() => invoke($0, `sub`, [value("f64", 0.5), value("f64", 0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:555 +assert_return(() => invoke($0, `sub`, [value("f64", -0.5), value("f64", -1)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:556 +assert_return(() => invoke($0, `sub`, [value("f64", -0.5), value("f64", 1)]), [value("f64", -1.5)]); + +// ./test/core/f64.wast:557 +assert_return(() => invoke($0, `sub`, [value("f64", 0.5), value("f64", -1)]), [value("f64", 1.5)]); + +// ./test/core/f64.wast:558 +assert_return(() => invoke($0, `sub`, [value("f64", 0.5), value("f64", 1)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:559 +assert_return( + () => invoke($0, `sub`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("f64", 5.783185307179586)], +); + +// ./test/core/f64.wast:560 +assert_return( + () => invoke($0, `sub`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("f64", -6.783185307179586)], +); + +// ./test/core/f64.wast:561 +assert_return( + () => invoke($0, `sub`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("f64", 6.783185307179586)], +); + +// ./test/core/f64.wast:562 +assert_return( + () => invoke($0, `sub`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("f64", -5.783185307179586)], +); + +// ./test/core/f64.wast:563 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:564 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:565 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:566 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:567 +assert_return( + () => invoke($0, `sub`, [value("f64", -0.5), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:568 +assert_return( + () => invoke($0, `sub`, [value("f64", -0.5), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:569 +assert_return( + () => invoke($0, `sub`, [value("f64", 0.5), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:570 +assert_return( + () => invoke($0, `sub`, [value("f64", 0.5), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:571 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:572 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:573 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:574 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:575 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:576 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:577 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:578 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:579 +assert_return(() => invoke($0, `sub`, [value("f64", -1), value("f64", -0)]), [value("f64", -1)]); + +// ./test/core/f64.wast:580 +assert_return(() => invoke($0, `sub`, [value("f64", -1), value("f64", 0)]), [value("f64", -1)]); + +// ./test/core/f64.wast:581 +assert_return(() => invoke($0, `sub`, [value("f64", 1), value("f64", -0)]), [value("f64", 1)]); + +// ./test/core/f64.wast:582 +assert_return(() => invoke($0, `sub`, [value("f64", 1), value("f64", 0)]), [value("f64", 1)]); + +// ./test/core/f64.wast:583 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:584 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:585 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:586 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:587 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:588 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:589 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:590 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:591 +assert_return(() => invoke($0, `sub`, [value("f64", -1), value("f64", -0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:592 +assert_return(() => invoke($0, `sub`, [value("f64", -1), value("f64", 0.5)]), [value("f64", -1.5)]); + +// ./test/core/f64.wast:593 +assert_return(() => invoke($0, `sub`, [value("f64", 1), value("f64", -0.5)]), [value("f64", 1.5)]); + +// ./test/core/f64.wast:594 +assert_return(() => invoke($0, `sub`, [value("f64", 1), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:595 +assert_return(() => invoke($0, `sub`, [value("f64", -1), value("f64", -1)]), [value("f64", 0)]); + +// ./test/core/f64.wast:596 +assert_return(() => invoke($0, `sub`, [value("f64", -1), value("f64", 1)]), [value("f64", -2)]); + +// ./test/core/f64.wast:597 +assert_return(() => invoke($0, `sub`, [value("f64", 1), value("f64", -1)]), [value("f64", 2)]); + +// ./test/core/f64.wast:598 +assert_return(() => invoke($0, `sub`, [value("f64", 1), value("f64", 1)]), [value("f64", 0)]); + +// ./test/core/f64.wast:599 +assert_return( + () => invoke($0, `sub`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("f64", 5.283185307179586)], +); + +// ./test/core/f64.wast:600 +assert_return( + () => invoke($0, `sub`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("f64", -7.283185307179586)], +); + +// ./test/core/f64.wast:601 +assert_return( + () => invoke($0, `sub`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("f64", 7.283185307179586)], +); + +// ./test/core/f64.wast:602 +assert_return( + () => invoke($0, `sub`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("f64", -5.283185307179586)], +); + +// ./test/core/f64.wast:603 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:604 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:605 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:606 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:607 +assert_return( + () => invoke($0, `sub`, [value("f64", -1), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:608 +assert_return( + () => invoke($0, `sub`, [value("f64", -1), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:609 +assert_return( + () => invoke($0, `sub`, [value("f64", 1), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:610 +assert_return( + () => invoke($0, `sub`, [value("f64", 1), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:611 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:612 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:613 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:614 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:615 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:616 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:617 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:618 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:619 +assert_return( + () => invoke($0, `sub`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:620 +assert_return( + () => invoke($0, `sub`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:621 +assert_return( + () => invoke($0, `sub`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:622 +assert_return( + () => invoke($0, `sub`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:623 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:624 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:625 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:626 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:627 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:628 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:629 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:630 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:631 +assert_return( + () => invoke($0, `sub`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("f64", -5.783185307179586)], +); + +// ./test/core/f64.wast:632 +assert_return( + () => invoke($0, `sub`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("f64", -6.783185307179586)], +); + +// ./test/core/f64.wast:633 +assert_return( + () => invoke($0, `sub`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("f64", 6.783185307179586)], +); + +// ./test/core/f64.wast:634 +assert_return( + () => invoke($0, `sub`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("f64", 5.783185307179586)], +); + +// ./test/core/f64.wast:635 +assert_return( + () => invoke($0, `sub`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("f64", -5.283185307179586)], +); + +// ./test/core/f64.wast:636 +assert_return( + () => invoke($0, `sub`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("f64", -7.283185307179586)], +); + +// ./test/core/f64.wast:637 +assert_return( + () => invoke($0, `sub`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("f64", 7.283185307179586)], +); + +// ./test/core/f64.wast:638 +assert_return( + () => invoke($0, `sub`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("f64", 5.283185307179586)], +); + +// ./test/core/f64.wast:639 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:640 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", -12.566370614359172)], +); + +// ./test/core/f64.wast:641 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", 12.566370614359172)], +); + +// ./test/core/f64.wast:642 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:643 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:644 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:645 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:646 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:647 +assert_return( + () => invoke($0, `sub`, [value("f64", -6.283185307179586), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:648 +assert_return( + () => invoke($0, `sub`, [value("f64", -6.283185307179586), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:649 +assert_return( + () => invoke($0, `sub`, [value("f64", 6.283185307179586), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:650 +assert_return( + () => invoke($0, `sub`, [value("f64", 6.283185307179586), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:651 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:652 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:653 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:654 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:655 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:656 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:657 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:658 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:659 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:660 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:661 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:662 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:663 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:664 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:665 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:666 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:667 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:668 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:669 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:670 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:671 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:672 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:673 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:674 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:675 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:676 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:677 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:678 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:679 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:680 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:681 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:682 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:683 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:684 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:685 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:686 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:687 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:688 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:689 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:690 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:691 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:692 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:693 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:694 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:695 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:696 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:697 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:698 +assert_return( + () => invoke($0, `sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:699 +assert_return( + () => invoke($0, `sub`, [value("f64", -Infinity), value("f64", -0)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:700 +assert_return( + () => invoke($0, `sub`, [value("f64", -Infinity), value("f64", 0)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:701 +assert_return( + () => invoke($0, `sub`, [value("f64", Infinity), value("f64", -0)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:702 +assert_return( + () => invoke($0, `sub`, [value("f64", Infinity), value("f64", 0)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:703 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:704 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:705 +assert_return( + () => invoke($0, `sub`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:706 +assert_return( + () => invoke($0, `sub`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:707 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:708 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:709 +assert_return( + () => invoke($0, `sub`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:710 +assert_return( + () => invoke($0, `sub`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:711 +assert_return( + () => invoke($0, `sub`, [value("f64", -Infinity), value("f64", -0.5)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:712 +assert_return( + () => invoke($0, `sub`, [value("f64", -Infinity), value("f64", 0.5)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:713 +assert_return( + () => invoke($0, `sub`, [value("f64", Infinity), value("f64", -0.5)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:714 +assert_return( + () => invoke($0, `sub`, [value("f64", Infinity), value("f64", 0.5)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:715 +assert_return( + () => invoke($0, `sub`, [value("f64", -Infinity), value("f64", -1)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:716 +assert_return( + () => invoke($0, `sub`, [value("f64", -Infinity), value("f64", 1)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:717 +assert_return( + () => invoke($0, `sub`, [value("f64", Infinity), value("f64", -1)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:718 +assert_return( + () => invoke($0, `sub`, [value("f64", Infinity), value("f64", 1)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:719 +assert_return( + () => invoke($0, `sub`, [value("f64", -Infinity), value("f64", -6.283185307179586)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:720 +assert_return( + () => invoke($0, `sub`, [value("f64", -Infinity), value("f64", 6.283185307179586)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:721 +assert_return( + () => invoke($0, `sub`, [value("f64", Infinity), value("f64", -6.283185307179586)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:722 +assert_return( + () => invoke($0, `sub`, [value("f64", Infinity), value("f64", 6.283185307179586)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:723 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:724 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:725 +assert_return( + () => invoke($0, `sub`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:726 +assert_return( + () => invoke($0, `sub`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:727 +assert_return( + () => invoke($0, `sub`, [value("f64", -Infinity), value("f64", -Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:728 +assert_return( + () => invoke($0, `sub`, [value("f64", -Infinity), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:729 +assert_return( + () => invoke($0, `sub`, [value("f64", Infinity), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:730 +assert_return( + () => invoke($0, `sub`, [value("f64", Infinity), value("f64", Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:731 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:732 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:733 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:734 +assert_return( + () => invoke($0, `sub`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:735 +assert_return( + () => invoke($0, `sub`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:736 +assert_return( + () => invoke($0, `sub`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:737 +assert_return( + () => invoke($0, `sub`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:738 +assert_return( + () => invoke($0, `sub`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:739 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:740 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:741 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:742 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:743 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:744 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:745 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:746 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:747 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:748 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:749 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:750 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:751 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:752 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:753 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:754 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:755 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:756 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:757 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:758 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:759 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:760 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:761 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:762 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:763 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:764 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:765 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:766 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:767 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:768 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:769 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:770 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:771 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:772 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:773 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:774 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:775 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:776 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:777 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:778 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:779 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:780 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:781 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:782 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:783 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:784 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:785 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:786 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:787 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:788 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:789 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:790 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:791 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:792 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:793 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:794 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:795 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:796 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:797 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:798 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:799 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:800 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:801 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:802 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:803 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:804 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:805 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:806 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:807 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:808 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:809 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:810 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:811 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:812 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:813 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:814 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:815 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:816 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:817 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:818 +assert_return( + () => invoke($0, `sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:819 +assert_return(() => invoke($0, `mul`, [value("f64", -0), value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:820 +assert_return(() => invoke($0, `mul`, [value("f64", -0), value("f64", 0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:821 +assert_return(() => invoke($0, `mul`, [value("f64", 0), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:822 +assert_return(() => invoke($0, `mul`, [value("f64", 0), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:823 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:824 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:825 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:826 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:827 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:828 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:829 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:830 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:831 +assert_return(() => invoke($0, `mul`, [value("f64", -0), value("f64", -0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:832 +assert_return(() => invoke($0, `mul`, [value("f64", -0), value("f64", 0.5)]), [value("f64", -0)]); + +// ./test/core/f64.wast:833 +assert_return(() => invoke($0, `mul`, [value("f64", 0), value("f64", -0.5)]), [value("f64", -0)]); + +// ./test/core/f64.wast:834 +assert_return(() => invoke($0, `mul`, [value("f64", 0), value("f64", 0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:835 +assert_return(() => invoke($0, `mul`, [value("f64", -0), value("f64", -1)]), [value("f64", 0)]); + +// ./test/core/f64.wast:836 +assert_return(() => invoke($0, `mul`, [value("f64", -0), value("f64", 1)]), [value("f64", -0)]); + +// ./test/core/f64.wast:837 +assert_return(() => invoke($0, `mul`, [value("f64", 0), value("f64", -1)]), [value("f64", -0)]); + +// ./test/core/f64.wast:838 +assert_return(() => invoke($0, `mul`, [value("f64", 0), value("f64", 1)]), [value("f64", 0)]); + +// ./test/core/f64.wast:839 +assert_return( + () => invoke($0, `mul`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:840 +assert_return( + () => invoke($0, `mul`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:841 +assert_return( + () => invoke($0, `mul`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:842 +assert_return( + () => invoke($0, `mul`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:843 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:844 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:845 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:846 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:847 +assert_return(() => invoke($0, `mul`, [value("f64", -0), value("f64", -Infinity)]), [`canonical_nan`]); + +// ./test/core/f64.wast:848 +assert_return(() => invoke($0, `mul`, [value("f64", -0), value("f64", Infinity)]), [`canonical_nan`]); + +// ./test/core/f64.wast:849 +assert_return(() => invoke($0, `mul`, [value("f64", 0), value("f64", -Infinity)]), [`canonical_nan`]); + +// ./test/core/f64.wast:850 +assert_return(() => invoke($0, `mul`, [value("f64", 0), value("f64", Infinity)]), [`canonical_nan`]); + +// ./test/core/f64.wast:851 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:852 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:853 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:854 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:855 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:856 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:857 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:858 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:859 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:860 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:861 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:862 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:863 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:864 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:865 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:866 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:867 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:868 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:869 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:870 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:871 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:872 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:873 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:874 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:875 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:876 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:877 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:878 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:879 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ], +); + +// ./test/core/f64.wast:880 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ], +); + +// ./test/core/f64.wast:881 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ], +); + +// ./test/core/f64.wast:882 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ], +); + +// ./test/core/f64.wast:883 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0.0000000000000008881784197001251)], +); + +// ./test/core/f64.wast:884 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0.0000000000000008881784197001251)], +); + +// ./test/core/f64.wast:885 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0.0000000000000008881784197001251)], +); + +// ./test/core/f64.wast:886 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0.0000000000000008881784197001251)], +); + +// ./test/core/f64.wast:887 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:888 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:889 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:890 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:891 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:892 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:893 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:894 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:895 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:896 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:897 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:898 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:899 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:900 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:901 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:902 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:903 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:904 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:905 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:906 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:907 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:908 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:909 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:910 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:911 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ], +); + +// ./test/core/f64.wast:912 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ], +); + +// ./test/core/f64.wast:913 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ], +); + +// ./test/core/f64.wast:914 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ], +); + +// ./test/core/f64.wast:915 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:916 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:917 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:918 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:919 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ], +); + +// ./test/core/f64.wast:920 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ], +); + +// ./test/core/f64.wast:921 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ], +); + +// ./test/core/f64.wast:922 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ], +); + +// ./test/core/f64.wast:923 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 3.9999999999999996)], +); + +// ./test/core/f64.wast:924 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -3.9999999999999996)], +); + +// ./test/core/f64.wast:925 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -3.9999999999999996)], +); + +// ./test/core/f64.wast:926 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 3.9999999999999996)], +); + +// ./test/core/f64.wast:927 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:928 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:929 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:930 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:931 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:932 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:933 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:934 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:935 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:936 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:937 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:938 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:939 +assert_return(() => invoke($0, `mul`, [value("f64", -0.5), value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:940 +assert_return(() => invoke($0, `mul`, [value("f64", -0.5), value("f64", 0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:941 +assert_return(() => invoke($0, `mul`, [value("f64", 0.5), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:942 +assert_return(() => invoke($0, `mul`, [value("f64", 0.5), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:943 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:944 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:945 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:946 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:947 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ], +); + +// ./test/core/f64.wast:948 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ], +); + +// ./test/core/f64.wast:949 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ], +); + +// ./test/core/f64.wast:950 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ], +); + +// ./test/core/f64.wast:951 +assert_return(() => invoke($0, `mul`, [value("f64", -0.5), value("f64", -0.5)]), [value("f64", 0.25)]); + +// ./test/core/f64.wast:952 +assert_return(() => invoke($0, `mul`, [value("f64", -0.5), value("f64", 0.5)]), [value("f64", -0.25)]); + +// ./test/core/f64.wast:953 +assert_return(() => invoke($0, `mul`, [value("f64", 0.5), value("f64", -0.5)]), [value("f64", -0.25)]); + +// ./test/core/f64.wast:954 +assert_return(() => invoke($0, `mul`, [value("f64", 0.5), value("f64", 0.5)]), [value("f64", 0.25)]); + +// ./test/core/f64.wast:955 +assert_return(() => invoke($0, `mul`, [value("f64", -0.5), value("f64", -1)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:956 +assert_return(() => invoke($0, `mul`, [value("f64", -0.5), value("f64", 1)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:957 +assert_return(() => invoke($0, `mul`, [value("f64", 0.5), value("f64", -1)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:958 +assert_return(() => invoke($0, `mul`, [value("f64", 0.5), value("f64", 1)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:959 +assert_return( + () => invoke($0, `mul`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("f64", 3.141592653589793)], +); + +// ./test/core/f64.wast:960 +assert_return( + () => invoke($0, `mul`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("f64", -3.141592653589793)], +); + +// ./test/core/f64.wast:961 +assert_return( + () => invoke($0, `mul`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("f64", -3.141592653589793)], +); + +// ./test/core/f64.wast:962 +assert_return( + () => invoke($0, `mul`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("f64", 3.141592653589793)], +); + +// ./test/core/f64.wast:963 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:964 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:965 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:966 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:967 +assert_return( + () => invoke($0, `mul`, [value("f64", -0.5), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:968 +assert_return( + () => invoke($0, `mul`, [value("f64", -0.5), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:969 +assert_return( + () => invoke($0, `mul`, [value("f64", 0.5), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:970 +assert_return( + () => invoke($0, `mul`, [value("f64", 0.5), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:971 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:972 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:973 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:974 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:975 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:976 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:977 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:978 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:979 +assert_return(() => invoke($0, `mul`, [value("f64", -1), value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:980 +assert_return(() => invoke($0, `mul`, [value("f64", -1), value("f64", 0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:981 +assert_return(() => invoke($0, `mul`, [value("f64", 1), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:982 +assert_return(() => invoke($0, `mul`, [value("f64", 1), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:983 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:984 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:985 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:986 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:987 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:988 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:989 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:990 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:991 +assert_return(() => invoke($0, `mul`, [value("f64", -1), value("f64", -0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:992 +assert_return(() => invoke($0, `mul`, [value("f64", -1), value("f64", 0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:993 +assert_return(() => invoke($0, `mul`, [value("f64", 1), value("f64", -0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:994 +assert_return(() => invoke($0, `mul`, [value("f64", 1), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:995 +assert_return(() => invoke($0, `mul`, [value("f64", -1), value("f64", -1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:996 +assert_return(() => invoke($0, `mul`, [value("f64", -1), value("f64", 1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:997 +assert_return(() => invoke($0, `mul`, [value("f64", 1), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:998 +assert_return(() => invoke($0, `mul`, [value("f64", 1), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:999 +assert_return( + () => invoke($0, `mul`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:1000 +assert_return( + () => invoke($0, `mul`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1001 +assert_return( + () => invoke($0, `mul`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1002 +assert_return( + () => invoke($0, `mul`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:1003 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1004 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1005 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1006 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1007 +assert_return( + () => invoke($0, `mul`, [value("f64", -1), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1008 +assert_return( + () => invoke($0, `mul`, [value("f64", -1), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1009 +assert_return( + () => invoke($0, `mul`, [value("f64", 1), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1010 +assert_return( + () => invoke($0, `mul`, [value("f64", 1), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1011 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1012 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1013 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1014 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1015 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1016 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1017 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1018 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1019 +assert_return( + () => invoke($0, `mul`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1020 +assert_return( + () => invoke($0, `mul`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1021 +assert_return( + () => invoke($0, `mul`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1022 +assert_return( + () => invoke($0, `mul`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1023 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ], +); + +// ./test/core/f64.wast:1024 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ], +); + +// ./test/core/f64.wast:1025 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ], +); + +// ./test/core/f64.wast:1026 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ], +); + +// ./test/core/f64.wast:1027 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ], +); + +// ./test/core/f64.wast:1028 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ], +); + +// ./test/core/f64.wast:1029 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ], +); + +// ./test/core/f64.wast:1030 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ], +); + +// ./test/core/f64.wast:1031 +assert_return( + () => invoke($0, `mul`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("f64", 3.141592653589793)], +); + +// ./test/core/f64.wast:1032 +assert_return( + () => invoke($0, `mul`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("f64", -3.141592653589793)], +); + +// ./test/core/f64.wast:1033 +assert_return( + () => invoke($0, `mul`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("f64", -3.141592653589793)], +); + +// ./test/core/f64.wast:1034 +assert_return( + () => invoke($0, `mul`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("f64", 3.141592653589793)], +); + +// ./test/core/f64.wast:1035 +assert_return( + () => invoke($0, `mul`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:1036 +assert_return( + () => invoke($0, `mul`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1037 +assert_return( + () => invoke($0, `mul`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1038 +assert_return( + () => invoke($0, `mul`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:1039 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", 39.47841760435743)], +); + +// ./test/core/f64.wast:1040 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", -39.47841760435743)], +); + +// ./test/core/f64.wast:1041 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", -39.47841760435743)], +); + +// ./test/core/f64.wast:1042 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", 39.47841760435743)], +); + +// ./test/core/f64.wast:1043 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1044 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1045 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1046 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1047 +assert_return( + () => invoke($0, `mul`, [value("f64", -6.283185307179586), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1048 +assert_return( + () => invoke($0, `mul`, [value("f64", -6.283185307179586), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1049 +assert_return( + () => invoke($0, `mul`, [value("f64", 6.283185307179586), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1050 +assert_return( + () => invoke($0, `mul`, [value("f64", 6.283185307179586), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1051 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1052 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1053 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1054 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1055 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1056 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1057 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1058 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1059 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1060 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1061 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1062 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1063 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0.0000000000000008881784197001251)], +); + +// ./test/core/f64.wast:1064 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0.0000000000000008881784197001251)], +); + +// ./test/core/f64.wast:1065 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0.0000000000000008881784197001251)], +); + +// ./test/core/f64.wast:1066 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0.0000000000000008881784197001251)], +); + +// ./test/core/f64.wast:1067 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 3.9999999999999996)], +); + +// ./test/core/f64.wast:1068 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -3.9999999999999996)], +); + +// ./test/core/f64.wast:1069 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -3.9999999999999996)], +); + +// ./test/core/f64.wast:1070 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 3.9999999999999996)], +); + +// ./test/core/f64.wast:1071 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [ + value("f64", 89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1072 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [ + value("f64", -89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1073 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [ + value("f64", -89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1074 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [ + value("f64", 89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1075 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1076 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1077 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1078 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1079 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1080 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1081 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1082 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1083 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1084 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1085 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1086 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1087 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1088 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1089 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1090 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1091 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1092 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1093 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1094 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1095 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1096 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1097 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1098 +assert_return( + () => invoke($0, `mul`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1099 +assert_return(() => invoke($0, `mul`, [value("f64", -Infinity), value("f64", -0)]), [`canonical_nan`]); + +// ./test/core/f64.wast:1100 +assert_return(() => invoke($0, `mul`, [value("f64", -Infinity), value("f64", 0)]), [`canonical_nan`]); + +// ./test/core/f64.wast:1101 +assert_return(() => invoke($0, `mul`, [value("f64", Infinity), value("f64", -0)]), [`canonical_nan`]); + +// ./test/core/f64.wast:1102 +assert_return(() => invoke($0, `mul`, [value("f64", Infinity), value("f64", 0)]), [`canonical_nan`]); + +// ./test/core/f64.wast:1103 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1104 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1105 +assert_return( + () => invoke($0, `mul`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1106 +assert_return( + () => invoke($0, `mul`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1107 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1108 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1109 +assert_return( + () => invoke($0, `mul`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1110 +assert_return( + () => invoke($0, `mul`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1111 +assert_return( + () => invoke($0, `mul`, [value("f64", -Infinity), value("f64", -0.5)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1112 +assert_return( + () => invoke($0, `mul`, [value("f64", -Infinity), value("f64", 0.5)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1113 +assert_return( + () => invoke($0, `mul`, [value("f64", Infinity), value("f64", -0.5)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1114 +assert_return( + () => invoke($0, `mul`, [value("f64", Infinity), value("f64", 0.5)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1115 +assert_return( + () => invoke($0, `mul`, [value("f64", -Infinity), value("f64", -1)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1116 +assert_return( + () => invoke($0, `mul`, [value("f64", -Infinity), value("f64", 1)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1117 +assert_return( + () => invoke($0, `mul`, [value("f64", Infinity), value("f64", -1)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1118 +assert_return( + () => invoke($0, `mul`, [value("f64", Infinity), value("f64", 1)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1119 +assert_return( + () => invoke($0, `mul`, [value("f64", -Infinity), value("f64", -6.283185307179586)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1120 +assert_return( + () => invoke($0, `mul`, [value("f64", -Infinity), value("f64", 6.283185307179586)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1121 +assert_return( + () => invoke($0, `mul`, [value("f64", Infinity), value("f64", -6.283185307179586)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1122 +assert_return( + () => invoke($0, `mul`, [value("f64", Infinity), value("f64", 6.283185307179586)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1123 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1124 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1125 +assert_return( + () => invoke($0, `mul`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1126 +assert_return( + () => invoke($0, `mul`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1127 +assert_return( + () => invoke($0, `mul`, [value("f64", -Infinity), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1128 +assert_return( + () => invoke($0, `mul`, [value("f64", -Infinity), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1129 +assert_return( + () => invoke($0, `mul`, [value("f64", Infinity), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1130 +assert_return( + () => invoke($0, `mul`, [value("f64", Infinity), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1131 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1132 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1133 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1134 +assert_return( + () => invoke($0, `mul`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1135 +assert_return( + () => invoke($0, `mul`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1136 +assert_return( + () => invoke($0, `mul`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1137 +assert_return( + () => invoke($0, `mul`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1138 +assert_return( + () => invoke($0, `mul`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1139 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1140 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1141 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1142 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1143 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1144 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1145 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1146 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1147 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1148 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1149 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1150 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1151 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1152 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1153 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1154 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1155 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1156 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1157 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1158 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1159 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1160 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1161 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1162 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1163 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1164 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1165 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1166 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1167 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1168 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1169 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1170 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1171 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1172 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1173 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1174 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1175 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1176 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1177 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1178 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1179 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1180 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1181 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1182 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1183 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1184 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1185 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1186 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1187 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1188 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1189 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1190 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1191 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1192 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1193 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1194 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1195 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1196 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1197 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1198 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1199 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1200 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1201 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1202 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1203 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1204 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1205 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1206 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1207 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1208 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1209 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1210 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1211 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1212 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1213 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1214 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1215 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1216 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1217 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1218 +assert_return( + () => invoke($0, `mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1219 +assert_return(() => invoke($0, `div`, [value("f64", -0), value("f64", -0)]), [`canonical_nan`]); + +// ./test/core/f64.wast:1220 +assert_return(() => invoke($0, `div`, [value("f64", -0), value("f64", 0)]), [`canonical_nan`]); + +// ./test/core/f64.wast:1221 +assert_return(() => invoke($0, `div`, [value("f64", 0), value("f64", -0)]), [`canonical_nan`]); + +// ./test/core/f64.wast:1222 +assert_return(() => invoke($0, `div`, [value("f64", 0), value("f64", 0)]), [`canonical_nan`]); + +// ./test/core/f64.wast:1223 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1224 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1225 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1226 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1227 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1228 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1229 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1230 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1231 +assert_return(() => invoke($0, `div`, [value("f64", -0), value("f64", -0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1232 +assert_return(() => invoke($0, `div`, [value("f64", -0), value("f64", 0.5)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1233 +assert_return(() => invoke($0, `div`, [value("f64", 0), value("f64", -0.5)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1234 +assert_return(() => invoke($0, `div`, [value("f64", 0), value("f64", 0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1235 +assert_return(() => invoke($0, `div`, [value("f64", -0), value("f64", -1)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1236 +assert_return(() => invoke($0, `div`, [value("f64", -0), value("f64", 1)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1237 +assert_return(() => invoke($0, `div`, [value("f64", 0), value("f64", -1)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1238 +assert_return(() => invoke($0, `div`, [value("f64", 0), value("f64", 1)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1239 +assert_return( + () => invoke($0, `div`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1240 +assert_return( + () => invoke($0, `div`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1241 +assert_return( + () => invoke($0, `div`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1242 +assert_return( + () => invoke($0, `div`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1243 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1244 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1245 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1246 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1247 +assert_return(() => invoke($0, `div`, [value("f64", -0), value("f64", -Infinity)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1248 +assert_return(() => invoke($0, `div`, [value("f64", -0), value("f64", Infinity)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1249 +assert_return(() => invoke($0, `div`, [value("f64", 0), value("f64", -Infinity)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1250 +assert_return(() => invoke($0, `div`, [value("f64", 0), value("f64", Infinity)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1251 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1252 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1253 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1254 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1255 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1256 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1257 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1258 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1259 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1260 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1261 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1262 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1263 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:1264 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1265 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1266 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:1267 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0.0000000000000002220446049250313)], +); + +// ./test/core/f64.wast:1268 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0.0000000000000002220446049250313)], +); + +// ./test/core/f64.wast:1269 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0.0000000000000002220446049250313)], +); + +// ./test/core/f64.wast:1270 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0.0000000000000002220446049250313)], +); + +// ./test/core/f64.wast:1271 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/f64.wast:1272 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/f64.wast:1273 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/f64.wast:1274 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/f64.wast:1275 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1276 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1277 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1278 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1279 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1280 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1281 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1282 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1283 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1284 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1285 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1286 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1287 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1288 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1289 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1290 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1291 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1292 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1293 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1294 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1295 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1296 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1297 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1298 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1299 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1300 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1301 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1302 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1303 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 4503599627370496)], +); + +// ./test/core/f64.wast:1304 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -4503599627370496)], +); + +// ./test/core/f64.wast:1305 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -4503599627370496)], +); + +// ./test/core/f64.wast:1306 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 4503599627370496)], +); + +// ./test/core/f64.wast:1307 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:1308 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1309 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1310 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:1311 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ], +); + +// ./test/core/f64.wast:1312 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ], +); + +// ./test/core/f64.wast:1313 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ], +); + +// ./test/core/f64.wast:1314 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ], +); + +// ./test/core/f64.wast:1315 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1316 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1317 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1318 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1319 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003541315033259774), + ], +); + +// ./test/core/f64.wast:1320 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003541315033259774), + ], +); + +// ./test/core/f64.wast:1321 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003541315033259774), + ], +); + +// ./test/core/f64.wast:1322 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003541315033259774), + ], +); + +// ./test/core/f64.wast:1323 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1324 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1325 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1326 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1327 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1328 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1329 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1330 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1331 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1332 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1333 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1334 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1335 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1336 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1337 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1338 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1339 +assert_return(() => invoke($0, `div`, [value("f64", -0.5), value("f64", -0)]), [value("f64", Infinity)]); + +// ./test/core/f64.wast:1340 +assert_return(() => invoke($0, `div`, [value("f64", -0.5), value("f64", 0)]), [value("f64", -Infinity)]); + +// ./test/core/f64.wast:1341 +assert_return(() => invoke($0, `div`, [value("f64", 0.5), value("f64", -0)]), [value("f64", -Infinity)]); + +// ./test/core/f64.wast:1342 +assert_return(() => invoke($0, `div`, [value("f64", 0.5), value("f64", 0)]), [value("f64", Infinity)]); + +// ./test/core/f64.wast:1343 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1344 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1345 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1346 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1347 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 22471164185778950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1348 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -22471164185778950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1349 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -22471164185778950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1350 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 22471164185778950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1351 +assert_return(() => invoke($0, `div`, [value("f64", -0.5), value("f64", -0.5)]), [value("f64", 1)]); + +// ./test/core/f64.wast:1352 +assert_return(() => invoke($0, `div`, [value("f64", -0.5), value("f64", 0.5)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1353 +assert_return(() => invoke($0, `div`, [value("f64", 0.5), value("f64", -0.5)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1354 +assert_return(() => invoke($0, `div`, [value("f64", 0.5), value("f64", 0.5)]), [value("f64", 1)]); + +// ./test/core/f64.wast:1355 +assert_return(() => invoke($0, `div`, [value("f64", -0.5), value("f64", -1)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:1356 +assert_return(() => invoke($0, `div`, [value("f64", -0.5), value("f64", 1)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:1357 +assert_return(() => invoke($0, `div`, [value("f64", 0.5), value("f64", -1)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:1358 +assert_return(() => invoke($0, `div`, [value("f64", 0.5), value("f64", 1)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:1359 +assert_return( + () => invoke($0, `div`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("f64", 0.07957747154594767)], +); + +// ./test/core/f64.wast:1360 +assert_return( + () => invoke($0, `div`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("f64", -0.07957747154594767)], +); + +// ./test/core/f64.wast:1361 +assert_return( + () => invoke($0, `div`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("f64", -0.07957747154594767)], +); + +// ./test/core/f64.wast:1362 +assert_return( + () => invoke($0, `div`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("f64", 0.07957747154594767)], +); + +// ./test/core/f64.wast:1363 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002781342323134), + ], +); + +// ./test/core/f64.wast:1364 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002781342323134), + ], +); + +// ./test/core/f64.wast:1365 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002781342323134), + ], +); + +// ./test/core/f64.wast:1366 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002781342323134), + ], +); + +// ./test/core/f64.wast:1367 +assert_return(() => invoke($0, `div`, [value("f64", -0.5), value("f64", -Infinity)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1368 +assert_return(() => invoke($0, `div`, [value("f64", -0.5), value("f64", Infinity)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1369 +assert_return(() => invoke($0, `div`, [value("f64", 0.5), value("f64", -Infinity)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1370 +assert_return(() => invoke($0, `div`, [value("f64", 0.5), value("f64", Infinity)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1371 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1372 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1373 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1374 +assert_return( + () => invoke($0, `div`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1375 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1376 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1377 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1378 +assert_return( + () => invoke($0, `div`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1379 +assert_return(() => invoke($0, `div`, [value("f64", -1), value("f64", -0)]), [value("f64", Infinity)]); + +// ./test/core/f64.wast:1380 +assert_return(() => invoke($0, `div`, [value("f64", -1), value("f64", 0)]), [value("f64", -Infinity)]); + +// ./test/core/f64.wast:1381 +assert_return(() => invoke($0, `div`, [value("f64", 1), value("f64", -0)]), [value("f64", -Infinity)]); + +// ./test/core/f64.wast:1382 +assert_return(() => invoke($0, `div`, [value("f64", 1), value("f64", 0)]), [value("f64", Infinity)]); + +// ./test/core/f64.wast:1383 +assert_return( + () => invoke($0, `div`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1384 +assert_return( + () => invoke($0, `div`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1385 +assert_return( + () => invoke($0, `div`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1386 +assert_return( + () => invoke($0, `div`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1387 +assert_return( + () => invoke($0, `div`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1388 +assert_return( + () => invoke($0, `div`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1389 +assert_return( + () => invoke($0, `div`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1390 +assert_return( + () => invoke($0, `div`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1391 +assert_return(() => invoke($0, `div`, [value("f64", -1), value("f64", -0.5)]), [value("f64", 2)]); + +// ./test/core/f64.wast:1392 +assert_return(() => invoke($0, `div`, [value("f64", -1), value("f64", 0.5)]), [value("f64", -2)]); + +// ./test/core/f64.wast:1393 +assert_return(() => invoke($0, `div`, [value("f64", 1), value("f64", -0.5)]), [value("f64", -2)]); + +// ./test/core/f64.wast:1394 +assert_return(() => invoke($0, `div`, [value("f64", 1), value("f64", 0.5)]), [value("f64", 2)]); + +// ./test/core/f64.wast:1395 +assert_return(() => invoke($0, `div`, [value("f64", -1), value("f64", -1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:1396 +assert_return(() => invoke($0, `div`, [value("f64", -1), value("f64", 1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1397 +assert_return(() => invoke($0, `div`, [value("f64", 1), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1398 +assert_return(() => invoke($0, `div`, [value("f64", 1), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:1399 +assert_return( + () => invoke($0, `div`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("f64", 0.15915494309189535)], +); + +// ./test/core/f64.wast:1400 +assert_return( + () => invoke($0, `div`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("f64", -0.15915494309189535)], +); + +// ./test/core/f64.wast:1401 +assert_return( + () => invoke($0, `div`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("f64", -0.15915494309189535)], +); + +// ./test/core/f64.wast:1402 +assert_return( + () => invoke($0, `div`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("f64", 0.15915494309189535)], +); + +// ./test/core/f64.wast:1403 +assert_return( + () => invoke($0, `div`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + ], +); + +// ./test/core/f64.wast:1404 +assert_return( + () => invoke($0, `div`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + ], +); + +// ./test/core/f64.wast:1405 +assert_return( + () => invoke($0, `div`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + ], +); + +// ./test/core/f64.wast:1406 +assert_return( + () => invoke($0, `div`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + ], +); + +// ./test/core/f64.wast:1407 +assert_return(() => invoke($0, `div`, [value("f64", -1), value("f64", -Infinity)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1408 +assert_return(() => invoke($0, `div`, [value("f64", -1), value("f64", Infinity)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1409 +assert_return(() => invoke($0, `div`, [value("f64", 1), value("f64", -Infinity)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1410 +assert_return(() => invoke($0, `div`, [value("f64", 1), value("f64", Infinity)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1411 +assert_return( + () => invoke($0, `div`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1412 +assert_return( + () => invoke($0, `div`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1413 +assert_return( + () => invoke($0, `div`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1414 +assert_return( + () => invoke($0, `div`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1415 +assert_return( + () => invoke($0, `div`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1416 +assert_return( + () => invoke($0, `div`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1417 +assert_return( + () => invoke($0, `div`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1418 +assert_return( + () => invoke($0, `div`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1419 +assert_return( + () => invoke($0, `div`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1420 +assert_return( + () => invoke($0, `div`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1421 +assert_return( + () => invoke($0, `div`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1422 +assert_return( + () => invoke($0, `div`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1423 +assert_return( + () => invoke($0, `div`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1424 +assert_return( + () => invoke($0, `div`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1425 +assert_return( + () => invoke($0, `div`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1426 +assert_return( + () => invoke($0, `div`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1427 +assert_return( + () => invoke($0, `div`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1428 +assert_return( + () => invoke($0, `div`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1429 +assert_return( + () => invoke($0, `div`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1430 +assert_return( + () => invoke($0, `div`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1431 +assert_return( + () => invoke($0, `div`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("f64", 12.566370614359172)], +); + +// ./test/core/f64.wast:1432 +assert_return( + () => invoke($0, `div`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("f64", -12.566370614359172)], +); + +// ./test/core/f64.wast:1433 +assert_return( + () => invoke($0, `div`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("f64", -12.566370614359172)], +); + +// ./test/core/f64.wast:1434 +assert_return( + () => invoke($0, `div`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("f64", 12.566370614359172)], +); + +// ./test/core/f64.wast:1435 +assert_return( + () => invoke($0, `div`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:1436 +assert_return( + () => invoke($0, `div`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1437 +assert_return( + () => invoke($0, `div`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1438 +assert_return( + () => invoke($0, `div`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:1439 +assert_return( + () => invoke($0, `div`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:1440 +assert_return( + () => invoke($0, `div`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1441 +assert_return( + () => invoke($0, `div`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1442 +assert_return( + () => invoke($0, `div`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:1443 +assert_return( + () => invoke($0, `div`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349513784379046), + ], +); + +// ./test/core/f64.wast:1444 +assert_return( + () => invoke($0, `div`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349513784379046), + ], +); + +// ./test/core/f64.wast:1445 +assert_return( + () => invoke($0, `div`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349513784379046), + ], +); + +// ./test/core/f64.wast:1446 +assert_return( + () => invoke($0, `div`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349513784379046), + ], +); + +// ./test/core/f64.wast:1447 +assert_return( + () => invoke($0, `div`, [value("f64", -6.283185307179586), value("f64", -Infinity)]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1448 +assert_return( + () => invoke($0, `div`, [value("f64", -6.283185307179586), value("f64", Infinity)]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1449 +assert_return( + () => invoke($0, `div`, [value("f64", 6.283185307179586), value("f64", -Infinity)]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1450 +assert_return( + () => invoke($0, `div`, [value("f64", 6.283185307179586), value("f64", Infinity)]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1451 +assert_return( + () => invoke($0, `div`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1452 +assert_return( + () => invoke($0, `div`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1453 +assert_return( + () => invoke($0, `div`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1454 +assert_return( + () => invoke($0, `div`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1455 +assert_return( + () => invoke($0, `div`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1456 +assert_return( + () => invoke($0, `div`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1457 +assert_return( + () => invoke($0, `div`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1458 +assert_return( + () => invoke($0, `div`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1459 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1460 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1461 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1462 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1463 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1464 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1465 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1466 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1467 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1468 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1469 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1470 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1471 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1472 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1473 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1474 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1475 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1476 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1477 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1478 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1479 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [ + value("f64", 28611174857570280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1480 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [ + value("f64", -28611174857570280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1481 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -28611174857570280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1482 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 28611174857570280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1483 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:1484 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1485 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1486 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:1487 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1488 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1489 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1490 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1491 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1492 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1493 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1494 +assert_return( + () => invoke($0, `div`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1495 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1496 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1497 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1498 +assert_return( + () => invoke($0, `div`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1499 +assert_return( + () => invoke($0, `div`, [value("f64", -Infinity), value("f64", -0)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1500 +assert_return( + () => invoke($0, `div`, [value("f64", -Infinity), value("f64", 0)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1501 +assert_return( + () => invoke($0, `div`, [value("f64", Infinity), value("f64", -0)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1502 +assert_return( + () => invoke($0, `div`, [value("f64", Infinity), value("f64", 0)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1503 +assert_return( + () => invoke($0, `div`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1504 +assert_return( + () => invoke($0, `div`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1505 +assert_return( + () => invoke($0, `div`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1506 +assert_return( + () => invoke($0, `div`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1507 +assert_return( + () => invoke($0, `div`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1508 +assert_return( + () => invoke($0, `div`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1509 +assert_return( + () => invoke($0, `div`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1510 +assert_return( + () => invoke($0, `div`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1511 +assert_return( + () => invoke($0, `div`, [value("f64", -Infinity), value("f64", -0.5)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1512 +assert_return( + () => invoke($0, `div`, [value("f64", -Infinity), value("f64", 0.5)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1513 +assert_return( + () => invoke($0, `div`, [value("f64", Infinity), value("f64", -0.5)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1514 +assert_return( + () => invoke($0, `div`, [value("f64", Infinity), value("f64", 0.5)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1515 +assert_return( + () => invoke($0, `div`, [value("f64", -Infinity), value("f64", -1)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1516 +assert_return( + () => invoke($0, `div`, [value("f64", -Infinity), value("f64", 1)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1517 +assert_return( + () => invoke($0, `div`, [value("f64", Infinity), value("f64", -1)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1518 +assert_return( + () => invoke($0, `div`, [value("f64", Infinity), value("f64", 1)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1519 +assert_return( + () => invoke($0, `div`, [value("f64", -Infinity), value("f64", -6.283185307179586)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1520 +assert_return( + () => invoke($0, `div`, [value("f64", -Infinity), value("f64", 6.283185307179586)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1521 +assert_return( + () => invoke($0, `div`, [value("f64", Infinity), value("f64", -6.283185307179586)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1522 +assert_return( + () => invoke($0, `div`, [value("f64", Infinity), value("f64", 6.283185307179586)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1523 +assert_return( + () => invoke($0, `div`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1524 +assert_return( + () => invoke($0, `div`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1525 +assert_return( + () => invoke($0, `div`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1526 +assert_return( + () => invoke($0, `div`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1527 +assert_return( + () => invoke($0, `div`, [value("f64", -Infinity), value("f64", -Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1528 +assert_return( + () => invoke($0, `div`, [value("f64", -Infinity), value("f64", Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1529 +assert_return( + () => invoke($0, `div`, [value("f64", Infinity), value("f64", -Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1530 +assert_return( + () => invoke($0, `div`, [value("f64", Infinity), value("f64", Infinity)]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1531 +assert_return( + () => invoke($0, `div`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1532 +assert_return( + () => invoke($0, `div`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1533 +assert_return( + () => invoke($0, `div`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1534 +assert_return( + () => invoke($0, `div`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1535 +assert_return( + () => invoke($0, `div`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1536 +assert_return( + () => invoke($0, `div`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1537 +assert_return( + () => invoke($0, `div`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1538 +assert_return( + () => invoke($0, `div`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1539 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1540 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1541 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1542 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1543 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1544 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1545 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1546 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1547 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1548 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1549 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1550 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1551 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1552 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1553 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1554 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1555 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1556 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1557 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1558 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1559 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1560 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1561 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1562 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1563 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1564 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1565 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1566 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1567 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1568 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1569 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1570 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1571 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1572 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1573 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1574 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1575 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1576 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1577 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1578 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1579 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1580 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1581 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1582 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1583 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1584 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1585 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1586 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1587 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1588 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1589 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1590 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1591 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1592 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1593 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1594 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1595 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1596 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1597 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1598 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1599 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1600 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1601 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1602 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1603 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1604 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1605 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1606 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1607 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1608 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1609 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1610 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1611 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1612 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1613 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1614 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1615 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1616 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1617 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1618 +assert_return( + () => invoke($0, `div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1619 +assert_return(() => invoke($0, `min`, [value("f64", -0), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1620 +assert_return(() => invoke($0, `min`, [value("f64", -0), value("f64", 0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1621 +assert_return(() => invoke($0, `min`, [value("f64", 0), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1622 +assert_return(() => invoke($0, `min`, [value("f64", 0), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1623 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1624 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1625 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1626 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1627 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1628 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1629 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1630 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1631 +assert_return(() => invoke($0, `min`, [value("f64", -0), value("f64", -0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:1632 +assert_return(() => invoke($0, `min`, [value("f64", -0), value("f64", 0.5)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1633 +assert_return(() => invoke($0, `min`, [value("f64", 0), value("f64", -0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:1634 +assert_return(() => invoke($0, `min`, [value("f64", 0), value("f64", 0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1635 +assert_return(() => invoke($0, `min`, [value("f64", -0), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1636 +assert_return(() => invoke($0, `min`, [value("f64", -0), value("f64", 1)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1637 +assert_return(() => invoke($0, `min`, [value("f64", 0), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1638 +assert_return(() => invoke($0, `min`, [value("f64", 0), value("f64", 1)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1639 +assert_return( + () => invoke($0, `min`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1640 +assert_return( + () => invoke($0, `min`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1641 +assert_return( + () => invoke($0, `min`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1642 +assert_return( + () => invoke($0, `min`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1643 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1644 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1645 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1646 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1647 +assert_return( + () => invoke($0, `min`, [value("f64", -0), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1648 +assert_return(() => invoke($0, `min`, [value("f64", -0), value("f64", Infinity)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1649 +assert_return( + () => invoke($0, `min`, [value("f64", 0), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1650 +assert_return(() => invoke($0, `min`, [value("f64", 0), value("f64", Infinity)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1651 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1652 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1653 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1654 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1655 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1656 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1657 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1658 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1659 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1660 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1661 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1662 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1663 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1664 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1665 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1666 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1667 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1668 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1669 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1670 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1671 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1672 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1673 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1674 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1675 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1676 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1677 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1678 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1679 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1680 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1681 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1682 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1683 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1684 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1685 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1686 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1687 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1688 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1689 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1690 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1691 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1692 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1693 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1694 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1695 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1696 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1697 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1698 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1699 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1700 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1701 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1702 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1703 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1704 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1705 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1706 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1707 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1708 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1709 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1710 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1711 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1712 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1713 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1714 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1715 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1716 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1717 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1718 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1719 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1720 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1721 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1722 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1723 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1724 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1725 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1726 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1727 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1728 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1729 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1730 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1731 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1732 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1733 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1734 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1735 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1736 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1737 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1738 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1739 +assert_return(() => invoke($0, `min`, [value("f64", -0.5), value("f64", -0)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:1740 +assert_return(() => invoke($0, `min`, [value("f64", -0.5), value("f64", 0)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:1741 +assert_return(() => invoke($0, `min`, [value("f64", 0.5), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1742 +assert_return(() => invoke($0, `min`, [value("f64", 0.5), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1743 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1744 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1745 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1746 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1747 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1748 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1749 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1750 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1751 +assert_return(() => invoke($0, `min`, [value("f64", -0.5), value("f64", -0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:1752 +assert_return(() => invoke($0, `min`, [value("f64", -0.5), value("f64", 0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:1753 +assert_return(() => invoke($0, `min`, [value("f64", 0.5), value("f64", -0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:1754 +assert_return(() => invoke($0, `min`, [value("f64", 0.5), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:1755 +assert_return(() => invoke($0, `min`, [value("f64", -0.5), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1756 +assert_return(() => invoke($0, `min`, [value("f64", -0.5), value("f64", 1)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:1757 +assert_return(() => invoke($0, `min`, [value("f64", 0.5), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1758 +assert_return(() => invoke($0, `min`, [value("f64", 0.5), value("f64", 1)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:1759 +assert_return( + () => invoke($0, `min`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1760 +assert_return( + () => invoke($0, `min`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1761 +assert_return( + () => invoke($0, `min`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1762 +assert_return( + () => invoke($0, `min`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:1763 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1764 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1765 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1766 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:1767 +assert_return( + () => invoke($0, `min`, [value("f64", -0.5), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1768 +assert_return( + () => invoke($0, `min`, [value("f64", -0.5), value("f64", Infinity)]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1769 +assert_return( + () => invoke($0, `min`, [value("f64", 0.5), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1770 +assert_return(() => invoke($0, `min`, [value("f64", 0.5), value("f64", Infinity)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:1771 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1772 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1773 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1774 +assert_return( + () => invoke($0, `min`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1775 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1776 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1777 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1778 +assert_return( + () => invoke($0, `min`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1779 +assert_return(() => invoke($0, `min`, [value("f64", -1), value("f64", -0)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1780 +assert_return(() => invoke($0, `min`, [value("f64", -1), value("f64", 0)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1781 +assert_return(() => invoke($0, `min`, [value("f64", 1), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1782 +assert_return(() => invoke($0, `min`, [value("f64", 1), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1783 +assert_return( + () => invoke($0, `min`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1784 +assert_return( + () => invoke($0, `min`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1785 +assert_return( + () => invoke($0, `min`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1786 +assert_return( + () => invoke($0, `min`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1787 +assert_return( + () => invoke($0, `min`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1788 +assert_return( + () => invoke($0, `min`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1789 +assert_return( + () => invoke($0, `min`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1790 +assert_return( + () => invoke($0, `min`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1791 +assert_return(() => invoke($0, `min`, [value("f64", -1), value("f64", -0.5)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1792 +assert_return(() => invoke($0, `min`, [value("f64", -1), value("f64", 0.5)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1793 +assert_return(() => invoke($0, `min`, [value("f64", 1), value("f64", -0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:1794 +assert_return(() => invoke($0, `min`, [value("f64", 1), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:1795 +assert_return(() => invoke($0, `min`, [value("f64", -1), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1796 +assert_return(() => invoke($0, `min`, [value("f64", -1), value("f64", 1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1797 +assert_return(() => invoke($0, `min`, [value("f64", 1), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1798 +assert_return(() => invoke($0, `min`, [value("f64", 1), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:1799 +assert_return( + () => invoke($0, `min`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1800 +assert_return( + () => invoke($0, `min`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1801 +assert_return( + () => invoke($0, `min`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1802 +assert_return( + () => invoke($0, `min`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:1803 +assert_return( + () => invoke($0, `min`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1804 +assert_return( + () => invoke($0, `min`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1805 +assert_return( + () => invoke($0, `min`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1806 +assert_return( + () => invoke($0, `min`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:1807 +assert_return( + () => invoke($0, `min`, [value("f64", -1), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1808 +assert_return(() => invoke($0, `min`, [value("f64", -1), value("f64", Infinity)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1809 +assert_return( + () => invoke($0, `min`, [value("f64", 1), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1810 +assert_return(() => invoke($0, `min`, [value("f64", 1), value("f64", Infinity)]), [value("f64", 1)]); + +// ./test/core/f64.wast:1811 +assert_return( + () => invoke($0, `min`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1812 +assert_return( + () => invoke($0, `min`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1813 +assert_return( + () => invoke($0, `min`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1814 +assert_return( + () => invoke($0, `min`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1815 +assert_return( + () => invoke($0, `min`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1816 +assert_return( + () => invoke($0, `min`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1817 +assert_return( + () => invoke($0, `min`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1818 +assert_return( + () => invoke($0, `min`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1819 +assert_return( + () => invoke($0, `min`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1820 +assert_return( + () => invoke($0, `min`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1821 +assert_return( + () => invoke($0, `min`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1822 +assert_return( + () => invoke($0, `min`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1823 +assert_return( + () => invoke($0, `min`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1824 +assert_return( + () => invoke($0, `min`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1825 +assert_return( + () => invoke($0, `min`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1826 +assert_return( + () => invoke($0, `min`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1827 +assert_return( + () => invoke($0, `min`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1828 +assert_return( + () => invoke($0, `min`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1829 +assert_return( + () => invoke($0, `min`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1830 +assert_return( + () => invoke($0, `min`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1831 +assert_return( + () => invoke($0, `min`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1832 +assert_return( + () => invoke($0, `min`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1833 +assert_return( + () => invoke($0, `min`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1834 +assert_return( + () => invoke($0, `min`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:1835 +assert_return( + () => invoke($0, `min`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1836 +assert_return( + () => invoke($0, `min`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1837 +assert_return( + () => invoke($0, `min`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1838 +assert_return( + () => invoke($0, `min`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:1839 +assert_return( + () => invoke($0, `min`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1840 +assert_return( + () => invoke($0, `min`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1841 +assert_return( + () => invoke($0, `min`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1842 +assert_return( + () => invoke($0, `min`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:1843 +assert_return( + () => invoke($0, `min`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1844 +assert_return( + () => invoke($0, `min`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1845 +assert_return( + () => invoke($0, `min`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1846 +assert_return( + () => invoke($0, `min`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:1847 +assert_return( + () => invoke($0, `min`, [value("f64", -6.283185307179586), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1848 +assert_return( + () => invoke($0, `min`, [value("f64", -6.283185307179586), value("f64", Infinity)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1849 +assert_return( + () => invoke($0, `min`, [value("f64", 6.283185307179586), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1850 +assert_return( + () => invoke($0, `min`, [value("f64", 6.283185307179586), value("f64", Infinity)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:1851 +assert_return( + () => invoke($0, `min`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1852 +assert_return( + () => invoke($0, `min`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1853 +assert_return( + () => invoke($0, `min`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1854 +assert_return( + () => invoke($0, `min`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1855 +assert_return( + () => invoke($0, `min`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1856 +assert_return( + () => invoke($0, `min`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1857 +assert_return( + () => invoke($0, `min`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1858 +assert_return( + () => invoke($0, `min`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1859 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1860 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1861 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:1862 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:1863 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1864 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1865 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1866 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1867 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1868 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1869 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1870 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1871 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1872 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1873 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1874 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:1875 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1876 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1877 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:1878 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:1879 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1880 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1881 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1882 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:1883 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1884 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1885 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1886 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1887 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1888 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1889 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1890 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1891 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1892 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1893 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1894 +assert_return( + () => invoke($0, `min`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1895 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1896 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1897 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1898 +assert_return( + () => invoke($0, `min`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1899 +assert_return( + () => invoke($0, `min`, [value("f64", -Infinity), value("f64", -0)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1900 +assert_return( + () => invoke($0, `min`, [value("f64", -Infinity), value("f64", 0)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1901 +assert_return(() => invoke($0, `min`, [value("f64", Infinity), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:1902 +assert_return(() => invoke($0, `min`, [value("f64", Infinity), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:1903 +assert_return( + () => invoke($0, `min`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1904 +assert_return( + () => invoke($0, `min`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1905 +assert_return( + () => invoke($0, `min`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1906 +assert_return( + () => invoke($0, `min`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:1907 +assert_return( + () => invoke($0, `min`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1908 +assert_return( + () => invoke($0, `min`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1909 +assert_return( + () => invoke($0, `min`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1910 +assert_return( + () => invoke($0, `min`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:1911 +assert_return( + () => invoke($0, `min`, [value("f64", -Infinity), value("f64", -0.5)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1912 +assert_return( + () => invoke($0, `min`, [value("f64", -Infinity), value("f64", 0.5)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1913 +assert_return( + () => invoke($0, `min`, [value("f64", Infinity), value("f64", -0.5)]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:1914 +assert_return(() => invoke($0, `min`, [value("f64", Infinity), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:1915 +assert_return( + () => invoke($0, `min`, [value("f64", -Infinity), value("f64", -1)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1916 +assert_return( + () => invoke($0, `min`, [value("f64", -Infinity), value("f64", 1)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1917 +assert_return(() => invoke($0, `min`, [value("f64", Infinity), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:1918 +assert_return(() => invoke($0, `min`, [value("f64", Infinity), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:1919 +assert_return( + () => invoke($0, `min`, [value("f64", -Infinity), value("f64", -6.283185307179586)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1920 +assert_return( + () => invoke($0, `min`, [value("f64", -Infinity), value("f64", 6.283185307179586)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1921 +assert_return( + () => invoke($0, `min`, [value("f64", Infinity), value("f64", -6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:1922 +assert_return( + () => invoke($0, `min`, [value("f64", Infinity), value("f64", 6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:1923 +assert_return( + () => invoke($0, `min`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1924 +assert_return( + () => invoke($0, `min`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1925 +assert_return( + () => invoke($0, `min`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1926 +assert_return( + () => invoke($0, `min`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:1927 +assert_return( + () => invoke($0, `min`, [value("f64", -Infinity), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1928 +assert_return( + () => invoke($0, `min`, [value("f64", -Infinity), value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1929 +assert_return( + () => invoke($0, `min`, [value("f64", Infinity), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:1930 +assert_return( + () => invoke($0, `min`, [value("f64", Infinity), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:1931 +assert_return( + () => invoke($0, `min`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1932 +assert_return( + () => invoke($0, `min`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1933 +assert_return( + () => invoke($0, `min`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1934 +assert_return( + () => invoke($0, `min`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1935 +assert_return( + () => invoke($0, `min`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1936 +assert_return( + () => invoke($0, `min`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1937 +assert_return( + () => invoke($0, `min`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1938 +assert_return( + () => invoke($0, `min`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1939 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1940 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1941 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1942 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1943 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1944 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1945 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1946 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1947 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1948 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1949 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1950 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1951 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1952 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1953 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1954 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1955 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1956 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1957 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1958 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1959 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1960 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1961 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1962 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1963 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1964 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1965 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1966 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1967 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1968 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1969 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1970 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1971 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1972 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1973 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1974 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1975 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1976 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1977 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1978 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1979 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1980 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1981 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1982 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1983 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1984 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1985 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1986 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1987 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1988 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1989 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1990 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1991 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1992 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1993 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1994 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1995 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1996 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1997 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:1998 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:1999 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2000 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2001 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2002 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2003 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2004 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2005 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2006 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2007 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2008 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2009 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2010 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2011 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2012 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2013 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2014 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2015 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2016 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2017 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2018 +assert_return( + () => invoke($0, `min`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2019 +assert_return(() => invoke($0, `max`, [value("f64", -0), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2020 +assert_return(() => invoke($0, `max`, [value("f64", -0), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2021 +assert_return(() => invoke($0, `max`, [value("f64", 0), value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2022 +assert_return(() => invoke($0, `max`, [value("f64", 0), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2023 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2024 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2025 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2026 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2027 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2028 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2029 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2030 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2031 +assert_return(() => invoke($0, `max`, [value("f64", -0), value("f64", -0.5)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2032 +assert_return(() => invoke($0, `max`, [value("f64", -0), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:2033 +assert_return(() => invoke($0, `max`, [value("f64", 0), value("f64", -0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2034 +assert_return(() => invoke($0, `max`, [value("f64", 0), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:2035 +assert_return(() => invoke($0, `max`, [value("f64", -0), value("f64", -1)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2036 +assert_return(() => invoke($0, `max`, [value("f64", -0), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2037 +assert_return(() => invoke($0, `max`, [value("f64", 0), value("f64", -1)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2038 +assert_return(() => invoke($0, `max`, [value("f64", 0), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2039 +assert_return( + () => invoke($0, `max`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2040 +assert_return( + () => invoke($0, `max`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2041 +assert_return( + () => invoke($0, `max`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2042 +assert_return( + () => invoke($0, `max`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2043 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2044 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2045 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2046 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2047 +assert_return(() => invoke($0, `max`, [value("f64", -0), value("f64", -Infinity)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2048 +assert_return( + () => invoke($0, `max`, [value("f64", -0), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2049 +assert_return(() => invoke($0, `max`, [value("f64", 0), value("f64", -Infinity)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2050 +assert_return( + () => invoke($0, `max`, [value("f64", 0), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2051 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2052 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2053 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2054 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2055 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2056 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2057 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2058 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2059 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2060 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2061 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2062 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2063 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2064 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2065 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2066 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2067 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2068 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2069 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2070 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2071 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2072 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2073 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2074 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2075 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2076 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2077 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2078 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2079 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2080 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2081 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2082 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2083 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2084 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2085 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2086 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2087 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2088 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2089 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2090 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2091 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2092 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2093 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2094 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2095 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2096 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2097 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2098 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2099 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2100 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2101 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2102 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2103 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2104 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2105 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2106 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2107 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2108 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2109 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2110 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2111 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2112 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2113 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2114 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2115 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2116 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2117 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2118 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2119 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2120 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2121 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2122 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2123 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2124 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2125 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2126 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2127 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2128 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2129 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2130 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2131 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2132 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2133 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2134 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2135 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2136 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2137 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2138 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2139 +assert_return(() => invoke($0, `max`, [value("f64", -0.5), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2140 +assert_return(() => invoke($0, `max`, [value("f64", -0.5), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2141 +assert_return(() => invoke($0, `max`, [value("f64", 0.5), value("f64", -0)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:2142 +assert_return(() => invoke($0, `max`, [value("f64", 0.5), value("f64", 0)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:2143 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2144 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2145 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2146 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2147 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2148 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2149 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2150 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2151 +assert_return(() => invoke($0, `max`, [value("f64", -0.5), value("f64", -0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:2152 +assert_return(() => invoke($0, `max`, [value("f64", -0.5), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:2153 +assert_return(() => invoke($0, `max`, [value("f64", 0.5), value("f64", -0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:2154 +assert_return(() => invoke($0, `max`, [value("f64", 0.5), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:2155 +assert_return(() => invoke($0, `max`, [value("f64", -0.5), value("f64", -1)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:2156 +assert_return(() => invoke($0, `max`, [value("f64", -0.5), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2157 +assert_return(() => invoke($0, `max`, [value("f64", 0.5), value("f64", -1)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:2158 +assert_return(() => invoke($0, `max`, [value("f64", 0.5), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2159 +assert_return( + () => invoke($0, `max`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:2160 +assert_return( + () => invoke($0, `max`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2161 +assert_return( + () => invoke($0, `max`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2162 +assert_return( + () => invoke($0, `max`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2163 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:2164 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2165 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2166 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2167 +assert_return( + () => invoke($0, `max`, [value("f64", -0.5), value("f64", -Infinity)]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:2168 +assert_return( + () => invoke($0, `max`, [value("f64", -0.5), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2169 +assert_return( + () => invoke($0, `max`, [value("f64", 0.5), value("f64", -Infinity)]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2170 +assert_return( + () => invoke($0, `max`, [value("f64", 0.5), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2171 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2172 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2173 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2174 +assert_return( + () => invoke($0, `max`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2175 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2176 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2177 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2178 +assert_return( + () => invoke($0, `max`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2179 +assert_return(() => invoke($0, `max`, [value("f64", -1), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2180 +assert_return(() => invoke($0, `max`, [value("f64", -1), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2181 +assert_return(() => invoke($0, `max`, [value("f64", 1), value("f64", -0)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2182 +assert_return(() => invoke($0, `max`, [value("f64", 1), value("f64", 0)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2183 +assert_return( + () => invoke($0, `max`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2184 +assert_return( + () => invoke($0, `max`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2185 +assert_return( + () => invoke($0, `max`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2186 +assert_return( + () => invoke($0, `max`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2187 +assert_return( + () => invoke($0, `max`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2188 +assert_return( + () => invoke($0, `max`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2189 +assert_return( + () => invoke($0, `max`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2190 +assert_return( + () => invoke($0, `max`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2191 +assert_return(() => invoke($0, `max`, [value("f64", -1), value("f64", -0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64.wast:2192 +assert_return(() => invoke($0, `max`, [value("f64", -1), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64.wast:2193 +assert_return(() => invoke($0, `max`, [value("f64", 1), value("f64", -0.5)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2194 +assert_return(() => invoke($0, `max`, [value("f64", 1), value("f64", 0.5)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2195 +assert_return(() => invoke($0, `max`, [value("f64", -1), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:2196 +assert_return(() => invoke($0, `max`, [value("f64", -1), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2197 +assert_return(() => invoke($0, `max`, [value("f64", 1), value("f64", -1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2198 +assert_return(() => invoke($0, `max`, [value("f64", 1), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2199 +assert_return( + () => invoke($0, `max`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:2200 +assert_return( + () => invoke($0, `max`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2201 +assert_return( + () => invoke($0, `max`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2202 +assert_return( + () => invoke($0, `max`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2203 +assert_return( + () => invoke($0, `max`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:2204 +assert_return( + () => invoke($0, `max`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2205 +assert_return( + () => invoke($0, `max`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2206 +assert_return( + () => invoke($0, `max`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2207 +assert_return(() => invoke($0, `max`, [value("f64", -1), value("f64", -Infinity)]), [value("f64", -1)]); + +// ./test/core/f64.wast:2208 +assert_return( + () => invoke($0, `max`, [value("f64", -1), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2209 +assert_return(() => invoke($0, `max`, [value("f64", 1), value("f64", -Infinity)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2210 +assert_return( + () => invoke($0, `max`, [value("f64", 1), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2211 +assert_return( + () => invoke($0, `max`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2212 +assert_return( + () => invoke($0, `max`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2213 +assert_return( + () => invoke($0, `max`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2214 +assert_return( + () => invoke($0, `max`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2215 +assert_return( + () => invoke($0, `max`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2216 +assert_return( + () => invoke($0, `max`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2217 +assert_return( + () => invoke($0, `max`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2218 +assert_return( + () => invoke($0, `max`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2219 +assert_return( + () => invoke($0, `max`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2220 +assert_return( + () => invoke($0, `max`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2221 +assert_return( + () => invoke($0, `max`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2222 +assert_return( + () => invoke($0, `max`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2223 +assert_return( + () => invoke($0, `max`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2224 +assert_return( + () => invoke($0, `max`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2225 +assert_return( + () => invoke($0, `max`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2226 +assert_return( + () => invoke($0, `max`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2227 +assert_return( + () => invoke($0, `max`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2228 +assert_return( + () => invoke($0, `max`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2229 +assert_return( + () => invoke($0, `max`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2230 +assert_return( + () => invoke($0, `max`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2231 +assert_return( + () => invoke($0, `max`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:2232 +assert_return( + () => invoke($0, `max`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2233 +assert_return( + () => invoke($0, `max`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2234 +assert_return( + () => invoke($0, `max`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2235 +assert_return( + () => invoke($0, `max`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:2236 +assert_return( + () => invoke($0, `max`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2237 +assert_return( + () => invoke($0, `max`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2238 +assert_return( + () => invoke($0, `max`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2239 +assert_return( + () => invoke($0, `max`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:2240 +assert_return( + () => invoke($0, `max`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2241 +assert_return( + () => invoke($0, `max`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2242 +assert_return( + () => invoke($0, `max`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2243 +assert_return( + () => invoke($0, `max`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:2244 +assert_return( + () => invoke($0, `max`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2245 +assert_return( + () => invoke($0, `max`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2246 +assert_return( + () => invoke($0, `max`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2247 +assert_return( + () => invoke($0, `max`, [value("f64", -6.283185307179586), value("f64", -Infinity)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:2248 +assert_return( + () => invoke($0, `max`, [value("f64", -6.283185307179586), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2249 +assert_return( + () => invoke($0, `max`, [value("f64", 6.283185307179586), value("f64", -Infinity)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2250 +assert_return( + () => invoke($0, `max`, [value("f64", 6.283185307179586), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2251 +assert_return( + () => invoke($0, `max`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2252 +assert_return( + () => invoke($0, `max`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2253 +assert_return( + () => invoke($0, `max`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2254 +assert_return( + () => invoke($0, `max`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2255 +assert_return( + () => invoke($0, `max`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2256 +assert_return( + () => invoke($0, `max`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2257 +assert_return( + () => invoke($0, `max`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2258 +assert_return( + () => invoke($0, `max`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2259 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2260 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2261 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2262 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2263 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2264 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2265 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2266 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2267 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2268 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2269 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2270 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2271 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:2272 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2273 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2274 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2275 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:2276 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2277 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2278 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2279 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:2280 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2281 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2282 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2283 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2284 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2285 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2286 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2287 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2288 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2289 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2290 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2291 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2292 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2293 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2294 +assert_return( + () => invoke($0, `max`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2295 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2296 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2297 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2298 +assert_return( + () => invoke($0, `max`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2299 +assert_return(() => invoke($0, `max`, [value("f64", -Infinity), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2300 +assert_return(() => invoke($0, `max`, [value("f64", -Infinity), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2301 +assert_return( + () => invoke($0, `max`, [value("f64", Infinity), value("f64", -0)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2302 +assert_return( + () => invoke($0, `max`, [value("f64", Infinity), value("f64", 0)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2303 +assert_return( + () => invoke($0, `max`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2304 +assert_return( + () => invoke($0, `max`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64.wast:2305 +assert_return( + () => invoke($0, `max`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2306 +assert_return( + () => invoke($0, `max`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2307 +assert_return( + () => invoke($0, `max`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2308 +assert_return( + () => invoke($0, `max`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64.wast:2309 +assert_return( + () => invoke($0, `max`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2310 +assert_return( + () => invoke($0, `max`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2311 +assert_return( + () => invoke($0, `max`, [value("f64", -Infinity), value("f64", -0.5)]), + [value("f64", -0.5)], +); + +// ./test/core/f64.wast:2312 +assert_return( + () => invoke($0, `max`, [value("f64", -Infinity), value("f64", 0.5)]), + [value("f64", 0.5)], +); + +// ./test/core/f64.wast:2313 +assert_return( + () => invoke($0, `max`, [value("f64", Infinity), value("f64", -0.5)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2314 +assert_return( + () => invoke($0, `max`, [value("f64", Infinity), value("f64", 0.5)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2315 +assert_return(() => invoke($0, `max`, [value("f64", -Infinity), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:2316 +assert_return(() => invoke($0, `max`, [value("f64", -Infinity), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2317 +assert_return( + () => invoke($0, `max`, [value("f64", Infinity), value("f64", -1)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2318 +assert_return( + () => invoke($0, `max`, [value("f64", Infinity), value("f64", 1)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2319 +assert_return( + () => invoke($0, `max`, [value("f64", -Infinity), value("f64", -6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64.wast:2320 +assert_return( + () => invoke($0, `max`, [value("f64", -Infinity), value("f64", 6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64.wast:2321 +assert_return( + () => invoke($0, `max`, [value("f64", Infinity), value("f64", -6.283185307179586)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2322 +assert_return( + () => invoke($0, `max`, [value("f64", Infinity), value("f64", 6.283185307179586)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2323 +assert_return( + () => invoke($0, `max`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2324 +assert_return( + () => invoke($0, `max`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2325 +assert_return( + () => invoke($0, `max`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2326 +assert_return( + () => invoke($0, `max`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2327 +assert_return( + () => invoke($0, `max`, [value("f64", -Infinity), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64.wast:2328 +assert_return( + () => invoke($0, `max`, [value("f64", -Infinity), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2329 +assert_return( + () => invoke($0, `max`, [value("f64", Infinity), value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2330 +assert_return( + () => invoke($0, `max`, [value("f64", Infinity), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64.wast:2331 +assert_return( + () => invoke($0, `max`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2332 +assert_return( + () => invoke($0, `max`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2333 +assert_return( + () => invoke($0, `max`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2334 +assert_return( + () => invoke($0, `max`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2335 +assert_return( + () => invoke($0, `max`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2336 +assert_return( + () => invoke($0, `max`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2337 +assert_return( + () => invoke($0, `max`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2338 +assert_return( + () => invoke($0, `max`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2339 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2340 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2341 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2342 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2343 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2344 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2345 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2346 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2347 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2348 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2349 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2350 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2351 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2352 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2353 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2354 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2355 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2356 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2357 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2358 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2359 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2360 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2361 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2362 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2363 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2364 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2365 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2366 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2367 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2368 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2369 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2370 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.5), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2371 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2372 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2373 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2374 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2375 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2376 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2377 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2378 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 1), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2379 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2380 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2381 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2382 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2383 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2384 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2385 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2386 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 6.283185307179586), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2387 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2388 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2389 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2390 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2391 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2392 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2393 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2394 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2395 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2396 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2397 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2398 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2399 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2400 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2401 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2402 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", Infinity), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2403 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2404 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2405 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2406 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2407 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2408 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2409 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2410 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2411 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2412 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2413 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2414 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2415 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2416 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2417 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2418 +assert_return( + () => invoke($0, `max`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2419 +assert_return(() => invoke($0, `sqrt`, [value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2420 +assert_return(() => invoke($0, `sqrt`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2421 +assert_return( + () => invoke($0, `sqrt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2422 +assert_return( + () => invoke($0, `sqrt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022227587494850775), + ], +); + +// ./test/core/f64.wast:2423 +assert_return( + () => invoke($0, `sqrt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2424 +assert_return( + () => invoke($0, `sqrt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014916681462400413), + ], +); + +// ./test/core/f64.wast:2425 +assert_return(() => invoke($0, `sqrt`, [value("f64", -0.5)]), [`canonical_nan`]); + +// ./test/core/f64.wast:2426 +assert_return(() => invoke($0, `sqrt`, [value("f64", 0.5)]), [value("f64", 0.7071067811865476)]); + +// ./test/core/f64.wast:2427 +assert_return(() => invoke($0, `sqrt`, [value("f64", -1)]), [`canonical_nan`]); + +// ./test/core/f64.wast:2428 +assert_return(() => invoke($0, `sqrt`, [value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2429 +assert_return(() => invoke($0, `sqrt`, [value("f64", -6.283185307179586)]), [`canonical_nan`]); + +// ./test/core/f64.wast:2430 +assert_return( + () => invoke($0, `sqrt`, [value("f64", 6.283185307179586)]), + [value("f64", 2.5066282746310002)], +); + +// ./test/core/f64.wast:2431 +assert_return( + () => invoke($0, `sqrt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2432 +assert_return( + () => invoke($0, `sqrt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 13407807929942596000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2433 +assert_return(() => invoke($0, `sqrt`, [value("f64", -Infinity)]), [`canonical_nan`]); + +// ./test/core/f64.wast:2434 +assert_return(() => invoke($0, `sqrt`, [value("f64", Infinity)]), [value("f64", Infinity)]); + +// ./test/core/f64.wast:2435 +assert_return( + () => invoke($0, `sqrt`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2436 +assert_return( + () => invoke($0, `sqrt`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2437 +assert_return( + () => invoke($0, `sqrt`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2438 +assert_return( + () => invoke($0, `sqrt`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2439 +assert_return(() => invoke($0, `floor`, [value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2440 +assert_return(() => invoke($0, `floor`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2441 +assert_return( + () => invoke($0, `floor`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:2442 +assert_return( + () => invoke($0, `floor`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2443 +assert_return( + () => invoke($0, `floor`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -1)], +); + +// ./test/core/f64.wast:2444 +assert_return( + () => invoke($0, `floor`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2445 +assert_return(() => invoke($0, `floor`, [value("f64", -0.5)]), [value("f64", -1)]); + +// ./test/core/f64.wast:2446 +assert_return(() => invoke($0, `floor`, [value("f64", 0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2447 +assert_return(() => invoke($0, `floor`, [value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:2448 +assert_return(() => invoke($0, `floor`, [value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2449 +assert_return(() => invoke($0, `floor`, [value("f64", -6.283185307179586)]), [value("f64", -7)]); + +// ./test/core/f64.wast:2450 +assert_return(() => invoke($0, `floor`, [value("f64", 6.283185307179586)]), [value("f64", 6)]); + +// ./test/core/f64.wast:2451 +assert_return( + () => invoke($0, `floor`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2452 +assert_return( + () => invoke($0, `floor`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2453 +assert_return(() => invoke($0, `floor`, [value("f64", -Infinity)]), [value("f64", -Infinity)]); + +// ./test/core/f64.wast:2454 +assert_return(() => invoke($0, `floor`, [value("f64", Infinity)]), [value("f64", Infinity)]); + +// ./test/core/f64.wast:2455 +assert_return( + () => invoke($0, `floor`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2456 +assert_return( + () => invoke($0, `floor`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2457 +assert_return( + () => invoke($0, `floor`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2458 +assert_return( + () => invoke($0, `floor`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2459 +assert_return(() => invoke($0, `ceil`, [value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2460 +assert_return(() => invoke($0, `ceil`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2461 +assert_return( + () => invoke($0, `ceil`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2462 +assert_return( + () => invoke($0, `ceil`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2463 +assert_return( + () => invoke($0, `ceil`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2464 +assert_return( + () => invoke($0, `ceil`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 1)], +); + +// ./test/core/f64.wast:2465 +assert_return(() => invoke($0, `ceil`, [value("f64", -0.5)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2466 +assert_return(() => invoke($0, `ceil`, [value("f64", 0.5)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2467 +assert_return(() => invoke($0, `ceil`, [value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:2468 +assert_return(() => invoke($0, `ceil`, [value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2469 +assert_return(() => invoke($0, `ceil`, [value("f64", -6.283185307179586)]), [value("f64", -6)]); + +// ./test/core/f64.wast:2470 +assert_return(() => invoke($0, `ceil`, [value("f64", 6.283185307179586)]), [value("f64", 7)]); + +// ./test/core/f64.wast:2471 +assert_return( + () => invoke($0, `ceil`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2472 +assert_return( + () => invoke($0, `ceil`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2473 +assert_return(() => invoke($0, `ceil`, [value("f64", -Infinity)]), [value("f64", -Infinity)]); + +// ./test/core/f64.wast:2474 +assert_return(() => invoke($0, `ceil`, [value("f64", Infinity)]), [value("f64", Infinity)]); + +// ./test/core/f64.wast:2475 +assert_return( + () => invoke($0, `ceil`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2476 +assert_return( + () => invoke($0, `ceil`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2477 +assert_return( + () => invoke($0, `ceil`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2478 +assert_return( + () => invoke($0, `ceil`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2479 +assert_return(() => invoke($0, `trunc`, [value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2480 +assert_return(() => invoke($0, `trunc`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2481 +assert_return( + () => invoke($0, `trunc`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2482 +assert_return( + () => invoke($0, `trunc`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2483 +assert_return( + () => invoke($0, `trunc`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2484 +assert_return( + () => invoke($0, `trunc`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2485 +assert_return(() => invoke($0, `trunc`, [value("f64", -0.5)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2486 +assert_return(() => invoke($0, `trunc`, [value("f64", 0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2487 +assert_return(() => invoke($0, `trunc`, [value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:2488 +assert_return(() => invoke($0, `trunc`, [value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2489 +assert_return(() => invoke($0, `trunc`, [value("f64", -6.283185307179586)]), [value("f64", -6)]); + +// ./test/core/f64.wast:2490 +assert_return(() => invoke($0, `trunc`, [value("f64", 6.283185307179586)]), [value("f64", 6)]); + +// ./test/core/f64.wast:2491 +assert_return( + () => invoke($0, `trunc`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2492 +assert_return( + () => invoke($0, `trunc`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2493 +assert_return(() => invoke($0, `trunc`, [value("f64", -Infinity)]), [value("f64", -Infinity)]); + +// ./test/core/f64.wast:2494 +assert_return(() => invoke($0, `trunc`, [value("f64", Infinity)]), [value("f64", Infinity)]); + +// ./test/core/f64.wast:2495 +assert_return( + () => invoke($0, `trunc`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2496 +assert_return( + () => invoke($0, `trunc`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff])]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2497 +assert_return( + () => invoke($0, `trunc`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2498 +assert_return( + () => invoke($0, `trunc`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2499 +assert_return(() => invoke($0, `nearest`, [value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2500 +assert_return(() => invoke($0, `nearest`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2501 +assert_return( + () => invoke($0, `nearest`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2502 +assert_return( + () => invoke($0, `nearest`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2503 +assert_return( + () => invoke($0, `nearest`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64.wast:2504 +assert_return( + () => invoke($0, `nearest`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64.wast:2505 +assert_return(() => invoke($0, `nearest`, [value("f64", -0.5)]), [value("f64", -0)]); + +// ./test/core/f64.wast:2506 +assert_return(() => invoke($0, `nearest`, [value("f64", 0.5)]), [value("f64", 0)]); + +// ./test/core/f64.wast:2507 +assert_return(() => invoke($0, `nearest`, [value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64.wast:2508 +assert_return(() => invoke($0, `nearest`, [value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64.wast:2509 +assert_return(() => invoke($0, `nearest`, [value("f64", -6.283185307179586)]), [value("f64", -6)]); + +// ./test/core/f64.wast:2510 +assert_return(() => invoke($0, `nearest`, [value("f64", 6.283185307179586)]), [value("f64", 6)]); + +// ./test/core/f64.wast:2511 +assert_return( + () => invoke($0, `nearest`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2512 +assert_return( + () => invoke($0, `nearest`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64.wast:2513 +assert_return(() => invoke($0, `nearest`, [value("f64", -Infinity)]), [value("f64", -Infinity)]); + +// ./test/core/f64.wast:2514 +assert_return(() => invoke($0, `nearest`, [value("f64", Infinity)]), [value("f64", Infinity)]); + +// ./test/core/f64.wast:2515 +assert_return( + () => invoke($0, `nearest`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2516 +assert_return( + () => invoke($0, `nearest`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2517 +assert_return( + () => invoke($0, `nearest`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/f64.wast:2518 +assert_return( + () => invoke($0, `nearest`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/f64.wast:2523 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.add (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64.wast:2524 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.div (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64.wast:2525 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.max (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64.wast:2526 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.min (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64.wast:2527 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.mul (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64.wast:2528 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.sub (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64.wast:2529 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.ceil (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64.wast:2530 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.floor (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64.wast:2531 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.nearest (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64.wast:2532 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.sqrt (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64.wast:2533 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.trunc (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64.wast:2536 +assert_malformed( + () => instantiate(`(func (result f64) (f64.const nan:arithmetic)) `), + `unexpected token`, +); + +// ./test/core/f64.wast:2540 +assert_malformed( + () => instantiate(`(func (result f64) (f64.const nan:canonical)) `), + `unexpected token`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/f64_bitwise.wast.js b/js/src/jit-test/tests/wasm/spec/spec/f64_bitwise.wast.js new file mode 100644 index 0000000000..3fc6e365b9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/f64_bitwise.wast.js @@ -0,0 +1,3032 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/f64_bitwise.wast + +// ./test/core/f64_bitwise.wast:4 +let $0 = instantiate(`(module + (func (export "abs") (param $$x f64) (result f64) (f64.abs (local.get $$x))) + (func (export "neg") (param $$x f64) (result f64) (f64.neg (local.get $$x))) + (func (export "copysign") (param $$x f64) (param $$y f64) (result f64) (f64.copysign (local.get $$x) (local.get $$y))) +)`); + +// ./test/core/f64_bitwise.wast:10 +assert_return(() => invoke($0, `copysign`, [value("f64", -0), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64_bitwise.wast:11 +assert_return(() => invoke($0, `copysign`, [value("f64", -0), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64_bitwise.wast:12 +assert_return(() => invoke($0, `copysign`, [value("f64", 0), value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/f64_bitwise.wast:13 +assert_return(() => invoke($0, `copysign`, [value("f64", 0), value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64_bitwise.wast:14 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64_bitwise.wast:15 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64_bitwise.wast:16 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0)], +); + +// ./test/core/f64_bitwise.wast:17 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0)], +); + +// ./test/core/f64_bitwise.wast:18 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64_bitwise.wast:19 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64_bitwise.wast:20 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0)], +); + +// ./test/core/f64_bitwise.wast:21 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0)], +); + +// ./test/core/f64_bitwise.wast:22 +assert_return(() => invoke($0, `copysign`, [value("f64", -0), value("f64", -0.5)]), [value("f64", -0)]); + +// ./test/core/f64_bitwise.wast:23 +assert_return(() => invoke($0, `copysign`, [value("f64", -0), value("f64", 0.5)]), [value("f64", 0)]); + +// ./test/core/f64_bitwise.wast:24 +assert_return(() => invoke($0, `copysign`, [value("f64", 0), value("f64", -0.5)]), [value("f64", -0)]); + +// ./test/core/f64_bitwise.wast:25 +assert_return(() => invoke($0, `copysign`, [value("f64", 0), value("f64", 0.5)]), [value("f64", 0)]); + +// ./test/core/f64_bitwise.wast:26 +assert_return(() => invoke($0, `copysign`, [value("f64", -0), value("f64", -1)]), [value("f64", -0)]); + +// ./test/core/f64_bitwise.wast:27 +assert_return(() => invoke($0, `copysign`, [value("f64", -0), value("f64", 1)]), [value("f64", 0)]); + +// ./test/core/f64_bitwise.wast:28 +assert_return(() => invoke($0, `copysign`, [value("f64", 0), value("f64", -1)]), [value("f64", -0)]); + +// ./test/core/f64_bitwise.wast:29 +assert_return(() => invoke($0, `copysign`, [value("f64", 0), value("f64", 1)]), [value("f64", 0)]); + +// ./test/core/f64_bitwise.wast:30 +assert_return( + () => invoke($0, `copysign`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("f64", -0)], +); + +// ./test/core/f64_bitwise.wast:31 +assert_return( + () => invoke($0, `copysign`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("f64", 0)], +); + +// ./test/core/f64_bitwise.wast:32 +assert_return( + () => invoke($0, `copysign`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("f64", -0)], +); + +// ./test/core/f64_bitwise.wast:33 +assert_return( + () => invoke($0, `copysign`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("f64", 0)], +); + +// ./test/core/f64_bitwise.wast:34 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/f64_bitwise.wast:35 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64_bitwise.wast:36 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/f64_bitwise.wast:37 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/f64_bitwise.wast:38 +assert_return( + () => invoke($0, `copysign`, [value("f64", -0), value("f64", -Infinity)]), + [value("f64", -0)], +); + +// ./test/core/f64_bitwise.wast:39 +assert_return( + () => invoke($0, `copysign`, [value("f64", -0), value("f64", Infinity)]), + [value("f64", 0)], +); + +// ./test/core/f64_bitwise.wast:40 +assert_return( + () => invoke($0, `copysign`, [value("f64", 0), value("f64", -Infinity)]), + [value("f64", -0)], +); + +// ./test/core/f64_bitwise.wast:41 +assert_return( + () => invoke($0, `copysign`, [value("f64", 0), value("f64", Infinity)]), + [value("f64", 0)], +); + +// ./test/core/f64_bitwise.wast:42 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("f64", -0)], +); + +// ./test/core/f64_bitwise.wast:43 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("f64", 0)], +); + +// ./test/core/f64_bitwise.wast:44 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("f64", -0)], +); + +// ./test/core/f64_bitwise.wast:45 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("f64", 0)], +); + +// ./test/core/f64_bitwise.wast:46 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:47 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:48 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:49 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:50 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:51 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:52 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:53 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:54 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:55 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:56 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:57 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:58 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:59 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:60 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:61 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:62 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:63 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:64 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:65 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:66 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:67 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:68 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:69 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:70 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:71 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:72 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:73 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:74 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:75 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:76 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:77 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:78 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:79 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:80 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:81 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:82 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:83 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:84 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:85 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:86 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:87 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:88 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:89 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:90 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:91 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:92 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:93 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:94 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:95 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:96 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:97 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:98 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:99 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:100 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:101 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:102 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:103 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:104 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:105 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:106 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:107 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:108 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:109 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:110 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:111 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:112 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:113 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:114 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:115 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:116 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:117 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:118 +assert_return( + () => invoke($0, `copysign`, [value("f64", -0.5), value("f64", -0)]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:119 +assert_return(() => invoke($0, `copysign`, [value("f64", -0.5), value("f64", 0)]), [value("f64", 0.5)]); + +// ./test/core/f64_bitwise.wast:120 +assert_return(() => invoke($0, `copysign`, [value("f64", 0.5), value("f64", -0)]), [value("f64", -0.5)]); + +// ./test/core/f64_bitwise.wast:121 +assert_return(() => invoke($0, `copysign`, [value("f64", 0.5), value("f64", 0)]), [value("f64", 0.5)]); + +// ./test/core/f64_bitwise.wast:122 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:123 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:124 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:125 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:126 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:127 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:128 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:129 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:130 +assert_return( + () => invoke($0, `copysign`, [value("f64", -0.5), value("f64", -0.5)]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:131 +assert_return( + () => invoke($0, `copysign`, [value("f64", -0.5), value("f64", 0.5)]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:132 +assert_return( + () => invoke($0, `copysign`, [value("f64", 0.5), value("f64", -0.5)]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:133 +assert_return(() => invoke($0, `copysign`, [value("f64", 0.5), value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64_bitwise.wast:134 +assert_return( + () => invoke($0, `copysign`, [value("f64", -0.5), value("f64", -1)]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:135 +assert_return(() => invoke($0, `copysign`, [value("f64", -0.5), value("f64", 1)]), [value("f64", 0.5)]); + +// ./test/core/f64_bitwise.wast:136 +assert_return(() => invoke($0, `copysign`, [value("f64", 0.5), value("f64", -1)]), [value("f64", -0.5)]); + +// ./test/core/f64_bitwise.wast:137 +assert_return(() => invoke($0, `copysign`, [value("f64", 0.5), value("f64", 1)]), [value("f64", 0.5)]); + +// ./test/core/f64_bitwise.wast:138 +assert_return( + () => invoke($0, `copysign`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:139 +assert_return( + () => invoke($0, `copysign`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:140 +assert_return( + () => invoke($0, `copysign`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:141 +assert_return( + () => invoke($0, `copysign`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:142 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:143 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:144 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:145 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:146 +assert_return( + () => invoke($0, `copysign`, [value("f64", -0.5), value("f64", -Infinity)]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:147 +assert_return( + () => invoke($0, `copysign`, [value("f64", -0.5), value("f64", Infinity)]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:148 +assert_return( + () => invoke($0, `copysign`, [value("f64", 0.5), value("f64", -Infinity)]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:149 +assert_return( + () => invoke($0, `copysign`, [value("f64", 0.5), value("f64", Infinity)]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:150 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:151 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:152 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("f64", -0.5)], +); + +// ./test/core/f64_bitwise.wast:153 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("f64", 0.5)], +); + +// ./test/core/f64_bitwise.wast:154 +assert_return(() => invoke($0, `copysign`, [value("f64", -1), value("f64", -0)]), [value("f64", -1)]); + +// ./test/core/f64_bitwise.wast:155 +assert_return(() => invoke($0, `copysign`, [value("f64", -1), value("f64", 0)]), [value("f64", 1)]); + +// ./test/core/f64_bitwise.wast:156 +assert_return(() => invoke($0, `copysign`, [value("f64", 1), value("f64", -0)]), [value("f64", -1)]); + +// ./test/core/f64_bitwise.wast:157 +assert_return(() => invoke($0, `copysign`, [value("f64", 1), value("f64", 0)]), [value("f64", 1)]); + +// ./test/core/f64_bitwise.wast:158 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -1)], +); + +// ./test/core/f64_bitwise.wast:159 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 1)], +); + +// ./test/core/f64_bitwise.wast:160 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -1)], +); + +// ./test/core/f64_bitwise.wast:161 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 1)], +); + +// ./test/core/f64_bitwise.wast:162 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -1)], +); + +// ./test/core/f64_bitwise.wast:163 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 1)], +); + +// ./test/core/f64_bitwise.wast:164 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -1)], +); + +// ./test/core/f64_bitwise.wast:165 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 1)], +); + +// ./test/core/f64_bitwise.wast:166 +assert_return(() => invoke($0, `copysign`, [value("f64", -1), value("f64", -0.5)]), [value("f64", -1)]); + +// ./test/core/f64_bitwise.wast:167 +assert_return(() => invoke($0, `copysign`, [value("f64", -1), value("f64", 0.5)]), [value("f64", 1)]); + +// ./test/core/f64_bitwise.wast:168 +assert_return(() => invoke($0, `copysign`, [value("f64", 1), value("f64", -0.5)]), [value("f64", -1)]); + +// ./test/core/f64_bitwise.wast:169 +assert_return(() => invoke($0, `copysign`, [value("f64", 1), value("f64", 0.5)]), [value("f64", 1)]); + +// ./test/core/f64_bitwise.wast:170 +assert_return(() => invoke($0, `copysign`, [value("f64", -1), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64_bitwise.wast:171 +assert_return(() => invoke($0, `copysign`, [value("f64", -1), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64_bitwise.wast:172 +assert_return(() => invoke($0, `copysign`, [value("f64", 1), value("f64", -1)]), [value("f64", -1)]); + +// ./test/core/f64_bitwise.wast:173 +assert_return(() => invoke($0, `copysign`, [value("f64", 1), value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64_bitwise.wast:174 +assert_return( + () => invoke($0, `copysign`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("f64", -1)], +); + +// ./test/core/f64_bitwise.wast:175 +assert_return( + () => invoke($0, `copysign`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("f64", 1)], +); + +// ./test/core/f64_bitwise.wast:176 +assert_return( + () => invoke($0, `copysign`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("f64", -1)], +); + +// ./test/core/f64_bitwise.wast:177 +assert_return( + () => invoke($0, `copysign`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("f64", 1)], +); + +// ./test/core/f64_bitwise.wast:178 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -1)], +); + +// ./test/core/f64_bitwise.wast:179 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 1)], +); + +// ./test/core/f64_bitwise.wast:180 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -1)], +); + +// ./test/core/f64_bitwise.wast:181 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 1)], +); + +// ./test/core/f64_bitwise.wast:182 +assert_return( + () => invoke($0, `copysign`, [value("f64", -1), value("f64", -Infinity)]), + [value("f64", -1)], +); + +// ./test/core/f64_bitwise.wast:183 +assert_return( + () => invoke($0, `copysign`, [value("f64", -1), value("f64", Infinity)]), + [value("f64", 1)], +); + +// ./test/core/f64_bitwise.wast:184 +assert_return( + () => invoke($0, `copysign`, [value("f64", 1), value("f64", -Infinity)]), + [value("f64", -1)], +); + +// ./test/core/f64_bitwise.wast:185 +assert_return( + () => invoke($0, `copysign`, [value("f64", 1), value("f64", Infinity)]), + [value("f64", 1)], +); + +// ./test/core/f64_bitwise.wast:186 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("f64", -1)], +); + +// ./test/core/f64_bitwise.wast:187 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("f64", 1)], +); + +// ./test/core/f64_bitwise.wast:188 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("f64", -1)], +); + +// ./test/core/f64_bitwise.wast:189 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("f64", 1)], +); + +// ./test/core/f64_bitwise.wast:190 +assert_return( + () => invoke($0, `copysign`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:191 +assert_return( + () => invoke($0, `copysign`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:192 +assert_return( + () => invoke($0, `copysign`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:193 +assert_return( + () => invoke($0, `copysign`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:194 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:195 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:196 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:197 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:198 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:199 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:200 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:201 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:202 +assert_return( + () => invoke($0, `copysign`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:203 +assert_return( + () => invoke($0, `copysign`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:204 +assert_return( + () => invoke($0, `copysign`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:205 +assert_return( + () => invoke($0, `copysign`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:206 +assert_return( + () => invoke($0, `copysign`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:207 +assert_return( + () => invoke($0, `copysign`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:208 +assert_return( + () => invoke($0, `copysign`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:209 +assert_return( + () => invoke($0, `copysign`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:210 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:211 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:212 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:213 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:214 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:215 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:216 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:217 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:218 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -6.283185307179586), + value("f64", -Infinity), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:219 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -6.283185307179586), + value("f64", Infinity), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:220 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 6.283185307179586), + value("f64", -Infinity), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:221 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 6.283185307179586), + value("f64", Infinity), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:222 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:223 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:224 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:225 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:226 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:227 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:228 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:229 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:230 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:231 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:232 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:233 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:234 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:235 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:236 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:237 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:238 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:239 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:240 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:241 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:242 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:243 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:244 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:245 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:246 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:247 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:248 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:249 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:250 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:251 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:252 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:253 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:254 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:255 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:256 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:257 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:258 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:259 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:260 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:261 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:262 +assert_return( + () => invoke($0, `copysign`, [value("f64", -Infinity), value("f64", -0)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:263 +assert_return( + () => invoke($0, `copysign`, [value("f64", -Infinity), value("f64", 0)]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:264 +assert_return( + () => invoke($0, `copysign`, [value("f64", Infinity), value("f64", -0)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:265 +assert_return( + () => invoke($0, `copysign`, [value("f64", Infinity), value("f64", 0)]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:266 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:267 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:268 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:269 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:270 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:271 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:272 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:273 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:274 +assert_return( + () => invoke($0, `copysign`, [value("f64", -Infinity), value("f64", -0.5)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:275 +assert_return( + () => invoke($0, `copysign`, [value("f64", -Infinity), value("f64", 0.5)]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:276 +assert_return( + () => invoke($0, `copysign`, [value("f64", Infinity), value("f64", -0.5)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:277 +assert_return( + () => invoke($0, `copysign`, [value("f64", Infinity), value("f64", 0.5)]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:278 +assert_return( + () => invoke($0, `copysign`, [value("f64", -Infinity), value("f64", -1)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:279 +assert_return( + () => invoke($0, `copysign`, [value("f64", -Infinity), value("f64", 1)]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:280 +assert_return( + () => invoke($0, `copysign`, [value("f64", Infinity), value("f64", -1)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:281 +assert_return( + () => invoke($0, `copysign`, [value("f64", Infinity), value("f64", 1)]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:282 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -Infinity), + value("f64", -6.283185307179586), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:283 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -Infinity), + value("f64", 6.283185307179586), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:284 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", Infinity), + value("f64", -6.283185307179586), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:285 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", Infinity), + value("f64", 6.283185307179586), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:286 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:287 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:288 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:289 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:290 +assert_return( + () => invoke($0, `copysign`, [value("f64", -Infinity), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:291 +assert_return( + () => invoke($0, `copysign`, [value("f64", -Infinity), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:292 +assert_return( + () => invoke($0, `copysign`, [value("f64", Infinity), value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:293 +assert_return( + () => invoke($0, `copysign`, [value("f64", Infinity), value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:294 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:295 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:296 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/f64_bitwise.wast:297 +assert_return( + () => invoke($0, `copysign`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("f64", Infinity)], +); + +// ./test/core/f64_bitwise.wast:298 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:299 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:300 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:301 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:302 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:303 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:304 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:305 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:306 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:307 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:308 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:309 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:310 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:311 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:312 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:313 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:314 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:315 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:316 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:317 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:318 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:319 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:320 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:321 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:322 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:323 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:324 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:325 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:326 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:327 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:328 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:329 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:330 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:331 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:332 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:333 +assert_return( + () => invoke($0, `copysign`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:334 +assert_return(() => invoke($0, `abs`, [value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/f64_bitwise.wast:335 +assert_return(() => invoke($0, `abs`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/f64_bitwise.wast:336 +assert_return( + () => invoke($0, `abs`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:337 +assert_return( + () => invoke($0, `abs`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:338 +assert_return( + () => invoke($0, `abs`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:339 +assert_return( + () => invoke($0, `abs`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:340 +assert_return(() => invoke($0, `abs`, [value("f64", -0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64_bitwise.wast:341 +assert_return(() => invoke($0, `abs`, [value("f64", 0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64_bitwise.wast:342 +assert_return(() => invoke($0, `abs`, [value("f64", -1)]), [value("f64", 1)]); + +// ./test/core/f64_bitwise.wast:343 +assert_return(() => invoke($0, `abs`, [value("f64", 1)]), [value("f64", 1)]); + +// ./test/core/f64_bitwise.wast:344 +assert_return( + () => invoke($0, `abs`, [value("f64", -6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:345 +assert_return( + () => invoke($0, `abs`, [value("f64", 6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:346 +assert_return( + () => invoke($0, `abs`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:347 +assert_return( + () => invoke($0, `abs`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:348 +assert_return(() => invoke($0, `abs`, [value("f64", -Infinity)]), [value("f64", Infinity)]); + +// ./test/core/f64_bitwise.wast:349 +assert_return(() => invoke($0, `abs`, [value("f64", Infinity)]), [value("f64", Infinity)]); + +// ./test/core/f64_bitwise.wast:350 +assert_return( + () => invoke($0, `abs`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:351 +assert_return( + () => invoke($0, `abs`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:352 +assert_return(() => invoke($0, `neg`, [value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/f64_bitwise.wast:353 +assert_return(() => invoke($0, `neg`, [value("f64", 0)]), [value("f64", -0)]); + +// ./test/core/f64_bitwise.wast:354 +assert_return( + () => invoke($0, `neg`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:355 +assert_return( + () => invoke($0, `neg`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/f64_bitwise.wast:356 +assert_return( + () => invoke($0, `neg`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:357 +assert_return( + () => invoke($0, `neg`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/f64_bitwise.wast:358 +assert_return(() => invoke($0, `neg`, [value("f64", -0.5)]), [value("f64", 0.5)]); + +// ./test/core/f64_bitwise.wast:359 +assert_return(() => invoke($0, `neg`, [value("f64", 0.5)]), [value("f64", -0.5)]); + +// ./test/core/f64_bitwise.wast:360 +assert_return(() => invoke($0, `neg`, [value("f64", -1)]), [value("f64", 1)]); + +// ./test/core/f64_bitwise.wast:361 +assert_return(() => invoke($0, `neg`, [value("f64", 1)]), [value("f64", -1)]); + +// ./test/core/f64_bitwise.wast:362 +assert_return( + () => invoke($0, `neg`, [value("f64", -6.283185307179586)]), + [value("f64", 6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:363 +assert_return( + () => invoke($0, `neg`, [value("f64", 6.283185307179586)]), + [value("f64", -6.283185307179586)], +); + +// ./test/core/f64_bitwise.wast:364 +assert_return( + () => invoke($0, `neg`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:365 +assert_return( + () => invoke($0, `neg`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/f64_bitwise.wast:366 +assert_return(() => invoke($0, `neg`, [value("f64", -Infinity)]), [value("f64", Infinity)]); + +// ./test/core/f64_bitwise.wast:367 +assert_return(() => invoke($0, `neg`, [value("f64", Infinity)]), [value("f64", -Infinity)]); + +// ./test/core/f64_bitwise.wast:368 +assert_return( + () => invoke($0, `neg`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/f64_bitwise.wast:369 +assert_return( + () => invoke($0, `neg`, [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/f64_bitwise.wast:374 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.copysign (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64_bitwise.wast:375 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.abs (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64_bitwise.wast:376 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.neg (i64.const 0))))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/f64_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/f64_cmp.wast.js new file mode 100644 index 0000000000..45ea523bcd --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/f64_cmp.wast.js @@ -0,0 +1,18854 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/f64_cmp.wast + +// ./test/core/f64_cmp.wast:4 +let $0 = instantiate(`(module + (func (export "eq") (param $$x f64) (param $$y f64) (result i32) (f64.eq (local.get $$x) (local.get $$y))) + (func (export "ne") (param $$x f64) (param $$y f64) (result i32) (f64.ne (local.get $$x) (local.get $$y))) + (func (export "lt") (param $$x f64) (param $$y f64) (result i32) (f64.lt (local.get $$x) (local.get $$y))) + (func (export "le") (param $$x f64) (param $$y f64) (result i32) (f64.le (local.get $$x) (local.get $$y))) + (func (export "gt") (param $$x f64) (param $$y f64) (result i32) (f64.gt (local.get $$x) (local.get $$y))) + (func (export "ge") (param $$x f64) (param $$y f64) (result i32) (f64.ge (local.get $$x) (local.get $$y))) +)`); + +// ./test/core/f64_cmp.wast:13 +assert_return(() => invoke($0, `eq`, [value("f64", -0), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:14 +assert_return(() => invoke($0, `eq`, [value("f64", -0), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:15 +assert_return(() => invoke($0, `eq`, [value("f64", 0), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:16 +assert_return(() => invoke($0, `eq`, [value("f64", 0), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:17 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:18 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:19 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:20 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:21 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:22 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:23 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:24 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:25 +assert_return(() => invoke($0, `eq`, [value("f64", -0), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:26 +assert_return(() => invoke($0, `eq`, [value("f64", -0), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:27 +assert_return(() => invoke($0, `eq`, [value("f64", 0), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:28 +assert_return(() => invoke($0, `eq`, [value("f64", 0), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:29 +assert_return(() => invoke($0, `eq`, [value("f64", -0), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:30 +assert_return(() => invoke($0, `eq`, [value("f64", -0), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:31 +assert_return(() => invoke($0, `eq`, [value("f64", 0), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:32 +assert_return(() => invoke($0, `eq`, [value("f64", 0), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:33 +assert_return( + () => invoke($0, `eq`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:34 +assert_return( + () => invoke($0, `eq`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:35 +assert_return( + () => invoke($0, `eq`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:36 +assert_return( + () => invoke($0, `eq`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:37 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:38 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:39 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:40 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:41 +assert_return(() => invoke($0, `eq`, [value("f64", -0), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:42 +assert_return(() => invoke($0, `eq`, [value("f64", -0), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:43 +assert_return(() => invoke($0, `eq`, [value("f64", 0), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:44 +assert_return(() => invoke($0, `eq`, [value("f64", 0), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:45 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:46 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:47 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:48 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:49 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:50 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:51 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:52 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:53 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:54 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:55 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:56 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:57 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:58 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:59 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:60 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:61 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:62 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:63 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:64 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:65 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:66 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:67 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:68 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:69 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:70 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:71 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:72 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:73 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:74 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:75 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:76 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:77 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:78 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:79 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:80 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:81 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:82 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:83 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:84 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:85 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:86 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:87 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:88 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:89 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:90 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:91 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:92 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:93 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:94 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:95 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:96 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:97 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:98 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:99 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:100 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:101 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:102 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:103 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:104 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:105 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:106 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:107 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:108 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:109 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:110 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:111 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:112 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:113 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:114 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:115 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:116 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:117 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:118 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:119 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:120 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:121 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:122 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:123 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:124 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:125 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:126 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:127 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:128 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:129 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:130 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:131 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:132 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:133 +assert_return(() => invoke($0, `eq`, [value("f64", -0.5), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:134 +assert_return(() => invoke($0, `eq`, [value("f64", -0.5), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:135 +assert_return(() => invoke($0, `eq`, [value("f64", 0.5), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:136 +assert_return(() => invoke($0, `eq`, [value("f64", 0.5), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:137 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:138 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:139 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:140 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:141 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:142 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:143 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:144 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:145 +assert_return(() => invoke($0, `eq`, [value("f64", -0.5), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:146 +assert_return(() => invoke($0, `eq`, [value("f64", -0.5), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:147 +assert_return(() => invoke($0, `eq`, [value("f64", 0.5), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:148 +assert_return(() => invoke($0, `eq`, [value("f64", 0.5), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:149 +assert_return(() => invoke($0, `eq`, [value("f64", -0.5), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:150 +assert_return(() => invoke($0, `eq`, [value("f64", -0.5), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:151 +assert_return(() => invoke($0, `eq`, [value("f64", 0.5), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:152 +assert_return(() => invoke($0, `eq`, [value("f64", 0.5), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:153 +assert_return( + () => invoke($0, `eq`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:154 +assert_return( + () => invoke($0, `eq`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:155 +assert_return( + () => invoke($0, `eq`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:156 +assert_return( + () => invoke($0, `eq`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:157 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:158 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:159 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:160 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:161 +assert_return(() => invoke($0, `eq`, [value("f64", -0.5), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:162 +assert_return(() => invoke($0, `eq`, [value("f64", -0.5), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:163 +assert_return(() => invoke($0, `eq`, [value("f64", 0.5), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:164 +assert_return(() => invoke($0, `eq`, [value("f64", 0.5), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:165 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:166 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:167 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:168 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:169 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:170 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:171 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:172 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:173 +assert_return(() => invoke($0, `eq`, [value("f64", -1), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:174 +assert_return(() => invoke($0, `eq`, [value("f64", -1), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:175 +assert_return(() => invoke($0, `eq`, [value("f64", 1), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:176 +assert_return(() => invoke($0, `eq`, [value("f64", 1), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:177 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:178 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:179 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:180 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:181 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:182 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:183 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:184 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:185 +assert_return(() => invoke($0, `eq`, [value("f64", -1), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:186 +assert_return(() => invoke($0, `eq`, [value("f64", -1), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:187 +assert_return(() => invoke($0, `eq`, [value("f64", 1), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:188 +assert_return(() => invoke($0, `eq`, [value("f64", 1), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:189 +assert_return(() => invoke($0, `eq`, [value("f64", -1), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:190 +assert_return(() => invoke($0, `eq`, [value("f64", -1), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:191 +assert_return(() => invoke($0, `eq`, [value("f64", 1), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:192 +assert_return(() => invoke($0, `eq`, [value("f64", 1), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:193 +assert_return( + () => invoke($0, `eq`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:194 +assert_return( + () => invoke($0, `eq`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:195 +assert_return( + () => invoke($0, `eq`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:196 +assert_return( + () => invoke($0, `eq`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:197 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:198 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:199 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:200 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:201 +assert_return(() => invoke($0, `eq`, [value("f64", -1), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:202 +assert_return(() => invoke($0, `eq`, [value("f64", -1), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:203 +assert_return(() => invoke($0, `eq`, [value("f64", 1), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:204 +assert_return(() => invoke($0, `eq`, [value("f64", 1), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:205 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:206 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:207 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:208 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:209 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:210 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:211 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:212 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:213 +assert_return( + () => invoke($0, `eq`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:214 +assert_return( + () => invoke($0, `eq`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:215 +assert_return( + () => invoke($0, `eq`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:216 +assert_return( + () => invoke($0, `eq`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:217 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:218 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:219 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:220 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:221 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:222 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:223 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:224 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:225 +assert_return( + () => invoke($0, `eq`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:226 +assert_return( + () => invoke($0, `eq`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:227 +assert_return( + () => invoke($0, `eq`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:228 +assert_return( + () => invoke($0, `eq`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:229 +assert_return( + () => invoke($0, `eq`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:230 +assert_return( + () => invoke($0, `eq`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:231 +assert_return( + () => invoke($0, `eq`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:232 +assert_return( + () => invoke($0, `eq`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:233 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:234 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:235 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:236 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:237 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:238 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:239 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:240 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:241 +assert_return( + () => invoke($0, `eq`, [value("f64", -6.283185307179586), value("f64", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:242 +assert_return( + () => invoke($0, `eq`, [value("f64", -6.283185307179586), value("f64", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:243 +assert_return( + () => invoke($0, `eq`, [value("f64", 6.283185307179586), value("f64", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:244 +assert_return( + () => invoke($0, `eq`, [value("f64", 6.283185307179586), value("f64", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:245 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:246 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:247 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:248 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:249 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:250 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:251 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:252 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:253 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:254 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:255 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:256 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:257 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:258 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:259 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:260 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:261 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:262 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:263 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:264 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:265 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:266 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:267 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:268 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:269 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:270 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:271 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:272 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:273 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:274 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:275 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:276 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:277 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:278 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:279 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:280 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:281 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:282 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:283 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:284 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:285 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:286 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:287 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:288 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:289 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:290 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:291 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:292 +assert_return( + () => invoke($0, `eq`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:293 +assert_return(() => invoke($0, `eq`, [value("f64", -Infinity), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:294 +assert_return(() => invoke($0, `eq`, [value("f64", -Infinity), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:295 +assert_return(() => invoke($0, `eq`, [value("f64", Infinity), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:296 +assert_return(() => invoke($0, `eq`, [value("f64", Infinity), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:297 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:298 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:299 +assert_return( + () => invoke($0, `eq`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:300 +assert_return( + () => invoke($0, `eq`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:301 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:302 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:303 +assert_return( + () => invoke($0, `eq`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:304 +assert_return( + () => invoke($0, `eq`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:305 +assert_return(() => invoke($0, `eq`, [value("f64", -Infinity), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:306 +assert_return(() => invoke($0, `eq`, [value("f64", -Infinity), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:307 +assert_return(() => invoke($0, `eq`, [value("f64", Infinity), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:308 +assert_return(() => invoke($0, `eq`, [value("f64", Infinity), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:309 +assert_return(() => invoke($0, `eq`, [value("f64", -Infinity), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:310 +assert_return(() => invoke($0, `eq`, [value("f64", -Infinity), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:311 +assert_return(() => invoke($0, `eq`, [value("f64", Infinity), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:312 +assert_return(() => invoke($0, `eq`, [value("f64", Infinity), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:313 +assert_return( + () => invoke($0, `eq`, [value("f64", -Infinity), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:314 +assert_return( + () => invoke($0, `eq`, [value("f64", -Infinity), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:315 +assert_return( + () => invoke($0, `eq`, [value("f64", Infinity), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:316 +assert_return( + () => invoke($0, `eq`, [value("f64", Infinity), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:317 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:318 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:319 +assert_return( + () => invoke($0, `eq`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:320 +assert_return( + () => invoke($0, `eq`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:321 +assert_return( + () => invoke($0, `eq`, [value("f64", -Infinity), value("f64", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:322 +assert_return( + () => invoke($0, `eq`, [value("f64", -Infinity), value("f64", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:323 +assert_return( + () => invoke($0, `eq`, [value("f64", Infinity), value("f64", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:324 +assert_return( + () => invoke($0, `eq`, [value("f64", Infinity), value("f64", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:325 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:326 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:327 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:328 +assert_return( + () => invoke($0, `eq`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:329 +assert_return( + () => invoke($0, `eq`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:330 +assert_return( + () => invoke($0, `eq`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:331 +assert_return( + () => invoke($0, `eq`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:332 +assert_return( + () => invoke($0, `eq`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:333 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:334 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:335 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:336 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:337 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:338 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:339 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:340 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:341 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:342 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:343 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:344 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:345 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:346 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:347 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:348 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:349 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:350 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:351 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:352 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:353 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:354 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:355 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:356 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:357 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:358 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:359 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:360 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:361 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:362 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:363 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:364 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:365 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:366 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:367 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:368 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:369 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:370 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:371 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:372 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:373 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:374 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:375 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:376 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:377 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:378 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:379 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:380 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:381 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:382 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:383 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:384 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:385 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:386 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:387 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:388 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:389 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:390 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:391 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:392 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:393 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:394 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:395 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:396 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:397 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:398 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:399 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:400 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:401 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:402 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:403 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:404 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:405 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:406 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:407 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:408 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:409 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:410 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:411 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:412 +assert_return( + () => invoke($0, `eq`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:413 +assert_return(() => invoke($0, `ne`, [value("f64", -0), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:414 +assert_return(() => invoke($0, `ne`, [value("f64", -0), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:415 +assert_return(() => invoke($0, `ne`, [value("f64", 0), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:416 +assert_return(() => invoke($0, `ne`, [value("f64", 0), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:417 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:418 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:419 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:420 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:421 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:422 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:423 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:424 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:425 +assert_return(() => invoke($0, `ne`, [value("f64", -0), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:426 +assert_return(() => invoke($0, `ne`, [value("f64", -0), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:427 +assert_return(() => invoke($0, `ne`, [value("f64", 0), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:428 +assert_return(() => invoke($0, `ne`, [value("f64", 0), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:429 +assert_return(() => invoke($0, `ne`, [value("f64", -0), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:430 +assert_return(() => invoke($0, `ne`, [value("f64", -0), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:431 +assert_return(() => invoke($0, `ne`, [value("f64", 0), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:432 +assert_return(() => invoke($0, `ne`, [value("f64", 0), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:433 +assert_return( + () => invoke($0, `ne`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:434 +assert_return( + () => invoke($0, `ne`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:435 +assert_return( + () => invoke($0, `ne`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:436 +assert_return( + () => invoke($0, `ne`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:437 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:438 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:439 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:440 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:441 +assert_return(() => invoke($0, `ne`, [value("f64", -0), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:442 +assert_return(() => invoke($0, `ne`, [value("f64", -0), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:443 +assert_return(() => invoke($0, `ne`, [value("f64", 0), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:444 +assert_return(() => invoke($0, `ne`, [value("f64", 0), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:445 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:446 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:447 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:448 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:449 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:450 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:451 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:452 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:453 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:454 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:455 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:456 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:457 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:458 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:459 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:460 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:461 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:462 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:463 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:464 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:465 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:466 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:467 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:468 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:469 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:470 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:471 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:472 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:473 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:474 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:475 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:476 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:477 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:478 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:479 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:480 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:481 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:482 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:483 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:484 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:485 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:486 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:487 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:488 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:489 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:490 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:491 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:492 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:493 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:494 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:495 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:496 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:497 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:498 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:499 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:500 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:501 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:502 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:503 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:504 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:505 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:506 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:507 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:508 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:509 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:510 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:511 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:512 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:513 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:514 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:515 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:516 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:517 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:518 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:519 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:520 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:521 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:522 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:523 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:524 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:525 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:526 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:527 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:528 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:529 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:530 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:531 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:532 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:533 +assert_return(() => invoke($0, `ne`, [value("f64", -0.5), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:534 +assert_return(() => invoke($0, `ne`, [value("f64", -0.5), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:535 +assert_return(() => invoke($0, `ne`, [value("f64", 0.5), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:536 +assert_return(() => invoke($0, `ne`, [value("f64", 0.5), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:537 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:538 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:539 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:540 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:541 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:542 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:543 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:544 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:545 +assert_return(() => invoke($0, `ne`, [value("f64", -0.5), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:546 +assert_return(() => invoke($0, `ne`, [value("f64", -0.5), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:547 +assert_return(() => invoke($0, `ne`, [value("f64", 0.5), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:548 +assert_return(() => invoke($0, `ne`, [value("f64", 0.5), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:549 +assert_return(() => invoke($0, `ne`, [value("f64", -0.5), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:550 +assert_return(() => invoke($0, `ne`, [value("f64", -0.5), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:551 +assert_return(() => invoke($0, `ne`, [value("f64", 0.5), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:552 +assert_return(() => invoke($0, `ne`, [value("f64", 0.5), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:553 +assert_return( + () => invoke($0, `ne`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:554 +assert_return( + () => invoke($0, `ne`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:555 +assert_return( + () => invoke($0, `ne`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:556 +assert_return( + () => invoke($0, `ne`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:557 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:558 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:559 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:560 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:561 +assert_return(() => invoke($0, `ne`, [value("f64", -0.5), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:562 +assert_return(() => invoke($0, `ne`, [value("f64", -0.5), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:563 +assert_return(() => invoke($0, `ne`, [value("f64", 0.5), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:564 +assert_return(() => invoke($0, `ne`, [value("f64", 0.5), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:565 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:566 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:567 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:568 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:569 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:570 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:571 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:572 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:573 +assert_return(() => invoke($0, `ne`, [value("f64", -1), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:574 +assert_return(() => invoke($0, `ne`, [value("f64", -1), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:575 +assert_return(() => invoke($0, `ne`, [value("f64", 1), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:576 +assert_return(() => invoke($0, `ne`, [value("f64", 1), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:577 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:578 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:579 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:580 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:581 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:582 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:583 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:584 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:585 +assert_return(() => invoke($0, `ne`, [value("f64", -1), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:586 +assert_return(() => invoke($0, `ne`, [value("f64", -1), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:587 +assert_return(() => invoke($0, `ne`, [value("f64", 1), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:588 +assert_return(() => invoke($0, `ne`, [value("f64", 1), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:589 +assert_return(() => invoke($0, `ne`, [value("f64", -1), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:590 +assert_return(() => invoke($0, `ne`, [value("f64", -1), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:591 +assert_return(() => invoke($0, `ne`, [value("f64", 1), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:592 +assert_return(() => invoke($0, `ne`, [value("f64", 1), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:593 +assert_return( + () => invoke($0, `ne`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:594 +assert_return( + () => invoke($0, `ne`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:595 +assert_return( + () => invoke($0, `ne`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:596 +assert_return( + () => invoke($0, `ne`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:597 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:598 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:599 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:600 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:601 +assert_return(() => invoke($0, `ne`, [value("f64", -1), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:602 +assert_return(() => invoke($0, `ne`, [value("f64", -1), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:603 +assert_return(() => invoke($0, `ne`, [value("f64", 1), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:604 +assert_return(() => invoke($0, `ne`, [value("f64", 1), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:605 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:606 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:607 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:608 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:609 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:610 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:611 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:612 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:613 +assert_return( + () => invoke($0, `ne`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:614 +assert_return( + () => invoke($0, `ne`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:615 +assert_return( + () => invoke($0, `ne`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:616 +assert_return( + () => invoke($0, `ne`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:617 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:618 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:619 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:620 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:621 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:622 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:623 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:624 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:625 +assert_return( + () => invoke($0, `ne`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:626 +assert_return( + () => invoke($0, `ne`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:627 +assert_return( + () => invoke($0, `ne`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:628 +assert_return( + () => invoke($0, `ne`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:629 +assert_return( + () => invoke($0, `ne`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:630 +assert_return( + () => invoke($0, `ne`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:631 +assert_return( + () => invoke($0, `ne`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:632 +assert_return( + () => invoke($0, `ne`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:633 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:634 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:635 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:636 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:637 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:638 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:639 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:640 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:641 +assert_return( + () => invoke($0, `ne`, [value("f64", -6.283185307179586), value("f64", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:642 +assert_return( + () => invoke($0, `ne`, [value("f64", -6.283185307179586), value("f64", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:643 +assert_return( + () => invoke($0, `ne`, [value("f64", 6.283185307179586), value("f64", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:644 +assert_return( + () => invoke($0, `ne`, [value("f64", 6.283185307179586), value("f64", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:645 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:646 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:647 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:648 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:649 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:650 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:651 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:652 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:653 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:654 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:655 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:656 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:657 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:658 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:659 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:660 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:661 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:662 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:663 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:664 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:665 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:666 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:667 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:668 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:669 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:670 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:671 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:672 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:673 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:674 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:675 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:676 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:677 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:678 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:679 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:680 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:681 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:682 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:683 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:684 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:685 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:686 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:687 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:688 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:689 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:690 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:691 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:692 +assert_return( + () => invoke($0, `ne`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:693 +assert_return(() => invoke($0, `ne`, [value("f64", -Infinity), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:694 +assert_return(() => invoke($0, `ne`, [value("f64", -Infinity), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:695 +assert_return(() => invoke($0, `ne`, [value("f64", Infinity), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:696 +assert_return(() => invoke($0, `ne`, [value("f64", Infinity), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:697 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:698 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:699 +assert_return( + () => invoke($0, `ne`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:700 +assert_return( + () => invoke($0, `ne`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:701 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:702 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:703 +assert_return( + () => invoke($0, `ne`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:704 +assert_return( + () => invoke($0, `ne`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:705 +assert_return(() => invoke($0, `ne`, [value("f64", -Infinity), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:706 +assert_return(() => invoke($0, `ne`, [value("f64", -Infinity), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:707 +assert_return(() => invoke($0, `ne`, [value("f64", Infinity), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:708 +assert_return(() => invoke($0, `ne`, [value("f64", Infinity), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:709 +assert_return(() => invoke($0, `ne`, [value("f64", -Infinity), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:710 +assert_return(() => invoke($0, `ne`, [value("f64", -Infinity), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:711 +assert_return(() => invoke($0, `ne`, [value("f64", Infinity), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:712 +assert_return(() => invoke($0, `ne`, [value("f64", Infinity), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:713 +assert_return( + () => invoke($0, `ne`, [value("f64", -Infinity), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:714 +assert_return( + () => invoke($0, `ne`, [value("f64", -Infinity), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:715 +assert_return( + () => invoke($0, `ne`, [value("f64", Infinity), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:716 +assert_return( + () => invoke($0, `ne`, [value("f64", Infinity), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:717 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:718 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:719 +assert_return( + () => invoke($0, `ne`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:720 +assert_return( + () => invoke($0, `ne`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:721 +assert_return( + () => invoke($0, `ne`, [value("f64", -Infinity), value("f64", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:722 +assert_return( + () => invoke($0, `ne`, [value("f64", -Infinity), value("f64", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:723 +assert_return( + () => invoke($0, `ne`, [value("f64", Infinity), value("f64", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:724 +assert_return( + () => invoke($0, `ne`, [value("f64", Infinity), value("f64", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:725 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:726 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:727 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:728 +assert_return( + () => invoke($0, `ne`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:729 +assert_return( + () => invoke($0, `ne`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:730 +assert_return( + () => invoke($0, `ne`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:731 +assert_return( + () => invoke($0, `ne`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:732 +assert_return( + () => invoke($0, `ne`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:733 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:734 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:735 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:736 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:737 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:738 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:739 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:740 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:741 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:742 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:743 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:744 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:745 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:746 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:747 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:748 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:749 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:750 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:751 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:752 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:753 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:754 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:755 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:756 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:757 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:758 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:759 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:760 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:761 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:762 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:763 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:764 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:765 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:766 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:767 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:768 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:769 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:770 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:771 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:772 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:773 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:774 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:775 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:776 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:777 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:778 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:779 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:780 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:781 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:782 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:783 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:784 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:785 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:786 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:787 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:788 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:789 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:790 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:791 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:792 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:793 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:794 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:795 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:796 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:797 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:798 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:799 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:800 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:801 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:802 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:803 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:804 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:805 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:806 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:807 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:808 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:809 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:810 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:811 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:812 +assert_return( + () => invoke($0, `ne`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:813 +assert_return(() => invoke($0, `lt`, [value("f64", -0), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:814 +assert_return(() => invoke($0, `lt`, [value("f64", -0), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:815 +assert_return(() => invoke($0, `lt`, [value("f64", 0), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:816 +assert_return(() => invoke($0, `lt`, [value("f64", 0), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:817 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:818 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:819 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:820 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:821 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:822 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:823 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:824 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:825 +assert_return(() => invoke($0, `lt`, [value("f64", -0), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:826 +assert_return(() => invoke($0, `lt`, [value("f64", -0), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:827 +assert_return(() => invoke($0, `lt`, [value("f64", 0), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:828 +assert_return(() => invoke($0, `lt`, [value("f64", 0), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:829 +assert_return(() => invoke($0, `lt`, [value("f64", -0), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:830 +assert_return(() => invoke($0, `lt`, [value("f64", -0), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:831 +assert_return(() => invoke($0, `lt`, [value("f64", 0), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:832 +assert_return(() => invoke($0, `lt`, [value("f64", 0), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:833 +assert_return( + () => invoke($0, `lt`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:834 +assert_return( + () => invoke($0, `lt`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:835 +assert_return( + () => invoke($0, `lt`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:836 +assert_return( + () => invoke($0, `lt`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:837 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:838 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:839 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:840 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:841 +assert_return(() => invoke($0, `lt`, [value("f64", -0), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:842 +assert_return(() => invoke($0, `lt`, [value("f64", -0), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:843 +assert_return(() => invoke($0, `lt`, [value("f64", 0), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:844 +assert_return(() => invoke($0, `lt`, [value("f64", 0), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:845 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:846 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:847 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:848 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:849 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:850 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:851 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:852 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:853 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:854 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:855 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:856 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:857 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:858 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:859 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:860 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:861 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:862 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:863 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:864 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:865 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:866 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:867 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:868 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:869 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:870 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:871 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:872 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:873 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:874 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:875 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:876 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:877 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:878 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:879 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:880 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:881 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:882 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:883 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:884 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:885 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:886 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:887 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:888 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:889 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:890 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:891 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:892 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:893 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:894 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:895 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:896 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:897 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:898 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:899 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:900 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:901 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:902 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:903 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:904 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:905 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:906 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:907 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:908 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:909 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:910 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:911 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:912 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:913 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:914 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:915 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:916 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:917 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:918 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:919 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:920 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:921 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:922 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:923 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:924 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:925 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:926 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:927 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:928 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:929 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:930 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:931 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:932 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:933 +assert_return(() => invoke($0, `lt`, [value("f64", -0.5), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:934 +assert_return(() => invoke($0, `lt`, [value("f64", -0.5), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:935 +assert_return(() => invoke($0, `lt`, [value("f64", 0.5), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:936 +assert_return(() => invoke($0, `lt`, [value("f64", 0.5), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:937 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:938 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:939 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:940 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:941 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:942 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:943 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:944 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:945 +assert_return(() => invoke($0, `lt`, [value("f64", -0.5), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:946 +assert_return(() => invoke($0, `lt`, [value("f64", -0.5), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:947 +assert_return(() => invoke($0, `lt`, [value("f64", 0.5), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:948 +assert_return(() => invoke($0, `lt`, [value("f64", 0.5), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:949 +assert_return(() => invoke($0, `lt`, [value("f64", -0.5), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:950 +assert_return(() => invoke($0, `lt`, [value("f64", -0.5), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:951 +assert_return(() => invoke($0, `lt`, [value("f64", 0.5), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:952 +assert_return(() => invoke($0, `lt`, [value("f64", 0.5), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:953 +assert_return( + () => invoke($0, `lt`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:954 +assert_return( + () => invoke($0, `lt`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:955 +assert_return( + () => invoke($0, `lt`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:956 +assert_return( + () => invoke($0, `lt`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:957 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:958 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:959 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:960 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:961 +assert_return(() => invoke($0, `lt`, [value("f64", -0.5), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:962 +assert_return(() => invoke($0, `lt`, [value("f64", -0.5), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:963 +assert_return(() => invoke($0, `lt`, [value("f64", 0.5), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:964 +assert_return(() => invoke($0, `lt`, [value("f64", 0.5), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:965 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:966 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:967 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:968 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:969 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:970 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:971 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:972 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:973 +assert_return(() => invoke($0, `lt`, [value("f64", -1), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:974 +assert_return(() => invoke($0, `lt`, [value("f64", -1), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:975 +assert_return(() => invoke($0, `lt`, [value("f64", 1), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:976 +assert_return(() => invoke($0, `lt`, [value("f64", 1), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:977 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:978 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:979 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:980 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:981 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:982 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:983 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:984 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:985 +assert_return(() => invoke($0, `lt`, [value("f64", -1), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:986 +assert_return(() => invoke($0, `lt`, [value("f64", -1), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:987 +assert_return(() => invoke($0, `lt`, [value("f64", 1), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:988 +assert_return(() => invoke($0, `lt`, [value("f64", 1), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:989 +assert_return(() => invoke($0, `lt`, [value("f64", -1), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:990 +assert_return(() => invoke($0, `lt`, [value("f64", -1), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:991 +assert_return(() => invoke($0, `lt`, [value("f64", 1), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:992 +assert_return(() => invoke($0, `lt`, [value("f64", 1), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:993 +assert_return( + () => invoke($0, `lt`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:994 +assert_return( + () => invoke($0, `lt`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:995 +assert_return( + () => invoke($0, `lt`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:996 +assert_return( + () => invoke($0, `lt`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:997 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:998 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:999 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1000 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1001 +assert_return(() => invoke($0, `lt`, [value("f64", -1), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1002 +assert_return(() => invoke($0, `lt`, [value("f64", -1), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1003 +assert_return(() => invoke($0, `lt`, [value("f64", 1), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1004 +assert_return(() => invoke($0, `lt`, [value("f64", 1), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1005 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1006 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1007 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1008 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1009 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1010 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1011 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1012 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1013 +assert_return( + () => invoke($0, `lt`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1014 +assert_return( + () => invoke($0, `lt`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1015 +assert_return( + () => invoke($0, `lt`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1016 +assert_return( + () => invoke($0, `lt`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1017 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1018 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1019 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1020 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1021 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1022 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1023 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1024 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1025 +assert_return( + () => invoke($0, `lt`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1026 +assert_return( + () => invoke($0, `lt`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1027 +assert_return( + () => invoke($0, `lt`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1028 +assert_return( + () => invoke($0, `lt`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1029 +assert_return( + () => invoke($0, `lt`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1030 +assert_return( + () => invoke($0, `lt`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1031 +assert_return( + () => invoke($0, `lt`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1032 +assert_return( + () => invoke($0, `lt`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1033 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1034 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1035 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1036 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1037 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1038 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1039 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1040 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1041 +assert_return( + () => invoke($0, `lt`, [value("f64", -6.283185307179586), value("f64", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1042 +assert_return( + () => invoke($0, `lt`, [value("f64", -6.283185307179586), value("f64", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1043 +assert_return( + () => invoke($0, `lt`, [value("f64", 6.283185307179586), value("f64", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1044 +assert_return( + () => invoke($0, `lt`, [value("f64", 6.283185307179586), value("f64", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1045 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1046 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1047 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1048 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1049 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1050 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1051 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1052 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1053 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1054 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1055 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1056 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1057 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1058 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1059 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1060 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1061 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1062 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1063 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1064 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1065 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1066 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1067 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1068 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1069 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1070 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1071 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1072 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1073 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1074 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1075 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1076 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1077 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1078 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1079 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1080 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1081 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1082 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1083 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1084 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1085 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1086 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1087 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1088 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1089 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1090 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1091 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1092 +assert_return( + () => invoke($0, `lt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1093 +assert_return(() => invoke($0, `lt`, [value("f64", -Infinity), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1094 +assert_return(() => invoke($0, `lt`, [value("f64", -Infinity), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1095 +assert_return(() => invoke($0, `lt`, [value("f64", Infinity), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1096 +assert_return(() => invoke($0, `lt`, [value("f64", Infinity), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1097 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1098 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1099 +assert_return( + () => invoke($0, `lt`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1100 +assert_return( + () => invoke($0, `lt`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1101 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1102 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1103 +assert_return( + () => invoke($0, `lt`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1104 +assert_return( + () => invoke($0, `lt`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1105 +assert_return(() => invoke($0, `lt`, [value("f64", -Infinity), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1106 +assert_return(() => invoke($0, `lt`, [value("f64", -Infinity), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1107 +assert_return(() => invoke($0, `lt`, [value("f64", Infinity), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1108 +assert_return(() => invoke($0, `lt`, [value("f64", Infinity), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1109 +assert_return(() => invoke($0, `lt`, [value("f64", -Infinity), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1110 +assert_return(() => invoke($0, `lt`, [value("f64", -Infinity), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1111 +assert_return(() => invoke($0, `lt`, [value("f64", Infinity), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1112 +assert_return(() => invoke($0, `lt`, [value("f64", Infinity), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1113 +assert_return( + () => invoke($0, `lt`, [value("f64", -Infinity), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1114 +assert_return( + () => invoke($0, `lt`, [value("f64", -Infinity), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1115 +assert_return( + () => invoke($0, `lt`, [value("f64", Infinity), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1116 +assert_return( + () => invoke($0, `lt`, [value("f64", Infinity), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1117 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1118 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1119 +assert_return( + () => invoke($0, `lt`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1120 +assert_return( + () => invoke($0, `lt`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1121 +assert_return( + () => invoke($0, `lt`, [value("f64", -Infinity), value("f64", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1122 +assert_return( + () => invoke($0, `lt`, [value("f64", -Infinity), value("f64", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1123 +assert_return( + () => invoke($0, `lt`, [value("f64", Infinity), value("f64", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1124 +assert_return( + () => invoke($0, `lt`, [value("f64", Infinity), value("f64", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1125 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1126 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1127 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1128 +assert_return( + () => invoke($0, `lt`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1129 +assert_return( + () => invoke($0, `lt`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1130 +assert_return( + () => invoke($0, `lt`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1131 +assert_return( + () => invoke($0, `lt`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1132 +assert_return( + () => invoke($0, `lt`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1133 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1134 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1135 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1136 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1137 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1138 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1139 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1140 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1141 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1142 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1143 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1144 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1145 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1146 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1147 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1148 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1149 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1150 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1151 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1152 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1153 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1154 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1155 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1156 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1157 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1158 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1159 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1160 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1161 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1162 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1163 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1164 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1165 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1166 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1167 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1168 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1169 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1170 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1171 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1172 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1173 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1174 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1175 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1176 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1177 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1178 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1179 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1180 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1181 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1182 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1183 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1184 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1185 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1186 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1187 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1188 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1189 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1190 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1191 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1192 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1193 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1194 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1195 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1196 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1197 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1198 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1199 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1200 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1201 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1202 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1203 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1204 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1205 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1206 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1207 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1208 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1209 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1210 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1211 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1212 +assert_return( + () => invoke($0, `lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1213 +assert_return(() => invoke($0, `le`, [value("f64", -0), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1214 +assert_return(() => invoke($0, `le`, [value("f64", -0), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1215 +assert_return(() => invoke($0, `le`, [value("f64", 0), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1216 +assert_return(() => invoke($0, `le`, [value("f64", 0), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1217 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1218 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1219 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1220 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1221 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1222 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1223 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1224 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1225 +assert_return(() => invoke($0, `le`, [value("f64", -0), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1226 +assert_return(() => invoke($0, `le`, [value("f64", -0), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1227 +assert_return(() => invoke($0, `le`, [value("f64", 0), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1228 +assert_return(() => invoke($0, `le`, [value("f64", 0), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1229 +assert_return(() => invoke($0, `le`, [value("f64", -0), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1230 +assert_return(() => invoke($0, `le`, [value("f64", -0), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1231 +assert_return(() => invoke($0, `le`, [value("f64", 0), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1232 +assert_return(() => invoke($0, `le`, [value("f64", 0), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1233 +assert_return( + () => invoke($0, `le`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1234 +assert_return( + () => invoke($0, `le`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1235 +assert_return( + () => invoke($0, `le`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1236 +assert_return( + () => invoke($0, `le`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1237 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1238 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1239 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1240 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1241 +assert_return(() => invoke($0, `le`, [value("f64", -0), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1242 +assert_return(() => invoke($0, `le`, [value("f64", -0), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1243 +assert_return(() => invoke($0, `le`, [value("f64", 0), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1244 +assert_return(() => invoke($0, `le`, [value("f64", 0), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1245 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1246 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1247 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1248 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1249 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1250 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1251 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1252 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1253 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1254 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1255 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1256 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1257 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1258 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1259 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1260 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1261 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1262 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1263 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1264 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1265 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1266 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1267 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1268 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1269 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1270 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1271 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1272 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1273 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1274 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1275 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1276 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1277 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1278 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1279 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1280 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1281 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1282 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1283 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1284 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1285 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1286 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1287 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1288 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1289 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1290 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1291 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1292 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1293 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1294 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1295 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1296 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1297 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1298 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1299 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1300 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1301 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1302 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1303 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1304 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1305 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1306 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1307 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1308 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1309 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1310 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1311 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1312 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1313 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1314 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1315 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1316 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1317 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1318 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1319 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1320 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1321 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1322 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1323 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1324 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1325 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1326 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1327 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1328 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1329 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1330 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1331 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1332 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1333 +assert_return(() => invoke($0, `le`, [value("f64", -0.5), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1334 +assert_return(() => invoke($0, `le`, [value("f64", -0.5), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1335 +assert_return(() => invoke($0, `le`, [value("f64", 0.5), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1336 +assert_return(() => invoke($0, `le`, [value("f64", 0.5), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1337 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1338 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1339 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1340 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1341 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1342 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1343 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1344 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1345 +assert_return(() => invoke($0, `le`, [value("f64", -0.5), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1346 +assert_return(() => invoke($0, `le`, [value("f64", -0.5), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1347 +assert_return(() => invoke($0, `le`, [value("f64", 0.5), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1348 +assert_return(() => invoke($0, `le`, [value("f64", 0.5), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1349 +assert_return(() => invoke($0, `le`, [value("f64", -0.5), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1350 +assert_return(() => invoke($0, `le`, [value("f64", -0.5), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1351 +assert_return(() => invoke($0, `le`, [value("f64", 0.5), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1352 +assert_return(() => invoke($0, `le`, [value("f64", 0.5), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1353 +assert_return( + () => invoke($0, `le`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1354 +assert_return( + () => invoke($0, `le`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1355 +assert_return( + () => invoke($0, `le`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1356 +assert_return( + () => invoke($0, `le`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1357 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1358 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1359 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1360 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1361 +assert_return(() => invoke($0, `le`, [value("f64", -0.5), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1362 +assert_return(() => invoke($0, `le`, [value("f64", -0.5), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1363 +assert_return(() => invoke($0, `le`, [value("f64", 0.5), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1364 +assert_return(() => invoke($0, `le`, [value("f64", 0.5), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1365 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1366 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1367 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1368 +assert_return( + () => invoke($0, `le`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1369 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1370 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1371 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1372 +assert_return( + () => invoke($0, `le`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1373 +assert_return(() => invoke($0, `le`, [value("f64", -1), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1374 +assert_return(() => invoke($0, `le`, [value("f64", -1), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1375 +assert_return(() => invoke($0, `le`, [value("f64", 1), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1376 +assert_return(() => invoke($0, `le`, [value("f64", 1), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1377 +assert_return( + () => invoke($0, `le`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1378 +assert_return( + () => invoke($0, `le`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1379 +assert_return( + () => invoke($0, `le`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1380 +assert_return( + () => invoke($0, `le`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1381 +assert_return( + () => invoke($0, `le`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1382 +assert_return( + () => invoke($0, `le`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1383 +assert_return( + () => invoke($0, `le`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1384 +assert_return( + () => invoke($0, `le`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1385 +assert_return(() => invoke($0, `le`, [value("f64", -1), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1386 +assert_return(() => invoke($0, `le`, [value("f64", -1), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1387 +assert_return(() => invoke($0, `le`, [value("f64", 1), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1388 +assert_return(() => invoke($0, `le`, [value("f64", 1), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1389 +assert_return(() => invoke($0, `le`, [value("f64", -1), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1390 +assert_return(() => invoke($0, `le`, [value("f64", -1), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1391 +assert_return(() => invoke($0, `le`, [value("f64", 1), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1392 +assert_return(() => invoke($0, `le`, [value("f64", 1), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1393 +assert_return( + () => invoke($0, `le`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1394 +assert_return( + () => invoke($0, `le`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1395 +assert_return( + () => invoke($0, `le`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1396 +assert_return( + () => invoke($0, `le`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1397 +assert_return( + () => invoke($0, `le`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1398 +assert_return( + () => invoke($0, `le`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1399 +assert_return( + () => invoke($0, `le`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1400 +assert_return( + () => invoke($0, `le`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1401 +assert_return(() => invoke($0, `le`, [value("f64", -1), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1402 +assert_return(() => invoke($0, `le`, [value("f64", -1), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1403 +assert_return(() => invoke($0, `le`, [value("f64", 1), value("f64", -Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1404 +assert_return(() => invoke($0, `le`, [value("f64", 1), value("f64", Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1405 +assert_return( + () => invoke($0, `le`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1406 +assert_return( + () => invoke($0, `le`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1407 +assert_return( + () => invoke($0, `le`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1408 +assert_return( + () => invoke($0, `le`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1409 +assert_return( + () => invoke($0, `le`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1410 +assert_return( + () => invoke($0, `le`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1411 +assert_return( + () => invoke($0, `le`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1412 +assert_return( + () => invoke($0, `le`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1413 +assert_return( + () => invoke($0, `le`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1414 +assert_return( + () => invoke($0, `le`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1415 +assert_return( + () => invoke($0, `le`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1416 +assert_return( + () => invoke($0, `le`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1417 +assert_return( + () => invoke($0, `le`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1418 +assert_return( + () => invoke($0, `le`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1419 +assert_return( + () => invoke($0, `le`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1420 +assert_return( + () => invoke($0, `le`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1421 +assert_return( + () => invoke($0, `le`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1422 +assert_return( + () => invoke($0, `le`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1423 +assert_return( + () => invoke($0, `le`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1424 +assert_return( + () => invoke($0, `le`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1425 +assert_return( + () => invoke($0, `le`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1426 +assert_return( + () => invoke($0, `le`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1427 +assert_return( + () => invoke($0, `le`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1428 +assert_return( + () => invoke($0, `le`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1429 +assert_return( + () => invoke($0, `le`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1430 +assert_return( + () => invoke($0, `le`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1431 +assert_return( + () => invoke($0, `le`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1432 +assert_return( + () => invoke($0, `le`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1433 +assert_return( + () => invoke($0, `le`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1434 +assert_return( + () => invoke($0, `le`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1435 +assert_return( + () => invoke($0, `le`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1436 +assert_return( + () => invoke($0, `le`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1437 +assert_return( + () => invoke($0, `le`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1438 +assert_return( + () => invoke($0, `le`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1439 +assert_return( + () => invoke($0, `le`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1440 +assert_return( + () => invoke($0, `le`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1441 +assert_return( + () => invoke($0, `le`, [value("f64", -6.283185307179586), value("f64", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1442 +assert_return( + () => invoke($0, `le`, [value("f64", -6.283185307179586), value("f64", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1443 +assert_return( + () => invoke($0, `le`, [value("f64", 6.283185307179586), value("f64", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1444 +assert_return( + () => invoke($0, `le`, [value("f64", 6.283185307179586), value("f64", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1445 +assert_return( + () => invoke($0, `le`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1446 +assert_return( + () => invoke($0, `le`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1447 +assert_return( + () => invoke($0, `le`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1448 +assert_return( + () => invoke($0, `le`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1449 +assert_return( + () => invoke($0, `le`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1450 +assert_return( + () => invoke($0, `le`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1451 +assert_return( + () => invoke($0, `le`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1452 +assert_return( + () => invoke($0, `le`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1453 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1454 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1455 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1456 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1457 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1458 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1459 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1460 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1461 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1462 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1463 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1464 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1465 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1466 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1467 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1468 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1469 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1470 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1471 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1472 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1473 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1474 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1475 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1476 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1477 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1478 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1479 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1480 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1481 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1482 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1483 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1484 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1485 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1486 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1487 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1488 +assert_return( + () => invoke($0, `le`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1489 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1490 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1491 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1492 +assert_return( + () => invoke($0, `le`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1493 +assert_return(() => invoke($0, `le`, [value("f64", -Infinity), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1494 +assert_return(() => invoke($0, `le`, [value("f64", -Infinity), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1495 +assert_return(() => invoke($0, `le`, [value("f64", Infinity), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1496 +assert_return(() => invoke($0, `le`, [value("f64", Infinity), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1497 +assert_return( + () => invoke($0, `le`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1498 +assert_return( + () => invoke($0, `le`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1499 +assert_return( + () => invoke($0, `le`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1500 +assert_return( + () => invoke($0, `le`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1501 +assert_return( + () => invoke($0, `le`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1502 +assert_return( + () => invoke($0, `le`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1503 +assert_return( + () => invoke($0, `le`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1504 +assert_return( + () => invoke($0, `le`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1505 +assert_return(() => invoke($0, `le`, [value("f64", -Infinity), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1506 +assert_return(() => invoke($0, `le`, [value("f64", -Infinity), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1507 +assert_return(() => invoke($0, `le`, [value("f64", Infinity), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1508 +assert_return(() => invoke($0, `le`, [value("f64", Infinity), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1509 +assert_return(() => invoke($0, `le`, [value("f64", -Infinity), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1510 +assert_return(() => invoke($0, `le`, [value("f64", -Infinity), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1511 +assert_return(() => invoke($0, `le`, [value("f64", Infinity), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1512 +assert_return(() => invoke($0, `le`, [value("f64", Infinity), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1513 +assert_return( + () => invoke($0, `le`, [value("f64", -Infinity), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1514 +assert_return( + () => invoke($0, `le`, [value("f64", -Infinity), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1515 +assert_return( + () => invoke($0, `le`, [value("f64", Infinity), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1516 +assert_return( + () => invoke($0, `le`, [value("f64", Infinity), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1517 +assert_return( + () => invoke($0, `le`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1518 +assert_return( + () => invoke($0, `le`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1519 +assert_return( + () => invoke($0, `le`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1520 +assert_return( + () => invoke($0, `le`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1521 +assert_return( + () => invoke($0, `le`, [value("f64", -Infinity), value("f64", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1522 +assert_return( + () => invoke($0, `le`, [value("f64", -Infinity), value("f64", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1523 +assert_return( + () => invoke($0, `le`, [value("f64", Infinity), value("f64", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1524 +assert_return( + () => invoke($0, `le`, [value("f64", Infinity), value("f64", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1525 +assert_return( + () => invoke($0, `le`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1526 +assert_return( + () => invoke($0, `le`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1527 +assert_return( + () => invoke($0, `le`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1528 +assert_return( + () => invoke($0, `le`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1529 +assert_return( + () => invoke($0, `le`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1530 +assert_return( + () => invoke($0, `le`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1531 +assert_return( + () => invoke($0, `le`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1532 +assert_return( + () => invoke($0, `le`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1533 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1534 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1535 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1536 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1537 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1538 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1539 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1540 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1541 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1542 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1543 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1544 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1545 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1546 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1547 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1548 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1549 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1550 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1551 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1552 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1553 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1554 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1555 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1556 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1557 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1558 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1559 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1560 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1561 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1562 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1563 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1564 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1565 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1566 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1567 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1568 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1569 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1570 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1571 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1572 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1573 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1574 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1575 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1576 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1577 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1578 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1579 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1580 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1581 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1582 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1583 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1584 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1585 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1586 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1587 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1588 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1589 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1590 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1591 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1592 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1593 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1594 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1595 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1596 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1597 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1598 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1599 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1600 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1601 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1602 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1603 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1604 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1605 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1606 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1607 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1608 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1609 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1610 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1611 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1612 +assert_return( + () => invoke($0, `le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1613 +assert_return(() => invoke($0, `gt`, [value("f64", -0), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1614 +assert_return(() => invoke($0, `gt`, [value("f64", -0), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1615 +assert_return(() => invoke($0, `gt`, [value("f64", 0), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1616 +assert_return(() => invoke($0, `gt`, [value("f64", 0), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1617 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1618 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1619 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1620 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1621 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1622 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1623 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1624 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1625 +assert_return(() => invoke($0, `gt`, [value("f64", -0), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1626 +assert_return(() => invoke($0, `gt`, [value("f64", -0), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1627 +assert_return(() => invoke($0, `gt`, [value("f64", 0), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1628 +assert_return(() => invoke($0, `gt`, [value("f64", 0), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1629 +assert_return(() => invoke($0, `gt`, [value("f64", -0), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1630 +assert_return(() => invoke($0, `gt`, [value("f64", -0), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1631 +assert_return(() => invoke($0, `gt`, [value("f64", 0), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1632 +assert_return(() => invoke($0, `gt`, [value("f64", 0), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1633 +assert_return( + () => invoke($0, `gt`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1634 +assert_return( + () => invoke($0, `gt`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1635 +assert_return( + () => invoke($0, `gt`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1636 +assert_return( + () => invoke($0, `gt`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1637 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1638 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1639 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1640 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1641 +assert_return(() => invoke($0, `gt`, [value("f64", -0), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1642 +assert_return(() => invoke($0, `gt`, [value("f64", -0), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1643 +assert_return(() => invoke($0, `gt`, [value("f64", 0), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1644 +assert_return(() => invoke($0, `gt`, [value("f64", 0), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1645 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1646 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1647 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1648 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1649 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1650 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1651 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1652 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1653 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1654 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1655 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1656 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1657 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1658 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1659 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1660 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1661 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1662 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1663 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1664 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1665 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1666 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1667 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1668 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1669 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1670 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1671 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1672 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1673 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1674 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1675 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1676 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1677 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1678 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1679 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1680 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1681 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1682 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1683 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1684 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1685 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1686 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1687 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1688 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1689 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1690 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1691 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1692 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1693 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1694 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1695 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1696 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1697 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1698 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1699 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1700 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1701 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1702 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1703 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1704 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1705 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1706 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1707 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1708 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1709 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1710 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1711 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1712 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1713 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1714 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1715 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1716 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1717 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1718 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1719 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1720 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1721 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1722 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1723 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1724 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1725 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1726 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1727 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1728 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1729 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1730 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1731 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1732 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1733 +assert_return(() => invoke($0, `gt`, [value("f64", -0.5), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1734 +assert_return(() => invoke($0, `gt`, [value("f64", -0.5), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1735 +assert_return(() => invoke($0, `gt`, [value("f64", 0.5), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1736 +assert_return(() => invoke($0, `gt`, [value("f64", 0.5), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1737 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1738 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1739 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1740 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1741 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1742 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1743 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1744 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1745 +assert_return(() => invoke($0, `gt`, [value("f64", -0.5), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1746 +assert_return(() => invoke($0, `gt`, [value("f64", -0.5), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1747 +assert_return(() => invoke($0, `gt`, [value("f64", 0.5), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1748 +assert_return(() => invoke($0, `gt`, [value("f64", 0.5), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1749 +assert_return(() => invoke($0, `gt`, [value("f64", -0.5), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1750 +assert_return(() => invoke($0, `gt`, [value("f64", -0.5), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1751 +assert_return(() => invoke($0, `gt`, [value("f64", 0.5), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1752 +assert_return(() => invoke($0, `gt`, [value("f64", 0.5), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1753 +assert_return( + () => invoke($0, `gt`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1754 +assert_return( + () => invoke($0, `gt`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1755 +assert_return( + () => invoke($0, `gt`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1756 +assert_return( + () => invoke($0, `gt`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1757 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1758 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1759 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1760 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1761 +assert_return(() => invoke($0, `gt`, [value("f64", -0.5), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1762 +assert_return(() => invoke($0, `gt`, [value("f64", -0.5), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1763 +assert_return(() => invoke($0, `gt`, [value("f64", 0.5), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1764 +assert_return(() => invoke($0, `gt`, [value("f64", 0.5), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1765 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1766 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1767 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1768 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1769 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1770 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1771 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1772 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1773 +assert_return(() => invoke($0, `gt`, [value("f64", -1), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1774 +assert_return(() => invoke($0, `gt`, [value("f64", -1), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1775 +assert_return(() => invoke($0, `gt`, [value("f64", 1), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1776 +assert_return(() => invoke($0, `gt`, [value("f64", 1), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1777 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1778 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1779 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1780 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1781 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1782 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1783 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1784 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1785 +assert_return(() => invoke($0, `gt`, [value("f64", -1), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1786 +assert_return(() => invoke($0, `gt`, [value("f64", -1), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1787 +assert_return(() => invoke($0, `gt`, [value("f64", 1), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1788 +assert_return(() => invoke($0, `gt`, [value("f64", 1), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1789 +assert_return(() => invoke($0, `gt`, [value("f64", -1), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1790 +assert_return(() => invoke($0, `gt`, [value("f64", -1), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1791 +assert_return(() => invoke($0, `gt`, [value("f64", 1), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1792 +assert_return(() => invoke($0, `gt`, [value("f64", 1), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1793 +assert_return( + () => invoke($0, `gt`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1794 +assert_return( + () => invoke($0, `gt`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1795 +assert_return( + () => invoke($0, `gt`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1796 +assert_return( + () => invoke($0, `gt`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1797 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1798 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1799 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1800 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1801 +assert_return(() => invoke($0, `gt`, [value("f64", -1), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1802 +assert_return(() => invoke($0, `gt`, [value("f64", -1), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1803 +assert_return(() => invoke($0, `gt`, [value("f64", 1), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1804 +assert_return(() => invoke($0, `gt`, [value("f64", 1), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1805 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1806 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1807 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1808 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1809 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1810 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1811 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1812 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1813 +assert_return( + () => invoke($0, `gt`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1814 +assert_return( + () => invoke($0, `gt`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1815 +assert_return( + () => invoke($0, `gt`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1816 +assert_return( + () => invoke($0, `gt`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1817 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1818 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1819 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1820 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1821 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1822 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1823 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1824 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1825 +assert_return( + () => invoke($0, `gt`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1826 +assert_return( + () => invoke($0, `gt`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1827 +assert_return( + () => invoke($0, `gt`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1828 +assert_return( + () => invoke($0, `gt`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1829 +assert_return( + () => invoke($0, `gt`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1830 +assert_return( + () => invoke($0, `gt`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1831 +assert_return( + () => invoke($0, `gt`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1832 +assert_return( + () => invoke($0, `gt`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1833 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1834 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1835 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1836 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1837 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1838 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1839 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1840 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1841 +assert_return( + () => invoke($0, `gt`, [value("f64", -6.283185307179586), value("f64", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1842 +assert_return( + () => invoke($0, `gt`, [value("f64", -6.283185307179586), value("f64", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1843 +assert_return( + () => invoke($0, `gt`, [value("f64", 6.283185307179586), value("f64", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1844 +assert_return( + () => invoke($0, `gt`, [value("f64", 6.283185307179586), value("f64", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1845 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1846 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1847 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1848 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1849 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1850 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1851 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1852 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1853 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1854 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1855 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1856 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1857 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1858 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1859 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1860 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1861 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1862 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1863 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1864 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1865 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1866 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1867 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1868 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1869 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1870 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1871 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1872 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1873 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1874 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1875 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1876 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1877 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1878 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1879 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1880 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1881 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1882 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1883 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1884 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1885 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1886 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1887 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1888 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1889 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1890 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1891 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1892 +assert_return( + () => invoke($0, `gt`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1893 +assert_return(() => invoke($0, `gt`, [value("f64", -Infinity), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1894 +assert_return(() => invoke($0, `gt`, [value("f64", -Infinity), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1895 +assert_return(() => invoke($0, `gt`, [value("f64", Infinity), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1896 +assert_return(() => invoke($0, `gt`, [value("f64", Infinity), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1897 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1898 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1899 +assert_return( + () => invoke($0, `gt`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1900 +assert_return( + () => invoke($0, `gt`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1901 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1902 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1903 +assert_return( + () => invoke($0, `gt`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1904 +assert_return( + () => invoke($0, `gt`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1905 +assert_return(() => invoke($0, `gt`, [value("f64", -Infinity), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1906 +assert_return(() => invoke($0, `gt`, [value("f64", -Infinity), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1907 +assert_return(() => invoke($0, `gt`, [value("f64", Infinity), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1908 +assert_return(() => invoke($0, `gt`, [value("f64", Infinity), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1909 +assert_return(() => invoke($0, `gt`, [value("f64", -Infinity), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1910 +assert_return(() => invoke($0, `gt`, [value("f64", -Infinity), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:1911 +assert_return(() => invoke($0, `gt`, [value("f64", Infinity), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1912 +assert_return(() => invoke($0, `gt`, [value("f64", Infinity), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:1913 +assert_return( + () => invoke($0, `gt`, [value("f64", -Infinity), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1914 +assert_return( + () => invoke($0, `gt`, [value("f64", -Infinity), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1915 +assert_return( + () => invoke($0, `gt`, [value("f64", Infinity), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1916 +assert_return( + () => invoke($0, `gt`, [value("f64", Infinity), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1917 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1918 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1919 +assert_return( + () => invoke($0, `gt`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1920 +assert_return( + () => invoke($0, `gt`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1921 +assert_return( + () => invoke($0, `gt`, [value("f64", -Infinity), value("f64", -Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1922 +assert_return( + () => invoke($0, `gt`, [value("f64", -Infinity), value("f64", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1923 +assert_return( + () => invoke($0, `gt`, [value("f64", Infinity), value("f64", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:1924 +assert_return( + () => invoke($0, `gt`, [value("f64", Infinity), value("f64", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1925 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1926 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1927 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1928 +assert_return( + () => invoke($0, `gt`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1929 +assert_return( + () => invoke($0, `gt`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1930 +assert_return( + () => invoke($0, `gt`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1931 +assert_return( + () => invoke($0, `gt`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1932 +assert_return( + () => invoke($0, `gt`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1933 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1934 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1935 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1936 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1937 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1938 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1939 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1940 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1941 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1942 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1943 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1944 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1945 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1946 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1947 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1948 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1949 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1950 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1951 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1952 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1953 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1954 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1955 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1956 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1957 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1958 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1959 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1960 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1961 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1962 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1963 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1964 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1965 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1966 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1967 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1968 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1969 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1970 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1971 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1972 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1973 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1974 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1975 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1976 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1977 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1978 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1979 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1980 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1981 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1982 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1983 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1984 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1985 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1986 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1987 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1988 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1989 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1990 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1991 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1992 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1993 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1994 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1995 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1996 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1997 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1998 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:1999 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2000 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2001 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2002 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2003 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2004 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2005 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2006 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2007 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2008 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2009 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2010 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2011 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2012 +assert_return( + () => invoke($0, `gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2013 +assert_return(() => invoke($0, `ge`, [value("f64", -0), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2014 +assert_return(() => invoke($0, `ge`, [value("f64", -0), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2015 +assert_return(() => invoke($0, `ge`, [value("f64", 0), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2016 +assert_return(() => invoke($0, `ge`, [value("f64", 0), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2017 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2018 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2019 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2020 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2021 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2022 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2023 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2024 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2025 +assert_return(() => invoke($0, `ge`, [value("f64", -0), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2026 +assert_return(() => invoke($0, `ge`, [value("f64", -0), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2027 +assert_return(() => invoke($0, `ge`, [value("f64", 0), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2028 +assert_return(() => invoke($0, `ge`, [value("f64", 0), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2029 +assert_return(() => invoke($0, `ge`, [value("f64", -0), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2030 +assert_return(() => invoke($0, `ge`, [value("f64", -0), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2031 +assert_return(() => invoke($0, `ge`, [value("f64", 0), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2032 +assert_return(() => invoke($0, `ge`, [value("f64", 0), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2033 +assert_return( + () => invoke($0, `ge`, [value("f64", -0), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2034 +assert_return( + () => invoke($0, `ge`, [value("f64", -0), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2035 +assert_return( + () => invoke($0, `ge`, [value("f64", 0), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2036 +assert_return( + () => invoke($0, `ge`, [value("f64", 0), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2037 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2038 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2039 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2040 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2041 +assert_return(() => invoke($0, `ge`, [value("f64", -0), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2042 +assert_return(() => invoke($0, `ge`, [value("f64", -0), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2043 +assert_return(() => invoke($0, `ge`, [value("f64", 0), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2044 +assert_return(() => invoke($0, `ge`, [value("f64", 0), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2045 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2046 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2047 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2048 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2049 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2050 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2051 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2052 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2053 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2054 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2055 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2056 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2057 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2058 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2059 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2060 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2061 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2062 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2063 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2064 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2065 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2066 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2067 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2068 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2069 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2070 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2071 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2072 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2073 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2074 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2075 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2076 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2077 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2078 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2079 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2080 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2081 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2082 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2083 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2084 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2085 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2086 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2087 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2088 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2089 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2090 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2091 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2092 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2093 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2094 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2095 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2096 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2097 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2098 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2099 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2100 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2101 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2102 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2103 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2104 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2105 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2106 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2107 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2108 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2109 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2110 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2111 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2112 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2113 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2114 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2115 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2116 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2117 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2118 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2119 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2120 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2121 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2122 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2123 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2124 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2125 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2126 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2127 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2128 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2129 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2130 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2131 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2132 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2133 +assert_return(() => invoke($0, `ge`, [value("f64", -0.5), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2134 +assert_return(() => invoke($0, `ge`, [value("f64", -0.5), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2135 +assert_return(() => invoke($0, `ge`, [value("f64", 0.5), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2136 +assert_return(() => invoke($0, `ge`, [value("f64", 0.5), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2137 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2138 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2139 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2140 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2141 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2142 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2143 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.5), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2144 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.5), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2145 +assert_return(() => invoke($0, `ge`, [value("f64", -0.5), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2146 +assert_return(() => invoke($0, `ge`, [value("f64", -0.5), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2147 +assert_return(() => invoke($0, `ge`, [value("f64", 0.5), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2148 +assert_return(() => invoke($0, `ge`, [value("f64", 0.5), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2149 +assert_return(() => invoke($0, `ge`, [value("f64", -0.5), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2150 +assert_return(() => invoke($0, `ge`, [value("f64", -0.5), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2151 +assert_return(() => invoke($0, `ge`, [value("f64", 0.5), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2152 +assert_return(() => invoke($0, `ge`, [value("f64", 0.5), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2153 +assert_return( + () => invoke($0, `ge`, [value("f64", -0.5), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2154 +assert_return( + () => invoke($0, `ge`, [value("f64", -0.5), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2155 +assert_return( + () => invoke($0, `ge`, [value("f64", 0.5), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2156 +assert_return( + () => invoke($0, `ge`, [value("f64", 0.5), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2157 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2158 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2159 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.5), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2160 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.5), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2161 +assert_return(() => invoke($0, `ge`, [value("f64", -0.5), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2162 +assert_return(() => invoke($0, `ge`, [value("f64", -0.5), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2163 +assert_return(() => invoke($0, `ge`, [value("f64", 0.5), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2164 +assert_return(() => invoke($0, `ge`, [value("f64", 0.5), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2165 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2166 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2167 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2168 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2169 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2170 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2171 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2172 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 0.5), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2173 +assert_return(() => invoke($0, `ge`, [value("f64", -1), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2174 +assert_return(() => invoke($0, `ge`, [value("f64", -1), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2175 +assert_return(() => invoke($0, `ge`, [value("f64", 1), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2176 +assert_return(() => invoke($0, `ge`, [value("f64", 1), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2177 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2178 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2179 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2180 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2181 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2182 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2183 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 1), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2184 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2185 +assert_return(() => invoke($0, `ge`, [value("f64", -1), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2186 +assert_return(() => invoke($0, `ge`, [value("f64", -1), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2187 +assert_return(() => invoke($0, `ge`, [value("f64", 1), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2188 +assert_return(() => invoke($0, `ge`, [value("f64", 1), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2189 +assert_return(() => invoke($0, `ge`, [value("f64", -1), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2190 +assert_return(() => invoke($0, `ge`, [value("f64", -1), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2191 +assert_return(() => invoke($0, `ge`, [value("f64", 1), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2192 +assert_return(() => invoke($0, `ge`, [value("f64", 1), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2193 +assert_return( + () => invoke($0, `ge`, [value("f64", -1), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2194 +assert_return( + () => invoke($0, `ge`, [value("f64", -1), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2195 +assert_return( + () => invoke($0, `ge`, [value("f64", 1), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2196 +assert_return( + () => invoke($0, `ge`, [value("f64", 1), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2197 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2198 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2199 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 1), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2200 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 1), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2201 +assert_return(() => invoke($0, `ge`, [value("f64", -1), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2202 +assert_return(() => invoke($0, `ge`, [value("f64", -1), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2203 +assert_return(() => invoke($0, `ge`, [value("f64", 1), value("f64", -Infinity)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2204 +assert_return(() => invoke($0, `ge`, [value("f64", 1), value("f64", Infinity)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2205 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2206 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2207 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2208 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2209 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2210 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2211 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2212 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 1), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2213 +assert_return( + () => invoke($0, `ge`, [value("f64", -6.283185307179586), value("f64", -0)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2214 +assert_return( + () => invoke($0, `ge`, [value("f64", -6.283185307179586), value("f64", 0)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2215 +assert_return( + () => invoke($0, `ge`, [value("f64", 6.283185307179586), value("f64", -0)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2216 +assert_return( + () => invoke($0, `ge`, [value("f64", 6.283185307179586), value("f64", 0)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2217 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2218 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2219 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2220 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2221 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2222 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2223 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 6.283185307179586), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2224 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 6.283185307179586), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2225 +assert_return( + () => invoke($0, `ge`, [value("f64", -6.283185307179586), value("f64", -0.5)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2226 +assert_return( + () => invoke($0, `ge`, [value("f64", -6.283185307179586), value("f64", 0.5)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2227 +assert_return( + () => invoke($0, `ge`, [value("f64", 6.283185307179586), value("f64", -0.5)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2228 +assert_return( + () => invoke($0, `ge`, [value("f64", 6.283185307179586), value("f64", 0.5)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2229 +assert_return( + () => invoke($0, `ge`, [value("f64", -6.283185307179586), value("f64", -1)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2230 +assert_return( + () => invoke($0, `ge`, [value("f64", -6.283185307179586), value("f64", 1)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2231 +assert_return( + () => invoke($0, `ge`, [value("f64", 6.283185307179586), value("f64", -1)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2232 +assert_return( + () => invoke($0, `ge`, [value("f64", 6.283185307179586), value("f64", 1)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2233 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2234 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2235 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 6.283185307179586), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2236 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2237 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2238 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2239 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 6.283185307179586), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2240 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 6.283185307179586), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2241 +assert_return( + () => invoke($0, `ge`, [value("f64", -6.283185307179586), value("f64", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2242 +assert_return( + () => invoke($0, `ge`, [value("f64", -6.283185307179586), value("f64", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2243 +assert_return( + () => invoke($0, `ge`, [value("f64", 6.283185307179586), value("f64", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2244 +assert_return( + () => invoke($0, `ge`, [value("f64", 6.283185307179586), value("f64", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2245 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2246 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2247 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2248 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2249 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2250 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2251 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2252 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 6.283185307179586), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2253 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2254 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2255 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2256 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2257 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2258 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2259 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2260 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2261 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2262 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2263 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2264 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2265 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2266 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2267 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2268 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.5), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2269 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2270 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2271 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2272 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2273 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2274 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2275 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2276 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6.283185307179586), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2277 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2278 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2279 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2280 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2281 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2282 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2283 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -Infinity), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2284 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2285 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2286 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2287 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2288 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2289 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2290 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2291 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2292 +assert_return( + () => invoke($0, `ge`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2293 +assert_return(() => invoke($0, `ge`, [value("f64", -Infinity), value("f64", -0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2294 +assert_return(() => invoke($0, `ge`, [value("f64", -Infinity), value("f64", 0)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2295 +assert_return(() => invoke($0, `ge`, [value("f64", Infinity), value("f64", -0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2296 +assert_return(() => invoke($0, `ge`, [value("f64", Infinity), value("f64", 0)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2297 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2298 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2299 +assert_return( + () => invoke($0, `ge`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2300 +assert_return( + () => invoke($0, `ge`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2301 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2302 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2303 +assert_return( + () => invoke($0, `ge`, [ + value("f64", Infinity), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2304 +assert_return( + () => invoke($0, `ge`, [ + value("f64", Infinity), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2305 +assert_return(() => invoke($0, `ge`, [value("f64", -Infinity), value("f64", -0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2306 +assert_return(() => invoke($0, `ge`, [value("f64", -Infinity), value("f64", 0.5)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2307 +assert_return(() => invoke($0, `ge`, [value("f64", Infinity), value("f64", -0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2308 +assert_return(() => invoke($0, `ge`, [value("f64", Infinity), value("f64", 0.5)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2309 +assert_return(() => invoke($0, `ge`, [value("f64", -Infinity), value("f64", -1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2310 +assert_return(() => invoke($0, `ge`, [value("f64", -Infinity), value("f64", 1)]), [value("i32", 0)]); + +// ./test/core/f64_cmp.wast:2311 +assert_return(() => invoke($0, `ge`, [value("f64", Infinity), value("f64", -1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2312 +assert_return(() => invoke($0, `ge`, [value("f64", Infinity), value("f64", 1)]), [value("i32", 1)]); + +// ./test/core/f64_cmp.wast:2313 +assert_return( + () => invoke($0, `ge`, [value("f64", -Infinity), value("f64", -6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2314 +assert_return( + () => invoke($0, `ge`, [value("f64", -Infinity), value("f64", 6.283185307179586)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2315 +assert_return( + () => invoke($0, `ge`, [value("f64", Infinity), value("f64", -6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2316 +assert_return( + () => invoke($0, `ge`, [value("f64", Infinity), value("f64", 6.283185307179586)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2317 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2318 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2319 +assert_return( + () => invoke($0, `ge`, [ + value("f64", Infinity), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2320 +assert_return( + () => invoke($0, `ge`, [ + value("f64", Infinity), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2321 +assert_return( + () => invoke($0, `ge`, [value("f64", -Infinity), value("f64", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2322 +assert_return( + () => invoke($0, `ge`, [value("f64", -Infinity), value("f64", Infinity)]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2323 +assert_return( + () => invoke($0, `ge`, [value("f64", Infinity), value("f64", -Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2324 +assert_return( + () => invoke($0, `ge`, [value("f64", Infinity), value("f64", Infinity)]), + [value("i32", 1)], +); + +// ./test/core/f64_cmp.wast:2325 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2326 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2327 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2328 +assert_return( + () => invoke($0, `ge`, [ + value("f64", -Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2329 +assert_return( + () => invoke($0, `ge`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2330 +assert_return( + () => invoke($0, `ge`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2331 +assert_return( + () => invoke($0, `ge`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2332 +assert_return( + () => invoke($0, `ge`, [ + value("f64", Infinity), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2333 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2334 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2335 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2336 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2337 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2338 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2339 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2340 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2341 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2342 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2343 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2344 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2345 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2346 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2347 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2348 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2349 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2350 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2351 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2352 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2353 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2354 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2355 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2356 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2357 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2358 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2359 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2360 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2361 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2362 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2363 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2364 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 0.5), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2365 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2366 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2367 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2368 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2369 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2370 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2371 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2372 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 1), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2373 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2374 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2375 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2376 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2377 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2378 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2379 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2380 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 6.283185307179586), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2381 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2382 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2383 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2384 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2385 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2386 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2387 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2388 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2389 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2390 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2391 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2392 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2393 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2394 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", -Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2395 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2396 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2397 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2398 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2399 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2400 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2401 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2402 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2403 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2404 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2405 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2406 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2407 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2408 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2409 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2410 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2411 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2412 +assert_return( + () => invoke($0, `ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/f64_cmp.wast:2417 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.eq (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64_cmp.wast:2418 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.ge (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64_cmp.wast:2419 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.gt (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64_cmp.wast:2420 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.le (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64_cmp.wast:2421 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.lt (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/f64_cmp.wast:2422 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64.ne (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/fac.wast.js b/js/src/jit-test/tests/wasm/spec/spec/fac.wast.js new file mode 100644 index 0000000000..f356881230 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/fac.wast.js @@ -0,0 +1,139 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/fac.wast + +// ./test/core/fac.wast:1 +let $0 = instantiate(`(module + ;; Recursive factorial + (func (export "fac-rec") (param i64) (result i64) + (if (result i64) (i64.eq (local.get 0) (i64.const 0)) + (then (i64.const 1)) + (else + (i64.mul (local.get 0) (call 0 (i64.sub (local.get 0) (i64.const 1)))) + ) + ) + ) + + ;; Recursive factorial named + (func $$fac-rec-named (export "fac-rec-named") (param $$n i64) (result i64) + (if (result i64) (i64.eq (local.get $$n) (i64.const 0)) + (then (i64.const 1)) + (else + (i64.mul + (local.get $$n) + (call $$fac-rec-named (i64.sub (local.get $$n) (i64.const 1))) + ) + ) + ) + ) + + ;; Iterative factorial + (func (export "fac-iter") (param i64) (result i64) + (local i64 i64) + (local.set 1 (local.get 0)) + (local.set 2 (i64.const 1)) + (block + (loop + (if + (i64.eq (local.get 1) (i64.const 0)) + (then (br 2)) + (else + (local.set 2 (i64.mul (local.get 1) (local.get 2))) + (local.set 1 (i64.sub (local.get 1) (i64.const 1))) + ) + ) + (br 0) + ) + ) + (local.get 2) + ) + + ;; Iterative factorial named + (func (export "fac-iter-named") (param $$n i64) (result i64) + (local $$i i64) + (local $$res i64) + (local.set $$i (local.get $$n)) + (local.set $$res (i64.const 1)) + (block $$done + (loop $$loop + (if + (i64.eq (local.get $$i) (i64.const 0)) + (then (br $$done)) + (else + (local.set $$res (i64.mul (local.get $$i) (local.get $$res))) + (local.set $$i (i64.sub (local.get $$i) (i64.const 1))) + ) + ) + (br $$loop) + ) + ) + (local.get $$res) + ) + + ;; Optimized factorial. + (func (export "fac-opt") (param i64) (result i64) + (local i64) + (local.set 1 (i64.const 1)) + (block + (br_if 0 (i64.lt_s (local.get 0) (i64.const 2))) + (loop + (local.set 1 (i64.mul (local.get 1) (local.get 0))) + (local.set 0 (i64.add (local.get 0) (i64.const -1))) + (br_if 0 (i64.gt_s (local.get 0) (i64.const 1))) + ) + ) + (local.get 1) + ) + + ;; Iterative factorial without locals. + (func $$pick0 (param i64) (result i64 i64) + (local.get 0) (local.get 0) + ) + (func $$pick1 (param i64 i64) (result i64 i64 i64) + (local.get 0) (local.get 1) (local.get 0) + ) + (func (export "fac-ssa") (param i64) (result i64) + (i64.const 1) (local.get 0) + (loop $$l (param i64 i64) (result i64) + (call $$pick1) (call $$pick1) (i64.mul) + (call $$pick1) (i64.const 1) (i64.sub) + (call $$pick0) (i64.const 0) (i64.gt_u) + (br_if $$l) + (drop) (return) + ) + ) +)`); + +// ./test/core/fac.wast:102 +assert_return(() => invoke($0, `fac-rec`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/fac.wast:103 +assert_return(() => invoke($0, `fac-iter`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/fac.wast:104 +assert_return(() => invoke($0, `fac-rec-named`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/fac.wast:105 +assert_return(() => invoke($0, `fac-iter-named`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/fac.wast:106 +assert_return(() => invoke($0, `fac-opt`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/fac.wast:107 +assert_return(() => invoke($0, `fac-ssa`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/fac.wast:109 +assert_exhaustion(() => invoke($0, `fac-rec`, [1073741824n]), `call stack exhausted`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/float_exprs.wast.js b/js/src/jit-test/tests/wasm/spec/spec/float_exprs.wast.js new file mode 100644 index 0000000000..120b1402c4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/float_exprs.wast.js @@ -0,0 +1,7295 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/float_exprs.wast + +// ./test/core/float_exprs.wast:6 +let $0 = instantiate(`(module + (func (export "f64.no_contraction") (param $$x f64) (param $$y f64) (param $$z f64) (result f64) + (f64.add (f64.mul (local.get $$x) (local.get $$y)) (local.get $$z))) +)`); + +// ./test/core/float_exprs.wast:11 +assert_return( + () => invoke($0, `f64.no_contraction`, [ + value("f64", -0.00000000000000000000000000000015967133604096234), + value("f64", 87633521608271230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 42896576204898460000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -13992561434270632000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:12 +assert_return( + () => invoke($0, `f64.no_contraction`, [ + value("f64", 8341016642481988), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003223424965918293), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023310835741659086), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000026886641288847496), + ], +); + +// ./test/core/float_exprs.wast:13 +assert_return( + () => invoke($0, `f64.no_contraction`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030119045290520013), + value("f64", 52699336439236750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.00000000000000000000000000000006654454781339856), + ]), + [value("f64", -0.0000000000000000015872537009936566)], +); + +// ./test/core/float_exprs.wast:14 +assert_return( + () => invoke($0, `f64.no_contraction`, [ + value("f64", 0.0000000000000000000031413936116780743), + value("f64", -0.0000000000000000000000000000007262766035707377), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000004619684894228461), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000228152068276836), + ], +); + +// ./test/core/float_exprs.wast:15 +assert_return( + () => invoke($0, `f64.no_contraction`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016080464217402378), + value("f64", -382103410226833000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.00000000000000010541980504151345), + ]), + [value("f64", 0.00006144400215510552)], +); + +// ./test/core/float_exprs.wast:19 +let $1 = instantiate(`(module + (func (export "f32.no_fma") (param $$x f32) (param $$y f32) (param $$z f32) (result f32) + (f32.add (f32.mul (local.get $$x) (local.get $$y)) (local.get $$z))) + (func (export "f64.no_fma") (param $$x f64) (param $$y f64) (param $$z f64) (result f64) + (f64.add (f64.mul (local.get $$x) (local.get $$y)) (local.get $$z))) +)`); + +// ./test/core/float_exprs.wast:26 +assert_return( + () => invoke($1, `f32.no_fma`, [ + value("f32", 35184304000000000000000000000000000000), + value("f32", 0.00000021584361), + value("f32", 259340640000000000000000000000000), + ]), + [value("f32", 266934960000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:27 +assert_return( + () => invoke($1, `f32.no_fma`, [ + value("f32", 0.0000000071753243), + value("f32", -0.000000000000001225534), + value("f32", 0.0000000000000000000000000041316436), + ]), + [value("f32", -0.0000000000000000000000087894724)], +); + +// ./test/core/float_exprs.wast:28 +assert_return( + () => invoke($1, `f32.no_fma`, [ + value("f32", 231063440000), + value("f32", 0.00020773262), + value("f32", 1797.6421), + ]), + [value("f32", 48001210)], +); + +// ./test/core/float_exprs.wast:29 +assert_return( + () => invoke($1, `f32.no_fma`, [ + value("f32", 0.0045542703), + value("f32", -7265493.5), + value("f32", -2.3964283), + ]), + [value("f32", -33091.414)], +); + +// ./test/core/float_exprs.wast:30 +assert_return( + () => invoke($1, `f32.no_fma`, [ + value("f32", 98881730000000000000000000000000000000), + value("f32", -0.0000000000000000000008570631), + value("f32", -21579143000), + ]), + [value("f32", -84747910000000000)], +); + +// ./test/core/float_exprs.wast:31 +assert_return( + () => invoke($1, `f64.no_fma`, [ + value("f64", 789084284375179200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4215020052117360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1336601081131744700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 1989405000320312800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:32 +assert_return( + () => invoke($1, `f64.no_fma`, [ + value("f64", 5586822348009285500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.0000000000000000000000000000000000000007397302005677334), + value("f64", 36567834172040920000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 4132741216029240700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:33 +assert_return( + () => invoke($1, `f64.no_fma`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014260477822274587), + value("f64", -31087632036599860000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 343269235523777630000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -4433244872049653000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:34 +assert_return( + () => invoke($1, `f64.no_fma`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000809034701735478), + value("f64", -24874417850667450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 49484765138510810), + ]), + [value("f64", 250727437405094720)], +); + +// ./test/core/float_exprs.wast:35 +assert_return( + () => invoke($1, `f64.no_fma`, [ + value("f64", 6723256985364377), + value("f64", 285456566692879460000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -5593839470050757000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 1919197856036028600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:40 +let $2 = instantiate(`(module + (func (export "f32.no_fold_add_zero") (param $$x f32) (result f32) + (f32.add (local.get $$x) (f32.const 0.0))) + (func (export "f64.no_fold_add_zero") (param $$x f64) (result f64) + (f64.add (local.get $$x) (f64.const 0.0))) +)`); + +// ./test/core/float_exprs.wast:47 +assert_return(() => invoke($2, `f32.no_fold_add_zero`, [value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:48 +assert_return(() => invoke($2, `f64.no_fold_add_zero`, [value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:49 +assert_return( + () => invoke($2, `f32.no_fold_add_zero`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:50 +assert_return( + () => invoke($2, `f64.no_fold_add_zero`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:54 +let $3 = instantiate(`(module + (func (export "f32.no_fold_zero_sub") (param $$x f32) (result f32) + (f32.sub (f32.const 0.0) (local.get $$x))) + (func (export "f64.no_fold_zero_sub") (param $$x f64) (result f64) + (f64.sub (f64.const 0.0) (local.get $$x))) +)`); + +// ./test/core/float_exprs.wast:61 +assert_return(() => invoke($3, `f32.no_fold_zero_sub`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:62 +assert_return(() => invoke($3, `f64.no_fold_zero_sub`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:63 +assert_return( + () => invoke($3, `f32.no_fold_zero_sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:64 +assert_return( + () => invoke($3, `f64.no_fold_zero_sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:68 +let $4 = instantiate(`(module + (func (export "f32.no_fold_sub_zero") (param $$x f32) (result f32) + (f32.sub (local.get $$x) (f32.const 0.0))) + (func (export "f64.no_fold_sub_zero") (param $$x f64) (result f64) + (f64.sub (local.get $$x) (f64.const 0.0))) +)`); + +// ./test/core/float_exprs.wast:75 +assert_return( + () => invoke($4, `f32.no_fold_sub_zero`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:76 +assert_return( + () => invoke($4, `f64.no_fold_sub_zero`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:80 +let $5 = instantiate(`(module + (func (export "f32.no_fold_mul_zero") (param $$x f32) (result f32) + (f32.mul (local.get $$x) (f32.const 0.0))) + (func (export "f64.no_fold_mul_zero") (param $$x f64) (result f64) + (f64.mul (local.get $$x) (f64.const 0.0))) +)`); + +// ./test/core/float_exprs.wast:87 +assert_return(() => invoke($5, `f32.no_fold_mul_zero`, [value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:88 +assert_return(() => invoke($5, `f32.no_fold_mul_zero`, [value("f32", -1)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:89 +assert_return(() => invoke($5, `f32.no_fold_mul_zero`, [value("f32", -2)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:90 +assert_return( + () => invoke($5, `f32.no_fold_mul_zero`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:91 +assert_return(() => invoke($5, `f64.no_fold_mul_zero`, [value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/float_exprs.wast:92 +assert_return(() => invoke($5, `f64.no_fold_mul_zero`, [value("f64", -1)]), [value("f64", -0)]); + +// ./test/core/float_exprs.wast:93 +assert_return(() => invoke($5, `f64.no_fold_mul_zero`, [value("f64", -2)]), [value("f64", -0)]); + +// ./test/core/float_exprs.wast:94 +assert_return( + () => invoke($5, `f64.no_fold_mul_zero`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:99 +let $6 = instantiate(`(module + (func (export "f32.no_fold_mul_one") (param $$x f32) (result f32) + (f32.mul (local.get $$x) (f32.const 1.0))) + (func (export "f64.no_fold_mul_one") (param $$x f64) (result f64) + (f64.mul (local.get $$x) (f64.const 1.0))) +)`); + +// ./test/core/float_exprs.wast:106 +assert_return( + () => invoke($6, `f32.no_fold_mul_one`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:107 +assert_return( + () => invoke($6, `f64.no_fold_mul_one`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:111 +let $7 = instantiate(`(module + (func (export "f32.no_fold_zero_div") (param $$x f32) (result f32) + (f32.div (f32.const 0.0) (local.get $$x))) + (func (export "f64.no_fold_zero_div") (param $$x f64) (result f64) + (f64.div (f64.const 0.0) (local.get $$x))) +)`); + +// ./test/core/float_exprs.wast:118 +assert_return(() => invoke($7, `f32.no_fold_zero_div`, [value("f32", 0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:119 +assert_return(() => invoke($7, `f32.no_fold_zero_div`, [value("f32", -0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:120 +assert_return( + () => invoke($7, `f32.no_fold_zero_div`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:121 +assert_return( + () => invoke($7, `f32.no_fold_zero_div`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:122 +assert_return(() => invoke($7, `f64.no_fold_zero_div`, [value("f64", 0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:123 +assert_return(() => invoke($7, `f64.no_fold_zero_div`, [value("f64", -0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:124 +assert_return( + () => invoke($7, `f64.no_fold_zero_div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:125 +assert_return( + () => invoke($7, `f64.no_fold_zero_div`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:129 +let $8 = instantiate(`(module + (func (export "f32.no_fold_div_one") (param $$x f32) (result f32) + (f32.div (local.get $$x) (f32.const 1.0))) + (func (export "f64.no_fold_div_one") (param $$x f64) (result f64) + (f64.div (local.get $$x) (f64.const 1.0))) +)`); + +// ./test/core/float_exprs.wast:136 +assert_return( + () => invoke($8, `f32.no_fold_div_one`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:137 +assert_return( + () => invoke($8, `f64.no_fold_div_one`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:141 +let $9 = instantiate(`(module + (func (export "f32.no_fold_div_neg1") (param $$x f32) (result f32) + (f32.div (local.get $$x) (f32.const -1.0))) + (func (export "f64.no_fold_div_neg1") (param $$x f64) (result f64) + (f64.div (local.get $$x) (f64.const -1.0))) +)`); + +// ./test/core/float_exprs.wast:148 +assert_return( + () => invoke($9, `f32.no_fold_div_neg1`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:149 +assert_return( + () => invoke($9, `f64.no_fold_div_neg1`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:153 +let $10 = instantiate(`(module + (func (export "f32.no_fold_neg0_sub") (param $$x f32) (result f32) + (f32.sub (f32.const -0.0) (local.get $$x))) + (func (export "f64.no_fold_neg0_sub") (param $$x f64) (result f64) + (f64.sub (f64.const -0.0) (local.get $$x))) +)`); + +// ./test/core/float_exprs.wast:160 +assert_return( + () => invoke($10, `f32.no_fold_neg0_sub`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:161 +assert_return( + () => invoke($10, `f64.no_fold_neg0_sub`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:165 +let $11 = instantiate(`(module + (func (export "f32.no_fold_neg1_mul") (param $$x f32) (result f32) + (f32.mul (f32.const -1.0) (local.get $$x))) + (func (export "f64.no_fold_neg1_mul") (param $$x f64) (result f64) + (f64.mul (f64.const -1.0) (local.get $$x))) +)`); + +// ./test/core/float_exprs.wast:172 +assert_return( + () => invoke($11, `f32.no_fold_neg1_mul`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:173 +assert_return( + () => invoke($11, `f64.no_fold_neg1_mul`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:177 +let $12 = instantiate(`(module + (func (export "f32.no_fold_eq_self") (param $$x f32) (result i32) + (f32.eq (local.get $$x) (local.get $$x))) + (func (export "f64.no_fold_eq_self") (param $$x f64) (result i32) + (f64.eq (local.get $$x) (local.get $$x))) +)`); + +// ./test/core/float_exprs.wast:184 +assert_return( + () => invoke($12, `f32.no_fold_eq_self`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:185 +assert_return( + () => invoke($12, `f64.no_fold_eq_self`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:189 +let $13 = instantiate(`(module + (func (export "f32.no_fold_ne_self") (param $$x f32) (result i32) + (f32.ne (local.get $$x) (local.get $$x))) + (func (export "f64.no_fold_ne_self") (param $$x f64) (result i32) + (f64.ne (local.get $$x) (local.get $$x))) +)`); + +// ./test/core/float_exprs.wast:196 +assert_return( + () => invoke($13, `f32.no_fold_ne_self`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:197 +assert_return( + () => invoke($13, `f64.no_fold_ne_self`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:201 +let $14 = instantiate(`(module + (func (export "f32.no_fold_sub_self") (param $$x f32) (result f32) + (f32.sub (local.get $$x) (local.get $$x))) + (func (export "f64.no_fold_sub_self") (param $$x f64) (result f64) + (f64.sub (local.get $$x) (local.get $$x))) +)`); + +// ./test/core/float_exprs.wast:208 +assert_return(() => invoke($14, `f32.no_fold_sub_self`, [value("f32", Infinity)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:209 +assert_return( + () => invoke($14, `f32.no_fold_sub_self`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:210 +assert_return(() => invoke($14, `f64.no_fold_sub_self`, [value("f64", Infinity)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:211 +assert_return( + () => invoke($14, `f64.no_fold_sub_self`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:215 +let $15 = instantiate(`(module + (func (export "f32.no_fold_div_self") (param $$x f32) (result f32) + (f32.div (local.get $$x) (local.get $$x))) + (func (export "f64.no_fold_div_self") (param $$x f64) (result f64) + (f64.div (local.get $$x) (local.get $$x))) +)`); + +// ./test/core/float_exprs.wast:222 +assert_return(() => invoke($15, `f32.no_fold_div_self`, [value("f32", Infinity)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:223 +assert_return( + () => invoke($15, `f32.no_fold_div_self`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:224 +assert_return(() => invoke($15, `f32.no_fold_div_self`, [value("f32", 0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:225 +assert_return(() => invoke($15, `f32.no_fold_div_self`, [value("f32", -0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:226 +assert_return(() => invoke($15, `f64.no_fold_div_self`, [value("f64", Infinity)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:227 +assert_return( + () => invoke($15, `f64.no_fold_div_self`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:228 +assert_return(() => invoke($15, `f64.no_fold_div_self`, [value("f64", 0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:229 +assert_return(() => invoke($15, `f64.no_fold_div_self`, [value("f64", -0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:233 +let $16 = instantiate(`(module + (func (export "f32.no_fold_div_3") (param $$x f32) (result f32) + (f32.div (local.get $$x) (f32.const 3.0))) + (func (export "f64.no_fold_div_3") (param $$x f64) (result f64) + (f64.div (local.get $$x) (f64.const 3.0))) +)`); + +// ./test/core/float_exprs.wast:240 +assert_return( + () => invoke($16, `f32.no_fold_div_3`, [value("f32", -1361679000000000)]), + [value("f32", -453892980000000)], +); + +// ./test/core/float_exprs.wast:241 +assert_return( + () => invoke($16, `f32.no_fold_div_3`, [value("f32", -18736880000000000000000000000)]), + [value("f32", -6245626600000000000000000000)], +); + +// ./test/core/float_exprs.wast:242 +assert_return( + () => invoke($16, `f32.no_fold_div_3`, [ + value("f32", -0.00000000000000000000000012045131), + ]), + [value("f32", -0.000000000000000000000000040150435)], +); + +// ./test/core/float_exprs.wast:243 +assert_return( + () => invoke($16, `f32.no_fold_div_3`, [ + value("f32", -0.00000000000000000000000000000000000005281346), + ]), + [value("f32", -0.000000000000000000000000000000000000017604486)], +); + +// ./test/core/float_exprs.wast:244 +assert_return( + () => invoke($16, `f32.no_fold_div_3`, [value("f32", -0.000000000000000025495563)]), + [value("f32", -0.000000000000000008498521)], +); + +// ./test/core/float_exprs.wast:245 +assert_return( + () => invoke($16, `f64.no_fold_div_3`, [ + value("f64", -29563579573969634000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -9854526524656545000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:246 +assert_return( + () => invoke($16, `f64.no_fold_div_3`, [ + value("f64", -0.000000000000000000000000000000000000000000000000009291150921449772), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000003097050307149924), + ], +); + +// ./test/core/float_exprs.wast:247 +assert_return( + () => invoke($16, `f64.no_fold_div_3`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013808061543557006), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004602687181185669), + ], +); + +// ./test/core/float_exprs.wast:248 +assert_return( + () => invoke($16, `f64.no_fold_div_3`, [ + value("f64", -1378076163468349000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -459358721156116300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:249 +assert_return( + () => invoke($16, `f64.no_fold_div_3`, [ + value("f64", 86324008088313660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 28774669362771220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:253 +let $17 = instantiate(`(module + (func (export "f32.no_factor") (param $$x f32) (param $$y f32) (param $$z f32) (result f32) + (f32.add (f32.mul (local.get $$x) (local.get $$z)) (f32.mul (local.get $$y) (local.get $$z)))) + (func (export "f64.no_factor") (param $$x f64) (param $$y f64) (param $$z f64) (result f64) + (f64.add (f64.mul (local.get $$x) (local.get $$z)) (f64.mul (local.get $$y) (local.get $$z)))) +)`); + +// ./test/core/float_exprs.wast:260 +assert_return( + () => invoke($17, `f32.no_factor`, [ + value("f32", -1435111700000), + value("f32", -853617640000000), + value("f32", 1113849300000000000), + ]), + [value("f32", -952399900000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:261 +assert_return( + () => invoke($17, `f32.no_factor`, [ + value("f32", -0.026666632), + value("f32", 0.048412822), + value("f32", -0.002813697), + ]), + [value("f32", -0.0000611872)], +); + +// ./test/core/float_exprs.wast:262 +assert_return( + () => invoke($17, `f32.no_factor`, [ + value("f32", -0.00000000000046619777), + value("f32", 0.00000000000000000010478377), + value("f32", 14469202000000000000000000000000000000), + ]), + [value("f32", -6745508000000000000000000)], +); + +// ./test/core/float_exprs.wast:263 +assert_return( + () => invoke($17, `f32.no_factor`, [ + value("f32", -0.00000000000000000010689046), + value("f32", 0.00000000000000000000000010694433), + value("f32", 568307000000000000000000000000000000), + ]), + [value("f32", -60746540000000000)], +); + +// ./test/core/float_exprs.wast:264 +assert_return( + () => invoke($17, `f32.no_factor`, [ + value("f32", -0.000000000000000000000000063545994), + value("f32", 0.0000000000000000000007524625), + value("f32", 1626770.3), + ]), + [value("f32", 0.0000000000000012239803)], +); + +// ./test/core/float_exprs.wast:265 +assert_return( + () => invoke($17, `f64.no_factor`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028390554709988774), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001473981250649641), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000029001229846550766), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008233610026197336), + ], +); + +// ./test/core/float_exprs.wast:266 +assert_return( + () => invoke($17, `f64.no_factor`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006461015505916123), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023923242802975938), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015300738798561604), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:267 +assert_return( + () => invoke($17, `f64.no_factor`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002939056292080733), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000002146156743463356), + value("f64", -2510967223130241600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 538892923853642600000000000000000000000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:268 +assert_return( + () => invoke($17, `f64.no_factor`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000017785466771708878), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000009328516775403213), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000012121009044876735), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001130710359943689), + ], +); + +// ./test/core/float_exprs.wast:269 +assert_return( + () => invoke($17, `f64.no_factor`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015194859063177362), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000883589921438065), + value("f64", -1735830019469195800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0.0000000000000000000000000015337619131701908)], +); + +// ./test/core/float_exprs.wast:273 +let $18 = instantiate(`(module + (func (export "f32.no_distribute") (param $$x f32) (param $$y f32) (param $$z f32) (result f32) + (f32.mul (f32.add (local.get $$x) (local.get $$y)) (local.get $$z))) + (func (export "f64.no_distribute") (param $$x f64) (param $$y f64) (param $$z f64) (result f64) + (f64.mul (f64.add (local.get $$x) (local.get $$y)) (local.get $$z))) +)`); + +// ./test/core/float_exprs.wast:280 +assert_return( + () => invoke($18, `f32.no_distribute`, [ + value("f32", -1435111700000), + value("f32", -853617640000000), + value("f32", 1113849300000000000), + ]), + [value("f32", -952400000000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:281 +assert_return( + () => invoke($18, `f32.no_distribute`, [ + value("f32", -0.026666632), + value("f32", 0.048412822), + value("f32", -0.002813697), + ]), + [value("f32", -0.000061187195)], +); + +// ./test/core/float_exprs.wast:282 +assert_return( + () => invoke($18, `f32.no_distribute`, [ + value("f32", -0.00000000000046619777), + value("f32", 0.00000000000000000010478377), + value("f32", 14469202000000000000000000000000000000), + ]), + [value("f32", -6745508500000000000000000)], +); + +// ./test/core/float_exprs.wast:283 +assert_return( + () => invoke($18, `f32.no_distribute`, [ + value("f32", -0.00000000000000000010689046), + value("f32", 0.00000000000000000000000010694433), + value("f32", 568307000000000000000000000000000000), + ]), + [value("f32", -60746536000000000)], +); + +// ./test/core/float_exprs.wast:284 +assert_return( + () => invoke($18, `f32.no_distribute`, [ + value("f32", -0.000000000000000000000000063545994), + value("f32", 0.0000000000000000000007524625), + value("f32", 1626770.3), + ]), + [value("f32", 0.0000000000000012239802)], +); + +// ./test/core/float_exprs.wast:285 +assert_return( + () => invoke($18, `f64.no_distribute`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028390554709988774), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001473981250649641), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000029001229846550766), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008233610026197337), + ], +); + +// ./test/core/float_exprs.wast:286 +assert_return( + () => invoke($18, `f64.no_distribute`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006461015505916123), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023923242802975938), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015300738798561604), + ]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:287 +assert_return( + () => invoke($18, `f64.no_distribute`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002939056292080733), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000002146156743463356), + value("f64", -2510967223130241600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 538892923853642500000000000000000000000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:288 +assert_return( + () => invoke($18, `f64.no_distribute`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000017785466771708878), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000009328516775403213), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000012121009044876735), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011307103599436889), + ], +); + +// ./test/core/float_exprs.wast:289 +assert_return( + () => invoke($18, `f64.no_distribute`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015194859063177362), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000883589921438065), + value("f64", -1735830019469195800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0.0000000000000000000000000015337619131701907)], +); + +// ./test/core/float_exprs.wast:293 +let $19 = instantiate(`(module + (func (export "f32.no_regroup_div_mul") (param $$x f32) (param $$y f32) (param $$z f32) (result f32) + (f32.mul (local.get $$x) (f32.div (local.get $$y) (local.get $$z)))) + (func (export "f64.no_regroup_div_mul") (param $$x f64) (param $$y f64) (param $$z f64) (result f64) + (f64.mul (local.get $$x) (f64.div (local.get $$y) (local.get $$z)))) +)`); + +// ./test/core/float_exprs.wast:300 +assert_return( + () => invoke($19, `f32.no_regroup_div_mul`, [ + value("f32", -0.00000000000000000000000000000000002831349), + value("f32", -0.00000000000000000007270787), + value("f32", 0.000000000000000000000000000000000016406605), + ]), + [value("f32", 0.00000000000000000012547468)], +); + +// ./test/core/float_exprs.wast:301 +assert_return( + () => invoke($19, `f32.no_regroup_div_mul`, [ + value("f32", -3145897700000000000000000000), + value("f32", -0.000000000000000000000000000000000040864003), + value("f32", -9245928300000000000000), + ]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:302 +assert_return( + () => invoke($19, `f32.no_regroup_div_mul`, [ + value("f32", -93157.43), + value("f32", -0.00000081292654), + value("f32", -0.00000000000000000000000000000000000015469397), + ]), + [value("f32", -489548120000000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:303 +assert_return( + () => invoke($19, `f32.no_regroup_div_mul`, [ + value("f32", -0.00000000000000000000000000008899643), + value("f32", 17887725000000000000000), + value("f32", 514680230000000000000), + ]), + [value("f32", -0.000000000000000000000000003093073)], +); + +// ./test/core/float_exprs.wast:304 +assert_return( + () => invoke($19, `f32.no_regroup_div_mul`, [ + value("f32", 9222036000000000000000000000000000), + value("f32", 33330492), + value("f32", -3253108800000000000000), + ]), + [value("f32", -94486550000000000000)], +); + +// ./test/core/float_exprs.wast:305 +assert_return( + () => invoke($19, `f64.no_regroup_div_mul`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005698811412550059), + value("f64", -0.0000000000000000000000000000000000018313439132919336), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009543270551003098), + ]), + [value("f64", -1093596114413331000000000000000)], +); + +// ./test/core/float_exprs.wast:306 +assert_return( + () => invoke($19, `f64.no_regroup_div_mul`, [ + value("f64", 357289288425507550000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003952760844538651), + value("f64", -1450781241254900800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:307 +assert_return( + () => invoke($19, `f64.no_regroup_div_mul`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009124278383497107), + value("f64", 55561345277147970000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025090826940306507), + ]), + [value("f64", Infinity)], +); + +// ./test/core/float_exprs.wast:308 +assert_return( + () => invoke($19, `f64.no_regroup_div_mul`, [ + value("f64", -4492093000352015000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -12087878984017852000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -596613380626062300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -91013507803376260000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:309 +assert_return( + () => invoke($19, `f64.no_regroup_div_mul`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007470269158630455), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007568026329781282), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001055389683973521), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005356807494101561), + ], +); + +// ./test/core/float_exprs.wast:313 +let $20 = instantiate(`(module + (func (export "f32.no_regroup_mul_div") (param $$x f32) (param $$y f32) (param $$z f32) (result f32) + (f32.div (f32.mul (local.get $$x) (local.get $$y)) (local.get $$z))) + (func (export "f64.no_regroup_mul_div") (param $$x f64) (param $$y f64) (param $$z f64) (result f64) + (f64.div (f64.mul (local.get $$x) (local.get $$y)) (local.get $$z))) +)`); + +// ./test/core/float_exprs.wast:320 +assert_return( + () => invoke($20, `f32.no_regroup_mul_div`, [ + value("f32", -0.00000000000000000000000000000000002831349), + value("f32", -0.00000000000000000007270787), + value("f32", 0.000000000000000000000000000000000016406605), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:321 +assert_return( + () => invoke($20, `f32.no_regroup_mul_div`, [ + value("f32", -3145897700000000000000000000), + value("f32", -0.000000000000000000000000000000000040864003), + value("f32", -9245928300000000000000), + ]), + [value("f32", -0.000000000000000000000000000013903848)], +); + +// ./test/core/float_exprs.wast:322 +assert_return( + () => invoke($20, `f32.no_regroup_mul_div`, [ + value("f32", -93157.43), + value("f32", -0.00000081292654), + value("f32", -0.00000000000000000000000000000000000015469397), + ]), + [value("f32", -489548160000000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:323 +assert_return( + () => invoke($20, `f32.no_regroup_mul_div`, [ + value("f32", -0.00000000000000000000000000008899643), + value("f32", 17887725000000000000000), + value("f32", 514680230000000000000), + ]), + [value("f32", -0.0000000000000000000000000030930732)], +); + +// ./test/core/float_exprs.wast:324 +assert_return( + () => invoke($20, `f32.no_regroup_mul_div`, [ + value("f32", 9222036000000000000000000000000000), + value("f32", 33330492), + value("f32", -3253108800000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/float_exprs.wast:325 +assert_return( + () => invoke($20, `f64.no_regroup_mul_div`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005698811412550059), + value("f64", -0.0000000000000000000000000000000000018313439132919336), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009543270551003098), + ]), + [value("f64", -1093596114413331100000000000000)], +); + +// ./test/core/float_exprs.wast:326 +assert_return( + () => invoke($20, `f64.no_regroup_mul_div`, [ + value("f64", 357289288425507550000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003952760844538651), + value("f64", -1450781241254900800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009734611044734945), + ], +); + +// ./test/core/float_exprs.wast:327 +assert_return( + () => invoke($20, `f64.no_regroup_mul_div`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009124278383497107), + value("f64", 55561345277147970000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025090826940306507), + ]), + [ + value("f64", 20204881364667663000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:328 +assert_return( + () => invoke($20, `f64.no_regroup_mul_div`, [ + value("f64", -4492093000352015000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -12087878984017852000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -596613380626062300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/float_exprs.wast:329 +assert_return( + () => invoke($20, `f64.no_regroup_mul_div`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007470269158630455), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007568026329781282), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001055389683973521), + ]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:333 +let $21 = instantiate(`(module + (func (export "f32.no_reassociate_add") (param $$x f32) (param $$y f32) (param $$z f32) (param $$w f32) (result f32) + (f32.add (f32.add (f32.add (local.get $$x) (local.get $$y)) (local.get $$z)) (local.get $$w))) + (func (export "f64.no_reassociate_add") (param $$x f64) (param $$y f64) (param $$z f64) (param $$w f64) (result f64) + (f64.add (f64.add (f64.add (local.get $$x) (local.get $$y)) (local.get $$z)) (local.get $$w))) +)`); + +// ./test/core/float_exprs.wast:340 +assert_return( + () => invoke($21, `f32.no_reassociate_add`, [ + value("f32", -24154321000000), + value("f32", 26125812000), + value("f32", -238608080000000), + value("f32", -2478953500000), + ]), + [value("f32", -265215220000000)], +); + +// ./test/core/float_exprs.wast:341 +assert_return( + () => invoke($21, `f32.no_reassociate_add`, [ + value("f32", 0.0036181053), + value("f32", -0.00985944), + value("f32", 0.063375376), + value("f32", -0.011150199), + ]), + [value("f32", 0.04598384)], +); + +// ./test/core/float_exprs.wast:342 +assert_return( + () => invoke($21, `f32.no_reassociate_add`, [ + value("f32", -34206968000), + value("f32", -3770877200000), + value("f32", 30868425000000), + value("f32", 421132080000), + ]), + [value("f32", 27484470000000)], +); + +// ./test/core/float_exprs.wast:343 +assert_return( + () => invoke($21, `f32.no_reassociate_add`, [ + value("f32", 153506400000000), + value("f32", 925114700000000), + value("f32", -36021854000), + value("f32", 2450846000000000), + ]), + [value("f32", 3529431000000000)], +); + +// ./test/core/float_exprs.wast:344 +assert_return( + () => invoke($21, `f32.no_reassociate_add`, [ + value("f32", 470600300000000000000000000000000), + value("f32", -396552040000000000000000000000000), + value("f32", 48066940000000000000000000000000), + value("f32", -35644073000000000000000000000), + ]), + [value("f32", 122079560000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:345 +assert_return( + () => invoke($21, `f64.no_reassociate_add`, [ + value("f64", -20704652927717020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1594689704376369700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 451106636559416130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -1374333509186863300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -921652887575998600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:346 +assert_return( + () => invoke($21, `f64.no_reassociate_add`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003485747658213531), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000031210957391311754), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000683008546431621), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002617177347131095), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022324206697150536), + ], +); + +// ./test/core/float_exprs.wast:347 +assert_return( + () => invoke($21, `f64.no_reassociate_add`, [ + value("f64", -5412584921122726300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 597603656170379500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -355830077793396300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 373627259957625440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -5768414998318146000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:348 +assert_return( + () => invoke($21, `f64.no_reassociate_add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006469047714189599), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064286584974746), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000021277698072285604), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000008768287273189493), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000006640517465960996), + ], +); + +// ./test/core/float_exprs.wast:349 +assert_return( + () => invoke($21, `f64.no_reassociate_add`, [ + value("f64", -16422137086414828000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -88032137939790710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 449957059782857850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -114091267166274390000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 319443655442136560000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:353 +let $22 = instantiate(`(module + (func (export "f32.no_reassociate_mul") (param $$x f32) (param $$y f32) (param $$z f32) (param $$w f32) (result f32) + (f32.mul (f32.mul (f32.mul (local.get $$x) (local.get $$y)) (local.get $$z)) (local.get $$w))) + (func (export "f64.no_reassociate_mul") (param $$x f64) (param $$y f64) (param $$z f64) (param $$w f64) (result f64) + (f64.mul (f64.mul (f64.mul (local.get $$x) (local.get $$y)) (local.get $$z)) (local.get $$w))) +)`); + +// ./test/core/float_exprs.wast:360 +assert_return( + () => invoke($22, `f32.no_reassociate_mul`, [ + value("f32", 0.00000000000000000000000000000000001904515), + value("f32", 0.00000000022548861), + value("f32", -6964322000000000000000000000000), + value("f32", 0.000000000000000026902832), + ]), + [value("f32", -0.00000000000000000000000000000078764173)], +); + +// ./test/core/float_exprs.wast:361 +assert_return( + () => invoke($22, `f32.no_reassociate_mul`, [ + value("f32", 0.000000000000000018733125), + value("f32", -7565904000000000000000000000000), + value("f32", -0.000000000000000000000000000000000000030807684), + value("f32", -1592759200000000000000), + ]), + [value("f32", -0.0069547286)], +); + +// ./test/core/float_exprs.wast:362 +assert_return( + () => invoke($22, `f32.no_reassociate_mul`, [ + value("f32", 0.0000000000000050355575), + value("f32", -56466884000000000), + value("f32", -0.0000000000011740512), + value("f32", 84984730000000000000000), + ]), + [value("f32", 28370654000000)], +); + +// ./test/core/float_exprs.wast:363 +assert_return( + () => invoke($22, `f32.no_reassociate_mul`, [ + value("f32", 0.000000000000000000000000000000046394946), + value("f32", 254449360000000000000000), + value("f32", -72460980000000000), + value("f32", -962511040000000000), + ]), + [value("f32", 823345100000000000000000000)], +); + +// ./test/core/float_exprs.wast:364 +assert_return( + () => invoke($22, `f32.no_reassociate_mul`, [ + value("f32", -0.0000000000000000000000000000019420536), + value("f32", 0.0000000000000023200355), + value("f32", -9.772748), + value("f32", 864066000000000000), + ]), + [value("f32", 0.000000000000000000000000035113616)], +); + +// ./test/core/float_exprs.wast:365 +assert_return( + () => invoke($22, `f64.no_reassociate_mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003109868654414946), + value("f64", -20713190487745434000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007162612845524978), + value("f64", -88478253295969090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 40822261813278614000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:366 +assert_return( + () => invoke($22, `f64.no_reassociate_mul`, [ + value("f64", 60442716412956810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006700545015107397), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000031469664275798185), + value("f64", -6401677295640561500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008159057447560471), + ], +); + +// ./test/core/float_exprs.wast:367 +assert_return( + () => invoke($22, `f64.no_reassociate_mul`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002216807720454268), + value("f64", -1802234186536721600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007500283778521931), + value("f64", -414412152433956900000000000), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001241793627299937), + ], +); + +// ./test/core/float_exprs.wast:368 +assert_return( + () => invoke($22, `f64.no_reassociate_mul`, [ + value("f64", 24318065966298720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006508014075793436), + value("f64", 17596421287233897000000000000000000000000000000000000000000000000000), + value("f64", -0.0000001416141401305358), + ]), + [ + value("f64", -3943741918531223000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:369 +assert_return( + () => invoke($22, `f64.no_reassociate_mul`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000003849767156964772), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070008754943224875), + value("f64", -2536887825218386500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006101114518858449), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004171548126376117), + ], +); + +// ./test/core/float_exprs.wast:373 +let $23 = instantiate(`(module + (func (export "f32.no_fold_div_0") (param $$x f32) (result f32) + (f32.div (local.get $$x) (f32.const 0.0))) + (func (export "f64.no_fold_div_0") (param $$x f64) (result f64) + (f64.div (local.get $$x) (f64.const 0.0))) +)`); + +// ./test/core/float_exprs.wast:380 +assert_return(() => invoke($23, `f32.no_fold_div_0`, [value("f32", 1)]), [value("f32", Infinity)]); + +// ./test/core/float_exprs.wast:381 +assert_return(() => invoke($23, `f32.no_fold_div_0`, [value("f32", -1)]), [value("f32", -Infinity)]); + +// ./test/core/float_exprs.wast:382 +assert_return( + () => invoke($23, `f32.no_fold_div_0`, [value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/float_exprs.wast:383 +assert_return( + () => invoke($23, `f32.no_fold_div_0`, [value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/float_exprs.wast:384 +assert_return(() => invoke($23, `f32.no_fold_div_0`, [value("f32", 0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:385 +assert_return(() => invoke($23, `f32.no_fold_div_0`, [value("f32", -0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:386 +assert_return( + () => invoke($23, `f32.no_fold_div_0`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:387 +assert_return( + () => invoke($23, `f32.no_fold_div_0`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:388 +assert_return(() => invoke($23, `f64.no_fold_div_0`, [value("f64", 1)]), [value("f64", Infinity)]); + +// ./test/core/float_exprs.wast:389 +assert_return(() => invoke($23, `f64.no_fold_div_0`, [value("f64", -1)]), [value("f64", -Infinity)]); + +// ./test/core/float_exprs.wast:390 +assert_return( + () => invoke($23, `f64.no_fold_div_0`, [value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/float_exprs.wast:391 +assert_return( + () => invoke($23, `f64.no_fold_div_0`, [value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/float_exprs.wast:392 +assert_return(() => invoke($23, `f64.no_fold_div_0`, [value("f64", 0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:393 +assert_return(() => invoke($23, `f64.no_fold_div_0`, [value("f64", -0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:394 +assert_return( + () => invoke($23, `f64.no_fold_div_0`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:395 +assert_return( + () => invoke($23, `f64.no_fold_div_0`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:399 +let $24 = instantiate(`(module + (func (export "f32.no_fold_div_neg0") (param $$x f32) (result f32) + (f32.div (local.get $$x) (f32.const -0.0))) + (func (export "f64.no_fold_div_neg0") (param $$x f64) (result f64) + (f64.div (local.get $$x) (f64.const -0.0))) +)`); + +// ./test/core/float_exprs.wast:406 +assert_return(() => invoke($24, `f32.no_fold_div_neg0`, [value("f32", 1)]), [value("f32", -Infinity)]); + +// ./test/core/float_exprs.wast:407 +assert_return(() => invoke($24, `f32.no_fold_div_neg0`, [value("f32", -1)]), [value("f32", Infinity)]); + +// ./test/core/float_exprs.wast:408 +assert_return( + () => invoke($24, `f32.no_fold_div_neg0`, [value("f32", Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/float_exprs.wast:409 +assert_return( + () => invoke($24, `f32.no_fold_div_neg0`, [value("f32", -Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/float_exprs.wast:410 +assert_return(() => invoke($24, `f32.no_fold_div_neg0`, [value("f32", 0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:411 +assert_return(() => invoke($24, `f32.no_fold_div_neg0`, [value("f32", -0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:412 +assert_return( + () => invoke($24, `f32.no_fold_div_neg0`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:413 +assert_return( + () => invoke($24, `f32.no_fold_div_neg0`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:414 +assert_return(() => invoke($24, `f64.no_fold_div_neg0`, [value("f64", 1)]), [value("f64", -Infinity)]); + +// ./test/core/float_exprs.wast:415 +assert_return(() => invoke($24, `f64.no_fold_div_neg0`, [value("f64", -1)]), [value("f64", Infinity)]); + +// ./test/core/float_exprs.wast:416 +assert_return( + () => invoke($24, `f64.no_fold_div_neg0`, [value("f64", Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/float_exprs.wast:417 +assert_return( + () => invoke($24, `f64.no_fold_div_neg0`, [value("f64", -Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/float_exprs.wast:418 +assert_return(() => invoke($24, `f64.no_fold_div_neg0`, [value("f64", 0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:419 +assert_return(() => invoke($24, `f64.no_fold_div_neg0`, [value("f64", -0)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:420 +assert_return( + () => invoke($24, `f64.no_fold_div_neg0`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:421 +assert_return( + () => invoke($24, `f64.no_fold_div_neg0`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:425 +let $25 = instantiate(`(module + (func (export "f32.no_fold_to_hypot") (param $$x f32) (param $$y f32) (result f32) + (f32.sqrt (f32.add (f32.mul (local.get $$x) (local.get $$x)) + (f32.mul (local.get $$y) (local.get $$y))))) + (func (export "f64.no_fold_to_hypot") (param $$x f64) (param $$y f64) (result f64) + (f64.sqrt (f64.add (f64.mul (local.get $$x) (local.get $$x)) + (f64.mul (local.get $$y) (local.get $$y))))) +)`); + +// ./test/core/float_exprs.wast:434 +assert_return( + () => invoke($25, `f32.no_fold_to_hypot`, [ + value("f32", 0.00000000000000000000000072854914), + value("f32", 0.0000000000000000000042365796), + ]), + [value("f32", 0.0000000000000000000042366535)], +); + +// ./test/core/float_exprs.wast:435 +assert_return( + () => invoke($25, `f32.no_fold_to_hypot`, [ + value("f32", -0.0000000000000000000007470285), + value("f32", -0.000000000000000000000000000000007453745), + ]), + [value("f32", 0.0000000000000000000007468044)], +); + +// ./test/core/float_exprs.wast:436 +assert_return( + () => invoke($25, `f32.no_fold_to_hypot`, [ + value("f32", -0.0000000000000000000000000000000000770895), + value("f32", -0.0000000000000000000032627214), + ]), + [value("f32", 0.0000000000000000000032627695)], +); + +// ./test/core/float_exprs.wast:437 +assert_return( + () => invoke($25, `f32.no_fold_to_hypot`, [ + value("f32", -35.42818), + value("f32", 174209.48), + ]), + [value("f32", 174209.5)], +); + +// ./test/core/float_exprs.wast:438 +assert_return( + () => invoke($25, `f32.no_fold_to_hypot`, [ + value("f32", 0.000000000000000000000020628143), + value("f32", -0.00000000000000000000046344753), + ]), + [value("f32", 0.000000000000000000000463032)], +); + +// ./test/core/float_exprs.wast:439 +assert_return( + () => invoke($25, `f64.no_fold_to_hypot`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003863640258986321), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000019133014752624014), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000019120893753235554), + ], +); + +// ./test/core/float_exprs.wast:440 +assert_return( + () => invoke($25, `f64.no_fold_to_hypot`, [ + value("f64", 138561238950329770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -2828038515930043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 2828038519324483400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:441 +assert_return( + () => invoke($25, `f64.no_fold_to_hypot`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006502729096641792), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004544399933151275), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006668276248455232), + ], +); + +// ./test/core/float_exprs.wast:442 +assert_return( + () => invoke($25, `f64.no_fold_to_hypot`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022340232024202604), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003435929714143315), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022340232023799234), + ], +); + +// ./test/core/float_exprs.wast:443 +assert_return( + () => invoke($25, `f64.no_fold_to_hypot`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002797963998630554), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001906867996862016), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000019068679968620105), + ], +); + +// ./test/core/float_exprs.wast:447 +let $26 = instantiate(`(module + (func (export "f32.no_approximate_reciprocal") (param $$x f32) (result f32) + (f32.div (f32.const 1.0) (local.get $$x))) +)`); + +// ./test/core/float_exprs.wast:452 +assert_return( + () => invoke($26, `f32.no_approximate_reciprocal`, [value("f32", -0.0011329757)]), + [value("f32", -882.6315)], +); + +// ./test/core/float_exprs.wast:453 +assert_return( + () => invoke($26, `f32.no_approximate_reciprocal`, [ + value("f32", 323753010000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000003088774)], +); + +// ./test/core/float_exprs.wast:454 +assert_return( + () => invoke($26, `f32.no_approximate_reciprocal`, [ + value("f32", -0.0000000000000000000000000001272599), + ]), + [value("f32", -7857934600000000000000000000)], +); + +// ./test/core/float_exprs.wast:455 +assert_return( + () => invoke($26, `f32.no_approximate_reciprocal`, [ + value("f32", 103020680000000000000000), + ]), + [value("f32", 0.000000000000000000000009706789)], +); + +// ./test/core/float_exprs.wast:456 +assert_return( + () => invoke($26, `f32.no_approximate_reciprocal`, [ + value("f32", -0.00000000000000000000000028443763), + ]), + [value("f32", -3515709300000000000000000)], +); + +// ./test/core/float_exprs.wast:460 +let $27 = instantiate(`(module + (func (export "f32.no_approximate_reciprocal_sqrt") (param $$x f32) (result f32) + (f32.div (f32.const 1.0) (f32.sqrt (local.get $$x)))) + (func (export "f64.no_fuse_reciprocal_sqrt") (param $$x f64) (result f64) + (f64.div (f64.const 1.0) (f64.sqrt (local.get $$x)))) +)`); + +// ./test/core/float_exprs.wast:467 +assert_return( + () => invoke($27, `f32.no_approximate_reciprocal_sqrt`, [ + value("f32", 0.00000000000016117865), + ]), + [value("f32", 2490842.5)], +); + +// ./test/core/float_exprs.wast:468 +assert_return( + () => invoke($27, `f32.no_approximate_reciprocal_sqrt`, [value("f32", 0.0074491366)]), + [value("f32", 11.58636)], +); + +// ./test/core/float_exprs.wast:469 +assert_return( + () => invoke($27, `f32.no_approximate_reciprocal_sqrt`, [ + value("f32", 0.00000000000000000002339817), + ]), + [value("f32", 6537460000)], +); + +// ./test/core/float_exprs.wast:470 +assert_return( + () => invoke($27, `f32.no_approximate_reciprocal_sqrt`, [ + value("f32", 0.00000000000011123504), + ]), + [value("f32", 2998328.3)], +); + +// ./test/core/float_exprs.wast:471 +assert_return( + () => invoke($27, `f32.no_approximate_reciprocal_sqrt`, [ + value("f32", 0.000000000000000000000000017653063), + ]), + [value("f32", 7526446300000)], +); + +// ./test/core/float_exprs.wast:473 +assert_return( + () => invoke($27, `f64.no_fuse_reciprocal_sqrt`, [ + value("f64", 4472459252766337000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014952947335898096), + ], +); + +// ./test/core/float_exprs.wast:474 +assert_return( + () => invoke($27, `f64.no_fuse_reciprocal_sqrt`, [ + value("f64", 4752392260007119000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000014505872638954843), + ], +); + +// ./test/core/float_exprs.wast:475 +assert_return( + () => invoke($27, `f64.no_fuse_reciprocal_sqrt`, [ + value("f64", 29014415885392436000000000000000), + ]), + [value("f64", 0.00000000000000018564920084793608)], +); + +// ./test/core/float_exprs.wast:476 +assert_return( + () => invoke($27, `f64.no_fuse_reciprocal_sqrt`, [ + value("f64", 1396612507697477800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026758516751072132), + ], +); + +// ./test/core/float_exprs.wast:477 +assert_return( + () => invoke($27, `f64.no_fuse_reciprocal_sqrt`, [ + value("f64", 151596415440704430000000000000000000000000000), + ]), + [value("f64", 0.00000000000000000000008121860649480894)], +); + +// ./test/core/float_exprs.wast:481 +let $28 = instantiate(`(module + (func (export "f32.no_approximate_sqrt_reciprocal") (param $$x f32) (result f32) + (f32.sqrt (f32.div (f32.const 1.0) (local.get $$x)))) +)`); + +// ./test/core/float_exprs.wast:486 +assert_return( + () => invoke($28, `f32.no_approximate_sqrt_reciprocal`, [ + value("f32", 1895057100000000000), + ]), + [value("f32", 0.00000000072642176)], +); + +// ./test/core/float_exprs.wast:487 +assert_return( + () => invoke($28, `f32.no_approximate_sqrt_reciprocal`, [value("f32", 0.002565894)]), + [value("f32", 19.741522)], +); + +// ./test/core/float_exprs.wast:488 +assert_return( + () => invoke($28, `f32.no_approximate_sqrt_reciprocal`, [ + value("f32", 632654500000000000000), + ]), + [value("f32", 0.000000000039757284)], +); + +// ./test/core/float_exprs.wast:489 +assert_return( + () => invoke($28, `f32.no_approximate_sqrt_reciprocal`, [value("f32", 14153.539)]), + [value("f32", 0.008405576)], +); + +// ./test/core/float_exprs.wast:490 +assert_return( + () => invoke($28, `f32.no_approximate_sqrt_reciprocal`, [ + value("f32", 26173730000000000000000000000000), + ]), + [value("f32", 0.00000000000000019546418)], +); + +// ./test/core/float_exprs.wast:494 +let $29 = instantiate(`(module + (func (export "i32.no_fold_f32_s") (param i32) (result i32) + (i32.trunc_f32_s (f32.convert_i32_s (local.get 0)))) + (func (export "i32.no_fold_f32_u") (param i32) (result i32) + (i32.trunc_f32_u (f32.convert_i32_u (local.get 0)))) + (func (export "i64.no_fold_f64_s") (param i64) (result i64) + (i64.trunc_f64_s (f64.convert_i64_s (local.get 0)))) + (func (export "i64.no_fold_f64_u") (param i64) (result i64) + (i64.trunc_f64_u (f64.convert_i64_u (local.get 0)))) +)`); + +// ./test/core/float_exprs.wast:505 +assert_return(() => invoke($29, `i32.no_fold_f32_s`, [16777216]), [value("i32", 16777216)]); + +// ./test/core/float_exprs.wast:506 +assert_return(() => invoke($29, `i32.no_fold_f32_s`, [16777217]), [value("i32", 16777216)]); + +// ./test/core/float_exprs.wast:507 +assert_return(() => invoke($29, `i32.no_fold_f32_s`, [-268435440]), [value("i32", -268435440)]); + +// ./test/core/float_exprs.wast:509 +assert_return(() => invoke($29, `i32.no_fold_f32_u`, [16777216]), [value("i32", 16777216)]); + +// ./test/core/float_exprs.wast:510 +assert_return(() => invoke($29, `i32.no_fold_f32_u`, [16777217]), [value("i32", 16777216)]); + +// ./test/core/float_exprs.wast:511 +assert_return(() => invoke($29, `i32.no_fold_f32_u`, [-268435440]), [value("i32", -268435456)]); + +// ./test/core/float_exprs.wast:513 +assert_return( + () => invoke($29, `i64.no_fold_f64_s`, [9007199254740992n]), + [value("i64", 9007199254740992n)], +); + +// ./test/core/float_exprs.wast:514 +assert_return( + () => invoke($29, `i64.no_fold_f64_s`, [9007199254740993n]), + [value("i64", 9007199254740992n)], +); + +// ./test/core/float_exprs.wast:515 +assert_return( + () => invoke($29, `i64.no_fold_f64_s`, [-1152921504606845952n]), + [value("i64", -1152921504606845952n)], +); + +// ./test/core/float_exprs.wast:517 +assert_return( + () => invoke($29, `i64.no_fold_f64_u`, [9007199254740992n]), + [value("i64", 9007199254740992n)], +); + +// ./test/core/float_exprs.wast:518 +assert_return( + () => invoke($29, `i64.no_fold_f64_u`, [9007199254740993n]), + [value("i64", 9007199254740992n)], +); + +// ./test/core/float_exprs.wast:519 +assert_return( + () => invoke($29, `i64.no_fold_f64_u`, [-1152921504606845952n]), + [value("i64", -1152921504606846976n)], +); + +// ./test/core/float_exprs.wast:523 +let $30 = instantiate(`(module + (func (export "f32.no_fold_add_sub") (param $$x f32) (param $$y f32) (result f32) + (f32.sub (f32.add (local.get $$x) (local.get $$y)) (local.get $$y))) + (func (export "f64.no_fold_add_sub") (param $$x f64) (param $$y f64) (result f64) + (f64.sub (f64.add (local.get $$x) (local.get $$y)) (local.get $$y))) +)`); + +// ./test/core/float_exprs.wast:530 +assert_return( + () => invoke($30, `f32.no_fold_add_sub`, [ + value("f32", 0.000000000000012138282), + value("f32", -0.000000020946384), + ]), + [value("f32", 0.000000000000012434498)], +); + +// ./test/core/float_exprs.wast:531 +assert_return( + () => invoke($30, `f32.no_fold_add_sub`, [ + value("f32", -0.00000019768197), + value("f32", 0.0000037154566), + ]), + [value("f32", -0.00000019768208)], +); + +// ./test/core/float_exprs.wast:532 +assert_return( + () => invoke($30, `f32.no_fold_add_sub`, [ + value("f32", -9596213000000000000000000), + value("f32", -3538041400000000000000000000000), + ]), + [value("f32", -9671407000000000000000000)], +); + +// ./test/core/float_exprs.wast:533 +assert_return( + () => invoke($30, `f32.no_fold_add_sub`, [ + value("f32", 0.000000000000000000000005054346), + value("f32", 0.000000000000000024572656), + ]), + [value("f32", 0.0000000000000000000000049630837)], +); + +// ./test/core/float_exprs.wast:534 +assert_return( + () => invoke($30, `f32.no_fold_add_sub`, [ + value("f32", -0.0000000000000000000000000000000033693147), + value("f32", -0.000000000000000000000000071014917), + ]), + [value("f32", -0.000000000000000000000000000000006162976)], +); + +// ./test/core/float_exprs.wast:536 +assert_return( + () => invoke($30, `f64.no_fold_add_sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008445702651973109), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001110684389828854), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008445702651873978), + ], +); + +// ./test/core/float_exprs.wast:537 +assert_return( + () => invoke($30, `f64.no_fold_add_sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008198798715927055), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004624035606110903), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008198798715897085), + ], +); + +// ./test/core/float_exprs.wast:538 +assert_return( + () => invoke($30, `f64.no_fold_add_sub`, [ + value("f64", -0.0000000013604511322066714), + value("f64", -0.1751431740707098), + ]), + [value("f64", -0.0000000013604511406306585)], +); + +// ./test/core/float_exprs.wast:539 +assert_return( + () => invoke($30, `f64.no_fold_add_sub`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003944335437865966), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001663809741322667), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000039443355500325104), + ], +); + +// ./test/core/float_exprs.wast:540 +assert_return( + () => invoke($30, `f64.no_fold_add_sub`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005078309818866), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010790431644461104), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000507831047937567), + ], +); + +// ./test/core/float_exprs.wast:544 +let $31 = instantiate(`(module + (func (export "f32.no_fold_sub_add") (param $$x f32) (param $$y f32) (result f32) + (f32.add (f32.sub (local.get $$x) (local.get $$y)) (local.get $$y))) + (func (export "f64.no_fold_sub_add") (param $$x f64) (param $$y f64) (result f64) + (f64.add (f64.sub (local.get $$x) (local.get $$y)) (local.get $$y))) +)`); + +// ./test/core/float_exprs.wast:551 +assert_return( + () => invoke($31, `f32.no_fold_sub_add`, [ + value("f32", -676.47437), + value("f32", 403.0368), + ]), + [value("f32", -676.4744)], +); + +// ./test/core/float_exprs.wast:552 +assert_return( + () => invoke($31, `f32.no_fold_sub_add`, [ + value("f32", -0.0000000000000000000000000000000006305943), + value("f32", 0.0000000000000000000000000000367186), + ]), + [value("f32", -0.00000000000000000000000000000000063194576)], +); + +// ./test/core/float_exprs.wast:553 +assert_return( + () => invoke($31, `f32.no_fold_sub_add`, [ + value("f32", 83184800), + value("f32", 46216217000), + ]), + [value("f32", 83185660)], +); + +// ./test/core/float_exprs.wast:554 +assert_return( + () => invoke($31, `f32.no_fold_sub_add`, [ + value("f32", 0.000000000002211957), + value("f32", -0.00000001043793), + ]), + [value("f32", 0.0000000000022115643)], +); + +// ./test/core/float_exprs.wast:555 +assert_return( + () => invoke($31, `f32.no_fold_sub_add`, [ + value("f32", 0.14944395), + value("f32", -27393.65), + ]), + [value("f32", 0.15039063)], +); + +// ./test/core/float_exprs.wast:557 +assert_return( + () => invoke($31, `f64.no_fold_sub_add`, [ + value("f64", 90365982617946240000000000000000000000000000000000000000000000000000000000000), + value("f64", -958186427535552000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 90365982617946280000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:558 +assert_return( + () => invoke($31, `f64.no_fold_sub_add`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044230403564658815), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026713491049366576), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004423040356647721), + ], +); + +// ./test/core/float_exprs.wast:559 +assert_return( + () => invoke($31, `f64.no_fold_sub_add`, [ + value("f64", 4095348452776429000000000000000000000000000000000000000000000000000000000000), + value("f64", -4050190019576568700000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 4070815637249397500000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:560 +assert_return( + () => invoke($31, `f64.no_fold_sub_add`, [ + value("f64", 0.000000024008889207554433), + value("f64", -0.00017253797929188484), + ]), + [value("f64", 0.00000002400888920756506)], +); + +// ./test/core/float_exprs.wast:561 +assert_return( + () => invoke($31, `f64.no_fold_sub_add`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043367542918305866), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000039597706708227122), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004336754291830597), + ], +); + +// ./test/core/float_exprs.wast:565 +let $32 = instantiate(`(module + (func (export "f32.no_fold_mul_div") (param $$x f32) (param $$y f32) (result f32) + (f32.div (f32.mul (local.get $$x) (local.get $$y)) (local.get $$y))) + (func (export "f64.no_fold_mul_div") (param $$x f64) (param $$y f64) (result f64) + (f64.div (f64.mul (local.get $$x) (local.get $$y)) (local.get $$y))) +)`); + +// ./test/core/float_exprs.wast:572 +assert_return( + () => invoke($32, `f32.no_fold_mul_div`, [ + value("f32", -32476715000000000), + value("f32", 0.000000000000010121375), + ]), + [value("f32", -32476713000000000)], +); + +// ./test/core/float_exprs.wast:573 +assert_return( + () => invoke($32, `f32.no_fold_mul_div`, [ + value("f32", -0.000000015561163), + value("f32", 0.000000000000000000000000000000015799828), + ]), + [value("f32", -0.000000015561145)], +); + +// ./test/core/float_exprs.wast:574 +assert_return( + () => invoke($32, `f32.no_fold_mul_div`, [ + value("f32", -0.00000000000000676311), + value("f32", -441324000000000), + ]), + [value("f32", -0.0000000000000067631096)], +); + +// ./test/core/float_exprs.wast:575 +assert_return( + () => invoke($32, `f32.no_fold_mul_div`, [ + value("f32", 7505613700000000), + value("f32", -2160384100000000000), + ]), + [value("f32", 7505613000000000)], +); + +// ./test/core/float_exprs.wast:576 +assert_return( + () => invoke($32, `f32.no_fold_mul_div`, [ + value("f32", -0.0000000000000000000000000002362576), + value("f32", -0.000000000010808759), + ]), + [value("f32", -0.00000000000000000000000000023625765)], +); + +// ./test/core/float_exprs.wast:578 +assert_return( + () => invoke($32, `f64.no_fold_mul_div`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013532103713575586), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000003347836467564916), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013532103713672434), + ], +); + +// ./test/core/float_exprs.wast:579 +assert_return( + () => invoke($32, `f64.no_fold_mul_div`, [ + value("f64", 77662174313180845000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 195959155606939530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 77662174313180850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:580 +assert_return( + () => invoke($32, `f64.no_fold_mul_div`, [ + value("f64", -718011781190294800000000000000000000000000000000000000000000000000000000), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009320036042623636), + ]), + [ + value("f64", -718011781190294750000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:581 +assert_return( + () => invoke($32, `f64.no_fold_mul_div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000017260010724693063), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003568792428129926), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000001661286799244216), + ], +); + +// ./test/core/float_exprs.wast:582 +assert_return( + () => invoke($32, `f64.no_fold_mul_div`, [ + value("f64", -9145223045828962000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562094034342845), + ]), + [ + value("f64", -9145223045828963000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:586 +let $33 = instantiate(`(module + (func (export "f32.no_fold_div_mul") (param $$x f32) (param $$y f32) (result f32) + (f32.mul (f32.div (local.get $$x) (local.get $$y)) (local.get $$y))) + (func (export "f64.no_fold_div_mul") (param $$x f64) (param $$y f64) (result f64) + (f64.mul (f64.div (local.get $$x) (local.get $$y)) (local.get $$y))) +)`); + +// ./test/core/float_exprs.wast:593 +assert_return( + () => invoke($33, `f32.no_fold_div_mul`, [ + value("f32", -511517980000), + value("f32", 986062200), + ]), + [value("f32", -511517950000)], +); + +// ./test/core/float_exprs.wast:594 +assert_return( + () => invoke($33, `f32.no_fold_div_mul`, [ + value("f32", -0.00000000000000024944853), + value("f32", -0.0000041539834), + ]), + [value("f32", -0.00000000000000024944856)], +); + +// ./test/core/float_exprs.wast:595 +assert_return( + () => invoke($33, `f32.no_fold_div_mul`, [ + value("f32", 0.000000000000000000000000000000000000020827855), + value("f32", -235.19847), + ]), + [value("f32", 0.000000000000000000000000000000000000020828013)], +); + +// ./test/core/float_exprs.wast:596 +assert_return( + () => invoke($33, `f32.no_fold_div_mul`, [ + value("f32", -0.000000000000000000000062499487), + value("f32", -696312600000000000), + ]), + [value("f32", -0.00000000000000000000006249919)], +); + +// ./test/core/float_exprs.wast:597 +assert_return( + () => invoke($33, `f32.no_fold_div_mul`, [ + value("f32", 0.0000000000000000000000000000058353514), + value("f32", 212781120), + ]), + [value("f32", 0.000000000000000000000000000005835352)], +); + +// ./test/core/float_exprs.wast:599 +assert_return( + () => invoke($33, `f64.no_fold_div_mul`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035984644259935362), + value("f64", -28812263298033320000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035985034356565485), + ], +); + +// ./test/core/float_exprs.wast:600 +assert_return( + () => invoke($33, `f64.no_fold_div_mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017486367047479447), + value("f64", 0.00000000000000016508738454798636), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001748636704747945), + ], +); + +// ./test/core/float_exprs.wast:601 +assert_return( + () => invoke($33, `f64.no_fold_div_mul`, [ + value("f64", -0.00000000000000000000000000000000000000000003140341989542684), + value("f64", 942829809081919600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000031403419895426836), + ], +); + +// ./test/core/float_exprs.wast:602 +assert_return( + () => invoke($33, `f64.no_fold_div_mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000003919745428533519), + value("f64", -21314747179654705000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000039197454285335185), + ], +); + +// ./test/core/float_exprs.wast:603 +assert_return( + () => invoke($33, `f64.no_fold_div_mul`, [ + value("f64", -5734160003788982000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 6350805843612229000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -5734160003788981000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:607 +let $34 = instantiate(`(module + (func (export "f32.no_fold_div2_mul2") (param $$x f32) (result f32) + (f32.mul (f32.div (local.get $$x) (f32.const 2.0)) (f32.const 2.0))) + (func (export "f64.no_fold_div2_mul2") (param $$x f64) (result f64) + (f64.mul (f64.div (local.get $$x) (f64.const 2.0)) (f64.const 2.0))) +)`); + +// ./test/core/float_exprs.wast:614 +assert_return( + () => invoke($34, `f32.no_fold_div2_mul2`, [ + value("f32", 0.000000000000000000000000000000000000023509886), + ]), + [value("f32", 0.000000000000000000000000000000000000023509887)], +); + +// ./test/core/float_exprs.wast:615 +assert_return( + () => invoke($34, `f64.no_fold_div2_mul2`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044501477170144023), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ], +); + +// ./test/core/float_exprs.wast:619 +let $35 = instantiate(`(module + (func (export "no_fold_demote_promote") (param $$x f64) (result f64) + (f64.promote_f32 (f32.demote_f64 (local.get $$x)))) +)`); + +// ./test/core/float_exprs.wast:624 +assert_return( + () => invoke($35, `no_fold_demote_promote`, [ + value("f64", -0.00000000000000000000000000000000000000017176297220569481), + ]), + [value("f64", -0.00000000000000000000000000000000000000017176275796615013)], +); + +// ./test/core/float_exprs.wast:625 +assert_return( + () => invoke($35, `no_fold_demote_promote`, [ + value("f64", -0.000000000000000000000000028464775573304055), + ]), + [value("f64", -0.00000000000000000000000002846477619188087)], +); + +// ./test/core/float_exprs.wast:626 +assert_return( + () => invoke($35, `no_fold_demote_promote`, [ + value("f64", 208970699699909230000000000000000), + ]), + [value("f64", 208970700445326000000000000000000)], +); + +// ./test/core/float_exprs.wast:627 +assert_return( + () => invoke($35, `no_fold_demote_promote`, [ + value("f64", -0.0000000000000000000000000047074160416121775), + ]), + [value("f64", -0.0000000000000000000000000047074161331556024)], +); + +// ./test/core/float_exprs.wast:628 +assert_return( + () => invoke($35, `no_fold_demote_promote`, [ + value("f64", 23359451497950880000000000000000), + ]), + [value("f64", 23359452224542198000000000000000)], +); + +// ./test/core/float_exprs.wast:633 +let $36 = instantiate(`(module + (func (export "no_fold_promote_demote") (param $$x f32) (result f32) + (f32.demote_f64 (f64.promote_f32 (local.get $$x)))) +)`); + +// ./test/core/float_exprs.wast:638 +assert_return( + () => invoke($36, `no_fold_promote_demote`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [`arithmetic_nan`], +); + +// ./test/core/float_exprs.wast:639 +assert_return(() => invoke($36, `no_fold_promote_demote`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:640 +assert_return(() => invoke($36, `no_fold_promote_demote`, [value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:641 +assert_return( + () => invoke($36, `no_fold_promote_demote`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/float_exprs.wast:642 +assert_return( + () => invoke($36, `no_fold_promote_demote`, [ + value("f32", -0.000000000000000000000000000000000000000000001), + ]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/float_exprs.wast:643 +assert_return( + () => invoke($36, `no_fold_promote_demote`, [ + value("f32", 0.000000000000000000000000000000000000011754942), + ]), + [value("f32", 0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/float_exprs.wast:644 +assert_return( + () => invoke($36, `no_fold_promote_demote`, [ + value("f32", -0.000000000000000000000000000000000000011754942), + ]), + [value("f32", -0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/float_exprs.wast:645 +assert_return( + () => invoke($36, `no_fold_promote_demote`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/float_exprs.wast:646 +assert_return( + () => invoke($36, `no_fold_promote_demote`, [ + value("f32", -0.000000000000000000000000000000000000011754944), + ]), + [value("f32", -0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/float_exprs.wast:647 +assert_return( + () => invoke($36, `no_fold_promote_demote`, [ + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:648 +assert_return( + () => invoke($36, `no_fold_promote_demote`, [ + value("f32", -340282350000000000000000000000000000000), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:649 +assert_return( + () => invoke($36, `no_fold_promote_demote`, [value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/float_exprs.wast:650 +assert_return( + () => invoke($36, `no_fold_promote_demote`, [value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/float_exprs.wast:654 +let $37 = instantiate(`(module + (func (export "no_demote_mixed_add") (param $$x f64) (param $$y f32) (result f32) + (f32.demote_f64 (f64.add (local.get $$x) (f64.promote_f32 (local.get $$y))))) + (func (export "no_demote_mixed_add_commuted") (param $$y f32) (param $$x f64) (result f32) + (f32.demote_f64 (f64.add (f64.promote_f32 (local.get $$y)) (local.get $$x)))) +)`); + +// ./test/core/float_exprs.wast:661 +assert_return( + () => invoke($37, `no_demote_mixed_add`, [ + value("f64", 0.00000000000000000000000000004941266527909197), + value("f32", 0.0000000000000000000000000000000000018767183), + ]), + [value("f32", 0.000000000000000000000000000049412667)], +); + +// ./test/core/float_exprs.wast:662 +assert_return( + () => invoke($37, `no_demote_mixed_add`, [ + value("f64", 140851523637.69385), + value("f32", 401096440000), + ]), + [value("f32", 541947950000)], +); + +// ./test/core/float_exprs.wast:663 +assert_return( + () => invoke($37, `no_demote_mixed_add`, [ + value("f64", 0.0000000000000000000000000000000000020831160914192852), + value("f32", -0.0000000000000000000000000000000000006050095), + ]), + [value("f32", 0.0000000000000000000000000000000000014781066)], +); + +// ./test/core/float_exprs.wast:664 +assert_return( + () => invoke($37, `no_demote_mixed_add`, [ + value("f64", -0.0000010032827553674626), + value("f32", 0.0000000019312918), + ]), + [value("f32", -0.0000010013515)], +); + +// ./test/core/float_exprs.wast:665 +assert_return( + () => invoke($37, `no_demote_mixed_add`, [ + value("f64", -0.0000013840207035752711), + value("f32", -0.0000000000005202814), + ]), + [value("f32", -0.0000013840212)], +); + +// ./test/core/float_exprs.wast:667 +assert_return( + () => invoke($37, `no_demote_mixed_add_commuted`, [ + value("f32", 0.0000000000000000000000000000000000018767183), + value("f64", 0.00000000000000000000000000004941266527909197), + ]), + [value("f32", 0.000000000000000000000000000049412667)], +); + +// ./test/core/float_exprs.wast:668 +assert_return( + () => invoke($37, `no_demote_mixed_add_commuted`, [ + value("f32", 401096440000), + value("f64", 140851523637.69385), + ]), + [value("f32", 541947950000)], +); + +// ./test/core/float_exprs.wast:669 +assert_return( + () => invoke($37, `no_demote_mixed_add_commuted`, [ + value("f32", -0.0000000000000000000000000000000000006050095), + value("f64", 0.0000000000000000000000000000000000020831160914192852), + ]), + [value("f32", 0.0000000000000000000000000000000000014781066)], +); + +// ./test/core/float_exprs.wast:670 +assert_return( + () => invoke($37, `no_demote_mixed_add_commuted`, [ + value("f32", 0.0000000019312918), + value("f64", -0.0000010032827553674626), + ]), + [value("f32", -0.0000010013515)], +); + +// ./test/core/float_exprs.wast:671 +assert_return( + () => invoke($37, `no_demote_mixed_add_commuted`, [ + value("f32", -0.0000000000005202814), + value("f64", -0.0000013840207035752711), + ]), + [value("f32", -0.0000013840212)], +); + +// ./test/core/float_exprs.wast:675 +let $38 = instantiate(`(module + (func (export "no_demote_mixed_sub") (param $$x f64) (param $$y f32) (result f32) + (f32.demote_f64 (f64.sub (local.get $$x) (f64.promote_f32 (local.get $$y))))) +)`); + +// ./test/core/float_exprs.wast:680 +assert_return( + () => invoke($38, `no_demote_mixed_sub`, [ + value("f64", 7869935327202668000000000), + value("f32", 4086347000000000000), + ]), + [value("f32", 7869931000000000000000000)], +); + +// ./test/core/float_exprs.wast:681 +assert_return( + () => invoke($38, `no_demote_mixed_sub`, [ + value("f64", -1535841968.9056544), + value("f32", 239897.28), + ]), + [value("f32", -1536081900)], +); + +// ./test/core/float_exprs.wast:682 +assert_return( + () => invoke($38, `no_demote_mixed_sub`, [ + value("f64", -102.19459272722602), + value("f32", 0.00039426138), + ]), + [value("f32", -102.194984)], +); + +// ./test/core/float_exprs.wast:683 +assert_return( + () => invoke($38, `no_demote_mixed_sub`, [ + value("f64", 0.00000000000000005645470375565188), + value("f32", 0.0000000000000000000005851077), + ]), + [value("f32", 0.00000000000000005645412)], +); + +// ./test/core/float_exprs.wast:684 +assert_return( + () => invoke($38, `no_demote_mixed_sub`, [ + value("f64", 27090.388466832894), + value("f32", 63120.89), + ]), + [value("f32", -36030.504)], +); + +// ./test/core/float_exprs.wast:688 +let $39 = instantiate(`(module + (func (export "f32.i32.no_fold_trunc_s_convert_s") (param $$x f32) (result f32) + (f32.convert_i32_s (i32.trunc_f32_s (local.get $$x)))) + (func (export "f32.i32.no_fold_trunc_u_convert_s") (param $$x f32) (result f32) + (f32.convert_i32_s (i32.trunc_f32_u (local.get $$x)))) + (func (export "f32.i32.no_fold_trunc_s_convert_u") (param $$x f32) (result f32) + (f32.convert_i32_u (i32.trunc_f32_s (local.get $$x)))) + (func (export "f32.i32.no_fold_trunc_u_convert_u") (param $$x f32) (result f32) + (f32.convert_i32_u (i32.trunc_f32_u (local.get $$x)))) + (func (export "f64.i32.no_fold_trunc_s_convert_s") (param $$x f64) (result f64) + (f64.convert_i32_s (i32.trunc_f64_s (local.get $$x)))) + (func (export "f64.i32.no_fold_trunc_u_convert_s") (param $$x f64) (result f64) + (f64.convert_i32_s (i32.trunc_f64_u (local.get $$x)))) + (func (export "f64.i32.no_fold_trunc_s_convert_u") (param $$x f64) (result f64) + (f64.convert_i32_u (i32.trunc_f64_s (local.get $$x)))) + (func (export "f64.i32.no_fold_trunc_u_convert_u") (param $$x f64) (result f64) + (f64.convert_i32_u (i32.trunc_f64_u (local.get $$x)))) + (func (export "f32.i64.no_fold_trunc_s_convert_s") (param $$x f32) (result f32) + (f32.convert_i64_s (i64.trunc_f32_s (local.get $$x)))) + (func (export "f32.i64.no_fold_trunc_u_convert_s") (param $$x f32) (result f32) + (f32.convert_i64_s (i64.trunc_f32_u (local.get $$x)))) + (func (export "f32.i64.no_fold_trunc_s_convert_u") (param $$x f32) (result f32) + (f32.convert_i64_u (i64.trunc_f32_s (local.get $$x)))) + (func (export "f32.i64.no_fold_trunc_u_convert_u") (param $$x f32) (result f32) + (f32.convert_i64_u (i64.trunc_f32_u (local.get $$x)))) + (func (export "f64.i64.no_fold_trunc_s_convert_s") (param $$x f64) (result f64) + (f64.convert_i64_s (i64.trunc_f64_s (local.get $$x)))) + (func (export "f64.i64.no_fold_trunc_u_convert_s") (param $$x f64) (result f64) + (f64.convert_i64_s (i64.trunc_f64_u (local.get $$x)))) + (func (export "f64.i64.no_fold_trunc_s_convert_u") (param $$x f64) (result f64) + (f64.convert_i64_u (i64.trunc_f64_s (local.get $$x)))) + (func (export "f64.i64.no_fold_trunc_u_convert_u") (param $$x f64) (result f64) + (f64.convert_i64_u (i64.trunc_f64_u (local.get $$x)))) +)`); + +// ./test/core/float_exprs.wast:723 +assert_return( + () => invoke($39, `f32.i32.no_fold_trunc_s_convert_s`, [value("f32", 1.5)]), + [value("f32", 1)], +); + +// ./test/core/float_exprs.wast:724 +assert_return( + () => invoke($39, `f32.i32.no_fold_trunc_s_convert_s`, [value("f32", -1.5)]), + [value("f32", -1)], +); + +// ./test/core/float_exprs.wast:725 +assert_return( + () => invoke($39, `f32.i32.no_fold_trunc_u_convert_s`, [value("f32", 1.5)]), + [value("f32", 1)], +); + +// ./test/core/float_exprs.wast:726 +assert_return( + () => invoke($39, `f32.i32.no_fold_trunc_u_convert_s`, [value("f32", -0.5)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:727 +assert_return( + () => invoke($39, `f32.i32.no_fold_trunc_s_convert_u`, [value("f32", 1.5)]), + [value("f32", 1)], +); + +// ./test/core/float_exprs.wast:728 +assert_return( + () => invoke($39, `f32.i32.no_fold_trunc_s_convert_u`, [value("f32", -1.5)]), + [value("f32", 4294967300)], +); + +// ./test/core/float_exprs.wast:729 +assert_return( + () => invoke($39, `f32.i32.no_fold_trunc_u_convert_u`, [value("f32", 1.5)]), + [value("f32", 1)], +); + +// ./test/core/float_exprs.wast:730 +assert_return( + () => invoke($39, `f32.i32.no_fold_trunc_u_convert_u`, [value("f32", -0.5)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:732 +assert_return( + () => invoke($39, `f64.i32.no_fold_trunc_s_convert_s`, [value("f64", 1.5)]), + [value("f64", 1)], +); + +// ./test/core/float_exprs.wast:733 +assert_return( + () => invoke($39, `f64.i32.no_fold_trunc_s_convert_s`, [value("f64", -1.5)]), + [value("f64", -1)], +); + +// ./test/core/float_exprs.wast:734 +assert_return( + () => invoke($39, `f64.i32.no_fold_trunc_u_convert_s`, [value("f64", 1.5)]), + [value("f64", 1)], +); + +// ./test/core/float_exprs.wast:735 +assert_return( + () => invoke($39, `f64.i32.no_fold_trunc_u_convert_s`, [value("f64", -0.5)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:736 +assert_return( + () => invoke($39, `f64.i32.no_fold_trunc_s_convert_u`, [value("f64", 1.5)]), + [value("f64", 1)], +); + +// ./test/core/float_exprs.wast:737 +assert_return( + () => invoke($39, `f64.i32.no_fold_trunc_s_convert_u`, [value("f64", -1.5)]), + [value("f64", 4294967295)], +); + +// ./test/core/float_exprs.wast:738 +assert_return( + () => invoke($39, `f64.i32.no_fold_trunc_u_convert_u`, [value("f64", 1.5)]), + [value("f64", 1)], +); + +// ./test/core/float_exprs.wast:739 +assert_return( + () => invoke($39, `f64.i32.no_fold_trunc_u_convert_u`, [value("f64", -0.5)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:741 +assert_return( + () => invoke($39, `f32.i64.no_fold_trunc_s_convert_s`, [value("f32", 1.5)]), + [value("f32", 1)], +); + +// ./test/core/float_exprs.wast:742 +assert_return( + () => invoke($39, `f32.i64.no_fold_trunc_s_convert_s`, [value("f32", -1.5)]), + [value("f32", -1)], +); + +// ./test/core/float_exprs.wast:743 +assert_return( + () => invoke($39, `f32.i64.no_fold_trunc_u_convert_s`, [value("f32", 1.5)]), + [value("f32", 1)], +); + +// ./test/core/float_exprs.wast:744 +assert_return( + () => invoke($39, `f32.i64.no_fold_trunc_u_convert_s`, [value("f32", -0.5)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:745 +assert_return( + () => invoke($39, `f32.i64.no_fold_trunc_s_convert_u`, [value("f32", 1.5)]), + [value("f32", 1)], +); + +// ./test/core/float_exprs.wast:746 +assert_return( + () => invoke($39, `f32.i64.no_fold_trunc_s_convert_u`, [value("f32", -1.5)]), + [value("f32", 18446744000000000000)], +); + +// ./test/core/float_exprs.wast:747 +assert_return( + () => invoke($39, `f32.i64.no_fold_trunc_u_convert_u`, [value("f32", 1.5)]), + [value("f32", 1)], +); + +// ./test/core/float_exprs.wast:748 +assert_return( + () => invoke($39, `f32.i64.no_fold_trunc_u_convert_u`, [value("f32", -0.5)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:750 +assert_return( + () => invoke($39, `f64.i64.no_fold_trunc_s_convert_s`, [value("f64", 1.5)]), + [value("f64", 1)], +); + +// ./test/core/float_exprs.wast:751 +assert_return( + () => invoke($39, `f64.i64.no_fold_trunc_s_convert_s`, [value("f64", -1.5)]), + [value("f64", -1)], +); + +// ./test/core/float_exprs.wast:752 +assert_return( + () => invoke($39, `f64.i64.no_fold_trunc_u_convert_s`, [value("f64", 1.5)]), + [value("f64", 1)], +); + +// ./test/core/float_exprs.wast:753 +assert_return( + () => invoke($39, `f64.i64.no_fold_trunc_u_convert_s`, [value("f64", -0.5)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:754 +assert_return( + () => invoke($39, `f64.i64.no_fold_trunc_s_convert_u`, [value("f64", 1.5)]), + [value("f64", 1)], +); + +// ./test/core/float_exprs.wast:755 +assert_return( + () => invoke($39, `f64.i64.no_fold_trunc_s_convert_u`, [value("f64", -1.5)]), + [value("f64", 18446744073709552000)], +); + +// ./test/core/float_exprs.wast:756 +assert_return( + () => invoke($39, `f64.i64.no_fold_trunc_u_convert_u`, [value("f64", 1.5)]), + [value("f64", 1)], +); + +// ./test/core/float_exprs.wast:757 +assert_return( + () => invoke($39, `f64.i64.no_fold_trunc_u_convert_u`, [value("f64", -0.5)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:763 +let $40 = instantiate(`(module + (memory 1 1) + (func (export "init") (param $$i i32) (param $$x f32) (f32.store (local.get $$i) (local.get $$x))) + + (func (export "run") (param $$n i32) (param $$z f32) + (local $$i i32) + (block $$exit + (loop $$cont + (f32.store + (local.get $$i) + (f32.div (f32.load (local.get $$i)) (local.get $$z)) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 4))) + (br_if $$cont (i32.lt_u (local.get $$i) (local.get $$n))) + ) + ) + ) + + (func (export "check") (param $$i i32) (result f32) (f32.load (local.get $$i))) +)`); + +// ./test/core/float_exprs.wast:784 +invoke($40, `init`, [0, value("f32", 15.1)]); + +// ./test/core/float_exprs.wast:785 +invoke($40, `init`, [4, value("f32", 15.2)]); + +// ./test/core/float_exprs.wast:786 +invoke($40, `init`, [8, value("f32", 15.3)]); + +// ./test/core/float_exprs.wast:787 +invoke($40, `init`, [12, value("f32", 15.4)]); + +// ./test/core/float_exprs.wast:788 +assert_return(() => invoke($40, `check`, [0]), [value("f32", 15.1)]); + +// ./test/core/float_exprs.wast:789 +assert_return(() => invoke($40, `check`, [4]), [value("f32", 15.2)]); + +// ./test/core/float_exprs.wast:790 +assert_return(() => invoke($40, `check`, [8]), [value("f32", 15.3)]); + +// ./test/core/float_exprs.wast:791 +assert_return(() => invoke($40, `check`, [12]), [value("f32", 15.4)]); + +// ./test/core/float_exprs.wast:792 +invoke($40, `run`, [16, value("f32", 3)]); + +// ./test/core/float_exprs.wast:793 +assert_return(() => invoke($40, `check`, [0]), [value("f32", 5.0333333)]); + +// ./test/core/float_exprs.wast:794 +assert_return(() => invoke($40, `check`, [4]), [value("f32", 5.0666666)]); + +// ./test/core/float_exprs.wast:795 +assert_return(() => invoke($40, `check`, [8]), [value("f32", 5.1)]); + +// ./test/core/float_exprs.wast:796 +assert_return(() => invoke($40, `check`, [12]), [value("f32", 5.133333)]); + +// ./test/core/float_exprs.wast:798 +let $41 = instantiate(`(module + (memory 1 1) + (func (export "init") (param $$i i32) (param $$x f64) (f64.store (local.get $$i) (local.get $$x))) + + (func (export "run") (param $$n i32) (param $$z f64) + (local $$i i32) + (block $$exit + (loop $$cont + (f64.store + (local.get $$i) + (f64.div (f64.load (local.get $$i)) (local.get $$z)) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 8))) + (br_if $$cont (i32.lt_u (local.get $$i) (local.get $$n))) + ) + ) + ) + + (func (export "check") (param $$i i32) (result f64) (f64.load (local.get $$i))) +)`); + +// ./test/core/float_exprs.wast:819 +invoke($41, `init`, [0, value("f64", 15.1)]); + +// ./test/core/float_exprs.wast:820 +invoke($41, `init`, [8, value("f64", 15.2)]); + +// ./test/core/float_exprs.wast:821 +invoke($41, `init`, [16, value("f64", 15.3)]); + +// ./test/core/float_exprs.wast:822 +invoke($41, `init`, [24, value("f64", 15.4)]); + +// ./test/core/float_exprs.wast:823 +assert_return(() => invoke($41, `check`, [0]), [value("f64", 15.1)]); + +// ./test/core/float_exprs.wast:824 +assert_return(() => invoke($41, `check`, [8]), [value("f64", 15.2)]); + +// ./test/core/float_exprs.wast:825 +assert_return(() => invoke($41, `check`, [16]), [value("f64", 15.3)]); + +// ./test/core/float_exprs.wast:826 +assert_return(() => invoke($41, `check`, [24]), [value("f64", 15.4)]); + +// ./test/core/float_exprs.wast:827 +invoke($41, `run`, [32, value("f64", 3)]); + +// ./test/core/float_exprs.wast:828 +assert_return(() => invoke($41, `check`, [0]), [value("f64", 5.033333333333333)]); + +// ./test/core/float_exprs.wast:829 +assert_return(() => invoke($41, `check`, [8]), [value("f64", 5.066666666666666)]); + +// ./test/core/float_exprs.wast:830 +assert_return(() => invoke($41, `check`, [16]), [value("f64", 5.1000000000000005)]); + +// ./test/core/float_exprs.wast:831 +assert_return(() => invoke($41, `check`, [24]), [value("f64", 5.133333333333334)]); + +// ./test/core/float_exprs.wast:835 +let $42 = instantiate(`(module + (func (export "f32.ult") (param $$x f32) (param $$y f32) (result i32) (i32.eqz (f32.ge (local.get $$x) (local.get $$y)))) + (func (export "f32.ule") (param $$x f32) (param $$y f32) (result i32) (i32.eqz (f32.gt (local.get $$x) (local.get $$y)))) + (func (export "f32.ugt") (param $$x f32) (param $$y f32) (result i32) (i32.eqz (f32.le (local.get $$x) (local.get $$y)))) + (func (export "f32.uge") (param $$x f32) (param $$y f32) (result i32) (i32.eqz (f32.lt (local.get $$x) (local.get $$y)))) + + (func (export "f64.ult") (param $$x f64) (param $$y f64) (result i32) (i32.eqz (f64.ge (local.get $$x) (local.get $$y)))) + (func (export "f64.ule") (param $$x f64) (param $$y f64) (result i32) (i32.eqz (f64.gt (local.get $$x) (local.get $$y)))) + (func (export "f64.ugt") (param $$x f64) (param $$y f64) (result i32) (i32.eqz (f64.le (local.get $$x) (local.get $$y)))) + (func (export "f64.uge") (param $$x f64) (param $$y f64) (result i32) (i32.eqz (f64.lt (local.get $$x) (local.get $$y)))) +)`); + +// ./test/core/float_exprs.wast:847 +assert_return(() => invoke($42, `f32.ult`, [value("f32", 3), value("f32", 2)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:848 +assert_return(() => invoke($42, `f32.ult`, [value("f32", 2), value("f32", 2)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:849 +assert_return(() => invoke($42, `f32.ult`, [value("f32", 2), value("f32", 3)]), [value("i32", 1)]); + +// ./test/core/float_exprs.wast:850 +assert_return( + () => invoke($42, `f32.ult`, [value("f32", 2), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:851 +assert_return(() => invoke($42, `f32.ule`, [value("f32", 3), value("f32", 2)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:852 +assert_return(() => invoke($42, `f32.ule`, [value("f32", 2), value("f32", 2)]), [value("i32", 1)]); + +// ./test/core/float_exprs.wast:853 +assert_return(() => invoke($42, `f32.ule`, [value("f32", 2), value("f32", 3)]), [value("i32", 1)]); + +// ./test/core/float_exprs.wast:854 +assert_return( + () => invoke($42, `f32.ule`, [value("f32", 2), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:855 +assert_return(() => invoke($42, `f32.ugt`, [value("f32", 3), value("f32", 2)]), [value("i32", 1)]); + +// ./test/core/float_exprs.wast:856 +assert_return(() => invoke($42, `f32.ugt`, [value("f32", 2), value("f32", 2)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:857 +assert_return(() => invoke($42, `f32.ugt`, [value("f32", 2), value("f32", 3)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:858 +assert_return( + () => invoke($42, `f32.ugt`, [value("f32", 2), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:859 +assert_return(() => invoke($42, `f32.uge`, [value("f32", 3), value("f32", 2)]), [value("i32", 1)]); + +// ./test/core/float_exprs.wast:860 +assert_return(() => invoke($42, `f32.uge`, [value("f32", 2), value("f32", 2)]), [value("i32", 1)]); + +// ./test/core/float_exprs.wast:861 +assert_return(() => invoke($42, `f32.uge`, [value("f32", 2), value("f32", 3)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:862 +assert_return( + () => invoke($42, `f32.uge`, [value("f32", 2), bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:863 +assert_return(() => invoke($42, `f64.ult`, [value("f64", 3), value("f64", 2)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:864 +assert_return(() => invoke($42, `f64.ult`, [value("f64", 2), value("f64", 2)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:865 +assert_return(() => invoke($42, `f64.ult`, [value("f64", 2), value("f64", 3)]), [value("i32", 1)]); + +// ./test/core/float_exprs.wast:866 +assert_return( + () => invoke($42, `f64.ult`, [ + value("f64", 2), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:867 +assert_return(() => invoke($42, `f64.ule`, [value("f64", 3), value("f64", 2)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:868 +assert_return(() => invoke($42, `f64.ule`, [value("f64", 2), value("f64", 2)]), [value("i32", 1)]); + +// ./test/core/float_exprs.wast:869 +assert_return(() => invoke($42, `f64.ule`, [value("f64", 2), value("f64", 3)]), [value("i32", 1)]); + +// ./test/core/float_exprs.wast:870 +assert_return( + () => invoke($42, `f64.ule`, [ + value("f64", 2), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:871 +assert_return(() => invoke($42, `f64.ugt`, [value("f64", 3), value("f64", 2)]), [value("i32", 1)]); + +// ./test/core/float_exprs.wast:872 +assert_return(() => invoke($42, `f64.ugt`, [value("f64", 2), value("f64", 2)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:873 +assert_return(() => invoke($42, `f64.ugt`, [value("f64", 2), value("f64", 3)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:874 +assert_return( + () => invoke($42, `f64.ugt`, [ + value("f64", 2), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:875 +assert_return(() => invoke($42, `f64.uge`, [value("f64", 3), value("f64", 2)]), [value("i32", 1)]); + +// ./test/core/float_exprs.wast:876 +assert_return(() => invoke($42, `f64.uge`, [value("f64", 2), value("f64", 2)]), [value("i32", 1)]); + +// ./test/core/float_exprs.wast:877 +assert_return(() => invoke($42, `f64.uge`, [value("f64", 2), value("f64", 3)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:878 +assert_return( + () => invoke($42, `f64.uge`, [ + value("f64", 2), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:882 +let $43 = instantiate(`(module + (func (export "f32.no_fold_lt_select") (param $$x f32) (param $$y f32) (result f32) (select (local.get $$x) (local.get $$y) (f32.lt (local.get $$x) (local.get $$y)))) + (func (export "f32.no_fold_le_select") (param $$x f32) (param $$y f32) (result f32) (select (local.get $$x) (local.get $$y) (f32.le (local.get $$x) (local.get $$y)))) + (func (export "f32.no_fold_gt_select") (param $$x f32) (param $$y f32) (result f32) (select (local.get $$x) (local.get $$y) (f32.gt (local.get $$x) (local.get $$y)))) + (func (export "f32.no_fold_ge_select") (param $$x f32) (param $$y f32) (result f32) (select (local.get $$x) (local.get $$y) (f32.ge (local.get $$x) (local.get $$y)))) + + (func (export "f64.no_fold_lt_select") (param $$x f64) (param $$y f64) (result f64) (select (local.get $$x) (local.get $$y) (f64.lt (local.get $$x) (local.get $$y)))) + (func (export "f64.no_fold_le_select") (param $$x f64) (param $$y f64) (result f64) (select (local.get $$x) (local.get $$y) (f64.le (local.get $$x) (local.get $$y)))) + (func (export "f64.no_fold_gt_select") (param $$x f64) (param $$y f64) (result f64) (select (local.get $$x) (local.get $$y) (f64.gt (local.get $$x) (local.get $$y)))) + (func (export "f64.no_fold_ge_select") (param $$x f64) (param $$y f64) (result f64) (select (local.get $$x) (local.get $$y) (f64.ge (local.get $$x) (local.get $$y)))) +)`); + +// ./test/core/float_exprs.wast:894 +assert_return( + () => invoke($43, `f32.no_fold_lt_select`, [ + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/float_exprs.wast:895 +assert_return( + () => invoke($43, `f32.no_fold_lt_select`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:896 +assert_return( + () => invoke($43, `f32.no_fold_lt_select`, [value("f32", 0), value("f32", -0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:897 +assert_return( + () => invoke($43, `f32.no_fold_lt_select`, [value("f32", -0), value("f32", 0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:898 +assert_return( + () => invoke($43, `f32.no_fold_le_select`, [ + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/float_exprs.wast:899 +assert_return( + () => invoke($43, `f32.no_fold_le_select`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:900 +assert_return( + () => invoke($43, `f32.no_fold_le_select`, [value("f32", 0), value("f32", -0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:901 +assert_return( + () => invoke($43, `f32.no_fold_le_select`, [value("f32", -0), value("f32", 0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:902 +assert_return( + () => invoke($43, `f32.no_fold_gt_select`, [ + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/float_exprs.wast:903 +assert_return( + () => invoke($43, `f32.no_fold_gt_select`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:904 +assert_return( + () => invoke($43, `f32.no_fold_gt_select`, [value("f32", 0), value("f32", -0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:905 +assert_return( + () => invoke($43, `f32.no_fold_gt_select`, [value("f32", -0), value("f32", 0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:906 +assert_return( + () => invoke($43, `f32.no_fold_ge_select`, [ + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/float_exprs.wast:907 +assert_return( + () => invoke($43, `f32.no_fold_ge_select`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:908 +assert_return( + () => invoke($43, `f32.no_fold_ge_select`, [value("f32", 0), value("f32", -0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:909 +assert_return( + () => invoke($43, `f32.no_fold_ge_select`, [value("f32", -0), value("f32", 0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:910 +assert_return( + () => invoke($43, `f64.no_fold_lt_select`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/float_exprs.wast:911 +assert_return( + () => invoke($43, `f64.no_fold_lt_select`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:912 +assert_return( + () => invoke($43, `f64.no_fold_lt_select`, [value("f64", 0), value("f64", -0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:913 +assert_return( + () => invoke($43, `f64.no_fold_lt_select`, [value("f64", -0), value("f64", 0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:914 +assert_return( + () => invoke($43, `f64.no_fold_le_select`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/float_exprs.wast:915 +assert_return( + () => invoke($43, `f64.no_fold_le_select`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:916 +assert_return( + () => invoke($43, `f64.no_fold_le_select`, [value("f64", 0), value("f64", -0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:917 +assert_return( + () => invoke($43, `f64.no_fold_le_select`, [value("f64", -0), value("f64", 0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:918 +assert_return( + () => invoke($43, `f64.no_fold_gt_select`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/float_exprs.wast:919 +assert_return( + () => invoke($43, `f64.no_fold_gt_select`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:920 +assert_return( + () => invoke($43, `f64.no_fold_gt_select`, [value("f64", 0), value("f64", -0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:921 +assert_return( + () => invoke($43, `f64.no_fold_gt_select`, [value("f64", -0), value("f64", 0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:922 +assert_return( + () => invoke($43, `f64.no_fold_ge_select`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/float_exprs.wast:923 +assert_return( + () => invoke($43, `f64.no_fold_ge_select`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:924 +assert_return( + () => invoke($43, `f64.no_fold_ge_select`, [value("f64", 0), value("f64", -0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:925 +assert_return( + () => invoke($43, `f64.no_fold_ge_select`, [value("f64", -0), value("f64", 0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:929 +let $44 = instantiate(`(module + (func (export "f32.no_fold_lt_if") (param $$x f32) (param $$y f32) (result f32) + (if (result f32) (f32.lt (local.get $$x) (local.get $$y)) + (then (local.get $$x)) (else (local.get $$y)) + ) + ) + (func (export "f32.no_fold_le_if") (param $$x f32) (param $$y f32) (result f32) + (if (result f32) (f32.le (local.get $$x) (local.get $$y)) + (then (local.get $$x)) (else (local.get $$y)) + ) + ) + (func (export "f32.no_fold_gt_if") (param $$x f32) (param $$y f32) (result f32) + (if (result f32) (f32.gt (local.get $$x) (local.get $$y)) + (then (local.get $$x)) (else (local.get $$y)) + ) + ) + (func (export "f32.no_fold_ge_if") (param $$x f32) (param $$y f32) (result f32) + (if (result f32) (f32.ge (local.get $$x) (local.get $$y)) + (then (local.get $$x)) (else (local.get $$y)) + ) + ) + + (func (export "f64.no_fold_lt_if") (param $$x f64) (param $$y f64) (result f64) + (if (result f64) (f64.lt (local.get $$x) (local.get $$y)) + (then (local.get $$x)) (else (local.get $$y)) + ) + ) + (func (export "f64.no_fold_le_if") (param $$x f64) (param $$y f64) (result f64) + (if (result f64) (f64.le (local.get $$x) (local.get $$y)) + (then (local.get $$x)) (else (local.get $$y)) + ) + ) + (func (export "f64.no_fold_gt_if") (param $$x f64) (param $$y f64) (result f64) + (if (result f64) (f64.gt (local.get $$x) (local.get $$y)) + (then (local.get $$x)) (else (local.get $$y)) + ) + ) + (func (export "f64.no_fold_ge_if") (param $$x f64) (param $$y f64) (result f64) + (if (result f64) (f64.ge (local.get $$x) (local.get $$y)) + (then (local.get $$x)) (else (local.get $$y)) + ) + ) +)`); + +// ./test/core/float_exprs.wast:973 +assert_return( + () => invoke($44, `f32.no_fold_lt_if`, [ + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/float_exprs.wast:974 +assert_return( + () => invoke($44, `f32.no_fold_lt_if`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:975 +assert_return( + () => invoke($44, `f32.no_fold_lt_if`, [value("f32", 0), value("f32", -0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:976 +assert_return( + () => invoke($44, `f32.no_fold_lt_if`, [value("f32", -0), value("f32", 0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:977 +assert_return( + () => invoke($44, `f32.no_fold_le_if`, [ + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/float_exprs.wast:978 +assert_return( + () => invoke($44, `f32.no_fold_le_if`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:979 +assert_return( + () => invoke($44, `f32.no_fold_le_if`, [value("f32", 0), value("f32", -0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:980 +assert_return( + () => invoke($44, `f32.no_fold_le_if`, [value("f32", -0), value("f32", 0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:981 +assert_return( + () => invoke($44, `f32.no_fold_gt_if`, [ + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/float_exprs.wast:982 +assert_return( + () => invoke($44, `f32.no_fold_gt_if`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:983 +assert_return( + () => invoke($44, `f32.no_fold_gt_if`, [value("f32", 0), value("f32", -0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:984 +assert_return( + () => invoke($44, `f32.no_fold_gt_if`, [value("f32", -0), value("f32", 0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:985 +assert_return( + () => invoke($44, `f32.no_fold_ge_if`, [ + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/float_exprs.wast:986 +assert_return( + () => invoke($44, `f32.no_fold_ge_if`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:987 +assert_return( + () => invoke($44, `f32.no_fold_ge_if`, [value("f32", 0), value("f32", -0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:988 +assert_return( + () => invoke($44, `f32.no_fold_ge_if`, [value("f32", -0), value("f32", 0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:989 +assert_return( + () => invoke($44, `f64.no_fold_lt_if`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/float_exprs.wast:990 +assert_return( + () => invoke($44, `f64.no_fold_lt_if`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:991 +assert_return( + () => invoke($44, `f64.no_fold_lt_if`, [value("f64", 0), value("f64", -0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:992 +assert_return( + () => invoke($44, `f64.no_fold_lt_if`, [value("f64", -0), value("f64", 0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:993 +assert_return( + () => invoke($44, `f64.no_fold_le_if`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/float_exprs.wast:994 +assert_return( + () => invoke($44, `f64.no_fold_le_if`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:995 +assert_return( + () => invoke($44, `f64.no_fold_le_if`, [value("f64", 0), value("f64", -0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:996 +assert_return( + () => invoke($44, `f64.no_fold_le_if`, [value("f64", -0), value("f64", 0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:997 +assert_return( + () => invoke($44, `f64.no_fold_gt_if`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/float_exprs.wast:998 +assert_return( + () => invoke($44, `f64.no_fold_gt_if`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:999 +assert_return( + () => invoke($44, `f64.no_fold_gt_if`, [value("f64", 0), value("f64", -0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:1000 +assert_return( + () => invoke($44, `f64.no_fold_gt_if`, [value("f64", -0), value("f64", 0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:1001 +assert_return( + () => invoke($44, `f64.no_fold_ge_if`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/float_exprs.wast:1002 +assert_return( + () => invoke($44, `f64.no_fold_ge_if`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:1003 +assert_return( + () => invoke($44, `f64.no_fold_ge_if`, [value("f64", 0), value("f64", -0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:1004 +assert_return( + () => invoke($44, `f64.no_fold_ge_if`, [value("f64", -0), value("f64", 0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:1008 +let $45 = instantiate(`(module + (func (export "f32.no_fold_lt_select_to_abs") (param $$x f32) (result f32) (select (f32.neg (local.get $$x)) (local.get $$x) (f32.lt (local.get $$x) (f32.const 0.0)))) + (func (export "f32.no_fold_le_select_to_abs") (param $$x f32) (result f32) (select (f32.neg (local.get $$x)) (local.get $$x) (f32.le (local.get $$x) (f32.const -0.0)))) + (func (export "f32.no_fold_gt_select_to_abs") (param $$x f32) (result f32) (select (local.get $$x) (f32.neg (local.get $$x)) (f32.gt (local.get $$x) (f32.const -0.0)))) + (func (export "f32.no_fold_ge_select_to_abs") (param $$x f32) (result f32) (select (local.get $$x) (f32.neg (local.get $$x)) (f32.ge (local.get $$x) (f32.const 0.0)))) + + (func (export "f64.no_fold_lt_select_to_abs") (param $$x f64) (result f64) (select (f64.neg (local.get $$x)) (local.get $$x) (f64.lt (local.get $$x) (f64.const 0.0)))) + (func (export "f64.no_fold_le_select_to_abs") (param $$x f64) (result f64) (select (f64.neg (local.get $$x)) (local.get $$x) (f64.le (local.get $$x) (f64.const -0.0)))) + (func (export "f64.no_fold_gt_select_to_abs") (param $$x f64) (result f64) (select (local.get $$x) (f64.neg (local.get $$x)) (f64.gt (local.get $$x) (f64.const -0.0)))) + (func (export "f64.no_fold_ge_select_to_abs") (param $$x f64) (result f64) (select (local.get $$x) (f64.neg (local.get $$x)) (f64.ge (local.get $$x) (f64.const 0.0)))) +)`); + +// ./test/core/float_exprs.wast:1020 +assert_return( + () => invoke($45, `f32.no_fold_lt_select_to_abs`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])], +); + +// ./test/core/float_exprs.wast:1021 +assert_return( + () => invoke($45, `f32.no_fold_lt_select_to_abs`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/float_exprs.wast:1022 +assert_return(() => invoke($45, `f32.no_fold_lt_select_to_abs`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1023 +assert_return(() => invoke($45, `f32.no_fold_lt_select_to_abs`, [value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:1024 +assert_return( + () => invoke($45, `f32.no_fold_le_select_to_abs`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])], +); + +// ./test/core/float_exprs.wast:1025 +assert_return( + () => invoke($45, `f32.no_fold_le_select_to_abs`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/float_exprs.wast:1026 +assert_return(() => invoke($45, `f32.no_fold_le_select_to_abs`, [value("f32", 0)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:1027 +assert_return(() => invoke($45, `f32.no_fold_le_select_to_abs`, [value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1028 +assert_return( + () => invoke($45, `f32.no_fold_gt_select_to_abs`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xa0, 0xff])], +); + +// ./test/core/float_exprs.wast:1029 +assert_return( + () => invoke($45, `f32.no_fold_gt_select_to_abs`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/float_exprs.wast:1030 +assert_return(() => invoke($45, `f32.no_fold_gt_select_to_abs`, [value("f32", 0)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:1031 +assert_return(() => invoke($45, `f32.no_fold_gt_select_to_abs`, [value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1032 +assert_return( + () => invoke($45, `f32.no_fold_ge_select_to_abs`, [ + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ]), + [bytes("f32", [0x0, 0x0, 0xa0, 0xff])], +); + +// ./test/core/float_exprs.wast:1033 +assert_return( + () => invoke($45, `f32.no_fold_ge_select_to_abs`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/float_exprs.wast:1034 +assert_return(() => invoke($45, `f32.no_fold_ge_select_to_abs`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1035 +assert_return(() => invoke($45, `f32.no_fold_ge_select_to_abs`, [value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:1036 +assert_return( + () => invoke($45, `f64.no_fold_lt_select_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_exprs.wast:1037 +assert_return( + () => invoke($45, `f64.no_fold_lt_select_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/float_exprs.wast:1038 +assert_return(() => invoke($45, `f64.no_fold_lt_select_to_abs`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1039 +assert_return(() => invoke($45, `f64.no_fold_lt_select_to_abs`, [value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/float_exprs.wast:1040 +assert_return( + () => invoke($45, `f64.no_fold_le_select_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_exprs.wast:1041 +assert_return( + () => invoke($45, `f64.no_fold_le_select_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/float_exprs.wast:1042 +assert_return(() => invoke($45, `f64.no_fold_le_select_to_abs`, [value("f64", 0)]), [value("f64", -0)]); + +// ./test/core/float_exprs.wast:1043 +assert_return(() => invoke($45, `f64.no_fold_le_select_to_abs`, [value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1044 +assert_return( + () => invoke($45, `f64.no_fold_gt_select_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff])], +); + +// ./test/core/float_exprs.wast:1045 +assert_return( + () => invoke($45, `f64.no_fold_gt_select_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/float_exprs.wast:1046 +assert_return(() => invoke($45, `f64.no_fold_gt_select_to_abs`, [value("f64", 0)]), [value("f64", -0)]); + +// ./test/core/float_exprs.wast:1047 +assert_return(() => invoke($45, `f64.no_fold_gt_select_to_abs`, [value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1048 +assert_return( + () => invoke($45, `f64.no_fold_ge_select_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff])], +); + +// ./test/core/float_exprs.wast:1049 +assert_return( + () => invoke($45, `f64.no_fold_ge_select_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/float_exprs.wast:1050 +assert_return(() => invoke($45, `f64.no_fold_ge_select_to_abs`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1051 +assert_return(() => invoke($45, `f64.no_fold_ge_select_to_abs`, [value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/float_exprs.wast:1055 +let $46 = instantiate(`(module + (func (export "f32.no_fold_lt_if_to_abs") (param $$x f32) (result f32) + (if (result f32) (f32.lt (local.get $$x) (f32.const 0.0)) + (then (f32.neg (local.get $$x))) (else (local.get $$x)) + ) + ) + (func (export "f32.no_fold_le_if_to_abs") (param $$x f32) (result f32) + (if (result f32) (f32.le (local.get $$x) (f32.const -0.0)) + (then (f32.neg (local.get $$x))) (else (local.get $$x)) + ) + ) + (func (export "f32.no_fold_gt_if_to_abs") (param $$x f32) (result f32) + (if (result f32) (f32.gt (local.get $$x) (f32.const -0.0)) + (then (local.get $$x)) (else (f32.neg (local.get $$x))) + ) + ) + (func (export "f32.no_fold_ge_if_to_abs") (param $$x f32) (result f32) + (if (result f32) (f32.ge (local.get $$x) (f32.const 0.0)) + (then (local.get $$x)) (else (f32.neg (local.get $$x))) + ) + ) + + (func (export "f64.no_fold_lt_if_to_abs") (param $$x f64) (result f64) + (if (result f64) (f64.lt (local.get $$x) (f64.const 0.0)) + (then (f64.neg (local.get $$x))) (else (local.get $$x)) + ) + ) + (func (export "f64.no_fold_le_if_to_abs") (param $$x f64) (result f64) + (if (result f64) (f64.le (local.get $$x) (f64.const -0.0)) + (then (f64.neg (local.get $$x))) (else (local.get $$x)) + ) + ) + (func (export "f64.no_fold_gt_if_to_abs") (param $$x f64) (result f64) + (if (result f64) (f64.gt (local.get $$x) (f64.const -0.0)) + (then (local.get $$x)) (else (f64.neg (local.get $$x))) + ) + ) + (func (export "f64.no_fold_ge_if_to_abs") (param $$x f64) (result f64) + (if (result f64) (f64.ge (local.get $$x) (f64.const 0.0)) + (then (local.get $$x)) (else (f64.neg (local.get $$x))) + ) + ) +)`); + +// ./test/core/float_exprs.wast:1099 +assert_return( + () => invoke($46, `f32.no_fold_lt_if_to_abs`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])], +); + +// ./test/core/float_exprs.wast:1100 +assert_return( + () => invoke($46, `f32.no_fold_lt_if_to_abs`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/float_exprs.wast:1101 +assert_return(() => invoke($46, `f32.no_fold_lt_if_to_abs`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1102 +assert_return(() => invoke($46, `f32.no_fold_lt_if_to_abs`, [value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:1103 +assert_return( + () => invoke($46, `f32.no_fold_le_if_to_abs`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])], +); + +// ./test/core/float_exprs.wast:1104 +assert_return( + () => invoke($46, `f32.no_fold_le_if_to_abs`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [bytes("f32", [0x0, 0x0, 0xc0, 0xff])], +); + +// ./test/core/float_exprs.wast:1105 +assert_return(() => invoke($46, `f32.no_fold_le_if_to_abs`, [value("f32", 0)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:1106 +assert_return(() => invoke($46, `f32.no_fold_le_if_to_abs`, [value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1107 +assert_return( + () => invoke($46, `f32.no_fold_gt_if_to_abs`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [bytes("f32", [0x0, 0x0, 0xa0, 0xff])], +); + +// ./test/core/float_exprs.wast:1108 +assert_return( + () => invoke($46, `f32.no_fold_gt_if_to_abs`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/float_exprs.wast:1109 +assert_return(() => invoke($46, `f32.no_fold_gt_if_to_abs`, [value("f32", 0)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:1110 +assert_return(() => invoke($46, `f32.no_fold_gt_if_to_abs`, [value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1111 +assert_return( + () => invoke($46, `f32.no_fold_ge_if_to_abs`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), + [bytes("f32", [0x0, 0x0, 0xa0, 0xff])], +); + +// ./test/core/float_exprs.wast:1112 +assert_return( + () => invoke($46, `f32.no_fold_ge_if_to_abs`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/float_exprs.wast:1113 +assert_return(() => invoke($46, `f32.no_fold_ge_if_to_abs`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1114 +assert_return(() => invoke($46, `f32.no_fold_ge_if_to_abs`, [value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:1115 +assert_return( + () => invoke($46, `f64.no_fold_lt_if_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_exprs.wast:1116 +assert_return( + () => invoke($46, `f64.no_fold_lt_if_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/float_exprs.wast:1117 +assert_return(() => invoke($46, `f64.no_fold_lt_if_to_abs`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1118 +assert_return(() => invoke($46, `f64.no_fold_lt_if_to_abs`, [value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/float_exprs.wast:1119 +assert_return( + () => invoke($46, `f64.no_fold_le_if_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_exprs.wast:1120 +assert_return( + () => invoke($46, `f64.no_fold_le_if_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/float_exprs.wast:1121 +assert_return(() => invoke($46, `f64.no_fold_le_if_to_abs`, [value("f64", 0)]), [value("f64", -0)]); + +// ./test/core/float_exprs.wast:1122 +assert_return(() => invoke($46, `f64.no_fold_le_if_to_abs`, [value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1123 +assert_return( + () => invoke($46, `f64.no_fold_gt_if_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff])], +); + +// ./test/core/float_exprs.wast:1124 +assert_return( + () => invoke($46, `f64.no_fold_gt_if_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/float_exprs.wast:1125 +assert_return(() => invoke($46, `f64.no_fold_gt_if_to_abs`, [value("f64", 0)]), [value("f64", -0)]); + +// ./test/core/float_exprs.wast:1126 +assert_return(() => invoke($46, `f64.no_fold_gt_if_to_abs`, [value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1127 +assert_return( + () => invoke($46, `f64.no_fold_ge_if_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff])], +); + +// ./test/core/float_exprs.wast:1128 +assert_return( + () => invoke($46, `f64.no_fold_ge_if_to_abs`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/float_exprs.wast:1129 +assert_return(() => invoke($46, `f64.no_fold_ge_if_to_abs`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1130 +assert_return(() => invoke($46, `f64.no_fold_ge_if_to_abs`, [value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/float_exprs.wast:1135 +let $47 = instantiate(`(module + (func (export "f32.incorrect_correction") (result f32) + (f32.sub (f32.sub (f32.add (f32.const 1.333) (f32.const 1.225)) (f32.const 1.333)) (f32.const 1.225)) + ) + (func (export "f64.incorrect_correction") (result f64) + (f64.sub (f64.sub (f64.add (f64.const 1.333) (f64.const 1.225)) (f64.const 1.333)) (f64.const 1.225)) + ) +)`); + +// ./test/core/float_exprs.wast:1144 +assert_return(() => invoke($47, `f32.incorrect_correction`, []), [value("f32", 0.00000011920929)]); + +// ./test/core/float_exprs.wast:1145 +assert_return( + () => invoke($47, `f64.incorrect_correction`, []), + [value("f64", -0.0000000000000002220446049250313)], +); + +// ./test/core/float_exprs.wast:1150 +let $48 = instantiate(`(module + (func (export "calculate") (result f32) + (local $$x f32) + (local $$r f32) + (local $$q f32) + (local $$z0 f32) + (local $$z1 f32) + (local.set $$x (f32.const 156.25)) + (local.set $$r (f32.const 208.333333334)) + (local.set $$q (f32.const 1.77951304201)) + (local.set $$z0 (f32.div (f32.mul (f32.neg (local.get $$r)) (local.get $$x)) (f32.sub (f32.mul (local.get $$x) (local.get $$q)) (local.get $$r)))) + (local.set $$z1 (f32.div (f32.mul (f32.neg (local.get $$r)) (local.get $$x)) (f32.sub (f32.mul (local.get $$x) (local.get $$q)) (local.get $$r)))) + (block (br_if 0 (f32.eq (local.get $$z0) (local.get $$z1))) (unreachable)) + (local.get $$z1) + ) +)`); + +// ./test/core/float_exprs.wast:1167 +assert_return(() => invoke($48, `calculate`, []), [value("f32", -466.92685)]); + +// ./test/core/float_exprs.wast:1169 +let $49 = instantiate(`(module + (func (export "calculate") (result f64) + (local $$x f64) + (local $$r f64) + (local $$q f64) + (local $$z0 f64) + (local $$z1 f64) + (local.set $$x (f64.const 156.25)) + (local.set $$r (f64.const 208.333333334)) + (local.set $$q (f64.const 1.77951304201)) + (local.set $$z0 (f64.div (f64.mul (f64.neg (local.get $$r)) (local.get $$x)) (f64.sub (f64.mul (local.get $$x) (local.get $$q)) (local.get $$r)))) + (local.set $$z1 (f64.div (f64.mul (f64.neg (local.get $$r)) (local.get $$x)) (f64.sub (f64.mul (local.get $$x) (local.get $$q)) (local.get $$r)))) + (block (br_if 0 (f64.eq (local.get $$z0) (local.get $$z1))) (unreachable)) + (local.get $$z1) + ) +)`); + +// ./test/core/float_exprs.wast:1186 +assert_return(() => invoke($49, `calculate`, []), [value("f64", -466.926956301738)]); + +// ./test/core/float_exprs.wast:1191 +let $50 = instantiate(`(module + (func (export "llvm_pr26746") (param $$x f32) (result f32) + (f32.sub (f32.const 0.0) (f32.sub (f32.const -0.0) (local.get $$x))) + ) +)`); + +// ./test/core/float_exprs.wast:1197 +assert_return(() => invoke($50, `llvm_pr26746`, [value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1202 +let $51 = instantiate(`(module + (func (export "llvm_pr27153") (param $$x i32) (result f32) + (f32.add (f32.convert_i32_s (i32.and (local.get $$x) (i32.const 268435455))) (f32.const -8388608.0)) + ) +)`); + +// ./test/core/float_exprs.wast:1208 +assert_return(() => invoke($51, `llvm_pr27153`, [33554434]), [value("f32", 25165824)]); + +// ./test/core/float_exprs.wast:1213 +let $52 = instantiate(`(module + (func (export "llvm_pr27036") (param $$x i32) (param $$y i32) (result f32) + (f32.add (f32.convert_i32_s (i32.or (local.get $$x) (i32.const -25034805))) + (f32.convert_i32_s (i32.and (local.get $$y) (i32.const 14942208)))) + ) +)`); + +// ./test/core/float_exprs.wast:1220 +assert_return(() => invoke($52, `llvm_pr27036`, [-25034805, 14942208]), [value("f32", -10092596)]); + +// ./test/core/float_exprs.wast:1230 +let $53 = instantiate(`(module + (func (export "thepast0") (param $$a f64) (param $$b f64) (param $$c f64) (param $$d f64) (result f64) + (f64.div (f64.mul (local.get $$a) (local.get $$b)) (f64.mul (local.get $$c) (local.get $$d))) + ) + + (func (export "thepast1") (param $$a f64) (param $$b f64) (param $$c f64) (result f64) + (f64.sub (f64.mul (local.get $$a) (local.get $$b)) (local.get $$c)) + ) + + (func (export "thepast2") (param $$a f32) (param $$b f32) (param $$c f32) (result f32) + (f32.mul (f32.mul (local.get $$a) (local.get $$b)) (local.get $$c)) + ) +)`); + +// ./test/core/float_exprs.wast:1244 +assert_return( + () => invoke($53, `thepast0`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + value("f64", 0.9999999999999999), + value("f64", 2), + value("f64", 0.5), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044501477170144023), + ], +); + +// ./test/core/float_exprs.wast:1245 +assert_return( + () => invoke($53, `thepast1`, [ + value("f64", 0.00000000000000005551115123125783), + value("f64", 0.9999999999999999), + value("f64", 0.00000000000000005551115123125783), + ]), + [value("f64", -0.000000000000000000000000000000006162975822039155)], +); + +// ./test/core/float_exprs.wast:1246 +assert_return( + () => invoke($53, `thepast2`, [ + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.5), + value("f32", 1), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/float_exprs.wast:1251 +let $54 = instantiate(`(module + (func (export "inverse") (param $$x f32) (result f32) + (f32.div (f32.const 1.0) (local.get $$x)) + ) +)`); + +// ./test/core/float_exprs.wast:1257 +assert_return(() => invoke($54, `inverse`, [value("f32", 96)]), [value("f32", 0.010416667)]); + +// ./test/core/float_exprs.wast:1262 +let $55 = instantiate(`(module + (func (export "f32_sqrt_minus_2") (param $$x f32) (result f32) + (f32.sub (f32.sqrt (local.get $$x)) (f32.const 2.0)) + ) + + (func (export "f64_sqrt_minus_2") (param $$x f64) (result f64) + (f64.sub (f64.sqrt (local.get $$x)) (f64.const 2.0)) + ) +)`); + +// ./test/core/float_exprs.wast:1272 +assert_return(() => invoke($55, `f32_sqrt_minus_2`, [value("f32", 4)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1273 +assert_return(() => invoke($55, `f64_sqrt_minus_2`, [value("f64", 4)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1277 +let $56 = instantiate(`(module + (func (export "f32.no_fold_recip_recip") (param $$x f32) (result f32) + (f32.div (f32.const 1.0) (f32.div (f32.const 1.0) (local.get $$x)))) + + (func (export "f64.no_fold_recip_recip") (param $$x f64) (result f64) + (f64.div (f64.const 1.0) (f64.div (f64.const 1.0) (local.get $$x)))) +)`); + +// ./test/core/float_exprs.wast:1285 +assert_return( + () => invoke($56, `f32.no_fold_recip_recip`, [value("f32", -70435790000000000000)]), + [value("f32", -70435784000000000000)], +); + +// ./test/core/float_exprs.wast:1286 +assert_return( + () => invoke($56, `f32.no_fold_recip_recip`, [ + value("f32", 0.000000000000000000000012466101), + ]), + [value("f32", 0.0000000000000000000000124661)], +); + +// ./test/core/float_exprs.wast:1287 +assert_return( + () => invoke($56, `f32.no_fold_recip_recip`, [ + value("f32", 0.000000000000000000097184545), + ]), + [value("f32", 0.00000000000000000009718455)], +); + +// ./test/core/float_exprs.wast:1288 +assert_return( + () => invoke($56, `f32.no_fold_recip_recip`, [value("f32", -30.400759)]), + [value("f32", -30.40076)], +); + +// ./test/core/float_exprs.wast:1289 +assert_return( + () => invoke($56, `f32.no_fold_recip_recip`, [value("f32", 2331659200000000000000)]), + [value("f32", 2331659000000000000000)], +); + +// ./test/core/float_exprs.wast:1291 +assert_return(() => invoke($56, `f32.no_fold_recip_recip`, [value("f32", -0)]), [value("f32", -0)]); + +// ./test/core/float_exprs.wast:1292 +assert_return(() => invoke($56, `f32.no_fold_recip_recip`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1293 +assert_return( + () => invoke($56, `f32.no_fold_recip_recip`, [value("f32", -Infinity)]), + [value("f32", -Infinity)], +); + +// ./test/core/float_exprs.wast:1294 +assert_return( + () => invoke($56, `f32.no_fold_recip_recip`, [value("f32", Infinity)]), + [value("f32", Infinity)], +); + +// ./test/core/float_exprs.wast:1296 +assert_return( + () => invoke($56, `f64.no_fold_recip_recip`, [ + value("f64", -657971534362886860000000000000000000000000000), + ]), + [value("f64", -657971534362886900000000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:1297 +assert_return( + () => invoke($56, `f64.no_fold_recip_recip`, [value("f64", -144246931868576430000)]), + [value("f64", -144246931868576420000)], +); + +// ./test/core/float_exprs.wast:1298 +assert_return( + () => invoke($56, `f64.no_fold_recip_recip`, [ + value("f64", 184994689206231350000000000000000000000000000000000), + ]), + [value("f64", 184994689206231330000000000000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:1299 +assert_return( + () => invoke($56, `f64.no_fold_recip_recip`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005779584288006583), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005779584288006582), + ], +); + +// ./test/core/float_exprs.wast:1300 +assert_return( + () => invoke($56, `f64.no_fold_recip_recip`, [ + value("f64", 51501178696141640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 51501178696141634000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1302 +assert_return(() => invoke($56, `f64.no_fold_recip_recip`, [value("f64", -0)]), [value("f64", -0)]); + +// ./test/core/float_exprs.wast:1303 +assert_return(() => invoke($56, `f64.no_fold_recip_recip`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1304 +assert_return( + () => invoke($56, `f64.no_fold_recip_recip`, [value("f64", -Infinity)]), + [value("f64", -Infinity)], +); + +// ./test/core/float_exprs.wast:1305 +assert_return( + () => invoke($56, `f64.no_fold_recip_recip`, [value("f64", Infinity)]), + [value("f64", Infinity)], +); + +// ./test/core/float_exprs.wast:1309 +let $57 = instantiate(`(module + (func (export "f32.no_algebraic_factoring") (param $$x f32) (param $$y f32) (result f32) + (f32.mul (f32.add (local.get $$x) (local.get $$y)) + (f32.sub (local.get $$x) (local.get $$y)))) + + (func (export "f64.no_algebraic_factoring") (param $$x f64) (param $$y f64) (result f64) + (f64.mul (f64.add (local.get $$x) (local.get $$y)) + (f64.sub (local.get $$x) (local.get $$y)))) +)`); + +// ./test/core/float_exprs.wast:1319 +assert_return( + () => invoke($57, `f32.no_algebraic_factoring`, [ + value("f32", -0.000000000000000053711865), + value("f32", 0.00000000000000009744328), + ]), + [value("f32", -0.000000000000000000000000000000006610229)], +); + +// ./test/core/float_exprs.wast:1320 +assert_return( + () => invoke($57, `f32.no_algebraic_factoring`, [ + value("f32", -19756732), + value("f32", 32770204), + ]), + [value("f32", -683557800000000)], +); + +// ./test/core/float_exprs.wast:1321 +assert_return( + () => invoke($57, `f32.no_algebraic_factoring`, [ + value("f32", 52314150000000), + value("f32", -145309980000000), + ]), + [value("f32", -18378221000000000000000000000)], +); + +// ./test/core/float_exprs.wast:1322 +assert_return( + () => invoke($57, `f32.no_algebraic_factoring`, [ + value("f32", 195260.38), + value("f32", -227.75723), + ]), + [value("f32", 38126563000)], +); + +// ./test/core/float_exprs.wast:1323 +assert_return( + () => invoke($57, `f32.no_algebraic_factoring`, [ + value("f32", -237.48706), + value("f32", -972341.5), + ]), + [value("f32", -945447960000)], +); + +// ./test/core/float_exprs.wast:1325 +assert_return( + () => invoke($57, `f64.no_algebraic_factoring`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009639720335949767), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008019175443606207), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006430717386609473), + ], +); + +// ./test/core/float_exprs.wast:1326 +assert_return( + () => invoke($57, `f64.no_algebraic_factoring`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005166066590392027), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001494333315888213), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026688244016362468), + ], +); + +// ./test/core/float_exprs.wast:1327 +assert_return( + () => invoke($57, `f64.no_algebraic_factoring`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002866135870517635), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012114355254268516), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014675678175314036), + ], +); + +// ./test/core/float_exprs.wast:1328 +assert_return( + () => invoke($57, `f64.no_algebraic_factoring`, [ + value("f64", -1292099281007814900000000000000000000000000000000000000), + value("f64", 662717187728034000000000000000000000000000000000000000000), + ]), + [ + value("f64", -439192401389602300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1329 +assert_return( + () => invoke($57, `f64.no_algebraic_factoring`, [ + value("f64", 26242795689010570000000000000000000), + value("f64", -1625023398605080200000000000), + ]), + [ + value("f64", 688684325575149100000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1333 +let $58 = instantiate(`(module + (func (export "f32.no_algebraic_factoring") (param $$x f32) (param $$y f32) (result f32) + (f32.sub (f32.mul (local.get $$x) (local.get $$x)) + (f32.mul (local.get $$y) (local.get $$y)))) + + (func (export "f64.no_algebraic_factoring") (param $$x f64) (param $$y f64) (result f64) + (f64.sub (f64.mul (local.get $$x) (local.get $$x)) + (f64.mul (local.get $$y) (local.get $$y)))) +)`); + +// ./test/core/float_exprs.wast:1343 +assert_return( + () => invoke($58, `f32.no_algebraic_factoring`, [ + value("f32", 0.000000000000022102996), + value("f32", 0.0000000000031465275), + ]), + [value("f32", -0.0000000000000000000000099001476)], +); + +// ./test/core/float_exprs.wast:1344 +assert_return( + () => invoke($58, `f32.no_algebraic_factoring`, [ + value("f32", -3289460800000), + value("f32", -15941539000), + ]), + [value("f32", 10820299000000000000000000)], +); + +// ./test/core/float_exprs.wast:1345 +assert_return( + () => invoke($58, `f32.no_algebraic_factoring`, [ + value("f32", 0.00036497542), + value("f32", -0.00016153714), + ]), + [value("f32", 0.000000107112804)], +); + +// ./test/core/float_exprs.wast:1346 +assert_return( + () => invoke($58, `f32.no_algebraic_factoring`, [ + value("f32", 0.000000000000065383266), + value("f32", -0.000000000000027412773), + ]), + [value("f32", 0.000000000000000000000000003523511)], +); + +// ./test/core/float_exprs.wast:1347 +assert_return( + () => invoke($58, `f32.no_algebraic_factoring`, [ + value("f32", 3609682000000000), + value("f32", -5260104400000000), + ]), + [value("f32", -14638896000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:1349 +assert_return( + () => invoke($58, `f64.no_algebraic_factoring`, [ + value("f64", 213640454349895100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -292858755839442800000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 45642243734743850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1350 +assert_return( + () => invoke($58, `f64.no_algebraic_factoring`, [ + value("f64", -1229017115924435800000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -8222158919016600000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -67603897289562710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1351 +assert_return( + () => invoke($58, `f64.no_algebraic_factoring`, [ + value("f64", 5477733829752.252), + value("f64", -970738900948.5906), + ]), + [value("f64", 29063233895797397000000000)], +); + +// ./test/core/float_exprs.wast:1352 +assert_return( + () => invoke($58, `f64.no_algebraic_factoring`, [ + value("f64", -10689141744923551000000000000000000000000000000000000000), + value("f64", -173378393593738040000000000000000000000000000000000), + ]), + [ + value("f64", 114257751213007240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1353 +assert_return( + () => invoke($58, `f64.no_algebraic_factoring`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000010295699877022106), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000008952274637805908), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025858214767010105), + ], +); + +// ./test/core/float_exprs.wast:1358 +let $59 = instantiate(`(module + (memory (data + "\\01\\00\\00\\00\\01\\00\\00\\80\\01\\00\\00\\00\\01\\00\\00\\80" + "\\01\\00\\00\\00\\01\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00" + "\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00" + )) + + (func (export "f32.simple_x4_sum") + (param $$i i32) + (param $$j i32) + (param $$k i32) + (local $$x0 f32) (local $$x1 f32) (local $$x2 f32) (local $$x3 f32) + (local $$y0 f32) (local $$y1 f32) (local $$y2 f32) (local $$y3 f32) + (local.set $$x0 (f32.load offset=0 (local.get $$i))) + (local.set $$x1 (f32.load offset=4 (local.get $$i))) + (local.set $$x2 (f32.load offset=8 (local.get $$i))) + (local.set $$x3 (f32.load offset=12 (local.get $$i))) + (local.set $$y0 (f32.load offset=0 (local.get $$j))) + (local.set $$y1 (f32.load offset=4 (local.get $$j))) + (local.set $$y2 (f32.load offset=8 (local.get $$j))) + (local.set $$y3 (f32.load offset=12 (local.get $$j))) + (f32.store offset=0 (local.get $$k) (f32.add (local.get $$x0) (local.get $$y0))) + (f32.store offset=4 (local.get $$k) (f32.add (local.get $$x1) (local.get $$y1))) + (f32.store offset=8 (local.get $$k) (f32.add (local.get $$x2) (local.get $$y2))) + (f32.store offset=12 (local.get $$k) (f32.add (local.get $$x3) (local.get $$y3))) + ) + + (func (export "f32.load") + (param $$k i32) (result f32) + (f32.load (local.get $$k)) + ) +)`); + +// ./test/core/float_exprs.wast:1391 +assert_return(() => invoke($59, `f32.simple_x4_sum`, [0, 16, 32]), []); + +// ./test/core/float_exprs.wast:1392 +assert_return( + () => invoke($59, `f32.load`, [32]), + [value("f32", 0.000000000000000000000000000000000000000000003)], +); + +// ./test/core/float_exprs.wast:1393 +assert_return(() => invoke($59, `f32.load`, [36]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1394 +assert_return( + () => invoke($59, `f32.load`, [40]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/float_exprs.wast:1395 +assert_return( + () => invoke($59, `f32.load`, [44]), + [value("f32", -0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/float_exprs.wast:1397 +let $60 = instantiate(`(module + (memory (data + "\\01\\00\\00\\00\\00\\00\\00\\00\\01\\00\\00\\00\\00\\00\\00\\80\\01\\00\\00\\00\\00\\00\\00\\00\\01\\00\\00\\00\\00\\00\\00\\80" + "\\01\\00\\00\\00\\00\\00\\00\\00\\01\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00" + "\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00" + )) + + (func (export "f64.simple_x4_sum") + (param $$i i32) + (param $$j i32) + (param $$k i32) + (local $$x0 f64) (local $$x1 f64) (local $$x2 f64) (local $$x3 f64) + (local $$y0 f64) (local $$y1 f64) (local $$y2 f64) (local $$y3 f64) + (local.set $$x0 (f64.load offset=0 (local.get $$i))) + (local.set $$x1 (f64.load offset=8 (local.get $$i))) + (local.set $$x2 (f64.load offset=16 (local.get $$i))) + (local.set $$x3 (f64.load offset=24 (local.get $$i))) + (local.set $$y0 (f64.load offset=0 (local.get $$j))) + (local.set $$y1 (f64.load offset=8 (local.get $$j))) + (local.set $$y2 (f64.load offset=16 (local.get $$j))) + (local.set $$y3 (f64.load offset=24 (local.get $$j))) + (f64.store offset=0 (local.get $$k) (f64.add (local.get $$x0) (local.get $$y0))) + (f64.store offset=8 (local.get $$k) (f64.add (local.get $$x1) (local.get $$y1))) + (f64.store offset=16 (local.get $$k) (f64.add (local.get $$x2) (local.get $$y2))) + (f64.store offset=24 (local.get $$k) (f64.add (local.get $$x3) (local.get $$y3))) + ) + + (func (export "f64.load") + (param $$k i32) (result f64) + (f64.load (local.get $$k)) + ) +)`); + +// ./test/core/float_exprs.wast:1430 +assert_return(() => invoke($60, `f64.simple_x4_sum`, [0, 32, 64]), []); + +// ./test/core/float_exprs.wast:1431 +assert_return( + () => invoke($60, `f64.load`, [64]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ], +); + +// ./test/core/float_exprs.wast:1432 +assert_return(() => invoke($60, `f64.load`, [72]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1433 +assert_return( + () => invoke($60, `f64.load`, [80]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/float_exprs.wast:1434 +assert_return( + () => invoke($60, `f64.load`, [88]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/float_exprs.wast:1439 +let $61 = instantiate(`(module + (memory (data + "\\c4\\c5\\57\\24\\a5\\84\\c8\\0b\\6d\\b8\\4b\\2e\\f2\\76\\17\\1c\\ca\\4a\\56\\1e\\1b\\6e\\71\\22" + "\\5d\\17\\1e\\6e\\bf\\cd\\14\\5c\\c7\\21\\55\\51\\39\\9c\\1f\\b2\\51\\f0\\a3\\93\\d7\\c1\\2c\\ae" + "\\7e\\a8\\28\\3a\\01\\21\\f4\\0a\\58\\93\\f8\\42\\77\\9f\\83\\39\\6a\\5f\\ba\\f7\\0a\\d8\\51\\6a" + "\\34\\ca\\ad\\c6\\34\\0e\\d8\\26\\dc\\4c\\33\\1c\\ed\\29\\90\\a8\\78\\0f\\d1\\ce\\76\\31\\23\\83" + "\\b8\\35\\e8\\f2\\44\\b0\\d3\\a1\\fc\\bb\\32\\e1\\b0\\ba\\69\\44\\09\\d6\\d9\\7d\\ff\\2e\\c0\\5a" + "\\36\\14\\33\\14\\3e\\a9\\fa\\87\\6d\\8b\\bc\\ce\\9d\\a7\\fd\\c4\\e9\\85\\3f\\dd\\d7\\e1\\18\\a6" + "\\50\\26\\72\\6e\\3f\\73\\0f\\f8\\12\\93\\23\\34\\61\\76\\12\\48\\c0\\9b\\05\\93\\eb\\ac\\86\\de" + "\\94\\3e\\55\\e8\\8c\\e8\\dd\\e4\\fc\\95\\47\\be\\56\\03\\21\\20\\4c\\e6\\bf\\7b\\f6\\7f\\d5\\ba" + "\\73\\1c\\c1\\14\\8f\\c4\\27\\96\\b3\\bd\\33\\ff\\78\\41\\5f\\c0\\5a\\ce\\f6\\67\\6e\\73\\9a\\17" + "\\66\\70\\03\\f8\\ce\\27\\a3\\52\\b2\\9f\\3b\\bf\\fb\\ae\\ed\\d3\\5a\\f8\\37\\57\\f0\\f5\\6e\\ef" + "\\b1\\4d\\70\\3d\\54\\a7\\01\\9a\\85\\08\\48\\91\\f5\\9d\\0c\\60\\87\\5b\\d9\\54\\1e\\51\\6d\\88" + "\\8e\\08\\8c\\a5\\71\\3a\\56\\08\\67\\46\\8f\\8f\\13\\2a\\2c\\ec\\2c\\1f\\b4\\62\\2b\\6f\\41\\0a" + "\\c4\\65\\42\\a2\\31\\6b\\2c\\7d\\3e\\bb\\75\\ac\\86\\97\\30\\d9\\48\\cd\\9a\\1f\\56\\c4\\c6\\e4" + "\\12\\c0\\9d\\fb\\ee\\02\\8c\\ce\\1c\\f2\\1e\\a1\\78\\23\\db\\c4\\1e\\49\\03\\d3\\71\\cc\\08\\50" + "\\c5\\d8\\5c\\ed\\d5\\b5\\65\\ac\\b5\\c9\\21\\d2\\c9\\29\\76\\de\\f0\\30\\1a\\5b\\3c\\f2\\3b\\db" + "\\3a\\39\\82\\3a\\16\\08\\6f\\a8\\f1\\be\\69\\69\\99\\71\\a6\\05\\d3\\14\\93\\2a\\16\\f2\\2f\\11" + "\\c7\\7e\\20\\bb\\91\\44\\ee\\f8\\e4\\01\\53\\c0\\b9\\7f\\f0\\bf\\f0\\03\\9c\\6d\\b1\\df\\a2\\44" + "\\01\\6d\\6b\\71\\2b\\5c\\b3\\21\\19\\46\\5e\\8f\\db\\91\\d3\\7c\\78\\6b\\b7\\12\\00\\8f\\eb\\bd" + "\\8a\\f5\\d4\\2e\\c4\\c1\\1e\\df\\73\\63\\59\\47\\49\\03\\0a\\b7\\cf\\24\\cf\\9c\\0e\\44\\7a\\9e" + "\\14\\fb\\42\\bf\\9d\\39\\30\\9e\\a0\\ab\\2f\\d1\\ae\\9e\\6a\\83\\43\\e3\\55\\7d\\85\\bf\\63\\8a" + "\\f8\\96\\10\\1f\\fe\\6d\\e7\\22\\1b\\e1\\69\\46\\8a\\44\\c8\\c8\\f9\\0c\\2b\\19\\07\\a5\\02\\3e" + "\\f2\\30\\10\\9a\\85\\8a\\5f\\ef\\81\\45\\a0\\77\\b1\\03\\10\\73\\4b\\ae\\98\\9d\\47\\bf\\9a\\2d" + "\\3a\\d5\\0f\\03\\66\\e3\\3d\\53\\d9\\40\\ce\\1f\\6f\\32\\2f\\21\\2b\\23\\21\\6c\\62\\d4\\a7\\3e" + "\\a8\\ce\\28\\31\\2d\\00\\3d\\67\\5e\\af\\a0\\cf\\2e\\d2\\b9\\6b\\84\\eb\\69\\08\\3c\\62\\36\\be" + "\\12\\fd\\36\\7f\\88\\3e\\ad\\bc\\0b\\c0\\41\\c4\\50\\b6\\e3\\50\\31\\e8\\ce\\e2\\96\\65\\55\\9c" + "\\16\\46\\e6\\b0\\2d\\3a\\e8\\81\\05\\b0\\bf\\34\\f7\\bc\\10\\1c\\fb\\cc\\3c\\f1\\85\\97\\42\\9f" + "\\eb\\14\\8d\\3c\\bf\\d7\\17\\88\\49\\9d\\8b\\2b\\b2\\3a\\83\\d1\\4f\\04\\9e\\a1\\0f\\ad\\08\\9d" + "\\54\\af\\d1\\82\\c3\\ec\\32\\2f\\02\\8f\\05\\21\\2d\\a2\\b7\\e4\\f4\\6f\\2e\\81\\2b\\0b\\9c\\fc" + "\\cb\\fe\\74\\02\\f9\\db\\f4\\f3\\ea\\00\\a8\\ec\\d1\\99\\74\\26\\dd\\d6\\34\\d5\\25\\b1\\46\\dd" + "\\9c\\aa\\71\\f5\\60\\b0\\88\\c8\\e0\\0b\\59\\5a\\25\\4f\\29\\66\\f9\\e3\\2e\\fe\\e9\\da\\e5\\18" + "\\4f\\27\\62\\f4\\ce\\a4\\21\\95\\74\\c7\\57\\64\\27\\9a\\4c\\fd\\54\\7d\\61\\ce\\c3\\ac\\87\\46" + "\\9c\\fa\\ff\\09\\ca\\79\\97\\67\\24\\74\\ca\\d4\\21\\83\\26\\25\\19\\12\\37\\64\\19\\e5\\65\\e0" + "\\74\\75\\8e\\dd\\c8\\ef\\74\\c7\\d8\\21\\2b\\79\\04\\51\\46\\65\\60\\03\\5d\\fa\\d8\\f4\\65\\a4" + "\\9e\\5d\\23\\da\\d7\\8a\\92\\80\\a4\\de\\78\\3c\\f1\\57\\42\\6d\\cd\\c9\\2f\\d5\\a4\\9e\\ab\\40" + "\\f4\\cb\\1b\\d7\\a3\\ca\\fc\\eb\\a7\\01\\b2\\9a\\69\\4e\\46\\9b\\18\\4e\\dd\\79\\a7\\aa\\a6\\52" + "\\39\\1e\\ef\\30\\cc\\9b\\bd\\5b\\ee\\4c\\21\\6d\\30\\00\\72\\b0\\46\\5f\\08\\cf\\c5\\b9\\e0\\3e" + "\\c2\\b3\\0c\\dc\\8e\\64\\de\\19\\42\\79\\cf\\43\\ea\\43\\5d\\8e\\88\\f7\\ab\\15\\dc\\3f\\c8\\67" + "\\20\\db\\b8\\64\\b1\\47\\1f\\de\\f2\\cb\\3f\\59\\9f\\d8\\46\\90\\dc\\ae\\2f\\22\\f9\\e2\\31\\89" + "\\d9\\9c\\1c\\4c\\d3\\a9\\4a\\57\\84\\9c\\9f\\ea\\2c\\3c\\ae\\3c\\c3\\1e\\8b\\e5\\4e\\17\\01\\25" + "\\db\\34\\46\\5f\\15\\ea\\05\\0c\\7c\\d9\\45\\8c\\19\\d0\\73\\8a\\96\\16\\dd\\44\\f9\\05\\b7\\5b" + "\\71\\b0\\e6\\21\\36\\5f\\75\\89\\91\\73\\75\\ab\\7d\\ae\\d3\\73\\ec\\37\\c6\\ea\\55\\75\\ef\\ea" + "\\ab\\8b\\7b\\11\\dc\\6d\\1a\\b2\\6a\\c4\\25\\cf\\aa\\e3\\9f\\49\\49\\89\\cb\\37\\9b\\0a\\a7\\01" + "\\60\\70\\dc\\b7\\c8\\83\\e1\\42\\f5\\be\\ad\\62\\94\\ad\\8d\\a1" + )) + + (func (export "f32.kahan_sum") (param $$p i32) (param $$n i32) (result f32) + (local $$sum f32) + (local $$c f32) + (local $$t f32) + (block $$exit + (loop $$top + (local.set $$t + (f32.sub + (f32.sub + (local.tee $$sum + (f32.add + (local.get $$c) + (local.tee $$t + (f32.sub (f32.load (local.get $$p)) (local.get $$t)) + ) + ) + ) + (local.get $$c) + ) + (local.get $$t) + ) + ) + (local.set $$p (i32.add (local.get $$p) (i32.const 4))) + (local.set $$c (local.get $$sum)) + (br_if $$top (local.tee $$n (i32.add (local.get $$n) (i32.const -1)))) + ) + ) + (local.get $$sum) + ) + + (func (export "f32.plain_sum") (param $$p i32) (param $$n i32) (result f32) + (local $$sum f32) + (block $$exit + (loop $$top + (local.set $$sum (f32.add (local.get $$sum) (f32.load (local.get $$p)))) + (local.set $$p (i32.add (local.get $$p) (i32.const 4))) + (local.set $$n (i32.add (local.get $$n) (i32.const -1))) + (br_if $$top (local.get $$n)) + ) + ) + (local.get $$sum) + ) +)`); + +// ./test/core/float_exprs.wast:1530 +assert_return( + () => invoke($61, `f32.kahan_sum`, [0, 256]), + [value("f32", -21558138000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:1531 +assert_return( + () => invoke($61, `f32.plain_sum`, [0, 256]), + [value("f32", -16487540000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:1533 +let $62 = instantiate(`(module + (memory (data "\\13\\05\\84\\42\\5d\\a2\\2c\\c6\\43\\db\\55\\a9\\cd\\da\\55\\e3\\73\\fc\\58\\d6\\ba\\d5\\00\\fd\\83\\35\\42\\88\\8b\\13\\5d\\38\\4a\\47\\0d\\72\\73\\a1\\1a\\ef\\c4\\45\\17\\57\\d8\\c9\\46\\e0\\8d\\6c\\e1\\37\\70\\c8\\83\\5b\\55\\5e\\5a\\2d\\73\\1e\\56\\c8\\e1\\6d\\69\\14\\78\\0a\\8a\\5a\\64\\3a\\09\\c7\\a8\\87\\c5\\f0\\d3\\5d\\e6\\03\\fc\\93\\be\\26\\ca\\d6\\a9\\91\\60\\bd\\b0\\ed\\ae\\f7\\30\\7e\\92\\3a\\6f\\a7\\59\\8e\\aa\\7d\\bf\\67\\58\\2a\\54\\f8\\4e\\fe\\ed\\35\\58\\a6\\51\\bf\\42\\e5\\4b\\66\\27\\24\\6d\\7f\\42\\2d\\28\\92\\18\\ec\\08\\ae\\e7\\55\\da\\b1\\a6\\65\\a5\\72\\50\\47\\1b\\b8\\a9\\54\\d7\\a6\\06\\5b\\0f\\42\\58\\83\\8a\\17\\82\\c6\\10\\43\\a0\\c0\\2e\\6d\\bc\\5a\\85\\53\\72\\7f\\ad\\44\\bc\\30\\3c\\55\\b2\\24\\9a\\74\\3a\\9e\\e1\\d8\\0f\\70\\fc\\a9\\3a\\cd\\93\\4b\\ec\\e3\\7e\\dd\\5d\\27\\cd\\f8\\a0\\9d\\1c\\11\\c0\\57\\2e\\fd\\c8\\13\\32\\cc\\3a\\1a\\7d\\a3\\41\\55\\ed\\c3\\82\\49\\2a\\04\\1e\\ef\\73\\b9\\2e\\2e\\e3\\5f\\f4\\df\\e6\\b2\\33\\0c\\39\\3f\\6f\\44\\6a\\03\\c1\\42\\b9\\fa\\b1\\c8\\ed\\a5\\58\\99\\7f\\ed\\b4\\72\\9e\\79\\eb\\fb\\43\\82\\45\\aa\\bb\\95\\d2\\ff\\28\\9e\\f6\\a1\\ad\\95\\d6\\55\\95\\0d\\6f\\60\\11\\c7\\78\\3e\\49\\f2\\7e\\48\\f4\\a2\\71\\d0\\13\\8e\\b3\\de\\99\\52\\e3\\45\\74\\ea\\76\\0e\\1b\\2a\\c8\\ee\\14\\01\\c4\\50\\5b\\36\\3c\\ef\\ba\\72\\a2\\a6\\08\\f8\\7b\\36\\9d\\f9\\ef\\0b\\c7\\56\\2d\\5c\\f0\\9d\\5d\\de\\fc\\b8\\ad\\0f\\64\\0e\\97\\15\\32\\26\\c2\\31\\e6\\05\\1e\\ef\\cb\\17\\1b\\6d\\15\\0b\\74\\5d\\d3\\2e\\f8\\6b\\86\\b4\\ba\\73\\52\\53\\99\\a9\\76\\20\\45\\c9\\40\\80\\6b\\14\\ed\\a1\\fa\\80\\46\\e6\\26\\d2\\e6\\98\\c4\\57\\bf\\c4\\1c\\a4\\90\\7a\\36\\94\\14\\ba\\15\\89\\6e\\e6\\9c\\37\\8c\\f4\\de\\12\\22\\5d\\a1\\79\\50\\67\\0d\\3d\\7a\\e9\\d4\\aa\\2e\\7f\\2a\\7a\\30\\3d\\ea\\5d\\12\\48\\fe\\e1\\18\\cd\\a4\\57\\a2\\87\\3e\\b6\\9a\\8b\\db\\da\\9d\\78\\9c\\cf\\8d\\b1\\4f\\90\\b4\\34\\e0\\9d\\f6\\ca\\fe\\4c\\3b\\78\\6d\\0a\\5c\\18\\9f\\61\\b9\\dd\\b4\\e0\\0f\\76\\e0\\1b\\69\\0d\\5e\\58\\73\\70\\5e\\0e\\2d\\a1\\7d\\ff\\20\\eb\\91\\34\\92\\ac\\38\\72\\2a\\1f\\8e\\71\\2e\\6a\\f1\\af\\c7\\27\\70\\d9\\c4\\57\\f7\\d2\\3c\\1d\\b8\\f0\\f0\\64\\cf\\dc\\ae\\be\\a3\\cc\\3e\\22\\7d\\4e\\69\\21\\63\\17\\ed\\03\\02\\54\\9a\\0f\\50\\4e\\13\\5a\\35\\a1\\22\\a4\\df\\86\\c2\\74\\79\\16\\b8\\69\\69\\a0\\52\\5d\\11\\64\\bd\\5b\\93\\fc\\69\\a0\\f4\\13\\d0\\81\\51\\dd\\fa\\0c\\15\\c3\\7a\\c9\\62\\7a\\a9\\1d\\c9\\e6\\5a\\b3\\5b\\97\\02\\3c\\64\\22\\12\\3c\\22\\90\\64\\2d\\30\\54\\4c\\b4\\a1\\22\\09\\57\\22\\5e\\8e\\38\\2b\\02\\a8\\ae\\f6\\be\\0d\\2b\\f2\\03\\ad\\fa\\10\\01\\71\\77\\2a\\30\\02\\95\\f6\\00\\3e\\d0\\c4\\8d\\34\\19\\50\\21\\0a\\bc\\50\\da\\3c\\30\\d6\\3a\\31\\94\\8d\\3a\\fe\\ef\\14\\57\\9d\\4b\\93\\00\\96\\24\\0c\\6f\\fd\\bc\\23\\76\\02\\6c\\eb\\52\\72\\80\\11\\7e\\80\\3a\\13\\12\\38\\1d\\38\\49\\95\\40\\27\\8a\\44\\7b\\e8\\dc\\6d\\8c\\8c\\8e\\3c\\b5\\b3\\18\\0e\\f6\\08\\1a\\84\\41\\35\\ff\\8b\\b8\\93\\40\\ea\\e1\\51\\1d\\89\\a5\\8d\\42\\68\\29\\ea\\2f\\c1\\7a\\52\\eb\\90\\5d\\4d\\d6\\80\\e3\\d7\\75\\48\\ce\\ed\\d3\\01\\1c\\8d\\5b\\a5\\94\\0d\\78\\cf\\f1\\06\\13\\2f\\98\\02\\a4\\6d\\2e\\6c\\f2\\d5\\74\\29\\89\\4c\\f9\\03\\f5\\c7\\18\\ad\\7a\\f0\\68\\f8\\5c\\d6\\59\\87\\6e\\d6\\3f\\06\\be\\86\\20\\e3\\41\\91\\22\\f3\\6e\\8b\\f0\\68\\1c\\57\\a7\\fc\\b0\\7c\\9e\\99\\0b\\96\\1a\\89\\5f\\e6\\0d\\7c\\08\\51\\a0\\a2\\67\\9a\\47\\00\\93\\6b\\f9\\28\\f0\\68\\db\\62\\f1\\e0\\65\\2c\\53\\33\\e0\\a7\\ca\\11\\42\\30\\f6\\af\\01\\c1\\65\\3d\\32\\01\\6f\\ab\\2e\\be\\d3\\8b\\be\\14\\c3\\ff\\ec\\fb\\f0\\f9\\c5\\0c\\05\\6f\\01\\09\\6b\\e3\\34\\31\\0c\\1f\\66\\a6\\42\\bc\\1a\\87\\49\\16\\16\\8c\\b0\\90\\0d\\34\\8c\\0a\\e1\\09\\5e\\10\\a4\\6b\\56\\cc\\f0\\c9\\bb\\dc\\b8\\5c\\ce\\f6\\cc\\8d\\75\\7e\\b3\\07\\88\\04\\2f\\b4\\5e\\c9\\e3\\4a\\23\\73\\19\\62\\6c\\9a\\03\\76\\44\\86\\9c\\60\\fc\\db\\72\\8f\\27\\a0\\dd\\b3\\c5\\da\\ff\\f9\\ec\\6a\\b1\\7b\\d3\\cf\\50\\37\\c9\\7a\\78\\0c\\e4\\3a\\b6\\f5\\e6\\f4\\98\\6e\\42\\7d\\35\\73\\8b\\45\\c0\\56\\97\\cd\\6d\\ce\\cf\\ad\\31\\b3\\c3\\54\\fa\\ef\\d5\\c0\\f4\\6a\\5f\\54\\e7\\49\\3e\\33\\0a\\30\\38\\fd\\d9\\05\\ff\\a5\\3f\\57\\46\\14\\b5\\91\\17\\ca\\6b\\98\\23\\7a\\65\\b3\\6c\\02\\b4\\cc\\79\\5d\\58\\d8\\b3\\d5\\94\\ae\\f4\\6d\\75\\65\\f7\\92\\bf\\7e\\47\\4c\\3c\\ee\\db\\ac\\f1\\32\\5d\\fb\\6f\\41\\1c\\34\\c8\\83\\4f\\c2\\58\\01\\be\\05\\3e\\66\\16\\a6\\04\\6d\\5d\\4f\\86\\09\\27\\82\\25\\12\\cd\\3a\\cd\\ce\\6b\\bc\\ca\\ac\\28\\9b\\ee\\6a\\25\\86\\9e\\45\\70\\c6\\d2\\bd\\3b\\7d\\42\\e5\\27\\af\\c7\\1d\\f4\\81\\c8\\b3\\76\\8a\\a8\\36\\a3\\ae\\2a\\e6\\18\\e1\\36\\22\\ad\\f6\\25\\72\\b0\\39\\8b\\01\\9a\\22\\7b\\84\\c3\\2d\\5f\\72\\a4\\98\\ac\\15\\70\\e7\\d4\\18\\e2\\7d\\d2\\30\\7c\\33\\08\\cd\\ca\\c4\\22\\85\\88\\75\\81\\c6\\4a\\74\\58\\8d\\e0\\e8\\ac\\c5\\ab\\75\\5a\\f4\\28\\12\\f0\\18\\45\\52\\f2\\97\\b2\\93\\41\\6f\\8d\\7f\\db\\70\\fb\\a3\\5d\\1f\\a7\\8d\\98\\20\\2b\\22\\9f\\3a\\01\\b5\\8b\\1b\\d2\\cb\\14\\03\\0e\\14\\14\\d2\\19\\5a\\1f\\ce\\5e\\cd\\81\\79\\15\\01\\ca\\de\\73\\74\\8c\\56\\20\\9f\\77\\2d\\25\\16\\f6\\61\\51\\1d\\a4\\8e\\9b\\98\\a5\\c6\\ec\\a8\\45\\57\\82\\59\\78\\0d\\90\\b4\\df\\51\\b0\\c3\\82\\94\\cc\\b3\\53\\09\\15\\6d\\96\\6c\\3a\\40\\47\\b7\\4a\\7a\\05\\2f\\a1\\1e\\8c\\9d\\a0\\20\\88\\fb\\52\\b7\\9f\\f3\\f3\\bb\\5f\\e7\\8a\\61\\a7\\21\\b1\\ac\\fa\\09\\aa\\a4\\6c\\bc\\24\\80\\ba\\2a\\e9\\65\\ff\\70\\ff\\cc\\fa\\65\\87\\76\\f3\\c5\\15\\ce\\cb\\e8\\42\\31\\00\\0c\\91\\57\\d9\\e0\\9d\\35\\54\\24\\ad\\a4\\d8\\f9\\08\\67\\63\\c8\\cf\\81\\dd\\90\\a2\\d7\\c4\\07\\4a\\e6\\10\\6f\\67\\e7\\27\\d4\\23\\59\\18\\f2\\a8\\9d\\5f\\d8\\94\\30\\aa\\54\\86\\4f\\87\\9d\\82\\b5\\26\\ca\\a6\\96\\bf\\cf\\55\\f9\\9d\\37\\01\\19\\48\\43\\c5\\94\\6c\\f3\\74\\97\\58\\4c\\3c\\9d\\08\\e8\\04\\c2\\58\\30\\76\\e1\\a0\\f8\\ea\\e9\\c5\\ae\\cf\\78\\9e\\a9\\0c\\ac\\b3\\44\\42\\e0\\bc\\5d\\1b\\9c\\49\\58\\4a\\1c\\19\\49\\c1\\3a\\ea\\f5\\eb\\3b\\81\\a9\\4b\\70\\0c\\cc\\9e\\1a\\d3\\2f\\b7\\52\\2f\\20\\3b\\eb\\64\\51\\1d\\a0\\2d\\b2\\3e\\be\\13\\85\\48\\92\\32\\2e\\db\\5c\\a1\\e7\\8c\\45\\91\\35\\01\\0a\\93\\c2\\eb\\09\\ce\\f3\\d2\\22\\24\\d0\\8c\\cc\\1d\\9d\\38\\c8\\4d\\e3\\82\\cc\\64\\15\\06\\2d\\e7\\01\\2f\\ab\\bb\\b5\\04\\4c\\92\\1c\\7a\\d6\\3f\\e8\\5f\\31\\15\\0c\\dc\\e4\\31\\b4\\c4\\25\\3e\\2a\\aa\\00\\9e\\c8\\e5\\21\\7a\\7f\\29\\f1\\c0\\af\\1d\\5e\\e8\\63\\39\\ad\\f8\\7e\\6c\\c8\\c5\\7f\\c2\\a8\\97\\27\\0a\\d9\\f4\\21\\6a\\ea\\03\\09\\fb\\f7\\96\\3b\\83\\79\\5f\\7c\\4b\\30\\9f\\56\\35\\de\\b4\\73\\d4\\95\\f0\\14\\c3\\74\\2f\\0d\\a3\\1d\\4e\\8d\\31\\24\\b3\\1a\\84\\85\\62\\5a\\7b\\3c\\14\\39\\17\\e6\\6d\\eb\\37\\c2\\00\\58\\5b\\0b\\e3\\3c\\8a\\62\\e1\\f8\\35\\4b\\56\\e2\\87\\60\\8b\\be\\a7\\38\\91\\77\\54\\a9\\5a\\24\\25\\90\\9f\\a5\\42\\77\\f3\\5c\\39\\df\\ff\\74\\07\\76\\a1\\cd\\1f\\62\\0b\\81\\81\\68\\af\\05\\c1\\c0\\7f\\26\\ee\\c0\\91\\a3\\6a\\7d\\29\\61\\45\\27\\e5\\57\\88\\dc\\0d\\97\\04\\1a\\33\\a9\\44\\8a\\da\\02\\10\\45\\3f\\8e\\55\\a6\\76\\8c\\4d\\e3\\f1\\89\\83\\c8\\d0\\f8\\9b\\50\\77\\9f\\47\\df\\4c\\9c\\66\\0d\\aa\\18\\b8\\5f\\4f\\c4\\01\\ce\\dc\\84\\ac\\46\\9e\\69\\e1\\76\\45\\6b\\61\\89\\e4\\5d\\94\\bb\\11\\83\\9f\\78\\d8\\0a\\d2\\f5\\7e\\5d\\43\\ea\\bc\\10\\f1\\3a\\c9\\e2\\64\\fb\\53\\65\\d0\\c7\\b4\\a7\\fb\\d4\\05\\53\\25\\d0\\cd\\29\\88\\00\\56\\25\\24\\7d\\5d\\b4\\f3\\41\\9f\\e9\\b5\\f7\\ae\\64\\2c\\e3\\c9\\6d\\d5\\84\\3a\\72\\12\\b8\\7a\\d9\\1b\\09\\e8\\38\\da\\26\\4f\\04\\ce\\03\\71\\6e\\8a\\44\\7b\\5c\\81\\59\\9c\\d2\\e4\\c3\\ba\\59\\a6\\e5\\28\\a7\\8f\\9a\\e4\\d5\\4e\\b9\\ca\\7f\\cb\\75\\b8\\2b\\43\\3e\\b3\\15\\46\\b1\\a5\\bc\\9d\\9e\\38\\15\\f1\\bd\\1b\\21\\aa\\f1\\82\\00\\95\\fc\\a7\\77\\47\\39\\a7\\33\\43\\92\\d7\\52\\40\\4b\\06\\81\\8a\\a0\\bd\\f1\\6b\\99\\84\\42\\5b\\e2\\3b\\c5\\5e\\12\\5c\\28\\4d\\b6\\0e\\4e\\c8\\5c\\e8\\01\\8a\\c5\\e7\\e4\\9d\\42\\ee\\5d\\9c\\c4\\eb\\eb\\68\\09\\27\\92\\95\\9a\\11\\54\\73\\c4\\12\\80\\fb\\7d\\fe\\c5\\08\\60\\7f\\36\\41\\e0\\10\\ba\\d6\\2b\\6c\\f1\\b4\\17\\fe\\26\\34\\e3\\4b\\f8\\a8\\e3\\91\\be\\4f\\2a\\fc\\da\\81\\b8\\e7\\fe\\d5\\26\\50\\47\\f3\\1a\\65\\32\\81\\e0\\05\\b8\\4f\\32\\31\\26\\00\\4a\\53\\97\\c2\\c3\\0e\\2e\\a1\\26\\54\\ab\\05\\8e\\56\\2f\\7d\\af\\22\\84\\68\\a5\\8b\\97\\f6\\a4\\fd\\a8\\cc\\75\\41\\96\\86\\fd\\27\\3d\\29\\86\\8d\\7f\\4c\\d4\\8e\\73\\41\\f4\\1e\\e2\\dd\\58\\27\\97\\ce\\9c\\94\\cf\\7a\\04\\2f\\dc\\ed" + )) + + (func (export "f64.kahan_sum") (param $$p i32) (param $$n i32) (result f64) + (local $$sum f64) + (local $$c f64) + (local $$t f64) + (block $$exit + (loop $$top + (local.set $$t + (f64.sub + (f64.sub + (local.tee $$sum + (f64.add + (local.get $$c) + (local.tee $$t + (f64.sub (f64.load (local.get $$p)) (local.get $$t)) + ) + ) + ) + (local.get $$c) + ) + (local.get $$t) + ) + ) + (local.set $$p (i32.add (local.get $$p) (i32.const 8))) + (local.set $$c (local.get $$sum)) + (br_if $$top (local.tee $$n (i32.add (local.get $$n) (i32.const -1)))) + ) + ) + (local.get $$sum) + ) + + (func (export "f64.plain_sum") (param $$p i32) (param $$n i32) (result f64) + (local $$sum f64) + (block $$exit + (loop $$top + (local.set $$sum (f64.add (local.get $$sum) (f64.load (local.get $$p)))) + (local.set $$p (i32.add (local.get $$p) (i32.const 8))) + (local.set $$n (i32.add (local.get $$n) (i32.const -1))) + (br_if $$top (local.get $$n)) + ) + ) + (local.get $$sum) + ) +)`); + +// ./test/core/float_exprs.wast:1581 +assert_return( + () => invoke($62, `f64.kahan_sum`, [0, 256]), + [ + value("f64", 4996401743142033000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1582 +assert_return( + () => invoke($62, `f64.plain_sum`, [0, 256]), + [ + value("f64", 4996401743297957600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1586 +let $63 = instantiate(`(module + (func (export "f32.no_fold_neg_sub") (param $$x f32) (param $$y f32) (result f32) + (f32.neg (f32.sub (local.get $$x) (local.get $$y)))) + + (func (export "f64.no_fold_neg_sub") (param $$x f64) (param $$y f64) (result f64) + (f64.neg (f64.sub (local.get $$x) (local.get $$y)))) +)`); + +// ./test/core/float_exprs.wast:1594 +assert_return( + () => invoke($63, `f32.no_fold_neg_sub`, [value("f32", -0), value("f32", -0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:1595 +assert_return( + () => invoke($63, `f32.no_fold_neg_sub`, [value("f32", 0), value("f32", -0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:1596 +assert_return( + () => invoke($63, `f32.no_fold_neg_sub`, [value("f32", -0), value("f32", 0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:1597 +assert_return( + () => invoke($63, `f32.no_fold_neg_sub`, [value("f32", 0), value("f32", 0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:1599 +assert_return( + () => invoke($63, `f64.no_fold_neg_sub`, [value("f64", -0), value("f64", -0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:1600 +assert_return( + () => invoke($63, `f64.no_fold_neg_sub`, [value("f64", 0), value("f64", -0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:1601 +assert_return( + () => invoke($63, `f64.no_fold_neg_sub`, [value("f64", -0), value("f64", 0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:1602 +assert_return( + () => invoke($63, `f64.no_fold_neg_sub`, [value("f64", 0), value("f64", 0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:1606 +let $64 = instantiate(`(module + (func (export "f32.no_fold_neg_add") (param $$x f32) (param $$y f32) (result f32) + (f32.neg (f32.add (local.get $$x) (local.get $$y)))) + + (func (export "f64.no_fold_neg_add") (param $$x f64) (param $$y f64) (result f64) + (f64.neg (f64.add (local.get $$x) (local.get $$y)))) +)`); + +// ./test/core/float_exprs.wast:1614 +assert_return( + () => invoke($64, `f32.no_fold_neg_add`, [value("f32", -0), value("f32", -0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:1615 +assert_return( + () => invoke($64, `f32.no_fold_neg_add`, [value("f32", 0), value("f32", -0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:1616 +assert_return( + () => invoke($64, `f32.no_fold_neg_add`, [value("f32", -0), value("f32", 0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:1617 +assert_return( + () => invoke($64, `f32.no_fold_neg_add`, [value("f32", 0), value("f32", 0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:1619 +assert_return( + () => invoke($64, `f64.no_fold_neg_add`, [value("f64", -0), value("f64", -0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:1620 +assert_return( + () => invoke($64, `f64.no_fold_neg_add`, [value("f64", 0), value("f64", -0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:1621 +assert_return( + () => invoke($64, `f64.no_fold_neg_add`, [value("f64", -0), value("f64", 0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:1622 +assert_return( + () => invoke($64, `f64.no_fold_neg_add`, [value("f64", 0), value("f64", 0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:1626 +let $65 = instantiate(`(module + (func (export "f32.no_fold_add_neg_neg") (param $$x f32) (param $$y f32) (result f32) + (f32.add (f32.neg (local.get $$x)) (f32.neg (local.get $$y)))) + + (func (export "f64.no_fold_add_neg_neg") (param $$x f64) (param $$y f64) (result f64) + (f64.add (f64.neg (local.get $$x)) (f64.neg (local.get $$y)))) +)`); + +// ./test/core/float_exprs.wast:1634 +assert_return( + () => invoke($65, `f32.no_fold_add_neg_neg`, [value("f32", -0), value("f32", -0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:1635 +assert_return( + () => invoke($65, `f32.no_fold_add_neg_neg`, [value("f32", 0), value("f32", -0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:1636 +assert_return( + () => invoke($65, `f32.no_fold_add_neg_neg`, [value("f32", -0), value("f32", 0)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:1637 +assert_return( + () => invoke($65, `f32.no_fold_add_neg_neg`, [value("f32", 0), value("f32", 0)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:1639 +assert_return( + () => invoke($65, `f64.no_fold_add_neg_neg`, [value("f64", -0), value("f64", -0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:1640 +assert_return( + () => invoke($65, `f64.no_fold_add_neg_neg`, [value("f64", 0), value("f64", -0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:1641 +assert_return( + () => invoke($65, `f64.no_fold_add_neg_neg`, [value("f64", -0), value("f64", 0)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:1642 +assert_return( + () => invoke($65, `f64.no_fold_add_neg_neg`, [value("f64", 0), value("f64", 0)]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:1646 +let $66 = instantiate(`(module + (func (export "f32.no_fold_add_neg") (param $$x f32) (result f32) + (f32.add (f32.neg (local.get $$x)) (local.get $$x))) + + (func (export "f64.no_fold_add_neg") (param $$x f64) (result f64) + (f64.add (f64.neg (local.get $$x)) (local.get $$x))) +)`); + +// ./test/core/float_exprs.wast:1654 +assert_return(() => invoke($66, `f32.no_fold_add_neg`, [value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1655 +assert_return(() => invoke($66, `f32.no_fold_add_neg`, [value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1656 +assert_return(() => invoke($66, `f32.no_fold_add_neg`, [value("f32", Infinity)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:1657 +assert_return(() => invoke($66, `f32.no_fold_add_neg`, [value("f32", -Infinity)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:1659 +assert_return(() => invoke($66, `f64.no_fold_add_neg`, [value("f64", 0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1660 +assert_return(() => invoke($66, `f64.no_fold_add_neg`, [value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1661 +assert_return(() => invoke($66, `f64.no_fold_add_neg`, [value("f64", Infinity)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:1662 +assert_return(() => invoke($66, `f64.no_fold_add_neg`, [value("f64", -Infinity)]), [`canonical_nan`]); + +// ./test/core/float_exprs.wast:1666 +let $67 = instantiate(`(module + (func (export "f32.no_fold_6x_via_add") (param $$x f32) (result f32) + (f32.add (f32.add (f32.add (f32.add (f32.add + (local.get $$x) + (local.get $$x)) (local.get $$x)) (local.get $$x)) + (local.get $$x)) (local.get $$x))) + + (func (export "f64.no_fold_6x_via_add") (param $$x f64) (result f64) + (f64.add (f64.add (f64.add (f64.add (f64.add + (local.get $$x) + (local.get $$x)) (local.get $$x)) (local.get $$x)) + (local.get $$x)) (local.get $$x))) +)`); + +// ./test/core/float_exprs.wast:1680 +assert_return( + () => invoke($67, `f32.no_fold_6x_via_add`, [ + value("f32", -855513700000000000000000000000), + ]), + [value("f32", -5133083000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:1681 +assert_return( + () => invoke($67, `f32.no_fold_6x_via_add`, [ + value("f32", -0.00000000000000000000001209506), + ]), + [value("f32", -0.00000000000000000000007257036)], +); + +// ./test/core/float_exprs.wast:1682 +assert_return( + () => invoke($67, `f32.no_fold_6x_via_add`, [ + value("f32", 0.000000000000000000000006642689), + ]), + [value("f32", 0.000000000000000000000039856134)], +); + +// ./test/core/float_exprs.wast:1683 +assert_return( + () => invoke($67, `f32.no_fold_6x_via_add`, [value("f32", -0.0000000006147346)]), + [value("f32", -0.0000000036884074)], +); + +// ./test/core/float_exprs.wast:1684 +assert_return( + () => invoke($67, `f32.no_fold_6x_via_add`, [ + value("f32", -1209858100000000000000000), + ]), + [value("f32", -7259148300000000000000000)], +); + +// ./test/core/float_exprs.wast:1686 +assert_return( + () => invoke($67, `f64.no_fold_6x_via_add`, [value("f64", -351704490602771400000)]), + [value("f64", -2110226943616628600000)], +); + +// ./test/core/float_exprs.wast:1687 +assert_return( + () => invoke($67, `f64.no_fold_6x_via_add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014824294109868734), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008894576465921239), + ], +); + +// ./test/core/float_exprs.wast:1688 +assert_return( + () => invoke($67, `f64.no_fold_6x_via_add`, [ + value("f64", -7484567838781003000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -44907407032686014000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1689 +assert_return( + () => invoke($67, `f64.no_fold_6x_via_add`, [ + value("f64", 17277868192936067000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 103667209157616410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1690 +assert_return( + () => invoke($67, `f64.no_fold_6x_via_add`, [ + value("f64", -43116397525195610000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -258698385151173640000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1695 +let $68 = instantiate(`(module + (func (export "f32.no_fold_div_div") (param $$x f32) (param $$y f32) (param $$z f32) (result f32) + (f32.div (f32.div (local.get $$x) (local.get $$y)) (local.get $$z))) + + (func (export "f64.no_fold_div_div") (param $$x f64) (param $$y f64) (param $$z f64) (result f64) + (f64.div (f64.div (local.get $$x) (local.get $$y)) (local.get $$z))) +)`); + +// ./test/core/float_exprs.wast:1703 +assert_return( + () => invoke($68, `f32.no_fold_div_div`, [ + value("f32", -593847530000000000000000), + value("f32", -0.000030265672), + value("f32", -1584.8682), + ]), + [value("f32", -12380309000000000000000000)], +); + +// ./test/core/float_exprs.wast:1704 +assert_return( + () => invoke($68, `f32.no_fold_div_div`, [ + value("f32", 0.0000000000000000000015438962), + value("f32", 2533429300000000000000000000000000), + value("f32", -0.00000000000000000000000000000000026844783), + ]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:1705 +assert_return( + () => invoke($68, `f32.no_fold_div_div`, [ + value("f32", 13417423000000), + value("f32", 0.000000000000000000000000000000029339205), + value("f32", 76386374000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/float_exprs.wast:1706 +assert_return( + () => invoke($68, `f32.no_fold_div_div`, [ + value("f32", -0.00010776529), + value("f32", -34220943000000000000000000000000000000), + value("f32", -0.00000000000016562324), + ]), + [value("f32", -0.000000000000000000000000000019011327)], +); + +// ./test/core/float_exprs.wast:1707 +assert_return( + () => invoke($68, `f32.no_fold_div_div`, [ + value("f32", 130582500000000), + value("f32", 96245350000000000), + value("f32", -41461545000000000000000000000000000000), + ]), + [value("f32", -0.000000000000000000000000000000000000000032723)], +); + +// ./test/core/float_exprs.wast:1709 +assert_return( + () => invoke($68, `f64.no_fold_div_div`, [ + value("f64", 477762874671014340000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 102786720420404010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000718999894988884), + ]), + [ + value("f64", -64646730118787990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1710 +assert_return( + () => invoke($68, `f64.no_fold_div_div`, [ + value("f64", -21790236783875714000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.0000000028324436844616576), + value("f64", 186110768259868700000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -41336068079920670000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1711 +assert_return( + () => invoke($68, `f64.no_fold_div_div`, [ + value("f64", -7.287619347826683), + value("f64", -13467607316739855000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 2462719007013688000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000219725454), + ], +); + +// ./test/core/float_exprs.wast:1712 +assert_return( + () => invoke($68, `f64.no_fold_div_div`, [ + value("f64", -286552397862963300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010211980370639414), + value("f64", 28764586483324010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/float_exprs.wast:1713 +assert_return( + () => invoke($68, `f64.no_fold_div_div`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009525735602663874), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050233948816631796), + value("f64", -0.0000000000000000000000000000000000000000028304570228221077), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000006699534674970116), + ], +); + +// ./test/core/float_exprs.wast:1719 +let $69 = instantiate(`(module + (func (export "f32.no_fold_mul_divs") (param $$x f32) (param $$y f32) (param $$z f32) (param $$w f32) (result f32) + (f32.mul (f32.div (local.get $$x) (local.get $$y)) (f32.div (local.get $$z) (local.get $$w)))) + + (func (export "f64.no_fold_mul_divs") (param $$x f64) (param $$y f64) (param $$z f64) (param $$w f64) (result f64) + (f64.mul (f64.div (local.get $$x) (local.get $$y)) (f64.div (local.get $$z) (local.get $$w)))) +)`); + +// ./test/core/float_exprs.wast:1727 +assert_return( + () => invoke($69, `f32.no_fold_mul_divs`, [ + value("f32", -0.0000000000000000000000000000000027234733), + value("f32", 0.0000000000000000000000000003897843), + value("f32", 0.000000000000000000000000004847123), + value("f32", -25.357775), + ]), + [value("f32", 0.0000000000000000000000000000000013355855)], +); + +// ./test/core/float_exprs.wast:1728 +assert_return( + () => invoke($69, `f32.no_fold_mul_divs`, [ + value("f32", -5372844000000000000000000000000), + value("f32", 38340910), + value("f32", 0.000014973162), + value("f32", 0.19213825), + ]), + [value("f32", -10920475000000000000)], +); + +// ./test/core/float_exprs.wast:1729 +assert_return( + () => invoke($69, `f32.no_fold_mul_divs`, [ + value("f32", -16085042000), + value("f32", -1092920200000), + value("f32", -869606000), + value("f32", -1201.206), + ]), + [value("f32", 10654.639)], +); + +// ./test/core/float_exprs.wast:1730 +assert_return( + () => invoke($69, `f32.no_fold_mul_divs`, [ + value("f32", -1271223140000000000000000000000000), + value("f32", 0.00000000010768114), + value("f32", 0.000018576271), + value("f32", 492686200000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/float_exprs.wast:1731 +assert_return( + () => invoke($69, `f32.no_fold_mul_divs`, [ + value("f32", 0.00000000000000013783864), + value("f32", -0.000000000000000000065046285), + value("f32", 0.00000000000000000000000000068167684), + value("f32", 0.000000000022892627), + ]), + [value("f32", -0.000000000000063100295)], +); + +// ./test/core/float_exprs.wast:1733 +assert_return( + () => invoke($69, `f64.no_fold_mul_divs`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003466499805233369), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004045567512248635), + value("f64", -646234107060759200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 100455895333540740000000000000000000000000000000000000000), + ]), + [value("f64", -55.12215321310017)], +); + +// ./test/core/float_exprs.wast:1734 +assert_return( + () => invoke($69, `f64.no_fold_mul_divs`, [ + value("f64", -50548839076363250000000000000000000), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022223781649976275), + value("f64", -15029790371100852000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -699412375953812100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/float_exprs.wast:1735 +assert_return( + () => invoke($69, `f64.no_fold_mul_divs`, [ + value("f64", -836111653634494700000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -10029528876067567000000000000000000000000000000000000000000), + value("f64", -0.0000000000000000000000000000000000000000012867801766038772), + value("f64", -42230277746883753000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002540178100556387), + ], +); + +// ./test/core/float_exprs.wast:1736 +assert_return( + () => invoke($69, `f64.no_fold_mul_divs`, [ + value("f64", -1202003211641119300000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004667409771338769), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010888652376540085), + value("f64", 18334948666517216000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:1737 +assert_return( + () => invoke($69, `f64.no_fold_mul_divs`, [ + value("f64", 0.000006331839568840419), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000005544474241905778), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000027822472480359097), + value("f64", -14419321081893022000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022035374770746518), + ], +); + +// ./test/core/float_exprs.wast:1741 +let $70 = instantiate(`(module + (func (export "f32.no_fold_add_divs") (param $$x f32) (param $$y f32) (param $$z f32) (result f32) + (f32.add (f32.div (local.get $$x) (local.get $$z)) (f32.div (local.get $$y) (local.get $$z)))) + + (func (export "f64.no_fold_add_divs") (param $$x f64) (param $$y f64) (param $$z f64) (result f64) + (f64.add (f64.div (local.get $$x) (local.get $$z)) (f64.div (local.get $$y) (local.get $$z)))) +)`); + +// ./test/core/float_exprs.wast:1749 +assert_return( + () => invoke($70, `f32.no_fold_add_divs`, [ + value("f32", 377.3689), + value("f32", -0.040118184), + value("f32", -136292990000000000000000000000000000000), + ]), + [value("f32", -0.0000000000000000000000000000000000027685121)], +); + +// ./test/core/float_exprs.wast:1750 +assert_return( + () => invoke($70, `f32.no_fold_add_divs`, [ + value("f32", -0.00000000000000000018234023), + value("f32", -0.0000000000000033970288), + value("f32", -170996700000000), + ]), + [value("f32", 0.000000000000000000000000000019867115)], +); + +// ./test/core/float_exprs.wast:1751 +assert_return( + () => invoke($70, `f32.no_fold_add_divs`, [ + value("f32", -0.000000000000019672638), + value("f32", 0.00000000000000000006414099), + value("f32", -541989070000000), + ]), + [value("f32", 0.000000000000000000000000000036296997)], +); + +// ./test/core/float_exprs.wast:1752 +assert_return( + () => invoke($70, `f32.no_fold_add_divs`, [ + value("f32", -0.0000000000000000000000000000004038506), + value("f32", 0.000000000000000000000000000003848228), + value("f32", -345237200000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:1753 +assert_return( + () => invoke($70, `f32.no_fold_add_divs`, [ + value("f32", 0.0010934415), + value("f32", 0.20703124), + value("f32", 0.00000000000000000000000000000000000013509784), + ]), + [value("f32", 1540547700000000000000000000000000000)], +); + +// ./test/core/float_exprs.wast:1755 +assert_return( + () => invoke($70, `f64.no_fold_add_divs`, [ + value("f64", -4917019432143760000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 68132156322019020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 26125410100237784000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024196801752520584), + ], +); + +// ./test/core/float_exprs.wast:1756 +assert_return( + () => invoke($70, `f64.no_fold_add_divs`, [ + value("f64", -10206467953224550), + value("f64", 63.422616671746226), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016024747869814892), + ]), + [ + value("f64", 6369190976445851000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1757 +assert_return( + () => invoke($70, `f64.no_fold_add_divs`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015270569633109837), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025755503329232514), + value("f64", 58826939164214920000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:1758 +assert_return( + () => invoke($70, `f64.no_fold_add_divs`, [ + value("f64", 26667964874394640000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -2131569252493657800000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.000000000000000000000000000000000000012377004518680012), + ]), + [ + value("f64", -172217969324625340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1759 +assert_return( + () => invoke($70, `f64.no_fold_add_divs`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012952888377288216), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005808769259900048), + value("f64", 0.0000000000000000000016745741699443756), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007735034106987796), + ], +); + +// ./test/core/float_exprs.wast:1763 +let $71 = instantiate(`(module + (func (export "f32.no_fold_sqrt_square") (param $$x f32) (result f32) + (f32.sqrt (f32.mul (local.get $$x) (local.get $$x)))) + + (func (export "f64.no_fold_sqrt_square") (param $$x f64) (result f64) + (f64.sqrt (f64.mul (local.get $$x) (local.get $$x)))) +)`); + +// ./test/core/float_exprs.wast:1771 +assert_return( + () => invoke($71, `f32.no_fold_sqrt_square`, [ + value("f32", -0.00000000000000000001846), + ]), + [value("f32", 0.00000000000000000001846001)], +); + +// ./test/core/float_exprs.wast:1772 +assert_return( + () => invoke($71, `f32.no_fold_sqrt_square`, [ + value("f32", -0.00000000000000000000017907473), + ]), + [value("f32", 0.00000000000000000000017952678)], +); + +// ./test/core/float_exprs.wast:1773 +assert_return( + () => invoke($71, `f32.no_fold_sqrt_square`, [ + value("f32", -0.00000000000000000000079120785), + ]), + [value("f32", 0.000000000000000000000791442)], +); + +// ./test/core/float_exprs.wast:1774 +assert_return( + () => invoke($71, `f32.no_fold_sqrt_square`, [ + value("f32", 0.000000000000000000000000018012938), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:1775 +assert_return( + () => invoke($71, `f32.no_fold_sqrt_square`, [ + value("f32", 610501970000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/float_exprs.wast:1777 +assert_return( + () => invoke($71, `f64.no_fold_sqrt_square`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006209297167747496), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006209299542179727), + ], +); + +// ./test/core/float_exprs.wast:1778 +assert_return( + () => invoke($71, `f64.no_fold_sqrt_square`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024211175303738945), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024211175303738937), + ], +); + +// ./test/core/float_exprs.wast:1779 +assert_return( + () => invoke($71, `f64.no_fold_sqrt_square`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016460687611875645), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016460687611532367), + ], +); + +// ./test/core/float_exprs.wast:1780 +assert_return( + () => invoke($71, `f64.no_fold_sqrt_square`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003797811613378828), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:1781 +assert_return( + () => invoke($71, `f64.no_fold_sqrt_square`, [ + value("f64", 815808428460559200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/float_exprs.wast:1785 +let $72 = instantiate(`(module + (func (export "f32.no_fold_mul_sqrts") (param $$x f32) (param $$y f32) (result f32) + (f32.mul (f32.sqrt (local.get $$x)) (f32.sqrt (local.get $$y)))) + + (func (export "f64.no_fold_mul_sqrts") (param $$x f64) (param $$y f64) (result f64) + (f64.mul (f64.sqrt (local.get $$x)) (f64.sqrt (local.get $$y)))) +)`); + +// ./test/core/float_exprs.wast:1793 +assert_return( + () => invoke($72, `f32.no_fold_mul_sqrts`, [ + value("f32", 0.000000000000000000000000000000000000043885047), + value("f32", -0.00000000000000000000000011867334), + ]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:1794 +assert_return( + () => invoke($72, `f32.no_fold_mul_sqrts`, [ + value("f32", 0.00000000000000000000000000025365908), + value("f32", 0.00000000041320675), + ]), + [value("f32", 0.00000000000000000032374932)], +); + +// ./test/core/float_exprs.wast:1795 +assert_return( + () => invoke($72, `f32.no_fold_mul_sqrts`, [ + value("f32", 0.0000000000000000000000000042144832), + value("f32", 97.249115), + ]), + [value("f32", 0.00000000000064019905)], +); + +// ./test/core/float_exprs.wast:1796 +assert_return( + () => invoke($72, `f32.no_fold_mul_sqrts`, [ + value("f32", 3724076300000000000000000000000), + value("f32", 0.002944908), + ]), + [value("f32", 104723750000000)], +); + +// ./test/core/float_exprs.wast:1797 +assert_return( + () => invoke($72, `f32.no_fold_mul_sqrts`, [ + value("f32", 0.00000000000000001866056), + value("f32", 0.002111261), + ]), + [value("f32", 0.00000000019848755)], +); + +// ./test/core/float_exprs.wast:1799 +assert_return( + () => invoke($72, `f64.no_fold_mul_sqrts`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012742064369772862), + value("f64", -0.006829962938197246), + ]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:1800 +assert_return( + () => invoke($72, `f64.no_fold_mul_sqrts`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037082569269527534), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047183002857015043), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041829020688865954), + ], +); + +// ./test/core/float_exprs.wast:1801 +assert_return( + () => invoke($72, `f64.no_fold_mul_sqrts`, [ + value("f64", 0.000000000000000000000000002329359505918655), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020743399642806364), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021981545701574452), + ], +); + +// ./test/core/float_exprs.wast:1802 +assert_return( + () => invoke($72, `f64.no_fold_mul_sqrts`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010541899336289437), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000598123819872803), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002511047809129887), + ], +); + +// ./test/core/float_exprs.wast:1803 +assert_return( + () => invoke($72, `f64.no_fold_mul_sqrts`, [ + value("f64", 25589482.717358638), + value("f64", 39138912071199020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 1000771959050695500000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1807 +let $73 = instantiate(`(module + (func (export "f32.no_fold_div_sqrts") (param $$x f32) (param $$y f32) (result f32) + (f32.div (f32.sqrt (local.get $$x)) (f32.sqrt (local.get $$y)))) + + (func (export "f64.no_fold_div_sqrts") (param $$x f64) (param $$y f64) (result f64) + (f64.div (f64.sqrt (local.get $$x)) (f64.sqrt (local.get $$y)))) +)`); + +// ./test/core/float_exprs.wast:1815 +assert_return( + () => invoke($73, `f32.no_fold_div_sqrts`, [ + value("f32", -58545012), + value("f32", -0.000000000000000006443773), + ]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:1816 +assert_return( + () => invoke($73, `f32.no_fold_div_sqrts`, [ + value("f32", 7407384000), + value("f32", 209778930), + ]), + [value("f32", 5.9422584)], +); + +// ./test/core/float_exprs.wast:1817 +assert_return( + () => invoke($73, `f32.no_fold_div_sqrts`, [ + value("f32", 0.0000000000000000000000000000000000013764126), + value("f32", 54692.9), + ]), + [value("f32", 0.0000000000000000000050165927)], +); + +// ./test/core/float_exprs.wast:1818 +assert_return( + () => invoke($73, `f32.no_fold_div_sqrts`, [ + value("f32", 979288960000000000), + value("f32", 0.0000000012643552), + ]), + [value("f32", 27830490000000)], +); + +// ./test/core/float_exprs.wast:1819 +assert_return( + () => invoke($73, `f32.no_fold_div_sqrts`, [ + value("f32", 0.00000000000000000000000000000000029141283), + value("f32", 0.00000000000000000000000000000017928174), + ]), + [value("f32", 0.04031682)], +); + +// ./test/core/float_exprs.wast:1821 +assert_return( + () => invoke($73, `f64.no_fold_div_sqrts`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012206137319883022), + value("f64", -0.000000000000000000000000000000000000000000000000000000008209583449676083), + ]), + [`canonical_nan`], +); + +// ./test/core/float_exprs.wast:1822 +assert_return( + () => invoke($73, `f64.no_fold_div_sqrts`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033818852462305824), + value("f64", 7655783976315048000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021017671425665687), + ], +); + +// ./test/core/float_exprs.wast:1823 +assert_return( + () => invoke($73, `f64.no_fold_div_sqrts`, [ + value("f64", 45963335670647510000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.0000000000000000000000000000000023932467846883046), + ]), + [ + value("f64", 138583660172663150000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1824 +assert_return( + () => invoke($73, `f64.no_fold_div_sqrts`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025327340978668086), + value("f64", 4475305129961258000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023789399141325018), + ], +); + +// ./test/core/float_exprs.wast:1825 +assert_return( + () => invoke($73, `f64.no_fold_div_sqrts`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005103070160197939), + value("f64", 460157669098082500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010530826009924495), + ], +); + +// ./test/core/float_exprs.wast:1829 +let $74 = instantiate(`(module + (func (export "f32.no_fold_mul_sqrt_div") (param $$x f32) (param $$y f32) (result f32) + (f32.div (f32.mul (local.get $$x) (f32.sqrt (local.get $$y))) (local.get $$y))) + + (func (export "f64.no_fold_mul_sqrt_div") (param $$x f64) (param $$y f64) (result f64) + (f64.div (f64.mul (local.get $$x) (f64.sqrt (local.get $$y))) (local.get $$y))) +)`); + +// ./test/core/float_exprs.wast:1837 +assert_return( + () => invoke($74, `f32.no_fold_mul_sqrt_div`, [ + value("f32", -4728556800000000000000000), + value("f32", 8677282000000000000000000000), + ]), + [value("f32", -Infinity)], +); + +// ./test/core/float_exprs.wast:1838 +assert_return( + () => invoke($74, `f32.no_fold_mul_sqrt_div`, [ + value("f32", -0.0000000000000000000000000000000000011776882), + value("f32", 0.000000000000000000000000000009805153), + ]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:1839 +assert_return( + () => invoke($74, `f32.no_fold_mul_sqrt_div`, [ + value("f32", 816717060), + value("f32", 0.000000000000000000000000000000000000003323171), + ]), + [value("f32", 14167568000000000000000000000)], +); + +// ./test/core/float_exprs.wast:1840 +assert_return( + () => invoke($74, `f32.no_fold_mul_sqrt_div`, [ + value("f32", -11932267000000), + value("f32", 8637067000000000000000000000000000), + ]), + [value("f32", -0.00012839255)], +); + +// ./test/core/float_exprs.wast:1841 +assert_return( + () => invoke($74, `f32.no_fold_mul_sqrt_div`, [ + value("f32", -401.0235), + value("f32", 134.33022), + ]), + [value("f32", -34.600548)], +); + +// ./test/core/float_exprs.wast:1843 +assert_return( + () => invoke($74, `f64.no_fold_mul_sqrt_div`, [ + value("f64", 1468134622910490500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 2466074582285183000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/float_exprs.wast:1844 +assert_return( + () => invoke($74, `f64.no_fold_mul_sqrt_div`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017254022016758028), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055835540747130025), + ]), + [value("f64", -0)], +); + +// ./test/core/float_exprs.wast:1845 +assert_return( + () => invoke($74, `f64.no_fold_mul_sqrt_div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016812810256029166), + value("f64", 7362783602442129000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006196112486187196), + ], +); + +// ./test/core/float_exprs.wast:1846 +assert_return( + () => invoke($74, `f64.no_fold_mul_sqrt_div`, [ + value("f64", -10605483729939836000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000622591783694072), + ]), + [ + value("f64", -42503900822233765000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_exprs.wast:1847 +assert_return( + () => invoke($74, `f64.no_fold_mul_sqrt_div`, [ + value("f64", 26336349695373093000000000000000), + value("f64", 30791413285853300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004746142447510695), + ], +); + +// ./test/core/float_exprs.wast:1852 +let $75 = instantiate(`(module + (func (export "f32.no_flush_intermediate_subnormal") (param $$x f32) (param $$y f32) (param $$z f32) (result f32) + (f32.mul (f32.mul (local.get $$x) (local.get $$y)) (local.get $$z))) + + (func (export "f64.no_flush_intermediate_subnormal") (param $$x f64) (param $$y f64) (param $$z f64) (result f64) + (f64.mul (f64.mul (local.get $$x) (local.get $$y)) (local.get $$z))) +)`); + +// ./test/core/float_exprs.wast:1860 +assert_return( + () => invoke($75, `f32.no_flush_intermediate_subnormal`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.00000011920929), + value("f32", 8388608), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/float_exprs.wast:1861 +assert_return( + () => invoke($75, `f64.no_flush_intermediate_subnormal`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.0000000000000002220446049250313), + value("f64", 4503599627370496), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/float_exprs.wast:1866 +let $76 = instantiate(`(module + (func (export "f32.recoding_eq") (param $$x f32) (param $$y f32) (result i32) + (f32.eq (f32.mul (local.get $$x) (local.get $$y)) (local.get $$x))) + + (func (export "f32.recoding_le") (param $$x f32) (param $$y f32) (result i32) + (f32.le (f32.mul (local.get $$x) (local.get $$y)) (local.get $$x))) + + (func (export "f32.recoding_lt") (param $$x f32) (param $$y f32) (result i32) + (f32.lt (f32.mul (local.get $$x) (local.get $$y)) (local.get $$x))) + + (func (export "f64.recoding_eq") (param $$x f64) (param $$y f64) (result i32) + (f64.eq (f64.mul (local.get $$x) (local.get $$y)) (local.get $$x))) + + (func (export "f64.recoding_le") (param $$x f64) (param $$y f64) (result i32) + (f64.le (f64.mul (local.get $$x) (local.get $$y)) (local.get $$x))) + + (func (export "f64.recoding_lt") (param $$x f64) (param $$y f64) (result i32) + (f64.lt (f64.mul (local.get $$x) (local.get $$y)) (local.get $$x))) + + (func (export "recoding_demote") (param $$x f64) (param $$y f32) (result f32) + (f32.mul (f32.demote_f64 (local.get $$x)) (local.get $$y))) +)`); + +// ./test/core/float_exprs.wast:1889 +assert_return( + () => invoke($76, `f32.recoding_eq`, [value("f32", -Infinity), value("f32", 3)]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:1890 +assert_return( + () => invoke($76, `f32.recoding_le`, [value("f32", -Infinity), value("f32", 3)]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:1891 +assert_return( + () => invoke($76, `f32.recoding_lt`, [value("f32", -Infinity), value("f32", 3)]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:1893 +assert_return( + () => invoke($76, `f32.recoding_eq`, [value("f32", 0), value("f32", 1)]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:1894 +assert_return( + () => invoke($76, `f32.recoding_le`, [value("f32", 0), value("f32", 1)]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:1895 +assert_return( + () => invoke($76, `f32.recoding_lt`, [value("f32", 0), value("f32", 1)]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:1897 +assert_return( + () => invoke($76, `f64.recoding_eq`, [value("f64", -Infinity), value("f64", 3)]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:1898 +assert_return( + () => invoke($76, `f64.recoding_le`, [value("f64", -Infinity), value("f64", 3)]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:1899 +assert_return( + () => invoke($76, `f64.recoding_lt`, [value("f64", -Infinity), value("f64", 3)]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:1901 +assert_return( + () => invoke($76, `f64.recoding_eq`, [value("f64", 0), value("f64", 1)]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:1902 +assert_return( + () => invoke($76, `f64.recoding_le`, [value("f64", 0), value("f64", 1)]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:1903 +assert_return( + () => invoke($76, `f64.recoding_lt`, [value("f64", 0), value("f64", 1)]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:1905 +assert_return( + () => invoke($76, `recoding_demote`, [ + value("f64", 0.00000000000000000000000000000000000000023860049081905093), + value("f32", 1221), + ]), + [value("f32", 0.0000000000000000000000000000000000002913312)], +); + +// ./test/core/float_exprs.wast:1910 +let $77 = instantiate(`(module + (func (export "f32.no_extended_precision_div") (param $$x f32) (param $$y f32) (param $$z f32) (result i32) + (f32.eq (f32.div (local.get $$x) (local.get $$y)) (local.get $$z))) + + (func (export "f64.no_extended_precision_div") (param $$x f64) (param $$y f64) (param $$z f64) (result i32) + (f64.eq (f64.div (local.get $$x) (local.get $$y)) (local.get $$z))) +)`); + +// ./test/core/float_exprs.wast:1918 +assert_return( + () => invoke($77, `f32.no_extended_precision_div`, [ + value("f32", 3), + value("f32", 7), + value("f32", 0.42857143), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:1919 +assert_return( + () => invoke($77, `f64.no_extended_precision_div`, [ + value("f64", 3), + value("f64", 7), + value("f64", 0.42857142857142855), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:1926 +let $78 = instantiate(`(module + (func (export "f32.no_distribute_exact") (param $$x f32) (result f32) + (f32.add (f32.mul (f32.const -8.0) (local.get $$x)) (f32.mul (f32.const 8.0) (local.get $$x)))) + + (func (export "f64.no_distribute_exact") (param $$x f64) (result f64) + (f64.add (f64.mul (f64.const -8.0) (local.get $$x)) (f64.mul (f64.const 8.0) (local.get $$x)))) +)`); + +// ./test/core/float_exprs.wast:1934 +assert_return(() => invoke($78, `f32.no_distribute_exact`, [value("f32", -0)]), [value("f32", 0)]); + +// ./test/core/float_exprs.wast:1935 +assert_return(() => invoke($78, `f64.no_distribute_exact`, [value("f64", -0)]), [value("f64", 0)]); + +// ./test/core/float_exprs.wast:1940 +let $79 = instantiate(`(module + (func (export "f32.sqrt") (param f32) (result f32) + (f32.sqrt (local.get 0))) + + (func (export "f32.xkcd_sqrt_2") (param f32) (param f32) (param f32) (param f32) (result f32) + (f32.add (f32.div (local.get 0) (local.get 1)) (f32.div (local.get 2) (f32.sub (local.get 3) (local.get 2))))) + + (func (export "f32.xkcd_sqrt_3") (param f32) (param f32) (param f32) (result f32) + (f32.div (f32.mul (local.get 0) (local.get 1)) (local.get 2))) + + (func (export "f32.xkcd_sqrt_5") (param f32) (param f32) (param f32) (result f32) + (f32.add (f32.div (local.get 0) (local.get 1)) (f32.div (local.get 2) (local.get 0)))) + + (func (export "f32.xkcd_better_sqrt_5") (param f32) (param f32) (param f32) (param f32) (result f32) + (f32.div (f32.add (local.get 0) (f32.mul (local.get 1) (local.get 2))) (f32.sub (local.get 3) (f32.mul (local.get 1) (local.get 2))))) + + (func (export "f64.sqrt") (param f64) (result f64) + (f64.sqrt (local.get 0))) + + (func (export "f64.xkcd_sqrt_2") (param f64) (param f64) (param f64) (param f64) (result f64) + (f64.add (f64.div (local.get 0) (local.get 1)) (f64.div (local.get 2) (f64.sub (local.get 3) (local.get 2))))) + + (func (export "f64.xkcd_sqrt_3") (param f64) (param f64) (param f64) (result f64) + (f64.div (f64.mul (local.get 0) (local.get 1)) (local.get 2))) + + (func (export "f64.xkcd_sqrt_5") (param f64) (param f64) (param f64) (result f64) + (f64.add (f64.div (local.get 0) (local.get 1)) (f64.div (local.get 2) (local.get 0)))) + + (func (export "f64.xkcd_better_sqrt_5") (param f64) (param f64) (param f64) (param f64) (result f64) + (f64.div (f64.add (local.get 0) (f64.mul (local.get 1) (local.get 2))) (f64.sub (local.get 3) (f64.mul (local.get 1) (local.get 2))))) +)`); + +// ./test/core/float_exprs.wast:1972 +assert_return(() => invoke($79, `f32.sqrt`, [value("f32", 2)]), [value("f32", 1.4142135)]); + +// ./test/core/float_exprs.wast:1973 +assert_return( + () => invoke($79, `f32.xkcd_sqrt_2`, [ + value("f32", 3), + value("f32", 5), + value("f32", 3.1415927), + value("f32", 7), + ]), + [value("f32", 1.4142201)], +); + +// ./test/core/float_exprs.wast:1974 +assert_return(() => invoke($79, `f32.sqrt`, [value("f32", 3)]), [value("f32", 1.7320508)]); + +// ./test/core/float_exprs.wast:1975 +assert_return( + () => invoke($79, `f32.xkcd_sqrt_3`, [ + value("f32", 2), + value("f32", 2.7182817), + value("f32", 3.1415927), + ]), + [value("f32", 1.7305119)], +); + +// ./test/core/float_exprs.wast:1976 +assert_return(() => invoke($79, `f32.sqrt`, [value("f32", 5)]), [value("f32", 2.236068)]); + +// ./test/core/float_exprs.wast:1977 +assert_return( + () => invoke($79, `f32.xkcd_sqrt_5`, [ + value("f32", 2), + value("f32", 2.7182817), + value("f32", 3), + ]), + [value("f32", 2.2357588)], +); + +// ./test/core/float_exprs.wast:1978 +assert_return( + () => invoke($79, `f32.xkcd_better_sqrt_5`, [ + value("f32", 13), + value("f32", 4), + value("f32", 3.1415927), + value("f32", 24), + ]), + [value("f32", 2.236068)], +); + +// ./test/core/float_exprs.wast:1980 +assert_return(() => invoke($79, `f64.sqrt`, [value("f64", 2)]), [value("f64", 1.4142135623730951)]); + +// ./test/core/float_exprs.wast:1981 +assert_return( + () => invoke($79, `f64.xkcd_sqrt_2`, [ + value("f64", 3), + value("f64", 5), + value("f64", 3.141592653589793), + value("f64", 7), + ]), + [value("f64", 1.4142200580539208)], +); + +// ./test/core/float_exprs.wast:1982 +assert_return(() => invoke($79, `f64.sqrt`, [value("f64", 3)]), [value("f64", 1.7320508075688772)]); + +// ./test/core/float_exprs.wast:1983 +assert_return( + () => invoke($79, `f64.xkcd_sqrt_3`, [ + value("f64", 2), + value("f64", 2.718281828459045), + value("f64", 3.141592653589793), + ]), + [value("f64", 1.7305119588645301)], +); + +// ./test/core/float_exprs.wast:1984 +assert_return(() => invoke($79, `f64.sqrt`, [value("f64", 5)]), [value("f64", 2.23606797749979)]); + +// ./test/core/float_exprs.wast:1985 +assert_return( + () => invoke($79, `f64.xkcd_sqrt_5`, [ + value("f64", 2), + value("f64", 2.718281828459045), + value("f64", 3), + ]), + [value("f64", 2.2357588823428847)], +); + +// ./test/core/float_exprs.wast:1986 +assert_return( + () => invoke($79, `f64.xkcd_better_sqrt_5`, [ + value("f64", 13), + value("f64", 4), + value("f64", 3.141592653589793), + value("f64", 24), + ]), + [value("f64", 2.2360678094452893)], +); + +// ./test/core/float_exprs.wast:1991 +let $80 = instantiate(`(module + (func (export "f32.compute_radix") (param $$0 f32) (param $$1 f32) (result f32) + (loop $$label$$0 + (br_if $$label$$0 + (f32.eq + (f32.add + (f32.sub + (f32.add + (local.tee $$0 (f32.add (local.get $$0) (local.get $$0))) + (f32.const 1) + ) + (local.get $$0) + ) + (f32.const -1) + ) + (f32.const 0) + ) + ) + ) + (loop $$label$$2 + (br_if $$label$$2 + (f32.ne + (f32.sub + (f32.sub + (f32.add + (local.get $$0) + (local.tee $$1 (f32.add (local.get $$1) (f32.const 1))) + ) + (local.get $$0) + ) + (local.get $$1) + ) + (f32.const 0) + ) + ) + ) + (local.get $$1) + ) + + (func (export "f64.compute_radix") (param $$0 f64) (param $$1 f64) (result f64) + (loop $$label$$0 + (br_if $$label$$0 + (f64.eq + (f64.add + (f64.sub + (f64.add + (local.tee $$0 (f64.add (local.get $$0) (local.get $$0))) + (f64.const 1) + ) + (local.get $$0) + ) + (f64.const -1) + ) + (f64.const 0) + ) + ) + ) + (loop $$label$$2 + (br_if $$label$$2 + (f64.ne + (f64.sub + (f64.sub + (f64.add + (local.get $$0) + (local.tee $$1 (f64.add (local.get $$1) (f64.const 1))) + ) + (local.get $$0) + ) + (local.get $$1) + ) + (f64.const 0) + ) + ) + ) + (local.get $$1) + ) +)`); + +// ./test/core/float_exprs.wast:2069 +assert_return( + () => invoke($80, `f32.compute_radix`, [value("f32", 1), value("f32", 1)]), + [value("f32", 2)], +); + +// ./test/core/float_exprs.wast:2070 +assert_return( + () => invoke($80, `f64.compute_radix`, [value("f64", 1), value("f64", 1)]), + [value("f64", 2)], +); + +// ./test/core/float_exprs.wast:2075 +let $81 = instantiate(`(module + (func (export "f32.no_fold_sub1_mul_add") (param $$x f32) (param $$y f32) (result f32) + (f32.add (f32.mul (f32.sub (local.get $$x) (f32.const 1.0)) (local.get $$y)) (local.get $$y))) + + (func (export "f64.no_fold_sub1_mul_add") (param $$x f64) (param $$y f64) (result f64) + (f64.add (f64.mul (f64.sub (local.get $$x) (f64.const 1.0)) (local.get $$y)) (local.get $$y))) +)`); + +// ./test/core/float_exprs.wast:2083 +assert_return( + () => invoke($81, `f32.no_fold_sub1_mul_add`, [ + value("f32", 0.00000000023283064), + value("f32", 1), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:2084 +assert_return( + () => invoke($81, `f64.no_fold_sub1_mul_add`, [ + value("f64", 0.00000000000000000005421010862427522), + value("f64", 1), + ]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:2089 +let $82 = instantiate(`(module + (func (export "f32.no_fold_add_le_monotonicity") (param $$x f32) (param $$y f32) (param $$z f32) (result i32) + (f32.le (f32.add (local.get $$x) (local.get $$z)) (f32.add (local.get $$y) (local.get $$z)))) + + (func (export "f32.no_fold_add_ge_monotonicity") (param $$x f32) (param $$y f32) (param $$z f32) (result i32) + (f32.ge (f32.add (local.get $$x) (local.get $$z)) (f32.add (local.get $$y) (local.get $$z)))) + + (func (export "f64.no_fold_add_le_monotonicity") (param $$x f64) (param $$y f64) (param $$z f64) (result i32) + (f64.le (f64.add (local.get $$x) (local.get $$z)) (f64.add (local.get $$y) (local.get $$z)))) + + (func (export "f64.no_fold_add_ge_monotonicity") (param $$x f64) (param $$y f64) (param $$z f64) (result i32) + (f64.ge (f64.add (local.get $$x) (local.get $$z)) (f64.add (local.get $$y) (local.get $$z)))) +)`); + +// ./test/core/float_exprs.wast:2103 +assert_return( + () => invoke($82, `f32.no_fold_add_le_monotonicity`, [ + value("f32", 0), + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:2104 +assert_return( + () => invoke($82, `f32.no_fold_add_le_monotonicity`, [ + value("f32", Infinity), + value("f32", -Infinity), + value("f32", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:2105 +assert_return( + () => invoke($82, `f64.no_fold_add_le_monotonicity`, [ + value("f64", 0), + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:2106 +assert_return( + () => invoke($82, `f64.no_fold_add_le_monotonicity`, [ + value("f64", Infinity), + value("f64", -Infinity), + value("f64", Infinity), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:2110 +let $83 = instantiate(`(module + (func (export "f32.not_lt") (param $$x f32) (param $$y f32) (result i32) + (i32.eqz (f32.lt (local.get $$x) (local.get $$y)))) + + (func (export "f32.not_le") (param $$x f32) (param $$y f32) (result i32) + (i32.eqz (f32.le (local.get $$x) (local.get $$y)))) + + (func (export "f32.not_gt") (param $$x f32) (param $$y f32) (result i32) + (i32.eqz (f32.gt (local.get $$x) (local.get $$y)))) + + (func (export "f32.not_ge") (param $$x f32) (param $$y f32) (result i32) + (i32.eqz (f32.ge (local.get $$x) (local.get $$y)))) + + (func (export "f64.not_lt") (param $$x f64) (param $$y f64) (result i32) + (i32.eqz (f64.lt (local.get $$x) (local.get $$y)))) + + (func (export "f64.not_le") (param $$x f64) (param $$y f64) (result i32) + (i32.eqz (f64.le (local.get $$x) (local.get $$y)))) + + (func (export "f64.not_gt") (param $$x f64) (param $$y f64) (result i32) + (i32.eqz (f64.gt (local.get $$x) (local.get $$y)))) + + (func (export "f64.not_ge") (param $$x f64) (param $$y f64) (result i32) + (i32.eqz (f64.ge (local.get $$x) (local.get $$y)))) +)`); + +// ./test/core/float_exprs.wast:2136 +assert_return( + () => invoke($83, `f32.not_lt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:2137 +assert_return( + () => invoke($83, `f32.not_le`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:2138 +assert_return( + () => invoke($83, `f32.not_gt`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:2139 +assert_return( + () => invoke($83, `f32.not_ge`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:2140 +assert_return( + () => invoke($83, `f64.not_lt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:2141 +assert_return( + () => invoke($83, `f64.not_le`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:2142 +assert_return( + () => invoke($83, `f64.not_gt`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:2143 +assert_return( + () => invoke($83, `f64.not_ge`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ]), + [value("i32", 1)], +); + +// ./test/core/float_exprs.wast:2149 +let $84 = instantiate(`(module + (func (export "f32.epsilon") (result f32) + (f32.sub (f32.const 1.0) (f32.mul (f32.const 3.0) (f32.sub (f32.div (f32.const 4.0) (f32.const 3.0)) (f32.const 1.0))))) + + (func (export "f64.epsilon") (result f64) + (f64.sub (f64.const 1.0) (f64.mul (f64.const 3.0) (f64.sub (f64.div (f64.const 4.0) (f64.const 3.0)) (f64.const 1.0))))) +)`); + +// ./test/core/float_exprs.wast:2157 +assert_return(() => invoke($84, `f32.epsilon`, []), [value("f32", -0.00000011920929)]); + +// ./test/core/float_exprs.wast:2158 +assert_return(() => invoke($84, `f64.epsilon`, []), [value("f64", 0.0000000000000002220446049250313)]); + +// ./test/core/float_exprs.wast:2164 +let $85 = instantiate(`(module + (func (export "f32.epsilon") (result f32) + (local $$x f32) + (local $$result f32) + (local.set $$x (f32.const 1)) + (loop $$loop + (br_if $$loop + (f32.gt + (f32.add + (local.tee $$x + (f32.mul + (local.tee $$result (local.get $$x)) + (f32.const 0.5) + ) + ) + (f32.const 1) + ) + (f32.const 1) + ) + ) + ) + (local.get $$result) + ) + + (func (export "f64.epsilon") (result f64) + (local $$x f64) + (local $$result f64) + (local.set $$x (f64.const 1)) + (loop $$loop + (br_if $$loop + (f64.gt + (f64.add + (local.tee $$x + (f64.mul + (local.tee $$result (local.get $$x)) + (f64.const 0.5) + ) + ) + (f64.const 1) + ) + (f64.const 1) + ) + ) + ) + (local.get $$result) + ) +)`); + +// ./test/core/float_exprs.wast:2212 +assert_return(() => invoke($85, `f32.epsilon`, []), [value("f32", 0.00000011920929)]); + +// ./test/core/float_exprs.wast:2213 +assert_return(() => invoke($85, `f64.epsilon`, []), [value("f64", 0.0000000000000002220446049250313)]); + +// ./test/core/float_exprs.wast:2218 +let $86 = instantiate(`(module + (func (export "f32.no_trichotomy_lt") (param $$x f32) (param $$y f32) (result i32) + (i32.or (f32.lt (local.get $$x) (local.get $$y)) (f32.ge (local.get $$x) (local.get $$y)))) + (func (export "f32.no_trichotomy_le") (param $$x f32) (param $$y f32) (result i32) + (i32.or (f32.le (local.get $$x) (local.get $$y)) (f32.gt (local.get $$x) (local.get $$y)))) + (func (export "f32.no_trichotomy_gt") (param $$x f32) (param $$y f32) (result i32) + (i32.or (f32.gt (local.get $$x) (local.get $$y)) (f32.le (local.get $$x) (local.get $$y)))) + (func (export "f32.no_trichotomy_ge") (param $$x f32) (param $$y f32) (result i32) + (i32.or (f32.ge (local.get $$x) (local.get $$y)) (f32.lt (local.get $$x) (local.get $$y)))) + + (func (export "f64.no_trichotomy_lt") (param $$x f64) (param $$y f64) (result i32) + (i32.or (f64.lt (local.get $$x) (local.get $$y)) (f64.ge (local.get $$x) (local.get $$y)))) + (func (export "f64.no_trichotomy_le") (param $$x f64) (param $$y f64) (result i32) + (i32.or (f64.le (local.get $$x) (local.get $$y)) (f64.gt (local.get $$x) (local.get $$y)))) + (func (export "f64.no_trichotomy_gt") (param $$x f64) (param $$y f64) (result i32) + (i32.or (f64.gt (local.get $$x) (local.get $$y)) (f64.le (local.get $$x) (local.get $$y)))) + (func (export "f64.no_trichotomy_ge") (param $$x f64) (param $$y f64) (result i32) + (i32.or (f64.ge (local.get $$x) (local.get $$y)) (f64.lt (local.get $$x) (local.get $$y)))) +)`); + +// ./test/core/float_exprs.wast:2238 +assert_return( + () => invoke($86, `f32.no_trichotomy_lt`, [ + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:2239 +assert_return( + () => invoke($86, `f32.no_trichotomy_le`, [ + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:2240 +assert_return( + () => invoke($86, `f32.no_trichotomy_gt`, [ + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:2241 +assert_return( + () => invoke($86, `f32.no_trichotomy_ge`, [ + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:2242 +assert_return( + () => invoke($86, `f64.no_trichotomy_lt`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:2243 +assert_return( + () => invoke($86, `f64.no_trichotomy_le`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:2244 +assert_return( + () => invoke($86, `f64.no_trichotomy_gt`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:2245 +assert_return( + () => invoke($86, `f64.no_trichotomy_ge`, [ + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [value("i32", 0)], +); + +// ./test/core/float_exprs.wast:2250 +let $87 = instantiate(`(module + (func (export "f32.arithmetic_nan_bitpattern") + (param $$x i32) (param $$y i32) (result i32) + (i32.and (i32.reinterpret_f32 + (f32.div + (f32.reinterpret_i32 (local.get $$x)) + (f32.reinterpret_i32 (local.get $$y)))) + (i32.const 0x7fc00000))) + (func (export "f32.canonical_nan_bitpattern") + (param $$x i32) (param $$y i32) (result i32) + (i32.and (i32.reinterpret_f32 + (f32.div + (f32.reinterpret_i32 (local.get $$x)) + (f32.reinterpret_i32 (local.get $$y)))) + (i32.const 0x7fffffff))) + (func (export "f32.nonarithmetic_nan_bitpattern") + (param $$x i32) (result i32) + (i32.reinterpret_f32 (f32.neg (f32.reinterpret_i32 (local.get $$x))))) + + (func (export "f64.arithmetic_nan_bitpattern") + (param $$x i64) (param $$y i64) (result i64) + (i64.and (i64.reinterpret_f64 + (f64.div + (f64.reinterpret_i64 (local.get $$x)) + (f64.reinterpret_i64 (local.get $$y)))) + (i64.const 0x7ff8000000000000))) + (func (export "f64.canonical_nan_bitpattern") + (param $$x i64) (param $$y i64) (result i64) + (i64.and (i64.reinterpret_f64 + (f64.div + (f64.reinterpret_i64 (local.get $$x)) + (f64.reinterpret_i64 (local.get $$y)))) + (i64.const 0x7fffffffffffffff))) + (func (export "f64.nonarithmetic_nan_bitpattern") + (param $$x i64) (result i64) + (i64.reinterpret_f64 (f64.neg (f64.reinterpret_i64 (local.get $$x))))) + + ;; Versions of no_fold testcases that only care about NaN bitpatterns. + (func (export "f32.no_fold_sub_zero") (param $$x i32) (result i32) + (i32.and (i32.reinterpret_f32 (f32.sub (f32.reinterpret_i32 (local.get $$x)) (f32.const 0.0))) + (i32.const 0x7fc00000))) + (func (export "f32.no_fold_neg0_sub") (param $$x i32) (result i32) + (i32.and (i32.reinterpret_f32 (f32.sub (f32.const -0.0) (f32.reinterpret_i32 (local.get $$x)))) + (i32.const 0x7fc00000))) + (func (export "f32.no_fold_mul_one") (param $$x i32) (result i32) + (i32.and (i32.reinterpret_f32 (f32.mul (f32.reinterpret_i32 (local.get $$x)) (f32.const 1.0))) + (i32.const 0x7fc00000))) + (func (export "f32.no_fold_neg1_mul") (param $$x i32) (result i32) + (i32.and (i32.reinterpret_f32 (f32.mul (f32.const -1.0) (f32.reinterpret_i32 (local.get $$x)))) + (i32.const 0x7fc00000))) + (func (export "f32.no_fold_div_one") (param $$x i32) (result i32) + (i32.and (i32.reinterpret_f32 (f32.div (f32.reinterpret_i32 (local.get $$x)) (f32.const 1.0))) + (i32.const 0x7fc00000))) + (func (export "f32.no_fold_div_neg1") (param $$x i32) (result i32) + (i32.and (i32.reinterpret_f32 (f32.div (f32.reinterpret_i32 (local.get $$x)) (f32.const -1.0))) + (i32.const 0x7fc00000))) + (func (export "f64.no_fold_sub_zero") (param $$x i64) (result i64) + (i64.and (i64.reinterpret_f64 (f64.sub (f64.reinterpret_i64 (local.get $$x)) (f64.const 0.0))) + (i64.const 0x7ff8000000000000))) + (func (export "f64.no_fold_neg0_sub") (param $$x i64) (result i64) + (i64.and (i64.reinterpret_f64 (f64.sub (f64.const -0.0) (f64.reinterpret_i64 (local.get $$x)))) + (i64.const 0x7ff8000000000000))) + (func (export "f64.no_fold_mul_one") (param $$x i64) (result i64) + (i64.and (i64.reinterpret_f64 (f64.mul (f64.reinterpret_i64 (local.get $$x)) (f64.const 1.0))) + (i64.const 0x7ff8000000000000))) + (func (export "f64.no_fold_neg1_mul") (param $$x i64) (result i64) + (i64.and (i64.reinterpret_f64 (f64.mul (f64.const -1.0) (f64.reinterpret_i64 (local.get $$x)))) + (i64.const 0x7ff8000000000000))) + (func (export "f64.no_fold_div_one") (param $$x i64) (result i64) + (i64.and (i64.reinterpret_f64 (f64.div (f64.reinterpret_i64 (local.get $$x)) (f64.const 1.0))) + (i64.const 0x7ff8000000000000))) + (func (export "f64.no_fold_div_neg1") (param $$x i64) (result i64) + (i64.and (i64.reinterpret_f64 (f64.div (f64.reinterpret_i64 (local.get $$x)) (f64.const -1.0))) + (i64.const 0x7ff8000000000000))) + (func (export "no_fold_promote_demote") (param $$x i32) (result i32) + (i32.and (i32.reinterpret_f32 (f32.demote_f64 (f64.promote_f32 (f32.reinterpret_i32 (local.get $$x))))) + (i32.const 0x7fc00000))) +)`); + +// ./test/core/float_exprs.wast:2329 +assert_return( + () => invoke($87, `f32.arithmetic_nan_bitpattern`, [2139107856, 2139107856]), + [value("i32", 2143289344)], +); + +// ./test/core/float_exprs.wast:2330 +assert_return(() => invoke($87, `f32.canonical_nan_bitpattern`, [0, 0]), [value("i32", 2143289344)]); + +// ./test/core/float_exprs.wast:2331 +assert_return( + () => invoke($87, `f32.canonical_nan_bitpattern`, [2143289344, 2143289344]), + [value("i32", 2143289344)], +); + +// ./test/core/float_exprs.wast:2332 +assert_return( + () => invoke($87, `f32.canonical_nan_bitpattern`, [-4194304, 2143289344]), + [value("i32", 2143289344)], +); + +// ./test/core/float_exprs.wast:2333 +assert_return( + () => invoke($87, `f32.canonical_nan_bitpattern`, [2143289344, -4194304]), + [value("i32", 2143289344)], +); + +// ./test/core/float_exprs.wast:2334 +assert_return( + () => invoke($87, `f32.canonical_nan_bitpattern`, [-4194304, -4194304]), + [value("i32", 2143289344)], +); + +// ./test/core/float_exprs.wast:2335 +assert_return( + () => invoke($87, `f32.nonarithmetic_nan_bitpattern`, [2143302160]), + [value("i32", -4181488)], +); + +// ./test/core/float_exprs.wast:2336 +assert_return( + () => invoke($87, `f32.nonarithmetic_nan_bitpattern`, [-4181488]), + [value("i32", 2143302160)], +); + +// ./test/core/float_exprs.wast:2337 +assert_return( + () => invoke($87, `f32.nonarithmetic_nan_bitpattern`, [2139107856]), + [value("i32", -8375792)], +); + +// ./test/core/float_exprs.wast:2338 +assert_return( + () => invoke($87, `f32.nonarithmetic_nan_bitpattern`, [-8375792]), + [value("i32", 2139107856)], +); + +// ./test/core/float_exprs.wast:2339 +assert_return( + () => invoke($87, `f64.arithmetic_nan_bitpattern`, [ + 9218868437227418128n, + 9218868437227418128n, + ]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/float_exprs.wast:2340 +assert_return( + () => invoke($87, `f64.canonical_nan_bitpattern`, [0n, 0n]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/float_exprs.wast:2341 +assert_return( + () => invoke($87, `f64.canonical_nan_bitpattern`, [ + 9221120237041090560n, + 9221120237041090560n, + ]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/float_exprs.wast:2342 +assert_return( + () => invoke($87, `f64.canonical_nan_bitpattern`, [ + -2251799813685248n, + 9221120237041090560n, + ]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/float_exprs.wast:2343 +assert_return( + () => invoke($87, `f64.canonical_nan_bitpattern`, [ + 9221120237041090560n, + -2251799813685248n, + ]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/float_exprs.wast:2344 +assert_return( + () => invoke($87, `f64.canonical_nan_bitpattern`, [ + -2251799813685248n, + -2251799813685248n, + ]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/float_exprs.wast:2345 +assert_return( + () => invoke($87, `f64.nonarithmetic_nan_bitpattern`, [9221120237041103376n]), + [value("i64", -2251799813672432n)], +); + +// ./test/core/float_exprs.wast:2346 +assert_return( + () => invoke($87, `f64.nonarithmetic_nan_bitpattern`, [-2251799813672432n]), + [value("i64", 9221120237041103376n)], +); + +// ./test/core/float_exprs.wast:2347 +assert_return( + () => invoke($87, `f64.nonarithmetic_nan_bitpattern`, [9218868437227418128n]), + [value("i64", -4503599627357680n)], +); + +// ./test/core/float_exprs.wast:2348 +assert_return( + () => invoke($87, `f64.nonarithmetic_nan_bitpattern`, [-4503599627357680n]), + [value("i64", 9218868437227418128n)], +); + +// ./test/core/float_exprs.wast:2349 +assert_return(() => invoke($87, `f32.no_fold_sub_zero`, [2141192192]), [value("i32", 2143289344)]); + +// ./test/core/float_exprs.wast:2350 +assert_return(() => invoke($87, `f32.no_fold_neg0_sub`, [2141192192]), [value("i32", 2143289344)]); + +// ./test/core/float_exprs.wast:2351 +assert_return(() => invoke($87, `f32.no_fold_mul_one`, [2141192192]), [value("i32", 2143289344)]); + +// ./test/core/float_exprs.wast:2352 +assert_return(() => invoke($87, `f32.no_fold_neg1_mul`, [2141192192]), [value("i32", 2143289344)]); + +// ./test/core/float_exprs.wast:2353 +assert_return(() => invoke($87, `f32.no_fold_div_one`, [2141192192]), [value("i32", 2143289344)]); + +// ./test/core/float_exprs.wast:2354 +assert_return(() => invoke($87, `f32.no_fold_div_neg1`, [2141192192]), [value("i32", 2143289344)]); + +// ./test/core/float_exprs.wast:2355 +assert_return( + () => invoke($87, `f64.no_fold_sub_zero`, [9219994337134247936n]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/float_exprs.wast:2356 +assert_return( + () => invoke($87, `f64.no_fold_neg0_sub`, [9219994337134247936n]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/float_exprs.wast:2357 +assert_return( + () => invoke($87, `f64.no_fold_mul_one`, [9219994337134247936n]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/float_exprs.wast:2358 +assert_return( + () => invoke($87, `f64.no_fold_neg1_mul`, [9219994337134247936n]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/float_exprs.wast:2359 +assert_return( + () => invoke($87, `f64.no_fold_div_one`, [9219994337134247936n]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/float_exprs.wast:2360 +assert_return( + () => invoke($87, `f64.no_fold_div_neg1`, [9219994337134247936n]), + [value("i64", 9221120237041090560n)], +); + +// ./test/core/float_exprs.wast:2361 +assert_return(() => invoke($87, `no_fold_promote_demote`, [2141192192]), [value("i32", 2143289344)]); + +// ./test/core/float_exprs.wast:2366 +let $88 = instantiate(`(module + (func (export "dot_product_example") + (param $$x0 f64) (param $$x1 f64) (param $$x2 f64) (param $$x3 f64) + (param $$y0 f64) (param $$y1 f64) (param $$y2 f64) (param $$y3 f64) + (result f64) + (f64.add (f64.add (f64.add + (f64.mul (local.get $$x0) (local.get $$y0)) + (f64.mul (local.get $$x1) (local.get $$y1))) + (f64.mul (local.get $$x2) (local.get $$y2))) + (f64.mul (local.get $$x3) (local.get $$y3))) + ) + + (func (export "with_binary_sum_collapse") + (param $$x0 f64) (param $$x1 f64) (param $$x2 f64) (param $$x3 f64) + (param $$y0 f64) (param $$y1 f64) (param $$y2 f64) (param $$y3 f64) + (result f64) + (f64.add (f64.add (f64.mul (local.get $$x0) (local.get $$y0)) + (f64.mul (local.get $$x1) (local.get $$y1))) + (f64.add (f64.mul (local.get $$x2) (local.get $$y2)) + (f64.mul (local.get $$x3) (local.get $$y3)))) + ) +)`); + +// ./test/core/float_exprs.wast:2389 +assert_return( + () => invoke($88, `dot_product_example`, [ + value("f64", 32000000), + value("f64", 1), + value("f64", -1), + value("f64", 80000000), + value("f64", 40000000), + value("f64", 1), + value("f64", -1), + value("f64", -16000000), + ]), + [value("f64", 2)], +); + +// ./test/core/float_exprs.wast:2393 +assert_return( + () => invoke($88, `with_binary_sum_collapse`, [ + value("f64", 32000000), + value("f64", 1), + value("f64", -1), + value("f64", 80000000), + value("f64", 40000000), + value("f64", 1), + value("f64", -1), + value("f64", -16000000), + ]), + [value("f64", 2)], +); + +// ./test/core/float_exprs.wast:2400 +let $89 = instantiate(`(module + (func (export "f32.contract2fma") + (param $$x f32) (param $$y f32) (result f32) + (f32.sqrt (f32.sub (f32.mul (local.get $$x) (local.get $$x)) + (f32.mul (local.get $$y) (local.get $$y))))) + (func (export "f64.contract2fma") + (param $$x f64) (param $$y f64) (result f64) + (f64.sqrt (f64.sub (f64.mul (local.get $$x) (local.get $$x)) + (f64.mul (local.get $$y) (local.get $$y))))) +)`); + +// ./test/core/float_exprs.wast:2411 +assert_return( + () => invoke($89, `f32.contract2fma`, [value("f32", 1), value("f32", 1)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:2412 +assert_return( + () => invoke($89, `f32.contract2fma`, [value("f32", 1.1), value("f32", 1.1)]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:2413 +assert_return( + () => invoke($89, `f32.contract2fma`, [ + value("f32", 1.1999999), + value("f32", 1.1999999), + ]), + [value("f32", 0)], +); + +// ./test/core/float_exprs.wast:2414 +assert_return( + () => invoke($89, `f64.contract2fma`, [value("f64", 1), value("f64", 1)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:2415 +assert_return( + () => invoke($89, `f64.contract2fma`, [value("f64", 1.1), value("f64", 1.1)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:2416 +assert_return( + () => invoke($89, `f64.contract2fma`, [value("f64", 1.2), value("f64", 1.2)]), + [value("f64", 0)], +); + +// ./test/core/float_exprs.wast:2421 +let $90 = instantiate(`(module + (func (export "f32.division_by_small_number") + (param $$a f32) (param $$b f32) (param $$c f32) (result f32) + (f32.sub (local.get $$a) (f32.div (local.get $$b) (local.get $$c)))) + (func (export "f64.division_by_small_number") + (param $$a f64) (param $$b f64) (param $$c f64) (result f64) + (f64.sub (local.get $$a) (f64.div (local.get $$b) (local.get $$c)))) +)`); + +// ./test/core/float_exprs.wast:2430 +assert_return( + () => invoke($90, `f32.division_by_small_number`, [ + value("f32", 112000000), + value("f32", 100000), + value("f32", 0.0009), + ]), + [value("f32", 888888)], +); + +// ./test/core/float_exprs.wast:2431 +assert_return( + () => invoke($90, `f64.division_by_small_number`, [ + value("f64", 112000000), + value("f64", 100000), + value("f64", 0.0009), + ]), + [value("f64", 888888.8888888806)], +); + +// ./test/core/float_exprs.wast:2436 +let $91 = instantiate(`(module + (func (export "f32.golden_ratio") (param $$a f32) (param $$b f32) (param $$c f32) (result f32) + (f32.mul (local.get 0) (f32.add (local.get 1) (f32.sqrt (local.get 2))))) + (func (export "f64.golden_ratio") (param $$a f64) (param $$b f64) (param $$c f64) (result f64) + (f64.mul (local.get 0) (f64.add (local.get 1) (f64.sqrt (local.get 2))))) +)`); + +// ./test/core/float_exprs.wast:2443 +assert_return( + () => invoke($91, `f32.golden_ratio`, [ + value("f32", 0.5), + value("f32", 1), + value("f32", 5), + ]), + [value("f32", 1.618034)], +); + +// ./test/core/float_exprs.wast:2444 +assert_return( + () => invoke($91, `f64.golden_ratio`, [ + value("f64", 0.5), + value("f64", 1), + value("f64", 5), + ]), + [value("f64", 1.618033988749895)], +); + +// ./test/core/float_exprs.wast:2449 +let $92 = instantiate(`(module + (func (export "f32.silver_means") (param $$n f32) (result f32) + (f32.mul (f32.const 0.5) + (f32.add (local.get $$n) + (f32.sqrt (f32.add (f32.mul (local.get $$n) (local.get $$n)) + (f32.const 4.0)))))) + (func (export "f64.silver_means") (param $$n f64) (result f64) + (f64.mul (f64.const 0.5) + (f64.add (local.get $$n) + (f64.sqrt (f64.add (f64.mul (local.get $$n) (local.get $$n)) + (f64.const 4.0)))))) +)`); + +// ./test/core/float_exprs.wast:2462 +assert_return(() => invoke($92, `f32.silver_means`, [value("f32", 0)]), [value("f32", 1)]); + +// ./test/core/float_exprs.wast:2463 +assert_return(() => invoke($92, `f32.silver_means`, [value("f32", 1)]), [value("f32", 1.618034)]); + +// ./test/core/float_exprs.wast:2464 +assert_return(() => invoke($92, `f32.silver_means`, [value("f32", 2)]), [value("f32", 2.4142137)]); + +// ./test/core/float_exprs.wast:2465 +assert_return(() => invoke($92, `f32.silver_means`, [value("f32", 3)]), [value("f32", 3.3027756)]); + +// ./test/core/float_exprs.wast:2466 +assert_return(() => invoke($92, `f32.silver_means`, [value("f32", 4)]), [value("f32", 4.236068)]); + +// ./test/core/float_exprs.wast:2467 +assert_return(() => invoke($92, `f32.silver_means`, [value("f32", 5)]), [value("f32", 5.192582)]); + +// ./test/core/float_exprs.wast:2468 +assert_return(() => invoke($92, `f64.silver_means`, [value("f64", 0)]), [value("f64", 1)]); + +// ./test/core/float_exprs.wast:2469 +assert_return( + () => invoke($92, `f64.silver_means`, [value("f64", 1)]), + [value("f64", 1.618033988749895)], +); + +// ./test/core/float_exprs.wast:2470 +assert_return( + () => invoke($92, `f64.silver_means`, [value("f64", 2)]), + [value("f64", 2.414213562373095)], +); + +// ./test/core/float_exprs.wast:2471 +assert_return( + () => invoke($92, `f64.silver_means`, [value("f64", 3)]), + [value("f64", 3.302775637731995)], +); + +// ./test/core/float_exprs.wast:2472 +assert_return( + () => invoke($92, `f64.silver_means`, [value("f64", 4)]), + [value("f64", 4.23606797749979)], +); + +// ./test/core/float_exprs.wast:2473 +assert_return( + () => invoke($92, `f64.silver_means`, [value("f64", 5)]), + [value("f64", 5.192582403567252)], +); + +// ./test/core/float_exprs.wast:2478 +let $93 = instantiate(`(module + (func (export "point_four") (param $$four f64) (param $$ten f64) (result i32) + (f64.lt (f64.div (local.get $$four) (local.get $$ten)) (f64.const 0.4))) +)`); + +// ./test/core/float_exprs.wast:2483 +assert_return(() => invoke($93, `point_four`, [value("f64", 4), value("f64", 10)]), [value("i32", 0)]); + +// ./test/core/float_exprs.wast:2488 +let $94 = instantiate(`(module + (func (export "tau") (param i32) (result f64) + (local f64 f64 f64 f64) + f64.const 0x0p+0 + local.set 1 + block + local.get 0 + i32.const 1 + i32.lt_s + br_if 0 + f64.const 0x1p+0 + local.set 2 + f64.const 0x0p+0 + local.set 3 + loop + local.get 1 + local.get 2 + f64.const 0x1p+3 + local.get 3 + f64.const 0x1p+3 + f64.mul + local.tee 4 + f64.const 0x1p+0 + f64.add + f64.div + f64.const 0x1p+2 + local.get 4 + f64.const 0x1p+2 + f64.add + f64.div + f64.sub + f64.const 0x1p+1 + local.get 4 + f64.const 0x1.4p+2 + f64.add + f64.div + f64.sub + f64.const 0x1p+1 + local.get 4 + f64.const 0x1.8p+2 + f64.add + f64.div + f64.sub + f64.mul + f64.add + local.set 1 + local.get 3 + f64.const 0x1p+0 + f64.add + local.set 3 + local.get 2 + f64.const 0x1p-4 + f64.mul + local.set 2 + local.get 0 + i32.const -1 + i32.add + local.tee 0 + br_if 0 + end + end + local.get 1 + ) +)`); + +// ./test/core/float_exprs.wast:2553 +assert_return(() => invoke($94, `tau`, [10]), [value("f64", 6.283185307179583)]); + +// ./test/core/float_exprs.wast:2554 +assert_return(() => invoke($94, `tau`, [11]), [value("f64", 6.283185307179586)]); + +// ./test/core/float_exprs.wast:2558 +let $95 = instantiate(`(module + (func (export "f32.no_fold_conditional_inc") (param $$x f32) (param $$y f32) (result f32) + (select (local.get $$x) + (f32.add (local.get $$x) (f32.const 1.0)) + (f32.lt (local.get $$y) (f32.const 0.0)))) + (func (export "f64.no_fold_conditional_inc") (param $$x f64) (param $$y f64) (result f64) + (select (local.get $$x) + (f64.add (local.get $$x) (f64.const 1.0)) + (f64.lt (local.get $$y) (f64.const 0.0)))) +)`); + +// ./test/core/float_exprs.wast:2569 +assert_return( + () => invoke($95, `f32.no_fold_conditional_inc`, [value("f32", -0), value("f32", -1)]), + [value("f32", -0)], +); + +// ./test/core/float_exprs.wast:2570 +assert_return( + () => invoke($95, `f64.no_fold_conditional_inc`, [value("f64", -0), value("f64", -1)]), + [value("f64", -0)], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/float_literals.wast.js b/js/src/jit-test/tests/wasm/spec/spec/float_literals.wast.js new file mode 100644 index 0000000000..c4067bf4f1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/float_literals.wast.js @@ -0,0 +1,764 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/float_literals.wast + +// ./test/core/float_literals.wast:3 +let $0 = instantiate(`(module + ;; f32 special values + (func (export "f32.nan") (result i32) (i32.reinterpret_f32 (f32.const nan))) + (func (export "f32.positive_nan") (result i32) (i32.reinterpret_f32 (f32.const +nan))) + (func (export "f32.negative_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan))) + (func (export "f32.plain_nan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x400000))) + (func (export "f32.informally_known_as_plain_snan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x200000))) + (func (export "f32.all_ones_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan:0x7fffff))) + (func (export "f32.misc_nan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x012345))) + (func (export "f32.misc_positive_nan") (result i32) (i32.reinterpret_f32 (f32.const +nan:0x304050))) + (func (export "f32.misc_negative_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan:0x2abcde))) + (func (export "f32.infinity") (result i32) (i32.reinterpret_f32 (f32.const inf))) + (func (export "f32.positive_infinity") (result i32) (i32.reinterpret_f32 (f32.const +inf))) + (func (export "f32.negative_infinity") (result i32) (i32.reinterpret_f32 (f32.const -inf))) + + ;; f32 numbers + (func (export "f32.zero") (result i32) (i32.reinterpret_f32 (f32.const 0x0.0p0))) + (func (export "f32.positive_zero") (result i32) (i32.reinterpret_f32 (f32.const +0x0.0p0))) + (func (export "f32.negative_zero") (result i32) (i32.reinterpret_f32 (f32.const -0x0.0p0))) + (func (export "f32.misc") (result i32) (i32.reinterpret_f32 (f32.const 0x1.921fb6p+2))) + (func (export "f32.min_positive") (result i32) (i32.reinterpret_f32 (f32.const 0x1p-149))) + (func (export "f32.min_normal") (result i32) (i32.reinterpret_f32 (f32.const 0x1p-126))) + (func (export "f32.max_finite") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffep+127))) + (func (export "f32.max_subnormal") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffcp-127))) + (func (export "f32.trailing_dot") (result i32) (i32.reinterpret_f32 (f32.const 0x1.p10))) + + ;; f32 in decimal format + (func (export "f32_dec.zero") (result i32) (i32.reinterpret_f32 (f32.const 0.0e0))) + (func (export "f32_dec.positive_zero") (result i32) (i32.reinterpret_f32 (f32.const +0.0e0))) + (func (export "f32_dec.negative_zero") (result i32) (i32.reinterpret_f32 (f32.const -0.0e0))) + (func (export "f32_dec.misc") (result i32) (i32.reinterpret_f32 (f32.const 6.28318548202514648))) + (func (export "f32_dec.min_positive") (result i32) (i32.reinterpret_f32 (f32.const 1.4013e-45))) + (func (export "f32_dec.min_normal") (result i32) (i32.reinterpret_f32 (f32.const 1.1754944e-38))) + (func (export "f32_dec.max_subnormal") (result i32) (i32.reinterpret_f32 (f32.const 1.1754942e-38))) + (func (export "f32_dec.max_finite") (result i32) (i32.reinterpret_f32 (f32.const 3.4028234e+38))) + (func (export "f32_dec.trailing_dot") (result i32) (i32.reinterpret_f32 (f32.const 1.e10))) + + ;; https://twitter.com/Archivd/status/994637336506912768 + (func (export "f32_dec.root_beer_float") (result i32) (i32.reinterpret_f32 (f32.const 1.000000119))) + + ;; f64 special values + (func (export "f64.nan") (result i64) (i64.reinterpret_f64 (f64.const nan))) + (func (export "f64.positive_nan") (result i64) (i64.reinterpret_f64 (f64.const +nan))) + (func (export "f64.negative_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan))) + (func (export "f64.plain_nan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x8000000000000))) + (func (export "f64.informally_known_as_plain_snan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x4000000000000))) + (func (export "f64.all_ones_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan:0xfffffffffffff))) + (func (export "f64.misc_nan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x0123456789abc))) + (func (export "f64.misc_positive_nan") (result i64) (i64.reinterpret_f64 (f64.const +nan:0x3040506070809))) + (func (export "f64.misc_negative_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan:0x2abcdef012345))) + (func (export "f64.infinity") (result i64) (i64.reinterpret_f64 (f64.const inf))) + (func (export "f64.positive_infinity") (result i64) (i64.reinterpret_f64 (f64.const +inf))) + (func (export "f64.negative_infinity") (result i64) (i64.reinterpret_f64 (f64.const -inf))) + + ;; f64 numbers + (func (export "f64.zero") (result i64) (i64.reinterpret_f64 (f64.const 0x0.0p0))) + (func (export "f64.positive_zero") (result i64) (i64.reinterpret_f64 (f64.const +0x0.0p0))) + (func (export "f64.negative_zero") (result i64) (i64.reinterpret_f64 (f64.const -0x0.0p0))) + (func (export "f64.misc") (result i64) (i64.reinterpret_f64 (f64.const 0x1.921fb54442d18p+2))) + (func (export "f64.min_positive") (result i64) (i64.reinterpret_f64 (f64.const 0x0.0000000000001p-1022))) + (func (export "f64.min_normal") (result i64) (i64.reinterpret_f64 (f64.const 0x1p-1022))) + (func (export "f64.max_subnormal") (result i64) (i64.reinterpret_f64 (f64.const 0x0.fffffffffffffp-1022))) + (func (export "f64.max_finite") (result i64) (i64.reinterpret_f64 (f64.const 0x1.fffffffffffffp+1023))) + (func (export "f64.trailing_dot") (result i64) (i64.reinterpret_f64 (f64.const 0x1.p100))) + + ;; f64 numbers in decimal format + (func (export "f64_dec.zero") (result i64) (i64.reinterpret_f64 (f64.const 0.0e0))) + (func (export "f64_dec.positive_zero") (result i64) (i64.reinterpret_f64 (f64.const +0.0e0))) + (func (export "f64_dec.negative_zero") (result i64) (i64.reinterpret_f64 (f64.const -0.0e0))) + (func (export "f64_dec.misc") (result i64) (i64.reinterpret_f64 (f64.const 6.28318530717958623))) + (func (export "f64_dec.min_positive") (result i64) (i64.reinterpret_f64 (f64.const 4.94066e-324))) + (func (export "f64_dec.min_normal") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072012e-308))) + (func (export "f64_dec.max_subnormal") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072011e-308))) + (func (export "f64_dec.max_finite") (result i64) (i64.reinterpret_f64 (f64.const 1.7976931348623157e+308))) + (func (export "f64_dec.trailing_dot") (result i64) (i64.reinterpret_f64 (f64.const 1.e100))) + + ;; https://twitter.com/Archivd/status/994637336506912768 + (func (export "f64_dec.root_beer_float") (result i64) (i64.reinterpret_f64 (f64.const 1.000000119))) + + (func (export "f32-dec-sep1") (result f32) (f32.const 1_000_000)) + (func (export "f32-dec-sep2") (result f32) (f32.const 1_0_0_0)) + (func (export "f32-dec-sep3") (result f32) (f32.const 100_3.141_592)) + (func (export "f32-dec-sep4") (result f32) (f32.const 99e+1_3)) + (func (export "f32-dec-sep5") (result f32) (f32.const 122_000.11_3_54E0_2_3)) + (func (export "f32-hex-sep1") (result f32) (f32.const 0xa_0f_00_99)) + (func (export "f32-hex-sep2") (result f32) (f32.const 0x1_a_A_0_f)) + (func (export "f32-hex-sep3") (result f32) (f32.const 0xa0_ff.f141_a59a)) + (func (export "f32-hex-sep4") (result f32) (f32.const 0xf0P+1_3)) + (func (export "f32-hex-sep5") (result f32) (f32.const 0x2a_f00a.1f_3_eep2_3)) + + (func (export "f64-dec-sep1") (result f64) (f64.const 1_000_000)) + (func (export "f64-dec-sep2") (result f64) (f64.const 1_0_0_0)) + (func (export "f64-dec-sep3") (result f64) (f64.const 100_3.141_592)) + (func (export "f64-dec-sep4") (result f64) (f64.const 99e-1_23)) + (func (export "f64-dec-sep5") (result f64) (f64.const 122_000.11_3_54e0_2_3)) + (func (export "f64-hex-sep1") (result f64) (f64.const 0xa_f00f_0000_9999)) + (func (export "f64-hex-sep2") (result f64) (f64.const 0x1_a_A_0_f)) + (func (export "f64-hex-sep3") (result f64) (f64.const 0xa0_ff.f141_a59a)) + (func (export "f64-hex-sep4") (result f64) (f64.const 0xf0P+1_3)) + (func (export "f64-hex-sep5") (result f64) (f64.const 0x2a_f00a.1f_3_eep2_3)) +)`); + +// ./test/core/float_literals.wast:105 +assert_return(() => invoke($0, `f32.nan`, []), [value("i32", 2143289344)]); + +// ./test/core/float_literals.wast:106 +assert_return(() => invoke($0, `f32.positive_nan`, []), [value("i32", 2143289344)]); + +// ./test/core/float_literals.wast:107 +assert_return(() => invoke($0, `f32.negative_nan`, []), [value("i32", -4194304)]); + +// ./test/core/float_literals.wast:108 +assert_return(() => invoke($0, `f32.plain_nan`, []), [value("i32", 2143289344)]); + +// ./test/core/float_literals.wast:109 +assert_return(() => invoke($0, `f32.informally_known_as_plain_snan`, []), [value("i32", 2141192192)]); + +// ./test/core/float_literals.wast:110 +assert_return(() => invoke($0, `f32.all_ones_nan`, []), [value("i32", -1)]); + +// ./test/core/float_literals.wast:111 +assert_return(() => invoke($0, `f32.misc_nan`, []), [value("i32", 2139169605)]); + +// ./test/core/float_literals.wast:112 +assert_return(() => invoke($0, `f32.misc_positive_nan`, []), [value("i32", 2142257232)]); + +// ./test/core/float_literals.wast:113 +assert_return(() => invoke($0, `f32.misc_negative_nan`, []), [value("i32", -5587746)]); + +// ./test/core/float_literals.wast:114 +assert_return(() => invoke($0, `f32.infinity`, []), [value("i32", 2139095040)]); + +// ./test/core/float_literals.wast:115 +assert_return(() => invoke($0, `f32.positive_infinity`, []), [value("i32", 2139095040)]); + +// ./test/core/float_literals.wast:116 +assert_return(() => invoke($0, `f32.negative_infinity`, []), [value("i32", -8388608)]); + +// ./test/core/float_literals.wast:117 +assert_return(() => invoke($0, `f32.zero`, []), [value("i32", 0)]); + +// ./test/core/float_literals.wast:118 +assert_return(() => invoke($0, `f32.positive_zero`, []), [value("i32", 0)]); + +// ./test/core/float_literals.wast:119 +assert_return(() => invoke($0, `f32.negative_zero`, []), [value("i32", -2147483648)]); + +// ./test/core/float_literals.wast:120 +assert_return(() => invoke($0, `f32.misc`, []), [value("i32", 1086918619)]); + +// ./test/core/float_literals.wast:121 +assert_return(() => invoke($0, `f32.min_positive`, []), [value("i32", 1)]); + +// ./test/core/float_literals.wast:122 +assert_return(() => invoke($0, `f32.min_normal`, []), [value("i32", 8388608)]); + +// ./test/core/float_literals.wast:123 +assert_return(() => invoke($0, `f32.max_subnormal`, []), [value("i32", 8388607)]); + +// ./test/core/float_literals.wast:124 +assert_return(() => invoke($0, `f32.max_finite`, []), [value("i32", 2139095039)]); + +// ./test/core/float_literals.wast:125 +assert_return(() => invoke($0, `f32.trailing_dot`, []), [value("i32", 1149239296)]); + +// ./test/core/float_literals.wast:126 +assert_return(() => invoke($0, `f32_dec.zero`, []), [value("i32", 0)]); + +// ./test/core/float_literals.wast:127 +assert_return(() => invoke($0, `f32_dec.positive_zero`, []), [value("i32", 0)]); + +// ./test/core/float_literals.wast:128 +assert_return(() => invoke($0, `f32_dec.negative_zero`, []), [value("i32", -2147483648)]); + +// ./test/core/float_literals.wast:129 +assert_return(() => invoke($0, `f32_dec.misc`, []), [value("i32", 1086918619)]); + +// ./test/core/float_literals.wast:130 +assert_return(() => invoke($0, `f32_dec.min_positive`, []), [value("i32", 1)]); + +// ./test/core/float_literals.wast:131 +assert_return(() => invoke($0, `f32_dec.min_normal`, []), [value("i32", 8388608)]); + +// ./test/core/float_literals.wast:132 +assert_return(() => invoke($0, `f32_dec.max_subnormal`, []), [value("i32", 8388607)]); + +// ./test/core/float_literals.wast:133 +assert_return(() => invoke($0, `f32_dec.max_finite`, []), [value("i32", 2139095039)]); + +// ./test/core/float_literals.wast:134 +assert_return(() => invoke($0, `f32_dec.trailing_dot`, []), [value("i32", 1343554297)]); + +// ./test/core/float_literals.wast:135 +assert_return(() => invoke($0, `f32_dec.root_beer_float`, []), [value("i32", 1065353217)]); + +// ./test/core/float_literals.wast:137 +assert_return(() => invoke($0, `f64.nan`, []), [value("i64", 9221120237041090560n)]); + +// ./test/core/float_literals.wast:138 +assert_return(() => invoke($0, `f64.positive_nan`, []), [value("i64", 9221120237041090560n)]); + +// ./test/core/float_literals.wast:139 +assert_return(() => invoke($0, `f64.negative_nan`, []), [value("i64", -2251799813685248n)]); + +// ./test/core/float_literals.wast:140 +assert_return(() => invoke($0, `f64.plain_nan`, []), [value("i64", 9221120237041090560n)]); + +// ./test/core/float_literals.wast:141 +assert_return( + () => invoke($0, `f64.informally_known_as_plain_snan`, []), + [value("i64", 9219994337134247936n)], +); + +// ./test/core/float_literals.wast:142 +assert_return(() => invoke($0, `f64.all_ones_nan`, []), [value("i64", -1n)]); + +// ./test/core/float_literals.wast:143 +assert_return(() => invoke($0, `f64.misc_nan`, []), [value("i64", 9218888453225749180n)]); + +// ./test/core/float_literals.wast:144 +assert_return(() => invoke($0, `f64.misc_positive_nan`, []), [value("i64", 9219717281780008969n)]); + +// ./test/core/float_literals.wast:145 +assert_return(() => invoke($0, `f64.misc_negative_nan`, []), [value("i64", -3751748707474619n)]); + +// ./test/core/float_literals.wast:146 +assert_return(() => invoke($0, `f64.infinity`, []), [value("i64", 9218868437227405312n)]); + +// ./test/core/float_literals.wast:147 +assert_return(() => invoke($0, `f64.positive_infinity`, []), [value("i64", 9218868437227405312n)]); + +// ./test/core/float_literals.wast:148 +assert_return(() => invoke($0, `f64.negative_infinity`, []), [value("i64", -4503599627370496n)]); + +// ./test/core/float_literals.wast:149 +assert_return(() => invoke($0, `f64.zero`, []), [value("i64", 0n)]); + +// ./test/core/float_literals.wast:150 +assert_return(() => invoke($0, `f64.positive_zero`, []), [value("i64", 0n)]); + +// ./test/core/float_literals.wast:151 +assert_return(() => invoke($0, `f64.negative_zero`, []), [value("i64", -9223372036854775808n)]); + +// ./test/core/float_literals.wast:152 +assert_return(() => invoke($0, `f64.misc`, []), [value("i64", 4618760256179416344n)]); + +// ./test/core/float_literals.wast:153 +assert_return(() => invoke($0, `f64.min_positive`, []), [value("i64", 1n)]); + +// ./test/core/float_literals.wast:154 +assert_return(() => invoke($0, `f64.min_normal`, []), [value("i64", 4503599627370496n)]); + +// ./test/core/float_literals.wast:155 +assert_return(() => invoke($0, `f64.max_subnormal`, []), [value("i64", 4503599627370495n)]); + +// ./test/core/float_literals.wast:156 +assert_return(() => invoke($0, `f64.max_finite`, []), [value("i64", 9218868437227405311n)]); + +// ./test/core/float_literals.wast:157 +assert_return(() => invoke($0, `f64.trailing_dot`, []), [value("i64", 5057542381537067008n)]); + +// ./test/core/float_literals.wast:158 +assert_return(() => invoke($0, `f64_dec.zero`, []), [value("i64", 0n)]); + +// ./test/core/float_literals.wast:159 +assert_return(() => invoke($0, `f64_dec.positive_zero`, []), [value("i64", 0n)]); + +// ./test/core/float_literals.wast:160 +assert_return(() => invoke($0, `f64_dec.negative_zero`, []), [value("i64", -9223372036854775808n)]); + +// ./test/core/float_literals.wast:161 +assert_return(() => invoke($0, `f64_dec.misc`, []), [value("i64", 4618760256179416344n)]); + +// ./test/core/float_literals.wast:162 +assert_return(() => invoke($0, `f64_dec.min_positive`, []), [value("i64", 1n)]); + +// ./test/core/float_literals.wast:163 +assert_return(() => invoke($0, `f64_dec.min_normal`, []), [value("i64", 4503599627370496n)]); + +// ./test/core/float_literals.wast:164 +assert_return(() => invoke($0, `f64_dec.max_subnormal`, []), [value("i64", 4503599627370495n)]); + +// ./test/core/float_literals.wast:165 +assert_return(() => invoke($0, `f64_dec.max_finite`, []), [value("i64", 9218868437227405311n)]); + +// ./test/core/float_literals.wast:166 +assert_return(() => invoke($0, `f64_dec.trailing_dot`, []), [value("i64", 6103021453049119613n)]); + +// ./test/core/float_literals.wast:167 +assert_return(() => invoke($0, `f64_dec.root_beer_float`, []), [value("i64", 4607182419335945764n)]); + +// ./test/core/float_literals.wast:169 +assert_return(() => invoke($0, `f32-dec-sep1`, []), [value("f32", 1000000)]); + +// ./test/core/float_literals.wast:170 +assert_return(() => invoke($0, `f32-dec-sep2`, []), [value("f32", 1000)]); + +// ./test/core/float_literals.wast:171 +assert_return(() => invoke($0, `f32-dec-sep3`, []), [value("f32", 1003.1416)]); + +// ./test/core/float_literals.wast:172 +assert_return(() => invoke($0, `f32-dec-sep4`, []), [value("f32", 990000000000000)]); + +// ./test/core/float_literals.wast:173 +assert_return(() => invoke($0, `f32-dec-sep5`, []), [value("f32", 12200012000000000000000000000)]); + +// ./test/core/float_literals.wast:174 +assert_return(() => invoke($0, `f32-hex-sep1`, []), [value("f32", 168755360)]); + +// ./test/core/float_literals.wast:175 +assert_return(() => invoke($0, `f32-hex-sep2`, []), [value("f32", 109071)]); + +// ./test/core/float_literals.wast:176 +assert_return(() => invoke($0, `f32-hex-sep3`, []), [value("f32", 41215.94)]); + +// ./test/core/float_literals.wast:177 +assert_return(() => invoke($0, `f32-hex-sep4`, []), [value("f32", 1966080)]); + +// ./test/core/float_literals.wast:178 +assert_return(() => invoke($0, `f32-hex-sep5`, []), [value("f32", 23605224000000)]); + +// ./test/core/float_literals.wast:180 +assert_return(() => invoke($0, `f64-dec-sep1`, []), [value("f64", 1000000)]); + +// ./test/core/float_literals.wast:181 +assert_return(() => invoke($0, `f64-dec-sep2`, []), [value("f64", 1000)]); + +// ./test/core/float_literals.wast:182 +assert_return(() => invoke($0, `f64-dec-sep3`, []), [value("f64", 1003.141592)]); + +// ./test/core/float_literals.wast:183 +assert_return( + () => invoke($0, `f64-dec-sep4`, []), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000099), + ], +); + +// ./test/core/float_literals.wast:184 +assert_return(() => invoke($0, `f64-dec-sep5`, []), [value("f64", 12200011354000000000000000000)]); + +// ./test/core/float_literals.wast:185 +assert_return(() => invoke($0, `f64-hex-sep1`, []), [value("f64", 3078696982321561)]); + +// ./test/core/float_literals.wast:186 +assert_return(() => invoke($0, `f64-hex-sep2`, []), [value("f64", 109071)]); + +// ./test/core/float_literals.wast:187 +assert_return(() => invoke($0, `f64-hex-sep3`, []), [value("f64", 41215.94240794191)]); + +// ./test/core/float_literals.wast:188 +assert_return(() => invoke($0, `f64-hex-sep4`, []), [value("f64", 1966080)]); + +// ./test/core/float_literals.wast:189 +assert_return(() => invoke($0, `f64-hex-sep5`, []), [value("f64", 23605225168752)]); + +// ./test/core/float_literals.wast:192 +let $1 = instantiate(`(module binary + ;; (func (export "4294967249") (result f64) (f64.const 4294967249)) + "\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\85\\80\\80\\80\\00\\01\\60" + "\\00\\01\\7c\\03\\82\\80\\80\\80\\00\\01\\00\\07\\8e\\80\\80\\80" + "\\00\\01\\0a\\34\\32\\39\\34\\39\\36\\37\\32\\34\\39\\00\\00\\0a" + "\\91\\80\\80\\80\\00\\01\\8b\\80\\80\\80\\00\\00\\44\\00\\00\\20" + "\\fa\\ff\\ff\\ef\\41\\0b" +)`); + +// ./test/core/float_literals.wast:201 +assert_return(() => invoke($1, `4294967249`, []), [value("f64", 4294967249)]); + +// ./test/core/float_literals.wast:203 +assert_malformed(() => instantiate(`(global f32 (f32.const _100)) `), `unknown operator`); + +// ./test/core/float_literals.wast:207 +assert_malformed(() => instantiate(`(global f32 (f32.const +_100)) `), `unknown operator`); + +// ./test/core/float_literals.wast:211 +assert_malformed(() => instantiate(`(global f32 (f32.const -_100)) `), `unknown operator`); + +// ./test/core/float_literals.wast:215 +assert_malformed(() => instantiate(`(global f32 (f32.const 99_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:219 +assert_malformed( + () => instantiate(`(global f32 (f32.const 1__000)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:223 +assert_malformed(() => instantiate(`(global f32 (f32.const _1.0)) `), `unknown operator`); + +// ./test/core/float_literals.wast:227 +assert_malformed(() => instantiate(`(global f32 (f32.const 1.0_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:231 +assert_malformed(() => instantiate(`(global f32 (f32.const 1_.0)) `), `unknown operator`); + +// ./test/core/float_literals.wast:235 +assert_malformed(() => instantiate(`(global f32 (f32.const 1._0)) `), `unknown operator`); + +// ./test/core/float_literals.wast:239 +assert_malformed(() => instantiate(`(global f32 (f32.const _1e1)) `), `unknown operator`); + +// ./test/core/float_literals.wast:243 +assert_malformed(() => instantiate(`(global f32 (f32.const 1e1_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:247 +assert_malformed(() => instantiate(`(global f32 (f32.const 1_e1)) `), `unknown operator`); + +// ./test/core/float_literals.wast:251 +assert_malformed(() => instantiate(`(global f32 (f32.const 1e_1)) `), `unknown operator`); + +// ./test/core/float_literals.wast:255 +assert_malformed( + () => instantiate(`(global f32 (f32.const _1.0e1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:259 +assert_malformed( + () => instantiate(`(global f32 (f32.const 1.0e1_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:263 +assert_malformed( + () => instantiate(`(global f32 (f32.const 1.0_e1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:267 +assert_malformed( + () => instantiate(`(global f32 (f32.const 1.0e_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:271 +assert_malformed( + () => instantiate(`(global f32 (f32.const 1.0e+_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:275 +assert_malformed( + () => instantiate(`(global f32 (f32.const 1.0e_+1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:279 +assert_malformed( + () => instantiate(`(global f32 (f32.const _0x100)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:283 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0_x100)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:287 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x_100)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:291 +assert_malformed(() => instantiate(`(global f32 (f32.const 0x00_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:295 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0xff__ffff)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:299 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x_1.0)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:303 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1.0_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:307 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1_.0)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:311 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1._0)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:315 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x_1p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:319 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1p1_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:323 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1_p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:327 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1p_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:331 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x_1.0p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:335 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1.0p1_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:339 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1.0_p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:343 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1.0p_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:347 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1.0p+_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:351 +assert_malformed( + () => instantiate(`(global f32 (f32.const 0x1.0p_+1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:356 +assert_malformed(() => instantiate(`(global f64 (f64.const _100)) `), `unknown operator`); + +// ./test/core/float_literals.wast:360 +assert_malformed(() => instantiate(`(global f64 (f64.const +_100)) `), `unknown operator`); + +// ./test/core/float_literals.wast:364 +assert_malformed(() => instantiate(`(global f64 (f64.const -_100)) `), `unknown operator`); + +// ./test/core/float_literals.wast:368 +assert_malformed(() => instantiate(`(global f64 (f64.const 99_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:372 +assert_malformed( + () => instantiate(`(global f64 (f64.const 1__000)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:376 +assert_malformed(() => instantiate(`(global f64 (f64.const _1.0)) `), `unknown operator`); + +// ./test/core/float_literals.wast:380 +assert_malformed(() => instantiate(`(global f64 (f64.const 1.0_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:384 +assert_malformed(() => instantiate(`(global f64 (f64.const 1_.0)) `), `unknown operator`); + +// ./test/core/float_literals.wast:388 +assert_malformed(() => instantiate(`(global f64 (f64.const 1._0)) `), `unknown operator`); + +// ./test/core/float_literals.wast:392 +assert_malformed(() => instantiate(`(global f64 (f64.const _1e1)) `), `unknown operator`); + +// ./test/core/float_literals.wast:396 +assert_malformed(() => instantiate(`(global f64 (f64.const 1e1_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:400 +assert_malformed(() => instantiate(`(global f64 (f64.const 1_e1)) `), `unknown operator`); + +// ./test/core/float_literals.wast:404 +assert_malformed(() => instantiate(`(global f64 (f64.const 1e_1)) `), `unknown operator`); + +// ./test/core/float_literals.wast:408 +assert_malformed( + () => instantiate(`(global f64 (f64.const _1.0e1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:412 +assert_malformed( + () => instantiate(`(global f64 (f64.const 1.0e1_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:416 +assert_malformed( + () => instantiate(`(global f64 (f64.const 1.0_e1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:420 +assert_malformed( + () => instantiate(`(global f64 (f64.const 1.0e_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:424 +assert_malformed( + () => instantiate(`(global f64 (f64.const 1.0e+_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:428 +assert_malformed( + () => instantiate(`(global f64 (f64.const 1.0e_+1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:432 +assert_malformed( + () => instantiate(`(global f64 (f64.const _0x100)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:436 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0_x100)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:440 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x_100)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:444 +assert_malformed(() => instantiate(`(global f64 (f64.const 0x00_)) `), `unknown operator`); + +// ./test/core/float_literals.wast:448 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0xff__ffff)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:452 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x_1.0)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:456 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1.0_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:460 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1_.0)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:464 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1._0)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:468 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x_1p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:472 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1p1_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:476 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1_p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:480 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1p_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:484 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x_1.0p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:488 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1.0p1_)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:492 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1.0_p1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:496 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1.0p_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:500 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1.0p+_1)) `), + `unknown operator`, +); + +// ./test/core/float_literals.wast:504 +assert_malformed( + () => instantiate(`(global f64 (f64.const 0x1.0p_+1)) `), + `unknown operator`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/float_memory.wast.js b/js/src/jit-test/tests/wasm/spec/spec/float_memory.wast.js new file mode 100644 index 0000000000..8f01f424e8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/float_memory.wast.js @@ -0,0 +1,361 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/float_memory.wast + +// ./test/core/float_memory.wast:5 +let $0 = instantiate(`(module + (memory (data "\\00\\00\\a0\\7f")) + + (func (export "f32.load") (result f32) (f32.load (i32.const 0))) + (func (export "i32.load") (result i32) (i32.load (i32.const 0))) + (func (export "f32.store") (f32.store (i32.const 0) (f32.const nan:0x200000))) + (func (export "i32.store") (i32.store (i32.const 0) (i32.const 0x7fa00000))) + (func (export "reset") (i32.store (i32.const 0) (i32.const 0))) +)`); + +// ./test/core/float_memory.wast:15 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory.wast:16 +assert_return(() => invoke($0, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory.wast:17 +invoke($0, `reset`, []); + +// ./test/core/float_memory.wast:18 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory.wast:19 +assert_return(() => invoke($0, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory.wast:20 +invoke($0, `f32.store`, []); + +// ./test/core/float_memory.wast:21 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory.wast:22 +assert_return(() => invoke($0, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory.wast:23 +invoke($0, `reset`, []); + +// ./test/core/float_memory.wast:24 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory.wast:25 +assert_return(() => invoke($0, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory.wast:26 +invoke($0, `i32.store`, []); + +// ./test/core/float_memory.wast:27 +assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory.wast:28 +assert_return(() => invoke($0, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory.wast:30 +let $1 = instantiate(`(module + (memory (data "\\00\\00\\00\\00\\00\\00\\f4\\7f")) + + (func (export "f64.load") (result f64) (f64.load (i32.const 0))) + (func (export "i64.load") (result i64) (i64.load (i32.const 0))) + (func (export "f64.store") (f64.store (i32.const 0) (f64.const nan:0x4000000000000))) + (func (export "i64.store") (i64.store (i32.const 0) (i64.const 0x7ff4000000000000))) + (func (export "reset") (i64.store (i32.const 0) (i64.const 0))) +)`); + +// ./test/core/float_memory.wast:40 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory.wast:41 +assert_return( + () => invoke($1, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory.wast:42 +invoke($1, `reset`, []); + +// ./test/core/float_memory.wast:43 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory.wast:44 +assert_return(() => invoke($1, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory.wast:45 +invoke($1, `f64.store`, []); + +// ./test/core/float_memory.wast:46 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory.wast:47 +assert_return( + () => invoke($1, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory.wast:48 +invoke($1, `reset`, []); + +// ./test/core/float_memory.wast:49 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory.wast:50 +assert_return(() => invoke($1, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory.wast:51 +invoke($1, `i64.store`, []); + +// ./test/core/float_memory.wast:52 +assert_return(() => invoke($1, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory.wast:53 +assert_return( + () => invoke($1, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory.wast:57 +let $2 = instantiate(`(module + (memory (data "\\00\\00\\00\\a0\\7f")) + + (func (export "f32.load") (result f32) (f32.load (i32.const 1))) + (func (export "i32.load") (result i32) (i32.load (i32.const 1))) + (func (export "f32.store") (f32.store (i32.const 1) (f32.const nan:0x200000))) + (func (export "i32.store") (i32.store (i32.const 1) (i32.const 0x7fa00000))) + (func (export "reset") (i32.store (i32.const 1) (i32.const 0))) +)`); + +// ./test/core/float_memory.wast:67 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory.wast:68 +assert_return(() => invoke($2, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory.wast:69 +invoke($2, `reset`, []); + +// ./test/core/float_memory.wast:70 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory.wast:71 +assert_return(() => invoke($2, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory.wast:72 +invoke($2, `f32.store`, []); + +// ./test/core/float_memory.wast:73 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory.wast:74 +assert_return(() => invoke($2, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory.wast:75 +invoke($2, `reset`, []); + +// ./test/core/float_memory.wast:76 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory.wast:77 +assert_return(() => invoke($2, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory.wast:78 +invoke($2, `i32.store`, []); + +// ./test/core/float_memory.wast:79 +assert_return(() => invoke($2, `i32.load`, []), [value("i32", 2141192192)]); + +// ./test/core/float_memory.wast:80 +assert_return(() => invoke($2, `f32.load`, []), [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]); + +// ./test/core/float_memory.wast:82 +let $3 = instantiate(`(module + (memory (data "\\00\\00\\00\\00\\00\\00\\00\\f4\\7f")) + + (func (export "f64.load") (result f64) (f64.load (i32.const 1))) + (func (export "i64.load") (result i64) (i64.load (i32.const 1))) + (func (export "f64.store") (f64.store (i32.const 1) (f64.const nan:0x4000000000000))) + (func (export "i64.store") (i64.store (i32.const 1) (i64.const 0x7ff4000000000000))) + (func (export "reset") (i64.store (i32.const 1) (i64.const 0))) +)`); + +// ./test/core/float_memory.wast:92 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory.wast:93 +assert_return( + () => invoke($3, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory.wast:94 +invoke($3, `reset`, []); + +// ./test/core/float_memory.wast:95 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory.wast:96 +assert_return(() => invoke($3, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory.wast:97 +invoke($3, `f64.store`, []); + +// ./test/core/float_memory.wast:98 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory.wast:99 +assert_return( + () => invoke($3, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory.wast:100 +invoke($3, `reset`, []); + +// ./test/core/float_memory.wast:101 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory.wast:102 +assert_return(() => invoke($3, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory.wast:103 +invoke($3, `i64.store`, []); + +// ./test/core/float_memory.wast:104 +assert_return(() => invoke($3, `i64.load`, []), [value("i64", 9219994337134247936n)]); + +// ./test/core/float_memory.wast:105 +assert_return( + () => invoke($3, `f64.load`, []), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f])], +); + +// ./test/core/float_memory.wast:109 +let $4 = instantiate(`(module + (memory (data "\\01\\00\\d0\\7f")) + + (func (export "f32.load") (result f32) (f32.load (i32.const 0))) + (func (export "i32.load") (result i32) (i32.load (i32.const 0))) + (func (export "f32.store") (f32.store (i32.const 0) (f32.const nan:0x500001))) + (func (export "i32.store") (i32.store (i32.const 0) (i32.const 0x7fd00001))) + (func (export "reset") (i32.store (i32.const 0) (i32.const 0))) +)`); + +// ./test/core/float_memory.wast:119 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 2144337921)]); + +// ./test/core/float_memory.wast:120 +assert_return(() => invoke($4, `f32.load`, []), [bytes("f32", [0x1, 0x0, 0xd0, 0x7f])]); + +// ./test/core/float_memory.wast:121 +invoke($4, `reset`, []); + +// ./test/core/float_memory.wast:122 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory.wast:123 +assert_return(() => invoke($4, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory.wast:124 +invoke($4, `f32.store`, []); + +// ./test/core/float_memory.wast:125 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 2144337921)]); + +// ./test/core/float_memory.wast:126 +assert_return(() => invoke($4, `f32.load`, []), [bytes("f32", [0x1, 0x0, 0xd0, 0x7f])]); + +// ./test/core/float_memory.wast:127 +invoke($4, `reset`, []); + +// ./test/core/float_memory.wast:128 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 0)]); + +// ./test/core/float_memory.wast:129 +assert_return(() => invoke($4, `f32.load`, []), [value("f32", 0)]); + +// ./test/core/float_memory.wast:130 +invoke($4, `i32.store`, []); + +// ./test/core/float_memory.wast:131 +assert_return(() => invoke($4, `i32.load`, []), [value("i32", 2144337921)]); + +// ./test/core/float_memory.wast:132 +assert_return(() => invoke($4, `f32.load`, []), [bytes("f32", [0x1, 0x0, 0xd0, 0x7f])]); + +// ./test/core/float_memory.wast:134 +let $5 = instantiate(`(module + (memory (data "\\01\\00\\00\\00\\00\\00\\fc\\7f")) + + (func (export "f64.load") (result f64) (f64.load (i32.const 0))) + (func (export "i64.load") (result i64) (i64.load (i32.const 0))) + (func (export "f64.store") (f64.store (i32.const 0) (f64.const nan:0xc000000000001))) + (func (export "i64.store") (i64.store (i32.const 0) (i64.const 0x7ffc000000000001))) + (func (export "reset") (i64.store (i32.const 0) (i64.const 0))) +)`); + +// ./test/core/float_memory.wast:144 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 9222246136947933185n)]); + +// ./test/core/float_memory.wast:145 +assert_return( + () => invoke($5, `f64.load`, []), + [bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f])], +); + +// ./test/core/float_memory.wast:146 +invoke($5, `reset`, []); + +// ./test/core/float_memory.wast:147 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory.wast:148 +assert_return(() => invoke($5, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory.wast:149 +invoke($5, `f64.store`, []); + +// ./test/core/float_memory.wast:150 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 9222246136947933185n)]); + +// ./test/core/float_memory.wast:151 +assert_return( + () => invoke($5, `f64.load`, []), + [bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f])], +); + +// ./test/core/float_memory.wast:152 +invoke($5, `reset`, []); + +// ./test/core/float_memory.wast:153 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 0n)]); + +// ./test/core/float_memory.wast:154 +assert_return(() => invoke($5, `f64.load`, []), [value("f64", 0)]); + +// ./test/core/float_memory.wast:155 +invoke($5, `i64.store`, []); + +// ./test/core/float_memory.wast:156 +assert_return(() => invoke($5, `i64.load`, []), [value("i64", 9222246136947933185n)]); + +// ./test/core/float_memory.wast:157 +assert_return( + () => invoke($5, `f64.load`, []), + [bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f])], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/float_misc.wast.js b/js/src/jit-test/tests/wasm/spec/spec/float_misc.wast.js new file mode 100644 index 0000000000..9d7598b363 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/float_misc.wast.js @@ -0,0 +1,3679 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/float_misc.wast + +// ./test/core/float_misc.wast:17 +let $0 = instantiate(`(module + (func (export "f32.add") (param $$x f32) (param $$y f32) (result f32) (f32.add (local.get $$x) (local.get $$y))) + (func (export "f32.sub") (param $$x f32) (param $$y f32) (result f32) (f32.sub (local.get $$x) (local.get $$y))) + (func (export "f32.mul") (param $$x f32) (param $$y f32) (result f32) (f32.mul (local.get $$x) (local.get $$y))) + (func (export "f32.div") (param $$x f32) (param $$y f32) (result f32) (f32.div (local.get $$x) (local.get $$y))) + (func (export "f32.sqrt") (param $$x f32) (result f32) (f32.sqrt (local.get $$x))) + (func (export "f32.abs") (param $$x f32) (result f32) (f32.abs (local.get $$x))) + (func (export "f32.neg") (param $$x f32) (result f32) (f32.neg (local.get $$x))) + (func (export "f32.copysign") (param $$x f32) (param $$y f32) (result f32) (f32.copysign (local.get $$x) (local.get $$y))) + (func (export "f32.ceil") (param $$x f32) (result f32) (f32.ceil (local.get $$x))) + (func (export "f32.floor") (param $$x f32) (result f32) (f32.floor (local.get $$x))) + (func (export "f32.trunc") (param $$x f32) (result f32) (f32.trunc (local.get $$x))) + (func (export "f32.nearest") (param $$x f32) (result f32) (f32.nearest (local.get $$x))) + (func (export "f32.min") (param $$x f32) (param $$y f32) (result f32) (f32.min (local.get $$x) (local.get $$y))) + (func (export "f32.max") (param $$x f32) (param $$y f32) (result f32) (f32.max (local.get $$x) (local.get $$y))) + + (func (export "f64.add") (param $$x f64) (param $$y f64) (result f64) (f64.add (local.get $$x) (local.get $$y))) + (func (export "f64.sub") (param $$x f64) (param $$y f64) (result f64) (f64.sub (local.get $$x) (local.get $$y))) + (func (export "f64.mul") (param $$x f64) (param $$y f64) (result f64) (f64.mul (local.get $$x) (local.get $$y))) + (func (export "f64.div") (param $$x f64) (param $$y f64) (result f64) (f64.div (local.get $$x) (local.get $$y))) + (func (export "f64.sqrt") (param $$x f64) (result f64) (f64.sqrt (local.get $$x))) + (func (export "f64.abs") (param $$x f64) (result f64) (f64.abs (local.get $$x))) + (func (export "f64.neg") (param $$x f64) (result f64) (f64.neg (local.get $$x))) + (func (export "f64.copysign") (param $$x f64) (param $$y f64) (result f64) (f64.copysign (local.get $$x) (local.get $$y))) + (func (export "f64.ceil") (param $$x f64) (result f64) (f64.ceil (local.get $$x))) + (func (export "f64.floor") (param $$x f64) (result f64) (f64.floor (local.get $$x))) + (func (export "f64.trunc") (param $$x f64) (result f64) (f64.trunc (local.get $$x))) + (func (export "f64.nearest") (param $$x f64) (result f64) (f64.nearest (local.get $$x))) + (func (export "f64.min") (param $$x f64) (param $$y f64) (result f64) (f64.min (local.get $$x) (local.get $$y))) + (func (export "f64.max") (param $$x f64) (param $$y f64) (result f64) (f64.max (local.get $$x) (local.get $$y))) +)`); + +// ./test/core/float_misc.wast:50 +assert_return( + () => invoke($0, `f32.add`, [value("f32", 1.1234568), value("f32", 0.00000000012345)]), + [value("f32", 1.1234568)], +); + +// ./test/core/float_misc.wast:51 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 1.123456789), + value("f64", 0.00000000012345), + ]), + [value("f64", 1.12345678912345)], +); + +// ./test/core/float_misc.wast:55 +assert_return( + () => invoke($0, `f32.add`, [value("f32", 1), value("f32", 0.000000059604645)]), + [value("f32", 1)], +); + +// ./test/core/float_misc.wast:56 +assert_return( + () => invoke($0, `f32.add`, [value("f32", 1), value("f32", 0.00000005960465)]), + [value("f32", 1.0000001)], +); + +// ./test/core/float_misc.wast:57 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 1), + value("f64", 0.00000000000000011102230246251565), + ]), + [value("f64", 1)], +); + +// ./test/core/float_misc.wast:58 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 1), + value("f64", 0.00000000000000011102230246251568), + ]), + [value("f64", 1.0000000000000002)], +); + +// ./test/core/float_misc.wast:61 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000011754942), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/float_misc.wast:62 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/float_misc.wast:67 +assert_return( + () => invoke($0, `f32.add`, [value("f32", 2147483600), value("f32", 1024.25)]), + [value("f32", 2147484700)], +); + +// ./test/core/float_misc.wast:68 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 9223372036854776000), + value("f64", 1024.25), + ]), + [value("f64", 9223372036854778000)], +); + +// ./test/core/float_misc.wast:72 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003645561009778199), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000292), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036455610097781983), + ], +); + +// ./test/core/float_misc.wast:75 +assert_return( + () => invoke($0, `f64.add`, [value("f64", 9007199254740992), value("f64", 1.00001)]), + [value("f64", 9007199254740994)], +); + +// ./test/core/float_misc.wast:78 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 9007199254740994), + value("f64", 0.9999847412109375), + ]), + [value("f64", 9007199254740994)], +); + +// ./test/core/float_misc.wast:81 +assert_return( + () => invoke($0, `f32.add`, [value("f32", 8388608), value("f32", 0.5)]), + [value("f32", 8388608)], +); + +// ./test/core/float_misc.wast:82 +assert_return( + () => invoke($0, `f32.add`, [value("f32", 8388609), value("f32", 0.5)]), + [value("f32", 8388610)], +); + +// ./test/core/float_misc.wast:83 +assert_return( + () => invoke($0, `f64.add`, [value("f64", 4503599627370496), value("f64", 0.5)]), + [value("f64", 4503599627370496)], +); + +// ./test/core/float_misc.wast:84 +assert_return( + () => invoke($0, `f64.add`, [value("f64", 4503599627370497), value("f64", 0.5)]), + [value("f64", 4503599627370498)], +); + +// ./test/core/float_misc.wast:87 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", -6207600000000000000000000000000), + value("f32", 0.000000000000000000000000000002309799), + ]), + [value("f32", -6207600000000000000000000000000)], +); + +// ./test/core/float_misc.wast:88 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 209865800000000000000), + value("f32", -5270152500000000), + ]), + [value("f32", 209860530000000000000)], +); + +// ./test/core/float_misc.wast:89 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 0.0000000000000000000000001963492), + value("f32", 0.000000000000000000000000000000000000046220067), + ]), + [value("f32", 0.0000000000000000000000001963492)], +); + +// ./test/core/float_misc.wast:90 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 640905000000), + value("f32", -64449550000000000), + ]), + [value("f32", -64448910000000000)], +); + +// ./test/core/float_misc.wast:91 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 0.0000601966), + value("f32", 120372790000000000000000000000000), + ]), + [value("f32", 120372790000000000000000000000000)], +); + +// ./test/core/float_misc.wast:92 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009218993827002741), + value("f64", -1283078243878048500000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -1283078243878048500000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:93 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -96503407870148960000000), + value("f64", 0.00000000000000000000000000000000000000000000000000000004670208988478548), + ]), + [value("f64", -96503407870148960000000)], +); + +// ./test/core/float_misc.wast:94 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 0.0000000000000000000000000000000000000000000028559147675434106), + value("f64", -0.00026124280570653086), + ]), + [value("f64", -0.00026124280570653086)], +); + +// ./test/core/float_misc.wast:95 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 417909928165296700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 79335564741512700000), + ]), + [ + value("f64", 417909928165296700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:96 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 8265442868747023000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 43603327839006250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 43603327839006250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:99 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 5238404000000000000000), + value("f32", -1570182.5), + ]), + [value("f32", 5238404000000000000000)], +); + +// ./test/core/float_misc.wast:100 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 0.00000000000004258938), + value("f32", -0.0000000000000000000000057092353), + ]), + [value("f32", 0.00000000000004258938)], +); + +// ./test/core/float_misc.wast:101 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", -0.00000000000027251026), + value("f32", 83711560000000000000000000000000000000), + ]), + [value("f32", 83711560000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:102 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", -0.0000000000000884536), + value("f32", -0.000000000000000000000000000000015165626), + ]), + [value("f32", -0.0000000000000884536)], +); + +// ./test/core/float_misc.wast:103 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 0.0010521035), + value("f32", -0.000000000000000000000000000000007582135), + ]), + [value("f32", 0.0010521035)], +); + +// ./test/core/float_misc.wast:104 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 1511135228188924600000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002760218100603169), + ]), + [value("f64", 1511135228188924600000000000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:105 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 62386719760360280000000000000000000000000000000), + value("f64", -0.0000000000000000008592185488839212), + ]), + [value("f64", 62386719760360280000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:106 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004195022848436354), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029225342022551453), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004195022848436354), + ], +); + +// ./test/core/float_misc.wast:107 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -215220546714824520000000000000000000000000000), + value("f64", -1112220412047137200000000000000000000000000), + ]), + [value("f64", -216332767126871650000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:108 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -13.6911535055856), + value("f64", 2066117898924419800000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 2066117898924419800000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:111 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", -0.000000000000000000000000000000000006456021), + value("f32", 0.00000000000020219949), + ]), + [value("f32", 0.00000000000020219949)], +); + +// ./test/core/float_misc.wast:112 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", -0.000026823169), + value("f32", 0.000000011196016), + ]), + [value("f32", -0.000026811973)], +); + +// ./test/core/float_misc.wast:113 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", -128526170000), + value("f32", 0.0000000000000000000000000000000027356305), + ]), + [value("f32", -128526170000)], +); + +// ./test/core/float_misc.wast:114 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 0.000000000000000000000000000000000004158973), + value("f32", -1573528700), + ]), + [value("f32", -1573528700)], +); + +// ./test/core/float_misc.wast:115 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", -0.0000000000000000000000000000000000009338769), + value("f32", 78647514000000000000000000000), + ]), + [value("f32", 78647514000000000000000000000)], +); + +// ./test/core/float_misc.wast:116 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021986596650683218), + value("f64", -235447594845461340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -235447594845461340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:117 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -314175619593595700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -30114098514611660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -314175649707694230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:118 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013722858367681836), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000011571842749688977), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000011571842749688977), + ], +); + +// ./test/core/float_misc.wast:119 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009828583756551075), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016862581574752944), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009828583756551075), + ], +); + +// ./test/core/float_misc.wast:120 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -672584203522163500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 8374007930974482000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -672584203522163500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:123 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -210896605327889950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 581483233421196300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 581483022524591100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:124 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 102315792666821480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 450204300797494900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 102315792667271680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:125 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -130529978570956560000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 154899434220186570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 154899434220186450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:126 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 47629997434721684000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 455586451058259700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 455586451058259700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:127 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003958952516558414), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023092460710062946), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000230924607140219), + ], +); + +// ./test/core/float_misc.wast:130 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -43780558475415996000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -49680759347383435000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -49680759347383435000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:131 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 21174311168546080000000000000000000000000000000000000000000), + value("f64", -26385928474612128000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -26385928474612128000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:132 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -9508489561700635000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007858068235728165), + ]), + [ + value("f64", -9508489561700635000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:133 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005079144928553737), + value("f64", -354021720742499800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -354021720742499800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:134 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000004165382103988111), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010865942283516648), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000004165382103988111), + ], +); + +// ./test/core/float_misc.wast:137 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 97215650000000000000000000000000000), + value("f32", 305590870000000000000000000000000000000), + ]), + [value("f32", 305688080000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:138 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 270465630000000000000000000000000000000), + value("f32", -230236850000000000000000000000000), + ]), + [value("f32", 270465400000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:139 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 357209300000000000000000000000000000), + value("f32", -236494050000000000000000000000000000000), + ]), + [value("f32", -236136840000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:140 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", -1484234100000000000000000000000000000), + value("f32", -328991400000000000000000000000000000000), + ]), + [value("f32", -330475620000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:141 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", -219885600000000000000000000000000000000), + value("f32", -81560930000000000000000000000000000000), + ]), + [value("f32", -301446520000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:142 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 90390204939547630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 22943337422040356000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 90390204939570580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:143 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 165916059736246050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 12577349331444160000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 165916059748823400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:144 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -136351292561394300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 60507030603873580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -136290785530790440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:145 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -34377613258227424000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 169947152758793490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 169947118381180220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:146 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 92273427008645570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -39269416451018680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 92273426969376150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:149 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 0.000000000000000000000000000000000000008313455), + value("f32", 0.000000000000000000000000000000000000000000873), + ]), + [value("f32", 0.000000000000000000000000000000000000008314328)], +); + +// ./test/core/float_misc.wast:150 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 0.000000000000000000000000000000000000000000052), + value("f32", -0.000000000000000000000000000000000000000000003), + ]), + [value("f32", 0.000000000000000000000000000000000000000000049)], +); + +// ./test/core/float_misc.wast:151 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", -0.000000000000000000000000000000000000000000011), + value("f32", 0.000000000000000000000000000000000000005186284), + ]), + [value("f32", 0.000000000000000000000000000000000000005186273)], +); + +// ./test/core/float_misc.wast:152 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", -0.000000000000000000000000000000000000000000028), + value("f32", 0.00000000000000000000000000000000000023675283), + ]), + [value("f32", 0.0000000000000000000000000000000000002367528)], +); + +// ./test/core/float_misc.wast:153 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 0.000000000000000000000000000000000000000000635), + value("f32", -0.00000000000000000000000000000000000000003327), + ]), + [value("f32", -0.000000000000000000000000000000000000000032635)], +); + +// ./test/core/float_misc.wast:154 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028461489375936755), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005130160608603642), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002284011671009967), + ], +); + +// ./test/core/float_misc.wast:155 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047404811354775), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008895417776504167), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004154936641026667), + ], +); + +// ./test/core/float_misc.wast:156 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009330082001250494), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029863980609419717), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003919406261067021), + ], +); + +// ./test/core/float_misc.wast:157 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014418693884494008), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016324914377759187), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001906220493265178), + ], +); + +// ./test/core/float_misc.wast:158 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043203619362281506), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002521511966399844), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017988499698283067), + ], +); + +// ./test/core/float_misc.wast:162 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 340282330000000000000000000000000000000), + value("f32", 20282410000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:163 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 179769313486231550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 19958403095347200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:166 +assert_return(() => invoke($0, `f32.add`, [value("f32", 2), value("f32", 2)]), [value("f32", 4)]); + +// ./test/core/float_misc.wast:167 +assert_return(() => invoke($0, `f64.add`, [value("f64", 2), value("f64", 2)]), [value("f64", 4)]); + +// ./test/core/float_misc.wast:170 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 10141204000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:171 +assert_return( + () => invoke($0, `f32.add`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 10141205000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/float_misc.wast:172 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 9979201547673598000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:173 +assert_return( + () => invoke($0, `f64.add`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 9979201547673600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/float_misc.wast:177 +assert_return( + () => invoke($0, `f32.sub`, [value("f32", 65536), value("f32", 0.000000000007275958)]), + [value("f32", 65536)], +); + +// ./test/core/float_misc.wast:178 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 65536), + value("f64", 0.000000000007275957614183426), + ]), + [value("f64", 65535.99999999999)], +); + +// ./test/core/float_misc.wast:182 +assert_return( + () => invoke($0, `f32.sub`, [value("f32", 1), value("f32", 0.000000029802322)]), + [value("f32", 1)], +); + +// ./test/core/float_misc.wast:183 +assert_return( + () => invoke($0, `f32.sub`, [value("f32", 1), value("f32", 0.000000029802326)]), + [value("f32", 0.99999994)], +); + +// ./test/core/float_misc.wast:184 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 1), + value("f64", 0.00000000000000005551115123125783), + ]), + [value("f64", 1)], +); + +// ./test/core/float_misc.wast:185 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 1), + value("f64", 0.00000000000000005551115123125784), + ]), + [value("f64", 0.9999999999999999)], +); + +// ./test/core/float_misc.wast:188 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", 0.00000000000000000000000000000002379208), + value("f32", -722129800000000000000000000000000000), + ]), + [value("f32", 722129800000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:189 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", -842284000000000000000000000000000000), + value("f32", -11118414000000), + ]), + [value("f32", -842284000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:190 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", 1.4549444), + value("f32", -0.00000000000000000000000033792615), + ]), + [value("f32", 1.4549444)], +); + +// ./test/core/float_misc.wast:191 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", 0.0000000000000000000000000000000000094808914), + value("f32", 0.000000000000000000000018589502), + ]), + [value("f32", -0.000000000000000000000018589502)], +); + +// ./test/core/float_misc.wast:192 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", 0.000006181167), + value("f32", -0.0000000000000000000000000000000093959864), + ]), + [value("f32", 0.000006181167)], +); + +// ./test/core/float_misc.wast:193 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000775701650124413), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002524845082116609), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000775701650124413), + ], +); + +// ./test/core/float_misc.wast:194 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -20991871064832710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.0000000000000000000000000000000000000000000000038165079778426864), + ]), + [ + value("f64", -20991871064832710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:195 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028592030964162332), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020889465194336087), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028592030964162332), + ], +); + +// ./test/core/float_misc.wast:196 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000303879528930943), + value("f64", -23204941114021897000000000000000000000000000000), + ]), + [value("f64", 23204941114021897000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:197 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -0.00000000000000000000000000000000000000000014953904039036317), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010592252695645683), + ]), + [value("f64", -0.00000000000000000000000000000000000000000014953904039036317)], +); + +// ./test/core/float_misc.wast:200 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", -448601660000000000000000000000000), + value("f32", -8984148000000000000000000000000000), + ]), + [value("f32", 8535546400000000000000000000000000)], +); + +// ./test/core/float_misc.wast:201 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", -899427400000000000000000000000000), + value("f32", 91.579384), + ]), + [value("f32", -899427400000000000000000000000000)], +); + +// ./test/core/float_misc.wast:202 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", -0.00000000000000000000000011975), + value("f32", 0.000000063140405), + ]), + [value("f32", -0.000000063140405)], +); + +// ./test/core/float_misc.wast:203 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", -0.000000000000000000000011800487), + value("f32", -0.00031558736), + ]), + [value("f32", 0.00031558736)], +); + +// ./test/core/float_misc.wast:204 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", -736483800000000000000000000000), + value("f32", 0.0000000000000000030824513), + ]), + [value("f32", -736483800000000000000000000000)], +); + +// ./test/core/float_misc.wast:205 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -9410469964196796000000000000000000000000000000000000000000000), + value("f64", -17306275691385970000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 17306275691385970000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:206 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002877908564233173), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002339448785991429), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002877908564233173), + ], +); + +// ./test/core/float_misc.wast:207 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000009719219783531962), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001572015082308034), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000009719219783531962), + ], +); + +// ./test/core/float_misc.wast:208 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034908896031751274), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000019928479721303208), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000019928479721303208), + ], +); + +// ./test/core/float_misc.wast:209 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -7538298763725556000000000000000000), + value("f64", 4447012580193329000000000000000000000000000000000000), + ]), + [value("f64", -4447012580193329000000000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:212 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", 75846976000000000000000000000), + value("f32", 0.000046391753), + ]), + [value("f32", 75846976000000000000000000000)], +); + +// ./test/core/float_misc.wast:213 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", -567139.9), + value("f32", -0.000000000030334842), + ]), + [value("f32", -567139.9)], +); + +// ./test/core/float_misc.wast:214 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", -0.000000000017412261), + value("f32", -0.000000000000000017877793), + ]), + [value("f32", -0.000000000017412244)], +); + +// ./test/core/float_misc.wast:215 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", -0.000065645545), + value("f32", 0.00014473806), + ]), + [value("f32", -0.00021038362)], +); + +// ./test/core/float_misc.wast:216 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", -0.00000000016016115), + value("f32", -0.000000000000000000000000000000085380075), + ]), + [value("f32", -0.00000000016016115)], +); + +// ./test/core/float_misc.wast:217 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000009358725267183177), + value("f64", -31137147338685164000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 31137147338685164000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:218 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -4390767596767215000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -67890457158958560000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 67890457158958560000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:219 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036288281010831153), + value("f64", 3383199683245004400000000000000000000000000000000000000), + ]), + [value("f64", -3383199683245004400000000000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:220 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003645097751812619), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000031423490969686624), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000031423491006137603), + ], +); + +// ./test/core/float_misc.wast:221 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008021529638989887), + value("f64", -0.00006774972769072139), + ]), + [value("f64", 0.00006774972769072139)], +); + +// ./test/core/float_misc.wast:224 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 0.000000000000000000000005816988065793039), + value("f64", 0.000000000000000000000000000000000025021499241540866), + ]), + [value("f64", 0.000000000000000000000005816988065768018)], +); + +// ./test/core/float_misc.wast:225 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043336683304809554), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016945582607476316), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043336683135353726), + ], +); + +// ./test/core/float_misc.wast:226 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000006908052676315257), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000012001773734799856), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000012001773734799856), + ], +); + +// ./test/core/float_misc.wast:227 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -0.0000000000022044291547443813), + value("f64", -0.0000000000000000000027947429925618632), + ]), + [value("f64", -0.000000000002204429151949638)], +); + +// ./test/core/float_misc.wast:228 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 0.00000004016393569117761), + value("f64", 0.17053881989395447), + ]), + [value("f64", -0.17053877973001877)], +); + +// ./test/core/float_misc.wast:231 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010015106898667285), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004785375958943186), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047853759589431757), + ], +); + +// ./test/core/float_misc.wast:232 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", -15618959953.641388), + value("f64", 598234410620718900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -598234410620718900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:233 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 38832071540376680000000000000000000), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042192279274320304), + ]), + [value("f64", 38832071540376680000000000000000000)], +); + +// ./test/core/float_misc.wast:234 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010705986890807897), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017466607734737216), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010705986890807897), + ], +); + +// ./test/core/float_misc.wast:235 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 0.00000000000000000949378346261834), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014584885434950294), + ]), + [value("f64", 0.00000000000000000949378346261834)], +); + +// ./test/core/float_misc.wast:239 +assert_return( + () => invoke($0, `f32.sub`, [value("f32", 23.140692), value("f32", 3.1415927)]), + [value("f32", 19.9991)], +); + +// ./test/core/float_misc.wast:240 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 23.14069263277927), + value("f64", 3.141592653589793), + ]), + [value("f64", 19.999099979189477)], +); + +// ./test/core/float_misc.wast:243 +assert_return( + () => invoke($0, `f32.sub`, [value("f32", 2999999), value("f32", 2999998)]), + [value("f32", 1)], +); + +// ./test/core/float_misc.wast:244 +assert_return( + () => invoke($0, `f32.sub`, [value("f32", 1999999), value("f32", 1999995)]), + [value("f32", 4)], +); + +// ./test/core/float_misc.wast:245 +assert_return( + () => invoke($0, `f32.sub`, [value("f32", 1999999), value("f32", 1999993)]), + [value("f32", 6)], +); + +// ./test/core/float_misc.wast:246 +assert_return( + () => invoke($0, `f32.sub`, [value("f32", 400002), value("f32", 400001)]), + [value("f32", 1)], +); + +// ./test/core/float_misc.wast:247 +assert_return( + () => invoke($0, `f32.sub`, [value("f32", 400002), value("f32", 400000)]), + [value("f32", 2)], +); + +// ./test/core/float_misc.wast:248 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 2999999999999999), + value("f64", 2999999999999998), + ]), + [value("f64", 1)], +); + +// ./test/core/float_misc.wast:249 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 1999999999999999), + value("f64", 1999999999999995), + ]), + [value("f64", 4)], +); + +// ./test/core/float_misc.wast:250 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 1999999999999999), + value("f64", 1999999999999993), + ]), + [value("f64", 6)], +); + +// ./test/core/float_misc.wast:251 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 400000000000002), + value("f64", 400000000000001), + ]), + [value("f64", 1)], +); + +// ./test/core/float_misc.wast:252 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 400000000000002), + value("f64", 400000000000000), + ]), + [value("f64", 2)], +); + +// ./test/core/float_misc.wast:255 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754942), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/float_misc.wast:256 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/float_misc.wast:259 +assert_return( + () => invoke($0, `f32.sub`, [value("f32", 1.0000001), value("f32", 0.99999994)]), + [value("f32", 0.00000017881393)], +); + +// ./test/core/float_misc.wast:260 +assert_return( + () => invoke($0, `f32.sub`, [value("f32", 1.0000001), value("f32", 1)]), + [value("f32", 0.00000011920929)], +); + +// ./test/core/float_misc.wast:261 +assert_return( + () => invoke($0, `f32.sub`, [value("f32", 1), value("f32", 0.99999994)]), + [value("f32", 0.000000059604645)], +); + +// ./test/core/float_misc.wast:262 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 1.0000000000000002), + value("f64", 0.9999999999999999), + ]), + [value("f64", 0.00000000000000033306690738754696)], +); + +// ./test/core/float_misc.wast:263 +assert_return( + () => invoke($0, `f64.sub`, [value("f64", 1.0000000000000002), value("f64", 1)]), + [value("f64", 0.0000000000000002220446049250313)], +); + +// ./test/core/float_misc.wast:264 +assert_return( + () => invoke($0, `f64.sub`, [value("f64", 1), value("f64", 0.9999999999999999)]), + [value("f64", 0.00000000000000011102230246251565)], +); + +// ./test/core/float_misc.wast:268 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 10141204000000000000000000000000), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:269 +assert_return( + () => invoke($0, `f32.sub`, [ + value("f32", 340282350000000000000000000000000000000), + value("f32", 10141205000000000000000000000000), + ]), + [value("f32", 340282330000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:270 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 9979201547673598000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:271 +assert_return( + () => invoke($0, `f64.sub`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 9979201547673600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:274 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", 1000000000000000), + value("f32", 1000000000000000), + ]), + [value("f32", 999999940000000000000000000000)], +); + +// ./test/core/float_misc.wast:275 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", 100000000000000000000), + value("f32", 100000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/float_misc.wast:276 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", 10000000000000000000000000), + value("f32", 10000000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/float_misc.wast:277 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 1000000000000000), + value("f64", 1000000000000000), + ]), + [value("f64", 1000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:278 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 100000000000000000000), + value("f64", 100000000000000000000), + ]), + [value("f64", 10000000000000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:279 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 10000000000000000000000000), + value("f64", 10000000000000000000000000), + ]), + [value("f64", 100000000000000030000000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:284 +assert_return( + () => invoke($0, `f32.mul`, [value("f32", 1848874900), value("f32", 19954563000)]), + [value("f32", 36893493000000000000)], +); + +// ./test/core/float_misc.wast:285 +assert_return( + () => invoke($0, `f64.mul`, [value("f64", 1848874847), value("f64", 19954562207)]), + [value("f64", 36893488147419110000)], +); + +// ./test/core/float_misc.wast:289 +assert_return( + () => invoke($0, `f32.mul`, [value("f32", 77.1), value("f32", 850)]), + [value("f32", 65535)], +); + +// ./test/core/float_misc.wast:290 +assert_return( + () => invoke($0, `f64.mul`, [value("f64", 77.1), value("f64", 850)]), + [value("f64", 65534.99999999999)], +); + +// ./test/core/float_misc.wast:293 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", -2493839400000000000), + value("f32", 0.000000000021176054), + ]), + [value("f32", -52809680)], +); + +// ./test/core/float_misc.wast:294 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", -6777248400000000000000000000000), + value("f32", -0.00000000000000000000000000000034758242), + ]), + [value("f32", 2.3556523)], +); + +// ./test/core/float_misc.wast:295 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", -8384397600000000000000000000), + value("f32", -0.000000000000000000000000000011948991), + ]), + [value("f32", 0.10018509)], +); + +// ./test/core/float_misc.wast:296 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", -656765400000000000000000), + value("f32", -0.000000000000000000000046889766), + ]), + [value("f32", 30.795576)], +); + +// ./test/core/float_misc.wast:297 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", 13328204000000000), + value("f32", 45.567223), + ]), + [value("f32", 607329200000000000)], +); + +// ./test/core/float_misc.wast:298 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -99426226093342430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 583177241514245140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/float_misc.wast:299 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002748155824301909), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000002093035437779455), + ]), + [value("f64", 0)], +); + +// ./test/core/float_misc.wast:300 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 464888257371302500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -159272886487254360000000000000000), + ]), + [ + value("f64", -74044094645556960000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:301 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008261927764172427), + value("f64", 36684744190529535000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -3030867065492991300000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:302 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 253838958331769250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007842892881810105), + ]), + [value("f64", 0.00000000000000000019908317594263248)], +); + +// ./test/core/float_misc.wast:305 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", -0.0000000000000000000000000020153333), + value("f32", -5031353000000000000000000000), + ]), + [value("f32", 10.139854)], +); + +// ./test/core/float_misc.wast:306 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", 12286325000000000000000), + value("f32", 749601.8), + ]), + [value("f32", 9209852000000000000000000000)], +); + +// ./test/core/float_misc.wast:307 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", -0.0000000002763514), + value("f32", -35524714000000000000000), + ]), + [value("f32", 9817304000000)], +); + +// ./test/core/float_misc.wast:308 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", 218931220000000000000), + value("f32", -40298.785), + ]), + [value("f32", -8822662000000000000000000)], +); + +// ./test/core/float_misc.wast:309 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", 1691996300), + value("f32", -122103350000000000000), + ]), + [value("f32", -206598410000000000000000000000)], +); + +// ./test/core/float_misc.wast:310 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007576316076452304), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004601355879514986), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003486132652344772), + ], +); + +// ./test/core/float_misc.wast:311 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000012228616081443885), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008055526185180067), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009850793705258527), + ], +); + +// ./test/core/float_misc.wast:312 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -2068651246039250800000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -366801071583254800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/float_misc.wast:313 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 1543238835610281000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007370621385787007), + ]), + [ + value("f64", 1137462916512617700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:314 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 2235876566242058700000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -760669005920257000000000000000000000000000000000000), + ]), + [ + value("f64", -1700762005003744000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:317 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", -110087030000000), + value("f32", -54038020000000000000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/float_misc.wast:318 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", -0.19366351), + value("f32", 0.0000000000000000000000000000029748954), + ]), + [value("f32", -0.0000000000000000000000000000005761287)], +); + +// ./test/core/float_misc.wast:319 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", -0.0000034300713), + value("f32", 77991523000000000000000000000000), + ]), + [value("f32", -267516490000000000000000000)], +); + +// ./test/core/float_misc.wast:320 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", -99003850000000000), + value("f32", 0.000000000000000000000000000020933774), + ]), + [value("f32", -0.0000000000020725242)], +); + +// ./test/core/float_misc.wast:321 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", -129919.07), + value("f32", 0.0000000000000000000000000000000000018480999), + ]), + [value("f32", -0.00000000000000000000000000000024010342)], +); + +// ./test/core/float_misc.wast:322 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006625572200844895), + value("f64", -37374020681740010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0.00000000000000000024762427246273877)], +); + +// ./test/core/float_misc.wast:323 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 821076848561758000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012976552328552289), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000010654746691124455), + ], +); + +// ./test/core/float_misc.wast:324 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -10223449294906041000000000000000000000000000000000000), + value("f64", 1970855583334680500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -20148942123804574000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:325 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 2918243080119086000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -63633170941689700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -Infinity)], +); + +// ./test/core/float_misc.wast:326 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 3407037798802672000000000), + value("f64", 1225791423971563000000), + ]), + [value("f64", 4176317714919266400000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:329 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044091927284399547), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011518840702296592), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005078878866462432), + ], +); + +// ./test/core/float_misc.wast:330 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -0.002980041826472432), + value("f64", 63125412993218000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -188116371033135940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:331 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -308344578081300100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010081049555008529), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000031084369716557833), + ], +); + +// ./test/core/float_misc.wast:332 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 349387501315677300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 2131316915930809900), + ]), + [ + value("f64", 744655491768901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:333 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000012500108005100234), + value("f64", 1035265704160467500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -12940933115981990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:336 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008947461661755698), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020853844141312436), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018658897095462173), + ], +); + +// ./test/core/float_misc.wast:337 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -0.00000000000000001161813037330394), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018737038135583668), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021768935186877886), + ], +); + +// ./test/core/float_misc.wast:338 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021752326768352433), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006631210068072052), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014424424827029184), + ], +); + +// ./test/core/float_misc.wast:339 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007149518157441743), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000022770445062365393), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001627977104264113), + ], +); + +// ./test/core/float_misc.wast:340 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004817739302150786), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025375023049719763), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012225024583961697), + ], +); + +// ./test/core/float_misc.wast:343 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 46576441629501554000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007021344893525714), + ]), + [value("f64", 0.000000003270292605938992)], +); + +// ./test/core/float_misc.wast:344 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 0.012451716278313712), + value("f64", 0.000000000000000000000000000000000000000000001945309177849331), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000002422243795617958), + ], +); + +// ./test/core/float_misc.wast:345 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -3.8312314777598586), + value("f64", 0.0000000000009039887741742674), + ]), + [value("f64", -0.0000000000034633902471580017)], +); + +// ./test/core/float_misc.wast:346 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009843582638849689), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000003375405654777583), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033226084502443684), + ], +); + +// ./test/core/float_misc.wast:347 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", -260544537094514460000000), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032887528185809035), + ]), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000008568665807354412), + ], +); + +// ./test/core/float_misc.wast:350 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", 0.00000000000000000000002646978), + value("f32", 0.00000000000000000000002646978), + ]), + [value("f32", 0)], +); + +// ./test/core/float_misc.wast:351 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", 0.000000000000000000000026469783), + value("f32", 0.000000000000000000000026469783), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/float_misc.wast:352 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015717277847026285), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015717277847026285), + ]), + [value("f64", 0)], +); + +// ./test/core/float_misc.wast:353 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015717277847026288), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015717277847026288), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/float_misc.wast:356 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", 18446743000000000000), + value("f32", 18446743000000000000), + ]), + [value("f32", 340282330000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:357 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", 18446744000000000000), + value("f32", 18446744000000000000), + ]), + [value("f32", Infinity)], +); + +// ./test/core/float_misc.wast:358 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 13407807929942596000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 13407807929942596000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 179769313486231550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:359 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 13407807929942597000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 13407807929942597000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", Infinity)], +); + +// ./test/core/float_misc.wast:362 +assert_return( + () => invoke($0, `f32.mul`, [value("f32", 1.0000001), value("f32", 1.0000001)]), + [value("f32", 1.0000002)], +); + +// ./test/core/float_misc.wast:363 +assert_return( + () => invoke($0, `f32.mul`, [value("f32", 0.99999994), value("f32", 0.99999994)]), + [value("f32", 0.9999999)], +); + +// ./test/core/float_misc.wast:364 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 1.0000000000000002), + value("f64", 1.0000000000000002), + ]), + [value("f64", 1.0000000000000004)], +); + +// ./test/core/float_misc.wast:365 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 0.9999999999999999), + value("f64", 0.9999999999999999), + ]), + [value("f64", 0.9999999999999998)], +); + +// ./test/core/float_misc.wast:368 +assert_return( + () => invoke($0, `f32.mul`, [value("f32", 1.0000001), value("f32", 0.99999994)]), + [value("f32", 1)], +); + +// ./test/core/float_misc.wast:369 +assert_return( + () => invoke($0, `f32.mul`, [value("f32", 1.0000002), value("f32", 0.9999999)]), + [value("f32", 1.0000001)], +); + +// ./test/core/float_misc.wast:370 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 1.0000000000000002), + value("f64", 0.9999999999999999), + ]), + [value("f64", 1)], +); + +// ./test/core/float_misc.wast:371 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 1.0000000000000004), + value("f64", 0.9999999999999998), + ]), + [value("f64", 1.0000000000000002)], +); + +// ./test/core/float_misc.wast:375 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.00000011920929), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/float_misc.wast:376 +assert_return( + () => invoke($0, `f64.mul`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.0000000000000002220446049250313), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/float_misc.wast:379 +assert_return( + () => invoke($0, `f32.mul`, [ + value("f32", -16.001465), + value("f32", 0.000000000000000000000000000000000000000298465), + ]), + [value("f32", -0.000000000000000000000000000000000000004775883)], +); + +// ./test/core/float_misc.wast:382 +assert_return( + () => invoke($0, `f32.div`, [value("f32", 1.1234568), value("f32", 100)]), + [value("f32", 0.011234568)], +); + +// ./test/core/float_misc.wast:383 +assert_return( + () => invoke($0, `f32.div`, [value("f32", 8391667), value("f32", 12582905)]), + [value("f32", 0.6669102)], +); + +// ./test/core/float_misc.wast:384 +assert_return( + () => invoke($0, `f32.div`, [value("f32", 65536), value("f32", 0.000000000007275958)]), + [value("f32", 9007199000000000)], +); + +// ./test/core/float_misc.wast:385 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 1.8622957), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000005472795)], +); + +// ./test/core/float_misc.wast:386 +assert_return( + () => invoke($0, `f32.div`, [value("f32", 4), value("f32", 3)]), + [value("f32", 1.3333334)], +); + +// ./test/core/float_misc.wast:387 +assert_return( + () => invoke($0, `f64.div`, [value("f64", 1.123456789), value("f64", 100)]), + [value("f64", 0.01123456789)], +); + +// ./test/core/float_misc.wast:388 +assert_return( + () => invoke($0, `f64.div`, [value("f64", 8391667), value("f64", 12582905)]), + [value("f64", 0.6669101451532854)], +); + +// ./test/core/float_misc.wast:389 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 65536), + value("f64", 0.000000000007275957614183426), + ]), + [value("f64", 9007199254740992)], +); + +// ./test/core/float_misc.wast:390 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 1.8622957468032837), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001035936395755283), + ], +); + +// ./test/core/float_misc.wast:391 +assert_return( + () => invoke($0, `f64.div`, [value("f64", 4), value("f64", 3)]), + [value("f64", 1.3333333333333333)], +); + +// ./test/core/float_misc.wast:395 +assert_return( + () => invoke($0, `f32.div`, [value("f32", 4195835), value("f32", 3145727)]), + [value("f32", 1.3338205)], +); + +// ./test/core/float_misc.wast:396 +assert_return( + () => invoke($0, `f64.div`, [value("f64", 4195835), value("f64", 3145727)]), + [value("f64", 1.333820449136241)], +); + +// ./test/core/float_misc.wast:399 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 0.000000000000005029633), + value("f32", 336324380000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/float_misc.wast:400 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 0.000000000000000000000000008921987), + value("f32", 354097530000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/float_misc.wast:401 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", -104167.47), + value("f32", 0.0000000000000000000000015866623), + ]), + [value("f32", -65651950000000000000000000000)], +); + +// ./test/core/float_misc.wast:402 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", -0.000000000000000000000024938657), + value("f32", -0.00000000000000000000000000000000000036230088), + ]), + [value("f32", 68834107000000)], +); + +// ./test/core/float_misc.wast:403 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", -4142204200000), + value("f32", 0.0000000000000000000000011954948), + ]), + [value("f32", -3464845000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:404 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 193901163824483840000000000000000000000000000), + value("f64", 25290742357348314000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0.000000000000000000000007666883046955921)], +); + +// ./test/core/float_misc.wast:405 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006600332149752304), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003007915153468629), + ]), + [ + value("f64", 219432125342399270000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:406 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -934827517366190300000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4809309529035847000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000019437873809582001), + ], +); + +// ./test/core/float_misc.wast:407 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -17598339088417535000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 199386072580682850000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -88262629684409150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:408 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -4566268877844991000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 31282495822334530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -145968816036246260000000000)], +); + +// ./test/core/float_misc.wast:411 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", -1039406400000000000000), + value("f32", -0.000000000000000000000000012965966), + ]), + [value("f32", Infinity)], +); + +// ./test/core/float_misc.wast:412 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 0.000000000000026831563), + value("f32", 31241038000000), + ]), + [value("f32", 0.0000000000000000000000000008588563)], +); + +// ./test/core/float_misc.wast:413 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 1.2734247), + value("f32", -692783700000000000000000000), + ]), + [value("f32", -0.0000000000000000000000000018381274)], +); + +// ./test/core/float_misc.wast:414 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 0.00000000000000068988827), + value("f32", 0.000000000000000000000000000000000000003762676), + ]), + [value("f32", 183350460000000000000000)], +); + +// ./test/core/float_misc.wast:415 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 1819916200000000000000000000), + value("f32", 205067030000000000000000000), + ]), + [value("f32", 8.874739)], +); + +// ./test/core/float_misc.wast:416 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021137715924428077), + value("f64", -16733261612910253000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0)], +); + +// ./test/core/float_misc.wast:417 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008116644948016275), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006517571349002277), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012453480772801648), + ], +); + +// ./test/core/float_misc.wast:418 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009335476912259029), + value("f64", -39099281466396.5), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023876338802497726), + ], +); + +// ./test/core/float_misc.wast:419 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -1686856985488590200000000), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013535993861076857), + ]), + [ + value("f64", -12462010568276012000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:420 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -173388773324941200000000000000000000000000000000000000000000000000000000), + value("f64", -70026160475217470), + ]), + [value("f64", 2476057121342590000000000000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:423 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 93506190), + value("f32", 0.0000000000000000000000000000000000028760885), + ]), + [value("f32", Infinity)], +); + +// ./test/core/float_misc.wast:424 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", -200575400000000000000000), + value("f32", 246697220), + ]), + [value("f32", -813042800000000)], +); + +// ./test/core/float_misc.wast:425 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 384712200000), + value("f32", -107037850000000000000000000000), + ]), + [value("f32", -0.00000000000000000359417)], +); + +// ./test/core/float_misc.wast:426 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", -4156665000000000000000000000000000), + value("f32", -901.4192), + ]), + [value("f32", 4611245300000000000000000000000)], +); + +// ./test/core/float_misc.wast:427 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", -6702387000000000000000000000), + value("f32", -14000.255), + ]), + [value("f32", 478733200000000000000000)], +); + +// ./test/core/float_misc.wast:428 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010085269598907525), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018780374032850215), + ]), + [value("f64", -53701111496.85621)], +); + +// ./test/core/float_misc.wast:429 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -32571664562951100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005885738519211168), + ]), + [value("f64", Infinity)], +); + +// ./test/core/float_misc.wast:430 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000031640946861233317), + value("f64", 0.000000000000000000045854510556516254), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006900291046010721), + ], +); + +// ./test/core/float_misc.wast:431 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -526842242946656600000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014816907071451201), + ]), + [ + value("f64", 355568298030134360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:432 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 4039956270017490000000000000000000000000000000000000000), + value("f64", -47097881971884274000000000000000000000000000000000000000000000000), + ]), + [value("f64", -0.0000000000857778757955442)], +); + +// ./test/core/float_misc.wast:435 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -203959560468347600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -74740887394612260000000000000000000000000000000000000000000), + ]), + [ + value("f64", 2728888665604071000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:436 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -304261712294687660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -2655679232658824300000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 114570204320220420000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:437 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 49235240512480730000000000000000000000000000000000000000), + value("f64", -366340828310036700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013439736089369927), + ], +); + +// ./test/core/float_misc.wast:438 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 289260843556341600000000000000000000000000000000000000000000000000), + value("f64", 517194875837335500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000005592879146144478), + ], +); + +// ./test/core/float_misc.wast:439 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -421542582344268600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1428505854670649100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -295093352936560340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:442 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 1.8622957433108482), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010359363938125513), + ], +); + +// ./test/core/float_misc.wast:443 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008566632480779937), + value("f64", 5381.2699796556235), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001591935084685746), + ], +); + +// ./test/core/float_misc.wast:444 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -0.00000000000000000000000000000000000000000008196220919495565), + value("f64", -10406557086484777000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007876015911295176), + ], +); + +// ./test/core/float_misc.wast:445 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007052801866447111), + value("f64", -13767429405781133000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005122816800851397), + ], +); + +// ./test/core/float_misc.wast:446 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022655621734165475), + value("f64", 133219932963494700000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017006180103974106), + ], +); + +// ./test/core/float_misc.wast:447 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004196304106554003), + value("f64", -9789327.297653636), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042866113053139), + ], +); + +// ./test/core/float_misc.wast:450 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 1038860800000000000000000000), + value("f32", 6211079500000), + ]), + [value("f32", 167259300000000)], +); + +// ./test/core/float_misc.wast:451 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 1869033000000000000000000000), + value("f32", -112355730000000000000000000000000), + ]), + [value("f32", -0.00001663496)], +); + +// ./test/core/float_misc.wast:452 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 3290747200000000000000000), + value("f32", 0.9064788), + ]), + [value("f32", 3630252700000000000000000)], +); + +// ./test/core/float_misc.wast:453 +assert_return( + () => invoke($0, `f32.div`, [value("f32", -908946.56), value("f32", -17034289000)]), + [value("f32", 0.000053359818)], +); + +// ./test/core/float_misc.wast:454 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", -0.00000000000024092477), + value("f32", -89840810000000000), + ]), + [value("f32", 0.0000000000000000000000000000026816852)], +); + +// ./test/core/float_misc.wast:455 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 3910973045785834000), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008392730733897136), + ]), + [ + value("f64", -46599529638070336000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:456 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.0000000000000000000000000000000000000008379351966732404), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021077277802048832), + ]), + [ + value("f64", -3975538039318286000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:457 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 4561142017854715000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 1500578067736849100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 3039589952.6465592)], +); + +// ./test/core/float_misc.wast:458 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -6236072401827852000000000000000000000000000000000000000), + value("f64", 83170632504609900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007497925907299316), + ], +); + +// ./test/core/float_misc.wast:459 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009757271330468098), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035613812243480865), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000002739743575824061), + ], +); + +// ./test/core/float_misc.wast:462 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.00000000000000001046256872449641), + value("f64", 1.8150892711657447), + ]), + [value("f64", 0.000000000000000005764217160391678)], +); + +// ./test/core/float_misc.wast:463 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.00000000000000000000000000000022038268106596436), + value("f64", -0.0000000000002859803943943555), + ]), + [value("f64", -0.0000000000000000007706216418530616)], +); + +// ./test/core/float_misc.wast:464 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.0000000000007596539988437179), + value("f64", 0.00000000000000000000000000000000021055358831337124), + ]), + [value("f64", 3607889112357986600000)], +); + +// ./test/core/float_misc.wast:465 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 1120696114500866900000000000), + value("f64", 159713233802866500000000000000), + ]), + [value("f64", 0.007016927074960728)], +); + +// ./test/core/float_misc.wast:466 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.0006342142502301953), + value("f64", -6391950865520085), + ]), + [value("f64", -0.00000000000000000009922076429769178)], +); + +// ./test/core/float_misc.wast:469 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754942), + ]), + [value("f32", 1.0000001)], +); + +// ./test/core/float_misc.wast:470 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754944), + ]), + [value("f32", 0.9999999)], +); + +// ./test/core/float_misc.wast:471 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ]), + [value("f64", 1.0000000000000002)], +); + +// ./test/core/float_misc.wast:472 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [value("f64", 0.9999999999999998)], +); + +// ./test/core/float_misc.wast:475 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 0.00000023841856), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0)], +); + +// ./test/core/float_misc.wast:476 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 0.00000023841858), + value("f32", 340282350000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000000000001)], +); + +// ./test/core/float_misc.wast:477 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.00000000000000044408920985006257), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 0)], +); + +// ./test/core/float_misc.wast:478 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.0000000000000004440892098500626), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/float_misc.wast:481 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000002938736), + ]), + [value("f32", Infinity)], +); + +// ./test/core/float_misc.wast:482 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 1), + value("f32", 0.000000000000000000000000000000000000002938737), + ]), + [value("f32", 340282200000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:483 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 1), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + ]), + [value("f64", Infinity)], +); + +// ./test/core/float_misc.wast:484 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 1), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000556268464626801), + ]), + [ + value("f64", 179769313486231430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:487 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 1), + value("f32", 85070600000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000011754942)], +); + +// ./test/core/float_misc.wast:488 +assert_return( + () => invoke($0, `f32.div`, [ + value("f32", 1), + value("f32", 85070590000000000000000000000000000000), + ]), + [value("f32", 0.000000000000000000000000000000000000011754944)], +); + +// ./test/core/float_misc.wast:489 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 1), + value("f64", 44942328371557910000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ], +); + +// ./test/core/float_misc.wast:490 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 1), + value("f64", 44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/float_misc.wast:500 +assert_return( + () => invoke($0, `f32.div`, [value("f32", 1), value("f32", 3)]), + [value("f32", 0.33333334)], +); + +// ./test/core/float_misc.wast:501 +assert_return( + () => invoke($0, `f32.div`, [value("f32", 3), value("f32", 9)]), + [value("f32", 0.33333334)], +); + +// ./test/core/float_misc.wast:502 +assert_return( + () => invoke($0, `f32.div`, [value("f32", 9), value("f32", 27)]), + [value("f32", 0.33333334)], +); + +// ./test/core/float_misc.wast:503 +assert_return( + () => invoke($0, `f64.div`, [value("f64", 1), value("f64", 3)]), + [value("f64", 0.3333333333333333)], +); + +// ./test/core/float_misc.wast:504 +assert_return( + () => invoke($0, `f64.div`, [value("f64", 3), value("f64", 9)]), + [value("f64", 0.3333333333333333)], +); + +// ./test/core/float_misc.wast:505 +assert_return( + () => invoke($0, `f64.div`, [value("f64", 9), value("f64", 27)]), + [value("f64", 0.3333333333333333)], +); + +// ./test/core/float_misc.wast:508 +assert_return( + () => invoke($0, `f32.div`, [value("f32", 1.0000001), value("f32", 0.99999994)]), + [value("f32", 1.0000002)], +); + +// ./test/core/float_misc.wast:509 +assert_return( + () => invoke($0, `f32.div`, [value("f32", 0.99999994), value("f32", 1.0000001)]), + [value("f32", 0.9999998)], +); + +// ./test/core/float_misc.wast:510 +assert_return( + () => invoke($0, `f32.div`, [value("f32", 1), value("f32", 0.99999994)]), + [value("f32", 1.0000001)], +); + +// ./test/core/float_misc.wast:511 +assert_return( + () => invoke($0, `f32.div`, [value("f32", 1), value("f32", 1.0000001)]), + [value("f32", 0.9999999)], +); + +// ./test/core/float_misc.wast:512 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 1.0000000000000002), + value("f64", 0.9999999999999999), + ]), + [value("f64", 1.0000000000000004)], +); + +// ./test/core/float_misc.wast:513 +assert_return( + () => invoke($0, `f64.div`, [ + value("f64", 0.9999999999999999), + value("f64", 1.0000000000000002), + ]), + [value("f64", 0.9999999999999997)], +); + +// ./test/core/float_misc.wast:514 +assert_return( + () => invoke($0, `f64.div`, [value("f64", 1), value("f64", 0.9999999999999999)]), + [value("f64", 1.0000000000000002)], +); + +// ./test/core/float_misc.wast:515 +assert_return( + () => invoke($0, `f64.div`, [value("f64", 1), value("f64", 1.0000000000000002)]), + [value("f64", 0.9999999999999998)], +); + +// ./test/core/float_misc.wast:519 +assert_return(() => invoke($0, `f32.sqrt`, [value("f32", 171)]), [value("f32", 13.076696)]); + +// ./test/core/float_misc.wast:520 +assert_return( + () => invoke($0, `f32.sqrt`, [value("f32", 0.000000160795)]), + [value("f32", 0.00040099252)], +); + +// ./test/core/float_misc.wast:521 +assert_return(() => invoke($0, `f64.sqrt`, [value("f64", 171)]), [value("f64", 13.076696830622021)]); + +// ./test/core/float_misc.wast:522 +assert_return( + () => invoke($0, `f64.sqrt`, [value("f64", 0.000000160795)]), + [value("f64", 0.00040099251863345283)], +); + +// ./test/core/float_misc.wast:525 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 0.00000000000000000000000000000000000000000000000004316357580352844), + ]), + [value("f64", 0.00000000000000000000000020775845543209175)], +); + +// ./test/core/float_misc.wast:526 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 676253300479648500000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 822346216918183800000000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:527 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 17485296624861996000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 4181542373916829400000000000000000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:528 +assert_return( + () => invoke($0, `f64.sqrt`, [value("f64", 0.000000000009593720960603523)]), + [value("f64", 0.0000030973732355987585)], +); + +// ./test/core/float_misc.wast:529 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006348452898717835), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000002519613640762773), + ], +); + +// ./test/core/float_misc.wast:533 +assert_return( + () => invoke($0, `f64.sqrt`, [value("f64", 0.9999999999999999)]), + [value("f64", 0.9999999999999999)], +); + +// ./test/core/float_misc.wast:536 +assert_return(() => invoke($0, `f32.sqrt`, [value("f32", 0.12963942)]), [value("f32", 0.36005473)]); + +// ./test/core/float_misc.wast:537 +assert_return( + () => invoke($0, `f32.sqrt`, [value("f32", 2345875800000000000000000000000)]), + [value("f32", 1531625200000000)], +); + +// ./test/core/float_misc.wast:538 +assert_return(() => invoke($0, `f32.sqrt`, [value("f32", 0.078786574)]), [value("f32", 0.28068945)]); + +// ./test/core/float_misc.wast:539 +assert_return( + () => invoke($0, `f32.sqrt`, [value("f32", 0.00000000000000000000051371026)]), + [value("f32", 0.000000000022665177)], +); + +// ./test/core/float_misc.wast:540 +assert_return(() => invoke($0, `f32.sqrt`, [value("f32", 0.00090167153)]), [value("f32", 0.030027846)]); + +// ./test/core/float_misc.wast:541 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009591922760825561), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009793836204892116), + ], +); + +// ./test/core/float_misc.wast:542 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 935787535216400500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 30590644570136150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:543 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 147706699783365580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [value("f64", 12153464517715332000000000000000000000000000000000000000000)], +); + +// ./test/core/float_misc.wast:544 +assert_return( + () => invoke($0, `f64.sqrt`, [value("f64", 48800457180027890000000000000000)]), + [value("f64", 6985732401117859)], +); + +// ./test/core/float_misc.wast:545 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 7618977687174540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 2760249569726357000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:548 +assert_return(() => invoke($0, `f32.sqrt`, [value("f32", 154481010)]), [value("f32", 12429.039)]); + +// ./test/core/float_misc.wast:549 +assert_return( + () => invoke($0, `f32.sqrt`, [ + value("f32", 0.00000000000000000000000000000000010471305), + ]), + [value("f32", 0.00000000000000001023294)], +); + +// ./test/core/float_misc.wast:550 +assert_return(() => invoke($0, `f32.sqrt`, [value("f32", 0.00003790637)]), [value("f32", 0.006156815)]); + +// ./test/core/float_misc.wast:551 +assert_return( + () => invoke($0, `f32.sqrt`, [ + value("f32", 0.00000000000000000000000000000000000089607535), + ]), + [value("f32", 0.0000000000000000009466126)], +); + +// ./test/core/float_misc.wast:552 +assert_return( + () => invoke($0, `f32.sqrt`, [ + value("f32", 0.0000000000000000000000000000000000001687712), + ]), + [value("f32", 0.00000000000000000041081773)], +); + +// ./test/core/float_misc.wast:553 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 316996264378909500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 563024212959717700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:554 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040573669271847993), + ]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020142906759414837), + ], +); + +// ./test/core/float_misc.wast:555 +assert_return( + () => invoke($0, `f64.sqrt`, [value("f64", 0.0000000015299861660588838)]), + [value("f64", 0.00003911503759500793)], +); + +// ./test/core/float_misc.wast:556 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000002822766928951239), + ]), + [value("f64", 0.0000000000000000000000000000000000005312971794533864)], +); + +// ./test/core/float_misc.wast:557 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 14375957727045067000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 119899782014168260000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:560 +assert_return( + () => invoke($0, `f32.sqrt`, [value("f32", 464023420000000000000000000000000000)]), + [value("f32", 681192700000000000)], +); + +// ./test/core/float_misc.wast:561 +assert_return(() => invoke($0, `f32.sqrt`, [value("f32", 47536.133)]), [value("f32", 218.02783)]); + +// ./test/core/float_misc.wast:562 +assert_return(() => invoke($0, `f32.sqrt`, [value("f32", 0.812613)]), [value("f32", 0.9014505)]); + +// ./test/core/float_misc.wast:563 +assert_return( + () => invoke($0, `f32.sqrt`, [value("f32", 0.000000000000000000000000009549605)]), + [value("f32", 0.00000000000009772208)], +); + +// ./test/core/float_misc.wast:564 +assert_return( + () => invoke($0, `f32.sqrt`, [value("f32", 0.000000000000000000000000000068856485)]), + [value("f32", 0.000000000000008297981)], +); + +// ./test/core/float_misc.wast:565 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 2349768917495332200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 1532895599020146000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:566 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029262574743429683), + ]), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000005409489323718985), + ], +); + +// ./test/core/float_misc.wast:567 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 377335087484490800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 19425114864126050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:568 +assert_return( + () => invoke($0, `f64.sqrt`, [value("f64", 0.000000000000035498432023945234)]), + [value("f64", 0.00000018841027579180822)], +); + +// ./test/core/float_misc.wast:569 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013747419336166767), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000011724938949165905), + ], +); + +// ./test/core/float_misc.wast:572 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015535152663257847), + ]), + [`canonical_nan`], +); + +// ./test/core/float_misc.wast:573 +assert_return( + () => invoke($0, `f64.sqrt`, [value("f64", 18763296348029700000000000000000)]), + [value("f64", 4331662076851067)], +); + +// ./test/core/float_misc.wast:574 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000274405777036165), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000523837548325972), + ], +); + +// ./test/core/float_misc.wast:575 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000015613859952920445), + ]), + [value("f64", 0.0000000000000000000000000000000000000000039514377070783294)], +); + +// ./test/core/float_misc.wast:576 +assert_return( + () => invoke($0, `f64.sqrt`, [ + value("f64", 619303768945071200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + value("f64", 24885814612848646000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/float_misc.wast:579 +assert_return(() => invoke($0, `f32.sqrt`, [value("f32", 1.0000001)]), [value("f32", 1)]); + +// ./test/core/float_misc.wast:580 +assert_return(() => invoke($0, `f32.sqrt`, [value("f32", 1.0000002)]), [value("f32", 1.0000001)]); + +// ./test/core/float_misc.wast:581 +assert_return(() => invoke($0, `f64.sqrt`, [value("f64", 1.0000000000000002)]), [value("f64", 1)]); + +// ./test/core/float_misc.wast:582 +assert_return( + () => invoke($0, `f64.sqrt`, [value("f64", 1.0000000000000004)]), + [value("f64", 1.0000000000000002)], +); + +// ./test/core/float_misc.wast:585 +assert_return(() => invoke($0, `f32.sqrt`, [value("f32", 0.9999999)]), [value("f32", 0.99999994)]); + +// ./test/core/float_misc.wast:586 +assert_return(() => invoke($0, `f32.sqrt`, [value("f32", 0.9999998)]), [value("f32", 0.9999999)]); + +// ./test/core/float_misc.wast:587 +assert_return( + () => invoke($0, `f64.sqrt`, [value("f64", 0.9999999999999998)]), + [value("f64", 0.9999999999999999)], +); + +// ./test/core/float_misc.wast:588 +assert_return( + () => invoke($0, `f64.sqrt`, [value("f64", 0.9999999999999997)]), + [value("f64", 0.9999999999999998)], +); + +// ./test/core/float_misc.wast:592 +assert_return( + () => invoke($0, `f32.abs`, [bytes("f32", [0xe2, 0xf1, 0x80, 0x7f])]), + [bytes("f32", [0xe2, 0xf1, 0x80, 0x7f])], +); + +// ./test/core/float_misc.wast:593 +assert_return( + () => invoke($0, `f32.abs`, [bytes("f32", [0xe2, 0xf1, 0x80, 0xff])]), + [bytes("f32", [0xe2, 0xf1, 0x80, 0x7f])], +); + +// ./test/core/float_misc.wast:594 +assert_return( + () => invoke($0, `f64.abs`, [ + bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0x7f]), + ]), + [bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0x7f])], +); + +// ./test/core/float_misc.wast:595 +assert_return( + () => invoke($0, `f64.abs`, [ + bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0xff]), + ]), + [bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0x7f])], +); + +// ./test/core/float_misc.wast:597 +assert_return( + () => invoke($0, `f32.neg`, [bytes("f32", [0xe2, 0xf1, 0x80, 0x7f])]), + [bytes("f32", [0xe2, 0xf1, 0x80, 0xff])], +); + +// ./test/core/float_misc.wast:598 +assert_return( + () => invoke($0, `f32.neg`, [bytes("f32", [0xe2, 0xf1, 0x80, 0xff])]), + [bytes("f32", [0xe2, 0xf1, 0x80, 0x7f])], +); + +// ./test/core/float_misc.wast:599 +assert_return( + () => invoke($0, `f64.neg`, [ + bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0x7f]), + ]), + [bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0xff])], +); + +// ./test/core/float_misc.wast:600 +assert_return( + () => invoke($0, `f64.neg`, [ + bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0xff]), + ]), + [bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0x7f])], +); + +// ./test/core/float_misc.wast:602 +assert_return( + () => invoke($0, `f32.copysign`, [ + bytes("f32", [0xe2, 0xf1, 0x80, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [bytes("f32", [0xe2, 0xf1, 0x80, 0x7f])], +); + +// ./test/core/float_misc.wast:603 +assert_return( + () => invoke($0, `f32.copysign`, [ + bytes("f32", [0xe2, 0xf1, 0x80, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [bytes("f32", [0xe2, 0xf1, 0x80, 0xff])], +); + +// ./test/core/float_misc.wast:604 +assert_return( + () => invoke($0, `f32.copysign`, [ + bytes("f32", [0xe2, 0xf1, 0x80, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [bytes("f32", [0xe2, 0xf1, 0x80, 0x7f])], +); + +// ./test/core/float_misc.wast:605 +assert_return( + () => invoke($0, `f32.copysign`, [ + bytes("f32", [0xe2, 0xf1, 0x80, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ]), + [bytes("f32", [0xe2, 0xf1, 0x80, 0xff])], +); + +// ./test/core/float_misc.wast:606 +assert_return( + () => invoke($0, `f64.copysign`, [ + bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0x7f])], +); + +// ./test/core/float_misc.wast:607 +assert_return( + () => invoke($0, `f64.copysign`, [ + bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0xff])], +); + +// ./test/core/float_misc.wast:608 +assert_return( + () => invoke($0, `f64.copysign`, [ + bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0x7f])], +); + +// ./test/core/float_misc.wast:609 +assert_return( + () => invoke($0, `f64.copysign`, [ + bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [bytes("f64", [0x6b, 0x7a, 0xe2, 0xf1, 0x0, 0x0, 0xf0, 0xff])], +); + +// ./test/core/float_misc.wast:612 +assert_return(() => invoke($0, `f32.ceil`, [value("f32", 0.99999994)]), [value("f32", 1)]); + +// ./test/core/float_misc.wast:613 +assert_return(() => invoke($0, `f32.ceil`, [value("f32", 1.0000001)]), [value("f32", 2)]); + +// ./test/core/float_misc.wast:614 +assert_return(() => invoke($0, `f64.ceil`, [value("f64", 0.9999999999999999)]), [value("f64", 1)]); + +// ./test/core/float_misc.wast:615 +assert_return(() => invoke($0, `f64.ceil`, [value("f64", 1.0000000000000002)]), [value("f64", 2)]); + +// ./test/core/float_misc.wast:618 +assert_return(() => invoke($0, `f32.ceil`, [value("f32", 8388607.5)]), [value("f32", 8388608)]); + +// ./test/core/float_misc.wast:619 +assert_return(() => invoke($0, `f32.ceil`, [value("f32", -8388607.5)]), [value("f32", -8388607)]); + +// ./test/core/float_misc.wast:620 +assert_return( + () => invoke($0, `f64.ceil`, [value("f64", 4503599627370495.5)]), + [value("f64", 4503599627370496)], +); + +// ./test/core/float_misc.wast:621 +assert_return( + () => invoke($0, `f64.ceil`, [value("f64", -4503599627370495.5)]), + [value("f64", -4503599627370495)], +); + +// ./test/core/float_misc.wast:625 +assert_return(() => invoke($0, `f32.ceil`, [value("f32", 16777215)]), [value("f32", 16777215)]); + +// ./test/core/float_misc.wast:626 +assert_return(() => invoke($0, `f32.ceil`, [value("f32", -16777215)]), [value("f32", -16777215)]); + +// ./test/core/float_misc.wast:627 +assert_return( + () => invoke($0, `f64.ceil`, [value("f64", 9007199254740991)]), + [value("f64", 9007199254740991)], +); + +// ./test/core/float_misc.wast:628 +assert_return( + () => invoke($0, `f64.ceil`, [value("f64", -9007199254740991)]), + [value("f64", -9007199254740991)], +); + +// ./test/core/float_misc.wast:631 +assert_return(() => invoke($0, `f32.floor`, [value("f32", -0.99999994)]), [value("f32", -1)]); + +// ./test/core/float_misc.wast:632 +assert_return(() => invoke($0, `f32.floor`, [value("f32", -1.0000001)]), [value("f32", -2)]); + +// ./test/core/float_misc.wast:633 +assert_return(() => invoke($0, `f64.floor`, [value("f64", -0.9999999999999999)]), [value("f64", -1)]); + +// ./test/core/float_misc.wast:634 +assert_return(() => invoke($0, `f64.floor`, [value("f64", -1.0000000000000002)]), [value("f64", -2)]); + +// ./test/core/float_misc.wast:637 +assert_return(() => invoke($0, `f32.floor`, [value("f32", -8388607.5)]), [value("f32", -8388608)]); + +// ./test/core/float_misc.wast:638 +assert_return(() => invoke($0, `f32.floor`, [value("f32", 8388607.5)]), [value("f32", 8388607)]); + +// ./test/core/float_misc.wast:639 +assert_return( + () => invoke($0, `f64.floor`, [value("f64", -4503599627370495.5)]), + [value("f64", -4503599627370496)], +); + +// ./test/core/float_misc.wast:640 +assert_return( + () => invoke($0, `f64.floor`, [value("f64", 4503599627370495.5)]), + [value("f64", 4503599627370495)], +); + +// ./test/core/float_misc.wast:644 +assert_return(() => invoke($0, `f32.floor`, [value("f32", 88607)]), [value("f32", 88607)]); + +// ./test/core/float_misc.wast:645 +assert_return(() => invoke($0, `f64.floor`, [value("f64", 88607)]), [value("f64", 88607)]); + +// ./test/core/float_misc.wast:648 +assert_return(() => invoke($0, `f32.trunc`, [value("f32", -8388607.5)]), [value("f32", -8388607)]); + +// ./test/core/float_misc.wast:649 +assert_return(() => invoke($0, `f32.trunc`, [value("f32", 8388607.5)]), [value("f32", 8388607)]); + +// ./test/core/float_misc.wast:650 +assert_return( + () => invoke($0, `f64.trunc`, [value("f64", -4503599627370495.5)]), + [value("f64", -4503599627370495)], +); + +// ./test/core/float_misc.wast:651 +assert_return( + () => invoke($0, `f64.trunc`, [value("f64", 4503599627370495.5)]), + [value("f64", 4503599627370495)], +); + +// ./test/core/float_misc.wast:656 +assert_return(() => invoke($0, `f32.nearest`, [value("f32", 8388609)]), [value("f32", 8388609)]); + +// ./test/core/float_misc.wast:657 +assert_return(() => invoke($0, `f32.nearest`, [value("f32", 8388610)]), [value("f32", 8388610)]); + +// ./test/core/float_misc.wast:658 +assert_return(() => invoke($0, `f32.nearest`, [value("f32", 0.49999997)]), [value("f32", 0)]); + +// ./test/core/float_misc.wast:659 +assert_return( + () => invoke($0, `f32.nearest`, [value("f32", 281474960000000)]), + [value("f32", 281474960000000)], +); + +// ./test/core/float_misc.wast:660 +assert_return( + () => invoke($0, `f64.nearest`, [value("f64", 4503599627370497)]), + [value("f64", 4503599627370497)], +); + +// ./test/core/float_misc.wast:661 +assert_return( + () => invoke($0, `f64.nearest`, [value("f64", 4503599627370498)]), + [value("f64", 4503599627370498)], +); + +// ./test/core/float_misc.wast:662 +assert_return(() => invoke($0, `f64.nearest`, [value("f64", 0.49999999999999994)]), [value("f64", 0)]); + +// ./test/core/float_misc.wast:663 +assert_return( + () => invoke($0, `f64.nearest`, [value("f64", 81129638414606670000000000000000)]), + [value("f64", 81129638414606670000000000000000)], +); + +// ./test/core/float_misc.wast:667 +assert_return(() => invoke($0, `f32.nearest`, [value("f32", 4.5)]), [value("f32", 4)]); + +// ./test/core/float_misc.wast:668 +assert_return(() => invoke($0, `f32.nearest`, [value("f32", -4.5)]), [value("f32", -4)]); + +// ./test/core/float_misc.wast:669 +assert_return(() => invoke($0, `f32.nearest`, [value("f32", -3.5)]), [value("f32", -4)]); + +// ./test/core/float_misc.wast:670 +assert_return(() => invoke($0, `f64.nearest`, [value("f64", 4.5)]), [value("f64", 4)]); + +// ./test/core/float_misc.wast:671 +assert_return(() => invoke($0, `f64.nearest`, [value("f64", -4.5)]), [value("f64", -4)]); + +// ./test/core/float_misc.wast:672 +assert_return(() => invoke($0, `f64.nearest`, [value("f64", -3.5)]), [value("f64", -4)]); + +// ./test/core/float_misc.wast:675 +assert_return(() => invoke($0, `f32.nearest`, [value("f32", -8388607.5)]), [value("f32", -8388608)]); + +// ./test/core/float_misc.wast:676 +assert_return(() => invoke($0, `f32.nearest`, [value("f32", 8388607.5)]), [value("f32", 8388608)]); + +// ./test/core/float_misc.wast:677 +assert_return( + () => invoke($0, `f64.nearest`, [value("f64", -4503599627370495.5)]), + [value("f64", -4503599627370496)], +); + +// ./test/core/float_misc.wast:678 +assert_return( + () => invoke($0, `f64.nearest`, [value("f64", 4503599627370495.5)]), + [value("f64", 4503599627370496)], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/forward.wast.js b/js/src/jit-test/tests/wasm/spec/spec/forward.wast.js new file mode 100644 index 0000000000..49bd1bda87 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/forward.wast.js @@ -0,0 +1,45 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/forward.wast + +// ./test/core/forward.wast:1 +let $0 = instantiate(`(module + (func $$even (export "even") (param $$n i32) (result i32) + (if (result i32) (i32.eq (local.get $$n) (i32.const 0)) + (then (i32.const 1)) + (else (call $$odd (i32.sub (local.get $$n) (i32.const 1)))) + ) + ) + + (func $$odd (export "odd") (param $$n i32) (result i32) + (if (result i32) (i32.eq (local.get $$n) (i32.const 0)) + (then (i32.const 0)) + (else (call $$even (i32.sub (local.get $$n) (i32.const 1)))) + ) + ) +)`); + +// ./test/core/forward.wast:17 +assert_return(() => invoke($0, `even`, [13]), [value("i32", 0)]); + +// ./test/core/forward.wast:18 +assert_return(() => invoke($0, `even`, [20]), [value("i32", 1)]); + +// ./test/core/forward.wast:19 +assert_return(() => invoke($0, `odd`, [13]), [value("i32", 1)]); + +// ./test/core/forward.wast:20 +assert_return(() => invoke($0, `odd`, [20]), [value("i32", 0)]); diff --git a/js/src/jit-test/tests/wasm/spec/spec/func.wast.js b/js/src/jit-test/tests/wasm/spec/spec/func.wast.js new file mode 100644 index 0000000000..e5c1253de4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/func.wast.js @@ -0,0 +1,1218 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/func.wast + +// ./test/core/func.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definition + (type $$sig (func)) + (func $$dummy) + + ;; Syntax + + (func) + (func (export "f")) + (func $$f) + (func $$h (export "g")) + + (func (local)) + (func (local) (local)) + (func (local i32)) + (func (local $$x i32)) + (func (local i32 f64 i64)) + (func (local i32) (local f64)) + (func (local i32 f32) (local $$x i64) (local) (local i32 f64)) + + (func (param)) + (func (param) (param)) + (func (param i32)) + (func (param $$x i32)) + (func (param i32 f64 i64)) + (func (param i32) (param f64)) + (func (param i32 f32) (param $$x i64) (param) (param i32 f64)) + + (func (result)) + (func (result) (result)) + (func (result i32) (unreachable)) + (func (result i32 f64 f32) (unreachable)) + (func (result i32) (result f64) (unreachable)) + (func (result i32 f32) (result i64) (result) (result i32 f64) (unreachable)) + + (type $$sig-1 (func)) + (type $$sig-2 (func (result i32))) + (type $$sig-3 (func (param $$x i32))) + (type $$sig-4 (func (param i32 f64 i32) (result i32))) + + (func (export "type-use-1") (type $$sig-1)) + (func (export "type-use-2") (type $$sig-2) (i32.const 0)) + (func (export "type-use-3") (type $$sig-3)) + (func (export "type-use-4") (type $$sig-4) (i32.const 0)) + (func (export "type-use-5") (type $$sig-2) (result i32) (i32.const 0)) + (func (export "type-use-6") (type $$sig-3) (param i32)) + (func (export "type-use-7") + (type $$sig-4) (param i32) (param f64 i32) (result i32) (i32.const 0) + ) + + (func (type $$sig)) + (func (type $$forward)) ;; forward reference + + (func $$complex + (param i32 f32) (param $$x i64) (param) (param i32) + (result) (result i32) (result) (result i64 i32) + (local f32) (local $$y i32) (local i64 i32) (local) (local f64 i32) + (unreachable) (unreachable) + ) + (func $$complex-sig + (type $$sig) + (local f32) (local $$y i32) (local i64 i32) (local) (local f64 i32) + (unreachable) (unreachable) + ) + + (type $$forward (func)) + + ;; Typing of locals + + (func (export "local-first-i32") (result i32) (local i32 i32) (local.get 0)) + (func (export "local-first-i64") (result i64) (local i64 i64) (local.get 0)) + (func (export "local-first-f32") (result f32) (local f32 f32) (local.get 0)) + (func (export "local-first-f64") (result f64) (local f64 f64) (local.get 0)) + (func (export "local-second-i32") (result i32) (local i32 i32) (local.get 1)) + (func (export "local-second-i64") (result i64) (local i64 i64) (local.get 1)) + (func (export "local-second-f32") (result f32) (local f32 f32) (local.get 1)) + (func (export "local-second-f64") (result f64) (local f64 f64) (local.get 1)) + (func (export "local-mixed") (result f64) + (local f32) (local $$x i32) (local i64 i32) (local) (local f64 i32) + (drop (f32.neg (local.get 0))) + (drop (i32.eqz (local.get 1))) + (drop (i64.eqz (local.get 2))) + (drop (i32.eqz (local.get 3))) + (drop (f64.neg (local.get 4))) + (drop (i32.eqz (local.get 5))) + (local.get 4) + ) + + ;; Typing of parameters + + (func (export "param-first-i32") (param i32 i32) (result i32) (local.get 0)) + (func (export "param-first-i64") (param i64 i64) (result i64) (local.get 0)) + (func (export "param-first-f32") (param f32 f32) (result f32) (local.get 0)) + (func (export "param-first-f64") (param f64 f64) (result f64) (local.get 0)) + (func (export "param-second-i32") (param i32 i32) (result i32) (local.get 1)) + (func (export "param-second-i64") (param i64 i64) (result i64) (local.get 1)) + (func (export "param-second-f32") (param f32 f32) (result f32) (local.get 1)) + (func (export "param-second-f64") (param f64 f64) (result f64) (local.get 1)) + (func (export "param-mixed") (param f32 i32) (param) (param $$x i64) (param i32 f64 i32) + (result f64) + (drop (f32.neg (local.get 0))) + (drop (i32.eqz (local.get 1))) + (drop (i64.eqz (local.get 2))) + (drop (i32.eqz (local.get 3))) + (drop (f64.neg (local.get 4))) + (drop (i32.eqz (local.get 5))) + (local.get 4) + ) + + ;; Typing of results + + (func (export "empty")) + (func (export "value-void") (call $$dummy)) + (func (export "value-i32") (result i32) (i32.const 77)) + (func (export "value-i64") (result i64) (i64.const 7777)) + (func (export "value-f32") (result f32) (f32.const 77.7)) + (func (export "value-f64") (result f64) (f64.const 77.77)) + (func (export "value-i32-f64") (result i32 f64) (i32.const 77) (f64.const 7)) + (func (export "value-i32-i32-i32") (result i32 i32 i32) + (i32.const 1) (i32.const 2) (i32.const 3) + ) + (func (export "value-block-void") (block (call $$dummy) (call $$dummy))) + (func (export "value-block-i32") (result i32) + (block (result i32) (call $$dummy) (i32.const 77)) + ) + (func (export "value-block-i32-i64") (result i32 i64) + (block (result i32 i64) (call $$dummy) (i32.const 1) (i64.const 2)) + ) + + (func (export "return-empty") (return)) + (func (export "return-i32") (result i32) (return (i32.const 78))) + (func (export "return-i64") (result i64) (return (i64.const 7878))) + (func (export "return-f32") (result f32) (return (f32.const 78.7))) + (func (export "return-f64") (result f64) (return (f64.const 78.78))) + (func (export "return-i32-f64") (result i32 f64) + (return (i32.const 78) (f64.const 78.78)) + ) + (func (export "return-i32-i32-i32") (result i32 i32 i32) + (return (i32.const 1) (i32.const 2) (i32.const 3)) + ) + (func (export "return-block-i32") (result i32) + (return (block (result i32) (call $$dummy) (i32.const 77))) + ) + (func (export "return-block-i32-i64") (result i32 i64) + (return (block (result i32 i64) (call $$dummy) (i32.const 1) (i64.const 2))) + ) + + (func (export "break-empty") (br 0)) + (func (export "break-i32") (result i32) (br 0 (i32.const 79))) + (func (export "break-i64") (result i64) (br 0 (i64.const 7979))) + (func (export "break-f32") (result f32) (br 0 (f32.const 79.9))) + (func (export "break-f64") (result f64) (br 0 (f64.const 79.79))) + (func (export "break-i32-f64") (result i32 f64) + (br 0 (i32.const 79) (f64.const 79.79)) + ) + (func (export "break-i32-i32-i32") (result i32 i32 i32) + (br 0 (i32.const 1) (i32.const 2) (i32.const 3)) + ) + (func (export "break-block-i32") (result i32) + (br 0 (block (result i32) (call $$dummy) (i32.const 77))) + ) + (func (export "break-block-i32-i64") (result i32 i64) + (br 0 (block (result i32 i64) (call $$dummy) (i32.const 1) (i64.const 2))) + ) + + (func (export "break-br_if-empty") (param i32) + (br_if 0 (local.get 0)) + ) + (func (export "break-br_if-num") (param i32) (result i32) + (drop (br_if 0 (i32.const 50) (local.get 0))) (i32.const 51) + ) + (func (export "break-br_if-num-num") (param i32) (result i32 i64) + (drop (drop (br_if 0 (i32.const 50) (i64.const 51) (local.get 0)))) + (i32.const 51) (i64.const 52) + ) + + (func (export "break-br_table-empty") (param i32) + (br_table 0 0 0 (local.get 0)) + ) + (func (export "break-br_table-num") (param i32) (result i32) + (br_table 0 0 (i32.const 50) (local.get 0)) (i32.const 51) + ) + (func (export "break-br_table-num-num") (param i32) (result i32 i64) + (br_table 0 0 (i32.const 50) (i64.const 51) (local.get 0)) + (i32.const 51) (i64.const 52) + ) + (func (export "break-br_table-nested-empty") (param i32) + (block (br_table 0 1 0 (local.get 0))) + ) + (func (export "break-br_table-nested-num") (param i32) (result i32) + (i32.add + (block (result i32) + (br_table 0 1 0 (i32.const 50) (local.get 0)) (i32.const 51) + ) + (i32.const 2) + ) + ) + (func (export "break-br_table-nested-num-num") (param i32) (result i32 i32) + (i32.add + (block (result i32 i32) + (br_table 0 1 0 (i32.const 50) (i32.const 51) (local.get 0)) + (i32.const 51) (i32.const -3) + ) + ) + (i32.const 52) + ) + + ;; Large signatures + + (func (export "large-sig") + (param i32 i64 f32 f32 i32 f64 f32 i32 i32 i32 f32 f64 f64 f64 i32 i32 f32) + (result f64 f32 i32 i32 i32 i64 f32 i32 i32 f32 f64 f64 i32 f32 i32 f64) + (local.get 5) + (local.get 2) + (local.get 0) + (local.get 8) + (local.get 7) + (local.get 1) + (local.get 3) + (local.get 9) + (local.get 4) + (local.get 6) + (local.get 13) + (local.get 11) + (local.get 15) + (local.get 16) + (local.get 14) + (local.get 12) + ) + + ;; Default initialization of locals + + (func (export "init-local-i32") (result i32) (local i32) (local.get 0)) + (func (export "init-local-i64") (result i64) (local i64) (local.get 0)) + (func (export "init-local-f32") (result f32) (local f32) (local.get 0)) + (func (export "init-local-f64") (result f64) (local f64) (local.get 0)) +)`); + +// ./test/core/func.wast:241 +assert_return(() => invoke($0, `type-use-1`, []), []); + +// ./test/core/func.wast:242 +assert_return(() => invoke($0, `type-use-2`, []), [value("i32", 0)]); + +// ./test/core/func.wast:243 +assert_return(() => invoke($0, `type-use-3`, [1]), []); + +// ./test/core/func.wast:244 +assert_return(() => invoke($0, `type-use-4`, [1, value("f64", 1), 1]), [value("i32", 0)]); + +// ./test/core/func.wast:248 +assert_return(() => invoke($0, `type-use-5`, []), [value("i32", 0)]); + +// ./test/core/func.wast:249 +assert_return(() => invoke($0, `type-use-6`, [1]), []); + +// ./test/core/func.wast:250 +assert_return(() => invoke($0, `type-use-7`, [1, value("f64", 1), 1]), [value("i32", 0)]); + +// ./test/core/func.wast:255 +assert_return(() => invoke($0, `local-first-i32`, []), [value("i32", 0)]); + +// ./test/core/func.wast:256 +assert_return(() => invoke($0, `local-first-i64`, []), [value("i64", 0n)]); + +// ./test/core/func.wast:257 +assert_return(() => invoke($0, `local-first-f32`, []), [value("f32", 0)]); + +// ./test/core/func.wast:258 +assert_return(() => invoke($0, `local-first-f64`, []), [value("f64", 0)]); + +// ./test/core/func.wast:259 +assert_return(() => invoke($0, `local-second-i32`, []), [value("i32", 0)]); + +// ./test/core/func.wast:260 +assert_return(() => invoke($0, `local-second-i64`, []), [value("i64", 0n)]); + +// ./test/core/func.wast:261 +assert_return(() => invoke($0, `local-second-f32`, []), [value("f32", 0)]); + +// ./test/core/func.wast:262 +assert_return(() => invoke($0, `local-second-f64`, []), [value("f64", 0)]); + +// ./test/core/func.wast:263 +assert_return(() => invoke($0, `local-mixed`, []), [value("f64", 0)]); + +// ./test/core/func.wast:265 +assert_return(() => invoke($0, `param-first-i32`, [2, 3]), [value("i32", 2)]); + +// ./test/core/func.wast:268 +assert_return(() => invoke($0, `param-first-i64`, [2n, 3n]), [value("i64", 2n)]); + +// ./test/core/func.wast:271 +assert_return( + () => invoke($0, `param-first-f32`, [value("f32", 2), value("f32", 3)]), + [value("f32", 2)], +); + +// ./test/core/func.wast:274 +assert_return( + () => invoke($0, `param-first-f64`, [value("f64", 2), value("f64", 3)]), + [value("f64", 2)], +); + +// ./test/core/func.wast:277 +assert_return(() => invoke($0, `param-second-i32`, [2, 3]), [value("i32", 3)]); + +// ./test/core/func.wast:280 +assert_return(() => invoke($0, `param-second-i64`, [2n, 3n]), [value("i64", 3n)]); + +// ./test/core/func.wast:283 +assert_return( + () => invoke($0, `param-second-f32`, [value("f32", 2), value("f32", 3)]), + [value("f32", 3)], +); + +// ./test/core/func.wast:286 +assert_return( + () => invoke($0, `param-second-f64`, [value("f64", 2), value("f64", 3)]), + [value("f64", 3)], +); + +// ./test/core/func.wast:290 +assert_return( + () => invoke($0, `param-mixed`, [value("f32", 1), 2, 3n, 4, value("f64", 5.5), 6]), + [value("f64", 5.5)], +); + +// ./test/core/func.wast:298 +assert_return(() => invoke($0, `empty`, []), []); + +// ./test/core/func.wast:299 +assert_return(() => invoke($0, `value-void`, []), []); + +// ./test/core/func.wast:300 +assert_return(() => invoke($0, `value-i32`, []), [value("i32", 77)]); + +// ./test/core/func.wast:301 +assert_return(() => invoke($0, `value-i64`, []), [value("i64", 7777n)]); + +// ./test/core/func.wast:302 +assert_return(() => invoke($0, `value-f32`, []), [value("f32", 77.7)]); + +// ./test/core/func.wast:303 +assert_return(() => invoke($0, `value-f64`, []), [value("f64", 77.77)]); + +// ./test/core/func.wast:304 +assert_return(() => invoke($0, `value-i32-f64`, []), [value("i32", 77), value("f64", 7)]); + +// ./test/core/func.wast:305 +assert_return( + () => invoke($0, `value-i32-i32-i32`, []), + [value("i32", 1), value("i32", 2), value("i32", 3)], +); + +// ./test/core/func.wast:308 +assert_return(() => invoke($0, `value-block-void`, []), []); + +// ./test/core/func.wast:309 +assert_return(() => invoke($0, `value-block-i32`, []), [value("i32", 77)]); + +// ./test/core/func.wast:310 +assert_return(() => invoke($0, `value-block-i32-i64`, []), [value("i32", 1), value("i64", 2n)]); + +// ./test/core/func.wast:312 +assert_return(() => invoke($0, `return-empty`, []), []); + +// ./test/core/func.wast:313 +assert_return(() => invoke($0, `return-i32`, []), [value("i32", 78)]); + +// ./test/core/func.wast:314 +assert_return(() => invoke($0, `return-i64`, []), [value("i64", 7878n)]); + +// ./test/core/func.wast:315 +assert_return(() => invoke($0, `return-f32`, []), [value("f32", 78.7)]); + +// ./test/core/func.wast:316 +assert_return(() => invoke($0, `return-f64`, []), [value("f64", 78.78)]); + +// ./test/core/func.wast:317 +assert_return(() => invoke($0, `return-i32-f64`, []), [value("i32", 78), value("f64", 78.78)]); + +// ./test/core/func.wast:318 +assert_return( + () => invoke($0, `return-i32-i32-i32`, []), + [value("i32", 1), value("i32", 2), value("i32", 3)], +); + +// ./test/core/func.wast:321 +assert_return(() => invoke($0, `return-block-i32`, []), [value("i32", 77)]); + +// ./test/core/func.wast:322 +assert_return(() => invoke($0, `return-block-i32-i64`, []), [value("i32", 1), value("i64", 2n)]); + +// ./test/core/func.wast:324 +assert_return(() => invoke($0, `break-empty`, []), []); + +// ./test/core/func.wast:325 +assert_return(() => invoke($0, `break-i32`, []), [value("i32", 79)]); + +// ./test/core/func.wast:326 +assert_return(() => invoke($0, `break-i64`, []), [value("i64", 7979n)]); + +// ./test/core/func.wast:327 +assert_return(() => invoke($0, `break-f32`, []), [value("f32", 79.9)]); + +// ./test/core/func.wast:328 +assert_return(() => invoke($0, `break-f64`, []), [value("f64", 79.79)]); + +// ./test/core/func.wast:329 +assert_return(() => invoke($0, `break-i32-f64`, []), [value("i32", 79), value("f64", 79.79)]); + +// ./test/core/func.wast:330 +assert_return( + () => invoke($0, `break-i32-i32-i32`, []), + [value("i32", 1), value("i32", 2), value("i32", 3)], +); + +// ./test/core/func.wast:333 +assert_return(() => invoke($0, `break-block-i32`, []), [value("i32", 77)]); + +// ./test/core/func.wast:334 +assert_return(() => invoke($0, `break-block-i32-i64`, []), [value("i32", 1), value("i64", 2n)]); + +// ./test/core/func.wast:336 +assert_return(() => invoke($0, `break-br_if-empty`, [0]), []); + +// ./test/core/func.wast:337 +assert_return(() => invoke($0, `break-br_if-empty`, [2]), []); + +// ./test/core/func.wast:338 +assert_return(() => invoke($0, `break-br_if-num`, [0]), [value("i32", 51)]); + +// ./test/core/func.wast:339 +assert_return(() => invoke($0, `break-br_if-num`, [1]), [value("i32", 50)]); + +// ./test/core/func.wast:340 +assert_return(() => invoke($0, `break-br_if-num-num`, [0]), [value("i32", 51), value("i64", 52n)]); + +// ./test/core/func.wast:343 +assert_return(() => invoke($0, `break-br_if-num-num`, [1]), [value("i32", 50), value("i64", 51n)]); + +// ./test/core/func.wast:347 +assert_return(() => invoke($0, `break-br_table-empty`, [0]), []); + +// ./test/core/func.wast:348 +assert_return(() => invoke($0, `break-br_table-empty`, [1]), []); + +// ./test/core/func.wast:349 +assert_return(() => invoke($0, `break-br_table-empty`, [5]), []); + +// ./test/core/func.wast:350 +assert_return(() => invoke($0, `break-br_table-empty`, [-1]), []); + +// ./test/core/func.wast:351 +assert_return(() => invoke($0, `break-br_table-num`, [0]), [value("i32", 50)]); + +// ./test/core/func.wast:352 +assert_return(() => invoke($0, `break-br_table-num`, [1]), [value("i32", 50)]); + +// ./test/core/func.wast:353 +assert_return(() => invoke($0, `break-br_table-num`, [10]), [value("i32", 50)]); + +// ./test/core/func.wast:354 +assert_return(() => invoke($0, `break-br_table-num`, [-100]), [value("i32", 50)]); + +// ./test/core/func.wast:355 +assert_return(() => invoke($0, `break-br_table-num-num`, [0]), [value("i32", 50), value("i64", 51n)]); + +// ./test/core/func.wast:358 +assert_return(() => invoke($0, `break-br_table-num-num`, [1]), [value("i32", 50), value("i64", 51n)]); + +// ./test/core/func.wast:361 +assert_return(() => invoke($0, `break-br_table-num-num`, [10]), [value("i32", 50), value("i64", 51n)]); + +// ./test/core/func.wast:364 +assert_return(() => invoke($0, `break-br_table-num-num`, [-100]), [value("i32", 50), value("i64", 51n)]); + +// ./test/core/func.wast:367 +assert_return(() => invoke($0, `break-br_table-nested-empty`, [0]), []); + +// ./test/core/func.wast:368 +assert_return(() => invoke($0, `break-br_table-nested-empty`, [1]), []); + +// ./test/core/func.wast:369 +assert_return(() => invoke($0, `break-br_table-nested-empty`, [3]), []); + +// ./test/core/func.wast:370 +assert_return(() => invoke($0, `break-br_table-nested-empty`, [-2]), []); + +// ./test/core/func.wast:371 +assert_return(() => invoke($0, `break-br_table-nested-num`, [0]), [value("i32", 52)]); + +// ./test/core/func.wast:374 +assert_return(() => invoke($0, `break-br_table-nested-num`, [1]), [value("i32", 50)]); + +// ./test/core/func.wast:377 +assert_return(() => invoke($0, `break-br_table-nested-num`, [2]), [value("i32", 52)]); + +// ./test/core/func.wast:380 +assert_return(() => invoke($0, `break-br_table-nested-num`, [-3]), [value("i32", 52)]); + +// ./test/core/func.wast:383 +assert_return( + () => invoke($0, `break-br_table-nested-num-num`, [0]), + [value("i32", 101), value("i32", 52)], +); + +// ./test/core/func.wast:387 +assert_return( + () => invoke($0, `break-br_table-nested-num-num`, [1]), + [value("i32", 50), value("i32", 51)], +); + +// ./test/core/func.wast:391 +assert_return( + () => invoke($0, `break-br_table-nested-num-num`, [2]), + [value("i32", 101), value("i32", 52)], +); + +// ./test/core/func.wast:395 +assert_return( + () => invoke($0, `break-br_table-nested-num-num`, [-3]), + [value("i32", 101), value("i32", 52)], +); + +// ./test/core/func.wast:400 +assert_return( + () => invoke($0, `large-sig`, [ + 0, + 1n, + value("f32", 2), + value("f32", 3), + 4, + value("f64", 5), + value("f32", 6), + 7, + 8, + 9, + value("f32", 10), + value("f64", 11), + value("f64", 12), + value("f64", 13), + 14, + 15, + value("f32", 16), + ]), + [ + value("f64", 5), + value("f32", 2), + value("i32", 0), + value("i32", 8), + value("i32", 7), + value("i64", 1n), + value("f32", 3), + value("i32", 9), + value("i32", 4), + value("f32", 6), + value("f64", 13), + value("f64", 11), + value("i32", 15), + value("f32", 16), + value("i32", 14), + value("f64", 12), + ], +); + +// ./test/core/func.wast:414 +assert_return(() => invoke($0, `init-local-i32`, []), [value("i32", 0)]); + +// ./test/core/func.wast:415 +assert_return(() => invoke($0, `init-local-i64`, []), [value("i64", 0n)]); + +// ./test/core/func.wast:416 +assert_return(() => invoke($0, `init-local-f32`, []), [value("f32", 0)]); + +// ./test/core/func.wast:417 +assert_return(() => invoke($0, `init-local-f64`, []), [value("f64", 0)]); + +// ./test/core/func.wast:422 +let $1 = instantiate(`(module + (func $$f (result f64) (f64.const 0)) ;; adds implicit type definition + (func $$g (param i32)) ;; reuses explicit type definition + (type $$t (func (param i32))) + + (func $$i32->void (type 0)) ;; (param i32) + (func $$void->f64 (type 1) (f64.const 0)) ;; (result f64) + (func $$check + (call $$i32->void (i32.const 0)) + (drop (call $$void->f64)) + ) +)`); + +// ./test/core/func.wast:435 +assert_invalid( + () => instantiate(`(module + (func $$f (result f64) (f64.const 0)) ;; adds implicit type definition + (func $$g (param i32)) ;; reuses explicit type definition + (func $$h (result f64) (f64.const 1)) ;; reuses implicit type definition + (type $$t (func (param i32))) + + (func (type 2)) ;; does not exist + )`), + `unknown type`, +); + +// ./test/core/func.wast:447 +assert_malformed( + () => instantiate(`(func $$f (result f64) (f64.const 0)) (func $$g (param i32)) (func $$h (result f64) (f64.const 1)) (type $$t (func (param i32))) (func (type 2) (param i32)) `), + `unknown type`, +); + +// ./test/core/func.wast:459 +let $2 = instantiate(`(module + (type $$proc (func (result i32))) + (type $$sig (func (param i32) (result i32))) + + (func (export "f") (type $$sig) + (local $$var i32) + (local.get $$var) + ) + + (func $$g (type $$sig) + (local $$var i32) + (local.get $$var) + ) + (func (export "g") (type $$sig) + (call $$g (local.get 0)) + ) + + (func (export "p") (type $$proc) + (local $$var i32) + (local.set 0 (i32.const 42)) + (local.get $$var) + ) +)`); + +// ./test/core/func.wast:483 +assert_return(() => invoke($2, `f`, [42]), [value("i32", 0)]); + +// ./test/core/func.wast:484 +assert_return(() => invoke($2, `g`, [42]), [value("i32", 0)]); + +// ./test/core/func.wast:485 +assert_return(() => invoke($2, `p`, []), [value("i32", 42)]); + +// ./test/core/func.wast:488 +let $3 = instantiate(`(module + (type $$sig (func)) + + (func $$empty-sig-1) ;; should be assigned type $$sig + (func $$complex-sig-1 (param f64 i64 f64 i64 f64 i64 f32 i32)) + (func $$empty-sig-2) ;; should be assigned type $$sig + (func $$complex-sig-2 (param f64 i64 f64 i64 f64 i64 f32 i32)) + (func $$complex-sig-3 (param f64 i64 f64 i64 f64 i64 f32 i32)) + (func $$complex-sig-4 (param i64 i64 f64 i64 f64 i64 f32 i32)) + (func $$complex-sig-5 (param i64 i64 f64 i64 f64 i64 f32 i32)) + + (type $$empty-sig-duplicate (func)) + (type $$complex-sig-duplicate (func (param i64 i64 f64 i64 f64 i64 f32 i32))) + (table funcref + (elem + $$complex-sig-3 $$empty-sig-2 $$complex-sig-1 $$complex-sig-3 $$empty-sig-1 + $$complex-sig-4 $$complex-sig-5 + ) + ) + + (func (export "signature-explicit-reused") + (call_indirect (type $$sig) (i32.const 1)) + (call_indirect (type $$sig) (i32.const 4)) + ) + + (func (export "signature-implicit-reused") + ;; The implicit index 3 in this test depends on the function and + ;; type definitions, and may need adapting if they change. + (call_indirect (type 3) + (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 0) + ) + (call_indirect (type 3) + (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 2) + ) + (call_indirect (type 3) + (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 3) + ) + ) + + (func (export "signature-explicit-duplicate") + (call_indirect (type $$empty-sig-duplicate) (i32.const 1)) + ) + + (func (export "signature-implicit-duplicate") + (call_indirect (type $$complex-sig-duplicate) + (i64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 5) + ) + (call_indirect (type $$complex-sig-duplicate) + (i64.const 0) (i64.const 0) (f64.const 0) (i64.const 0) + (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0) + (i32.const 6) + ) + ) +)`); + +// ./test/core/func.wast:551 +assert_return(() => invoke($3, `signature-explicit-reused`, []), []); + +// ./test/core/func.wast:552 +assert_return(() => invoke($3, `signature-implicit-reused`, []), []); + +// ./test/core/func.wast:553 +assert_return(() => invoke($3, `signature-explicit-duplicate`, []), []); + +// ./test/core/func.wast:554 +assert_return(() => invoke($3, `signature-implicit-duplicate`, []), []); + +// ./test/core/func.wast:559 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (type $$sig) (result i32) (param i32) (i32.const 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:566 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (param i32) (type $$sig) (result i32) (i32.const 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:573 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (param i32) (result i32) (type $$sig) (i32.const 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:580 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (result i32) (type $$sig) (param i32) (i32.const 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:587 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (result i32) (param i32) (type $$sig) (i32.const 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:594 +assert_malformed( + () => instantiate(`(func (result i32) (param i32) (i32.const 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:601 +assert_malformed( + () => instantiate(`(type $$sig (func)) (func (type $$sig) (result i32) (i32.const 0)) `), + `inline function type`, +); + +// ./test/core/func.wast:608 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (type $$sig) (result i32) (i32.const 0)) `), + `inline function type`, +); + +// ./test/core/func.wast:615 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (type $$sig) (param i32) (i32.const 0)) `), + `inline function type`, +); + +// ./test/core/func.wast:622 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32 i32) (result i32))) (func (type $$sig) (param i32) (result i32) (unreachable)) `), + `inline function type`, +); + +// ./test/core/func.wast:633 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (result i64) (local i32) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/func.wast:637 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (local f32) (i32.eqz (local.get 0))))`), + `type mismatch`, +); + +// ./test/core/func.wast:641 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (local f64 i64) (f64.neg (local.get 1))))`), + `type mismatch`, +); + +// ./test/core/func.wast:649 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param i32) (result i64) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/func.wast:653 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param f32) (i32.eqz (local.get 0))))`), + `type mismatch`, +); + +// ./test/core/func.wast:657 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param f64 i64) (f64.neg (local.get 1))))`), + `type mismatch`, +); + +// ./test/core/func.wast:665 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i32 (result i32)))`), + `type mismatch`, +); + +// ./test/core/func.wast:669 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i64 (result i64)))`), + `type mismatch`, +); + +// ./test/core/func.wast:673 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f32 (result f32)))`), + `type mismatch`, +); + +// ./test/core/func.wast:677 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f64 (result f64)))`), + `type mismatch`, +); + +// ./test/core/func.wast:681 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f64-i32 (result f64 i32)))`), + `type mismatch`, +); + +// ./test/core/func.wast:686 +assert_invalid( + () => instantiate(`(module (func $$type-value-void-vs-num (result i32) + (nop) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:692 +assert_invalid( + () => instantiate(`(module (func $$type-value-void-vs-nums (result i32 i32) + (nop) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:698 +assert_invalid( + () => instantiate(`(module (func $$type-value-num-vs-void + (i32.const 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:704 +assert_invalid( + () => instantiate(`(module (func $$type-value-nums-vs-void + (i32.const 0) (i64.const 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:710 +assert_invalid( + () => instantiate(`(module (func $$type-value-num-vs-num (result i32) + (f32.const 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:716 +assert_invalid( + () => instantiate(`(module (func $$type-value-num-vs-nums (result f32 f32) + (f32.const 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:722 +assert_invalid( + () => instantiate(`(module (func $$type-value-nums-vs-num (result f32) + (f32.const 0) (f32.const 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:729 +assert_invalid( + () => instantiate(`(module (func $$type-return-last-empty-vs-num (result i32) + (return) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:735 +assert_invalid( + () => instantiate(`(module (func $$type-return-last-empty-vs-nums (result i32 i32) + (return) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:741 +assert_invalid( + () => instantiate(`(module (func $$type-return-last-void-vs-num (result i32) + (return (nop)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:747 +assert_invalid( + () => instantiate(`(module (func $$type-return-last-void-vs-nums (result i32 i64) + (return (nop)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:753 +assert_invalid( + () => instantiate(`(module (func $$type-return-last-num-vs-num (result i32) + (return (i64.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:759 +assert_invalid( + () => instantiate(`(module (func $$type-return-last-num-vs-nums (result i64 i64) + (return (i64.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:766 +assert_invalid( + () => instantiate(`(module (func $$type-return-empty-vs-num (result i32) + (return) (i32.const 1) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:772 +assert_invalid( + () => instantiate(`(module (func $$type-return-empty-vs-nums (result i32 i32) + (return) (i32.const 1) (i32.const 2) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:778 +assert_invalid( + () => instantiate(`(module (func $$type-return-partial-vs-nums (result i32 i32) + (i32.const 1) (return) (i32.const 2) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:784 +assert_invalid( + () => instantiate(`(module (func $$type-return-void-vs-num (result i32) + (return (nop)) (i32.const 1) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:790 +assert_invalid( + () => instantiate(`(module (func $$type-return-void-vs-nums (result i32 i32) + (return (nop)) (i32.const 1) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:796 +assert_invalid( + () => instantiate(`(module (func $$type-return-num-vs-num (result i32) + (return (i64.const 1)) (i32.const 1) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:802 +assert_invalid( + () => instantiate(`(module (func $$type-return-num-vs-nums (result i32 i32) + (return (i64.const 1)) (i32.const 1) (i32.const 2) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:808 +assert_invalid( + () => instantiate(`(module (func $$type-return-first-num-vs-num (result i32) + (return (i64.const 1)) (return (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:814 +assert_invalid( + () => instantiate(`(module (func $$type-return-first-num-vs-nums (result i32 i32) + (return (i32.const 1)) (return (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:821 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-void-vs-num (result i32) + (br 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:827 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-void-vs-nums (result i32 i32) + (br 0) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:833 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-num-vs-num (result i32) + (br 0 (f32.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:839 +assert_invalid( + () => instantiate(`(module (func $$type-break-last-num-vs-nums (result i32 i32) + (br 0 (i32.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:845 +assert_invalid( + () => instantiate(`(module (func $$type-break-void-vs-num (result i32) + (br 0) (i32.const 1) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:851 +assert_invalid( + () => instantiate(`(module (func $$type-break-void-vs-nums (result i32 i32) + (br 0) (i32.const 1) (i32.const 2) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:857 +assert_invalid( + () => instantiate(`(module (func $$type-break-num-vs-num (result i32) + (br 0 (i64.const 1)) (i32.const 1) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:863 +assert_invalid( + () => instantiate(`(module (func $$type-break-num-vs-nums (result i32 i32) + (br 0 (i32.const 1)) (i32.const 1) (i32.const 2) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:869 +assert_invalid( + () => instantiate(`(module (func $$type-break-first-num-vs-num (result i32) + (br 0 (i64.const 1)) (br 0 (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:876 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-empty-vs-num (result i32) + (block (br 1)) (br 0 (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:882 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-empty-vs-nums (result i32 i32) + (block (br 1)) (br 0 (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:888 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-void-vs-num (result i32) + (block (br 1 (nop))) (br 0 (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:894 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-void-vs-nums (result i32 i32) + (block (br 1 (nop))) (br 0 (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:900 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-num-vs-num (result i32) + (block (br 1 (i64.const 1))) (br 0 (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:906 +assert_invalid( + () => instantiate(`(module (func $$type-break-nested-num-vs-nums (result i32 i32) + (block (result i32) (br 1 (i32.const 1))) (br 0 (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/func.wast:916 +assert_malformed(() => instantiate(`(func (nop) (local i32)) `), `unexpected token`); + +// ./test/core/func.wast:920 +assert_malformed(() => instantiate(`(func (nop) (param i32)) `), `unexpected token`); + +// ./test/core/func.wast:924 +assert_malformed(() => instantiate(`(func (nop) (result i32)) `), `unexpected token`); + +// ./test/core/func.wast:928 +assert_malformed(() => instantiate(`(func (local i32) (param i32)) `), `unexpected token`); + +// ./test/core/func.wast:932 +assert_malformed( + () => instantiate(`(func (local i32) (result i32) (local.get 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:936 +assert_malformed( + () => instantiate(`(func (result i32) (param i32) (local.get 0)) `), + `unexpected token`, +); + +// ./test/core/func.wast:943 +assert_malformed(() => instantiate(`(func $$foo) (func $$foo) `), `duplicate func`); + +// ./test/core/func.wast:947 +assert_malformed( + () => instantiate(`(import "" "" (func $$foo)) (func $$foo) `), + `duplicate func`, +); + +// ./test/core/func.wast:951 +assert_malformed( + () => instantiate(`(import "" "" (func $$foo)) (import "" "" (func $$foo)) `), + `duplicate func`, +); + +// ./test/core/func.wast:956 +assert_malformed( + () => instantiate(`(func (param $$foo i32) (param $$foo i32)) `), + `duplicate local`, +); + +// ./test/core/func.wast:958 +assert_malformed( + () => instantiate(`(func (param $$foo i32) (local $$foo i32)) `), + `duplicate local`, +); + +// ./test/core/func.wast:960 +assert_malformed( + () => instantiate(`(func (local $$foo i32) (local $$foo i32)) `), + `duplicate local`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/func_ptrs.wast.js b/js/src/jit-test/tests/wasm/spec/spec/func_ptrs.wast.js new file mode 100644 index 0000000000..b2a46e861e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/func_ptrs.wast.js @@ -0,0 +1,191 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/func_ptrs.wast + +// ./test/core/func_ptrs.wast:1 +let $0 = instantiate(`(module + (type (func)) ;; 0: void -> void + (type $$S (func)) ;; 1: void -> void + (type (func (param))) ;; 2: void -> void + (type (func (result i32))) ;; 3: void -> i32 + (type (func (param) (result i32))) ;; 4: void -> i32 + (type $$T (func (param i32) (result i32))) ;; 5: i32 -> i32 + (type $$U (func (param i32))) ;; 6: i32 -> void + + (func $$print (import "spectest" "print_i32") (type 6)) + + (func (type 0)) + (func (type $$S)) + + (func (export "one") (type 4) (i32.const 13)) + (func (export "two") (type $$T) (i32.add (local.get 0) (i32.const 1))) + + ;; Both signature and parameters are allowed (and required to match) + ;; since this allows the naming of parameters. + (func (export "three") (type $$T) (param $$a i32) (result i32) + (i32.sub (local.get 0) (i32.const 2)) + ) + + (func (export "four") (type $$U) (call $$print (local.get 0))) +)`); + +// ./test/core/func_ptrs.wast:27 +assert_return(() => invoke($0, `one`, []), [value("i32", 13)]); + +// ./test/core/func_ptrs.wast:28 +assert_return(() => invoke($0, `two`, [13]), [value("i32", 14)]); + +// ./test/core/func_ptrs.wast:29 +assert_return(() => invoke($0, `three`, [13]), [value("i32", 11)]); + +// ./test/core/func_ptrs.wast:30 +invoke($0, `four`, [83]); + +// ./test/core/func_ptrs.wast:32 +assert_invalid(() => instantiate(`(module (elem (i32.const 0)))`), `unknown table`); + +// ./test/core/func_ptrs.wast:33 +assert_invalid( + () => instantiate(`(module (elem (i32.const 0) 0) (func))`), + `unknown table`, +); + +// ./test/core/func_ptrs.wast:35 +assert_invalid( + () => instantiate(`(module (table 1 funcref) (elem (i64.const 0)))`), + `type mismatch`, +); + +// ./test/core/func_ptrs.wast:39 +assert_invalid( + () => instantiate(`(module (table 1 funcref) (elem (i32.ctz (i32.const 0))))`), + `constant expression required`, +); + +// ./test/core/func_ptrs.wast:43 +assert_invalid( + () => instantiate(`(module (table 1 funcref) (elem (nop)))`), + `constant expression required`, +); + +// ./test/core/func_ptrs.wast:48 +assert_invalid(() => instantiate(`(module (func (type 42)))`), `unknown type`); + +// ./test/core/func_ptrs.wast:49 +assert_invalid( + () => instantiate(`(module (import "spectest" "print_i32" (func (type 43))))`), + `unknown type`, +); + +// ./test/core/func_ptrs.wast:51 +let $1 = instantiate(`(module + (type $$T (func (param) (result i32))) + (type $$U (func (param) (result i32))) + (table funcref (elem $$t1 $$t2 $$t3 $$u1 $$u2 $$t1 $$t3)) + + (func $$t1 (type $$T) (i32.const 1)) + (func $$t2 (type $$T) (i32.const 2)) + (func $$t3 (type $$T) (i32.const 3)) + (func $$u1 (type $$U) (i32.const 4)) + (func $$u2 (type $$U) (i32.const 5)) + + (func (export "callt") (param $$i i32) (result i32) + (call_indirect (type $$T) (local.get $$i)) + ) + + (func (export "callu") (param $$i i32) (result i32) + (call_indirect (type $$U) (local.get $$i)) + ) +)`); + +// ./test/core/func_ptrs.wast:71 +assert_return(() => invoke($1, `callt`, [0]), [value("i32", 1)]); + +// ./test/core/func_ptrs.wast:72 +assert_return(() => invoke($1, `callt`, [1]), [value("i32", 2)]); + +// ./test/core/func_ptrs.wast:73 +assert_return(() => invoke($1, `callt`, [2]), [value("i32", 3)]); + +// ./test/core/func_ptrs.wast:74 +assert_return(() => invoke($1, `callt`, [3]), [value("i32", 4)]); + +// ./test/core/func_ptrs.wast:75 +assert_return(() => invoke($1, `callt`, [4]), [value("i32", 5)]); + +// ./test/core/func_ptrs.wast:76 +assert_return(() => invoke($1, `callt`, [5]), [value("i32", 1)]); + +// ./test/core/func_ptrs.wast:77 +assert_return(() => invoke($1, `callt`, [6]), [value("i32", 3)]); + +// ./test/core/func_ptrs.wast:78 +assert_trap(() => invoke($1, `callt`, [7]), `undefined element`); + +// ./test/core/func_ptrs.wast:79 +assert_trap(() => invoke($1, `callt`, [100]), `undefined element`); + +// ./test/core/func_ptrs.wast:80 +assert_trap(() => invoke($1, `callt`, [-1]), `undefined element`); + +// ./test/core/func_ptrs.wast:82 +assert_return(() => invoke($1, `callu`, [0]), [value("i32", 1)]); + +// ./test/core/func_ptrs.wast:83 +assert_return(() => invoke($1, `callu`, [1]), [value("i32", 2)]); + +// ./test/core/func_ptrs.wast:84 +assert_return(() => invoke($1, `callu`, [2]), [value("i32", 3)]); + +// ./test/core/func_ptrs.wast:85 +assert_return(() => invoke($1, `callu`, [3]), [value("i32", 4)]); + +// ./test/core/func_ptrs.wast:86 +assert_return(() => invoke($1, `callu`, [4]), [value("i32", 5)]); + +// ./test/core/func_ptrs.wast:87 +assert_return(() => invoke($1, `callu`, [5]), [value("i32", 1)]); + +// ./test/core/func_ptrs.wast:88 +assert_return(() => invoke($1, `callu`, [6]), [value("i32", 3)]); + +// ./test/core/func_ptrs.wast:89 +assert_trap(() => invoke($1, `callu`, [7]), `undefined element`); + +// ./test/core/func_ptrs.wast:90 +assert_trap(() => invoke($1, `callu`, [100]), `undefined element`); + +// ./test/core/func_ptrs.wast:91 +assert_trap(() => invoke($1, `callu`, [-1]), `undefined element`); + +// ./test/core/func_ptrs.wast:93 +let $2 = instantiate(`(module + (type $$T (func (result i32))) + (table funcref (elem 0 1)) + + (func $$t1 (type $$T) (i32.const 1)) + (func $$t2 (type $$T) (i32.const 2)) + + (func (export "callt") (param $$i i32) (result i32) + (call_indirect (type $$T) (local.get $$i)) + ) +)`); + +// ./test/core/func_ptrs.wast:105 +assert_return(() => invoke($2, `callt`, [0]), [value("i32", 1)]); + +// ./test/core/func_ptrs.wast:106 +assert_return(() => invoke($2, `callt`, [1]), [value("i32", 2)]); diff --git a/js/src/jit-test/tests/wasm/spec/spec/global.wast.js b/js/src/jit-test/tests/wasm/spec/spec/global.wast.js new file mode 100644 index 0000000000..e3351d3421 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/global.wast.js @@ -0,0 +1,809 @@ +// |jit-test| --no-wasm-gc +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/global.wast + +// ./test/core/global.wast:3 +let $0 = instantiate(`(module + (global (import "spectest" "global_i32") i32) + (global (import "spectest" "global_i64") i64) + + (global $$a i32 (i32.const -2)) + (global (;3;) f32 (f32.const -3)) + (global (;4;) f64 (f64.const -4)) + (global $$b i64 (i64.const -5)) + + (global $$x (mut i32) (i32.const -12)) + (global (;7;) (mut f32) (f32.const -13)) + (global (;8;) (mut f64) (f64.const -14)) + (global $$y (mut i64) (i64.const -15)) + + (global $$z1 i32 (global.get 0)) + (global $$z2 i64 (global.get 1)) + + (global $$r externref (ref.null extern)) + (global $$mr (mut externref) (ref.null extern)) + (global funcref (ref.null func)) + + (func (export "get-a") (result i32) (global.get $$a)) + (func (export "get-b") (result i64) (global.get $$b)) + (func (export "get-r") (result externref) (global.get $$r)) + (func (export "get-mr") (result externref) (global.get $$mr)) + (func (export "get-x") (result i32) (global.get $$x)) + (func (export "get-y") (result i64) (global.get $$y)) + (func (export "get-z1") (result i32) (global.get $$z1)) + (func (export "get-z2") (result i64) (global.get $$z2)) + (func (export "set-x") (param i32) (global.set $$x (local.get 0))) + (func (export "set-y") (param i64) (global.set $$y (local.get 0))) + (func (export "set-mr") (param externref) (global.set $$mr (local.get 0))) + + (func (export "get-3") (result f32) (global.get 3)) + (func (export "get-4") (result f64) (global.get 4)) + (func (export "get-7") (result f32) (global.get 7)) + (func (export "get-8") (result f64) (global.get 8)) + (func (export "set-7") (param f32) (global.set 7 (local.get 0))) + (func (export "set-8") (param f64) (global.set 8 (local.get 0))) + + ;; As the argument of control constructs and instructions + + (memory 1) + + (func $$dummy) + + (func (export "as-select-first") (result i32) + (select (global.get $$x) (i32.const 2) (i32.const 3)) + ) + (func (export "as-select-mid") (result i32) + (select (i32.const 2) (global.get $$x) (i32.const 3)) + ) + (func (export "as-select-last") (result i32) + (select (i32.const 2) (i32.const 3) (global.get $$x)) + ) + + (func (export "as-loop-first") (result i32) + (loop (result i32) + (global.get $$x) (call $$dummy) (call $$dummy) + ) + ) + (func (export "as-loop-mid") (result i32) + (loop (result i32) + (call $$dummy) (global.get $$x) (call $$dummy) + ) + ) + (func (export "as-loop-last") (result i32) + (loop (result i32) + (call $$dummy) (call $$dummy) (global.get $$x) + ) + ) + + (func (export "as-if-condition") (result i32) + (if (result i32) (global.get $$x) + (then (call $$dummy) (i32.const 2)) + (else (call $$dummy) (i32.const 3)) + ) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) + (then (global.get $$x)) (else (i32.const 2)) + ) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 0) + (then (i32.const 2)) (else (global.get $$x)) + ) + ) + + (func (export "as-br_if-first") (result i32) + (block (result i32) + (br_if 0 (global.get $$x) (i32.const 2)) + (return (i32.const 3)) + ) + ) + (func (export "as-br_if-last") (result i32) + (block (result i32) + (br_if 0 (i32.const 2) (global.get $$x)) + (return (i32.const 3)) + ) + ) + + (func (export "as-br_table-first") (result i32) + (block (result i32) + (global.get $$x) (i32.const 2) (br_table 0 0) + ) + ) + (func (export "as-br_table-last") (result i32) + (block (result i32) + (i32.const 2) (global.get $$x) (br_table 0 0) + ) + ) + + (func $$func (param i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (call_indirect (type $$check) + (global.get $$x) (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (global.get $$x) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (i32.const 0) (global.get $$x) + ) + ) + ) + + (func (export "as-store-first") + (global.get $$x) (i32.const 1) (i32.store) + ) + (func (export "as-store-last") + (i32.const 0) (global.get $$x) (i32.store) + ) + (func (export "as-load-operand") (result i32) + (i32.load (global.get $$x)) + ) + (func (export "as-memory.grow-value") (result i32) + (memory.grow (global.get $$x)) + ) + + (func $$f (param i32) (result i32) (local.get 0)) + (func (export "as-call-value") (result i32) + (call $$f (global.get $$x)) + ) + + (func (export "as-return-value") (result i32) + (global.get $$x) (return) + ) + (func (export "as-drop-operand") + (drop (global.get $$x)) + ) + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (global.get $$x))) + ) + + (func (export "as-local.set-value") (param i32) (result i32) + (local.set 0 (global.get $$x)) + (local.get 0) + ) + (func (export "as-local.tee-value") (param i32) (result i32) + (local.tee 0 (global.get $$x)) + ) + (func (export "as-global.set-value") (result i32) + (global.set $$x (global.get $$x)) + (global.get $$x) + ) + + (func (export "as-unary-operand") (result i32) + (i32.eqz (global.get $$x)) + ) + (func (export "as-binary-operand") (result i32) + (i32.mul + (global.get $$x) (global.get $$x) + ) + ) + (func (export "as-compare-operand") (result i32) + (i32.gt_u + (global.get 0) (i32.const 1) + ) + ) +)`); + +// ./test/core/global.wast:196 +assert_return(() => invoke($0, `get-a`, []), [value("i32", -2)]); + +// ./test/core/global.wast:197 +assert_return(() => invoke($0, `get-b`, []), [value("i64", -5n)]); + +// ./test/core/global.wast:198 +assert_return(() => invoke($0, `get-r`, []), [value('externref', null)]); + +// ./test/core/global.wast:199 +assert_return(() => invoke($0, `get-mr`, []), [value('externref', null)]); + +// ./test/core/global.wast:200 +assert_return(() => invoke($0, `get-x`, []), [value("i32", -12)]); + +// ./test/core/global.wast:201 +assert_return(() => invoke($0, `get-y`, []), [value("i64", -15n)]); + +// ./test/core/global.wast:202 +assert_return(() => invoke($0, `get-z1`, []), [value("i32", 666)]); + +// ./test/core/global.wast:203 +assert_return(() => invoke($0, `get-z2`, []), [value("i64", 666n)]); + +// ./test/core/global.wast:205 +assert_return(() => invoke($0, `get-3`, []), [value("f32", -3)]); + +// ./test/core/global.wast:206 +assert_return(() => invoke($0, `get-4`, []), [value("f64", -4)]); + +// ./test/core/global.wast:207 +assert_return(() => invoke($0, `get-7`, []), [value("f32", -13)]); + +// ./test/core/global.wast:208 +assert_return(() => invoke($0, `get-8`, []), [value("f64", -14)]); + +// ./test/core/global.wast:210 +assert_return(() => invoke($0, `set-x`, [6]), []); + +// ./test/core/global.wast:211 +assert_return(() => invoke($0, `set-y`, [7n]), []); + +// ./test/core/global.wast:213 +assert_return(() => invoke($0, `set-7`, [value("f32", 8)]), []); + +// ./test/core/global.wast:214 +assert_return(() => invoke($0, `set-8`, [value("f64", 9)]), []); + +// ./test/core/global.wast:216 +assert_return(() => invoke($0, `get-x`, []), [value("i32", 6)]); + +// ./test/core/global.wast:217 +assert_return(() => invoke($0, `get-y`, []), [value("i64", 7n)]); + +// ./test/core/global.wast:218 +assert_return(() => invoke($0, `get-7`, []), [value("f32", 8)]); + +// ./test/core/global.wast:219 +assert_return(() => invoke($0, `get-8`, []), [value("f64", 9)]); + +// ./test/core/global.wast:221 +assert_return(() => invoke($0, `set-7`, [value("f32", 8)]), []); + +// ./test/core/global.wast:222 +assert_return(() => invoke($0, `set-8`, [value("f64", 9)]), []); + +// ./test/core/global.wast:223 +assert_return(() => invoke($0, `set-mr`, [externref(10)]), []); + +// ./test/core/global.wast:225 +assert_return(() => invoke($0, `get-x`, []), [value("i32", 6)]); + +// ./test/core/global.wast:226 +assert_return(() => invoke($0, `get-y`, []), [value("i64", 7n)]); + +// ./test/core/global.wast:227 +assert_return(() => invoke($0, `get-7`, []), [value("f32", 8)]); + +// ./test/core/global.wast:228 +assert_return(() => invoke($0, `get-8`, []), [value("f64", 9)]); + +// ./test/core/global.wast:229 +assert_return(() => invoke($0, `get-mr`, []), [new ExternRefResult(10)]); + +// ./test/core/global.wast:231 +assert_return(() => invoke($0, `as-select-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:232 +assert_return(() => invoke($0, `as-select-mid`, []), [value("i32", 2)]); + +// ./test/core/global.wast:233 +assert_return(() => invoke($0, `as-select-last`, []), [value("i32", 2)]); + +// ./test/core/global.wast:235 +assert_return(() => invoke($0, `as-loop-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:236 +assert_return(() => invoke($0, `as-loop-mid`, []), [value("i32", 6)]); + +// ./test/core/global.wast:237 +assert_return(() => invoke($0, `as-loop-last`, []), [value("i32", 6)]); + +// ./test/core/global.wast:239 +assert_return(() => invoke($0, `as-if-condition`, []), [value("i32", 2)]); + +// ./test/core/global.wast:240 +assert_return(() => invoke($0, `as-if-then`, []), [value("i32", 6)]); + +// ./test/core/global.wast:241 +assert_return(() => invoke($0, `as-if-else`, []), [value("i32", 6)]); + +// ./test/core/global.wast:243 +assert_return(() => invoke($0, `as-br_if-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:244 +assert_return(() => invoke($0, `as-br_if-last`, []), [value("i32", 2)]); + +// ./test/core/global.wast:246 +assert_return(() => invoke($0, `as-br_table-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:247 +assert_return(() => invoke($0, `as-br_table-last`, []), [value("i32", 2)]); + +// ./test/core/global.wast:249 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 6)]); + +// ./test/core/global.wast:250 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 2)]); + +// ./test/core/global.wast:251 +assert_trap(() => invoke($0, `as-call_indirect-last`, []), `undefined element`); + +// ./test/core/global.wast:253 +assert_return(() => invoke($0, `as-store-first`, []), []); + +// ./test/core/global.wast:254 +assert_return(() => invoke($0, `as-store-last`, []), []); + +// ./test/core/global.wast:255 +assert_return(() => invoke($0, `as-load-operand`, []), [value("i32", 1)]); + +// ./test/core/global.wast:256 +assert_return(() => invoke($0, `as-memory.grow-value`, []), [value("i32", 1)]); + +// ./test/core/global.wast:258 +assert_return(() => invoke($0, `as-call-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:260 +assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:261 +assert_return(() => invoke($0, `as-drop-operand`, []), []); + +// ./test/core/global.wast:262 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:264 +assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 6)]); + +// ./test/core/global.wast:265 +assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 6)]); + +// ./test/core/global.wast:266 +assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 6)]); + +// ./test/core/global.wast:268 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("i32", 0)]); + +// ./test/core/global.wast:269 +assert_return(() => invoke($0, `as-binary-operand`, []), [value("i32", 36)]); + +// ./test/core/global.wast:270 +assert_return(() => invoke($0, `as-compare-operand`, []), [value("i32", 1)]); + +// ./test/core/global.wast:272 +assert_invalid( + () => instantiate(`(module (global f32 (f32.const 0)) (func (global.set 0 (f32.const 1))))`), + `global is immutable`, +); + +// ./test/core/global.wast:277 +assert_invalid( + () => instantiate(`(module (import "spectest" "global_i32" (global i32)) (func (global.set 0 (i32.const 1))))`), + `global is immutable`, +); + +// ./test/core/global.wast:283 +let $1 = instantiate(`(module (global (mut f32) (f32.const 0)) (export "a" (global 0)))`); + +// ./test/core/global.wast:284 +let $2 = instantiate(`(module (global (export "a") (mut f32) (f32.const 0)))`); + +// ./test/core/global.wast:286 +assert_invalid( + () => instantiate(`(module (global f32 (f32.neg (f32.const 0))))`), + `constant expression required`, +); + +// ./test/core/global.wast:291 +assert_invalid( + () => instantiate(`(module (global f32 (local.get 0)))`), + `constant expression required`, +); + +// ./test/core/global.wast:296 +assert_invalid( + () => instantiate(`(module (global f32 (f32.neg (f32.const 1))))`), + `constant expression required`, +); + +// ./test/core/global.wast:301 +assert_invalid( + () => instantiate(`(module (global i32 (i32.const 0) (nop)))`), + `constant expression required`, +); + +// ./test/core/global.wast:306 +assert_invalid( + () => instantiate(`(module (global i32 (i32.ctz (i32.const 0))))`), + `constant expression required`, +); + +// ./test/core/global.wast:311 +assert_invalid( + () => instantiate(`(module (global i32 (nop)))`), + `constant expression required`, +); + +// ./test/core/global.wast:316 +assert_invalid(() => instantiate(`(module (global i32 (f32.const 0)))`), `type mismatch`); + +// ./test/core/global.wast:321 +assert_invalid( + () => instantiate(`(module (global i32 (i32.const 0) (i32.const 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:326 +assert_invalid( + () => instantiate(`(module (global i32 (;empty instruction sequence;)))`), + `type mismatch`, +); + +// ./test/core/global.wast:331 +assert_invalid( + () => instantiate(`(module (global (import "" "") externref) (global funcref (global.get 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:336 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-i32") i32) (global i32 (global.get 0) (global.get 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:341 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-i32") i32) (global i32 (i32.const 0) (global.get 0)))`), + `type mismatch`, +); + +// ./test/core/global.wast:346 +assert_invalid( + () => instantiate(`(module (global i32 (global.get 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:351 +assert_invalid( + () => instantiate(`(module (global i32 (i32.const 0)) (global i32 (global.get 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:355 +assert_invalid( + () => instantiate(`(module (global $$g i32 (i32.const 0)) (global i32 (global.get $$g)))`), + `unknown global`, +); + +// ./test/core/global.wast:360 +assert_invalid( + () => instantiate(`(module (global i32 (global.get 1)) (global i32 (i32.const 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:365 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-i32") i32) (global i32 (global.get 2)))`), + `unknown global`, +); + +// ./test/core/global.wast:370 +assert_invalid( + () => instantiate(`(module (global (import "test" "global-mut-i32") (mut i32)) (global i32 (global.get 0)))`), + `constant expression required`, +); + +// ./test/core/global.wast:375 +let $3 = instantiate(`(module + (import "spectest" "global_i32" (global i32)) +)`); + +// ./test/core/global.wast:378 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\98\\80\\80\\80\\00" ;; import section + "\\01" ;; length 1 + "\\08\\73\\70\\65\\63\\74\\65\\73\\74" ;; "spectest" + "\\0a\\67\\6c\\6f\\62\\61\\6c\\5f\\69\\33\\32" ;; "global_i32" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\02" ;; malformed mutability + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:391 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\98\\80\\80\\80\\00" ;; import section + "\\01" ;; length 1 + "\\08\\73\\70\\65\\63\\74\\65\\73\\74" ;; "spectest" + "\\0a\\67\\6c\\6f\\62\\61\\6c\\5f\\69\\33\\32" ;; "global_i32" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\ff" ;; malformed mutability + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:405 +let $4 = instantiate(`(module + (global i32 (i32.const 0)) +)`); + +// ./test/core/global.wast:408 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\06\\86\\80\\80\\80\\00" ;; global section + "\\01" ;; length 1 + "\\7f" ;; i32 + "\\02" ;; malformed mutability + "\\41\\00" ;; i32.const 0 + "\\0b" ;; end + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:420 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\06\\86\\80\\80\\80\\00" ;; global section + "\\01" ;; length 1 + "\\7f" ;; i32 + "\\ff" ;; malformed mutability + "\\41\\00" ;; i32.const 0 + "\\0b" ;; end + )`), + `malformed mutability`, +); + +// ./test/core/global.wast:434 +assert_invalid( + () => instantiate(`(module (func (result i32) (global.get 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:439 +assert_invalid( + () => instantiate(`(module + (global i32 (i32.const 0)) + (func (result i32) (global.get 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:447 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (func (result i32) (global.get 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:455 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (global i32 (i32.const 0)) + (func (result i32) (global.get 2)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:465 +assert_invalid( + () => instantiate(`(module (func (i32.const 0) (global.set 0)))`), + `unknown global`, +); + +// ./test/core/global.wast:470 +assert_invalid( + () => instantiate(`(module + (global i32 (i32.const 0)) + (func (i32.const 0) (global.set 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:478 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (func (i32.const 0) (global.set 1)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:486 +assert_invalid( + () => instantiate(`(module + (import "spectest" "global_i32" (global i32)) + (global i32 (i32.const 0)) + (func (i32.const 0) (global.set 2)) + )`), + `unknown global`, +); + +// ./test/core/global.wast:496 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty + (global.set $$x) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:505 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-block + (i32.const 0) + (block (global.set $$x)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:515 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-loop + (i32.const 0) + (loop (global.set $$x)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:525 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:535 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:545 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-br + (i32.const 0) + (block (br 0 (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:555 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-br_if + (i32.const 0) + (block (br_if 0 (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:565 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-br_table + (i32.const 0) + (block (br_table 0 (global.set $$x))) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:575 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-return + (return (global.set $$x)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:584 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-select + (select (global.set $$x) (i32.const 1) (i32.const 2)) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:593 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-global.set-value-empty-in-call + (call 1 (global.set $$x)) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:603 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-global.set-value-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (global.set $$x) (i32.const 0) + ) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/global.wast:622 +assert_malformed( + () => instantiate(`(global $$foo i32 (i32.const 0)) (global $$foo i32 (i32.const 0)) `), + `duplicate global`, +); + +// ./test/core/global.wast:626 +assert_malformed( + () => instantiate(`(import "" "" (global $$foo i32)) (global $$foo i32 (i32.const 0)) `), + `duplicate global`, +); + +// ./test/core/global.wast:630 +assert_malformed( + () => instantiate(`(import "" "" (global $$foo i32)) (import "" "" (global $$foo i32)) `), + `duplicate global`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/harness/directives.txt b/js/src/jit-test/tests/wasm/spec/spec/harness/directives.txt new file mode 100644 index 0000000000..d41243abbb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/harness/directives.txt @@ -0,0 +1 @@ +|jit-test| skip-if: true \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/spec/harness/harness.js b/js/src/jit-test/tests/wasm/spec/spec/harness/harness.js new file mode 100644 index 0000000000..a96781e8ed --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/harness/harness.js @@ -0,0 +1,448 @@ +"use strict"; + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +if (!wasmIsSupported()) { + quit(); +} + +function bytes(type, bytes) { + var typedBuffer = new Uint8Array(bytes); + return wasmGlobalFromArrayBuffer(type, typedBuffer.buffer); +} +function value(type, value) { + return new WebAssembly.Global({ + value: type, + mutable: false, + }, value); +} + +function i8x16(elements) { + let typedBuffer = new Uint8Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i16x8(elements) { + let typedBuffer = new Uint16Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i32x4(elements) { + let typedBuffer = new Uint32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i64x2(elements) { + let typedBuffer = new BigUint64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f32x4(elements) { + let typedBuffer = new Float32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f64x2(elements) { + let typedBuffer = new Float64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} + +function either(...arr) { + return new EitherVariants(arr); +} + +class F32x4Pattern { + constructor(x, y, z, w) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } +} + +class F64x2Pattern { + constructor(x, y) { + this.x = x; + this.y = y; + } +} + +class RefWithType { + constructor(type) { + this.type = type; + } + + formatExpected() { + return `RefWithType(${this.type})`; + } + + test(refGlobal) { + try { + new WebAssembly.Global({value: this.type}, refGlobal.value); + return true; + } catch (err) { + assertEq(err instanceof TypeError, true, `wrong type of error when creating global: ${err}`); + assertEq(!!err.message.match(/can only pass/), true, `wrong type of error when creating global: ${err}`); + return false; + } + } +} + +// ref.extern values created by spec tests will be JS objects of the form +// { [externsym]: }. Other externref values are possible to observe +// if extern.convert_any is used. +let externsym = Symbol("externref"); +function externref(s) { + return { [externsym]: s }; +} +function is_externref(x) { + return (x !== null && externsym in x) ? 1 : 0; +} +function is_funcref(x) { + return typeof x === "function" ? 1 : 0; +} +function eq_externref(x, y) { + return x === y ? 1 : 0; +} +function eq_funcref(x, y) { + return x === y ? 1 : 0; +} + +class ExternRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.extern ${this.n}`; + } + + test(global) { + // the global's value can either be an externref or just a plain old JS number + let result = global.value; + if (typeof global.value === "object" && externsym in global.value) { + result = global.value[externsym]; + } + return result === this.n; + } +} + +// ref.host values created by spectests will be whatever the JS API does to +// convert the given value to anyref. It should implicitly be like any.convert_extern. +function hostref(v) { + if (!wasmGcEnabled()) { + throw new Error("ref.host only works when wasm GC is enabled"); + } + + const { internalizeNum } = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(`(module + (func (import "test" "coerce") (param i32) (result anyref)) + (func (export "internalizeNum") (param i32) (result anyref) + (call 0 (local.get 0)) + ) + )`)), + { "test": { "coerce": x => x } }, + ).exports; + return internalizeNum(v); +} + +class HostRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.host ${this.n}`; + } + + test(externrefGlobal) { + assertEq(externsym in externrefGlobal.value, true, `HostRefResult only works with externref inputs`); + return externrefGlobal.value[externsym] === this.n; + } +} + +let spectest = { + externref: externref, + is_externref: is_externref, + is_funcref: is_funcref, + eq_externref: eq_externref, + eq_funcref: eq_funcref, + print: console.log.bind(console), + print_i32: console.log.bind(console), + print_i32_f32: console.log.bind(console), + print_f64_f64: console.log.bind(console), + print_f32: console.log.bind(console), + print_f64: console.log.bind(console), + global_i32: 666, + global_i64: 666n, + global_f32: 666, + global_f64: 666, + table: new WebAssembly.Table({ + initial: 10, + maximum: 20, + element: "anyfunc", + }), + memory: new WebAssembly.Memory({ initial: 1, maximum: 2 }), +}; + +let linkage = { + spectest, +}; + +function getInstance(instanceish) { + if (typeof instanceish === "string") { + assertEq( + instanceish in linkage, + true, + `'${instanceish}'' must be registered`, + ); + return linkage[instanceish]; + } + return instanceish; +} + +function instantiate(source) { + let bytecode = wasmTextToBinary(source); + let module = new WebAssembly.Module(bytecode); + let instance = new WebAssembly.Instance(module, linkage); + return instance.exports; +} + +function register(instanceish, name) { + linkage[name] = getInstance(instanceish); +} + +function invoke(instanceish, field, params) { + let func = getInstance(instanceish)[field]; + assertEq(func instanceof Function, true, "expected a function"); + return wasmLosslessInvoke(func, ...params); +} + +function get(instanceish, field) { + let global = getInstance(instanceish)[field]; + assertEq( + global instanceof WebAssembly.Global, + true, + "expected a WebAssembly.Global", + ); + return global; +} + +function assert_trap(thunk, message) { + try { + thunk(); + throw new Error("expected trap"); + } catch (err) { + if (err instanceof WebAssembly.RuntimeError) { + return; + } + throw err; + } +} + +let StackOverflow; +try { + (function f() { + 1 + f(); + })(); +} catch (e) { + StackOverflow = e.constructor; +} +function assert_exhaustion(thunk, message) { + try { + thunk(); + assertEq("normal return", "exhaustion"); + } catch (err) { + assertEq( + err instanceof StackOverflow, + true, + "expected exhaustion", + ); + } +} + +function assert_invalid(thunk, message) { + try { + thunk(); + assertEq("valid module", "invalid module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an invalid module", + ); + } +} + +function assert_unlinkable(thunk, message) { + try { + thunk(); + assertEq(true, false, "expected an unlinkable module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an unlinkable module", + ); + } +} + +function assert_malformed(thunk, message) { + try { + thunk(); + assertEq("valid module", "malformed module"); + } catch (err) { + assertEq( + err instanceof TypeError || + err instanceof SyntaxError || + err instanceof WebAssembly.CompileError || + err instanceof WebAssembly.LinkError, + true, + `expected a malformed module`, + ); + } +} + +function assert_exception(thunk) { + let thrown = false; + try { + thunk(); + } catch (err) { + thrown = true; + } + assertEq(thrown, true, "expected an exception to be thrown"); +} + +function assert_return(thunk, expected) { + let results = thunk(); + + if (results === undefined) { + results = []; + } else if (!Array.isArray(results)) { + results = [results]; + } + if (!Array.isArray(expected)) { + expected = [expected]; + } + + if (!compareResults(results, expected)) { + let got = results.map((x) => formatResult(x)).join(", "); + let wanted = expected.map((x) => formatExpected(x)).join(", "); + assertEq( + `[${got}]`, + `[${wanted}]`, + ); + assertEq(true, false, `${got} !== ${wanted}`); + } +} + +function formatResult(result) { + if (typeof (result) === "object") { + return wasmGlobalToString(result); + } else { + return `${result}`; + } +} + +function formatExpected(expected) { + if ( + expected === `f32_canonical_nan` || + expected === `f32_arithmetic_nan` || + expected === `f64_canonical_nan` || + expected === `f64_arithmetic_nan` + ) { + return expected; + } else if (expected instanceof F32x4Pattern) { + return `f32x4(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + }, ${formatExpected(expected.z)}, ${formatExpected(expected.w)})`; + } else if (expected instanceof F64x2Pattern) { + return `f64x2(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + })`; + } else if (expected instanceof EitherVariants) { + return expected.formatExpected(); + } else if (expected instanceof RefWithType) { + return expected.formatExpected(); + } else if (expected instanceof ExternRefResult) { + return expected.formatExpected(); + } else if (expected instanceof HostRefResult) { + return expected.formatExpected(); + } else if (typeof (expected) === "object") { + return wasmGlobalToString(expected); + } else { + throw new Error("unknown expected result"); + } +} + +class EitherVariants { + constructor(arr) { + this.arr = arr; + } + matches(v) { + return this.arr.some((e) => compareResult(v, e)); + } + formatExpected() { + return `either(${this.arr.map(formatExpected).join(", ")})`; + } +} + +function compareResults(results, expected) { + if (results.length !== expected.length) { + return false; + } + for (let i in results) { + if (expected[i] instanceof EitherVariants) { + return expected[i].matches(results[i]); + } + if (!compareResult(results[i], expected[i])) { + return false; + } + } + return true; +} + +function compareResult(result, expected) { + if ( + expected === `canonical_nan` || + expected === `arithmetic_nan` + ) { + return wasmGlobalIsNaN(result, expected); + } else if (expected === null) { + return result.value === null; + } else if (expected instanceof F32x4Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f32x4", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 1), expected.y) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 2), expected.z) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 3), expected.w); + } else if (expected instanceof F64x2Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f64x2", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f64x2", 1), expected.y); + } else if (expected instanceof RefWithType) { + return expected.test(result); + } else if (expected instanceof ExternRefResult) { + return expected.test(result); + } else if (expected instanceof HostRefResult) { + return expected.test(result); + } else if (typeof (expected) === "object") { + return wasmGlobalsEqual(result, expected); + } else { + throw new Error("unknown expected result"); + } +} diff --git a/js/src/jit-test/tests/wasm/spec/spec/i32.wast.js b/js/src/jit-test/tests/wasm/spec/spec/i32.wast.js new file mode 100644 index 0000000000..b7455c08b1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/i32.wast.js @@ -0,0 +1,1967 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/i32.wast + +// ./test/core/i32.wast:3 +let $0 = instantiate(`(module + (func (export "add") (param $$x i32) (param $$y i32) (result i32) (i32.add (local.get $$x) (local.get $$y))) + (func (export "sub") (param $$x i32) (param $$y i32) (result i32) (i32.sub (local.get $$x) (local.get $$y))) + (func (export "mul") (param $$x i32) (param $$y i32) (result i32) (i32.mul (local.get $$x) (local.get $$y))) + (func (export "div_s") (param $$x i32) (param $$y i32) (result i32) (i32.div_s (local.get $$x) (local.get $$y))) + (func (export "div_u") (param $$x i32) (param $$y i32) (result i32) (i32.div_u (local.get $$x) (local.get $$y))) + (func (export "rem_s") (param $$x i32) (param $$y i32) (result i32) (i32.rem_s (local.get $$x) (local.get $$y))) + (func (export "rem_u") (param $$x i32) (param $$y i32) (result i32) (i32.rem_u (local.get $$x) (local.get $$y))) + (func (export "and") (param $$x i32) (param $$y i32) (result i32) (i32.and (local.get $$x) (local.get $$y))) + (func (export "or") (param $$x i32) (param $$y i32) (result i32) (i32.or (local.get $$x) (local.get $$y))) + (func (export "xor") (param $$x i32) (param $$y i32) (result i32) (i32.xor (local.get $$x) (local.get $$y))) + (func (export "shl") (param $$x i32) (param $$y i32) (result i32) (i32.shl (local.get $$x) (local.get $$y))) + (func (export "shr_s") (param $$x i32) (param $$y i32) (result i32) (i32.shr_s (local.get $$x) (local.get $$y))) + (func (export "shr_u") (param $$x i32) (param $$y i32) (result i32) (i32.shr_u (local.get $$x) (local.get $$y))) + (func (export "rotl") (param $$x i32) (param $$y i32) (result i32) (i32.rotl (local.get $$x) (local.get $$y))) + (func (export "rotr") (param $$x i32) (param $$y i32) (result i32) (i32.rotr (local.get $$x) (local.get $$y))) + (func (export "clz") (param $$x i32) (result i32) (i32.clz (local.get $$x))) + (func (export "ctz") (param $$x i32) (result i32) (i32.ctz (local.get $$x))) + (func (export "popcnt") (param $$x i32) (result i32) (i32.popcnt (local.get $$x))) + (func (export "extend8_s") (param $$x i32) (result i32) (i32.extend8_s (local.get $$x))) + (func (export "extend16_s") (param $$x i32) (result i32) (i32.extend16_s (local.get $$x))) + (func (export "eqz") (param $$x i32) (result i32) (i32.eqz (local.get $$x))) + (func (export "eq") (param $$x i32) (param $$y i32) (result i32) (i32.eq (local.get $$x) (local.get $$y))) + (func (export "ne") (param $$x i32) (param $$y i32) (result i32) (i32.ne (local.get $$x) (local.get $$y))) + (func (export "lt_s") (param $$x i32) (param $$y i32) (result i32) (i32.lt_s (local.get $$x) (local.get $$y))) + (func (export "lt_u") (param $$x i32) (param $$y i32) (result i32) (i32.lt_u (local.get $$x) (local.get $$y))) + (func (export "le_s") (param $$x i32) (param $$y i32) (result i32) (i32.le_s (local.get $$x) (local.get $$y))) + (func (export "le_u") (param $$x i32) (param $$y i32) (result i32) (i32.le_u (local.get $$x) (local.get $$y))) + (func (export "gt_s") (param $$x i32) (param $$y i32) (result i32) (i32.gt_s (local.get $$x) (local.get $$y))) + (func (export "gt_u") (param $$x i32) (param $$y i32) (result i32) (i32.gt_u (local.get $$x) (local.get $$y))) + (func (export "ge_s") (param $$x i32) (param $$y i32) (result i32) (i32.ge_s (local.get $$x) (local.get $$y))) + (func (export "ge_u") (param $$x i32) (param $$y i32) (result i32) (i32.ge_u (local.get $$x) (local.get $$y))) +)`); + +// ./test/core/i32.wast:37 +assert_return(() => invoke($0, `add`, [1, 1]), [value("i32", 2)]); + +// ./test/core/i32.wast:38 +assert_return(() => invoke($0, `add`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:39 +assert_return(() => invoke($0, `add`, [-1, -1]), [value("i32", -2)]); + +// ./test/core/i32.wast:40 +assert_return(() => invoke($0, `add`, [-1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:41 +assert_return(() => invoke($0, `add`, [2147483647, 1]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:42 +assert_return(() => invoke($0, `add`, [-2147483648, -1]), [value("i32", 2147483647)]); + +// ./test/core/i32.wast:43 +assert_return(() => invoke($0, `add`, [-2147483648, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:44 +assert_return(() => invoke($0, `add`, [1073741823, 1]), [value("i32", 1073741824)]); + +// ./test/core/i32.wast:46 +assert_return(() => invoke($0, `sub`, [1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:47 +assert_return(() => invoke($0, `sub`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:48 +assert_return(() => invoke($0, `sub`, [-1, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:49 +assert_return(() => invoke($0, `sub`, [2147483647, -1]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:50 +assert_return(() => invoke($0, `sub`, [-2147483648, 1]), [value("i32", 2147483647)]); + +// ./test/core/i32.wast:51 +assert_return(() => invoke($0, `sub`, [-2147483648, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:52 +assert_return(() => invoke($0, `sub`, [1073741823, -1]), [value("i32", 1073741824)]); + +// ./test/core/i32.wast:54 +assert_return(() => invoke($0, `mul`, [1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:55 +assert_return(() => invoke($0, `mul`, [1, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:56 +assert_return(() => invoke($0, `mul`, [-1, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:57 +assert_return(() => invoke($0, `mul`, [268435456, 4096]), [value("i32", 0)]); + +// ./test/core/i32.wast:58 +assert_return(() => invoke($0, `mul`, [-2147483648, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:59 +assert_return(() => invoke($0, `mul`, [-2147483648, -1]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:60 +assert_return(() => invoke($0, `mul`, [2147483647, -1]), [value("i32", -2147483647)]); + +// ./test/core/i32.wast:61 +assert_return(() => invoke($0, `mul`, [19088743, 1985229328]), [value("i32", 898528368)]); + +// ./test/core/i32.wast:62 +assert_return(() => invoke($0, `mul`, [2147483647, 2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:64 +assert_trap(() => invoke($0, `div_s`, [1, 0]), `integer divide by zero`); + +// ./test/core/i32.wast:65 +assert_trap(() => invoke($0, `div_s`, [0, 0]), `integer divide by zero`); + +// ./test/core/i32.wast:66 +assert_trap(() => invoke($0, `div_s`, [-2147483648, -1]), `integer overflow`); + +// ./test/core/i32.wast:67 +assert_trap(() => invoke($0, `div_s`, [-2147483648, 0]), `integer divide by zero`); + +// ./test/core/i32.wast:68 +assert_return(() => invoke($0, `div_s`, [1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:69 +assert_return(() => invoke($0, `div_s`, [0, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:70 +assert_return(() => invoke($0, `div_s`, [0, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:71 +assert_return(() => invoke($0, `div_s`, [-1, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:72 +assert_return(() => invoke($0, `div_s`, [-2147483648, 2]), [value("i32", -1073741824)]); + +// ./test/core/i32.wast:73 +assert_return(() => invoke($0, `div_s`, [-2147483647, 1000]), [value("i32", -2147483)]); + +// ./test/core/i32.wast:74 +assert_return(() => invoke($0, `div_s`, [5, 2]), [value("i32", 2)]); + +// ./test/core/i32.wast:75 +assert_return(() => invoke($0, `div_s`, [-5, 2]), [value("i32", -2)]); + +// ./test/core/i32.wast:76 +assert_return(() => invoke($0, `div_s`, [5, -2]), [value("i32", -2)]); + +// ./test/core/i32.wast:77 +assert_return(() => invoke($0, `div_s`, [-5, -2]), [value("i32", 2)]); + +// ./test/core/i32.wast:78 +assert_return(() => invoke($0, `div_s`, [7, 3]), [value("i32", 2)]); + +// ./test/core/i32.wast:79 +assert_return(() => invoke($0, `div_s`, [-7, 3]), [value("i32", -2)]); + +// ./test/core/i32.wast:80 +assert_return(() => invoke($0, `div_s`, [7, -3]), [value("i32", -2)]); + +// ./test/core/i32.wast:81 +assert_return(() => invoke($0, `div_s`, [-7, -3]), [value("i32", 2)]); + +// ./test/core/i32.wast:82 +assert_return(() => invoke($0, `div_s`, [11, 5]), [value("i32", 2)]); + +// ./test/core/i32.wast:83 +assert_return(() => invoke($0, `div_s`, [17, 7]), [value("i32", 2)]); + +// ./test/core/i32.wast:85 +assert_trap(() => invoke($0, `div_u`, [1, 0]), `integer divide by zero`); + +// ./test/core/i32.wast:86 +assert_trap(() => invoke($0, `div_u`, [0, 0]), `integer divide by zero`); + +// ./test/core/i32.wast:87 +assert_return(() => invoke($0, `div_u`, [1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:88 +assert_return(() => invoke($0, `div_u`, [0, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:89 +assert_return(() => invoke($0, `div_u`, [-1, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:90 +assert_return(() => invoke($0, `div_u`, [-2147483648, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:91 +assert_return(() => invoke($0, `div_u`, [-2147483648, 2]), [value("i32", 1073741824)]); + +// ./test/core/i32.wast:92 +assert_return(() => invoke($0, `div_u`, [-1880092688, 65537]), [value("i32", 36847)]); + +// ./test/core/i32.wast:93 +assert_return(() => invoke($0, `div_u`, [-2147483647, 1000]), [value("i32", 2147483)]); + +// ./test/core/i32.wast:94 +assert_return(() => invoke($0, `div_u`, [5, 2]), [value("i32", 2)]); + +// ./test/core/i32.wast:95 +assert_return(() => invoke($0, `div_u`, [-5, 2]), [value("i32", 2147483645)]); + +// ./test/core/i32.wast:96 +assert_return(() => invoke($0, `div_u`, [5, -2]), [value("i32", 0)]); + +// ./test/core/i32.wast:97 +assert_return(() => invoke($0, `div_u`, [-5, -2]), [value("i32", 0)]); + +// ./test/core/i32.wast:98 +assert_return(() => invoke($0, `div_u`, [7, 3]), [value("i32", 2)]); + +// ./test/core/i32.wast:99 +assert_return(() => invoke($0, `div_u`, [11, 5]), [value("i32", 2)]); + +// ./test/core/i32.wast:100 +assert_return(() => invoke($0, `div_u`, [17, 7]), [value("i32", 2)]); + +// ./test/core/i32.wast:102 +assert_trap(() => invoke($0, `rem_s`, [1, 0]), `integer divide by zero`); + +// ./test/core/i32.wast:103 +assert_trap(() => invoke($0, `rem_s`, [0, 0]), `integer divide by zero`); + +// ./test/core/i32.wast:104 +assert_return(() => invoke($0, `rem_s`, [2147483647, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:105 +assert_return(() => invoke($0, `rem_s`, [1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:106 +assert_return(() => invoke($0, `rem_s`, [0, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:107 +assert_return(() => invoke($0, `rem_s`, [0, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:108 +assert_return(() => invoke($0, `rem_s`, [-1, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:109 +assert_return(() => invoke($0, `rem_s`, [-2147483648, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:110 +assert_return(() => invoke($0, `rem_s`, [-2147483648, 2]), [value("i32", 0)]); + +// ./test/core/i32.wast:111 +assert_return(() => invoke($0, `rem_s`, [-2147483647, 1000]), [value("i32", -647)]); + +// ./test/core/i32.wast:112 +assert_return(() => invoke($0, `rem_s`, [5, 2]), [value("i32", 1)]); + +// ./test/core/i32.wast:113 +assert_return(() => invoke($0, `rem_s`, [-5, 2]), [value("i32", -1)]); + +// ./test/core/i32.wast:114 +assert_return(() => invoke($0, `rem_s`, [5, -2]), [value("i32", 1)]); + +// ./test/core/i32.wast:115 +assert_return(() => invoke($0, `rem_s`, [-5, -2]), [value("i32", -1)]); + +// ./test/core/i32.wast:116 +assert_return(() => invoke($0, `rem_s`, [7, 3]), [value("i32", 1)]); + +// ./test/core/i32.wast:117 +assert_return(() => invoke($0, `rem_s`, [-7, 3]), [value("i32", -1)]); + +// ./test/core/i32.wast:118 +assert_return(() => invoke($0, `rem_s`, [7, -3]), [value("i32", 1)]); + +// ./test/core/i32.wast:119 +assert_return(() => invoke($0, `rem_s`, [-7, -3]), [value("i32", -1)]); + +// ./test/core/i32.wast:120 +assert_return(() => invoke($0, `rem_s`, [11, 5]), [value("i32", 1)]); + +// ./test/core/i32.wast:121 +assert_return(() => invoke($0, `rem_s`, [17, 7]), [value("i32", 3)]); + +// ./test/core/i32.wast:123 +assert_trap(() => invoke($0, `rem_u`, [1, 0]), `integer divide by zero`); + +// ./test/core/i32.wast:124 +assert_trap(() => invoke($0, `rem_u`, [0, 0]), `integer divide by zero`); + +// ./test/core/i32.wast:125 +assert_return(() => invoke($0, `rem_u`, [1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:126 +assert_return(() => invoke($0, `rem_u`, [0, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:127 +assert_return(() => invoke($0, `rem_u`, [-1, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:128 +assert_return(() => invoke($0, `rem_u`, [-2147483648, -1]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:129 +assert_return(() => invoke($0, `rem_u`, [-2147483648, 2]), [value("i32", 0)]); + +// ./test/core/i32.wast:130 +assert_return(() => invoke($0, `rem_u`, [-1880092688, 65537]), [value("i32", 32769)]); + +// ./test/core/i32.wast:131 +assert_return(() => invoke($0, `rem_u`, [-2147483647, 1000]), [value("i32", 649)]); + +// ./test/core/i32.wast:132 +assert_return(() => invoke($0, `rem_u`, [5, 2]), [value("i32", 1)]); + +// ./test/core/i32.wast:133 +assert_return(() => invoke($0, `rem_u`, [-5, 2]), [value("i32", 1)]); + +// ./test/core/i32.wast:134 +assert_return(() => invoke($0, `rem_u`, [5, -2]), [value("i32", 5)]); + +// ./test/core/i32.wast:135 +assert_return(() => invoke($0, `rem_u`, [-5, -2]), [value("i32", -5)]); + +// ./test/core/i32.wast:136 +assert_return(() => invoke($0, `rem_u`, [7, 3]), [value("i32", 1)]); + +// ./test/core/i32.wast:137 +assert_return(() => invoke($0, `rem_u`, [11, 5]), [value("i32", 1)]); + +// ./test/core/i32.wast:138 +assert_return(() => invoke($0, `rem_u`, [17, 7]), [value("i32", 3)]); + +// ./test/core/i32.wast:140 +assert_return(() => invoke($0, `and`, [1, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:141 +assert_return(() => invoke($0, `and`, [0, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:142 +assert_return(() => invoke($0, `and`, [1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:143 +assert_return(() => invoke($0, `and`, [0, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:144 +assert_return(() => invoke($0, `and`, [2147483647, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:145 +assert_return(() => invoke($0, `and`, [2147483647, -1]), [value("i32", 2147483647)]); + +// ./test/core/i32.wast:146 +assert_return(() => invoke($0, `and`, [-252641281, -3856]), [value("i32", -252645136)]); + +// ./test/core/i32.wast:147 +assert_return(() => invoke($0, `and`, [-1, -1]), [value("i32", -1)]); + +// ./test/core/i32.wast:149 +assert_return(() => invoke($0, `or`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:150 +assert_return(() => invoke($0, `or`, [0, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:151 +assert_return(() => invoke($0, `or`, [1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:152 +assert_return(() => invoke($0, `or`, [0, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:153 +assert_return(() => invoke($0, `or`, [2147483647, -2147483648]), [value("i32", -1)]); + +// ./test/core/i32.wast:154 +assert_return(() => invoke($0, `or`, [-2147483648, 0]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:155 +assert_return(() => invoke($0, `or`, [-252641281, -3856]), [value("i32", -1)]); + +// ./test/core/i32.wast:156 +assert_return(() => invoke($0, `or`, [-1, -1]), [value("i32", -1)]); + +// ./test/core/i32.wast:158 +assert_return(() => invoke($0, `xor`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:159 +assert_return(() => invoke($0, `xor`, [0, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:160 +assert_return(() => invoke($0, `xor`, [1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:161 +assert_return(() => invoke($0, `xor`, [0, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:162 +assert_return(() => invoke($0, `xor`, [2147483647, -2147483648]), [value("i32", -1)]); + +// ./test/core/i32.wast:163 +assert_return(() => invoke($0, `xor`, [-2147483648, 0]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:164 +assert_return(() => invoke($0, `xor`, [-1, -2147483648]), [value("i32", 2147483647)]); + +// ./test/core/i32.wast:165 +assert_return(() => invoke($0, `xor`, [-1, 2147483647]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:166 +assert_return(() => invoke($0, `xor`, [-252641281, -3856]), [value("i32", 252645135)]); + +// ./test/core/i32.wast:167 +assert_return(() => invoke($0, `xor`, [-1, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:169 +assert_return(() => invoke($0, `shl`, [1, 1]), [value("i32", 2)]); + +// ./test/core/i32.wast:170 +assert_return(() => invoke($0, `shl`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:171 +assert_return(() => invoke($0, `shl`, [2147483647, 1]), [value("i32", -2)]); + +// ./test/core/i32.wast:172 +assert_return(() => invoke($0, `shl`, [-1, 1]), [value("i32", -2)]); + +// ./test/core/i32.wast:173 +assert_return(() => invoke($0, `shl`, [-2147483648, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:174 +assert_return(() => invoke($0, `shl`, [1073741824, 1]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:175 +assert_return(() => invoke($0, `shl`, [1, 31]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:176 +assert_return(() => invoke($0, `shl`, [1, 32]), [value("i32", 1)]); + +// ./test/core/i32.wast:177 +assert_return(() => invoke($0, `shl`, [1, 33]), [value("i32", 2)]); + +// ./test/core/i32.wast:178 +assert_return(() => invoke($0, `shl`, [1, -1]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:179 +assert_return(() => invoke($0, `shl`, [1, 2147483647]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:181 +assert_return(() => invoke($0, `shr_s`, [1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:182 +assert_return(() => invoke($0, `shr_s`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:183 +assert_return(() => invoke($0, `shr_s`, [-1, 1]), [value("i32", -1)]); + +// ./test/core/i32.wast:184 +assert_return(() => invoke($0, `shr_s`, [2147483647, 1]), [value("i32", 1073741823)]); + +// ./test/core/i32.wast:185 +assert_return(() => invoke($0, `shr_s`, [-2147483648, 1]), [value("i32", -1073741824)]); + +// ./test/core/i32.wast:186 +assert_return(() => invoke($0, `shr_s`, [1073741824, 1]), [value("i32", 536870912)]); + +// ./test/core/i32.wast:187 +assert_return(() => invoke($0, `shr_s`, [1, 32]), [value("i32", 1)]); + +// ./test/core/i32.wast:188 +assert_return(() => invoke($0, `shr_s`, [1, 33]), [value("i32", 0)]); + +// ./test/core/i32.wast:189 +assert_return(() => invoke($0, `shr_s`, [1, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:190 +assert_return(() => invoke($0, `shr_s`, [1, 2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:191 +assert_return(() => invoke($0, `shr_s`, [1, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:192 +assert_return(() => invoke($0, `shr_s`, [-2147483648, 31]), [value("i32", -1)]); + +// ./test/core/i32.wast:193 +assert_return(() => invoke($0, `shr_s`, [-1, 32]), [value("i32", -1)]); + +// ./test/core/i32.wast:194 +assert_return(() => invoke($0, `shr_s`, [-1, 33]), [value("i32", -1)]); + +// ./test/core/i32.wast:195 +assert_return(() => invoke($0, `shr_s`, [-1, -1]), [value("i32", -1)]); + +// ./test/core/i32.wast:196 +assert_return(() => invoke($0, `shr_s`, [-1, 2147483647]), [value("i32", -1)]); + +// ./test/core/i32.wast:197 +assert_return(() => invoke($0, `shr_s`, [-1, -2147483648]), [value("i32", -1)]); + +// ./test/core/i32.wast:199 +assert_return(() => invoke($0, `shr_u`, [1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:200 +assert_return(() => invoke($0, `shr_u`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:201 +assert_return(() => invoke($0, `shr_u`, [-1, 1]), [value("i32", 2147483647)]); + +// ./test/core/i32.wast:202 +assert_return(() => invoke($0, `shr_u`, [2147483647, 1]), [value("i32", 1073741823)]); + +// ./test/core/i32.wast:203 +assert_return(() => invoke($0, `shr_u`, [-2147483648, 1]), [value("i32", 1073741824)]); + +// ./test/core/i32.wast:204 +assert_return(() => invoke($0, `shr_u`, [1073741824, 1]), [value("i32", 536870912)]); + +// ./test/core/i32.wast:205 +assert_return(() => invoke($0, `shr_u`, [1, 32]), [value("i32", 1)]); + +// ./test/core/i32.wast:206 +assert_return(() => invoke($0, `shr_u`, [1, 33]), [value("i32", 0)]); + +// ./test/core/i32.wast:207 +assert_return(() => invoke($0, `shr_u`, [1, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:208 +assert_return(() => invoke($0, `shr_u`, [1, 2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:209 +assert_return(() => invoke($0, `shr_u`, [1, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:210 +assert_return(() => invoke($0, `shr_u`, [-2147483648, 31]), [value("i32", 1)]); + +// ./test/core/i32.wast:211 +assert_return(() => invoke($0, `shr_u`, [-1, 32]), [value("i32", -1)]); + +// ./test/core/i32.wast:212 +assert_return(() => invoke($0, `shr_u`, [-1, 33]), [value("i32", 2147483647)]); + +// ./test/core/i32.wast:213 +assert_return(() => invoke($0, `shr_u`, [-1, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:214 +assert_return(() => invoke($0, `shr_u`, [-1, 2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:215 +assert_return(() => invoke($0, `shr_u`, [-1, -2147483648]), [value("i32", -1)]); + +// ./test/core/i32.wast:217 +assert_return(() => invoke($0, `rotl`, [1, 1]), [value("i32", 2)]); + +// ./test/core/i32.wast:218 +assert_return(() => invoke($0, `rotl`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:219 +assert_return(() => invoke($0, `rotl`, [-1, 1]), [value("i32", -1)]); + +// ./test/core/i32.wast:220 +assert_return(() => invoke($0, `rotl`, [1, 32]), [value("i32", 1)]); + +// ./test/core/i32.wast:221 +assert_return(() => invoke($0, `rotl`, [-1412589450, 1]), [value("i32", 1469788397)]); + +// ./test/core/i32.wast:222 +assert_return(() => invoke($0, `rotl`, [-33498112, 4]), [value("i32", -535969777)]); + +// ./test/core/i32.wast:223 +assert_return(() => invoke($0, `rotl`, [-1329474845, 5]), [value("i32", 406477942)]); + +// ./test/core/i32.wast:224 +assert_return(() => invoke($0, `rotl`, [32768, 37]), [value("i32", 1048576)]); + +// ./test/core/i32.wast:225 +assert_return(() => invoke($0, `rotl`, [-1329474845, 65285]), [value("i32", 406477942)]); + +// ./test/core/i32.wast:226 +assert_return(() => invoke($0, `rotl`, [1989852383, -19]), [value("i32", 1469837011)]); + +// ./test/core/i32.wast:227 +assert_return(() => invoke($0, `rotl`, [1989852383, -2147483635]), [value("i32", 1469837011)]); + +// ./test/core/i32.wast:228 +assert_return(() => invoke($0, `rotl`, [1, 31]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:229 +assert_return(() => invoke($0, `rotl`, [-2147483648, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:231 +assert_return(() => invoke($0, `rotr`, [1, 1]), [value("i32", -2147483648)]); + +// ./test/core/i32.wast:232 +assert_return(() => invoke($0, `rotr`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:233 +assert_return(() => invoke($0, `rotr`, [-1, 1]), [value("i32", -1)]); + +// ./test/core/i32.wast:234 +assert_return(() => invoke($0, `rotr`, [1, 32]), [value("i32", 1)]); + +// ./test/core/i32.wast:235 +assert_return(() => invoke($0, `rotr`, [-16724992, 1]), [value("i32", 2139121152)]); + +// ./test/core/i32.wast:236 +assert_return(() => invoke($0, `rotr`, [524288, 4]), [value("i32", 32768)]); + +// ./test/core/i32.wast:237 +assert_return(() => invoke($0, `rotr`, [-1329474845, 5]), [value("i32", 495324823)]); + +// ./test/core/i32.wast:238 +assert_return(() => invoke($0, `rotr`, [32768, 37]), [value("i32", 1024)]); + +// ./test/core/i32.wast:239 +assert_return(() => invoke($0, `rotr`, [-1329474845, 65285]), [value("i32", 495324823)]); + +// ./test/core/i32.wast:240 +assert_return(() => invoke($0, `rotr`, [1989852383, -19]), [value("i32", -419711787)]); + +// ./test/core/i32.wast:241 +assert_return(() => invoke($0, `rotr`, [1989852383, -2147483635]), [value("i32", -419711787)]); + +// ./test/core/i32.wast:242 +assert_return(() => invoke($0, `rotr`, [1, 31]), [value("i32", 2)]); + +// ./test/core/i32.wast:243 +assert_return(() => invoke($0, `rotr`, [-2147483648, 31]), [value("i32", 1)]); + +// ./test/core/i32.wast:245 +assert_return(() => invoke($0, `clz`, [-1]), [value("i32", 0)]); + +// ./test/core/i32.wast:246 +assert_return(() => invoke($0, `clz`, [0]), [value("i32", 32)]); + +// ./test/core/i32.wast:247 +assert_return(() => invoke($0, `clz`, [32768]), [value("i32", 16)]); + +// ./test/core/i32.wast:248 +assert_return(() => invoke($0, `clz`, [255]), [value("i32", 24)]); + +// ./test/core/i32.wast:249 +assert_return(() => invoke($0, `clz`, [-2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:250 +assert_return(() => invoke($0, `clz`, [1]), [value("i32", 31)]); + +// ./test/core/i32.wast:251 +assert_return(() => invoke($0, `clz`, [2]), [value("i32", 30)]); + +// ./test/core/i32.wast:252 +assert_return(() => invoke($0, `clz`, [2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:254 +assert_return(() => invoke($0, `ctz`, [-1]), [value("i32", 0)]); + +// ./test/core/i32.wast:255 +assert_return(() => invoke($0, `ctz`, [0]), [value("i32", 32)]); + +// ./test/core/i32.wast:256 +assert_return(() => invoke($0, `ctz`, [32768]), [value("i32", 15)]); + +// ./test/core/i32.wast:257 +assert_return(() => invoke($0, `ctz`, [65536]), [value("i32", 16)]); + +// ./test/core/i32.wast:258 +assert_return(() => invoke($0, `ctz`, [-2147483648]), [value("i32", 31)]); + +// ./test/core/i32.wast:259 +assert_return(() => invoke($0, `ctz`, [2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:261 +assert_return(() => invoke($0, `popcnt`, [-1]), [value("i32", 32)]); + +// ./test/core/i32.wast:262 +assert_return(() => invoke($0, `popcnt`, [0]), [value("i32", 0)]); + +// ./test/core/i32.wast:263 +assert_return(() => invoke($0, `popcnt`, [32768]), [value("i32", 1)]); + +// ./test/core/i32.wast:264 +assert_return(() => invoke($0, `popcnt`, [-2147450880]), [value("i32", 2)]); + +// ./test/core/i32.wast:265 +assert_return(() => invoke($0, `popcnt`, [2147483647]), [value("i32", 31)]); + +// ./test/core/i32.wast:266 +assert_return(() => invoke($0, `popcnt`, [-1431655766]), [value("i32", 16)]); + +// ./test/core/i32.wast:267 +assert_return(() => invoke($0, `popcnt`, [1431655765]), [value("i32", 16)]); + +// ./test/core/i32.wast:268 +assert_return(() => invoke($0, `popcnt`, [-559038737]), [value("i32", 24)]); + +// ./test/core/i32.wast:270 +assert_return(() => invoke($0, `extend8_s`, [0]), [value("i32", 0)]); + +// ./test/core/i32.wast:271 +assert_return(() => invoke($0, `extend8_s`, [127]), [value("i32", 127)]); + +// ./test/core/i32.wast:272 +assert_return(() => invoke($0, `extend8_s`, [128]), [value("i32", -128)]); + +// ./test/core/i32.wast:273 +assert_return(() => invoke($0, `extend8_s`, [255]), [value("i32", -1)]); + +// ./test/core/i32.wast:274 +assert_return(() => invoke($0, `extend8_s`, [19088640]), [value("i32", 0)]); + +// ./test/core/i32.wast:275 +assert_return(() => invoke($0, `extend8_s`, [-19088768]), [value("i32", -128)]); + +// ./test/core/i32.wast:276 +assert_return(() => invoke($0, `extend8_s`, [-1]), [value("i32", -1)]); + +// ./test/core/i32.wast:278 +assert_return(() => invoke($0, `extend16_s`, [0]), [value("i32", 0)]); + +// ./test/core/i32.wast:279 +assert_return(() => invoke($0, `extend16_s`, [32767]), [value("i32", 32767)]); + +// ./test/core/i32.wast:280 +assert_return(() => invoke($0, `extend16_s`, [32768]), [value("i32", -32768)]); + +// ./test/core/i32.wast:281 +assert_return(() => invoke($0, `extend16_s`, [65535]), [value("i32", -1)]); + +// ./test/core/i32.wast:282 +assert_return(() => invoke($0, `extend16_s`, [19070976]), [value("i32", 0)]); + +// ./test/core/i32.wast:283 +assert_return(() => invoke($0, `extend16_s`, [-19103744]), [value("i32", -32768)]); + +// ./test/core/i32.wast:284 +assert_return(() => invoke($0, `extend16_s`, [-1]), [value("i32", -1)]); + +// ./test/core/i32.wast:286 +assert_return(() => invoke($0, `eqz`, [0]), [value("i32", 1)]); + +// ./test/core/i32.wast:287 +assert_return(() => invoke($0, `eqz`, [1]), [value("i32", 0)]); + +// ./test/core/i32.wast:288 +assert_return(() => invoke($0, `eqz`, [-2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:289 +assert_return(() => invoke($0, `eqz`, [2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:290 +assert_return(() => invoke($0, `eqz`, [-1]), [value("i32", 0)]); + +// ./test/core/i32.wast:292 +assert_return(() => invoke($0, `eq`, [0, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:293 +assert_return(() => invoke($0, `eq`, [1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:294 +assert_return(() => invoke($0, `eq`, [-1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:295 +assert_return(() => invoke($0, `eq`, [-2147483648, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:296 +assert_return(() => invoke($0, `eq`, [2147483647, 2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:297 +assert_return(() => invoke($0, `eq`, [-1, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:298 +assert_return(() => invoke($0, `eq`, [1, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:299 +assert_return(() => invoke($0, `eq`, [0, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:300 +assert_return(() => invoke($0, `eq`, [-2147483648, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:301 +assert_return(() => invoke($0, `eq`, [0, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:302 +assert_return(() => invoke($0, `eq`, [-2147483648, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:303 +assert_return(() => invoke($0, `eq`, [-1, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:304 +assert_return(() => invoke($0, `eq`, [-2147483648, 2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:305 +assert_return(() => invoke($0, `eq`, [2147483647, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:307 +assert_return(() => invoke($0, `ne`, [0, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:308 +assert_return(() => invoke($0, `ne`, [1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:309 +assert_return(() => invoke($0, `ne`, [-1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:310 +assert_return(() => invoke($0, `ne`, [-2147483648, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:311 +assert_return(() => invoke($0, `ne`, [2147483647, 2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:312 +assert_return(() => invoke($0, `ne`, [-1, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:313 +assert_return(() => invoke($0, `ne`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:314 +assert_return(() => invoke($0, `ne`, [0, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:315 +assert_return(() => invoke($0, `ne`, [-2147483648, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:316 +assert_return(() => invoke($0, `ne`, [0, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:317 +assert_return(() => invoke($0, `ne`, [-2147483648, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:318 +assert_return(() => invoke($0, `ne`, [-1, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:319 +assert_return(() => invoke($0, `ne`, [-2147483648, 2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:320 +assert_return(() => invoke($0, `ne`, [2147483647, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:322 +assert_return(() => invoke($0, `lt_s`, [0, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:323 +assert_return(() => invoke($0, `lt_s`, [1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:324 +assert_return(() => invoke($0, `lt_s`, [-1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:325 +assert_return(() => invoke($0, `lt_s`, [-2147483648, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:326 +assert_return(() => invoke($0, `lt_s`, [2147483647, 2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:327 +assert_return(() => invoke($0, `lt_s`, [-1, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:328 +assert_return(() => invoke($0, `lt_s`, [1, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:329 +assert_return(() => invoke($0, `lt_s`, [0, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:330 +assert_return(() => invoke($0, `lt_s`, [-2147483648, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:331 +assert_return(() => invoke($0, `lt_s`, [0, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:332 +assert_return(() => invoke($0, `lt_s`, [-2147483648, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:333 +assert_return(() => invoke($0, `lt_s`, [-1, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:334 +assert_return(() => invoke($0, `lt_s`, [-2147483648, 2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:335 +assert_return(() => invoke($0, `lt_s`, [2147483647, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:337 +assert_return(() => invoke($0, `lt_u`, [0, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:338 +assert_return(() => invoke($0, `lt_u`, [1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:339 +assert_return(() => invoke($0, `lt_u`, [-1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:340 +assert_return(() => invoke($0, `lt_u`, [-2147483648, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:341 +assert_return(() => invoke($0, `lt_u`, [2147483647, 2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:342 +assert_return(() => invoke($0, `lt_u`, [-1, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:343 +assert_return(() => invoke($0, `lt_u`, [1, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:344 +assert_return(() => invoke($0, `lt_u`, [0, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:345 +assert_return(() => invoke($0, `lt_u`, [-2147483648, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:346 +assert_return(() => invoke($0, `lt_u`, [0, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:347 +assert_return(() => invoke($0, `lt_u`, [-2147483648, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:348 +assert_return(() => invoke($0, `lt_u`, [-1, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:349 +assert_return(() => invoke($0, `lt_u`, [-2147483648, 2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:350 +assert_return(() => invoke($0, `lt_u`, [2147483647, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:352 +assert_return(() => invoke($0, `le_s`, [0, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:353 +assert_return(() => invoke($0, `le_s`, [1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:354 +assert_return(() => invoke($0, `le_s`, [-1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:355 +assert_return(() => invoke($0, `le_s`, [-2147483648, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:356 +assert_return(() => invoke($0, `le_s`, [2147483647, 2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:357 +assert_return(() => invoke($0, `le_s`, [-1, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:358 +assert_return(() => invoke($0, `le_s`, [1, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:359 +assert_return(() => invoke($0, `le_s`, [0, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:360 +assert_return(() => invoke($0, `le_s`, [-2147483648, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:361 +assert_return(() => invoke($0, `le_s`, [0, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:362 +assert_return(() => invoke($0, `le_s`, [-2147483648, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:363 +assert_return(() => invoke($0, `le_s`, [-1, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:364 +assert_return(() => invoke($0, `le_s`, [-2147483648, 2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:365 +assert_return(() => invoke($0, `le_s`, [2147483647, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:367 +assert_return(() => invoke($0, `le_u`, [0, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:368 +assert_return(() => invoke($0, `le_u`, [1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:369 +assert_return(() => invoke($0, `le_u`, [-1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:370 +assert_return(() => invoke($0, `le_u`, [-2147483648, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:371 +assert_return(() => invoke($0, `le_u`, [2147483647, 2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:372 +assert_return(() => invoke($0, `le_u`, [-1, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:373 +assert_return(() => invoke($0, `le_u`, [1, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:374 +assert_return(() => invoke($0, `le_u`, [0, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:375 +assert_return(() => invoke($0, `le_u`, [-2147483648, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:376 +assert_return(() => invoke($0, `le_u`, [0, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:377 +assert_return(() => invoke($0, `le_u`, [-2147483648, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:378 +assert_return(() => invoke($0, `le_u`, [-1, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:379 +assert_return(() => invoke($0, `le_u`, [-2147483648, 2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:380 +assert_return(() => invoke($0, `le_u`, [2147483647, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:382 +assert_return(() => invoke($0, `gt_s`, [0, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:383 +assert_return(() => invoke($0, `gt_s`, [1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:384 +assert_return(() => invoke($0, `gt_s`, [-1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:385 +assert_return(() => invoke($0, `gt_s`, [-2147483648, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:386 +assert_return(() => invoke($0, `gt_s`, [2147483647, 2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:387 +assert_return(() => invoke($0, `gt_s`, [-1, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:388 +assert_return(() => invoke($0, `gt_s`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:389 +assert_return(() => invoke($0, `gt_s`, [0, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:390 +assert_return(() => invoke($0, `gt_s`, [-2147483648, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:391 +assert_return(() => invoke($0, `gt_s`, [0, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:392 +assert_return(() => invoke($0, `gt_s`, [-2147483648, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:393 +assert_return(() => invoke($0, `gt_s`, [-1, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:394 +assert_return(() => invoke($0, `gt_s`, [-2147483648, 2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:395 +assert_return(() => invoke($0, `gt_s`, [2147483647, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:397 +assert_return(() => invoke($0, `gt_u`, [0, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:398 +assert_return(() => invoke($0, `gt_u`, [1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:399 +assert_return(() => invoke($0, `gt_u`, [-1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:400 +assert_return(() => invoke($0, `gt_u`, [-2147483648, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:401 +assert_return(() => invoke($0, `gt_u`, [2147483647, 2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:402 +assert_return(() => invoke($0, `gt_u`, [-1, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:403 +assert_return(() => invoke($0, `gt_u`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:404 +assert_return(() => invoke($0, `gt_u`, [0, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:405 +assert_return(() => invoke($0, `gt_u`, [-2147483648, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:406 +assert_return(() => invoke($0, `gt_u`, [0, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:407 +assert_return(() => invoke($0, `gt_u`, [-2147483648, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:408 +assert_return(() => invoke($0, `gt_u`, [-1, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:409 +assert_return(() => invoke($0, `gt_u`, [-2147483648, 2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:410 +assert_return(() => invoke($0, `gt_u`, [2147483647, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:412 +assert_return(() => invoke($0, `ge_s`, [0, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:413 +assert_return(() => invoke($0, `ge_s`, [1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:414 +assert_return(() => invoke($0, `ge_s`, [-1, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:415 +assert_return(() => invoke($0, `ge_s`, [-2147483648, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:416 +assert_return(() => invoke($0, `ge_s`, [2147483647, 2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:417 +assert_return(() => invoke($0, `ge_s`, [-1, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:418 +assert_return(() => invoke($0, `ge_s`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:419 +assert_return(() => invoke($0, `ge_s`, [0, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:420 +assert_return(() => invoke($0, `ge_s`, [-2147483648, 0]), [value("i32", 0)]); + +// ./test/core/i32.wast:421 +assert_return(() => invoke($0, `ge_s`, [0, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:422 +assert_return(() => invoke($0, `ge_s`, [-2147483648, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:423 +assert_return(() => invoke($0, `ge_s`, [-1, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:424 +assert_return(() => invoke($0, `ge_s`, [-2147483648, 2147483647]), [value("i32", 0)]); + +// ./test/core/i32.wast:425 +assert_return(() => invoke($0, `ge_s`, [2147483647, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:427 +assert_return(() => invoke($0, `ge_u`, [0, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:428 +assert_return(() => invoke($0, `ge_u`, [1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:429 +assert_return(() => invoke($0, `ge_u`, [-1, 1]), [value("i32", 1)]); + +// ./test/core/i32.wast:430 +assert_return(() => invoke($0, `ge_u`, [-2147483648, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:431 +assert_return(() => invoke($0, `ge_u`, [2147483647, 2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:432 +assert_return(() => invoke($0, `ge_u`, [-1, -1]), [value("i32", 1)]); + +// ./test/core/i32.wast:433 +assert_return(() => invoke($0, `ge_u`, [1, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:434 +assert_return(() => invoke($0, `ge_u`, [0, 1]), [value("i32", 0)]); + +// ./test/core/i32.wast:435 +assert_return(() => invoke($0, `ge_u`, [-2147483648, 0]), [value("i32", 1)]); + +// ./test/core/i32.wast:436 +assert_return(() => invoke($0, `ge_u`, [0, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:437 +assert_return(() => invoke($0, `ge_u`, [-2147483648, -1]), [value("i32", 0)]); + +// ./test/core/i32.wast:438 +assert_return(() => invoke($0, `ge_u`, [-1, -2147483648]), [value("i32", 1)]); + +// ./test/core/i32.wast:439 +assert_return(() => invoke($0, `ge_u`, [-2147483648, 2147483647]), [value("i32", 1)]); + +// ./test/core/i32.wast:440 +assert_return(() => invoke($0, `ge_u`, [2147483647, -2147483648]), [value("i32", 0)]); + +// ./test/core/i32.wast:443 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty + (i32.eqz) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:451 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty-in-block + (i32.const 0) + (block (i32.eqz) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:460 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty-in-loop + (i32.const 0) + (loop (i32.eqz) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:469 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty-in-if + (i32.const 0) (i32.const 0) + (if (then (i32.eqz) (drop))) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:478 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (i32.eqz))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:487 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty-in-br + (i32.const 0) + (block (br 0 (i32.eqz)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:496 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty-in-br_if + (i32.const 0) + (block (br_if 0 (i32.eqz) (i32.const 1)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:505 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty-in-br_table + (i32.const 0) + (block (br_table 0 (i32.eqz)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:514 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty-in-return + (return (i32.eqz)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:522 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty-in-select + (select (i32.eqz) (i32.const 1) (i32.const 2)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:530 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty-in-call + (call 1 (i32.eqz)) (drop) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:539 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-unary-operand-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (i32.eqz) (i32.const 0) + ) + (drop) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:555 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty-in-local.set + (local i32) + (local.set 0 (i32.eqz)) (local.get 0) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:564 +assert_invalid( + () => instantiate(`(module + (func $$type-unary-operand-empty-in-local.tee + (local i32) + (local.tee 0 (i32.eqz)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:573 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-unary-operand-empty-in-global.set + (global.set $$x (i32.eqz)) (global.get $$x) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:582 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-unary-operand-empty-in-memory.grow + (memory.grow (i32.eqz)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:591 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-unary-operand-empty-in-load + (i32.load (i32.eqz)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:600 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-unary-operand-empty-in-store + (i32.store (i32.eqz) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:610 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty + (i32.add) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:618 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty + (i32.const 0) (i32.add) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:626 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty-in-block + (i32.const 0) (i32.const 0) + (block (i32.add) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:635 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty-in-block + (i32.const 0) + (block (i32.const 0) (i32.add) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:644 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty-in-loop + (i32.const 0) (i32.const 0) + (loop (i32.add) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:653 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty-in-loop + (i32.const 0) + (loop (i32.const 0) (i32.add) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:662 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty-in-if + (i32.const 0) (i32.const 0) (i32.const 0) + (if (i32.add) (then (drop))) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:671 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty-in-if + (i32.const 0) (i32.const 0) + (if (i32.const 0) (then (i32.add)) (else (drop))) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:680 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty-in-else + (i32.const 0) (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (i32.add) (i32.const 0))) + (drop) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:690 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (i32.add))) + (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:700 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty-in-br + (i32.const 0) (i32.const 0) + (block (br 0 (i32.add)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:709 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty-in-br + (i32.const 0) + (block (br 0 (i32.const 0) (i32.add)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:718 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty-in-br_if + (i32.const 0) (i32.const 0) + (block (br_if 0 (i32.add) (i32.const 1)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:727 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty-in-br_if + (i32.const 0) + (block (br_if 0 (i32.const 0) (i32.add) (i32.const 1)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:736 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty-in-br_table + (i32.const 0) (i32.const 0) + (block (br_table 0 (i32.add)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:745 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty-in-br_table + (i32.const 0) + (block (br_table 0 (i32.const 0) (i32.add)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:754 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty-in-return + (return (i32.add)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:762 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty-in-return + (return (i32.const 0) (i32.add)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:770 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty-in-select + (select (i32.add) (i32.const 1) (i32.const 2)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:778 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty-in-select + (select (i32.const 0) (i32.add) (i32.const 1) (i32.const 2)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:786 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty-in-call + (call 1 (i32.add)) (drop) + ) + (func (param i32 i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:795 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty-in-call + (call 1 (i32.const 0) (i32.add)) (drop) + ) + (func (param i32 i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:804 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-binary-1st-operand-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (i32.add) (i32.const 0) + ) + (drop) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:820 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-binary-2nd-operand-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (i32.const 0) (i32.add) (i32.const 0) + ) + (drop) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:836 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty-in-local.set + (local i32) + (local.set 0 (i32.add)) (local.get 0) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:845 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty-in-local.set + (local i32) + (local.set 0 (i32.const 0) (i32.add)) (local.get 0) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:854 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-1st-operand-empty-in-local.tee + (local i32) + (local.tee 0 (i32.add)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:863 +assert_invalid( + () => instantiate(`(module + (func $$type-binary-2nd-operand-empty-in-local.tee + (local i32) + (local.tee 0 (i32.const 0) (i32.add)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:872 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-binary-1st-operand-empty-in-global.set + (global.set $$x (i32.add)) (global.get $$x) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:881 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-binary-2nd-operand-empty-in-global.set + (global.set $$x (i32.const 0) (i32.add)) (global.get $$x) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:890 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-binary-1st-operand-empty-in-memory.grow + (memory.grow (i32.add)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:899 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-binary-2nd-operand-empty-in-memory.grow + (memory.grow (i32.const 0) (i32.add)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:908 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-binary-1st-operand-empty-in-load + (i32.load (i32.add)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:917 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-binary-2nd-operand-empty-in-load + (i32.load (i32.const 0) (i32.add)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:926 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-binary-1st-operand-empty-in-store + (i32.store (i32.add) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:935 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-binary-2nd-operand-empty-in-store + (i32.store (i32.const 1) (i32.add) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/i32.wast:948 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.add (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:949 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.and (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:950 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.div_s (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:951 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.div_u (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:952 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.mul (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:953 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.or (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:954 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.rem_s (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:955 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.rem_u (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:956 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.rotl (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:957 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.rotr (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:958 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.shl (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:959 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.shr_s (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:960 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.shr_u (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:961 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.sub (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:962 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.xor (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:963 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.eqz (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:964 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.clz (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:965 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.ctz (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:966 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.popcnt (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:967 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.eq (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:968 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.ge_s (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:969 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.ge_u (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:970 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.gt_s (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:971 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.gt_u (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:972 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.le_s (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:973 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.le_u (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:974 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.lt_s (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:975 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.lt_u (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:976 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32.ne (i64.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i32.wast:978 +assert_malformed( + () => instantiate(`(func (result i32) (i32.const nan:arithmetic)) `), + `unexpected token`, +); + +// ./test/core/i32.wast:982 +assert_malformed( + () => instantiate(`(func (result i32) (i32.const nan:canonical)) `), + `unexpected token`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/i64.wast.js b/js/src/jit-test/tests/wasm/spec/spec/i64.wast.js new file mode 100644 index 0000000000..1fb9bc1cc8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/i64.wast.js @@ -0,0 +1,1600 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/i64.wast + +// ./test/core/i64.wast:3 +let $0 = instantiate(`(module + (func (export "add") (param $$x i64) (param $$y i64) (result i64) (i64.add (local.get $$x) (local.get $$y))) + (func (export "sub") (param $$x i64) (param $$y i64) (result i64) (i64.sub (local.get $$x) (local.get $$y))) + (func (export "mul") (param $$x i64) (param $$y i64) (result i64) (i64.mul (local.get $$x) (local.get $$y))) + (func (export "div_s") (param $$x i64) (param $$y i64) (result i64) (i64.div_s (local.get $$x) (local.get $$y))) + (func (export "div_u") (param $$x i64) (param $$y i64) (result i64) (i64.div_u (local.get $$x) (local.get $$y))) + (func (export "rem_s") (param $$x i64) (param $$y i64) (result i64) (i64.rem_s (local.get $$x) (local.get $$y))) + (func (export "rem_u") (param $$x i64) (param $$y i64) (result i64) (i64.rem_u (local.get $$x) (local.get $$y))) + (func (export "and") (param $$x i64) (param $$y i64) (result i64) (i64.and (local.get $$x) (local.get $$y))) + (func (export "or") (param $$x i64) (param $$y i64) (result i64) (i64.or (local.get $$x) (local.get $$y))) + (func (export "xor") (param $$x i64) (param $$y i64) (result i64) (i64.xor (local.get $$x) (local.get $$y))) + (func (export "shl") (param $$x i64) (param $$y i64) (result i64) (i64.shl (local.get $$x) (local.get $$y))) + (func (export "shr_s") (param $$x i64) (param $$y i64) (result i64) (i64.shr_s (local.get $$x) (local.get $$y))) + (func (export "shr_u") (param $$x i64) (param $$y i64) (result i64) (i64.shr_u (local.get $$x) (local.get $$y))) + (func (export "rotl") (param $$x i64) (param $$y i64) (result i64) (i64.rotl (local.get $$x) (local.get $$y))) + (func (export "rotr") (param $$x i64) (param $$y i64) (result i64) (i64.rotr (local.get $$x) (local.get $$y))) + (func (export "clz") (param $$x i64) (result i64) (i64.clz (local.get $$x))) + (func (export "ctz") (param $$x i64) (result i64) (i64.ctz (local.get $$x))) + (func (export "popcnt") (param $$x i64) (result i64) (i64.popcnt (local.get $$x))) + (func (export "extend8_s") (param $$x i64) (result i64) (i64.extend8_s (local.get $$x))) + (func (export "extend16_s") (param $$x i64) (result i64) (i64.extend16_s (local.get $$x))) + (func (export "extend32_s") (param $$x i64) (result i64) (i64.extend32_s (local.get $$x))) + (func (export "eqz") (param $$x i64) (result i32) (i64.eqz (local.get $$x))) + (func (export "eq") (param $$x i64) (param $$y i64) (result i32) (i64.eq (local.get $$x) (local.get $$y))) + (func (export "ne") (param $$x i64) (param $$y i64) (result i32) (i64.ne (local.get $$x) (local.get $$y))) + (func (export "lt_s") (param $$x i64) (param $$y i64) (result i32) (i64.lt_s (local.get $$x) (local.get $$y))) + (func (export "lt_u") (param $$x i64) (param $$y i64) (result i32) (i64.lt_u (local.get $$x) (local.get $$y))) + (func (export "le_s") (param $$x i64) (param $$y i64) (result i32) (i64.le_s (local.get $$x) (local.get $$y))) + (func (export "le_u") (param $$x i64) (param $$y i64) (result i32) (i64.le_u (local.get $$x) (local.get $$y))) + (func (export "gt_s") (param $$x i64) (param $$y i64) (result i32) (i64.gt_s (local.get $$x) (local.get $$y))) + (func (export "gt_u") (param $$x i64) (param $$y i64) (result i32) (i64.gt_u (local.get $$x) (local.get $$y))) + (func (export "ge_s") (param $$x i64) (param $$y i64) (result i32) (i64.ge_s (local.get $$x) (local.get $$y))) + (func (export "ge_u") (param $$x i64) (param $$y i64) (result i32) (i64.ge_u (local.get $$x) (local.get $$y))) +)`); + +// ./test/core/i64.wast:38 +assert_return(() => invoke($0, `add`, [1n, 1n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:39 +assert_return(() => invoke($0, `add`, [1n, 0n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:40 +assert_return(() => invoke($0, `add`, [-1n, -1n]), [value("i64", -2n)]); + +// ./test/core/i64.wast:41 +assert_return(() => invoke($0, `add`, [-1n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:42 +assert_return( + () => invoke($0, `add`, [9223372036854775807n, 1n]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/i64.wast:43 +assert_return( + () => invoke($0, `add`, [-9223372036854775808n, -1n]), + [value("i64", 9223372036854775807n)], +); + +// ./test/core/i64.wast:44 +assert_return( + () => invoke($0, `add`, [-9223372036854775808n, -9223372036854775808n]), + [value("i64", 0n)], +); + +// ./test/core/i64.wast:45 +assert_return(() => invoke($0, `add`, [1073741823n, 1n]), [value("i64", 1073741824n)]); + +// ./test/core/i64.wast:47 +assert_return(() => invoke($0, `sub`, [1n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:48 +assert_return(() => invoke($0, `sub`, [1n, 0n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:49 +assert_return(() => invoke($0, `sub`, [-1n, -1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:50 +assert_return( + () => invoke($0, `sub`, [9223372036854775807n, -1n]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/i64.wast:51 +assert_return( + () => invoke($0, `sub`, [-9223372036854775808n, 1n]), + [value("i64", 9223372036854775807n)], +); + +// ./test/core/i64.wast:52 +assert_return( + () => invoke($0, `sub`, [-9223372036854775808n, -9223372036854775808n]), + [value("i64", 0n)], +); + +// ./test/core/i64.wast:53 +assert_return(() => invoke($0, `sub`, [1073741823n, -1n]), [value("i64", 1073741824n)]); + +// ./test/core/i64.wast:55 +assert_return(() => invoke($0, `mul`, [1n, 1n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:56 +assert_return(() => invoke($0, `mul`, [1n, 0n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:57 +assert_return(() => invoke($0, `mul`, [-1n, -1n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:58 +assert_return(() => invoke($0, `mul`, [1152921504606846976n, 4096n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:59 +assert_return(() => invoke($0, `mul`, [-9223372036854775808n, 0n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:60 +assert_return( + () => invoke($0, `mul`, [-9223372036854775808n, -1n]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/i64.wast:61 +assert_return( + () => invoke($0, `mul`, [9223372036854775807n, -1n]), + [value("i64", -9223372036854775807n)], +); + +// ./test/core/i64.wast:62 +assert_return( + () => invoke($0, `mul`, [81985529216486895n, -81985529216486896n]), + [value("i64", 2465395958572223728n)], +); + +// ./test/core/i64.wast:63 +assert_return(() => invoke($0, `mul`, [9223372036854775807n, 9223372036854775807n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:65 +assert_trap(() => invoke($0, `div_s`, [1n, 0n]), `integer divide by zero`); + +// ./test/core/i64.wast:66 +assert_trap(() => invoke($0, `div_s`, [0n, 0n]), `integer divide by zero`); + +// ./test/core/i64.wast:67 +assert_trap(() => invoke($0, `div_s`, [-9223372036854775808n, -1n]), `integer overflow`); + +// ./test/core/i64.wast:68 +assert_trap(() => invoke($0, `div_s`, [-9223372036854775808n, 0n]), `integer divide by zero`); + +// ./test/core/i64.wast:69 +assert_return(() => invoke($0, `div_s`, [1n, 1n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:70 +assert_return(() => invoke($0, `div_s`, [0n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:71 +assert_return(() => invoke($0, `div_s`, [0n, -1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:72 +assert_return(() => invoke($0, `div_s`, [-1n, -1n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:73 +assert_return( + () => invoke($0, `div_s`, [-9223372036854775808n, 2n]), + [value("i64", -4611686018427387904n)], +); + +// ./test/core/i64.wast:74 +assert_return( + () => invoke($0, `div_s`, [-9223372036854775807n, 1000n]), + [value("i64", -9223372036854775n)], +); + +// ./test/core/i64.wast:75 +assert_return(() => invoke($0, `div_s`, [5n, 2n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:76 +assert_return(() => invoke($0, `div_s`, [-5n, 2n]), [value("i64", -2n)]); + +// ./test/core/i64.wast:77 +assert_return(() => invoke($0, `div_s`, [5n, -2n]), [value("i64", -2n)]); + +// ./test/core/i64.wast:78 +assert_return(() => invoke($0, `div_s`, [-5n, -2n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:79 +assert_return(() => invoke($0, `div_s`, [7n, 3n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:80 +assert_return(() => invoke($0, `div_s`, [-7n, 3n]), [value("i64", -2n)]); + +// ./test/core/i64.wast:81 +assert_return(() => invoke($0, `div_s`, [7n, -3n]), [value("i64", -2n)]); + +// ./test/core/i64.wast:82 +assert_return(() => invoke($0, `div_s`, [-7n, -3n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:83 +assert_return(() => invoke($0, `div_s`, [11n, 5n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:84 +assert_return(() => invoke($0, `div_s`, [17n, 7n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:86 +assert_trap(() => invoke($0, `div_u`, [1n, 0n]), `integer divide by zero`); + +// ./test/core/i64.wast:87 +assert_trap(() => invoke($0, `div_u`, [0n, 0n]), `integer divide by zero`); + +// ./test/core/i64.wast:88 +assert_return(() => invoke($0, `div_u`, [1n, 1n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:89 +assert_return(() => invoke($0, `div_u`, [0n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:90 +assert_return(() => invoke($0, `div_u`, [-1n, -1n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:91 +assert_return(() => invoke($0, `div_u`, [-9223372036854775808n, -1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:92 +assert_return( + () => invoke($0, `div_u`, [-9223372036854775808n, 2n]), + [value("i64", 4611686018427387904n)], +); + +// ./test/core/i64.wast:93 +assert_return( + () => invoke($0, `div_u`, [-8074936608141340688n, 4294967297n]), + [value("i64", 2414874607n)], +); + +// ./test/core/i64.wast:94 +assert_return( + () => invoke($0, `div_u`, [-9223372036854775807n, 1000n]), + [value("i64", 9223372036854775n)], +); + +// ./test/core/i64.wast:95 +assert_return(() => invoke($0, `div_u`, [5n, 2n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:96 +assert_return(() => invoke($0, `div_u`, [-5n, 2n]), [value("i64", 9223372036854775805n)]); + +// ./test/core/i64.wast:97 +assert_return(() => invoke($0, `div_u`, [5n, -2n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:98 +assert_return(() => invoke($0, `div_u`, [-5n, -2n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:99 +assert_return(() => invoke($0, `div_u`, [7n, 3n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:100 +assert_return(() => invoke($0, `div_u`, [11n, 5n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:101 +assert_return(() => invoke($0, `div_u`, [17n, 7n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:103 +assert_trap(() => invoke($0, `rem_s`, [1n, 0n]), `integer divide by zero`); + +// ./test/core/i64.wast:104 +assert_trap(() => invoke($0, `rem_s`, [0n, 0n]), `integer divide by zero`); + +// ./test/core/i64.wast:105 +assert_return(() => invoke($0, `rem_s`, [9223372036854775807n, -1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:106 +assert_return(() => invoke($0, `rem_s`, [1n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:107 +assert_return(() => invoke($0, `rem_s`, [0n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:108 +assert_return(() => invoke($0, `rem_s`, [0n, -1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:109 +assert_return(() => invoke($0, `rem_s`, [-1n, -1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:110 +assert_return(() => invoke($0, `rem_s`, [-9223372036854775808n, -1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:111 +assert_return(() => invoke($0, `rem_s`, [-9223372036854775808n, 2n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:112 +assert_return(() => invoke($0, `rem_s`, [-9223372036854775807n, 1000n]), [value("i64", -807n)]); + +// ./test/core/i64.wast:113 +assert_return(() => invoke($0, `rem_s`, [5n, 2n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:114 +assert_return(() => invoke($0, `rem_s`, [-5n, 2n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:115 +assert_return(() => invoke($0, `rem_s`, [5n, -2n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:116 +assert_return(() => invoke($0, `rem_s`, [-5n, -2n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:117 +assert_return(() => invoke($0, `rem_s`, [7n, 3n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:118 +assert_return(() => invoke($0, `rem_s`, [-7n, 3n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:119 +assert_return(() => invoke($0, `rem_s`, [7n, -3n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:120 +assert_return(() => invoke($0, `rem_s`, [-7n, -3n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:121 +assert_return(() => invoke($0, `rem_s`, [11n, 5n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:122 +assert_return(() => invoke($0, `rem_s`, [17n, 7n]), [value("i64", 3n)]); + +// ./test/core/i64.wast:124 +assert_trap(() => invoke($0, `rem_u`, [1n, 0n]), `integer divide by zero`); + +// ./test/core/i64.wast:125 +assert_trap(() => invoke($0, `rem_u`, [0n, 0n]), `integer divide by zero`); + +// ./test/core/i64.wast:126 +assert_return(() => invoke($0, `rem_u`, [1n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:127 +assert_return(() => invoke($0, `rem_u`, [0n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:128 +assert_return(() => invoke($0, `rem_u`, [-1n, -1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:129 +assert_return( + () => invoke($0, `rem_u`, [-9223372036854775808n, -1n]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/i64.wast:130 +assert_return(() => invoke($0, `rem_u`, [-9223372036854775808n, 2n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:131 +assert_return( + () => invoke($0, `rem_u`, [-8074936608141340688n, 4294967297n]), + [value("i64", 2147483649n)], +); + +// ./test/core/i64.wast:132 +assert_return(() => invoke($0, `rem_u`, [-9223372036854775807n, 1000n]), [value("i64", 809n)]); + +// ./test/core/i64.wast:133 +assert_return(() => invoke($0, `rem_u`, [5n, 2n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:134 +assert_return(() => invoke($0, `rem_u`, [-5n, 2n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:135 +assert_return(() => invoke($0, `rem_u`, [5n, -2n]), [value("i64", 5n)]); + +// ./test/core/i64.wast:136 +assert_return(() => invoke($0, `rem_u`, [-5n, -2n]), [value("i64", -5n)]); + +// ./test/core/i64.wast:137 +assert_return(() => invoke($0, `rem_u`, [7n, 3n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:138 +assert_return(() => invoke($0, `rem_u`, [11n, 5n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:139 +assert_return(() => invoke($0, `rem_u`, [17n, 7n]), [value("i64", 3n)]); + +// ./test/core/i64.wast:141 +assert_return(() => invoke($0, `and`, [1n, 0n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:142 +assert_return(() => invoke($0, `and`, [0n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:143 +assert_return(() => invoke($0, `and`, [1n, 1n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:144 +assert_return(() => invoke($0, `and`, [0n, 0n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:145 +assert_return( + () => invoke($0, `and`, [9223372036854775807n, -9223372036854775808n]), + [value("i64", 0n)], +); + +// ./test/core/i64.wast:146 +assert_return( + () => invoke($0, `and`, [9223372036854775807n, -1n]), + [value("i64", 9223372036854775807n)], +); + +// ./test/core/i64.wast:147 +assert_return(() => invoke($0, `and`, [4042326015n, 4294963440n]), [value("i64", 4042322160n)]); + +// ./test/core/i64.wast:148 +assert_return(() => invoke($0, `and`, [-1n, -1n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:150 +assert_return(() => invoke($0, `or`, [1n, 0n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:151 +assert_return(() => invoke($0, `or`, [0n, 1n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:152 +assert_return(() => invoke($0, `or`, [1n, 1n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:153 +assert_return(() => invoke($0, `or`, [0n, 0n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:154 +assert_return( + () => invoke($0, `or`, [9223372036854775807n, -9223372036854775808n]), + [value("i64", -1n)], +); + +// ./test/core/i64.wast:155 +assert_return( + () => invoke($0, `or`, [-9223372036854775808n, 0n]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/i64.wast:156 +assert_return(() => invoke($0, `or`, [4042326015n, 4294963440n]), [value("i64", 4294967295n)]); + +// ./test/core/i64.wast:157 +assert_return(() => invoke($0, `or`, [-1n, -1n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:159 +assert_return(() => invoke($0, `xor`, [1n, 0n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:160 +assert_return(() => invoke($0, `xor`, [0n, 1n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:161 +assert_return(() => invoke($0, `xor`, [1n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:162 +assert_return(() => invoke($0, `xor`, [0n, 0n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:163 +assert_return( + () => invoke($0, `xor`, [9223372036854775807n, -9223372036854775808n]), + [value("i64", -1n)], +); + +// ./test/core/i64.wast:164 +assert_return( + () => invoke($0, `xor`, [-9223372036854775808n, 0n]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/i64.wast:165 +assert_return( + () => invoke($0, `xor`, [-1n, -9223372036854775808n]), + [value("i64", 9223372036854775807n)], +); + +// ./test/core/i64.wast:166 +assert_return( + () => invoke($0, `xor`, [-1n, 9223372036854775807n]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/i64.wast:167 +assert_return(() => invoke($0, `xor`, [4042326015n, 4294963440n]), [value("i64", 252645135n)]); + +// ./test/core/i64.wast:168 +assert_return(() => invoke($0, `xor`, [-1n, -1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:170 +assert_return(() => invoke($0, `shl`, [1n, 1n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:171 +assert_return(() => invoke($0, `shl`, [1n, 0n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:172 +assert_return(() => invoke($0, `shl`, [9223372036854775807n, 1n]), [value("i64", -2n)]); + +// ./test/core/i64.wast:173 +assert_return(() => invoke($0, `shl`, [-1n, 1n]), [value("i64", -2n)]); + +// ./test/core/i64.wast:174 +assert_return(() => invoke($0, `shl`, [-9223372036854775808n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:175 +assert_return( + () => invoke($0, `shl`, [4611686018427387904n, 1n]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/i64.wast:176 +assert_return(() => invoke($0, `shl`, [1n, 63n]), [value("i64", -9223372036854775808n)]); + +// ./test/core/i64.wast:177 +assert_return(() => invoke($0, `shl`, [1n, 64n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:178 +assert_return(() => invoke($0, `shl`, [1n, 65n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:179 +assert_return(() => invoke($0, `shl`, [1n, -1n]), [value("i64", -9223372036854775808n)]); + +// ./test/core/i64.wast:180 +assert_return( + () => invoke($0, `shl`, [1n, 9223372036854775807n]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/i64.wast:182 +assert_return(() => invoke($0, `shr_s`, [1n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:183 +assert_return(() => invoke($0, `shr_s`, [1n, 0n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:184 +assert_return(() => invoke($0, `shr_s`, [-1n, 1n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:185 +assert_return( + () => invoke($0, `shr_s`, [9223372036854775807n, 1n]), + [value("i64", 4611686018427387903n)], +); + +// ./test/core/i64.wast:186 +assert_return( + () => invoke($0, `shr_s`, [-9223372036854775808n, 1n]), + [value("i64", -4611686018427387904n)], +); + +// ./test/core/i64.wast:187 +assert_return( + () => invoke($0, `shr_s`, [4611686018427387904n, 1n]), + [value("i64", 2305843009213693952n)], +); + +// ./test/core/i64.wast:188 +assert_return(() => invoke($0, `shr_s`, [1n, 64n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:189 +assert_return(() => invoke($0, `shr_s`, [1n, 65n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:190 +assert_return(() => invoke($0, `shr_s`, [1n, -1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:191 +assert_return(() => invoke($0, `shr_s`, [1n, 9223372036854775807n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:192 +assert_return(() => invoke($0, `shr_s`, [1n, -9223372036854775808n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:193 +assert_return(() => invoke($0, `shr_s`, [-9223372036854775808n, 63n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:194 +assert_return(() => invoke($0, `shr_s`, [-1n, 64n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:195 +assert_return(() => invoke($0, `shr_s`, [-1n, 65n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:196 +assert_return(() => invoke($0, `shr_s`, [-1n, -1n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:197 +assert_return(() => invoke($0, `shr_s`, [-1n, 9223372036854775807n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:198 +assert_return(() => invoke($0, `shr_s`, [-1n, -9223372036854775808n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:200 +assert_return(() => invoke($0, `shr_u`, [1n, 1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:201 +assert_return(() => invoke($0, `shr_u`, [1n, 0n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:202 +assert_return(() => invoke($0, `shr_u`, [-1n, 1n]), [value("i64", 9223372036854775807n)]); + +// ./test/core/i64.wast:203 +assert_return( + () => invoke($0, `shr_u`, [9223372036854775807n, 1n]), + [value("i64", 4611686018427387903n)], +); + +// ./test/core/i64.wast:204 +assert_return( + () => invoke($0, `shr_u`, [-9223372036854775808n, 1n]), + [value("i64", 4611686018427387904n)], +); + +// ./test/core/i64.wast:205 +assert_return( + () => invoke($0, `shr_u`, [4611686018427387904n, 1n]), + [value("i64", 2305843009213693952n)], +); + +// ./test/core/i64.wast:206 +assert_return(() => invoke($0, `shr_u`, [1n, 64n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:207 +assert_return(() => invoke($0, `shr_u`, [1n, 65n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:208 +assert_return(() => invoke($0, `shr_u`, [1n, -1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:209 +assert_return(() => invoke($0, `shr_u`, [1n, 9223372036854775807n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:210 +assert_return(() => invoke($0, `shr_u`, [1n, -9223372036854775808n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:211 +assert_return(() => invoke($0, `shr_u`, [-9223372036854775808n, 63n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:212 +assert_return(() => invoke($0, `shr_u`, [-1n, 64n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:213 +assert_return(() => invoke($0, `shr_u`, [-1n, 65n]), [value("i64", 9223372036854775807n)]); + +// ./test/core/i64.wast:214 +assert_return(() => invoke($0, `shr_u`, [-1n, -1n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:215 +assert_return(() => invoke($0, `shr_u`, [-1n, 9223372036854775807n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:216 +assert_return(() => invoke($0, `shr_u`, [-1n, -9223372036854775808n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:218 +assert_return(() => invoke($0, `rotl`, [1n, 1n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:219 +assert_return(() => invoke($0, `rotl`, [1n, 0n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:220 +assert_return(() => invoke($0, `rotl`, [-1n, 1n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:221 +assert_return(() => invoke($0, `rotl`, [1n, 64n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:222 +assert_return( + () => invoke($0, `rotl`, [-6067025490386449714n, 1n]), + [value("i64", 6312693092936652189n)], +); + +// ./test/core/i64.wast:223 +assert_return( + () => invoke($0, `rotl`, [-144115184384868352n, 4n]), + [value("i64", -2305842950157893617n)], +); + +// ./test/core/i64.wast:224 +assert_return( + () => invoke($0, `rotl`, [-6067173104435169271n, 53n]), + [value("i64", 87109505680009935n)], +); + +// ./test/core/i64.wast:225 +assert_return( + () => invoke($0, `rotl`, [-6066028401059725156n, 63n]), + [value("i64", 6190357836324913230n)], +); + +// ./test/core/i64.wast:226 +assert_return( + () => invoke($0, `rotl`, [-6067173104435169271n, 245n]), + [value("i64", 87109505680009935n)], +); + +// ./test/core/i64.wast:227 +assert_return( + () => invoke($0, `rotl`, [-6067067139002042359n, -19n]), + [value("i64", -3530481836149793302n)], +); + +// ./test/core/i64.wast:228 +assert_return( + () => invoke($0, `rotl`, [-6066028401059725156n, -9223372036854775745n]), + [value("i64", 6190357836324913230n)], +); + +// ./test/core/i64.wast:229 +assert_return(() => invoke($0, `rotl`, [1n, 63n]), [value("i64", -9223372036854775808n)]); + +// ./test/core/i64.wast:230 +assert_return(() => invoke($0, `rotl`, [-9223372036854775808n, 1n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:232 +assert_return(() => invoke($0, `rotr`, [1n, 1n]), [value("i64", -9223372036854775808n)]); + +// ./test/core/i64.wast:233 +assert_return(() => invoke($0, `rotr`, [1n, 0n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:234 +assert_return(() => invoke($0, `rotr`, [-1n, 1n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:235 +assert_return(() => invoke($0, `rotr`, [1n, 64n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:236 +assert_return( + () => invoke($0, `rotr`, [-6067025490386449714n, 1n]), + [value("i64", 6189859291661550951n)], +); + +// ./test/core/i64.wast:237 +assert_return( + () => invoke($0, `rotr`, [-144115184384868352n, 4n]), + [value("i64", 1143914305582792704n)], +); + +// ./test/core/i64.wast:238 +assert_return( + () => invoke($0, `rotr`, [-6067173104435169271n, 53n]), + [value("i64", 7534987797011123550n)], +); + +// ./test/core/i64.wast:239 +assert_return( + () => invoke($0, `rotr`, [-6066028401059725156n, 63n]), + [value("i64", 6314687271590101305n)], +); + +// ./test/core/i64.wast:240 +assert_return( + () => invoke($0, `rotr`, [-6067173104435169271n, 245n]), + [value("i64", 7534987797011123550n)], +); + +// ./test/core/i64.wast:241 +assert_return( + () => invoke($0, `rotr`, [-6067067139002042359n, -19n]), + [value("i64", -7735078922541506965n)], +); + +// ./test/core/i64.wast:242 +assert_return( + () => invoke($0, `rotr`, [-6066028401059725156n, -9223372036854775745n]), + [value("i64", 6314687271590101305n)], +); + +// ./test/core/i64.wast:243 +assert_return(() => invoke($0, `rotr`, [1n, 63n]), [value("i64", 2n)]); + +// ./test/core/i64.wast:244 +assert_return(() => invoke($0, `rotr`, [-9223372036854775808n, 63n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:246 +assert_return(() => invoke($0, `clz`, [-1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:247 +assert_return(() => invoke($0, `clz`, [0n]), [value("i64", 64n)]); + +// ./test/core/i64.wast:248 +assert_return(() => invoke($0, `clz`, [32768n]), [value("i64", 48n)]); + +// ./test/core/i64.wast:249 +assert_return(() => invoke($0, `clz`, [255n]), [value("i64", 56n)]); + +// ./test/core/i64.wast:250 +assert_return(() => invoke($0, `clz`, [-9223372036854775808n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:251 +assert_return(() => invoke($0, `clz`, [1n]), [value("i64", 63n)]); + +// ./test/core/i64.wast:252 +assert_return(() => invoke($0, `clz`, [2n]), [value("i64", 62n)]); + +// ./test/core/i64.wast:253 +assert_return(() => invoke($0, `clz`, [9223372036854775807n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:255 +assert_return(() => invoke($0, `ctz`, [-1n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:256 +assert_return(() => invoke($0, `ctz`, [0n]), [value("i64", 64n)]); + +// ./test/core/i64.wast:257 +assert_return(() => invoke($0, `ctz`, [32768n]), [value("i64", 15n)]); + +// ./test/core/i64.wast:258 +assert_return(() => invoke($0, `ctz`, [65536n]), [value("i64", 16n)]); + +// ./test/core/i64.wast:259 +assert_return(() => invoke($0, `ctz`, [-9223372036854775808n]), [value("i64", 63n)]); + +// ./test/core/i64.wast:260 +assert_return(() => invoke($0, `ctz`, [9223372036854775807n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:262 +assert_return(() => invoke($0, `popcnt`, [-1n]), [value("i64", 64n)]); + +// ./test/core/i64.wast:263 +assert_return(() => invoke($0, `popcnt`, [0n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:264 +assert_return(() => invoke($0, `popcnt`, [32768n]), [value("i64", 1n)]); + +// ./test/core/i64.wast:265 +assert_return(() => invoke($0, `popcnt`, [-9223231297218904064n]), [value("i64", 4n)]); + +// ./test/core/i64.wast:266 +assert_return(() => invoke($0, `popcnt`, [9223372036854775807n]), [value("i64", 63n)]); + +// ./test/core/i64.wast:267 +assert_return(() => invoke($0, `popcnt`, [-6148914692668172971n]), [value("i64", 32n)]); + +// ./test/core/i64.wast:268 +assert_return(() => invoke($0, `popcnt`, [-7378697629197489494n]), [value("i64", 32n)]); + +// ./test/core/i64.wast:269 +assert_return(() => invoke($0, `popcnt`, [-2401053088876216593n]), [value("i64", 48n)]); + +// ./test/core/i64.wast:271 +assert_return(() => invoke($0, `extend8_s`, [0n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:272 +assert_return(() => invoke($0, `extend8_s`, [127n]), [value("i64", 127n)]); + +// ./test/core/i64.wast:273 +assert_return(() => invoke($0, `extend8_s`, [128n]), [value("i64", -128n)]); + +// ./test/core/i64.wast:274 +assert_return(() => invoke($0, `extend8_s`, [255n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:275 +assert_return(() => invoke($0, `extend8_s`, [81985529216486656n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:276 +assert_return(() => invoke($0, `extend8_s`, [-81985529216486784n]), [value("i64", -128n)]); + +// ./test/core/i64.wast:277 +assert_return(() => invoke($0, `extend8_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:279 +assert_return(() => invoke($0, `extend16_s`, [0n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:280 +assert_return(() => invoke($0, `extend16_s`, [32767n]), [value("i64", 32767n)]); + +// ./test/core/i64.wast:281 +assert_return(() => invoke($0, `extend16_s`, [32768n]), [value("i64", -32768n)]); + +// ./test/core/i64.wast:282 +assert_return(() => invoke($0, `extend16_s`, [65535n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:283 +assert_return(() => invoke($0, `extend16_s`, [1311768467463733248n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:284 +assert_return(() => invoke($0, `extend16_s`, [-81985529216466944n]), [value("i64", -32768n)]); + +// ./test/core/i64.wast:285 +assert_return(() => invoke($0, `extend16_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:287 +assert_return(() => invoke($0, `extend32_s`, [0n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:288 +assert_return(() => invoke($0, `extend32_s`, [32767n]), [value("i64", 32767n)]); + +// ./test/core/i64.wast:289 +assert_return(() => invoke($0, `extend32_s`, [32768n]), [value("i64", 32768n)]); + +// ./test/core/i64.wast:290 +assert_return(() => invoke($0, `extend32_s`, [65535n]), [value("i64", 65535n)]); + +// ./test/core/i64.wast:291 +assert_return(() => invoke($0, `extend32_s`, [2147483647n]), [value("i64", 2147483647n)]); + +// ./test/core/i64.wast:292 +assert_return(() => invoke($0, `extend32_s`, [2147483648n]), [value("i64", -2147483648n)]); + +// ./test/core/i64.wast:293 +assert_return(() => invoke($0, `extend32_s`, [4294967295n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:294 +assert_return(() => invoke($0, `extend32_s`, [81985526906748928n]), [value("i64", 0n)]); + +// ./test/core/i64.wast:295 +assert_return(() => invoke($0, `extend32_s`, [-81985529054232576n]), [value("i64", -2147483648n)]); + +// ./test/core/i64.wast:296 +assert_return(() => invoke($0, `extend32_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/i64.wast:298 +assert_return(() => invoke($0, `eqz`, [0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:299 +assert_return(() => invoke($0, `eqz`, [1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:300 +assert_return(() => invoke($0, `eqz`, [-9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:301 +assert_return(() => invoke($0, `eqz`, [9223372036854775807n]), [value("i32", 0)]); + +// ./test/core/i64.wast:302 +assert_return(() => invoke($0, `eqz`, [-1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:304 +assert_return(() => invoke($0, `eq`, [0n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:305 +assert_return(() => invoke($0, `eq`, [1n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:306 +assert_return(() => invoke($0, `eq`, [-1n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:307 +assert_return(() => invoke($0, `eq`, [-9223372036854775808n, -9223372036854775808n]), [value("i32", 1)]); + +// ./test/core/i64.wast:308 +assert_return(() => invoke($0, `eq`, [9223372036854775807n, 9223372036854775807n]), [value("i32", 1)]); + +// ./test/core/i64.wast:309 +assert_return(() => invoke($0, `eq`, [-1n, -1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:310 +assert_return(() => invoke($0, `eq`, [1n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:311 +assert_return(() => invoke($0, `eq`, [0n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:312 +assert_return(() => invoke($0, `eq`, [-9223372036854775808n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:313 +assert_return(() => invoke($0, `eq`, [0n, -9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:314 +assert_return(() => invoke($0, `eq`, [-9223372036854775808n, -1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:315 +assert_return(() => invoke($0, `eq`, [-1n, -9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:316 +assert_return(() => invoke($0, `eq`, [-9223372036854775808n, 9223372036854775807n]), [value("i32", 0)]); + +// ./test/core/i64.wast:317 +assert_return(() => invoke($0, `eq`, [9223372036854775807n, -9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:319 +assert_return(() => invoke($0, `ne`, [0n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:320 +assert_return(() => invoke($0, `ne`, [1n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:321 +assert_return(() => invoke($0, `ne`, [-1n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:322 +assert_return(() => invoke($0, `ne`, [-9223372036854775808n, -9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:323 +assert_return(() => invoke($0, `ne`, [9223372036854775807n, 9223372036854775807n]), [value("i32", 0)]); + +// ./test/core/i64.wast:324 +assert_return(() => invoke($0, `ne`, [-1n, -1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:325 +assert_return(() => invoke($0, `ne`, [1n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:326 +assert_return(() => invoke($0, `ne`, [0n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:327 +assert_return(() => invoke($0, `ne`, [-9223372036854775808n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:328 +assert_return(() => invoke($0, `ne`, [0n, -9223372036854775808n]), [value("i32", 1)]); + +// ./test/core/i64.wast:329 +assert_return(() => invoke($0, `ne`, [-9223372036854775808n, -1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:330 +assert_return(() => invoke($0, `ne`, [-1n, -9223372036854775808n]), [value("i32", 1)]); + +// ./test/core/i64.wast:331 +assert_return(() => invoke($0, `ne`, [-9223372036854775808n, 9223372036854775807n]), [value("i32", 1)]); + +// ./test/core/i64.wast:332 +assert_return(() => invoke($0, `ne`, [9223372036854775807n, -9223372036854775808n]), [value("i32", 1)]); + +// ./test/core/i64.wast:334 +assert_return(() => invoke($0, `lt_s`, [0n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:335 +assert_return(() => invoke($0, `lt_s`, [1n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:336 +assert_return(() => invoke($0, `lt_s`, [-1n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:337 +assert_return( + () => invoke($0, `lt_s`, [-9223372036854775808n, -9223372036854775808n]), + [value("i32", 0)], +); + +// ./test/core/i64.wast:338 +assert_return(() => invoke($0, `lt_s`, [9223372036854775807n, 9223372036854775807n]), [value("i32", 0)]); + +// ./test/core/i64.wast:339 +assert_return(() => invoke($0, `lt_s`, [-1n, -1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:340 +assert_return(() => invoke($0, `lt_s`, [1n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:341 +assert_return(() => invoke($0, `lt_s`, [0n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:342 +assert_return(() => invoke($0, `lt_s`, [-9223372036854775808n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:343 +assert_return(() => invoke($0, `lt_s`, [0n, -9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:344 +assert_return(() => invoke($0, `lt_s`, [-9223372036854775808n, -1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:345 +assert_return(() => invoke($0, `lt_s`, [-1n, -9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:346 +assert_return( + () => invoke($0, `lt_s`, [-9223372036854775808n, 9223372036854775807n]), + [value("i32", 1)], +); + +// ./test/core/i64.wast:347 +assert_return( + () => invoke($0, `lt_s`, [9223372036854775807n, -9223372036854775808n]), + [value("i32", 0)], +); + +// ./test/core/i64.wast:349 +assert_return(() => invoke($0, `lt_u`, [0n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:350 +assert_return(() => invoke($0, `lt_u`, [1n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:351 +assert_return(() => invoke($0, `lt_u`, [-1n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:352 +assert_return( + () => invoke($0, `lt_u`, [-9223372036854775808n, -9223372036854775808n]), + [value("i32", 0)], +); + +// ./test/core/i64.wast:353 +assert_return(() => invoke($0, `lt_u`, [9223372036854775807n, 9223372036854775807n]), [value("i32", 0)]); + +// ./test/core/i64.wast:354 +assert_return(() => invoke($0, `lt_u`, [-1n, -1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:355 +assert_return(() => invoke($0, `lt_u`, [1n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:356 +assert_return(() => invoke($0, `lt_u`, [0n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:357 +assert_return(() => invoke($0, `lt_u`, [-9223372036854775808n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:358 +assert_return(() => invoke($0, `lt_u`, [0n, -9223372036854775808n]), [value("i32", 1)]); + +// ./test/core/i64.wast:359 +assert_return(() => invoke($0, `lt_u`, [-9223372036854775808n, -1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:360 +assert_return(() => invoke($0, `lt_u`, [-1n, -9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:361 +assert_return( + () => invoke($0, `lt_u`, [-9223372036854775808n, 9223372036854775807n]), + [value("i32", 0)], +); + +// ./test/core/i64.wast:362 +assert_return( + () => invoke($0, `lt_u`, [9223372036854775807n, -9223372036854775808n]), + [value("i32", 1)], +); + +// ./test/core/i64.wast:364 +assert_return(() => invoke($0, `le_s`, [0n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:365 +assert_return(() => invoke($0, `le_s`, [1n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:366 +assert_return(() => invoke($0, `le_s`, [-1n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:367 +assert_return( + () => invoke($0, `le_s`, [-9223372036854775808n, -9223372036854775808n]), + [value("i32", 1)], +); + +// ./test/core/i64.wast:368 +assert_return(() => invoke($0, `le_s`, [9223372036854775807n, 9223372036854775807n]), [value("i32", 1)]); + +// ./test/core/i64.wast:369 +assert_return(() => invoke($0, `le_s`, [-1n, -1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:370 +assert_return(() => invoke($0, `le_s`, [1n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:371 +assert_return(() => invoke($0, `le_s`, [0n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:372 +assert_return(() => invoke($0, `le_s`, [-9223372036854775808n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:373 +assert_return(() => invoke($0, `le_s`, [0n, -9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:374 +assert_return(() => invoke($0, `le_s`, [-9223372036854775808n, -1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:375 +assert_return(() => invoke($0, `le_s`, [-1n, -9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:376 +assert_return( + () => invoke($0, `le_s`, [-9223372036854775808n, 9223372036854775807n]), + [value("i32", 1)], +); + +// ./test/core/i64.wast:377 +assert_return( + () => invoke($0, `le_s`, [9223372036854775807n, -9223372036854775808n]), + [value("i32", 0)], +); + +// ./test/core/i64.wast:379 +assert_return(() => invoke($0, `le_u`, [0n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:380 +assert_return(() => invoke($0, `le_u`, [1n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:381 +assert_return(() => invoke($0, `le_u`, [-1n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:382 +assert_return( + () => invoke($0, `le_u`, [-9223372036854775808n, -9223372036854775808n]), + [value("i32", 1)], +); + +// ./test/core/i64.wast:383 +assert_return(() => invoke($0, `le_u`, [9223372036854775807n, 9223372036854775807n]), [value("i32", 1)]); + +// ./test/core/i64.wast:384 +assert_return(() => invoke($0, `le_u`, [-1n, -1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:385 +assert_return(() => invoke($0, `le_u`, [1n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:386 +assert_return(() => invoke($0, `le_u`, [0n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:387 +assert_return(() => invoke($0, `le_u`, [-9223372036854775808n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:388 +assert_return(() => invoke($0, `le_u`, [0n, -9223372036854775808n]), [value("i32", 1)]); + +// ./test/core/i64.wast:389 +assert_return(() => invoke($0, `le_u`, [-9223372036854775808n, -1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:390 +assert_return(() => invoke($0, `le_u`, [-1n, -9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:391 +assert_return( + () => invoke($0, `le_u`, [-9223372036854775808n, 9223372036854775807n]), + [value("i32", 0)], +); + +// ./test/core/i64.wast:392 +assert_return( + () => invoke($0, `le_u`, [9223372036854775807n, -9223372036854775808n]), + [value("i32", 1)], +); + +// ./test/core/i64.wast:394 +assert_return(() => invoke($0, `gt_s`, [0n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:395 +assert_return(() => invoke($0, `gt_s`, [1n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:396 +assert_return(() => invoke($0, `gt_s`, [-1n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:397 +assert_return( + () => invoke($0, `gt_s`, [-9223372036854775808n, -9223372036854775808n]), + [value("i32", 0)], +); + +// ./test/core/i64.wast:398 +assert_return(() => invoke($0, `gt_s`, [9223372036854775807n, 9223372036854775807n]), [value("i32", 0)]); + +// ./test/core/i64.wast:399 +assert_return(() => invoke($0, `gt_s`, [-1n, -1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:400 +assert_return(() => invoke($0, `gt_s`, [1n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:401 +assert_return(() => invoke($0, `gt_s`, [0n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:402 +assert_return(() => invoke($0, `gt_s`, [-9223372036854775808n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:403 +assert_return(() => invoke($0, `gt_s`, [0n, -9223372036854775808n]), [value("i32", 1)]); + +// ./test/core/i64.wast:404 +assert_return(() => invoke($0, `gt_s`, [-9223372036854775808n, -1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:405 +assert_return(() => invoke($0, `gt_s`, [-1n, -9223372036854775808n]), [value("i32", 1)]); + +// ./test/core/i64.wast:406 +assert_return( + () => invoke($0, `gt_s`, [-9223372036854775808n, 9223372036854775807n]), + [value("i32", 0)], +); + +// ./test/core/i64.wast:407 +assert_return( + () => invoke($0, `gt_s`, [9223372036854775807n, -9223372036854775808n]), + [value("i32", 1)], +); + +// ./test/core/i64.wast:409 +assert_return(() => invoke($0, `gt_u`, [0n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:410 +assert_return(() => invoke($0, `gt_u`, [1n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:411 +assert_return(() => invoke($0, `gt_u`, [-1n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:412 +assert_return( + () => invoke($0, `gt_u`, [-9223372036854775808n, -9223372036854775808n]), + [value("i32", 0)], +); + +// ./test/core/i64.wast:413 +assert_return(() => invoke($0, `gt_u`, [9223372036854775807n, 9223372036854775807n]), [value("i32", 0)]); + +// ./test/core/i64.wast:414 +assert_return(() => invoke($0, `gt_u`, [-1n, -1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:415 +assert_return(() => invoke($0, `gt_u`, [1n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:416 +assert_return(() => invoke($0, `gt_u`, [0n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:417 +assert_return(() => invoke($0, `gt_u`, [-9223372036854775808n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:418 +assert_return(() => invoke($0, `gt_u`, [0n, -9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:419 +assert_return(() => invoke($0, `gt_u`, [-9223372036854775808n, -1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:420 +assert_return(() => invoke($0, `gt_u`, [-1n, -9223372036854775808n]), [value("i32", 1)]); + +// ./test/core/i64.wast:421 +assert_return( + () => invoke($0, `gt_u`, [-9223372036854775808n, 9223372036854775807n]), + [value("i32", 1)], +); + +// ./test/core/i64.wast:422 +assert_return( + () => invoke($0, `gt_u`, [9223372036854775807n, -9223372036854775808n]), + [value("i32", 0)], +); + +// ./test/core/i64.wast:424 +assert_return(() => invoke($0, `ge_s`, [0n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:425 +assert_return(() => invoke($0, `ge_s`, [1n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:426 +assert_return(() => invoke($0, `ge_s`, [-1n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:427 +assert_return( + () => invoke($0, `ge_s`, [-9223372036854775808n, -9223372036854775808n]), + [value("i32", 1)], +); + +// ./test/core/i64.wast:428 +assert_return(() => invoke($0, `ge_s`, [9223372036854775807n, 9223372036854775807n]), [value("i32", 1)]); + +// ./test/core/i64.wast:429 +assert_return(() => invoke($0, `ge_s`, [-1n, -1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:430 +assert_return(() => invoke($0, `ge_s`, [1n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:431 +assert_return(() => invoke($0, `ge_s`, [0n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:432 +assert_return(() => invoke($0, `ge_s`, [-9223372036854775808n, 0n]), [value("i32", 0)]); + +// ./test/core/i64.wast:433 +assert_return(() => invoke($0, `ge_s`, [0n, -9223372036854775808n]), [value("i32", 1)]); + +// ./test/core/i64.wast:434 +assert_return(() => invoke($0, `ge_s`, [-9223372036854775808n, -1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:435 +assert_return(() => invoke($0, `ge_s`, [-1n, -9223372036854775808n]), [value("i32", 1)]); + +// ./test/core/i64.wast:436 +assert_return( + () => invoke($0, `ge_s`, [-9223372036854775808n, 9223372036854775807n]), + [value("i32", 0)], +); + +// ./test/core/i64.wast:437 +assert_return( + () => invoke($0, `ge_s`, [9223372036854775807n, -9223372036854775808n]), + [value("i32", 1)], +); + +// ./test/core/i64.wast:439 +assert_return(() => invoke($0, `ge_u`, [0n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:440 +assert_return(() => invoke($0, `ge_u`, [1n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:441 +assert_return(() => invoke($0, `ge_u`, [-1n, 1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:442 +assert_return( + () => invoke($0, `ge_u`, [-9223372036854775808n, -9223372036854775808n]), + [value("i32", 1)], +); + +// ./test/core/i64.wast:443 +assert_return(() => invoke($0, `ge_u`, [9223372036854775807n, 9223372036854775807n]), [value("i32", 1)]); + +// ./test/core/i64.wast:444 +assert_return(() => invoke($0, `ge_u`, [-1n, -1n]), [value("i32", 1)]); + +// ./test/core/i64.wast:445 +assert_return(() => invoke($0, `ge_u`, [1n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:446 +assert_return(() => invoke($0, `ge_u`, [0n, 1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:447 +assert_return(() => invoke($0, `ge_u`, [-9223372036854775808n, 0n]), [value("i32", 1)]); + +// ./test/core/i64.wast:448 +assert_return(() => invoke($0, `ge_u`, [0n, -9223372036854775808n]), [value("i32", 0)]); + +// ./test/core/i64.wast:449 +assert_return(() => invoke($0, `ge_u`, [-9223372036854775808n, -1n]), [value("i32", 0)]); + +// ./test/core/i64.wast:450 +assert_return(() => invoke($0, `ge_u`, [-1n, -9223372036854775808n]), [value("i32", 1)]); + +// ./test/core/i64.wast:451 +assert_return( + () => invoke($0, `ge_u`, [-9223372036854775808n, 9223372036854775807n]), + [value("i32", 1)], +); + +// ./test/core/i64.wast:452 +assert_return( + () => invoke($0, `ge_u`, [9223372036854775807n, -9223372036854775808n]), + [value("i32", 0)], +); + +// ./test/core/i64.wast:457 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.add (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:458 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.and (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:459 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.div_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:460 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.div_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:461 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.mul (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:462 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.or (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:463 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.rem_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:464 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.rem_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:465 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.rotl (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:466 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.rotr (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:467 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.shl (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:468 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.shr_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:469 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.shr_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:470 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.sub (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:471 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.xor (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:472 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.eqz (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:473 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.clz (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:474 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.ctz (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:475 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.popcnt (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:476 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.eq (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:477 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.ge_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:478 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.ge_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:479 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.gt_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:480 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.gt_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:481 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.le_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:482 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.le_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:483 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.lt_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:484 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.lt_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:485 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64.ne (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/i64.wast:487 +assert_malformed( + () => instantiate(`(func (result i64) (i64.const nan:arithmetic)) `), + `unexpected token`, +); + +// ./test/core/i64.wast:491 +assert_malformed( + () => instantiate(`(func (result i64) (i64.const nan:canonical)) `), + `unexpected token`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/if.wast.js b/js/src/jit-test/tests/wasm/spec/spec/if.wast.js new file mode 100644 index 0000000000..ada0bd224a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/if.wast.js @@ -0,0 +1,1911 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/if.wast + +// ./test/core/if.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definition + (memory 1) + + (func $$dummy) + + (func (export "empty") (param i32) + (if (local.get 0) (then)) + (if (local.get 0) (then) (else)) + (if $$l (local.get 0) (then)) + (if $$l (local.get 0) (then) (else)) + ) + + (func (export "singular") (param i32) (result i32) + (if (local.get 0) (then (nop))) + (if (local.get 0) (then (nop)) (else (nop))) + (if (result i32) (local.get 0) (then (i32.const 7)) (else (i32.const 8))) + ) + + (func (export "multi") (param i32) (result i32 i32) + (if (local.get 0) (then (call $$dummy) (call $$dummy) (call $$dummy))) + (if (local.get 0) (then) (else (call $$dummy) (call $$dummy) (call $$dummy))) + (if (result i32) (local.get 0) + (then (call $$dummy) (call $$dummy) (i32.const 8) (call $$dummy)) + (else (call $$dummy) (call $$dummy) (i32.const 9) (call $$dummy)) + ) + (if (result i32 i64 i32) (local.get 0) + (then + (call $$dummy) (call $$dummy) (i32.const 1) (call $$dummy) + (call $$dummy) (call $$dummy) (i64.const 2) (call $$dummy) + (call $$dummy) (call $$dummy) (i32.const 3) (call $$dummy) + ) + (else + (call $$dummy) (call $$dummy) (i32.const -1) (call $$dummy) + (call $$dummy) (call $$dummy) (i64.const -2) (call $$dummy) + (call $$dummy) (call $$dummy) (i32.const -3) (call $$dummy) + ) + ) + (drop) (drop) + ) + + (func (export "nested") (param i32 i32) (result i32) + (if (result i32) (local.get 0) + (then + (if (local.get 1) (then (call $$dummy) (block) (nop))) + (if (local.get 1) (then) (else (call $$dummy) (block) (nop))) + (if (result i32) (local.get 1) + (then (call $$dummy) (i32.const 9)) + (else (call $$dummy) (i32.const 10)) + ) + ) + (else + (if (local.get 1) (then (call $$dummy) (block) (nop))) + (if (local.get 1) (then) (else (call $$dummy) (block) (nop))) + (if (result i32) (local.get 1) + (then (call $$dummy) (i32.const 10)) + (else (call $$dummy) (i32.const 11)) + ) + ) + ) + ) + + (func (export "as-select-first") (param i32) (result i32) + (select + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) (i32.const 3) + ) + ) + (func (export "as-select-mid") (param i32) (result i32) + (select + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 3) + ) + ) + (func (export "as-select-last") (param i32) (result i32) + (select + (i32.const 2) (i32.const 3) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + ) + ) + + (func (export "as-loop-first") (param i32) (result i32) + (loop (result i32) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (call $$dummy) (call $$dummy) + ) + ) + (func (export "as-loop-mid") (param i32) (result i32) + (loop (result i32) + (call $$dummy) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (call $$dummy) + ) + ) + (func (export "as-loop-last") (param i32) (result i32) + (loop (result i32) + (call $$dummy) (call $$dummy) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + ) + ) + + (func (export "as-if-condition") (param i32) (result i32) + (if (result i32) + (if (result i32) (local.get 0) + (then (i32.const 1)) (else (i32.const 0)) + ) + (then (call $$dummy) (i32.const 2)) + (else (call $$dummy) (i32.const 3)) + ) + ) + + (func (export "as-br_if-first") (param i32) (result i32) + (block (result i32) + (br_if 0 + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) + ) + (return (i32.const 3)) + ) + ) + (func (export "as-br_if-last") (param i32) (result i32) + (block (result i32) + (br_if 0 + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + ) + (return (i32.const 3)) + ) + ) + + (func (export "as-br_table-first") (param i32) (result i32) + (block (result i32) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) + (br_table 0 0) + ) + ) + (func (export "as-br_table-last") (param i32) (result i32) + (block (result i32) + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (br_table 0 0) + ) + ) + + (func $$func (param i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-first") (param i32) (result i32) + (block (result i32) + (call_indirect (type $$check) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (param i32) (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (param i32) (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (i32.const 0) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + ) + ) + ) + + (func (export "as-store-first") (param i32) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.const 2) + (i32.store) + ) + (func (export "as-store-last") (param i32) + (i32.const 2) + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 1)) + (else (call $$dummy) (i32.const 0)) + ) + (i32.store) + ) + + (func (export "as-memory.grow-value") (param i32) (result i32) + (memory.grow + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "as-call-value") (param i32) (result i32) + (call $$f + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + (func (export "as-return-value") (param i32) (result i32) + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0))) + (return) + ) + (func (export "as-drop-operand") (param i32) + (drop + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + (func (export "as-br-value") (param i32) (result i32) + (block (result i32) + (br 0 + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + ) + (func (export "as-local.set-value") (param i32) (result i32) + (local i32) + (local.set 0 + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + (local.get 0) + ) + (func (export "as-local.tee-value") (param i32) (result i32) + (local.tee 0 + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ) + (global $$a (mut i32) (i32.const 10)) + (func (export "as-global.set-value") (param i32) (result i32) + (global.set $$a + (if (result i32) (local.get 0) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) (global.get $$a) + ) + (func (export "as-load-operand") (param i32) (result i32) + (i32.load + (if (result i32) (local.get 0) + (then (i32.const 11)) + (else (i32.const 10)) + ) + ) + ) + + (func (export "as-unary-operand") (param i32) (result i32) + (i32.ctz + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 13)) + (else (call $$dummy) (i32.const -13)) + ) + ) + ) + (func (export "as-binary-operand") (param i32 i32) (result i32) + (i32.mul + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 3)) + (else (call $$dummy) (i32.const -3)) + ) + (if (result i32) (local.get 1) + (then (call $$dummy) (i32.const 4)) + (else (call $$dummy) (i32.const -5)) + ) + ) + ) + (func (export "as-test-operand") (param i32) (result i32) + (i32.eqz + (if (result i32) (local.get 0) + (then (call $$dummy) (i32.const 13)) + (else (call $$dummy) (i32.const 0)) + ) + ) + ) + (func (export "as-compare-operand") (param i32 i32) (result i32) + (f32.gt + (if (result f32) (local.get 0) + (then (call $$dummy) (f32.const 3)) + (else (call $$dummy) (f32.const -3)) + ) + (if (result f32) (local.get 1) + (then (call $$dummy) (f32.const 4)) + (else (call $$dummy) (f32.const -4)) + ) + ) + ) + (func (export "as-binary-operands") (param i32) (result i32) + (i32.mul + (if (result i32 i32) (local.get 0) + (then (call $$dummy) (i32.const 3) (call $$dummy) (i32.const 4)) + (else (call $$dummy) (i32.const 3) (call $$dummy) (i32.const -4)) + ) + ) + ) + (func (export "as-compare-operands") (param i32) (result i32) + (f32.gt + (if (result f32 f32) (local.get 0) + (then (call $$dummy) (f32.const 3) (call $$dummy) (f32.const 3)) + (else (call $$dummy) (f32.const -2) (call $$dummy) (f32.const -3)) + ) + ) + ) + (func (export "as-mixed-operands") (param i32) (result i32) + (if (result i32 i32) (local.get 0) + (then (call $$dummy) (i32.const 3) (call $$dummy) (i32.const 4)) + (else (call $$dummy) (i32.const -3) (call $$dummy) (i32.const -4)) + ) + (i32.const 5) + (i32.add) + (i32.mul) + ) + + (func (export "break-bare") (result i32) + (if (i32.const 1) (then (br 0) (unreachable))) + (if (i32.const 1) (then (br 0) (unreachable)) (else (unreachable))) + (if (i32.const 0) (then (unreachable)) (else (br 0) (unreachable))) + (if (i32.const 1) (then (br_if 0 (i32.const 1)) (unreachable))) + (if (i32.const 1) (then (br_if 0 (i32.const 1)) (unreachable)) (else (unreachable))) + (if (i32.const 0) (then (unreachable)) (else (br_if 0 (i32.const 1)) (unreachable))) + (if (i32.const 1) (then (br_table 0 (i32.const 0)) (unreachable))) + (if (i32.const 1) (then (br_table 0 (i32.const 0)) (unreachable)) (else (unreachable))) + (if (i32.const 0) (then (unreachable)) (else (br_table 0 (i32.const 0)) (unreachable))) + (i32.const 19) + ) + + (func (export "break-value") (param i32) (result i32) + (if (result i32) (local.get 0) + (then (br 0 (i32.const 18)) (i32.const 19)) + (else (br 0 (i32.const 21)) (i32.const 20)) + ) + ) + (func (export "break-multi-value") (param i32) (result i32 i32 i64) + (if (result i32 i32 i64) (local.get 0) + (then + (br 0 (i32.const 18) (i32.const -18) (i64.const 18)) + (i32.const 19) (i32.const -19) (i64.const 19) + ) + (else + (br 0 (i32.const -18) (i32.const 18) (i64.const -18)) + (i32.const -19) (i32.const 19) (i64.const -19) + ) + ) + ) + + (func (export "param") (param i32) (result i32) + (i32.const 1) + (if (param i32) (result i32) (local.get 0) + (then (i32.const 2) (i32.add)) + (else (i32.const -2) (i32.add)) + ) + ) + (func (export "params") (param i32) (result i32) + (i32.const 1) + (i32.const 2) + (if (param i32 i32) (result i32) (local.get 0) + (then (i32.add)) + (else (i32.sub)) + ) + ) + (func (export "params-id") (param i32) (result i32) + (i32.const 1) + (i32.const 2) + (if (param i32 i32) (result i32 i32) (local.get 0) (then)) + (i32.add) + ) + (func (export "param-break") (param i32) (result i32) + (i32.const 1) + (if (param i32) (result i32) (local.get 0) + (then (i32.const 2) (i32.add) (br 0)) + (else (i32.const -2) (i32.add) (br 0)) + ) + ) + (func (export "params-break") (param i32) (result i32) + (i32.const 1) + (i32.const 2) + (if (param i32 i32) (result i32) (local.get 0) + (then (i32.add) (br 0)) + (else (i32.sub) (br 0)) + ) + ) + (func (export "params-id-break") (param i32) (result i32) + (i32.const 1) + (i32.const 2) + (if (param i32 i32) (result i32 i32) (local.get 0) (then (br 0))) + (i32.add) + ) + + (func (export "effects") (param i32) (result i32) + (local i32) + (if + (block (result i32) (local.set 1 (i32.const 1)) (local.get 0)) + (then + (local.set 1 (i32.mul (local.get 1) (i32.const 3))) + (local.set 1 (i32.sub (local.get 1) (i32.const 5))) + (local.set 1 (i32.mul (local.get 1) (i32.const 7))) + (br 0) + (local.set 1 (i32.mul (local.get 1) (i32.const 100))) + ) + (else + (local.set 1 (i32.mul (local.get 1) (i32.const 5))) + (local.set 1 (i32.sub (local.get 1) (i32.const 7))) + (local.set 1 (i32.mul (local.get 1) (i32.const 3))) + (br 0) + (local.set 1 (i32.mul (local.get 1) (i32.const 1000))) + ) + ) + (local.get 1) + ) + + ;; Examples + + (func $$add64_u_with_carry (export "add64_u_with_carry") + (param $$i i64) (param $$j i64) (param $$c i32) (result i64 i32) + (local $$k i64) + (local.set $$k + (i64.add + (i64.add (local.get $$i) (local.get $$j)) + (i64.extend_i32_u (local.get $$c)) + ) + ) + (return (local.get $$k) (i64.lt_u (local.get $$k) (local.get $$i))) + ) + + (func $$add64_u_saturated (export "add64_u_saturated") + (param i64 i64) (result i64) + (call $$add64_u_with_carry (local.get 0) (local.get 1) (i32.const 0)) + (if (param i64) (result i64) + (then (drop) (i64.const -1)) + ) + ) + + ;; Block signature syntax + + (type $$block-sig-1 (func)) + (type $$block-sig-2 (func (result i32))) + (type $$block-sig-3 (func (param $$x i32))) + (type $$block-sig-4 (func (param i32 f64 i32) (result i32 f64 i32))) + + (func (export "type-use") + (if (type $$block-sig-1) (i32.const 1) (then)) + (if (type $$block-sig-2) (i32.const 1) + (then (i32.const 0)) (else (i32.const 2)) + ) + (if (type $$block-sig-3) (i32.const 1) (then (drop)) (else (drop))) + (i32.const 0) (f64.const 0) (i32.const 0) + (if (type $$block-sig-4) (i32.const 1) (then)) + (drop) (drop) (drop) + (if (type $$block-sig-2) (result i32) (i32.const 1) + (then (i32.const 0)) (else (i32.const 2)) + ) + (if (type $$block-sig-3) (param i32) (i32.const 1) + (then (drop)) (else (drop)) + ) + (i32.const 0) (f64.const 0) (i32.const 0) + (if (type $$block-sig-4) + (param i32) (param f64 i32) (result i32 f64) (result i32) + (i32.const 1) (then) + ) + (drop) (drop) (drop) + ) +)`); + +// ./test/core/if.wast:529 +assert_return(() => invoke($0, `empty`, [0]), []); + +// ./test/core/if.wast:530 +assert_return(() => invoke($0, `empty`, [1]), []); + +// ./test/core/if.wast:531 +assert_return(() => invoke($0, `empty`, [100]), []); + +// ./test/core/if.wast:532 +assert_return(() => invoke($0, `empty`, [-2]), []); + +// ./test/core/if.wast:534 +assert_return(() => invoke($0, `singular`, [0]), [value("i32", 8)]); + +// ./test/core/if.wast:535 +assert_return(() => invoke($0, `singular`, [1]), [value("i32", 7)]); + +// ./test/core/if.wast:536 +assert_return(() => invoke($0, `singular`, [10]), [value("i32", 7)]); + +// ./test/core/if.wast:537 +assert_return(() => invoke($0, `singular`, [-10]), [value("i32", 7)]); + +// ./test/core/if.wast:539 +assert_return(() => invoke($0, `multi`, [0]), [value("i32", 9), value("i32", -1)]); + +// ./test/core/if.wast:540 +assert_return(() => invoke($0, `multi`, [1]), [value("i32", 8), value("i32", 1)]); + +// ./test/core/if.wast:541 +assert_return(() => invoke($0, `multi`, [13]), [value("i32", 8), value("i32", 1)]); + +// ./test/core/if.wast:542 +assert_return(() => invoke($0, `multi`, [-5]), [value("i32", 8), value("i32", 1)]); + +// ./test/core/if.wast:544 +assert_return(() => invoke($0, `nested`, [0, 0]), [value("i32", 11)]); + +// ./test/core/if.wast:545 +assert_return(() => invoke($0, `nested`, [1, 0]), [value("i32", 10)]); + +// ./test/core/if.wast:546 +assert_return(() => invoke($0, `nested`, [0, 1]), [value("i32", 10)]); + +// ./test/core/if.wast:547 +assert_return(() => invoke($0, `nested`, [3, 2]), [value("i32", 9)]); + +// ./test/core/if.wast:548 +assert_return(() => invoke($0, `nested`, [0, -100]), [value("i32", 10)]); + +// ./test/core/if.wast:549 +assert_return(() => invoke($0, `nested`, [10, 10]), [value("i32", 9)]); + +// ./test/core/if.wast:550 +assert_return(() => invoke($0, `nested`, [0, -1]), [value("i32", 10)]); + +// ./test/core/if.wast:551 +assert_return(() => invoke($0, `nested`, [-111, -2]), [value("i32", 9)]); + +// ./test/core/if.wast:553 +assert_return(() => invoke($0, `as-select-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:554 +assert_return(() => invoke($0, `as-select-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:555 +assert_return(() => invoke($0, `as-select-mid`, [0]), [value("i32", 2)]); + +// ./test/core/if.wast:556 +assert_return(() => invoke($0, `as-select-mid`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:557 +assert_return(() => invoke($0, `as-select-last`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:558 +assert_return(() => invoke($0, `as-select-last`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:560 +assert_return(() => invoke($0, `as-loop-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:561 +assert_return(() => invoke($0, `as-loop-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:562 +assert_return(() => invoke($0, `as-loop-mid`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:563 +assert_return(() => invoke($0, `as-loop-mid`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:564 +assert_return(() => invoke($0, `as-loop-last`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:565 +assert_return(() => invoke($0, `as-loop-last`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:567 +assert_return(() => invoke($0, `as-if-condition`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:568 +assert_return(() => invoke($0, `as-if-condition`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:570 +assert_return(() => invoke($0, `as-br_if-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:571 +assert_return(() => invoke($0, `as-br_if-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:572 +assert_return(() => invoke($0, `as-br_if-last`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:573 +assert_return(() => invoke($0, `as-br_if-last`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:575 +assert_return(() => invoke($0, `as-br_table-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:576 +assert_return(() => invoke($0, `as-br_table-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:577 +assert_return(() => invoke($0, `as-br_table-last`, [0]), [value("i32", 2)]); + +// ./test/core/if.wast:578 +assert_return(() => invoke($0, `as-br_table-last`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:580 +assert_return(() => invoke($0, `as-call_indirect-first`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:581 +assert_return(() => invoke($0, `as-call_indirect-first`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:582 +assert_return(() => invoke($0, `as-call_indirect-mid`, [0]), [value("i32", 2)]); + +// ./test/core/if.wast:583 +assert_return(() => invoke($0, `as-call_indirect-mid`, [1]), [value("i32", 2)]); + +// ./test/core/if.wast:584 +assert_return(() => invoke($0, `as-call_indirect-last`, [0]), [value("i32", 2)]); + +// ./test/core/if.wast:585 +assert_trap(() => invoke($0, `as-call_indirect-last`, [1]), `undefined element`); + +// ./test/core/if.wast:587 +assert_return(() => invoke($0, `as-store-first`, [0]), []); + +// ./test/core/if.wast:588 +assert_return(() => invoke($0, `as-store-first`, [1]), []); + +// ./test/core/if.wast:589 +assert_return(() => invoke($0, `as-store-last`, [0]), []); + +// ./test/core/if.wast:590 +assert_return(() => invoke($0, `as-store-last`, [1]), []); + +// ./test/core/if.wast:592 +assert_return(() => invoke($0, `as-memory.grow-value`, [0]), [value("i32", 1)]); + +// ./test/core/if.wast:593 +assert_return(() => invoke($0, `as-memory.grow-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:595 +assert_return(() => invoke($0, `as-call-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:596 +assert_return(() => invoke($0, `as-call-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:598 +assert_return(() => invoke($0, `as-return-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:599 +assert_return(() => invoke($0, `as-return-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:601 +assert_return(() => invoke($0, `as-drop-operand`, [0]), []); + +// ./test/core/if.wast:602 +assert_return(() => invoke($0, `as-drop-operand`, [1]), []); + +// ./test/core/if.wast:604 +assert_return(() => invoke($0, `as-br-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:605 +assert_return(() => invoke($0, `as-br-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:607 +assert_return(() => invoke($0, `as-local.set-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:608 +assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:610 +assert_return(() => invoke($0, `as-local.tee-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:611 +assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:613 +assert_return(() => invoke($0, `as-global.set-value`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:614 +assert_return(() => invoke($0, `as-global.set-value`, [1]), [value("i32", 1)]); + +// ./test/core/if.wast:616 +assert_return(() => invoke($0, `as-load-operand`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:617 +assert_return(() => invoke($0, `as-load-operand`, [1]), [value("i32", 0)]); + +// ./test/core/if.wast:619 +assert_return(() => invoke($0, `as-unary-operand`, [0]), [value("i32", 0)]); + +// ./test/core/if.wast:620 +assert_return(() => invoke($0, `as-unary-operand`, [1]), [value("i32", 0)]); + +// ./test/core/if.wast:621 +assert_return(() => invoke($0, `as-unary-operand`, [-1]), [value("i32", 0)]); + +// ./test/core/if.wast:623 +assert_return(() => invoke($0, `as-binary-operand`, [0, 0]), [value("i32", 15)]); + +// ./test/core/if.wast:624 +assert_return(() => invoke($0, `as-binary-operand`, [0, 1]), [value("i32", -12)]); + +// ./test/core/if.wast:625 +assert_return(() => invoke($0, `as-binary-operand`, [1, 0]), [value("i32", -15)]); + +// ./test/core/if.wast:626 +assert_return(() => invoke($0, `as-binary-operand`, [1, 1]), [value("i32", 12)]); + +// ./test/core/if.wast:628 +assert_return(() => invoke($0, `as-test-operand`, [0]), [value("i32", 1)]); + +// ./test/core/if.wast:629 +assert_return(() => invoke($0, `as-test-operand`, [1]), [value("i32", 0)]); + +// ./test/core/if.wast:631 +assert_return(() => invoke($0, `as-compare-operand`, [0, 0]), [value("i32", 1)]); + +// ./test/core/if.wast:632 +assert_return(() => invoke($0, `as-compare-operand`, [0, 1]), [value("i32", 0)]); + +// ./test/core/if.wast:633 +assert_return(() => invoke($0, `as-compare-operand`, [1, 0]), [value("i32", 1)]); + +// ./test/core/if.wast:634 +assert_return(() => invoke($0, `as-compare-operand`, [1, 1]), [value("i32", 0)]); + +// ./test/core/if.wast:636 +assert_return(() => invoke($0, `as-binary-operands`, [0]), [value("i32", -12)]); + +// ./test/core/if.wast:637 +assert_return(() => invoke($0, `as-binary-operands`, [1]), [value("i32", 12)]); + +// ./test/core/if.wast:639 +assert_return(() => invoke($0, `as-compare-operands`, [0]), [value("i32", 1)]); + +// ./test/core/if.wast:640 +assert_return(() => invoke($0, `as-compare-operands`, [1]), [value("i32", 0)]); + +// ./test/core/if.wast:642 +assert_return(() => invoke($0, `as-mixed-operands`, [0]), [value("i32", -3)]); + +// ./test/core/if.wast:643 +assert_return(() => invoke($0, `as-mixed-operands`, [1]), [value("i32", 27)]); + +// ./test/core/if.wast:645 +assert_return(() => invoke($0, `break-bare`, []), [value("i32", 19)]); + +// ./test/core/if.wast:646 +assert_return(() => invoke($0, `break-value`, [1]), [value("i32", 18)]); + +// ./test/core/if.wast:647 +assert_return(() => invoke($0, `break-value`, [0]), [value("i32", 21)]); + +// ./test/core/if.wast:648 +assert_return( + () => invoke($0, `break-multi-value`, [0]), + [value("i32", -18), value("i32", 18), value("i64", -18n)], +); + +// ./test/core/if.wast:651 +assert_return( + () => invoke($0, `break-multi-value`, [1]), + [value("i32", 18), value("i32", -18), value("i64", 18n)], +); + +// ./test/core/if.wast:655 +assert_return(() => invoke($0, `param`, [0]), [value("i32", -1)]); + +// ./test/core/if.wast:656 +assert_return(() => invoke($0, `param`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:657 +assert_return(() => invoke($0, `params`, [0]), [value("i32", -1)]); + +// ./test/core/if.wast:658 +assert_return(() => invoke($0, `params`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:659 +assert_return(() => invoke($0, `params-id`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:660 +assert_return(() => invoke($0, `params-id`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:661 +assert_return(() => invoke($0, `param-break`, [0]), [value("i32", -1)]); + +// ./test/core/if.wast:662 +assert_return(() => invoke($0, `param-break`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:663 +assert_return(() => invoke($0, `params-break`, [0]), [value("i32", -1)]); + +// ./test/core/if.wast:664 +assert_return(() => invoke($0, `params-break`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:665 +assert_return(() => invoke($0, `params-id-break`, [0]), [value("i32", 3)]); + +// ./test/core/if.wast:666 +assert_return(() => invoke($0, `params-id-break`, [1]), [value("i32", 3)]); + +// ./test/core/if.wast:668 +assert_return(() => invoke($0, `effects`, [1]), [value("i32", -14)]); + +// ./test/core/if.wast:669 +assert_return(() => invoke($0, `effects`, [0]), [value("i32", -6)]); + +// ./test/core/if.wast:671 +assert_return(() => invoke($0, `add64_u_with_carry`, [0n, 0n, 0]), [value("i64", 0n), value("i32", 0)]); + +// ./test/core/if.wast:675 +assert_return( + () => invoke($0, `add64_u_with_carry`, [100n, 124n, 0]), + [value("i64", 224n), value("i32", 0)], +); + +// ./test/core/if.wast:679 +assert_return( + () => invoke($0, `add64_u_with_carry`, [-1n, 0n, 0]), + [value("i64", -1n), value("i32", 0)], +); + +// ./test/core/if.wast:683 +assert_return(() => invoke($0, `add64_u_with_carry`, [-1n, 1n, 0]), [value("i64", 0n), value("i32", 1)]); + +// ./test/core/if.wast:687 +assert_return( + () => invoke($0, `add64_u_with_carry`, [-1n, -1n, 0]), + [value("i64", -2n), value("i32", 1)], +); + +// ./test/core/if.wast:691 +assert_return(() => invoke($0, `add64_u_with_carry`, [-1n, 0n, 1]), [value("i64", 0n), value("i32", 1)]); + +// ./test/core/if.wast:695 +assert_return(() => invoke($0, `add64_u_with_carry`, [-1n, 1n, 1]), [value("i64", 1n), value("i32", 1)]); + +// ./test/core/if.wast:699 +assert_return( + () => invoke($0, `add64_u_with_carry`, [ + -9223372036854775808n, + -9223372036854775808n, + 0, + ]), + [value("i64", 0n), value("i32", 1)], +); + +// ./test/core/if.wast:704 +assert_return(() => invoke($0, `add64_u_saturated`, [0n, 0n]), [value("i64", 0n)]); + +// ./test/core/if.wast:707 +assert_return(() => invoke($0, `add64_u_saturated`, [1230n, 23n]), [value("i64", 1253n)]); + +// ./test/core/if.wast:710 +assert_return(() => invoke($0, `add64_u_saturated`, [-1n, 0n]), [value("i64", -1n)]); + +// ./test/core/if.wast:713 +assert_return(() => invoke($0, `add64_u_saturated`, [-1n, 1n]), [value("i64", -1n)]); + +// ./test/core/if.wast:716 +assert_return(() => invoke($0, `add64_u_saturated`, [-1n, -1n]), [value("i64", -1n)]); + +// ./test/core/if.wast:719 +assert_return( + () => invoke($0, `add64_u_saturated`, [-9223372036854775808n, -9223372036854775808n]), + [value("i64", -1n)], +); + +// ./test/core/if.wast:723 +assert_return(() => invoke($0, `type-use`, []), []); + +// ./test/core/if.wast:725 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (type $$sig) (result i32) (param i32) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:734 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (param i32) (type $$sig) (result i32) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:743 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (param i32) (result i32) (type $$sig) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:752 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (result i32) (type $$sig) (param i32) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:761 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (if (result i32) (param i32) (type $$sig) (i32.const 1) (then)) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:770 +assert_malformed( + () => instantiate(`(func (i32.const 0) (if (result i32) (param i32) (i32.const 1) (then))) `), + `unexpected token`, +); + +// ./test/core/if.wast:777 +assert_malformed( + () => instantiate(`(func (i32.const 0) (i32.const 1) (if (param $$x i32) (then (drop)) (else (drop))) ) `), + `unexpected token`, +); + +// ./test/core/if.wast:785 +assert_malformed( + () => instantiate(`(type $$sig (func)) (func (i32.const 1) (if (type $$sig) (result i32) (then (i32.const 0)) (else (i32.const 2))) (unreachable) ) `), + `inline function type`, +); + +// ./test/core/if.wast:795 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 1) (if (type $$sig) (result i32) (then (i32.const 0)) (else (i32.const 2))) (unreachable) ) `), + `inline function type`, +); + +// ./test/core/if.wast:805 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (i32.const 1) (if (type $$sig) (param i32) (then (drop)) (else (drop))) (unreachable) ) `), + `inline function type`, +); + +// ./test/core/if.wast:815 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32 i32) (result i32))) (func (i32.const 0) (i32.const 1) (if (type $$sig) (param i32) (result i32) (then)) (unreachable) ) `), + `inline function type`, +); + +// ./test/core/if.wast:825 +assert_invalid( + () => instantiate(`(module + (type $$sig (func)) + (func (i32.const 1) (if (type $$sig) (i32.const 0) (then))) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:833 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i32 (result i32) (if (i32.const 0) (then))))`), + `type mismatch`, +); + +// ./test/core/if.wast:837 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i64 (result i64) (if (i32.const 0) (then))))`), + `type mismatch`, +); + +// ./test/core/if.wast:841 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f32 (result f32) (if (i32.const 0) (then))))`), + `type mismatch`, +); + +// ./test/core/if.wast:845 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f64 (result f64) (if (i32.const 0) (then))))`), + `type mismatch`, +); + +// ./test/core/if.wast:850 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i32 (result i32) (if (i32.const 0) (then) (else))))`), + `type mismatch`, +); + +// ./test/core/if.wast:854 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i64 (result i64) (if (i32.const 0) (then) (else))))`), + `type mismatch`, +); + +// ./test/core/if.wast:858 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f32 (result f32) (if (i32.const 0) (then) (else))))`), + `type mismatch`, +); + +// ./test/core/if.wast:862 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f64 (result f64) (if (i32.const 0) (then) (else))))`), + `type mismatch`, +); + +// ./test/core/if.wast:867 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-num-vs-void + (if (i32.const 1) (then (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:873 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-num-vs-void-else + (if (i32.const 1) (then (i32.const 1)) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:879 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-num-vs-void + (if (i32.const 1) (then) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:885 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-num-vs-void + (if (i32.const 1) (then (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:892 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-nums-vs-void + (if (i32.const 1) (then (i32.const 1) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:898 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-nums-vs-void-else + (if (i32.const 1) (then (i32.const 1) (i32.const 2)) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:904 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-nums-vs-void + (if (i32.const 1) (then) (else (i32.const 1) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:910 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-nums-vs-void + (if (i32.const 1) (then (i32.const 1) (i32.const 2)) (else (i32.const 2) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:917 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-empty-vs-num (result i32) + (if (result i32) (i32.const 1) (then) (else (i32.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:923 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-empty-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 0)) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:929 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-empty-vs-num (result i32) + (if (result i32) (i32.const 1) (then) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:936 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then) (else (i32.const 0) (i32.const 2))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:942 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 0) (i32.const 1)) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:948 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then) (else)) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:955 +assert_invalid( + () => instantiate(`(module (func $$type-no-else-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:961 +assert_invalid( + () => instantiate(`(module (func $$type-no-else-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:968 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (nop)) (else (i32.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:974 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 0)) (else (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:980 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (nop)) (else (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:987 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (nop)) (else (i32.const 0) (i32.const 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:993 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 0) (i32.const 0)) (else (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:999 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (nop)) (else (nop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1006 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-num-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i64.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1012 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-num-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1)) (else (i64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1018 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-num-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i64.const 1)) (else (i64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1025 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1031 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1037 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1044 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-partial-vs-nums (result i32 i32) + (i32.const 0) + (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1051 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-partial-vs-nums (result i32 i32) + (i32.const 0) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1058 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-partial-vs-nums (result i32 i32) + (i32.const 0) + (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1066 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-nums-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1072 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-nums-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1078 +assert_invalid( + () => instantiate(`(module (func $$type-both-value-nums-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1085 +assert_invalid( + () => instantiate(`(module (func $$type-both-different-value-num-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i64.const 1)) (else (f64.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1091 +assert_invalid( + () => instantiate(`(module (func $$type-both-different-value-nums-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1) (i32.const 1)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1098 +assert_invalid( + () => instantiate(`(module (func $$type-then-value-unreached-select (result i32) + (if (result i64) + (i32.const 0) + (then (select (unreachable) (unreachable) (unreachable))) + (else (i64.const 0)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1108 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-unreached-select (result i32) + (if (result i64) + (i32.const 1) + (then (i64.const 0)) + (else (select (unreachable) (unreachable) (unreachable))) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1118 +assert_invalid( + () => instantiate(`(module (func $$type-else-value-unreached-select (result i32) + (if (result i64) + (i32.const 1) + (then (select (unreachable) (unreachable) (unreachable))) + (else (select (unreachable) (unreachable) (unreachable))) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1129 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-last-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (br 0)) (else (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1135 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-last-void-vs-num (result i32) + (if (result i32) (i32.const 1) (then (i32.const 1)) (else (br 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1141 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-last-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (br 0)) (else (i32.const 1) (i32.const 1))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1147 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-last-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (br 0))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1154 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-empty-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (br 0) (i32.const 1)) + (else (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1163 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-empty-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (i32.const 1)) + (else (br 0) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1172 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (br 0) (i32.const 1) (i32.const 1)) + (else (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1181 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-empty-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (i32.const 1) (i32.const 1)) + (else (br 0) (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1191 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-void-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (br 0 (nop)) (i32.const 1)) + (else (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1200 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-void-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (i32.const 1)) + (else (br 0 (nop)) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1209 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (br 0 (nop)) (i32.const 1) (i32.const 1)) + (else (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1218 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-void-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (i32.const 1) (i32.const 1)) + (else (br 0 (nop)) (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1228 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-num-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (br 0 (i64.const 1)) (i32.const 1)) + (else (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1237 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-num-vs-num (result i32) + (if (result i32) (i32.const 1) + (then (i32.const 1)) + (else (br 0 (i64.const 1)) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1246 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (br 0 (i64.const 1)) (i32.const 1) (i32.const 1)) + (else (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1255 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-num-vs-nums (result i32 i32) + (if (result i32 i32) (i32.const 1) + (then (i32.const 1) (i32.const 1)) + (else (br 0 (i64.const 1)) (i32.const 1) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1264 +assert_invalid( + () => instantiate(`(module (func $$type-then-break-partial-vs-nums (result i32 i32) + (i32.const 1) + (if (result i32 i32) (i32.const 1) + (then (br 0 (i64.const 1)) (i32.const 1)) + (else (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1274 +assert_invalid( + () => instantiate(`(module (func $$type-else-break-partial-vs-nums (result i32 i32) + (i32.const 1) + (if (result i32 i32) (i32.const 1) + (then (i32.const 1)) + (else (br 0 (i64.const 1)) (i32.const 1)) + ) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1285 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty + (if (then)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1293 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-block + (i32.const 0) + (block (if (then))) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1302 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-loop + (i32.const 0) + (loop (if (then))) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1311 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (if (then)))) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1320 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (if (then)) (i32.const 0))) + (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1330 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-br + (i32.const 0) + (block (br 0 (if(then))) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1339 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-br_if + (i32.const 0) + (block (br_if 0 (if(then)) (i32.const 1)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1348 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-br_table + (i32.const 0) + (block (br_table 0 (if(then))) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1357 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-return + (return (if(then))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1365 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-select + (select (if(then)) (i32.const 1) (i32.const 2)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1373 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-call + (call 1 (if(then))) (drop) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1382 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-condition-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (if(then)) (i32.const 0) + ) + (drop) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1398 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-local.set + (local i32) + (local.set 0 (if(then))) (local.get 0) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1407 +assert_invalid( + () => instantiate(`(module + (func $$type-condition-empty-in-local.tee + (local i32) + (local.tee 0 (if(then))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1416 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-condition-empty-in-global.set + (global.set $$x (if(then))) (global.get $$x) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1425 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-condition-empty-in-memory.grow + (memory.grow (if(then))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1434 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-condition-empty-in-load + (i32.load (if(then))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1443 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-condition-empty-in-store + (i32.store (if(then)) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/if.wast:1453 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-num + (if (param i32) (i32.const 1) (then (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1459 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-nums + (if (param i32 f64) (i32.const 1) (then (drop) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1465 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num + (f32.const 0) (if (param i32) (i32.const 1) (then (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1471 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-nums + (f32.const 0) (if (param f32 i32) (i32.const 1) (then (drop) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1477 +assert_invalid( + () => instantiate(`(module (func $$type-param-nested-void-vs-num + (block (if (param i32) (i32.const 1) (then (drop)))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1483 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-nums + (block (if (param i32 f64) (i32.const 1) (then (drop) (drop)))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1489 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num + (block (f32.const 0) (if (param i32) (i32.const 1) (then (drop)))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1495 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-nums + (block (f32.const 0) (if (param f32 i32) (i32.const 1) (then (drop) (drop)))) + ))`), + `type mismatch`, +); + +// ./test/core/if.wast:1502 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) if (param $$x i32) end) `), + `unexpected token`, +); + +// ./test/core/if.wast:1506 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) (if (param $$x i32) (then))) `), + `unexpected token`, +); + +// ./test/core/if.wast:1511 +assert_malformed(() => instantiate(`(func i32.const 0 if end $$l) `), `mismatching label`); + +// ./test/core/if.wast:1515 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1519 +assert_malformed( + () => instantiate(`(func i32.const 0 if else $$l end) `), + `mismatching label`, +); + +// ./test/core/if.wast:1523 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a else $$l end) `), + `mismatching label`, +); + +// ./test/core/if.wast:1527 +assert_malformed( + () => instantiate(`(func i32.const 0 if else end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1531 +assert_malformed( + () => instantiate(`(func i32.const 0 if else $$l end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1535 +assert_malformed( + () => instantiate(`(func i32.const 0 if else $$l1 end $$l2) `), + `mismatching label`, +); + +// ./test/core/if.wast:1539 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a else end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1543 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a else $$a end $$l) `), + `mismatching label`, +); + +// ./test/core/if.wast:1547 +assert_malformed( + () => instantiate(`(func i32.const 0 if $$a else $$l end $$l) `), + `mismatching label`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/inline-module.wast.js b/js/src/jit-test/tests/wasm/spec/spec/inline-module.wast.js new file mode 100644 index 0000000000..30e6acaeee --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/inline-module.wast.js @@ -0,0 +1,20 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/inline-module.wast + +// ./test/core/inline-module.wast:1:0 +let $0 = instantiate(`(func) (memory 0) (func (export "f")) +`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/int_exprs.wast.js b/js/src/jit-test/tests/wasm/spec/spec/int_exprs.wast.js new file mode 100644 index 0000000000..811712a794 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/int_exprs.wast.js @@ -0,0 +1,534 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/int_exprs.wast + +// ./test/core/int_exprs.wast:6 +let $0 = instantiate(`(module + (func (export "i32.no_fold_cmp_s_offset") (param $$x i32) (param $$y i32) (result i32) + (i32.lt_s (i32.add (local.get $$x) (i32.const 1)) (i32.add (local.get $$y) (i32.const 1)))) + (func (export "i32.no_fold_cmp_u_offset") (param $$x i32) (param $$y i32) (result i32) + (i32.lt_u (i32.add (local.get $$x) (i32.const 1)) (i32.add (local.get $$y) (i32.const 1)))) + + (func (export "i64.no_fold_cmp_s_offset") (param $$x i64) (param $$y i64) (result i32) + (i64.lt_s (i64.add (local.get $$x) (i64.const 1)) (i64.add (local.get $$y) (i64.const 1)))) + (func (export "i64.no_fold_cmp_u_offset") (param $$x i64) (param $$y i64) (result i32) + (i64.lt_u (i64.add (local.get $$x) (i64.const 1)) (i64.add (local.get $$y) (i64.const 1)))) +)`); + +// ./test/core/int_exprs.wast:18 +assert_return(() => invoke($0, `i32.no_fold_cmp_s_offset`, [2147483647, 0]), [value("i32", 1)]); + +// ./test/core/int_exprs.wast:19 +assert_return(() => invoke($0, `i32.no_fold_cmp_u_offset`, [-1, 0]), [value("i32", 1)]); + +// ./test/core/int_exprs.wast:20 +assert_return( + () => invoke($0, `i64.no_fold_cmp_s_offset`, [9223372036854775807n, 0n]), + [value("i32", 1)], +); + +// ./test/core/int_exprs.wast:21 +assert_return(() => invoke($0, `i64.no_fold_cmp_u_offset`, [-1n, 0n]), [value("i32", 1)]); + +// ./test/core/int_exprs.wast:25 +let $1 = instantiate(`(module + (func (export "i64.no_fold_wrap_extend_s") (param $$x i64) (result i64) + (i64.extend_i32_s (i32.wrap_i64 (local.get $$x)))) +)`); + +// ./test/core/int_exprs.wast:30 +assert_return( + () => invoke($1, `i64.no_fold_wrap_extend_s`, [4538991236898928n]), + [value("i64", 1079009392n)], +); + +// ./test/core/int_exprs.wast:31 +assert_return( + () => invoke($1, `i64.no_fold_wrap_extend_s`, [45230338458316960n]), + [value("i64", -790564704n)], +); + +// ./test/core/int_exprs.wast:35 +let $2 = instantiate(`(module + (func (export "i64.no_fold_wrap_extend_u") (param $$x i64) (result i64) + (i64.extend_i32_u (i32.wrap_i64 (local.get $$x)))) +)`); + +// ./test/core/int_exprs.wast:40 +assert_return( + () => invoke($2, `i64.no_fold_wrap_extend_u`, [4538991236898928n]), + [value("i64", 1079009392n)], +); + +// ./test/core/int_exprs.wast:44 +let $3 = instantiate(`(module + (func (export "i32.no_fold_shl_shr_s") (param $$x i32) (result i32) + (i32.shr_s (i32.shl (local.get $$x) (i32.const 1)) (i32.const 1))) + (func (export "i32.no_fold_shl_shr_u") (param $$x i32) (result i32) + (i32.shr_u (i32.shl (local.get $$x) (i32.const 1)) (i32.const 1))) + + (func (export "i64.no_fold_shl_shr_s") (param $$x i64) (result i64) + (i64.shr_s (i64.shl (local.get $$x) (i64.const 1)) (i64.const 1))) + (func (export "i64.no_fold_shl_shr_u") (param $$x i64) (result i64) + (i64.shr_u (i64.shl (local.get $$x) (i64.const 1)) (i64.const 1))) +)`); + +// ./test/core/int_exprs.wast:56 +assert_return(() => invoke($3, `i32.no_fold_shl_shr_s`, [-2147483648]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:57 +assert_return(() => invoke($3, `i32.no_fold_shl_shr_u`, [-2147483648]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:58 +assert_return(() => invoke($3, `i64.no_fold_shl_shr_s`, [-9223372036854775808n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:59 +assert_return(() => invoke($3, `i64.no_fold_shl_shr_u`, [-9223372036854775808n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:63 +let $4 = instantiate(`(module + (func (export "i32.no_fold_shr_s_shl") (param $$x i32) (result i32) + (i32.shl (i32.shr_s (local.get $$x) (i32.const 1)) (i32.const 1))) + (func (export "i32.no_fold_shr_u_shl") (param $$x i32) (result i32) + (i32.shl (i32.shr_u (local.get $$x) (i32.const 1)) (i32.const 1))) + + (func (export "i64.no_fold_shr_s_shl") (param $$x i64) (result i64) + (i64.shl (i64.shr_s (local.get $$x) (i64.const 1)) (i64.const 1))) + (func (export "i64.no_fold_shr_u_shl") (param $$x i64) (result i64) + (i64.shl (i64.shr_u (local.get $$x) (i64.const 1)) (i64.const 1))) +)`); + +// ./test/core/int_exprs.wast:75 +assert_return(() => invoke($4, `i32.no_fold_shr_s_shl`, [1]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:76 +assert_return(() => invoke($4, `i32.no_fold_shr_u_shl`, [1]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:77 +assert_return(() => invoke($4, `i64.no_fold_shr_s_shl`, [1n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:78 +assert_return(() => invoke($4, `i64.no_fold_shr_u_shl`, [1n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:82 +let $5 = instantiate(`(module + (func (export "i32.no_fold_div_s_mul") (param $$x i32) (result i32) + (i32.mul (i32.div_s (local.get $$x) (i32.const 6)) (i32.const 6))) + (func (export "i32.no_fold_div_u_mul") (param $$x i32) (result i32) + (i32.mul (i32.div_u (local.get $$x) (i32.const 6)) (i32.const 6))) + + (func (export "i64.no_fold_div_s_mul") (param $$x i64) (result i64) + (i64.mul (i64.div_s (local.get $$x) (i64.const 6)) (i64.const 6))) + (func (export "i64.no_fold_div_u_mul") (param $$x i64) (result i64) + (i64.mul (i64.div_u (local.get $$x) (i64.const 6)) (i64.const 6))) +)`); + +// ./test/core/int_exprs.wast:94 +assert_return(() => invoke($5, `i32.no_fold_div_s_mul`, [1]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:95 +assert_return(() => invoke($5, `i32.no_fold_div_u_mul`, [1]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:96 +assert_return(() => invoke($5, `i64.no_fold_div_s_mul`, [1n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:97 +assert_return(() => invoke($5, `i64.no_fold_div_u_mul`, [1n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:101 +let $6 = instantiate(`(module + (func (export "i32.no_fold_div_s_self") (param $$x i32) (result i32) + (i32.div_s (local.get $$x) (local.get $$x))) + (func (export "i32.no_fold_div_u_self") (param $$x i32) (result i32) + (i32.div_u (local.get $$x) (local.get $$x))) + + (func (export "i64.no_fold_div_s_self") (param $$x i64) (result i64) + (i64.div_s (local.get $$x) (local.get $$x))) + (func (export "i64.no_fold_div_u_self") (param $$x i64) (result i64) + (i64.div_u (local.get $$x) (local.get $$x))) +)`); + +// ./test/core/int_exprs.wast:113 +assert_trap(() => invoke($6, `i32.no_fold_div_s_self`, [0]), `integer divide by zero`); + +// ./test/core/int_exprs.wast:114 +assert_trap(() => invoke($6, `i32.no_fold_div_u_self`, [0]), `integer divide by zero`); + +// ./test/core/int_exprs.wast:115 +assert_trap(() => invoke($6, `i64.no_fold_div_s_self`, [0n]), `integer divide by zero`); + +// ./test/core/int_exprs.wast:116 +assert_trap(() => invoke($6, `i64.no_fold_div_u_self`, [0n]), `integer divide by zero`); + +// ./test/core/int_exprs.wast:120 +let $7 = instantiate(`(module + (func (export "i32.no_fold_rem_s_self") (param $$x i32) (result i32) + (i32.rem_s (local.get $$x) (local.get $$x))) + (func (export "i32.no_fold_rem_u_self") (param $$x i32) (result i32) + (i32.rem_u (local.get $$x) (local.get $$x))) + + (func (export "i64.no_fold_rem_s_self") (param $$x i64) (result i64) + (i64.rem_s (local.get $$x) (local.get $$x))) + (func (export "i64.no_fold_rem_u_self") (param $$x i64) (result i64) + (i64.rem_u (local.get $$x) (local.get $$x))) +)`); + +// ./test/core/int_exprs.wast:132 +assert_trap(() => invoke($7, `i32.no_fold_rem_s_self`, [0]), `integer divide by zero`); + +// ./test/core/int_exprs.wast:133 +assert_trap(() => invoke($7, `i32.no_fold_rem_u_self`, [0]), `integer divide by zero`); + +// ./test/core/int_exprs.wast:134 +assert_trap(() => invoke($7, `i64.no_fold_rem_s_self`, [0n]), `integer divide by zero`); + +// ./test/core/int_exprs.wast:135 +assert_trap(() => invoke($7, `i64.no_fold_rem_u_self`, [0n]), `integer divide by zero`); + +// ./test/core/int_exprs.wast:139 +let $8 = instantiate(`(module + (func (export "i32.no_fold_mul_div_s") (param $$x i32) (result i32) + (i32.div_s (i32.mul (local.get $$x) (i32.const 6)) (i32.const 6))) + (func (export "i32.no_fold_mul_div_u") (param $$x i32) (result i32) + (i32.div_u (i32.mul (local.get $$x) (i32.const 6)) (i32.const 6))) + + (func (export "i64.no_fold_mul_div_s") (param $$x i64) (result i64) + (i64.div_s (i64.mul (local.get $$x) (i64.const 6)) (i64.const 6))) + (func (export "i64.no_fold_mul_div_u") (param $$x i64) (result i64) + (i64.div_u (i64.mul (local.get $$x) (i64.const 6)) (i64.const 6))) +)`); + +// ./test/core/int_exprs.wast:151 +assert_return(() => invoke($8, `i32.no_fold_mul_div_s`, [-2147483648]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:152 +assert_return(() => invoke($8, `i32.no_fold_mul_div_u`, [-2147483648]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:153 +assert_return(() => invoke($8, `i64.no_fold_mul_div_s`, [-9223372036854775808n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:154 +assert_return(() => invoke($8, `i64.no_fold_mul_div_u`, [-9223372036854775808n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:158 +let $9 = instantiate(`(module + (func (export "i32.no_fold_div_s_2") (param $$x i32) (result i32) + (i32.div_s (local.get $$x) (i32.const 2))) + + (func (export "i64.no_fold_div_s_2") (param $$x i64) (result i64) + (i64.div_s (local.get $$x) (i64.const 2))) +)`); + +// ./test/core/int_exprs.wast:166 +assert_return(() => invoke($9, `i32.no_fold_div_s_2`, [-11]), [value("i32", -5)]); + +// ./test/core/int_exprs.wast:167 +assert_return(() => invoke($9, `i64.no_fold_div_s_2`, [-11n]), [value("i64", -5n)]); + +// ./test/core/int_exprs.wast:171 +let $10 = instantiate(`(module + (func (export "i32.no_fold_rem_s_2") (param $$x i32) (result i32) + (i32.rem_s (local.get $$x) (i32.const 2))) + + (func (export "i64.no_fold_rem_s_2") (param $$x i64) (result i64) + (i64.rem_s (local.get $$x) (i64.const 2))) +)`); + +// ./test/core/int_exprs.wast:179 +assert_return(() => invoke($10, `i32.no_fold_rem_s_2`, [-11]), [value("i32", -1)]); + +// ./test/core/int_exprs.wast:180 +assert_return(() => invoke($10, `i64.no_fold_rem_s_2`, [-11n]), [value("i64", -1n)]); + +// ./test/core/int_exprs.wast:184 +let $11 = instantiate(`(module + (func (export "i32.div_s_0") (param $$x i32) (result i32) + (i32.div_s (local.get $$x) (i32.const 0))) + (func (export "i32.div_u_0") (param $$x i32) (result i32) + (i32.div_u (local.get $$x) (i32.const 0))) + + (func (export "i64.div_s_0") (param $$x i64) (result i64) + (i64.div_s (local.get $$x) (i64.const 0))) + (func (export "i64.div_u_0") (param $$x i64) (result i64) + (i64.div_u (local.get $$x) (i64.const 0))) +)`); + +// ./test/core/int_exprs.wast:196 +assert_trap(() => invoke($11, `i32.div_s_0`, [71]), `integer divide by zero`); + +// ./test/core/int_exprs.wast:197 +assert_trap(() => invoke($11, `i32.div_u_0`, [71]), `integer divide by zero`); + +// ./test/core/int_exprs.wast:198 +assert_trap(() => invoke($11, `i64.div_s_0`, [71n]), `integer divide by zero`); + +// ./test/core/int_exprs.wast:199 +assert_trap(() => invoke($11, `i64.div_u_0`, [71n]), `integer divide by zero`); + +// ./test/core/int_exprs.wast:203 +let $12 = instantiate(`(module + (func (export "i32.div_s_3") (param $$x i32) (result i32) + (i32.div_s (local.get $$x) (i32.const 3))) + (func (export "i32.div_u_3") (param $$x i32) (result i32) + (i32.div_u (local.get $$x) (i32.const 3))) + + (func (export "i64.div_s_3") (param $$x i64) (result i64) + (i64.div_s (local.get $$x) (i64.const 3))) + (func (export "i64.div_u_3") (param $$x i64) (result i64) + (i64.div_u (local.get $$x) (i64.const 3))) +)`); + +// ./test/core/int_exprs.wast:215 +assert_return(() => invoke($12, `i32.div_s_3`, [71]), [value("i32", 23)]); + +// ./test/core/int_exprs.wast:216 +assert_return(() => invoke($12, `i32.div_s_3`, [1610612736]), [value("i32", 536870912)]); + +// ./test/core/int_exprs.wast:217 +assert_return(() => invoke($12, `i32.div_u_3`, [71]), [value("i32", 23)]); + +// ./test/core/int_exprs.wast:218 +assert_return(() => invoke($12, `i32.div_u_3`, [-1073741824]), [value("i32", 1073741824)]); + +// ./test/core/int_exprs.wast:219 +assert_return(() => invoke($12, `i64.div_s_3`, [71n]), [value("i64", 23n)]); + +// ./test/core/int_exprs.wast:220 +assert_return( + () => invoke($12, `i64.div_s_3`, [3458764513820540928n]), + [value("i64", 1152921504606846976n)], +); + +// ./test/core/int_exprs.wast:221 +assert_return(() => invoke($12, `i64.div_u_3`, [71n]), [value("i64", 23n)]); + +// ./test/core/int_exprs.wast:222 +assert_return( + () => invoke($12, `i64.div_u_3`, [-4611686018427387904n]), + [value("i64", 4611686018427387904n)], +); + +// ./test/core/int_exprs.wast:226 +let $13 = instantiate(`(module + (func (export "i32.div_s_5") (param $$x i32) (result i32) + (i32.div_s (local.get $$x) (i32.const 5))) + (func (export "i32.div_u_5") (param $$x i32) (result i32) + (i32.div_u (local.get $$x) (i32.const 5))) + + (func (export "i64.div_s_5") (param $$x i64) (result i64) + (i64.div_s (local.get $$x) (i64.const 5))) + (func (export "i64.div_u_5") (param $$x i64) (result i64) + (i64.div_u (local.get $$x) (i64.const 5))) +)`); + +// ./test/core/int_exprs.wast:238 +assert_return(() => invoke($13, `i32.div_s_5`, [71]), [value("i32", 14)]); + +// ./test/core/int_exprs.wast:239 +assert_return(() => invoke($13, `i32.div_s_5`, [1342177280]), [value("i32", 268435456)]); + +// ./test/core/int_exprs.wast:240 +assert_return(() => invoke($13, `i32.div_u_5`, [71]), [value("i32", 14)]); + +// ./test/core/int_exprs.wast:241 +assert_return(() => invoke($13, `i32.div_u_5`, [-1610612736]), [value("i32", 536870912)]); + +// ./test/core/int_exprs.wast:242 +assert_return(() => invoke($13, `i64.div_s_5`, [71n]), [value("i64", 14n)]); + +// ./test/core/int_exprs.wast:243 +assert_return( + () => invoke($13, `i64.div_s_5`, [5764607523034234880n]), + [value("i64", 1152921504606846976n)], +); + +// ./test/core/int_exprs.wast:244 +assert_return(() => invoke($13, `i64.div_u_5`, [71n]), [value("i64", 14n)]); + +// ./test/core/int_exprs.wast:245 +assert_return( + () => invoke($13, `i64.div_u_5`, [-6917529027641081856n]), + [value("i64", 2305843009213693952n)], +); + +// ./test/core/int_exprs.wast:249 +let $14 = instantiate(`(module + (func (export "i32.div_s_7") (param $$x i32) (result i32) + (i32.div_s (local.get $$x) (i32.const 7))) + (func (export "i32.div_u_7") (param $$x i32) (result i32) + (i32.div_u (local.get $$x) (i32.const 7))) + + (func (export "i64.div_s_7") (param $$x i64) (result i64) + (i64.div_s (local.get $$x) (i64.const 7))) + (func (export "i64.div_u_7") (param $$x i64) (result i64) + (i64.div_u (local.get $$x) (i64.const 7))) +)`); + +// ./test/core/int_exprs.wast:261 +assert_return(() => invoke($14, `i32.div_s_7`, [71]), [value("i32", 10)]); + +// ./test/core/int_exprs.wast:262 +assert_return(() => invoke($14, `i32.div_s_7`, [1879048192]), [value("i32", 268435456)]); + +// ./test/core/int_exprs.wast:263 +assert_return(() => invoke($14, `i32.div_u_7`, [71]), [value("i32", 10)]); + +// ./test/core/int_exprs.wast:264 +assert_return(() => invoke($14, `i32.div_u_7`, [-536870912]), [value("i32", 536870912)]); + +// ./test/core/int_exprs.wast:265 +assert_return(() => invoke($14, `i64.div_s_7`, [71n]), [value("i64", 10n)]); + +// ./test/core/int_exprs.wast:266 +assert_return( + () => invoke($14, `i64.div_s_7`, [8070450532247928832n]), + [value("i64", 1152921504606846976n)], +); + +// ./test/core/int_exprs.wast:267 +assert_return(() => invoke($14, `i64.div_u_7`, [71n]), [value("i64", 10n)]); + +// ./test/core/int_exprs.wast:268 +assert_return( + () => invoke($14, `i64.div_u_7`, [-2305843009213693952n]), + [value("i64", 2305843009213693952n)], +); + +// ./test/core/int_exprs.wast:272 +let $15 = instantiate(`(module + (func (export "i32.rem_s_3") (param $$x i32) (result i32) + (i32.rem_s (local.get $$x) (i32.const 3))) + (func (export "i32.rem_u_3") (param $$x i32) (result i32) + (i32.rem_u (local.get $$x) (i32.const 3))) + + (func (export "i64.rem_s_3") (param $$x i64) (result i64) + (i64.rem_s (local.get $$x) (i64.const 3))) + (func (export "i64.rem_u_3") (param $$x i64) (result i64) + (i64.rem_u (local.get $$x) (i64.const 3))) +)`); + +// ./test/core/int_exprs.wast:284 +assert_return(() => invoke($15, `i32.rem_s_3`, [71]), [value("i32", 2)]); + +// ./test/core/int_exprs.wast:285 +assert_return(() => invoke($15, `i32.rem_s_3`, [1610612736]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:286 +assert_return(() => invoke($15, `i32.rem_u_3`, [71]), [value("i32", 2)]); + +// ./test/core/int_exprs.wast:287 +assert_return(() => invoke($15, `i32.rem_u_3`, [-1073741824]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:288 +assert_return(() => invoke($15, `i64.rem_s_3`, [71n]), [value("i64", 2n)]); + +// ./test/core/int_exprs.wast:289 +assert_return(() => invoke($15, `i64.rem_s_3`, [3458764513820540928n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:290 +assert_return(() => invoke($15, `i64.rem_u_3`, [71n]), [value("i64", 2n)]); + +// ./test/core/int_exprs.wast:291 +assert_return(() => invoke($15, `i64.rem_u_3`, [-4611686018427387904n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:295 +let $16 = instantiate(`(module + (func (export "i32.rem_s_5") (param $$x i32) (result i32) + (i32.rem_s (local.get $$x) (i32.const 5))) + (func (export "i32.rem_u_5") (param $$x i32) (result i32) + (i32.rem_u (local.get $$x) (i32.const 5))) + + (func (export "i64.rem_s_5") (param $$x i64) (result i64) + (i64.rem_s (local.get $$x) (i64.const 5))) + (func (export "i64.rem_u_5") (param $$x i64) (result i64) + (i64.rem_u (local.get $$x) (i64.const 5))) +)`); + +// ./test/core/int_exprs.wast:307 +assert_return(() => invoke($16, `i32.rem_s_5`, [71]), [value("i32", 1)]); + +// ./test/core/int_exprs.wast:308 +assert_return(() => invoke($16, `i32.rem_s_5`, [1342177280]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:309 +assert_return(() => invoke($16, `i32.rem_u_5`, [71]), [value("i32", 1)]); + +// ./test/core/int_exprs.wast:310 +assert_return(() => invoke($16, `i32.rem_u_5`, [-1610612736]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:311 +assert_return(() => invoke($16, `i64.rem_s_5`, [71n]), [value("i64", 1n)]); + +// ./test/core/int_exprs.wast:312 +assert_return(() => invoke($16, `i64.rem_s_5`, [5764607523034234880n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:313 +assert_return(() => invoke($16, `i64.rem_u_5`, [71n]), [value("i64", 1n)]); + +// ./test/core/int_exprs.wast:314 +assert_return(() => invoke($16, `i64.rem_u_5`, [-6917529027641081856n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:318 +let $17 = instantiate(`(module + (func (export "i32.rem_s_7") (param $$x i32) (result i32) + (i32.rem_s (local.get $$x) (i32.const 7))) + (func (export "i32.rem_u_7") (param $$x i32) (result i32) + (i32.rem_u (local.get $$x) (i32.const 7))) + + (func (export "i64.rem_s_7") (param $$x i64) (result i64) + (i64.rem_s (local.get $$x) (i64.const 7))) + (func (export "i64.rem_u_7") (param $$x i64) (result i64) + (i64.rem_u (local.get $$x) (i64.const 7))) +)`); + +// ./test/core/int_exprs.wast:330 +assert_return(() => invoke($17, `i32.rem_s_7`, [71]), [value("i32", 1)]); + +// ./test/core/int_exprs.wast:331 +assert_return(() => invoke($17, `i32.rem_s_7`, [1879048192]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:332 +assert_return(() => invoke($17, `i32.rem_u_7`, [71]), [value("i32", 1)]); + +// ./test/core/int_exprs.wast:333 +assert_return(() => invoke($17, `i32.rem_u_7`, [-536870912]), [value("i32", 0)]); + +// ./test/core/int_exprs.wast:334 +assert_return(() => invoke($17, `i64.rem_s_7`, [71n]), [value("i64", 1n)]); + +// ./test/core/int_exprs.wast:335 +assert_return(() => invoke($17, `i64.rem_s_7`, [8070450532247928832n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:336 +assert_return(() => invoke($17, `i64.rem_u_7`, [71n]), [value("i64", 1n)]); + +// ./test/core/int_exprs.wast:337 +assert_return(() => invoke($17, `i64.rem_u_7`, [-2305843009213693952n]), [value("i64", 0n)]); + +// ./test/core/int_exprs.wast:341 +let $18 = instantiate(`(module + (func (export "i32.no_fold_div_neg1") (param $$x i32) (result i32) + (i32.div_s (local.get $$x) (i32.const -1))) + + (func (export "i64.no_fold_div_neg1") (param $$x i64) (result i64) + (i64.div_s (local.get $$x) (i64.const -1))) +)`); + +// ./test/core/int_exprs.wast:349 +assert_trap(() => invoke($18, `i32.no_fold_div_neg1`, [-2147483648]), `integer overflow`); + +// ./test/core/int_exprs.wast:350 +assert_trap(() => invoke($18, `i64.no_fold_div_neg1`, [-9223372036854775808n]), `integer overflow`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/int_literals.wast.js b/js/src/jit-test/tests/wasm/spec/spec/int_literals.wast.js new file mode 100644 index 0000000000..348aeda4ea --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/int_literals.wast.js @@ -0,0 +1,233 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/int_literals.wast + +// ./test/core/int_literals.wast:1 +let $0 = instantiate(`(module + (func (export "i32.test") (result i32) (return (i32.const 0x0bAdD00D))) + (func (export "i32.umax") (result i32) (return (i32.const 0xffffffff))) + (func (export "i32.smax") (result i32) (return (i32.const 0x7fffffff))) + (func (export "i32.neg_smax") (result i32) (return (i32.const -0x7fffffff))) + (func (export "i32.smin") (result i32) (return (i32.const -0x80000000))) + (func (export "i32.alt_smin") (result i32) (return (i32.const 0x80000000))) + (func (export "i32.inc_smin") (result i32) (return (i32.add (i32.const -0x80000000) (i32.const 1)))) + (func (export "i32.neg_zero") (result i32) (return (i32.const -0x0))) + (func (export "i32.not_octal") (result i32) (return (i32.const 010))) + (func (export "i32.unsigned_decimal") (result i32) (return (i32.const 4294967295))) + (func (export "i32.plus_sign") (result i32) (return (i32.const +42))) + + (func (export "i64.test") (result i64) (return (i64.const 0x0CABBA6E0ba66a6e))) + (func (export "i64.umax") (result i64) (return (i64.const 0xffffffffffffffff))) + (func (export "i64.smax") (result i64) (return (i64.const 0x7fffffffffffffff))) + (func (export "i64.neg_smax") (result i64) (return (i64.const -0x7fffffffffffffff))) + (func (export "i64.smin") (result i64) (return (i64.const -0x8000000000000000))) + (func (export "i64.alt_smin") (result i64) (return (i64.const 0x8000000000000000))) + (func (export "i64.inc_smin") (result i64) (return (i64.add (i64.const -0x8000000000000000) (i64.const 1)))) + (func (export "i64.neg_zero") (result i64) (return (i64.const -0x0))) + (func (export "i64.not_octal") (result i64) (return (i64.const 010))) + (func (export "i64.unsigned_decimal") (result i64) (return (i64.const 18446744073709551615))) + (func (export "i64.plus_sign") (result i64) (return (i64.const +42))) + + (func (export "i32-dec-sep1") (result i32) (i32.const 1_000_000)) + (func (export "i32-dec-sep2") (result i32) (i32.const 1_0_0_0)) + (func (export "i32-hex-sep1") (result i32) (i32.const 0xa_0f_00_99)) + (func (export "i32-hex-sep2") (result i32) (i32.const 0x1_a_A_0_f)) + + (func (export "i64-dec-sep1") (result i64) (i64.const 1_000_000)) + (func (export "i64-dec-sep2") (result i64) (i64.const 1_0_0_0)) + (func (export "i64-hex-sep1") (result i64) (i64.const 0xa_f00f_0000_9999)) + (func (export "i64-hex-sep2") (result i64) (i64.const 0x1_a_A_0_f)) +)`); + +// ./test/core/int_literals.wast:37 +assert_return(() => invoke($0, `i32.test`, []), [value("i32", 195940365)]); + +// ./test/core/int_literals.wast:38 +assert_return(() => invoke($0, `i32.umax`, []), [value("i32", -1)]); + +// ./test/core/int_literals.wast:39 +assert_return(() => invoke($0, `i32.smax`, []), [value("i32", 2147483647)]); + +// ./test/core/int_literals.wast:40 +assert_return(() => invoke($0, `i32.neg_smax`, []), [value("i32", -2147483647)]); + +// ./test/core/int_literals.wast:41 +assert_return(() => invoke($0, `i32.smin`, []), [value("i32", -2147483648)]); + +// ./test/core/int_literals.wast:42 +assert_return(() => invoke($0, `i32.alt_smin`, []), [value("i32", -2147483648)]); + +// ./test/core/int_literals.wast:43 +assert_return(() => invoke($0, `i32.inc_smin`, []), [value("i32", -2147483647)]); + +// ./test/core/int_literals.wast:44 +assert_return(() => invoke($0, `i32.neg_zero`, []), [value("i32", 0)]); + +// ./test/core/int_literals.wast:45 +assert_return(() => invoke($0, `i32.not_octal`, []), [value("i32", 10)]); + +// ./test/core/int_literals.wast:46 +assert_return(() => invoke($0, `i32.unsigned_decimal`, []), [value("i32", -1)]); + +// ./test/core/int_literals.wast:47 +assert_return(() => invoke($0, `i32.plus_sign`, []), [value("i32", 42)]); + +// ./test/core/int_literals.wast:49 +assert_return(() => invoke($0, `i64.test`, []), [value("i64", 913028331277281902n)]); + +// ./test/core/int_literals.wast:50 +assert_return(() => invoke($0, `i64.umax`, []), [value("i64", -1n)]); + +// ./test/core/int_literals.wast:51 +assert_return(() => invoke($0, `i64.smax`, []), [value("i64", 9223372036854775807n)]); + +// ./test/core/int_literals.wast:52 +assert_return(() => invoke($0, `i64.neg_smax`, []), [value("i64", -9223372036854775807n)]); + +// ./test/core/int_literals.wast:53 +assert_return(() => invoke($0, `i64.smin`, []), [value("i64", -9223372036854775808n)]); + +// ./test/core/int_literals.wast:54 +assert_return(() => invoke($0, `i64.alt_smin`, []), [value("i64", -9223372036854775808n)]); + +// ./test/core/int_literals.wast:55 +assert_return(() => invoke($0, `i64.inc_smin`, []), [value("i64", -9223372036854775807n)]); + +// ./test/core/int_literals.wast:56 +assert_return(() => invoke($0, `i64.neg_zero`, []), [value("i64", 0n)]); + +// ./test/core/int_literals.wast:57 +assert_return(() => invoke($0, `i64.not_octal`, []), [value("i64", 10n)]); + +// ./test/core/int_literals.wast:58 +assert_return(() => invoke($0, `i64.unsigned_decimal`, []), [value("i64", -1n)]); + +// ./test/core/int_literals.wast:59 +assert_return(() => invoke($0, `i64.plus_sign`, []), [value("i64", 42n)]); + +// ./test/core/int_literals.wast:61 +assert_return(() => invoke($0, `i32-dec-sep1`, []), [value("i32", 1000000)]); + +// ./test/core/int_literals.wast:62 +assert_return(() => invoke($0, `i32-dec-sep2`, []), [value("i32", 1000)]); + +// ./test/core/int_literals.wast:63 +assert_return(() => invoke($0, `i32-hex-sep1`, []), [value("i32", 168755353)]); + +// ./test/core/int_literals.wast:64 +assert_return(() => invoke($0, `i32-hex-sep2`, []), [value("i32", 109071)]); + +// ./test/core/int_literals.wast:66 +assert_return(() => invoke($0, `i64-dec-sep1`, []), [value("i64", 1000000n)]); + +// ./test/core/int_literals.wast:67 +assert_return(() => invoke($0, `i64-dec-sep2`, []), [value("i64", 1000n)]); + +// ./test/core/int_literals.wast:68 +assert_return(() => invoke($0, `i64-hex-sep1`, []), [value("i64", 3078696982321561n)]); + +// ./test/core/int_literals.wast:69 +assert_return(() => invoke($0, `i64-hex-sep2`, []), [value("i64", 109071n)]); + +// ./test/core/int_literals.wast:71 +assert_malformed(() => instantiate(`(global i32 (i32.const _100)) `), `unknown operator`); + +// ./test/core/int_literals.wast:75 +assert_malformed(() => instantiate(`(global i32 (i32.const +_100)) `), `unknown operator`); + +// ./test/core/int_literals.wast:79 +assert_malformed(() => instantiate(`(global i32 (i32.const -_100)) `), `unknown operator`); + +// ./test/core/int_literals.wast:83 +assert_malformed(() => instantiate(`(global i32 (i32.const 99_)) `), `unknown operator`); + +// ./test/core/int_literals.wast:87 +assert_malformed( + () => instantiate(`(global i32 (i32.const 1__000)) `), + `unknown operator`, +); + +// ./test/core/int_literals.wast:91 +assert_malformed( + () => instantiate(`(global i32 (i32.const _0x100)) `), + `unknown operator`, +); + +// ./test/core/int_literals.wast:95 +assert_malformed( + () => instantiate(`(global i32 (i32.const 0_x100)) `), + `unknown operator`, +); + +// ./test/core/int_literals.wast:99 +assert_malformed( + () => instantiate(`(global i32 (i32.const 0x_100)) `), + `unknown operator`, +); + +// ./test/core/int_literals.wast:103 +assert_malformed(() => instantiate(`(global i32 (i32.const 0x00_)) `), `unknown operator`); + +// ./test/core/int_literals.wast:107 +assert_malformed( + () => instantiate(`(global i32 (i32.const 0xff__ffff)) `), + `unknown operator`, +); + +// ./test/core/int_literals.wast:112 +assert_malformed(() => instantiate(`(global i64 (i64.const _100)) `), `unknown operator`); + +// ./test/core/int_literals.wast:116 +assert_malformed(() => instantiate(`(global i64 (i64.const +_100)) `), `unknown operator`); + +// ./test/core/int_literals.wast:120 +assert_malformed(() => instantiate(`(global i64 (i64.const -_100)) `), `unknown operator`); + +// ./test/core/int_literals.wast:124 +assert_malformed(() => instantiate(`(global i64 (i64.const 99_)) `), `unknown operator`); + +// ./test/core/int_literals.wast:128 +assert_malformed( + () => instantiate(`(global i64 (i64.const 1__000)) `), + `unknown operator`, +); + +// ./test/core/int_literals.wast:132 +assert_malformed( + () => instantiate(`(global i64 (i64.const _0x100)) `), + `unknown operator`, +); + +// ./test/core/int_literals.wast:136 +assert_malformed( + () => instantiate(`(global i64 (i64.const 0_x100)) `), + `unknown operator`, +); + +// ./test/core/int_literals.wast:140 +assert_malformed( + () => instantiate(`(global i64 (i64.const 0x_100)) `), + `unknown operator`, +); + +// ./test/core/int_literals.wast:144 +assert_malformed(() => instantiate(`(global i64 (i64.const 0x00_)) `), `unknown operator`); + +// ./test/core/int_literals.wast:148 +assert_malformed( + () => instantiate(`(global i64 (i64.const 0xff__ffff)) `), + `unknown operator`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/labels.wast.js b/js/src/jit-test/tests/wasm/spec/spec/labels.wast.js new file mode 100644 index 0000000000..b76f13f90a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/labels.wast.js @@ -0,0 +1,400 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/labels.wast + +// ./test/core/labels.wast:1 +let $0 = instantiate(`(module + (func (export "block") (result i32) + (block $$exit (result i32) + (br $$exit (i32.const 1)) + (i32.const 0) + ) + ) + + (func (export "loop1") (result i32) + (local $$i i32) + (local.set $$i (i32.const 0)) + (block $$exit (result i32) + (loop $$cont (result i32) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (if (i32.eq (local.get $$i) (i32.const 5)) + (then (br $$exit (local.get $$i))) + ) + (br $$cont) + ) + ) + ) + + (func (export "loop2") (result i32) + (local $$i i32) + (local.set $$i (i32.const 0)) + (block $$exit (result i32) + (loop $$cont (result i32) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (if (i32.eq (local.get $$i) (i32.const 5)) + (then (br $$cont)) + ) + (if (i32.eq (local.get $$i) (i32.const 8)) + (then (br $$exit (local.get $$i))) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (br $$cont) + ) + ) + ) + + (func (export "loop3") (result i32) + (local $$i i32) + (local.set $$i (i32.const 0)) + (block $$exit (result i32) + (loop $$cont (result i32) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (if (i32.eq (local.get $$i) (i32.const 5)) + (then (br $$exit (local.get $$i))) + ) + (local.get $$i) + ) + ) + ) + + (func (export "loop4") (param $$max i32) (result i32) + (local $$i i32) + (local.set $$i (i32.const 1)) + (block $$exit (result i32) + (loop $$cont (result i32) + (local.set $$i (i32.add (local.get $$i) (local.get $$i))) + (if (i32.gt_u (local.get $$i) (local.get $$max)) + (then (br $$exit (local.get $$i))) + ) + (br $$cont) + ) + ) + ) + + (func (export "loop5") (result i32) + (i32.add + (loop $$l (result i32) (i32.const 1)) + (i32.const 1) + ) + ) + + (func (export "loop6") (result i32) + (loop (result i32) + (br_if 0 (i32.const 0)) + (i32.const 3) + ) + ) + + (func (export "if") (result i32) + (local $$i i32) + (local.set $$i (i32.const 0)) + (block + (if $$l + (i32.const 1) + (then (br $$l) (local.set $$i (i32.const 666))) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (if $$l + (i32.const 1) + (then (br $$l) (local.set $$i (i32.const 666))) + (else (local.set $$i (i32.const 888))) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (if $$l + (i32.const 1) + (then (br $$l) (local.set $$i (i32.const 666))) + (else (local.set $$i (i32.const 888))) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (if $$l + (i32.const 0) + (then (local.set $$i (i32.const 888))) + (else (br $$l) (local.set $$i (i32.const 666))) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (if $$l + (i32.const 0) + (then (local.set $$i (i32.const 888))) + (else (br $$l) (local.set $$i (i32.const 666))) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + ) + (local.get $$i) + ) + + (func (export "if2") (result i32) + (local $$i i32) + (local.set $$i (i32.const 0)) + (block + (if + (i32.const 1) + (then (br 0) (local.set $$i (i32.const 666))) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (if + (i32.const 1) + (then (br 0) (local.set $$i (i32.const 666))) + (else (local.set $$i (i32.const 888))) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (if + (i32.const 1) + (then (br 0) (local.set $$i (i32.const 666))) + (else (local.set $$i (i32.const 888))) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (if + (i32.const 0) + (then (local.set $$i (i32.const 888))) + (else (br 0) (local.set $$i (i32.const 666))) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + (if + (i32.const 0) + (then (local.set $$i (i32.const 888))) + (else (br 0) (local.set $$i (i32.const 666))) + ) + (local.set $$i (i32.add (local.get $$i) (i32.const 1))) + ) + (local.get $$i) + ) + + (func (export "switch") (param i32) (result i32) + (block $$ret (result i32) + (i32.mul (i32.const 10) + (block $$exit (result i32) + (block $$0 + (block $$default + (block $$3 + (block $$2 + (block $$1 + (br_table $$0 $$1 $$2 $$3 $$default (local.get 0)) + ) ;; 1 + ) ;; 2 + (br $$exit (i32.const 2)) + ) ;; 3 + (br $$ret (i32.const 3)) + ) ;; default + ) ;; 0 + (i32.const 5) + ) + ) + ) + ) + + (func (export "return") (param i32) (result i32) + (block $$default + (block $$1 + (block $$0 + (br_table $$0 $$1 (local.get 0)) + (br $$default) + ) ;; 0 + (return (i32.const 0)) + ) ;; 1 + ) ;; default + (i32.const 2) + ) + + (func (export "br_if0") (result i32) + (local $$i i32) + (local.set $$i (i32.const 0)) + (block $$outer (result i32) + (block $$inner + (br_if $$inner (i32.const 0)) + (local.set $$i (i32.or (local.get $$i) (i32.const 0x1))) + (br_if $$inner (i32.const 1)) + (local.set $$i (i32.or (local.get $$i) (i32.const 0x2))) + ) + (drop (br_if $$outer + (block (result i32) + (local.set $$i (i32.or (local.get $$i) (i32.const 0x4))) + (local.get $$i) + ) + (i32.const 0) + )) + (local.set $$i (i32.or (local.get $$i) (i32.const 0x8))) + (drop (br_if $$outer + (block (result i32) + (local.set $$i (i32.or (local.get $$i) (i32.const 0x10))) + (local.get $$i) + ) + (i32.const 1) + )) + (local.set $$i (i32.or (local.get $$i) (i32.const 0x20))) (local.get $$i) + ) + ) + + (func (export "br_if1") (result i32) + (block $$l0 (result i32) + (drop + (br_if $$l0 + (block $$l1 (result i32) (br $$l1 (i32.const 1))) + (i32.const 1) + ) + ) + (i32.const 0) + ) + ) + + (func (export "br_if2") (result i32) + (block $$l0 (result i32) + (if (i32.const 1) + (then + (drop + (br_if $$l0 + (block $$l1 (result i32) (br $$l1 (i32.const 1))) + (i32.const 1) + ) + ) + ) + ) + (i32.const 0) + ) + ) + + (func (export "br_if3") (result i32) + (local $$i1 i32) + (drop + (i32.add + (block $$l0 (result i32) + (drop (br_if $$l0 + (block (result i32) (local.set $$i1 (i32.const 1)) (local.get $$i1)) + (block (result i32) (local.set $$i1 (i32.const 2)) (local.get $$i1)) + )) + (i32.const 0) + ) + (i32.const 0) + ) + ) + (local.get $$i1) + ) + + (func (export "br") (result i32) + (block $$l0 (result i32) + (if (i32.const 1) + (then (br $$l0 (block $$l1 (result i32) (br $$l1 (i32.const 1))))) + (else (block (drop (block $$l1 (result i32) (br $$l1 (i32.const 1)))))) + ) + (i32.const 1) + ) + ) + + (func (export "shadowing") (result i32) + (block $$l1 (result i32) (i32.xor (br $$l1 (i32.const 1)) (i32.const 2))) + ) + + (func (export "redefinition") (result i32) + (block $$l1 (result i32) + (i32.add + (block $$l1 (result i32) (i32.const 2)) + (block $$l1 (result i32) (br $$l1 (i32.const 3))) + ) + ) + ) +)`); + +// ./test/core/labels.wast:291 +assert_return(() => invoke($0, `block`, []), [value("i32", 1)]); + +// ./test/core/labels.wast:292 +assert_return(() => invoke($0, `loop1`, []), [value("i32", 5)]); + +// ./test/core/labels.wast:293 +assert_return(() => invoke($0, `loop2`, []), [value("i32", 8)]); + +// ./test/core/labels.wast:294 +assert_return(() => invoke($0, `loop3`, []), [value("i32", 1)]); + +// ./test/core/labels.wast:295 +assert_return(() => invoke($0, `loop4`, [8]), [value("i32", 16)]); + +// ./test/core/labels.wast:296 +assert_return(() => invoke($0, `loop5`, []), [value("i32", 2)]); + +// ./test/core/labels.wast:297 +assert_return(() => invoke($0, `loop6`, []), [value("i32", 3)]); + +// ./test/core/labels.wast:298 +assert_return(() => invoke($0, `if`, []), [value("i32", 5)]); + +// ./test/core/labels.wast:299 +assert_return(() => invoke($0, `if2`, []), [value("i32", 5)]); + +// ./test/core/labels.wast:300 +assert_return(() => invoke($0, `switch`, [0]), [value("i32", 50)]); + +// ./test/core/labels.wast:301 +assert_return(() => invoke($0, `switch`, [1]), [value("i32", 20)]); + +// ./test/core/labels.wast:302 +assert_return(() => invoke($0, `switch`, [2]), [value("i32", 20)]); + +// ./test/core/labels.wast:303 +assert_return(() => invoke($0, `switch`, [3]), [value("i32", 3)]); + +// ./test/core/labels.wast:304 +assert_return(() => invoke($0, `switch`, [4]), [value("i32", 50)]); + +// ./test/core/labels.wast:305 +assert_return(() => invoke($0, `switch`, [5]), [value("i32", 50)]); + +// ./test/core/labels.wast:306 +assert_return(() => invoke($0, `return`, [0]), [value("i32", 0)]); + +// ./test/core/labels.wast:307 +assert_return(() => invoke($0, `return`, [1]), [value("i32", 2)]); + +// ./test/core/labels.wast:308 +assert_return(() => invoke($0, `return`, [2]), [value("i32", 2)]); + +// ./test/core/labels.wast:309 +assert_return(() => invoke($0, `br_if0`, []), [value("i32", 29)]); + +// ./test/core/labels.wast:310 +assert_return(() => invoke($0, `br_if1`, []), [value("i32", 1)]); + +// ./test/core/labels.wast:311 +assert_return(() => invoke($0, `br_if2`, []), [value("i32", 1)]); + +// ./test/core/labels.wast:312 +assert_return(() => invoke($0, `br_if3`, []), [value("i32", 2)]); + +// ./test/core/labels.wast:313 +assert_return(() => invoke($0, `br`, []), [value("i32", 1)]); + +// ./test/core/labels.wast:314 +assert_return(() => invoke($0, `shadowing`, []), [value("i32", 1)]); + +// ./test/core/labels.wast:315 +assert_return(() => invoke($0, `redefinition`, []), [value("i32", 5)]); + +// ./test/core/labels.wast:317 +assert_invalid( + () => instantiate(`(module (func (block $$l (f32.neg (br_if $$l (i32.const 1))) (nop))))`), + `type mismatch`, +); + +// ./test/core/labels.wast:321 +assert_invalid( + () => instantiate(`(module (func (block $$l (br_if $$l (f32.const 0) (i32.const 1)))))`), + `type mismatch`, +); + +// ./test/core/labels.wast:325 +assert_invalid( + () => instantiate(`(module (func (block $$l (br_if $$l (f32.const 0) (i32.const 1)))))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/left-to-right.wast.js b/js/src/jit-test/tests/wasm/spec/spec/left-to-right.wast.js new file mode 100644 index 0000000000..9e1f168906 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/left-to-right.wast.js @@ -0,0 +1,482 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/left-to-right.wast + +// ./test/core/left-to-right.wast:1 +let $0 = instantiate(`(module + (memory 1) + + (type $$i32_T (func (param i32 i32) (result i32))) + (type $$i64_T (func (param i64 i64) (result i32))) + (type $$f32_T (func (param f32 f32) (result i32))) + (type $$f64_T (func (param f64 f64) (result i32))) + (table funcref + (elem $$i32_t0 $$i32_t1 $$i64_t0 $$i64_t1 $$f32_t0 $$f32_t1 $$f64_t0 $$f64_t1) + ) + + (func $$i32_t0 (type $$i32_T) (i32.const -1)) + (func $$i32_t1 (type $$i32_T) (i32.const -2)) + (func $$i64_t0 (type $$i64_T) (i32.const -1)) + (func $$i64_t1 (type $$i64_T) (i32.const -2)) + (func $$f32_t0 (type $$f32_T) (i32.const -1)) + (func $$f32_t1 (type $$f32_T) (i32.const -2)) + (func $$f64_t0 (type $$f64_T) (i32.const -1)) + (func $$f64_t1 (type $$f64_T) (i32.const -2)) + + ;; The idea is: We reset the memory, then the instruction call $$*_left, + ;; $$*_right, $$*_another, $$*_callee (for indirect calls), and $$*_bool (when a + ;; boolean value is needed). These functions all call bump, which shifts the + ;; memory starting at address 8 up a byte, and then store a unique value at + ;; address 8. Then we read the 4-byte value at address 8. It should contain + ;; the correct sequence of unique values if the calls were evaluated in the + ;; correct order. + + (func $$reset (i32.store (i32.const 8) (i32.const 0))) + + (func $$bump + (i32.store8 (i32.const 11) (i32.load8_u (i32.const 10))) + (i32.store8 (i32.const 10) (i32.load8_u (i32.const 9))) + (i32.store8 (i32.const 9) (i32.load8_u (i32.const 8))) + (i32.store8 (i32.const 8) (i32.const -3))) + + (func $$get (result i32) (i32.load (i32.const 8))) + + (func $$i32_left (result i32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 1)) (i32.const 0)) + (func $$i32_right (result i32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 2)) (i32.const 1)) + (func $$i32_another (result i32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 3)) (i32.const 1)) + (func $$i32_callee (result i32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 4)) (i32.const 0)) + (func $$i32_bool (result i32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 5)) (i32.const 0)) + (func $$i64_left (result i64) (call $$bump) (i32.store8 (i32.const 8) (i32.const 1)) (i64.const 0)) + (func $$i64_right (result i64) (call $$bump) (i32.store8 (i32.const 8) (i32.const 2)) (i64.const 1)) + (func $$i64_another (result i64) (call $$bump) (i32.store8 (i32.const 8) (i32.const 3)) (i64.const 1)) + (func $$i64_callee (result i32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 4)) (i32.const 2)) + (func $$i64_bool (result i32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 5)) (i32.const 0)) + (func $$f32_left (result f32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 1)) (f32.const 0)) + (func $$f32_right (result f32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 2)) (f32.const 1)) + (func $$f32_another (result f32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 3)) (f32.const 1)) + (func $$f32_callee (result i32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 4)) (i32.const 4)) + (func $$f32_bool (result i32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 5)) (i32.const 0)) + (func $$f64_left (result f64) (call $$bump) (i32.store8 (i32.const 8) (i32.const 1)) (f64.const 0)) + (func $$f64_right (result f64) (call $$bump) (i32.store8 (i32.const 8) (i32.const 2)) (f64.const 1)) + (func $$f64_another (result f64) (call $$bump) (i32.store8 (i32.const 8) (i32.const 3)) (f64.const 1)) + (func $$f64_callee (result i32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 4)) (i32.const 6)) + (func $$f64_bool (result i32) (call $$bump) (i32.store8 (i32.const 8) (i32.const 5)) (i32.const 0)) + (func $$i32_dummy (param i32 i32)) + (func $$i64_dummy (param i64 i64)) + (func $$f32_dummy (param f32 f32)) + (func $$f64_dummy (param f64 f64)) + + (func (export "i32_add") (result i32) (call $$reset) (drop (i32.add (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_sub") (result i32) (call $$reset) (drop (i32.sub (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_mul") (result i32) (call $$reset) (drop (i32.mul (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_div_s") (result i32) (call $$reset) (drop (i32.div_s (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_div_u") (result i32) (call $$reset) (drop (i32.div_u (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_rem_s") (result i32) (call $$reset) (drop (i32.rem_s (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_rem_u") (result i32) (call $$reset) (drop (i32.rem_u (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_and") (result i32) (call $$reset) (drop (i32.and (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_or") (result i32) (call $$reset) (drop (i32.or (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_xor") (result i32) (call $$reset) (drop (i32.xor (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_shl") (result i32) (call $$reset) (drop (i32.shl (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_shr_u") (result i32) (call $$reset) (drop (i32.shr_u (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_shr_s") (result i32) (call $$reset) (drop (i32.shr_s (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_eq") (result i32) (call $$reset) (drop (i32.eq (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_ne") (result i32) (call $$reset) (drop (i32.ne (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_lt_s") (result i32) (call $$reset) (drop (i32.lt_s (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_le_s") (result i32) (call $$reset) (drop (i32.le_s (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_lt_u") (result i32) (call $$reset) (drop (i32.lt_u (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_le_u") (result i32) (call $$reset) (drop (i32.le_u (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_gt_s") (result i32) (call $$reset) (drop (i32.gt_s (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_ge_s") (result i32) (call $$reset) (drop (i32.ge_s (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_gt_u") (result i32) (call $$reset) (drop (i32.gt_u (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_ge_u") (result i32) (call $$reset) (drop (i32.ge_u (call $$i32_left) (call $$i32_right))) (call $$get)) + (func (export "i32_store") (result i32) (call $$reset) (i32.store (call $$i32_left) (call $$i32_right)) (call $$get)) + (func (export "i32_store8") (result i32) (call $$reset) (i32.store8 (call $$i32_left) (call $$i32_right)) (call $$get)) + (func (export "i32_store16") (result i32) (call $$reset) (i32.store16 (call $$i32_left) (call $$i32_right)) (call $$get)) + (func (export "i32_call") (result i32) (call $$reset) (call $$i32_dummy (call $$i32_left) (call $$i32_right)) (call $$get)) + (func (export "i32_call_indirect") (result i32) (call $$reset) (drop (call_indirect (type $$i32_T) (call $$i32_left) (call $$i32_right) (call $$i32_callee))) (call $$get)) + (func (export "i32_select") (result i32) (call $$reset) (drop (select (call $$i32_left) (call $$i32_right) (call $$i32_bool))) (call $$get)) + + (func (export "i64_add") (result i32) (call $$reset) (drop (i64.add (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_sub") (result i32) (call $$reset) (drop (i64.sub (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_mul") (result i32) (call $$reset) (drop (i64.mul (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_div_s") (result i32) (call $$reset) (drop (i64.div_s (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_div_u") (result i32) (call $$reset) (drop (i64.div_u (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_rem_s") (result i32) (call $$reset) (drop (i64.rem_s (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_rem_u") (result i32) (call $$reset) (drop (i64.rem_u (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_and") (result i32) (call $$reset) (drop (i64.and (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_or") (result i32) (call $$reset) (drop (i64.or (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_xor") (result i32) (call $$reset) (drop (i64.xor (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_shl") (result i32) (call $$reset) (drop (i64.shl (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_shr_u") (result i32) (call $$reset) (drop (i64.shr_u (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_shr_s") (result i32) (call $$reset) (drop (i64.shr_s (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_eq") (result i32) (call $$reset) (drop (i64.eq (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_ne") (result i32) (call $$reset) (drop (i64.ne (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_lt_s") (result i32) (call $$reset) (drop (i64.lt_s (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_le_s") (result i32) (call $$reset) (drop (i64.le_s (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_lt_u") (result i32) (call $$reset) (drop (i64.lt_u (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_le_u") (result i32) (call $$reset) (drop (i64.le_u (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_gt_s") (result i32) (call $$reset) (drop (i64.gt_s (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_ge_s") (result i32) (call $$reset) (drop (i64.ge_s (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_gt_u") (result i32) (call $$reset) (drop (i64.gt_u (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_ge_u") (result i32) (call $$reset) (drop (i64.ge_u (call $$i64_left) (call $$i64_right))) (call $$get)) + (func (export "i64_store") (result i32) (call $$reset) (i64.store (call $$i32_left) (call $$i64_right)) (call $$get)) + (func (export "i64_store8") (result i32) (call $$reset) (i64.store8 (call $$i32_left) (call $$i64_right)) (call $$get)) + (func (export "i64_store16") (result i32) (call $$reset) (i64.store16 (call $$i32_left) (call $$i64_right)) (call $$get)) + (func (export "i64_store32") (result i32) (call $$reset) (i64.store32 (call $$i32_left) (call $$i64_right)) (call $$get)) + (func (export "i64_call") (result i32) (call $$reset) (call $$i64_dummy (call $$i64_left) (call $$i64_right)) (call $$get)) + (func (export "i64_call_indirect") (result i32) (call $$reset) (drop (call_indirect (type $$i64_T) (call $$i64_left) (call $$i64_right) (call $$i64_callee))) (call $$get)) + (func (export "i64_select") (result i32) (call $$reset) (drop (select (call $$i64_left) (call $$i64_right) (call $$i64_bool))) (call $$get)) + + (func (export "f32_add") (result i32) (call $$reset) (drop (f32.add (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_sub") (result i32) (call $$reset) (drop (f32.sub (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_mul") (result i32) (call $$reset) (drop (f32.mul (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_div") (result i32) (call $$reset) (drop (f32.div (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_copysign") (result i32) (call $$reset) (drop (f32.copysign (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_eq") (result i32) (call $$reset) (drop (f32.eq (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_ne") (result i32) (call $$reset) (drop (f32.ne (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_lt") (result i32) (call $$reset) (drop (f32.lt (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_le") (result i32) (call $$reset) (drop (f32.le (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_gt") (result i32) (call $$reset) (drop (f32.gt (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_ge") (result i32) (call $$reset) (drop (f32.ge (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_min") (result i32) (call $$reset) (drop (f32.min (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_max") (result i32) (call $$reset) (drop (f32.max (call $$f32_left) (call $$f32_right))) (call $$get)) + (func (export "f32_store") (result i32) (call $$reset) (f32.store (call $$i32_left) (call $$f32_right)) (call $$get)) + (func (export "f32_call") (result i32) (call $$reset) (call $$f32_dummy (call $$f32_left) (call $$f32_right)) (call $$get)) + (func (export "f32_call_indirect") (result i32) (call $$reset) (drop (call_indirect (type $$f32_T) (call $$f32_left) (call $$f32_right) (call $$f32_callee))) (call $$get)) + (func (export "f32_select") (result i32) (call $$reset) (drop (select (call $$f32_left) (call $$f32_right) (call $$f32_bool))) (call $$get)) + + (func (export "f64_add") (result i32) (call $$reset) (drop (f64.add (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_sub") (result i32) (call $$reset) (drop (f64.sub (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_mul") (result i32) (call $$reset) (drop (f64.mul (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_div") (result i32) (call $$reset) (drop (f64.div (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_copysign") (result i32) (call $$reset) (drop (f64.copysign (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_eq") (result i32) (call $$reset) (drop (f64.eq (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_ne") (result i32) (call $$reset) (drop (f64.ne (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_lt") (result i32) (call $$reset) (drop (f64.lt (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_le") (result i32) (call $$reset) (drop (f64.le (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_gt") (result i32) (call $$reset) (drop (f64.gt (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_ge") (result i32) (call $$reset) (drop (f64.ge (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_min") (result i32) (call $$reset) (drop (f64.min (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_max") (result i32) (call $$reset) (drop (f64.max (call $$f64_left) (call $$f64_right))) (call $$get)) + (func (export "f64_store") (result i32) (call $$reset) (f64.store (call $$i32_left) (call $$f64_right)) (call $$get)) + (func (export "f64_call") (result i32) (call $$reset) (call $$f64_dummy (call $$f64_left) (call $$f64_right)) (call $$get)) + (func (export "f64_call_indirect") (result i32) (call $$reset) (drop (call_indirect (type $$f64_T) (call $$f64_left) (call $$f64_right) (call $$f64_callee))) (call $$get)) + (func (export "f64_select") (result i32) (call $$reset) (drop (select (call $$f64_left) (call $$f64_right) (call $$f64_bool))) (call $$get)) + + (func (export "br_if") (result i32) + (block (result i32) + (call $$reset) + (drop (br_if 0 (call $$i32_left) (i32.and (call $$i32_right) (i32.const 0)))) + (call $$get) + ) + ) + (func (export "br_table") (result i32) + (block $$a (result i32) + (call $$reset) + (drop + (block $$b (result i32) + (br_table $$a $$b (call $$i32_left) (call $$i32_right)) + ) + ) + (call $$get) + ) + ) +)`); + +// ./test/core/left-to-right.wast:181 +assert_return(() => invoke($0, `i32_add`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:181:59 +assert_return(() => invoke($0, `i64_add`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:182 +assert_return(() => invoke($0, `i32_sub`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:182:59 +assert_return(() => invoke($0, `i64_sub`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:183 +assert_return(() => invoke($0, `i32_mul`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:183:59 +assert_return(() => invoke($0, `i64_mul`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:184 +assert_return(() => invoke($0, `i32_div_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:184:59 +assert_return(() => invoke($0, `i64_div_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:185 +assert_return(() => invoke($0, `i32_div_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:185:59 +assert_return(() => invoke($0, `i64_div_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:186 +assert_return(() => invoke($0, `i32_rem_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:186:59 +assert_return(() => invoke($0, `i64_rem_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:187 +assert_return(() => invoke($0, `i32_rem_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:187:59 +assert_return(() => invoke($0, `i64_rem_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:188 +assert_return(() => invoke($0, `i32_and`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:188:59 +assert_return(() => invoke($0, `i64_and`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:189 +assert_return(() => invoke($0, `i32_or`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:189:59 +assert_return(() => invoke($0, `i64_or`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:190 +assert_return(() => invoke($0, `i32_xor`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:190:59 +assert_return(() => invoke($0, `i64_xor`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:191 +assert_return(() => invoke($0, `i32_shl`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:191:59 +assert_return(() => invoke($0, `i64_shl`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:192 +assert_return(() => invoke($0, `i32_shr_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:192:59 +assert_return(() => invoke($0, `i64_shr_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:193 +assert_return(() => invoke($0, `i32_shr_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:193:59 +assert_return(() => invoke($0, `i64_shr_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:194 +assert_return(() => invoke($0, `i32_eq`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:194:59 +assert_return(() => invoke($0, `i64_eq`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:195 +assert_return(() => invoke($0, `i32_ne`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:195:59 +assert_return(() => invoke($0, `i64_ne`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:196 +assert_return(() => invoke($0, `i32_lt_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:196:59 +assert_return(() => invoke($0, `i64_lt_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:197 +assert_return(() => invoke($0, `i32_le_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:197:59 +assert_return(() => invoke($0, `i64_le_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:198 +assert_return(() => invoke($0, `i32_lt_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:198:59 +assert_return(() => invoke($0, `i64_lt_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:199 +assert_return(() => invoke($0, `i32_le_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:199:59 +assert_return(() => invoke($0, `i64_le_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:200 +assert_return(() => invoke($0, `i32_gt_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:200:59 +assert_return(() => invoke($0, `i64_gt_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:201 +assert_return(() => invoke($0, `i32_ge_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:201:59 +assert_return(() => invoke($0, `i64_ge_s`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:202 +assert_return(() => invoke($0, `i32_gt_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:202:59 +assert_return(() => invoke($0, `i64_gt_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:203 +assert_return(() => invoke($0, `i32_ge_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:203:59 +assert_return(() => invoke($0, `i64_ge_u`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:204 +assert_return(() => invoke($0, `i32_store`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:204:59 +assert_return(() => invoke($0, `i64_store`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:205 +assert_return(() => invoke($0, `i32_store8`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:205:59 +assert_return(() => invoke($0, `i64_store8`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:206 +assert_return(() => invoke($0, `i32_store16`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:206:59 +assert_return(() => invoke($0, `i64_store16`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:207 +assert_return(() => invoke($0, `i64_store32`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:208 +assert_return(() => invoke($0, `i32_call`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:208:59 +assert_return(() => invoke($0, `i64_call`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:209 +assert_return(() => invoke($0, `i32_call_indirect`, []), [value("i32", 66052)]); + +// ./test/core/left-to-right.wast:210 +assert_return(() => invoke($0, `i64_call_indirect`, []), [value("i32", 66052)]); + +// ./test/core/left-to-right.wast:211 +assert_return(() => invoke($0, `i32_select`, []), [value("i32", 66053)]); + +// ./test/core/left-to-right.wast:211:61 +assert_return(() => invoke($0, `i64_select`, []), [value("i32", 66053)]); + +// ./test/core/left-to-right.wast:213 +assert_return(() => invoke($0, `f32_add`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:213:59 +assert_return(() => invoke($0, `f64_add`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:214 +assert_return(() => invoke($0, `f32_sub`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:214:59 +assert_return(() => invoke($0, `f64_sub`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:215 +assert_return(() => invoke($0, `f32_mul`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:215:59 +assert_return(() => invoke($0, `f64_mul`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:216 +assert_return(() => invoke($0, `f32_div`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:216:59 +assert_return(() => invoke($0, `f64_div`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:217 +assert_return(() => invoke($0, `f32_copysign`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:217:59 +assert_return(() => invoke($0, `f64_copysign`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:218 +assert_return(() => invoke($0, `f32_eq`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:218:59 +assert_return(() => invoke($0, `f64_eq`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:219 +assert_return(() => invoke($0, `f32_ne`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:219:59 +assert_return(() => invoke($0, `f64_ne`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:220 +assert_return(() => invoke($0, `f32_lt`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:220:59 +assert_return(() => invoke($0, `f64_lt`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:221 +assert_return(() => invoke($0, `f32_le`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:221:59 +assert_return(() => invoke($0, `f64_le`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:222 +assert_return(() => invoke($0, `f32_gt`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:222:59 +assert_return(() => invoke($0, `f64_gt`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:223 +assert_return(() => invoke($0, `f32_ge`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:223:59 +assert_return(() => invoke($0, `f64_ge`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:224 +assert_return(() => invoke($0, `f32_min`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:224:59 +assert_return(() => invoke($0, `f64_min`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:225 +assert_return(() => invoke($0, `f32_max`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:225:59 +assert_return(() => invoke($0, `f64_max`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:226 +assert_return(() => invoke($0, `f32_store`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:226:59 +assert_return(() => invoke($0, `f64_store`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:227 +assert_return(() => invoke($0, `f32_call`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:227:59 +assert_return(() => invoke($0, `f64_call`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:228 +assert_return(() => invoke($0, `f32_call_indirect`, []), [value("i32", 66052)]); + +// ./test/core/left-to-right.wast:229 +assert_return(() => invoke($0, `f64_call_indirect`, []), [value("i32", 66052)]); + +// ./test/core/left-to-right.wast:230 +assert_return(() => invoke($0, `f32_select`, []), [value("i32", 66053)]); + +// ./test/core/left-to-right.wast:230:61 +assert_return(() => invoke($0, `f64_select`, []), [value("i32", 66053)]); + +// ./test/core/left-to-right.wast:232 +assert_return(() => invoke($0, `br_if`, []), [value("i32", 258)]); + +// ./test/core/left-to-right.wast:233 +assert_return(() => invoke($0, `br_table`, []), [value("i32", 258)]); diff --git a/js/src/jit-test/tests/wasm/spec/spec/load.wast.js b/js/src/jit-test/tests/wasm/spec/spec/load.wast.js new file mode 100644 index 0000000000..55b00e573e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/load.wast.js @@ -0,0 +1,749 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/load.wast + +// ./test/core/load.wast:3 +let $0 = instantiate(`(module + (memory 1) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (i32.load (i32.const 0)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (i32.load (i32.const 0)))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (i32.load (i32.const 0)) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 6) (i32.load (i32.const 0)))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (i32.load (i32.const 0)))) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (i32.load (i32.const 0)) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 6) (i32.load (i32.const 0))) (i32.const 7) + ) + ) + + (func (export "as-return-value") (result i32) + (return (i32.load (i32.const 0))) + ) + + (func (export "as-if-cond") (result i32) + (if (result i32) (i32.load (i32.const 0)) + (then (i32.const 0)) (else (i32.const 1)) + ) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) + (then (i32.load (i32.const 0))) (else (i32.const 0)) + ) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 0) + (then (i32.const 0)) (else (i32.load (i32.const 0))) + ) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (select (i32.load (i32.const 0)) (local.get 0) (local.get 1)) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (select (local.get 0) (i32.load (i32.const 0)) (local.get 1)) + ) + (func (export "as-select-cond") (result i32) + (select (i32.const 0) (i32.const 1) (i32.load (i32.const 0))) + ) + + (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (call $$f (i32.load (i32.const 0)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call-mid") (result i32) + (call $$f (i32.const 1) (i32.load (i32.const 0)) (i32.const 3)) + ) + (func (export "as-call-last") (result i32) + (call $$f (i32.const 1) (i32.const 2) (i32.load (i32.const 0))) + ) + + (type $$sig (func (param i32 i32 i32) (result i32))) + (table funcref (elem $$f)) + (func (export "as-call_indirect-first") (result i32) + (call_indirect (type $$sig) + (i32.load (i32.const 0)) (i32.const 2) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.load (i32.const 0)) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (i32.load (i32.const 0)) (i32.const 0) + ) + ) + (func (export "as-call_indirect-index") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (i32.const 3) (i32.load (i32.const 0)) + ) + ) + + (func (export "as-local.set-value") (local i32) + (local.set 0 (i32.load (i32.const 0))) + ) + (func (export "as-local.tee-value") (result i32) (local i32) + (local.tee 0 (i32.load (i32.const 0))) + ) + (global $$g (mut i32) (i32.const 0)) + (func (export "as-global.set-value") (local i32) + (global.set $$g (i32.load (i32.const 0))) + ) + + (func (export "as-load-address") (result i32) + (i32.load (i32.load (i32.const 0))) + ) + (func (export "as-loadN-address") (result i32) + (i32.load8_s (i32.load (i32.const 0))) + ) + + (func (export "as-store-address") + (i32.store (i32.load (i32.const 0)) (i32.const 7)) + ) + (func (export "as-store-value") + (i32.store (i32.const 2) (i32.load (i32.const 0))) + ) + + (func (export "as-storeN-address") + (i32.store8 (i32.load8_s (i32.const 0)) (i32.const 7)) + ) + (func (export "as-storeN-value") + (i32.store16 (i32.const 2) (i32.load (i32.const 0))) + ) + + (func (export "as-unary-operand") (result i32) + (i32.clz (i32.load (i32.const 100))) + ) + + (func (export "as-binary-left") (result i32) + (i32.add (i32.load (i32.const 100)) (i32.const 10)) + ) + (func (export "as-binary-right") (result i32) + (i32.sub (i32.const 10) (i32.load (i32.const 100))) + ) + + (func (export "as-test-operand") (result i32) + (i32.eqz (i32.load (i32.const 100))) + ) + + (func (export "as-compare-left") (result i32) + (i32.le_s (i32.load (i32.const 100)) (i32.const 10)) + ) + (func (export "as-compare-right") (result i32) + (i32.ne (i32.const 10) (i32.load (i32.const 100))) + ) + + (func (export "as-memory.grow-size") (result i32) + (memory.grow (i32.load (i32.const 100))) + ) +)`); + +// ./test/core/load.wast:161 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 0)]); + +// ./test/core/load.wast:163 +assert_return(() => invoke($0, `as-br_if-cond`, []), []); + +// ./test/core/load.wast:164 +assert_return(() => invoke($0, `as-br_if-value`, []), [value("i32", 0)]); + +// ./test/core/load.wast:165 +assert_return(() => invoke($0, `as-br_if-value-cond`, []), [value("i32", 7)]); + +// ./test/core/load.wast:167 +assert_return(() => invoke($0, `as-br_table-index`, []), []); + +// ./test/core/load.wast:168 +assert_return(() => invoke($0, `as-br_table-value`, []), [value("i32", 0)]); + +// ./test/core/load.wast:169 +assert_return(() => invoke($0, `as-br_table-value-index`, []), [value("i32", 6)]); + +// ./test/core/load.wast:171 +assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 0)]); + +// ./test/core/load.wast:173 +assert_return(() => invoke($0, `as-if-cond`, []), [value("i32", 1)]); + +// ./test/core/load.wast:174 +assert_return(() => invoke($0, `as-if-then`, []), [value("i32", 0)]); + +// ./test/core/load.wast:175 +assert_return(() => invoke($0, `as-if-else`, []), [value("i32", 0)]); + +// ./test/core/load.wast:177 +assert_return(() => invoke($0, `as-select-first`, [0, 1]), [value("i32", 0)]); + +// ./test/core/load.wast:178 +assert_return(() => invoke($0, `as-select-second`, [0, 0]), [value("i32", 0)]); + +// ./test/core/load.wast:179 +assert_return(() => invoke($0, `as-select-cond`, []), [value("i32", 1)]); + +// ./test/core/load.wast:181 +assert_return(() => invoke($0, `as-call-first`, []), [value("i32", -1)]); + +// ./test/core/load.wast:182 +assert_return(() => invoke($0, `as-call-mid`, []), [value("i32", -1)]); + +// ./test/core/load.wast:183 +assert_return(() => invoke($0, `as-call-last`, []), [value("i32", -1)]); + +// ./test/core/load.wast:185 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", -1)]); + +// ./test/core/load.wast:186 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", -1)]); + +// ./test/core/load.wast:187 +assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", -1)]); + +// ./test/core/load.wast:188 +assert_return(() => invoke($0, `as-call_indirect-index`, []), [value("i32", -1)]); + +// ./test/core/load.wast:190 +assert_return(() => invoke($0, `as-local.set-value`, []), []); + +// ./test/core/load.wast:191 +assert_return(() => invoke($0, `as-local.tee-value`, []), [value("i32", 0)]); + +// ./test/core/load.wast:192 +assert_return(() => invoke($0, `as-global.set-value`, []), []); + +// ./test/core/load.wast:194 +assert_return(() => invoke($0, `as-load-address`, []), [value("i32", 0)]); + +// ./test/core/load.wast:195 +assert_return(() => invoke($0, `as-loadN-address`, []), [value("i32", 0)]); + +// ./test/core/load.wast:196 +assert_return(() => invoke($0, `as-store-address`, []), []); + +// ./test/core/load.wast:197 +assert_return(() => invoke($0, `as-store-value`, []), []); + +// ./test/core/load.wast:198 +assert_return(() => invoke($0, `as-storeN-address`, []), []); + +// ./test/core/load.wast:199 +assert_return(() => invoke($0, `as-storeN-value`, []), []); + +// ./test/core/load.wast:201 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("i32", 32)]); + +// ./test/core/load.wast:203 +assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 10)]); + +// ./test/core/load.wast:204 +assert_return(() => invoke($0, `as-binary-right`, []), [value("i32", 10)]); + +// ./test/core/load.wast:206 +assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 1)]); + +// ./test/core/load.wast:208 +assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 1)]); + +// ./test/core/load.wast:209 +assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 1)]); + +// ./test/core/load.wast:211 +assert_return(() => invoke($0, `as-memory.grow-size`, []), [value("i32", 1)]); + +// ./test/core/load.wast:213 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i32) (i32.load32 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:220 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i32) (i32.load32_u (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:227 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i32) (i32.load32_s (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:234 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i32) (i32.load64 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:241 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i32) (i32.load64_u (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:248 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i32) (i32.load64_s (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:256 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i64) (i64.load64 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:263 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i64) (i64.load64_u (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:270 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result i64) (i64.load64_s (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:278 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result f32) (f32.load32 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:285 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result f32) (f32.load64 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:293 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result f64) (f64.load32 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:300 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (result f64) (f64.load64 (local.get 0))) `), + `unknown operator`, +); + +// ./test/core/load.wast:311 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load_i32 (i32.load (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:315 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load8_s_i32 (i32.load8_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:319 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load8_u_i32 (i32.load8_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:323 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load16_s_i32 (i32.load16_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:327 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load16_u_i32 (i32.load16_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:331 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load_i64 (i64.load (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:335 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load8_s_i64 (i64.load8_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:339 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load8_u_i64 (i64.load8_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:343 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load16_s_i64 (i64.load16_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:347 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load16_u_i64 (i64.load16_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:351 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load32_s_i64 (i64.load32_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:355 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load32_u_i64 (i64.load32_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:359 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load_f32 (f32.load (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:363 +assert_invalid( + () => instantiate(`(module (memory 1) (func $$load_f64 (f64.load (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:371 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i32) (i32.load (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:372 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i32) (i32.load8_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:373 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i32) (i32.load8_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:374 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i32) (i32.load16_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:375 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i32) (i32.load16_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:376 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:377 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load8_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:378 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load8_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:379 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load16_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:380 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load16_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:381 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load32_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:382 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result i64) (i64.load32_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:383 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result f32) (f32.load (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:384 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result f64) (f64.load (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/load.wast:387 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty + (i32.load) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:396 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-block + (i32.const 0) + (block (i32.load) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:406 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-loop + (i32.const 0) + (loop (i32.load) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:416 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (i32.load) (drop))) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:426 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (i32.load))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:436 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-br + (i32.const 0) + (block (br 0 (i32.load)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:446 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-br_if + (i32.const 0) + (block (br_if 0 (i32.load) (i32.const 1)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:456 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-br_table + (i32.const 0) + (block (br_table 0 (i32.load)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:466 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-return + (return (i32.load)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:475 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-select + (select (i32.load) (i32.const 1) (i32.const 2)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:484 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-call + (call 1 (i32.load)) (drop) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:494 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-address-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (i32.load) (i32.const 0) + ) + (drop) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:511 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-local.set + (local i32) + (local.set 0 (i32.load)) (local.get 0) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:521 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-local.tee + (local i32) + (local.tee 0 (i32.load)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:531 +assert_invalid( + () => instantiate(`(module + (memory 0) + (global $$x (mut i32) (i32.const 0)) + (func $$type-address-empty-in-global.set + (global.set $$x (i32.load)) (global.get $$x) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:541 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-memory.grow + (memory.grow (i32.load)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:550 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-address-empty-in-load + (i32.load (i32.load)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/load.wast:559 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-store + (i32.store (i32.load) (i32.const 1)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/local_get.wast.js b/js/src/jit-test/tests/wasm/spec/spec/local_get.wast.js new file mode 100644 index 0000000000..c51b00bd31 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/local_get.wast.js @@ -0,0 +1,279 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/local_get.wast + +// ./test/core/local_get.wast:3 +let $0 = instantiate(`(module + ;; Typing + + (func (export "type-local-i32") (result i32) (local i32) (local.get 0)) + (func (export "type-local-i64") (result i64) (local i64) (local.get 0)) + (func (export "type-local-f32") (result f32) (local f32) (local.get 0)) + (func (export "type-local-f64") (result f64) (local f64) (local.get 0)) + + (func (export "type-param-i32") (param i32) (result i32) (local.get 0)) + (func (export "type-param-i64") (param i64) (result i64) (local.get 0)) + (func (export "type-param-f32") (param f32) (result f32) (local.get 0)) + (func (export "type-param-f64") (param f64) (result f64) (local.get 0)) + + (func (export "type-mixed") (param i64 f32 f64 i32 i32) + (local f32 i64 i64 f64) + (drop (i64.eqz (local.get 0))) + (drop (f32.neg (local.get 1))) + (drop (f64.neg (local.get 2))) + (drop (i32.eqz (local.get 3))) + (drop (i32.eqz (local.get 4))) + (drop (f32.neg (local.get 5))) + (drop (i64.eqz (local.get 6))) + (drop (i64.eqz (local.get 7))) + (drop (f64.neg (local.get 8))) + ) + + ;; Reading + + (func (export "read") (param i64 f32 f64 i32 i32) (result f64) + (local f32 i64 i64 f64) + (local.set 5 (f32.const 5.5)) + (local.set 6 (i64.const 6)) + (local.set 8 (f64.const 8)) + (f64.add + (f64.convert_i64_u (local.get 0)) + (f64.add + (f64.promote_f32 (local.get 1)) + (f64.add + (local.get 2) + (f64.add + (f64.convert_i32_u (local.get 3)) + (f64.add + (f64.convert_i32_s (local.get 4)) + (f64.add + (f64.promote_f32 (local.get 5)) + (f64.add + (f64.convert_i64_u (local.get 6)) + (f64.add + (f64.convert_i64_u (local.get 7)) + (local.get 8) + ) + ) + ) + ) + ) + ) + ) + ) + ) + + ;; As parameter of control constructs and instructions + + (func (export "as-block-value") (param i32) (result i32) + (block (result i32) (local.get 0)) + ) + (func (export "as-loop-value") (param i32) (result i32) + (loop (result i32) (local.get 0)) + ) + (func (export "as-br-value") (param i32) (result i32) + (block (result i32) (br 0 (local.get 0))) + ) + (func (export "as-br_if-value") (param i32) (result i32) + (block $$l0 (result i32) (br_if $$l0 (local.get 0) (i32.const 1))) + ) + + (func (export "as-br_if-value-cond") (param i32) (result i32) + (block (result i32) + (br_if 0 (local.get 0) (local.get 0)) + ) + ) + (func (export "as-br_table-value") (param i32) (result i32) + (block + (block + (block + (br_table 0 1 2 (local.get 0)) + (return (i32.const 0)) + ) + (return (i32.const 1)) + ) + (return (i32.const 2)) + ) + (i32.const 3) + ) + + (func (export "as-return-value") (param i32) (result i32) + (return (local.get 0)) + ) + + (func (export "as-if-then") (param i32) (result i32) + (if (result i32) (local.get 0) (then (local.get 0)) (else (i32.const 0))) + ) + (func (export "as-if-else") (param i32) (result i32) + (if (result i32) (local.get 0) (then (i32.const 1)) (else (local.get 0))) + ) +)`); + +// ./test/core/local_get.wast:109 +assert_return(() => invoke($0, `type-local-i32`, []), [value("i32", 0)]); + +// ./test/core/local_get.wast:110 +assert_return(() => invoke($0, `type-local-i64`, []), [value("i64", 0n)]); + +// ./test/core/local_get.wast:111 +assert_return(() => invoke($0, `type-local-f32`, []), [value("f32", 0)]); + +// ./test/core/local_get.wast:112 +assert_return(() => invoke($0, `type-local-f64`, []), [value("f64", 0)]); + +// ./test/core/local_get.wast:114 +assert_return(() => invoke($0, `type-param-i32`, [2]), [value("i32", 2)]); + +// ./test/core/local_get.wast:115 +assert_return(() => invoke($0, `type-param-i64`, [3n]), [value("i64", 3n)]); + +// ./test/core/local_get.wast:116 +assert_return(() => invoke($0, `type-param-f32`, [value("f32", 4.4)]), [value("f32", 4.4)]); + +// ./test/core/local_get.wast:117 +assert_return(() => invoke($0, `type-param-f64`, [value("f64", 5.5)]), [value("f64", 5.5)]); + +// ./test/core/local_get.wast:119 +assert_return(() => invoke($0, `as-block-value`, [6]), [value("i32", 6)]); + +// ./test/core/local_get.wast:120 +assert_return(() => invoke($0, `as-loop-value`, [7]), [value("i32", 7)]); + +// ./test/core/local_get.wast:122 +assert_return(() => invoke($0, `as-br-value`, [8]), [value("i32", 8)]); + +// ./test/core/local_get.wast:123 +assert_return(() => invoke($0, `as-br_if-value`, [9]), [value("i32", 9)]); + +// ./test/core/local_get.wast:124 +assert_return(() => invoke($0, `as-br_if-value-cond`, [10]), [value("i32", 10)]); + +// ./test/core/local_get.wast:125 +assert_return(() => invoke($0, `as-br_table-value`, [1]), [value("i32", 2)]); + +// ./test/core/local_get.wast:127 +assert_return(() => invoke($0, `as-return-value`, [0]), [value("i32", 0)]); + +// ./test/core/local_get.wast:129 +assert_return(() => invoke($0, `as-if-then`, [1]), [value("i32", 1)]); + +// ./test/core/local_get.wast:130 +assert_return(() => invoke($0, `as-if-else`, [0]), [value("i32", 0)]); + +// ./test/core/local_get.wast:132 +assert_return(() => invoke($0, `type-mixed`, [1n, value("f32", 2.2), value("f64", 3.3), 4, 5]), []); + +// ./test/core/local_get.wast:138 +assert_return( + () => invoke($0, `read`, [1n, value("f32", 2), value("f64", 3.3), 4, 5]), + [value("f64", 34.8)], +); + +// ./test/core/local_get.wast:148 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (result i64) (local i32) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:152 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (result i32) (local f32) (i32.eqz (local.get 0))))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:156 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (result f64) (local f64 i64) (f64.neg (local.get 1))))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:164 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param i32) (result i64) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:168 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param f32) (result i32) (i32.eqz (local.get 0))))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:172 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param f64 i64) (result f64) (f64.neg (local.get 1))))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:180 +assert_invalid( + () => instantiate(`(module (func $$type-empty-vs-i32 (local i32) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:184 +assert_invalid( + () => instantiate(`(module (func $$type-empty-vs-i64 (local i64) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:188 +assert_invalid( + () => instantiate(`(module (func $$type-empty-vs-f32 (local f32) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:192 +assert_invalid( + () => instantiate(`(module (func $$type-empty-vs-f64 (local f64) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_get.wast:200 +assert_invalid( + () => instantiate(`(module (func $$unbound-local (local i32 i64) (local.get 3) drop))`), + `unknown local`, +); + +// ./test/core/local_get.wast:204 +assert_invalid( + () => instantiate(`(module (func $$large-local (local i32 i64) (local.get 14324343) drop))`), + `unknown local`, +); + +// ./test/core/local_get.wast:209 +assert_invalid( + () => instantiate(`(module (func $$unbound-param (param i32 i64) (local.get 2) drop))`), + `unknown local`, +); + +// ./test/core/local_get.wast:213 +assert_invalid( + () => instantiate(`(module (func $$large-param (param i32 i64) (local.get 714324343) drop))`), + `unknown local`, +); + +// ./test/core/local_get.wast:218 +assert_invalid( + () => instantiate(`(module (func $$unbound-mixed (param i32) (local i32 i64) (local.get 3) drop))`), + `unknown local`, +); + +// ./test/core/local_get.wast:222 +assert_invalid( + () => instantiate(`(module (func $$large-mixed (param i64) (local i32 i64) (local.get 214324343) drop))`), + `unknown local`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/local_set.wast.js b/js/src/jit-test/tests/wasm/spec/spec/local_set.wast.js new file mode 100644 index 0000000000..f022fa00bf --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/local_set.wast.js @@ -0,0 +1,442 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/local_set.wast + +// ./test/core/local_set.wast:3 +let $0 = instantiate(`(module + ;; Typing + + (func (export "type-local-i32") (local i32) (local.set 0 (i32.const 0))) + (func (export "type-local-i64") (local i64) (local.set 0 (i64.const 0))) + (func (export "type-local-f32") (local f32) (local.set 0 (f32.const 0))) + (func (export "type-local-f64") (local f64) (local.set 0 (f64.const 0))) + + (func (export "type-param-i32") (param i32) (local.set 0 (i32.const 10))) + (func (export "type-param-i64") (param i64) (local.set 0 (i64.const 11))) + (func (export "type-param-f32") (param f32) (local.set 0 (f32.const 11.1))) + (func (export "type-param-f64") (param f64) (local.set 0 (f64.const 12.2))) + + (func (export "type-mixed") (param i64 f32 f64 i32 i32) (local f32 i64 i64 f64) + (local.set 0 (i64.const 0)) + (local.set 1 (f32.const 0)) + (local.set 2 (f64.const 0)) + (local.set 3 (i32.const 0)) + (local.set 4 (i32.const 0)) + (local.set 5 (f32.const 0)) + (local.set 6 (i64.const 0)) + (local.set 7 (i64.const 0)) + (local.set 8 (f64.const 0)) + ) + + ;; Writing + + (func (export "write") (param i64 f32 f64 i32 i32) (result i64) + (local f32 i64 i64 f64) + (local.set 1 (f32.const -0.3)) + (local.set 3 (i32.const 40)) + (local.set 4 (i32.const -7)) + (local.set 5 (f32.const 5.5)) + (local.set 6 (i64.const 6)) + (local.set 8 (f64.const 8)) + (i64.trunc_f64_s + (f64.add + (f64.convert_i64_u (local.get 0)) + (f64.add + (f64.promote_f32 (local.get 1)) + (f64.add + (local.get 2) + (f64.add + (f64.convert_i32_u (local.get 3)) + (f64.add + (f64.convert_i32_s (local.get 4)) + (f64.add + (f64.promote_f32 (local.get 5)) + (f64.add + (f64.convert_i64_u (local.get 6)) + (f64.add + (f64.convert_i64_u (local.get 7)) + (local.get 8) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + + ;; As parameter of control constructs and instructions + + (func (export "as-block-value") (param i32) + (block (local.set 0 (i32.const 1))) + ) + (func (export "as-loop-value") (param i32) + (loop (local.set 0 (i32.const 3))) + ) + + (func (export "as-br-value") (param i32) + (block (br 0 (local.set 0 (i32.const 9)))) + ) + (func (export "as-br_if-value") (param i32) + (block + (br_if 0 (local.set 0 (i32.const 8)) (i32.const 1)) + ) + ) + (func (export "as-br_if-value-cond") (param i32) + (block + (br_if 0 (i32.const 6) (local.set 0 (i32.const 9))) + ) + ) + (func (export "as-br_table-value") (param i32) + (block + (br_table 0 (local.set 0 (i32.const 10)) (i32.const 1)) + ) + ) + + (func (export "as-return-value") (param i32) + (return (local.set 0 (i32.const 7))) + ) + + (func (export "as-if-then") (param i32) + (if (local.get 0) (then (local.set 0 (i32.const 3)))) + ) + (func (export "as-if-else") (param i32) + (if (local.get 0) (then) (else (local.set 0 (i32.const 1)))) + ) +)`); + +// ./test/core/local_set.wast:107 +assert_return(() => invoke($0, `type-local-i32`, []), []); + +// ./test/core/local_set.wast:108 +assert_return(() => invoke($0, `type-local-i64`, []), []); + +// ./test/core/local_set.wast:109 +assert_return(() => invoke($0, `type-local-f32`, []), []); + +// ./test/core/local_set.wast:110 +assert_return(() => invoke($0, `type-local-f64`, []), []); + +// ./test/core/local_set.wast:112 +assert_return(() => invoke($0, `type-param-i32`, [2]), []); + +// ./test/core/local_set.wast:113 +assert_return(() => invoke($0, `type-param-i64`, [3n]), []); + +// ./test/core/local_set.wast:114 +assert_return(() => invoke($0, `type-param-f32`, [value("f32", 4.4)]), []); + +// ./test/core/local_set.wast:115 +assert_return(() => invoke($0, `type-param-f64`, [value("f64", 5.5)]), []); + +// ./test/core/local_set.wast:117 +assert_return(() => invoke($0, `as-block-value`, [0]), []); + +// ./test/core/local_set.wast:118 +assert_return(() => invoke($0, `as-loop-value`, [0]), []); + +// ./test/core/local_set.wast:120 +assert_return(() => invoke($0, `as-br-value`, [0]), []); + +// ./test/core/local_set.wast:121 +assert_return(() => invoke($0, `as-br_if-value`, [0]), []); + +// ./test/core/local_set.wast:122 +assert_return(() => invoke($0, `as-br_if-value-cond`, [0]), []); + +// ./test/core/local_set.wast:123 +assert_return(() => invoke($0, `as-br_table-value`, [0]), []); + +// ./test/core/local_set.wast:125 +assert_return(() => invoke($0, `as-return-value`, [0]), []); + +// ./test/core/local_set.wast:127 +assert_return(() => invoke($0, `as-if-then`, [1]), []); + +// ./test/core/local_set.wast:128 +assert_return(() => invoke($0, `as-if-else`, [0]), []); + +// ./test/core/local_set.wast:130 +assert_return(() => invoke($0, `type-mixed`, [1n, value("f32", 2.2), value("f64", 3.3), 4, 5]), []); + +// ./test/core/local_set.wast:136 +assert_return( + () => invoke($0, `write`, [1n, value("f32", 2), value("f64", 3.3), 4, 5]), + [value("i64", 56n)], +); + +// ./test/core/local_set.wast:147 +assert_invalid( + () => instantiate(`(module (func $$type-local-arg-void-vs-num (local i32) (local.set 0 (nop))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:151 +assert_invalid( + () => instantiate(`(module (func $$type-local-arg-num-vs-num (local i32) (local.set 0 (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:155 +assert_invalid( + () => instantiate(`(module (func $$type-local-arg-num-vs-num (local f32) (local.set 0 (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:159 +assert_invalid( + () => instantiate(`(module (func $$type-local-arg-num-vs-num (local f64 i64) (local.set 1 (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:168 +assert_invalid( + () => instantiate(`(module (func $$type-param-arg-void-vs-num (param i32) (local.set 0 (nop))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:172 +assert_invalid( + () => instantiate(`(module (func $$type-param-arg-num-vs-num (param i32) (local.set 0 (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:176 +assert_invalid( + () => instantiate(`(module (func $$type-param-arg-num-vs-num (param f32) (local.set 0 (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:180 +assert_invalid( + () => instantiate(`(module (func $$type-param-arg-num-vs-num (param f64 i64) (local.set 1 (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:185 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num (param i32) + (local.set 0) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_set.wast:193 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-block (param i32) + (i32.const 0) + (block (local.set 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_set.wast:202 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-loop (param i32) + (i32.const 0) + (loop (local.set 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_set.wast:211 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-then (param i32) + (i32.const 0) + (if (i32.const 1) (then (local.set 0))) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_set.wast:220 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-else (param i32) + (i32.const 0) + (if (result i32) (i32.const 0) (then (i32.const 0)) (else (local.set 0))) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_set.wast:229 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-br (param i32) + (i32.const 0) + (block (br 0 (local.set 0))) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_set.wast:238 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-br_if (param i32) + (i32.const 0) + (block (br_if 0 (local.set 0))) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_set.wast:247 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-br_table (param i32) + (i32.const 0) + (block (br_table 0 (local.set 0))) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_set.wast:256 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-return (param i32) + (return (local.set 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_set.wast:264 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-select (param i32) + (select (local.set 0) (i32.const 1) (i32.const 2)) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_set.wast:272 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-call (param i32) + (call 1 (local.set 0)) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/local_set.wast:281 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-param-arg-empty-vs-num-in-call_indirect (param i32) + (block (result i32) + (call_indirect (type $$sig) + (local.set 0) (i32.const 0) + ) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_set.wast:300 +assert_invalid( + () => instantiate(`(module (func $$type-mixed-arg-num-vs-num (param f32) (local i32) (local.set 1 (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:304 +assert_invalid( + () => instantiate(`(module (func $$type-mixed-arg-num-vs-num (param i64 i32) (local f32) (local.set 1 (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:308 +assert_invalid( + () => instantiate(`(module (func $$type-mixed-arg-num-vs-num (param i64) (local f64 i64) (local.set 1 (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:316 +assert_invalid( + () => instantiate(`(module (func $$type-empty-vs-i32 (param i32) (result i32) (local.set 0 (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:320 +assert_invalid( + () => instantiate(`(module (func $$type-empty-vs-i64 (param i64) (result i64) (local.set 0 (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:324 +assert_invalid( + () => instantiate(`(module (func $$type-empty-vs-f32 (param f32) (result f32) (local.set 0 (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:328 +assert_invalid( + () => instantiate(`(module (func $$type-empty-vs-f64 (param f64) (result f64) (local.set 0 (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/local_set.wast:336 +assert_invalid( + () => instantiate(`(module (func $$unbound-local (local i32 i64) (local.set 3 (i32.const 0))))`), + `unknown local`, +); + +// ./test/core/local_set.wast:340 +assert_invalid( + () => instantiate(`(module (func $$large-local (local i32 i64) (local.set 14324343 (i32.const 0))))`), + `unknown local`, +); + +// ./test/core/local_set.wast:345 +assert_invalid( + () => instantiate(`(module (func $$unbound-param (param i32 i64) (local.set 2 (i32.const 0))))`), + `unknown local`, +); + +// ./test/core/local_set.wast:349 +assert_invalid( + () => instantiate(`(module (func $$large-param (param i32 i64) (local.set 714324343 (i32.const 0))))`), + `unknown local`, +); + +// ./test/core/local_set.wast:354 +assert_invalid( + () => instantiate(`(module (func $$unbound-mixed (param i32) (local i32 i64) (local.set 3 (i32.const 0))))`), + `unknown local`, +); + +// ./test/core/local_set.wast:358 +assert_invalid( + () => instantiate(`(module (func $$large-mixed (param i64) (local i32 i64) (local.set 214324343 (i32.const 0))))`), + `unknown local`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/local_tee.wast.js b/js/src/jit-test/tests/wasm/spec/spec/local_tee.wast.js new file mode 100644 index 0000000000..c02e2044e7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/local_tee.wast.js @@ -0,0 +1,806 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/local_tee.wast + +// ./test/core/local_tee.wast:3 +let $0 = instantiate(`(module + ;; Typing + + (func (export "type-local-i32") (result i32) (local i32) (local.tee 0 (i32.const 0))) + (func (export "type-local-i64") (result i64) (local i64) (local.tee 0 (i64.const 0))) + (func (export "type-local-f32") (result f32) (local f32) (local.tee 0 (f32.const 0))) + (func (export "type-local-f64") (result f64) (local f64) (local.tee 0 (f64.const 0))) + + (func (export "type-param-i32") (param i32) (result i32) (local.tee 0 (i32.const 10))) + (func (export "type-param-i64") (param i64) (result i64) (local.tee 0 (i64.const 11))) + (func (export "type-param-f32") (param f32) (result f32) (local.tee 0 (f32.const 11.1))) + (func (export "type-param-f64") (param f64) (result f64) (local.tee 0 (f64.const 12.2))) + + (func (export "type-mixed") (param i64 f32 f64 i32 i32) (local f32 i64 i64 f64) + (drop (i64.eqz (local.tee 0 (i64.const 0)))) + (drop (f32.neg (local.tee 1 (f32.const 0)))) + (drop (f64.neg (local.tee 2 (f64.const 0)))) + (drop (i32.eqz (local.tee 3 (i32.const 0)))) + (drop (i32.eqz (local.tee 4 (i32.const 0)))) + (drop (f32.neg (local.tee 5 (f32.const 0)))) + (drop (i64.eqz (local.tee 6 (i64.const 0)))) + (drop (i64.eqz (local.tee 7 (i64.const 0)))) + (drop (f64.neg (local.tee 8 (f64.const 0)))) + ) + + ;; Writing + + (func (export "write") (param i64 f32 f64 i32 i32) (result i64) (local f32 i64 i64 f64) + (drop (local.tee 1 (f32.const -0.3))) + (drop (local.tee 3 (i32.const 40))) + (drop (local.tee 4 (i32.const -7))) + (drop (local.tee 5 (f32.const 5.5))) + (drop (local.tee 6 (i64.const 6))) + (drop (local.tee 8 (f64.const 8))) + (i64.trunc_f64_s + (f64.add + (f64.convert_i64_u (local.get 0)) + (f64.add + (f64.promote_f32 (local.get 1)) + (f64.add + (local.get 2) + (f64.add + (f64.convert_i32_u (local.get 3)) + (f64.add + (f64.convert_i32_s (local.get 4)) + (f64.add + (f64.promote_f32 (local.get 5)) + (f64.add + (f64.convert_i64_u (local.get 6)) + (f64.add + (f64.convert_i64_u (local.get 7)) + (local.get 8) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + + ;; Result + + (func (export "result") (param i64 f32 f64 i32 i32) (result f64) + (local f32 i64 i64 f64) + (f64.add + (f64.convert_i64_u (local.tee 0 (i64.const 1))) + (f64.add + (f64.promote_f32 (local.tee 1 (f32.const 2))) + (f64.add + (local.tee 2 (f64.const 3.3)) + (f64.add + (f64.convert_i32_u (local.tee 3 (i32.const 4))) + (f64.add + (f64.convert_i32_s (local.tee 4 (i32.const 5))) + (f64.add + (f64.promote_f32 (local.tee 5 (f32.const 5.5))) + (f64.add + (f64.convert_i64_u (local.tee 6 (i64.const 6))) + (f64.add + (f64.convert_i64_u (local.tee 7 (i64.const 0))) + (local.tee 8 (f64.const 8)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + + (func $$dummy) + + (func (export "as-block-first") (param i32) (result i32) + (block (result i32) (local.tee 0 (i32.const 1)) (call $$dummy)) + ) + (func (export "as-block-mid") (param i32) (result i32) + (block (result i32) (call $$dummy) (local.tee 0 (i32.const 1)) (call $$dummy)) + ) + (func (export "as-block-last") (param i32) (result i32) + (block (result i32) (call $$dummy) (call $$dummy) (local.tee 0 (i32.const 1))) + ) + + (func (export "as-loop-first") (param i32) (result i32) + (loop (result i32) (local.tee 0 (i32.const 3)) (call $$dummy)) + ) + (func (export "as-loop-mid") (param i32) (result i32) + (loop (result i32) (call $$dummy) (local.tee 0 (i32.const 4)) (call $$dummy)) + ) + (func (export "as-loop-last") (param i32) (result i32) + (loop (result i32) (call $$dummy) (call $$dummy) (local.tee 0 (i32.const 5))) + ) + + (func (export "as-br-value") (param i32) (result i32) + (block (result i32) (br 0 (local.tee 0 (i32.const 9)))) + ) + + (func (export "as-br_if-cond") (param i32) + (block (br_if 0 (local.tee 0 (i32.const 1)))) + ) + (func (export "as-br_if-value") (param i32) (result i32) + (block (result i32) + (drop (br_if 0 (local.tee 0 (i32.const 8)) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (param i32) (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 6) (local.tee 0 (i32.const 9)))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") (param i32) + (block (br_table 0 0 0 (local.tee 0 (i32.const 0)))) + ) + (func (export "as-br_table-value") (param i32) (result i32) + (block (result i32) + (br_table 0 0 0 (local.tee 0 (i32.const 10)) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-index") (param i32) (result i32) + (block (result i32) + (br_table 0 0 (i32.const 6) (local.tee 0 (i32.const 11))) (i32.const 7) + ) + ) + + (func (export "as-return-value") (param i32) (result i32) + (return (local.tee 0 (i32.const 7))) + ) + + (func (export "as-if-cond") (param i32) (result i32) + (if (result i32) (local.tee 0 (i32.const 2)) + (then (i32.const 0)) (else (i32.const 1)) + ) + ) + (func (export "as-if-then") (param i32) (result i32) + (if (result i32) (local.get 0) + (then (local.tee 0 (i32.const 3))) (else (local.get 0)) + ) + ) + (func (export "as-if-else") (param i32) (result i32) + (if (result i32) (local.get 0) + (then (local.get 0)) (else (local.tee 0 (i32.const 4))) + ) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (select (local.tee 0 (i32.const 5)) (local.get 0) (local.get 1)) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (select (local.get 0) (local.tee 0 (i32.const 6)) (local.get 1)) + ) + (func (export "as-select-cond") (param i32) (result i32) + (select (i32.const 0) (i32.const 1) (local.tee 0 (i32.const 7))) + ) + + (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (param i32) (result i32) + (call $$f (local.tee 0 (i32.const 12)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call-mid") (param i32) (result i32) + (call $$f (i32.const 1) (local.tee 0 (i32.const 13)) (i32.const 3)) + ) + (func (export "as-call-last") (param i32) (result i32) + (call $$f (i32.const 1) (i32.const 2) (local.tee 0 (i32.const 14))) + ) + + (type $$sig (func (param i32 i32 i32) (result i32))) + (table funcref (elem $$f)) + (func (export "as-call_indirect-first") (param i32) (result i32) + (call_indirect (type $$sig) + (local.tee 0 (i32.const 1)) (i32.const 2) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-mid") (param i32) (result i32) + (call_indirect (type $$sig) + (i32.const 1) (local.tee 0 (i32.const 2)) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-last") (param i32) (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (local.tee 0 (i32.const 3)) (i32.const 0) + ) + ) + (func (export "as-call_indirect-index") (param i32) (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (i32.const 3) (local.tee 0 (i32.const 0)) + ) + ) + + (func (export "as-local.set-value") (local i32) + (local.set 0 (local.tee 0 (i32.const 1))) + ) + (func (export "as-local.tee-value") (param i32) (result i32) + (local.tee 0 (local.tee 0 (i32.const 1))) + ) + (global $$g (mut i32) (i32.const 0)) + (func (export "as-global.set-value") (local i32) + (global.set $$g (local.tee 0 (i32.const 1))) + ) + + (memory 1) + (func (export "as-load-address") (param i32) (result i32) + (i32.load (local.tee 0 (i32.const 1))) + ) + (func (export "as-loadN-address") (param i32) (result i32) + (i32.load8_s (local.tee 0 (i32.const 3))) + ) + + (func (export "as-store-address") (param i32) + (i32.store (local.tee 0 (i32.const 30)) (i32.const 7)) + ) + (func (export "as-store-value") (param i32) + (i32.store (i32.const 2) (local.tee 0 (i32.const 1))) + ) + + (func (export "as-storeN-address") (param i32) + (i32.store8 (local.tee 0 (i32.const 1)) (i32.const 7)) + ) + (func (export "as-storeN-value") (param i32) + (i32.store16 (i32.const 2) (local.tee 0 (i32.const 1))) + ) + + (func (export "as-unary-operand") (param f32) (result f32) + (f32.neg (local.tee 0 (f32.const nan:0x0f1e2))) + ) + + (func (export "as-binary-left") (param i32) (result i32) + (i32.add (local.tee 0 (i32.const 3)) (i32.const 10)) + ) + (func (export "as-binary-right") (param i32) (result i32) + (i32.sub (i32.const 10) (local.tee 0 (i32.const 4))) + ) + + (func (export "as-test-operand") (param i32) (result i32) + (i32.eqz (local.tee 0 (i32.const 0))) + ) + + (func (export "as-compare-left") (param i32) (result i32) + (i32.le_s (local.tee 0 (i32.const 43)) (i32.const 10)) + ) + (func (export "as-compare-right") (param i32) (result i32) + (i32.ne (i32.const 10) (local.tee 0 (i32.const 42))) + ) + + (func (export "as-convert-operand") (param i64) (result i32) + (i32.wrap_i64 (local.tee 0 (i64.const 41))) + ) + + (func (export "as-memory.grow-size") (param i32) (result i32) + (memory.grow (local.tee 0 (i32.const 40))) + ) + +)`); + +// ./test/core/local_tee.wast:280 +assert_return(() => invoke($0, `type-local-i32`, []), [value("i32", 0)]); + +// ./test/core/local_tee.wast:281 +assert_return(() => invoke($0, `type-local-i64`, []), [value("i64", 0n)]); + +// ./test/core/local_tee.wast:282 +assert_return(() => invoke($0, `type-local-f32`, []), [value("f32", 0)]); + +// ./test/core/local_tee.wast:283 +assert_return(() => invoke($0, `type-local-f64`, []), [value("f64", 0)]); + +// ./test/core/local_tee.wast:285 +assert_return(() => invoke($0, `type-param-i32`, [2]), [value("i32", 10)]); + +// ./test/core/local_tee.wast:286 +assert_return(() => invoke($0, `type-param-i64`, [3n]), [value("i64", 11n)]); + +// ./test/core/local_tee.wast:287 +assert_return(() => invoke($0, `type-param-f32`, [value("f32", 4.4)]), [value("f32", 11.1)]); + +// ./test/core/local_tee.wast:288 +assert_return(() => invoke($0, `type-param-f64`, [value("f64", 5.5)]), [value("f64", 12.2)]); + +// ./test/core/local_tee.wast:290 +assert_return(() => invoke($0, `as-block-first`, [0]), [value("i32", 1)]); + +// ./test/core/local_tee.wast:291 +assert_return(() => invoke($0, `as-block-mid`, [0]), [value("i32", 1)]); + +// ./test/core/local_tee.wast:292 +assert_return(() => invoke($0, `as-block-last`, [0]), [value("i32", 1)]); + +// ./test/core/local_tee.wast:294 +assert_return(() => invoke($0, `as-loop-first`, [0]), [value("i32", 3)]); + +// ./test/core/local_tee.wast:295 +assert_return(() => invoke($0, `as-loop-mid`, [0]), [value("i32", 4)]); + +// ./test/core/local_tee.wast:296 +assert_return(() => invoke($0, `as-loop-last`, [0]), [value("i32", 5)]); + +// ./test/core/local_tee.wast:298 +assert_return(() => invoke($0, `as-br-value`, [0]), [value("i32", 9)]); + +// ./test/core/local_tee.wast:300 +assert_return(() => invoke($0, `as-br_if-cond`, [0]), []); + +// ./test/core/local_tee.wast:301 +assert_return(() => invoke($0, `as-br_if-value`, [0]), [value("i32", 8)]); + +// ./test/core/local_tee.wast:302 +assert_return(() => invoke($0, `as-br_if-value-cond`, [0]), [value("i32", 6)]); + +// ./test/core/local_tee.wast:304 +assert_return(() => invoke($0, `as-br_table-index`, [0]), []); + +// ./test/core/local_tee.wast:305 +assert_return(() => invoke($0, `as-br_table-value`, [0]), [value("i32", 10)]); + +// ./test/core/local_tee.wast:306 +assert_return(() => invoke($0, `as-br_table-value-index`, [0]), [value("i32", 6)]); + +// ./test/core/local_tee.wast:308 +assert_return(() => invoke($0, `as-return-value`, [0]), [value("i32", 7)]); + +// ./test/core/local_tee.wast:310 +assert_return(() => invoke($0, `as-if-cond`, [0]), [value("i32", 0)]); + +// ./test/core/local_tee.wast:311 +assert_return(() => invoke($0, `as-if-then`, [1]), [value("i32", 3)]); + +// ./test/core/local_tee.wast:312 +assert_return(() => invoke($0, `as-if-else`, [0]), [value("i32", 4)]); + +// ./test/core/local_tee.wast:314 +assert_return(() => invoke($0, `as-select-first`, [0, 1]), [value("i32", 5)]); + +// ./test/core/local_tee.wast:315 +assert_return(() => invoke($0, `as-select-second`, [0, 0]), [value("i32", 6)]); + +// ./test/core/local_tee.wast:316 +assert_return(() => invoke($0, `as-select-cond`, [0]), [value("i32", 0)]); + +// ./test/core/local_tee.wast:318 +assert_return(() => invoke($0, `as-call-first`, [0]), [value("i32", -1)]); + +// ./test/core/local_tee.wast:319 +assert_return(() => invoke($0, `as-call-mid`, [0]), [value("i32", -1)]); + +// ./test/core/local_tee.wast:320 +assert_return(() => invoke($0, `as-call-last`, [0]), [value("i32", -1)]); + +// ./test/core/local_tee.wast:322 +assert_return(() => invoke($0, `as-call_indirect-first`, [0]), [value("i32", -1)]); + +// ./test/core/local_tee.wast:323 +assert_return(() => invoke($0, `as-call_indirect-mid`, [0]), [value("i32", -1)]); + +// ./test/core/local_tee.wast:324 +assert_return(() => invoke($0, `as-call_indirect-last`, [0]), [value("i32", -1)]); + +// ./test/core/local_tee.wast:325 +assert_return(() => invoke($0, `as-call_indirect-index`, [0]), [value("i32", -1)]); + +// ./test/core/local_tee.wast:327 +assert_return(() => invoke($0, `as-local.set-value`, []), []); + +// ./test/core/local_tee.wast:328 +assert_return(() => invoke($0, `as-local.tee-value`, [0]), [value("i32", 1)]); + +// ./test/core/local_tee.wast:329 +assert_return(() => invoke($0, `as-global.set-value`, []), []); + +// ./test/core/local_tee.wast:331 +assert_return(() => invoke($0, `as-load-address`, [0]), [value("i32", 0)]); + +// ./test/core/local_tee.wast:332 +assert_return(() => invoke($0, `as-loadN-address`, [0]), [value("i32", 0)]); + +// ./test/core/local_tee.wast:333 +assert_return(() => invoke($0, `as-store-address`, [0]), []); + +// ./test/core/local_tee.wast:334 +assert_return(() => invoke($0, `as-store-value`, [0]), []); + +// ./test/core/local_tee.wast:335 +assert_return(() => invoke($0, `as-storeN-address`, [0]), []); + +// ./test/core/local_tee.wast:336 +assert_return(() => invoke($0, `as-storeN-value`, [0]), []); + +// ./test/core/local_tee.wast:338 +assert_return( + () => invoke($0, `as-unary-operand`, [value("f32", 0)]), + [bytes("f32", [0xe2, 0xf1, 0x80, 0xff])], +); + +// ./test/core/local_tee.wast:339 +assert_return(() => invoke($0, `as-binary-left`, [0]), [value("i32", 13)]); + +// ./test/core/local_tee.wast:340 +assert_return(() => invoke($0, `as-binary-right`, [0]), [value("i32", 6)]); + +// ./test/core/local_tee.wast:341 +assert_return(() => invoke($0, `as-test-operand`, [0]), [value("i32", 1)]); + +// ./test/core/local_tee.wast:342 +assert_return(() => invoke($0, `as-compare-left`, [0]), [value("i32", 0)]); + +// ./test/core/local_tee.wast:343 +assert_return(() => invoke($0, `as-compare-right`, [0]), [value("i32", 1)]); + +// ./test/core/local_tee.wast:344 +assert_return(() => invoke($0, `as-convert-operand`, [0n]), [value("i32", 41)]); + +// ./test/core/local_tee.wast:345 +assert_return(() => invoke($0, `as-memory.grow-size`, [0]), [value("i32", 1)]); + +// ./test/core/local_tee.wast:347 +assert_return(() => invoke($0, `type-mixed`, [1n, value("f32", 2.2), value("f64", 3.3), 4, 5]), []); + +// ./test/core/local_tee.wast:353 +assert_return( + () => invoke($0, `write`, [1n, value("f32", 2), value("f64", 3.3), 4, 5]), + [value("i64", 56n)], +); + +// ./test/core/local_tee.wast:360 +assert_return( + () => invoke($0, `result`, [-1n, value("f32", -2), value("f64", -3.3), -4, -5]), + [value("f64", 34.8)], +); + +// ./test/core/local_tee.wast:370 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (result i64) (local i32) (local.tee 0 (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:374 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (local f32) (i32.eqz (local.tee 0 (f32.const 0)))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:378 +assert_invalid( + () => instantiate(`(module (func $$type-local-num-vs-num (local f64 i64) (f64.neg (local.tee 1 (i64.const 0)))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:383 +assert_invalid( + () => instantiate(`(module (func $$type-local-arg-void-vs-num (local i32) (local.tee 0 (nop))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:387 +assert_invalid( + () => instantiate(`(module (func $$type-local-arg-num-vs-num (local i32) (local.tee 0 (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:391 +assert_invalid( + () => instantiate(`(module (func $$type-local-arg-num-vs-num (local f32) (local.tee 0 (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:395 +assert_invalid( + () => instantiate(`(module (func $$type-local-arg-num-vs-num (local f64 i64) (local.tee 1 (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:403 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param i32) (result i64) (local.get 0)))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:407 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param f32) (i32.eqz (local.get 0))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:411 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num (param f64 i64) (f64.neg (local.get 1))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:416 +assert_invalid( + () => instantiate(`(module (func $$type-param-arg-void-vs-num (param i32) (local.tee 0 (nop))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:420 +assert_invalid( + () => instantiate(`(module (func $$type-param-arg-num-vs-num (param i32) (local.tee 0 (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:424 +assert_invalid( + () => instantiate(`(module (func $$type-param-arg-num-vs-num (param f32) (local.tee 0 (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:428 +assert_invalid( + () => instantiate(`(module (func $$type-param-arg-num-vs-num (param f64 i64) (local.tee 1 (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:433 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num (param i32) + (local.tee 0) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:441 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-block (param i32) + (i32.const 0) + (block (local.tee 0) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:450 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-loop (param i32) + (i32.const 0) + (loop (local.tee 0) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:459 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-then (param i32) + (i32.const 0) (i32.const 0) + (if (then (local.tee 0) (drop))) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:468 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-else (param i32) + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (local.tee 0))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:477 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-br (param i32) + (i32.const 0) + (block (br 0 (local.tee 0)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:486 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-br_if (param i32) + (i32.const 0) + (block (br_if 0 (local.tee 0) (i32.const 1)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:495 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-br_table (param i32) + (i32.const 0) + (block (br_table 0 (local.tee 0)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:504 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-return (param i32) + (return (local.tee 0)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:512 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-select (param i32) + (select (local.tee 0) (i32.const 1) (i32.const 2)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:520 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-call (param i32) + (call 1 (local.tee 0)) (drop) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:529 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-param-arg-empty-vs-num-in-call_indirect (param i32) + (block (result i32) + (call_indirect (type $$sig) + (local.tee 0) (i32.const 0) + ) + (drop) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:545 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-local.set (param i32) + (local.set 0 (local.tee 0)) (local.get 0) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:553 +assert_invalid( + () => instantiate(`(module + (func $$type-param-arg-empty-vs-num-in-local.tee (param i32) + (local.tee 0 (local.tee 0)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:561 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-param-arg-empty-vs-num-in-global.set (param i32) + (global.set $$x (local.tee 0)) (global.get $$x) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:570 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-param-arg-empty-vs-num-in-memory.grow (param i32) + (memory.grow (local.tee 0)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:579 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-param-arg-empty-vs-num-in-load (param i32) + (i32.load (local.tee 0)) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:588 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-param-arg-empty-vs-num-in-store (param i32) + (i32.store (local.tee 0) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:598 +assert_invalid( + () => instantiate(`(module (func $$type-mixed-arg-num-vs-num (param f32) (local i32) (local.tee 1 (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:602 +assert_invalid( + () => instantiate(`(module (func $$type-mixed-arg-num-vs-num (param i64 i32) (local f32) (local.tee 1 (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:606 +assert_invalid( + () => instantiate(`(module (func $$type-mixed-arg-num-vs-num (param i64) (local f64 i64) (local.tee 1 (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/local_tee.wast:614 +assert_invalid( + () => instantiate(`(module (func $$unbound-local (local i32 i64) (local.tee 3 (i32.const 0)) drop))`), + `unknown local`, +); + +// ./test/core/local_tee.wast:618 +assert_invalid( + () => instantiate(`(module (func $$large-local (local i32 i64) (local.tee 14324343 (i32.const 0)) drop))`), + `unknown local`, +); + +// ./test/core/local_tee.wast:623 +assert_invalid( + () => instantiate(`(module (func $$unbound-param (param i32 i64) (local.tee 2 (i32.const 0)) drop))`), + `unknown local`, +); + +// ./test/core/local_tee.wast:627 +assert_invalid( + () => instantiate(`(module (func $$large-param (param i32 i64) (local.tee 714324343 (i32.const 0)) drop))`), + `unknown local`, +); + +// ./test/core/local_tee.wast:632 +assert_invalid( + () => instantiate(`(module (func $$unbound-mixed (param i32) (local i32 i64) (local.tee 3 (i32.const 0)) drop))`), + `unknown local`, +); + +// ./test/core/local_tee.wast:636 +assert_invalid( + () => instantiate(`(module (func $$large-mixed (param i64) (local i32 i64) (local.tee 214324343 (i32.const 0)) drop))`), + `unknown local`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/loop.wast.js b/js/src/jit-test/tests/wasm/spec/spec/loop.wast.js new file mode 100644 index 0000000000..d00d9d4a6e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/loop.wast.js @@ -0,0 +1,986 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/loop.wast + +// ./test/core/loop.wast:3 +let $0 = instantiate(`(module + (memory 1) + + (func $$dummy) + + (func (export "empty") + (loop) + (loop $$l) + ) + + (func (export "singular") (result i32) + (loop (nop)) + (loop (result i32) (i32.const 7)) + ) + + (func (export "multi") (result i32) + (loop (call $$dummy) (call $$dummy) (call $$dummy) (call $$dummy)) + (loop (result i32) (call $$dummy) (call $$dummy) (i32.const 8) (call $$dummy)) + (drop) + (loop (result i32 i64 i32) + (call $$dummy) (call $$dummy) (call $$dummy) (i32.const 8) (call $$dummy) + (call $$dummy) (call $$dummy) (call $$dummy) (i64.const 7) (call $$dummy) + (call $$dummy) (call $$dummy) (call $$dummy) (i32.const 9) (call $$dummy) + ) + (drop) (drop) + ) + + (func (export "nested") (result i32) + (loop (result i32) + (loop (call $$dummy) (block) (nop)) + (loop (result i32) (call $$dummy) (i32.const 9)) + ) + ) + + (func (export "deep") (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (call $$dummy) (i32.const 150) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + ) + + (func (export "as-select-first") (result i32) + (select (loop (result i32) (i32.const 1)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-select-mid") (result i32) + (select (i32.const 2) (loop (result i32) (i32.const 1)) (i32.const 3)) + ) + (func (export "as-select-last") (result i32) + (select (i32.const 2) (i32.const 3) (loop (result i32) (i32.const 1))) + ) + + (func (export "as-if-condition") + (loop (result i32) (i32.const 1)) (if (then (call $$dummy))) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) (then (loop (result i32) (i32.const 1))) (else (i32.const 2))) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 1) (then (i32.const 2)) (else (loop (result i32) (i32.const 1)))) + ) + + (func (export "as-br_if-first") (result i32) + (block (result i32) (br_if 0 (loop (result i32) (i32.const 1)) (i32.const 2))) + ) + (func (export "as-br_if-last") (result i32) + (block (result i32) (br_if 0 (i32.const 2) (loop (result i32) (i32.const 1)))) + ) + + (func (export "as-br_table-first") (result i32) + (block (result i32) (loop (result i32) (i32.const 1)) (i32.const 2) (br_table 0 0)) + ) + (func (export "as-br_table-last") (result i32) + (block (result i32) (i32.const 2) (loop (result i32) (i32.const 1)) (br_table 0 0)) + ) + + (func $$func (param i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (call_indirect (type $$check) + (loop (result i32) (i32.const 1)) (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 2) (loop (result i32) (i32.const 1)) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (call_indirect (type $$check) + (i32.const 1) (i32.const 2) (loop (result i32) (i32.const 0)) + ) + ) + ) + + (func (export "as-store-first") + (loop (result i32) (i32.const 1)) (i32.const 1) (i32.store) + ) + (func (export "as-store-last") + (i32.const 10) (loop (result i32) (i32.const 1)) (i32.store) + ) + + (func (export "as-memory.grow-value") (result i32) + (memory.grow (loop (result i32) (i32.const 1))) + ) + + (func $$f (param i32) (result i32) (local.get 0)) + + (func (export "as-call-value") (result i32) + (call $$f (loop (result i32) (i32.const 1))) + ) + (func (export "as-return-value") (result i32) + (loop (result i32) (i32.const 1)) (return) + ) + (func (export "as-drop-operand") + (drop (loop (result i32) (i32.const 1))) + ) + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (loop (result i32) (i32.const 1)))) + ) + (func (export "as-local.set-value") (result i32) + (local i32) (local.set 0 (loop (result i32) (i32.const 1))) (local.get 0) + ) + (func (export "as-local.tee-value") (result i32) + (local i32) (local.tee 0 (loop (result i32) (i32.const 1))) + ) + (global $$a (mut i32) (i32.const 0)) + (func (export "as-global.set-value") (result i32) + (global.set $$a (loop (result i32) (i32.const 1))) + (global.get $$a) + ) + (func (export "as-load-operand") (result i32) + (i32.load (loop (result i32) (i32.const 1))) + ) + + (func (export "as-unary-operand") (result i32) + (i32.ctz (loop (result i32) (call $$dummy) (i32.const 13))) + ) + (func (export "as-binary-operand") (result i32) + (i32.mul + (loop (result i32) (call $$dummy) (i32.const 3)) + (loop (result i32) (call $$dummy) (i32.const 4)) + ) + ) + (func (export "as-test-operand") (result i32) + (i32.eqz (loop (result i32) (call $$dummy) (i32.const 13))) + ) + (func (export "as-compare-operand") (result i32) + (f32.gt + (loop (result f32) (call $$dummy) (f32.const 3)) + (loop (result f32) (call $$dummy) (f32.const 3)) + ) + ) + (func (export "as-binary-operands") (result i32) + (i32.mul + (loop (result i32 i32) + (call $$dummy) (i32.const 3) (call $$dummy) (i32.const 4) + ) + ) + ) + (func (export "as-compare-operands") (result i32) + (f32.gt + (loop (result f32 f32) + (call $$dummy) (f32.const 3) (call $$dummy) (f32.const 3) + ) + ) + ) + (func (export "as-mixed-operands") (result i32) + (loop (result i32 i32) + (call $$dummy) (i32.const 3) (call $$dummy) (i32.const 4) + ) + (i32.const 5) + (i32.add) + (i32.mul) + ) + + (func (export "break-bare") (result i32) + (block (loop (br 1) (br 0) (unreachable))) + (block (loop (br_if 1 (i32.const 1)) (unreachable))) + (block (loop (br_table 1 (i32.const 0)) (unreachable))) + (block (loop (br_table 1 1 1 (i32.const 1)) (unreachable))) + (i32.const 19) + ) + (func (export "break-value") (result i32) + (block (result i32) + (i32.const 0) + (loop (param i32) + (block (br 2 (i32.const 18))) + (br 0 (i32.const 20)) + ) + (i32.const 19) + ) + ) + (func (export "break-multi-value") (result i32 i32 i64) + (block (result i32 i32 i64) + (i32.const 0) (i32.const 0) (i64.const 0) + (loop (param i32 i32 i64) + (block (br 2 (i32.const 18) (i32.const -18) (i64.const 18))) + (br 0 (i32.const 20) (i32.const -20) (i64.const 20)) + ) + (i32.const 19) (i32.const -19) (i64.const 19) + ) + ) + (func (export "break-repeated") (result i32) + (block (result i32) + (loop (result i32) + (br 1 (i32.const 18)) + (br 1 (i32.const 19)) + (drop (br_if 1 (i32.const 20) (i32.const 0))) + (drop (br_if 1 (i32.const 20) (i32.const 1))) + (br 1 (i32.const 21)) + (br_table 1 (i32.const 22) (i32.const 0)) + (br_table 1 1 1 (i32.const 23) (i32.const 1)) + (i32.const 21) + ) + ) + ) + (func (export "break-inner") (result i32) + (local i32) + (local.set 0 (i32.const 0)) + (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (block (result i32) (br 2 (i32.const 0x1))))))) + (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (loop (result i32) (br 2 (i32.const 0x2))))))) + (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (block (result i32) (loop (result i32) (br 1 (i32.const 0x4)))))))) + (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (i32.ctz (br 1 (i32.const 0x8))))))) + (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (i32.ctz (loop (result i32) (br 2 (i32.const 0x10)))))))) + (local.get 0) + ) + (func (export "cont-inner") (result i32) + (local i32) + (local.set 0 (i32.const 0)) + (local.set 0 (i32.add (local.get 0) (loop (result i32) (loop (result i32) (br 1))))) + (local.set 0 (i32.add (local.get 0) (loop (result i32) (i32.ctz (br 0))))) + (local.set 0 (i32.add (local.get 0) (loop (result i32) (i32.ctz (loop (result i32) (br 1)))))) + (local.get 0) + ) + + (func (export "param") (result i32) + (i32.const 1) + (loop (param i32) (result i32) + (i32.const 2) + (i32.add) + ) + ) + (func (export "params") (result i32) + (i32.const 1) + (i32.const 2) + (loop (param i32 i32) (result i32) + (i32.add) + ) + ) + (func (export "params-id") (result i32) + (i32.const 1) + (i32.const 2) + (loop (param i32 i32) (result i32 i32)) + (i32.add) + ) + (func (export "param-break") (result i32) + (local $$x i32) + (i32.const 1) + (loop (param i32) (result i32) + (i32.const 4) + (i32.add) + (local.tee $$x) + (local.get $$x) + (i32.const 10) + (i32.lt_u) + (br_if 0) + ) + ) + (func (export "params-break") (result i32) + (local $$x i32) + (i32.const 1) + (i32.const 2) + (loop (param i32 i32) (result i32) + (i32.add) + (local.tee $$x) + (i32.const 3) + (local.get $$x) + (i32.const 10) + (i32.lt_u) + (br_if 0) + (drop) + ) + ) + (func (export "params-id-break") (result i32) + (local $$x i32) + (local.set $$x (i32.const 0)) + (i32.const 1) + (i32.const 2) + (loop (param i32 i32) (result i32 i32) + (local.set $$x (i32.add (local.get $$x) (i32.const 1))) + (br_if 0 (i32.lt_u (local.get $$x) (i32.const 10))) + ) + (i32.add) + ) + + (func $$fx (export "effects") (result i32) + (local i32) + (block + (loop + (local.set 0 (i32.const 1)) + (local.set 0 (i32.mul (local.get 0) (i32.const 3))) + (local.set 0 (i32.sub (local.get 0) (i32.const 5))) + (local.set 0 (i32.mul (local.get 0) (i32.const 7))) + (br 1) + (local.set 0 (i32.mul (local.get 0) (i32.const 100))) + ) + ) + (i32.eq (local.get 0) (i32.const -14)) + ) + + (func (export "while") (param i64) (result i64) + (local i64) + (local.set 1 (i64.const 1)) + (block + (loop + (br_if 1 (i64.eqz (local.get 0))) + (local.set 1 (i64.mul (local.get 0) (local.get 1))) + (local.set 0 (i64.sub (local.get 0) (i64.const 1))) + (br 0) + ) + ) + (local.get 1) + ) + + (func (export "for") (param i64) (result i64) + (local i64 i64) + (local.set 1 (i64.const 1)) + (local.set 2 (i64.const 2)) + (block + (loop + (br_if 1 (i64.gt_u (local.get 2) (local.get 0))) + (local.set 1 (i64.mul (local.get 1) (local.get 2))) + (local.set 2 (i64.add (local.get 2) (i64.const 1))) + (br 0) + ) + ) + (local.get 1) + ) + + (func (export "nesting") (param f32 f32) (result f32) + (local f32 f32) + (block + (loop + (br_if 1 (f32.eq (local.get 0) (f32.const 0))) + (local.set 2 (local.get 1)) + (block + (loop + (br_if 1 (f32.eq (local.get 2) (f32.const 0))) + (br_if 3 (f32.lt (local.get 2) (f32.const 0))) + (local.set 3 (f32.add (local.get 3) (local.get 2))) + (local.set 2 (f32.sub (local.get 2) (f32.const 2))) + (br 0) + ) + ) + (local.set 3 (f32.div (local.get 3) (local.get 0))) + (local.set 0 (f32.sub (local.get 0) (f32.const 1))) + (br 0) + ) + ) + (local.get 3) + ) + + (type $$block-sig-1 (func)) + (type $$block-sig-2 (func (result i32))) + (type $$block-sig-3 (func (param $$x i32))) + (type $$block-sig-4 (func (param i32 f64 i32) (result i32 f64 i32))) + + (func (export "type-use") + (loop (type $$block-sig-1)) + (loop (type $$block-sig-2) (i32.const 0)) + (loop (type $$block-sig-3) (drop)) + (i32.const 0) (f64.const 0) (i32.const 0) + (loop (type $$block-sig-4)) + (drop) (drop) (drop) + (loop (type $$block-sig-2) (result i32) (i32.const 0)) + (loop (type $$block-sig-3) (param i32) (drop)) + (i32.const 0) (f64.const 0) (i32.const 0) + (loop (type $$block-sig-4) + (param i32) (param f64 i32) (result i32 f64) (result i32) + ) + (drop) (drop) (drop) + ) +)`); + +// ./test/core/loop.wast:430 +assert_return(() => invoke($0, `empty`, []), []); + +// ./test/core/loop.wast:431 +assert_return(() => invoke($0, `singular`, []), [value("i32", 7)]); + +// ./test/core/loop.wast:432 +assert_return(() => invoke($0, `multi`, []), [value("i32", 8)]); + +// ./test/core/loop.wast:433 +assert_return(() => invoke($0, `nested`, []), [value("i32", 9)]); + +// ./test/core/loop.wast:434 +assert_return(() => invoke($0, `deep`, []), [value("i32", 150)]); + +// ./test/core/loop.wast:436 +assert_return(() => invoke($0, `as-select-first`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:437 +assert_return(() => invoke($0, `as-select-mid`, []), [value("i32", 2)]); + +// ./test/core/loop.wast:438 +assert_return(() => invoke($0, `as-select-last`, []), [value("i32", 2)]); + +// ./test/core/loop.wast:440 +assert_return(() => invoke($0, `as-if-condition`, []), []); + +// ./test/core/loop.wast:441 +assert_return(() => invoke($0, `as-if-then`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:442 +assert_return(() => invoke($0, `as-if-else`, []), [value("i32", 2)]); + +// ./test/core/loop.wast:444 +assert_return(() => invoke($0, `as-br_if-first`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:445 +assert_return(() => invoke($0, `as-br_if-last`, []), [value("i32", 2)]); + +// ./test/core/loop.wast:447 +assert_return(() => invoke($0, `as-br_table-first`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:448 +assert_return(() => invoke($0, `as-br_table-last`, []), [value("i32", 2)]); + +// ./test/core/loop.wast:450 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:451 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 2)]); + +// ./test/core/loop.wast:452 +assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:454 +assert_return(() => invoke($0, `as-store-first`, []), []); + +// ./test/core/loop.wast:455 +assert_return(() => invoke($0, `as-store-last`, []), []); + +// ./test/core/loop.wast:457 +assert_return(() => invoke($0, `as-memory.grow-value`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:458 +assert_return(() => invoke($0, `as-call-value`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:459 +assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:460 +assert_return(() => invoke($0, `as-drop-operand`, []), []); + +// ./test/core/loop.wast:461 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:462 +assert_return(() => invoke($0, `as-local.set-value`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:463 +assert_return(() => invoke($0, `as-local.tee-value`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:464 +assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:465 +assert_return(() => invoke($0, `as-load-operand`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:467 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("i32", 0)]); + +// ./test/core/loop.wast:468 +assert_return(() => invoke($0, `as-binary-operand`, []), [value("i32", 12)]); + +// ./test/core/loop.wast:469 +assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 0)]); + +// ./test/core/loop.wast:470 +assert_return(() => invoke($0, `as-compare-operand`, []), [value("i32", 0)]); + +// ./test/core/loop.wast:471 +assert_return(() => invoke($0, `as-binary-operands`, []), [value("i32", 12)]); + +// ./test/core/loop.wast:472 +assert_return(() => invoke($0, `as-compare-operands`, []), [value("i32", 0)]); + +// ./test/core/loop.wast:473 +assert_return(() => invoke($0, `as-mixed-operands`, []), [value("i32", 27)]); + +// ./test/core/loop.wast:475 +assert_return(() => invoke($0, `break-bare`, []), [value("i32", 19)]); + +// ./test/core/loop.wast:476 +assert_return(() => invoke($0, `break-value`, []), [value("i32", 18)]); + +// ./test/core/loop.wast:477 +assert_return( + () => invoke($0, `break-multi-value`, []), + [value("i32", 18), value("i32", -18), value("i64", 18n)], +); + +// ./test/core/loop.wast:480 +assert_return(() => invoke($0, `break-repeated`, []), [value("i32", 18)]); + +// ./test/core/loop.wast:481 +assert_return(() => invoke($0, `break-inner`, []), [value("i32", 31)]); + +// ./test/core/loop.wast:483 +assert_return(() => invoke($0, `param`, []), [value("i32", 3)]); + +// ./test/core/loop.wast:484 +assert_return(() => invoke($0, `params`, []), [value("i32", 3)]); + +// ./test/core/loop.wast:485 +assert_return(() => invoke($0, `params-id`, []), [value("i32", 3)]); + +// ./test/core/loop.wast:486 +assert_return(() => invoke($0, `param-break`, []), [value("i32", 13)]); + +// ./test/core/loop.wast:487 +assert_return(() => invoke($0, `params-break`, []), [value("i32", 12)]); + +// ./test/core/loop.wast:488 +assert_return(() => invoke($0, `params-id-break`, []), [value("i32", 3)]); + +// ./test/core/loop.wast:490 +assert_return(() => invoke($0, `effects`, []), [value("i32", 1)]); + +// ./test/core/loop.wast:492 +assert_return(() => invoke($0, `while`, [0n]), [value("i64", 1n)]); + +// ./test/core/loop.wast:493 +assert_return(() => invoke($0, `while`, [1n]), [value("i64", 1n)]); + +// ./test/core/loop.wast:494 +assert_return(() => invoke($0, `while`, [2n]), [value("i64", 2n)]); + +// ./test/core/loop.wast:495 +assert_return(() => invoke($0, `while`, [3n]), [value("i64", 6n)]); + +// ./test/core/loop.wast:496 +assert_return(() => invoke($0, `while`, [5n]), [value("i64", 120n)]); + +// ./test/core/loop.wast:497 +assert_return(() => invoke($0, `while`, [20n]), [value("i64", 2432902008176640000n)]); + +// ./test/core/loop.wast:499 +assert_return(() => invoke($0, `for`, [0n]), [value("i64", 1n)]); + +// ./test/core/loop.wast:500 +assert_return(() => invoke($0, `for`, [1n]), [value("i64", 1n)]); + +// ./test/core/loop.wast:501 +assert_return(() => invoke($0, `for`, [2n]), [value("i64", 2n)]); + +// ./test/core/loop.wast:502 +assert_return(() => invoke($0, `for`, [3n]), [value("i64", 6n)]); + +// ./test/core/loop.wast:503 +assert_return(() => invoke($0, `for`, [5n]), [value("i64", 120n)]); + +// ./test/core/loop.wast:504 +assert_return(() => invoke($0, `for`, [20n]), [value("i64", 2432902008176640000n)]); + +// ./test/core/loop.wast:506 +assert_return(() => invoke($0, `nesting`, [value("f32", 0), value("f32", 7)]), [value("f32", 0)]); + +// ./test/core/loop.wast:507 +assert_return(() => invoke($0, `nesting`, [value("f32", 7), value("f32", 0)]), [value("f32", 0)]); + +// ./test/core/loop.wast:508 +assert_return(() => invoke($0, `nesting`, [value("f32", 1), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/loop.wast:509 +assert_return(() => invoke($0, `nesting`, [value("f32", 1), value("f32", 2)]), [value("f32", 2)]); + +// ./test/core/loop.wast:510 +assert_return(() => invoke($0, `nesting`, [value("f32", 1), value("f32", 3)]), [value("f32", 4)]); + +// ./test/core/loop.wast:511 +assert_return(() => invoke($0, `nesting`, [value("f32", 1), value("f32", 4)]), [value("f32", 6)]); + +// ./test/core/loop.wast:512 +assert_return(() => invoke($0, `nesting`, [value("f32", 1), value("f32", 100)]), [value("f32", 2550)]); + +// ./test/core/loop.wast:513 +assert_return(() => invoke($0, `nesting`, [value("f32", 1), value("f32", 101)]), [value("f32", 2601)]); + +// ./test/core/loop.wast:514 +assert_return(() => invoke($0, `nesting`, [value("f32", 2), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/loop.wast:515 +assert_return(() => invoke($0, `nesting`, [value("f32", 3), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/loop.wast:516 +assert_return(() => invoke($0, `nesting`, [value("f32", 10), value("f32", 1)]), [value("f32", 1)]); + +// ./test/core/loop.wast:517 +assert_return(() => invoke($0, `nesting`, [value("f32", 2), value("f32", 2)]), [value("f32", 3)]); + +// ./test/core/loop.wast:518 +assert_return(() => invoke($0, `nesting`, [value("f32", 2), value("f32", 3)]), [value("f32", 4)]); + +// ./test/core/loop.wast:519 +assert_return( + () => invoke($0, `nesting`, [value("f32", 7), value("f32", 4)]), + [value("f32", 10.309524)], +); + +// ./test/core/loop.wast:520 +assert_return( + () => invoke($0, `nesting`, [value("f32", 7), value("f32", 100)]), + [value("f32", 4381.548)], +); + +// ./test/core/loop.wast:521 +assert_return(() => invoke($0, `nesting`, [value("f32", 7), value("f32", 101)]), [value("f32", 2601)]); + +// ./test/core/loop.wast:523 +assert_return(() => invoke($0, `type-use`, []), []); + +// ./test/core/loop.wast:525 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (loop (type $$sig) (result i32) (param i32))) `), + `unexpected token`, +); + +// ./test/core/loop.wast:532 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (loop (param i32) (type $$sig) (result i32))) `), + `unexpected token`, +); + +// ./test/core/loop.wast:539 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (loop (param i32) (result i32) (type $$sig))) `), + `unexpected token`, +); + +// ./test/core/loop.wast:546 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (loop (result i32) (type $$sig) (param i32))) `), + `unexpected token`, +); + +// ./test/core/loop.wast:553 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (loop (result i32) (param i32) (type $$sig))) `), + `unexpected token`, +); + +// ./test/core/loop.wast:560 +assert_malformed( + () => instantiate(`(func (i32.const 0) (loop (result i32) (param i32))) `), + `unexpected token`, +); + +// ./test/core/loop.wast:567 +assert_malformed( + () => instantiate(`(func (i32.const 0) (loop (param $$x i32) (drop))) `), + `unexpected token`, +); + +// ./test/core/loop.wast:571 +assert_malformed( + () => instantiate(`(type $$sig (func)) (func (loop (type $$sig) (result i32) (i32.const 0)) (unreachable)) `), + `inline function type`, +); + +// ./test/core/loop.wast:578 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (loop (type $$sig) (result i32) (i32.const 0)) (unreachable)) `), + `inline function type`, +); + +// ./test/core/loop.wast:585 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (func (i32.const 0) (loop (type $$sig) (param i32) (drop)) (unreachable)) `), + `inline function type`, +); + +// ./test/core/loop.wast:592 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32 i32) (result i32))) (func (i32.const 0) (loop (type $$sig) (param i32) (result i32)) (unreachable)) `), + `inline function type`, +); + +// ./test/core/loop.wast:600 +assert_invalid( + () => instantiate(`(module + (type $$sig (func)) + (func (loop (type $$sig) (i32.const 0))) + )`), + `type mismatch`, +); + +// ./test/core/loop.wast:608 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i32 (result i32) (loop)))`), + `type mismatch`, +); + +// ./test/core/loop.wast:612 +assert_invalid( + () => instantiate(`(module (func $$type-empty-i64 (result i64) (loop)))`), + `type mismatch`, +); + +// ./test/core/loop.wast:616 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f32 (result f32) (loop)))`), + `type mismatch`, +); + +// ./test/core/loop.wast:620 +assert_invalid( + () => instantiate(`(module (func $$type-empty-f64 (result f64) (loop)))`), + `type mismatch`, +); + +// ./test/core/loop.wast:625 +assert_invalid( + () => instantiate(`(module (func $$type-value-num-vs-void + (loop (i32.const 1)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:631 +assert_invalid( + () => instantiate(`(module (func $$type-value-nums-vs-void + (loop (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:637 +assert_invalid( + () => instantiate(`(module (func $$type-value-empty-vs-num (result i32) + (loop (result i32)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:643 +assert_invalid( + () => instantiate(`(module (func $$type-value-empty-vs-nums (result i32 i32) + (loop (result i32 i32)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:649 +assert_invalid( + () => instantiate(`(module (func $$type-value-void-vs-num (result i32) + (loop (result i32) (nop)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:655 +assert_invalid( + () => instantiate(`(module (func $$type-value-void-vs-nums (result i32 i32) + (loop (result i32 i32) (nop)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:661 +assert_invalid( + () => instantiate(`(module (func $$type-value-num-vs-num (result i32) + (loop (result i32) (f32.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:667 +assert_invalid( + () => instantiate(`(module (func $$type-value-num-vs-nums (result i32 i32) + (loop (result i32 i32) (i32.const 0)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:673 +assert_invalid( + () => instantiate(`(module (func $$type-value-partial-vs-nums (result i32 i32) + (i32.const 1) (loop (result i32 i32) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:679 +assert_invalid( + () => instantiate(`(module (func $$type-value-nums-vs-num (result i32) + (loop (result i32) (i32.const 1) (i32.const 2)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:685 +assert_invalid( + () => instantiate(`(module (func $$type-value-unreached-select (result i32) + (loop (result i64) (select (unreachable) (unreachable) (unreachable))) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:692 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-in-block + (i32.const 0) + (block (loop (result i32)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/loop.wast:701 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-in-loop + (i32.const 0) + (loop (loop (result i32)) (drop)) + ) + )`), + `type mismatch`, +); + +// ./test/core/loop.wast:710 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (loop (result i32)) (drop))) + ) + )`), + `type mismatch`, +); + +// ./test/core/loop.wast:720 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-num + (loop (param i32) (drop)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:726 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-nums + (loop (param i32 f64) (drop) (drop)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:732 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num + (f32.const 0) (loop (param i32) (drop)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:738 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-nums + (f32.const 0) (loop (param f32 i32) (drop) (drop)) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:744 +assert_invalid( + () => instantiate(`(module (func $$type-param-nested-void-vs-num + (block (loop (param i32) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:750 +assert_invalid( + () => instantiate(`(module (func $$type-param-void-vs-nums + (block (loop (param i32 f64) (drop) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:756 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-num + (block (f32.const 0) (loop (param i32) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:762 +assert_invalid( + () => instantiate(`(module (func $$type-param-num-vs-nums + (block (f32.const 0) (loop (param f32 i32) (drop) (drop))) + ))`), + `type mismatch`, +); + +// ./test/core/loop.wast:769 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) loop (param $$x i32) end) `), + `unexpected token`, +); + +// ./test/core/loop.wast:773 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) (loop (param $$x i32))) `), + `unexpected token`, +); + +// ./test/core/loop.wast:778 +assert_malformed(() => instantiate(`(func loop end $$l) `), `mismatching label`); + +// ./test/core/loop.wast:782 +assert_malformed(() => instantiate(`(func loop $$a end $$l) `), `mismatching label`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/memory.wast.js b/js/src/jit-test/tests/wasm/spec/spec/memory.wast.js new file mode 100644 index 0000000000..831bb26d69 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/memory.wast.js @@ -0,0 +1,399 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory.wast + +// ./test/core/memory.wast:3 +let $0 = instantiate(`(module (memory 0))`); + +// ./test/core/memory.wast:4 +let $1 = instantiate(`(module (memory 1))`); + +// ./test/core/memory.wast:5 +let $2 = instantiate(`(module (memory 0 0))`); + +// ./test/core/memory.wast:6 +let $3 = instantiate(`(module (memory 0 1))`); + +// ./test/core/memory.wast:7 +let $4 = instantiate(`(module (memory 1 256))`); + +// ./test/core/memory.wast:8 +let $5 = instantiate(`(module (memory 0 65536))`); + +// ./test/core/memory.wast:10 +assert_invalid(() => instantiate(`(module (memory 0) (memory 0))`), `multiple memories`); + +// ./test/core/memory.wast:11 +assert_invalid( + () => instantiate(`(module (memory (import "spectest" "memory") 0) (memory 0))`), + `multiple memories`, +); + +// ./test/core/memory.wast:13 +let $6 = instantiate(`(module (memory (data)) (func (export "memsize") (result i32) (memory.size)))`); + +// ./test/core/memory.wast:14 +assert_return(() => invoke($6, `memsize`, []), [value("i32", 0)]); + +// ./test/core/memory.wast:15 +let $7 = instantiate(`(module (memory (data "")) (func (export "memsize") (result i32) (memory.size)))`); + +// ./test/core/memory.wast:16 +assert_return(() => invoke($7, `memsize`, []), [value("i32", 0)]); + +// ./test/core/memory.wast:17 +let $8 = instantiate(`(module (memory (data "x")) (func (export "memsize") (result i32) (memory.size)))`); + +// ./test/core/memory.wast:18 +assert_return(() => invoke($8, `memsize`, []), [value("i32", 1)]); + +// ./test/core/memory.wast:20 +assert_invalid(() => instantiate(`(module (data (i32.const 0)))`), `unknown memory`); + +// ./test/core/memory.wast:21 +assert_invalid(() => instantiate(`(module (data (i32.const 0) ""))`), `unknown memory`); + +// ./test/core/memory.wast:22 +assert_invalid(() => instantiate(`(module (data (i32.const 0) "x"))`), `unknown memory`); + +// ./test/core/memory.wast:24 +assert_invalid( + () => instantiate(`(module (func (drop (f32.load (i32.const 0)))))`), + `unknown memory`, +); + +// ./test/core/memory.wast:28 +assert_invalid( + () => instantiate(`(module (func (f32.store (i32.const 0) (f32.const 0))))`), + `unknown memory`, +); + +// ./test/core/memory.wast:32 +assert_invalid( + () => instantiate(`(module (func (drop (i32.load8_s (i32.const 0)))))`), + `unknown memory`, +); + +// ./test/core/memory.wast:36 +assert_invalid( + () => instantiate(`(module (func (i32.store8 (i32.const 0) (i32.const 0))))`), + `unknown memory`, +); + +// ./test/core/memory.wast:40 +assert_invalid( + () => instantiate(`(module (func (drop (memory.size))))`), + `unknown memory`, +); + +// ./test/core/memory.wast:44 +assert_invalid( + () => instantiate(`(module (func (drop (memory.grow (i32.const 0)))))`), + `unknown memory`, +); + +// ./test/core/memory.wast:50 +assert_invalid( + () => instantiate(`(module (memory 1 0))`), + `size minimum must not be greater than maximum`, +); + +// ./test/core/memory.wast:54 +assert_invalid( + () => instantiate(`(module (memory 65537))`), + `memory size must be at most 65536 pages (4GiB)`, +); + +// ./test/core/memory.wast:58 +assert_invalid( + () => instantiate(`(module (memory 2147483648))`), + `memory size must be at most 65536 pages (4GiB)`, +); + +// ./test/core/memory.wast:62 +assert_invalid( + () => instantiate(`(module (memory 4294967295))`), + `memory size must be at most 65536 pages (4GiB)`, +); + +// ./test/core/memory.wast:66 +assert_invalid( + () => instantiate(`(module (memory 0 65537))`), + `memory size must be at most 65536 pages (4GiB)`, +); + +// ./test/core/memory.wast:70 +assert_invalid( + () => instantiate(`(module (memory 0 2147483648))`), + `memory size must be at most 65536 pages (4GiB)`, +); + +// ./test/core/memory.wast:74 +assert_invalid( + () => instantiate(`(module (memory 0 4294967295))`), + `memory size must be at most 65536 pages (4GiB)`, +); + +// ./test/core/memory.wast:79 +assert_malformed( + () => instantiate(`(memory 0x1_0000_0000) `), + `i32 constant out of range`, +); + +// ./test/core/memory.wast:83 +assert_malformed( + () => instantiate(`(memory 0x1_0000_0000 0x1_0000_0000) `), + `i32 constant out of range`, +); + +// ./test/core/memory.wast:87 +assert_malformed( + () => instantiate(`(memory 0 0x1_0000_0000) `), + `i32 constant out of range`, +); + +// ./test/core/memory.wast:92 +let $9 = instantiate(`(module + (memory 1) + (data (i32.const 0) "ABC\\a7D") (data (i32.const 20) "WASM") + + ;; Data section + (func (export "data") (result i32) + (i32.and + (i32.and + (i32.and + (i32.eq (i32.load8_u (i32.const 0)) (i32.const 65)) + (i32.eq (i32.load8_u (i32.const 3)) (i32.const 167)) + ) + (i32.and + (i32.eq (i32.load8_u (i32.const 6)) (i32.const 0)) + (i32.eq (i32.load8_u (i32.const 19)) (i32.const 0)) + ) + ) + (i32.and + (i32.and + (i32.eq (i32.load8_u (i32.const 20)) (i32.const 87)) + (i32.eq (i32.load8_u (i32.const 23)) (i32.const 77)) + ) + (i32.and + (i32.eq (i32.load8_u (i32.const 24)) (i32.const 0)) + (i32.eq (i32.load8_u (i32.const 1023)) (i32.const 0)) + ) + ) + ) + ) + + ;; Memory cast + (func (export "cast") (result f64) + (i64.store (i32.const 8) (i64.const -12345)) + (if + (f64.eq + (f64.load (i32.const 8)) + (f64.reinterpret_i64 (i64.const -12345)) + ) + (then (return (f64.const 0))) + ) + (i64.store align=1 (i32.const 9) (i64.const 0)) + (i32.store16 align=1 (i32.const 15) (i32.const 16453)) + (f64.load align=1 (i32.const 9)) + ) + + ;; Sign and zero extending memory loads + (func (export "i32_load8_s") (param $$i i32) (result i32) + (i32.store8 (i32.const 8) (local.get $$i)) + (i32.load8_s (i32.const 8)) + ) + (func (export "i32_load8_u") (param $$i i32) (result i32) + (i32.store8 (i32.const 8) (local.get $$i)) + (i32.load8_u (i32.const 8)) + ) + (func (export "i32_load16_s") (param $$i i32) (result i32) + (i32.store16 (i32.const 8) (local.get $$i)) + (i32.load16_s (i32.const 8)) + ) + (func (export "i32_load16_u") (param $$i i32) (result i32) + (i32.store16 (i32.const 8) (local.get $$i)) + (i32.load16_u (i32.const 8)) + ) + (func (export "i64_load8_s") (param $$i i64) (result i64) + (i64.store8 (i32.const 8) (local.get $$i)) + (i64.load8_s (i32.const 8)) + ) + (func (export "i64_load8_u") (param $$i i64) (result i64) + (i64.store8 (i32.const 8) (local.get $$i)) + (i64.load8_u (i32.const 8)) + ) + (func (export "i64_load16_s") (param $$i i64) (result i64) + (i64.store16 (i32.const 8) (local.get $$i)) + (i64.load16_s (i32.const 8)) + ) + (func (export "i64_load16_u") (param $$i i64) (result i64) + (i64.store16 (i32.const 8) (local.get $$i)) + (i64.load16_u (i32.const 8)) + ) + (func (export "i64_load32_s") (param $$i i64) (result i64) + (i64.store32 (i32.const 8) (local.get $$i)) + (i64.load32_s (i32.const 8)) + ) + (func (export "i64_load32_u") (param $$i i64) (result i64) + (i64.store32 (i32.const 8) (local.get $$i)) + (i64.load32_u (i32.const 8)) + ) +)`); + +// ./test/core/memory.wast:180 +assert_return(() => invoke($9, `data`, []), [value("i32", 1)]); + +// ./test/core/memory.wast:181 +assert_return(() => invoke($9, `cast`, []), [value("f64", 42)]); + +// ./test/core/memory.wast:183 +assert_return(() => invoke($9, `i32_load8_s`, [-1]), [value("i32", -1)]); + +// ./test/core/memory.wast:184 +assert_return(() => invoke($9, `i32_load8_u`, [-1]), [value("i32", 255)]); + +// ./test/core/memory.wast:185 +assert_return(() => invoke($9, `i32_load16_s`, [-1]), [value("i32", -1)]); + +// ./test/core/memory.wast:186 +assert_return(() => invoke($9, `i32_load16_u`, [-1]), [value("i32", 65535)]); + +// ./test/core/memory.wast:188 +assert_return(() => invoke($9, `i32_load8_s`, [100]), [value("i32", 100)]); + +// ./test/core/memory.wast:189 +assert_return(() => invoke($9, `i32_load8_u`, [200]), [value("i32", 200)]); + +// ./test/core/memory.wast:190 +assert_return(() => invoke($9, `i32_load16_s`, [20000]), [value("i32", 20000)]); + +// ./test/core/memory.wast:191 +assert_return(() => invoke($9, `i32_load16_u`, [40000]), [value("i32", 40000)]); + +// ./test/core/memory.wast:193 +assert_return(() => invoke($9, `i32_load8_s`, [-19110589]), [value("i32", 67)]); + +// ./test/core/memory.wast:194 +assert_return(() => invoke($9, `i32_load8_s`, [878104047]), [value("i32", -17)]); + +// ./test/core/memory.wast:195 +assert_return(() => invoke($9, `i32_load8_u`, [-19110589]), [value("i32", 67)]); + +// ./test/core/memory.wast:196 +assert_return(() => invoke($9, `i32_load8_u`, [878104047]), [value("i32", 239)]); + +// ./test/core/memory.wast:197 +assert_return(() => invoke($9, `i32_load16_s`, [-19110589]), [value("i32", 25923)]); + +// ./test/core/memory.wast:198 +assert_return(() => invoke($9, `i32_load16_s`, [878104047]), [value("i32", -12817)]); + +// ./test/core/memory.wast:199 +assert_return(() => invoke($9, `i32_load16_u`, [-19110589]), [value("i32", 25923)]); + +// ./test/core/memory.wast:200 +assert_return(() => invoke($9, `i32_load16_u`, [878104047]), [value("i32", 52719)]); + +// ./test/core/memory.wast:202 +assert_return(() => invoke($9, `i64_load8_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/memory.wast:203 +assert_return(() => invoke($9, `i64_load8_u`, [-1n]), [value("i64", 255n)]); + +// ./test/core/memory.wast:204 +assert_return(() => invoke($9, `i64_load16_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/memory.wast:205 +assert_return(() => invoke($9, `i64_load16_u`, [-1n]), [value("i64", 65535n)]); + +// ./test/core/memory.wast:206 +assert_return(() => invoke($9, `i64_load32_s`, [-1n]), [value("i64", -1n)]); + +// ./test/core/memory.wast:207 +assert_return(() => invoke($9, `i64_load32_u`, [-1n]), [value("i64", 4294967295n)]); + +// ./test/core/memory.wast:209 +assert_return(() => invoke($9, `i64_load8_s`, [100n]), [value("i64", 100n)]); + +// ./test/core/memory.wast:210 +assert_return(() => invoke($9, `i64_load8_u`, [200n]), [value("i64", 200n)]); + +// ./test/core/memory.wast:211 +assert_return(() => invoke($9, `i64_load16_s`, [20000n]), [value("i64", 20000n)]); + +// ./test/core/memory.wast:212 +assert_return(() => invoke($9, `i64_load16_u`, [40000n]), [value("i64", 40000n)]); + +// ./test/core/memory.wast:213 +assert_return(() => invoke($9, `i64_load32_s`, [20000n]), [value("i64", 20000n)]); + +// ./test/core/memory.wast:214 +assert_return(() => invoke($9, `i64_load32_u`, [40000n]), [value("i64", 40000n)]); + +// ./test/core/memory.wast:216 +assert_return(() => invoke($9, `i64_load8_s`, [-81985529755441853n]), [value("i64", 67n)]); + +// ./test/core/memory.wast:217 +assert_return(() => invoke($9, `i64_load8_s`, [3771275841602506223n]), [value("i64", -17n)]); + +// ./test/core/memory.wast:218 +assert_return(() => invoke($9, `i64_load8_u`, [-81985529755441853n]), [value("i64", 67n)]); + +// ./test/core/memory.wast:219 +assert_return(() => invoke($9, `i64_load8_u`, [3771275841602506223n]), [value("i64", 239n)]); + +// ./test/core/memory.wast:220 +assert_return(() => invoke($9, `i64_load16_s`, [-81985529755441853n]), [value("i64", 25923n)]); + +// ./test/core/memory.wast:221 +assert_return(() => invoke($9, `i64_load16_s`, [3771275841602506223n]), [value("i64", -12817n)]); + +// ./test/core/memory.wast:222 +assert_return(() => invoke($9, `i64_load16_u`, [-81985529755441853n]), [value("i64", 25923n)]); + +// ./test/core/memory.wast:223 +assert_return(() => invoke($9, `i64_load16_u`, [3771275841602506223n]), [value("i64", 52719n)]); + +// ./test/core/memory.wast:224 +assert_return(() => invoke($9, `i64_load32_s`, [-81985529755441853n]), [value("i64", 1446274371n)]); + +// ./test/core/memory.wast:225 +assert_return(() => invoke($9, `i64_load32_s`, [3771275841602506223n]), [value("i64", -1732588049n)]); + +// ./test/core/memory.wast:226 +assert_return(() => invoke($9, `i64_load32_u`, [-81985529755441853n]), [value("i64", 1446274371n)]); + +// ./test/core/memory.wast:227 +assert_return(() => invoke($9, `i64_load32_u`, [3771275841602506223n]), [value("i64", 2562379247n)]); + +// ./test/core/memory.wast:231 +assert_malformed( + () => instantiate(`(memory $$foo 1) (memory $$foo 1) `), + `duplicate memory`, +); + +// ./test/core/memory.wast:235 +assert_malformed( + () => instantiate(`(import "" "" (memory $$foo 1)) (memory $$foo 1) `), + `duplicate memory`, +); + +// ./test/core/memory.wast:239 +assert_malformed( + () => instantiate(`(import "" "" (memory $$foo 1)) (import "" "" (memory $$foo 1)) `), + `duplicate memory`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/memory_copy.wast.js b/js/src/jit-test/tests/wasm/spec/spec/memory_copy.wast.js new file mode 100644 index 0000000000..dbd81aacd7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/memory_copy.wast.js @@ -0,0 +1,14165 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory_copy.wast + +// ./test/core/memory_copy.wast:6 +let $0 = instantiate(`(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\\03\\01\\04\\01") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (func (export "test") + (nop)) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:15 +invoke($0, `test`, []); + +// ./test/core/memory_copy.wast:17 +assert_return(() => invoke($0, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:18 +assert_return(() => invoke($0, `load8_u`, [1]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:19 +assert_return(() => invoke($0, `load8_u`, [2]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:20 +assert_return(() => invoke($0, `load8_u`, [3]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:21 +assert_return(() => invoke($0, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:22 +assert_return(() => invoke($0, `load8_u`, [5]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:23 +assert_return(() => invoke($0, `load8_u`, [6]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:24 +assert_return(() => invoke($0, `load8_u`, [7]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:25 +assert_return(() => invoke($0, `load8_u`, [8]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:26 +assert_return(() => invoke($0, `load8_u`, [9]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:27 +assert_return(() => invoke($0, `load8_u`, [10]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:28 +assert_return(() => invoke($0, `load8_u`, [11]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:29 +assert_return(() => invoke($0, `load8_u`, [12]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:30 +assert_return(() => invoke($0, `load8_u`, [13]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:31 +assert_return(() => invoke($0, `load8_u`, [14]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:32 +assert_return(() => invoke($0, `load8_u`, [15]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:33 +assert_return(() => invoke($0, `load8_u`, [16]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:34 +assert_return(() => invoke($0, `load8_u`, [17]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:35 +assert_return(() => invoke($0, `load8_u`, [18]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:36 +assert_return(() => invoke($0, `load8_u`, [19]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:37 +assert_return(() => invoke($0, `load8_u`, [20]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:38 +assert_return(() => invoke($0, `load8_u`, [21]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:39 +assert_return(() => invoke($0, `load8_u`, [22]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:40 +assert_return(() => invoke($0, `load8_u`, [23]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:41 +assert_return(() => invoke($0, `load8_u`, [24]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:42 +assert_return(() => invoke($0, `load8_u`, [25]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:43 +assert_return(() => invoke($0, `load8_u`, [26]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:44 +assert_return(() => invoke($0, `load8_u`, [27]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:45 +assert_return(() => invoke($0, `load8_u`, [28]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:46 +assert_return(() => invoke($0, `load8_u`, [29]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:48 +let $1 = instantiate(`(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\\03\\01\\04\\01") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (func (export "test") + (memory.copy (i32.const 13) (i32.const 2) (i32.const 3))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:57 +invoke($1, `test`, []); + +// ./test/core/memory_copy.wast:59 +assert_return(() => invoke($1, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:60 +assert_return(() => invoke($1, `load8_u`, [1]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:61 +assert_return(() => invoke($1, `load8_u`, [2]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:62 +assert_return(() => invoke($1, `load8_u`, [3]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:63 +assert_return(() => invoke($1, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:64 +assert_return(() => invoke($1, `load8_u`, [5]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:65 +assert_return(() => invoke($1, `load8_u`, [6]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:66 +assert_return(() => invoke($1, `load8_u`, [7]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:67 +assert_return(() => invoke($1, `load8_u`, [8]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:68 +assert_return(() => invoke($1, `load8_u`, [9]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:69 +assert_return(() => invoke($1, `load8_u`, [10]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:70 +assert_return(() => invoke($1, `load8_u`, [11]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:71 +assert_return(() => invoke($1, `load8_u`, [12]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:72 +assert_return(() => invoke($1, `load8_u`, [13]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:73 +assert_return(() => invoke($1, `load8_u`, [14]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:74 +assert_return(() => invoke($1, `load8_u`, [15]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:75 +assert_return(() => invoke($1, `load8_u`, [16]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:76 +assert_return(() => invoke($1, `load8_u`, [17]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:77 +assert_return(() => invoke($1, `load8_u`, [18]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:78 +assert_return(() => invoke($1, `load8_u`, [19]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:79 +assert_return(() => invoke($1, `load8_u`, [20]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:80 +assert_return(() => invoke($1, `load8_u`, [21]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:81 +assert_return(() => invoke($1, `load8_u`, [22]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:82 +assert_return(() => invoke($1, `load8_u`, [23]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:83 +assert_return(() => invoke($1, `load8_u`, [24]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:84 +assert_return(() => invoke($1, `load8_u`, [25]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:85 +assert_return(() => invoke($1, `load8_u`, [26]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:86 +assert_return(() => invoke($1, `load8_u`, [27]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:87 +assert_return(() => invoke($1, `load8_u`, [28]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:88 +assert_return(() => invoke($1, `load8_u`, [29]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:90 +let $2 = instantiate(`(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\\03\\01\\04\\01") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (func (export "test") + (memory.copy (i32.const 25) (i32.const 15) (i32.const 2))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:99 +invoke($2, `test`, []); + +// ./test/core/memory_copy.wast:101 +assert_return(() => invoke($2, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:102 +assert_return(() => invoke($2, `load8_u`, [1]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:103 +assert_return(() => invoke($2, `load8_u`, [2]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:104 +assert_return(() => invoke($2, `load8_u`, [3]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:105 +assert_return(() => invoke($2, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:106 +assert_return(() => invoke($2, `load8_u`, [5]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:107 +assert_return(() => invoke($2, `load8_u`, [6]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:108 +assert_return(() => invoke($2, `load8_u`, [7]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:109 +assert_return(() => invoke($2, `load8_u`, [8]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:110 +assert_return(() => invoke($2, `load8_u`, [9]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:111 +assert_return(() => invoke($2, `load8_u`, [10]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:112 +assert_return(() => invoke($2, `load8_u`, [11]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:113 +assert_return(() => invoke($2, `load8_u`, [12]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:114 +assert_return(() => invoke($2, `load8_u`, [13]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:115 +assert_return(() => invoke($2, `load8_u`, [14]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:116 +assert_return(() => invoke($2, `load8_u`, [15]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:117 +assert_return(() => invoke($2, `load8_u`, [16]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:118 +assert_return(() => invoke($2, `load8_u`, [17]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:119 +assert_return(() => invoke($2, `load8_u`, [18]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:120 +assert_return(() => invoke($2, `load8_u`, [19]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:121 +assert_return(() => invoke($2, `load8_u`, [20]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:122 +assert_return(() => invoke($2, `load8_u`, [21]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:123 +assert_return(() => invoke($2, `load8_u`, [22]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:124 +assert_return(() => invoke($2, `load8_u`, [23]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:125 +assert_return(() => invoke($2, `load8_u`, [24]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:126 +assert_return(() => invoke($2, `load8_u`, [25]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:127 +assert_return(() => invoke($2, `load8_u`, [26]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:128 +assert_return(() => invoke($2, `load8_u`, [27]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:129 +assert_return(() => invoke($2, `load8_u`, [28]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:130 +assert_return(() => invoke($2, `load8_u`, [29]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:132 +let $3 = instantiate(`(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\\03\\01\\04\\01") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (func (export "test") + (memory.copy (i32.const 13) (i32.const 25) (i32.const 3))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:141 +invoke($3, `test`, []); + +// ./test/core/memory_copy.wast:143 +assert_return(() => invoke($3, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:144 +assert_return(() => invoke($3, `load8_u`, [1]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:145 +assert_return(() => invoke($3, `load8_u`, [2]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:146 +assert_return(() => invoke($3, `load8_u`, [3]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:147 +assert_return(() => invoke($3, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:148 +assert_return(() => invoke($3, `load8_u`, [5]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:149 +assert_return(() => invoke($3, `load8_u`, [6]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:150 +assert_return(() => invoke($3, `load8_u`, [7]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:151 +assert_return(() => invoke($3, `load8_u`, [8]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:152 +assert_return(() => invoke($3, `load8_u`, [9]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:153 +assert_return(() => invoke($3, `load8_u`, [10]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:154 +assert_return(() => invoke($3, `load8_u`, [11]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:155 +assert_return(() => invoke($3, `load8_u`, [12]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:156 +assert_return(() => invoke($3, `load8_u`, [13]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:157 +assert_return(() => invoke($3, `load8_u`, [14]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:158 +assert_return(() => invoke($3, `load8_u`, [15]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:159 +assert_return(() => invoke($3, `load8_u`, [16]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:160 +assert_return(() => invoke($3, `load8_u`, [17]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:161 +assert_return(() => invoke($3, `load8_u`, [18]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:162 +assert_return(() => invoke($3, `load8_u`, [19]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:163 +assert_return(() => invoke($3, `load8_u`, [20]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:164 +assert_return(() => invoke($3, `load8_u`, [21]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:165 +assert_return(() => invoke($3, `load8_u`, [22]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:166 +assert_return(() => invoke($3, `load8_u`, [23]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:167 +assert_return(() => invoke($3, `load8_u`, [24]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:168 +assert_return(() => invoke($3, `load8_u`, [25]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:169 +assert_return(() => invoke($3, `load8_u`, [26]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:170 +assert_return(() => invoke($3, `load8_u`, [27]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:171 +assert_return(() => invoke($3, `load8_u`, [28]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:172 +assert_return(() => invoke($3, `load8_u`, [29]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:174 +let $4 = instantiate(`(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\\03\\01\\04\\01") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (func (export "test") + (memory.copy (i32.const 20) (i32.const 22) (i32.const 4))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:183 +invoke($4, `test`, []); + +// ./test/core/memory_copy.wast:185 +assert_return(() => invoke($4, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:186 +assert_return(() => invoke($4, `load8_u`, [1]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:187 +assert_return(() => invoke($4, `load8_u`, [2]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:188 +assert_return(() => invoke($4, `load8_u`, [3]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:189 +assert_return(() => invoke($4, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:190 +assert_return(() => invoke($4, `load8_u`, [5]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:191 +assert_return(() => invoke($4, `load8_u`, [6]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:192 +assert_return(() => invoke($4, `load8_u`, [7]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:193 +assert_return(() => invoke($4, `load8_u`, [8]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:194 +assert_return(() => invoke($4, `load8_u`, [9]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:195 +assert_return(() => invoke($4, `load8_u`, [10]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:196 +assert_return(() => invoke($4, `load8_u`, [11]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:197 +assert_return(() => invoke($4, `load8_u`, [12]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:198 +assert_return(() => invoke($4, `load8_u`, [13]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:199 +assert_return(() => invoke($4, `load8_u`, [14]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:200 +assert_return(() => invoke($4, `load8_u`, [15]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:201 +assert_return(() => invoke($4, `load8_u`, [16]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:202 +assert_return(() => invoke($4, `load8_u`, [17]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:203 +assert_return(() => invoke($4, `load8_u`, [18]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:204 +assert_return(() => invoke($4, `load8_u`, [19]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:205 +assert_return(() => invoke($4, `load8_u`, [20]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:206 +assert_return(() => invoke($4, `load8_u`, [21]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:207 +assert_return(() => invoke($4, `load8_u`, [22]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:208 +assert_return(() => invoke($4, `load8_u`, [23]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:209 +assert_return(() => invoke($4, `load8_u`, [24]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:210 +assert_return(() => invoke($4, `load8_u`, [25]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:211 +assert_return(() => invoke($4, `load8_u`, [26]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:212 +assert_return(() => invoke($4, `load8_u`, [27]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:213 +assert_return(() => invoke($4, `load8_u`, [28]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:214 +assert_return(() => invoke($4, `load8_u`, [29]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:216 +let $5 = instantiate(`(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\\03\\01\\04\\01") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (func (export "test") + (memory.copy (i32.const 25) (i32.const 1) (i32.const 3))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:225 +invoke($5, `test`, []); + +// ./test/core/memory_copy.wast:227 +assert_return(() => invoke($5, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:228 +assert_return(() => invoke($5, `load8_u`, [1]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:229 +assert_return(() => invoke($5, `load8_u`, [2]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:230 +assert_return(() => invoke($5, `load8_u`, [3]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:231 +assert_return(() => invoke($5, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:232 +assert_return(() => invoke($5, `load8_u`, [5]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:233 +assert_return(() => invoke($5, `load8_u`, [6]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:234 +assert_return(() => invoke($5, `load8_u`, [7]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:235 +assert_return(() => invoke($5, `load8_u`, [8]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:236 +assert_return(() => invoke($5, `load8_u`, [9]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:237 +assert_return(() => invoke($5, `load8_u`, [10]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:238 +assert_return(() => invoke($5, `load8_u`, [11]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:239 +assert_return(() => invoke($5, `load8_u`, [12]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:240 +assert_return(() => invoke($5, `load8_u`, [13]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:241 +assert_return(() => invoke($5, `load8_u`, [14]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:242 +assert_return(() => invoke($5, `load8_u`, [15]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:243 +assert_return(() => invoke($5, `load8_u`, [16]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:244 +assert_return(() => invoke($5, `load8_u`, [17]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:245 +assert_return(() => invoke($5, `load8_u`, [18]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:246 +assert_return(() => invoke($5, `load8_u`, [19]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:247 +assert_return(() => invoke($5, `load8_u`, [20]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:248 +assert_return(() => invoke($5, `load8_u`, [21]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:249 +assert_return(() => invoke($5, `load8_u`, [22]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:250 +assert_return(() => invoke($5, `load8_u`, [23]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:251 +assert_return(() => invoke($5, `load8_u`, [24]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:252 +assert_return(() => invoke($5, `load8_u`, [25]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:253 +assert_return(() => invoke($5, `load8_u`, [26]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:254 +assert_return(() => invoke($5, `load8_u`, [27]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:255 +assert_return(() => invoke($5, `load8_u`, [28]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:256 +assert_return(() => invoke($5, `load8_u`, [29]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:258 +let $6 = instantiate(`(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\\03\\01\\04\\01") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (func (export "test") + (memory.copy (i32.const 10) (i32.const 12) (i32.const 7))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:267 +invoke($6, `test`, []); + +// ./test/core/memory_copy.wast:269 +assert_return(() => invoke($6, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:270 +assert_return(() => invoke($6, `load8_u`, [1]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:271 +assert_return(() => invoke($6, `load8_u`, [2]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:272 +assert_return(() => invoke($6, `load8_u`, [3]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:273 +assert_return(() => invoke($6, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:274 +assert_return(() => invoke($6, `load8_u`, [5]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:275 +assert_return(() => invoke($6, `load8_u`, [6]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:276 +assert_return(() => invoke($6, `load8_u`, [7]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:277 +assert_return(() => invoke($6, `load8_u`, [8]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:278 +assert_return(() => invoke($6, `load8_u`, [9]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:279 +assert_return(() => invoke($6, `load8_u`, [10]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:280 +assert_return(() => invoke($6, `load8_u`, [11]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:281 +assert_return(() => invoke($6, `load8_u`, [12]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:282 +assert_return(() => invoke($6, `load8_u`, [13]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:283 +assert_return(() => invoke($6, `load8_u`, [14]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:284 +assert_return(() => invoke($6, `load8_u`, [15]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:285 +assert_return(() => invoke($6, `load8_u`, [16]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:286 +assert_return(() => invoke($6, `load8_u`, [17]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:287 +assert_return(() => invoke($6, `load8_u`, [18]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:288 +assert_return(() => invoke($6, `load8_u`, [19]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:289 +assert_return(() => invoke($6, `load8_u`, [20]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:290 +assert_return(() => invoke($6, `load8_u`, [21]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:291 +assert_return(() => invoke($6, `load8_u`, [22]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:292 +assert_return(() => invoke($6, `load8_u`, [23]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:293 +assert_return(() => invoke($6, `load8_u`, [24]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:294 +assert_return(() => invoke($6, `load8_u`, [25]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:295 +assert_return(() => invoke($6, `load8_u`, [26]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:296 +assert_return(() => invoke($6, `load8_u`, [27]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:297 +assert_return(() => invoke($6, `load8_u`, [28]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:298 +assert_return(() => invoke($6, `load8_u`, [29]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:300 +let $7 = instantiate(`(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\\03\\01\\04\\01") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (func (export "test") + (memory.copy (i32.const 12) (i32.const 10) (i32.const 7))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:309 +invoke($7, `test`, []); + +// ./test/core/memory_copy.wast:311 +assert_return(() => invoke($7, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:312 +assert_return(() => invoke($7, `load8_u`, [1]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:313 +assert_return(() => invoke($7, `load8_u`, [2]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:314 +assert_return(() => invoke($7, `load8_u`, [3]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:315 +assert_return(() => invoke($7, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:316 +assert_return(() => invoke($7, `load8_u`, [5]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:317 +assert_return(() => invoke($7, `load8_u`, [6]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:318 +assert_return(() => invoke($7, `load8_u`, [7]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:319 +assert_return(() => invoke($7, `load8_u`, [8]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:320 +assert_return(() => invoke($7, `load8_u`, [9]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:321 +assert_return(() => invoke($7, `load8_u`, [10]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:322 +assert_return(() => invoke($7, `load8_u`, [11]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:323 +assert_return(() => invoke($7, `load8_u`, [12]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:324 +assert_return(() => invoke($7, `load8_u`, [13]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:325 +assert_return(() => invoke($7, `load8_u`, [14]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:326 +assert_return(() => invoke($7, `load8_u`, [15]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:327 +assert_return(() => invoke($7, `load8_u`, [16]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:328 +assert_return(() => invoke($7, `load8_u`, [17]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:329 +assert_return(() => invoke($7, `load8_u`, [18]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:330 +assert_return(() => invoke($7, `load8_u`, [19]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:331 +assert_return(() => invoke($7, `load8_u`, [20]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:332 +assert_return(() => invoke($7, `load8_u`, [21]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:333 +assert_return(() => invoke($7, `load8_u`, [22]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:334 +assert_return(() => invoke($7, `load8_u`, [23]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:335 +assert_return(() => invoke($7, `load8_u`, [24]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:336 +assert_return(() => invoke($7, `load8_u`, [25]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:337 +assert_return(() => invoke($7, `load8_u`, [26]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:338 +assert_return(() => invoke($7, `load8_u`, [27]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:339 +assert_return(() => invoke($7, `load8_u`, [28]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:340 +assert_return(() => invoke($7, `load8_u`, [29]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:342 +let $8 = instantiate(`(module + (memory (export "mem") 1 1 ) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13") + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (memory.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:350 +assert_trap(() => invoke($8, `run`, [65516, 0, 40]), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:353 +assert_return(() => invoke($8, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:354 +assert_return(() => invoke($8, `load8_u`, [1]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:355 +assert_return(() => invoke($8, `load8_u`, [2]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:356 +assert_return(() => invoke($8, `load8_u`, [3]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:357 +assert_return(() => invoke($8, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:358 +assert_return(() => invoke($8, `load8_u`, [5]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:359 +assert_return(() => invoke($8, `load8_u`, [6]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:360 +assert_return(() => invoke($8, `load8_u`, [7]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:361 +assert_return(() => invoke($8, `load8_u`, [8]), [value("i32", 8)]); + +// ./test/core/memory_copy.wast:362 +assert_return(() => invoke($8, `load8_u`, [9]), [value("i32", 9)]); + +// ./test/core/memory_copy.wast:363 +assert_return(() => invoke($8, `load8_u`, [10]), [value("i32", 10)]); + +// ./test/core/memory_copy.wast:364 +assert_return(() => invoke($8, `load8_u`, [11]), [value("i32", 11)]); + +// ./test/core/memory_copy.wast:365 +assert_return(() => invoke($8, `load8_u`, [12]), [value("i32", 12)]); + +// ./test/core/memory_copy.wast:366 +assert_return(() => invoke($8, `load8_u`, [13]), [value("i32", 13)]); + +// ./test/core/memory_copy.wast:367 +assert_return(() => invoke($8, `load8_u`, [14]), [value("i32", 14)]); + +// ./test/core/memory_copy.wast:368 +assert_return(() => invoke($8, `load8_u`, [15]), [value("i32", 15)]); + +// ./test/core/memory_copy.wast:369 +assert_return(() => invoke($8, `load8_u`, [16]), [value("i32", 16)]); + +// ./test/core/memory_copy.wast:370 +assert_return(() => invoke($8, `load8_u`, [17]), [value("i32", 17)]); + +// ./test/core/memory_copy.wast:371 +assert_return(() => invoke($8, `load8_u`, [18]), [value("i32", 18)]); + +// ./test/core/memory_copy.wast:372 +assert_return(() => invoke($8, `load8_u`, [19]), [value("i32", 19)]); + +// ./test/core/memory_copy.wast:373 +assert_return(() => invoke($8, `load8_u`, [218]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:374 +assert_return(() => invoke($8, `load8_u`, [417]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:375 +assert_return(() => invoke($8, `load8_u`, [616]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:376 +assert_return(() => invoke($8, `load8_u`, [815]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:377 +assert_return(() => invoke($8, `load8_u`, [1014]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:378 +assert_return(() => invoke($8, `load8_u`, [1213]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:379 +assert_return(() => invoke($8, `load8_u`, [1412]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:380 +assert_return(() => invoke($8, `load8_u`, [1611]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:381 +assert_return(() => invoke($8, `load8_u`, [1810]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:382 +assert_return(() => invoke($8, `load8_u`, [2009]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:383 +assert_return(() => invoke($8, `load8_u`, [2208]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:384 +assert_return(() => invoke($8, `load8_u`, [2407]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:385 +assert_return(() => invoke($8, `load8_u`, [2606]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:386 +assert_return(() => invoke($8, `load8_u`, [2805]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:387 +assert_return(() => invoke($8, `load8_u`, [3004]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:388 +assert_return(() => invoke($8, `load8_u`, [3203]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:389 +assert_return(() => invoke($8, `load8_u`, [3402]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:390 +assert_return(() => invoke($8, `load8_u`, [3601]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:391 +assert_return(() => invoke($8, `load8_u`, [3800]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:392 +assert_return(() => invoke($8, `load8_u`, [3999]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:393 +assert_return(() => invoke($8, `load8_u`, [4198]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:394 +assert_return(() => invoke($8, `load8_u`, [4397]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:395 +assert_return(() => invoke($8, `load8_u`, [4596]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:396 +assert_return(() => invoke($8, `load8_u`, [4795]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:397 +assert_return(() => invoke($8, `load8_u`, [4994]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:398 +assert_return(() => invoke($8, `load8_u`, [5193]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:399 +assert_return(() => invoke($8, `load8_u`, [5392]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:400 +assert_return(() => invoke($8, `load8_u`, [5591]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:401 +assert_return(() => invoke($8, `load8_u`, [5790]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:402 +assert_return(() => invoke($8, `load8_u`, [5989]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:403 +assert_return(() => invoke($8, `load8_u`, [6188]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:404 +assert_return(() => invoke($8, `load8_u`, [6387]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:405 +assert_return(() => invoke($8, `load8_u`, [6586]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:406 +assert_return(() => invoke($8, `load8_u`, [6785]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:407 +assert_return(() => invoke($8, `load8_u`, [6984]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:408 +assert_return(() => invoke($8, `load8_u`, [7183]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:409 +assert_return(() => invoke($8, `load8_u`, [7382]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:410 +assert_return(() => invoke($8, `load8_u`, [7581]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:411 +assert_return(() => invoke($8, `load8_u`, [7780]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:412 +assert_return(() => invoke($8, `load8_u`, [7979]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:413 +assert_return(() => invoke($8, `load8_u`, [8178]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:414 +assert_return(() => invoke($8, `load8_u`, [8377]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:415 +assert_return(() => invoke($8, `load8_u`, [8576]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:416 +assert_return(() => invoke($8, `load8_u`, [8775]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:417 +assert_return(() => invoke($8, `load8_u`, [8974]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:418 +assert_return(() => invoke($8, `load8_u`, [9173]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:419 +assert_return(() => invoke($8, `load8_u`, [9372]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:420 +assert_return(() => invoke($8, `load8_u`, [9571]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:421 +assert_return(() => invoke($8, `load8_u`, [9770]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:422 +assert_return(() => invoke($8, `load8_u`, [9969]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:423 +assert_return(() => invoke($8, `load8_u`, [10168]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:424 +assert_return(() => invoke($8, `load8_u`, [10367]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:425 +assert_return(() => invoke($8, `load8_u`, [10566]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:426 +assert_return(() => invoke($8, `load8_u`, [10765]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:427 +assert_return(() => invoke($8, `load8_u`, [10964]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:428 +assert_return(() => invoke($8, `load8_u`, [11163]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:429 +assert_return(() => invoke($8, `load8_u`, [11362]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:430 +assert_return(() => invoke($8, `load8_u`, [11561]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:431 +assert_return(() => invoke($8, `load8_u`, [11760]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:432 +assert_return(() => invoke($8, `load8_u`, [11959]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:433 +assert_return(() => invoke($8, `load8_u`, [12158]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:434 +assert_return(() => invoke($8, `load8_u`, [12357]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:435 +assert_return(() => invoke($8, `load8_u`, [12556]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:436 +assert_return(() => invoke($8, `load8_u`, [12755]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:437 +assert_return(() => invoke($8, `load8_u`, [12954]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:438 +assert_return(() => invoke($8, `load8_u`, [13153]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:439 +assert_return(() => invoke($8, `load8_u`, [13352]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:440 +assert_return(() => invoke($8, `load8_u`, [13551]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:441 +assert_return(() => invoke($8, `load8_u`, [13750]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:442 +assert_return(() => invoke($8, `load8_u`, [13949]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:443 +assert_return(() => invoke($8, `load8_u`, [14148]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:444 +assert_return(() => invoke($8, `load8_u`, [14347]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:445 +assert_return(() => invoke($8, `load8_u`, [14546]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:446 +assert_return(() => invoke($8, `load8_u`, [14745]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:447 +assert_return(() => invoke($8, `load8_u`, [14944]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:448 +assert_return(() => invoke($8, `load8_u`, [15143]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:449 +assert_return(() => invoke($8, `load8_u`, [15342]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:450 +assert_return(() => invoke($8, `load8_u`, [15541]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:451 +assert_return(() => invoke($8, `load8_u`, [15740]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:452 +assert_return(() => invoke($8, `load8_u`, [15939]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:453 +assert_return(() => invoke($8, `load8_u`, [16138]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:454 +assert_return(() => invoke($8, `load8_u`, [16337]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:455 +assert_return(() => invoke($8, `load8_u`, [16536]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:456 +assert_return(() => invoke($8, `load8_u`, [16735]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:457 +assert_return(() => invoke($8, `load8_u`, [16934]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:458 +assert_return(() => invoke($8, `load8_u`, [17133]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:459 +assert_return(() => invoke($8, `load8_u`, [17332]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:460 +assert_return(() => invoke($8, `load8_u`, [17531]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:461 +assert_return(() => invoke($8, `load8_u`, [17730]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:462 +assert_return(() => invoke($8, `load8_u`, [17929]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:463 +assert_return(() => invoke($8, `load8_u`, [18128]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:464 +assert_return(() => invoke($8, `load8_u`, [18327]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:465 +assert_return(() => invoke($8, `load8_u`, [18526]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:466 +assert_return(() => invoke($8, `load8_u`, [18725]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:467 +assert_return(() => invoke($8, `load8_u`, [18924]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:468 +assert_return(() => invoke($8, `load8_u`, [19123]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:469 +assert_return(() => invoke($8, `load8_u`, [19322]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:470 +assert_return(() => invoke($8, `load8_u`, [19521]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:471 +assert_return(() => invoke($8, `load8_u`, [19720]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:472 +assert_return(() => invoke($8, `load8_u`, [19919]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:473 +assert_return(() => invoke($8, `load8_u`, [20118]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:474 +assert_return(() => invoke($8, `load8_u`, [20317]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:475 +assert_return(() => invoke($8, `load8_u`, [20516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:476 +assert_return(() => invoke($8, `load8_u`, [20715]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:477 +assert_return(() => invoke($8, `load8_u`, [20914]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:478 +assert_return(() => invoke($8, `load8_u`, [21113]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:479 +assert_return(() => invoke($8, `load8_u`, [21312]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:480 +assert_return(() => invoke($8, `load8_u`, [21511]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:481 +assert_return(() => invoke($8, `load8_u`, [21710]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:482 +assert_return(() => invoke($8, `load8_u`, [21909]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:483 +assert_return(() => invoke($8, `load8_u`, [22108]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:484 +assert_return(() => invoke($8, `load8_u`, [22307]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:485 +assert_return(() => invoke($8, `load8_u`, [22506]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:486 +assert_return(() => invoke($8, `load8_u`, [22705]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:487 +assert_return(() => invoke($8, `load8_u`, [22904]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:488 +assert_return(() => invoke($8, `load8_u`, [23103]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:489 +assert_return(() => invoke($8, `load8_u`, [23302]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:490 +assert_return(() => invoke($8, `load8_u`, [23501]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:491 +assert_return(() => invoke($8, `load8_u`, [23700]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:492 +assert_return(() => invoke($8, `load8_u`, [23899]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:493 +assert_return(() => invoke($8, `load8_u`, [24098]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:494 +assert_return(() => invoke($8, `load8_u`, [24297]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:495 +assert_return(() => invoke($8, `load8_u`, [24496]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:496 +assert_return(() => invoke($8, `load8_u`, [24695]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:497 +assert_return(() => invoke($8, `load8_u`, [24894]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:498 +assert_return(() => invoke($8, `load8_u`, [25093]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:499 +assert_return(() => invoke($8, `load8_u`, [25292]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:500 +assert_return(() => invoke($8, `load8_u`, [25491]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:501 +assert_return(() => invoke($8, `load8_u`, [25690]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:502 +assert_return(() => invoke($8, `load8_u`, [25889]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:503 +assert_return(() => invoke($8, `load8_u`, [26088]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:504 +assert_return(() => invoke($8, `load8_u`, [26287]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:505 +assert_return(() => invoke($8, `load8_u`, [26486]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:506 +assert_return(() => invoke($8, `load8_u`, [26685]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:507 +assert_return(() => invoke($8, `load8_u`, [26884]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:508 +assert_return(() => invoke($8, `load8_u`, [27083]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:509 +assert_return(() => invoke($8, `load8_u`, [27282]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:510 +assert_return(() => invoke($8, `load8_u`, [27481]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:511 +assert_return(() => invoke($8, `load8_u`, [27680]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:512 +assert_return(() => invoke($8, `load8_u`, [27879]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:513 +assert_return(() => invoke($8, `load8_u`, [28078]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:514 +assert_return(() => invoke($8, `load8_u`, [28277]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:515 +assert_return(() => invoke($8, `load8_u`, [28476]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:516 +assert_return(() => invoke($8, `load8_u`, [28675]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:517 +assert_return(() => invoke($8, `load8_u`, [28874]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:518 +assert_return(() => invoke($8, `load8_u`, [29073]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:519 +assert_return(() => invoke($8, `load8_u`, [29272]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:520 +assert_return(() => invoke($8, `load8_u`, [29471]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:521 +assert_return(() => invoke($8, `load8_u`, [29670]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:522 +assert_return(() => invoke($8, `load8_u`, [29869]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:523 +assert_return(() => invoke($8, `load8_u`, [30068]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:524 +assert_return(() => invoke($8, `load8_u`, [30267]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:525 +assert_return(() => invoke($8, `load8_u`, [30466]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:526 +assert_return(() => invoke($8, `load8_u`, [30665]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:527 +assert_return(() => invoke($8, `load8_u`, [30864]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:528 +assert_return(() => invoke($8, `load8_u`, [31063]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:529 +assert_return(() => invoke($8, `load8_u`, [31262]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:530 +assert_return(() => invoke($8, `load8_u`, [31461]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:531 +assert_return(() => invoke($8, `load8_u`, [31660]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:532 +assert_return(() => invoke($8, `load8_u`, [31859]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:533 +assert_return(() => invoke($8, `load8_u`, [32058]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:534 +assert_return(() => invoke($8, `load8_u`, [32257]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:535 +assert_return(() => invoke($8, `load8_u`, [32456]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:536 +assert_return(() => invoke($8, `load8_u`, [32655]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:537 +assert_return(() => invoke($8, `load8_u`, [32854]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:538 +assert_return(() => invoke($8, `load8_u`, [33053]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:539 +assert_return(() => invoke($8, `load8_u`, [33252]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:540 +assert_return(() => invoke($8, `load8_u`, [33451]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:541 +assert_return(() => invoke($8, `load8_u`, [33650]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:542 +assert_return(() => invoke($8, `load8_u`, [33849]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:543 +assert_return(() => invoke($8, `load8_u`, [34048]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:544 +assert_return(() => invoke($8, `load8_u`, [34247]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:545 +assert_return(() => invoke($8, `load8_u`, [34446]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:546 +assert_return(() => invoke($8, `load8_u`, [34645]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:547 +assert_return(() => invoke($8, `load8_u`, [34844]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:548 +assert_return(() => invoke($8, `load8_u`, [35043]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:549 +assert_return(() => invoke($8, `load8_u`, [35242]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:550 +assert_return(() => invoke($8, `load8_u`, [35441]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:551 +assert_return(() => invoke($8, `load8_u`, [35640]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:552 +assert_return(() => invoke($8, `load8_u`, [35839]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:553 +assert_return(() => invoke($8, `load8_u`, [36038]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:554 +assert_return(() => invoke($8, `load8_u`, [36237]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:555 +assert_return(() => invoke($8, `load8_u`, [36436]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:556 +assert_return(() => invoke($8, `load8_u`, [36635]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:557 +assert_return(() => invoke($8, `load8_u`, [36834]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:558 +assert_return(() => invoke($8, `load8_u`, [37033]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:559 +assert_return(() => invoke($8, `load8_u`, [37232]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:560 +assert_return(() => invoke($8, `load8_u`, [37431]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:561 +assert_return(() => invoke($8, `load8_u`, [37630]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:562 +assert_return(() => invoke($8, `load8_u`, [37829]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:563 +assert_return(() => invoke($8, `load8_u`, [38028]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:564 +assert_return(() => invoke($8, `load8_u`, [38227]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:565 +assert_return(() => invoke($8, `load8_u`, [38426]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:566 +assert_return(() => invoke($8, `load8_u`, [38625]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:567 +assert_return(() => invoke($8, `load8_u`, [38824]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:568 +assert_return(() => invoke($8, `load8_u`, [39023]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:569 +assert_return(() => invoke($8, `load8_u`, [39222]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:570 +assert_return(() => invoke($8, `load8_u`, [39421]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:571 +assert_return(() => invoke($8, `load8_u`, [39620]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:572 +assert_return(() => invoke($8, `load8_u`, [39819]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:573 +assert_return(() => invoke($8, `load8_u`, [40018]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:574 +assert_return(() => invoke($8, `load8_u`, [40217]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:575 +assert_return(() => invoke($8, `load8_u`, [40416]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:576 +assert_return(() => invoke($8, `load8_u`, [40615]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:577 +assert_return(() => invoke($8, `load8_u`, [40814]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:578 +assert_return(() => invoke($8, `load8_u`, [41013]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:579 +assert_return(() => invoke($8, `load8_u`, [41212]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:580 +assert_return(() => invoke($8, `load8_u`, [41411]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:581 +assert_return(() => invoke($8, `load8_u`, [41610]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:582 +assert_return(() => invoke($8, `load8_u`, [41809]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:583 +assert_return(() => invoke($8, `load8_u`, [42008]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:584 +assert_return(() => invoke($8, `load8_u`, [42207]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:585 +assert_return(() => invoke($8, `load8_u`, [42406]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:586 +assert_return(() => invoke($8, `load8_u`, [42605]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:587 +assert_return(() => invoke($8, `load8_u`, [42804]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:588 +assert_return(() => invoke($8, `load8_u`, [43003]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:589 +assert_return(() => invoke($8, `load8_u`, [43202]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:590 +assert_return(() => invoke($8, `load8_u`, [43401]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:591 +assert_return(() => invoke($8, `load8_u`, [43600]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:592 +assert_return(() => invoke($8, `load8_u`, [43799]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:593 +assert_return(() => invoke($8, `load8_u`, [43998]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:594 +assert_return(() => invoke($8, `load8_u`, [44197]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:595 +assert_return(() => invoke($8, `load8_u`, [44396]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:596 +assert_return(() => invoke($8, `load8_u`, [44595]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:597 +assert_return(() => invoke($8, `load8_u`, [44794]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:598 +assert_return(() => invoke($8, `load8_u`, [44993]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:599 +assert_return(() => invoke($8, `load8_u`, [45192]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:600 +assert_return(() => invoke($8, `load8_u`, [45391]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:601 +assert_return(() => invoke($8, `load8_u`, [45590]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:602 +assert_return(() => invoke($8, `load8_u`, [45789]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:603 +assert_return(() => invoke($8, `load8_u`, [45988]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:604 +assert_return(() => invoke($8, `load8_u`, [46187]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:605 +assert_return(() => invoke($8, `load8_u`, [46386]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:606 +assert_return(() => invoke($8, `load8_u`, [46585]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:607 +assert_return(() => invoke($8, `load8_u`, [46784]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:608 +assert_return(() => invoke($8, `load8_u`, [46983]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:609 +assert_return(() => invoke($8, `load8_u`, [47182]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:610 +assert_return(() => invoke($8, `load8_u`, [47381]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:611 +assert_return(() => invoke($8, `load8_u`, [47580]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:612 +assert_return(() => invoke($8, `load8_u`, [47779]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:613 +assert_return(() => invoke($8, `load8_u`, [47978]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:614 +assert_return(() => invoke($8, `load8_u`, [48177]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:615 +assert_return(() => invoke($8, `load8_u`, [48376]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:616 +assert_return(() => invoke($8, `load8_u`, [48575]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:617 +assert_return(() => invoke($8, `load8_u`, [48774]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:618 +assert_return(() => invoke($8, `load8_u`, [48973]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:619 +assert_return(() => invoke($8, `load8_u`, [49172]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:620 +assert_return(() => invoke($8, `load8_u`, [49371]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:621 +assert_return(() => invoke($8, `load8_u`, [49570]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:622 +assert_return(() => invoke($8, `load8_u`, [49769]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:623 +assert_return(() => invoke($8, `load8_u`, [49968]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:624 +assert_return(() => invoke($8, `load8_u`, [50167]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:625 +assert_return(() => invoke($8, `load8_u`, [50366]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:626 +assert_return(() => invoke($8, `load8_u`, [50565]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:627 +assert_return(() => invoke($8, `load8_u`, [50764]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:628 +assert_return(() => invoke($8, `load8_u`, [50963]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:629 +assert_return(() => invoke($8, `load8_u`, [51162]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:630 +assert_return(() => invoke($8, `load8_u`, [51361]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:631 +assert_return(() => invoke($8, `load8_u`, [51560]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:632 +assert_return(() => invoke($8, `load8_u`, [51759]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:633 +assert_return(() => invoke($8, `load8_u`, [51958]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:634 +assert_return(() => invoke($8, `load8_u`, [52157]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:635 +assert_return(() => invoke($8, `load8_u`, [52356]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:636 +assert_return(() => invoke($8, `load8_u`, [52555]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:637 +assert_return(() => invoke($8, `load8_u`, [52754]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:638 +assert_return(() => invoke($8, `load8_u`, [52953]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:639 +assert_return(() => invoke($8, `load8_u`, [53152]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:640 +assert_return(() => invoke($8, `load8_u`, [53351]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:641 +assert_return(() => invoke($8, `load8_u`, [53550]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:642 +assert_return(() => invoke($8, `load8_u`, [53749]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:643 +assert_return(() => invoke($8, `load8_u`, [53948]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:644 +assert_return(() => invoke($8, `load8_u`, [54147]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:645 +assert_return(() => invoke($8, `load8_u`, [54346]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:646 +assert_return(() => invoke($8, `load8_u`, [54545]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:647 +assert_return(() => invoke($8, `load8_u`, [54744]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:648 +assert_return(() => invoke($8, `load8_u`, [54943]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:649 +assert_return(() => invoke($8, `load8_u`, [55142]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:650 +assert_return(() => invoke($8, `load8_u`, [55341]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:651 +assert_return(() => invoke($8, `load8_u`, [55540]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:652 +assert_return(() => invoke($8, `load8_u`, [55739]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:653 +assert_return(() => invoke($8, `load8_u`, [55938]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:654 +assert_return(() => invoke($8, `load8_u`, [56137]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:655 +assert_return(() => invoke($8, `load8_u`, [56336]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:656 +assert_return(() => invoke($8, `load8_u`, [56535]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:657 +assert_return(() => invoke($8, `load8_u`, [56734]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:658 +assert_return(() => invoke($8, `load8_u`, [56933]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:659 +assert_return(() => invoke($8, `load8_u`, [57132]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:660 +assert_return(() => invoke($8, `load8_u`, [57331]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:661 +assert_return(() => invoke($8, `load8_u`, [57530]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:662 +assert_return(() => invoke($8, `load8_u`, [57729]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:663 +assert_return(() => invoke($8, `load8_u`, [57928]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:664 +assert_return(() => invoke($8, `load8_u`, [58127]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:665 +assert_return(() => invoke($8, `load8_u`, [58326]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:666 +assert_return(() => invoke($8, `load8_u`, [58525]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:667 +assert_return(() => invoke($8, `load8_u`, [58724]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:668 +assert_return(() => invoke($8, `load8_u`, [58923]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:669 +assert_return(() => invoke($8, `load8_u`, [59122]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:670 +assert_return(() => invoke($8, `load8_u`, [59321]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:671 +assert_return(() => invoke($8, `load8_u`, [59520]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:672 +assert_return(() => invoke($8, `load8_u`, [59719]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:673 +assert_return(() => invoke($8, `load8_u`, [59918]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:674 +assert_return(() => invoke($8, `load8_u`, [60117]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:675 +assert_return(() => invoke($8, `load8_u`, [60316]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:676 +assert_return(() => invoke($8, `load8_u`, [60515]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:677 +assert_return(() => invoke($8, `load8_u`, [60714]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:678 +assert_return(() => invoke($8, `load8_u`, [60913]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:679 +assert_return(() => invoke($8, `load8_u`, [61112]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:680 +assert_return(() => invoke($8, `load8_u`, [61311]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:681 +assert_return(() => invoke($8, `load8_u`, [61510]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:682 +assert_return(() => invoke($8, `load8_u`, [61709]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:683 +assert_return(() => invoke($8, `load8_u`, [61908]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:684 +assert_return(() => invoke($8, `load8_u`, [62107]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:685 +assert_return(() => invoke($8, `load8_u`, [62306]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:686 +assert_return(() => invoke($8, `load8_u`, [62505]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:687 +assert_return(() => invoke($8, `load8_u`, [62704]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:688 +assert_return(() => invoke($8, `load8_u`, [62903]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:689 +assert_return(() => invoke($8, `load8_u`, [63102]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:690 +assert_return(() => invoke($8, `load8_u`, [63301]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:691 +assert_return(() => invoke($8, `load8_u`, [63500]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:692 +assert_return(() => invoke($8, `load8_u`, [63699]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:693 +assert_return(() => invoke($8, `load8_u`, [63898]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:694 +assert_return(() => invoke($8, `load8_u`, [64097]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:695 +assert_return(() => invoke($8, `load8_u`, [64296]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:696 +assert_return(() => invoke($8, `load8_u`, [64495]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:697 +assert_return(() => invoke($8, `load8_u`, [64694]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:698 +assert_return(() => invoke($8, `load8_u`, [64893]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:699 +assert_return(() => invoke($8, `load8_u`, [65092]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:700 +assert_return(() => invoke($8, `load8_u`, [65291]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:701 +assert_return(() => invoke($8, `load8_u`, [65490]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:703 +let $9 = instantiate(`(module + (memory (export "mem") 1 1 ) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\\14") + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (memory.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:711 +assert_trap(() => invoke($9, `run`, [65515, 0, 39]), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:714 +assert_return(() => invoke($9, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:715 +assert_return(() => invoke($9, `load8_u`, [1]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:716 +assert_return(() => invoke($9, `load8_u`, [2]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:717 +assert_return(() => invoke($9, `load8_u`, [3]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:718 +assert_return(() => invoke($9, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:719 +assert_return(() => invoke($9, `load8_u`, [5]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:720 +assert_return(() => invoke($9, `load8_u`, [6]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:721 +assert_return(() => invoke($9, `load8_u`, [7]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:722 +assert_return(() => invoke($9, `load8_u`, [8]), [value("i32", 8)]); + +// ./test/core/memory_copy.wast:723 +assert_return(() => invoke($9, `load8_u`, [9]), [value("i32", 9)]); + +// ./test/core/memory_copy.wast:724 +assert_return(() => invoke($9, `load8_u`, [10]), [value("i32", 10)]); + +// ./test/core/memory_copy.wast:725 +assert_return(() => invoke($9, `load8_u`, [11]), [value("i32", 11)]); + +// ./test/core/memory_copy.wast:726 +assert_return(() => invoke($9, `load8_u`, [12]), [value("i32", 12)]); + +// ./test/core/memory_copy.wast:727 +assert_return(() => invoke($9, `load8_u`, [13]), [value("i32", 13)]); + +// ./test/core/memory_copy.wast:728 +assert_return(() => invoke($9, `load8_u`, [14]), [value("i32", 14)]); + +// ./test/core/memory_copy.wast:729 +assert_return(() => invoke($9, `load8_u`, [15]), [value("i32", 15)]); + +// ./test/core/memory_copy.wast:730 +assert_return(() => invoke($9, `load8_u`, [16]), [value("i32", 16)]); + +// ./test/core/memory_copy.wast:731 +assert_return(() => invoke($9, `load8_u`, [17]), [value("i32", 17)]); + +// ./test/core/memory_copy.wast:732 +assert_return(() => invoke($9, `load8_u`, [18]), [value("i32", 18)]); + +// ./test/core/memory_copy.wast:733 +assert_return(() => invoke($9, `load8_u`, [19]), [value("i32", 19)]); + +// ./test/core/memory_copy.wast:734 +assert_return(() => invoke($9, `load8_u`, [20]), [value("i32", 20)]); + +// ./test/core/memory_copy.wast:735 +assert_return(() => invoke($9, `load8_u`, [219]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:736 +assert_return(() => invoke($9, `load8_u`, [418]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:737 +assert_return(() => invoke($9, `load8_u`, [617]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:738 +assert_return(() => invoke($9, `load8_u`, [816]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:739 +assert_return(() => invoke($9, `load8_u`, [1015]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:740 +assert_return(() => invoke($9, `load8_u`, [1214]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:741 +assert_return(() => invoke($9, `load8_u`, [1413]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:742 +assert_return(() => invoke($9, `load8_u`, [1612]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:743 +assert_return(() => invoke($9, `load8_u`, [1811]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:744 +assert_return(() => invoke($9, `load8_u`, [2010]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:745 +assert_return(() => invoke($9, `load8_u`, [2209]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:746 +assert_return(() => invoke($9, `load8_u`, [2408]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:747 +assert_return(() => invoke($9, `load8_u`, [2607]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:748 +assert_return(() => invoke($9, `load8_u`, [2806]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:749 +assert_return(() => invoke($9, `load8_u`, [3005]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:750 +assert_return(() => invoke($9, `load8_u`, [3204]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:751 +assert_return(() => invoke($9, `load8_u`, [3403]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:752 +assert_return(() => invoke($9, `load8_u`, [3602]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:753 +assert_return(() => invoke($9, `load8_u`, [3801]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:754 +assert_return(() => invoke($9, `load8_u`, [4000]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:755 +assert_return(() => invoke($9, `load8_u`, [4199]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:756 +assert_return(() => invoke($9, `load8_u`, [4398]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:757 +assert_return(() => invoke($9, `load8_u`, [4597]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:758 +assert_return(() => invoke($9, `load8_u`, [4796]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:759 +assert_return(() => invoke($9, `load8_u`, [4995]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:760 +assert_return(() => invoke($9, `load8_u`, [5194]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:761 +assert_return(() => invoke($9, `load8_u`, [5393]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:762 +assert_return(() => invoke($9, `load8_u`, [5592]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:763 +assert_return(() => invoke($9, `load8_u`, [5791]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:764 +assert_return(() => invoke($9, `load8_u`, [5990]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:765 +assert_return(() => invoke($9, `load8_u`, [6189]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:766 +assert_return(() => invoke($9, `load8_u`, [6388]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:767 +assert_return(() => invoke($9, `load8_u`, [6587]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:768 +assert_return(() => invoke($9, `load8_u`, [6786]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:769 +assert_return(() => invoke($9, `load8_u`, [6985]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:770 +assert_return(() => invoke($9, `load8_u`, [7184]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:771 +assert_return(() => invoke($9, `load8_u`, [7383]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:772 +assert_return(() => invoke($9, `load8_u`, [7582]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:773 +assert_return(() => invoke($9, `load8_u`, [7781]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:774 +assert_return(() => invoke($9, `load8_u`, [7980]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:775 +assert_return(() => invoke($9, `load8_u`, [8179]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:776 +assert_return(() => invoke($9, `load8_u`, [8378]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:777 +assert_return(() => invoke($9, `load8_u`, [8577]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:778 +assert_return(() => invoke($9, `load8_u`, [8776]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:779 +assert_return(() => invoke($9, `load8_u`, [8975]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:780 +assert_return(() => invoke($9, `load8_u`, [9174]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:781 +assert_return(() => invoke($9, `load8_u`, [9373]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:782 +assert_return(() => invoke($9, `load8_u`, [9572]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:783 +assert_return(() => invoke($9, `load8_u`, [9771]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:784 +assert_return(() => invoke($9, `load8_u`, [9970]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:785 +assert_return(() => invoke($9, `load8_u`, [10169]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:786 +assert_return(() => invoke($9, `load8_u`, [10368]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:787 +assert_return(() => invoke($9, `load8_u`, [10567]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:788 +assert_return(() => invoke($9, `load8_u`, [10766]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:789 +assert_return(() => invoke($9, `load8_u`, [10965]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:790 +assert_return(() => invoke($9, `load8_u`, [11164]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:791 +assert_return(() => invoke($9, `load8_u`, [11363]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:792 +assert_return(() => invoke($9, `load8_u`, [11562]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:793 +assert_return(() => invoke($9, `load8_u`, [11761]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:794 +assert_return(() => invoke($9, `load8_u`, [11960]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:795 +assert_return(() => invoke($9, `load8_u`, [12159]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:796 +assert_return(() => invoke($9, `load8_u`, [12358]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:797 +assert_return(() => invoke($9, `load8_u`, [12557]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:798 +assert_return(() => invoke($9, `load8_u`, [12756]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:799 +assert_return(() => invoke($9, `load8_u`, [12955]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:800 +assert_return(() => invoke($9, `load8_u`, [13154]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:801 +assert_return(() => invoke($9, `load8_u`, [13353]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:802 +assert_return(() => invoke($9, `load8_u`, [13552]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:803 +assert_return(() => invoke($9, `load8_u`, [13751]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:804 +assert_return(() => invoke($9, `load8_u`, [13950]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:805 +assert_return(() => invoke($9, `load8_u`, [14149]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:806 +assert_return(() => invoke($9, `load8_u`, [14348]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:807 +assert_return(() => invoke($9, `load8_u`, [14547]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:808 +assert_return(() => invoke($9, `load8_u`, [14746]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:809 +assert_return(() => invoke($9, `load8_u`, [14945]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:810 +assert_return(() => invoke($9, `load8_u`, [15144]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:811 +assert_return(() => invoke($9, `load8_u`, [15343]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:812 +assert_return(() => invoke($9, `load8_u`, [15542]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:813 +assert_return(() => invoke($9, `load8_u`, [15741]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:814 +assert_return(() => invoke($9, `load8_u`, [15940]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:815 +assert_return(() => invoke($9, `load8_u`, [16139]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:816 +assert_return(() => invoke($9, `load8_u`, [16338]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:817 +assert_return(() => invoke($9, `load8_u`, [16537]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:818 +assert_return(() => invoke($9, `load8_u`, [16736]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:819 +assert_return(() => invoke($9, `load8_u`, [16935]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:820 +assert_return(() => invoke($9, `load8_u`, [17134]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:821 +assert_return(() => invoke($9, `load8_u`, [17333]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:822 +assert_return(() => invoke($9, `load8_u`, [17532]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:823 +assert_return(() => invoke($9, `load8_u`, [17731]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:824 +assert_return(() => invoke($9, `load8_u`, [17930]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:825 +assert_return(() => invoke($9, `load8_u`, [18129]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:826 +assert_return(() => invoke($9, `load8_u`, [18328]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:827 +assert_return(() => invoke($9, `load8_u`, [18527]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:828 +assert_return(() => invoke($9, `load8_u`, [18726]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:829 +assert_return(() => invoke($9, `load8_u`, [18925]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:830 +assert_return(() => invoke($9, `load8_u`, [19124]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:831 +assert_return(() => invoke($9, `load8_u`, [19323]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:832 +assert_return(() => invoke($9, `load8_u`, [19522]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:833 +assert_return(() => invoke($9, `load8_u`, [19721]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:834 +assert_return(() => invoke($9, `load8_u`, [19920]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:835 +assert_return(() => invoke($9, `load8_u`, [20119]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:836 +assert_return(() => invoke($9, `load8_u`, [20318]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:837 +assert_return(() => invoke($9, `load8_u`, [20517]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:838 +assert_return(() => invoke($9, `load8_u`, [20716]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:839 +assert_return(() => invoke($9, `load8_u`, [20915]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:840 +assert_return(() => invoke($9, `load8_u`, [21114]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:841 +assert_return(() => invoke($9, `load8_u`, [21313]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:842 +assert_return(() => invoke($9, `load8_u`, [21512]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:843 +assert_return(() => invoke($9, `load8_u`, [21711]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:844 +assert_return(() => invoke($9, `load8_u`, [21910]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:845 +assert_return(() => invoke($9, `load8_u`, [22109]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:846 +assert_return(() => invoke($9, `load8_u`, [22308]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:847 +assert_return(() => invoke($9, `load8_u`, [22507]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:848 +assert_return(() => invoke($9, `load8_u`, [22706]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:849 +assert_return(() => invoke($9, `load8_u`, [22905]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:850 +assert_return(() => invoke($9, `load8_u`, [23104]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:851 +assert_return(() => invoke($9, `load8_u`, [23303]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:852 +assert_return(() => invoke($9, `load8_u`, [23502]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:853 +assert_return(() => invoke($9, `load8_u`, [23701]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:854 +assert_return(() => invoke($9, `load8_u`, [23900]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:855 +assert_return(() => invoke($9, `load8_u`, [24099]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:856 +assert_return(() => invoke($9, `load8_u`, [24298]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:857 +assert_return(() => invoke($9, `load8_u`, [24497]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:858 +assert_return(() => invoke($9, `load8_u`, [24696]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:859 +assert_return(() => invoke($9, `load8_u`, [24895]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:860 +assert_return(() => invoke($9, `load8_u`, [25094]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:861 +assert_return(() => invoke($9, `load8_u`, [25293]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:862 +assert_return(() => invoke($9, `load8_u`, [25492]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:863 +assert_return(() => invoke($9, `load8_u`, [25691]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:864 +assert_return(() => invoke($9, `load8_u`, [25890]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:865 +assert_return(() => invoke($9, `load8_u`, [26089]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:866 +assert_return(() => invoke($9, `load8_u`, [26288]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:867 +assert_return(() => invoke($9, `load8_u`, [26487]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:868 +assert_return(() => invoke($9, `load8_u`, [26686]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:869 +assert_return(() => invoke($9, `load8_u`, [26885]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:870 +assert_return(() => invoke($9, `load8_u`, [27084]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:871 +assert_return(() => invoke($9, `load8_u`, [27283]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:872 +assert_return(() => invoke($9, `load8_u`, [27482]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:873 +assert_return(() => invoke($9, `load8_u`, [27681]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:874 +assert_return(() => invoke($9, `load8_u`, [27880]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:875 +assert_return(() => invoke($9, `load8_u`, [28079]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:876 +assert_return(() => invoke($9, `load8_u`, [28278]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:877 +assert_return(() => invoke($9, `load8_u`, [28477]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:878 +assert_return(() => invoke($9, `load8_u`, [28676]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:879 +assert_return(() => invoke($9, `load8_u`, [28875]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:880 +assert_return(() => invoke($9, `load8_u`, [29074]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:881 +assert_return(() => invoke($9, `load8_u`, [29273]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:882 +assert_return(() => invoke($9, `load8_u`, [29472]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:883 +assert_return(() => invoke($9, `load8_u`, [29671]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:884 +assert_return(() => invoke($9, `load8_u`, [29870]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:885 +assert_return(() => invoke($9, `load8_u`, [30069]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:886 +assert_return(() => invoke($9, `load8_u`, [30268]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:887 +assert_return(() => invoke($9, `load8_u`, [30467]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:888 +assert_return(() => invoke($9, `load8_u`, [30666]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:889 +assert_return(() => invoke($9, `load8_u`, [30865]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:890 +assert_return(() => invoke($9, `load8_u`, [31064]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:891 +assert_return(() => invoke($9, `load8_u`, [31263]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:892 +assert_return(() => invoke($9, `load8_u`, [31462]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:893 +assert_return(() => invoke($9, `load8_u`, [31661]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:894 +assert_return(() => invoke($9, `load8_u`, [31860]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:895 +assert_return(() => invoke($9, `load8_u`, [32059]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:896 +assert_return(() => invoke($9, `load8_u`, [32258]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:897 +assert_return(() => invoke($9, `load8_u`, [32457]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:898 +assert_return(() => invoke($9, `load8_u`, [32656]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:899 +assert_return(() => invoke($9, `load8_u`, [32855]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:900 +assert_return(() => invoke($9, `load8_u`, [33054]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:901 +assert_return(() => invoke($9, `load8_u`, [33253]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:902 +assert_return(() => invoke($9, `load8_u`, [33452]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:903 +assert_return(() => invoke($9, `load8_u`, [33651]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:904 +assert_return(() => invoke($9, `load8_u`, [33850]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:905 +assert_return(() => invoke($9, `load8_u`, [34049]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:906 +assert_return(() => invoke($9, `load8_u`, [34248]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:907 +assert_return(() => invoke($9, `load8_u`, [34447]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:908 +assert_return(() => invoke($9, `load8_u`, [34646]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:909 +assert_return(() => invoke($9, `load8_u`, [34845]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:910 +assert_return(() => invoke($9, `load8_u`, [35044]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:911 +assert_return(() => invoke($9, `load8_u`, [35243]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:912 +assert_return(() => invoke($9, `load8_u`, [35442]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:913 +assert_return(() => invoke($9, `load8_u`, [35641]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:914 +assert_return(() => invoke($9, `load8_u`, [35840]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:915 +assert_return(() => invoke($9, `load8_u`, [36039]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:916 +assert_return(() => invoke($9, `load8_u`, [36238]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:917 +assert_return(() => invoke($9, `load8_u`, [36437]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:918 +assert_return(() => invoke($9, `load8_u`, [36636]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:919 +assert_return(() => invoke($9, `load8_u`, [36835]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:920 +assert_return(() => invoke($9, `load8_u`, [37034]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:921 +assert_return(() => invoke($9, `load8_u`, [37233]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:922 +assert_return(() => invoke($9, `load8_u`, [37432]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:923 +assert_return(() => invoke($9, `load8_u`, [37631]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:924 +assert_return(() => invoke($9, `load8_u`, [37830]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:925 +assert_return(() => invoke($9, `load8_u`, [38029]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:926 +assert_return(() => invoke($9, `load8_u`, [38228]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:927 +assert_return(() => invoke($9, `load8_u`, [38427]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:928 +assert_return(() => invoke($9, `load8_u`, [38626]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:929 +assert_return(() => invoke($9, `load8_u`, [38825]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:930 +assert_return(() => invoke($9, `load8_u`, [39024]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:931 +assert_return(() => invoke($9, `load8_u`, [39223]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:932 +assert_return(() => invoke($9, `load8_u`, [39422]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:933 +assert_return(() => invoke($9, `load8_u`, [39621]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:934 +assert_return(() => invoke($9, `load8_u`, [39820]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:935 +assert_return(() => invoke($9, `load8_u`, [40019]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:936 +assert_return(() => invoke($9, `load8_u`, [40218]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:937 +assert_return(() => invoke($9, `load8_u`, [40417]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:938 +assert_return(() => invoke($9, `load8_u`, [40616]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:939 +assert_return(() => invoke($9, `load8_u`, [40815]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:940 +assert_return(() => invoke($9, `load8_u`, [41014]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:941 +assert_return(() => invoke($9, `load8_u`, [41213]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:942 +assert_return(() => invoke($9, `load8_u`, [41412]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:943 +assert_return(() => invoke($9, `load8_u`, [41611]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:944 +assert_return(() => invoke($9, `load8_u`, [41810]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:945 +assert_return(() => invoke($9, `load8_u`, [42009]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:946 +assert_return(() => invoke($9, `load8_u`, [42208]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:947 +assert_return(() => invoke($9, `load8_u`, [42407]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:948 +assert_return(() => invoke($9, `load8_u`, [42606]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:949 +assert_return(() => invoke($9, `load8_u`, [42805]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:950 +assert_return(() => invoke($9, `load8_u`, [43004]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:951 +assert_return(() => invoke($9, `load8_u`, [43203]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:952 +assert_return(() => invoke($9, `load8_u`, [43402]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:953 +assert_return(() => invoke($9, `load8_u`, [43601]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:954 +assert_return(() => invoke($9, `load8_u`, [43800]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:955 +assert_return(() => invoke($9, `load8_u`, [43999]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:956 +assert_return(() => invoke($9, `load8_u`, [44198]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:957 +assert_return(() => invoke($9, `load8_u`, [44397]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:958 +assert_return(() => invoke($9, `load8_u`, [44596]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:959 +assert_return(() => invoke($9, `load8_u`, [44795]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:960 +assert_return(() => invoke($9, `load8_u`, [44994]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:961 +assert_return(() => invoke($9, `load8_u`, [45193]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:962 +assert_return(() => invoke($9, `load8_u`, [45392]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:963 +assert_return(() => invoke($9, `load8_u`, [45591]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:964 +assert_return(() => invoke($9, `load8_u`, [45790]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:965 +assert_return(() => invoke($9, `load8_u`, [45989]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:966 +assert_return(() => invoke($9, `load8_u`, [46188]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:967 +assert_return(() => invoke($9, `load8_u`, [46387]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:968 +assert_return(() => invoke($9, `load8_u`, [46586]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:969 +assert_return(() => invoke($9, `load8_u`, [46785]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:970 +assert_return(() => invoke($9, `load8_u`, [46984]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:971 +assert_return(() => invoke($9, `load8_u`, [47183]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:972 +assert_return(() => invoke($9, `load8_u`, [47382]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:973 +assert_return(() => invoke($9, `load8_u`, [47581]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:974 +assert_return(() => invoke($9, `load8_u`, [47780]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:975 +assert_return(() => invoke($9, `load8_u`, [47979]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:976 +assert_return(() => invoke($9, `load8_u`, [48178]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:977 +assert_return(() => invoke($9, `load8_u`, [48377]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:978 +assert_return(() => invoke($9, `load8_u`, [48576]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:979 +assert_return(() => invoke($9, `load8_u`, [48775]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:980 +assert_return(() => invoke($9, `load8_u`, [48974]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:981 +assert_return(() => invoke($9, `load8_u`, [49173]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:982 +assert_return(() => invoke($9, `load8_u`, [49372]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:983 +assert_return(() => invoke($9, `load8_u`, [49571]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:984 +assert_return(() => invoke($9, `load8_u`, [49770]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:985 +assert_return(() => invoke($9, `load8_u`, [49969]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:986 +assert_return(() => invoke($9, `load8_u`, [50168]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:987 +assert_return(() => invoke($9, `load8_u`, [50367]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:988 +assert_return(() => invoke($9, `load8_u`, [50566]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:989 +assert_return(() => invoke($9, `load8_u`, [50765]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:990 +assert_return(() => invoke($9, `load8_u`, [50964]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:991 +assert_return(() => invoke($9, `load8_u`, [51163]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:992 +assert_return(() => invoke($9, `load8_u`, [51362]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:993 +assert_return(() => invoke($9, `load8_u`, [51561]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:994 +assert_return(() => invoke($9, `load8_u`, [51760]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:995 +assert_return(() => invoke($9, `load8_u`, [51959]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:996 +assert_return(() => invoke($9, `load8_u`, [52158]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:997 +assert_return(() => invoke($9, `load8_u`, [52357]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:998 +assert_return(() => invoke($9, `load8_u`, [52556]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:999 +assert_return(() => invoke($9, `load8_u`, [52755]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1000 +assert_return(() => invoke($9, `load8_u`, [52954]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1001 +assert_return(() => invoke($9, `load8_u`, [53153]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1002 +assert_return(() => invoke($9, `load8_u`, [53352]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1003 +assert_return(() => invoke($9, `load8_u`, [53551]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1004 +assert_return(() => invoke($9, `load8_u`, [53750]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1005 +assert_return(() => invoke($9, `load8_u`, [53949]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1006 +assert_return(() => invoke($9, `load8_u`, [54148]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1007 +assert_return(() => invoke($9, `load8_u`, [54347]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1008 +assert_return(() => invoke($9, `load8_u`, [54546]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1009 +assert_return(() => invoke($9, `load8_u`, [54745]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1010 +assert_return(() => invoke($9, `load8_u`, [54944]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1011 +assert_return(() => invoke($9, `load8_u`, [55143]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1012 +assert_return(() => invoke($9, `load8_u`, [55342]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1013 +assert_return(() => invoke($9, `load8_u`, [55541]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1014 +assert_return(() => invoke($9, `load8_u`, [55740]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1015 +assert_return(() => invoke($9, `load8_u`, [55939]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1016 +assert_return(() => invoke($9, `load8_u`, [56138]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1017 +assert_return(() => invoke($9, `load8_u`, [56337]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1018 +assert_return(() => invoke($9, `load8_u`, [56536]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1019 +assert_return(() => invoke($9, `load8_u`, [56735]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1020 +assert_return(() => invoke($9, `load8_u`, [56934]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1021 +assert_return(() => invoke($9, `load8_u`, [57133]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1022 +assert_return(() => invoke($9, `load8_u`, [57332]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1023 +assert_return(() => invoke($9, `load8_u`, [57531]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1024 +assert_return(() => invoke($9, `load8_u`, [57730]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1025 +assert_return(() => invoke($9, `load8_u`, [57929]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1026 +assert_return(() => invoke($9, `load8_u`, [58128]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1027 +assert_return(() => invoke($9, `load8_u`, [58327]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1028 +assert_return(() => invoke($9, `load8_u`, [58526]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1029 +assert_return(() => invoke($9, `load8_u`, [58725]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1030 +assert_return(() => invoke($9, `load8_u`, [58924]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1031 +assert_return(() => invoke($9, `load8_u`, [59123]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1032 +assert_return(() => invoke($9, `load8_u`, [59322]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1033 +assert_return(() => invoke($9, `load8_u`, [59521]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1034 +assert_return(() => invoke($9, `load8_u`, [59720]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1035 +assert_return(() => invoke($9, `load8_u`, [59919]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1036 +assert_return(() => invoke($9, `load8_u`, [60118]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1037 +assert_return(() => invoke($9, `load8_u`, [60317]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1038 +assert_return(() => invoke($9, `load8_u`, [60516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1039 +assert_return(() => invoke($9, `load8_u`, [60715]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1040 +assert_return(() => invoke($9, `load8_u`, [60914]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1041 +assert_return(() => invoke($9, `load8_u`, [61113]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1042 +assert_return(() => invoke($9, `load8_u`, [61312]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1043 +assert_return(() => invoke($9, `load8_u`, [61511]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1044 +assert_return(() => invoke($9, `load8_u`, [61710]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1045 +assert_return(() => invoke($9, `load8_u`, [61909]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1046 +assert_return(() => invoke($9, `load8_u`, [62108]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1047 +assert_return(() => invoke($9, `load8_u`, [62307]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1048 +assert_return(() => invoke($9, `load8_u`, [62506]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1049 +assert_return(() => invoke($9, `load8_u`, [62705]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1050 +assert_return(() => invoke($9, `load8_u`, [62904]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1051 +assert_return(() => invoke($9, `load8_u`, [63103]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1052 +assert_return(() => invoke($9, `load8_u`, [63302]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1053 +assert_return(() => invoke($9, `load8_u`, [63501]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1054 +assert_return(() => invoke($9, `load8_u`, [63700]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1055 +assert_return(() => invoke($9, `load8_u`, [63899]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1056 +assert_return(() => invoke($9, `load8_u`, [64098]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1057 +assert_return(() => invoke($9, `load8_u`, [64297]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1058 +assert_return(() => invoke($9, `load8_u`, [64496]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1059 +assert_return(() => invoke($9, `load8_u`, [64695]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1060 +assert_return(() => invoke($9, `load8_u`, [64894]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1061 +assert_return(() => invoke($9, `load8_u`, [65093]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1062 +assert_return(() => invoke($9, `load8_u`, [65292]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1063 +assert_return(() => invoke($9, `load8_u`, [65491]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1065 +let $10 = instantiate(`(module + (memory (export "mem") 1 1 ) + (data (i32.const 65516) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13") + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (memory.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:1073 +assert_trap(() => invoke($10, `run`, [0, 65516, 40]), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:1076 +assert_return(() => invoke($10, `load8_u`, [198]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1077 +assert_return(() => invoke($10, `load8_u`, [397]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1078 +assert_return(() => invoke($10, `load8_u`, [596]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1079 +assert_return(() => invoke($10, `load8_u`, [795]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1080 +assert_return(() => invoke($10, `load8_u`, [994]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1081 +assert_return(() => invoke($10, `load8_u`, [1193]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1082 +assert_return(() => invoke($10, `load8_u`, [1392]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1083 +assert_return(() => invoke($10, `load8_u`, [1591]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1084 +assert_return(() => invoke($10, `load8_u`, [1790]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1085 +assert_return(() => invoke($10, `load8_u`, [1989]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1086 +assert_return(() => invoke($10, `load8_u`, [2188]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1087 +assert_return(() => invoke($10, `load8_u`, [2387]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1088 +assert_return(() => invoke($10, `load8_u`, [2586]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1089 +assert_return(() => invoke($10, `load8_u`, [2785]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1090 +assert_return(() => invoke($10, `load8_u`, [2984]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1091 +assert_return(() => invoke($10, `load8_u`, [3183]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1092 +assert_return(() => invoke($10, `load8_u`, [3382]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1093 +assert_return(() => invoke($10, `load8_u`, [3581]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1094 +assert_return(() => invoke($10, `load8_u`, [3780]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1095 +assert_return(() => invoke($10, `load8_u`, [3979]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1096 +assert_return(() => invoke($10, `load8_u`, [4178]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1097 +assert_return(() => invoke($10, `load8_u`, [4377]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1098 +assert_return(() => invoke($10, `load8_u`, [4576]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1099 +assert_return(() => invoke($10, `load8_u`, [4775]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1100 +assert_return(() => invoke($10, `load8_u`, [4974]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1101 +assert_return(() => invoke($10, `load8_u`, [5173]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1102 +assert_return(() => invoke($10, `load8_u`, [5372]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1103 +assert_return(() => invoke($10, `load8_u`, [5571]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1104 +assert_return(() => invoke($10, `load8_u`, [5770]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1105 +assert_return(() => invoke($10, `load8_u`, [5969]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1106 +assert_return(() => invoke($10, `load8_u`, [6168]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1107 +assert_return(() => invoke($10, `load8_u`, [6367]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1108 +assert_return(() => invoke($10, `load8_u`, [6566]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1109 +assert_return(() => invoke($10, `load8_u`, [6765]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1110 +assert_return(() => invoke($10, `load8_u`, [6964]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1111 +assert_return(() => invoke($10, `load8_u`, [7163]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1112 +assert_return(() => invoke($10, `load8_u`, [7362]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1113 +assert_return(() => invoke($10, `load8_u`, [7561]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1114 +assert_return(() => invoke($10, `load8_u`, [7760]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1115 +assert_return(() => invoke($10, `load8_u`, [7959]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1116 +assert_return(() => invoke($10, `load8_u`, [8158]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1117 +assert_return(() => invoke($10, `load8_u`, [8357]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1118 +assert_return(() => invoke($10, `load8_u`, [8556]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1119 +assert_return(() => invoke($10, `load8_u`, [8755]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1120 +assert_return(() => invoke($10, `load8_u`, [8954]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1121 +assert_return(() => invoke($10, `load8_u`, [9153]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1122 +assert_return(() => invoke($10, `load8_u`, [9352]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1123 +assert_return(() => invoke($10, `load8_u`, [9551]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1124 +assert_return(() => invoke($10, `load8_u`, [9750]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1125 +assert_return(() => invoke($10, `load8_u`, [9949]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1126 +assert_return(() => invoke($10, `load8_u`, [10148]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1127 +assert_return(() => invoke($10, `load8_u`, [10347]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1128 +assert_return(() => invoke($10, `load8_u`, [10546]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1129 +assert_return(() => invoke($10, `load8_u`, [10745]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1130 +assert_return(() => invoke($10, `load8_u`, [10944]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1131 +assert_return(() => invoke($10, `load8_u`, [11143]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1132 +assert_return(() => invoke($10, `load8_u`, [11342]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1133 +assert_return(() => invoke($10, `load8_u`, [11541]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1134 +assert_return(() => invoke($10, `load8_u`, [11740]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1135 +assert_return(() => invoke($10, `load8_u`, [11939]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1136 +assert_return(() => invoke($10, `load8_u`, [12138]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1137 +assert_return(() => invoke($10, `load8_u`, [12337]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1138 +assert_return(() => invoke($10, `load8_u`, [12536]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1139 +assert_return(() => invoke($10, `load8_u`, [12735]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1140 +assert_return(() => invoke($10, `load8_u`, [12934]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1141 +assert_return(() => invoke($10, `load8_u`, [13133]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1142 +assert_return(() => invoke($10, `load8_u`, [13332]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1143 +assert_return(() => invoke($10, `load8_u`, [13531]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1144 +assert_return(() => invoke($10, `load8_u`, [13730]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1145 +assert_return(() => invoke($10, `load8_u`, [13929]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1146 +assert_return(() => invoke($10, `load8_u`, [14128]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1147 +assert_return(() => invoke($10, `load8_u`, [14327]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1148 +assert_return(() => invoke($10, `load8_u`, [14526]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1149 +assert_return(() => invoke($10, `load8_u`, [14725]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1150 +assert_return(() => invoke($10, `load8_u`, [14924]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1151 +assert_return(() => invoke($10, `load8_u`, [15123]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1152 +assert_return(() => invoke($10, `load8_u`, [15322]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1153 +assert_return(() => invoke($10, `load8_u`, [15521]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1154 +assert_return(() => invoke($10, `load8_u`, [15720]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1155 +assert_return(() => invoke($10, `load8_u`, [15919]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1156 +assert_return(() => invoke($10, `load8_u`, [16118]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1157 +assert_return(() => invoke($10, `load8_u`, [16317]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1158 +assert_return(() => invoke($10, `load8_u`, [16516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1159 +assert_return(() => invoke($10, `load8_u`, [16715]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1160 +assert_return(() => invoke($10, `load8_u`, [16914]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1161 +assert_return(() => invoke($10, `load8_u`, [17113]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1162 +assert_return(() => invoke($10, `load8_u`, [17312]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1163 +assert_return(() => invoke($10, `load8_u`, [17511]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1164 +assert_return(() => invoke($10, `load8_u`, [17710]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1165 +assert_return(() => invoke($10, `load8_u`, [17909]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1166 +assert_return(() => invoke($10, `load8_u`, [18108]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1167 +assert_return(() => invoke($10, `load8_u`, [18307]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1168 +assert_return(() => invoke($10, `load8_u`, [18506]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1169 +assert_return(() => invoke($10, `load8_u`, [18705]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1170 +assert_return(() => invoke($10, `load8_u`, [18904]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1171 +assert_return(() => invoke($10, `load8_u`, [19103]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1172 +assert_return(() => invoke($10, `load8_u`, [19302]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1173 +assert_return(() => invoke($10, `load8_u`, [19501]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1174 +assert_return(() => invoke($10, `load8_u`, [19700]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1175 +assert_return(() => invoke($10, `load8_u`, [19899]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1176 +assert_return(() => invoke($10, `load8_u`, [20098]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1177 +assert_return(() => invoke($10, `load8_u`, [20297]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1178 +assert_return(() => invoke($10, `load8_u`, [20496]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1179 +assert_return(() => invoke($10, `load8_u`, [20695]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1180 +assert_return(() => invoke($10, `load8_u`, [20894]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1181 +assert_return(() => invoke($10, `load8_u`, [21093]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1182 +assert_return(() => invoke($10, `load8_u`, [21292]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1183 +assert_return(() => invoke($10, `load8_u`, [21491]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1184 +assert_return(() => invoke($10, `load8_u`, [21690]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1185 +assert_return(() => invoke($10, `load8_u`, [21889]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1186 +assert_return(() => invoke($10, `load8_u`, [22088]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1187 +assert_return(() => invoke($10, `load8_u`, [22287]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1188 +assert_return(() => invoke($10, `load8_u`, [22486]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1189 +assert_return(() => invoke($10, `load8_u`, [22685]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1190 +assert_return(() => invoke($10, `load8_u`, [22884]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1191 +assert_return(() => invoke($10, `load8_u`, [23083]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1192 +assert_return(() => invoke($10, `load8_u`, [23282]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1193 +assert_return(() => invoke($10, `load8_u`, [23481]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1194 +assert_return(() => invoke($10, `load8_u`, [23680]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1195 +assert_return(() => invoke($10, `load8_u`, [23879]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1196 +assert_return(() => invoke($10, `load8_u`, [24078]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1197 +assert_return(() => invoke($10, `load8_u`, [24277]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1198 +assert_return(() => invoke($10, `load8_u`, [24476]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1199 +assert_return(() => invoke($10, `load8_u`, [24675]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1200 +assert_return(() => invoke($10, `load8_u`, [24874]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1201 +assert_return(() => invoke($10, `load8_u`, [25073]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1202 +assert_return(() => invoke($10, `load8_u`, [25272]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1203 +assert_return(() => invoke($10, `load8_u`, [25471]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1204 +assert_return(() => invoke($10, `load8_u`, [25670]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1205 +assert_return(() => invoke($10, `load8_u`, [25869]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1206 +assert_return(() => invoke($10, `load8_u`, [26068]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1207 +assert_return(() => invoke($10, `load8_u`, [26267]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1208 +assert_return(() => invoke($10, `load8_u`, [26466]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1209 +assert_return(() => invoke($10, `load8_u`, [26665]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1210 +assert_return(() => invoke($10, `load8_u`, [26864]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1211 +assert_return(() => invoke($10, `load8_u`, [27063]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1212 +assert_return(() => invoke($10, `load8_u`, [27262]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1213 +assert_return(() => invoke($10, `load8_u`, [27461]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1214 +assert_return(() => invoke($10, `load8_u`, [27660]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1215 +assert_return(() => invoke($10, `load8_u`, [27859]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1216 +assert_return(() => invoke($10, `load8_u`, [28058]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1217 +assert_return(() => invoke($10, `load8_u`, [28257]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1218 +assert_return(() => invoke($10, `load8_u`, [28456]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1219 +assert_return(() => invoke($10, `load8_u`, [28655]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1220 +assert_return(() => invoke($10, `load8_u`, [28854]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1221 +assert_return(() => invoke($10, `load8_u`, [29053]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1222 +assert_return(() => invoke($10, `load8_u`, [29252]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1223 +assert_return(() => invoke($10, `load8_u`, [29451]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1224 +assert_return(() => invoke($10, `load8_u`, [29650]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1225 +assert_return(() => invoke($10, `load8_u`, [29849]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1226 +assert_return(() => invoke($10, `load8_u`, [30048]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1227 +assert_return(() => invoke($10, `load8_u`, [30247]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1228 +assert_return(() => invoke($10, `load8_u`, [30446]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1229 +assert_return(() => invoke($10, `load8_u`, [30645]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1230 +assert_return(() => invoke($10, `load8_u`, [30844]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1231 +assert_return(() => invoke($10, `load8_u`, [31043]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1232 +assert_return(() => invoke($10, `load8_u`, [31242]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1233 +assert_return(() => invoke($10, `load8_u`, [31441]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1234 +assert_return(() => invoke($10, `load8_u`, [31640]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1235 +assert_return(() => invoke($10, `load8_u`, [31839]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1236 +assert_return(() => invoke($10, `load8_u`, [32038]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1237 +assert_return(() => invoke($10, `load8_u`, [32237]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1238 +assert_return(() => invoke($10, `load8_u`, [32436]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1239 +assert_return(() => invoke($10, `load8_u`, [32635]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1240 +assert_return(() => invoke($10, `load8_u`, [32834]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1241 +assert_return(() => invoke($10, `load8_u`, [33033]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1242 +assert_return(() => invoke($10, `load8_u`, [33232]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1243 +assert_return(() => invoke($10, `load8_u`, [33431]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1244 +assert_return(() => invoke($10, `load8_u`, [33630]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1245 +assert_return(() => invoke($10, `load8_u`, [33829]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1246 +assert_return(() => invoke($10, `load8_u`, [34028]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1247 +assert_return(() => invoke($10, `load8_u`, [34227]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1248 +assert_return(() => invoke($10, `load8_u`, [34426]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1249 +assert_return(() => invoke($10, `load8_u`, [34625]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1250 +assert_return(() => invoke($10, `load8_u`, [34824]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1251 +assert_return(() => invoke($10, `load8_u`, [35023]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1252 +assert_return(() => invoke($10, `load8_u`, [35222]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1253 +assert_return(() => invoke($10, `load8_u`, [35421]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1254 +assert_return(() => invoke($10, `load8_u`, [35620]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1255 +assert_return(() => invoke($10, `load8_u`, [35819]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1256 +assert_return(() => invoke($10, `load8_u`, [36018]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1257 +assert_return(() => invoke($10, `load8_u`, [36217]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1258 +assert_return(() => invoke($10, `load8_u`, [36416]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1259 +assert_return(() => invoke($10, `load8_u`, [36615]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1260 +assert_return(() => invoke($10, `load8_u`, [36814]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1261 +assert_return(() => invoke($10, `load8_u`, [37013]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1262 +assert_return(() => invoke($10, `load8_u`, [37212]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1263 +assert_return(() => invoke($10, `load8_u`, [37411]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1264 +assert_return(() => invoke($10, `load8_u`, [37610]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1265 +assert_return(() => invoke($10, `load8_u`, [37809]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1266 +assert_return(() => invoke($10, `load8_u`, [38008]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1267 +assert_return(() => invoke($10, `load8_u`, [38207]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1268 +assert_return(() => invoke($10, `load8_u`, [38406]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1269 +assert_return(() => invoke($10, `load8_u`, [38605]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1270 +assert_return(() => invoke($10, `load8_u`, [38804]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1271 +assert_return(() => invoke($10, `load8_u`, [39003]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1272 +assert_return(() => invoke($10, `load8_u`, [39202]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1273 +assert_return(() => invoke($10, `load8_u`, [39401]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1274 +assert_return(() => invoke($10, `load8_u`, [39600]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1275 +assert_return(() => invoke($10, `load8_u`, [39799]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1276 +assert_return(() => invoke($10, `load8_u`, [39998]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1277 +assert_return(() => invoke($10, `load8_u`, [40197]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1278 +assert_return(() => invoke($10, `load8_u`, [40396]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1279 +assert_return(() => invoke($10, `load8_u`, [40595]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1280 +assert_return(() => invoke($10, `load8_u`, [40794]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1281 +assert_return(() => invoke($10, `load8_u`, [40993]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1282 +assert_return(() => invoke($10, `load8_u`, [41192]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1283 +assert_return(() => invoke($10, `load8_u`, [41391]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1284 +assert_return(() => invoke($10, `load8_u`, [41590]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1285 +assert_return(() => invoke($10, `load8_u`, [41789]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1286 +assert_return(() => invoke($10, `load8_u`, [41988]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1287 +assert_return(() => invoke($10, `load8_u`, [42187]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1288 +assert_return(() => invoke($10, `load8_u`, [42386]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1289 +assert_return(() => invoke($10, `load8_u`, [42585]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1290 +assert_return(() => invoke($10, `load8_u`, [42784]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1291 +assert_return(() => invoke($10, `load8_u`, [42983]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1292 +assert_return(() => invoke($10, `load8_u`, [43182]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1293 +assert_return(() => invoke($10, `load8_u`, [43381]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1294 +assert_return(() => invoke($10, `load8_u`, [43580]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1295 +assert_return(() => invoke($10, `load8_u`, [43779]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1296 +assert_return(() => invoke($10, `load8_u`, [43978]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1297 +assert_return(() => invoke($10, `load8_u`, [44177]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1298 +assert_return(() => invoke($10, `load8_u`, [44376]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1299 +assert_return(() => invoke($10, `load8_u`, [44575]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1300 +assert_return(() => invoke($10, `load8_u`, [44774]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1301 +assert_return(() => invoke($10, `load8_u`, [44973]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1302 +assert_return(() => invoke($10, `load8_u`, [45172]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1303 +assert_return(() => invoke($10, `load8_u`, [45371]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1304 +assert_return(() => invoke($10, `load8_u`, [45570]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1305 +assert_return(() => invoke($10, `load8_u`, [45769]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1306 +assert_return(() => invoke($10, `load8_u`, [45968]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1307 +assert_return(() => invoke($10, `load8_u`, [46167]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1308 +assert_return(() => invoke($10, `load8_u`, [46366]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1309 +assert_return(() => invoke($10, `load8_u`, [46565]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1310 +assert_return(() => invoke($10, `load8_u`, [46764]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1311 +assert_return(() => invoke($10, `load8_u`, [46963]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1312 +assert_return(() => invoke($10, `load8_u`, [47162]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1313 +assert_return(() => invoke($10, `load8_u`, [47361]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1314 +assert_return(() => invoke($10, `load8_u`, [47560]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1315 +assert_return(() => invoke($10, `load8_u`, [47759]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1316 +assert_return(() => invoke($10, `load8_u`, [47958]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1317 +assert_return(() => invoke($10, `load8_u`, [48157]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1318 +assert_return(() => invoke($10, `load8_u`, [48356]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1319 +assert_return(() => invoke($10, `load8_u`, [48555]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1320 +assert_return(() => invoke($10, `load8_u`, [48754]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1321 +assert_return(() => invoke($10, `load8_u`, [48953]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1322 +assert_return(() => invoke($10, `load8_u`, [49152]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1323 +assert_return(() => invoke($10, `load8_u`, [49351]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1324 +assert_return(() => invoke($10, `load8_u`, [49550]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1325 +assert_return(() => invoke($10, `load8_u`, [49749]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1326 +assert_return(() => invoke($10, `load8_u`, [49948]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1327 +assert_return(() => invoke($10, `load8_u`, [50147]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1328 +assert_return(() => invoke($10, `load8_u`, [50346]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1329 +assert_return(() => invoke($10, `load8_u`, [50545]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1330 +assert_return(() => invoke($10, `load8_u`, [50744]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1331 +assert_return(() => invoke($10, `load8_u`, [50943]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1332 +assert_return(() => invoke($10, `load8_u`, [51142]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1333 +assert_return(() => invoke($10, `load8_u`, [51341]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1334 +assert_return(() => invoke($10, `load8_u`, [51540]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1335 +assert_return(() => invoke($10, `load8_u`, [51739]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1336 +assert_return(() => invoke($10, `load8_u`, [51938]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1337 +assert_return(() => invoke($10, `load8_u`, [52137]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1338 +assert_return(() => invoke($10, `load8_u`, [52336]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1339 +assert_return(() => invoke($10, `load8_u`, [52535]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1340 +assert_return(() => invoke($10, `load8_u`, [52734]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1341 +assert_return(() => invoke($10, `load8_u`, [52933]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1342 +assert_return(() => invoke($10, `load8_u`, [53132]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1343 +assert_return(() => invoke($10, `load8_u`, [53331]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1344 +assert_return(() => invoke($10, `load8_u`, [53530]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1345 +assert_return(() => invoke($10, `load8_u`, [53729]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1346 +assert_return(() => invoke($10, `load8_u`, [53928]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1347 +assert_return(() => invoke($10, `load8_u`, [54127]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1348 +assert_return(() => invoke($10, `load8_u`, [54326]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1349 +assert_return(() => invoke($10, `load8_u`, [54525]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1350 +assert_return(() => invoke($10, `load8_u`, [54724]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1351 +assert_return(() => invoke($10, `load8_u`, [54923]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1352 +assert_return(() => invoke($10, `load8_u`, [55122]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1353 +assert_return(() => invoke($10, `load8_u`, [55321]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1354 +assert_return(() => invoke($10, `load8_u`, [55520]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1355 +assert_return(() => invoke($10, `load8_u`, [55719]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1356 +assert_return(() => invoke($10, `load8_u`, [55918]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1357 +assert_return(() => invoke($10, `load8_u`, [56117]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1358 +assert_return(() => invoke($10, `load8_u`, [56316]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1359 +assert_return(() => invoke($10, `load8_u`, [56515]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1360 +assert_return(() => invoke($10, `load8_u`, [56714]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1361 +assert_return(() => invoke($10, `load8_u`, [56913]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1362 +assert_return(() => invoke($10, `load8_u`, [57112]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1363 +assert_return(() => invoke($10, `load8_u`, [57311]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1364 +assert_return(() => invoke($10, `load8_u`, [57510]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1365 +assert_return(() => invoke($10, `load8_u`, [57709]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1366 +assert_return(() => invoke($10, `load8_u`, [57908]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1367 +assert_return(() => invoke($10, `load8_u`, [58107]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1368 +assert_return(() => invoke($10, `load8_u`, [58306]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1369 +assert_return(() => invoke($10, `load8_u`, [58505]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1370 +assert_return(() => invoke($10, `load8_u`, [58704]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1371 +assert_return(() => invoke($10, `load8_u`, [58903]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1372 +assert_return(() => invoke($10, `load8_u`, [59102]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1373 +assert_return(() => invoke($10, `load8_u`, [59301]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1374 +assert_return(() => invoke($10, `load8_u`, [59500]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1375 +assert_return(() => invoke($10, `load8_u`, [59699]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1376 +assert_return(() => invoke($10, `load8_u`, [59898]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1377 +assert_return(() => invoke($10, `load8_u`, [60097]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1378 +assert_return(() => invoke($10, `load8_u`, [60296]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1379 +assert_return(() => invoke($10, `load8_u`, [60495]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1380 +assert_return(() => invoke($10, `load8_u`, [60694]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1381 +assert_return(() => invoke($10, `load8_u`, [60893]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1382 +assert_return(() => invoke($10, `load8_u`, [61092]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1383 +assert_return(() => invoke($10, `load8_u`, [61291]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1384 +assert_return(() => invoke($10, `load8_u`, [61490]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1385 +assert_return(() => invoke($10, `load8_u`, [61689]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1386 +assert_return(() => invoke($10, `load8_u`, [61888]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1387 +assert_return(() => invoke($10, `load8_u`, [62087]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1388 +assert_return(() => invoke($10, `load8_u`, [62286]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1389 +assert_return(() => invoke($10, `load8_u`, [62485]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1390 +assert_return(() => invoke($10, `load8_u`, [62684]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1391 +assert_return(() => invoke($10, `load8_u`, [62883]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1392 +assert_return(() => invoke($10, `load8_u`, [63082]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1393 +assert_return(() => invoke($10, `load8_u`, [63281]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1394 +assert_return(() => invoke($10, `load8_u`, [63480]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1395 +assert_return(() => invoke($10, `load8_u`, [63679]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1396 +assert_return(() => invoke($10, `load8_u`, [63878]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1397 +assert_return(() => invoke($10, `load8_u`, [64077]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1398 +assert_return(() => invoke($10, `load8_u`, [64276]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1399 +assert_return(() => invoke($10, `load8_u`, [64475]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1400 +assert_return(() => invoke($10, `load8_u`, [64674]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1401 +assert_return(() => invoke($10, `load8_u`, [64873]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1402 +assert_return(() => invoke($10, `load8_u`, [65072]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1403 +assert_return(() => invoke($10, `load8_u`, [65271]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1404 +assert_return(() => invoke($10, `load8_u`, [65470]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1405 +assert_return(() => invoke($10, `load8_u`, [65516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1406 +assert_return(() => invoke($10, `load8_u`, [65517]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:1407 +assert_return(() => invoke($10, `load8_u`, [65518]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:1408 +assert_return(() => invoke($10, `load8_u`, [65519]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:1409 +assert_return(() => invoke($10, `load8_u`, [65520]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:1410 +assert_return(() => invoke($10, `load8_u`, [65521]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:1411 +assert_return(() => invoke($10, `load8_u`, [65522]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:1412 +assert_return(() => invoke($10, `load8_u`, [65523]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:1413 +assert_return(() => invoke($10, `load8_u`, [65524]), [value("i32", 8)]); + +// ./test/core/memory_copy.wast:1414 +assert_return(() => invoke($10, `load8_u`, [65525]), [value("i32", 9)]); + +// ./test/core/memory_copy.wast:1415 +assert_return(() => invoke($10, `load8_u`, [65526]), [value("i32", 10)]); + +// ./test/core/memory_copy.wast:1416 +assert_return(() => invoke($10, `load8_u`, [65527]), [value("i32", 11)]); + +// ./test/core/memory_copy.wast:1417 +assert_return(() => invoke($10, `load8_u`, [65528]), [value("i32", 12)]); + +// ./test/core/memory_copy.wast:1418 +assert_return(() => invoke($10, `load8_u`, [65529]), [value("i32", 13)]); + +// ./test/core/memory_copy.wast:1419 +assert_return(() => invoke($10, `load8_u`, [65530]), [value("i32", 14)]); + +// ./test/core/memory_copy.wast:1420 +assert_return(() => invoke($10, `load8_u`, [65531]), [value("i32", 15)]); + +// ./test/core/memory_copy.wast:1421 +assert_return(() => invoke($10, `load8_u`, [65532]), [value("i32", 16)]); + +// ./test/core/memory_copy.wast:1422 +assert_return(() => invoke($10, `load8_u`, [65533]), [value("i32", 17)]); + +// ./test/core/memory_copy.wast:1423 +assert_return(() => invoke($10, `load8_u`, [65534]), [value("i32", 18)]); + +// ./test/core/memory_copy.wast:1424 +assert_return(() => invoke($10, `load8_u`, [65535]), [value("i32", 19)]); + +// ./test/core/memory_copy.wast:1426 +let $11 = instantiate(`(module + (memory (export "mem") 1 1 ) + (data (i32.const 65515) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\\14") + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (memory.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:1434 +assert_trap(() => invoke($11, `run`, [0, 65515, 39]), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:1437 +assert_return(() => invoke($11, `load8_u`, [198]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1438 +assert_return(() => invoke($11, `load8_u`, [397]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1439 +assert_return(() => invoke($11, `load8_u`, [596]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1440 +assert_return(() => invoke($11, `load8_u`, [795]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1441 +assert_return(() => invoke($11, `load8_u`, [994]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1442 +assert_return(() => invoke($11, `load8_u`, [1193]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1443 +assert_return(() => invoke($11, `load8_u`, [1392]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1444 +assert_return(() => invoke($11, `load8_u`, [1591]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1445 +assert_return(() => invoke($11, `load8_u`, [1790]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1446 +assert_return(() => invoke($11, `load8_u`, [1989]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1447 +assert_return(() => invoke($11, `load8_u`, [2188]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1448 +assert_return(() => invoke($11, `load8_u`, [2387]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1449 +assert_return(() => invoke($11, `load8_u`, [2586]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1450 +assert_return(() => invoke($11, `load8_u`, [2785]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1451 +assert_return(() => invoke($11, `load8_u`, [2984]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1452 +assert_return(() => invoke($11, `load8_u`, [3183]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1453 +assert_return(() => invoke($11, `load8_u`, [3382]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1454 +assert_return(() => invoke($11, `load8_u`, [3581]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1455 +assert_return(() => invoke($11, `load8_u`, [3780]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1456 +assert_return(() => invoke($11, `load8_u`, [3979]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1457 +assert_return(() => invoke($11, `load8_u`, [4178]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1458 +assert_return(() => invoke($11, `load8_u`, [4377]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1459 +assert_return(() => invoke($11, `load8_u`, [4576]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1460 +assert_return(() => invoke($11, `load8_u`, [4775]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1461 +assert_return(() => invoke($11, `load8_u`, [4974]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1462 +assert_return(() => invoke($11, `load8_u`, [5173]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1463 +assert_return(() => invoke($11, `load8_u`, [5372]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1464 +assert_return(() => invoke($11, `load8_u`, [5571]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1465 +assert_return(() => invoke($11, `load8_u`, [5770]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1466 +assert_return(() => invoke($11, `load8_u`, [5969]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1467 +assert_return(() => invoke($11, `load8_u`, [6168]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1468 +assert_return(() => invoke($11, `load8_u`, [6367]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1469 +assert_return(() => invoke($11, `load8_u`, [6566]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1470 +assert_return(() => invoke($11, `load8_u`, [6765]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1471 +assert_return(() => invoke($11, `load8_u`, [6964]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1472 +assert_return(() => invoke($11, `load8_u`, [7163]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1473 +assert_return(() => invoke($11, `load8_u`, [7362]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1474 +assert_return(() => invoke($11, `load8_u`, [7561]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1475 +assert_return(() => invoke($11, `load8_u`, [7760]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1476 +assert_return(() => invoke($11, `load8_u`, [7959]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1477 +assert_return(() => invoke($11, `load8_u`, [8158]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1478 +assert_return(() => invoke($11, `load8_u`, [8357]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1479 +assert_return(() => invoke($11, `load8_u`, [8556]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1480 +assert_return(() => invoke($11, `load8_u`, [8755]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1481 +assert_return(() => invoke($11, `load8_u`, [8954]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1482 +assert_return(() => invoke($11, `load8_u`, [9153]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1483 +assert_return(() => invoke($11, `load8_u`, [9352]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1484 +assert_return(() => invoke($11, `load8_u`, [9551]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1485 +assert_return(() => invoke($11, `load8_u`, [9750]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1486 +assert_return(() => invoke($11, `load8_u`, [9949]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1487 +assert_return(() => invoke($11, `load8_u`, [10148]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1488 +assert_return(() => invoke($11, `load8_u`, [10347]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1489 +assert_return(() => invoke($11, `load8_u`, [10546]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1490 +assert_return(() => invoke($11, `load8_u`, [10745]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1491 +assert_return(() => invoke($11, `load8_u`, [10944]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1492 +assert_return(() => invoke($11, `load8_u`, [11143]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1493 +assert_return(() => invoke($11, `load8_u`, [11342]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1494 +assert_return(() => invoke($11, `load8_u`, [11541]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1495 +assert_return(() => invoke($11, `load8_u`, [11740]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1496 +assert_return(() => invoke($11, `load8_u`, [11939]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1497 +assert_return(() => invoke($11, `load8_u`, [12138]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1498 +assert_return(() => invoke($11, `load8_u`, [12337]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1499 +assert_return(() => invoke($11, `load8_u`, [12536]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1500 +assert_return(() => invoke($11, `load8_u`, [12735]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1501 +assert_return(() => invoke($11, `load8_u`, [12934]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1502 +assert_return(() => invoke($11, `load8_u`, [13133]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1503 +assert_return(() => invoke($11, `load8_u`, [13332]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1504 +assert_return(() => invoke($11, `load8_u`, [13531]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1505 +assert_return(() => invoke($11, `load8_u`, [13730]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1506 +assert_return(() => invoke($11, `load8_u`, [13929]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1507 +assert_return(() => invoke($11, `load8_u`, [14128]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1508 +assert_return(() => invoke($11, `load8_u`, [14327]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1509 +assert_return(() => invoke($11, `load8_u`, [14526]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1510 +assert_return(() => invoke($11, `load8_u`, [14725]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1511 +assert_return(() => invoke($11, `load8_u`, [14924]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1512 +assert_return(() => invoke($11, `load8_u`, [15123]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1513 +assert_return(() => invoke($11, `load8_u`, [15322]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1514 +assert_return(() => invoke($11, `load8_u`, [15521]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1515 +assert_return(() => invoke($11, `load8_u`, [15720]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1516 +assert_return(() => invoke($11, `load8_u`, [15919]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1517 +assert_return(() => invoke($11, `load8_u`, [16118]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1518 +assert_return(() => invoke($11, `load8_u`, [16317]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1519 +assert_return(() => invoke($11, `load8_u`, [16516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1520 +assert_return(() => invoke($11, `load8_u`, [16715]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1521 +assert_return(() => invoke($11, `load8_u`, [16914]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1522 +assert_return(() => invoke($11, `load8_u`, [17113]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1523 +assert_return(() => invoke($11, `load8_u`, [17312]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1524 +assert_return(() => invoke($11, `load8_u`, [17511]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1525 +assert_return(() => invoke($11, `load8_u`, [17710]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1526 +assert_return(() => invoke($11, `load8_u`, [17909]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1527 +assert_return(() => invoke($11, `load8_u`, [18108]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1528 +assert_return(() => invoke($11, `load8_u`, [18307]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1529 +assert_return(() => invoke($11, `load8_u`, [18506]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1530 +assert_return(() => invoke($11, `load8_u`, [18705]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1531 +assert_return(() => invoke($11, `load8_u`, [18904]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1532 +assert_return(() => invoke($11, `load8_u`, [19103]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1533 +assert_return(() => invoke($11, `load8_u`, [19302]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1534 +assert_return(() => invoke($11, `load8_u`, [19501]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1535 +assert_return(() => invoke($11, `load8_u`, [19700]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1536 +assert_return(() => invoke($11, `load8_u`, [19899]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1537 +assert_return(() => invoke($11, `load8_u`, [20098]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1538 +assert_return(() => invoke($11, `load8_u`, [20297]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1539 +assert_return(() => invoke($11, `load8_u`, [20496]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1540 +assert_return(() => invoke($11, `load8_u`, [20695]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1541 +assert_return(() => invoke($11, `load8_u`, [20894]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1542 +assert_return(() => invoke($11, `load8_u`, [21093]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1543 +assert_return(() => invoke($11, `load8_u`, [21292]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1544 +assert_return(() => invoke($11, `load8_u`, [21491]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1545 +assert_return(() => invoke($11, `load8_u`, [21690]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1546 +assert_return(() => invoke($11, `load8_u`, [21889]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1547 +assert_return(() => invoke($11, `load8_u`, [22088]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1548 +assert_return(() => invoke($11, `load8_u`, [22287]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1549 +assert_return(() => invoke($11, `load8_u`, [22486]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1550 +assert_return(() => invoke($11, `load8_u`, [22685]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1551 +assert_return(() => invoke($11, `load8_u`, [22884]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1552 +assert_return(() => invoke($11, `load8_u`, [23083]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1553 +assert_return(() => invoke($11, `load8_u`, [23282]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1554 +assert_return(() => invoke($11, `load8_u`, [23481]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1555 +assert_return(() => invoke($11, `load8_u`, [23680]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1556 +assert_return(() => invoke($11, `load8_u`, [23879]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1557 +assert_return(() => invoke($11, `load8_u`, [24078]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1558 +assert_return(() => invoke($11, `load8_u`, [24277]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1559 +assert_return(() => invoke($11, `load8_u`, [24476]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1560 +assert_return(() => invoke($11, `load8_u`, [24675]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1561 +assert_return(() => invoke($11, `load8_u`, [24874]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1562 +assert_return(() => invoke($11, `load8_u`, [25073]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1563 +assert_return(() => invoke($11, `load8_u`, [25272]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1564 +assert_return(() => invoke($11, `load8_u`, [25471]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1565 +assert_return(() => invoke($11, `load8_u`, [25670]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1566 +assert_return(() => invoke($11, `load8_u`, [25869]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1567 +assert_return(() => invoke($11, `load8_u`, [26068]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1568 +assert_return(() => invoke($11, `load8_u`, [26267]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1569 +assert_return(() => invoke($11, `load8_u`, [26466]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1570 +assert_return(() => invoke($11, `load8_u`, [26665]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1571 +assert_return(() => invoke($11, `load8_u`, [26864]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1572 +assert_return(() => invoke($11, `load8_u`, [27063]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1573 +assert_return(() => invoke($11, `load8_u`, [27262]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1574 +assert_return(() => invoke($11, `load8_u`, [27461]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1575 +assert_return(() => invoke($11, `load8_u`, [27660]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1576 +assert_return(() => invoke($11, `load8_u`, [27859]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1577 +assert_return(() => invoke($11, `load8_u`, [28058]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1578 +assert_return(() => invoke($11, `load8_u`, [28257]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1579 +assert_return(() => invoke($11, `load8_u`, [28456]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1580 +assert_return(() => invoke($11, `load8_u`, [28655]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1581 +assert_return(() => invoke($11, `load8_u`, [28854]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1582 +assert_return(() => invoke($11, `load8_u`, [29053]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1583 +assert_return(() => invoke($11, `load8_u`, [29252]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1584 +assert_return(() => invoke($11, `load8_u`, [29451]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1585 +assert_return(() => invoke($11, `load8_u`, [29650]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1586 +assert_return(() => invoke($11, `load8_u`, [29849]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1587 +assert_return(() => invoke($11, `load8_u`, [30048]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1588 +assert_return(() => invoke($11, `load8_u`, [30247]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1589 +assert_return(() => invoke($11, `load8_u`, [30446]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1590 +assert_return(() => invoke($11, `load8_u`, [30645]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1591 +assert_return(() => invoke($11, `load8_u`, [30844]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1592 +assert_return(() => invoke($11, `load8_u`, [31043]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1593 +assert_return(() => invoke($11, `load8_u`, [31242]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1594 +assert_return(() => invoke($11, `load8_u`, [31441]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1595 +assert_return(() => invoke($11, `load8_u`, [31640]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1596 +assert_return(() => invoke($11, `load8_u`, [31839]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1597 +assert_return(() => invoke($11, `load8_u`, [32038]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1598 +assert_return(() => invoke($11, `load8_u`, [32237]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1599 +assert_return(() => invoke($11, `load8_u`, [32436]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1600 +assert_return(() => invoke($11, `load8_u`, [32635]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1601 +assert_return(() => invoke($11, `load8_u`, [32834]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1602 +assert_return(() => invoke($11, `load8_u`, [33033]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1603 +assert_return(() => invoke($11, `load8_u`, [33232]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1604 +assert_return(() => invoke($11, `load8_u`, [33431]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1605 +assert_return(() => invoke($11, `load8_u`, [33630]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1606 +assert_return(() => invoke($11, `load8_u`, [33829]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1607 +assert_return(() => invoke($11, `load8_u`, [34028]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1608 +assert_return(() => invoke($11, `load8_u`, [34227]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1609 +assert_return(() => invoke($11, `load8_u`, [34426]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1610 +assert_return(() => invoke($11, `load8_u`, [34625]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1611 +assert_return(() => invoke($11, `load8_u`, [34824]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1612 +assert_return(() => invoke($11, `load8_u`, [35023]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1613 +assert_return(() => invoke($11, `load8_u`, [35222]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1614 +assert_return(() => invoke($11, `load8_u`, [35421]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1615 +assert_return(() => invoke($11, `load8_u`, [35620]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1616 +assert_return(() => invoke($11, `load8_u`, [35819]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1617 +assert_return(() => invoke($11, `load8_u`, [36018]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1618 +assert_return(() => invoke($11, `load8_u`, [36217]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1619 +assert_return(() => invoke($11, `load8_u`, [36416]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1620 +assert_return(() => invoke($11, `load8_u`, [36615]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1621 +assert_return(() => invoke($11, `load8_u`, [36814]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1622 +assert_return(() => invoke($11, `load8_u`, [37013]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1623 +assert_return(() => invoke($11, `load8_u`, [37212]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1624 +assert_return(() => invoke($11, `load8_u`, [37411]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1625 +assert_return(() => invoke($11, `load8_u`, [37610]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1626 +assert_return(() => invoke($11, `load8_u`, [37809]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1627 +assert_return(() => invoke($11, `load8_u`, [38008]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1628 +assert_return(() => invoke($11, `load8_u`, [38207]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1629 +assert_return(() => invoke($11, `load8_u`, [38406]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1630 +assert_return(() => invoke($11, `load8_u`, [38605]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1631 +assert_return(() => invoke($11, `load8_u`, [38804]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1632 +assert_return(() => invoke($11, `load8_u`, [39003]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1633 +assert_return(() => invoke($11, `load8_u`, [39202]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1634 +assert_return(() => invoke($11, `load8_u`, [39401]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1635 +assert_return(() => invoke($11, `load8_u`, [39600]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1636 +assert_return(() => invoke($11, `load8_u`, [39799]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1637 +assert_return(() => invoke($11, `load8_u`, [39998]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1638 +assert_return(() => invoke($11, `load8_u`, [40197]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1639 +assert_return(() => invoke($11, `load8_u`, [40396]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1640 +assert_return(() => invoke($11, `load8_u`, [40595]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1641 +assert_return(() => invoke($11, `load8_u`, [40794]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1642 +assert_return(() => invoke($11, `load8_u`, [40993]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1643 +assert_return(() => invoke($11, `load8_u`, [41192]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1644 +assert_return(() => invoke($11, `load8_u`, [41391]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1645 +assert_return(() => invoke($11, `load8_u`, [41590]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1646 +assert_return(() => invoke($11, `load8_u`, [41789]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1647 +assert_return(() => invoke($11, `load8_u`, [41988]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1648 +assert_return(() => invoke($11, `load8_u`, [42187]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1649 +assert_return(() => invoke($11, `load8_u`, [42386]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1650 +assert_return(() => invoke($11, `load8_u`, [42585]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1651 +assert_return(() => invoke($11, `load8_u`, [42784]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1652 +assert_return(() => invoke($11, `load8_u`, [42983]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1653 +assert_return(() => invoke($11, `load8_u`, [43182]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1654 +assert_return(() => invoke($11, `load8_u`, [43381]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1655 +assert_return(() => invoke($11, `load8_u`, [43580]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1656 +assert_return(() => invoke($11, `load8_u`, [43779]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1657 +assert_return(() => invoke($11, `load8_u`, [43978]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1658 +assert_return(() => invoke($11, `load8_u`, [44177]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1659 +assert_return(() => invoke($11, `load8_u`, [44376]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1660 +assert_return(() => invoke($11, `load8_u`, [44575]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1661 +assert_return(() => invoke($11, `load8_u`, [44774]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1662 +assert_return(() => invoke($11, `load8_u`, [44973]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1663 +assert_return(() => invoke($11, `load8_u`, [45172]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1664 +assert_return(() => invoke($11, `load8_u`, [45371]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1665 +assert_return(() => invoke($11, `load8_u`, [45570]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1666 +assert_return(() => invoke($11, `load8_u`, [45769]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1667 +assert_return(() => invoke($11, `load8_u`, [45968]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1668 +assert_return(() => invoke($11, `load8_u`, [46167]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1669 +assert_return(() => invoke($11, `load8_u`, [46366]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1670 +assert_return(() => invoke($11, `load8_u`, [46565]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1671 +assert_return(() => invoke($11, `load8_u`, [46764]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1672 +assert_return(() => invoke($11, `load8_u`, [46963]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1673 +assert_return(() => invoke($11, `load8_u`, [47162]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1674 +assert_return(() => invoke($11, `load8_u`, [47361]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1675 +assert_return(() => invoke($11, `load8_u`, [47560]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1676 +assert_return(() => invoke($11, `load8_u`, [47759]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1677 +assert_return(() => invoke($11, `load8_u`, [47958]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1678 +assert_return(() => invoke($11, `load8_u`, [48157]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1679 +assert_return(() => invoke($11, `load8_u`, [48356]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1680 +assert_return(() => invoke($11, `load8_u`, [48555]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1681 +assert_return(() => invoke($11, `load8_u`, [48754]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1682 +assert_return(() => invoke($11, `load8_u`, [48953]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1683 +assert_return(() => invoke($11, `load8_u`, [49152]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1684 +assert_return(() => invoke($11, `load8_u`, [49351]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1685 +assert_return(() => invoke($11, `load8_u`, [49550]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1686 +assert_return(() => invoke($11, `load8_u`, [49749]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1687 +assert_return(() => invoke($11, `load8_u`, [49948]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1688 +assert_return(() => invoke($11, `load8_u`, [50147]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1689 +assert_return(() => invoke($11, `load8_u`, [50346]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1690 +assert_return(() => invoke($11, `load8_u`, [50545]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1691 +assert_return(() => invoke($11, `load8_u`, [50744]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1692 +assert_return(() => invoke($11, `load8_u`, [50943]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1693 +assert_return(() => invoke($11, `load8_u`, [51142]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1694 +assert_return(() => invoke($11, `load8_u`, [51341]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1695 +assert_return(() => invoke($11, `load8_u`, [51540]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1696 +assert_return(() => invoke($11, `load8_u`, [51739]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1697 +assert_return(() => invoke($11, `load8_u`, [51938]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1698 +assert_return(() => invoke($11, `load8_u`, [52137]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1699 +assert_return(() => invoke($11, `load8_u`, [52336]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1700 +assert_return(() => invoke($11, `load8_u`, [52535]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1701 +assert_return(() => invoke($11, `load8_u`, [52734]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1702 +assert_return(() => invoke($11, `load8_u`, [52933]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1703 +assert_return(() => invoke($11, `load8_u`, [53132]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1704 +assert_return(() => invoke($11, `load8_u`, [53331]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1705 +assert_return(() => invoke($11, `load8_u`, [53530]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1706 +assert_return(() => invoke($11, `load8_u`, [53729]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1707 +assert_return(() => invoke($11, `load8_u`, [53928]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1708 +assert_return(() => invoke($11, `load8_u`, [54127]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1709 +assert_return(() => invoke($11, `load8_u`, [54326]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1710 +assert_return(() => invoke($11, `load8_u`, [54525]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1711 +assert_return(() => invoke($11, `load8_u`, [54724]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1712 +assert_return(() => invoke($11, `load8_u`, [54923]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1713 +assert_return(() => invoke($11, `load8_u`, [55122]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1714 +assert_return(() => invoke($11, `load8_u`, [55321]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1715 +assert_return(() => invoke($11, `load8_u`, [55520]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1716 +assert_return(() => invoke($11, `load8_u`, [55719]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1717 +assert_return(() => invoke($11, `load8_u`, [55918]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1718 +assert_return(() => invoke($11, `load8_u`, [56117]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1719 +assert_return(() => invoke($11, `load8_u`, [56316]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1720 +assert_return(() => invoke($11, `load8_u`, [56515]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1721 +assert_return(() => invoke($11, `load8_u`, [56714]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1722 +assert_return(() => invoke($11, `load8_u`, [56913]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1723 +assert_return(() => invoke($11, `load8_u`, [57112]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1724 +assert_return(() => invoke($11, `load8_u`, [57311]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1725 +assert_return(() => invoke($11, `load8_u`, [57510]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1726 +assert_return(() => invoke($11, `load8_u`, [57709]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1727 +assert_return(() => invoke($11, `load8_u`, [57908]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1728 +assert_return(() => invoke($11, `load8_u`, [58107]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1729 +assert_return(() => invoke($11, `load8_u`, [58306]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1730 +assert_return(() => invoke($11, `load8_u`, [58505]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1731 +assert_return(() => invoke($11, `load8_u`, [58704]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1732 +assert_return(() => invoke($11, `load8_u`, [58903]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1733 +assert_return(() => invoke($11, `load8_u`, [59102]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1734 +assert_return(() => invoke($11, `load8_u`, [59301]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1735 +assert_return(() => invoke($11, `load8_u`, [59500]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1736 +assert_return(() => invoke($11, `load8_u`, [59699]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1737 +assert_return(() => invoke($11, `load8_u`, [59898]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1738 +assert_return(() => invoke($11, `load8_u`, [60097]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1739 +assert_return(() => invoke($11, `load8_u`, [60296]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1740 +assert_return(() => invoke($11, `load8_u`, [60495]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1741 +assert_return(() => invoke($11, `load8_u`, [60694]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1742 +assert_return(() => invoke($11, `load8_u`, [60893]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1743 +assert_return(() => invoke($11, `load8_u`, [61092]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1744 +assert_return(() => invoke($11, `load8_u`, [61291]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1745 +assert_return(() => invoke($11, `load8_u`, [61490]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1746 +assert_return(() => invoke($11, `load8_u`, [61689]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1747 +assert_return(() => invoke($11, `load8_u`, [61888]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1748 +assert_return(() => invoke($11, `load8_u`, [62087]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1749 +assert_return(() => invoke($11, `load8_u`, [62286]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1750 +assert_return(() => invoke($11, `load8_u`, [62485]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1751 +assert_return(() => invoke($11, `load8_u`, [62684]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1752 +assert_return(() => invoke($11, `load8_u`, [62883]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1753 +assert_return(() => invoke($11, `load8_u`, [63082]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1754 +assert_return(() => invoke($11, `load8_u`, [63281]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1755 +assert_return(() => invoke($11, `load8_u`, [63480]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1756 +assert_return(() => invoke($11, `load8_u`, [63679]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1757 +assert_return(() => invoke($11, `load8_u`, [63878]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1758 +assert_return(() => invoke($11, `load8_u`, [64077]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1759 +assert_return(() => invoke($11, `load8_u`, [64276]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1760 +assert_return(() => invoke($11, `load8_u`, [64475]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1761 +assert_return(() => invoke($11, `load8_u`, [64674]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1762 +assert_return(() => invoke($11, `load8_u`, [64873]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1763 +assert_return(() => invoke($11, `load8_u`, [65072]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1764 +assert_return(() => invoke($11, `load8_u`, [65271]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1765 +assert_return(() => invoke($11, `load8_u`, [65470]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1766 +assert_return(() => invoke($11, `load8_u`, [65515]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1767 +assert_return(() => invoke($11, `load8_u`, [65516]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:1768 +assert_return(() => invoke($11, `load8_u`, [65517]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:1769 +assert_return(() => invoke($11, `load8_u`, [65518]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:1770 +assert_return(() => invoke($11, `load8_u`, [65519]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:1771 +assert_return(() => invoke($11, `load8_u`, [65520]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:1772 +assert_return(() => invoke($11, `load8_u`, [65521]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:1773 +assert_return(() => invoke($11, `load8_u`, [65522]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:1774 +assert_return(() => invoke($11, `load8_u`, [65523]), [value("i32", 8)]); + +// ./test/core/memory_copy.wast:1775 +assert_return(() => invoke($11, `load8_u`, [65524]), [value("i32", 9)]); + +// ./test/core/memory_copy.wast:1776 +assert_return(() => invoke($11, `load8_u`, [65525]), [value("i32", 10)]); + +// ./test/core/memory_copy.wast:1777 +assert_return(() => invoke($11, `load8_u`, [65526]), [value("i32", 11)]); + +// ./test/core/memory_copy.wast:1778 +assert_return(() => invoke($11, `load8_u`, [65527]), [value("i32", 12)]); + +// ./test/core/memory_copy.wast:1779 +assert_return(() => invoke($11, `load8_u`, [65528]), [value("i32", 13)]); + +// ./test/core/memory_copy.wast:1780 +assert_return(() => invoke($11, `load8_u`, [65529]), [value("i32", 14)]); + +// ./test/core/memory_copy.wast:1781 +assert_return(() => invoke($11, `load8_u`, [65530]), [value("i32", 15)]); + +// ./test/core/memory_copy.wast:1782 +assert_return(() => invoke($11, `load8_u`, [65531]), [value("i32", 16)]); + +// ./test/core/memory_copy.wast:1783 +assert_return(() => invoke($11, `load8_u`, [65532]), [value("i32", 17)]); + +// ./test/core/memory_copy.wast:1784 +assert_return(() => invoke($11, `load8_u`, [65533]), [value("i32", 18)]); + +// ./test/core/memory_copy.wast:1785 +assert_return(() => invoke($11, `load8_u`, [65534]), [value("i32", 19)]); + +// ./test/core/memory_copy.wast:1786 +assert_return(() => invoke($11, `load8_u`, [65535]), [value("i32", 20)]); + +// ./test/core/memory_copy.wast:1788 +let $12 = instantiate(`(module + (memory (export "mem") 1 1 ) + (data (i32.const 65486) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13") + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (memory.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:1796 +assert_trap(() => invoke($12, `run`, [65516, 65486, 40]), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:1799 +assert_return(() => invoke($12, `load8_u`, [198]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1800 +assert_return(() => invoke($12, `load8_u`, [397]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1801 +assert_return(() => invoke($12, `load8_u`, [596]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1802 +assert_return(() => invoke($12, `load8_u`, [795]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1803 +assert_return(() => invoke($12, `load8_u`, [994]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1804 +assert_return(() => invoke($12, `load8_u`, [1193]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1805 +assert_return(() => invoke($12, `load8_u`, [1392]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1806 +assert_return(() => invoke($12, `load8_u`, [1591]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1807 +assert_return(() => invoke($12, `load8_u`, [1790]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1808 +assert_return(() => invoke($12, `load8_u`, [1989]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1809 +assert_return(() => invoke($12, `load8_u`, [2188]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1810 +assert_return(() => invoke($12, `load8_u`, [2387]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1811 +assert_return(() => invoke($12, `load8_u`, [2586]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1812 +assert_return(() => invoke($12, `load8_u`, [2785]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1813 +assert_return(() => invoke($12, `load8_u`, [2984]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1814 +assert_return(() => invoke($12, `load8_u`, [3183]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1815 +assert_return(() => invoke($12, `load8_u`, [3382]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1816 +assert_return(() => invoke($12, `load8_u`, [3581]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1817 +assert_return(() => invoke($12, `load8_u`, [3780]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1818 +assert_return(() => invoke($12, `load8_u`, [3979]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1819 +assert_return(() => invoke($12, `load8_u`, [4178]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1820 +assert_return(() => invoke($12, `load8_u`, [4377]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1821 +assert_return(() => invoke($12, `load8_u`, [4576]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1822 +assert_return(() => invoke($12, `load8_u`, [4775]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1823 +assert_return(() => invoke($12, `load8_u`, [4974]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1824 +assert_return(() => invoke($12, `load8_u`, [5173]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1825 +assert_return(() => invoke($12, `load8_u`, [5372]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1826 +assert_return(() => invoke($12, `load8_u`, [5571]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1827 +assert_return(() => invoke($12, `load8_u`, [5770]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1828 +assert_return(() => invoke($12, `load8_u`, [5969]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1829 +assert_return(() => invoke($12, `load8_u`, [6168]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1830 +assert_return(() => invoke($12, `load8_u`, [6367]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1831 +assert_return(() => invoke($12, `load8_u`, [6566]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1832 +assert_return(() => invoke($12, `load8_u`, [6765]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1833 +assert_return(() => invoke($12, `load8_u`, [6964]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1834 +assert_return(() => invoke($12, `load8_u`, [7163]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1835 +assert_return(() => invoke($12, `load8_u`, [7362]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1836 +assert_return(() => invoke($12, `load8_u`, [7561]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1837 +assert_return(() => invoke($12, `load8_u`, [7760]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1838 +assert_return(() => invoke($12, `load8_u`, [7959]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1839 +assert_return(() => invoke($12, `load8_u`, [8158]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1840 +assert_return(() => invoke($12, `load8_u`, [8357]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1841 +assert_return(() => invoke($12, `load8_u`, [8556]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1842 +assert_return(() => invoke($12, `load8_u`, [8755]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1843 +assert_return(() => invoke($12, `load8_u`, [8954]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1844 +assert_return(() => invoke($12, `load8_u`, [9153]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1845 +assert_return(() => invoke($12, `load8_u`, [9352]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1846 +assert_return(() => invoke($12, `load8_u`, [9551]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1847 +assert_return(() => invoke($12, `load8_u`, [9750]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1848 +assert_return(() => invoke($12, `load8_u`, [9949]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1849 +assert_return(() => invoke($12, `load8_u`, [10148]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1850 +assert_return(() => invoke($12, `load8_u`, [10347]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1851 +assert_return(() => invoke($12, `load8_u`, [10546]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1852 +assert_return(() => invoke($12, `load8_u`, [10745]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1853 +assert_return(() => invoke($12, `load8_u`, [10944]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1854 +assert_return(() => invoke($12, `load8_u`, [11143]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1855 +assert_return(() => invoke($12, `load8_u`, [11342]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1856 +assert_return(() => invoke($12, `load8_u`, [11541]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1857 +assert_return(() => invoke($12, `load8_u`, [11740]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1858 +assert_return(() => invoke($12, `load8_u`, [11939]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1859 +assert_return(() => invoke($12, `load8_u`, [12138]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1860 +assert_return(() => invoke($12, `load8_u`, [12337]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1861 +assert_return(() => invoke($12, `load8_u`, [12536]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1862 +assert_return(() => invoke($12, `load8_u`, [12735]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1863 +assert_return(() => invoke($12, `load8_u`, [12934]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1864 +assert_return(() => invoke($12, `load8_u`, [13133]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1865 +assert_return(() => invoke($12, `load8_u`, [13332]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1866 +assert_return(() => invoke($12, `load8_u`, [13531]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1867 +assert_return(() => invoke($12, `load8_u`, [13730]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1868 +assert_return(() => invoke($12, `load8_u`, [13929]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1869 +assert_return(() => invoke($12, `load8_u`, [14128]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1870 +assert_return(() => invoke($12, `load8_u`, [14327]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1871 +assert_return(() => invoke($12, `load8_u`, [14526]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1872 +assert_return(() => invoke($12, `load8_u`, [14725]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1873 +assert_return(() => invoke($12, `load8_u`, [14924]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1874 +assert_return(() => invoke($12, `load8_u`, [15123]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1875 +assert_return(() => invoke($12, `load8_u`, [15322]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1876 +assert_return(() => invoke($12, `load8_u`, [15521]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1877 +assert_return(() => invoke($12, `load8_u`, [15720]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1878 +assert_return(() => invoke($12, `load8_u`, [15919]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1879 +assert_return(() => invoke($12, `load8_u`, [16118]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1880 +assert_return(() => invoke($12, `load8_u`, [16317]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1881 +assert_return(() => invoke($12, `load8_u`, [16516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1882 +assert_return(() => invoke($12, `load8_u`, [16715]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1883 +assert_return(() => invoke($12, `load8_u`, [16914]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1884 +assert_return(() => invoke($12, `load8_u`, [17113]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1885 +assert_return(() => invoke($12, `load8_u`, [17312]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1886 +assert_return(() => invoke($12, `load8_u`, [17511]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1887 +assert_return(() => invoke($12, `load8_u`, [17710]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1888 +assert_return(() => invoke($12, `load8_u`, [17909]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1889 +assert_return(() => invoke($12, `load8_u`, [18108]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1890 +assert_return(() => invoke($12, `load8_u`, [18307]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1891 +assert_return(() => invoke($12, `load8_u`, [18506]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1892 +assert_return(() => invoke($12, `load8_u`, [18705]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1893 +assert_return(() => invoke($12, `load8_u`, [18904]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1894 +assert_return(() => invoke($12, `load8_u`, [19103]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1895 +assert_return(() => invoke($12, `load8_u`, [19302]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1896 +assert_return(() => invoke($12, `load8_u`, [19501]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1897 +assert_return(() => invoke($12, `load8_u`, [19700]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1898 +assert_return(() => invoke($12, `load8_u`, [19899]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1899 +assert_return(() => invoke($12, `load8_u`, [20098]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1900 +assert_return(() => invoke($12, `load8_u`, [20297]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1901 +assert_return(() => invoke($12, `load8_u`, [20496]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1902 +assert_return(() => invoke($12, `load8_u`, [20695]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1903 +assert_return(() => invoke($12, `load8_u`, [20894]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1904 +assert_return(() => invoke($12, `load8_u`, [21093]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1905 +assert_return(() => invoke($12, `load8_u`, [21292]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1906 +assert_return(() => invoke($12, `load8_u`, [21491]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1907 +assert_return(() => invoke($12, `load8_u`, [21690]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1908 +assert_return(() => invoke($12, `load8_u`, [21889]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1909 +assert_return(() => invoke($12, `load8_u`, [22088]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1910 +assert_return(() => invoke($12, `load8_u`, [22287]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1911 +assert_return(() => invoke($12, `load8_u`, [22486]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1912 +assert_return(() => invoke($12, `load8_u`, [22685]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1913 +assert_return(() => invoke($12, `load8_u`, [22884]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1914 +assert_return(() => invoke($12, `load8_u`, [23083]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1915 +assert_return(() => invoke($12, `load8_u`, [23282]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1916 +assert_return(() => invoke($12, `load8_u`, [23481]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1917 +assert_return(() => invoke($12, `load8_u`, [23680]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1918 +assert_return(() => invoke($12, `load8_u`, [23879]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1919 +assert_return(() => invoke($12, `load8_u`, [24078]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1920 +assert_return(() => invoke($12, `load8_u`, [24277]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1921 +assert_return(() => invoke($12, `load8_u`, [24476]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1922 +assert_return(() => invoke($12, `load8_u`, [24675]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1923 +assert_return(() => invoke($12, `load8_u`, [24874]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1924 +assert_return(() => invoke($12, `load8_u`, [25073]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1925 +assert_return(() => invoke($12, `load8_u`, [25272]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1926 +assert_return(() => invoke($12, `load8_u`, [25471]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1927 +assert_return(() => invoke($12, `load8_u`, [25670]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1928 +assert_return(() => invoke($12, `load8_u`, [25869]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1929 +assert_return(() => invoke($12, `load8_u`, [26068]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1930 +assert_return(() => invoke($12, `load8_u`, [26267]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1931 +assert_return(() => invoke($12, `load8_u`, [26466]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1932 +assert_return(() => invoke($12, `load8_u`, [26665]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1933 +assert_return(() => invoke($12, `load8_u`, [26864]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1934 +assert_return(() => invoke($12, `load8_u`, [27063]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1935 +assert_return(() => invoke($12, `load8_u`, [27262]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1936 +assert_return(() => invoke($12, `load8_u`, [27461]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1937 +assert_return(() => invoke($12, `load8_u`, [27660]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1938 +assert_return(() => invoke($12, `load8_u`, [27859]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1939 +assert_return(() => invoke($12, `load8_u`, [28058]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1940 +assert_return(() => invoke($12, `load8_u`, [28257]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1941 +assert_return(() => invoke($12, `load8_u`, [28456]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1942 +assert_return(() => invoke($12, `load8_u`, [28655]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1943 +assert_return(() => invoke($12, `load8_u`, [28854]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1944 +assert_return(() => invoke($12, `load8_u`, [29053]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1945 +assert_return(() => invoke($12, `load8_u`, [29252]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1946 +assert_return(() => invoke($12, `load8_u`, [29451]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1947 +assert_return(() => invoke($12, `load8_u`, [29650]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1948 +assert_return(() => invoke($12, `load8_u`, [29849]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1949 +assert_return(() => invoke($12, `load8_u`, [30048]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1950 +assert_return(() => invoke($12, `load8_u`, [30247]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1951 +assert_return(() => invoke($12, `load8_u`, [30446]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1952 +assert_return(() => invoke($12, `load8_u`, [30645]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1953 +assert_return(() => invoke($12, `load8_u`, [30844]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1954 +assert_return(() => invoke($12, `load8_u`, [31043]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1955 +assert_return(() => invoke($12, `load8_u`, [31242]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1956 +assert_return(() => invoke($12, `load8_u`, [31441]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1957 +assert_return(() => invoke($12, `load8_u`, [31640]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1958 +assert_return(() => invoke($12, `load8_u`, [31839]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1959 +assert_return(() => invoke($12, `load8_u`, [32038]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1960 +assert_return(() => invoke($12, `load8_u`, [32237]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1961 +assert_return(() => invoke($12, `load8_u`, [32436]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1962 +assert_return(() => invoke($12, `load8_u`, [32635]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1963 +assert_return(() => invoke($12, `load8_u`, [32834]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1964 +assert_return(() => invoke($12, `load8_u`, [33033]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1965 +assert_return(() => invoke($12, `load8_u`, [33232]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1966 +assert_return(() => invoke($12, `load8_u`, [33431]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1967 +assert_return(() => invoke($12, `load8_u`, [33630]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1968 +assert_return(() => invoke($12, `load8_u`, [33829]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1969 +assert_return(() => invoke($12, `load8_u`, [34028]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1970 +assert_return(() => invoke($12, `load8_u`, [34227]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1971 +assert_return(() => invoke($12, `load8_u`, [34426]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1972 +assert_return(() => invoke($12, `load8_u`, [34625]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1973 +assert_return(() => invoke($12, `load8_u`, [34824]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1974 +assert_return(() => invoke($12, `load8_u`, [35023]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1975 +assert_return(() => invoke($12, `load8_u`, [35222]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1976 +assert_return(() => invoke($12, `load8_u`, [35421]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1977 +assert_return(() => invoke($12, `load8_u`, [35620]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1978 +assert_return(() => invoke($12, `load8_u`, [35819]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1979 +assert_return(() => invoke($12, `load8_u`, [36018]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1980 +assert_return(() => invoke($12, `load8_u`, [36217]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1981 +assert_return(() => invoke($12, `load8_u`, [36416]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1982 +assert_return(() => invoke($12, `load8_u`, [36615]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1983 +assert_return(() => invoke($12, `load8_u`, [36814]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1984 +assert_return(() => invoke($12, `load8_u`, [37013]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1985 +assert_return(() => invoke($12, `load8_u`, [37212]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1986 +assert_return(() => invoke($12, `load8_u`, [37411]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1987 +assert_return(() => invoke($12, `load8_u`, [37610]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1988 +assert_return(() => invoke($12, `load8_u`, [37809]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1989 +assert_return(() => invoke($12, `load8_u`, [38008]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1990 +assert_return(() => invoke($12, `load8_u`, [38207]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1991 +assert_return(() => invoke($12, `load8_u`, [38406]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1992 +assert_return(() => invoke($12, `load8_u`, [38605]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1993 +assert_return(() => invoke($12, `load8_u`, [38804]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1994 +assert_return(() => invoke($12, `load8_u`, [39003]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1995 +assert_return(() => invoke($12, `load8_u`, [39202]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1996 +assert_return(() => invoke($12, `load8_u`, [39401]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1997 +assert_return(() => invoke($12, `load8_u`, [39600]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1998 +assert_return(() => invoke($12, `load8_u`, [39799]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:1999 +assert_return(() => invoke($12, `load8_u`, [39998]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2000 +assert_return(() => invoke($12, `load8_u`, [40197]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2001 +assert_return(() => invoke($12, `load8_u`, [40396]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2002 +assert_return(() => invoke($12, `load8_u`, [40595]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2003 +assert_return(() => invoke($12, `load8_u`, [40794]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2004 +assert_return(() => invoke($12, `load8_u`, [40993]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2005 +assert_return(() => invoke($12, `load8_u`, [41192]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2006 +assert_return(() => invoke($12, `load8_u`, [41391]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2007 +assert_return(() => invoke($12, `load8_u`, [41590]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2008 +assert_return(() => invoke($12, `load8_u`, [41789]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2009 +assert_return(() => invoke($12, `load8_u`, [41988]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2010 +assert_return(() => invoke($12, `load8_u`, [42187]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2011 +assert_return(() => invoke($12, `load8_u`, [42386]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2012 +assert_return(() => invoke($12, `load8_u`, [42585]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2013 +assert_return(() => invoke($12, `load8_u`, [42784]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2014 +assert_return(() => invoke($12, `load8_u`, [42983]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2015 +assert_return(() => invoke($12, `load8_u`, [43182]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2016 +assert_return(() => invoke($12, `load8_u`, [43381]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2017 +assert_return(() => invoke($12, `load8_u`, [43580]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2018 +assert_return(() => invoke($12, `load8_u`, [43779]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2019 +assert_return(() => invoke($12, `load8_u`, [43978]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2020 +assert_return(() => invoke($12, `load8_u`, [44177]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2021 +assert_return(() => invoke($12, `load8_u`, [44376]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2022 +assert_return(() => invoke($12, `load8_u`, [44575]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2023 +assert_return(() => invoke($12, `load8_u`, [44774]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2024 +assert_return(() => invoke($12, `load8_u`, [44973]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2025 +assert_return(() => invoke($12, `load8_u`, [45172]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2026 +assert_return(() => invoke($12, `load8_u`, [45371]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2027 +assert_return(() => invoke($12, `load8_u`, [45570]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2028 +assert_return(() => invoke($12, `load8_u`, [45769]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2029 +assert_return(() => invoke($12, `load8_u`, [45968]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2030 +assert_return(() => invoke($12, `load8_u`, [46167]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2031 +assert_return(() => invoke($12, `load8_u`, [46366]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2032 +assert_return(() => invoke($12, `load8_u`, [46565]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2033 +assert_return(() => invoke($12, `load8_u`, [46764]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2034 +assert_return(() => invoke($12, `load8_u`, [46963]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2035 +assert_return(() => invoke($12, `load8_u`, [47162]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2036 +assert_return(() => invoke($12, `load8_u`, [47361]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2037 +assert_return(() => invoke($12, `load8_u`, [47560]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2038 +assert_return(() => invoke($12, `load8_u`, [47759]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2039 +assert_return(() => invoke($12, `load8_u`, [47958]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2040 +assert_return(() => invoke($12, `load8_u`, [48157]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2041 +assert_return(() => invoke($12, `load8_u`, [48356]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2042 +assert_return(() => invoke($12, `load8_u`, [48555]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2043 +assert_return(() => invoke($12, `load8_u`, [48754]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2044 +assert_return(() => invoke($12, `load8_u`, [48953]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2045 +assert_return(() => invoke($12, `load8_u`, [49152]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2046 +assert_return(() => invoke($12, `load8_u`, [49351]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2047 +assert_return(() => invoke($12, `load8_u`, [49550]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2048 +assert_return(() => invoke($12, `load8_u`, [49749]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2049 +assert_return(() => invoke($12, `load8_u`, [49948]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2050 +assert_return(() => invoke($12, `load8_u`, [50147]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2051 +assert_return(() => invoke($12, `load8_u`, [50346]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2052 +assert_return(() => invoke($12, `load8_u`, [50545]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2053 +assert_return(() => invoke($12, `load8_u`, [50744]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2054 +assert_return(() => invoke($12, `load8_u`, [50943]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2055 +assert_return(() => invoke($12, `load8_u`, [51142]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2056 +assert_return(() => invoke($12, `load8_u`, [51341]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2057 +assert_return(() => invoke($12, `load8_u`, [51540]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2058 +assert_return(() => invoke($12, `load8_u`, [51739]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2059 +assert_return(() => invoke($12, `load8_u`, [51938]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2060 +assert_return(() => invoke($12, `load8_u`, [52137]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2061 +assert_return(() => invoke($12, `load8_u`, [52336]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2062 +assert_return(() => invoke($12, `load8_u`, [52535]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2063 +assert_return(() => invoke($12, `load8_u`, [52734]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2064 +assert_return(() => invoke($12, `load8_u`, [52933]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2065 +assert_return(() => invoke($12, `load8_u`, [53132]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2066 +assert_return(() => invoke($12, `load8_u`, [53331]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2067 +assert_return(() => invoke($12, `load8_u`, [53530]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2068 +assert_return(() => invoke($12, `load8_u`, [53729]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2069 +assert_return(() => invoke($12, `load8_u`, [53928]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2070 +assert_return(() => invoke($12, `load8_u`, [54127]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2071 +assert_return(() => invoke($12, `load8_u`, [54326]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2072 +assert_return(() => invoke($12, `load8_u`, [54525]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2073 +assert_return(() => invoke($12, `load8_u`, [54724]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2074 +assert_return(() => invoke($12, `load8_u`, [54923]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2075 +assert_return(() => invoke($12, `load8_u`, [55122]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2076 +assert_return(() => invoke($12, `load8_u`, [55321]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2077 +assert_return(() => invoke($12, `load8_u`, [55520]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2078 +assert_return(() => invoke($12, `load8_u`, [55719]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2079 +assert_return(() => invoke($12, `load8_u`, [55918]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2080 +assert_return(() => invoke($12, `load8_u`, [56117]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2081 +assert_return(() => invoke($12, `load8_u`, [56316]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2082 +assert_return(() => invoke($12, `load8_u`, [56515]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2083 +assert_return(() => invoke($12, `load8_u`, [56714]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2084 +assert_return(() => invoke($12, `load8_u`, [56913]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2085 +assert_return(() => invoke($12, `load8_u`, [57112]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2086 +assert_return(() => invoke($12, `load8_u`, [57311]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2087 +assert_return(() => invoke($12, `load8_u`, [57510]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2088 +assert_return(() => invoke($12, `load8_u`, [57709]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2089 +assert_return(() => invoke($12, `load8_u`, [57908]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2090 +assert_return(() => invoke($12, `load8_u`, [58107]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2091 +assert_return(() => invoke($12, `load8_u`, [58306]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2092 +assert_return(() => invoke($12, `load8_u`, [58505]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2093 +assert_return(() => invoke($12, `load8_u`, [58704]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2094 +assert_return(() => invoke($12, `load8_u`, [58903]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2095 +assert_return(() => invoke($12, `load8_u`, [59102]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2096 +assert_return(() => invoke($12, `load8_u`, [59301]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2097 +assert_return(() => invoke($12, `load8_u`, [59500]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2098 +assert_return(() => invoke($12, `load8_u`, [59699]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2099 +assert_return(() => invoke($12, `load8_u`, [59898]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2100 +assert_return(() => invoke($12, `load8_u`, [60097]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2101 +assert_return(() => invoke($12, `load8_u`, [60296]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2102 +assert_return(() => invoke($12, `load8_u`, [60495]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2103 +assert_return(() => invoke($12, `load8_u`, [60694]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2104 +assert_return(() => invoke($12, `load8_u`, [60893]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2105 +assert_return(() => invoke($12, `load8_u`, [61092]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2106 +assert_return(() => invoke($12, `load8_u`, [61291]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2107 +assert_return(() => invoke($12, `load8_u`, [61490]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2108 +assert_return(() => invoke($12, `load8_u`, [61689]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2109 +assert_return(() => invoke($12, `load8_u`, [61888]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2110 +assert_return(() => invoke($12, `load8_u`, [62087]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2111 +assert_return(() => invoke($12, `load8_u`, [62286]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2112 +assert_return(() => invoke($12, `load8_u`, [62485]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2113 +assert_return(() => invoke($12, `load8_u`, [62684]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2114 +assert_return(() => invoke($12, `load8_u`, [62883]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2115 +assert_return(() => invoke($12, `load8_u`, [63082]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2116 +assert_return(() => invoke($12, `load8_u`, [63281]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2117 +assert_return(() => invoke($12, `load8_u`, [63480]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2118 +assert_return(() => invoke($12, `load8_u`, [63679]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2119 +assert_return(() => invoke($12, `load8_u`, [63878]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2120 +assert_return(() => invoke($12, `load8_u`, [64077]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2121 +assert_return(() => invoke($12, `load8_u`, [64276]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2122 +assert_return(() => invoke($12, `load8_u`, [64475]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2123 +assert_return(() => invoke($12, `load8_u`, [64674]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2124 +assert_return(() => invoke($12, `load8_u`, [64873]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2125 +assert_return(() => invoke($12, `load8_u`, [65072]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2126 +assert_return(() => invoke($12, `load8_u`, [65271]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2127 +assert_return(() => invoke($12, `load8_u`, [65470]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2128 +assert_return(() => invoke($12, `load8_u`, [65486]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2129 +assert_return(() => invoke($12, `load8_u`, [65487]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:2130 +assert_return(() => invoke($12, `load8_u`, [65488]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:2131 +assert_return(() => invoke($12, `load8_u`, [65489]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:2132 +assert_return(() => invoke($12, `load8_u`, [65490]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:2133 +assert_return(() => invoke($12, `load8_u`, [65491]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:2134 +assert_return(() => invoke($12, `load8_u`, [65492]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:2135 +assert_return(() => invoke($12, `load8_u`, [65493]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:2136 +assert_return(() => invoke($12, `load8_u`, [65494]), [value("i32", 8)]); + +// ./test/core/memory_copy.wast:2137 +assert_return(() => invoke($12, `load8_u`, [65495]), [value("i32", 9)]); + +// ./test/core/memory_copy.wast:2138 +assert_return(() => invoke($12, `load8_u`, [65496]), [value("i32", 10)]); + +// ./test/core/memory_copy.wast:2139 +assert_return(() => invoke($12, `load8_u`, [65497]), [value("i32", 11)]); + +// ./test/core/memory_copy.wast:2140 +assert_return(() => invoke($12, `load8_u`, [65498]), [value("i32", 12)]); + +// ./test/core/memory_copy.wast:2141 +assert_return(() => invoke($12, `load8_u`, [65499]), [value("i32", 13)]); + +// ./test/core/memory_copy.wast:2142 +assert_return(() => invoke($12, `load8_u`, [65500]), [value("i32", 14)]); + +// ./test/core/memory_copy.wast:2143 +assert_return(() => invoke($12, `load8_u`, [65501]), [value("i32", 15)]); + +// ./test/core/memory_copy.wast:2144 +assert_return(() => invoke($12, `load8_u`, [65502]), [value("i32", 16)]); + +// ./test/core/memory_copy.wast:2145 +assert_return(() => invoke($12, `load8_u`, [65503]), [value("i32", 17)]); + +// ./test/core/memory_copy.wast:2146 +assert_return(() => invoke($12, `load8_u`, [65504]), [value("i32", 18)]); + +// ./test/core/memory_copy.wast:2147 +assert_return(() => invoke($12, `load8_u`, [65505]), [value("i32", 19)]); + +// ./test/core/memory_copy.wast:2149 +let $13 = instantiate(`(module + (memory (export "mem") 1 1 ) + (data (i32.const 65516) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13") + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (memory.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:2157 +assert_trap(() => invoke($13, `run`, [65486, 65516, 40]), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:2160 +assert_return(() => invoke($13, `load8_u`, [198]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2161 +assert_return(() => invoke($13, `load8_u`, [397]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2162 +assert_return(() => invoke($13, `load8_u`, [596]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2163 +assert_return(() => invoke($13, `load8_u`, [795]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2164 +assert_return(() => invoke($13, `load8_u`, [994]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2165 +assert_return(() => invoke($13, `load8_u`, [1193]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2166 +assert_return(() => invoke($13, `load8_u`, [1392]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2167 +assert_return(() => invoke($13, `load8_u`, [1591]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2168 +assert_return(() => invoke($13, `load8_u`, [1790]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2169 +assert_return(() => invoke($13, `load8_u`, [1989]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2170 +assert_return(() => invoke($13, `load8_u`, [2188]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2171 +assert_return(() => invoke($13, `load8_u`, [2387]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2172 +assert_return(() => invoke($13, `load8_u`, [2586]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2173 +assert_return(() => invoke($13, `load8_u`, [2785]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2174 +assert_return(() => invoke($13, `load8_u`, [2984]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2175 +assert_return(() => invoke($13, `load8_u`, [3183]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2176 +assert_return(() => invoke($13, `load8_u`, [3382]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2177 +assert_return(() => invoke($13, `load8_u`, [3581]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2178 +assert_return(() => invoke($13, `load8_u`, [3780]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2179 +assert_return(() => invoke($13, `load8_u`, [3979]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2180 +assert_return(() => invoke($13, `load8_u`, [4178]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2181 +assert_return(() => invoke($13, `load8_u`, [4377]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2182 +assert_return(() => invoke($13, `load8_u`, [4576]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2183 +assert_return(() => invoke($13, `load8_u`, [4775]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2184 +assert_return(() => invoke($13, `load8_u`, [4974]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2185 +assert_return(() => invoke($13, `load8_u`, [5173]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2186 +assert_return(() => invoke($13, `load8_u`, [5372]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2187 +assert_return(() => invoke($13, `load8_u`, [5571]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2188 +assert_return(() => invoke($13, `load8_u`, [5770]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2189 +assert_return(() => invoke($13, `load8_u`, [5969]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2190 +assert_return(() => invoke($13, `load8_u`, [6168]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2191 +assert_return(() => invoke($13, `load8_u`, [6367]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2192 +assert_return(() => invoke($13, `load8_u`, [6566]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2193 +assert_return(() => invoke($13, `load8_u`, [6765]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2194 +assert_return(() => invoke($13, `load8_u`, [6964]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2195 +assert_return(() => invoke($13, `load8_u`, [7163]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2196 +assert_return(() => invoke($13, `load8_u`, [7362]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2197 +assert_return(() => invoke($13, `load8_u`, [7561]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2198 +assert_return(() => invoke($13, `load8_u`, [7760]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2199 +assert_return(() => invoke($13, `load8_u`, [7959]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2200 +assert_return(() => invoke($13, `load8_u`, [8158]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2201 +assert_return(() => invoke($13, `load8_u`, [8357]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2202 +assert_return(() => invoke($13, `load8_u`, [8556]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2203 +assert_return(() => invoke($13, `load8_u`, [8755]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2204 +assert_return(() => invoke($13, `load8_u`, [8954]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2205 +assert_return(() => invoke($13, `load8_u`, [9153]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2206 +assert_return(() => invoke($13, `load8_u`, [9352]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2207 +assert_return(() => invoke($13, `load8_u`, [9551]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2208 +assert_return(() => invoke($13, `load8_u`, [9750]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2209 +assert_return(() => invoke($13, `load8_u`, [9949]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2210 +assert_return(() => invoke($13, `load8_u`, [10148]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2211 +assert_return(() => invoke($13, `load8_u`, [10347]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2212 +assert_return(() => invoke($13, `load8_u`, [10546]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2213 +assert_return(() => invoke($13, `load8_u`, [10745]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2214 +assert_return(() => invoke($13, `load8_u`, [10944]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2215 +assert_return(() => invoke($13, `load8_u`, [11143]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2216 +assert_return(() => invoke($13, `load8_u`, [11342]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2217 +assert_return(() => invoke($13, `load8_u`, [11541]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2218 +assert_return(() => invoke($13, `load8_u`, [11740]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2219 +assert_return(() => invoke($13, `load8_u`, [11939]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2220 +assert_return(() => invoke($13, `load8_u`, [12138]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2221 +assert_return(() => invoke($13, `load8_u`, [12337]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2222 +assert_return(() => invoke($13, `load8_u`, [12536]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2223 +assert_return(() => invoke($13, `load8_u`, [12735]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2224 +assert_return(() => invoke($13, `load8_u`, [12934]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2225 +assert_return(() => invoke($13, `load8_u`, [13133]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2226 +assert_return(() => invoke($13, `load8_u`, [13332]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2227 +assert_return(() => invoke($13, `load8_u`, [13531]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2228 +assert_return(() => invoke($13, `load8_u`, [13730]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2229 +assert_return(() => invoke($13, `load8_u`, [13929]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2230 +assert_return(() => invoke($13, `load8_u`, [14128]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2231 +assert_return(() => invoke($13, `load8_u`, [14327]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2232 +assert_return(() => invoke($13, `load8_u`, [14526]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2233 +assert_return(() => invoke($13, `load8_u`, [14725]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2234 +assert_return(() => invoke($13, `load8_u`, [14924]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2235 +assert_return(() => invoke($13, `load8_u`, [15123]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2236 +assert_return(() => invoke($13, `load8_u`, [15322]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2237 +assert_return(() => invoke($13, `load8_u`, [15521]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2238 +assert_return(() => invoke($13, `load8_u`, [15720]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2239 +assert_return(() => invoke($13, `load8_u`, [15919]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2240 +assert_return(() => invoke($13, `load8_u`, [16118]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2241 +assert_return(() => invoke($13, `load8_u`, [16317]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2242 +assert_return(() => invoke($13, `load8_u`, [16516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2243 +assert_return(() => invoke($13, `load8_u`, [16715]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2244 +assert_return(() => invoke($13, `load8_u`, [16914]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2245 +assert_return(() => invoke($13, `load8_u`, [17113]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2246 +assert_return(() => invoke($13, `load8_u`, [17312]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2247 +assert_return(() => invoke($13, `load8_u`, [17511]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2248 +assert_return(() => invoke($13, `load8_u`, [17710]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2249 +assert_return(() => invoke($13, `load8_u`, [17909]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2250 +assert_return(() => invoke($13, `load8_u`, [18108]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2251 +assert_return(() => invoke($13, `load8_u`, [18307]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2252 +assert_return(() => invoke($13, `load8_u`, [18506]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2253 +assert_return(() => invoke($13, `load8_u`, [18705]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2254 +assert_return(() => invoke($13, `load8_u`, [18904]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2255 +assert_return(() => invoke($13, `load8_u`, [19103]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2256 +assert_return(() => invoke($13, `load8_u`, [19302]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2257 +assert_return(() => invoke($13, `load8_u`, [19501]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2258 +assert_return(() => invoke($13, `load8_u`, [19700]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2259 +assert_return(() => invoke($13, `load8_u`, [19899]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2260 +assert_return(() => invoke($13, `load8_u`, [20098]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2261 +assert_return(() => invoke($13, `load8_u`, [20297]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2262 +assert_return(() => invoke($13, `load8_u`, [20496]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2263 +assert_return(() => invoke($13, `load8_u`, [20695]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2264 +assert_return(() => invoke($13, `load8_u`, [20894]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2265 +assert_return(() => invoke($13, `load8_u`, [21093]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2266 +assert_return(() => invoke($13, `load8_u`, [21292]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2267 +assert_return(() => invoke($13, `load8_u`, [21491]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2268 +assert_return(() => invoke($13, `load8_u`, [21690]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2269 +assert_return(() => invoke($13, `load8_u`, [21889]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2270 +assert_return(() => invoke($13, `load8_u`, [22088]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2271 +assert_return(() => invoke($13, `load8_u`, [22287]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2272 +assert_return(() => invoke($13, `load8_u`, [22486]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2273 +assert_return(() => invoke($13, `load8_u`, [22685]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2274 +assert_return(() => invoke($13, `load8_u`, [22884]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2275 +assert_return(() => invoke($13, `load8_u`, [23083]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2276 +assert_return(() => invoke($13, `load8_u`, [23282]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2277 +assert_return(() => invoke($13, `load8_u`, [23481]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2278 +assert_return(() => invoke($13, `load8_u`, [23680]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2279 +assert_return(() => invoke($13, `load8_u`, [23879]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2280 +assert_return(() => invoke($13, `load8_u`, [24078]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2281 +assert_return(() => invoke($13, `load8_u`, [24277]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2282 +assert_return(() => invoke($13, `load8_u`, [24476]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2283 +assert_return(() => invoke($13, `load8_u`, [24675]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2284 +assert_return(() => invoke($13, `load8_u`, [24874]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2285 +assert_return(() => invoke($13, `load8_u`, [25073]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2286 +assert_return(() => invoke($13, `load8_u`, [25272]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2287 +assert_return(() => invoke($13, `load8_u`, [25471]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2288 +assert_return(() => invoke($13, `load8_u`, [25670]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2289 +assert_return(() => invoke($13, `load8_u`, [25869]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2290 +assert_return(() => invoke($13, `load8_u`, [26068]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2291 +assert_return(() => invoke($13, `load8_u`, [26267]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2292 +assert_return(() => invoke($13, `load8_u`, [26466]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2293 +assert_return(() => invoke($13, `load8_u`, [26665]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2294 +assert_return(() => invoke($13, `load8_u`, [26864]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2295 +assert_return(() => invoke($13, `load8_u`, [27063]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2296 +assert_return(() => invoke($13, `load8_u`, [27262]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2297 +assert_return(() => invoke($13, `load8_u`, [27461]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2298 +assert_return(() => invoke($13, `load8_u`, [27660]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2299 +assert_return(() => invoke($13, `load8_u`, [27859]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2300 +assert_return(() => invoke($13, `load8_u`, [28058]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2301 +assert_return(() => invoke($13, `load8_u`, [28257]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2302 +assert_return(() => invoke($13, `load8_u`, [28456]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2303 +assert_return(() => invoke($13, `load8_u`, [28655]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2304 +assert_return(() => invoke($13, `load8_u`, [28854]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2305 +assert_return(() => invoke($13, `load8_u`, [29053]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2306 +assert_return(() => invoke($13, `load8_u`, [29252]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2307 +assert_return(() => invoke($13, `load8_u`, [29451]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2308 +assert_return(() => invoke($13, `load8_u`, [29650]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2309 +assert_return(() => invoke($13, `load8_u`, [29849]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2310 +assert_return(() => invoke($13, `load8_u`, [30048]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2311 +assert_return(() => invoke($13, `load8_u`, [30247]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2312 +assert_return(() => invoke($13, `load8_u`, [30446]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2313 +assert_return(() => invoke($13, `load8_u`, [30645]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2314 +assert_return(() => invoke($13, `load8_u`, [30844]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2315 +assert_return(() => invoke($13, `load8_u`, [31043]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2316 +assert_return(() => invoke($13, `load8_u`, [31242]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2317 +assert_return(() => invoke($13, `load8_u`, [31441]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2318 +assert_return(() => invoke($13, `load8_u`, [31640]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2319 +assert_return(() => invoke($13, `load8_u`, [31839]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2320 +assert_return(() => invoke($13, `load8_u`, [32038]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2321 +assert_return(() => invoke($13, `load8_u`, [32237]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2322 +assert_return(() => invoke($13, `load8_u`, [32436]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2323 +assert_return(() => invoke($13, `load8_u`, [32635]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2324 +assert_return(() => invoke($13, `load8_u`, [32834]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2325 +assert_return(() => invoke($13, `load8_u`, [33033]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2326 +assert_return(() => invoke($13, `load8_u`, [33232]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2327 +assert_return(() => invoke($13, `load8_u`, [33431]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2328 +assert_return(() => invoke($13, `load8_u`, [33630]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2329 +assert_return(() => invoke($13, `load8_u`, [33829]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2330 +assert_return(() => invoke($13, `load8_u`, [34028]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2331 +assert_return(() => invoke($13, `load8_u`, [34227]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2332 +assert_return(() => invoke($13, `load8_u`, [34426]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2333 +assert_return(() => invoke($13, `load8_u`, [34625]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2334 +assert_return(() => invoke($13, `load8_u`, [34824]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2335 +assert_return(() => invoke($13, `load8_u`, [35023]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2336 +assert_return(() => invoke($13, `load8_u`, [35222]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2337 +assert_return(() => invoke($13, `load8_u`, [35421]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2338 +assert_return(() => invoke($13, `load8_u`, [35620]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2339 +assert_return(() => invoke($13, `load8_u`, [35819]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2340 +assert_return(() => invoke($13, `load8_u`, [36018]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2341 +assert_return(() => invoke($13, `load8_u`, [36217]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2342 +assert_return(() => invoke($13, `load8_u`, [36416]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2343 +assert_return(() => invoke($13, `load8_u`, [36615]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2344 +assert_return(() => invoke($13, `load8_u`, [36814]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2345 +assert_return(() => invoke($13, `load8_u`, [37013]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2346 +assert_return(() => invoke($13, `load8_u`, [37212]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2347 +assert_return(() => invoke($13, `load8_u`, [37411]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2348 +assert_return(() => invoke($13, `load8_u`, [37610]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2349 +assert_return(() => invoke($13, `load8_u`, [37809]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2350 +assert_return(() => invoke($13, `load8_u`, [38008]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2351 +assert_return(() => invoke($13, `load8_u`, [38207]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2352 +assert_return(() => invoke($13, `load8_u`, [38406]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2353 +assert_return(() => invoke($13, `load8_u`, [38605]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2354 +assert_return(() => invoke($13, `load8_u`, [38804]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2355 +assert_return(() => invoke($13, `load8_u`, [39003]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2356 +assert_return(() => invoke($13, `load8_u`, [39202]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2357 +assert_return(() => invoke($13, `load8_u`, [39401]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2358 +assert_return(() => invoke($13, `load8_u`, [39600]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2359 +assert_return(() => invoke($13, `load8_u`, [39799]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2360 +assert_return(() => invoke($13, `load8_u`, [39998]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2361 +assert_return(() => invoke($13, `load8_u`, [40197]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2362 +assert_return(() => invoke($13, `load8_u`, [40396]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2363 +assert_return(() => invoke($13, `load8_u`, [40595]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2364 +assert_return(() => invoke($13, `load8_u`, [40794]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2365 +assert_return(() => invoke($13, `load8_u`, [40993]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2366 +assert_return(() => invoke($13, `load8_u`, [41192]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2367 +assert_return(() => invoke($13, `load8_u`, [41391]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2368 +assert_return(() => invoke($13, `load8_u`, [41590]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2369 +assert_return(() => invoke($13, `load8_u`, [41789]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2370 +assert_return(() => invoke($13, `load8_u`, [41988]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2371 +assert_return(() => invoke($13, `load8_u`, [42187]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2372 +assert_return(() => invoke($13, `load8_u`, [42386]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2373 +assert_return(() => invoke($13, `load8_u`, [42585]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2374 +assert_return(() => invoke($13, `load8_u`, [42784]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2375 +assert_return(() => invoke($13, `load8_u`, [42983]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2376 +assert_return(() => invoke($13, `load8_u`, [43182]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2377 +assert_return(() => invoke($13, `load8_u`, [43381]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2378 +assert_return(() => invoke($13, `load8_u`, [43580]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2379 +assert_return(() => invoke($13, `load8_u`, [43779]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2380 +assert_return(() => invoke($13, `load8_u`, [43978]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2381 +assert_return(() => invoke($13, `load8_u`, [44177]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2382 +assert_return(() => invoke($13, `load8_u`, [44376]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2383 +assert_return(() => invoke($13, `load8_u`, [44575]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2384 +assert_return(() => invoke($13, `load8_u`, [44774]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2385 +assert_return(() => invoke($13, `load8_u`, [44973]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2386 +assert_return(() => invoke($13, `load8_u`, [45172]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2387 +assert_return(() => invoke($13, `load8_u`, [45371]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2388 +assert_return(() => invoke($13, `load8_u`, [45570]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2389 +assert_return(() => invoke($13, `load8_u`, [45769]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2390 +assert_return(() => invoke($13, `load8_u`, [45968]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2391 +assert_return(() => invoke($13, `load8_u`, [46167]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2392 +assert_return(() => invoke($13, `load8_u`, [46366]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2393 +assert_return(() => invoke($13, `load8_u`, [46565]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2394 +assert_return(() => invoke($13, `load8_u`, [46764]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2395 +assert_return(() => invoke($13, `load8_u`, [46963]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2396 +assert_return(() => invoke($13, `load8_u`, [47162]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2397 +assert_return(() => invoke($13, `load8_u`, [47361]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2398 +assert_return(() => invoke($13, `load8_u`, [47560]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2399 +assert_return(() => invoke($13, `load8_u`, [47759]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2400 +assert_return(() => invoke($13, `load8_u`, [47958]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2401 +assert_return(() => invoke($13, `load8_u`, [48157]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2402 +assert_return(() => invoke($13, `load8_u`, [48356]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2403 +assert_return(() => invoke($13, `load8_u`, [48555]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2404 +assert_return(() => invoke($13, `load8_u`, [48754]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2405 +assert_return(() => invoke($13, `load8_u`, [48953]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2406 +assert_return(() => invoke($13, `load8_u`, [49152]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2407 +assert_return(() => invoke($13, `load8_u`, [49351]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2408 +assert_return(() => invoke($13, `load8_u`, [49550]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2409 +assert_return(() => invoke($13, `load8_u`, [49749]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2410 +assert_return(() => invoke($13, `load8_u`, [49948]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2411 +assert_return(() => invoke($13, `load8_u`, [50147]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2412 +assert_return(() => invoke($13, `load8_u`, [50346]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2413 +assert_return(() => invoke($13, `load8_u`, [50545]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2414 +assert_return(() => invoke($13, `load8_u`, [50744]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2415 +assert_return(() => invoke($13, `load8_u`, [50943]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2416 +assert_return(() => invoke($13, `load8_u`, [51142]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2417 +assert_return(() => invoke($13, `load8_u`, [51341]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2418 +assert_return(() => invoke($13, `load8_u`, [51540]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2419 +assert_return(() => invoke($13, `load8_u`, [51739]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2420 +assert_return(() => invoke($13, `load8_u`, [51938]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2421 +assert_return(() => invoke($13, `load8_u`, [52137]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2422 +assert_return(() => invoke($13, `load8_u`, [52336]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2423 +assert_return(() => invoke($13, `load8_u`, [52535]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2424 +assert_return(() => invoke($13, `load8_u`, [52734]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2425 +assert_return(() => invoke($13, `load8_u`, [52933]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2426 +assert_return(() => invoke($13, `load8_u`, [53132]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2427 +assert_return(() => invoke($13, `load8_u`, [53331]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2428 +assert_return(() => invoke($13, `load8_u`, [53530]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2429 +assert_return(() => invoke($13, `load8_u`, [53729]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2430 +assert_return(() => invoke($13, `load8_u`, [53928]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2431 +assert_return(() => invoke($13, `load8_u`, [54127]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2432 +assert_return(() => invoke($13, `load8_u`, [54326]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2433 +assert_return(() => invoke($13, `load8_u`, [54525]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2434 +assert_return(() => invoke($13, `load8_u`, [54724]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2435 +assert_return(() => invoke($13, `load8_u`, [54923]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2436 +assert_return(() => invoke($13, `load8_u`, [55122]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2437 +assert_return(() => invoke($13, `load8_u`, [55321]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2438 +assert_return(() => invoke($13, `load8_u`, [55520]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2439 +assert_return(() => invoke($13, `load8_u`, [55719]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2440 +assert_return(() => invoke($13, `load8_u`, [55918]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2441 +assert_return(() => invoke($13, `load8_u`, [56117]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2442 +assert_return(() => invoke($13, `load8_u`, [56316]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2443 +assert_return(() => invoke($13, `load8_u`, [56515]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2444 +assert_return(() => invoke($13, `load8_u`, [56714]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2445 +assert_return(() => invoke($13, `load8_u`, [56913]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2446 +assert_return(() => invoke($13, `load8_u`, [57112]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2447 +assert_return(() => invoke($13, `load8_u`, [57311]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2448 +assert_return(() => invoke($13, `load8_u`, [57510]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2449 +assert_return(() => invoke($13, `load8_u`, [57709]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2450 +assert_return(() => invoke($13, `load8_u`, [57908]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2451 +assert_return(() => invoke($13, `load8_u`, [58107]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2452 +assert_return(() => invoke($13, `load8_u`, [58306]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2453 +assert_return(() => invoke($13, `load8_u`, [58505]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2454 +assert_return(() => invoke($13, `load8_u`, [58704]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2455 +assert_return(() => invoke($13, `load8_u`, [58903]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2456 +assert_return(() => invoke($13, `load8_u`, [59102]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2457 +assert_return(() => invoke($13, `load8_u`, [59301]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2458 +assert_return(() => invoke($13, `load8_u`, [59500]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2459 +assert_return(() => invoke($13, `load8_u`, [59699]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2460 +assert_return(() => invoke($13, `load8_u`, [59898]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2461 +assert_return(() => invoke($13, `load8_u`, [60097]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2462 +assert_return(() => invoke($13, `load8_u`, [60296]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2463 +assert_return(() => invoke($13, `load8_u`, [60495]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2464 +assert_return(() => invoke($13, `load8_u`, [60694]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2465 +assert_return(() => invoke($13, `load8_u`, [60893]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2466 +assert_return(() => invoke($13, `load8_u`, [61092]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2467 +assert_return(() => invoke($13, `load8_u`, [61291]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2468 +assert_return(() => invoke($13, `load8_u`, [61490]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2469 +assert_return(() => invoke($13, `load8_u`, [61689]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2470 +assert_return(() => invoke($13, `load8_u`, [61888]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2471 +assert_return(() => invoke($13, `load8_u`, [62087]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2472 +assert_return(() => invoke($13, `load8_u`, [62286]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2473 +assert_return(() => invoke($13, `load8_u`, [62485]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2474 +assert_return(() => invoke($13, `load8_u`, [62684]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2475 +assert_return(() => invoke($13, `load8_u`, [62883]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2476 +assert_return(() => invoke($13, `load8_u`, [63082]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2477 +assert_return(() => invoke($13, `load8_u`, [63281]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2478 +assert_return(() => invoke($13, `load8_u`, [63480]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2479 +assert_return(() => invoke($13, `load8_u`, [63679]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2480 +assert_return(() => invoke($13, `load8_u`, [63878]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2481 +assert_return(() => invoke($13, `load8_u`, [64077]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2482 +assert_return(() => invoke($13, `load8_u`, [64276]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2483 +assert_return(() => invoke($13, `load8_u`, [64475]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2484 +assert_return(() => invoke($13, `load8_u`, [64674]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2485 +assert_return(() => invoke($13, `load8_u`, [64873]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2486 +assert_return(() => invoke($13, `load8_u`, [65072]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2487 +assert_return(() => invoke($13, `load8_u`, [65271]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2488 +assert_return(() => invoke($13, `load8_u`, [65470]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2489 +assert_return(() => invoke($13, `load8_u`, [65516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2490 +assert_return(() => invoke($13, `load8_u`, [65517]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:2491 +assert_return(() => invoke($13, `load8_u`, [65518]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:2492 +assert_return(() => invoke($13, `load8_u`, [65519]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:2493 +assert_return(() => invoke($13, `load8_u`, [65520]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:2494 +assert_return(() => invoke($13, `load8_u`, [65521]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:2495 +assert_return(() => invoke($13, `load8_u`, [65522]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:2496 +assert_return(() => invoke($13, `load8_u`, [65523]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:2497 +assert_return(() => invoke($13, `load8_u`, [65524]), [value("i32", 8)]); + +// ./test/core/memory_copy.wast:2498 +assert_return(() => invoke($13, `load8_u`, [65525]), [value("i32", 9)]); + +// ./test/core/memory_copy.wast:2499 +assert_return(() => invoke($13, `load8_u`, [65526]), [value("i32", 10)]); + +// ./test/core/memory_copy.wast:2500 +assert_return(() => invoke($13, `load8_u`, [65527]), [value("i32", 11)]); + +// ./test/core/memory_copy.wast:2501 +assert_return(() => invoke($13, `load8_u`, [65528]), [value("i32", 12)]); + +// ./test/core/memory_copy.wast:2502 +assert_return(() => invoke($13, `load8_u`, [65529]), [value("i32", 13)]); + +// ./test/core/memory_copy.wast:2503 +assert_return(() => invoke($13, `load8_u`, [65530]), [value("i32", 14)]); + +// ./test/core/memory_copy.wast:2504 +assert_return(() => invoke($13, `load8_u`, [65531]), [value("i32", 15)]); + +// ./test/core/memory_copy.wast:2505 +assert_return(() => invoke($13, `load8_u`, [65532]), [value("i32", 16)]); + +// ./test/core/memory_copy.wast:2506 +assert_return(() => invoke($13, `load8_u`, [65533]), [value("i32", 17)]); + +// ./test/core/memory_copy.wast:2507 +assert_return(() => invoke($13, `load8_u`, [65534]), [value("i32", 18)]); + +// ./test/core/memory_copy.wast:2508 +assert_return(() => invoke($13, `load8_u`, [65535]), [value("i32", 19)]); + +// ./test/core/memory_copy.wast:2510 +let $14 = instantiate(`(module + (memory (export "mem") 1 1 ) + (data (i32.const 65506) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13") + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (memory.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:2518 +assert_trap(() => invoke($14, `run`, [65516, 65506, 40]), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:2521 +assert_return(() => invoke($14, `load8_u`, [198]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2522 +assert_return(() => invoke($14, `load8_u`, [397]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2523 +assert_return(() => invoke($14, `load8_u`, [596]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2524 +assert_return(() => invoke($14, `load8_u`, [795]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2525 +assert_return(() => invoke($14, `load8_u`, [994]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2526 +assert_return(() => invoke($14, `load8_u`, [1193]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2527 +assert_return(() => invoke($14, `load8_u`, [1392]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2528 +assert_return(() => invoke($14, `load8_u`, [1591]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2529 +assert_return(() => invoke($14, `load8_u`, [1790]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2530 +assert_return(() => invoke($14, `load8_u`, [1989]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2531 +assert_return(() => invoke($14, `load8_u`, [2188]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2532 +assert_return(() => invoke($14, `load8_u`, [2387]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2533 +assert_return(() => invoke($14, `load8_u`, [2586]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2534 +assert_return(() => invoke($14, `load8_u`, [2785]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2535 +assert_return(() => invoke($14, `load8_u`, [2984]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2536 +assert_return(() => invoke($14, `load8_u`, [3183]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2537 +assert_return(() => invoke($14, `load8_u`, [3382]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2538 +assert_return(() => invoke($14, `load8_u`, [3581]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2539 +assert_return(() => invoke($14, `load8_u`, [3780]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2540 +assert_return(() => invoke($14, `load8_u`, [3979]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2541 +assert_return(() => invoke($14, `load8_u`, [4178]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2542 +assert_return(() => invoke($14, `load8_u`, [4377]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2543 +assert_return(() => invoke($14, `load8_u`, [4576]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2544 +assert_return(() => invoke($14, `load8_u`, [4775]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2545 +assert_return(() => invoke($14, `load8_u`, [4974]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2546 +assert_return(() => invoke($14, `load8_u`, [5173]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2547 +assert_return(() => invoke($14, `load8_u`, [5372]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2548 +assert_return(() => invoke($14, `load8_u`, [5571]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2549 +assert_return(() => invoke($14, `load8_u`, [5770]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2550 +assert_return(() => invoke($14, `load8_u`, [5969]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2551 +assert_return(() => invoke($14, `load8_u`, [6168]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2552 +assert_return(() => invoke($14, `load8_u`, [6367]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2553 +assert_return(() => invoke($14, `load8_u`, [6566]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2554 +assert_return(() => invoke($14, `load8_u`, [6765]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2555 +assert_return(() => invoke($14, `load8_u`, [6964]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2556 +assert_return(() => invoke($14, `load8_u`, [7163]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2557 +assert_return(() => invoke($14, `load8_u`, [7362]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2558 +assert_return(() => invoke($14, `load8_u`, [7561]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2559 +assert_return(() => invoke($14, `load8_u`, [7760]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2560 +assert_return(() => invoke($14, `load8_u`, [7959]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2561 +assert_return(() => invoke($14, `load8_u`, [8158]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2562 +assert_return(() => invoke($14, `load8_u`, [8357]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2563 +assert_return(() => invoke($14, `load8_u`, [8556]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2564 +assert_return(() => invoke($14, `load8_u`, [8755]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2565 +assert_return(() => invoke($14, `load8_u`, [8954]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2566 +assert_return(() => invoke($14, `load8_u`, [9153]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2567 +assert_return(() => invoke($14, `load8_u`, [9352]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2568 +assert_return(() => invoke($14, `load8_u`, [9551]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2569 +assert_return(() => invoke($14, `load8_u`, [9750]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2570 +assert_return(() => invoke($14, `load8_u`, [9949]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2571 +assert_return(() => invoke($14, `load8_u`, [10148]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2572 +assert_return(() => invoke($14, `load8_u`, [10347]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2573 +assert_return(() => invoke($14, `load8_u`, [10546]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2574 +assert_return(() => invoke($14, `load8_u`, [10745]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2575 +assert_return(() => invoke($14, `load8_u`, [10944]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2576 +assert_return(() => invoke($14, `load8_u`, [11143]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2577 +assert_return(() => invoke($14, `load8_u`, [11342]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2578 +assert_return(() => invoke($14, `load8_u`, [11541]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2579 +assert_return(() => invoke($14, `load8_u`, [11740]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2580 +assert_return(() => invoke($14, `load8_u`, [11939]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2581 +assert_return(() => invoke($14, `load8_u`, [12138]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2582 +assert_return(() => invoke($14, `load8_u`, [12337]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2583 +assert_return(() => invoke($14, `load8_u`, [12536]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2584 +assert_return(() => invoke($14, `load8_u`, [12735]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2585 +assert_return(() => invoke($14, `load8_u`, [12934]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2586 +assert_return(() => invoke($14, `load8_u`, [13133]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2587 +assert_return(() => invoke($14, `load8_u`, [13332]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2588 +assert_return(() => invoke($14, `load8_u`, [13531]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2589 +assert_return(() => invoke($14, `load8_u`, [13730]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2590 +assert_return(() => invoke($14, `load8_u`, [13929]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2591 +assert_return(() => invoke($14, `load8_u`, [14128]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2592 +assert_return(() => invoke($14, `load8_u`, [14327]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2593 +assert_return(() => invoke($14, `load8_u`, [14526]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2594 +assert_return(() => invoke($14, `load8_u`, [14725]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2595 +assert_return(() => invoke($14, `load8_u`, [14924]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2596 +assert_return(() => invoke($14, `load8_u`, [15123]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2597 +assert_return(() => invoke($14, `load8_u`, [15322]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2598 +assert_return(() => invoke($14, `load8_u`, [15521]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2599 +assert_return(() => invoke($14, `load8_u`, [15720]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2600 +assert_return(() => invoke($14, `load8_u`, [15919]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2601 +assert_return(() => invoke($14, `load8_u`, [16118]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2602 +assert_return(() => invoke($14, `load8_u`, [16317]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2603 +assert_return(() => invoke($14, `load8_u`, [16516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2604 +assert_return(() => invoke($14, `load8_u`, [16715]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2605 +assert_return(() => invoke($14, `load8_u`, [16914]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2606 +assert_return(() => invoke($14, `load8_u`, [17113]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2607 +assert_return(() => invoke($14, `load8_u`, [17312]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2608 +assert_return(() => invoke($14, `load8_u`, [17511]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2609 +assert_return(() => invoke($14, `load8_u`, [17710]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2610 +assert_return(() => invoke($14, `load8_u`, [17909]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2611 +assert_return(() => invoke($14, `load8_u`, [18108]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2612 +assert_return(() => invoke($14, `load8_u`, [18307]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2613 +assert_return(() => invoke($14, `load8_u`, [18506]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2614 +assert_return(() => invoke($14, `load8_u`, [18705]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2615 +assert_return(() => invoke($14, `load8_u`, [18904]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2616 +assert_return(() => invoke($14, `load8_u`, [19103]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2617 +assert_return(() => invoke($14, `load8_u`, [19302]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2618 +assert_return(() => invoke($14, `load8_u`, [19501]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2619 +assert_return(() => invoke($14, `load8_u`, [19700]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2620 +assert_return(() => invoke($14, `load8_u`, [19899]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2621 +assert_return(() => invoke($14, `load8_u`, [20098]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2622 +assert_return(() => invoke($14, `load8_u`, [20297]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2623 +assert_return(() => invoke($14, `load8_u`, [20496]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2624 +assert_return(() => invoke($14, `load8_u`, [20695]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2625 +assert_return(() => invoke($14, `load8_u`, [20894]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2626 +assert_return(() => invoke($14, `load8_u`, [21093]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2627 +assert_return(() => invoke($14, `load8_u`, [21292]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2628 +assert_return(() => invoke($14, `load8_u`, [21491]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2629 +assert_return(() => invoke($14, `load8_u`, [21690]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2630 +assert_return(() => invoke($14, `load8_u`, [21889]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2631 +assert_return(() => invoke($14, `load8_u`, [22088]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2632 +assert_return(() => invoke($14, `load8_u`, [22287]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2633 +assert_return(() => invoke($14, `load8_u`, [22486]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2634 +assert_return(() => invoke($14, `load8_u`, [22685]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2635 +assert_return(() => invoke($14, `load8_u`, [22884]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2636 +assert_return(() => invoke($14, `load8_u`, [23083]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2637 +assert_return(() => invoke($14, `load8_u`, [23282]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2638 +assert_return(() => invoke($14, `load8_u`, [23481]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2639 +assert_return(() => invoke($14, `load8_u`, [23680]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2640 +assert_return(() => invoke($14, `load8_u`, [23879]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2641 +assert_return(() => invoke($14, `load8_u`, [24078]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2642 +assert_return(() => invoke($14, `load8_u`, [24277]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2643 +assert_return(() => invoke($14, `load8_u`, [24476]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2644 +assert_return(() => invoke($14, `load8_u`, [24675]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2645 +assert_return(() => invoke($14, `load8_u`, [24874]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2646 +assert_return(() => invoke($14, `load8_u`, [25073]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2647 +assert_return(() => invoke($14, `load8_u`, [25272]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2648 +assert_return(() => invoke($14, `load8_u`, [25471]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2649 +assert_return(() => invoke($14, `load8_u`, [25670]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2650 +assert_return(() => invoke($14, `load8_u`, [25869]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2651 +assert_return(() => invoke($14, `load8_u`, [26068]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2652 +assert_return(() => invoke($14, `load8_u`, [26267]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2653 +assert_return(() => invoke($14, `load8_u`, [26466]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2654 +assert_return(() => invoke($14, `load8_u`, [26665]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2655 +assert_return(() => invoke($14, `load8_u`, [26864]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2656 +assert_return(() => invoke($14, `load8_u`, [27063]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2657 +assert_return(() => invoke($14, `load8_u`, [27262]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2658 +assert_return(() => invoke($14, `load8_u`, [27461]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2659 +assert_return(() => invoke($14, `load8_u`, [27660]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2660 +assert_return(() => invoke($14, `load8_u`, [27859]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2661 +assert_return(() => invoke($14, `load8_u`, [28058]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2662 +assert_return(() => invoke($14, `load8_u`, [28257]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2663 +assert_return(() => invoke($14, `load8_u`, [28456]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2664 +assert_return(() => invoke($14, `load8_u`, [28655]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2665 +assert_return(() => invoke($14, `load8_u`, [28854]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2666 +assert_return(() => invoke($14, `load8_u`, [29053]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2667 +assert_return(() => invoke($14, `load8_u`, [29252]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2668 +assert_return(() => invoke($14, `load8_u`, [29451]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2669 +assert_return(() => invoke($14, `load8_u`, [29650]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2670 +assert_return(() => invoke($14, `load8_u`, [29849]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2671 +assert_return(() => invoke($14, `load8_u`, [30048]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2672 +assert_return(() => invoke($14, `load8_u`, [30247]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2673 +assert_return(() => invoke($14, `load8_u`, [30446]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2674 +assert_return(() => invoke($14, `load8_u`, [30645]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2675 +assert_return(() => invoke($14, `load8_u`, [30844]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2676 +assert_return(() => invoke($14, `load8_u`, [31043]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2677 +assert_return(() => invoke($14, `load8_u`, [31242]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2678 +assert_return(() => invoke($14, `load8_u`, [31441]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2679 +assert_return(() => invoke($14, `load8_u`, [31640]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2680 +assert_return(() => invoke($14, `load8_u`, [31839]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2681 +assert_return(() => invoke($14, `load8_u`, [32038]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2682 +assert_return(() => invoke($14, `load8_u`, [32237]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2683 +assert_return(() => invoke($14, `load8_u`, [32436]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2684 +assert_return(() => invoke($14, `load8_u`, [32635]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2685 +assert_return(() => invoke($14, `load8_u`, [32834]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2686 +assert_return(() => invoke($14, `load8_u`, [33033]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2687 +assert_return(() => invoke($14, `load8_u`, [33232]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2688 +assert_return(() => invoke($14, `load8_u`, [33431]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2689 +assert_return(() => invoke($14, `load8_u`, [33630]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2690 +assert_return(() => invoke($14, `load8_u`, [33829]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2691 +assert_return(() => invoke($14, `load8_u`, [34028]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2692 +assert_return(() => invoke($14, `load8_u`, [34227]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2693 +assert_return(() => invoke($14, `load8_u`, [34426]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2694 +assert_return(() => invoke($14, `load8_u`, [34625]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2695 +assert_return(() => invoke($14, `load8_u`, [34824]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2696 +assert_return(() => invoke($14, `load8_u`, [35023]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2697 +assert_return(() => invoke($14, `load8_u`, [35222]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2698 +assert_return(() => invoke($14, `load8_u`, [35421]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2699 +assert_return(() => invoke($14, `load8_u`, [35620]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2700 +assert_return(() => invoke($14, `load8_u`, [35819]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2701 +assert_return(() => invoke($14, `load8_u`, [36018]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2702 +assert_return(() => invoke($14, `load8_u`, [36217]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2703 +assert_return(() => invoke($14, `load8_u`, [36416]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2704 +assert_return(() => invoke($14, `load8_u`, [36615]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2705 +assert_return(() => invoke($14, `load8_u`, [36814]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2706 +assert_return(() => invoke($14, `load8_u`, [37013]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2707 +assert_return(() => invoke($14, `load8_u`, [37212]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2708 +assert_return(() => invoke($14, `load8_u`, [37411]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2709 +assert_return(() => invoke($14, `load8_u`, [37610]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2710 +assert_return(() => invoke($14, `load8_u`, [37809]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2711 +assert_return(() => invoke($14, `load8_u`, [38008]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2712 +assert_return(() => invoke($14, `load8_u`, [38207]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2713 +assert_return(() => invoke($14, `load8_u`, [38406]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2714 +assert_return(() => invoke($14, `load8_u`, [38605]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2715 +assert_return(() => invoke($14, `load8_u`, [38804]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2716 +assert_return(() => invoke($14, `load8_u`, [39003]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2717 +assert_return(() => invoke($14, `load8_u`, [39202]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2718 +assert_return(() => invoke($14, `load8_u`, [39401]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2719 +assert_return(() => invoke($14, `load8_u`, [39600]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2720 +assert_return(() => invoke($14, `load8_u`, [39799]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2721 +assert_return(() => invoke($14, `load8_u`, [39998]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2722 +assert_return(() => invoke($14, `load8_u`, [40197]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2723 +assert_return(() => invoke($14, `load8_u`, [40396]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2724 +assert_return(() => invoke($14, `load8_u`, [40595]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2725 +assert_return(() => invoke($14, `load8_u`, [40794]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2726 +assert_return(() => invoke($14, `load8_u`, [40993]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2727 +assert_return(() => invoke($14, `load8_u`, [41192]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2728 +assert_return(() => invoke($14, `load8_u`, [41391]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2729 +assert_return(() => invoke($14, `load8_u`, [41590]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2730 +assert_return(() => invoke($14, `load8_u`, [41789]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2731 +assert_return(() => invoke($14, `load8_u`, [41988]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2732 +assert_return(() => invoke($14, `load8_u`, [42187]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2733 +assert_return(() => invoke($14, `load8_u`, [42386]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2734 +assert_return(() => invoke($14, `load8_u`, [42585]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2735 +assert_return(() => invoke($14, `load8_u`, [42784]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2736 +assert_return(() => invoke($14, `load8_u`, [42983]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2737 +assert_return(() => invoke($14, `load8_u`, [43182]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2738 +assert_return(() => invoke($14, `load8_u`, [43381]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2739 +assert_return(() => invoke($14, `load8_u`, [43580]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2740 +assert_return(() => invoke($14, `load8_u`, [43779]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2741 +assert_return(() => invoke($14, `load8_u`, [43978]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2742 +assert_return(() => invoke($14, `load8_u`, [44177]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2743 +assert_return(() => invoke($14, `load8_u`, [44376]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2744 +assert_return(() => invoke($14, `load8_u`, [44575]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2745 +assert_return(() => invoke($14, `load8_u`, [44774]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2746 +assert_return(() => invoke($14, `load8_u`, [44973]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2747 +assert_return(() => invoke($14, `load8_u`, [45172]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2748 +assert_return(() => invoke($14, `load8_u`, [45371]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2749 +assert_return(() => invoke($14, `load8_u`, [45570]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2750 +assert_return(() => invoke($14, `load8_u`, [45769]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2751 +assert_return(() => invoke($14, `load8_u`, [45968]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2752 +assert_return(() => invoke($14, `load8_u`, [46167]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2753 +assert_return(() => invoke($14, `load8_u`, [46366]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2754 +assert_return(() => invoke($14, `load8_u`, [46565]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2755 +assert_return(() => invoke($14, `load8_u`, [46764]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2756 +assert_return(() => invoke($14, `load8_u`, [46963]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2757 +assert_return(() => invoke($14, `load8_u`, [47162]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2758 +assert_return(() => invoke($14, `load8_u`, [47361]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2759 +assert_return(() => invoke($14, `load8_u`, [47560]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2760 +assert_return(() => invoke($14, `load8_u`, [47759]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2761 +assert_return(() => invoke($14, `load8_u`, [47958]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2762 +assert_return(() => invoke($14, `load8_u`, [48157]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2763 +assert_return(() => invoke($14, `load8_u`, [48356]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2764 +assert_return(() => invoke($14, `load8_u`, [48555]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2765 +assert_return(() => invoke($14, `load8_u`, [48754]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2766 +assert_return(() => invoke($14, `load8_u`, [48953]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2767 +assert_return(() => invoke($14, `load8_u`, [49152]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2768 +assert_return(() => invoke($14, `load8_u`, [49351]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2769 +assert_return(() => invoke($14, `load8_u`, [49550]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2770 +assert_return(() => invoke($14, `load8_u`, [49749]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2771 +assert_return(() => invoke($14, `load8_u`, [49948]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2772 +assert_return(() => invoke($14, `load8_u`, [50147]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2773 +assert_return(() => invoke($14, `load8_u`, [50346]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2774 +assert_return(() => invoke($14, `load8_u`, [50545]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2775 +assert_return(() => invoke($14, `load8_u`, [50744]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2776 +assert_return(() => invoke($14, `load8_u`, [50943]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2777 +assert_return(() => invoke($14, `load8_u`, [51142]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2778 +assert_return(() => invoke($14, `load8_u`, [51341]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2779 +assert_return(() => invoke($14, `load8_u`, [51540]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2780 +assert_return(() => invoke($14, `load8_u`, [51739]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2781 +assert_return(() => invoke($14, `load8_u`, [51938]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2782 +assert_return(() => invoke($14, `load8_u`, [52137]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2783 +assert_return(() => invoke($14, `load8_u`, [52336]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2784 +assert_return(() => invoke($14, `load8_u`, [52535]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2785 +assert_return(() => invoke($14, `load8_u`, [52734]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2786 +assert_return(() => invoke($14, `load8_u`, [52933]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2787 +assert_return(() => invoke($14, `load8_u`, [53132]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2788 +assert_return(() => invoke($14, `load8_u`, [53331]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2789 +assert_return(() => invoke($14, `load8_u`, [53530]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2790 +assert_return(() => invoke($14, `load8_u`, [53729]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2791 +assert_return(() => invoke($14, `load8_u`, [53928]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2792 +assert_return(() => invoke($14, `load8_u`, [54127]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2793 +assert_return(() => invoke($14, `load8_u`, [54326]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2794 +assert_return(() => invoke($14, `load8_u`, [54525]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2795 +assert_return(() => invoke($14, `load8_u`, [54724]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2796 +assert_return(() => invoke($14, `load8_u`, [54923]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2797 +assert_return(() => invoke($14, `load8_u`, [55122]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2798 +assert_return(() => invoke($14, `load8_u`, [55321]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2799 +assert_return(() => invoke($14, `load8_u`, [55520]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2800 +assert_return(() => invoke($14, `load8_u`, [55719]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2801 +assert_return(() => invoke($14, `load8_u`, [55918]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2802 +assert_return(() => invoke($14, `load8_u`, [56117]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2803 +assert_return(() => invoke($14, `load8_u`, [56316]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2804 +assert_return(() => invoke($14, `load8_u`, [56515]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2805 +assert_return(() => invoke($14, `load8_u`, [56714]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2806 +assert_return(() => invoke($14, `load8_u`, [56913]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2807 +assert_return(() => invoke($14, `load8_u`, [57112]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2808 +assert_return(() => invoke($14, `load8_u`, [57311]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2809 +assert_return(() => invoke($14, `load8_u`, [57510]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2810 +assert_return(() => invoke($14, `load8_u`, [57709]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2811 +assert_return(() => invoke($14, `load8_u`, [57908]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2812 +assert_return(() => invoke($14, `load8_u`, [58107]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2813 +assert_return(() => invoke($14, `load8_u`, [58306]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2814 +assert_return(() => invoke($14, `load8_u`, [58505]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2815 +assert_return(() => invoke($14, `load8_u`, [58704]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2816 +assert_return(() => invoke($14, `load8_u`, [58903]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2817 +assert_return(() => invoke($14, `load8_u`, [59102]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2818 +assert_return(() => invoke($14, `load8_u`, [59301]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2819 +assert_return(() => invoke($14, `load8_u`, [59500]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2820 +assert_return(() => invoke($14, `load8_u`, [59699]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2821 +assert_return(() => invoke($14, `load8_u`, [59898]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2822 +assert_return(() => invoke($14, `load8_u`, [60097]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2823 +assert_return(() => invoke($14, `load8_u`, [60296]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2824 +assert_return(() => invoke($14, `load8_u`, [60495]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2825 +assert_return(() => invoke($14, `load8_u`, [60694]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2826 +assert_return(() => invoke($14, `load8_u`, [60893]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2827 +assert_return(() => invoke($14, `load8_u`, [61092]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2828 +assert_return(() => invoke($14, `load8_u`, [61291]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2829 +assert_return(() => invoke($14, `load8_u`, [61490]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2830 +assert_return(() => invoke($14, `load8_u`, [61689]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2831 +assert_return(() => invoke($14, `load8_u`, [61888]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2832 +assert_return(() => invoke($14, `load8_u`, [62087]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2833 +assert_return(() => invoke($14, `load8_u`, [62286]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2834 +assert_return(() => invoke($14, `load8_u`, [62485]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2835 +assert_return(() => invoke($14, `load8_u`, [62684]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2836 +assert_return(() => invoke($14, `load8_u`, [62883]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2837 +assert_return(() => invoke($14, `load8_u`, [63082]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2838 +assert_return(() => invoke($14, `load8_u`, [63281]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2839 +assert_return(() => invoke($14, `load8_u`, [63480]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2840 +assert_return(() => invoke($14, `load8_u`, [63679]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2841 +assert_return(() => invoke($14, `load8_u`, [63878]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2842 +assert_return(() => invoke($14, `load8_u`, [64077]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2843 +assert_return(() => invoke($14, `load8_u`, [64276]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2844 +assert_return(() => invoke($14, `load8_u`, [64475]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2845 +assert_return(() => invoke($14, `load8_u`, [64674]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2846 +assert_return(() => invoke($14, `load8_u`, [64873]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2847 +assert_return(() => invoke($14, `load8_u`, [65072]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2848 +assert_return(() => invoke($14, `load8_u`, [65271]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2849 +assert_return(() => invoke($14, `load8_u`, [65470]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2850 +assert_return(() => invoke($14, `load8_u`, [65506]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2851 +assert_return(() => invoke($14, `load8_u`, [65507]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:2852 +assert_return(() => invoke($14, `load8_u`, [65508]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:2853 +assert_return(() => invoke($14, `load8_u`, [65509]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:2854 +assert_return(() => invoke($14, `load8_u`, [65510]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:2855 +assert_return(() => invoke($14, `load8_u`, [65511]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:2856 +assert_return(() => invoke($14, `load8_u`, [65512]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:2857 +assert_return(() => invoke($14, `load8_u`, [65513]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:2858 +assert_return(() => invoke($14, `load8_u`, [65514]), [value("i32", 8)]); + +// ./test/core/memory_copy.wast:2859 +assert_return(() => invoke($14, `load8_u`, [65515]), [value("i32", 9)]); + +// ./test/core/memory_copy.wast:2860 +assert_return(() => invoke($14, `load8_u`, [65516]), [value("i32", 10)]); + +// ./test/core/memory_copy.wast:2861 +assert_return(() => invoke($14, `load8_u`, [65517]), [value("i32", 11)]); + +// ./test/core/memory_copy.wast:2862 +assert_return(() => invoke($14, `load8_u`, [65518]), [value("i32", 12)]); + +// ./test/core/memory_copy.wast:2863 +assert_return(() => invoke($14, `load8_u`, [65519]), [value("i32", 13)]); + +// ./test/core/memory_copy.wast:2864 +assert_return(() => invoke($14, `load8_u`, [65520]), [value("i32", 14)]); + +// ./test/core/memory_copy.wast:2865 +assert_return(() => invoke($14, `load8_u`, [65521]), [value("i32", 15)]); + +// ./test/core/memory_copy.wast:2866 +assert_return(() => invoke($14, `load8_u`, [65522]), [value("i32", 16)]); + +// ./test/core/memory_copy.wast:2867 +assert_return(() => invoke($14, `load8_u`, [65523]), [value("i32", 17)]); + +// ./test/core/memory_copy.wast:2868 +assert_return(() => invoke($14, `load8_u`, [65524]), [value("i32", 18)]); + +// ./test/core/memory_copy.wast:2869 +assert_return(() => invoke($14, `load8_u`, [65525]), [value("i32", 19)]); + +// ./test/core/memory_copy.wast:2871 +let $15 = instantiate(`(module + (memory (export "mem") 1 1 ) + (data (i32.const 65516) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13") + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (memory.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:2879 +assert_trap(() => invoke($15, `run`, [65506, 65516, 40]), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:2882 +assert_return(() => invoke($15, `load8_u`, [198]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2883 +assert_return(() => invoke($15, `load8_u`, [397]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2884 +assert_return(() => invoke($15, `load8_u`, [596]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2885 +assert_return(() => invoke($15, `load8_u`, [795]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2886 +assert_return(() => invoke($15, `load8_u`, [994]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2887 +assert_return(() => invoke($15, `load8_u`, [1193]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2888 +assert_return(() => invoke($15, `load8_u`, [1392]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2889 +assert_return(() => invoke($15, `load8_u`, [1591]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2890 +assert_return(() => invoke($15, `load8_u`, [1790]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2891 +assert_return(() => invoke($15, `load8_u`, [1989]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2892 +assert_return(() => invoke($15, `load8_u`, [2188]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2893 +assert_return(() => invoke($15, `load8_u`, [2387]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2894 +assert_return(() => invoke($15, `load8_u`, [2586]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2895 +assert_return(() => invoke($15, `load8_u`, [2785]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2896 +assert_return(() => invoke($15, `load8_u`, [2984]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2897 +assert_return(() => invoke($15, `load8_u`, [3183]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2898 +assert_return(() => invoke($15, `load8_u`, [3382]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2899 +assert_return(() => invoke($15, `load8_u`, [3581]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2900 +assert_return(() => invoke($15, `load8_u`, [3780]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2901 +assert_return(() => invoke($15, `load8_u`, [3979]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2902 +assert_return(() => invoke($15, `load8_u`, [4178]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2903 +assert_return(() => invoke($15, `load8_u`, [4377]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2904 +assert_return(() => invoke($15, `load8_u`, [4576]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2905 +assert_return(() => invoke($15, `load8_u`, [4775]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2906 +assert_return(() => invoke($15, `load8_u`, [4974]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2907 +assert_return(() => invoke($15, `load8_u`, [5173]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2908 +assert_return(() => invoke($15, `load8_u`, [5372]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2909 +assert_return(() => invoke($15, `load8_u`, [5571]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2910 +assert_return(() => invoke($15, `load8_u`, [5770]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2911 +assert_return(() => invoke($15, `load8_u`, [5969]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2912 +assert_return(() => invoke($15, `load8_u`, [6168]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2913 +assert_return(() => invoke($15, `load8_u`, [6367]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2914 +assert_return(() => invoke($15, `load8_u`, [6566]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2915 +assert_return(() => invoke($15, `load8_u`, [6765]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2916 +assert_return(() => invoke($15, `load8_u`, [6964]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2917 +assert_return(() => invoke($15, `load8_u`, [7163]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2918 +assert_return(() => invoke($15, `load8_u`, [7362]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2919 +assert_return(() => invoke($15, `load8_u`, [7561]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2920 +assert_return(() => invoke($15, `load8_u`, [7760]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2921 +assert_return(() => invoke($15, `load8_u`, [7959]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2922 +assert_return(() => invoke($15, `load8_u`, [8158]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2923 +assert_return(() => invoke($15, `load8_u`, [8357]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2924 +assert_return(() => invoke($15, `load8_u`, [8556]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2925 +assert_return(() => invoke($15, `load8_u`, [8755]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2926 +assert_return(() => invoke($15, `load8_u`, [8954]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2927 +assert_return(() => invoke($15, `load8_u`, [9153]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2928 +assert_return(() => invoke($15, `load8_u`, [9352]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2929 +assert_return(() => invoke($15, `load8_u`, [9551]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2930 +assert_return(() => invoke($15, `load8_u`, [9750]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2931 +assert_return(() => invoke($15, `load8_u`, [9949]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2932 +assert_return(() => invoke($15, `load8_u`, [10148]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2933 +assert_return(() => invoke($15, `load8_u`, [10347]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2934 +assert_return(() => invoke($15, `load8_u`, [10546]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2935 +assert_return(() => invoke($15, `load8_u`, [10745]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2936 +assert_return(() => invoke($15, `load8_u`, [10944]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2937 +assert_return(() => invoke($15, `load8_u`, [11143]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2938 +assert_return(() => invoke($15, `load8_u`, [11342]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2939 +assert_return(() => invoke($15, `load8_u`, [11541]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2940 +assert_return(() => invoke($15, `load8_u`, [11740]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2941 +assert_return(() => invoke($15, `load8_u`, [11939]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2942 +assert_return(() => invoke($15, `load8_u`, [12138]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2943 +assert_return(() => invoke($15, `load8_u`, [12337]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2944 +assert_return(() => invoke($15, `load8_u`, [12536]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2945 +assert_return(() => invoke($15, `load8_u`, [12735]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2946 +assert_return(() => invoke($15, `load8_u`, [12934]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2947 +assert_return(() => invoke($15, `load8_u`, [13133]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2948 +assert_return(() => invoke($15, `load8_u`, [13332]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2949 +assert_return(() => invoke($15, `load8_u`, [13531]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2950 +assert_return(() => invoke($15, `load8_u`, [13730]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2951 +assert_return(() => invoke($15, `load8_u`, [13929]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2952 +assert_return(() => invoke($15, `load8_u`, [14128]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2953 +assert_return(() => invoke($15, `load8_u`, [14327]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2954 +assert_return(() => invoke($15, `load8_u`, [14526]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2955 +assert_return(() => invoke($15, `load8_u`, [14725]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2956 +assert_return(() => invoke($15, `load8_u`, [14924]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2957 +assert_return(() => invoke($15, `load8_u`, [15123]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2958 +assert_return(() => invoke($15, `load8_u`, [15322]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2959 +assert_return(() => invoke($15, `load8_u`, [15521]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2960 +assert_return(() => invoke($15, `load8_u`, [15720]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2961 +assert_return(() => invoke($15, `load8_u`, [15919]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2962 +assert_return(() => invoke($15, `load8_u`, [16118]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2963 +assert_return(() => invoke($15, `load8_u`, [16317]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2964 +assert_return(() => invoke($15, `load8_u`, [16516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2965 +assert_return(() => invoke($15, `load8_u`, [16715]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2966 +assert_return(() => invoke($15, `load8_u`, [16914]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2967 +assert_return(() => invoke($15, `load8_u`, [17113]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2968 +assert_return(() => invoke($15, `load8_u`, [17312]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2969 +assert_return(() => invoke($15, `load8_u`, [17511]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2970 +assert_return(() => invoke($15, `load8_u`, [17710]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2971 +assert_return(() => invoke($15, `load8_u`, [17909]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2972 +assert_return(() => invoke($15, `load8_u`, [18108]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2973 +assert_return(() => invoke($15, `load8_u`, [18307]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2974 +assert_return(() => invoke($15, `load8_u`, [18506]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2975 +assert_return(() => invoke($15, `load8_u`, [18705]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2976 +assert_return(() => invoke($15, `load8_u`, [18904]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2977 +assert_return(() => invoke($15, `load8_u`, [19103]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2978 +assert_return(() => invoke($15, `load8_u`, [19302]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2979 +assert_return(() => invoke($15, `load8_u`, [19501]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2980 +assert_return(() => invoke($15, `load8_u`, [19700]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2981 +assert_return(() => invoke($15, `load8_u`, [19899]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2982 +assert_return(() => invoke($15, `load8_u`, [20098]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2983 +assert_return(() => invoke($15, `load8_u`, [20297]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2984 +assert_return(() => invoke($15, `load8_u`, [20496]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2985 +assert_return(() => invoke($15, `load8_u`, [20695]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2986 +assert_return(() => invoke($15, `load8_u`, [20894]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2987 +assert_return(() => invoke($15, `load8_u`, [21093]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2988 +assert_return(() => invoke($15, `load8_u`, [21292]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2989 +assert_return(() => invoke($15, `load8_u`, [21491]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2990 +assert_return(() => invoke($15, `load8_u`, [21690]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2991 +assert_return(() => invoke($15, `load8_u`, [21889]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2992 +assert_return(() => invoke($15, `load8_u`, [22088]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2993 +assert_return(() => invoke($15, `load8_u`, [22287]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2994 +assert_return(() => invoke($15, `load8_u`, [22486]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2995 +assert_return(() => invoke($15, `load8_u`, [22685]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2996 +assert_return(() => invoke($15, `load8_u`, [22884]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2997 +assert_return(() => invoke($15, `load8_u`, [23083]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2998 +assert_return(() => invoke($15, `load8_u`, [23282]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:2999 +assert_return(() => invoke($15, `load8_u`, [23481]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3000 +assert_return(() => invoke($15, `load8_u`, [23680]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3001 +assert_return(() => invoke($15, `load8_u`, [23879]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3002 +assert_return(() => invoke($15, `load8_u`, [24078]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3003 +assert_return(() => invoke($15, `load8_u`, [24277]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3004 +assert_return(() => invoke($15, `load8_u`, [24476]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3005 +assert_return(() => invoke($15, `load8_u`, [24675]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3006 +assert_return(() => invoke($15, `load8_u`, [24874]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3007 +assert_return(() => invoke($15, `load8_u`, [25073]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3008 +assert_return(() => invoke($15, `load8_u`, [25272]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3009 +assert_return(() => invoke($15, `load8_u`, [25471]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3010 +assert_return(() => invoke($15, `load8_u`, [25670]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3011 +assert_return(() => invoke($15, `load8_u`, [25869]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3012 +assert_return(() => invoke($15, `load8_u`, [26068]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3013 +assert_return(() => invoke($15, `load8_u`, [26267]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3014 +assert_return(() => invoke($15, `load8_u`, [26466]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3015 +assert_return(() => invoke($15, `load8_u`, [26665]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3016 +assert_return(() => invoke($15, `load8_u`, [26864]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3017 +assert_return(() => invoke($15, `load8_u`, [27063]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3018 +assert_return(() => invoke($15, `load8_u`, [27262]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3019 +assert_return(() => invoke($15, `load8_u`, [27461]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3020 +assert_return(() => invoke($15, `load8_u`, [27660]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3021 +assert_return(() => invoke($15, `load8_u`, [27859]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3022 +assert_return(() => invoke($15, `load8_u`, [28058]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3023 +assert_return(() => invoke($15, `load8_u`, [28257]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3024 +assert_return(() => invoke($15, `load8_u`, [28456]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3025 +assert_return(() => invoke($15, `load8_u`, [28655]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3026 +assert_return(() => invoke($15, `load8_u`, [28854]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3027 +assert_return(() => invoke($15, `load8_u`, [29053]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3028 +assert_return(() => invoke($15, `load8_u`, [29252]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3029 +assert_return(() => invoke($15, `load8_u`, [29451]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3030 +assert_return(() => invoke($15, `load8_u`, [29650]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3031 +assert_return(() => invoke($15, `load8_u`, [29849]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3032 +assert_return(() => invoke($15, `load8_u`, [30048]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3033 +assert_return(() => invoke($15, `load8_u`, [30247]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3034 +assert_return(() => invoke($15, `load8_u`, [30446]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3035 +assert_return(() => invoke($15, `load8_u`, [30645]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3036 +assert_return(() => invoke($15, `load8_u`, [30844]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3037 +assert_return(() => invoke($15, `load8_u`, [31043]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3038 +assert_return(() => invoke($15, `load8_u`, [31242]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3039 +assert_return(() => invoke($15, `load8_u`, [31441]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3040 +assert_return(() => invoke($15, `load8_u`, [31640]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3041 +assert_return(() => invoke($15, `load8_u`, [31839]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3042 +assert_return(() => invoke($15, `load8_u`, [32038]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3043 +assert_return(() => invoke($15, `load8_u`, [32237]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3044 +assert_return(() => invoke($15, `load8_u`, [32436]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3045 +assert_return(() => invoke($15, `load8_u`, [32635]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3046 +assert_return(() => invoke($15, `load8_u`, [32834]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3047 +assert_return(() => invoke($15, `load8_u`, [33033]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3048 +assert_return(() => invoke($15, `load8_u`, [33232]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3049 +assert_return(() => invoke($15, `load8_u`, [33431]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3050 +assert_return(() => invoke($15, `load8_u`, [33630]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3051 +assert_return(() => invoke($15, `load8_u`, [33829]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3052 +assert_return(() => invoke($15, `load8_u`, [34028]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3053 +assert_return(() => invoke($15, `load8_u`, [34227]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3054 +assert_return(() => invoke($15, `load8_u`, [34426]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3055 +assert_return(() => invoke($15, `load8_u`, [34625]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3056 +assert_return(() => invoke($15, `load8_u`, [34824]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3057 +assert_return(() => invoke($15, `load8_u`, [35023]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3058 +assert_return(() => invoke($15, `load8_u`, [35222]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3059 +assert_return(() => invoke($15, `load8_u`, [35421]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3060 +assert_return(() => invoke($15, `load8_u`, [35620]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3061 +assert_return(() => invoke($15, `load8_u`, [35819]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3062 +assert_return(() => invoke($15, `load8_u`, [36018]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3063 +assert_return(() => invoke($15, `load8_u`, [36217]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3064 +assert_return(() => invoke($15, `load8_u`, [36416]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3065 +assert_return(() => invoke($15, `load8_u`, [36615]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3066 +assert_return(() => invoke($15, `load8_u`, [36814]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3067 +assert_return(() => invoke($15, `load8_u`, [37013]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3068 +assert_return(() => invoke($15, `load8_u`, [37212]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3069 +assert_return(() => invoke($15, `load8_u`, [37411]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3070 +assert_return(() => invoke($15, `load8_u`, [37610]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3071 +assert_return(() => invoke($15, `load8_u`, [37809]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3072 +assert_return(() => invoke($15, `load8_u`, [38008]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3073 +assert_return(() => invoke($15, `load8_u`, [38207]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3074 +assert_return(() => invoke($15, `load8_u`, [38406]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3075 +assert_return(() => invoke($15, `load8_u`, [38605]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3076 +assert_return(() => invoke($15, `load8_u`, [38804]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3077 +assert_return(() => invoke($15, `load8_u`, [39003]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3078 +assert_return(() => invoke($15, `load8_u`, [39202]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3079 +assert_return(() => invoke($15, `load8_u`, [39401]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3080 +assert_return(() => invoke($15, `load8_u`, [39600]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3081 +assert_return(() => invoke($15, `load8_u`, [39799]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3082 +assert_return(() => invoke($15, `load8_u`, [39998]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3083 +assert_return(() => invoke($15, `load8_u`, [40197]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3084 +assert_return(() => invoke($15, `load8_u`, [40396]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3085 +assert_return(() => invoke($15, `load8_u`, [40595]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3086 +assert_return(() => invoke($15, `load8_u`, [40794]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3087 +assert_return(() => invoke($15, `load8_u`, [40993]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3088 +assert_return(() => invoke($15, `load8_u`, [41192]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3089 +assert_return(() => invoke($15, `load8_u`, [41391]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3090 +assert_return(() => invoke($15, `load8_u`, [41590]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3091 +assert_return(() => invoke($15, `load8_u`, [41789]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3092 +assert_return(() => invoke($15, `load8_u`, [41988]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3093 +assert_return(() => invoke($15, `load8_u`, [42187]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3094 +assert_return(() => invoke($15, `load8_u`, [42386]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3095 +assert_return(() => invoke($15, `load8_u`, [42585]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3096 +assert_return(() => invoke($15, `load8_u`, [42784]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3097 +assert_return(() => invoke($15, `load8_u`, [42983]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3098 +assert_return(() => invoke($15, `load8_u`, [43182]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3099 +assert_return(() => invoke($15, `load8_u`, [43381]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3100 +assert_return(() => invoke($15, `load8_u`, [43580]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3101 +assert_return(() => invoke($15, `load8_u`, [43779]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3102 +assert_return(() => invoke($15, `load8_u`, [43978]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3103 +assert_return(() => invoke($15, `load8_u`, [44177]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3104 +assert_return(() => invoke($15, `load8_u`, [44376]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3105 +assert_return(() => invoke($15, `load8_u`, [44575]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3106 +assert_return(() => invoke($15, `load8_u`, [44774]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3107 +assert_return(() => invoke($15, `load8_u`, [44973]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3108 +assert_return(() => invoke($15, `load8_u`, [45172]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3109 +assert_return(() => invoke($15, `load8_u`, [45371]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3110 +assert_return(() => invoke($15, `load8_u`, [45570]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3111 +assert_return(() => invoke($15, `load8_u`, [45769]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3112 +assert_return(() => invoke($15, `load8_u`, [45968]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3113 +assert_return(() => invoke($15, `load8_u`, [46167]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3114 +assert_return(() => invoke($15, `load8_u`, [46366]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3115 +assert_return(() => invoke($15, `load8_u`, [46565]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3116 +assert_return(() => invoke($15, `load8_u`, [46764]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3117 +assert_return(() => invoke($15, `load8_u`, [46963]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3118 +assert_return(() => invoke($15, `load8_u`, [47162]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3119 +assert_return(() => invoke($15, `load8_u`, [47361]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3120 +assert_return(() => invoke($15, `load8_u`, [47560]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3121 +assert_return(() => invoke($15, `load8_u`, [47759]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3122 +assert_return(() => invoke($15, `load8_u`, [47958]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3123 +assert_return(() => invoke($15, `load8_u`, [48157]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3124 +assert_return(() => invoke($15, `load8_u`, [48356]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3125 +assert_return(() => invoke($15, `load8_u`, [48555]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3126 +assert_return(() => invoke($15, `load8_u`, [48754]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3127 +assert_return(() => invoke($15, `load8_u`, [48953]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3128 +assert_return(() => invoke($15, `load8_u`, [49152]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3129 +assert_return(() => invoke($15, `load8_u`, [49351]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3130 +assert_return(() => invoke($15, `load8_u`, [49550]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3131 +assert_return(() => invoke($15, `load8_u`, [49749]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3132 +assert_return(() => invoke($15, `load8_u`, [49948]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3133 +assert_return(() => invoke($15, `load8_u`, [50147]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3134 +assert_return(() => invoke($15, `load8_u`, [50346]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3135 +assert_return(() => invoke($15, `load8_u`, [50545]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3136 +assert_return(() => invoke($15, `load8_u`, [50744]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3137 +assert_return(() => invoke($15, `load8_u`, [50943]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3138 +assert_return(() => invoke($15, `load8_u`, [51142]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3139 +assert_return(() => invoke($15, `load8_u`, [51341]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3140 +assert_return(() => invoke($15, `load8_u`, [51540]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3141 +assert_return(() => invoke($15, `load8_u`, [51739]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3142 +assert_return(() => invoke($15, `load8_u`, [51938]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3143 +assert_return(() => invoke($15, `load8_u`, [52137]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3144 +assert_return(() => invoke($15, `load8_u`, [52336]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3145 +assert_return(() => invoke($15, `load8_u`, [52535]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3146 +assert_return(() => invoke($15, `load8_u`, [52734]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3147 +assert_return(() => invoke($15, `load8_u`, [52933]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3148 +assert_return(() => invoke($15, `load8_u`, [53132]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3149 +assert_return(() => invoke($15, `load8_u`, [53331]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3150 +assert_return(() => invoke($15, `load8_u`, [53530]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3151 +assert_return(() => invoke($15, `load8_u`, [53729]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3152 +assert_return(() => invoke($15, `load8_u`, [53928]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3153 +assert_return(() => invoke($15, `load8_u`, [54127]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3154 +assert_return(() => invoke($15, `load8_u`, [54326]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3155 +assert_return(() => invoke($15, `load8_u`, [54525]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3156 +assert_return(() => invoke($15, `load8_u`, [54724]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3157 +assert_return(() => invoke($15, `load8_u`, [54923]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3158 +assert_return(() => invoke($15, `load8_u`, [55122]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3159 +assert_return(() => invoke($15, `load8_u`, [55321]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3160 +assert_return(() => invoke($15, `load8_u`, [55520]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3161 +assert_return(() => invoke($15, `load8_u`, [55719]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3162 +assert_return(() => invoke($15, `load8_u`, [55918]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3163 +assert_return(() => invoke($15, `load8_u`, [56117]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3164 +assert_return(() => invoke($15, `load8_u`, [56316]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3165 +assert_return(() => invoke($15, `load8_u`, [56515]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3166 +assert_return(() => invoke($15, `load8_u`, [56714]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3167 +assert_return(() => invoke($15, `load8_u`, [56913]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3168 +assert_return(() => invoke($15, `load8_u`, [57112]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3169 +assert_return(() => invoke($15, `load8_u`, [57311]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3170 +assert_return(() => invoke($15, `load8_u`, [57510]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3171 +assert_return(() => invoke($15, `load8_u`, [57709]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3172 +assert_return(() => invoke($15, `load8_u`, [57908]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3173 +assert_return(() => invoke($15, `load8_u`, [58107]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3174 +assert_return(() => invoke($15, `load8_u`, [58306]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3175 +assert_return(() => invoke($15, `load8_u`, [58505]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3176 +assert_return(() => invoke($15, `load8_u`, [58704]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3177 +assert_return(() => invoke($15, `load8_u`, [58903]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3178 +assert_return(() => invoke($15, `load8_u`, [59102]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3179 +assert_return(() => invoke($15, `load8_u`, [59301]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3180 +assert_return(() => invoke($15, `load8_u`, [59500]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3181 +assert_return(() => invoke($15, `load8_u`, [59699]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3182 +assert_return(() => invoke($15, `load8_u`, [59898]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3183 +assert_return(() => invoke($15, `load8_u`, [60097]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3184 +assert_return(() => invoke($15, `load8_u`, [60296]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3185 +assert_return(() => invoke($15, `load8_u`, [60495]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3186 +assert_return(() => invoke($15, `load8_u`, [60694]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3187 +assert_return(() => invoke($15, `load8_u`, [60893]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3188 +assert_return(() => invoke($15, `load8_u`, [61092]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3189 +assert_return(() => invoke($15, `load8_u`, [61291]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3190 +assert_return(() => invoke($15, `load8_u`, [61490]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3191 +assert_return(() => invoke($15, `load8_u`, [61689]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3192 +assert_return(() => invoke($15, `load8_u`, [61888]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3193 +assert_return(() => invoke($15, `load8_u`, [62087]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3194 +assert_return(() => invoke($15, `load8_u`, [62286]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3195 +assert_return(() => invoke($15, `load8_u`, [62485]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3196 +assert_return(() => invoke($15, `load8_u`, [62684]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3197 +assert_return(() => invoke($15, `load8_u`, [62883]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3198 +assert_return(() => invoke($15, `load8_u`, [63082]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3199 +assert_return(() => invoke($15, `load8_u`, [63281]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3200 +assert_return(() => invoke($15, `load8_u`, [63480]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3201 +assert_return(() => invoke($15, `load8_u`, [63679]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3202 +assert_return(() => invoke($15, `load8_u`, [63878]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3203 +assert_return(() => invoke($15, `load8_u`, [64077]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3204 +assert_return(() => invoke($15, `load8_u`, [64276]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3205 +assert_return(() => invoke($15, `load8_u`, [64475]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3206 +assert_return(() => invoke($15, `load8_u`, [64674]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3207 +assert_return(() => invoke($15, `load8_u`, [64873]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3208 +assert_return(() => invoke($15, `load8_u`, [65072]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3209 +assert_return(() => invoke($15, `load8_u`, [65271]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3210 +assert_return(() => invoke($15, `load8_u`, [65470]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3211 +assert_return(() => invoke($15, `load8_u`, [65516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3212 +assert_return(() => invoke($15, `load8_u`, [65517]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:3213 +assert_return(() => invoke($15, `load8_u`, [65518]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:3214 +assert_return(() => invoke($15, `load8_u`, [65519]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:3215 +assert_return(() => invoke($15, `load8_u`, [65520]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:3216 +assert_return(() => invoke($15, `load8_u`, [65521]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:3217 +assert_return(() => invoke($15, `load8_u`, [65522]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:3218 +assert_return(() => invoke($15, `load8_u`, [65523]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:3219 +assert_return(() => invoke($15, `load8_u`, [65524]), [value("i32", 8)]); + +// ./test/core/memory_copy.wast:3220 +assert_return(() => invoke($15, `load8_u`, [65525]), [value("i32", 9)]); + +// ./test/core/memory_copy.wast:3221 +assert_return(() => invoke($15, `load8_u`, [65526]), [value("i32", 10)]); + +// ./test/core/memory_copy.wast:3222 +assert_return(() => invoke($15, `load8_u`, [65527]), [value("i32", 11)]); + +// ./test/core/memory_copy.wast:3223 +assert_return(() => invoke($15, `load8_u`, [65528]), [value("i32", 12)]); + +// ./test/core/memory_copy.wast:3224 +assert_return(() => invoke($15, `load8_u`, [65529]), [value("i32", 13)]); + +// ./test/core/memory_copy.wast:3225 +assert_return(() => invoke($15, `load8_u`, [65530]), [value("i32", 14)]); + +// ./test/core/memory_copy.wast:3226 +assert_return(() => invoke($15, `load8_u`, [65531]), [value("i32", 15)]); + +// ./test/core/memory_copy.wast:3227 +assert_return(() => invoke($15, `load8_u`, [65532]), [value("i32", 16)]); + +// ./test/core/memory_copy.wast:3228 +assert_return(() => invoke($15, `load8_u`, [65533]), [value("i32", 17)]); + +// ./test/core/memory_copy.wast:3229 +assert_return(() => invoke($15, `load8_u`, [65534]), [value("i32", 18)]); + +// ./test/core/memory_copy.wast:3230 +assert_return(() => invoke($15, `load8_u`, [65535]), [value("i32", 19)]); + +// ./test/core/memory_copy.wast:3232 +let $16 = instantiate(`(module + (memory (export "mem") 1 1 ) + (data (i32.const 65516) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13") + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (memory.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:3240 +assert_trap(() => invoke($16, `run`, [65516, 65516, 40]), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:3243 +assert_return(() => invoke($16, `load8_u`, [198]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3244 +assert_return(() => invoke($16, `load8_u`, [397]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3245 +assert_return(() => invoke($16, `load8_u`, [596]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3246 +assert_return(() => invoke($16, `load8_u`, [795]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3247 +assert_return(() => invoke($16, `load8_u`, [994]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3248 +assert_return(() => invoke($16, `load8_u`, [1193]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3249 +assert_return(() => invoke($16, `load8_u`, [1392]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3250 +assert_return(() => invoke($16, `load8_u`, [1591]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3251 +assert_return(() => invoke($16, `load8_u`, [1790]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3252 +assert_return(() => invoke($16, `load8_u`, [1989]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3253 +assert_return(() => invoke($16, `load8_u`, [2188]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3254 +assert_return(() => invoke($16, `load8_u`, [2387]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3255 +assert_return(() => invoke($16, `load8_u`, [2586]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3256 +assert_return(() => invoke($16, `load8_u`, [2785]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3257 +assert_return(() => invoke($16, `load8_u`, [2984]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3258 +assert_return(() => invoke($16, `load8_u`, [3183]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3259 +assert_return(() => invoke($16, `load8_u`, [3382]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3260 +assert_return(() => invoke($16, `load8_u`, [3581]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3261 +assert_return(() => invoke($16, `load8_u`, [3780]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3262 +assert_return(() => invoke($16, `load8_u`, [3979]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3263 +assert_return(() => invoke($16, `load8_u`, [4178]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3264 +assert_return(() => invoke($16, `load8_u`, [4377]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3265 +assert_return(() => invoke($16, `load8_u`, [4576]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3266 +assert_return(() => invoke($16, `load8_u`, [4775]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3267 +assert_return(() => invoke($16, `load8_u`, [4974]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3268 +assert_return(() => invoke($16, `load8_u`, [5173]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3269 +assert_return(() => invoke($16, `load8_u`, [5372]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3270 +assert_return(() => invoke($16, `load8_u`, [5571]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3271 +assert_return(() => invoke($16, `load8_u`, [5770]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3272 +assert_return(() => invoke($16, `load8_u`, [5969]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3273 +assert_return(() => invoke($16, `load8_u`, [6168]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3274 +assert_return(() => invoke($16, `load8_u`, [6367]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3275 +assert_return(() => invoke($16, `load8_u`, [6566]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3276 +assert_return(() => invoke($16, `load8_u`, [6765]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3277 +assert_return(() => invoke($16, `load8_u`, [6964]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3278 +assert_return(() => invoke($16, `load8_u`, [7163]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3279 +assert_return(() => invoke($16, `load8_u`, [7362]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3280 +assert_return(() => invoke($16, `load8_u`, [7561]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3281 +assert_return(() => invoke($16, `load8_u`, [7760]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3282 +assert_return(() => invoke($16, `load8_u`, [7959]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3283 +assert_return(() => invoke($16, `load8_u`, [8158]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3284 +assert_return(() => invoke($16, `load8_u`, [8357]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3285 +assert_return(() => invoke($16, `load8_u`, [8556]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3286 +assert_return(() => invoke($16, `load8_u`, [8755]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3287 +assert_return(() => invoke($16, `load8_u`, [8954]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3288 +assert_return(() => invoke($16, `load8_u`, [9153]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3289 +assert_return(() => invoke($16, `load8_u`, [9352]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3290 +assert_return(() => invoke($16, `load8_u`, [9551]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3291 +assert_return(() => invoke($16, `load8_u`, [9750]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3292 +assert_return(() => invoke($16, `load8_u`, [9949]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3293 +assert_return(() => invoke($16, `load8_u`, [10148]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3294 +assert_return(() => invoke($16, `load8_u`, [10347]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3295 +assert_return(() => invoke($16, `load8_u`, [10546]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3296 +assert_return(() => invoke($16, `load8_u`, [10745]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3297 +assert_return(() => invoke($16, `load8_u`, [10944]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3298 +assert_return(() => invoke($16, `load8_u`, [11143]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3299 +assert_return(() => invoke($16, `load8_u`, [11342]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3300 +assert_return(() => invoke($16, `load8_u`, [11541]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3301 +assert_return(() => invoke($16, `load8_u`, [11740]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3302 +assert_return(() => invoke($16, `load8_u`, [11939]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3303 +assert_return(() => invoke($16, `load8_u`, [12138]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3304 +assert_return(() => invoke($16, `load8_u`, [12337]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3305 +assert_return(() => invoke($16, `load8_u`, [12536]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3306 +assert_return(() => invoke($16, `load8_u`, [12735]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3307 +assert_return(() => invoke($16, `load8_u`, [12934]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3308 +assert_return(() => invoke($16, `load8_u`, [13133]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3309 +assert_return(() => invoke($16, `load8_u`, [13332]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3310 +assert_return(() => invoke($16, `load8_u`, [13531]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3311 +assert_return(() => invoke($16, `load8_u`, [13730]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3312 +assert_return(() => invoke($16, `load8_u`, [13929]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3313 +assert_return(() => invoke($16, `load8_u`, [14128]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3314 +assert_return(() => invoke($16, `load8_u`, [14327]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3315 +assert_return(() => invoke($16, `load8_u`, [14526]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3316 +assert_return(() => invoke($16, `load8_u`, [14725]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3317 +assert_return(() => invoke($16, `load8_u`, [14924]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3318 +assert_return(() => invoke($16, `load8_u`, [15123]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3319 +assert_return(() => invoke($16, `load8_u`, [15322]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3320 +assert_return(() => invoke($16, `load8_u`, [15521]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3321 +assert_return(() => invoke($16, `load8_u`, [15720]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3322 +assert_return(() => invoke($16, `load8_u`, [15919]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3323 +assert_return(() => invoke($16, `load8_u`, [16118]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3324 +assert_return(() => invoke($16, `load8_u`, [16317]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3325 +assert_return(() => invoke($16, `load8_u`, [16516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3326 +assert_return(() => invoke($16, `load8_u`, [16715]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3327 +assert_return(() => invoke($16, `load8_u`, [16914]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3328 +assert_return(() => invoke($16, `load8_u`, [17113]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3329 +assert_return(() => invoke($16, `load8_u`, [17312]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3330 +assert_return(() => invoke($16, `load8_u`, [17511]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3331 +assert_return(() => invoke($16, `load8_u`, [17710]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3332 +assert_return(() => invoke($16, `load8_u`, [17909]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3333 +assert_return(() => invoke($16, `load8_u`, [18108]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3334 +assert_return(() => invoke($16, `load8_u`, [18307]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3335 +assert_return(() => invoke($16, `load8_u`, [18506]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3336 +assert_return(() => invoke($16, `load8_u`, [18705]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3337 +assert_return(() => invoke($16, `load8_u`, [18904]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3338 +assert_return(() => invoke($16, `load8_u`, [19103]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3339 +assert_return(() => invoke($16, `load8_u`, [19302]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3340 +assert_return(() => invoke($16, `load8_u`, [19501]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3341 +assert_return(() => invoke($16, `load8_u`, [19700]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3342 +assert_return(() => invoke($16, `load8_u`, [19899]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3343 +assert_return(() => invoke($16, `load8_u`, [20098]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3344 +assert_return(() => invoke($16, `load8_u`, [20297]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3345 +assert_return(() => invoke($16, `load8_u`, [20496]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3346 +assert_return(() => invoke($16, `load8_u`, [20695]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3347 +assert_return(() => invoke($16, `load8_u`, [20894]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3348 +assert_return(() => invoke($16, `load8_u`, [21093]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3349 +assert_return(() => invoke($16, `load8_u`, [21292]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3350 +assert_return(() => invoke($16, `load8_u`, [21491]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3351 +assert_return(() => invoke($16, `load8_u`, [21690]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3352 +assert_return(() => invoke($16, `load8_u`, [21889]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3353 +assert_return(() => invoke($16, `load8_u`, [22088]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3354 +assert_return(() => invoke($16, `load8_u`, [22287]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3355 +assert_return(() => invoke($16, `load8_u`, [22486]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3356 +assert_return(() => invoke($16, `load8_u`, [22685]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3357 +assert_return(() => invoke($16, `load8_u`, [22884]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3358 +assert_return(() => invoke($16, `load8_u`, [23083]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3359 +assert_return(() => invoke($16, `load8_u`, [23282]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3360 +assert_return(() => invoke($16, `load8_u`, [23481]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3361 +assert_return(() => invoke($16, `load8_u`, [23680]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3362 +assert_return(() => invoke($16, `load8_u`, [23879]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3363 +assert_return(() => invoke($16, `load8_u`, [24078]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3364 +assert_return(() => invoke($16, `load8_u`, [24277]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3365 +assert_return(() => invoke($16, `load8_u`, [24476]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3366 +assert_return(() => invoke($16, `load8_u`, [24675]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3367 +assert_return(() => invoke($16, `load8_u`, [24874]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3368 +assert_return(() => invoke($16, `load8_u`, [25073]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3369 +assert_return(() => invoke($16, `load8_u`, [25272]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3370 +assert_return(() => invoke($16, `load8_u`, [25471]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3371 +assert_return(() => invoke($16, `load8_u`, [25670]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3372 +assert_return(() => invoke($16, `load8_u`, [25869]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3373 +assert_return(() => invoke($16, `load8_u`, [26068]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3374 +assert_return(() => invoke($16, `load8_u`, [26267]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3375 +assert_return(() => invoke($16, `load8_u`, [26466]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3376 +assert_return(() => invoke($16, `load8_u`, [26665]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3377 +assert_return(() => invoke($16, `load8_u`, [26864]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3378 +assert_return(() => invoke($16, `load8_u`, [27063]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3379 +assert_return(() => invoke($16, `load8_u`, [27262]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3380 +assert_return(() => invoke($16, `load8_u`, [27461]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3381 +assert_return(() => invoke($16, `load8_u`, [27660]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3382 +assert_return(() => invoke($16, `load8_u`, [27859]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3383 +assert_return(() => invoke($16, `load8_u`, [28058]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3384 +assert_return(() => invoke($16, `load8_u`, [28257]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3385 +assert_return(() => invoke($16, `load8_u`, [28456]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3386 +assert_return(() => invoke($16, `load8_u`, [28655]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3387 +assert_return(() => invoke($16, `load8_u`, [28854]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3388 +assert_return(() => invoke($16, `load8_u`, [29053]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3389 +assert_return(() => invoke($16, `load8_u`, [29252]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3390 +assert_return(() => invoke($16, `load8_u`, [29451]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3391 +assert_return(() => invoke($16, `load8_u`, [29650]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3392 +assert_return(() => invoke($16, `load8_u`, [29849]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3393 +assert_return(() => invoke($16, `load8_u`, [30048]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3394 +assert_return(() => invoke($16, `load8_u`, [30247]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3395 +assert_return(() => invoke($16, `load8_u`, [30446]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3396 +assert_return(() => invoke($16, `load8_u`, [30645]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3397 +assert_return(() => invoke($16, `load8_u`, [30844]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3398 +assert_return(() => invoke($16, `load8_u`, [31043]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3399 +assert_return(() => invoke($16, `load8_u`, [31242]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3400 +assert_return(() => invoke($16, `load8_u`, [31441]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3401 +assert_return(() => invoke($16, `load8_u`, [31640]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3402 +assert_return(() => invoke($16, `load8_u`, [31839]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3403 +assert_return(() => invoke($16, `load8_u`, [32038]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3404 +assert_return(() => invoke($16, `load8_u`, [32237]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3405 +assert_return(() => invoke($16, `load8_u`, [32436]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3406 +assert_return(() => invoke($16, `load8_u`, [32635]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3407 +assert_return(() => invoke($16, `load8_u`, [32834]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3408 +assert_return(() => invoke($16, `load8_u`, [33033]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3409 +assert_return(() => invoke($16, `load8_u`, [33232]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3410 +assert_return(() => invoke($16, `load8_u`, [33431]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3411 +assert_return(() => invoke($16, `load8_u`, [33630]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3412 +assert_return(() => invoke($16, `load8_u`, [33829]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3413 +assert_return(() => invoke($16, `load8_u`, [34028]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3414 +assert_return(() => invoke($16, `load8_u`, [34227]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3415 +assert_return(() => invoke($16, `load8_u`, [34426]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3416 +assert_return(() => invoke($16, `load8_u`, [34625]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3417 +assert_return(() => invoke($16, `load8_u`, [34824]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3418 +assert_return(() => invoke($16, `load8_u`, [35023]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3419 +assert_return(() => invoke($16, `load8_u`, [35222]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3420 +assert_return(() => invoke($16, `load8_u`, [35421]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3421 +assert_return(() => invoke($16, `load8_u`, [35620]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3422 +assert_return(() => invoke($16, `load8_u`, [35819]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3423 +assert_return(() => invoke($16, `load8_u`, [36018]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3424 +assert_return(() => invoke($16, `load8_u`, [36217]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3425 +assert_return(() => invoke($16, `load8_u`, [36416]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3426 +assert_return(() => invoke($16, `load8_u`, [36615]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3427 +assert_return(() => invoke($16, `load8_u`, [36814]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3428 +assert_return(() => invoke($16, `load8_u`, [37013]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3429 +assert_return(() => invoke($16, `load8_u`, [37212]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3430 +assert_return(() => invoke($16, `load8_u`, [37411]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3431 +assert_return(() => invoke($16, `load8_u`, [37610]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3432 +assert_return(() => invoke($16, `load8_u`, [37809]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3433 +assert_return(() => invoke($16, `load8_u`, [38008]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3434 +assert_return(() => invoke($16, `load8_u`, [38207]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3435 +assert_return(() => invoke($16, `load8_u`, [38406]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3436 +assert_return(() => invoke($16, `load8_u`, [38605]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3437 +assert_return(() => invoke($16, `load8_u`, [38804]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3438 +assert_return(() => invoke($16, `load8_u`, [39003]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3439 +assert_return(() => invoke($16, `load8_u`, [39202]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3440 +assert_return(() => invoke($16, `load8_u`, [39401]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3441 +assert_return(() => invoke($16, `load8_u`, [39600]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3442 +assert_return(() => invoke($16, `load8_u`, [39799]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3443 +assert_return(() => invoke($16, `load8_u`, [39998]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3444 +assert_return(() => invoke($16, `load8_u`, [40197]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3445 +assert_return(() => invoke($16, `load8_u`, [40396]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3446 +assert_return(() => invoke($16, `load8_u`, [40595]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3447 +assert_return(() => invoke($16, `load8_u`, [40794]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3448 +assert_return(() => invoke($16, `load8_u`, [40993]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3449 +assert_return(() => invoke($16, `load8_u`, [41192]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3450 +assert_return(() => invoke($16, `load8_u`, [41391]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3451 +assert_return(() => invoke($16, `load8_u`, [41590]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3452 +assert_return(() => invoke($16, `load8_u`, [41789]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3453 +assert_return(() => invoke($16, `load8_u`, [41988]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3454 +assert_return(() => invoke($16, `load8_u`, [42187]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3455 +assert_return(() => invoke($16, `load8_u`, [42386]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3456 +assert_return(() => invoke($16, `load8_u`, [42585]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3457 +assert_return(() => invoke($16, `load8_u`, [42784]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3458 +assert_return(() => invoke($16, `load8_u`, [42983]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3459 +assert_return(() => invoke($16, `load8_u`, [43182]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3460 +assert_return(() => invoke($16, `load8_u`, [43381]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3461 +assert_return(() => invoke($16, `load8_u`, [43580]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3462 +assert_return(() => invoke($16, `load8_u`, [43779]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3463 +assert_return(() => invoke($16, `load8_u`, [43978]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3464 +assert_return(() => invoke($16, `load8_u`, [44177]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3465 +assert_return(() => invoke($16, `load8_u`, [44376]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3466 +assert_return(() => invoke($16, `load8_u`, [44575]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3467 +assert_return(() => invoke($16, `load8_u`, [44774]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3468 +assert_return(() => invoke($16, `load8_u`, [44973]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3469 +assert_return(() => invoke($16, `load8_u`, [45172]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3470 +assert_return(() => invoke($16, `load8_u`, [45371]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3471 +assert_return(() => invoke($16, `load8_u`, [45570]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3472 +assert_return(() => invoke($16, `load8_u`, [45769]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3473 +assert_return(() => invoke($16, `load8_u`, [45968]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3474 +assert_return(() => invoke($16, `load8_u`, [46167]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3475 +assert_return(() => invoke($16, `load8_u`, [46366]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3476 +assert_return(() => invoke($16, `load8_u`, [46565]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3477 +assert_return(() => invoke($16, `load8_u`, [46764]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3478 +assert_return(() => invoke($16, `load8_u`, [46963]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3479 +assert_return(() => invoke($16, `load8_u`, [47162]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3480 +assert_return(() => invoke($16, `load8_u`, [47361]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3481 +assert_return(() => invoke($16, `load8_u`, [47560]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3482 +assert_return(() => invoke($16, `load8_u`, [47759]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3483 +assert_return(() => invoke($16, `load8_u`, [47958]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3484 +assert_return(() => invoke($16, `load8_u`, [48157]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3485 +assert_return(() => invoke($16, `load8_u`, [48356]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3486 +assert_return(() => invoke($16, `load8_u`, [48555]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3487 +assert_return(() => invoke($16, `load8_u`, [48754]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3488 +assert_return(() => invoke($16, `load8_u`, [48953]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3489 +assert_return(() => invoke($16, `load8_u`, [49152]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3490 +assert_return(() => invoke($16, `load8_u`, [49351]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3491 +assert_return(() => invoke($16, `load8_u`, [49550]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3492 +assert_return(() => invoke($16, `load8_u`, [49749]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3493 +assert_return(() => invoke($16, `load8_u`, [49948]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3494 +assert_return(() => invoke($16, `load8_u`, [50147]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3495 +assert_return(() => invoke($16, `load8_u`, [50346]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3496 +assert_return(() => invoke($16, `load8_u`, [50545]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3497 +assert_return(() => invoke($16, `load8_u`, [50744]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3498 +assert_return(() => invoke($16, `load8_u`, [50943]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3499 +assert_return(() => invoke($16, `load8_u`, [51142]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3500 +assert_return(() => invoke($16, `load8_u`, [51341]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3501 +assert_return(() => invoke($16, `load8_u`, [51540]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3502 +assert_return(() => invoke($16, `load8_u`, [51739]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3503 +assert_return(() => invoke($16, `load8_u`, [51938]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3504 +assert_return(() => invoke($16, `load8_u`, [52137]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3505 +assert_return(() => invoke($16, `load8_u`, [52336]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3506 +assert_return(() => invoke($16, `load8_u`, [52535]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3507 +assert_return(() => invoke($16, `load8_u`, [52734]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3508 +assert_return(() => invoke($16, `load8_u`, [52933]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3509 +assert_return(() => invoke($16, `load8_u`, [53132]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3510 +assert_return(() => invoke($16, `load8_u`, [53331]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3511 +assert_return(() => invoke($16, `load8_u`, [53530]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3512 +assert_return(() => invoke($16, `load8_u`, [53729]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3513 +assert_return(() => invoke($16, `load8_u`, [53928]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3514 +assert_return(() => invoke($16, `load8_u`, [54127]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3515 +assert_return(() => invoke($16, `load8_u`, [54326]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3516 +assert_return(() => invoke($16, `load8_u`, [54525]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3517 +assert_return(() => invoke($16, `load8_u`, [54724]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3518 +assert_return(() => invoke($16, `load8_u`, [54923]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3519 +assert_return(() => invoke($16, `load8_u`, [55122]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3520 +assert_return(() => invoke($16, `load8_u`, [55321]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3521 +assert_return(() => invoke($16, `load8_u`, [55520]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3522 +assert_return(() => invoke($16, `load8_u`, [55719]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3523 +assert_return(() => invoke($16, `load8_u`, [55918]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3524 +assert_return(() => invoke($16, `load8_u`, [56117]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3525 +assert_return(() => invoke($16, `load8_u`, [56316]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3526 +assert_return(() => invoke($16, `load8_u`, [56515]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3527 +assert_return(() => invoke($16, `load8_u`, [56714]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3528 +assert_return(() => invoke($16, `load8_u`, [56913]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3529 +assert_return(() => invoke($16, `load8_u`, [57112]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3530 +assert_return(() => invoke($16, `load8_u`, [57311]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3531 +assert_return(() => invoke($16, `load8_u`, [57510]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3532 +assert_return(() => invoke($16, `load8_u`, [57709]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3533 +assert_return(() => invoke($16, `load8_u`, [57908]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3534 +assert_return(() => invoke($16, `load8_u`, [58107]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3535 +assert_return(() => invoke($16, `load8_u`, [58306]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3536 +assert_return(() => invoke($16, `load8_u`, [58505]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3537 +assert_return(() => invoke($16, `load8_u`, [58704]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3538 +assert_return(() => invoke($16, `load8_u`, [58903]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3539 +assert_return(() => invoke($16, `load8_u`, [59102]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3540 +assert_return(() => invoke($16, `load8_u`, [59301]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3541 +assert_return(() => invoke($16, `load8_u`, [59500]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3542 +assert_return(() => invoke($16, `load8_u`, [59699]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3543 +assert_return(() => invoke($16, `load8_u`, [59898]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3544 +assert_return(() => invoke($16, `load8_u`, [60097]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3545 +assert_return(() => invoke($16, `load8_u`, [60296]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3546 +assert_return(() => invoke($16, `load8_u`, [60495]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3547 +assert_return(() => invoke($16, `load8_u`, [60694]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3548 +assert_return(() => invoke($16, `load8_u`, [60893]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3549 +assert_return(() => invoke($16, `load8_u`, [61092]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3550 +assert_return(() => invoke($16, `load8_u`, [61291]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3551 +assert_return(() => invoke($16, `load8_u`, [61490]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3552 +assert_return(() => invoke($16, `load8_u`, [61689]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3553 +assert_return(() => invoke($16, `load8_u`, [61888]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3554 +assert_return(() => invoke($16, `load8_u`, [62087]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3555 +assert_return(() => invoke($16, `load8_u`, [62286]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3556 +assert_return(() => invoke($16, `load8_u`, [62485]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3557 +assert_return(() => invoke($16, `load8_u`, [62684]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3558 +assert_return(() => invoke($16, `load8_u`, [62883]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3559 +assert_return(() => invoke($16, `load8_u`, [63082]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3560 +assert_return(() => invoke($16, `load8_u`, [63281]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3561 +assert_return(() => invoke($16, `load8_u`, [63480]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3562 +assert_return(() => invoke($16, `load8_u`, [63679]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3563 +assert_return(() => invoke($16, `load8_u`, [63878]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3564 +assert_return(() => invoke($16, `load8_u`, [64077]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3565 +assert_return(() => invoke($16, `load8_u`, [64276]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3566 +assert_return(() => invoke($16, `load8_u`, [64475]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3567 +assert_return(() => invoke($16, `load8_u`, [64674]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3568 +assert_return(() => invoke($16, `load8_u`, [64873]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3569 +assert_return(() => invoke($16, `load8_u`, [65072]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3570 +assert_return(() => invoke($16, `load8_u`, [65271]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3571 +assert_return(() => invoke($16, `load8_u`, [65470]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3572 +assert_return(() => invoke($16, `load8_u`, [65516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3573 +assert_return(() => invoke($16, `load8_u`, [65517]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:3574 +assert_return(() => invoke($16, `load8_u`, [65518]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:3575 +assert_return(() => invoke($16, `load8_u`, [65519]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:3576 +assert_return(() => invoke($16, `load8_u`, [65520]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:3577 +assert_return(() => invoke($16, `load8_u`, [65521]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:3578 +assert_return(() => invoke($16, `load8_u`, [65522]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:3579 +assert_return(() => invoke($16, `load8_u`, [65523]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:3580 +assert_return(() => invoke($16, `load8_u`, [65524]), [value("i32", 8)]); + +// ./test/core/memory_copy.wast:3581 +assert_return(() => invoke($16, `load8_u`, [65525]), [value("i32", 9)]); + +// ./test/core/memory_copy.wast:3582 +assert_return(() => invoke($16, `load8_u`, [65526]), [value("i32", 10)]); + +// ./test/core/memory_copy.wast:3583 +assert_return(() => invoke($16, `load8_u`, [65527]), [value("i32", 11)]); + +// ./test/core/memory_copy.wast:3584 +assert_return(() => invoke($16, `load8_u`, [65528]), [value("i32", 12)]); + +// ./test/core/memory_copy.wast:3585 +assert_return(() => invoke($16, `load8_u`, [65529]), [value("i32", 13)]); + +// ./test/core/memory_copy.wast:3586 +assert_return(() => invoke($16, `load8_u`, [65530]), [value("i32", 14)]); + +// ./test/core/memory_copy.wast:3587 +assert_return(() => invoke($16, `load8_u`, [65531]), [value("i32", 15)]); + +// ./test/core/memory_copy.wast:3588 +assert_return(() => invoke($16, `load8_u`, [65532]), [value("i32", 16)]); + +// ./test/core/memory_copy.wast:3589 +assert_return(() => invoke($16, `load8_u`, [65533]), [value("i32", 17)]); + +// ./test/core/memory_copy.wast:3590 +assert_return(() => invoke($16, `load8_u`, [65534]), [value("i32", 18)]); + +// ./test/core/memory_copy.wast:3591 +assert_return(() => invoke($16, `load8_u`, [65535]), [value("i32", 19)]); + +// ./test/core/memory_copy.wast:3593 +let $17 = instantiate(`(module + (memory (export "mem") 1 ) + (data (i32.const 65516) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13") + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (memory.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:3601 +assert_trap(() => invoke($17, `run`, [0, 65516, -4096]), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:3604 +assert_return(() => invoke($17, `load8_u`, [198]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3605 +assert_return(() => invoke($17, `load8_u`, [397]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3606 +assert_return(() => invoke($17, `load8_u`, [596]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3607 +assert_return(() => invoke($17, `load8_u`, [795]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3608 +assert_return(() => invoke($17, `load8_u`, [994]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3609 +assert_return(() => invoke($17, `load8_u`, [1193]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3610 +assert_return(() => invoke($17, `load8_u`, [1392]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3611 +assert_return(() => invoke($17, `load8_u`, [1591]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3612 +assert_return(() => invoke($17, `load8_u`, [1790]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3613 +assert_return(() => invoke($17, `load8_u`, [1989]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3614 +assert_return(() => invoke($17, `load8_u`, [2188]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3615 +assert_return(() => invoke($17, `load8_u`, [2387]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3616 +assert_return(() => invoke($17, `load8_u`, [2586]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3617 +assert_return(() => invoke($17, `load8_u`, [2785]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3618 +assert_return(() => invoke($17, `load8_u`, [2984]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3619 +assert_return(() => invoke($17, `load8_u`, [3183]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3620 +assert_return(() => invoke($17, `load8_u`, [3382]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3621 +assert_return(() => invoke($17, `load8_u`, [3581]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3622 +assert_return(() => invoke($17, `load8_u`, [3780]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3623 +assert_return(() => invoke($17, `load8_u`, [3979]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3624 +assert_return(() => invoke($17, `load8_u`, [4178]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3625 +assert_return(() => invoke($17, `load8_u`, [4377]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3626 +assert_return(() => invoke($17, `load8_u`, [4576]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3627 +assert_return(() => invoke($17, `load8_u`, [4775]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3628 +assert_return(() => invoke($17, `load8_u`, [4974]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3629 +assert_return(() => invoke($17, `load8_u`, [5173]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3630 +assert_return(() => invoke($17, `load8_u`, [5372]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3631 +assert_return(() => invoke($17, `load8_u`, [5571]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3632 +assert_return(() => invoke($17, `load8_u`, [5770]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3633 +assert_return(() => invoke($17, `load8_u`, [5969]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3634 +assert_return(() => invoke($17, `load8_u`, [6168]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3635 +assert_return(() => invoke($17, `load8_u`, [6367]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3636 +assert_return(() => invoke($17, `load8_u`, [6566]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3637 +assert_return(() => invoke($17, `load8_u`, [6765]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3638 +assert_return(() => invoke($17, `load8_u`, [6964]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3639 +assert_return(() => invoke($17, `load8_u`, [7163]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3640 +assert_return(() => invoke($17, `load8_u`, [7362]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3641 +assert_return(() => invoke($17, `load8_u`, [7561]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3642 +assert_return(() => invoke($17, `load8_u`, [7760]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3643 +assert_return(() => invoke($17, `load8_u`, [7959]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3644 +assert_return(() => invoke($17, `load8_u`, [8158]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3645 +assert_return(() => invoke($17, `load8_u`, [8357]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3646 +assert_return(() => invoke($17, `load8_u`, [8556]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3647 +assert_return(() => invoke($17, `load8_u`, [8755]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3648 +assert_return(() => invoke($17, `load8_u`, [8954]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3649 +assert_return(() => invoke($17, `load8_u`, [9153]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3650 +assert_return(() => invoke($17, `load8_u`, [9352]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3651 +assert_return(() => invoke($17, `load8_u`, [9551]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3652 +assert_return(() => invoke($17, `load8_u`, [9750]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3653 +assert_return(() => invoke($17, `load8_u`, [9949]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3654 +assert_return(() => invoke($17, `load8_u`, [10148]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3655 +assert_return(() => invoke($17, `load8_u`, [10347]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3656 +assert_return(() => invoke($17, `load8_u`, [10546]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3657 +assert_return(() => invoke($17, `load8_u`, [10745]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3658 +assert_return(() => invoke($17, `load8_u`, [10944]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3659 +assert_return(() => invoke($17, `load8_u`, [11143]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3660 +assert_return(() => invoke($17, `load8_u`, [11342]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3661 +assert_return(() => invoke($17, `load8_u`, [11541]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3662 +assert_return(() => invoke($17, `load8_u`, [11740]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3663 +assert_return(() => invoke($17, `load8_u`, [11939]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3664 +assert_return(() => invoke($17, `load8_u`, [12138]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3665 +assert_return(() => invoke($17, `load8_u`, [12337]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3666 +assert_return(() => invoke($17, `load8_u`, [12536]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3667 +assert_return(() => invoke($17, `load8_u`, [12735]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3668 +assert_return(() => invoke($17, `load8_u`, [12934]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3669 +assert_return(() => invoke($17, `load8_u`, [13133]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3670 +assert_return(() => invoke($17, `load8_u`, [13332]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3671 +assert_return(() => invoke($17, `load8_u`, [13531]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3672 +assert_return(() => invoke($17, `load8_u`, [13730]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3673 +assert_return(() => invoke($17, `load8_u`, [13929]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3674 +assert_return(() => invoke($17, `load8_u`, [14128]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3675 +assert_return(() => invoke($17, `load8_u`, [14327]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3676 +assert_return(() => invoke($17, `load8_u`, [14526]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3677 +assert_return(() => invoke($17, `load8_u`, [14725]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3678 +assert_return(() => invoke($17, `load8_u`, [14924]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3679 +assert_return(() => invoke($17, `load8_u`, [15123]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3680 +assert_return(() => invoke($17, `load8_u`, [15322]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3681 +assert_return(() => invoke($17, `load8_u`, [15521]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3682 +assert_return(() => invoke($17, `load8_u`, [15720]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3683 +assert_return(() => invoke($17, `load8_u`, [15919]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3684 +assert_return(() => invoke($17, `load8_u`, [16118]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3685 +assert_return(() => invoke($17, `load8_u`, [16317]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3686 +assert_return(() => invoke($17, `load8_u`, [16516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3687 +assert_return(() => invoke($17, `load8_u`, [16715]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3688 +assert_return(() => invoke($17, `load8_u`, [16914]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3689 +assert_return(() => invoke($17, `load8_u`, [17113]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3690 +assert_return(() => invoke($17, `load8_u`, [17312]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3691 +assert_return(() => invoke($17, `load8_u`, [17511]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3692 +assert_return(() => invoke($17, `load8_u`, [17710]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3693 +assert_return(() => invoke($17, `load8_u`, [17909]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3694 +assert_return(() => invoke($17, `load8_u`, [18108]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3695 +assert_return(() => invoke($17, `load8_u`, [18307]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3696 +assert_return(() => invoke($17, `load8_u`, [18506]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3697 +assert_return(() => invoke($17, `load8_u`, [18705]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3698 +assert_return(() => invoke($17, `load8_u`, [18904]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3699 +assert_return(() => invoke($17, `load8_u`, [19103]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3700 +assert_return(() => invoke($17, `load8_u`, [19302]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3701 +assert_return(() => invoke($17, `load8_u`, [19501]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3702 +assert_return(() => invoke($17, `load8_u`, [19700]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3703 +assert_return(() => invoke($17, `load8_u`, [19899]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3704 +assert_return(() => invoke($17, `load8_u`, [20098]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3705 +assert_return(() => invoke($17, `load8_u`, [20297]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3706 +assert_return(() => invoke($17, `load8_u`, [20496]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3707 +assert_return(() => invoke($17, `load8_u`, [20695]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3708 +assert_return(() => invoke($17, `load8_u`, [20894]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3709 +assert_return(() => invoke($17, `load8_u`, [21093]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3710 +assert_return(() => invoke($17, `load8_u`, [21292]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3711 +assert_return(() => invoke($17, `load8_u`, [21491]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3712 +assert_return(() => invoke($17, `load8_u`, [21690]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3713 +assert_return(() => invoke($17, `load8_u`, [21889]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3714 +assert_return(() => invoke($17, `load8_u`, [22088]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3715 +assert_return(() => invoke($17, `load8_u`, [22287]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3716 +assert_return(() => invoke($17, `load8_u`, [22486]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3717 +assert_return(() => invoke($17, `load8_u`, [22685]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3718 +assert_return(() => invoke($17, `load8_u`, [22884]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3719 +assert_return(() => invoke($17, `load8_u`, [23083]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3720 +assert_return(() => invoke($17, `load8_u`, [23282]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3721 +assert_return(() => invoke($17, `load8_u`, [23481]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3722 +assert_return(() => invoke($17, `load8_u`, [23680]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3723 +assert_return(() => invoke($17, `load8_u`, [23879]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3724 +assert_return(() => invoke($17, `load8_u`, [24078]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3725 +assert_return(() => invoke($17, `load8_u`, [24277]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3726 +assert_return(() => invoke($17, `load8_u`, [24476]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3727 +assert_return(() => invoke($17, `load8_u`, [24675]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3728 +assert_return(() => invoke($17, `load8_u`, [24874]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3729 +assert_return(() => invoke($17, `load8_u`, [25073]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3730 +assert_return(() => invoke($17, `load8_u`, [25272]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3731 +assert_return(() => invoke($17, `load8_u`, [25471]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3732 +assert_return(() => invoke($17, `load8_u`, [25670]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3733 +assert_return(() => invoke($17, `load8_u`, [25869]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3734 +assert_return(() => invoke($17, `load8_u`, [26068]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3735 +assert_return(() => invoke($17, `load8_u`, [26267]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3736 +assert_return(() => invoke($17, `load8_u`, [26466]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3737 +assert_return(() => invoke($17, `load8_u`, [26665]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3738 +assert_return(() => invoke($17, `load8_u`, [26864]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3739 +assert_return(() => invoke($17, `load8_u`, [27063]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3740 +assert_return(() => invoke($17, `load8_u`, [27262]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3741 +assert_return(() => invoke($17, `load8_u`, [27461]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3742 +assert_return(() => invoke($17, `load8_u`, [27660]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3743 +assert_return(() => invoke($17, `load8_u`, [27859]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3744 +assert_return(() => invoke($17, `load8_u`, [28058]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3745 +assert_return(() => invoke($17, `load8_u`, [28257]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3746 +assert_return(() => invoke($17, `load8_u`, [28456]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3747 +assert_return(() => invoke($17, `load8_u`, [28655]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3748 +assert_return(() => invoke($17, `load8_u`, [28854]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3749 +assert_return(() => invoke($17, `load8_u`, [29053]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3750 +assert_return(() => invoke($17, `load8_u`, [29252]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3751 +assert_return(() => invoke($17, `load8_u`, [29451]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3752 +assert_return(() => invoke($17, `load8_u`, [29650]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3753 +assert_return(() => invoke($17, `load8_u`, [29849]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3754 +assert_return(() => invoke($17, `load8_u`, [30048]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3755 +assert_return(() => invoke($17, `load8_u`, [30247]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3756 +assert_return(() => invoke($17, `load8_u`, [30446]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3757 +assert_return(() => invoke($17, `load8_u`, [30645]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3758 +assert_return(() => invoke($17, `load8_u`, [30844]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3759 +assert_return(() => invoke($17, `load8_u`, [31043]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3760 +assert_return(() => invoke($17, `load8_u`, [31242]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3761 +assert_return(() => invoke($17, `load8_u`, [31441]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3762 +assert_return(() => invoke($17, `load8_u`, [31640]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3763 +assert_return(() => invoke($17, `load8_u`, [31839]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3764 +assert_return(() => invoke($17, `load8_u`, [32038]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3765 +assert_return(() => invoke($17, `load8_u`, [32237]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3766 +assert_return(() => invoke($17, `load8_u`, [32436]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3767 +assert_return(() => invoke($17, `load8_u`, [32635]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3768 +assert_return(() => invoke($17, `load8_u`, [32834]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3769 +assert_return(() => invoke($17, `load8_u`, [33033]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3770 +assert_return(() => invoke($17, `load8_u`, [33232]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3771 +assert_return(() => invoke($17, `load8_u`, [33431]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3772 +assert_return(() => invoke($17, `load8_u`, [33630]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3773 +assert_return(() => invoke($17, `load8_u`, [33829]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3774 +assert_return(() => invoke($17, `load8_u`, [34028]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3775 +assert_return(() => invoke($17, `load8_u`, [34227]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3776 +assert_return(() => invoke($17, `load8_u`, [34426]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3777 +assert_return(() => invoke($17, `load8_u`, [34625]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3778 +assert_return(() => invoke($17, `load8_u`, [34824]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3779 +assert_return(() => invoke($17, `load8_u`, [35023]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3780 +assert_return(() => invoke($17, `load8_u`, [35222]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3781 +assert_return(() => invoke($17, `load8_u`, [35421]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3782 +assert_return(() => invoke($17, `load8_u`, [35620]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3783 +assert_return(() => invoke($17, `load8_u`, [35819]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3784 +assert_return(() => invoke($17, `load8_u`, [36018]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3785 +assert_return(() => invoke($17, `load8_u`, [36217]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3786 +assert_return(() => invoke($17, `load8_u`, [36416]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3787 +assert_return(() => invoke($17, `load8_u`, [36615]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3788 +assert_return(() => invoke($17, `load8_u`, [36814]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3789 +assert_return(() => invoke($17, `load8_u`, [37013]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3790 +assert_return(() => invoke($17, `load8_u`, [37212]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3791 +assert_return(() => invoke($17, `load8_u`, [37411]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3792 +assert_return(() => invoke($17, `load8_u`, [37610]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3793 +assert_return(() => invoke($17, `load8_u`, [37809]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3794 +assert_return(() => invoke($17, `load8_u`, [38008]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3795 +assert_return(() => invoke($17, `load8_u`, [38207]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3796 +assert_return(() => invoke($17, `load8_u`, [38406]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3797 +assert_return(() => invoke($17, `load8_u`, [38605]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3798 +assert_return(() => invoke($17, `load8_u`, [38804]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3799 +assert_return(() => invoke($17, `load8_u`, [39003]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3800 +assert_return(() => invoke($17, `load8_u`, [39202]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3801 +assert_return(() => invoke($17, `load8_u`, [39401]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3802 +assert_return(() => invoke($17, `load8_u`, [39600]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3803 +assert_return(() => invoke($17, `load8_u`, [39799]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3804 +assert_return(() => invoke($17, `load8_u`, [39998]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3805 +assert_return(() => invoke($17, `load8_u`, [40197]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3806 +assert_return(() => invoke($17, `load8_u`, [40396]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3807 +assert_return(() => invoke($17, `load8_u`, [40595]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3808 +assert_return(() => invoke($17, `load8_u`, [40794]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3809 +assert_return(() => invoke($17, `load8_u`, [40993]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3810 +assert_return(() => invoke($17, `load8_u`, [41192]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3811 +assert_return(() => invoke($17, `load8_u`, [41391]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3812 +assert_return(() => invoke($17, `load8_u`, [41590]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3813 +assert_return(() => invoke($17, `load8_u`, [41789]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3814 +assert_return(() => invoke($17, `load8_u`, [41988]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3815 +assert_return(() => invoke($17, `load8_u`, [42187]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3816 +assert_return(() => invoke($17, `load8_u`, [42386]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3817 +assert_return(() => invoke($17, `load8_u`, [42585]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3818 +assert_return(() => invoke($17, `load8_u`, [42784]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3819 +assert_return(() => invoke($17, `load8_u`, [42983]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3820 +assert_return(() => invoke($17, `load8_u`, [43182]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3821 +assert_return(() => invoke($17, `load8_u`, [43381]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3822 +assert_return(() => invoke($17, `load8_u`, [43580]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3823 +assert_return(() => invoke($17, `load8_u`, [43779]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3824 +assert_return(() => invoke($17, `load8_u`, [43978]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3825 +assert_return(() => invoke($17, `load8_u`, [44177]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3826 +assert_return(() => invoke($17, `load8_u`, [44376]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3827 +assert_return(() => invoke($17, `load8_u`, [44575]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3828 +assert_return(() => invoke($17, `load8_u`, [44774]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3829 +assert_return(() => invoke($17, `load8_u`, [44973]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3830 +assert_return(() => invoke($17, `load8_u`, [45172]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3831 +assert_return(() => invoke($17, `load8_u`, [45371]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3832 +assert_return(() => invoke($17, `load8_u`, [45570]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3833 +assert_return(() => invoke($17, `load8_u`, [45769]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3834 +assert_return(() => invoke($17, `load8_u`, [45968]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3835 +assert_return(() => invoke($17, `load8_u`, [46167]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3836 +assert_return(() => invoke($17, `load8_u`, [46366]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3837 +assert_return(() => invoke($17, `load8_u`, [46565]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3838 +assert_return(() => invoke($17, `load8_u`, [46764]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3839 +assert_return(() => invoke($17, `load8_u`, [46963]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3840 +assert_return(() => invoke($17, `load8_u`, [47162]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3841 +assert_return(() => invoke($17, `load8_u`, [47361]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3842 +assert_return(() => invoke($17, `load8_u`, [47560]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3843 +assert_return(() => invoke($17, `load8_u`, [47759]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3844 +assert_return(() => invoke($17, `load8_u`, [47958]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3845 +assert_return(() => invoke($17, `load8_u`, [48157]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3846 +assert_return(() => invoke($17, `load8_u`, [48356]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3847 +assert_return(() => invoke($17, `load8_u`, [48555]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3848 +assert_return(() => invoke($17, `load8_u`, [48754]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3849 +assert_return(() => invoke($17, `load8_u`, [48953]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3850 +assert_return(() => invoke($17, `load8_u`, [49152]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3851 +assert_return(() => invoke($17, `load8_u`, [49351]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3852 +assert_return(() => invoke($17, `load8_u`, [49550]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3853 +assert_return(() => invoke($17, `load8_u`, [49749]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3854 +assert_return(() => invoke($17, `load8_u`, [49948]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3855 +assert_return(() => invoke($17, `load8_u`, [50147]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3856 +assert_return(() => invoke($17, `load8_u`, [50346]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3857 +assert_return(() => invoke($17, `load8_u`, [50545]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3858 +assert_return(() => invoke($17, `load8_u`, [50744]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3859 +assert_return(() => invoke($17, `load8_u`, [50943]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3860 +assert_return(() => invoke($17, `load8_u`, [51142]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3861 +assert_return(() => invoke($17, `load8_u`, [51341]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3862 +assert_return(() => invoke($17, `load8_u`, [51540]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3863 +assert_return(() => invoke($17, `load8_u`, [51739]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3864 +assert_return(() => invoke($17, `load8_u`, [51938]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3865 +assert_return(() => invoke($17, `load8_u`, [52137]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3866 +assert_return(() => invoke($17, `load8_u`, [52336]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3867 +assert_return(() => invoke($17, `load8_u`, [52535]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3868 +assert_return(() => invoke($17, `load8_u`, [52734]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3869 +assert_return(() => invoke($17, `load8_u`, [52933]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3870 +assert_return(() => invoke($17, `load8_u`, [53132]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3871 +assert_return(() => invoke($17, `load8_u`, [53331]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3872 +assert_return(() => invoke($17, `load8_u`, [53530]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3873 +assert_return(() => invoke($17, `load8_u`, [53729]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3874 +assert_return(() => invoke($17, `load8_u`, [53928]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3875 +assert_return(() => invoke($17, `load8_u`, [54127]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3876 +assert_return(() => invoke($17, `load8_u`, [54326]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3877 +assert_return(() => invoke($17, `load8_u`, [54525]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3878 +assert_return(() => invoke($17, `load8_u`, [54724]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3879 +assert_return(() => invoke($17, `load8_u`, [54923]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3880 +assert_return(() => invoke($17, `load8_u`, [55122]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3881 +assert_return(() => invoke($17, `load8_u`, [55321]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3882 +assert_return(() => invoke($17, `load8_u`, [55520]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3883 +assert_return(() => invoke($17, `load8_u`, [55719]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3884 +assert_return(() => invoke($17, `load8_u`, [55918]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3885 +assert_return(() => invoke($17, `load8_u`, [56117]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3886 +assert_return(() => invoke($17, `load8_u`, [56316]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3887 +assert_return(() => invoke($17, `load8_u`, [56515]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3888 +assert_return(() => invoke($17, `load8_u`, [56714]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3889 +assert_return(() => invoke($17, `load8_u`, [56913]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3890 +assert_return(() => invoke($17, `load8_u`, [57112]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3891 +assert_return(() => invoke($17, `load8_u`, [57311]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3892 +assert_return(() => invoke($17, `load8_u`, [57510]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3893 +assert_return(() => invoke($17, `load8_u`, [57709]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3894 +assert_return(() => invoke($17, `load8_u`, [57908]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3895 +assert_return(() => invoke($17, `load8_u`, [58107]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3896 +assert_return(() => invoke($17, `load8_u`, [58306]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3897 +assert_return(() => invoke($17, `load8_u`, [58505]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3898 +assert_return(() => invoke($17, `load8_u`, [58704]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3899 +assert_return(() => invoke($17, `load8_u`, [58903]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3900 +assert_return(() => invoke($17, `load8_u`, [59102]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3901 +assert_return(() => invoke($17, `load8_u`, [59301]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3902 +assert_return(() => invoke($17, `load8_u`, [59500]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3903 +assert_return(() => invoke($17, `load8_u`, [59699]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3904 +assert_return(() => invoke($17, `load8_u`, [59898]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3905 +assert_return(() => invoke($17, `load8_u`, [60097]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3906 +assert_return(() => invoke($17, `load8_u`, [60296]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3907 +assert_return(() => invoke($17, `load8_u`, [60495]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3908 +assert_return(() => invoke($17, `load8_u`, [60694]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3909 +assert_return(() => invoke($17, `load8_u`, [60893]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3910 +assert_return(() => invoke($17, `load8_u`, [61092]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3911 +assert_return(() => invoke($17, `load8_u`, [61291]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3912 +assert_return(() => invoke($17, `load8_u`, [61490]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3913 +assert_return(() => invoke($17, `load8_u`, [61689]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3914 +assert_return(() => invoke($17, `load8_u`, [61888]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3915 +assert_return(() => invoke($17, `load8_u`, [62087]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3916 +assert_return(() => invoke($17, `load8_u`, [62286]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3917 +assert_return(() => invoke($17, `load8_u`, [62485]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3918 +assert_return(() => invoke($17, `load8_u`, [62684]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3919 +assert_return(() => invoke($17, `load8_u`, [62883]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3920 +assert_return(() => invoke($17, `load8_u`, [63082]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3921 +assert_return(() => invoke($17, `load8_u`, [63281]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3922 +assert_return(() => invoke($17, `load8_u`, [63480]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3923 +assert_return(() => invoke($17, `load8_u`, [63679]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3924 +assert_return(() => invoke($17, `load8_u`, [63878]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3925 +assert_return(() => invoke($17, `load8_u`, [64077]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3926 +assert_return(() => invoke($17, `load8_u`, [64276]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3927 +assert_return(() => invoke($17, `load8_u`, [64475]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3928 +assert_return(() => invoke($17, `load8_u`, [64674]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3929 +assert_return(() => invoke($17, `load8_u`, [64873]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3930 +assert_return(() => invoke($17, `load8_u`, [65072]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3931 +assert_return(() => invoke($17, `load8_u`, [65271]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3932 +assert_return(() => invoke($17, `load8_u`, [65470]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3933 +assert_return(() => invoke($17, `load8_u`, [65516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3934 +assert_return(() => invoke($17, `load8_u`, [65517]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:3935 +assert_return(() => invoke($17, `load8_u`, [65518]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:3936 +assert_return(() => invoke($17, `load8_u`, [65519]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:3937 +assert_return(() => invoke($17, `load8_u`, [65520]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:3938 +assert_return(() => invoke($17, `load8_u`, [65521]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:3939 +assert_return(() => invoke($17, `load8_u`, [65522]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:3940 +assert_return(() => invoke($17, `load8_u`, [65523]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:3941 +assert_return(() => invoke($17, `load8_u`, [65524]), [value("i32", 8)]); + +// ./test/core/memory_copy.wast:3942 +assert_return(() => invoke($17, `load8_u`, [65525]), [value("i32", 9)]); + +// ./test/core/memory_copy.wast:3943 +assert_return(() => invoke($17, `load8_u`, [65526]), [value("i32", 10)]); + +// ./test/core/memory_copy.wast:3944 +assert_return(() => invoke($17, `load8_u`, [65527]), [value("i32", 11)]); + +// ./test/core/memory_copy.wast:3945 +assert_return(() => invoke($17, `load8_u`, [65528]), [value("i32", 12)]); + +// ./test/core/memory_copy.wast:3946 +assert_return(() => invoke($17, `load8_u`, [65529]), [value("i32", 13)]); + +// ./test/core/memory_copy.wast:3947 +assert_return(() => invoke($17, `load8_u`, [65530]), [value("i32", 14)]); + +// ./test/core/memory_copy.wast:3948 +assert_return(() => invoke($17, `load8_u`, [65531]), [value("i32", 15)]); + +// ./test/core/memory_copy.wast:3949 +assert_return(() => invoke($17, `load8_u`, [65532]), [value("i32", 16)]); + +// ./test/core/memory_copy.wast:3950 +assert_return(() => invoke($17, `load8_u`, [65533]), [value("i32", 17)]); + +// ./test/core/memory_copy.wast:3951 +assert_return(() => invoke($17, `load8_u`, [65534]), [value("i32", 18)]); + +// ./test/core/memory_copy.wast:3952 +assert_return(() => invoke($17, `load8_u`, [65535]), [value("i32", 19)]); + +// ./test/core/memory_copy.wast:3954 +let $18 = instantiate(`(module + (memory (export "mem") 1 1 ) + (data (i32.const 61440) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13") + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (memory.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_copy.wast:3962 +assert_trap(() => invoke($18, `run`, [65516, 61440, -256]), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:3965 +assert_return(() => invoke($18, `load8_u`, [198]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3966 +assert_return(() => invoke($18, `load8_u`, [397]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3967 +assert_return(() => invoke($18, `load8_u`, [596]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3968 +assert_return(() => invoke($18, `load8_u`, [795]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3969 +assert_return(() => invoke($18, `load8_u`, [994]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3970 +assert_return(() => invoke($18, `load8_u`, [1193]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3971 +assert_return(() => invoke($18, `load8_u`, [1392]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3972 +assert_return(() => invoke($18, `load8_u`, [1591]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3973 +assert_return(() => invoke($18, `load8_u`, [1790]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3974 +assert_return(() => invoke($18, `load8_u`, [1989]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3975 +assert_return(() => invoke($18, `load8_u`, [2188]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3976 +assert_return(() => invoke($18, `load8_u`, [2387]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3977 +assert_return(() => invoke($18, `load8_u`, [2586]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3978 +assert_return(() => invoke($18, `load8_u`, [2785]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3979 +assert_return(() => invoke($18, `load8_u`, [2984]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3980 +assert_return(() => invoke($18, `load8_u`, [3183]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3981 +assert_return(() => invoke($18, `load8_u`, [3382]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3982 +assert_return(() => invoke($18, `load8_u`, [3581]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3983 +assert_return(() => invoke($18, `load8_u`, [3780]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3984 +assert_return(() => invoke($18, `load8_u`, [3979]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3985 +assert_return(() => invoke($18, `load8_u`, [4178]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3986 +assert_return(() => invoke($18, `load8_u`, [4377]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3987 +assert_return(() => invoke($18, `load8_u`, [4576]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3988 +assert_return(() => invoke($18, `load8_u`, [4775]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3989 +assert_return(() => invoke($18, `load8_u`, [4974]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3990 +assert_return(() => invoke($18, `load8_u`, [5173]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3991 +assert_return(() => invoke($18, `load8_u`, [5372]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3992 +assert_return(() => invoke($18, `load8_u`, [5571]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3993 +assert_return(() => invoke($18, `load8_u`, [5770]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3994 +assert_return(() => invoke($18, `load8_u`, [5969]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3995 +assert_return(() => invoke($18, `load8_u`, [6168]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3996 +assert_return(() => invoke($18, `load8_u`, [6367]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3997 +assert_return(() => invoke($18, `load8_u`, [6566]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3998 +assert_return(() => invoke($18, `load8_u`, [6765]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:3999 +assert_return(() => invoke($18, `load8_u`, [6964]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4000 +assert_return(() => invoke($18, `load8_u`, [7163]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4001 +assert_return(() => invoke($18, `load8_u`, [7362]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4002 +assert_return(() => invoke($18, `load8_u`, [7561]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4003 +assert_return(() => invoke($18, `load8_u`, [7760]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4004 +assert_return(() => invoke($18, `load8_u`, [7959]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4005 +assert_return(() => invoke($18, `load8_u`, [8158]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4006 +assert_return(() => invoke($18, `load8_u`, [8357]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4007 +assert_return(() => invoke($18, `load8_u`, [8556]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4008 +assert_return(() => invoke($18, `load8_u`, [8755]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4009 +assert_return(() => invoke($18, `load8_u`, [8954]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4010 +assert_return(() => invoke($18, `load8_u`, [9153]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4011 +assert_return(() => invoke($18, `load8_u`, [9352]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4012 +assert_return(() => invoke($18, `load8_u`, [9551]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4013 +assert_return(() => invoke($18, `load8_u`, [9750]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4014 +assert_return(() => invoke($18, `load8_u`, [9949]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4015 +assert_return(() => invoke($18, `load8_u`, [10148]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4016 +assert_return(() => invoke($18, `load8_u`, [10347]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4017 +assert_return(() => invoke($18, `load8_u`, [10546]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4018 +assert_return(() => invoke($18, `load8_u`, [10745]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4019 +assert_return(() => invoke($18, `load8_u`, [10944]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4020 +assert_return(() => invoke($18, `load8_u`, [11143]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4021 +assert_return(() => invoke($18, `load8_u`, [11342]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4022 +assert_return(() => invoke($18, `load8_u`, [11541]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4023 +assert_return(() => invoke($18, `load8_u`, [11740]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4024 +assert_return(() => invoke($18, `load8_u`, [11939]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4025 +assert_return(() => invoke($18, `load8_u`, [12138]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4026 +assert_return(() => invoke($18, `load8_u`, [12337]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4027 +assert_return(() => invoke($18, `load8_u`, [12536]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4028 +assert_return(() => invoke($18, `load8_u`, [12735]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4029 +assert_return(() => invoke($18, `load8_u`, [12934]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4030 +assert_return(() => invoke($18, `load8_u`, [13133]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4031 +assert_return(() => invoke($18, `load8_u`, [13332]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4032 +assert_return(() => invoke($18, `load8_u`, [13531]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4033 +assert_return(() => invoke($18, `load8_u`, [13730]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4034 +assert_return(() => invoke($18, `load8_u`, [13929]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4035 +assert_return(() => invoke($18, `load8_u`, [14128]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4036 +assert_return(() => invoke($18, `load8_u`, [14327]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4037 +assert_return(() => invoke($18, `load8_u`, [14526]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4038 +assert_return(() => invoke($18, `load8_u`, [14725]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4039 +assert_return(() => invoke($18, `load8_u`, [14924]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4040 +assert_return(() => invoke($18, `load8_u`, [15123]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4041 +assert_return(() => invoke($18, `load8_u`, [15322]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4042 +assert_return(() => invoke($18, `load8_u`, [15521]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4043 +assert_return(() => invoke($18, `load8_u`, [15720]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4044 +assert_return(() => invoke($18, `load8_u`, [15919]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4045 +assert_return(() => invoke($18, `load8_u`, [16118]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4046 +assert_return(() => invoke($18, `load8_u`, [16317]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4047 +assert_return(() => invoke($18, `load8_u`, [16516]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4048 +assert_return(() => invoke($18, `load8_u`, [16715]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4049 +assert_return(() => invoke($18, `load8_u`, [16914]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4050 +assert_return(() => invoke($18, `load8_u`, [17113]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4051 +assert_return(() => invoke($18, `load8_u`, [17312]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4052 +assert_return(() => invoke($18, `load8_u`, [17511]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4053 +assert_return(() => invoke($18, `load8_u`, [17710]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4054 +assert_return(() => invoke($18, `load8_u`, [17909]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4055 +assert_return(() => invoke($18, `load8_u`, [18108]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4056 +assert_return(() => invoke($18, `load8_u`, [18307]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4057 +assert_return(() => invoke($18, `load8_u`, [18506]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4058 +assert_return(() => invoke($18, `load8_u`, [18705]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4059 +assert_return(() => invoke($18, `load8_u`, [18904]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4060 +assert_return(() => invoke($18, `load8_u`, [19103]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4061 +assert_return(() => invoke($18, `load8_u`, [19302]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4062 +assert_return(() => invoke($18, `load8_u`, [19501]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4063 +assert_return(() => invoke($18, `load8_u`, [19700]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4064 +assert_return(() => invoke($18, `load8_u`, [19899]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4065 +assert_return(() => invoke($18, `load8_u`, [20098]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4066 +assert_return(() => invoke($18, `load8_u`, [20297]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4067 +assert_return(() => invoke($18, `load8_u`, [20496]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4068 +assert_return(() => invoke($18, `load8_u`, [20695]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4069 +assert_return(() => invoke($18, `load8_u`, [20894]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4070 +assert_return(() => invoke($18, `load8_u`, [21093]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4071 +assert_return(() => invoke($18, `load8_u`, [21292]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4072 +assert_return(() => invoke($18, `load8_u`, [21491]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4073 +assert_return(() => invoke($18, `load8_u`, [21690]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4074 +assert_return(() => invoke($18, `load8_u`, [21889]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4075 +assert_return(() => invoke($18, `load8_u`, [22088]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4076 +assert_return(() => invoke($18, `load8_u`, [22287]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4077 +assert_return(() => invoke($18, `load8_u`, [22486]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4078 +assert_return(() => invoke($18, `load8_u`, [22685]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4079 +assert_return(() => invoke($18, `load8_u`, [22884]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4080 +assert_return(() => invoke($18, `load8_u`, [23083]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4081 +assert_return(() => invoke($18, `load8_u`, [23282]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4082 +assert_return(() => invoke($18, `load8_u`, [23481]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4083 +assert_return(() => invoke($18, `load8_u`, [23680]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4084 +assert_return(() => invoke($18, `load8_u`, [23879]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4085 +assert_return(() => invoke($18, `load8_u`, [24078]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4086 +assert_return(() => invoke($18, `load8_u`, [24277]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4087 +assert_return(() => invoke($18, `load8_u`, [24476]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4088 +assert_return(() => invoke($18, `load8_u`, [24675]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4089 +assert_return(() => invoke($18, `load8_u`, [24874]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4090 +assert_return(() => invoke($18, `load8_u`, [25073]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4091 +assert_return(() => invoke($18, `load8_u`, [25272]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4092 +assert_return(() => invoke($18, `load8_u`, [25471]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4093 +assert_return(() => invoke($18, `load8_u`, [25670]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4094 +assert_return(() => invoke($18, `load8_u`, [25869]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4095 +assert_return(() => invoke($18, `load8_u`, [26068]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4096 +assert_return(() => invoke($18, `load8_u`, [26267]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4097 +assert_return(() => invoke($18, `load8_u`, [26466]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4098 +assert_return(() => invoke($18, `load8_u`, [26665]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4099 +assert_return(() => invoke($18, `load8_u`, [26864]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4100 +assert_return(() => invoke($18, `load8_u`, [27063]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4101 +assert_return(() => invoke($18, `load8_u`, [27262]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4102 +assert_return(() => invoke($18, `load8_u`, [27461]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4103 +assert_return(() => invoke($18, `load8_u`, [27660]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4104 +assert_return(() => invoke($18, `load8_u`, [27859]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4105 +assert_return(() => invoke($18, `load8_u`, [28058]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4106 +assert_return(() => invoke($18, `load8_u`, [28257]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4107 +assert_return(() => invoke($18, `load8_u`, [28456]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4108 +assert_return(() => invoke($18, `load8_u`, [28655]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4109 +assert_return(() => invoke($18, `load8_u`, [28854]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4110 +assert_return(() => invoke($18, `load8_u`, [29053]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4111 +assert_return(() => invoke($18, `load8_u`, [29252]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4112 +assert_return(() => invoke($18, `load8_u`, [29451]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4113 +assert_return(() => invoke($18, `load8_u`, [29650]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4114 +assert_return(() => invoke($18, `load8_u`, [29849]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4115 +assert_return(() => invoke($18, `load8_u`, [30048]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4116 +assert_return(() => invoke($18, `load8_u`, [30247]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4117 +assert_return(() => invoke($18, `load8_u`, [30446]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4118 +assert_return(() => invoke($18, `load8_u`, [30645]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4119 +assert_return(() => invoke($18, `load8_u`, [30844]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4120 +assert_return(() => invoke($18, `load8_u`, [31043]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4121 +assert_return(() => invoke($18, `load8_u`, [31242]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4122 +assert_return(() => invoke($18, `load8_u`, [31441]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4123 +assert_return(() => invoke($18, `load8_u`, [31640]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4124 +assert_return(() => invoke($18, `load8_u`, [31839]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4125 +assert_return(() => invoke($18, `load8_u`, [32038]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4126 +assert_return(() => invoke($18, `load8_u`, [32237]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4127 +assert_return(() => invoke($18, `load8_u`, [32436]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4128 +assert_return(() => invoke($18, `load8_u`, [32635]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4129 +assert_return(() => invoke($18, `load8_u`, [32834]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4130 +assert_return(() => invoke($18, `load8_u`, [33033]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4131 +assert_return(() => invoke($18, `load8_u`, [33232]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4132 +assert_return(() => invoke($18, `load8_u`, [33431]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4133 +assert_return(() => invoke($18, `load8_u`, [33630]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4134 +assert_return(() => invoke($18, `load8_u`, [33829]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4135 +assert_return(() => invoke($18, `load8_u`, [34028]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4136 +assert_return(() => invoke($18, `load8_u`, [34227]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4137 +assert_return(() => invoke($18, `load8_u`, [34426]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4138 +assert_return(() => invoke($18, `load8_u`, [34625]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4139 +assert_return(() => invoke($18, `load8_u`, [34824]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4140 +assert_return(() => invoke($18, `load8_u`, [35023]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4141 +assert_return(() => invoke($18, `load8_u`, [35222]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4142 +assert_return(() => invoke($18, `load8_u`, [35421]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4143 +assert_return(() => invoke($18, `load8_u`, [35620]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4144 +assert_return(() => invoke($18, `load8_u`, [35819]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4145 +assert_return(() => invoke($18, `load8_u`, [36018]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4146 +assert_return(() => invoke($18, `load8_u`, [36217]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4147 +assert_return(() => invoke($18, `load8_u`, [36416]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4148 +assert_return(() => invoke($18, `load8_u`, [36615]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4149 +assert_return(() => invoke($18, `load8_u`, [36814]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4150 +assert_return(() => invoke($18, `load8_u`, [37013]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4151 +assert_return(() => invoke($18, `load8_u`, [37212]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4152 +assert_return(() => invoke($18, `load8_u`, [37411]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4153 +assert_return(() => invoke($18, `load8_u`, [37610]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4154 +assert_return(() => invoke($18, `load8_u`, [37809]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4155 +assert_return(() => invoke($18, `load8_u`, [38008]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4156 +assert_return(() => invoke($18, `load8_u`, [38207]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4157 +assert_return(() => invoke($18, `load8_u`, [38406]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4158 +assert_return(() => invoke($18, `load8_u`, [38605]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4159 +assert_return(() => invoke($18, `load8_u`, [38804]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4160 +assert_return(() => invoke($18, `load8_u`, [39003]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4161 +assert_return(() => invoke($18, `load8_u`, [39202]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4162 +assert_return(() => invoke($18, `load8_u`, [39401]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4163 +assert_return(() => invoke($18, `load8_u`, [39600]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4164 +assert_return(() => invoke($18, `load8_u`, [39799]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4165 +assert_return(() => invoke($18, `load8_u`, [39998]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4166 +assert_return(() => invoke($18, `load8_u`, [40197]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4167 +assert_return(() => invoke($18, `load8_u`, [40396]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4168 +assert_return(() => invoke($18, `load8_u`, [40595]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4169 +assert_return(() => invoke($18, `load8_u`, [40794]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4170 +assert_return(() => invoke($18, `load8_u`, [40993]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4171 +assert_return(() => invoke($18, `load8_u`, [41192]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4172 +assert_return(() => invoke($18, `load8_u`, [41391]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4173 +assert_return(() => invoke($18, `load8_u`, [41590]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4174 +assert_return(() => invoke($18, `load8_u`, [41789]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4175 +assert_return(() => invoke($18, `load8_u`, [41988]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4176 +assert_return(() => invoke($18, `load8_u`, [42187]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4177 +assert_return(() => invoke($18, `load8_u`, [42386]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4178 +assert_return(() => invoke($18, `load8_u`, [42585]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4179 +assert_return(() => invoke($18, `load8_u`, [42784]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4180 +assert_return(() => invoke($18, `load8_u`, [42983]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4181 +assert_return(() => invoke($18, `load8_u`, [43182]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4182 +assert_return(() => invoke($18, `load8_u`, [43381]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4183 +assert_return(() => invoke($18, `load8_u`, [43580]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4184 +assert_return(() => invoke($18, `load8_u`, [43779]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4185 +assert_return(() => invoke($18, `load8_u`, [43978]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4186 +assert_return(() => invoke($18, `load8_u`, [44177]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4187 +assert_return(() => invoke($18, `load8_u`, [44376]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4188 +assert_return(() => invoke($18, `load8_u`, [44575]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4189 +assert_return(() => invoke($18, `load8_u`, [44774]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4190 +assert_return(() => invoke($18, `load8_u`, [44973]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4191 +assert_return(() => invoke($18, `load8_u`, [45172]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4192 +assert_return(() => invoke($18, `load8_u`, [45371]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4193 +assert_return(() => invoke($18, `load8_u`, [45570]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4194 +assert_return(() => invoke($18, `load8_u`, [45769]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4195 +assert_return(() => invoke($18, `load8_u`, [45968]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4196 +assert_return(() => invoke($18, `load8_u`, [46167]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4197 +assert_return(() => invoke($18, `load8_u`, [46366]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4198 +assert_return(() => invoke($18, `load8_u`, [46565]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4199 +assert_return(() => invoke($18, `load8_u`, [46764]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4200 +assert_return(() => invoke($18, `load8_u`, [46963]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4201 +assert_return(() => invoke($18, `load8_u`, [47162]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4202 +assert_return(() => invoke($18, `load8_u`, [47361]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4203 +assert_return(() => invoke($18, `load8_u`, [47560]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4204 +assert_return(() => invoke($18, `load8_u`, [47759]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4205 +assert_return(() => invoke($18, `load8_u`, [47958]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4206 +assert_return(() => invoke($18, `load8_u`, [48157]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4207 +assert_return(() => invoke($18, `load8_u`, [48356]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4208 +assert_return(() => invoke($18, `load8_u`, [48555]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4209 +assert_return(() => invoke($18, `load8_u`, [48754]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4210 +assert_return(() => invoke($18, `load8_u`, [48953]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4211 +assert_return(() => invoke($18, `load8_u`, [49152]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4212 +assert_return(() => invoke($18, `load8_u`, [49351]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4213 +assert_return(() => invoke($18, `load8_u`, [49550]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4214 +assert_return(() => invoke($18, `load8_u`, [49749]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4215 +assert_return(() => invoke($18, `load8_u`, [49948]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4216 +assert_return(() => invoke($18, `load8_u`, [50147]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4217 +assert_return(() => invoke($18, `load8_u`, [50346]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4218 +assert_return(() => invoke($18, `load8_u`, [50545]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4219 +assert_return(() => invoke($18, `load8_u`, [50744]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4220 +assert_return(() => invoke($18, `load8_u`, [50943]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4221 +assert_return(() => invoke($18, `load8_u`, [51142]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4222 +assert_return(() => invoke($18, `load8_u`, [51341]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4223 +assert_return(() => invoke($18, `load8_u`, [51540]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4224 +assert_return(() => invoke($18, `load8_u`, [51739]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4225 +assert_return(() => invoke($18, `load8_u`, [51938]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4226 +assert_return(() => invoke($18, `load8_u`, [52137]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4227 +assert_return(() => invoke($18, `load8_u`, [52336]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4228 +assert_return(() => invoke($18, `load8_u`, [52535]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4229 +assert_return(() => invoke($18, `load8_u`, [52734]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4230 +assert_return(() => invoke($18, `load8_u`, [52933]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4231 +assert_return(() => invoke($18, `load8_u`, [53132]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4232 +assert_return(() => invoke($18, `load8_u`, [53331]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4233 +assert_return(() => invoke($18, `load8_u`, [53530]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4234 +assert_return(() => invoke($18, `load8_u`, [53729]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4235 +assert_return(() => invoke($18, `load8_u`, [53928]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4236 +assert_return(() => invoke($18, `load8_u`, [54127]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4237 +assert_return(() => invoke($18, `load8_u`, [54326]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4238 +assert_return(() => invoke($18, `load8_u`, [54525]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4239 +assert_return(() => invoke($18, `load8_u`, [54724]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4240 +assert_return(() => invoke($18, `load8_u`, [54923]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4241 +assert_return(() => invoke($18, `load8_u`, [55122]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4242 +assert_return(() => invoke($18, `load8_u`, [55321]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4243 +assert_return(() => invoke($18, `load8_u`, [55520]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4244 +assert_return(() => invoke($18, `load8_u`, [55719]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4245 +assert_return(() => invoke($18, `load8_u`, [55918]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4246 +assert_return(() => invoke($18, `load8_u`, [56117]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4247 +assert_return(() => invoke($18, `load8_u`, [56316]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4248 +assert_return(() => invoke($18, `load8_u`, [56515]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4249 +assert_return(() => invoke($18, `load8_u`, [56714]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4250 +assert_return(() => invoke($18, `load8_u`, [56913]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4251 +assert_return(() => invoke($18, `load8_u`, [57112]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4252 +assert_return(() => invoke($18, `load8_u`, [57311]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4253 +assert_return(() => invoke($18, `load8_u`, [57510]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4254 +assert_return(() => invoke($18, `load8_u`, [57709]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4255 +assert_return(() => invoke($18, `load8_u`, [57908]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4256 +assert_return(() => invoke($18, `load8_u`, [58107]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4257 +assert_return(() => invoke($18, `load8_u`, [58306]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4258 +assert_return(() => invoke($18, `load8_u`, [58505]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4259 +assert_return(() => invoke($18, `load8_u`, [58704]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4260 +assert_return(() => invoke($18, `load8_u`, [58903]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4261 +assert_return(() => invoke($18, `load8_u`, [59102]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4262 +assert_return(() => invoke($18, `load8_u`, [59301]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4263 +assert_return(() => invoke($18, `load8_u`, [59500]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4264 +assert_return(() => invoke($18, `load8_u`, [59699]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4265 +assert_return(() => invoke($18, `load8_u`, [59898]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4266 +assert_return(() => invoke($18, `load8_u`, [60097]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4267 +assert_return(() => invoke($18, `load8_u`, [60296]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4268 +assert_return(() => invoke($18, `load8_u`, [60495]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4269 +assert_return(() => invoke($18, `load8_u`, [60694]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4270 +assert_return(() => invoke($18, `load8_u`, [60893]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4271 +assert_return(() => invoke($18, `load8_u`, [61092]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4272 +assert_return(() => invoke($18, `load8_u`, [61291]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4273 +assert_return(() => invoke($18, `load8_u`, [61440]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4274 +assert_return(() => invoke($18, `load8_u`, [61441]), [value("i32", 1)]); + +// ./test/core/memory_copy.wast:4275 +assert_return(() => invoke($18, `load8_u`, [61442]), [value("i32", 2)]); + +// ./test/core/memory_copy.wast:4276 +assert_return(() => invoke($18, `load8_u`, [61443]), [value("i32", 3)]); + +// ./test/core/memory_copy.wast:4277 +assert_return(() => invoke($18, `load8_u`, [61444]), [value("i32", 4)]); + +// ./test/core/memory_copy.wast:4278 +assert_return(() => invoke($18, `load8_u`, [61445]), [value("i32", 5)]); + +// ./test/core/memory_copy.wast:4279 +assert_return(() => invoke($18, `load8_u`, [61446]), [value("i32", 6)]); + +// ./test/core/memory_copy.wast:4280 +assert_return(() => invoke($18, `load8_u`, [61447]), [value("i32", 7)]); + +// ./test/core/memory_copy.wast:4281 +assert_return(() => invoke($18, `load8_u`, [61448]), [value("i32", 8)]); + +// ./test/core/memory_copy.wast:4282 +assert_return(() => invoke($18, `load8_u`, [61449]), [value("i32", 9)]); + +// ./test/core/memory_copy.wast:4283 +assert_return(() => invoke($18, `load8_u`, [61450]), [value("i32", 10)]); + +// ./test/core/memory_copy.wast:4284 +assert_return(() => invoke($18, `load8_u`, [61451]), [value("i32", 11)]); + +// ./test/core/memory_copy.wast:4285 +assert_return(() => invoke($18, `load8_u`, [61452]), [value("i32", 12)]); + +// ./test/core/memory_copy.wast:4286 +assert_return(() => invoke($18, `load8_u`, [61453]), [value("i32", 13)]); + +// ./test/core/memory_copy.wast:4287 +assert_return(() => invoke($18, `load8_u`, [61454]), [value("i32", 14)]); + +// ./test/core/memory_copy.wast:4288 +assert_return(() => invoke($18, `load8_u`, [61455]), [value("i32", 15)]); + +// ./test/core/memory_copy.wast:4289 +assert_return(() => invoke($18, `load8_u`, [61456]), [value("i32", 16)]); + +// ./test/core/memory_copy.wast:4290 +assert_return(() => invoke($18, `load8_u`, [61457]), [value("i32", 17)]); + +// ./test/core/memory_copy.wast:4291 +assert_return(() => invoke($18, `load8_u`, [61458]), [value("i32", 18)]); + +// ./test/core/memory_copy.wast:4292 +assert_return(() => invoke($18, `load8_u`, [61459]), [value("i32", 19)]); + +// ./test/core/memory_copy.wast:4293 +assert_return(() => invoke($18, `load8_u`, [61510]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4294 +assert_return(() => invoke($18, `load8_u`, [61709]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4295 +assert_return(() => invoke($18, `load8_u`, [61908]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4296 +assert_return(() => invoke($18, `load8_u`, [62107]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4297 +assert_return(() => invoke($18, `load8_u`, [62306]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4298 +assert_return(() => invoke($18, `load8_u`, [62505]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4299 +assert_return(() => invoke($18, `load8_u`, [62704]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4300 +assert_return(() => invoke($18, `load8_u`, [62903]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4301 +assert_return(() => invoke($18, `load8_u`, [63102]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4302 +assert_return(() => invoke($18, `load8_u`, [63301]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4303 +assert_return(() => invoke($18, `load8_u`, [63500]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4304 +assert_return(() => invoke($18, `load8_u`, [63699]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4305 +assert_return(() => invoke($18, `load8_u`, [63898]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4306 +assert_return(() => invoke($18, `load8_u`, [64097]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4307 +assert_return(() => invoke($18, `load8_u`, [64296]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4308 +assert_return(() => invoke($18, `load8_u`, [64495]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4309 +assert_return(() => invoke($18, `load8_u`, [64694]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4310 +assert_return(() => invoke($18, `load8_u`, [64893]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4311 +assert_return(() => invoke($18, `load8_u`, [65092]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4312 +assert_return(() => invoke($18, `load8_u`, [65291]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4313 +assert_return(() => invoke($18, `load8_u`, [65490]), [value("i32", 0)]); + +// ./test/core/memory_copy.wast:4315 +assert_invalid( + () => instantiate(`(module + (func (export "testfn") + (memory.copy (i32.const 10) (i32.const 20) (i32.const 30))))`), + `unknown memory 0`, +); + +// ./test/core/memory_copy.wast:4321 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (i32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4328 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (i32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4335 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (i32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4342 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (f32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4349 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (f32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4356 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (f32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4363 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (f32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4370 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (i64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4377 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (i64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4384 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (i64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4391 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (i64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4398 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (f64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4405 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (f64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4412 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (f64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4419 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i32.const 10) (f64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4426 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (i32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4433 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (i32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4440 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (i32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4447 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (i32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4454 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (f32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4461 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (f32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4468 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (f32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4475 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (f32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4482 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (i64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4489 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (i64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4496 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (i64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4503 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (i64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4510 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (f64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4517 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (f64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4524 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (f64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4531 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f32.const 10) (f64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4538 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (i32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4545 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (i32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4552 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (i32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4559 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (i32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4566 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (f32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4573 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (f32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4580 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (f32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4587 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (f32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4594 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (i64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4601 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (i64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4608 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (i64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4615 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (i64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4622 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (f64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4629 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (f64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4636 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (f64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4643 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (i64.const 10) (f64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4650 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (i32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4657 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (i32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4664 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (i32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4671 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (i32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4678 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (f32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4685 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (f32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4692 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (f32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4699 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (f32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4706 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (i64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4713 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (i64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4720 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (i64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4727 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (i64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4734 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (f64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4741 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (f64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4748 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (f64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4755 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.copy (f64.const 10) (f64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_copy.wast:4763 +let $19 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.fill (i32.const 10) (i32.const 0x55) (i32.const 10)) + (memory.copy (i32.const 9) (i32.const 10) (i32.const 5))) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) +)`); + +// ./test/core/memory_copy.wast:4780 +invoke($19, `test`, []); + +// ./test/core/memory_copy.wast:4782 +assert_return(() => invoke($19, `checkRange`, [0, 9, 0]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:4784 +assert_return(() => invoke($19, `checkRange`, [9, 20, 85]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:4786 +assert_return(() => invoke($19, `checkRange`, [20, 65536, 0]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:4789 +let $20 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.fill (i32.const 10) (i32.const 0x55) (i32.const 10)) + (memory.copy (i32.const 16) (i32.const 15) (i32.const 5))) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) +)`); + +// ./test/core/memory_copy.wast:4806 +invoke($20, `test`, []); + +// ./test/core/memory_copy.wast:4808 +assert_return(() => invoke($20, `checkRange`, [0, 10, 0]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:4810 +assert_return(() => invoke($20, `checkRange`, [10, 21, 85]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:4812 +assert_return(() => invoke($20, `checkRange`, [21, 65536, 0]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:4815 +let $21 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.copy (i32.const 0xFF00) (i32.const 0x8000) (i32.const 257))))`); + +// ./test/core/memory_copy.wast:4819 +assert_trap(() => invoke($21, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:4821 +let $22 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.copy (i32.const 0xFFFFFF00) (i32.const 0x4000) (i32.const 257))))`); + +// ./test/core/memory_copy.wast:4825 +assert_trap(() => invoke($22, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:4827 +let $23 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.copy (i32.const 0x8000) (i32.const 0xFF00) (i32.const 257))))`); + +// ./test/core/memory_copy.wast:4831 +assert_trap(() => invoke($23, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:4833 +let $24 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.copy (i32.const 0x4000) (i32.const 0xFFFFFF00) (i32.const 257))))`); + +// ./test/core/memory_copy.wast:4837 +assert_trap(() => invoke($24, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:4839 +let $25 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.fill (i32.const 0x0000) (i32.const 0x55) (i32.const 0x8000)) + (memory.fill (i32.const 0x8000) (i32.const 0xAA) (i32.const 0x8000)) + (memory.copy (i32.const 0x9000) (i32.const 0x7000) (i32.const 0))) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) +)`); + +// ./test/core/memory_copy.wast:4857 +invoke($25, `test`, []); + +// ./test/core/memory_copy.wast:4859 +assert_return(() => invoke($25, `checkRange`, [0, 32768, 85]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:4861 +assert_return(() => invoke($25, `checkRange`, [32768, 65536, 170]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:4863 +let $26 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.copy (i32.const 0x10000) (i32.const 0x7000) (i32.const 0))))`); + +// ./test/core/memory_copy.wast:4867 +invoke($26, `test`, []); + +// ./test/core/memory_copy.wast:4869 +let $27 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.copy (i32.const 0x20000) (i32.const 0x7000) (i32.const 0))))`); + +// ./test/core/memory_copy.wast:4873 +assert_trap(() => invoke($27, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:4875 +let $28 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.copy (i32.const 0x9000) (i32.const 0x10000) (i32.const 0))))`); + +// ./test/core/memory_copy.wast:4879 +invoke($28, `test`, []); + +// ./test/core/memory_copy.wast:4881 +let $29 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.copy (i32.const 0x9000) (i32.const 0x20000) (i32.const 0))))`); + +// ./test/core/memory_copy.wast:4885 +assert_trap(() => invoke($29, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:4887 +let $30 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.copy (i32.const 0x10000) (i32.const 0x10000) (i32.const 0))))`); + +// ./test/core/memory_copy.wast:4891 +invoke($30, `test`, []); + +// ./test/core/memory_copy.wast:4893 +let $31 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.copy (i32.const 0x20000) (i32.const 0x20000) (i32.const 0))))`); + +// ./test/core/memory_copy.wast:4897 +assert_trap(() => invoke($31, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_copy.wast:4899 +let $32 = instantiate(`(module + (memory 1 1) + (func (export "test") + (memory.fill (i32.const 17767) (i32.const 1) (i32.const 1344)) + (memory.fill (i32.const 39017) (i32.const 2) (i32.const 1055)) + (memory.fill (i32.const 56401) (i32.const 3) (i32.const 988)) + (memory.fill (i32.const 37962) (i32.const 4) (i32.const 322)) + (memory.fill (i32.const 7977) (i32.const 5) (i32.const 1994)) + (memory.fill (i32.const 22714) (i32.const 6) (i32.const 3036)) + (memory.fill (i32.const 16882) (i32.const 7) (i32.const 2372)) + (memory.fill (i32.const 43491) (i32.const 8) (i32.const 835)) + (memory.fill (i32.const 124) (i32.const 9) (i32.const 1393)) + (memory.fill (i32.const 2132) (i32.const 10) (i32.const 2758)) + (memory.fill (i32.const 8987) (i32.const 11) (i32.const 3098)) + (memory.fill (i32.const 52711) (i32.const 12) (i32.const 741)) + (memory.fill (i32.const 3958) (i32.const 13) (i32.const 2823)) + (memory.fill (i32.const 49715) (i32.const 14) (i32.const 1280)) + (memory.fill (i32.const 50377) (i32.const 15) (i32.const 1466)) + (memory.fill (i32.const 20493) (i32.const 16) (i32.const 3158)) + (memory.fill (i32.const 47665) (i32.const 17) (i32.const 544)) + (memory.fill (i32.const 12451) (i32.const 18) (i32.const 2669)) + (memory.fill (i32.const 24869) (i32.const 19) (i32.const 2651)) + (memory.fill (i32.const 45317) (i32.const 20) (i32.const 1570)) + (memory.fill (i32.const 43096) (i32.const 21) (i32.const 1691)) + (memory.fill (i32.const 33886) (i32.const 22) (i32.const 646)) + (memory.fill (i32.const 48555) (i32.const 23) (i32.const 1858)) + (memory.fill (i32.const 53453) (i32.const 24) (i32.const 2657)) + (memory.fill (i32.const 30363) (i32.const 25) (i32.const 981)) + (memory.fill (i32.const 9300) (i32.const 26) (i32.const 1807)) + (memory.fill (i32.const 50190) (i32.const 27) (i32.const 487)) + (memory.fill (i32.const 62753) (i32.const 28) (i32.const 530)) + (memory.fill (i32.const 36316) (i32.const 29) (i32.const 943)) + (memory.fill (i32.const 6768) (i32.const 30) (i32.const 381)) + (memory.fill (i32.const 51262) (i32.const 31) (i32.const 3089)) + (memory.fill (i32.const 49729) (i32.const 32) (i32.const 658)) + (memory.fill (i32.const 44540) (i32.const 33) (i32.const 1702)) + (memory.fill (i32.const 33342) (i32.const 34) (i32.const 1092)) + (memory.fill (i32.const 50814) (i32.const 35) (i32.const 1410)) + (memory.fill (i32.const 47594) (i32.const 36) (i32.const 2204)) + (memory.fill (i32.const 54123) (i32.const 37) (i32.const 2394)) + (memory.fill (i32.const 55183) (i32.const 38) (i32.const 250)) + (memory.fill (i32.const 22620) (i32.const 39) (i32.const 2097)) + (memory.fill (i32.const 17132) (i32.const 40) (i32.const 3264)) + (memory.fill (i32.const 54331) (i32.const 41) (i32.const 3299)) + (memory.fill (i32.const 39474) (i32.const 42) (i32.const 2796)) + (memory.fill (i32.const 36156) (i32.const 43) (i32.const 2070)) + (memory.fill (i32.const 35308) (i32.const 44) (i32.const 2763)) + (memory.fill (i32.const 32731) (i32.const 45) (i32.const 312)) + (memory.fill (i32.const 63746) (i32.const 46) (i32.const 192)) + (memory.fill (i32.const 30974) (i32.const 47) (i32.const 596)) + (memory.fill (i32.const 16635) (i32.const 48) (i32.const 501)) + (memory.fill (i32.const 57002) (i32.const 49) (i32.const 686)) + (memory.fill (i32.const 34299) (i32.const 50) (i32.const 385)) + (memory.fill (i32.const 60881) (i32.const 51) (i32.const 903)) + (memory.fill (i32.const 61445) (i32.const 52) (i32.const 2390)) + (memory.fill (i32.const 46972) (i32.const 53) (i32.const 1441)) + (memory.fill (i32.const 25973) (i32.const 54) (i32.const 3162)) + (memory.fill (i32.const 5566) (i32.const 55) (i32.const 2135)) + (memory.fill (i32.const 35977) (i32.const 56) (i32.const 519)) + (memory.fill (i32.const 44892) (i32.const 57) (i32.const 3280)) + (memory.fill (i32.const 46760) (i32.const 58) (i32.const 1678)) + (memory.fill (i32.const 46607) (i32.const 59) (i32.const 3168)) + (memory.fill (i32.const 22449) (i32.const 60) (i32.const 1441)) + (memory.fill (i32.const 58609) (i32.const 61) (i32.const 663)) + (memory.fill (i32.const 32261) (i32.const 62) (i32.const 1671)) + (memory.fill (i32.const 3063) (i32.const 63) (i32.const 721)) + (memory.fill (i32.const 34025) (i32.const 64) (i32.const 84)) + (memory.fill (i32.const 33338) (i32.const 65) (i32.const 2029)) + (memory.fill (i32.const 36810) (i32.const 66) (i32.const 29)) + (memory.fill (i32.const 19147) (i32.const 67) (i32.const 3034)) + (memory.fill (i32.const 12616) (i32.const 68) (i32.const 1043)) + (memory.fill (i32.const 18276) (i32.const 69) (i32.const 3324)) + (memory.fill (i32.const 4639) (i32.const 70) (i32.const 1091)) + (memory.fill (i32.const 16158) (i32.const 71) (i32.const 1997)) + (memory.fill (i32.const 18204) (i32.const 72) (i32.const 2259)) + (memory.fill (i32.const 50532) (i32.const 73) (i32.const 3189)) + (memory.fill (i32.const 11028) (i32.const 74) (i32.const 1968)) + (memory.fill (i32.const 15962) (i32.const 75) (i32.const 1455)) + (memory.fill (i32.const 45406) (i32.const 76) (i32.const 1177)) + (memory.fill (i32.const 54137) (i32.const 77) (i32.const 1568)) + (memory.fill (i32.const 33083) (i32.const 78) (i32.const 1642)) + (memory.fill (i32.const 61028) (i32.const 79) (i32.const 3284)) + (memory.fill (i32.const 51729) (i32.const 80) (i32.const 223)) + (memory.fill (i32.const 4361) (i32.const 81) (i32.const 2171)) + (memory.fill (i32.const 57514) (i32.const 82) (i32.const 1322)) + (memory.fill (i32.const 55724) (i32.const 83) (i32.const 2648)) + (memory.fill (i32.const 24091) (i32.const 84) (i32.const 1045)) + (memory.fill (i32.const 43183) (i32.const 85) (i32.const 3097)) + (memory.fill (i32.const 32307) (i32.const 86) (i32.const 2796)) + (memory.fill (i32.const 3811) (i32.const 87) (i32.const 2010)) + (memory.fill (i32.const 54856) (i32.const 88) (i32.const 0)) + (memory.fill (i32.const 49941) (i32.const 89) (i32.const 2069)) + (memory.fill (i32.const 20411) (i32.const 90) (i32.const 2896)) + (memory.fill (i32.const 33826) (i32.const 91) (i32.const 192)) + (memory.fill (i32.const 9402) (i32.const 92) (i32.const 2195)) + (memory.fill (i32.const 12413) (i32.const 93) (i32.const 24)) + (memory.fill (i32.const 14091) (i32.const 94) (i32.const 577)) + (memory.fill (i32.const 44058) (i32.const 95) (i32.const 2089)) + (memory.fill (i32.const 36735) (i32.const 96) (i32.const 3436)) + (memory.fill (i32.const 23288) (i32.const 97) (i32.const 2765)) + (memory.fill (i32.const 6392) (i32.const 98) (i32.const 830)) + (memory.fill (i32.const 33307) (i32.const 99) (i32.const 1938)) + (memory.fill (i32.const 21941) (i32.const 100) (i32.const 2750)) + (memory.copy (i32.const 59214) (i32.const 54248) (i32.const 2098)) + (memory.copy (i32.const 63026) (i32.const 39224) (i32.const 230)) + (memory.copy (i32.const 51833) (i32.const 23629) (i32.const 2300)) + (memory.copy (i32.const 6708) (i32.const 23996) (i32.const 639)) + (memory.copy (i32.const 6990) (i32.const 33399) (i32.const 1097)) + (memory.copy (i32.const 19403) (i32.const 10348) (i32.const 3197)) + (memory.copy (i32.const 27308) (i32.const 54406) (i32.const 100)) + (memory.copy (i32.const 27221) (i32.const 43682) (i32.const 1717)) + (memory.copy (i32.const 60528) (i32.const 8629) (i32.const 119)) + (memory.copy (i32.const 5947) (i32.const 2308) (i32.const 658)) + (memory.copy (i32.const 4787) (i32.const 51631) (i32.const 2269)) + (memory.copy (i32.const 12617) (i32.const 19197) (i32.const 833)) + (memory.copy (i32.const 11854) (i32.const 46505) (i32.const 3300)) + (memory.copy (i32.const 11376) (i32.const 45012) (i32.const 2281)) + (memory.copy (i32.const 34186) (i32.const 6697) (i32.const 2572)) + (memory.copy (i32.const 4936) (i32.const 1690) (i32.const 1328)) + (memory.copy (i32.const 63164) (i32.const 7637) (i32.const 1670)) + (memory.copy (i32.const 44568) (i32.const 18344) (i32.const 33)) + (memory.copy (i32.const 43918) (i32.const 22348) (i32.const 1427)) + (memory.copy (i32.const 46637) (i32.const 49819) (i32.const 1434)) + (memory.copy (i32.const 63684) (i32.const 8755) (i32.const 834)) + (memory.copy (i32.const 33485) (i32.const 20131) (i32.const 3317)) + (memory.copy (i32.const 40575) (i32.const 54317) (i32.const 3201)) + (memory.copy (i32.const 25812) (i32.const 59254) (i32.const 2452)) + (memory.copy (i32.const 19678) (i32.const 56882) (i32.const 346)) + (memory.copy (i32.const 15852) (i32.const 35914) (i32.const 2430)) + (memory.copy (i32.const 11824) (i32.const 35574) (i32.const 300)) + (memory.copy (i32.const 59427) (i32.const 13957) (i32.const 3153)) + (memory.copy (i32.const 34299) (i32.const 60594) (i32.const 1281)) + (memory.copy (i32.const 8964) (i32.const 12276) (i32.const 943)) + (memory.copy (i32.const 2827) (i32.const 10425) (i32.const 1887)) + (memory.copy (i32.const 43194) (i32.const 43910) (i32.const 738)) + (memory.copy (i32.const 63038) (i32.const 18949) (i32.const 122)) + (memory.copy (i32.const 24044) (i32.const 44761) (i32.const 1755)) + (memory.copy (i32.const 22608) (i32.const 14755) (i32.const 702)) + (memory.copy (i32.const 11284) (i32.const 26579) (i32.const 1830)) + (memory.copy (i32.const 23092) (i32.const 20471) (i32.const 1064)) + (memory.copy (i32.const 57248) (i32.const 54770) (i32.const 2631)) + (memory.copy (i32.const 25492) (i32.const 1025) (i32.const 3113)) + (memory.copy (i32.const 49588) (i32.const 44220) (i32.const 975)) + (memory.copy (i32.const 28280) (i32.const 41722) (i32.const 2336)) + (memory.copy (i32.const 61289) (i32.const 230) (i32.const 2872)) + (memory.copy (i32.const 22480) (i32.const 52506) (i32.const 2197)) + (memory.copy (i32.const 40553) (i32.const 9578) (i32.const 1958)) + (memory.copy (i32.const 29004) (i32.const 20862) (i32.const 2186)) + (memory.copy (i32.const 53029) (i32.const 43955) (i32.const 1037)) + (memory.copy (i32.const 25476) (i32.const 35667) (i32.const 1650)) + (memory.copy (i32.const 58516) (i32.const 45819) (i32.const 1986)) + (memory.copy (i32.const 38297) (i32.const 5776) (i32.const 1955)) + (memory.copy (i32.const 28503) (i32.const 55364) (i32.const 2368)) + (memory.copy (i32.const 62619) (i32.const 18108) (i32.const 1356)) + (memory.copy (i32.const 50149) (i32.const 13861) (i32.const 382)) + (memory.copy (i32.const 16904) (i32.const 36341) (i32.const 1900)) + (memory.copy (i32.const 48098) (i32.const 11358) (i32.const 2807)) + (memory.copy (i32.const 28512) (i32.const 40362) (i32.const 323)) + (memory.copy (i32.const 35506) (i32.const 27856) (i32.const 1670)) + (memory.copy (i32.const 62970) (i32.const 53332) (i32.const 1341)) + (memory.copy (i32.const 14133) (i32.const 46312) (i32.const 644)) + (memory.copy (i32.const 29030) (i32.const 19074) (i32.const 496)) + (memory.copy (i32.const 44952) (i32.const 47577) (i32.const 2784)) + (memory.copy (i32.const 39559) (i32.const 44661) (i32.const 1350)) + (memory.copy (i32.const 10352) (i32.const 29274) (i32.const 1475)) + (memory.copy (i32.const 46911) (i32.const 46178) (i32.const 1467)) + (memory.copy (i32.const 4905) (i32.const 28740) (i32.const 1895)) + (memory.copy (i32.const 38012) (i32.const 57253) (i32.const 1751)) + (memory.copy (i32.const 26446) (i32.const 27223) (i32.const 1127)) + (memory.copy (i32.const 58835) (i32.const 24657) (i32.const 1063)) + (memory.copy (i32.const 61356) (i32.const 38790) (i32.const 766)) + (memory.copy (i32.const 44160) (i32.const 2284) (i32.const 1520)) + (memory.copy (i32.const 32740) (i32.const 47237) (i32.const 3014)) + (memory.copy (i32.const 11148) (i32.const 21260) (i32.const 1011)) + (memory.copy (i32.const 7665) (i32.const 31612) (i32.const 3034)) + (memory.copy (i32.const 18044) (i32.const 12987) (i32.const 3320)) + (memory.copy (i32.const 57306) (i32.const 55905) (i32.const 308)) + (memory.copy (i32.const 24675) (i32.const 16815) (i32.const 1155)) + (memory.copy (i32.const 19900) (i32.const 10115) (i32.const 722)) + (memory.copy (i32.const 2921) (i32.const 5935) (i32.const 2370)) + (memory.copy (i32.const 32255) (i32.const 50095) (i32.const 2926)) + (memory.copy (i32.const 15126) (i32.const 17299) (i32.const 2607)) + (memory.copy (i32.const 45575) (i32.const 28447) (i32.const 2045)) + (memory.copy (i32.const 55149) (i32.const 36113) (i32.const 2596)) + (memory.copy (i32.const 28461) (i32.const 54157) (i32.const 1168)) + (memory.copy (i32.const 47951) (i32.const 53385) (i32.const 3137)) + (memory.copy (i32.const 30646) (i32.const 45155) (i32.const 2649)) + (memory.copy (i32.const 5057) (i32.const 4295) (i32.const 52)) + (memory.copy (i32.const 6692) (i32.const 24195) (i32.const 441)) + (memory.copy (i32.const 32984) (i32.const 27117) (i32.const 3445)) + (memory.copy (i32.const 32530) (i32.const 59372) (i32.const 2785)) + (memory.copy (i32.const 34361) (i32.const 8962) (i32.const 2406)) + (memory.copy (i32.const 17893) (i32.const 54538) (i32.const 3381)) + (memory.copy (i32.const 22685) (i32.const 44151) (i32.const 136)) + (memory.copy (i32.const 59089) (i32.const 7077) (i32.const 1045)) + (memory.copy (i32.const 42945) (i32.const 55028) (i32.const 2389)) + (memory.copy (i32.const 44693) (i32.const 20138) (i32.const 877)) + (memory.copy (i32.const 36810) (i32.const 25196) (i32.const 3447)) + (memory.copy (i32.const 45742) (i32.const 31888) (i32.const 854)) + (memory.copy (i32.const 24236) (i32.const 31866) (i32.const 1377)) + (memory.copy (i32.const 33778) (i32.const 692) (i32.const 1594)) + (memory.copy (i32.const 60618) (i32.const 18585) (i32.const 2987)) + (memory.copy (i32.const 50370) (i32.const 41271) (i32.const 1406)) + ) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) +)`); + +// ./test/core/memory_copy.wast:5115 +invoke($32, `test`, []); + +// ./test/core/memory_copy.wast:5117 +assert_return(() => invoke($32, `checkRange`, [0, 124, 0]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5119 +assert_return(() => invoke($32, `checkRange`, [124, 1517, 9]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5121 +assert_return(() => invoke($32, `checkRange`, [1517, 2132, 0]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5123 +assert_return(() => invoke($32, `checkRange`, [2132, 2827, 10]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5125 +assert_return(() => invoke($32, `checkRange`, [2827, 2921, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5127 +assert_return(() => invoke($32, `checkRange`, [2921, 3538, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5129 +assert_return(() => invoke($32, `checkRange`, [3538, 3786, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5131 +assert_return(() => invoke($32, `checkRange`, [3786, 4042, 97]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5133 +assert_return(() => invoke($32, `checkRange`, [4042, 4651, 99]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5135 +assert_return(() => invoke($32, `checkRange`, [4651, 5057, 0]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5137 +assert_return(() => invoke($32, `checkRange`, [5057, 5109, 99]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5139 +assert_return(() => invoke($32, `checkRange`, [5109, 5291, 0]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5141 +assert_return(() => invoke($32, `checkRange`, [5291, 5524, 72]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5143 +assert_return(() => invoke($32, `checkRange`, [5524, 5691, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5145 +assert_return(() => invoke($32, `checkRange`, [5691, 6552, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5147 +assert_return(() => invoke($32, `checkRange`, [6552, 7133, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5149 +assert_return(() => invoke($32, `checkRange`, [7133, 7665, 99]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5151 +assert_return(() => invoke($32, `checkRange`, [7665, 8314, 0]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5153 +assert_return(() => invoke($32, `checkRange`, [8314, 8360, 62]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5155 +assert_return(() => invoke($32, `checkRange`, [8360, 8793, 86]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5157 +assert_return(() => invoke($32, `checkRange`, [8793, 8979, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5159 +assert_return(() => invoke($32, `checkRange`, [8979, 9373, 79]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5161 +assert_return(() => invoke($32, `checkRange`, [9373, 9518, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5163 +assert_return(() => invoke($32, `checkRange`, [9518, 9934, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5165 +assert_return(() => invoke($32, `checkRange`, [9934, 10087, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5167 +assert_return(() => invoke($32, `checkRange`, [10087, 10206, 5]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5169 +assert_return(() => invoke($32, `checkRange`, [10206, 10230, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5171 +assert_return(() => invoke($32, `checkRange`, [10230, 10249, 41]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5173 +assert_return(() => invoke($32, `checkRange`, [10249, 11148, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5175 +assert_return(() => invoke($32, `checkRange`, [11148, 11356, 74]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5177 +assert_return(() => invoke($32, `checkRange`, [11356, 11380, 93]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5179 +assert_return(() => invoke($32, `checkRange`, [11380, 11939, 74]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5181 +assert_return(() => invoke($32, `checkRange`, [11939, 12159, 68]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5183 +assert_return(() => invoke($32, `checkRange`, [12159, 12575, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5185 +assert_return(() => invoke($32, `checkRange`, [12575, 12969, 79]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5187 +assert_return(() => invoke($32, `checkRange`, [12969, 13114, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5189 +assert_return(() => invoke($32, `checkRange`, [13114, 14133, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5191 +assert_return(() => invoke($32, `checkRange`, [14133, 14404, 76]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5193 +assert_return(() => invoke($32, `checkRange`, [14404, 14428, 57]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5195 +assert_return(() => invoke($32, `checkRange`, [14428, 14458, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5197 +assert_return(() => invoke($32, `checkRange`, [14458, 14580, 32]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5199 +assert_return(() => invoke($32, `checkRange`, [14580, 14777, 89]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5201 +assert_return(() => invoke($32, `checkRange`, [14777, 15124, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5203 +assert_return(() => invoke($32, `checkRange`, [15124, 15126, 36]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5205 +assert_return(() => invoke($32, `checkRange`, [15126, 15192, 100]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5207 +assert_return(() => invoke($32, `checkRange`, [15192, 15871, 96]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5209 +assert_return(() => invoke($32, `checkRange`, [15871, 15998, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5211 +assert_return(() => invoke($32, `checkRange`, [15998, 17017, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5213 +assert_return(() => invoke($32, `checkRange`, [17017, 17288, 76]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5215 +assert_return(() => invoke($32, `checkRange`, [17288, 17312, 57]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5217 +assert_return(() => invoke($32, `checkRange`, [17312, 17342, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5219 +assert_return(() => invoke($32, `checkRange`, [17342, 17464, 32]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5221 +assert_return(() => invoke($32, `checkRange`, [17464, 17661, 89]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5223 +assert_return(() => invoke($32, `checkRange`, [17661, 17727, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5225 +assert_return(() => invoke($32, `checkRange`, [17727, 17733, 5]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5227 +assert_return(() => invoke($32, `checkRange`, [17733, 17893, 96]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5229 +assert_return(() => invoke($32, `checkRange`, [17893, 18553, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5231 +assert_return(() => invoke($32, `checkRange`, [18553, 18744, 42]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5233 +assert_return(() => invoke($32, `checkRange`, [18744, 18801, 76]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5235 +assert_return(() => invoke($32, `checkRange`, [18801, 18825, 57]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5237 +assert_return(() => invoke($32, `checkRange`, [18825, 18876, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5239 +assert_return(() => invoke($32, `checkRange`, [18876, 18885, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5241 +assert_return(() => invoke($32, `checkRange`, [18885, 18904, 41]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5243 +assert_return(() => invoke($32, `checkRange`, [18904, 19567, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5245 +assert_return(() => invoke($32, `checkRange`, [19567, 20403, 96]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5247 +assert_return(() => invoke($32, `checkRange`, [20403, 21274, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5249 +assert_return(() => invoke($32, `checkRange`, [21274, 21364, 100]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5251 +assert_return(() => invoke($32, `checkRange`, [21364, 21468, 74]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5253 +assert_return(() => invoke($32, `checkRange`, [21468, 21492, 93]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5255 +assert_return(() => invoke($32, `checkRange`, [21492, 22051, 74]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5257 +assert_return(() => invoke($32, `checkRange`, [22051, 22480, 68]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5259 +assert_return(() => invoke($32, `checkRange`, [22480, 22685, 100]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5261 +assert_return(() => invoke($32, `checkRange`, [22685, 22694, 68]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5263 +assert_return(() => invoke($32, `checkRange`, [22694, 22821, 10]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5265 +assert_return(() => invoke($32, `checkRange`, [22821, 22869, 100]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5267 +assert_return(() => invoke($32, `checkRange`, [22869, 24107, 97]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5269 +assert_return(() => invoke($32, `checkRange`, [24107, 24111, 37]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5271 +assert_return(() => invoke($32, `checkRange`, [24111, 24236, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5273 +assert_return(() => invoke($32, `checkRange`, [24236, 24348, 72]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5275 +assert_return(() => invoke($32, `checkRange`, [24348, 24515, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5277 +assert_return(() => invoke($32, `checkRange`, [24515, 24900, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5279 +assert_return(() => invoke($32, `checkRange`, [24900, 25136, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5281 +assert_return(() => invoke($32, `checkRange`, [25136, 25182, 85]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5283 +assert_return(() => invoke($32, `checkRange`, [25182, 25426, 68]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5285 +assert_return(() => invoke($32, `checkRange`, [25426, 25613, 89]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5287 +assert_return(() => invoke($32, `checkRange`, [25613, 25830, 96]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5289 +assert_return(() => invoke($32, `checkRange`, [25830, 26446, 100]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5291 +assert_return(() => invoke($32, `checkRange`, [26446, 26517, 10]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5293 +assert_return(() => invoke($32, `checkRange`, [26517, 27468, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5295 +assert_return(() => invoke($32, `checkRange`, [27468, 27503, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5297 +assert_return(() => invoke($32, `checkRange`, [27503, 27573, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5299 +assert_return(() => invoke($32, `checkRange`, [27573, 28245, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5301 +assert_return(() => invoke($32, `checkRange`, [28245, 28280, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5303 +assert_return(() => invoke($32, `checkRange`, [28280, 29502, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5305 +assert_return(() => invoke($32, `checkRange`, [29502, 29629, 42]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5307 +assert_return(() => invoke($32, `checkRange`, [29629, 30387, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5309 +assert_return(() => invoke($32, `checkRange`, [30387, 30646, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5311 +assert_return(() => invoke($32, `checkRange`, [30646, 31066, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5313 +assert_return(() => invoke($32, `checkRange`, [31066, 31131, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5315 +assert_return(() => invoke($32, `checkRange`, [31131, 31322, 42]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5317 +assert_return(() => invoke($32, `checkRange`, [31322, 31379, 76]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5319 +assert_return(() => invoke($32, `checkRange`, [31379, 31403, 57]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5321 +assert_return(() => invoke($32, `checkRange`, [31403, 31454, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5323 +assert_return(() => invoke($32, `checkRange`, [31454, 31463, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5325 +assert_return(() => invoke($32, `checkRange`, [31463, 31482, 41]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5327 +assert_return(() => invoke($32, `checkRange`, [31482, 31649, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5329 +assert_return(() => invoke($32, `checkRange`, [31649, 31978, 72]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5331 +assert_return(() => invoke($32, `checkRange`, [31978, 32145, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5333 +assert_return(() => invoke($32, `checkRange`, [32145, 32530, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5335 +assert_return(() => invoke($32, `checkRange`, [32530, 32766, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5337 +assert_return(() => invoke($32, `checkRange`, [32766, 32812, 85]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5339 +assert_return(() => invoke($32, `checkRange`, [32812, 33056, 68]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5341 +assert_return(() => invoke($32, `checkRange`, [33056, 33660, 89]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5343 +assert_return(() => invoke($32, `checkRange`, [33660, 33752, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5345 +assert_return(() => invoke($32, `checkRange`, [33752, 33775, 36]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5347 +assert_return(() => invoke($32, `checkRange`, [33775, 33778, 32]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5349 +assert_return(() => invoke($32, `checkRange`, [33778, 34603, 9]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5351 +assert_return(() => invoke($32, `checkRange`, [34603, 35218, 0]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5353 +assert_return(() => invoke($32, `checkRange`, [35218, 35372, 10]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5355 +assert_return(() => invoke($32, `checkRange`, [35372, 35486, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5357 +assert_return(() => invoke($32, `checkRange`, [35486, 35605, 5]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5359 +assert_return(() => invoke($32, `checkRange`, [35605, 35629, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5361 +assert_return(() => invoke($32, `checkRange`, [35629, 35648, 41]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5363 +assert_return(() => invoke($32, `checkRange`, [35648, 36547, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5365 +assert_return(() => invoke($32, `checkRange`, [36547, 36755, 74]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5367 +assert_return(() => invoke($32, `checkRange`, [36755, 36767, 93]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5369 +assert_return(() => invoke($32, `checkRange`, [36767, 36810, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5371 +assert_return(() => invoke($32, `checkRange`, [36810, 36839, 100]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5373 +assert_return(() => invoke($32, `checkRange`, [36839, 37444, 96]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5375 +assert_return(() => invoke($32, `checkRange`, [37444, 38060, 100]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5377 +assert_return(() => invoke($32, `checkRange`, [38060, 38131, 10]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5379 +assert_return(() => invoke($32, `checkRange`, [38131, 39082, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5381 +assert_return(() => invoke($32, `checkRange`, [39082, 39117, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5383 +assert_return(() => invoke($32, `checkRange`, [39117, 39187, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5385 +assert_return(() => invoke($32, `checkRange`, [39187, 39859, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5387 +assert_return(() => invoke($32, `checkRange`, [39859, 39894, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5389 +assert_return(() => invoke($32, `checkRange`, [39894, 40257, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5391 +assert_return(() => invoke($32, `checkRange`, [40257, 40344, 89]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5393 +assert_return(() => invoke($32, `checkRange`, [40344, 40371, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5395 +assert_return(() => invoke($32, `checkRange`, [40371, 40804, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5397 +assert_return(() => invoke($32, `checkRange`, [40804, 40909, 5]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5399 +assert_return(() => invoke($32, `checkRange`, [40909, 42259, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5401 +assert_return(() => invoke($32, `checkRange`, [42259, 42511, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5403 +assert_return(() => invoke($32, `checkRange`, [42511, 42945, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5405 +assert_return(() => invoke($32, `checkRange`, [42945, 43115, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5407 +assert_return(() => invoke($32, `checkRange`, [43115, 43306, 42]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5409 +assert_return(() => invoke($32, `checkRange`, [43306, 43363, 76]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5411 +assert_return(() => invoke($32, `checkRange`, [43363, 43387, 57]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5413 +assert_return(() => invoke($32, `checkRange`, [43387, 43438, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5415 +assert_return(() => invoke($32, `checkRange`, [43438, 43447, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5417 +assert_return(() => invoke($32, `checkRange`, [43447, 43466, 41]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5419 +assert_return(() => invoke($32, `checkRange`, [43466, 44129, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5421 +assert_return(() => invoke($32, `checkRange`, [44129, 44958, 96]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5423 +assert_return(() => invoke($32, `checkRange`, [44958, 45570, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5425 +assert_return(() => invoke($32, `checkRange`, [45570, 45575, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5427 +assert_return(() => invoke($32, `checkRange`, [45575, 45640, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5429 +assert_return(() => invoke($32, `checkRange`, [45640, 45742, 42]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5431 +assert_return(() => invoke($32, `checkRange`, [45742, 45832, 72]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5433 +assert_return(() => invoke($32, `checkRange`, [45832, 45999, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5435 +assert_return(() => invoke($32, `checkRange`, [45999, 46384, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5437 +assert_return(() => invoke($32, `checkRange`, [46384, 46596, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5439 +assert_return(() => invoke($32, `checkRange`, [46596, 46654, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5441 +assert_return(() => invoke($32, `checkRange`, [46654, 47515, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5443 +assert_return(() => invoke($32, `checkRange`, [47515, 47620, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5445 +assert_return(() => invoke($32, `checkRange`, [47620, 47817, 79]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5447 +assert_return(() => invoke($32, `checkRange`, [47817, 47951, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5449 +assert_return(() => invoke($32, `checkRange`, [47951, 48632, 100]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5451 +assert_return(() => invoke($32, `checkRange`, [48632, 48699, 97]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5453 +assert_return(() => invoke($32, `checkRange`, [48699, 48703, 37]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5455 +assert_return(() => invoke($32, `checkRange`, [48703, 49764, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5457 +assert_return(() => invoke($32, `checkRange`, [49764, 49955, 42]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5459 +assert_return(() => invoke($32, `checkRange`, [49955, 50012, 76]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5461 +assert_return(() => invoke($32, `checkRange`, [50012, 50036, 57]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5463 +assert_return(() => invoke($32, `checkRange`, [50036, 50087, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5465 +assert_return(() => invoke($32, `checkRange`, [50087, 50096, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5467 +assert_return(() => invoke($32, `checkRange`, [50096, 50115, 41]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5469 +assert_return(() => invoke($32, `checkRange`, [50115, 50370, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5471 +assert_return(() => invoke($32, `checkRange`, [50370, 51358, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5473 +assert_return(() => invoke($32, `checkRange`, [51358, 51610, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5475 +assert_return(() => invoke($32, `checkRange`, [51610, 51776, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5477 +assert_return(() => invoke($32, `checkRange`, [51776, 51833, 89]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5479 +assert_return(() => invoke($32, `checkRange`, [51833, 52895, 100]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5481 +assert_return(() => invoke($32, `checkRange`, [52895, 53029, 97]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5483 +assert_return(() => invoke($32, `checkRange`, [53029, 53244, 68]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5485 +assert_return(() => invoke($32, `checkRange`, [53244, 54066, 100]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5487 +assert_return(() => invoke($32, `checkRange`, [54066, 54133, 97]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5489 +assert_return(() => invoke($32, `checkRange`, [54133, 54137, 37]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5491 +assert_return(() => invoke($32, `checkRange`, [54137, 55198, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5493 +assert_return(() => invoke($32, `checkRange`, [55198, 55389, 42]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5495 +assert_return(() => invoke($32, `checkRange`, [55389, 55446, 76]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5497 +assert_return(() => invoke($32, `checkRange`, [55446, 55470, 57]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5499 +assert_return(() => invoke($32, `checkRange`, [55470, 55521, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5501 +assert_return(() => invoke($32, `checkRange`, [55521, 55530, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5503 +assert_return(() => invoke($32, `checkRange`, [55530, 55549, 41]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5505 +assert_return(() => invoke($32, `checkRange`, [55549, 56212, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5507 +assert_return(() => invoke($32, `checkRange`, [56212, 57048, 96]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5509 +assert_return(() => invoke($32, `checkRange`, [57048, 58183, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5511 +assert_return(() => invoke($32, `checkRange`, [58183, 58202, 41]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5513 +assert_return(() => invoke($32, `checkRange`, [58202, 58516, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5515 +assert_return(() => invoke($32, `checkRange`, [58516, 58835, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5517 +assert_return(() => invoke($32, `checkRange`, [58835, 58855, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5519 +assert_return(() => invoke($32, `checkRange`, [58855, 59089, 95]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5521 +assert_return(() => invoke($32, `checkRange`, [59089, 59145, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5523 +assert_return(() => invoke($32, `checkRange`, [59145, 59677, 99]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5525 +assert_return(() => invoke($32, `checkRange`, [59677, 60134, 0]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5527 +assert_return(() => invoke($32, `checkRange`, [60134, 60502, 89]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5529 +assert_return(() => invoke($32, `checkRange`, [60502, 60594, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5531 +assert_return(() => invoke($32, `checkRange`, [60594, 60617, 36]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5533 +assert_return(() => invoke($32, `checkRange`, [60617, 60618, 32]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5535 +assert_return(() => invoke($32, `checkRange`, [60618, 60777, 42]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5537 +assert_return(() => invoke($32, `checkRange`, [60777, 60834, 76]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5539 +assert_return(() => invoke($32, `checkRange`, [60834, 60858, 57]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5541 +assert_return(() => invoke($32, `checkRange`, [60858, 60909, 59]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5543 +assert_return(() => invoke($32, `checkRange`, [60909, 60918, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5545 +assert_return(() => invoke($32, `checkRange`, [60918, 60937, 41]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5547 +assert_return(() => invoke($32, `checkRange`, [60937, 61600, 83]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5549 +assert_return(() => invoke($32, `checkRange`, [61600, 62436, 96]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5551 +assert_return(() => invoke($32, `checkRange`, [62436, 63307, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5553 +assert_return(() => invoke($32, `checkRange`, [63307, 63397, 100]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5555 +assert_return(() => invoke($32, `checkRange`, [63397, 63501, 74]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5557 +assert_return(() => invoke($32, `checkRange`, [63501, 63525, 93]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5559 +assert_return(() => invoke($32, `checkRange`, [63525, 63605, 74]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5561 +assert_return(() => invoke($32, `checkRange`, [63605, 63704, 100]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5563 +assert_return(() => invoke($32, `checkRange`, [63704, 63771, 97]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5565 +assert_return(() => invoke($32, `checkRange`, [63771, 63775, 37]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5567 +assert_return(() => invoke($32, `checkRange`, [63775, 64311, 77]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5569 +assert_return(() => invoke($32, `checkRange`, [64311, 64331, 26]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5571 +assert_return(() => invoke($32, `checkRange`, [64331, 64518, 92]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5573 +assert_return(() => invoke($32, `checkRange`, [64518, 64827, 11]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5575 +assert_return(() => invoke($32, `checkRange`, [64827, 64834, 26]), [value("i32", -1)]); + +// ./test/core/memory_copy.wast:5577 +assert_return(() => invoke($32, `checkRange`, [64834, 65536, 0]), [value("i32", -1)]); diff --git a/js/src/jit-test/tests/wasm/spec/spec/memory_fill.wast.js b/js/src/jit-test/tests/wasm/spec/spec/memory_fill.wast.js new file mode 100644 index 0000000000..f0a122fc66 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/memory_fill.wast.js @@ -0,0 +1,865 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory_fill.wast + +// ./test/core/memory_fill.wast:6 +let $0 = instantiate(`(module + (memory 1 1) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "test") + (memory.fill (i32.const 0xFF00) (i32.const 0x55) (i32.const 256))))`); + +// ./test/core/memory_fill.wast:22 +invoke($0, `test`, []); + +// ./test/core/memory_fill.wast:24 +assert_return(() => invoke($0, `checkRange`, [0, 65280, 0]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:26 +assert_return(() => invoke($0, `checkRange`, [65280, 65536, 85]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:28 +let $1 = instantiate(`(module + (memory 1 1) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "test") + (memory.fill (i32.const 0xFF00) (i32.const 0x55) (i32.const 257))))`); + +// ./test/core/memory_fill.wast:44 +assert_trap(() => invoke($1, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_fill.wast:46 +let $2 = instantiate(`(module + (memory 1 1) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "test") + (memory.fill (i32.const 0xFFFFFF00) (i32.const 0x55) (i32.const 257))))`); + +// ./test/core/memory_fill.wast:62 +assert_trap(() => invoke($2, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_fill.wast:64 +let $3 = instantiate(`(module + (memory 1 1) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "test") + (memory.fill (i32.const 0x12) (i32.const 0x55) (i32.const 0))))`); + +// ./test/core/memory_fill.wast:80 +invoke($3, `test`, []); + +// ./test/core/memory_fill.wast:82 +assert_return(() => invoke($3, `checkRange`, [0, 65536, 0]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:84 +let $4 = instantiate(`(module + (memory 1 1) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "test") + (memory.fill (i32.const 0x10000) (i32.const 0x55) (i32.const 0))))`); + +// ./test/core/memory_fill.wast:100 +invoke($4, `test`, []); + +// ./test/core/memory_fill.wast:102 +let $5 = instantiate(`(module + (memory 1 1) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "test") + (memory.fill (i32.const 0x20000) (i32.const 0x55) (i32.const 0))))`); + +// ./test/core/memory_fill.wast:118 +assert_trap(() => invoke($5, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_fill.wast:120 +let $6 = instantiate(`(module + (memory 1 1) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "test") + (memory.fill (i32.const 0x1) (i32.const 0xAA) (i32.const 0xFFFE))))`); + +// ./test/core/memory_fill.wast:136 +invoke($6, `test`, []); + +// ./test/core/memory_fill.wast:138 +assert_return(() => invoke($6, `checkRange`, [0, 1, 0]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:140 +assert_return(() => invoke($6, `checkRange`, [1, 65535, 170]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:142 +assert_return(() => invoke($6, `checkRange`, [65535, 65536, 0]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:145 +let $7 = instantiate(`(module + (memory 1 1) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "test") + (memory.fill (i32.const 0x12) (i32.const 0x55) (i32.const 10)) + (memory.fill (i32.const 0x15) (i32.const 0xAA) (i32.const 4))))`); + +// ./test/core/memory_fill.wast:162 +invoke($7, `test`, []); + +// ./test/core/memory_fill.wast:164 +assert_return(() => invoke($7, `checkRange`, [0, 18, 0]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:166 +assert_return(() => invoke($7, `checkRange`, [18, 21, 85]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:168 +assert_return(() => invoke($7, `checkRange`, [21, 25, 170]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:170 +assert_return(() => invoke($7, `checkRange`, [25, 28, 85]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:172 +assert_return(() => invoke($7, `checkRange`, [28, 65536, 0]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:174 +assert_invalid( + () => instantiate(`(module + (func (export "testfn") + (memory.fill (i32.const 10) (i32.const 20) (i32.const 30))))`), + `unknown memory 0`, +); + +// ./test/core/memory_fill.wast:180 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (i32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:187 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (i32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:194 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (i32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:201 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (f32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:208 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (f32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:215 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (f32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:222 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (f32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:229 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (i64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:236 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (i64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:243 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (i64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:250 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (i64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:257 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (f64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:264 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (f64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:271 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (f64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:278 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i32.const 10) (f64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:285 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (i32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:292 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (i32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:299 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (i32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:306 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (i32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:313 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (f32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:320 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (f32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:327 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (f32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:334 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (f32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:341 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (i64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:348 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (i64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:355 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (i64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:362 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (i64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:369 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (f64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:376 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (f64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:383 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (f64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:390 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f32.const 10) (f64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:397 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (i32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:404 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (i32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:411 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (i32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:418 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (i32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:425 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (f32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:432 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (f32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:439 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (f32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:446 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (f32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:453 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (i64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:460 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (i64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:467 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (i64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:474 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (i64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:481 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (f64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:488 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (f64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:495 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (f64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:502 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (i64.const 10) (f64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:509 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (i32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:516 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (i32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:523 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (i32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:530 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (i32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:537 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (f32.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:544 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (f32.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:551 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (f32.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:558 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (f32.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:565 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (i64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:572 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (i64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:579 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (i64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:586 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (i64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:593 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (f64.const 20) (i32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:600 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (f64.const 20) (f32.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:607 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (f64.const 20) (i64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:614 +assert_invalid( + () => instantiate(`(module + (memory 1 1) + (func (export "testfn") + (memory.fill (f64.const 10) (f64.const 20) (f64.const 30))))`), + `type mismatch`, +); + +// ./test/core/memory_fill.wast:621 +let $8 = instantiate(`(module + (memory 1 1 ) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "run") (param $$offs i32) (param $$val i32) (param $$len i32) + (memory.fill (local.get $$offs) (local.get $$val) (local.get $$len))))`); + +// ./test/core/memory_fill.wast:638 +assert_trap(() => invoke($8, `run`, [65280, 37, 512]), `out of bounds memory access`); + +// ./test/core/memory_fill.wast:641 +assert_return(() => invoke($8, `checkRange`, [0, 1, 0]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:643 +let $9 = instantiate(`(module + (memory 1 1 ) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "run") (param $$offs i32) (param $$val i32) (param $$len i32) + (memory.fill (local.get $$offs) (local.get $$val) (local.get $$len))))`); + +// ./test/core/memory_fill.wast:660 +assert_trap(() => invoke($9, `run`, [65279, 37, 514]), `out of bounds memory access`); + +// ./test/core/memory_fill.wast:663 +assert_return(() => invoke($9, `checkRange`, [0, 1, 0]), [value("i32", -1)]); + +// ./test/core/memory_fill.wast:665 +let $10 = instantiate(`(module + (memory 1 1 ) + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "run") (param $$offs i32) (param $$val i32) (param $$len i32) + (memory.fill (local.get $$offs) (local.get $$val) (local.get $$len))))`); + +// ./test/core/memory_fill.wast:682 +assert_trap(() => invoke($10, `run`, [65279, 37, -1]), `out of bounds memory access`); + +// ./test/core/memory_fill.wast:685 +assert_return(() => invoke($10, `checkRange`, [0, 1, 0]), [value("i32", -1)]); diff --git a/js/src/jit-test/tests/wasm/spec/spec/memory_grow.wast.js b/js/src/jit-test/tests/wasm/spec/spec/memory_grow.wast.js new file mode 100644 index 0000000000..fafa7007f4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/memory_grow.wast.js @@ -0,0 +1,555 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory_grow.wast + +// ./test/core/memory_grow.wast:1 +let $0 = instantiate(`(module + (memory 0) + + (func (export "load_at_zero") (result i32) (i32.load (i32.const 0))) + (func (export "store_at_zero") (i32.store (i32.const 0) (i32.const 2))) + + (func (export "load_at_page_size") (result i32) (i32.load (i32.const 0x10000))) + (func (export "store_at_page_size") (i32.store (i32.const 0x10000) (i32.const 3))) + + (func (export "grow") (param $$sz i32) (result i32) (memory.grow (local.get $$sz))) + (func (export "size") (result i32) (memory.size)) +)`); + +// ./test/core/memory_grow.wast:14 +assert_return(() => invoke($0, `size`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:15 +assert_trap(() => invoke($0, `store_at_zero`, []), `out of bounds memory access`); + +// ./test/core/memory_grow.wast:16 +assert_trap(() => invoke($0, `load_at_zero`, []), `out of bounds memory access`); + +// ./test/core/memory_grow.wast:17 +assert_trap(() => invoke($0, `store_at_page_size`, []), `out of bounds memory access`); + +// ./test/core/memory_grow.wast:18 +assert_trap(() => invoke($0, `load_at_page_size`, []), `out of bounds memory access`); + +// ./test/core/memory_grow.wast:19 +assert_return(() => invoke($0, `grow`, [1]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:20 +assert_return(() => invoke($0, `size`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:21 +assert_return(() => invoke($0, `load_at_zero`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:22 +assert_return(() => invoke($0, `store_at_zero`, []), []); + +// ./test/core/memory_grow.wast:23 +assert_return(() => invoke($0, `load_at_zero`, []), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:24 +assert_trap(() => invoke($0, `store_at_page_size`, []), `out of bounds memory access`); + +// ./test/core/memory_grow.wast:25 +assert_trap(() => invoke($0, `load_at_page_size`, []), `out of bounds memory access`); + +// ./test/core/memory_grow.wast:26 +assert_return(() => invoke($0, `grow`, [4]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:27 +assert_return(() => invoke($0, `size`, []), [value("i32", 5)]); + +// ./test/core/memory_grow.wast:28 +assert_return(() => invoke($0, `load_at_zero`, []), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:29 +assert_return(() => invoke($0, `store_at_zero`, []), []); + +// ./test/core/memory_grow.wast:30 +assert_return(() => invoke($0, `load_at_zero`, []), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:31 +assert_return(() => invoke($0, `load_at_page_size`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:32 +assert_return(() => invoke($0, `store_at_page_size`, []), []); + +// ./test/core/memory_grow.wast:33 +assert_return(() => invoke($0, `load_at_page_size`, []), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:36 +let $1 = instantiate(`(module + (memory 0) + (func (export "grow") (param i32) (result i32) (memory.grow (local.get 0))) +)`); + +// ./test/core/memory_grow.wast:41 +assert_return(() => invoke($1, `grow`, [0]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:42 +assert_return(() => invoke($1, `grow`, [1]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:43 +assert_return(() => invoke($1, `grow`, [0]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:44 +assert_return(() => invoke($1, `grow`, [2]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:45 +assert_return(() => invoke($1, `grow`, [800]), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:46 +assert_return(() => invoke($1, `grow`, [65536]), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:47 +assert_return(() => invoke($1, `grow`, [64736]), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:48 +assert_return(() => invoke($1, `grow`, [1]), [value("i32", 803)]); + +// ./test/core/memory_grow.wast:50 +let $2 = instantiate(`(module + (memory 0 10) + (func (export "grow") (param i32) (result i32) (memory.grow (local.get 0))) +)`); + +// ./test/core/memory_grow.wast:55 +assert_return(() => invoke($2, `grow`, [0]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:56 +assert_return(() => invoke($2, `grow`, [1]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:57 +assert_return(() => invoke($2, `grow`, [1]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:58 +assert_return(() => invoke($2, `grow`, [2]), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:59 +assert_return(() => invoke($2, `grow`, [6]), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:60 +assert_return(() => invoke($2, `grow`, [0]), [value("i32", 10)]); + +// ./test/core/memory_grow.wast:61 +assert_return(() => invoke($2, `grow`, [1]), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:62 +assert_return(() => invoke($2, `grow`, [65536]), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:66 +let $3 = instantiate(`(module + (memory 1) + (func (export "grow") (param i32) (result i32) + (memory.grow (local.get 0)) + ) + (func (export "check-memory-zero") (param i32 i32) (result i32) + (local i32) + (local.set 2 (i32.const 1)) + (block + (loop + (local.set 2 (i32.load8_u (local.get 0))) + (br_if 1 (i32.ne (local.get 2) (i32.const 0))) + (br_if 1 (i32.ge_u (local.get 0) (local.get 1))) + (local.set 0 (i32.add (local.get 0) (i32.const 1))) + (br_if 0 (i32.le_u (local.get 0) (local.get 1))) + ) + ) + (local.get 2) + ) +)`); + +// ./test/core/memory_grow.wast:87 +assert_return(() => invoke($3, `check-memory-zero`, [0, 65535]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:88 +assert_return(() => invoke($3, `grow`, [1]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:89 +assert_return(() => invoke($3, `check-memory-zero`, [65536, 131071]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:90 +assert_return(() => invoke($3, `grow`, [1]), [value("i32", 2)]); + +// ./test/core/memory_grow.wast:91 +assert_return(() => invoke($3, `check-memory-zero`, [131072, 196607]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:92 +assert_return(() => invoke($3, `grow`, [1]), [value("i32", 3)]); + +// ./test/core/memory_grow.wast:93 +assert_return(() => invoke($3, `check-memory-zero`, [196608, 262143]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:94 +assert_return(() => invoke($3, `grow`, [1]), [value("i32", 4)]); + +// ./test/core/memory_grow.wast:95 +assert_return(() => invoke($3, `check-memory-zero`, [262144, 327679]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:96 +assert_return(() => invoke($3, `grow`, [1]), [value("i32", 5)]); + +// ./test/core/memory_grow.wast:97 +assert_return(() => invoke($3, `check-memory-zero`, [327680, 393215]), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:101 +let $4 = instantiate(`(module + (memory 1) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (memory.grow (i32.const 0)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (memory.grow (i32.const 0)))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (memory.grow (i32.const 0)) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 6) (memory.grow (i32.const 0)))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (memory.grow (i32.const 0)))) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (memory.grow (i32.const 0)) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 6) (memory.grow (i32.const 0))) (i32.const 7) + ) + ) + + (func (export "as-return-value") (result i32) + (return (memory.grow (i32.const 0))) + ) + + (func (export "as-if-cond") (result i32) + (if (result i32) (memory.grow (i32.const 0)) + (then (i32.const 0)) (else (i32.const 1)) + ) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) + (then (memory.grow (i32.const 0))) (else (i32.const 0)) + ) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 0) + (then (i32.const 0)) (else (memory.grow (i32.const 0))) + ) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (select (memory.grow (i32.const 0)) (local.get 0) (local.get 1)) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (select (local.get 0) (memory.grow (i32.const 0)) (local.get 1)) + ) + (func (export "as-select-cond") (result i32) + (select (i32.const 0) (i32.const 1) (memory.grow (i32.const 0))) + ) + + (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (call $$f (memory.grow (i32.const 0)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call-mid") (result i32) + (call $$f (i32.const 1) (memory.grow (i32.const 0)) (i32.const 3)) + ) + (func (export "as-call-last") (result i32) + (call $$f (i32.const 1) (i32.const 2) (memory.grow (i32.const 0))) + ) + + (type $$sig (func (param i32 i32 i32) (result i32))) + (table funcref (elem $$f)) + (func (export "as-call_indirect-first") (result i32) + (call_indirect (type $$sig) + (memory.grow (i32.const 0)) (i32.const 2) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (memory.grow (i32.const 0)) (i32.const 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (memory.grow (i32.const 0)) (i32.const 0) + ) + ) + (func (export "as-call_indirect-index") (result i32) + (call_indirect (type $$sig) + (i32.const 1) (i32.const 2) (i32.const 3) (memory.grow (i32.const 0)) + ) + ) + + (func (export "as-local.set-value") (local i32) + (local.set 0 (memory.grow (i32.const 0))) + ) + (func (export "as-local.tee-value") (result i32) (local i32) + (local.tee 0 (memory.grow (i32.const 0))) + ) + (global $$g (mut i32) (i32.const 0)) + (func (export "as-global.set-value") (local i32) + (global.set $$g (memory.grow (i32.const 0))) + ) + + (func (export "as-load-address") (result i32) + (i32.load (memory.grow (i32.const 0))) + ) + (func (export "as-loadN-address") (result i32) + (i32.load8_s (memory.grow (i32.const 0))) + ) + + (func (export "as-store-address") + (i32.store (memory.grow (i32.const 0)) (i32.const 7)) + ) + (func (export "as-store-value") + (i32.store (i32.const 2) (memory.grow (i32.const 0))) + ) + + (func (export "as-storeN-address") + (i32.store8 (memory.grow (i32.const 0)) (i32.const 7)) + ) + (func (export "as-storeN-value") + (i32.store16 (i32.const 2) (memory.grow (i32.const 0))) + ) + + (func (export "as-unary-operand") (result i32) + (i32.clz (memory.grow (i32.const 0))) + ) + + (func (export "as-binary-left") (result i32) + (i32.add (memory.grow (i32.const 0)) (i32.const 10)) + ) + (func (export "as-binary-right") (result i32) + (i32.sub (i32.const 10) (memory.grow (i32.const 0))) + ) + + (func (export "as-test-operand") (result i32) + (i32.eqz (memory.grow (i32.const 0))) + ) + + (func (export "as-compare-left") (result i32) + (i32.le_s (memory.grow (i32.const 0)) (i32.const 10)) + ) + (func (export "as-compare-right") (result i32) + (i32.ne (i32.const 10) (memory.grow (i32.const 0))) + ) + + (func (export "as-memory.grow-size") (result i32) + (memory.grow (memory.grow (i32.const 0))) + ) +)`); + +// ./test/core/memory_grow.wast:259 +assert_return(() => invoke($4, `as-br-value`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:261 +assert_return(() => invoke($4, `as-br_if-cond`, []), []); + +// ./test/core/memory_grow.wast:262 +assert_return(() => invoke($4, `as-br_if-value`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:263 +assert_return(() => invoke($4, `as-br_if-value-cond`, []), [value("i32", 6)]); + +// ./test/core/memory_grow.wast:265 +assert_return(() => invoke($4, `as-br_table-index`, []), []); + +// ./test/core/memory_grow.wast:266 +assert_return(() => invoke($4, `as-br_table-value`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:267 +assert_return(() => invoke($4, `as-br_table-value-index`, []), [value("i32", 6)]); + +// ./test/core/memory_grow.wast:269 +assert_return(() => invoke($4, `as-return-value`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:271 +assert_return(() => invoke($4, `as-if-cond`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:272 +assert_return(() => invoke($4, `as-if-then`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:273 +assert_return(() => invoke($4, `as-if-else`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:275 +assert_return(() => invoke($4, `as-select-first`, [0, 1]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:276 +assert_return(() => invoke($4, `as-select-second`, [0, 0]), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:277 +assert_return(() => invoke($4, `as-select-cond`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:279 +assert_return(() => invoke($4, `as-call-first`, []), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:280 +assert_return(() => invoke($4, `as-call-mid`, []), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:281 +assert_return(() => invoke($4, `as-call-last`, []), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:283 +assert_return(() => invoke($4, `as-call_indirect-first`, []), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:284 +assert_return(() => invoke($4, `as-call_indirect-mid`, []), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:285 +assert_return(() => invoke($4, `as-call_indirect-last`, []), [value("i32", -1)]); + +// ./test/core/memory_grow.wast:286 +assert_trap(() => invoke($4, `as-call_indirect-index`, []), `undefined element`); + +// ./test/core/memory_grow.wast:288 +assert_return(() => invoke($4, `as-local.set-value`, []), []); + +// ./test/core/memory_grow.wast:289 +assert_return(() => invoke($4, `as-local.tee-value`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:290 +assert_return(() => invoke($4, `as-global.set-value`, []), []); + +// ./test/core/memory_grow.wast:292 +assert_return(() => invoke($4, `as-load-address`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:293 +assert_return(() => invoke($4, `as-loadN-address`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:294 +assert_return(() => invoke($4, `as-store-address`, []), []); + +// ./test/core/memory_grow.wast:295 +assert_return(() => invoke($4, `as-store-value`, []), []); + +// ./test/core/memory_grow.wast:296 +assert_return(() => invoke($4, `as-storeN-address`, []), []); + +// ./test/core/memory_grow.wast:297 +assert_return(() => invoke($4, `as-storeN-value`, []), []); + +// ./test/core/memory_grow.wast:299 +assert_return(() => invoke($4, `as-unary-operand`, []), [value("i32", 31)]); + +// ./test/core/memory_grow.wast:301 +assert_return(() => invoke($4, `as-binary-left`, []), [value("i32", 11)]); + +// ./test/core/memory_grow.wast:302 +assert_return(() => invoke($4, `as-binary-right`, []), [value("i32", 9)]); + +// ./test/core/memory_grow.wast:304 +assert_return(() => invoke($4, `as-test-operand`, []), [value("i32", 0)]); + +// ./test/core/memory_grow.wast:306 +assert_return(() => invoke($4, `as-compare-left`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:307 +assert_return(() => invoke($4, `as-compare-right`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:309 +assert_return(() => invoke($4, `as-memory.grow-size`, []), [value("i32", 1)]); + +// ./test/core/memory_grow.wast:312 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-size-empty-vs-i32 (result i32) + (memory.grow) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:321 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-size-empty-vs-i32-in-block (result i32) + (i32.const 0) + (block (result i32) (memory.grow)) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:331 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-size-empty-vs-i32-in-loop (result i32) + (i32.const 0) + (loop (result i32) (memory.grow)) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:341 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-size-empty-vs-i32-in-then (result i32) + (i32.const 0) (i32.const 0) + (if (result i32) (then (memory.grow))) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:352 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-size-f32-vs-i32 (result i32) + (memory.grow (f32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:362 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-result-i32-vs-empty + (memory.grow (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_grow.wast:371 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-result-i32-vs-f32 (result f32) + (memory.grow (i32.const 0)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/memory_init.wast.js b/js/src/jit-test/tests/wasm/spec/spec/memory_init.wast.js new file mode 100644 index 0000000000..9885c42f81 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/memory_init.wast.js @@ -0,0 +1,1409 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory_init.wast + +// ./test/core/memory_init.wast:6 +let $0 = instantiate(`(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\\03\\01\\04\\01") + (data "\\02\\07\\01\\08") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (data "\\05\\09\\02\\07\\06") + (func (export "test") + (nop)) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_init.wast:17 +invoke($0, `test`, []); + +// ./test/core/memory_init.wast:19 +assert_return(() => invoke($0, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:20 +assert_return(() => invoke($0, `load8_u`, [1]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:21 +assert_return(() => invoke($0, `load8_u`, [2]), [value("i32", 3)]); + +// ./test/core/memory_init.wast:22 +assert_return(() => invoke($0, `load8_u`, [3]), [value("i32", 1)]); + +// ./test/core/memory_init.wast:23 +assert_return(() => invoke($0, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_init.wast:24 +assert_return(() => invoke($0, `load8_u`, [5]), [value("i32", 1)]); + +// ./test/core/memory_init.wast:25 +assert_return(() => invoke($0, `load8_u`, [6]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:26 +assert_return(() => invoke($0, `load8_u`, [7]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:27 +assert_return(() => invoke($0, `load8_u`, [8]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:28 +assert_return(() => invoke($0, `load8_u`, [9]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:29 +assert_return(() => invoke($0, `load8_u`, [10]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:30 +assert_return(() => invoke($0, `load8_u`, [11]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:31 +assert_return(() => invoke($0, `load8_u`, [12]), [value("i32", 7)]); + +// ./test/core/memory_init.wast:32 +assert_return(() => invoke($0, `load8_u`, [13]), [value("i32", 5)]); + +// ./test/core/memory_init.wast:33 +assert_return(() => invoke($0, `load8_u`, [14]), [value("i32", 2)]); + +// ./test/core/memory_init.wast:34 +assert_return(() => invoke($0, `load8_u`, [15]), [value("i32", 3)]); + +// ./test/core/memory_init.wast:35 +assert_return(() => invoke($0, `load8_u`, [16]), [value("i32", 6)]); + +// ./test/core/memory_init.wast:36 +assert_return(() => invoke($0, `load8_u`, [17]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:37 +assert_return(() => invoke($0, `load8_u`, [18]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:38 +assert_return(() => invoke($0, `load8_u`, [19]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:39 +assert_return(() => invoke($0, `load8_u`, [20]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:40 +assert_return(() => invoke($0, `load8_u`, [21]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:41 +assert_return(() => invoke($0, `load8_u`, [22]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:42 +assert_return(() => invoke($0, `load8_u`, [23]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:43 +assert_return(() => invoke($0, `load8_u`, [24]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:44 +assert_return(() => invoke($0, `load8_u`, [25]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:45 +assert_return(() => invoke($0, `load8_u`, [26]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:46 +assert_return(() => invoke($0, `load8_u`, [27]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:47 +assert_return(() => invoke($0, `load8_u`, [28]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:48 +assert_return(() => invoke($0, `load8_u`, [29]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:50 +let $1 = instantiate(`(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\\03\\01\\04\\01") + (data "\\02\\07\\01\\08") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (data "\\05\\09\\02\\07\\06") + (func (export "test") + (memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_init.wast:61 +invoke($1, `test`, []); + +// ./test/core/memory_init.wast:63 +assert_return(() => invoke($1, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:64 +assert_return(() => invoke($1, `load8_u`, [1]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:65 +assert_return(() => invoke($1, `load8_u`, [2]), [value("i32", 3)]); + +// ./test/core/memory_init.wast:66 +assert_return(() => invoke($1, `load8_u`, [3]), [value("i32", 1)]); + +// ./test/core/memory_init.wast:67 +assert_return(() => invoke($1, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_init.wast:68 +assert_return(() => invoke($1, `load8_u`, [5]), [value("i32", 1)]); + +// ./test/core/memory_init.wast:69 +assert_return(() => invoke($1, `load8_u`, [6]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:70 +assert_return(() => invoke($1, `load8_u`, [7]), [value("i32", 2)]); + +// ./test/core/memory_init.wast:71 +assert_return(() => invoke($1, `load8_u`, [8]), [value("i32", 7)]); + +// ./test/core/memory_init.wast:72 +assert_return(() => invoke($1, `load8_u`, [9]), [value("i32", 1)]); + +// ./test/core/memory_init.wast:73 +assert_return(() => invoke($1, `load8_u`, [10]), [value("i32", 8)]); + +// ./test/core/memory_init.wast:74 +assert_return(() => invoke($1, `load8_u`, [11]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:75 +assert_return(() => invoke($1, `load8_u`, [12]), [value("i32", 7)]); + +// ./test/core/memory_init.wast:76 +assert_return(() => invoke($1, `load8_u`, [13]), [value("i32", 5)]); + +// ./test/core/memory_init.wast:77 +assert_return(() => invoke($1, `load8_u`, [14]), [value("i32", 2)]); + +// ./test/core/memory_init.wast:78 +assert_return(() => invoke($1, `load8_u`, [15]), [value("i32", 3)]); + +// ./test/core/memory_init.wast:79 +assert_return(() => invoke($1, `load8_u`, [16]), [value("i32", 6)]); + +// ./test/core/memory_init.wast:80 +assert_return(() => invoke($1, `load8_u`, [17]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:81 +assert_return(() => invoke($1, `load8_u`, [18]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:82 +assert_return(() => invoke($1, `load8_u`, [19]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:83 +assert_return(() => invoke($1, `load8_u`, [20]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:84 +assert_return(() => invoke($1, `load8_u`, [21]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:85 +assert_return(() => invoke($1, `load8_u`, [22]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:86 +assert_return(() => invoke($1, `load8_u`, [23]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:87 +assert_return(() => invoke($1, `load8_u`, [24]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:88 +assert_return(() => invoke($1, `load8_u`, [25]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:89 +assert_return(() => invoke($1, `load8_u`, [26]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:90 +assert_return(() => invoke($1, `load8_u`, [27]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:91 +assert_return(() => invoke($1, `load8_u`, [28]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:92 +assert_return(() => invoke($1, `load8_u`, [29]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:94 +let $2 = instantiate(`(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\\03\\01\\04\\01") + (data "\\02\\07\\01\\08") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (data "\\05\\09\\02\\07\\06") + (func (export "test") + (memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_init.wast:105 +invoke($2, `test`, []); + +// ./test/core/memory_init.wast:107 +assert_return(() => invoke($2, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:108 +assert_return(() => invoke($2, `load8_u`, [1]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:109 +assert_return(() => invoke($2, `load8_u`, [2]), [value("i32", 3)]); + +// ./test/core/memory_init.wast:110 +assert_return(() => invoke($2, `load8_u`, [3]), [value("i32", 1)]); + +// ./test/core/memory_init.wast:111 +assert_return(() => invoke($2, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_init.wast:112 +assert_return(() => invoke($2, `load8_u`, [5]), [value("i32", 1)]); + +// ./test/core/memory_init.wast:113 +assert_return(() => invoke($2, `load8_u`, [6]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:114 +assert_return(() => invoke($2, `load8_u`, [7]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:115 +assert_return(() => invoke($2, `load8_u`, [8]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:116 +assert_return(() => invoke($2, `load8_u`, [9]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:117 +assert_return(() => invoke($2, `load8_u`, [10]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:118 +assert_return(() => invoke($2, `load8_u`, [11]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:119 +assert_return(() => invoke($2, `load8_u`, [12]), [value("i32", 7)]); + +// ./test/core/memory_init.wast:120 +assert_return(() => invoke($2, `load8_u`, [13]), [value("i32", 5)]); + +// ./test/core/memory_init.wast:121 +assert_return(() => invoke($2, `load8_u`, [14]), [value("i32", 2)]); + +// ./test/core/memory_init.wast:122 +assert_return(() => invoke($2, `load8_u`, [15]), [value("i32", 9)]); + +// ./test/core/memory_init.wast:123 +assert_return(() => invoke($2, `load8_u`, [16]), [value("i32", 2)]); + +// ./test/core/memory_init.wast:124 +assert_return(() => invoke($2, `load8_u`, [17]), [value("i32", 7)]); + +// ./test/core/memory_init.wast:125 +assert_return(() => invoke($2, `load8_u`, [18]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:126 +assert_return(() => invoke($2, `load8_u`, [19]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:127 +assert_return(() => invoke($2, `load8_u`, [20]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:128 +assert_return(() => invoke($2, `load8_u`, [21]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:129 +assert_return(() => invoke($2, `load8_u`, [22]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:130 +assert_return(() => invoke($2, `load8_u`, [23]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:131 +assert_return(() => invoke($2, `load8_u`, [24]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:132 +assert_return(() => invoke($2, `load8_u`, [25]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:133 +assert_return(() => invoke($2, `load8_u`, [26]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:134 +assert_return(() => invoke($2, `load8_u`, [27]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:135 +assert_return(() => invoke($2, `load8_u`, [28]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:136 +assert_return(() => invoke($2, `load8_u`, [29]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:138 +let $3 = instantiate(`(module + (memory (export "memory0") 1 1) + (data (i32.const 2) "\\03\\01\\04\\01") + (data "\\02\\07\\01\\08") + (data (i32.const 12) "\\07\\05\\02\\03\\06") + (data "\\05\\09\\02\\07\\06") + (func (export "test") + (memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4)) + (data.drop 1) + (memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3)) + (data.drop 3) + (memory.copy (i32.const 20) (i32.const 15) (i32.const 5)) + (memory.copy (i32.const 21) (i32.const 29) (i32.const 1)) + (memory.copy (i32.const 24) (i32.const 10) (i32.const 1)) + (memory.copy (i32.const 13) (i32.const 11) (i32.const 4)) + (memory.copy (i32.const 19) (i32.const 20) (i32.const 5))) + (func (export "load8_u") (param i32) (result i32) + (i32.load8_u (local.get 0))))`); + +// ./test/core/memory_init.wast:157 +invoke($3, `test`, []); + +// ./test/core/memory_init.wast:159 +assert_return(() => invoke($3, `load8_u`, [0]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:160 +assert_return(() => invoke($3, `load8_u`, [1]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:161 +assert_return(() => invoke($3, `load8_u`, [2]), [value("i32", 3)]); + +// ./test/core/memory_init.wast:162 +assert_return(() => invoke($3, `load8_u`, [3]), [value("i32", 1)]); + +// ./test/core/memory_init.wast:163 +assert_return(() => invoke($3, `load8_u`, [4]), [value("i32", 4)]); + +// ./test/core/memory_init.wast:164 +assert_return(() => invoke($3, `load8_u`, [5]), [value("i32", 1)]); + +// ./test/core/memory_init.wast:165 +assert_return(() => invoke($3, `load8_u`, [6]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:166 +assert_return(() => invoke($3, `load8_u`, [7]), [value("i32", 2)]); + +// ./test/core/memory_init.wast:167 +assert_return(() => invoke($3, `load8_u`, [8]), [value("i32", 7)]); + +// ./test/core/memory_init.wast:168 +assert_return(() => invoke($3, `load8_u`, [9]), [value("i32", 1)]); + +// ./test/core/memory_init.wast:169 +assert_return(() => invoke($3, `load8_u`, [10]), [value("i32", 8)]); + +// ./test/core/memory_init.wast:170 +assert_return(() => invoke($3, `load8_u`, [11]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:171 +assert_return(() => invoke($3, `load8_u`, [12]), [value("i32", 7)]); + +// ./test/core/memory_init.wast:172 +assert_return(() => invoke($3, `load8_u`, [13]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:173 +assert_return(() => invoke($3, `load8_u`, [14]), [value("i32", 7)]); + +// ./test/core/memory_init.wast:174 +assert_return(() => invoke($3, `load8_u`, [15]), [value("i32", 5)]); + +// ./test/core/memory_init.wast:175 +assert_return(() => invoke($3, `load8_u`, [16]), [value("i32", 2)]); + +// ./test/core/memory_init.wast:176 +assert_return(() => invoke($3, `load8_u`, [17]), [value("i32", 7)]); + +// ./test/core/memory_init.wast:177 +assert_return(() => invoke($3, `load8_u`, [18]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:178 +assert_return(() => invoke($3, `load8_u`, [19]), [value("i32", 9)]); + +// ./test/core/memory_init.wast:179 +assert_return(() => invoke($3, `load8_u`, [20]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:180 +assert_return(() => invoke($3, `load8_u`, [21]), [value("i32", 7)]); + +// ./test/core/memory_init.wast:181 +assert_return(() => invoke($3, `load8_u`, [22]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:182 +assert_return(() => invoke($3, `load8_u`, [23]), [value("i32", 8)]); + +// ./test/core/memory_init.wast:183 +assert_return(() => invoke($3, `load8_u`, [24]), [value("i32", 8)]); + +// ./test/core/memory_init.wast:184 +assert_return(() => invoke($3, `load8_u`, [25]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:185 +assert_return(() => invoke($3, `load8_u`, [26]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:186 +assert_return(() => invoke($3, `load8_u`, [27]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:187 +assert_return(() => invoke($3, `load8_u`, [28]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:188 +assert_return(() => invoke($3, `load8_u`, [29]), [value("i32", 0)]); + +// ./test/core/memory_init.wast:189 +assert_invalid( + () => instantiate(`(module + (func (export "test") + (data.drop 0)))`), + `unknown data segment`, +); + +// ./test/core/memory_init.wast:195 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (data.drop 4)))`), + `unknown data segment`, +); + +// ./test/core/memory_init.wast:203 +let $4 = instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (data.drop 0) + (data.drop 0)))`); + +// ./test/core/memory_init.wast:209 +invoke($4, `test`, []); + +// ./test/core/memory_init.wast:211 +let $5 = instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (data.drop 0) + (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1))))`); + +// ./test/core/memory_init.wast:217 +assert_trap(() => invoke($5, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_init.wast:219 +let $6 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\37") + (func (export "test") + (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1))))`); + +// ./test/core/memory_init.wast:224 +assert_trap(() => invoke($6, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_init.wast:226 +assert_invalid( + () => instantiate(`(module + (func (export "test") + (memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))))`), + `unknown memory 0`, +); + +// ./test/core/memory_init.wast:232 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))))`), + `unknown data segment 1`, +); + +// ./test/core/memory_init.wast:240 +let $7 = instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1)) + (memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1))))`); + +// ./test/core/memory_init.wast:246 +invoke($7, `test`, []); + +// ./test/core/memory_init.wast:248 +let $8 = instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1234) (i32.const 0) (i32.const 5))))`); + +// ./test/core/memory_init.wast:253 +assert_trap(() => invoke($8, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_init.wast:255 +let $9 = instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1234) (i32.const 2) (i32.const 3))))`); + +// ./test/core/memory_init.wast:260 +assert_trap(() => invoke($9, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_init.wast:262 +let $10 = instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 0xFFFE) (i32.const 1) (i32.const 3))))`); + +// ./test/core/memory_init.wast:267 +assert_trap(() => invoke($10, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_init.wast:269 +let $11 = instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1234) (i32.const 4) (i32.const 0))))`); + +// ./test/core/memory_init.wast:274 +assert_trap(() => invoke($11, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_init.wast:276 +let $12 = instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 0))))`); + +// ./test/core/memory_init.wast:281 +invoke($12, `test`, []); + +// ./test/core/memory_init.wast:283 +let $13 = instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 0x10001) (i32.const 0) (i32.const 0))))`); + +// ./test/core/memory_init.wast:288 +assert_trap(() => invoke($13, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_init.wast:290 +let $14 = instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 0x10000) (i32.const 0) (i32.const 0))))`); + +// ./test/core/memory_init.wast:295 +invoke($14, `test`, []); + +// ./test/core/memory_init.wast:297 +let $15 = instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 0x10000) (i32.const 1) (i32.const 0))))`); + +// ./test/core/memory_init.wast:302 +invoke($15, `test`, []); + +// ./test/core/memory_init.wast:304 +let $16 = instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 0x10001) (i32.const 4) (i32.const 0))))`); + +// ./test/core/memory_init.wast:309 +assert_trap(() => invoke($16, `test`, []), `out of bounds memory access`); + +// ./test/core/memory_init.wast:311 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:319 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:327 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:335 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:343 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:351 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:359 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:367 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:375 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:383 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:391 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (i64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:399 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:407 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:415 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:423 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i32.const 1) (f64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:431 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:439 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:447 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:455 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:463 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:471 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:479 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:487 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:495 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:503 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:511 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:519 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (i64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:527 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:535 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:543 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:551 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f32.const 1) (f64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:559 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:567 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:575 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:583 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:591 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:599 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:607 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:615 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:623 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:631 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:639 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:647 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (i64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:655 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:663 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:671 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:679 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (i64.const 1) (f64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:687 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:695 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:703 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:711 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:719 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:727 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:735 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:743 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:751 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:759 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:767 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:775 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (i64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:783 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:791 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:799 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:807 +assert_invalid( + () => instantiate(`(module + (memory 1) + (data "\\37") + (func (export "test") + (memory.init 0 (f64.const 1) (f64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/memory_init.wast:815 +let $17 = instantiate(`(module + (memory 1 1 ) + (data "\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42") + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "run") (param $$offs i32) (param $$len i32) + (memory.init 0 (local.get $$offs) (i32.const 0) (local.get $$len))))`); + +// ./test/core/memory_init.wast:833 +assert_trap(() => invoke($17, `run`, [65528, 16]), `out of bounds memory access`); + +// ./test/core/memory_init.wast:836 +assert_return(() => invoke($17, `checkRange`, [0, 1, 0]), [value("i32", -1)]); + +// ./test/core/memory_init.wast:838 +let $18 = instantiate(`(module + (memory 1 1 ) + (data "\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42") + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "run") (param $$offs i32) (param $$len i32) + (memory.init 0 (local.get $$offs) (i32.const 0) (local.get $$len))))`); + +// ./test/core/memory_init.wast:856 +assert_trap(() => invoke($18, `run`, [65527, 16]), `out of bounds memory access`); + +// ./test/core/memory_init.wast:859 +assert_return(() => invoke($18, `checkRange`, [0, 1, 0]), [value("i32", -1)]); + +// ./test/core/memory_init.wast:861 +let $19 = instantiate(`(module + (memory 1 1 ) + (data "\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42") + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "run") (param $$offs i32) (param $$len i32) + (memory.init 0 (local.get $$offs) (i32.const 0) (local.get $$len))))`); + +// ./test/core/memory_init.wast:879 +assert_trap(() => invoke($19, `run`, [65472, 30]), `out of bounds memory access`); + +// ./test/core/memory_init.wast:882 +assert_return(() => invoke($19, `checkRange`, [0, 1, 0]), [value("i32", -1)]); + +// ./test/core/memory_init.wast:884 +let $20 = instantiate(`(module + (memory 1 1 ) + (data "\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42") + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "run") (param $$offs i32) (param $$len i32) + (memory.init 0 (local.get $$offs) (i32.const 0) (local.get $$len))))`); + +// ./test/core/memory_init.wast:902 +assert_trap(() => invoke($20, `run`, [65473, 31]), `out of bounds memory access`); + +// ./test/core/memory_init.wast:905 +assert_return(() => invoke($20, `checkRange`, [0, 1, 0]), [value("i32", -1)]); + +// ./test/core/memory_init.wast:907 +let $21 = instantiate(`(module + (memory 1 ) + (data "\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42") + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "run") (param $$offs i32) (param $$len i32) + (memory.init 0 (local.get $$offs) (i32.const 0) (local.get $$len))))`); + +// ./test/core/memory_init.wast:925 +assert_trap(() => invoke($21, `run`, [65528, -256]), `out of bounds memory access`); + +// ./test/core/memory_init.wast:928 +assert_return(() => invoke($21, `checkRange`, [0, 1, 0]), [value("i32", -1)]); + +// ./test/core/memory_init.wast:930 +let $22 = instantiate(`(module + (memory 1 ) + (data "\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42") + + (func (export "checkRange") (param $$from i32) (param $$to i32) (param $$expected i32) (result i32) + (loop $$cont + (if (i32.eq (local.get $$from) (local.get $$to)) + (then + (return (i32.const -1)))) + (if (i32.eq (i32.load8_u (local.get $$from)) (local.get $$expected)) + (then + (local.set $$from (i32.add (local.get $$from) (i32.const 1))) + (br $$cont)))) + (return (local.get $$from))) + + (func (export "run") (param $$offs i32) (param $$len i32) + (memory.init 0 (local.get $$offs) (i32.const 0) (local.get $$len))))`); + +// ./test/core/memory_init.wast:948 +assert_trap(() => invoke($22, `run`, [0, -4]), `out of bounds memory access`); + +// ./test/core/memory_init.wast:951 +assert_return(() => invoke($22, `checkRange`, [0, 1, 0]), [value("i32", -1)]); + +// ./test/core/memory_init.wast:954 +let $23 = instantiate(`(module + (memory 1) + ;; 65 data segments. 64 is the smallest positive number that is encoded + ;; differently as a signed LEB. + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") (data "") (data "") (data "") (data "") (data "") (data "") (data "") + (data "") + (func (memory.init 64 (i32.const 0) (i32.const 0) (i32.const 0))))`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/memory_redundancy.wast.js b/js/src/jit-test/tests/wasm/spec/spec/memory_redundancy.wast.js new file mode 100644 index 0000000000..cd2d894092 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/memory_redundancy.wast.js @@ -0,0 +1,95 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory_redundancy.wast + +// ./test/core/memory_redundancy.wast:5 +let $0 = instantiate(`(module + (memory 1 1) + + (func (export "zero_everything") + (i32.store (i32.const 0) (i32.const 0)) + (i32.store (i32.const 4) (i32.const 0)) + (i32.store (i32.const 8) (i32.const 0)) + (i32.store (i32.const 12) (i32.const 0)) + ) + + (func (export "test_store_to_load") (result i32) + (i32.store (i32.const 8) (i32.const 0)) + (f32.store (i32.const 5) (f32.const -0.0)) + (i32.load (i32.const 8)) + ) + + (func (export "test_redundant_load") (result i32) + (local $$t i32) + (local $$s i32) + (local.set $$t (i32.load (i32.const 8))) + (i32.store (i32.const 5) (i32.const 0x80000000)) + (local.set $$s (i32.load (i32.const 8))) + (i32.add (local.get $$t) (local.get $$s)) + ) + + (func (export "test_dead_store") (result f32) + (local $$t f32) + (i32.store (i32.const 8) (i32.const 0x23232323)) + (local.set $$t (f32.load (i32.const 11))) + (i32.store (i32.const 8) (i32.const 0)) + (local.get $$t) + ) + + ;; A function named "malloc" which implementations nonetheless shouldn't + ;; assume behaves like C malloc. + (func $$malloc (export "malloc") + (param $$size i32) + (result i32) + (i32.const 16) + ) + + ;; Call malloc twice, but unlike C malloc, we don't get non-aliasing pointers. + (func (export "malloc_aliasing") + (result i32) + (local $$x i32) + (local $$y i32) + (local.set $$x (call $$malloc (i32.const 4))) + (local.set $$y (call $$malloc (i32.const 4))) + (i32.store (local.get $$x) (i32.const 42)) + (i32.store (local.get $$y) (i32.const 43)) + (i32.load (local.get $$x)) + ) +)`); + +// ./test/core/memory_redundancy.wast:59 +assert_return(() => invoke($0, `test_store_to_load`, []), [value("i32", 128)]); + +// ./test/core/memory_redundancy.wast:60 +invoke($0, `zero_everything`, []); + +// ./test/core/memory_redundancy.wast:61 +assert_return(() => invoke($0, `test_redundant_load`, []), [value("i32", 128)]); + +// ./test/core/memory_redundancy.wast:62 +invoke($0, `zero_everything`, []); + +// ./test/core/memory_redundancy.wast:63 +assert_return( + () => invoke($0, `test_dead_store`, []), + [value("f32", 0.000000000000000000000000000000000000000000049)], +); + +// ./test/core/memory_redundancy.wast:64 +invoke($0, `zero_everything`, []); + +// ./test/core/memory_redundancy.wast:65 +assert_return(() => invoke($0, `malloc_aliasing`, []), [value("i32", 43)]); diff --git a/js/src/jit-test/tests/wasm/spec/spec/memory_size.wast.js b/js/src/jit-test/tests/wasm/spec/spec/memory_size.wast.js new file mode 100644 index 0000000000..0ce58ebddf --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/memory_size.wast.js @@ -0,0 +1,174 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/memory_size.wast + +// ./test/core/memory_size.wast:1 +let $0 = instantiate(`(module + (memory 0) + (func (export "size") (result i32) (memory.size)) + (func (export "grow") (param $$sz i32) (drop (memory.grow (local.get $$sz)))) +)`); + +// ./test/core/memory_size.wast:7 +assert_return(() => invoke($0, `size`, []), [value("i32", 0)]); + +// ./test/core/memory_size.wast:8 +assert_return(() => invoke($0, `grow`, [1]), []); + +// ./test/core/memory_size.wast:9 +assert_return(() => invoke($0, `size`, []), [value("i32", 1)]); + +// ./test/core/memory_size.wast:10 +assert_return(() => invoke($0, `grow`, [4]), []); + +// ./test/core/memory_size.wast:11 +assert_return(() => invoke($0, `size`, []), [value("i32", 5)]); + +// ./test/core/memory_size.wast:12 +assert_return(() => invoke($0, `grow`, [0]), []); + +// ./test/core/memory_size.wast:13 +assert_return(() => invoke($0, `size`, []), [value("i32", 5)]); + +// ./test/core/memory_size.wast:15 +let $1 = instantiate(`(module + (memory 1) + (func (export "size") (result i32) (memory.size)) + (func (export "grow") (param $$sz i32) (drop (memory.grow (local.get $$sz)))) +)`); + +// ./test/core/memory_size.wast:21 +assert_return(() => invoke($1, `size`, []), [value("i32", 1)]); + +// ./test/core/memory_size.wast:22 +assert_return(() => invoke($1, `grow`, [1]), []); + +// ./test/core/memory_size.wast:23 +assert_return(() => invoke($1, `size`, []), [value("i32", 2)]); + +// ./test/core/memory_size.wast:24 +assert_return(() => invoke($1, `grow`, [4]), []); + +// ./test/core/memory_size.wast:25 +assert_return(() => invoke($1, `size`, []), [value("i32", 6)]); + +// ./test/core/memory_size.wast:26 +assert_return(() => invoke($1, `grow`, [0]), []); + +// ./test/core/memory_size.wast:27 +assert_return(() => invoke($1, `size`, []), [value("i32", 6)]); + +// ./test/core/memory_size.wast:29 +let $2 = instantiate(`(module + (memory 0 2) + (func (export "size") (result i32) (memory.size)) + (func (export "grow") (param $$sz i32) (drop (memory.grow (local.get $$sz)))) +)`); + +// ./test/core/memory_size.wast:35 +assert_return(() => invoke($2, `size`, []), [value("i32", 0)]); + +// ./test/core/memory_size.wast:36 +assert_return(() => invoke($2, `grow`, [3]), []); + +// ./test/core/memory_size.wast:37 +assert_return(() => invoke($2, `size`, []), [value("i32", 0)]); + +// ./test/core/memory_size.wast:38 +assert_return(() => invoke($2, `grow`, [1]), []); + +// ./test/core/memory_size.wast:39 +assert_return(() => invoke($2, `size`, []), [value("i32", 1)]); + +// ./test/core/memory_size.wast:40 +assert_return(() => invoke($2, `grow`, [0]), []); + +// ./test/core/memory_size.wast:41 +assert_return(() => invoke($2, `size`, []), [value("i32", 1)]); + +// ./test/core/memory_size.wast:42 +assert_return(() => invoke($2, `grow`, [4]), []); + +// ./test/core/memory_size.wast:43 +assert_return(() => invoke($2, `size`, []), [value("i32", 1)]); + +// ./test/core/memory_size.wast:44 +assert_return(() => invoke($2, `grow`, [1]), []); + +// ./test/core/memory_size.wast:45 +assert_return(() => invoke($2, `size`, []), [value("i32", 2)]); + +// ./test/core/memory_size.wast:47 +let $3 = instantiate(`(module + (memory 3 8) + (func (export "size") (result i32) (memory.size)) + (func (export "grow") (param $$sz i32) (drop (memory.grow (local.get $$sz)))) +)`); + +// ./test/core/memory_size.wast:53 +assert_return(() => invoke($3, `size`, []), [value("i32", 3)]); + +// ./test/core/memory_size.wast:54 +assert_return(() => invoke($3, `grow`, [1]), []); + +// ./test/core/memory_size.wast:55 +assert_return(() => invoke($3, `size`, []), [value("i32", 4)]); + +// ./test/core/memory_size.wast:56 +assert_return(() => invoke($3, `grow`, [3]), []); + +// ./test/core/memory_size.wast:57 +assert_return(() => invoke($3, `size`, []), [value("i32", 7)]); + +// ./test/core/memory_size.wast:58 +assert_return(() => invoke($3, `grow`, [0]), []); + +// ./test/core/memory_size.wast:59 +assert_return(() => invoke($3, `size`, []), [value("i32", 7)]); + +// ./test/core/memory_size.wast:60 +assert_return(() => invoke($3, `grow`, [2]), []); + +// ./test/core/memory_size.wast:61 +assert_return(() => invoke($3, `size`, []), [value("i32", 7)]); + +// ./test/core/memory_size.wast:62 +assert_return(() => invoke($3, `grow`, [1]), []); + +// ./test/core/memory_size.wast:63 +assert_return(() => invoke($3, `size`, []), [value("i32", 8)]); + +// ./test/core/memory_size.wast:68 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-result-i32-vs-empty + (memory.size) + ) + )`), + `type mismatch`, +); + +// ./test/core/memory_size.wast:77 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-result-i32-vs-f32 (result f32) + (memory.size) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/names.wast.js b/js/src/jit-test/tests/wasm/spec/spec/names.wast.js new file mode 100644 index 0000000000..9ae7902b03 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/names.wast.js @@ -0,0 +1,2158 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/names.wast + +// ./test/core/names.wast:4 +let $0 = instantiate(`(module + (func (export "foo") (result i32) (i32.const 0)) +)`); + +// ./test/core/names.wast:8 +assert_return(() => invoke($0, `foo`, []), [value("i32", 0)]); + +// ./test/core/names.wast:12 +let $1 = instantiate(`(module + (func (export "foo") (result i32) (i32.const 1)) +)`); + +// ./test/core/names.wast:16 +assert_return(() => invoke($1, `foo`, []), [value("i32", 1)]); + +// ./test/core/names.wast:19 +let $2 = instantiate(`(module + ;; Test that we can use the empty string as a symbol. + (func (export "") (result i32) (i32.const 0)) + + ;; Test that we can use names beginning with a digit. + (func (export "0") (result i32) (i32.const 1)) + + ;; Test that we can use names beginning with a dash. + (func (export "-0") (result i32) (i32.const 2)) + + ;; Test that we can use names beginning with an underscore. + (func (export "_") (result i32) (i32.const 3)) + + ;; Test that we can use names beginning with a dollar sign. + (func (export "$$") (result i32) (i32.const 4)) + + ;; Test that we can use names beginning with an at sign. + (func (export "@") (result i32) (i32.const 5)) + + ;; Test that we can use non-alphanumeric names. + (func (export "~!@#$$%^&*()_+\`-={}|[]\\\\:\\";'<>?,./ ") (result i32) (i32.const 6)) + + ;; Test that we can use names that have special meaning in JS. + (func (export "NaN") (result i32) (i32.const 7)) + (func (export "Infinity") (result i32) (i32.const 8)) + (func (export "if") (result i32) (i32.const 9)) + + ;; Test that we can use common libc names without conflict. + (func (export "malloc") (result i32) (i32.const 10)) + + ;; Test that we can use some libc hidden names without conflict. + (func (export "_malloc") (result i32) (i32.const 11)) + (func (export "__malloc") (result i32) (i32.const 12)) + + ;; Test that names are case-sensitive. + (func (export "a") (result i32) (i32.const 13)) + (func (export "A") (result i32) (i32.const 14)) + + ;; Test that UTF-8 BOM code points can appear in identifiers. + (func (export "\u{feff}") (result i32) (i32.const 15)) + + ;; Test that Unicode normalization is not applied. These function names + ;; contain different codepoints which normalize to the same thing under + ;; NFC or NFD. + (func (export "\u{c5}") (result i32) (i32.const 16)) + (func (export "A\u{30a}") (result i32) (i32.const 17)) + (func (export "\u{212b}") (result i32) (i32.const 18)) + + ;; Test that Unicode compatibility normalization is not applied. These + ;; function names contain different codepoints which normalize to the + ;; same thing under NFKC or NFKD. + (func (export "\u{fb03}") (result i32) (i32.const 19)) + (func (export "f\u{fb01}") (result i32) (i32.const 20)) + (func (export "ffi") (result i32) (i32.const 21)) + + ;; Test the C0 control codes. + (func (export "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f") (result i32) (i32.const 22)) + (func (export "\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\1a\\1b\\1c\\1d\\1e\\1f") (result i32) (i32.const 23)) + ;; Test miscellaneous control codes. + (func (export " \\7f") (result i32) (i32.const 24)) + ;; Test the C1 control codes. + (func (export "\\c2\\80\\c2\\81\\c2\\82\\c2\\83\\c2\\84\\c2\\85\\c2\\86\\c2\\87\\c2\\88\\c2\\89\\c2\\8a\\c2\\8b\\c2\\8c\\c2\\8d\\c2\\8e\\c2\\8f") (result i32) (i32.const 25)) + (func (export "\\c2\\90\\c2\\91\\c2\\92\\c2\\93\\c2\\94\\c2\\95\\c2\\96\\c2\\97\\c2\\98\\c2\\99\\c2\\9a\\c2\\9b\\c2\\9c\\c2\\9d\\c2\\9e\\c2\\9f") (result i32) (i32.const 26)) + ;; Test the Unicode Specials. + (func (export "\\ef\\bf\\b0\\ef\\bf\\b1\\ef\\bf\\b2\\ef\\bf\\b3\\ef\\bf\\b4\\ef\\bf\\b5\\ef\\bf\\b6\\ef\\bf\\b7") (result i32) (i32.const 27)) + (func (export "\\ef\\bf\\b8\\ef\\bf\\b9\\ef\\bf\\ba\\ef\\bf\\bb\\ef\\bf\\bc\\ef\\bf\\bd\\ef\\bf\\be\\ef\\bf\\bf") (result i32) (i32.const 28)) + + ;; Test that the control pictures are distinct from the control codes they + ;; depict. These correspond to the C0 and miscellaneous control code tests + ;; above. + (func (export "\u{2400}\u{2401}\u{2402}\u{2403}\u{2404}\u{2405}\u{2406}\u{2407}\u{2408}\u{2409}\u{240a}\u{240b}\u{240c}\u{240d}\u{240e}\u{240f}") (result i32) (i32.const 29)) + (func (export "\u{2410}\u{2411}\u{2412}\u{2413}\u{2414}\u{2415}\u{2416}\u{2417}\u{2418}\u{2419}\u{241a}\u{241b}\u{241c}\u{241d}\u{241e}\u{241f}") (result i32) (i32.const 30)) + (func (export "\u{2420}\u{2421}") (result i32) (i32.const 31)) + + ;; Test the Unicode Specials in non-escaped form (excluding U+FFFE and + ;; U+FFFF, so that generic tools don't detect this file as non-UTF-8). + (func (export "\u{fff0}\u{fff1}\u{fff2}\u{fff3}\u{fff4}\u{fff5}\u{fff6}\u{fff7}\u{fff8}\u{fff9}\u{fffa}\u{fffb}\u{fffc}\u{fffd}") (result i32) (i32.const 32)) + + ;; Test a bare ZWJ code point. + (func (export "\u{200d}") (result i32) (i32.const 33)) + ;; Test a bare ZWNJ code point. + (func (export "\u{200c}") (result i32) (i32.const 34)) + + ;; Test various bare joiner code points. + (func (export "\u{34f}") (result i32) (i32.const 35)) + (func (export "\u{2060}") (result i32) (i32.const 36)) + (func (export "\u{2d7f}") (result i32) (i32.const 37)) + (func (export "\u{1107f}") (result i32) (i32.const 38)) + (func (export "\u{180e}") (result i32) (i32.const 39)) + + ;; Test various interesting code points: reverse BOM, zero-width space, + ;; no-break space, soft hyphen, word joiner, ogham space mark, + ;; right-to-left override, left-to-right override. + (func (export "\u{ffef}\u{200b}\u{a0}\u{ad}\u{2060}\u{1680}\u{202e}\u{202d}") (result i32) (i32.const 40)) + + ;; Test more interesting code points: left-to-right mark, right-to-left mark, + ;; non-breaking hyphen, line separator, paragraph separator, + ;; left-to-right embedding, right-to-left embedding, + ;; pop directional formatting, narrow no-break space, left-to-right isolate, + ;; right-to-left isolate, first strong isolate, pop directional isolate. + (func (export "\u{200e}\u{200f}\u{2011}\u{2028}\u{2029}\u{202a}\u{202b}\u{202c}\u{202f}\u{2066}\u{2067}\u{2068}\u{2069}") (result i32) (i32.const 41)) + + ;; Test some deprecated code points: inhibit symmetric swapping, + ;; activate symmetric swapping, inhibit arabic form shaping, + ;; activate arabic form shaping, national digit shapes, nominal digit shapes. + (func (export "\u{206a}\u{206b}\u{206c}\u{206d}\u{206e}\u{206f}") (result i32) (i32.const 42)) + + ;; Test "invisible" operator code points. + (func (export "\u{2061}\u{2062}\u{2063}\u{2064}") (result i32) (i32.const 43)) + + ;; Test that code points outside the BMP are supported. + (func (export "\u{10000}\u{dffff}\u{10ffff}") (result i32) (i32.const 44)) + + ;; Test that WebAssembly implementations cope in the presence of Zalgo. + (func (export "Z\u{30f}\u{346}\u{306}\u{35b}\u{34c}\u{334}\u{358}\u{35e}\u{347}\u{32b}\u{325}\u{32a}\u{353}\u{348}\u{354}\u{34e}\u{317}\u{31e}\u{33a}\u{32f}\u{331}\u{31e}\u{319}\u{331}\u{31c}\u{316}\u{320}a\u{357}\u{368}\u{30e}\u{304}\u{306}\u{357}\u{33f}\u{361}\u{35f}\u{340}\u{336}\u{341}\u{325}\u{330}\u{333}\u{32d}\u{359}\u{332}\u{331}\u{339}\u{31d}\u{34e}\u{33c}l\u{344}\u{34a}\u{31a}\u{357}\u{366}\u{344}\u{36b}\u{307}\u{341}\u{336}\u{337}\u{349}\u{329}\u{339}\u{32b}\u{31d}\u{356}\u{345}\u{319}\u{332}\u{33c}\u{347}\u{35a}\u{34d}\u{32e}\u{34e}\u{325}\u{345}\u{31e}g\u{343}\u{310}\u{305}\u{36e}\u{314}\u{310}\u{30e}\u{302}\u{30f}\u{33e}\u{34a}\u{30d}\u{34b}\u{34a}\u{367}\u{301}\u{306}\u{366}\u{35e}\u{336}\u{355}\u{354}\u{35a}\u{329}o\u{34b}\u{314}\u{350}\u{36a}\u{369}\u{321}\u{34f}\u{322}\u{327}\u{341}\u{32b}\u{319}\u{324}\u{32e}\u{356}\u{359}\u{353}\u{33a}\u{31c}\u{329}\u{33c}\u{318}\u{320}") (result i32) (i32.const 45)) + + ;; Test Hangul filler code points. + (func (export "\u{115f}\u{1160}\u{3164}\u{ffa0}") (result i32) (i32.const 46)) + + ;; Test variation selectors (which are also ID_Continue code points). + (func (export "\u{fe00}") (result i32) (i32.const 47)) + (func (export "\u{fe04}") (result i32) (i32.const 48)) + (func (export "\u{e0100}") (result i32) (i32.const 49)) + (func (export "\u{e01ef}") (result i32) (i32.const 50)) + + ;; Test an uncombined combining code point. + (func (export "\u{308}") (result i32) (i32.const 51)) + + ;; Test that numerous different present and historical representations of the + ;; "newline" concept are distinct. Tests largely inspired by: + ;; https://en.wikipedia.org/wiki/Newline#Representations + ;; https://en.wikipedia.org/wiki/Newline#Unicode and + ;; https://en.wikipedia.org/wiki/Newline#Reverse_and_partial_line_feeds + (func (export "\\0a") (result i32) (i32.const 52)) + (func (export "\u{2424}") (result i32) (i32.const 53)) + (func (export "\u{2028}") (result i32) (i32.const 54)) + (func (export "\\0d") (result i32) (i32.const 55)) + (func (export "\\0d\\0a") (result i32) (i32.const 56)) + (func (export "\\0a\\0d") (result i32) (i32.const 57)) + (func (export "\\1e") (result i32) (i32.const 58)) + (func (export "\\0b") (result i32) (i32.const 59)) + (func (export "\\0c") (result i32) (i32.const 60)) + (func (export "\\c2\\85") (result i32) (i32.const 61)) + (func (export "\u{2029}") (result i32) (i32.const 62)) + (func (export "\u{2026}") (result i32) (i32.const 63)) + (func (export "\u{23ce}") (result i32) (i32.const 64)) + (func (export "\\c2\\8b") (result i32) (i32.const 65)) + (func (export "\\c2\\8c") (result i32) (i32.const 66)) + (func (export "\\c2\\8d") (result i32) (i32.const 67)) + (func (export "\u{21b5}") (result i32) (i32.const 68)) + (func (export "\u{21a9}") (result i32) (i32.const 69)) + (func (export "\u{2324}") (result i32) (i32.const 70)) + (func (export "\u{2936}") (result i32) (i32.const 71)) + (func (export "\u{21b2}") (result i32) (i32.const 72)) + (func (export "\u{2ba8}") (result i32) (i32.const 73)) + (func (export "\u{2bb0}") (result i32) (i32.const 74)) + + ;; Test that non-characters are not replaced by the replacement character. + (func (export "\u{fffd}") (result i32) (i32.const 75)) + (func (export "\\ef\\b7\\90") (result i32) (i32.const 76)) + (func (export "\\ef\\b7\\91") (result i32) (i32.const 77)) + (func (export "\\ef\\b7\\92") (result i32) (i32.const 78)) + (func (export "\\ef\\b7\\93") (result i32) (i32.const 79)) + (func (export "\\ef\\b7\\94") (result i32) (i32.const 80)) + (func (export "\\ef\\b7\\95") (result i32) (i32.const 81)) + (func (export "\\ef\\b7\\96") (result i32) (i32.const 82)) + (func (export "\\ef\\b7\\97") (result i32) (i32.const 83)) + (func (export "\\ef\\b7\\98") (result i32) (i32.const 84)) + (func (export "\\ef\\b7\\99") (result i32) (i32.const 85)) + (func (export "\\ef\\b7\\9a") (result i32) (i32.const 86)) + (func (export "\\ef\\b7\\9b") (result i32) (i32.const 87)) + (func (export "\\ef\\b7\\9c") (result i32) (i32.const 88)) + (func (export "\\ef\\b7\\9d") (result i32) (i32.const 89)) + (func (export "\\ef\\b7\\9e") (result i32) (i32.const 90)) + (func (export "\\ef\\b7\\9f") (result i32) (i32.const 91)) + (func (export "\\ef\\b7\\a0") (result i32) (i32.const 92)) + (func (export "\\ef\\b7\\a1") (result i32) (i32.const 93)) + (func (export "\\ef\\b7\\a2") (result i32) (i32.const 94)) + (func (export "\\ef\\b7\\a3") (result i32) (i32.const 95)) + (func (export "\\ef\\b7\\a4") (result i32) (i32.const 96)) + (func (export "\\ef\\b7\\a5") (result i32) (i32.const 97)) + (func (export "\\ef\\b7\\a6") (result i32) (i32.const 98)) + (func (export "\\ef\\b7\\a7") (result i32) (i32.const 99)) + (func (export "\\ef\\b7\\a8") (result i32) (i32.const 100)) + (func (export "\\ef\\b7\\a9") (result i32) (i32.const 101)) + (func (export "\\ef\\b7\\aa") (result i32) (i32.const 102)) + (func (export "\\ef\\b7\\ab") (result i32) (i32.const 103)) + (func (export "\\ef\\b7\\ac") (result i32) (i32.const 104)) + (func (export "\\ef\\b7\\ad") (result i32) (i32.const 105)) + (func (export "\\ef\\b7\\ae") (result i32) (i32.const 106)) + (func (export "\\ef\\b7\\af") (result i32) (i32.const 107)) + (func (export "\\ef\\bf\\be") (result i32) (i32.const 108)) + (func (export "\\ef\\bf\\bf") (result i32) (i32.const 109)) + (func (export "\\f0\\9f\\bf\\be") (result i32) (i32.const 110)) + (func (export "\\f0\\9f\\bf\\bf") (result i32) (i32.const 111)) + (func (export "\\f0\\af\\bf\\be") (result i32) (i32.const 112)) + (func (export "\\f0\\af\\bf\\bf") (result i32) (i32.const 113)) + (func (export "\\f0\\bf\\bf\\be") (result i32) (i32.const 114)) + (func (export "\\f0\\bf\\bf\\bf") (result i32) (i32.const 115)) + (func (export "\\f1\\8f\\bf\\be") (result i32) (i32.const 116)) + (func (export "\\f1\\8f\\bf\\bf") (result i32) (i32.const 117)) + (func (export "\\f1\\9f\\bf\\be") (result i32) (i32.const 118)) + (func (export "\\f1\\9f\\bf\\bf") (result i32) (i32.const 119)) + (func (export "\\f1\\af\\bf\\be") (result i32) (i32.const 120)) + (func (export "\\f1\\af\\bf\\bf") (result i32) (i32.const 121)) + (func (export "\\f1\\bf\\bf\\be") (result i32) (i32.const 122)) + (func (export "\\f1\\bf\\bf\\bf") (result i32) (i32.const 123)) + (func (export "\\f2\\8f\\bf\\be") (result i32) (i32.const 124)) + (func (export "\\f2\\8f\\bf\\bf") (result i32) (i32.const 125)) + (func (export "\\f2\\9f\\bf\\be") (result i32) (i32.const 126)) + (func (export "\\f2\\9f\\bf\\bf") (result i32) (i32.const 127)) + (func (export "\\f2\\af\\bf\\be") (result i32) (i32.const 128)) + (func (export "\\f2\\af\\bf\\bf") (result i32) (i32.const 129)) + (func (export "\\f2\\bf\\bf\\be") (result i32) (i32.const 130)) + (func (export "\\f2\\bf\\bf\\bf") (result i32) (i32.const 131)) + (func (export "\\f3\\8f\\bf\\be") (result i32) (i32.const 132)) + (func (export "\\f3\\8f\\bf\\bf") (result i32) (i32.const 133)) + (func (export "\\f3\\9f\\bf\\be") (result i32) (i32.const 134)) + (func (export "\\f3\\9f\\bf\\bf") (result i32) (i32.const 135)) + (func (export "\\f3\\af\\bf\\be") (result i32) (i32.const 136)) + (func (export "\\f3\\af\\bf\\bf") (result i32) (i32.const 137)) + (func (export "\\f3\\bf\\bf\\be") (result i32) (i32.const 138)) + (func (export "\\f3\\bf\\bf\\bf") (result i32) (i32.const 139)) + (func (export "\\f4\\8f\\bf\\be") (result i32) (i32.const 140)) + (func (export "\\f4\\8f\\bf\\bf") (result i32) (i32.const 141)) + + ;; Test an interrobang with combining diacritical marks above. + ;; https://xkcd.com/1209/ + (func (export "\u{308}\u{203d}\u{308}\u{309}") (result i32) (i32.const 142)) + + ;; Test that RLM/LRM don't change the logical byte order. + (func (export "abc") (result i32) (i32.const 143)) + (func (export "\u{202d}abc") (result i32) (i32.const 144)) + (func (export "\u{202e}cba") (result i32) (i32.const 145)) + (func (export "\u{202d}abc\u{202e}") (result i32) (i32.const 146)) + (func (export "\u{202e}cba\u{202d}") (result i32) (i32.const 147)) + + ;; Test that Unicode font variations are preserved. + (func (export "\u{1d468}") (result i32) (i32.const 148)) + (func (export "\u{1d434}") (result i32) (i32.const 149)) + (func (export "\u{1d608}") (result i32) (i32.const 150)) + (func (export "\u{1d63c}") (result i32) (i32.const 151)) + (func (export "\u{1d400}") (result i32) (i32.const 152)) + (func (export "\u{1d4d0}") (result i32) (i32.const 153)) + (func (export "\u{1d56c}") (result i32) (i32.const 154)) + (func (export "\u{1d5d4}") (result i32) (i32.const 155)) + (func (export "\u{1d49c}") (result i32) (i32.const 156)) + (func (export "\u{1d504}") (result i32) (i32.const 157)) + (func (export "\u{1d538}") (result i32) (i32.const 158)) + (func (export "\u{1d5a0}") (result i32) (i32.const 159)) + (func (export "\u{1d670}") (result i32) (i32.const 160)) + (func (export "\u{1d00}") (result i32) (i32.const 161)) + + ;; Test that various additional letter variations are preserved. + ;; (U+0040, U+0061, U+0041, U+00C5, U+0041 U+030A, U+212B, and the font + ;; variations are covered above.) + (func (export "\u{1d2c}") (result i32) (i32.const 162)) + (func (export "\u{24b6}") (result i32) (i32.const 163)) + (func (export "\u{ff21}") (result i32) (i32.const 164)) + (func (export "\u{1f110}") (result i32) (i32.const 165)) + (func (export "\u{1f130}") (result i32) (i32.const 166)) + (func (export "\u{e0041}") (result i32) (i32.const 167)) + (func (export "U+0041") (result i32) (i32.const 168)) + (func (export "A\u{200b}") (result i32) (i32.const 169)) + (func (export "\u{410}") (result i32) (i32.const 170)) + (func (export "\u{a656}") (result i32) (i32.const 171)) + (func (export "\u{2dfc}") (result i32) (i32.const 172)) + (func (export "\u{2df6}") (result i32) (i32.const 173)) + (func (export "\u{2c6f}") (result i32) (i32.const 174)) + (func (export "\u{1f150}") (result i32) (i32.const 175)) + (func (export "\u{1f170}") (result i32) (i32.const 176)) + (func (export "\u{2c2d}") (result i32) (i32.const 177)) + (func (export "\u{10402}") (result i32) (i32.const 178)) + (func (export "\u{10408}") (result i32) (i32.const 179)) + (func (export "\u{104b0}") (result i32) (i32.const 180)) + (func (export "\u{c0}") (result i32) (i32.const 181)) + (func (export "\u{c1}") (result i32) (i32.const 182)) + (func (export "\u{c2}") (result i32) (i32.const 183)) + (func (export "\u{c3}") (result i32) (i32.const 184)) + (func (export "\u{c4}") (result i32) (i32.const 185)) + (func (export "\u{100}") (result i32) (i32.const 186)) + (func (export "\u{102}") (result i32) (i32.const 187)) + (func (export "\u{104}") (result i32) (i32.const 188)) + (func (export "\u{1cd}") (result i32) (i32.const 189)) + (func (export "\u{1de}") (result i32) (i32.const 190)) + (func (export "\u{1e0}") (result i32) (i32.const 191)) + (func (export "\u{1fa}") (result i32) (i32.const 192)) + (func (export "\u{200}") (result i32) (i32.const 193)) + (func (export "\u{202}") (result i32) (i32.const 194)) + (func (export "\u{226}") (result i32) (i32.const 195)) + (func (export "\u{23a}") (result i32) (i32.const 196)) + (func (export "\u{4d0}") (result i32) (i32.const 197)) + (func (export "\u{4d2}") (result i32) (i32.const 198)) + (func (export "\u{7ca}") (result i32) (i32.const 199)) + (func (export "\u{821}") (result i32) (i32.const 200)) + (func (export "\u{822}") (result i32) (i32.const 201)) + (func (export "\u{823}") (result i32) (i32.const 202)) + (func (export "\u{824}") (result i32) (i32.const 203)) + (func (export "\u{825}") (result i32) (i32.const 204)) + (func (export "\u{904}") (result i32) (i32.const 205)) + (func (export "\u{905}") (result i32) (i32.const 206)) + (func (export "\u{972}") (result i32) (i32.const 207)) + (func (export "\u{985}") (result i32) (i32.const 208)) + (func (export "\u{a05}") (result i32) (i32.const 209)) + (func (export "\u{a85}") (result i32) (i32.const 210)) + (func (export "\u{b05}") (result i32) (i32.const 211)) + (func (export "\u{b85}") (result i32) (i32.const 212)) + (func (export "\u{c05}") (result i32) (i32.const 213)) + (func (export "\u{c85}") (result i32) (i32.const 214)) + (func (export "\u{d05}") (result i32) (i32.const 215)) + (func (export "\u{e30}") (result i32) (i32.const 216)) + (func (export "\u{eb0}") (result i32) (i32.const 217)) + (func (export "\u{f01}") (result i32) (i32.const 218)) + (func (export "\u{f68}") (result i32) (i32.const 219)) + (func (export "\u{fb8}") (result i32) (i32.const 220)) + (func (export "\u{1021}") (result i32) (i32.const 221)) + (func (export "\u{1022}") (result i32) (i32.const 222)) + (func (export "\u{109c}") (result i32) (i32.const 223)) + (func (export "\u{1161}") (result i32) (i32.const 224)) + (func (export "\u{12a0}") (result i32) (i32.const 225)) + (func (export "\u{12d0}") (result i32) (i32.const 226)) + (func (export "\u{13a0}") (result i32) (i32.const 227)) + (func (export "\u{140a}") (result i32) (i32.const 228)) + (func (export "\u{15b3}") (result i32) (i32.const 229)) + (func (export "\u{16a8}") (result i32) (i32.const 230)) + (func (export "\u{16aa}") (result i32) (i32.const 231)) + (func (export "\u{16c6}") (result i32) (i32.const 232)) + (func (export "\u{1700}") (result i32) (i32.const 233)) + (func (export "\u{1720}") (result i32) (i32.const 234)) + (func (export "\u{1740}") (result i32) (i32.const 235)) + (func (export "\u{1760}") (result i32) (i32.const 236)) + (func (export "\u{1820}") (result i32) (i32.const 237)) + (func (export "\u{1887}") (result i32) (i32.const 238)) + (func (export "\u{1920}") (result i32) (i32.const 239)) + (func (export "\u{1963}") (result i32) (i32.const 240)) + (func (export "\u{1a15}") (result i32) (i32.const 241)) + (func (export "\u{1a4b}") (result i32) (i32.const 242)) + (func (export "\u{1a61}") (result i32) (i32.const 243)) + (func (export "\u{1b83}") (result i32) (i32.const 244)) + (func (export "\u{1bc0}") (result i32) (i32.const 245)) + (func (export "\u{1bc1}") (result i32) (i32.const 246)) + (func (export "\u{1c23}") (result i32) (i32.const 247)) + (func (export "\u{1e00}") (result i32) (i32.const 248)) + (func (export "\u{1ea0}") (result i32) (i32.const 249)) + (func (export "\u{1ea2}") (result i32) (i32.const 250)) + (func (export "\u{1ea4}") (result i32) (i32.const 251)) + (func (export "\u{1ea6}") (result i32) (i32.const 252)) + (func (export "\u{1ea8}") (result i32) (i32.const 253)) + (func (export "\u{1eaa}") (result i32) (i32.const 254)) + (func (export "\u{1eac}") (result i32) (i32.const 255)) + (func (export "\u{1eae}") (result i32) (i32.const 256)) + (func (export "\u{1eb0}") (result i32) (i32.const 257)) + (func (export "\u{1eb2}") (result i32) (i32.const 258)) + (func (export "\u{1eb4}") (result i32) (i32.const 259)) + (func (export "\u{1eb6}") (result i32) (i32.const 260)) + (func (export "\u{3042}") (result i32) (i32.const 261)) + (func (export "\u{30a2}") (result i32) (i32.const 262)) + (func (export "\u{311a}") (result i32) (i32.const 263)) + (func (export "\u{314f}") (result i32) (i32.const 264)) + (func (export "\u{320e}") (result i32) (i32.const 265)) + (func (export "\u{320f}") (result i32) (i32.const 266)) + (func (export "\u{3210}") (result i32) (i32.const 267)) + (func (export "\u{3211}") (result i32) (i32.const 268)) + (func (export "\u{3212}") (result i32) (i32.const 269)) + (func (export "\u{3213}") (result i32) (i32.const 270)) + (func (export "\u{3214}") (result i32) (i32.const 271)) + (func (export "\u{3215}") (result i32) (i32.const 272)) + (func (export "\u{3216}") (result i32) (i32.const 273)) + (func (export "\u{3217}") (result i32) (i32.const 274)) + (func (export "\u{3218}") (result i32) (i32.const 275)) + (func (export "\u{3219}") (result i32) (i32.const 276)) + (func (export "\u{321a}") (result i32) (i32.const 277)) + (func (export "\u{321b}") (result i32) (i32.const 278)) + (func (export "\u{326e}") (result i32) (i32.const 279)) + (func (export "\u{326f}") (result i32) (i32.const 280)) + (func (export "\u{3270}") (result i32) (i32.const 281)) + (func (export "\u{3271}") (result i32) (i32.const 282)) + (func (export "\u{3272}") (result i32) (i32.const 283)) + (func (export "\u{3273}") (result i32) (i32.const 284)) + (func (export "\u{3274}") (result i32) (i32.const 285)) + (func (export "\u{3275}") (result i32) (i32.const 286)) + (func (export "\u{3276}") (result i32) (i32.const 287)) + (func (export "\u{3277}") (result i32) (i32.const 288)) + (func (export "\u{3278}") (result i32) (i32.const 289)) + (func (export "\u{3279}") (result i32) (i32.const 290)) + (func (export "\u{327a}") (result i32) (i32.const 291)) + (func (export "\u{327b}") (result i32) (i32.const 292)) + (func (export "\u{32d0}") (result i32) (i32.const 293)) + (func (export "\u{a00a}") (result i32) (i32.const 294)) + (func (export "\u{a4ee}") (result i32) (i32.const 295)) + (func (export "\u{a549}") (result i32) (i32.const 296)) + (func (export "\u{a6a0}") (result i32) (i32.const 297)) + (func (export "\u{a800}") (result i32) (i32.const 298)) + (func (export "\u{a823}") (result i32) (i32.const 299)) + (func (export "\u{a85d}") (result i32) (i32.const 300)) + (func (export "\u{a882}") (result i32) (i32.const 301)) + (func (export "\u{a8ea}") (result i32) (i32.const 302)) + (func (export "\u{a922}") (result i32) (i32.const 303)) + (func (export "\u{a946}") (result i32) (i32.const 304)) + (func (export "\u{a984}") (result i32) (i32.const 305)) + (func (export "\u{aa00}") (result i32) (i32.const 306)) + (func (export "\u{ff71}") (result i32) (i32.const 307)) + (func (export "\u{ffc2}") (result i32) (i32.const 308)) + (func (export "\u{10000}") (result i32) (i32.const 309)) + (func (export "\u{10280}") (result i32) (i32.const 310)) + (func (export "\u{102a0}") (result i32) (i32.const 311)) + (func (export "\u{10300}") (result i32) (i32.const 312)) + (func (export "\u{103a0}") (result i32) (i32.const 313)) + (func (export "\u{10496}") (result i32) (i32.const 314)) + (func (export "\u{10500}") (result i32) (i32.const 315)) + (func (export "\u{10740}") (result i32) (i32.const 316)) + (func (export "\u{10800}") (result i32) (i32.const 317)) + (func (export "\u{10920}") (result i32) (i32.const 318)) + (func (export "\u{10980}") (result i32) (i32.const 319)) + (func (export "\u{109a0}") (result i32) (i32.const 320)) + (func (export "\u{10a00}") (result i32) (i32.const 321)) + (func (export "\u{10b00}") (result i32) (i32.const 322)) + (func (export "\u{10c00}") (result i32) (i32.const 323)) + (func (export "\u{10c01}") (result i32) (i32.const 324)) + (func (export "\u{10c80}") (result i32) (i32.const 325)) + (func (export "\u{11005}") (result i32) (i32.const 326)) + (func (export "\u{11083}") (result i32) (i32.const 327)) + (func (export "\u{11127}") (result i32) (i32.const 328)) + (func (export "\u{11150}") (result i32) (i32.const 329)) + (func (export "\u{11183}") (result i32) (i32.const 330)) + (func (export "\u{11200}") (result i32) (i32.const 331)) + (func (export "\u{11280}") (result i32) (i32.const 332)) + (func (export "\u{112b0}") (result i32) (i32.const 333)) + (func (export "\u{11305}") (result i32) (i32.const 334)) + (func (export "\u{11370}") (result i32) (i32.const 335)) + (func (export "\u{11400}") (result i32) (i32.const 336)) + (func (export "\u{11481}") (result i32) (i32.const 337)) + (func (export "\u{11580}") (result i32) (i32.const 338)) + (func (export "\u{11600}") (result i32) (i32.const 339)) + (func (export "\u{11680}") (result i32) (i32.const 340)) + (func (export "\u{11712}") (result i32) (i32.const 341)) + (func (export "\u{11720}") (result i32) (i32.const 342)) + (func (export "\u{118a1}") (result i32) (i32.const 343)) + (func (export "\u{11ad5}") (result i32) (i32.const 344)) + (func (export "\u{11c00}") (result i32) (i32.const 345)) + (func (export "\u{11c8f}") (result i32) (i32.const 346)) + (func (export "\u{11caf}") (result i32) (i32.const 347)) + (func (export "\u{12000}") (result i32) (i32.const 348)) + (func (export "\u{169d5}") (result i32) (i32.const 349)) + (func (export "\u{16a46}") (result i32) (i32.const 350)) + (func (export "\u{16ae7}") (result i32) (i32.const 351)) + (func (export "\u{16f54}") (result i32) (i32.const 352)) + (func (export "\u{1bc41}") (result i32) (i32.const 353)) + (func (export "\u{1bc64}") (result i32) (i32.const 354)) + (func (export "\u{1e823}") (result i32) (i32.const 355)) + (func (export "\u{1f1e6}") (result i32) (i32.const 356)) + (func (export "\u{2c6d}") (result i32) (i32.const 357)) + (func (export "\u{39b}") (result i32) (i32.const 358)) + (func (export "\u{2c70}") (result i32) (i32.const 359)) + (func (export "\u{aa}") (result i32) (i32.const 360)) + (func (export "\u{2200}") (result i32) (i32.const 361)) + (func (export "\u{20b3}") (result i32) (i32.const 362)) + (func (export "\u{10900}") (result i32) (i32.const 363)) + (func (export "\u{2c80}") (result i32) (i32.const 364)) + (func (export "\u{10330}") (result i32) (i32.const 365)) + (func (export "\u{386}") (result i32) (i32.const 366)) + (func (export "\u{391}") (result i32) (i32.const 367)) + (func (export "\u{1f08}") (result i32) (i32.const 368)) + (func (export "\u{1f09}") (result i32) (i32.const 369)) + (func (export "\u{1f0a}") (result i32) (i32.const 370)) + (func (export "\u{1f0b}") (result i32) (i32.const 371)) + (func (export "\u{1f0c}") (result i32) (i32.const 372)) + (func (export "\u{1f0d}") (result i32) (i32.const 373)) + (func (export "\u{1f0e}") (result i32) (i32.const 374)) + (func (export "\u{1f0f}") (result i32) (i32.const 375)) + (func (export "\u{1f88}") (result i32) (i32.const 376)) + (func (export "\u{1f89}") (result i32) (i32.const 377)) + (func (export "\u{1f8a}") (result i32) (i32.const 378)) + (func (export "\u{1f8b}") (result i32) (i32.const 379)) + (func (export "\u{1f8c}") (result i32) (i32.const 380)) + (func (export "\u{1f8d}") (result i32) (i32.const 381)) + (func (export "\u{1f8e}") (result i32) (i32.const 382)) + (func (export "\u{1f8f}") (result i32) (i32.const 383)) + (func (export "\u{1fb8}") (result i32) (i32.const 384)) + (func (export "\u{1fb9}") (result i32) (i32.const 385)) + (func (export "\u{1fba}") (result i32) (i32.const 386)) + (func (export "\u{1fbb}") (result i32) (i32.const 387)) + (func (export "\u{1fbc}") (result i32) (i32.const 388)) + (func (export "\u{1d6a8}") (result i32) (i32.const 389)) + (func (export "\u{1d6e2}") (result i32) (i32.const 390)) + (func (export "\u{1d71c}") (result i32) (i32.const 391)) + (func (export "\u{1d756}") (result i32) (i32.const 392)) + (func (export "\u{1d790}") (result i32) (i32.const 393)) + (func (export "\u{2376}") (result i32) (i32.const 394)) + (func (export "\u{237a}") (result i32) (i32.const 395)) + (func (export "\u{2a5c}") (result i32) (i32.const 396)) + (func (export "\u{15c5}") (result i32) (i32.const 397)) + (func (export "\u{13aa}") (result i32) (i32.const 398)) + + ;; Test unmatched "closing" and "opening" code points. + (func (export ")\u{2fa}\u{2fc}\u{145cf}\u{1d174}\u{1d176}\u{1d178}\u{1d17a}\u{207e}\u{208e}\u{2769}\u{276b}\u{27ef}\u{fd3f}\u{fe36}\u{fe5a}\u{ff09}\u{ff60}\u{e0029}\u{2773}\u{2775}\u{27e7}\u{27e9}\u{27eb}\u{27ed}\u{2988}\u{298a}\u{2996}\u{2e23}\u{2e25}\u{fe18}\u{fe38}\u{fe3a}\u{fe3c}\u{fe3e}\u{fe40}\u{fe42}\u{fe44}\u{fe48}\u{fe5c}\u{fe5e}\u{ff3d}\u{ff5d}\u{ff63}\u{e005d}\u{e007d}\u{bb}\u{2019}\u{201d}\u{203a}\u{276f}") (result i32) (i32.const 399)) + (func (export "(\u{2f9}\u{2fb}\u{145ce}\u{1d173}\u{1d175}\u{1d177}\u{1d179}\u{207d}\u{208d}\u{2768}\u{276a}\u{27ee}\u{fd3e}\u{fe35}\u{fe59}\u{ff08}\u{ff5f}\u{e0028}\u{2772}\u{2774}\u{27e6}\u{27e8}\u{27ea}\u{27ec}\u{2987}\u{2989}\u{2995}\u{2e22}\u{2e24}\u{fe17}\u{fe37}\u{fe39}\u{fe3b}\u{fe3d}\u{fe3f}\u{fe41}\u{fe43}\u{fe47}\u{fe5b}\u{fe5d}\u{ff3b}\u{ff5b}\u{ff62}\u{e005b}\u{e007b}\u{ab}\u{2018}\u{201c}\u{2039}\u{276e}") (result i32) (i32.const 400)) + (func (export "\u{1da8b}\u{1daa4}") (result i32) (i32.const 401)) + (func (export "\u{1da8b}") (result i32) (i32.const 402)) + + ;; Test that Unicode fraction normalization is not applied. + (func (export "\u{bd}") (result i32) (i32.const 403)) + (func (export "1\u{2044}2") (result i32) (i32.const 404)) + (func (export "1/2") (result i32) (i32.const 405)) + (func (export "\u{b73}") (result i32) (i32.const 406)) + (func (export "\u{d74}") (result i32) (i32.const 407)) + (func (export "\u{2cfd}") (result i32) (i32.const 408)) + (func (export "\u{a831}") (result i32) (i32.const 409)) + (func (export "\u{10141}") (result i32) (i32.const 410)) + (func (export "\u{10175}") (result i32) (i32.const 411)) + (func (export "\u{10176}") (result i32) (i32.const 412)) + (func (export "\u{109bd}") (result i32) (i32.const 413)) + (func (export "\u{10e7b}") (result i32) (i32.const 414)) + + ;; Test a full-width quote. + (func (export "\u{ff02}") (result i32) (i32.const 415)) + + ;; Test that different present and historical representations of the "delete" + ;; concept are distinct. + (func (export "\\7f") (result i32) (i32.const 416)) + (func (export "\\08") (result i32) (i32.const 417)) + (func (export "\u{232b}") (result i32) (i32.const 418)) + (func (export "\u{2326}") (result i32) (i32.const 419)) + (func (export "\u{2408}") (result i32) (i32.const 420)) + (func (export "\u{2421}") (result i32) (i32.const 421)) + (func (export "\u{1dfb}") (result i32) (i32.const 422)) + (func (export "\\0f") (result i32) (i32.const 423)) + (func (export "\u{2190}") (result i32) (i32.const 424)) + (func (export "\u{2327}") (result i32) (i32.const 425)) + (func (export "\u{2352}") (result i32) (i32.const 426)) + (func (export "\u{2354}") (result i32) (i32.const 427)) + (func (export "\u{2362}") (result i32) (i32.const 428)) + (func (export "\u{236b}") (result i32) (i32.const 429)) + + ;; Test that different representations of the "substitute" concept are + ;; distinct. (U+FFFD is covered above.) + (func (export "\\1a") (result i32) (i32.const 430)) + (func (export "\u{2426}") (result i32) (i32.const 431)) + (func (export "\u{241a}") (result i32) (i32.const 432)) + (func (export "\u{fffc}") (result i32) (i32.const 433)) + (func (export "?") (result i32) (i32.const 434)) + (func (export "\u{bf}") (result i32) (i32.const 435)) + (func (export "\u{1945}") (result i32) (i32.const 436)) + (func (export "\u{37e}") (result i32) (i32.const 437)) + (func (export "\u{55e}") (result i32) (i32.const 438)) + (func (export "\u{61f}") (result i32) (i32.const 439)) + (func (export "\u{1367}") (result i32) (i32.const 440)) + (func (export "\u{2047}") (result i32) (i32.const 441)) + (func (export "\u{2370}") (result i32) (i32.const 442)) + (func (export "\u{2753}") (result i32) (i32.const 443)) + (func (export "\u{2754}") (result i32) (i32.const 444)) + (func (export "\u{2cfa}") (result i32) (i32.const 445)) + (func (export "\u{2cfb}") (result i32) (i32.const 446)) + (func (export "\u{2e2e}") (result i32) (i32.const 447)) + (func (export "\u{3244}") (result i32) (i32.const 448)) + (func (export "\u{a60f}") (result i32) (i32.const 449)) + (func (export "\u{a6f7}") (result i32) (i32.const 450)) + (func (export "\u{fe16}") (result i32) (i32.const 451)) + (func (export "\u{fe56}") (result i32) (i32.const 452)) + (func (export "\u{ff1f}") (result i32) (i32.const 453)) + (func (export "\u{11143}") (result i32) (i32.const 454)) + (func (export "\u{1e95f}") (result i32) (i32.const 455)) + (func (export "\u{e003f}") (result i32) (i32.const 456)) + (func (export "\u{16844}") (result i32) (i32.const 457)) + (func (export "\u{2bd1}") (result i32) (i32.const 458)) + + ;; Test that different present and historical representations of the + ;; "paragraph" concept are distinct. (U+2029 is covered above). + (func (export "\u{b6}") (result i32) (i32.const 459)) + (func (export "\u{204b}") (result i32) (i32.const 460)) + (func (export "\u{700}") (result i32) (i32.const 461)) + (func (export "\u{10fb}") (result i32) (i32.const 462)) + (func (export "\u{1368}") (result i32) (i32.const 463)) + (func (export "\u{3037}") (result i32) (i32.const 464)) + (func (export "\u{2761}") (result i32) (i32.const 465)) + (func (export "\u{2e0f}") (result i32) (i32.const 466)) + (func (export "\u{2e10}") (result i32) (i32.const 467)) + (func (export "\u{2e11}") (result i32) (i32.const 468)) + (func (export "\u{2e0e}") (result i32) (i32.const 469)) + (func (export "\\14") (result i32) (i32.const 470)) ;; \u{b6} in CP437 + (func (export "\u{2619}") (result i32) (i32.const 471)) + (func (export "\u{2e3f}") (result i32) (i32.const 472)) + (func (export "\u{3007}") (result i32) (i32.const 473)) + (func (export "\u{e5b}") (result i32) (i32.const 474)) + + ;; Test an unusual character. + (func (export "\u{a66e}") (result i32) (i32.const 475)) + + ;; Test the three characters whose normalization forms under NFC, NFD, NFKC, + ;; and NFKD are all different. + ;; http://unicode.org/faq/normalization.html#6 + (func (export "\u{3d3}") (result i32) (i32.const 476)) + (func (export "\u{3d4}") (result i32) (i32.const 477)) + (func (export "\u{1e9b}") (result i32) (i32.const 478)) +)`); + +// ./test/core/names.wast:615 +assert_return(() => invoke($2, ``, []), [value("i32", 0)]); + +// ./test/core/names.wast:616 +assert_return(() => invoke($2, `0`, []), [value("i32", 1)]); + +// ./test/core/names.wast:617 +assert_return(() => invoke($2, `-0`, []), [value("i32", 2)]); + +// ./test/core/names.wast:618 +assert_return(() => invoke($2, `_`, []), [value("i32", 3)]); + +// ./test/core/names.wast:619 +assert_return(() => invoke($2, `$$`, []), [value("i32", 4)]); + +// ./test/core/names.wast:620 +assert_return(() => invoke($2, `@`, []), [value("i32", 5)]); + +// ./test/core/names.wast:621 +assert_return(() => invoke($2, `~!@#$$%^&*()_+\`-={}|[]\\:";'<>?,./ `, []), [value("i32", 6)]); + +// ./test/core/names.wast:622 +assert_return(() => invoke($2, `NaN`, []), [value("i32", 7)]); + +// ./test/core/names.wast:623 +assert_return(() => invoke($2, `Infinity`, []), [value("i32", 8)]); + +// ./test/core/names.wast:624 +assert_return(() => invoke($2, `if`, []), [value("i32", 9)]); + +// ./test/core/names.wast:625 +assert_return(() => invoke($2, `malloc`, []), [value("i32", 10)]); + +// ./test/core/names.wast:626 +assert_return(() => invoke($2, `_malloc`, []), [value("i32", 11)]); + +// ./test/core/names.wast:627 +assert_return(() => invoke($2, `__malloc`, []), [value("i32", 12)]); + +// ./test/core/names.wast:628 +assert_return(() => invoke($2, `a`, []), [value("i32", 13)]); + +// ./test/core/names.wast:629 +assert_return(() => invoke($2, `A`, []), [value("i32", 14)]); + +// ./test/core/names.wast:630 +assert_return(() => invoke($2, `\u{feff}`, []), [value("i32", 15)]); + +// ./test/core/names.wast:631 +assert_return(() => invoke($2, `\u{c5}`, []), [value("i32", 16)]); + +// ./test/core/names.wast:632 +assert_return(() => invoke($2, `A\u{30a}`, []), [value("i32", 17)]); + +// ./test/core/names.wast:633 +assert_return(() => invoke($2, `\u{212b}`, []), [value("i32", 18)]); + +// ./test/core/names.wast:634 +assert_return(() => invoke($2, `\u{fb03}`, []), [value("i32", 19)]); + +// ./test/core/names.wast:635 +assert_return(() => invoke($2, `f\u{fb01}`, []), [value("i32", 20)]); + +// ./test/core/names.wast:636 +assert_return(() => invoke($2, `ffi`, []), [value("i32", 21)]); + +// ./test/core/names.wast:637 +assert_return( + () => invoke($2, `\x00\x01\x02\x03\x04\x05\x06\x07\x08 +\x0b\x0c\x0d\x0e\x0f`, []), + [value("i32", 22)], +); + +// ./test/core/names.wast:638 +assert_return( + () => invoke($2, `\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f`, []), + [value("i32", 23)], +); + +// ./test/core/names.wast:639 +assert_return(() => invoke($2, ` \x7f`, []), [value("i32", 24)]); + +// ./test/core/names.wast:640 +assert_return( + () => invoke($2, + `\u{80}\u{81}\u{82}\u{83}\u{84}\u{85}\u{86}\u{87}\u{88}\u{89}\u{8a}\u{8b}\u{8c}\u{8d}\u{8e}\u{8f}`, + [], + ), + [value("i32", 25)], +); + +// ./test/core/names.wast:641 +assert_return( + () => invoke($2, + `\u{90}\u{91}\u{92}\u{93}\u{94}\u{95}\u{96}\u{97}\u{98}\u{99}\u{9a}\u{9b}\u{9c}\u{9d}\u{9e}\u{9f}`, + [], + ), + [value("i32", 26)], +); + +// ./test/core/names.wast:642 +assert_return( + () => invoke($2, `\u{fff0}\u{fff1}\u{fff2}\u{fff3}\u{fff4}\u{fff5}\u{fff6}\u{fff7}`, []), + [value("i32", 27)], +); + +// ./test/core/names.wast:643 +assert_return( + () => invoke($2, `\u{fff8}\u{fff9}\u{fffa}\u{fffb}\u{fffc}\u{fffd}\u{fffe}\u{ffff}`, []), + [value("i32", 28)], +); + +// ./test/core/names.wast:644 +assert_return( + () => invoke($2, + `\u{2400}\u{2401}\u{2402}\u{2403}\u{2404}\u{2405}\u{2406}\u{2407}\u{2408}\u{2409}\u{240a}\u{240b}\u{240c}\u{240d}\u{240e}\u{240f}`, + [], + ), + [value("i32", 29)], +); + +// ./test/core/names.wast:645 +assert_return( + () => invoke($2, + `\u{2410}\u{2411}\u{2412}\u{2413}\u{2414}\u{2415}\u{2416}\u{2417}\u{2418}\u{2419}\u{241a}\u{241b}\u{241c}\u{241d}\u{241e}\u{241f}`, + [], + ), + [value("i32", 30)], +); + +// ./test/core/names.wast:646 +assert_return(() => invoke($2, `\u{2420}\u{2421}`, []), [value("i32", 31)]); + +// ./test/core/names.wast:647 +assert_return( + () => invoke($2, + `\u{fff0}\u{fff1}\u{fff2}\u{fff3}\u{fff4}\u{fff5}\u{fff6}\u{fff7}\u{fff8}\u{fff9}\u{fffa}\u{fffb}\u{fffc}\u{fffd}`, + [], + ), + [value("i32", 32)], +); + +// ./test/core/names.wast:648 +assert_return(() => invoke($2, `\u{200d}`, []), [value("i32", 33)]); + +// ./test/core/names.wast:649 +assert_return(() => invoke($2, `\u{200c}`, []), [value("i32", 34)]); + +// ./test/core/names.wast:650 +assert_return(() => invoke($2, `\u{34f}`, []), [value("i32", 35)]); + +// ./test/core/names.wast:651 +assert_return(() => invoke($2, `\u{2060}`, []), [value("i32", 36)]); + +// ./test/core/names.wast:652 +assert_return(() => invoke($2, `\u{2d7f}`, []), [value("i32", 37)]); + +// ./test/core/names.wast:653 +assert_return(() => invoke($2, `\u{1107f}`, []), [value("i32", 38)]); + +// ./test/core/names.wast:654 +assert_return(() => invoke($2, `\u{180e}`, []), [value("i32", 39)]); + +// ./test/core/names.wast:655 +assert_return( + () => invoke($2, `\u{ffef}\u{200b}\u{a0}\u{ad}\u{2060}\u{1680}\u{202e}\u{202d}`, []), + [value("i32", 40)], +); + +// ./test/core/names.wast:656 +assert_return( + () => invoke($2, + `\u{200e}\u{200f}\u{2011}\u{2028}\u{2029}\u{202a}\u{202b}\u{202c}\u{202f}\u{2066}\u{2067}\u{2068}\u{2069}`, + [], + ), + [value("i32", 41)], +); + +// ./test/core/names.wast:657 +assert_return( + () => invoke($2, `\u{206a}\u{206b}\u{206c}\u{206d}\u{206e}\u{206f}`, []), + [value("i32", 42)], +); + +// ./test/core/names.wast:658 +assert_return(() => invoke($2, `\u{2061}\u{2062}\u{2063}\u{2064}`, []), [value("i32", 43)]); + +// ./test/core/names.wast:659 +assert_return(() => invoke($2, `\u{10000}\u{dffff}\u{10ffff}`, []), [value("i32", 44)]); + +// ./test/core/names.wast:660 +assert_return( + () => invoke($2, + `Z\u{30f}\u{346}\u{306}\u{35b}\u{34c}\u{334}\u{358}\u{35e}\u{347}\u{32b}\u{325}\u{32a}\u{353}\u{348}\u{354}\u{34e}\u{317}\u{31e}\u{33a}\u{32f}\u{331}\u{31e}\u{319}\u{331}\u{31c}\u{316}\u{320}a\u{357}\u{368}\u{30e}\u{304}\u{306}\u{357}\u{33f}\u{361}\u{35f}\u{340}\u{336}\u{341}\u{325}\u{330}\u{333}\u{32d}\u{359}\u{332}\u{331}\u{339}\u{31d}\u{34e}\u{33c}l\u{344}\u{34a}\u{31a}\u{357}\u{366}\u{344}\u{36b}\u{307}\u{341}\u{336}\u{337}\u{349}\u{329}\u{339}\u{32b}\u{31d}\u{356}\u{345}\u{319}\u{332}\u{33c}\u{347}\u{35a}\u{34d}\u{32e}\u{34e}\u{325}\u{345}\u{31e}g\u{343}\u{310}\u{305}\u{36e}\u{314}\u{310}\u{30e}\u{302}\u{30f}\u{33e}\u{34a}\u{30d}\u{34b}\u{34a}\u{367}\u{301}\u{306}\u{366}\u{35e}\u{336}\u{355}\u{354}\u{35a}\u{329}o\u{34b}\u{314}\u{350}\u{36a}\u{369}\u{321}\u{34f}\u{322}\u{327}\u{341}\u{32b}\u{319}\u{324}\u{32e}\u{356}\u{359}\u{353}\u{33a}\u{31c}\u{329}\u{33c}\u{318}\u{320}`, + [], + ), + [value("i32", 45)], +); + +// ./test/core/names.wast:661 +assert_return(() => invoke($2, `\u{115f}\u{1160}\u{3164}\u{ffa0}`, []), [value("i32", 46)]); + +// ./test/core/names.wast:662 +assert_return(() => invoke($2, `\u{fe00}`, []), [value("i32", 47)]); + +// ./test/core/names.wast:663 +assert_return(() => invoke($2, `\u{fe04}`, []), [value("i32", 48)]); + +// ./test/core/names.wast:664 +assert_return(() => invoke($2, `\u{e0100}`, []), [value("i32", 49)]); + +// ./test/core/names.wast:665 +assert_return(() => invoke($2, `\u{e01ef}`, []), [value("i32", 50)]); + +// ./test/core/names.wast:666 +assert_return(() => invoke($2, `\u{308}`, []), [value("i32", 51)]); + +// ./test/core/names.wast:667 +assert_return(() => invoke($2, ` +`, []), [value("i32", 52)]); + +// ./test/core/names.wast:668 +assert_return(() => invoke($2, `\u{2424}`, []), [value("i32", 53)]); + +// ./test/core/names.wast:669 +assert_return(() => invoke($2, `\u{2028}`, []), [value("i32", 54)]); + +// ./test/core/names.wast:670 +assert_return(() => invoke($2, `\x0d`, []), [value("i32", 55)]); + +// ./test/core/names.wast:671 +assert_return(() => invoke($2, `\x0d +`, []), [value("i32", 56)]); + +// ./test/core/names.wast:672 +assert_return(() => invoke($2, ` +\x0d`, []), [value("i32", 57)]); + +// ./test/core/names.wast:673 +assert_return(() => invoke($2, `\x1e`, []), [value("i32", 58)]); + +// ./test/core/names.wast:674 +assert_return(() => invoke($2, `\x0b`, []), [value("i32", 59)]); + +// ./test/core/names.wast:675 +assert_return(() => invoke($2, `\x0c`, []), [value("i32", 60)]); + +// ./test/core/names.wast:676 +assert_return(() => invoke($2, `\u{85}`, []), [value("i32", 61)]); + +// ./test/core/names.wast:677 +assert_return(() => invoke($2, `\u{2029}`, []), [value("i32", 62)]); + +// ./test/core/names.wast:678 +assert_return(() => invoke($2, `\u{2026}`, []), [value("i32", 63)]); + +// ./test/core/names.wast:679 +assert_return(() => invoke($2, `\u{23ce}`, []), [value("i32", 64)]); + +// ./test/core/names.wast:680 +assert_return(() => invoke($2, `\u{8b}`, []), [value("i32", 65)]); + +// ./test/core/names.wast:681 +assert_return(() => invoke($2, `\u{8c}`, []), [value("i32", 66)]); + +// ./test/core/names.wast:682 +assert_return(() => invoke($2, `\u{8d}`, []), [value("i32", 67)]); + +// ./test/core/names.wast:683 +assert_return(() => invoke($2, `\u{21b5}`, []), [value("i32", 68)]); + +// ./test/core/names.wast:684 +assert_return(() => invoke($2, `\u{21a9}`, []), [value("i32", 69)]); + +// ./test/core/names.wast:685 +assert_return(() => invoke($2, `\u{2324}`, []), [value("i32", 70)]); + +// ./test/core/names.wast:686 +assert_return(() => invoke($2, `\u{2936}`, []), [value("i32", 71)]); + +// ./test/core/names.wast:687 +assert_return(() => invoke($2, `\u{21b2}`, []), [value("i32", 72)]); + +// ./test/core/names.wast:688 +assert_return(() => invoke($2, `\u{2ba8}`, []), [value("i32", 73)]); + +// ./test/core/names.wast:689 +assert_return(() => invoke($2, `\u{2bb0}`, []), [value("i32", 74)]); + +// ./test/core/names.wast:690 +assert_return(() => invoke($2, `\u{fffd}`, []), [value("i32", 75)]); + +// ./test/core/names.wast:691 +assert_return(() => invoke($2, `\u{fdd0}`, []), [value("i32", 76)]); + +// ./test/core/names.wast:692 +assert_return(() => invoke($2, `\u{fdd1}`, []), [value("i32", 77)]); + +// ./test/core/names.wast:693 +assert_return(() => invoke($2, `\u{fdd2}`, []), [value("i32", 78)]); + +// ./test/core/names.wast:694 +assert_return(() => invoke($2, `\u{fdd3}`, []), [value("i32", 79)]); + +// ./test/core/names.wast:695 +assert_return(() => invoke($2, `\u{fdd4}`, []), [value("i32", 80)]); + +// ./test/core/names.wast:696 +assert_return(() => invoke($2, `\u{fdd5}`, []), [value("i32", 81)]); + +// ./test/core/names.wast:697 +assert_return(() => invoke($2, `\u{fdd6}`, []), [value("i32", 82)]); + +// ./test/core/names.wast:698 +assert_return(() => invoke($2, `\u{fdd7}`, []), [value("i32", 83)]); + +// ./test/core/names.wast:699 +assert_return(() => invoke($2, `\u{fdd8}`, []), [value("i32", 84)]); + +// ./test/core/names.wast:700 +assert_return(() => invoke($2, `\u{fdd9}`, []), [value("i32", 85)]); + +// ./test/core/names.wast:701 +assert_return(() => invoke($2, `\u{fdda}`, []), [value("i32", 86)]); + +// ./test/core/names.wast:702 +assert_return(() => invoke($2, `\u{fddb}`, []), [value("i32", 87)]); + +// ./test/core/names.wast:703 +assert_return(() => invoke($2, `\u{fddc}`, []), [value("i32", 88)]); + +// ./test/core/names.wast:704 +assert_return(() => invoke($2, `\u{fddd}`, []), [value("i32", 89)]); + +// ./test/core/names.wast:705 +assert_return(() => invoke($2, `\u{fdde}`, []), [value("i32", 90)]); + +// ./test/core/names.wast:706 +assert_return(() => invoke($2, `\u{fddf}`, []), [value("i32", 91)]); + +// ./test/core/names.wast:707 +assert_return(() => invoke($2, `\u{fde0}`, []), [value("i32", 92)]); + +// ./test/core/names.wast:708 +assert_return(() => invoke($2, `\u{fde1}`, []), [value("i32", 93)]); + +// ./test/core/names.wast:709 +assert_return(() => invoke($2, `\u{fde2}`, []), [value("i32", 94)]); + +// ./test/core/names.wast:710 +assert_return(() => invoke($2, `\u{fde3}`, []), [value("i32", 95)]); + +// ./test/core/names.wast:711 +assert_return(() => invoke($2, `\u{fde4}`, []), [value("i32", 96)]); + +// ./test/core/names.wast:712 +assert_return(() => invoke($2, `\u{fde5}`, []), [value("i32", 97)]); + +// ./test/core/names.wast:713 +assert_return(() => invoke($2, `\u{fde6}`, []), [value("i32", 98)]); + +// ./test/core/names.wast:714 +assert_return(() => invoke($2, `\u{fde7}`, []), [value("i32", 99)]); + +// ./test/core/names.wast:715 +assert_return(() => invoke($2, `\u{fde8}`, []), [value("i32", 100)]); + +// ./test/core/names.wast:716 +assert_return(() => invoke($2, `\u{fde9}`, []), [value("i32", 101)]); + +// ./test/core/names.wast:717 +assert_return(() => invoke($2, `\u{fdea}`, []), [value("i32", 102)]); + +// ./test/core/names.wast:718 +assert_return(() => invoke($2, `\u{fdeb}`, []), [value("i32", 103)]); + +// ./test/core/names.wast:719 +assert_return(() => invoke($2, `\u{fdec}`, []), [value("i32", 104)]); + +// ./test/core/names.wast:720 +assert_return(() => invoke($2, `\u{fded}`, []), [value("i32", 105)]); + +// ./test/core/names.wast:721 +assert_return(() => invoke($2, `\u{fdee}`, []), [value("i32", 106)]); + +// ./test/core/names.wast:722 +assert_return(() => invoke($2, `\u{fdef}`, []), [value("i32", 107)]); + +// ./test/core/names.wast:723 +assert_return(() => invoke($2, `\u{fffe}`, []), [value("i32", 108)]); + +// ./test/core/names.wast:724 +assert_return(() => invoke($2, `\u{ffff}`, []), [value("i32", 109)]); + +// ./test/core/names.wast:725 +assert_return(() => invoke($2, `\u{1fffe}`, []), [value("i32", 110)]); + +// ./test/core/names.wast:726 +assert_return(() => invoke($2, `\u{1ffff}`, []), [value("i32", 111)]); + +// ./test/core/names.wast:727 +assert_return(() => invoke($2, `\u{2fffe}`, []), [value("i32", 112)]); + +// ./test/core/names.wast:728 +assert_return(() => invoke($2, `\u{2ffff}`, []), [value("i32", 113)]); + +// ./test/core/names.wast:729 +assert_return(() => invoke($2, `\u{3fffe}`, []), [value("i32", 114)]); + +// ./test/core/names.wast:730 +assert_return(() => invoke($2, `\u{3ffff}`, []), [value("i32", 115)]); + +// ./test/core/names.wast:731 +assert_return(() => invoke($2, `\u{4fffe}`, []), [value("i32", 116)]); + +// ./test/core/names.wast:732 +assert_return(() => invoke($2, `\u{4ffff}`, []), [value("i32", 117)]); + +// ./test/core/names.wast:733 +assert_return(() => invoke($2, `\u{5fffe}`, []), [value("i32", 118)]); + +// ./test/core/names.wast:734 +assert_return(() => invoke($2, `\u{5ffff}`, []), [value("i32", 119)]); + +// ./test/core/names.wast:735 +assert_return(() => invoke($2, `\u{6fffe}`, []), [value("i32", 120)]); + +// ./test/core/names.wast:736 +assert_return(() => invoke($2, `\u{6ffff}`, []), [value("i32", 121)]); + +// ./test/core/names.wast:737 +assert_return(() => invoke($2, `\u{7fffe}`, []), [value("i32", 122)]); + +// ./test/core/names.wast:738 +assert_return(() => invoke($2, `\u{7ffff}`, []), [value("i32", 123)]); + +// ./test/core/names.wast:739 +assert_return(() => invoke($2, `\u{8fffe}`, []), [value("i32", 124)]); + +// ./test/core/names.wast:740 +assert_return(() => invoke($2, `\u{8ffff}`, []), [value("i32", 125)]); + +// ./test/core/names.wast:741 +assert_return(() => invoke($2, `\u{9fffe}`, []), [value("i32", 126)]); + +// ./test/core/names.wast:742 +assert_return(() => invoke($2, `\u{9ffff}`, []), [value("i32", 127)]); + +// ./test/core/names.wast:743 +assert_return(() => invoke($2, `\u{afffe}`, []), [value("i32", 128)]); + +// ./test/core/names.wast:744 +assert_return(() => invoke($2, `\u{affff}`, []), [value("i32", 129)]); + +// ./test/core/names.wast:745 +assert_return(() => invoke($2, `\u{bfffe}`, []), [value("i32", 130)]); + +// ./test/core/names.wast:746 +assert_return(() => invoke($2, `\u{bffff}`, []), [value("i32", 131)]); + +// ./test/core/names.wast:747 +assert_return(() => invoke($2, `\u{cfffe}`, []), [value("i32", 132)]); + +// ./test/core/names.wast:748 +assert_return(() => invoke($2, `\u{cffff}`, []), [value("i32", 133)]); + +// ./test/core/names.wast:749 +assert_return(() => invoke($2, `\u{dfffe}`, []), [value("i32", 134)]); + +// ./test/core/names.wast:750 +assert_return(() => invoke($2, `\u{dffff}`, []), [value("i32", 135)]); + +// ./test/core/names.wast:751 +assert_return(() => invoke($2, `\u{efffe}`, []), [value("i32", 136)]); + +// ./test/core/names.wast:752 +assert_return(() => invoke($2, `\u{effff}`, []), [value("i32", 137)]); + +// ./test/core/names.wast:753 +assert_return(() => invoke($2, `\u{ffffe}`, []), [value("i32", 138)]); + +// ./test/core/names.wast:754 +assert_return(() => invoke($2, `\u{fffff}`, []), [value("i32", 139)]); + +// ./test/core/names.wast:755 +assert_return(() => invoke($2, `\u{10fffe}`, []), [value("i32", 140)]); + +// ./test/core/names.wast:756 +assert_return(() => invoke($2, `\u{10ffff}`, []), [value("i32", 141)]); + +// ./test/core/names.wast:757 +assert_return(() => invoke($2, `\u{308}\u{203d}\u{308}\u{309}`, []), [value("i32", 142)]); + +// ./test/core/names.wast:758 +assert_return(() => invoke($2, `abc`, []), [value("i32", 143)]); + +// ./test/core/names.wast:759 +assert_return(() => invoke($2, `\u{202d}abc`, []), [value("i32", 144)]); + +// ./test/core/names.wast:760 +assert_return(() => invoke($2, `\u{202e}cba`, []), [value("i32", 145)]); + +// ./test/core/names.wast:761 +assert_return(() => invoke($2, `\u{202d}abc\u{202e}`, []), [value("i32", 146)]); + +// ./test/core/names.wast:762 +assert_return(() => invoke($2, `\u{202e}cba\u{202d}`, []), [value("i32", 147)]); + +// ./test/core/names.wast:763 +assert_return(() => invoke($2, `\u{1d468}`, []), [value("i32", 148)]); + +// ./test/core/names.wast:764 +assert_return(() => invoke($2, `\u{1d434}`, []), [value("i32", 149)]); + +// ./test/core/names.wast:765 +assert_return(() => invoke($2, `\u{1d608}`, []), [value("i32", 150)]); + +// ./test/core/names.wast:766 +assert_return(() => invoke($2, `\u{1d63c}`, []), [value("i32", 151)]); + +// ./test/core/names.wast:767 +assert_return(() => invoke($2, `\u{1d400}`, []), [value("i32", 152)]); + +// ./test/core/names.wast:768 +assert_return(() => invoke($2, `\u{1d4d0}`, []), [value("i32", 153)]); + +// ./test/core/names.wast:769 +assert_return(() => invoke($2, `\u{1d56c}`, []), [value("i32", 154)]); + +// ./test/core/names.wast:770 +assert_return(() => invoke($2, `\u{1d5d4}`, []), [value("i32", 155)]); + +// ./test/core/names.wast:771 +assert_return(() => invoke($2, `\u{1d49c}`, []), [value("i32", 156)]); + +// ./test/core/names.wast:772 +assert_return(() => invoke($2, `\u{1d504}`, []), [value("i32", 157)]); + +// ./test/core/names.wast:773 +assert_return(() => invoke($2, `\u{1d538}`, []), [value("i32", 158)]); + +// ./test/core/names.wast:774 +assert_return(() => invoke($2, `\u{1d5a0}`, []), [value("i32", 159)]); + +// ./test/core/names.wast:775 +assert_return(() => invoke($2, `\u{1d670}`, []), [value("i32", 160)]); + +// ./test/core/names.wast:776 +assert_return(() => invoke($2, `\u{1d00}`, []), [value("i32", 161)]); + +// ./test/core/names.wast:777 +assert_return(() => invoke($2, `\u{1d2c}`, []), [value("i32", 162)]); + +// ./test/core/names.wast:778 +assert_return(() => invoke($2, `\u{24b6}`, []), [value("i32", 163)]); + +// ./test/core/names.wast:779 +assert_return(() => invoke($2, `\u{ff21}`, []), [value("i32", 164)]); + +// ./test/core/names.wast:780 +assert_return(() => invoke($2, `\u{1f110}`, []), [value("i32", 165)]); + +// ./test/core/names.wast:781 +assert_return(() => invoke($2, `\u{1f130}`, []), [value("i32", 166)]); + +// ./test/core/names.wast:782 +assert_return(() => invoke($2, `\u{e0041}`, []), [value("i32", 167)]); + +// ./test/core/names.wast:783 +assert_return(() => invoke($2, `U+0041`, []), [value("i32", 168)]); + +// ./test/core/names.wast:784 +assert_return(() => invoke($2, `A\u{200b}`, []), [value("i32", 169)]); + +// ./test/core/names.wast:785 +assert_return(() => invoke($2, `\u{410}`, []), [value("i32", 170)]); + +// ./test/core/names.wast:786 +assert_return(() => invoke($2, `\u{a656}`, []), [value("i32", 171)]); + +// ./test/core/names.wast:787 +assert_return(() => invoke($2, `\u{2dfc}`, []), [value("i32", 172)]); + +// ./test/core/names.wast:788 +assert_return(() => invoke($2, `\u{2df6}`, []), [value("i32", 173)]); + +// ./test/core/names.wast:789 +assert_return(() => invoke($2, `\u{2c6f}`, []), [value("i32", 174)]); + +// ./test/core/names.wast:790 +assert_return(() => invoke($2, `\u{1f150}`, []), [value("i32", 175)]); + +// ./test/core/names.wast:791 +assert_return(() => invoke($2, `\u{1f170}`, []), [value("i32", 176)]); + +// ./test/core/names.wast:792 +assert_return(() => invoke($2, `\u{2c2d}`, []), [value("i32", 177)]); + +// ./test/core/names.wast:793 +assert_return(() => invoke($2, `\u{10402}`, []), [value("i32", 178)]); + +// ./test/core/names.wast:794 +assert_return(() => invoke($2, `\u{10408}`, []), [value("i32", 179)]); + +// ./test/core/names.wast:795 +assert_return(() => invoke($2, `\u{104b0}`, []), [value("i32", 180)]); + +// ./test/core/names.wast:796 +assert_return(() => invoke($2, `\u{c0}`, []), [value("i32", 181)]); + +// ./test/core/names.wast:797 +assert_return(() => invoke($2, `\u{c1}`, []), [value("i32", 182)]); + +// ./test/core/names.wast:798 +assert_return(() => invoke($2, `\u{c2}`, []), [value("i32", 183)]); + +// ./test/core/names.wast:799 +assert_return(() => invoke($2, `\u{c3}`, []), [value("i32", 184)]); + +// ./test/core/names.wast:800 +assert_return(() => invoke($2, `\u{c4}`, []), [value("i32", 185)]); + +// ./test/core/names.wast:801 +assert_return(() => invoke($2, `\u{100}`, []), [value("i32", 186)]); + +// ./test/core/names.wast:802 +assert_return(() => invoke($2, `\u{102}`, []), [value("i32", 187)]); + +// ./test/core/names.wast:803 +assert_return(() => invoke($2, `\u{104}`, []), [value("i32", 188)]); + +// ./test/core/names.wast:804 +assert_return(() => invoke($2, `\u{1cd}`, []), [value("i32", 189)]); + +// ./test/core/names.wast:805 +assert_return(() => invoke($2, `\u{1de}`, []), [value("i32", 190)]); + +// ./test/core/names.wast:806 +assert_return(() => invoke($2, `\u{1e0}`, []), [value("i32", 191)]); + +// ./test/core/names.wast:807 +assert_return(() => invoke($2, `\u{1fa}`, []), [value("i32", 192)]); + +// ./test/core/names.wast:808 +assert_return(() => invoke($2, `\u{200}`, []), [value("i32", 193)]); + +// ./test/core/names.wast:809 +assert_return(() => invoke($2, `\u{202}`, []), [value("i32", 194)]); + +// ./test/core/names.wast:810 +assert_return(() => invoke($2, `\u{226}`, []), [value("i32", 195)]); + +// ./test/core/names.wast:811 +assert_return(() => invoke($2, `\u{23a}`, []), [value("i32", 196)]); + +// ./test/core/names.wast:812 +assert_return(() => invoke($2, `\u{4d0}`, []), [value("i32", 197)]); + +// ./test/core/names.wast:813 +assert_return(() => invoke($2, `\u{4d2}`, []), [value("i32", 198)]); + +// ./test/core/names.wast:814 +assert_return(() => invoke($2, `\u{7ca}`, []), [value("i32", 199)]); + +// ./test/core/names.wast:815 +assert_return(() => invoke($2, `\u{821}`, []), [value("i32", 200)]); + +// ./test/core/names.wast:816 +assert_return(() => invoke($2, `\u{822}`, []), [value("i32", 201)]); + +// ./test/core/names.wast:817 +assert_return(() => invoke($2, `\u{823}`, []), [value("i32", 202)]); + +// ./test/core/names.wast:818 +assert_return(() => invoke($2, `\u{824}`, []), [value("i32", 203)]); + +// ./test/core/names.wast:819 +assert_return(() => invoke($2, `\u{825}`, []), [value("i32", 204)]); + +// ./test/core/names.wast:820 +assert_return(() => invoke($2, `\u{904}`, []), [value("i32", 205)]); + +// ./test/core/names.wast:821 +assert_return(() => invoke($2, `\u{905}`, []), [value("i32", 206)]); + +// ./test/core/names.wast:822 +assert_return(() => invoke($2, `\u{972}`, []), [value("i32", 207)]); + +// ./test/core/names.wast:823 +assert_return(() => invoke($2, `\u{985}`, []), [value("i32", 208)]); + +// ./test/core/names.wast:824 +assert_return(() => invoke($2, `\u{a05}`, []), [value("i32", 209)]); + +// ./test/core/names.wast:825 +assert_return(() => invoke($2, `\u{a85}`, []), [value("i32", 210)]); + +// ./test/core/names.wast:826 +assert_return(() => invoke($2, `\u{b05}`, []), [value("i32", 211)]); + +// ./test/core/names.wast:827 +assert_return(() => invoke($2, `\u{b85}`, []), [value("i32", 212)]); + +// ./test/core/names.wast:828 +assert_return(() => invoke($2, `\u{c05}`, []), [value("i32", 213)]); + +// ./test/core/names.wast:829 +assert_return(() => invoke($2, `\u{c85}`, []), [value("i32", 214)]); + +// ./test/core/names.wast:830 +assert_return(() => invoke($2, `\u{d05}`, []), [value("i32", 215)]); + +// ./test/core/names.wast:831 +assert_return(() => invoke($2, `\u{e30}`, []), [value("i32", 216)]); + +// ./test/core/names.wast:832 +assert_return(() => invoke($2, `\u{eb0}`, []), [value("i32", 217)]); + +// ./test/core/names.wast:833 +assert_return(() => invoke($2, `\u{f01}`, []), [value("i32", 218)]); + +// ./test/core/names.wast:834 +assert_return(() => invoke($2, `\u{f68}`, []), [value("i32", 219)]); + +// ./test/core/names.wast:835 +assert_return(() => invoke($2, `\u{fb8}`, []), [value("i32", 220)]); + +// ./test/core/names.wast:836 +assert_return(() => invoke($2, `\u{1021}`, []), [value("i32", 221)]); + +// ./test/core/names.wast:837 +assert_return(() => invoke($2, `\u{1022}`, []), [value("i32", 222)]); + +// ./test/core/names.wast:838 +assert_return(() => invoke($2, `\u{109c}`, []), [value("i32", 223)]); + +// ./test/core/names.wast:839 +assert_return(() => invoke($2, `\u{1161}`, []), [value("i32", 224)]); + +// ./test/core/names.wast:840 +assert_return(() => invoke($2, `\u{12a0}`, []), [value("i32", 225)]); + +// ./test/core/names.wast:841 +assert_return(() => invoke($2, `\u{12d0}`, []), [value("i32", 226)]); + +// ./test/core/names.wast:842 +assert_return(() => invoke($2, `\u{13a0}`, []), [value("i32", 227)]); + +// ./test/core/names.wast:843 +assert_return(() => invoke($2, `\u{140a}`, []), [value("i32", 228)]); + +// ./test/core/names.wast:844 +assert_return(() => invoke($2, `\u{15b3}`, []), [value("i32", 229)]); + +// ./test/core/names.wast:845 +assert_return(() => invoke($2, `\u{16a8}`, []), [value("i32", 230)]); + +// ./test/core/names.wast:846 +assert_return(() => invoke($2, `\u{16aa}`, []), [value("i32", 231)]); + +// ./test/core/names.wast:847 +assert_return(() => invoke($2, `\u{16c6}`, []), [value("i32", 232)]); + +// ./test/core/names.wast:848 +assert_return(() => invoke($2, `\u{1700}`, []), [value("i32", 233)]); + +// ./test/core/names.wast:849 +assert_return(() => invoke($2, `\u{1720}`, []), [value("i32", 234)]); + +// ./test/core/names.wast:850 +assert_return(() => invoke($2, `\u{1740}`, []), [value("i32", 235)]); + +// ./test/core/names.wast:851 +assert_return(() => invoke($2, `\u{1760}`, []), [value("i32", 236)]); + +// ./test/core/names.wast:852 +assert_return(() => invoke($2, `\u{1820}`, []), [value("i32", 237)]); + +// ./test/core/names.wast:853 +assert_return(() => invoke($2, `\u{1887}`, []), [value("i32", 238)]); + +// ./test/core/names.wast:854 +assert_return(() => invoke($2, `\u{1920}`, []), [value("i32", 239)]); + +// ./test/core/names.wast:855 +assert_return(() => invoke($2, `\u{1963}`, []), [value("i32", 240)]); + +// ./test/core/names.wast:856 +assert_return(() => invoke($2, `\u{1a15}`, []), [value("i32", 241)]); + +// ./test/core/names.wast:857 +assert_return(() => invoke($2, `\u{1a4b}`, []), [value("i32", 242)]); + +// ./test/core/names.wast:858 +assert_return(() => invoke($2, `\u{1a61}`, []), [value("i32", 243)]); + +// ./test/core/names.wast:859 +assert_return(() => invoke($2, `\u{1b83}`, []), [value("i32", 244)]); + +// ./test/core/names.wast:860 +assert_return(() => invoke($2, `\u{1bc0}`, []), [value("i32", 245)]); + +// ./test/core/names.wast:861 +assert_return(() => invoke($2, `\u{1bc1}`, []), [value("i32", 246)]); + +// ./test/core/names.wast:862 +assert_return(() => invoke($2, `\u{1c23}`, []), [value("i32", 247)]); + +// ./test/core/names.wast:863 +assert_return(() => invoke($2, `\u{1e00}`, []), [value("i32", 248)]); + +// ./test/core/names.wast:864 +assert_return(() => invoke($2, `\u{1ea0}`, []), [value("i32", 249)]); + +// ./test/core/names.wast:865 +assert_return(() => invoke($2, `\u{1ea2}`, []), [value("i32", 250)]); + +// ./test/core/names.wast:866 +assert_return(() => invoke($2, `\u{1ea4}`, []), [value("i32", 251)]); + +// ./test/core/names.wast:867 +assert_return(() => invoke($2, `\u{1ea6}`, []), [value("i32", 252)]); + +// ./test/core/names.wast:868 +assert_return(() => invoke($2, `\u{1ea8}`, []), [value("i32", 253)]); + +// ./test/core/names.wast:869 +assert_return(() => invoke($2, `\u{1eaa}`, []), [value("i32", 254)]); + +// ./test/core/names.wast:870 +assert_return(() => invoke($2, `\u{1eac}`, []), [value("i32", 255)]); + +// ./test/core/names.wast:871 +assert_return(() => invoke($2, `\u{1eae}`, []), [value("i32", 256)]); + +// ./test/core/names.wast:872 +assert_return(() => invoke($2, `\u{1eb0}`, []), [value("i32", 257)]); + +// ./test/core/names.wast:873 +assert_return(() => invoke($2, `\u{1eb2}`, []), [value("i32", 258)]); + +// ./test/core/names.wast:874 +assert_return(() => invoke($2, `\u{1eb4}`, []), [value("i32", 259)]); + +// ./test/core/names.wast:875 +assert_return(() => invoke($2, `\u{1eb6}`, []), [value("i32", 260)]); + +// ./test/core/names.wast:876 +assert_return(() => invoke($2, `\u{3042}`, []), [value("i32", 261)]); + +// ./test/core/names.wast:877 +assert_return(() => invoke($2, `\u{30a2}`, []), [value("i32", 262)]); + +// ./test/core/names.wast:878 +assert_return(() => invoke($2, `\u{311a}`, []), [value("i32", 263)]); + +// ./test/core/names.wast:879 +assert_return(() => invoke($2, `\u{314f}`, []), [value("i32", 264)]); + +// ./test/core/names.wast:880 +assert_return(() => invoke($2, `\u{320e}`, []), [value("i32", 265)]); + +// ./test/core/names.wast:881 +assert_return(() => invoke($2, `\u{320f}`, []), [value("i32", 266)]); + +// ./test/core/names.wast:882 +assert_return(() => invoke($2, `\u{3210}`, []), [value("i32", 267)]); + +// ./test/core/names.wast:883 +assert_return(() => invoke($2, `\u{3211}`, []), [value("i32", 268)]); + +// ./test/core/names.wast:884 +assert_return(() => invoke($2, `\u{3212}`, []), [value("i32", 269)]); + +// ./test/core/names.wast:885 +assert_return(() => invoke($2, `\u{3213}`, []), [value("i32", 270)]); + +// ./test/core/names.wast:886 +assert_return(() => invoke($2, `\u{3214}`, []), [value("i32", 271)]); + +// ./test/core/names.wast:887 +assert_return(() => invoke($2, `\u{3215}`, []), [value("i32", 272)]); + +// ./test/core/names.wast:888 +assert_return(() => invoke($2, `\u{3216}`, []), [value("i32", 273)]); + +// ./test/core/names.wast:889 +assert_return(() => invoke($2, `\u{3217}`, []), [value("i32", 274)]); + +// ./test/core/names.wast:890 +assert_return(() => invoke($2, `\u{3218}`, []), [value("i32", 275)]); + +// ./test/core/names.wast:891 +assert_return(() => invoke($2, `\u{3219}`, []), [value("i32", 276)]); + +// ./test/core/names.wast:892 +assert_return(() => invoke($2, `\u{321a}`, []), [value("i32", 277)]); + +// ./test/core/names.wast:893 +assert_return(() => invoke($2, `\u{321b}`, []), [value("i32", 278)]); + +// ./test/core/names.wast:894 +assert_return(() => invoke($2, `\u{326e}`, []), [value("i32", 279)]); + +// ./test/core/names.wast:895 +assert_return(() => invoke($2, `\u{326f}`, []), [value("i32", 280)]); + +// ./test/core/names.wast:896 +assert_return(() => invoke($2, `\u{3270}`, []), [value("i32", 281)]); + +// ./test/core/names.wast:897 +assert_return(() => invoke($2, `\u{3271}`, []), [value("i32", 282)]); + +// ./test/core/names.wast:898 +assert_return(() => invoke($2, `\u{3272}`, []), [value("i32", 283)]); + +// ./test/core/names.wast:899 +assert_return(() => invoke($2, `\u{3273}`, []), [value("i32", 284)]); + +// ./test/core/names.wast:900 +assert_return(() => invoke($2, `\u{3274}`, []), [value("i32", 285)]); + +// ./test/core/names.wast:901 +assert_return(() => invoke($2, `\u{3275}`, []), [value("i32", 286)]); + +// ./test/core/names.wast:902 +assert_return(() => invoke($2, `\u{3276}`, []), [value("i32", 287)]); + +// ./test/core/names.wast:903 +assert_return(() => invoke($2, `\u{3277}`, []), [value("i32", 288)]); + +// ./test/core/names.wast:904 +assert_return(() => invoke($2, `\u{3278}`, []), [value("i32", 289)]); + +// ./test/core/names.wast:905 +assert_return(() => invoke($2, `\u{3279}`, []), [value("i32", 290)]); + +// ./test/core/names.wast:906 +assert_return(() => invoke($2, `\u{327a}`, []), [value("i32", 291)]); + +// ./test/core/names.wast:907 +assert_return(() => invoke($2, `\u{327b}`, []), [value("i32", 292)]); + +// ./test/core/names.wast:908 +assert_return(() => invoke($2, `\u{32d0}`, []), [value("i32", 293)]); + +// ./test/core/names.wast:909 +assert_return(() => invoke($2, `\u{a00a}`, []), [value("i32", 294)]); + +// ./test/core/names.wast:910 +assert_return(() => invoke($2, `\u{a4ee}`, []), [value("i32", 295)]); + +// ./test/core/names.wast:911 +assert_return(() => invoke($2, `\u{a549}`, []), [value("i32", 296)]); + +// ./test/core/names.wast:912 +assert_return(() => invoke($2, `\u{a6a0}`, []), [value("i32", 297)]); + +// ./test/core/names.wast:913 +assert_return(() => invoke($2, `\u{a800}`, []), [value("i32", 298)]); + +// ./test/core/names.wast:914 +assert_return(() => invoke($2, `\u{a823}`, []), [value("i32", 299)]); + +// ./test/core/names.wast:915 +assert_return(() => invoke($2, `\u{a85d}`, []), [value("i32", 300)]); + +// ./test/core/names.wast:916 +assert_return(() => invoke($2, `\u{a882}`, []), [value("i32", 301)]); + +// ./test/core/names.wast:917 +assert_return(() => invoke($2, `\u{a8ea}`, []), [value("i32", 302)]); + +// ./test/core/names.wast:918 +assert_return(() => invoke($2, `\u{a922}`, []), [value("i32", 303)]); + +// ./test/core/names.wast:919 +assert_return(() => invoke($2, `\u{a946}`, []), [value("i32", 304)]); + +// ./test/core/names.wast:920 +assert_return(() => invoke($2, `\u{a984}`, []), [value("i32", 305)]); + +// ./test/core/names.wast:921 +assert_return(() => invoke($2, `\u{aa00}`, []), [value("i32", 306)]); + +// ./test/core/names.wast:922 +assert_return(() => invoke($2, `\u{ff71}`, []), [value("i32", 307)]); + +// ./test/core/names.wast:923 +assert_return(() => invoke($2, `\u{ffc2}`, []), [value("i32", 308)]); + +// ./test/core/names.wast:924 +assert_return(() => invoke($2, `\u{10000}`, []), [value("i32", 309)]); + +// ./test/core/names.wast:925 +assert_return(() => invoke($2, `\u{10280}`, []), [value("i32", 310)]); + +// ./test/core/names.wast:926 +assert_return(() => invoke($2, `\u{102a0}`, []), [value("i32", 311)]); + +// ./test/core/names.wast:927 +assert_return(() => invoke($2, `\u{10300}`, []), [value("i32", 312)]); + +// ./test/core/names.wast:928 +assert_return(() => invoke($2, `\u{103a0}`, []), [value("i32", 313)]); + +// ./test/core/names.wast:929 +assert_return(() => invoke($2, `\u{10496}`, []), [value("i32", 314)]); + +// ./test/core/names.wast:930 +assert_return(() => invoke($2, `\u{10500}`, []), [value("i32", 315)]); + +// ./test/core/names.wast:931 +assert_return(() => invoke($2, `\u{10740}`, []), [value("i32", 316)]); + +// ./test/core/names.wast:932 +assert_return(() => invoke($2, `\u{10800}`, []), [value("i32", 317)]); + +// ./test/core/names.wast:933 +assert_return(() => invoke($2, `\u{10920}`, []), [value("i32", 318)]); + +// ./test/core/names.wast:934 +assert_return(() => invoke($2, `\u{10980}`, []), [value("i32", 319)]); + +// ./test/core/names.wast:935 +assert_return(() => invoke($2, `\u{109a0}`, []), [value("i32", 320)]); + +// ./test/core/names.wast:936 +assert_return(() => invoke($2, `\u{10a00}`, []), [value("i32", 321)]); + +// ./test/core/names.wast:937 +assert_return(() => invoke($2, `\u{10b00}`, []), [value("i32", 322)]); + +// ./test/core/names.wast:938 +assert_return(() => invoke($2, `\u{10c00}`, []), [value("i32", 323)]); + +// ./test/core/names.wast:939 +assert_return(() => invoke($2, `\u{10c01}`, []), [value("i32", 324)]); + +// ./test/core/names.wast:940 +assert_return(() => invoke($2, `\u{10c80}`, []), [value("i32", 325)]); + +// ./test/core/names.wast:941 +assert_return(() => invoke($2, `\u{11005}`, []), [value("i32", 326)]); + +// ./test/core/names.wast:942 +assert_return(() => invoke($2, `\u{11083}`, []), [value("i32", 327)]); + +// ./test/core/names.wast:943 +assert_return(() => invoke($2, `\u{11127}`, []), [value("i32", 328)]); + +// ./test/core/names.wast:944 +assert_return(() => invoke($2, `\u{11150}`, []), [value("i32", 329)]); + +// ./test/core/names.wast:945 +assert_return(() => invoke($2, `\u{11183}`, []), [value("i32", 330)]); + +// ./test/core/names.wast:946 +assert_return(() => invoke($2, `\u{11200}`, []), [value("i32", 331)]); + +// ./test/core/names.wast:947 +assert_return(() => invoke($2, `\u{11280}`, []), [value("i32", 332)]); + +// ./test/core/names.wast:948 +assert_return(() => invoke($2, `\u{112b0}`, []), [value("i32", 333)]); + +// ./test/core/names.wast:949 +assert_return(() => invoke($2, `\u{11305}`, []), [value("i32", 334)]); + +// ./test/core/names.wast:950 +assert_return(() => invoke($2, `\u{11370}`, []), [value("i32", 335)]); + +// ./test/core/names.wast:951 +assert_return(() => invoke($2, `\u{11400}`, []), [value("i32", 336)]); + +// ./test/core/names.wast:952 +assert_return(() => invoke($2, `\u{11481}`, []), [value("i32", 337)]); + +// ./test/core/names.wast:953 +assert_return(() => invoke($2, `\u{11580}`, []), [value("i32", 338)]); + +// ./test/core/names.wast:954 +assert_return(() => invoke($2, `\u{11600}`, []), [value("i32", 339)]); + +// ./test/core/names.wast:955 +assert_return(() => invoke($2, `\u{11680}`, []), [value("i32", 340)]); + +// ./test/core/names.wast:956 +assert_return(() => invoke($2, `\u{11712}`, []), [value("i32", 341)]); + +// ./test/core/names.wast:957 +assert_return(() => invoke($2, `\u{11720}`, []), [value("i32", 342)]); + +// ./test/core/names.wast:958 +assert_return(() => invoke($2, `\u{118a1}`, []), [value("i32", 343)]); + +// ./test/core/names.wast:959 +assert_return(() => invoke($2, `\u{11ad5}`, []), [value("i32", 344)]); + +// ./test/core/names.wast:960 +assert_return(() => invoke($2, `\u{11c00}`, []), [value("i32", 345)]); + +// ./test/core/names.wast:961 +assert_return(() => invoke($2, `\u{11c8f}`, []), [value("i32", 346)]); + +// ./test/core/names.wast:962 +assert_return(() => invoke($2, `\u{11caf}`, []), [value("i32", 347)]); + +// ./test/core/names.wast:963 +assert_return(() => invoke($2, `\u{12000}`, []), [value("i32", 348)]); + +// ./test/core/names.wast:964 +assert_return(() => invoke($2, `\u{169d5}`, []), [value("i32", 349)]); + +// ./test/core/names.wast:965 +assert_return(() => invoke($2, `\u{16a46}`, []), [value("i32", 350)]); + +// ./test/core/names.wast:966 +assert_return(() => invoke($2, `\u{16ae7}`, []), [value("i32", 351)]); + +// ./test/core/names.wast:967 +assert_return(() => invoke($2, `\u{16f54}`, []), [value("i32", 352)]); + +// ./test/core/names.wast:968 +assert_return(() => invoke($2, `\u{1bc41}`, []), [value("i32", 353)]); + +// ./test/core/names.wast:969 +assert_return(() => invoke($2, `\u{1bc64}`, []), [value("i32", 354)]); + +// ./test/core/names.wast:970 +assert_return(() => invoke($2, `\u{1e823}`, []), [value("i32", 355)]); + +// ./test/core/names.wast:971 +assert_return(() => invoke($2, `\u{1f1e6}`, []), [value("i32", 356)]); + +// ./test/core/names.wast:972 +assert_return(() => invoke($2, `\u{2c6d}`, []), [value("i32", 357)]); + +// ./test/core/names.wast:973 +assert_return(() => invoke($2, `\u{39b}`, []), [value("i32", 358)]); + +// ./test/core/names.wast:974 +assert_return(() => invoke($2, `\u{2c70}`, []), [value("i32", 359)]); + +// ./test/core/names.wast:975 +assert_return(() => invoke($2, `\u{aa}`, []), [value("i32", 360)]); + +// ./test/core/names.wast:976 +assert_return(() => invoke($2, `\u{2200}`, []), [value("i32", 361)]); + +// ./test/core/names.wast:977 +assert_return(() => invoke($2, `\u{20b3}`, []), [value("i32", 362)]); + +// ./test/core/names.wast:978 +assert_return(() => invoke($2, `\u{10900}`, []), [value("i32", 363)]); + +// ./test/core/names.wast:979 +assert_return(() => invoke($2, `\u{2c80}`, []), [value("i32", 364)]); + +// ./test/core/names.wast:980 +assert_return(() => invoke($2, `\u{10330}`, []), [value("i32", 365)]); + +// ./test/core/names.wast:981 +assert_return(() => invoke($2, `\u{386}`, []), [value("i32", 366)]); + +// ./test/core/names.wast:982 +assert_return(() => invoke($2, `\u{391}`, []), [value("i32", 367)]); + +// ./test/core/names.wast:983 +assert_return(() => invoke($2, `\u{1f08}`, []), [value("i32", 368)]); + +// ./test/core/names.wast:984 +assert_return(() => invoke($2, `\u{1f09}`, []), [value("i32", 369)]); + +// ./test/core/names.wast:985 +assert_return(() => invoke($2, `\u{1f0a}`, []), [value("i32", 370)]); + +// ./test/core/names.wast:986 +assert_return(() => invoke($2, `\u{1f0b}`, []), [value("i32", 371)]); + +// ./test/core/names.wast:987 +assert_return(() => invoke($2, `\u{1f0c}`, []), [value("i32", 372)]); + +// ./test/core/names.wast:988 +assert_return(() => invoke($2, `\u{1f0d}`, []), [value("i32", 373)]); + +// ./test/core/names.wast:989 +assert_return(() => invoke($2, `\u{1f0e}`, []), [value("i32", 374)]); + +// ./test/core/names.wast:990 +assert_return(() => invoke($2, `\u{1f0f}`, []), [value("i32", 375)]); + +// ./test/core/names.wast:991 +assert_return(() => invoke($2, `\u{1f88}`, []), [value("i32", 376)]); + +// ./test/core/names.wast:992 +assert_return(() => invoke($2, `\u{1f89}`, []), [value("i32", 377)]); + +// ./test/core/names.wast:993 +assert_return(() => invoke($2, `\u{1f8a}`, []), [value("i32", 378)]); + +// ./test/core/names.wast:994 +assert_return(() => invoke($2, `\u{1f8b}`, []), [value("i32", 379)]); + +// ./test/core/names.wast:995 +assert_return(() => invoke($2, `\u{1f8c}`, []), [value("i32", 380)]); + +// ./test/core/names.wast:996 +assert_return(() => invoke($2, `\u{1f8d}`, []), [value("i32", 381)]); + +// ./test/core/names.wast:997 +assert_return(() => invoke($2, `\u{1f8e}`, []), [value("i32", 382)]); + +// ./test/core/names.wast:998 +assert_return(() => invoke($2, `\u{1f8f}`, []), [value("i32", 383)]); + +// ./test/core/names.wast:999 +assert_return(() => invoke($2, `\u{1fb8}`, []), [value("i32", 384)]); + +// ./test/core/names.wast:1000 +assert_return(() => invoke($2, `\u{1fb9}`, []), [value("i32", 385)]); + +// ./test/core/names.wast:1001 +assert_return(() => invoke($2, `\u{1fba}`, []), [value("i32", 386)]); + +// ./test/core/names.wast:1002 +assert_return(() => invoke($2, `\u{1fbb}`, []), [value("i32", 387)]); + +// ./test/core/names.wast:1003 +assert_return(() => invoke($2, `\u{1fbc}`, []), [value("i32", 388)]); + +// ./test/core/names.wast:1004 +assert_return(() => invoke($2, `\u{1d6a8}`, []), [value("i32", 389)]); + +// ./test/core/names.wast:1005 +assert_return(() => invoke($2, `\u{1d6e2}`, []), [value("i32", 390)]); + +// ./test/core/names.wast:1006 +assert_return(() => invoke($2, `\u{1d71c}`, []), [value("i32", 391)]); + +// ./test/core/names.wast:1007 +assert_return(() => invoke($2, `\u{1d756}`, []), [value("i32", 392)]); + +// ./test/core/names.wast:1008 +assert_return(() => invoke($2, `\u{1d790}`, []), [value("i32", 393)]); + +// ./test/core/names.wast:1009 +assert_return(() => invoke($2, `\u{2376}`, []), [value("i32", 394)]); + +// ./test/core/names.wast:1010 +assert_return(() => invoke($2, `\u{237a}`, []), [value("i32", 395)]); + +// ./test/core/names.wast:1011 +assert_return(() => invoke($2, `\u{2a5c}`, []), [value("i32", 396)]); + +// ./test/core/names.wast:1012 +assert_return(() => invoke($2, `\u{15c5}`, []), [value("i32", 397)]); + +// ./test/core/names.wast:1013 +assert_return(() => invoke($2, `\u{13aa}`, []), [value("i32", 398)]); + +// ./test/core/names.wast:1014 +assert_return( + () => invoke($2, + `)\u{2fa}\u{2fc}\u{145cf}\u{1d174}\u{1d176}\u{1d178}\u{1d17a}\u{207e}\u{208e}\u{2769}\u{276b}\u{27ef}\u{fd3f}\u{fe36}\u{fe5a}\u{ff09}\u{ff60}\u{e0029}\u{2773}\u{2775}\u{27e7}\u{27e9}\u{27eb}\u{27ed}\u{2988}\u{298a}\u{2996}\u{2e23}\u{2e25}\u{fe18}\u{fe38}\u{fe3a}\u{fe3c}\u{fe3e}\u{fe40}\u{fe42}\u{fe44}\u{fe48}\u{fe5c}\u{fe5e}\u{ff3d}\u{ff5d}\u{ff63}\u{e005d}\u{e007d}\u{bb}\u{2019}\u{201d}\u{203a}\u{276f}`, + [], + ), + [value("i32", 399)], +); + +// ./test/core/names.wast:1015 +assert_return( + () => invoke($2, + `(\u{2f9}\u{2fb}\u{145ce}\u{1d173}\u{1d175}\u{1d177}\u{1d179}\u{207d}\u{208d}\u{2768}\u{276a}\u{27ee}\u{fd3e}\u{fe35}\u{fe59}\u{ff08}\u{ff5f}\u{e0028}\u{2772}\u{2774}\u{27e6}\u{27e8}\u{27ea}\u{27ec}\u{2987}\u{2989}\u{2995}\u{2e22}\u{2e24}\u{fe17}\u{fe37}\u{fe39}\u{fe3b}\u{fe3d}\u{fe3f}\u{fe41}\u{fe43}\u{fe47}\u{fe5b}\u{fe5d}\u{ff3b}\u{ff5b}\u{ff62}\u{e005b}\u{e007b}\u{ab}\u{2018}\u{201c}\u{2039}\u{276e}`, + [], + ), + [value("i32", 400)], +); + +// ./test/core/names.wast:1016 +assert_return(() => invoke($2, `\u{1da8b}\u{1daa4}`, []), [value("i32", 401)]); + +// ./test/core/names.wast:1017 +assert_return(() => invoke($2, `\u{1da8b}`, []), [value("i32", 402)]); + +// ./test/core/names.wast:1018 +assert_return(() => invoke($2, `\u{bd}`, []), [value("i32", 403)]); + +// ./test/core/names.wast:1019 +assert_return(() => invoke($2, `1\u{2044}2`, []), [value("i32", 404)]); + +// ./test/core/names.wast:1020 +assert_return(() => invoke($2, `1/2`, []), [value("i32", 405)]); + +// ./test/core/names.wast:1021 +assert_return(() => invoke($2, `\u{b73}`, []), [value("i32", 406)]); + +// ./test/core/names.wast:1022 +assert_return(() => invoke($2, `\u{d74}`, []), [value("i32", 407)]); + +// ./test/core/names.wast:1023 +assert_return(() => invoke($2, `\u{2cfd}`, []), [value("i32", 408)]); + +// ./test/core/names.wast:1024 +assert_return(() => invoke($2, `\u{a831}`, []), [value("i32", 409)]); + +// ./test/core/names.wast:1025 +assert_return(() => invoke($2, `\u{10141}`, []), [value("i32", 410)]); + +// ./test/core/names.wast:1026 +assert_return(() => invoke($2, `\u{10175}`, []), [value("i32", 411)]); + +// ./test/core/names.wast:1027 +assert_return(() => invoke($2, `\u{10176}`, []), [value("i32", 412)]); + +// ./test/core/names.wast:1028 +assert_return(() => invoke($2, `\u{109bd}`, []), [value("i32", 413)]); + +// ./test/core/names.wast:1029 +assert_return(() => invoke($2, `\u{10e7b}`, []), [value("i32", 414)]); + +// ./test/core/names.wast:1030 +assert_return(() => invoke($2, `\u{ff02}`, []), [value("i32", 415)]); + +// ./test/core/names.wast:1031 +assert_return(() => invoke($2, `\x7f`, []), [value("i32", 416)]); + +// ./test/core/names.wast:1032 +assert_return(() => invoke($2, `\x08`, []), [value("i32", 417)]); + +// ./test/core/names.wast:1033 +assert_return(() => invoke($2, `\u{232b}`, []), [value("i32", 418)]); + +// ./test/core/names.wast:1034 +assert_return(() => invoke($2, `\u{2326}`, []), [value("i32", 419)]); + +// ./test/core/names.wast:1035 +assert_return(() => invoke($2, `\u{2408}`, []), [value("i32", 420)]); + +// ./test/core/names.wast:1036 +assert_return(() => invoke($2, `\u{2421}`, []), [value("i32", 421)]); + +// ./test/core/names.wast:1037 +assert_return(() => invoke($2, `\u{1dfb}`, []), [value("i32", 422)]); + +// ./test/core/names.wast:1038 +assert_return(() => invoke($2, `\x0f`, []), [value("i32", 423)]); + +// ./test/core/names.wast:1039 +assert_return(() => invoke($2, `\u{2190}`, []), [value("i32", 424)]); + +// ./test/core/names.wast:1040 +assert_return(() => invoke($2, `\u{2327}`, []), [value("i32", 425)]); + +// ./test/core/names.wast:1041 +assert_return(() => invoke($2, `\u{2352}`, []), [value("i32", 426)]); + +// ./test/core/names.wast:1042 +assert_return(() => invoke($2, `\u{2354}`, []), [value("i32", 427)]); + +// ./test/core/names.wast:1043 +assert_return(() => invoke($2, `\u{2362}`, []), [value("i32", 428)]); + +// ./test/core/names.wast:1044 +assert_return(() => invoke($2, `\u{236b}`, []), [value("i32", 429)]); + +// ./test/core/names.wast:1045 +assert_return(() => invoke($2, `\x1a`, []), [value("i32", 430)]); + +// ./test/core/names.wast:1046 +assert_return(() => invoke($2, `\u{2426}`, []), [value("i32", 431)]); + +// ./test/core/names.wast:1047 +assert_return(() => invoke($2, `\u{241a}`, []), [value("i32", 432)]); + +// ./test/core/names.wast:1048 +assert_return(() => invoke($2, `\u{fffc}`, []), [value("i32", 433)]); + +// ./test/core/names.wast:1049 +assert_return(() => invoke($2, `?`, []), [value("i32", 434)]); + +// ./test/core/names.wast:1050 +assert_return(() => invoke($2, `\u{bf}`, []), [value("i32", 435)]); + +// ./test/core/names.wast:1051 +assert_return(() => invoke($2, `\u{1945}`, []), [value("i32", 436)]); + +// ./test/core/names.wast:1052 +assert_return(() => invoke($2, `\u{37e}`, []), [value("i32", 437)]); + +// ./test/core/names.wast:1053 +assert_return(() => invoke($2, `\u{55e}`, []), [value("i32", 438)]); + +// ./test/core/names.wast:1054 +assert_return(() => invoke($2, `\u{61f}`, []), [value("i32", 439)]); + +// ./test/core/names.wast:1055 +assert_return(() => invoke($2, `\u{1367}`, []), [value("i32", 440)]); + +// ./test/core/names.wast:1056 +assert_return(() => invoke($2, `\u{2047}`, []), [value("i32", 441)]); + +// ./test/core/names.wast:1057 +assert_return(() => invoke($2, `\u{2370}`, []), [value("i32", 442)]); + +// ./test/core/names.wast:1058 +assert_return(() => invoke($2, `\u{2753}`, []), [value("i32", 443)]); + +// ./test/core/names.wast:1059 +assert_return(() => invoke($2, `\u{2754}`, []), [value("i32", 444)]); + +// ./test/core/names.wast:1060 +assert_return(() => invoke($2, `\u{2cfa}`, []), [value("i32", 445)]); + +// ./test/core/names.wast:1061 +assert_return(() => invoke($2, `\u{2cfb}`, []), [value("i32", 446)]); + +// ./test/core/names.wast:1062 +assert_return(() => invoke($2, `\u{2e2e}`, []), [value("i32", 447)]); + +// ./test/core/names.wast:1063 +assert_return(() => invoke($2, `\u{3244}`, []), [value("i32", 448)]); + +// ./test/core/names.wast:1064 +assert_return(() => invoke($2, `\u{a60f}`, []), [value("i32", 449)]); + +// ./test/core/names.wast:1065 +assert_return(() => invoke($2, `\u{a6f7}`, []), [value("i32", 450)]); + +// ./test/core/names.wast:1066 +assert_return(() => invoke($2, `\u{fe16}`, []), [value("i32", 451)]); + +// ./test/core/names.wast:1067 +assert_return(() => invoke($2, `\u{fe56}`, []), [value("i32", 452)]); + +// ./test/core/names.wast:1068 +assert_return(() => invoke($2, `\u{ff1f}`, []), [value("i32", 453)]); + +// ./test/core/names.wast:1069 +assert_return(() => invoke($2, `\u{11143}`, []), [value("i32", 454)]); + +// ./test/core/names.wast:1070 +assert_return(() => invoke($2, `\u{1e95f}`, []), [value("i32", 455)]); + +// ./test/core/names.wast:1071 +assert_return(() => invoke($2, `\u{e003f}`, []), [value("i32", 456)]); + +// ./test/core/names.wast:1072 +assert_return(() => invoke($2, `\u{16844}`, []), [value("i32", 457)]); + +// ./test/core/names.wast:1073 +assert_return(() => invoke($2, `\u{2bd1}`, []), [value("i32", 458)]); + +// ./test/core/names.wast:1074 +assert_return(() => invoke($2, `\u{b6}`, []), [value("i32", 459)]); + +// ./test/core/names.wast:1075 +assert_return(() => invoke($2, `\u{204b}`, []), [value("i32", 460)]); + +// ./test/core/names.wast:1076 +assert_return(() => invoke($2, `\u{700}`, []), [value("i32", 461)]); + +// ./test/core/names.wast:1077 +assert_return(() => invoke($2, `\u{10fb}`, []), [value("i32", 462)]); + +// ./test/core/names.wast:1078 +assert_return(() => invoke($2, `\u{1368}`, []), [value("i32", 463)]); + +// ./test/core/names.wast:1079 +assert_return(() => invoke($2, `\u{3037}`, []), [value("i32", 464)]); + +// ./test/core/names.wast:1080 +assert_return(() => invoke($2, `\u{2761}`, []), [value("i32", 465)]); + +// ./test/core/names.wast:1081 +assert_return(() => invoke($2, `\u{2e0f}`, []), [value("i32", 466)]); + +// ./test/core/names.wast:1082 +assert_return(() => invoke($2, `\u{2e10}`, []), [value("i32", 467)]); + +// ./test/core/names.wast:1083 +assert_return(() => invoke($2, `\u{2e11}`, []), [value("i32", 468)]); + +// ./test/core/names.wast:1084 +assert_return(() => invoke($2, `\u{2e0e}`, []), [value("i32", 469)]); + +// ./test/core/names.wast:1085 +assert_return(() => invoke($2, `\x14`, []), [value("i32", 470)]); + +// ./test/core/names.wast:1086 +assert_return(() => invoke($2, `\u{2619}`, []), [value("i32", 471)]); + +// ./test/core/names.wast:1087 +assert_return(() => invoke($2, `\u{2e3f}`, []), [value("i32", 472)]); + +// ./test/core/names.wast:1088 +assert_return(() => invoke($2, `\u{3007}`, []), [value("i32", 473)]); + +// ./test/core/names.wast:1089 +assert_return(() => invoke($2, `\u{e5b}`, []), [value("i32", 474)]); + +// ./test/core/names.wast:1090 +assert_return(() => invoke($2, `\u{a66e}`, []), [value("i32", 475)]); + +// ./test/core/names.wast:1091 +assert_return(() => invoke($2, `\u{3d3}`, []), [value("i32", 476)]); + +// ./test/core/names.wast:1092 +assert_return(() => invoke($2, `\u{3d4}`, []), [value("i32", 477)]); + +// ./test/core/names.wast:1093 +assert_return(() => invoke($2, `\u{1e9b}`, []), [value("i32", 478)]); + +// ./test/core/names.wast:1095 +let $3 = instantiate(`(module + ;; Test that we can use indices instead of names to reference imports, + ;; exports, functions and parameters. + (import "spectest" "print_i32" (func (param i32))) + (func (import "spectest" "print_i32") (param i32)) + (func (param i32) (param i32) + (call 0 (local.get 0)) + (call 1 (local.get 1)) + ) + (export "print32" (func 2)) +)`); + +// ./test/core/names.wast:1107 +assert_return(() => invoke($3, `print32`, [42, 123]), []); diff --git a/js/src/jit-test/tests/wasm/spec/spec/nop.wast.js b/js/src/jit-test/tests/wasm/spec/spec/nop.wast.js new file mode 100644 index 0000000000..c736361363 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/nop.wast.js @@ -0,0 +1,593 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/nop.wast + +// ./test/core/nop.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definitions + (func $$dummy) + (func $$3-ary (param i32 i32 i32) (result i32) + local.get 0 local.get 1 local.get 2 i32.sub i32.add + ) + (memory 1) + + (func (export "as-func-first") (result i32) + (nop) (i32.const 1) + ) + (func (export "as-func-mid") (result i32) + (call $$dummy) (nop) (i32.const 2) + ) + (func (export "as-func-last") (result i32) + (call $$dummy) (i32.const 3) (nop) + ) + (func (export "as-func-everywhere") (result i32) + (nop) (nop) (call $$dummy) (nop) (i32.const 4) (nop) (nop) + ) + + (func (export "as-drop-first") (param i32) + (nop) (local.get 0) (drop) + ) + (func (export "as-drop-last") (param i32) + (local.get 0) (nop) (drop) + ) + (func (export "as-drop-everywhere") (param i32) + (nop) (nop) (local.get 0) (nop) (nop) (drop) + ) + + (func (export "as-select-first") (param i32) (result i32) + (nop) (local.get 0) (local.get 0) (local.get 0) (select) + ) + (func (export "as-select-mid1") (param i32) (result i32) + (local.get 0) (nop) (local.get 0) (local.get 0) (select) + ) + (func (export "as-select-mid2") (param i32) (result i32) + (local.get 0) (local.get 0) (nop) (local.get 0) (select) + ) + (func (export "as-select-last") (param i32) (result i32) + (local.get 0) (local.get 0) (local.get 0) (nop) (select) + ) + (func (export "as-select-everywhere") (param i32) (result i32) + (nop) (local.get 0) (nop) (nop) (local.get 0) + (nop) (nop) (local.get 0) (nop) (nop) (select) + ) + + (func (export "as-block-first") (result i32) + (block (result i32) (nop) (i32.const 2)) + ) + (func (export "as-block-mid") (result i32) + (block (result i32) (call $$dummy) (nop) (i32.const 2)) + ) + (func (export "as-block-last") (result i32) + (block (result i32) (nop) (call $$dummy) (i32.const 3) (nop)) + ) + (func (export "as-block-everywhere") (result i32) + (block (result i32) + (nop) (nop) (call $$dummy) (nop) (i32.const 4) (nop) (nop) + ) + ) + + (func (export "as-loop-first") (result i32) + (loop (result i32) (nop) (i32.const 2)) + ) + (func (export "as-loop-mid") (result i32) + (loop (result i32) (call $$dummy) (nop) (i32.const 2)) + ) + (func (export "as-loop-last") (result i32) + (loop (result i32) (call $$dummy) (i32.const 3) (nop)) + ) + (func (export "as-loop-everywhere") (result i32) + (loop (result i32) + (nop) (nop) (call $$dummy) (nop) (i32.const 4) (nop) (nop) + ) + ) + + (func (export "as-if-condition") (param i32) + (local.get 0) (nop) (if (then (call $$dummy))) + ) + (func (export "as-if-then") (param i32) + (if (local.get 0) (then (nop)) (else (call $$dummy))) + ) + (func (export "as-if-else") (param i32) + (if (local.get 0) (then (call $$dummy)) (else (nop))) + ) + + (func (export "as-br-first") (param i32) (result i32) + (block (result i32) (nop) (local.get 0) (br 0)) + ) + (func (export "as-br-last") (param i32) (result i32) + (block (result i32) (local.get 0) (nop) (br 0)) + ) + (func (export "as-br-everywhere") (param i32) (result i32) + (block (result i32) (nop) (nop) (local.get 0) (nop) (nop) (br 0)) + ) + + (func (export "as-br_if-first") (param i32) (result i32) + (block (result i32) (nop) (local.get 0) (local.get 0) (br_if 0)) + ) + (func (export "as-br_if-mid") (param i32) (result i32) + (block (result i32) (local.get 0) (nop) (local.get 0) (br_if 0)) + ) + (func (export "as-br_if-last") (param i32) (result i32) + (block (result i32) (local.get 0) (local.get 0) (nop) (br_if 0)) + ) + (func (export "as-br_if-everywhere") (param i32) (result i32) + (block (result i32) + (nop) (nop) (local.get 0) (nop) (nop) (local.get 0) (nop) (nop) + (br_if 0) + ) + ) + + (func (export "as-br_table-first") (param i32) (result i32) + (block (result i32) (nop) (local.get 0) (local.get 0) (br_table 0 0)) + ) + (func (export "as-br_table-mid") (param i32) (result i32) + (block (result i32) (local.get 0) (nop) (local.get 0) (br_table 0 0)) + ) + (func (export "as-br_table-last") (param i32) (result i32) + (block (result i32) (local.get 0) (local.get 0) (nop) (br_table 0 0)) + ) + (func (export "as-br_table-everywhere") (param i32) (result i32) + (block (result i32) + (nop) (nop) (local.get 0) (nop) (nop) (local.get 0) (nop) (nop) + (br_table 0 0) + ) + ) + + (func (export "as-return-first") (param i32) (result i32) + (nop) (local.get 0) (return) + ) + (func (export "as-return-last") (param i32) (result i32) + (local.get 0) (nop) (return) + ) + (func (export "as-return-everywhere") (param i32) (result i32) + (nop) (nop) (local.get 0) (nop) (nop) (return) + ) + + (func (export "as-call-first") (param i32 i32 i32) (result i32) + (nop) (local.get 0) (local.get 1) (local.get 2) (call $$3-ary) + ) + (func (export "as-call-mid1") (param i32 i32 i32) (result i32) + (local.get 0) (nop) (local.get 1) (local.get 2) (call $$3-ary) + ) + (func (export "as-call-mid2") (param i32 i32 i32) (result i32) + (local.get 0) (local.get 1) (nop) (local.get 2) (call $$3-ary) + ) + (func (export "as-call-last") (param i32 i32 i32) (result i32) + (local.get 0) (local.get 1) (local.get 2) (nop) (call $$3-ary) + ) + (func (export "as-call-everywhere") (param i32 i32 i32) (result i32) + (nop) (nop) (local.get 0) (nop) (nop) (local.get 1) + (nop) (nop) (local.get 2) (nop) (nop) (call $$3-ary) + ) + + (func (export "as-unary-first") (param i32) (result i32) + (nop) (local.get 0) (i32.ctz) + ) + (func (export "as-unary-last") (param i32) (result i32) + (local.get 0) (nop) (i32.ctz) + ) + (func (export "as-unary-everywhere") (param i32) (result i32) + (nop) (nop) (local.get 0) (nop) (nop) (i32.ctz) + ) + + (func (export "as-binary-first") (param i32) (result i32) + (nop) (local.get 0) (local.get 0) (i32.add) + ) + (func (export "as-binary-mid") (param i32) (result i32) + (local.get 0) (nop) (local.get 0) (i32.add) + ) + (func (export "as-binary-last") (param i32) (result i32) + (local.get 0) (local.get 0) (nop) (i32.add) + ) + (func (export "as-binary-everywhere") (param i32) (result i32) + (nop) (local.get 0) (nop) (nop) (local.get 0) (nop) (nop) (i32.add) + ) + + (func (export "as-test-first") (param i32) (result i32) + (nop) (local.get 0) (i32.eqz) + ) + (func (export "as-test-last") (param i32) (result i32) + (local.get 0) (nop) (i32.eqz) + ) + (func (export "as-test-everywhere") (param i32) (result i32) + (nop) (nop) (local.get 0) (nop) (nop) i32.eqz + ) + + (func (export "as-compare-first") (param i32) (result i32) + (nop) (local.get 0) (local.get 0) (i32.ne) + ) + (func (export "as-compare-mid") (param i32) (result i32) + (local.get 0) (nop) (local.get 0) (i32.ne) + ) + (func (export "as-compare-last") (param i32) (result i32) + (local.get 0) (local.get 0) (nop) (i32.lt_u) + ) + (func (export "as-compare-everywhere") (param i32) (result i32) + (nop) (local.get 0) (nop) (nop) (local.get 0) (nop) (nop) (i32.le_s) + ) + + (func (export "as-memory.grow-first") (param i32) (result i32) + (nop) (local.get 0) (memory.grow) + ) + (func (export "as-memory.grow-last") (param i32) (result i32) + (local.get 0) (nop) (memory.grow) + ) + (func (export "as-memory.grow-everywhere") (param i32) (result i32) + (nop) (nop) (local.get 0) (nop) (nop) (memory.grow) + ) + + (func $$func (param i32 i32) (result i32) (local.get 0)) + (type $$check (func (param i32 i32) (result i32))) + (table funcref (elem $$func)) + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (nop) (i32.const 1) (i32.const 2) (i32.const 0) + (call_indirect (type $$check)) + ) + ) + (func (export "as-call_indirect-mid1") (result i32) + (block (result i32) + (i32.const 1) (nop) (i32.const 2) (i32.const 0) + (call_indirect (type $$check)) + ) + ) + (func (export "as-call_indirect-mid2") (result i32) + (block (result i32) + (i32.const 1) (i32.const 2) (nop) (i32.const 0) + (call_indirect (type $$check)) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (i32.const 1) (i32.const 2) (i32.const 0) (nop) + (call_indirect (type $$check)) + ) + ) + (func (export "as-call_indirect-everywhere") (result i32) + (block (result i32) + (nop) (nop) (i32.const 1) (nop) (nop) (i32.const 2) (nop) (nop) (i32.const 0) (nop) (nop) + (call_indirect (type $$check)) + ) + ) + + (func (export "as-local.set-first") (param i32) (result i32) + (nop) (i32.const 2) (local.set 0) (local.get 0) + ) + (func (export "as-local.set-last") (param i32) (result i32) + (i32.const 2) (nop) (local.set 0) (local.get 0) + ) + (func (export "as-local.set-everywhere") (param i32) (result i32) + (nop) (nop) (i32.const 2) (nop) (nop) (local.set 0) (local.get 0) + ) + + (func (export "as-local.tee-first") (param i32) (result i32) + (nop) (i32.const 2) (local.tee 0) + ) + (func (export "as-local.tee-last") (param i32) (result i32) + (i32.const 2) (nop) (local.tee 0) + ) + (func (export "as-local.tee-everywhere") (param i32) (result i32) + (nop) (nop) (i32.const 2) (nop) (nop) (local.tee 0) + ) + + (global $$a (mut i32) (i32.const 0)) + (func (export "as-global.set-first") (result i32) + (nop) (i32.const 2) (global.set $$a) (global.get $$a) + ) + (func (export "as-global.set-last") (result i32) + (i32.const 2) (nop) (global.set $$a) (global.get $$a) + ) + (func (export "as-global.set-everywhere") (result i32) + (nop) (nop) (i32.const 2) (nop) (nop) (global.set 0) + (global.get $$a) + ) + + (func (export "as-load-first") (param i32) (result i32) + (nop) (local.get 0) (i32.load) + ) + (func (export "as-load-last") (param i32) (result i32) + (local.get 0) (nop) (i32.load) + ) + (func (export "as-load-everywhere") (param i32) (result i32) + (nop) (nop) (local.get 0) (nop) (nop) (i32.load) + ) + + (func (export "as-store-first") (param i32 i32) + (nop) (local.get 0) (local.get 1) (i32.store) + ) + (func (export "as-store-mid") (param i32 i32) + (local.get 0) (nop) (local.get 1) (i32.store) + ) + (func (export "as-store-last") (param i32 i32) + (local.get 0) (local.get 1) (nop) (i32.store) + ) + (func (export "as-store-everywhere") (param i32 i32) + (nop) (nop) (local.get 0) (nop) (nop) (local.get 1) (nop) (nop) (i32.store) + ) +)`); + +// ./test/core/nop.wast:306 +assert_return(() => invoke($0, `as-func-first`, []), [value("i32", 1)]); + +// ./test/core/nop.wast:307 +assert_return(() => invoke($0, `as-func-mid`, []), [value("i32", 2)]); + +// ./test/core/nop.wast:308 +assert_return(() => invoke($0, `as-func-last`, []), [value("i32", 3)]); + +// ./test/core/nop.wast:309 +assert_return(() => invoke($0, `as-func-everywhere`, []), [value("i32", 4)]); + +// ./test/core/nop.wast:311 +assert_return(() => invoke($0, `as-drop-first`, [0]), []); + +// ./test/core/nop.wast:312 +assert_return(() => invoke($0, `as-drop-last`, [0]), []); + +// ./test/core/nop.wast:313 +assert_return(() => invoke($0, `as-drop-everywhere`, [0]), []); + +// ./test/core/nop.wast:315 +assert_return(() => invoke($0, `as-select-first`, [3]), [value("i32", 3)]); + +// ./test/core/nop.wast:316 +assert_return(() => invoke($0, `as-select-mid1`, [3]), [value("i32", 3)]); + +// ./test/core/nop.wast:317 +assert_return(() => invoke($0, `as-select-mid2`, [3]), [value("i32", 3)]); + +// ./test/core/nop.wast:318 +assert_return(() => invoke($0, `as-select-last`, [3]), [value("i32", 3)]); + +// ./test/core/nop.wast:319 +assert_return(() => invoke($0, `as-select-everywhere`, [3]), [value("i32", 3)]); + +// ./test/core/nop.wast:321 +assert_return(() => invoke($0, `as-block-first`, []), [value("i32", 2)]); + +// ./test/core/nop.wast:322 +assert_return(() => invoke($0, `as-block-mid`, []), [value("i32", 2)]); + +// ./test/core/nop.wast:323 +assert_return(() => invoke($0, `as-block-last`, []), [value("i32", 3)]); + +// ./test/core/nop.wast:324 +assert_return(() => invoke($0, `as-block-everywhere`, []), [value("i32", 4)]); + +// ./test/core/nop.wast:326 +assert_return(() => invoke($0, `as-loop-first`, []), [value("i32", 2)]); + +// ./test/core/nop.wast:327 +assert_return(() => invoke($0, `as-loop-mid`, []), [value("i32", 2)]); + +// ./test/core/nop.wast:328 +assert_return(() => invoke($0, `as-loop-last`, []), [value("i32", 3)]); + +// ./test/core/nop.wast:329 +assert_return(() => invoke($0, `as-loop-everywhere`, []), [value("i32", 4)]); + +// ./test/core/nop.wast:331 +assert_return(() => invoke($0, `as-if-condition`, [0]), []); + +// ./test/core/nop.wast:332 +assert_return(() => invoke($0, `as-if-condition`, [-1]), []); + +// ./test/core/nop.wast:333 +assert_return(() => invoke($0, `as-if-then`, [0]), []); + +// ./test/core/nop.wast:334 +assert_return(() => invoke($0, `as-if-then`, [4]), []); + +// ./test/core/nop.wast:335 +assert_return(() => invoke($0, `as-if-else`, [0]), []); + +// ./test/core/nop.wast:336 +assert_return(() => invoke($0, `as-if-else`, [3]), []); + +// ./test/core/nop.wast:338 +assert_return(() => invoke($0, `as-br-first`, [5]), [value("i32", 5)]); + +// ./test/core/nop.wast:339 +assert_return(() => invoke($0, `as-br-last`, [6]), [value("i32", 6)]); + +// ./test/core/nop.wast:340 +assert_return(() => invoke($0, `as-br-everywhere`, [7]), [value("i32", 7)]); + +// ./test/core/nop.wast:342 +assert_return(() => invoke($0, `as-br_if-first`, [4]), [value("i32", 4)]); + +// ./test/core/nop.wast:343 +assert_return(() => invoke($0, `as-br_if-mid`, [5]), [value("i32", 5)]); + +// ./test/core/nop.wast:344 +assert_return(() => invoke($0, `as-br_if-last`, [6]), [value("i32", 6)]); + +// ./test/core/nop.wast:345 +assert_return(() => invoke($0, `as-br_if-everywhere`, [7]), [value("i32", 7)]); + +// ./test/core/nop.wast:347 +assert_return(() => invoke($0, `as-br_table-first`, [4]), [value("i32", 4)]); + +// ./test/core/nop.wast:348 +assert_return(() => invoke($0, `as-br_table-mid`, [5]), [value("i32", 5)]); + +// ./test/core/nop.wast:349 +assert_return(() => invoke($0, `as-br_table-last`, [6]), [value("i32", 6)]); + +// ./test/core/nop.wast:350 +assert_return(() => invoke($0, `as-br_table-everywhere`, [7]), [value("i32", 7)]); + +// ./test/core/nop.wast:352 +assert_return(() => invoke($0, `as-return-first`, [5]), [value("i32", 5)]); + +// ./test/core/nop.wast:353 +assert_return(() => invoke($0, `as-return-last`, [6]), [value("i32", 6)]); + +// ./test/core/nop.wast:354 +assert_return(() => invoke($0, `as-return-everywhere`, [7]), [value("i32", 7)]); + +// ./test/core/nop.wast:356 +assert_return(() => invoke($0, `as-call-first`, [3, 1, 2]), [value("i32", 2)]); + +// ./test/core/nop.wast:357 +assert_return(() => invoke($0, `as-call-mid1`, [3, 1, 2]), [value("i32", 2)]); + +// ./test/core/nop.wast:358 +assert_return(() => invoke($0, `as-call-mid2`, [0, 3, 1]), [value("i32", 2)]); + +// ./test/core/nop.wast:359 +assert_return(() => invoke($0, `as-call-last`, [10, 9, -1]), [value("i32", 20)]); + +// ./test/core/nop.wast:360 +assert_return(() => invoke($0, `as-call-everywhere`, [2, 1, 5]), [value("i32", -2)]); + +// ./test/core/nop.wast:362 +assert_return(() => invoke($0, `as-unary-first`, [30]), [value("i32", 1)]); + +// ./test/core/nop.wast:363 +assert_return(() => invoke($0, `as-unary-last`, [30]), [value("i32", 1)]); + +// ./test/core/nop.wast:364 +assert_return(() => invoke($0, `as-unary-everywhere`, [12]), [value("i32", 2)]); + +// ./test/core/nop.wast:366 +assert_return(() => invoke($0, `as-binary-first`, [3]), [value("i32", 6)]); + +// ./test/core/nop.wast:367 +assert_return(() => invoke($0, `as-binary-mid`, [3]), [value("i32", 6)]); + +// ./test/core/nop.wast:368 +assert_return(() => invoke($0, `as-binary-last`, [3]), [value("i32", 6)]); + +// ./test/core/nop.wast:369 +assert_return(() => invoke($0, `as-binary-everywhere`, [3]), [value("i32", 6)]); + +// ./test/core/nop.wast:371 +assert_return(() => invoke($0, `as-test-first`, [0]), [value("i32", 1)]); + +// ./test/core/nop.wast:372 +assert_return(() => invoke($0, `as-test-last`, [0]), [value("i32", 1)]); + +// ./test/core/nop.wast:373 +assert_return(() => invoke($0, `as-test-everywhere`, [0]), [value("i32", 1)]); + +// ./test/core/nop.wast:375 +assert_return(() => invoke($0, `as-compare-first`, [3]), [value("i32", 0)]); + +// ./test/core/nop.wast:376 +assert_return(() => invoke($0, `as-compare-mid`, [3]), [value("i32", 0)]); + +// ./test/core/nop.wast:377 +assert_return(() => invoke($0, `as-compare-last`, [3]), [value("i32", 0)]); + +// ./test/core/nop.wast:378 +assert_return(() => invoke($0, `as-compare-everywhere`, [3]), [value("i32", 1)]); + +// ./test/core/nop.wast:380 +assert_return(() => invoke($0, `as-memory.grow-first`, [0]), [value("i32", 1)]); + +// ./test/core/nop.wast:381 +assert_return(() => invoke($0, `as-memory.grow-last`, [2]), [value("i32", 1)]); + +// ./test/core/nop.wast:382 +assert_return(() => invoke($0, `as-memory.grow-everywhere`, [12]), [value("i32", 3)]); + +// ./test/core/nop.wast:384 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 1)]); + +// ./test/core/nop.wast:385 +assert_return(() => invoke($0, `as-call_indirect-mid1`, []), [value("i32", 1)]); + +// ./test/core/nop.wast:386 +assert_return(() => invoke($0, `as-call_indirect-mid2`, []), [value("i32", 1)]); + +// ./test/core/nop.wast:387 +assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", 1)]); + +// ./test/core/nop.wast:388 +assert_return(() => invoke($0, `as-call_indirect-everywhere`, []), [value("i32", 1)]); + +// ./test/core/nop.wast:390 +assert_return(() => invoke($0, `as-local.set-first`, [1]), [value("i32", 2)]); + +// ./test/core/nop.wast:391 +assert_return(() => invoke($0, `as-local.set-last`, [1]), [value("i32", 2)]); + +// ./test/core/nop.wast:392 +assert_return(() => invoke($0, `as-local.set-everywhere`, [1]), [value("i32", 2)]); + +// ./test/core/nop.wast:394 +assert_return(() => invoke($0, `as-local.tee-first`, [1]), [value("i32", 2)]); + +// ./test/core/nop.wast:395 +assert_return(() => invoke($0, `as-local.tee-last`, [1]), [value("i32", 2)]); + +// ./test/core/nop.wast:396 +assert_return(() => invoke($0, `as-local.tee-everywhere`, [1]), [value("i32", 2)]); + +// ./test/core/nop.wast:398 +assert_return(() => invoke($0, `as-global.set-first`, []), [value("i32", 2)]); + +// ./test/core/nop.wast:399 +assert_return(() => invoke($0, `as-global.set-last`, []), [value("i32", 2)]); + +// ./test/core/nop.wast:400 +assert_return(() => invoke($0, `as-global.set-everywhere`, []), [value("i32", 2)]); + +// ./test/core/nop.wast:402 +assert_return(() => invoke($0, `as-load-first`, [100]), [value("i32", 0)]); + +// ./test/core/nop.wast:403 +assert_return(() => invoke($0, `as-load-last`, [100]), [value("i32", 0)]); + +// ./test/core/nop.wast:404 +assert_return(() => invoke($0, `as-load-everywhere`, [100]), [value("i32", 0)]); + +// ./test/core/nop.wast:406 +assert_return(() => invoke($0, `as-store-first`, [0, 1]), []); + +// ./test/core/nop.wast:407 +assert_return(() => invoke($0, `as-store-mid`, [0, 2]), []); + +// ./test/core/nop.wast:408 +assert_return(() => invoke($0, `as-store-last`, [0, 3]), []); + +// ./test/core/nop.wast:409 +assert_return(() => invoke($0, `as-store-everywhere`, [0, 4]), []); + +// ./test/core/nop.wast:411 +assert_invalid( + () => instantiate(`(module (func $$type-i32 (result i32) (nop)))`), + `type mismatch`, +); + +// ./test/core/nop.wast:415 +assert_invalid( + () => instantiate(`(module (func $$type-i64 (result i64) (nop)))`), + `type mismatch`, +); + +// ./test/core/nop.wast:419 +assert_invalid( + () => instantiate(`(module (func $$type-f32 (result f32) (nop)))`), + `type mismatch`, +); + +// ./test/core/nop.wast:423 +assert_invalid( + () => instantiate(`(module (func $$type-f64 (result f64) (nop)))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/ref_func.wast.js b/js/src/jit-test/tests/wasm/spec/spec/ref_func.wast.js new file mode 100644 index 0000000000..3ca5cea002 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/ref_func.wast.js @@ -0,0 +1,156 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/ref_func.wast + +// ./test/core/ref_func.wast:1 +let $0 = instantiate(`(module + (func (export "f") (param $$x i32) (result i32) (local.get $$x)) +)`); + +// ./test/core/ref_func.wast:4 +register($0, `M`); + +// ./test/core/ref_func.wast:6 +let $1 = instantiate(`(module + (func $$f (import "M" "f") (param i32) (result i32)) + (func $$g (param $$x i32) (result i32) + (i32.add (local.get $$x) (i32.const 1)) + ) + + (global funcref (ref.func $$f)) + (global funcref (ref.func $$g)) + (global $$v (mut funcref) (ref.func $$f)) + + (global funcref (ref.func $$gf1)) + (global funcref (ref.func $$gf2)) + (func (drop (ref.func $$ff1)) (drop (ref.func $$ff2))) + (elem declare func $$gf1 $$ff1) + (elem declare funcref (ref.func $$gf2) (ref.func $$ff2)) + (func $$gf1) + (func $$gf2) + (func $$ff1) + (func $$ff2) + + (func (export "is_null-f") (result i32) + (ref.is_null (ref.func $$f)) + ) + (func (export "is_null-g") (result i32) + (ref.is_null (ref.func $$g)) + ) + (func (export "is_null-v") (result i32) + (ref.is_null (global.get $$v)) + ) + + (func (export "set-f") (global.set $$v (ref.func $$f))) + (func (export "set-g") (global.set $$v (ref.func $$g))) + + (table $$t 1 funcref) + (elem declare func $$f $$g) + + (func (export "call-f") (param $$x i32) (result i32) + (table.set $$t (i32.const 0) (ref.func $$f)) + (call_indirect $$t (param i32) (result i32) (local.get $$x) (i32.const 0)) + ) + (func (export "call-g") (param $$x i32) (result i32) + (table.set $$t (i32.const 0) (ref.func $$g)) + (call_indirect $$t (param i32) (result i32) (local.get $$x) (i32.const 0)) + ) + (func (export "call-v") (param $$x i32) (result i32) + (table.set $$t (i32.const 0) (global.get $$v)) + (call_indirect $$t (param i32) (result i32) (local.get $$x) (i32.const 0)) + ) +)`); + +// ./test/core/ref_func.wast:56 +assert_return(() => invoke($1, `is_null-f`, []), [value("i32", 0)]); + +// ./test/core/ref_func.wast:57 +assert_return(() => invoke($1, `is_null-g`, []), [value("i32", 0)]); + +// ./test/core/ref_func.wast:58 +assert_return(() => invoke($1, `is_null-v`, []), [value("i32", 0)]); + +// ./test/core/ref_func.wast:60 +assert_return(() => invoke($1, `call-f`, [4]), [value("i32", 4)]); + +// ./test/core/ref_func.wast:61 +assert_return(() => invoke($1, `call-g`, [4]), [value("i32", 5)]); + +// ./test/core/ref_func.wast:62 +assert_return(() => invoke($1, `call-v`, [4]), [value("i32", 4)]); + +// ./test/core/ref_func.wast:63 +invoke($1, `set-g`, []); + +// ./test/core/ref_func.wast:64 +assert_return(() => invoke($1, `call-v`, [4]), [value("i32", 5)]); + +// ./test/core/ref_func.wast:65 +invoke($1, `set-f`, []); + +// ./test/core/ref_func.wast:66 +assert_return(() => invoke($1, `call-v`, [4]), [value("i32", 4)]); + +// ./test/core/ref_func.wast:68 +assert_invalid( + () => instantiate(`(module + (func $$f (import "M" "f") (param i32) (result i32)) + (func $$g (import "M" "g") (param i32) (result i32)) + (global funcref (ref.func 7)) + )`), + `unknown function 7`, +); + +// ./test/core/ref_func.wast:80 +let $2 = instantiate(`(module + (func $$f1) + (func $$f2) + (func $$f3) + (func $$f4) + (func $$f5) + (func $$f6) + + (table $$t 1 funcref) + + (global funcref (ref.func $$f1)) + (export "f" (func $$f2)) + (elem (table $$t) (i32.const 0) func $$f3) + (elem (table $$t) (i32.const 0) funcref (ref.func $$f4)) + (elem func $$f5) + (elem funcref (ref.func $$f6)) + + (func + (ref.func $$f1) + (ref.func $$f2) + (ref.func $$f3) + (ref.func $$f4) + (ref.func $$f5) + (ref.func $$f6) + (return) + ) +)`); + +// ./test/core/ref_func.wast:108 +assert_invalid( + () => instantiate(`(module (func $$f (drop (ref.func $$f))))`), + `undeclared function reference`, +); + +// ./test/core/ref_func.wast:112 +assert_invalid( + () => instantiate(`(module (start $$f) (func $$f (drop (ref.func $$f))))`), + `undeclared function reference`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/ref_is_null.wast.js b/js/src/jit-test/tests/wasm/spec/spec/ref_is_null.wast.js new file mode 100644 index 0000000000..2c7aee86e0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/ref_is_null.wast.js @@ -0,0 +1,97 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/ref_is_null.wast + +// ./test/core/ref_is_null.wast:1 +let $0 = instantiate(`(module + (func $$f1 (export "funcref") (param $$x funcref) (result i32) + (ref.is_null (local.get $$x)) + ) + (func $$f2 (export "externref") (param $$x externref) (result i32) + (ref.is_null (local.get $$x)) + ) + + (table $$t1 2 funcref) + (table $$t2 2 externref) + (elem (table $$t1) (i32.const 1) func $$dummy) + (func $$dummy) + + (func (export "init") (param $$r externref) + (table.set $$t2 (i32.const 1) (local.get $$r)) + ) + (func (export "deinit") + (table.set $$t1 (i32.const 1) (ref.null func)) + (table.set $$t2 (i32.const 1) (ref.null extern)) + ) + + (func (export "funcref-elem") (param $$x i32) (result i32) + (call $$f1 (table.get $$t1 (local.get $$x))) + ) + (func (export "externref-elem") (param $$x i32) (result i32) + (call $$f2 (table.get $$t2 (local.get $$x))) + ) +)`); + +// ./test/core/ref_is_null.wast:30 +assert_return(() => invoke($0, `funcref`, [null]), [value("i32", 1)]); + +// ./test/core/ref_is_null.wast:31 +assert_return(() => invoke($0, `externref`, [null]), [value("i32", 1)]); + +// ./test/core/ref_is_null.wast:33 +assert_return(() => invoke($0, `externref`, [externref(1)]), [value("i32", 0)]); + +// ./test/core/ref_is_null.wast:35 +invoke($0, `init`, [externref(0)]); + +// ./test/core/ref_is_null.wast:37 +assert_return(() => invoke($0, `funcref-elem`, [0]), [value("i32", 1)]); + +// ./test/core/ref_is_null.wast:38 +assert_return(() => invoke($0, `externref-elem`, [0]), [value("i32", 1)]); + +// ./test/core/ref_is_null.wast:40 +assert_return(() => invoke($0, `funcref-elem`, [1]), [value("i32", 0)]); + +// ./test/core/ref_is_null.wast:41 +assert_return(() => invoke($0, `externref-elem`, [1]), [value("i32", 0)]); + +// ./test/core/ref_is_null.wast:43 +invoke($0, `deinit`, []); + +// ./test/core/ref_is_null.wast:45 +assert_return(() => invoke($0, `funcref-elem`, [0]), [value("i32", 1)]); + +// ./test/core/ref_is_null.wast:46 +assert_return(() => invoke($0, `externref-elem`, [0]), [value("i32", 1)]); + +// ./test/core/ref_is_null.wast:48 +assert_return(() => invoke($0, `funcref-elem`, [1]), [value("i32", 1)]); + +// ./test/core/ref_is_null.wast:49 +assert_return(() => invoke($0, `externref-elem`, [1]), [value("i32", 1)]); + +// ./test/core/ref_is_null.wast:51 +assert_invalid( + () => instantiate(`(module (func $$ref-vs-num (param i32) (ref.is_null (local.get 0))))`), + `type mismatch`, +); + +// ./test/core/ref_is_null.wast:55 +assert_invalid( + () => instantiate(`(module (func $$ref-vs-empty (ref.is_null)))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/ref_null.wast.js b/js/src/jit-test/tests/wasm/spec/spec/ref_null.wast.js new file mode 100644 index 0000000000..bae6ecd4b2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/ref_null.wast.js @@ -0,0 +1,31 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/ref_null.wast + +// ./test/core/ref_null.wast:1 +let $0 = instantiate(`(module + (func (export "externref") (result externref) (ref.null extern)) + (func (export "funcref") (result funcref) (ref.null func)) + + (global externref (ref.null extern)) + (global funcref (ref.null func)) +)`); + +// ./test/core/ref_null.wast:9 +assert_return(() => invoke($0, `externref`, []), [value('externref', null)]); + +// ./test/core/ref_null.wast:10 +assert_return(() => invoke($0, `funcref`, []), [value('anyfunc', null)]); diff --git a/js/src/jit-test/tests/wasm/spec/spec/return.wast.js b/js/src/jit-test/tests/wasm/spec/spec/return.wast.js new file mode 100644 index 0000000000..7d09ec6a2e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/return.wast.js @@ -0,0 +1,636 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/return.wast + +// ./test/core/return.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definition + (func $$dummy) + + (func (export "type-i32") (drop (i32.ctz (return)))) + (func (export "type-i64") (drop (i64.ctz (return)))) + (func (export "type-f32") (drop (f32.neg (return)))) + (func (export "type-f64") (drop (f64.neg (return)))) + + (func (export "type-i32-value") (result i32) + (block (result i32) (i32.ctz (return (i32.const 1)))) + ) + (func (export "type-i64-value") (result i64) + (block (result i64) (i64.ctz (return (i64.const 2)))) + ) + (func (export "type-f32-value") (result f32) + (block (result f32) (f32.neg (return (f32.const 3)))) + ) + (func (export "type-f64-value") (result f64) + (block (result f64) (f64.neg (return (f64.const 4)))) + ) + + (func (export "nullary") (return)) + (func (export "unary") (result f64) (return (f64.const 3))) + + (func (export "as-func-first") (result i32) + (return (i32.const 1)) (i32.const 2) + ) + (func (export "as-func-mid") (result i32) + (call $$dummy) (return (i32.const 2)) (i32.const 3) + ) + (func (export "as-func-last") + (nop) (call $$dummy) (return) + ) + (func (export "as-func-value") (result i32) + (nop) (call $$dummy) (return (i32.const 3)) + ) + + (func (export "as-block-first") + (block (return) (call $$dummy)) + ) + (func (export "as-block-mid") + (block (call $$dummy) (return) (call $$dummy)) + ) + (func (export "as-block-last") + (block (nop) (call $$dummy) (return)) + ) + (func (export "as-block-value") (result i32) + (block (result i32) (nop) (call $$dummy) (return (i32.const 2))) + ) + + (func (export "as-loop-first") (result i32) + (loop (result i32) (return (i32.const 3)) (i32.const 2)) + ) + (func (export "as-loop-mid") (result i32) + (loop (result i32) (call $$dummy) (return (i32.const 4)) (i32.const 2)) + ) + (func (export "as-loop-last") (result i32) + (loop (result i32) (nop) (call $$dummy) (return (i32.const 5))) + ) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (return (i32.const 9)))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (return))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (return (i32.const 8)) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 6) (return (i32.const 9)))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") (result i64) + (block (br_table 0 0 0 (return (i64.const 9)))) (i64.const -1) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (return (i32.const 10)) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 6) (return (i32.const 11))) (i32.const 7) + ) + ) + + (func (export "as-return-value") (result i64) + (return (return (i64.const 7))) + ) + + (func (export "as-if-cond") (result i32) + (if (result i32) + (return (i32.const 2)) (then (i32.const 0)) (else (i32.const 1)) + ) + ) + (func (export "as-if-then") (param i32 i32) (result i32) + (if (result i32) + (local.get 0) (then (return (i32.const 3))) (else (local.get 1)) + ) + ) + (func (export "as-if-else") (param i32 i32) (result i32) + (if (result i32) + (local.get 0) (then (local.get 1)) (else (return (i32.const 4))) + ) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (select (return (i32.const 5)) (local.get 0) (local.get 1)) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (select (local.get 0) (return (i32.const 6)) (local.get 1)) + ) + (func (export "as-select-cond") (result i32) + (select (i32.const 0) (i32.const 1) (return (i32.const 7))) + ) + + (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) + (func (export "as-call-first") (result i32) + (call $$f (return (i32.const 12)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call-mid") (result i32) + (call $$f (i32.const 1) (return (i32.const 13)) (i32.const 3)) + ) + (func (export "as-call-last") (result i32) + (call $$f (i32.const 1) (i32.const 2) (return (i32.const 14))) + ) + + (type $$sig (func (param i32 i32 i32) (result i32))) + (table funcref (elem $$f)) + (func (export "as-call_indirect-func") (result i32) + (call_indirect (type $$sig) + (return (i32.const 20)) (i32.const 1) (i32.const 2) (i32.const 3) + ) + ) + (func (export "as-call_indirect-first") (result i32) + (call_indirect (type $$sig) + (i32.const 0) (return (i32.const 21)) (i32.const 2) (i32.const 3) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (call_indirect (type $$sig) + (i32.const 0) (i32.const 1) (return (i32.const 22)) (i32.const 3) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (call_indirect (type $$sig) + (i32.const 0) (i32.const 1) (i32.const 2) (return (i32.const 23)) + ) + ) + + (func (export "as-local.set-value") (result i32) (local f32) + (local.set 0 (return (i32.const 17))) (i32.const -1) + ) + (func (export "as-local.tee-value") (result i32) (local i32) + (local.tee 0 (return (i32.const 1))) + ) + (global $$a (mut i32) (i32.const 0)) + (func (export "as-global.set-value") (result i32) + (global.set $$a (return (i32.const 1))) + ) + + (memory 1) + (func (export "as-load-address") (result f32) + (f32.load (return (f32.const 1.7))) + ) + (func (export "as-loadN-address") (result i64) + (i64.load8_s (return (i64.const 30))) + ) + + (func (export "as-store-address") (result i32) + (f64.store (return (i32.const 30)) (f64.const 7)) (i32.const -1) + ) + (func (export "as-store-value") (result i32) + (i64.store (i32.const 2) (return (i32.const 31))) (i32.const -1) + ) + + (func (export "as-storeN-address") (result i32) + (i32.store8 (return (i32.const 32)) (i32.const 7)) (i32.const -1) + ) + (func (export "as-storeN-value") (result i32) + (i64.store16 (i32.const 2) (return (i32.const 33))) (i32.const -1) + ) + + (func (export "as-unary-operand") (result f32) + (f32.neg (return (f32.const 3.4))) + ) + + (func (export "as-binary-left") (result i32) + (i32.add (return (i32.const 3)) (i32.const 10)) + ) + (func (export "as-binary-right") (result i64) + (i64.sub (i64.const 10) (return (i64.const 45))) + ) + + (func (export "as-test-operand") (result i32) + (i32.eqz (return (i32.const 44))) + ) + + (func (export "as-compare-left") (result i32) + (f64.le (return (i32.const 43)) (f64.const 10)) + ) + (func (export "as-compare-right") (result i32) + (f32.ne (f32.const 10) (return (i32.const 42))) + ) + + (func (export "as-convert-operand") (result i32) + (i32.wrap_i64 (return (i32.const 41))) + ) + + (func (export "as-memory.grow-size") (result i32) + (memory.grow (return (i32.const 40))) + ) +)`); + +// ./test/core/return.wast:224 +assert_return(() => invoke($0, `type-i32`, []), []); + +// ./test/core/return.wast:225 +assert_return(() => invoke($0, `type-i64`, []), []); + +// ./test/core/return.wast:226 +assert_return(() => invoke($0, `type-f32`, []), []); + +// ./test/core/return.wast:227 +assert_return(() => invoke($0, `type-f64`, []), []); + +// ./test/core/return.wast:229 +assert_return(() => invoke($0, `type-i32-value`, []), [value("i32", 1)]); + +// ./test/core/return.wast:230 +assert_return(() => invoke($0, `type-i64-value`, []), [value("i64", 2n)]); + +// ./test/core/return.wast:231 +assert_return(() => invoke($0, `type-f32-value`, []), [value("f32", 3)]); + +// ./test/core/return.wast:232 +assert_return(() => invoke($0, `type-f64-value`, []), [value("f64", 4)]); + +// ./test/core/return.wast:234 +assert_return(() => invoke($0, `nullary`, []), []); + +// ./test/core/return.wast:235 +assert_return(() => invoke($0, `unary`, []), [value("f64", 3)]); + +// ./test/core/return.wast:237 +assert_return(() => invoke($0, `as-func-first`, []), [value("i32", 1)]); + +// ./test/core/return.wast:238 +assert_return(() => invoke($0, `as-func-mid`, []), [value("i32", 2)]); + +// ./test/core/return.wast:239 +assert_return(() => invoke($0, `as-func-last`, []), []); + +// ./test/core/return.wast:240 +assert_return(() => invoke($0, `as-func-value`, []), [value("i32", 3)]); + +// ./test/core/return.wast:242 +assert_return(() => invoke($0, `as-block-first`, []), []); + +// ./test/core/return.wast:243 +assert_return(() => invoke($0, `as-block-mid`, []), []); + +// ./test/core/return.wast:244 +assert_return(() => invoke($0, `as-block-last`, []), []); + +// ./test/core/return.wast:245 +assert_return(() => invoke($0, `as-block-value`, []), [value("i32", 2)]); + +// ./test/core/return.wast:247 +assert_return(() => invoke($0, `as-loop-first`, []), [value("i32", 3)]); + +// ./test/core/return.wast:248 +assert_return(() => invoke($0, `as-loop-mid`, []), [value("i32", 4)]); + +// ./test/core/return.wast:249 +assert_return(() => invoke($0, `as-loop-last`, []), [value("i32", 5)]); + +// ./test/core/return.wast:251 +assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 9)]); + +// ./test/core/return.wast:253 +assert_return(() => invoke($0, `as-br_if-cond`, []), []); + +// ./test/core/return.wast:254 +assert_return(() => invoke($0, `as-br_if-value`, []), [value("i32", 8)]); + +// ./test/core/return.wast:255 +assert_return(() => invoke($0, `as-br_if-value-cond`, []), [value("i32", 9)]); + +// ./test/core/return.wast:257 +assert_return(() => invoke($0, `as-br_table-index`, []), [value("i64", 9n)]); + +// ./test/core/return.wast:258 +assert_return(() => invoke($0, `as-br_table-value`, []), [value("i32", 10)]); + +// ./test/core/return.wast:259 +assert_return(() => invoke($0, `as-br_table-value-index`, []), [value("i32", 11)]); + +// ./test/core/return.wast:261 +assert_return(() => invoke($0, `as-return-value`, []), [value("i64", 7n)]); + +// ./test/core/return.wast:263 +assert_return(() => invoke($0, `as-if-cond`, []), [value("i32", 2)]); + +// ./test/core/return.wast:264 +assert_return(() => invoke($0, `as-if-then`, [1, 6]), [value("i32", 3)]); + +// ./test/core/return.wast:265 +assert_return(() => invoke($0, `as-if-then`, [0, 6]), [value("i32", 6)]); + +// ./test/core/return.wast:266 +assert_return(() => invoke($0, `as-if-else`, [0, 6]), [value("i32", 4)]); + +// ./test/core/return.wast:267 +assert_return(() => invoke($0, `as-if-else`, [1, 6]), [value("i32", 6)]); + +// ./test/core/return.wast:269 +assert_return(() => invoke($0, `as-select-first`, [0, 6]), [value("i32", 5)]); + +// ./test/core/return.wast:270 +assert_return(() => invoke($0, `as-select-first`, [1, 6]), [value("i32", 5)]); + +// ./test/core/return.wast:271 +assert_return(() => invoke($0, `as-select-second`, [0, 6]), [value("i32", 6)]); + +// ./test/core/return.wast:272 +assert_return(() => invoke($0, `as-select-second`, [1, 6]), [value("i32", 6)]); + +// ./test/core/return.wast:273 +assert_return(() => invoke($0, `as-select-cond`, []), [value("i32", 7)]); + +// ./test/core/return.wast:275 +assert_return(() => invoke($0, `as-call-first`, []), [value("i32", 12)]); + +// ./test/core/return.wast:276 +assert_return(() => invoke($0, `as-call-mid`, []), [value("i32", 13)]); + +// ./test/core/return.wast:277 +assert_return(() => invoke($0, `as-call-last`, []), [value("i32", 14)]); + +// ./test/core/return.wast:279 +assert_return(() => invoke($0, `as-call_indirect-func`, []), [value("i32", 20)]); + +// ./test/core/return.wast:280 +assert_return(() => invoke($0, `as-call_indirect-first`, []), [value("i32", 21)]); + +// ./test/core/return.wast:281 +assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 22)]); + +// ./test/core/return.wast:282 +assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", 23)]); + +// ./test/core/return.wast:284 +assert_return(() => invoke($0, `as-local.set-value`, []), [value("i32", 17)]); + +// ./test/core/return.wast:285 +assert_return(() => invoke($0, `as-local.tee-value`, []), [value("i32", 1)]); + +// ./test/core/return.wast:286 +assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 1)]); + +// ./test/core/return.wast:288 +assert_return(() => invoke($0, `as-load-address`, []), [value("f32", 1.7)]); + +// ./test/core/return.wast:289 +assert_return(() => invoke($0, `as-loadN-address`, []), [value("i64", 30n)]); + +// ./test/core/return.wast:291 +assert_return(() => invoke($0, `as-store-address`, []), [value("i32", 30)]); + +// ./test/core/return.wast:292 +assert_return(() => invoke($0, `as-store-value`, []), [value("i32", 31)]); + +// ./test/core/return.wast:293 +assert_return(() => invoke($0, `as-storeN-address`, []), [value("i32", 32)]); + +// ./test/core/return.wast:294 +assert_return(() => invoke($0, `as-storeN-value`, []), [value("i32", 33)]); + +// ./test/core/return.wast:296 +assert_return(() => invoke($0, `as-unary-operand`, []), [value("f32", 3.4)]); + +// ./test/core/return.wast:298 +assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 3)]); + +// ./test/core/return.wast:299 +assert_return(() => invoke($0, `as-binary-right`, []), [value("i64", 45n)]); + +// ./test/core/return.wast:301 +assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 44)]); + +// ./test/core/return.wast:303 +assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 43)]); + +// ./test/core/return.wast:304 +assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 42)]); + +// ./test/core/return.wast:306 +assert_return(() => invoke($0, `as-convert-operand`, []), [value("i32", 41)]); + +// ./test/core/return.wast:308 +assert_return(() => invoke($0, `as-memory.grow-size`, []), [value("i32", 40)]); + +// ./test/core/return.wast:310 +assert_invalid( + () => instantiate(`(module (func $$type-value-empty-vs-num (result i32) (return)))`), + `type mismatch`, +); + +// ./test/core/return.wast:314 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-vs-num-in-block (result i32) + (i32.const 0) + (block (return)) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:323 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-vs-num-in-loop (result i32) + (i32.const 0) + (loop (return)) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:332 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-vs-num-in-then (result i32) + (i32.const 0) (i32.const 0) + (if (then (return))) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:341 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-vs-num-in-else (result i32) + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (return))) (drop) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:350 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-vs-num-in-br (result i32) + (i32.const 0) + (block (br 0 (return))) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:359 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-vs-num-in-br_if (result i32) + (i32.const 0) + (block (br_if 0 (return) (i32.const 1))) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:368 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-vs-num-in-br_table (result i32) + (i32.const 0) + (block (br_table 0 (return))) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:377 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-vs-num-in-return (result i32) + (return (return)) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:385 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-vs-num-in-select (result i32) + (select (return) (i32.const 1) (i32.const 2)) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:393 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-vs-num-in-call (result i32) + (call 1 (return)) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:402 +assert_invalid( + () => instantiate(`(module + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-value-empty-vs-num-in-call_indirect (result i32) + (block (result i32) + (call_indirect (type $$sig) + (return) (i32.const 0) + ) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:417 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-vs-num-in-local.set (result i32) + (local i32) + (local.set 0 (return)) (local.get 0) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:426 +assert_invalid( + () => instantiate(`(module + (func $$type-value-empty-vs-num-in-local.tee (result i32) + (local i32) + (local.tee 0 (return)) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:435 +assert_invalid( + () => instantiate(`(module + (global $$x (mut i32) (i32.const 0)) + (func $$type-value-empty-vs-num-in-global.set (result i32) + (global.set $$x (return)) (global.get $$x) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:444 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-value-empty-vs-num-in-memory.grow (result i32) + (memory.grow (return)) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:453 +assert_invalid( + () => instantiate(`(module + (memory 0) + (func $$type-value-empty-vs-num-in-load (result i32) + (i32.load (return)) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:462 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-vs-num-in-store (result i32) + (i32.store (return) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/return.wast:471 +assert_invalid( + () => instantiate(`(module (func $$type-value-void-vs-num (result f64) (return (nop))))`), + `type mismatch`, +); + +// ./test/core/return.wast:475 +assert_invalid( + () => instantiate(`(module (func $$type-value-num-vs-num (result f64) (return (i64.const 1))))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_address.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_address.wast.js new file mode 100644 index 0000000000..c94be782b9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_address.wast.js @@ -0,0 +1,348 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_address.wast + +// ./test/core/simd/simd_address.wast:3 +let $0 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\10\\11\\12\\13\\14\\15") + (data (offset (i32.const 65505)) "\\16\\17\\18\\19\\20\\21\\22\\23\\24\\25\\26\\27\\28\\29\\30\\31") + + (func (export "load_data_1") (param $$i i32) (result v128) + (v128.load offset=0 (local.get $$i)) ;; 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x10 0x11 0x12 0x13 0x14 0x15 + ) + (func (export "load_data_2") (param $$i i32) (result v128) + (v128.load align=1 (local.get $$i)) ;; 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x10 0x11 0x12 0x13 0x14 0x15 + ) + (func (export "load_data_3") (param $$i i32) (result v128) + (v128.load offset=1 align=1 (local.get $$i)) ;; 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x10 0x11 0x12 0x13 0x14 0x15 0x00 + ) + (func (export "load_data_4") (param $$i i32) (result v128) + (v128.load offset=2 align=1 (local.get $$i)) ;; 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x10 0x11 0x12 0x13 0x14 0x15 0x00 0x00 + ) + (func (export "load_data_5") (param $$i i32) (result v128) + (v128.load offset=15 align=1 (local.get $$i)) ;; 0x15 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + ) + + (func (export "store_data_0") (result v128) + (v128.store offset=0 (i32.const 0) (v128.const f32x4 0 1 2 3)) + (v128.load offset=0 (i32.const 0)) + ) + (func (export "store_data_1") (result v128) + (v128.store align=1 (i32.const 0) (v128.const i32x4 0 1 2 3)) + (v128.load align=1 (i32.const 0)) + ) + (func (export "store_data_2") (result v128) + (v128.store offset=1 align=1 (i32.const 0) (v128.const i16x8 0 1 2 3 4 5 6 7)) + (v128.load offset=1 align=1 (i32.const 0)) + ) + (func (export "store_data_3") (result v128) + (v128.store offset=2 align=1 (i32.const 0) (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)) + (v128.load offset=2 align=1 (i32.const 0)) + ) + (func (export "store_data_4") (result v128) + (v128.store offset=15 align=1 (i32.const 0) (v128.const i32x4 0 1 2 3)) + (v128.load offset=15 (i32.const 0)) + ) + (func (export "store_data_5") (result v128) + (v128.store offset=65520 align=1 (i32.const 0) (v128.const i32x4 0 1 2 3)) + (v128.load offset=65520 (i32.const 0)) + ) + (func (export "store_data_6") (param $$i i32) + (v128.store offset=1 align=1 (local.get $$i) (v128.const i32x4 0 1 2 3)) + ) +)`); + +// ./test/core/simd/simd_address.wast:53 +assert_return( + () => invoke($0, `load_data_1`, [0]), + [i32x4([0x3020100, 0x7060504, 0x11100908, 0x15141312])], +); + +// ./test/core/simd/simd_address.wast:54 +assert_return( + () => invoke($0, `load_data_2`, [0]), + [i32x4([0x3020100, 0x7060504, 0x11100908, 0x15141312])], +); + +// ./test/core/simd/simd_address.wast:55 +assert_return( + () => invoke($0, `load_data_3`, [0]), + [i32x4([0x4030201, 0x8070605, 0x12111009, 0x151413])], +); + +// ./test/core/simd/simd_address.wast:56 +assert_return(() => invoke($0, `load_data_4`, [0]), [i32x4([0x5040302, 0x9080706, 0x13121110, 0x1514])]); + +// ./test/core/simd/simd_address.wast:57 +assert_return(() => invoke($0, `load_data_5`, [0]), [i32x4([0x15, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_address.wast:59 +assert_return( + () => invoke($0, `load_data_1`, [0]), + [i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0x1110, 0x1312, 0x1514])], +); + +// ./test/core/simd/simd_address.wast:60 +assert_return( + () => invoke($0, `load_data_2`, [0]), + [i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0x1110, 0x1312, 0x1514])], +); + +// ./test/core/simd/simd_address.wast:61 +assert_return( + () => invoke($0, `load_data_3`, [0]), + [i16x8([0x201, 0x403, 0x605, 0x807, 0x1009, 0x1211, 0x1413, 0x15])], +); + +// ./test/core/simd/simd_address.wast:62 +assert_return( + () => invoke($0, `load_data_4`, [0]), + [i16x8([0x302, 0x504, 0x706, 0x908, 0x1110, 0x1312, 0x1514, 0x0])], +); + +// ./test/core/simd/simd_address.wast:63 +assert_return(() => invoke($0, `load_data_5`, [0]), [i16x8([0x15, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_address.wast:65 +assert_return( + () => invoke($0, `load_data_1`, [0]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15]), + ], +); + +// ./test/core/simd/simd_address.wast:66 +assert_return( + () => invoke($0, `load_data_2`, [0]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15]), + ], +); + +// ./test/core/simd/simd_address.wast:67 +assert_return( + () => invoke($0, `load_data_3`, [0]), + [ + i8x16([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x0]), + ], +); + +// ./test/core/simd/simd_address.wast:68 +assert_return( + () => invoke($0, `load_data_4`, [0]), + [ + i8x16([0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_address.wast:69 +assert_return( + () => invoke($0, `load_data_5`, [0]), + [ + i8x16([0x15, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_address.wast:71 +assert_return( + () => invoke($0, `load_data_1`, [65505]), + [i32x4([0x19181716, 0x23222120, 0x27262524, 0x31302928])], +); + +// ./test/core/simd/simd_address.wast:72 +assert_return( + () => invoke($0, `load_data_2`, [65505]), + [i32x4([0x19181716, 0x23222120, 0x27262524, 0x31302928])], +); + +// ./test/core/simd/simd_address.wast:73 +assert_return( + () => invoke($0, `load_data_3`, [65505]), + [i32x4([0x20191817, 0x24232221, 0x28272625, 0x313029])], +); + +// ./test/core/simd/simd_address.wast:74 +assert_return( + () => invoke($0, `load_data_4`, [65505]), + [i32x4([0x21201918, 0x25242322, 0x29282726, 0x3130])], +); + +// ./test/core/simd/simd_address.wast:75 +assert_return(() => invoke($0, `load_data_5`, [65505]), [i32x4([0x31, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_address.wast:77 +assert_return( + () => invoke($0, `load_data_1`, [65505]), + [i16x8([0x1716, 0x1918, 0x2120, 0x2322, 0x2524, 0x2726, 0x2928, 0x3130])], +); + +// ./test/core/simd/simd_address.wast:78 +assert_return( + () => invoke($0, `load_data_2`, [65505]), + [i16x8([0x1716, 0x1918, 0x2120, 0x2322, 0x2524, 0x2726, 0x2928, 0x3130])], +); + +// ./test/core/simd/simd_address.wast:79 +assert_return( + () => invoke($0, `load_data_3`, [65505]), + [i16x8([0x1817, 0x2019, 0x2221, 0x2423, 0x2625, 0x2827, 0x3029, 0x31])], +); + +// ./test/core/simd/simd_address.wast:80 +assert_return( + () => invoke($0, `load_data_4`, [65505]), + [i16x8([0x1918, 0x2120, 0x2322, 0x2524, 0x2726, 0x2928, 0x3130, 0x0])], +); + +// ./test/core/simd/simd_address.wast:81 +assert_return( + () => invoke($0, `load_data_5`, [65505]), + [i16x8([0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_address.wast:83 +assert_return( + () => invoke($0, `load_data_1`, [65505]), + [ + i8x16([0x16, 0x17, 0x18, 0x19, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x30, 0x31]), + ], +); + +// ./test/core/simd/simd_address.wast:84 +assert_return( + () => invoke($0, `load_data_2`, [65505]), + [ + i8x16([0x16, 0x17, 0x18, 0x19, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x30, 0x31]), + ], +); + +// ./test/core/simd/simd_address.wast:85 +assert_return( + () => invoke($0, `load_data_3`, [65505]), + [ + i8x16([0x17, 0x18, 0x19, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x30, 0x31, 0x0]), + ], +); + +// ./test/core/simd/simd_address.wast:86 +assert_return( + () => invoke($0, `load_data_4`, [65505]), + [ + i8x16([0x18, 0x19, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x30, 0x31, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_address.wast:87 +assert_return( + () => invoke($0, `load_data_5`, [65505]), + [ + i8x16([0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_address.wast:89 +assert_trap(() => invoke($0, `load_data_3`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_address.wast:90 +assert_trap(() => invoke($0, `load_data_5`, [65506]), `out of bounds memory access`); + +// ./test/core/simd/simd_address.wast:92 +assert_return( + () => invoke($0, `store_data_0`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 2), + value("f32", 3), + ), + ], +); + +// ./test/core/simd/simd_address.wast:93 +assert_return(() => invoke($0, `store_data_1`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_address.wast:94 +assert_return(() => invoke($0, `store_data_2`, []), [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])]); + +// ./test/core/simd/simd_address.wast:95 +assert_return( + () => invoke($0, `store_data_3`, []), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_address.wast:96 +assert_return(() => invoke($0, `store_data_4`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_address.wast:97 +assert_return(() => invoke($0, `store_data_5`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_address.wast:99 +assert_trap(() => invoke($0, `store_data_6`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_address.wast:100 +assert_trap(() => invoke($0, `store_data_6`, [65535]), `out of bounds memory access`); + +// ./test/core/simd/simd_address.wast:104 +let $1 = instantiate(`(module + (memory 1) + (func (export "v128.load_offset_65521") + (drop (v128.load offset=65521 (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_address.wast:110 +assert_trap(() => invoke($1, `v128.load_offset_65521`, []), `out of bounds memory access`); + +// ./test/core/simd/simd_address.wast:112 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (v128.load offset=-1 (i32.const 0))) ) `), + `unknown operator`, +); + +// ./test/core/simd/simd_address.wast:122 +let $2 = instantiate(`(module + (memory 1) + (func (export "v128.store_offset_65521") + (v128.store offset=65521 (i32.const 0) (v128.const i32x4 0 0 0 0)) + ) +)`); + +// ./test/core/simd/simd_address.wast:128 +assert_trap(() => invoke($2, `v128.store_offset_65521`, []), `out of bounds memory access`); + +// ./test/core/simd/simd_address.wast:130 +assert_malformed( + () => instantiate(`(memory 1) (func (v128.store offset=-1 (i32.const 0) (v128.const i32x4 0 0 0 0)) ) `), + `unknown operator`, +); + +// ./test/core/simd/simd_address.wast:143 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (v128.load offset=4294967296 (i32.const 0)))) `), + `i32 constant`, +); + +// ./test/core/simd/simd_address.wast:151 +assert_malformed( + () => instantiate(`(memory 1) (func (v128.store offset=4294967296 (i32.const 0) (v128.const i32x4 0 0 0 0))) `), + `i32 constant`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_bit_shift.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_bit_shift.wast.js new file mode 100644 index 0000000000..485ec62861 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_bit_shift.wast.js @@ -0,0 +1,2102 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_bit_shift.wast + +// ./test/core/simd/simd_bit_shift.wast:3 +let $0 = instantiate(`(module + (func (export "i8x16.shl") (param $$0 v128) (param $$1 i32) (result v128) (i8x16.shl (local.get $$0) (local.get $$1))) + (func (export "i8x16.shr_s") (param $$0 v128) (param $$1 i32) (result v128) (i8x16.shr_s (local.get $$0) (local.get $$1))) + (func (export "i8x16.shr_u") (param $$0 v128) (param $$1 i32) (result v128) (i8x16.shr_u (local.get $$0) (local.get $$1))) + + (func (export "i16x8.shl") (param $$0 v128) (param $$1 i32) (result v128) (i16x8.shl (local.get $$0) (local.get $$1))) + (func (export "i16x8.shr_s") (param $$0 v128) (param $$1 i32) (result v128) (i16x8.shr_s (local.get $$0) (local.get $$1))) + (func (export "i16x8.shr_u") (param $$0 v128) (param $$1 i32) (result v128) (i16x8.shr_u (local.get $$0) (local.get $$1))) + + (func (export "i32x4.shl") (param $$0 v128) (param $$1 i32) (result v128) (i32x4.shl (local.get $$0) (local.get $$1))) + (func (export "i32x4.shr_s") (param $$0 v128) (param $$1 i32) (result v128) (i32x4.shr_s (local.get $$0) (local.get $$1))) + (func (export "i32x4.shr_u") (param $$0 v128) (param $$1 i32) (result v128) (i32x4.shr_u (local.get $$0) (local.get $$1))) + + (func (export "i64x2.shl") (param $$0 v128) (param $$1 i32) (result v128) (i64x2.shl (local.get $$0) (local.get $$1))) + (func (export "i64x2.shr_s") (param $$0 v128) (param $$1 i32) (result v128) (i64x2.shr_s (local.get $$0) (local.get $$1))) + (func (export "i64x2.shr_u") (param $$0 v128) (param $$1 i32) (result v128) (i64x2.shr_u (local.get $$0) (local.get $$1))) + + ;; shifting by a constant amount + ;; i8x16 + (func (export "i8x16.shl_1") (param $$0 v128) (result v128) (i8x16.shl (local.get $$0) (i32.const 1))) + (func (export "i8x16.shr_u_8") (param $$0 v128) (result v128) (i8x16.shr_u (local.get $$0) (i32.const 8))) + (func (export "i8x16.shr_s_9") (param $$0 v128) (result v128) (i8x16.shr_s (local.get $$0) (i32.const 9))) + + ;; i16x8 + (func (export "i16x8.shl_1") (param $$0 v128) (result v128) (i16x8.shl (local.get $$0) (i32.const 1))) + (func (export "i16x8.shr_u_16") (param $$0 v128) (result v128) (i16x8.shr_u (local.get $$0) (i32.const 16))) + (func (export "i16x8.shr_s_17") (param $$0 v128) (result v128) (i16x8.shr_s (local.get $$0) (i32.const 17))) + + ;; i32x4 + (func (export "i32x4.shl_1") (param $$0 v128) (result v128) (i32x4.shl (local.get $$0) (i32.const 1))) + (func (export "i32x4.shr_u_32") (param $$0 v128) (result v128) (i32x4.shr_u (local.get $$0) (i32.const 32))) + (func (export "i32x4.shr_s_33") (param $$0 v128) (result v128) (i32x4.shr_s (local.get $$0) (i32.const 33))) + + ;; i64x2 + (func (export "i64x2.shl_1") (param $$0 v128) (result v128) (i64x2.shl (local.get $$0) (i32.const 1))) + (func (export "i64x2.shr_u_64") (param $$0 v128) (result v128) (i64x2.shr_u (local.get $$0) (i32.const 64))) + (func (export "i64x2.shr_s_65") (param $$0 v128) (result v128) (i64x2.shr_s (local.get $$0) (i32.const 65))) +)`); + +// ./test/core/simd/simd_bit_shift.wast:44 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x80, 0xc0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd]), + 1, + ]), + [ + i8x16([0x0, 0x80, 0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:47 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, 0xa, 0xb, 0xc, 0xd]), + 4, + ]), + [ + i8x16([0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa0, 0xb0, 0xc0, 0xd0]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:51 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 8, + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:54 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 32, + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:57 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 128, + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:60 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 256, + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:64 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x80, 0xc0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd]), + 9, + ]), + [ + i8x16([0x0, 0x80, 0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:67 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 9, + ]), + [ + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:70 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 17, + ]), + [ + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:73 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 33, + ]), + [ + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:76 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 129, + ]), + [ + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:79 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 257, + ]), + [ + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:82 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 513, + ]), + [ + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:85 +assert_return( + () => invoke($0, `i8x16.shl`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 514, + ]), + [ + i8x16([0x0, 0x4, 0x8, 0xc, 0x10, 0x14, 0x18, 0x1c, 0x20, 0x24, 0x28, 0x2c, 0x30, 0x34, 0x38, 0x3c]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:90 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x80, 0xc0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd]), + 1, + ]), + [ + i8x16([0x40, 0x60, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:93 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, 0xa, 0xb, 0xc, 0xd]), + 4, + ]), + [ + i8x16([0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:97 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 8, + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:100 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 32, + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:103 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 128, + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:106 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 256, + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:110 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x80, 0xc0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd]), + 9, + ]), + [ + i8x16([0x40, 0x60, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:113 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 9, + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:116 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 17, + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:119 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 33, + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:122 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 129, + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:125 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 257, + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:128 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 513, + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:131 +assert_return( + () => invoke($0, `i8x16.shr_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 514, + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2, 0x3, 0x3, 0x3, 0x3]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:136 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x80, 0xc0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd]), + 1, + ]), + [ + i8x16([0xc0, 0xe0, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:139 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, 0xa, 0xb, 0xc, 0xd]), + 4, + ]), + [ + i8x16([0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:143 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 8, + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:146 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 32, + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:149 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 128, + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:152 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 256, + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:156 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x80, 0xc0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd]), + 9, + ]), + [ + i8x16([0xc0, 0xe0, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:159 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 9, + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:162 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 17, + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:165 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 33, + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:168 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 129, + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:171 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 257, + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:174 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 513, + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:177 +assert_return( + () => invoke($0, `i8x16.shr_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 514, + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2, 0x3, 0x3, 0x3, 0x3]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:181 +assert_return( + () => invoke($0, `i8x16.shl_1`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [ + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:183 +assert_return( + () => invoke($0, `i8x16.shr_u_8`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:185 +assert_return( + () => invoke($0, `i8x16.shr_s_9`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [ + i8x16([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7]), + ], +); + +// ./test/core/simd/simd_bit_shift.wast:190 +assert_return( + () => invoke($0, `i16x8.shl`, [ + i16x8([0xff80, 0xffc0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5]), + 1, + ]), + [i16x8([0xff00, 0xff80, 0x0, 0x2, 0x4, 0x6, 0x8, 0xa])], +); + +// ./test/core/simd/simd_bit_shift.wast:193 +assert_return( + () => invoke($0, `i16x8.shl`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + 2, + ]), + [i16x8([0xc0e4, 0xc0e4, 0xc0e4, 0xc0e4, 0xc0e4, 0xc0e4, 0xc0e4, 0xc0e4])], +); + +// ./test/core/simd/simd_bit_shift.wast:196 +assert_return( + () => invoke($0, `i16x8.shl`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + 2, + ]), + [i16x8([0x48d0, 0x48d0, 0x48d0, 0x48d0, 0x48d0, 0x48d0, 0x48d0, 0x48d0])], +); + +// ./test/core/simd/simd_bit_shift.wast:199 +assert_return( + () => invoke($0, `i16x8.shl`, [ + i16x8([0xaabb, 0xccdd, 0xeeff, 0xa0b0, 0xc0d0, 0xe0f0, 0xa0b, 0xc0d]), + 4, + ]), + [i16x8([0xabb0, 0xcdd0, 0xeff0, 0xb00, 0xd00, 0xf00, 0xa0b0, 0xc0d0])], +); + +// ./test/core/simd/simd_bit_shift.wast:202 +assert_return( + () => invoke($0, `i16x8.shl`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 8]), + [i16x8([0x0, 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x700])], +); + +// ./test/core/simd/simd_bit_shift.wast:206 +assert_return( + () => invoke($0, `i16x8.shl`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 32]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:209 +assert_return( + () => invoke($0, `i16x8.shl`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 128]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:212 +assert_return( + () => invoke($0, `i16x8.shl`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 256]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:216 +assert_return( + () => invoke($0, `i16x8.shl`, [ + i16x8([0xff80, 0xffc0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5]), + 17, + ]), + [i16x8([0xff00, 0xff80, 0x0, 0x2, 0x4, 0x6, 0x8, 0xa])], +); + +// ./test/core/simd/simd_bit_shift.wast:219 +assert_return( + () => invoke($0, `i16x8.shl`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 17]), + [i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe])], +); + +// ./test/core/simd/simd_bit_shift.wast:222 +assert_return( + () => invoke($0, `i16x8.shl`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 33]), + [i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe])], +); + +// ./test/core/simd/simd_bit_shift.wast:225 +assert_return( + () => invoke($0, `i16x8.shl`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 129]), + [i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe])], +); + +// ./test/core/simd/simd_bit_shift.wast:228 +assert_return( + () => invoke($0, `i16x8.shl`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 257]), + [i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe])], +); + +// ./test/core/simd/simd_bit_shift.wast:231 +assert_return( + () => invoke($0, `i16x8.shl`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 513]), + [i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe])], +); + +// ./test/core/simd/simd_bit_shift.wast:234 +assert_return( + () => invoke($0, `i16x8.shl`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 514]), + [i16x8([0x0, 0x4, 0x8, 0xc, 0x10, 0x14, 0x18, 0x1c])], +); + +// ./test/core/simd/simd_bit_shift.wast:240 +assert_return( + () => invoke($0, `i16x8.shr_u`, [ + i16x8([0xff80, 0xffc0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5]), + 1, + ]), + [i16x8([0x7fc0, 0x7fe0, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2])], +); + +// ./test/core/simd/simd_bit_shift.wast:243 +assert_return( + () => invoke($0, `i16x8.shr_u`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + 2, + ]), + [i16x8([0xc0e, 0xc0e, 0xc0e, 0xc0e, 0xc0e, 0xc0e, 0xc0e, 0xc0e])], +); + +// ./test/core/simd/simd_bit_shift.wast:246 +assert_return( + () => invoke($0, `i16x8.shr_u`, [ + i16x8([0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab]), + 2, + ]), + [i16x8([0x242a, 0x242a, 0x242a, 0x242a, 0x242a, 0x242a, 0x242a, 0x242a])], +); + +// ./test/core/simd/simd_bit_shift.wast:249 +assert_return( + () => invoke($0, `i16x8.shr_u`, [ + i16x8([0xaabb, 0xccdd, 0xeeff, 0xa0b0, 0xc0d0, 0xe0f0, 0xa0b, 0xc0d]), + 4, + ]), + [i16x8([0xaab, 0xccd, 0xeef, 0xa0b, 0xc0d, 0xe0f, 0xa0, 0xc0])], +); + +// ./test/core/simd/simd_bit_shift.wast:252 +assert_return( + () => invoke($0, `i16x8.shr_u`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 8]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bit_shift.wast:256 +assert_return( + () => invoke($0, `i16x8.shr_u`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 32]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:259 +assert_return( + () => invoke($0, `i16x8.shr_u`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + 128, + ]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:262 +assert_return( + () => invoke($0, `i16x8.shr_u`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + 256, + ]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:266 +assert_return( + () => invoke($0, `i16x8.shr_u`, [ + i16x8([0xff80, 0xffc0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5]), + 17, + ]), + [i16x8([0x7fc0, 0x7fe0, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2])], +); + +// ./test/core/simd/simd_bit_shift.wast:269 +assert_return( + () => invoke($0, `i16x8.shr_u`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 17]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:272 +assert_return( + () => invoke($0, `i16x8.shr_u`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 33]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:275 +assert_return( + () => invoke($0, `i16x8.shr_u`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + 129, + ]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:278 +assert_return( + () => invoke($0, `i16x8.shr_u`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + 257, + ]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:281 +assert_return( + () => invoke($0, `i16x8.shr_u`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + 513, + ]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:284 +assert_return( + () => invoke($0, `i16x8.shr_u`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + 514, + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_bit_shift.wast:290 +assert_return( + () => invoke($0, `i16x8.shr_s`, [ + i16x8([0xff80, 0xffc0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5]), + 1, + ]), + [i16x8([0xffc0, 0xffe0, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2])], +); + +// ./test/core/simd/simd_bit_shift.wast:293 +assert_return( + () => invoke($0, `i16x8.shr_s`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + 2, + ]), + [i16x8([0xc0e, 0xc0e, 0xc0e, 0xc0e, 0xc0e, 0xc0e, 0xc0e, 0xc0e])], +); + +// ./test/core/simd/simd_bit_shift.wast:296 +assert_return( + () => invoke($0, `i16x8.shr_s`, [ + i16x8([0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab]), + 2, + ]), + [i16x8([0xe42a, 0xe42a, 0xe42a, 0xe42a, 0xe42a, 0xe42a, 0xe42a, 0xe42a])], +); + +// ./test/core/simd/simd_bit_shift.wast:299 +assert_return( + () => invoke($0, `i16x8.shr_s`, [ + i16x8([0xaabb, 0xccdd, 0xeeff, 0xa0b0, 0xc0d0, 0xe0f0, 0xa0b, 0xc0d]), + 4, + ]), + [i16x8([0xfaab, 0xfccd, 0xfeef, 0xfa0b, 0xfc0d, 0xfe0f, 0xa0, 0xc0])], +); + +// ./test/core/simd/simd_bit_shift.wast:302 +assert_return( + () => invoke($0, `i16x8.shr_s`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 8]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bit_shift.wast:306 +assert_return( + () => invoke($0, `i16x8.shr_s`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 32]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:309 +assert_return( + () => invoke($0, `i16x8.shr_s`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + 128, + ]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:312 +assert_return( + () => invoke($0, `i16x8.shr_s`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + 256, + ]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:316 +assert_return( + () => invoke($0, `i16x8.shr_s`, [ + i16x8([0xff80, 0xffc0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5]), + 17, + ]), + [i16x8([0xffc0, 0xffe0, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2])], +); + +// ./test/core/simd/simd_bit_shift.wast:319 +assert_return( + () => invoke($0, `i16x8.shr_s`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 17]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:322 +assert_return( + () => invoke($0, `i16x8.shr_s`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), 33]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:325 +assert_return( + () => invoke($0, `i16x8.shr_s`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + 129, + ]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:328 +assert_return( + () => invoke($0, `i16x8.shr_s`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + 257, + ]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:331 +assert_return( + () => invoke($0, `i16x8.shr_s`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + 513, + ]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:334 +assert_return( + () => invoke($0, `i16x8.shr_s`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + 514, + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_bit_shift.wast:339 +assert_return( + () => invoke($0, `i16x8.shl_1`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])]), + [i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe])], +); + +// ./test/core/simd/simd_bit_shift.wast:341 +assert_return( + () => invoke($0, `i16x8.shr_u_16`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:343 +assert_return( + () => invoke($0, `i16x8.shr_s_17`, [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:348 +assert_return( + () => invoke($0, `i32x4.shl`, [i32x4([0x80000000, 0xffff8000, 0x0, 0xa0b0c0d]), 1]), + [i32x4([0x0, 0xffff0000, 0x0, 0x1416181a])], +); + +// ./test/core/simd/simd_bit_shift.wast:351 +assert_return( + () => invoke($0, `i32x4.shl`, [ + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + 2, + ]), + [i32x4([0x26580b48, 0x26580b48, 0x26580b48, 0x26580b48])], +); + +// ./test/core/simd/simd_bit_shift.wast:354 +assert_return( + () => invoke($0, `i32x4.shl`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + 2, + ]), + [i32x4([0x48d159e0, 0x48d159e0, 0x48d159e0, 0x48d159e0])], +); + +// ./test/core/simd/simd_bit_shift.wast:357 +assert_return( + () => invoke($0, `i32x4.shl`, [ + i32x4([0xaabbccdd, 0xeeffa0b0, 0xc0d0e0f0, 0xa0b0c0d]), + 4, + ]), + [i32x4([0xabbccdd0, 0xeffa0b00, 0xd0e0f00, 0xa0b0c0d0])], +); + +// ./test/core/simd/simd_bit_shift.wast:360 +assert_return( + () => invoke($0, `i32x4.shl`, [i32x4([0x0, 0x1, 0xe, 0xf]), 8]), + [i32x4([0x0, 0x100, 0xe00, 0xf00])], +); + +// ./test/core/simd/simd_bit_shift.wast:364 +assert_return( + () => invoke($0, `i32x4.shl`, [i32x4([0x0, 0x1, 0xe, 0xf]), 32]), + [i32x4([0x0, 0x1, 0xe, 0xf])], +); + +// ./test/core/simd/simd_bit_shift.wast:367 +assert_return( + () => invoke($0, `i32x4.shl`, [i32x4([0x0, 0x1, 0xe, 0xf]), 128]), + [i32x4([0x0, 0x1, 0xe, 0xf])], +); + +// ./test/core/simd/simd_bit_shift.wast:370 +assert_return( + () => invoke($0, `i32x4.shl`, [i32x4([0x0, 0x1, 0xe, 0xf]), 256]), + [i32x4([0x0, 0x1, 0xe, 0xf])], +); + +// ./test/core/simd/simd_bit_shift.wast:374 +assert_return( + () => invoke($0, `i32x4.shl`, [i32x4([0x80000000, 0xffff8000, 0x0, 0xa0b0c0d]), 33]), + [i32x4([0x0, 0xffff0000, 0x0, 0x1416181a])], +); + +// ./test/core/simd/simd_bit_shift.wast:377 +assert_return( + () => invoke($0, `i32x4.shl`, [i32x4([0x0, 0x1, 0xe, 0xf]), 33]), + [i32x4([0x0, 0x2, 0x1c, 0x1e])], +); + +// ./test/core/simd/simd_bit_shift.wast:380 +assert_return( + () => invoke($0, `i32x4.shl`, [i32x4([0x0, 0x1, 0xe, 0xf]), 65]), + [i32x4([0x0, 0x2, 0x1c, 0x1e])], +); + +// ./test/core/simd/simd_bit_shift.wast:383 +assert_return( + () => invoke($0, `i32x4.shl`, [i32x4([0x0, 0x1, 0xe, 0xf]), 129]), + [i32x4([0x0, 0x2, 0x1c, 0x1e])], +); + +// ./test/core/simd/simd_bit_shift.wast:386 +assert_return( + () => invoke($0, `i32x4.shl`, [i32x4([0x0, 0x1, 0xe, 0xf]), 257]), + [i32x4([0x0, 0x2, 0x1c, 0x1e])], +); + +// ./test/core/simd/simd_bit_shift.wast:389 +assert_return( + () => invoke($0, `i32x4.shl`, [i32x4([0x0, 0x1, 0xe, 0xf]), 513]), + [i32x4([0x0, 0x2, 0x1c, 0x1e])], +); + +// ./test/core/simd/simd_bit_shift.wast:392 +assert_return( + () => invoke($0, `i32x4.shl`, [i32x4([0x0, 0x1, 0xe, 0xf]), 514]), + [i32x4([0x0, 0x4, 0x38, 0x3c])], +); + +// ./test/core/simd/simd_bit_shift.wast:398 +assert_return( + () => invoke($0, `i32x4.shr_u`, [i32x4([0x80000000, 0xffff8000, 0xc, 0xd]), 1]), + [i32x4([0x40000000, 0x7fffc000, 0x6, 0x6])], +); + +// ./test/core/simd/simd_bit_shift.wast:401 +assert_return( + () => invoke($0, `i32x4.shr_u`, [ + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + 2, + ]), + [i32x4([0x126580b4, 0x126580b4, 0x126580b4, 0x126580b4])], +); + +// ./test/core/simd/simd_bit_shift.wast:404 +assert_return( + () => invoke($0, `i32x4.shr_u`, [ + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + 2, + ]), + [i32x4([0x242af37b, 0x242af37b, 0x242af37b, 0x242af37b])], +); + +// ./test/core/simd/simd_bit_shift.wast:407 +assert_return( + () => invoke($0, `i32x4.shr_u`, [ + i32x4([0xaabbccdd, 0xeeffa0b0, 0xc0d0e0f0, 0xa0b0c0d]), + 4, + ]), + [i32x4([0xaabbccd, 0xeeffa0b, 0xc0d0e0f, 0xa0b0c0])], +); + +// ./test/core/simd/simd_bit_shift.wast:410 +assert_return( + () => invoke($0, `i32x4.shr_u`, [i32x4([0x0, 0x1, 0xe, 0xf]), 8]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bit_shift.wast:414 +assert_return( + () => invoke($0, `i32x4.shr_u`, [i32x4([0x0, 0x1, 0xe, 0xf]), 32]), + [i32x4([0x0, 0x1, 0xe, 0xf])], +); + +// ./test/core/simd/simd_bit_shift.wast:417 +assert_return( + () => invoke($0, `i32x4.shr_u`, [i32x4([0x0, 0x1, 0xe, 0xf]), 128]), + [i32x4([0x0, 0x1, 0xe, 0xf])], +); + +// ./test/core/simd/simd_bit_shift.wast:420 +assert_return( + () => invoke($0, `i32x4.shr_u`, [i32x4([0x0, 0x1, 0xe, 0xf]), 256]), + [i32x4([0x0, 0x1, 0xe, 0xf])], +); + +// ./test/core/simd/simd_bit_shift.wast:424 +assert_return( + () => invoke($0, `i32x4.shr_u`, [i32x4([0x80000000, 0xffff8000, 0xc, 0xd]), 33]), + [i32x4([0x40000000, 0x7fffc000, 0x6, 0x6])], +); + +// ./test/core/simd/simd_bit_shift.wast:427 +assert_return( + () => invoke($0, `i32x4.shr_u`, [i32x4([0x0, 0x1, 0xe, 0xf]), 33]), + [i32x4([0x0, 0x0, 0x7, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:430 +assert_return( + () => invoke($0, `i32x4.shr_u`, [i32x4([0x0, 0x1, 0xe, 0xf]), 65]), + [i32x4([0x0, 0x0, 0x7, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:433 +assert_return( + () => invoke($0, `i32x4.shr_u`, [i32x4([0x0, 0x1, 0xe, 0xf]), 129]), + [i32x4([0x0, 0x0, 0x7, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:436 +assert_return( + () => invoke($0, `i32x4.shr_u`, [i32x4([0x0, 0x1, 0xe, 0xf]), 257]), + [i32x4([0x0, 0x0, 0x7, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:439 +assert_return( + () => invoke($0, `i32x4.shr_u`, [i32x4([0x0, 0x1, 0xe, 0xf]), 513]), + [i32x4([0x0, 0x0, 0x7, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:442 +assert_return( + () => invoke($0, `i32x4.shr_u`, [i32x4([0x0, 0x1, 0xe, 0xf]), 514]), + [i32x4([0x0, 0x0, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:448 +assert_return( + () => invoke($0, `i32x4.shr_s`, [i32x4([0x80000000, 0xffff8000, 0xc, 0xd]), 1]), + [i32x4([0xc0000000, 0xffffc000, 0x6, 0x6])], +); + +// ./test/core/simd/simd_bit_shift.wast:451 +assert_return( + () => invoke($0, `i32x4.shr_s`, [ + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + 2, + ]), + [i32x4([0x126580b4, 0x126580b4, 0x126580b4, 0x126580b4])], +); + +// ./test/core/simd/simd_bit_shift.wast:454 +assert_return( + () => invoke($0, `i32x4.shr_s`, [ + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + 2, + ]), + [i32x4([0xe42af37b, 0xe42af37b, 0xe42af37b, 0xe42af37b])], +); + +// ./test/core/simd/simd_bit_shift.wast:457 +assert_return( + () => invoke($0, `i32x4.shr_s`, [ + i32x4([0xaabbccdd, 0xeeffa0b0, 0xc0d0e0f0, 0xa0b0c0d]), + 4, + ]), + [i32x4([0xfaabbccd, 0xfeeffa0b, 0xfc0d0e0f, 0xa0b0c0])], +); + +// ./test/core/simd/simd_bit_shift.wast:461 +assert_return( + () => invoke($0, `i32x4.shr_s`, [i32x4([0x0, 0x1, 0xe, 0xf]), 8]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bit_shift.wast:464 +assert_return( + () => invoke($0, `i32x4.shr_s`, [i32x4([0x0, 0x1, 0xe, 0xf]), 32]), + [i32x4([0x0, 0x1, 0xe, 0xf])], +); + +// ./test/core/simd/simd_bit_shift.wast:467 +assert_return( + () => invoke($0, `i32x4.shr_s`, [i32x4([0x0, 0x1, 0xe, 0xf]), 128]), + [i32x4([0x0, 0x1, 0xe, 0xf])], +); + +// ./test/core/simd/simd_bit_shift.wast:470 +assert_return( + () => invoke($0, `i32x4.shr_s`, [i32x4([0x0, 0x1, 0xe, 0xf]), 256]), + [i32x4([0x0, 0x1, 0xe, 0xf])], +); + +// ./test/core/simd/simd_bit_shift.wast:474 +assert_return( + () => invoke($0, `i32x4.shr_s`, [i32x4([0x80000000, 0xffff8000, 0xc, 0xd]), 33]), + [i32x4([0xc0000000, 0xffffc000, 0x6, 0x6])], +); + +// ./test/core/simd/simd_bit_shift.wast:477 +assert_return( + () => invoke($0, `i32x4.shr_s`, [i32x4([0x0, 0x1, 0xe, 0xf]), 33]), + [i32x4([0x0, 0x0, 0x7, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:480 +assert_return( + () => invoke($0, `i32x4.shr_s`, [i32x4([0x0, 0x1, 0xe, 0xf]), 65]), + [i32x4([0x0, 0x0, 0x7, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:483 +assert_return( + () => invoke($0, `i32x4.shr_s`, [i32x4([0x0, 0x1, 0xe, 0xf]), 129]), + [i32x4([0x0, 0x0, 0x7, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:486 +assert_return( + () => invoke($0, `i32x4.shr_s`, [i32x4([0x0, 0x1, 0xe, 0xf]), 257]), + [i32x4([0x0, 0x0, 0x7, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:489 +assert_return( + () => invoke($0, `i32x4.shr_s`, [i32x4([0x0, 0x1, 0xe, 0xf]), 513]), + [i32x4([0x0, 0x0, 0x7, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:492 +assert_return( + () => invoke($0, `i32x4.shr_s`, [i32x4([0x0, 0x1, 0xe, 0xf]), 514]), + [i32x4([0x0, 0x0, 0x3, 0x3])], +); + +// ./test/core/simd/simd_bit_shift.wast:497 +assert_return( + () => invoke($0, `i32x4.shl_1`, [i32x4([0x0, 0x1, 0xe, 0xf])]), + [i32x4([0x0, 0x2, 0x1c, 0x1e])], +); + +// ./test/core/simd/simd_bit_shift.wast:499 +assert_return( + () => invoke($0, `i32x4.shr_u_32`, [i32x4([0x0, 0x1, 0xe, 0xf])]), + [i32x4([0x0, 0x1, 0xe, 0xf])], +); + +// ./test/core/simd/simd_bit_shift.wast:501 +assert_return( + () => invoke($0, `i32x4.shr_s_33`, [i32x4([0x0, 0x1, 0xe, 0xf])]), + [i32x4([0x0, 0x0, 0x7, 0x7])], +); + +// ./test/core/simd/simd_bit_shift.wast:506 +assert_return( + () => invoke($0, `i64x2.shl`, [i64x2([0x8000000000000000n, 0xffffffff80000000n]), 1]), + [i64x2([0x0n, 0xffffffff00000000n])], +); + +// ./test/core/simd/simd_bit_shift.wast:509 +assert_return( + () => invoke($0, `i64x2.shl`, [i64x2([0x112210f47de98115n, 0x112210f47de98115n]), 2]), + [i64x2([0x448843d1f7a60454n, 0x448843d1f7a60454n])], +); + +// ./test/core/simd/simd_bit_shift.wast:512 +assert_return( + () => invoke($0, `i64x2.shl`, [i64x2([0x1234567890abcdefn, 0x1234567890abcdefn]), 2]), + [i64x2([0x48d159e242af37bcn, 0x48d159e242af37bcn])], +); + +// ./test/core/simd/simd_bit_shift.wast:515 +assert_return( + () => invoke($0, `i64x2.shl`, [i64x2([0xaabbccddeeffa0b0n, 0xc0d0e0f00a0b0c0dn]), 4]), + [i64x2([0xabbccddeeffa0b00n, 0xd0e0f00a0b0c0d0n])], +); + +// ./test/core/simd/simd_bit_shift.wast:518 +assert_return( + () => invoke($0, `i64x2.shl`, [i64x2([0xaabbccddeeffa0b0n, 0xc0d0e0f00a0b0c0dn]), 8]), + [i64x2([0xbbccddeeffa0b000n, 0xd0e0f00a0b0c0d00n])], +); + +// ./test/core/simd/simd_bit_shift.wast:521 +assert_return(() => invoke($0, `i64x2.shl`, [i64x2([0x1n, 0xfn]), 16]), [i64x2([0x10000n, 0xf0000n])]); + +// ./test/core/simd/simd_bit_shift.wast:524 +assert_return( + () => invoke($0, `i64x2.shl`, [i64x2([0x1n, 0xfn]), 32]), + [i64x2([0x100000000n, 0xf00000000n])], +); + +// ./test/core/simd/simd_bit_shift.wast:528 +assert_return(() => invoke($0, `i64x2.shl`, [i64x2([0x1n, 0xfn]), 128]), [i64x2([0x1n, 0xfn])]); + +// ./test/core/simd/simd_bit_shift.wast:531 +assert_return(() => invoke($0, `i64x2.shl`, [i64x2([0x1n, 0xfn]), 256]), [i64x2([0x1n, 0xfn])]); + +// ./test/core/simd/simd_bit_shift.wast:535 +assert_return(() => invoke($0, `i64x2.shl`, [i64x2([0x1n, 0xfn]), 65]), [i64x2([0x2n, 0x1en])]); + +// ./test/core/simd/simd_bit_shift.wast:538 +assert_return(() => invoke($0, `i64x2.shl`, [i64x2([0x1n, 0xfn]), 129]), [i64x2([0x2n, 0x1en])]); + +// ./test/core/simd/simd_bit_shift.wast:541 +assert_return(() => invoke($0, `i64x2.shl`, [i64x2([0x1n, 0xfn]), 257]), [i64x2([0x2n, 0x1en])]); + +// ./test/core/simd/simd_bit_shift.wast:544 +assert_return(() => invoke($0, `i64x2.shl`, [i64x2([0x1n, 0xfn]), 513]), [i64x2([0x2n, 0x1en])]); + +// ./test/core/simd/simd_bit_shift.wast:547 +assert_return(() => invoke($0, `i64x2.shl`, [i64x2([0x1n, 0xfn]), 514]), [i64x2([0x4n, 0x3cn])]); + +// ./test/core/simd/simd_bit_shift.wast:553 +assert_return( + () => invoke($0, `i64x2.shr_u`, [ + i64x2([0x8000000000000000n, 0xffffffff80000000n]), + 1, + ]), + [i64x2([0x4000000000000000n, 0x7fffffffc0000000n])], +); + +// ./test/core/simd/simd_bit_shift.wast:556 +assert_return( + () => invoke($0, `i64x2.shr_u`, [ + i64x2([0x112210f47de98115n, 0x112210f47de98115n]), + 2, + ]), + [i64x2([0x448843d1f7a6045n, 0x448843d1f7a6045n])], +); + +// ./test/core/simd/simd_bit_shift.wast:559 +assert_return( + () => invoke($0, `i64x2.shr_u`, [ + i64x2([0x90abcdef87654321n, 0x90abcdef87654321n]), + 2, + ]), + [i64x2([0x242af37be1d950c8n, 0x242af37be1d950c8n])], +); + +// ./test/core/simd/simd_bit_shift.wast:562 +assert_return( + () => invoke($0, `i64x2.shr_u`, [ + i64x2([0xaabbccddeeffa0b0n, 0xc0d0e0f00a0b0c0dn]), + 4, + ]), + [i64x2([0xaabbccddeeffa0bn, 0xc0d0e0f00a0b0c0n])], +); + +// ./test/core/simd/simd_bit_shift.wast:565 +assert_return( + () => invoke($0, `i64x2.shr_u`, [ + i64x2([0xaabbccddeeffa0b0n, 0xc0d0e0f00a0b0c0dn]), + 8, + ]), + [i64x2([0xaabbccddeeffa0n, 0xc0d0e0f00a0b0cn])], +); + +// ./test/core/simd/simd_bit_shift.wast:568 +assert_return(() => invoke($0, `i64x2.shr_u`, [i64x2([0x1n, 0xfn]), 16]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_bit_shift.wast:571 +assert_return(() => invoke($0, `i64x2.shr_u`, [i64x2([0x1n, 0xfn]), 32]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_bit_shift.wast:575 +assert_return(() => invoke($0, `i64x2.shr_u`, [i64x2([0x1n, 0xfn]), 128]), [i64x2([0x1n, 0xfn])]); + +// ./test/core/simd/simd_bit_shift.wast:578 +assert_return(() => invoke($0, `i64x2.shr_u`, [i64x2([0x1n, 0xfn]), 256]), [i64x2([0x1n, 0xfn])]); + +// ./test/core/simd/simd_bit_shift.wast:582 +assert_return(() => invoke($0, `i64x2.shr_u`, [i64x2([0x1n, 0xfn]), 65]), [i64x2([0x0n, 0x7n])]); + +// ./test/core/simd/simd_bit_shift.wast:585 +assert_return(() => invoke($0, `i64x2.shr_u`, [i64x2([0x1n, 0xfn]), 129]), [i64x2([0x0n, 0x7n])]); + +// ./test/core/simd/simd_bit_shift.wast:588 +assert_return(() => invoke($0, `i64x2.shr_u`, [i64x2([0x1n, 0xfn]), 257]), [i64x2([0x0n, 0x7n])]); + +// ./test/core/simd/simd_bit_shift.wast:591 +assert_return(() => invoke($0, `i64x2.shr_u`, [i64x2([0x1n, 0xfn]), 513]), [i64x2([0x0n, 0x7n])]); + +// ./test/core/simd/simd_bit_shift.wast:594 +assert_return(() => invoke($0, `i64x2.shr_u`, [i64x2([0x0n, 0xfn]), 514]), [i64x2([0x0n, 0x3n])]); + +// ./test/core/simd/simd_bit_shift.wast:600 +assert_return( + () => invoke($0, `i64x2.shr_s`, [ + i64x2([0x8000000000000000n, 0xffffffff80000000n]), + 1, + ]), + [i64x2([0xc000000000000000n, 0xffffffffc0000000n])], +); + +// ./test/core/simd/simd_bit_shift.wast:603 +assert_return( + () => invoke($0, `i64x2.shr_s`, [ + i64x2([0x112210f47de98115n, 0x112210f47de98115n]), + 2, + ]), + [i64x2([0x448843d1f7a6045n, 0x448843d1f7a6045n])], +); + +// ./test/core/simd/simd_bit_shift.wast:606 +assert_return( + () => invoke($0, `i64x2.shr_s`, [ + i64x2([0x90abcdef87654321n, 0x90abcdef87654321n]), + 2, + ]), + [i64x2([0xe42af37be1d950c8n, 0xe42af37be1d950c8n])], +); + +// ./test/core/simd/simd_bit_shift.wast:609 +assert_return( + () => invoke($0, `i64x2.shr_s`, [ + i64x2([0xaabbccddeeffa0b0n, 0xc0d0e0f00a0b0c0dn]), + 4, + ]), + [i64x2([0xfaabbccddeeffa0bn, 0xfc0d0e0f00a0b0c0n])], +); + +// ./test/core/simd/simd_bit_shift.wast:612 +assert_return( + () => invoke($0, `i64x2.shr_s`, [ + i64x2([0xffaabbccddeeffa0n, 0xc0d0e0f00a0b0c0dn]), + 8, + ]), + [i64x2([0xffffaabbccddeeffn, 0xffc0d0e0f00a0b0cn])], +); + +// ./test/core/simd/simd_bit_shift.wast:615 +assert_return(() => invoke($0, `i64x2.shr_s`, [i64x2([0x1n, 0xfn]), 16]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_bit_shift.wast:618 +assert_return(() => invoke($0, `i64x2.shr_s`, [i64x2([0x1n, 0xfn]), 32]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_bit_shift.wast:622 +assert_return(() => invoke($0, `i64x2.shr_s`, [i64x2([0x1n, 0xfn]), 128]), [i64x2([0x1n, 0xfn])]); + +// ./test/core/simd/simd_bit_shift.wast:625 +assert_return(() => invoke($0, `i64x2.shr_s`, [i64x2([0x1n, 0xfn]), 256]), [i64x2([0x1n, 0xfn])]); + +// ./test/core/simd/simd_bit_shift.wast:629 +assert_return( + () => invoke($0, `i64x2.shr_s`, [ + i64x2([0x8000000000000000n, 0xffffffff80000000n]), + 65, + ]), + [i64x2([0xc000000000000000n, 0xffffffffc0000000n])], +); + +// ./test/core/simd/simd_bit_shift.wast:632 +assert_return(() => invoke($0, `i64x2.shr_s`, [i64x2([0xcn, 0xdn]), 65]), [i64x2([0x6n, 0x6n])]); + +// ./test/core/simd/simd_bit_shift.wast:635 +assert_return(() => invoke($0, `i64x2.shr_s`, [i64x2([0x1n, 0xfn]), 129]), [i64x2([0x0n, 0x7n])]); + +// ./test/core/simd/simd_bit_shift.wast:638 +assert_return(() => invoke($0, `i64x2.shr_s`, [i64x2([0x1n, 0xfn]), 257]), [i64x2([0x0n, 0x7n])]); + +// ./test/core/simd/simd_bit_shift.wast:641 +assert_return(() => invoke($0, `i64x2.shr_s`, [i64x2([0x1n, 0xfn]), 513]), [i64x2([0x0n, 0x7n])]); + +// ./test/core/simd/simd_bit_shift.wast:644 +assert_return(() => invoke($0, `i64x2.shr_s`, [i64x2([0x1n, 0xfn]), 514]), [i64x2([0x0n, 0x3n])]); + +// ./test/core/simd/simd_bit_shift.wast:649 +assert_return(() => invoke($0, `i64x2.shl_1`, [i64x2([0x1n, 0xfn])]), [i64x2([0x2n, 0x1en])]); + +// ./test/core/simd/simd_bit_shift.wast:651 +assert_return(() => invoke($0, `i64x2.shr_u_64`, [i64x2([0x1n, 0xfn])]), [i64x2([0x1n, 0xfn])]); + +// ./test/core/simd/simd_bit_shift.wast:653 +assert_return(() => invoke($0, `i64x2.shr_s_65`, [i64x2([0x1n, 0xfn])]), [i64x2([0x0n, 0x7n])]); + +// ./test/core/simd/simd_bit_shift.wast:658 +let $1 = instantiate(`(module (memory 1) + (func (export "i8x16.shl-in-block") + (block + (drop + (block (result v128) + (i8x16.shl + (block (result v128) (v128.load (i32.const 0))) (i32.const 1) + ) + ) + ) + ) + ) + (func (export "i8x16.shr_s-in-block") + (block + (drop + (block (result v128) + (i8x16.shr_s + (block (result v128) (v128.load (i32.const 0))) (i32.const 1) + ) + ) + ) + ) + ) + (func (export "i8x16.shr_u-in-block") + (block + (drop + (block (result v128) + (i8x16.shr_u + (block (result v128) (v128.load (i32.const 0))) (i32.const 1) + ) + ) + ) + ) + ) + (func (export "i16x8.shl-in-block") + (block + (drop + (block (result v128) + (i16x8.shl + (block (result v128) (v128.load (i32.const 0))) (i32.const 1) + ) + ) + ) + ) + ) + (func (export "i16x8.shr_s-in-block") + (block + (drop + (block (result v128) + (i16x8.shr_s + (block (result v128) (v128.load (i32.const 0))) (i32.const 1) + ) + ) + ) + ) + ) + (func (export "i16x8.shr_u-in-block") + (block + (drop + (block (result v128) + (i16x8.shr_u + (block (result v128) (v128.load (i32.const 0))) (i32.const 1) + ) + ) + ) + ) + ) + (func (export "i32x4.shl-in-block") + (block + (drop + (block (result v128) + (i32x4.shl + (block (result v128) (v128.load (i32.const 0))) (i32.const 1) + ) + ) + ) + ) + ) + (func (export "i32x4.shr_s-in-block") + (block + (drop + (block (result v128) + (i32x4.shr_s + (block (result v128) (v128.load (i32.const 0))) (i32.const 1) + ) + ) + ) + ) + ) + (func (export "i32x4.shr_u-in-block") + (block + (drop + (block (result v128) + (i32x4.shr_u + (block (result v128) (v128.load (i32.const 0))) (i32.const 1) + ) + ) + ) + ) + ) + (func (export "i64x2.shl-in-block") + (block + (drop + (block (result v128) + (i64x2.shl + (block (result v128) (v128.load (i32.const 0))) (i32.const 1) + ) + ) + ) + ) + ) + (func (export "i64x2.shr_s-in-block") + (block + (drop + (block (result v128) + (i64x2.shr_s + (block (result v128) (v128.load (i32.const 0))) (i32.const 1) + ) + ) + ) + ) + ) + (func (export "i64x2.shr_u-in-block") + (block + (drop + (block (result v128) + (i64x2.shr_u + (block (result v128) (v128.load (i32.const 0))) (i32.const 1) + ) + ) + ) + ) + ) + (func (export "nested-i8x16.shl") + (drop + (i8x16.shl + (i8x16.shl + (i8x16.shl + (v128.load (i32.const 0)) (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (func (export "nested-i8x16.shr_s") + (drop + (i8x16.shr_s + (i8x16.shr_s + (i8x16.shr_s + (v128.load (i32.const 0)) (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (func (export "nested-i8x16.shr_u") + (drop + (i8x16.shr_u + (i8x16.shr_u + (i8x16.shr_u + (v128.load (i32.const 0)) (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (func (export "nested-i16x8.shl") + (drop + (i16x8.shl + (i16x8.shl + (i16x8.shl + (v128.load (i32.const 0)) (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (func (export "nested-i16x8.shr_s") + (drop + (i16x8.shr_s + (i16x8.shr_s + (i16x8.shr_s + (v128.load (i32.const 0)) (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (func (export "nested-i16x8.shr_u") + (drop + (i16x8.shr_u + (i16x8.shr_u + (i16x8.shr_u + (v128.load (i32.const 0)) (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (func (export "nested-i32x4.shl") + (drop + (i32x4.shl + (i32x4.shl + (i32x4.shl + (v128.load (i32.const 0)) (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (func (export "nested-i32x4.shr_s") + (drop + (i32x4.shr_s + (i32x4.shr_s + (i32x4.shr_s + (v128.load (i32.const 0)) (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (func (export "nested-i32x4.shr_u") + (drop + (i32x4.shr_u + (i32x4.shr_u + (i32x4.shr_u + (v128.load (i32.const 0)) (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (func (export "nested-i64x2.shl") + (drop + (i64x2.shl + (i64x2.shl + (i64x2.shl + (v128.load (i32.const 0)) (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (func (export "nested-i64x2.shr_s") + (drop + (i64x2.shr_s + (i64x2.shr_s + (i64x2.shr_s + (v128.load (i32.const 0)) (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (func (export "nested-i64x2.shr_u") + (drop + (i64x2.shr_u + (i64x2.shr_u + (i64x2.shr_u + (v128.load (i32.const 0)) (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) +)`); + +// ./test/core/simd/simd_bit_shift.wast:949 +assert_return(() => invoke($1, `i8x16.shl-in-block`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:950 +assert_return(() => invoke($1, `i8x16.shr_s-in-block`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:951 +assert_return(() => invoke($1, `i8x16.shr_u-in-block`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:952 +assert_return(() => invoke($1, `i16x8.shl-in-block`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:953 +assert_return(() => invoke($1, `i16x8.shr_s-in-block`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:954 +assert_return(() => invoke($1, `i16x8.shr_u-in-block`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:955 +assert_return(() => invoke($1, `i32x4.shl-in-block`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:956 +assert_return(() => invoke($1, `i32x4.shr_s-in-block`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:957 +assert_return(() => invoke($1, `i32x4.shr_u-in-block`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:958 +assert_return(() => invoke($1, `i64x2.shl-in-block`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:959 +assert_return(() => invoke($1, `i64x2.shr_s-in-block`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:960 +assert_return(() => invoke($1, `i64x2.shr_u-in-block`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:961 +assert_return(() => invoke($1, `nested-i8x16.shl`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:962 +assert_return(() => invoke($1, `nested-i8x16.shr_s`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:963 +assert_return(() => invoke($1, `nested-i8x16.shr_u`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:964 +assert_return(() => invoke($1, `nested-i16x8.shl`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:965 +assert_return(() => invoke($1, `nested-i16x8.shr_s`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:966 +assert_return(() => invoke($1, `nested-i16x8.shr_u`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:967 +assert_return(() => invoke($1, `nested-i32x4.shl`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:968 +assert_return(() => invoke($1, `nested-i32x4.shr_s`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:969 +assert_return(() => invoke($1, `nested-i32x4.shr_u`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:970 +assert_return(() => invoke($1, `nested-i64x2.shl`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:971 +assert_return(() => invoke($1, `nested-i64x2.shr_s`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:972 +assert_return(() => invoke($1, `nested-i64x2.shr_u`, []), []); + +// ./test/core/simd/simd_bit_shift.wast:976 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.shl (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:977 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.shr_s (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:978 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.shr_u (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:979 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.shl (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:980 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.shr_s (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:981 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.shr_u (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:982 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.shl (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:983 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.shr_s (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:984 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.shr_u (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:985 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.shl (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:986 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.shr_s (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:987 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.shr_u (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:991 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.shl_s (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:992 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.shl_r (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:993 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.shr (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:994 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.shl_s (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:995 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.shl_r (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:996 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.shr (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:997 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.shl_s (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:998 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.shl_r (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:999 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.shr (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:1000 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.shl_s (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:1001 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.shl_r (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:1002 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.shr (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:1003 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f32x4.shl (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:1004 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f32x4.shr_s (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:1005 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f32x4.shr_u (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_bit_shift.wast:1009 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.shl-1st-arg-empty (result v128) + (i8x16.shl (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:1017 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.shl-last-arg-empty (result v128) + (i8x16.shl (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:1025 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.shl-arg-empty (result v128) + (i8x16.shl) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:1033 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.shr_u-1st-arg-empty (result v128) + (i16x8.shr_u (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:1041 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.shr_u-last-arg-empty (result v128) + (i16x8.shr_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:1049 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.shr_u-arg-empty (result v128) + (i16x8.shr_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:1057 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.shr_s-1st-arg-empty (result v128) + (i32x4.shr_s (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:1065 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.shr_s-last-arg-empty (result v128) + (i32x4.shr_s (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:1073 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.shr_s-arg-empty (result v128) + (i32x4.shr_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:1081 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.shl-1st-arg-empty (result v128) + (i64x2.shl (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:1089 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.shr_u-last-arg-empty (result v128) + (i64x2.shr_u (v128.const i64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bit_shift.wast:1097 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.shr_s-arg-empty (result v128) + (i64x2.shr_s) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_bitwise.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_bitwise.wast.js new file mode 100644 index 0000000000..0c270c4cc7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_bitwise.wast.js @@ -0,0 +1,2769 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_bitwise.wast + +// ./test/core/simd/simd_bitwise.wast:3 +let $0 = instantiate(`(module + (func (export "not") (param $$0 v128) (result v128) (v128.not (local.get $$0))) + (func (export "and") (param $$0 v128) (param $$1 v128) (result v128) (v128.and (local.get $$0) (local.get $$1))) + (func (export "or") (param $$0 v128) (param $$1 v128) (result v128) (v128.or (local.get $$0) (local.get $$1))) + (func (export "xor") (param $$0 v128) (param $$1 v128) (result v128) (v128.xor (local.get $$0) (local.get $$1))) + (func (export "bitselect") (param $$0 v128) (param $$1 v128) (param $$2 v128) (result v128) + (v128.bitselect (local.get $$0) (local.get $$1) (local.get $$2)) + ) + (func (export "andnot") (param $$0 v128) (param $$1 v128) (result v128) (v128.andnot (local.get $$0) (local.get $$1))) +)`); + +// ./test/core/simd/simd_bitwise.wast:15 +assert_return( + () => invoke($0, `not`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:17 +assert_return( + () => invoke($0, `not`, [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:19 +assert_return( + () => invoke($0, `not`, [i32x4([0xffffffff, 0x0, 0xffffffff, 0x0])]), + [i32x4([0x0, 0xffffffff, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:21 +assert_return( + () => invoke($0, `not`, [i32x4([0x0, 0xffffffff, 0x0, 0xffffffff])]), + [i32x4([0xffffffff, 0x0, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:23 +assert_return( + () => invoke($0, `not`, [i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555])]), + [i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa])], +); + +// ./test/core/simd/simd_bitwise.wast:25 +assert_return( + () => invoke($0, `not`, [i32x4([0xcccccccc, 0xcccccccc, 0xcccccccc, 0xcccccccc])]), + [i32x4([0x33333333, 0x33333333, 0x33333333, 0x33333333])], +); + +// ./test/core/simd/simd_bitwise.wast:27 +assert_return( + () => invoke($0, `not`, [i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2])]), + [i32x4([0xb669fd2d, 0xb669fd2d, 0xb669fd2d, 0xb669fd2d])], +); + +// ./test/core/simd/simd_bitwise.wast:29 +assert_return( + () => invoke($0, `not`, [i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678])]), + [i32x4([0xedcba987, 0xedcba987, 0xedcba987, 0xedcba987])], +); + +// ./test/core/simd/simd_bitwise.wast:31 +assert_return( + () => invoke($0, `and`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:34 +assert_return( + () => invoke($0, `and`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:37 +assert_return( + () => invoke($0, `and`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:40 +assert_return( + () => invoke($0, `and`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:43 +assert_return( + () => invoke($0, `and`, [i32x4([0x1, 0x1, 0x1, 0x1]), i32x4([0x1, 0x1, 0x1, 0x1])]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_bitwise.wast:46 +assert_return( + () => invoke($0, `and`, [ + i32x4([0xff, 0xff, 0xff, 0xff]), + i32x4([0x55, 0x55, 0x55, 0x55]), + ]), + [i32x4([0x55, 0x55, 0x55, 0x55])], +); + +// ./test/core/simd/simd_bitwise.wast:49 +assert_return( + () => invoke($0, `and`, [ + i32x4([0xff, 0xff, 0xff, 0xff]), + i32x4([0x80, 0x80, 0x80, 0x80]), + ]), + [i32x4([0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_bitwise.wast:52 +assert_return( + () => invoke($0, `and`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i32x4([0xa, 0x80, 0x5, 0xa5]), + ]), + [i32x4([0xa, 0x80, 0x0, 0xa0])], +); + +// ./test/core/simd/simd_bitwise.wast:55 +assert_return( + () => invoke($0, `and`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + ]), + [i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555])], +); + +// ./test/core/simd/simd_bitwise.wast:58 +assert_return( + () => invoke($0, `and`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa])], +); + +// ./test/core/simd/simd_bitwise.wast:61 +assert_return( + () => invoke($0, `and`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:64 +assert_return( + () => invoke($0, `and`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i32x4([0x5555, 0xffff, 0x55ff, 0x5fff]), + ]), + [i32x4([0x5555, 0x5555, 0x5555, 0x5555])], +); + +// ./test/core/simd/simd_bitwise.wast:67 +assert_return( + () => invoke($0, `and`, [ + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + ]), + [i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2])], +); + +// ./test/core/simd/simd_bitwise.wast:70 +assert_return( + () => invoke($0, `and`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + ]), + [i32x4([0x10204468, 0x10204468, 0x10204468, 0x10204468])], +); + +// ./test/core/simd/simd_bitwise.wast:73 +assert_return( + () => invoke($0, `or`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:76 +assert_return( + () => invoke($0, `or`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:79 +assert_return( + () => invoke($0, `or`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:82 +assert_return( + () => invoke($0, `or`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:85 +assert_return( + () => invoke($0, `or`, [i32x4([0x1, 0x1, 0x1, 0x1]), i32x4([0x1, 0x1, 0x1, 0x1])]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_bitwise.wast:88 +assert_return( + () => invoke($0, `or`, [ + i32x4([0xff, 0xff, 0xff, 0xff]), + i32x4([0x55, 0x55, 0x55, 0x55]), + ]), + [i32x4([0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_bitwise.wast:91 +assert_return( + () => invoke($0, `or`, [ + i32x4([0xff, 0xff, 0xff, 0xff]), + i32x4([0x80, 0x80, 0x80, 0x80]), + ]), + [i32x4([0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_bitwise.wast:94 +assert_return( + () => invoke($0, `or`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i32x4([0xa, 0x80, 0x5, 0xa5]), + ]), + [i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaf, 0xaaaaaaaf])], +); + +// ./test/core/simd/simd_bitwise.wast:97 +assert_return( + () => invoke($0, `or`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:100 +assert_return( + () => invoke($0, `or`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:103 +assert_return( + () => invoke($0, `or`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:106 +assert_return( + () => invoke($0, `or`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i32x4([0x5555, 0xffff, 0x55ff, 0x5fff]), + ]), + [i32x4([0x55555555, 0x5555ffff, 0x555555ff, 0x55555fff])], +); + +// ./test/core/simd/simd_bitwise.wast:109 +assert_return( + () => invoke($0, `or`, [ + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + ]), + [i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2])], +); + +// ./test/core/simd/simd_bitwise.wast:112 +assert_return( + () => invoke($0, `or`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + ]), + [i32x4([0x92bfdfff, 0x92bfdfff, 0x92bfdfff, 0x92bfdfff])], +); + +// ./test/core/simd/simd_bitwise.wast:115 +assert_return( + () => invoke($0, `xor`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:118 +assert_return( + () => invoke($0, `xor`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:121 +assert_return( + () => invoke($0, `xor`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:124 +assert_return( + () => invoke($0, `xor`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:127 +assert_return( + () => invoke($0, `xor`, [i32x4([0x1, 0x1, 0x1, 0x1]), i32x4([0x1, 0x1, 0x1, 0x1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:130 +assert_return( + () => invoke($0, `xor`, [ + i32x4([0xff, 0xff, 0xff, 0xff]), + i32x4([0x55, 0x55, 0x55, 0x55]), + ]), + [i32x4([0xaa, 0xaa, 0xaa, 0xaa])], +); + +// ./test/core/simd/simd_bitwise.wast:133 +assert_return( + () => invoke($0, `xor`, [ + i32x4([0xff, 0xff, 0xff, 0xff]), + i32x4([0x80, 0x80, 0x80, 0x80]), + ]), + [i32x4([0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_bitwise.wast:136 +assert_return( + () => invoke($0, `xor`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i32x4([0xa, 0x80, 0x5, 0xa5]), + ]), + [i32x4([0xaaaaaaa0, 0xaaaaaa2a, 0xaaaaaaaf, 0xaaaaaa0f])], +); + +// ./test/core/simd/simd_bitwise.wast:139 +assert_return( + () => invoke($0, `xor`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + ]), + [i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa])], +); + +// ./test/core/simd/simd_bitwise.wast:142 +assert_return( + () => invoke($0, `xor`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555])], +); + +// ./test/core/simd/simd_bitwise.wast:145 +assert_return( + () => invoke($0, `xor`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:148 +assert_return( + () => invoke($0, `xor`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i32x4([0x5555, 0xffff, 0x55ff, 0x5fff]), + ]), + [i32x4([0x55550000, 0x5555aaaa, 0x555500aa, 0x55550aaa])], +); + +// ./test/core/simd/simd_bitwise.wast:151 +assert_return( + () => invoke($0, `xor`, [ + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:154 +assert_return( + () => invoke($0, `xor`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + ]), + [i32x4([0x829f9b97, 0x829f9b97, 0x829f9b97, 0x829f9b97])], +); + +// ./test/core/simd/simd_bitwise.wast:157 +assert_return( + () => invoke($0, `bitselect`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i32x4([0xbbbbbbbb, 0xbbbbbbbb, 0xbbbbbbbb, 0xbbbbbbbb]), + i32x4([0x112345, 0xf00fffff, 0x10112021, 0xbbaabbaa]), + ]), + [i32x4([0xbbaababa, 0xabbaaaaa, 0xabaabbba, 0xaabbaabb])], +); + +// ./test/core/simd/simd_bitwise.wast:161 +assert_return( + () => invoke($0, `bitselect`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i32x4([0xbbbbbbbb, 0xbbbbbbbb, 0xbbbbbbbb, 0xbbbbbbbb]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xbbbbbbbb, 0xbbbbbbbb, 0xbbbbbbbb, 0xbbbbbbbb])], +); + +// ./test/core/simd/simd_bitwise.wast:165 +assert_return( + () => invoke($0, `bitselect`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i32x4([0xbbbbbbbb, 0xbbbbbbbb, 0xbbbbbbbb, 0xbbbbbbbb]), + i32x4([0x11111111, 0x11111111, 0x11111111, 0x11111111]), + ]), + [i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa])], +); + +// ./test/core/simd/simd_bitwise.wast:169 +assert_return( + () => invoke($0, `bitselect`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i32x4([0xbbbbbbbb, 0xbbbbbbbb, 0xbbbbbbbb, 0xbbbbbbbb]), + i32x4([0x1234567, 0x89abcdef, 0xfedcba98, 0x76543210]), + ]), + [i32x4([0xbabababa, 0xbabababa, 0xabababab, 0xabababab])], +); + +// ./test/core/simd/simd_bitwise.wast:173 +assert_return( + () => invoke($0, `bitselect`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i32x4([0x1234567, 0x89abcdef, 0xfedcba98, 0x76543210]), + ]), + [i32x4([0x54761032, 0xdcfe98ba, 0xab89efcd, 0x23016745])], +); + +// ./test/core/simd/simd_bitwise.wast:177 +assert_return( + () => invoke($0, `bitselect`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i32x4([0x55555555, 0xaaaaaaaa, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0xffffffff, 0x55555555, 0xaaaaaaaa])], +); + +// ./test/core/simd/simd_bitwise.wast:181 +assert_return( + () => invoke($0, `bitselect`, [ + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + i32x4([0xb669fd2e, 0xb669fd2e, 0xb669fd2e, 0xb669fd2e]), + i32x4([0xcdefcdef, 0xcdefcdef, 0xcdefcdef, 0xcdefcdef]), + ]), + [i32x4([0x7b8630c2, 0x7b8630c2, 0x7b8630c2, 0x7b8630c2])], +); + +// ./test/core/simd/simd_bitwise.wast:185 +assert_return( + () => invoke($0, `bitselect`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + i32x4([0xcdefcdef, 0xcdefcdef, 0xcdefcdef, 0xcdefcdef]), + ]), + [i32x4([0x10244468, 0x10244468, 0x10244468, 0x10244468])], +); + +// ./test/core/simd/simd_bitwise.wast:189 +assert_return( + () => invoke($0, `andnot`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:192 +assert_return( + () => invoke($0, `andnot`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:195 +assert_return( + () => invoke($0, `andnot`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:198 +assert_return( + () => invoke($0, `andnot`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:201 +assert_return( + () => invoke($0, `andnot`, [i32x4([0x1, 0x1, 0x1, 0x1]), i32x4([0x1, 0x1, 0x1, 0x1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:204 +assert_return( + () => invoke($0, `andnot`, [ + i32x4([0xff, 0xff, 0xff, 0xff]), + i32x4([0x55, 0x55, 0x55, 0x55]), + ]), + [i32x4([0xaa, 0xaa, 0xaa, 0xaa])], +); + +// ./test/core/simd/simd_bitwise.wast:207 +assert_return( + () => invoke($0, `andnot`, [ + i32x4([0xff, 0xff, 0xff, 0xff]), + i32x4([0x80, 0x80, 0x80, 0x80]), + ]), + [i32x4([0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_bitwise.wast:210 +assert_return( + () => invoke($0, `andnot`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i32x4([0xa, 0x80, 0x5, 0xa5]), + ]), + [i32x4([0xaaaaaaa0, 0xaaaaaa2a, 0xaaaaaaaa, 0xaaaaaa0a])], +); + +// ./test/core/simd/simd_bitwise.wast:213 +assert_return( + () => invoke($0, `andnot`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + ]), + [i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa])], +); + +// ./test/core/simd/simd_bitwise.wast:216 +assert_return( + () => invoke($0, `andnot`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555])], +); + +// ./test/core/simd/simd_bitwise.wast:219 +assert_return( + () => invoke($0, `andnot`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_bitwise.wast:222 +assert_return( + () => invoke($0, `andnot`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i32x4([0x5555, 0xffff, 0x55ff, 0x5fff]), + ]), + [i32x4([0x55550000, 0x55550000, 0x55550000, 0x55550000])], +); + +// ./test/core/simd/simd_bitwise.wast:225 +assert_return( + () => invoke($0, `andnot`, [ + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:228 +assert_return( + () => invoke($0, `andnot`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + ]), + [i32x4([0x2141210, 0x2141210, 0x2141210, 0x2141210])], +); + +// ./test/core/simd/simd_bitwise.wast:233 +assert_return( + () => invoke($0, `not`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000000000000000000000000000000000000587747), + value("f32", 0.00000000000000000000000000000000000000587747), + value("f32", 0.00000000000000000000000000000000000000587747), + value("f32", 0.00000000000000000000000000000000000000587747), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:235 +assert_return( + () => invoke($0, `not`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.00000000000000000000000000000000000000587747), + value("f32", -0.00000000000000000000000000000000000000587747), + value("f32", -0.00000000000000000000000000000000000000587747), + value("f32", -0.00000000000000000000000000000000000000587747), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:237 +assert_return( + () => invoke($0, `not`, [f32x4([-Infinity, -Infinity, -Infinity, -Infinity])]), + [i32x4([0x7fffff, 0x7fffff, 0x7fffff, 0x7fffff])], +); + +// ./test/core/simd/simd_bitwise.wast:239 +assert_return( + () => invoke($0, `not`, [f32x4([Infinity, Infinity, Infinity, Infinity])]), + [i32x4([0x807fffff, 0x807fffff, 0x807fffff, 0x807fffff])], +); + +// ./test/core/simd/simd_bitwise.wast:241 +assert_return( + () => invoke($0, `and`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffc00000, 0xffc00000, 0xffc00000, 0xffc00000])], +); + +// ./test/core/simd/simd_bitwise.wast:244 +assert_return( + () => invoke($0, `and`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:247 +assert_return( + () => invoke($0, `and`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:250 +assert_return( + () => invoke($0, `and`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:253 +assert_return( + () => invoke($0, `and`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:256 +assert_return( + () => invoke($0, `and`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:259 +assert_return( + () => invoke($0, `and`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:262 +assert_return( + () => invoke($0, `and`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:265 +assert_return( + () => invoke($0, `and`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:268 +assert_return( + () => invoke($0, `and`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:271 +assert_return( + () => invoke($0, `or`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffc00000, 0xffc00000, 0xffc00000, 0xffc00000])], +); + +// ./test/core/simd/simd_bitwise.wast:274 +assert_return( + () => invoke($0, `or`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffc00000, 0xffc00000, 0xffc00000, 0xffc00000])], +); + +// ./test/core/simd/simd_bitwise.wast:277 +assert_return( + () => invoke($0, `or`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffc00000, 0xffc00000, 0xffc00000, 0xffc00000])], +); + +// ./test/core/simd/simd_bitwise.wast:280 +assert_return( + () => invoke($0, `or`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffc00000, 0xffc00000, 0xffc00000, 0xffc00000])], +); + +// ./test/core/simd/simd_bitwise.wast:283 +assert_return( + () => invoke($0, `or`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:286 +assert_return( + () => invoke($0, `or`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffc00000, 0xffc00000, 0xffc00000, 0xffc00000])], +); + +// ./test/core/simd/simd_bitwise.wast:289 +assert_return( + () => invoke($0, `or`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:292 +assert_return( + () => invoke($0, `or`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:295 +assert_return( + () => invoke($0, `or`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:298 +assert_return( + () => invoke($0, `or`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:301 +assert_return( + () => invoke($0, `xor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:304 +assert_return( + () => invoke($0, `xor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:307 +assert_return( + () => invoke($0, `xor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x400000, 0x400000, 0x400000, 0x400000])], +); + +// ./test/core/simd/simd_bitwise.wast:310 +assert_return( + () => invoke($0, `xor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x80400000, 0x80400000, 0x80400000, 0x80400000])], +); + +// ./test/core/simd/simd_bitwise.wast:313 +assert_return( + () => invoke($0, `xor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:316 +assert_return( + () => invoke($0, `xor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x80400000, 0x80400000, 0x80400000, 0x80400000])], +); + +// ./test/core/simd/simd_bitwise.wast:319 +assert_return( + () => invoke($0, `xor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x400000, 0x400000, 0x400000, 0x400000])], +); + +// ./test/core/simd/simd_bitwise.wast:322 +assert_return( + () => invoke($0, `xor`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:325 +assert_return( + () => invoke($0, `xor`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_bitwise.wast:328 +assert_return( + () => invoke($0, `xor`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:331 +assert_return( + () => invoke($0, `bitselect`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([2779096600, 2779096600, 2779096600, 2779096600]), + ]), + [i32x4([0xffc00000, 0xffc00000, 0xffc00000, 0xffc00000])], +); + +// ./test/core/simd/simd_bitwise.wast:335 +assert_return( + () => invoke($0, `bitselect`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([2779096600, 2779096600, 2779096600, 2779096600]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:339 +assert_return( + () => invoke($0, `bitselect`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([2779096600, 2779096600, 2779096600, 2779096600]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:343 +assert_return( + () => invoke($0, `bitselect`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([2779096600, 2779096600, 2779096600, 2779096600]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:347 +assert_return( + () => invoke($0, `bitselect`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([2779096600, 2779096600, 2779096600, 2779096600]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:351 +assert_return( + () => invoke($0, `bitselect`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([2779096600, 2779096600, 2779096600, 2779096600]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:355 +assert_return( + () => invoke($0, `bitselect`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([2779096600, 2779096600, 2779096600, 2779096600]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:359 +assert_return( + () => invoke($0, `bitselect`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([2779096600, 2779096600, 2779096600, 2779096600]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:363 +assert_return( + () => invoke($0, `bitselect`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([2779096600, 2779096600, 2779096600, 2779096600]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:367 +assert_return( + () => invoke($0, `bitselect`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([2779096600, 2779096600, 2779096600, 2779096600]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:371 +assert_return( + () => invoke($0, `andnot`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:374 +assert_return( + () => invoke($0, `andnot`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:377 +assert_return( + () => invoke($0, `andnot`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x400000, 0x400000, 0x400000, 0x400000])], +); + +// ./test/core/simd/simd_bitwise.wast:380 +assert_return( + () => invoke($0, `andnot`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x80400000, 0x80400000, 0x80400000, 0x80400000])], +); + +// ./test/core/simd/simd_bitwise.wast:383 +assert_return( + () => invoke($0, `andnot`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:386 +assert_return( + () => invoke($0, `andnot`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x400000, 0x400000, 0x400000, 0x400000])], +); + +// ./test/core/simd/simd_bitwise.wast:389 +assert_return( + () => invoke($0, `andnot`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x400000, 0x400000, 0x400000, 0x400000])], +); + +// ./test/core/simd/simd_bitwise.wast:392 +assert_return( + () => invoke($0, `andnot`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_bitwise.wast:395 +assert_return( + () => invoke($0, `andnot`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_bitwise.wast:398 +assert_return( + () => invoke($0, `andnot`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_bitwise.wast:405 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.not (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:407 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.and (i32.const 0) (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:408 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.and (v128.const i32x4 0 0 0 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:409 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.and (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:411 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.or (i32.const 0) (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:412 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.or (v128.const i32x4 0 0 0 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:413 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.or (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:415 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.xor (i32.const 0) (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:416 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.xor (v128.const i32x4 0 0 0 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:417 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.xor (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:419 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.bitselect (i32.const 0) (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:420 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.bitselect (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:421 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.bitselect (i32.const 0) (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:423 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.andnot (i32.const 0) (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:424 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.andnot (v128.const i32x4 0 0 0 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:425 +assert_invalid( + () => instantiate(`(module (func (result v128) (v128.andnot (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:429 +let $1 = instantiate(`(module (memory 1) + (func (export "v128.not-in-block") + (block + (drop + (block (result v128) + (v128.not + (block (result v128) (v128.load (i32.const 0))) + ) + ) + ) + ) + ) + (func (export "v128.and-in-block") + (block + (drop + (block (result v128) + (v128.and + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "v128.or-in-block") + (block + (drop + (block (result v128) + (v128.or + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "v128.xor-in-block") + (block + (drop + (block (result v128) + (v128.xor + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "v128.bitselect-in-block") + (block + (drop + (block (result v128) + (v128.bitselect + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + (block (result v128) (v128.load (i32.const 2))) + ) + ) + ) + ) + ) + (func (export "v128.andnot-in-block") + (block + (drop + (block (result v128) + (v128.andnot + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "nested-v128.not") + (drop + (v128.not + (v128.not + (v128.not + (v128.load (i32.const 0)) + ) + ) + ) + ) + ) + (func (export "nested-v128.and") + (drop + (v128.and + (v128.and + (v128.and + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (v128.and + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + ) + (v128.and + (v128.and + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (v128.and + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + ) + ) + ) + ) + (func (export "nested-v128.or") + (drop + (v128.or + (v128.or + (v128.or + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (v128.or + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + ) + (v128.or + (v128.or + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (v128.or + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + ) + ) + ) + ) + (func (export "nested-v128.xor") + (drop + (v128.xor + (v128.xor + (v128.xor + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (v128.xor + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + ) + (v128.xor + (v128.xor + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (v128.xor + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + ) + ) + ) + ) + (func (export "nested-v128.bitselect") + (drop + (v128.bitselect + (v128.bitselect + (v128.bitselect + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + (v128.load (i32.const 2)) + ) + (v128.bitselect + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + (v128.load (i32.const 2)) + ) + (v128.bitselect + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + (v128.load (i32.const 2)) + ) + ) + (v128.bitselect + (v128.bitselect + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + (v128.load (i32.const 2)) + ) + (v128.bitselect + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + (v128.load (i32.const 2)) + ) + (v128.bitselect + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + (v128.load (i32.const 2)) + ) + ) + (v128.bitselect + (v128.bitselect + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + (v128.load (i32.const 2)) + ) + (v128.bitselect + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + (v128.load (i32.const 2)) + ) + (v128.bitselect + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + (v128.load (i32.const 2)) + ) + ) + ) + ) + ) + (func (export "nested-v128.andnot") + (drop + (v128.andnot + (v128.andnot + (v128.andnot + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (v128.andnot + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + ) + (v128.andnot + (v128.andnot + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (v128.andnot + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + ) + ) + ) + ) + (func (export "as-param") + (drop + (v128.or + (v128.and + (v128.not + (v128.load (i32.const 0)) + ) + (v128.not + (v128.load (i32.const 1)) + ) + ) + (v128.xor + (v128.bitselect + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + (v128.load (i32.const 2)) + ) + (v128.andnot + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + ) + ) + ) + ) +)`); + +// ./test/core/simd/simd_bitwise.wast:700 +assert_return(() => invoke($1, `v128.not-in-block`, []), []); + +// ./test/core/simd/simd_bitwise.wast:701 +assert_return(() => invoke($1, `v128.and-in-block`, []), []); + +// ./test/core/simd/simd_bitwise.wast:702 +assert_return(() => invoke($1, `v128.or-in-block`, []), []); + +// ./test/core/simd/simd_bitwise.wast:703 +assert_return(() => invoke($1, `v128.xor-in-block`, []), []); + +// ./test/core/simd/simd_bitwise.wast:704 +assert_return(() => invoke($1, `v128.bitselect-in-block`, []), []); + +// ./test/core/simd/simd_bitwise.wast:705 +assert_return(() => invoke($1, `v128.andnot-in-block`, []), []); + +// ./test/core/simd/simd_bitwise.wast:706 +assert_return(() => invoke($1, `nested-v128.not`, []), []); + +// ./test/core/simd/simd_bitwise.wast:707 +assert_return(() => invoke($1, `nested-v128.and`, []), []); + +// ./test/core/simd/simd_bitwise.wast:708 +assert_return(() => invoke($1, `nested-v128.or`, []), []); + +// ./test/core/simd/simd_bitwise.wast:709 +assert_return(() => invoke($1, `nested-v128.xor`, []), []); + +// ./test/core/simd/simd_bitwise.wast:710 +assert_return(() => invoke($1, `nested-v128.bitselect`, []), []); + +// ./test/core/simd/simd_bitwise.wast:711 +assert_return(() => invoke($1, `nested-v128.andnot`, []), []); + +// ./test/core/simd/simd_bitwise.wast:712 +assert_return(() => invoke($1, `as-param`, []), []); + +// ./test/core/simd/simd_bitwise.wast:717 +assert_invalid( + () => instantiate(`(module + (func $$v128.not-arg-empty (result v128) + (v128.not) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:725 +assert_invalid( + () => instantiate(`(module + (func $$v128.and-1st-arg-empty (result v128) + (v128.and (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:733 +assert_invalid( + () => instantiate(`(module + (func $$v128.and-arg-empty (result v128) + (v128.and) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:741 +assert_invalid( + () => instantiate(`(module + (func $$v128.or-1st-arg-empty (result v128) + (v128.or (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:749 +assert_invalid( + () => instantiate(`(module + (func $$v128.or-arg-empty (result v128) + (v128.or) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:757 +assert_invalid( + () => instantiate(`(module + (func $$v128.xor-1st-arg-empty (result v128) + (v128.xor (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:765 +assert_invalid( + () => instantiate(`(module + (func $$v128.xor-arg-empty (result v128) + (v128.xor) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:773 +assert_invalid( + () => instantiate(`(module + (func $$v128.andnot-1st-arg-empty (result v128) + (v128.andnot (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:781 +assert_invalid( + () => instantiate(`(module + (func $$v128.andnot-arg-empty (result v128) + (v128.andnot) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:789 +assert_invalid( + () => instantiate(`(module + (func $$v128.bitselect-1st-arg-empty (result v128) + (v128.bitselect (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:797 +assert_invalid( + () => instantiate(`(module + (func $$v128.bitselect-two-args-empty (result v128) + (v128.bitselect (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_bitwise.wast:805 +assert_invalid( + () => instantiate(`(module + (func $$v128.bitselect-arg-empty (result v128) + (v128.bitselect) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_boolean.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_boolean.wast.js new file mode 100644 index 0000000000..63959fad79 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_boolean.wast.js @@ -0,0 +1,2455 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_boolean.wast + +// ./test/core/simd/simd_boolean.wast:3 +let $0 = instantiate(`(module + (func (export "i8x16.any_true") (param $$0 v128) (result i32) (v128.any_true (local.get $$0))) + (func (export "i8x16.all_true") (param $$0 v128) (result i32) (i8x16.all_true (local.get $$0))) + (func (export "i8x16.bitmask") (param $$0 v128) (result i32) (i8x16.bitmask (local.get $$0))) + + (func (export "i16x8.any_true") (param $$0 v128) (result i32) (v128.any_true (local.get $$0))) + (func (export "i16x8.all_true") (param $$0 v128) (result i32) (i16x8.all_true (local.get $$0))) + (func (export "i16x8.bitmask") (param $$0 v128) (result i32) (i16x8.bitmask (local.get $$0))) + + (func (export "i32x4.any_true") (param $$0 v128) (result i32) (v128.any_true (local.get $$0))) + (func (export "i32x4.all_true") (param $$0 v128) (result i32) (i32x4.all_true (local.get $$0))) + (func (export "i32x4.bitmask") (param $$0 v128) (result i32) (i32x4.bitmask (local.get $$0))) + + (func (export "i64x2.all_true") (param $$0 v128) (result i32) (i64x2.all_true (local.get $$0))) + (func (export "i64x2.bitmask") (param $$0 v128) (result i32) (i64x2.bitmask (local.get $$0))) +)`); + +// ./test/core/simd/simd_boolean.wast:21 +assert_return( + () => invoke($0, `i8x16.any_true`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:23 +assert_return( + () => invoke($0, `i8x16.any_true`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:25 +assert_return( + () => invoke($0, `i8x16.any_true`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:27 +assert_return( + () => invoke($0, `i8x16.any_true`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:29 +assert_return( + () => invoke($0, `i8x16.any_true`, [ + i8x16([0xff, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xf]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:31 +assert_return( + () => invoke($0, `i8x16.any_true`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:33 +assert_return( + () => invoke($0, `i8x16.any_true`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:35 +assert_return( + () => invoke($0, `i8x16.any_true`, [ + i8x16([0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:37 +assert_return( + () => invoke($0, `i8x16.any_true`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:39 +assert_return( + () => invoke($0, `i8x16.all_true`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:41 +assert_return( + () => invoke($0, `i8x16.all_true`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:43 +assert_return( + () => invoke($0, `i8x16.all_true`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:45 +assert_return( + () => invoke($0, `i8x16.all_true`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:47 +assert_return( + () => invoke($0, `i8x16.all_true`, [ + i8x16([0xff, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xf]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:49 +assert_return( + () => invoke($0, `i8x16.all_true`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:51 +assert_return( + () => invoke($0, `i8x16.all_true`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:53 +assert_return( + () => invoke($0, `i8x16.all_true`, [ + i8x16([0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:55 +assert_return( + () => invoke($0, `i8x16.all_true`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:57 +assert_return( + () => invoke($0, `i8x16.bitmask`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 65535)], +); + +// ./test/core/simd/simd_boolean.wast:59 +assert_return( + () => invoke($0, `i8x16.bitmask`, [ + i8x16([0xff, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xf]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:63 +assert_return( + () => invoke($0, `i16x8.any_true`, [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:65 +assert_return( + () => invoke($0, `i16x8.any_true`, [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:67 +assert_return( + () => invoke($0, `i16x8.any_true`, [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:69 +assert_return( + () => invoke($0, `i16x8.any_true`, [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:71 +assert_return( + () => invoke($0, `i16x8.any_true`, [ + i16x8([0xffff, 0x0, 0x1, 0x2, 0xb, 0xc, 0xd, 0xf]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:73 +assert_return( + () => invoke($0, `i16x8.any_true`, [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:75 +assert_return( + () => invoke($0, `i16x8.any_true`, [ + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:77 +assert_return( + () => invoke($0, `i16x8.any_true`, [ + i16x8([0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:79 +assert_return( + () => invoke($0, `i16x8.any_true`, [ + i16x8([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:81 +assert_return( + () => invoke($0, `i16x8.any_true`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:83 +assert_return( + () => invoke($0, `i16x8.any_true`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:85 +assert_return( + () => invoke($0, `i16x8.all_true`, [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:87 +assert_return( + () => invoke($0, `i16x8.all_true`, [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:89 +assert_return( + () => invoke($0, `i16x8.all_true`, [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:91 +assert_return( + () => invoke($0, `i16x8.all_true`, [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:93 +assert_return( + () => invoke($0, `i16x8.all_true`, [ + i16x8([0xffff, 0x0, 0x1, 0x2, 0xb, 0xc, 0xd, 0xf]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:95 +assert_return( + () => invoke($0, `i16x8.all_true`, [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:97 +assert_return( + () => invoke($0, `i16x8.all_true`, [ + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:99 +assert_return( + () => invoke($0, `i16x8.all_true`, [ + i16x8([0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:101 +assert_return( + () => invoke($0, `i16x8.all_true`, [ + i16x8([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:103 +assert_return( + () => invoke($0, `i16x8.all_true`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:105 +assert_return( + () => invoke($0, `i16x8.all_true`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:107 +assert_return( + () => invoke($0, `i16x8.bitmask`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [value("i32", 255)], +); + +// ./test/core/simd/simd_boolean.wast:109 +assert_return( + () => invoke($0, `i16x8.bitmask`, [ + i16x8([0xffff, 0x0, 0x1, 0x2, 0xb, 0xc, 0xd, 0xf]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:113 +assert_return(() => invoke($0, `i32x4.any_true`, [i32x4([0x0, 0x0, 0x0, 0x0])]), [value("i32", 0)]); + +// ./test/core/simd/simd_boolean.wast:115 +assert_return(() => invoke($0, `i32x4.any_true`, [i32x4([0x0, 0x0, 0x1, 0x0])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:117 +assert_return(() => invoke($0, `i32x4.any_true`, [i32x4([0x1, 0x1, 0x0, 0x1])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:119 +assert_return(() => invoke($0, `i32x4.any_true`, [i32x4([0x1, 0x1, 0x1, 0x1])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:121 +assert_return( + () => invoke($0, `i32x4.any_true`, [i32x4([0xffffffff, 0x0, 0x1, 0xf])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:123 +assert_return(() => invoke($0, `i32x4.any_true`, [i32x4([0x0, 0x0, 0x0, 0x0])]), [value("i32", 0)]); + +// ./test/core/simd/simd_boolean.wast:125 +assert_return(() => invoke($0, `i32x4.any_true`, [i32x4([0xff, 0xff, 0xff, 0xff])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:127 +assert_return(() => invoke($0, `i32x4.any_true`, [i32x4([0xab, 0xab, 0xab, 0xab])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:129 +assert_return(() => invoke($0, `i32x4.any_true`, [i32x4([0x55, 0x55, 0x55, 0x55])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:131 +assert_return( + () => invoke($0, `i32x4.any_true`, [ + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:133 +assert_return( + () => invoke($0, `i32x4.any_true`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:135 +assert_return(() => invoke($0, `i32x4.all_true`, [i32x4([0x0, 0x0, 0x0, 0x0])]), [value("i32", 0)]); + +// ./test/core/simd/simd_boolean.wast:137 +assert_return(() => invoke($0, `i32x4.all_true`, [i32x4([0x0, 0x0, 0x1, 0x0])]), [value("i32", 0)]); + +// ./test/core/simd/simd_boolean.wast:139 +assert_return(() => invoke($0, `i32x4.all_true`, [i32x4([0x1, 0x1, 0x0, 0x1])]), [value("i32", 0)]); + +// ./test/core/simd/simd_boolean.wast:141 +assert_return(() => invoke($0, `i32x4.all_true`, [i32x4([0x1, 0x1, 0x1, 0x1])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:143 +assert_return( + () => invoke($0, `i32x4.all_true`, [i32x4([0xffffffff, 0x0, 0x1, 0xf])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:145 +assert_return(() => invoke($0, `i32x4.all_true`, [i32x4([0x0, 0x0, 0x0, 0x0])]), [value("i32", 0)]); + +// ./test/core/simd/simd_boolean.wast:147 +assert_return(() => invoke($0, `i32x4.all_true`, [i32x4([0xff, 0xff, 0xff, 0xff])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:149 +assert_return(() => invoke($0, `i32x4.all_true`, [i32x4([0xab, 0xab, 0xab, 0xab])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:151 +assert_return(() => invoke($0, `i32x4.all_true`, [i32x4([0x55, 0x55, 0x55, 0x55])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:153 +assert_return( + () => invoke($0, `i32x4.all_true`, [ + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:155 +assert_return( + () => invoke($0, `i32x4.all_true`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:157 +assert_return( + () => invoke($0, `i32x4.bitmask`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [value("i32", 15)], +); + +// ./test/core/simd/simd_boolean.wast:159 +assert_return( + () => invoke($0, `i32x4.bitmask`, [i32x4([0xffffffff, 0x0, 0x1, 0xf])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:163 +assert_return(() => invoke($0, `i64x2.all_true`, [i64x2([0x0n, 0x0n])]), [value("i32", 0)]); + +// ./test/core/simd/simd_boolean.wast:165 +assert_return(() => invoke($0, `i64x2.all_true`, [i64x2([0x0n, 0x1n])]), [value("i32", 0)]); + +// ./test/core/simd/simd_boolean.wast:167 +assert_return(() => invoke($0, `i64x2.all_true`, [i64x2([0x1n, 0x0n])]), [value("i32", 0)]); + +// ./test/core/simd/simd_boolean.wast:169 +assert_return(() => invoke($0, `i64x2.all_true`, [i64x2([0x1n, 0x1n])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:171 +assert_return( + () => invoke($0, `i64x2.all_true`, [i64x2([0xffffffffffffffffn, 0x0n])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:173 +assert_return(() => invoke($0, `i64x2.all_true`, [i64x2([0x0n, 0x0n])]), [value("i32", 0)]); + +// ./test/core/simd/simd_boolean.wast:175 +assert_return(() => invoke($0, `i64x2.all_true`, [i64x2([0xffn, 0xffn])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:177 +assert_return(() => invoke($0, `i64x2.all_true`, [i64x2([0xabn, 0xabn])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:179 +assert_return(() => invoke($0, `i64x2.all_true`, [i64x2([0x55n, 0x55n])]), [value("i32", 1)]); + +// ./test/core/simd/simd_boolean.wast:181 +assert_return( + () => invoke($0, `i64x2.bitmask`, [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])]), + [value("i32", 3)], +); + +// ./test/core/simd/simd_boolean.wast:183 +assert_return( + () => invoke($0, `i64x2.bitmask`, [i64x2([0xffffffffffffffffn, 0xfn])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:188 +let $1 = instantiate(`(module (memory 1) + ;; as if condition + (func (export "i8x16_any_true_as_if_cond") (param v128) (result i32) + (if (result i32) (v128.any_true (local.get 0)) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + (func (export "i16x8_any_true_as_if_cond") (param v128) (result i32) + (if (result i32) (v128.any_true (local.get 0)) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + (func (export "i32x4_any_true_as_if_cond") (param v128) (result i32) + (if (result i32) (v128.any_true (local.get 0)) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + (func (export "i8x16_all_true_as_if_cond") (param v128) (result i32) + (if (result i32) (i8x16.all_true (local.get 0)) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + (func (export "i16x8_all_true_as_if_cond") (param v128) (result i32) + (if (result i32) (i16x8.all_true (local.get 0)) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + (func (export "i32x4_all_true_as_if_cond") (param v128) (result i32) + (if (result i32) (i32x4.all_true (local.get 0)) + (then (i32.const 1)) + (else (i32.const 0)) + ) + ) + ;; any_true as select condition + (func (export "i8x16_any_true_as_select_cond") (param v128) (result i32) + (select (i32.const 1) (i32.const 0) (v128.any_true (local.get 0))) + ) + (func (export "i16x8_any_true_as_select_cond") (param v128) (result i32) + (select (i32.const 1) (i32.const 0) (v128.any_true (local.get 0))) + ) + (func (export "i32x4_any_true_as_select_cond") (param v128) (result i32) + (select (i32.const 1) (i32.const 0) (v128.any_true (local.get 0))) + ) + ;; all_true as select condition + (func (export "i8x16_all_true_as_select_cond") (param v128) (result i32) + (select (i32.const 1) (i32.const 0) (i8x16.all_true (local.get 0))) + ) + (func (export "i16x8_all_true_as_select_cond") (param v128) (result i32) + (select (i32.const 1) (i32.const 0) (i16x8.all_true (local.get 0))) + ) + (func (export "i32x4_all_true_as_select_cond") (param v128) (result i32) + (select (i32.const 1) (i32.const 0) (i32x4.all_true (local.get 0))) + ) + ;; any_true as br_if condition + (func (export "i8x16_any_true_as_br_if_cond") (param $$0 v128) (result i32) + (local $$1 i32) + (local.set $$1 (i32.const 2)) + (block + (local.set $$1 (i32.const 1)) + (br_if 0 (v128.any_true (local.get $$0))) + (local.set $$1 (i32.const 0)) + ) + (local.get $$1) + ) + (func (export "i16x8_any_true_as_br_if_cond") (param $$0 v128) (result i32) + (local $$1 i32) + (local.set $$1 (i32.const 2)) + (block + (local.set $$1 (i32.const 1)) + (br_if 0 (v128.any_true (local.get $$0))) + (local.set $$1 (i32.const 0)) + ) + (local.get $$1) + ) + (func (export "i32x4_any_true_as_br_if_cond") (param $$0 v128) (result i32) + (local $$1 i32) + (local.set $$1 (i32.const 2)) + (block + (local.set $$1 (i32.const 1)) + (br_if 0 (v128.any_true (local.get $$0))) + (local.set $$1 (i32.const 0)) + ) + (local.get $$1) + ) + ;; all_true as br_if condition + (func (export "i8x16_all_true_as_br_if_cond") (param $$0 v128) (result i32) + (local $$1 i32) + (local.set $$1 (i32.const 2)) + (block + (local.set $$1 (i32.const 1)) + (br_if 0 (i8x16.all_true (local.get $$0))) + (local.set $$1 (i32.const 0)) + ) + (local.get $$1) + ) + (func (export "i16x8_all_true_as_br_if_cond") (param $$0 v128) (result i32) + (local $$1 i32) + (local.set $$1 (i32.const 2)) + (block + (local.set $$1 (i32.const 1)) + (br_if 0 (i16x8.all_true (local.get $$0))) + (local.set $$1 (i32.const 0)) + ) + (local.get $$1) + ) + (func (export "i32x4_all_true_as_br_if_cond") (param $$0 v128) (result i32) + (local $$1 i32) + (local.set $$1 (i32.const 2)) + (block + (local.set $$1 (i32.const 1)) + (br_if 0 (i32x4.all_true (local.get $$0))) + (local.set $$1 (i32.const 0)) + ) + (local.get $$1) + ) + ;; any_true as i32.and operand + (func (export "i8x16_any_true_as_i32.and_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.and (v128.any_true (local.get $$0)) (v128.any_true (local.get $$1))) + ) + (func (export "i16x8_any_true_as_i32.and_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.and (v128.any_true (local.get $$0)) (v128.any_true (local.get $$1))) + ) + (func (export "i32x4_any_true_as_i32.and_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.and (v128.any_true (local.get $$0)) (v128.any_true (local.get $$1))) + ) + ;; any_true as i32.or operand + (func (export "i8x16_any_true_as_i32.or_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.or (v128.any_true (local.get $$0)) (v128.any_true (local.get $$1))) + ) + (func (export "i16x8_any_true_as_i32.or_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.or (v128.any_true (local.get $$0)) (v128.any_true (local.get $$1))) + ) + (func (export "i32x4_any_true_as_i32.or_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.or (v128.any_true (local.get $$0)) (v128.any_true (local.get $$1))) + ) + ;; any_true as i32.xor operand + (func (export "i8x16_any_true_as_i32.xor_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.xor (v128.any_true (local.get $$0)) (v128.any_true (local.get $$1))) + ) + (func (export "i16x8_any_true_as_i32.xor_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.xor (v128.any_true (local.get $$0)) (v128.any_true (local.get $$1))) + ) + (func (export "i32x4_any_true_as_i32.xor_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.xor (v128.any_true (local.get $$0)) (v128.any_true (local.get $$1))) + ) + ;; all_true as i32.and operand + (func (export "i8x16_all_true_as_i32.and_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.and (i8x16.all_true (local.get $$0)) (i8x16.all_true (local.get $$1))) + ) + (func (export "i16x8_all_true_as_i32.and_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.and (i16x8.all_true (local.get $$0)) (i16x8.all_true (local.get $$1))) + ) + (func (export "i32x4_all_true_as_i32.and_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.and (i32x4.all_true (local.get $$0)) (i32x4.all_true (local.get $$1))) + ) + ;; all_true as i32.or operand + (func (export "i8x16_all_true_as_i32.or_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.or (i8x16.all_true (local.get $$0)) (i8x16.all_true (local.get $$1))) + ) + (func (export "i16x8_all_true_as_i32.or_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.or (i16x8.all_true (local.get $$0)) (i16x8.all_true (local.get $$1))) + ) + (func (export "i32x4_all_true_as_i32.or_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.or (i32x4.all_true (local.get $$0)) (i32x4.all_true (local.get $$1))) + ) + ;; all_true as i32.xor operand + (func (export "i8x16_all_true_as_i32.xor_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.xor (i8x16.all_true (local.get $$0)) (i8x16.all_true (local.get $$1))) + ) + (func (export "i16x8_all_true_as_i32.xor_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.xor (i16x8.all_true (local.get $$0)) (i16x8.all_true (local.get $$1))) + ) + (func (export "i32x4_all_true_as_i32.xor_operand") (param $$0 v128) (param $$1 v128) (result i32) + (i32.xor (i32x4.all_true (local.get $$0)) (i32x4.all_true (local.get $$1))) + ) + ;; any_true with v128.not + (func (export "i8x16_any_true_with_v128.not") (param $$0 v128) (result i32) + (v128.any_true (v128.not (local.get $$0))) + ) + (func (export "i16x8_any_true_with_v128.not") (param $$0 v128) (result i32) + (v128.any_true (v128.not (local.get $$0))) + ) + (func (export "i32x4_any_true_with_v128.not") (param $$0 v128) (result i32) + (v128.any_true (v128.not (local.get $$0))) + ) + ;; any_true with v128.and + (func (export "i8x16_any_true_with_v128.and") (param $$0 v128) (param $$1 v128) (result i32) + (v128.any_true (v128.and (local.get $$0) (local.get $$1))) + ) + (func (export "i16x8_any_true_with_v128.and") (param $$0 v128) (param $$1 v128) (result i32) + (v128.any_true (v128.and (local.get $$0) (local.get $$1))) + ) + (func (export "i32x4_any_true_with_v128.and") (param $$0 v128) (param $$1 v128) (result i32) + (v128.any_true (v128.and (local.get $$0) (local.get $$1))) + ) + ;; any_true with v128.or + (func (export "i8x16_any_true_with_v128.or") (param $$0 v128) (param $$1 v128) (result i32) + (v128.any_true (v128.or (local.get $$0) (local.get $$1))) + ) + (func (export "i16x8_any_true_with_v128.or") (param $$0 v128) (param $$1 v128) (result i32) + (v128.any_true (v128.or (local.get $$0) (local.get $$1))) + ) + (func (export "i32x4_any_true_with_v128.or") (param $$0 v128) (param $$1 v128) (result i32) + (v128.any_true (v128.or (local.get $$0) (local.get $$1))) + ) + ;; any_true with v128.xor + (func (export "i8x16_any_true_with_v128.xor") (param $$0 v128) (param $$1 v128) (result i32) + (v128.any_true (v128.xor (local.get $$0) (local.get $$1))) + ) + (func (export "i16x8_any_true_with_v128.xor") (param $$0 v128) (param $$1 v128) (result i32) + (v128.any_true (v128.xor (local.get $$0) (local.get $$1))) + ) + (func (export "i32x4_any_true_with_v128.xor") (param $$0 v128) (param $$1 v128) (result i32) + (v128.any_true (v128.xor (local.get $$0) (local.get $$1))) + ) + ;; any_true with v128.bitselect + (func (export "i8x16_any_true_with_v128.bitselect") (param $$0 v128) (param $$1 v128) (param $$2 v128) (result i32) + (v128.any_true (v128.bitselect (local.get $$0) (local.get $$1) (local.get $$2))) + ) + (func (export "i16x8_any_true_with_v128.bitselect") (param $$0 v128) (param $$1 v128) (param $$2 v128) (result i32) + (v128.any_true (v128.bitselect (local.get $$0) (local.get $$1) (local.get $$2))) + ) + (func (export "i32x4_any_true_with_v128.bitselect") (param $$0 v128) (param $$1 v128) (param $$2 v128) (result i32) + (v128.any_true (v128.bitselect (local.get $$0) (local.get $$1) (local.get $$2))) + ) + ;; all_true with v128.not + (func (export "i8x16_all_true_with_v128.not") (param $$0 v128) (result i32) + (i8x16.all_true (v128.not (local.get $$0))) + ) + (func (export "i16x8_all_true_with_v128.not") (param $$0 v128) (result i32) + (i16x8.all_true (v128.not (local.get $$0))) + ) + (func (export "i32x4_all_true_with_v128.not") (param $$0 v128) (result i32) + (i32x4.all_true (v128.not (local.get $$0))) + ) + ;; all_true with v128.and + (func (export "i8x16_all_true_with_v128.and") (param $$0 v128) (param $$1 v128) (result i32) + (i8x16.all_true (v128.and (local.get $$0) (local.get $$1))) + ) + (func (export "i16x8_all_true_with_v128.and") (param $$0 v128) (param $$1 v128) (result i32) + (i16x8.all_true (v128.and (local.get $$0) (local.get $$1))) + ) + (func (export "i32x4_all_true_with_v128.and") (param $$0 v128) (param $$1 v128) (result i32) + (i32x4.all_true (v128.and (local.get $$0) (local.get $$1))) + ) + ;; all_true with v128.or + (func (export "i8x16_all_true_with_v128.or") (param $$0 v128) (param $$1 v128) (result i32) + (i8x16.all_true (v128.or (local.get $$0) (local.get $$1))) + ) + (func (export "i16x8_all_true_with_v128.or") (param $$0 v128) (param $$1 v128) (result i32) + (i16x8.all_true (v128.or (local.get $$0) (local.get $$1))) + ) + (func (export "i32x4_all_true_with_v128.or") (param $$0 v128) (param $$1 v128) (result i32) + (i32x4.all_true (v128.or (local.get $$0) (local.get $$1))) + ) + ;; all_true with v128.xor + (func (export "i8x16_all_true_with_v128.xor") (param $$0 v128) (param $$1 v128) (result i32) + (i8x16.all_true (v128.xor (local.get $$0) (local.get $$1))) + ) + (func (export "i16x8_all_true_with_v128.xor") (param $$0 v128) (param $$1 v128) (result i32) + (i16x8.all_true (v128.xor (local.get $$0) (local.get $$1))) + ) + (func (export "i32x4_all_true_with_v128.xor") (param $$0 v128) (param $$1 v128) (result i32) + (i32x4.all_true (v128.xor (local.get $$0) (local.get $$1))) + ) + ;; all_true with v128.bitselect + (func (export "i8x16_all_true_with_v128.bitselect") (param $$0 v128) (param $$1 v128) (param $$2 v128) (result i32) + (i8x16.all_true (v128.bitselect (local.get $$0) (local.get $$1) (local.get $$2))) + ) + (func (export "i16x8_all_true_with_v128.bitselect") (param $$0 v128) (param $$1 v128) (param $$2 v128) (result i32) + (i16x8.all_true (v128.bitselect (local.get $$0) (local.get $$1) (local.get $$2))) + ) + (func (export "i32x4_all_true_with_v128.bitselect") (param $$0 v128) (param $$1 v128) (param $$2 v128) (result i32) + (i32x4.all_true (v128.bitselect (local.get $$0) (local.get $$1) (local.get $$2))) + ) +)`); + +// ./test/core/simd/simd_boolean.wast:472 +assert_return( + () => invoke($1, `i8x16_any_true_as_if_cond`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:474 +assert_return( + () => invoke($1, `i8x16_any_true_as_if_cond`, [ + i8x16([0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:476 +assert_return( + () => invoke($1, `i8x16_any_true_as_if_cond`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:479 +assert_return( + () => invoke($1, `i16x8_any_true_as_if_cond`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:481 +assert_return( + () => invoke($1, `i16x8_any_true_as_if_cond`, [ + i16x8([0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:483 +assert_return( + () => invoke($1, `i16x8_any_true_as_if_cond`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:486 +assert_return( + () => invoke($1, `i32x4_any_true_as_if_cond`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:488 +assert_return( + () => invoke($1, `i32x4_any_true_as_if_cond`, [i32x4([0x0, 0x0, 0x1, 0x0])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:490 +assert_return( + () => invoke($1, `i32x4_any_true_as_if_cond`, [i32x4([0x1, 0x1, 0x1, 0x1])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:495 +assert_return( + () => invoke($1, `i8x16_all_true_as_if_cond`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:497 +assert_return( + () => invoke($1, `i8x16_all_true_as_if_cond`, [ + i8x16([0x1, 0x1, 0x1, 0x0, 0x1, 0x1, 0x1, 0x0, 0x1, 0x1, 0x1, 0x0, 0x1, 0x1, 0x1, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:499 +assert_return( + () => invoke($1, `i8x16_all_true_as_if_cond`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:502 +assert_return( + () => invoke($1, `i16x8_all_true_as_if_cond`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:504 +assert_return( + () => invoke($1, `i16x8_all_true_as_if_cond`, [ + i16x8([0x1, 0x1, 0x1, 0x0, 0x1, 0x1, 0x1, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:506 +assert_return( + () => invoke($1, `i16x8_all_true_as_if_cond`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:509 +assert_return( + () => invoke($1, `i32x4_all_true_as_if_cond`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:511 +assert_return( + () => invoke($1, `i32x4_all_true_as_if_cond`, [i32x4([0x1, 0x1, 0x1, 0x0])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:513 +assert_return( + () => invoke($1, `i32x4_all_true_as_if_cond`, [i32x4([0x1, 0x1, 0x1, 0x1])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:517 +assert_return( + () => invoke($1, `i8x16_any_true_as_select_cond`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:519 +assert_return( + () => invoke($1, `i8x16_any_true_as_select_cond`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:521 +assert_return( + () => invoke($1, `i16x8_any_true_as_select_cond`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:523 +assert_return( + () => invoke($1, `i16x8_any_true_as_select_cond`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:525 +assert_return( + () => invoke($1, `i32x4_any_true_as_select_cond`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:527 +assert_return( + () => invoke($1, `i32x4_any_true_as_select_cond`, [i32x4([0x0, 0x0, 0x1, 0x0])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:530 +assert_return( + () => invoke($1, `i8x16_all_true_as_select_cond`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:532 +assert_return( + () => invoke($1, `i8x16_all_true_as_select_cond`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:534 +assert_return( + () => invoke($1, `i16x8_all_true_as_select_cond`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:536 +assert_return( + () => invoke($1, `i16x8_all_true_as_select_cond`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:538 +assert_return( + () => invoke($1, `i32x4_all_true_as_select_cond`, [i32x4([0x1, 0x1, 0x1, 0x1])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:540 +assert_return( + () => invoke($1, `i32x4_all_true_as_select_cond`, [i32x4([0x1, 0x1, 0x0, 0x1])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:543 +assert_return( + () => invoke($1, `i8x16_any_true_as_br_if_cond`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:545 +assert_return( + () => invoke($1, `i8x16_any_true_as_br_if_cond`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:547 +assert_return( + () => invoke($1, `i16x8_any_true_as_br_if_cond`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:549 +assert_return( + () => invoke($1, `i16x8_any_true_as_br_if_cond`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:551 +assert_return( + () => invoke($1, `i32x4_any_true_as_br_if_cond`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:553 +assert_return( + () => invoke($1, `i32x4_any_true_as_br_if_cond`, [i32x4([0x0, 0x0, 0x1, 0x0])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:556 +assert_return( + () => invoke($1, `i8x16_all_true_as_br_if_cond`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:558 +assert_return( + () => invoke($1, `i8x16_all_true_as_br_if_cond`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:560 +assert_return( + () => invoke($1, `i16x8_all_true_as_br_if_cond`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:562 +assert_return( + () => invoke($1, `i16x8_all_true_as_br_if_cond`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:564 +assert_return( + () => invoke($1, `i32x4_all_true_as_br_if_cond`, [i32x4([0x1, 0x1, 0x1, 0x1])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:566 +assert_return( + () => invoke($1, `i32x4_all_true_as_br_if_cond`, [i32x4([0x1, 0x1, 0x0, 0x1])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:569 +assert_return( + () => invoke($1, `i8x16_any_true_as_i32.and_operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:572 +assert_return( + () => invoke($1, `i8x16_any_true_as_i32.and_operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:575 +assert_return( + () => invoke($1, `i8x16_any_true_as_i32.and_operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:578 +assert_return( + () => invoke($1, `i16x8_any_true_as_i32.and_operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:581 +assert_return( + () => invoke($1, `i16x8_any_true_as_i32.and_operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:584 +assert_return( + () => invoke($1, `i16x8_any_true_as_i32.and_operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:587 +assert_return( + () => invoke($1, `i32x4_any_true_as_i32.and_operand`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:590 +assert_return( + () => invoke($1, `i32x4_any_true_as_i32.and_operand`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:593 +assert_return( + () => invoke($1, `i32x4_any_true_as_i32.and_operand`, [ + i32x4([0x0, 0x0, 0x1, 0x0]), + i32x4([0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:597 +assert_return( + () => invoke($1, `i8x16_any_true_as_i32.or_operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:600 +assert_return( + () => invoke($1, `i8x16_any_true_as_i32.or_operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:603 +assert_return( + () => invoke($1, `i8x16_any_true_as_i32.or_operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:606 +assert_return( + () => invoke($1, `i16x8_any_true_as_i32.or_operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:609 +assert_return( + () => invoke($1, `i16x8_any_true_as_i32.or_operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:612 +assert_return( + () => invoke($1, `i16x8_any_true_as_i32.or_operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:615 +assert_return( + () => invoke($1, `i32x4_any_true_as_i32.or_operand`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:618 +assert_return( + () => invoke($1, `i32x4_any_true_as_i32.or_operand`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:621 +assert_return( + () => invoke($1, `i32x4_any_true_as_i32.or_operand`, [ + i32x4([0x0, 0x0, 0x1, 0x0]), + i32x4([0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:625 +assert_return( + () => invoke($1, `i8x16_any_true_as_i32.xor_operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:628 +assert_return( + () => invoke($1, `i8x16_any_true_as_i32.xor_operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:631 +assert_return( + () => invoke($1, `i8x16_any_true_as_i32.xor_operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:634 +assert_return( + () => invoke($1, `i16x8_any_true_as_i32.xor_operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:637 +assert_return( + () => invoke($1, `i16x8_any_true_as_i32.xor_operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:640 +assert_return( + () => invoke($1, `i16x8_any_true_as_i32.xor_operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:643 +assert_return( + () => invoke($1, `i32x4_any_true_as_i32.xor_operand`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:646 +assert_return( + () => invoke($1, `i32x4_any_true_as_i32.xor_operand`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:649 +assert_return( + () => invoke($1, `i32x4_any_true_as_i32.xor_operand`, [ + i32x4([0x0, 0x0, 0x1, 0x0]), + i32x4([0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:653 +assert_return( + () => invoke($1, `i8x16_all_true_as_i32.and_operand`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:656 +assert_return( + () => invoke($1, `i8x16_all_true_as_i32.and_operand`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:659 +assert_return( + () => invoke($1, `i8x16_all_true_as_i32.and_operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:662 +assert_return( + () => invoke($1, `i16x8_all_true_as_i32.and_operand`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:665 +assert_return( + () => invoke($1, `i16x8_all_true_as_i32.and_operand`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:668 +assert_return( + () => invoke($1, `i16x8_all_true_as_i32.and_operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:671 +assert_return( + () => invoke($1, `i32x4_all_true_as_i32.and_operand`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:674 +assert_return( + () => invoke($1, `i32x4_all_true_as_i32.and_operand`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:677 +assert_return( + () => invoke($1, `i32x4_all_true_as_i32.and_operand`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x1, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:681 +assert_return( + () => invoke($1, `i8x16_all_true_as_i32.or_operand`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:684 +assert_return( + () => invoke($1, `i8x16_all_true_as_i32.or_operand`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:687 +assert_return( + () => invoke($1, `i8x16_all_true_as_i32.or_operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:690 +assert_return( + () => invoke($1, `i16x8_all_true_as_i32.or_operand`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:693 +assert_return( + () => invoke($1, `i16x8_all_true_as_i32.or_operand`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:696 +assert_return( + () => invoke($1, `i16x8_all_true_as_i32.or_operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:699 +assert_return( + () => invoke($1, `i32x4_all_true_as_i32.or_operand`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:702 +assert_return( + () => invoke($1, `i32x4_all_true_as_i32.or_operand`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:705 +assert_return( + () => invoke($1, `i32x4_all_true_as_i32.or_operand`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:709 +assert_return( + () => invoke($1, `i8x16_all_true_as_i32.xor_operand`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:712 +assert_return( + () => invoke($1, `i8x16_all_true_as_i32.xor_operand`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:715 +assert_return( + () => invoke($1, `i8x16_all_true_as_i32.xor_operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:718 +assert_return( + () => invoke($1, `i16x8_all_true_as_i32.xor_operand`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:721 +assert_return( + () => invoke($1, `i16x8_all_true_as_i32.xor_operand`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:724 +assert_return( + () => invoke($1, `i16x8_all_true_as_i32.xor_operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:727 +assert_return( + () => invoke($1, `i32x4_all_true_as_i32.xor_operand`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:730 +assert_return( + () => invoke($1, `i32x4_all_true_as_i32.xor_operand`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x0, 0x1]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:733 +assert_return( + () => invoke($1, `i32x4_all_true_as_i32.xor_operand`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:737 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.not`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:739 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.not`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:741 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.not`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:743 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.not`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:745 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.not`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:747 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.not`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:749 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.not`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:751 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.not`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:753 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.not`, [i32x4([0x0, 0x0, 0xffffffff, 0x0])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:756 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.and`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:759 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.and`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:762 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.and`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:765 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.and`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:768 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.and`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:771 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.and`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:774 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.and`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:777 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.and`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:780 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.and`, [ + i32x4([0x0, 0x0, 0xffffffff, 0x0]), + i32x4([0x0, 0x0, 0xffffffff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:784 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.or`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:787 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.or`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:790 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.or`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:793 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.or`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:796 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.or`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:799 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.or`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:802 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.or`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:805 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.or`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:808 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.or`, [ + i32x4([0x0, 0x0, 0xffffffff, 0x0]), + i32x4([0x0, 0x0, 0xffffffff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:812 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.xor`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:815 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.xor`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:818 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.xor`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:821 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.xor`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:824 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.xor`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:827 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.xor`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:830 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.xor`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:833 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.xor`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:836 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.xor`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0xffffffff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:840 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.bitselect`, [ + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:844 +assert_return( + () => invoke($1, `i8x16_any_true_with_v128.bitselect`, [ + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:848 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.bitselect`, [ + i16x8([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + i16x8([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:852 +assert_return( + () => invoke($1, `i16x8_any_true_with_v128.bitselect`, [ + i16x8([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + i16x8([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:856 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.bitselect`, [ + i32x4([0xaa, 0xaa, 0xaa, 0xaa]), + i32x4([0x55, 0x55, 0x55, 0x55]), + i32x4([0x55, 0x55, 0x55, 0x55]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:860 +assert_return( + () => invoke($1, `i32x4_any_true_with_v128.bitselect`, [ + i32x4([0xaa, 0xaa, 0xaa, 0xaa]), + i32x4([0x55, 0x55, 0x55, 0x55]), + i32x4([0x55, 0x55, 0xff, 0x55]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:865 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.not`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:867 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.not`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:869 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.not`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:871 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.not`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:873 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.not`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:875 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.not`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:877 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.not`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:879 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.not`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:881 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.not`, [i32x4([0x0, 0x0, 0xffffffff, 0x0])]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:884 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.and`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:887 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.and`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:890 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.and`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:893 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.and`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:896 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.and`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:899 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.and`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:902 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.and`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:905 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.and`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:908 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.and`, [ + i32x4([0x0, 0x0, 0xffffffff, 0x0]), + i32x4([0x0, 0x0, 0xffffffff, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:912 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.or`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:915 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.or`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:918 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.or`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:921 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.or`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:924 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.or`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:927 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.or`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:930 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.or`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:933 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.or`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:936 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.or`, [ + i32x4([0x0, 0x0, 0xffffffff, 0x0]), + i32x4([0x0, 0x0, 0xffffffff, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:940 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.xor`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:943 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.xor`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:946 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.xor`, [ + i8x16([0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff]), + i8x16([0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:949 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.xor`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:952 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.xor`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:955 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.xor`, [ + i16x8([0x0, 0xffff, 0x0, 0xffff, 0x0, 0xffff, 0x0, 0xffff]), + i16x8([0xffff, 0x0, 0xffff, 0x0, 0xffff, 0x0, 0xffff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:958 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.xor`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:961 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.xor`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:964 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.xor`, [ + i32x4([0x0, 0xffffffff, 0x0, 0xffffffff]), + i32x4([0xffffffff, 0x0, 0xffffffff, 0x0]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:968 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.bitselect`, [ + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:972 +assert_return( + () => invoke($1, `i8x16_all_true_with_v128.bitselect`, [ + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:976 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.bitselect`, [ + i16x8([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + i16x8([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:980 +assert_return( + () => invoke($1, `i16x8_all_true_with_v128.bitselect`, [ + i16x8([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + i16x8([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:984 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.bitselect`, [ + i32x4([0xaa, 0xaa, 0xaa, 0xaa]), + i32x4([0x55, 0x55, 0x55, 0x55]), + i32x4([0x55, 0x55, 0x55, 0x55]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_boolean.wast:988 +assert_return( + () => invoke($1, `i32x4_all_true_with_v128.bitselect`, [ + i32x4([0xaa, 0xaa, 0xaa, 0xaa]), + i32x4([0x55, 0x55, 0x55, 0x55]), + i32x4([0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_boolean.wast:995 +assert_invalid( + () => instantiate(`(module (func (result i32) (v128.any_true (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_boolean.wast:996 +assert_invalid( + () => instantiate(`(module (func (result i32) (i8x16.all_true (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_boolean.wast:997 +assert_invalid( + () => instantiate(`(module (func (result i32) (v128.any_true (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_boolean.wast:998 +assert_invalid( + () => instantiate(`(module (func (result i32) (i16x8.all_true (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_boolean.wast:999 +assert_invalid( + () => instantiate(`(module (func (result i32) (v128.any_true (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_boolean.wast:1000 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32x4.all_true (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_boolean.wast:1004 +assert_malformed( + () => instantiate(`(memory 1) (func (result i32) (f32x4.any_true (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_boolean.wast:1005 +assert_malformed( + () => instantiate(`(memory 1) (func (result i32) (f32x4.all_true (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_boolean.wast:1006 +assert_malformed( + () => instantiate(`(memory 1) (func (result i32) (f64x2.any_true (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_boolean.wast:1007 +assert_malformed( + () => instantiate(`(memory 1) (func (result i32) (f64x2.all_true (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_boolean.wast:1011 +assert_invalid( + () => instantiate(`(module + (func $$v128.any_true-arg-empty (result v128) + (v128.any_true) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_boolean.wast:1019 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.all_true-arg-empty (result v128) + (i8x16.all_true) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_boolean.wast:1027 +assert_invalid( + () => instantiate(`(module + (func $$v128.any_true-arg-empty (result v128) + (v128.any_true) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_boolean.wast:1035 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.all_true-arg-empty (result v128) + (i16x8.all_true) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_boolean.wast:1043 +assert_invalid( + () => instantiate(`(module + (func $$v128.any_true-arg-empty (result v128) + (v128.any_true) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_boolean.wast:1051 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.all_true-arg-empty (result v128) + (i32x4.all_true) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_const.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_const.wast.js new file mode 100644 index 0000000000..76c05b43bc --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_const.wast.js @@ -0,0 +1,4681 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_const.wast + +// ./test/core/simd/simd_const.wast:3 +let $0 = instantiate(`(module (func (v128.const i8x16 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF) drop))`); + +// ./test/core/simd/simd_const.wast:4 +let $1 = instantiate(`(module (func (v128.const i8x16 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80) drop))`); + +// ./test/core/simd/simd_const.wast:5 +let $2 = instantiate(`(module (func (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255) drop))`); + +// ./test/core/simd/simd_const.wast:6 +let $3 = instantiate(`(module (func (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128) drop))`); + +// ./test/core/simd/simd_const.wast:7 +let $4 = instantiate(`(module (func (v128.const i16x8 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF) drop))`); + +// ./test/core/simd/simd_const.wast:8 +let $5 = instantiate(`(module (func (v128.const i16x8 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000) drop))`); + +// ./test/core/simd/simd_const.wast:9 +let $6 = instantiate(`(module (func (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) drop))`); + +// ./test/core/simd/simd_const.wast:10 +let $7 = instantiate(`(module (func (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) drop))`); + +// ./test/core/simd/simd_const.wast:11 +let $8 = instantiate(`(module (func (v128.const i16x8 65_535 65_535 65_535 65_535 65_535 65_535 65_535 65_535) drop))`); + +// ./test/core/simd/simd_const.wast:12 +let $9 = instantiate(`(module (func (v128.const i16x8 -32_768 -32_768 -32_768 -32_768 -32_768 -32_768 -32_768 -32_768) drop))`); + +// ./test/core/simd/simd_const.wast:13 +let $10 = instantiate(`(module (func (v128.const i16x8 0_123_45 0_123_45 0_123_45 0_123_45 0_123_45 0_123_45 0_123_45 0_123_45) drop))`); + +// ./test/core/simd/simd_const.wast:14 +let $11 = instantiate(`(module (func (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234) drop))`); + +// ./test/core/simd/simd_const.wast:15 +let $12 = instantiate(`(module (func (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff) drop))`); + +// ./test/core/simd/simd_const.wast:16 +let $13 = instantiate(`(module (func (v128.const i32x4 -0x80000000 -0x80000000 -0x80000000 -0x80000000) drop))`); + +// ./test/core/simd/simd_const.wast:17 +let $14 = instantiate(`(module (func (v128.const i32x4 4294967295 4294967295 4294967295 4294967295) drop))`); + +// ./test/core/simd/simd_const.wast:18 +let $15 = instantiate(`(module (func (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648) drop))`); + +// ./test/core/simd/simd_const.wast:19 +let $16 = instantiate(`(module (func (v128.const i32x4 0xffff_ffff 0xffff_ffff 0xffff_ffff 0xffff_ffff) drop))`); + +// ./test/core/simd/simd_const.wast:20 +let $17 = instantiate(`(module (func (v128.const i32x4 -0x8000_0000 -0x8000_0000 -0x8000_0000 -0x8000_0000) drop))`); + +// ./test/core/simd/simd_const.wast:21 +let $18 = instantiate(`(module (func (v128.const i32x4 4_294_967_295 4_294_967_295 4_294_967_295 4_294_967_295) drop))`); + +// ./test/core/simd/simd_const.wast:22 +let $19 = instantiate(`(module (func (v128.const i32x4 -2_147_483_648 -2_147_483_648 -2_147_483_648 -2_147_483_648) drop))`); + +// ./test/core/simd/simd_const.wast:23 +let $20 = instantiate(`(module (func (v128.const i32x4 0_123_456_789 0_123_456_789 0_123_456_789 0_123_456_789) drop))`); + +// ./test/core/simd/simd_const.wast:24 +let $21 = instantiate(`(module (func (v128.const i32x4 0x0_9acf_fBDF 0x0_9acf_fBDF 0x0_9acf_fBDF 0x0_9acf_fBDF) drop))`); + +// ./test/core/simd/simd_const.wast:25 +let $22 = instantiate(`(module (func (v128.const i64x2 0xffffffffffffffff 0xffffffffffffffff) drop))`); + +// ./test/core/simd/simd_const.wast:26 +let $23 = instantiate(`(module (func (v128.const i64x2 -0x8000000000000000 -0x8000000000000000) drop))`); + +// ./test/core/simd/simd_const.wast:27 +let $24 = instantiate(`(module (func (v128.const i64x2 18446744073709551615 18446744073709551615) drop))`); + +// ./test/core/simd/simd_const.wast:28 +let $25 = instantiate(`(module (func (v128.const i64x2 -9223372036854775808 -9223372036854775808) drop))`); + +// ./test/core/simd/simd_const.wast:29 +let $26 = instantiate(`(module (func (v128.const i64x2 0xffff_ffff_ffff_ffff 0xffff_ffff_ffff_ffff) drop))`); + +// ./test/core/simd/simd_const.wast:30 +let $27 = instantiate(`(module (func (v128.const i64x2 -0x8000_0000_0000_0000 -0x8000_0000_0000_0000) drop))`); + +// ./test/core/simd/simd_const.wast:31 +let $28 = instantiate(`(module (func (v128.const i64x2 18_446_744_073_709_551_615 18_446_744_073_709_551_615) drop))`); + +// ./test/core/simd/simd_const.wast:32 +let $29 = instantiate(`(module (func (v128.const i64x2 -9_223_372_036_854_775_808 -9_223_372_036_854_775_808) drop))`); + +// ./test/core/simd/simd_const.wast:33 +let $30 = instantiate(`(module (func (v128.const i64x2 0_123_456_789 0_123_456_789) drop))`); + +// ./test/core/simd/simd_const.wast:34 +let $31 = instantiate(`(module (func (v128.const i64x2 0x0125_6789_ADEF_bcef 0x0125_6789_ADEF_bcef) drop))`); + +// ./test/core/simd/simd_const.wast:35 +let $32 = instantiate(`(module (func (v128.const f32x4 0x1p127 0x1p127 0x1p127 0x1p127) drop))`); + +// ./test/core/simd/simd_const.wast:36 +let $33 = instantiate(`(module (func (v128.const f32x4 -0x1p127 -0x1p127 -0x1p127 -0x1p127) drop))`); + +// ./test/core/simd/simd_const.wast:37 +let $34 = instantiate(`(module (func (v128.const f32x4 1e38 1e38 1e38 1e38) drop))`); + +// ./test/core/simd/simd_const.wast:38 +let $35 = instantiate(`(module (func (v128.const f32x4 -1e38 -1e38 -1e38 -1e38) drop))`); + +// ./test/core/simd/simd_const.wast:39 +let $36 = instantiate(`(module (func (v128.const f32x4 340282356779733623858607532500980858880 340282356779733623858607532500980858880 + 340282356779733623858607532500980858880 340282356779733623858607532500980858880) drop))`); + +// ./test/core/simd/simd_const.wast:41 +let $37 = instantiate(`(module (func (v128.const f32x4 -340282356779733623858607532500980858880 -340282356779733623858607532500980858880 + -340282356779733623858607532500980858880 -340282356779733623858607532500980858880) drop))`); + +// ./test/core/simd/simd_const.wast:43 +let $38 = instantiate(`(module (func (v128.const f32x4 nan:0x1 nan:0x1 nan:0x1 nan:0x1) drop))`); + +// ./test/core/simd/simd_const.wast:44 +let $39 = instantiate(`(module (func (v128.const f32x4 nan:0x7f_ffff nan:0x7f_ffff nan:0x7f_ffff nan:0x7f_ffff) drop))`); + +// ./test/core/simd/simd_const.wast:45 +let $40 = instantiate(`(module (func (v128.const f32x4 0123456789 0123456789 0123456789 0123456789) drop))`); + +// ./test/core/simd/simd_const.wast:46 +let $41 = instantiate(`(module (func (v128.const f32x4 0123456789e019 0123456789e019 0123456789e019 0123456789e019) drop))`); + +// ./test/core/simd/simd_const.wast:47 +let $42 = instantiate(`(module (func (v128.const f32x4 0123456789e+019 0123456789e+019 0123456789e+019 0123456789e+019) drop))`); + +// ./test/core/simd/simd_const.wast:48 +let $43 = instantiate(`(module (func (v128.const f32x4 0123456789e-019 0123456789e-019 0123456789e-019 0123456789e-019) drop))`); + +// ./test/core/simd/simd_const.wast:49 +let $44 = instantiate(`(module (func (v128.const f32x4 0123456789. 0123456789. 0123456789. 0123456789.) drop))`); + +// ./test/core/simd/simd_const.wast:50 +let $45 = instantiate(`(module (func (v128.const f32x4 0123456789.e019 0123456789.e019 0123456789.e019 0123456789.e019) drop))`); + +// ./test/core/simd/simd_const.wast:51 +let $46 = instantiate(`(module (func (v128.const f32x4 0123456789.e+019 0123456789.e+019 0123456789.e+019 0123456789.e+019) drop))`); + +// ./test/core/simd/simd_const.wast:52 +let $47 = instantiate(`(module (func (v128.const f32x4 0123456789.e-019 0123456789.e-019 0123456789.e-019 0123456789.e-019) drop))`); + +// ./test/core/simd/simd_const.wast:53 +let $48 = instantiate(`(module (func (v128.const f32x4 0123456789.0123456789 0123456789.0123456789 0123456789.0123456789 0123456789.0123456789) drop))`); + +// ./test/core/simd/simd_const.wast:54 +let $49 = instantiate(`(module (func (v128.const f32x4 0123456789.0123456789e019 0123456789.0123456789e019 0123456789.0123456789e019 0123456789.0123456789e019) drop))`); + +// ./test/core/simd/simd_const.wast:55 +let $50 = instantiate(`(module (func (v128.const f32x4 0123456789.0123456789e+019 0123456789.0123456789e+019 0123456789.0123456789e+019 0123456789.0123456789e+019) drop))`); + +// ./test/core/simd/simd_const.wast:56 +let $51 = instantiate(`(module (func (v128.const f32x4 0123456789.0123456789e-019 0123456789.0123456789e-019 0123456789.0123456789e-019 0123456789.0123456789e-019) drop))`); + +// ./test/core/simd/simd_const.wast:57 +let $52 = instantiate(`(module (func (v128.const f32x4 0x0123456789ABCDEF 0x0123456789ABCDEF 0x0123456789ABCDEF 0x0123456789ABCDEF) drop))`); + +// ./test/core/simd/simd_const.wast:58 +let $53 = instantiate(`(module (func (v128.const f32x4 0x0123456789ABCDEFp019 0x0123456789ABCDEFp019 0x0123456789ABCDEFp019 0x0123456789ABCDEFp019) drop))`); + +// ./test/core/simd/simd_const.wast:59 +let $54 = instantiate(`(module (func (v128.const f32x4 0x0123456789ABCDEFp+019 0x0123456789ABCDEFp+019 0x0123456789ABCDEFp+019 0x0123456789ABCDEFp+019) drop))`); + +// ./test/core/simd/simd_const.wast:60 +let $55 = instantiate(`(module (func (v128.const f32x4 0x0123456789ABCDEFp-019 0x0123456789ABCDEFp-019 0x0123456789ABCDEFp-019 0x0123456789ABCDEFp-019) drop))`); + +// ./test/core/simd/simd_const.wast:61 +let $56 = instantiate(`(module (func (v128.const f32x4 0x0123456789ABCDEF. 0x0123456789ABCDEF. 0x0123456789ABCDEF. 0x0123456789ABCDEF.) drop))`); + +// ./test/core/simd/simd_const.wast:62 +let $57 = instantiate(`(module (func (v128.const f32x4 0x0123456789ABCDEF.p019 0x0123456789ABCDEF.p019 0x0123456789ABCDEF.p019 0x0123456789ABCDEF.p019) drop))`); + +// ./test/core/simd/simd_const.wast:63 +let $58 = instantiate(`(module (func (v128.const f32x4 0x0123456789ABCDEF.p+019 0x0123456789ABCDEF.p+019 0x0123456789ABCDEF.p+019 0x0123456789ABCDEF.p+019) drop))`); + +// ./test/core/simd/simd_const.wast:64 +let $59 = instantiate(`(module (func (v128.const f32x4 0x0123456789ABCDEF.p-019 0x0123456789ABCDEF.p-019 0x0123456789ABCDEF.p-019 0x0123456789ABCDEF.p-019) drop))`); + +// ./test/core/simd/simd_const.wast:65 +let $60 = instantiate(`(module (func (v128.const f32x4 0x0123456789ABCDEF.019aF 0x0123456789ABCDEF.019aF 0x0123456789ABCDEF.019aF 0x0123456789ABCDEF.019aF) drop))`); + +// ./test/core/simd/simd_const.wast:66 +let $61 = instantiate(`(module (func (v128.const f32x4 0x0123456789ABCDEF.019aFp019 0x0123456789ABCDEF.019aFp019 0x0123456789ABCDEF.019aFp019 0x0123456789ABCDEF.019aFp019) drop))`); + +// ./test/core/simd/simd_const.wast:67 +let $62 = instantiate(`(module (func (v128.const f32x4 0x0123456789ABCDEF.019aFp+019 0x0123456789ABCDEF.019aFp+019 0x0123456789ABCDEF.019aFp+019 0x0123456789ABCDEF.019aFp+019) drop))`); + +// ./test/core/simd/simd_const.wast:68 +let $63 = instantiate(`(module (func (v128.const f32x4 0x0123456789ABCDEF.019aFp-019 0x0123456789ABCDEF.019aFp-019 0x0123456789ABCDEF.019aFp-019 0x0123456789ABCDEF.019aFp-019) drop))`); + +// ./test/core/simd/simd_const.wast:69 +let $64 = instantiate(`(module (func (v128.const f64x2 0x1p1023 0x1p1023) drop))`); + +// ./test/core/simd/simd_const.wast:70 +let $65 = instantiate(`(module (func (v128.const f64x2 -0x1p1023 -0x1p1023) drop))`); + +// ./test/core/simd/simd_const.wast:71 +let $66 = instantiate(`(module (func (v128.const f64x2 1e308 1e308) drop))`); + +// ./test/core/simd/simd_const.wast:72 +let $67 = instantiate(`(module (func (v128.const f64x2 -1e308 -1e308) drop))`); + +// ./test/core/simd/simd_const.wast:73 +let $68 = instantiate(`(module (func (v128.const f64x2 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368 + 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))`); + +// ./test/core/simd/simd_const.wast:75 +let $69 = instantiate(`(module (func (v128.const f64x2 -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368 + -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))`); + +// ./test/core/simd/simd_const.wast:77 +let $70 = instantiate(`(module (func (v128.const f64x2 nan:0x1 nan:0x1) drop))`); + +// ./test/core/simd/simd_const.wast:78 +let $71 = instantiate(`(module (func (v128.const f64x2 nan:0xf_ffff_ffff_ffff nan:0xf_ffff_ffff_ffff) drop))`); + +// ./test/core/simd/simd_const.wast:79 +let $72 = instantiate(`(module (func (v128.const f64x2 0123456789 0123456789) drop))`); + +// ./test/core/simd/simd_const.wast:80 +let $73 = instantiate(`(module (func (v128.const f64x2 0123456789e019 0123456789e019) drop))`); + +// ./test/core/simd/simd_const.wast:81 +let $74 = instantiate(`(module (func (v128.const f64x2 0123456789e+019 0123456789e+019) drop))`); + +// ./test/core/simd/simd_const.wast:82 +let $75 = instantiate(`(module (func (v128.const f64x2 0123456789e-019 0123456789e-019) drop))`); + +// ./test/core/simd/simd_const.wast:83 +let $76 = instantiate(`(module (func (v128.const f64x2 0123456789. 0123456789.) drop))`); + +// ./test/core/simd/simd_const.wast:84 +let $77 = instantiate(`(module (func (v128.const f64x2 0123456789.e019 0123456789.e019) drop))`); + +// ./test/core/simd/simd_const.wast:85 +let $78 = instantiate(`(module (func (v128.const f64x2 0123456789.e+019 0123456789.e+019) drop))`); + +// ./test/core/simd/simd_const.wast:86 +let $79 = instantiate(`(module (func (v128.const f64x2 0123456789.e-019 0123456789.e-019) drop))`); + +// ./test/core/simd/simd_const.wast:87 +let $80 = instantiate(`(module (func (v128.const f64x2 0123456789.0123456789 0123456789.0123456789) drop))`); + +// ./test/core/simd/simd_const.wast:88 +let $81 = instantiate(`(module (func (v128.const f64x2 0123456789.0123456789e019 0123456789.0123456789e019) drop))`); + +// ./test/core/simd/simd_const.wast:89 +let $82 = instantiate(`(module (func (v128.const f64x2 0123456789.0123456789e+019 0123456789.0123456789e+019) drop))`); + +// ./test/core/simd/simd_const.wast:90 +let $83 = instantiate(`(module (func (v128.const f64x2 0123456789.0123456789e-019 0123456789.0123456789e-019) drop))`); + +// ./test/core/simd/simd_const.wast:91 +let $84 = instantiate(`(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef 0x0123456789ABCDEFabcdef) drop))`); + +// ./test/core/simd/simd_const.wast:92 +let $85 = instantiate(`(module (func (v128.const f64x2 0x0123456789ABCDEFabcdefp019 0x0123456789ABCDEFabcdefp019) drop))`); + +// ./test/core/simd/simd_const.wast:93 +let $86 = instantiate(`(module (func (v128.const f64x2 0x0123456789ABCDEFabcdefp+019 0x0123456789ABCDEFabcdefp+019) drop))`); + +// ./test/core/simd/simd_const.wast:94 +let $87 = instantiate(`(module (func (v128.const f64x2 0x0123456789ABCDEFabcdefp-019 0x0123456789ABCDEFabcdefp-019) drop))`); + +// ./test/core/simd/simd_const.wast:95 +let $88 = instantiate(`(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef. 0x0123456789ABCDEFabcdef.) drop))`); + +// ./test/core/simd/simd_const.wast:96 +let $89 = instantiate(`(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.p019 0x0123456789ABCDEFabcdef.p019) drop))`); + +// ./test/core/simd/simd_const.wast:97 +let $90 = instantiate(`(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.p+019 0x0123456789ABCDEFabcdef.p+019) drop))`); + +// ./test/core/simd/simd_const.wast:98 +let $91 = instantiate(`(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.p-019 0x0123456789ABCDEFabcdef.p-019) drop))`); + +// ./test/core/simd/simd_const.wast:99 +let $92 = instantiate(`(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdef 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdef) drop))`); + +// ./test/core/simd/simd_const.wast:100 +let $93 = instantiate(`(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp019 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp019) drop))`); + +// ./test/core/simd/simd_const.wast:101 +let $94 = instantiate(`(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp+019 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp+019) drop))`); + +// ./test/core/simd/simd_const.wast:102 +let $95 = instantiate(`(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp-019 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp-019) drop))`); + +// ./test/core/simd/simd_const.wast:106 +let $96 = instantiate(`(module (func (v128.const i8x16 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF + -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80) drop))`); + +// ./test/core/simd/simd_const.wast:108 +let $97 = instantiate(`(module (func (v128.const i8x16 0xFF 0xFF 0xFF 0xFF 255 255 255 255 + -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80) drop))`); + +// ./test/core/simd/simd_const.wast:110 +let $98 = instantiate(`(module (func (v128.const i8x16 0xFF 0xFF 0xFF 0xFF 255 255 255 255 + -0x80 -0x80 -0x80 -0x80 -128 -128 -128 -128) drop))`); + +// ./test/core/simd/simd_const.wast:112 +let $99 = instantiate(`(module (func (v128.const i16x8 0xFF 0xFF 0xFF 0xFF -0x8000 -0x8000 -0x8000 -0x8000) drop))`); + +// ./test/core/simd/simd_const.wast:113 +let $100 = instantiate(`(module (func (v128.const i16x8 0xFF 0xFF 65535 65535 -0x8000 -0x8000 -0x8000 -0x8000) drop))`); + +// ./test/core/simd/simd_const.wast:114 +let $101 = instantiate(`(module (func (v128.const i16x8 0xFF 0xFF 65535 65535 -0x8000 -0x8000 -32768 -32768) drop))`); + +// ./test/core/simd/simd_const.wast:115 +let $102 = instantiate(`(module (func (v128.const i32x4 0xffffffff 0xffffffff -0x80000000 -0x80000000) drop))`); + +// ./test/core/simd/simd_const.wast:116 +let $103 = instantiate(`(module (func (v128.const i32x4 0xffffffff 4294967295 -0x80000000 -0x80000000) drop))`); + +// ./test/core/simd/simd_const.wast:117 +let $104 = instantiate(`(module (func (v128.const i32x4 0xffffffff 4294967295 -0x80000000 -2147483648) drop))`); + +// ./test/core/simd/simd_const.wast:118 +let $105 = instantiate(`(module (func (v128.const f32x4 0x1p127 0x1p127 -0x1p127 -1e38) drop))`); + +// ./test/core/simd/simd_const.wast:119 +let $106 = instantiate(`(module (func (v128.const f32x4 0x1p127 340282356779733623858607532500980858880 -1e38 -340282356779733623858607532500980858880) drop))`); + +// ./test/core/simd/simd_const.wast:120 +let $107 = instantiate(`(module (func (v128.const f32x4 nan -nan inf -inf) drop))`); + +// ./test/core/simd/simd_const.wast:121 +let $108 = instantiate(`(module (func (v128.const i64x2 0xffffffffffffffff 0x8000000000000000) drop))`); + +// ./test/core/simd/simd_const.wast:122 +let $109 = instantiate(`(module (func (v128.const i64x2 0xffffffffffffffff -9223372036854775808) drop))`); + +// ./test/core/simd/simd_const.wast:123 +let $110 = instantiate(`(module (func (v128.const f64x2 0x1p1023 -1e308) drop))`); + +// ./test/core/simd/simd_const.wast:124 +let $111 = instantiate(`(module (func (v128.const f64x2 nan -inf) drop))`); + +// ./test/core/simd/simd_const.wast:128 +let $112 = instantiate(`(module (memory 1))`); + +// ./test/core/simd/simd_const.wast:129 +assert_malformed( + () => instantiate(`(func (v128.const i8x16 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:133 +assert_malformed( + () => instantiate(`(func (v128.const i8x16 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:137 +assert_malformed( + () => instantiate(`(func (v128.const i8x16 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:141 +assert_malformed( + () => instantiate(`(func (v128.const i8x16 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:145 +assert_malformed( + () => instantiate(`(func (v128.const i16x8 0x10000 0x10000 0x10000 0x10000 0x10000 0x10000 0x10000 0x10000) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:149 +assert_malformed( + () => instantiate(`(func (v128.const i16x8 -0x8001 -0x8001 -0x8001 -0x8001 -0x8001 -0x8001 -0x8001 -0x8001) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:153 +assert_malformed( + () => instantiate(`(func (v128.const i16x8 65536 65536 65536 65536 65536 65536 65536 65536) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:157 +assert_malformed( + () => instantiate(`(func (v128.const i16x8 -32769 -32769 -32769 -32769 -32769 -32769 -32769 -32769) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:161 +assert_malformed( + () => instantiate(`(func (v128.const i32x4 0x100000000 0x100000000 0x100000000 0x100000000) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:165 +assert_malformed( + () => instantiate(`(func (v128.const i32x4 -0x80000001 -0x80000001 -0x80000001 -0x80000001) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:169 +assert_malformed( + () => instantiate(`(func (v128.const i32x4 4294967296 4294967296 4294967296 4294967296) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:173 +assert_malformed( + () => instantiate(`(func (v128.const i32x4 -2147483649 -2147483649 -2147483649 -2147483649) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:177 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0x1p128 0x1p128 0x1p128 0x1p128) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:181 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 -0x1p128 -0x1p128 -0x1p128 -0x1p128) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:185 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 1e39 1e39 1e39 1e39) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:189 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 -1e39 -1e39 -1e39 -1e39) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:193 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 340282356779733661637539395458142568448 340282356779733661637539395458142568448 340282356779733661637539395458142568448 340282356779733661637539395458142568448) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:198 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 -340282356779733661637539395458142568448 -340282356779733661637539395458142568448 -340282356779733661637539395458142568448 -340282356779733661637539395458142568448) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:204 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 nan:0x80_0000 nan:0x80_0000 nan:0x80_0000 nan:0x80_0000) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:209 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552 269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:214 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 -269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552 -269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:220 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 nan:0x10_0000_0000_0000 nan:0x10_0000_0000_0000) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:226 +assert_malformed(() => instantiate(`(func (v128.const) drop) `), `unexpected token`); + +// ./test/core/simd/simd_const.wast:231 +assert_malformed( + () => instantiate(`(func (v128.const 0 0 0 0) drop) `), + `unexpected token`, +); + +// ./test/core/simd/simd_const.wast:235 +assert_malformed( + () => instantiate(`(func (v128.const i8x16) drop) `), + `wrong number of lane literals`, +); + +// ./test/core/simd/simd_const.wast:239 +assert_malformed( + () => instantiate(`(func (v128.const i8x16 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:243 +assert_malformed( + () => instantiate(`(func (v128.const i8x16 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:247 +assert_malformed( + () => instantiate(`(func (v128.const i8x16 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:252 +assert_malformed( + () => instantiate(`(func (v128.const i16x8) drop) `), + `wrong number of lane literals`, +); + +// ./test/core/simd/simd_const.wast:256 +assert_malformed( + () => instantiate(`(func (v128.const i16x8 0x 0x 0x 0x 0x 0x 0x 0x) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:260 +assert_malformed( + () => instantiate(`(func (v128.const i16x8 1x 1x 1x 1x 1x 1x 1x 1x) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:264 +assert_malformed( + () => instantiate(`(func (v128.const i16x8 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:269 +assert_malformed( + () => instantiate(`(func (v128.const i32x4) drop) `), + `wrong number of lane literals`, +); + +// ./test/core/simd/simd_const.wast:273 +assert_malformed( + () => instantiate(`(func (v128.const i32x4 0x 0x 0x 0x) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:277 +assert_malformed( + () => instantiate(`(func (v128.const i32x4 1x 1x 1x 1x) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:281 +assert_malformed( + () => instantiate(`(func (v128.const i32x4 0xg 0xg 0xg 0xg) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:286 +assert_malformed( + () => instantiate(`(func (v128.const i64x2) drop) `), + `wrong number of lane literals`, +); + +// ./test/core/simd/simd_const.wast:290 +assert_malformed( + () => instantiate(`(func (v128.const i64x2 0x 0x) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:294 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 1x 1x) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:298 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0xg 0xg) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:303 +assert_malformed( + () => instantiate(`(func (v128.const f32x4) drop) `), + `wrong number of lane literals`, +); + +// ./test/core/simd/simd_const.wast:307 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 .0 .0 .0 .0) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:311 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 .0e0 .0e0 .0e0 .0e0) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:315 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0e 0e 0e 0e) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:319 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0e+ 0e+ 0e+ 0e+) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:323 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0.0e 0.0e 0.0e 0.0e) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:327 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0.0e- 0.0e- 0.0e- 0.0e-) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:331 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0x 0x 0x 0x) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:335 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 1x 1x 1x 1x) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:339 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0xg 0xg 0xg 0xg) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:343 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0x. 0x. 0x. 0x.) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:347 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0x0.g 0x0.g 0x0.g 0x0.g) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:351 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0x0p 0x0p 0x0p 0x0p) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:355 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0x0p+ 0x0p+ 0x0p+ 0x0p+) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:359 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0x0p- 0x0p- 0x0p- 0x0p-) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:363 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0x0.0p 0x0.0p 0x0.0p 0x0.0p) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:367 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0x0.0p+ 0x0.0p+ 0x0.0p+ 0x0.0p+) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:371 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0x0.0p- 0x0.0p- 0x0.0p- 0x0.0p-) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:375 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 0x0pA 0x0pA 0x0pA 0x0pA) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:379 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 nan:1 nan:1 nan:1 nan:1) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:383 +assert_malformed( + () => instantiate(`(func (v128.const f32x4 nan:0x0 nan:0x0 nan:0x0 nan:0x0) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:388 +assert_malformed( + () => instantiate(`(func (v128.const f64x2) drop) `), + `wrong number of lane literals`, +); + +// ./test/core/simd/simd_const.wast:392 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 .0 .0) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:396 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 .0e0 .0e0) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:400 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0e 0e) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:404 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0e+ 0e+) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:408 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0.0e+ 0.0e+) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:412 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0.0e- 0.0e-) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:416 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0x 0x) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:420 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 1x 1x) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:424 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0xg 0xg) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:428 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0x. 0x.) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:432 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0x0.g 0x0.g) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:436 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0x0p 0x0p) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:440 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0x0p+ 0x0p+) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:444 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0x0p- 0x0p-) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:448 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0x0.0p 0x0.0p) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:452 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0x0.0p+ 0x0.0p+) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:456 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0x0.0p- 0x0.0p-) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:460 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 0x0pA 0x0pA) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:464 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 nan:1 nan:1) drop) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:468 +assert_malformed( + () => instantiate(`(func (v128.const f64x2 nan:0x0 nan:0x0) drop) `), + `constant out of range`, +); + +// ./test/core/simd/simd_const.wast:475 +assert_malformed( + () => instantiate(`(func (v128.const i32x4 0x10000000000000000 0x10000000000000000) drop) `), + `wrong number of lane literals`, +); + +// ./test/core/simd/simd_const.wast:481 +assert_malformed( + () => instantiate(`(func (v128.const i32x4 0x1 0x1 0x1 0x1 0x1) drop) `), + `wrong number of lane literals`, +); + +// ./test/core/simd/simd_const.wast:489 +let $113 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +0x1.00000100000000000p-50 +0x1.00000100000000000p-50 +0x1.00000100000000000p-50 +0x1.00000100000000000p-50)))`); + +// ./test/core/simd/simd_const.wast:490 +assert_return( + () => invoke($113, `f`, []), + [ + new F32x4Pattern( + value("f32", 0.0000000000000008881784), + value("f32", 0.0000000000000008881784), + value("f32", 0.0000000000000008881784), + value("f32", 0.0000000000000008881784), + ), + ], +); + +// ./test/core/simd/simd_const.wast:491 +let $114 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -0x1.00000100000000000p-50 -0x1.00000100000000000p-50 -0x1.00000100000000000p-50 -0x1.00000100000000000p-50)))`); + +// ./test/core/simd/simd_const.wast:492 +assert_return( + () => invoke($114, `f`, []), + [ + new F32x4Pattern( + value("f32", -0.0000000000000008881784), + value("f32", -0.0000000000000008881784), + value("f32", -0.0000000000000008881784), + value("f32", -0.0000000000000008881784), + ), + ], +); + +// ./test/core/simd/simd_const.wast:493 +let $115 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +0x1.00000500000000001p-50 +0x1.00000500000000001p-50 +0x1.00000500000000001p-50 +0x1.00000500000000001p-50)))`); + +// ./test/core/simd/simd_const.wast:494 +assert_return( + () => invoke($115, `f`, []), + [ + new F32x4Pattern( + value("f32", 0.0000000000000008881787), + value("f32", 0.0000000000000008881787), + value("f32", 0.0000000000000008881787), + value("f32", 0.0000000000000008881787), + ), + ], +); + +// ./test/core/simd/simd_const.wast:495 +let $116 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -0x1.00000500000000001p-50 -0x1.00000500000000001p-50 -0x1.00000500000000001p-50 -0x1.00000500000000001p-50)))`); + +// ./test/core/simd/simd_const.wast:496 +assert_return( + () => invoke($116, `f`, []), + [ + new F32x4Pattern( + value("f32", -0.0000000000000008881787), + value("f32", -0.0000000000000008881787), + value("f32", -0.0000000000000008881787), + value("f32", -0.0000000000000008881787), + ), + ], +); + +// ./test/core/simd/simd_const.wast:498 +let $117 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +0x4000.004000000p-64 +0x4000.004000000p-64 +0x4000.004000000p-64 +0x4000.004000000p-64)))`); + +// ./test/core/simd/simd_const.wast:499 +assert_return( + () => invoke($117, `f`, []), + [ + new F32x4Pattern( + value("f32", 0.0000000000000008881784), + value("f32", 0.0000000000000008881784), + value("f32", 0.0000000000000008881784), + value("f32", 0.0000000000000008881784), + ), + ], +); + +// ./test/core/simd/simd_const.wast:500 +let $118 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -0x4000.004000000p-64 -0x4000.004000000p-64 -0x4000.004000000p-64 -0x4000.004000000p-64)))`); + +// ./test/core/simd/simd_const.wast:501 +assert_return( + () => invoke($118, `f`, []), + [ + new F32x4Pattern( + value("f32", -0.0000000000000008881784), + value("f32", -0.0000000000000008881784), + value("f32", -0.0000000000000008881784), + value("f32", -0.0000000000000008881784), + ), + ], +); + +// ./test/core/simd/simd_const.wast:502 +let $119 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +0x4000.014000001p-64 +0x4000.014000001p-64 +0x4000.014000001p-64 +0x4000.014000001p-64)))`); + +// ./test/core/simd/simd_const.wast:503 +assert_return( + () => invoke($119, `f`, []), + [ + new F32x4Pattern( + value("f32", 0.0000000000000008881787), + value("f32", 0.0000000000000008881787), + value("f32", 0.0000000000000008881787), + value("f32", 0.0000000000000008881787), + ), + ], +); + +// ./test/core/simd/simd_const.wast:504 +let $120 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -0x4000.014000001p-64 -0x4000.014000001p-64 -0x4000.014000001p-64 -0x4000.014000001p-64)))`); + +// ./test/core/simd/simd_const.wast:505 +assert_return( + () => invoke($120, `f`, []), + [ + new F32x4Pattern( + value("f32", -0.0000000000000008881787), + value("f32", -0.0000000000000008881787), + value("f32", -0.0000000000000008881787), + value("f32", -0.0000000000000008881787), + ), + ], +); + +// ./test/core/simd/simd_const.wast:507 +let $121 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +8.8817847263968443573e-16 +8.8817847263968443573e-16 +8.8817847263968443573e-16 +8.8817847263968443573e-16)))`); + +// ./test/core/simd/simd_const.wast:508 +assert_return( + () => invoke($121, `f`, []), + [ + new F32x4Pattern( + value("f32", 0.0000000000000008881784), + value("f32", 0.0000000000000008881784), + value("f32", 0.0000000000000008881784), + value("f32", 0.0000000000000008881784), + ), + ], +); + +// ./test/core/simd/simd_const.wast:509 +let $122 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -8.8817847263968443573e-16 -8.8817847263968443573e-16 -8.8817847263968443573e-16 -8.8817847263968443573e-16)))`); + +// ./test/core/simd/simd_const.wast:510 +assert_return( + () => invoke($122, `f`, []), + [ + new F32x4Pattern( + value("f32", -0.0000000000000008881784), + value("f32", -0.0000000000000008881784), + value("f32", -0.0000000000000008881784), + value("f32", -0.0000000000000008881784), + ), + ], +); + +// ./test/core/simd/simd_const.wast:511 +let $123 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +8.8817857851880284253e-16 +8.8817857851880284253e-16 +8.8817857851880284253e-16 +8.8817857851880284253e-16)))`); + +// ./test/core/simd/simd_const.wast:512 +assert_return( + () => invoke($123, `f`, []), + [ + new F32x4Pattern( + value("f32", 0.0000000000000008881786), + value("f32", 0.0000000000000008881786), + value("f32", 0.0000000000000008881786), + value("f32", 0.0000000000000008881786), + ), + ], +); + +// ./test/core/simd/simd_const.wast:513 +let $124 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -8.8817857851880284253e-16 -8.8817857851880284253e-16 -8.8817857851880284253e-16 -8.8817857851880284253e-16)))`); + +// ./test/core/simd/simd_const.wast:514 +assert_return( + () => invoke($124, `f`, []), + [ + new F32x4Pattern( + value("f32", -0.0000000000000008881786), + value("f32", -0.0000000000000008881786), + value("f32", -0.0000000000000008881786), + value("f32", -0.0000000000000008881786), + ), + ], +); + +// ./test/core/simd/simd_const.wast:517 +let $125 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +0x1.00000100000000000p+50 +0x1.00000100000000000p+50 +0x1.00000100000000000p+50 +0x1.00000100000000000p+50)))`); + +// ./test/core/simd/simd_const.wast:518 +assert_return( + () => invoke($125, `f`, []), + [ + new F32x4Pattern( + value("f32", 1125899900000000), + value("f32", 1125899900000000), + value("f32", 1125899900000000), + value("f32", 1125899900000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:519 +let $126 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -0x1.00000100000000000p+50 -0x1.00000100000000000p+50 -0x1.00000100000000000p+50 -0x1.00000100000000000p+50)))`); + +// ./test/core/simd/simd_const.wast:520 +assert_return( + () => invoke($126, `f`, []), + [ + new F32x4Pattern( + value("f32", -1125899900000000), + value("f32", -1125899900000000), + value("f32", -1125899900000000), + value("f32", -1125899900000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:521 +let $127 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +0x1.00000500000000001p+50 +0x1.00000500000000001p+50 +0x1.00000500000000001p+50 +0x1.00000500000000001p+50)))`); + +// ./test/core/simd/simd_const.wast:522 +assert_return( + () => invoke($127, `f`, []), + [ + new F32x4Pattern( + value("f32", 1125900300000000), + value("f32", 1125900300000000), + value("f32", 1125900300000000), + value("f32", 1125900300000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:523 +let $128 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -0x1.00000500000000001p+50 -0x1.00000500000000001p+50 -0x1.00000500000000001p+50 -0x1.00000500000000001p+50)))`); + +// ./test/core/simd/simd_const.wast:524 +assert_return( + () => invoke($128, `f`, []), + [ + new F32x4Pattern( + value("f32", -1125900300000000), + value("f32", -1125900300000000), + value("f32", -1125900300000000), + value("f32", -1125900300000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:526 +let $129 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +0x4000004000000 +0x4000004000000 +0x4000004000000 +0x4000004000000)))`); + +// ./test/core/simd/simd_const.wast:527 +assert_return( + () => invoke($129, `f`, []), + [ + new F32x4Pattern( + value("f32", 1125899900000000), + value("f32", 1125899900000000), + value("f32", 1125899900000000), + value("f32", 1125899900000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:528 +let $130 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -0x4000004000000 -0x4000004000000 -0x4000004000000 -0x4000004000000)))`); + +// ./test/core/simd/simd_const.wast:529 +assert_return( + () => invoke($130, `f`, []), + [ + new F32x4Pattern( + value("f32", -1125899900000000), + value("f32", -1125899900000000), + value("f32", -1125899900000000), + value("f32", -1125899900000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:530 +let $131 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +0x400000c000000 +0x400000c000000 +0x400000c000000 +0x400000c000000)))`); + +// ./test/core/simd/simd_const.wast:531 +assert_return( + () => invoke($131, `f`, []), + [ + new F32x4Pattern( + value("f32", 1125900200000000), + value("f32", 1125900200000000), + value("f32", 1125900200000000), + value("f32", 1125900200000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:532 +let $132 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -0x400000c000000 -0x400000c000000 -0x400000c000000 -0x400000c000000)))`); + +// ./test/core/simd/simd_const.wast:533 +assert_return( + () => invoke($132, `f`, []), + [ + new F32x4Pattern( + value("f32", -1125900200000000), + value("f32", -1125900200000000), + value("f32", -1125900200000000), + value("f32", -1125900200000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:535 +let $133 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +1125899973951488 +1125899973951488 +1125899973951488 +1125899973951488)))`); + +// ./test/core/simd/simd_const.wast:536 +assert_return( + () => invoke($133, `f`, []), + [ + new F32x4Pattern( + value("f32", 1125899900000000), + value("f32", 1125899900000000), + value("f32", 1125899900000000), + value("f32", 1125899900000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:537 +let $134 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -1125899973951488 -1125899973951488 -1125899973951488 -1125899973951488)))`); + +// ./test/core/simd/simd_const.wast:538 +assert_return( + () => invoke($134, `f`, []), + [ + new F32x4Pattern( + value("f32", -1125899900000000), + value("f32", -1125899900000000), + value("f32", -1125899900000000), + value("f32", -1125899900000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:539 +let $135 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +1125900108169216 +1125900108169216 +1125900108169216 +1125900108169216)))`); + +// ./test/core/simd/simd_const.wast:540 +assert_return( + () => invoke($135, `f`, []), + [ + new F32x4Pattern( + value("f32", 1125900200000000), + value("f32", 1125900200000000), + value("f32", 1125900200000000), + value("f32", 1125900200000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:541 +let $136 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -1125900108169216 -1125900108169216 -1125900108169216 -1125900108169216)))`); + +// ./test/core/simd/simd_const.wast:542 +assert_return( + () => invoke($136, `f`, []), + [ + new F32x4Pattern( + value("f32", -1125900200000000), + value("f32", -1125900200000000), + value("f32", -1125900200000000), + value("f32", -1125900200000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:545 +let $137 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +0x0.00000100000000000p-126 +0x0.00000100000000000p-126 +0x0.00000100000000000p-126 +0x0.00000100000000000p-126)))`); + +// ./test/core/simd/simd_const.wast:546 +assert_return( + () => invoke($137, `f`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_const.wast:547 +let $138 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -0x0.00000100000000000p-126 -0x0.00000100000000000p-126 -0x0.00000100000000000p-126 -0x0.00000100000000000p-126)))`); + +// ./test/core/simd/simd_const.wast:548 +assert_return( + () => invoke($138, `f`, []), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_const.wast:549 +let $139 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +0x0.00000500000000001p-126 +0x0.00000500000000001p-126 +0x0.00000500000000001p-126 +0x0.00000500000000001p-126)))`); + +// ./test/core/simd/simd_const.wast:550 +assert_return( + () => invoke($139, `f`, []), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000004), + value("f32", 0.000000000000000000000000000000000000000000004), + value("f32", 0.000000000000000000000000000000000000000000004), + value("f32", 0.000000000000000000000000000000000000000000004), + ), + ], +); + +// ./test/core/simd/simd_const.wast:551 +let $140 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -0x0.00000500000000001p-126 -0x0.00000500000000001p-126 -0x0.00000500000000001p-126 -0x0.00000500000000001p-126)))`); + +// ./test/core/simd/simd_const.wast:552 +assert_return( + () => invoke($140, `f`, []), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000004), + value("f32", -0.000000000000000000000000000000000000000000004), + value("f32", -0.000000000000000000000000000000000000000000004), + value("f32", -0.000000000000000000000000000000000000000000004), + ), + ], +); + +// ./test/core/simd/simd_const.wast:555 +let $141 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +0x1.fffffe8p127 +0x1.fffffe8p127 +0x1.fffffe8p127 +0x1.fffffe8p127)))`); + +// ./test/core/simd/simd_const.wast:556 +assert_return( + () => invoke($141, `f`, []), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:557 +let $142 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -0x1.fffffe8p127 -0x1.fffffe8p127 -0x1.fffffe8p127 -0x1.fffffe8p127)))`); + +// ./test/core/simd/simd_const.wast:558 +assert_return( + () => invoke($142, `f`, []), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:559 +let $143 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 +0x1.fffffefffffffffffp127 +0x1.fffffefffffffffffp127 +0x1.fffffefffffffffffp127 +0x1.fffffefffffffffffp127)))`); + +// ./test/core/simd/simd_const.wast:560 +assert_return( + () => invoke($143, `f`, []), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:561 +let $144 = instantiate(`(module (func (export "f") (result v128) (v128.const f32x4 -0x1.fffffefffffffffffp127 -0x1.fffffefffffffffffp127 -0x1.fffffefffffffffffp127 -0x1.fffffefffffffffffp127)))`); + +// ./test/core/simd/simd_const.wast:562 +assert_return( + () => invoke($144, `f`, []), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:565 +let $145 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000000p-600)))`); + +// ./test/core/simd/simd_const.wast:566 +assert_return( + () => invoke($145, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102884), + ], +); + +// ./test/core/simd/simd_const.wast:567 +let $146 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000000p-600)))`); + +// ./test/core/simd/simd_const.wast:568 +assert_return( + () => invoke($146, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102884), + ], +); + +// ./test/core/simd/simd_const.wast:569 +let $147 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000001p-600)))`); + +// ./test/core/simd/simd_const.wast:570 +assert_return( + () => invoke($147, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:571 +let $148 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000001p-600)))`); + +// ./test/core/simd/simd_const.wast:572 +assert_return( + () => invoke($148, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:573 +let $149 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.0000000000000fffffffffffp-600)))`); + +// ./test/core/simd/simd_const.wast:574 +assert_return( + () => invoke($149, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:575 +let $150 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.0000000000000fffffffffffp-600)))`); + +// ./test/core/simd/simd_const.wast:576 +assert_return( + () => invoke($150, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:577 +let $151 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000000p-600)))`); + +// ./test/core/simd/simd_const.wast:578 +assert_return( + () => invoke($151, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:579 +let $152 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000000p-600)))`); + +// ./test/core/simd/simd_const.wast:580 +assert_return( + () => invoke($152, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:581 +let $153 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000001p-600)))`); + +// ./test/core/simd/simd_const.wast:582 +assert_return( + () => invoke($153, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:583 +let $154 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000001p-600)))`); + +// ./test/core/simd/simd_const.wast:584 +assert_return( + () => invoke($154, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:585 +let $155 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.00000000000017ffffffffffp-600)))`); + +// ./test/core/simd/simd_const.wast:586 +assert_return( + () => invoke($155, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:587 +let $156 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.00000000000017ffffffffffp-600)))`); + +// ./test/core/simd/simd_const.wast:588 +assert_return( + () => invoke($156, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:589 +let $157 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000000p-600)))`); + +// ./test/core/simd/simd_const.wast:590 +assert_return( + () => invoke($157, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:591 +let $158 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000000p-600)))`); + +// ./test/core/simd/simd_const.wast:592 +assert_return( + () => invoke($158, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:593 +let $159 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000001p-600)))`); + +// ./test/core/simd/simd_const.wast:594 +assert_return( + () => invoke($159, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:595 +let $160 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000001p-600)))`); + +// ./test/core/simd/simd_const.wast:596 +assert_return( + () => invoke($160, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:597 +let $161 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.0000000000001fffffffffffp-600)))`); + +// ./test/core/simd/simd_const.wast:598 +assert_return( + () => invoke($161, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:599 +let $162 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.0000000000001fffffffffffp-600)))`); + +// ./test/core/simd/simd_const.wast:600 +assert_return( + () => invoke($162, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:601 +let $163 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000000p-600)))`); + +// ./test/core/simd/simd_const.wast:602 +assert_return( + () => invoke($163, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:603 +let $164 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000000p-600)))`); + +// ./test/core/simd/simd_const.wast:604 +assert_return( + () => invoke($164, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:605 +let $165 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000001p-600)))`); + +// ./test/core/simd/simd_const.wast:606 +assert_return( + () => invoke($165, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:607 +let $166 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000001p-600)))`); + +// ./test/core/simd/simd_const.wast:608 +assert_return( + () => invoke($166, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:609 +let $167 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.00000000000027ffffffffffp-600)))`); + +// ./test/core/simd/simd_const.wast:610 +assert_return( + () => invoke($167, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:611 +let $168 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.00000000000027ffffffffffp-600)))`); + +// ./test/core/simd/simd_const.wast:612 +assert_return( + () => invoke($168, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:613 +let $169 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000001p-600)))`); + +// ./test/core/simd/simd_const.wast:614 +assert_return( + () => invoke($169, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028857), + ], +); + +// ./test/core/simd/simd_const.wast:615 +let $170 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000001p-600)))`); + +// ./test/core/simd/simd_const.wast:616 +assert_return( + () => invoke($170, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028857), + ], +); + +// ./test/core/simd/simd_const.wast:617 +let $171 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000400000000000p-627)))`); + +// ./test/core/simd/simd_const.wast:618 +assert_return( + () => invoke($171, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102884), + ], +); + +// ./test/core/simd/simd_const.wast:619 +let $172 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000400000000000p-627)))`); + +// ./test/core/simd/simd_const.wast:620 +assert_return( + () => invoke($172, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102884), + ], +); + +// ./test/core/simd/simd_const.wast:621 +let $173 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000400000000001p-627)))`); + +// ./test/core/simd/simd_const.wast:622 +assert_return( + () => invoke($173, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:623 +let $174 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000400000000001p-627)))`); + +// ./test/core/simd/simd_const.wast:624 +assert_return( + () => invoke($174, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:625 +let $175 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.0000007fffffffffffp-627)))`); + +// ./test/core/simd/simd_const.wast:626 +assert_return( + () => invoke($175, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:627 +let $176 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.0000007fffffffffffp-627)))`); + +// ./test/core/simd/simd_const.wast:628 +assert_return( + () => invoke($176, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:629 +let $177 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000800000000000p-627)))`); + +// ./test/core/simd/simd_const.wast:630 +assert_return( + () => invoke($177, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:631 +let $178 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000800000000000p-627)))`); + +// ./test/core/simd/simd_const.wast:632 +assert_return( + () => invoke($178, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:633 +let $179 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000800000000001p-627)))`); + +// ./test/core/simd/simd_const.wast:634 +assert_return( + () => invoke($179, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:635 +let $180 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000800000000001p-627)))`); + +// ./test/core/simd/simd_const.wast:636 +assert_return( + () => invoke($180, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:637 +let $181 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000bfffffffffffp-627)))`); + +// ./test/core/simd/simd_const.wast:638 +assert_return( + () => invoke($181, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:639 +let $182 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000bfffffffffffp-627)))`); + +// ./test/core/simd/simd_const.wast:640 +assert_return( + () => invoke($182, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847), + ], +); + +// ./test/core/simd/simd_const.wast:641 +let $183 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000c00000000000p-627)))`); + +// ./test/core/simd/simd_const.wast:642 +assert_return( + () => invoke($183, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:643 +let $184 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000c00000000000p-627)))`); + +// ./test/core/simd/simd_const.wast:644 +assert_return( + () => invoke($184, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:645 +let $185 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000c00000000001p-627)))`); + +// ./test/core/simd/simd_const.wast:646 +assert_return( + () => invoke($185, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:647 +let $186 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000c00000000001p-627)))`); + +// ./test/core/simd/simd_const.wast:648 +assert_return( + () => invoke($186, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:649 +let $187 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000000ffffffffffffp-627)))`); + +// ./test/core/simd/simd_const.wast:650 +assert_return( + () => invoke($187, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:651 +let $188 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000000ffffffffffffp-627)))`); + +// ./test/core/simd/simd_const.wast:652 +assert_return( + () => invoke($188, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:653 +let $189 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000001000000000000p-627)))`); + +// ./test/core/simd/simd_const.wast:654 +assert_return( + () => invoke($189, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:655 +let $190 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000001000000000000p-627)))`); + +// ./test/core/simd/simd_const.wast:656 +assert_return( + () => invoke($190, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:657 +let $191 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000001000000000001p-627)))`); + +// ./test/core/simd/simd_const.wast:658 +assert_return( + () => invoke($191, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:659 +let $192 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000001000000000001p-627)))`); + +// ./test/core/simd/simd_const.wast:660 +assert_return( + () => invoke($192, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:661 +let $193 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.0000013fffffffffffp-627)))`); + +// ./test/core/simd/simd_const.wast:662 +assert_return( + () => invoke($193, `f`, []), + [ + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:663 +let $194 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.0000013fffffffffffp-627)))`); + +// ./test/core/simd/simd_const.wast:664 +assert_return( + () => invoke($194, `f`, []), + [ + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885), + ], +); + +// ./test/core/simd/simd_const.wast:665 +let $195 = instantiate(`(module (func (export "f") (result f64) (f64.const +0x8000000.000001400000000001p-627)))`); + +// ./test/core/simd/simd_const.wast:666 +assert_return( + () => invoke($195, `f`, []), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028857), + ], +); + +// ./test/core/simd/simd_const.wast:667 +let $196 = instantiate(`(module (func (export "f") (result f64) (f64.const -0x8000000.000001400000000001p-627)))`); + +// ./test/core/simd/simd_const.wast:668 +assert_return( + () => invoke($196, `f`, []), + [ + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028857), + ], +); + +// ./test/core/simd/simd_const.wast:669 +let $197 = instantiate(`(module (func (export "f") (result f64) (f64.const +5.3575430359313371995e+300)))`); + +// ./test/core/simd/simd_const.wast:670 +assert_return( + () => invoke($197, `f`, []), + [ + value("f64", 5357543035931337000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_const.wast:671 +let $198 = instantiate(`(module (func (export "f") (result f64) (f64.const -5.3575430359313371995e+300)))`); + +// ./test/core/simd/simd_const.wast:672 +assert_return( + () => invoke($198, `f`, []), + [ + value("f64", -5357543035931337000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_const.wast:673 +let $199 = instantiate(`(module (func (export "f") (result f64) (f64.const +5.3575430359313371996e+300)))`); + +// ./test/core/simd/simd_const.wast:674 +assert_return( + () => invoke($199, `f`, []), + [ + value("f64", 5357543035931338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_const.wast:675 +let $200 = instantiate(`(module (func (export "f") (result f64) (f64.const -5.3575430359313371996e+300)))`); + +// ./test/core/simd/simd_const.wast:676 +assert_return( + () => invoke($200, `f`, []), + [ + value("f64", -5357543035931338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_const.wast:677 +let $201 = instantiate(`(module (func (export "f") (result f64) (f64.const +5.3575430359313383891e+300)))`); + +// ./test/core/simd/simd_const.wast:678 +assert_return( + () => invoke($201, `f`, []), + [ + value("f64", 5357543035931338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_const.wast:679 +let $202 = instantiate(`(module (func (export "f") (result f64) (f64.const -5.3575430359313383891e+300)))`); + +// ./test/core/simd/simd_const.wast:680 +assert_return( + () => invoke($202, `f`, []), + [ + value("f64", -5357543035931338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_const.wast:681 +let $203 = instantiate(`(module (func (export "f") (result f64) (f64.const +5.3575430359313383892e+300)))`); + +// ./test/core/simd/simd_const.wast:682 +assert_return( + () => invoke($203, `f`, []), + [ + value("f64", 5357543035931339000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_const.wast:683 +let $204 = instantiate(`(module (func (export "f") (result f64) (f64.const -5.3575430359313383892e+300)))`); + +// ./test/core/simd/simd_const.wast:684 +assert_return( + () => invoke($204, `f`, []), + [ + value("f64", -5357543035931339000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_const.wast:687 +let $205 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000080000000000p+600 +0x1.000000000000080000000000p+600)))`); + +// ./test/core/simd/simd_const.wast:688 +assert_return( + () => invoke($205, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880993000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880993000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:689 +let $206 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000080000000000p+600 -0x1.000000000000080000000000p+600)))`); + +// ./test/core/simd/simd_const.wast:690 +assert_return( + () => invoke($206, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880993000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880993000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:691 +let $207 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000080000000001p+600 +0x1.000000000000080000000001p+600)))`); + +// ./test/core/simd/simd_const.wast:692 +assert_return( + () => invoke($207, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:693 +let $208 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000080000000001p+600 -0x1.000000000000080000000001p+600)))`); + +// ./test/core/simd/simd_const.wast:694 +assert_return( + () => invoke($208, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:695 +let $209 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.0000000000000fffffffffffp+600 +0x1.0000000000000fffffffffffp+600)))`); + +// ./test/core/simd/simd_const.wast:696 +assert_return( + () => invoke($209, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:697 +let $210 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.0000000000000fffffffffffp+600 -0x1.0000000000000fffffffffffp+600)))`); + +// ./test/core/simd/simd_const.wast:698 +assert_return( + () => invoke($210, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:699 +let $211 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000100000000000p+600 +0x1.000000000000100000000000p+600)))`); + +// ./test/core/simd/simd_const.wast:700 +assert_return( + () => invoke($211, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:701 +let $212 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000100000000000p+600 -0x1.000000000000100000000000p+600)))`); + +// ./test/core/simd/simd_const.wast:702 +assert_return( + () => invoke($212, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:703 +let $213 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000100000000001p+600 +0x1.000000000000100000000001p+600)))`); + +// ./test/core/simd/simd_const.wast:704 +assert_return( + () => invoke($213, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:705 +let $214 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000100000000001p+600 -0x1.000000000000100000000001p+600)))`); + +// ./test/core/simd/simd_const.wast:706 +assert_return( + () => invoke($214, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:707 +let $215 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.00000000000017ffffffffffp+600 +0x1.00000000000017ffffffffffp+600)))`); + +// ./test/core/simd/simd_const.wast:708 +assert_return( + () => invoke($215, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:709 +let $216 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.00000000000017ffffffffffp+600 -0x1.00000000000017ffffffffffp+600)))`); + +// ./test/core/simd/simd_const.wast:710 +assert_return( + () => invoke($216, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:711 +let $217 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000180000000000p+600 +0x1.000000000000180000000000p+600)))`); + +// ./test/core/simd/simd_const.wast:712 +assert_return( + () => invoke($217, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:713 +let $218 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000180000000000p+600 -0x1.000000000000180000000000p+600)))`); + +// ./test/core/simd/simd_const.wast:714 +assert_return( + () => invoke($218, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:715 +let $219 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000180000000001p+600 +0x1.000000000000180000000001p+600)))`); + +// ./test/core/simd/simd_const.wast:716 +assert_return( + () => invoke($219, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:717 +let $220 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000180000000001p+600 -0x1.000000000000180000000001p+600)))`); + +// ./test/core/simd/simd_const.wast:718 +assert_return( + () => invoke($220, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:719 +let $221 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.0000000000001fffffffffffp+600 +0x1.0000000000001fffffffffffp+600)))`); + +// ./test/core/simd/simd_const.wast:720 +assert_return( + () => invoke($221, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:721 +let $222 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.0000000000001fffffffffffp+600 -0x1.0000000000001fffffffffffp+600)))`); + +// ./test/core/simd/simd_const.wast:722 +assert_return( + () => invoke($222, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:723 +let $223 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000200000000000p+600 +0x1.000000000000200000000000p+600)))`); + +// ./test/core/simd/simd_const.wast:724 +assert_return( + () => invoke($223, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:725 +let $224 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000200000000000p+600 -0x1.000000000000200000000000p+600)))`); + +// ./test/core/simd/simd_const.wast:726 +assert_return( + () => invoke($224, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:727 +let $225 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000200000000001p+600 +0x1.000000000000200000000001p+600)))`); + +// ./test/core/simd/simd_const.wast:728 +assert_return( + () => invoke($225, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:729 +let $226 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000200000000001p+600 -0x1.000000000000200000000001p+600)))`); + +// ./test/core/simd/simd_const.wast:730 +assert_return( + () => invoke($226, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:731 +let $227 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.00000000000027ffffffffffp+600 +0x1.00000000000027ffffffffffp+600)))`); + +// ./test/core/simd/simd_const.wast:732 +assert_return( + () => invoke($227, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:733 +let $228 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.00000000000027ffffffffffp+600 -0x1.00000000000027ffffffffffp+600)))`); + +// ./test/core/simd/simd_const.wast:734 +assert_return( + () => invoke($228, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:735 +let $229 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000280000000000p+600 +0x1.000000000000280000000000p+600)))`); + +// ./test/core/simd/simd_const.wast:736 +assert_return( + () => invoke($229, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:737 +let $230 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000280000000000p+600 -0x1.000000000000280000000000p+600)))`); + +// ./test/core/simd/simd_const.wast:738 +assert_return( + () => invoke($230, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:739 +let $231 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000280000000001p+600 +0x1.000000000000280000000001p+600)))`); + +// ./test/core/simd/simd_const.wast:740 +assert_return( + () => invoke($231, `f`, []), + [ + new F64x2Pattern( + value("f64", 4149515568880996000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 4149515568880996000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:741 +let $232 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000280000000001p+600 -0x1.000000000000280000000001p+600)))`); + +// ./test/core/simd/simd_const.wast:742 +assert_return( + () => invoke($232, `f`, []), + [ + new F64x2Pattern( + value("f64", -4149515568880996000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -4149515568880996000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:743 +let $233 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000100000000000 +0x2000000000000100000000000)))`); + +// ./test/core/simd/simd_const.wast:744 +assert_return( + () => invoke($233, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528680000000000000), + value("f64", 158456325028528680000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:745 +let $234 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000100000000000 -0x2000000000000100000000000)))`); + +// ./test/core/simd/simd_const.wast:746 +assert_return( + () => invoke($234, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528680000000000000), + value("f64", -158456325028528680000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:747 +let $235 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000100000000001 +0x2000000000000100000000001)))`); + +// ./test/core/simd/simd_const.wast:748 +assert_return( + () => invoke($235, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528700000000000000), + value("f64", 158456325028528700000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:749 +let $236 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000100000000001 -0x2000000000000100000000001)))`); + +// ./test/core/simd/simd_const.wast:750 +assert_return( + () => invoke($236, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528700000000000000), + value("f64", -158456325028528700000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:751 +let $237 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x20000000000001fffffffffff +0x20000000000001fffffffffff)))`); + +// ./test/core/simd/simd_const.wast:752 +assert_return( + () => invoke($237, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528700000000000000), + value("f64", 158456325028528700000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:753 +let $238 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x20000000000001fffffffffff -0x20000000000001fffffffffff)))`); + +// ./test/core/simd/simd_const.wast:754 +assert_return( + () => invoke($238, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528700000000000000), + value("f64", -158456325028528700000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:755 +let $239 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000200000000000 +0x2000000000000200000000000)))`); + +// ./test/core/simd/simd_const.wast:756 +assert_return( + () => invoke($239, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528700000000000000), + value("f64", 158456325028528700000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:757 +let $240 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000200000000000 -0x2000000000000200000000000)))`); + +// ./test/core/simd/simd_const.wast:758 +assert_return( + () => invoke($240, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528700000000000000), + value("f64", -158456325028528700000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:759 +let $241 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000200000000001 +0x2000000000000200000000001)))`); + +// ./test/core/simd/simd_const.wast:760 +assert_return( + () => invoke($241, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528700000000000000), + value("f64", 158456325028528700000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:761 +let $242 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000200000000001 -0x2000000000000200000000001)))`); + +// ./test/core/simd/simd_const.wast:762 +assert_return( + () => invoke($242, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528700000000000000), + value("f64", -158456325028528700000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:763 +let $243 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x20000000000002fffffffffff +0x20000000000002fffffffffff)))`); + +// ./test/core/simd/simd_const.wast:764 +assert_return( + () => invoke($243, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528700000000000000), + value("f64", 158456325028528700000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:765 +let $244 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x20000000000002fffffffffff -0x20000000000002fffffffffff)))`); + +// ./test/core/simd/simd_const.wast:766 +assert_return( + () => invoke($244, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528700000000000000), + value("f64", -158456325028528700000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:767 +let $245 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000300000000000 +0x2000000000000300000000000)))`); + +// ./test/core/simd/simd_const.wast:768 +assert_return( + () => invoke($245, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528750000000000000), + value("f64", 158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:769 +let $246 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000300000000000 -0x2000000000000300000000000)))`); + +// ./test/core/simd/simd_const.wast:770 +assert_return( + () => invoke($246, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528750000000000000), + value("f64", -158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:771 +let $247 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000300000000001 +0x2000000000000300000000001)))`); + +// ./test/core/simd/simd_const.wast:772 +assert_return( + () => invoke($247, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528750000000000000), + value("f64", 158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:773 +let $248 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000300000000001 -0x2000000000000300000000001)))`); + +// ./test/core/simd/simd_const.wast:774 +assert_return( + () => invoke($248, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528750000000000000), + value("f64", -158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:775 +let $249 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x20000000000003fffffffffff +0x20000000000003fffffffffff)))`); + +// ./test/core/simd/simd_const.wast:776 +assert_return( + () => invoke($249, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528750000000000000), + value("f64", 158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:777 +let $250 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x20000000000003fffffffffff -0x20000000000003fffffffffff)))`); + +// ./test/core/simd/simd_const.wast:778 +assert_return( + () => invoke($250, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528750000000000000), + value("f64", -158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:779 +let $251 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000400000000000 +0x2000000000000400000000000)))`); + +// ./test/core/simd/simd_const.wast:780 +assert_return( + () => invoke($251, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528750000000000000), + value("f64", 158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:781 +let $252 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000400000000000 -0x2000000000000400000000000)))`); + +// ./test/core/simd/simd_const.wast:782 +assert_return( + () => invoke($252, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528750000000000000), + value("f64", -158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:783 +let $253 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000400000000001 +0x2000000000000400000000001)))`); + +// ./test/core/simd/simd_const.wast:784 +assert_return( + () => invoke($253, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528750000000000000), + value("f64", 158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:785 +let $254 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000400000000001 -0x2000000000000400000000001)))`); + +// ./test/core/simd/simd_const.wast:786 +assert_return( + () => invoke($254, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528750000000000000), + value("f64", -158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:787 +let $255 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x20000000000004fffffffffff +0x20000000000004fffffffffff)))`); + +// ./test/core/simd/simd_const.wast:788 +assert_return( + () => invoke($255, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528750000000000000), + value("f64", 158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:789 +let $256 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x20000000000004fffffffffff -0x20000000000004fffffffffff)))`); + +// ./test/core/simd/simd_const.wast:790 +assert_return( + () => invoke($256, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528750000000000000), + value("f64", -158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:791 +let $257 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000500000000000 +0x2000000000000500000000000)))`); + +// ./test/core/simd/simd_const.wast:792 +assert_return( + () => invoke($257, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528750000000000000), + value("f64", 158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:793 +let $258 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000500000000000 -0x2000000000000500000000000)))`); + +// ./test/core/simd/simd_const.wast:794 +assert_return( + () => invoke($258, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528750000000000000), + value("f64", -158456325028528750000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:795 +let $259 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000500000000001 +0x2000000000000500000000001)))`); + +// ./test/core/simd/simd_const.wast:796 +assert_return( + () => invoke($259, `f`, []), + [ + new F64x2Pattern( + value("f64", 158456325028528780000000000000), + value("f64", 158456325028528780000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:797 +let $260 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000500000000001 -0x2000000000000500000000001)))`); + +// ./test/core/simd/simd_const.wast:798 +assert_return( + () => invoke($260, `f`, []), + [ + new F64x2Pattern( + value("f64", -158456325028528780000000000000), + value("f64", -158456325028528780000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:799 +let $261 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +1152921504606847104 +1152921504606847104)))`); + +// ./test/core/simd/simd_const.wast:800 +assert_return( + () => invoke($261, `f`, []), + [ + new F64x2Pattern( + value("f64", 1152921504606847000), + value("f64", 1152921504606847000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:801 +let $262 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -1152921504606847104 -1152921504606847104)))`); + +// ./test/core/simd/simd_const.wast:802 +assert_return( + () => invoke($262, `f`, []), + [ + new F64x2Pattern( + value("f64", -1152921504606847000), + value("f64", -1152921504606847000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:803 +let $263 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +1152921504606847105 +1152921504606847105)))`); + +// ./test/core/simd/simd_const.wast:804 +assert_return( + () => invoke($263, `f`, []), + [ + new F64x2Pattern( + value("f64", 1152921504606847200), + value("f64", 1152921504606847200), + ), + ], +); + +// ./test/core/simd/simd_const.wast:805 +let $264 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -1152921504606847105 -1152921504606847105)))`); + +// ./test/core/simd/simd_const.wast:806 +assert_return( + () => invoke($264, `f`, []), + [ + new F64x2Pattern( + value("f64", -1152921504606847200), + value("f64", -1152921504606847200), + ), + ], +); + +// ./test/core/simd/simd_const.wast:807 +let $265 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +1152921504606847359 +1152921504606847359)))`); + +// ./test/core/simd/simd_const.wast:808 +assert_return( + () => invoke($265, `f`, []), + [ + new F64x2Pattern( + value("f64", 1152921504606847200), + value("f64", 1152921504606847200), + ), + ], +); + +// ./test/core/simd/simd_const.wast:809 +let $266 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -1152921504606847359 -1152921504606847359)))`); + +// ./test/core/simd/simd_const.wast:810 +assert_return( + () => invoke($266, `f`, []), + [ + new F64x2Pattern( + value("f64", -1152921504606847200), + value("f64", -1152921504606847200), + ), + ], +); + +// ./test/core/simd/simd_const.wast:811 +let $267 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +1152921504606847360 +1152921504606847360)))`); + +// ./test/core/simd/simd_const.wast:812 +assert_return( + () => invoke($267, `f`, []), + [ + new F64x2Pattern( + value("f64", 1152921504606847500), + value("f64", 1152921504606847500), + ), + ], +); + +// ./test/core/simd/simd_const.wast:813 +let $268 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -1152921504606847360 -1152921504606847360)))`); + +// ./test/core/simd/simd_const.wast:814 +assert_return( + () => invoke($268, `f`, []), + [ + new F64x2Pattern( + value("f64", -1152921504606847500), + value("f64", -1152921504606847500), + ), + ], +); + +// ./test/core/simd/simd_const.wast:817 +let $269 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000080000000000p-1022 +0x0.000000000000080000000000p-1022)))`); + +// ./test/core/simd/simd_const.wast:818 +assert_return(() => invoke($269, `f`, []), [new F64x2Pattern(value("f64", 0), value("f64", 0))]); + +// ./test/core/simd/simd_const.wast:819 +let $270 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000080000000000p-1022 -0x0.000000000000080000000000p-1022)))`); + +// ./test/core/simd/simd_const.wast:820 +assert_return(() => invoke($270, `f`, []), [new F64x2Pattern(value("f64", -0), value("f64", -0))]); + +// ./test/core/simd/simd_const.wast:821 +let $271 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000080000000001p-1022 +0x0.000000000000080000000001p-1022)))`); + +// ./test/core/simd/simd_const.wast:822 +assert_return( + () => invoke($271, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_const.wast:823 +let $272 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000080000000001p-1022 -0x0.000000000000080000000001p-1022)))`); + +// ./test/core/simd/simd_const.wast:824 +assert_return( + () => invoke($272, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_const.wast:825 +let $273 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.0000000000000fffffffffffp-1022 +0x0.0000000000000fffffffffffp-1022)))`); + +// ./test/core/simd/simd_const.wast:826 +assert_return( + () => invoke($273, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_const.wast:827 +let $274 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.0000000000000fffffffffffp-1022 -0x0.0000000000000fffffffffffp-1022)))`); + +// ./test/core/simd/simd_const.wast:828 +assert_return( + () => invoke($274, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_const.wast:829 +let $275 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000100000000000p-1022 +0x0.000000000000100000000000p-1022)))`); + +// ./test/core/simd/simd_const.wast:830 +assert_return( + () => invoke($275, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_const.wast:831 +let $276 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000100000000000p-1022 -0x0.000000000000100000000000p-1022)))`); + +// ./test/core/simd/simd_const.wast:832 +assert_return( + () => invoke($276, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_const.wast:833 +let $277 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000100000000001p-1022 +0x0.000000000000100000000001p-1022)))`); + +// ./test/core/simd/simd_const.wast:834 +assert_return( + () => invoke($277, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_const.wast:835 +let $278 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000100000000001p-1022 -0x0.000000000000100000000001p-1022)))`); + +// ./test/core/simd/simd_const.wast:836 +assert_return( + () => invoke($278, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_const.wast:837 +let $279 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.00000000000017ffffffffffp-1022 +0x0.00000000000017ffffffffffp-1022)))`); + +// ./test/core/simd/simd_const.wast:838 +assert_return( + () => invoke($279, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_const.wast:839 +let $280 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.00000000000017ffffffffffp-1022 -0x0.00000000000017ffffffffffp-1022)))`); + +// ./test/core/simd/simd_const.wast:840 +assert_return( + () => invoke($280, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_const.wast:841 +let $281 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000180000000000p-1022 +0x0.000000000000180000000000p-1022)))`); + +// ./test/core/simd/simd_const.wast:842 +assert_return( + () => invoke($281, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:843 +let $282 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000180000000000p-1022 -0x0.000000000000180000000000p-1022)))`); + +// ./test/core/simd/simd_const.wast:844 +assert_return( + () => invoke($282, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:845 +let $283 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000180000000001p-1022 +0x0.000000000000180000000001p-1022)))`); + +// ./test/core/simd/simd_const.wast:846 +assert_return( + () => invoke($283, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:847 +let $284 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000180000000001p-1022 -0x0.000000000000180000000001p-1022)))`); + +// ./test/core/simd/simd_const.wast:848 +assert_return( + () => invoke($284, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:849 +let $285 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.0000000000001fffffffffffp-1022 +0x0.0000000000001fffffffffffp-1022)))`); + +// ./test/core/simd/simd_const.wast:850 +assert_return( + () => invoke($285, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:851 +let $286 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.0000000000001fffffffffffp-1022 -0x0.0000000000001fffffffffffp-1022)))`); + +// ./test/core/simd/simd_const.wast:852 +assert_return( + () => invoke($286, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:853 +let $287 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000200000000000p-1022 +0x0.000000000000200000000000p-1022)))`); + +// ./test/core/simd/simd_const.wast:854 +assert_return( + () => invoke($287, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:855 +let $288 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000200000000000p-1022 -0x0.000000000000200000000000p-1022)))`); + +// ./test/core/simd/simd_const.wast:856 +assert_return( + () => invoke($288, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:857 +let $289 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000200000000001p-1022 +0x0.000000000000200000000001p-1022)))`); + +// ./test/core/simd/simd_const.wast:858 +assert_return( + () => invoke($289, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:859 +let $290 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000200000000001p-1022 -0x0.000000000000200000000001p-1022)))`); + +// ./test/core/simd/simd_const.wast:860 +assert_return( + () => invoke($290, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:861 +let $291 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.00000000000027ffffffffffp-1022 +0x0.00000000000027ffffffffffp-1022)))`); + +// ./test/core/simd/simd_const.wast:862 +assert_return( + () => invoke($291, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:863 +let $292 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.00000000000027ffffffffffp-1022 -0x0.00000000000027ffffffffffp-1022)))`); + +// ./test/core/simd/simd_const.wast:864 +assert_return( + () => invoke($292, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:865 +let $293 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000280000000000p-1022 +0x0.000000000000280000000000p-1022)))`); + +// ./test/core/simd/simd_const.wast:866 +assert_return( + () => invoke($293, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:867 +let $294 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000280000000000p-1022 -0x0.000000000000280000000000p-1022)))`); + +// ./test/core/simd/simd_const.wast:868 +assert_return( + () => invoke($294, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_const.wast:869 +let $295 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000280000000001p-1022 +0x1.000000000000280000000001p-1022)))`); + +// ./test/core/simd/simd_const.wast:870 +assert_return( + () => invoke($295, `f`, []), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507203), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507203), + ), + ], +); + +// ./test/core/simd/simd_const.wast:871 +let $296 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000280000000001p-1022 -0x1.000000000000280000000001p-1022)))`); + +// ./test/core/simd/simd_const.wast:872 +assert_return( + () => invoke($296, `f`, []), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507203), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507203), + ), + ], +); + +// ./test/core/simd/simd_const.wast:875 +let $297 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.fffffffffffff4p1023 +0x1.fffffffffffff4p1023)))`); + +// ./test/core/simd/simd_const.wast:876 +assert_return( + () => invoke($297, `f`, []), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:877 +let $298 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.fffffffffffff4p1023 -0x1.fffffffffffff4p1023)))`); + +// ./test/core/simd/simd_const.wast:878 +assert_return( + () => invoke($298, `f`, []), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:879 +let $299 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 +0x1.fffffffffffff7ffffffp1023 +0x1.fffffffffffff7ffffffp1023)))`); + +// ./test/core/simd/simd_const.wast:880 +assert_return( + () => invoke($299, `f`, []), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:881 +let $300 = instantiate(`(module (func (export "f") (result v128) (v128.const f64x2 -0x1.fffffffffffff7ffffffp1023 -0x1.fffffffffffff7ffffffp1023)))`); + +// ./test/core/simd/simd_const.wast:882 +assert_return( + () => invoke($300, `f`, []), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:886 +let $301 = instantiate(`(module (memory 1) + (func (export "as-br-retval") (result v128) + (block (result v128) (br 0 (v128.const i32x4 0x03020100 0x07060504 0x0b0a0908 0x0f0e0d0c))) + ) + (func (export "as-br_if-retval") (result v128) + (block (result v128) + (br_if 0 (v128.const i32x4 0 1 2 3) (i32.const 1)) + ) + ) + (func (export "as-return-retval") (result v128) + (return (v128.const i32x4 0 1 2 3)) + ) + (func (export "as-if-then-retval") (result v128) + (if (result v128) (i32.const 1) + (then (v128.const i32x4 0 1 2 3)) (else (v128.const i32x4 3 2 1 0)) + ) + ) + (func (export "as-if-else-retval") (result v128) + (if (result v128) (i32.const 0) + (then (v128.const i32x4 0 1 2 3)) (else (v128.const i32x4 3 2 1 0)) + ) + ) + (func $$f (param v128 v128 v128) (result v128) (v128.const i32x4 0 1 2 3)) + (func (export "as-call-param") (result v128) + (call $$f (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3)) + ) + (func (export "as-block-retval") (result v128) + (block (result v128) (v128.const i32x4 0 1 2 3)) + ) + (func (export "as-loop-retval") (result v128) + (loop (result v128) (v128.const i32x4 0 1 2 3)) + ) + (func (export "as-drop-operand") + (drop (v128.const i32x4 0 1 2 3)) + ) + + (func (export "as-br-retval2") (result v128) + (block (result v128) (br 0 (v128.const i64x2 0x0302010007060504 0x0b0a09080f0e0d0c))) + ) + (func (export "as-br_if-retval2") (result v128) + (block (result v128) + (br_if 0 (v128.const i64x2 0 1) (i32.const 1)) + ) + ) + (func (export "as-return-retval2") (result v128) + (return (v128.const i64x2 0 1)) + ) + (func (export "as-if-then-retval2") (result v128) + (if (result v128) (i32.const 1) + (then (v128.const i64x2 0 1)) (else (v128.const i64x2 1 0)) + ) + ) + (func (export "as-if-else-retval2") (result v128) + (if (result v128) (i32.const 0) + (then (v128.const i64x2 0 1)) (else (v128.const i64x2 1 0)) + ) + ) + (func $$f2 (param v128 v128 v128) (result v128) (v128.const i64x2 0 1)) + (func (export "as-call-param2") (result v128) + (call $$f2 (v128.const i64x2 0 1) (v128.const i64x2 0 1) (v128.const i64x2 0 1)) + ) + + (type $$sig (func (param v128 v128 v128) (result v128))) + (table funcref (elem $$f $$f2)) + (func (export "as-call_indirect-param") (result v128) + (call_indirect (type $$sig) + (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3) (i32.const 0) + ) + ) + (func (export "as-call_indirect-param2") (result v128) + (call_indirect (type $$sig) + (v128.const i64x2 0 1) (v128.const i64x2 0 1) (v128.const i64x2 0 1) (i32.const 1) + ) + ) + (func (export "as-block-retval2") (result v128) + (block (result v128) (v128.const i64x2 0 1)) + ) + (func (export "as-loop-retval2") (result v128) + (loop (result v128) (v128.const i64x2 0 1)) + ) + (func (export "as-drop-operand2") + (drop (v128.const i64x2 0 1)) + ) +)`); + +// ./test/core/simd/simd_const.wast:971 +assert_return( + () => invoke($301, `as-br-retval`, []), + [i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c])], +); + +// ./test/core/simd/simd_const.wast:972 +assert_return(() => invoke($301, `as-br_if-retval`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_const.wast:973 +assert_return(() => invoke($301, `as-return-retval`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_const.wast:974 +assert_return(() => invoke($301, `as-if-then-retval`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_const.wast:975 +assert_return(() => invoke($301, `as-if-else-retval`, []), [i32x4([0x3, 0x2, 0x1, 0x0])]); + +// ./test/core/simd/simd_const.wast:976 +assert_return(() => invoke($301, `as-call-param`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_const.wast:977 +assert_return(() => invoke($301, `as-call_indirect-param`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_const.wast:978 +assert_return(() => invoke($301, `as-block-retval`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_const.wast:979 +assert_return(() => invoke($301, `as-loop-retval`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_const.wast:980 +assert_return(() => invoke($301, `as-drop-operand`, []), []); + +// ./test/core/simd/simd_const.wast:982 +assert_return(() => invoke($301, `as-br-retval2`, []), [i64x2([0x302010007060504n, 0xb0a09080f0e0d0cn])]); + +// ./test/core/simd/simd_const.wast:983 +assert_return(() => invoke($301, `as-br_if-retval2`, []), [i64x2([0x0n, 0x1n])]); + +// ./test/core/simd/simd_const.wast:984 +assert_return(() => invoke($301, `as-return-retval2`, []), [i64x2([0x0n, 0x1n])]); + +// ./test/core/simd/simd_const.wast:985 +assert_return(() => invoke($301, `as-if-then-retval2`, []), [i64x2([0x0n, 0x1n])]); + +// ./test/core/simd/simd_const.wast:986 +assert_return(() => invoke($301, `as-if-else-retval2`, []), [i64x2([0x1n, 0x0n])]); + +// ./test/core/simd/simd_const.wast:987 +assert_return(() => invoke($301, `as-call-param2`, []), [i64x2([0x0n, 0x1n])]); + +// ./test/core/simd/simd_const.wast:988 +assert_return(() => invoke($301, `as-call_indirect-param2`, []), [i64x2([0x0n, 0x1n])]); + +// ./test/core/simd/simd_const.wast:989 +assert_return(() => invoke($301, `as-block-retval2`, []), [i64x2([0x0n, 0x1n])]); + +// ./test/core/simd/simd_const.wast:990 +assert_return(() => invoke($301, `as-loop-retval2`, []), [i64x2([0x0n, 0x1n])]); + +// ./test/core/simd/simd_const.wast:991 +assert_return(() => invoke($301, `as-drop-operand2`, []), []); + +// ./test/core/simd/simd_const.wast:995 +let $302 = instantiate(`(module (memory 1) + (func (export "as-local.set/get-value_0_0") (param $$0 v128) (result v128) + (local v128 v128 v128 v128) + (local.set 0 (local.get $$0)) + (local.get 0) + ) + (func (export "as-local.set/get-value_0_1") (param $$0 v128) (result v128) + (local v128 v128 v128 v128) + (local.set 0 (local.get $$0)) + (local.set 1 (local.get 0)) + (local.set 2 (local.get 1)) + (local.set 3 (local.get 2)) + (local.get 0) + ) + (func (export "as-local.set/get-value_3_0") (param $$0 v128) (result v128) + (local v128 v128 v128 v128) + (local.set 0 (local.get $$0)) + (local.set 1 (local.get 0)) + (local.set 2 (local.get 1)) + (local.set 3 (local.get 2)) + (local.get 3) + ) + (func (export "as-local.tee-value") (result v128) + (local v128) + (local.tee 0 (v128.const i32x4 0 1 2 3)) + ) +)`); + +// ./test/core/simd/simd_const.wast:1023 +assert_return( + () => invoke($302, `as-local.set/get-value_0_0`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_const.wast:1024 +assert_return( + () => invoke($302, `as-local.set/get-value_0_1`, [i32x4([0x1, 0x1, 0x1, 0x1])]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_const.wast:1025 +assert_return( + () => invoke($302, `as-local.set/get-value_3_0`, [i32x4([0x2, 0x2, 0x2, 0x2])]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_const.wast:1026 +assert_return(() => invoke($302, `as-local.tee-value`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_const.wast:1031 +let $303 = instantiate(`(module (memory 1) + (global $$g0 (mut v128) (v128.const i32x4 0 1 2 3)) + (global $$g1 (mut v128) (v128.const i32x4 4 5 6 7)) + (global $$g2 (mut v128) (v128.const i32x4 8 9 10 11)) + (global $$g3 (mut v128) (v128.const i32x4 12 13 14 15)) + (global $$g4 (mut v128) (v128.const i32x4 16 17 18 19)) + + (func $$set_g0 (export "as-global.set_value_$$g0") (param $$0 v128) + (global.set $$g0 (local.get $$0)) + ) + (func $$set_g1_g2 (export "as-global.set_value_$$g1_$$g2") (param $$0 v128) (param $$1 v128) + (global.set $$g1 (local.get $$0)) + (global.set $$g2 (local.get $$1)) + ) + (func $$set_g0_g1_g2_g3 (export "as-global.set_value_$$g0_$$g1_$$g2_$$g3") (param $$0 v128) (param $$1 v128) (param $$2 v128) (param $$3 v128) + (call $$set_g0 (local.get $$0)) + (call $$set_g1_g2 (local.get $$1) (local.get $$2)) + (global.set $$g3 (local.get $$3)) + ) + (func (export "global.get_g0") (result v128) + (global.get $$g0) + ) + (func (export "global.get_g1") (result v128) + (global.get $$g1) + ) + (func (export "global.get_g2") (result v128) + (global.get $$g2) + ) + (func (export "global.get_g3") (result v128) + (global.get $$g3) + ) +)`); + +// ./test/core/simd/simd_const.wast:1064 +assert_return( + () => invoke($303, `as-global.set_value_$$g0_$$g1_$$g2_$$g3`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + i32x4([0x3, 0x3, 0x3, 0x3]), + i32x4([0x4, 0x4, 0x4, 0x4]), + ]), + [], +); + +// ./test/core/simd/simd_const.wast:1068 +assert_return(() => invoke($303, `global.get_g0`, []), [i32x4([0x1, 0x1, 0x1, 0x1])]); + +// ./test/core/simd/simd_const.wast:1069 +assert_return(() => invoke($303, `global.get_g1`, []), [i32x4([0x2, 0x2, 0x2, 0x2])]); + +// ./test/core/simd/simd_const.wast:1070 +assert_return(() => invoke($303, `global.get_g2`, []), [i32x4([0x3, 0x3, 0x3, 0x3])]); + +// ./test/core/simd/simd_const.wast:1071 +assert_return(() => invoke($303, `global.get_g3`, []), [i32x4([0x4, 0x4, 0x4, 0x4])]); + +// ./test/core/simd/simd_const.wast:1076 +let $304 = instantiate(`(module + (func (export "i32x4.test") (result v128) (return (v128.const i32x4 0x0bAdD00D 0x0bAdD00D 0x0bAdD00D 0x0bAdD00D))) + (func (export "i32x4.smax") (result v128) (return (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff))) + (func (export "i32x4.neg_smax") (result v128) (return (v128.const i32x4 -0x7fffffff -0x7fffffff -0x7fffffff -0x7fffffff))) + (func (export "i32x4.inc_smin") (result v128) (return (i32x4.add (v128.const i32x4 -0x80000000 -0x80000000 -0x80000000 -0x80000000) (v128.const i32x4 1 1 1 1)))) + (func (export "i32x4.neg_zero") (result v128) (return (v128.const i32x4 -0x0 -0x0 -0x0 -0x0))) + (func (export "i32x4.not_octal") (result v128) (return (v128.const i32x4 010 010 010 010))) + (func (export "i32x4.plus_sign") (result v128) (return (v128.const i32x4 +42 +42 +42 +42))) + + (func (export "i32x4-dec-sep1") (result v128) (v128.const i32x4 1_000_000 1_000_000 1_000_000 1_000_000)) + (func (export "i32x4-dec-sep2") (result v128) (v128.const i32x4 1_0_0_0 1_0_0_0 1_0_0_0 1_0_0_0)) + (func (export "i32x4-hex-sep1") (result v128) (v128.const i32x4 0xa_0f_00_99 0xa_0f_00_99 0xa_0f_00_99 0xa_0f_00_99)) + (func (export "i32x4-hex-sep2") (result v128) (v128.const i32x4 0x1_a_A_0_f 0x1_a_A_0_f 0x1_a_A_0_f 0x1_a_A_0_f)) + + (func (export "i64x2.test") (result v128) (return (v128.const i64x2 0x0bAdD00D0bAdD00D 0x0bAdD00D0bAdD00D))) + (func (export "i64x2.smax") (result v128) (return (v128.const i64x2 0x7fffffffffffffff 0x7fffffffffffffff))) + (func (export "i64x2.neg_smax") (result v128) (return (v128.const i64x2 -0x7fffffffffffffff -0x7fffffffffffffff))) + (func (export "i64x2.inc_smin") (result v128) (return (i64x2.add (v128.const i64x2 -0x8000000000000000 -0x8000000000000000) (v128.const i64x2 1 1)))) + (func (export "i64x2.neg_zero") (result v128) (return (v128.const i64x2 -0x0 -0x0))) + (func (export "i64x2.not_octal") (result v128) (return (v128.const i64x2 010010 010010))) + (func (export "i64x2.plus_sign") (result v128) (return (v128.const i64x2 +42 +42))) + + (func (export "i64x2-dec-sep1") (result v128) (v128.const i64x2 10_000_000_000_000 10_000_000_000_000)) + (func (export "i64x2-dec-sep2") (result v128) (v128.const i64x2 1_0_0_0_0_0_0_0 1_0_0_0_0_0_0_0)) + (func (export "i64x2-hex-sep1") (result v128) (v128.const i64x2 0xa_0f_00_99_0a_0f_00_99 0xa_0f_00_99_0a_0f_00_99)) + (func (export "i64x2-hex-sep2") (result v128) (v128.const i64x2 0x1_a_A_0_f_1_a_A_0_f 0x1_a_A_0_f_1_a_A_0_f)) +)`); + +// ./test/core/simd/simd_const.wast:1104 +assert_return(() => invoke($304, `i32x4.test`, []), [i32x4([0xbadd00d, 0xbadd00d, 0xbadd00d, 0xbadd00d])]); + +// ./test/core/simd/simd_const.wast:1105 +assert_return( + () => invoke($304, `i32x4.smax`, []), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_const.wast:1106 +assert_return( + () => invoke($304, `i32x4.neg_smax`, []), + [i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001])], +); + +// ./test/core/simd/simd_const.wast:1107 +assert_return( + () => invoke($304, `i32x4.inc_smin`, []), + [i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001])], +); + +// ./test/core/simd/simd_const.wast:1108 +assert_return(() => invoke($304, `i32x4.neg_zero`, []), [i32x4([0x0, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_const.wast:1109 +assert_return(() => invoke($304, `i32x4.not_octal`, []), [i32x4([0xa, 0xa, 0xa, 0xa])]); + +// ./test/core/simd/simd_const.wast:1110 +assert_return(() => invoke($304, `i32x4.plus_sign`, []), [i32x4([0x2a, 0x2a, 0x2a, 0x2a])]); + +// ./test/core/simd/simd_const.wast:1112 +assert_return(() => invoke($304, `i32x4-dec-sep1`, []), [i32x4([0xf4240, 0xf4240, 0xf4240, 0xf4240])]); + +// ./test/core/simd/simd_const.wast:1113 +assert_return(() => invoke($304, `i32x4-dec-sep2`, []), [i32x4([0x3e8, 0x3e8, 0x3e8, 0x3e8])]); + +// ./test/core/simd/simd_const.wast:1114 +assert_return( + () => invoke($304, `i32x4-hex-sep1`, []), + [i32x4([0xa0f0099, 0xa0f0099, 0xa0f0099, 0xa0f0099])], +); + +// ./test/core/simd/simd_const.wast:1115 +assert_return(() => invoke($304, `i32x4-hex-sep2`, []), [i32x4([0x1aa0f, 0x1aa0f, 0x1aa0f, 0x1aa0f])]); + +// ./test/core/simd/simd_const.wast:1117 +assert_return(() => invoke($304, `i64x2.test`, []), [i64x2([0xbadd00d0badd00dn, 0xbadd00d0badd00dn])]); + +// ./test/core/simd/simd_const.wast:1118 +assert_return(() => invoke($304, `i64x2.smax`, []), [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])]); + +// ./test/core/simd/simd_const.wast:1119 +assert_return( + () => invoke($304, `i64x2.neg_smax`, []), + [i64x2([0x8000000000000001n, 0x8000000000000001n])], +); + +// ./test/core/simd/simd_const.wast:1120 +assert_return( + () => invoke($304, `i64x2.inc_smin`, []), + [i64x2([0x8000000000000001n, 0x8000000000000001n])], +); + +// ./test/core/simd/simd_const.wast:1121 +assert_return(() => invoke($304, `i64x2.neg_zero`, []), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_const.wast:1122 +assert_return(() => invoke($304, `i64x2.not_octal`, []), [i64x2([0x271an, 0x271an])]); + +// ./test/core/simd/simd_const.wast:1123 +assert_return(() => invoke($304, `i64x2.plus_sign`, []), [i64x2([0x2an, 0x2an])]); + +// ./test/core/simd/simd_const.wast:1125 +assert_return(() => invoke($304, `i64x2-dec-sep1`, []), [i64x2([0x9184e72a000n, 0x9184e72a000n])]); + +// ./test/core/simd/simd_const.wast:1126 +assert_return(() => invoke($304, `i64x2-dec-sep2`, []), [i64x2([0x989680n, 0x989680n])]); + +// ./test/core/simd/simd_const.wast:1127 +assert_return(() => invoke($304, `i64x2-hex-sep1`, []), [i64x2([0xa0f00990a0f0099n, 0xa0f00990a0f0099n])]); + +// ./test/core/simd/simd_const.wast:1128 +assert_return(() => invoke($304, `i64x2-hex-sep2`, []), [i64x2([0x1aa0f1aa0fn, 0x1aa0f1aa0fn])]); + +// ./test/core/simd/simd_const.wast:1130 +assert_malformed( + () => instantiate(`(global v128 (v128.const i32x4 _100 _100 _100 _100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1134 +assert_malformed( + () => instantiate(`(global v128 (v128.const i32x4 +_100 +_100 +_100 +_100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1138 +assert_malformed( + () => instantiate(`(global v128 (v128.const i32x4 -_100 -_100 -_100 -_100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1142 +assert_malformed( + () => instantiate(`(global v128 (v128.const i32x4 99_ 99_ 99_ 99_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1146 +assert_malformed( + () => instantiate(`(global v128 (v128.const i32x4 1__000 1__000 1__000 1__000)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1150 +assert_malformed( + () => instantiate(`(global v128 (v128.const i32x4 _0x100 _0x100 _0x100 _0x100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1154 +assert_malformed( + () => instantiate(`(global v128 (v128.const i32x4 0_x100 0_x100 0_x100 0_x100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1158 +assert_malformed( + () => instantiate(`(global v128 (v128.const i32x4 0x_100 0x_100 0x_100 0x_100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1162 +assert_malformed( + () => instantiate(`(global v128 (v128.const i32x4 0x00_ 0x00_ 0x00_ 0x00_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1166 +assert_malformed( + () => instantiate(`(global v128 (v128.const i32x4 0xff__ffff 0xff__ffff 0xff__ffff 0xff__ffff)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1171 +assert_malformed( + () => instantiate(`(global v128 (v128.const i64x2 _100_100 _100_100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1175 +assert_malformed( + () => instantiate(`(global v128 (v128.const i64x2 +_100_100 +_100_100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1179 +assert_malformed( + () => instantiate(`(global v128 (v128.const i64x2 -_100_100 -_100_100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1183 +assert_malformed( + () => instantiate(`(global v128 (v128.const i64x2 99_99_ 99_99_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1187 +assert_malformed( + () => instantiate(`(global v128 (v128.const i64x2 1__000_000 1__000_000)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1191 +assert_malformed( + () => instantiate(`(global v128 (v128.const i64x2 _0x100000 _0x100000)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1195 +assert_malformed( + () => instantiate(`(global v128 (v128.const i64x2 0_x100000 0_x100000)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1199 +assert_malformed( + () => instantiate(`(global v128 (v128.const i64x2 0x_100000 0x_100000)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1203 +assert_malformed( + () => instantiate(`(global v128 (v128.const i64x2 0x00_ 0x00_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1207 +assert_malformed( + () => instantiate(`(global v128 (v128.const i64x2 0xff__ffff_ffff_ffff 0xff__ffff_ffff_ffff)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1214 +let $305 = instantiate(`(module + (func (export "f32-dec-sep1") (result v128) (v128.const f32x4 1_000_000 1_000_000 1_000_000 1_000_000)) + (func (export "f32-dec-sep2") (result v128) (v128.const f32x4 1_0_0_0 1_0_0_0 1_0_0_0 1_0_0_0)) + (func (export "f32-dec-sep3") (result v128) (v128.const f32x4 100_3.141_592 100_3.141_592 100_3.141_592 100_3.141_592)) + (func (export "f32-dec-sep4") (result v128) (v128.const f32x4 99e+1_3 99e+1_3 99e+1_3 99e+1_3)) + (func (export "f32-dec-sep5") (result v128) (v128.const f32x4 122_000.11_3_54E0_2_3 122_000.11_3_54E0_2_3 122_000.11_3_54E0_2_3 122_000.11_3_54E0_2_3)) + (func (export "f32-hex-sep1") (result v128) (v128.const f32x4 0xa_0f_00_99 0xa_0f_00_99 0xa_0f_00_99 0xa_0f_00_99)) + (func (export "f32-hex-sep2") (result v128) (v128.const f32x4 0x1_a_A_0_f 0x1_a_A_0_f 0x1_a_A_0_f 0x1_a_A_0_f)) + (func (export "f32-hex-sep3") (result v128) (v128.const f32x4 0xa0_ff.f141_a59a 0xa0_ff.f141_a59a 0xa0_ff.f141_a59a 0xa0_ff.f141_a59a)) + (func (export "f32-hex-sep4") (result v128) (v128.const f32x4 0xf0P+1_3 0xf0P+1_3 0xf0P+1_3 0xf0P+1_3)) + (func (export "f32-hex-sep5") (result v128) (v128.const f32x4 0x2a_f00a.1f_3_eep2_3 0x2a_f00a.1f_3_eep2_3 0x2a_f00a.1f_3_eep2_3 0x2a_f00a.1f_3_eep2_3)) + (func (export "f64-dec-sep1") (result v128) (v128.const f64x2 1_000_000 1_000_000)) + (func (export "f64-dec-sep2") (result v128) (v128.const f64x2 1_0_0_0 1_0_0_0)) + (func (export "f64-dec-sep3") (result v128) (v128.const f64x2 100_3.141_592 100_3.141_592)) + (func (export "f64-dec-sep4") (result v128) (v128.const f64x2 99e+1_3 99e+1_3)) + (func (export "f64-dec-sep5") (result v128) (v128.const f64x2 122_000.11_3_54E0_2_3 122_000.11_3_54E0_2_3)) + (func (export "f64-hex-sep1") (result v128) (v128.const f64x2 0xa_0f_00_99 0xa_0f_00_99)) + (func (export "f64-hex-sep2") (result v128) (v128.const f64x2 0x1_a_A_0_f 0x1_a_A_0_f)) + (func (export "f64-hex-sep3") (result v128) (v128.const f64x2 0xa0_ff.f141_a59a 0xa0_ff.f141_a59a)) + (func (export "f64-hex-sep4") (result v128) (v128.const f64x2 0xf0P+1_3 0xf0P+1_3)) + (func (export "f64-hex-sep5") (result v128) (v128.const f64x2 0x2a_f00a.1f_3_eep2_3 0x2a_f00a.1f_3_eep2_3)) +)`); + +// ./test/core/simd/simd_const.wast:1237 +assert_return( + () => invoke($305, `f32-dec-sep1`, []), + [ + new F32x4Pattern( + value("f32", 1000000), + value("f32", 1000000), + value("f32", 1000000), + value("f32", 1000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1238 +assert_return( + () => invoke($305, `f32-dec-sep2`, []), + [ + new F32x4Pattern( + value("f32", 1000), + value("f32", 1000), + value("f32", 1000), + value("f32", 1000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1239 +assert_return( + () => invoke($305, `f32-dec-sep3`, []), + [ + new F32x4Pattern( + value("f32", 1003.1416), + value("f32", 1003.1416), + value("f32", 1003.1416), + value("f32", 1003.1416), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1240 +assert_return( + () => invoke($305, `f32-dec-sep4`, []), + [ + new F32x4Pattern( + value("f32", 990000000000000), + value("f32", 990000000000000), + value("f32", 990000000000000), + value("f32", 990000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1241 +assert_return( + () => invoke($305, `f32-dec-sep5`, []), + [ + new F32x4Pattern( + value("f32", 12200012000000000000000000000), + value("f32", 12200012000000000000000000000), + value("f32", 12200012000000000000000000000), + value("f32", 12200012000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1242 +assert_return( + () => invoke($305, `f32-hex-sep1`, []), + [ + new F32x4Pattern( + value("f32", 168755360), + value("f32", 168755360), + value("f32", 168755360), + value("f32", 168755360), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1243 +assert_return( + () => invoke($305, `f32-hex-sep2`, []), + [ + new F32x4Pattern( + value("f32", 109071), + value("f32", 109071), + value("f32", 109071), + value("f32", 109071), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1244 +assert_return( + () => invoke($305, `f32-hex-sep3`, []), + [ + new F32x4Pattern( + value("f32", 41215.94), + value("f32", 41215.94), + value("f32", 41215.94), + value("f32", 41215.94), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1245 +assert_return( + () => invoke($305, `f32-hex-sep4`, []), + [ + new F32x4Pattern( + value("f32", 1966080), + value("f32", 1966080), + value("f32", 1966080), + value("f32", 1966080), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1246 +assert_return( + () => invoke($305, `f32-hex-sep5`, []), + [ + new F32x4Pattern( + value("f32", 23605224000000), + value("f32", 23605224000000), + value("f32", 23605224000000), + value("f32", 23605224000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1247 +assert_return( + () => invoke($305, `f64-dec-sep1`, []), + [new F64x2Pattern(value("f64", 1000000), value("f64", 1000000))], +); + +// ./test/core/simd/simd_const.wast:1248 +assert_return( + () => invoke($305, `f64-dec-sep2`, []), + [new F64x2Pattern(value("f64", 1000), value("f64", 1000))], +); + +// ./test/core/simd/simd_const.wast:1249 +assert_return( + () => invoke($305, `f64-dec-sep3`, []), + [new F64x2Pattern(value("f64", 1003.141592), value("f64", 1003.141592))], +); + +// ./test/core/simd/simd_const.wast:1250 +assert_return( + () => invoke($305, `f64-dec-sep4`, []), + [ + new F64x2Pattern(value("f64", 990000000000000), value("f64", 990000000000000)), + ], +); + +// ./test/core/simd/simd_const.wast:1251 +assert_return( + () => invoke($305, `f64-dec-sep5`, []), + [ + new F64x2Pattern( + value("f64", 12200011354000000000000000000), + value("f64", 12200011354000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1252 +assert_return( + () => invoke($305, `f64-hex-sep1`, []), + [new F64x2Pattern(value("f64", 168755353), value("f64", 168755353))], +); + +// ./test/core/simd/simd_const.wast:1253 +assert_return( + () => invoke($305, `f64-hex-sep2`, []), + [new F64x2Pattern(value("f64", 109071), value("f64", 109071))], +); + +// ./test/core/simd/simd_const.wast:1254 +assert_return( + () => invoke($305, `f64-hex-sep3`, []), + [ + new F64x2Pattern( + value("f64", 41215.94240794191), + value("f64", 41215.94240794191), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1255 +assert_return( + () => invoke($305, `f64-hex-sep4`, []), + [new F64x2Pattern(value("f64", 1966080), value("f64", 1966080))], +); + +// ./test/core/simd/simd_const.wast:1256 +assert_return( + () => invoke($305, `f64-hex-sep5`, []), + [new F64x2Pattern(value("f64", 23605225168752), value("f64", 23605225168752))], +); + +// ./test/core/simd/simd_const.wast:1258 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 _100 _100 _100 _100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1262 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 +_100 +_100 +_100 +_100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1266 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 -_100 -_100 -_100 -_100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1270 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 99_ 99_ 99_ 99_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1274 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 1__000 1__000 1__000 1__000)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1278 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 _1.0 _1.0 _1.0 _1.0)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1282 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 1.0_ 1.0_ 1.0_ 1.0_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1286 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 1_.0 1_.0 1_.0 1_.0)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1290 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 1._0 1._0 1._0 1._0)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1294 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 _1e1 _1e1 _1e1 _1e1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1298 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 1e1_ 1e1_ 1e1_ 1e1_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1302 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 1_e1 1_e1 1_e1 1_e1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1306 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 1e_1 1e_1 1e_1 1e_1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1310 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 _1.0e1 _1.0e1 _1.0e1 _1.0e1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1314 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 1.0e1_ 1.0e1_ 1.0e1_ 1.0e1_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1318 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 1.0_e1 1.0_e1 1.0_e1 1.0_e1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1322 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 1.0e_1 1.0e_1 1.0e_1 1.0e_1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1326 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 1.0e+_1 1.0e+_1 1.0e+_1 1.0e+_1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1330 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 1.0e_+1 1.0e_+1 1.0e_+1 1.0e_+1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1334 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 _0x100 _0x100 _0x100 _0x100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1338 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0_x100 0_x100 0_x100 0_x100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1342 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x_100 0x_100 0x_100 0x_100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1346 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x00_ 0x00_ 0x00_ 0x00_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1350 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0xff__ffff 0xff__ffff 0xff__ffff 0xff__ffff)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1354 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x_1.0 0x_1.0 0x_1.0 0x_1.0)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1358 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x1.0_ 0x1.0_ 0x1.0_ 0x1.0_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1362 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x1_.0 0x1_.0 0x1_.0 0x1_.0)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1366 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x1._0 0x1._0 0x1._0 0x1._0)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1370 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x_1p1 0x_1p1 0x_1p1 0x_1p1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1374 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x1p1_ 0x1p1_ 0x1p1_ 0x1p1_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1378 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x1_p1 0x1_p1 0x1_p1 0x1_p1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1382 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x1p_1 0x1p_1 0x1p_1 0x1p_1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1386 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x_1.0p1 0x_1.0p1 0x_1.0p1 0x_1.0p1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1390 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x1.0p1_ 0x1.0p1_ 0x1.0p1_ 0x1.0p1_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1394 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x1.0_p1 0x1.0_p1 0x1.0_p1 0x1.0_p1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1398 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x1.0p_1 0x1.0p_1 0x1.0p_1 0x1.0p_1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1402 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x1.0p+_1 0x1.0p+_1 0x1.0p+_1 0x1.0p+_1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1406 +assert_malformed( + () => instantiate(`(global v128 (v128.const f32x4 0x1.0p_+1 0x1.0p_+1 0x1.0p_+1 0x1.0p_+1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1411 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 _100 _100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1415 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 +_100 +_100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1419 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 -_100 -_100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1423 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 99_ 99_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1427 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 1__000 1__000)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1431 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 _1.0 _1.0)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1435 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 1.0_ 1.0_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1439 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 1_.0 1_.0)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1443 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 1._0 1._0)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1447 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 _1e1 _1e1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1451 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 1e1_ 1e1_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1455 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 1_e1 1_e1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1459 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 1e_1 1e_1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1463 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 _1.0e1 _1.0e1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1467 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 1.0e1_ 1.0e1_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1471 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 1.0_e1 1.0_e1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1475 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 1.0e_1 1.0e_1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1479 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 1.0e+_1 1.0e+_1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1483 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 1.0e_+1 1.0e_+1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1487 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 _0x100 _0x100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1491 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0_x100 0_x100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1495 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x_100 0x_100)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1499 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x00_ 0x00_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1503 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0xff__ffff 0xff__ffff)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1507 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x_1.0 0x_1.0)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1511 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x1.0_ 0x1.0_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1515 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x1_.0 0x1_.0)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1519 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x1._0 0x1._0)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1523 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x_1p1 0x_1p1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1527 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x1p1_ 0x1p1_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1531 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x1_p1 0x1_p1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1535 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x1p_1 0x1p_1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1539 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x_1.0p1 0x_1.0p1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1543 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x1.0p1_ 0x1.0p1_)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1547 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x1.0_p1 0x1.0_p1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1551 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x1.0p_1 0x1.0p_1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1555 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x1.0p+_1 0x1.0p+_1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1559 +assert_malformed( + () => instantiate(`(global v128 (v128.const f64x2 0x1.0p_+1 0x1.0p_+1)) `), + `unknown operator`, +); + +// ./test/core/simd/simd_const.wast:1566 +let $306 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\01\\05\\01" ;; type section + "\\60\\00\\01\\7b" ;; type 0 (func) + "\\03\\02\\01\\00" ;; func section + "\\07\\0f\\01\\0b" ;; export section + "\\70\\61\\72\\73\\65\\5f\\69\\38\\78\\31\\36\\00\\00" ;; export name (parse_i8x16) + "\\0a\\16\\01" ;; code section + "\\14\\00\\fd\\0c" ;; func body + "\\00\\00\\00\\00" ;; data lane 0~3 (0, 0, 0, 0) + "\\80\\80\\80\\80" ;; data lane 4~7 (-128, -128, -128, -128) + "\\ff\\ff\\ff\\ff" ;; data lane 8~11 (0xff, 0xff, 0xff, 0xff) + "\\ff\\ff\\ff\\ff" ;; data lane 12~15 (255, 255, 255, 255) + "\\0b" ;; end +)`); + +// ./test/core/simd/simd_const.wast:1581 +assert_return( + () => invoke($306, `parse_i8x16`, []), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x80, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_const.wast:1583 +let $307 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\01\\05\\01" ;; type section + "\\60\\00\\01\\7b" ;; type 0 (func) + "\\03\\02\\01\\00" ;; func section + "\\07\\0f\\01\\0b" ;; export section + "\\70\\61\\72\\73\\65\\5f\\69\\31\\36\\78\\38\\00\\00" ;; export name (parse_i16x8) + "\\0a\\16\\01" ;; code section + "\\14\\00\\fd\\0c" ;; func body + "\\00\\00\\00\\00" ;; data lane 0, 1 (0, 0) + "\\00\\80\\00\\80" ;; data lane 2, 3 (-32768, -32768) + "\\ff\\ff\\ff\\ff" ;; data lane 4, 5 (65535, 65535) + "\\ff\\ff\\ff\\ff" ;; data lane 6, 7 (0xffff, 0xffff) + "\\0b" ;; end +)`); + +// ./test/core/simd/simd_const.wast:1598 +assert_return( + () => invoke($307, `parse_i16x8`, []), + [i16x8([0x0, 0x0, 0x8000, 0x8000, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_const.wast:1600 +let $308 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\01\\05\\01" ;; type section + "\\60\\00\\01\\7b" ;; type 0 (func) + "\\03\\02\\01\\00" ;; func section + "\\07\\0f\\01\\0b" ;; export section + "\\70\\61\\72\\73\\65\\5f\\69\\33\\32\\78\\34\\00\\00" ;; export name (parse_i32x4) + "\\0a\\16\\01" ;; code section + "\\14\\00\\fd\\0c" ;; func body + "\\d1\\ff\\ff\\ff" ;; data lane 0 (4294967249) + "\\d1\\ff\\ff\\ff" ;; data lane 1 (4294967249) + "\\d1\\ff\\ff\\ff" ;; data lane 2 (4294967249) + "\\d1\\ff\\ff\\ff" ;; data lane 3 (4294967249) + "\\0b" ;; end +)`); + +// ./test/core/simd/simd_const.wast:1615 +assert_return( + () => invoke($308, `parse_i32x4`, []), + [i32x4([0xffffffd1, 0xffffffd1, 0xffffffd1, 0xffffffd1])], +); + +// ./test/core/simd/simd_const.wast:1617 +let $309 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\01\\05\\01" ;; type section + "\\60\\00\\01\\7b" ;; type 0 (func) + "\\03\\02\\01\\00" ;; func section + "\\07\\0f\\01\\0b" ;; export section + "\\70\\61\\72\\73\\65\\5f\\69\\36\\34\\78\\32\\00\\00" ;; export name (parse_i64x2) + "\\0a\\16\\01" ;; code section + "\\14\\00\\fd\\0c" ;; func body + "\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\7f" ;; data lane 0 (9223372036854775807) + "\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\7f" ;; data lane 1 (9223372036854775807) + "\\0b" ;; end +)`); + +// ./test/core/simd/simd_const.wast:1630 +assert_return(() => invoke($309, `parse_i64x2`, []), [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])]); + +// ./test/core/simd/simd_const.wast:1634 +let $310 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\01\\05\\01" ;; type section + "\\60\\00\\01\\7b" ;; type 0 (func) + "\\03\\02\\01\\00" ;; func section + "\\07\\0f\\01\\0b" ;; export section + "\\70\\61\\72\\73\\65\\5f\\66\\33\\32\\78\\34\\00\\00" ;; export name (parse_f32x4) + "\\0a\\16\\01" ;; code section + "\\14\\00\\fd\\0c" ;; func body + "\\00\\00\\80\\4f" ;; data lane 0 (4294967249) + "\\00\\00\\80\\4f" ;; data lane 1 (4294967249) + "\\00\\00\\80\\4f" ;; data lane 2 (4294967249) + "\\00\\00\\80\\4f" ;; data lane 3 (4294967249) + "\\0b" ;; end +)`); + +// ./test/core/simd/simd_const.wast:1649 +assert_return( + () => invoke($310, `parse_f32x4`, []), + [ + new F32x4Pattern( + value("f32", 4294967300), + value("f32", 4294967300), + value("f32", 4294967300), + value("f32", 4294967300), + ), + ], +); + +// ./test/core/simd/simd_const.wast:1651 +let $311 = instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\01\\05\\01" ;; type section + "\\60\\00\\01\\7b" ;; type 0 (func) + "\\03\\02\\01\\00" ;; func section + "\\07\\0f\\01\\0b" ;; export section + "\\70\\61\\72\\73\\65\\5f\\66\\36\\34\\78\\32\\00\\00" ;; export name (parse_f64x2) + "\\0a\\16\\01" ;; code section + "\\14\\00\\fd\\0c" ;; func body + "\\ff\\ff\\ff\\ff\\ff\\ff\\ef\\7f" ;; data lane 0 (0x1.fffffffffffffp+1023) + "\\ff\\ff\\ff\\ff\\ff\\ff\\ef\\7f" ;; data lane 1 (0x1.fffffffffffffp+1023) + "\\0b" ;; end +)`); + +// ./test/core/simd/simd_const.wast:1664 +assert_return( + () => invoke($311, `parse_f64x2`, []), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_conversions.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_conversions.wast.js new file mode 100644 index 0000000000..abb9d75af3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_conversions.wast.js @@ -0,0 +1,3341 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_conversions.wast + +// ./test/core/simd/simd_conversions.wast:3 +let $0 = instantiate(`(module + ;; Integer to floating point + (func (export "f32x4.convert_i32x4_s") (param v128) (result v128) + (f32x4.convert_i32x4_s (local.get 0))) + (func (export "f32x4.convert_i32x4_u") (param v128) (result v128) + (f32x4.convert_i32x4_u (local.get 0))) + + (func (export "f64x2.convert_low_i32x4_s") (param v128) (result v128) + (f64x2.convert_low_i32x4_s (local.get 0))) + (func (export "f64x2.convert_low_i32x4_u") (param v128) (result v128) + (f64x2.convert_low_i32x4_u (local.get 0))) + + ;; Integer to integer narrowing + (func (export "i8x16.narrow_i16x8_s") (param v128 v128) (result v128) + (i8x16.narrow_i16x8_s (local.get 0) (local.get 1))) + (func (export "i8x16.narrow_i16x8_u") (param v128 v128) (result v128) + (i8x16.narrow_i16x8_u (local.get 0) (local.get 1))) + (func (export "i16x8.narrow_i32x4_s") (param v128 v128) (result v128) + (i16x8.narrow_i32x4_s (local.get 0) (local.get 1))) + (func (export "i16x8.narrow_i32x4_u") (param v128 v128) (result v128) + (i16x8.narrow_i32x4_u (local.get 0)(local.get 1))) + + ;; Float to float promote/demote + (func (export "f64x2.promote_low_f32x4") (param v128) (result v128) + (f64x2.promote_low_f32x4 (local.get 0))) + (func (export "f32x4.demote_f64x2_zero") (param v128) (result v128) + (f32x4.demote_f64x2_zero (local.get 0))) +)`); + +// ./test/core/simd/simd_conversions.wast:35 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [f32x4([0, 0, 0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_conversions.wast:37 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [f32x4([-0, -0, -0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_conversions.wast:39 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000001401298464324817), + value("f64", 0.000000000000000000000000000000000000000000001401298464324817), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:41 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000001401298464324817), + value("f64", -0.000000000000000000000000000000000000000000001401298464324817), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:43 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [f32x4([1, 1, 1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_conversions.wast:45 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [f32x4([-1, -1, -1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_conversions.wast:47 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -340282346638528860000000000000000000000), + value("f64", -340282346638528860000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:49 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 340282346638528860000000000000000000000), + value("f64", 340282346638528860000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:52 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [ + f32x4([ + 0.0000000000000000000000000000000000015046328, + 0.0000000000000000000000000000000000015046328, + 0.0000000000000000000000000000000000015046328, + 0.0000000000000000000000000000000000015046328, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000001504632769052528), + value("f64", 0.000000000000000000000000000000000001504632769052528), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:55 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [ + f32x4([ + 66382537000000000000000000000000000000, + 66382537000000000000000000000000000000, + 66382537000000000000000000000000000000, + 66382537000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 66382536710104395000000000000000000000), + value("f64", 66382536710104395000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:57 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_conversions.wast:59 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_conversions.wast:61 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_conversions.wast:63 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_conversions.wast:65 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_conversions.wast:67 +assert_return( + () => invoke($0, `f64x2.promote_low_f32x4`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_conversions.wast:73 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [f64x2([0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:75 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [f64x2([-0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:77 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:79 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:81 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [f64x2([1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:83 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [f64x2([-1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:85 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 0.000000000000000000000000000000000000011754942807573643, + 0.000000000000000000000000000000000000011754942807573643, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:87 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + -0.000000000000000000000000000000000000011754942807573643, + -0.000000000000000000000000000000000000011754942807573643, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:89 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 0.000000000000000000000000000000000000011754942807573642, + 0.000000000000000000000000000000000000011754942807573642, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:91 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + -0.000000000000000000000000000000000000011754942807573642, + -0.000000000000000000000000000000000000011754942807573642, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:93 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 0.000000000000000000000000000000000000000000001401298464324817, + 0.000000000000000000000000000000000000000000001401298464324817, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:95 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + -0.000000000000000000000000000000000000000000001401298464324817, + -0.000000000000000000000000000000000000000000001401298464324817, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:97 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 340282336497324060000000000000000000000, + 340282336497324060000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282330000000000000000000000000000000), + value("f32", 340282330000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:99 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + -340282336497324060000000000000000000000, + -340282336497324060000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282330000000000000000000000000000000), + value("f32", -340282330000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:101 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 340282336497324100000000000000000000000, + 340282336497324100000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:103 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + -340282336497324100000000000000000000000, + -340282336497324100000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:105 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 340282346638528860000000000000000000000, + 340282346638528860000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:107 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + -340282346638528860000000000000000000000, + -340282346638528860000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:109 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 340282356779733620000000000000000000000, + 340282356779733620000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:111 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + -340282356779733620000000000000000000000, + -340282356779733620000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:113 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 340282356779733660000000000000000000000, + 340282356779733660000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:115 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + -340282356779733660000000000000000000000, + -340282356779733660000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:117 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 0.000000000000000000000000000000000001504632769052528, + 0.000000000000000000000000000000000001504632769052528, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.0000000000000000000000000000000000015046328), + value("f32", 0.0000000000000000000000000000000000015046328), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:119 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([66382536710104395000000000000000000000, 66382536710104395000000000000000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 66382537000000000000000000000000000000), + value("f32", 66382537000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:121 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [f64x2([Infinity, Infinity])]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:123 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [f64x2([-Infinity, -Infinity])]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:125 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([1.0000000000000002, 1.0000000000000002]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:127 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([0.9999999999999999, 0.9999999999999999]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:129 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([1.0000000596046448, 1.0000000596046448]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:131 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([1.000000059604645, 1.000000059604645]), + ]), + [ + new F32x4Pattern( + value("f32", 1.0000001), + value("f32", 1.0000001), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:133 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([1.000000178813934, 1.000000178813934]), + ]), + [ + new F32x4Pattern( + value("f32", 1.0000001), + value("f32", 1.0000001), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:135 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([1.0000001788139343, 1.0000001788139343]), + ]), + [ + new F32x4Pattern( + value("f32", 1.0000002), + value("f32", 1.0000002), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:137 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([1.0000002980232239, 1.0000002980232239]), + ]), + [ + new F32x4Pattern( + value("f32", 1.0000002), + value("f32", 1.0000002), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:139 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [f64x2([16777217, 16777217])]), + [ + new F32x4Pattern( + value("f32", 16777216), + value("f32", 16777216), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:141 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([16777217.000000004, 16777217.000000004]), + ]), + [ + new F32x4Pattern( + value("f32", 16777218), + value("f32", 16777218), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:143 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([16777218.999999996, 16777218.999999996]), + ]), + [ + new F32x4Pattern( + value("f32", 16777218), + value("f32", 16777218), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:145 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [f64x2([16777219, 16777219])]), + [ + new F32x4Pattern( + value("f32", 16777220), + value("f32", 16777220), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:147 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([424258443299142700000000000000000, 424258443299142700000000000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 424258450000000000000000000000000), + value("f32", 424258450000000000000000000000000), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:149 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 0.0000000000000000000000000000000001569262107843488, + 0.0000000000000000000000000000000001569262107843488, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000000000000000000000000000000015692621), + value("f32", 0.00000000000000000000000000000000015692621), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:151 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 0.000000000000000000000000000000000000010551773688605172, + 0.000000000000000000000000000000000000010551773688605172, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000010551773), + value("f32", 0.000000000000000000000000000000000000010551773), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:153 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([-2.8238128484141933, -2.8238128484141933]), + ]), + [ + new F32x4Pattern( + value("f32", -2.823813), + value("f32", -2.823813), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:155 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([-9063376370095757000000000000000000, -9063376370095757000000000000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -9063376000000000000000000000000000), + value("f32", -9063376000000000000000000000000000), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:157 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:159 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:161 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:163 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:165 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:167 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:169 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 0.0000000000000000000000000000000000000000000007006492321624085, + 0.0000000000000000000000000000000000000000000007006492321624085, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:171 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + -0.0000000000000000000000000000000000000000000007006492321624085, + -0.0000000000000000000000000000000000000000000007006492321624085, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:173 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + 0.0000000000000000000000000000000000000000000007006492321624087, + 0.0000000000000000000000000000000000000000000007006492321624087, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:175 +assert_return( + () => invoke($0, `f32x4.demote_f64x2_zero`, [ + f64x2([ + -0.0000000000000000000000000000000000000000000007006492321624087, + -0.0000000000000000000000000000000000000000000007006492321624087, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:182 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:184 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [i32x4([0x1, 0x1, 0x1, 0x1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:186 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:188 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [ + new F32x4Pattern( + value("f32", 2147483600), + value("f32", 2147483600), + value("f32", 2147483600), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:190 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [ + new F32x4Pattern( + value("f32", -2147483600), + value("f32", -2147483600), + value("f32", -2147483600), + value("f32", -2147483600), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:192 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [ + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + ]), + [ + new F32x4Pattern( + value("f32", 1234568000), + value("f32", 1234568000), + value("f32", 1234568000), + value("f32", 1234568000), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:194 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [ + i32x4([0x75bcd18, 0x75bcd18, 0x75bcd18, 0x75bcd18]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:196 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [ + i32x4([0x12345680, 0x12345680, 0x12345680, 0x12345680]), + ]), + [ + new F32x4Pattern( + value("f32", 305419900), + value("f32", 305419900), + value("f32", 305419900), + value("f32", 305419900), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:200 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [ + i32x4([0x1000001, 0x1000001, 0x1000001, 0x1000001]), + ]), + [ + new F32x4Pattern( + value("f32", 16777216), + value("f32", 16777216), + value("f32", 16777216), + value("f32", 16777216), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:202 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [ + i32x4([0xfeffffff, 0xfeffffff, 0xfeffffff, 0xfeffffff]), + ]), + [ + new F32x4Pattern( + value("f32", -16777216), + value("f32", -16777216), + value("f32", -16777216), + value("f32", -16777216), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:204 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [ + i32x4([0x1000003, 0x1000003, 0x1000003, 0x1000003]), + ]), + [ + new F32x4Pattern( + value("f32", 16777220), + value("f32", 16777220), + value("f32", 16777220), + value("f32", 16777220), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:206 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [ + i32x4([0xfefffffd, 0xfefffffd, 0xfefffffd, 0xfefffffd]), + ]), + [ + new F32x4Pattern( + value("f32", -16777220), + value("f32", -16777220), + value("f32", -16777220), + value("f32", -16777220), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:208 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_s`, [ + i32x4([0x0, 0xffffffff, 0x7fffffff, 0x80000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", -1), + value("f32", 2147483600), + value("f32", -2147483600), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:213 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:215 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [i32x4([0x1, 0x1, 0x1, 0x1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:217 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + new F32x4Pattern( + value("f32", 4294967300), + value("f32", 4294967300), + value("f32", 4294967300), + value("f32", 4294967300), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:219 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [ + new F32x4Pattern( + value("f32", 2147483600), + value("f32", 2147483600), + value("f32", 2147483600), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:221 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [ + new F32x4Pattern( + value("f32", 2147483600), + value("f32", 2147483600), + value("f32", 2147483600), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:223 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + ]), + [ + new F32x4Pattern( + value("f32", 305419900), + value("f32", 305419900), + value("f32", 305419900), + value("f32", 305419900), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:225 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0x80000080, 0x80000080, 0x80000080, 0x80000080]), + ]), + [ + new F32x4Pattern( + value("f32", 2147483600), + value("f32", 2147483600), + value("f32", 2147483600), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:227 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0x80000081, 0x80000081, 0x80000081, 0x80000081]), + ]), + [ + new F32x4Pattern( + value("f32", 2147484000), + value("f32", 2147484000), + value("f32", 2147484000), + value("f32", 2147484000), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:229 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0x80000082, 0x80000082, 0x80000082, 0x80000082]), + ]), + [ + new F32x4Pattern( + value("f32", 2147484000), + value("f32", 2147484000), + value("f32", 2147484000), + value("f32", 2147484000), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:231 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0xfffffe80, 0xfffffe80, 0xfffffe80, 0xfffffe80]), + ]), + [ + new F32x4Pattern( + value("f32", 4294966800), + value("f32", 4294966800), + value("f32", 4294966800), + value("f32", 4294966800), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:233 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0xfffffe81, 0xfffffe81, 0xfffffe81, 0xfffffe81]), + ]), + [ + new F32x4Pattern( + value("f32", 4294967000), + value("f32", 4294967000), + value("f32", 4294967000), + value("f32", 4294967000), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:235 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0xfffffe82, 0xfffffe82, 0xfffffe82, 0xfffffe82]), + ]), + [ + new F32x4Pattern( + value("f32", 4294967000), + value("f32", 4294967000), + value("f32", 4294967000), + value("f32", 4294967000), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:237 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0x75bcd18, 0x75bcd18, 0x75bcd18, 0x75bcd18]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:239 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + ]), + [ + new F32x4Pattern( + value("f32", 2427178500), + value("f32", 2427178500), + value("f32", 2427178500), + value("f32", 2427178500), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:243 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0x1000001, 0x1000001, 0x1000001, 0x1000001]), + ]), + [ + new F32x4Pattern( + value("f32", 16777216), + value("f32", 16777216), + value("f32", 16777216), + value("f32", 16777216), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:245 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0x1000003, 0x1000003, 0x1000003, 0x1000003]), + ]), + [ + new F32x4Pattern( + value("f32", 16777220), + value("f32", 16777220), + value("f32", 16777220), + value("f32", 16777220), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:247 +assert_return( + () => invoke($0, `f32x4.convert_i32x4_u`, [ + i32x4([0x0, 0xffffffff, 0x7fffffff, 0x80000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 4294967300), + value("f32", 2147483600), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:253 +assert_return( + () => invoke($0, `f64x2.convert_low_i32x4_s`, [i32x4([0x1, 0x1, 0x0, 0x0])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_conversions.wast:255 +assert_return( + () => invoke($0, `f64x2.convert_low_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_conversions.wast:257 +assert_return( + () => invoke($0, `f64x2.convert_low_i32x4_s`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_conversions.wast:259 +assert_return( + () => invoke($0, `f64x2.convert_low_i32x4_s`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x0, 0x0]), + ]), + [new F64x2Pattern(value("f64", 2147483647), value("f64", 2147483647))], +); + +// ./test/core/simd/simd_conversions.wast:261 +assert_return( + () => invoke($0, `f64x2.convert_low_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x0, 0x0]), + ]), + [new F64x2Pattern(value("f64", -2147483648), value("f64", -2147483648))], +); + +// ./test/core/simd/simd_conversions.wast:263 +assert_return( + () => invoke($0, `f64x2.convert_low_i32x4_s`, [ + i32x4([0x3ade68b1, 0x3ade68b1, 0x0, 0x0]), + ]), + [new F64x2Pattern(value("f64", 987654321), value("f64", 987654321))], +); + +// ./test/core/simd/simd_conversions.wast:269 +assert_return( + () => invoke($0, `f64x2.convert_low_i32x4_u`, [i32x4([0x1, 0x1, 0x0, 0x0])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_conversions.wast:271 +assert_return( + () => invoke($0, `f64x2.convert_low_i32x4_u`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_conversions.wast:273 +assert_return( + () => invoke($0, `f64x2.convert_low_i32x4_u`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x0, 0x0]), + ]), + [new F64x2Pattern(value("f64", 2147483647), value("f64", 2147483647))], +); + +// ./test/core/simd/simd_conversions.wast:275 +assert_return( + () => invoke($0, `f64x2.convert_low_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x0, 0x0]), + ]), + [new F64x2Pattern(value("f64", 2147483648), value("f64", 2147483648))], +); + +// ./test/core/simd/simd_conversions.wast:277 +assert_return( + () => invoke($0, `f64x2.convert_low_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [new F64x2Pattern(value("f64", 4294967295), value("f64", 4294967295))], +); + +// ./test/core/simd/simd_conversions.wast:283 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_conversions.wast:286 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_conversions.wast:289 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_conversions.wast:292 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:295 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_conversions.wast:298 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:301 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_conversions.wast:304 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:307 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ], +); + +// ./test/core/simd/simd_conversions.wast:310 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:313 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:316 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:319 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:322 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:325 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:328 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81]), + i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_conversions.wast:331 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80]), + i16x8([0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_conversions.wast:334 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80]), + i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_conversions.wast:337 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f]), + i16x8([0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_conversions.wast:340 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f]), + i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_conversions.wast:343 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80]), + i16x8([0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_conversions.wast:346 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80]), + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:349 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:352 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f]), + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:355 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80]), + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:358 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f]), + i16x8([0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:361 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:364 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_conversions.wast:367 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_s`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:372 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_conversions.wast:375 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_conversions.wast:378 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_conversions.wast:381 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_conversions.wast:384 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_conversions.wast:387 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_conversions.wast:390 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_conversions.wast:393 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:396 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ], +); + +// ./test/core/simd/simd_conversions.wast:399 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:402 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_conversions.wast:405 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_conversions.wast:408 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_conversions.wast:411 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:414 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_conversions.wast:417 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:420 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100]), + i16x8([0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:423 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:426 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100]), + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:429 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:432 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:435 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:438 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:441 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_conversions.wast:444 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5]), + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:447 +assert_return( + () => invoke($0, `i8x16.narrow_i16x8_u`, [ + i16x8([0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab]), + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_conversions.wast:452 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:455 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_conversions.wast:458 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:461 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:464 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:467 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:470 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_conversions.wast:473 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:476 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i32x4([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_conversions.wast:479 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:482 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x8000, 0x8000, 0x8000, 0x8000]), + i32x4([0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:485 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i32x4([0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:488 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x8000, 0x8000, 0x8000, 0x8000]), + i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:491 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i32x4([0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:494 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:497 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffff8001, 0xffff8001, 0xffff8001, 0xffff8001]), + i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_conversions.wast:500 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000]), + i32x4([0xffff8001, 0xffff8001, 0xffff8001, 0xffff8001]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_conversions.wast:503 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000]), + i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_conversions.wast:506 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffff7fff, 0xffff7fff, 0xffff7fff, 0xffff7fff]), + i32x4([0xffff7fff, 0xffff7fff, 0xffff7fff, 0xffff7fff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_conversions.wast:509 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffff7fff, 0xffff7fff, 0xffff7fff, 0xffff7fff]), + i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_conversions.wast:512 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000]), + i32x4([0xffff7fff, 0xffff7fff, 0xffff7fff, 0xffff7fff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_conversions.wast:515 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000]), + i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:518 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000]), + i32x4([0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:521 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffff7fff, 0xffff7fff, 0xffff7fff, 0xffff7fff]), + i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:524 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000]), + i32x4([0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:527 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xffff7fff, 0xffff7fff, 0xffff7fff, 0xffff7fff]), + i32x4([0x10000, 0x10000, 0x10000, 0x10000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:530 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0xf8000000, 0xf8000000, 0xf8000000, 0xf8000000]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:533 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:536 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_s`, [ + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:541 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:544 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_conversions.wast:547 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:550 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:553 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:556 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:559 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_conversions.wast:562 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0xfffe, 0xfffe, 0xfffe, 0xfffe]), + i32x4([0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:565 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xfffe, 0xfffe, 0xfffe, 0xfffe]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_conversions.wast:568 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:571 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0x10000, 0x10000, 0x10000, 0x10000]), + i32x4([0x10000, 0x10000, 0x10000, 0x10000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:574 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0x10000, 0x10000, 0x10000, 0x10000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:577 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0x10000, 0x10000, 0x10000, 0x10000]), + i32x4([0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:580 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:583 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x10000, 0x10000, 0x10000, 0x10000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:586 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:589 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x10000, 0x10000, 0x10000, 0x10000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:592 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:595 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:598 +assert_return( + () => invoke($0, `i16x8.narrow_i32x4_u`, [ + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_conversions.wast:605 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.trunc_sat_f32x4 (v128.const f32x4 0.0 0.0 0.0 0.0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:608 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.trunc_s_sat_f32x4 (v128.const f32x4 -2.0 -1.0 1.0 2.0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:611 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.trunc_u_sat_f32x4 (v128.const f32x4 -2.0 -1.0 1.0 2.0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:614 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.convert_f32x4 (v128.const f32x4 -1 0 1 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:617 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.convert_s_f32x4 (v128.const f32x4 -1 0 1 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:620 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.convert_u_f32x4 (v128.const f32x4 -1 0 1 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:624 +assert_malformed( + () => instantiate(`(func (result v128) (i64x2.trunc_sat_f64x2_s (v128.const f64x2 0.0 0.0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:627 +assert_malformed( + () => instantiate(`(func (result v128) (i64x2.trunc_sat_f64x2_u (v128.const f64x2 -2.0 -1.0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:630 +assert_malformed( + () => instantiate(`(func (result v128) (f64x2.convert_i64x2_s (v128.const i64x2 1 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:633 +assert_malformed( + () => instantiate(`(func (result v128) (f64x2.convert_i64x2_u (v128.const i64x2 1 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:637 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.narrow_i16x8 (v128.const i16x8 0 0 0 0 0 0 0 0) (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:640 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.narrow_i8x16 (v128.const i16x8 0 0 0 0 0 0 0 0) (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:643 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.narrow_i8x16_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:646 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.narrow_i8x16_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:649 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.narrow_i32x4 (v128.const i16x8 0 0 0 0 0 0 0 0) (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:652 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.narrow_i16x8 (v128.const i16x8 0 0 0 0 0 0 0 0) (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:655 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.narrow_i16x8_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:658 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.narrow_i16x8_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:662 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.extend_low_i8x16 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:665 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.extend_low_i16x8_s (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:668 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.extend_low_i16x8_u (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:671 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.extend_high_i8x16 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:674 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.extend_high_i16x8_s (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:677 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.extend_high_i16x8_u (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:680 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.extend_low_i16x8 (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:683 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.extend_low_i32x4_s (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:686 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.extend_low_i32x4_u (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:689 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.extend_high_i16x8 (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:692 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.extend_high_i32x4_s (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:695 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.extend_high_i32x4_u (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_conversions.wast:702 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.convert_i32x4_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:703 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.convert_i32x4_s (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:704 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.convert_i32x4_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:705 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.convert_i32x4_u (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:707 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.narrow_i16x8_s (i32.const 0) (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:708 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.narrow_i16x8_u (i32.const 0) (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:709 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.narrow_i32x4_s (f32.const 0.0) (f64.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:710 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.narrow_i32x4_s (f32.const 0.0) (f64.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:715 +let $1 = instantiate(`(module + (func (export "f32x4_convert_i32x4_s_add") (param v128 v128) (result v128) + (f32x4.convert_i32x4_s (i32x4.add (local.get 0) (local.get 1)))) + (func (export "f32x4_convert_i32x4_s_sub") (param v128 v128) (result v128) + (f32x4.convert_i32x4_s (i32x4.sub (local.get 0) (local.get 1)))) + (func (export "f32x4_convert_i32x4_u_mul") (param v128 v128) (result v128) + (f32x4.convert_i32x4_u (i32x4.mul (local.get 0) (local.get 1)))) + + (func (export "i16x8_low_extend_narrow_ss") (param v128 v128) (result v128) + (i16x8.extend_low_i8x16_s (i8x16.narrow_i16x8_s (local.get 0) (local.get 1)))) + (func (export "i16x8_low_extend_narrow_su") (param v128 v128) (result v128) + (i16x8.extend_low_i8x16_s (i8x16.narrow_i16x8_u (local.get 0) (local.get 1)))) + (func (export "i16x8_high_extend_narrow_ss") (param v128 v128) (result v128) + (i16x8.extend_low_i8x16_s (i8x16.narrow_i16x8_s (local.get 0) (local.get 1)))) + (func (export "i16x8_high_extend_narrow_su") (param v128 v128) (result v128) + (i16x8.extend_low_i8x16_s (i8x16.narrow_i16x8_u (local.get 0) (local.get 1)))) + (func (export "i16x8_low_extend_narrow_uu") (param v128 v128) (result v128) + (i16x8.extend_low_i8x16_u (i8x16.narrow_i16x8_u (local.get 0) (local.get 1)))) + (func (export "i16x8_low_extend_narrow_us") (param v128 v128) (result v128) + (i16x8.extend_low_i8x16_u (i8x16.narrow_i16x8_s (local.get 0) (local.get 1)))) + (func (export "i16x8_high_extend_narrow_uu") (param v128 v128) (result v128) + (i16x8.extend_low_i8x16_u (i8x16.narrow_i16x8_u (local.get 0) (local.get 1)))) + (func (export "i16x8_high_extend_narrow_us") (param v128 v128) (result v128) + (i16x8.extend_low_i8x16_u (i8x16.narrow_i16x8_s (local.get 0) (local.get 1)))) + + (func (export "i32x4_low_extend_narrow_ss") (param v128 v128) (result v128) + (i32x4.extend_low_i16x8_s (i16x8.narrow_i32x4_s (local.get 0) (local.get 1)))) + (func (export "i32x4_low_extend_narrow_su") (param v128 v128) (result v128) + (i32x4.extend_low_i16x8_s (i16x8.narrow_i32x4_u (local.get 0) (local.get 1)))) + (func (export "i32x4_high_extend_narrow_ss") (param v128 v128) (result v128) + (i32x4.extend_low_i16x8_s (i16x8.narrow_i32x4_s (local.get 0) (local.get 1)))) + (func (export "i32x4_high_extend_narrow_su") (param v128 v128) (result v128) + (i32x4.extend_low_i16x8_s (i16x8.narrow_i32x4_u (local.get 0) (local.get 1)))) + (func (export "i32x4_low_extend_narrow_uu") (param v128 v128) (result v128) + (i32x4.extend_low_i16x8_u (i16x8.narrow_i32x4_u (local.get 0) (local.get 1)))) + (func (export "i32x4_low_extend_narrow_us") (param v128 v128) (result v128) + (i32x4.extend_low_i16x8_u (i16x8.narrow_i32x4_s (local.get 0) (local.get 1)))) + (func (export "i32x4_high_extend_narrow_uu") (param v128 v128) (result v128) + (i32x4.extend_low_i16x8_u (i16x8.narrow_i32x4_u (local.get 0) (local.get 1)))) + (func (export "i32x4_high_extend_narrow_us") (param v128 v128) (result v128) + (i32x4.extend_low_i16x8_u (i16x8.narrow_i32x4_s (local.get 0) (local.get 1)))) +)`); + +// ./test/core/simd/simd_conversions.wast:758 +assert_return( + () => invoke($1, `f32x4_convert_i32x4_s_add`, [ + i32x4([0x1, 0x2, 0x3, 0x4]), + i32x4([0x2, 0x3, 0x4, 0x5]), + ]), + [ + new F32x4Pattern( + value("f32", 3), + value("f32", 5), + value("f32", 7), + value("f32", 9), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:761 +assert_return( + () => invoke($1, `f32x4_convert_i32x4_s_sub`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", 0), + value("f32", 1), + value("f32", 2), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:764 +assert_return( + () => invoke($1, `f32x4_convert_i32x4_u_mul`, [ + i32x4([0x1, 0x2, 0x3, 0x4]), + i32x4([0x1, 0x2, 0x3, 0x4]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 4), + value("f32", 9), + value("f32", 16), + ), + ], +); + +// ./test/core/simd/simd_conversions.wast:768 +assert_return( + () => invoke($1, `i16x8_low_extend_narrow_ss`, [ + i16x8([0x8000, 0x8001, 0x7fff, 0x8000, 0x8000, 0x8001, 0x7fff, 0x8000]), + i16x8([0x8000, 0x8001, 0x7fff, 0x8000, 0x8000, 0x8001, 0x7fff, 0x8000]), + ]), + [i16x8([0xff80, 0xff80, 0x7f, 0xff80, 0xff80, 0xff80, 0x7f, 0xff80])], +); + +// ./test/core/simd/simd_conversions.wast:771 +assert_return( + () => invoke($1, `i16x8_low_extend_narrow_su`, [ + i16x8([0x8000, 0x8001, 0x7fff, 0xffff, 0x8000, 0x8001, 0x7fff, 0xffff]), + i16x8([0x8000, 0x8001, 0x7fff, 0xffff, 0x8000, 0x8001, 0x7fff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0xffff, 0x0, 0x0, 0x0, 0xffff, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:774 +assert_return( + () => invoke($1, `i16x8_high_extend_narrow_ss`, [ + i16x8([0x8000, 0x8001, 0x7fff, 0x8000, 0x8000, 0x8001, 0x7fff, 0x8000]), + i16x8([0x8000, 0x8001, 0x7fff, 0x8000, 0x8000, 0x8001, 0x7fff, 0x8000]), + ]), + [i16x8([0xff80, 0xff80, 0x7f, 0xff80, 0xff80, 0xff80, 0x7f, 0xff80])], +); + +// ./test/core/simd/simd_conversions.wast:777 +assert_return( + () => invoke($1, `i16x8_high_extend_narrow_su`, [ + i16x8([0x8000, 0x8001, 0x7fff, 0xffff, 0x8000, 0x8001, 0x7fff, 0xffff]), + i16x8([0x8000, 0x8001, 0x7fff, 0xffff, 0x8000, 0x8001, 0x7fff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0xffff, 0x0, 0x0, 0x0, 0xffff, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:780 +assert_return( + () => invoke($1, `i16x8_low_extend_narrow_uu`, [ + i16x8([0x8000, 0x8001, 0x8000, 0xffff, 0x8000, 0x8001, 0x8000, 0xffff]), + i16x8([0x8000, 0x8001, 0x8000, 0xffff, 0x8000, 0x8001, 0x8000, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:783 +assert_return( + () => invoke($1, `i16x8_low_extend_narrow_us`, [ + i16x8([0x8000, 0x8001, 0x7fff, 0x8000, 0x8000, 0x8001, 0x7fff, 0x8000]), + i16x8([0x8000, 0x8001, 0x7fff, 0x8000, 0x8000, 0x8001, 0x7fff, 0x8000]), + ]), + [i16x8([0x80, 0x80, 0x7f, 0x80, 0x80, 0x80, 0x7f, 0x80])], +); + +// ./test/core/simd/simd_conversions.wast:786 +assert_return( + () => invoke($1, `i16x8_high_extend_narrow_uu`, [ + i16x8([0x8000, 0x8001, 0x7fff, 0xffff, 0x8000, 0x8001, 0x7fff, 0xffff]), + i16x8([0x8000, 0x8001, 0x7fff, 0xffff, 0x8000, 0x8001, 0x7fff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0xff, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:789 +assert_return( + () => invoke($1, `i16x8_high_extend_narrow_us`, [ + i16x8([0x8000, 0x8001, 0x7fff, 0x8000, 0x8000, 0x8001, 0x7fff, 0x8000]), + i16x8([0x8000, 0x8001, 0x7fff, 0x8000, 0x8000, 0x8001, 0x7fff, 0x8000]), + ]), + [i16x8([0x80, 0x80, 0x7f, 0x80, 0x80, 0x80, 0x7f, 0x80])], +); + +// ./test/core/simd/simd_conversions.wast:793 +assert_return( + () => invoke($1, `i32x4_low_extend_narrow_ss`, [ + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0x8000000]), + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0x8000000]), + ]), + [i32x4([0xffff8000, 0xffff8000, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:796 +assert_return( + () => invoke($1, `i32x4_low_extend_narrow_su`, [ + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:799 +assert_return( + () => invoke($1, `i32x4_high_extend_narrow_ss`, [ + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0x8000000]), + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0x8000000]), + ]), + [i32x4([0xffff8000, 0xffff8000, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:802 +assert_return( + () => invoke($1, `i32x4_high_extend_narrow_su`, [ + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:805 +assert_return( + () => invoke($1, `i32x4_low_extend_narrow_uu`, [ + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0xffff, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:808 +assert_return( + () => invoke($1, `i32x4_low_extend_narrow_us`, [ + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0x8000000]), + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0x8000000]), + ]), + [i32x4([0x8000, 0x8000, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:811 +assert_return( + () => invoke($1, `i32x4_high_extend_narrow_uu`, [ + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0xffff, 0x0])], +); + +// ./test/core/simd/simd_conversions.wast:814 +assert_return( + () => invoke($1, `i32x4_high_extend_narrow_us`, [ + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0x8000000]), + i32x4([0x80000000, 0x80000001, 0x7fffffff, 0x8000000]), + ]), + [i32x4([0x8000, 0x8000, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_conversions.wast:820 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.convert_i32x4_s-arg-empty (result v128) + (f32x4.convert_i32x4_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:828 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.convert_i32x4_u-arg-empty (result v128) + (f32x4.convert_i32x4_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:836 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.narrow_i16x8_s-1st-arg-empty (result v128) + (i8x16.narrow_i16x8_s (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:844 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.narrow_i16x8_s-arg-empty (result v128) + (i8x16.narrow_i16x8_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:852 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.narrow_i16x8_u-1st-arg-empty (result v128) + (i8x16.narrow_i16x8_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:860 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.narrow_i16x8_u-arg-empty (result v128) + (i8x16.narrow_i16x8_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:868 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.narrow_i32x4_s-1st-arg-empty (result v128) + (i16x8.narrow_i32x4_s (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:876 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.narrow_i32x4_s-arg-empty (result v128) + (i16x8.narrow_i32x4_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:884 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.narrow_i32x4_u-1st-arg-empty (result v128) + (i16x8.narrow_i32x4_u (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_conversions.wast:892 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.narrow_i32x4_u-arg-empty (result v128) + (i16x8.narrow_i32x4_u) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4.wast.js new file mode 100644 index 0000000000..c3d30b4669 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4.wast.js @@ -0,0 +1,18269 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_f32x4.wast + +// ./test/core/simd/simd_f32x4.wast:4 +let $0 = instantiate(`(module + (func (export "f32x4.min") (param v128 v128) (result v128) (f32x4.min (local.get 0) (local.get 1))) + (func (export "f32x4.max") (param v128 v128) (result v128) (f32x4.max (local.get 0) (local.get 1))) + (func (export "f32x4.abs") (param v128) (result v128) (f32x4.abs (local.get 0))) + ;; f32x4.min const vs const + (func (export "f32x4.min_with_const_0") (result v128) (f32x4.min (v128.const f32x4 0 1 2 -3) (v128.const f32x4 0 2 1 3))) + (func (export "f32x4.min_with_const_1") (result v128) (f32x4.min (v128.const f32x4 0 1 2 3) (v128.const f32x4 0 1 2 3))) + (func (export "f32x4.min_with_const_2") (result v128) (f32x4.min (v128.const f32x4 0x00 0x01 0x02 0x80000000) (v128.const f32x4 0x00 0x02 0x01 2147483648))) + (func (export "f32x4.min_with_const_3") (result v128) (f32x4.min (v128.const f32x4 0x00 0x01 0x02 0x80000000) (v128.const f32x4 0x00 0x01 0x02 0x80000000))) + ;; f32x4.min param vs const + (func (export "f32x4.min_with_const_5")(param v128) (result v128) (f32x4.min (local.get 0) (v128.const f32x4 0 1 2 -3))) + (func (export "f32x4.min_with_const_6")(param v128) (result v128) (f32x4.min (v128.const f32x4 0 1 2 3) (local.get 0))) + (func (export "f32x4.min_with_const_7")(param v128) (result v128) (f32x4.min (v128.const f32x4 0x00 0x01 0x02 0x80000000) (local.get 0))) + (func (export "f32x4.min_with_const_8")(param v128) (result v128) (f32x4.min (local.get 0) (v128.const f32x4 0x00 0x01 0x02 0x80000000))) + ;; f32x4.max const vs const + (func (export "f32x4.max_with_const_10") (result v128) (f32x4.max (v128.const f32x4 0 1 2 -3) (v128.const f32x4 0 2 1 3))) + (func (export "f32x4.max_with_const_11") (result v128) (f32x4.max (v128.const f32x4 0 1 2 3) (v128.const f32x4 0 1 2 3))) + (func (export "f32x4.max_with_const_12") (result v128) (f32x4.max (v128.const f32x4 0x00 0x01 0x02 0x80000000) (v128.const f32x4 0x00 0x02 0x01 2147483648))) + (func (export "f32x4.max_with_const_13") (result v128) (f32x4.max (v128.const f32x4 0x00 0x01 0x02 0x80000000) (v128.const f32x4 0x00 0x01 0x02 0x80000000))) + ;; f32x4.max param vs const + (func (export "f32x4.max_with_const_15")(param v128) (result v128) (f32x4.max (local.get 0) (v128.const f32x4 0 1 2 -3))) + (func (export "f32x4.max_with_const_16")(param v128) (result v128) (f32x4.max (v128.const f32x4 0 1 2 3) (local.get 0))) + (func (export "f32x4.max_with_const_17")(param v128) (result v128) (f32x4.max (v128.const f32x4 0x00 0x01 0x02 0x80000000) (local.get 0))) + (func (export "f32x4.max_with_const_18")(param v128) (result v128) (f32x4.max (local.get 0) (v128.const f32x4 0x00 0x01 0x02 0x80000000))) + + (func (export "f32x4.abs_with_const") (result v128) (f32x4.abs (v128.const f32x4 -0 -1 -2 -3))) +)`); + +// ./test/core/simd/simd_f32x4.wast:33 +assert_return( + () => invoke($0, `f32x4.min_with_const_0`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 1), + value("f32", -3), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:34 +assert_return( + () => invoke($0, `f32x4.min_with_const_1`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 2), + value("f32", 3), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:35 +assert_return( + () => invoke($0, `f32x4.min_with_const_2`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 1), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:36 +assert_return( + () => invoke($0, `f32x4.min_with_const_3`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 2), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:38 +assert_return( + () => invoke($0, `f32x4.min_with_const_5`, [f32x4([0, 2, 1, 3])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 1), + value("f32", -3), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:40 +assert_return( + () => invoke($0, `f32x4.min_with_const_6`, [f32x4([0, 1, 2, 3])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 2), + value("f32", 3), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:42 +assert_return( + () => invoke($0, `f32x4.min_with_const_7`, [f32x4([0, 2, 1, 2147483600])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 1), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:44 +assert_return( + () => invoke($0, `f32x4.min_with_const_8`, [f32x4([0, 1, 2, 2147483600])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 2), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:47 +assert_return( + () => invoke($0, `f32x4.max_with_const_10`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 2), + value("f32", 2), + value("f32", 3), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:48 +assert_return( + () => invoke($0, `f32x4.max_with_const_11`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 2), + value("f32", 3), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:49 +assert_return( + () => invoke($0, `f32x4.max_with_const_12`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 2), + value("f32", 2), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:50 +assert_return( + () => invoke($0, `f32x4.max_with_const_13`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 2), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:52 +assert_return( + () => invoke($0, `f32x4.max_with_const_15`, [f32x4([0, 2, 1, 3])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 2), + value("f32", 2), + value("f32", 3), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:54 +assert_return( + () => invoke($0, `f32x4.max_with_const_16`, [f32x4([0, 1, 2, 3])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 2), + value("f32", 3), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:56 +assert_return( + () => invoke($0, `f32x4.max_with_const_17`, [f32x4([0, 2, 1, 2147483600])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 2), + value("f32", 2), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:58 +assert_return( + () => invoke($0, `f32x4.max_with_const_18`, [f32x4([0, 1, 2, 2147483600])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 2), + value("f32", 2147483600), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:61 +assert_return( + () => invoke($0, `f32x4.abs_with_const`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 2), + value("f32", 3), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:65 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x80, + 0x3f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0x80, + 0x3f, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:73 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0x80, + 0x3f, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:81 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x80, + 0x3f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0x80, + 0x3f, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:89 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0x80, + 0x3f, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + value("f32", 1), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:97 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:100 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:103 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:106 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:109 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:112 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:115 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:118 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:121 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:124 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:127 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:130 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:133 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:136 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:139 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:142 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:145 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:148 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:151 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:154 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:157 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:160 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:163 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:166 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:169 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:172 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:175 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:178 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:181 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:184 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:187 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:190 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:193 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:196 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:199 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:202 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:205 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:208 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:211 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:214 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:217 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:220 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:223 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:226 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:229 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:232 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:235 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:238 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:241 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:244 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:247 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:250 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:253 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:256 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:259 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:262 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:265 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:268 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:271 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:274 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:277 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:280 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:283 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:286 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:289 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:292 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:295 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:298 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:301 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:304 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:307 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:310 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:313 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:316 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:319 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:322 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:325 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:328 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:331 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:334 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:337 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:340 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:343 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:346 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:349 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:352 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:355 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:358 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:361 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:364 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:367 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:370 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:373 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:376 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:379 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:382 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:385 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:388 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:391 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:394 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:397 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:400 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:403 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:406 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:409 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:412 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:415 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:418 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:421 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:424 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:427 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:430 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:433 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:436 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:439 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:442 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:445 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:448 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:451 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:454 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:457 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:460 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:463 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:466 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:469 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:472 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:475 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:478 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:481 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:484 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:487 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:490 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:493 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:496 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:499 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:502 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:505 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:508 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:511 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:514 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:517 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:520 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:523 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:526 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:529 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:532 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:535 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:538 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:541 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:544 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:547 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:550 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:553 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:556 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:559 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:562 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:565 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:568 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:571 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:574 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:577 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:580 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:583 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:586 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:589 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:592 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:595 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:598 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:601 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:604 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:607 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:610 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:613 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:616 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:619 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:622 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:625 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:628 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:631 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:634 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:637 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:640 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:643 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:646 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:649 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:652 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:655 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:658 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:661 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:664 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:667 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:670 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:673 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:676 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:679 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:682 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:685 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:688 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:691 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:694 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:697 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:700 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:703 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:706 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:709 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:712 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:715 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:718 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:721 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:724 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:727 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:730 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:733 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:736 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:739 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:742 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:745 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:748 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:751 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:754 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:757 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:760 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:763 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:766 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:769 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:772 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:775 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:778 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:781 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:784 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:787 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:790 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:793 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:796 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:799 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:802 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:805 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:808 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:811 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:814 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:817 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:820 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:823 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:826 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:829 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:832 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:835 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:838 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:841 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:844 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:847 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:850 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:853 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:856 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:859 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:862 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:865 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:868 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:871 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:874 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:877 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-123456790, -123456790, -123456790, -123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:880 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:883 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:886 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:889 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:892 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-123456790, -123456790, -123456790, -123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:895 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:898 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:901 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:904 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:907 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-123456790, -123456790, -123456790, -123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:910 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:913 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:916 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:919 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:922 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-123456790, -123456790, -123456790, -123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:925 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-123456790, -123456790, -123456790, -123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:928 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-123456790, -123456790, -123456790, -123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:931 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-123456790, -123456790, -123456790, -123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:934 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-123456790, -123456790, -123456790, -123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:937 +assert_return( + () => invoke($0, `f32x4.min`, [ + f32x4([-123456790, -123456790, -123456790, -123456790]), + f32x4([-123456790, -123456790, -123456790, -123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:940 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:943 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:946 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:949 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:952 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:955 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:958 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:961 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:964 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:967 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:970 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:973 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:976 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:979 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:982 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:985 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:988 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:991 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:994 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:997 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1000 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1003 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1006 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1009 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1012 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1015 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1018 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1021 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1024 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1027 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1030 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1033 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1036 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1039 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1042 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1045 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1048 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1051 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1054 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1057 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1060 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1063 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1066 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1069 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1072 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1075 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1078 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1081 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1084 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1087 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1090 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1093 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1096 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1099 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1102 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1105 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1108 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1111 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1114 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1117 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1120 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1123 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1126 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1129 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1132 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1135 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1138 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1141 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1144 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1147 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1150 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1153 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1156 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1159 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1162 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1165 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1168 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1171 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1174 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1177 +assert_return( + () => invoke($0, `f32x4.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1180 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1183 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1186 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1189 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1192 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1195 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1198 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1201 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1204 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1207 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1210 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1213 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1216 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1219 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1222 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1225 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1228 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1231 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1234 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1237 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1240 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1243 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1246 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1249 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1252 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1255 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1258 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1261 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1264 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1267 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1270 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1273 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1276 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1279 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1282 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1285 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1288 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1291 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1294 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1297 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1300 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1303 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1306 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1309 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1312 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1315 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1318 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1321 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1324 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1327 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1330 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1333 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1336 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1339 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1342 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1345 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1348 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1351 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1354 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1357 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1360 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1363 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1366 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1369 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1372 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1375 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1378 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1381 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1384 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1387 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1390 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1393 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1396 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1399 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1402 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1405 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1408 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1411 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1414 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1417 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1420 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1423 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1426 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1429 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1432 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1435 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1438 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1441 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1444 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1447 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1450 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1453 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1456 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1459 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1462 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1465 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1468 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1471 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1474 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1477 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1480 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1483 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1486 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1489 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1492 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1495 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1498 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1501 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1504 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1507 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1510 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1513 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1516 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1519 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1522 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1525 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1528 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1531 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1534 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1537 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1540 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1543 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1546 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1549 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1552 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1555 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1558 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1561 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1564 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1567 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1570 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1573 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1576 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1579 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1582 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1585 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1588 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1591 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1594 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1597 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1600 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1603 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1606 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1609 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1612 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1615 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1618 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1621 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1624 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1627 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1630 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1633 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1636 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1639 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1642 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1645 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1648 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1651 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1654 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1657 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1660 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1663 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1666 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1669 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1672 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1675 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1678 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1681 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1684 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1687 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1690 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1693 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1696 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1699 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1702 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1705 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1708 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1711 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1714 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1717 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1720 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1723 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1726 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1729 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1732 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1735 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1738 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1741 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1744 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1747 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1750 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1753 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1756 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1759 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1762 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1765 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1768 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1771 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1774 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1777 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1780 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1783 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1786 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1789 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1792 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1795 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1798 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1801 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1804 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1807 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1810 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1813 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1816 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1819 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1822 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1825 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1828 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1831 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1834 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1837 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1840 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1843 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1846 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1849 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1852 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1855 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1858 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1861 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1864 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1867 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1870 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1873 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1876 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1879 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1882 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1885 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1888 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1891 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1894 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1897 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1900 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1903 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1906 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1909 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1912 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1915 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1918 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1921 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1924 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1927 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1930 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1933 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1936 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1939 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1942 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1945 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1948 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1951 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1954 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1957 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1960 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-123456790, -123456790, -123456790, -123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1963 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1966 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1969 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1972 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1975 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-123456790, -123456790, -123456790, -123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1978 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1981 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1984 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1987 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1990 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-123456790, -123456790, -123456790, -123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1993 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1996 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:1999 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2002 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2005 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-123456790, -123456790, -123456790, -123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2008 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-123456790, -123456790, -123456790, -123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2011 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-123456790, -123456790, -123456790, -123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2014 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-123456790, -123456790, -123456790, -123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2017 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-123456790, -123456790, -123456790, -123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2020 +assert_return( + () => invoke($0, `f32x4.max`, [ + f32x4([-123456790, -123456790, -123456790, -123456790]), + f32x4([-123456790, -123456790, -123456790, -123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2023 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2026 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2029 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2032 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2035 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2038 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2041 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2044 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2047 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2050 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2053 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2056 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2059 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2062 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2065 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2068 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2071 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2074 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2077 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2080 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2083 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2086 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2089 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2092 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2095 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2098 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2101 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2104 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2107 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2110 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2113 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2116 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2119 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2122 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2125 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2128 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2131 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2134 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2137 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2140 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2143 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2146 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2149 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2152 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2155 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2158 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2161 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2164 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2167 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2170 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2173 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2176 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2179 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2182 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2185 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2188 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2191 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2194 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2197 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2200 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2203 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2206 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2209 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2212 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2215 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2218 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2221 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2224 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2227 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2230 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2233 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2236 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2239 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2242 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2245 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2248 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2251 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2254 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2257 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2260 +assert_return( + () => invoke($0, `f32x4.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2265 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([0, 0, -0, 0]), f32x4([0, -0, 0, -0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2268 +assert_return( + () => invoke($0, `f32x4.min`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2271 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([0, 0, -0, 0]), f32x4([0, -0, 0, -0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2274 +assert_return( + () => invoke($0, `f32x4.max`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2279 +assert_return( + () => invoke($0, `f32x4.abs`, [f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2281 +assert_return( + () => invoke($0, `f32x4.abs`, [f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2283 +assert_return( + () => invoke($0, `f32x4.abs`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2285 +assert_return( + () => invoke($0, `f32x4.abs`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2287 +assert_return( + () => invoke($0, `f32x4.abs`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2289 +assert_return( + () => invoke($0, `f32x4.abs`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2291 +assert_return( + () => invoke($0, `f32x4.abs`, [f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2293 +assert_return( + () => invoke($0, `f32x4.abs`, [f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2295 +assert_return( + () => invoke($0, `f32x4.abs`, [f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2297 +assert_return( + () => invoke($0, `f32x4.abs`, [f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2299 +assert_return( + () => invoke($0, `f32x4.abs`, [f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855])]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2301 +assert_return( + () => invoke($0, `f32x4.abs`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2303 +assert_return( + () => invoke($0, `f32x4.abs`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2305 +assert_return( + () => invoke($0, `f32x4.abs`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2307 +assert_return( + () => invoke($0, `f32x4.abs`, [f32x4([Infinity, Infinity, Infinity, Infinity])]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2309 +assert_return( + () => invoke($0, `f32x4.abs`, [f32x4([-Infinity, -Infinity, -Infinity, -Infinity])]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2311 +assert_return( + () => invoke($0, `f32x4.abs`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2313 +assert_return( + () => invoke($0, `f32x4.abs`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2315 +assert_return( + () => invoke($0, `f32x4.abs`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2317 +assert_return( + () => invoke($0, `f32x4.abs`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2319 +assert_return( + () => invoke($0, `f32x4.abs`, [ + f32x4([-123456790, -123456790, -123456790, -123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2325 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.min (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4.wast:2326 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.max (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4.wast:2327 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.min (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4.wast:2328 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.max (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4.wast:2329 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.min (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4.wast:2330 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.max (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4.wast:2331 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.min (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4.wast:2332 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.max (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4.wast:2335 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.abs (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4.wast:2336 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.min (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4.wast:2337 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.max (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4.wast:2341 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.abs-arg-empty (result v128) + (f32x4.abs) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4.wast:2349 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.min-1st-arg-empty (result v128) + (f32x4.min (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4.wast:2357 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.min-arg-empty (result v128) + (f32x4.min) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4.wast:2365 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.max-1st-arg-empty (result v128) + (f32x4.max (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4.wast:2373 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.max-arg-empty (result v128) + (f32x4.max) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4.wast:2383 +let $1 = instantiate(`(module + (func (export "max-min") (param v128 v128 v128) (result v128) + (f32x4.max (f32x4.min (local.get 0) (local.get 1))(local.get 2))) + (func (export "min-max") (param v128 v128 v128) (result v128) + (f32x4.min (f32x4.max (local.get 0) (local.get 1))(local.get 2))) + (func (export "max-abs") (param v128 v128) (result v128) + (f32x4.max (f32x4.abs (local.get 0)) (local.get 1))) + (func (export "min-abs") (param v128 v128) (result v128) + (f32x4.min (f32x4.abs (local.get 0)) (local.get 1))) +)`); + +// ./test/core/simd/simd_f32x4.wast:2394 +assert_return( + () => invoke($1, `max-min`, [ + f32x4([1.125, 1.125, 1.125, 1.125]), + f32x4([0.25, 0.25, 0.25, 0.25]), + f32x4([0.125, 0.125, 0.125, 0.125]), + ]), + [ + new F32x4Pattern( + value("f32", 0.25), + value("f32", 0.25), + value("f32", 0.25), + value("f32", 0.25), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2398 +assert_return( + () => invoke($1, `min-max`, [ + f32x4([1.125, 1.125, 1.125, 1.125]), + f32x4([0.25, 0.25, 0.25, 0.25]), + f32x4([0.125, 0.125, 0.125, 0.125]), + ]), + [ + new F32x4Pattern( + value("f32", 0.125), + value("f32", 0.125), + value("f32", 0.125), + value("f32", 0.125), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2402 +assert_return( + () => invoke($1, `max-abs`, [ + f32x4([-1.125, -1.125, -1.125, -1.125]), + f32x4([0.125, 0.125, 0.125, 0.125]), + ]), + [ + new F32x4Pattern( + value("f32", 1.125), + value("f32", 1.125), + value("f32", 1.125), + value("f32", 1.125), + ), + ], +); + +// ./test/core/simd/simd_f32x4.wast:2405 +assert_return( + () => invoke($1, `min-abs`, [ + f32x4([-1.125, -1.125, -1.125, -1.125]), + f32x4([0.125, 0.125, 0.125, 0.125]), + ]), + [ + new F32x4Pattern( + value("f32", 0.125), + value("f32", 0.125), + value("f32", 0.125), + value("f32", 0.125), + ), + ], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_arith.wast.js new file mode 100644 index 0000000000..44410bfa92 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_arith.wast.js @@ -0,0 +1,45212 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_f32x4_arith.wast + +// ./test/core/simd/simd_f32x4_arith.wast:4 +let $0 = instantiate(`(module + (func (export "f32x4.add") (param v128 v128) (result v128) (f32x4.add (local.get 0) (local.get 1))) + (func (export "f32x4.sub") (param v128 v128) (result v128) (f32x4.sub (local.get 0) (local.get 1))) + (func (export "f32x4.mul") (param v128 v128) (result v128) (f32x4.mul (local.get 0) (local.get 1))) + (func (export "f32x4.div") (param v128 v128) (result v128) (f32x4.div (local.get 0) (local.get 1))) + (func (export "f32x4.neg") (param v128) (result v128) (f32x4.neg (local.get 0))) + (func (export "f32x4.sqrt") (param v128) (result v128) (f32x4.sqrt (local.get 0))) +)`); + +// ./test/core/simd/simd_f32x4_arith.wast:13 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:16 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:19 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:22 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:25 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:28 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:31 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:34 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:37 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:40 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:43 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:46 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:49 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:52 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:55 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:58 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:61 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:64 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:67 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:70 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:73 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:76 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:79 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:82 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:85 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:88 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:91 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:94 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:97 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:100 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:103 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:106 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:109 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:112 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:115 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000003), + value("f32", 0.000000000000000000000000000000000000000000003), + value("f32", 0.000000000000000000000000000000000000000000003), + value("f32", 0.000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:118 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:121 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754945), + value("f32", 0.000000000000000000000000000000000000011754945), + value("f32", 0.000000000000000000000000000000000000011754945), + value("f32", 0.000000000000000000000000000000000000011754945), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:124 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:127 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:130 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:133 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:136 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:139 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:142 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:145 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:148 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:151 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:154 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:157 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:160 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:163 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:166 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000003), + value("f32", -0.000000000000000000000000000000000000000000003), + value("f32", -0.000000000000000000000000000000000000000000003), + value("f32", -0.000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:169 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:172 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754945), + value("f32", -0.000000000000000000000000000000000000011754945), + value("f32", -0.000000000000000000000000000000000000011754945), + value("f32", -0.000000000000000000000000000000000000011754945), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:175 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:178 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:181 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:184 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:187 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:190 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:193 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:196 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:199 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:202 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:205 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:208 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:211 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754945), + value("f32", 0.000000000000000000000000000000000000011754945), + value("f32", 0.000000000000000000000000000000000000011754945), + value("f32", 0.000000000000000000000000000000000000011754945), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:214 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:217 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.000000000000000000000000000000000000023509887), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:220 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:223 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:226 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:229 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:232 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:235 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:238 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:241 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:244 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:247 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:250 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:253 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:256 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:259 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:262 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754945), + value("f32", -0.000000000000000000000000000000000000011754945), + value("f32", -0.000000000000000000000000000000000000011754945), + value("f32", -0.000000000000000000000000000000000000011754945), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:265 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:268 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000023509887), + value("f32", -0.000000000000000000000000000000000000023509887), + value("f32", -0.000000000000000000000000000000000000023509887), + value("f32", -0.000000000000000000000000000000000000023509887), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:271 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:274 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:277 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:280 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:283 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:286 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:289 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:292 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:295 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:298 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:301 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:304 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:307 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:310 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:313 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:316 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:319 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:322 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:325 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1.5), + value("f32", 1.5), + value("f32", 1.5), + value("f32", 1.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:328 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:331 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.7831855), + value("f32", 6.7831855), + value("f32", 6.7831855), + value("f32", 6.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:334 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -5.7831855), + value("f32", -5.7831855), + value("f32", -5.7831855), + value("f32", -5.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:337 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:340 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:343 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:346 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:349 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:352 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:355 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:358 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:361 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:364 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:367 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:370 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:373 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:376 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1.5), + value("f32", -1.5), + value("f32", -1.5), + value("f32", -1.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:379 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 5.7831855), + value("f32", 5.7831855), + value("f32", 5.7831855), + value("f32", 5.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:382 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.7831855), + value("f32", -6.7831855), + value("f32", -6.7831855), + value("f32", -6.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:385 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:388 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:391 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:394 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:397 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:400 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:403 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:406 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:409 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:412 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:415 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 1.5), + value("f32", 1.5), + value("f32", 1.5), + value("f32", 1.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:418 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:421 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 2), + value("f32", 2), + value("f32", 2), + value("f32", 2), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:424 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:427 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 7.2831855), + value("f32", 7.2831855), + value("f32", 7.2831855), + value("f32", 7.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:430 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -5.2831855), + value("f32", -5.2831855), + value("f32", -5.2831855), + value("f32", -5.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:433 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:436 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:439 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:442 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:445 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:448 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:451 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:454 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:457 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:460 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:463 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:466 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -1.5), + value("f32", -1.5), + value("f32", -1.5), + value("f32", -1.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:469 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:472 +assert_return( + () => invoke($0, `f32x4.add`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -2), + value("f32", -2), + value("f32", -2), + value("f32", -2), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:475 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 5.2831855), + value("f32", 5.2831855), + value("f32", 5.2831855), + value("f32", 5.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:478 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -7.2831855), + value("f32", -7.2831855), + value("f32", -7.2831855), + value("f32", -7.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:481 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:484 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:487 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:490 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:493 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:496 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:499 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:502 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:505 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:508 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:511 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 6.7831855), + value("f32", 6.7831855), + value("f32", 6.7831855), + value("f32", 6.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:514 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 5.7831855), + value("f32", 5.7831855), + value("f32", 5.7831855), + value("f32", 5.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:517 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 7.2831855), + value("f32", 7.2831855), + value("f32", 7.2831855), + value("f32", 7.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:520 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 5.2831855), + value("f32", 5.2831855), + value("f32", 5.2831855), + value("f32", 5.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:523 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 12.566371), + value("f32", 12.566371), + value("f32", 12.566371), + value("f32", 12.566371), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:526 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:529 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:532 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:535 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:538 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:541 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:544 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:547 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:550 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:553 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:556 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:559 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -5.7831855), + value("f32", -5.7831855), + value("f32", -5.7831855), + value("f32", -5.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:562 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -6.7831855), + value("f32", -6.7831855), + value("f32", -6.7831855), + value("f32", -6.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:565 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -5.2831855), + value("f32", -5.2831855), + value("f32", -5.2831855), + value("f32", -5.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:568 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -7.2831855), + value("f32", -7.2831855), + value("f32", -7.2831855), + value("f32", -7.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:571 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:574 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -12.566371), + value("f32", -12.566371), + value("f32", -12.566371), + value("f32", -12.566371), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:577 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:580 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:583 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:586 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:589 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:592 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:595 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:598 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:601 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:604 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:607 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:610 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:613 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:616 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:619 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:622 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:625 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:628 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:631 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:634 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:637 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:640 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:643 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:646 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:649 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:652 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:655 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:658 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:661 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:664 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:667 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:670 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:673 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:676 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:679 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:682 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:685 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:688 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:691 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:694 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:697 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:700 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:703 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:706 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:709 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:712 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:715 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:718 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:721 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:724 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:727 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:730 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:733 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:736 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:739 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:742 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:745 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:748 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:751 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:754 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:757 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:760 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:763 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:766 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:769 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:772 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:775 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:778 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:781 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:784 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:787 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:790 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:793 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:796 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:799 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:802 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:805 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:808 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:811 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:814 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:817 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:820 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:823 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:826 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:829 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:832 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:835 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:838 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:841 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:844 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:847 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:850 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:853 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:856 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:859 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:862 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:865 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:868 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:871 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:874 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:877 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:880 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:883 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:886 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:889 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:892 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:895 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:898 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:901 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:904 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:907 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:910 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:913 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:916 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:919 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:922 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:925 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:928 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:931 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:934 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:937 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:940 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:943 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:946 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:949 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:952 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:955 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:958 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:961 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:964 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:967 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:970 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:973 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:976 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:979 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:982 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:985 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:988 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:991 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:994 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:997 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1000 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1003 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1006 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1009 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1012 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1015 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1018 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1021 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1024 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1027 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1030 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1033 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1036 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1039 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1042 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1045 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1048 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1051 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1054 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1057 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1060 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1063 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1066 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1069 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1072 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1075 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1078 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1081 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1084 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1087 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1090 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1093 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1096 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1099 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1102 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1105 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1108 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1111 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1114 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1117 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1120 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1123 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1126 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1129 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1132 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1135 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1138 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1141 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1144 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1147 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1150 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1153 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1156 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1159 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1162 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1165 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1168 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1171 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1174 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1177 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1180 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1183 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1186 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1189 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1192 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1195 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1198 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1201 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1204 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1207 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1210 +assert_return( + () => invoke($0, `f32x4.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1213 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 246913580), + value("f32", 246913580), + value("f32", 246913580), + value("f32", 246913580), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1216 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1219 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1222 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000024691358), + value("f32", 0.000000000024691358), + value("f32", 0.000000000024691358), + value("f32", 0.000000000024691358), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1225 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 246913580), + value("f32", 246913580), + value("f32", 246913580), + value("f32", 246913580), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1228 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1231 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1234 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000024691358), + value("f32", 0.000000000024691358), + value("f32", 0.000000000024691358), + value("f32", 0.000000000024691358), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1237 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 246913580), + value("f32", 246913580), + value("f32", 246913580), + value("f32", 246913580), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1240 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1243 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + value("f32", 2469135800000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1246 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000024691358), + value("f32", 0.000000000024691358), + value("f32", 0.000000000024691358), + value("f32", 0.000000000024691358), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1249 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 163971060000000000), + value("f32", 163971060000000000), + value("f32", 163971060000000000), + value("f32", 163971060000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1252 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1255 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1258 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 312749980000), + value("f32", 312749980000), + value("f32", 312749980000), + value("f32", 312749980000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1261 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 163971060000000000), + value("f32", 163971060000000000), + value("f32", 163971060000000000), + value("f32", 163971060000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1264 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1267 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1270 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 312749980000), + value("f32", 312749980000), + value("f32", 312749980000), + value("f32", 312749980000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1273 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 163971060000000000), + value("f32", 163971060000000000), + value("f32", 163971060000000000), + value("f32", 163971060000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1276 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1279 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + value("f32", 85968060000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1282 +assert_return( + () => invoke($0, `f32x4.add`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 312749980000), + value("f32", 312749980000), + value("f32", 312749980000), + value("f32", 312749980000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1285 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1288 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1291 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1294 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1297 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1300 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1303 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1306 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1309 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1312 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1315 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1318 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1321 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1324 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1327 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1330 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1333 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1336 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1339 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1342 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1345 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1348 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1351 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1354 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1357 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1360 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1363 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1366 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1369 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1372 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1375 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1378 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1381 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1384 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1387 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1390 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000003), + value("f32", 0.000000000000000000000000000000000000000000003), + value("f32", 0.000000000000000000000000000000000000000000003), + value("f32", 0.000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1393 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1396 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754945), + value("f32", 0.000000000000000000000000000000000000011754945), + value("f32", 0.000000000000000000000000000000000000011754945), + value("f32", 0.000000000000000000000000000000000000011754945), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1399 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1402 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1405 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1408 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1411 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1414 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1417 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1420 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1423 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1426 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1429 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1432 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1435 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000003), + value("f32", -0.000000000000000000000000000000000000000000003), + value("f32", -0.000000000000000000000000000000000000000000003), + value("f32", -0.000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1438 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1441 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754945), + value("f32", -0.000000000000000000000000000000000000011754945), + value("f32", -0.000000000000000000000000000000000000011754945), + value("f32", -0.000000000000000000000000000000000000011754945), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1444 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1447 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1450 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1453 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1456 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1459 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1462 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1465 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1468 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1471 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1474 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1477 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1480 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1483 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + value("f32", 0.000000000000000000000000000000000000011754942), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1486 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754945), + value("f32", 0.000000000000000000000000000000000000011754945), + value("f32", 0.000000000000000000000000000000000000011754945), + value("f32", 0.000000000000000000000000000000000000011754945), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1489 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1492 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.000000000000000000000000000000000000023509887), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1495 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1498 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1501 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1504 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1507 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1510 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1513 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1516 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1519 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1522 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1525 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1528 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1531 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754945), + value("f32", -0.000000000000000000000000000000000000011754945), + value("f32", -0.000000000000000000000000000000000000011754945), + value("f32", -0.000000000000000000000000000000000000011754945), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1534 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + value("f32", -0.000000000000000000000000000000000000011754942), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1537 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000023509887), + value("f32", -0.000000000000000000000000000000000000023509887), + value("f32", -0.000000000000000000000000000000000000023509887), + value("f32", -0.000000000000000000000000000000000000023509887), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1540 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1543 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1546 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1549 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1552 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1555 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1558 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1561 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1564 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1567 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1570 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1573 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1576 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1579 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1582 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1585 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1588 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1591 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1594 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1597 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1600 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 1.5), + value("f32", 1.5), + value("f32", 1.5), + value("f32", 1.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1603 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -5.7831855), + value("f32", -5.7831855), + value("f32", -5.7831855), + value("f32", -5.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1606 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.7831855), + value("f32", 6.7831855), + value("f32", 6.7831855), + value("f32", 6.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1609 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1612 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1615 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1618 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1621 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1624 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1627 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1630 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1633 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1636 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1639 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1642 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1645 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -1.5), + value("f32", -1.5), + value("f32", -1.5), + value("f32", -1.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1648 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1651 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.7831855), + value("f32", -6.7831855), + value("f32", -6.7831855), + value("f32", -6.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1654 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 5.7831855), + value("f32", 5.7831855), + value("f32", 5.7831855), + value("f32", 5.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1657 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1660 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1663 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1666 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1669 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1672 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1675 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1678 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1681 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1684 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1687 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1690 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", 1.5), + value("f32", 1.5), + value("f32", 1.5), + value("f32", 1.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1693 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1696 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 2), + value("f32", 2), + value("f32", 2), + value("f32", 2), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1699 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -5.2831855), + value("f32", -5.2831855), + value("f32", -5.2831855), + value("f32", -5.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1702 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 7.2831855), + value("f32", 7.2831855), + value("f32", 7.2831855), + value("f32", 7.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1705 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1708 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1711 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1714 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1717 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1720 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1723 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1726 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1729 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1732 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1735 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -1.5), + value("f32", -1.5), + value("f32", -1.5), + value("f32", -1.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1738 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1741 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -2), + value("f32", -2), + value("f32", -2), + value("f32", -2), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1744 +assert_return( + () => invoke($0, `f32x4.sub`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1747 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -7.2831855), + value("f32", -7.2831855), + value("f32", -7.2831855), + value("f32", -7.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1750 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 5.2831855), + value("f32", 5.2831855), + value("f32", 5.2831855), + value("f32", 5.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1753 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1756 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1759 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1762 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1765 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1768 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1771 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1774 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1777 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1780 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1783 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 5.7831855), + value("f32", 5.7831855), + value("f32", 5.7831855), + value("f32", 5.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1786 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 6.7831855), + value("f32", 6.7831855), + value("f32", 6.7831855), + value("f32", 6.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1789 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 5.2831855), + value("f32", 5.2831855), + value("f32", 5.2831855), + value("f32", 5.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1792 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 7.2831855), + value("f32", 7.2831855), + value("f32", 7.2831855), + value("f32", 7.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1795 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1798 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 12.566371), + value("f32", 12.566371), + value("f32", 12.566371), + value("f32", 12.566371), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1801 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1804 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1807 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1810 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1813 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1816 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1819 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1822 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1825 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1828 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1831 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -6.7831855), + value("f32", -6.7831855), + value("f32", -6.7831855), + value("f32", -6.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1834 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -5.7831855), + value("f32", -5.7831855), + value("f32", -5.7831855), + value("f32", -5.7831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1837 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -7.2831855), + value("f32", -7.2831855), + value("f32", -7.2831855), + value("f32", -7.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1840 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -5.2831855), + value("f32", -5.2831855), + value("f32", -5.2831855), + value("f32", -5.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1843 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -12.566371), + value("f32", -12.566371), + value("f32", -12.566371), + value("f32", -12.566371), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1846 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1849 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1852 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1855 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1858 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1861 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1864 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1867 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1870 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1873 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1876 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1879 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1882 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1885 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1888 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1891 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1894 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1897 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1900 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1903 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1906 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1909 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1912 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1915 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1918 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1921 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1924 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1927 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1930 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1933 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1936 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1939 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1942 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1945 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1948 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1951 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1954 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1957 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1960 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1963 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1966 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1969 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1972 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1975 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1978 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1981 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1984 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1987 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1990 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1993 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1996 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:1999 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2002 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2005 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2008 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2011 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2014 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2017 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2020 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2023 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2026 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2029 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2032 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2035 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2038 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2041 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2044 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2047 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2050 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2053 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2056 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2059 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2062 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2065 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2068 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2071 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2074 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2077 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2080 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2083 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2086 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2089 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2092 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2095 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2098 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2101 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2104 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2107 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2110 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2113 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2116 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2119 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2122 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2125 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2128 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2131 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2134 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2137 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2140 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2143 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2146 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2149 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2152 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2155 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2158 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2161 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2164 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2167 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2170 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2173 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2176 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2179 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2182 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2185 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2188 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2191 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2194 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2197 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2200 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2203 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2206 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2209 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2212 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2215 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2218 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2221 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2224 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2227 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2230 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2233 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2236 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2239 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2242 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2245 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2248 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2251 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2254 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2257 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2260 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2263 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2266 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2269 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2272 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2275 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2278 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2281 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2284 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2287 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2290 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2293 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2296 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2299 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2302 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2305 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2308 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2311 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2314 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2317 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2320 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2323 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2326 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2329 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2332 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2335 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2338 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2341 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2344 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2347 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2350 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2353 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2356 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2359 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2362 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2365 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2368 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2371 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2374 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2377 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2380 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2383 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2386 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2389 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2392 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2395 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2398 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2401 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2404 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2407 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2410 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2413 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2416 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2419 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2422 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2425 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2428 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2431 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2434 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2437 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2440 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2443 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2446 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2449 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2452 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2455 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2458 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2461 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2464 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2467 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2470 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2473 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2476 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2479 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2482 +assert_return( + () => invoke($0, `f32x4.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2485 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2488 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2491 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2494 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2497 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2500 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2503 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2506 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2509 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2512 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2515 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2518 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2521 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2524 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2527 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2530 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2533 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2536 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2539 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2542 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2545 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2548 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2551 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2554 +assert_return( + () => invoke($0, `f32x4.sub`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2557 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2560 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2563 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2566 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2569 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2572 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2575 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2578 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2581 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2584 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2587 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2590 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2593 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2596 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2599 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2602 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2605 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2608 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2611 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2614 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2617 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2620 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2623 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2626 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2629 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2632 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2635 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2638 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2641 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2644 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2647 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2650 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2653 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2656 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2659 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2662 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2665 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2668 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2671 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2674 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2677 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2680 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2683 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000008), + value("f32", 0.000000000000000000000000000000000000000000008), + value("f32", 0.000000000000000000000000000000000000000000008), + value("f32", 0.000000000000000000000000000000000000000000008), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2686 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000008), + value("f32", -0.000000000000000000000000000000000000000000008), + value("f32", -0.000000000000000000000000000000000000000000008), + value("f32", -0.000000000000000000000000000000000000000000008), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2689 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000047683713), + value("f32", 0.00000047683713), + value("f32", 0.00000047683713), + value("f32", 0.00000047683713), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2692 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.00000047683713), + value("f32", -0.00000047683713), + value("f32", -0.00000047683713), + value("f32", -0.00000047683713), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2695 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2698 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2701 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2704 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2707 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2710 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2713 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2716 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2719 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2722 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2725 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2728 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2731 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000008), + value("f32", -0.000000000000000000000000000000000000000000008), + value("f32", -0.000000000000000000000000000000000000000000008), + value("f32", -0.000000000000000000000000000000000000000000008), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2734 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000008), + value("f32", 0.000000000000000000000000000000000000000000008), + value("f32", 0.000000000000000000000000000000000000000000008), + value("f32", 0.000000000000000000000000000000000000000000008), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2737 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.00000047683713), + value("f32", -0.00000047683713), + value("f32", -0.00000047683713), + value("f32", -0.00000047683713), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2740 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000047683713), + value("f32", 0.00000047683713), + value("f32", 0.00000047683713), + value("f32", 0.00000047683713), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2743 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2746 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2749 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2752 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2755 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2758 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2761 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2764 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2767 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000005877472), + value("f32", 0.000000000000000000000000000000000000005877472), + value("f32", 0.000000000000000000000000000000000000005877472), + value("f32", 0.000000000000000000000000000000000000005877472), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2770 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000005877472), + value("f32", -0.000000000000000000000000000000000000005877472), + value("f32", -0.000000000000000000000000000000000000005877472), + value("f32", -0.000000000000000000000000000000000000005877472), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2773 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2776 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2779 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000000000000000000000000000000000007385849), + value("f32", 0.00000000000000000000000000000000000007385849), + value("f32", 0.00000000000000000000000000000000000007385849), + value("f32", 0.00000000000000000000000000000000000007385849), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2782 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.00000000000000000000000000000000000007385849), + value("f32", -0.00000000000000000000000000000000000007385849), + value("f32", -0.00000000000000000000000000000000000007385849), + value("f32", -0.00000000000000000000000000000000000007385849), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2785 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 3.9999998), + value("f32", 3.9999998), + value("f32", 3.9999998), + value("f32", 3.9999998), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2788 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -3.9999998), + value("f32", -3.9999998), + value("f32", -3.9999998), + value("f32", -3.9999998), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2791 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2794 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2797 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2800 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2803 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2806 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2809 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2812 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2815 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000005877472), + value("f32", -0.000000000000000000000000000000000000005877472), + value("f32", -0.000000000000000000000000000000000000005877472), + value("f32", -0.000000000000000000000000000000000000005877472), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2818 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000005877472), + value("f32", 0.000000000000000000000000000000000000005877472), + value("f32", 0.000000000000000000000000000000000000005877472), + value("f32", 0.000000000000000000000000000000000000005877472), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2821 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2824 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2827 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.00000000000000000000000000000000000007385849), + value("f32", -0.00000000000000000000000000000000000007385849), + value("f32", -0.00000000000000000000000000000000000007385849), + value("f32", -0.00000000000000000000000000000000000007385849), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2830 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000000000000000000000000000000000007385849), + value("f32", 0.00000000000000000000000000000000000007385849), + value("f32", 0.00000000000000000000000000000000000007385849), + value("f32", 0.00000000000000000000000000000000000007385849), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2833 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -3.9999998), + value("f32", -3.9999998), + value("f32", -3.9999998), + value("f32", -3.9999998), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2836 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 3.9999998), + value("f32", 3.9999998), + value("f32", 3.9999998), + value("f32", 3.9999998), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2839 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2842 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2845 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2848 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2851 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2854 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2857 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000005877472), + value("f32", 0.000000000000000000000000000000000000005877472), + value("f32", 0.000000000000000000000000000000000000005877472), + value("f32", 0.000000000000000000000000000000000000005877472), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2860 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000005877472), + value("f32", -0.000000000000000000000000000000000000005877472), + value("f32", -0.000000000000000000000000000000000000005877472), + value("f32", -0.000000000000000000000000000000000000005877472), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2863 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.25), + value("f32", 0.25), + value("f32", 0.25), + value("f32", 0.25), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2866 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.25), + value("f32", -0.25), + value("f32", -0.25), + value("f32", -0.25), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2869 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2872 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2875 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 3.1415927), + value("f32", 3.1415927), + value("f32", 3.1415927), + value("f32", 3.1415927), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2878 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -3.1415927), + value("f32", -3.1415927), + value("f32", -3.1415927), + value("f32", -3.1415927), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2881 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 170141170000000000000000000000000000000), + value("f32", 170141170000000000000000000000000000000), + value("f32", 170141170000000000000000000000000000000), + value("f32", 170141170000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2884 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -170141170000000000000000000000000000000), + value("f32", -170141170000000000000000000000000000000), + value("f32", -170141170000000000000000000000000000000), + value("f32", -170141170000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2887 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2890 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2893 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2896 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2899 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2902 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2905 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000005877472), + value("f32", -0.000000000000000000000000000000000000005877472), + value("f32", -0.000000000000000000000000000000000000005877472), + value("f32", -0.000000000000000000000000000000000000005877472), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2908 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000005877472), + value("f32", 0.000000000000000000000000000000000000005877472), + value("f32", 0.000000000000000000000000000000000000005877472), + value("f32", 0.000000000000000000000000000000000000005877472), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2911 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.25), + value("f32", -0.25), + value("f32", -0.25), + value("f32", -0.25), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2914 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.25), + value("f32", 0.25), + value("f32", 0.25), + value("f32", 0.25), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2917 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2920 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2923 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -3.1415927), + value("f32", -3.1415927), + value("f32", -3.1415927), + value("f32", -3.1415927), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2926 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 3.1415927), + value("f32", 3.1415927), + value("f32", 3.1415927), + value("f32", 3.1415927), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2929 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -170141170000000000000000000000000000000), + value("f32", -170141170000000000000000000000000000000), + value("f32", -170141170000000000000000000000000000000), + value("f32", -170141170000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2932 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 170141170000000000000000000000000000000), + value("f32", 170141170000000000000000000000000000000), + value("f32", 170141170000000000000000000000000000000), + value("f32", 170141170000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2935 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2938 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2941 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2944 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2947 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2950 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2953 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2956 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2959 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2962 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2965 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2968 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2971 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2974 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2977 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2980 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2983 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2986 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2989 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2992 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2995 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:2998 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3001 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3004 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3007 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3010 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3013 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3016 +assert_return( + () => invoke($0, `f32x4.mul`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3019 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3022 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3025 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3028 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3031 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3034 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3037 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3040 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3043 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000008), + value("f32", 0.000000000000000000000000000000000000000000008), + value("f32", 0.000000000000000000000000000000000000000000008), + value("f32", 0.000000000000000000000000000000000000000000008), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3046 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000008), + value("f32", -0.000000000000000000000000000000000000000000008), + value("f32", -0.000000000000000000000000000000000000000000008), + value("f32", -0.000000000000000000000000000000000000000000008), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3049 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000000000000000000000000000000000007385849), + value("f32", 0.00000000000000000000000000000000000007385849), + value("f32", 0.00000000000000000000000000000000000007385849), + value("f32", 0.00000000000000000000000000000000000007385849), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3052 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.00000000000000000000000000000000000007385849), + value("f32", -0.00000000000000000000000000000000000007385849), + value("f32", -0.00000000000000000000000000000000000007385849), + value("f32", -0.00000000000000000000000000000000000007385849), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3055 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 3.1415927), + value("f32", 3.1415927), + value("f32", 3.1415927), + value("f32", 3.1415927), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3058 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -3.1415927), + value("f32", -3.1415927), + value("f32", -3.1415927), + value("f32", -3.1415927), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3061 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3064 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3067 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 39.47842), + value("f32", 39.47842), + value("f32", 39.47842), + value("f32", 39.47842), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3070 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -39.47842), + value("f32", -39.47842), + value("f32", -39.47842), + value("f32", -39.47842), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3073 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3076 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3079 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3082 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3085 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3088 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3091 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000008), + value("f32", -0.000000000000000000000000000000000000000000008), + value("f32", -0.000000000000000000000000000000000000000000008), + value("f32", -0.000000000000000000000000000000000000000000008), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3094 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000008), + value("f32", 0.000000000000000000000000000000000000000000008), + value("f32", 0.000000000000000000000000000000000000000000008), + value("f32", 0.000000000000000000000000000000000000000000008), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3097 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.00000000000000000000000000000000000007385849), + value("f32", -0.00000000000000000000000000000000000007385849), + value("f32", -0.00000000000000000000000000000000000007385849), + value("f32", -0.00000000000000000000000000000000000007385849), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3100 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000000000000000000000000000000000007385849), + value("f32", 0.00000000000000000000000000000000000007385849), + value("f32", 0.00000000000000000000000000000000000007385849), + value("f32", 0.00000000000000000000000000000000000007385849), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3103 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -3.1415927), + value("f32", -3.1415927), + value("f32", -3.1415927), + value("f32", -3.1415927), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3106 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 3.1415927), + value("f32", 3.1415927), + value("f32", 3.1415927), + value("f32", 3.1415927), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3109 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3112 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3115 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -39.47842), + value("f32", -39.47842), + value("f32", -39.47842), + value("f32", -39.47842), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3118 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 39.47842), + value("f32", 39.47842), + value("f32", 39.47842), + value("f32", 39.47842), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3121 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3124 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3127 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3130 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3133 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3136 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3139 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000047683713), + value("f32", 0.00000047683713), + value("f32", 0.00000047683713), + value("f32", 0.00000047683713), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3142 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.00000047683713), + value("f32", -0.00000047683713), + value("f32", -0.00000047683713), + value("f32", -0.00000047683713), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3145 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 3.9999998), + value("f32", 3.9999998), + value("f32", 3.9999998), + value("f32", 3.9999998), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3148 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -3.9999998), + value("f32", -3.9999998), + value("f32", -3.9999998), + value("f32", -3.9999998), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3151 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 170141170000000000000000000000000000000), + value("f32", 170141170000000000000000000000000000000), + value("f32", 170141170000000000000000000000000000000), + value("f32", 170141170000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3154 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -170141170000000000000000000000000000000), + value("f32", -170141170000000000000000000000000000000), + value("f32", -170141170000000000000000000000000000000), + value("f32", -170141170000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3157 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3160 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3163 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3166 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3169 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3172 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3175 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3178 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3181 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3184 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3187 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.00000047683713), + value("f32", -0.00000047683713), + value("f32", -0.00000047683713), + value("f32", -0.00000047683713), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3190 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000047683713), + value("f32", 0.00000047683713), + value("f32", 0.00000047683713), + value("f32", 0.00000047683713), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3193 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -3.9999998), + value("f32", -3.9999998), + value("f32", -3.9999998), + value("f32", -3.9999998), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3196 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 3.9999998), + value("f32", 3.9999998), + value("f32", 3.9999998), + value("f32", 3.9999998), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3199 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -170141170000000000000000000000000000000), + value("f32", -170141170000000000000000000000000000000), + value("f32", -170141170000000000000000000000000000000), + value("f32", -170141170000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3202 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 170141170000000000000000000000000000000), + value("f32", 170141170000000000000000000000000000000), + value("f32", 170141170000000000000000000000000000000), + value("f32", 170141170000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3205 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3208 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3211 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3214 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3217 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3220 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3223 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3226 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3229 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3232 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3235 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3238 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3241 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3244 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3247 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3250 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3253 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3256 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3259 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3262 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3265 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3268 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3271 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3274 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3277 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3280 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3283 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3286 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3289 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3292 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3295 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3298 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3301 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3304 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3307 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3310 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3313 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3316 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3319 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3322 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3325 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3328 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3331 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3334 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3337 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3340 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3343 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3346 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3349 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3352 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3355 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3358 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3361 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3364 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3367 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3370 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3373 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3376 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3379 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3382 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3385 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3388 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3391 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3394 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3397 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3400 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3403 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3406 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3409 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3412 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3415 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3418 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3421 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3424 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3427 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3430 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3433 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3436 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3439 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3442 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3445 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3448 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3451 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3454 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3457 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3460 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3463 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3466 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3469 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3472 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3475 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3478 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3481 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3484 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3487 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3490 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3493 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3496 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3499 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3502 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3505 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3508 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3511 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3514 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3517 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3520 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3523 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3526 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3529 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3532 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3535 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3538 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3541 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3544 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3547 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3550 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3553 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3556 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3559 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3562 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3565 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3568 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3571 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3574 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3577 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3580 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3583 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3586 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3589 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3592 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3595 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3598 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3601 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3604 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3607 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3610 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3613 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3616 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3619 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3622 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3625 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3628 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3631 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3634 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3637 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3640 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3643 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3646 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3649 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3652 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3655 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3658 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3661 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3664 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3667 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3670 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3673 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3676 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3679 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3682 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3685 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3688 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3691 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3694 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3697 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3700 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3703 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3706 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3709 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3712 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3715 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3718 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3721 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3724 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3727 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3730 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3733 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3736 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3739 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3742 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3745 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3748 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3751 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3754 +assert_return( + () => invoke($0, `f32x4.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3757 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 15241579000000000), + value("f32", 15241579000000000), + value("f32", 15241579000000000), + value("f32", 15241579000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3760 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3763 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3766 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000000000000000000015241579), + value("f32", 0.00000000000000000000015241579), + value("f32", 0.00000000000000000000015241579), + value("f32", 0.00000000000000000000015241579), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3769 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 15241579000000000), + value("f32", 15241579000000000), + value("f32", 15241579000000000), + value("f32", 15241579000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3772 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3775 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3778 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000000000000000000015241579), + value("f32", 0.00000000000000000000015241579), + value("f32", 0.00000000000000000000015241579), + value("f32", 0.00000000000000000000015241579), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3781 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 15241579000000000), + value("f32", 15241579000000000), + value("f32", 15241579000000000), + value("f32", 15241579000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3784 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3787 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3790 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000000000000000000015241579), + value("f32", 0.00000000000000000000015241579), + value("f32", 0.00000000000000000000015241579), + value("f32", 0.00000000000000000000015241579), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3793 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 6721627600000000000000000000000000), + value("f32", 6721627600000000000000000000000000), + value("f32", 6721627600000000000000000000000000), + value("f32", 6721627600000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3796 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3799 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3802 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 24453139000000000000000), + value("f32", 24453139000000000000000), + value("f32", 24453139000000000000000), + value("f32", 24453139000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3805 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 6721627600000000000000000000000000), + value("f32", 6721627600000000000000000000000000), + value("f32", 6721627600000000000000000000000000), + value("f32", 6721627600000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3808 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3811 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3814 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 24453139000000000000000), + value("f32", 24453139000000000000000), + value("f32", 24453139000000000000000), + value("f32", 24453139000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3817 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 6721627600000000000000000000000000), + value("f32", 6721627600000000000000000000000000), + value("f32", 6721627600000000000000000000000000), + value("f32", 6721627600000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3820 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3823 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3826 +assert_return( + () => invoke($0, `f32x4.mul`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 24453139000000000000000), + value("f32", 24453139000000000000000), + value("f32", 24453139000000000000000), + value("f32", 24453139000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3829 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3832 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3835 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3838 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3841 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3844 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3847 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3850 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3853 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3856 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3859 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3862 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3865 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3868 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3871 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3874 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3877 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3880 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3883 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3886 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3889 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3892 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3895 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3898 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3901 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3904 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3907 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3910 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3913 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3916 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3919 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3922 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3925 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3928 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3931 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3934 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3937 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000011920929), + value("f32", 0.00000011920929), + value("f32", 0.00000011920929), + value("f32", 0.00000011920929), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3940 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.00000011920929), + value("f32", -0.00000011920929), + value("f32", -0.00000011920929), + value("f32", -0.00000011920929), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3943 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000003), + value("f32", 0.000000000000000000000000000000000000000000003), + value("f32", 0.000000000000000000000000000000000000000000003), + value("f32", 0.000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3946 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000003), + value("f32", -0.000000000000000000000000000000000000000000003), + value("f32", -0.000000000000000000000000000000000000000000003), + value("f32", -0.000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3949 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3952 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3955 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3958 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3961 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3964 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3967 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3970 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3973 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3976 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3979 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3982 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3985 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.00000011920929), + value("f32", -0.00000011920929), + value("f32", -0.00000011920929), + value("f32", -0.00000011920929), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3988 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000011920929), + value("f32", 0.00000011920929), + value("f32", 0.00000011920929), + value("f32", 0.00000011920929), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3991 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000003), + value("f32", -0.000000000000000000000000000000000000000000003), + value("f32", -0.000000000000000000000000000000000000000000003), + value("f32", -0.000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3994 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000003), + value("f32", 0.000000000000000000000000000000000000000000003), + value("f32", 0.000000000000000000000000000000000000000000003), + value("f32", 0.000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:3997 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4000 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4003 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4006 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4009 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4012 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4015 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4018 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4021 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4024 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4027 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 8388608), + value("f32", 8388608), + value("f32", 8388608), + value("f32", 8388608), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4030 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -8388608), + value("f32", -8388608), + value("f32", -8388608), + value("f32", -8388608), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4033 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4036 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4039 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.000000000000000000000000000000000000023509887), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4042 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000023509887), + value("f32", -0.000000000000000000000000000000000000023509887), + value("f32", -0.000000000000000000000000000000000000023509887), + value("f32", -0.000000000000000000000000000000000000023509887), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4045 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4048 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4051 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000001870857), + value("f32", 0.000000000000000000000000000000000000001870857), + value("f32", 0.000000000000000000000000000000000000001870857), + value("f32", 0.000000000000000000000000000000000000001870857), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4054 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000001870857), + value("f32", -0.000000000000000000000000000000000000001870857), + value("f32", -0.000000000000000000000000000000000000001870857), + value("f32", -0.000000000000000000000000000000000000001870857), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4057 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4060 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4063 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4066 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4069 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4072 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4075 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -8388608), + value("f32", -8388608), + value("f32", -8388608), + value("f32", -8388608), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4078 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 8388608), + value("f32", 8388608), + value("f32", 8388608), + value("f32", 8388608), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4081 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4084 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4087 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000023509887), + value("f32", -0.000000000000000000000000000000000000023509887), + value("f32", -0.000000000000000000000000000000000000023509887), + value("f32", -0.000000000000000000000000000000000000023509887), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4090 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.000000000000000000000000000000000000023509887), + value("f32", 0.000000000000000000000000000000000000023509887), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4093 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4096 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4099 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000001870857), + value("f32", -0.000000000000000000000000000000000000001870857), + value("f32", -0.000000000000000000000000000000000000001870857), + value("f32", -0.000000000000000000000000000000000000001870857), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4102 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000001870857), + value("f32", 0.000000000000000000000000000000000000001870857), + value("f32", 0.000000000000000000000000000000000000001870857), + value("f32", 0.000000000000000000000000000000000000001870857), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4105 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4108 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4111 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4114 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4117 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4120 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4123 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4126 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4129 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42535296000000000000000000000000000000), + value("f32", 42535296000000000000000000000000000000), + value("f32", 42535296000000000000000000000000000000), + value("f32", 42535296000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4132 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -42535296000000000000000000000000000000), + value("f32", -42535296000000000000000000000000000000), + value("f32", -42535296000000000000000000000000000000), + value("f32", -42535296000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4135 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4138 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4141 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4144 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4147 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.07957747), + value("f32", 0.07957747), + value("f32", 0.07957747), + value("f32", 0.07957747), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4150 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.07957747), + value("f32", -0.07957747), + value("f32", -0.07957747), + value("f32", -0.07957747), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4153 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000001469368), + value("f32", 0.000000000000000000000000000000000000001469368), + value("f32", 0.000000000000000000000000000000000000001469368), + value("f32", 0.000000000000000000000000000000000000001469368), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4156 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000001469368), + value("f32", -0.000000000000000000000000000000000000001469368), + value("f32", -0.000000000000000000000000000000000000001469368), + value("f32", -0.000000000000000000000000000000000000001469368), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4159 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4162 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4165 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4168 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4171 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4174 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4177 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -42535296000000000000000000000000000000), + value("f32", -42535296000000000000000000000000000000), + value("f32", -42535296000000000000000000000000000000), + value("f32", -42535296000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4180 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42535296000000000000000000000000000000), + value("f32", 42535296000000000000000000000000000000), + value("f32", 42535296000000000000000000000000000000), + value("f32", 42535296000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4183 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4186 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4189 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4192 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4195 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.07957747), + value("f32", -0.07957747), + value("f32", -0.07957747), + value("f32", -0.07957747), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4198 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.07957747), + value("f32", 0.07957747), + value("f32", 0.07957747), + value("f32", 0.07957747), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4201 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000001469368), + value("f32", -0.000000000000000000000000000000000000001469368), + value("f32", -0.000000000000000000000000000000000000001469368), + value("f32", -0.000000000000000000000000000000000000001469368), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4204 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000001469368), + value("f32", 0.000000000000000000000000000000000000001469368), + value("f32", 0.000000000000000000000000000000000000001469368), + value("f32", 0.000000000000000000000000000000000000001469368), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4207 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4210 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4213 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4216 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4219 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4222 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4225 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 85070590000000000000000000000000000000), + value("f32", 85070590000000000000000000000000000000), + value("f32", 85070590000000000000000000000000000000), + value("f32", 85070590000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4228 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -85070590000000000000000000000000000000), + value("f32", -85070590000000000000000000000000000000), + value("f32", -85070590000000000000000000000000000000), + value("f32", -85070590000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4231 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 2), + value("f32", 2), + value("f32", 2), + value("f32", 2), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4234 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -2), + value("f32", -2), + value("f32", -2), + value("f32", -2), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4237 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4240 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4243 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.15915494), + value("f32", 0.15915494), + value("f32", 0.15915494), + value("f32", 0.15915494), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4246 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.15915494), + value("f32", -0.15915494), + value("f32", -0.15915494), + value("f32", -0.15915494), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4249 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000002938736), + value("f32", 0.000000000000000000000000000000000000002938736), + value("f32", 0.000000000000000000000000000000000000002938736), + value("f32", 0.000000000000000000000000000000000000002938736), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4252 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000002938736), + value("f32", -0.000000000000000000000000000000000000002938736), + value("f32", -0.000000000000000000000000000000000000002938736), + value("f32", -0.000000000000000000000000000000000000002938736), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4255 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4258 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4261 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4264 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4267 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4270 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4273 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -85070590000000000000000000000000000000), + value("f32", -85070590000000000000000000000000000000), + value("f32", -85070590000000000000000000000000000000), + value("f32", -85070590000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4276 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 85070590000000000000000000000000000000), + value("f32", 85070590000000000000000000000000000000), + value("f32", 85070590000000000000000000000000000000), + value("f32", 85070590000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4279 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -2), + value("f32", -2), + value("f32", -2), + value("f32", -2), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4282 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 2), + value("f32", 2), + value("f32", 2), + value("f32", 2), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4285 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4288 +assert_return( + () => invoke($0, `f32x4.div`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4291 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.15915494), + value("f32", -0.15915494), + value("f32", -0.15915494), + value("f32", -0.15915494), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4294 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.15915494), + value("f32", 0.15915494), + value("f32", 0.15915494), + value("f32", 0.15915494), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4297 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000002938736), + value("f32", -0.000000000000000000000000000000000000002938736), + value("f32", -0.000000000000000000000000000000000000002938736), + value("f32", -0.000000000000000000000000000000000000002938736), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4300 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000002938736), + value("f32", 0.000000000000000000000000000000000000002938736), + value("f32", 0.000000000000000000000000000000000000002938736), + value("f32", 0.000000000000000000000000000000000000002938736), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4303 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4306 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4309 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4312 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4315 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4318 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4321 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4324 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4327 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 12.566371), + value("f32", 12.566371), + value("f32", 12.566371), + value("f32", 12.566371), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4330 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -12.566371), + value("f32", -12.566371), + value("f32", -12.566371), + value("f32", -12.566371), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4333 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4336 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4339 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4342 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4345 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000018464624), + value("f32", 0.000000000000000000000000000000000000018464624), + value("f32", 0.000000000000000000000000000000000000018464624), + value("f32", 0.000000000000000000000000000000000000018464624), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4348 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000018464624), + value("f32", -0.000000000000000000000000000000000000018464624), + value("f32", -0.000000000000000000000000000000000000018464624), + value("f32", -0.000000000000000000000000000000000000018464624), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4351 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4354 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4357 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4360 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4363 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4366 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4369 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4372 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4375 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -12.566371), + value("f32", -12.566371), + value("f32", -12.566371), + value("f32", -12.566371), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4378 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 12.566371), + value("f32", 12.566371), + value("f32", 12.566371), + value("f32", 12.566371), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4381 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4384 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4387 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4390 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4393 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000018464624), + value("f32", -0.000000000000000000000000000000000000018464624), + value("f32", -0.000000000000000000000000000000000000018464624), + value("f32", -0.000000000000000000000000000000000000018464624), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4396 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000018464624), + value("f32", 0.000000000000000000000000000000000000018464624), + value("f32", 0.000000000000000000000000000000000000018464624), + value("f32", 0.000000000000000000000000000000000000018464624), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4399 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4402 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4405 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4408 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4411 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4414 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4417 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4420 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4423 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4426 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4429 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4432 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4435 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 54157613000000000000000000000000000000), + value("f32", 54157613000000000000000000000000000000), + value("f32", 54157613000000000000000000000000000000), + value("f32", 54157613000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4438 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -54157613000000000000000000000000000000), + value("f32", -54157613000000000000000000000000000000), + value("f32", -54157613000000000000000000000000000000), + value("f32", -54157613000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4441 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4444 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4447 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4450 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4453 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4456 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4459 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4462 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4465 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4468 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4471 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4474 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4477 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4480 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4483 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -54157613000000000000000000000000000000), + value("f32", -54157613000000000000000000000000000000), + value("f32", -54157613000000000000000000000000000000), + value("f32", -54157613000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4486 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 54157613000000000000000000000000000000), + value("f32", 54157613000000000000000000000000000000), + value("f32", 54157613000000000000000000000000000000), + value("f32", 54157613000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4489 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4492 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4495 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4498 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4501 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4504 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4507 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4510 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4513 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4516 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4519 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4522 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4525 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4528 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4531 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4534 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4537 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4540 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4543 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4546 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4549 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4552 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4555 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4558 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4561 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4564 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4567 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4570 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4573 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4576 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4579 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4582 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4585 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4588 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4591 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4594 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4597 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4600 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4603 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4606 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4609 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4612 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4615 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4618 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4621 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4624 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4627 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4630 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4633 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4636 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4639 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4642 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4645 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4648 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4651 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4654 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4657 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4660 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4663 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4666 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4669 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4672 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4675 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4678 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4681 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4684 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4687 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4690 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4693 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4696 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4699 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4702 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4705 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4708 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4711 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4714 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4717 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4720 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4723 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4726 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4729 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4732 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4735 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4738 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4741 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4744 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4747 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4750 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4753 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4756 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4759 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4762 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4765 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4768 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4771 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4774 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4777 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4780 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4783 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4786 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4789 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4792 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4795 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4798 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4801 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4804 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4807 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4810 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4813 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4816 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4819 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4822 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4825 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4828 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4831 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4834 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4837 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4840 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4843 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4846 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4849 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4852 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4855 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4858 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4861 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4864 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4867 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4870 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4873 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4876 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4879 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4882 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4885 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4888 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4891 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4894 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4897 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4900 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4903 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4906 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4909 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4912 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4915 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4918 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4921 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4924 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4927 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4930 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4933 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4936 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4939 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4942 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4945 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4948 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4951 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4954 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4957 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4960 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4963 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4966 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4969 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4972 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4975 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4978 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4981 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4984 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4987 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4990 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4993 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4996 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:4999 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5002 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5005 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5008 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5011 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5014 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5017 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5020 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5023 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5026 +assert_return( + () => invoke($0, `f32x4.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5029 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5032 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5035 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5038 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5041 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5044 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5047 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5050 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5053 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5056 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5059 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5062 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5065 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5068 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5071 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5074 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5077 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5080 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5083 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5086 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5089 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5092 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5095 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5098 +assert_return( + () => invoke($0, `f32x4.div`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5101 +assert_return( + () => invoke($0, `f32x4.sqrt`, [f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5103 +assert_return( + () => invoke($0, `f32x4.sqrt`, [f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5105 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000000000000000000003743392), + value("f32", 0.00000000000000000000003743392), + value("f32", 0.00000000000000000000003743392), + value("f32", 0.00000000000000000000003743392), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5107 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5109 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000000000000000010842022), + value("f32", 0.00000000000000000010842022), + value("f32", 0.00000000000000000010842022), + value("f32", 0.00000000000000000010842022), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5111 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5113 +assert_return( + () => invoke($0, `f32x4.sqrt`, [f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.70710677), + value("f32", 0.70710677), + value("f32", 0.70710677), + value("f32", 0.70710677), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5115 +assert_return( + () => invoke($0, `f32x4.sqrt`, [f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5117 +assert_return( + () => invoke($0, `f32x4.sqrt`, [f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5119 +assert_return( + () => invoke($0, `f32x4.sqrt`, [f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5121 +assert_return( + () => invoke($0, `f32x4.sqrt`, [f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855])]), + [ + new F32x4Pattern( + value("f32", 2.5066283), + value("f32", 2.5066283), + value("f32", 2.5066283), + value("f32", 2.5066283), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5123 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5125 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 18446743000000000000), + value("f32", 18446743000000000000), + value("f32", 18446743000000000000), + value("f32", 18446743000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5127 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5129 +assert_return( + () => invoke($0, `f32x4.sqrt`, [f32x4([Infinity, Infinity, Infinity, Infinity])]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5131 +assert_return( + () => invoke($0, `f32x4.sqrt`, [f32x4([-Infinity, -Infinity, -Infinity, -Infinity])]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5133 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5135 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5137 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5139 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5141 +assert_return( + () => invoke($0, `f32x4.sqrt`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", 11111.111), + value("f32", 11111.111), + value("f32", 11111.111), + value("f32", 11111.111), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5143 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 35136419000000), + value("f32", 35136419000000), + value("f32", 35136419000000), + value("f32", 35136419000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5145 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 35136419000000), + value("f32", 35136419000000), + value("f32", 35136419000000), + value("f32", 35136419000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5147 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.0000035136418), + value("f32", 0.0000035136418), + value("f32", 0.0000035136418), + value("f32", 0.0000035136418), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5149 +assert_return( + () => invoke($0, `f32x4.sqrt`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", 11111.111), + value("f32", 11111.111), + value("f32", 11111.111), + value("f32", 11111.111), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5151 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 35136419000000), + value("f32", 35136419000000), + value("f32", 35136419000000), + value("f32", 35136419000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5153 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 35136419000000), + value("f32", 35136419000000), + value("f32", 35136419000000), + value("f32", 35136419000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5155 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.0000035136418), + value("f32", 0.0000035136418), + value("f32", 0.0000035136418), + value("f32", 0.0000035136418), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5157 +assert_return( + () => invoke($0, `f32x4.sqrt`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", 11111.111), + value("f32", 11111.111), + value("f32", 11111.111), + value("f32", 11111.111), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5159 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 35136419000000), + value("f32", 35136419000000), + value("f32", 35136419000000), + value("f32", 35136419000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5161 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 35136419000000), + value("f32", 35136419000000), + value("f32", 35136419000000), + value("f32", 35136419000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5163 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.0000035136418), + value("f32", 0.0000035136418), + value("f32", 0.0000035136418), + value("f32", 0.0000035136418), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5165 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 286331170), + value("f32", 286331170), + value("f32", 286331170), + value("f32", 286331170), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5167 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 207325900000), + value("f32", 207325900000), + value("f32", 207325900000), + value("f32", 207325900000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5169 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 207325900000), + value("f32", 207325900000), + value("f32", 207325900000), + value("f32", 207325900000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5171 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 395442.78), + value("f32", 395442.78), + value("f32", 395442.78), + value("f32", 395442.78), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5173 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 286331170), + value("f32", 286331170), + value("f32", 286331170), + value("f32", 286331170), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5175 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 207325900000), + value("f32", 207325900000), + value("f32", 207325900000), + value("f32", 207325900000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5177 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 207325900000), + value("f32", 207325900000), + value("f32", 207325900000), + value("f32", 207325900000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5179 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 395442.78), + value("f32", 395442.78), + value("f32", 395442.78), + value("f32", 395442.78), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5181 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 286331170), + value("f32", 286331170), + value("f32", 286331170), + value("f32", 286331170), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5183 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 207325900000), + value("f32", 207325900000), + value("f32", 207325900000), + value("f32", 207325900000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5185 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 207325900000), + value("f32", 207325900000), + value("f32", 207325900000), + value("f32", 207325900000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5187 +assert_return( + () => invoke($0, `f32x4.sqrt`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 395442.78), + value("f32", 395442.78), + value("f32", 395442.78), + value("f32", 395442.78), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5189 +assert_return( + () => invoke($0, `f32x4.neg`, [f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5191 +assert_return( + () => invoke($0, `f32x4.neg`, [f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5193 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5195 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5197 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5199 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5201 +assert_return( + () => invoke($0, `f32x4.neg`, [f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5203 +assert_return( + () => invoke($0, `f32x4.neg`, [f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5205 +assert_return( + () => invoke($0, `f32x4.neg`, [f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5207 +assert_return( + () => invoke($0, `f32x4.neg`, [f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5209 +assert_return( + () => invoke($0, `f32x4.neg`, [f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855])]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5211 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5213 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5215 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5217 +assert_return( + () => invoke($0, `f32x4.neg`, [f32x4([Infinity, Infinity, Infinity, Infinity])]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5219 +assert_return( + () => invoke($0, `f32x4.neg`, [f32x4([-Infinity, -Infinity, -Infinity, -Infinity])]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5221 +assert_return( + () => invoke($0, `f32x4.neg`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5223 +assert_return( + () => invoke($0, `f32x4.neg`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5225 +assert_return( + () => invoke($0, `f32x4.neg`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5227 +assert_return( + () => invoke($0, `f32x4.neg`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5229 +assert_return( + () => invoke($0, `f32x4.neg`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5231 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5233 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5235 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000012345679), + value("f32", -0.000000000012345679), + value("f32", -0.000000000012345679), + value("f32", -0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5237 +assert_return( + () => invoke($0, `f32x4.neg`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5239 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5241 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5243 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000012345679), + value("f32", -0.000000000012345679), + value("f32", -0.000000000012345679), + value("f32", -0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5245 +assert_return( + () => invoke($0, `f32x4.neg`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + value("f32", -123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5247 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5249 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + value("f32", -1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5251 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000012345679), + value("f32", -0.000000000012345679), + value("f32", -0.000000000012345679), + value("f32", -0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5253 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -81985530000000000), + value("f32", -81985530000000000), + value("f32", -81985530000000000), + value("f32", -81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5255 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5257 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5259 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -156374990000), + value("f32", -156374990000), + value("f32", -156374990000), + value("f32", -156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5261 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -81985530000000000), + value("f32", -81985530000000000), + value("f32", -81985530000000000), + value("f32", -81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5263 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5265 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5267 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -156374990000), + value("f32", -156374990000), + value("f32", -156374990000), + value("f32", -156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5269 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -81985530000000000), + value("f32", -81985530000000000), + value("f32", -81985530000000000), + value("f32", -81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5271 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5273 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + value("f32", -42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5275 +assert_return( + () => invoke($0, `f32x4.neg`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -156374990000), + value("f32", -156374990000), + value("f32", -156374990000), + value("f32", -156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5280 +let $1 = instantiate(`(module + + (func (export "f32x4_sqrt_arith") (result v128) + (f32x4.sqrt (v128.const f32x4 nan:0x200000 -nan:0x200000 16.0 25.0))) + (func (export "f32x4_sqrt_canon") (result v128) + (f32x4.sqrt (v128.const f32x4 -1.0 nan 4.0 9.0))) + (func (export "f32x4_sqrt_mixed") (result v128) + (f32x4.sqrt (v128.const f32x4 -inf nan:0x200000 36.0 49.0))) +)`); + +// ./test/core/simd/simd_f32x4_arith.wast:5290 +assert_return( + () => invoke($1, `f32x4_sqrt_arith`, []), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + value("f32", 4), + value("f32", 5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5291 +assert_return( + () => invoke($1, `f32x4_sqrt_canon`, []), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + value("f32", 2), + value("f32", 3), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5292 +assert_return( + () => invoke($1, `f32x4_sqrt_mixed`, []), + [ + new F32x4Pattern( + `canonical_nan`, + `arithmetic_nan`, + value("f32", 6), + value("f32", 7), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5295 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.neg (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5296 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.sqrt (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5297 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.add (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5298 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.sub (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5299 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.mul (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5300 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.div (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5304 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.neg-arg-empty (result v128) + (f32x4.neg) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5312 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.sqrt-arg-empty (result v128) + (f32x4.sqrt) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5320 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.add-1st-arg-empty (result v128) + (f32x4.add (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5328 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.add-arg-empty (result v128) + (f32x4.add) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5336 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.sub-1st-arg-empty (result v128) + (f32x4.sub (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5344 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.sub-arg-empty (result v128) + (f32x4.sub) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5352 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.mul-1st-arg-empty (result v128) + (f32x4.mul (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5360 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.mul-arg-empty (result v128) + (f32x4.mul) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5368 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.div-1st-arg-empty (result v128) + (f32x4.div (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5376 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.div-arg-empty (result v128) + (f32x4.div) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_arith.wast:5386 +let $2 = instantiate(`(module + (func (export "add-sub") (param v128 v128 v128) (result v128) + (f32x4.add (f32x4.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "div-add") (param v128 v128 v128) (result v128) + (f32x4.div (f32x4.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "div-mul") (param v128 v128 v128) (result v128) + (f32x4.div (f32x4.mul (local.get 0) (local.get 1))(local.get 2))) + (func (export "div-sub") (param v128 v128 v128) (result v128) + (f32x4.div (f32x4.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "mul-add") (param v128 v128 v128) (result v128) + (f32x4.mul (f32x4.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "mul-div") (param v128 v128 v128) (result v128) + (f32x4.mul (f32x4.div (local.get 0) (local.get 1))(local.get 2))) + (func (export "mul-sub") (param v128 v128 v128) (result v128) + (f32x4.mul (f32x4.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "sub-add") (param v128 v128 v128) (result v128) + (f32x4.sub (f32x4.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "add-neg") (param v128 v128) (result v128) + (f32x4.add (f32x4.neg (local.get 0)) (local.get 1))) + (func (export "add-sqrt") (param v128 v128) (result v128) + (f32x4.add (f32x4.sqrt (local.get 0)) (local.get 1))) + (func (export "div-neg") (param v128 v128) (result v128) + (f32x4.div (f32x4.neg (local.get 0)) (local.get 1))) + (func (export "div-sqrt") (param v128 v128) (result v128) + (f32x4.div (f32x4.sqrt (local.get 0)) (local.get 1))) + (func (export "mul-neg") (param v128 v128) (result v128) + (f32x4.mul (f32x4.neg (local.get 0)) (local.get 1))) + (func (export "mul-sqrt") (param v128 v128) (result v128) + (f32x4.mul (f32x4.sqrt (local.get 0)) (local.get 1))) + (func (export "sub-neg") (param v128 v128) (result v128) + (f32x4.sub (f32x4.neg (local.get 0)) (local.get 1))) + (func (export "sub-sqrt") (param v128 v128) (result v128) + (f32x4.sub (f32x4.sqrt (local.get 0)) (local.get 1))) +)`); + +// ./test/core/simd/simd_f32x4_arith.wast:5421 +assert_return( + () => invoke($2, `add-sub`, [ + f32x4([1.125, 1.125, 1.125, 1.125]), + f32x4([0.25, 0.25, 0.25, 0.25]), + f32x4([0.125, 0.125, 0.125, 0.125]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5425 +assert_return( + () => invoke($2, `div-add`, [ + f32x4([1.125, 1.125, 1.125, 1.125]), + f32x4([0.125, 0.125, 0.125, 0.125]), + f32x4([0.25, 0.25, 0.25, 0.25]), + ]), + [ + new F32x4Pattern( + value("f32", 5), + value("f32", 5), + value("f32", 5), + value("f32", 5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5429 +assert_return( + () => invoke($2, `div-mul`, [ + f32x4([1.125, 1.125, 1.125, 1.125]), + f32x4([4, 4, 4, 4]), + f32x4([0.25, 0.25, 0.25, 0.25]), + ]), + [ + new F32x4Pattern( + value("f32", 18), + value("f32", 18), + value("f32", 18), + value("f32", 18), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5433 +assert_return( + () => invoke($2, `div-sub`, [ + f32x4([1.125, 1.125, 1.125, 1.125]), + f32x4([0.125, 0.125, 0.125, 0.125]), + f32x4([0.25, 0.25, 0.25, 0.25]), + ]), + [ + new F32x4Pattern( + value("f32", 4), + value("f32", 4), + value("f32", 4), + value("f32", 4), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5437 +assert_return( + () => invoke($2, `mul-add`, [ + f32x4([1.25, 1.25, 1.25, 1.25]), + f32x4([0.25, 0.25, 0.25, 0.25]), + f32x4([0.25, 0.25, 0.25, 0.25]), + ]), + [ + new F32x4Pattern( + value("f32", 0.375), + value("f32", 0.375), + value("f32", 0.375), + value("f32", 0.375), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5441 +assert_return( + () => invoke($2, `mul-div`, [ + f32x4([1.125, 1.125, 1.125, 1.125]), + f32x4([0.125, 0.125, 0.125, 0.125]), + f32x4([0.25, 0.25, 0.25, 0.25]), + ]), + [ + new F32x4Pattern( + value("f32", 2.25), + value("f32", 2.25), + value("f32", 2.25), + value("f32", 2.25), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5445 +assert_return( + () => invoke($2, `mul-sub`, [ + f32x4([1.125, 1.125, 1.125, 1.125]), + f32x4([0.125, 0.125, 0.125, 0.125]), + f32x4([0.25, 0.25, 0.25, 0.25]), + ]), + [ + new F32x4Pattern( + value("f32", 0.25), + value("f32", 0.25), + value("f32", 0.25), + value("f32", 0.25), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5449 +assert_return( + () => invoke($2, `sub-add`, [ + f32x4([1.125, 1.125, 1.125, 1.125]), + f32x4([0.25, 0.25, 0.25, 0.25]), + f32x4([0.125, 0.125, 0.125, 0.125]), + ]), + [ + new F32x4Pattern( + value("f32", 1.25), + value("f32", 1.25), + value("f32", 1.25), + value("f32", 1.25), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5453 +assert_return( + () => invoke($2, `add-neg`, [ + f32x4([1.125, 1.125, 1.125, 1.125]), + f32x4([0.125, 0.125, 0.125, 0.125]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5456 +assert_return( + () => invoke($2, `add-sqrt`, [ + f32x4([2.25, 2.25, 2.25, 2.25]), + f32x4([0.25, 0.25, 0.25, 0.25]), + ]), + [ + new F32x4Pattern( + value("f32", 1.75), + value("f32", 1.75), + value("f32", 1.75), + value("f32", 1.75), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5459 +assert_return( + () => invoke($2, `div-neg`, [ + f32x4([1.5, 1.5, 1.5, 1.5]), + f32x4([0.25, 0.25, 0.25, 0.25]), + ]), + [ + new F32x4Pattern( + value("f32", -6), + value("f32", -6), + value("f32", -6), + value("f32", -6), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5462 +assert_return( + () => invoke($2, `div-sqrt`, [ + f32x4([2.25, 2.25, 2.25, 2.25]), + f32x4([0.25, 0.25, 0.25, 0.25]), + ]), + [ + new F32x4Pattern( + value("f32", 6), + value("f32", 6), + value("f32", 6), + value("f32", 6), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5465 +assert_return( + () => invoke($2, `mul-neg`, [ + f32x4([1.5, 1.5, 1.5, 1.5]), + f32x4([0.25, 0.25, 0.25, 0.25]), + ]), + [ + new F32x4Pattern( + value("f32", -0.375), + value("f32", -0.375), + value("f32", -0.375), + value("f32", -0.375), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5468 +assert_return( + () => invoke($2, `mul-sqrt`, [ + f32x4([2.25, 2.25, 2.25, 2.25]), + f32x4([0.25, 0.25, 0.25, 0.25]), + ]), + [ + new F32x4Pattern( + value("f32", 0.375), + value("f32", 0.375), + value("f32", 0.375), + value("f32", 0.375), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5471 +assert_return( + () => invoke($2, `sub-neg`, [ + f32x4([1.125, 1.125, 1.125, 1.125]), + f32x4([0.125, 0.125, 0.125, 0.125]), + ]), + [ + new F32x4Pattern( + value("f32", -1.25), + value("f32", -1.25), + value("f32", -1.25), + value("f32", -1.25), + ), + ], +); + +// ./test/core/simd/simd_f32x4_arith.wast:5474 +assert_return( + () => invoke($2, `sub-sqrt`, [ + f32x4([2.25, 2.25, 2.25, 2.25]), + f32x4([0.25, 0.25, 0.25, 0.25]), + ]), + [ + new F32x4Pattern( + value("f32", 1.25), + value("f32", 1.25), + value("f32", 1.25), + value("f32", 1.25), + ), + ], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_cmp.wast.js new file mode 100644 index 0000000000..e11d19597a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_cmp.wast.js @@ -0,0 +1,47701 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_f32x4_cmp.wast + +// ./test/core/simd/simd_f32x4_cmp.wast:3 +let $0 = instantiate(`(module + (func (export "eq") (param $$x v128) (param $$y v128) (result v128) (f32x4.eq (local.get $$x) (local.get $$y))) + (func (export "ne") (param $$x v128) (param $$y v128) (result v128) (f32x4.ne (local.get $$x) (local.get $$y))) + (func (export "lt") (param $$x v128) (param $$y v128) (result v128) (f32x4.lt (local.get $$x) (local.get $$y))) + (func (export "le") (param $$x v128) (param $$y v128) (result v128) (f32x4.le (local.get $$x) (local.get $$y))) + (func (export "gt") (param $$x v128) (param $$y v128) (result v128) (f32x4.gt (local.get $$x) (local.get $$y))) + (func (export "ge") (param $$x v128) (param $$y v128) (result v128) (f32x4.ge (local.get $$x) (local.get $$y))) +)`); + +// ./test/core/simd/simd_f32x4_cmp.wast:13 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:16 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:19 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:22 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:25 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:28 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:31 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:34 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:37 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:40 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:43 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:46 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:49 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:52 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:55 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:58 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:61 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:64 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:67 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:70 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:73 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:76 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:79 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:82 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:85 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:88 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:91 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:94 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:97 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:100 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:103 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:106 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:109 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:112 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:115 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:118 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:121 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:124 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:127 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:130 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:133 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:136 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:139 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:142 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:145 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:148 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:151 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:154 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:157 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:160 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:163 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:166 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:169 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:172 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:175 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:178 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:181 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:184 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:187 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:190 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:193 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:196 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:199 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:202 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:205 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:208 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:211 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:214 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:217 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:220 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:223 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:226 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:229 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:232 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:235 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:238 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:241 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:244 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:247 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:250 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:253 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:256 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:259 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:262 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:265 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:268 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:271 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:274 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:277 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:280 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:283 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:286 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:289 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:292 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:295 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:298 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:301 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:304 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:307 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:310 +assert_return( + () => invoke($0, `eq`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:313 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:316 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:319 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:322 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:325 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:328 +assert_return( + () => invoke($0, `eq`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:331 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:334 +assert_return( + () => invoke($0, `eq`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:337 +assert_return( + () => invoke($0, `eq`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:340 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:343 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:346 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:349 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:352 +assert_return( + () => invoke($0, `eq`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:355 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:358 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:361 +assert_return( + () => invoke($0, `eq`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:364 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:367 +assert_return( + () => invoke($0, `eq`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:370 +assert_return( + () => invoke($0, `eq`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:373 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:376 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:379 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:382 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:385 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:388 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:391 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:394 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:397 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:400 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:403 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:406 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:409 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:412 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:415 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:418 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:421 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:424 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:427 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:430 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:433 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:436 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:439 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:442 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:445 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:448 +assert_return( + () => invoke($0, `eq`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:451 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:454 +assert_return( + () => invoke($0, `eq`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:457 +assert_return( + () => invoke($0, `eq`, [f32x4([-0, -0, -0, -0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:460 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:463 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:466 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:469 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:472 +assert_return( + () => invoke($0, `eq`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:475 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:478 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:481 +assert_return( + () => invoke($0, `eq`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:484 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:487 +assert_return( + () => invoke($0, `eq`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:490 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:493 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:496 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:499 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:502 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:505 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:508 +assert_return( + () => invoke($0, `eq`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:511 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:514 +assert_return( + () => invoke($0, `eq`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:517 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:520 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:523 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:526 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:529 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:532 +assert_return( + () => invoke($0, `eq`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:535 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:538 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:541 +assert_return( + () => invoke($0, `eq`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:544 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:547 +assert_return( + () => invoke($0, `eq`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:550 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:553 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:556 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:559 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:562 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:565 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:568 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:571 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:574 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:577 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:580 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:583 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:586 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:589 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:592 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:595 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:598 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:601 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:604 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:607 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:610 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:613 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:616 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:619 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:622 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:625 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:628 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:631 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:634 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:637 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:640 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:643 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:646 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:649 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:652 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:655 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:658 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:661 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:664 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:667 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:670 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:673 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:676 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:679 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:682 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:685 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:688 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:691 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:694 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:697 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:700 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:703 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:706 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:709 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:712 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:715 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:718 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:721 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:724 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:727 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:730 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:733 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:736 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:739 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:742 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:745 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:748 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:751 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:754 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:757 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:760 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:763 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:766 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:769 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:772 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:775 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:778 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:781 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:784 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:787 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:790 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:793 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:796 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:799 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:802 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:805 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:808 +assert_return( + () => invoke($0, `eq`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:811 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:814 +assert_return( + () => invoke($0, `eq`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:817 +assert_return( + () => invoke($0, `eq`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:820 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:823 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:826 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:829 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:832 +assert_return( + () => invoke($0, `eq`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:835 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:838 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:841 +assert_return( + () => invoke($0, `eq`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:844 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:847 +assert_return( + () => invoke($0, `eq`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:850 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:853 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:856 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:859 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:862 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:865 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:868 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:871 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:874 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:877 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:880 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:883 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:886 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:889 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:892 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:895 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:898 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:901 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:904 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:907 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:910 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:913 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:916 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:919 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:922 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:925 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:928 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:931 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:934 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:937 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:940 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:943 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:946 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:949 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:952 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:955 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:958 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:961 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:964 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:967 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:970 +assert_return( + () => invoke($0, `eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:973 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:976 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:979 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:982 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:985 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:988 +assert_return( + () => invoke($0, `eq`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:991 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:994 +assert_return( + () => invoke($0, `eq`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:997 +assert_return( + () => invoke($0, `eq`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1000 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1003 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1006 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1009 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1012 +assert_return( + () => invoke($0, `eq`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1015 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1018 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1021 +assert_return( + () => invoke($0, `eq`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1024 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1027 +assert_return( + () => invoke($0, `eq`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1030 +assert_return( + () => invoke($0, `eq`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1033 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1036 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1039 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1042 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1045 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1048 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1051 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1054 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1057 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1060 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1063 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1066 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1069 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1072 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1075 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1078 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1081 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1084 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1087 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1090 +assert_return( + () => invoke($0, `eq`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1093 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1096 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1099 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1102 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1105 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1108 +assert_return( + () => invoke($0, `eq`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1111 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1114 +assert_return( + () => invoke($0, `eq`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1117 +assert_return( + () => invoke($0, `eq`, [f32x4([-1, -1, -1, -1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1120 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1123 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1126 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1129 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1132 +assert_return( + () => invoke($0, `eq`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1135 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1138 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1141 +assert_return( + () => invoke($0, `eq`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1144 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1147 +assert_return( + () => invoke($0, `eq`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1150 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1153 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1156 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1159 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1162 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1165 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1168 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1171 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1174 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1177 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1180 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1183 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1186 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1189 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1192 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1195 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1198 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1201 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1204 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1207 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1210 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1213 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1216 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1219 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1222 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1225 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1228 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1231 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1234 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1237 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1240 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1243 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1246 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1249 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1252 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1255 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1258 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1261 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1264 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1267 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1270 +assert_return( + () => invoke($0, `eq`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1273 +assert_return( + () => invoke($0, `eq`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1276 +assert_return( + () => invoke($0, `eq`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1279 +assert_return( + () => invoke($0, `eq`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1282 +assert_return( + () => invoke($0, `eq`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1285 +assert_return( + () => invoke($0, `eq`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1290 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1293 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1296 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1299 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1302 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1305 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1308 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1311 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1314 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1317 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1320 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1323 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1326 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1329 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1332 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1335 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1338 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1341 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1344 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1347 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1350 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1353 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1356 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1359 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1362 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1365 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1368 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1371 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1374 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1377 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1380 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1383 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1386 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1389 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1392 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1395 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1398 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1401 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1404 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1407 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1410 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1413 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1416 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1419 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1422 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1425 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1428 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1431 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1434 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1437 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1440 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1443 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1446 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1449 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1452 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1455 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1458 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1461 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1464 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1467 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1470 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1473 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1476 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1479 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1482 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1485 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1488 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1491 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1494 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1497 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1500 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1503 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1506 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1509 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1512 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1515 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1518 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1521 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1524 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1527 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1530 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1533 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1536 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1539 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1542 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1545 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1548 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1551 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1554 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1557 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1560 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1563 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1566 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1569 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1572 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1575 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1578 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1581 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1584 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1587 +assert_return( + () => invoke($0, `ne`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1590 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1593 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1596 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1599 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1602 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1605 +assert_return( + () => invoke($0, `ne`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1608 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1611 +assert_return( + () => invoke($0, `ne`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1614 +assert_return( + () => invoke($0, `ne`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1617 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1620 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1623 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1626 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1629 +assert_return( + () => invoke($0, `ne`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1632 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1635 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1638 +assert_return( + () => invoke($0, `ne`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1641 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1644 +assert_return( + () => invoke($0, `ne`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1647 +assert_return( + () => invoke($0, `ne`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1650 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1653 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1656 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1659 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1662 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1665 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1668 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1671 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1674 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1677 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1680 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1683 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1686 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1689 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1692 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1695 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1698 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1701 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1704 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1707 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1710 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1713 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1716 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1719 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1722 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1725 +assert_return( + () => invoke($0, `ne`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1728 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1731 +assert_return( + () => invoke($0, `ne`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1734 +assert_return( + () => invoke($0, `ne`, [f32x4([-0, -0, -0, -0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1737 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1740 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1743 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1746 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1749 +assert_return( + () => invoke($0, `ne`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1752 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1755 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1758 +assert_return( + () => invoke($0, `ne`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1761 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1764 +assert_return( + () => invoke($0, `ne`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1767 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1770 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1773 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1776 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1779 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1782 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1785 +assert_return( + () => invoke($0, `ne`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1788 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1791 +assert_return( + () => invoke($0, `ne`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1794 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1797 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1800 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1803 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1806 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1809 +assert_return( + () => invoke($0, `ne`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1812 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1815 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1818 +assert_return( + () => invoke($0, `ne`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1821 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1824 +assert_return( + () => invoke($0, `ne`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1827 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1830 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1833 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1836 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1839 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1842 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1845 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1848 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1851 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1854 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1857 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1860 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1863 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1866 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1869 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1872 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1875 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1878 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1881 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1884 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1887 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1890 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1893 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1896 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1899 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1902 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1905 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1908 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1911 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1914 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1917 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1920 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1923 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1926 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1929 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1932 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1935 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1938 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1941 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1944 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1947 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1950 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1953 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1956 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1959 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1962 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1965 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1968 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1971 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1974 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1977 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1980 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1983 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1986 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1989 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1992 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1995 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:1998 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2001 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2004 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2007 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2010 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2013 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2016 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2019 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2022 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2025 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2028 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2031 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2034 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2037 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2040 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2043 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2046 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2049 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2052 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2055 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2058 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2061 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2064 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2067 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2070 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2073 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2076 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2079 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2082 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2085 +assert_return( + () => invoke($0, `ne`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2088 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2091 +assert_return( + () => invoke($0, `ne`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2094 +assert_return( + () => invoke($0, `ne`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2097 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2100 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2103 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2106 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2109 +assert_return( + () => invoke($0, `ne`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2112 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2115 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2118 +assert_return( + () => invoke($0, `ne`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2121 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2124 +assert_return( + () => invoke($0, `ne`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2127 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2130 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2133 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2136 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2139 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2142 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2145 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2148 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2151 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2154 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2157 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2160 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2163 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2166 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2169 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2172 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2175 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2178 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2181 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2184 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2187 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2190 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2193 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2196 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2199 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2202 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2205 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2208 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2211 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2214 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2217 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2220 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2223 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2226 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2229 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2232 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2235 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2238 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2241 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2244 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2247 +assert_return( + () => invoke($0, `ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2250 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2253 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2256 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2259 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2262 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2265 +assert_return( + () => invoke($0, `ne`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2268 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2271 +assert_return( + () => invoke($0, `ne`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2274 +assert_return( + () => invoke($0, `ne`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2277 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2280 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2283 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2286 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2289 +assert_return( + () => invoke($0, `ne`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2292 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2295 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2298 +assert_return( + () => invoke($0, `ne`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2301 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2304 +assert_return( + () => invoke($0, `ne`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2307 +assert_return( + () => invoke($0, `ne`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2310 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2313 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2316 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2319 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2322 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2325 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2328 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2331 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2334 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2337 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2340 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2343 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2346 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2349 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2352 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2355 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2358 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2361 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2364 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2367 +assert_return( + () => invoke($0, `ne`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2370 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2373 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2376 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2379 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2382 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2385 +assert_return( + () => invoke($0, `ne`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2388 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2391 +assert_return( + () => invoke($0, `ne`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2394 +assert_return( + () => invoke($0, `ne`, [f32x4([-1, -1, -1, -1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2397 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2400 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2403 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2406 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2409 +assert_return( + () => invoke($0, `ne`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2412 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2415 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2418 +assert_return( + () => invoke($0, `ne`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2421 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2424 +assert_return( + () => invoke($0, `ne`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2427 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2430 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2433 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2436 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2439 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2442 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2445 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2448 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2451 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2454 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2457 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2460 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2463 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2466 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2469 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2472 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2475 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2478 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2481 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2484 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2487 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2490 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2493 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2496 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2499 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2502 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2505 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2508 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2511 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2514 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2517 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2520 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2523 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2526 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2529 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2532 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2535 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2538 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2541 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2544 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2547 +assert_return( + () => invoke($0, `ne`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2550 +assert_return( + () => invoke($0, `ne`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2553 +assert_return( + () => invoke($0, `ne`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2556 +assert_return( + () => invoke($0, `ne`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2559 +assert_return( + () => invoke($0, `ne`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2562 +assert_return( + () => invoke($0, `ne`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2567 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2570 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2573 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2576 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2579 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2582 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2585 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2588 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2591 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2594 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2597 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2600 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2603 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2606 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2609 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2612 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2615 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2618 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2621 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2624 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2627 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2630 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2633 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2636 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2639 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2642 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2645 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2648 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2651 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2654 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2657 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2660 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2663 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2666 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2669 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2672 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2675 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2678 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2681 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2684 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2687 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2690 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2693 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2696 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2699 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2702 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2705 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2708 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2711 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2714 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2717 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2720 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2723 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2726 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2729 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2732 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2735 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2738 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2741 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2744 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2747 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2750 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2753 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2756 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2759 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2762 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2765 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2768 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2771 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2774 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2777 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2780 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2783 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2786 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2789 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2792 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2795 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2798 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2801 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2804 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2807 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2810 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2813 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2816 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2819 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2822 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2825 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2828 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2831 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2834 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2837 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2840 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2843 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2846 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2849 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2852 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2855 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2858 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2861 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2864 +assert_return( + () => invoke($0, `lt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2867 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2870 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2873 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2876 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2879 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2882 +assert_return( + () => invoke($0, `lt`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2885 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2888 +assert_return( + () => invoke($0, `lt`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2891 +assert_return( + () => invoke($0, `lt`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2894 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2897 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2900 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2903 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2906 +assert_return( + () => invoke($0, `lt`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2909 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2912 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2915 +assert_return( + () => invoke($0, `lt`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2918 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2921 +assert_return( + () => invoke($0, `lt`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2924 +assert_return( + () => invoke($0, `lt`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2927 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2930 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2933 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2936 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2939 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2942 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2945 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2948 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2951 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2954 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2957 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2960 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2963 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2966 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2969 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2972 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2975 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2978 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2981 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2984 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2987 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2990 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2993 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2996 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:2999 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3002 +assert_return( + () => invoke($0, `lt`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3005 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3008 +assert_return( + () => invoke($0, `lt`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3011 +assert_return( + () => invoke($0, `lt`, [f32x4([-0, -0, -0, -0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3014 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3017 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3020 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3023 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3026 +assert_return( + () => invoke($0, `lt`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3029 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3032 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3035 +assert_return( + () => invoke($0, `lt`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3038 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3041 +assert_return( + () => invoke($0, `lt`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3044 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3047 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3050 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3053 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3056 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3059 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3062 +assert_return( + () => invoke($0, `lt`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3065 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3068 +assert_return( + () => invoke($0, `lt`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3071 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3074 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3077 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3080 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3083 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3086 +assert_return( + () => invoke($0, `lt`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3089 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3092 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3095 +assert_return( + () => invoke($0, `lt`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3098 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3101 +assert_return( + () => invoke($0, `lt`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3104 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3107 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3110 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3113 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3116 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3119 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3122 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3125 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3128 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3131 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3134 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3137 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3140 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3143 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3146 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3149 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3152 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3155 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3158 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3161 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3164 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3167 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3170 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3173 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3176 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3179 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3182 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3185 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3188 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3191 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3194 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3197 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3200 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3203 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3206 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3209 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3212 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3215 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3218 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3221 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3224 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3227 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3230 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3233 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3236 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3239 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3242 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3245 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3248 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3251 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3254 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3257 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3260 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3263 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3266 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3269 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3272 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3275 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3278 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3281 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3284 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3287 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3290 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3293 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3296 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3299 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3302 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3305 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3308 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3311 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3314 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3317 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3320 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3323 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3326 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3329 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3332 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3335 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3338 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3341 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3344 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3347 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3350 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3353 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3356 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3359 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3362 +assert_return( + () => invoke($0, `lt`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3365 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3368 +assert_return( + () => invoke($0, `lt`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3371 +assert_return( + () => invoke($0, `lt`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3374 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3377 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3380 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3383 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3386 +assert_return( + () => invoke($0, `lt`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3389 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3392 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3395 +assert_return( + () => invoke($0, `lt`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3398 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3401 +assert_return( + () => invoke($0, `lt`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3404 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3407 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3410 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3413 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3416 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3419 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3422 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3425 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3428 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3431 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3434 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3437 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3440 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3443 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3446 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3449 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3452 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3455 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3458 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3461 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3464 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3467 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3470 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3473 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3476 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3479 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3482 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3485 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3488 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3491 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3494 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3497 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3500 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3503 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3506 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3509 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3512 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3515 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3518 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3521 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3524 +assert_return( + () => invoke($0, `lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3527 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3530 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3533 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3536 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3539 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3542 +assert_return( + () => invoke($0, `lt`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3545 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3548 +assert_return( + () => invoke($0, `lt`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3551 +assert_return( + () => invoke($0, `lt`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3554 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3557 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3560 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3563 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3566 +assert_return( + () => invoke($0, `lt`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3569 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3572 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3575 +assert_return( + () => invoke($0, `lt`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3578 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3581 +assert_return( + () => invoke($0, `lt`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3584 +assert_return( + () => invoke($0, `lt`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3587 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3590 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3593 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3596 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3599 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3602 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3605 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3608 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3611 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3614 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3617 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3620 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3623 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3626 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3629 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3632 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3635 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3638 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3641 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3644 +assert_return( + () => invoke($0, `lt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3647 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3650 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3653 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3656 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3659 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3662 +assert_return( + () => invoke($0, `lt`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3665 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3668 +assert_return( + () => invoke($0, `lt`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3671 +assert_return( + () => invoke($0, `lt`, [f32x4([-1, -1, -1, -1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3674 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3677 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3680 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3683 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3686 +assert_return( + () => invoke($0, `lt`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3689 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3692 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3695 +assert_return( + () => invoke($0, `lt`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3698 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3701 +assert_return( + () => invoke($0, `lt`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3704 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3707 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3710 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3713 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3716 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3719 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3722 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3725 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3728 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3731 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3734 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3737 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3740 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3743 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3746 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3749 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3752 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3755 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3758 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3761 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3764 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3767 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3770 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3773 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3776 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3779 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3782 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3785 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3788 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3791 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3794 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3797 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3800 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3803 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3806 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3809 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3812 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3815 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3818 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3821 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3824 +assert_return( + () => invoke($0, `lt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3827 +assert_return( + () => invoke($0, `lt`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3830 +assert_return( + () => invoke($0, `lt`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3833 +assert_return( + () => invoke($0, `lt`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3836 +assert_return( + () => invoke($0, `lt`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3839 +assert_return( + () => invoke($0, `lt`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3844 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3847 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3850 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3853 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3856 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3859 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3862 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3865 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3868 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3871 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3874 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3877 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3880 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3883 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3886 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3889 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3892 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3895 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3898 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3901 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3904 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3907 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3910 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3913 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3916 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3919 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3922 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3925 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3928 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3931 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3934 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3937 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3940 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3943 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3946 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3949 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3952 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3955 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3958 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3961 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3964 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3967 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3970 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3973 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3976 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3979 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3982 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3985 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3988 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3991 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3994 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:3997 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4000 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4003 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4006 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4009 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4012 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4015 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4018 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4021 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4024 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4027 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4030 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4033 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4036 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4039 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4042 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4045 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4048 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4051 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4054 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4057 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4060 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4063 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4066 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4069 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4072 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4075 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4078 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4081 +assert_return( + () => invoke($0, `le`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4084 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4087 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4090 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4093 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4096 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4099 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4102 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4105 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4108 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4111 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4114 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4117 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4120 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4123 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4126 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4129 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4132 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4135 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4138 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4141 +assert_return( + () => invoke($0, `le`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4144 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4147 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4150 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4153 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4156 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4159 +assert_return( + () => invoke($0, `le`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4162 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4165 +assert_return( + () => invoke($0, `le`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4168 +assert_return( + () => invoke($0, `le`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4171 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4174 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4177 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4180 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4183 +assert_return( + () => invoke($0, `le`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4186 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4189 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4192 +assert_return( + () => invoke($0, `le`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4195 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4198 +assert_return( + () => invoke($0, `le`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4201 +assert_return( + () => invoke($0, `le`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4204 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4207 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4210 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4213 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4216 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4219 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4222 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4225 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4228 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4231 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4234 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4237 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4240 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4243 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4246 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4249 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4252 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4255 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4258 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4261 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4264 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4267 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4270 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4273 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4276 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4279 +assert_return( + () => invoke($0, `le`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4282 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4285 +assert_return( + () => invoke($0, `le`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4288 +assert_return( + () => invoke($0, `le`, [f32x4([-0, -0, -0, -0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4291 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4294 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4297 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4300 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4303 +assert_return( + () => invoke($0, `le`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4306 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4309 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4312 +assert_return( + () => invoke($0, `le`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4315 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4318 +assert_return( + () => invoke($0, `le`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4321 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4324 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4327 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4330 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4333 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4336 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4339 +assert_return( + () => invoke($0, `le`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4342 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4345 +assert_return( + () => invoke($0, `le`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4348 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4351 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4354 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4357 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4360 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4363 +assert_return( + () => invoke($0, `le`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4366 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4369 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4372 +assert_return( + () => invoke($0, `le`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4375 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4378 +assert_return( + () => invoke($0, `le`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4381 +assert_return( + () => invoke($0, `le`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4384 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4387 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4390 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4393 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4396 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4399 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4402 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4405 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4408 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4411 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4414 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4417 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4420 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4423 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4426 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4429 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4432 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4435 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4438 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4441 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4444 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4447 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4450 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4453 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4456 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4459 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4462 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4465 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4468 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4471 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4474 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4477 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4480 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4483 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4486 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4489 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4492 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4495 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4498 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4501 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4504 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4507 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4510 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4513 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4516 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4519 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4522 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4525 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4528 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4531 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4534 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4537 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4540 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4543 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4546 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4549 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4552 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4555 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4558 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4561 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4564 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4567 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4570 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4573 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4576 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4579 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4582 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4585 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4588 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4591 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4594 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4597 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4600 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4603 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4606 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4609 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4612 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4615 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4618 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4621 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4624 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4627 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4630 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4633 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4636 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4639 +assert_return( + () => invoke($0, `le`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4642 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4645 +assert_return( + () => invoke($0, `le`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4648 +assert_return( + () => invoke($0, `le`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4651 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4654 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4657 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4660 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4663 +assert_return( + () => invoke($0, `le`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4666 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4669 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4672 +assert_return( + () => invoke($0, `le`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4675 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4678 +assert_return( + () => invoke($0, `le`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4681 +assert_return( + () => invoke($0, `le`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4684 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4687 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4690 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4693 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4696 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4699 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4702 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4705 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4708 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4711 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4714 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4717 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4720 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4723 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4726 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4729 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4732 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4735 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4738 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4741 +assert_return( + () => invoke($0, `le`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4744 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4747 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4750 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4753 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4756 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4759 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4762 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4765 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4768 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4771 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4774 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4777 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4780 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4783 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4786 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4789 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4792 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4795 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4798 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4801 +assert_return( + () => invoke($0, `le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4804 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4807 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4810 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4813 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4816 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4819 +assert_return( + () => invoke($0, `le`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4822 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4825 +assert_return( + () => invoke($0, `le`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4828 +assert_return( + () => invoke($0, `le`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4831 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4834 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4837 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4840 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4843 +assert_return( + () => invoke($0, `le`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4846 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4849 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4852 +assert_return( + () => invoke($0, `le`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4855 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4858 +assert_return( + () => invoke($0, `le`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4861 +assert_return( + () => invoke($0, `le`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4864 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4867 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4870 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4873 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4876 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4879 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4882 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4885 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4888 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4891 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4894 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4897 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4900 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4903 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4906 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4909 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4912 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4915 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4918 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4921 +assert_return( + () => invoke($0, `le`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4924 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4927 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4930 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4933 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4936 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4939 +assert_return( + () => invoke($0, `le`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4942 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4945 +assert_return( + () => invoke($0, `le`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4948 +assert_return( + () => invoke($0, `le`, [f32x4([-1, -1, -1, -1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4951 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4954 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4957 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4960 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4963 +assert_return( + () => invoke($0, `le`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4966 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4969 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4972 +assert_return( + () => invoke($0, `le`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4975 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4978 +assert_return( + () => invoke($0, `le`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4981 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4984 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4987 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4990 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4993 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4996 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:4999 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5002 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5005 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5008 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5011 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5014 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5017 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5020 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5023 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5026 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5029 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5032 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5035 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5038 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5041 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5044 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5047 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5050 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5053 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5056 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5059 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5062 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5065 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5068 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5071 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5074 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5077 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5080 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5083 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5086 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5089 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5092 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5095 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5098 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5101 +assert_return( + () => invoke($0, `le`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5104 +assert_return( + () => invoke($0, `le`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5107 +assert_return( + () => invoke($0, `le`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5110 +assert_return( + () => invoke($0, `le`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5113 +assert_return( + () => invoke($0, `le`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5116 +assert_return( + () => invoke($0, `le`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5121 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5124 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5127 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5130 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5133 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5136 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5139 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5142 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5145 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5148 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5151 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5154 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5157 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5160 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5163 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5166 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5169 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5172 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5175 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5178 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5181 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5184 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5187 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5190 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5193 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5196 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5199 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5202 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5205 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5208 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5211 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5214 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5217 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5220 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5223 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5226 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5229 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5232 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5235 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5238 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5241 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5244 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5247 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5250 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5253 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5256 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5259 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5262 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5265 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5268 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5271 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5274 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5277 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5280 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5283 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5286 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5289 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5292 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5295 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5298 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5301 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5304 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5307 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5310 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5313 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5316 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5319 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5322 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5325 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5328 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5331 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5334 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5337 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5340 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5343 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5346 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5349 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5352 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5355 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5358 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5361 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5364 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5367 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5370 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5373 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5376 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5379 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5382 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5385 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5388 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5391 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5394 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5397 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5400 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5403 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5406 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5409 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5412 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5415 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5418 +assert_return( + () => invoke($0, `gt`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5421 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5424 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5427 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5430 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5433 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5436 +assert_return( + () => invoke($0, `gt`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5439 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5442 +assert_return( + () => invoke($0, `gt`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5445 +assert_return( + () => invoke($0, `gt`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5448 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5451 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5454 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5457 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5460 +assert_return( + () => invoke($0, `gt`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5463 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5466 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5469 +assert_return( + () => invoke($0, `gt`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5472 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5475 +assert_return( + () => invoke($0, `gt`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5478 +assert_return( + () => invoke($0, `gt`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5481 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5484 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5487 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5490 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5493 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5496 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5499 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5502 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5505 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5508 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5511 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5514 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5517 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5520 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5523 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5526 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5529 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5532 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5535 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5538 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5541 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5544 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5547 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5550 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5553 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5556 +assert_return( + () => invoke($0, `gt`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5559 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5562 +assert_return( + () => invoke($0, `gt`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5565 +assert_return( + () => invoke($0, `gt`, [f32x4([-0, -0, -0, -0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5568 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5571 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5574 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5577 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5580 +assert_return( + () => invoke($0, `gt`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5583 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5586 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5589 +assert_return( + () => invoke($0, `gt`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5592 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5595 +assert_return( + () => invoke($0, `gt`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5598 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5601 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5604 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5607 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5610 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5613 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5616 +assert_return( + () => invoke($0, `gt`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5619 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5622 +assert_return( + () => invoke($0, `gt`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5625 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5628 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5631 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5634 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5637 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5640 +assert_return( + () => invoke($0, `gt`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5643 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5646 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5649 +assert_return( + () => invoke($0, `gt`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5652 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5655 +assert_return( + () => invoke($0, `gt`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5658 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5661 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5664 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5667 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5670 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5673 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5676 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5679 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5682 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5685 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5688 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5691 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5694 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5697 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5700 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5703 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5706 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5709 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5712 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5715 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5718 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5721 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5724 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5727 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5730 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5733 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5736 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5739 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5742 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5745 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5748 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5751 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5754 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5757 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5760 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5763 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5766 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5769 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5772 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5775 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5778 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5781 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5784 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5787 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5790 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5793 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5796 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5799 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5802 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5805 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5808 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5811 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5814 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5817 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5820 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5823 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5826 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5829 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5832 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5835 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5838 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5841 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5844 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5847 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5850 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5853 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5856 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5859 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5862 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5865 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5868 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5871 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5874 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5877 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5880 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5883 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5886 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5889 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5892 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5895 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5898 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5901 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5904 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5907 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5910 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5913 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5916 +assert_return( + () => invoke($0, `gt`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5919 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5922 +assert_return( + () => invoke($0, `gt`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5925 +assert_return( + () => invoke($0, `gt`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5928 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5931 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5934 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5937 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5940 +assert_return( + () => invoke($0, `gt`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5943 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5946 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5949 +assert_return( + () => invoke($0, `gt`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5952 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5955 +assert_return( + () => invoke($0, `gt`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5958 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5961 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5964 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5967 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5970 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5973 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5976 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5979 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5982 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5985 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5988 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5991 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5994 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:5997 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6000 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6003 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6006 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6009 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6012 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6015 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6018 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6021 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6024 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6027 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6030 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6033 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6036 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6039 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6042 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6045 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6048 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6051 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6054 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6057 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6060 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6063 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6066 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6069 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6072 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6075 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6078 +assert_return( + () => invoke($0, `gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6081 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6084 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6087 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6090 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6093 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6096 +assert_return( + () => invoke($0, `gt`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6099 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6102 +assert_return( + () => invoke($0, `gt`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6105 +assert_return( + () => invoke($0, `gt`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6108 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6111 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6114 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6117 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6120 +assert_return( + () => invoke($0, `gt`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6123 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6126 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6129 +assert_return( + () => invoke($0, `gt`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6132 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6135 +assert_return( + () => invoke($0, `gt`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6138 +assert_return( + () => invoke($0, `gt`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6141 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6144 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6147 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6150 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6153 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6156 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6159 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6162 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6165 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6168 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6171 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6174 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6177 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6180 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6183 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6186 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6189 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6192 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6195 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6198 +assert_return( + () => invoke($0, `gt`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6201 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6204 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6207 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6210 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6213 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6216 +assert_return( + () => invoke($0, `gt`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6219 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6222 +assert_return( + () => invoke($0, `gt`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6225 +assert_return( + () => invoke($0, `gt`, [f32x4([-1, -1, -1, -1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6228 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6231 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6234 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6237 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6240 +assert_return( + () => invoke($0, `gt`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6243 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6246 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6249 +assert_return( + () => invoke($0, `gt`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6252 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6255 +assert_return( + () => invoke($0, `gt`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6258 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6261 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6264 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6267 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6270 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6273 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6276 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6279 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6282 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6285 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6288 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6291 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6294 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6297 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6300 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6303 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6306 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6309 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6312 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6315 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6318 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6321 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6324 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6327 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6330 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6333 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6336 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6339 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6342 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6345 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6348 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6351 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6354 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6357 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6360 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6363 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6366 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6369 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6372 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6375 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6378 +assert_return( + () => invoke($0, `gt`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6381 +assert_return( + () => invoke($0, `gt`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6384 +assert_return( + () => invoke($0, `gt`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6387 +assert_return( + () => invoke($0, `gt`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6390 +assert_return( + () => invoke($0, `gt`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6393 +assert_return( + () => invoke($0, `gt`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6398 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6401 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6404 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6407 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6410 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6413 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6416 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6419 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6422 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6425 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6428 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6431 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6434 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6437 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6440 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6443 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6446 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6449 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6452 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6455 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6458 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6461 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6464 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6467 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6470 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6473 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6476 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6479 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6482 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6485 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6488 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6491 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6494 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6497 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6500 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6503 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6506 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6509 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6512 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6515 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6518 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6521 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6524 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6527 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6530 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6533 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6536 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6539 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6542 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6545 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6548 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6551 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6554 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6557 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6560 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6563 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6566 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6569 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6572 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6575 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6578 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6581 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6584 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6587 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6590 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6593 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6596 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6599 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6602 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6605 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6608 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6611 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6614 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6617 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6620 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6623 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6626 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6629 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6632 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6635 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6638 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6641 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6644 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6647 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6650 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6653 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6656 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6659 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6662 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6665 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6668 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6671 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6674 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6677 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6680 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6683 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6686 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6689 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6692 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6695 +assert_return( + () => invoke($0, `ge`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6698 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6701 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6704 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6707 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6710 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6713 +assert_return( + () => invoke($0, `ge`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6716 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6719 +assert_return( + () => invoke($0, `ge`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6722 +assert_return( + () => invoke($0, `ge`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6725 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6728 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6731 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6734 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6737 +assert_return( + () => invoke($0, `ge`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6740 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6743 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6746 +assert_return( + () => invoke($0, `ge`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6749 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6752 +assert_return( + () => invoke($0, `ge`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6755 +assert_return( + () => invoke($0, `ge`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6758 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6761 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6764 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6767 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6770 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6773 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6776 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6779 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6782 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6785 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6788 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6791 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6794 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6797 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6800 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6803 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6806 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6809 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6812 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6815 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6818 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6821 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6824 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6827 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6830 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6833 +assert_return( + () => invoke($0, `ge`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6836 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6839 +assert_return( + () => invoke($0, `ge`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6842 +assert_return( + () => invoke($0, `ge`, [f32x4([-0, -0, -0, -0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6845 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6848 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6851 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6854 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6857 +assert_return( + () => invoke($0, `ge`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6860 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6863 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6866 +assert_return( + () => invoke($0, `ge`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6869 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6872 +assert_return( + () => invoke($0, `ge`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6875 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6878 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6881 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6884 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6887 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6890 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6893 +assert_return( + () => invoke($0, `ge`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6896 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6899 +assert_return( + () => invoke($0, `ge`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6902 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6905 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6908 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6911 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6914 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6917 +assert_return( + () => invoke($0, `ge`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6920 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6923 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6926 +assert_return( + () => invoke($0, `ge`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6929 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6932 +assert_return( + () => invoke($0, `ge`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6935 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6938 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6941 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6944 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6947 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6950 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6953 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6956 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6959 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6962 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6965 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6968 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6971 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6974 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6977 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6980 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6983 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6986 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6989 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6992 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6995 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:6998 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7001 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7004 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7007 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7010 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7013 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7016 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7019 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7022 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7025 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7028 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7031 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7034 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7037 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7040 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7043 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7046 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7049 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7052 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7055 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7058 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7061 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7064 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7067 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7070 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7073 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7076 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7079 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7082 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7085 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7088 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7091 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7094 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7097 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7100 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7103 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7106 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7109 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7112 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7115 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7118 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7121 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7124 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7127 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7130 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7133 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7136 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7139 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7142 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7145 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7148 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7151 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7154 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7157 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7160 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7163 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7166 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7169 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7172 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7175 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7178 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7181 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7184 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7187 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7190 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7193 +assert_return( + () => invoke($0, `ge`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7196 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7199 +assert_return( + () => invoke($0, `ge`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7202 +assert_return( + () => invoke($0, `ge`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7205 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7208 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7211 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7214 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7217 +assert_return( + () => invoke($0, `ge`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7220 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7223 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7226 +assert_return( + () => invoke($0, `ge`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7229 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7232 +assert_return( + () => invoke($0, `ge`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7235 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7238 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7241 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7244 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7247 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7250 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7253 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7256 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7259 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7262 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7265 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7268 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7271 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7274 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7277 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7280 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7283 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7286 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7289 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7292 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7295 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7298 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7301 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7304 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7307 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7310 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7313 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7316 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7319 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7322 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7325 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7328 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7331 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7334 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7337 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7340 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7343 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7346 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7349 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7352 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7355 +assert_return( + () => invoke($0, `ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7358 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7361 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7364 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7367 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7370 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7373 +assert_return( + () => invoke($0, `ge`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7376 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7379 +assert_return( + () => invoke($0, `ge`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7382 +assert_return( + () => invoke($0, `ge`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7385 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7388 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7391 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7394 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7397 +assert_return( + () => invoke($0, `ge`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7400 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7403 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7406 +assert_return( + () => invoke($0, `ge`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7409 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7412 +assert_return( + () => invoke($0, `ge`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7415 +assert_return( + () => invoke($0, `ge`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7418 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7421 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7424 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7427 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7430 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7433 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7436 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7439 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7442 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7445 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7448 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7451 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7454 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7457 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7460 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7463 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7466 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7469 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7472 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7475 +assert_return( + () => invoke($0, `ge`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7478 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7481 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7484 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7487 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7490 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7493 +assert_return( + () => invoke($0, `ge`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7496 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7499 +assert_return( + () => invoke($0, `ge`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7502 +assert_return( + () => invoke($0, `ge`, [f32x4([-1, -1, -1, -1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7505 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7508 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7511 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7514 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7517 +assert_return( + () => invoke($0, `ge`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7520 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7523 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7526 +assert_return( + () => invoke($0, `ge`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7529 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7532 +assert_return( + () => invoke($0, `ge`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7535 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7538 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7541 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7544 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7547 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7550 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7553 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7556 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7559 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7562 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7565 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7568 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7571 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7574 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7577 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7580 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7583 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7586 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7589 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7592 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7595 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7598 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7601 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7604 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7607 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7610 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7613 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7616 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7619 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7622 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7625 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7628 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7631 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7634 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7637 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7640 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7643 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7646 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7649 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7652 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7655 +assert_return( + () => invoke($0, `ge`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7658 +assert_return( + () => invoke($0, `ge`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7661 +assert_return( + () => invoke($0, `ge`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7664 +assert_return( + () => invoke($0, `ge`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7667 +assert_return( + () => invoke($0, `ge`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7670 +assert_return( + () => invoke($0, `ge`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7677 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, 0, 1, 2]), + i8x16([0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x0, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7682 +assert_return( + () => invoke($0, `eq`, [ + f32x4([-1, 0, 1, 2]), + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2]), + ]), + [i32x4([0x0, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7687 +assert_return( + () => invoke($0, `eq`, [f32x4([-1, 0, 1, 2]), i32x4([0xbf800000, 0x0, 0x1, 0x2])]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7694 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, 0, 1, 2]), + i8x16([0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0xffffffff, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7699 +assert_return( + () => invoke($0, `ne`, [ + f32x4([-1, 0, 1, 2]), + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2]), + ]), + [i32x4([0xffffffff, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7704 +assert_return( + () => invoke($0, `ne`, [f32x4([-1, 0, 1, 2]), i32x4([0xbf800000, 0x0, 0x1, 0x2])]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7711 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, 0, 1, 2]), + i8x16([0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7716 +assert_return( + () => invoke($0, `lt`, [ + f32x4([-1, 0, 1, 2]), + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7721 +assert_return( + () => invoke($0, `lt`, [f32x4([-1, 0, 1, 2]), i32x4([0xbf800000, 0x0, 0x1, 0x2])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7728 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, 0, 1, 2]), + i8x16([0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x0, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7733 +assert_return( + () => invoke($0, `le`, [ + f32x4([-1, 0, 1, 2]), + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2]), + ]), + [i32x4([0x0, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7738 +assert_return( + () => invoke($0, `le`, [f32x4([-1, 0, 1, 2]), i32x4([0xbf800000, 0x0, 0x1, 0x2])]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7745 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, 0, 1, 2]), + i8x16([0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7750 +assert_return( + () => invoke($0, `gt`, [ + f32x4([-1, 0, 1, 2]), + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7755 +assert_return( + () => invoke($0, `gt`, [f32x4([-1, 0, 1, 2]), i32x4([0xbf800000, 0x0, 0x1, 0x2])]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7762 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, 0, 1, 2]), + i8x16([0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7767 +assert_return( + () => invoke($0, `ge`, [ + f32x4([-1, 0, 1, 2]), + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x2, 0x2]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7772 +assert_return( + () => invoke($0, `ge`, [f32x4([-1, 0, 1, 2]), i32x4([0xbf800000, 0x0, 0x1, 0x2])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7779 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.eq (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7780 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.ge (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7781 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.gt (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7782 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.le (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7783 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.lt (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7784 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.ne (i64.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7789 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (f4x32.eq (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7790 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (f4x32.ge (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7791 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (f4x32.gt (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7792 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (f4x32.le (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7793 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (f4x32.lt (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7794 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (f4x32.ne (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:7799 +let $1 = instantiate(`(module (memory 1) + (func (export "eq-in-block") + (block + (drop + (block (result v128) + (f32x4.eq + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "ne-in-block") + (block + (drop + (block (result v128) + (f32x4.ne + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "lt-in-block") + (block + (drop + (block (result v128) + (f32x4.lt + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "le-in-block") + (block + (drop + (block (result v128) + (f32x4.le + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "gt-in-block") + (block + (drop + (block (result v128) + (f32x4.gt + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "ge-in-block") + (block + (drop + (block (result v128) + (f32x4.ge + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "nested-eq") + (drop + (f32x4.eq + (f32x4.eq + (f32x4.eq + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.eq + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f32x4.eq + (f32x4.eq + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.eq + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-ne") + (drop + (f32x4.ne + (f32x4.ne + (f32x4.ne + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.ne + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f32x4.ne + (f32x4.ne + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.ne + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-lt") + (drop + (f32x4.lt + (f32x4.lt + (f32x4.lt + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.lt + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f32x4.lt + (f32x4.lt + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.lt + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-le") + (drop + (f32x4.le + (f32x4.le + (f32x4.le + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.le + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f32x4.le + (f32x4.le + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.le + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-gt") + (drop + (f32x4.gt + (f32x4.gt + (f32x4.gt + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.gt + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f32x4.gt + (f32x4.gt + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.gt + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-ge") + (drop + (f32x4.ge + (f32x4.ge + (f32x4.ge + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.ge + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f32x4.ge + (f32x4.ge + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.ge + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "as-param") + (drop + (f32x4.ge + (f32x4.eq + (f32x4.lt + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.le + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f32x4.ne + (f32x4.gt + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f32x4.lt + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) +)`); + +// ./test/core/simd/simd_f32x4_cmp.wast:8056 +assert_return(() => invoke($1, `eq-in-block`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8057 +assert_return(() => invoke($1, `ne-in-block`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8058 +assert_return(() => invoke($1, `lt-in-block`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8059 +assert_return(() => invoke($1, `le-in-block`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8060 +assert_return(() => invoke($1, `gt-in-block`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8061 +assert_return(() => invoke($1, `ge-in-block`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8062 +assert_return(() => invoke($1, `nested-eq`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8063 +assert_return(() => invoke($1, `nested-ne`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8064 +assert_return(() => invoke($1, `nested-lt`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8065 +assert_return(() => invoke($1, `nested-le`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8066 +assert_return(() => invoke($1, `nested-gt`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8067 +assert_return(() => invoke($1, `nested-ge`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8068 +assert_return(() => invoke($1, `as-param`, []), []); + +// ./test/core/simd/simd_f32x4_cmp.wast:8072 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.eq-1st-arg-empty (result v128) + (f32x4.eq (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:8080 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.eq-arg-empty (result v128) + (f32x4.eq) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:8088 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.ne-1st-arg-empty (result v128) + (f32x4.ne (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:8096 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.ne-arg-empty (result v128) + (f32x4.ne) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:8104 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.lt-1st-arg-empty (result v128) + (f32x4.lt (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:8112 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.lt-arg-empty (result v128) + (f32x4.lt) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:8120 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.le-1st-arg-empty (result v128) + (f32x4.le (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:8128 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.le-arg-empty (result v128) + (f32x4.le) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:8136 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.gt-1st-arg-empty (result v128) + (f32x4.gt (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:8144 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.gt-arg-empty (result v128) + (f32x4.gt) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:8152 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.ge-1st-arg-empty (result v128) + (f32x4.ge (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_cmp.wast:8160 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.ge-arg-empty (result v128) + (f32x4.ge) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_pmin_pmax.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_pmin_pmax.wast.js new file mode 100644 index 0000000000..c0f65854cb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_pmin_pmax.wast.js @@ -0,0 +1,92356 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4 +let $0 = instantiate(`(module + (func (export "f32x4.pmin") (param v128 v128) (result v128) (f32x4.pmin (local.get 0) (local.get 1))) + (func (export "f32x4.pmax") (param v128 v128) (result v128) (f32x4.pmax (local.get 0) (local.get 1))) +)`); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:12 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:15 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:18 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:21 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:24 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:27 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:30 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:33 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:36 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:39 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:42 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:45 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:48 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:51 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:54 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:57 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:60 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:63 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:66 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:69 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:72 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:75 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:78 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:81 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:84 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:87 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:90 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:93 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:96 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:99 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:102 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:105 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:108 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:111 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:114 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:117 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:120 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:123 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:126 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:129 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:132 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:135 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:138 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:141 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:144 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:147 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:150 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:153 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:156 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:159 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:162 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:165 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:168 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:171 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:174 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:177 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:180 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:183 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:186 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:189 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:192 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:195 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:198 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:201 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:204 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:207 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:210 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:213 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:216 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:219 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:222 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:225 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:228 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:231 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:234 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:237 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:240 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:243 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:246 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:249 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:252 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:255 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:258 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:261 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:264 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:267 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:270 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:273 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:276 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:279 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:282 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:285 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:288 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:291 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:294 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:297 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:300 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:303 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:306 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:309 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:312 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:315 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:318 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:321 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:324 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:327 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:330 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:333 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:336 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:339 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:342 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:345 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:348 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:351 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:354 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:357 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:360 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:363 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:366 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:369 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:372 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:375 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:378 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:381 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:384 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:387 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:390 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:393 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:396 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:399 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:402 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:405 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:408 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:411 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:414 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:417 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:420 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:423 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:426 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:429 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:432 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:435 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:438 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:441 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:444 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:447 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:450 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:453 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:456 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:459 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:462 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:465 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:468 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:471 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:474 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:477 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:480 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:483 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:486 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:489 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:492 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:495 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:498 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:501 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:504 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:507 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:510 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:513 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:516 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:519 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:522 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:525 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:528 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:531 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:534 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:537 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:540 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:543 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:546 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:549 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:552 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:555 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:558 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:561 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:564 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:567 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:570 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:573 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:576 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:579 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:582 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:585 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:588 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:591 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:594 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:597 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:600 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:603 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:606 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:609 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:612 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:615 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:618 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:621 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:624 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:627 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:630 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:633 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:636 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:639 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:642 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:645 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:648 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:651 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:654 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:657 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:660 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:663 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:666 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:669 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:672 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:675 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:678 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:681 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:684 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:687 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:690 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:693 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:696 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:699 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:702 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:705 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:708 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:711 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:714 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:717 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:720 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:723 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:726 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:729 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:732 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:735 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:738 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:741 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:744 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:747 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:750 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:753 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:756 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:759 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:762 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:765 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:768 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:771 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:774 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:777 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:780 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:783 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:786 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:789 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:792 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:795 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:798 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:801 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:804 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:807 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:810 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:813 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:816 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:819 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:822 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:825 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:828 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:831 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:834 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:837 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:840 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:843 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:846 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:849 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:852 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:855 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:858 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:861 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:864 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:867 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:870 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:873 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:876 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:879 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:882 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:885 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:888 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:891 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:894 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:897 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:900 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:903 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:906 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:909 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:912 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:915 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:918 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:921 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:924 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:927 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:930 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:933 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:936 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:939 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:942 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:945 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:948 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:951 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:954 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:957 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:960 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:963 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:966 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:969 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:972 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:975 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:978 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:981 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:984 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:987 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:990 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:993 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:996 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:999 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1002 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1005 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1008 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1011 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1014 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1017 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1020 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1023 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1026 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1029 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1032 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1035 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1038 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1041 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1044 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1047 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1050 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1053 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1056 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1059 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1062 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1065 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1068 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1071 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1074 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1077 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1080 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1083 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1086 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1089 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1092 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1095 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1098 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1101 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1104 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1107 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1110 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1113 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1116 +assert_return( + () => invoke($0, `f32x4.pmin`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1119 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1122 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1125 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1128 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1131 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1134 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1137 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1140 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1143 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1146 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1149 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1152 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1155 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1158 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1161 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1164 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1167 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1170 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1173 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1176 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1179 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1182 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1185 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1188 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1191 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1194 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1197 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1200 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1203 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1206 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1209 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1212 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1215 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1218 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1221 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1224 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1227 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1230 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1233 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1236 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1239 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1242 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1245 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1248 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1251 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1254 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1257 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1260 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1263 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1266 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1269 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1272 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1275 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1278 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1281 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1284 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1287 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1290 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1293 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1296 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1299 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1302 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1305 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1308 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1311 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1314 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1317 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1320 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1323 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1326 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1329 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1332 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1335 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1338 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1341 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1344 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1347 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1350 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1353 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1356 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1359 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1362 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1365 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1368 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1371 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1374 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1377 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1380 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1383 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1386 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1389 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1392 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1395 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1398 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1401 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1404 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1407 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1410 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1413 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1416 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1419 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1422 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1425 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1428 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1431 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1434 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1437 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1440 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1443 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1446 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1449 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1452 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1455 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1458 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1461 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1464 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1467 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1470 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1473 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1476 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1479 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1482 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1485 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1488 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1491 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1494 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1497 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1500 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1503 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1506 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1509 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1512 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1515 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1518 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1521 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1524 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1527 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1530 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1533 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1536 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1539 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1542 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1545 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1548 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1551 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1554 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1557 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1560 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1563 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1566 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1569 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1572 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1575 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1578 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1581 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1584 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1587 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1590 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1593 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1596 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1599 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1602 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1605 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1608 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1611 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1614 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1617 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1620 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1623 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1626 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1629 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1632 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1635 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1638 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1641 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1644 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1647 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1650 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1653 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1656 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1659 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1662 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1665 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1668 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1671 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1674 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1677 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1680 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1683 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1686 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1689 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1692 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1695 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1698 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1701 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1704 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1707 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1710 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1713 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1716 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1719 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1722 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1725 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1728 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1731 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1734 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1737 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1740 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1743 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1746 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1749 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1752 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1755 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1758 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1761 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1764 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1767 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1770 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1773 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1776 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1779 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1782 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1785 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1788 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1791 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1794 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1797 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1800 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1803 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1806 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1809 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1812 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1815 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1818 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1821 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1824 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1827 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1830 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1833 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1836 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1839 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1842 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1845 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1848 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1851 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1854 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1857 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1860 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1863 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1866 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1869 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1872 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1875 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1878 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1881 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1884 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1887 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1890 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1893 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1896 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1899 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1902 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1905 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1908 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1911 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1914 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1917 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1920 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1923 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1926 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1929 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1932 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1935 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1938 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1941 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1944 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1947 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1950 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1953 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1956 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1959 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1962 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1965 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1968 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1971 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1974 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1977 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1980 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1983 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1986 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1989 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1992 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1995 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:1998 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2001 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2004 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2007 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2010 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2013 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2016 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2019 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2022 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2025 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2028 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2031 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2034 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2037 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2040 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2043 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2046 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2049 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2052 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2055 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2058 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2061 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2064 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2067 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2070 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2073 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2076 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2079 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2082 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2085 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2088 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2091 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2094 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2097 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2100 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2103 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2106 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2109 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2112 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2115 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2118 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2121 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2124 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2127 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2130 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2133 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2136 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2139 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2142 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2145 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2148 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2151 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2154 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2157 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2160 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2163 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2166 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2169 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2172 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2175 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2178 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2181 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2184 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2187 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2190 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2193 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2196 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2199 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2202 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2205 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2208 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2211 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2214 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2217 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2220 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2223 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2226 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2229 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2232 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2235 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2238 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2241 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2244 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2247 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2250 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2253 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2256 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2259 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2262 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2265 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2268 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2271 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2274 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2277 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2280 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2283 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2286 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2289 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2292 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2295 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2298 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2301 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2304 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2307 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2310 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2313 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2316 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2319 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2322 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2325 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2328 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2331 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2334 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2337 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2340 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2343 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2346 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2349 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2352 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2355 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2358 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2361 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2364 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2367 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2370 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2373 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2376 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2379 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2382 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2385 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2388 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2391 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2394 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2397 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2400 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2403 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2406 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2409 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2412 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2415 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2418 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2421 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2424 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2427 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2430 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2433 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2436 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2439 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2442 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2445 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2448 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2451 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2454 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2457 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2460 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2463 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2466 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2469 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2472 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2475 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2478 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2481 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2484 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2487 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2490 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2493 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2496 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2499 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2502 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2505 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2508 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2511 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2514 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2517 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2520 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2523 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2526 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2529 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2532 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2535 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2538 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2541 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2544 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2547 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2550 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2553 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2556 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2559 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2562 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2565 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2568 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2571 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2574 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2577 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2580 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2583 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2586 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2589 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2592 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2595 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2598 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2601 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2604 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2607 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2610 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2613 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2616 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2619 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2622 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2625 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2628 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2631 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2634 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2637 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2640 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2643 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2646 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2649 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2652 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2655 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2658 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2661 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2664 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2667 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2670 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2673 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2676 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2679 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2682 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2685 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2688 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2691 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2694 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2697 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2700 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2703 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2706 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2709 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2712 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2715 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2718 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2721 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2724 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2727 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2730 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2733 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2736 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2739 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2742 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2745 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2748 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2751 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2754 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2757 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2760 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2763 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2766 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2769 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2772 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2775 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2778 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2781 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2784 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2787 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2790 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2793 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2796 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2799 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2802 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2805 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2808 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2811 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2814 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2817 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2820 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2823 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2826 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2829 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2832 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2835 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2838 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2841 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2844 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2847 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2850 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2853 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2856 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2859 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2862 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2865 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2868 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2871 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2874 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2877 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2880 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2883 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2886 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2889 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2892 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2895 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2898 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2901 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2904 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2907 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2910 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2913 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2916 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2919 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2922 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2925 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2928 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2931 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2934 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2937 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2940 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2943 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2946 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2949 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2952 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2955 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2958 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2961 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2964 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2967 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2970 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2973 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2976 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2979 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2982 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2985 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2988 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2991 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2994 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:2997 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3000 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3003 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3006 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3009 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3012 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3015 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3018 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3021 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3024 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3027 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3030 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3033 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3036 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3039 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3042 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3045 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3048 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3051 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3054 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3057 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3060 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3063 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3066 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3069 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3072 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3075 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3078 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3081 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3084 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3087 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3090 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3093 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3096 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3099 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3102 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3105 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3108 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3111 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3114 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3117 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3120 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3123 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3126 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3129 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3132 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3135 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3138 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3141 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3144 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3147 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3150 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3153 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3156 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3159 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3162 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3165 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3168 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3171 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3174 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3177 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3180 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3183 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3186 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3189 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3192 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3195 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3198 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3201 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3204 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3207 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3210 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3213 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3216 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3219 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3222 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3225 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3228 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3231 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3234 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3237 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3240 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3243 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3246 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3249 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3252 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3255 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3258 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3261 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3264 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3267 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3270 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3273 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3276 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3279 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3282 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3285 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3288 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3291 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3294 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3297 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3300 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3303 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3306 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3309 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3312 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3315 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3318 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3321 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3324 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3327 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3330 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3333 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3336 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3339 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3342 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3345 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3348 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3351 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3354 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3357 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3360 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3363 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3366 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3369 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3372 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3375 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3378 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3381 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3384 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3387 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3390 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3393 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3396 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3399 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3402 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3405 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3408 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3411 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3414 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3417 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3420 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3423 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3426 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3429 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3432 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3435 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3438 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3441 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3444 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3447 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3450 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3453 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3456 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3459 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3462 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3465 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3468 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3471 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3474 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3477 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3480 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3483 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3486 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3489 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3492 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3495 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3498 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3501 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3504 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3507 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3510 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3513 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3516 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3519 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3522 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3525 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3528 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3531 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3534 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3537 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3540 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3543 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3546 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3549 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3552 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3555 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3558 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3561 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3564 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3567 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3570 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3573 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3576 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3579 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3582 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3585 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3588 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3591 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3594 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3597 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3600 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3603 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3606 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3609 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3612 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3615 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3618 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3621 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3624 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3627 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3630 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3633 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3636 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3639 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3642 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3645 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3648 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3651 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3654 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3657 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3660 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3663 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3666 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3669 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3672 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3675 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3678 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3681 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3684 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3687 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3690 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3693 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3696 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3699 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3702 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3705 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3708 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3711 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3714 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3717 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3720 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3723 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3726 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3729 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3732 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3735 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3738 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3741 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3744 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3747 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3750 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3753 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3756 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3759 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3762 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3765 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3768 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3771 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3774 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3777 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3780 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3783 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3786 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3789 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3792 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3795 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3798 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3801 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3804 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3807 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3810 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3813 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3816 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3819 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3822 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3825 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3828 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3831 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3834 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3837 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3840 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3843 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3846 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3849 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3852 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3855 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3858 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3861 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3864 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3867 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3870 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3873 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3876 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3879 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3882 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3885 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3888 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3891 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3894 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3897 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3900 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3903 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3906 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3909 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3912 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3915 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3918 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3921 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3924 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3927 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3930 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3933 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3936 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3939 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3942 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3945 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3948 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3951 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3954 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3957 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3960 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3963 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3966 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3969 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3972 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3975 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3978 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3981 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3984 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3987 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3990 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3993 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3996 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:3999 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4002 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4005 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4008 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4011 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4014 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4017 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4020 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4023 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4026 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4029 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4032 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4035 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4038 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4041 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4044 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4047 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4050 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4053 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4056 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4059 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4062 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4065 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4068 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4071 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4074 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4077 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4080 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4083 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4086 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4089 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4092 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4095 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4098 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4101 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4104 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4107 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4110 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4113 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4116 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4119 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4122 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4125 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4128 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4131 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4134 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4137 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4140 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4143 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4146 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4149 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4152 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4155 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4158 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4161 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4164 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4167 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4170 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4173 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4176 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4179 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4182 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4185 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4188 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4191 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4194 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4197 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4200 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4203 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4206 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4209 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4212 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4215 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4218 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4221 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4224 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4227 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4230 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4233 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4236 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4239 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4242 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4245 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4248 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4251 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4254 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4257 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4260 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4263 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4266 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4269 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4272 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4275 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4278 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4281 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4284 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4287 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4290 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4293 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4296 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4299 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4302 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4305 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4308 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4311 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4314 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4317 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4320 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4323 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4326 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4329 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4332 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4335 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4338 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4341 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4344 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4347 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4350 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4353 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4356 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4359 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4362 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4365 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4368 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4371 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4374 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4377 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4380 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4383 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4386 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4389 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4392 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4395 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4398 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4401 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4404 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4407 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4410 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4413 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4416 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4419 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4422 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4425 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4428 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4431 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4434 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4437 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4440 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4443 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4446 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4449 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4452 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4455 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4458 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4461 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4464 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4467 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4470 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4473 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4476 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4479 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4482 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4485 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4488 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4491 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4494 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4497 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4500 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4503 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4506 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4509 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4512 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4515 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4518 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4521 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4524 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4527 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4530 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4533 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4536 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4539 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4542 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4545 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4548 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4551 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4554 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4557 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4560 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4563 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4566 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4569 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4572 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4575 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4578 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4581 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4584 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4587 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4590 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4593 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4596 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4599 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4602 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4605 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4608 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4611 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4614 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4617 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4620 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4623 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4626 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4629 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4632 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4635 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4638 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4641 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4644 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4647 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4650 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4653 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4656 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4659 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4662 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4665 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4668 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4671 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4674 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4677 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4680 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4683 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4686 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4689 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4692 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4695 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4698 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4701 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4704 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4707 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4710 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4713 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4716 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4719 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4722 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4725 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4728 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4731 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4734 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4737 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4740 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4743 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4746 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4749 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4752 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4755 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4758 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4761 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4764 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4767 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4770 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4773 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4776 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4779 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4782 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4785 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4788 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4791 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4794 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4797 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4800 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4803 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4806 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4809 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4812 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4815 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4818 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4821 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4824 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4827 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4830 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4833 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4836 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4839 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4842 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4845 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4848 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4851 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4854 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4857 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4860 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4863 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4866 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4869 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4872 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4875 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4878 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4881 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4884 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4887 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4890 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4893 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4896 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4899 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4902 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4905 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4908 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4911 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4914 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4917 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4920 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4923 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4926 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4929 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4932 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4935 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4938 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4941 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4944 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4947 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4950 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4953 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4956 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4959 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4962 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4965 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4968 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4971 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4974 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4977 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4980 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4983 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4986 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4989 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4992 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4995 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:4998 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5001 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5004 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5007 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5010 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5013 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5016 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5019 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5022 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5025 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5028 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5031 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5034 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5037 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5040 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5043 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5046 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5049 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5052 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5055 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5058 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5061 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5064 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5067 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5070 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5073 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5076 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5079 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5082 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5085 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5088 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5091 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5094 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5097 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5100 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5103 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5106 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5109 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5112 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5115 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5118 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5121 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5124 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5127 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5130 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5133 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5136 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5139 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5142 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5145 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5148 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5151 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5154 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5157 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5160 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5163 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5166 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5169 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5172 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5175 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5178 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5181 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5184 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5187 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5190 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5193 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5196 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5199 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5202 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5205 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5208 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5211 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5214 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5217 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5220 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5223 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5226 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5229 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5232 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5235 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5238 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5241 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5244 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5247 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5250 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5253 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5256 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5259 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5262 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5265 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5268 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5271 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5274 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5277 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5280 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5283 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5286 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5289 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5292 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5295 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5298 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5301 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5304 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5307 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5310 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5313 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5316 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5319 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5322 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5325 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5328 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5331 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5334 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5337 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5340 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5343 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5346 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5349 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5352 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5355 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5358 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5361 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5364 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5367 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5370 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5373 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5376 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5379 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5382 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5385 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5388 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5391 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5394 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5397 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5400 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5403 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5406 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5409 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5412 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5415 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5418 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5421 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5424 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5427 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5430 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5433 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5436 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5439 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5442 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5445 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5448 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5451 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5454 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5457 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5460 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5463 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5466 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5469 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5472 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5475 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5478 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5481 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5484 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5487 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5490 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5493 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5496 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5499 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5502 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5505 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5508 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5511 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5514 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5517 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5520 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5523 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5526 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5529 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5532 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5535 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5538 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5541 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5544 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5547 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5550 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5553 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5556 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5559 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5562 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5565 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5568 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5571 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5574 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5577 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5580 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5583 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5586 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5589 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5592 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5595 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5598 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5601 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5604 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5607 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5610 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5613 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5616 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5619 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5622 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5625 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5628 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5631 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5634 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5637 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5640 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5643 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5646 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5649 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5652 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5655 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5658 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5661 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5664 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5667 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5670 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5673 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5676 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5679 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5682 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5685 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5688 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5691 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5694 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5697 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5700 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5703 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5706 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5709 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5712 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5715 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5718 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5721 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5724 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5727 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5730 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5733 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5736 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5739 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5742 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5745 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5748 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5751 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5754 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5757 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5760 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5763 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5766 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5769 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5772 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5775 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5778 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5781 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5784 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5787 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5790 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5793 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5796 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5799 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5802 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5805 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5808 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5811 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5814 +assert_return( + () => invoke($0, `f32x4.pmin`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5817 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([0, 0, 0, 0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5820 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([0, 0, 0, 0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5823 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5826 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5829 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5832 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5835 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([0, 0, 0, 0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5838 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([0, 0, 0, 0]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5841 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([0, 0, 0, 0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5844 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([0, 0, 0, 0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5847 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5850 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5853 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5856 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5859 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5862 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5865 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5868 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5871 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5874 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5877 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5880 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5883 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5886 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5889 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5892 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5895 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5898 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5901 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5904 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5907 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5910 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5913 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5916 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5919 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5922 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5925 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5928 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5931 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5934 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5937 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([-0, -0, -0, -0]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5940 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([-0, -0, -0, -0]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5943 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5946 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5949 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5952 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5955 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([-0, -0, -0, -0]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5958 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5961 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([-0, -0, -0, -0]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5964 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([-0, -0, -0, -0]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5967 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5970 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5973 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5976 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5979 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5982 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5985 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5988 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5991 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5994 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:5997 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6000 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6003 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6006 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6009 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6012 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6015 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6018 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6021 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6024 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6027 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6030 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6033 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6036 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6039 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6042 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6045 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6048 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6051 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6054 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6057 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6060 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6063 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6066 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6069 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6072 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6075 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6078 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6081 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6084 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6087 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6090 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6093 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6096 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6099 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6102 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6105 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6108 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6111 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6114 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6117 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6120 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6123 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6126 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6129 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6132 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6135 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6138 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6141 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6144 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6147 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6150 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6153 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6156 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6159 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6162 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6165 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6168 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6171 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6174 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6177 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6180 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6183 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6186 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6189 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6192 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6195 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6198 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6201 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6204 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6207 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6210 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6213 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6216 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6219 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6222 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6225 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6228 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6231 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6234 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6237 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6240 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6243 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6246 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6249 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6252 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6255 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6258 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6261 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6264 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6267 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6270 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6273 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6276 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6279 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6282 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6285 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6288 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6291 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6294 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6297 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6300 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6303 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6306 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6309 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6312 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6315 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6318 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6321 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6324 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6327 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6330 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6333 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6336 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6339 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6342 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6345 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6348 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6351 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6354 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6357 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6360 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6363 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6366 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6369 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6372 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6375 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6378 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6381 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6384 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6387 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6390 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6393 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6396 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6399 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6402 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6405 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6408 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6411 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6414 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6417 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6420 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6423 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6426 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6429 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6432 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6435 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6438 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6441 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6444 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6447 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6450 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6453 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6456 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6459 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6462 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6465 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6468 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6471 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6474 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6477 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6480 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6483 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6486 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6489 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6492 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6495 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6498 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6501 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6504 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6507 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6510 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6513 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6516 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6519 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6522 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6525 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6528 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6531 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6534 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6537 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6540 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6543 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6546 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6549 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6552 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6555 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6558 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6561 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6564 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([0.5, 0.5, 0.5, 0.5]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6567 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6570 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6573 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6576 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6579 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6582 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6585 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6588 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6591 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6594 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6597 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6600 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6603 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6606 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6609 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6612 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6615 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6618 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6621 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6624 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6627 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6630 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6633 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6636 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6639 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6642 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6645 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6648 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6651 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6654 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6657 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6660 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6663 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6666 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6669 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6672 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6675 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6678 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6681 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([-0.5, -0.5, -0.5, -0.5]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6684 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6687 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6690 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6693 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6696 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6699 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6702 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6705 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6708 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6711 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6714 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6717 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6720 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6723 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6726 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6729 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6732 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6735 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6738 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6741 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6744 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6747 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6750 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6753 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6756 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6759 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6762 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6765 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6768 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6771 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6774 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6777 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([1, 1, 1, 1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6780 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([1, 1, 1, 1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6783 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6786 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6789 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6792 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6795 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([1, 1, 1, 1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6798 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([1, 1, 1, 1]), f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6801 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([1, 1, 1, 1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6804 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([1, 1, 1, 1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6807 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6810 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6813 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6816 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6819 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6822 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6825 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6828 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6831 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6834 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6837 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6840 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6843 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6846 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6849 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6852 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6855 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6858 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6861 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6864 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6867 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6870 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6873 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6876 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6879 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6882 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6885 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6888 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6891 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6894 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6897 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([-1, -1, -1, -1]), f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6900 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([-1, -1, -1, -1]), f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6903 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6906 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6909 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6912 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6915 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([-1, -1, -1, -1]), f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6918 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6921 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([-1, -1, -1, -1]), f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6924 +assert_return( + () => invoke($0, `f32x4.pmax`, [f32x4([-1, -1, -1, -1]), f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6927 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6930 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6933 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6936 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6939 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6942 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6945 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6948 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6951 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6954 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6957 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6960 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6963 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6966 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6969 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6972 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6975 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6978 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6981 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6984 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6987 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6990 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6993 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6996 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:6999 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7002 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7005 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7008 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7011 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7014 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7017 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7020 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7023 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7026 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7029 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7032 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7035 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7038 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7041 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7044 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7047 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7050 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7053 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7056 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7059 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7062 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7065 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7068 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7071 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7074 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7077 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7080 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7083 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7086 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7089 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7092 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7095 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7098 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7101 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7104 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7107 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7110 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7113 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7116 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7119 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7122 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7125 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7128 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7131 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7134 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7137 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7140 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7143 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7146 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7149 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7152 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7155 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7158 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7161 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7164 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7167 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7170 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7173 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7176 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7179 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7182 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7185 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7188 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7191 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7194 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7197 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7200 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7203 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7206 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7209 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7212 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7215 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7218 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7221 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7224 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7227 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7230 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7233 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7236 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7239 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7242 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7245 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7248 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7251 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7254 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7257 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7260 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7263 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7266 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7269 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7272 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7275 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7278 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7281 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7284 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7287 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7290 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7293 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7296 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7299 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7302 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7305 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7308 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7311 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7314 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7317 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7320 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7323 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7326 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7329 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7332 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7335 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7338 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7341 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7344 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7347 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7350 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7353 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7356 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7359 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7362 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7365 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7368 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7371 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7374 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7377 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7380 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7383 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7386 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7389 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7392 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7395 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7398 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7401 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7404 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7407 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7410 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7413 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7416 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7419 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7422 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7425 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7428 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7431 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7434 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7437 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7440 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7443 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7446 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7449 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7452 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7455 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7458 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7461 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7464 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7467 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7470 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7473 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7476 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7479 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7482 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7485 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7488 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7491 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7494 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7497 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7500 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7503 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7506 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7509 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7512 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7515 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7518 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7521 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7524 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7527 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7530 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7533 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7536 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7539 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7542 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7545 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7548 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7551 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7554 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7557 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7560 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7563 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7566 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7569 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7572 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7575 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7578 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7581 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7584 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7587 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7590 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7593 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7596 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7599 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7602 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7605 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7608 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7611 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7614 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7617 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7620 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7623 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7626 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7629 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7632 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7635 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7638 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7641 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7644 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7647 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7650 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7653 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7656 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7659 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7662 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7665 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7668 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7671 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7674 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7677 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7680 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7683 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7686 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7689 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7692 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7695 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7698 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7701 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7704 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7707 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7710 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7713 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7716 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7719 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7722 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7725 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7728 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7731 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7734 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7737 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7740 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7743 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7746 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7749 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7752 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7755 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7758 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7761 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7764 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7767 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7770 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7773 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7776 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7779 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7782 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7785 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7788 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7791 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7794 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7797 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7800 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7803 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7806 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7809 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7812 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7815 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7818 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7821 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7824 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7827 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7830 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7833 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7836 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7839 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7842 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7845 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7848 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7851 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7854 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7857 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7860 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7863 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7866 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7869 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7872 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7875 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7878 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7881 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7884 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7887 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7890 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7893 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7896 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7899 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7902 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7905 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7908 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7911 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7914 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7917 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7920 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7923 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7926 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7929 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7932 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7935 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7938 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7941 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7944 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7947 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7950 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7953 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7956 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7959 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7962 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7965 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7968 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7971 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7974 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7977 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7980 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7983 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7986 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7989 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7992 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7995 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:7998 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8001 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8004 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8007 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8010 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8013 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8016 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8019 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8022 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8025 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8028 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8031 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8034 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8037 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8040 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8043 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8046 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8049 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8052 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8055 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8058 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8061 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8064 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8067 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8070 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8073 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8076 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8079 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8082 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8085 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8088 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8091 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8094 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8097 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8100 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8103 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8106 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8109 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8112 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8115 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8118 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8121 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8124 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8127 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8130 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8133 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8136 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8139 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8142 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8145 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8148 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8151 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8154 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8157 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8160 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8163 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8166 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8169 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8172 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8175 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8178 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8181 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8184 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8187 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8190 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8193 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8196 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8199 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8202 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8205 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8208 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8211 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8214 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8217 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8220 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8223 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8226 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8229 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8232 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8235 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8238 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8241 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8244 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8247 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8250 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8253 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8256 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8259 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8262 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8265 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8268 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8271 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8274 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8277 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8280 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8283 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8286 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8289 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8292 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8295 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8298 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8301 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8304 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8307 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8310 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8313 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8316 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8319 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8322 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8325 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8328 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8331 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8334 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8337 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8340 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8343 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8346 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8349 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8352 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8355 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8358 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8361 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8364 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8367 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8370 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8373 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8376 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8379 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8382 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8385 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8388 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8391 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8394 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8397 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8400 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8403 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8406 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8409 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8412 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8415 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8418 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8421 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8424 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8427 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8430 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8433 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8436 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8439 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8442 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8445 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8448 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8451 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8454 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8457 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8460 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8463 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8466 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8469 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8472 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8475 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8478 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8481 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8484 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8487 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8490 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8493 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8496 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8499 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8502 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8505 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8508 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8511 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8514 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8517 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8520 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8523 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8526 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8529 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8532 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8535 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8538 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8541 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8544 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8547 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8550 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8553 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8556 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8559 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8562 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8565 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8568 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8571 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8574 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8577 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8580 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8583 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8586 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8589 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8592 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8595 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8598 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8601 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8604 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8607 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8610 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8613 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8616 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8619 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8622 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8625 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8628 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8631 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8634 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8637 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8640 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8643 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8646 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8649 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8652 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8655 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8658 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8661 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8664 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8667 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8670 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8673 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8676 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8679 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8682 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8685 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8688 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8691 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8694 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8697 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8700 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8703 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8706 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8709 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8712 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8715 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8718 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8721 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8724 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8727 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8730 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8733 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8736 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8739 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8742 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8745 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8748 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8751 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8754 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8757 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8760 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8763 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8766 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8769 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8772 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8775 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8778 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8781 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8784 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8787 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8790 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8793 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8796 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8799 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8802 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8805 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8808 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8811 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8814 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8817 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8820 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8823 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8826 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8829 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8832 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8835 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8838 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8841 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8844 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8847 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8850 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8853 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8856 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8859 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8862 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8865 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8868 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8871 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8874 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8877 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8880 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8883 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8886 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8889 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8892 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8895 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8898 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8901 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8904 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8907 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8910 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8913 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8916 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8919 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8922 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8925 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8928 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8931 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8934 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8937 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8940 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8943 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8946 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8949 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8952 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8955 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8958 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8961 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8964 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8967 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8970 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8973 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8976 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8979 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8982 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8985 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8988 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8991 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8994 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:8997 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9000 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9003 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9006 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9009 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9012 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9015 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9018 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9021 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9024 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9027 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9030 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9033 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9036 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9039 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9042 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9045 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9048 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9051 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9054 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9057 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9060 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9063 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9066 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9069 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9072 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9075 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9078 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9081 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9084 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9087 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9090 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9093 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9096 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9099 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9102 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9105 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9108 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9111 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9114 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9117 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9120 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9123 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9126 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9129 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9132 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9135 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9138 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9141 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9144 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9147 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9150 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9153 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9156 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9159 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9162 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9165 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9168 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9171 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9174 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9177 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9180 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9183 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9186 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9189 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9192 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9195 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9198 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9201 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9204 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9207 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9210 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9213 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9216 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9219 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9222 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9225 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9228 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9231 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9234 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9237 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9240 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9243 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9246 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9249 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9252 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9255 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9258 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9261 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9264 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9267 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9270 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9273 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9276 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9279 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9282 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9285 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9288 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9291 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9294 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9297 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9300 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9303 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9306 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9309 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9312 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9315 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9318 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9321 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9324 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9327 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9330 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9333 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9336 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9339 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9342 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9345 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9348 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9351 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9354 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9357 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9360 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9363 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9366 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9369 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9372 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9375 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9378 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9381 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9384 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9387 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9390 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9393 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9396 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9399 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9402 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9405 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9408 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9411 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9414 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9417 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9420 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9423 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9426 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9429 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9432 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9435 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9438 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9441 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9444 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9447 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9450 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9453 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9456 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9459 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9462 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9465 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9468 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9471 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9474 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9477 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9480 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9483 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9486 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9489 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9492 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9495 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9498 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9501 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9504 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9507 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9510 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9513 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9516 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9519 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9522 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9525 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9528 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9531 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9534 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9537 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9540 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9543 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9546 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9549 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9552 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9555 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9558 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9561 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9564 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9567 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9570 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9573 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9576 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9579 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9582 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9585 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9588 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9591 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9594 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9597 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9600 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9603 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9606 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9609 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9612 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9615 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9618 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9621 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9624 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9627 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9630 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9633 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9636 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9639 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9642 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9645 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9648 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9651 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9654 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9657 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9660 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9663 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9666 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9669 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9672 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9675 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9678 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9681 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9684 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9687 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9690 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9693 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9696 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9699 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9702 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9705 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9708 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9711 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9714 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9717 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9720 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9723 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9726 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9729 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9732 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9735 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9738 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9741 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9744 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9747 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9750 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9753 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9756 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9759 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9762 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9765 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9768 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9771 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9774 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9777 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9780 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9783 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9786 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9789 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9792 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9795 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9798 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9801 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9804 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9807 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9810 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9813 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9816 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9819 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9822 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9825 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9828 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9831 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9834 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9837 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9840 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9843 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9846 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9849 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9852 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9855 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9858 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9861 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9864 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9867 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9870 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9873 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9876 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9879 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9882 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9885 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9888 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9891 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9894 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9897 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9900 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9903 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9906 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9909 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9912 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9915 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9918 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9921 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9924 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9927 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9930 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9933 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9936 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9939 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9942 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9945 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9948 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9951 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9954 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9957 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9960 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9963 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9966 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9969 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9972 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9975 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9978 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9981 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9984 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9987 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9990 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9993 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9996 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:9999 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10002 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10005 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10008 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10011 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10014 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10017 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10020 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10023 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10026 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10029 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10032 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10035 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10038 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10041 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10044 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10047 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10050 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10053 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10056 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10059 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10062 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10065 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10068 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10071 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10074 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10077 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10080 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10083 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10086 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10089 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10092 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10095 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10098 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10101 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10104 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10107 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10110 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10113 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10116 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10119 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10122 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10125 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10128 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10131 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10134 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10137 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10140 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10143 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10146 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10149 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10152 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10155 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10158 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10161 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10164 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10167 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10170 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10173 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10176 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10179 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10182 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10185 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10188 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10191 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10194 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10197 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10200 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10203 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10206 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10209 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10212 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10215 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10218 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10221 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10224 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10227 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10230 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10233 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10236 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10239 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10242 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10245 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10248 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10251 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10254 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10257 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10260 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10263 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10266 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10269 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10272 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10275 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10278 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10281 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10284 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10287 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10290 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10293 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10296 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10299 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10302 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10305 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10308 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10311 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10314 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10317 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10320 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10323 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10326 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10329 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10332 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10335 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10338 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10341 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10344 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10347 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10350 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10353 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10356 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10359 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10362 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10365 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10368 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10371 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10374 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10377 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10380 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10383 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10386 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10389 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10392 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10395 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10398 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10401 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10404 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10407 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10410 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10413 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10416 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10419 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10422 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10425 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10428 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10431 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10434 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10437 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10440 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10443 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10446 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10449 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10452 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10455 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10458 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10461 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10464 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10467 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10470 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10473 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10476 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10479 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10482 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10485 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10488 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10491 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10494 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10497 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10500 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10503 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10506 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10509 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10512 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10515 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10518 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10521 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10524 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10527 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10530 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10533 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10536 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10539 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10542 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10545 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10548 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10551 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10554 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10557 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10560 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10563 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10566 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10569 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10572 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10575 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10578 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10581 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10584 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10587 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10590 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10593 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10596 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10599 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10602 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10605 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10608 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10611 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10614 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10617 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10620 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10623 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10626 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10629 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10632 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10635 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10638 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10641 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10644 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10647 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10650 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10653 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10656 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10659 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10662 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10665 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10668 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10671 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10674 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10677 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10680 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10683 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10686 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10689 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10692 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10695 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10698 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10701 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10704 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10707 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10710 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10713 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10716 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10719 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10722 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10725 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10728 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10731 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10734 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10737 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10740 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10743 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10746 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10749 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10752 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10755 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10758 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10761 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10764 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10767 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10770 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10773 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10776 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10779 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10782 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10785 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10788 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10791 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10794 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10797 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10800 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10803 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10806 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10809 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10812 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10815 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10818 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10821 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10824 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10827 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10830 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10833 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10836 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10839 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10842 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10845 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10848 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10851 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10854 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10857 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10860 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10863 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10866 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10869 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10872 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10875 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10878 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + bytes("f32", [0x0, 0x0, 0xc0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10881 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10884 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10887 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10890 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10893 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10896 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10899 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10902 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10905 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10908 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10911 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10914 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10917 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10920 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10923 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10926 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10929 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10932 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10935 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10938 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10941 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10944 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10947 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10950 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10953 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10956 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10959 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10962 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10965 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10968 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10971 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10974 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10977 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10980 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10983 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10986 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10989 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10992 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10995 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:10998 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11001 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11004 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11007 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11010 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11013 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0, 0, 0, 0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11016 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0, -0, -0, -0]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11019 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11022 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11025 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11028 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11031 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([0.5, 0.5, 0.5, 0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11034 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-0.5, -0.5, -0.5, -0.5]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11037 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([1, 1, 1, 1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11040 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-1, -1, -1, -1]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11043 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11046 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11049 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11052 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11055 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11058 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11061 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11064 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11067 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11070 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11073 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11076 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11079 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11082 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11085 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11088 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11091 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11094 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11097 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11100 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11103 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11106 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11109 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11112 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11115 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11118 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11121 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11124 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11127 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11130 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11133 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11136 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11139 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11142 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + bytes("f32", [0x0, 0x0, 0xa0, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11145 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11148 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11151 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11154 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11157 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11160 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11163 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11166 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11169 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11172 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11175 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11178 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11181 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11184 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11187 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11190 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11193 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11196 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11199 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11202 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11205 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11208 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11211 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11214 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11217 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11220 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11223 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11226 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11229 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11232 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11235 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11238 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11241 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11244 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11247 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11250 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11253 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11256 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11259 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11262 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11265 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11268 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11271 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11274 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11277 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11280 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11283 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11286 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11289 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11292 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11295 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11298 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11301 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11304 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11307 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11310 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11313 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11316 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11319 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11322 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11325 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11328 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11331 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11334 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11337 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11340 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11343 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11346 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11349 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11352 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11355 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11358 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11361 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11364 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11367 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11370 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11373 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11376 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11379 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11382 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11385 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11388 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11391 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11394 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11397 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11400 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11403 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11406 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11409 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11412 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11415 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11418 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11421 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11424 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11427 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11430 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11433 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11436 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11439 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11442 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11445 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11448 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11451 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11454 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11457 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11460 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11463 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11466 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11469 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11472 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11475 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11478 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11481 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11484 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11487 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11490 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11493 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11496 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11499 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11502 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11505 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11508 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0, -0, -0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11511 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + value("f32", 0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11514 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + value("f32", -0.000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11517 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + value("f32", 0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11520 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + value("f32", -0.000000000000000000000000000000000000011754944), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11523 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([0.5, 0.5, 0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + value("f32", 0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11526 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-0.5, -0.5, -0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + value("f32", -0.5), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11529 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([1, 1, 1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11532 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-1, -1, -1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11535 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + value("f32", 6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11538 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + value("f32", -6.2831855), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11541 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11544 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11547 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11550 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11553 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11556 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11559 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11562 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11565 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11568 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11571 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11574 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11577 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11580 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11583 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11586 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + value("f32", 0.000000000012345679), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11589 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11592 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11595 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11598 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11601 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11604 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11607 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11610 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11613 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11616 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11619 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11622 +assert_return( + () => invoke($0, `f32x4.pmax`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11629 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.pmin (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11630 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.pmax (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11631 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.pmin (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11632 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.pmax (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11633 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.pmin (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11634 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.pmax (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11635 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.pmin (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11636 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.pmax (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11639 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.pmin (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11640 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.pmax (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11644 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.pmin-1st-arg-empty (result v128) + (f32x4.pmin (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11652 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.pmin-arg-empty (result v128) + (f32x4.pmin) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11660 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.pmax-1st-arg-empty (result v128) + (f32x4.pmax (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_pmin_pmax.wast:11668 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.pmax-arg-empty (result v128) + (f32x4.pmax) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_rounding.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_rounding.wast.js new file mode 100644 index 0000000000..cd67d7ca22 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_rounding.wast.js @@ -0,0 +1,3432 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_f32x4_rounding.wast + +// ./test/core/simd/simd_f32x4_rounding.wast:4 +let $0 = instantiate(`(module + (func (export "f32x4.ceil") (param v128) (result v128) (f32x4.ceil (local.get 0))) + (func (export "f32x4.floor") (param v128) (result v128) (f32x4.floor (local.get 0))) + (func (export "f32x4.trunc") (param v128) (result v128) (f32x4.trunc (local.get 0))) + (func (export "f32x4.nearest") (param v128) (result v128) (f32x4.nearest (local.get 0))) +)`); + +// ./test/core/simd/simd_f32x4_rounding.wast:11 +assert_return( + () => invoke($0, `f32x4.ceil`, [f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:13 +assert_return( + () => invoke($0, `f32x4.ceil`, [f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:15 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:17 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:19 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:21 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:23 +assert_return( + () => invoke($0, `f32x4.ceil`, [f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:25 +assert_return( + () => invoke($0, `f32x4.ceil`, [f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:27 +assert_return( + () => invoke($0, `f32x4.ceil`, [f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:29 +assert_return( + () => invoke($0, `f32x4.ceil`, [f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:31 +assert_return( + () => invoke($0, `f32x4.ceil`, [f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855])]), + [ + new F32x4Pattern( + value("f32", 7), + value("f32", 7), + value("f32", 7), + value("f32", 7), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:33 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6), + value("f32", -6), + value("f32", -6), + value("f32", -6), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:35 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:37 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:39 +assert_return( + () => invoke($0, `f32x4.ceil`, [f32x4([Infinity, Infinity, Infinity, Infinity])]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:41 +assert_return( + () => invoke($0, `f32x4.ceil`, [f32x4([-Infinity, -Infinity, -Infinity, -Infinity])]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:43 +assert_return( + () => invoke($0, `f32x4.ceil`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:45 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:47 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:49 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:51 +assert_return( + () => invoke($0, `f32x4.ceil`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:53 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:55 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:57 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:59 +assert_return( + () => invoke($0, `f32x4.ceil`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:61 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:63 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:65 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:67 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:69 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:71 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:73 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:75 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:77 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:79 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:81 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:83 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:85 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:87 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:89 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:91 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:93 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:95 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:97 +assert_return( + () => invoke($0, `f32x4.ceil`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:99 +assert_return( + () => invoke($0, `f32x4.floor`, [f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:101 +assert_return( + () => invoke($0, `f32x4.floor`, [f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:103 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:105 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:107 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:109 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:111 +assert_return( + () => invoke($0, `f32x4.floor`, [f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:113 +assert_return( + () => invoke($0, `f32x4.floor`, [f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:115 +assert_return( + () => invoke($0, `f32x4.floor`, [f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:117 +assert_return( + () => invoke($0, `f32x4.floor`, [f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:119 +assert_return( + () => invoke($0, `f32x4.floor`, [f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855])]), + [ + new F32x4Pattern( + value("f32", 6), + value("f32", 6), + value("f32", 6), + value("f32", 6), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:121 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -7), + value("f32", -7), + value("f32", -7), + value("f32", -7), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:123 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:125 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:127 +assert_return( + () => invoke($0, `f32x4.floor`, [f32x4([Infinity, Infinity, Infinity, Infinity])]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:129 +assert_return( + () => invoke($0, `f32x4.floor`, [f32x4([-Infinity, -Infinity, -Infinity, -Infinity])]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:131 +assert_return( + () => invoke($0, `f32x4.floor`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:133 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:135 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:137 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:139 +assert_return( + () => invoke($0, `f32x4.floor`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:141 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:143 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:145 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:147 +assert_return( + () => invoke($0, `f32x4.floor`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:149 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:151 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:153 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:155 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:157 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:159 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:161 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:163 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:165 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:167 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:169 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:171 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:173 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:175 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:177 +assert_return( + () => invoke($0, `f32x4.floor`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:179 +assert_return( + () => invoke($0, `f32x4.floor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:181 +assert_return( + () => invoke($0, `f32x4.floor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:183 +assert_return( + () => invoke($0, `f32x4.floor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:185 +assert_return( + () => invoke($0, `f32x4.floor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:187 +assert_return( + () => invoke($0, `f32x4.trunc`, [f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:189 +assert_return( + () => invoke($0, `f32x4.trunc`, [f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:191 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:193 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:195 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:197 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:199 +assert_return( + () => invoke($0, `f32x4.trunc`, [f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:201 +assert_return( + () => invoke($0, `f32x4.trunc`, [f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:203 +assert_return( + () => invoke($0, `f32x4.trunc`, [f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:205 +assert_return( + () => invoke($0, `f32x4.trunc`, [f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:207 +assert_return( + () => invoke($0, `f32x4.trunc`, [f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855])]), + [ + new F32x4Pattern( + value("f32", 6), + value("f32", 6), + value("f32", 6), + value("f32", 6), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:209 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6), + value("f32", -6), + value("f32", -6), + value("f32", -6), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:211 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:213 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:215 +assert_return( + () => invoke($0, `f32x4.trunc`, [f32x4([Infinity, Infinity, Infinity, Infinity])]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:217 +assert_return( + () => invoke($0, `f32x4.trunc`, [f32x4([-Infinity, -Infinity, -Infinity, -Infinity])]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:219 +assert_return( + () => invoke($0, `f32x4.trunc`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:221 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:223 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:225 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:227 +assert_return( + () => invoke($0, `f32x4.trunc`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:229 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:231 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:233 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:235 +assert_return( + () => invoke($0, `f32x4.trunc`, [f32x4([123456790, 123456790, 123456790, 123456790])]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:237 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:239 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:241 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:243 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:245 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:247 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:249 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:251 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:253 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:255 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:257 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:259 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:261 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:263 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:265 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:267 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:269 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:271 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:273 +assert_return( + () => invoke($0, `f32x4.trunc`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:275 +assert_return( + () => invoke($0, `f32x4.nearest`, [f32x4([0, 0, 0, 0])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:277 +assert_return( + () => invoke($0, `f32x4.nearest`, [f32x4([-0, -0, -0, -0])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:279 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:281 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:283 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:285 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:287 +assert_return( + () => invoke($0, `f32x4.nearest`, [f32x4([0.5, 0.5, 0.5, 0.5])]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:289 +assert_return( + () => invoke($0, `f32x4.nearest`, [f32x4([-0.5, -0.5, -0.5, -0.5])]), + [ + new F32x4Pattern( + value("f32", -0), + value("f32", -0), + value("f32", -0), + value("f32", -0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:291 +assert_return( + () => invoke($0, `f32x4.nearest`, [f32x4([1, 1, 1, 1])]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:293 +assert_return( + () => invoke($0, `f32x4.nearest`, [f32x4([-1, -1, -1, -1])]), + [ + new F32x4Pattern( + value("f32", -1), + value("f32", -1), + value("f32", -1), + value("f32", -1), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:295 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", 6), + value("f32", 6), + value("f32", 6), + value("f32", 6), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:297 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [ + new F32x4Pattern( + value("f32", -6), + value("f32", -6), + value("f32", -6), + value("f32", -6), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:299 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:301 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:303 +assert_return( + () => invoke($0, `f32x4.nearest`, [f32x4([Infinity, Infinity, Infinity, Infinity])]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:305 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:307 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:309 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:311 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:313 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:315 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:317 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:319 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:321 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:323 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:325 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:327 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + 1234567900000000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:329 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + 0.000000000012345679, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:331 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:333 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:335 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:337 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:339 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:341 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:343 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:345 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:347 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([81985530000000000, 81985530000000000, 81985530000000000, 81985530000000000]), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:349 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:351 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([ + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + 42984030000000000000000, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:353 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + f32x4([156374990000, 156374990000, 156374990000, 156374990000]), + ]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:355 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:357 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + `canonical_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:359 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + 0x0, + 0x0, + 0xa0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:361 +assert_return( + () => invoke($0, `f32x4.nearest`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + 0x0, + 0x0, + 0xa0, + 0xff, + ]), + ]), + [ + new F32x4Pattern( + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + `arithmetic_nan`, + ), + ], +); + +// ./test/core/simd/simd_f32x4_rounding.wast:367 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.ceil (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:368 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.floor (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:369 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.trunc (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:370 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.nearest (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:371 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.ceil (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:372 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.floor (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:373 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.trunc (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:374 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.nearest (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:375 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.ceil (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:376 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.floor (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:377 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.trunc (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:378 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.nearest (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:379 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.ceil (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:380 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.floor (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:381 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.trunc (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:382 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.nearest (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:385 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.ceil (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:386 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.floor (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:387 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.trunc (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:388 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.nearest (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:392 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.ceil-arg-empty (result v128) + (f32x4.ceil) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:400 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.floor-arg-empty (result v128) + (f32x4.floor) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:408 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.trunc-arg-empty (result v128) + (f32x4.trunc) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f32x4_rounding.wast:416 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.nearest-arg-empty (result v128) + (f32x4.nearest) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2.wast.js new file mode 100644 index 0000000000..72409ad8e9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2.wast.js @@ -0,0 +1,13218 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_f64x2.wast + +// ./test/core/simd/simd_f64x2.wast:4 +let $0 = instantiate(`(module + (func (export "f64x2.min") (param v128 v128) (result v128) (f64x2.min (local.get 0) (local.get 1))) + (func (export "f64x2.max") (param v128 v128) (result v128) (f64x2.max (local.get 0) (local.get 1))) + (func (export "f64x2.abs") (param v128) (result v128) (f64x2.abs (local.get 0))) + ;; f64x2.min const vs const + (func (export "f64x2.min_with_const_0") (result v128) (f64x2.min (v128.const f64x2 0 1) (v128.const f64x2 0 2))) + (func (export "f64x2.min_with_const_1") (result v128) (f64x2.min (v128.const f64x2 2 -3) (v128.const f64x2 1 3))) + (func (export "f64x2.min_with_const_2") (result v128) (f64x2.min (v128.const f64x2 0 1) (v128.const f64x2 0 1))) + (func (export "f64x2.min_with_const_3") (result v128) (f64x2.min (v128.const f64x2 2 3) (v128.const f64x2 2 3))) + (func (export "f64x2.min_with_const_4") (result v128) (f64x2.min (v128.const f64x2 0x00 0x01) (v128.const f64x2 0x00 0x02))) + (func (export "f64x2.min_with_const_5") (result v128) (f64x2.min (v128.const f64x2 0x02 0x80000000) (v128.const f64x2 0x01 2147483648))) + (func (export "f64x2.min_with_const_6") (result v128) (f64x2.min (v128.const f64x2 0x00 0x01) (v128.const f64x2 0x00 0x01))) + (func (export "f64x2.min_with_const_7") (result v128) (f64x2.min (v128.const f64x2 0x02 0x80000000) (v128.const f64x2 0x02 0x80000000))) + ;; f64x2.min param vs const + (func (export "f64x2.min_with_const_9") (param v128) (result v128) (f64x2.min (local.get 0) (v128.const f64x2 0 1))) + (func (export "f64x2.min_with_const_10") (param v128) (result v128) (f64x2.min (v128.const f64x2 2 -3) (local.get 0))) + (func (export "f64x2.min_with_const_11") (param v128) (result v128) (f64x2.min (v128.const f64x2 0 1) (local.get 0))) + (func (export "f64x2.min_with_const_12") (param v128) (result v128) (f64x2.min (local.get 0) (v128.const f64x2 2 3))) + (func (export "f64x2.min_with_const_13") (param v128) (result v128) (f64x2.min (v128.const f64x2 0x00 0x01) (local.get 0))) + (func (export "f64x2.min_with_const_14") (param v128) (result v128) (f64x2.min (v128.const f64x2 0x02 0x80000000) (local.get 0))) + (func (export "f64x2.min_with_const_15") (param v128) (result v128) (f64x2.min (v128.const f64x2 0x00 0x01) (local.get 0))) + (func (export "f64x2.min_with_const_16") (param v128) (result v128) (f64x2.min (v128.const f64x2 0x02 0x80000000) (local.get 0))) + ;; f64x2.max const vs const + (func (export "f64x2.max_with_const_18") (result v128) (f64x2.max (v128.const f64x2 0 1) (v128.const f64x2 0 2))) + (func (export "f64x2.max_with_const_19") (result v128) (f64x2.max (v128.const f64x2 2 -3) (v128.const f64x2 1 3))) + (func (export "f64x2.max_with_const_20") (result v128) (f64x2.max (v128.const f64x2 0 1) (v128.const f64x2 0 1))) + (func (export "f64x2.max_with_const_21") (result v128) (f64x2.max (v128.const f64x2 2 3) (v128.const f64x2 2 3))) + (func (export "f64x2.max_with_const_22") (result v128) (f64x2.max (v128.const f64x2 0x00 0x01) (v128.const f64x2 0x00 0x02))) + (func (export "f64x2.max_with_const_23") (result v128) (f64x2.max (v128.const f64x2 0x02 0x80000000) (v128.const f64x2 0x01 2147483648))) + (func (export "f64x2.max_with_const_24") (result v128) (f64x2.max (v128.const f64x2 0x00 0x01) (v128.const f64x2 0x00 0x01))) + (func (export "f64x2.max_with_const_25") (result v128) (f64x2.max (v128.const f64x2 0x02 0x80000000) (v128.const f64x2 0x02 0x80000000))) + ;; f64x2.max param vs const + (func (export "f64x2.max_with_const_27") (param v128) (result v128) (f64x2.max (local.get 0) (v128.const f64x2 0 1))) + (func (export "f64x2.max_with_const_28") (param v128) (result v128) (f64x2.max (v128.const f64x2 2 -3) (local.get 0))) + (func (export "f64x2.max_with_const_29") (param v128) (result v128) (f64x2.max (v128.const f64x2 0 1) (local.get 0))) + (func (export "f64x2.max_with_const_30") (param v128) (result v128) (f64x2.max (local.get 0) (v128.const f64x2 2 3))) + (func (export "f64x2.max_with_const_31") (param v128) (result v128) (f64x2.max (v128.const f64x2 0x00 0x01) (local.get 0))) + (func (export "f64x2.max_with_const_32") (param v128) (result v128) (f64x2.max (v128.const f64x2 0x02 0x80000000) (local.get 0))) + (func (export "f64x2.max_with_const_33") (param v128) (result v128) (f64x2.max (v128.const f64x2 0x00 0x01) (local.get 0))) + (func (export "f64x2.max_with_const_34") (param v128) (result v128) (f64x2.max (v128.const f64x2 0x02 0x80000000) (local.get 0))) + + (func (export "f64x2.abs_with_const_35") (result v128) (f64x2.abs (v128.const f64x2 -0 -1))) + (func (export "f64x2.abs_with_const_36") (result v128) (f64x2.abs (v128.const f64x2 -2 -3))) +)`); + +// ./test/core/simd/simd_f64x2.wast:50 +assert_return( + () => invoke($0, `f64x2.min_with_const_0`, []), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:51 +assert_return( + () => invoke($0, `f64x2.min_with_const_1`, []), + [new F64x2Pattern(value("f64", 1), value("f64", -3))], +); + +// ./test/core/simd/simd_f64x2.wast:52 +assert_return( + () => invoke($0, `f64x2.min_with_const_2`, []), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:53 +assert_return( + () => invoke($0, `f64x2.min_with_const_3`, []), + [new F64x2Pattern(value("f64", 2), value("f64", 3))], +); + +// ./test/core/simd/simd_f64x2.wast:55 +assert_return( + () => invoke($0, `f64x2.min_with_const_4`, []), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:56 +assert_return( + () => invoke($0, `f64x2.min_with_const_5`, []), + [new F64x2Pattern(value("f64", 1), value("f64", 2147483648))], +); + +// ./test/core/simd/simd_f64x2.wast:57 +assert_return( + () => invoke($0, `f64x2.min_with_const_6`, []), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:58 +assert_return( + () => invoke($0, `f64x2.min_with_const_7`, []), + [new F64x2Pattern(value("f64", 2), value("f64", 2147483648))], +); + +// ./test/core/simd/simd_f64x2.wast:59 +assert_return( + () => invoke($0, `f64x2.min_with_const_9`, [f64x2([0, 2])]), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:61 +assert_return( + () => invoke($0, `f64x2.min_with_const_10`, [f64x2([1, 3])]), + [new F64x2Pattern(value("f64", 1), value("f64", -3))], +); + +// ./test/core/simd/simd_f64x2.wast:63 +assert_return( + () => invoke($0, `f64x2.min_with_const_11`, [f64x2([0, 1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:65 +assert_return( + () => invoke($0, `f64x2.min_with_const_12`, [f64x2([2, 3])]), + [new F64x2Pattern(value("f64", 2), value("f64", 3))], +); + +// ./test/core/simd/simd_f64x2.wast:67 +assert_return( + () => invoke($0, `f64x2.min_with_const_13`, [f64x2([0, 2])]), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:69 +assert_return( + () => invoke($0, `f64x2.min_with_const_14`, [f64x2([1, 2147483648])]), + [new F64x2Pattern(value("f64", 1), value("f64", 2147483648))], +); + +// ./test/core/simd/simd_f64x2.wast:71 +assert_return( + () => invoke($0, `f64x2.min_with_const_15`, [f64x2([0, 1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:73 +assert_return( + () => invoke($0, `f64x2.min_with_const_16`, [f64x2([2, 2147483648])]), + [new F64x2Pattern(value("f64", 2), value("f64", 2147483648))], +); + +// ./test/core/simd/simd_f64x2.wast:76 +assert_return( + () => invoke($0, `f64x2.max_with_const_18`, []), + [new F64x2Pattern(value("f64", 0), value("f64", 2))], +); + +// ./test/core/simd/simd_f64x2.wast:77 +assert_return( + () => invoke($0, `f64x2.max_with_const_19`, []), + [new F64x2Pattern(value("f64", 2), value("f64", 3))], +); + +// ./test/core/simd/simd_f64x2.wast:78 +assert_return( + () => invoke($0, `f64x2.max_with_const_20`, []), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:79 +assert_return( + () => invoke($0, `f64x2.max_with_const_21`, []), + [new F64x2Pattern(value("f64", 2), value("f64", 3))], +); + +// ./test/core/simd/simd_f64x2.wast:81 +assert_return( + () => invoke($0, `f64x2.max_with_const_22`, []), + [new F64x2Pattern(value("f64", 0), value("f64", 2))], +); + +// ./test/core/simd/simd_f64x2.wast:82 +assert_return( + () => invoke($0, `f64x2.max_with_const_23`, []), + [new F64x2Pattern(value("f64", 2), value("f64", 2147483648))], +); + +// ./test/core/simd/simd_f64x2.wast:83 +assert_return( + () => invoke($0, `f64x2.max_with_const_24`, []), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:84 +assert_return( + () => invoke($0, `f64x2.max_with_const_25`, []), + [new F64x2Pattern(value("f64", 2), value("f64", 2147483648))], +); + +// ./test/core/simd/simd_f64x2.wast:85 +assert_return( + () => invoke($0, `f64x2.max_with_const_27`, [f64x2([0, 2])]), + [new F64x2Pattern(value("f64", 0), value("f64", 2))], +); + +// ./test/core/simd/simd_f64x2.wast:87 +assert_return( + () => invoke($0, `f64x2.max_with_const_28`, [f64x2([1, 3])]), + [new F64x2Pattern(value("f64", 2), value("f64", 3))], +); + +// ./test/core/simd/simd_f64x2.wast:89 +assert_return( + () => invoke($0, `f64x2.max_with_const_29`, [f64x2([0, 1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:91 +assert_return( + () => invoke($0, `f64x2.max_with_const_30`, [f64x2([2, 3])]), + [new F64x2Pattern(value("f64", 2), value("f64", 3))], +); + +// ./test/core/simd/simd_f64x2.wast:93 +assert_return( + () => invoke($0, `f64x2.max_with_const_31`, [f64x2([0, 2])]), + [new F64x2Pattern(value("f64", 0), value("f64", 2))], +); + +// ./test/core/simd/simd_f64x2.wast:95 +assert_return( + () => invoke($0, `f64x2.max_with_const_32`, [f64x2([1, 2147483648])]), + [new F64x2Pattern(value("f64", 2), value("f64", 2147483648))], +); + +// ./test/core/simd/simd_f64x2.wast:97 +assert_return( + () => invoke($0, `f64x2.max_with_const_33`, [f64x2([0, 1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:99 +assert_return( + () => invoke($0, `f64x2.max_with_const_34`, [f64x2([2, 2147483648])]), + [new F64x2Pattern(value("f64", 2), value("f64", 2147483648))], +); + +// ./test/core/simd/simd_f64x2.wast:102 +assert_return( + () => invoke($0, `f64x2.abs_with_const_35`, []), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:103 +assert_return( + () => invoke($0, `f64x2.abs_with_const_36`, []), + [new F64x2Pattern(value("f64", 2), value("f64", 3))], +); + +// ./test/core/simd/simd_f64x2.wast:107 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + f64x2([0, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:115 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:123 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf0, + 0x3f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:131 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + f64x2([0, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:139 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:147 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf0, + 0x3f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:155 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0, 0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:158 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0, 0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:161 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:164 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:167 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:170 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:173 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:176 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:179 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0, 0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:182 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0, 0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:185 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:188 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:191 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:194 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:197 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:200 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:203 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0, -0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:206 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0, -0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:209 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:212 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:215 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:218 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:221 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:224 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:227 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0, -0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:230 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0, -0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:233 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:236 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:239 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:242 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:245 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:248 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:251 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:254 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:257 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:260 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:263 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:266 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:269 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:272 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:275 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:278 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:281 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:284 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:287 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:290 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:293 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:296 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:299 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:302 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:305 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:308 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:311 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:314 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:317 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:320 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:323 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:326 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:329 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:332 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:335 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:338 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:341 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:344 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:347 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:350 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:353 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:356 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:359 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:362 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:365 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:368 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:371 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:374 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:377 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:380 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:383 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:386 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:389 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:392 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:395 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:398 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:401 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:404 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:407 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:410 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:413 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:416 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:419 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:422 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:425 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:428 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:431 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:434 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:437 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:440 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:443 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:446 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:449 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:452 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:455 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:458 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:461 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:464 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:467 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:470 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:473 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:476 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:479 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:482 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:485 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:488 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:491 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:494 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:497 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:500 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:503 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:506 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:509 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:512 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:515 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:518 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:521 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:524 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:527 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:530 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:533 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:536 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:539 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([1, 1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:542 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([1, 1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:545 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:548 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:551 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:554 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:557 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:560 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:563 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([1, 1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:566 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([1, 1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:569 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:572 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:575 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:578 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:581 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:584 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:587 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-1, -1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:590 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-1, -1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:593 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:596 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:599 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:602 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:605 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:608 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:611 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-1, -1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:614 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:617 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:620 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:623 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:626 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:629 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:632 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:635 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:638 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:641 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:644 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:647 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:650 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:653 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:656 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:659 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:662 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:665 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:668 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:671 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:674 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:677 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:680 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:683 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:686 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:689 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:692 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:695 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:698 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:701 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:704 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:707 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:710 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:713 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:716 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:719 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:722 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:725 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:728 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:731 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:734 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:737 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:740 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:743 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:746 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:749 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:752 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:755 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:758 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:761 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:764 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:767 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:770 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:773 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:776 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:779 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:782 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:785 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:788 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:791 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:794 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:797 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:800 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:803 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:806 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:809 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:812 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:815 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:818 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:821 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:824 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:827 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:830 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:833 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:836 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:839 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:842 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:845 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:848 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:851 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:854 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:857 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:860 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:863 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:866 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:869 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:872 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:875 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:878 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:881 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:884 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:887 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:890 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:893 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:896 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:899 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:902 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:905 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:908 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:911 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:914 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:917 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:920 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:923 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:926 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:929 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:932 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:935 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:938 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:941 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:944 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:947 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:950 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:953 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:956 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:959 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:962 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:965 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:968 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:971 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:974 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:977 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:980 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:983 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:986 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:989 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:992 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:995 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:998 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1001 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1004 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1007 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1010 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1013 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1016 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1019 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1022 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1025 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1028 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1031 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1034 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1037 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1040 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1043 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1046 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1049 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1052 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1055 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1058 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1061 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1064 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1067 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1070 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1073 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1076 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1079 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1082 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1085 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1088 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1091 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1094 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1097 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1100 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1103 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1106 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1109 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1112 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1115 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1118 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1121 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1124 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1127 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1130 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1133 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1136 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1139 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1142 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1145 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1148 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1151 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1154 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1157 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1160 +assert_return( + () => invoke($0, `f64x2.min`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:1163 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789012345690000000000000000000000000000000000000000), + value("f64", 123456789012345690000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1166 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000012345678901234569), + value("f64", 0.000000000000000000012345678901234569), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1169 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1172 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1175 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([-1234567890123456800, -1234567890123456800]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890123456800), + value("f64", -1234567890123456800), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1178 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000012345678901234569), + value("f64", 0.000000000000000000012345678901234569), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1181 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000012345678901234569), + value("f64", 0.000000000000000000012345678901234569), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1184 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000012345678901234569), + value("f64", 0.000000000000000000012345678901234569), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1187 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000012345678901234569), + value("f64", 0.000000000000000000012345678901234569), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1190 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([-1234567890123456800, -1234567890123456800]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890123456800), + value("f64", -1234567890123456800), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1193 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1196 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000012345678901234569), + value("f64", 0.000000000000000000012345678901234569), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1199 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1202 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1205 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([-1234567890123456800, -1234567890123456800]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890123456800), + value("f64", -1234567890123456800), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1208 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1211 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000012345678901234569), + value("f64", 0.000000000000000000012345678901234569), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1214 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1217 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1220 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([-1234567890123456800, -1234567890123456800]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890123456800), + value("f64", -1234567890123456800), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1223 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1234567890123456800, -1234567890123456800]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890123456800), + value("f64", -1234567890123456800), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1226 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1234567890123456800, -1234567890123456800]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890123456800), + value("f64", -1234567890123456800), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1229 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1234567890123456800, -1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890123456800), + value("f64", -1234567890123456800), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1232 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1234567890123456800, -1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890123456800), + value("f64", -1234567890123456800), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1235 +assert_return( + () => invoke($0, `f64x2.min`, [ + f64x2([-1234567890123456800, -1234567890123456800]), + f64x2([-1234567890123456800, -1234567890123456800]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890123456800), + value("f64", -1234567890123456800), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1238 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0, 0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1241 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0, 0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1244 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1247 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1250 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1253 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1256 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1259 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1262 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0, 0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1265 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0, 0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1268 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1271 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1274 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1277 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1280 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1283 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1286 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0, -0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1289 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0, -0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1292 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1295 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1298 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1301 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1304 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1307 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1310 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0, -0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1313 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0, -0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1316 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1319 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1322 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1325 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1328 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1331 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1334 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1337 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1340 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1343 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1346 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1349 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1352 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1355 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1358 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1361 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1364 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1367 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1370 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1373 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1376 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1379 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1382 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1385 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1388 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1391 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1394 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1397 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1400 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1403 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1406 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1409 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1412 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1415 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1418 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1421 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1424 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1427 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1430 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1433 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1436 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1439 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1442 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1445 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1448 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1451 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1454 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1457 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1460 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1463 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1466 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1469 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1472 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1475 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1478 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1481 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1484 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1487 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1490 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1493 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1496 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1499 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1502 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1505 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1508 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1511 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1514 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1517 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1520 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1523 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1526 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1529 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1532 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1535 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1538 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1541 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1544 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1547 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1550 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1553 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1556 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1559 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1562 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1565 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1568 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1571 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1574 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1577 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1580 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1583 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1586 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1589 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1592 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1595 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1598 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1601 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1604 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1607 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1610 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1613 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1616 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1619 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1622 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([1, 1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1625 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([1, 1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1628 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1631 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1634 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1637 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1640 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1643 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1646 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([1, 1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1649 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([1, 1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1652 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1655 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1658 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1661 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1664 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1667 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1670 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-1, -1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1673 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-1, -1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1676 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1679 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1682 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1685 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1688 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1691 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1694 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-1, -1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1697 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:1700 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1703 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:1706 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1709 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:1712 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1715 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:1718 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1721 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1724 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1727 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1730 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1733 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1736 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1739 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1742 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1745 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1748 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1751 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1754 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1757 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1760 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1763 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1766 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1769 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1772 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1775 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1778 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1781 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1784 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1787 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1790 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1793 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:1796 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1799 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1802 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1805 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1808 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1811 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1814 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1817 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1820 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1823 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1826 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1829 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1832 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1835 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1838 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1841 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1844 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1847 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1850 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1853 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1856 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1859 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1862 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1865 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1868 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1871 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1874 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1877 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1880 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1883 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1886 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1889 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:1892 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1895 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1898 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1901 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1904 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1907 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1910 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1913 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1916 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1919 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1922 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1925 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1928 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1931 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1934 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1937 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1940 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1943 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1946 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1949 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1952 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1955 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:1958 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:1961 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:1964 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1967 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1970 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1973 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1976 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1979 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:1982 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:1985 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2.wast:1988 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1991 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1994 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:1997 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2000 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:2003 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:2006 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2009 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2012 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2015 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2018 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2021 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2024 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2027 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2030 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2033 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2036 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2039 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2042 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2045 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2048 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2051 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2054 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2057 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2060 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2063 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2066 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2069 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2072 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2075 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2078 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2081 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2084 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2087 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2090 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2093 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2096 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2099 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2102 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2105 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2108 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2111 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2114 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2117 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2120 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2123 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2126 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2129 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2132 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2135 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2138 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2141 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2144 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2147 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2150 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2153 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2156 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2159 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2162 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2165 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2168 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2171 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2174 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2177 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2180 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2183 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2186 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2189 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2192 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2195 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2198 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2201 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2204 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2207 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2210 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2213 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2216 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2219 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2222 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2225 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2228 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2231 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2234 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2237 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2240 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2243 +assert_return( + () => invoke($0, `f64x2.max`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2.wast:2246 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789012345690000000000000000000000000000000000000000), + value("f64", 123456789012345690000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2249 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789012345690000000000000000000000000000000000000000), + value("f64", 123456789012345690000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2252 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789012345690000000000000000000000000000000000000000), + value("f64", 123456789012345690000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2255 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789012345690000000000000000000000000000000000000000), + value("f64", 123456789012345690000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2258 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([-1234567890123456800, -1234567890123456800]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789012345690000000000000000000000000000000000000000), + value("f64", 123456789012345690000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2261 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789012345690000000000000000000000000000000000000000), + value("f64", 123456789012345690000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2264 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000012345678901234569), + value("f64", 0.000000000000000000012345678901234569), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2267 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2270 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2273 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([-1234567890123456800, -1234567890123456800]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000012345678901234569), + value("f64", 0.000000000000000000012345678901234569), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2276 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789012345690000000000000000000000000000000000000000), + value("f64", 123456789012345690000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2279 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2282 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2285 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2288 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([-1234567890123456800, -1234567890123456800]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2291 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789012345690000000000000000000000000000000000000000), + value("f64", 123456789012345690000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2294 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2297 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2300 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2303 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([-1234567890123456800, -1234567890123456800]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2306 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1234567890123456800, -1234567890123456800]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789012345690000000000000000000000000000000000000000), + value("f64", 123456789012345690000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2309 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1234567890123456800, -1234567890123456800]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000012345678901234569), + value("f64", 0.000000000000000000012345678901234569), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2312 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1234567890123456800, -1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2315 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1234567890123456800, -1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2318 +assert_return( + () => invoke($0, `f64x2.max`, [ + f64x2([-1234567890123456800, -1234567890123456800]), + f64x2([-1234567890123456800, -1234567890123456800]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890123456800), + value("f64", -1234567890123456800), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2323 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([0, 0]), f64x2([0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:2326 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0, 0]), f64x2([0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:2329 +assert_return( + () => invoke($0, `f64x2.min`, [f64x2([-0, -0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2.wast:2332 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([0, 0]), f64x2([0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:2335 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0, 0]), f64x2([0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:2338 +assert_return( + () => invoke($0, `f64x2.max`, [f64x2([-0, -0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:2343 +assert_return( + () => invoke($0, `f64x2.abs`, [f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:2345 +assert_return( + () => invoke($0, `f64x2.abs`, [f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2.wast:2347 +assert_return( + () => invoke($0, `f64x2.abs`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2349 +assert_return( + () => invoke($0, `f64x2.abs`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2351 +assert_return( + () => invoke($0, `f64x2.abs`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2353 +assert_return( + () => invoke($0, `f64x2.abs`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2355 +assert_return( + () => invoke($0, `f64x2.abs`, [f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:2357 +assert_return( + () => invoke($0, `f64x2.abs`, [f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2.wast:2359 +assert_return( + () => invoke($0, `f64x2.abs`, [f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:2361 +assert_return( + () => invoke($0, `f64x2.abs`, [f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2.wast:2363 +assert_return( + () => invoke($0, `f64x2.abs`, [f64x2([6.283185307179586, 6.283185307179586])]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2365 +assert_return( + () => invoke($0, `f64x2.abs`, [f64x2([-6.283185307179586, -6.283185307179586])]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2367 +assert_return( + () => invoke($0, `f64x2.abs`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2369 +assert_return( + () => invoke($0, `f64x2.abs`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2371 +assert_return( + () => invoke($0, `f64x2.abs`, [f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:2373 +assert_return( + () => invoke($0, `f64x2.abs`, [f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2.wast:2375 +assert_return( + () => invoke($0, `f64x2.abs`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789012345690000000000000000000000000000000000000000), + value("f64", 123456789012345690000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2377 +assert_return( + () => invoke($0, `f64x2.abs`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000012345678901234569), + value("f64", 0.000000000000000000012345678901234569), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2379 +assert_return( + () => invoke($0, `f64x2.abs`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2381 +assert_return( + () => invoke($0, `f64x2.abs`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 12345678900000000000000000000000000000000000000), + value("f64", 12345678900000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2383 +assert_return( + () => invoke($0, `f64x2.abs`, [f64x2([-1234567890123456800, -1234567890123456800])]), + [ + new F64x2Pattern( + value("f64", 1234567890123456800), + value("f64", 1234567890123456800), + ), + ], +); + +// ./test/core/simd/simd_f64x2.wast:2387 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.abs (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2.wast:2388 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.min (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2.wast:2389 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.max (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2.wast:2393 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.abs-arg-empty (result v128) + (f64x2.abs) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2.wast:2401 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.min-1st-arg-empty (result v128) + (f64x2.min (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2.wast:2409 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.min-arg-empty (result v128) + (f64x2.min) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2.wast:2417 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.max-1st-arg-empty (result v128) + (f64x2.max (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2.wast:2425 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.max-arg-empty (result v128) + (f64x2.max) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2.wast:2435 +let $1 = instantiate(`(module + (func (export "max-min") (param v128 v128 v128) (result v128) + (f64x2.max (f64x2.min (local.get 0) (local.get 1))(local.get 2))) + (func (export "min-max") (param v128 v128 v128) (result v128) + (f64x2.min (f64x2.max (local.get 0) (local.get 1))(local.get 2))) + (func (export "max-abs") (param v128 v128) (result v128) + (f64x2.max (f64x2.abs (local.get 0)) (local.get 1))) + (func (export "min-abs") (param v128 v128) (result v128) + (f64x2.min (f64x2.abs (local.get 0)) (local.get 1))) +)`); + +// ./test/core/simd/simd_f64x2.wast:2446 +assert_return( + () => invoke($1, `max-min`, [ + f64x2([1.125, 1.125]), + f64x2([0.25, 0.25]), + f64x2([0.125, 0.125]), + ]), + [new F64x2Pattern(value("f64", 0.25), value("f64", 0.25))], +); + +// ./test/core/simd/simd_f64x2.wast:2450 +assert_return( + () => invoke($1, `min-max`, [ + f64x2([1.125, 1.125]), + f64x2([0.25, 0.25]), + f64x2([0.125, 0.125]), + ]), + [new F64x2Pattern(value("f64", 0.125), value("f64", 0.125))], +); + +// ./test/core/simd/simd_f64x2.wast:2454 +assert_return( + () => invoke($1, `max-abs`, [f64x2([-1.125, -1.125]), f64x2([0.125, 0.125])]), + [new F64x2Pattern(value("f64", 1.125), value("f64", 1.125))], +); + +// ./test/core/simd/simd_f64x2.wast:2457 +assert_return( + () => invoke($1, `min-abs`, [f64x2([-1.125, -1.125]), f64x2([0.125, 0.125])]), + [new F64x2Pattern(value("f64", 0.125), value("f64", 0.125))], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_arith.wast.js new file mode 100644 index 0000000000..ea798af4ad --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_arith.wast.js @@ -0,0 +1,32018 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_f64x2_arith.wast + +// ./test/core/simd/simd_f64x2_arith.wast:4 +let $0 = instantiate(`(module + (func (export "f64x2.add") (param v128 v128) (result v128) (f64x2.add (local.get 0) (local.get 1))) + (func (export "f64x2.sub") (param v128 v128) (result v128) (f64x2.sub (local.get 0) (local.get 1))) + (func (export "f64x2.mul") (param v128 v128) (result v128) (f64x2.mul (local.get 0) (local.get 1))) + (func (export "f64x2.div") (param v128 v128) (result v128) (f64x2.div (local.get 0) (local.get 1))) + (func (export "f64x2.neg") (param v128) (result v128) (f64x2.neg (local.get 0))) + (func (export "f64x2.sqrt") (param v128) (result v128) (f64x2.sqrt (local.get 0))) +)`); + +// ./test/core/simd/simd_f64x2_arith.wast:13 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0, 0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:16 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0, 0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:19 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:22 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:25 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:28 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:31 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0, 0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:34 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0, 0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:37 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:40 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:43 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:46 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:49 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:52 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:55 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:58 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:61 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0, -0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:64 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0, -0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:67 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:70 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:73 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:76 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:79 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0, -0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:82 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0, -0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:85 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:88 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:91 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:94 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:97 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:100 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:103 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:106 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:109 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:112 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:115 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:118 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:121 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:124 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:127 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:130 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:133 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:136 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:139 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:142 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:145 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:148 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:151 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:154 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:157 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:160 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:163 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:166 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:169 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:172 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:175 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:178 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:181 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:184 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:187 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:190 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:193 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:196 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:199 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:202 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:205 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:208 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:211 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:214 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:217 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:220 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:223 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1.5), value("f64", 1.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:226 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:229 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.783185307179586), + value("f64", 6.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:232 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -5.783185307179586), + value("f64", -5.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:235 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:238 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:241 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:244 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:247 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:250 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:253 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:256 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:259 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:262 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:265 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:268 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:271 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:274 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1.5), value("f64", -1.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:277 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 5.783185307179586), + value("f64", 5.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:280 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.783185307179586), + value("f64", -6.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:283 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:286 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:289 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:292 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:295 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:298 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:301 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([1, 1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:304 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([1, 1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:307 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:310 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:313 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 1.5), value("f64", 1.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:316 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:319 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([1, 1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 2), value("f64", 2))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:322 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([1, 1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:325 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 7.283185307179586), + value("f64", 7.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:328 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -5.283185307179586), + value("f64", -5.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:331 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:334 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:337 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:340 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:343 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:346 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:349 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-1, -1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:352 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-1, -1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:355 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:358 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:361 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:364 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -1.5), value("f64", -1.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:367 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-1, -1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:370 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -2), value("f64", -2))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:373 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 5.283185307179586), + value("f64", 5.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:376 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -7.283185307179586), + value("f64", -7.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:379 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:382 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:385 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:388 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:391 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:394 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:397 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:400 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:403 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:406 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:409 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 6.783185307179586), + value("f64", 6.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:412 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 5.783185307179586), + value("f64", 5.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:415 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 7.283185307179586), + value("f64", 7.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:418 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 5.283185307179586), + value("f64", 5.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:421 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 12.566370614359172), + value("f64", 12.566370614359172), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:424 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:427 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:430 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:433 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:436 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:439 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:442 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:445 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:448 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:451 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:454 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:457 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -5.783185307179586), + value("f64", -5.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:460 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -6.783185307179586), + value("f64", -6.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:463 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -5.283185307179586), + value("f64", -5.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:466 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -7.283185307179586), + value("f64", -7.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:469 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:472 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -12.566370614359172), + value("f64", -12.566370614359172), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:475 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:478 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:481 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:484 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:487 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:490 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:493 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:496 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:499 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:502 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:505 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:508 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:511 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:514 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:517 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:520 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:523 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:526 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:529 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:532 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:535 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:538 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:541 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:544 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:547 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:550 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:553 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:556 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:559 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:562 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:565 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:568 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:571 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:574 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:577 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:580 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:583 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:586 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:589 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:592 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:595 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:598 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:601 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:604 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:607 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:610 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:613 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:616 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:619 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:622 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:625 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:628 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:631 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:634 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:637 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:640 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:643 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:646 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:649 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:652 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:655 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:658 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:661 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:664 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:667 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:670 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:673 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:676 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:679 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:682 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:685 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:688 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:691 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:694 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:697 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:700 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:703 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:706 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:709 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:712 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:715 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:718 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:721 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:724 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:727 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:730 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:733 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:736 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:739 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:742 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:745 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:748 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:751 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:754 +assert_return( + () => invoke($0, `f64x2.add`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:757 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:760 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:763 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:766 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:769 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:772 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:775 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:778 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:781 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:784 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:787 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:790 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:793 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:796 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:799 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:802 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:805 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:808 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:811 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:814 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:817 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:820 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:823 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:826 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:829 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:832 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:835 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:838 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:841 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:844 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:847 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:850 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:853 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:856 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:859 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:862 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:865 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:868 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:871 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:874 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:877 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:880 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:883 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:886 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:889 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:892 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:895 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:898 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:901 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:904 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:907 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:910 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:913 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:916 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:919 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:922 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:925 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:928 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:931 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:934 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:937 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:940 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:943 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:946 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:949 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:952 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:955 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:958 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:961 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:964 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:967 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:970 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:973 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:976 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:979 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:982 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:985 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:988 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:991 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:994 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:997 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1000 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1003 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1006 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1009 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1012 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1015 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1018 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1021 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1024 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1027 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1030 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1033 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1036 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1039 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1042 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1045 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1048 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1051 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1054 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1057 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1060 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1063 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1066 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1069 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1072 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1075 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1078 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1081 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1084 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1087 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1090 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1093 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1096 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1099 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1102 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1105 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1108 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1111 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1114 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1117 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1120 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1123 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1126 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1129 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1132 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1135 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1138 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1141 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1144 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1147 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1150 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1153 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1156 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1159 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1162 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1165 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1168 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1171 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1174 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1177 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1180 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1183 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1186 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1189 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1192 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1195 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1198 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1201 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1204 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1207 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1210 +assert_return( + () => invoke($0, `f64x2.add`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1213 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 246913578), value("f64", 246913578))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1216 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2469135780000000000000000000), + value("f64", 2469135780000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1219 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2469135780000000000000000000), + value("f64", 2469135780000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1222 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000246913578), + value("f64", 0.0000000000246913578), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1225 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 246913578), value("f64", 246913578))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1228 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2469135780000000000000000000), + value("f64", 2469135780000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1231 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2469135780000000000000000000), + value("f64", 2469135780000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1234 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000246913578), + value("f64", 0.0000000000246913578), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1237 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 246913578.02469134), + value("f64", 246913578.02469134), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1240 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2469135780246913700000000000), + value("f64", 2469135780246913700000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1243 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2469135780246913700000000000), + value("f64", 2469135780246913700000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1246 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000024691357802469137), + value("f64", 0.000000000024691357802469137), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1249 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2750977865078623000000000), + value("f64", 2750977865078623000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1252 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1442304682926341000000000000000), + value("f64", 1442304682926341000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1255 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1442304682926341000000000000000), + value("f64", 1442304682926341000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1258 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 5247073869855161000), + value("f64", 5247073869855161000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1261 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2750977865078623000000000), + value("f64", 2750977865078623000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1264 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1442304682926341000000000000000), + value("f64", 1442304682926341000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1267 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1442304682926341000000000000000), + value("f64", 1442304682926341000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1270 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 5247073869855161000), + value("f64", 5247073869855161000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1273 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2750977865078623000000000), + value("f64", 2750977865078623000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1276 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1442304682926341000000000000000), + value("f64", 1442304682926341000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1279 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1442304682926341000000000000000), + value("f64", 1442304682926341000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1282 +assert_return( + () => invoke($0, `f64x2.add`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 5247073869855161000), + value("f64", 5247073869855161000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1285 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0, 0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1288 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0, 0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1291 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1294 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1297 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1300 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1303 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0, 0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1306 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0, 0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1309 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1312 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1315 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1318 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1321 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1324 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1327 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1330 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1333 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0, -0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1336 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0, -0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1339 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1342 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1345 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1348 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1351 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0, -0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1354 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0, -0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1357 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1360 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1363 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1366 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1369 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1372 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1375 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1378 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1381 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1384 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1387 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1390 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1393 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1396 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1399 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1402 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1405 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1408 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1411 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1414 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1417 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1420 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1423 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1426 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1429 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1432 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1435 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1438 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1441 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1444 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1447 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1450 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1453 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1456 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1459 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1462 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1465 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1468 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1471 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1474 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1477 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1480 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1483 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1486 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1489 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1492 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1495 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1498 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 1.5), value("f64", 1.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1501 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -5.783185307179586), + value("f64", -5.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1504 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.783185307179586), + value("f64", 6.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1507 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1510 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1513 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1516 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1519 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1522 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1525 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1528 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1531 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1534 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1537 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1540 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1543 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -1.5), value("f64", -1.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1546 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1549 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.783185307179586), + value("f64", -6.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1552 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 5.783185307179586), + value("f64", 5.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1555 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1558 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1561 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1564 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1567 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1570 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1573 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([1, 1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1576 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([1, 1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1579 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1582 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1585 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1588 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 1.5), value("f64", 1.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1591 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([1, 1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1594 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([1, 1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 2), value("f64", 2))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1597 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -5.283185307179586), + value("f64", -5.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1600 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 7.283185307179586), + value("f64", 7.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1603 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1606 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1609 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1612 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1615 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1618 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1621 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-1, -1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1624 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-1, -1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1627 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1630 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1633 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -1.5), value("f64", -1.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1636 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1639 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-1, -1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -2), value("f64", -2))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1642 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1645 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -7.283185307179586), + value("f64", -7.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1648 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 5.283185307179586), + value("f64", 5.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1651 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1654 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1657 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1660 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1663 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1666 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1669 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1672 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1675 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1678 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1681 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 5.783185307179586), + value("f64", 5.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1684 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 6.783185307179586), + value("f64", 6.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1687 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 5.283185307179586), + value("f64", 5.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1690 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 7.283185307179586), + value("f64", 7.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1693 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1696 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 12.566370614359172), + value("f64", 12.566370614359172), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1699 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1702 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1705 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1708 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1711 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1714 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1717 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1720 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1723 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1726 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1729 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -6.783185307179586), + value("f64", -6.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1732 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -5.783185307179586), + value("f64", -5.783185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1735 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -7.283185307179586), + value("f64", -7.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1738 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -5.283185307179586), + value("f64", -5.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1741 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -12.566370614359172), + value("f64", -12.566370614359172), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1744 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1747 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1750 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1753 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1756 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1759 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1762 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1765 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1768 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1771 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1774 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1777 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1780 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1783 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1786 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1789 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1792 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1795 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1798 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1801 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1804 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1807 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1810 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1813 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1816 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1819 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1822 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1825 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1828 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1831 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1834 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1837 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1840 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1843 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1846 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1849 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1852 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1855 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1858 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1861 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1864 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1867 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1870 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1873 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1876 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1879 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1882 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1885 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1888 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1891 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1894 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1897 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1900 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1903 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1906 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1909 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1912 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1915 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1918 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507202), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1921 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1924 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1927 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1930 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1933 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1936 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1939 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1942 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1945 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1948 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1951 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1954 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1957 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1960 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1963 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1966 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1969 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1972 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1975 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1978 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1981 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1984 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1987 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1990 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1993 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1996 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:1999 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2002 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2005 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2008 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2011 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2014 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2017 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2020 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2023 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2026 +assert_return( + () => invoke($0, `f64x2.sub`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2029 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2032 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2035 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2038 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2041 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2044 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2047 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2050 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2053 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2056 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2059 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2062 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2065 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2068 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2071 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2074 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2077 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2080 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2083 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2086 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2089 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2092 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2095 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2098 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2101 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2104 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2107 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2110 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2113 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2116 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2119 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2122 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2125 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2128 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2131 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2134 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2137 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2140 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2143 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2146 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2149 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2152 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2155 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2158 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2161 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2164 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2167 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2170 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2173 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2176 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2179 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2182 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2185 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2188 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2191 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2194 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2197 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2200 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2203 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2206 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2209 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2212 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2215 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2218 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2221 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2224 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2227 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2230 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2233 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2236 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2239 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2242 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2245 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2248 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2251 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2254 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2257 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2260 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2263 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2266 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2269 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2272 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2275 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2278 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2281 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2284 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2287 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2290 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2293 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2296 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2299 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2302 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2305 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2308 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2311 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2314 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2317 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2320 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2323 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2326 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2329 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2332 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2335 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2338 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2341 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2344 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2347 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2350 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2353 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2356 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2359 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2362 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2365 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2368 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2371 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2374 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2377 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2380 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2383 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2386 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2389 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2392 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2395 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2398 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2401 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2404 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2407 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2410 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2413 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2416 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2419 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2422 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2425 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2428 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2431 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2434 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2437 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2440 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2443 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2446 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2449 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2452 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2455 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2458 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2461 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2464 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2467 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2470 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2473 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2476 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2479 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2482 +assert_return( + () => invoke($0, `f64x2.sub`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2485 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2488 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2491 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2494 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2497 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2500 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2503 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2506 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2509 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2512 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2515 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2518 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2521 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2524 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2527 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2530 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2533 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2536 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2539 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2542 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2545 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2548 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2551 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2554 +assert_return( + () => invoke($0, `f64x2.sub`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2557 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0, 0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2560 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0, 0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2563 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2566 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2569 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2572 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2575 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0, 0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2578 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0, 0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2581 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2584 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2587 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2590 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2593 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2596 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2599 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2602 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2605 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0, -0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2608 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0, -0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2611 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2614 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2617 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2620 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2623 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0, -0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2626 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0, -0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2629 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2632 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2635 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2638 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2641 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2644 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2647 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2650 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2653 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2656 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2659 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2662 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2665 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2668 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2671 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2674 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2677 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2680 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2683 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 3.9999999999999996), + value("f64", 3.9999999999999996), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2686 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -3.9999999999999996), + value("f64", -3.9999999999999996), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2689 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2692 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2695 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2698 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2701 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2704 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2707 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2710 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2713 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2716 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2719 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2722 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2725 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2728 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2731 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -3.9999999999999996), + value("f64", -3.9999999999999996), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2734 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 3.9999999999999996), + value("f64", 3.9999999999999996), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2737 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2740 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2743 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2746 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2749 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2752 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2755 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2758 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2761 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.25), value("f64", 0.25))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2764 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.25), value("f64", -0.25))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2767 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2770 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2773 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 3.141592653589793), + value("f64", 3.141592653589793), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2776 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -3.141592653589793), + value("f64", -3.141592653589793), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2779 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2782 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2785 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2788 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2791 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2794 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2797 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2800 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2803 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2806 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011125369292536007), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2809 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -0.25), value("f64", -0.25))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2812 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0.25), value("f64", 0.25))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2815 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2818 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2821 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -3.141592653589793), + value("f64", -3.141592653589793), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2824 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 3.141592653589793), + value("f64", 3.141592653589793), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2827 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2830 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2833 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2836 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2839 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2842 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2845 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([1, 1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2848 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([1, 1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2851 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2854 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2857 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2860 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2863 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([1, 1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2866 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([1, 1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2869 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2872 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2875 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2878 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2881 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2884 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2887 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2890 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2893 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-1, -1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2896 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-1, -1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2899 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2902 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2905 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2908 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2911 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-1, -1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2914 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2917 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2920 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2923 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2926 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2929 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2932 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2935 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2938 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2941 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2944 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2947 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2950 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2953 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 3.141592653589793), + value("f64", 3.141592653589793), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2956 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -3.141592653589793), + value("f64", -3.141592653589793), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2959 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2962 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2965 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 39.47841760435743), + value("f64", 39.47841760435743), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2968 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -39.47841760435743), + value("f64", -39.47841760435743), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2971 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2974 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2977 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2980 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2983 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2986 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2989 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2992 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2995 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:2998 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013980551375161837), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3001 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -3.141592653589793), + value("f64", -3.141592653589793), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3004 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 3.141592653589793), + value("f64", 3.141592653589793), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3007 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3010 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3013 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -39.47841760435743), + value("f64", -39.47841760435743), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3016 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 39.47841760435743), + value("f64", 39.47841760435743), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3019 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3022 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3025 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3028 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3031 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3034 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3037 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3040 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3043 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 3.9999999999999996), + value("f64", 3.9999999999999996), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3046 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -3.9999999999999996), + value("f64", -3.9999999999999996), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3049 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3052 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3055 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3058 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3061 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3064 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3067 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3070 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3073 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000008881784197001251), + value("f64", 0.0000000000000008881784197001251), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3076 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000008881784197001251), + value("f64", 0.0000000000000008881784197001251), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3079 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3082 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3085 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3088 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3091 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -3.9999999999999996), + value("f64", -3.9999999999999996), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3094 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 3.9999999999999996), + value("f64", 3.9999999999999996), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3097 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3100 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 89884656743115790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3103 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3106 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3109 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3112 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3115 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3118 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3121 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.0000000000000008881784197001251), + value("f64", -0.0000000000000008881784197001251), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3124 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.0000000000000008881784197001251), + value("f64", -0.0000000000000008881784197001251), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3127 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3130 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3133 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3136 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3139 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3142 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3145 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3148 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3151 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3154 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3157 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3160 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3163 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000008881784197001251), + value("f64", 0.0000000000000008881784197001251), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3166 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.0000000000000008881784197001251), + value("f64", -0.0000000000000008881784197001251), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3169 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3172 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3175 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3178 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3181 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3184 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3187 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3190 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3193 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3196 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3199 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3202 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3205 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3208 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3211 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000008881784197001251), + value("f64", 0.0000000000000008881784197001251), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3214 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.0000000000000008881784197001251), + value("f64", -0.0000000000000008881784197001251), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3217 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3220 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3223 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3226 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3229 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3232 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3235 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3238 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3241 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3244 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3247 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3250 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3253 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3256 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3259 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3262 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3265 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3268 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3271 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3274 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3277 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3280 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3283 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3286 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3289 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3292 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3295 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3298 +assert_return( + () => invoke($0, `f64x2.mul`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3301 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3304 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3307 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3310 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3313 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3316 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3319 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3322 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3325 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3328 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3331 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3334 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3337 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3340 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3343 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3346 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3349 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3352 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3355 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3358 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3361 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3364 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3367 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3370 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3373 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3376 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3379 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3382 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3385 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3388 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3391 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3394 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3397 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3400 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3403 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3406 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3409 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3412 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3415 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3418 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3421 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3424 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3427 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3430 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3433 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3436 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3439 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3442 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3445 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3448 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3451 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3454 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3457 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3460 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3463 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3466 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3469 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3472 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3475 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3478 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3481 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3484 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3487 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3490 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3493 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3496 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3499 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3502 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3505 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3508 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3511 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3514 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3517 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3520 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3523 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3526 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3529 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3532 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3535 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3538 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3541 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3544 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3547 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3550 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3553 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3556 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3559 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3562 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3565 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3568 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3571 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3574 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3577 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3580 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3583 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3586 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3589 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3592 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3595 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3598 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3601 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3604 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3607 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3610 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3613 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3616 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3619 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3622 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3625 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3628 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3631 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3634 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3637 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3640 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3643 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3646 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3649 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3652 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3655 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3658 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3661 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3664 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3667 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3670 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3673 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3676 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3679 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3682 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3685 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3688 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3691 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3694 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3697 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3700 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3703 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3706 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3709 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3712 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3715 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3718 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3721 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3724 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3727 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3730 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3733 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3736 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3739 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3742 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3745 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3748 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3751 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3754 +assert_return( + () => invoke($0, `f64x2.mul`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3757 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 15241578750190520), + value("f64", 15241578750190520), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3760 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1524157875019052000000000000000000000000000000000000000), + value("f64", 1524157875019052000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3763 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1524157875019052000000000000000000000000000000000000000), + value("f64", 1524157875019052000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3766 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000000000001524157875019052), + value("f64", 0.0000000000000000000001524157875019052), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3769 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 15241578750190520), + value("f64", 15241578750190520), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3772 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1524157875019052000000000000000000000000000000000000000), + value("f64", 1524157875019052000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3775 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1524157875019052000000000000000000000000000000000000000), + value("f64", 1524157875019052000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3778 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000000000001524157875019052), + value("f64", 0.0000000000000000000001524157875019052), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3781 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 15241578753238834), + value("f64", 15241578753238834), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3784 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1524157875323883800000000000000000000000000000000000000), + value("f64", 1524157875323883800000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3787 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1524157875323883800000000000000000000000000000000000000), + value("f64", 1524157875323883800000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3790 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000000000001524157875323884), + value("f64", 0.0000000000000000000001524157875323884), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3793 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1891969803538134400000000000000000000000000000000), + value("f64", 1891969803538134400000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3796 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 520060699597813300000000000000000000000000000000000000000000), + value("f64", 520060699597813300000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3799 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 520060699597813300000000000000000000000000000000000000000000), + value("f64", 520060699597813300000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3802 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 6882946048929205000000000000000000000), + value("f64", 6882946048929205000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3805 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1891969803538134400000000000000000000000000000000), + value("f64", 1891969803538134400000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3808 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 520060699597813300000000000000000000000000000000000000000000), + value("f64", 520060699597813300000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3811 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 520060699597813300000000000000000000000000000000000000000000), + value("f64", 520060699597813300000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3814 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 6882946048929205000000000000000000000), + value("f64", 6882946048929205000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3817 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1891969803538134400000000000000000000000000000000), + value("f64", 1891969803538134400000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3820 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 520060699597813300000000000000000000000000000000000000000000), + value("f64", 520060699597813300000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3823 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 520060699597813300000000000000000000000000000000000000000000), + value("f64", 520060699597813300000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3826 +assert_return( + () => invoke($0, `f64x2.mul`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 6882946048929205000000000000000000000), + value("f64", 6882946048929205000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3829 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0, 0]), f64x2([0, 0])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3832 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0, 0]), f64x2([-0, -0])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3835 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3838 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3841 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3844 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3847 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0, 0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3850 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0, 0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3853 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3856 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3859 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3862 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3865 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3868 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3871 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3874 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3877 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0, -0]), f64x2([0, 0])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3880 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0, -0]), f64x2([-0, -0])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3883 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3886 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3889 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3892 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3895 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0, -0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3898 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0, -0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3901 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3904 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3907 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3910 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3913 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3916 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3919 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3922 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3925 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3928 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3931 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3934 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3937 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3940 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3943 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3946 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3949 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003541315033259774), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003541315033259774), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3952 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003541315033259774), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003541315033259774), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3955 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3958 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3961 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern(value("f64", 4503599627370496), value("f64", 4503599627370496)), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3964 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern(value("f64", 4503599627370496), value("f64", 4503599627370496)), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3967 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3970 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3973 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3976 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3979 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3982 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3985 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3988 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004450147717014403), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3991 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3994 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:3997 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003541315033259774), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003541315033259774), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4000 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003541315033259774), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003541315033259774), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4003 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4006 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4009 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -4503599627370496), + value("f64", -4503599627370496), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4012 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -4503599627370496), + value("f64", -4503599627370496), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4015 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4018 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4021 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4024 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4027 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 22471164185778950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 22471164185778950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4030 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -22471164185778950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -22471164185778950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4033 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4036 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4039 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4042 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4045 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.07957747154594767), + value("f64", 0.07957747154594767), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4048 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.07957747154594767), + value("f64", -0.07957747154594767), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4051 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002781342323134), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002781342323134), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4054 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002781342323134), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002781342323134), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4057 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4060 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4063 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4066 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4069 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4072 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4075 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -22471164185778950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -22471164185778950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4078 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 22471164185778950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 22471164185778950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4081 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4084 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4087 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4090 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4093 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.07957747154594767), + value("f64", -0.07957747154594767), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4096 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.07957747154594767), + value("f64", 0.07957747154594767), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4099 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002781342323134), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002781342323134), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4102 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002781342323134), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002781342323134), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4105 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4108 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4111 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4114 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4117 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([1, 1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4120 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([1, 1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4123 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4126 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4129 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 2), value("f64", 2))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4132 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -2), value("f64", -2))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4135 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([1, 1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4138 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([1, 1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4141 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.15915494309189535), + value("f64", 0.15915494309189535), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4144 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.15915494309189535), + value("f64", -0.15915494309189535), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4147 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4150 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4153 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4156 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4159 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4162 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4165 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-1, -1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4168 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-1, -1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4171 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4174 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 44942328371557900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4177 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -2), value("f64", -2))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4180 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 2), value("f64", 2))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4183 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-1, -1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4186 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4189 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.15915494309189535), + value("f64", -0.15915494309189535), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4192 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.15915494309189535), + value("f64", 0.15915494309189535), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4195 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4198 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005562684646268003), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4201 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4204 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4207 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4210 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4213 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4216 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4219 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4222 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4225 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 12.566370614359172), + value("f64", 12.566370614359172), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4228 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -12.566370614359172), + value("f64", -12.566370614359172), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4231 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4234 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4237 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4240 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4243 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349513784379046), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349513784379046), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4246 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349513784379046), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349513784379046), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4249 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4252 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4255 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4258 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4261 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4264 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4267 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4270 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4273 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -12.566370614359172), + value("f64", -12.566370614359172), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4276 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 12.566370614359172), + value("f64", 12.566370614359172), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4279 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4282 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4285 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4288 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4291 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349513784379046), + value("f64", -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349513784379046), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4294 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349513784379046), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349513784379046), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4297 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4300 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4303 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4306 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4309 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4312 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4315 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4318 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4321 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4324 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4327 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4330 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4333 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 28611174857570280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 28611174857570280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4336 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -28611174857570280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -28611174857570280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4339 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4342 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4345 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4348 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4351 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4354 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4357 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4360 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4363 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4366 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4369 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4372 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4375 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4378 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4381 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -28611174857570280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -28611174857570280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4384 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 28611174857570280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 28611174857570280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4387 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4390 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4393 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4396 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4399 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4402 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4405 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4408 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4411 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000002220446049250313), + value("f64", 0.0000000000000002220446049250313), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4414 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.0000000000000002220446049250313), + value("f64", -0.0000000000000002220446049250313), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4417 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4420 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4423 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4426 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4429 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4432 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4435 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4438 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4441 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4444 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4447 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4450 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4453 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4456 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4459 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000002220446049250313), + value("f64", 0.0000000000000002220446049250313), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4462 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.0000000000000002220446049250313), + value("f64", -0.0000000000000002220446049250313), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4465 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4468 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + value("f64", -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4471 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4474 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4477 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4480 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4483 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4486 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4489 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4492 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4495 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4498 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4501 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4504 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4507 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4510 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4513 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4516 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4519 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4522 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4525 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4528 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4531 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4534 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4537 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4540 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4543 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4546 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4549 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4552 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4555 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4558 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4561 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4564 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4567 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4570 +assert_return( + () => invoke($0, `f64x2.div`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4573 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4576 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4579 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4582 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4585 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4588 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4591 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4594 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4597 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4600 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4603 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4606 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4609 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4612 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4615 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4618 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4621 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4624 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4627 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4630 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4633 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4636 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4639 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4642 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4645 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4648 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4651 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4654 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4657 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4660 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4663 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4666 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4669 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4672 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4675 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4678 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4681 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4684 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4687 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4690 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4693 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4696 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4699 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4702 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4705 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4708 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4711 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4714 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4717 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4720 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4723 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4726 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4729 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4732 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4735 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4738 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4741 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4744 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4747 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4750 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4753 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4756 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4759 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4762 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4765 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4768 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4771 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4774 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4777 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4780 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4783 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4786 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4789 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4792 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4795 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4798 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4801 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4804 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4807 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4810 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4813 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4816 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4819 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4822 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4825 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4828 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4831 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4834 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4837 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4840 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4843 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4846 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4849 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4852 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4855 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4858 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4861 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4864 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4867 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4870 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4873 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4876 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4879 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4882 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4885 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4888 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4891 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4894 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4897 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4900 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4903 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4906 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4909 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4912 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4915 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4918 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4921 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4924 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4927 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4930 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4933 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4936 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4939 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4942 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4945 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4948 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4951 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4954 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4957 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4960 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4963 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4966 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4969 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4972 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4975 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4978 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4981 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4984 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4987 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4990 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4993 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4996 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:4999 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5002 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5005 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5008 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5011 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5014 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5017 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5020 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5023 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5026 +assert_return( + () => invoke($0, `f64x2.div`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5029 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5032 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5035 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5038 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5041 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5044 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5047 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5050 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5053 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5056 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5059 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5062 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5065 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5068 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5071 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5074 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5077 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5080 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5083 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5086 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5089 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5092 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5095 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5098 +assert_return( + () => invoke($0, `f64x2.div`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5101 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5103 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5105 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014916681462400413), + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014916681462400413), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5107 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5109 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([0.5, 0.5])]), + [ + new F64x2Pattern( + value("f64", 0.7071067811865476), + value("f64", 0.7071067811865476), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5111 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([-0.5, -0.5])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5113 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5115 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([-1, -1])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5117 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([6.283185307179586, 6.283185307179586])]), + [ + new F64x2Pattern( + value("f64", 2.5066282746310002), + value("f64", 2.5066282746310002), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5119 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([-6.283185307179586, -6.283185307179586])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5121 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 13407807929942596000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 13407807929942596000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5123 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5125 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022227587494850775), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022227587494850775), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5127 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022227587494850775), + value("f64", 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022227587494850775), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5129 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5131 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5133 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5135 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5137 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5139 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5141 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([123456789, 123456789])]), + [ + new F64x2Pattern( + value("f64", 11111.111060555555), + value("f64", 11111.111060555555), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5143 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 35136418286444.62), + value("f64", 35136418286444.62), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5145 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 35136418286444.62), + value("f64", 35136418286444.62), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5147 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000035136418286444623), + value("f64", 0.0000035136418286444623), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5149 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([123456789, 123456789])]), + [ + new F64x2Pattern( + value("f64", 11111.111060555555), + value("f64", 11111.111060555555), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5151 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 35136418286444.62), + value("f64", 35136418286444.62), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5153 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 35136418286444.62), + value("f64", 35136418286444.62), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5155 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000035136418286444623), + value("f64", 0.0000035136418286444623), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5157 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([123456789.01234567, 123456789.01234567])]), + [ + new F64x2Pattern( + value("f64", 11111.11106111111), + value("f64", 11111.11106111111), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5159 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 35136418288201.445), + value("f64", 35136418288201.445), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5161 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 35136418288201.445), + value("f64", 35136418288201.445), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5163 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000003513641828820144), + value("f64", 0.000003513641828820144), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5165 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1172812402961.0667), + value("f64", 1172812402961.0667), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5167 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern(value("f64", 849206889670103), value("f64", 849206889670103)), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5169 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern(value("f64", 849206889670103), value("f64", 849206889670103)), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5171 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 1619733599.9872265), + value("f64", 1619733599.9872265), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5173 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1172812402961.0667), + value("f64", 1172812402961.0667), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5175 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern(value("f64", 849206889670103), value("f64", 849206889670103)), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5177 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern(value("f64", 849206889670103), value("f64", 849206889670103)), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5179 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 1619733599.9872265), + value("f64", 1619733599.9872265), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5181 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1172812402961.0667), + value("f64", 1172812402961.0667), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5183 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern(value("f64", 849206889670103), value("f64", 849206889670103)), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5185 +assert_return( + () => invoke($0, `f64x2.sqrt`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern(value("f64", 849206889670103), value("f64", 849206889670103)), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5187 +assert_return( + () => invoke($0, `f64x2.sqrt`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 1619733599.9872265), + value("f64", 1619733599.9872265), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5189 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5191 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5193 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5195 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5197 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5199 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5201 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5203 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5205 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([6.283185307179586, 6.283185307179586])]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5207 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([-6.283185307179586, -6.283185307179586])]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5209 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5211 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5213 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5215 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5217 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5219 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5221 +assert_return( + () => invoke($0, `f64x2.neg`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5223 +assert_return( + () => invoke($0, `f64x2.neg`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5225 +assert_return( + () => invoke($0, `f64x2.neg`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5227 +assert_return( + () => invoke($0, `f64x2.neg`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5229 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", -123456789), value("f64", -123456789))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5231 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890000000000000000000), + value("f64", -1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5233 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890000000000000000000), + value("f64", -1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5235 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([0.0000000000123456789, 0.0000000000123456789])]), + [ + new F64x2Pattern( + value("f64", -0.0000000000123456789), + value("f64", -0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5237 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", -123456789), value("f64", -123456789))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5239 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890000000000000000000), + value("f64", -1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5241 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890000000000000000000), + value("f64", -1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5243 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([0.0000000000123456789, 0.0000000000123456789])]), + [ + new F64x2Pattern( + value("f64", -0.0000000000123456789), + value("f64", -0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5245 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([123456789.01234567, 123456789.01234567])]), + [ + new F64x2Pattern( + value("f64", -123456789.01234567), + value("f64", -123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5247 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890123456900000000000), + value("f64", -1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5249 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -1234567890123456900000000000), + value("f64", -1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5251 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000012345678901234568), + value("f64", -0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5253 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", -1375488932539311400000000), + value("f64", -1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5255 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -721152341463170500000000000000), + value("f64", -721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5257 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -721152341463170500000000000000), + value("f64", -721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5259 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", -2623536934927580700), + value("f64", -2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5261 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", -1375488932539311400000000), + value("f64", -1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5263 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -721152341463170500000000000000), + value("f64", -721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5265 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -721152341463170500000000000000), + value("f64", -721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5267 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", -2623536934927580700), + value("f64", -2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5269 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", -1375488932539311400000000), + value("f64", -1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5271 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -721152341463170500000000000000), + value("f64", -721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5273 +assert_return( + () => invoke($0, `f64x2.neg`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -721152341463170500000000000000), + value("f64", -721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5275 +assert_return( + () => invoke($0, `f64x2.neg`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", -2623536934927580700), + value("f64", -2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5279 +let $1 = instantiate(`(module + (func (export "f64x2_add_arith") (result v128) + (f64x2.add (v128.const f64x2 nan:0x8000000000000 1.0) (v128.const f64x2 nan 1.0))) + (func (export "f64x2_div_mixed") (result v128) + (f64x2.div (v128.const f64x2 nan 1.0) (v128.const f64x2 2.0 -nan:0x8000000000000))) + (func (export "f64x2_mul_mixed") (result v128) + (f64x2.mul (v128.const f64x2 nan:0x8000000000000 1.0) (v128.const f64x2 2.0 nan))) + (func (export "f64x2_neg_canon") (result v128) + (f64x2.neg (v128.const f64x2 nan 1.0))) + (func (export "f64x2_sqrt_canon") (result v128) + (f64x2.sqrt (v128.const f64x2 4.0 -nan))) + (func (export "f64x2_sub_arith") (result v128) + (f64x2.sub (v128.const f64x2 1.0 -1.0) (v128.const f64x2 -nan 1.0))) +)`); + +// ./test/core/simd/simd_f64x2_arith.wast:5294 +assert_return( + () => invoke($1, `f64x2_add_arith`, []), + [new F64x2Pattern(`arithmetic_nan`, value("f64", 2))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5295 +assert_return( + () => invoke($1, `f64x2_div_mixed`, []), + [new F64x2Pattern(`canonical_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5296 +assert_return( + () => invoke($1, `f64x2_mul_mixed`, []), + [new F64x2Pattern(`arithmetic_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5297 +assert_return( + () => invoke($1, `f64x2_neg_canon`, []), + [new F64x2Pattern(`canonical_nan`, value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5298 +assert_return( + () => invoke($1, `f64x2_sqrt_canon`, []), + [new F64x2Pattern(value("f64", 2), `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5299 +assert_return( + () => invoke($1, `f64x2_sub_arith`, []), + [new F64x2Pattern(`canonical_nan`, value("f64", -2))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5302 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.neg (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5303 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.sqrt (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5304 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.add (i64.const 0) (f64.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5305 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.sub (i64.const 0) (f64.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5306 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.mul (i64.const 0) (f64.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5307 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.div (i64.const 0) (f64.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5311 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.neg-arg-empty (result v128) + (f64x2.neg) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5319 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.sqrt-arg-empty (result v128) + (f64x2.sqrt) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5327 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.add-1st-arg-empty (result v128) + (f64x2.add (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5335 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.add-arg-empty (result v128) + (f64x2.add) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5343 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.sub-1st-arg-empty (result v128) + (f64x2.sub (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5351 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.sub-arg-empty (result v128) + (f64x2.sub) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5359 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.mul-1st-arg-empty (result v128) + (f64x2.mul (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5367 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.mul-arg-empty (result v128) + (f64x2.mul) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5375 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.div-1st-arg-empty (result v128) + (f64x2.div (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5383 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.div-arg-empty (result v128) + (f64x2.div) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_arith.wast:5393 +let $2 = instantiate(`(module + (func (export "add-sub") (param v128 v128 v128) (result v128) + (f64x2.add (f64x2.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "div-add") (param v128 v128 v128) (result v128) + (f64x2.div (f64x2.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "div-mul") (param v128 v128 v128) (result v128) + (f64x2.div (f64x2.mul (local.get 0) (local.get 1))(local.get 2))) + (func (export "div-sub") (param v128 v128 v128) (result v128) + (f64x2.div (f64x2.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "mul-add") (param v128 v128 v128) (result v128) + (f64x2.mul (f64x2.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "mul-div") (param v128 v128 v128) (result v128) + (f64x2.mul (f64x2.div (local.get 0) (local.get 1))(local.get 2))) + (func (export "mul-sub") (param v128 v128 v128) (result v128) + (f64x2.mul (f64x2.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "sub-add") (param v128 v128 v128) (result v128) + (f64x2.sub (f64x2.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "add-neg") (param v128 v128) (result v128) + (f64x2.add (f64x2.neg (local.get 0)) (local.get 1))) + (func (export "add-sqrt") (param v128 v128) (result v128) + (f64x2.add (f64x2.sqrt (local.get 0)) (local.get 1))) + (func (export "div-neg") (param v128 v128) (result v128) + (f64x2.div (f64x2.neg (local.get 0)) (local.get 1))) + (func (export "div-sqrt") (param v128 v128) (result v128) + (f64x2.div (f64x2.sqrt (local.get 0)) (local.get 1))) + (func (export "mul-neg") (param v128 v128) (result v128) + (f64x2.mul (f64x2.neg (local.get 0)) (local.get 1))) + (func (export "mul-sqrt") (param v128 v128) (result v128) + (f64x2.mul (f64x2.sqrt (local.get 0)) (local.get 1))) + (func (export "sub-neg") (param v128 v128) (result v128) + (f64x2.sub (f64x2.neg (local.get 0)) (local.get 1))) + (func (export "sub-sqrt") (param v128 v128) (result v128) + (f64x2.sub (f64x2.sqrt (local.get 0)) (local.get 1))) +)`); + +// ./test/core/simd/simd_f64x2_arith.wast:5428 +assert_return( + () => invoke($2, `add-sub`, [ + f64x2([1.125, 1.125]), + f64x2([0.25, 0.25]), + f64x2([0.125, 0.125]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5432 +assert_return( + () => invoke($2, `div-add`, [ + f64x2([1.125, 1.125]), + f64x2([0.125, 0.125]), + f64x2([0.25, 0.25]), + ]), + [new F64x2Pattern(value("f64", 5), value("f64", 5))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5436 +assert_return( + () => invoke($2, `div-mul`, [ + f64x2([1.125, 1.125]), + f64x2([4, 4]), + f64x2([0.25, 0.25]), + ]), + [new F64x2Pattern(value("f64", 18), value("f64", 18))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5440 +assert_return( + () => invoke($2, `div-sub`, [ + f64x2([1.125, 1.125]), + f64x2([0.125, 0.125]), + f64x2([0.25, 0.25]), + ]), + [new F64x2Pattern(value("f64", 4), value("f64", 4))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5444 +assert_return( + () => invoke($2, `mul-add`, [ + f64x2([1.25, 1.25]), + f64x2([0.25, 0.25]), + f64x2([0.25, 0.25]), + ]), + [new F64x2Pattern(value("f64", 0.375), value("f64", 0.375))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5448 +assert_return( + () => invoke($2, `mul-div`, [ + f64x2([1.125, 1.125]), + f64x2([0.125, 0.125]), + f64x2([0.25, 0.25]), + ]), + [new F64x2Pattern(value("f64", 2.25), value("f64", 2.25))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5452 +assert_return( + () => invoke($2, `mul-sub`, [ + f64x2([1.125, 1.125]), + f64x2([0.125, 0.125]), + f64x2([0.25, 0.25]), + ]), + [new F64x2Pattern(value("f64", 0.25), value("f64", 0.25))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5456 +assert_return( + () => invoke($2, `sub-add`, [ + f64x2([1.125, 1.125]), + f64x2([0.25, 0.25]), + f64x2([0.125, 0.125]), + ]), + [new F64x2Pattern(value("f64", 1.25), value("f64", 1.25))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5460 +assert_return( + () => invoke($2, `add-neg`, [f64x2([1.125, 1.125]), f64x2([0.125, 0.125])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5463 +assert_return( + () => invoke($2, `add-sqrt`, [f64x2([2.25, 2.25]), f64x2([0.25, 0.25])]), + [new F64x2Pattern(value("f64", 1.75), value("f64", 1.75))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5466 +assert_return( + () => invoke($2, `div-neg`, [f64x2([1.5, 1.5]), f64x2([0.25, 0.25])]), + [new F64x2Pattern(value("f64", -6), value("f64", -6))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5469 +assert_return( + () => invoke($2, `div-sqrt`, [f64x2([2.25, 2.25]), f64x2([0.25, 0.25])]), + [new F64x2Pattern(value("f64", 6), value("f64", 6))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5472 +assert_return( + () => invoke($2, `mul-neg`, [f64x2([1.5, 1.5]), f64x2([0.25, 0.25])]), + [new F64x2Pattern(value("f64", -0.375), value("f64", -0.375))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5475 +assert_return( + () => invoke($2, `mul-sqrt`, [f64x2([2.25, 2.25]), f64x2([0.25, 0.25])]), + [new F64x2Pattern(value("f64", 0.375), value("f64", 0.375))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5478 +assert_return( + () => invoke($2, `sub-neg`, [f64x2([1.125, 1.125]), f64x2([0.125, 0.125])]), + [new F64x2Pattern(value("f64", -1.25), value("f64", -1.25))], +); + +// ./test/core/simd/simd_f64x2_arith.wast:5481 +assert_return( + () => invoke($2, `sub-sqrt`, [f64x2([2.25, 2.25]), f64x2([0.25, 0.25])]), + [new F64x2Pattern(value("f64", 1.25), value("f64", 1.25))], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_cmp.wast.js new file mode 100644 index 0000000000..81d377b40d --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_cmp.wast.js @@ -0,0 +1,43747 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_f64x2_cmp.wast + +// ./test/core/simd/simd_f64x2_cmp.wast:4 +let $0 = instantiate(`(module + (func (export "f64x2.eq") (param v128 v128) (result v128) (f64x2.eq (local.get 0) (local.get 1))) + (func (export "f64x2.ne") (param v128 v128) (result v128) (f64x2.ne (local.get 0) (local.get 1))) + (func (export "f64x2.lt") (param v128 v128) (result v128) (f64x2.lt (local.get 0) (local.get 1))) + (func (export "f64x2.le") (param v128 v128) (result v128) (f64x2.le (local.get 0) (local.get 1))) + (func (export "f64x2.gt") (param v128 v128) (result v128) (f64x2.gt (local.get 0) (local.get 1))) + (func (export "f64x2.ge") (param v128 v128) (result v128) (f64x2.ge (local.get 0) (local.get 1))) +)`); + +// ./test/core/simd/simd_f64x2_cmp.wast:13 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:16 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:19 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:22 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:25 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:28 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:31 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:34 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:37 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:40 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:43 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:46 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:49 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:52 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:55 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:58 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:61 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:64 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:67 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:70 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:73 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:76 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:79 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:82 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:85 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:88 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:91 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:94 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:97 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:100 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:103 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:106 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:109 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:112 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:115 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:118 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:121 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:124 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:127 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:130 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:133 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:136 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:139 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:142 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:145 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:148 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:151 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:154 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:157 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:160 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:163 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:166 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:169 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:172 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:175 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:178 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:181 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:184 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:187 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:190 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:193 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:196 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:199 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:202 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([1, 1]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:205 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:208 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([1, 1]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:211 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:214 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:217 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:220 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:223 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:226 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:229 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([1, 1]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:232 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:235 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([1, 1]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:238 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:241 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:244 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:247 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:250 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:253 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:256 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:259 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:262 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:265 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:268 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:271 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:274 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:277 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:280 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:283 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:286 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:289 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:292 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:295 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:298 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:301 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:304 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:307 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:310 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:313 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:316 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:319 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:322 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([-0, -0]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:325 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:328 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-0, -0]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:331 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:334 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:337 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:340 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:343 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:346 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:349 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-0, -0]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:352 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:355 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([-0, -0]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:358 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:361 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:364 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:367 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:370 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:373 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:376 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:379 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:382 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:385 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:388 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:391 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:394 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:397 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:400 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:403 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:406 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:409 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:412 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:415 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:418 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:421 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:424 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:427 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:430 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:433 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:436 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:439 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:442 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:445 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:448 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:451 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:454 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:457 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:460 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:463 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:466 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:469 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:472 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:475 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:478 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:481 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:484 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:487 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:490 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:493 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:496 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:499 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:502 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:505 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:508 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:511 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:514 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:517 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:520 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:523 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:526 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:529 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:532 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:535 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:538 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:541 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:544 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:547 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:550 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:553 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:556 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:559 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:562 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:565 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:568 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:571 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:574 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:577 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:580 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:583 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:586 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:589 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:592 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:595 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:598 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:601 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:604 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:607 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:610 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:613 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:616 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:619 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:622 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:625 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:628 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:631 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:634 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:637 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:640 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:643 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:646 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:649 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:652 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:655 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:658 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:661 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:664 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:667 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:670 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:673 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:676 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:679 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:682 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:685 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:688 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:691 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:694 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:697 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:700 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:703 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:706 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:709 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:712 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:715 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:718 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:721 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:724 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:727 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:730 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:733 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:736 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:739 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:742 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([0, 0]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:745 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:748 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([0, 0]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:751 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:754 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:757 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:760 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:763 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:766 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:769 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([0, 0]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:772 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:775 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([0, 0]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:778 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:781 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:784 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:787 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:790 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:793 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:796 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:799 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:802 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:805 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:808 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:811 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:814 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:817 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:820 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:823 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:826 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:829 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:832 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:835 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:838 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:841 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:844 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:847 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:850 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:853 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:856 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:859 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:862 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([-1, -1]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:865 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:868 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([-1, -1]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:871 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:874 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:877 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:880 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:883 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:886 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:889 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([-1, -1]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:892 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:895 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:898 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:901 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:904 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:907 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:910 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:913 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:916 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:919 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:922 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:925 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:928 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:931 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:934 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:937 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:940 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:943 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:946 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:949 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:952 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:955 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:958 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:961 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:964 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:967 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:970 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:973 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:976 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:979 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:982 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:985 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:988 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:991 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:994 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:997 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1000 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1003 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1006 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1009 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1012 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1015 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1018 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1021 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1024 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1027 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1030 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1033 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1036 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1039 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1042 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1045 +assert_return( + () => invoke($0, `f64x2.eq`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1048 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1051 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1054 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1057 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1060 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1063 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1066 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1069 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1072 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1075 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1078 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1081 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1084 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1087 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1090 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1093 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1096 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1099 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1102 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1105 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1108 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1111 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1114 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1117 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1120 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1123 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1126 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1129 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1132 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1135 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1138 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1141 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1144 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1147 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1150 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1153 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1156 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1159 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1162 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1165 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1168 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1171 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1174 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1177 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1180 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1183 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1186 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1189 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1192 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1195 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1198 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1201 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1204 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1207 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1210 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1213 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1216 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1219 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1222 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1225 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1228 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1231 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1234 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1237 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1240 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1243 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1246 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1249 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1252 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1255 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1258 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1261 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1264 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1267 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1270 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1273 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1276 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1279 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1282 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1285 +assert_return( + () => invoke($0, `f64x2.eq`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1288 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1291 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1294 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1297 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1300 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1303 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1306 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1309 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1312 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1315 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1318 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1321 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1324 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1327 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1330 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1333 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1336 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1339 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1342 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1345 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1348 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1351 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1354 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1357 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1360 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1363 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1366 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1369 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1372 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1375 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1378 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1381 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1384 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1387 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1390 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1393 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1396 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1399 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1402 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1405 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1408 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1411 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1414 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1417 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1420 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1423 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1426 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1429 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1432 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1435 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1438 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1441 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1444 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1447 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1450 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1453 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1456 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1459 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1462 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1465 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1468 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1471 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1474 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1477 +assert_return(() => invoke($0, `f64x2.ne`, [f64x2([1, 1]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:1480 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1483 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([1, 1]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1486 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1489 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1492 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1495 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1498 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1501 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1504 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([1, 1]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1507 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1510 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([1, 1]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1513 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1516 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1519 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1522 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1525 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1528 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1531 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1534 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1537 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1540 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1543 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1546 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1549 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1552 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1555 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1558 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1561 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1564 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1567 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1570 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1573 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1576 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1579 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1582 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1585 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1588 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1591 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1594 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1597 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0, -0]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1600 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1603 +assert_return(() => invoke($0, `f64x2.ne`, [f64x2([-0, -0]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:1606 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1609 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1612 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1615 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1618 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1621 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1624 +assert_return(() => invoke($0, `f64x2.ne`, [f64x2([-0, -0]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:1627 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1630 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0, -0]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1633 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1636 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1639 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1642 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1645 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1648 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1651 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1654 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1657 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1660 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1663 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1666 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1669 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1672 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1675 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1678 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1681 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1684 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1687 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1690 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1693 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1696 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1699 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1702 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1705 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1708 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1711 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1714 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1717 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1720 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1723 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1726 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1729 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1732 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1735 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1738 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1741 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1744 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1747 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1750 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1753 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1756 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1759 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1762 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1765 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1768 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1771 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1774 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1777 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1780 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1783 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1786 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1789 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1792 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1795 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1798 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1801 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1804 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1807 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1810 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1813 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1816 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1819 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1822 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1825 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1828 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1831 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1834 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1837 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1840 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1843 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1846 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1849 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1852 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1855 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1858 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1861 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1864 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1867 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1870 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1873 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1876 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1879 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1882 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1885 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1888 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1891 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1894 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1897 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1900 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1903 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1906 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1909 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1912 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1915 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1918 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1921 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1924 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1927 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1930 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1933 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1936 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1939 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1942 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1945 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1948 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1951 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1954 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1957 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1960 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1963 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1966 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1969 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1972 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1975 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1978 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1981 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1984 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1987 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1990 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1993 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1996 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:1999 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2002 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2005 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2008 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2011 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2014 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2017 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0, 0]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2020 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2023 +assert_return(() => invoke($0, `f64x2.ne`, [f64x2([0, 0]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:2026 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2029 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2032 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2035 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2038 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2041 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2044 +assert_return(() => invoke($0, `f64x2.ne`, [f64x2([0, 0]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:2047 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2050 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0, 0]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2053 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2056 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2059 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2062 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2065 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2068 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2071 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2074 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2077 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2080 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2083 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2086 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2089 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2092 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2095 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2098 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2101 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2104 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2107 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2110 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2113 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2116 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2119 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2122 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2125 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2128 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2131 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2134 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2137 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-1, -1]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2140 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2143 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-1, -1]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2146 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2149 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2152 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2155 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2158 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2161 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2164 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-1, -1]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2167 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2170 +assert_return(() => invoke($0, `f64x2.ne`, [f64x2([-1, -1]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:2173 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2176 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2179 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2182 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2185 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2188 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2191 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2194 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2197 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2200 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2203 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2206 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2209 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2212 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2215 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2218 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2221 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2224 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2227 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2230 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2233 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2236 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2239 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2242 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2245 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2248 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2251 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2254 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2257 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2260 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2263 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2266 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2269 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2272 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2275 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2278 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2281 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2284 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2287 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2290 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2293 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2296 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2299 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2302 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2305 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2308 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2311 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2314 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2317 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2320 +assert_return( + () => invoke($0, `f64x2.ne`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2323 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2326 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2329 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2332 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2335 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2338 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2341 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2344 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2347 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2350 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2353 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2356 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2359 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2362 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2365 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2368 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2371 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2374 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2377 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2380 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2383 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2386 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2389 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2392 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2395 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2398 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2401 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2404 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2407 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2410 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2413 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2416 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2419 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2422 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2425 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2428 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2431 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2434 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2437 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2440 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2443 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2446 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2449 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2452 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2455 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2458 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2461 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2464 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2467 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2470 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2473 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2476 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2479 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2482 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2485 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2488 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2491 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2494 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2497 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2500 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2503 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2506 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2509 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2512 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2515 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2518 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2521 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2524 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2527 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2530 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2533 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2536 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2539 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2542 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2545 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2548 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2551 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2554 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2557 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2560 +assert_return( + () => invoke($0, `f64x2.ne`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2563 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2566 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2569 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2572 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2575 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2578 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2581 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2584 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2587 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2590 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2593 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2596 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2599 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2602 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2605 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2608 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2611 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2614 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2617 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2620 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2623 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2626 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2629 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2632 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2635 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2638 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2641 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2644 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2647 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2650 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2653 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2656 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2659 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2662 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2665 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2668 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2671 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2674 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2677 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2680 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2683 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2686 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2689 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2692 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2695 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2698 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2701 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2704 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2707 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2710 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2713 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2716 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2719 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2722 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2725 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2728 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2731 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2734 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2737 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2740 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2743 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2746 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2749 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2752 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([1, 1]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:2755 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2758 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([1, 1]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:2761 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:2764 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2767 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2770 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2773 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:2776 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2779 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([1, 1]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:2782 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2785 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([1, 1]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:2788 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2791 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2794 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2797 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2800 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2803 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2806 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2809 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2812 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2815 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2818 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2821 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2824 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2827 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2830 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2833 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2836 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2839 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2842 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2845 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2848 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2851 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2854 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2857 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2860 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2863 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2866 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2869 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2872 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0, -0]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2875 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2878 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([-0, -0]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:2881 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2884 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2887 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2890 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2893 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2896 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2899 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([-0, -0]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:2902 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2905 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([-0, -0]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:2908 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2911 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2914 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2917 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2920 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2923 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2926 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2929 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2932 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2935 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2938 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2941 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2944 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2947 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2950 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2953 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2956 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2959 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2962 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2965 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2968 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2971 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2974 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2977 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2980 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2983 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2986 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2989 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2992 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2995 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:2998 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3001 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3004 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3007 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3010 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3013 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3016 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3019 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3022 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3025 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3028 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3031 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3034 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3037 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3040 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3043 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3046 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3049 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3052 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3055 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3058 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3061 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3064 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3067 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3070 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3073 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3076 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3079 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3082 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3085 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3088 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3091 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3094 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3097 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3100 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3103 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3106 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3109 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3112 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3115 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3118 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3121 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3124 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3127 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3130 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3133 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3136 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3139 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3142 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3145 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3148 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3151 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3154 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3157 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3160 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3163 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3166 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3169 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3172 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3175 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3178 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:3181 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3184 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3187 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3190 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3193 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3196 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3199 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:3202 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3205 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:3208 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3211 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3214 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3217 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3220 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3223 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3226 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3229 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3232 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3235 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3238 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3241 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3244 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3247 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3250 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3253 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3256 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3259 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3262 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3265 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3268 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3271 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3274 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3277 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3280 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3283 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3286 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3289 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3292 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([0, 0]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3295 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3298 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([0, 0]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:3301 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:3304 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3307 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3310 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3313 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3316 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3319 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([0, 0]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:3322 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3325 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([0, 0]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:3328 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3331 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3334 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3337 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3340 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3343 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3346 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3349 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3352 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3355 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3358 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3361 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3364 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3367 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3370 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3373 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3376 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3379 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3382 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3385 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3388 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3391 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3394 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3397 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3400 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3403 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3406 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3409 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3412 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-1, -1]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3415 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3418 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-1, -1]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3421 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3424 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3427 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3430 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3433 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3436 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3439 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-1, -1]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3442 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3445 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([-1, -1]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:3448 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3451 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3454 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3457 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3460 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3463 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3466 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3469 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3472 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3475 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3478 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3481 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3484 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3487 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3490 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3493 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3496 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3499 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3502 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3505 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3508 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3511 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3514 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3517 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3520 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3523 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3526 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3529 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3532 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3535 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3538 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3541 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3544 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3547 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3550 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3553 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3556 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3559 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3562 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3565 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3568 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3571 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3574 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3577 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3580 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3583 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3586 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3589 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3592 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3595 +assert_return( + () => invoke($0, `f64x2.lt`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3598 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3601 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3604 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3607 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3610 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3613 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3616 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3619 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3622 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3625 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3628 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3631 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3634 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3637 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3640 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3643 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3646 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3649 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3652 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3655 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3658 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3661 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3664 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3667 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3670 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3673 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3676 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3679 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3682 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3685 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3688 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3691 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3694 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3697 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3700 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3703 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3706 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3709 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3712 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3715 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3718 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3721 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3724 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3727 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3730 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3733 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3736 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3739 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3742 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3745 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3748 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3751 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3754 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3757 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3760 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3763 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3766 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3769 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3772 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3775 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3778 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3781 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3784 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3787 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3790 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3793 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3796 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3799 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3802 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3805 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3808 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3811 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3814 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3817 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3820 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3823 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3826 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3829 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3832 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3835 +assert_return( + () => invoke($0, `f64x2.lt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3838 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3841 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3844 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3847 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3850 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3853 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3856 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3859 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3862 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3865 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3868 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3871 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3874 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3877 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3880 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3883 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3886 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3889 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3892 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3895 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3898 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3901 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3904 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3907 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3910 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3913 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3916 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3919 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3922 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3925 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3928 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3931 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3934 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3937 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3940 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3943 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3946 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3949 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3952 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3955 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3958 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3961 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3964 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3967 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3970 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3973 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3976 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3979 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3982 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3985 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3988 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3991 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3994 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:3997 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4000 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4003 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4006 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4009 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4012 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4015 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4018 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4021 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4024 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4027 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([1, 1]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4030 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4033 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([1, 1]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:4036 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:4039 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4042 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4045 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4048 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:4051 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4054 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([1, 1]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:4057 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4060 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([1, 1]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:4063 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4066 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4069 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4072 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4075 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4078 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4081 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4084 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4087 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4090 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4093 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4096 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4099 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4102 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4105 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4108 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4111 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4114 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4117 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4120 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4123 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4126 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4129 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4132 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4135 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4138 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4141 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4144 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4147 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0, -0]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4150 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4153 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0, -0]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4156 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4159 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4162 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4165 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4168 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4171 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4174 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0, -0]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4177 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4180 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([-0, -0]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:4183 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4186 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4189 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4192 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4195 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4198 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4201 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4204 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4207 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4210 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4213 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4216 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4219 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4222 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4225 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4228 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4231 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4234 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4237 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4240 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4243 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4246 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4249 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4252 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4255 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4258 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4261 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4264 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4267 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4270 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4273 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4276 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4279 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4282 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4285 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4288 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4291 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4294 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4297 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4300 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4303 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4306 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4309 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4312 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4315 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4318 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4321 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4324 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4327 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4330 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4333 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4336 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4339 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4342 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4345 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4348 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4351 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4354 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4357 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4360 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4363 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4366 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4369 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4372 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4375 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4378 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4381 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4384 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4387 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4390 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4393 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4396 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4399 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4402 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4405 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4408 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4411 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4414 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4417 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4420 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4423 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4426 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4429 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4432 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4435 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4438 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4441 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4444 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4447 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4450 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4453 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:4456 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4459 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4462 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4465 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4468 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4471 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4474 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:4477 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4480 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:4483 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4486 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4489 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4492 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4495 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4498 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4501 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4504 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4507 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4510 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4513 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4516 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4519 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4522 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4525 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4528 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4531 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4534 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4537 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4540 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4543 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4546 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4549 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4552 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4555 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4558 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4561 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4564 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4567 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0, 0]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4570 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4573 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0, 0]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4576 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:4579 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4582 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4585 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4588 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4591 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4594 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0, 0]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4597 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4600 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([0, 0]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:4603 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4606 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4609 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4612 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4615 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4618 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4621 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4624 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4627 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4630 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4633 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4636 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4639 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4642 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4645 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4648 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4651 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4654 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4657 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4660 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4663 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4666 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4669 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4672 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4675 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4678 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4681 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4684 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4687 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-1, -1]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4690 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4693 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-1, -1]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4696 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4699 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4702 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4705 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4708 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4711 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4714 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-1, -1]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4717 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4720 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4723 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4726 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4729 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4732 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4735 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4738 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4741 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4744 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4747 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4750 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4753 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4756 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4759 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4762 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4765 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4768 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4771 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4774 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4777 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4780 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4783 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4786 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4789 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4792 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4795 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4798 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4801 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4804 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4807 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4810 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4813 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4816 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4819 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4822 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4825 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4828 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4831 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4834 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4837 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4840 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4843 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4846 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4849 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4852 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4855 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4858 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4861 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4864 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4867 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4870 +assert_return( + () => invoke($0, `f64x2.le`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4873 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4876 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4879 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4882 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4885 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4888 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4891 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4894 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4897 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4900 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4903 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4906 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4909 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4912 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4915 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4918 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4921 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4924 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4927 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4930 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4933 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4936 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4939 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4942 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4945 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4948 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4951 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4954 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4957 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4960 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4963 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4966 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4969 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4972 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4975 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4978 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4981 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4984 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4987 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4990 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4993 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4996 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:4999 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5002 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5005 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5008 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5011 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5014 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5017 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5020 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5023 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5026 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5029 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5032 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5035 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5038 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5041 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5044 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5047 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5050 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5053 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5056 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5059 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5062 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5065 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5068 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5071 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5074 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5077 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5080 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5083 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5086 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5089 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5092 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5095 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5098 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5101 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5104 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5107 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5110 +assert_return( + () => invoke($0, `f64x2.le`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5113 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5116 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5119 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5122 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5125 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5128 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5131 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5134 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5137 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5140 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5143 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5146 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5149 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5152 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5155 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5158 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5161 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5164 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5167 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5170 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5173 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5176 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5179 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5182 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5185 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5188 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5191 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5194 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5197 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5200 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5203 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5206 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5209 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5212 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5215 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5218 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5221 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5224 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5227 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5230 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5233 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5236 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5239 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5242 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5245 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5248 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5251 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5254 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5257 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5260 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5263 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5266 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5269 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5272 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5275 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5278 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5281 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5284 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5287 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5290 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5293 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5296 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5299 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5302 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([1, 1]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5305 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5308 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([1, 1]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5311 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5314 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5317 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5320 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5323 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5326 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5329 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([1, 1]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5332 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5335 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([1, 1]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5338 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5341 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5344 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5347 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5350 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5353 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5356 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5359 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5362 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5365 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5368 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5371 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5374 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5377 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5380 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5383 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5386 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5389 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5392 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5395 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5398 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5401 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5404 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5407 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5410 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5413 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5416 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5419 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5422 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-0, -0]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5425 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5428 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-0, -0]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5431 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5434 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5437 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5440 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5443 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5446 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5449 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-0, -0]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5452 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5455 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-0, -0]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5458 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5461 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5464 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5467 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5470 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5473 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5476 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5479 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5482 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5485 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5488 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5491 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5494 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5497 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5500 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5503 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5506 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5509 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5512 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5515 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5518 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5521 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5524 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5527 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5530 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5533 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5536 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5539 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5542 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5545 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5548 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5551 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5554 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5557 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5560 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5563 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5566 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5569 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5572 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5575 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5578 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5581 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5584 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5587 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5590 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5593 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5596 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5599 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5602 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5605 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5608 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5611 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5614 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5617 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5620 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5623 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5626 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5629 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5632 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5635 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5638 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5641 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5644 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5647 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5650 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5653 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5656 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5659 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5662 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5665 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5668 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5671 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5674 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5677 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5680 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5683 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5686 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5689 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5692 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5695 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5698 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5701 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5704 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5707 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5710 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5713 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5716 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5719 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5722 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5725 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5728 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5731 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5734 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5737 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5740 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5743 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5746 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5749 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5752 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5755 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5758 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5761 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5764 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5767 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5770 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5773 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5776 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5779 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5782 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5785 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5788 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5791 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5794 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5797 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5800 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5803 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5806 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5809 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5812 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5815 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5818 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5821 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5824 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5827 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5830 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5833 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5836 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5839 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5842 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([0, 0]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5845 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5848 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([0, 0]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5851 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5854 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5857 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5860 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5863 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5866 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5869 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([0, 0]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5872 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5875 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([0, 0]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5878 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5881 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5884 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5887 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5890 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5893 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5896 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5899 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5902 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5905 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5908 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5911 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5914 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5917 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5920 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5923 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5926 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5929 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5932 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5935 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5938 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5941 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5944 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5947 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5950 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5953 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5956 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5959 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5962 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-1, -1]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5965 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5968 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-1, -1]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5971 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5974 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5977 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5980 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5983 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5986 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5989 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-1, -1]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5992 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:5995 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-1, -1]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:5998 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6001 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6004 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6007 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6010 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6013 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6016 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6019 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6022 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6025 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6028 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6031 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6034 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6037 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6040 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6043 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6046 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6049 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6052 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6055 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6058 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6061 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6064 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6067 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6070 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6073 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6076 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6079 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6082 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6085 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6088 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6091 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6094 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6097 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6100 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6103 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6106 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6109 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6112 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6115 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6118 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6121 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6124 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6127 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6130 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6133 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6136 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6139 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6142 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6145 +assert_return( + () => invoke($0, `f64x2.gt`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6148 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6151 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6154 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6157 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6160 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6163 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6166 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6169 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6172 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6175 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6178 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6181 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6184 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6187 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6190 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6193 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6196 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6199 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6202 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6205 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6208 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6211 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6214 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6217 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6220 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6223 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6226 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6229 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6232 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6235 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6238 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6241 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6244 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6247 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6250 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6253 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6256 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6259 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6262 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6265 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6268 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6271 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6274 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6277 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6280 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6283 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6286 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6289 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6292 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6295 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6298 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6301 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6304 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6307 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6310 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6313 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6316 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6319 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6322 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6325 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6328 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6331 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6334 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6337 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6340 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6343 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6346 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6349 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6352 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6355 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6358 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6361 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6364 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6367 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6370 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6373 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6376 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6379 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6382 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6385 +assert_return( + () => invoke($0, `f64x2.gt`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6388 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6391 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6394 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6397 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6400 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6403 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6406 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6409 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6412 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6415 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6418 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6421 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6424 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6427 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6430 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6433 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6436 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6439 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6442 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6445 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6448 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6451 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6454 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6457 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6460 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6463 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6466 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6469 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6472 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6475 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6478 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6481 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6484 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6487 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6490 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6493 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6496 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6499 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6502 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6505 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6508 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6511 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6514 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6517 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6520 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6523 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6526 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6529 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6532 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6535 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6538 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6541 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6544 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6547 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6550 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6553 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6556 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6559 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6562 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6565 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6568 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6571 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6574 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6577 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([1, 1]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6580 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6583 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([1, 1]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6586 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6589 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6592 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6595 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6598 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6601 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6604 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([1, 1]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6607 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6610 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([1, 1]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6613 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6616 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6619 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6622 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6625 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6628 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6631 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6634 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6637 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6640 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6643 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6646 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6649 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6652 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6655 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6658 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6661 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6664 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6667 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6670 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6673 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6676 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6679 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6682 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6685 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6688 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6691 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6694 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6697 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([-0, -0]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:6700 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6703 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-0, -0]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6706 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6709 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6712 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6715 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6718 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:6721 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6724 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-0, -0]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6727 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6730 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-0, -0]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6733 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6736 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6739 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6742 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6745 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6748 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6751 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6754 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6757 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:6760 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6763 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6766 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6769 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6772 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6775 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6778 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6781 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6784 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:6787 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6790 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6793 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6796 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6799 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6802 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6805 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6808 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6811 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6814 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6817 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6820 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6823 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6826 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6829 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6832 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6835 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6838 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6841 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6844 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6847 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6850 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6853 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6856 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6859 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6862 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6865 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6868 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6871 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6874 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6877 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6880 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6883 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6886 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6889 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6892 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6895 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6898 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6901 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6904 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6907 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6910 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6913 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6916 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6919 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6922 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6925 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6928 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6931 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6934 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6937 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6940 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6943 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6946 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6949 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6952 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6955 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6958 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6961 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6964 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6967 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6970 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6973 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6976 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6979 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6982 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6985 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6988 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6991 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6994 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:6997 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7000 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7003 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7006 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7009 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7012 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7015 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7018 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7021 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7024 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7027 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7030 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7033 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7036 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7039 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7042 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7045 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7048 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7051 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7054 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7057 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7060 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7063 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7066 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7069 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7072 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7075 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7078 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7081 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7084 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7087 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7090 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7093 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7096 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7099 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7102 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7105 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7108 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7111 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7114 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7117 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([0, 0]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7120 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7123 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0, 0]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7126 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7129 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7132 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7135 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7138 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7141 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7144 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0, 0]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7147 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7150 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0, 0]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7153 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7156 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7159 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7162 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7165 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7168 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7171 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7174 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7177 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7180 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7183 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7186 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7189 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7192 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7195 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7198 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7201 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7204 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7207 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7210 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7213 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7216 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7219 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7222 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7225 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7228 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7231 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7234 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7237 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([-1, -1]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7240 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7243 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([-1, -1]), f64x2([-0, -0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7246 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7249 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7252 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7255 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7258 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7261 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7264 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([-1, -1]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7267 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7270 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7273 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7276 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7279 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7282 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7285 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7288 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7291 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7294 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7297 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7300 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7303 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7306 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7309 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7312 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7315 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7318 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7321 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7324 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7327 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7330 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7333 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7336 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7339 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7342 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7345 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7348 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7351 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7354 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7357 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7360 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7363 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7366 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7369 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7372 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7375 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7378 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7381 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7384 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7387 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7390 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7393 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7396 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7399 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7402 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7405 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7408 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 123456789012345690000000000000000000000000000000000000000, + 123456789012345690000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7411 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([0.000000000000000000012345678901234569, 0.000000000000000000012345678901234569]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7414 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7417 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([ + 12345678900000000000000000000000000000000000000, + 12345678900000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7420 +assert_return( + () => invoke($0, `f64x2.ge`, [ + f64x2([1234567890123456800, 1234567890123456800]), + f64x2([1234567890123456800, 1234567890123456800]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7423 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7426 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7429 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7432 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7435 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7438 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7441 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7444 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7447 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7450 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7453 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7456 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7459 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7462 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7465 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7468 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7471 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7474 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7477 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7480 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7483 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7486 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7489 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7492 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7495 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7498 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7501 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7504 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7507 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7510 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7513 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7516 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7519 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7522 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7525 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7528 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7531 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7534 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7537 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7540 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7543 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7546 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7549 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7552 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7555 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7558 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7561 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7564 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7567 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7570 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7573 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7576 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7579 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7582 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7585 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7588 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7591 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7594 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7597 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7600 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7603 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7606 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7609 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7612 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7615 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7618 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7621 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7624 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7627 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7630 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7633 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7636 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7639 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7642 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7645 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7648 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7651 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7654 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7657 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7660 +assert_return( + () => invoke($0, `f64x2.ge`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7663 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7666 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([-1, -1]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7669 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([-1, -1]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7672 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([-1, -1]), f64x2([2, 2])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7675 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([0, 0]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7678 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([0, 0]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7681 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([0, 0]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7684 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([0, 0]), f64x2([2, 2])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7687 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([1, 1]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7690 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([1, 1]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7693 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([1, 1]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7696 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([1, 1]), f64x2([2, 2])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7699 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([2, 2]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7702 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([2, 2]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7705 +assert_return(() => invoke($0, `f64x2.eq`, [f64x2([2, 2]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7708 +assert_return( + () => invoke($0, `f64x2.eq`, [f64x2([2, 2]), f64x2([2, 2])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7711 +assert_return(() => invoke($0, `f64x2.ne`, [f64x2([-1, -1]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7714 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-1, -1]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7717 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-1, -1]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7720 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([-1, -1]), f64x2([2, 2])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7723 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0, 0]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7726 +assert_return(() => invoke($0, `f64x2.ne`, [f64x2([0, 0]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7729 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0, 0]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7732 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([0, 0]), f64x2([2, 2])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7735 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([1, 1]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7738 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([1, 1]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7741 +assert_return(() => invoke($0, `f64x2.ne`, [f64x2([1, 1]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7744 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([1, 1]), f64x2([2, 2])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7747 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([2, 2]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7750 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([2, 2]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7753 +assert_return( + () => invoke($0, `f64x2.ne`, [f64x2([2, 2]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7756 +assert_return(() => invoke($0, `f64x2.ne`, [f64x2([2, 2]), f64x2([2, 2])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7759 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([-1, -1]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7762 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-1, -1]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7765 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-1, -1]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7768 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([-1, -1]), f64x2([2, 2])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7771 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([0, 0]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7774 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([0, 0]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7777 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([0, 0]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7780 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([0, 0]), f64x2([2, 2])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7783 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([1, 1]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7786 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([1, 1]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7789 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([1, 1]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7792 +assert_return( + () => invoke($0, `f64x2.lt`, [f64x2([1, 1]), f64x2([2, 2])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7795 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([2, 2]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7798 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([2, 2]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7801 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([2, 2]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7804 +assert_return(() => invoke($0, `f64x2.lt`, [f64x2([2, 2]), f64x2([2, 2])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7807 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7810 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-1, -1]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7813 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-1, -1]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7816 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([-1, -1]), f64x2([2, 2])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7819 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([0, 0]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7822 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0, 0]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7825 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0, 0]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7828 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([0, 0]), f64x2([2, 2])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7831 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([1, 1]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7834 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([1, 1]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7837 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([1, 1]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7840 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([1, 1]), f64x2([2, 2])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7843 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([2, 2]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7846 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([2, 2]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7849 +assert_return(() => invoke($0, `f64x2.le`, [f64x2([2, 2]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7852 +assert_return( + () => invoke($0, `f64x2.le`, [f64x2([2, 2]), f64x2([2, 2])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7855 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-1, -1]), f64x2([-1, -1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7858 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-1, -1]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7861 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-1, -1]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7864 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([-1, -1]), f64x2([2, 2])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7867 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([0, 0]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7870 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([0, 0]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7873 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([0, 0]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7876 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([0, 0]), f64x2([2, 2])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7879 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([1, 1]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7882 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([1, 1]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7885 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([1, 1]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7888 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([1, 1]), f64x2([2, 2])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7891 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([2, 2]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7894 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([2, 2]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7897 +assert_return( + () => invoke($0, `f64x2.gt`, [f64x2([2, 2]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7900 +assert_return(() => invoke($0, `f64x2.gt`, [f64x2([2, 2]), f64x2([2, 2])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7903 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7906 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([-1, -1]), f64x2([0, 0])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7909 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([-1, -1]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7912 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([-1, -1]), f64x2([2, 2])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7915 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0, 0]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7918 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([0, 0]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7921 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([0, 0]), f64x2([1, 1])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7924 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([0, 0]), f64x2([2, 2])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7927 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([1, 1]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7930 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([1, 1]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7933 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([1, 1]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7936 +assert_return(() => invoke($0, `f64x2.ge`, [f64x2([1, 1]), f64x2([2, 2])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_f64x2_cmp.wast:7939 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([2, 2]), f64x2([-1, -1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7942 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([2, 2]), f64x2([0, 0])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7945 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([2, 2]), f64x2([1, 1])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7948 +assert_return( + () => invoke($0, `f64x2.ge`, [f64x2([2, 2]), f64x2([2, 2])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7954 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (f2x64.eq (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7955 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (f2x64.ne (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7956 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (f2x64.lt (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7957 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (f2x64.le (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7958 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (f2x64.gt (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7959 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (f2x64.ge (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7962 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.eq (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7963 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.ne (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7964 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.lt (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7965 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.le (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7966 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.gt (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7967 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.ge (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7971 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.eq-1st-arg-empty (result v128) + (f64x2.eq (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7979 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.eq-arg-empty (result v128) + (f64x2.eq) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7987 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.ne-1st-arg-empty (result v128) + (f64x2.ne (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:7995 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.ne-arg-empty (result v128) + (f64x2.ne) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:8003 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.lt-1st-arg-empty (result v128) + (f64x2.lt (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:8011 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.lt-arg-empty (result v128) + (f64x2.lt) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:8019 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.le-1st-arg-empty (result v128) + (f64x2.le (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:8027 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.le-arg-empty (result v128) + (f64x2.le) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:8035 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.gt-1st-arg-empty (result v128) + (f64x2.gt (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:8043 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.gt-arg-empty (result v128) + (f64x2.gt) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:8051 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.ge-1st-arg-empty (result v128) + (f64x2.ge (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:8059 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.ge-arg-empty (result v128) + (f64x2.ge) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_cmp.wast:8069 +let $1 = instantiate(`(module (memory 1) + (func (export "f64x2.eq-in-block") + (block + (drop + (block (result v128) + (f64x2.eq + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "f64x2.ne-in-block") + (block + (drop + (block (result v128) + (f64x2.ne + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "f64x2.lt-in-block") + (block + (drop + (block (result v128) + (f64x2.lt + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "f64x2.le-in-block") + (block + (drop + (block (result v128) + (f64x2.le + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "f64x2.gt-in-block") + (block + (drop + (block (result v128) + (f64x2.gt + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "f64x2.ge-in-block") + (block + (drop + (block (result v128) + (f64x2.ge + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "nested-f64x2.eq") + (drop + (f64x2.eq + (f64x2.eq + (f64x2.eq + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.eq + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f64x2.eq + (f64x2.eq + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.eq + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-f64x2.ne") + (drop + (f64x2.ne + (f64x2.ne + (f64x2.ne + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.ne + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f64x2.ne + (f64x2.ne + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.ne + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-f64x2.lt") + (drop + (f64x2.lt + (f64x2.lt + (f64x2.lt + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.lt + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f64x2.lt + (f64x2.lt + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.lt + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-f64x2.le") + (drop + (f64x2.le + (f64x2.le + (f64x2.le + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.le + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f64x2.le + (f64x2.le + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.le + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-f64x2.gt") + (drop + (f64x2.gt + (f64x2.gt + (f64x2.gt + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.gt + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f64x2.gt + (f64x2.gt + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.gt + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-f64x2.ge") + (drop + (f64x2.ge + (f64x2.ge + (f64x2.ge + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.ge + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f64x2.ge + (f64x2.ge + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.ge + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "as-param") + (drop + (f64x2.eq + (f64x2.ne + (f64x2.lt + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.le + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (f64x2.gt + (f64x2.ge + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (f64x2.eq + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) +)`); + +// ./test/core/simd/simd_f64x2_cmp.wast:8325 +assert_return(() => invoke($1, `f64x2.eq-in-block`, []), []); + +// ./test/core/simd/simd_f64x2_cmp.wast:8326 +assert_return(() => invoke($1, `f64x2.ne-in-block`, []), []); + +// ./test/core/simd/simd_f64x2_cmp.wast:8327 +assert_return(() => invoke($1, `f64x2.lt-in-block`, []), []); + +// ./test/core/simd/simd_f64x2_cmp.wast:8328 +assert_return(() => invoke($1, `f64x2.le-in-block`, []), []); + +// ./test/core/simd/simd_f64x2_cmp.wast:8329 +assert_return(() => invoke($1, `f64x2.gt-in-block`, []), []); + +// ./test/core/simd/simd_f64x2_cmp.wast:8330 +assert_return(() => invoke($1, `f64x2.ge-in-block`, []), []); + +// ./test/core/simd/simd_f64x2_cmp.wast:8331 +assert_return(() => invoke($1, `nested-f64x2.eq`, []), []); + +// ./test/core/simd/simd_f64x2_cmp.wast:8332 +assert_return(() => invoke($1, `nested-f64x2.ne`, []), []); + +// ./test/core/simd/simd_f64x2_cmp.wast:8333 +assert_return(() => invoke($1, `nested-f64x2.lt`, []), []); + +// ./test/core/simd/simd_f64x2_cmp.wast:8334 +assert_return(() => invoke($1, `nested-f64x2.le`, []), []); + +// ./test/core/simd/simd_f64x2_cmp.wast:8335 +assert_return(() => invoke($1, `nested-f64x2.gt`, []), []); + +// ./test/core/simd/simd_f64x2_cmp.wast:8336 +assert_return(() => invoke($1, `nested-f64x2.ge`, []), []); + +// ./test/core/simd/simd_f64x2_cmp.wast:8337 +assert_return(() => invoke($1, `as-param`, []), []); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_pmin_pmax.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_pmin_pmax.wast.js new file mode 100644 index 0000000000..fc2d068e25 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_pmin_pmax.wast.js @@ -0,0 +1,64564 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4 +let $0 = instantiate(`(module + (func (export "f64x2.pmin") (param v128 v128) (result v128) (f64x2.pmin (local.get 0) (local.get 1))) + (func (export "f64x2.pmax") (param v128 v128) (result v128) (f64x2.pmax (local.get 0) (local.get 1))) +)`); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0, 0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:12 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0, 0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:15 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:18 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:21 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:24 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:27 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0, 0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:30 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0, 0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:33 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:36 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:39 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:42 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:45 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:48 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:51 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:54 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:57 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0, 0]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:60 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:63 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:66 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:69 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0, 0]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:72 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:75 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:78 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:81 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:84 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:87 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:90 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:93 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:96 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:99 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:102 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:105 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:108 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:111 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:114 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:117 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:120 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:123 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:126 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:129 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0, -0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:132 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0, -0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:135 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:138 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:141 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:144 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:147 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0, -0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:150 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0, -0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:153 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:156 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:159 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:162 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:165 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:168 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:171 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:174 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:177 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0, -0]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:180 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:183 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:186 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:189 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0, -0]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:192 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:195 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:198 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:201 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:204 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:207 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:210 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:213 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:216 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:219 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:222 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:225 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:228 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:231 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:234 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:237 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:240 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:243 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:246 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:249 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:252 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:255 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:258 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:261 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:264 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:267 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:270 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:273 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:276 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:279 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:282 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:285 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:288 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:291 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:294 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:297 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:300 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:303 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:306 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:309 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:312 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:315 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:318 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:321 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:324 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:327 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:330 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:333 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:336 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:339 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:342 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:345 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:348 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:351 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:354 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:357 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:360 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:363 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:366 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:369 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:372 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:375 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:378 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:381 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:384 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:387 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:390 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:393 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:396 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:399 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:402 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:405 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:408 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:411 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:414 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:417 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:420 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:423 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:426 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:429 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:432 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:435 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:438 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:441 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:444 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:447 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:450 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:453 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:456 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:459 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:462 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:465 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:468 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:471 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:474 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:477 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:480 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:483 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:486 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:489 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:492 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:495 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:498 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:501 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:504 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:507 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:510 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:513 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:516 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:519 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:522 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:525 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:528 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:531 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:534 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:537 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0.5, 0.5]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:540 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:543 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:546 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:549 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([0.5, 0.5]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:552 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:555 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:558 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:561 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:564 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:567 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:570 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:573 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:576 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:579 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:582 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:585 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:588 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:591 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:594 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:597 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:600 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:603 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:606 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:609 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:612 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:615 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:618 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:621 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:624 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:627 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:630 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:633 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:636 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:639 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:642 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:645 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:648 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:651 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:654 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:657 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0.5, -0.5]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:660 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:663 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:666 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:669 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-0.5, -0.5]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:672 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:675 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:678 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:681 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:684 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:687 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:690 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:693 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:696 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:699 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:702 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:705 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:708 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:711 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:714 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:717 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:720 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:723 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:726 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:729 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([1, 1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:732 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([1, 1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:735 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:738 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:741 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:744 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:747 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([1, 1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:750 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([1, 1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:753 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:756 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:759 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:762 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:765 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:768 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:771 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:774 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:777 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([1, 1]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:780 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:783 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:786 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:789 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([1, 1]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:792 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:795 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:798 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:801 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:804 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:807 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:810 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:813 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:816 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:819 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:822 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:825 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:828 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:831 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:834 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:837 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:840 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:843 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:846 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:849 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-1, -1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:852 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-1, -1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:855 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:858 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:861 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:864 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:867 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-1, -1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:870 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:873 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:876 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:879 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:882 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:885 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:888 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:891 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:894 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:897 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-1, -1]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:900 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:903 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:906 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:909 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-1, -1]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:912 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:915 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:918 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:921 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:924 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:927 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:930 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:933 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:936 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:939 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:942 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:945 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:948 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:951 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:954 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:957 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:960 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:963 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:966 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:969 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:972 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:975 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:978 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:981 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:984 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:987 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:990 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:993 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:996 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:999 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1002 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1005 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1008 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1011 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1014 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1017 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1020 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1023 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1026 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1029 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1032 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1035 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1038 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1041 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1044 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1047 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1050 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1053 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1056 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1059 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1062 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1065 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1068 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1071 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1074 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1077 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1080 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1083 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1086 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1089 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1092 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1095 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1098 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1101 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1104 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1107 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1110 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1113 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1116 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1119 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1122 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1125 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1128 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1131 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1134 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1137 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1140 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1143 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1146 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1149 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1152 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1155 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1158 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1161 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1164 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1167 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1170 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1173 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1176 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1179 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1182 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1185 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1188 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1191 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1194 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1197 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1200 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1203 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1206 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1209 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1212 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1215 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1218 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1221 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1224 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1227 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1230 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1233 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1236 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1239 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1242 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1245 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1248 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1251 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1254 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1257 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1260 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1263 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1266 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1269 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1272 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1275 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1278 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1281 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1284 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1287 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1290 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1293 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1296 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1299 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1302 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1305 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1308 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1311 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1314 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1317 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1320 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1323 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1326 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1329 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1332 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1335 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1338 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1341 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1344 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1347 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1350 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1353 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1356 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1359 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1362 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1365 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1368 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1371 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1374 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1377 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1380 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1383 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1386 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1389 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1392 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1395 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1398 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1401 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1404 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1407 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1410 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1413 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1416 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1419 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1422 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1425 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1428 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1431 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1434 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1437 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1440 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1443 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1446 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1449 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1452 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1455 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1458 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1461 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1464 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1467 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1470 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1473 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1476 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1479 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1482 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1485 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1488 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1491 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1494 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1497 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1500 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1503 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1506 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1509 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1512 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1515 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1518 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1521 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1524 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1527 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1530 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1533 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1536 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1539 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1542 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1545 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1548 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1551 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1554 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1557 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1560 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1563 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1566 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1569 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1572 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1575 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1578 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1581 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1584 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1587 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1590 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1593 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1596 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1599 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1602 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1605 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1608 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1611 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1614 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1617 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1620 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1623 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1626 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1629 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1632 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1635 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1638 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1641 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1644 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1647 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1650 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1653 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1656 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1659 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1662 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1665 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1668 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1671 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1674 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1677 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1680 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1683 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1686 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1689 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1692 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1695 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1698 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1701 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1704 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1707 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1710 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1713 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1716 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1719 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1722 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1725 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1728 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1731 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1734 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1737 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1740 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1743 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1746 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1749 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1752 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1755 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1758 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1761 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1764 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1767 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1770 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1773 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1776 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1779 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1782 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1785 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1788 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1791 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1794 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1797 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1800 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1803 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1806 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1809 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1812 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1815 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1818 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1821 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1824 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1827 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1830 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1833 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1836 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1839 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1842 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1845 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1848 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1851 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1854 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1857 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1860 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1863 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1866 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1869 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1872 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1875 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1878 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1881 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1884 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1887 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1890 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1893 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1896 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1899 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1902 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1905 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1908 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1911 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1914 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1917 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1920 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1923 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1926 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1929 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([123456789, 123456789]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1932 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([123456789, 123456789]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1935 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1938 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1941 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([123456789, 123456789]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1944 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([123456789, 123456789]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1947 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([123456789, 123456789]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1950 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([123456789, 123456789]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1953 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1956 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1959 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1962 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1965 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1968 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1971 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1974 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1977 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1980 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1983 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1986 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1989 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1992 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1995 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:1998 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2001 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2004 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2007 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2010 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2013 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2016 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2019 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2022 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2025 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2028 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2031 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2034 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2037 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2040 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2043 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2046 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2049 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2052 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2055 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2058 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2061 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2064 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2067 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2070 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2073 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2076 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2079 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2082 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2085 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2088 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2091 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2094 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2097 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2100 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2103 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2106 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2109 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2112 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2115 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2118 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2121 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2124 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2127 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2130 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2133 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2136 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2139 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2142 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2145 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2148 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2151 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2154 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2157 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2160 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2163 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2166 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2169 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2172 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2175 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2178 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2181 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2184 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2187 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2190 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2193 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2196 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2199 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2202 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2205 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2208 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2211 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2214 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2217 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2220 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2223 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2226 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2229 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2232 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2235 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2238 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2241 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2244 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2247 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2250 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2253 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2256 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2259 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2262 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2265 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2268 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2271 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2274 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2277 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2280 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2283 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2286 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2289 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2292 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2295 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2298 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2301 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2304 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2307 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2310 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2313 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2316 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2319 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2322 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2325 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2328 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2331 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2334 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2337 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2340 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2343 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2346 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2349 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2352 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2355 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2358 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2361 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2364 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2367 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2370 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2373 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2376 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2379 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2382 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2385 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2388 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2391 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2394 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2397 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2400 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2403 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2406 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2409 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([123456789, 123456789]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2412 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([123456789, 123456789]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2415 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2418 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2421 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([123456789, 123456789]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2424 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([123456789, 123456789]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2427 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([123456789, 123456789]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2430 +assert_return( + () => invoke($0, `f64x2.pmin`, [f64x2([123456789, 123456789]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2433 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2436 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2439 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2442 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2445 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2448 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2451 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2454 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2457 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2460 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2463 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2466 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2469 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2472 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2475 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2478 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2481 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2484 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2487 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2490 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2493 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2496 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2499 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2502 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2505 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2508 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2511 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2514 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2517 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2520 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2523 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2526 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2529 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2532 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2535 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2538 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2541 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2544 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2547 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2550 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2553 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2556 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2559 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2562 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2565 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2568 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2571 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2574 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2577 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2580 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2583 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2586 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2589 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2592 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2595 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2598 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2601 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2604 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2607 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2610 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2613 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2616 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2619 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2622 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2625 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2628 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2631 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2634 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2637 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2640 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2643 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2646 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2649 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2652 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2655 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2658 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2661 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2664 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2667 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2670 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2673 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2676 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2679 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2682 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2685 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2688 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2691 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2694 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2697 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2700 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2703 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2706 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2709 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2712 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2715 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2718 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2721 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2724 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2727 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2730 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2733 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2736 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2739 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2742 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2745 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2748 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2751 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2754 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2757 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2760 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2763 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2766 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2769 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2772 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2775 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2778 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2781 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2784 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2787 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2790 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2793 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2796 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2799 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2802 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2805 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2808 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2811 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2814 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2817 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2820 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2823 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2826 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2829 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2832 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2835 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2838 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2841 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2844 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2847 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2850 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2853 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2856 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2859 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2862 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2865 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2868 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2871 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2874 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2877 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2880 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2883 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2886 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2889 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2892 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2895 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2898 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2901 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2904 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2907 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2910 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2913 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2916 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2919 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2922 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2925 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2928 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2931 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2934 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2937 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2940 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2943 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2946 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2949 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2952 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2955 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2958 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2961 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2964 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2967 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2970 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2973 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2976 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2979 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2982 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2985 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2988 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2991 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2994 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:2997 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3000 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3003 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3006 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3009 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3012 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3015 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3018 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3021 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3024 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3027 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3030 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3033 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3036 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3039 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3042 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3045 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3048 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3051 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3054 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3057 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3060 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3063 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3066 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3069 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3072 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3075 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3078 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3081 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3084 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3087 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3090 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3093 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3096 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3099 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3102 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3105 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3108 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3111 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3114 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3117 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3120 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3123 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3126 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3129 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3132 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3135 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3138 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3141 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3144 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3147 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3150 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3153 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3156 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3159 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3162 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3165 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3168 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3171 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3174 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3177 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3180 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3183 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3186 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3189 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3192 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3195 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3198 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3201 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3204 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3207 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3210 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3213 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3216 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3219 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3222 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3225 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3228 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3231 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3234 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3237 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3240 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3243 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3246 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3249 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3252 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3255 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3258 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3261 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3264 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3267 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3270 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3273 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3276 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3279 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3282 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3285 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3288 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3291 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3294 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3297 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3300 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3303 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3306 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3309 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3312 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3315 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3318 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3321 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3324 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3327 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3330 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3333 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3336 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3339 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3342 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3345 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3348 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3351 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3354 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3357 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3360 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3363 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3366 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3369 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3372 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3375 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3378 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3381 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3384 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3387 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3390 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3393 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3396 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3399 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3402 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3405 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3408 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3411 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3414 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3417 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3420 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3423 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3426 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3429 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3432 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3435 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3438 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3441 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3444 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3447 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3450 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3453 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3456 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3459 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3462 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3465 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3468 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3471 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3474 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3477 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3480 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3483 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3486 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3489 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3492 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3495 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3498 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3501 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3504 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3507 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3510 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3513 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3516 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3519 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3522 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3525 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3528 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3531 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3534 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3537 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3540 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3543 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3546 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3549 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3552 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3555 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3558 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3561 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3564 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3567 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3570 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3573 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3576 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3579 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3582 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3585 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3588 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3591 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3594 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3597 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3600 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3603 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3606 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3609 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3612 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3615 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3618 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3621 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3624 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3627 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3630 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3633 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3636 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3639 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3642 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3645 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3648 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3651 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3654 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3657 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3660 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3663 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3666 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3669 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3672 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3675 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3678 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3681 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3684 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3687 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3690 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3693 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3696 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3699 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3702 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3705 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3708 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3711 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3714 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3717 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3720 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3723 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3726 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3729 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3732 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3735 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3738 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3741 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3744 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3747 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3750 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3753 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3756 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3759 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3762 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3765 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3768 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3771 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3774 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3777 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3780 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3783 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3786 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3789 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3792 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3795 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3798 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3801 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3804 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3807 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3810 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3813 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3816 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3819 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3822 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3825 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3828 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3831 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3834 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3837 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3840 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3843 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3846 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3849 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3852 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3855 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3858 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3861 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3864 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3867 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3870 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3873 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3876 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3879 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3882 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3885 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3888 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3891 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3894 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3897 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3900 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3903 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3906 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3909 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3912 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3915 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3918 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3921 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3924 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3927 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3930 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3933 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3936 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3939 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3942 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3945 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3948 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3951 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3954 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3957 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3960 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3963 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3966 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3969 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3972 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3975 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3978 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3981 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3984 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3987 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3990 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3993 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3996 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:3999 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4002 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4005 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4008 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4011 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4014 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4017 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4020 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4023 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4026 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4029 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4032 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4035 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4038 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4041 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4044 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4047 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4050 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4053 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4056 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4059 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4062 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4065 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4068 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4071 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4074 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4077 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4080 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4083 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4086 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4089 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4092 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4095 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4098 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4101 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4104 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4107 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4110 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4113 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4116 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4119 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4122 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4125 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4128 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4131 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4134 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4137 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4140 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4143 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4146 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4149 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4152 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4155 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4158 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4161 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4164 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4167 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4170 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4173 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4176 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4179 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4182 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4185 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4188 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4191 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4194 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4197 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4200 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4203 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4206 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4209 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4212 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4215 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4218 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4221 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4224 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4227 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4230 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4233 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4236 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4239 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4242 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4245 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4248 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4251 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4254 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4257 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4260 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4263 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4266 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4269 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4272 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4275 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4278 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4281 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4284 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4287 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4290 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4293 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4296 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4299 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4302 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4305 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4308 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4311 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4314 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4317 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4320 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4323 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4326 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4329 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4332 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4335 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4338 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4341 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4344 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4347 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4350 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4353 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4356 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4359 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4362 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4365 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4368 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4371 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4374 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4377 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4380 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4383 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4386 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4389 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4392 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4395 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4398 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4401 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4404 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4407 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4410 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4413 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4416 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4419 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4422 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4425 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4428 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4431 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4434 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4437 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4440 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4443 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4446 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4449 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4452 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4455 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4458 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4461 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4464 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4467 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4470 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4473 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4476 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4479 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4482 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4485 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4488 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4491 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4494 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4497 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4500 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4503 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4506 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4509 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4512 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4515 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4518 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4521 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4524 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4527 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4530 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4533 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4536 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4539 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4542 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4545 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4548 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4551 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4554 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4557 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4560 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4563 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4566 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4569 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4572 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4575 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4578 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4581 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4584 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4587 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4590 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4593 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4596 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4599 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4602 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4605 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4608 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4611 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4614 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4617 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4620 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4623 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4626 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4629 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4632 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4635 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4638 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4641 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4644 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4647 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4650 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4653 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4656 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4659 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4662 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4665 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4668 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4671 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4674 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4677 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4680 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4683 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4686 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4689 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4692 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4695 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4698 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4701 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4704 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4707 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4710 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4713 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4716 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4719 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4722 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4725 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4728 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4731 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4734 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4737 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4740 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4743 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4746 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4749 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4752 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4755 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4758 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4761 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4764 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4767 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4770 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4773 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4776 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4779 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4782 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4785 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4788 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4791 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4794 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4797 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4800 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4803 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4806 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4809 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4812 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4815 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4818 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4821 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4824 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4827 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4830 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4833 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4836 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4839 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4842 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4845 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4848 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4851 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4854 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4857 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4860 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4863 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4866 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4869 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4872 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4875 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4878 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4881 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4884 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4887 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4890 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4893 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4896 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4899 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4902 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4905 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4908 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4911 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4914 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4917 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4920 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4923 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4926 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4929 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4932 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4935 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4938 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4941 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4944 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4947 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4950 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4953 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4956 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4959 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4962 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4965 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4968 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4971 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4974 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4977 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4980 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4983 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4986 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4989 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4992 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4995 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:4998 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5001 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5004 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5007 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5010 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5013 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5016 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5019 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5022 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5025 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5028 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5031 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5034 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5037 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5040 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5043 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5046 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5049 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5052 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5055 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5058 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5061 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5064 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5067 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5070 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5073 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5076 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5079 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5082 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5085 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5088 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5091 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5094 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5097 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5100 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5103 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5106 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5109 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5112 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5115 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5118 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5121 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5124 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5127 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5130 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5133 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5136 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5139 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5142 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5145 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5148 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5151 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5154 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5157 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5160 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5163 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5166 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5169 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5172 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5175 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5178 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5181 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5184 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5187 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5190 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5193 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5196 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5199 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5202 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5205 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5208 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5211 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5214 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5217 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5220 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5223 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5226 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5229 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5232 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5235 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5238 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5241 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5244 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5247 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5250 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5253 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5256 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5259 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5262 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5265 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5268 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5271 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5274 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5277 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5280 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5283 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5286 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5289 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5292 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5295 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5298 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5301 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5304 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5307 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5310 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5313 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5316 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5319 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5322 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5325 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5328 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5331 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5334 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5337 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5340 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5343 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5346 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5349 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5352 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5355 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5358 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5361 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5364 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5367 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5370 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5373 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5376 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5379 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5382 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5385 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5388 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5391 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5394 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5397 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5400 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5403 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5406 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5409 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5412 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5415 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5418 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5421 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5424 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5427 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5430 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5433 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5436 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5439 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5442 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5445 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5448 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5451 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5454 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5457 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5460 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5463 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5466 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5469 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5472 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5475 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5478 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5481 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5484 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5487 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5490 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5493 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5496 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5499 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5502 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5505 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5508 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5511 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5514 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5517 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5520 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5523 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5526 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5529 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5532 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5535 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5538 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5541 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5544 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5547 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5550 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5553 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5556 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5559 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5562 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5565 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5568 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5571 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5574 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5577 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5580 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5583 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5586 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5589 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5592 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5595 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5598 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5601 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5604 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5607 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5610 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5613 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5616 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5619 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5622 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5625 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5628 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5631 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5634 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5637 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5640 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5643 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5646 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5649 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5652 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5655 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5658 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5661 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5664 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5667 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5670 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5673 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5676 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5679 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5682 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5685 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5688 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5691 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5694 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5697 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5700 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5703 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5706 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5709 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5712 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5715 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5718 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5721 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5724 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5727 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5730 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5733 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5736 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5739 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5742 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5745 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5748 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5751 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5754 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5757 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5760 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5763 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5766 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5769 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([123456789.01234567, 123456789.01234567]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5772 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5775 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5778 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5781 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5784 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5787 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5790 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5793 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5796 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5799 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5802 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5805 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5808 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5811 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5814 +assert_return( + () => invoke($0, `f64x2.pmin`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5817 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0, 0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5820 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0, 0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5823 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5826 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5829 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0, 0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5832 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0, 0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5835 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0, 0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5838 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0, 0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5841 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5844 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5847 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5850 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5853 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5856 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5859 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0, 0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5862 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0, 0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5865 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0, 0]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5868 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5871 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5874 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5877 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0, 0]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5880 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5883 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5886 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5889 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5892 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5895 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5898 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5901 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5904 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5907 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5910 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5913 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5916 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5919 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5922 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5925 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5928 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5931 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5934 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5937 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0, -0]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5940 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0, -0]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5943 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5946 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5949 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0, -0]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5952 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0, -0]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5955 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0, -0]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5958 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0, -0]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5961 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5964 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5967 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5970 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5973 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5976 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5979 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0, -0]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5982 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0, -0]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5985 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0, -0]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5988 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5991 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5994 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:5997 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0, -0]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6000 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6003 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6006 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6009 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6012 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6015 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6018 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6021 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6024 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6027 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6030 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6033 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6036 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6039 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6042 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6045 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6048 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6051 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6054 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6057 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6060 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6063 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6066 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6069 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6072 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6075 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6078 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6081 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6084 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6087 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6090 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6093 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6096 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6099 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6102 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6105 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6108 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6111 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6114 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6117 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6120 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6123 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6126 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6129 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6132 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6135 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6138 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6141 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6144 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6147 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6150 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6153 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6156 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6159 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6162 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6165 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6168 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6171 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6174 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6177 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6180 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6183 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6186 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6189 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6192 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6195 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6198 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6201 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6204 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6207 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6210 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6213 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6216 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6219 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6222 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6225 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6228 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6231 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6234 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6237 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6240 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6243 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6246 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6249 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6252 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6255 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6258 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6261 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6264 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6267 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6270 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6273 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6276 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6279 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6282 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6285 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6288 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6291 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6294 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6297 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0.5, 0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6300 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0.5, 0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6303 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6306 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6309 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0.5, 0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6312 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0.5, 0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6315 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0.5, 0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6318 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0.5, 0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6321 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6324 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6327 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6330 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6333 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6336 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6339 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0.5, 0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6342 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0.5, 0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6345 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0.5, 0.5]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6348 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6351 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6354 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6357 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([0.5, 0.5]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6360 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6363 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6366 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6369 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6372 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6375 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6378 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6381 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6384 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6387 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6390 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6393 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6396 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6399 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6402 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6405 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6408 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6411 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6414 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6417 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0.5, -0.5]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6420 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0.5, -0.5]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6423 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6426 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6429 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0.5, -0.5]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6432 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0.5, -0.5]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6435 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0.5, -0.5]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6438 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0.5, -0.5]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6441 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6444 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6447 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6450 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6453 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6456 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6459 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0.5, -0.5]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6462 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0.5, -0.5]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6465 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0.5, -0.5]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6468 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6471 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6474 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6477 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-0.5, -0.5]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6480 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6483 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6486 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6489 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6492 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6495 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6498 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6501 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6504 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6507 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6510 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6513 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6516 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6519 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6522 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6525 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6528 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6531 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6534 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6537 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([1, 1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6540 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([1, 1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6543 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6546 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6549 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([1, 1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6552 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([1, 1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6555 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([1, 1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6558 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([1, 1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6561 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6564 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6567 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6570 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6573 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6576 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6579 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([1, 1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6582 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([1, 1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6585 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([1, 1]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6588 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6591 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6594 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6597 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([1, 1]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6600 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6603 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6606 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6609 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6612 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6615 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6618 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6621 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6624 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6627 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6630 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6633 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6636 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6639 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6642 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6645 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6648 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6651 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6654 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6657 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-1, -1]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6660 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-1, -1]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6663 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6666 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6669 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-1, -1]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6672 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-1, -1]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6675 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-1, -1]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6678 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-1, -1]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6681 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6684 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6687 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6690 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6693 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6696 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6699 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-1, -1]), f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6702 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-1, -1]), f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6705 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-1, -1]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6708 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6711 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6714 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6717 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-1, -1]), f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6720 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6723 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6726 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6729 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6732 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6735 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6738 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6741 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6744 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6747 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6750 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6753 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6756 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6759 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6762 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6765 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6768 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6771 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6774 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6777 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6780 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6783 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6786 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6789 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6792 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6795 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6798 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6801 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6804 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6807 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6810 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6813 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6816 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6819 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6822 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6825 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6828 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6831 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6834 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6837 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6840 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6843 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6846 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6849 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6852 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6855 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6858 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6861 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6864 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6867 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6870 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6873 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6876 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6879 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6882 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6885 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6888 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6891 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6894 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6897 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6900 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6903 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6906 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6909 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6912 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6915 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6918 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6921 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6924 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6927 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6930 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6933 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6936 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6939 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6942 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6945 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6948 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6951 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6954 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6957 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6960 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6963 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6966 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6969 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6972 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6975 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6978 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6981 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6984 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6987 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6990 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6993 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6996 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:6999 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7002 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7005 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7008 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7011 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7014 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7017 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7020 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7023 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7026 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7029 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7032 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7035 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7038 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7041 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7044 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7047 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7050 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7053 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7056 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7059 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7062 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7065 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7068 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7071 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7074 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7077 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7080 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7083 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7086 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7089 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7092 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7095 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7098 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7101 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7104 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7107 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7110 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7113 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7116 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7119 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7122 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7125 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7128 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7131 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7134 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7137 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0, 0]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7140 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0, -0]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7143 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7146 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7149 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7152 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-0.5, -0.5]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7155 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7158 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-1, -1]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7161 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7164 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7167 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7170 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7173 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7176 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7179 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7182 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7185 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7188 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7191 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7194 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7197 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7200 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7203 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7206 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7209 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7212 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7215 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7218 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7221 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7224 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7227 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7230 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7233 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7236 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7239 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7242 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7245 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7248 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7251 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7254 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7257 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7260 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7263 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7266 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7269 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7272 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7275 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7278 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7281 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7284 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7287 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7290 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7293 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7296 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7299 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7302 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7305 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7308 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7311 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7314 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7317 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7320 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7323 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7326 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7329 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7332 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7335 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7338 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7341 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7344 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7347 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7350 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7353 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7356 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7359 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7362 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7365 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7368 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7371 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7374 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7377 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7380 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7383 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7386 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7389 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7392 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7395 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7398 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7401 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7404 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7407 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7410 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7413 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7416 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7419 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7422 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7425 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7428 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7431 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7434 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7437 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7440 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7443 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7446 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7449 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7452 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7455 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7458 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7461 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7464 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7467 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7470 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7473 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7476 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7479 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7482 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7485 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7488 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7491 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7494 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7497 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([Infinity, Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7500 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([Infinity, Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7503 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7506 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7509 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([Infinity, Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7512 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([Infinity, Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7515 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([Infinity, Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7518 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([Infinity, Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7521 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7524 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7527 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7530 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7533 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7536 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7539 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7542 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7545 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7548 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7551 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7554 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7557 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7560 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7563 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7566 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7569 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7572 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7575 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7578 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7581 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7584 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7587 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7590 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7593 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7596 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7599 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7602 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7605 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7608 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7611 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7614 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7617 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-Infinity, -Infinity]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7620 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-Infinity, -Infinity]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7623 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7626 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7629 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-Infinity, -Infinity]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7632 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-Infinity, -Infinity]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7635 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-Infinity, -Infinity]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7638 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([-Infinity, -Infinity]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7641 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7644 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7647 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7650 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7653 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7656 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7659 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7662 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7665 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7668 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7671 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7674 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7677 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7680 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7683 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7686 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7689 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7692 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7695 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7698 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7701 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7704 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7707 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7710 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7713 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7716 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7719 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7722 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7725 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7728 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7731 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7734 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7737 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([123456789, 123456789]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7740 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([123456789, 123456789]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7743 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7746 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7749 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([123456789, 123456789]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7752 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([123456789, 123456789]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7755 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([123456789, 123456789]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7758 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([123456789, 123456789]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7761 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7764 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7767 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7770 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7773 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7776 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7779 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7782 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7785 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7788 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7791 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7794 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7797 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7800 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7803 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7806 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7809 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7812 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7815 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7818 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7821 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7824 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7827 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7830 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7833 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7836 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7839 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7842 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7845 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7848 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7851 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7854 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7857 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7860 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7863 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7866 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7869 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7872 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7875 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7878 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7881 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7884 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7887 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7890 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7893 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7896 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7899 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7902 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7905 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7908 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7911 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7914 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7917 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7920 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7923 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7926 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7929 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7932 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7935 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7938 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7941 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7944 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7947 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7950 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7953 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7956 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7959 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7962 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7965 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7968 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7971 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7974 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7977 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7980 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7983 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7986 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7989 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7992 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7995 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:7998 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8001 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8004 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8007 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8010 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8013 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8016 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8019 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8022 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8025 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8028 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8031 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8034 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8037 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8040 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8043 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8046 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8049 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8052 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8055 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8058 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8061 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8064 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8067 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8070 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8073 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8076 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8079 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8082 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8085 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8088 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8091 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8094 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8097 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8100 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8103 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8106 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8109 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8112 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8115 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8118 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8121 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8124 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8127 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8130 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8133 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8136 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8139 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8142 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8145 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8148 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8151 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8154 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8157 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8160 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8163 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8166 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8169 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8172 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8175 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8178 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8181 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8184 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8187 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8190 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8193 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8196 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8199 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8202 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8205 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8208 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8211 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8214 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8217 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([123456789, 123456789]), f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8220 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([123456789, 123456789]), f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8223 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8226 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8229 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([123456789, 123456789]), f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8232 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([123456789, 123456789]), f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8235 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([123456789, 123456789]), f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8238 +assert_return( + () => invoke($0, `f64x2.pmax`, [f64x2([123456789, 123456789]), f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8241 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8244 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8247 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8250 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8253 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8256 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8259 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8262 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([-Infinity, -Infinity]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8265 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8268 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8271 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8274 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8277 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8280 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8283 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8286 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8289 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8292 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8295 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8298 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8301 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8304 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8307 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8310 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8313 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8316 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8319 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8322 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8325 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8328 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8331 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8334 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8337 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8340 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8343 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8346 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8349 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8352 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8355 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8358 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8361 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8364 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8367 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8370 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8373 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8376 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8379 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8382 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8385 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8388 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8391 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8394 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8397 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8400 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8403 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8406 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8409 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8412 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8415 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8418 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8421 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8424 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8427 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8430 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8433 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8436 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8439 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8442 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8445 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8448 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8451 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8454 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8457 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8460 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8463 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8466 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8469 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8472 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8475 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8478 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8481 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8484 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8487 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8490 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8493 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8496 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8499 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8502 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8505 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8508 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8511 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8514 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8517 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8520 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8523 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8526 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8529 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8532 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8535 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8538 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8541 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8544 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8547 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8550 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8553 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8556 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8559 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8562 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8565 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8568 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8571 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8574 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8577 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8580 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8583 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8586 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8589 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8592 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8595 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8598 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8601 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8604 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8607 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8610 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8613 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8616 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8619 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8622 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8625 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8628 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8631 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8634 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8637 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8640 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8643 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8646 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8649 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8652 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8655 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8658 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8661 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8664 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8667 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8670 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8673 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8676 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8679 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8682 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8685 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8688 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8691 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8694 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8697 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8700 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8703 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8706 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8709 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8712 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8715 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8718 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8721 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8724 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8727 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8730 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8733 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8736 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8739 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8742 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8745 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8748 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8751 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8754 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8757 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8760 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8763 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8766 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8769 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8772 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8775 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8778 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8781 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8784 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8787 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8790 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8793 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8796 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8799 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8802 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8805 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8808 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8811 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8814 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8817 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8820 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8823 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8826 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8829 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8832 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8835 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8838 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8841 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8844 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8847 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8850 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8853 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8856 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8859 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8862 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8865 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8868 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8871 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8874 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8877 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8880 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8883 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8886 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8889 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8892 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8895 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8898 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8901 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8904 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8907 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8910 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8913 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8916 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8919 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8922 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8925 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8928 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8931 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8934 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8937 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8940 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8943 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8946 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8949 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8952 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8955 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8958 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8961 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8964 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8967 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8970 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8973 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8976 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8979 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8982 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8985 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8988 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8991 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8994 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:8997 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9000 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9003 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9006 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9009 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9012 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9015 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9018 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9021 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9024 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9027 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9030 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9033 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9036 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9039 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9042 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9045 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9048 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9051 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9054 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9057 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9060 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9063 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9066 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9069 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0.5, 0.5]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9072 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9075 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1, 1]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9078 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9081 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9084 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9087 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9090 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9093 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9096 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9099 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9102 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9105 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9108 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9111 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9114 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9117 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([123456789, 123456789]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9120 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9123 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9126 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9129 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9132 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9135 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9138 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9141 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9144 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9147 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9150 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9153 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9156 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9159 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9162 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9165 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9168 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9171 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9174 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9177 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9180 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9183 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9186 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9189 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9192 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9195 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9198 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9201 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9204 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9207 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9210 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9213 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9216 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9219 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9222 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9225 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9228 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9231 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9234 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9237 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9240 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9243 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9246 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9249 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9252 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9255 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9258 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9261 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9264 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9267 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9270 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9273 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9276 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9279 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9282 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9285 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9288 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9291 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9294 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9297 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9300 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9303 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9306 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9309 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9312 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9315 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9318 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9321 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9324 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9327 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9330 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9333 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9336 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9339 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9342 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9345 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9348 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9351 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9354 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9357 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9360 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9363 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9366 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9369 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9372 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9375 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9378 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9381 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9384 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9387 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9390 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9393 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9396 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9399 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9402 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9405 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9408 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9411 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9414 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9417 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9420 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9423 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9426 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9429 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9432 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9435 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9438 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9441 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9444 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9447 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9450 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9453 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9456 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9459 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9462 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9465 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9468 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9471 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9474 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9477 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9480 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9483 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9486 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9489 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9492 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9495 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9498 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9501 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9504 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9507 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9510 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9513 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9516 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9519 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9522 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9525 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9528 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9531 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9534 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9537 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9540 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9543 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9546 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9549 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9552 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9555 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9558 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9561 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9564 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9567 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9570 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9573 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9576 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9579 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9582 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9585 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9588 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9591 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9594 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9597 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9600 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9603 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9606 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9609 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9612 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9615 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9618 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9621 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9624 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9627 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9630 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9633 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9636 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9639 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9642 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9645 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9648 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9651 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9654 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9657 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9660 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9663 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9666 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9669 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9672 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9675 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9678 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9681 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9684 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9687 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9690 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9693 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9696 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9699 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9702 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9705 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9708 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9711 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9714 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9717 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9720 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9723 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9726 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9729 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9732 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9735 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9738 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9741 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9744 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9747 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9750 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9753 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9756 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9759 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9762 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9765 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9768 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9771 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9774 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9777 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9780 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9783 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9786 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9789 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9792 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9795 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9798 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9801 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9804 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9807 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9810 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9813 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9816 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9819 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9822 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9825 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9828 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9831 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9834 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9837 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9840 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9843 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9846 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9849 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9852 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9855 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9858 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9861 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9864 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9867 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9870 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9873 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9876 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9879 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9882 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9885 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9888 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9891 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9894 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9897 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9900 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9903 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9906 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9909 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9912 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9915 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9918 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9921 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9924 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9927 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9930 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9933 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9936 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9939 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9942 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9945 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9948 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9951 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9954 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9957 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9960 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9963 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9966 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9969 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9972 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9975 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9978 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9981 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9984 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9987 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9990 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9993 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9996 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:9999 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10002 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10005 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10008 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10011 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10014 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10017 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10020 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10023 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10026 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10029 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10032 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10035 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10038 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10041 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10044 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10047 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10050 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10053 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10056 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10059 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10062 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10065 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10068 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10071 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10074 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10077 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10080 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10083 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10086 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10089 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10092 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10095 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10098 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10101 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10104 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10107 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10110 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10113 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10116 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10119 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10122 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10125 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10128 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10131 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10134 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10137 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10140 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10143 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10146 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10149 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10152 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10155 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10158 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10161 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10164 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10167 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10170 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10173 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10176 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10179 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10182 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10185 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10188 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10191 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10194 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10197 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10200 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10203 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10206 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10209 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10212 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10215 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10218 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10221 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10224 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10227 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10230 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10233 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10236 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10239 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10242 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10245 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10248 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10251 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10254 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10257 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10260 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10263 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10266 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10269 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10272 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10275 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10278 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10281 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10284 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10287 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10290 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10293 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10296 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10299 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10302 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10305 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10308 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10311 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10314 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10317 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10320 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10323 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10326 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10329 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10332 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10335 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10338 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10341 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10344 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10347 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10350 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10353 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10356 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10359 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10362 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10365 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10368 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10371 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10374 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10377 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10380 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10383 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10386 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10389 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10392 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10395 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10398 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10401 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10404 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10407 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10410 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10413 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10416 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10419 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10422 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10425 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10428 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10431 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10434 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10437 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10440 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10443 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10446 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10449 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10452 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10455 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10458 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10461 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10464 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10467 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10470 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10473 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10476 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10479 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10482 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10485 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10488 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10491 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10494 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10497 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10500 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10503 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10506 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10509 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10512 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10515 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10518 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10521 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10524 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10527 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10530 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10533 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10536 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10539 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([Infinity, Infinity]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10542 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10545 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10548 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10551 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10554 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10557 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10560 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10563 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10566 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10569 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10572 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10575 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10578 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10581 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10584 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10587 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10590 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10593 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10596 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10599 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10602 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10605 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10608 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10611 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10614 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10617 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10620 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10623 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10626 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10629 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10632 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10635 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10638 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10641 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10644 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10647 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10650 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10653 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10656 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10659 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10662 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10665 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10668 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10671 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10674 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10677 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10680 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10683 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10686 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10689 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10692 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10695 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10698 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10701 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10704 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10707 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10710 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10713 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10716 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10719 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10722 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10725 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10728 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10731 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10734 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10737 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10740 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10743 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10746 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10749 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10752 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10755 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10758 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10761 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10764 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10767 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10770 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10773 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10776 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10779 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10782 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10785 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10788 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10791 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10794 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10797 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10800 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10803 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10806 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10809 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10812 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10815 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10818 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10821 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10824 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10827 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10830 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10833 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10836 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10839 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10842 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10845 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10848 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10851 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10854 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10857 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10860 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10863 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10866 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10869 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10872 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10875 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10878 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10881 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10884 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10887 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10890 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10893 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10896 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10899 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10902 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10905 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10908 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10911 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10914 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10917 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10920 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10923 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10926 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10929 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10932 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10935 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10938 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10941 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10944 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10947 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10950 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10953 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10956 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10959 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10962 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10965 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10968 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10971 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10974 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10977 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10980 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10983 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10986 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10989 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10992 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10995 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:10998 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11001 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11004 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11007 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11010 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11013 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0, 0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11016 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0, -0]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11019 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11022 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11025 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.5, 0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11028 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-0.5, -0.5]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11031 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1, 1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11034 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-1, -1]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11037 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([6.283185307179586, 6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11040 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-6.283185307179586, -6.283185307179586]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11043 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11046 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11049 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11052 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11055 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([Infinity, Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11058 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([-Infinity, -Infinity]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11061 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11064 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11067 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11070 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11073 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([123456789, 123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11076 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11079 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11082 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11085 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([123456789.01234567, 123456789.01234567]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11088 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11091 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11094 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11097 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11100 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11103 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11106 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11109 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11112 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11115 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11118 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11121 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11124 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11127 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11130 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + f64x2([2623536934927580700, 2623536934927580700]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11133 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11136 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11139 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11142 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11145 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11148 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11151 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11154 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11157 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11160 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11163 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11166 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11169 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11172 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11175 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11178 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11181 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11184 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11187 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11190 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11193 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11196 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11199 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11202 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11205 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11208 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11211 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11214 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11217 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11220 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11223 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11226 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11229 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11232 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11235 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11238 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11241 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11244 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11247 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11250 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11253 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11256 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11259 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11262 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11265 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11268 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11271 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11274 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11277 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11280 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11283 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11286 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11289 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11292 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11295 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11298 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11301 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11304 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11307 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11310 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11313 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11316 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11319 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11322 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11325 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11328 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11331 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11334 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11337 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11340 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11343 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11346 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11349 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11352 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11355 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11358 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11361 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11364 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11367 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11370 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11373 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11376 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11379 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11382 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11385 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11388 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11391 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11394 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11397 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11400 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11403 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11406 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11409 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11412 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11415 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11418 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11421 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11424 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11427 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11430 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11433 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11436 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11439 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11442 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11445 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11448 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11451 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11454 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11457 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11460 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11463 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11466 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11469 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11472 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11475 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11478 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11481 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11484 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11487 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11490 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11493 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11496 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11499 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11502 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11505 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0, 0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11508 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0, -0]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11511 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11514 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11517 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.5, 0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11520 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-0.5, -0.5]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11523 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1, 1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11526 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-1, -1]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11529 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([6.283185307179586, 6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11532 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-6.283185307179586, -6.283185307179586]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11535 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11538 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11541 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11544 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11547 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([Infinity, Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11550 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([-Infinity, -Infinity]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11553 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11556 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11559 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11562 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11565 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789, 123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11568 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11571 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11574 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.0000000000123456789), + value("f64", 0.0000000000123456789), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11577 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([123456789.01234567, 123456789.01234567]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 123456789.01234567), + value("f64", 123456789.01234567), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11580 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11583 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11586 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000012345678901234568), + value("f64", 0.000000000012345678901234568), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11589 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11592 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11595 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11598 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11601 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11604 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11607 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11610 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11613 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11616 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11619 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11622 +assert_return( + () => invoke($0, `f64x2.pmax`, [ + f64x2([2623536934927580700, 2623536934927580700]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11629 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.pmin (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11630 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.pmax (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11631 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.pmin (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11632 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.pmax (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11633 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.pmin (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11634 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.pmax (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11635 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.pmin (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11636 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.pmax (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11639 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.pmin (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11640 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.pmax (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11644 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.pmin-1st-arg-empty (result v128) + (f64x2.pmin (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11652 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.pmin-arg-empty (result v128) + (f64x2.pmin) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11660 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.pmax-1st-arg-empty (result v128) + (f64x2.pmax (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_pmin_pmax.wast:11668 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.pmax-arg-empty (result v128) + (f64x2.pmax) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_rounding.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_rounding.wast.js new file mode 100644 index 0000000000..c787804bc2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_rounding.wast.js @@ -0,0 +1,2210 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_f64x2_rounding.wast + +// ./test/core/simd/simd_f64x2_rounding.wast:4 +let $0 = instantiate(`(module + (func (export "f64x2.ceil") (param v128) (result v128) (f64x2.ceil (local.get 0))) + (func (export "f64x2.floor") (param v128) (result v128) (f64x2.floor (local.get 0))) + (func (export "f64x2.trunc") (param v128) (result v128) (f64x2.trunc (local.get 0))) + (func (export "f64x2.nearest") (param v128) (result v128) (f64x2.nearest (local.get 0))) +)`); + +// ./test/core/simd/simd_f64x2_rounding.wast:11 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:13 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:15 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:17 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:19 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:21 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:23 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:25 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:27 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([6.283185307179586, 6.283185307179586])]), + [new F64x2Pattern(value("f64", 7), value("f64", 7))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:29 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([-6.283185307179586, -6.283185307179586])]), + [new F64x2Pattern(value("f64", -6), value("f64", -6))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:31 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:33 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:35 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:37 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:39 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:41 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:43 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:45 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:47 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:49 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:51 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:53 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:55 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:57 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:59 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([123456789.01234567, 123456789.01234567])]), + [new F64x2Pattern(value("f64", 123456790), value("f64", 123456790))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:61 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:63 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:65 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:67 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:69 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:71 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:73 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:75 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:77 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:79 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:81 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:83 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:85 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:87 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:89 +assert_return( + () => invoke($0, `f64x2.ceil`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:91 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:93 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:95 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:97 +assert_return( + () => invoke($0, `f64x2.ceil`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:99 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:101 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:103 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:105 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:107 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:109 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:111 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:113 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:115 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([6.283185307179586, 6.283185307179586])]), + [new F64x2Pattern(value("f64", 6), value("f64", 6))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:117 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([-6.283185307179586, -6.283185307179586])]), + [new F64x2Pattern(value("f64", -7), value("f64", -7))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:119 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:121 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:123 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:125 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:127 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:129 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:131 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:133 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:135 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:137 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:139 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:141 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:143 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:145 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:147 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([123456789.01234567, 123456789.01234567])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:149 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:151 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:153 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:155 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:157 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:159 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:161 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:163 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:165 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:167 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:169 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:171 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:173 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:175 +assert_return( + () => invoke($0, `f64x2.floor`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:177 +assert_return( + () => invoke($0, `f64x2.floor`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:179 +assert_return( + () => invoke($0, `f64x2.floor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:181 +assert_return( + () => invoke($0, `f64x2.floor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:183 +assert_return( + () => invoke($0, `f64x2.floor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:185 +assert_return( + () => invoke($0, `f64x2.floor`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:187 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:189 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:191 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:193 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:195 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:197 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:199 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:201 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:203 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([6.283185307179586, 6.283185307179586])]), + [new F64x2Pattern(value("f64", 6), value("f64", 6))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:205 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([-6.283185307179586, -6.283185307179586])]), + [new F64x2Pattern(value("f64", -6), value("f64", -6))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:207 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:209 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:211 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:213 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:215 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:217 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:219 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:221 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:223 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:225 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:227 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:229 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:231 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:233 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:235 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([123456789.01234567, 123456789.01234567])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:237 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:239 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:241 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:243 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:245 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:247 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:249 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:251 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:253 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:255 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:257 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:259 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:261 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:263 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:265 +assert_return( + () => invoke($0, `f64x2.trunc`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:267 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:269 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:271 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:273 +assert_return( + () => invoke($0, `f64x2.trunc`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:275 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([0, 0])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:277 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([-0, -0])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:279 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:281 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + ]), + ]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:283 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([0.5, 0.5])]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:285 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([-0.5, -0.5])]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:287 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([1, 1])]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:289 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([-1, -1])]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:291 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([6.283185307179586, 6.283185307179586])]), + [new F64x2Pattern(value("f64", 6), value("f64", 6))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:293 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([-6.283185307179586, -6.283185307179586])]), + [new F64x2Pattern(value("f64", -6), value("f64", -6))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:295 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([ + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:297 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([ + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:299 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:301 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, + ]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:303 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([Infinity, Infinity])]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:305 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([-Infinity, -Infinity])]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:307 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:309 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:311 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:313 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:315 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([123456789, 123456789])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:317 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:319 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([1234567890000000000000000000, 1234567890000000000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:321 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([0.0000000000123456789, 0.0000000000123456789]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:323 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([123456789.01234567, 123456789.01234567])]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:325 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:327 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([1234567890123456900000000000, 1234567890123456900000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1234567890123456900000000000), + value("f64", 1234567890123456900000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:329 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([0.000000000012345678901234568, 0.000000000012345678901234568]), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:331 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:333 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:335 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:337 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:339 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:341 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:343 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:345 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:347 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([1375488932539311400000000, 1375488932539311400000000]), + ]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:349 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:351 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + f64x2([721152341463170500000000000000, 721152341463170500000000000000]), + ]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:353 +assert_return( + () => invoke($0, `f64x2.nearest`, [f64x2([2623536934927580700, 2623536934927580700])]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:355 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:357 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [new F64x2Pattern(`canonical_nan`, `canonical_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:359 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0x7f, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:361 +assert_return( + () => invoke($0, `f64x2.nearest`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf4, + 0xff, + ]), + ]), + [new F64x2Pattern(`arithmetic_nan`, `arithmetic_nan`)], +); + +// ./test/core/simd/simd_f64x2_rounding.wast:367 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.ceil (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:368 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.floor (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:369 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.trunc (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:370 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.nearest (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:371 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.ceil (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:372 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.floor (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:373 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.trunc (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:374 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.nearest (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:375 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.ceil (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:376 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.floor (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:377 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.trunc (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:378 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.nearest (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:379 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.ceil (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:380 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.floor (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:381 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.trunc (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:382 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.nearest (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:385 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.ceil (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:386 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.floor (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:387 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.trunc (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:388 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.nearest (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:392 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.ceil-arg-empty (result v128) + (f64x2.ceil) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:400 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.floor-arg-empty (result v128) + (f64x2.floor) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:408 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.trunc-arg-empty (result v128) + (f64x2.trunc) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_f64x2_rounding.wast:416 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.nearest-arg-empty (result v128) + (f64x2.nearest) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_arith.wast.js new file mode 100644 index 0000000000..860294d3a7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_arith.wast.js @@ -0,0 +1,1801 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i16x8_arith.wast + +// ./test/core/simd/simd_i16x8_arith.wast:4 +let $0 = instantiate(`(module + (func (export "i16x8.add") (param v128 v128) (result v128) (i16x8.add (local.get 0) (local.get 1))) + (func (export "i16x8.sub") (param v128 v128) (result v128) (i16x8.sub (local.get 0) (local.get 1))) + (func (export "i16x8.mul") (param v128 v128) (result v128) (i16x8.mul (local.get 0) (local.get 1))) + (func (export "i16x8.neg") (param v128) (result v128) (i16x8.neg (local.get 0))) +)`); + +// ./test/core/simd/simd_i16x8_arith.wast:13 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:16 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:19 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:22 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:25 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:28 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:31 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:34 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:37 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:40 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:43 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:46 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:49 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:52 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:55 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:58 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:61 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:64 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:67 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:70 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:73 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:76 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:79 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:82 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:85 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:88 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:91 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:94 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:97 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:100 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:103 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:106 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:109 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:112 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:115 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:118 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:121 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:124 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:127 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i8x16([0x0, 0x80, 0x0, 0x80, 0x0, 0x80, 0x0, 0x80, 0x0, 0x80, 0x0, 0x80, 0x0, 0x80, 0x0, 0x80]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:130 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:133 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i32x4([0x80008000, 0x80008000, 0x80008000, 0x80008000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:136 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:139 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([0, 0, 0, 0]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:142 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([-0, -0, -0, -0]), + ]), + [i16x8([0x8000, 0x0, 0x8000, 0x0, 0x8000, 0x0, 0x8000, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:145 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([1, 1, 1, 1]), + ]), + [i16x8([0x8000, 0xbf80, 0x8000, 0xbf80, 0x8000, 0xbf80, 0x8000, 0xbf80])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:148 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([-1, -1, -1, -1]), + ]), + [i16x8([0x8000, 0x3f80, 0x8000, 0x3f80, 0x8000, 0x3f80, 0x8000, 0x3f80])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:151 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i16x8([0x1, 0x7f81, 0x1, 0x7f81, 0x1, 0x7f81, 0x1, 0x7f81])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:154 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i16x8([0x1, 0xff81, 0x1, 0xff81, 0x1, 0xff81, 0x1, 0xff81])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:157 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i16x8([0x1, 0x7fc1, 0x1, 0x7fc1, 0x1, 0x7fc1, 0x1, 0x7fc1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:160 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0xffff, 0xfffe, 0xfffd, 0xfffc, 0xfffb, 0xfffa, 0xfff9]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:163 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe]), + ]), + [i16x8([0x0, 0x3, 0x6, 0x9, 0xc, 0xf, 0x12, 0x15])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:166 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5]), + ]), + [i16x8([0xe0e, 0xe0e, 0xe0e, 0xe0e, 0xe0e, 0xe0e, 0xe0e, 0xe0e])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:169 +assert_return( + () => invoke($0, `i16x8.add`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678]), + ]), + [i16x8([0x68ac, 0x68ac, 0x68ac, 0x68ac, 0x68ac, 0x68ac, 0x68ac, 0x68ac])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:174 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:177 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:180 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:183 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:186 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:189 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:192 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:195 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:198 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:201 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:204 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:207 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:210 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:213 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:216 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:219 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:222 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:225 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:228 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:231 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:234 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:237 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:240 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:243 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:246 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:249 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:252 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:255 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:258 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:261 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:264 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:267 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:270 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:273 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:276 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:279 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:282 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:285 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:288 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i8x16([0x0, 0x80, 0x0, 0x80, 0x0, 0x80, 0x0, 0x80, 0x0, 0x80, 0x0, 0x80, 0x0, 0x80, 0x0, 0x80]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:291 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:294 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i32x4([0x80008000, 0x80008000, 0x80008000, 0x80008000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:297 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:300 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([0, 0, 0, 0]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:303 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([-0, -0, -0, -0]), + ]), + [i16x8([0x8000, 0x0, 0x8000, 0x0, 0x8000, 0x0, 0x8000, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:306 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([1, 1, 1, 1]), + ]), + [i16x8([0x8000, 0x4080, 0x8000, 0x4080, 0x8000, 0x4080, 0x8000, 0x4080])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:309 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([-1, -1, -1, -1]), + ]), + [i16x8([0x8000, 0xc080, 0x8000, 0xc080, 0x8000, 0xc080, 0x8000, 0xc080])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:312 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i16x8([0x1, 0x8081, 0x1, 0x8081, 0x1, 0x8081, 0x1, 0x8081])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:315 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i16x8([0x1, 0x81, 0x1, 0x81, 0x1, 0x81, 0x1, 0x81])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:318 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i16x8([0x1, 0x8041, 0x1, 0x8041, 0x1, 0x8041, 0x1, 0x8041])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:321 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0xffff, 0xfffe, 0xfffd, 0xfffc, 0xfffb, 0xfffa, 0xfff9]), + ]), + [i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:324 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe]), + ]), + [i16x8([0x0, 0xffff, 0xfffe, 0xfffd, 0xfffc, 0xfffb, 0xfffa, 0xfff9])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:327 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5]), + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [i16x8([0xad9c, 0xad9c, 0xad9c, 0xad9c, 0xad9c, 0xad9c, 0xad9c, 0xad9c])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:330 +assert_return( + () => invoke($0, `i16x8.sub`, [ + i16x8([0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678]), + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [i16x8([0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:335 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:338 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:341 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:344 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:347 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:350 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:353 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:356 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:359 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:362 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:365 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:368 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:371 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:374 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:377 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:380 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:383 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:386 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:389 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:392 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:395 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:398 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:401 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:404 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:407 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:410 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:413 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:416 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:419 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:422 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:425 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + ]), + [i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:428 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:431 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:434 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:437 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:440 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:443 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:446 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:449 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000]), + i8x16([0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:452 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:455 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i32x4([0x20002, 0x20002, 0x20002, 0x20002]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:458 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:461 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([0, 0, 0, 0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:464 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([-0, -0, -0, -0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:467 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([1, 1, 1, 1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:470 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([-1, -1, -1, -1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:473 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i16x8([0x0, 0x7f80, 0x0, 0x7f80, 0x0, 0x7f80, 0x0, 0x7f80])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:476 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i16x8([0x0, 0xff80, 0x0, 0xff80, 0x0, 0xff80, 0x0, 0xff80])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:479 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i16x8([0x0, 0x7fc0, 0x0, 0x7fc0, 0x0, 0x7fc0, 0x0, 0x7fc0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:482 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0xffff, 0xfffe, 0xfffd, 0xfffc, 0xfffb, 0xfffa, 0xfff9]), + ]), + [i16x8([0x0, 0xffff, 0xfffc, 0xfff7, 0xfff0, 0xffe7, 0xffdc, 0xffcf])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:485 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe]), + ]), + [i16x8([0x0, 0x2, 0x8, 0x12, 0x20, 0x32, 0x48, 0x62])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:488 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5]), + ]), + [i16x8([0x546d, 0x546d, 0x546d, 0x546d, 0x546d, 0x546d, 0x546d, 0x546d])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:491 +assert_return( + () => invoke($0, `i16x8.mul`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef]), + ]), + [i16x8([0xa28c, 0xa28c, 0xa28c, 0xa28c, 0xa28c, 0xa28c, 0xa28c, 0xa28c])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:496 +assert_return( + () => invoke($0, `i16x8.neg`, [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:498 +assert_return( + () => invoke($0, `i16x8.neg`, [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:500 +assert_return( + () => invoke($0, `i16x8.neg`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:502 +assert_return( + () => invoke($0, `i16x8.neg`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + ]), + [i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:504 +assert_return( + () => invoke($0, `i16x8.neg`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:506 +assert_return( + () => invoke($0, `i16x8.neg`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:508 +assert_return( + () => invoke($0, `i16x8.neg`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:510 +assert_return( + () => invoke($0, `i16x8.neg`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:512 +assert_return( + () => invoke($0, `i16x8.neg`, [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:514 +assert_return( + () => invoke($0, `i16x8.neg`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:516 +assert_return( + () => invoke($0, `i16x8.neg`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:518 +assert_return( + () => invoke($0, `i16x8.neg`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:520 +assert_return( + () => invoke($0, `i16x8.neg`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:522 +assert_return( + () => invoke($0, `i16x8.neg`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:524 +assert_return( + () => invoke($0, `i16x8.neg`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:528 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.neg (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith.wast:529 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.add (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith.wast:530 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.sub (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith.wast:531 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.mul (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith.wast:535 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.neg-arg-empty (result v128) + (i16x8.neg) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith.wast:543 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.add-1st-arg-empty (result v128) + (i16x8.add (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith.wast:551 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.add-arg-empty (result v128) + (i16x8.add) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith.wast:559 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.sub-1st-arg-empty (result v128) + (i16x8.sub (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith.wast:567 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.sub-arg-empty (result v128) + (i16x8.sub) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith.wast:575 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.mul-1st-arg-empty (result v128) + (i16x8.mul (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith.wast:583 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.mul-arg-empty (result v128) + (i16x8.mul) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith.wast:593 +let $1 = instantiate(`(module + (func (export "add-sub") (param v128 v128 v128) (result v128) + (i16x8.add (i16x8.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "mul-add") (param v128 v128 v128) (result v128) + (i16x8.mul (i16x8.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "mul-sub") (param v128 v128 v128) (result v128) + (i16x8.mul (i16x8.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "sub-add") (param v128 v128 v128) (result v128) + (i16x8.sub (i16x8.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "add-neg") (param v128 v128) (result v128) + (i16x8.add (i16x8.neg (local.get 0)) (local.get 1))) + (func (export "mul-neg") (param v128 v128) (result v128) + (i16x8.mul (i16x8.neg (local.get 0)) (local.get 1))) + (func (export "sub-neg") (param v128 v128) (result v128) + (i16x8.sub (i16x8.neg (local.get 0)) (local.get 1))) +)`); + +// ./test/core/simd/simd_i16x8_arith.wast:610 +assert_return( + () => invoke($1, `add-sub`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe]), + i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe]), + ]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:614 +assert_return( + () => invoke($1, `mul-add`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x0, 0x4, 0x8, 0xc, 0x10, 0x14, 0x18, 0x1c])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:618 +assert_return( + () => invoke($1, `mul-sub`, [ + i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe]), + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + ]), + [i16x8([0x0, 0x1, 0x4, 0x9, 0x10, 0x19, 0x24, 0x31])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:622 +assert_return( + () => invoke($1, `sub-add`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe]), + i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe]), + ]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:626 +assert_return( + () => invoke($1, `add-neg`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:629 +assert_return( + () => invoke($1, `mul-neg`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x0, 0xfffe, 0xfffc, 0xfffa, 0xfff8, 0xfff6, 0xfff4, 0xfff2])], +); + +// ./test/core/simd/simd_i16x8_arith.wast:632 +assert_return( + () => invoke($1, `sub-neg`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + ]), + [i16x8([0x0, 0xfffe, 0xfffc, 0xfffa, 0xfff8, 0xfff6, 0xfff4, 0xfff2])], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_arith2.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_arith2.wast.js new file mode 100644 index 0000000000..759c59683b --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_arith2.wast.js @@ -0,0 +1,1558 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i16x8_arith2.wast + +// ./test/core/simd/simd_i16x8_arith2.wast:3 +let $0 = instantiate(`(module + (func (export "i16x8.min_s") (param v128 v128) (result v128) (i16x8.min_s (local.get 0) (local.get 1))) + (func (export "i16x8.min_u") (param v128 v128) (result v128) (i16x8.min_u (local.get 0) (local.get 1))) + (func (export "i16x8.max_s") (param v128 v128) (result v128) (i16x8.max_s (local.get 0) (local.get 1))) + (func (export "i16x8.max_u") (param v128 v128) (result v128) (i16x8.max_u (local.get 0) (local.get 1))) + (func (export "i16x8.avgr_u") (param v128 v128) (result v128) (i16x8.avgr_u (local.get 0) (local.get 1))) + (func (export "i16x8.abs") (param v128) (result v128) (i16x8.abs (local.get 0))) + (func (export "i16x8.min_s_with_const_0") (result v128) (i16x8.min_s (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535) (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))) + (func (export "i16x8.min_s_with_const_1") (result v128) (i16x8.min_s (v128.const i16x8 0 0 1 1 2 2 3 3) (v128.const i16x8 3 3 2 2 1 1 0 0))) + (func (export "i16x8.min_u_with_const_2") (result v128) (i16x8.min_u (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535) (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))) + (func (export "i16x8.min_u_with_const_3") (result v128) (i16x8.min_u (v128.const i16x8 0 0 1 1 2 2 3 3) (v128.const i16x8 3 3 2 2 1 1 0 0))) + (func (export "i16x8.max_s_with_const_4") (result v128) (i16x8.max_s (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535) (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))) + (func (export "i16x8.max_s_with_const_5") (result v128) (i16x8.max_s (v128.const i16x8 0 0 1 1 2 2 3 3) (v128.const i16x8 3 3 2 2 1 1 0 0))) + (func (export "i16x8.max_u_with_const_6") (result v128) (i16x8.max_u (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535) (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))) + (func (export "i16x8.max_u_with_const_7") (result v128) (i16x8.max_u (v128.const i16x8 0 0 1 1 2 2 3 3) (v128.const i16x8 3 3 2 2 1 1 0 0))) + (func (export "i16x8.avgr_u_with_const_8") (result v128) (i16x8.avgr_u (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535) (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))) + (func (export "i16x8.avgr_u_with_const_9") (result v128) (i16x8.avgr_u (v128.const i16x8 0 0 1 1 2 2 3 3) (v128.const i16x8 3 3 2 2 1 1 0 0))) + (func (export "i16x8.abs_with_const_10") (result v128) (i16x8.abs (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535))) + (func (export "i16x8.min_s_with_const_11") (param v128) (result v128) (i16x8.min_s (local.get 0) (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535))) + (func (export "i16x8.min_s_with_const_12") (param v128) (result v128) (i16x8.min_s (local.get 0) (v128.const i16x8 0 0 1 1 2 2 3 3))) + (func (export "i16x8.min_u_with_const_13") (param v128) (result v128) (i16x8.min_u (local.get 0) (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535))) + (func (export "i16x8.min_u_with_const_14") (param v128) (result v128) (i16x8.min_u (local.get 0) (v128.const i16x8 0 0 1 1 2 2 3 3))) + (func (export "i16x8.max_s_with_const_15") (param v128) (result v128) (i16x8.max_s (local.get 0) (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535))) + (func (export "i16x8.max_s_with_const_16") (param v128) (result v128) (i16x8.max_s (local.get 0) (v128.const i16x8 0 0 1 1 2 2 3 3))) + (func (export "i16x8.max_u_with_const_17") (param v128) (result v128) (i16x8.max_u (local.get 0) (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535))) + (func (export "i16x8.max_u_with_const_18") (param v128) (result v128) (i16x8.max_u (local.get 0) (v128.const i16x8 0 0 1 1 2 2 3 3))) + (func (export "i16x8.avgr_u_with_const_19") (param v128) (result v128) (i16x8.avgr_u (local.get 0) (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535))) + (func (export "i16x8.avgr_u_with_const_20") (param v128) (result v128) (i16x8.avgr_u (local.get 0) (v128.const i16x8 0 0 1 1 2 2 3 3))) +)`); + +// ./test/core/simd/simd_i16x8_arith2.wast:33 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:36 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:39 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0xffff, 0xffff, 0x0, 0x0, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:42 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:45 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:48 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:51 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:54 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:57 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:60 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:63 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:66 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:69 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:72 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0xffff, 0xffff, 0x0, 0x0, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:75 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:78 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:81 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:84 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:87 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:90 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:93 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:96 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:99 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:102 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:105 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0xffff, 0xffff, 0x0, 0x0, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:108 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:111 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:114 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:117 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:120 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:123 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:126 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:129 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:132 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:135 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:138 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0xffff, 0xffff, 0x0, 0x0, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:141 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:144 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:147 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:150 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:153 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:156 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:159 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:162 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:165 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:168 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:171 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0xffff, 0xffff, 0x0, 0x0, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x8000, 0x8000, 0x8000, 0x8000, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:174 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:177 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:180 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:183 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x8040, 0x8040, 0x8040, 0x8040, 0x8040, 0x8040, 0x8040, 0x8040])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:186 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:189 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:192 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:195 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:198 +assert_return( + () => invoke($0, `i16x8.abs`, [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:200 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:202 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:204 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:206 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:208 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:210 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:212 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:214 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:216 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0xff85, 0xff85, 0xff85, 0xff85, 0xff85, 0xff85, 0xff85, 0xff85]), + ]), + [i16x8([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:218 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:220 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:222 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:224 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:228 +assert_return( + () => invoke($0, `i16x8.min_s_with_const_0`, []), + [i16x8([0x8000, 0x8000, 0x4000, 0x4000, 0x4000, 0x4000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:229 +assert_return( + () => invoke($0, `i16x8.min_s_with_const_1`, []), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:230 +assert_return( + () => invoke($0, `i16x8.min_u_with_const_2`, []), + [i16x8([0x8000, 0x8000, 0x4000, 0x4000, 0x4000, 0x4000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:231 +assert_return( + () => invoke($0, `i16x8.min_u_with_const_3`, []), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:232 +assert_return( + () => invoke($0, `i16x8.max_s_with_const_4`, []), + [i16x8([0xffff, 0xffff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:233 +assert_return( + () => invoke($0, `i16x8.max_s_with_const_5`, []), + [i16x8([0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:234 +assert_return( + () => invoke($0, `i16x8.max_u_with_const_6`, []), + [i16x8([0xffff, 0xffff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:235 +assert_return( + () => invoke($0, `i16x8.max_u_with_const_7`, []), + [i16x8([0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:236 +assert_return( + () => invoke($0, `i16x8.avgr_u_with_const_8`, []), + [i16x8([0xc000, 0xc000, 0x6000, 0x6000, 0x6000, 0x6000, 0xc000, 0xc000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:237 +assert_return( + () => invoke($0, `i16x8.avgr_u_with_const_9`, []), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:238 +assert_return( + () => invoke($0, `i16x8.abs_with_const_10`, []), + [i16x8([0x8000, 0x8000, 0x7fff, 0x7fff, 0x4000, 0x4000, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:241 +assert_return( + () => invoke($0, `i16x8.min_s_with_const_11`, [ + i16x8([0xffff, 0xffff, 0x4000, 0x4000, 0x7fff, 0x7fff, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x4000, 0x4000, 0x4000, 0x4000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:243 +assert_return( + () => invoke($0, `i16x8.min_s_with_const_12`, [ + i16x8([0x3, 0x3, 0x2, 0x2, 0x1, 0x1, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:245 +assert_return( + () => invoke($0, `i16x8.min_u_with_const_13`, [ + i16x8([0xffff, 0xffff, 0x4000, 0x4000, 0x7fff, 0x7fff, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x4000, 0x4000, 0x4000, 0x4000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:247 +assert_return( + () => invoke($0, `i16x8.min_u_with_const_14`, [ + i16x8([0x3, 0x3, 0x2, 0x2, 0x1, 0x1, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:249 +assert_return( + () => invoke($0, `i16x8.max_s_with_const_15`, [ + i16x8([0xffff, 0xffff, 0x4000, 0x4000, 0x7fff, 0x7fff, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:251 +assert_return( + () => invoke($0, `i16x8.max_s_with_const_16`, [ + i16x8([0x3, 0x3, 0x2, 0x2, 0x1, 0x1, 0x0, 0x0]), + ]), + [i16x8([0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:253 +assert_return( + () => invoke($0, `i16x8.max_u_with_const_17`, [ + i16x8([0xffff, 0xffff, 0x4000, 0x4000, 0x7fff, 0x7fff, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:255 +assert_return( + () => invoke($0, `i16x8.max_u_with_const_18`, [ + i16x8([0x3, 0x3, 0x2, 0x2, 0x1, 0x1, 0x0, 0x0]), + ]), + [i16x8([0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x3, 0x3])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:257 +assert_return( + () => invoke($0, `i16x8.avgr_u_with_const_19`, [ + i16x8([0xffff, 0xffff, 0x4000, 0x4000, 0x7fff, 0x7fff, 0x8000, 0x8000]), + ]), + [i16x8([0xc000, 0xc000, 0x6000, 0x6000, 0x6000, 0x6000, 0xc000, 0xc000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:259 +assert_return( + () => invoke($0, `i16x8.avgr_u_with_const_20`, [ + i16x8([0x3, 0x3, 0x2, 0x2, 0x1, 0x1, 0x0, 0x0]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:263 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x8000, 0x8000, 0x7fff, 0x7fff, 0x4000, 0x4000, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0x4000, 0x4000, 0x7fff, 0x7fff, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x4000, 0x4000, 0x4000, 0x4000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:266 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x80, 0x80]), + i16x8([0x0, 0x0, 0x2, 0x2, 0x1, 0x1, 0x80, 0x80]), + ]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:269 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x8000, 0x8000, 0x7fff, 0x7fff, 0x4000, 0x4000, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0x4000, 0x4000, 0x7fff, 0x7fff, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x4000, 0x4000, 0x4000, 0x4000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:272 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x80, 0x80]), + i16x8([0x0, 0x0, 0x2, 0x2, 0x1, 0x1, 0x80, 0x80]), + ]), + [i16x8([0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:275 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x8000, 0x8000, 0x7fff, 0x7fff, 0x4000, 0x4000, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0x4000, 0x4000, 0x7fff, 0x7fff, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:278 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x80, 0x80]), + i16x8([0x0, 0x0, 0x2, 0x2, 0x1, 0x1, 0x80, 0x80]), + ]), + [i16x8([0x0, 0x0, 0x2, 0x2, 0x2, 0x2, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:281 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x8000, 0x8000, 0x7fff, 0x7fff, 0x4000, 0x4000, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0x4000, 0x4000, 0x7fff, 0x7fff, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:284 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x80, 0x80]), + i16x8([0x0, 0x0, 0x2, 0x2, 0x1, 0x1, 0x80, 0x80]), + ]), + [i16x8([0x0, 0x0, 0x2, 0x2, 0x2, 0x2, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:287 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x8000, 0x8000, 0x7fff, 0x7fff, 0x4000, 0x4000, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0x4000, 0x4000, 0x7fff, 0x7fff, 0x8000, 0x8000]), + ]), + [i16x8([0xc000, 0xc000, 0x6000, 0x6000, 0x6000, 0x6000, 0xc000, 0xc000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:290 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x1, 0x1, 0x2, 0x2, 0x80, 0x80]), + i16x8([0x0, 0x0, 0x2, 0x2, 0x1, 0x1, 0x80, 0x80]), + ]), + [i16x8([0x0, 0x0, 0x2, 0x2, 0x2, 0x2, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:293 +assert_return( + () => invoke($0, `i16x8.abs`, [ + i16x8([0x8000, 0x8000, 0x7fff, 0x7fff, 0x4000, 0x4000, 0xffff, 0xffff]), + ]), + [i16x8([0x8000, 0x8000, 0x7fff, 0x7fff, 0x4000, 0x4000, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:297 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:300 +assert_return( + () => invoke($0, `i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:303 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:306 +assert_return( + () => invoke($0, `i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:309 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:312 +assert_return( + () => invoke($0, `i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:315 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:318 +assert_return( + () => invoke($0, `i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:321 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:324 +assert_return( + () => invoke($0, `i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:327 +assert_return( + () => invoke($0, `i16x8.abs`, [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:329 +assert_return( + () => invoke($0, `i16x8.abs`, [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:331 +assert_return( + () => invoke($0, `i16x8.abs`, [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:333 +assert_return( + () => invoke($0, `i16x8.abs`, [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:337 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.avgr (v128.const i16x8 0 0 0 0 0 0 0 0) (v128.const i16x8 1 1 1 1 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:338 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i16x8.avgr_s (v128.const i16x8 0 0 0 0 0 0 0 0) (v128.const i16x8 1 1 1 1 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:341 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.min_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:342 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.min_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:343 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.max_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:344 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.max_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:345 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.avgr_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:346 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.abs (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:350 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.min_s-1st-arg-empty (result v128) + (i16x8.min_s (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:358 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.min_s-arg-empty (result v128) + (i16x8.min_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:366 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.min_u-1st-arg-empty (result v128) + (i16x8.min_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:374 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.min_u-arg-empty (result v128) + (i16x8.min_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:382 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.max_s-1st-arg-empty (result v128) + (i16x8.max_s (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:390 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.max_s-arg-empty (result v128) + (i16x8.max_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:398 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.max_u-1st-arg-empty (result v128) + (i16x8.max_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:406 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.max_u-arg-empty (result v128) + (i16x8.max_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:414 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.avgr_u-1st-arg-empty (result v128) + (i16x8.avgr_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:422 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.avgr_u-arg-empty (result v128) + (i16x8.avgr_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:430 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.abs-arg-empty (result v128) + (i16x8.abs) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_arith2.wast:440 +let $1 = instantiate(`(module + (func (export "i16x8.min_s-i16x8.avgr_u") (param v128 v128 v128) (result v128) (i16x8.min_s (i16x8.avgr_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.min_s-i16x8.max_u") (param v128 v128 v128) (result v128) (i16x8.min_s (i16x8.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.min_s-i16x8.max_s") (param v128 v128 v128) (result v128) (i16x8.min_s (i16x8.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.min_s-i16x8.min_u") (param v128 v128 v128) (result v128) (i16x8.min_s (i16x8.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.min_s-i16x8.min_s") (param v128 v128 v128) (result v128) (i16x8.min_s (i16x8.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.min_s-i16x8.abs") (param v128 v128) (result v128) (i16x8.min_s (i16x8.abs (local.get 0))(local.get 1))) + (func (export "i16x8.abs-i16x8.min_s") (param v128 v128) (result v128) (i16x8.abs (i16x8.min_s (local.get 0) (local.get 1)))) + (func (export "i16x8.min_u-i16x8.avgr_u") (param v128 v128 v128) (result v128) (i16x8.min_u (i16x8.avgr_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.min_u-i16x8.max_u") (param v128 v128 v128) (result v128) (i16x8.min_u (i16x8.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.min_u-i16x8.max_s") (param v128 v128 v128) (result v128) (i16x8.min_u (i16x8.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.min_u-i16x8.min_u") (param v128 v128 v128) (result v128) (i16x8.min_u (i16x8.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.min_u-i16x8.min_s") (param v128 v128 v128) (result v128) (i16x8.min_u (i16x8.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.min_u-i16x8.abs") (param v128 v128) (result v128) (i16x8.min_u (i16x8.abs (local.get 0))(local.get 1))) + (func (export "i16x8.abs-i16x8.min_u") (param v128 v128) (result v128) (i16x8.abs (i16x8.min_u (local.get 0) (local.get 1)))) + (func (export "i16x8.max_s-i16x8.avgr_u") (param v128 v128 v128) (result v128) (i16x8.max_s (i16x8.avgr_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.max_s-i16x8.max_u") (param v128 v128 v128) (result v128) (i16x8.max_s (i16x8.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.max_s-i16x8.max_s") (param v128 v128 v128) (result v128) (i16x8.max_s (i16x8.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.max_s-i16x8.min_u") (param v128 v128 v128) (result v128) (i16x8.max_s (i16x8.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.max_s-i16x8.min_s") (param v128 v128 v128) (result v128) (i16x8.max_s (i16x8.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.max_s-i16x8.abs") (param v128 v128) (result v128) (i16x8.max_s (i16x8.abs (local.get 0))(local.get 1))) + (func (export "i16x8.abs-i16x8.max_s") (param v128 v128) (result v128) (i16x8.abs (i16x8.max_s (local.get 0) (local.get 1)))) + (func (export "i16x8.max_u-i16x8.avgr_u") (param v128 v128 v128) (result v128) (i16x8.max_u (i16x8.avgr_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.max_u-i16x8.max_u") (param v128 v128 v128) (result v128) (i16x8.max_u (i16x8.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.max_u-i16x8.max_s") (param v128 v128 v128) (result v128) (i16x8.max_u (i16x8.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.max_u-i16x8.min_u") (param v128 v128 v128) (result v128) (i16x8.max_u (i16x8.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.max_u-i16x8.min_s") (param v128 v128 v128) (result v128) (i16x8.max_u (i16x8.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.max_u-i16x8.abs") (param v128 v128) (result v128) (i16x8.max_u (i16x8.abs (local.get 0))(local.get 1))) + (func (export "i16x8.abs-i16x8.max_u") (param v128 v128) (result v128) (i16x8.abs (i16x8.max_u (local.get 0) (local.get 1)))) + (func (export "i16x8.avgr_u-i16x8.avgr_u") (param v128 v128 v128) (result v128) (i16x8.avgr_u (i16x8.avgr_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.avgr_u-i16x8.max_u") (param v128 v128 v128) (result v128) (i16x8.avgr_u (i16x8.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.avgr_u-i16x8.max_s") (param v128 v128 v128) (result v128) (i16x8.avgr_u (i16x8.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.avgr_u-i16x8.min_u") (param v128 v128 v128) (result v128) (i16x8.avgr_u (i16x8.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.avgr_u-i16x8.min_s") (param v128 v128 v128) (result v128) (i16x8.avgr_u (i16x8.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i16x8.avgr_u-i16x8.abs") (param v128 v128) (result v128) (i16x8.avgr_u (i16x8.abs (local.get 0))(local.get 1))) + (func (export "i16x8.abs-i16x8.avgr_u") (param v128 v128) (result v128) (i16x8.abs (i16x8.avgr_u (local.get 0) (local.get 1)))) + (func (export "i16x8.abs-i16x8.abs") (param v128) (result v128) (i16x8.abs (i16x8.abs (local.get 0)))) +)`); + +// ./test/core/simd/simd_i16x8_arith2.wast:479 +assert_return( + () => invoke($1, `i16x8.min_s-i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:483 +assert_return( + () => invoke($1, `i16x8.min_s-i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:487 +assert_return( + () => invoke($1, `i16x8.min_s-i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:491 +assert_return( + () => invoke($1, `i16x8.min_s-i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:495 +assert_return( + () => invoke($1, `i16x8.min_s-i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:499 +assert_return( + () => invoke($1, `i16x8.min_s-i16x8.abs`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:502 +assert_return( + () => invoke($1, `i16x8.abs-i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:505 +assert_return( + () => invoke($1, `i16x8.min_u-i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:509 +assert_return( + () => invoke($1, `i16x8.min_u-i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:513 +assert_return( + () => invoke($1, `i16x8.min_u-i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:517 +assert_return( + () => invoke($1, `i16x8.min_u-i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:521 +assert_return( + () => invoke($1, `i16x8.min_u-i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:525 +assert_return( + () => invoke($1, `i16x8.min_u-i16x8.abs`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:528 +assert_return( + () => invoke($1, `i16x8.abs-i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:531 +assert_return( + () => invoke($1, `i16x8.max_s-i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:535 +assert_return( + () => invoke($1, `i16x8.max_s-i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:539 +assert_return( + () => invoke($1, `i16x8.max_s-i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:543 +assert_return( + () => invoke($1, `i16x8.max_s-i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:547 +assert_return( + () => invoke($1, `i16x8.max_s-i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:551 +assert_return( + () => invoke($1, `i16x8.max_s-i16x8.abs`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:554 +assert_return( + () => invoke($1, `i16x8.abs-i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:557 +assert_return( + () => invoke($1, `i16x8.max_u-i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:561 +assert_return( + () => invoke($1, `i16x8.max_u-i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:565 +assert_return( + () => invoke($1, `i16x8.max_u-i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:569 +assert_return( + () => invoke($1, `i16x8.max_u-i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:573 +assert_return( + () => invoke($1, `i16x8.max_u-i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:577 +assert_return( + () => invoke($1, `i16x8.max_u-i16x8.abs`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:580 +assert_return( + () => invoke($1, `i16x8.abs-i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:583 +assert_return( + () => invoke($1, `i16x8.avgr_u-i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:587 +assert_return( + () => invoke($1, `i16x8.avgr_u-i16x8.max_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:591 +assert_return( + () => invoke($1, `i16x8.avgr_u-i16x8.max_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:595 +assert_return( + () => invoke($1, `i16x8.avgr_u-i16x8.min_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:599 +assert_return( + () => invoke($1, `i16x8.avgr_u-i16x8.min_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:603 +assert_return( + () => invoke($1, `i16x8.avgr_u-i16x8.abs`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:606 +assert_return( + () => invoke($1, `i16x8.abs-i16x8.avgr_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_arith2.wast:609 +assert_return( + () => invoke($1, `i16x8.abs-i16x8.abs`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_cmp.wast.js new file mode 100644 index 0000000000..f0fdcc0868 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_cmp.wast.js @@ -0,0 +1,4369 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i16x8_cmp.wast + +// ./test/core/simd/simd_i16x8_cmp.wast:4 +let $0 = instantiate(`(module + (func (export "eq") (param $$x v128) (param $$y v128) (result v128) (i16x8.eq (local.get $$x) (local.get $$y))) + (func (export "ne") (param $$x v128) (param $$y v128) (result v128) (i16x8.ne (local.get $$x) (local.get $$y))) + (func (export "lt_s") (param $$x v128) (param $$y v128) (result v128) (i16x8.lt_s (local.get $$x) (local.get $$y))) + (func (export "lt_u") (param $$x v128) (param $$y v128) (result v128) (i16x8.lt_u (local.get $$x) (local.get $$y))) + (func (export "le_s") (param $$x v128) (param $$y v128) (result v128) (i16x8.le_s (local.get $$x) (local.get $$y))) + (func (export "le_u") (param $$x v128) (param $$y v128) (result v128) (i16x8.le_u (local.get $$x) (local.get $$y))) + (func (export "gt_s") (param $$x v128) (param $$y v128) (result v128) (i16x8.gt_s (local.get $$x) (local.get $$y))) + (func (export "gt_u") (param $$x v128) (param $$y v128) (result v128) (i16x8.gt_u (local.get $$x) (local.get $$y))) + (func (export "ge_s") (param $$x v128) (param $$y v128) (result v128) (i16x8.ge_s (local.get $$x) (local.get $$y))) + (func (export "ge_u") (param $$x v128) (param $$y v128) (result v128) (i16x8.ge_u (local.get $$x) (local.get $$y))) +)`); + +// ./test/core/simd/simd_i16x8_cmp.wast:23 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:26 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:29 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:32 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:35 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:38 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:41 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:46 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:49 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:52 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:55 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:58 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:63 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:66 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:69 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:72 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:75 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:78 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:81 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:86 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x0, 0xc300, 0x0, 0xc2fe, 0x0, 0xbf80, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:89 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x0, 0x3f80, 0x0, 0x42fe, 0x0, 0x4300, 0x0, 0x437f]), + f32x4([1, 127, 128, 255]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:94 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:97 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:100 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x1, 0x203, 0x409, 0x1011, 0x120a, 0xb1a, 0x1baa, 0xabff]), + i16x8([0xffab, 0xaa1b, 0x1a0b, 0xa12, 0x1110, 0x904, 0x302, 0x100]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:103 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007]), + i16x8([0x8007, 0x8006, 0x8005, 0x8004, 0x8003, 0x8002, 0x8001, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:106 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x8000, 0x8001, 0xfffe, 0xffff, 0x0, 0xffff, 0x8001, 0x8000]), + i16x8([0x8000, 0x8001, 0xffff, 0x0, 0xffff, 0xfffe, 0x8001, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:111 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:114 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:117 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:120 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:123 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:126 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:129 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:134 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:137 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:140 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:143 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:146 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:149 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x8000, 0x8000]), + i32x4([0xffff, 0x0, 0x1, 0x8000]), + ]), + [i16x8([0xffff, 0x0, 0xffff, 0xffff, 0xffff, 0x0, 0xffff, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:152 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:155 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:158 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:167 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:170 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:173 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:176 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:179 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:182 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:185 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:190 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:193 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:196 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:199 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:202 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:207 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:210 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:213 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:216 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:219 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:222 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:225 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xff, 0x7fff, 0x0, 0x0, 0x1, 0x2, 0xfffe, 0xffff]), + i16x8([0xff, 0x7fff, 0x0, 0x0, 0x1, 0x2, 0xfffe, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:230 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x0, 0xc300, 0x0, 0xc2fe, 0x0, 0xbf80, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:233 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x0, 0x3f80, 0x0, 0x42fe, 0x0, 0x4300, 0x0, 0x437f]), + f32x4([1, 127, 128, 255]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:238 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:241 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:244 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x1, 0x203, 0x409, 0x1011, 0x120a, 0xb1a, 0x1baa, 0xabff]), + i16x8([0xffab, 0xaa1b, 0x1a0b, 0xa12, 0x1110, 0x904, 0x302, 0x100]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:247 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x8081, 0x8283, 0xfdfe, 0xff00, 0x1, 0x27f, 0x80fd, 0xfeff]), + i16x8([0xfeff, 0x80fd, 0x27f, 0x1, 0xff00, 0xfdfe, 0x8283, 0x8081]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:250 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x80, 0x81, 0x82, 0x83, 0x0, 0xff, 0x7ffe, 0x7fff]), + i16x8([0x7fff, 0x7ffe, 0xff, 0x0, 0x83, 0x82, 0x81, 0x1c]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:255 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:258 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:261 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:264 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:267 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:270 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:273 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:278 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:281 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:284 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:287 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:290 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:293 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [i16x8([0x0, 0xffff, 0x0, 0x0, 0x0, 0xffff, 0x0, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:296 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:299 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:302 +assert_return( + () => invoke($0, `ne`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:311 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:314 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:317 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:320 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:323 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:326 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:329 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:332 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:335 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:338 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:341 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:344 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:347 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:350 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:353 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:356 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:359 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:362 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:365 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xff, 0x7fff, 0x0, 0x0, 0x1, 0x2, 0xfffe, 0xffff]), + i16x8([0xff, 0x7fff, 0x0, 0x0, 0x1, 0x2, 0xfffe, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:368 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x0, 0xc300, 0x0, 0xc2fe, 0x0, 0xbf80, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:371 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x0, 0x3f80, 0x0, 0x42fe, 0x0, 0x4300, 0x0, 0x437f]), + f32x4([1, 127, 128, 255]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:376 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:379 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:382 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x1, 0x203, 0x409, 0x1011, 0x120a, 0xb1a, 0x1baa, 0xabff]), + i16x8([0xffab, 0xaa1b, 0x1a0b, 0xa12, 0x1110, 0x904, 0x302, 0x100]), + ]), + [i16x8([0x0, 0x0, 0xffff, 0x0, 0x0, 0x0, 0x0, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:385 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x8081, 0x8283, 0xfdfe, 0xff00, 0x1, 0x27f, 0x80fd, 0xfeff]), + i16x8([0xfeff, 0x80fd, 0x27f, 0x1, 0xff00, 0xfdfe, 0x8283, 0x8081]), + ]), + [i16x8([0xffff, 0x0, 0xffff, 0xffff, 0x0, 0x0, 0xffff, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:388 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x80, 0x81, 0x82, 0x83, 0x0, 0xff, 0x7ffe, 0x7fff]), + i16x8([0x7fff, 0x7ffe, 0xff, 0x0, 0x83, 0x82, 0x81, 0x1c]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0x0, 0xffff, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:393 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:396 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:399 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:402 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:405 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:408 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:411 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:416 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:419 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:422 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:425 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:428 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:431 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [i16x8([0x0, 0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:434 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:437 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:440 +assert_return( + () => invoke($0, `lt_s`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:449 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:452 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:455 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:458 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:461 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:464 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:467 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:472 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:475 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:478 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:481 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:484 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:489 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:492 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:495 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:498 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:501 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:504 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:507 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xff, 0x7fff, 0x0, 0x0, 0x1, 0x2, 0xfffe, 0xffff]), + i16x8([0xff, 0x7fff, 0x0, 0x0, 0x1, 0x2, 0xfffe, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:512 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x0, 0xc300, 0x0, 0xc2fe, 0x0, 0xbf80, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:515 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x0, 0x3f80, 0x0, 0x42fe, 0x0, 0x4300, 0x0, 0x437f]), + f32x4([1, 127, 128, 255]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:520 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:523 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:526 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x1, 0x203, 0x409, 0x1011, 0x120a, 0xb1a, 0x1baa, 0xabff]), + i16x8([0xffab, 0xaa1b, 0x1a0b, 0xa12, 0x1110, 0x904, 0x302, 0x100]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:529 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x8081, 0x8283, 0xfdfe, 0xff00, 0x1, 0x27f, 0x80fd, 0xfeff]), + i16x8([0xfeff, 0x80fd, 0x27f, 0x1, 0xff00, 0xfdfe, 0x8283, 0x8081]), + ]), + [i16x8([0xffff, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:532 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x80, 0x81, 0x82, 0x83, 0x0, 0xff, 0x7ffe, 0x7fff]), + i16x8([0x7fff, 0x7ffe, 0xff, 0x0, 0x83, 0x82, 0x81, 0x1c]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0x0, 0xffff, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:537 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:540 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:543 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:546 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:549 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:552 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:555 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:560 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:563 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:566 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:569 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:572 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:575 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [i16x8([0x0, 0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:578 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:581 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:584 +assert_return( + () => invoke($0, `lt_u`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:593 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:596 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:599 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:602 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:605 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:608 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:611 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:616 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:619 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:622 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:625 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:628 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:633 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:636 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:639 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:642 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:645 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:648 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:651 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:656 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x0, 0xc300, 0x0, 0xc2fe, 0x0, 0xbf80, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:659 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x0, 0x3f80, 0x0, 0x42fe, 0x0, 0x4300, 0x0, 0x437f]), + f32x4([1, 127, 128, 255]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:664 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:667 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:670 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x1, 0x203, 0x409, 0x1011, 0x120a, 0xb1a, 0x1baa, 0xabff]), + i16x8([0xffab, 0xaa1b, 0x1a0b, 0xa12, 0x1110, 0x904, 0x302, 0x100]), + ]), + [i16x8([0x0, 0x0, 0xffff, 0x0, 0x0, 0x0, 0x0, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:673 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007]), + i16x8([0x8007, 0x8006, 0x8005, 0x8004, 0x8003, 0x8002, 0x8001, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:676 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x8000, 0x8001, 0xfffe, 0xffff, 0x0, 0xffff, 0x8001, 0x8000]), + i16x8([0x8000, 0x8001, 0xffff, 0x0, 0xffff, 0xfffe, 0x8001, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:681 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:684 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:687 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:690 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:693 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:696 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:699 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:704 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:707 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:710 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:713 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:716 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:719 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0xffff, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:722 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:725 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:728 +assert_return( + () => invoke($0, `le_s`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:737 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:740 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:743 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:746 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:749 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:752 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:755 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:760 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:763 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:766 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:769 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:772 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:777 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:780 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:783 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:786 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:789 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:792 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:795 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:800 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x0, 0xc300, 0x0, 0xc2fe, 0x0, 0xbf80, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:803 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x0, 0x3f80, 0x0, 0x42fe, 0x0, 0x4300, 0x0, 0x437f]), + f32x4([1, 127, 128, 255]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:808 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:811 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:814 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x1, 0x203, 0x409, 0x1011, 0x120a, 0xb1a, 0x1baa, 0xabff]), + i16x8([0xffab, 0xaa1b, 0x1a0b, 0xa12, 0x1110, 0x904, 0x302, 0x100]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:817 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007]), + i16x8([0x8007, 0x8006, 0x8005, 0x8004, 0x8003, 0x8002, 0x8001, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:820 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x8000, 0x8001, 0xfffe, 0xffff, 0x0, 0xffff, 0x8001, 0x8000]), + i16x8([0x8000, 0x8001, 0xffff, 0x0, 0xffff, 0xfffe, 0x8001, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0x0, 0xffff, 0x0, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:825 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:828 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:831 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:834 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:837 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:840 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:843 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:848 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:851 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:854 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:857 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:860 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:863 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0xffff, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:866 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:869 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:872 +assert_return( + () => invoke($0, `le_u`, [ + i16x8([0xedcb, 0xedcb, 0xedcb, 0xedcb, 0xedcb, 0xedcb, 0xedcb, 0xedcb]), + i16x8([0xedcc, 0xedcc, 0xedcc, 0xedcc, 0xedcc, 0xedcc, 0xedcc, 0xedcc]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:881 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:884 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:887 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:890 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:893 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:896 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:899 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:904 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:907 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:910 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:913 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:916 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:921 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:924 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:927 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:930 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:933 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:936 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:939 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:944 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x0, 0xc300, 0x0, 0xc2fe, 0x0, 0xbf80, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:947 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x0, 0x3f80, 0x0, 0x42fe, 0x0, 0x4300, 0x0, 0x437f]), + f32x4([1, 127, 128, 255]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:952 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:955 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:958 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x1, 0x203, 0x409, 0x1011, 0x120a, 0xb1a, 0x1baa, 0xabff]), + i16x8([0xffab, 0xaa1b, 0x1a0b, 0xa12, 0x1110, 0x904, 0x302, 0x100]), + ]), + [i16x8([0xffff, 0xffff, 0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:961 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007]), + i16x8([0x8007, 0x8006, 0x8005, 0x8004, 0x8003, 0x8002, 0x8001, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:964 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x8000, 0x8001, 0xfffe, 0xffff, 0x0, 0xffff, 0x8001, 0x8000]), + i16x8([0x8000, 0x8001, 0xffff, 0x0, 0xffff, 0xfffe, 0x8001, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:969 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:972 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:975 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:978 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:981 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:984 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:987 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:992 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:995 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:998 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1001 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1004 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1007 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x8000, 0x8000]), + i32x4([0xffff, 0x0, 0x1, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1010 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1013 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1016 +assert_return( + () => invoke($0, `gt_s`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1025 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1028 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1031 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1034 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1037 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1040 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1043 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1048 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1051 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1054 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1057 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1060 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1065 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1068 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1071 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1074 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1077 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1080 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1083 +assert_return( + () => invoke($0, `eq`, [ + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1088 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x0, 0xc300, 0x0, 0xc2fe, 0x0, 0xbf80, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1091 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x0, 0x3f80, 0x0, 0x42fe, 0x0, 0x4300, 0x0, 0x437f]), + f32x4([1, 127, 128, 255]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1096 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1099 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1102 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x1, 0x203, 0x409, 0x1011, 0x120a, 0xb1a, 0x1baa, 0xabff]), + i16x8([0xffab, 0xaa1b, 0x1a0b, 0xa12, 0x1110, 0x904, 0x302, 0x100]), + ]), + [i16x8([0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1105 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007]), + i16x8([0x8007, 0x8006, 0x8005, 0x8004, 0x8003, 0x8002, 0x8001, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1108 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x8000, 0x8001, 0xfffe, 0xffff, 0x0, 0xffff, 0x8001, 0x8000]), + i16x8([0x8000, 0x8001, 0xffff, 0x0, 0xffff, 0xfffe, 0x8001, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0xffff, 0x0, 0xffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1113 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1116 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1119 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1122 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1125 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1128 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1131 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1136 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1139 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1142 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1145 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1148 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1151 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0xffff, 0x0, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1154 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1157 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1160 +assert_return( + () => invoke($0, `gt_u`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1169 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1172 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1175 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1178 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1181 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1184 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1187 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1192 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1195 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1198 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1201 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1204 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1209 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1212 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1215 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1218 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1221 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1224 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1227 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1232 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x0, 0xc300, 0x0, 0xc2fe, 0x0, 0xbf80, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1235 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x0, 0x3f80, 0x0, 0x42fe, 0x0, 0x4300, 0x0, 0x437f]), + f32x4([1, 127, 128, 255]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1240 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1243 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1246 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x1, 0x203, 0x409, 0x1011, 0x120a, 0xb1a, 0x1baa, 0xabff]), + i16x8([0xffab, 0xaa1b, 0x1a0b, 0xa12, 0x1110, 0x904, 0x302, 0x100]), + ]), + [i16x8([0xffff, 0xffff, 0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1249 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007]), + i16x8([0x8007, 0x8006, 0x8005, 0x8004, 0x8003, 0x8002, 0x8001, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1252 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x8000, 0x8001, 0xfffe, 0xffff, 0x0, 0xffff, 0x8001, 0x8000]), + i16x8([0x8000, 0x8001, 0xffff, 0x0, 0xffff, 0xfffe, 0x8001, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1257 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1260 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1263 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1266 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1269 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1272 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1275 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1280 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1283 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1286 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1289 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1292 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1295 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x8000, 0x8000]), + i32x4([0xffff, 0x0, 0x1, 0x8000]), + ]), + [i16x8([0xffff, 0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1298 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1301 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1304 +assert_return( + () => invoke($0, `ge_s`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1313 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1316 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1319 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1322 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1325 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1328 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1331 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + i16x8([0x100, 0x302, 0x904, 0x1110, 0xa12, 0x1a0b, 0xaa1b, 0xffab]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1336 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1339 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1342 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1345 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1348 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1353 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1356 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1359 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1362 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1365 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1368 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1371 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + i16x8([0x8000, 0xfffe, 0xffff, 0x0, 0x0, 0x1, 0x2, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1376 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x0, 0xc300, 0x0, 0xc2fe, 0x0, 0xbf80, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1379 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x0, 0x3f80, 0x0, 0x42fe, 0x0, 0x4300, 0x0, 0x437f]), + f32x4([1, 127, 128, 255]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1384 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f, 0xf0f]), + i16x8([0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0, 0xf0f0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1387 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1390 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x1, 0x203, 0x409, 0x1011, 0x120a, 0xb1a, 0x1baa, 0xabff]), + i16x8([0xffab, 0xaa1b, 0x1a0b, 0xa12, 0x1110, 0x904, 0x302, 0x100]), + ]), + [i16x8([0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1393 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007]), + i16x8([0x8007, 0x8006, 0x8005, 0x8004, 0x8003, 0x8002, 0x8001, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1396 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x8000, 0x8001, 0xfffe, 0xffff, 0x0, 0xffff, 0x8001, 0x8000]), + i16x8([0x8000, 0x8001, 0xffff, 0x0, 0xffff, 0xfffe, 0x8001, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0x0, 0xffff, 0x0, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1401 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1404 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1407 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1410 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1413 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1416 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1419 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1424 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1427 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1430 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1433 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1436 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1439 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x8000, 0x8000]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1442 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1445 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1448 +assert_return( + () => invoke($0, `ge_u`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1455 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.eq (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1456 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.ge_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1457 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.ge_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1458 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.gt_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1459 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.gt_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1460 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.le_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1461 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.le_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1462 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.lt_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1463 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.lt_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1464 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.ne (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1469 +let $1 = instantiate(`(module (memory 1) + (func (export "eq-in-block") + (block + (drop + (block (result v128) + (i16x8.eq + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "ne-in-block") + (block + (drop + (block (result v128) + (i16x8.ne + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "lt_s-in-block") + (block + (drop + (block (result v128) + (i16x8.lt_s + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "le_u-in-block") + (block + (drop + (block (result v128) + (i16x8.le_u + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "gt_u-in-block") + (block + (drop + (block (result v128) + (i16x8.gt_u + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "ge_s-in-block") + (block + (drop + (block (result v128) + (i16x8.ge_s + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "nested-eq") + (drop + (i16x8.eq + (i16x8.eq + (i16x8.eq + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.eq + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i16x8.eq + (i16x8.eq + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.eq + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-ne") + (drop + (i16x8.ne + (i16x8.ne + (i16x8.ne + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.ne + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i16x8.ne + (i16x8.ne + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.ne + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-lt_s") + (drop + (i16x8.lt_s + (i16x8.lt_s + (i16x8.lt_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.lt_s + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i16x8.lt_s + (i16x8.lt_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.lt_s + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-le_u") + (drop + (i16x8.le_u + (i16x8.le_u + (i16x8.le_u + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.le_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i16x8.le_u + (i16x8.le_u + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.le_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-gt_u") + (drop + (i16x8.gt_u + (i16x8.gt_u + (i16x8.gt_u + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.gt_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i16x8.gt_u + (i16x8.gt_u + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.gt_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-ge_s") + (drop + (i16x8.ge_s + (i16x8.ge_s + (i16x8.ge_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.ge_s + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i16x8.ge_s + (i16x8.ge_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.ge_s + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "as-param") + (drop + (i16x8.ge_u + (i16x8.eq + (i16x8.lt_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.le_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i16x8.ne + (i16x8.gt_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i16x8.lt_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) +)`); + +// ./test/core/simd/simd_i16x8_cmp.wast:1725 +assert_return(() => invoke($1, `eq-in-block`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1726 +assert_return(() => invoke($1, `ne-in-block`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1727 +assert_return(() => invoke($1, `lt_s-in-block`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1728 +assert_return(() => invoke($1, `le_u-in-block`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1729 +assert_return(() => invoke($1, `gt_u-in-block`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1730 +assert_return(() => invoke($1, `ge_s-in-block`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1731 +assert_return(() => invoke($1, `nested-eq`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1732 +assert_return(() => invoke($1, `nested-ne`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1733 +assert_return(() => invoke($1, `nested-lt_s`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1734 +assert_return(() => invoke($1, `nested-le_u`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1735 +assert_return(() => invoke($1, `nested-gt_u`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1736 +assert_return(() => invoke($1, `nested-ge_s`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1737 +assert_return(() => invoke($1, `as-param`, []), []); + +// ./test/core/simd/simd_i16x8_cmp.wast:1742 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.eq-1st-arg-empty (result v128) + (i16x8.eq (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1750 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.eq-arg-empty (result v128) + (i16x8.eq) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1758 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.ne-1st-arg-empty (result v128) + (i16x8.ne (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1766 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.ne-arg-empty (result v128) + (i16x8.ne) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1774 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.lt_s-1st-arg-empty (result v128) + (i16x8.lt_s (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1782 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.lt_s-arg-empty (result v128) + (i16x8.lt_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1790 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.lt_u-1st-arg-empty (result v128) + (i16x8.lt_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1798 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.lt_u-arg-empty (result v128) + (i16x8.lt_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1806 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.le_s-1st-arg-empty (result v128) + (i16x8.le_s (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1814 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.le_s-arg-empty (result v128) + (i16x8.le_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1822 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.le_u-1st-arg-empty (result v128) + (i16x8.le_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1830 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.le_u-arg-empty (result v128) + (i16x8.le_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1838 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.gt_s-1st-arg-empty (result v128) + (i16x8.gt_s (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1846 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.gt_s-arg-empty (result v128) + (i16x8.gt_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1854 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.gt_u-1st-arg-empty (result v128) + (i16x8.gt_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1862 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.gt_u-arg-empty (result v128) + (i16x8.gt_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1870 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.ge_s-1st-arg-empty (result v128) + (i16x8.ge_s (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1878 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.ge_s-arg-empty (result v128) + (i16x8.ge_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1886 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.ge_u-1st-arg-empty (result v128) + (i16x8.ge_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_cmp.wast:1894 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.ge_u-arg-empty (result v128) + (i16x8.ge_u) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_extadd_pairwise_i8x16.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_extadd_pairwise_i8x16.wast.js new file mode 100644 index 0000000000..5a594d4ce4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_extadd_pairwise_i8x16.wast.js @@ -0,0 +1,184 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:4 +let $0 = instantiate(`(module + (func (export "i16x8.extadd_pairwise_i8x16_s") (param v128) (result v128) (i16x8.extadd_pairwise_i8x16_s (local.get 0))) + (func (export "i16x8.extadd_pairwise_i8x16_u") (param v128) (result v128) (i16x8.extadd_pairwise_i8x16_u (local.get 0))) +)`); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:11 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:13 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:15 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:17 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_s`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ]), + [i16x8([0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:19 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_s`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [i16x8([0xff02, 0xff02, 0xff02, 0xff02, 0xff02, 0xff02, 0xff02, 0xff02])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:21 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:23 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:25 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:29 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:31 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:33 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x1fe, 0x1fe, 0x1fe, 0x1fe, 0x1fe, 0x1fe, 0x1fe, 0x1fe])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:35 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_u`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ]), + [i16x8([0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:37 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_u`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [i16x8([0x102, 0x102, 0x102, 0x102, 0x102, 0x102, 0x102, 0x102])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:39 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:41 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:43 +assert_return( + () => invoke($0, `i16x8.extadd_pairwise_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x1fe, 0x1fe, 0x1fe, 0x1fe, 0x1fe, 0x1fe, 0x1fe, 0x1fe])], +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:47 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.extadd_pairwise_i8x16_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:48 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.extadd_pairwise_i8x16_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:52 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extadd_pairwise_i8x16_s-arg-empty (result v128) + (i16x8.extadd_pairwise_i8x16_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extadd_pairwise_i8x16.wast:60 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extadd_pairwise_i8x16_u-arg-empty (result v128) + (i16x8.extadd_pairwise_i8x16_u) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_extmul_i8x16.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_extmul_i8x16.wast.js new file mode 100644 index 0000000000..4e102de588 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_extmul_i8x16.wast.js @@ -0,0 +1,1066 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:4 +let $0 = instantiate(`(module + (func (export "i16x8.extmul_low_i8x16_s") (param v128 v128) (result v128) (i16x8.extmul_low_i8x16_s (local.get 0) (local.get 1))) + (func (export "i16x8.extmul_high_i8x16_s") (param v128 v128) (result v128) (i16x8.extmul_high_i8x16_s (local.get 0) (local.get 1))) + (func (export "i16x8.extmul_low_i8x16_u") (param v128 v128) (result v128) (i16x8.extmul_low_i8x16_u (local.get 0) (local.get 1))) + (func (export "i16x8.extmul_high_i8x16_u") (param v128 v128) (result v128) (i16x8.extmul_high_i8x16_u (local.get 0) (local.get 1))) +)`); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:13 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:16 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:19 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:22 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:25 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:28 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:31 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [i16x8([0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:34 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [i16x8([0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:37 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [i16x8([0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:40 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [i16x8([0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:43 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [i16x8([0x1040, 0x1040, 0x1040, 0x1040, 0x1040, 0x1040, 0x1040, 0x1040])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:46 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:49 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:52 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:55 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:58 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:61 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:64 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:67 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:70 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [i16x8([0x3f80, 0x3f80, 0x3f80, 0x3f80, 0x3f80, 0x3f80, 0x3f80, 0x3f80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:73 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:76 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:79 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:82 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:85 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:88 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:93 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:96 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:99 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:102 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:105 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:108 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:111 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [i16x8([0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:114 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [i16x8([0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:117 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [i16x8([0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:120 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [i16x8([0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:123 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [i16x8([0x1040, 0x1040, 0x1040, 0x1040, 0x1040, 0x1040, 0x1040, 0x1040])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:126 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:129 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:132 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:135 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:138 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:141 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:144 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:147 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:150 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [i16x8([0x3f80, 0x3f80, 0x3f80, 0x3f80, 0x3f80, 0x3f80, 0x3f80, 0x3f80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:153 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:156 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:159 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:162 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:165 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:168 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:173 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:176 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:179 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:182 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:185 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:188 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:191 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [i16x8([0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:194 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [i16x8([0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:197 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [i16x8([0x90c0, 0x90c0, 0x90c0, 0x90c0, 0x90c0, 0x90c0, 0x90c0, 0x90c0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:200 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [i16x8([0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:203 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [i16x8([0x8f40, 0x8f40, 0x8f40, 0x8f40, 0x8f40, 0x8f40, 0x8f40, 0x8f40])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:206 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:209 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:212 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:215 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x817e, 0x817e, 0x817e, 0x817e, 0x817e, 0x817e, 0x817e, 0x817e])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:218 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x807f, 0x807f, 0x807f, 0x807f, 0x807f, 0x807f, 0x807f, 0x807f])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:221 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:224 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:227 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:230 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [i16x8([0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4080])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:233 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:236 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:239 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:242 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7e81, 0x7e81, 0x7e81, 0x7e81, 0x7e81, 0x7e81, 0x7e81, 0x7e81])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:245 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:248 +assert_return( + () => invoke($0, `i16x8.extmul_low_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:253 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:256 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:259 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:262 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:265 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:268 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:271 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [i16x8([0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0, 0xfc0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:274 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [i16x8([0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:277 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [i16x8([0x90c0, 0x90c0, 0x90c0, 0x90c0, 0x90c0, 0x90c0, 0x90c0, 0x90c0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:280 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [i16x8([0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:283 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [i16x8([0x8f40, 0x8f40, 0x8f40, 0x8f40, 0x8f40, 0x8f40, 0x8f40, 0x8f40])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:286 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:289 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:292 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:295 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x817e, 0x817e, 0x817e, 0x817e, 0x817e, 0x817e, 0x817e, 0x817e])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:298 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x807f, 0x807f, 0x807f, 0x807f, 0x807f, 0x807f, 0x807f, 0x807f])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:301 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:304 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01, 0x3f01])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:307 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:310 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [i16x8([0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4080])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:313 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:316 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:319 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:322 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7e81, 0x7e81, 0x7e81, 0x7e81, 0x7e81, 0x7e81, 0x7e81, 0x7e81])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:325 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80, 0x7f80])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:328 +assert_return( + () => invoke($0, `i16x8.extmul_high_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01, 0xfe01])], +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:333 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.extmul_low_i8x16_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:334 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.extmul_high_i8x16_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:335 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.extmul_low_i8x16_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:336 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.extmul_high_i8x16_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:340 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extmul_low_i8x16_s-1st-arg-empty (result v128) + (i16x8.extmul_low_i8x16_s (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:348 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extmul_low_i8x16_s-arg-empty (result v128) + (i16x8.extmul_low_i8x16_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:356 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extmul_high_i8x16_s-1st-arg-empty (result v128) + (i16x8.extmul_high_i8x16_s (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:364 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extmul_high_i8x16_s-arg-empty (result v128) + (i16x8.extmul_high_i8x16_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:372 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extmul_low_i8x16_u-1st-arg-empty (result v128) + (i16x8.extmul_low_i8x16_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:380 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extmul_low_i8x16_u-arg-empty (result v128) + (i16x8.extmul_low_i8x16_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:388 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extmul_high_i8x16_u-1st-arg-empty (result v128) + (i16x8.extmul_high_i8x16_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_extmul_i8x16.wast:396 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extmul_high_i8x16_u-arg-empty (result v128) + (i16x8.extmul_high_i8x16_u) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_q15mulr_sat_s.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_q15mulr_sat_s.wast.js new file mode 100644 index 0000000000..7d02f8a85f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_q15mulr_sat_s.wast.js @@ -0,0 +1,283 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:4 +let $0 = instantiate(`(module + (func (export "i16x8.q15mulr_sat_s") (param v128 v128) (result v128) (i16x8.q15mulr_sat_s (local.get 0) (local.get 1))) +)`); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:10 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:13 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:16 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:19 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:22 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:25 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:28 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:31 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:34 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:37 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:40 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x2001, 0x2001, 0x2001, 0x2001, 0x2001, 0x2001, 0x2001, 0x2001])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:43 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:46 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:49 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:52 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:55 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:58 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:61 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:64 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:67 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:70 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:73 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:76 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:79 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:82 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:85 +assert_return( + () => invoke($0, `i16x8.q15mulr_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:90 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.q15mulr_sat_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:94 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.q15mulr_sat_s-1st-arg-empty (result v128) + (i16x8.q15mulr_sat_s (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_q15mulr_sat_s.wast:102 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.q15mulr_sat_s-arg-empty (result v128) + (i16x8.q15mulr_sat_s) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_sat_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_sat_arith.wast.js new file mode 100644 index 0000000000..999c6a2b31 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_sat_arith.wast.js @@ -0,0 +1,2150 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i16x8_sat_arith.wast + +// ./test/core/simd/simd_i16x8_sat_arith.wast:4 +let $0 = instantiate(`(module + (func (export "i16x8.add_sat_s") (param v128 v128) (result v128) (i16x8.add_sat_s (local.get 0) (local.get 1))) + (func (export "i16x8.add_sat_u") (param v128 v128) (result v128) (i16x8.add_sat_u (local.get 0) (local.get 1))) + (func (export "i16x8.sub_sat_s") (param v128 v128) (result v128) (i16x8.sub_sat_s (local.get 0) (local.get 1))) + (func (export "i16x8.sub_sat_u") (param v128 v128) (result v128) (i16x8.sub_sat_u (local.get 0) (local.get 1))) +)`); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:13 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:16 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:19 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:22 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:25 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:28 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:31 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:34 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:37 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:40 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:43 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:46 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:49 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:52 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:55 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:58 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:61 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:64 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:67 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:70 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:73 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:76 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:79 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:82 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:85 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:88 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:91 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:94 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:97 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:100 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:103 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:106 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:109 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:112 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:115 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:118 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:121 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:124 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:127 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([-0, -0, -0, -0]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:130 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i16x8([0x1, 0x7f81, 0x1, 0x7f81, 0x1, 0x7f81, 0x1, 0x7f81])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:133 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i16x8([0x1, 0xff81, 0x1, 0xff81, 0x1, 0xff81, 0x1, 0xff81])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:136 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i16x8([0x1, 0x7fc1, 0x1, 0x7fc1, 0x1, 0x7fc1, 0x1, 0x7fc1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:139 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i16x8([0x1, 0xffc1, 0x1, 0xffc1, 0x1, 0xffc1, 0x1, 0xffc1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:142 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0xffff, 0xfffe, 0xfffd, 0xfffc, 0xfffb, 0xfffa, 0xfff9]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:145 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe]), + ]), + [i16x8([0x0, 0x3, 0x6, 0x9, 0xc, 0xf, 0x12, 0x15])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:148 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0x7d7b, 0x7d7b, 0x7d7b, 0x7d7b, 0x7d7b, 0x7d7b, 0x7d7b, 0x7d7b]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:151 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5]), + ]), + [i16x8([0xe0e, 0xe0e, 0xe0e, 0xe0e, 0xe0e, 0xe0e, 0xe0e, 0xe0e])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:154 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678]), + ]), + [i16x8([0x68ac, 0x68ac, 0x68ac, 0x68ac, 0x68ac, 0x68ac, 0x68ac, 0x68ac])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:157 +assert_return( + () => invoke($0, `i16x8.add_sat_s`, [ + i16x8([0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab]), + i16x8([0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:162 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:165 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:168 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:171 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:174 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:177 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:180 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:183 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:186 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:189 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:192 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:195 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:198 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:201 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:204 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:207 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:210 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:213 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:216 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:219 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:222 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:225 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:228 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:231 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:234 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:237 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:240 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:243 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:246 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:249 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:252 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:255 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:258 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:261 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:264 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:267 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:270 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:273 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:276 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([-0, -0, -0, -0]), + ]), + [i16x8([0x8000, 0xffff, 0x8000, 0xffff, 0x8000, 0xffff, 0x8000, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:279 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i16x8([0x1, 0x7f81, 0x1, 0x7f81, 0x1, 0x7f81, 0x1, 0x7f81])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:282 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i16x8([0x1, 0xff81, 0x1, 0xff81, 0x1, 0xff81, 0x1, 0xff81])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:285 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i16x8([0x1, 0x7fc1, 0x1, 0x7fc1, 0x1, 0x7fc1, 0x1, 0x7fc1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:288 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i16x8([0x1, 0x7fc1, 0x1, 0x7fc1, 0x1, 0x7fc1, 0x1, 0x7fc1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:291 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0xffff, 0xfffe, 0xfffd, 0xfffc, 0xfffb, 0xfffa, 0xfff9]), + ]), + [i16x8([0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:294 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe]), + ]), + [i16x8([0x0, 0x3, 0x6, 0x9, 0xc, 0xf, 0x12, 0x15])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:297 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:300 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:303 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678]), + ]), + [i16x8([0x68ac, 0x68ac, 0x68ac, 0x68ac, 0x68ac, 0x68ac, 0x68ac, 0x68ac])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:306 +assert_return( + () => invoke($0, `i16x8.add_sat_u`, [ + i16x8([0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab]), + i16x8([0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:311 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:314 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:317 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:320 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:323 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:326 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:329 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:332 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:335 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:338 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:341 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:344 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:347 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:350 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:353 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:356 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:359 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:362 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:365 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:368 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:371 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:374 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:377 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:380 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:383 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:386 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:389 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:392 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:395 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:398 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:401 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:404 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:407 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:410 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:413 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:416 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:419 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:422 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:425 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([-0, -0, -0, -0]), + ]), + [i16x8([0x8000, 0x0, 0x8000, 0x0, 0x8000, 0x0, 0x8000, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:428 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i16x8([0x1, 0x8081, 0x1, 0x8081, 0x1, 0x8081, 0x1, 0x8081])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:431 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i16x8([0x1, 0x81, 0x1, 0x81, 0x1, 0x81, 0x1, 0x81])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:434 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i16x8([0x1, 0x8041, 0x1, 0x8041, 0x1, 0x8041, 0x1, 0x8041])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:437 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i16x8([0x1, 0x41, 0x1, 0x41, 0x1, 0x41, 0x1, 0x41])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:440 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0xffff, 0xfffe, 0xfffd, 0xfffc, 0xfffb, 0xfffa, 0xfff9]), + ]), + [i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:443 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe]), + ]), + [i16x8([0x0, 0xffff, 0xfffe, 0xfffd, 0xfffc, 0xfffb, 0xfffa, 0xfff9])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:446 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5]), + ]), + [i16x8([0x5264, 0x5264, 0x5264, 0x5264, 0x5264, 0x5264, 0x5264, 0x5264])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:449 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7]), + ]), + [i16x8([0x6072, 0x6072, 0x6072, 0x6072, 0x6072, 0x6072, 0x6072, 0x6072])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:452 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678, 0x5678]), + ]), + [i16x8([0xbbbc, 0xbbbc, 0xbbbc, 0xbbbc, 0xbbbc, 0xbbbc, 0xbbbc, 0xbbbc])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:455 +assert_return( + () => invoke($0, `i16x8.sub_sat_s`, [ + i16x8([0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab]), + i16x8([0xedcc, 0xedcc, 0xedcc, 0xedcc, 0xedcc, 0xedcc, 0xedcc, 0xedcc]), + ]), + [i16x8([0xa2df, 0xa2df, 0xa2df, 0xa2df, 0xa2df, 0xa2df, 0xa2df, 0xa2df])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:460 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:463 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:466 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:469 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:472 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:475 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:478 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:481 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:484 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:487 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:490 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:493 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc, 0x7ffc])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:496 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:499 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:502 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:505 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:508 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:511 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:514 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:517 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:520 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:523 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:526 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:529 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:532 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:535 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:538 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:541 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:544 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:547 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:550 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:553 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:556 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:559 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:562 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:565 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:568 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:571 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:574 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([-0, -0, -0, -0]), + ]), + [i16x8([0x8000, 0x0, 0x8000, 0x0, 0x8000, 0x0, 0x8000, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:577 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i16x8([0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:580 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i16x8([0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:583 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i16x8([0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:586 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i16x8([0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:589 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0xffff, 0xfffe, 0xfffd, 0xfffc, 0xfffb, 0xfffa, 0xfff9]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:592 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7]), + i16x8([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:595 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039]), + i16x8([0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:598 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5, 0xddd5]), + i16x8([0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7, 0xcfc7]), + ]), + [i16x8([0xe0e, 0xe0e, 0xe0e, 0xe0e, 0xe0e, 0xe0e, 0xe0e, 0xe0e])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:601 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234]), + i16x8([0xa988, 0xa988, 0xa988, 0xa988, 0xa988, 0xa988, 0xa988, 0xa988]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:604 +assert_return( + () => invoke($0, `i16x8.sub_sat_u`, [ + i16x8([0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef, 0xcdef]), + i16x8([0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab, 0x90ab]), + ]), + [i16x8([0x3d44, 0x3d44, 0x3d44, 0x3d44, 0x3d44, 0x3d44, 0x3d44, 0x3d44])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:609 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.add_sat (v128.const i16x8 1 1 1 1 1 1 1 1) (v128.const i16x8 2 2 2 2 2 2 2 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:612 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.sub_sat (v128.const i16x8 1 1 1 1 1 1 1 1) (v128.const i16x8 2 2 2 2 2 2 2 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:615 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.mul_sat (v128.const i16x8 1 1 1 1 1 1 1 1) (v128.const i16x8 2 2 2 2 2 2 2 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:618 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.div_sat (v128.const i16x8 1 1 1 1 1 1 1 1) (v128.const i16x8 2 2 2 2 2 2 2 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:623 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.add_sat_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:624 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.add_sat_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:625 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.sub_sat_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:626 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.sub_sat_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:630 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.add_sat_s-1st-arg-empty (result v128) + (i16x8.add_sat_s (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:638 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.add_sat_s-arg-empty (result v128) + (i16x8.add_sat_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:646 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.add_sat_u-1st-arg-empty (result v128) + (i16x8.add_sat_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:654 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.add_sat_u-arg-empty (result v128) + (i16x8.add_sat_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:662 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.sub_sat_s-1st-arg-empty (result v128) + (i16x8.sub_sat_s (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:670 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.sub_sat_s-arg-empty (result v128) + (i16x8.sub_sat_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:678 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.sub_sat_u-1st-arg-empty (result v128) + (i16x8.sub_sat_u (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:686 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.sub_sat_u-arg-empty (result v128) + (i16x8.sub_sat_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:696 +let $1 = instantiate(`(module + (func (export "sat-add_s-sub_s") (param v128 v128 v128) (result v128) + (i16x8.add_sat_s (i16x8.sub_sat_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "sat-add_s-sub_u") (param v128 v128 v128) (result v128) + (i16x8.add_sat_s (i16x8.sub_sat_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "sat-add_u-sub_s") (param v128 v128 v128) (result v128) + (i16x8.add_sat_u (i16x8.sub_sat_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "sat-add_u-sub_u") (param v128 v128 v128) (result v128) + (i16x8.add_sat_u (i16x8.sub_sat_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "sat-add_s-neg") (param v128 v128) (result v128) + (i16x8.add_sat_s (i16x8.neg (local.get 0)) (local.get 1))) + (func (export "sat-add_u-neg") (param v128 v128) (result v128) + (i16x8.add_sat_u (i16x8.neg (local.get 0)) (local.get 1))) + (func (export "sat-sub_s-neg") (param v128 v128) (result v128) + (i16x8.sub_sat_s (i16x8.neg (local.get 0)) (local.get 1))) + (func (export "sat-sub_u-neg") (param v128 v128) (result v128) + (i16x8.sub_sat_u (i16x8.neg (local.get 0)) (local.get 1))) +)`); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:715 +assert_return( + () => invoke($1, `sat-add_s-sub_s`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:719 +assert_return( + () => invoke($1, `sat-add_s-sub_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:723 +assert_return( + () => invoke($1, `sat-add_u-sub_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:727 +assert_return( + () => invoke($1, `sat-add_u-sub_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:731 +assert_return( + () => invoke($1, `sat-add_s-neg`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:734 +assert_return( + () => invoke($1, `sat-add_u-neg`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:737 +assert_return( + () => invoke($1, `sat-sub_s-neg`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i16x8_sat_arith.wast:740 +assert_return( + () => invoke($1, `sat-sub_u-neg`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_arith.wast.js new file mode 100644 index 0000000000..42976320d0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_arith.wast.js @@ -0,0 +1,1801 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i32x4_arith.wast + +// ./test/core/simd/simd_i32x4_arith.wast:4 +let $0 = instantiate(`(module + (func (export "i32x4.add") (param v128 v128) (result v128) (i32x4.add (local.get 0) (local.get 1))) + (func (export "i32x4.sub") (param v128 v128) (result v128) (i32x4.sub (local.get 0) (local.get 1))) + (func (export "i32x4.mul") (param v128 v128) (result v128) (i32x4.mul (local.get 0) (local.get 1))) + (func (export "i32x4.neg") (param v128) (result v128) (i32x4.neg (local.get 0))) +)`); + +// ./test/core/simd/simd_i32x4_arith.wast:13 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:16 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:19 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:22 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:25 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:28 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:31 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:34 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:37 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xc0000001, 0xc0000001, 0xc0000001, 0xc0000001]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:40 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:43 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xbfffffff, 0xbfffffff, 0xbfffffff, 0xbfffffff]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:46 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x7ffffffd, 0x7ffffffd, 0x7ffffffd, 0x7ffffffd]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:49 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:52 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:55 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x80000002, 0x80000002, 0x80000002, 0x80000002]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:58 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:61 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:64 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:67 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:70 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:73 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:76 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:79 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:82 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:85 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:88 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:91 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:94 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:97 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xc0000001, 0xc0000001, 0xc0000001, 0xc0000001]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:100 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:103 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xbfffffff, 0xbfffffff, 0xbfffffff, 0xbfffffff]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:106 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:109 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:112 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:115 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:118 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:121 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:124 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:127 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i8x16([0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x80]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:130 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:133 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i16x8([0x0, 0x8000, 0x0, 0x8000, 0x0, 0x8000, 0x0, 0x8000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:136 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:139 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:142 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:145 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0xbf800000, 0xbf800000, 0xbf800000, 0xbf800000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:148 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:151 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x7f800001, 0x7f800001, 0x7f800001, 0x7f800001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:154 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xff800001, 0xff800001, 0xff800001, 0xff800001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:157 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x7fc00001, 0x7fc00001, 0x7fc00001, 0x7fc00001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:160 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x0, 0xffffffff, 0xfffffffe, 0xfffffffd]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:163 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x0, 0x2, 0x4, 0x6]), + ]), + [i32x4([0x0, 0x3, 0x6, 0x9])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:166 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + ]), + [i32x4([0x932c05a4, 0x932c05a4, 0x932c05a4, 0x932c05a4])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:169 +assert_return( + () => invoke($0, `i32x4.add`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + ]), + [i32x4([0xa2e02467, 0xa2e02467, 0xa2e02467, 0xa2e02467])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:174 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:177 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:180 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:183 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:186 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:189 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:192 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:195 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:198 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xc0000001, 0xc0000001, 0xc0000001, 0xc0000001]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:201 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:204 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xbfffffff, 0xbfffffff, 0xbfffffff, 0xbfffffff]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:207 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x7ffffffd, 0x7ffffffd, 0x7ffffffd, 0x7ffffffd]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffffffc, 0x7ffffffc, 0x7ffffffc, 0x7ffffffc])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:210 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffffffd, 0x7ffffffd, 0x7ffffffd, 0x7ffffffd])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:213 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:216 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x80000002, 0x80000002, 0x80000002, 0x80000002]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x80000003, 0x80000003, 0x80000003, 0x80000003])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:219 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x80000002, 0x80000002, 0x80000002, 0x80000002])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:222 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:225 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:228 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:231 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:234 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:237 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:240 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:243 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:246 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:249 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:252 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:255 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:258 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xc0000001, 0xc0000001, 0xc0000001, 0xc0000001]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:261 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:264 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xbfffffff, 0xbfffffff, 0xbfffffff, 0xbfffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:267 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:270 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:273 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:276 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:279 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:282 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:285 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:288 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i8x16([0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x80]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:291 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:294 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i16x8([0x0, 0x8000, 0x0, 0x8000, 0x0, 0x8000, 0x0, 0x8000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:297 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:300 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:303 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:306 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x40800000, 0x40800000, 0x40800000, 0x40800000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:309 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0xc0800000, 0xc0800000, 0xc0800000, 0xc0800000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:312 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x80800001, 0x80800001, 0x80800001, 0x80800001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:315 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x800001, 0x800001, 0x800001, 0x800001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:318 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x80400001, 0x80400001, 0x80400001, 0x80400001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:321 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x0, 0xffffffff, 0xfffffffe, 0xfffffffd]), + ]), + [i32x4([0x0, 0x2, 0x4, 0x6])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:324 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x0, 0x2, 0x4, 0x6]), + ]), + [i32x4([0x0, 0xffffffff, 0xfffffffe, 0xfffffffd])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:327 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0xbf9a69d2, 0xbf9a69d2, 0xbf9a69d2, 0xbf9a69d2]), + i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2]), + ]), + [i32x4([0x76046700, 0x76046700, 0x76046700, 0x76046700])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:330 +assert_return( + () => invoke($0, `i32x4.sub`, [ + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + ]), + [i32x4([0x7e777777, 0x7e777777, 0x7e777777, 0x7e777777])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:335 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:338 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:341 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:344 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:347 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:350 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:353 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:356 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:359 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xc0000001, 0xc0000001, 0xc0000001, 0xc0000001]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:362 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:365 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xbfffffff, 0xbfffffff, 0xbfffffff, 0xbfffffff]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:368 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x7ffffffd, 0x7ffffffd, 0x7ffffffd, 0x7ffffffd]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffffffd, 0x7ffffffd, 0x7ffffffd, 0x7ffffffd])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:371 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:374 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:377 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x80000002, 0x80000002, 0x80000002, 0x80000002]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:380 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:383 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:386 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:389 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:392 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:395 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:398 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:401 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:404 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:407 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:410 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:413 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:416 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:419 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xc0000001, 0xc0000001, 0xc0000001, 0xc0000001]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:422 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:425 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xbfffffff, 0xbfffffff, 0xbfffffff, 0xbfffffff]), + ]), + [i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:428 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:431 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:434 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:437 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:440 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:443 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:446 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:449 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x10000000, 0x10000000, 0x10000000, 0x10000000]), + i8x16([0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:452 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:455 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i16x8([0x0, 0x2, 0x0, 0x2, 0x0, 0x2, 0x0, 0x2]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:458 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:461 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([0, 0, 0, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:464 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([-0, -0, -0, -0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:467 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([1, 1, 1, 1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:470 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x8000, 0x8000, 0x8000, 0x8000]), + f32x4([-1, -1, -1, -1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:473 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x7f800000, 0x7f800000, 0x7f800000, 0x7f800000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:476 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0xff800000, 0xff800000, 0xff800000, 0xff800000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:479 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x7fc00000, 0x7fc00000, 0x7fc00000, 0x7fc00000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:482 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x0, 0xffffffff, 0xfffffffe, 0xfffffffd]), + ]), + [i32x4([0x0, 0xffffffff, 0xfffffffc, 0xfffffff7])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:485 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x0, 0x2, 0x4, 0x6]), + ]), + [i32x4([0x0, 0x2, 0x8, 0x12])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:488 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x3ade68b1, 0x3ade68b1, 0x3ade68b1, 0x3ade68b1]), + ]), + [i32x4([0xfbff5385, 0xfbff5385, 0xfbff5385, 0xfbff5385])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:491 +assert_return( + () => invoke($0, `i32x4.mul`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + ]), + [i32x4([0x2a42d208, 0x2a42d208, 0x2a42d208, 0x2a42d208])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:496 +assert_return( + () => invoke($0, `i32x4.neg`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:498 +assert_return( + () => invoke($0, `i32x4.neg`, [i32x4([0x1, 0x1, 0x1, 0x1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:500 +assert_return( + () => invoke($0, `i32x4.neg`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:502 +assert_return( + () => invoke($0, `i32x4.neg`, [ + i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe]), + ]), + [i32x4([0x80000002, 0x80000002, 0x80000002, 0x80000002])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:504 +assert_return( + () => invoke($0, `i32x4.neg`, [ + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:506 +assert_return( + () => invoke($0, `i32x4.neg`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:508 +assert_return( + () => invoke($0, `i32x4.neg`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:510 +assert_return( + () => invoke($0, `i32x4.neg`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:512 +assert_return( + () => invoke($0, `i32x4.neg`, [i32x4([0x1, 0x1, 0x1, 0x1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:514 +assert_return( + () => invoke($0, `i32x4.neg`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:516 +assert_return( + () => invoke($0, `i32x4.neg`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:518 +assert_return( + () => invoke($0, `i32x4.neg`, [ + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:520 +assert_return( + () => invoke($0, `i32x4.neg`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:522 +assert_return( + () => invoke($0, `i32x4.neg`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:524 +assert_return( + () => invoke($0, `i32x4.neg`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:528 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.neg (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith.wast:529 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.add (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith.wast:530 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.sub (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith.wast:531 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.mul (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith.wast:535 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.neg-arg-empty (result v128) + (i32x4.neg) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith.wast:543 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.add-1st-arg-empty (result v128) + (i32x4.add (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith.wast:551 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.add-arg-empty (result v128) + (i32x4.add) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith.wast:559 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.sub-1st-arg-empty (result v128) + (i32x4.sub (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith.wast:567 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.sub-arg-empty (result v128) + (i32x4.sub) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith.wast:575 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.mul-1st-arg-empty (result v128) + (i32x4.mul (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith.wast:583 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.mul-arg-empty (result v128) + (i32x4.mul) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith.wast:593 +let $1 = instantiate(`(module + (func (export "add-sub") (param v128 v128 v128) (result v128) + (i32x4.add (i32x4.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "mul-add") (param v128 v128 v128) (result v128) + (i32x4.mul (i32x4.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "mul-sub") (param v128 v128 v128) (result v128) + (i32x4.mul (i32x4.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "sub-add") (param v128 v128 v128) (result v128) + (i32x4.sub (i32x4.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "add-neg") (param v128 v128) (result v128) + (i32x4.add (i32x4.neg (local.get 0)) (local.get 1))) + (func (export "mul-neg") (param v128 v128) (result v128) + (i32x4.mul (i32x4.neg (local.get 0)) (local.get 1))) + (func (export "sub-neg") (param v128 v128) (result v128) + (i32x4.sub (i32x4.neg (local.get 0)) (local.get 1))) +)`); + +// ./test/core/simd/simd_i32x4_arith.wast:610 +assert_return( + () => invoke($1, `add-sub`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x0, 0x2, 0x4, 0x6]), + i32x4([0x0, 0x2, 0x4, 0x6]), + ]), + [i32x4([0x0, 0x1, 0x2, 0x3])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:614 +assert_return( + () => invoke($1, `mul-add`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x0, 0x4, 0x8, 0xc])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:618 +assert_return( + () => invoke($1, `mul-sub`, [ + i32x4([0x0, 0x2, 0x4, 0x6]), + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x0, 0x1, 0x2, 0x3]), + ]), + [i32x4([0x0, 0x1, 0x4, 0x9])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:622 +assert_return( + () => invoke($1, `sub-add`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x0, 0x2, 0x4, 0x6]), + i32x4([0x0, 0x2, 0x4, 0x6]), + ]), + [i32x4([0x0, 0x1, 0x2, 0x3])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:626 +assert_return( + () => invoke($1, `add-neg`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x0, 0x1, 0x2, 0x3]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:629 +assert_return( + () => invoke($1, `mul-neg`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x0, 0xfffffffe, 0xfffffffc, 0xfffffffa])], +); + +// ./test/core/simd/simd_i32x4_arith.wast:632 +assert_return( + () => invoke($1, `sub-neg`, [ + i32x4([0x0, 0x1, 0x2, 0x3]), + i32x4([0x0, 0x1, 0x2, 0x3]), + ]), + [i32x4([0x0, 0xfffffffe, 0xfffffffc, 0xfffffffa])], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_arith2.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_arith2.wast.js new file mode 100644 index 0000000000..42d50dfefd --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_arith2.wast.js @@ -0,0 +1,1279 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i32x4_arith2.wast + +// ./test/core/simd/simd_i32x4_arith2.wast:3 +let $0 = instantiate(`(module + (func (export "i32x4.min_s") (param v128 v128) (result v128) (i32x4.min_s (local.get 0) (local.get 1))) + (func (export "i32x4.min_u") (param v128 v128) (result v128) (i32x4.min_u (local.get 0) (local.get 1))) + (func (export "i32x4.max_s") (param v128 v128) (result v128) (i32x4.max_s (local.get 0) (local.get 1))) + (func (export "i32x4.max_u") (param v128 v128) (result v128) (i32x4.max_u (local.get 0) (local.get 1))) + (func (export "i32x4.abs") (param v128) (result v128) (i32x4.abs (local.get 0))) + (func (export "i32x4.min_s_with_const_0") (result v128) (i32x4.min_s (v128.const i32x4 -2147483648 2147483647 1073741824 4294967295) (v128.const i32x4 4294967295 1073741824 2147483647 -2147483648))) + (func (export "i32x4.min_s_with_const_1") (result v128) (i32x4.min_s (v128.const i32x4 0 1 2 3) (v128.const i32x4 3 2 1 0))) + (func (export "i32x4.min_u_with_const_2") (result v128) (i32x4.min_u (v128.const i32x4 -2147483648 2147483647 1073741824 4294967295) (v128.const i32x4 4294967295 1073741824 2147483647 -2147483648))) + (func (export "i32x4.min_u_with_const_3") (result v128) (i32x4.min_u (v128.const i32x4 0 1 2 3) (v128.const i32x4 3 2 1 0))) + (func (export "i32x4.max_s_with_const_4") (result v128) (i32x4.max_s (v128.const i32x4 -2147483648 2147483647 1073741824 4294967295) (v128.const i32x4 4294967295 1073741824 2147483647 -2147483648))) + (func (export "i32x4.max_s_with_const_5") (result v128) (i32x4.max_s (v128.const i32x4 0 1 2 3) (v128.const i32x4 3 2 1 0))) + (func (export "i32x4.max_u_with_const_6") (result v128) (i32x4.max_u (v128.const i32x4 -2147483648 2147483647 1073741824 4294967295) (v128.const i32x4 4294967295 1073741824 2147483647 -2147483648))) + (func (export "i32x4.max_u_with_const_7") (result v128) (i32x4.max_u (v128.const i32x4 0 1 2 3) (v128.const i32x4 3 2 1 0))) + (func (export "i32x4.abs_with_const_8") (result v128) (i32x4.abs (v128.const i32x4 -2147483648 2147483647 1073741824 4294967295))) + (func (export "i32x4.min_s_with_const_9") (param v128) (result v128) (i32x4.min_s (local.get 0) (v128.const i32x4 -2147483648 2147483647 1073741824 4294967295))) + (func (export "i32x4.min_s_with_const_10") (param v128) (result v128) (i32x4.min_s (local.get 0) (v128.const i32x4 0 1 2 3))) + (func (export "i32x4.min_u_with_const_11") (param v128) (result v128) (i32x4.min_u (local.get 0) (v128.const i32x4 -2147483648 2147483647 1073741824 4294967295))) + (func (export "i32x4.min_u_with_const_12") (param v128) (result v128) (i32x4.min_u (local.get 0) (v128.const i32x4 0 1 2 3))) + (func (export "i32x4.max_s_with_const_13") (param v128) (result v128) (i32x4.max_s (local.get 0) (v128.const i32x4 -2147483648 2147483647 1073741824 4294967295))) + (func (export "i32x4.max_s_with_const_14") (param v128) (result v128) (i32x4.max_s (local.get 0) (v128.const i32x4 0 1 2 3))) + (func (export "i32x4.max_u_with_const_15") (param v128) (result v128) (i32x4.max_u (local.get 0) (v128.const i32x4 -2147483648 2147483647 1073741824 4294967295))) + (func (export "i32x4.max_u_with_const_16") (param v128) (result v128) (i32x4.max_u (local.get 0) (v128.const i32x4 0 1 2 3))) +)`); + +// ./test/core/simd/simd_i32x4_arith2.wast:28 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:31 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:34 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:37 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:40 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:43 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:46 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x80, 0x80, 0x80, 0x80]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:49 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:52 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:55 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x7b, 0x7b, 0x7b, 0x7b]), + i32x4([0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [i32x4([0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:58 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x80, 0x80, 0x80, 0x80]), + i32x4([0x80, 0x80, 0x80, 0x80]), + ]), + [i32x4([0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:61 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:64 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:67 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:70 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:73 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:76 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:79 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x80, 0x80, 0x80, 0x80]), + ]), + [i32x4([0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:82 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:85 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:88 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x7b, 0x7b, 0x7b, 0x7b]), + i32x4([0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [i32x4([0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:91 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x80, 0x80, 0x80, 0x80]), + i32x4([0x80, 0x80, 0x80, 0x80]), + ]), + [i32x4([0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:94 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:97 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:100 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:103 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:106 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:109 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:112 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x80, 0x80, 0x80, 0x80]), + ]), + [i32x4([0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:115 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:118 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:121 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x7b, 0x7b, 0x7b, 0x7b]), + i32x4([0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [i32x4([0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:124 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x80, 0x80, 0x80, 0x80]), + i32x4([0x80, 0x80, 0x80, 0x80]), + ]), + [i32x4([0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:127 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:130 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:133 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:136 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:139 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:142 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:145 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x80, 0x80, 0x80, 0x80]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:148 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:151 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:154 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x7b, 0x7b, 0x7b, 0x7b]), + i32x4([0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [i32x4([0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:157 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x80, 0x80, 0x80, 0x80]), + i32x4([0x80, 0x80, 0x80, 0x80]), + ]), + [i32x4([0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:160 +assert_return( + () => invoke($0, `i32x4.abs`, [i32x4([0x1, 0x1, 0x1, 0x1])]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:162 +assert_return( + () => invoke($0, `i32x4.abs`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:164 +assert_return( + () => invoke($0, `i32x4.abs`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:166 +assert_return( + () => invoke($0, `i32x4.abs`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:168 +assert_return( + () => invoke($0, `i32x4.abs`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:170 +assert_return( + () => invoke($0, `i32x4.abs`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:172 +assert_return( + () => invoke($0, `i32x4.abs`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:174 +assert_return( + () => invoke($0, `i32x4.abs`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:176 +assert_return( + () => invoke($0, `i32x4.abs`, [i32x4([0x7b, 0x7b, 0x7b, 0x7b])]), + [i32x4([0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:178 +assert_return( + () => invoke($0, `i32x4.abs`, [ + i32x4([0xffffff85, 0xffffff85, 0xffffff85, 0xffffff85]), + ]), + [i32x4([0x7b, 0x7b, 0x7b, 0x7b])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:180 +assert_return( + () => invoke($0, `i32x4.abs`, [i32x4([0x80, 0x80, 0x80, 0x80])]), + [i32x4([0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:182 +assert_return( + () => invoke($0, `i32x4.abs`, [ + i32x4([0xffffff80, 0xffffff80, 0xffffff80, 0xffffff80]), + ]), + [i32x4([0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:184 +assert_return( + () => invoke($0, `i32x4.abs`, [i32x4([0x80, 0x80, 0x80, 0x80])]), + [i32x4([0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:186 +assert_return( + () => invoke($0, `i32x4.abs`, [ + i32x4([0xffffff80, 0xffffff80, 0xffffff80, 0xffffff80]), + ]), + [i32x4([0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:190 +assert_return( + () => invoke($0, `i32x4.min_s_with_const_0`, []), + [i32x4([0x80000000, 0x40000000, 0x40000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:191 +assert_return(() => invoke($0, `i32x4.min_s_with_const_1`, []), [i32x4([0x0, 0x1, 0x1, 0x0])]); + +// ./test/core/simd/simd_i32x4_arith2.wast:192 +assert_return( + () => invoke($0, `i32x4.min_u_with_const_2`, []), + [i32x4([0x80000000, 0x40000000, 0x40000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:193 +assert_return(() => invoke($0, `i32x4.min_u_with_const_3`, []), [i32x4([0x0, 0x1, 0x1, 0x0])]); + +// ./test/core/simd/simd_i32x4_arith2.wast:194 +assert_return( + () => invoke($0, `i32x4.max_s_with_const_4`, []), + [i32x4([0xffffffff, 0x7fffffff, 0x7fffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:195 +assert_return(() => invoke($0, `i32x4.max_s_with_const_5`, []), [i32x4([0x3, 0x2, 0x2, 0x3])]); + +// ./test/core/simd/simd_i32x4_arith2.wast:196 +assert_return( + () => invoke($0, `i32x4.max_u_with_const_6`, []), + [i32x4([0xffffffff, 0x7fffffff, 0x7fffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:197 +assert_return(() => invoke($0, `i32x4.max_u_with_const_7`, []), [i32x4([0x3, 0x2, 0x2, 0x3])]); + +// ./test/core/simd/simd_i32x4_arith2.wast:198 +assert_return( + () => invoke($0, `i32x4.abs_with_const_8`, []), + [i32x4([0x80000000, 0x7fffffff, 0x40000000, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:201 +assert_return( + () => invoke($0, `i32x4.min_s_with_const_9`, [ + i32x4([0xffffffff, 0x40000000, 0x7fffffff, 0x80000000]), + ]), + [i32x4([0x80000000, 0x40000000, 0x40000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:203 +assert_return( + () => invoke($0, `i32x4.min_s_with_const_10`, [i32x4([0x3, 0x2, 0x1, 0x0])]), + [i32x4([0x0, 0x1, 0x1, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:205 +assert_return( + () => invoke($0, `i32x4.min_u_with_const_11`, [ + i32x4([0xffffffff, 0x40000000, 0x7fffffff, 0x80000000]), + ]), + [i32x4([0x80000000, 0x40000000, 0x40000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:207 +assert_return( + () => invoke($0, `i32x4.min_u_with_const_12`, [i32x4([0x3, 0x2, 0x1, 0x0])]), + [i32x4([0x0, 0x1, 0x1, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:209 +assert_return( + () => invoke($0, `i32x4.max_s_with_const_13`, [ + i32x4([0xffffffff, 0x40000000, 0x7fffffff, 0x80000000]), + ]), + [i32x4([0xffffffff, 0x7fffffff, 0x7fffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:211 +assert_return( + () => invoke($0, `i32x4.max_s_with_const_14`, [i32x4([0x3, 0x2, 0x1, 0x0])]), + [i32x4([0x3, 0x2, 0x2, 0x3])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:213 +assert_return( + () => invoke($0, `i32x4.max_u_with_const_15`, [ + i32x4([0xffffffff, 0x40000000, 0x7fffffff, 0x80000000]), + ]), + [i32x4([0xffffffff, 0x7fffffff, 0x7fffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:215 +assert_return( + () => invoke($0, `i32x4.max_u_with_const_16`, [i32x4([0x3, 0x2, 0x1, 0x0])]), + [i32x4([0x3, 0x2, 0x2, 0x3])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:219 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x80000000, 0x7fffffff, 0x40000000, 0xffffffff]), + i32x4([0xffffffff, 0x40000000, 0x7fffffff, 0x80000000]), + ]), + [i32x4([0x80000000, 0x40000000, 0x40000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:222 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x0, 0x1, 0x2, 0x80]), + i32x4([0x0, 0x2, 0x1, 0x80]), + ]), + [i32x4([0x0, 0x1, 0x1, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:225 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x80000000, 0x7fffffff, 0x40000000, 0xffffffff]), + i32x4([0xffffffff, 0x40000000, 0x7fffffff, 0x80000000]), + ]), + [i32x4([0x80000000, 0x40000000, 0x40000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:228 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x0, 0x1, 0x2, 0x80]), + i32x4([0x0, 0x2, 0x1, 0x80]), + ]), + [i32x4([0x0, 0x1, 0x1, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:231 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x80000000, 0x7fffffff, 0x40000000, 0xffffffff]), + i32x4([0xffffffff, 0x40000000, 0x7fffffff, 0x80000000]), + ]), + [i32x4([0xffffffff, 0x7fffffff, 0x7fffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:234 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x0, 0x1, 0x2, 0x80]), + i32x4([0x0, 0x2, 0x1, 0x80]), + ]), + [i32x4([0x0, 0x2, 0x2, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:237 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x80000000, 0x7fffffff, 0x40000000, 0xffffffff]), + i32x4([0xffffffff, 0x40000000, 0x7fffffff, 0x80000000]), + ]), + [i32x4([0xffffffff, 0x7fffffff, 0x7fffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:240 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x0, 0x1, 0x2, 0x80]), + i32x4([0x0, 0x2, 0x1, 0x80]), + ]), + [i32x4([0x0, 0x2, 0x2, 0x80])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:243 +assert_return( + () => invoke($0, `i32x4.abs`, [ + i32x4([0x80000000, 0x7fffffff, 0x40000000, 0xffffffff]), + ]), + [i32x4([0x80000000, 0x7fffffff, 0x40000000, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:247 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:250 +assert_return( + () => invoke($0, `i32x4.min_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:253 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:256 +assert_return( + () => invoke($0, `i32x4.min_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:259 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:262 +assert_return( + () => invoke($0, `i32x4.max_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:265 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:268 +assert_return( + () => invoke($0, `i32x4.max_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:271 +assert_return( + () => invoke($0, `i32x4.abs`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:273 +assert_return( + () => invoke($0, `i32x4.abs`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:275 +assert_return( + () => invoke($0, `i32x4.abs`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:277 +assert_return( + () => invoke($0, `i32x4.abs`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:281 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f32x4.min_s (v128.const i32x4 0 0 0 0) (v128.const i32x4 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:282 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f32x4.min_u (v128.const i32x4 0 0 0 0) (v128.const i32x4 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:283 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f32x4.max_s (v128.const i32x4 0 0 0 0) (v128.const i32x4 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:284 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f32x4.max_u (v128.const i32x4 0 0 0 0) (v128.const i32x4 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:285 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.min_s (v128.const i32x4 0 0 0 0) (v128.const i32x4 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:286 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.min_u (v128.const i32x4 0 0 0 0) (v128.const i32x4 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:287 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.max_s (v128.const i32x4 0 0 0 0) (v128.const i32x4 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:288 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.max_u (v128.const i32x4 0 0 0 0) (v128.const i32x4 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:289 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f64x2.min_s (v128.const i32x4 0 0 0 0) (v128.const i32x4 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:290 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f64x2.min_u (v128.const i32x4 0 0 0 0) (v128.const i32x4 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:291 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f64x2.max_s (v128.const i32x4 0 0 0 0) (v128.const i32x4 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:292 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f64x2.max_u (v128.const i32x4 0 0 0 0) (v128.const i32x4 1 1 1 1))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:295 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.min_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:296 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.min_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:297 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.max_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:298 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.max_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:299 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.abs (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:303 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.min_s-1st-arg-empty (result v128) + (i32x4.min_s (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:311 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.min_s-arg-empty (result v128) + (i32x4.min_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:319 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.min_u-1st-arg-empty (result v128) + (i32x4.min_u (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:327 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.min_u-arg-empty (result v128) + (i32x4.min_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:335 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.max_s-1st-arg-empty (result v128) + (i32x4.max_s (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:343 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.max_s-arg-empty (result v128) + (i32x4.max_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:351 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.max_u-1st-arg-empty (result v128) + (i32x4.max_u (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:359 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.max_u-arg-empty (result v128) + (i32x4.max_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:367 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.abs-arg-empty (result v128) + (i32x4.abs) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_arith2.wast:377 +let $1 = instantiate(`(module + (func (export "i32x4.min_s-i32x4.max_u") (param v128 v128 v128) (result v128) (i32x4.min_s (i32x4.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.min_s-i32x4.max_s") (param v128 v128 v128) (result v128) (i32x4.min_s (i32x4.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.min_s-i32x4.min_u") (param v128 v128 v128) (result v128) (i32x4.min_s (i32x4.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.min_s-i32x4.min_s") (param v128 v128 v128) (result v128) (i32x4.min_s (i32x4.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.min_s-i32x4.abs") (param v128 v128) (result v128) (i32x4.min_s (i32x4.abs (local.get 0))(local.get 1))) + (func (export "i32x4.abs-i32x4.min_s") (param v128 v128) (result v128) (i32x4.abs (i32x4.min_s (local.get 0) (local.get 1)))) + (func (export "i32x4.min_u-i32x4.max_u") (param v128 v128 v128) (result v128) (i32x4.min_u (i32x4.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.min_u-i32x4.max_s") (param v128 v128 v128) (result v128) (i32x4.min_u (i32x4.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.min_u-i32x4.min_u") (param v128 v128 v128) (result v128) (i32x4.min_u (i32x4.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.min_u-i32x4.min_s") (param v128 v128 v128) (result v128) (i32x4.min_u (i32x4.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.min_u-i32x4.abs") (param v128 v128) (result v128) (i32x4.min_u (i32x4.abs (local.get 0))(local.get 1))) + (func (export "i32x4.abs-i32x4.min_u") (param v128 v128) (result v128) (i32x4.abs (i32x4.min_u (local.get 0) (local.get 1)))) + (func (export "i32x4.max_s-i32x4.max_u") (param v128 v128 v128) (result v128) (i32x4.max_s (i32x4.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.max_s-i32x4.max_s") (param v128 v128 v128) (result v128) (i32x4.max_s (i32x4.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.max_s-i32x4.min_u") (param v128 v128 v128) (result v128) (i32x4.max_s (i32x4.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.max_s-i32x4.min_s") (param v128 v128 v128) (result v128) (i32x4.max_s (i32x4.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.max_s-i32x4.abs") (param v128 v128) (result v128) (i32x4.max_s (i32x4.abs (local.get 0))(local.get 1))) + (func (export "i32x4.abs-i32x4.max_s") (param v128 v128) (result v128) (i32x4.abs (i32x4.max_s (local.get 0) (local.get 1)))) + (func (export "i32x4.max_u-i32x4.max_u") (param v128 v128 v128) (result v128) (i32x4.max_u (i32x4.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.max_u-i32x4.max_s") (param v128 v128 v128) (result v128) (i32x4.max_u (i32x4.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.max_u-i32x4.min_u") (param v128 v128 v128) (result v128) (i32x4.max_u (i32x4.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.max_u-i32x4.min_s") (param v128 v128 v128) (result v128) (i32x4.max_u (i32x4.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i32x4.max_u-i32x4.abs") (param v128 v128) (result v128) (i32x4.max_u (i32x4.abs (local.get 0))(local.get 1))) + (func (export "i32x4.abs-i32x4.max_u") (param v128 v128) (result v128) (i32x4.abs (i32x4.max_u (local.get 0) (local.get 1)))) + (func (export "i32x4.abs-i32x4.abs") (param v128) (result v128) (i32x4.abs (i32x4.abs (local.get 0)))) +)`); + +// ./test/core/simd/simd_i32x4_arith2.wast:405 +assert_return( + () => invoke($1, `i32x4.min_s-i32x4.max_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:409 +assert_return( + () => invoke($1, `i32x4.min_s-i32x4.max_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:413 +assert_return( + () => invoke($1, `i32x4.min_s-i32x4.min_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:417 +assert_return( + () => invoke($1, `i32x4.min_s-i32x4.min_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:421 +assert_return( + () => invoke($1, `i32x4.min_s-i32x4.abs`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:424 +assert_return( + () => invoke($1, `i32x4.abs-i32x4.min_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:427 +assert_return( + () => invoke($1, `i32x4.min_u-i32x4.max_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:431 +assert_return( + () => invoke($1, `i32x4.min_u-i32x4.max_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:435 +assert_return( + () => invoke($1, `i32x4.min_u-i32x4.min_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:439 +assert_return( + () => invoke($1, `i32x4.min_u-i32x4.min_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:443 +assert_return( + () => invoke($1, `i32x4.min_u-i32x4.abs`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:446 +assert_return( + () => invoke($1, `i32x4.abs-i32x4.min_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:449 +assert_return( + () => invoke($1, `i32x4.max_s-i32x4.max_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:453 +assert_return( + () => invoke($1, `i32x4.max_s-i32x4.max_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:457 +assert_return( + () => invoke($1, `i32x4.max_s-i32x4.min_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:461 +assert_return( + () => invoke($1, `i32x4.max_s-i32x4.min_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:465 +assert_return( + () => invoke($1, `i32x4.max_s-i32x4.abs`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:468 +assert_return( + () => invoke($1, `i32x4.abs-i32x4.max_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:471 +assert_return( + () => invoke($1, `i32x4.max_u-i32x4.max_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:475 +assert_return( + () => invoke($1, `i32x4.max_u-i32x4.max_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:479 +assert_return( + () => invoke($1, `i32x4.max_u-i32x4.min_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:483 +assert_return( + () => invoke($1, `i32x4.max_u-i32x4.min_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x2, 0x2, 0x2, 0x2]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:487 +assert_return( + () => invoke($1, `i32x4.max_u-i32x4.abs`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:490 +assert_return( + () => invoke($1, `i32x4.abs-i32x4.max_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_arith2.wast:493 +assert_return( + () => invoke($1, `i32x4.abs-i32x4.abs`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_cmp.wast.js new file mode 100644 index 0000000000..7e3efca7a3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_cmp.wast.js @@ -0,0 +1,4369 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i32x4_cmp.wast + +// ./test/core/simd/simd_i32x4_cmp.wast:4 +let $0 = instantiate(`(module + (func (export "eq") (param $$x v128) (param $$y v128) (result v128) (i32x4.eq (local.get $$x) (local.get $$y))) + (func (export "ne") (param $$x v128) (param $$y v128) (result v128) (i32x4.ne (local.get $$x) (local.get $$y))) + (func (export "lt_s") (param $$x v128) (param $$y v128) (result v128) (i32x4.lt_s (local.get $$x) (local.get $$y))) + (func (export "lt_u") (param $$x v128) (param $$y v128) (result v128) (i32x4.lt_u (local.get $$x) (local.get $$y))) + (func (export "le_s") (param $$x v128) (param $$y v128) (result v128) (i32x4.le_s (local.get $$x) (local.get $$y))) + (func (export "le_u") (param $$x v128) (param $$y v128) (result v128) (i32x4.le_u (local.get $$x) (local.get $$y))) + (func (export "gt_s") (param $$x v128) (param $$y v128) (result v128) (i32x4.gt_s (local.get $$x) (local.get $$y))) + (func (export "gt_u") (param $$x v128) (param $$y v128) (result v128) (i32x4.gt_u (local.get $$x) (local.get $$y))) + (func (export "ge_s") (param $$x v128) (param $$y v128) (result v128) (i32x4.ge_s (local.get $$x) (local.get $$y))) + (func (export "ge_u") (param $$x v128) (param $$y v128) (result v128) (i32x4.ge_u (local.get $$x) (local.get $$y))) +)`); + +// ./test/core/simd/simd_i32x4_cmp.wast:23 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:26 +assert_return( + () => invoke($0, `eq`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:29 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:32 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:35 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:38 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:41 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:46 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:49 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:52 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:55 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:58 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:63 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:66 +assert_return( + () => invoke($0, `eq`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:69 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:72 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:75 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:78 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:81 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:86 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xc3000000, 0xc2fe0000, 0xbf800000, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:89 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x3f800000, 0x42fe0000, 0x43000000, 0x437f0000]), + f32x4([1, 127, 128, 255]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:94 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:97 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:100 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x2030001, 0x10110409, 0xb1a120a, 0xabff1baa]), + i32x4([0xaa1bffab, 0xa121a0b, 0x9041110, 0x1000302]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:103 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x80018000, 0x80038002, 0x80058004, 0x80078006]), + i32x4([0x80078006, 0x80058004, 0x80038002, 0x80018000]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:106 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x80000000, 0x7fffffff, 0x0, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0xffffffff, 0x0]), + ]), + [i32x4([0xffffffff, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:111 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:114 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:117 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:120 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:123 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:126 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xff80ff80, 0x0, 0x1, 0xffffffff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0xffffffff, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:129 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:134 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:137 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:140 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:143 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:146 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:149 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0xffffffff, 0x0, 0x1, 0xffff]), + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x0, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:152 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:155 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:158 +assert_return( + () => invoke($0, `eq`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:167 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:170 +assert_return( + () => invoke($0, `ne`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:173 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:176 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:179 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:182 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:185 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:190 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:193 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:196 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:199 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:202 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:207 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:210 +assert_return( + () => invoke($0, `ne`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:213 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:216 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:219 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:222 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:225 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:230 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xc3000000, 0xc2fe0000, 0xbf800000, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:233 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x3f800000, 0x42fe0000, 0x43000000, 0x437f0000]), + f32x4([1, 127, 128, 255]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:238 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:241 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:244 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x2030001, 0x10110409, 0xb1a120a, 0xabff1baa]), + i32x4([0xaa1bffab, 0xa121a0b, 0x9041110, 0x1000302]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:247 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x80018000, 0x80038002, 0x80058004, 0x80078006]), + i32x4([0x80078006, 0x80058004, 0x80038002, 0x80018000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:250 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x80000000, 0x7fffffff, 0x0, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0xffffffff, 0x0]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:255 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:258 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:261 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:264 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:267 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:270 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xff80ff80, 0x0, 0x1, 0xffffffff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0x0, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:273 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:278 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:281 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:284 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:287 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:290 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:293 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:296 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:299 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:302 +assert_return( + () => invoke($0, `ne`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:311 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:314 +assert_return( + () => invoke($0, `lt_s`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:317 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:320 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:323 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:326 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:329 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:334 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:337 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:340 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:343 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:346 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:351 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:354 +assert_return( + () => invoke($0, `lt_s`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:357 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:360 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:363 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:366 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:369 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:374 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xc3000000, 0xc2fe0000, 0xbf800000, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:377 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x3f800000, 0x42fe0000, 0x43000000, 0x437f0000]), + f32x4([1, 127, 128, 255]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:382 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:385 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:388 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x2030001, 0x10110409, 0xb1a120a, 0xabff1baa]), + i32x4([0xaa1bffab, 0xa121a0b, 0x9041110, 0x1000302]), + ]), + [i32x4([0x0, 0x0, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:391 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x80018000, 0x80038002, 0x80058004, 0x80078006]), + i32x4([0x80078006, 0x80058004, 0x80038002, 0x80018000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:394 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x80000000, 0x7fffffff, 0x0, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0xffffffff, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:399 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:402 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:405 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:408 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:411 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:414 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xff80ff80, 0x0, 0x1, 0xffffffff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:417 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:422 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:425 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:428 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:431 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:434 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:437 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:440 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:443 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:446 +assert_return( + () => invoke($0, `lt_s`, [ + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + i32x4([0x90abcdf0, 0x90abcdf0, 0x90abcdf0, 0x90abcdf0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:455 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:458 +assert_return( + () => invoke($0, `lt_u`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:461 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:464 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:467 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:470 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:473 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:478 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:481 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:484 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:487 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:490 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:495 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:498 +assert_return( + () => invoke($0, `lt_u`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:501 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:504 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:507 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:510 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:513 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:518 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xc3000000, 0xc2fe0000, 0xbf800000, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:521 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x3f800000, 0x42fe0000, 0x43000000, 0x437f0000]), + f32x4([1, 127, 128, 255]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:526 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:529 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:532 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x2030001, 0x10110409, 0xb1a120a, 0xabff1baa]), + i32x4([0xaa1bffab, 0xa121a0b, 0x9041110, 0x1000302]), + ]), + [i32x4([0xffffffff, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:535 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x80018000, 0x80038002, 0x80058004, 0x80078006]), + i32x4([0x80078006, 0x80058004, 0x80038002, 0x80018000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:538 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x80000000, 0x7fffffff, 0x0, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0xffffffff, 0x0]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:543 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:546 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:549 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:552 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:555 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:558 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xff80ff80, 0x0, 0x1, 0xffffffff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:561 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:566 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:569 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:572 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:575 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:578 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:581 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:584 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:587 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:590 +assert_return( + () => invoke($0, `lt_u`, [ + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + i32x4([0x90abcdf0, 0x90abcdf0, 0x90abcdf0, 0x90abcdf0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:599 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:602 +assert_return( + () => invoke($0, `le_s`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:605 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:608 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:611 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:614 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:617 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:622 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:625 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:628 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:631 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:634 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:639 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:642 +assert_return( + () => invoke($0, `le_s`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:645 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:648 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:651 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:654 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:657 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:662 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xc3000000, 0xc2fe0000, 0xbf800000, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:665 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x3f800000, 0x42fe0000, 0x43000000, 0x437f0000]), + f32x4([1, 127, 128, 255]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:670 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:673 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:676 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x2030001, 0x10110409, 0xb1a120a, 0xabff1baa]), + i32x4([0xaa1bffab, 0xa121a0b, 0x9041110, 0x1000302]), + ]), + [i32x4([0x0, 0x0, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:679 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x80018000, 0x80038002, 0x80058004, 0x80078006]), + i32x4([0x80078006, 0x80058004, 0x80038002, 0x80018000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:682 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x80000000, 0x7fffffff, 0x0, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0xffffffff, 0x0]), + ]), + [i32x4([0xffffffff, 0x0, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:687 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:690 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:693 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:696 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:699 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:702 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xff80ff80, 0x0, 0x1, 0xffffffff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:705 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:710 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:713 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:716 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:719 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:722 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:725 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:728 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:731 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:734 +assert_return( + () => invoke($0, `le_s`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:743 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:746 +assert_return( + () => invoke($0, `le_u`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:749 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:752 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:755 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:758 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:761 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:766 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:769 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:772 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:775 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:778 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:783 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:786 +assert_return( + () => invoke($0, `le_u`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:789 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:792 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:795 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:798 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:801 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:806 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xc3000000, 0xc2fe0000, 0xbf800000, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:809 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x3f800000, 0x42fe0000, 0x43000000, 0x437f0000]), + f32x4([1, 127, 128, 255]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:814 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:817 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:820 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x2030001, 0x10110409, 0xb1a120a, 0xabff1baa]), + i32x4([0xaa1bffab, 0xa121a0b, 0x9041110, 0x1000302]), + ]), + [i32x4([0xffffffff, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:823 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x80018000, 0x80038002, 0x80058004, 0x80078006]), + i32x4([0x80078006, 0x80058004, 0x80038002, 0x80018000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:826 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x80000000, 0x7fffffff, 0x0, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0xffffffff, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:831 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:834 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:837 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:840 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:843 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:846 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xff80ff80, 0x0, 0x1, 0xffffffff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:849 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:854 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:857 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:860 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:863 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:866 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:869 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:872 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:875 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:878 +assert_return( + () => invoke($0, `le_u`, [ + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:887 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:890 +assert_return( + () => invoke($0, `gt_s`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:893 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:896 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:899 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:902 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:905 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:910 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:913 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:916 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:919 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:922 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:927 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:930 +assert_return( + () => invoke($0, `gt_s`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:933 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:936 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:939 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:942 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:945 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:950 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xc3000000, 0xc2fe0000, 0xbf800000, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:953 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x3f800000, 0x42fe0000, 0x43000000, 0x437f0000]), + f32x4([1, 127, 128, 255]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:958 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:961 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:964 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x2030001, 0x10110409, 0xb1a120a, 0xabff1baa]), + i32x4([0xaa1bffab, 0xa121a0b, 0x9041110, 0x1000302]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:967 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x80018000, 0x80038002, 0x80058004, 0x80078006]), + i32x4([0x80078006, 0x80058004, 0x80038002, 0x80018000]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:970 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x80000000, 0x7fffffff, 0x0, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0xffffffff, 0x0]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:975 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:978 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:981 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:984 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:987 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:990 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xff80ff80, 0x0, 0x1, 0xffffffff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:993 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:998 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1001 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1004 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1007 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1010 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1013 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xffff, 0x0, 0x1, 0x8000]), + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x8000, 0x8000]), + ]), + [i32x4([0xffffffff, 0x0, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1016 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1019 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1022 +assert_return( + () => invoke($0, `gt_s`, [ + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + i32x4([0x90abcdef, 0x90abcdef, 0x90abcdef, 0x90abcdef]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1031 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1034 +assert_return( + () => invoke($0, `gt_u`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1037 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1040 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1043 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1046 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1049 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1054 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1057 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1060 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1063 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1066 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1071 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1074 +assert_return( + () => invoke($0, `gt_u`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1077 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1080 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1083 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1086 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1089 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1094 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xc3000000, 0xc2fe0000, 0xbf800000, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1097 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x3f800000, 0x42fe0000, 0x43000000, 0x437f0000]), + f32x4([1, 127, 128, 255]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1102 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1105 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1108 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x2030001, 0x10110409, 0xb1a120a, 0xabff1baa]), + i32x4([0xaa1bffab, 0xa121a0b, 0x9041110, 0x1000302]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1111 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x80018000, 0x80038002, 0x80058004, 0x80078006]), + i32x4([0x80078006, 0x80058004, 0x80038002, 0x80018000]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1114 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x80000000, 0x7fffffff, 0x0, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0xffffffff, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1119 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1122 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1125 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1128 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1131 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1134 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xff80ff80, 0x0, 0x1, 0xffffffff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1137 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i8x16([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1142 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1145 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1148 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1151 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1154 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1157 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1160 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1163 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1166 +assert_return( + () => invoke($0, `gt_u`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1175 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1178 +assert_return( + () => invoke($0, `ge_s`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1181 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1184 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1187 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1190 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1193 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1198 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1201 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1204 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1207 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1210 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1215 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1218 +assert_return( + () => invoke($0, `ge_s`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1221 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1224 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1227 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1230 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1233 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1238 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xc3000000, 0xc2fe0000, 0xbf800000, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1241 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x3f800000, 0x42fe0000, 0x43000000, 0x437f0000]), + f32x4([1, 127, 128, 255]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1246 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1249 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1252 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x2030001, 0x10110409, 0xb1a120a, 0xabff1baa]), + i32x4([0xaa1bffab, 0xa121a0b, 0x9041110, 0x1000302]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1255 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x80018000, 0x80038002, 0x80058004, 0x80078006]), + i32x4([0x80078006, 0x80058004, 0x80038002, 0x80018000]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1258 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x80000000, 0x7fffffff, 0x0, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0xffffffff, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1263 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1266 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1269 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1272 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1275 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1278 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xff80ff80, 0x0, 0x1, 0xffffffff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1281 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x55555555, 0x55555555, 0x55555555, 0x55555555]), + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1286 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1289 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1292 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1295 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1298 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1301 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xffff, 0x0, 0x1, 0x8000]), + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x8000, 0x8000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1304 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1307 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1310 +assert_return( + () => invoke($0, `ge_s`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1319 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1322 +assert_return( + () => invoke($0, `ge_u`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1325 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1328 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1331 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1334 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1337 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + i32x4([0x3020100, 0x11100904, 0x1a0b0a12, 0xffabaa1b]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1342 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1345 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1348 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1351 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1354 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1359 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1362 +assert_return( + () => invoke($0, `ge_u`, [i32x4([0x0, 0x0, 0x0, 0x0]), i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1365 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1368 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1371 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1374 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1377 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + i32x4([0x80000001, 0xffffffff, 0x0, 0xffffffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1382 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xc3000000, 0xc2fe0000, 0xbf800000, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1385 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x3f800000, 0x42fe0000, 0x43000000, 0x437f0000]), + f32x4([1, 127, 128, 255]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1390 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f]), + i32x4([0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0, 0xf0f0f0f0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1393 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1396 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x2030001, 0x10110409, 0xb1a120a, 0xabff1baa]), + i32x4([0xaa1bffab, 0xa121a0b, 0x9041110, 0x1000302]), + ]), + [i32x4([0x0, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1399 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x80018000, 0x80038002, 0x80058004, 0x80078006]), + i32x4([0x80078006, 0x80058004, 0x80038002, 0x80018000]), + ]), + [i32x4([0x0, 0x0, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1402 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x80000000, 0x7fffffff, 0x0, 0xffffffff]), + i32x4([0x80000000, 0x80000001, 0xffffffff, 0x0]), + ]), + [i32x4([0xffffffff, 0x0, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1407 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1410 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1413 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1416 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1419 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1422 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xff80ff80, 0x0, 0x1, 0xffffffff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1425 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1430 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1433 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1436 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1439 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1442 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1445 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + i16x8([0xffff, 0xffff, 0x0, 0x0, 0x1, 0x1, 0x8000, 0x8000]), + ]), + [i32x4([0x0, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1448 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + i16x8([0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1451 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1454 +assert_return( + () => invoke($0, `ge_u`, [ + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1461 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.eq (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1462 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.ge_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1463 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.ge_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1464 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.gt_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1465 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.gt_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1466 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.le_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1467 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.le_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1468 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.lt_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1469 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.lt_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1470 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.ne (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1475 +let $1 = instantiate(`(module (memory 1) + (func (export "eq-in-block") + (block + (drop + (block (result v128) + (i32x4.eq + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "ne-in-block") + (block + (drop + (block (result v128) + (i32x4.ne + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "lt_s-in-block") + (block + (drop + (block (result v128) + (i32x4.lt_s + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "le_u-in-block") + (block + (drop + (block (result v128) + (i32x4.le_u + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "gt_u-in-block") + (block + (drop + (block (result v128) + (i32x4.gt_u + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "ge_s-in-block") + (block + (drop + (block (result v128) + (i32x4.ge_s + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "nested-eq") + (drop + (i32x4.eq + (i32x4.eq + (i32x4.eq + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.eq + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i32x4.eq + (i32x4.eq + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.eq + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-ne") + (drop + (i32x4.ne + (i32x4.ne + (i32x4.ne + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.ne + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i32x4.ne + (i32x4.ne + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.ne + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-lt_s") + (drop + (i32x4.lt_s + (i32x4.lt_s + (i32x4.lt_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.lt_s + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i32x4.lt_s + (i32x4.lt_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.lt_s + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-le_u") + (drop + (i32x4.le_u + (i32x4.le_u + (i32x4.le_u + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.le_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i32x4.le_u + (i32x4.le_u + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.le_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-gt_u") + (drop + (i32x4.gt_u + (i32x4.gt_u + (i32x4.gt_u + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.gt_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i32x4.gt_u + (i32x4.gt_u + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.gt_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-ge_s") + (drop + (i32x4.ge_s + (i32x4.ge_s + (i32x4.ge_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.ge_s + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i32x4.ge_s + (i32x4.ge_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.ge_s + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "as-param") + (drop + (i32x4.ge_u + (i32x4.eq + (i32x4.lt_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.le_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i32x4.ne + (i32x4.gt_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i32x4.lt_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) +)`); + +// ./test/core/simd/simd_i32x4_cmp.wast:1731 +assert_return(() => invoke($1, `eq-in-block`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1732 +assert_return(() => invoke($1, `ne-in-block`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1733 +assert_return(() => invoke($1, `lt_s-in-block`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1734 +assert_return(() => invoke($1, `le_u-in-block`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1735 +assert_return(() => invoke($1, `gt_u-in-block`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1736 +assert_return(() => invoke($1, `ge_s-in-block`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1737 +assert_return(() => invoke($1, `nested-eq`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1738 +assert_return(() => invoke($1, `nested-ne`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1739 +assert_return(() => invoke($1, `nested-lt_s`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1740 +assert_return(() => invoke($1, `nested-le_u`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1741 +assert_return(() => invoke($1, `nested-gt_u`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1742 +assert_return(() => invoke($1, `nested-ge_s`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1743 +assert_return(() => invoke($1, `as-param`, []), []); + +// ./test/core/simd/simd_i32x4_cmp.wast:1748 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.eq-1st-arg-empty (result v128) + (i32x4.eq (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1756 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.eq-arg-empty (result v128) + (i32x4.eq) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1764 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.ne-1st-arg-empty (result v128) + (i32x4.ne (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1772 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.ne-arg-empty (result v128) + (i32x4.ne) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1780 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.lt_s-1st-arg-empty (result v128) + (i32x4.lt_s (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1788 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.lt_s-arg-empty (result v128) + (i32x4.lt_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1796 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.lt_u-1st-arg-empty (result v128) + (i32x4.lt_u (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1804 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.lt_u-arg-empty (result v128) + (i32x4.lt_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1812 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.le_s-1st-arg-empty (result v128) + (i32x4.le_s (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1820 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.le_s-arg-empty (result v128) + (i32x4.le_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1828 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.le_u-1st-arg-empty (result v128) + (i32x4.le_u (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1836 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.le_u-arg-empty (result v128) + (i32x4.le_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1844 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.gt_s-1st-arg-empty (result v128) + (i32x4.gt_s (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1852 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.gt_s-arg-empty (result v128) + (i32x4.gt_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1860 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.gt_u-1st-arg-empty (result v128) + (i32x4.gt_u (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1868 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.gt_u-arg-empty (result v128) + (i32x4.gt_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1876 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.ge_s-1st-arg-empty (result v128) + (i32x4.ge_s (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1884 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.ge_s-arg-empty (result v128) + (i32x4.ge_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1892 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.ge_u-1st-arg-empty (result v128) + (i32x4.ge_u (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1900 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.ge_u-arg-empty (result v128) + (i32x4.ge_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1910 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (i4x32.eq (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1911 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (i4x32.ne (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1912 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (i4x32.lt_s (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1913 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (i4x32.lt_u (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1914 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (i4x32.le_s (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1915 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (i4x32.le_u (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1916 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (i4x32.gt_s (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1917 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (i4x32.gt_u (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1918 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (i4x32.ge_s (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i32x4_cmp.wast:1919 +assert_malformed( + () => instantiate(`(memory 1) (func (param $$x v128) (param $$y v128) (result v128) (i4x32.ge_u (local.get $$x) (local.get $$y))) `), + `unknown operator`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_dot_i16x8.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_dot_i16x8.wast.js new file mode 100644 index 0000000000..be80d0d2e8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_dot_i16x8.wast.js @@ -0,0 +1,283 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:4 +let $0 = instantiate(`(module + (func (export "i32x4.dot_i16x8_s") (param v128 v128) (result v128) (i32x4.dot_i16x8_s (local.get 0) (local.get 1))) +)`); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:10 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:13 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:16 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:19 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:22 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:25 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:28 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i32x4([0x1fff8000, 0x1fff8000, 0x1fff8000, 0x1fff8000])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:31 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i32x4([0x20000000, 0x20000000, 0x20000000, 0x20000000])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:34 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x1fff8000, 0x1fff8000, 0x1fff8000, 0x1fff8000])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:37 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x20000000, 0x20000000, 0x20000000, 0x20000000])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:40 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x20008000, 0x20008000, 0x20008000, 0x20008000])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:43 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xfffa, 0xfffa, 0xfffa, 0xfffa])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:46 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xfffc, 0xfffc, 0xfffc, 0xfffc])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:49 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:52 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xfffc, 0xfffc, 0xfffc, 0xfffc])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:55 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:58 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x10000, 0x10000, 0x10000, 0x10000])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:61 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7ffe0002, 0x7ffe0002, 0x7ffe0002, 0x7ffe0002])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:64 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:67 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i32x4([0x7fff0000, 0x7fff0000, 0x7fff0000, 0x7fff0000])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:70 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:73 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:76 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:79 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0xffff0002, 0xffff0002, 0xffff0002, 0xffff0002])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:82 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x10000, 0x10000, 0x10000, 0x10000])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:85 +assert_return( + () => invoke($0, `i32x4.dot_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:90 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.dot_i16x8_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:94 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.dot_i16x8_s-1st-arg-empty (result v128) + (i32x4.dot_i16x8_s (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_dot_i16x8.wast:102 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.dot_i16x8_s-arg-empty (result v128) + (i32x4.dot_i16x8_s) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_extadd_pairwise_i16x8.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_extadd_pairwise_i16x8.wast.js new file mode 100644 index 0000000000..910ae3c5b1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_extadd_pairwise_i16x8.wast.js @@ -0,0 +1,184 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:4 +let $0 = instantiate(`(module + (func (export "i32x4.extadd_pairwise_i16x8_s") (param v128) (result v128) (i32x4.extadd_pairwise_i16x8_s (local.get 0))) + (func (export "i32x4.extadd_pairwise_i16x8_u") (param v128) (result v128) (i32x4.extadd_pairwise_i16x8_u (local.get 0))) +)`); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:11 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:13 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:15 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:17 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_s`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + ]), + [i32x4([0xfffc, 0xfffc, 0xfffc, 0xfffc])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:19 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_s`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i32x4([0xffff0002, 0xffff0002, 0xffff0002, 0xffff0002])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:21 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:23 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:25 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:29 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:31 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:33 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x1fffe, 0x1fffe, 0x1fffe, 0x1fffe])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:35 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_u`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + ]), + [i32x4([0xfffc, 0xfffc, 0xfffc, 0xfffc])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:37 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_u`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i32x4([0x10002, 0x10002, 0x10002, 0x10002])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:39 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x10000, 0x10000, 0x10000, 0x10000])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:41 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0xfffe, 0xfffe, 0xfffe, 0xfffe])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:43 +assert_return( + () => invoke($0, `i32x4.extadd_pairwise_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x1fffe, 0x1fffe, 0x1fffe, 0x1fffe])], +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:47 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.extadd_pairwise_i16x8_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:48 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.extadd_pairwise_i16x8_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:52 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extadd_pairwise_i16x8_s-arg-empty (result v128) + (i32x4.extadd_pairwise_i16x8_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extadd_pairwise_i16x8.wast:60 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extadd_pairwise_i16x8_u-arg-empty (result v128) + (i32x4.extadd_pairwise_i16x8_u) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_extmul_i16x8.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_extmul_i16x8.wast.js new file mode 100644 index 0000000000..8fc1d05e97 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_extmul_i16x8.wast.js @@ -0,0 +1,1066 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:4 +let $0 = instantiate(`(module + (func (export "i32x4.extmul_low_i16x8_s") (param v128 v128) (result v128) (i32x4.extmul_low_i16x8_s (local.get 0) (local.get 1))) + (func (export "i32x4.extmul_high_i16x8_s") (param v128 v128) (result v128) (i32x4.extmul_high_i16x8_s (local.get 0) (local.get 1))) + (func (export "i32x4.extmul_low_i16x8_u") (param v128 v128) (result v128) (i32x4.extmul_low_i16x8_u (local.get 0) (local.get 1))) + (func (export "i32x4.extmul_high_i16x8_u") (param v128 v128) (result v128) (i32x4.extmul_high_i16x8_u (local.get 0) (local.get 1))) +)`); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:13 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:16 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:19 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:22 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:25 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:28 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:31 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i32x4([0xfffc000, 0xfffc000, 0xfffc000, 0xfffc000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:34 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i32x4([0x10000000, 0x10000000, 0x10000000, 0x10000000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:37 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0xfffc000, 0xfffc000, 0xfffc000, 0xfffc000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:40 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x10000000, 0x10000000, 0x10000000, 0x10000000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:43 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x10004000, 0x10004000, 0x10004000, 0x10004000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:46 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:49 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:52 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:55 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:58 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:61 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:64 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x3fff0001, 0x3fff0001, 0x3fff0001, 0x3fff0001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:67 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:70 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i32x4([0x3fff8000, 0x3fff8000, 0x3fff8000, 0x3fff8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:73 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:76 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:79 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:82 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0xffff8001, 0xffff8001, 0xffff8001, 0xffff8001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:85 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:88 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:93 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:96 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:99 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:102 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:105 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:108 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:111 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i32x4([0xfffc000, 0xfffc000, 0xfffc000, 0xfffc000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:114 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i32x4([0x10000000, 0x10000000, 0x10000000, 0x10000000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:117 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0xfffc000, 0xfffc000, 0xfffc000, 0xfffc000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:120 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x10000000, 0x10000000, 0x10000000, 0x10000000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:123 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x10004000, 0x10004000, 0x10004000, 0x10004000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:126 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:129 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:132 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:135 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:138 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:141 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:144 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x3fff0001, 0x3fff0001, 0x3fff0001, 0x3fff0001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:147 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:150 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i32x4([0x3fff8000, 0x3fff8000, 0x3fff8000, 0x3fff8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:153 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:156 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:159 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:162 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0xffff8001, 0xffff8001, 0xffff8001, 0xffff8001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:165 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:168 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:173 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:176 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:179 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:182 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:185 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:188 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xfffe0001, 0xfffe0001, 0xfffe0001, 0xfffe0001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:191 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i32x4([0xfffc000, 0xfffc000, 0xfffc000, 0xfffc000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:194 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i32x4([0x10000000, 0x10000000, 0x10000000, 0x10000000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:197 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x9000c000, 0x9000c000, 0x9000c000, 0x9000c000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:200 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x90000000, 0x90000000, 0x90000000, 0x90000000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:203 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x8fff4000, 0x8fff4000, 0x8fff4000, 0x8fff4000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:206 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:209 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:212 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:215 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x80017ffe, 0x80017ffe, 0x80017ffe, 0x80017ffe])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:218 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x80007fff, 0x80007fff, 0x80007fff, 0x80007fff])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:221 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x7fff8000, 0x7fff8000, 0x7fff8000, 0x7fff8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:224 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x3fff0001, 0x3fff0001, 0x3fff0001, 0x3fff0001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:227 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:230 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i32x4([0x40008000, 0x40008000, 0x40008000, 0x40008000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:233 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:236 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:239 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xfffe0001, 0xfffe0001, 0xfffe0001, 0xfffe0001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:242 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7ffe8001, 0x7ffe8001, 0x7ffe8001, 0x7ffe8001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:245 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x7fff8000, 0x7fff8000, 0x7fff8000, 0x7fff8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:248 +assert_return( + () => invoke($0, `i32x4.extmul_low_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xfffe0001, 0xfffe0001, 0xfffe0001, 0xfffe0001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:253 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:256 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:259 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:262 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:265 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:268 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xfffe0001, 0xfffe0001, 0xfffe0001, 0xfffe0001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:271 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff, 0x3fff]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i32x4([0xfffc000, 0xfffc000, 0xfffc000, 0xfffc000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:274 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + i16x8([0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000]), + ]), + [i32x4([0x10000000, 0x10000000, 0x10000000, 0x10000000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:277 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x9000c000, 0x9000c000, 0x9000c000, 0x9000c000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:280 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x90000000, 0x90000000, 0x90000000, 0x90000000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:283 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff, 0xbfff]), + i16x8([0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000]), + ]), + [i32x4([0x8fff4000, 0x8fff4000, 0x8fff4000, 0x8fff4000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:286 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffd, 0x7ffd, 0x7ffd, 0x7ffd])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:289 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:292 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:295 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x80017ffe, 0x80017ffe, 0x80017ffe, 0x80017ffe])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:298 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x80007fff, 0x80007fff, 0x80007fff, 0x80007fff])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:301 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x7fff8000, 0x7fff8000, 0x7fff8000, 0x7fff8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:304 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x3fff0001, 0x3fff0001, 0x3fff0001, 0x3fff0001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:307 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:310 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i32x4([0x40008000, 0x40008000, 0x40008000, 0x40008000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:313 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:316 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:319 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xfffe0001, 0xfffe0001, 0xfffe0001, 0xfffe0001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:322 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7ffe8001, 0x7ffe8001, 0x7ffe8001, 0x7ffe8001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:325 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x7fff8000, 0x7fff8000, 0x7fff8000, 0x7fff8000])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:328 +assert_return( + () => invoke($0, `i32x4.extmul_high_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xfffe0001, 0xfffe0001, 0xfffe0001, 0xfffe0001])], +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:333 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.extmul_low_i16x8_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:334 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.extmul_high_i16x8_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:335 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.extmul_low_i16x8_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:336 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.extmul_high_i16x8_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:340 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extmul_low_i16x8_s-1st-arg-empty (result v128) + (i32x4.extmul_low_i16x8_s (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:348 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extmul_low_i16x8_s-arg-empty (result v128) + (i32x4.extmul_low_i16x8_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:356 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extmul_high_i16x8_s-1st-arg-empty (result v128) + (i32x4.extmul_high_i16x8_s (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:364 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extmul_high_i16x8_s-arg-empty (result v128) + (i32x4.extmul_high_i16x8_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:372 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extmul_low_i16x8_u-1st-arg-empty (result v128) + (i32x4.extmul_low_i16x8_u (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:380 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extmul_low_i16x8_u-arg-empty (result v128) + (i32x4.extmul_low_i16x8_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:388 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extmul_high_i16x8_u-1st-arg-empty (result v128) + (i32x4.extmul_high_i16x8_u (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_extmul_i16x8.wast:396 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extmul_high_i16x8_u-arg-empty (result v128) + (i32x4.extmul_high_i16x8_u) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_trunc_sat_f32x4.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_trunc_sat_f32x4.wast.js new file mode 100644 index 0000000000..bc24976ff9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_trunc_sat_f32x4.wast.js @@ -0,0 +1,1016 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:3 +let $0 = instantiate(`(module + (func (export "i32x4.trunc_sat_f32x4_s") (param v128) (result v128) (i32x4.trunc_sat_f32x4_s (local.get 0))) + (func (export "i32x4.trunc_sat_f32x4_u") (param v128) (result v128) (i32x4.trunc_sat_f32x4_u (local.get 0))) +)`); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:10 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:12 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:14 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([1.5, 1.5, 1.5, 1.5])]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:16 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([-1.5, -1.5, -1.5, -1.5])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:18 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([1.9, 1.9, 1.9, 1.9])]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:20 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([2, 2, 2, 2])]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:22 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([-1.9, -1.9, -1.9, -1.9])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:24 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([-2, -2, -2, -2])]), + [i32x4([0xfffffffe, 0xfffffffe, 0xfffffffe, 0xfffffffe])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:26 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([2147483500, 2147483500, 2147483500, 2147483500]), + ]), + [i32x4([0x7fffff80, 0x7fffff80, 0x7fffff80, 0x7fffff80])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:28 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([-2147483500, -2147483500, -2147483500, -2147483500]), + ]), + [i32x4([0x80000080, 0x80000080, 0x80000080, 0x80000080])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:30 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([2147483600, 2147483600, 2147483600, 2147483600]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:32 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([-2147483600, -2147483600, -2147483600, -2147483600]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:34 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([4294967300, 4294967300, 4294967300, 4294967300]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:36 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([-4294967300, -4294967300, -4294967300, -4294967300]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:38 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([2147483600, 2147483600, 2147483600, 2147483600]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:40 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([-2147483600, -2147483600, -2147483600, -2147483600]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:42 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([4294967300, 4294967300, 4294967300, 4294967300]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:44 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([4294967300, 4294967300, 4294967300, 4294967300]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:46 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([4294967300, 4294967300, 4294967300, 4294967300]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:48 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:50 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:52 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:54 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:56 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:58 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:60 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([1, 1, 1, 1])]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:62 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([-1, -1, -1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:64 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([1.1, 1.1, 1.1, 1.1])]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:66 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([-1.1, -1.1, -1.1, -1.1])]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:68 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x6, 0x6, 0x6, 0x6])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:70 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xfffffffa, 0xfffffffa, 0xfffffffa, 0xfffffffa])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:72 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:74 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:76 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([0.9, 0.9, 0.9, 0.9])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:78 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([-0.9, -0.9, -0.9, -0.9])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:80 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([0.99999994, 0.99999994, 0.99999994, 0.99999994]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:82 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([-0.99999994, -0.99999994, -0.99999994, -0.99999994]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:84 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x6, 0x6, 0x6, 0x6])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:86 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0xfffffffa, 0xfffffffa, 0xfffffffa, 0xfffffffa])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:88 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:90 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:92 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:94 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:96 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:98 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:100 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + bytes('v128', [ + 0x44, + 0x44, + 0xc4, + 0x7f, + 0x44, + 0x44, + 0xc4, + 0x7f, + 0x44, + 0x44, + 0xc4, + 0x7f, + 0x44, + 0x44, + 0xc4, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:102 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + bytes('v128', [ + 0x44, + 0x44, + 0xc4, + 0xff, + 0x44, + 0x44, + 0xc4, + 0xff, + 0x44, + 0x44, + 0xc4, + 0xff, + 0x44, + 0x44, + 0xc4, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:104 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([42, 42, 42, 42])]), + [i32x4([0x2a, 0x2a, 0x2a, 0x2a])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:106 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [f32x4([-42, -42, -42, -42])]), + [i32x4([0xffffffd6, 0xffffffd6, 0xffffffd6, 0xffffffd6])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:108 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x75bcd18, 0x75bcd18, 0x75bcd18, 0x75bcd18])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:110 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_s`, [ + f32x4([1234568000, 1234568000, 1234568000, 1234568000]), + ]), + [i32x4([0x49960300, 0x49960300, 0x49960300, 0x49960300])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:114 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([0, 0, 0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:116 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([-0, -0, -0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:118 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([1.5, 1.5, 1.5, 1.5])]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:120 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([-1.5, -1.5, -1.5, -1.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:122 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([1.9, 1.9, 1.9, 1.9])]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:124 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([2, 2, 2, 2])]), + [i32x4([0x2, 0x2, 0x2, 0x2])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:126 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([-1.9, -1.9, -1.9, -1.9])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:128 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([-2, -2, -2, -2])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:130 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([2147483500, 2147483500, 2147483500, 2147483500]), + ]), + [i32x4([0x7fffff80, 0x7fffff80, 0x7fffff80, 0x7fffff80])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:132 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([-2147483500, -2147483500, -2147483500, -2147483500]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:134 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([2147483600, 2147483600, 2147483600, 2147483600]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:136 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([-2147483600, -2147483600, -2147483600, -2147483600]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:138 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([4294967300, 4294967300, 4294967300, 4294967300]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:140 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([-4294967300, -4294967300, -4294967300, -4294967300]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:142 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([2147483600, 2147483600, 2147483600, 2147483600]), + ]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:144 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([-2147483600, -2147483600, -2147483600, -2147483600]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:146 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([4294967300, 4294967300, 4294967300, 4294967300]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:148 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([4294967300, 4294967300, 4294967300, 4294967300]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:150 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([4294967300, 4294967300, 4294967300, 4294967300]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:152 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([ + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + 0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:154 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([ + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + -0.000000000000000000000000000000000000000000001, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:156 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([ + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + 0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:158 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([ + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + -0.000000000000000000000000000000000000011754944, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:160 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([0.5, 0.5, 0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:162 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([-0.5, -0.5, -0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:164 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([1, 1, 1, 1])]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:166 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([-1, -1, -1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:168 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([1.1, 1.1, 1.1, 1.1])]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:170 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([-1.1, -1.1, -1.1, -1.1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:172 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x6, 0x6, 0x6, 0x6])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:174 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:176 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:178 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:180 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([0.9, 0.9, 0.9, 0.9])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:182 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([-0.9, -0.9, -0.9, -0.9])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:184 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([0.99999994, 0.99999994, 0.99999994, 0.99999994]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:186 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([-0.99999994, -0.99999994, -0.99999994, -0.99999994]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:188 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([6.2831855, 6.2831855, 6.2831855, 6.2831855]), + ]), + [i32x4([0x6, 0x6, 0x6, 0x6])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:190 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([-6.2831855, -6.2831855, -6.2831855, -6.2831855]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:192 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([ + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + 340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:194 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([ + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + -340282350000000000000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:196 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:198 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:200 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:202 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:204 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + bytes('v128', [ + 0x44, + 0x44, + 0xc4, + 0x7f, + 0x44, + 0x44, + 0xc4, + 0x7f, + 0x44, + 0x44, + 0xc4, + 0x7f, + 0x44, + 0x44, + 0xc4, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:206 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + bytes('v128', [ + 0x44, + 0x44, + 0xc4, + 0xff, + 0x44, + 0x44, + 0xc4, + 0xff, + 0x44, + 0x44, + 0xc4, + 0xff, + 0x44, + 0x44, + 0xc4, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:208 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([42, 42, 42, 42])]), + [i32x4([0x2a, 0x2a, 0x2a, 0x2a])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:210 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [f32x4([-42, -42, -42, -42])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:212 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([123456790, 123456790, 123456790, 123456790]), + ]), + [i32x4([0x75bcd18, 0x75bcd18, 0x75bcd18, 0x75bcd18])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:214 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f32x4_u`, [ + f32x4([1234568000, 1234568000, 1234568000, 1234568000]), + ]), + [i32x4([0x49960300, 0x49960300, 0x49960300, 0x49960300])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:218 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.trunc_sat_f32x4_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:219 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.trunc_sat_f32x4_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:223 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.trunc_sat_f32x4_s-arg-empty (result v128) + (i32x4.trunc_sat_f32x4_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f32x4.wast:231 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.trunc_sat_f32x4_u-arg-empty (result v128) + (i32x4.trunc_sat_f32x4_u) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_trunc_sat_f64x2.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_trunc_sat_f64x2.wast.js new file mode 100644 index 0000000000..72cf5568a8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_trunc_sat_f64x2.wast.js @@ -0,0 +1,940 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:3 +let $0 = instantiate(`(module + (func (export "i32x4.trunc_sat_f64x2_s_zero") (param v128) (result v128) (i32x4.trunc_sat_f64x2_s_zero (local.get 0))) + (func (export "i32x4.trunc_sat_f64x2_u_zero") (param v128) (result v128) (i32x4.trunc_sat_f64x2_u_zero (local.get 0))) +)`); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:10 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:12 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([-0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:14 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([1.5, 1.5])]), + [i32x4([0x1, 0x1, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:16 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([-1.5, -1.5])]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:18 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([1.9, 1.9])]), + [i32x4([0x1, 0x1, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:20 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([2, 2])]), + [i32x4([0x2, 0x2, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:22 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([-1.9, -1.9])]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:24 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([-2, -2])]), + [i32x4([0xfffffffe, 0xfffffffe, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:26 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([2147483520, 2147483520])]), + [i32x4([0x7fffff80, 0x7fffff80, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:28 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([-2147483520, -2147483520])]), + [i32x4([0x80000080, 0x80000080, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:30 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([2147483648, 2147483648])]), + [i32x4([0x7fffffff, 0x7fffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:32 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([-2147483648, -2147483648])]), + [i32x4([0x80000000, 0x80000000, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:34 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([4294967294, 4294967294])]), + [i32x4([0x7fffffff, 0x7fffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:36 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([-4294967294, -4294967294])]), + [i32x4([0x80000000, 0x80000000, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:38 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([2147483647, 2147483647])]), + [i32x4([0x7fffffff, 0x7fffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:40 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([-2147483647, -2147483647])]), + [i32x4([0x80000001, 0x80000001, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:42 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([4294967294, 4294967294])]), + [i32x4([0x7fffffff, 0x7fffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:44 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([4294967295, 4294967295])]), + [i32x4([0x7fffffff, 0x7fffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:46 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([4294967296, 4294967296])]), + [i32x4([0x7fffffff, 0x7fffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:48 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([ + 0.000000000000000000000000000000000000000000001401298464324817, + 0.000000000000000000000000000000000000000000001401298464324817, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:50 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([ + -0.000000000000000000000000000000000000000000001401298464324817, + -0.000000000000000000000000000000000000000000001401298464324817, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:52 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([ + 0.000000000000000000000000000000000000011754943508222875, + 0.000000000000000000000000000000000000011754943508222875, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:54 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([ + -0.000000000000000000000000000000000000011754943508222875, + -0.000000000000000000000000000000000000011754943508222875, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:56 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:58 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([-0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:60 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([1, 1])]), + [i32x4([0x1, 0x1, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:62 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([-1, -1])]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:64 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([1.100000023841858, 1.100000023841858]), + ]), + [i32x4([0x1, 0x1, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:66 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([-1.100000023841858, -1.100000023841858]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:68 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([6.2831854820251465, 6.2831854820251465]), + ]), + [i32x4([0x6, 0x6, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:70 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([-6.2831854820251465, -6.2831854820251465]), + ]), + [i32x4([0xfffffffa, 0xfffffffa, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:72 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([ + 340282346638528860000000000000000000000, + 340282346638528860000000000000000000000, + ]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:74 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([ + -340282346638528860000000000000000000000, + -340282346638528860000000000000000000000, + ]), + ]), + [i32x4([0x80000000, 0x80000000, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:76 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([0.8999999761581421, 0.8999999761581421]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:78 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([-0.8999999761581421, -0.8999999761581421]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:80 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([0.9999999403953552, 0.9999999403953552]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:82 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([-0.9999999403953552, -0.9999999403953552]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:84 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([6.2831854820251465, 6.2831854820251465]), + ]), + [i32x4([0x6, 0x6, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:86 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([-6.2831854820251465, -6.2831854820251465]), + ]), + [i32x4([0xfffffffa, 0xfffffffa, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:88 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([ + 340282346638528860000000000000000000000, + 340282346638528860000000000000000000000, + ]), + ]), + [i32x4([0x7fffffff, 0x7fffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:90 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + f64x2([ + -340282346638528860000000000000000000000, + -340282346638528860000000000000000000000, + ]), + ]), + [i32x4([0x80000000, 0x80000000, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:92 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([Infinity, Infinity])]), + [i32x4([0x7fffffff, 0x7fffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:94 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([-Infinity, -Infinity])]), + [i32x4([0x80000000, 0x80000000, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:96 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:98 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:100 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + bytes('v128', [ + 0x44, + 0x44, + 0x44, + 0x0, + 0x0, + 0x0, + 0xf0, + 0x7f, + 0x44, + 0x44, + 0x44, + 0x0, + 0x0, + 0x0, + 0xf0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:102 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [ + bytes('v128', [ + 0x44, + 0x44, + 0x44, + 0x0, + 0x0, + 0x0, + 0xf0, + 0xff, + 0x44, + 0x44, + 0x44, + 0x0, + 0x0, + 0x0, + 0xf0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:104 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([42, 42])]), + [i32x4([0x2a, 0x2a, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:106 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([-42, -42])]), + [i32x4([0xffffffd6, 0xffffffd6, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:108 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([123456792, 123456792])]), + [i32x4([0x75bcd18, 0x75bcd18, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:110 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_s_zero`, [f64x2([1234567890, 1234567890])]), + [i32x4([0x499602d2, 0x499602d2, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:114 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([0, 0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:116 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([-0, -0])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:118 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([1.5, 1.5])]), + [i32x4([0x1, 0x1, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:120 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([-1.5, -1.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:122 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([1.9, 1.9])]), + [i32x4([0x1, 0x1, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:124 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([2, 2])]), + [i32x4([0x2, 0x2, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:126 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([-1.9, -1.9])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:128 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([-2, -2])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:130 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([2147483520, 2147483520])]), + [i32x4([0x7fffff80, 0x7fffff80, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:132 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([-2147483520, -2147483520])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:134 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([2147483648, 2147483648])]), + [i32x4([0x80000000, 0x80000000, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:136 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([-2147483648, -2147483648])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:138 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([4294967294, 4294967294])]), + [i32x4([0xfffffffe, 0xfffffffe, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:140 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([-4294967294, -4294967294])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:142 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([2147483647, 2147483647])]), + [i32x4([0x7fffffff, 0x7fffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:144 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([-2147483647, -2147483647])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:146 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([4294967294, 4294967294])]), + [i32x4([0xfffffffe, 0xfffffffe, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:148 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([4294967295, 4294967295])]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:150 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([4294967296, 4294967296])]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:152 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([ + 0.000000000000000000000000000000000000000000001401298464324817, + 0.000000000000000000000000000000000000000000001401298464324817, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:154 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([ + -0.000000000000000000000000000000000000000000001401298464324817, + -0.000000000000000000000000000000000000000000001401298464324817, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:156 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([ + 0.000000000000000000000000000000000000011754943508222875, + 0.000000000000000000000000000000000000011754943508222875, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:158 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([ + -0.000000000000000000000000000000000000011754943508222875, + -0.000000000000000000000000000000000000011754943508222875, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:160 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([0.5, 0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:162 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([-0.5, -0.5])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:164 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([1, 1])]), + [i32x4([0x1, 0x1, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:166 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([-1, -1])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:168 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([1.100000023841858, 1.100000023841858]), + ]), + [i32x4([0x1, 0x1, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:170 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([-1.100000023841858, -1.100000023841858]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:172 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([6.2831854820251465, 6.2831854820251465]), + ]), + [i32x4([0x6, 0x6, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:174 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([-6.2831854820251465, -6.2831854820251465]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:176 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([ + 340282346638528860000000000000000000000, + 340282346638528860000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:178 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([ + -340282346638528860000000000000000000000, + -340282346638528860000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:180 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([0.8999999761581421, 0.8999999761581421]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:182 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([-0.8999999761581421, -0.8999999761581421]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:184 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([0.9999999403953552, 0.9999999403953552]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:186 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([-0.9999999403953552, -0.9999999403953552]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:188 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([6.2831854820251465, 6.2831854820251465]), + ]), + [i32x4([0x6, 0x6, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:190 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([-6.2831854820251465, -6.2831854820251465]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:192 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([ + 340282346638528860000000000000000000000, + 340282346638528860000000000000000000000, + ]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:194 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + f64x2([ + -340282346638528860000000000000000000000, + -340282346638528860000000000000000000000, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:196 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([Infinity, Infinity])]), + [i32x4([0xffffffff, 0xffffffff, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:198 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([-Infinity, -Infinity])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:200 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:202 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:204 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + bytes('v128', [ + 0x44, + 0x44, + 0x44, + 0x0, + 0x0, + 0x0, + 0xf0, + 0x7f, + 0x44, + 0x44, + 0x44, + 0x0, + 0x0, + 0x0, + 0xf0, + 0x7f, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:206 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [ + bytes('v128', [ + 0x44, + 0x44, + 0x44, + 0x0, + 0x0, + 0x0, + 0xf0, + 0xff, + 0x44, + 0x44, + 0x44, + 0x0, + 0x0, + 0x0, + 0xf0, + 0xff, + ]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:208 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([42, 42])]), + [i32x4([0x2a, 0x2a, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:210 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([-42, -42])]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:212 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([123456792, 123456792])]), + [i32x4([0x75bcd18, 0x75bcd18, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:214 +assert_return( + () => invoke($0, `i32x4.trunc_sat_f64x2_u_zero`, [f64x2([1234567890, 1234567890])]), + [i32x4([0x499602d2, 0x499602d2, 0x0, 0x0])], +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:218 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.trunc_sat_f64x2_s_zero (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:219 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.trunc_sat_f64x2_u_zero (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:223 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.trunc_sat_f64x2_s_zero-arg-empty (result v128) + (i32x4.trunc_sat_f64x2_s_zero) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i32x4_trunc_sat_f64x2.wast:231 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.trunc_sat_f64x2_u_zero-arg-empty (result v128) + (i32x4.trunc_sat_f64x2_u_zero) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_arith.wast.js new file mode 100644 index 0000000000..90ad748a42 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_arith.wast.js @@ -0,0 +1,1753 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i64x2_arith.wast + +// ./test/core/simd/simd_i64x2_arith.wast:4 +let $0 = instantiate(`(module + (func (export "i64x2.add") (param v128 v128) (result v128) (i64x2.add (local.get 0) (local.get 1))) + (func (export "i64x2.sub") (param v128 v128) (result v128) (i64x2.sub (local.get 0) (local.get 1))) + (func (export "i64x2.mul") (param v128 v128) (result v128) (i64x2.mul (local.get 0) (local.get 1))) + (func (export "i64x2.neg") (param v128) (result v128) (i64x2.neg (local.get 0))) +)`); + +// ./test/core/simd/simd_i64x2_arith.wast:13 +assert_return( + () => invoke($0, `i64x2.add`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:16 +assert_return( + () => invoke($0, `i64x2.add`, [i64x2([0x0n, 0x0n]), i64x2([0x1n, 0x1n])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:19 +assert_return( + () => invoke($0, `i64x2.add`, [i64x2([0x1n, 0x1n]), i64x2([0x1n, 0x1n])]), + [i64x2([0x2n, 0x2n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:22 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x0n, 0x0n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:25 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x1n, 0x1n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:28 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xfffffffffffffffen, 0xfffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:31 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x3fffffffffffffffn, 0x3fffffffffffffffn]), + i64x2([0x4000000000000000n, 0x4000000000000000n]), + ]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:34 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x4000000000000000n, 0x4000000000000000n]), + i64x2([0x4000000000000000n, 0x4000000000000000n]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:37 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xc000000000000001n, 0xc000000000000001n]), + i64x2([0xc000000000000000n, 0xc000000000000000n]), + ]), + [i64x2([0x8000000000000001n, 0x8000000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:40 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xc000000000000000n, 0xc000000000000000n]), + i64x2([0xc000000000000000n, 0xc000000000000000n]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:43 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xbfffffffffffffffn, 0xbfffffffffffffffn]), + i64x2([0xc000000000000000n, 0xc000000000000000n]), + ]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:46 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x7ffffffffffffffdn, 0x7ffffffffffffffdn]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x7ffffffffffffffen, 0x7ffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:49 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x7ffffffffffffffen, 0x7ffffffffffffffen]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:52 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x8000000000000001n, 0x8000000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:55 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x8000000000000002n, 0x8000000000000002n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x8000000000000001n, 0x8000000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:58 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x8000000000000001n, 0x8000000000000001n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:61 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:64 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + ]), + [i64x2([0xfffffffffffffffen, 0xfffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:67 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0x8000000000000000n, 0x8000000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:70 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0x8000000000000001n, 0x8000000000000001n]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:73 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x0n, 0x0n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:76 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:79 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xfffffffffffffffen, 0xfffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:82 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + ]), + [i64x2([0x7ffffffffffffffen, 0x7ffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:85 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x8000000000000000n, 0x8000000000000000n]), + ]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:88 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xfffffffffffffffen, 0xfffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:91 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x3fffffffffffffffn, 0x3fffffffffffffffn]), + i64x2([0x4000000000000000n, 0x4000000000000000n]), + ]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:94 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x4000000000000000n, 0x4000000000000000n]), + i64x2([0x4000000000000000n, 0x4000000000000000n]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:97 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xc000000000000001n, 0xc000000000000001n]), + i64x2([0xfbfffffff0000001n, 0xfbfffffff0000001n]), + ]), + [i64x2([0xbbfffffff0000002n, 0xbbfffffff0000002n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:100 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xc000000000000000n, 0xc000000000000000n]), + i64x2([0xfc00000000000000n, 0xfc00000000000000n]), + ]), + [i64x2([0xbc00000000000000n, 0xbc00000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:103 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xc000000000000000n, 0xc000000000000000n]), + i64x2([0xfbffffffffffffffn, 0xfbffffffffffffffn]), + ]), + [i64x2([0xbbffffffffffffffn, 0xbbffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:106 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i64x2([0x7ffffffffffffffn, 0x7ffffffffffffffn]), + ]), + [i64x2([0x87fffffffffffffen, 0x87fffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:109 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:112 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:115 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i64x2([0x8000000000000000n, 0x8000000000000000n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:118 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0x8000000000000000n, 0x8000000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:121 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:124 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xfffffffffffffffen, 0xfffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:127 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:130 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x1n, 0x1n]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:133 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i16x8([0x0, 0x0, 0x0, 0x8000, 0x0, 0x0, 0x0, 0x8000]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:136 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x1n, 0x1n]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:139 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i32x4([0x0, 0x80000000, 0x0, 0x80000000]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:142 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x1n, 0x1n]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:145 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + f64x2([0, 0]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:148 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:151 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + f64x2([1, 1]), + ]), + [i64x2([0xbff0000000000000n, 0xbff0000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:154 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + f64x2([-1, -1]), + ]), + [i64x2([0x3ff0000000000000n, 0x3ff0000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:157 +assert_return( + () => invoke($0, `i64x2.add`, [i64x2([0x1n, 0x1n]), f64x2([Infinity, Infinity])]), + [i64x2([0x7ff0000000000001n, 0x7ff0000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:160 +assert_return( + () => invoke($0, `i64x2.add`, [i64x2([0x1n, 0x1n]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xfff0000000000001n, 0xfff0000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:163 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x1n, 0x1n]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x7ff8000000000001n, 0x7ff8000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:166 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x0n, 0x1n]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:169 +assert_return( + () => invoke($0, `i64x2.add`, [i64x2([0x0n, 0x1n]), i64x2([0x0n, 0x2n])]), + [i64x2([0x0n, 0x3n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:172 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x112210f47de98115n, 0x112210f47de98115n]), + i64x2([0x112210f47de98115n, 0x112210f47de98115n]), + ]), + [i64x2([0x224421e8fbd3022an, 0x224421e8fbd3022an])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:175 +assert_return( + () => invoke($0, `i64x2.add`, [ + i64x2([0x1234567890abcdefn, 0x1234567890abcdefn]), + i64x2([0x90abcdef12345678n, 0x90abcdef12345678n]), + ]), + [i64x2([0xa2e02467a2e02467n, 0xa2e02467a2e02467n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:180 +assert_return( + () => invoke($0, `i64x2.sub`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:183 +assert_return( + () => invoke($0, `i64x2.sub`, [i64x2([0x0n, 0x0n]), i64x2([0x1n, 0x1n])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:186 +assert_return( + () => invoke($0, `i64x2.sub`, [i64x2([0x1n, 0x1n]), i64x2([0x1n, 0x1n])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:189 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x0n, 0x0n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:192 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x1n, 0x1n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x2n, 0x2n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:195 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:198 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x3fffffffffffffffn, 0x3fffffffffffffffn]), + i64x2([0x4000000000000000n, 0x4000000000000000n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:201 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x4000000000000000n, 0x4000000000000000n]), + i64x2([0x4000000000000000n, 0x4000000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:204 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xc000000000000001n, 0xc000000000000001n]), + i64x2([0xc000000000000000n, 0xc000000000000000n]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:207 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xc000000000000000n, 0xc000000000000000n]), + i64x2([0xc000000000000000n, 0xc000000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:210 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xbfffffffffffffffn, 0xbfffffffffffffffn]), + i64x2([0xc000000000000000n, 0xc000000000000000n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:213 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x7ffffffffffffffdn, 0x7ffffffffffffffdn]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x7ffffffffffffffcn, 0x7ffffffffffffffcn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:216 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x7ffffffffffffffen, 0x7ffffffffffffffen]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x7ffffffffffffffdn, 0x7ffffffffffffffdn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:219 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:222 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x8000000000000002n, 0x8000000000000002n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x8000000000000003n, 0x8000000000000003n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:225 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x8000000000000001n, 0x8000000000000001n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x8000000000000002n, 0x8000000000000002n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:228 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x8000000000000001n, 0x8000000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:231 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:234 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0x8000000000000000n, 0x8000000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:237 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0x8000000000000001n, 0x8000000000000001n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:240 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x0n, 0x0n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:243 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0xfffffffffffffffen, 0xfffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:246 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:249 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:252 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x8000000000000000n, 0x8000000000000000n]), + ]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:255 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:258 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x3fffffffffffffffn, 0x3fffffffffffffffn]), + i64x2([0x4000000000000000n, 0x4000000000000000n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:261 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x4000000000000000n, 0x4000000000000000n]), + i64x2([0x4000000000000000n, 0x4000000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:264 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xc000000000000001n, 0xc000000000000001n]), + i64x2([0xfbfffffff0000001n, 0xfbfffffff0000001n]), + ]), + [i64x2([0xc400000010000000n, 0xc400000010000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:267 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xc000000000000000n, 0xc000000000000000n]), + i64x2([0xfc00000000000000n, 0xfc00000000000000n]), + ]), + [i64x2([0xc400000000000000n, 0xc400000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:270 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xc000000000000000n, 0xc000000000000000n]), + i64x2([0xfbffffffffffffffn, 0xfbffffffffffffffn]), + ]), + [i64x2([0xc400000000000001n, 0xc400000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:273 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i64x2([0x7ffffffffffffffn, 0x7ffffffffffffffn]), + ]), + [i64x2([0x7800000000000000n, 0x7800000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:276 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x7ffffffffffffffen, 0x7ffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:279 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x8000000000000001n, 0x8000000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:282 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i64x2([0x8000000000000000n, 0x8000000000000000n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:285 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0x8000000000000000n, 0x8000000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:288 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0xfffffffffffffffen, 0xfffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:291 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:294 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:297 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x1n, 0x1n]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i64x2([0x2n, 0x2n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:300 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i16x8([0x0, 0x0, 0x0, 0x8000, 0x0, 0x0, 0x0, 0x8000]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:303 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x1n, 0x1n]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i64x2([0x2n, 0x2n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:306 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i32x4([0x0, 0x80000000, 0x0, 0x80000000]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:309 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x1n, 0x1n]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x2n, 0x2n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:312 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + f64x2([0, 0]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:315 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + f64x2([-0, -0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:318 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + f64x2([1, 1]), + ]), + [i64x2([0x4010000000000000n, 0x4010000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:321 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + f64x2([-1, -1]), + ]), + [i64x2([0xc010000000000000n, 0xc010000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:324 +assert_return( + () => invoke($0, `i64x2.sub`, [i64x2([0x1n, 0x1n]), f64x2([Infinity, Infinity])]), + [i64x2([0x8010000000000001n, 0x8010000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:327 +assert_return( + () => invoke($0, `i64x2.sub`, [i64x2([0x1n, 0x1n]), f64x2([-Infinity, -Infinity])]), + [i64x2([0x10000000000001n, 0x10000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:330 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x1n, 0x1n]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x8008000000000001n, 0x8008000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:333 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x0n, 0x1n]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x2n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:336 +assert_return( + () => invoke($0, `i64x2.sub`, [i64x2([0x0n, 0x1n]), i64x2([0x0n, 0x2n])]), + [i64x2([0x0n, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:339 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x2c9c7076ed2f8115n, 0x2c9c7076ed2f8115n]), + i64x2([0x112210f47de98115n, 0x112210f47de98115n]), + ]), + [i64x2([0x1b7a5f826f460000n, 0x1b7a5f826f460000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:342 +assert_return( + () => invoke($0, `i64x2.sub`, [ + i64x2([0x90abcdef87654321n, 0x90abcdef87654321n]), + i64x2([0x1234567890abcdefn, 0x1234567890abcdefn]), + ]), + [i64x2([0x7e777776f6b97532n, 0x7e777776f6b97532n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:347 +assert_return( + () => invoke($0, `i64x2.mul`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:350 +assert_return( + () => invoke($0, `i64x2.mul`, [i64x2([0x0n, 0x0n]), i64x2([0x1n, 0x1n])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:353 +assert_return( + () => invoke($0, `i64x2.mul`, [i64x2([0x1n, 0x1n]), i64x2([0x1n, 0x1n])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:356 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x0n, 0x0n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:359 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x1n, 0x1n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:362 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:365 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x3fffffffffffffffn, 0x3fffffffffffffffn]), + i64x2([0x4000000000000000n, 0x4000000000000000n]), + ]), + [i64x2([0xc000000000000000n, 0xc000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:368 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x4000000000000000n, 0x4000000000000000n]), + i64x2([0x4000000000000000n, 0x4000000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:371 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xc000000000000001n, 0xc000000000000001n]), + i64x2([0xc000000000000000n, 0xc000000000000000n]), + ]), + [i64x2([0xc000000000000000n, 0xc000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:374 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xc000000000000000n, 0xc000000000000000n]), + i64x2([0xc000000000000000n, 0xc000000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:377 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xbfffffffffffffffn, 0xbfffffffffffffffn]), + i64x2([0xc000000000000000n, 0xc000000000000000n]), + ]), + [i64x2([0x4000000000000000n, 0x4000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:380 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x7ffffffffffffffdn, 0x7ffffffffffffffdn]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x7ffffffffffffffdn, 0x7ffffffffffffffdn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:383 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x7ffffffffffffffen, 0x7ffffffffffffffen]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x7ffffffffffffffen, 0x7ffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:386 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:389 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x8000000000000002n, 0x8000000000000002n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x7ffffffffffffffen, 0x7ffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:392 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x8000000000000001n, 0x8000000000000001n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:395 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:398 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:401 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0x8000000000000000n, 0x8000000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:404 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0x8000000000000001n, 0x8000000000000001n]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:407 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x0n, 0x0n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:410 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:413 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:416 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + ]), + [i64x2([0x8000000000000001n, 0x8000000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:419 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x8000000000000000n, 0x8000000000000000n]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:422 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:425 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x3fffffffffffffffn, 0x3fffffffffffffffn]), + i64x2([0x4000000000000000n, 0x4000000000000000n]), + ]), + [i64x2([0xc000000000000000n, 0xc000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:428 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x4000000000000000n, 0x4000000000000000n]), + i64x2([0x4000000000000000n, 0x4000000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:431 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xc000000000000001n, 0xc000000000000001n]), + i64x2([0xfbfffffff0000001n, 0xfbfffffff0000001n]), + ]), + [i64x2([0xbbfffffff0000001n, 0xbbfffffff0000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:434 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xc000000000000000n, 0xc000000000000000n]), + i64x2([0xfc00000000000000n, 0xfc00000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:437 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xc000000000000000n, 0xc000000000000000n]), + i64x2([0xfbffffffffffffffn, 0xfbffffffffffffffn]), + ]), + [i64x2([0x4000000000000000n, 0x4000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:440 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i64x2([0x7ffffffffffffffn, 0x7ffffffffffffffn]), + ]), + [i64x2([0x7800000000000001n, 0x7800000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:443 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:446 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:449 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn]), + i64x2([0x8000000000000000n, 0x8000000000000000n]), + ]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:452 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i64x2([0x8000000000000000n, 0x8000000000000000n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:455 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x1n, 0x1n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:458 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:461 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:464 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:467 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i16x8([0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x2]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:470 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:473 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x8000000000000000n, 0x8000000000000000n]), + i32x4([0x0, 0x2, 0x0, 0x2]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:476 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:479 +assert_return( + () => invoke($0, `i64x2.mul`, [i64x2([0x80000000n, 0x80000000n]), f64x2([0, 0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:482 +assert_return( + () => invoke($0, `i64x2.mul`, [i64x2([0x80000000n, 0x80000000n]), f64x2([-0, -0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:485 +assert_return( + () => invoke($0, `i64x2.mul`, [i64x2([0x80000000n, 0x80000000n]), f64x2([1, 1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:488 +assert_return( + () => invoke($0, `i64x2.mul`, [i64x2([0x80000000n, 0x80000000n]), f64x2([-1, -1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:491 +assert_return( + () => invoke($0, `i64x2.mul`, [i64x2([0x1n, 0x1n]), f64x2([Infinity, Infinity])]), + [i64x2([0x7ff0000000000000n, 0x7ff0000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:494 +assert_return( + () => invoke($0, `i64x2.mul`, [i64x2([0x1n, 0x1n]), f64x2([-Infinity, -Infinity])]), + [i64x2([0xfff0000000000000n, 0xfff0000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:497 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x1n, 0x1n]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [i64x2([0x7ff8000000000000n, 0x7ff8000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:500 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x0n, 0x1n]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:503 +assert_return( + () => invoke($0, `i64x2.mul`, [i64x2([0x0n, 0x1n]), i64x2([0x0n, 0x2n])]), + [i64x2([0x0n, 0x2n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:506 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x112210f47de98115n, 0x112210f47de98115n]), + i64x2([0x112210f47de98115n, 0x112210f47de98115n]), + ]), + [i64x2([0x86c28d12bb502bb9n, 0x86c28d12bb502bb9n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:509 +assert_return( + () => invoke($0, `i64x2.mul`, [ + i64x2([0x1234567890abcdefn, 0x1234567890abcdefn]), + i64x2([0x90abcdef87654321n, 0x90abcdef87654321n]), + ]), + [i64x2([0x602f05e9e55618cfn, 0x602f05e9e55618cfn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:514 +assert_return(() => invoke($0, `i64x2.neg`, [i64x2([0x0n, 0x0n])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_i64x2_arith.wast:516 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0x1n, 0x1n])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:518 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:520 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0x7ffffffffffffffen, 0x7ffffffffffffffen])]), + [i64x2([0x8000000000000002n, 0x8000000000000002n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:522 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0x8000000000000001n, 0x8000000000000001n])]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:524 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0x8000000000000000n, 0x8000000000000000n])]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:526 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])]), + [i64x2([0x8000000000000001n, 0x8000000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:528 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:530 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0x1n, 0x1n])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:532 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:534 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0x8000000000000000n, 0x8000000000000000n])]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:536 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0x8000000000000001n, 0x8000000000000001n])]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:538 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])]), + [i64x2([0x8000000000000001n, 0x8000000000000001n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:540 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0x8000000000000000n, 0x8000000000000000n])]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:542 +assert_return( + () => invoke($0, `i64x2.neg`, [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:546 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.neg (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith.wast:547 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.add (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith.wast:548 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.sub (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith.wast:549 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.mul (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith.wast:553 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.neg-arg-empty (result v128) + (i64x2.neg) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith.wast:561 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.add-1st-arg-empty (result v128) + (i64x2.add (v128.const i64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith.wast:569 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.add-arg-empty (result v128) + (i64x2.add) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith.wast:577 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.sub-1st-arg-empty (result v128) + (i64x2.sub (v128.const i64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith.wast:585 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.sub-arg-empty (result v128) + (i64x2.sub) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith.wast:593 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.mul-1st-arg-empty (result v128) + (i64x2.mul (v128.const i64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith.wast:601 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.mul-arg-empty (result v128) + (i64x2.mul) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith.wast:611 +let $1 = instantiate(`(module + (func (export "add-sub") (param v128 v128 v128) (result v128) + (i64x2.add (i64x2.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "mul-add") (param v128 v128 v128) (result v128) + (i64x2.mul (i64x2.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "mul-sub") (param v128 v128 v128) (result v128) + (i64x2.mul (i64x2.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "sub-add") (param v128 v128 v128) (result v128) + (i64x2.sub (i64x2.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "add-neg") (param v128 v128) (result v128) + (i64x2.add (i64x2.neg (local.get 0)) (local.get 1))) + (func (export "mul-neg") (param v128 v128) (result v128) + (i64x2.mul (i64x2.neg (local.get 0)) (local.get 1))) + (func (export "sub-neg") (param v128 v128) (result v128) + (i64x2.sub (i64x2.neg (local.get 0)) (local.get 1))) +)`); + +// ./test/core/simd/simd_i64x2_arith.wast:628 +assert_return( + () => invoke($1, `add-sub`, [ + i64x2([0x0n, 0x1n]), + i64x2([0x0n, 0x2n]), + i64x2([0x0n, 0x2n]), + ]), + [i64x2([0x0n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:632 +assert_return( + () => invoke($1, `mul-add`, [ + i64x2([0x0n, 0x1n]), + i64x2([0x0n, 0x1n]), + i64x2([0x2n, 0x2n]), + ]), + [i64x2([0x0n, 0x4n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:636 +assert_return( + () => invoke($1, `mul-sub`, [ + i64x2([0x0n, 0x2n]), + i64x2([0x0n, 0x1n]), + i64x2([0x0n, 0x1n]), + ]), + [i64x2([0x0n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:640 +assert_return( + () => invoke($1, `sub-add`, [ + i64x2([0x0n, 0x1n]), + i64x2([0x0n, 0x2n]), + i64x2([0x0n, 0x2n]), + ]), + [i64x2([0x0n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:644 +assert_return( + () => invoke($1, `add-neg`, [i64x2([0x0n, 0x1n]), i64x2([0x0n, 0x1n])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:647 +assert_return( + () => invoke($1, `mul-neg`, [i64x2([0x0n, 0x1n]), i64x2([0x2n, 0x2n])]), + [i64x2([0x0n, 0xfffffffffffffffen])], +); + +// ./test/core/simd/simd_i64x2_arith.wast:650 +assert_return( + () => invoke($1, `sub-neg`, [i64x2([0x0n, 0x1n]), i64x2([0x0n, 0x1n])]), + [i64x2([0x0n, 0xfffffffffffffffen])], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_arith2.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_arith2.wast.js new file mode 100644 index 0000000000..208a463b94 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_arith2.wast.js @@ -0,0 +1,149 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i64x2_arith2.wast + +// ./test/core/simd/simd_i64x2_arith2.wast:3 +let $0 = instantiate(`(module + (func (export "i64x2.abs") (param v128) (result v128) (i64x2.abs (local.get 0))) + (func (export "i64x2.abs_with_const_0") (result v128) (i64x2.abs (v128.const i64x2 -9223372036854775808 9223372036854775807))) +)`); + +// ./test/core/simd/simd_i64x2_arith2.wast:8 +assert_return(() => invoke($0, `i64x2.abs`, [i64x2([0x1n, 0x1n])]), [i64x2([0x1n, 0x1n])]); + +// ./test/core/simd/simd_i64x2_arith2.wast:10 +assert_return( + () => invoke($0, `i64x2.abs`, [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith2.wast:12 +assert_return( + () => invoke($0, `i64x2.abs`, [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith2.wast:14 +assert_return( + () => invoke($0, `i64x2.abs`, [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_arith2.wast:16 +assert_return( + () => invoke($0, `i64x2.abs`, [i64x2([0x8000000000000000n, 0x8000000000000000n])]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith2.wast:18 +assert_return( + () => invoke($0, `i64x2.abs`, [i64x2([0x8000000000000000n, 0x8000000000000000n])]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith2.wast:20 +assert_return( + () => invoke($0, `i64x2.abs`, [i64x2([0x8000000000000000n, 0x8000000000000000n])]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith2.wast:22 +assert_return( + () => invoke($0, `i64x2.abs`, [i64x2([0x8000000000000000n, 0x8000000000000000n])]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_arith2.wast:24 +assert_return(() => invoke($0, `i64x2.abs`, [i64x2([0x7bn, 0x7bn])]), [i64x2([0x7bn, 0x7bn])]); + +// ./test/core/simd/simd_i64x2_arith2.wast:26 +assert_return( + () => invoke($0, `i64x2.abs`, [i64x2([0xffffffffffffff85n, 0xffffffffffffff85n])]), + [i64x2([0x7bn, 0x7bn])], +); + +// ./test/core/simd/simd_i64x2_arith2.wast:28 +assert_return(() => invoke($0, `i64x2.abs`, [i64x2([0x80n, 0x80n])]), [i64x2([0x80n, 0x80n])]); + +// ./test/core/simd/simd_i64x2_arith2.wast:30 +assert_return( + () => invoke($0, `i64x2.abs`, [i64x2([0xffffffffffffff80n, 0xffffffffffffff80n])]), + [i64x2([0x80n, 0x80n])], +); + +// ./test/core/simd/simd_i64x2_arith2.wast:32 +assert_return(() => invoke($0, `i64x2.abs`, [i64x2([0x80n, 0x80n])]), [i64x2([0x80n, 0x80n])]); + +// ./test/core/simd/simd_i64x2_arith2.wast:34 +assert_return( + () => invoke($0, `i64x2.abs`, [i64x2([0xffffffffffffff80n, 0xffffffffffffff80n])]), + [i64x2([0x80n, 0x80n])], +); + +// ./test/core/simd/simd_i64x2_arith2.wast:38 +assert_return( + () => invoke($0, `i64x2.abs_with_const_0`, []), + [i64x2([0x8000000000000000n, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith2.wast:43 +assert_return( + () => invoke($0, `i64x2.abs`, [i64x2([0x8000000000000000n, 0x7fffffffffffffffn])]), + [i64x2([0x8000000000000000n, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_arith2.wast:47 +assert_return(() => invoke($0, `i64x2.abs`, [i64x2([0x0n, 0x0n])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_i64x2_arith2.wast:49 +assert_return(() => invoke($0, `i64x2.abs`, [i64x2([0x0n, 0x0n])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_i64x2_arith2.wast:51 +assert_return(() => invoke($0, `i64x2.abs`, [i64x2([0x0n, 0x0n])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_i64x2_arith2.wast:53 +assert_return(() => invoke($0, `i64x2.abs`, [i64x2([0x0n, 0x0n])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_i64x2_arith2.wast:59 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.abs (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith2.wast:63 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.abs-arg-empty (result v128) + (i64x2.abs) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_arith2.wast:73 +let $1 = instantiate(`(module + (func (export "i64x2.abs-i64x2.abs") (param v128) (result v128) (i64x2.abs (i64x2.abs (local.get 0)))) +)`); + +// ./test/core/simd/simd_i64x2_arith2.wast:77 +assert_return( + () => invoke($1, `i64x2.abs-i64x2.abs`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x1n, 0x1n])], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_cmp.wast.js new file mode 100644 index 0000000000..9e346fa8b3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_cmp.wast.js @@ -0,0 +1,980 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i64x2_cmp.wast + +// ./test/core/simd/simd_i64x2_cmp.wast:4 +let $0 = instantiate(`(module + (func (export "eq") (param $$x v128) (param $$y v128) (result v128) (i64x2.eq (local.get $$x) (local.get $$y))) + (func (export "ne") (param $$x v128) (param $$y v128) (result v128) (i64x2.ne (local.get $$x) (local.get $$y))) + (func (export "lt_s") (param $$x v128) (param $$y v128) (result v128) (i64x2.lt_s (local.get $$x) (local.get $$y))) + (func (export "le_s") (param $$x v128) (param $$y v128) (result v128) (i64x2.le_s (local.get $$x) (local.get $$y))) + (func (export "gt_s") (param $$x v128) (param $$y v128) (result v128) (i64x2.gt_s (local.get $$x) (local.get $$y))) + (func (export "ge_s") (param $$x v128) (param $$y v128) (result v128) (i64x2.ge_s (local.get $$x) (local.get $$y))) +)`); + +// ./test/core/simd/simd_i64x2_cmp.wast:17 +assert_return( + () => invoke($0, `eq`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:20 +assert_return( + () => invoke($0, `eq`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:23 +assert_return( + () => invoke($0, `eq`, [ + i64x2([0xf0f0f0f0f0f0f0f0n, 0xf0f0f0f0f0f0f0f0n]), + i64x2([0xf0f0f0f0f0f0f0f0n, 0xf0f0f0f0f0f0f0f0n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:26 +assert_return( + () => invoke($0, `eq`, [ + i64x2([0xf0f0f0f0f0f0f0fn, 0xf0f0f0f0f0f0f0fn]), + i64x2([0xf0f0f0f0f0f0f0fn, 0xf0f0f0f0f0f0f0fn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:29 +assert_return( + () => invoke($0, `eq`, [ + i64x2([0xffffffffffffffffn, 0x0n]), + i64x2([0xffffffffffffffffn, 0x0n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:32 +assert_return( + () => invoke($0, `eq`, [ + i64x2([0x0n, 0xffffffffffffffffn]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:35 +assert_return( + () => invoke($0, `eq`, [ + i64x2([0x3020100n, 0x11100904n]), + i64x2([0x3020100n, 0x11100904n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:38 +assert_return( + () => invoke($0, `eq`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xfffffffffffffffn, 0xfffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:41 +assert_return(() => invoke($0, `eq`, [i64x2([0x1n, 0x1n]), i64x2([0x2n, 0x2n])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_i64x2_cmp.wast:50 +assert_return( + () => invoke($0, `ne`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:53 +assert_return(() => invoke($0, `ne`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_i64x2_cmp.wast:56 +assert_return( + () => invoke($0, `ne`, [ + i64x2([0xf0f0f0f0f0f0f0f0n, 0xf0f0f0f0f0f0f0f0n]), + i64x2([0xf0f0f0f0f0f0f0f0n, 0xf0f0f0f0f0f0f0f0n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:59 +assert_return( + () => invoke($0, `ne`, [ + i64x2([0xf0f0f0f0f0f0f0fn, 0xf0f0f0f0f0f0f0fn]), + i64x2([0xf0f0f0f0f0f0f0fn, 0xf0f0f0f0f0f0f0fn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:62 +assert_return( + () => invoke($0, `ne`, [ + i64x2([0xffffffffffffffffn, 0x0n]), + i64x2([0xffffffffffffffffn, 0x0n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:65 +assert_return( + () => invoke($0, `ne`, [ + i64x2([0x0n, 0xffffffffffffffffn]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:68 +assert_return( + () => invoke($0, `ne`, [ + i64x2([0x3020100n, 0x11100904n]), + i64x2([0x3020100n, 0x11100904n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:77 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:80 +assert_return( + () => invoke($0, `lt_s`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:83 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0xf0f0f0f0f0f0f0f0n, 0xf0f0f0f0f0f0f0f0n]), + i64x2([0xf0f0f0f0f0f0f0f0n, 0xf0f0f0f0f0f0f0f0n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:86 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0xf0f0f0f0f0f0f0fn, 0xf0f0f0f0f0f0f0fn]), + i64x2([0xf0f0f0f0f0f0f0fn, 0xf0f0f0f0f0f0f0fn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:89 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0xffffffffffffffffn, 0x0n]), + i64x2([0xffffffffffffffffn, 0x0n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:92 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0x0n, 0xffffffffffffffffn]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:95 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0x302010011100904n, 0x1a0b0a12ffabaa1bn]), + i64x2([0x302010011100904n, 0x1a0b0a12ffabaa1bn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:100 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:103 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:106 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0x8080808080808080n, 0x8080808080808080n]), + i64x2([0x8080808080808080n, 0x8080808080808080n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:109 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0x8080808080808080n, 0x8080808080808080n]), + i64x2([0x8080808080808080n, 0x8080808080808080n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:112 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0x8382818000fffefdn, 0x7f020100fffefd80n]), + i64x2([0x8382818000fffefdn, 0x7f020100fffefd80n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:117 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:120 +assert_return( + () => invoke($0, `lt_s`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:123 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:126 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:129 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0xffffffffffffffffn, 0x0n]), + i64x2([0xffffffffffffffffn, 0x0n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:132 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0x0n, 0xffffffffffffffffn]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:135 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0x8000000000000001n, 0xffffffffffffffffn]), + i64x2([0x8000000000000001n, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:140 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0xc060000000000000n, 0xc05fc00000000000n]), + f64x2([-128, -127]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:143 +assert_return( + () => invoke($0, `lt_s`, [ + i64x2([0x3ff0000000000000n, 0x405fc00000000000n]), + f64x2([1, 127]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:152 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:155 +assert_return( + () => invoke($0, `le_s`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:158 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0xf0f0f0f0f0f0f0f0n, 0xf0f0f0f0f0f0f0f0n]), + i64x2([0xf0f0f0f0f0f0f0f0n, 0xf0f0f0f0f0f0f0f0n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:161 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0xf0f0f0f0f0f0f0fn, 0xf0f0f0f0f0f0f0fn]), + i64x2([0xf0f0f0f0f0f0f0fn, 0xf0f0f0f0f0f0f0fn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:164 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0xffffffffffffffffn, 0x0n]), + i64x2([0xffffffffffffffffn, 0x0n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:167 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0x0n, 0xffffffffffffffffn]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:170 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0x302010011100904n, 0x1a0b0a12ffabaa1bn]), + i64x2([0x302010011100904n, 0x1a0b0a12ffabaa1bn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:175 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:178 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:181 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0x8080808080808080n, 0x8080808080808080n]), + i64x2([0x8080808080808080n, 0x8080808080808080n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:184 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0x8080808080808080n, 0x8080808080808080n]), + i64x2([0x8080808080808080n, 0x8080808080808080n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:187 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0x8382818000fffefdn, 0x7f020100fffefd80n]), + i64x2([0x8382818000fffefdn, 0x7f020100fffefd80n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:192 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:195 +assert_return( + () => invoke($0, `le_s`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0xffffffffffffffffn])]), + [i64x2([0xffffffffffffffffn, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:198 +assert_return( + () => invoke($0, `le_s`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:201 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:204 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:207 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0xffffffffffffffffn, 0x0n]), + i64x2([0xffffffffffffffffn, 0x0n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:210 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0x0n, 0xffffffffffffffffn]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:213 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0x8000000000000001n, 0xffffffffffffffffn]), + i64x2([0x8000000000000001n, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:218 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0xc060000000000000n, 0xc05fc00000000000n]), + f64x2([-128, -127]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:221 +assert_return( + () => invoke($0, `le_s`, [ + i64x2([0x3ff0000000000000n, 0x405fc00000000000n]), + f64x2([1, 127]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:230 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:233 +assert_return( + () => invoke($0, `gt_s`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:236 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0xf0f0f0f0f0f0f0f0n, 0xf0f0f0f0f0f0f0f0n]), + i64x2([0xf0f0f0f0f0f0f0f0n, 0xf0f0f0f0f0f0f0f0n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:239 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0xf0f0f0f0f0f0f0fn, 0xf0f0f0f0f0f0f0fn]), + i64x2([0xf0f0f0f0f0f0f0fn, 0xf0f0f0f0f0f0f0fn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:242 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0xffffffffffffffffn, 0x0n]), + i64x2([0xffffffffffffffffn, 0x0n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:245 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0x0n, 0xffffffffffffffffn]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:248 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0x302010011100904n, 0x1a0b0a12ffabaa1bn]), + i64x2([0x302010011100904n, 0x1a0b0a12ffabaa1bn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:253 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:256 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:259 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0x8080808080808080n, 0x8080808080808080n]), + i64x2([0x8080808080808080n, 0x8080808080808080n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:262 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0x8080808080808080n, 0x8080808080808080n]), + i64x2([0x8080808080808080n, 0x8080808080808080n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:265 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0x8382818000fffefdn, 0x7f020100fffefd80n]), + i64x2([0x8382818000fffefdn, 0x7f020100fffefd80n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:270 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:273 +assert_return( + () => invoke($0, `gt_s`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:276 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:279 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:282 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0xffffffffffffffffn, 0x0n]), + i64x2([0xffffffffffffffffn, 0x0n]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:285 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0x0n, 0xffffffffffffffffn]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:288 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0x8000000000000001n, 0xffffffffffffffffn]), + i64x2([0x8000000000000001n, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:293 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0xc060000000000000n, 0xc05fc00000000000n]), + f64x2([-128, -127]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:296 +assert_return( + () => invoke($0, `gt_s`, [ + i64x2([0x3ff0000000000000n, 0x405fc00000000000n]), + f64x2([1, 127]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:305 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:308 +assert_return( + () => invoke($0, `ge_s`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:311 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0xf0f0f0f0f0f0f0f0n, 0xf0f0f0f0f0f0f0f0n]), + i64x2([0xf0f0f0f0f0f0f0f0n, 0xf0f0f0f0f0f0f0f0n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:314 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0xf0f0f0f0f0f0f0fn, 0xf0f0f0f0f0f0f0fn]), + i64x2([0xf0f0f0f0f0f0f0fn, 0xf0f0f0f0f0f0f0fn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:317 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0xffffffffffffffffn, 0x0n]), + i64x2([0xffffffffffffffffn, 0x0n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:320 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0x0n, 0xffffffffffffffffn]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:323 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0x302010011100904n, 0x1a0b0a12ffabaa1bn]), + i64x2([0x302010011100904n, 0x1a0b0a12ffabaa1bn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:328 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:331 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:334 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0x8080808080808080n, 0x8080808080808080n]), + i64x2([0x8080808080808080n, 0x8080808080808080n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:337 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0x8080808080808080n, 0x8080808080808080n]), + i64x2([0x8080808080808080n, 0x8080808080808080n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:340 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0x8382818000fffefdn, 0x7f020100fffefd80n]), + i64x2([0x8382818000fffefdn, 0x7f020100fffefd80n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:345 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:348 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0x0n, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:351 +assert_return( + () => invoke($0, `ge_s`, [i64x2([0x0n, 0x0n]), i64x2([0x0n, 0x0n])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:354 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:357 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:360 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0xffffffffffffffffn, 0x0n]), + i64x2([0xffffffffffffffffn, 0x0n]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:363 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0x0n, 0xffffffffffffffffn]), + i64x2([0x0n, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:366 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0x8000000000000001n, 0xffffffffffffffffn]), + i64x2([0x8000000000000001n, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:371 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0xc060000000000000n, 0xc05fc00000000000n]), + f64x2([-128, -127]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:374 +assert_return( + () => invoke($0, `ge_s`, [ + i64x2([0x3ff0000000000000n, 0x405fc00000000000n]), + f64x2([1, 127]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_cmp.wast:380 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.eq (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_cmp.wast:381 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.ne (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_cmp.wast:382 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.ge_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_cmp.wast:383 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.gt_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_cmp.wast:384 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.le_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_cmp.wast:385 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.lt_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_cmp.wast:389 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.eq-1st-arg-empty (result v128) + (i64x2.eq (v128.const i64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_cmp.wast:397 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.eq-arg-empty (result v128) + (i64x2.eq) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_cmp.wast:405 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.ne-1st-arg-empty (result v128) + (i64x2.ne (v128.const i64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_cmp.wast:413 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.ne-arg-empty (result v128) + (i64x2.ne) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_extmul_i32x4.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_extmul_i32x4.wast.js new file mode 100644 index 0000000000..7427c7fd0d --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_extmul_i32x4.wast.js @@ -0,0 +1,1066 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:4 +let $0 = instantiate(`(module + (func (export "i64x2.extmul_low_i32x4_s") (param v128 v128) (result v128) (i64x2.extmul_low_i32x4_s (local.get 0) (local.get 1))) + (func (export "i64x2.extmul_high_i32x4_s") (param v128 v128) (result v128) (i64x2.extmul_high_i32x4_s (local.get 0) (local.get 1))) + (func (export "i64x2.extmul_low_i32x4_u") (param v128 v128) (result v128) (i64x2.extmul_low_i32x4_u (local.get 0) (local.get 1))) + (func (export "i64x2.extmul_high_i32x4_u") (param v128 v128) (result v128) (i64x2.extmul_high_i32x4_u (local.get 0) (local.get 1))) +)`); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:13 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:16 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:19 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:22 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:25 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:28 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:31 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i64x2([0xfffffffc0000000n, 0xfffffffc0000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:34 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i64x2([0x1000000000000000n, 0x1000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:37 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0xc0000001, 0xc0000001, 0xc0000001, 0xc0000001]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i64x2([0xfffffffc0000000n, 0xfffffffc0000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:40 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i64x2([0x1000000000000000n, 0x1000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:43 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0xbfffffff, 0xbfffffff, 0xbfffffff, 0xbfffffff]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i64x2([0x1000000040000000n, 0x1000000040000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:46 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x7ffffffd, 0x7ffffffd, 0x7ffffffd, 0x7ffffffd]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x7ffffffdn, 0x7ffffffdn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:49 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x7ffffffen, 0x7ffffffen])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:52 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0xffffffff80000000n, 0xffffffff80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:55 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x80000002, 0x80000002, 0x80000002, 0x80000002]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x7ffffffen, 0x7ffffffen])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:58 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:61 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:64 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x3fffffff00000001n, 0x3fffffff00000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:67 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i64x2([0x4000000000000000n, 0x4000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:70 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + ]), + [i64x2([0x3fffffff80000000n, 0x3fffffff80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:73 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:76 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:79 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:82 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0xffffffff80000001n, 0xffffffff80000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:85 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:88 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:93 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:96 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:99 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:102 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:105 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:108 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:111 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i64x2([0xfffffffc0000000n, 0xfffffffc0000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:114 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i64x2([0x1000000000000000n, 0x1000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:117 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0xc0000001, 0xc0000001, 0xc0000001, 0xc0000001]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i64x2([0xfffffffc0000000n, 0xfffffffc0000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:120 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i64x2([0x1000000000000000n, 0x1000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:123 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0xbfffffff, 0xbfffffff, 0xbfffffff, 0xbfffffff]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i64x2([0x1000000040000000n, 0x1000000040000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:126 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x7ffffffd, 0x7ffffffd, 0x7ffffffd, 0x7ffffffd]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x7ffffffdn, 0x7ffffffdn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:129 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x7ffffffen, 0x7ffffffen])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:132 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0xffffffff80000000n, 0xffffffff80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:135 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x80000002, 0x80000002, 0x80000002, 0x80000002]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x7ffffffen, 0x7ffffffen])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:138 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:141 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:144 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x3fffffff00000001n, 0x3fffffff00000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:147 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i64x2([0x4000000000000000n, 0x4000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:150 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + ]), + [i64x2([0x3fffffff80000000n, 0x3fffffff80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:153 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:156 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:159 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:162 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0xffffffff80000001n, 0xffffffff80000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:165 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:168 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:173 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:176 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:179 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:182 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:185 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffffn, 0xffffffffn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:188 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xfffffffe00000001n, 0xfffffffe00000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:191 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i64x2([0xfffffffc0000000n, 0xfffffffc0000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:194 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i64x2([0x1000000000000000n, 0x1000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:197 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0xc0000001, 0xc0000001, 0xc0000001, 0xc0000001]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i64x2([0x90000000c0000000n, 0x90000000c0000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:200 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i64x2([0x9000000000000000n, 0x9000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:203 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0xbfffffff, 0xbfffffff, 0xbfffffff, 0xbfffffff]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i64x2([0x8fffffff40000000n, 0x8fffffff40000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:206 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x7ffffffd, 0x7ffffffd, 0x7ffffffd, 0x7ffffffd]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x7ffffffdn, 0x7ffffffdn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:209 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x7ffffffen, 0x7ffffffen])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:212 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:215 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x80000002, 0x80000002, 0x80000002, 0x80000002]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x800000017ffffffen, 0x800000017ffffffen])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:218 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x800000007fffffffn, 0x800000007fffffffn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:221 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x7fffffff80000000n, 0x7fffffff80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:224 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x3fffffff00000001n, 0x3fffffff00000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:227 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i64x2([0x4000000000000000n, 0x4000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:230 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + ]), + [i64x2([0x4000000080000000n, 0x4000000080000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:233 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:236 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0xffffffffn, 0xffffffffn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:239 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xfffffffe00000001n, 0xfffffffe00000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:242 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7ffffffe80000001n, 0x7ffffffe80000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:245 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i64x2([0x7fffffff80000000n, 0x7fffffff80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:248 +assert_return( + () => invoke($0, `i64x2.extmul_low_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xfffffffe00000001n, 0xfffffffe00000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:253 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:256 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:259 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:262 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:265 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffffn, 0xffffffffn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:268 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xfffffffe00000001n, 0xfffffffe00000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:271 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i64x2([0xfffffffc0000000n, 0xfffffffc0000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:274 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + i32x4([0x40000000, 0x40000000, 0x40000000, 0x40000000]), + ]), + [i64x2([0x1000000000000000n, 0x1000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:277 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0xc0000001, 0xc0000001, 0xc0000001, 0xc0000001]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i64x2([0x90000000c0000000n, 0x90000000c0000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:280 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i64x2([0x9000000000000000n, 0x9000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:283 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0xbfffffff, 0xbfffffff, 0xbfffffff, 0xbfffffff]), + i32x4([0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000]), + ]), + [i64x2([0x8fffffff40000000n, 0x8fffffff40000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:286 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x7ffffffd, 0x7ffffffd, 0x7ffffffd, 0x7ffffffd]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x7ffffffdn, 0x7ffffffdn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:289 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x7ffffffe, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x7ffffffen, 0x7ffffffen])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:292 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:295 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x80000002, 0x80000002, 0x80000002, 0x80000002]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x800000017ffffffen, 0x800000017ffffffen])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:298 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x800000007fffffffn, 0x800000007fffffffn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:301 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x7fffffff80000000n, 0x7fffffff80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:304 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x3fffffff00000001n, 0x3fffffff00000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:307 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i64x2([0x4000000000000000n, 0x4000000000000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:310 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + i32x4([0x80000001, 0x80000001, 0x80000001, 0x80000001]), + ]), + [i64x2([0x4000000080000000n, 0x4000000080000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:313 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:316 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x1, 0x1, 0x1, 0x1]), + ]), + [i64x2([0xffffffffn, 0xffffffffn])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:319 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xfffffffe00000001n, 0xfffffffe00000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:322 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7ffffffe80000001n, 0x7ffffffe80000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:325 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i64x2([0x7fffffff80000000n, 0x7fffffff80000000n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:328 +assert_return( + () => invoke($0, `i64x2.extmul_high_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xfffffffe00000001n, 0xfffffffe00000001n])], +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:333 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.extmul_low_i32x4_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:334 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.extmul_high_i32x4_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:335 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.extmul_low_i32x4_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:336 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.extmul_high_i32x4_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:340 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extmul_low_i32x4_s-1st-arg-empty (result v128) + (i64x2.extmul_low_i32x4_s (v128.const i64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:348 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extmul_low_i32x4_s-arg-empty (result v128) + (i64x2.extmul_low_i32x4_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:356 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extmul_high_i32x4_s-1st-arg-empty (result v128) + (i64x2.extmul_high_i32x4_s (v128.const i64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:364 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extmul_high_i32x4_s-arg-empty (result v128) + (i64x2.extmul_high_i32x4_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:372 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extmul_low_i32x4_u-1st-arg-empty (result v128) + (i64x2.extmul_low_i32x4_u (v128.const i64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:380 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extmul_low_i32x4_u-arg-empty (result v128) + (i64x2.extmul_low_i32x4_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:388 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extmul_high_i32x4_u-1st-arg-empty (result v128) + (i64x2.extmul_high_i32x4_u (v128.const i64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i64x2_extmul_i32x4.wast:396 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extmul_high_i32x4_u-arg-empty (result v128) + (i64x2.extmul_high_i32x4_u) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_arith.wast.js new file mode 100644 index 0000000000..698420ca4d --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_arith.wast.js @@ -0,0 +1,1457 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i8x16_arith.wast + +// ./test/core/simd/simd_i8x16_arith.wast:4 +let $0 = instantiate(`(module + (func (export "i8x16.add") (param v128 v128) (result v128) (i8x16.add (local.get 0) (local.get 1))) + (func (export "i8x16.sub") (param v128 v128) (result v128) (i8x16.sub (local.get 0) (local.get 1))) + (func (export "i8x16.neg") (param v128) (result v128) (i8x16.neg (local.get 0))) +)`); + +// ./test/core/simd/simd_i8x16_arith.wast:12 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:15 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:18 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:21 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:24 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:27 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:30 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:33 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:36 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:39 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:42 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:45 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:48 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:51 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:54 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:57 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:60 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:63 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:66 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:69 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:72 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:75 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:78 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:81 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:84 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:87 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:90 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:93 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:96 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:99 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:102 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:105 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:108 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:111 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:114 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:117 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:120 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:123 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:126 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:129 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:132 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:135 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:138 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + f32x4([0, 0, 0, 0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:141 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + f32x4([-0, -0, -0, -0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x0, 0x80, 0x80, 0x80, 0x0, 0x80, 0x80, 0x80, 0x0, 0x80, 0x80, 0x80, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:144 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + f32x4([1, 1, 1, 1]), + ]), + [ + i8x16([0x80, 0x80, 0x0, 0xbf, 0x80, 0x80, 0x0, 0xbf, 0x80, 0x80, 0x0, 0xbf, 0x80, 0x80, 0x0, 0xbf]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:147 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + f32x4([-1, -1, -1, -1]), + ]), + [ + i8x16([0x80, 0x80, 0x0, 0x3f, 0x80, 0x80, 0x0, 0x3f, 0x80, 0x80, 0x0, 0x3f, 0x80, 0x80, 0x0, 0x3f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:150 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + i8x16([0x1, 0x1, 0x81, 0x80, 0x1, 0x1, 0x81, 0x80, 0x1, 0x1, 0x81, 0x80, 0x1, 0x1, 0x81, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:153 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + i8x16([0x1, 0x1, 0x81, 0x0, 0x1, 0x1, 0x81, 0x0, 0x1, 0x1, 0x81, 0x0, 0x1, 0x1, 0x81, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:156 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + i8x16([0x1, 0x1, 0xc1, 0x80, 0x1, 0x1, 0xc1, 0x80, 0x1, 0x1, 0xc1, 0x80, 0x1, 0x1, 0xc1, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:159 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:162 +assert_return( + () => invoke($0, `i8x16.add`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ]), + [ + i8x16([0x0, 0x3, 0x6, 0x9, 0xc, 0xf, 0x12, 0x15, 0x18, 0x1b, 0x1e, 0x21, 0x24, 0x27, 0x2a, 0x2d]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:167 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:170 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:173 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:176 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:179 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:182 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:185 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:188 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:191 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:194 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:197 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:200 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:203 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:206 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:209 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:212 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:215 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:218 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:221 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:224 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:227 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:230 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:233 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:236 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:239 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:242 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:245 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:248 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:251 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:254 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:257 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:260 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:263 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:266 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:269 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:272 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:275 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:278 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:281 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i16x8([0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:284 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:287 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i32x4([0x80808080, 0x80808080, 0x80808080, 0x80808080]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:290 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:293 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + f32x4([0, 0, 0, 0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:296 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + f32x4([-0, -0, -0, -0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x0, 0x80, 0x80, 0x80, 0x0, 0x80, 0x80, 0x80, 0x0, 0x80, 0x80, 0x80, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:299 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + f32x4([1, 1, 1, 1]), + ]), + [ + i8x16([0x80, 0x80, 0x0, 0x41, 0x80, 0x80, 0x0, 0x41, 0x80, 0x80, 0x0, 0x41, 0x80, 0x80, 0x0, 0x41]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:302 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + f32x4([-1, -1, -1, -1]), + ]), + [ + i8x16([0x80, 0x80, 0x0, 0xc1, 0x80, 0x80, 0x0, 0xc1, 0x80, 0x80, 0x0, 0xc1, 0x80, 0x80, 0x0, 0xc1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:305 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + i8x16([0x1, 0x1, 0x81, 0x82, 0x1, 0x1, 0x81, 0x82, 0x1, 0x1, 0x81, 0x82, 0x1, 0x1, 0x81, 0x82]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:308 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + i8x16([0x1, 0x1, 0x81, 0x2, 0x1, 0x1, 0x81, 0x2, 0x1, 0x1, 0x81, 0x2, 0x1, 0x1, 0x81, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:311 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + i8x16([0x1, 0x1, 0x41, 0x82, 0x1, 0x1, 0x41, 0x82, 0x1, 0x1, 0x41, 0x82, 0x1, 0x1, 0x41, 0x82]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:314 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1]), + ]), + [ + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:317 +assert_return( + () => invoke($0, `i8x16.sub`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ]), + [ + i8x16([0x0, 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:322 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:324 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:326 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:328 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ]), + [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:330 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:332 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:334 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:336 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:338 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:340 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:342 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:344 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:346 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:348 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:350 +assert_return( + () => invoke($0, `i8x16.neg`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:354 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.neg (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith.wast:355 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.add (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith.wast:356 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.sub (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith.wast:360 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.neg-arg-empty (result v128) + (i8x16.neg) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith.wast:368 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.add-1st-arg-empty (result v128) + (i8x16.add (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith.wast:376 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.add-arg-empty (result v128) + (i8x16.add) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith.wast:384 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.sub-1st-arg-empty (result v128) + (i8x16.sub (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith.wast:392 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.sub-arg-empty (result v128) + (i8x16.sub) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith.wast:402 +let $1 = instantiate(`(module + (func (export "add-sub") (param v128 v128 v128) (result v128) + (i8x16.add (i8x16.sub (local.get 0) (local.get 1))(local.get 2))) + (func (export "sub-add") (param v128 v128 v128) (result v128) + (i8x16.sub (i8x16.add (local.get 0) (local.get 1))(local.get 2))) + (func (export "add-neg") (param v128 v128) (result v128) + (i8x16.add (i8x16.neg (local.get 0)) (local.get 1))) + (func (export "sub-neg") (param v128 v128) (result v128) + (i8x16.sub (i8x16.neg (local.get 0)) (local.get 1))) +)`); + +// ./test/core/simd/simd_i8x16_arith.wast:413 +assert_return( + () => invoke($1, `add-sub`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:417 +assert_return( + () => invoke($1, `sub-add`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:421 +assert_return( + () => invoke($1, `add-neg`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith.wast:424 +assert_return( + () => invoke($1, `sub-neg`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [ + i8x16([0x0, 0xfe, 0xfc, 0xfa, 0xf8, 0xf6, 0xf4, 0xf2, 0xf0, 0xee, 0xec, 0xea, 0xe8, 0xe6, 0xe4, 0xe2]), + ], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_arith2.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_arith2.wast.js new file mode 100644 index 0000000000..7d8d376765 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_arith2.wast.js @@ -0,0 +1,2263 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i8x16_arith2.wast + +// ./test/core/simd/simd_i8x16_arith2.wast:3 +let $0 = instantiate(`(module + (func (export "i8x16.min_s") (param v128 v128) (result v128) (i8x16.min_s (local.get 0) (local.get 1))) + (func (export "i8x16.min_u") (param v128 v128) (result v128) (i8x16.min_u (local.get 0) (local.get 1))) + (func (export "i8x16.max_s") (param v128 v128) (result v128) (i8x16.max_s (local.get 0) (local.get 1))) + (func (export "i8x16.max_u") (param v128 v128) (result v128) (i8x16.max_u (local.get 0) (local.get 1))) + (func (export "i8x16.avgr_u") (param v128 v128) (result v128) (i8x16.avgr_u (local.get 0) (local.get 1))) + (func (export "i8x16.abs") (param v128) (result v128) (i8x16.abs (local.get 0))) + (func (export "i8x16.popcnt") (param v128) (result v128) (i8x16.popcnt (local.get 0))) + (func (export "i8x16.min_s_with_const_0") (result v128) (i8x16.min_s (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 64 64 64 64 255 255 255 255) (v128.const i8x16 255 255 255 255 64 64 64 64 127 127 127 127 -128 -128 -128 -128))) + (func (export "i8x16.min_s_with_const_1") (result v128) (i8x16.min_s (v128.const i8x16 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3) (v128.const i8x16 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0))) + (func (export "i8x16.min_u_with_const_2") (result v128) (i8x16.min_u (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 64 64 64 64 255 255 255 255) (v128.const i8x16 255 255 255 255 64 64 64 64 127 127 127 127 -128 -128 -128 -128))) + (func (export "i8x16.min_u_with_const_3") (result v128) (i8x16.min_u (v128.const i8x16 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3) (v128.const i8x16 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0))) + (func (export "i8x16.max_s_with_const_4") (result v128) (i8x16.max_s (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 64 64 64 64 255 255 255 255) (v128.const i8x16 255 255 255 255 64 64 64 64 127 127 127 127 -128 -128 -128 -128))) + (func (export "i8x16.max_s_with_const_5") (result v128) (i8x16.max_s (v128.const i8x16 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3) (v128.const i8x16 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0))) + (func (export "i8x16.max_u_with_const_6") (result v128) (i8x16.max_u (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 64 64 64 64 255 255 255 255) (v128.const i8x16 255 255 255 255 64 64 64 64 127 127 127 127 -128 -128 -128 -128))) + (func (export "i8x16.max_u_with_const_7") (result v128) (i8x16.max_u (v128.const i8x16 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3) (v128.const i8x16 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0))) + (func (export "i8x16.avgr_u_with_const_8") (result v128) (i8x16.avgr_u (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 64 64 64 64 255 255 255 255) (v128.const i8x16 255 255 255 255 64 64 64 64 127 127 127 127 -128 -128 -128 -128))) + (func (export "i8x16.avgr_u_with_const_9") (result v128) (i8x16.avgr_u (v128.const i8x16 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3) (v128.const i8x16 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0))) + (func (export "i8x16.abs_with_const_10") (result v128) (i8x16.abs (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 64 64 64 64 255 255 255 255))) + (func (export "i8x16.popcnt_with_const_11") (result v128) (i8x16.popcnt (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 64 64 64 64 255 255 255 255))) + (func (export "i8x16.min_s_with_const_12") (param v128) (result v128) (i8x16.min_s (local.get 0) (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 64 64 64 64 255 255 255 255))) + (func (export "i8x16.min_s_with_const_13") (param v128) (result v128) (i8x16.min_s (local.get 0) (v128.const i8x16 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3))) + (func (export "i8x16.min_u_with_const_14") (param v128) (result v128) (i8x16.min_u (local.get 0) (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 64 64 64 64 255 255 255 255))) + (func (export "i8x16.min_u_with_const_15") (param v128) (result v128) (i8x16.min_u (local.get 0) (v128.const i8x16 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3))) + (func (export "i8x16.max_s_with_const_16") (param v128) (result v128) (i8x16.max_s (local.get 0) (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 64 64 64 64 255 255 255 255))) + (func (export "i8x16.max_s_with_const_17") (param v128) (result v128) (i8x16.max_s (local.get 0) (v128.const i8x16 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3))) + (func (export "i8x16.max_u_with_const_18") (param v128) (result v128) (i8x16.max_u (local.get 0) (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 64 64 64 64 255 255 255 255))) + (func (export "i8x16.max_u_with_const_19") (param v128) (result v128) (i8x16.max_u (local.get 0) (v128.const i8x16 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3))) + (func (export "i8x16.avgr_u_with_const_20") (param v128) (result v128) (i8x16.avgr_u (local.get 0) (v128.const i8x16 -128 -128 -128 -128 127 127 127 127 64 64 64 64 255 255 255 255))) + (func (export "i8x16.avgr_u_with_const_21") (param v128) (result v128) (i8x16.avgr_u (local.get 0) (v128.const i8x16 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3))) +)`); + +// ./test/core/simd/simd_i8x16_arith2.wast:35 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:38 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:41 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:44 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:47 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:50 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:53 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:56 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:59 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:62 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:65 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:68 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:71 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:74 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:77 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:80 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:83 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:86 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:89 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:92 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:95 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:98 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:101 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:104 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:107 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:110 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:113 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:116 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:119 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:122 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:125 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:128 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:131 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:134 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:137 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:140 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:143 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:146 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:149 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:152 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:155 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:158 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:161 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:164 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:167 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:170 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:173 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:176 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:179 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:182 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:185 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:188 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:191 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:194 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:197 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:200 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:202 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:204 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:206 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:208 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:210 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:212 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:214 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:216 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:218 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85]), + ]), + [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:220 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:222 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:224 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:226 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:228 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:230 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:232 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:234 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:236 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:238 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:240 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:242 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:244 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b]), + ]), + [ + i8x16([0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:246 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85]), + ]), + [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:248 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:250 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:252 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:254 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:258 +assert_return( + () => invoke($0, `i8x16.min_s_with_const_0`, []), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:259 +assert_return( + () => invoke($0, `i8x16.min_s_with_const_1`, []), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:260 +assert_return( + () => invoke($0, `i8x16.min_u_with_const_2`, []), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:261 +assert_return( + () => invoke($0, `i8x16.min_u_with_const_3`, []), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:262 +assert_return( + () => invoke($0, `i8x16.max_s_with_const_4`, []), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:263 +assert_return( + () => invoke($0, `i8x16.max_s_with_const_5`, []), + [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x3, 0x3, 0x3, 0x3]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:264 +assert_return( + () => invoke($0, `i8x16.max_u_with_const_6`, []), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:265 +assert_return( + () => invoke($0, `i8x16.max_u_with_const_7`, []), + [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x3, 0x3, 0x3, 0x3]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:266 +assert_return( + () => invoke($0, `i8x16.avgr_u_with_const_8`, []), + [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0xc0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:267 +assert_return( + () => invoke($0, `i8x16.avgr_u_with_const_9`, []), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:268 +assert_return( + () => invoke($0, `i8x16.abs_with_const_10`, []), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, 0x40, 0x40, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:269 +assert_return( + () => invoke($0, `i8x16.popcnt_with_const_11`, []), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x7, 0x7, 0x7, 0x7, 0x1, 0x1, 0x1, 0x1, 0x8, 0x8, 0x8, 0x8]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:272 +assert_return( + () => invoke($0, `i8x16.min_s_with_const_12`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:274 +assert_return( + () => invoke($0, `i8x16.min_s_with_const_13`, [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:276 +assert_return( + () => invoke($0, `i8x16.min_u_with_const_14`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:278 +assert_return( + () => invoke($0, `i8x16.min_u_with_const_15`, [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:280 +assert_return( + () => invoke($0, `i8x16.max_s_with_const_16`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:282 +assert_return( + () => invoke($0, `i8x16.max_s_with_const_17`, [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x3, 0x3, 0x3, 0x3]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:284 +assert_return( + () => invoke($0, `i8x16.max_u_with_const_18`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:286 +assert_return( + () => invoke($0, `i8x16.max_u_with_const_19`, [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x3, 0x3, 0x3, 0x3]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:288 +assert_return( + () => invoke($0, `i8x16.avgr_u_with_const_20`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0xc0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:290 +assert_return( + () => invoke($0, `i8x16.avgr_u_with_const_21`, [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:294 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, 0x40, 0x40, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:297 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:300 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, 0x40, 0x40, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:303 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:306 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, 0x40, 0x40, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:309 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:312 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, 0x40, 0x40, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:315 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:318 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, 0x40, 0x40, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0xc0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:321 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x2, 0x2, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:324 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, 0x40, 0x40, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, 0x40, 0x40, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:326 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, 0x40, 0x40, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x7, 0x7, 0x7, 0x7, 0x1, 0x1, 0x1, 0x1, 0x8, 0x8, 0x8, 0x8]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:330 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:333 +assert_return( + () => invoke($0, `i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:336 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:339 +assert_return( + () => invoke($0, `i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:342 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:345 +assert_return( + () => invoke($0, `i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:348 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:351 +assert_return( + () => invoke($0, `i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:354 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:357 +assert_return( + () => invoke($0, `i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:360 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:362 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:364 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:366 +assert_return( + () => invoke($0, `i8x16.abs`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:368 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:370 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:372 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:374 +assert_return( + () => invoke($0, `i8x16.popcnt`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:378 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i32x4.avgr_u (v128.const i8x16 0 0 0 0 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))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:379 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f32x4.avgr_u (v128.const i8x16 0 0 0 0 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))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:380 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i64x2.avgr_u (v128.const i8x16 0 0 0 0 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))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:381 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (f64x2.avgr_u (v128.const i8x16 0 0 0 0 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))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:382 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.avgr (v128.const i8x16 0 0 0 0 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))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:383 +assert_malformed( + () => instantiate(`(memory 1) (func (result v128) (i8x16.avgr_s (v128.const i8x16 0 0 0 0 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))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:386 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.min_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:387 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.min_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:388 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.max_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:389 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.max_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:390 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.avgr_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:391 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.abs (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:392 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.popcnt (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:396 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.min_s-1st-arg-empty (result v128) + (i8x16.min_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:404 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.min_s-arg-empty (result v128) + (i8x16.min_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:412 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.min_u-1st-arg-empty (result v128) + (i8x16.min_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:420 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.min_u-arg-empty (result v128) + (i8x16.min_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:428 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.max_s-1st-arg-empty (result v128) + (i8x16.max_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:436 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.max_s-arg-empty (result v128) + (i8x16.max_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:444 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.max_u-1st-arg-empty (result v128) + (i8x16.max_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:452 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.max_u-arg-empty (result v128) + (i8x16.max_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:460 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.avgr_u-1st-arg-empty (result v128) + (i8x16.avgr_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:468 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.avgr_u-arg-empty (result v128) + (i8x16.avgr_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:476 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.abs-arg-empty (result v128) + (i8x16.abs) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:484 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.popcnt-arg-empty (result v128) + (i8x16.popcnt) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_arith2.wast:494 +let $1 = instantiate(`(module + (func (export "i8x16.min_s-i8x16.avgr_u") (param v128 v128 v128) (result v128) (i8x16.min_s (i8x16.avgr_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.min_s-i8x16.max_u") (param v128 v128 v128) (result v128) (i8x16.min_s (i8x16.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.min_s-i8x16.max_s") (param v128 v128 v128) (result v128) (i8x16.min_s (i8x16.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.min_s-i8x16.min_u") (param v128 v128 v128) (result v128) (i8x16.min_s (i8x16.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.min_s-i8x16.min_s") (param v128 v128 v128) (result v128) (i8x16.min_s (i8x16.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.min_s-i8x16.abs") (param v128 v128) (result v128) (i8x16.min_s (i8x16.abs (local.get 0))(local.get 1))) + (func (export "i8x16.abs-i8x16.min_s") (param v128 v128) (result v128) (i8x16.abs (i8x16.min_s (local.get 0) (local.get 1)))) + (func (export "i8x16.min_s-i8x16.popcnt") (param v128 v128) (result v128) (i8x16.min_s (i8x16.popcnt (local.get 0))(local.get 1))) + (func (export "i8x16.popcnt-i8x16.min_s") (param v128 v128) (result v128) (i8x16.popcnt (i8x16.min_s (local.get 0) (local.get 1)))) + (func (export "i8x16.min_u-i8x16.avgr_u") (param v128 v128 v128) (result v128) (i8x16.min_u (i8x16.avgr_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.min_u-i8x16.max_u") (param v128 v128 v128) (result v128) (i8x16.min_u (i8x16.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.min_u-i8x16.max_s") (param v128 v128 v128) (result v128) (i8x16.min_u (i8x16.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.min_u-i8x16.min_u") (param v128 v128 v128) (result v128) (i8x16.min_u (i8x16.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.min_u-i8x16.min_s") (param v128 v128 v128) (result v128) (i8x16.min_u (i8x16.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.min_u-i8x16.abs") (param v128 v128) (result v128) (i8x16.min_u (i8x16.abs (local.get 0))(local.get 1))) + (func (export "i8x16.abs-i8x16.min_u") (param v128 v128) (result v128) (i8x16.abs (i8x16.min_u (local.get 0) (local.get 1)))) + (func (export "i8x16.min_u-i8x16.popcnt") (param v128 v128) (result v128) (i8x16.min_u (i8x16.popcnt (local.get 0))(local.get 1))) + (func (export "i8x16.popcnt-i8x16.min_u") (param v128 v128) (result v128) (i8x16.popcnt (i8x16.min_u (local.get 0) (local.get 1)))) + (func (export "i8x16.max_s-i8x16.avgr_u") (param v128 v128 v128) (result v128) (i8x16.max_s (i8x16.avgr_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.max_s-i8x16.max_u") (param v128 v128 v128) (result v128) (i8x16.max_s (i8x16.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.max_s-i8x16.max_s") (param v128 v128 v128) (result v128) (i8x16.max_s (i8x16.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.max_s-i8x16.min_u") (param v128 v128 v128) (result v128) (i8x16.max_s (i8x16.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.max_s-i8x16.min_s") (param v128 v128 v128) (result v128) (i8x16.max_s (i8x16.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.max_s-i8x16.abs") (param v128 v128) (result v128) (i8x16.max_s (i8x16.abs (local.get 0))(local.get 1))) + (func (export "i8x16.abs-i8x16.max_s") (param v128 v128) (result v128) (i8x16.abs (i8x16.max_s (local.get 0) (local.get 1)))) + (func (export "i8x16.max_s-i8x16.popcnt") (param v128 v128) (result v128) (i8x16.max_s (i8x16.popcnt (local.get 0))(local.get 1))) + (func (export "i8x16.popcnt-i8x16.max_s") (param v128 v128) (result v128) (i8x16.popcnt (i8x16.max_s (local.get 0) (local.get 1)))) + (func (export "i8x16.max_u-i8x16.avgr_u") (param v128 v128 v128) (result v128) (i8x16.max_u (i8x16.avgr_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.max_u-i8x16.max_u") (param v128 v128 v128) (result v128) (i8x16.max_u (i8x16.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.max_u-i8x16.max_s") (param v128 v128 v128) (result v128) (i8x16.max_u (i8x16.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.max_u-i8x16.min_u") (param v128 v128 v128) (result v128) (i8x16.max_u (i8x16.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.max_u-i8x16.min_s") (param v128 v128 v128) (result v128) (i8x16.max_u (i8x16.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.max_u-i8x16.abs") (param v128 v128) (result v128) (i8x16.max_u (i8x16.abs (local.get 0))(local.get 1))) + (func (export "i8x16.abs-i8x16.max_u") (param v128 v128) (result v128) (i8x16.abs (i8x16.max_u (local.get 0) (local.get 1)))) + (func (export "i8x16.max_u-i8x16.popcnt") (param v128 v128) (result v128) (i8x16.max_u (i8x16.popcnt (local.get 0))(local.get 1))) + (func (export "i8x16.popcnt-i8x16.max_u") (param v128 v128) (result v128) (i8x16.popcnt (i8x16.max_u (local.get 0) (local.get 1)))) + (func (export "i8x16.avgr_u-i8x16.avgr_u") (param v128 v128 v128) (result v128) (i8x16.avgr_u (i8x16.avgr_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.avgr_u-i8x16.max_u") (param v128 v128 v128) (result v128) (i8x16.avgr_u (i8x16.max_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.avgr_u-i8x16.max_s") (param v128 v128 v128) (result v128) (i8x16.avgr_u (i8x16.max_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.avgr_u-i8x16.min_u") (param v128 v128 v128) (result v128) (i8x16.avgr_u (i8x16.min_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.avgr_u-i8x16.min_s") (param v128 v128 v128) (result v128) (i8x16.avgr_u (i8x16.min_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "i8x16.avgr_u-i8x16.abs") (param v128 v128) (result v128) (i8x16.avgr_u (i8x16.abs (local.get 0))(local.get 1))) + (func (export "i8x16.abs-i8x16.avgr_u") (param v128 v128) (result v128) (i8x16.abs (i8x16.avgr_u (local.get 0) (local.get 1)))) + (func (export "i8x16.avgr_u-i8x16.popcnt") (param v128 v128) (result v128) (i8x16.avgr_u (i8x16.popcnt (local.get 0))(local.get 1))) + (func (export "i8x16.popcnt-i8x16.avgr_u") (param v128 v128) (result v128) (i8x16.popcnt (i8x16.avgr_u (local.get 0) (local.get 1)))) + (func (export "i8x16.abs-i8x16.popcnt") (param v128) (result v128) (i8x16.abs (i8x16.popcnt (local.get 0)))) + (func (export "i8x16.abs-i8x16.abs") (param v128) (result v128) (i8x16.abs (i8x16.abs (local.get 0)))) + (func (export "i8x16.popcnt-i8x16.popcnt") (param v128) (result v128) (i8x16.popcnt (i8x16.popcnt (local.get 0)))) + (func (export "i8x16.popcnt-i8x16.abs") (param v128) (result v128) (i8x16.popcnt (i8x16.abs (local.get 0)))) +)`); + +// ./test/core/simd/simd_i8x16_arith2.wast:546 +assert_return( + () => invoke($1, `i8x16.min_s-i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:550 +assert_return( + () => invoke($1, `i8x16.min_s-i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:554 +assert_return( + () => invoke($1, `i8x16.min_s-i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:558 +assert_return( + () => invoke($1, `i8x16.min_s-i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:562 +assert_return( + () => invoke($1, `i8x16.min_s-i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:566 +assert_return( + () => invoke($1, `i8x16.min_s-i8x16.abs`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:569 +assert_return( + () => invoke($1, `i8x16.abs-i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:572 +assert_return( + () => invoke($1, `i8x16.min_s-i8x16.popcnt`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:575 +assert_return( + () => invoke($1, `i8x16.popcnt-i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:578 +assert_return( + () => invoke($1, `i8x16.min_u-i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:582 +assert_return( + () => invoke($1, `i8x16.min_u-i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:586 +assert_return( + () => invoke($1, `i8x16.min_u-i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:590 +assert_return( + () => invoke($1, `i8x16.min_u-i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:594 +assert_return( + () => invoke($1, `i8x16.min_u-i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:598 +assert_return( + () => invoke($1, `i8x16.min_u-i8x16.abs`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:601 +assert_return( + () => invoke($1, `i8x16.abs-i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:604 +assert_return( + () => invoke($1, `i8x16.min_u-i8x16.popcnt`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:607 +assert_return( + () => invoke($1, `i8x16.popcnt-i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:610 +assert_return( + () => invoke($1, `i8x16.max_s-i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:614 +assert_return( + () => invoke($1, `i8x16.max_s-i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:618 +assert_return( + () => invoke($1, `i8x16.max_s-i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:622 +assert_return( + () => invoke($1, `i8x16.max_s-i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:626 +assert_return( + () => invoke($1, `i8x16.max_s-i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:630 +assert_return( + () => invoke($1, `i8x16.max_s-i8x16.abs`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:633 +assert_return( + () => invoke($1, `i8x16.abs-i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:636 +assert_return( + () => invoke($1, `i8x16.max_s-i8x16.popcnt`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:639 +assert_return( + () => invoke($1, `i8x16.popcnt-i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:642 +assert_return( + () => invoke($1, `i8x16.max_u-i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:646 +assert_return( + () => invoke($1, `i8x16.max_u-i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:650 +assert_return( + () => invoke($1, `i8x16.max_u-i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:654 +assert_return( + () => invoke($1, `i8x16.max_u-i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:658 +assert_return( + () => invoke($1, `i8x16.max_u-i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:662 +assert_return( + () => invoke($1, `i8x16.max_u-i8x16.abs`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:665 +assert_return( + () => invoke($1, `i8x16.abs-i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:668 +assert_return( + () => invoke($1, `i8x16.max_u-i8x16.popcnt`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:671 +assert_return( + () => invoke($1, `i8x16.popcnt-i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:674 +assert_return( + () => invoke($1, `i8x16.avgr_u-i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:678 +assert_return( + () => invoke($1, `i8x16.avgr_u-i8x16.max_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:682 +assert_return( + () => invoke($1, `i8x16.avgr_u-i8x16.max_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:686 +assert_return( + () => invoke($1, `i8x16.avgr_u-i8x16.min_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:690 +assert_return( + () => invoke($1, `i8x16.avgr_u-i8x16.min_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:694 +assert_return( + () => invoke($1, `i8x16.avgr_u-i8x16.abs`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:697 +assert_return( + () => invoke($1, `i8x16.abs-i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:700 +assert_return( + () => invoke($1, `i8x16.avgr_u-i8x16.popcnt`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:703 +assert_return( + () => invoke($1, `i8x16.popcnt-i8x16.avgr_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:706 +assert_return( + () => invoke($1, `i8x16.abs-i8x16.popcnt`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:708 +assert_return( + () => invoke($1, `i8x16.abs-i8x16.abs`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:710 +assert_return( + () => invoke($1, `i8x16.popcnt-i8x16.popcnt`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_arith2.wast:712 +assert_return( + () => invoke($1, `i8x16.popcnt-i8x16.abs`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_cmp.wast.js new file mode 100644 index 0000000000..7cd76b5e0e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_cmp.wast.js @@ -0,0 +1,4989 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i8x16_cmp.wast + +// ./test/core/simd/simd_i8x16_cmp.wast:4 +let $0 = instantiate(`(module + (func (export "eq") (param $$x v128) (param $$y v128) (result v128) (i8x16.eq (local.get $$x) (local.get $$y))) + (func (export "ne") (param $$x v128) (param $$y v128) (result v128) (i8x16.ne (local.get $$x) (local.get $$y))) + (func (export "lt_s") (param $$x v128) (param $$y v128) (result v128) (i8x16.lt_s (local.get $$x) (local.get $$y))) + (func (export "lt_u") (param $$x v128) (param $$y v128) (result v128) (i8x16.lt_u (local.get $$x) (local.get $$y))) + (func (export "le_s") (param $$x v128) (param $$y v128) (result v128) (i8x16.le_s (local.get $$x) (local.get $$y))) + (func (export "le_u") (param $$x v128) (param $$y v128) (result v128) (i8x16.le_u (local.get $$x) (local.get $$y))) + (func (export "gt_s") (param $$x v128) (param $$y v128) (result v128) (i8x16.gt_s (local.get $$x) (local.get $$y))) + (func (export "gt_u") (param $$x v128) (param $$y v128) (result v128) (i8x16.gt_u (local.get $$x) (local.get $$y))) + (func (export "ge_s") (param $$x v128) (param $$y v128) (result v128) (i8x16.ge_s (local.get $$x) (local.get $$y))) + (func (export "ge_u") (param $$x v128) (param $$y v128) (result v128) (i8x16.ge_u (local.get $$x) (local.get $$y))) +)`); + +// ./test/core/simd/simd_i8x16_cmp.wast:23 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:26 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:29 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:32 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:35 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:38 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:41 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:46 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:49 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:52 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:55 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:58 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:63 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:66 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:69 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:72 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:75 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:78 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:81 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:86 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x0, 0x0, 0xc3, 0x0, 0x0, 0xfe, 0xc2, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:89 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0xfe, 0x42, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x7f, 0x43]), + f32x4([1, 127, 128, 255]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:94 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:97 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:100 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0xff, 0xab, 0xaa, 0x1b, 0x1a, 0xb, 0xa, 0x12, 0x11, 0x10, 0x9, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:103 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:106 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:111 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:114 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:117 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:120 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:123 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:126 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:129 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:134 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:137 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:140 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:143 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:146 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:149 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [ + i8x16([0xff, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:152 +assert_return( + () => invoke($0, `eq`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:161 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:164 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:167 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:170 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:173 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:176 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:179 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:184 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:187 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:190 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:193 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:196 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:201 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:204 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:207 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:210 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:213 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:216 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:219 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:224 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x0, 0x0, 0xc3, 0x0, 0x0, 0xfe, 0xc2, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:227 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0xfe, 0x42, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x7f, 0x43]), + f32x4([1, 127, 128, 255]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:232 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:235 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:238 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0xff, 0xab, 0xaa, 0x1b, 0x1a, 0xb, 0xa, 0x12, 0x11, 0x10, 0x9, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:241 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:244 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:249 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:252 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:255 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:258 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:261 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:264 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:267 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:272 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:275 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:278 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:281 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:284 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:287 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [ + i8x16([0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:290 +assert_return( + () => invoke($0, `ne`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:299 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:302 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:305 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:308 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:311 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:314 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:317 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:322 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:325 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:328 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:331 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:334 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:339 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:342 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:345 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:348 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:351 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:354 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:357 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:362 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x0, 0x0, 0xc3, 0x0, 0x0, 0xfe, 0xc2, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:365 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0xfe, 0x42, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x7f, 0x43]), + f32x4([1, 127, 128, 255]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:370 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:373 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:376 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0xff, 0xab, 0xaa, 0x1b, 0x1a, 0xb, 0xa, 0x12, 0x11, 0x10, 0x9, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:379 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:382 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:387 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:390 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:393 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:396 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:399 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:402 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:405 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:410 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:413 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:416 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:419 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:422 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:425 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [ + i8x16([0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:428 +assert_return( + () => invoke($0, `lt_s`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:437 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:440 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:443 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:446 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:449 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:452 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:455 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:460 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:463 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:466 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:469 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:472 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:477 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:480 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:483 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:486 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:489 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:492 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:495 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:500 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x0, 0x0, 0xc3, 0x0, 0x0, 0xfe, 0xc2, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:503 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0xfe, 0x42, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x7f, 0x43]), + f32x4([1, 127, 128, 255]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:508 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:511 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:514 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0xff, 0xab, 0xaa, 0x1b, 0x1a, 0xb, 0xa, 0x12, 0x11, 0x10, 0x9, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:517 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:520 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:525 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:528 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:531 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:534 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:537 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:540 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:543 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:548 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:551 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:554 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:557 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:560 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:563 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [ + i8x16([0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:566 +assert_return( + () => invoke($0, `lt_u`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:575 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:578 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:581 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:584 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:587 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:590 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:593 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:598 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:601 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:604 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:607 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:610 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:615 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:618 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:621 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:624 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:627 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:630 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:633 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:638 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x0, 0x0, 0xc3, 0x0, 0x0, 0xfe, 0xc2, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:641 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0xfe, 0x42, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x7f, 0x43]), + f32x4([1, 127, 128, 255]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:646 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:649 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:652 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0xff, 0xab, 0xaa, 0x1b, 0x1a, 0xb, 0xa, 0x12, 0x11, 0x10, 0x9, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:655 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:658 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:663 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:666 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:669 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:672 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:675 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:678 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:681 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:686 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:689 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:692 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:695 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:698 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:701 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:704 +assert_return( + () => invoke($0, `le_s`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:713 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:716 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:719 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:722 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:725 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:728 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:731 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:736 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:739 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:742 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:745 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:748 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:753 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:756 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:759 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:762 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:765 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:768 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:771 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:776 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x0, 0x0, 0xc3, 0x0, 0x0, 0xfe, 0xc2, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:779 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0xfe, 0x42, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x7f, 0x43]), + f32x4([1, 127, 128, 255]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:784 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:787 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:790 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0xff, 0xab, 0xaa, 0x1b, 0x1a, 0xb, 0xa, 0x12, 0x11, 0x10, 0x9, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:793 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:796 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:801 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:804 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:807 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:810 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:813 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:816 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:819 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:824 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:827 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:830 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:833 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:836 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:839 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:842 +assert_return( + () => invoke($0, `le_u`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:851 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:854 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:857 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:860 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:863 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:866 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:869 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:874 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:877 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:880 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:883 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:886 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:891 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:894 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:897 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:900 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:903 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:906 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:909 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:914 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x0, 0x0, 0xc3, 0x0, 0x0, 0xfe, 0xc2, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:917 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0xfe, 0x42, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x7f, 0x43]), + f32x4([1, 127, 128, 255]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:922 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:925 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:928 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0xff, 0xab, 0xaa, 0x1b, 0x1a, 0xb, 0xa, 0x12, 0x11, 0x10, 0x9, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:931 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:934 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:939 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:942 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:945 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:948 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:951 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:954 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:957 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:962 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:965 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:968 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:971 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:974 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:977 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:980 +assert_return( + () => invoke($0, `gt_s`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:989 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:992 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:995 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:998 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1001 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1004 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1007 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1012 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1015 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1018 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1021 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1024 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1029 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1032 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1035 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1038 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1041 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1044 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1047 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1052 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x0, 0x0, 0xc3, 0x0, 0x0, 0xfe, 0xc2, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1055 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0xfe, 0x42, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x7f, 0x43]), + f32x4([1, 127, 128, 255]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1060 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1063 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1066 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0xff, 0xab, 0xaa, 0x1b, 0x1a, 0xb, 0xa, 0x12, 0x11, 0x10, 0x9, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1069 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1072 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1077 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1080 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1083 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1086 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1089 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1092 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1095 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1100 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1103 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1106 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1109 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1112 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1115 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1118 +assert_return( + () => invoke($0, `gt_u`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1127 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1130 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1133 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1136 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1139 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1142 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1145 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1150 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1153 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1156 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1159 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1162 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1167 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1170 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1173 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1176 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1179 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1182 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1185 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1190 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x0, 0x0, 0xc3, 0x0, 0x0, 0xfe, 0xc2, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1193 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0xfe, 0x42, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x7f, 0x43]), + f32x4([1, 127, 128, 255]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1198 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1201 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1204 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0xff, 0xab, 0xaa, 0x1b, 0x1a, 0xb, 0xa, 0x12, 0x11, 0x10, 0x9, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1207 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1210 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1215 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1218 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1221 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1224 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1227 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1230 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1233 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1238 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1241 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1244 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1247 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1250 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1253 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [ + i8x16([0xff, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1256 +assert_return( + () => invoke($0, `ge_s`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1265 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1268 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1271 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1274 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1277 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1280 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1283 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1288 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1291 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1294 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1297 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1300 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1305 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1308 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1311 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1314 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1317 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1320 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1323 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1328 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x0, 0x0, 0xc3, 0x0, 0x0, 0xfe, 0xc2, 0x0, 0x0, 0x80, 0xbf, 0x0, 0x0, 0x0, 0x0]), + f32x4([-128, -127, -1, 0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1331 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0xfe, 0x42, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x7f, 0x43]), + f32x4([1, 127, 128, 255]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1336 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1339 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1342 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x9, 0x10, 0x11, 0x12, 0xa, 0xb, 0x1a, 0x1b, 0xaa, 0xab, 0xff]), + i8x16([0xff, 0xab, 0xaa, 0x1b, 0x1a, 0xb, 0xa, 0x12, 0x11, 0x10, 0x9, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1345 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1348 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i8x16([0xff, 0xfe, 0xfd, 0x80, 0x7f, 0x2, 0x1, 0x0, 0x0, 0xff, 0xfe, 0xfd, 0x83, 0x82, 0x81, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1353 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1356 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1359 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1362 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1365 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i16x8([0x8180, 0x8382, 0xfefd, 0xff, 0x100, 0x7f02, 0xfd80, 0xfffe]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1368 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i16x8([0xff80, 0xff80, 0x0, 0x0, 0x1, 0x1, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1371 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i16x8([0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1376 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1379 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1382 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i32x4([0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1385 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1388 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x80, 0x81, 0x82, 0x83, 0xfd, 0xfe, 0xff, 0x0, 0x0, 0x1, 0x2, 0x7f, 0x80, 0xfd, 0xfe, 0xff]), + i32x4([0x83828180, 0xfffefd, 0x7f020100, 0xfffefd80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1391 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff]), + i32x4([0xffffff80, 0x0, 0x1, 0xff]), + ]), + [ + i8x16([0xff, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1394 +assert_return( + () => invoke($0, `ge_u`, [ + i8x16([0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55]), + i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1401 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.eq (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1402 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.ge_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1403 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.ge_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1404 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.gt_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1405 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.gt_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1406 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.le_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1407 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.le_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1408 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.lt_s (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1409 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.lt_u (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1410 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.ne (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1415 +let $1 = instantiate(`(module (memory 1) + (func (export "eq-in-block") + (block + (drop + (block (result v128) + (i8x16.eq + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "ne-in-block") + (block + (drop + (block (result v128) + (i8x16.ne + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "lt_s-in-block") + (block + (drop + (block (result v128) + (i8x16.lt_s + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "le_u-in-block") + (block + (drop + (block (result v128) + (i8x16.le_u + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "gt_u-in-block") + (block + (drop + (block (result v128) + (i8x16.gt_u + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "ge_s-in-block") + (block + (drop + (block (result v128) + (i8x16.ge_s + (block (result v128) (v128.load (i32.const 0))) + (block (result v128) (v128.load (i32.const 1))) + ) + ) + ) + ) + ) + (func (export "nested-eq") + (drop + (i8x16.eq + (i8x16.eq + (i8x16.eq + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.eq + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i8x16.eq + (i8x16.eq + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.eq + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-ne") + (drop + (i8x16.ne + (i8x16.ne + (i8x16.ne + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.ne + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i8x16.ne + (i8x16.ne + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.ne + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-lt_s") + (drop + (i8x16.lt_s + (i8x16.lt_s + (i8x16.lt_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.lt_s + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i8x16.lt_s + (i8x16.lt_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.lt_s + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-le_u") + (drop + (i8x16.le_u + (i8x16.le_u + (i8x16.le_u + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.le_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i8x16.le_u + (i8x16.le_u + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.le_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-gt_u") + (drop + (i8x16.gt_u + (i8x16.gt_u + (i8x16.gt_u + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.gt_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i8x16.gt_u + (i8x16.gt_u + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.gt_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "nested-ge_s") + (drop + (i8x16.ge_s + (i8x16.ge_s + (i8x16.ge_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.ge_s + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i8x16.ge_s + (i8x16.ge_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.ge_s + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) + (func (export "as-param") + (drop + (i8x16.ge_u + (i8x16.eq + (i8x16.lt_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.le_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + (i8x16.ne + (i8x16.gt_s + (v128.load (i32.const 0)) + (v128.load (i32.const 1)) + ) + (i8x16.lt_u + (v128.load (i32.const 2)) + (v128.load (i32.const 3)) + ) + ) + ) + ) + ) +)`); + +// ./test/core/simd/simd_i8x16_cmp.wast:1671 +assert_return(() => invoke($1, `eq-in-block`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1672 +assert_return(() => invoke($1, `ne-in-block`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1673 +assert_return(() => invoke($1, `lt_s-in-block`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1674 +assert_return(() => invoke($1, `le_u-in-block`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1675 +assert_return(() => invoke($1, `gt_u-in-block`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1676 +assert_return(() => invoke($1, `ge_s-in-block`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1677 +assert_return(() => invoke($1, `nested-eq`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1678 +assert_return(() => invoke($1, `nested-ne`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1679 +assert_return(() => invoke($1, `nested-lt_s`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1680 +assert_return(() => invoke($1, `nested-le_u`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1681 +assert_return(() => invoke($1, `nested-gt_u`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1682 +assert_return(() => invoke($1, `nested-ge_s`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1683 +assert_return(() => invoke($1, `as-param`, []), []); + +// ./test/core/simd/simd_i8x16_cmp.wast:1688 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.eq-1st-arg-empty (result v128) + (i8x16.eq (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1696 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.eq-arg-empty (result v128) + (i8x16.eq) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1704 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.ne-1st-arg-empty (result v128) + (i8x16.ne (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1712 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.ne-arg-empty (result v128) + (i8x16.ne) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1720 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.lt_s-1st-arg-empty (result v128) + (i8x16.lt_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1728 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.lt_s-arg-empty (result v128) + (i8x16.lt_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1736 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.lt_u-1st-arg-empty (result v128) + (i8x16.lt_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1744 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.lt_u-arg-empty (result v128) + (i8x16.lt_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1752 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.le_s-1st-arg-empty (result v128) + (i8x16.le_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1760 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.le_s-arg-empty (result v128) + (i8x16.le_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1768 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.le_u-1st-arg-empty (result v128) + (i8x16.le_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1776 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.le_u-arg-empty (result v128) + (i8x16.le_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1784 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.gt_s-1st-arg-empty (result v128) + (i8x16.gt_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1792 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.gt_s-arg-empty (result v128) + (i8x16.gt_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1800 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.gt_u-1st-arg-empty (result v128) + (i8x16.gt_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1808 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.gt_u-arg-empty (result v128) + (i8x16.gt_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1816 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.ge_s-1st-arg-empty (result v128) + (i8x16.ge_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1824 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.ge_s-arg-empty (result v128) + (i8x16.ge_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1832 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.ge_u-1st-arg-empty (result v128) + (i8x16.ge_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_cmp.wast:1840 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.ge_u-arg-empty (result v128) + (i8x16.ge_u) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_sat_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_sat_arith.wast.js new file mode 100644 index 0000000000..856ea0d8d3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_sat_arith.wast.js @@ -0,0 +1,2430 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_i8x16_sat_arith.wast + +// ./test/core/simd/simd_i8x16_sat_arith.wast:4 +let $0 = instantiate(`(module + (func (export "i8x16.add_sat_s") (param v128 v128) (result v128) (i8x16.add_sat_s (local.get 0) (local.get 1))) + (func (export "i8x16.add_sat_u") (param v128 v128) (result v128) (i8x16.add_sat_u (local.get 0) (local.get 1))) + (func (export "i8x16.sub_sat_s") (param v128 v128) (result v128) (i8x16.sub_sat_s (local.get 0) (local.get 1))) + (func (export "i8x16.sub_sat_u") (param v128 v128) (result v128) (i8x16.sub_sat_u (local.get 0) (local.get 1))) +)`); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:13 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:16 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:19 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:22 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:25 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:28 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:31 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:34 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:37 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:40 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:43 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:46 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:49 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:52 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:55 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:58 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:61 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:64 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:67 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:70 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:73 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:76 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:79 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:82 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:85 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:88 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:91 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:94 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:97 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:100 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:103 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:106 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:109 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:112 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:115 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:118 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:121 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:124 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:127 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + f32x4([-0, -0, -0, -0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:130 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + i8x16([0x1, 0x1, 0x81, 0x7f, 0x1, 0x1, 0x81, 0x7f, 0x1, 0x1, 0x81, 0x7f, 0x1, 0x1, 0x81, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:133 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + i8x16([0x1, 0x1, 0x81, 0x0, 0x1, 0x1, 0x81, 0x0, 0x1, 0x1, 0x81, 0x0, 0x1, 0x1, 0x81, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:136 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + i8x16([0x1, 0x1, 0xc1, 0x7f, 0x1, 0x1, 0xc1, 0x7f, 0x1, 0x1, 0xc1, 0x7f, 0x1, 0x1, 0xc1, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:139 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + i8x16([0x1, 0x1, 0xc1, 0x0, 0x1, 0x1, 0xc1, 0x0, 0x1, 0x1, 0xc1, 0x0, 0x1, 0x1, 0xc1, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:142 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:145 +assert_return( + () => invoke($0, `i8x16.add_sat_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ]), + [ + i8x16([0x0, 0x3, 0x6, 0x9, 0xc, 0xf, 0x12, 0x15, 0x18, 0x1b, 0x1e, 0x21, 0x24, 0x27, 0x2a, 0x2d]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:150 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:153 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:156 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:159 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:162 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:165 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:168 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:171 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:174 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:177 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:180 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:183 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:186 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:189 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:192 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:195 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:198 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:201 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:204 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:207 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:210 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:213 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:216 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:219 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:222 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:225 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:228 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:231 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:234 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:237 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:240 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:243 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:246 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:249 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:252 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:255 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:258 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:261 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:264 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + f32x4([-0, -0, -0, -0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0xff, 0x80, 0x80, 0x80, 0xff, 0x80, 0x80, 0x80, 0xff, 0x80, 0x80, 0x80, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:267 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + i8x16([0x1, 0x1, 0x81, 0x80, 0x1, 0x1, 0x81, 0x80, 0x1, 0x1, 0x81, 0x80, 0x1, 0x1, 0x81, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:270 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + i8x16([0x1, 0x1, 0x81, 0xff, 0x1, 0x1, 0x81, 0xff, 0x1, 0x1, 0x81, 0xff, 0x1, 0x1, 0x81, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:273 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + i8x16([0x1, 0x1, 0xc1, 0x80, 0x1, 0x1, 0xc1, 0x80, 0x1, 0x1, 0xc1, 0x80, 0x1, 0x1, 0xc1, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:276 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + i8x16([0x1, 0x1, 0xc1, 0xff, 0x1, 0x1, 0xc1, 0xff, 0x1, 0x1, 0xc1, 0xff, 0x1, 0x1, 0xc1, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:279 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1]), + ]), + [ + i8x16([0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:282 +assert_return( + () => invoke($0, `i8x16.add_sat_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ]), + [ + i8x16([0x0, 0x3, 0x6, 0x9, 0xc, 0xf, 0x12, 0x15, 0x18, 0x1b, 0x1e, 0x21, 0x24, 0x27, 0x2a, 0x2d]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:287 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:290 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:293 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:296 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:299 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:302 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:305 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:308 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:311 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:314 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:317 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:320 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:323 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:326 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:329 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:332 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:335 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:338 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:341 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:344 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:347 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:350 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:353 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:356 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:359 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:362 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:365 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:368 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:371 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:374 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:377 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:380 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:383 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:386 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:389 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:392 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:395 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:398 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:401 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + f32x4([-0, -0, -0, -0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x0, 0x80, 0x80, 0x80, 0x0, 0x80, 0x80, 0x80, 0x0, 0x80, 0x80, 0x80, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:404 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + i8x16([0x1, 0x1, 0x7f, 0x82, 0x1, 0x1, 0x7f, 0x82, 0x1, 0x1, 0x7f, 0x82, 0x1, 0x1, 0x7f, 0x82]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:407 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + i8x16([0x1, 0x1, 0x7f, 0x2, 0x1, 0x1, 0x7f, 0x2, 0x1, 0x1, 0x7f, 0x2, 0x1, 0x1, 0x7f, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:410 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + i8x16([0x1, 0x1, 0x41, 0x82, 0x1, 0x1, 0x41, 0x82, 0x1, 0x1, 0x41, 0x82, 0x1, 0x1, 0x41, 0x82]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:413 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + i8x16([0x1, 0x1, 0x41, 0x2, 0x1, 0x1, 0x41, 0x2, 0x1, 0x1, 0x41, 0x2, 0x1, 0x1, 0x41, 0x2]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:416 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1]), + ]), + [ + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:419 +assert_return( + () => invoke($0, `i8x16.sub_sat_s`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ]), + [ + i8x16([0x0, 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:424 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:427 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:430 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:433 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:436 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:439 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:442 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:445 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:448 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:451 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:454 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:457 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:460 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:463 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:466 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:469 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:472 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:475 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:478 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:481 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:484 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:487 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:490 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:493 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:496 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:499 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:502 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:505 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:508 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:511 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:514 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0]), + i8x16([0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:517 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:520 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:523 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:526 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:529 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:532 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:535 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:538 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + f32x4([-0, -0, -0, -0]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x0, 0x80, 0x80, 0x80, 0x0, 0x80, 0x80, 0x80, 0x0, 0x80, 0x80, 0x80, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:541 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([Infinity, Infinity, Infinity, Infinity]), + ]), + [ + i8x16([0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:544 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + f32x4([-Infinity, -Infinity, -Infinity, -Infinity]), + ]), + [ + i8x16([0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:547 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + i8x16([0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:550 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0xc0, + 0xff, + ]), + ]), + [ + i8x16([0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:553 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:556 +assert_return( + () => invoke($0, `i8x16.sub_sat_u`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:561 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.add_sat (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1) (v128.const i8x16 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:564 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.sub_sat (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1) (v128.const i8x16 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:567 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.mul_sat (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1) (v128.const i8x16 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:570 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.div_sat (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1) (v128.const i8x16 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:573 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.add_sat_s (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:576 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.add_sat_u (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:579 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.sub_sat_s (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:582 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.sub_sat_u (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:585 +assert_malformed( + () => instantiate(`(func (result v128) (f32x4.add_sat_s (v128.const f32x4 0 0 0 0) (v128.const f32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:588 +assert_malformed( + () => instantiate(`(func (result v128) (f32x4.add_sat_u (v128.const f32x4 0 0 0 0) (v128.const f32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:591 +assert_malformed( + () => instantiate(`(func (result v128) (f32x4.sub_sat_s (v128.const f32x4 0 0 0 0) (v128.const f32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:594 +assert_malformed( + () => instantiate(`(func (result v128) (f32x4.sub_sat_u (v128.const f32x4 0 0 0 0) (v128.const f32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:599 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.add_sat_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:600 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.add_sat_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:601 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.sub_sat_s (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:602 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.sub_sat_u (i32.const 0) (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:606 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.add_sat_s-1st-arg-empty (result v128) + (i8x16.add_sat_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:614 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.add_sat_s-arg-empty (result v128) + (i8x16.add_sat_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:622 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.add_sat_u-1st-arg-empty (result v128) + (i8x16.add_sat_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:630 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.add_sat_u-arg-empty (result v128) + (i8x16.add_sat_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:638 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.sub_sat_s-1st-arg-empty (result v128) + (i8x16.sub_sat_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:646 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.sub_sat_s-arg-empty (result v128) + (i8x16.sub_sat_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:654 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.sub_sat_u-1st-arg-empty (result v128) + (i8x16.sub_sat_u (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:662 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.sub_sat_u-arg-empty (result v128) + (i8x16.sub_sat_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:672 +let $1 = instantiate(`(module + (func (export "sat-add_s-sub_s") (param v128 v128 v128) (result v128) + (i8x16.add_sat_s (i8x16.sub_sat_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "sat-add_s-sub_u") (param v128 v128 v128) (result v128) + (i8x16.add_sat_s (i8x16.sub_sat_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "sat-add_u-sub_s") (param v128 v128 v128) (result v128) + (i8x16.add_sat_u (i8x16.sub_sat_s (local.get 0) (local.get 1))(local.get 2))) + (func (export "sat-add_u-sub_u") (param v128 v128 v128) (result v128) + (i8x16.add_sat_u (i8x16.sub_sat_u (local.get 0) (local.get 1))(local.get 2))) + (func (export "sat-add_s-neg") (param v128 v128) (result v128) + (i8x16.add_sat_s (i8x16.neg (local.get 0)) (local.get 1))) + (func (export "sat-add_u-neg") (param v128 v128) (result v128) + (i8x16.add_sat_u (i8x16.neg (local.get 0)) (local.get 1))) + (func (export "sat-sub_s-neg") (param v128 v128) (result v128) + (i8x16.sub_sat_s (i8x16.neg (local.get 0)) (local.get 1))) + (func (export "sat-sub_u-neg") (param v128 v128) (result v128) + (i8x16.sub_sat_u (i8x16.neg (local.get 0)) (local.get 1))) +)`); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:691 +assert_return( + () => invoke($1, `sat-add_s-sub_s`, [ + i8x16([0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:695 +assert_return( + () => invoke($1, `sat-add_s-sub_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:699 +assert_return( + () => invoke($1, `sat-add_u-sub_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:703 +assert_return( + () => invoke($1, `sat-add_u-sub_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:707 +assert_return( + () => invoke($1, `sat-add_s-neg`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:710 +assert_return( + () => invoke($1, `sat-add_u-neg`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:713 +assert_return( + () => invoke($1, `sat-sub_s-neg`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_i8x16_sat_arith.wast:716 +assert_return( + () => invoke($1, `sat-sub_u-neg`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_int_to_int_extend.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_int_to_int_extend.wast.js new file mode 100644 index 0000000000..0f5a430e5a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_int_to_int_extend.wast.js @@ -0,0 +1,2026 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_int_to_int_extend.wast + +// ./test/core/simd/simd_int_to_int_extend.wast:3 +let $0 = instantiate(`(module + (func (export "i16x8.extend_high_i8x16_s") (param v128) (result v128) (i16x8.extend_high_i8x16_s (local.get 0))) + (func (export "i16x8.extend_high_i8x16_u") (param v128) (result v128) (i16x8.extend_high_i8x16_u (local.get 0))) + (func (export "i16x8.extend_low_i8x16_s") (param v128) (result v128) (i16x8.extend_low_i8x16_s (local.get 0))) + (func (export "i16x8.extend_low_i8x16_u") (param v128) (result v128) (i16x8.extend_low_i8x16_u (local.get 0))) + (func (export "i32x4.extend_high_i16x8_s") (param v128) (result v128) (i32x4.extend_high_i16x8_s (local.get 0))) + (func (export "i32x4.extend_high_i16x8_u") (param v128) (result v128) (i32x4.extend_high_i16x8_u (local.get 0))) + (func (export "i32x4.extend_low_i16x8_s") (param v128) (result v128) (i32x4.extend_low_i16x8_s (local.get 0))) + (func (export "i32x4.extend_low_i16x8_u") (param v128) (result v128) (i32x4.extend_low_i16x8_u (local.get 0))) + (func (export "i64x2.extend_high_i32x4_s") (param v128) (result v128) (i64x2.extend_high_i32x4_s (local.get 0))) + (func (export "i64x2.extend_high_i32x4_u") (param v128) (result v128) (i64x2.extend_high_i32x4_u (local.get 0))) + (func (export "i64x2.extend_low_i32x4_s") (param v128) (result v128) (i64x2.extend_low_i32x4_s (local.get 0))) + (func (export "i64x2.extend_low_i32x4_u") (param v128) (result v128) (i64x2.extend_low_i32x4_u (local.get 0))) +)`); + +// ./test/core/simd/simd_int_to_int_extend.wast:18 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:20 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:22 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:24 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:26 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:28 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:30 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:32 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:34 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ]), + [i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:36 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:38 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:40 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:42 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:44 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:46 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:48 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:50 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [i16x8([0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:52 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:54 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:57 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:59 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:61 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:63 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:65 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:67 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:69 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:71 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:73 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ]), + [i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:75 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:77 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:79 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:81 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:83 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:85 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:87 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:89 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [i16x8([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:91 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:93 +assert_return( + () => invoke($0, `i16x8.extend_high_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:96 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:98 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:100 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:102 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:104 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:106 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:108 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:110 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:112 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:114 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:116 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:118 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:120 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:122 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:124 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:126 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:128 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:130 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80, 0xff80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:132 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_s`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:135 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:137 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:139 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:141 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:143 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:145 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:147 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ]), + [i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:149 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:151 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:153 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:155 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:157 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:159 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:161 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:163 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ]), + [i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:165 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:167 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:169 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [i16x8([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:171 +assert_return( + () => invoke($0, `i16x8.extend_low_i8x16_u`, [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ]), + [i16x8([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:174 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:176 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:178 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:180 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:182 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:184 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:186 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:188 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:190 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + ]), + [i32x4([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:192 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:194 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:196 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:198 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:200 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:202 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:204 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:206 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i32x4([0xffff8001, 0xffff8001, 0xffff8001, 0xffff8001])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:208 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:210 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:213 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:215 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:217 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:219 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:221 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:223 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:225 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:227 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:229 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + ]), + [i32x4([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:231 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:233 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:235 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:237 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:239 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:241 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:243 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:245 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i32x4([0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:247 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:249 +assert_return( + () => invoke($0, `i32x4.extend_high_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:252 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:254 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:256 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:258 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:260 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:262 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:264 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:266 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:268 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:270 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:272 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:274 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:276 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:278 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:280 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:282 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0xffff8001, 0xffff8001, 0xffff8001, 0xffff8001])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:284 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:286 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0xffff8000, 0xffff8000, 0xffff8000, 0xffff8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:288 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_s`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:291 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:293 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:295 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:297 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:299 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i32x4([0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:301 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x1, 0x1, 0x1, 0x1, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:303 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x1, 0x1, 0x1, 0x1]), + ]), + [i32x4([0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:305 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:307 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7ffe, 0x7ffe, 0x7ffe, 0x7ffe]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:309 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:311 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:313 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:315 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:317 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:319 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x7fff, 0x7fff, 0x7fff, 0x7fff]), + ]), + [i32x4([0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:321 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x8001, 0x8001, 0x8001, 0x8001, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0x8001, 0x8001, 0x8001, 0x8001])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:323 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8001, 0x8001, 0x8001, 0x8001]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:325 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i32x4([0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:327 +assert_return( + () => invoke($0, `i32x4.extend_low_i16x8_u`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x8000, 0x8000, 0x8000, 0x8000]), + ]), + [i32x4([0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:330 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:332 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [i32x4([0x0, 0x0, 0x1, 0x1])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:334 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:336 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [i32x4([0x1, 0x1, 0x0, 0x0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:338 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:340 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0x1, 0x1, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:342 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x1, 0x1]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:344 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0x7ffffffe, 0x7ffffffe, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:346 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7ffffffe, 0x7ffffffe]), + ]), + [i64x2([0x7ffffffen, 0x7ffffffen])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:348 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:350 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i64x2([0xffffffff80000000n, 0xffffffff80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:352 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x80000000, 0x80000000]), + ]), + [i64x2([0xffffffff80000000n, 0xffffffff80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:354 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:356 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0x7fffffff, 0x7fffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:358 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:360 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0x80000001, 0x80000001, 0x80000000, 0x80000000]), + ]), + [i64x2([0xffffffff80000000n, 0xffffffff80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:362 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000001, 0x80000001]), + ]), + [i64x2([0xffffffff80000001n, 0xffffffff80000001n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:364 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:366 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x80000000, 0x80000000]), + ]), + [i64x2([0xffffffff80000000n, 0xffffffff80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:369 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:371 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [i32x4([0x0, 0x0, 0x1, 0x1])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:373 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffffn, 0xffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:375 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [i32x4([0x1, 0x1, 0x0, 0x0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:377 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:379 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0x1, 0x1, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffffn, 0xffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:381 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x1, 0x1]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:383 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0x7ffffffe, 0x7ffffffe, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:385 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7ffffffe, 0x7ffffffe]), + ]), + [i64x2([0x7ffffffen, 0x7ffffffen])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:387 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:389 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:391 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x80000000, 0x80000000]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:393 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:395 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0x7fffffff, 0x7fffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffffn, 0xffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:397 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:399 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0x80000001, 0x80000001, 0x80000000, 0x80000000]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:401 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000001, 0x80000001]), + ]), + [i64x2([0x80000001n, 0x80000001n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:403 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffffn, 0xffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:405 +assert_return( + () => invoke($0, `i64x2.extend_high_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x80000000, 0x80000000]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:408 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:410 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [i32x4([0x0, 0x0, 0x1, 0x1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:412 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:414 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [i32x4([0x1, 0x1, 0x0, 0x0])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:416 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:418 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0x1, 0x1, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:420 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x1, 0x1]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:422 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0x7ffffffe, 0x7ffffffe, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7ffffffen, 0x7ffffffen])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:424 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7ffffffe, 0x7ffffffe]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:426 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:428 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i64x2([0xffffffff80000000n, 0xffffffff80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:430 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x80000000, 0x80000000]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:432 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0xffffffff80000000n, 0xffffffff80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:434 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0x7fffffff, 0x7fffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:436 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:438 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0x80000001, 0x80000001, 0x80000000, 0x80000000]), + ]), + [i64x2([0xffffffff80000001n, 0xffffffff80000001n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:440 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0x80000001, 0x80000001]), + ]), + [i64x2([0xffffffff80000000n, 0xffffffff80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:442 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0x80000000, 0x80000000, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0xffffffff80000000n, 0xffffffff80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:444 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_s`, [ + i32x4([0xffffffff, 0xffffffff, 0x80000000, 0x80000000]), + ]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:447 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:449 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [i32x4([0x0, 0x0, 0x1, 0x1])]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:451 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0x0, 0x0, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x0n, 0x0n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:453 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [i32x4([0x1, 0x1, 0x0, 0x0])]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:455 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x0, 0x0]), + ]), + [i64x2([0xffffffffn, 0xffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:457 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0x1, 0x1, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x1n, 0x1n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:459 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x1, 0x1]), + ]), + [i64x2([0xffffffffn, 0xffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:461 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0x7ffffffe, 0x7ffffffe, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7ffffffen, 0x7ffffffen])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:463 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7ffffffe, 0x7ffffffe]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:465 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:467 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:469 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0x7fffffff, 0x7fffffff, 0x80000000, 0x80000000]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:471 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:473 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0x7fffffff, 0x7fffffff, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x7fffffffn, 0x7fffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:475 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x7fffffff, 0x7fffffff]), + ]), + [i64x2([0xffffffffn, 0xffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:477 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0x80000001, 0x80000001, 0x80000000, 0x80000000]), + ]), + [i64x2([0x80000001n, 0x80000001n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:479 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0x80000001, 0x80000001]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:481 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0x80000000, 0x80000000, 0xffffffff, 0xffffffff]), + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:483 +assert_return( + () => invoke($0, `i64x2.extend_low_i32x4_u`, [ + i32x4([0xffffffff, 0xffffffff, 0x80000000, 0x80000000]), + ]), + [i64x2([0xffffffffn, 0xffffffffn])], +); + +// ./test/core/simd/simd_int_to_int_extend.wast:488 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.extend_high_i8x16_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:489 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.extend_high_i8x16_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:490 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.extend_low_i8x16_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:491 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.extend_low_i8x16_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:492 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.extend_high_i16x8_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:493 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.extend_high_i16x8_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:494 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.extend_low_i16x8_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:495 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.extend_low_i16x8_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:496 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.extend_high_i32x4_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:497 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.extend_high_i32x4_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:498 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.extend_low_i32x4_s (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:499 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.extend_low_i32x4_u (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:503 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extend_high_i8x16_s-arg-empty (result v128) + (i16x8.extend_high_i8x16_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:511 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extend_high_i8x16_u-arg-empty (result v128) + (i16x8.extend_high_i8x16_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:519 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extend_low_i8x16_s-arg-empty (result v128) + (i16x8.extend_low_i8x16_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:527 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extend_low_i8x16_u-arg-empty (result v128) + (i16x8.extend_low_i8x16_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:535 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extend_high_i16x8_s-arg-empty (result v128) + (i32x4.extend_high_i16x8_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:543 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extend_high_i16x8_u-arg-empty (result v128) + (i32x4.extend_high_i16x8_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:551 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extend_low_i16x8_s-arg-empty (result v128) + (i32x4.extend_low_i16x8_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:559 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extend_low_i16x8_u-arg-empty (result v128) + (i32x4.extend_low_i16x8_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:567 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extend_high_i32x4_s-arg-empty (result v128) + (i64x2.extend_high_i32x4_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:575 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extend_high_i32x4_u-arg-empty (result v128) + (i64x2.extend_high_i32x4_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:583 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extend_low_i32x4_s-arg-empty (result v128) + (i64x2.extend_low_i32x4_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_int_to_int_extend.wast:591 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extend_low_i32x4_u-arg-empty (result v128) + (i64x2.extend_low_i32x4_u) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_lane.wast.js new file mode 100644 index 0000000000..614e722fb7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_lane.wast.js @@ -0,0 +1,4349 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_lane.wast + +// ./test/core/simd/simd_lane.wast:4 +let $0 = instantiate(`(module + (func (export "i8x16_extract_lane_s-first") (param v128) (result i32) + (i8x16.extract_lane_s 0 (local.get 0))) + (func (export "i8x16_extract_lane_s-last") (param v128) (result i32) + (i8x16.extract_lane_s 15 (local.get 0))) + (func (export "i8x16_extract_lane_u-first") (param v128) (result i32) + (i8x16.extract_lane_u 0 (local.get 0))) + (func (export "i8x16_extract_lane_u-last") (param v128) (result i32) + (i8x16.extract_lane_u 15 (local.get 0))) + (func (export "i16x8_extract_lane_s-first") (param v128) (result i32) + (i16x8.extract_lane_s 0 (local.get 0))) + (func (export "i16x8_extract_lane_s-last") (param v128) (result i32) + (i16x8.extract_lane_s 7 (local.get 0))) + (func (export "i16x8_extract_lane_u-first") (param v128) (result i32) + (i16x8.extract_lane_u 0 (local.get 0))) + (func (export "i16x8_extract_lane_u-last") (param v128) (result i32) + (i16x8.extract_lane_u 7 (local.get 0))) + (func (export "i32x4_extract_lane-first") (param v128) (result i32) + (i32x4.extract_lane 0 (local.get 0))) + (func (export "i32x4_extract_lane-last") (param v128) (result i32) + (i32x4.extract_lane 3 (local.get 0))) + (func (export "f32x4_extract_lane-first") (param v128) (result f32) + (f32x4.extract_lane 0 (local.get 0))) + (func (export "f32x4_extract_lane-last") (param v128) (result f32) + (f32x4.extract_lane 3 (local.get 0))) + (func (export "i8x16_replace_lane-first") (param v128 i32) (result v128) + (i8x16.replace_lane 0 (local.get 0) (local.get 1))) + (func (export "i8x16_replace_lane-last") (param v128 i32) (result v128) + (i8x16.replace_lane 15 (local.get 0) (local.get 1))) + (func (export "i16x8_replace_lane-first") (param v128 i32) (result v128) + (i16x8.replace_lane 0 (local.get 0) (local.get 1))) + (func (export "i16x8_replace_lane-last") (param v128 i32) (result v128) + (i16x8.replace_lane 7 (local.get 0) (local.get 1))) + (func (export "i32x4_replace_lane-first") (param v128 i32) (result v128) + (i32x4.replace_lane 0 (local.get 0) (local.get 1))) + (func (export "i32x4_replace_lane-last") (param v128 i32) (result v128) + (i32x4.replace_lane 3 (local.get 0) (local.get 1))) + (func (export "f32x4_replace_lane-first") (param v128 f32) (result v128) + (f32x4.replace_lane 0 (local.get 0) (local.get 1))) + (func (export "f32x4_replace_lane-last") (param v128 f32) (result v128) + (f32x4.replace_lane 3 (local.get 0) (local.get 1))) + (func (export "i64x2_extract_lane-first") (param v128) (result i64) + (i64x2.extract_lane 0 (local.get 0))) + (func (export "i64x2_extract_lane-last") (param v128) (result i64) + (i64x2.extract_lane 1 (local.get 0))) + (func (export "f64x2_extract_lane-first") (param v128) (result f64) + (f64x2.extract_lane 0 (local.get 0))) + (func (export "f64x2_extract_lane-last") (param v128) (result f64) + (f64x2.extract_lane 1 (local.get 0))) + (func (export "i64x2_replace_lane-first") (param v128 i64) (result v128) + (i64x2.replace_lane 0 (local.get 0) (local.get 1))) + (func (export "i64x2_replace_lane-last") (param v128 i64) (result v128) + (i64x2.replace_lane 1 (local.get 0) (local.get 1))) + (func (export "f64x2_replace_lane-first") (param v128 f64) (result v128) + (f64x2.replace_lane 0 (local.get 0) (local.get 1))) + (func (export "f64x2_replace_lane-last") (param v128 f64) (result v128) + (f64x2.replace_lane 1 (local.get 0) (local.get 1))) + + ;; Swizzle and shuffle + (func (export "v8x16_swizzle") (param v128 v128) (result v128) + (i8x16.swizzle (local.get 0) (local.get 1))) + (func (export "v8x16_shuffle-1") (param v128 v128) (result v128) + (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (local.get 0) (local.get 1))) + (func (export "v8x16_shuffle-2") (param v128 v128) (result v128) + (i8x16.shuffle 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 (local.get 0) (local.get 1))) + (func (export "v8x16_shuffle-3") (param v128 v128) (result v128) + (i8x16.shuffle 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 (local.get 0) (local.get 1))) + (func (export "v8x16_shuffle-4") (param v128 v128) (result v128) + (i8x16.shuffle 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 (local.get 0) (local.get 1))) + (func (export "v8x16_shuffle-5") (param v128 v128) (result v128) + (i8x16.shuffle 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (local.get 0) (local.get 1))) + (func (export "v8x16_shuffle-6") (param v128 v128) (result v128) + (i8x16.shuffle 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 (local.get 0) (local.get 1))) + (func (export "v8x16_shuffle-7") (param v128 v128) (result v128) + (i8x16.shuffle 0 0 0 0 0 0 0 0 16 16 16 16 16 16 16 16 (local.get 0) (local.get 1))) +)`); + +// ./test/core/simd/simd_lane.wast:81 +assert_return( + () => invoke($0, `i8x16_extract_lane_s-first`, [ + i8x16([0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 127)], +); + +// ./test/core/simd/simd_lane.wast:82 +assert_return( + () => invoke($0, `i8x16_extract_lane_s-first`, [ + i8x16([0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 127)], +); + +// ./test/core/simd/simd_lane.wast:83 +assert_return( + () => invoke($0, `i8x16_extract_lane_s-first`, [ + i8x16([0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", -1)], +); + +// ./test/core/simd/simd_lane.wast:84 +assert_return( + () => invoke($0, `i8x16_extract_lane_s-first`, [ + i8x16([0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", -1)], +); + +// ./test/core/simd/simd_lane.wast:85 +assert_return( + () => invoke($0, `i8x16_extract_lane_u-first`, [ + i8x16([0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 255)], +); + +// ./test/core/simd/simd_lane.wast:86 +assert_return( + () => invoke($0, `i8x16_extract_lane_u-first`, [ + i8x16([0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 255)], +); + +// ./test/core/simd/simd_lane.wast:87 +assert_return( + () => invoke($0, `i8x16_extract_lane_s-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80]), + ]), + [value("i32", -128)], +); + +// ./test/core/simd/simd_lane.wast:88 +assert_return( + () => invoke($0, `i8x16_extract_lane_s-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80]), + ]), + [value("i32", -128)], +); + +// ./test/core/simd/simd_lane.wast:89 +assert_return( + () => invoke($0, `i8x16_extract_lane_u-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff]), + ]), + [value("i32", 255)], +); + +// ./test/core/simd/simd_lane.wast:90 +assert_return( + () => invoke($0, `i8x16_extract_lane_u-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff]), + ]), + [value("i32", 255)], +); + +// ./test/core/simd/simd_lane.wast:91 +assert_return( + () => invoke($0, `i8x16_extract_lane_u-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80]), + ]), + [value("i32", 128)], +); + +// ./test/core/simd/simd_lane.wast:92 +assert_return( + () => invoke($0, `i8x16_extract_lane_u-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80]), + ]), + [value("i32", 128)], +); + +// ./test/core/simd/simd_lane.wast:94 +assert_return( + () => invoke($0, `i16x8_extract_lane_s-first`, [ + i16x8([0x7fff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 32767)], +); + +// ./test/core/simd/simd_lane.wast:95 +assert_return( + () => invoke($0, `i16x8_extract_lane_s-first`, [ + i16x8([0x7fff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 32767)], +); + +// ./test/core/simd/simd_lane.wast:96 +assert_return( + () => invoke($0, `i16x8_extract_lane_s-first`, [ + i16x8([0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", -1)], +); + +// ./test/core/simd/simd_lane.wast:97 +assert_return( + () => invoke($0, `i16x8_extract_lane_s-first`, [ + i16x8([0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", -1)], +); + +// ./test/core/simd/simd_lane.wast:98 +assert_return( + () => invoke($0, `i16x8_extract_lane_s-first`, [ + i16x8([0x3039, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 12345)], +); + +// ./test/core/simd/simd_lane.wast:99 +assert_return( + () => invoke($0, `i16x8_extract_lane_s-first`, [ + i16x8([0xedcc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", -4660)], +); + +// ./test/core/simd/simd_lane.wast:100 +assert_return( + () => invoke($0, `i16x8_extract_lane_u-first`, [ + i16x8([0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 65535)], +); + +// ./test/core/simd/simd_lane.wast:101 +assert_return( + () => invoke($0, `i16x8_extract_lane_u-first`, [ + i16x8([0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 65535)], +); + +// ./test/core/simd/simd_lane.wast:102 +assert_return( + () => invoke($0, `i16x8_extract_lane_u-first`, [ + i16x8([0x3039, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 12345)], +); + +// ./test/core/simd/simd_lane.wast:103 +assert_return( + () => invoke($0, `i16x8_extract_lane_u-first`, [ + i16x8([0xedcc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 60876)], +); + +// ./test/core/simd/simd_lane.wast:104 +assert_return( + () => invoke($0, `i16x8_extract_lane_s-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8000]), + ]), + [value("i32", -32768)], +); + +// ./test/core/simd/simd_lane.wast:105 +assert_return( + () => invoke($0, `i16x8_extract_lane_s-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8000]), + ]), + [value("i32", -32768)], +); + +// ./test/core/simd/simd_lane.wast:106 +assert_return( + () => invoke($0, `i16x8_extract_lane_s-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a85]), + ]), + [value("i32", 6789)], +); + +// ./test/core/simd/simd_lane.wast:107 +assert_return( + () => invoke($0, `i16x8_extract_lane_s-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9877]), + ]), + [value("i32", -26505)], +); + +// ./test/core/simd/simd_lane.wast:108 +assert_return( + () => invoke($0, `i16x8_extract_lane_u-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff]), + ]), + [value("i32", 65535)], +); + +// ./test/core/simd/simd_lane.wast:109 +assert_return( + () => invoke($0, `i16x8_extract_lane_u-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff]), + ]), + [value("i32", 65535)], +); + +// ./test/core/simd/simd_lane.wast:110 +assert_return( + () => invoke($0, `i16x8_extract_lane_u-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8000]), + ]), + [value("i32", 32768)], +); + +// ./test/core/simd/simd_lane.wast:111 +assert_return( + () => invoke($0, `i16x8_extract_lane_u-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8000]), + ]), + [value("i32", 32768)], +); + +// ./test/core/simd/simd_lane.wast:112 +assert_return( + () => invoke($0, `i16x8_extract_lane_u-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1a85]), + ]), + [value("i32", 6789)], +); + +// ./test/core/simd/simd_lane.wast:113 +assert_return( + () => invoke($0, `i16x8_extract_lane_u-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9877]), + ]), + [value("i32", 39031)], +); + +// ./test/core/simd/simd_lane.wast:115 +assert_return( + () => invoke($0, `i32x4_extract_lane-first`, [i32x4([0x7fffffff, 0x0, 0x0, 0x0])]), + [value("i32", 2147483647)], +); + +// ./test/core/simd/simd_lane.wast:116 +assert_return( + () => invoke($0, `i32x4_extract_lane-first`, [i32x4([0x7fffffff, 0x0, 0x0, 0x0])]), + [value("i32", 2147483647)], +); + +// ./test/core/simd/simd_lane.wast:117 +assert_return( + () => invoke($0, `i32x4_extract_lane-first`, [i32x4([0xffffffff, 0x0, 0x0, 0x0])]), + [value("i32", -1)], +); + +// ./test/core/simd/simd_lane.wast:118 +assert_return( + () => invoke($0, `i32x4_extract_lane-first`, [i32x4([0xffffffff, 0x0, 0x0, 0x0])]), + [value("i32", -1)], +); + +// ./test/core/simd/simd_lane.wast:119 +assert_return( + () => invoke($0, `i32x4_extract_lane-first`, [i32x4([0x499602d2, 0x0, 0x0, 0x0])]), + [value("i32", 1234567890)], +); + +// ./test/core/simd/simd_lane.wast:120 +assert_return( + () => invoke($0, `i32x4_extract_lane-first`, [i32x4([0xedcba988, 0x0, 0x0, 0x0])]), + [value("i32", -305419896)], +); + +// ./test/core/simd/simd_lane.wast:121 +assert_return( + () => invoke($0, `i32x4_extract_lane-last`, [i32x4([0x0, 0x0, 0x0, 0x80000000])]), + [value("i32", -2147483648)], +); + +// ./test/core/simd/simd_lane.wast:122 +assert_return( + () => invoke($0, `i32x4_extract_lane-last`, [i32x4([0x0, 0x0, 0x0, 0x80000000])]), + [value("i32", -2147483648)], +); + +// ./test/core/simd/simd_lane.wast:123 +assert_return( + () => invoke($0, `i32x4_extract_lane-last`, [i32x4([0x0, 0x0, 0x0, 0xffffffff])]), + [value("i32", -1)], +); + +// ./test/core/simd/simd_lane.wast:124 +assert_return( + () => invoke($0, `i32x4_extract_lane-last`, [i32x4([0x0, 0x0, 0x0, 0xffffffff])]), + [value("i32", -1)], +); + +// ./test/core/simd/simd_lane.wast:125 +assert_return( + () => invoke($0, `i32x4_extract_lane-last`, [i32x4([0x0, 0x0, 0x0, 0x3ade68b1])]), + [value("i32", 987654321)], +); + +// ./test/core/simd/simd_lane.wast:126 +assert_return( + () => invoke($0, `i32x4_extract_lane-last`, [i32x4([0x0, 0x0, 0x0, 0xedcba988])]), + [value("i32", -305419896)], +); + +// ./test/core/simd/simd_lane.wast:128 +assert_return( + () => invoke($0, `i64x2_extract_lane-first`, [i64x2([0x7fffffffffffffffn, 0x0n])]), + [value("i64", 9223372036854775807n)], +); + +// ./test/core/simd/simd_lane.wast:129 +assert_return( + () => invoke($0, `i64x2_extract_lane-first`, [i64x2([0x7ffffffffffffffen, 0x0n])]), + [value("i64", 9223372036854775806n)], +); + +// ./test/core/simd/simd_lane.wast:130 +assert_return( + () => invoke($0, `i64x2_extract_lane-first`, [i64x2([0xffffffffffffffffn, 0x0n])]), + [value("i64", -1n)], +); + +// ./test/core/simd/simd_lane.wast:131 +assert_return( + () => invoke($0, `i64x2_extract_lane-first`, [i64x2([0xffffffffffffffffn, 0x0n])]), + [value("i64", -1n)], +); + +// ./test/core/simd/simd_lane.wast:132 +assert_return( + () => invoke($0, `i64x2_extract_lane-first`, [i64x2([0x112210f47de98115n, 0x0n])]), + [value("i64", 1234567890123456789n)], +); + +// ./test/core/simd/simd_lane.wast:133 +assert_return( + () => invoke($0, `i64x2_extract_lane-first`, [i64x2([0x1234567890abcdefn, 0x0n])]), + [value("i64", 1311768467294899695n)], +); + +// ./test/core/simd/simd_lane.wast:134 +assert_return( + () => invoke($0, `i64x2_extract_lane-last`, [i64x2([0x0n, 0x8000000000000000n])]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/simd/simd_lane.wast:135 +assert_return( + () => invoke($0, `i64x2_extract_lane-last`, [i64x2([0x0n, 0x8000000000000000n])]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/simd/simd_lane.wast:136 +assert_return( + () => invoke($0, `i64x2_extract_lane-last`, [i64x2([0x0n, 0x8000000000000000n])]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/simd/simd_lane.wast:137 +assert_return( + () => invoke($0, `i64x2_extract_lane-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f]), + ]), + [value("i64", 9223372036854775807n)], +); + +// ./test/core/simd/simd_lane.wast:138 +assert_return( + () => invoke($0, `i64x2_extract_lane-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8000]), + ]), + [value("i64", -9223372036854775808n)], +); + +// ./test/core/simd/simd_lane.wast:139 +assert_return( + () => invoke($0, `i64x2_extract_lane-last`, [ + i32x4([0x0, 0x0, 0xffffffff, 0x7fffffff]), + ]), + [value("i64", 9223372036854775807n)], +); + +// ./test/core/simd/simd_lane.wast:140 +assert_return( + () => invoke($0, `i64x2_extract_lane-last`, [f64x2([-Infinity, Infinity])]), + [value("i64", 9218868437227405312n)], +); + +// ./test/core/simd/simd_lane.wast:141 +assert_return( + () => invoke($0, `i64x2_extract_lane-last`, [i64x2([0x0n, 0x112210f47de98115n])]), + [value("i64", 1234567890123456789n)], +); + +// ./test/core/simd/simd_lane.wast:142 +assert_return( + () => invoke($0, `i64x2_extract_lane-last`, [i64x2([0x0n, 0x1234567890abcdefn])]), + [value("i64", 1311768467294899695n)], +); + +// ./test/core/simd/simd_lane.wast:144 +assert_return(() => invoke($0, `f32x4_extract_lane-first`, [f32x4([-5, 0, 0, 0])]), [value("f32", -5)]); + +// ./test/core/simd/simd_lane.wast:145 +assert_return( + () => invoke($0, `f32x4_extract_lane-first`, [ + f32x4([100000000000000000000000000000000000000, 0, 0, 0]), + ]), + [value("f32", 100000000000000000000000000000000000000)], +); + +// ./test/core/simd/simd_lane.wast:146 +assert_return( + () => invoke($0, `f32x4_extract_lane-first`, [ + f32x4([340282350000000000000000000000000000000, 0, 0, 0]), + ]), + [value("f32", 340282350000000000000000000000000000000)], +); + +// ./test/core/simd/simd_lane.wast:147 +assert_return( + () => invoke($0, `f32x4_extract_lane-first`, [ + f32x4([170141180000000000000000000000000000000, 0, 0, 0]), + ]), + [value("f32", 170141180000000000000000000000000000000)], +); + +// ./test/core/simd/simd_lane.wast:148 +assert_return( + () => invoke($0, `f32x4_extract_lane-first`, [f32x4([Infinity, 0, 0, 0])]), + [value("f32", Infinity)], +); + +// ./test/core/simd/simd_lane.wast:149 +assert_return( + () => invoke($0, `f32x4_extract_lane-first`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0x80, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/simd/simd_lane.wast:150 +assert_return( + () => invoke($0, `f32x4_extract_lane-first`, [ + f32x4([1234567900000000000000000000, 0, 0, 0]), + ]), + [value("f32", 1234567900000000000000000000)], +); + +// ./test/core/simd/simd_lane.wast:151 +assert_return( + () => invoke($0, `f32x4_extract_lane-first`, [f32x4([156374990000, 0, 0, 0])]), + [value("f32", 156374990000)], +); + +// ./test/core/simd/simd_lane.wast:152 +assert_return( + () => invoke($0, `f32x4_extract_lane-last`, [ + f32x4([0, 0, 0, -100000000000000000000000000000000000000]), + ]), + [value("f32", -100000000000000000000000000000000000000)], +); + +// ./test/core/simd/simd_lane.wast:153 +assert_return( + () => invoke($0, `f32x4_extract_lane-last`, [ + f32x4([0, 0, 0, -340282350000000000000000000000000000000]), + ]), + [value("f32", -340282350000000000000000000000000000000)], +); + +// ./test/core/simd/simd_lane.wast:154 +assert_return( + () => invoke($0, `f32x4_extract_lane-last`, [ + f32x4([0, 0, 0, -170141180000000000000000000000000000000]), + ]), + [value("f32", -170141180000000000000000000000000000000)], +); + +// ./test/core/simd/simd_lane.wast:155 +assert_return( + () => invoke($0, `f32x4_extract_lane-last`, [f32x4([0, 0, 0, -Infinity])]), + [value("f32", -Infinity)], +); + +// ./test/core/simd/simd_lane.wast:156 +assert_return( + () => invoke($0, `f32x4_extract_lane-last`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x80, + 0xff, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/simd/simd_lane.wast:157 +assert_return( + () => invoke($0, `f32x4_extract_lane-last`, [f32x4([0, 0, 0, 123456790])]), + [value("f32", 123456790)], +); + +// ./test/core/simd/simd_lane.wast:158 +assert_return( + () => invoke($0, `f32x4_extract_lane-last`, [f32x4([0, 0, 0, 81985530000000000])]), + [value("f32", 81985530000000000)], +); + +// ./test/core/simd/simd_lane.wast:160 +assert_return(() => invoke($0, `f64x2_extract_lane-first`, [f64x2([-1.5, 0])]), [value("f64", -1.5)]); + +// ./test/core/simd/simd_lane.wast:161 +assert_return(() => invoke($0, `f64x2_extract_lane-first`, [f64x2([1.5, 0])]), [value("f64", 1.5)]); + +// ./test/core/simd/simd_lane.wast:162 +assert_return( + () => invoke($0, `f64x2_extract_lane-first`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017976931348623155, + 0, + ]), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017976931348623155), + ], +); + +// ./test/core/simd/simd_lane.wast:163 +assert_return( + () => invoke($0, `f64x2_extract_lane-first`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017976931348623155, + 0, + ]), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017976931348623155), + ], +); + +// ./test/core/simd/simd_lane.wast:164 +assert_return( + () => invoke($0, `f64x2_extract_lane-first`, [ + f64x2([ + -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0, + ]), + ]), + [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/simd/simd_lane.wast:165 +assert_return( + () => invoke($0, `f64x2_extract_lane-first`, [ + f64x2([ + 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, + 0, + ]), + ]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/simd/simd_lane.wast:166 +assert_return( + () => invoke($0, `f64x2_extract_lane-first`, [f64x2([-Infinity, 0])]), + [value("f64", -Infinity)], +); + +// ./test/core/simd/simd_lane.wast:167 +assert_return( + () => invoke($0, `f64x2_extract_lane-first`, [f64x2([Infinity, 0])]), + [value("f64", Infinity)], +); + +// ./test/core/simd/simd_lane.wast:168 +assert_return( + () => invoke($0, `f64x2_extract_lane-first`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x80, + ]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/simd/simd_lane.wast:169 +assert_return( + () => invoke($0, `f64x2_extract_lane-first`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/simd/simd_lane.wast:170 +assert_return( + () => invoke($0, `f64x2_extract_lane-first`, [ + f64x2([1234567890123456900000000000, 0]), + ]), + [value("f64", 1234567890123456900000000000)], +); + +// ./test/core/simd/simd_lane.wast:171 +assert_return( + () => invoke($0, `f64x2_extract_lane-first`, [f64x2([2623536934927580700, 0])]), + [value("f64", 2623536934927580700)], +); + +// ./test/core/simd/simd_lane.wast:172 +assert_return(() => invoke($0, `f64x2_extract_lane-last`, [f64x2([0, 2.25])]), [value("f64", 2.25)]); + +// ./test/core/simd/simd_lane.wast:173 +assert_return(() => invoke($0, `f64x2_extract_lane-last`, [f64x2([0, -2.25])]), [value("f64", -2.25)]); + +// ./test/core/simd/simd_lane.wast:174 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [ + f64x2([ + 0, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_lane.wast:175 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [ + f64x2([ + 0, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_lane.wast:176 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [ + f64x2([ + 0, + -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_lane.wast:177 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [ + f64x2([ + 0, + 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, + ]), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_lane.wast:178 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [f64x2([-0, -Infinity])]), + [value("f64", -Infinity)], +); + +// ./test/core/simd/simd_lane.wast:179 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [f64x2([0, Infinity])]), + [value("f64", Infinity)], +); + +// ./test/core/simd/simd_lane.wast:180 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x80, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff])], +); + +// ./test/core/simd/simd_lane.wast:181 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/simd/simd_lane.wast:182 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [f64x2([0, 123456789])]), + [value("f64", 123456789)], +); + +// ./test/core/simd/simd_lane.wast:183 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [f64x2([0, 1375488932539311400000000])]), + [value("f64", 1375488932539311400000000)], +); + +// ./test/core/simd/simd_lane.wast:185 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("f64", 0)], +); + +// ./test/core/simd/simd_lane.wast:186 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80]), + ]), + [value("f64", -0)], +); + +// ./test/core/simd/simd_lane.wast:187 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4000]), + ]), + [value("f64", 2)], +); + +// ./test/core/simd/simd_lane.wast:188 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000]), + ]), + [value("f64", -2)], +); + +// ./test/core/simd/simd_lane.wast:189 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [ + i32x4([0x0, 0x0, 0xffffffff, 0x7fefffff]), + ]), + [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ], +); + +// ./test/core/simd/simd_lane.wast:190 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [i32x4([0x0, 0x0, 0x0, 0x100000])]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ], +); + +// ./test/core/simd/simd_lane.wast:191 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [i32x4([0x0, 0x0, 0xffffffff, 0xfffff])]), + [ + value("f64", 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507201), + ], +); + +// ./test/core/simd/simd_lane.wast:192 +assert_return( + () => invoke($0, `f64x2_extract_lane-last`, [i32x4([0x0, 0x0, 0x1, 0x0])]), + [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ], +); + +// ./test/core/simd/simd_lane.wast:194 +assert_return( + () => invoke($0, `i8x16_replace_lane-first`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 127, + ]), + [ + i8x16([0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:195 +assert_return( + () => invoke($0, `i8x16_replace_lane-first`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 128, + ]), + [ + i8x16([0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:196 +assert_return( + () => invoke($0, `i8x16_replace_lane-first`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 255, + ]), + [ + i8x16([0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:197 +assert_return( + () => invoke($0, `i8x16_replace_lane-first`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 256, + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:198 +assert_return( + () => invoke($0, `i8x16_replace_lane-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + -128, + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80]), + ], +); + +// ./test/core/simd/simd_lane.wast:199 +assert_return( + () => invoke($0, `i8x16_replace_lane-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + -129, + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f]), + ], +); + +// ./test/core/simd/simd_lane.wast:200 +assert_return( + () => invoke($0, `i8x16_replace_lane-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 32767, + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff]), + ], +); + +// ./test/core/simd/simd_lane.wast:201 +assert_return( + () => invoke($0, `i8x16_replace_lane-last`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + -32768, + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:203 +assert_return( + () => invoke($0, `i16x8_replace_lane-first`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 32767, + ]), + [i16x8([0x7fff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:204 +assert_return( + () => invoke($0, `i16x8_replace_lane-first`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 32768, + ]), + [i16x8([0x8000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:205 +assert_return( + () => invoke($0, `i16x8_replace_lane-first`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 65535, + ]), + [i16x8([0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:206 +assert_return( + () => invoke($0, `i16x8_replace_lane-first`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 65536, + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:207 +assert_return( + () => invoke($0, `i16x8_replace_lane-first`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 12345, + ]), + [i16x8([0x3039, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:208 +assert_return( + () => invoke($0, `i16x8_replace_lane-first`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + -4660, + ]), + [i16x8([0xedcc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:209 +assert_return( + () => invoke($0, `i16x8_replace_lane-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + -32768, + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8000])], +); + +// ./test/core/simd/simd_lane.wast:210 +assert_return( + () => invoke($0, `i16x8_replace_lane-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + -32769, + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7fff])], +); + +// ./test/core/simd/simd_lane.wast:211 +assert_return( + () => invoke($0, `i16x8_replace_lane-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 2147483647, + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffff])], +); + +// ./test/core/simd/simd_lane.wast:212 +assert_return( + () => invoke($0, `i16x8_replace_lane-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + -2147483648, + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:213 +assert_return( + () => invoke($0, `i16x8_replace_lane-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 54321, + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd431])], +); + +// ./test/core/simd/simd_lane.wast:214 +assert_return( + () => invoke($0, `i16x8_replace_lane-last`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + -17185, + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xbcdf])], +); + +// ./test/core/simd/simd_lane.wast:216 +assert_return( + () => invoke($0, `i32x4_replace_lane-first`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + 2147483647, + ]), + [i32x4([0x7fffffff, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:217 +assert_return( + () => invoke($0, `i32x4_replace_lane-first`, [i32x4([0x0, 0x0, 0x0, 0x0]), -1]), + [i32x4([0xffffffff, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:218 +assert_return( + () => invoke($0, `i32x4_replace_lane-first`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + 1234567890, + ]), + [i32x4([0x499602d2, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:219 +assert_return( + () => invoke($0, `i32x4_replace_lane-first`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + -305419896, + ]), + [i32x4([0xedcba988, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:220 +assert_return( + () => invoke($0, `i32x4_replace_lane-last`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + -2147483648, + ]), + [i32x4([0x0, 0x0, 0x0, 0x80000000])], +); + +// ./test/core/simd/simd_lane.wast:221 +assert_return( + () => invoke($0, `i32x4_replace_lane-last`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + -2147483648, + ]), + [i32x4([0x0, 0x0, 0x0, 0x80000000])], +); + +// ./test/core/simd/simd_lane.wast:222 +assert_return( + () => invoke($0, `i32x4_replace_lane-last`, [i32x4([0x0, 0x0, 0x0, 0x0]), 1234567890]), + [i32x4([0x0, 0x0, 0x0, 0x499602d2])], +); + +// ./test/core/simd/simd_lane.wast:223 +assert_return( + () => invoke($0, `i32x4_replace_lane-last`, [i32x4([0x0, 0x0, 0x0, 0x0]), -305419896]), + [i32x4([0x0, 0x0, 0x0, 0xedcba988])], +); + +// ./test/core/simd/simd_lane.wast:225 +assert_return( + () => invoke($0, `f32x4_replace_lane-first`, [f32x4([0, 0, 0, 0]), value("f32", 53)]), + [ + new F32x4Pattern( + value("f32", 53), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:226 +assert_return( + () => invoke($0, `f32x4_replace_lane-first`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + value("f32", 53), + ]), + [ + new F32x4Pattern( + value("f32", 53), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:227 +assert_return( + () => invoke($0, `f32x4_replace_lane-first`, [ + f32x4([0, 0, 0, 0]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:228 +assert_return( + () => invoke($0, `f32x4_replace_lane-first`, [ + f32x4([0, 0, 0, 0]), + value("f32", Infinity), + ]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:229 +assert_return( + () => invoke($0, `f32x4_replace_lane-first`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + value("f32", 3.14), + ]), + [ + new F32x4Pattern( + value("f32", 3.14), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:230 +assert_return( + () => invoke($0, `f32x4_replace_lane-first`, [ + f32x4([Infinity, 0, 0, 0]), + value("f32", 100000000000000000000000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", 100000000000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:231 +assert_return( + () => invoke($0, `f32x4_replace_lane-first`, [ + f32x4([Infinity, 0, 0, 0]), + value("f32", 340282350000000000000000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:232 +assert_return( + () => invoke($0, `f32x4_replace_lane-first`, [ + f32x4([Infinity, 0, 0, 0]), + value("f32", 170141180000000000000000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", 170141180000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:233 +assert_return( + () => invoke($0, `f32x4_replace_lane-first`, [ + f32x4([0, 0, 0, 0]), + value("f32", 123456790), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:234 +assert_return( + () => invoke($0, `f32x4_replace_lane-first`, [ + f32x4([0, 0, 0, 0]), + value("f32", 123456790), + ]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:235 +assert_return( + () => invoke($0, `f32x4_replace_lane-first`, [ + f32x4([0, 0, 0, 0]), + value("f32", 81985530000000000), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:236 +assert_return( + () => invoke($0, `f32x4_replace_lane-first`, [ + f32x4([0, 0, 0, 0]), + value("f32", 81985530000000000), + ]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:237 +assert_return( + () => invoke($0, `f32x4_replace_lane-last`, [f32x4([0, 0, 0, 0]), value("f32", -53)]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", -53), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:238 +assert_return( + () => invoke($0, `f32x4_replace_lane-last`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + value("f32", -53), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", -53), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:239 +assert_return( + () => invoke($0, `f32x4_replace_lane-last`, [ + f32x4([0, 0, 0, 0]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:240 +assert_return( + () => invoke($0, `f32x4_replace_lane-last`, [ + f32x4([0, 0, 0, 0]), + value("f32", -Infinity), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:241 +assert_return( + () => invoke($0, `f32x4_replace_lane-last`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + value("f32", 3.14), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 3.14), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:242 +assert_return( + () => invoke($0, `f32x4_replace_lane-last`, [ + f32x4([0, 0, 0, -Infinity]), + value("f32", -100000000000000000000000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", -100000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:243 +assert_return( + () => invoke($0, `f32x4_replace_lane-last`, [ + f32x4([0, 0, 0, -Infinity]), + value("f32", -340282350000000000000000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:244 +assert_return( + () => invoke($0, `f32x4_replace_lane-last`, [ + f32x4([0, 0, 0, -Infinity]), + value("f32", -170141180000000000000000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", -170141180000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:245 +assert_return( + () => invoke($0, `f32x4_replace_lane-last`, [ + f32x4([0, 0, 0, 0]), + value("f32", 1234567900000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:246 +assert_return( + () => invoke($0, `f32x4_replace_lane-last`, [ + f32x4([0, 0, 0, 0]), + value("f32", 1234567900000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:247 +assert_return( + () => invoke($0, `f32x4_replace_lane-last`, [ + f32x4([0, 0, 0, 0]), + value("f32", 42984030000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:248 +assert_return( + () => invoke($0, `f32x4_replace_lane-last`, [ + f32x4([0, 0, 0, 0]), + value("f32", 156374990000), + ]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:250 +assert_return( + () => invoke($0, `i64x2_replace_lane-first`, [ + i64x2([0x0n, 0x0n]), + 9223372036854775807n, + ]), + [i64x2([0x7fffffffffffffffn, 0x0n])], +); + +// ./test/core/simd/simd_lane.wast:251 +assert_return( + () => invoke($0, `i64x2_replace_lane-first`, [i64x2([0x0n, 0x0n]), -1n]), + [i64x2([0xffffffffffffffffn, 0x0n])], +); + +// ./test/core/simd/simd_lane.wast:252 +assert_return( + () => invoke($0, `i64x2_replace_lane-first`, [ + i64x2([0x0n, 0x0n]), + 1234567890123456789n, + ]), + [i64x2([0x112210f47de98115n, 0x0n])], +); + +// ./test/core/simd/simd_lane.wast:253 +assert_return( + () => invoke($0, `i64x2_replace_lane-first`, [ + i64x2([0x0n, 0x0n]), + 1311768467294899695n, + ]), + [i64x2([0x1234567890abcdefn, 0x0n])], +); + +// ./test/core/simd/simd_lane.wast:254 +assert_return( + () => invoke($0, `i64x2_replace_lane-last`, [ + i64x2([0x0n, 0x0n]), + -9223372036854775808n, + ]), + [i64x2([0x0n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_lane.wast:255 +assert_return( + () => invoke($0, `i64x2_replace_lane-last`, [ + i64x2([0x0n, 0x0n]), + -9223372036854775808n, + ]), + [i64x2([0x0n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_lane.wast:256 +assert_return( + () => invoke($0, `i64x2_replace_lane-last`, [ + i64x2([0x0n, 0x0n]), + 1234567890123456789n, + ]), + [i64x2([0x0n, 0x112210f47de98115n])], +); + +// ./test/core/simd/simd_lane.wast:257 +assert_return( + () => invoke($0, `i64x2_replace_lane-last`, [ + i64x2([0x0n, 0x0n]), + 1311768467294899695n, + ]), + [i64x2([0x0n, 0x1234567890abcdefn])], +); + +// ./test/core/simd/simd_lane.wast:259 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [f64x2([1, 1]), value("f64", 0)]), + [new F64x2Pattern(value("f64", 0), value("f64", 1))], +); + +// ./test/core/simd/simd_lane.wast:260 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [f64x2([-1, -1]), value("f64", -0)]), + [new F64x2Pattern(value("f64", -0), value("f64", -1))], +); + +// ./test/core/simd/simd_lane.wast:261 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [f64x2([0, 0]), value("f64", 1.25)]), + [new F64x2Pattern(value("f64", 1.25), value("f64", 0))], +); + +// ./test/core/simd/simd_lane.wast:262 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [f64x2([0, 0]), value("f64", -1.25)]), + [new F64x2Pattern(value("f64", -1.25), value("f64", 0))], +); + +// ./test/core/simd/simd_lane.wast:263 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:264 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + ]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:265 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [ + f64x2([-Infinity, 0]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:266 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [ + f64x2([Infinity, 0]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:267 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [ + f64x2([0, 0]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + value("f64", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:268 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [ + f64x2([0, 0]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:269 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [f64x2([0, 0]), value("f64", -Infinity)]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", 0))], +); + +// ./test/core/simd/simd_lane.wast:270 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [f64x2([0, 0]), value("f64", Infinity)]), + [new F64x2Pattern(value("f64", Infinity), value("f64", 0))], +); + +// ./test/core/simd/simd_lane.wast:271 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [f64x2([0, 0]), value("f64", 123456789)]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 0))], +); + +// ./test/core/simd/simd_lane.wast:272 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [f64x2([0, 0]), value("f64", 123456789)]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 0))], +); + +// ./test/core/simd/simd_lane.wast:273 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [ + f64x2([0, 0]), + value("f64", 1375488932539311400000000), + ]), + [new F64x2Pattern(value("f64", 1375488932539311400000000), value("f64", 0))], +); + +// ./test/core/simd/simd_lane.wast:274 +assert_return( + () => invoke($0, `f64x2_replace_lane-first`, [ + f64x2([0, 0]), + value("f64", 1375488932539311400000000), + ]), + [new F64x2Pattern(value("f64", 1375488932539311400000000), value("f64", 0))], +); + +// ./test/core/simd/simd_lane.wast:275 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [f64x2([2, 2]), value("f64", 0)]), + [new F64x2Pattern(value("f64", 2), value("f64", 0))], +); + +// ./test/core/simd/simd_lane.wast:276 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [f64x2([-2, -2]), value("f64", -0)]), + [new F64x2Pattern(value("f64", -2), value("f64", -0))], +); + +// ./test/core/simd/simd_lane.wast:277 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [f64x2([0, 0]), value("f64", 2.25)]), + [new F64x2Pattern(value("f64", 0), value("f64", 2.25))], +); + +// ./test/core/simd/simd_lane.wast:278 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [f64x2([0, 0]), value("f64", -2.25)]), + [new F64x2Pattern(value("f64", 0), value("f64", -2.25))], +); + +// ./test/core/simd/simd_lane.wast:279 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0xff, + ]), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + new F64x2Pattern( + value("f64", 0), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:280 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + new F64x2Pattern( + value("f64", 0), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:281 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [ + f64x2([0, -Infinity]), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + new F64x2Pattern( + value("f64", 0), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:282 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [ + f64x2([0, Infinity]), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + new F64x2Pattern( + value("f64", 0), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:283 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [ + f64x2([0, 0]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [ + new F64x2Pattern( + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:284 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [ + f64x2([0, 0]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [ + new F64x2Pattern( + value("f64", 0), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:285 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [f64x2([0, 0]), value("f64", -Infinity)]), + [new F64x2Pattern(value("f64", 0), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_lane.wast:286 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [f64x2([0, 0]), value("f64", Infinity)]), + [new F64x2Pattern(value("f64", 0), value("f64", Infinity))], +); + +// ./test/core/simd/simd_lane.wast:287 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [ + f64x2([0, 0]), + value("f64", 1234567890000000000000000000), + ]), + [ + new F64x2Pattern(value("f64", 0), value("f64", 1234567890000000000000000000)), + ], +); + +// ./test/core/simd/simd_lane.wast:288 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [ + f64x2([0, 0]), + value("f64", 1234567890000000000000000000), + ]), + [ + new F64x2Pattern(value("f64", 0), value("f64", 1234567890000000000000000000)), + ], +); + +// ./test/core/simd/simd_lane.wast:289 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [ + f64x2([0, 0]), + value("f64", 1234567890000000000000000000), + ]), + [ + new F64x2Pattern(value("f64", 0), value("f64", 1234567890000000000000000000)), + ], +); + +// ./test/core/simd/simd_lane.wast:290 +assert_return( + () => invoke($0, `f64x2_replace_lane-last`, [ + f64x2([0, 0]), + value("f64", 0.0000000000123456789), + ]), + [new F64x2Pattern(value("f64", 0), value("f64", 0.0000000000123456789))], +); + +// ./test/core/simd/simd_lane.wast:292 +assert_return( + () => invoke($0, `v8x16_swizzle`, [ + i8x16([0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [ + i8x16([0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f]), + ], +); + +// ./test/core/simd/simd_lane.wast:296 +assert_return( + () => invoke($0, `v8x16_swizzle`, [ + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + i8x16([0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:300 +assert_return( + () => invoke($0, `v8x16_swizzle`, [ + i8x16([0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73]), + i8x16([0xf, 0xe, 0xd, 0xc, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0x73, 0x72, 0x71, 0x70, 0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x69, 0x68, 0x67, 0x66, 0x65, 0x64]), + ], +); + +// ./test/core/simd/simd_lane.wast:304 +assert_return( + () => invoke($0, `v8x16_swizzle`, [ + i8x16([0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73]), + i8x16([0xff, 0x1, 0xfe, 0x2, 0xfd, 0x3, 0xfc, 0x4, 0xfb, 0x5, 0xfa, 0x6, 0xf9, 0x7, 0xf8, 0x8]), + ]), + [ + i8x16([0x0, 0x65, 0x0, 0x66, 0x0, 0x67, 0x0, 0x68, 0x0, 0x69, 0x0, 0x6a, 0x0, 0x6b, 0x0, 0x6c]), + ], +); + +// ./test/core/simd/simd_lane.wast:308 +assert_return( + () => invoke($0, `v8x16_swizzle`, [ + i8x16([0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73]), + i8x16([0x9, 0x10, 0xa, 0x11, 0xb, 0x12, 0xc, 0x13, 0xd, 0x14, 0xe, 0x15, 0xf, 0x16, 0x10, 0x17]), + ]), + [ + i8x16([0x6d, 0x0, 0x6e, 0x0, 0x6f, 0x0, 0x70, 0x0, 0x71, 0x0, 0x72, 0x0, 0x73, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:312 +assert_return( + () => invoke($0, `v8x16_swizzle`, [ + i8x16([0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73]), + i8x16([0x9, 0x10, 0xa, 0x11, 0xb, 0x12, 0xc, 0x13, 0xd, 0x14, 0xe, 0x15, 0xf, 0x16, 0x10, 0x17]), + ]), + [ + i8x16([0x6d, 0x0, 0x6e, 0x0, 0x6f, 0x0, 0x70, 0x0, 0x71, 0x0, 0x72, 0x0, 0x73, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:316 +assert_return( + () => invoke($0, `v8x16_swizzle`, [ + i16x8([0x6465, 0x6667, 0x6869, 0x6a6b, 0x6c6d, 0x6e6f, 0x7071, 0x7273]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i16x8([0x6465, 0x6667, 0x6869, 0x6a6b, 0x6c6d, 0x6e6f, 0x7071, 0x7273])], +); + +// ./test/core/simd/simd_lane.wast:320 +assert_return( + () => invoke($0, `v8x16_swizzle`, [ + i32x4([0x64656667, 0x68696a6b, 0x6c6d6e6f, 0x70717273]), + i8x16([0xf, 0xe, 0xd, 0xc, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [i32x4([0x73727170, 0x6f6e6d6c, 0x6b6a6968, 0x67666564])], +); + +// ./test/core/simd/simd_lane.wast:324 +assert_return( + () => invoke($0, `v8x16_swizzle`, [ + bytes('v128', [ + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0xff, + 0x0, + 0x0, + 0x80, + 0x7f, + 0x0, + 0x0, + 0x80, + 0xff, + ]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0x7fc00000, 0xffc00000, 0x7f800000, 0xff800000])], +); + +// ./test/core/simd/simd_lane.wast:328 +assert_return( + () => invoke($0, `v8x16_swizzle`, [ + i32x4([0x67666564, 0x6b6a6968, 0x6f6e6d5c, 0x73727170]), + f32x4([0, -0, Infinity, -Infinity]), + ]), + [i32x4([0x64646464, 0x646464, 0x6464, 0x6464])], +); + +// ./test/core/simd/simd_lane.wast:333 +assert_return( + () => invoke($0, `v8x16_shuffle-1`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f]), + ]), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_lane.wast:337 +assert_return( + () => invoke($0, `v8x16_shuffle-2`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + ], +); + +// ./test/core/simd/simd_lane.wast:341 +assert_return( + () => invoke($0, `v8x16_shuffle-3`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0]), + ], +); + +// ./test/core/simd/simd_lane.wast:345 +assert_return( + () => invoke($0, `v8x16_shuffle-4`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xf, 0xe, 0xd, 0xc, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:349 +assert_return( + () => invoke($0, `v8x16_shuffle-5`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:353 +assert_return( + () => invoke($0, `v8x16_shuffle-6`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ], +); + +// ./test/core/simd/simd_lane.wast:357 +assert_return( + () => invoke($0, `v8x16_shuffle-7`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0]), + ], +); + +// ./test/core/simd/simd_lane.wast:361 +assert_return( + () => invoke($0, `v8x16_shuffle-1`, [ + i8x16([0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73]), + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + ]), + [ + i8x16([0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73]), + ], +); + +// ./test/core/simd/simd_lane.wast:365 +assert_return( + () => invoke($0, `v8x16_shuffle-1`, [ + i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e]), + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + ]), + [i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e])], +); + +// ./test/core/simd/simd_lane.wast:369 +assert_return( + () => invoke($0, `v8x16_shuffle-2`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i32x4([0xf3f2f1f0, 0xf7f6f5f4, 0xfbfaf9f8, 0xfffefdfc]), + ]), + [i32x4([0xf3f2f1f0, 0xf7f6f5f4, 0xfbfaf9f8, 0xfffefdfc])], +); + +// ./test/core/simd/simd_lane.wast:373 +assert_return( + () => invoke($0, `v8x16_shuffle-1`, [ + i32x4([0x10203, 0x4050607, 0x8090a0b, 0xc0d0e0f]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0x10203, 0x4050607, 0x8090a0b, 0xc0d0e0f])], +); + +// ./test/core/simd/simd_lane.wast:377 +assert_return( + () => invoke($0, `v8x16_shuffle-1`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x80, + 0x3f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0x80, + 0x7f, + 0x0, + 0x0, + 0x80, + 0xff, + ]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0x3f800000, 0x7fc00000, 0x7f800000, 0xff800000])], +); + +// ./test/core/simd/simd_lane.wast:381 +assert_return( + () => invoke($0, `v8x16_shuffle-1`, [ + i32x4([0x10203, 0x4050607, 0x8090a0b, 0xc0d0e0f]), + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x80, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0x80, + 0x7f, + 0x0, + 0x0, + 0x80, + 0xff, + ]), + ]), + [i32x4([0x10203, 0x4050607, 0x8090a0b, 0xc0d0e0f])], +); + +// ./test/core/simd/simd_lane.wast:387 +assert_return( + () => invoke($0, `v8x16_swizzle`, [ + i32x4([0x499602d2, 0x12345678, 0x499602d2, 0x12345678]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [i32x4([0x499602d2, 0x12345678, 0x499602d2, 0x12345678])], +); + +// ./test/core/simd/simd_lane.wast:391 +assert_return( + () => invoke($0, `v8x16_shuffle-1`, [ + i64x2([0xab54a98ceb1f0ad2n, 0x1234567890abcdefn]), + i64x2([0xab54a98ceb1f0ad2n, 0x1234567890abcdefn]), + ]), + [i32x4([0xeb1f0ad2, 0xab54a98c, 0x90abcdef, 0x12345678])], +); + +// ./test/core/simd/simd_lane.wast:398 +assert_malformed( + () => instantiate(`(func (result i32) (i8x16.extract_lane_s -1 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:399 +assert_malformed( + () => instantiate(`(func (result i32) (i8x16.extract_lane_u -1 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:400 +assert_malformed( + () => instantiate(`(func (result i32) (i16x8.extract_lane_s -1 (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:401 +assert_malformed( + () => instantiate(`(func (result i32) (i16x8.extract_lane_u -1 (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:402 +assert_malformed( + () => instantiate(`(func (result i32) (i32x4.extract_lane -1 (v128.const i32x4 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:403 +assert_malformed( + () => instantiate(`(func (result f32) (f32x4.extract_lane -1 (v128.const f32x4 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:404 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.replace_lane -1 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:405 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.replace_lane -1 (v128.const i16x8 0 0 0 0 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:406 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.replace_lane -1 (v128.const i32x4 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:407 +assert_malformed( + () => instantiate(`(func (result v128) (f32x4.replace_lane -1 (v128.const f32x4 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:408 +assert_malformed( + () => instantiate(`(func (result i64) (i64x2.extract_lane -1 (v128.const i64x2 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:409 +assert_malformed( + () => instantiate(`(func (result f64) (f64x2.extract_lane -1 (v128.const f64x2 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:410 +assert_malformed( + () => instantiate(`(func (result v128) (i64x2.replace_lane -1 (v128.const i64x2 0 0) (i64.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:411 +assert_malformed( + () => instantiate(`(func (result v128) (f64x2.replace_lane -1 (v128.const f64x2 0 0) (f64.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:415 +assert_malformed( + () => instantiate(`(func (result i32) (i8x16.extract_lane_s 256 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:416 +assert_malformed( + () => instantiate(`(func (result i32) (i8x16.extract_lane_u 256 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:417 +assert_malformed( + () => instantiate(`(func (result i32) (i16x8.extract_lane_s 256 (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:418 +assert_malformed( + () => instantiate(`(func (result i32) (i16x8.extract_lane_u 256 (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:419 +assert_malformed( + () => instantiate(`(func (result i32) (i32x4.extract_lane 256 (v128.const i32x4 0 0 0 0))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:420 +assert_malformed( + () => instantiate(`(func (result f32) (f32x4.extract_lane 256 (v128.const f32x4 0 0 0 0))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:421 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.replace_lane 256 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (i32.const 1))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:422 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.replace_lane 256 (v128.const i16x8 0 0 0 0 0 0 0 0) (i32.const 1))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:423 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.replace_lane 256 (v128.const i32x4 0 0 0 0) (i32.const 1))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:424 +assert_malformed( + () => instantiate(`(func (result v128) (f32x4.replace_lane 256 (v128.const f32x4 0 0 0 0) (i32.const 1))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:425 +assert_malformed( + () => instantiate(`(func (result i64) (i64x2.extract_lane 256 (v128.const i64x2 0 0))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:426 +assert_malformed( + () => instantiate(`(func (result f64) (f64x2.extract_lane 256 (v128.const f64x2 0 0))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:427 +assert_malformed( + () => instantiate(`(func (result v128) (i64x2.replace_lane 256 (v128.const i64x2 0 0) (i64.const 1))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:428 +assert_malformed( + () => instantiate(`(func (result v128) (f64x2.replace_lane 256 (v128.const f64x2 0 0) (f64.const 1))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:432 +assert_invalid( + () => instantiate(`(module (func (result i32) (i8x16.extract_lane_s 16 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:433 +assert_invalid( + () => instantiate(`(module (func (result i32) (i8x16.extract_lane_s 255 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:434 +assert_invalid( + () => instantiate(`(module (func (result i32) (i8x16.extract_lane_u 16 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:435 +assert_invalid( + () => instantiate(`(module (func (result i32) (i8x16.extract_lane_u 255 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:436 +assert_invalid( + () => instantiate(`(module (func (result i32) (i16x8.extract_lane_s 8 (v128.const i16x8 0 0 0 0 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:437 +assert_invalid( + () => instantiate(`(module (func (result i32) (i16x8.extract_lane_s 255 (v128.const i16x8 0 0 0 0 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:438 +assert_invalid( + () => instantiate(`(module (func (result i32) (i16x8.extract_lane_u 8 (v128.const i16x8 0 0 0 0 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:439 +assert_invalid( + () => instantiate(`(module (func (result i32) (i16x8.extract_lane_u 255 (v128.const i16x8 0 0 0 0 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:440 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32x4.extract_lane 4 (v128.const i32x4 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:441 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32x4.extract_lane 255 (v128.const i32x4 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:442 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32x4.extract_lane 4 (v128.const f32x4 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:443 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32x4.extract_lane 255 (v128.const f32x4 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:444 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.replace_lane 16 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (i32.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:445 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.replace_lane 255 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (i32.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:446 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.replace_lane 16 (v128.const i16x8 0 0 0 0 0 0 0 0) (i32.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:447 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.replace_lane 255 (v128.const i16x8 0 0 0 0 0 0 0 0) (i32.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:448 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.replace_lane 4 (v128.const i32x4 0 0 0 0) (i32.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:449 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.replace_lane 255 (v128.const i32x4 0 0 0 0) (i32.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:450 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.replace_lane 4 (v128.const f32x4 0 0 0 0) (f32.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:451 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.replace_lane 255 (v128.const f32x4 0 0 0 0) (f32.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:452 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64x2.extract_lane 2 (v128.const i64x2 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:453 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64x2.extract_lane 255 (v128.const i64x2 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:454 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64x2.extract_lane 2 (v128.const f64x2 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:455 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64x2.extract_lane 255 (v128.const f64x2 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:456 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.replace_lane 2 (v128.const i64x2 0 0) (i64.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:457 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.replace_lane 255 (v128.const i64x2 0 0) (i64.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:458 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.replace_lane 2 (v128.const f64x2 0 0) (f64.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:459 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.replace_lane 255 (v128.const f64x2 0 0) (f64.const 1.0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:463 +assert_invalid( + () => instantiate(`(module (func (result i32) (i16x8.extract_lane_s 8 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:464 +assert_invalid( + () => instantiate(`(module (func (result i32) (i16x8.extract_lane_u 8 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:465 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32x4.extract_lane 4 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:466 +assert_invalid( + () => instantiate(`(module (func (result i32) (f32x4.extract_lane 4 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:467 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.replace_lane 8 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (i32.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:468 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.replace_lane 4 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (i32.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:469 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.replace_lane 4 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (f32.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:470 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64x2.extract_lane 2 (v128.const i64x2 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:471 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64x2.extract_lane 2 (v128.const f64x2 0 0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:472 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.replace_lane 2 (v128.const i64x2 0 0) (i64.const 1))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:473 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.replace_lane 2 (v128.const f64x2 0 0) (f64.const 1.0))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:477 +assert_invalid( + () => instantiate(`(module (func (result i32) (i8x16.extract_lane_s 0 (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:478 +assert_invalid( + () => instantiate(`(module (func (result i32) (i8x16.extract_lane_u 0 (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:479 +assert_invalid( + () => instantiate(`(module (func (result i32) (i8x16.extract_lane_s 0 (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:480 +assert_invalid( + () => instantiate(`(module (func (result i32) (i8x16.extract_lane_u 0 (f64.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:481 +assert_invalid( + () => instantiate(`(module (func (result i32) (i32x4.extract_lane 0 (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:482 +assert_invalid( + () => instantiate(`(module (func (result f32) (f32x4.extract_lane 0 (f32.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:483 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.replace_lane 0 (i32.const 0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:484 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.replace_lane 0 (i64.const 0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:485 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.replace_lane 0 (i32.const 0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:486 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.replace_lane 0 (f32.const 0.0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:487 +assert_invalid( + () => instantiate(`(module (func (result i64) (i64x2.extract_lane 0 (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:488 +assert_invalid( + () => instantiate(`(module (func (result f64) (f64x2.extract_lane 0 (f64.const 0.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:489 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.replace_lane 0 (i32.const 0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:490 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.replace_lane 0 (f32.const 0.0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:494 +assert_invalid( + () => instantiate(`(module (func (result v128) (i8x16.replace_lane 0 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (f32.const 1.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:495 +assert_invalid( + () => instantiate(`(module (func (result v128) (i16x8.replace_lane 0 (v128.const i16x8 0 0 0 0 0 0 0 0) (f64.const 1.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:496 +assert_invalid( + () => instantiate(`(module (func (result v128) (i32x4.replace_lane 0 (v128.const i32x4 0 0 0 0) (f32.const 1.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:497 +assert_invalid( + () => instantiate(`(module (func (result v128) (f32x4.replace_lane 0 (v128.const f32x4 0 0 0 0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:499 +assert_invalid( + () => instantiate(`(module (func (result v128) (i64x2.replace_lane 0 (v128.const i64x2 0 0) (f64.const 1.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:500 +assert_invalid( + () => instantiate(`(module (func (result v128) (f64x2.replace_lane 0 (v128.const f64x2 0 0) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:503 +assert_invalid( + () => instantiate(`(module (func (result v128) + (i8x16.swizzle (i32.const 1) (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:505 +assert_invalid( + () => instantiate(`(module (func (result v128) + (i8x16.swizzle (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (i32.const 2))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:507 +assert_invalid( + () => instantiate(`(module (func (result v128) + (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (f32.const 3.0) + (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:510 +assert_invalid( + () => instantiate(`(module (func (result v128) + (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (f32.const 4.0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:515 +assert_malformed( + () => instantiate(`(func (param v128) (result v128) (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 (local.get 0) (local.get 0))) `), + `invalid lane length`, +); + +// ./test/core/simd/simd_lane.wast:518 +assert_malformed( + () => instantiate(`(func (param v128) (result v128) (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (local.get 0) (local.get 0))) `), + `invalid lane length`, +); + +// ./test/core/simd/simd_lane.wast:521 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -1 (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:525 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 256 (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:529 +assert_invalid( + () => instantiate(`(module (func (result v128) + (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 255 + (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) + (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_lane.wast:536 +assert_malformed( + () => instantiate(`(func (result i32) (i8x16.extract_lane 0 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_lane.wast:537 +assert_malformed( + () => instantiate(`(func (result i32) (i16x8.extract_lane 0 (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_lane.wast:538 +assert_malformed( + () => instantiate(`(func (result i32) (i32x4.extract_lane_s 0 (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_lane.wast:539 +assert_malformed( + () => instantiate(`(func (result i32) (i32x4.extract_lane_u 0 (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_lane.wast:540 +assert_malformed( + () => instantiate(`(func (result i32) (i64x2.extract_lane_s 0 (v128.const i64x2 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_lane.wast:541 +assert_malformed( + () => instantiate(`(func (result i32) (i64x2.extract_lane_u 0 (v128.const i64x2 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_lane.wast:545 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.shuffle1 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_lane.wast:549 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.shuffle2_imm 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 i8x16 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_lane.wast:555 +assert_malformed( + () => instantiate(`(func (result v128) (v8x16.swizzle (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_lane.wast:559 +assert_malformed( + () => instantiate(`(func (result v128) (v8x16.shuffle 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 i8x16 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_lane.wast:570 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) (i8x16.extract_lane_s (local.get 0) (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:571 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) (i8x16.extract_lane_u (local.get 0) (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:572 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) (i16x8.extract_lane_s (local.get 0) (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:573 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) (i16x8.extract_lane_u (local.get 0) (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:574 +assert_malformed( + () => instantiate(`(func (param i32) (result i32) (i32x4.extract_lane (local.get 0) (v128.const i32x4 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:575 +assert_malformed( + () => instantiate(`(func (param i32) (result f32) (f32x4.extract_lane (local.get 0) (v128.const f32x4 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:576 +assert_malformed( + () => instantiate(`(func (param i32) (result v128) (i8x16.replace_lane (local.get 0) (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:577 +assert_malformed( + () => instantiate(`(func (param i32) (result v128) (i16x8.replace_lane (local.get 0) (v128.const i16x8 0 0 0 0 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:578 +assert_malformed( + () => instantiate(`(func (param i32) (result v128) (i32x4.replace_lane (local.get 0) (v128.const i32x4 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:579 +assert_malformed( + () => instantiate(`(func (param i32) (result v128) (f32x4.replace_lane (local.get 0) (v128.const f32x4 0 0 0 0) (f32.const 1.0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:581 +assert_malformed( + () => instantiate(`(func (param i32) (result i64) (i64x2.extract_lane (local.get 0) (v128.const i64x2 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:582 +assert_malformed( + () => instantiate(`(func (param i32) (result f64) (f64x2.extract_lane (local.get 0) (v128.const f64x2 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:583 +assert_malformed( + () => instantiate(`(func (param i32) (result v128) (i64x2.replace_lane (local.get 0) (v128.const i64x2 0 0) (i64.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:584 +assert_malformed( + () => instantiate(`(func (param i32) (result v128) (f64x2.replace_lane (local.get 0) (v128.const f64x2 0 0) (f64.const 1.0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:588 +assert_malformed( + () => instantiate(`(func (result i32) (i8x16.extract_lane_s 1.5 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:589 +assert_malformed( + () => instantiate(`(func (result i32) (i8x16.extract_lane_u nan (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:590 +assert_malformed( + () => instantiate(`(func (result i32) (i16x8.extract_lane_s inf (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:591 +assert_malformed( + () => instantiate(`(func (result i32) (i16x8.extract_lane_u -inf (v128.const i16x8 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:592 +assert_malformed( + () => instantiate(`(func (result i32) (i32x4.extract_lane nan (v128.const i32x4 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:593 +assert_malformed( + () => instantiate(`(func (result f32) (f32x4.extract_lane nan (v128.const f32x4 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:594 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.replace_lane -2.5 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:595 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.replace_lane nan (v128.const i16x8 0 0 0 0 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:596 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.replace_lane inf (v128.const i32x4 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:597 +assert_malformed( + () => instantiate(`(func (result v128) (f32x4.replace_lane -inf (v128.const f32x4 0 0 0 0) (f32.const 1.1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:600 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.shuffle (v128.const i8x16 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31) (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))) `), + `invalid lane length`, +); + +// ./test/core/simd/simd_lane.wast:604 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15.0) (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:608 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.shuffle 0.5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:612 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.shuffle -inf 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:616 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 inf) (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:620 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.shuffle nan 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) (v128.const i8x16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))) `), + `malformed lane index`, +); + +// ./test/core/simd/simd_lane.wast:628 +let $1 = instantiate(`(module + ;; as *.replace_lane's operand + (func (export "i8x16_extract_lane_s") (param v128 v128) (result v128) + (i8x16.replace_lane 0 (local.get 0) (i8x16.extract_lane_s 0 (local.get 1)))) + (func (export "i8x16_extract_lane_u") (param v128 v128) (result v128) + (i8x16.replace_lane 0 (local.get 0) (i8x16.extract_lane_u 0 (local.get 1)))) + (func (export "i16x8_extract_lane_s") (param v128 v128) (result v128) + (i16x8.replace_lane 0 (local.get 0) (i16x8.extract_lane_s 0 (local.get 1)))) + (func (export "i16x8_extract_lane_u") (param v128 v128) (result v128) + (i16x8.replace_lane 0 (local.get 0) (i16x8.extract_lane_u 0 (local.get 1)))) + (func (export "i32x4_extract_lane") (param v128 v128) (result v128) + (i32x4.replace_lane 0 (local.get 0) (i32x4.extract_lane 0 (local.get 1)))) + (func (export "f32x4_extract_lane") (param v128 v128) (result v128) + (i32x4.replace_lane 0 (local.get 0) (i32x4.extract_lane 0 (local.get 1)))) + (func (export "i64x2_extract_lane") (param v128 v128) (result v128) + (i64x2.replace_lane 0 (local.get 0) (i64x2.extract_lane 0 (local.get 1)))) + (func (export "f64x2_extract_lane") (param v128 v128) (result v128) + (f64x2.replace_lane 0 (local.get 0) (f64x2.extract_lane 0 (local.get 1)))) + + ;; as *.extract_lane's operand + (func (export "i8x16_replace_lane-s") (param v128 i32) (result i32) + (i8x16.extract_lane_s 15 (i8x16.replace_lane 15 (local.get 0) (local.get 1)))) + (func (export "i8x16_replace_lane-u") (param v128 i32) (result i32) + (i8x16.extract_lane_u 15 (i8x16.replace_lane 15 (local.get 0) (local.get 1)))) + (func (export "i16x8_replace_lane-s") (param v128 i32) (result i32) + (i16x8.extract_lane_s 7 (i16x8.replace_lane 7 (local.get 0) (local.get 1)))) + (func (export "i16x8_replace_lane-u") (param v128 i32) (result i32) + (i16x8.extract_lane_u 7 (i16x8.replace_lane 7 (local.get 0) (local.get 1)))) + (func (export "i32x4_replace_lane") (param v128 i32) (result i32) + (i32x4.extract_lane 3 (i32x4.replace_lane 3 (local.get 0) (local.get 1)))) + (func (export "f32x4_replace_lane") (param v128 f32) (result f32) + (f32x4.extract_lane 3 (f32x4.replace_lane 3 (local.get 0) (local.get 1)))) + (func (export "i64x2_replace_lane") (param v128 i64) (result i64) + (i64x2.extract_lane 1 (i64x2.replace_lane 1 (local.get 0) (local.get 1)))) + (func (export "f64x2_replace_lane") (param v128 f64) (result f64) + (f64x2.extract_lane 1 (f64x2.replace_lane 1 (local.get 0) (local.get 1)))) + + ;; i8x16.replace outputs as shuffle operand + (func (export "as-v8x16_swizzle-operand") (param v128 i32 v128) (result v128) + (i8x16.swizzle (i8x16.replace_lane 0 (local.get 0) (local.get 1)) (local.get 2))) + (func (export "as-v8x16_shuffle-operands") (param v128 i32 v128 i32) (result v128) + (i8x16.shuffle 16 1 18 3 20 5 22 7 24 9 26 11 28 13 30 15 + (i8x16.replace_lane 0 (local.get 0) (local.get 1)) + (i8x16.replace_lane 15 (local.get 2) (local.get 3)))) +)`); + +// ./test/core/simd/simd_lane.wast:674 +assert_return( + () => invoke($1, `i8x16_extract_lane_s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:675 +assert_return( + () => invoke($1, `i8x16_extract_lane_u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ]), + [ + i8x16([0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:676 +assert_return( + () => invoke($1, `i16x8_extract_lane_s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:677 +assert_return( + () => invoke($1, `i16x8_extract_lane_u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]), + ]), + [i16x8([0xffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:678 +assert_return( + () => invoke($1, `i32x4_extract_lane`, [ + i32x4([0x0, 0x0, 0x0, 0x0]), + i32x4([0x10000, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [i32x4([0x10000, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:679 +assert_return( + () => invoke($1, `f32x4_extract_lane`, [ + f32x4([0, 0, 0, 0]), + bytes('v128', [ + 0x99, + 0x76, + 0x96, + 0x7e, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 100000000000000000000000000000000000000), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:680 +assert_return( + () => invoke($1, `i8x16_replace_lane-s`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 255, + ]), + [value("i32", -1)], +); + +// ./test/core/simd/simd_lane.wast:681 +assert_return( + () => invoke($1, `i8x16_replace_lane-u`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 255, + ]), + [value("i32", 255)], +); + +// ./test/core/simd/simd_lane.wast:682 +assert_return( + () => invoke($1, `i16x8_replace_lane-s`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 65535, + ]), + [value("i32", -1)], +); + +// ./test/core/simd/simd_lane.wast:683 +assert_return( + () => invoke($1, `i16x8_replace_lane-u`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 65535, + ]), + [value("i32", 65535)], +); + +// ./test/core/simd/simd_lane.wast:684 +assert_return( + () => invoke($1, `i32x4_replace_lane`, [i32x4([0x0, 0x0, 0x0, 0x0]), -1]), + [value("i32", -1)], +); + +// ./test/core/simd/simd_lane.wast:685 +assert_return( + () => invoke($1, `f32x4_replace_lane`, [f32x4([0, 0, 0, 0]), value("f32", 1.25)]), + [value("f32", 1.25)], +); + +// ./test/core/simd/simd_lane.wast:687 +assert_return( + () => invoke($1, `i64x2_extract_lane`, [ + i64x2([0x0n, 0x0n]), + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [i64x2([0xffffffffffffffffn, 0x0n])], +); + +// ./test/core/simd/simd_lane.wast:688 +assert_return( + () => invoke($1, `f64x2_extract_lane`, [ + f64x2([0, 0]), + bytes('v128', [ + 0xa0, + 0xc8, + 0xeb, + 0x85, + 0xf3, + 0xcc, + 0xe1, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [ + new F64x2Pattern( + value("f64", 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:689 +assert_return(() => invoke($1, `i64x2_replace_lane`, [i64x2([0x0n, 0x0n]), -1n]), [value("i64", -1n)]); + +// ./test/core/simd/simd_lane.wast:690 +assert_return( + () => invoke($1, `f64x2_replace_lane`, [f64x2([0, 0]), value("f64", 2.5)]), + [value("f64", 2.5)], +); + +// ./test/core/simd/simd_lane.wast:692 +assert_return( + () => invoke($1, `as-v8x16_swizzle-operand`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + 255, + i8x16([0xff, 0xf, 0xe, 0xd, 0xc, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1]), + ]), + [ + i8x16([0x0, 0xf, 0xe, 0xd, 0xc, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1]), + ], +); + +// ./test/core/simd/simd_lane.wast:696 +assert_return( + () => invoke($1, `as-v8x16_shuffle-operands`, [ + i8x16([0x0, 0xff, 0x0, 0xff, 0xf, 0xff, 0x0, 0xff, 0xff, 0xff, 0x0, 0xff, 0x7f, 0xff, 0x0, 0xff]), + 1, + i8x16([0x55, 0x0, 0x55, 0x0, 0x55, 0x0, 0x55, 0x0, 0x55, 0x0, 0x55, 0x0, 0x55, 0x1, 0x55, 0xff]), + 0, + ]), + [ + i8x16([0x55, 0xff, 0x55, 0xff, 0x55, 0xff, 0x55, 0xff, 0x55, 0xff, 0x55, 0xff, 0x55, 0xff, 0x55, 0xff]), + ], +); + +// ./test/core/simd/simd_lane.wast:703 +let $2 = instantiate(`(module + ;; Constructing SIMD values + (func (export "as-i8x16_splat-operand") (param v128) (result v128) + (i8x16.splat (i8x16.extract_lane_s 0 (local.get 0)))) + (func (export "as-i16x8_splat-operand") (param v128) (result v128) + (i16x8.splat (i16x8.extract_lane_u 0 (local.get 0)))) + (func (export "as-i32x4_splat-operand") (param v128) (result v128) + (i32x4.splat (i32x4.extract_lane 0 (local.get 0)))) + (func (export "as-f32x4_splat-operand") (param v128) (result v128) + (f32x4.splat (f32x4.extract_lane 0 (local.get 0)))) + (func (export "as-i64x2_splat-operand") (param v128) (result v128) + (i64x2.splat (i64x2.extract_lane 0 (local.get 0)))) + (func (export "as-f64x2_splat-operand") (param v128) (result v128) + (f64x2.splat (f64x2.extract_lane 0 (local.get 0)))) + + ;; Integer arithmetic + (func (export "as-i8x16_add-operands") (param v128 i32 v128 i32) (result v128) + (i8x16.add (i8x16.replace_lane 0 (local.get 0) (local.get 1)) (i8x16.replace_lane 15 (local.get 2) (local.get 3)))) + (func (export "as-i16x8_add-operands") (param v128 i32 v128 i32) (result v128) + (i16x8.add (i16x8.replace_lane 0 (local.get 0) (local.get 1)) (i16x8.replace_lane 7 (local.get 2) (local.get 3)))) + (func (export "as-i32x4_add-operands") (param v128 i32 v128 i32) (result v128) + (i32x4.add (i32x4.replace_lane 0 (local.get 0) (local.get 1)) (i32x4.replace_lane 3 (local.get 2) (local.get 3)))) + (func (export "as-i64x2_add-operands") (param v128 i64 v128 i64) (result v128) + (i64x2.add (i64x2.replace_lane 0 (local.get 0) (local.get 1)) (i64x2.replace_lane 1 (local.get 2) (local.get 3)))) + + (func (export "swizzle-as-i8x16_add-operands") (param v128 v128 v128 v128) (result v128) + (i8x16.add (i8x16.swizzle (local.get 0) (local.get 1)) (i8x16.swizzle (local.get 2) (local.get 3)))) + (func (export "shuffle-as-i8x16_sub-operands") (param v128 v128 v128 v128) (result v128) + (i8x16.sub (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (local.get 0) (local.get 1)) + (i8x16.shuffle 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 (local.get 2) (local.get 3)))) + + ;; Boolean horizontal reductions + (func (export "as-i8x16_any_true-operand") (param v128 i32) (result i32) + (v128.any_true (i8x16.replace_lane 0 (local.get 0) (local.get 1)))) + (func (export "as-i16x8_any_true-operand") (param v128 i32) (result i32) + (v128.any_true (i16x8.replace_lane 0 (local.get 0) (local.get 1)))) + (func (export "as-i32x4_any_true-operand1") (param v128 i32) (result i32) + (v128.any_true (i32x4.replace_lane 0 (local.get 0) (local.get 1)))) + (func (export "as-i32x4_any_true-operand2") (param v128 i64) (result i32) + (v128.any_true (i64x2.replace_lane 0 (local.get 0) (local.get 1)))) + + (func (export "swizzle-as-i8x16_all_true-operands") (param v128 v128) (result i32) + (i8x16.all_true (i8x16.swizzle (local.get 0) (local.get 1)))) + (func (export "shuffle-as-i8x16_any_true-operands") (param v128 v128) (result i32) + (v128.any_true (i8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (local.get 0) (local.get 1)))) +)`); + +// ./test/core/simd/simd_lane.wast:750 +assert_return( + () => invoke($2, `as-i8x16_splat-operand`, [ + i8x16([0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_lane.wast:751 +assert_return( + () => invoke($2, `as-i16x8_splat-operand`, [ + i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_lane.wast:752 +assert_return( + () => invoke($2, `as-i32x4_splat-operand`, [i32x4([0x10000, 0x0, 0x0, 0x0])]), + [i32x4([0x10000, 0x10000, 0x10000, 0x10000])], +); + +// ./test/core/simd/simd_lane.wast:753 +assert_return( + () => invoke($2, `as-f32x4_splat-operand`, [ + bytes('v128', [ + 0xc3, + 0xf5, + 0x48, + 0x40, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + 0x0, + 0x0, + 0xc0, + 0x7f, + ]), + ]), + [ + new F32x4Pattern( + value("f32", 3.14), + value("f32", 3.14), + value("f32", 3.14), + value("f32", 3.14), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:754 +assert_return( + () => invoke($2, `as-i64x2_splat-operand`, [i64x2([0xffffffffffffffffn, 0x0n])]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_lane.wast:755 +assert_return( + () => invoke($2, `as-f64x2_splat-operand`, [ + bytes('v128', [ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf0, + 0x7f, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0xf8, + 0x7f, + ]), + ]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_lane.wast:756 +assert_return( + () => invoke($2, `as-i8x16_add-operands`, [ + i8x16([0xff, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10]), + 1, + i8x16([0x10, 0xf, 0xe, 0xd, 0xc, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0xff]), + 1, + ]), + [ + i8x16([0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11]), + ], +); + +// ./test/core/simd/simd_lane.wast:760 +assert_return( + () => invoke($2, `as-i16x8_add-operands`, [ + i16x8([0xffff, 0x4, 0x9, 0x10, 0x19, 0x24, 0x31, 0x40]), + 1, + i16x8([0x40, 0x31, 0x24, 0x19, 0x10, 0x9, 0x4, 0xffff]), + 1, + ]), + [i16x8([0x41, 0x35, 0x2d, 0x29, 0x29, 0x2d, 0x35, 0x41])], +); + +// ./test/core/simd/simd_lane.wast:764 +assert_return( + () => invoke($2, `as-i32x4_add-operands`, [ + i32x4([0xffffffff, 0x8, 0x1b, 0x40]), + 1, + i32x4([0x40, 0x1b, 0x8, 0xffffffff]), + 1, + ]), + [i32x4([0x41, 0x23, 0x23, 0x41])], +); + +// ./test/core/simd/simd_lane.wast:766 +assert_return( + () => invoke($2, `as-i64x2_add-operands`, [ + i64x2([0xffffffffffffffffn, 0x8n]), + 1n, + i64x2([0x40n, 0x1bn]), + 1n, + ]), + [i64x2([0x41n, 0x9n])], +); + +// ./test/core/simd/simd_lane.wast:769 +assert_return( + () => invoke($2, `swizzle-as-i8x16_add-operands`, [ + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0xf, 0xe, 0xd, 0xc, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_lane.wast:775 +assert_return( + () => invoke($2, `shuffle-as-i8x16_sub-operands`, [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + i8x16([0xf, 0xe, 0xd, 0xc, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1, 0x0]), + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + i8x16([0xf, 0xe, 0xd, 0xc, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0xf1, 0xf3, 0xf5, 0xf7, 0xf9, 0xfb, 0xfd, 0xff, 0x1, 0x3, 0x5, 0x7, 0x9, 0xb, 0xd, 0xf]), + ], +); + +// ./test/core/simd/simd_lane.wast:782 +assert_return( + () => invoke($2, `as-i8x16_any_true-operand`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 1, + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_lane.wast:783 +assert_return( + () => invoke($2, `as-i16x8_any_true-operand`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 1, + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_lane.wast:784 +assert_return( + () => invoke($2, `as-i32x4_any_true-operand1`, [i32x4([0x1, 0x0, 0x0, 0x0]), 0]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_lane.wast:785 +assert_return( + () => invoke($2, `as-i32x4_any_true-operand2`, [i64x2([0x1n, 0x0n]), 0n]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_lane.wast:787 +assert_return( + () => invoke($2, `swizzle-as-i8x16_all_true-operands`, [ + i8x16([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_lane.wast:790 +assert_return( + () => invoke($2, `swizzle-as-i8x16_all_true-operands`, [ + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0x10]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_lane.wast:793 +assert_return( + () => invoke($2, `shuffle-as-i8x16_any_true-operands`, [ + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ]), + [value("i32", 1)], +); + +// ./test/core/simd/simd_lane.wast:799 +let $3 = instantiate(`(module + (memory 1) + (func (export "as-v128_store-operand-1") (param v128 i32) (result v128) + (v128.store (i32.const 0) (i8x16.replace_lane 0 (local.get 0) (local.get 1))) + (v128.load (i32.const 0))) + (func (export "as-v128_store-operand-2") (param v128 i32) (result v128) + (v128.store (i32.const 0) (i16x8.replace_lane 0 (local.get 0) (local.get 1))) + (v128.load (i32.const 0))) + (func (export "as-v128_store-operand-3") (param v128 i32) (result v128) + (v128.store (i32.const 0) (i32x4.replace_lane 0 (local.get 0) (local.get 1))) + (v128.load (i32.const 0))) + (func (export "as-v128_store-operand-4") (param v128 f32) (result v128) + (v128.store (i32.const 0) (f32x4.replace_lane 0 (local.get 0) (local.get 1))) + (v128.load (i32.const 0))) + (func (export "as-v128_store-operand-5") (param v128 i64) (result v128) + (v128.store (i32.const 0) (i64x2.replace_lane 0 (local.get 0) (local.get 1))) + (v128.load (i32.const 0))) + (func (export "as-v128_store-operand-6") (param v128 f64) (result v128) + (v128.store (i32.const 0) (f64x2.replace_lane 0 (local.get 0) (local.get 1))) + (v128.load (i32.const 0))) +)`); + +// ./test/core/simd/simd_lane.wast:821 +assert_return( + () => invoke($3, `as-v128_store-operand-1`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 1, + ]), + [ + i8x16([0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_lane.wast:822 +assert_return( + () => invoke($3, `as-v128_store-operand-2`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 256, + ]), + [i16x8([0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:823 +assert_return( + () => invoke($3, `as-v128_store-operand-3`, [i32x4([0x0, 0x0, 0x0, 0x0]), -1]), + [i32x4([0xffffffff, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:824 +assert_return( + () => invoke($3, `as-v128_store-operand-4`, [f32x4([0, 0, 0, 0]), value("f32", 3.14)]), + [ + new F32x4Pattern( + value("f32", 3.14), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:825 +assert_return( + () => invoke($3, `as-v128_store-operand-5`, [i64x2([0x0n, 0x0n]), -1n]), + [i64x2([0xffffffffffffffffn, 0x0n])], +); + +// ./test/core/simd/simd_lane.wast:826 +assert_return( + () => invoke($3, `as-v128_store-operand-6`, [f64x2([0, 0]), value("f64", 3.14)]), + [new F64x2Pattern(value("f64", 3.14), value("f64", 0))], +); + +// ./test/core/simd/simd_lane.wast:830 +let $4 = instantiate(`(module + (global $$g (mut v128) (v128.const f32x4 0.0 0.0 0.0 0.0)) + (global $$h (mut v128) (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + (func (export "as-if-condition-value") (param v128) (result i32) + (if (result i32) (i8x16.extract_lane_s 0 (local.get 0)) (then (i32.const 0xff)) (else (i32.const 0)))) + (func (export "as-return-value-1") (param v128 i32) (result v128) + (return (i16x8.replace_lane 0 (local.get 0) (local.get 1)))) + (func (export "as-local_set-value") (param v128) (result i32) (local i32) + (local.set 1 (i32x4.extract_lane 0 (local.get 0))) + (return (local.get 1))) + (func (export "as-global_set-value-1") (param v128 f32) (result v128) + (global.set $$g (f32x4.replace_lane 0 (local.get 0) (local.get 1))) + (return (global.get $$g))) + + (func (export "as-return-value-2") (param v128 v128) (result v128) + (return (i8x16.swizzle (local.get 0) (local.get 1)))) + (func (export "as-global_set-value-2") (param v128 v128) (result v128) + (global.set $$h (i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 (local.get 0) (local.get 1))) + (return (global.get $$h))) + + (func (export "as-local_set-value-1") (param v128) (result i64) (local i64) + (local.set 1 (i64x2.extract_lane 0 (local.get 0))) + (return (local.get 1))) + (func (export "as-global_set-value-3") (param v128 f64) (result v128) + (global.set $$g (f64x2.replace_lane 0 (local.get 0) (local.get 1))) + (return (global.get $$g))) +)`); + +// ./test/core/simd/simd_lane.wast:858 +assert_return( + () => invoke($4, `as-if-condition-value`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i32", 0)], +); + +// ./test/core/simd/simd_lane.wast:859 +assert_return( + () => invoke($4, `as-return-value-1`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + 1, + ]), + [i16x8([0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_lane.wast:860 +assert_return( + () => invoke($4, `as-local_set-value`, [ + i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]), + ]), + [value("i32", -1)], +); + +// ./test/core/simd/simd_lane.wast:861 +assert_return( + () => invoke($4, `as-global_set-value-1`, [f32x4([0, 0, 0, 0]), value("f32", 3.14)]), + [ + new F32x4Pattern( + value("f32", 3.14), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_lane.wast:863 +assert_return( + () => invoke($4, `as-return-value-2`, [ + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + i8x16([0xf, 0xe, 0xd, 0xc, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1, 0x0]), + ]), + [ + i8x16([0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0]), + ], +); + +// ./test/core/simd/simd_lane.wast:867 +assert_return( + () => invoke($4, `as-global_set-value-2`, [ + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff]), + i8x16([0x10, 0xf, 0xe, 0xd, 0xc, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1]), + ]), + [ + i8x16([0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1]), + ], +); + +// ./test/core/simd/simd_lane.wast:872 +assert_return( + () => invoke($4, `as-local_set-value-1`, [ + i64x2([0xffffffffffffffffn, 0xffffffffffffffffn]), + ]), + [value("i64", -1n)], +); + +// ./test/core/simd/simd_lane.wast:873 +assert_return( + () => invoke($4, `as-global_set-value-3`, [f64x2([0, 0]), value("f64", 3.14)]), + [new F64x2Pattern(value("f64", 3.14), value("f64", 0))], +); + +// ./test/core/simd/simd_lane.wast:877 +assert_malformed( + () => instantiate(`(func (result i32) (i8x16.extract_lane_u +0x0f (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:878 +assert_malformed( + () => instantiate(`(func (result f32) (f32x4.extract_lane +03 (v128.const f32x4 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:879 +assert_malformed( + () => instantiate(`(func (result i64) (i64x2.extract_lane +1 (v128.const i64x2 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:880 +assert_malformed( + () => instantiate(`(func (result v128) (i8x16.replace_lane +015 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:881 +assert_malformed( + () => instantiate(`(func (result v128) (i16x8.replace_lane +0x7 (v128.const i16x8 0 0 0 0 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:882 +assert_malformed( + () => instantiate(`(func (result v128) (i32x4.replace_lane +3 (v128.const i32x4 0 0 0 0) (i32.const 1))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:883 +assert_malformed( + () => instantiate(`(func (result v128) (f64x2.replace_lane +0x01 (v128.const f64x2 0 0) (f64.const 1.0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:887 +let $5 = instantiate(`(module (func (result i32) (i8x16.extract_lane_s 0x0f (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))`); + +// ./test/core/simd/simd_lane.wast:888 +let $6 = instantiate(`(module (func (result i32) (i16x8.extract_lane_s 0x07 (v128.const i16x8 0 0 0 0 0 0 0 0))))`); + +// ./test/core/simd/simd_lane.wast:889 +let $7 = instantiate(`(module (func (result i32) (i16x8.extract_lane_u 0x0_7 (v128.const i16x8 0 0 0 0 0 0 0 0))))`); + +// ./test/core/simd/simd_lane.wast:890 +let $8 = instantiate(`(module (func (result i32) (i32x4.extract_lane 03 (v128.const i32x4 0 0 0 0))))`); + +// ./test/core/simd/simd_lane.wast:891 +let $9 = instantiate(`(module (func (result f64) (f64x2.extract_lane 0x1 (v128.const f64x2 0 0))))`); + +// ./test/core/simd/simd_lane.wast:892 +let $10 = instantiate(`(module (func (result v128) (f32x4.replace_lane 0x3 (v128.const f32x4 0 0 0 0) (f32.const 1.0))))`); + +// ./test/core/simd/simd_lane.wast:893 +let $11 = instantiate(`(module (func (result v128) (i64x2.replace_lane 01 (v128.const i64x2 0 0) (i64.const 1))))`); + +// ./test/core/simd/simd_lane.wast:897 +assert_malformed( + () => instantiate(`(func (result i32) (i8x16.extract_lane_s 1.0 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:901 +assert_malformed( + () => instantiate(`(func $$i8x16.extract_lane_s-1st-arg-empty (result i32) (i8x16.extract_lane_s (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:909 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.extract_lane_s-2nd-arg-empty (result i32) + (i8x16.extract_lane_s 0) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:917 +assert_malformed( + () => instantiate(`(func $$i8x16.extract_lane_s-arg-empty (result i32) (i8x16.extract_lane_s) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:925 +assert_malformed( + () => instantiate(`(func $$i16x8.extract_lane_u-1st-arg-empty (result i32) (i16x8.extract_lane_u (v128.const i16x8 0 0 0 0 0 0 0 0)) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:933 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.extract_lane_u-2nd-arg-empty (result i32) + (i16x8.extract_lane_u 0) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:941 +assert_malformed( + () => instantiate(`(func $$i16x8.extract_lane_u-arg-empty (result i32) (i16x8.extract_lane_u) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:949 +assert_malformed( + () => instantiate(`(func $$i32x4.extract_lane-1st-arg-empty (result i32) (i32x4.extract_lane (v128.const i32x4 0 0 0 0)) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:957 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.extract_lane-2nd-arg-empty (result i32) + (i32x4.extract_lane 0) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:965 +assert_malformed( + () => instantiate(`(func $$i32x4.extract_lane-arg-empty (result i32) (i32x4.extract_lane) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:973 +assert_malformed( + () => instantiate(`(func $$i64x2.extract_lane-1st-arg-empty (result i64) (i64x2.extract_lane (v128.const i64x2 0 0)) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:981 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.extract_lane-2nd-arg-empty (result i64) + (i64x2.extract_lane 0) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:989 +assert_malformed( + () => instantiate(`(func $$i64x2.extract_lane-arg-empty (result i64) (i64x2.extract_lane) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:997 +assert_malformed( + () => instantiate(`(func $$f32x4.extract_lane-1st-arg-empty (result f32) (f32x4.extract_lane (v128.const f32x4 0 0 0 0)) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1005 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.extract_lane-2nd-arg-empty (result f32) + (f32x4.extract_lane 0) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1013 +assert_malformed( + () => instantiate(`(func $$f32x4.extract_lane-arg-empty (result f32) (f32x4.extract_lane) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1021 +assert_malformed( + () => instantiate(`(func $$f64x2.extract_lane-1st-arg-empty (result f64) (f64x2.extract_lane (v128.const f64x2 0 0)) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1029 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.extract_lane-2nd-arg-empty (result f64) + (f64x2.extract_lane 0) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1037 +assert_malformed( + () => instantiate(`(func $$f64x2.extract_lane-arg-empty (result f64) (f64x2.extract_lane) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1045 +assert_malformed( + () => instantiate(`(func $$i8x16.replace_lane-1st-arg-empty (result v128) (i8x16.replace_lane (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) (i32.const 1)) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1053 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.replace_lane-2nd-arg-empty (result v128) + (i8x16.replace_lane 0 (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1061 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.replace_lane-3rd-arg-empty (result v128) + (i8x16.replace_lane 0 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1069 +assert_malformed( + () => instantiate(`(func $$i8x16.replace_lane-arg-empty (result v128) (i8x16.replace_lane) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1077 +assert_malformed( + () => instantiate(`(func $$i16x8.replace_lane-1st-arg-empty (result v128) (i16x8.replace_lane (v128.const i16x8 0 0 0 0 0 0 0 0) (i32.const 1)) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1085 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.replace_lane-2nd-arg-empty (result v128) + (i16x8.replace_lane 0 (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1093 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.replace_lane-3rd-arg-empty (result v128) + (i16x8.replace_lane 0 (v128.const i16x8 0 0 0 0 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1101 +assert_malformed( + () => instantiate(`(func $$i16x8.replace_lane-arg-empty (result v128) (i16x8.replace_lane) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1109 +assert_malformed( + () => instantiate(`(func $$i32x4.replace_lane-1st-arg-empty (result v128) (i32x4.replace_lane (v128.const i32x4 0 0 0 0) (i32.const 1)) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1117 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.replace_lane-2nd-arg-empty (result v128) + (i32x4.replace_lane 0 (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1125 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.replace_lane-3rd-arg-empty (result v128) + (i32x4.replace_lane 0 (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1133 +assert_malformed( + () => instantiate(`(func $$i32x4.replace_lane-arg-empty (result v128) (i32x4.replace_lane) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1141 +assert_malformed( + () => instantiate(`(func $$f32x4.replace_lane-1st-arg-empty (result v128) (f32x4.replace_lane (v128.const f32x4 0 0 0 0) (f32.const 1.0)) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1149 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.replace_lane-2nd-arg-empty (result v128) + (f32x4.replace_lane 0 (f32.const 1.0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1157 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.replace_lane-3rd-arg-empty (result v128) + (f32x4.replace_lane 0 (v128.const f32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1165 +assert_malformed( + () => instantiate(`(func $$f32x4.replace_lane-arg-empty (result v128) (f32x4.replace_lane) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1173 +assert_malformed( + () => instantiate(`(func $$i64x2.replace_lane-1st-arg-empty (result v128) (i64x2.replace_lane (v128.const i64x2 0 0) (i64.const 1)) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1181 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.replace_lane-2nd-arg-empty (result v128) + (i64x2.replace_lane 0 (i64.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1189 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.replace_lane-3rd-arg-empty (result v128) + (i64x2.replace_lane 0 (v128.const i64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1197 +assert_malformed( + () => instantiate(`(func $$i64x2.replace_lane-arg-empty (result v128) (i64x2.replace_lane) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1205 +assert_malformed( + () => instantiate(`(func $$f64x2.replace_lane-1st-arg-empty (result v128) (f64x2.replace_lane (v128.const f64x2 0 0) (f64.const 1.0)) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1213 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.replace_lane-2nd-arg-empty (result v128) + (f64x2.replace_lane 0 (f64.const 1.0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1221 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.replace_lane-3rd-arg-empty (result v128) + (f64x2.replace_lane 0 (v128.const f64x2 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1229 +assert_malformed( + () => instantiate(`(func $$f64x2.replace_lane-arg-empty (result v128) (f64x2.replace_lane) ) `), + `unexpected token`, +); + +// ./test/core/simd/simd_lane.wast:1237 +assert_malformed( + () => instantiate(`(func $$i8x16.shuffle-1st-arg-empty (result v128) (i8x16.shuffle (v128.const i8x16 0 1 2 3 5 6 6 7 8 9 10 11 12 13 14 15) (v128.const i8x16 1 2 3 5 6 6 7 8 9 10 11 12 13 14 15 16) ) ) `), + `invalid lane length`, +); + +// ./test/core/simd/simd_lane.wast:1248 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.shuffle-2nd-arg-empty (result v128) + (i8x16.shuffle 0 1 2 3 5 6 6 7 8 9 10 11 12 13 14 15 + (v128.const i8x16 1 2 3 5 6 6 7 8 9 10 11 12 13 14 15 16) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_lane.wast:1258 +assert_malformed( + () => instantiate(`(func $$i8x16.shuffle-arg-empty (result v128) (i8x16.shuffle) ) `), + `invalid lane length`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_load.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load.wast.js new file mode 100644 index 0000000000..e609e1fe58 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_load.wast.js @@ -0,0 +1,295 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_load.wast + +// ./test/core/simd/simd_load.wast:3 +let $0 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\00\\01\\02\\03") + (func (export "v128.load") (result v128) + (v128.load (i32.const 0)) + ) +)`); + +// ./test/core/simd/simd_load.wast:11 +assert_return( + () => invoke($0, `v128.load`, []), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_load.wast:12 +assert_return( + () => invoke($0, `v128.load`, []), + [i16x8([0x100, 0x302, 0x504, 0x706, 0x908, 0xb0a, 0xd0c, 0xf0e])], +); + +// ./test/core/simd/simd_load.wast:13 +assert_return(() => invoke($0, `v128.load`, []), [i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c])]); + +// ./test/core/simd/simd_load.wast:18 +let $1 = instantiate(`(module (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\00\\01\\02\\03") + (func (export "as-i8x16_extract_lane_s-value/0") (result i32) + (i8x16.extract_lane_s 0 (v128.load (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_load.wast:24 +assert_return(() => invoke($1, `as-i8x16_extract_lane_s-value/0`, []), [value("i32", 0)]); + +// ./test/core/simd/simd_load.wast:26 +let $2 = instantiate(`(module (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\00\\01\\02\\03") + (func (export "as-i8x16.eq-operand") (result v128) + (i8x16.eq (v128.load offset=0 (i32.const 0)) (v128.load offset=16 (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_load.wast:32 +assert_return(() => invoke($2, `as-i8x16.eq-operand`, []), [i32x4([0xffffffff, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_load.wast:34 +let $3 = instantiate(`(module (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\00\\01\\02\\03") + (func (export "as-v128.not-operand") (result v128) + (v128.not (v128.load (i32.const 0))) + ) + (func (export "as-i8x16.all_true-operand") (result i32) + (i8x16.all_true (v128.load (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_load.wast:43 +assert_return( + () => invoke($3, `as-v128.not-operand`, []), + [i32x4([0xfcfdfeff, 0xf8f9fafb, 0xf4f5f6f7, 0xf0f1f2f3])], +); + +// ./test/core/simd/simd_load.wast:44 +assert_return(() => invoke($3, `as-i8x16.all_true-operand`, []), [value("i32", 0)]); + +// ./test/core/simd/simd_load.wast:46 +let $4 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA") + (data (offset (i32.const 16)) "\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB\\BB") + (data (offset (i32.const 32)) "\\F0\\F0\\F0\\F0\\FF\\FF\\FF\\FF\\00\\00\\00\\00\\FF\\00\\FF\\00") + (func (export "as-v128.bitselect-operand") (result v128) + (v128.bitselect (v128.load (i32.const 0)) (v128.load (i32.const 16)) (v128.load (i32.const 32))) + ) +)`); + +// ./test/core/simd/simd_load.wast:54 +assert_return( + () => invoke($4, `as-v128.bitselect-operand`, []), + [i32x4([0xabababab, 0xaaaaaaaa, 0xbbbbbbbb, 0xbbaabbaa])], +); + +// ./test/core/simd/simd_load.wast:56 +let $5 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA") + (func (export "as-i8x16.shl-operand") (result v128) + (i8x16.shl (v128.load (i32.const 0)) (i32.const 1)) + ) +)`); + +// ./test/core/simd/simd_load.wast:62 +assert_return( + () => invoke($5, `as-i8x16.shl-operand`, []), + [i32x4([0x54545454, 0x54545454, 0x54545454, 0x54545454])], +); + +// ./test/core/simd/simd_load.wast:64 +let $6 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\02\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00") + (data (offset (i32.const 16)) "\\03\\00\\00\\00\\03\\00\\00\\00\\03\\00\\00\\00\\03\\00\\00\\00") + (func (export "as-add/sub-operand") (result v128) + ;; 2 2 2 2 + 3 3 3 3 = 5 5 5 5 + ;; 5 5 5 5 - 3 3 3 3 = 2 2 2 2 + (i8x16.sub + (i8x16.add (v128.load (i32.const 0)) (v128.load (i32.const 16))) + (v128.load (i32.const 16)) + ) + ) +)`); + +// ./test/core/simd/simd_load.wast:76 +assert_return(() => invoke($6, `as-add/sub-operand`, []), [i32x4([0x2, 0x2, 0x2, 0x2])]); + +// ./test/core/simd/simd_load.wast:78 +let $7 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\00\\00\\00\\43\\00\\00\\80\\3f\\66\\66\\e6\\3f\\00\\00\\80\\bf") ;; 128 1.0 1.8 -1 + (data (offset (i32.const 16)) "\\00\\00\\00\\40\\00\\00\\00\\40\\00\\00\\00\\40\\00\\00\\00\\40") ;; 2.0 2.0 2.0 2.0 + (func (export "as-f32x4.mul-operand") (result v128) + (f32x4.mul (v128.load (i32.const 0)) (v128.load (i32.const 16))) + ) +)`); + +// ./test/core/simd/simd_load.wast:85 +assert_return( + () => invoke($7, `as-f32x4.mul-operand`, []), + [ + new F32x4Pattern( + value("f32", 256), + value("f32", 2), + value("f32", 3.6), + value("f32", -2), + ), + ], +); + +// ./test/core/simd/simd_load.wast:87 +let $8 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff") ;; 1111 ... + (func (export "as-f32x4.abs-operand") (result v128) + (f32x4.abs (v128.load (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_load.wast:93 +assert_return( + () => invoke($8, `as-f32x4.abs-operand`, []), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_load.wast:95 +let $9 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA\\AA") + (data (offset (i32.const 16)) "\\02\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00") + (func (export "as-f32x4.min-operand") (result v128) + (f32x4.min (v128.load (i32.const 0)) (v128.load offset=16 (i32.const 1))) + ) +)`); + +// ./test/core/simd/simd_load.wast:102 +assert_return( + () => invoke($9, `as-f32x4.min-operand`, []), + [i32x4([0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa])], +); + +// ./test/core/simd/simd_load.wast:104 +let $10 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\00\\00\\00\\43\\00\\00\\80\\3f\\66\\66\\e6\\3f\\00\\00\\80\\bf") ;; 128 1.0 1.8 -1 + (func (export "as-i32x4.trunc_sat_f32x4_s-operand") (result v128) + (i32x4.trunc_sat_f32x4_s (v128.load (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_load.wast:110 +assert_return( + () => invoke($10, `as-i32x4.trunc_sat_f32x4_s-operand`, []), + [i32x4([0x80, 0x1, 0x1, 0xffffffff])], +); + +// ./test/core/simd/simd_load.wast:112 +let $11 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\02\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00") + (func (export "as-f32x4.convert_i32x4_u-operand") (result v128) + (f32x4.convert_i32x4_u (v128.load (i32.const 0))) + ) +)`); + +// ./test/core/simd/simd_load.wast:118 +assert_return( + () => invoke($11, `as-f32x4.convert_i32x4_u-operand`, []), + [ + new F32x4Pattern( + value("f32", 2), + value("f32", 2), + value("f32", 2), + value("f32", 2), + ), + ], +); + +// ./test/core/simd/simd_load.wast:120 +let $12 = instantiate(`(module (memory 1) + (data (offset (i32.const 0)) "\\64\\65\\66\\67\\68\\69\\6a\\6b\\6c\\6d\\6e\\6f\\70\\71\\72\\73") ;; 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 + (data (offset (i32.const 16)) "\\0f\\0e\\0d\\0c\\0b\\0a\\09\\08\\07\\06\\05\\04\\03\\02\\01\\00") ;; 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 + (func (export "as-i8x16.swizzle-operand") (result v128) + (i8x16.swizzle (v128.load (i32.const 0)) (v128.load offset=15 (i32.const 1))) + ) +)`); + +// ./test/core/simd/simd_load.wast:127 +assert_return( + () => invoke($12, `as-i8x16.swizzle-operand`, []), + [ + i8x16([0x73, 0x72, 0x71, 0x70, 0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x69, 0x68, 0x67, 0x66, 0x65, 0x64]), + ], +); + +// ./test/core/simd/simd_load.wast:129 +let $13 = instantiate(`(module (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\00\\01\\02\\03") + (func (export "as-br-value") (result v128) + (block (result v128) (br 0 (v128.load (i32.const 0)))) + ) +)`); + +// ./test/core/simd/simd_load.wast:135 +assert_return(() => invoke($13, `as-br-value`, []), [i32x4([0x3020100, 0x7060504, 0xb0a0908, 0xf0e0d0c])]); + +// ./test/core/simd/simd_load.wast:140 +assert_malformed( + () => instantiate(`(memory 1) (func (local v128) (drop (v128.load8 (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load.wast:147 +assert_malformed( + () => instantiate(`(memory 1) (func (local v128) (drop (v128.load16 (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load.wast:154 +assert_malformed( + () => instantiate(`(memory 1) (func (local v128) (drop (v128.load32 (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load.wast:165 +assert_invalid( + () => instantiate(`(module (memory 1) (func (local v128) (drop (v128.load (f32.const 0)))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load.wast:169 +assert_invalid( + () => instantiate(`(module (memory 1) (func (local v128) (block (br_if 0 (v128.load (i32.const 0))))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load.wast:173 +assert_invalid( + () => instantiate(`(module (memory 1) (func (local v128) (v128.load (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load.wast:181 +assert_invalid( + () => instantiate(`(module (memory 1) (func (drop (v128.load (local.get 2)))))`), + `unknown local 2`, +); + +// ./test/core/simd/simd_load.wast:185 +assert_invalid( + () => instantiate(`(module (memory 1) (func (drop (v128.load))))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_load16_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load16_lane.wast.js new file mode 100644 index 0000000000..7fe67adb0e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_load16_lane.wast.js @@ -0,0 +1,424 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_load16_lane.wast + +// ./test/core/simd/simd_load16_lane.wast:4 +let $0 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0A\\0B\\0C\\0D\\0E\\0F") + (func (export "v128.load16_lane_0") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane 2 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_3") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane 3 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_4") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane 4 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_5") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane 5 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_6") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane 6 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_7") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane 7 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_0_offset_0") + (param $$x v128) (result v128) + (v128.load16_lane offset=0 0 (i32.const 0) (local.get $$x))) + (func (export "v128.load16_lane_1_offset_1") + (param $$x v128) (result v128) + (v128.load16_lane offset=1 1 (i32.const 0) (local.get $$x))) + (func (export "v128.load16_lane_2_offset_2") + (param $$x v128) (result v128) + (v128.load16_lane offset=2 2 (i32.const 0) (local.get $$x))) + (func (export "v128.load16_lane_3_offset_3") + (param $$x v128) (result v128) + (v128.load16_lane offset=3 3 (i32.const 0) (local.get $$x))) + (func (export "v128.load16_lane_4_offset_4") + (param $$x v128) (result v128) + (v128.load16_lane offset=4 4 (i32.const 0) (local.get $$x))) + (func (export "v128.load16_lane_5_offset_5") + (param $$x v128) (result v128) + (v128.load16_lane offset=5 5 (i32.const 0) (local.get $$x))) + (func (export "v128.load16_lane_6_offset_6") + (param $$x v128) (result v128) + (v128.load16_lane offset=6 6 (i32.const 0) (local.get $$x))) + (func (export "v128.load16_lane_7_offset_7") + (param $$x v128) (result v128) + (v128.load16_lane offset=7 7 (i32.const 0) (local.get $$x))) + (func (export "v128.load16_lane_0_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=1 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_0_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=2 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_1_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=1 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_1_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=2 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_2_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=1 2 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_2_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=2 2 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_3_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=1 3 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_3_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=2 3 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_4_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=1 4 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_4_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=2 4 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_5_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=1 5 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_5_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=2 5 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_6_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=1 6 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_6_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=2 6 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_7_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=1 7 (local.get $$address) (local.get $$x))) + (func (export "v128.load16_lane_7_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load16_lane align=2 7 (local.get $$address) (local.get $$x))) +)`); + +// ./test/core/simd/simd_load16_lane.wast:105 +assert_return( + () => invoke($0, `v128.load16_lane_0`, [ + 0, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:108 +assert_return( + () => invoke($0, `v128.load16_lane_1`, [ + 1, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x201, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:111 +assert_return( + () => invoke($0, `v128.load16_lane_2`, [ + 2, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x302, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:114 +assert_return( + () => invoke($0, `v128.load16_lane_3`, [ + 3, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x403, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:117 +assert_return( + () => invoke($0, `v128.load16_lane_4`, [ + 4, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x504, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:120 +assert_return( + () => invoke($0, `v128.load16_lane_5`, [ + 5, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x605, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:123 +assert_return( + () => invoke($0, `v128.load16_lane_6`, [ + 6, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x706, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:126 +assert_return( + () => invoke($0, `v128.load16_lane_7`, [ + 7, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x807])], +); + +// ./test/core/simd/simd_load16_lane.wast:129 +assert_return( + () => invoke($0, `v128.load16_lane_0_offset_0`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:131 +assert_return( + () => invoke($0, `v128.load16_lane_1_offset_1`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x201, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:133 +assert_return( + () => invoke($0, `v128.load16_lane_2_offset_2`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x302, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:135 +assert_return( + () => invoke($0, `v128.load16_lane_3_offset_3`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x403, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:137 +assert_return( + () => invoke($0, `v128.load16_lane_4_offset_4`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x504, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:139 +assert_return( + () => invoke($0, `v128.load16_lane_5_offset_5`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x605, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:141 +assert_return( + () => invoke($0, `v128.load16_lane_6_offset_6`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x706, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:143 +assert_return( + () => invoke($0, `v128.load16_lane_7_offset_7`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x807])], +); + +// ./test/core/simd/simd_load16_lane.wast:145 +assert_return( + () => invoke($0, `v128.load16_lane_0_align_1`, [ + 0, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:148 +assert_return( + () => invoke($0, `v128.load16_lane_0_align_2`, [ + 0, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:151 +assert_return( + () => invoke($0, `v128.load16_lane_1_align_1`, [ + 1, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x201, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:154 +assert_return( + () => invoke($0, `v128.load16_lane_1_align_2`, [ + 1, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x201, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:157 +assert_return( + () => invoke($0, `v128.load16_lane_2_align_1`, [ + 2, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x302, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:160 +assert_return( + () => invoke($0, `v128.load16_lane_2_align_2`, [ + 2, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x302, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:163 +assert_return( + () => invoke($0, `v128.load16_lane_3_align_1`, [ + 3, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x403, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:166 +assert_return( + () => invoke($0, `v128.load16_lane_3_align_2`, [ + 3, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x403, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:169 +assert_return( + () => invoke($0, `v128.load16_lane_4_align_1`, [ + 4, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x504, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:172 +assert_return( + () => invoke($0, `v128.load16_lane_4_align_2`, [ + 4, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x504, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:175 +assert_return( + () => invoke($0, `v128.load16_lane_5_align_1`, [ + 5, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x605, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:178 +assert_return( + () => invoke($0, `v128.load16_lane_5_align_2`, [ + 5, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x605, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:181 +assert_return( + () => invoke($0, `v128.load16_lane_6_align_1`, [ + 6, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x706, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:184 +assert_return( + () => invoke($0, `v128.load16_lane_6_align_2`, [ + 6, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x706, 0x0])], +); + +// ./test/core/simd/simd_load16_lane.wast:187 +assert_return( + () => invoke($0, `v128.load16_lane_7_align_1`, [ + 7, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x807])], +); + +// ./test/core/simd/simd_load16_lane.wast:190 +assert_return( + () => invoke($0, `v128.load16_lane_7_align_2`, [ + 7, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x807])], +); + +// ./test/core/simd/simd_load16_lane.wast:195 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.load16_lane 0 (local.get $$x) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load16_lane.wast:201 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.load16_lane 8 (i32.const 0) (local.get $$x))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_load16_lane.wast:207 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.load16_lane align=4 0 (i32.const 0) (local.get $$x))))`), + `alignment must not be larger than natural`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_load32_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load32_lane.wast.js new file mode 100644 index 0000000000..fb8deca36e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_load32_lane.wast.js @@ -0,0 +1,228 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_load32_lane.wast + +// ./test/core/simd/simd_load32_lane.wast:4 +let $0 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0A\\0B\\0C\\0D\\0E\\0F") + (func (export "v128.load32_lane_0") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane 2 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_3") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane 3 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_0_offset_0") + (param $$x v128) (result v128) + (v128.load32_lane offset=0 0 (i32.const 0) (local.get $$x))) + (func (export "v128.load32_lane_1_offset_1") + (param $$x v128) (result v128) + (v128.load32_lane offset=1 1 (i32.const 0) (local.get $$x))) + (func (export "v128.load32_lane_2_offset_2") + (param $$x v128) (result v128) + (v128.load32_lane offset=2 2 (i32.const 0) (local.get $$x))) + (func (export "v128.load32_lane_3_offset_3") + (param $$x v128) (result v128) + (v128.load32_lane offset=3 3 (i32.const 0) (local.get $$x))) + (func (export "v128.load32_lane_0_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane align=1 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_0_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane align=2 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_0_align_4") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane align=4 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_1_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane align=1 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_1_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane align=2 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_1_align_4") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane align=4 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_2_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane align=1 2 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_2_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane align=2 2 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_2_align_4") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane align=4 2 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_3_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane align=1 3 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_3_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane align=2 3 (local.get $$address) (local.get $$x))) + (func (export "v128.load32_lane_3_align_4") + (param $$address i32) (param $$x v128) (result v128) + (v128.load32_lane align=4 3 (local.get $$address) (local.get $$x))) +)`); + +// ./test/core/simd/simd_load32_lane.wast:69 +assert_return( + () => invoke($0, `v128.load32_lane_0`, [0, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x3020100, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:72 +assert_return( + () => invoke($0, `v128.load32_lane_1`, [1, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x4030201, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:75 +assert_return( + () => invoke($0, `v128.load32_lane_2`, [2, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x5040302, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:78 +assert_return( + () => invoke($0, `v128.load32_lane_3`, [3, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x6050403])], +); + +// ./test/core/simd/simd_load32_lane.wast:81 +assert_return( + () => invoke($0, `v128.load32_lane_0_offset_0`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x3020100, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:83 +assert_return( + () => invoke($0, `v128.load32_lane_1_offset_1`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x4030201, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:85 +assert_return( + () => invoke($0, `v128.load32_lane_2_offset_2`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x5040302, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:87 +assert_return( + () => invoke($0, `v128.load32_lane_3_offset_3`, [i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x6050403])], +); + +// ./test/core/simd/simd_load32_lane.wast:89 +assert_return( + () => invoke($0, `v128.load32_lane_0_align_1`, [0, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x3020100, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:92 +assert_return( + () => invoke($0, `v128.load32_lane_0_align_2`, [0, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x3020100, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:95 +assert_return( + () => invoke($0, `v128.load32_lane_0_align_4`, [0, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x3020100, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:98 +assert_return( + () => invoke($0, `v128.load32_lane_1_align_1`, [1, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x4030201, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:101 +assert_return( + () => invoke($0, `v128.load32_lane_1_align_2`, [1, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x4030201, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:104 +assert_return( + () => invoke($0, `v128.load32_lane_1_align_4`, [1, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x4030201, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:107 +assert_return( + () => invoke($0, `v128.load32_lane_2_align_1`, [2, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x5040302, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:110 +assert_return( + () => invoke($0, `v128.load32_lane_2_align_2`, [2, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x5040302, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:113 +assert_return( + () => invoke($0, `v128.load32_lane_2_align_4`, [2, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x5040302, 0x0])], +); + +// ./test/core/simd/simd_load32_lane.wast:116 +assert_return( + () => invoke($0, `v128.load32_lane_3_align_1`, [3, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x6050403])], +); + +// ./test/core/simd/simd_load32_lane.wast:119 +assert_return( + () => invoke($0, `v128.load32_lane_3_align_2`, [3, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x6050403])], +); + +// ./test/core/simd/simd_load32_lane.wast:122 +assert_return( + () => invoke($0, `v128.load32_lane_3_align_4`, [3, i32x4([0x0, 0x0, 0x0, 0x0])]), + [i32x4([0x0, 0x0, 0x0, 0x6050403])], +); + +// ./test/core/simd/simd_load32_lane.wast:127 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.load32_lane 0 (local.get $$x) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load32_lane.wast:133 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.load32_lane 4 (i32.const 0) (local.get $$x))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_load32_lane.wast:139 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.load32_lane align=8 0 (i32.const 0) (local.get $$x))))`), + `alignment must not be larger than natural`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_load64_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load64_lane.wast.js new file mode 100644 index 0000000000..ff71464896 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_load64_lane.wast.js @@ -0,0 +1,156 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_load64_lane.wast + +// ./test/core/simd/simd_load64_lane.wast:4 +let $0 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0A\\0B\\0C\\0D\\0E\\0F") + (func (export "v128.load64_lane_0") + (param $$address i32) (param $$x v128) (result v128) + (v128.load64_lane 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load64_lane_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load64_lane 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load64_lane_0_offset_0") + (param $$x v128) (result v128) + (v128.load64_lane offset=0 0 (i32.const 0) (local.get $$x))) + (func (export "v128.load64_lane_1_offset_1") + (param $$x v128) (result v128) + (v128.load64_lane offset=1 1 (i32.const 0) (local.get $$x))) + (func (export "v128.load64_lane_0_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load64_lane align=1 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load64_lane_0_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load64_lane align=2 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load64_lane_0_align_4") + (param $$address i32) (param $$x v128) (result v128) + (v128.load64_lane align=4 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load64_lane_0_align_8") + (param $$address i32) (param $$x v128) (result v128) + (v128.load64_lane align=8 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load64_lane_1_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load64_lane align=1 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load64_lane_1_align_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load64_lane align=2 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load64_lane_1_align_4") + (param $$address i32) (param $$x v128) (result v128) + (v128.load64_lane align=4 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load64_lane_1_align_8") + (param $$address i32) (param $$x v128) (result v128) + (v128.load64_lane align=8 1 (local.get $$address) (local.get $$x))) +)`); + +// ./test/core/simd/simd_load64_lane.wast:45 +assert_return( + () => invoke($0, `v128.load64_lane_0`, [0, i64x2([0x0n, 0x0n])]), + [i64x2([0x706050403020100n, 0x0n])], +); + +// ./test/core/simd/simd_load64_lane.wast:48 +assert_return( + () => invoke($0, `v128.load64_lane_1`, [1, i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x807060504030201n])], +); + +// ./test/core/simd/simd_load64_lane.wast:51 +assert_return( + () => invoke($0, `v128.load64_lane_0_offset_0`, [i64x2([0x0n, 0x0n])]), + [i64x2([0x706050403020100n, 0x0n])], +); + +// ./test/core/simd/simd_load64_lane.wast:53 +assert_return( + () => invoke($0, `v128.load64_lane_1_offset_1`, [i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x807060504030201n])], +); + +// ./test/core/simd/simd_load64_lane.wast:55 +assert_return( + () => invoke($0, `v128.load64_lane_0_align_1`, [0, i64x2([0x0n, 0x0n])]), + [i64x2([0x706050403020100n, 0x0n])], +); + +// ./test/core/simd/simd_load64_lane.wast:58 +assert_return( + () => invoke($0, `v128.load64_lane_0_align_2`, [0, i64x2([0x0n, 0x0n])]), + [i64x2([0x706050403020100n, 0x0n])], +); + +// ./test/core/simd/simd_load64_lane.wast:61 +assert_return( + () => invoke($0, `v128.load64_lane_0_align_4`, [0, i64x2([0x0n, 0x0n])]), + [i64x2([0x706050403020100n, 0x0n])], +); + +// ./test/core/simd/simd_load64_lane.wast:64 +assert_return( + () => invoke($0, `v128.load64_lane_0_align_8`, [0, i64x2([0x0n, 0x0n])]), + [i64x2([0x706050403020100n, 0x0n])], +); + +// ./test/core/simd/simd_load64_lane.wast:67 +assert_return( + () => invoke($0, `v128.load64_lane_1_align_1`, [1, i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x807060504030201n])], +); + +// ./test/core/simd/simd_load64_lane.wast:70 +assert_return( + () => invoke($0, `v128.load64_lane_1_align_2`, [1, i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x807060504030201n])], +); + +// ./test/core/simd/simd_load64_lane.wast:73 +assert_return( + () => invoke($0, `v128.load64_lane_1_align_4`, [1, i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x807060504030201n])], +); + +// ./test/core/simd/simd_load64_lane.wast:76 +assert_return( + () => invoke($0, `v128.load64_lane_1_align_8`, [1, i64x2([0x0n, 0x0n])]), + [i64x2([0x0n, 0x807060504030201n])], +); + +// ./test/core/simd/simd_load64_lane.wast:81 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.load64_lane 0 (local.get $$x) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load64_lane.wast:87 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.load64_lane 2 (i32.const 0) (local.get $$x))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_load64_lane.wast:93 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.load64_lane align=16 0 (i32.const 0) (local.get $$x))))`), + `alignment must not be larger than natural`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_load8_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load8_lane.wast.js new file mode 100644 index 0000000000..61e75fdef1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_load8_lane.wast.js @@ -0,0 +1,704 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_load8_lane.wast + +// ./test/core/simd/simd_load8_lane.wast:4 +let $0 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0A\\0B\\0C\\0D\\0E\\0F") + (func (export "v128.load8_lane_0") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_2") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 2 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_3") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 3 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_4") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 4 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_5") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 5 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_6") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 6 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_7") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 7 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_8") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 8 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_9") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 9 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_10") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 10 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_11") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 11 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_12") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 12 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_13") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 13 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_14") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 14 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_15") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane 15 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_0_offset_0") + (param $$x v128) (result v128) + (v128.load8_lane offset=0 0 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_1_offset_1") + (param $$x v128) (result v128) + (v128.load8_lane offset=1 1 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_2_offset_2") + (param $$x v128) (result v128) + (v128.load8_lane offset=2 2 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_3_offset_3") + (param $$x v128) (result v128) + (v128.load8_lane offset=3 3 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_4_offset_4") + (param $$x v128) (result v128) + (v128.load8_lane offset=4 4 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_5_offset_5") + (param $$x v128) (result v128) + (v128.load8_lane offset=5 5 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_6_offset_6") + (param $$x v128) (result v128) + (v128.load8_lane offset=6 6 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_7_offset_7") + (param $$x v128) (result v128) + (v128.load8_lane offset=7 7 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_8_offset_8") + (param $$x v128) (result v128) + (v128.load8_lane offset=8 8 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_9_offset_9") + (param $$x v128) (result v128) + (v128.load8_lane offset=9 9 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_10_offset_10") + (param $$x v128) (result v128) + (v128.load8_lane offset=10 10 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_11_offset_11") + (param $$x v128) (result v128) + (v128.load8_lane offset=11 11 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_12_offset_12") + (param $$x v128) (result v128) + (v128.load8_lane offset=12 12 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_13_offset_13") + (param $$x v128) (result v128) + (v128.load8_lane offset=13 13 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_14_offset_14") + (param $$x v128) (result v128) + (v128.load8_lane offset=14 14 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_15_offset_15") + (param $$x v128) (result v128) + (v128.load8_lane offset=15 15 (i32.const 0) (local.get $$x))) + (func (export "v128.load8_lane_0_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 0 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_1_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 1 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_2_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 2 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_3_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 3 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_4_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 4 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_5_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 5 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_6_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 6 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_7_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 7 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_8_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 8 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_9_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 9 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_10_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 10 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_11_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 11 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_12_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 12 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_13_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 13 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_14_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 14 (local.get $$address) (local.get $$x))) + (func (export "v128.load8_lane_15_align_1") + (param $$address i32) (param $$x v128) (result v128) + (v128.load8_lane align=1 15 (local.get $$address) (local.get $$x))) +)`); + +// ./test/core/simd/simd_load8_lane.wast:153 +assert_return( + () => invoke($0, `v128.load8_lane_0`, [ + 0, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:156 +assert_return( + () => invoke($0, `v128.load8_lane_1`, [ + 1, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:159 +assert_return( + () => invoke($0, `v128.load8_lane_2`, [ + 2, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:162 +assert_return( + () => invoke($0, `v128.load8_lane_3`, [ + 3, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:165 +assert_return( + () => invoke($0, `v128.load8_lane_4`, [ + 4, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:168 +assert_return( + () => invoke($0, `v128.load8_lane_5`, [ + 5, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:171 +assert_return( + () => invoke($0, `v128.load8_lane_6`, [ + 6, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:174 +assert_return( + () => invoke($0, `v128.load8_lane_7`, [ + 7, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:177 +assert_return( + () => invoke($0, `v128.load8_lane_8`, [ + 8, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:180 +assert_return( + () => invoke($0, `v128.load8_lane_9`, [ + 9, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:183 +assert_return( + () => invoke($0, `v128.load8_lane_10`, [ + 10, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:186 +assert_return( + () => invoke($0, `v128.load8_lane_11`, [ + 11, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:189 +assert_return( + () => invoke($0, `v128.load8_lane_12`, [ + 12, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:192 +assert_return( + () => invoke($0, `v128.load8_lane_13`, [ + 13, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:195 +assert_return( + () => invoke($0, `v128.load8_lane_14`, [ + 14, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:198 +assert_return( + () => invoke($0, `v128.load8_lane_15`, [ + 15, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:201 +assert_return( + () => invoke($0, `v128.load8_lane_0_offset_0`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:203 +assert_return( + () => invoke($0, `v128.load8_lane_1_offset_1`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:205 +assert_return( + () => invoke($0, `v128.load8_lane_2_offset_2`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:207 +assert_return( + () => invoke($0, `v128.load8_lane_3_offset_3`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:209 +assert_return( + () => invoke($0, `v128.load8_lane_4_offset_4`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:211 +assert_return( + () => invoke($0, `v128.load8_lane_5_offset_5`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:213 +assert_return( + () => invoke($0, `v128.load8_lane_6_offset_6`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:215 +assert_return( + () => invoke($0, `v128.load8_lane_7_offset_7`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:217 +assert_return( + () => invoke($0, `v128.load8_lane_8_offset_8`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:219 +assert_return( + () => invoke($0, `v128.load8_lane_9_offset_9`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:221 +assert_return( + () => invoke($0, `v128.load8_lane_10_offset_10`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:223 +assert_return( + () => invoke($0, `v128.load8_lane_11_offset_11`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:225 +assert_return( + () => invoke($0, `v128.load8_lane_12_offset_12`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:227 +assert_return( + () => invoke($0, `v128.load8_lane_13_offset_13`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:229 +assert_return( + () => invoke($0, `v128.load8_lane_14_offset_14`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:231 +assert_return( + () => invoke($0, `v128.load8_lane_15_offset_15`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:233 +assert_return( + () => invoke($0, `v128.load8_lane_0_align_1`, [ + 0, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:236 +assert_return( + () => invoke($0, `v128.load8_lane_1_align_1`, [ + 1, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:239 +assert_return( + () => invoke($0, `v128.load8_lane_2_align_1`, [ + 2, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:242 +assert_return( + () => invoke($0, `v128.load8_lane_3_align_1`, [ + 3, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:245 +assert_return( + () => invoke($0, `v128.load8_lane_4_align_1`, [ + 4, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:248 +assert_return( + () => invoke($0, `v128.load8_lane_5_align_1`, [ + 5, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:251 +assert_return( + () => invoke($0, `v128.load8_lane_6_align_1`, [ + 6, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:254 +assert_return( + () => invoke($0, `v128.load8_lane_7_align_1`, [ + 7, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:257 +assert_return( + () => invoke($0, `v128.load8_lane_8_align_1`, [ + 8, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:260 +assert_return( + () => invoke($0, `v128.load8_lane_9_align_1`, [ + 9, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:263 +assert_return( + () => invoke($0, `v128.load8_lane_10_align_1`, [ + 10, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:266 +assert_return( + () => invoke($0, `v128.load8_lane_11_align_1`, [ + 11, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:269 +assert_return( + () => invoke($0, `v128.load8_lane_12_align_1`, [ + 12, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:272 +assert_return( + () => invoke($0, `v128.load8_lane_13_align_1`, [ + 13, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:275 +assert_return( + () => invoke($0, `v128.load8_lane_14_align_1`, [ + 14, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe, 0x0]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:278 +assert_return( + () => invoke($0, `v128.load8_lane_15_align_1`, [ + 15, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf]), + ], +); + +// ./test/core/simd/simd_load8_lane.wast:283 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.load8_lane 0 (local.get $$x) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load8_lane.wast:289 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.load8_lane 16 (i32.const 0) (local.get $$x))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_load8_lane.wast:295 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.load8_lane align=2 0 (i32.const 0) (local.get $$x))))`), + `alignment must not be larger than natural`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_load_extend.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load_extend.wast.js new file mode 100644 index 0000000000..3ee50e0b23 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_load_extend.wast.js @@ -0,0 +1,726 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_load_extend.wast + +// ./test/core/simd/simd_load_extend.wast:3 +let $0 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0A\\0B\\0C\\0D\\0E\\0F\\80\\81\\82\\83\\84\\85\\86\\87\\88\\89") + (data (i32.const 65520) "\\0A\\0B\\0C\\0D\\0E\\0F\\80\\81\\82\\83\\84\\85\\86\\87\\88\\89") + + (func (export "v128.load8x8_s") (param $$0 i32) (result v128) + (v128.load8x8_s (local.get $$0)) + ) + (func (export "v128.load8x8_u") (param $$0 i32) (result v128) + (v128.load8x8_u (local.get $$0)) + ) + (func (export "v128.load16x4_s") (param $$0 i32) (result v128) + (v128.load16x4_s (local.get $$0)) + ) + (func (export "v128.load16x4_u") (param $$0 i32) (result v128) + (v128.load16x4_u (local.get $$0)) + ) + (func (export "v128.load32x2_s") (param $$0 i32) (result v128) + (v128.load32x2_s (local.get $$0)) + ) + (func (export "v128.load32x2_u") (param $$0 i32) (result v128) + (v128.load32x2_u (local.get $$0)) + ) + + ;; load by a constant amount + (func (export "v128.load8x8_s_const0") (result v128) + (v128.load8x8_s (i32.const 0)) + ) + (func (export "v128.load8x8_u_const8") (result v128) + (v128.load8x8_u (i32.const 8)) + ) + (func (export "v128.load16x4_s_const10") (result v128) + (v128.load16x4_s (i32.const 10)) + ) + (func (export "v128.load16x4_u_const20") (result v128) + (v128.load16x4_u (i32.const 20)) + ) + (func (export "v128.load32x2_s_const65520") (result v128) + (v128.load32x2_s (i32.const 65520)) + ) + (func (export "v128.load32x2_u_const65526") (result v128) + (v128.load32x2_u (i32.const 65526)) + ) + + ;; load data with different offset/align arguments + ;; i16x8 + (func (export "v128.load8x8_s_offset0") (param $$0 i32) (result v128) + (v128.load8x8_s offset=0 (local.get $$0)) + ) + (func (export "v128.load8x8_s_align1") (param $$0 i32) (result v128) + (v128.load8x8_s align=1 (local.get $$0)) + ) + (func (export "v128.load8x8_s_offset0_align1") (param $$0 i32) (result v128) + (v128.load8x8_s offset=0 align=1 (local.get $$0)) + ) + (func (export "v128.load8x8_s_offset1_align1") (param $$0 i32) (result v128) + (v128.load8x8_s offset=1 align=1 (local.get $$0)) + ) + (func (export "v128.load8x8_s_offset10_align4") (param $$0 i32) (result v128) + (v128.load8x8_s offset=10 align=4 (local.get $$0)) + ) + (func (export "v128.load8x8_s_offset20_align8") (param $$0 i32) (result v128) + (v128.load8x8_s offset=20 align=8 (local.get $$0)) + ) + (func (export "v128.load8x8_u_offset0") (param $$0 i32) (result v128) + (v128.load8x8_u offset=0 (local.get $$0)) + ) + (func (export "v128.load8x8_u_align1") (param $$0 i32) (result v128) + (v128.load8x8_u align=1 (local.get $$0)) + ) + (func (export "v128.load8x8_u_offset0_align1") (param $$0 i32) (result v128) + (v128.load8x8_u offset=0 align=1 (local.get $$0)) + ) + (func (export "v128.load8x8_u_offset1_align1") (param $$0 i32) (result v128) + (v128.load8x8_u offset=1 align=1 (local.get $$0)) + ) + (func (export "v128.load8x8_u_offset10_align4") (param $$0 i32) (result v128) + (v128.load8x8_u offset=10 align=4 (local.get $$0)) + ) + (func (export "v128.load8x8_u_offset20_align8") (param $$0 i32) (result v128) + (v128.load8x8_u offset=20 align=8 (local.get $$0)) + ) + ;; i32x4 + (func (export "v128.load16x4_s_offset0") (param $$0 i32) (result v128) + (v128.load16x4_s offset=0 (local.get $$0)) + ) + (func (export "v128.load16x4_s_align1") (param $$0 i32) (result v128) + (v128.load16x4_s align=1 (local.get $$0)) + ) + (func (export "v128.load16x4_s_offset0_align1") (param $$0 i32) (result v128) + (v128.load16x4_s offset=0 align=1 (local.get $$0)) + ) + (func (export "v128.load16x4_s_offset1_align1") (param $$0 i32) (result v128) + (v128.load16x4_s offset=1 align=1 (local.get $$0)) + ) + (func (export "v128.load16x4_s_offset10_align4") (param $$0 i32) (result v128) + (v128.load16x4_s offset=10 align=4 (local.get $$0)) + ) + (func (export "v128.load16x4_s_offset20_align8") (param $$0 i32) (result v128) + (v128.load16x4_s offset=20 align=8 (local.get $$0)) + ) + (func (export "v128.load16x4_u_offset0") (param $$0 i32) (result v128) + (v128.load16x4_u offset=0 (local.get $$0)) + ) + (func (export "v128.load16x4_u_align1") (param $$0 i32) (result v128) + (v128.load16x4_u align=1 (local.get $$0)) + ) + (func (export "v128.load16x4_u_offset0_align1") (param $$0 i32) (result v128) + (v128.load16x4_u offset=0 align=1 (local.get $$0)) + ) + (func (export "v128.load16x4_u_offset1_align1") (param $$0 i32) (result v128) + (v128.load16x4_u offset=1 align=1 (local.get $$0)) + ) + (func (export "v128.load16x4_u_offset10_align4") (param $$0 i32) (result v128) + (v128.load16x4_u offset=10 align=4 (local.get $$0)) + ) + (func (export "v128.load16x4_u_offset20_align8") (param $$0 i32) (result v128) + (v128.load16x4_u offset=20 align=8 (local.get $$0)) + ) + ;; i64x2 + (func (export "v128.load32x2_s_offset0") (param $$0 i32) (result v128) + (v128.load32x2_s offset=0 (local.get $$0)) + ) + (func (export "v128.load32x2_s_align1") (param $$0 i32) (result v128) + (v128.load32x2_s align=1 (local.get $$0)) + ) + (func (export "v128.load32x2_s_offset0_align1") (param $$0 i32) (result v128) + (v128.load32x2_s offset=0 align=1 (local.get $$0)) + ) + (func (export "v128.load32x2_s_offset1_align1") (param $$0 i32) (result v128) + (v128.load32x2_s offset=1 align=1 (local.get $$0)) + ) + (func (export "v128.load32x2_s_offset10_align4") (param $$0 i32) (result v128) + (v128.load32x2_s offset=10 align=4 (local.get $$0)) + ) + (func (export "v128.load32x2_s_offset20_align8") (param $$0 i32) (result v128) + (v128.load32x2_s offset=20 align=8 (local.get $$0)) + ) + (func (export "v128.load32x2_u_offset0") (param $$0 i32) (result v128) + (v128.load32x2_u offset=0 (local.get $$0)) + ) + (func (export "v128.load32x2_u_align1") (param $$0 i32) (result v128) + (v128.load32x2_u align=1 (local.get $$0)) + ) + (func (export "v128.load32x2_u_offset0_align1") (param $$0 i32) (result v128) + (v128.load32x2_u offset=0 align=1 (local.get $$0)) + ) + (func (export "v128.load32x2_u_offset1_align1") (param $$0 i32) (result v128) + (v128.load32x2_u offset=1 align=1 (local.get $$0)) + ) + (func (export "v128.load32x2_u_offset10_align4") (param $$0 i32) (result v128) + (v128.load32x2_u offset=10 align=4 (local.get $$0)) + ) + (func (export "v128.load32x2_u_offset20_align8") (param $$0 i32) (result v128) + (v128.load32x2_u offset=20 align=8 (local.get $$0)) + ) +)`); + +// ./test/core/simd/simd_load_extend.wast:163 +assert_return( + () => invoke($0, `v128.load8x8_s`, [0]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_load_extend.wast:164 +assert_return( + () => invoke($0, `v128.load8x8_u`, [0]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_load_extend.wast:165 +assert_return(() => invoke($0, `v128.load16x4_s`, [0]), [i32x4([0x100, 0x302, 0x504, 0x706])]); + +// ./test/core/simd/simd_load_extend.wast:166 +assert_return(() => invoke($0, `v128.load16x4_u`, [0]), [i32x4([0x100, 0x302, 0x504, 0x706])]); + +// ./test/core/simd/simd_load_extend.wast:167 +assert_return(() => invoke($0, `v128.load32x2_s`, [0]), [i64x2([0x3020100n, 0x7060504n])]); + +// ./test/core/simd/simd_load_extend.wast:168 +assert_return(() => invoke($0, `v128.load32x2_u`, [0]), [i64x2([0x3020100n, 0x7060504n])]); + +// ./test/core/simd/simd_load_extend.wast:169 +assert_return( + () => invoke($0, `v128.load8x8_s`, [10]), + [i16x8([0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0xff80, 0xff81])], +); + +// ./test/core/simd/simd_load_extend.wast:170 +assert_return( + () => invoke($0, `v128.load8x8_u`, [10]), + [i16x8([0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x80, 0x81])], +); + +// ./test/core/simd/simd_load_extend.wast:171 +assert_return(() => invoke($0, `v128.load16x4_s`, [10]), [i32x4([0xb0a, 0xd0c, 0xf0e, 0xffff8180])]); + +// ./test/core/simd/simd_load_extend.wast:172 +assert_return(() => invoke($0, `v128.load16x4_u`, [10]), [i32x4([0xb0a, 0xd0c, 0xf0e, 0x8180])]); + +// ./test/core/simd/simd_load_extend.wast:173 +assert_return(() => invoke($0, `v128.load32x2_s`, [10]), [i64x2([0xd0c0b0an, 0xffffffff81800f0en])]); + +// ./test/core/simd/simd_load_extend.wast:174 +assert_return(() => invoke($0, `v128.load32x2_u`, [10]), [i64x2([0xd0c0b0an, 0x81800f0en])]); + +// ./test/core/simd/simd_load_extend.wast:175 +assert_return( + () => invoke($0, `v128.load8x8_s`, [20]), + [i16x8([0xff84, 0xff85, 0xff86, 0xff87, 0xff88, 0xff89, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load_extend.wast:176 +assert_return( + () => invoke($0, `v128.load8x8_u`, [20]), + [i16x8([0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load_extend.wast:177 +assert_return( + () => invoke($0, `v128.load16x4_s`, [20]), + [i32x4([0xffff8584, 0xffff8786, 0xffff8988, 0x0])], +); + +// ./test/core/simd/simd_load_extend.wast:178 +assert_return(() => invoke($0, `v128.load16x4_u`, [20]), [i32x4([0x8584, 0x8786, 0x8988, 0x0])]); + +// ./test/core/simd/simd_load_extend.wast:179 +assert_return(() => invoke($0, `v128.load32x2_s`, [20]), [i64x2([0xffffffff87868584n, 0x8988n])]); + +// ./test/core/simd/simd_load_extend.wast:180 +assert_return(() => invoke($0, `v128.load32x2_u`, [20]), [i64x2([0x87868584n, 0x8988n])]); + +// ./test/core/simd/simd_load_extend.wast:183 +assert_return( + () => invoke($0, `v128.load8x8_s_const0`, []), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_load_extend.wast:184 +assert_return( + () => invoke($0, `v128.load8x8_u_const8`, []), + [i16x8([0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf])], +); + +// ./test/core/simd/simd_load_extend.wast:185 +assert_return(() => invoke($0, `v128.load16x4_s_const10`, []), [i32x4([0xb0a, 0xd0c, 0xf0e, 0xffff8180])]); + +// ./test/core/simd/simd_load_extend.wast:186 +assert_return(() => invoke($0, `v128.load16x4_u_const20`, []), [i32x4([0x8584, 0x8786, 0x8988, 0x0])]); + +// ./test/core/simd/simd_load_extend.wast:187 +assert_return( + () => invoke($0, `v128.load32x2_s_const65520`, []), + [i64x2([0xd0c0b0an, 0xffffffff81800f0en])], +); + +// ./test/core/simd/simd_load_extend.wast:188 +assert_return(() => invoke($0, `v128.load32x2_u_const65526`, []), [i64x2([0x83828180n, 0x87868584n])]); + +// ./test/core/simd/simd_load_extend.wast:192 +assert_return( + () => invoke($0, `v128.load8x8_s_offset0`, [0]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_load_extend.wast:193 +assert_return( + () => invoke($0, `v128.load8x8_s_align1`, [1]), + [i16x8([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8])], +); + +// ./test/core/simd/simd_load_extend.wast:194 +assert_return( + () => invoke($0, `v128.load8x8_s_offset0_align1`, [2]), + [i16x8([0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9])], +); + +// ./test/core/simd/simd_load_extend.wast:195 +assert_return( + () => invoke($0, `v128.load8x8_s_offset10_align4`, [3]), + [i16x8([0xd, 0xe, 0xf, 0xff80, 0xff81, 0xff82, 0xff83, 0xff84])], +); + +// ./test/core/simd/simd_load_extend.wast:196 +assert_return( + () => invoke($0, `v128.load8x8_s_offset20_align8`, [4]), + [i16x8([0xff88, 0xff89, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load_extend.wast:197 +assert_return( + () => invoke($0, `v128.load8x8_u_offset0`, [0]), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_load_extend.wast:198 +assert_return( + () => invoke($0, `v128.load8x8_u_align1`, [1]), + [i16x8([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8])], +); + +// ./test/core/simd/simd_load_extend.wast:199 +assert_return( + () => invoke($0, `v128.load8x8_u_offset0_align1`, [2]), + [i16x8([0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9])], +); + +// ./test/core/simd/simd_load_extend.wast:200 +assert_return( + () => invoke($0, `v128.load8x8_u_offset10_align4`, [3]), + [i16x8([0xd, 0xe, 0xf, 0x80, 0x81, 0x82, 0x83, 0x84])], +); + +// ./test/core/simd/simd_load_extend.wast:201 +assert_return( + () => invoke($0, `v128.load8x8_u_offset20_align8`, [4]), + [i16x8([0x88, 0x89, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load_extend.wast:203 +assert_return(() => invoke($0, `v128.load16x4_s_offset0`, [0]), [i32x4([0x100, 0x302, 0x504, 0x706])]); + +// ./test/core/simd/simd_load_extend.wast:204 +assert_return(() => invoke($0, `v128.load16x4_s_align1`, [1]), [i32x4([0x201, 0x403, 0x605, 0x807])]); + +// ./test/core/simd/simd_load_extend.wast:205 +assert_return( + () => invoke($0, `v128.load16x4_s_offset0_align1`, [2]), + [i32x4([0x302, 0x504, 0x706, 0x908])], +); + +// ./test/core/simd/simd_load_extend.wast:206 +assert_return( + () => invoke($0, `v128.load16x4_s_offset10_align4`, [3]), + [i32x4([0xe0d, 0xffff800f, 0xffff8281, 0xffff8483])], +); + +// ./test/core/simd/simd_load_extend.wast:207 +assert_return( + () => invoke($0, `v128.load16x4_s_offset20_align8`, [4]), + [i32x4([0xffff8988, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load_extend.wast:208 +assert_return(() => invoke($0, `v128.load16x4_u_offset0`, [0]), [i32x4([0x100, 0x302, 0x504, 0x706])]); + +// ./test/core/simd/simd_load_extend.wast:209 +assert_return(() => invoke($0, `v128.load16x4_u_align1`, [1]), [i32x4([0x201, 0x403, 0x605, 0x807])]); + +// ./test/core/simd/simd_load_extend.wast:210 +assert_return( + () => invoke($0, `v128.load16x4_u_offset0_align1`, [2]), + [i32x4([0x302, 0x504, 0x706, 0x908])], +); + +// ./test/core/simd/simd_load_extend.wast:211 +assert_return( + () => invoke($0, `v128.load16x4_u_offset10_align4`, [3]), + [i32x4([0xe0d, 0x800f, 0x8281, 0x8483])], +); + +// ./test/core/simd/simd_load_extend.wast:212 +assert_return( + () => invoke($0, `v128.load16x4_u_offset20_align8`, [4]), + [i32x4([0x8988, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load_extend.wast:214 +assert_return(() => invoke($0, `v128.load32x2_s_offset0`, [0]), [i64x2([0x3020100n, 0x7060504n])]); + +// ./test/core/simd/simd_load_extend.wast:215 +assert_return(() => invoke($0, `v128.load32x2_s_align1`, [1]), [i64x2([0x4030201n, 0x8070605n])]); + +// ./test/core/simd/simd_load_extend.wast:216 +assert_return( + () => invoke($0, `v128.load32x2_s_offset0_align1`, [2]), + [i64x2([0x5040302n, 0x9080706n])], +); + +// ./test/core/simd/simd_load_extend.wast:217 +assert_return( + () => invoke($0, `v128.load32x2_s_offset10_align4`, [3]), + [i64x2([0xffffffff800f0e0dn, 0xffffffff84838281n])], +); + +// ./test/core/simd/simd_load_extend.wast:218 +assert_return(() => invoke($0, `v128.load32x2_s_offset20_align8`, [4]), [i64x2([0x8988n, 0x0n])]); + +// ./test/core/simd/simd_load_extend.wast:219 +assert_return(() => invoke($0, `v128.load32x2_u_offset0`, [0]), [i64x2([0x3020100n, 0x7060504n])]); + +// ./test/core/simd/simd_load_extend.wast:220 +assert_return(() => invoke($0, `v128.load32x2_u_align1`, [1]), [i64x2([0x4030201n, 0x8070605n])]); + +// ./test/core/simd/simd_load_extend.wast:221 +assert_return( + () => invoke($0, `v128.load32x2_u_offset0_align1`, [2]), + [i64x2([0x5040302n, 0x9080706n])], +); + +// ./test/core/simd/simd_load_extend.wast:222 +assert_return( + () => invoke($0, `v128.load32x2_u_offset10_align4`, [3]), + [i64x2([0x800f0e0dn, 0x84838281n])], +); + +// ./test/core/simd/simd_load_extend.wast:223 +assert_return(() => invoke($0, `v128.load32x2_u_offset20_align8`, [4]), [i64x2([0x8988n, 0x0n])]); + +// ./test/core/simd/simd_load_extend.wast:226 +assert_trap(() => invoke($0, `v128.load8x8_s`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_extend.wast:227 +assert_trap(() => invoke($0, `v128.load8x8_u`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_extend.wast:228 +assert_trap(() => invoke($0, `v128.load16x4_s`, [65536]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_extend.wast:229 +assert_trap(() => invoke($0, `v128.load16x4_u`, [65536]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_extend.wast:230 +assert_trap(() => invoke($0, `v128.load32x2_s`, [65529]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_extend.wast:231 +assert_trap(() => invoke($0, `v128.load32x2_u`, [65529]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_extend.wast:233 +assert_trap(() => invoke($0, `v128.load8x8_s_offset1_align1`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_extend.wast:234 +assert_trap(() => invoke($0, `v128.load8x8_u_offset1_align1`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_extend.wast:235 +assert_trap(() => invoke($0, `v128.load16x4_s_offset1_align1`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_extend.wast:236 +assert_trap(() => invoke($0, `v128.load16x4_u_offset1_align1`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_extend.wast:237 +assert_trap(() => invoke($0, `v128.load32x2_s_offset1_align1`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_extend.wast:238 +assert_trap(() => invoke($0, `v128.load32x2_u_offset1_align1`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_extend.wast:241 +assert_invalid( + () => instantiate(`(module (memory 0) (func (result v128) (v128.load8x8_s (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_extend.wast:242 +assert_invalid( + () => instantiate(`(module (memory 0) (func (result v128) (v128.load8x8_u (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_extend.wast:243 +assert_invalid( + () => instantiate(`(module (memory 0) (func (result v128) (v128.load16x4_s (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_extend.wast:244 +assert_invalid( + () => instantiate(`(module (memory 0) (func (result v128) (v128.load16x4_u (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_extend.wast:245 +assert_invalid( + () => instantiate(`(module (memory 0) (func (result v128) (v128.load32x2_s (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_extend.wast:246 +assert_invalid( + () => instantiate(`(module (memory 0) (func (result v128) (v128.load32x2_u (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_extend.wast:250 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.load8x8_s-arg-empty (result v128) + (v128.load8x8_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_extend.wast:258 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.load8x8_u-arg-empty (result v128) + (v128.load8x8_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_extend.wast:266 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.load16x4_s-arg-empty (result v128) + (v128.load16x4_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_extend.wast:274 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.load16x4_u-arg-empty (result v128) + (v128.load16x4_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_extend.wast:282 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.load32x2_s-arg-empty (result v128) + (v128.load32x2_s) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_extend.wast:290 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.load32x2_u-arg-empty (result v128) + (v128.load32x2_u) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_extend.wast:301 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i16x8.load16x4_s (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_extend.wast:302 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i16x8.load16x4_u (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_extend.wast:303 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i32x4.load32x2_s (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_extend.wast:304 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i32x4.load32x2_u (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_extend.wast:305 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i64x2.load64x1_s (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_extend.wast:306 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i64x2.load64x1_u (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_extend.wast:309 +let $1 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0A\\0B\\0C\\0D\\0E\\0F\\80\\81\\82\\83\\84\\85\\86\\87\\88\\89") + (func (export "v128.load8x8_s-in-block") (result v128) + (block (result v128) (block (result v128) (v128.load8x8_s (i32.const 0)))) + ) + (func (export "v128.load8x8_u-in-block") (result v128) + (block (result v128) (block (result v128) (v128.load8x8_u (i32.const 1)))) + ) + (func (export "v128.load16x4_s-in-block") (result v128) + (block (result v128) (block (result v128) (v128.load16x4_s (i32.const 2)))) + ) + (func (export "v128.load16x4_u-in-block") (result v128) + (block (result v128) (block (result v128) (v128.load16x4_u (i32.const 3)))) + ) + (func (export "v128.load32x2_s-in-block") (result v128) + (block (result v128) (block (result v128) (v128.load32x2_s (i32.const 4)))) + ) + (func (export "v128.load32x2_u-in-block") (result v128) + (block (result v128) (block (result v128) (v128.load32x2_u (i32.const 5)))) + ) + (func (export "v128.load8x8_s-as-br-value") (result v128) + (block (result v128) (br 0 (v128.load8x8_s (i32.const 6)))) + ) + (func (export "v128.load8x8_u-as-br-value") (result v128) + (block (result v128) (br 0 (v128.load8x8_u (i32.const 7)))) + ) + (func (export "v128.load16x4_s-as-br-value") (result v128) + (block (result v128) (br 0 (v128.load16x4_s (i32.const 8)))) + ) + (func (export "v128.load16x4_u-as-br-value") (result v128) + (block (result v128) (br 0 (v128.load16x4_u (i32.const 9)))) + ) + (func (export "v128.load32x2_s-as-br-value") (result v128) + (block (result v128) (br 0 (v128.load32x2_s (i32.const 10)))) + ) + (func (export "v128.load32x2_u-as-br-value") (result v128) + (block (result v128) (br 0 (v128.load32x2_u (i32.const 11)))) + ) + (func (export "v128.load8x8_s-extract_lane_s-operand") (result i32) + (i8x16.extract_lane_s 0 (v128.load8x8_s (i32.const 12))) + ) + (func (export "v128.load8x8_u-extract_lane_s-operand") (result i32) + (i8x16.extract_lane_s 0 (v128.load8x8_u (i32.const 13))) + ) + (func (export "v128.load16x4_s-extract_lane_s-operand") (result i32) + (i8x16.extract_lane_s 0 (v128.load16x4_s (i32.const 14))) + ) + (func (export "v128.load16x4_u-extract_lane_s-operand") (result i32) + (i8x16.extract_lane_s 0 (v128.load16x4_u (i32.const 15))) + ) + (func (export "v128.load32x2_s-extract_lane_s-operand") (result i32) + (i8x16.extract_lane_s 0 (v128.load32x2_s (i32.const 16))) + ) + (func (export "v128.load32x2_u-extract_lane_s-operand") (result i32) + (i8x16.extract_lane_s 0 (v128.load32x2_u (i32.const 17))) + ) +)`); + +// ./test/core/simd/simd_load_extend.wast:367 +assert_return( + () => invoke($1, `v128.load8x8_s-in-block`, []), + [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])], +); + +// ./test/core/simd/simd_load_extend.wast:368 +assert_return( + () => invoke($1, `v128.load8x8_u-in-block`, []), + [i16x8([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8])], +); + +// ./test/core/simd/simd_load_extend.wast:369 +assert_return(() => invoke($1, `v128.load16x4_s-in-block`, []), [i32x4([0x302, 0x504, 0x706, 0x908])]); + +// ./test/core/simd/simd_load_extend.wast:370 +assert_return(() => invoke($1, `v128.load16x4_u-in-block`, []), [i32x4([0x403, 0x605, 0x807, 0xa09])]); + +// ./test/core/simd/simd_load_extend.wast:371 +assert_return(() => invoke($1, `v128.load32x2_s-in-block`, []), [i64x2([0x7060504n, 0xb0a0908n])]); + +// ./test/core/simd/simd_load_extend.wast:372 +assert_return(() => invoke($1, `v128.load32x2_u-in-block`, []), [i64x2([0x8070605n, 0xc0b0a09n])]); + +// ./test/core/simd/simd_load_extend.wast:373 +assert_return( + () => invoke($1, `v128.load8x8_s-as-br-value`, []), + [i16x8([0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd])], +); + +// ./test/core/simd/simd_load_extend.wast:374 +assert_return( + () => invoke($1, `v128.load8x8_u-as-br-value`, []), + [i16x8([0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe])], +); + +// ./test/core/simd/simd_load_extend.wast:375 +assert_return(() => invoke($1, `v128.load16x4_s-as-br-value`, []), [i32x4([0x908, 0xb0a, 0xd0c, 0xf0e])]); + +// ./test/core/simd/simd_load_extend.wast:376 +assert_return(() => invoke($1, `v128.load16x4_u-as-br-value`, []), [i32x4([0xa09, 0xc0b, 0xe0d, 0x800f])]); + +// ./test/core/simd/simd_load_extend.wast:377 +assert_return( + () => invoke($1, `v128.load32x2_s-as-br-value`, []), + [i64x2([0xd0c0b0an, 0xffffffff81800f0en])], +); + +// ./test/core/simd/simd_load_extend.wast:378 +assert_return(() => invoke($1, `v128.load32x2_u-as-br-value`, []), [i64x2([0xe0d0c0bn, 0x8281800fn])]); + +// ./test/core/simd/simd_load_extend.wast:379 +assert_return(() => invoke($1, `v128.load8x8_s-extract_lane_s-operand`, []), [value("i32", 12)]); + +// ./test/core/simd/simd_load_extend.wast:380 +assert_return(() => invoke($1, `v128.load8x8_u-extract_lane_s-operand`, []), [value("i32", 13)]); + +// ./test/core/simd/simd_load_extend.wast:381 +assert_return(() => invoke($1, `v128.load16x4_s-extract_lane_s-operand`, []), [value("i32", 14)]); + +// ./test/core/simd/simd_load_extend.wast:382 +assert_return(() => invoke($1, `v128.load16x4_u-extract_lane_s-operand`, []), [value("i32", 15)]); + +// ./test/core/simd/simd_load_extend.wast:383 +assert_return(() => invoke($1, `v128.load32x2_s-extract_lane_s-operand`, []), [value("i32", -128)]); + +// ./test/core/simd/simd_load_extend.wast:384 +assert_return(() => invoke($1, `v128.load32x2_u-extract_lane_s-operand`, []), [value("i32", -127)]); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_load_splat.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load_splat.wast.js new file mode 100644 index 0000000000..ee1ece3d20 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_load_splat.wast.js @@ -0,0 +1,750 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_load_splat.wast + +// ./test/core/simd/simd_load_splat.wast:3 +let $0 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0A\\0B\\0C\\0D\\0E\\0F") + (data (i32.const 65520) "\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\1A\\1B\\1C\\1D\\1E\\1F") + + (func (export "v128.load8_splat") (param $$address i32) (result v128) (v128.load8_splat (local.get $$address))) + (func (export "v128.load16_splat") (param $$address i32) (result v128) (v128.load16_splat (local.get $$address))) + (func (export "v128.load32_splat") (param $$address i32) (result v128) (v128.load32_splat (local.get $$address))) + (func (export "v128.load64_splat") (param $$address i32) (result v128) (v128.load64_splat (local.get $$address))) + + ;; Load data with different offset/align arguments + (func (export "v8x16.offset0") (param $$address i32) (result v128) (v128.load8_splat offset=0 (local.get $$address))) + (func (export "v8x16.align1") (param $$address i32) (result v128) (v128.load8_splat align=1 (local.get $$address))) + (func (export "v8x16.offset1_align1") (param $$address i32) (result v128) (v128.load8_splat offset=1 align=1 (local.get $$address))) + (func (export "v8x16.offset2_align1") (param $$address i32) (result v128) (v128.load8_splat offset=2 align=1 (local.get $$address))) + (func (export "v8x16.offset15_align1") (param $$address i32) (result v128) (v128.load8_splat offset=15 align=1 (local.get $$address))) + + (func (export "v16x8.offset0") (param $$address i32) (result v128) (v128.load16_splat offset=0 (local.get $$address))) + (func (export "v16x8.align1") (param $$address i32) (result v128) (v128.load16_splat align=1 (local.get $$address))) + (func (export "v16x8.offset1_align1") (param $$address i32) (result v128) (v128.load16_splat offset=1 align=1 (local.get $$address))) + (func (export "v16x8.offset2_align1") (param $$address i32) (result v128) (v128.load16_splat offset=2 align=1 (local.get $$address))) + (func (export "v16x8.offset15_align2") (param $$address i32) (result v128) (v128.load16_splat offset=15 align=2 (local.get $$address))) + + (func (export "v32x4.offset0") (param $$address i32) (result v128) (v128.load32_splat offset=0 (local.get $$address))) + (func (export "v32x4.align1") (param $$address i32) (result v128) (v128.load32_splat align=1 (local.get $$address))) + (func (export "v32x4.offset1_align1") (param $$address i32) (result v128) (v128.load32_splat offset=1 align=1 (local.get $$address))) + (func (export "v32x4.offset2_align2") (param $$address i32) (result v128) (v128.load32_splat offset=2 align=2 (local.get $$address))) + (func (export "v32x4.offset15_align4") (param $$address i32) (result v128) (v128.load32_splat offset=15 align=4 (local.get $$address))) + + (func (export "v64x2.offset0") (param $$address i32) (result v128) (v128.load64_splat offset=0 (local.get $$address))) + (func (export "v64x2.align1") (param $$address i32) (result v128) (v128.load64_splat align=1 (local.get $$address))) + (func (export "v64x2.offset1_align2") (param $$address i32) (result v128) (v128.load64_splat offset=1 align=2 (local.get $$address))) + (func (export "v64x2.offset2_align4") (param $$address i32) (result v128) (v128.load64_splat offset=2 align=4 (local.get $$address))) + (func (export "v64x2.offset15_align8") (param $$address i32) (result v128) (v128.load64_splat offset=15 align=8 (local.get $$address))) + + (func (export "v8x16.offset65536") (param $$address i32) (result v128) (v128.load8_splat offset=65536 (local.get $$address))) + (func (export "v16x8.offset65535") (param $$address i32) (result v128) (v128.load16_splat offset=65535 (local.get $$address))) + (func (export "v32x4.offset65533") (param $$address i32) (result v128) (v128.load32_splat offset=65533 (local.get $$address))) + (func (export "v64x2.offset65529") (param $$address i32) (result v128) (v128.load64_splat offset=65529 (local.get $$address))) +)`); + +// ./test/core/simd/simd_load_splat.wast:43 +assert_return( + () => invoke($0, `v128.load8_splat`, [0]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:44 +assert_return( + () => invoke($0, `v128.load8_splat`, [1]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:45 +assert_return( + () => invoke($0, `v128.load8_splat`, [2]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:46 +assert_return( + () => invoke($0, `v128.load8_splat`, [3]), + [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:47 +assert_return( + () => invoke($0, `v128.load8_splat`, [65535]), + [ + i8x16([0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:48 +assert_return( + () => invoke($0, `v128.load16_splat`, [4]), + [i16x8([0x504, 0x504, 0x504, 0x504, 0x504, 0x504, 0x504, 0x504])], +); + +// ./test/core/simd/simd_load_splat.wast:49 +assert_return( + () => invoke($0, `v128.load16_splat`, [5]), + [i16x8([0x605, 0x605, 0x605, 0x605, 0x605, 0x605, 0x605, 0x605])], +); + +// ./test/core/simd/simd_load_splat.wast:50 +assert_return( + () => invoke($0, `v128.load16_splat`, [6]), + [i16x8([0x706, 0x706, 0x706, 0x706, 0x706, 0x706, 0x706, 0x706])], +); + +// ./test/core/simd/simd_load_splat.wast:51 +assert_return( + () => invoke($0, `v128.load16_splat`, [7]), + [i16x8([0x807, 0x807, 0x807, 0x807, 0x807, 0x807, 0x807, 0x807])], +); + +// ./test/core/simd/simd_load_splat.wast:52 +assert_return( + () => invoke($0, `v128.load16_splat`, [65534]), + [i16x8([0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e])], +); + +// ./test/core/simd/simd_load_splat.wast:53 +assert_return( + () => invoke($0, `v128.load32_splat`, [8]), + [i32x4([0xb0a0908, 0xb0a0908, 0xb0a0908, 0xb0a0908])], +); + +// ./test/core/simd/simd_load_splat.wast:54 +assert_return( + () => invoke($0, `v128.load32_splat`, [9]), + [i32x4([0xc0b0a09, 0xc0b0a09, 0xc0b0a09, 0xc0b0a09])], +); + +// ./test/core/simd/simd_load_splat.wast:55 +assert_return( + () => invoke($0, `v128.load32_splat`, [10]), + [i32x4([0xd0c0b0a, 0xd0c0b0a, 0xd0c0b0a, 0xd0c0b0a])], +); + +// ./test/core/simd/simd_load_splat.wast:56 +assert_return( + () => invoke($0, `v128.load32_splat`, [11]), + [i32x4([0xe0d0c0b, 0xe0d0c0b, 0xe0d0c0b, 0xe0d0c0b])], +); + +// ./test/core/simd/simd_load_splat.wast:57 +assert_return( + () => invoke($0, `v128.load32_splat`, [65532]), + [i32x4([0x1f1e1d1c, 0x1f1e1d1c, 0x1f1e1d1c, 0x1f1e1d1c])], +); + +// ./test/core/simd/simd_load_splat.wast:58 +assert_return(() => invoke($0, `v128.load64_splat`, [12]), [i64x2([0xf0e0d0cn, 0xf0e0d0cn])]); + +// ./test/core/simd/simd_load_splat.wast:59 +assert_return(() => invoke($0, `v128.load64_splat`, [13]), [i64x2([0xf0e0dn, 0xf0e0dn])]); + +// ./test/core/simd/simd_load_splat.wast:60 +assert_return(() => invoke($0, `v128.load64_splat`, [14]), [i64x2([0xf0en, 0xf0en])]); + +// ./test/core/simd/simd_load_splat.wast:61 +assert_return(() => invoke($0, `v128.load64_splat`, [15]), [i64x2([0xfn, 0xfn])]); + +// ./test/core/simd/simd_load_splat.wast:62 +assert_return( + () => invoke($0, `v128.load64_splat`, [65528]), + [i64x2([0x1f1e1d1c1b1a1918n, 0x1f1e1d1c1b1a1918n])], +); + +// ./test/core/simd/simd_load_splat.wast:65 +assert_return( + () => invoke($0, `v8x16.offset0`, [0]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:66 +assert_return( + () => invoke($0, `v8x16.align1`, [0]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:67 +assert_return( + () => invoke($0, `v8x16.offset1_align1`, [0]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:68 +assert_return( + () => invoke($0, `v8x16.offset2_align1`, [0]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:69 +assert_return( + () => invoke($0, `v8x16.offset15_align1`, [0]), + [ + i8x16([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:70 +assert_return( + () => invoke($0, `v8x16.offset0`, [1]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:71 +assert_return( + () => invoke($0, `v8x16.align1`, [1]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:72 +assert_return( + () => invoke($0, `v8x16.offset1_align1`, [1]), + [ + i8x16([0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:73 +assert_return( + () => invoke($0, `v8x16.offset2_align1`, [1]), + [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:74 +assert_return( + () => invoke($0, `v8x16.offset15_align1`, [1]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:75 +assert_return( + () => invoke($0, `v8x16.offset0`, [65535]), + [ + i8x16([0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:76 +assert_return( + () => invoke($0, `v8x16.align1`, [65535]), + [ + i8x16([0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:78 +assert_return( + () => invoke($0, `v16x8.offset0`, [0]), + [i16x8([0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100])], +); + +// ./test/core/simd/simd_load_splat.wast:79 +assert_return( + () => invoke($0, `v16x8.align1`, [0]), + [i16x8([0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100])], +); + +// ./test/core/simd/simd_load_splat.wast:80 +assert_return( + () => invoke($0, `v16x8.offset1_align1`, [0]), + [i16x8([0x201, 0x201, 0x201, 0x201, 0x201, 0x201, 0x201, 0x201])], +); + +// ./test/core/simd/simd_load_splat.wast:81 +assert_return( + () => invoke($0, `v16x8.offset2_align1`, [0]), + [i16x8([0x302, 0x302, 0x302, 0x302, 0x302, 0x302, 0x302, 0x302])], +); + +// ./test/core/simd/simd_load_splat.wast:82 +assert_return( + () => invoke($0, `v16x8.offset15_align2`, [0]), + [i16x8([0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf])], +); + +// ./test/core/simd/simd_load_splat.wast:83 +assert_return( + () => invoke($0, `v16x8.offset0`, [1]), + [i16x8([0x201, 0x201, 0x201, 0x201, 0x201, 0x201, 0x201, 0x201])], +); + +// ./test/core/simd/simd_load_splat.wast:84 +assert_return( + () => invoke($0, `v16x8.align1`, [1]), + [i16x8([0x201, 0x201, 0x201, 0x201, 0x201, 0x201, 0x201, 0x201])], +); + +// ./test/core/simd/simd_load_splat.wast:85 +assert_return( + () => invoke($0, `v16x8.offset1_align1`, [1]), + [i16x8([0x302, 0x302, 0x302, 0x302, 0x302, 0x302, 0x302, 0x302])], +); + +// ./test/core/simd/simd_load_splat.wast:86 +assert_return( + () => invoke($0, `v16x8.offset2_align1`, [1]), + [i16x8([0x403, 0x403, 0x403, 0x403, 0x403, 0x403, 0x403, 0x403])], +); + +// ./test/core/simd/simd_load_splat.wast:87 +assert_return( + () => invoke($0, `v16x8.offset15_align2`, [1]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load_splat.wast:88 +assert_return( + () => invoke($0, `v16x8.offset0`, [65534]), + [i16x8([0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e])], +); + +// ./test/core/simd/simd_load_splat.wast:89 +assert_return( + () => invoke($0, `v16x8.align1`, [65534]), + [i16x8([0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e, 0x1f1e])], +); + +// ./test/core/simd/simd_load_splat.wast:91 +assert_return( + () => invoke($0, `v32x4.offset0`, [0]), + [i32x4([0x3020100, 0x3020100, 0x3020100, 0x3020100])], +); + +// ./test/core/simd/simd_load_splat.wast:92 +assert_return( + () => invoke($0, `v32x4.align1`, [0]), + [i32x4([0x3020100, 0x3020100, 0x3020100, 0x3020100])], +); + +// ./test/core/simd/simd_load_splat.wast:93 +assert_return( + () => invoke($0, `v32x4.offset1_align1`, [0]), + [i32x4([0x4030201, 0x4030201, 0x4030201, 0x4030201])], +); + +// ./test/core/simd/simd_load_splat.wast:94 +assert_return( + () => invoke($0, `v32x4.offset2_align2`, [0]), + [i32x4([0x5040302, 0x5040302, 0x5040302, 0x5040302])], +); + +// ./test/core/simd/simd_load_splat.wast:95 +assert_return(() => invoke($0, `v32x4.offset15_align4`, [0]), [i32x4([0xf, 0xf, 0xf, 0xf])]); + +// ./test/core/simd/simd_load_splat.wast:96 +assert_return( + () => invoke($0, `v32x4.offset0`, [1]), + [i32x4([0x4030201, 0x4030201, 0x4030201, 0x4030201])], +); + +// ./test/core/simd/simd_load_splat.wast:97 +assert_return( + () => invoke($0, `v32x4.align1`, [1]), + [i32x4([0x4030201, 0x4030201, 0x4030201, 0x4030201])], +); + +// ./test/core/simd/simd_load_splat.wast:98 +assert_return( + () => invoke($0, `v32x4.offset1_align1`, [1]), + [i32x4([0x5040302, 0x5040302, 0x5040302, 0x5040302])], +); + +// ./test/core/simd/simd_load_splat.wast:99 +assert_return( + () => invoke($0, `v32x4.offset2_align2`, [1]), + [i32x4([0x6050403, 0x6050403, 0x6050403, 0x6050403])], +); + +// ./test/core/simd/simd_load_splat.wast:100 +assert_return(() => invoke($0, `v32x4.offset15_align4`, [1]), [i32x4([0x0, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_load_splat.wast:101 +assert_return( + () => invoke($0, `v32x4.offset0`, [65532]), + [i32x4([0x1f1e1d1c, 0x1f1e1d1c, 0x1f1e1d1c, 0x1f1e1d1c])], +); + +// ./test/core/simd/simd_load_splat.wast:102 +assert_return( + () => invoke($0, `v32x4.align1`, [65532]), + [i32x4([0x1f1e1d1c, 0x1f1e1d1c, 0x1f1e1d1c, 0x1f1e1d1c])], +); + +// ./test/core/simd/simd_load_splat.wast:104 +assert_return(() => invoke($0, `v64x2.offset0`, [0]), [i64x2([0x706050403020100n, 0x706050403020100n])]); + +// ./test/core/simd/simd_load_splat.wast:105 +assert_return(() => invoke($0, `v64x2.align1`, [0]), [i64x2([0x706050403020100n, 0x706050403020100n])]); + +// ./test/core/simd/simd_load_splat.wast:106 +assert_return( + () => invoke($0, `v64x2.offset1_align2`, [0]), + [i64x2([0x807060504030201n, 0x807060504030201n])], +); + +// ./test/core/simd/simd_load_splat.wast:107 +assert_return( + () => invoke($0, `v64x2.offset2_align4`, [0]), + [i64x2([0x908070605040302n, 0x908070605040302n])], +); + +// ./test/core/simd/simd_load_splat.wast:108 +assert_return(() => invoke($0, `v64x2.offset15_align8`, [0]), [i64x2([0xfn, 0xfn])]); + +// ./test/core/simd/simd_load_splat.wast:109 +assert_return(() => invoke($0, `v64x2.offset0`, [1]), [i64x2([0x807060504030201n, 0x807060504030201n])]); + +// ./test/core/simd/simd_load_splat.wast:110 +assert_return(() => invoke($0, `v64x2.align1`, [1]), [i64x2([0x807060504030201n, 0x807060504030201n])]); + +// ./test/core/simd/simd_load_splat.wast:111 +assert_return( + () => invoke($0, `v64x2.offset1_align2`, [1]), + [i64x2([0x908070605040302n, 0x908070605040302n])], +); + +// ./test/core/simd/simd_load_splat.wast:112 +assert_return( + () => invoke($0, `v64x2.offset2_align4`, [1]), + [i64x2([0xa09080706050403n, 0xa09080706050403n])], +); + +// ./test/core/simd/simd_load_splat.wast:113 +assert_return(() => invoke($0, `v64x2.offset15_align8`, [1]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_load_splat.wast:114 +assert_return( + () => invoke($0, `v64x2.offset0`, [65528]), + [i64x2([0x1f1e1d1c1b1a1918n, 0x1f1e1d1c1b1a1918n])], +); + +// ./test/core/simd/simd_load_splat.wast:115 +assert_return( + () => invoke($0, `v64x2.align1`, [65528]), + [i64x2([0x1f1e1d1c1b1a1918n, 0x1f1e1d1c1b1a1918n])], +); + +// ./test/core/simd/simd_load_splat.wast:119 +assert_trap(() => invoke($0, `v128.load8_splat`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:120 +assert_trap(() => invoke($0, `v128.load16_splat`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:121 +assert_trap(() => invoke($0, `v128.load32_splat`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:122 +assert_trap(() => invoke($0, `v128.load64_splat`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:123 +assert_trap(() => invoke($0, `v128.load8_splat`, [65536]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:124 +assert_trap(() => invoke($0, `v128.load16_splat`, [65535]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:125 +assert_trap(() => invoke($0, `v128.load32_splat`, [65533]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:126 +assert_trap(() => invoke($0, `v128.load64_splat`, [65529]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:128 +assert_trap(() => invoke($0, `v8x16.offset1_align1`, [65535]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:129 +assert_trap(() => invoke($0, `v8x16.offset2_align1`, [65535]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:130 +assert_trap(() => invoke($0, `v8x16.offset15_align1`, [65535]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:131 +assert_trap(() => invoke($0, `v16x8.offset1_align1`, [65534]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:132 +assert_trap(() => invoke($0, `v16x8.offset2_align1`, [65534]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:133 +assert_trap(() => invoke($0, `v16x8.offset15_align2`, [65534]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:134 +assert_trap(() => invoke($0, `v32x4.offset1_align1`, [65532]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:135 +assert_trap(() => invoke($0, `v32x4.offset2_align2`, [65532]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:136 +assert_trap(() => invoke($0, `v32x4.offset15_align4`, [65532]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:137 +assert_trap(() => invoke($0, `v64x2.offset1_align2`, [65528]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:138 +assert_trap(() => invoke($0, `v64x2.offset2_align4`, [65528]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:139 +assert_trap(() => invoke($0, `v64x2.offset15_align8`, [65528]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:141 +assert_trap(() => invoke($0, `v8x16.offset1_align1`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:142 +assert_trap(() => invoke($0, `v16x8.offset1_align1`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:143 +assert_trap(() => invoke($0, `v32x4.offset1_align1`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:144 +assert_trap(() => invoke($0, `v64x2.offset1_align2`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:146 +assert_trap(() => invoke($0, `v8x16.offset65536`, [0]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:147 +assert_trap(() => invoke($0, `v16x8.offset65535`, [0]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:148 +assert_trap(() => invoke($0, `v32x4.offset65533`, [0]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:149 +assert_trap(() => invoke($0, `v64x2.offset65529`, [0]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:150 +assert_trap(() => invoke($0, `v8x16.offset65536`, [1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:151 +assert_trap(() => invoke($0, `v16x8.offset65535`, [1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:152 +assert_trap(() => invoke($0, `v32x4.offset65533`, [1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:153 +assert_trap(() => invoke($0, `v64x2.offset65529`, [1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_splat.wast:158 +let $1 = instantiate(`(module (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0A") + + (func (export "v128.load8_splat-in-block") (result v128) + (block (result v128) (block (result v128) (v128.load8_splat (i32.const 0)))) + ) + (func (export "v128.load16_splat-in-block") (result v128) + (block (result v128) (block (result v128) (v128.load16_splat (i32.const 1)))) + ) + (func (export "v128.load32_splat-in-block") (result v128) + (block (result v128) (block (result v128) (v128.load32_splat (i32.const 2)))) + ) + (func (export "v128.load64_splat-in-block") (result v128) + (block (result v128) (block (result v128) (v128.load64_splat (i32.const 9)))) + ) + (func (export "v128.load8_splat-as-br-value") (result v128) + (block (result v128) (br 0 (v128.load8_splat (i32.const 3)))) + ) + (func (export "v128.load16_splat-as-br-value") (result v128) + (block (result v128) (br 0 (v128.load16_splat (i32.const 4)))) + ) + (func (export "v128.load32_splat-as-br-value") (result v128) + (block (result v128) (br 0 (v128.load32_splat (i32.const 5)))) + ) + (func (export "v128.load64_splat-as-br-value") (result v128) + (block (result v128) (br 0 (v128.load64_splat (i32.const 10)))) + ) + (func (export "v128.load8_splat-extract_lane_s-operand") (result i32) + (i8x16.extract_lane_s 0 (v128.load8_splat (i32.const 6))) + ) + (func (export "v128.load16_splat-extract_lane_s-operand") (result i32) + (i8x16.extract_lane_s 0 (v128.load16_splat (i32.const 7))) + ) + (func (export "v128.load32_splat-extract_lane_s-operand") (result i32) + (i8x16.extract_lane_s 0 (v128.load32_splat (i32.const 8))) + ) + (func (export "v128.load64_splat-extract_lane_s-operand") (result i32) + (i8x16.extract_lane_s 0 (v128.load64_splat (i32.const 11))) + ) +)`); + +// ./test/core/simd/simd_load_splat.wast:198 +assert_return( + () => invoke($1, `v128.load8_splat-in-block`, []), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:199 +assert_return( + () => invoke($1, `v128.load16_splat-in-block`, []), + [i16x8([0x201, 0x201, 0x201, 0x201, 0x201, 0x201, 0x201, 0x201])], +); + +// ./test/core/simd/simd_load_splat.wast:200 +assert_return( + () => invoke($1, `v128.load32_splat-in-block`, []), + [i32x4([0x5040302, 0x5040302, 0x5040302, 0x5040302])], +); + +// ./test/core/simd/simd_load_splat.wast:201 +assert_return(() => invoke($1, `v128.load64_splat-in-block`, []), [i64x2([0xa09n, 0xa09n])]); + +// ./test/core/simd/simd_load_splat.wast:202 +assert_return( + () => invoke($1, `v128.load8_splat-as-br-value`, []), + [ + i8x16([0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3]), + ], +); + +// ./test/core/simd/simd_load_splat.wast:203 +assert_return( + () => invoke($1, `v128.load16_splat-as-br-value`, []), + [i16x8([0x504, 0x504, 0x504, 0x504, 0x504, 0x504, 0x504, 0x504])], +); + +// ./test/core/simd/simd_load_splat.wast:204 +assert_return( + () => invoke($1, `v128.load32_splat-as-br-value`, []), + [i32x4([0x8070605, 0x8070605, 0x8070605, 0x8070605])], +); + +// ./test/core/simd/simd_load_splat.wast:205 +assert_return(() => invoke($1, `v128.load64_splat-as-br-value`, []), [i64x2([0xan, 0xan])]); + +// ./test/core/simd/simd_load_splat.wast:206 +assert_return(() => invoke($1, `v128.load8_splat-extract_lane_s-operand`, []), [value("i32", 6)]); + +// ./test/core/simd/simd_load_splat.wast:207 +assert_return(() => invoke($1, `v128.load16_splat-extract_lane_s-operand`, []), [value("i32", 7)]); + +// ./test/core/simd/simd_load_splat.wast:208 +assert_return(() => invoke($1, `v128.load32_splat-extract_lane_s-operand`, []), [value("i32", 8)]); + +// ./test/core/simd/simd_load_splat.wast:209 +assert_return(() => invoke($1, `v128.load64_splat-extract_lane_s-operand`, []), [value("i32", 0)]); + +// ./test/core/simd/simd_load_splat.wast:214 +assert_invalid( + () => instantiate(`(module (memory 0) (func (result v128) (v128.load8_splat (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_splat.wast:215 +assert_invalid( + () => instantiate(`(module (memory 0) (func (result v128) (v128.load16_splat (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_splat.wast:216 +assert_invalid( + () => instantiate(`(module (memory 0) (func (result v128) (v128.load32_splat (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_splat.wast:217 +assert_invalid( + () => instantiate(`(module (memory 0) (func (result v128) (v128.load64_splat (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_splat.wast:222 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i8x16.load_splat (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_splat.wast:223 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i16x8.load_splat (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_splat.wast:224 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i32x4.load_splat (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_splat.wast:225 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i64x2.load_splat (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_splat.wast:230 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.load8_splat-arg-empty (result v128) + (v128.load8_splat) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_splat.wast:238 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.load16_splat-arg-empty (result v128) + (v128.load16_splat) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_splat.wast:246 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.load32_splat-arg-empty (result v128) + (v128.load32_splat) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_splat.wast:254 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.load64_splat-arg-empty (result v128) + (v128.load64_splat) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_load_zero.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load_zero.wast.js new file mode 100644 index 0000000000..00f6573b37 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_load_zero.wast.js @@ -0,0 +1,264 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_load_zero.wast + +// ./test/core/simd/simd_load_zero.wast:3 +let $0 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0A\\0B\\0C\\0D\\0E\\0F\\80\\81\\82\\83\\84\\85\\86\\87\\88\\89") + (data (i32.const 65520) "\\0A\\0B\\0C\\0D\\0E\\0F\\80\\81\\82\\83\\84\\85\\86\\87\\88\\89") + + (func (export "v128.load32_zero") (param $$0 i32) (result v128) + (v128.load32_zero (local.get $$0)) + ) + (func (export "v128.load64_zero") (param $$0 i32) (result v128) + (v128.load64_zero (local.get $$0)) + ) + + ;; load by a constant amount + (func (export "v128.load32_zero_const0") (result v128) + (v128.load32_zero (i32.const 0)) + ) + (func (export "v128.load64_zero_const8") (result v128) + (v128.load64_zero (i32.const 8)) + ) + + ;; load data with different offset/align arguments + ;; i16x8 + (func (export "v128.load32_zero_offset0") (param $$0 i32) (result v128) + (v128.load32_zero offset=0 (local.get $$0)) + ) + (func (export "v128.load32_zero_align1") (param $$0 i32) (result v128) + (v128.load32_zero align=1 (local.get $$0)) + ) + (func (export "v128.load32_zero_offset0_align1") (param $$0 i32) (result v128) + (v128.load32_zero offset=0 align=1 (local.get $$0)) + ) + (func (export "v128.load32_zero_offset1_align1") (param $$0 i32) (result v128) + (v128.load32_zero offset=1 align=1 (local.get $$0)) + ) + (func (export "v128.load32_zero_offset10_align4") (param $$0 i32) (result v128) + (v128.load32_zero offset=10 align=4 (local.get $$0)) + ) + (func (export "v128.load64_zero_offset0") (param $$0 i32) (result v128) + (v128.load64_zero offset=0 (local.get $$0)) + ) + (func (export "v128.load64_zero_align1") (param $$0 i32) (result v128) + (v128.load64_zero align=1 (local.get $$0)) + ) + (func (export "v128.load64_zero_offset0_align1") (param $$0 i32) (result v128) + (v128.load64_zero offset=0 align=1 (local.get $$0)) + ) + (func (export "v128.load64_zero_offset1_align1") (param $$0 i32) (result v128) + (v128.load64_zero offset=1 align=1 (local.get $$0)) + ) + (func (export "v128.load64_zero_offset10_align4") (param $$0 i32) (result v128) + (v128.load64_zero offset=10 align=4 (local.get $$0)) + ) + (func (export "v128.load64_zero_offset20_align8") (param $$0 i32) (result v128) + (v128.load64_zero offset=20 align=8 (local.get $$0)) + ) +)`); + +// ./test/core/simd/simd_load_zero.wast:62 +assert_return(() => invoke($0, `v128.load32_zero`, [0]), [i32x4([0x3020100, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_load_zero.wast:63 +assert_return(() => invoke($0, `v128.load64_zero`, [0]), [i64x2([0x706050403020100n, 0x0n])]); + +// ./test/core/simd/simd_load_zero.wast:64 +assert_return(() => invoke($0, `v128.load32_zero`, [10]), [i32x4([0xd0c0b0a, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_load_zero.wast:65 +assert_return(() => invoke($0, `v128.load64_zero`, [10]), [i64x2([0x81800f0e0d0c0b0an, 0x0n])]); + +// ./test/core/simd/simd_load_zero.wast:66 +assert_return(() => invoke($0, `v128.load32_zero`, [20]), [i32x4([0x87868584, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_load_zero.wast:67 +assert_return(() => invoke($0, `v128.load64_zero`, [20]), [i64x2([0x898887868584n, 0x0n])]); + +// ./test/core/simd/simd_load_zero.wast:70 +assert_return(() => invoke($0, `v128.load32_zero_const0`, []), [i32x4([0x3020100, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_load_zero.wast:71 +assert_return(() => invoke($0, `v128.load64_zero_const8`, []), [i64x2([0xf0e0d0c0b0a0908n, 0x0n])]); + +// ./test/core/simd/simd_load_zero.wast:75 +assert_return(() => invoke($0, `v128.load32_zero_offset0`, [0]), [i32x4([0x3020100, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_load_zero.wast:76 +assert_return(() => invoke($0, `v128.load32_zero_align1`, [1]), [i32x4([0x4030201, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_load_zero.wast:77 +assert_return( + () => invoke($0, `v128.load32_zero_offset0_align1`, [2]), + [i32x4([0x5040302, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load_zero.wast:78 +assert_return( + () => invoke($0, `v128.load32_zero_offset10_align4`, [3]), + [i32x4([0x800f0e0d, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_load_zero.wast:81 +assert_return(() => invoke($0, `v128.load64_zero_offset0`, [0]), [i64x2([0x706050403020100n, 0x0n])]); + +// ./test/core/simd/simd_load_zero.wast:82 +assert_return(() => invoke($0, `v128.load64_zero_align1`, [1]), [i64x2([0x807060504030201n, 0x0n])]); + +// ./test/core/simd/simd_load_zero.wast:83 +assert_return( + () => invoke($0, `v128.load64_zero_offset0_align1`, [2]), + [i64x2([0x908070605040302n, 0x0n])], +); + +// ./test/core/simd/simd_load_zero.wast:84 +assert_return( + () => invoke($0, `v128.load64_zero_offset10_align4`, [3]), + [i64x2([0x84838281800f0e0dn, 0x0n])], +); + +// ./test/core/simd/simd_load_zero.wast:85 +assert_return(() => invoke($0, `v128.load64_zero_offset20_align8`, [4]), [i64x2([0x8988n, 0x0n])]); + +// ./test/core/simd/simd_load_zero.wast:88 +assert_trap(() => invoke($0, `v128.load32_zero`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_zero.wast:89 +assert_trap(() => invoke($0, `v128.load64_zero`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_zero.wast:91 +assert_trap(() => invoke($0, `v128.load32_zero_offset1_align1`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_zero.wast:92 +assert_trap(() => invoke($0, `v128.load64_zero_offset1_align1`, [-1]), `out of bounds memory access`); + +// ./test/core/simd/simd_load_zero.wast:95 +assert_invalid( + () => instantiate(`(module (memory 0) (func (result v128) (v128.load32_zero (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_zero.wast:96 +assert_invalid( + () => instantiate(`(module (memory 0) (func (result v128) (v128.load64_zero (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_zero.wast:100 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.load32_zero-arg-empty (result v128) + (v128.load32_zero) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_zero.wast:108 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.load64_zero-arg-empty (result v128) + (v128.load64_zero) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_load_zero.wast:119 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i16x8.load16x4_s (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_zero.wast:120 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i16x8.load16x4_u (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_zero.wast:121 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i32x4.load32x2_s (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_zero.wast:122 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i32x4.load32x2_u (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_zero.wast:123 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i64x2.load64x1_s (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_zero.wast:124 +assert_malformed( + () => instantiate(`(memory 1) (func (drop (i64x2.load64x1_u (i32.const 0)))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_load_zero.wast:127 +let $1 = instantiate(`(module + (memory 1) + (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0A\\0B\\0C\\0D\\0E\\0F\\80\\81\\82\\83\\84\\85\\86\\87\\88\\89") + (func (export "v128.load32_zero-in-block") (result v128) + (block (result v128) (block (result v128) (v128.load32_zero (i32.const 0)))) + ) + (func (export "v128.load64_zero-in-block") (result v128) + (block (result v128) (block (result v128) (v128.load64_zero (i32.const 1)))) + ) + (func (export "v128.load32_zero-as-br-value") (result v128) + (block (result v128) (br 0 (v128.load32_zero (i32.const 6)))) + ) + (func (export "v128.load64_zero-as-br-value") (result v128) + (block (result v128) (br 0 (v128.load64_zero (i32.const 7)))) + ) + (func (export "v128.load32_zero-extract_lane_s-operand") (result i32) + (i32x4.extract_lane 0 (v128.load32_zero (i32.const 12))) + ) + (func (export "v128.load64_zero-extract_lane_s-operand") (result i64) + (i64x2.extract_lane 0 (v128.load64_zero (i32.const 13))) + ) +)`); + +// ./test/core/simd/simd_load_zero.wast:149 +assert_return(() => invoke($1, `v128.load32_zero-in-block`, []), [i32x4([0x3020100, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_load_zero.wast:150 +assert_return(() => invoke($1, `v128.load64_zero-in-block`, []), [i64x2([0x807060504030201n, 0x0n])]); + +// ./test/core/simd/simd_load_zero.wast:151 +assert_return(() => invoke($1, `v128.load32_zero-as-br-value`, []), [i32x4([0x9080706, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_load_zero.wast:152 +assert_return(() => invoke($1, `v128.load64_zero-as-br-value`, []), [i64x2([0xe0d0c0b0a090807n, 0x0n])]); + +// ./test/core/simd/simd_load_zero.wast:153 +assert_return(() => invoke($1, `v128.load32_zero-extract_lane_s-operand`, []), [value("i32", 252579084)]); + +// ./test/core/simd/simd_load_zero.wast:154 +assert_return( + () => invoke($1, `v128.load64_zero-extract_lane_s-operand`, []), + [value("i64", -8898124946043105779n)], +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_splat.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_splat.wast.js new file mode 100644 index 0000000000..466e9ea901 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_splat.wast.js @@ -0,0 +1,1607 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_splat.wast + +// ./test/core/simd/simd_splat.wast:3 +let $0 = instantiate(`(module + (func (export "i8x16.splat") (param i32) (result v128) (i8x16.splat (local.get 0))) + (func (export "i16x8.splat") (param i32) (result v128) (i16x8.splat (local.get 0))) + (func (export "i32x4.splat") (param i32) (result v128) (i32x4.splat (local.get 0))) + (func (export "f32x4.splat") (param f32) (result v128) (f32x4.splat (local.get 0))) + (func (export "i64x2.splat") (param i64) (result v128) (i64x2.splat (local.get 0))) + (func (export "f64x2.splat") (param f64) (result v128) (f64x2.splat (local.get 0))) +)`); + +// ./test/core/simd/simd_splat.wast:12 +assert_return( + () => invoke($0, `i8x16.splat`, [0]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_splat.wast:13 +assert_return( + () => invoke($0, `i8x16.splat`, [5]), + [ + i8x16([0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5]), + ], +); + +// ./test/core/simd/simd_splat.wast:14 +assert_return( + () => invoke($0, `i8x16.splat`, [-5]), + [ + i8x16([0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb]), + ], +); + +// ./test/core/simd/simd_splat.wast:15 +assert_return( + () => invoke($0, `i8x16.splat`, [257]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_splat.wast:16 +assert_return( + () => invoke($0, `i8x16.splat`, [255]), + [ + i8x16([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + ], +); + +// ./test/core/simd/simd_splat.wast:17 +assert_return( + () => invoke($0, `i8x16.splat`, [-128]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_splat.wast:18 +assert_return( + () => invoke($0, `i8x16.splat`, [127]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_splat.wast:19 +assert_return( + () => invoke($0, `i8x16.splat`, [-129]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_splat.wast:20 +assert_return( + () => invoke($0, `i8x16.splat`, [128]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_splat.wast:21 +assert_return( + () => invoke($0, `i8x16.splat`, [65407]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_splat.wast:22 +assert_return( + () => invoke($0, `i8x16.splat`, [128]), + [ + i8x16([0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80]), + ], +); + +// ./test/core/simd/simd_splat.wast:23 +assert_return( + () => invoke($0, `i8x16.splat`, [171]), + [i32x4([0xabababab, 0xabababab, 0xabababab, 0xabababab])], +); + +// ./test/core/simd/simd_splat.wast:25 +assert_return(() => invoke($0, `i16x8.splat`, [0]), [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_splat.wast:26 +assert_return(() => invoke($0, `i16x8.splat`, [5]), [i16x8([0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5, 0x5])]); + +// ./test/core/simd/simd_splat.wast:27 +assert_return( + () => invoke($0, `i16x8.splat`, [-5]), + [i16x8([0xfffb, 0xfffb, 0xfffb, 0xfffb, 0xfffb, 0xfffb, 0xfffb, 0xfffb])], +); + +// ./test/core/simd/simd_splat.wast:28 +assert_return( + () => invoke($0, `i16x8.splat`, [65537]), + [i16x8([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_splat.wast:29 +assert_return( + () => invoke($0, `i16x8.splat`, [65535]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_splat.wast:30 +assert_return( + () => invoke($0, `i16x8.splat`, [-32768]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_splat.wast:31 +assert_return( + () => invoke($0, `i16x8.splat`, [32767]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_splat.wast:32 +assert_return( + () => invoke($0, `i16x8.splat`, [-32769]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_splat.wast:33 +assert_return( + () => invoke($0, `i16x8.splat`, [32768]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_splat.wast:34 +assert_return( + () => invoke($0, `i16x8.splat`, [-32769]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_splat.wast:35 +assert_return( + () => invoke($0, `i16x8.splat`, [32768]), + [i16x8([0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000])], +); + +// ./test/core/simd/simd_splat.wast:36 +assert_return( + () => invoke($0, `i16x8.splat`, [43981]), + [i32x4([0xabcdabcd, 0xabcdabcd, 0xabcdabcd, 0xabcdabcd])], +); + +// ./test/core/simd/simd_splat.wast:37 +assert_return( + () => invoke($0, `i16x8.splat`, [12345]), + [i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039])], +); + +// ./test/core/simd/simd_splat.wast:38 +assert_return( + () => invoke($0, `i16x8.splat`, [4660]), + [i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234])], +); + +// ./test/core/simd/simd_splat.wast:40 +assert_return(() => invoke($0, `i32x4.splat`, [0]), [i32x4([0x0, 0x0, 0x0, 0x0])]); + +// ./test/core/simd/simd_splat.wast:41 +assert_return(() => invoke($0, `i32x4.splat`, [5]), [i32x4([0x5, 0x5, 0x5, 0x5])]); + +// ./test/core/simd/simd_splat.wast:42 +assert_return( + () => invoke($0, `i32x4.splat`, [-5]), + [i32x4([0xfffffffb, 0xfffffffb, 0xfffffffb, 0xfffffffb])], +); + +// ./test/core/simd/simd_splat.wast:43 +assert_return( + () => invoke($0, `i32x4.splat`, [-1]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_splat.wast:44 +assert_return( + () => invoke($0, `i32x4.splat`, [-1]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_splat.wast:45 +assert_return( + () => invoke($0, `i32x4.splat`, [-2147483648]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_splat.wast:46 +assert_return( + () => invoke($0, `i32x4.splat`, [2147483647]), + [i32x4([0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff])], +); + +// ./test/core/simd/simd_splat.wast:47 +assert_return( + () => invoke($0, `i32x4.splat`, [-2147483648]), + [i32x4([0x80000000, 0x80000000, 0x80000000, 0x80000000])], +); + +// ./test/core/simd/simd_splat.wast:48 +assert_return( + () => invoke($0, `i32x4.splat`, [1234567890]), + [i32x4([0x499602d2, 0x499602d2, 0x499602d2, 0x499602d2])], +); + +// ./test/core/simd/simd_splat.wast:49 +assert_return( + () => invoke($0, `i32x4.splat`, [305419896]), + [i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678])], +); + +// ./test/core/simd/simd_splat.wast:51 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", 0)]), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 0), + value("f32", 0), + value("f32", 0), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:52 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", 1.1)]), + [ + new F32x4Pattern( + value("f32", 1.1), + value("f32", 1.1), + value("f32", 1.1), + value("f32", 1.1), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:53 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", -1.1)]), + [ + new F32x4Pattern( + value("f32", -1.1), + value("f32", -1.1), + value("f32", -1.1), + value("f32", -1.1), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:54 +assert_return( + () => invoke($0, `f32x4.splat`, [ + value("f32", 100000000000000000000000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", 100000000000000000000000000000000000000), + value("f32", 100000000000000000000000000000000000000), + value("f32", 100000000000000000000000000000000000000), + value("f32", 100000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:55 +assert_return( + () => invoke($0, `f32x4.splat`, [ + value("f32", -100000000000000000000000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", -100000000000000000000000000000000000000), + value("f32", -100000000000000000000000000000000000000), + value("f32", -100000000000000000000000000000000000000), + value("f32", -100000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:56 +assert_return( + () => invoke($0, `f32x4.splat`, [ + value("f32", 340282350000000000000000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + value("f32", 340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:57 +assert_return( + () => invoke($0, `f32x4.splat`, [ + value("f32", -340282350000000000000000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + value("f32", -340282350000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:58 +assert_return( + () => invoke($0, `f32x4.splat`, [ + value("f32", 170141180000000000000000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", 170141180000000000000000000000000000000), + value("f32", 170141180000000000000000000000000000000), + value("f32", 170141180000000000000000000000000000000), + value("f32", 170141180000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:59 +assert_return( + () => invoke($0, `f32x4.splat`, [ + value("f32", -170141180000000000000000000000000000000), + ]), + [ + new F32x4Pattern( + value("f32", -170141180000000000000000000000000000000), + value("f32", -170141180000000000000000000000000000000), + value("f32", -170141180000000000000000000000000000000), + value("f32", -170141180000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:60 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", Infinity)]), + [ + new F32x4Pattern( + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + value("f32", Infinity), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:61 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", -Infinity)]), + [ + new F32x4Pattern( + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + value("f32", -Infinity), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:62 +assert_return( + () => invoke($0, `f32x4.splat`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + [ + new F32x4Pattern( + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:63 +assert_return( + () => invoke($0, `f32x4.splat`, [bytes("f32", [0x1, 0x0, 0x80, 0x7f])]), + [ + new F32x4Pattern( + bytes("f32", [0x1, 0x0, 0x80, 0x7f]), + bytes("f32", [0x1, 0x0, 0x80, 0x7f]), + bytes("f32", [0x1, 0x0, 0x80, 0x7f]), + bytes("f32", [0x1, 0x0, 0x80, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:64 +assert_return( + () => invoke($0, `f32x4.splat`, [bytes("f32", [0xff, 0xff, 0xff, 0x7f])]), + [ + new F32x4Pattern( + bytes("f32", [0xff, 0xff, 0xff, 0x7f]), + bytes("f32", [0xff, 0xff, 0xff, 0x7f]), + bytes("f32", [0xff, 0xff, 0xff, 0x7f]), + bytes("f32", [0xff, 0xff, 0xff, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:65 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", 123456790)]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:66 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", 123456790)]), + [ + new F32x4Pattern( + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + value("f32", 123456790), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:67 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", 81985530000000000)]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:68 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", 81985530000000000)]), + [ + new F32x4Pattern( + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + value("f32", 81985530000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:69 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", 1234567900000000000000000000)]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:70 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", 1234567900000000000000000000)]), + [ + new F32x4Pattern( + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + value("f32", 1234567900000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:71 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", 42984030000000000000000)]), + [ + new F32x4Pattern( + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + value("f32", 42984030000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:72 +assert_return( + () => invoke($0, `f32x4.splat`, [value("f32", 156374990000)]), + [ + new F32x4Pattern( + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + value("f32", 156374990000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:74 +assert_return(() => invoke($0, `i64x2.splat`, [0n]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_splat.wast:75 +assert_return(() => invoke($0, `i64x2.splat`, [0n]), [i64x2([0x0n, 0x0n])]); + +// ./test/core/simd/simd_splat.wast:76 +assert_return(() => invoke($0, `i64x2.splat`, [1n]), [i64x2([0x1n, 0x1n])]); + +// ./test/core/simd/simd_splat.wast:77 +assert_return( + () => invoke($0, `i64x2.splat`, [-1n]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_splat.wast:78 +assert_return( + () => invoke($0, `i64x2.splat`, [-9223372036854775808n]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_splat.wast:79 +assert_return( + () => invoke($0, `i64x2.splat`, [-9223372036854775808n]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_splat.wast:80 +assert_return( + () => invoke($0, `i64x2.splat`, [9223372036854775807n]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_splat.wast:81 +assert_return( + () => invoke($0, `i64x2.splat`, [-1n]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_splat.wast:82 +assert_return( + () => invoke($0, `i64x2.splat`, [9223372036854775807n]), + [i64x2([0x7fffffffffffffffn, 0x7fffffffffffffffn])], +); + +// ./test/core/simd/simd_splat.wast:83 +assert_return( + () => invoke($0, `i64x2.splat`, [-1n]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_splat.wast:84 +assert_return( + () => invoke($0, `i64x2.splat`, [-9223372036854775808n]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_splat.wast:85 +assert_return( + () => invoke($0, `i64x2.splat`, [-9223372036854775808n]), + [i64x2([0x8000000000000000n, 0x8000000000000000n])], +); + +// ./test/core/simd/simd_splat.wast:86 +assert_return( + () => invoke($0, `i64x2.splat`, [1234567890123456789n]), + [i64x2([0x112210f47de98115n, 0x112210f47de98115n])], +); + +// ./test/core/simd/simd_splat.wast:87 +assert_return( + () => invoke($0, `i64x2.splat`, [1311768467294899695n]), + [i64x2([0x1234567890abcdefn, 0x1234567890abcdefn])], +); + +// ./test/core/simd/simd_splat.wast:89 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 0)]), + [new F64x2Pattern(value("f64", 0), value("f64", 0))], +); + +// ./test/core/simd/simd_splat.wast:90 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", -0)]), + [new F64x2Pattern(value("f64", -0), value("f64", -0))], +); + +// ./test/core/simd/simd_splat.wast:91 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 1.1)]), + [new F64x2Pattern(value("f64", 1.1), value("f64", 1.1))], +); + +// ./test/core/simd/simd_splat.wast:92 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", -1.1)]), + [new F64x2Pattern(value("f64", -1.1), value("f64", -1.1))], +); + +// ./test/core/simd/simd_splat.wast:93 +assert_return( + () => invoke($0, `f64x2.splat`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:94 +assert_return( + () => invoke($0, `f64x2.splat`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:95 +assert_return( + () => invoke($0, `f64x2.splat`, [ + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + new F64x2Pattern( + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:96 +assert_return( + () => invoke($0, `f64x2.splat`, [ + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ]), + [ + new F64x2Pattern( + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + value("f64", -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:97 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 0.5)]), + [new F64x2Pattern(value("f64", 0.5), value("f64", 0.5))], +); + +// ./test/core/simd/simd_splat.wast:98 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", -0.5)]), + [new F64x2Pattern(value("f64", -0.5), value("f64", -0.5))], +); + +// ./test/core/simd/simd_splat.wast:99 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 1)]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_splat.wast:100 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", -1)]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_splat.wast:101 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 6.283185307179586)]), + [ + new F64x2Pattern( + value("f64", 6.283185307179586), + value("f64", 6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:102 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", -6.283185307179586)]), + [ + new F64x2Pattern( + value("f64", -6.283185307179586), + value("f64", -6.283185307179586), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:103 +assert_return( + () => invoke($0, `f64x2.splat`, [ + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + new F64x2Pattern( + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:104 +assert_return( + () => invoke($0, `f64x2.splat`, [ + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ]), + [ + new F64x2Pattern( + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + value("f64", -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:105 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", Infinity)]), + [new F64x2Pattern(value("f64", Infinity), value("f64", Infinity))], +); + +// ./test/core/simd/simd_splat.wast:106 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", -Infinity)]), + [new F64x2Pattern(value("f64", -Infinity), value("f64", -Infinity))], +); + +// ./test/core/simd/simd_splat.wast:107 +assert_return( + () => invoke($0, `f64x2.splat`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:108 +assert_return( + () => invoke($0, `f64x2.splat`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:109 +assert_return( + () => invoke($0, `f64x2.splat`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:110 +assert_return( + () => invoke($0, `f64x2.splat`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ]), + [ + new F64x2Pattern( + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:111 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 123456789)]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_splat.wast:112 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 123456789)]), + [new F64x2Pattern(value("f64", 123456789), value("f64", 123456789))], +); + +// ./test/core/simd/simd_splat.wast:113 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 1375488932539311400000000)]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:114 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 1375488932539311400000000)]), + [ + new F64x2Pattern( + value("f64", 1375488932539311400000000), + value("f64", 1375488932539311400000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:115 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 1234567890000000000000000000)]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:116 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 1234567890000000000000000000)]), + [ + new F64x2Pattern( + value("f64", 1234567890000000000000000000), + value("f64", 1234567890000000000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:117 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 721152341463170500000000000000)]), + [ + new F64x2Pattern( + value("f64", 721152341463170500000000000000), + value("f64", 721152341463170500000000000000), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:118 +assert_return( + () => invoke($0, `f64x2.splat`, [value("f64", 2623536934927580700)]), + [ + new F64x2Pattern( + value("f64", 2623536934927580700), + value("f64", 2623536934927580700), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:122 +assert_malformed( + () => instantiate(`(func (result v128) (v128.splat (i32.const 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_splat.wast:127 +assert_invalid( + () => instantiate(`(module (func (result v128) i8x16.splat (i64.const 0)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:128 +assert_invalid( + () => instantiate(`(module (func (result v128) i8x16.splat (f32.const 0.0)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:129 +assert_invalid( + () => instantiate(`(module (func (result v128) i8x16.splat (f64.const 0.0)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:130 +assert_invalid( + () => instantiate(`(module (func (result v128) i16x8.splat (i64.const 1)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:131 +assert_invalid( + () => instantiate(`(module (func (result v128) i16x8.splat (f32.const 1.0)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:132 +assert_invalid( + () => instantiate(`(module (func (result v128) i16x8.splat (f64.const 1.0)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:133 +assert_invalid( + () => instantiate(`(module (func (result v128) i32x4.splat (i64.const 2)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:134 +assert_invalid( + () => instantiate(`(module (func (result v128) i32x4.splat (f32.const 2.0)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:135 +assert_invalid( + () => instantiate(`(module (func (result v128) i32x4.splat (f64.const 2.0)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:136 +assert_invalid( + () => instantiate(`(module (func (result v128) f32x4.splat (i32.const 4)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:137 +assert_invalid( + () => instantiate(`(module (func (result v128) f32x4.splat (i64.const 4)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:138 +assert_invalid( + () => instantiate(`(module (func (result v128) f32x4.splat (f64.const 4.0)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:139 +assert_invalid( + () => instantiate(`(module (func (result v128) i64x2.splat (i32.const 0)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:140 +assert_invalid( + () => instantiate(`(module (func (result v128) i64x2.splat (f64.const 0.0)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:141 +assert_invalid( + () => instantiate(`(module (func (result v128) f64x2.splat (i32.const 0)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:142 +assert_invalid( + () => instantiate(`(module (func (result v128) f64x2.splat (f32.const 0.0)))`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:148 +let $1 = instantiate(`(module (memory 1) + (func (export "as-v128_store-operand-1") (param i32) (result v128) + (v128.store (i32.const 0) (i8x16.splat (local.get 0))) + (v128.load (i32.const 0))) + (func (export "as-v128_store-operand-2") (param i32) (result v128) + (v128.store (i32.const 0) (i16x8.splat (local.get 0))) + (v128.load (i32.const 0))) + (func (export "as-v128_store-operand-3") (param i32) (result v128) + (v128.store (i32.const 0) (i32x4.splat (local.get 0))) + (v128.load (i32.const 0))) + (func (export "as-v128_store-operand-4") (param i64) (result v128) + (v128.store (i32.const 0) (i64x2.splat (local.get 0))) + (v128.load (i32.const 0))) + (func (export "as-v128_store-operand-5") (param f64) (result v128) + (v128.store (i32.const 0) (f64x2.splat (local.get 0))) + (v128.load (i32.const 0))) +)`); + +// ./test/core/simd/simd_splat.wast:166 +assert_return( + () => invoke($1, `as-v128_store-operand-1`, [1]), + [ + i8x16([0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1]), + ], +); + +// ./test/core/simd/simd_splat.wast:167 +assert_return( + () => invoke($1, `as-v128_store-operand-2`, [256]), + [i16x8([0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100])], +); + +// ./test/core/simd/simd_splat.wast:168 +assert_return( + () => invoke($1, `as-v128_store-operand-3`, [-1]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_splat.wast:169 +assert_return(() => invoke($1, `as-v128_store-operand-4`, [1n]), [i64x2([0x1n, 0x1n])]); + +// ./test/core/simd/simd_splat.wast:170 +assert_return( + () => invoke($1, `as-v128_store-operand-5`, [value("f64", -1)]), + [new F64x2Pattern(value("f64", -1), value("f64", -1))], +); + +// ./test/core/simd/simd_splat.wast:172 +let $2 = instantiate(`(module + ;; Accessing lane + (func (export "as-i8x16_extract_lane_s-operand-first") (param i32) (result i32) + (i8x16.extract_lane_s 0 (i8x16.splat (local.get 0)))) + (func (export "as-i8x16_extract_lane_s-operand-last") (param i32) (result i32) + (i8x16.extract_lane_s 15 (i8x16.splat (local.get 0)))) + (func (export "as-i16x8_extract_lane_s-operand-first") (param i32) (result i32) + (i16x8.extract_lane_s 0 (i16x8.splat (local.get 0)))) + (func (export "as-i16x8_extract_lane_s-operand-last") (param i32) (result i32) + (i16x8.extract_lane_s 7 (i16x8.splat (local.get 0)))) + (func (export "as-i32x4_extract_lane_s-operand-first") (param i32) (result i32) + (i32x4.extract_lane 0 (i32x4.splat (local.get 0)))) + (func (export "as-i32x4_extract_lane_s-operand-last") (param i32) (result i32) + (i32x4.extract_lane 3 (i32x4.splat (local.get 0)))) + (func (export "as-f32x4_extract_lane_s-operand-first") (param f32) (result f32) + (f32x4.extract_lane 0 (f32x4.splat (local.get 0)))) + (func (export "as-f32x4_extract_lane_s-operand-last") (param f32) (result f32) + (f32x4.extract_lane 3 (f32x4.splat (local.get 0)))) + (func (export "as-v8x16_swizzle-operands") (param i32) (param i32) (result v128) + (i8x16.swizzle (i8x16.splat (local.get 0)) (i8x16.splat (local.get 1)))) + (func (export "as-i64x2_extract_lane-operand-first") (param i64) (result i64) + (i64x2.extract_lane 0 (i64x2.splat (local.get 0)))) + (func (export "as-i64x2_extract_lane-operand-last") (param i64) (result i64) + (i64x2.extract_lane 1 (i64x2.splat (local.get 0)))) + (func (export "as-f64x2_extract_lane-operand-first") (param f64) (result f64) + (f64x2.extract_lane 0 (f64x2.splat (local.get 0)))) + (func (export "as-f64x2_extract_lane-operand-last") (param f64) (result f64) + (f64x2.extract_lane 1 (f64x2.splat (local.get 0)))) + + ;; Integer arithmetic + (func (export "as-i8x16_add_sub-operands") (param i32 i32 i32) (result v128) + (i8x16.add (i8x16.splat (local.get 0)) + (i8x16.sub (i8x16.splat (local.get 1)) (i8x16.splat (local.get 2))))) + (func (export "as-i16x8_add_sub_mul-operands") (param i32 i32 i32 i32) (result v128) + (i16x8.add (i16x8.splat (local.get 0)) + (i16x8.sub (i16x8.splat (local.get 1)) + (i16x8.mul (i16x8.splat (local.get 2)) (i16x8.splat (local.get 3)))))) + (func (export "as-i32x4_add_sub_mul-operands") (param i32 i32 i32 i32) (result v128) + (i32x4.add (i32x4.splat (local.get 0)) + (i32x4.sub (i32x4.splat (local.get 1)) + (i32x4.mul (i32x4.splat (local.get 2)) (i32x4.splat (local.get 3)))))) + + (func (export "as-i64x2_add_sub_mul-operands") (param i64 i64 i64 i64) (result v128) + (i64x2.add (i64x2.splat (local.get 0)) + (i64x2.sub (i64x2.splat (local.get 1)) + (i64x2.mul (i64x2.splat (local.get 2)) (i64x2.splat (local.get 3)))))) + (func (export "as-f64x2_add_sub_mul-operands") (param f64 f64 f64 f64) (result v128) + (f64x2.add (f64x2.splat (local.get 0)) + (f64x2.sub (f64x2.splat (local.get 1)) + (f64x2.mul (f64x2.splat (local.get 2)) (f64x2.splat (local.get 3)))))) + + ;; Saturating integer arithmetic + (func (export "as-i8x16_add_sat_s-operands") (param i32 i32) (result v128) + (i8x16.add_sat_s (i8x16.splat (local.get 0)) (i8x16.splat (local.get 1)))) + (func (export "as-i16x8_add_sat_s-operands") (param i32 i32) (result v128) + (i16x8.add_sat_s (i16x8.splat (local.get 0)) (i16x8.splat (local.get 1)))) + (func (export "as-i8x16_sub_sat_u-operands") (param i32 i32) (result v128) + (i8x16.sub_sat_u (i8x16.splat (local.get 0)) (i8x16.splat (local.get 1)))) + (func (export "as-i16x8_sub_sat_u-operands") (param i32 i32) (result v128) + (i16x8.sub_sat_u (i16x8.splat (local.get 0)) (i16x8.splat (local.get 1)))) + + ;; Bit shifts + (func (export "as-i8x16_shr_s-operand") (param i32 i32) (result v128) + (i8x16.shr_s (i8x16.splat (local.get 0)) (local.get 1))) + (func (export "as-i16x8_shr_s-operand") (param i32 i32) (result v128) + (i16x8.shr_s (i16x8.splat (local.get 0)) (local.get 1))) + (func (export "as-i32x4_shr_s-operand") (param i32 i32) (result v128) + (i32x4.shr_s (i32x4.splat (local.get 0)) (local.get 1))) + + ;; Bitwise operantions + (func (export "as-v128_and-operands") (param i32 i32) (result v128) + (v128.and (i8x16.splat (local.get 0)) (i8x16.splat (local.get 1)))) + (func (export "as-v128_or-operands") (param i32 i32) (result v128) + (v128.or (i16x8.splat (local.get 0)) (i16x8.splat (local.get 1)))) + (func (export "as-v128_xor-operands") (param i32 i32) (result v128) + (v128.xor (i32x4.splat (local.get 0)) (i32x4.splat (local.get 1)))) + + ;; Boolean horizontal reductions + (func (export "as-i8x16_all_true-operand") (param i32) (result i32) + (i8x16.all_true (i8x16.splat (local.get 0)))) + (func (export "as-i16x8_all_true-operand") (param i32) (result i32) + (i16x8.all_true (i16x8.splat (local.get 0)))) + (func (export "as-i32x4_all_true-operand1") (param i32) (result i32) + (i32x4.all_true (i32x4.splat (local.get 0)))) + (func (export "as-i32x4_all_true-operand2") (param i64) (result i32) + (i32x4.all_true (i64x2.splat (local.get 0)))) + + ;; Comparisons + (func (export "as-i8x16_eq-operands") (param i32 i32) (result v128) + (i8x16.eq (i8x16.splat (local.get 0)) (i8x16.splat (local.get 1)))) + (func (export "as-i16x8_eq-operands") (param i32 i32) (result v128) + (i16x8.eq (i16x8.splat (local.get 0)) (i16x8.splat (local.get 1)))) + (func (export "as-i32x4_eq-operands1") (param i32 i32) (result v128) + (i32x4.eq (i32x4.splat (local.get 0)) (i32x4.splat (local.get 1)))) + (func (export "as-i32x4_eq-operands2") (param i64 i64) (result v128) + (i32x4.eq (i64x2.splat (local.get 0)) (i64x2.splat (local.get 1)))) + (func (export "as-f32x4_eq-operands") (param f32 f32) (result v128) + (f32x4.eq (f32x4.splat (local.get 0)) (f32x4.splat (local.get 1)))) + (func (export "as-f64x2_eq-operands") (param f64 f64) (result v128) + (f64x2.eq (f64x2.splat (local.get 0)) (f64x2.splat (local.get 1)))) + + ;; Floating-point sign bit operations + (func (export "as-f32x4_abs-operand") (param f32) (result v128) + (f32x4.abs (f32x4.splat (local.get 0)))) + + ;; Floating-point min + (func (export "as-f32x4_min-operands") (param f32 f32) (result v128) + (f32x4.min (f32x4.splat (local.get 0)) (f32x4.splat (local.get 1)))) + + ;; Floating-point arithmetic + (func (export "as-f32x4_div-operands") (param f32 f32) (result v128) + (f32x4.div (f32x4.splat (local.get 0)) (f32x4.splat (local.get 1)))) + + ;; Conversions + (func (export "as-f32x4_convert_s_i32x4-operand") (param i32) (result v128) + (f32x4.convert_i32x4_s (i32x4.splat (local.get 0)))) + (func (export "as-i32x4_trunc_s_f32x4_sat-operand") (param f32) (result v128) + (i32x4.trunc_sat_f32x4_s (f32x4.splat (local.get 0)))) +)`); + +// ./test/core/simd/simd_splat.wast:292 +assert_return(() => invoke($2, `as-i8x16_extract_lane_s-operand-first`, [42]), [value("i32", 42)]); + +// ./test/core/simd/simd_splat.wast:293 +assert_return(() => invoke($2, `as-i8x16_extract_lane_s-operand-last`, [-42]), [value("i32", -42)]); + +// ./test/core/simd/simd_splat.wast:294 +assert_return( + () => invoke($2, `as-i16x8_extract_lane_s-operand-first`, [-32769]), + [value("i32", 32767)], +); + +// ./test/core/simd/simd_splat.wast:295 +assert_return(() => invoke($2, `as-i16x8_extract_lane_s-operand-last`, [32768]), [value("i32", -32768)]); + +// ./test/core/simd/simd_splat.wast:296 +assert_return( + () => invoke($2, `as-i32x4_extract_lane_s-operand-first`, [2147483647]), + [value("i32", 2147483647)], +); + +// ./test/core/simd/simd_splat.wast:297 +assert_return( + () => invoke($2, `as-i32x4_extract_lane_s-operand-last`, [-2147483648]), + [value("i32", -2147483648)], +); + +// ./test/core/simd/simd_splat.wast:298 +assert_return( + () => invoke($2, `as-f32x4_extract_lane_s-operand-first`, [value("f32", 1.5)]), + [value("f32", 1.5)], +); + +// ./test/core/simd/simd_splat.wast:299 +assert_return( + () => invoke($2, `as-f32x4_extract_lane_s-operand-last`, [value("f32", -0.25)]), + [value("f32", -0.25)], +); + +// ./test/core/simd/simd_splat.wast:300 +assert_return( + () => invoke($2, `as-v8x16_swizzle-operands`, [1, -1]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_splat.wast:301 +assert_return(() => invoke($2, `as-i64x2_extract_lane-operand-last`, [-42n]), [value("i64", -42n)]); + +// ./test/core/simd/simd_splat.wast:302 +assert_return(() => invoke($2, `as-i64x2_extract_lane-operand-first`, [42n]), [value("i64", 42n)]); + +// ./test/core/simd/simd_splat.wast:303 +assert_return( + () => invoke($2, `as-f64x2_extract_lane-operand-first`, [value("f64", 1.5)]), + [value("f64", 1.5)], +); + +// ./test/core/simd/simd_splat.wast:304 +assert_return( + () => invoke($2, `as-f64x2_extract_lane-operand-last`, [value("f64", -1)]), + [value("f64", -1)], +); + +// ./test/core/simd/simd_splat.wast:306 +assert_return( + () => invoke($2, `as-i8x16_add_sub-operands`, [3, 2, 1]), + [ + i8x16([0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4]), + ], +); + +// ./test/core/simd/simd_splat.wast:307 +assert_return( + () => invoke($2, `as-i16x8_add_sub_mul-operands`, [257, 128, 16, 16]), + [i16x8([0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81])], +); + +// ./test/core/simd/simd_splat.wast:308 +assert_return( + () => invoke($2, `as-i32x4_add_sub_mul-operands`, [65535, 65537, 256, 256]), + [i32x4([0x10000, 0x10000, 0x10000, 0x10000])], +); + +// ./test/core/simd/simd_splat.wast:309 +assert_return( + () => invoke($2, `as-i64x2_add_sub_mul-operands`, [ + 2147483647n, + 4294967297n, + 65536n, + 65536n, + ]), + [i64x2([0x80000000n, 0x80000000n])], +); + +// ./test/core/simd/simd_splat.wast:310 +assert_return( + () => invoke($2, `as-f64x2_add_sub_mul-operands`, [ + value("f64", 0.5), + value("f64", 0.75), + value("f64", 0.5), + value("f64", 0.5), + ]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_splat.wast:312 +assert_return( + () => invoke($2, `as-i8x16_add_sat_s-operands`, [127, 1]), + [ + i8x16([0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f]), + ], +); + +// ./test/core/simd/simd_splat.wast:313 +assert_return( + () => invoke($2, `as-i16x8_add_sat_s-operands`, [32767, 1]), + [i16x8([0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff])], +); + +// ./test/core/simd/simd_splat.wast:314 +assert_return( + () => invoke($2, `as-i8x16_sub_sat_u-operands`, [127, 255]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_splat.wast:315 +assert_return( + () => invoke($2, `as-i16x8_sub_sat_u-operands`, [32767, 65535]), + [i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0])], +); + +// ./test/core/simd/simd_splat.wast:317 +assert_return( + () => invoke($2, `as-i8x16_shr_s-operand`, [240, 3]), + [ + i8x16([0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe]), + ], +); + +// ./test/core/simd/simd_splat.wast:318 +assert_return( + () => invoke($2, `as-i16x8_shr_s-operand`, [256, 4]), + [i16x8([0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10])], +); + +// ./test/core/simd/simd_splat.wast:319 +assert_return( + () => invoke($2, `as-i32x4_shr_s-operand`, [-1, 16]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_splat.wast:321 +assert_return( + () => invoke($2, `as-v128_and-operands`, [17, 255]), + [ + i8x16([0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11]), + ], +); + +// ./test/core/simd/simd_splat.wast:322 +assert_return( + () => invoke($2, `as-v128_or-operands`, [0, 65535]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_splat.wast:323 +assert_return( + () => invoke($2, `as-v128_xor-operands`, [-252645136, -1]), + [i32x4([0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f, 0xf0f0f0f])], +); + +// ./test/core/simd/simd_splat.wast:325 +assert_return(() => invoke($2, `as-i8x16_all_true-operand`, [0]), [value("i32", 0)]); + +// ./test/core/simd/simd_splat.wast:326 +assert_return(() => invoke($2, `as-i16x8_all_true-operand`, [65535]), [value("i32", 1)]); + +// ./test/core/simd/simd_splat.wast:327 +assert_return(() => invoke($2, `as-i32x4_all_true-operand1`, [-252645136]), [value("i32", 1)]); + +// ./test/core/simd/simd_splat.wast:328 +assert_return(() => invoke($2, `as-i32x4_all_true-operand2`, [-1n]), [value("i32", 1)]); + +// ./test/core/simd/simd_splat.wast:330 +assert_return( + () => invoke($2, `as-i8x16_eq-operands`, [1, 2]), + [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ], +); + +// ./test/core/simd/simd_splat.wast:331 +assert_return( + () => invoke($2, `as-i16x8_eq-operands`, [-1, 65535]), + [i16x8([0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff])], +); + +// ./test/core/simd/simd_splat.wast:332 +assert_return( + () => invoke($2, `as-i32x4_eq-operands1`, [-1, -1]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_splat.wast:333 +assert_return( + () => invoke($2, `as-f32x4_eq-operands`, [value("f32", 0), value("f32", -0)]), + [i32x4([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff])], +); + +// ./test/core/simd/simd_splat.wast:334 +assert_return( + () => invoke($2, `as-i32x4_eq-operands2`, [1n, 2n]), + [i64x2([0xffffffff00000000n, 0xffffffff00000000n])], +); + +// ./test/core/simd/simd_splat.wast:335 +assert_return( + () => invoke($2, `as-f64x2_eq-operands`, [value("f64", 0), value("f64", -0)]), + [i64x2([0xffffffffffffffffn, 0xffffffffffffffffn])], +); + +// ./test/core/simd/simd_splat.wast:337 +assert_return( + () => invoke($2, `as-f32x4_abs-operand`, [value("f32", -1.125)]), + [ + new F32x4Pattern( + value("f32", 1.125), + value("f32", 1.125), + value("f32", 1.125), + value("f32", 1.125), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:338 +assert_return( + () => invoke($2, `as-f32x4_min-operands`, [ + value("f32", 0.25), + value("f32", 0.00000000000000000000000000000000000001), + ]), + [ + new F32x4Pattern( + value("f32", 0.00000000000000000000000000000000000001), + value("f32", 0.00000000000000000000000000000000000001), + value("f32", 0.00000000000000000000000000000000000001), + value("f32", 0.00000000000000000000000000000000000001), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:339 +assert_return( + () => invoke($2, `as-f32x4_div-operands`, [value("f32", 1), value("f32", 8)]), + [ + new F32x4Pattern( + value("f32", 0.125), + value("f32", 0.125), + value("f32", 0.125), + value("f32", 0.125), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:341 +assert_return( + () => invoke($2, `as-f32x4_convert_s_i32x4-operand`, [12345]), + [ + new F32x4Pattern( + value("f32", 12345), + value("f32", 12345), + value("f32", 12345), + value("f32", 12345), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:342 +assert_return( + () => invoke($2, `as-i32x4_trunc_s_f32x4_sat-operand`, [value("f32", 1.1)]), + [i32x4([0x1, 0x1, 0x1, 0x1])], +); + +// ./test/core/simd/simd_splat.wast:347 +let $3 = instantiate(`(module + (global $$g (mut v128) (v128.const f32x4 0.0 0.0 0.0 0.0)) + (func (export "as-br-value1") (param i32) (result v128) + (block (result v128) (br 0 (i8x16.splat (local.get 0))))) + (func (export "as-return-value1") (param i32) (result v128) + (return (i16x8.splat (local.get 0)))) + (func (export "as-local_set-value1") (param i32) (result v128) (local v128) + (local.set 1 (i32x4.splat (local.get 0))) + (return (local.get 1))) + (func (export "as-global_set-value1") (param f32) (result v128) + (global.set $$g (f32x4.splat (local.get 0))) + (return (global.get $$g))) + (func (export "as-br-value2") (param i64) (result v128) + (block (result v128) (br 0 (i64x2.splat (local.get 0))))) + (func (export "as-return-value2") (param i64) (result v128) + (return (i64x2.splat (local.get 0)))) + (func (export "as-local_set-value2") (param i64) (result v128) (local v128) + (local.set 1 (i64x2.splat (local.get 0))) + (return (local.get 1))) + (func (export "as-global_set-value2") (param f64) (result v128) + (global.set $$g (f64x2.splat (local.get 0))) + (return (global.get $$g))) +)`); + +// ./test/core/simd/simd_splat.wast:371 +assert_return( + () => invoke($3, `as-br-value1`, [171]), + [ + i8x16([0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab]), + ], +); + +// ./test/core/simd/simd_splat.wast:372 +assert_return( + () => invoke($3, `as-return-value1`, [43981]), + [i16x8([0xabcd, 0xabcd, 0xabcd, 0xabcd, 0xabcd, 0xabcd, 0xabcd, 0xabcd])], +); + +// ./test/core/simd/simd_splat.wast:373 +assert_return( + () => invoke($3, `as-local_set-value1`, [65536]), + [i32x4([0x10000, 0x10000, 0x10000, 0x10000])], +); + +// ./test/core/simd/simd_splat.wast:374 +assert_return( + () => invoke($3, `as-global_set-value1`, [value("f32", 1)]), + [ + new F32x4Pattern( + value("f32", 1), + value("f32", 1), + value("f32", 1), + value("f32", 1), + ), + ], +); + +// ./test/core/simd/simd_splat.wast:375 +assert_return(() => invoke($3, `as-br-value2`, [43981n]), [i64x2([0xabcdn, 0xabcdn])]); + +// ./test/core/simd/simd_splat.wast:376 +assert_return(() => invoke($3, `as-return-value2`, [43981n]), [i64x2([0xabcdn, 0xabcdn])]); + +// ./test/core/simd/simd_splat.wast:377 +assert_return(() => invoke($3, `as-local_set-value2`, [65536n]), [i64x2([0x10000n, 0x10000n])]); + +// ./test/core/simd/simd_splat.wast:378 +assert_return( + () => invoke($3, `as-global_set-value2`, [value("f64", 1)]), + [new F64x2Pattern(value("f64", 1), value("f64", 1))], +); + +// ./test/core/simd/simd_splat.wast:383 +assert_invalid( + () => instantiate(`(module + (func $$i8x16.splat-arg-empty (result v128) + (i8x16.splat) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:391 +assert_invalid( + () => instantiate(`(module + (func $$i16x8.splat-arg-empty (result v128) + (i16x8.splat) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:399 +assert_invalid( + () => instantiate(`(module + (func $$i32x4.splat-arg-empty (result v128) + (i32x4.splat) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:407 +assert_invalid( + () => instantiate(`(module + (func $$f32x4.splat-arg-empty (result v128) + (f32x4.splat) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:415 +assert_invalid( + () => instantiate(`(module + (func $$i64x2.splat-arg-empty (result v128) + (i64x2.splat) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_splat.wast:423 +assert_invalid( + () => instantiate(`(module + (func $$f64x2.splat-arg-empty (result v128) + (f64x2.splat) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_store.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_store.wast.js new file mode 100644 index 0000000000..aaecc09ddd --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_store.wast.js @@ -0,0 +1,238 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_store.wast + +// ./test/core/simd/simd_store.wast:3 +let $0 = instantiate(`(module + (memory 1) + (func (export "v128.store_i8x16") (result v128) + (v128.store (i32.const 0) (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)) + (v128.load (i32.const 0)) + ) + (func (export "v128.store_i16x8") (result v128) + (v128.store (i32.const 0) (v128.const i16x8 0 1 2 3 4 5 6 7)) + (v128.load (i32.const 0)) + ) + (func (export "v128.store_i16x8_2") (result v128) + (v128.store (i32.const 0) (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345)) + (v128.load (i32.const 0)) + ) + (func (export "v128.store_i16x8_3") (result v128) + (v128.store (i32.const 0) (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234)) + (v128.load (i32.const 0)) + ) + (func (export "v128.store_i32x4") (result v128) + (v128.store (i32.const 0) (v128.const i32x4 0 1 2 3)) + (v128.load (i32.const 0)) + ) + (func (export "v128.store_i32x4_2") (result v128) + (v128.store (i32.const 0) (v128.const i32x4 0_123_456_789 0_123_456_789 0_123_456_789 0_123_456_789)) + (v128.load (i32.const 0)) + ) + (func (export "v128.store_i32x4_3") (result v128) + (v128.store (i32.const 0) (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678)) + (v128.load (i32.const 0)) + ) + + (func (export "v128.store_f32x4") (result v128) + (v128.store (i32.const 0) (v128.const f32x4 0 1 2 3)) + (v128.load (i32.const 0)) + ) +)`); + +// ./test/core/simd/simd_store.wast:40 +assert_return( + () => invoke($0, `v128.store_i8x16`, []), + [ + i8x16([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf]), + ], +); + +// ./test/core/simd/simd_store.wast:41 +assert_return(() => invoke($0, `v128.store_i16x8`, []), [i16x8([0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7])]); + +// ./test/core/simd/simd_store.wast:42 +assert_return( + () => invoke($0, `v128.store_i16x8_2`, []), + [i16x8([0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039, 0x3039])], +); + +// ./test/core/simd/simd_store.wast:43 +assert_return( + () => invoke($0, `v128.store_i16x8_3`, []), + [i16x8([0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234, 0x1234])], +); + +// ./test/core/simd/simd_store.wast:44 +assert_return(() => invoke($0, `v128.store_i32x4`, []), [i32x4([0x0, 0x1, 0x2, 0x3])]); + +// ./test/core/simd/simd_store.wast:45 +assert_return( + () => invoke($0, `v128.store_i32x4_2`, []), + [i32x4([0x75bcd15, 0x75bcd15, 0x75bcd15, 0x75bcd15])], +); + +// ./test/core/simd/simd_store.wast:46 +assert_return( + () => invoke($0, `v128.store_i32x4_3`, []), + [i32x4([0x12345678, 0x12345678, 0x12345678, 0x12345678])], +); + +// ./test/core/simd/simd_store.wast:47 +assert_return( + () => invoke($0, `v128.store_f32x4`, []), + [ + new F32x4Pattern( + value("f32", 0), + value("f32", 1), + value("f32", 2), + value("f32", 3), + ), + ], +); + +// ./test/core/simd/simd_store.wast:52 +let $1 = instantiate(`(module + (memory 1) + (func (export "as-block-value") + (block (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0))) + ) + (func (export "as-loop-value") + (loop (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0))) + ) + (func (export "as-br-value") + (block (br 0 (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0)))) + ) + (func (export "as-br_if-value") + (block + (br_if 0 (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0)) (i32.const 1)) + ) + ) + (func (export "as-br_if-value-cond") + (block + (br_if 0 (i32.const 6) (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0))) + ) + ) + (func (export "as-br_table-value") + (block + (br_table 0 (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0)) (i32.const 1)) + ) + ) + (func (export "as-return-value") + (return (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0))) + ) + (func (export "as-if-then") + (if (i32.const 1) (then (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0)))) + ) + (func (export "as-if-else") + (if (i32.const 0) (then) (else (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0)))) + ) +)`); + +// ./test/core/simd/simd_store.wast:89 +assert_return(() => invoke($1, `as-block-value`, []), []); + +// ./test/core/simd/simd_store.wast:90 +assert_return(() => invoke($1, `as-loop-value`, []), []); + +// ./test/core/simd/simd_store.wast:91 +assert_return(() => invoke($1, `as-br-value`, []), []); + +// ./test/core/simd/simd_store.wast:92 +assert_return(() => invoke($1, `as-br_if-value`, []), []); + +// ./test/core/simd/simd_store.wast:93 +assert_return(() => invoke($1, `as-br_if-value-cond`, []), []); + +// ./test/core/simd/simd_store.wast:94 +assert_return(() => invoke($1, `as-br_table-value`, []), []); + +// ./test/core/simd/simd_store.wast:95 +assert_return(() => invoke($1, `as-return-value`, []), []); + +// ./test/core/simd/simd_store.wast:96 +assert_return(() => invoke($1, `as-if-then`, []), []); + +// ./test/core/simd/simd_store.wast:97 +assert_return(() => invoke($1, `as-if-else`, []), []); + +// ./test/core/simd/simd_store.wast:102 +assert_malformed( + () => instantiate(`(memory 1) (func (v128.store8 (i32.const 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_store.wast:109 +assert_malformed( + () => instantiate(`(memory 1) (func (v128.store16 (i32.const 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_store.wast:116 +assert_malformed( + () => instantiate(`(memory 1) (func (v128.store32 (i32.const 0) (v128.const i32x4 0 0 0 0))) `), + `unknown operator`, +); + +// ./test/core/simd/simd_store.wast:127 +assert_invalid( + () => instantiate(`(module (memory 1) (func (v128.store (f32.const 0) (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_store.wast:131 +assert_invalid( + () => instantiate(`(module (memory 1) (func (local v128) (block (br_if 0 (v128.store)))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_store.wast:135 +assert_invalid( + () => instantiate(`(module (memory 1) (func (result v128) (v128.store (i32.const 0) (v128.const i32x4 0 0 0 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_store.wast:143 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.store-1st-arg-empty + (v128.store (v128.const i32x4 0 0 0 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_store.wast:151 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.store-2nd-arg-empty + (v128.store (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/simd/simd_store.wast:159 +assert_invalid( + () => instantiate(`(module (memory 0) + (func $$v128.store-arg-empty + (v128.store) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_store16_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_store16_lane.wast.js new file mode 100644 index 0000000000..50e1431390 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_store16_lane.wast.js @@ -0,0 +1,512 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_store16_lane.wast + +// ./test/core/simd/simd_store16_lane.wast:4 +let $0 = instantiate(`(module + (memory 1) + (global $$zero (mut v128) (v128.const i32x4 0 0 0 0)) + (func (export "v128.store16_lane_0") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store16_lane_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store16_lane_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane 2 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store16_lane_3") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane 3 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store16_lane_4") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane 4 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store16_lane_5") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane 5 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store16_lane_6") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane 6 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store16_lane_7") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane 7 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store16_lane_0_offset_0") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane offset=0 0 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=0 (i32.const 0))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_1_offset_1") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane offset=1 1 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=1 (i32.const 0))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_2_offset_2") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane offset=2 2 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=2 (i32.const 0))) + (v128.store offset=2 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_3_offset_3") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane offset=3 3 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=3 (i32.const 0))) + (v128.store offset=3 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_4_offset_4") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane offset=4 4 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=4 (i32.const 0))) + (v128.store offset=4 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_5_offset_5") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane offset=5 5 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=5 (i32.const 0))) + (v128.store offset=5 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_6_offset_6") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane offset=6 6 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=6 (i32.const 0))) + (v128.store offset=6 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_7_offset_7") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane offset=7 7 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=7 (i32.const 0))) + (v128.store offset=7 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_0_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=1 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_0_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=2 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_1_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=1 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_1_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=2 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_2_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=1 2 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=2 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_2_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=2 2 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=2 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_3_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=1 3 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=3 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_3_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=2 3 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=3 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_4_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=1 4 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=4 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_4_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=2 4 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=4 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_5_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=1 5 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=5 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_5_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=2 5 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=5 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_6_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=1 6 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=6 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_6_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=2 6 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=6 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_7_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=1 7 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=7 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store16_lane_7_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store16_lane align=2 7 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=7 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) +)`); + +// ./test/core/simd/simd_store16_lane.wast:193 +assert_return( + () => invoke($0, `v128.store16_lane_0`, [ + 0, + i16x8([0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 256n)], +); + +// ./test/core/simd/simd_store16_lane.wast:196 +assert_return( + () => invoke($0, `v128.store16_lane_1`, [ + 1, + i16x8([0x0, 0x201, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 513n)], +); + +// ./test/core/simd/simd_store16_lane.wast:199 +assert_return( + () => invoke($0, `v128.store16_lane_2`, [ + 2, + i16x8([0x0, 0x0, 0x302, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 770n)], +); + +// ./test/core/simd/simd_store16_lane.wast:202 +assert_return( + () => invoke($0, `v128.store16_lane_3`, [ + 3, + i16x8([0x0, 0x0, 0x0, 0x403, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 1027n)], +); + +// ./test/core/simd/simd_store16_lane.wast:205 +assert_return( + () => invoke($0, `v128.store16_lane_4`, [ + 4, + i16x8([0x0, 0x0, 0x0, 0x0, 0x504, 0x0, 0x0, 0x0]), + ]), + [value("i64", 1284n)], +); + +// ./test/core/simd/simd_store16_lane.wast:208 +assert_return( + () => invoke($0, `v128.store16_lane_5`, [ + 5, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x605, 0x0, 0x0]), + ]), + [value("i64", 1541n)], +); + +// ./test/core/simd/simd_store16_lane.wast:211 +assert_return( + () => invoke($0, `v128.store16_lane_6`, [ + 6, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x706, 0x0]), + ]), + [value("i64", 1798n)], +); + +// ./test/core/simd/simd_store16_lane.wast:214 +assert_return( + () => invoke($0, `v128.store16_lane_7`, [ + 7, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x807]), + ]), + [value("i64", 2055n)], +); + +// ./test/core/simd/simd_store16_lane.wast:217 +assert_return( + () => invoke($0, `v128.store16_lane_0_offset_0`, [ + i16x8([0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 256n)], +); + +// ./test/core/simd/simd_store16_lane.wast:219 +assert_return( + () => invoke($0, `v128.store16_lane_1_offset_1`, [ + i16x8([0x0, 0x201, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 513n)], +); + +// ./test/core/simd/simd_store16_lane.wast:221 +assert_return( + () => invoke($0, `v128.store16_lane_2_offset_2`, [ + i16x8([0x0, 0x0, 0x302, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 770n)], +); + +// ./test/core/simd/simd_store16_lane.wast:223 +assert_return( + () => invoke($0, `v128.store16_lane_3_offset_3`, [ + i16x8([0x0, 0x0, 0x0, 0x403, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 1027n)], +); + +// ./test/core/simd/simd_store16_lane.wast:225 +assert_return( + () => invoke($0, `v128.store16_lane_4_offset_4`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x504, 0x0, 0x0, 0x0]), + ]), + [value("i64", 1284n)], +); + +// ./test/core/simd/simd_store16_lane.wast:227 +assert_return( + () => invoke($0, `v128.store16_lane_5_offset_5`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x605, 0x0, 0x0]), + ]), + [value("i64", 1541n)], +); + +// ./test/core/simd/simd_store16_lane.wast:229 +assert_return( + () => invoke($0, `v128.store16_lane_6_offset_6`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x706, 0x0]), + ]), + [value("i64", 1798n)], +); + +// ./test/core/simd/simd_store16_lane.wast:231 +assert_return( + () => invoke($0, `v128.store16_lane_7_offset_7`, [ + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x807]), + ]), + [value("i64", 2055n)], +); + +// ./test/core/simd/simd_store16_lane.wast:233 +assert_return( + () => invoke($0, `v128.store16_lane_0_align_1`, [ + 0, + i16x8([0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 256n)], +); + +// ./test/core/simd/simd_store16_lane.wast:236 +assert_return( + () => invoke($0, `v128.store16_lane_0_align_2`, [ + 0, + i16x8([0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 256n)], +); + +// ./test/core/simd/simd_store16_lane.wast:239 +assert_return( + () => invoke($0, `v128.store16_lane_1_align_1`, [ + 1, + i16x8([0x0, 0x201, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 513n)], +); + +// ./test/core/simd/simd_store16_lane.wast:242 +assert_return( + () => invoke($0, `v128.store16_lane_1_align_2`, [ + 1, + i16x8([0x0, 0x201, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 513n)], +); + +// ./test/core/simd/simd_store16_lane.wast:245 +assert_return( + () => invoke($0, `v128.store16_lane_2_align_1`, [ + 2, + i16x8([0x0, 0x0, 0x302, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 770n)], +); + +// ./test/core/simd/simd_store16_lane.wast:248 +assert_return( + () => invoke($0, `v128.store16_lane_2_align_2`, [ + 2, + i16x8([0x0, 0x0, 0x302, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 770n)], +); + +// ./test/core/simd/simd_store16_lane.wast:251 +assert_return( + () => invoke($0, `v128.store16_lane_3_align_1`, [ + 3, + i16x8([0x0, 0x0, 0x0, 0x403, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 1027n)], +); + +// ./test/core/simd/simd_store16_lane.wast:254 +assert_return( + () => invoke($0, `v128.store16_lane_3_align_2`, [ + 3, + i16x8([0x0, 0x0, 0x0, 0x403, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 1027n)], +); + +// ./test/core/simd/simd_store16_lane.wast:257 +assert_return( + () => invoke($0, `v128.store16_lane_4_align_1`, [ + 4, + i16x8([0x0, 0x0, 0x0, 0x0, 0x504, 0x0, 0x0, 0x0]), + ]), + [value("i64", 1284n)], +); + +// ./test/core/simd/simd_store16_lane.wast:260 +assert_return( + () => invoke($0, `v128.store16_lane_4_align_2`, [ + 4, + i16x8([0x0, 0x0, 0x0, 0x0, 0x504, 0x0, 0x0, 0x0]), + ]), + [value("i64", 1284n)], +); + +// ./test/core/simd/simd_store16_lane.wast:263 +assert_return( + () => invoke($0, `v128.store16_lane_5_align_1`, [ + 5, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x605, 0x0, 0x0]), + ]), + [value("i64", 1541n)], +); + +// ./test/core/simd/simd_store16_lane.wast:266 +assert_return( + () => invoke($0, `v128.store16_lane_5_align_2`, [ + 5, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x605, 0x0, 0x0]), + ]), + [value("i64", 1541n)], +); + +// ./test/core/simd/simd_store16_lane.wast:269 +assert_return( + () => invoke($0, `v128.store16_lane_6_align_1`, [ + 6, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x706, 0x0]), + ]), + [value("i64", 1798n)], +); + +// ./test/core/simd/simd_store16_lane.wast:272 +assert_return( + () => invoke($0, `v128.store16_lane_6_align_2`, [ + 6, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x706, 0x0]), + ]), + [value("i64", 1798n)], +); + +// ./test/core/simd/simd_store16_lane.wast:275 +assert_return( + () => invoke($0, `v128.store16_lane_7_align_1`, [ + 7, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x807]), + ]), + [value("i64", 2055n)], +); + +// ./test/core/simd/simd_store16_lane.wast:278 +assert_return( + () => invoke($0, `v128.store16_lane_7_align_2`, [ + 7, + i16x8([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x807]), + ]), + [value("i64", 2055n)], +); + +// ./test/core/simd/simd_store16_lane.wast:283 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.store16_lane 0 (local.get $$x) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_store16_lane.wast:289 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.store16_lane 8 (i32.const 0) (local.get $$x))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_store16_lane.wast:295 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.store16_lane align=4 0 (i32.const 0) (local.get $$x))))`), + `alignment must not be larger than natural`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_store32_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_store32_lane.wast.js new file mode 100644 index 0000000000..3b2c57bed7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_store32_lane.wast.js @@ -0,0 +1,320 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_store32_lane.wast + +// ./test/core/simd/simd_store32_lane.wast:4 +let $0 = instantiate(`(module + (memory 1) + (global $$zero (mut v128) (v128.const i32x4 0 0 0 0)) + (func (export "v128.store32_lane_0") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store32_lane_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store32_lane_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane 2 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store32_lane_3") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane 3 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store32_lane_0_offset_0") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane offset=0 0 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=0 (i32.const 0))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_1_offset_1") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane offset=1 1 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=1 (i32.const 0))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_2_offset_2") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane offset=2 2 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=2 (i32.const 0))) + (v128.store offset=2 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_3_offset_3") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane offset=3 3 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=3 (i32.const 0))) + (v128.store offset=3 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_0_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane align=1 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_0_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane align=2 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_0_align_4") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane align=4 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_1_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane align=1 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_1_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane align=2 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_1_align_4") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane align=4 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_2_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane align=1 2 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=2 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_2_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane align=2 2 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=2 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_2_align_4") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane align=4 2 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=2 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_3_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane align=1 3 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=3 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_3_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane align=2 3 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=3 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store32_lane_3_align_4") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store32_lane align=4 3 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=3 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) +)`); + +// ./test/core/simd/simd_store32_lane.wast:125 +assert_return( + () => invoke($0, `v128.store32_lane_0`, [0, i32x4([0x3020100, 0x0, 0x0, 0x0])]), + [value("i64", 50462976n)], +); + +// ./test/core/simd/simd_store32_lane.wast:128 +assert_return( + () => invoke($0, `v128.store32_lane_1`, [1, i32x4([0x0, 0x4030201, 0x0, 0x0])]), + [value("i64", 67305985n)], +); + +// ./test/core/simd/simd_store32_lane.wast:131 +assert_return( + () => invoke($0, `v128.store32_lane_2`, [2, i32x4([0x0, 0x0, 0x5040302, 0x0])]), + [value("i64", 84148994n)], +); + +// ./test/core/simd/simd_store32_lane.wast:134 +assert_return( + () => invoke($0, `v128.store32_lane_3`, [3, i32x4([0x0, 0x0, 0x0, 0x6050403])]), + [value("i64", 100992003n)], +); + +// ./test/core/simd/simd_store32_lane.wast:137 +assert_return( + () => invoke($0, `v128.store32_lane_0_offset_0`, [i32x4([0x3020100, 0x0, 0x0, 0x0])]), + [value("i64", 50462976n)], +); + +// ./test/core/simd/simd_store32_lane.wast:139 +assert_return( + () => invoke($0, `v128.store32_lane_1_offset_1`, [i32x4([0x0, 0x4030201, 0x0, 0x0])]), + [value("i64", 67305985n)], +); + +// ./test/core/simd/simd_store32_lane.wast:141 +assert_return( + () => invoke($0, `v128.store32_lane_2_offset_2`, [i32x4([0x0, 0x0, 0x5040302, 0x0])]), + [value("i64", 84148994n)], +); + +// ./test/core/simd/simd_store32_lane.wast:143 +assert_return( + () => invoke($0, `v128.store32_lane_3_offset_3`, [i32x4([0x0, 0x0, 0x0, 0x6050403])]), + [value("i64", 100992003n)], +); + +// ./test/core/simd/simd_store32_lane.wast:145 +assert_return( + () => invoke($0, `v128.store32_lane_0_align_1`, [ + 0, + i32x4([0x3020100, 0x0, 0x0, 0x0]), + ]), + [value("i64", 50462976n)], +); + +// ./test/core/simd/simd_store32_lane.wast:148 +assert_return( + () => invoke($0, `v128.store32_lane_0_align_2`, [ + 0, + i32x4([0x3020100, 0x0, 0x0, 0x0]), + ]), + [value("i64", 50462976n)], +); + +// ./test/core/simd/simd_store32_lane.wast:151 +assert_return( + () => invoke($0, `v128.store32_lane_0_align_4`, [ + 0, + i32x4([0x3020100, 0x0, 0x0, 0x0]), + ]), + [value("i64", 50462976n)], +); + +// ./test/core/simd/simd_store32_lane.wast:154 +assert_return( + () => invoke($0, `v128.store32_lane_1_align_1`, [ + 1, + i32x4([0x0, 0x4030201, 0x0, 0x0]), + ]), + [value("i64", 67305985n)], +); + +// ./test/core/simd/simd_store32_lane.wast:157 +assert_return( + () => invoke($0, `v128.store32_lane_1_align_2`, [ + 1, + i32x4([0x0, 0x4030201, 0x0, 0x0]), + ]), + [value("i64", 67305985n)], +); + +// ./test/core/simd/simd_store32_lane.wast:160 +assert_return( + () => invoke($0, `v128.store32_lane_1_align_4`, [ + 1, + i32x4([0x0, 0x4030201, 0x0, 0x0]), + ]), + [value("i64", 67305985n)], +); + +// ./test/core/simd/simd_store32_lane.wast:163 +assert_return( + () => invoke($0, `v128.store32_lane_2_align_1`, [ + 2, + i32x4([0x0, 0x0, 0x5040302, 0x0]), + ]), + [value("i64", 84148994n)], +); + +// ./test/core/simd/simd_store32_lane.wast:166 +assert_return( + () => invoke($0, `v128.store32_lane_2_align_2`, [ + 2, + i32x4([0x0, 0x0, 0x5040302, 0x0]), + ]), + [value("i64", 84148994n)], +); + +// ./test/core/simd/simd_store32_lane.wast:169 +assert_return( + () => invoke($0, `v128.store32_lane_2_align_4`, [ + 2, + i32x4([0x0, 0x0, 0x5040302, 0x0]), + ]), + [value("i64", 84148994n)], +); + +// ./test/core/simd/simd_store32_lane.wast:172 +assert_return( + () => invoke($0, `v128.store32_lane_3_align_1`, [ + 3, + i32x4([0x0, 0x0, 0x0, 0x6050403]), + ]), + [value("i64", 100992003n)], +); + +// ./test/core/simd/simd_store32_lane.wast:175 +assert_return( + () => invoke($0, `v128.store32_lane_3_align_2`, [ + 3, + i32x4([0x0, 0x0, 0x0, 0x6050403]), + ]), + [value("i64", 100992003n)], +); + +// ./test/core/simd/simd_store32_lane.wast:178 +assert_return( + () => invoke($0, `v128.store32_lane_3_align_4`, [ + 3, + i32x4([0x0, 0x0, 0x0, 0x6050403]), + ]), + [value("i64", 100992003n)], +); + +// ./test/core/simd/simd_store32_lane.wast:183 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.store32_lane 0 (local.get $$x) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_store32_lane.wast:189 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.store32_lane 4 (i32.const 0) (local.get $$x))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_store32_lane.wast:195 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.store32_lane align=8 0 (i32.const 0) (local.get $$x))))`), + `alignment must not be larger than natural`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_store64_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_store64_lane.wast.js new file mode 100644 index 0000000000..605a6444a8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_store64_lane.wast.js @@ -0,0 +1,214 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_store64_lane.wast + +// ./test/core/simd/simd_store64_lane.wast:4 +let $0 = instantiate(`(module + (memory 1) + (global $$zero (mut v128) (v128.const i32x4 0 0 0 0)) + (func (export "v128.store64_lane_0") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store64_lane 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store64_lane_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store64_lane 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store64_lane_0_offset_0") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store64_lane offset=0 0 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=0 (i32.const 0))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store64_lane_1_offset_1") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store64_lane offset=1 1 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=1 (i32.const 0))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store64_lane_0_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store64_lane align=1 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store64_lane_0_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store64_lane align=2 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store64_lane_0_align_4") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store64_lane align=4 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store64_lane_0_align_8") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store64_lane align=8 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store64_lane_1_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store64_lane align=1 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store64_lane_1_align_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store64_lane align=2 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store64_lane_1_align_4") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store64_lane align=4 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store64_lane_1_align_8") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store64_lane align=8 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) +)`); + +// ./test/core/simd/simd_store64_lane.wast:79 +assert_return( + () => invoke($0, `v128.store64_lane_0`, [0, i64x2([0x706050403020100n, 0x0n])]), + [value("i64", 506097522914230528n)], +); + +// ./test/core/simd/simd_store64_lane.wast:82 +assert_return( + () => invoke($0, `v128.store64_lane_1`, [1, i64x2([0x0n, 0x807060504030201n])]), + [value("i64", 578437695752307201n)], +); + +// ./test/core/simd/simd_store64_lane.wast:85 +assert_return( + () => invoke($0, `v128.store64_lane_0_offset_0`, [i64x2([0x706050403020100n, 0x0n])]), + [value("i64", 506097522914230528n)], +); + +// ./test/core/simd/simd_store64_lane.wast:87 +assert_return( + () => invoke($0, `v128.store64_lane_1_offset_1`, [i64x2([0x0n, 0x807060504030201n])]), + [value("i64", 578437695752307201n)], +); + +// ./test/core/simd/simd_store64_lane.wast:89 +assert_return( + () => invoke($0, `v128.store64_lane_0_align_1`, [ + 0, + i64x2([0x706050403020100n, 0x0n]), + ]), + [value("i64", 506097522914230528n)], +); + +// ./test/core/simd/simd_store64_lane.wast:92 +assert_return( + () => invoke($0, `v128.store64_lane_0_align_2`, [ + 0, + i64x2([0x706050403020100n, 0x0n]), + ]), + [value("i64", 506097522914230528n)], +); + +// ./test/core/simd/simd_store64_lane.wast:95 +assert_return( + () => invoke($0, `v128.store64_lane_0_align_4`, [ + 0, + i64x2([0x706050403020100n, 0x0n]), + ]), + [value("i64", 506097522914230528n)], +); + +// ./test/core/simd/simd_store64_lane.wast:98 +assert_return( + () => invoke($0, `v128.store64_lane_0_align_8`, [ + 0, + i64x2([0x706050403020100n, 0x0n]), + ]), + [value("i64", 506097522914230528n)], +); + +// ./test/core/simd/simd_store64_lane.wast:101 +assert_return( + () => invoke($0, `v128.store64_lane_1_align_1`, [ + 1, + i64x2([0x0n, 0x807060504030201n]), + ]), + [value("i64", 578437695752307201n)], +); + +// ./test/core/simd/simd_store64_lane.wast:104 +assert_return( + () => invoke($0, `v128.store64_lane_1_align_2`, [ + 1, + i64x2([0x0n, 0x807060504030201n]), + ]), + [value("i64", 578437695752307201n)], +); + +// ./test/core/simd/simd_store64_lane.wast:107 +assert_return( + () => invoke($0, `v128.store64_lane_1_align_4`, [ + 1, + i64x2([0x0n, 0x807060504030201n]), + ]), + [value("i64", 578437695752307201n)], +); + +// ./test/core/simd/simd_store64_lane.wast:110 +assert_return( + () => invoke($0, `v128.store64_lane_1_align_8`, [ + 1, + i64x2([0x0n, 0x807060504030201n]), + ]), + [value("i64", 578437695752307201n)], +); + +// ./test/core/simd/simd_store64_lane.wast:115 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.store64_lane 0 (local.get $$x) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_store64_lane.wast:121 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.store64_lane 2 (i32.const 0) (local.get $$x))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_store64_lane.wast:127 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.store64_lane align=16 0 (i32.const 0) (local.get $$x))))`), + `alignment must not be larger than natural`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/simd_store8_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_store8_lane.wast.js new file mode 100644 index 0000000000..46d45d74c2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/simd_store8_lane.wast.js @@ -0,0 +1,736 @@ +// |jit-test| skip-if: !wasmSimdEnabled() + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/simd/simd_store8_lane.wast + +// ./test/core/simd/simd_store8_lane.wast:4 +let $0 = instantiate(`(module + (memory 1) + (global $$zero (mut v128) (v128.const i32x4 0 0 0 0)) + (func (export "v128.store8_lane_0") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_2") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 2 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_3") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 3 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_4") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 4 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_5") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 5 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_6") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 6 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_7") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 7 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_8") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 8 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_9") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 9 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_10") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 10 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_11") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 11 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_12") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 12 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_13") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 13 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_14") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 14 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_15") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane 15 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store (local.get $$address) (global.get $$zero)) (local.get $$ret)) + (func (export "v128.store8_lane_0_offset_0") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=0 0 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=0 (i32.const 0))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_1_offset_1") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=1 1 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=1 (i32.const 0))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_2_offset_2") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=2 2 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=2 (i32.const 0))) + (v128.store offset=2 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_3_offset_3") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=3 3 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=3 (i32.const 0))) + (v128.store offset=3 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_4_offset_4") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=4 4 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=4 (i32.const 0))) + (v128.store offset=4 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_5_offset_5") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=5 5 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=5 (i32.const 0))) + (v128.store offset=5 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_6_offset_6") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=6 6 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=6 (i32.const 0))) + (v128.store offset=6 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_7_offset_7") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=7 7 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=7 (i32.const 0))) + (v128.store offset=7 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_8_offset_8") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=8 8 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=8 (i32.const 0))) + (v128.store offset=8 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_9_offset_9") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=9 9 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=9 (i32.const 0))) + (v128.store offset=9 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_10_offset_10") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=10 10 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=10 (i32.const 0))) + (v128.store offset=10 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_11_offset_11") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=11 11 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=11 (i32.const 0))) + (v128.store offset=11 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_12_offset_12") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=12 12 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=12 (i32.const 0))) + (v128.store offset=12 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_13_offset_13") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=13 13 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=13 (i32.const 0))) + (v128.store offset=13 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_14_offset_14") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=14 14 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=14 (i32.const 0))) + (v128.store offset=14 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_15_offset_15") + (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane offset=15 15 (i32.const 0) (local.get $$x)) + (local.set $$ret (i64.load offset=15 (i32.const 0))) + (v128.store offset=15 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_0_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 0 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=0 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_1_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 1 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=1 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_2_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 2 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=2 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_3_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 3 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=3 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_4_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 4 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=4 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_5_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 5 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=5 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_6_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 6 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=6 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_7_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 7 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=7 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_8_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 8 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=8 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_9_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 9 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=9 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_10_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 10 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=10 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_11_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 11 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=11 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_12_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 12 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=12 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_13_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 13 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=13 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_14_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 14 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=14 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) + (func (export "v128.store8_lane_15_align_1") + (param $$address i32) (param $$x v128) (result i64) (local $$ret i64) + (v128.store8_lane align=1 15 (local.get $$address) (local.get $$x)) + (local.set $$ret (i64.load (local.get $$address))) + (v128.store offset=15 (i32.const 0) (global.get $$zero)) + (local.get $$ret)) +)`); + +// ./test/core/simd/simd_store8_lane.wast:281 +assert_return( + () => invoke($0, `v128.store8_lane_0`, [ + 0, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 0n)], +); + +// ./test/core/simd/simd_store8_lane.wast:284 +assert_return( + () => invoke($0, `v128.store8_lane_1`, [ + 1, + i8x16([0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 1n)], +); + +// ./test/core/simd/simd_store8_lane.wast:287 +assert_return( + () => invoke($0, `v128.store8_lane_2`, [ + 2, + i8x16([0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 2n)], +); + +// ./test/core/simd/simd_store8_lane.wast:290 +assert_return( + () => invoke($0, `v128.store8_lane_3`, [ + 3, + i8x16([0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 3n)], +); + +// ./test/core/simd/simd_store8_lane.wast:293 +assert_return( + () => invoke($0, `v128.store8_lane_4`, [ + 4, + i8x16([0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 4n)], +); + +// ./test/core/simd/simd_store8_lane.wast:296 +assert_return( + () => invoke($0, `v128.store8_lane_5`, [ + 5, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 5n)], +); + +// ./test/core/simd/simd_store8_lane.wast:299 +assert_return( + () => invoke($0, `v128.store8_lane_6`, [ + 6, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 6n)], +); + +// ./test/core/simd/simd_store8_lane.wast:302 +assert_return( + () => invoke($0, `v128.store8_lane_7`, [ + 7, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 7n)], +); + +// ./test/core/simd/simd_store8_lane.wast:305 +assert_return( + () => invoke($0, `v128.store8_lane_8`, [ + 8, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 8n)], +); + +// ./test/core/simd/simd_store8_lane.wast:308 +assert_return( + () => invoke($0, `v128.store8_lane_9`, [ + 9, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 9n)], +); + +// ./test/core/simd/simd_store8_lane.wast:311 +assert_return( + () => invoke($0, `v128.store8_lane_10`, [ + 10, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 10n)], +); + +// ./test/core/simd/simd_store8_lane.wast:314 +assert_return( + () => invoke($0, `v128.store8_lane_11`, [ + 11, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 11n)], +); + +// ./test/core/simd/simd_store8_lane.wast:317 +assert_return( + () => invoke($0, `v128.store8_lane_12`, [ + 12, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0]), + ]), + [value("i64", 12n)], +); + +// ./test/core/simd/simd_store8_lane.wast:320 +assert_return( + () => invoke($0, `v128.store8_lane_13`, [ + 13, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0]), + ]), + [value("i64", 13n)], +); + +// ./test/core/simd/simd_store8_lane.wast:323 +assert_return( + () => invoke($0, `v128.store8_lane_14`, [ + 14, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe, 0x0]), + ]), + [value("i64", 14n)], +); + +// ./test/core/simd/simd_store8_lane.wast:326 +assert_return( + () => invoke($0, `v128.store8_lane_15`, [ + 15, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf]), + ]), + [value("i64", 15n)], +); + +// ./test/core/simd/simd_store8_lane.wast:329 +assert_return( + () => invoke($0, `v128.store8_lane_0_offset_0`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 0n)], +); + +// ./test/core/simd/simd_store8_lane.wast:331 +assert_return( + () => invoke($0, `v128.store8_lane_1_offset_1`, [ + i8x16([0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 1n)], +); + +// ./test/core/simd/simd_store8_lane.wast:333 +assert_return( + () => invoke($0, `v128.store8_lane_2_offset_2`, [ + i8x16([0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 2n)], +); + +// ./test/core/simd/simd_store8_lane.wast:335 +assert_return( + () => invoke($0, `v128.store8_lane_3_offset_3`, [ + i8x16([0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 3n)], +); + +// ./test/core/simd/simd_store8_lane.wast:337 +assert_return( + () => invoke($0, `v128.store8_lane_4_offset_4`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 4n)], +); + +// ./test/core/simd/simd_store8_lane.wast:339 +assert_return( + () => invoke($0, `v128.store8_lane_5_offset_5`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 5n)], +); + +// ./test/core/simd/simd_store8_lane.wast:341 +assert_return( + () => invoke($0, `v128.store8_lane_6_offset_6`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 6n)], +); + +// ./test/core/simd/simd_store8_lane.wast:343 +assert_return( + () => invoke($0, `v128.store8_lane_7_offset_7`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 7n)], +); + +// ./test/core/simd/simd_store8_lane.wast:345 +assert_return( + () => invoke($0, `v128.store8_lane_8_offset_8`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 8n)], +); + +// ./test/core/simd/simd_store8_lane.wast:347 +assert_return( + () => invoke($0, `v128.store8_lane_9_offset_9`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 9n)], +); + +// ./test/core/simd/simd_store8_lane.wast:349 +assert_return( + () => invoke($0, `v128.store8_lane_10_offset_10`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 10n)], +); + +// ./test/core/simd/simd_store8_lane.wast:351 +assert_return( + () => invoke($0, `v128.store8_lane_11_offset_11`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 11n)], +); + +// ./test/core/simd/simd_store8_lane.wast:353 +assert_return( + () => invoke($0, `v128.store8_lane_12_offset_12`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0]), + ]), + [value("i64", 12n)], +); + +// ./test/core/simd/simd_store8_lane.wast:355 +assert_return( + () => invoke($0, `v128.store8_lane_13_offset_13`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0]), + ]), + [value("i64", 13n)], +); + +// ./test/core/simd/simd_store8_lane.wast:357 +assert_return( + () => invoke($0, `v128.store8_lane_14_offset_14`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe, 0x0]), + ]), + [value("i64", 14n)], +); + +// ./test/core/simd/simd_store8_lane.wast:359 +assert_return( + () => invoke($0, `v128.store8_lane_15_offset_15`, [ + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf]), + ]), + [value("i64", 15n)], +); + +// ./test/core/simd/simd_store8_lane.wast:361 +assert_return( + () => invoke($0, `v128.store8_lane_0_align_1`, [ + 0, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 0n)], +); + +// ./test/core/simd/simd_store8_lane.wast:364 +assert_return( + () => invoke($0, `v128.store8_lane_1_align_1`, [ + 1, + i8x16([0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 1n)], +); + +// ./test/core/simd/simd_store8_lane.wast:367 +assert_return( + () => invoke($0, `v128.store8_lane_2_align_1`, [ + 2, + i8x16([0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 2n)], +); + +// ./test/core/simd/simd_store8_lane.wast:370 +assert_return( + () => invoke($0, `v128.store8_lane_3_align_1`, [ + 3, + i8x16([0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 3n)], +); + +// ./test/core/simd/simd_store8_lane.wast:373 +assert_return( + () => invoke($0, `v128.store8_lane_4_align_1`, [ + 4, + i8x16([0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 4n)], +); + +// ./test/core/simd/simd_store8_lane.wast:376 +assert_return( + () => invoke($0, `v128.store8_lane_5_align_1`, [ + 5, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 5n)], +); + +// ./test/core/simd/simd_store8_lane.wast:379 +assert_return( + () => invoke($0, `v128.store8_lane_6_align_1`, [ + 6, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 6n)], +); + +// ./test/core/simd/simd_store8_lane.wast:382 +assert_return( + () => invoke($0, `v128.store8_lane_7_align_1`, [ + 7, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 7n)], +); + +// ./test/core/simd/simd_store8_lane.wast:385 +assert_return( + () => invoke($0, `v128.store8_lane_8_align_1`, [ + 8, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 8n)], +); + +// ./test/core/simd/simd_store8_lane.wast:388 +assert_return( + () => invoke($0, `v128.store8_lane_9_align_1`, [ + 9, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 9n)], +); + +// ./test/core/simd/simd_store8_lane.wast:391 +assert_return( + () => invoke($0, `v128.store8_lane_10_align_1`, [ + 10, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 10n)], +); + +// ./test/core/simd/simd_store8_lane.wast:394 +assert_return( + () => invoke($0, `v128.store8_lane_11_align_1`, [ + 11, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0, 0x0]), + ]), + [value("i64", 11n)], +); + +// ./test/core/simd/simd_store8_lane.wast:397 +assert_return( + () => invoke($0, `v128.store8_lane_12_align_1`, [ + 12, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0]), + ]), + [value("i64", 12n)], +); + +// ./test/core/simd/simd_store8_lane.wast:400 +assert_return( + () => invoke($0, `v128.store8_lane_13_align_1`, [ + 13, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0]), + ]), + [value("i64", 13n)], +); + +// ./test/core/simd/simd_store8_lane.wast:403 +assert_return( + () => invoke($0, `v128.store8_lane_14_align_1`, [ + 14, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe, 0x0]), + ]), + [value("i64", 14n)], +); + +// ./test/core/simd/simd_store8_lane.wast:406 +assert_return( + () => invoke($0, `v128.store8_lane_15_align_1`, [ + 15, + i8x16([0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf]), + ]), + [value("i64", 15n)], +); + +// ./test/core/simd/simd_store8_lane.wast:411 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.store8_lane 0 (local.get $$x) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/simd/simd_store8_lane.wast:417 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.store8_lane 16 (i32.const 0) (local.get $$x))))`), + `invalid lane index`, +); + +// ./test/core/simd/simd_store8_lane.wast:423 +assert_invalid( + () => instantiate(`(module (memory 1) + (func (param $$x v128) (result v128) + (v128.store8_lane align=2 0 (i32.const 0) (local.get $$x))))`), + `alignment must not be larger than natural`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/skip-stack-guard-page.wast.js b/js/src/jit-test/tests/wasm/spec/spec/skip-stack-guard-page.wast.js new file mode 100644 index 0000000000..ef1a036caf --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/skip-stack-guard-page.wast.js @@ -0,0 +1,2320 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/skip-stack-guard-page.wast + +// ./test/core/skip-stack-guard-page.wast:2 +let $0 = instantiate(`(module + (memory 1) + (export "test-guard-page-skip" (func $$test-guard-page-skip)) + + (func $$test-guard-page-skip + (param $$depth i32) + (if (i32.eq (local.get $$depth) (i32.const 0)) + (then (call $$function-with-many-locals)) + (else (call $$test-guard-page-skip (i32.sub (local.get $$depth) (i32.const 1)))) + ) + ) + + (func $$function-with-many-locals + + ;; 1056 i64 = 8448 bytes of locals + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x000-0x007 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x008-0x00f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x010-0x017 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x018-0x01f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x020-0x027 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x028-0x02f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x030-0x037 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x038-0x03f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x040-0x047 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x048-0x04f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x050-0x057 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x058-0x05f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x060-0x067 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x068-0x06f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x070-0x077 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x078-0x07f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x080-0x087 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x088-0x08f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x090-0x097 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x098-0x09f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0a0-0x0a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0a8-0x0af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0b0-0x0b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0b8-0x0bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0c0-0x0c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0c8-0x0cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0d0-0x0d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0d8-0x0df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0e0-0x0e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0e8-0x0ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0f0-0x0f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0f8-0x0ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x100-0x107 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x108-0x10f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x110-0x117 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x118-0x11f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x120-0x127 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x128-0x12f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x130-0x137 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x138-0x13f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x140-0x147 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x148-0x14f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x150-0x157 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x158-0x15f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x160-0x167 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x168-0x16f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x170-0x177 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x178-0x17f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x180-0x187 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x188-0x18f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x190-0x197 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x198-0x19f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1a0-0x1a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1a8-0x1af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1b0-0x1b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1b8-0x1bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1c0-0x1c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1c8-0x1cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1d0-0x1d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1d8-0x1df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1e0-0x1e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1e8-0x1ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1f0-0x1f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1f8-0x1ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x200-0x207 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x208-0x20f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x210-0x217 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x218-0x21f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x220-0x227 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x228-0x22f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x230-0x237 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x238-0x23f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x240-0x247 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x248-0x24f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x250-0x257 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x258-0x25f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x260-0x267 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x268-0x26f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x270-0x277 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x278-0x27f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x280-0x287 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x288-0x28f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x290-0x297 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x298-0x29f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2a0-0x2a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2a8-0x2af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2b0-0x2b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2b8-0x2bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2c0-0x2c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2c8-0x2cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2d0-0x2d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2d8-0x2df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2e0-0x2e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2e8-0x2ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2f0-0x2f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2f8-0x2ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x300-0x307 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x308-0x30f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x310-0x317 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x318-0x31f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x320-0x327 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x328-0x32f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x330-0x337 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x338-0x33f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x340-0x347 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x348-0x34f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x350-0x357 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x358-0x35f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x360-0x367 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x368-0x36f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x370-0x377 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x378-0x37f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x380-0x387 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x388-0x38f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x390-0x397 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x398-0x39f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3a0-0x3a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3a8-0x3af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3b0-0x3b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3b8-0x3bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3c0-0x3c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3c8-0x3cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3d0-0x3d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3d8-0x3df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3e0-0x3e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3e8-0x3ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3f0-0x3f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3f8-0x3ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x400-0x407 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x408-0x40f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x410-0x417 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x418-0x41f + + ;; recurse first to try to make the callee access the stack below the space allocated for the locals before the locals themselves have been initialized. + (call $$function-with-many-locals) + + ;; load from memory into the locals + (local.set 0x000 (i64.load offset=0x000 align=1 (i32.const 0))) + (local.set 0x001 (i64.load offset=0x001 align=1 (i32.const 0))) + (local.set 0x002 (i64.load offset=0x002 align=1 (i32.const 0))) + (local.set 0x003 (i64.load offset=0x003 align=1 (i32.const 0))) + (local.set 0x004 (i64.load offset=0x004 align=1 (i32.const 0))) + (local.set 0x005 (i64.load offset=0x005 align=1 (i32.const 0))) + (local.set 0x006 (i64.load offset=0x006 align=1 (i32.const 0))) + (local.set 0x007 (i64.load offset=0x007 align=1 (i32.const 0))) + (local.set 0x008 (i64.load offset=0x008 align=1 (i32.const 0))) + (local.set 0x009 (i64.load offset=0x009 align=1 (i32.const 0))) + (local.set 0x00a (i64.load offset=0x00a align=1 (i32.const 0))) + (local.set 0x00b (i64.load offset=0x00b align=1 (i32.const 0))) + (local.set 0x00c (i64.load offset=0x00c align=1 (i32.const 0))) + (local.set 0x00d (i64.load offset=0x00d align=1 (i32.const 0))) + (local.set 0x00e (i64.load offset=0x00e align=1 (i32.const 0))) + (local.set 0x00f (i64.load offset=0x00f align=1 (i32.const 0))) + (local.set 0x010 (i64.load offset=0x010 align=1 (i32.const 0))) + (local.set 0x011 (i64.load offset=0x011 align=1 (i32.const 0))) + (local.set 0x012 (i64.load offset=0x012 align=1 (i32.const 0))) + (local.set 0x013 (i64.load offset=0x013 align=1 (i32.const 0))) + (local.set 0x014 (i64.load offset=0x014 align=1 (i32.const 0))) + (local.set 0x015 (i64.load offset=0x015 align=1 (i32.const 0))) + (local.set 0x016 (i64.load offset=0x016 align=1 (i32.const 0))) + (local.set 0x017 (i64.load offset=0x017 align=1 (i32.const 0))) + (local.set 0x018 (i64.load offset=0x018 align=1 (i32.const 0))) + (local.set 0x019 (i64.load offset=0x019 align=1 (i32.const 0))) + (local.set 0x01a (i64.load offset=0x01a align=1 (i32.const 0))) + (local.set 0x01b (i64.load offset=0x01b align=1 (i32.const 0))) + (local.set 0x01c (i64.load offset=0x01c align=1 (i32.const 0))) + (local.set 0x01d (i64.load offset=0x01d align=1 (i32.const 0))) + (local.set 0x01e (i64.load offset=0x01e align=1 (i32.const 0))) + (local.set 0x01f (i64.load offset=0x01f align=1 (i32.const 0))) + (local.set 0x020 (i64.load offset=0x020 align=1 (i32.const 0))) + (local.set 0x021 (i64.load offset=0x021 align=1 (i32.const 0))) + (local.set 0x022 (i64.load offset=0x022 align=1 (i32.const 0))) + (local.set 0x023 (i64.load offset=0x023 align=1 (i32.const 0))) + (local.set 0x024 (i64.load offset=0x024 align=1 (i32.const 0))) + (local.set 0x025 (i64.load offset=0x025 align=1 (i32.const 0))) + (local.set 0x026 (i64.load offset=0x026 align=1 (i32.const 0))) + (local.set 0x027 (i64.load offset=0x027 align=1 (i32.const 0))) + (local.set 0x028 (i64.load offset=0x028 align=1 (i32.const 0))) + (local.set 0x029 (i64.load offset=0x029 align=1 (i32.const 0))) + (local.set 0x02a (i64.load offset=0x02a align=1 (i32.const 0))) + (local.set 0x02b (i64.load offset=0x02b align=1 (i32.const 0))) + (local.set 0x02c (i64.load offset=0x02c align=1 (i32.const 0))) + (local.set 0x02d (i64.load offset=0x02d align=1 (i32.const 0))) + (local.set 0x02e (i64.load offset=0x02e align=1 (i32.const 0))) + (local.set 0x02f (i64.load offset=0x02f align=1 (i32.const 0))) + (local.set 0x030 (i64.load offset=0x030 align=1 (i32.const 0))) + (local.set 0x031 (i64.load offset=0x031 align=1 (i32.const 0))) + (local.set 0x032 (i64.load offset=0x032 align=1 (i32.const 0))) + (local.set 0x033 (i64.load offset=0x033 align=1 (i32.const 0))) + (local.set 0x034 (i64.load offset=0x034 align=1 (i32.const 0))) + (local.set 0x035 (i64.load offset=0x035 align=1 (i32.const 0))) + (local.set 0x036 (i64.load offset=0x036 align=1 (i32.const 0))) + (local.set 0x037 (i64.load offset=0x037 align=1 (i32.const 0))) + (local.set 0x038 (i64.load offset=0x038 align=1 (i32.const 0))) + (local.set 0x039 (i64.load offset=0x039 align=1 (i32.const 0))) + (local.set 0x03a (i64.load offset=0x03a align=1 (i32.const 0))) + (local.set 0x03b (i64.load offset=0x03b align=1 (i32.const 0))) + (local.set 0x03c (i64.load offset=0x03c align=1 (i32.const 0))) + (local.set 0x03d (i64.load offset=0x03d align=1 (i32.const 0))) + (local.set 0x03e (i64.load offset=0x03e align=1 (i32.const 0))) + (local.set 0x03f (i64.load offset=0x03f align=1 (i32.const 0))) + (local.set 0x040 (i64.load offset=0x040 align=1 (i32.const 0))) + (local.set 0x041 (i64.load offset=0x041 align=1 (i32.const 0))) + (local.set 0x042 (i64.load offset=0x042 align=1 (i32.const 0))) + (local.set 0x043 (i64.load offset=0x043 align=1 (i32.const 0))) + (local.set 0x044 (i64.load offset=0x044 align=1 (i32.const 0))) + (local.set 0x045 (i64.load offset=0x045 align=1 (i32.const 0))) + (local.set 0x046 (i64.load offset=0x046 align=1 (i32.const 0))) + (local.set 0x047 (i64.load offset=0x047 align=1 (i32.const 0))) + (local.set 0x048 (i64.load offset=0x048 align=1 (i32.const 0))) + (local.set 0x049 (i64.load offset=0x049 align=1 (i32.const 0))) + (local.set 0x04a (i64.load offset=0x04a align=1 (i32.const 0))) + (local.set 0x04b (i64.load offset=0x04b align=1 (i32.const 0))) + (local.set 0x04c (i64.load offset=0x04c align=1 (i32.const 0))) + (local.set 0x04d (i64.load offset=0x04d align=1 (i32.const 0))) + (local.set 0x04e (i64.load offset=0x04e align=1 (i32.const 0))) + (local.set 0x04f (i64.load offset=0x04f align=1 (i32.const 0))) + (local.set 0x050 (i64.load offset=0x050 align=1 (i32.const 0))) + (local.set 0x051 (i64.load offset=0x051 align=1 (i32.const 0))) + (local.set 0x052 (i64.load offset=0x052 align=1 (i32.const 0))) + (local.set 0x053 (i64.load offset=0x053 align=1 (i32.const 0))) + (local.set 0x054 (i64.load offset=0x054 align=1 (i32.const 0))) + (local.set 0x055 (i64.load offset=0x055 align=1 (i32.const 0))) + (local.set 0x056 (i64.load offset=0x056 align=1 (i32.const 0))) + (local.set 0x057 (i64.load offset=0x057 align=1 (i32.const 0))) + (local.set 0x058 (i64.load offset=0x058 align=1 (i32.const 0))) + (local.set 0x059 (i64.load offset=0x059 align=1 (i32.const 0))) + (local.set 0x05a (i64.load offset=0x05a align=1 (i32.const 0))) + (local.set 0x05b (i64.load offset=0x05b align=1 (i32.const 0))) + (local.set 0x05c (i64.load offset=0x05c align=1 (i32.const 0))) + (local.set 0x05d (i64.load offset=0x05d align=1 (i32.const 0))) + (local.set 0x05e (i64.load offset=0x05e align=1 (i32.const 0))) + (local.set 0x05f (i64.load offset=0x05f align=1 (i32.const 0))) + (local.set 0x060 (i64.load offset=0x060 align=1 (i32.const 0))) + (local.set 0x061 (i64.load offset=0x061 align=1 (i32.const 0))) + (local.set 0x062 (i64.load offset=0x062 align=1 (i32.const 0))) + (local.set 0x063 (i64.load offset=0x063 align=1 (i32.const 0))) + (local.set 0x064 (i64.load offset=0x064 align=1 (i32.const 0))) + (local.set 0x065 (i64.load offset=0x065 align=1 (i32.const 0))) + (local.set 0x066 (i64.load offset=0x066 align=1 (i32.const 0))) + (local.set 0x067 (i64.load offset=0x067 align=1 (i32.const 0))) + (local.set 0x068 (i64.load offset=0x068 align=1 (i32.const 0))) + (local.set 0x069 (i64.load offset=0x069 align=1 (i32.const 0))) + (local.set 0x06a (i64.load offset=0x06a align=1 (i32.const 0))) + (local.set 0x06b (i64.load offset=0x06b align=1 (i32.const 0))) + (local.set 0x06c (i64.load offset=0x06c align=1 (i32.const 0))) + (local.set 0x06d (i64.load offset=0x06d align=1 (i32.const 0))) + (local.set 0x06e (i64.load offset=0x06e align=1 (i32.const 0))) + (local.set 0x06f (i64.load offset=0x06f align=1 (i32.const 0))) + (local.set 0x070 (i64.load offset=0x070 align=1 (i32.const 0))) + (local.set 0x071 (i64.load offset=0x071 align=1 (i32.const 0))) + (local.set 0x072 (i64.load offset=0x072 align=1 (i32.const 0))) + (local.set 0x073 (i64.load offset=0x073 align=1 (i32.const 0))) + (local.set 0x074 (i64.load offset=0x074 align=1 (i32.const 0))) + (local.set 0x075 (i64.load offset=0x075 align=1 (i32.const 0))) + (local.set 0x076 (i64.load offset=0x076 align=1 (i32.const 0))) + (local.set 0x077 (i64.load offset=0x077 align=1 (i32.const 0))) + (local.set 0x078 (i64.load offset=0x078 align=1 (i32.const 0))) + (local.set 0x079 (i64.load offset=0x079 align=1 (i32.const 0))) + (local.set 0x07a (i64.load offset=0x07a align=1 (i32.const 0))) + (local.set 0x07b (i64.load offset=0x07b align=1 (i32.const 0))) + (local.set 0x07c (i64.load offset=0x07c align=1 (i32.const 0))) + (local.set 0x07d (i64.load offset=0x07d align=1 (i32.const 0))) + (local.set 0x07e (i64.load offset=0x07e align=1 (i32.const 0))) + (local.set 0x07f (i64.load offset=0x07f align=1 (i32.const 0))) + (local.set 0x080 (i64.load offset=0x080 align=1 (i32.const 0))) + (local.set 0x081 (i64.load offset=0x081 align=1 (i32.const 0))) + (local.set 0x082 (i64.load offset=0x082 align=1 (i32.const 0))) + (local.set 0x083 (i64.load offset=0x083 align=1 (i32.const 0))) + (local.set 0x084 (i64.load offset=0x084 align=1 (i32.const 0))) + (local.set 0x085 (i64.load offset=0x085 align=1 (i32.const 0))) + (local.set 0x086 (i64.load offset=0x086 align=1 (i32.const 0))) + (local.set 0x087 (i64.load offset=0x087 align=1 (i32.const 0))) + (local.set 0x088 (i64.load offset=0x088 align=1 (i32.const 0))) + (local.set 0x089 (i64.load offset=0x089 align=1 (i32.const 0))) + (local.set 0x08a (i64.load offset=0x08a align=1 (i32.const 0))) + (local.set 0x08b (i64.load offset=0x08b align=1 (i32.const 0))) + (local.set 0x08c (i64.load offset=0x08c align=1 (i32.const 0))) + (local.set 0x08d (i64.load offset=0x08d align=1 (i32.const 0))) + (local.set 0x08e (i64.load offset=0x08e align=1 (i32.const 0))) + (local.set 0x08f (i64.load offset=0x08f align=1 (i32.const 0))) + (local.set 0x090 (i64.load offset=0x090 align=1 (i32.const 0))) + (local.set 0x091 (i64.load offset=0x091 align=1 (i32.const 0))) + (local.set 0x092 (i64.load offset=0x092 align=1 (i32.const 0))) + (local.set 0x093 (i64.load offset=0x093 align=1 (i32.const 0))) + (local.set 0x094 (i64.load offset=0x094 align=1 (i32.const 0))) + (local.set 0x095 (i64.load offset=0x095 align=1 (i32.const 0))) + (local.set 0x096 (i64.load offset=0x096 align=1 (i32.const 0))) + (local.set 0x097 (i64.load offset=0x097 align=1 (i32.const 0))) + (local.set 0x098 (i64.load offset=0x098 align=1 (i32.const 0))) + (local.set 0x099 (i64.load offset=0x099 align=1 (i32.const 0))) + (local.set 0x09a (i64.load offset=0x09a align=1 (i32.const 0))) + (local.set 0x09b (i64.load offset=0x09b align=1 (i32.const 0))) + (local.set 0x09c (i64.load offset=0x09c align=1 (i32.const 0))) + (local.set 0x09d (i64.load offset=0x09d align=1 (i32.const 0))) + (local.set 0x09e (i64.load offset=0x09e align=1 (i32.const 0))) + (local.set 0x09f (i64.load offset=0x09f align=1 (i32.const 0))) + (local.set 0x0a0 (i64.load offset=0x0a0 align=1 (i32.const 0))) + (local.set 0x0a1 (i64.load offset=0x0a1 align=1 (i32.const 0))) + (local.set 0x0a2 (i64.load offset=0x0a2 align=1 (i32.const 0))) + (local.set 0x0a3 (i64.load offset=0x0a3 align=1 (i32.const 0))) + (local.set 0x0a4 (i64.load offset=0x0a4 align=1 (i32.const 0))) + (local.set 0x0a5 (i64.load offset=0x0a5 align=1 (i32.const 0))) + (local.set 0x0a6 (i64.load offset=0x0a6 align=1 (i32.const 0))) + (local.set 0x0a7 (i64.load offset=0x0a7 align=1 (i32.const 0))) + (local.set 0x0a8 (i64.load offset=0x0a8 align=1 (i32.const 0))) + (local.set 0x0a9 (i64.load offset=0x0a9 align=1 (i32.const 0))) + (local.set 0x0aa (i64.load offset=0x0aa align=1 (i32.const 0))) + (local.set 0x0ab (i64.load offset=0x0ab align=1 (i32.const 0))) + (local.set 0x0ac (i64.load offset=0x0ac align=1 (i32.const 0))) + (local.set 0x0ad (i64.load offset=0x0ad align=1 (i32.const 0))) + (local.set 0x0ae (i64.load offset=0x0ae align=1 (i32.const 0))) + (local.set 0x0af (i64.load offset=0x0af align=1 (i32.const 0))) + (local.set 0x0b0 (i64.load offset=0x0b0 align=1 (i32.const 0))) + (local.set 0x0b1 (i64.load offset=0x0b1 align=1 (i32.const 0))) + (local.set 0x0b2 (i64.load offset=0x0b2 align=1 (i32.const 0))) + (local.set 0x0b3 (i64.load offset=0x0b3 align=1 (i32.const 0))) + (local.set 0x0b4 (i64.load offset=0x0b4 align=1 (i32.const 0))) + (local.set 0x0b5 (i64.load offset=0x0b5 align=1 (i32.const 0))) + (local.set 0x0b6 (i64.load offset=0x0b6 align=1 (i32.const 0))) + (local.set 0x0b7 (i64.load offset=0x0b7 align=1 (i32.const 0))) + (local.set 0x0b8 (i64.load offset=0x0b8 align=1 (i32.const 0))) + (local.set 0x0b9 (i64.load offset=0x0b9 align=1 (i32.const 0))) + (local.set 0x0ba (i64.load offset=0x0ba align=1 (i32.const 0))) + (local.set 0x0bb (i64.load offset=0x0bb align=1 (i32.const 0))) + (local.set 0x0bc (i64.load offset=0x0bc align=1 (i32.const 0))) + (local.set 0x0bd (i64.load offset=0x0bd align=1 (i32.const 0))) + (local.set 0x0be (i64.load offset=0x0be align=1 (i32.const 0))) + (local.set 0x0bf (i64.load offset=0x0bf align=1 (i32.const 0))) + (local.set 0x0c0 (i64.load offset=0x0c0 align=1 (i32.const 0))) + (local.set 0x0c1 (i64.load offset=0x0c1 align=1 (i32.const 0))) + (local.set 0x0c2 (i64.load offset=0x0c2 align=1 (i32.const 0))) + (local.set 0x0c3 (i64.load offset=0x0c3 align=1 (i32.const 0))) + (local.set 0x0c4 (i64.load offset=0x0c4 align=1 (i32.const 0))) + (local.set 0x0c5 (i64.load offset=0x0c5 align=1 (i32.const 0))) + (local.set 0x0c6 (i64.load offset=0x0c6 align=1 (i32.const 0))) + (local.set 0x0c7 (i64.load offset=0x0c7 align=1 (i32.const 0))) + (local.set 0x0c8 (i64.load offset=0x0c8 align=1 (i32.const 0))) + (local.set 0x0c9 (i64.load offset=0x0c9 align=1 (i32.const 0))) + (local.set 0x0ca (i64.load offset=0x0ca align=1 (i32.const 0))) + (local.set 0x0cb (i64.load offset=0x0cb align=1 (i32.const 0))) + (local.set 0x0cc (i64.load offset=0x0cc align=1 (i32.const 0))) + (local.set 0x0cd (i64.load offset=0x0cd align=1 (i32.const 0))) + (local.set 0x0ce (i64.load offset=0x0ce align=1 (i32.const 0))) + (local.set 0x0cf (i64.load offset=0x0cf align=1 (i32.const 0))) + (local.set 0x0d0 (i64.load offset=0x0d0 align=1 (i32.const 0))) + (local.set 0x0d1 (i64.load offset=0x0d1 align=1 (i32.const 0))) + (local.set 0x0d2 (i64.load offset=0x0d2 align=1 (i32.const 0))) + (local.set 0x0d3 (i64.load offset=0x0d3 align=1 (i32.const 0))) + (local.set 0x0d4 (i64.load offset=0x0d4 align=1 (i32.const 0))) + (local.set 0x0d5 (i64.load offset=0x0d5 align=1 (i32.const 0))) + (local.set 0x0d6 (i64.load offset=0x0d6 align=1 (i32.const 0))) + (local.set 0x0d7 (i64.load offset=0x0d7 align=1 (i32.const 0))) + (local.set 0x0d8 (i64.load offset=0x0d8 align=1 (i32.const 0))) + (local.set 0x0d9 (i64.load offset=0x0d9 align=1 (i32.const 0))) + (local.set 0x0da (i64.load offset=0x0da align=1 (i32.const 0))) + (local.set 0x0db (i64.load offset=0x0db align=1 (i32.const 0))) + (local.set 0x0dc (i64.load offset=0x0dc align=1 (i32.const 0))) + (local.set 0x0dd (i64.load offset=0x0dd align=1 (i32.const 0))) + (local.set 0x0de (i64.load offset=0x0de align=1 (i32.const 0))) + (local.set 0x0df (i64.load offset=0x0df align=1 (i32.const 0))) + (local.set 0x0e0 (i64.load offset=0x0e0 align=1 (i32.const 0))) + (local.set 0x0e1 (i64.load offset=0x0e1 align=1 (i32.const 0))) + (local.set 0x0e2 (i64.load offset=0x0e2 align=1 (i32.const 0))) + (local.set 0x0e3 (i64.load offset=0x0e3 align=1 (i32.const 0))) + (local.set 0x0e4 (i64.load offset=0x0e4 align=1 (i32.const 0))) + (local.set 0x0e5 (i64.load offset=0x0e5 align=1 (i32.const 0))) + (local.set 0x0e6 (i64.load offset=0x0e6 align=1 (i32.const 0))) + (local.set 0x0e7 (i64.load offset=0x0e7 align=1 (i32.const 0))) + (local.set 0x0e8 (i64.load offset=0x0e8 align=1 (i32.const 0))) + (local.set 0x0e9 (i64.load offset=0x0e9 align=1 (i32.const 0))) + (local.set 0x0ea (i64.load offset=0x0ea align=1 (i32.const 0))) + (local.set 0x0eb (i64.load offset=0x0eb align=1 (i32.const 0))) + (local.set 0x0ec (i64.load offset=0x0ec align=1 (i32.const 0))) + (local.set 0x0ed (i64.load offset=0x0ed align=1 (i32.const 0))) + (local.set 0x0ee (i64.load offset=0x0ee align=1 (i32.const 0))) + (local.set 0x0ef (i64.load offset=0x0ef align=1 (i32.const 0))) + (local.set 0x0f0 (i64.load offset=0x0f0 align=1 (i32.const 0))) + (local.set 0x0f1 (i64.load offset=0x0f1 align=1 (i32.const 0))) + (local.set 0x0f2 (i64.load offset=0x0f2 align=1 (i32.const 0))) + (local.set 0x0f3 (i64.load offset=0x0f3 align=1 (i32.const 0))) + (local.set 0x0f4 (i64.load offset=0x0f4 align=1 (i32.const 0))) + (local.set 0x0f5 (i64.load offset=0x0f5 align=1 (i32.const 0))) + (local.set 0x0f6 (i64.load offset=0x0f6 align=1 (i32.const 0))) + (local.set 0x0f7 (i64.load offset=0x0f7 align=1 (i32.const 0))) + (local.set 0x0f8 (i64.load offset=0x0f8 align=1 (i32.const 0))) + (local.set 0x0f9 (i64.load offset=0x0f9 align=1 (i32.const 0))) + (local.set 0x0fa (i64.load offset=0x0fa align=1 (i32.const 0))) + (local.set 0x0fb (i64.load offset=0x0fb align=1 (i32.const 0))) + (local.set 0x0fc (i64.load offset=0x0fc align=1 (i32.const 0))) + (local.set 0x0fd (i64.load offset=0x0fd align=1 (i32.const 0))) + (local.set 0x0fe (i64.load offset=0x0fe align=1 (i32.const 0))) + (local.set 0x0ff (i64.load offset=0x0ff align=1 (i32.const 0))) + (local.set 0x100 (i64.load offset=0x100 align=1 (i32.const 0))) + (local.set 0x101 (i64.load offset=0x101 align=1 (i32.const 0))) + (local.set 0x102 (i64.load offset=0x102 align=1 (i32.const 0))) + (local.set 0x103 (i64.load offset=0x103 align=1 (i32.const 0))) + (local.set 0x104 (i64.load offset=0x104 align=1 (i32.const 0))) + (local.set 0x105 (i64.load offset=0x105 align=1 (i32.const 0))) + (local.set 0x106 (i64.load offset=0x106 align=1 (i32.const 0))) + (local.set 0x107 (i64.load offset=0x107 align=1 (i32.const 0))) + (local.set 0x108 (i64.load offset=0x108 align=1 (i32.const 0))) + (local.set 0x109 (i64.load offset=0x109 align=1 (i32.const 0))) + (local.set 0x10a (i64.load offset=0x10a align=1 (i32.const 0))) + (local.set 0x10b (i64.load offset=0x10b align=1 (i32.const 0))) + (local.set 0x10c (i64.load offset=0x10c align=1 (i32.const 0))) + (local.set 0x10d (i64.load offset=0x10d align=1 (i32.const 0))) + (local.set 0x10e (i64.load offset=0x10e align=1 (i32.const 0))) + (local.set 0x10f (i64.load offset=0x10f align=1 (i32.const 0))) + (local.set 0x110 (i64.load offset=0x110 align=1 (i32.const 0))) + (local.set 0x111 (i64.load offset=0x111 align=1 (i32.const 0))) + (local.set 0x112 (i64.load offset=0x112 align=1 (i32.const 0))) + (local.set 0x113 (i64.load offset=0x113 align=1 (i32.const 0))) + (local.set 0x114 (i64.load offset=0x114 align=1 (i32.const 0))) + (local.set 0x115 (i64.load offset=0x115 align=1 (i32.const 0))) + (local.set 0x116 (i64.load offset=0x116 align=1 (i32.const 0))) + (local.set 0x117 (i64.load offset=0x117 align=1 (i32.const 0))) + (local.set 0x118 (i64.load offset=0x118 align=1 (i32.const 0))) + (local.set 0x119 (i64.load offset=0x119 align=1 (i32.const 0))) + (local.set 0x11a (i64.load offset=0x11a align=1 (i32.const 0))) + (local.set 0x11b (i64.load offset=0x11b align=1 (i32.const 0))) + (local.set 0x11c (i64.load offset=0x11c align=1 (i32.const 0))) + (local.set 0x11d (i64.load offset=0x11d align=1 (i32.const 0))) + (local.set 0x11e (i64.load offset=0x11e align=1 (i32.const 0))) + (local.set 0x11f (i64.load offset=0x11f align=1 (i32.const 0))) + (local.set 0x120 (i64.load offset=0x120 align=1 (i32.const 0))) + (local.set 0x121 (i64.load offset=0x121 align=1 (i32.const 0))) + (local.set 0x122 (i64.load offset=0x122 align=1 (i32.const 0))) + (local.set 0x123 (i64.load offset=0x123 align=1 (i32.const 0))) + (local.set 0x124 (i64.load offset=0x124 align=1 (i32.const 0))) + (local.set 0x125 (i64.load offset=0x125 align=1 (i32.const 0))) + (local.set 0x126 (i64.load offset=0x126 align=1 (i32.const 0))) + (local.set 0x127 (i64.load offset=0x127 align=1 (i32.const 0))) + (local.set 0x128 (i64.load offset=0x128 align=1 (i32.const 0))) + (local.set 0x129 (i64.load offset=0x129 align=1 (i32.const 0))) + (local.set 0x12a (i64.load offset=0x12a align=1 (i32.const 0))) + (local.set 0x12b (i64.load offset=0x12b align=1 (i32.const 0))) + (local.set 0x12c (i64.load offset=0x12c align=1 (i32.const 0))) + (local.set 0x12d (i64.load offset=0x12d align=1 (i32.const 0))) + (local.set 0x12e (i64.load offset=0x12e align=1 (i32.const 0))) + (local.set 0x12f (i64.load offset=0x12f align=1 (i32.const 0))) + (local.set 0x130 (i64.load offset=0x130 align=1 (i32.const 0))) + (local.set 0x131 (i64.load offset=0x131 align=1 (i32.const 0))) + (local.set 0x132 (i64.load offset=0x132 align=1 (i32.const 0))) + (local.set 0x133 (i64.load offset=0x133 align=1 (i32.const 0))) + (local.set 0x134 (i64.load offset=0x134 align=1 (i32.const 0))) + (local.set 0x135 (i64.load offset=0x135 align=1 (i32.const 0))) + (local.set 0x136 (i64.load offset=0x136 align=1 (i32.const 0))) + (local.set 0x137 (i64.load offset=0x137 align=1 (i32.const 0))) + (local.set 0x138 (i64.load offset=0x138 align=1 (i32.const 0))) + (local.set 0x139 (i64.load offset=0x139 align=1 (i32.const 0))) + (local.set 0x13a (i64.load offset=0x13a align=1 (i32.const 0))) + (local.set 0x13b (i64.load offset=0x13b align=1 (i32.const 0))) + (local.set 0x13c (i64.load offset=0x13c align=1 (i32.const 0))) + (local.set 0x13d (i64.load offset=0x13d align=1 (i32.const 0))) + (local.set 0x13e (i64.load offset=0x13e align=1 (i32.const 0))) + (local.set 0x13f (i64.load offset=0x13f align=1 (i32.const 0))) + (local.set 0x140 (i64.load offset=0x140 align=1 (i32.const 0))) + (local.set 0x141 (i64.load offset=0x141 align=1 (i32.const 0))) + (local.set 0x142 (i64.load offset=0x142 align=1 (i32.const 0))) + (local.set 0x143 (i64.load offset=0x143 align=1 (i32.const 0))) + (local.set 0x144 (i64.load offset=0x144 align=1 (i32.const 0))) + (local.set 0x145 (i64.load offset=0x145 align=1 (i32.const 0))) + (local.set 0x146 (i64.load offset=0x146 align=1 (i32.const 0))) + (local.set 0x147 (i64.load offset=0x147 align=1 (i32.const 0))) + (local.set 0x148 (i64.load offset=0x148 align=1 (i32.const 0))) + (local.set 0x149 (i64.load offset=0x149 align=1 (i32.const 0))) + (local.set 0x14a (i64.load offset=0x14a align=1 (i32.const 0))) + (local.set 0x14b (i64.load offset=0x14b align=1 (i32.const 0))) + (local.set 0x14c (i64.load offset=0x14c align=1 (i32.const 0))) + (local.set 0x14d (i64.load offset=0x14d align=1 (i32.const 0))) + (local.set 0x14e (i64.load offset=0x14e align=1 (i32.const 0))) + (local.set 0x14f (i64.load offset=0x14f align=1 (i32.const 0))) + (local.set 0x150 (i64.load offset=0x150 align=1 (i32.const 0))) + (local.set 0x151 (i64.load offset=0x151 align=1 (i32.const 0))) + (local.set 0x152 (i64.load offset=0x152 align=1 (i32.const 0))) + (local.set 0x153 (i64.load offset=0x153 align=1 (i32.const 0))) + (local.set 0x154 (i64.load offset=0x154 align=1 (i32.const 0))) + (local.set 0x155 (i64.load offset=0x155 align=1 (i32.const 0))) + (local.set 0x156 (i64.load offset=0x156 align=1 (i32.const 0))) + (local.set 0x157 (i64.load offset=0x157 align=1 (i32.const 0))) + (local.set 0x158 (i64.load offset=0x158 align=1 (i32.const 0))) + (local.set 0x159 (i64.load offset=0x159 align=1 (i32.const 0))) + (local.set 0x15a (i64.load offset=0x15a align=1 (i32.const 0))) + (local.set 0x15b (i64.load offset=0x15b align=1 (i32.const 0))) + (local.set 0x15c (i64.load offset=0x15c align=1 (i32.const 0))) + (local.set 0x15d (i64.load offset=0x15d align=1 (i32.const 0))) + (local.set 0x15e (i64.load offset=0x15e align=1 (i32.const 0))) + (local.set 0x15f (i64.load offset=0x15f align=1 (i32.const 0))) + (local.set 0x160 (i64.load offset=0x160 align=1 (i32.const 0))) + (local.set 0x161 (i64.load offset=0x161 align=1 (i32.const 0))) + (local.set 0x162 (i64.load offset=0x162 align=1 (i32.const 0))) + (local.set 0x163 (i64.load offset=0x163 align=1 (i32.const 0))) + (local.set 0x164 (i64.load offset=0x164 align=1 (i32.const 0))) + (local.set 0x165 (i64.load offset=0x165 align=1 (i32.const 0))) + (local.set 0x166 (i64.load offset=0x166 align=1 (i32.const 0))) + (local.set 0x167 (i64.load offset=0x167 align=1 (i32.const 0))) + (local.set 0x168 (i64.load offset=0x168 align=1 (i32.const 0))) + (local.set 0x169 (i64.load offset=0x169 align=1 (i32.const 0))) + (local.set 0x16a (i64.load offset=0x16a align=1 (i32.const 0))) + (local.set 0x16b (i64.load offset=0x16b align=1 (i32.const 0))) + (local.set 0x16c (i64.load offset=0x16c align=1 (i32.const 0))) + (local.set 0x16d (i64.load offset=0x16d align=1 (i32.const 0))) + (local.set 0x16e (i64.load offset=0x16e align=1 (i32.const 0))) + (local.set 0x16f (i64.load offset=0x16f align=1 (i32.const 0))) + (local.set 0x170 (i64.load offset=0x170 align=1 (i32.const 0))) + (local.set 0x171 (i64.load offset=0x171 align=1 (i32.const 0))) + (local.set 0x172 (i64.load offset=0x172 align=1 (i32.const 0))) + (local.set 0x173 (i64.load offset=0x173 align=1 (i32.const 0))) + (local.set 0x174 (i64.load offset=0x174 align=1 (i32.const 0))) + (local.set 0x175 (i64.load offset=0x175 align=1 (i32.const 0))) + (local.set 0x176 (i64.load offset=0x176 align=1 (i32.const 0))) + (local.set 0x177 (i64.load offset=0x177 align=1 (i32.const 0))) + (local.set 0x178 (i64.load offset=0x178 align=1 (i32.const 0))) + (local.set 0x179 (i64.load offset=0x179 align=1 (i32.const 0))) + (local.set 0x17a (i64.load offset=0x17a align=1 (i32.const 0))) + (local.set 0x17b (i64.load offset=0x17b align=1 (i32.const 0))) + (local.set 0x17c (i64.load offset=0x17c align=1 (i32.const 0))) + (local.set 0x17d (i64.load offset=0x17d align=1 (i32.const 0))) + (local.set 0x17e (i64.load offset=0x17e align=1 (i32.const 0))) + (local.set 0x17f (i64.load offset=0x17f align=1 (i32.const 0))) + (local.set 0x180 (i64.load offset=0x180 align=1 (i32.const 0))) + (local.set 0x181 (i64.load offset=0x181 align=1 (i32.const 0))) + (local.set 0x182 (i64.load offset=0x182 align=1 (i32.const 0))) + (local.set 0x183 (i64.load offset=0x183 align=1 (i32.const 0))) + (local.set 0x184 (i64.load offset=0x184 align=1 (i32.const 0))) + (local.set 0x185 (i64.load offset=0x185 align=1 (i32.const 0))) + (local.set 0x186 (i64.load offset=0x186 align=1 (i32.const 0))) + (local.set 0x187 (i64.load offset=0x187 align=1 (i32.const 0))) + (local.set 0x188 (i64.load offset=0x188 align=1 (i32.const 0))) + (local.set 0x189 (i64.load offset=0x189 align=1 (i32.const 0))) + (local.set 0x18a (i64.load offset=0x18a align=1 (i32.const 0))) + (local.set 0x18b (i64.load offset=0x18b align=1 (i32.const 0))) + (local.set 0x18c (i64.load offset=0x18c align=1 (i32.const 0))) + (local.set 0x18d (i64.load offset=0x18d align=1 (i32.const 0))) + (local.set 0x18e (i64.load offset=0x18e align=1 (i32.const 0))) + (local.set 0x18f (i64.load offset=0x18f align=1 (i32.const 0))) + (local.set 0x190 (i64.load offset=0x190 align=1 (i32.const 0))) + (local.set 0x191 (i64.load offset=0x191 align=1 (i32.const 0))) + (local.set 0x192 (i64.load offset=0x192 align=1 (i32.const 0))) + (local.set 0x193 (i64.load offset=0x193 align=1 (i32.const 0))) + (local.set 0x194 (i64.load offset=0x194 align=1 (i32.const 0))) + (local.set 0x195 (i64.load offset=0x195 align=1 (i32.const 0))) + (local.set 0x196 (i64.load offset=0x196 align=1 (i32.const 0))) + (local.set 0x197 (i64.load offset=0x197 align=1 (i32.const 0))) + (local.set 0x198 (i64.load offset=0x198 align=1 (i32.const 0))) + (local.set 0x199 (i64.load offset=0x199 align=1 (i32.const 0))) + (local.set 0x19a (i64.load offset=0x19a align=1 (i32.const 0))) + (local.set 0x19b (i64.load offset=0x19b align=1 (i32.const 0))) + (local.set 0x19c (i64.load offset=0x19c align=1 (i32.const 0))) + (local.set 0x19d (i64.load offset=0x19d align=1 (i32.const 0))) + (local.set 0x19e (i64.load offset=0x19e align=1 (i32.const 0))) + (local.set 0x19f (i64.load offset=0x19f align=1 (i32.const 0))) + (local.set 0x1a0 (i64.load offset=0x1a0 align=1 (i32.const 0))) + (local.set 0x1a1 (i64.load offset=0x1a1 align=1 (i32.const 0))) + (local.set 0x1a2 (i64.load offset=0x1a2 align=1 (i32.const 0))) + (local.set 0x1a3 (i64.load offset=0x1a3 align=1 (i32.const 0))) + (local.set 0x1a4 (i64.load offset=0x1a4 align=1 (i32.const 0))) + (local.set 0x1a5 (i64.load offset=0x1a5 align=1 (i32.const 0))) + (local.set 0x1a6 (i64.load offset=0x1a6 align=1 (i32.const 0))) + (local.set 0x1a7 (i64.load offset=0x1a7 align=1 (i32.const 0))) + (local.set 0x1a8 (i64.load offset=0x1a8 align=1 (i32.const 0))) + (local.set 0x1a9 (i64.load offset=0x1a9 align=1 (i32.const 0))) + (local.set 0x1aa (i64.load offset=0x1aa align=1 (i32.const 0))) + (local.set 0x1ab (i64.load offset=0x1ab align=1 (i32.const 0))) + (local.set 0x1ac (i64.load offset=0x1ac align=1 (i32.const 0))) + (local.set 0x1ad (i64.load offset=0x1ad align=1 (i32.const 0))) + (local.set 0x1ae (i64.load offset=0x1ae align=1 (i32.const 0))) + (local.set 0x1af (i64.load offset=0x1af align=1 (i32.const 0))) + (local.set 0x1b0 (i64.load offset=0x1b0 align=1 (i32.const 0))) + (local.set 0x1b1 (i64.load offset=0x1b1 align=1 (i32.const 0))) + (local.set 0x1b2 (i64.load offset=0x1b2 align=1 (i32.const 0))) + (local.set 0x1b3 (i64.load offset=0x1b3 align=1 (i32.const 0))) + (local.set 0x1b4 (i64.load offset=0x1b4 align=1 (i32.const 0))) + (local.set 0x1b5 (i64.load offset=0x1b5 align=1 (i32.const 0))) + (local.set 0x1b6 (i64.load offset=0x1b6 align=1 (i32.const 0))) + (local.set 0x1b7 (i64.load offset=0x1b7 align=1 (i32.const 0))) + (local.set 0x1b8 (i64.load offset=0x1b8 align=1 (i32.const 0))) + (local.set 0x1b9 (i64.load offset=0x1b9 align=1 (i32.const 0))) + (local.set 0x1ba (i64.load offset=0x1ba align=1 (i32.const 0))) + (local.set 0x1bb (i64.load offset=0x1bb align=1 (i32.const 0))) + (local.set 0x1bc (i64.load offset=0x1bc align=1 (i32.const 0))) + (local.set 0x1bd (i64.load offset=0x1bd align=1 (i32.const 0))) + (local.set 0x1be (i64.load offset=0x1be align=1 (i32.const 0))) + (local.set 0x1bf (i64.load offset=0x1bf align=1 (i32.const 0))) + (local.set 0x1c0 (i64.load offset=0x1c0 align=1 (i32.const 0))) + (local.set 0x1c1 (i64.load offset=0x1c1 align=1 (i32.const 0))) + (local.set 0x1c2 (i64.load offset=0x1c2 align=1 (i32.const 0))) + (local.set 0x1c3 (i64.load offset=0x1c3 align=1 (i32.const 0))) + (local.set 0x1c4 (i64.load offset=0x1c4 align=1 (i32.const 0))) + (local.set 0x1c5 (i64.load offset=0x1c5 align=1 (i32.const 0))) + (local.set 0x1c6 (i64.load offset=0x1c6 align=1 (i32.const 0))) + (local.set 0x1c7 (i64.load offset=0x1c7 align=1 (i32.const 0))) + (local.set 0x1c8 (i64.load offset=0x1c8 align=1 (i32.const 0))) + (local.set 0x1c9 (i64.load offset=0x1c9 align=1 (i32.const 0))) + (local.set 0x1ca (i64.load offset=0x1ca align=1 (i32.const 0))) + (local.set 0x1cb (i64.load offset=0x1cb align=1 (i32.const 0))) + (local.set 0x1cc (i64.load offset=0x1cc align=1 (i32.const 0))) + (local.set 0x1cd (i64.load offset=0x1cd align=1 (i32.const 0))) + (local.set 0x1ce (i64.load offset=0x1ce align=1 (i32.const 0))) + (local.set 0x1cf (i64.load offset=0x1cf align=1 (i32.const 0))) + (local.set 0x1d0 (i64.load offset=0x1d0 align=1 (i32.const 0))) + (local.set 0x1d1 (i64.load offset=0x1d1 align=1 (i32.const 0))) + (local.set 0x1d2 (i64.load offset=0x1d2 align=1 (i32.const 0))) + (local.set 0x1d3 (i64.load offset=0x1d3 align=1 (i32.const 0))) + (local.set 0x1d4 (i64.load offset=0x1d4 align=1 (i32.const 0))) + (local.set 0x1d5 (i64.load offset=0x1d5 align=1 (i32.const 0))) + (local.set 0x1d6 (i64.load offset=0x1d6 align=1 (i32.const 0))) + (local.set 0x1d7 (i64.load offset=0x1d7 align=1 (i32.const 0))) + (local.set 0x1d8 (i64.load offset=0x1d8 align=1 (i32.const 0))) + (local.set 0x1d9 (i64.load offset=0x1d9 align=1 (i32.const 0))) + (local.set 0x1da (i64.load offset=0x1da align=1 (i32.const 0))) + (local.set 0x1db (i64.load offset=0x1db align=1 (i32.const 0))) + (local.set 0x1dc (i64.load offset=0x1dc align=1 (i32.const 0))) + (local.set 0x1dd (i64.load offset=0x1dd align=1 (i32.const 0))) + (local.set 0x1de (i64.load offset=0x1de align=1 (i32.const 0))) + (local.set 0x1df (i64.load offset=0x1df align=1 (i32.const 0))) + (local.set 0x1e0 (i64.load offset=0x1e0 align=1 (i32.const 0))) + (local.set 0x1e1 (i64.load offset=0x1e1 align=1 (i32.const 0))) + (local.set 0x1e2 (i64.load offset=0x1e2 align=1 (i32.const 0))) + (local.set 0x1e3 (i64.load offset=0x1e3 align=1 (i32.const 0))) + (local.set 0x1e4 (i64.load offset=0x1e4 align=1 (i32.const 0))) + (local.set 0x1e5 (i64.load offset=0x1e5 align=1 (i32.const 0))) + (local.set 0x1e6 (i64.load offset=0x1e6 align=1 (i32.const 0))) + (local.set 0x1e7 (i64.load offset=0x1e7 align=1 (i32.const 0))) + (local.set 0x1e8 (i64.load offset=0x1e8 align=1 (i32.const 0))) + (local.set 0x1e9 (i64.load offset=0x1e9 align=1 (i32.const 0))) + (local.set 0x1ea (i64.load offset=0x1ea align=1 (i32.const 0))) + (local.set 0x1eb (i64.load offset=0x1eb align=1 (i32.const 0))) + (local.set 0x1ec (i64.load offset=0x1ec align=1 (i32.const 0))) + (local.set 0x1ed (i64.load offset=0x1ed align=1 (i32.const 0))) + (local.set 0x1ee (i64.load offset=0x1ee align=1 (i32.const 0))) + (local.set 0x1ef (i64.load offset=0x1ef align=1 (i32.const 0))) + (local.set 0x1f0 (i64.load offset=0x1f0 align=1 (i32.const 0))) + (local.set 0x1f1 (i64.load offset=0x1f1 align=1 (i32.const 0))) + (local.set 0x1f2 (i64.load offset=0x1f2 align=1 (i32.const 0))) + (local.set 0x1f3 (i64.load offset=0x1f3 align=1 (i32.const 0))) + (local.set 0x1f4 (i64.load offset=0x1f4 align=1 (i32.const 0))) + (local.set 0x1f5 (i64.load offset=0x1f5 align=1 (i32.const 0))) + (local.set 0x1f6 (i64.load offset=0x1f6 align=1 (i32.const 0))) + (local.set 0x1f7 (i64.load offset=0x1f7 align=1 (i32.const 0))) + (local.set 0x1f8 (i64.load offset=0x1f8 align=1 (i32.const 0))) + (local.set 0x1f9 (i64.load offset=0x1f9 align=1 (i32.const 0))) + (local.set 0x1fa (i64.load offset=0x1fa align=1 (i32.const 0))) + (local.set 0x1fb (i64.load offset=0x1fb align=1 (i32.const 0))) + (local.set 0x1fc (i64.load offset=0x1fc align=1 (i32.const 0))) + (local.set 0x1fd (i64.load offset=0x1fd align=1 (i32.const 0))) + (local.set 0x1fe (i64.load offset=0x1fe align=1 (i32.const 0))) + (local.set 0x1ff (i64.load offset=0x1ff align=1 (i32.const 0))) + (local.set 0x200 (i64.load offset=0x200 align=1 (i32.const 0))) + (local.set 0x201 (i64.load offset=0x201 align=1 (i32.const 0))) + (local.set 0x202 (i64.load offset=0x202 align=1 (i32.const 0))) + (local.set 0x203 (i64.load offset=0x203 align=1 (i32.const 0))) + (local.set 0x204 (i64.load offset=0x204 align=1 (i32.const 0))) + (local.set 0x205 (i64.load offset=0x205 align=1 (i32.const 0))) + (local.set 0x206 (i64.load offset=0x206 align=1 (i32.const 0))) + (local.set 0x207 (i64.load offset=0x207 align=1 (i32.const 0))) + (local.set 0x208 (i64.load offset=0x208 align=1 (i32.const 0))) + (local.set 0x209 (i64.load offset=0x209 align=1 (i32.const 0))) + (local.set 0x20a (i64.load offset=0x20a align=1 (i32.const 0))) + (local.set 0x20b (i64.load offset=0x20b align=1 (i32.const 0))) + (local.set 0x20c (i64.load offset=0x20c align=1 (i32.const 0))) + (local.set 0x20d (i64.load offset=0x20d align=1 (i32.const 0))) + (local.set 0x20e (i64.load offset=0x20e align=1 (i32.const 0))) + (local.set 0x20f (i64.load offset=0x20f align=1 (i32.const 0))) + (local.set 0x210 (i64.load offset=0x210 align=1 (i32.const 0))) + (local.set 0x211 (i64.load offset=0x211 align=1 (i32.const 0))) + (local.set 0x212 (i64.load offset=0x212 align=1 (i32.const 0))) + (local.set 0x213 (i64.load offset=0x213 align=1 (i32.const 0))) + (local.set 0x214 (i64.load offset=0x214 align=1 (i32.const 0))) + (local.set 0x215 (i64.load offset=0x215 align=1 (i32.const 0))) + (local.set 0x216 (i64.load offset=0x216 align=1 (i32.const 0))) + (local.set 0x217 (i64.load offset=0x217 align=1 (i32.const 0))) + (local.set 0x218 (i64.load offset=0x218 align=1 (i32.const 0))) + (local.set 0x219 (i64.load offset=0x219 align=1 (i32.const 0))) + (local.set 0x21a (i64.load offset=0x21a align=1 (i32.const 0))) + (local.set 0x21b (i64.load offset=0x21b align=1 (i32.const 0))) + (local.set 0x21c (i64.load offset=0x21c align=1 (i32.const 0))) + (local.set 0x21d (i64.load offset=0x21d align=1 (i32.const 0))) + (local.set 0x21e (i64.load offset=0x21e align=1 (i32.const 0))) + (local.set 0x21f (i64.load offset=0x21f align=1 (i32.const 0))) + (local.set 0x220 (i64.load offset=0x220 align=1 (i32.const 0))) + (local.set 0x221 (i64.load offset=0x221 align=1 (i32.const 0))) + (local.set 0x222 (i64.load offset=0x222 align=1 (i32.const 0))) + (local.set 0x223 (i64.load offset=0x223 align=1 (i32.const 0))) + (local.set 0x224 (i64.load offset=0x224 align=1 (i32.const 0))) + (local.set 0x225 (i64.load offset=0x225 align=1 (i32.const 0))) + (local.set 0x226 (i64.load offset=0x226 align=1 (i32.const 0))) + (local.set 0x227 (i64.load offset=0x227 align=1 (i32.const 0))) + (local.set 0x228 (i64.load offset=0x228 align=1 (i32.const 0))) + (local.set 0x229 (i64.load offset=0x229 align=1 (i32.const 0))) + (local.set 0x22a (i64.load offset=0x22a align=1 (i32.const 0))) + (local.set 0x22b (i64.load offset=0x22b align=1 (i32.const 0))) + (local.set 0x22c (i64.load offset=0x22c align=1 (i32.const 0))) + (local.set 0x22d (i64.load offset=0x22d align=1 (i32.const 0))) + (local.set 0x22e (i64.load offset=0x22e align=1 (i32.const 0))) + (local.set 0x22f (i64.load offset=0x22f align=1 (i32.const 0))) + (local.set 0x230 (i64.load offset=0x230 align=1 (i32.const 0))) + (local.set 0x231 (i64.load offset=0x231 align=1 (i32.const 0))) + (local.set 0x232 (i64.load offset=0x232 align=1 (i32.const 0))) + (local.set 0x233 (i64.load offset=0x233 align=1 (i32.const 0))) + (local.set 0x234 (i64.load offset=0x234 align=1 (i32.const 0))) + (local.set 0x235 (i64.load offset=0x235 align=1 (i32.const 0))) + (local.set 0x236 (i64.load offset=0x236 align=1 (i32.const 0))) + (local.set 0x237 (i64.load offset=0x237 align=1 (i32.const 0))) + (local.set 0x238 (i64.load offset=0x238 align=1 (i32.const 0))) + (local.set 0x239 (i64.load offset=0x239 align=1 (i32.const 0))) + (local.set 0x23a (i64.load offset=0x23a align=1 (i32.const 0))) + (local.set 0x23b (i64.load offset=0x23b align=1 (i32.const 0))) + (local.set 0x23c (i64.load offset=0x23c align=1 (i32.const 0))) + (local.set 0x23d (i64.load offset=0x23d align=1 (i32.const 0))) + (local.set 0x23e (i64.load offset=0x23e align=1 (i32.const 0))) + (local.set 0x23f (i64.load offset=0x23f align=1 (i32.const 0))) + (local.set 0x240 (i64.load offset=0x240 align=1 (i32.const 0))) + (local.set 0x241 (i64.load offset=0x241 align=1 (i32.const 0))) + (local.set 0x242 (i64.load offset=0x242 align=1 (i32.const 0))) + (local.set 0x243 (i64.load offset=0x243 align=1 (i32.const 0))) + (local.set 0x244 (i64.load offset=0x244 align=1 (i32.const 0))) + (local.set 0x245 (i64.load offset=0x245 align=1 (i32.const 0))) + (local.set 0x246 (i64.load offset=0x246 align=1 (i32.const 0))) + (local.set 0x247 (i64.load offset=0x247 align=1 (i32.const 0))) + (local.set 0x248 (i64.load offset=0x248 align=1 (i32.const 0))) + (local.set 0x249 (i64.load offset=0x249 align=1 (i32.const 0))) + (local.set 0x24a (i64.load offset=0x24a align=1 (i32.const 0))) + (local.set 0x24b (i64.load offset=0x24b align=1 (i32.const 0))) + (local.set 0x24c (i64.load offset=0x24c align=1 (i32.const 0))) + (local.set 0x24d (i64.load offset=0x24d align=1 (i32.const 0))) + (local.set 0x24e (i64.load offset=0x24e align=1 (i32.const 0))) + (local.set 0x24f (i64.load offset=0x24f align=1 (i32.const 0))) + (local.set 0x250 (i64.load offset=0x250 align=1 (i32.const 0))) + (local.set 0x251 (i64.load offset=0x251 align=1 (i32.const 0))) + (local.set 0x252 (i64.load offset=0x252 align=1 (i32.const 0))) + (local.set 0x253 (i64.load offset=0x253 align=1 (i32.const 0))) + (local.set 0x254 (i64.load offset=0x254 align=1 (i32.const 0))) + (local.set 0x255 (i64.load offset=0x255 align=1 (i32.const 0))) + (local.set 0x256 (i64.load offset=0x256 align=1 (i32.const 0))) + (local.set 0x257 (i64.load offset=0x257 align=1 (i32.const 0))) + (local.set 0x258 (i64.load offset=0x258 align=1 (i32.const 0))) + (local.set 0x259 (i64.load offset=0x259 align=1 (i32.const 0))) + (local.set 0x25a (i64.load offset=0x25a align=1 (i32.const 0))) + (local.set 0x25b (i64.load offset=0x25b align=1 (i32.const 0))) + (local.set 0x25c (i64.load offset=0x25c align=1 (i32.const 0))) + (local.set 0x25d (i64.load offset=0x25d align=1 (i32.const 0))) + (local.set 0x25e (i64.load offset=0x25e align=1 (i32.const 0))) + (local.set 0x25f (i64.load offset=0x25f align=1 (i32.const 0))) + (local.set 0x260 (i64.load offset=0x260 align=1 (i32.const 0))) + (local.set 0x261 (i64.load offset=0x261 align=1 (i32.const 0))) + (local.set 0x262 (i64.load offset=0x262 align=1 (i32.const 0))) + (local.set 0x263 (i64.load offset=0x263 align=1 (i32.const 0))) + (local.set 0x264 (i64.load offset=0x264 align=1 (i32.const 0))) + (local.set 0x265 (i64.load offset=0x265 align=1 (i32.const 0))) + (local.set 0x266 (i64.load offset=0x266 align=1 (i32.const 0))) + (local.set 0x267 (i64.load offset=0x267 align=1 (i32.const 0))) + (local.set 0x268 (i64.load offset=0x268 align=1 (i32.const 0))) + (local.set 0x269 (i64.load offset=0x269 align=1 (i32.const 0))) + (local.set 0x26a (i64.load offset=0x26a align=1 (i32.const 0))) + (local.set 0x26b (i64.load offset=0x26b align=1 (i32.const 0))) + (local.set 0x26c (i64.load offset=0x26c align=1 (i32.const 0))) + (local.set 0x26d (i64.load offset=0x26d align=1 (i32.const 0))) + (local.set 0x26e (i64.load offset=0x26e align=1 (i32.const 0))) + (local.set 0x26f (i64.load offset=0x26f align=1 (i32.const 0))) + (local.set 0x270 (i64.load offset=0x270 align=1 (i32.const 0))) + (local.set 0x271 (i64.load offset=0x271 align=1 (i32.const 0))) + (local.set 0x272 (i64.load offset=0x272 align=1 (i32.const 0))) + (local.set 0x273 (i64.load offset=0x273 align=1 (i32.const 0))) + (local.set 0x274 (i64.load offset=0x274 align=1 (i32.const 0))) + (local.set 0x275 (i64.load offset=0x275 align=1 (i32.const 0))) + (local.set 0x276 (i64.load offset=0x276 align=1 (i32.const 0))) + (local.set 0x277 (i64.load offset=0x277 align=1 (i32.const 0))) + (local.set 0x278 (i64.load offset=0x278 align=1 (i32.const 0))) + (local.set 0x279 (i64.load offset=0x279 align=1 (i32.const 0))) + (local.set 0x27a (i64.load offset=0x27a align=1 (i32.const 0))) + (local.set 0x27b (i64.load offset=0x27b align=1 (i32.const 0))) + (local.set 0x27c (i64.load offset=0x27c align=1 (i32.const 0))) + (local.set 0x27d (i64.load offset=0x27d align=1 (i32.const 0))) + (local.set 0x27e (i64.load offset=0x27e align=1 (i32.const 0))) + (local.set 0x27f (i64.load offset=0x27f align=1 (i32.const 0))) + (local.set 0x280 (i64.load offset=0x280 align=1 (i32.const 0))) + (local.set 0x281 (i64.load offset=0x281 align=1 (i32.const 0))) + (local.set 0x282 (i64.load offset=0x282 align=1 (i32.const 0))) + (local.set 0x283 (i64.load offset=0x283 align=1 (i32.const 0))) + (local.set 0x284 (i64.load offset=0x284 align=1 (i32.const 0))) + (local.set 0x285 (i64.load offset=0x285 align=1 (i32.const 0))) + (local.set 0x286 (i64.load offset=0x286 align=1 (i32.const 0))) + (local.set 0x287 (i64.load offset=0x287 align=1 (i32.const 0))) + (local.set 0x288 (i64.load offset=0x288 align=1 (i32.const 0))) + (local.set 0x289 (i64.load offset=0x289 align=1 (i32.const 0))) + (local.set 0x28a (i64.load offset=0x28a align=1 (i32.const 0))) + (local.set 0x28b (i64.load offset=0x28b align=1 (i32.const 0))) + (local.set 0x28c (i64.load offset=0x28c align=1 (i32.const 0))) + (local.set 0x28d (i64.load offset=0x28d align=1 (i32.const 0))) + (local.set 0x28e (i64.load offset=0x28e align=1 (i32.const 0))) + (local.set 0x28f (i64.load offset=0x28f align=1 (i32.const 0))) + (local.set 0x290 (i64.load offset=0x290 align=1 (i32.const 0))) + (local.set 0x291 (i64.load offset=0x291 align=1 (i32.const 0))) + (local.set 0x292 (i64.load offset=0x292 align=1 (i32.const 0))) + (local.set 0x293 (i64.load offset=0x293 align=1 (i32.const 0))) + (local.set 0x294 (i64.load offset=0x294 align=1 (i32.const 0))) + (local.set 0x295 (i64.load offset=0x295 align=1 (i32.const 0))) + (local.set 0x296 (i64.load offset=0x296 align=1 (i32.const 0))) + (local.set 0x297 (i64.load offset=0x297 align=1 (i32.const 0))) + (local.set 0x298 (i64.load offset=0x298 align=1 (i32.const 0))) + (local.set 0x299 (i64.load offset=0x299 align=1 (i32.const 0))) + (local.set 0x29a (i64.load offset=0x29a align=1 (i32.const 0))) + (local.set 0x29b (i64.load offset=0x29b align=1 (i32.const 0))) + (local.set 0x29c (i64.load offset=0x29c align=1 (i32.const 0))) + (local.set 0x29d (i64.load offset=0x29d align=1 (i32.const 0))) + (local.set 0x29e (i64.load offset=0x29e align=1 (i32.const 0))) + (local.set 0x29f (i64.load offset=0x29f align=1 (i32.const 0))) + (local.set 0x2a0 (i64.load offset=0x2a0 align=1 (i32.const 0))) + (local.set 0x2a1 (i64.load offset=0x2a1 align=1 (i32.const 0))) + (local.set 0x2a2 (i64.load offset=0x2a2 align=1 (i32.const 0))) + (local.set 0x2a3 (i64.load offset=0x2a3 align=1 (i32.const 0))) + (local.set 0x2a4 (i64.load offset=0x2a4 align=1 (i32.const 0))) + (local.set 0x2a5 (i64.load offset=0x2a5 align=1 (i32.const 0))) + (local.set 0x2a6 (i64.load offset=0x2a6 align=1 (i32.const 0))) + (local.set 0x2a7 (i64.load offset=0x2a7 align=1 (i32.const 0))) + (local.set 0x2a8 (i64.load offset=0x2a8 align=1 (i32.const 0))) + (local.set 0x2a9 (i64.load offset=0x2a9 align=1 (i32.const 0))) + (local.set 0x2aa (i64.load offset=0x2aa align=1 (i32.const 0))) + (local.set 0x2ab (i64.load offset=0x2ab align=1 (i32.const 0))) + (local.set 0x2ac (i64.load offset=0x2ac align=1 (i32.const 0))) + (local.set 0x2ad (i64.load offset=0x2ad align=1 (i32.const 0))) + (local.set 0x2ae (i64.load offset=0x2ae align=1 (i32.const 0))) + (local.set 0x2af (i64.load offset=0x2af align=1 (i32.const 0))) + (local.set 0x2b0 (i64.load offset=0x2b0 align=1 (i32.const 0))) + (local.set 0x2b1 (i64.load offset=0x2b1 align=1 (i32.const 0))) + (local.set 0x2b2 (i64.load offset=0x2b2 align=1 (i32.const 0))) + (local.set 0x2b3 (i64.load offset=0x2b3 align=1 (i32.const 0))) + (local.set 0x2b4 (i64.load offset=0x2b4 align=1 (i32.const 0))) + (local.set 0x2b5 (i64.load offset=0x2b5 align=1 (i32.const 0))) + (local.set 0x2b6 (i64.load offset=0x2b6 align=1 (i32.const 0))) + (local.set 0x2b7 (i64.load offset=0x2b7 align=1 (i32.const 0))) + (local.set 0x2b8 (i64.load offset=0x2b8 align=1 (i32.const 0))) + (local.set 0x2b9 (i64.load offset=0x2b9 align=1 (i32.const 0))) + (local.set 0x2ba (i64.load offset=0x2ba align=1 (i32.const 0))) + (local.set 0x2bb (i64.load offset=0x2bb align=1 (i32.const 0))) + (local.set 0x2bc (i64.load offset=0x2bc align=1 (i32.const 0))) + (local.set 0x2bd (i64.load offset=0x2bd align=1 (i32.const 0))) + (local.set 0x2be (i64.load offset=0x2be align=1 (i32.const 0))) + (local.set 0x2bf (i64.load offset=0x2bf align=1 (i32.const 0))) + (local.set 0x2c0 (i64.load offset=0x2c0 align=1 (i32.const 0))) + (local.set 0x2c1 (i64.load offset=0x2c1 align=1 (i32.const 0))) + (local.set 0x2c2 (i64.load offset=0x2c2 align=1 (i32.const 0))) + (local.set 0x2c3 (i64.load offset=0x2c3 align=1 (i32.const 0))) + (local.set 0x2c4 (i64.load offset=0x2c4 align=1 (i32.const 0))) + (local.set 0x2c5 (i64.load offset=0x2c5 align=1 (i32.const 0))) + (local.set 0x2c6 (i64.load offset=0x2c6 align=1 (i32.const 0))) + (local.set 0x2c7 (i64.load offset=0x2c7 align=1 (i32.const 0))) + (local.set 0x2c8 (i64.load offset=0x2c8 align=1 (i32.const 0))) + (local.set 0x2c9 (i64.load offset=0x2c9 align=1 (i32.const 0))) + (local.set 0x2ca (i64.load offset=0x2ca align=1 (i32.const 0))) + (local.set 0x2cb (i64.load offset=0x2cb align=1 (i32.const 0))) + (local.set 0x2cc (i64.load offset=0x2cc align=1 (i32.const 0))) + (local.set 0x2cd (i64.load offset=0x2cd align=1 (i32.const 0))) + (local.set 0x2ce (i64.load offset=0x2ce align=1 (i32.const 0))) + (local.set 0x2cf (i64.load offset=0x2cf align=1 (i32.const 0))) + (local.set 0x2d0 (i64.load offset=0x2d0 align=1 (i32.const 0))) + (local.set 0x2d1 (i64.load offset=0x2d1 align=1 (i32.const 0))) + (local.set 0x2d2 (i64.load offset=0x2d2 align=1 (i32.const 0))) + (local.set 0x2d3 (i64.load offset=0x2d3 align=1 (i32.const 0))) + (local.set 0x2d4 (i64.load offset=0x2d4 align=1 (i32.const 0))) + (local.set 0x2d5 (i64.load offset=0x2d5 align=1 (i32.const 0))) + (local.set 0x2d6 (i64.load offset=0x2d6 align=1 (i32.const 0))) + (local.set 0x2d7 (i64.load offset=0x2d7 align=1 (i32.const 0))) + (local.set 0x2d8 (i64.load offset=0x2d8 align=1 (i32.const 0))) + (local.set 0x2d9 (i64.load offset=0x2d9 align=1 (i32.const 0))) + (local.set 0x2da (i64.load offset=0x2da align=1 (i32.const 0))) + (local.set 0x2db (i64.load offset=0x2db align=1 (i32.const 0))) + (local.set 0x2dc (i64.load offset=0x2dc align=1 (i32.const 0))) + (local.set 0x2dd (i64.load offset=0x2dd align=1 (i32.const 0))) + (local.set 0x2de (i64.load offset=0x2de align=1 (i32.const 0))) + (local.set 0x2df (i64.load offset=0x2df align=1 (i32.const 0))) + (local.set 0x2e0 (i64.load offset=0x2e0 align=1 (i32.const 0))) + (local.set 0x2e1 (i64.load offset=0x2e1 align=1 (i32.const 0))) + (local.set 0x2e2 (i64.load offset=0x2e2 align=1 (i32.const 0))) + (local.set 0x2e3 (i64.load offset=0x2e3 align=1 (i32.const 0))) + (local.set 0x2e4 (i64.load offset=0x2e4 align=1 (i32.const 0))) + (local.set 0x2e5 (i64.load offset=0x2e5 align=1 (i32.const 0))) + (local.set 0x2e6 (i64.load offset=0x2e6 align=1 (i32.const 0))) + (local.set 0x2e7 (i64.load offset=0x2e7 align=1 (i32.const 0))) + (local.set 0x2e8 (i64.load offset=0x2e8 align=1 (i32.const 0))) + (local.set 0x2e9 (i64.load offset=0x2e9 align=1 (i32.const 0))) + (local.set 0x2ea (i64.load offset=0x2ea align=1 (i32.const 0))) + (local.set 0x2eb (i64.load offset=0x2eb align=1 (i32.const 0))) + (local.set 0x2ec (i64.load offset=0x2ec align=1 (i32.const 0))) + (local.set 0x2ed (i64.load offset=0x2ed align=1 (i32.const 0))) + (local.set 0x2ee (i64.load offset=0x2ee align=1 (i32.const 0))) + (local.set 0x2ef (i64.load offset=0x2ef align=1 (i32.const 0))) + (local.set 0x2f0 (i64.load offset=0x2f0 align=1 (i32.const 0))) + (local.set 0x2f1 (i64.load offset=0x2f1 align=1 (i32.const 0))) + (local.set 0x2f2 (i64.load offset=0x2f2 align=1 (i32.const 0))) + (local.set 0x2f3 (i64.load offset=0x2f3 align=1 (i32.const 0))) + (local.set 0x2f4 (i64.load offset=0x2f4 align=1 (i32.const 0))) + (local.set 0x2f5 (i64.load offset=0x2f5 align=1 (i32.const 0))) + (local.set 0x2f6 (i64.load offset=0x2f6 align=1 (i32.const 0))) + (local.set 0x2f7 (i64.load offset=0x2f7 align=1 (i32.const 0))) + (local.set 0x2f8 (i64.load offset=0x2f8 align=1 (i32.const 0))) + (local.set 0x2f9 (i64.load offset=0x2f9 align=1 (i32.const 0))) + (local.set 0x2fa (i64.load offset=0x2fa align=1 (i32.const 0))) + (local.set 0x2fb (i64.load offset=0x2fb align=1 (i32.const 0))) + (local.set 0x2fc (i64.load offset=0x2fc align=1 (i32.const 0))) + (local.set 0x2fd (i64.load offset=0x2fd align=1 (i32.const 0))) + (local.set 0x2fe (i64.load offset=0x2fe align=1 (i32.const 0))) + (local.set 0x2ff (i64.load offset=0x2ff align=1 (i32.const 0))) + (local.set 0x300 (i64.load offset=0x300 align=1 (i32.const 0))) + (local.set 0x301 (i64.load offset=0x301 align=1 (i32.const 0))) + (local.set 0x302 (i64.load offset=0x302 align=1 (i32.const 0))) + (local.set 0x303 (i64.load offset=0x303 align=1 (i32.const 0))) + (local.set 0x304 (i64.load offset=0x304 align=1 (i32.const 0))) + (local.set 0x305 (i64.load offset=0x305 align=1 (i32.const 0))) + (local.set 0x306 (i64.load offset=0x306 align=1 (i32.const 0))) + (local.set 0x307 (i64.load offset=0x307 align=1 (i32.const 0))) + (local.set 0x308 (i64.load offset=0x308 align=1 (i32.const 0))) + (local.set 0x309 (i64.load offset=0x309 align=1 (i32.const 0))) + (local.set 0x30a (i64.load offset=0x30a align=1 (i32.const 0))) + (local.set 0x30b (i64.load offset=0x30b align=1 (i32.const 0))) + (local.set 0x30c (i64.load offset=0x30c align=1 (i32.const 0))) + (local.set 0x30d (i64.load offset=0x30d align=1 (i32.const 0))) + (local.set 0x30e (i64.load offset=0x30e align=1 (i32.const 0))) + (local.set 0x30f (i64.load offset=0x30f align=1 (i32.const 0))) + (local.set 0x310 (i64.load offset=0x310 align=1 (i32.const 0))) + (local.set 0x311 (i64.load offset=0x311 align=1 (i32.const 0))) + (local.set 0x312 (i64.load offset=0x312 align=1 (i32.const 0))) + (local.set 0x313 (i64.load offset=0x313 align=1 (i32.const 0))) + (local.set 0x314 (i64.load offset=0x314 align=1 (i32.const 0))) + (local.set 0x315 (i64.load offset=0x315 align=1 (i32.const 0))) + (local.set 0x316 (i64.load offset=0x316 align=1 (i32.const 0))) + (local.set 0x317 (i64.load offset=0x317 align=1 (i32.const 0))) + (local.set 0x318 (i64.load offset=0x318 align=1 (i32.const 0))) + (local.set 0x319 (i64.load offset=0x319 align=1 (i32.const 0))) + (local.set 0x31a (i64.load offset=0x31a align=1 (i32.const 0))) + (local.set 0x31b (i64.load offset=0x31b align=1 (i32.const 0))) + (local.set 0x31c (i64.load offset=0x31c align=1 (i32.const 0))) + (local.set 0x31d (i64.load offset=0x31d align=1 (i32.const 0))) + (local.set 0x31e (i64.load offset=0x31e align=1 (i32.const 0))) + (local.set 0x31f (i64.load offset=0x31f align=1 (i32.const 0))) + (local.set 0x320 (i64.load offset=0x320 align=1 (i32.const 0))) + (local.set 0x321 (i64.load offset=0x321 align=1 (i32.const 0))) + (local.set 0x322 (i64.load offset=0x322 align=1 (i32.const 0))) + (local.set 0x323 (i64.load offset=0x323 align=1 (i32.const 0))) + (local.set 0x324 (i64.load offset=0x324 align=1 (i32.const 0))) + (local.set 0x325 (i64.load offset=0x325 align=1 (i32.const 0))) + (local.set 0x326 (i64.load offset=0x326 align=1 (i32.const 0))) + (local.set 0x327 (i64.load offset=0x327 align=1 (i32.const 0))) + (local.set 0x328 (i64.load offset=0x328 align=1 (i32.const 0))) + (local.set 0x329 (i64.load offset=0x329 align=1 (i32.const 0))) + (local.set 0x32a (i64.load offset=0x32a align=1 (i32.const 0))) + (local.set 0x32b (i64.load offset=0x32b align=1 (i32.const 0))) + (local.set 0x32c (i64.load offset=0x32c align=1 (i32.const 0))) + (local.set 0x32d (i64.load offset=0x32d align=1 (i32.const 0))) + (local.set 0x32e (i64.load offset=0x32e align=1 (i32.const 0))) + (local.set 0x32f (i64.load offset=0x32f align=1 (i32.const 0))) + (local.set 0x330 (i64.load offset=0x330 align=1 (i32.const 0))) + (local.set 0x331 (i64.load offset=0x331 align=1 (i32.const 0))) + (local.set 0x332 (i64.load offset=0x332 align=1 (i32.const 0))) + (local.set 0x333 (i64.load offset=0x333 align=1 (i32.const 0))) + (local.set 0x334 (i64.load offset=0x334 align=1 (i32.const 0))) + (local.set 0x335 (i64.load offset=0x335 align=1 (i32.const 0))) + (local.set 0x336 (i64.load offset=0x336 align=1 (i32.const 0))) + (local.set 0x337 (i64.load offset=0x337 align=1 (i32.const 0))) + (local.set 0x338 (i64.load offset=0x338 align=1 (i32.const 0))) + (local.set 0x339 (i64.load offset=0x339 align=1 (i32.const 0))) + (local.set 0x33a (i64.load offset=0x33a align=1 (i32.const 0))) + (local.set 0x33b (i64.load offset=0x33b align=1 (i32.const 0))) + (local.set 0x33c (i64.load offset=0x33c align=1 (i32.const 0))) + (local.set 0x33d (i64.load offset=0x33d align=1 (i32.const 0))) + (local.set 0x33e (i64.load offset=0x33e align=1 (i32.const 0))) + (local.set 0x33f (i64.load offset=0x33f align=1 (i32.const 0))) + (local.set 0x340 (i64.load offset=0x340 align=1 (i32.const 0))) + (local.set 0x341 (i64.load offset=0x341 align=1 (i32.const 0))) + (local.set 0x342 (i64.load offset=0x342 align=1 (i32.const 0))) + (local.set 0x343 (i64.load offset=0x343 align=1 (i32.const 0))) + (local.set 0x344 (i64.load offset=0x344 align=1 (i32.const 0))) + (local.set 0x345 (i64.load offset=0x345 align=1 (i32.const 0))) + (local.set 0x346 (i64.load offset=0x346 align=1 (i32.const 0))) + (local.set 0x347 (i64.load offset=0x347 align=1 (i32.const 0))) + (local.set 0x348 (i64.load offset=0x348 align=1 (i32.const 0))) + (local.set 0x349 (i64.load offset=0x349 align=1 (i32.const 0))) + (local.set 0x34a (i64.load offset=0x34a align=1 (i32.const 0))) + (local.set 0x34b (i64.load offset=0x34b align=1 (i32.const 0))) + (local.set 0x34c (i64.load offset=0x34c align=1 (i32.const 0))) + (local.set 0x34d (i64.load offset=0x34d align=1 (i32.const 0))) + (local.set 0x34e (i64.load offset=0x34e align=1 (i32.const 0))) + (local.set 0x34f (i64.load offset=0x34f align=1 (i32.const 0))) + (local.set 0x350 (i64.load offset=0x350 align=1 (i32.const 0))) + (local.set 0x351 (i64.load offset=0x351 align=1 (i32.const 0))) + (local.set 0x352 (i64.load offset=0x352 align=1 (i32.const 0))) + (local.set 0x353 (i64.load offset=0x353 align=1 (i32.const 0))) + (local.set 0x354 (i64.load offset=0x354 align=1 (i32.const 0))) + (local.set 0x355 (i64.load offset=0x355 align=1 (i32.const 0))) + (local.set 0x356 (i64.load offset=0x356 align=1 (i32.const 0))) + (local.set 0x357 (i64.load offset=0x357 align=1 (i32.const 0))) + (local.set 0x358 (i64.load offset=0x358 align=1 (i32.const 0))) + (local.set 0x359 (i64.load offset=0x359 align=1 (i32.const 0))) + (local.set 0x35a (i64.load offset=0x35a align=1 (i32.const 0))) + (local.set 0x35b (i64.load offset=0x35b align=1 (i32.const 0))) + (local.set 0x35c (i64.load offset=0x35c align=1 (i32.const 0))) + (local.set 0x35d (i64.load offset=0x35d align=1 (i32.const 0))) + (local.set 0x35e (i64.load offset=0x35e align=1 (i32.const 0))) + (local.set 0x35f (i64.load offset=0x35f align=1 (i32.const 0))) + (local.set 0x360 (i64.load offset=0x360 align=1 (i32.const 0))) + (local.set 0x361 (i64.load offset=0x361 align=1 (i32.const 0))) + (local.set 0x362 (i64.load offset=0x362 align=1 (i32.const 0))) + (local.set 0x363 (i64.load offset=0x363 align=1 (i32.const 0))) + (local.set 0x364 (i64.load offset=0x364 align=1 (i32.const 0))) + (local.set 0x365 (i64.load offset=0x365 align=1 (i32.const 0))) + (local.set 0x366 (i64.load offset=0x366 align=1 (i32.const 0))) + (local.set 0x367 (i64.load offset=0x367 align=1 (i32.const 0))) + (local.set 0x368 (i64.load offset=0x368 align=1 (i32.const 0))) + (local.set 0x369 (i64.load offset=0x369 align=1 (i32.const 0))) + (local.set 0x36a (i64.load offset=0x36a align=1 (i32.const 0))) + (local.set 0x36b (i64.load offset=0x36b align=1 (i32.const 0))) + (local.set 0x36c (i64.load offset=0x36c align=1 (i32.const 0))) + (local.set 0x36d (i64.load offset=0x36d align=1 (i32.const 0))) + (local.set 0x36e (i64.load offset=0x36e align=1 (i32.const 0))) + (local.set 0x36f (i64.load offset=0x36f align=1 (i32.const 0))) + (local.set 0x370 (i64.load offset=0x370 align=1 (i32.const 0))) + (local.set 0x371 (i64.load offset=0x371 align=1 (i32.const 0))) + (local.set 0x372 (i64.load offset=0x372 align=1 (i32.const 0))) + (local.set 0x373 (i64.load offset=0x373 align=1 (i32.const 0))) + (local.set 0x374 (i64.load offset=0x374 align=1 (i32.const 0))) + (local.set 0x375 (i64.load offset=0x375 align=1 (i32.const 0))) + (local.set 0x376 (i64.load offset=0x376 align=1 (i32.const 0))) + (local.set 0x377 (i64.load offset=0x377 align=1 (i32.const 0))) + (local.set 0x378 (i64.load offset=0x378 align=1 (i32.const 0))) + (local.set 0x379 (i64.load offset=0x379 align=1 (i32.const 0))) + (local.set 0x37a (i64.load offset=0x37a align=1 (i32.const 0))) + (local.set 0x37b (i64.load offset=0x37b align=1 (i32.const 0))) + (local.set 0x37c (i64.load offset=0x37c align=1 (i32.const 0))) + (local.set 0x37d (i64.load offset=0x37d align=1 (i32.const 0))) + (local.set 0x37e (i64.load offset=0x37e align=1 (i32.const 0))) + (local.set 0x37f (i64.load offset=0x37f align=1 (i32.const 0))) + (local.set 0x380 (i64.load offset=0x380 align=1 (i32.const 0))) + (local.set 0x381 (i64.load offset=0x381 align=1 (i32.const 0))) + (local.set 0x382 (i64.load offset=0x382 align=1 (i32.const 0))) + (local.set 0x383 (i64.load offset=0x383 align=1 (i32.const 0))) + (local.set 0x384 (i64.load offset=0x384 align=1 (i32.const 0))) + (local.set 0x385 (i64.load offset=0x385 align=1 (i32.const 0))) + (local.set 0x386 (i64.load offset=0x386 align=1 (i32.const 0))) + (local.set 0x387 (i64.load offset=0x387 align=1 (i32.const 0))) + (local.set 0x388 (i64.load offset=0x388 align=1 (i32.const 0))) + (local.set 0x389 (i64.load offset=0x389 align=1 (i32.const 0))) + (local.set 0x38a (i64.load offset=0x38a align=1 (i32.const 0))) + (local.set 0x38b (i64.load offset=0x38b align=1 (i32.const 0))) + (local.set 0x38c (i64.load offset=0x38c align=1 (i32.const 0))) + (local.set 0x38d (i64.load offset=0x38d align=1 (i32.const 0))) + (local.set 0x38e (i64.load offset=0x38e align=1 (i32.const 0))) + (local.set 0x38f (i64.load offset=0x38f align=1 (i32.const 0))) + (local.set 0x390 (i64.load offset=0x390 align=1 (i32.const 0))) + (local.set 0x391 (i64.load offset=0x391 align=1 (i32.const 0))) + (local.set 0x392 (i64.load offset=0x392 align=1 (i32.const 0))) + (local.set 0x393 (i64.load offset=0x393 align=1 (i32.const 0))) + (local.set 0x394 (i64.load offset=0x394 align=1 (i32.const 0))) + (local.set 0x395 (i64.load offset=0x395 align=1 (i32.const 0))) + (local.set 0x396 (i64.load offset=0x396 align=1 (i32.const 0))) + (local.set 0x397 (i64.load offset=0x397 align=1 (i32.const 0))) + (local.set 0x398 (i64.load offset=0x398 align=1 (i32.const 0))) + (local.set 0x399 (i64.load offset=0x399 align=1 (i32.const 0))) + (local.set 0x39a (i64.load offset=0x39a align=1 (i32.const 0))) + (local.set 0x39b (i64.load offset=0x39b align=1 (i32.const 0))) + (local.set 0x39c (i64.load offset=0x39c align=1 (i32.const 0))) + (local.set 0x39d (i64.load offset=0x39d align=1 (i32.const 0))) + (local.set 0x39e (i64.load offset=0x39e align=1 (i32.const 0))) + (local.set 0x39f (i64.load offset=0x39f align=1 (i32.const 0))) + (local.set 0x3a0 (i64.load offset=0x3a0 align=1 (i32.const 0))) + (local.set 0x3a1 (i64.load offset=0x3a1 align=1 (i32.const 0))) + (local.set 0x3a2 (i64.load offset=0x3a2 align=1 (i32.const 0))) + (local.set 0x3a3 (i64.load offset=0x3a3 align=1 (i32.const 0))) + (local.set 0x3a4 (i64.load offset=0x3a4 align=1 (i32.const 0))) + (local.set 0x3a5 (i64.load offset=0x3a5 align=1 (i32.const 0))) + (local.set 0x3a6 (i64.load offset=0x3a6 align=1 (i32.const 0))) + (local.set 0x3a7 (i64.load offset=0x3a7 align=1 (i32.const 0))) + (local.set 0x3a8 (i64.load offset=0x3a8 align=1 (i32.const 0))) + (local.set 0x3a9 (i64.load offset=0x3a9 align=1 (i32.const 0))) + (local.set 0x3aa (i64.load offset=0x3aa align=1 (i32.const 0))) + (local.set 0x3ab (i64.load offset=0x3ab align=1 (i32.const 0))) + (local.set 0x3ac (i64.load offset=0x3ac align=1 (i32.const 0))) + (local.set 0x3ad (i64.load offset=0x3ad align=1 (i32.const 0))) + (local.set 0x3ae (i64.load offset=0x3ae align=1 (i32.const 0))) + (local.set 0x3af (i64.load offset=0x3af align=1 (i32.const 0))) + (local.set 0x3b0 (i64.load offset=0x3b0 align=1 (i32.const 0))) + (local.set 0x3b1 (i64.load offset=0x3b1 align=1 (i32.const 0))) + (local.set 0x3b2 (i64.load offset=0x3b2 align=1 (i32.const 0))) + (local.set 0x3b3 (i64.load offset=0x3b3 align=1 (i32.const 0))) + (local.set 0x3b4 (i64.load offset=0x3b4 align=1 (i32.const 0))) + (local.set 0x3b5 (i64.load offset=0x3b5 align=1 (i32.const 0))) + (local.set 0x3b6 (i64.load offset=0x3b6 align=1 (i32.const 0))) + (local.set 0x3b7 (i64.load offset=0x3b7 align=1 (i32.const 0))) + (local.set 0x3b8 (i64.load offset=0x3b8 align=1 (i32.const 0))) + (local.set 0x3b9 (i64.load offset=0x3b9 align=1 (i32.const 0))) + (local.set 0x3ba (i64.load offset=0x3ba align=1 (i32.const 0))) + (local.set 0x3bb (i64.load offset=0x3bb align=1 (i32.const 0))) + (local.set 0x3bc (i64.load offset=0x3bc align=1 (i32.const 0))) + (local.set 0x3bd (i64.load offset=0x3bd align=1 (i32.const 0))) + (local.set 0x3be (i64.load offset=0x3be align=1 (i32.const 0))) + (local.set 0x3bf (i64.load offset=0x3bf align=1 (i32.const 0))) + (local.set 0x3c0 (i64.load offset=0x3c0 align=1 (i32.const 0))) + (local.set 0x3c1 (i64.load offset=0x3c1 align=1 (i32.const 0))) + (local.set 0x3c2 (i64.load offset=0x3c2 align=1 (i32.const 0))) + (local.set 0x3c3 (i64.load offset=0x3c3 align=1 (i32.const 0))) + (local.set 0x3c4 (i64.load offset=0x3c4 align=1 (i32.const 0))) + (local.set 0x3c5 (i64.load offset=0x3c5 align=1 (i32.const 0))) + (local.set 0x3c6 (i64.load offset=0x3c6 align=1 (i32.const 0))) + (local.set 0x3c7 (i64.load offset=0x3c7 align=1 (i32.const 0))) + (local.set 0x3c8 (i64.load offset=0x3c8 align=1 (i32.const 0))) + (local.set 0x3c9 (i64.load offset=0x3c9 align=1 (i32.const 0))) + (local.set 0x3ca (i64.load offset=0x3ca align=1 (i32.const 0))) + (local.set 0x3cb (i64.load offset=0x3cb align=1 (i32.const 0))) + (local.set 0x3cc (i64.load offset=0x3cc align=1 (i32.const 0))) + (local.set 0x3cd (i64.load offset=0x3cd align=1 (i32.const 0))) + (local.set 0x3ce (i64.load offset=0x3ce align=1 (i32.const 0))) + (local.set 0x3cf (i64.load offset=0x3cf align=1 (i32.const 0))) + (local.set 0x3d0 (i64.load offset=0x3d0 align=1 (i32.const 0))) + (local.set 0x3d1 (i64.load offset=0x3d1 align=1 (i32.const 0))) + (local.set 0x3d2 (i64.load offset=0x3d2 align=1 (i32.const 0))) + (local.set 0x3d3 (i64.load offset=0x3d3 align=1 (i32.const 0))) + (local.set 0x3d4 (i64.load offset=0x3d4 align=1 (i32.const 0))) + (local.set 0x3d5 (i64.load offset=0x3d5 align=1 (i32.const 0))) + (local.set 0x3d6 (i64.load offset=0x3d6 align=1 (i32.const 0))) + (local.set 0x3d7 (i64.load offset=0x3d7 align=1 (i32.const 0))) + (local.set 0x3d8 (i64.load offset=0x3d8 align=1 (i32.const 0))) + (local.set 0x3d9 (i64.load offset=0x3d9 align=1 (i32.const 0))) + (local.set 0x3da (i64.load offset=0x3da align=1 (i32.const 0))) + (local.set 0x3db (i64.load offset=0x3db align=1 (i32.const 0))) + (local.set 0x3dc (i64.load offset=0x3dc align=1 (i32.const 0))) + (local.set 0x3dd (i64.load offset=0x3dd align=1 (i32.const 0))) + (local.set 0x3de (i64.load offset=0x3de align=1 (i32.const 0))) + (local.set 0x3df (i64.load offset=0x3df align=1 (i32.const 0))) + (local.set 0x3e0 (i64.load offset=0x3e0 align=1 (i32.const 0))) + (local.set 0x3e1 (i64.load offset=0x3e1 align=1 (i32.const 0))) + (local.set 0x3e2 (i64.load offset=0x3e2 align=1 (i32.const 0))) + (local.set 0x3e3 (i64.load offset=0x3e3 align=1 (i32.const 0))) + (local.set 0x3e4 (i64.load offset=0x3e4 align=1 (i32.const 0))) + (local.set 0x3e5 (i64.load offset=0x3e5 align=1 (i32.const 0))) + (local.set 0x3e6 (i64.load offset=0x3e6 align=1 (i32.const 0))) + (local.set 0x3e7 (i64.load offset=0x3e7 align=1 (i32.const 0))) + (local.set 0x3e8 (i64.load offset=0x3e8 align=1 (i32.const 0))) + (local.set 0x3e9 (i64.load offset=0x3e9 align=1 (i32.const 0))) + (local.set 0x3ea (i64.load offset=0x3ea align=1 (i32.const 0))) + (local.set 0x3eb (i64.load offset=0x3eb align=1 (i32.const 0))) + (local.set 0x3ec (i64.load offset=0x3ec align=1 (i32.const 0))) + (local.set 0x3ed (i64.load offset=0x3ed align=1 (i32.const 0))) + (local.set 0x3ee (i64.load offset=0x3ee align=1 (i32.const 0))) + (local.set 0x3ef (i64.load offset=0x3ef align=1 (i32.const 0))) + (local.set 0x3f0 (i64.load offset=0x3f0 align=1 (i32.const 0))) + (local.set 0x3f1 (i64.load offset=0x3f1 align=1 (i32.const 0))) + (local.set 0x3f2 (i64.load offset=0x3f2 align=1 (i32.const 0))) + (local.set 0x3f3 (i64.load offset=0x3f3 align=1 (i32.const 0))) + (local.set 0x3f4 (i64.load offset=0x3f4 align=1 (i32.const 0))) + (local.set 0x3f5 (i64.load offset=0x3f5 align=1 (i32.const 0))) + (local.set 0x3f6 (i64.load offset=0x3f6 align=1 (i32.const 0))) + (local.set 0x3f7 (i64.load offset=0x3f7 align=1 (i32.const 0))) + (local.set 0x3f8 (i64.load offset=0x3f8 align=1 (i32.const 0))) + (local.set 0x3f9 (i64.load offset=0x3f9 align=1 (i32.const 0))) + (local.set 0x3fa (i64.load offset=0x3fa align=1 (i32.const 0))) + (local.set 0x3fb (i64.load offset=0x3fb align=1 (i32.const 0))) + (local.set 0x3fc (i64.load offset=0x3fc align=1 (i32.const 0))) + (local.set 0x3fd (i64.load offset=0x3fd align=1 (i32.const 0))) + (local.set 0x3fe (i64.load offset=0x3fe align=1 (i32.const 0))) + (local.set 0x3ff (i64.load offset=0x3ff align=1 (i32.const 0))) + (local.set 0x400 (i64.load offset=0x400 align=1 (i32.const 0))) + (local.set 0x401 (i64.load offset=0x401 align=1 (i32.const 0))) + (local.set 0x402 (i64.load offset=0x402 align=1 (i32.const 0))) + (local.set 0x403 (i64.load offset=0x403 align=1 (i32.const 0))) + (local.set 0x404 (i64.load offset=0x404 align=1 (i32.const 0))) + (local.set 0x405 (i64.load offset=0x405 align=1 (i32.const 0))) + (local.set 0x406 (i64.load offset=0x406 align=1 (i32.const 0))) + (local.set 0x407 (i64.load offset=0x407 align=1 (i32.const 0))) + (local.set 0x408 (i64.load offset=0x408 align=1 (i32.const 0))) + (local.set 0x409 (i64.load offset=0x409 align=1 (i32.const 0))) + (local.set 0x40a (i64.load offset=0x40a align=1 (i32.const 0))) + (local.set 0x40b (i64.load offset=0x40b align=1 (i32.const 0))) + (local.set 0x40c (i64.load offset=0x40c align=1 (i32.const 0))) + (local.set 0x40d (i64.load offset=0x40d align=1 (i32.const 0))) + (local.set 0x40e (i64.load offset=0x40e align=1 (i32.const 0))) + (local.set 0x40f (i64.load offset=0x40f align=1 (i32.const 0))) + (local.set 0x410 (i64.load offset=0x410 align=1 (i32.const 0))) + (local.set 0x411 (i64.load offset=0x411 align=1 (i32.const 0))) + (local.set 0x412 (i64.load offset=0x412 align=1 (i32.const 0))) + (local.set 0x413 (i64.load offset=0x413 align=1 (i32.const 0))) + (local.set 0x414 (i64.load offset=0x414 align=1 (i32.const 0))) + (local.set 0x415 (i64.load offset=0x415 align=1 (i32.const 0))) + (local.set 0x416 (i64.load offset=0x416 align=1 (i32.const 0))) + (local.set 0x417 (i64.load offset=0x417 align=1 (i32.const 0))) + (local.set 0x418 (i64.load offset=0x418 align=1 (i32.const 0))) + (local.set 0x419 (i64.load offset=0x419 align=1 (i32.const 0))) + (local.set 0x41a (i64.load offset=0x41a align=1 (i32.const 0))) + (local.set 0x41b (i64.load offset=0x41b align=1 (i32.const 0))) + (local.set 0x41c (i64.load offset=0x41c align=1 (i32.const 0))) + (local.set 0x41d (i64.load offset=0x41d align=1 (i32.const 0))) + (local.set 0x41e (i64.load offset=0x41e align=1 (i32.const 0))) + (local.set 0x41f (i64.load offset=0x41f align=1 (i32.const 0))) + + ;; store the locals back to memory + (i64.store offset=0x000 align=1 (i32.const 0) (local.get 0x000)) + (i64.store offset=0x001 align=1 (i32.const 0) (local.get 0x001)) + (i64.store offset=0x002 align=1 (i32.const 0) (local.get 0x002)) + (i64.store offset=0x003 align=1 (i32.const 0) (local.get 0x003)) + (i64.store offset=0x004 align=1 (i32.const 0) (local.get 0x004)) + (i64.store offset=0x005 align=1 (i32.const 0) (local.get 0x005)) + (i64.store offset=0x006 align=1 (i32.const 0) (local.get 0x006)) + (i64.store offset=0x007 align=1 (i32.const 0) (local.get 0x007)) + (i64.store offset=0x008 align=1 (i32.const 0) (local.get 0x008)) + (i64.store offset=0x009 align=1 (i32.const 0) (local.get 0x009)) + (i64.store offset=0x00a align=1 (i32.const 0) (local.get 0x00a)) + (i64.store offset=0x00b align=1 (i32.const 0) (local.get 0x00b)) + (i64.store offset=0x00c align=1 (i32.const 0) (local.get 0x00c)) + (i64.store offset=0x00d align=1 (i32.const 0) (local.get 0x00d)) + (i64.store offset=0x00e align=1 (i32.const 0) (local.get 0x00e)) + (i64.store offset=0x00f align=1 (i32.const 0) (local.get 0x00f)) + (i64.store offset=0x010 align=1 (i32.const 0) (local.get 0x010)) + (i64.store offset=0x011 align=1 (i32.const 0) (local.get 0x011)) + (i64.store offset=0x012 align=1 (i32.const 0) (local.get 0x012)) + (i64.store offset=0x013 align=1 (i32.const 0) (local.get 0x013)) + (i64.store offset=0x014 align=1 (i32.const 0) (local.get 0x014)) + (i64.store offset=0x015 align=1 (i32.const 0) (local.get 0x015)) + (i64.store offset=0x016 align=1 (i32.const 0) (local.get 0x016)) + (i64.store offset=0x017 align=1 (i32.const 0) (local.get 0x017)) + (i64.store offset=0x018 align=1 (i32.const 0) (local.get 0x018)) + (i64.store offset=0x019 align=1 (i32.const 0) (local.get 0x019)) + (i64.store offset=0x01a align=1 (i32.const 0) (local.get 0x01a)) + (i64.store offset=0x01b align=1 (i32.const 0) (local.get 0x01b)) + (i64.store offset=0x01c align=1 (i32.const 0) (local.get 0x01c)) + (i64.store offset=0x01d align=1 (i32.const 0) (local.get 0x01d)) + (i64.store offset=0x01e align=1 (i32.const 0) (local.get 0x01e)) + (i64.store offset=0x01f align=1 (i32.const 0) (local.get 0x01f)) + (i64.store offset=0x020 align=1 (i32.const 0) (local.get 0x020)) + (i64.store offset=0x021 align=1 (i32.const 0) (local.get 0x021)) + (i64.store offset=0x022 align=1 (i32.const 0) (local.get 0x022)) + (i64.store offset=0x023 align=1 (i32.const 0) (local.get 0x023)) + (i64.store offset=0x024 align=1 (i32.const 0) (local.get 0x024)) + (i64.store offset=0x025 align=1 (i32.const 0) (local.get 0x025)) + (i64.store offset=0x026 align=1 (i32.const 0) (local.get 0x026)) + (i64.store offset=0x027 align=1 (i32.const 0) (local.get 0x027)) + (i64.store offset=0x028 align=1 (i32.const 0) (local.get 0x028)) + (i64.store offset=0x029 align=1 (i32.const 0) (local.get 0x029)) + (i64.store offset=0x02a align=1 (i32.const 0) (local.get 0x02a)) + (i64.store offset=0x02b align=1 (i32.const 0) (local.get 0x02b)) + (i64.store offset=0x02c align=1 (i32.const 0) (local.get 0x02c)) + (i64.store offset=0x02d align=1 (i32.const 0) (local.get 0x02d)) + (i64.store offset=0x02e align=1 (i32.const 0) (local.get 0x02e)) + (i64.store offset=0x02f align=1 (i32.const 0) (local.get 0x02f)) + (i64.store offset=0x030 align=1 (i32.const 0) (local.get 0x030)) + (i64.store offset=0x031 align=1 (i32.const 0) (local.get 0x031)) + (i64.store offset=0x032 align=1 (i32.const 0) (local.get 0x032)) + (i64.store offset=0x033 align=1 (i32.const 0) (local.get 0x033)) + (i64.store offset=0x034 align=1 (i32.const 0) (local.get 0x034)) + (i64.store offset=0x035 align=1 (i32.const 0) (local.get 0x035)) + (i64.store offset=0x036 align=1 (i32.const 0) (local.get 0x036)) + (i64.store offset=0x037 align=1 (i32.const 0) (local.get 0x037)) + (i64.store offset=0x038 align=1 (i32.const 0) (local.get 0x038)) + (i64.store offset=0x039 align=1 (i32.const 0) (local.get 0x039)) + (i64.store offset=0x03a align=1 (i32.const 0) (local.get 0x03a)) + (i64.store offset=0x03b align=1 (i32.const 0) (local.get 0x03b)) + (i64.store offset=0x03c align=1 (i32.const 0) (local.get 0x03c)) + (i64.store offset=0x03d align=1 (i32.const 0) (local.get 0x03d)) + (i64.store offset=0x03e align=1 (i32.const 0) (local.get 0x03e)) + (i64.store offset=0x03f align=1 (i32.const 0) (local.get 0x03f)) + (i64.store offset=0x040 align=1 (i32.const 0) (local.get 0x040)) + (i64.store offset=0x041 align=1 (i32.const 0) (local.get 0x041)) + (i64.store offset=0x042 align=1 (i32.const 0) (local.get 0x042)) + (i64.store offset=0x043 align=1 (i32.const 0) (local.get 0x043)) + (i64.store offset=0x044 align=1 (i32.const 0) (local.get 0x044)) + (i64.store offset=0x045 align=1 (i32.const 0) (local.get 0x045)) + (i64.store offset=0x046 align=1 (i32.const 0) (local.get 0x046)) + (i64.store offset=0x047 align=1 (i32.const 0) (local.get 0x047)) + (i64.store offset=0x048 align=1 (i32.const 0) (local.get 0x048)) + (i64.store offset=0x049 align=1 (i32.const 0) (local.get 0x049)) + (i64.store offset=0x04a align=1 (i32.const 0) (local.get 0x04a)) + (i64.store offset=0x04b align=1 (i32.const 0) (local.get 0x04b)) + (i64.store offset=0x04c align=1 (i32.const 0) (local.get 0x04c)) + (i64.store offset=0x04d align=1 (i32.const 0) (local.get 0x04d)) + (i64.store offset=0x04e align=1 (i32.const 0) (local.get 0x04e)) + (i64.store offset=0x04f align=1 (i32.const 0) (local.get 0x04f)) + (i64.store offset=0x050 align=1 (i32.const 0) (local.get 0x050)) + (i64.store offset=0x051 align=1 (i32.const 0) (local.get 0x051)) + (i64.store offset=0x052 align=1 (i32.const 0) (local.get 0x052)) + (i64.store offset=0x053 align=1 (i32.const 0) (local.get 0x053)) + (i64.store offset=0x054 align=1 (i32.const 0) (local.get 0x054)) + (i64.store offset=0x055 align=1 (i32.const 0) (local.get 0x055)) + (i64.store offset=0x056 align=1 (i32.const 0) (local.get 0x056)) + (i64.store offset=0x057 align=1 (i32.const 0) (local.get 0x057)) + (i64.store offset=0x058 align=1 (i32.const 0) (local.get 0x058)) + (i64.store offset=0x059 align=1 (i32.const 0) (local.get 0x059)) + (i64.store offset=0x05a align=1 (i32.const 0) (local.get 0x05a)) + (i64.store offset=0x05b align=1 (i32.const 0) (local.get 0x05b)) + (i64.store offset=0x05c align=1 (i32.const 0) (local.get 0x05c)) + (i64.store offset=0x05d align=1 (i32.const 0) (local.get 0x05d)) + (i64.store offset=0x05e align=1 (i32.const 0) (local.get 0x05e)) + (i64.store offset=0x05f align=1 (i32.const 0) (local.get 0x05f)) + (i64.store offset=0x060 align=1 (i32.const 0) (local.get 0x060)) + (i64.store offset=0x061 align=1 (i32.const 0) (local.get 0x061)) + (i64.store offset=0x062 align=1 (i32.const 0) (local.get 0x062)) + (i64.store offset=0x063 align=1 (i32.const 0) (local.get 0x063)) + (i64.store offset=0x064 align=1 (i32.const 0) (local.get 0x064)) + (i64.store offset=0x065 align=1 (i32.const 0) (local.get 0x065)) + (i64.store offset=0x066 align=1 (i32.const 0) (local.get 0x066)) + (i64.store offset=0x067 align=1 (i32.const 0) (local.get 0x067)) + (i64.store offset=0x068 align=1 (i32.const 0) (local.get 0x068)) + (i64.store offset=0x069 align=1 (i32.const 0) (local.get 0x069)) + (i64.store offset=0x06a align=1 (i32.const 0) (local.get 0x06a)) + (i64.store offset=0x06b align=1 (i32.const 0) (local.get 0x06b)) + (i64.store offset=0x06c align=1 (i32.const 0) (local.get 0x06c)) + (i64.store offset=0x06d align=1 (i32.const 0) (local.get 0x06d)) + (i64.store offset=0x06e align=1 (i32.const 0) (local.get 0x06e)) + (i64.store offset=0x06f align=1 (i32.const 0) (local.get 0x06f)) + (i64.store offset=0x070 align=1 (i32.const 0) (local.get 0x070)) + (i64.store offset=0x071 align=1 (i32.const 0) (local.get 0x071)) + (i64.store offset=0x072 align=1 (i32.const 0) (local.get 0x072)) + (i64.store offset=0x073 align=1 (i32.const 0) (local.get 0x073)) + (i64.store offset=0x074 align=1 (i32.const 0) (local.get 0x074)) + (i64.store offset=0x075 align=1 (i32.const 0) (local.get 0x075)) + (i64.store offset=0x076 align=1 (i32.const 0) (local.get 0x076)) + (i64.store offset=0x077 align=1 (i32.const 0) (local.get 0x077)) + (i64.store offset=0x078 align=1 (i32.const 0) (local.get 0x078)) + (i64.store offset=0x079 align=1 (i32.const 0) (local.get 0x079)) + (i64.store offset=0x07a align=1 (i32.const 0) (local.get 0x07a)) + (i64.store offset=0x07b align=1 (i32.const 0) (local.get 0x07b)) + (i64.store offset=0x07c align=1 (i32.const 0) (local.get 0x07c)) + (i64.store offset=0x07d align=1 (i32.const 0) (local.get 0x07d)) + (i64.store offset=0x07e align=1 (i32.const 0) (local.get 0x07e)) + (i64.store offset=0x07f align=1 (i32.const 0) (local.get 0x07f)) + (i64.store offset=0x080 align=1 (i32.const 0) (local.get 0x080)) + (i64.store offset=0x081 align=1 (i32.const 0) (local.get 0x081)) + (i64.store offset=0x082 align=1 (i32.const 0) (local.get 0x082)) + (i64.store offset=0x083 align=1 (i32.const 0) (local.get 0x083)) + (i64.store offset=0x084 align=1 (i32.const 0) (local.get 0x084)) + (i64.store offset=0x085 align=1 (i32.const 0) (local.get 0x085)) + (i64.store offset=0x086 align=1 (i32.const 0) (local.get 0x086)) + (i64.store offset=0x087 align=1 (i32.const 0) (local.get 0x087)) + (i64.store offset=0x088 align=1 (i32.const 0) (local.get 0x088)) + (i64.store offset=0x089 align=1 (i32.const 0) (local.get 0x089)) + (i64.store offset=0x08a align=1 (i32.const 0) (local.get 0x08a)) + (i64.store offset=0x08b align=1 (i32.const 0) (local.get 0x08b)) + (i64.store offset=0x08c align=1 (i32.const 0) (local.get 0x08c)) + (i64.store offset=0x08d align=1 (i32.const 0) (local.get 0x08d)) + (i64.store offset=0x08e align=1 (i32.const 0) (local.get 0x08e)) + (i64.store offset=0x08f align=1 (i32.const 0) (local.get 0x08f)) + (i64.store offset=0x090 align=1 (i32.const 0) (local.get 0x090)) + (i64.store offset=0x091 align=1 (i32.const 0) (local.get 0x091)) + (i64.store offset=0x092 align=1 (i32.const 0) (local.get 0x092)) + (i64.store offset=0x093 align=1 (i32.const 0) (local.get 0x093)) + (i64.store offset=0x094 align=1 (i32.const 0) (local.get 0x094)) + (i64.store offset=0x095 align=1 (i32.const 0) (local.get 0x095)) + (i64.store offset=0x096 align=1 (i32.const 0) (local.get 0x096)) + (i64.store offset=0x097 align=1 (i32.const 0) (local.get 0x097)) + (i64.store offset=0x098 align=1 (i32.const 0) (local.get 0x098)) + (i64.store offset=0x099 align=1 (i32.const 0) (local.get 0x099)) + (i64.store offset=0x09a align=1 (i32.const 0) (local.get 0x09a)) + (i64.store offset=0x09b align=1 (i32.const 0) (local.get 0x09b)) + (i64.store offset=0x09c align=1 (i32.const 0) (local.get 0x09c)) + (i64.store offset=0x09d align=1 (i32.const 0) (local.get 0x09d)) + (i64.store offset=0x09e align=1 (i32.const 0) (local.get 0x09e)) + (i64.store offset=0x09f align=1 (i32.const 0) (local.get 0x09f)) + (i64.store offset=0x0a0 align=1 (i32.const 0) (local.get 0x0a0)) + (i64.store offset=0x0a1 align=1 (i32.const 0) (local.get 0x0a1)) + (i64.store offset=0x0a2 align=1 (i32.const 0) (local.get 0x0a2)) + (i64.store offset=0x0a3 align=1 (i32.const 0) (local.get 0x0a3)) + (i64.store offset=0x0a4 align=1 (i32.const 0) (local.get 0x0a4)) + (i64.store offset=0x0a5 align=1 (i32.const 0) (local.get 0x0a5)) + (i64.store offset=0x0a6 align=1 (i32.const 0) (local.get 0x0a6)) + (i64.store offset=0x0a7 align=1 (i32.const 0) (local.get 0x0a7)) + (i64.store offset=0x0a8 align=1 (i32.const 0) (local.get 0x0a8)) + (i64.store offset=0x0a9 align=1 (i32.const 0) (local.get 0x0a9)) + (i64.store offset=0x0aa align=1 (i32.const 0) (local.get 0x0aa)) + (i64.store offset=0x0ab align=1 (i32.const 0) (local.get 0x0ab)) + (i64.store offset=0x0ac align=1 (i32.const 0) (local.get 0x0ac)) + (i64.store offset=0x0ad align=1 (i32.const 0) (local.get 0x0ad)) + (i64.store offset=0x0ae align=1 (i32.const 0) (local.get 0x0ae)) + (i64.store offset=0x0af align=1 (i32.const 0) (local.get 0x0af)) + (i64.store offset=0x0b0 align=1 (i32.const 0) (local.get 0x0b0)) + (i64.store offset=0x0b1 align=1 (i32.const 0) (local.get 0x0b1)) + (i64.store offset=0x0b2 align=1 (i32.const 0) (local.get 0x0b2)) + (i64.store offset=0x0b3 align=1 (i32.const 0) (local.get 0x0b3)) + (i64.store offset=0x0b4 align=1 (i32.const 0) (local.get 0x0b4)) + (i64.store offset=0x0b5 align=1 (i32.const 0) (local.get 0x0b5)) + (i64.store offset=0x0b6 align=1 (i32.const 0) (local.get 0x0b6)) + (i64.store offset=0x0b7 align=1 (i32.const 0) (local.get 0x0b7)) + (i64.store offset=0x0b8 align=1 (i32.const 0) (local.get 0x0b8)) + (i64.store offset=0x0b9 align=1 (i32.const 0) (local.get 0x0b9)) + (i64.store offset=0x0ba align=1 (i32.const 0) (local.get 0x0ba)) + (i64.store offset=0x0bb align=1 (i32.const 0) (local.get 0x0bb)) + (i64.store offset=0x0bc align=1 (i32.const 0) (local.get 0x0bc)) + (i64.store offset=0x0bd align=1 (i32.const 0) (local.get 0x0bd)) + (i64.store offset=0x0be align=1 (i32.const 0) (local.get 0x0be)) + (i64.store offset=0x0bf align=1 (i32.const 0) (local.get 0x0bf)) + (i64.store offset=0x0c0 align=1 (i32.const 0) (local.get 0x0c0)) + (i64.store offset=0x0c1 align=1 (i32.const 0) (local.get 0x0c1)) + (i64.store offset=0x0c2 align=1 (i32.const 0) (local.get 0x0c2)) + (i64.store offset=0x0c3 align=1 (i32.const 0) (local.get 0x0c3)) + (i64.store offset=0x0c4 align=1 (i32.const 0) (local.get 0x0c4)) + (i64.store offset=0x0c5 align=1 (i32.const 0) (local.get 0x0c5)) + (i64.store offset=0x0c6 align=1 (i32.const 0) (local.get 0x0c6)) + (i64.store offset=0x0c7 align=1 (i32.const 0) (local.get 0x0c7)) + (i64.store offset=0x0c8 align=1 (i32.const 0) (local.get 0x0c8)) + (i64.store offset=0x0c9 align=1 (i32.const 0) (local.get 0x0c9)) + (i64.store offset=0x0ca align=1 (i32.const 0) (local.get 0x0ca)) + (i64.store offset=0x0cb align=1 (i32.const 0) (local.get 0x0cb)) + (i64.store offset=0x0cc align=1 (i32.const 0) (local.get 0x0cc)) + (i64.store offset=0x0cd align=1 (i32.const 0) (local.get 0x0cd)) + (i64.store offset=0x0ce align=1 (i32.const 0) (local.get 0x0ce)) + (i64.store offset=0x0cf align=1 (i32.const 0) (local.get 0x0cf)) + (i64.store offset=0x0d0 align=1 (i32.const 0) (local.get 0x0d0)) + (i64.store offset=0x0d1 align=1 (i32.const 0) (local.get 0x0d1)) + (i64.store offset=0x0d2 align=1 (i32.const 0) (local.get 0x0d2)) + (i64.store offset=0x0d3 align=1 (i32.const 0) (local.get 0x0d3)) + (i64.store offset=0x0d4 align=1 (i32.const 0) (local.get 0x0d4)) + (i64.store offset=0x0d5 align=1 (i32.const 0) (local.get 0x0d5)) + (i64.store offset=0x0d6 align=1 (i32.const 0) (local.get 0x0d6)) + (i64.store offset=0x0d7 align=1 (i32.const 0) (local.get 0x0d7)) + (i64.store offset=0x0d8 align=1 (i32.const 0) (local.get 0x0d8)) + (i64.store offset=0x0d9 align=1 (i32.const 0) (local.get 0x0d9)) + (i64.store offset=0x0da align=1 (i32.const 0) (local.get 0x0da)) + (i64.store offset=0x0db align=1 (i32.const 0) (local.get 0x0db)) + (i64.store offset=0x0dc align=1 (i32.const 0) (local.get 0x0dc)) + (i64.store offset=0x0dd align=1 (i32.const 0) (local.get 0x0dd)) + (i64.store offset=0x0de align=1 (i32.const 0) (local.get 0x0de)) + (i64.store offset=0x0df align=1 (i32.const 0) (local.get 0x0df)) + (i64.store offset=0x0e0 align=1 (i32.const 0) (local.get 0x0e0)) + (i64.store offset=0x0e1 align=1 (i32.const 0) (local.get 0x0e1)) + (i64.store offset=0x0e2 align=1 (i32.const 0) (local.get 0x0e2)) + (i64.store offset=0x0e3 align=1 (i32.const 0) (local.get 0x0e3)) + (i64.store offset=0x0e4 align=1 (i32.const 0) (local.get 0x0e4)) + (i64.store offset=0x0e5 align=1 (i32.const 0) (local.get 0x0e5)) + (i64.store offset=0x0e6 align=1 (i32.const 0) (local.get 0x0e6)) + (i64.store offset=0x0e7 align=1 (i32.const 0) (local.get 0x0e7)) + (i64.store offset=0x0e8 align=1 (i32.const 0) (local.get 0x0e8)) + (i64.store offset=0x0e9 align=1 (i32.const 0) (local.get 0x0e9)) + (i64.store offset=0x0ea align=1 (i32.const 0) (local.get 0x0ea)) + (i64.store offset=0x0eb align=1 (i32.const 0) (local.get 0x0eb)) + (i64.store offset=0x0ec align=1 (i32.const 0) (local.get 0x0ec)) + (i64.store offset=0x0ed align=1 (i32.const 0) (local.get 0x0ed)) + (i64.store offset=0x0ee align=1 (i32.const 0) (local.get 0x0ee)) + (i64.store offset=0x0ef align=1 (i32.const 0) (local.get 0x0ef)) + (i64.store offset=0x0f0 align=1 (i32.const 0) (local.get 0x0f0)) + (i64.store offset=0x0f1 align=1 (i32.const 0) (local.get 0x0f1)) + (i64.store offset=0x0f2 align=1 (i32.const 0) (local.get 0x0f2)) + (i64.store offset=0x0f3 align=1 (i32.const 0) (local.get 0x0f3)) + (i64.store offset=0x0f4 align=1 (i32.const 0) (local.get 0x0f4)) + (i64.store offset=0x0f5 align=1 (i32.const 0) (local.get 0x0f5)) + (i64.store offset=0x0f6 align=1 (i32.const 0) (local.get 0x0f6)) + (i64.store offset=0x0f7 align=1 (i32.const 0) (local.get 0x0f7)) + (i64.store offset=0x0f8 align=1 (i32.const 0) (local.get 0x0f8)) + (i64.store offset=0x0f9 align=1 (i32.const 0) (local.get 0x0f9)) + (i64.store offset=0x0fa align=1 (i32.const 0) (local.get 0x0fa)) + (i64.store offset=0x0fb align=1 (i32.const 0) (local.get 0x0fb)) + (i64.store offset=0x0fc align=1 (i32.const 0) (local.get 0x0fc)) + (i64.store offset=0x0fd align=1 (i32.const 0) (local.get 0x0fd)) + (i64.store offset=0x0fe align=1 (i32.const 0) (local.get 0x0fe)) + (i64.store offset=0x0ff align=1 (i32.const 0) (local.get 0x0ff)) + (i64.store offset=0x100 align=1 (i32.const 0) (local.get 0x100)) + (i64.store offset=0x101 align=1 (i32.const 0) (local.get 0x101)) + (i64.store offset=0x102 align=1 (i32.const 0) (local.get 0x102)) + (i64.store offset=0x103 align=1 (i32.const 0) (local.get 0x103)) + (i64.store offset=0x104 align=1 (i32.const 0) (local.get 0x104)) + (i64.store offset=0x105 align=1 (i32.const 0) (local.get 0x105)) + (i64.store offset=0x106 align=1 (i32.const 0) (local.get 0x106)) + (i64.store offset=0x107 align=1 (i32.const 0) (local.get 0x107)) + (i64.store offset=0x108 align=1 (i32.const 0) (local.get 0x108)) + (i64.store offset=0x109 align=1 (i32.const 0) (local.get 0x109)) + (i64.store offset=0x10a align=1 (i32.const 0) (local.get 0x10a)) + (i64.store offset=0x10b align=1 (i32.const 0) (local.get 0x10b)) + (i64.store offset=0x10c align=1 (i32.const 0) (local.get 0x10c)) + (i64.store offset=0x10d align=1 (i32.const 0) (local.get 0x10d)) + (i64.store offset=0x10e align=1 (i32.const 0) (local.get 0x10e)) + (i64.store offset=0x10f align=1 (i32.const 0) (local.get 0x10f)) + (i64.store offset=0x110 align=1 (i32.const 0) (local.get 0x110)) + (i64.store offset=0x111 align=1 (i32.const 0) (local.get 0x111)) + (i64.store offset=0x112 align=1 (i32.const 0) (local.get 0x112)) + (i64.store offset=0x113 align=1 (i32.const 0) (local.get 0x113)) + (i64.store offset=0x114 align=1 (i32.const 0) (local.get 0x114)) + (i64.store offset=0x115 align=1 (i32.const 0) (local.get 0x115)) + (i64.store offset=0x116 align=1 (i32.const 0) (local.get 0x116)) + (i64.store offset=0x117 align=1 (i32.const 0) (local.get 0x117)) + (i64.store offset=0x118 align=1 (i32.const 0) (local.get 0x118)) + (i64.store offset=0x119 align=1 (i32.const 0) (local.get 0x119)) + (i64.store offset=0x11a align=1 (i32.const 0) (local.get 0x11a)) + (i64.store offset=0x11b align=1 (i32.const 0) (local.get 0x11b)) + (i64.store offset=0x11c align=1 (i32.const 0) (local.get 0x11c)) + (i64.store offset=0x11d align=1 (i32.const 0) (local.get 0x11d)) + (i64.store offset=0x11e align=1 (i32.const 0) (local.get 0x11e)) + (i64.store offset=0x11f align=1 (i32.const 0) (local.get 0x11f)) + (i64.store offset=0x120 align=1 (i32.const 0) (local.get 0x120)) + (i64.store offset=0x121 align=1 (i32.const 0) (local.get 0x121)) + (i64.store offset=0x122 align=1 (i32.const 0) (local.get 0x122)) + (i64.store offset=0x123 align=1 (i32.const 0) (local.get 0x123)) + (i64.store offset=0x124 align=1 (i32.const 0) (local.get 0x124)) + (i64.store offset=0x125 align=1 (i32.const 0) (local.get 0x125)) + (i64.store offset=0x126 align=1 (i32.const 0) (local.get 0x126)) + (i64.store offset=0x127 align=1 (i32.const 0) (local.get 0x127)) + (i64.store offset=0x128 align=1 (i32.const 0) (local.get 0x128)) + (i64.store offset=0x129 align=1 (i32.const 0) (local.get 0x129)) + (i64.store offset=0x12a align=1 (i32.const 0) (local.get 0x12a)) + (i64.store offset=0x12b align=1 (i32.const 0) (local.get 0x12b)) + (i64.store offset=0x12c align=1 (i32.const 0) (local.get 0x12c)) + (i64.store offset=0x12d align=1 (i32.const 0) (local.get 0x12d)) + (i64.store offset=0x12e align=1 (i32.const 0) (local.get 0x12e)) + (i64.store offset=0x12f align=1 (i32.const 0) (local.get 0x12f)) + (i64.store offset=0x130 align=1 (i32.const 0) (local.get 0x130)) + (i64.store offset=0x131 align=1 (i32.const 0) (local.get 0x131)) + (i64.store offset=0x132 align=1 (i32.const 0) (local.get 0x132)) + (i64.store offset=0x133 align=1 (i32.const 0) (local.get 0x133)) + (i64.store offset=0x134 align=1 (i32.const 0) (local.get 0x134)) + (i64.store offset=0x135 align=1 (i32.const 0) (local.get 0x135)) + (i64.store offset=0x136 align=1 (i32.const 0) (local.get 0x136)) + (i64.store offset=0x137 align=1 (i32.const 0) (local.get 0x137)) + (i64.store offset=0x138 align=1 (i32.const 0) (local.get 0x138)) + (i64.store offset=0x139 align=1 (i32.const 0) (local.get 0x139)) + (i64.store offset=0x13a align=1 (i32.const 0) (local.get 0x13a)) + (i64.store offset=0x13b align=1 (i32.const 0) (local.get 0x13b)) + (i64.store offset=0x13c align=1 (i32.const 0) (local.get 0x13c)) + (i64.store offset=0x13d align=1 (i32.const 0) (local.get 0x13d)) + (i64.store offset=0x13e align=1 (i32.const 0) (local.get 0x13e)) + (i64.store offset=0x13f align=1 (i32.const 0) (local.get 0x13f)) + (i64.store offset=0x140 align=1 (i32.const 0) (local.get 0x140)) + (i64.store offset=0x141 align=1 (i32.const 0) (local.get 0x141)) + (i64.store offset=0x142 align=1 (i32.const 0) (local.get 0x142)) + (i64.store offset=0x143 align=1 (i32.const 0) (local.get 0x143)) + (i64.store offset=0x144 align=1 (i32.const 0) (local.get 0x144)) + (i64.store offset=0x145 align=1 (i32.const 0) (local.get 0x145)) + (i64.store offset=0x146 align=1 (i32.const 0) (local.get 0x146)) + (i64.store offset=0x147 align=1 (i32.const 0) (local.get 0x147)) + (i64.store offset=0x148 align=1 (i32.const 0) (local.get 0x148)) + (i64.store offset=0x149 align=1 (i32.const 0) (local.get 0x149)) + (i64.store offset=0x14a align=1 (i32.const 0) (local.get 0x14a)) + (i64.store offset=0x14b align=1 (i32.const 0) (local.get 0x14b)) + (i64.store offset=0x14c align=1 (i32.const 0) (local.get 0x14c)) + (i64.store offset=0x14d align=1 (i32.const 0) (local.get 0x14d)) + (i64.store offset=0x14e align=1 (i32.const 0) (local.get 0x14e)) + (i64.store offset=0x14f align=1 (i32.const 0) (local.get 0x14f)) + (i64.store offset=0x150 align=1 (i32.const 0) (local.get 0x150)) + (i64.store offset=0x151 align=1 (i32.const 0) (local.get 0x151)) + (i64.store offset=0x152 align=1 (i32.const 0) (local.get 0x152)) + (i64.store offset=0x153 align=1 (i32.const 0) (local.get 0x153)) + (i64.store offset=0x154 align=1 (i32.const 0) (local.get 0x154)) + (i64.store offset=0x155 align=1 (i32.const 0) (local.get 0x155)) + (i64.store offset=0x156 align=1 (i32.const 0) (local.get 0x156)) + (i64.store offset=0x157 align=1 (i32.const 0) (local.get 0x157)) + (i64.store offset=0x158 align=1 (i32.const 0) (local.get 0x158)) + (i64.store offset=0x159 align=1 (i32.const 0) (local.get 0x159)) + (i64.store offset=0x15a align=1 (i32.const 0) (local.get 0x15a)) + (i64.store offset=0x15b align=1 (i32.const 0) (local.get 0x15b)) + (i64.store offset=0x15c align=1 (i32.const 0) (local.get 0x15c)) + (i64.store offset=0x15d align=1 (i32.const 0) (local.get 0x15d)) + (i64.store offset=0x15e align=1 (i32.const 0) (local.get 0x15e)) + (i64.store offset=0x15f align=1 (i32.const 0) (local.get 0x15f)) + (i64.store offset=0x160 align=1 (i32.const 0) (local.get 0x160)) + (i64.store offset=0x161 align=1 (i32.const 0) (local.get 0x161)) + (i64.store offset=0x162 align=1 (i32.const 0) (local.get 0x162)) + (i64.store offset=0x163 align=1 (i32.const 0) (local.get 0x163)) + (i64.store offset=0x164 align=1 (i32.const 0) (local.get 0x164)) + (i64.store offset=0x165 align=1 (i32.const 0) (local.get 0x165)) + (i64.store offset=0x166 align=1 (i32.const 0) (local.get 0x166)) + (i64.store offset=0x167 align=1 (i32.const 0) (local.get 0x167)) + (i64.store offset=0x168 align=1 (i32.const 0) (local.get 0x168)) + (i64.store offset=0x169 align=1 (i32.const 0) (local.get 0x169)) + (i64.store offset=0x16a align=1 (i32.const 0) (local.get 0x16a)) + (i64.store offset=0x16b align=1 (i32.const 0) (local.get 0x16b)) + (i64.store offset=0x16c align=1 (i32.const 0) (local.get 0x16c)) + (i64.store offset=0x16d align=1 (i32.const 0) (local.get 0x16d)) + (i64.store offset=0x16e align=1 (i32.const 0) (local.get 0x16e)) + (i64.store offset=0x16f align=1 (i32.const 0) (local.get 0x16f)) + (i64.store offset=0x170 align=1 (i32.const 0) (local.get 0x170)) + (i64.store offset=0x171 align=1 (i32.const 0) (local.get 0x171)) + (i64.store offset=0x172 align=1 (i32.const 0) (local.get 0x172)) + (i64.store offset=0x173 align=1 (i32.const 0) (local.get 0x173)) + (i64.store offset=0x174 align=1 (i32.const 0) (local.get 0x174)) + (i64.store offset=0x175 align=1 (i32.const 0) (local.get 0x175)) + (i64.store offset=0x176 align=1 (i32.const 0) (local.get 0x176)) + (i64.store offset=0x177 align=1 (i32.const 0) (local.get 0x177)) + (i64.store offset=0x178 align=1 (i32.const 0) (local.get 0x178)) + (i64.store offset=0x179 align=1 (i32.const 0) (local.get 0x179)) + (i64.store offset=0x17a align=1 (i32.const 0) (local.get 0x17a)) + (i64.store offset=0x17b align=1 (i32.const 0) (local.get 0x17b)) + (i64.store offset=0x17c align=1 (i32.const 0) (local.get 0x17c)) + (i64.store offset=0x17d align=1 (i32.const 0) (local.get 0x17d)) + (i64.store offset=0x17e align=1 (i32.const 0) (local.get 0x17e)) + (i64.store offset=0x17f align=1 (i32.const 0) (local.get 0x17f)) + (i64.store offset=0x180 align=1 (i32.const 0) (local.get 0x180)) + (i64.store offset=0x181 align=1 (i32.const 0) (local.get 0x181)) + (i64.store offset=0x182 align=1 (i32.const 0) (local.get 0x182)) + (i64.store offset=0x183 align=1 (i32.const 0) (local.get 0x183)) + (i64.store offset=0x184 align=1 (i32.const 0) (local.get 0x184)) + (i64.store offset=0x185 align=1 (i32.const 0) (local.get 0x185)) + (i64.store offset=0x186 align=1 (i32.const 0) (local.get 0x186)) + (i64.store offset=0x187 align=1 (i32.const 0) (local.get 0x187)) + (i64.store offset=0x188 align=1 (i32.const 0) (local.get 0x188)) + (i64.store offset=0x189 align=1 (i32.const 0) (local.get 0x189)) + (i64.store offset=0x18a align=1 (i32.const 0) (local.get 0x18a)) + (i64.store offset=0x18b align=1 (i32.const 0) (local.get 0x18b)) + (i64.store offset=0x18c align=1 (i32.const 0) (local.get 0x18c)) + (i64.store offset=0x18d align=1 (i32.const 0) (local.get 0x18d)) + (i64.store offset=0x18e align=1 (i32.const 0) (local.get 0x18e)) + (i64.store offset=0x18f align=1 (i32.const 0) (local.get 0x18f)) + (i64.store offset=0x190 align=1 (i32.const 0) (local.get 0x190)) + (i64.store offset=0x191 align=1 (i32.const 0) (local.get 0x191)) + (i64.store offset=0x192 align=1 (i32.const 0) (local.get 0x192)) + (i64.store offset=0x193 align=1 (i32.const 0) (local.get 0x193)) + (i64.store offset=0x194 align=1 (i32.const 0) (local.get 0x194)) + (i64.store offset=0x195 align=1 (i32.const 0) (local.get 0x195)) + (i64.store offset=0x196 align=1 (i32.const 0) (local.get 0x196)) + (i64.store offset=0x197 align=1 (i32.const 0) (local.get 0x197)) + (i64.store offset=0x198 align=1 (i32.const 0) (local.get 0x198)) + (i64.store offset=0x199 align=1 (i32.const 0) (local.get 0x199)) + (i64.store offset=0x19a align=1 (i32.const 0) (local.get 0x19a)) + (i64.store offset=0x19b align=1 (i32.const 0) (local.get 0x19b)) + (i64.store offset=0x19c align=1 (i32.const 0) (local.get 0x19c)) + (i64.store offset=0x19d align=1 (i32.const 0) (local.get 0x19d)) + (i64.store offset=0x19e align=1 (i32.const 0) (local.get 0x19e)) + (i64.store offset=0x19f align=1 (i32.const 0) (local.get 0x19f)) + (i64.store offset=0x1a0 align=1 (i32.const 0) (local.get 0x1a0)) + (i64.store offset=0x1a1 align=1 (i32.const 0) (local.get 0x1a1)) + (i64.store offset=0x1a2 align=1 (i32.const 0) (local.get 0x1a2)) + (i64.store offset=0x1a3 align=1 (i32.const 0) (local.get 0x1a3)) + (i64.store offset=0x1a4 align=1 (i32.const 0) (local.get 0x1a4)) + (i64.store offset=0x1a5 align=1 (i32.const 0) (local.get 0x1a5)) + (i64.store offset=0x1a6 align=1 (i32.const 0) (local.get 0x1a6)) + (i64.store offset=0x1a7 align=1 (i32.const 0) (local.get 0x1a7)) + (i64.store offset=0x1a8 align=1 (i32.const 0) (local.get 0x1a8)) + (i64.store offset=0x1a9 align=1 (i32.const 0) (local.get 0x1a9)) + (i64.store offset=0x1aa align=1 (i32.const 0) (local.get 0x1aa)) + (i64.store offset=0x1ab align=1 (i32.const 0) (local.get 0x1ab)) + (i64.store offset=0x1ac align=1 (i32.const 0) (local.get 0x1ac)) + (i64.store offset=0x1ad align=1 (i32.const 0) (local.get 0x1ad)) + (i64.store offset=0x1ae align=1 (i32.const 0) (local.get 0x1ae)) + (i64.store offset=0x1af align=1 (i32.const 0) (local.get 0x1af)) + (i64.store offset=0x1b0 align=1 (i32.const 0) (local.get 0x1b0)) + (i64.store offset=0x1b1 align=1 (i32.const 0) (local.get 0x1b1)) + (i64.store offset=0x1b2 align=1 (i32.const 0) (local.get 0x1b2)) + (i64.store offset=0x1b3 align=1 (i32.const 0) (local.get 0x1b3)) + (i64.store offset=0x1b4 align=1 (i32.const 0) (local.get 0x1b4)) + (i64.store offset=0x1b5 align=1 (i32.const 0) (local.get 0x1b5)) + (i64.store offset=0x1b6 align=1 (i32.const 0) (local.get 0x1b6)) + (i64.store offset=0x1b7 align=1 (i32.const 0) (local.get 0x1b7)) + (i64.store offset=0x1b8 align=1 (i32.const 0) (local.get 0x1b8)) + (i64.store offset=0x1b9 align=1 (i32.const 0) (local.get 0x1b9)) + (i64.store offset=0x1ba align=1 (i32.const 0) (local.get 0x1ba)) + (i64.store offset=0x1bb align=1 (i32.const 0) (local.get 0x1bb)) + (i64.store offset=0x1bc align=1 (i32.const 0) (local.get 0x1bc)) + (i64.store offset=0x1bd align=1 (i32.const 0) (local.get 0x1bd)) + (i64.store offset=0x1be align=1 (i32.const 0) (local.get 0x1be)) + (i64.store offset=0x1bf align=1 (i32.const 0) (local.get 0x1bf)) + (i64.store offset=0x1c0 align=1 (i32.const 0) (local.get 0x1c0)) + (i64.store offset=0x1c1 align=1 (i32.const 0) (local.get 0x1c1)) + (i64.store offset=0x1c2 align=1 (i32.const 0) (local.get 0x1c2)) + (i64.store offset=0x1c3 align=1 (i32.const 0) (local.get 0x1c3)) + (i64.store offset=0x1c4 align=1 (i32.const 0) (local.get 0x1c4)) + (i64.store offset=0x1c5 align=1 (i32.const 0) (local.get 0x1c5)) + (i64.store offset=0x1c6 align=1 (i32.const 0) (local.get 0x1c6)) + (i64.store offset=0x1c7 align=1 (i32.const 0) (local.get 0x1c7)) + (i64.store offset=0x1c8 align=1 (i32.const 0) (local.get 0x1c8)) + (i64.store offset=0x1c9 align=1 (i32.const 0) (local.get 0x1c9)) + (i64.store offset=0x1ca align=1 (i32.const 0) (local.get 0x1ca)) + (i64.store offset=0x1cb align=1 (i32.const 0) (local.get 0x1cb)) + (i64.store offset=0x1cc align=1 (i32.const 0) (local.get 0x1cc)) + (i64.store offset=0x1cd align=1 (i32.const 0) (local.get 0x1cd)) + (i64.store offset=0x1ce align=1 (i32.const 0) (local.get 0x1ce)) + (i64.store offset=0x1cf align=1 (i32.const 0) (local.get 0x1cf)) + (i64.store offset=0x1d0 align=1 (i32.const 0) (local.get 0x1d0)) + (i64.store offset=0x1d1 align=1 (i32.const 0) (local.get 0x1d1)) + (i64.store offset=0x1d2 align=1 (i32.const 0) (local.get 0x1d2)) + (i64.store offset=0x1d3 align=1 (i32.const 0) (local.get 0x1d3)) + (i64.store offset=0x1d4 align=1 (i32.const 0) (local.get 0x1d4)) + (i64.store offset=0x1d5 align=1 (i32.const 0) (local.get 0x1d5)) + (i64.store offset=0x1d6 align=1 (i32.const 0) (local.get 0x1d6)) + (i64.store offset=0x1d7 align=1 (i32.const 0) (local.get 0x1d7)) + (i64.store offset=0x1d8 align=1 (i32.const 0) (local.get 0x1d8)) + (i64.store offset=0x1d9 align=1 (i32.const 0) (local.get 0x1d9)) + (i64.store offset=0x1da align=1 (i32.const 0) (local.get 0x1da)) + (i64.store offset=0x1db align=1 (i32.const 0) (local.get 0x1db)) + (i64.store offset=0x1dc align=1 (i32.const 0) (local.get 0x1dc)) + (i64.store offset=0x1dd align=1 (i32.const 0) (local.get 0x1dd)) + (i64.store offset=0x1de align=1 (i32.const 0) (local.get 0x1de)) + (i64.store offset=0x1df align=1 (i32.const 0) (local.get 0x1df)) + (i64.store offset=0x1e0 align=1 (i32.const 0) (local.get 0x1e0)) + (i64.store offset=0x1e1 align=1 (i32.const 0) (local.get 0x1e1)) + (i64.store offset=0x1e2 align=1 (i32.const 0) (local.get 0x1e2)) + (i64.store offset=0x1e3 align=1 (i32.const 0) (local.get 0x1e3)) + (i64.store offset=0x1e4 align=1 (i32.const 0) (local.get 0x1e4)) + (i64.store offset=0x1e5 align=1 (i32.const 0) (local.get 0x1e5)) + (i64.store offset=0x1e6 align=1 (i32.const 0) (local.get 0x1e6)) + (i64.store offset=0x1e7 align=1 (i32.const 0) (local.get 0x1e7)) + (i64.store offset=0x1e8 align=1 (i32.const 0) (local.get 0x1e8)) + (i64.store offset=0x1e9 align=1 (i32.const 0) (local.get 0x1e9)) + (i64.store offset=0x1ea align=1 (i32.const 0) (local.get 0x1ea)) + (i64.store offset=0x1eb align=1 (i32.const 0) (local.get 0x1eb)) + (i64.store offset=0x1ec align=1 (i32.const 0) (local.get 0x1ec)) + (i64.store offset=0x1ed align=1 (i32.const 0) (local.get 0x1ed)) + (i64.store offset=0x1ee align=1 (i32.const 0) (local.get 0x1ee)) + (i64.store offset=0x1ef align=1 (i32.const 0) (local.get 0x1ef)) + (i64.store offset=0x1f0 align=1 (i32.const 0) (local.get 0x1f0)) + (i64.store offset=0x1f1 align=1 (i32.const 0) (local.get 0x1f1)) + (i64.store offset=0x1f2 align=1 (i32.const 0) (local.get 0x1f2)) + (i64.store offset=0x1f3 align=1 (i32.const 0) (local.get 0x1f3)) + (i64.store offset=0x1f4 align=1 (i32.const 0) (local.get 0x1f4)) + (i64.store offset=0x1f5 align=1 (i32.const 0) (local.get 0x1f5)) + (i64.store offset=0x1f6 align=1 (i32.const 0) (local.get 0x1f6)) + (i64.store offset=0x1f7 align=1 (i32.const 0) (local.get 0x1f7)) + (i64.store offset=0x1f8 align=1 (i32.const 0) (local.get 0x1f8)) + (i64.store offset=0x1f9 align=1 (i32.const 0) (local.get 0x1f9)) + (i64.store offset=0x1fa align=1 (i32.const 0) (local.get 0x1fa)) + (i64.store offset=0x1fb align=1 (i32.const 0) (local.get 0x1fb)) + (i64.store offset=0x1fc align=1 (i32.const 0) (local.get 0x1fc)) + (i64.store offset=0x1fd align=1 (i32.const 0) (local.get 0x1fd)) + (i64.store offset=0x1fe align=1 (i32.const 0) (local.get 0x1fe)) + (i64.store offset=0x1ff align=1 (i32.const 0) (local.get 0x1ff)) + (i64.store offset=0x200 align=1 (i32.const 0) (local.get 0x200)) + (i64.store offset=0x201 align=1 (i32.const 0) (local.get 0x201)) + (i64.store offset=0x202 align=1 (i32.const 0) (local.get 0x202)) + (i64.store offset=0x203 align=1 (i32.const 0) (local.get 0x203)) + (i64.store offset=0x204 align=1 (i32.const 0) (local.get 0x204)) + (i64.store offset=0x205 align=1 (i32.const 0) (local.get 0x205)) + (i64.store offset=0x206 align=1 (i32.const 0) (local.get 0x206)) + (i64.store offset=0x207 align=1 (i32.const 0) (local.get 0x207)) + (i64.store offset=0x208 align=1 (i32.const 0) (local.get 0x208)) + (i64.store offset=0x209 align=1 (i32.const 0) (local.get 0x209)) + (i64.store offset=0x20a align=1 (i32.const 0) (local.get 0x20a)) + (i64.store offset=0x20b align=1 (i32.const 0) (local.get 0x20b)) + (i64.store offset=0x20c align=1 (i32.const 0) (local.get 0x20c)) + (i64.store offset=0x20d align=1 (i32.const 0) (local.get 0x20d)) + (i64.store offset=0x20e align=1 (i32.const 0) (local.get 0x20e)) + (i64.store offset=0x20f align=1 (i32.const 0) (local.get 0x20f)) + (i64.store offset=0x210 align=1 (i32.const 0) (local.get 0x210)) + (i64.store offset=0x211 align=1 (i32.const 0) (local.get 0x211)) + (i64.store offset=0x212 align=1 (i32.const 0) (local.get 0x212)) + (i64.store offset=0x213 align=1 (i32.const 0) (local.get 0x213)) + (i64.store offset=0x214 align=1 (i32.const 0) (local.get 0x214)) + (i64.store offset=0x215 align=1 (i32.const 0) (local.get 0x215)) + (i64.store offset=0x216 align=1 (i32.const 0) (local.get 0x216)) + (i64.store offset=0x217 align=1 (i32.const 0) (local.get 0x217)) + (i64.store offset=0x218 align=1 (i32.const 0) (local.get 0x218)) + (i64.store offset=0x219 align=1 (i32.const 0) (local.get 0x219)) + (i64.store offset=0x21a align=1 (i32.const 0) (local.get 0x21a)) + (i64.store offset=0x21b align=1 (i32.const 0) (local.get 0x21b)) + (i64.store offset=0x21c align=1 (i32.const 0) (local.get 0x21c)) + (i64.store offset=0x21d align=1 (i32.const 0) (local.get 0x21d)) + (i64.store offset=0x21e align=1 (i32.const 0) (local.get 0x21e)) + (i64.store offset=0x21f align=1 (i32.const 0) (local.get 0x21f)) + (i64.store offset=0x220 align=1 (i32.const 0) (local.get 0x220)) + (i64.store offset=0x221 align=1 (i32.const 0) (local.get 0x221)) + (i64.store offset=0x222 align=1 (i32.const 0) (local.get 0x222)) + (i64.store offset=0x223 align=1 (i32.const 0) (local.get 0x223)) + (i64.store offset=0x224 align=1 (i32.const 0) (local.get 0x224)) + (i64.store offset=0x225 align=1 (i32.const 0) (local.get 0x225)) + (i64.store offset=0x226 align=1 (i32.const 0) (local.get 0x226)) + (i64.store offset=0x227 align=1 (i32.const 0) (local.get 0x227)) + (i64.store offset=0x228 align=1 (i32.const 0) (local.get 0x228)) + (i64.store offset=0x229 align=1 (i32.const 0) (local.get 0x229)) + (i64.store offset=0x22a align=1 (i32.const 0) (local.get 0x22a)) + (i64.store offset=0x22b align=1 (i32.const 0) (local.get 0x22b)) + (i64.store offset=0x22c align=1 (i32.const 0) (local.get 0x22c)) + (i64.store offset=0x22d align=1 (i32.const 0) (local.get 0x22d)) + (i64.store offset=0x22e align=1 (i32.const 0) (local.get 0x22e)) + (i64.store offset=0x22f align=1 (i32.const 0) (local.get 0x22f)) + (i64.store offset=0x230 align=1 (i32.const 0) (local.get 0x230)) + (i64.store offset=0x231 align=1 (i32.const 0) (local.get 0x231)) + (i64.store offset=0x232 align=1 (i32.const 0) (local.get 0x232)) + (i64.store offset=0x233 align=1 (i32.const 0) (local.get 0x233)) + (i64.store offset=0x234 align=1 (i32.const 0) (local.get 0x234)) + (i64.store offset=0x235 align=1 (i32.const 0) (local.get 0x235)) + (i64.store offset=0x236 align=1 (i32.const 0) (local.get 0x236)) + (i64.store offset=0x237 align=1 (i32.const 0) (local.get 0x237)) + (i64.store offset=0x238 align=1 (i32.const 0) (local.get 0x238)) + (i64.store offset=0x239 align=1 (i32.const 0) (local.get 0x239)) + (i64.store offset=0x23a align=1 (i32.const 0) (local.get 0x23a)) + (i64.store offset=0x23b align=1 (i32.const 0) (local.get 0x23b)) + (i64.store offset=0x23c align=1 (i32.const 0) (local.get 0x23c)) + (i64.store offset=0x23d align=1 (i32.const 0) (local.get 0x23d)) + (i64.store offset=0x23e align=1 (i32.const 0) (local.get 0x23e)) + (i64.store offset=0x23f align=1 (i32.const 0) (local.get 0x23f)) + (i64.store offset=0x240 align=1 (i32.const 0) (local.get 0x240)) + (i64.store offset=0x241 align=1 (i32.const 0) (local.get 0x241)) + (i64.store offset=0x242 align=1 (i32.const 0) (local.get 0x242)) + (i64.store offset=0x243 align=1 (i32.const 0) (local.get 0x243)) + (i64.store offset=0x244 align=1 (i32.const 0) (local.get 0x244)) + (i64.store offset=0x245 align=1 (i32.const 0) (local.get 0x245)) + (i64.store offset=0x246 align=1 (i32.const 0) (local.get 0x246)) + (i64.store offset=0x247 align=1 (i32.const 0) (local.get 0x247)) + (i64.store offset=0x248 align=1 (i32.const 0) (local.get 0x248)) + (i64.store offset=0x249 align=1 (i32.const 0) (local.get 0x249)) + (i64.store offset=0x24a align=1 (i32.const 0) (local.get 0x24a)) + (i64.store offset=0x24b align=1 (i32.const 0) (local.get 0x24b)) + (i64.store offset=0x24c align=1 (i32.const 0) (local.get 0x24c)) + (i64.store offset=0x24d align=1 (i32.const 0) (local.get 0x24d)) + (i64.store offset=0x24e align=1 (i32.const 0) (local.get 0x24e)) + (i64.store offset=0x24f align=1 (i32.const 0) (local.get 0x24f)) + (i64.store offset=0x250 align=1 (i32.const 0) (local.get 0x250)) + (i64.store offset=0x251 align=1 (i32.const 0) (local.get 0x251)) + (i64.store offset=0x252 align=1 (i32.const 0) (local.get 0x252)) + (i64.store offset=0x253 align=1 (i32.const 0) (local.get 0x253)) + (i64.store offset=0x254 align=1 (i32.const 0) (local.get 0x254)) + (i64.store offset=0x255 align=1 (i32.const 0) (local.get 0x255)) + (i64.store offset=0x256 align=1 (i32.const 0) (local.get 0x256)) + (i64.store offset=0x257 align=1 (i32.const 0) (local.get 0x257)) + (i64.store offset=0x258 align=1 (i32.const 0) (local.get 0x258)) + (i64.store offset=0x259 align=1 (i32.const 0) (local.get 0x259)) + (i64.store offset=0x25a align=1 (i32.const 0) (local.get 0x25a)) + (i64.store offset=0x25b align=1 (i32.const 0) (local.get 0x25b)) + (i64.store offset=0x25c align=1 (i32.const 0) (local.get 0x25c)) + (i64.store offset=0x25d align=1 (i32.const 0) (local.get 0x25d)) + (i64.store offset=0x25e align=1 (i32.const 0) (local.get 0x25e)) + (i64.store offset=0x25f align=1 (i32.const 0) (local.get 0x25f)) + (i64.store offset=0x260 align=1 (i32.const 0) (local.get 0x260)) + (i64.store offset=0x261 align=1 (i32.const 0) (local.get 0x261)) + (i64.store offset=0x262 align=1 (i32.const 0) (local.get 0x262)) + (i64.store offset=0x263 align=1 (i32.const 0) (local.get 0x263)) + (i64.store offset=0x264 align=1 (i32.const 0) (local.get 0x264)) + (i64.store offset=0x265 align=1 (i32.const 0) (local.get 0x265)) + (i64.store offset=0x266 align=1 (i32.const 0) (local.get 0x266)) + (i64.store offset=0x267 align=1 (i32.const 0) (local.get 0x267)) + (i64.store offset=0x268 align=1 (i32.const 0) (local.get 0x268)) + (i64.store offset=0x269 align=1 (i32.const 0) (local.get 0x269)) + (i64.store offset=0x26a align=1 (i32.const 0) (local.get 0x26a)) + (i64.store offset=0x26b align=1 (i32.const 0) (local.get 0x26b)) + (i64.store offset=0x26c align=1 (i32.const 0) (local.get 0x26c)) + (i64.store offset=0x26d align=1 (i32.const 0) (local.get 0x26d)) + (i64.store offset=0x26e align=1 (i32.const 0) (local.get 0x26e)) + (i64.store offset=0x26f align=1 (i32.const 0) (local.get 0x26f)) + (i64.store offset=0x270 align=1 (i32.const 0) (local.get 0x270)) + (i64.store offset=0x271 align=1 (i32.const 0) (local.get 0x271)) + (i64.store offset=0x272 align=1 (i32.const 0) (local.get 0x272)) + (i64.store offset=0x273 align=1 (i32.const 0) (local.get 0x273)) + (i64.store offset=0x274 align=1 (i32.const 0) (local.get 0x274)) + (i64.store offset=0x275 align=1 (i32.const 0) (local.get 0x275)) + (i64.store offset=0x276 align=1 (i32.const 0) (local.get 0x276)) + (i64.store offset=0x277 align=1 (i32.const 0) (local.get 0x277)) + (i64.store offset=0x278 align=1 (i32.const 0) (local.get 0x278)) + (i64.store offset=0x279 align=1 (i32.const 0) (local.get 0x279)) + (i64.store offset=0x27a align=1 (i32.const 0) (local.get 0x27a)) + (i64.store offset=0x27b align=1 (i32.const 0) (local.get 0x27b)) + (i64.store offset=0x27c align=1 (i32.const 0) (local.get 0x27c)) + (i64.store offset=0x27d align=1 (i32.const 0) (local.get 0x27d)) + (i64.store offset=0x27e align=1 (i32.const 0) (local.get 0x27e)) + (i64.store offset=0x27f align=1 (i32.const 0) (local.get 0x27f)) + (i64.store offset=0x280 align=1 (i32.const 0) (local.get 0x280)) + (i64.store offset=0x281 align=1 (i32.const 0) (local.get 0x281)) + (i64.store offset=0x282 align=1 (i32.const 0) (local.get 0x282)) + (i64.store offset=0x283 align=1 (i32.const 0) (local.get 0x283)) + (i64.store offset=0x284 align=1 (i32.const 0) (local.get 0x284)) + (i64.store offset=0x285 align=1 (i32.const 0) (local.get 0x285)) + (i64.store offset=0x286 align=1 (i32.const 0) (local.get 0x286)) + (i64.store offset=0x287 align=1 (i32.const 0) (local.get 0x287)) + (i64.store offset=0x288 align=1 (i32.const 0) (local.get 0x288)) + (i64.store offset=0x289 align=1 (i32.const 0) (local.get 0x289)) + (i64.store offset=0x28a align=1 (i32.const 0) (local.get 0x28a)) + (i64.store offset=0x28b align=1 (i32.const 0) (local.get 0x28b)) + (i64.store offset=0x28c align=1 (i32.const 0) (local.get 0x28c)) + (i64.store offset=0x28d align=1 (i32.const 0) (local.get 0x28d)) + (i64.store offset=0x28e align=1 (i32.const 0) (local.get 0x28e)) + (i64.store offset=0x28f align=1 (i32.const 0) (local.get 0x28f)) + (i64.store offset=0x290 align=1 (i32.const 0) (local.get 0x290)) + (i64.store offset=0x291 align=1 (i32.const 0) (local.get 0x291)) + (i64.store offset=0x292 align=1 (i32.const 0) (local.get 0x292)) + (i64.store offset=0x293 align=1 (i32.const 0) (local.get 0x293)) + (i64.store offset=0x294 align=1 (i32.const 0) (local.get 0x294)) + (i64.store offset=0x295 align=1 (i32.const 0) (local.get 0x295)) + (i64.store offset=0x296 align=1 (i32.const 0) (local.get 0x296)) + (i64.store offset=0x297 align=1 (i32.const 0) (local.get 0x297)) + (i64.store offset=0x298 align=1 (i32.const 0) (local.get 0x298)) + (i64.store offset=0x299 align=1 (i32.const 0) (local.get 0x299)) + (i64.store offset=0x29a align=1 (i32.const 0) (local.get 0x29a)) + (i64.store offset=0x29b align=1 (i32.const 0) (local.get 0x29b)) + (i64.store offset=0x29c align=1 (i32.const 0) (local.get 0x29c)) + (i64.store offset=0x29d align=1 (i32.const 0) (local.get 0x29d)) + (i64.store offset=0x29e align=1 (i32.const 0) (local.get 0x29e)) + (i64.store offset=0x29f align=1 (i32.const 0) (local.get 0x29f)) + (i64.store offset=0x2a0 align=1 (i32.const 0) (local.get 0x2a0)) + (i64.store offset=0x2a1 align=1 (i32.const 0) (local.get 0x2a1)) + (i64.store offset=0x2a2 align=1 (i32.const 0) (local.get 0x2a2)) + (i64.store offset=0x2a3 align=1 (i32.const 0) (local.get 0x2a3)) + (i64.store offset=0x2a4 align=1 (i32.const 0) (local.get 0x2a4)) + (i64.store offset=0x2a5 align=1 (i32.const 0) (local.get 0x2a5)) + (i64.store offset=0x2a6 align=1 (i32.const 0) (local.get 0x2a6)) + (i64.store offset=0x2a7 align=1 (i32.const 0) (local.get 0x2a7)) + (i64.store offset=0x2a8 align=1 (i32.const 0) (local.get 0x2a8)) + (i64.store offset=0x2a9 align=1 (i32.const 0) (local.get 0x2a9)) + (i64.store offset=0x2aa align=1 (i32.const 0) (local.get 0x2aa)) + (i64.store offset=0x2ab align=1 (i32.const 0) (local.get 0x2ab)) + (i64.store offset=0x2ac align=1 (i32.const 0) (local.get 0x2ac)) + (i64.store offset=0x2ad align=1 (i32.const 0) (local.get 0x2ad)) + (i64.store offset=0x2ae align=1 (i32.const 0) (local.get 0x2ae)) + (i64.store offset=0x2af align=1 (i32.const 0) (local.get 0x2af)) + (i64.store offset=0x2b0 align=1 (i32.const 0) (local.get 0x2b0)) + (i64.store offset=0x2b1 align=1 (i32.const 0) (local.get 0x2b1)) + (i64.store offset=0x2b2 align=1 (i32.const 0) (local.get 0x2b2)) + (i64.store offset=0x2b3 align=1 (i32.const 0) (local.get 0x2b3)) + (i64.store offset=0x2b4 align=1 (i32.const 0) (local.get 0x2b4)) + (i64.store offset=0x2b5 align=1 (i32.const 0) (local.get 0x2b5)) + (i64.store offset=0x2b6 align=1 (i32.const 0) (local.get 0x2b6)) + (i64.store offset=0x2b7 align=1 (i32.const 0) (local.get 0x2b7)) + (i64.store offset=0x2b8 align=1 (i32.const 0) (local.get 0x2b8)) + (i64.store offset=0x2b9 align=1 (i32.const 0) (local.get 0x2b9)) + (i64.store offset=0x2ba align=1 (i32.const 0) (local.get 0x2ba)) + (i64.store offset=0x2bb align=1 (i32.const 0) (local.get 0x2bb)) + (i64.store offset=0x2bc align=1 (i32.const 0) (local.get 0x2bc)) + (i64.store offset=0x2bd align=1 (i32.const 0) (local.get 0x2bd)) + (i64.store offset=0x2be align=1 (i32.const 0) (local.get 0x2be)) + (i64.store offset=0x2bf align=1 (i32.const 0) (local.get 0x2bf)) + (i64.store offset=0x2c0 align=1 (i32.const 0) (local.get 0x2c0)) + (i64.store offset=0x2c1 align=1 (i32.const 0) (local.get 0x2c1)) + (i64.store offset=0x2c2 align=1 (i32.const 0) (local.get 0x2c2)) + (i64.store offset=0x2c3 align=1 (i32.const 0) (local.get 0x2c3)) + (i64.store offset=0x2c4 align=1 (i32.const 0) (local.get 0x2c4)) + (i64.store offset=0x2c5 align=1 (i32.const 0) (local.get 0x2c5)) + (i64.store offset=0x2c6 align=1 (i32.const 0) (local.get 0x2c6)) + (i64.store offset=0x2c7 align=1 (i32.const 0) (local.get 0x2c7)) + (i64.store offset=0x2c8 align=1 (i32.const 0) (local.get 0x2c8)) + (i64.store offset=0x2c9 align=1 (i32.const 0) (local.get 0x2c9)) + (i64.store offset=0x2ca align=1 (i32.const 0) (local.get 0x2ca)) + (i64.store offset=0x2cb align=1 (i32.const 0) (local.get 0x2cb)) + (i64.store offset=0x2cc align=1 (i32.const 0) (local.get 0x2cc)) + (i64.store offset=0x2cd align=1 (i32.const 0) (local.get 0x2cd)) + (i64.store offset=0x2ce align=1 (i32.const 0) (local.get 0x2ce)) + (i64.store offset=0x2cf align=1 (i32.const 0) (local.get 0x2cf)) + (i64.store offset=0x2d0 align=1 (i32.const 0) (local.get 0x2d0)) + (i64.store offset=0x2d1 align=1 (i32.const 0) (local.get 0x2d1)) + (i64.store offset=0x2d2 align=1 (i32.const 0) (local.get 0x2d2)) + (i64.store offset=0x2d3 align=1 (i32.const 0) (local.get 0x2d3)) + (i64.store offset=0x2d4 align=1 (i32.const 0) (local.get 0x2d4)) + (i64.store offset=0x2d5 align=1 (i32.const 0) (local.get 0x2d5)) + (i64.store offset=0x2d6 align=1 (i32.const 0) (local.get 0x2d6)) + (i64.store offset=0x2d7 align=1 (i32.const 0) (local.get 0x2d7)) + (i64.store offset=0x2d8 align=1 (i32.const 0) (local.get 0x2d8)) + (i64.store offset=0x2d9 align=1 (i32.const 0) (local.get 0x2d9)) + (i64.store offset=0x2da align=1 (i32.const 0) (local.get 0x2da)) + (i64.store offset=0x2db align=1 (i32.const 0) (local.get 0x2db)) + (i64.store offset=0x2dc align=1 (i32.const 0) (local.get 0x2dc)) + (i64.store offset=0x2dd align=1 (i32.const 0) (local.get 0x2dd)) + (i64.store offset=0x2de align=1 (i32.const 0) (local.get 0x2de)) + (i64.store offset=0x2df align=1 (i32.const 0) (local.get 0x2df)) + (i64.store offset=0x2e0 align=1 (i32.const 0) (local.get 0x2e0)) + (i64.store offset=0x2e1 align=1 (i32.const 0) (local.get 0x2e1)) + (i64.store offset=0x2e2 align=1 (i32.const 0) (local.get 0x2e2)) + (i64.store offset=0x2e3 align=1 (i32.const 0) (local.get 0x2e3)) + (i64.store offset=0x2e4 align=1 (i32.const 0) (local.get 0x2e4)) + (i64.store offset=0x2e5 align=1 (i32.const 0) (local.get 0x2e5)) + (i64.store offset=0x2e6 align=1 (i32.const 0) (local.get 0x2e6)) + (i64.store offset=0x2e7 align=1 (i32.const 0) (local.get 0x2e7)) + (i64.store offset=0x2e8 align=1 (i32.const 0) (local.get 0x2e8)) + (i64.store offset=0x2e9 align=1 (i32.const 0) (local.get 0x2e9)) + (i64.store offset=0x2ea align=1 (i32.const 0) (local.get 0x2ea)) + (i64.store offset=0x2eb align=1 (i32.const 0) (local.get 0x2eb)) + (i64.store offset=0x2ec align=1 (i32.const 0) (local.get 0x2ec)) + (i64.store offset=0x2ed align=1 (i32.const 0) (local.get 0x2ed)) + (i64.store offset=0x2ee align=1 (i32.const 0) (local.get 0x2ee)) + (i64.store offset=0x2ef align=1 (i32.const 0) (local.get 0x2ef)) + (i64.store offset=0x2f0 align=1 (i32.const 0) (local.get 0x2f0)) + (i64.store offset=0x2f1 align=1 (i32.const 0) (local.get 0x2f1)) + (i64.store offset=0x2f2 align=1 (i32.const 0) (local.get 0x2f2)) + (i64.store offset=0x2f3 align=1 (i32.const 0) (local.get 0x2f3)) + (i64.store offset=0x2f4 align=1 (i32.const 0) (local.get 0x2f4)) + (i64.store offset=0x2f5 align=1 (i32.const 0) (local.get 0x2f5)) + (i64.store offset=0x2f6 align=1 (i32.const 0) (local.get 0x2f6)) + (i64.store offset=0x2f7 align=1 (i32.const 0) (local.get 0x2f7)) + (i64.store offset=0x2f8 align=1 (i32.const 0) (local.get 0x2f8)) + (i64.store offset=0x2f9 align=1 (i32.const 0) (local.get 0x2f9)) + (i64.store offset=0x2fa align=1 (i32.const 0) (local.get 0x2fa)) + (i64.store offset=0x2fb align=1 (i32.const 0) (local.get 0x2fb)) + (i64.store offset=0x2fc align=1 (i32.const 0) (local.get 0x2fc)) + (i64.store offset=0x2fd align=1 (i32.const 0) (local.get 0x2fd)) + (i64.store offset=0x2fe align=1 (i32.const 0) (local.get 0x2fe)) + (i64.store offset=0x2ff align=1 (i32.const 0) (local.get 0x2ff)) + (i64.store offset=0x300 align=1 (i32.const 0) (local.get 0x300)) + (i64.store offset=0x301 align=1 (i32.const 0) (local.get 0x301)) + (i64.store offset=0x302 align=1 (i32.const 0) (local.get 0x302)) + (i64.store offset=0x303 align=1 (i32.const 0) (local.get 0x303)) + (i64.store offset=0x304 align=1 (i32.const 0) (local.get 0x304)) + (i64.store offset=0x305 align=1 (i32.const 0) (local.get 0x305)) + (i64.store offset=0x306 align=1 (i32.const 0) (local.get 0x306)) + (i64.store offset=0x307 align=1 (i32.const 0) (local.get 0x307)) + (i64.store offset=0x308 align=1 (i32.const 0) (local.get 0x308)) + (i64.store offset=0x309 align=1 (i32.const 0) (local.get 0x309)) + (i64.store offset=0x30a align=1 (i32.const 0) (local.get 0x30a)) + (i64.store offset=0x30b align=1 (i32.const 0) (local.get 0x30b)) + (i64.store offset=0x30c align=1 (i32.const 0) (local.get 0x30c)) + (i64.store offset=0x30d align=1 (i32.const 0) (local.get 0x30d)) + (i64.store offset=0x30e align=1 (i32.const 0) (local.get 0x30e)) + (i64.store offset=0x30f align=1 (i32.const 0) (local.get 0x30f)) + (i64.store offset=0x310 align=1 (i32.const 0) (local.get 0x310)) + (i64.store offset=0x311 align=1 (i32.const 0) (local.get 0x311)) + (i64.store offset=0x312 align=1 (i32.const 0) (local.get 0x312)) + (i64.store offset=0x313 align=1 (i32.const 0) (local.get 0x313)) + (i64.store offset=0x314 align=1 (i32.const 0) (local.get 0x314)) + (i64.store offset=0x315 align=1 (i32.const 0) (local.get 0x315)) + (i64.store offset=0x316 align=1 (i32.const 0) (local.get 0x316)) + (i64.store offset=0x317 align=1 (i32.const 0) (local.get 0x317)) + (i64.store offset=0x318 align=1 (i32.const 0) (local.get 0x318)) + (i64.store offset=0x319 align=1 (i32.const 0) (local.get 0x319)) + (i64.store offset=0x31a align=1 (i32.const 0) (local.get 0x31a)) + (i64.store offset=0x31b align=1 (i32.const 0) (local.get 0x31b)) + (i64.store offset=0x31c align=1 (i32.const 0) (local.get 0x31c)) + (i64.store offset=0x31d align=1 (i32.const 0) (local.get 0x31d)) + (i64.store offset=0x31e align=1 (i32.const 0) (local.get 0x31e)) + (i64.store offset=0x31f align=1 (i32.const 0) (local.get 0x31f)) + (i64.store offset=0x320 align=1 (i32.const 0) (local.get 0x320)) + (i64.store offset=0x321 align=1 (i32.const 0) (local.get 0x321)) + (i64.store offset=0x322 align=1 (i32.const 0) (local.get 0x322)) + (i64.store offset=0x323 align=1 (i32.const 0) (local.get 0x323)) + (i64.store offset=0x324 align=1 (i32.const 0) (local.get 0x324)) + (i64.store offset=0x325 align=1 (i32.const 0) (local.get 0x325)) + (i64.store offset=0x326 align=1 (i32.const 0) (local.get 0x326)) + (i64.store offset=0x327 align=1 (i32.const 0) (local.get 0x327)) + (i64.store offset=0x328 align=1 (i32.const 0) (local.get 0x328)) + (i64.store offset=0x329 align=1 (i32.const 0) (local.get 0x329)) + (i64.store offset=0x32a align=1 (i32.const 0) (local.get 0x32a)) + (i64.store offset=0x32b align=1 (i32.const 0) (local.get 0x32b)) + (i64.store offset=0x32c align=1 (i32.const 0) (local.get 0x32c)) + (i64.store offset=0x32d align=1 (i32.const 0) (local.get 0x32d)) + (i64.store offset=0x32e align=1 (i32.const 0) (local.get 0x32e)) + (i64.store offset=0x32f align=1 (i32.const 0) (local.get 0x32f)) + (i64.store offset=0x330 align=1 (i32.const 0) (local.get 0x330)) + (i64.store offset=0x331 align=1 (i32.const 0) (local.get 0x331)) + (i64.store offset=0x332 align=1 (i32.const 0) (local.get 0x332)) + (i64.store offset=0x333 align=1 (i32.const 0) (local.get 0x333)) + (i64.store offset=0x334 align=1 (i32.const 0) (local.get 0x334)) + (i64.store offset=0x335 align=1 (i32.const 0) (local.get 0x335)) + (i64.store offset=0x336 align=1 (i32.const 0) (local.get 0x336)) + (i64.store offset=0x337 align=1 (i32.const 0) (local.get 0x337)) + (i64.store offset=0x338 align=1 (i32.const 0) (local.get 0x338)) + (i64.store offset=0x339 align=1 (i32.const 0) (local.get 0x339)) + (i64.store offset=0x33a align=1 (i32.const 0) (local.get 0x33a)) + (i64.store offset=0x33b align=1 (i32.const 0) (local.get 0x33b)) + (i64.store offset=0x33c align=1 (i32.const 0) (local.get 0x33c)) + (i64.store offset=0x33d align=1 (i32.const 0) (local.get 0x33d)) + (i64.store offset=0x33e align=1 (i32.const 0) (local.get 0x33e)) + (i64.store offset=0x33f align=1 (i32.const 0) (local.get 0x33f)) + (i64.store offset=0x340 align=1 (i32.const 0) (local.get 0x340)) + (i64.store offset=0x341 align=1 (i32.const 0) (local.get 0x341)) + (i64.store offset=0x342 align=1 (i32.const 0) (local.get 0x342)) + (i64.store offset=0x343 align=1 (i32.const 0) (local.get 0x343)) + (i64.store offset=0x344 align=1 (i32.const 0) (local.get 0x344)) + (i64.store offset=0x345 align=1 (i32.const 0) (local.get 0x345)) + (i64.store offset=0x346 align=1 (i32.const 0) (local.get 0x346)) + (i64.store offset=0x347 align=1 (i32.const 0) (local.get 0x347)) + (i64.store offset=0x348 align=1 (i32.const 0) (local.get 0x348)) + (i64.store offset=0x349 align=1 (i32.const 0) (local.get 0x349)) + (i64.store offset=0x34a align=1 (i32.const 0) (local.get 0x34a)) + (i64.store offset=0x34b align=1 (i32.const 0) (local.get 0x34b)) + (i64.store offset=0x34c align=1 (i32.const 0) (local.get 0x34c)) + (i64.store offset=0x34d align=1 (i32.const 0) (local.get 0x34d)) + (i64.store offset=0x34e align=1 (i32.const 0) (local.get 0x34e)) + (i64.store offset=0x34f align=1 (i32.const 0) (local.get 0x34f)) + (i64.store offset=0x350 align=1 (i32.const 0) (local.get 0x350)) + (i64.store offset=0x351 align=1 (i32.const 0) (local.get 0x351)) + (i64.store offset=0x352 align=1 (i32.const 0) (local.get 0x352)) + (i64.store offset=0x353 align=1 (i32.const 0) (local.get 0x353)) + (i64.store offset=0x354 align=1 (i32.const 0) (local.get 0x354)) + (i64.store offset=0x355 align=1 (i32.const 0) (local.get 0x355)) + (i64.store offset=0x356 align=1 (i32.const 0) (local.get 0x356)) + (i64.store offset=0x357 align=1 (i32.const 0) (local.get 0x357)) + (i64.store offset=0x358 align=1 (i32.const 0) (local.get 0x358)) + (i64.store offset=0x359 align=1 (i32.const 0) (local.get 0x359)) + (i64.store offset=0x35a align=1 (i32.const 0) (local.get 0x35a)) + (i64.store offset=0x35b align=1 (i32.const 0) (local.get 0x35b)) + (i64.store offset=0x35c align=1 (i32.const 0) (local.get 0x35c)) + (i64.store offset=0x35d align=1 (i32.const 0) (local.get 0x35d)) + (i64.store offset=0x35e align=1 (i32.const 0) (local.get 0x35e)) + (i64.store offset=0x35f align=1 (i32.const 0) (local.get 0x35f)) + (i64.store offset=0x360 align=1 (i32.const 0) (local.get 0x360)) + (i64.store offset=0x361 align=1 (i32.const 0) (local.get 0x361)) + (i64.store offset=0x362 align=1 (i32.const 0) (local.get 0x362)) + (i64.store offset=0x363 align=1 (i32.const 0) (local.get 0x363)) + (i64.store offset=0x364 align=1 (i32.const 0) (local.get 0x364)) + (i64.store offset=0x365 align=1 (i32.const 0) (local.get 0x365)) + (i64.store offset=0x366 align=1 (i32.const 0) (local.get 0x366)) + (i64.store offset=0x367 align=1 (i32.const 0) (local.get 0x367)) + (i64.store offset=0x368 align=1 (i32.const 0) (local.get 0x368)) + (i64.store offset=0x369 align=1 (i32.const 0) (local.get 0x369)) + (i64.store offset=0x36a align=1 (i32.const 0) (local.get 0x36a)) + (i64.store offset=0x36b align=1 (i32.const 0) (local.get 0x36b)) + (i64.store offset=0x36c align=1 (i32.const 0) (local.get 0x36c)) + (i64.store offset=0x36d align=1 (i32.const 0) (local.get 0x36d)) + (i64.store offset=0x36e align=1 (i32.const 0) (local.get 0x36e)) + (i64.store offset=0x36f align=1 (i32.const 0) (local.get 0x36f)) + (i64.store offset=0x370 align=1 (i32.const 0) (local.get 0x370)) + (i64.store offset=0x371 align=1 (i32.const 0) (local.get 0x371)) + (i64.store offset=0x372 align=1 (i32.const 0) (local.get 0x372)) + (i64.store offset=0x373 align=1 (i32.const 0) (local.get 0x373)) + (i64.store offset=0x374 align=1 (i32.const 0) (local.get 0x374)) + (i64.store offset=0x375 align=1 (i32.const 0) (local.get 0x375)) + (i64.store offset=0x376 align=1 (i32.const 0) (local.get 0x376)) + (i64.store offset=0x377 align=1 (i32.const 0) (local.get 0x377)) + (i64.store offset=0x378 align=1 (i32.const 0) (local.get 0x378)) + (i64.store offset=0x379 align=1 (i32.const 0) (local.get 0x379)) + (i64.store offset=0x37a align=1 (i32.const 0) (local.get 0x37a)) + (i64.store offset=0x37b align=1 (i32.const 0) (local.get 0x37b)) + (i64.store offset=0x37c align=1 (i32.const 0) (local.get 0x37c)) + (i64.store offset=0x37d align=1 (i32.const 0) (local.get 0x37d)) + (i64.store offset=0x37e align=1 (i32.const 0) (local.get 0x37e)) + (i64.store offset=0x37f align=1 (i32.const 0) (local.get 0x37f)) + (i64.store offset=0x380 align=1 (i32.const 0) (local.get 0x380)) + (i64.store offset=0x381 align=1 (i32.const 0) (local.get 0x381)) + (i64.store offset=0x382 align=1 (i32.const 0) (local.get 0x382)) + (i64.store offset=0x383 align=1 (i32.const 0) (local.get 0x383)) + (i64.store offset=0x384 align=1 (i32.const 0) (local.get 0x384)) + (i64.store offset=0x385 align=1 (i32.const 0) (local.get 0x385)) + (i64.store offset=0x386 align=1 (i32.const 0) (local.get 0x386)) + (i64.store offset=0x387 align=1 (i32.const 0) (local.get 0x387)) + (i64.store offset=0x388 align=1 (i32.const 0) (local.get 0x388)) + (i64.store offset=0x389 align=1 (i32.const 0) (local.get 0x389)) + (i64.store offset=0x38a align=1 (i32.const 0) (local.get 0x38a)) + (i64.store offset=0x38b align=1 (i32.const 0) (local.get 0x38b)) + (i64.store offset=0x38c align=1 (i32.const 0) (local.get 0x38c)) + (i64.store offset=0x38d align=1 (i32.const 0) (local.get 0x38d)) + (i64.store offset=0x38e align=1 (i32.const 0) (local.get 0x38e)) + (i64.store offset=0x38f align=1 (i32.const 0) (local.get 0x38f)) + (i64.store offset=0x390 align=1 (i32.const 0) (local.get 0x390)) + (i64.store offset=0x391 align=1 (i32.const 0) (local.get 0x391)) + (i64.store offset=0x392 align=1 (i32.const 0) (local.get 0x392)) + (i64.store offset=0x393 align=1 (i32.const 0) (local.get 0x393)) + (i64.store offset=0x394 align=1 (i32.const 0) (local.get 0x394)) + (i64.store offset=0x395 align=1 (i32.const 0) (local.get 0x395)) + (i64.store offset=0x396 align=1 (i32.const 0) (local.get 0x396)) + (i64.store offset=0x397 align=1 (i32.const 0) (local.get 0x397)) + (i64.store offset=0x398 align=1 (i32.const 0) (local.get 0x398)) + (i64.store offset=0x399 align=1 (i32.const 0) (local.get 0x399)) + (i64.store offset=0x39a align=1 (i32.const 0) (local.get 0x39a)) + (i64.store offset=0x39b align=1 (i32.const 0) (local.get 0x39b)) + (i64.store offset=0x39c align=1 (i32.const 0) (local.get 0x39c)) + (i64.store offset=0x39d align=1 (i32.const 0) (local.get 0x39d)) + (i64.store offset=0x39e align=1 (i32.const 0) (local.get 0x39e)) + (i64.store offset=0x39f align=1 (i32.const 0) (local.get 0x39f)) + (i64.store offset=0x3a0 align=1 (i32.const 0) (local.get 0x3a0)) + (i64.store offset=0x3a1 align=1 (i32.const 0) (local.get 0x3a1)) + (i64.store offset=0x3a2 align=1 (i32.const 0) (local.get 0x3a2)) + (i64.store offset=0x3a3 align=1 (i32.const 0) (local.get 0x3a3)) + (i64.store offset=0x3a4 align=1 (i32.const 0) (local.get 0x3a4)) + (i64.store offset=0x3a5 align=1 (i32.const 0) (local.get 0x3a5)) + (i64.store offset=0x3a6 align=1 (i32.const 0) (local.get 0x3a6)) + (i64.store offset=0x3a7 align=1 (i32.const 0) (local.get 0x3a7)) + (i64.store offset=0x3a8 align=1 (i32.const 0) (local.get 0x3a8)) + (i64.store offset=0x3a9 align=1 (i32.const 0) (local.get 0x3a9)) + (i64.store offset=0x3aa align=1 (i32.const 0) (local.get 0x3aa)) + (i64.store offset=0x3ab align=1 (i32.const 0) (local.get 0x3ab)) + (i64.store offset=0x3ac align=1 (i32.const 0) (local.get 0x3ac)) + (i64.store offset=0x3ad align=1 (i32.const 0) (local.get 0x3ad)) + (i64.store offset=0x3ae align=1 (i32.const 0) (local.get 0x3ae)) + (i64.store offset=0x3af align=1 (i32.const 0) (local.get 0x3af)) + (i64.store offset=0x3b0 align=1 (i32.const 0) (local.get 0x3b0)) + (i64.store offset=0x3b1 align=1 (i32.const 0) (local.get 0x3b1)) + (i64.store offset=0x3b2 align=1 (i32.const 0) (local.get 0x3b2)) + (i64.store offset=0x3b3 align=1 (i32.const 0) (local.get 0x3b3)) + (i64.store offset=0x3b4 align=1 (i32.const 0) (local.get 0x3b4)) + (i64.store offset=0x3b5 align=1 (i32.const 0) (local.get 0x3b5)) + (i64.store offset=0x3b6 align=1 (i32.const 0) (local.get 0x3b6)) + (i64.store offset=0x3b7 align=1 (i32.const 0) (local.get 0x3b7)) + (i64.store offset=0x3b8 align=1 (i32.const 0) (local.get 0x3b8)) + (i64.store offset=0x3b9 align=1 (i32.const 0) (local.get 0x3b9)) + (i64.store offset=0x3ba align=1 (i32.const 0) (local.get 0x3ba)) + (i64.store offset=0x3bb align=1 (i32.const 0) (local.get 0x3bb)) + (i64.store offset=0x3bc align=1 (i32.const 0) (local.get 0x3bc)) + (i64.store offset=0x3bd align=1 (i32.const 0) (local.get 0x3bd)) + (i64.store offset=0x3be align=1 (i32.const 0) (local.get 0x3be)) + (i64.store offset=0x3bf align=1 (i32.const 0) (local.get 0x3bf)) + (i64.store offset=0x3c0 align=1 (i32.const 0) (local.get 0x3c0)) + (i64.store offset=0x3c1 align=1 (i32.const 0) (local.get 0x3c1)) + (i64.store offset=0x3c2 align=1 (i32.const 0) (local.get 0x3c2)) + (i64.store offset=0x3c3 align=1 (i32.const 0) (local.get 0x3c3)) + (i64.store offset=0x3c4 align=1 (i32.const 0) (local.get 0x3c4)) + (i64.store offset=0x3c5 align=1 (i32.const 0) (local.get 0x3c5)) + (i64.store offset=0x3c6 align=1 (i32.const 0) (local.get 0x3c6)) + (i64.store offset=0x3c7 align=1 (i32.const 0) (local.get 0x3c7)) + (i64.store offset=0x3c8 align=1 (i32.const 0) (local.get 0x3c8)) + (i64.store offset=0x3c9 align=1 (i32.const 0) (local.get 0x3c9)) + (i64.store offset=0x3ca align=1 (i32.const 0) (local.get 0x3ca)) + (i64.store offset=0x3cb align=1 (i32.const 0) (local.get 0x3cb)) + (i64.store offset=0x3cc align=1 (i32.const 0) (local.get 0x3cc)) + (i64.store offset=0x3cd align=1 (i32.const 0) (local.get 0x3cd)) + (i64.store offset=0x3ce align=1 (i32.const 0) (local.get 0x3ce)) + (i64.store offset=0x3cf align=1 (i32.const 0) (local.get 0x3cf)) + (i64.store offset=0x3d0 align=1 (i32.const 0) (local.get 0x3d0)) + (i64.store offset=0x3d1 align=1 (i32.const 0) (local.get 0x3d1)) + (i64.store offset=0x3d2 align=1 (i32.const 0) (local.get 0x3d2)) + (i64.store offset=0x3d3 align=1 (i32.const 0) (local.get 0x3d3)) + (i64.store offset=0x3d4 align=1 (i32.const 0) (local.get 0x3d4)) + (i64.store offset=0x3d5 align=1 (i32.const 0) (local.get 0x3d5)) + (i64.store offset=0x3d6 align=1 (i32.const 0) (local.get 0x3d6)) + (i64.store offset=0x3d7 align=1 (i32.const 0) (local.get 0x3d7)) + (i64.store offset=0x3d8 align=1 (i32.const 0) (local.get 0x3d8)) + (i64.store offset=0x3d9 align=1 (i32.const 0) (local.get 0x3d9)) + (i64.store offset=0x3da align=1 (i32.const 0) (local.get 0x3da)) + (i64.store offset=0x3db align=1 (i32.const 0) (local.get 0x3db)) + (i64.store offset=0x3dc align=1 (i32.const 0) (local.get 0x3dc)) + (i64.store offset=0x3dd align=1 (i32.const 0) (local.get 0x3dd)) + (i64.store offset=0x3de align=1 (i32.const 0) (local.get 0x3de)) + (i64.store offset=0x3df align=1 (i32.const 0) (local.get 0x3df)) + (i64.store offset=0x3e0 align=1 (i32.const 0) (local.get 0x3e0)) + (i64.store offset=0x3e1 align=1 (i32.const 0) (local.get 0x3e1)) + (i64.store offset=0x3e2 align=1 (i32.const 0) (local.get 0x3e2)) + (i64.store offset=0x3e3 align=1 (i32.const 0) (local.get 0x3e3)) + (i64.store offset=0x3e4 align=1 (i32.const 0) (local.get 0x3e4)) + (i64.store offset=0x3e5 align=1 (i32.const 0) (local.get 0x3e5)) + (i64.store offset=0x3e6 align=1 (i32.const 0) (local.get 0x3e6)) + (i64.store offset=0x3e7 align=1 (i32.const 0) (local.get 0x3e7)) + (i64.store offset=0x3e8 align=1 (i32.const 0) (local.get 0x3e8)) + (i64.store offset=0x3e9 align=1 (i32.const 0) (local.get 0x3e9)) + (i64.store offset=0x3ea align=1 (i32.const 0) (local.get 0x3ea)) + (i64.store offset=0x3eb align=1 (i32.const 0) (local.get 0x3eb)) + (i64.store offset=0x3ec align=1 (i32.const 0) (local.get 0x3ec)) + (i64.store offset=0x3ed align=1 (i32.const 0) (local.get 0x3ed)) + (i64.store offset=0x3ee align=1 (i32.const 0) (local.get 0x3ee)) + (i64.store offset=0x3ef align=1 (i32.const 0) (local.get 0x3ef)) + (i64.store offset=0x3f0 align=1 (i32.const 0) (local.get 0x3f0)) + (i64.store offset=0x3f1 align=1 (i32.const 0) (local.get 0x3f1)) + (i64.store offset=0x3f2 align=1 (i32.const 0) (local.get 0x3f2)) + (i64.store offset=0x3f3 align=1 (i32.const 0) (local.get 0x3f3)) + (i64.store offset=0x3f4 align=1 (i32.const 0) (local.get 0x3f4)) + (i64.store offset=0x3f5 align=1 (i32.const 0) (local.get 0x3f5)) + (i64.store offset=0x3f6 align=1 (i32.const 0) (local.get 0x3f6)) + (i64.store offset=0x3f7 align=1 (i32.const 0) (local.get 0x3f7)) + (i64.store offset=0x3f8 align=1 (i32.const 0) (local.get 0x3f8)) + (i64.store offset=0x3f9 align=1 (i32.const 0) (local.get 0x3f9)) + (i64.store offset=0x3fa align=1 (i32.const 0) (local.get 0x3fa)) + (i64.store offset=0x3fb align=1 (i32.const 0) (local.get 0x3fb)) + (i64.store offset=0x3fc align=1 (i32.const 0) (local.get 0x3fc)) + (i64.store offset=0x3fd align=1 (i32.const 0) (local.get 0x3fd)) + (i64.store offset=0x3fe align=1 (i32.const 0) (local.get 0x3fe)) + (i64.store offset=0x3ff align=1 (i32.const 0) (local.get 0x3ff)) + (i64.store offset=0x400 align=1 (i32.const 0) (local.get 0x400)) + (i64.store offset=0x401 align=1 (i32.const 0) (local.get 0x401)) + (i64.store offset=0x402 align=1 (i32.const 0) (local.get 0x402)) + (i64.store offset=0x403 align=1 (i32.const 0) (local.get 0x403)) + (i64.store offset=0x404 align=1 (i32.const 0) (local.get 0x404)) + (i64.store offset=0x405 align=1 (i32.const 0) (local.get 0x405)) + (i64.store offset=0x406 align=1 (i32.const 0) (local.get 0x406)) + (i64.store offset=0x407 align=1 (i32.const 0) (local.get 0x407)) + (i64.store offset=0x408 align=1 (i32.const 0) (local.get 0x408)) + (i64.store offset=0x409 align=1 (i32.const 0) (local.get 0x409)) + (i64.store offset=0x40a align=1 (i32.const 0) (local.get 0x40a)) + (i64.store offset=0x40b align=1 (i32.const 0) (local.get 0x40b)) + (i64.store offset=0x40c align=1 (i32.const 0) (local.get 0x40c)) + (i64.store offset=0x40d align=1 (i32.const 0) (local.get 0x40d)) + (i64.store offset=0x40e align=1 (i32.const 0) (local.get 0x40e)) + (i64.store offset=0x40f align=1 (i32.const 0) (local.get 0x40f)) + (i64.store offset=0x410 align=1 (i32.const 0) (local.get 0x410)) + (i64.store offset=0x411 align=1 (i32.const 0) (local.get 0x411)) + (i64.store offset=0x412 align=1 (i32.const 0) (local.get 0x412)) + (i64.store offset=0x413 align=1 (i32.const 0) (local.get 0x413)) + (i64.store offset=0x414 align=1 (i32.const 0) (local.get 0x414)) + (i64.store offset=0x415 align=1 (i32.const 0) (local.get 0x415)) + (i64.store offset=0x416 align=1 (i32.const 0) (local.get 0x416)) + (i64.store offset=0x417 align=1 (i32.const 0) (local.get 0x417)) + (i64.store offset=0x418 align=1 (i32.const 0) (local.get 0x418)) + (i64.store offset=0x419 align=1 (i32.const 0) (local.get 0x419)) + (i64.store offset=0x41a align=1 (i32.const 0) (local.get 0x41a)) + (i64.store offset=0x41b align=1 (i32.const 0) (local.get 0x41b)) + (i64.store offset=0x41c align=1 (i32.const 0) (local.get 0x41c)) + (i64.store offset=0x41d align=1 (i32.const 0) (local.get 0x41d)) + (i64.store offset=0x41e align=1 (i32.const 0) (local.get 0x41e)) + (i64.store offset=0x41f align=1 (i32.const 0) (local.get 0x41f)) + ) +)`); + +// ./test/core/skip-stack-guard-page.wast:2275 +assert_exhaustion(() => invoke($0, `test-guard-page-skip`, [0]), `call stack exhausted`); + +// ./test/core/skip-stack-guard-page.wast:2276 +assert_exhaustion(() => invoke($0, `test-guard-page-skip`, [100]), `call stack exhausted`); + +// ./test/core/skip-stack-guard-page.wast:2277 +assert_exhaustion(() => invoke($0, `test-guard-page-skip`, [200]), `call stack exhausted`); + +// ./test/core/skip-stack-guard-page.wast:2278 +assert_exhaustion(() => invoke($0, `test-guard-page-skip`, [300]), `call stack exhausted`); + +// ./test/core/skip-stack-guard-page.wast:2279 +assert_exhaustion(() => invoke($0, `test-guard-page-skip`, [400]), `call stack exhausted`); + +// ./test/core/skip-stack-guard-page.wast:2280 +assert_exhaustion(() => invoke($0, `test-guard-page-skip`, [500]), `call stack exhausted`); + +// ./test/core/skip-stack-guard-page.wast:2281 +assert_exhaustion(() => invoke($0, `test-guard-page-skip`, [600]), `call stack exhausted`); + +// ./test/core/skip-stack-guard-page.wast:2282 +assert_exhaustion(() => invoke($0, `test-guard-page-skip`, [700]), `call stack exhausted`); + +// ./test/core/skip-stack-guard-page.wast:2283 +assert_exhaustion(() => invoke($0, `test-guard-page-skip`, [800]), `call stack exhausted`); + +// ./test/core/skip-stack-guard-page.wast:2284 +assert_exhaustion(() => invoke($0, `test-guard-page-skip`, [900]), `call stack exhausted`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/stack.wast.js b/js/src/jit-test/tests/wasm/spec/spec/stack.wast.js new file mode 100644 index 0000000000..306a613cf8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/stack.wast.js @@ -0,0 +1,263 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/stack.wast + +// ./test/core/stack.wast:1 +let $0 = instantiate(`(module + (func (export "fac-expr") (param $$n i64) (result i64) + (local $$i i64) + (local $$res i64) + (local.set $$i (local.get $$n)) + (local.set $$res (i64.const 1)) + (block $$done + (loop $$loop + (if + (i64.eq (local.get $$i) (i64.const 0)) + (then (br $$done)) + (else + (local.set $$res (i64.mul (local.get $$i) (local.get $$res))) + (local.set $$i (i64.sub (local.get $$i) (i64.const 1))) + ) + ) + (br $$loop) + ) + ) + (local.get $$res) + ) + + (func (export "fac-stack") (param $$n i64) (result i64) + (local $$i i64) + (local $$res i64) + (local.get $$n) + (local.set $$i) + (i64.const 1) + (local.set $$res) + (block $$done + (loop $$loop + (local.get $$i) + (i64.const 0) + (i64.eq) + (if + (then (br $$done)) + (else + (local.get $$i) + (local.get $$res) + (i64.mul) + (local.set $$res) + (local.get $$i) + (i64.const 1) + (i64.sub) + (local.set $$i) + ) + ) + (br $$loop) + ) + ) + (local.get $$res) + ) + + (func (export "fac-stack-raw") (param $$n i64) (result i64) + (local $$i i64) + (local $$res i64) + local.get $$n + local.set $$i + i64.const 1 + local.set $$res + block $$done + loop $$loop + local.get $$i + i64.const 0 + i64.eq + if $$body + br $$done + else $$body + local.get $$i + local.get $$res + i64.mul + local.set $$res + local.get $$i + i64.const 1 + i64.sub + local.set $$i + end $$body + br $$loop + end $$loop + end $$done + local.get $$res + ) + + (func (export "fac-mixed") (param $$n i64) (result i64) + (local $$i i64) + (local $$res i64) + (local.set $$i (local.get $$n)) + (local.set $$res (i64.const 1)) + (block $$done + (loop $$loop + (i64.eq (local.get $$i) (i64.const 0)) + (if + (then (br $$done)) + (else + (i64.mul (local.get $$i) (local.get $$res)) + (local.set $$res) + (i64.sub (local.get $$i) (i64.const 1)) + (local.set $$i) + ) + ) + (br $$loop) + ) + ) + (local.get $$res) + ) + + (func (export "fac-mixed-raw") (param $$n i64) (result i64) + (local $$i i64) + (local $$res i64) + (local.set $$i (local.get $$n)) + (local.set $$res (i64.const 1)) + block $$done + loop $$loop + (i64.eq (local.get $$i) (i64.const 0)) + if + br $$done + else + (i64.mul (local.get $$i) (local.get $$res)) + local.set $$res + (i64.sub (local.get $$i) (i64.const 1)) + local.set $$i + end + br $$loop + end + end + local.get $$res + ) + + (global $$temp (mut i32) (i32.const 0)) + (func $$add_one_to_global (result i32) + (local i32) + (global.set $$temp (i32.add (i32.const 1) (global.get $$temp))) + (global.get $$temp) + ) + (func $$add_one_to_global_and_drop + (drop (call $$add_one_to_global)) + ) + (func (export "not-quite-a-tree") (result i32) + call $$add_one_to_global + call $$add_one_to_global + call $$add_one_to_global_and_drop + i32.add + ) +)`); + +// ./test/core/stack.wast:146 +assert_return(() => invoke($0, `fac-expr`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/stack.wast:147 +assert_return(() => invoke($0, `fac-stack`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/stack.wast:148 +assert_return(() => invoke($0, `fac-mixed`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/stack.wast:150 +assert_return(() => invoke($0, `not-quite-a-tree`, []), [value("i32", 3)]); + +// ./test/core/stack.wast:151 +assert_return(() => invoke($0, `not-quite-a-tree`, []), [value("i32", 9)]); + +// ./test/core/stack.wast:156 +let $1 = instantiate(`(module + (type $$proc (func)) + (table 1 funcref) + + (func + (block i32.const 0 call_indirect) + (loop i32.const 0 call_indirect) + (if (i32.const 0) (then i32.const 0 call_indirect)) + (if (i32.const 0) + (then i32.const 0 call_indirect) + (else i32.const 0 call_indirect) + ) + (block i32.const 0 call_indirect (type $$proc)) + (loop i32.const 0 call_indirect (type $$proc)) + (if (i32.const 0) (then i32.const 0 call_indirect (type $$proc))) + (if (i32.const 0) + (then i32.const 0 call_indirect (type $$proc)) + (else i32.const 0 call_indirect (type $$proc)) + ) + (block i32.const 0 i32.const 0 call_indirect (param i32)) + (loop i32.const 0 i32.const 0 call_indirect (param i32)) + (if (i32.const 0) (then i32.const 0 i32.const 0 call_indirect (param i32))) + (if (i32.const 0) + (then i32.const 0 i32.const 0 call_indirect (param i32)) + (else i32.const 0 i32.const 0 call_indirect (param i32)) + ) + (block (result i32) i32.const 0 call_indirect (result i32)) (drop) + (loop (result i32) i32.const 0 call_indirect (result i32)) (drop) + (if (result i32) (i32.const 0) + (then i32.const 0 call_indirect (result i32)) + (else i32.const 0 call_indirect (result i32)) + ) (drop) + (block i32.const 0 call_indirect (type $$proc) (param) (result)) + (loop i32.const 0 call_indirect (type $$proc) (param) (result)) + (if (i32.const 0) + (then i32.const 0 call_indirect (type $$proc) (param) (result)) + ) + (if (i32.const 0) + (then i32.const 0 call_indirect (type $$proc) (param) (param) (result)) + (else i32.const 0 call_indirect (type $$proc) (param) (result) (result)) + ) + + block i32.const 0 call_indirect end + loop i32.const 0 call_indirect end + i32.const 0 if i32.const 0 call_indirect end + i32.const 0 if i32.const 0 call_indirect else i32.const 0 call_indirect end + block i32.const 0 call_indirect (type $$proc) end + loop i32.const 0 call_indirect (type $$proc) end + i32.const 0 if i32.const 0 call_indirect (type $$proc) end + i32.const 0 + if + i32.const 0 call_indirect (type $$proc) + else + i32.const 0 call_indirect (type $$proc) + end + block i32.const 0 i32.const 0 call_indirect (param i32) end + loop i32.const 0 i32.const 0 call_indirect (param i32) end + i32.const 0 if i32.const 0 i32.const 0 call_indirect (param i32) end + i32.const 0 + if + i32.const 0 i32.const 0 call_indirect (param i32) + else + i32.const 0 i32.const 0 call_indirect (param i32) + end + block (result i32) i32.const 0 call_indirect (result i32) end drop + loop (result i32) i32.const 0 call_indirect (result i32) end drop + i32.const 0 + if (result i32) + i32.const 0 call_indirect (result i32) + else + i32.const 0 call_indirect (result i32) + end drop + block i32.const 0 call_indirect (type $$proc) (param) (result) end + loop i32.const 0 call_indirect (type $$proc) (param) (result) end + i32.const 0 if i32.const 0 call_indirect (type $$proc) (param) (result) end + i32.const 0 + if + i32.const 0 call_indirect (type $$proc) (param) (result) + else + i32.const 0 call_indirect (type $$proc) (param) (param) (result) (result) + end + i32.const 0 call_indirect + ) +)`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/start.wast.js b/js/src/jit-test/tests/wasm/spec/spec/start.wast.js new file mode 100644 index 0000000000..7dee026a84 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/start.wast.js @@ -0,0 +1,150 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/start.wast + +// ./test/core/start.wast:1 +assert_invalid(() => instantiate(`(module (func) (start 1))`), `unknown function`); + +// ./test/core/start.wast:6 +assert_invalid( + () => instantiate(`(module + (func $$main (result i32) (return (i32.const 0))) + (start $$main) + )`), + `start function`, +); + +// ./test/core/start.wast:13 +assert_invalid( + () => instantiate(`(module + (func $$main (param $$a i32)) + (start $$main) + )`), + `start function`, +); + +// ./test/core/start.wast:21 +let $0 = instantiate(`(module + (memory (data "A")) + (func $$inc + (i32.store8 + (i32.const 0) + (i32.add + (i32.load8_u (i32.const 0)) + (i32.const 1) + ) + ) + ) + (func $$get (result i32) + (return (i32.load8_u (i32.const 0))) + ) + (func $$main + (call $$inc) + (call $$inc) + (call $$inc) + ) + + (start $$main) + (export "inc" (func $$inc)) + (export "get" (func $$get)) +)`); + +// ./test/core/start.wast:45 +assert_return(() => invoke($0, `get`, []), [value("i32", 68)]); + +// ./test/core/start.wast:46 +invoke($0, `inc`, []); + +// ./test/core/start.wast:47 +assert_return(() => invoke($0, `get`, []), [value("i32", 69)]); + +// ./test/core/start.wast:48 +invoke($0, `inc`, []); + +// ./test/core/start.wast:49 +assert_return(() => invoke($0, `get`, []), [value("i32", 70)]); + +// ./test/core/start.wast:51 +let $1 = instantiate(`(module + (memory (data "A")) + (func $$inc + (i32.store8 + (i32.const 0) + (i32.add + (i32.load8_u (i32.const 0)) + (i32.const 1) + ) + ) + ) + (func $$get (result i32) + (return (i32.load8_u (i32.const 0))) + ) + (func $$main + (call $$inc) + (call $$inc) + (call $$inc) + ) + (start 2) + (export "inc" (func $$inc)) + (export "get" (func $$get)) +)`); + +// ./test/core/start.wast:74 +assert_return(() => invoke($1, `get`, []), [value("i32", 68)]); + +// ./test/core/start.wast:75 +invoke($1, `inc`, []); + +// ./test/core/start.wast:76 +assert_return(() => invoke($1, `get`, []), [value("i32", 69)]); + +// ./test/core/start.wast:77 +invoke($1, `inc`, []); + +// ./test/core/start.wast:78 +assert_return(() => invoke($1, `get`, []), [value("i32", 70)]); + +// ./test/core/start.wast:80 +let $2 = instantiate(`(module + (func $$print_i32 (import "spectest" "print_i32") (param i32)) + (func $$main (call $$print_i32 (i32.const 1))) + (start 1) +)`); + +// ./test/core/start.wast:86 +let $3 = instantiate(`(module + (func $$print_i32 (import "spectest" "print_i32") (param i32)) + (func $$main (call $$print_i32 (i32.const 2))) + (start $$main) +)`); + +// ./test/core/start.wast:92 +let $4 = instantiate(`(module + (func $$print (import "spectest" "print")) + (start $$print) +)`); + +// ./test/core/start.wast:97 +assert_trap( + () => instantiate(`(module (func $$main (unreachable)) (start $$main))`), + `unreachable`, +); + +// ./test/core/start.wast:102 +assert_malformed( + () => instantiate(`(module (func $$a (unreachable)) (func $$b (unreachable)) (start $$a) (start $$b)) `), + `multiple start sections`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/store.wast.js b/js/src/jit-test/tests/wasm/spec/spec/store.wast.js new file mode 100644 index 0000000000..c11b459ca2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/store.wast.js @@ -0,0 +1,583 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/store.wast + +// ./test/core/store.wast:3 +let $0 = instantiate(`(module + (memory 1) + + (func (export "as-block-value") + (block (i32.store (i32.const 0) (i32.const 1))) + ) + (func (export "as-loop-value") + (loop (i32.store (i32.const 0) (i32.const 1))) + ) + + (func (export "as-br-value") + (block (br 0 (i32.store (i32.const 0) (i32.const 1)))) + ) + (func (export "as-br_if-value") + (block + (br_if 0 (i32.store (i32.const 0) (i32.const 1)) (i32.const 1)) + ) + ) + (func (export "as-br_if-value-cond") + (block + (br_if 0 (i32.const 6) (i32.store (i32.const 0) (i32.const 1))) + ) + ) + (func (export "as-br_table-value") + (block + (br_table 0 (i32.store (i32.const 0) (i32.const 1)) (i32.const 1)) + ) + ) + + (func (export "as-return-value") + (return (i32.store (i32.const 0) (i32.const 1))) + ) + + (func (export "as-if-then") + (if (i32.const 1) (then (i32.store (i32.const 0) (i32.const 1)))) + ) + (func (export "as-if-else") + (if (i32.const 0) (then) (else (i32.store (i32.const 0) (i32.const 1)))) + ) +)`); + +// ./test/core/store.wast:44 +assert_return(() => invoke($0, `as-block-value`, []), []); + +// ./test/core/store.wast:45 +assert_return(() => invoke($0, `as-loop-value`, []), []); + +// ./test/core/store.wast:47 +assert_return(() => invoke($0, `as-br-value`, []), []); + +// ./test/core/store.wast:48 +assert_return(() => invoke($0, `as-br_if-value`, []), []); + +// ./test/core/store.wast:49 +assert_return(() => invoke($0, `as-br_if-value-cond`, []), []); + +// ./test/core/store.wast:50 +assert_return(() => invoke($0, `as-br_table-value`, []), []); + +// ./test/core/store.wast:52 +assert_return(() => invoke($0, `as-return-value`, []), []); + +// ./test/core/store.wast:54 +assert_return(() => invoke($0, `as-if-then`, []), []); + +// ./test/core/store.wast:55 +assert_return(() => invoke($0, `as-if-else`, []), []); + +// ./test/core/store.wast:57 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (i32.store32 (local.get 0) (i32.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:64 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (i32.store64 (local.get 0) (i64.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:72 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (i64.store64 (local.get 0) (i64.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:80 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (f32.store32 (local.get 0) (f32.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:87 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (f32.store64 (local.get 0) (f64.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:95 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (f64.store32 (local.get 0) (f32.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:102 +assert_malformed( + () => instantiate(`(memory 1) (func (param i32) (f64.store64 (local.get 0) (f64.const 0))) `), + `unknown operator`, +); + +// ./test/core/store.wast:111 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i32) (result i32) (i32.store (i32.const 0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:115 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i64) (result i64) (i64.store (i32.const 0) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:119 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param f32) (result f32) (f32.store (i32.const 0) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:123 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param f64) (result f64) (f64.store (i32.const 0) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:127 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i32) (result i32) (i32.store8 (i32.const 0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:131 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i32) (result i32) (i32.store16 (i32.const 0) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:135 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i64) (result i64) (i64.store8 (i32.const 0) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:139 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i64) (result i64) (i64.store16 (i32.const 0) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:143 +assert_invalid( + () => instantiate(`(module (memory 1) (func (param i64) (result i64) (i64.store32 (i32.const 0) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/store.wast:149 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty + (i32.store) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:158 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty + (i32.const 0) (i32.store) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:167 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-block + (i32.const 0) (i32.const 0) + (block (i32.store)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:177 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-block + (i32.const 0) + (block (i32.const 0) (i32.store)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:187 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-loop + (i32.const 0) (i32.const 0) + (loop (i32.store)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:197 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-loop + (i32.const 0) + (loop (i32.const 0) (i32.store)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:207 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-then + (i32.const 0) (i32.const 0) + (if (then (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:217 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-then + (i32.const 0) + (if (then (i32.const 0) (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:227 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-else + (i32.const 0) (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:237 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-else + (i32.const 0) + (if (result i32) (then (i32.const 0)) (else (i32.const 0) (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:247 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-br + (i32.const 0) (i32.const 0) + (block (br 0 (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:257 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-br + (i32.const 0) + (block (br 0 (i32.const 0) (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:267 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-br_if + (i32.const 0) (i32.const 0) + (block (br_if 0 (i32.store) (i32.const 1)) ) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:277 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-br_if + (i32.const 0) + (block (br_if 0 (i32.const 0) (i32.store) (i32.const 1)) ) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:287 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-br_table + (i32.const 0) (i32.const 0) + (block (br_table 0 (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:297 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-br_table + (i32.const 0) + (block (br_table 0 (i32.const 0) (i32.store))) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:307 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-return + (return (i32.store)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:316 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-return + (return (i32.const 0) (i32.store)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:325 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-select + (select (i32.store) (i32.const 1) (i32.const 2)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:334 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-select + (select (i32.const 0) (i32.store) (i32.const 1) (i32.const 2)) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:343 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-address-empty-in-call + (call 1 (i32.store)) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:353 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$type-value-empty-in-call + (call 1 (i32.const 0) (i32.store)) + ) + (func (param i32) (result i32) (local.get 0)) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:363 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-address-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (i32.store) (i32.const 0) + ) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:379 +assert_invalid( + () => instantiate(`(module + (memory 1) + (func $$f (param i32) (result i32) (local.get 0)) + (type $$sig (func (param i32) (result i32))) + (table funcref (elem $$f)) + (func $$type-value-empty-in-call_indirect + (block (result i32) + (call_indirect (type $$sig) + (i32.const 0) (i32.store) (i32.const 0) + ) + ) + ) + )`), + `type mismatch`, +); + +// ./test/core/store.wast:399 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i32.store (f32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:400 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i32.store8 (f32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:401 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i32.store16 (f32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:402 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store (f32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:403 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store8 (f32.const 0) (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:404 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store16 (f32.const 0) (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:405 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store32 (f32.const 0) (i64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:406 +assert_invalid( + () => instantiate(`(module (memory 1) (func (f32.store (f32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:407 +assert_invalid( + () => instantiate(`(module (memory 1) (func (f64.store (f32.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:409 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i32.store (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:410 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i32.store8 (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:411 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i32.store16 (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:412 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store (i32.const 0) (f32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:413 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store8 (i32.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:414 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store16 (i32.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:415 +assert_invalid( + () => instantiate(`(module (memory 1) (func (i64.store32 (i32.const 0) (f64.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:416 +assert_invalid( + () => instantiate(`(module (memory 1) (func (f32.store (i32.const 0) (i32.const 0))))`), + `type mismatch`, +); + +// ./test/core/store.wast:417 +assert_invalid( + () => instantiate(`(module (memory 1) (func (f64.store (i32.const 0) (i64.const 0))))`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/switch.wast.js b/js/src/jit-test/tests/wasm/spec/spec/switch.wast.js new file mode 100644 index 0000000000..403b2c3762 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/switch.wast.js @@ -0,0 +1,220 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/switch.wast + +// ./test/core/switch.wast:1 +let $0 = instantiate(`(module + ;; Statement switch + (func (export "stmt") (param $$i i32) (result i32) + (local $$j i32) + (local.set $$j (i32.const 100)) + (block $$switch + (block $$7 + (block $$default + (block $$6 + (block $$5 + (block $$4 + (block $$3 + (block $$2 + (block $$1 + (block $$0 + (br_table $$0 $$1 $$2 $$3 $$4 $$5 $$6 $$7 $$default + (local.get $$i) + ) + ) ;; 0 + (return (local.get $$i)) + ) ;; 1 + (nop) + ;; fallthrough + ) ;; 2 + ;; fallthrough + ) ;; 3 + (local.set $$j (i32.sub (i32.const 0) (local.get $$i))) + (br $$switch) + ) ;; 4 + (br $$switch) + ) ;; 5 + (local.set $$j (i32.const 101)) + (br $$switch) + ) ;; 6 + (local.set $$j (i32.const 101)) + ;; fallthrough + ) ;; default + (local.set $$j (i32.const 102)) + ) ;; 7 + ;; fallthrough + ) + (return (local.get $$j)) + ) + + ;; Expression switch + (func (export "expr") (param $$i i64) (result i64) + (local $$j i64) + (local.set $$j (i64.const 100)) + (return + (block $$switch (result i64) + (block $$7 + (block $$default + (block $$4 + (block $$5 + (block $$6 + (block $$3 + (block $$2 + (block $$1 + (block $$0 + (br_table $$0 $$1 $$2 $$3 $$4 $$5 $$6 $$7 $$default + (i32.wrap_i64 (local.get $$i)) + ) + ) ;; 0 + (return (local.get $$i)) + ) ;; 1 + (nop) + ;; fallthrough + ) ;; 2 + ;; fallthrough + ) ;; 3 + (br $$switch (i64.sub (i64.const 0) (local.get $$i))) + ) ;; 6 + (local.set $$j (i64.const 101)) + ;; fallthrough + ) ;; 4 + ;; fallthrough + ) ;; 5 + ;; fallthrough + ) ;; default + (br $$switch (local.get $$j)) + ) ;; 7 + (i64.const -5) + ) + ) + ) + + ;; Argument switch + (func (export "arg") (param $$i i32) (result i32) + (return + (block $$2 (result i32) + (i32.add (i32.const 10) + (block $$1 (result i32) + (i32.add (i32.const 100) + (block $$0 (result i32) + (i32.add (i32.const 1000) + (block $$default (result i32) + (br_table $$0 $$1 $$2 $$default + (i32.mul (i32.const 2) (local.get $$i)) + (i32.and (i32.const 3) (local.get $$i)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + + ;; Corner cases + (func (export "corner") (result i32) + (block + (br_table 0 (i32.const 0)) + ) + (i32.const 1) + ) +)`); + +// ./test/core/switch.wast:120 +assert_return(() => invoke($0, `stmt`, [0]), [value("i32", 0)]); + +// ./test/core/switch.wast:121 +assert_return(() => invoke($0, `stmt`, [1]), [value("i32", -1)]); + +// ./test/core/switch.wast:122 +assert_return(() => invoke($0, `stmt`, [2]), [value("i32", -2)]); + +// ./test/core/switch.wast:123 +assert_return(() => invoke($0, `stmt`, [3]), [value("i32", -3)]); + +// ./test/core/switch.wast:124 +assert_return(() => invoke($0, `stmt`, [4]), [value("i32", 100)]); + +// ./test/core/switch.wast:125 +assert_return(() => invoke($0, `stmt`, [5]), [value("i32", 101)]); + +// ./test/core/switch.wast:126 +assert_return(() => invoke($0, `stmt`, [6]), [value("i32", 102)]); + +// ./test/core/switch.wast:127 +assert_return(() => invoke($0, `stmt`, [7]), [value("i32", 100)]); + +// ./test/core/switch.wast:128 +assert_return(() => invoke($0, `stmt`, [-10]), [value("i32", 102)]); + +// ./test/core/switch.wast:130 +assert_return(() => invoke($0, `expr`, [0n]), [value("i64", 0n)]); + +// ./test/core/switch.wast:131 +assert_return(() => invoke($0, `expr`, [1n]), [value("i64", -1n)]); + +// ./test/core/switch.wast:132 +assert_return(() => invoke($0, `expr`, [2n]), [value("i64", -2n)]); + +// ./test/core/switch.wast:133 +assert_return(() => invoke($0, `expr`, [3n]), [value("i64", -3n)]); + +// ./test/core/switch.wast:134 +assert_return(() => invoke($0, `expr`, [6n]), [value("i64", 101n)]); + +// ./test/core/switch.wast:135 +assert_return(() => invoke($0, `expr`, [7n]), [value("i64", -5n)]); + +// ./test/core/switch.wast:136 +assert_return(() => invoke($0, `expr`, [-10n]), [value("i64", 100n)]); + +// ./test/core/switch.wast:138 +assert_return(() => invoke($0, `arg`, [0]), [value("i32", 110)]); + +// ./test/core/switch.wast:139 +assert_return(() => invoke($0, `arg`, [1]), [value("i32", 12)]); + +// ./test/core/switch.wast:140 +assert_return(() => invoke($0, `arg`, [2]), [value("i32", 4)]); + +// ./test/core/switch.wast:141 +assert_return(() => invoke($0, `arg`, [3]), [value("i32", 1116)]); + +// ./test/core/switch.wast:142 +assert_return(() => invoke($0, `arg`, [4]), [value("i32", 118)]); + +// ./test/core/switch.wast:143 +assert_return(() => invoke($0, `arg`, [5]), [value("i32", 20)]); + +// ./test/core/switch.wast:144 +assert_return(() => invoke($0, `arg`, [6]), [value("i32", 12)]); + +// ./test/core/switch.wast:145 +assert_return(() => invoke($0, `arg`, [7]), [value("i32", 1124)]); + +// ./test/core/switch.wast:146 +assert_return(() => invoke($0, `arg`, [8]), [value("i32", 126)]); + +// ./test/core/switch.wast:148 +assert_return(() => invoke($0, `corner`, []), [value("i32", 1)]); + +// ./test/core/switch.wast:150 +assert_invalid( + () => instantiate(`(module (func (br_table 3 (i32.const 0))))`), + `unknown label`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/table-sub.wast.js b/js/src/jit-test/tests/wasm/spec/spec/table-sub.wast.js new file mode 100644 index 0000000000..81357fa888 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/table-sub.wast.js @@ -0,0 +1,40 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/table-sub.wast + +// ./test/core/table-sub.wast:1 +assert_invalid( + () => instantiate(`(module + (table $$t1 10 funcref) + (table $$t2 10 externref) + (func $$f + (table.copy $$t1 $$t2 (i32.const 0) (i32.const 1) (i32.const 2)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table-sub.wast:12 +assert_invalid( + () => instantiate(`(module + (table $$t 10 funcref) + (elem $$el externref) + (func $$f + (table.init $$t $$el (i32.const 0) (i32.const 1) (i32.const 2)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/table_copy.wast.js b/js/src/jit-test/tests/wasm/spec/spec/table_copy.wast.js new file mode 100644 index 0000000000..d78f54181c --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/table_copy.wast.js @@ -0,0 +1,6436 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/table_copy.wast + +// ./test/core/table_copy.wast:6 +let $0 = instantiate(`(module + (func (export "ef0") (result i32) (i32.const 0)) + (func (export "ef1") (result i32) (i32.const 1)) + (func (export "ef2") (result i32) (i32.const 2)) + (func (export "ef3") (result i32) (i32.const 3)) + (func (export "ef4") (result i32) (i32.const 4)) +)`); + +// ./test/core/table_copy.wast:13 +register($0, `a`); + +// ./test/core/table_copy.wast:15 +let $1 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t1) (i32.const 3) func 1 3 1 4) + (elem (table $$t1) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (nop)) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:45 +invoke($1, `test`, []); + +// ./test/core/table_copy.wast:46 +assert_trap(() => invoke($1, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:47 +assert_trap(() => invoke($1, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:48 +assert_return(() => invoke($1, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:49 +assert_return(() => invoke($1, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:50 +assert_return(() => invoke($1, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:51 +assert_return(() => invoke($1, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:52 +assert_trap(() => invoke($1, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:53 +assert_trap(() => invoke($1, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:54 +assert_trap(() => invoke($1, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:55 +assert_trap(() => invoke($1, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:56 +assert_trap(() => invoke($1, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:57 +assert_trap(() => invoke($1, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:58 +assert_return(() => invoke($1, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:59 +assert_return(() => invoke($1, `check_t0`, [13]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:60 +assert_return(() => invoke($1, `check_t0`, [14]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:61 +assert_return(() => invoke($1, `check_t0`, [15]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:62 +assert_return(() => invoke($1, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:63 +assert_trap(() => invoke($1, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:64 +assert_trap(() => invoke($1, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:65 +assert_trap(() => invoke($1, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:66 +assert_trap(() => invoke($1, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:67 +assert_trap(() => invoke($1, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:68 +assert_trap(() => invoke($1, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:69 +assert_trap(() => invoke($1, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:70 +assert_trap(() => invoke($1, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:71 +assert_trap(() => invoke($1, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:72 +assert_trap(() => invoke($1, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:73 +assert_trap(() => invoke($1, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:74 +assert_trap(() => invoke($1, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:75 +assert_trap(() => invoke($1, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:76 +assert_trap(() => invoke($1, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:77 +assert_trap(() => invoke($1, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:78 +assert_trap(() => invoke($1, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:79 +assert_return(() => invoke($1, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:80 +assert_return(() => invoke($1, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:81 +assert_return(() => invoke($1, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:82 +assert_return(() => invoke($1, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:83 +assert_trap(() => invoke($1, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:84 +assert_trap(() => invoke($1, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:85 +assert_trap(() => invoke($1, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:86 +assert_trap(() => invoke($1, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:87 +assert_return(() => invoke($1, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:88 +assert_return(() => invoke($1, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:89 +assert_return(() => invoke($1, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:90 +assert_return(() => invoke($1, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:91 +assert_return(() => invoke($1, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:92 +assert_trap(() => invoke($1, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:93 +assert_trap(() => invoke($1, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:94 +assert_trap(() => invoke($1, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:95 +assert_trap(() => invoke($1, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:96 +assert_trap(() => invoke($1, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:97 +assert_trap(() => invoke($1, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:98 +assert_trap(() => invoke($1, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:99 +assert_trap(() => invoke($1, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:100 +assert_trap(() => invoke($1, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:101 +assert_trap(() => invoke($1, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:102 +assert_trap(() => invoke($1, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:103 +assert_trap(() => invoke($1, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:104 +assert_trap(() => invoke($1, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:105 +assert_trap(() => invoke($1, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:107 +let $2 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t1) (i32.const 3) func 1 3 1 4) + (elem (table $$t1) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 13) (i32.const 2) (i32.const 3))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:137 +invoke($2, `test`, []); + +// ./test/core/table_copy.wast:138 +assert_trap(() => invoke($2, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:139 +assert_trap(() => invoke($2, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:140 +assert_return(() => invoke($2, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:141 +assert_return(() => invoke($2, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:142 +assert_return(() => invoke($2, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:143 +assert_return(() => invoke($2, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:144 +assert_trap(() => invoke($2, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:145 +assert_trap(() => invoke($2, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:146 +assert_trap(() => invoke($2, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:147 +assert_trap(() => invoke($2, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:148 +assert_trap(() => invoke($2, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:149 +assert_trap(() => invoke($2, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:150 +assert_return(() => invoke($2, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:151 +assert_return(() => invoke($2, `check_t0`, [13]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:152 +assert_return(() => invoke($2, `check_t0`, [14]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:153 +assert_return(() => invoke($2, `check_t0`, [15]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:154 +assert_return(() => invoke($2, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:155 +assert_trap(() => invoke($2, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:156 +assert_trap(() => invoke($2, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:157 +assert_trap(() => invoke($2, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:158 +assert_trap(() => invoke($2, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:159 +assert_trap(() => invoke($2, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:160 +assert_trap(() => invoke($2, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:161 +assert_trap(() => invoke($2, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:162 +assert_trap(() => invoke($2, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:163 +assert_trap(() => invoke($2, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:164 +assert_trap(() => invoke($2, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:165 +assert_trap(() => invoke($2, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:166 +assert_trap(() => invoke($2, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:167 +assert_trap(() => invoke($2, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:168 +assert_trap(() => invoke($2, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:169 +assert_trap(() => invoke($2, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:170 +assert_trap(() => invoke($2, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:171 +assert_return(() => invoke($2, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:172 +assert_return(() => invoke($2, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:173 +assert_return(() => invoke($2, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:174 +assert_return(() => invoke($2, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:175 +assert_trap(() => invoke($2, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:176 +assert_trap(() => invoke($2, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:177 +assert_trap(() => invoke($2, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:178 +assert_trap(() => invoke($2, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:179 +assert_return(() => invoke($2, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:180 +assert_return(() => invoke($2, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:181 +assert_return(() => invoke($2, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:182 +assert_return(() => invoke($2, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:183 +assert_return(() => invoke($2, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:184 +assert_trap(() => invoke($2, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:185 +assert_trap(() => invoke($2, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:186 +assert_trap(() => invoke($2, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:187 +assert_trap(() => invoke($2, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:188 +assert_trap(() => invoke($2, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:189 +assert_trap(() => invoke($2, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:190 +assert_trap(() => invoke($2, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:191 +assert_trap(() => invoke($2, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:192 +assert_trap(() => invoke($2, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:193 +assert_trap(() => invoke($2, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:194 +assert_trap(() => invoke($2, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:195 +assert_trap(() => invoke($2, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:196 +assert_trap(() => invoke($2, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:197 +assert_trap(() => invoke($2, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:199 +let $3 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t1) (i32.const 3) func 1 3 1 4) + (elem (table $$t1) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 25) (i32.const 15) (i32.const 2))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:229 +invoke($3, `test`, []); + +// ./test/core/table_copy.wast:230 +assert_trap(() => invoke($3, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:231 +assert_trap(() => invoke($3, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:232 +assert_return(() => invoke($3, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:233 +assert_return(() => invoke($3, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:234 +assert_return(() => invoke($3, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:235 +assert_return(() => invoke($3, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:236 +assert_trap(() => invoke($3, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:237 +assert_trap(() => invoke($3, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:238 +assert_trap(() => invoke($3, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:239 +assert_trap(() => invoke($3, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:240 +assert_trap(() => invoke($3, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:241 +assert_trap(() => invoke($3, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:242 +assert_return(() => invoke($3, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:243 +assert_return(() => invoke($3, `check_t0`, [13]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:244 +assert_return(() => invoke($3, `check_t0`, [14]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:245 +assert_return(() => invoke($3, `check_t0`, [15]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:246 +assert_return(() => invoke($3, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:247 +assert_trap(() => invoke($3, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:248 +assert_trap(() => invoke($3, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:249 +assert_trap(() => invoke($3, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:250 +assert_trap(() => invoke($3, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:251 +assert_trap(() => invoke($3, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:252 +assert_trap(() => invoke($3, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:253 +assert_trap(() => invoke($3, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:254 +assert_trap(() => invoke($3, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:255 +assert_return(() => invoke($3, `check_t0`, [25]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:256 +assert_return(() => invoke($3, `check_t0`, [26]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:257 +assert_trap(() => invoke($3, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:258 +assert_trap(() => invoke($3, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:259 +assert_trap(() => invoke($3, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:260 +assert_trap(() => invoke($3, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:261 +assert_trap(() => invoke($3, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:262 +assert_trap(() => invoke($3, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:263 +assert_return(() => invoke($3, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:264 +assert_return(() => invoke($3, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:265 +assert_return(() => invoke($3, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:266 +assert_return(() => invoke($3, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:267 +assert_trap(() => invoke($3, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:268 +assert_trap(() => invoke($3, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:269 +assert_trap(() => invoke($3, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:270 +assert_trap(() => invoke($3, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:271 +assert_return(() => invoke($3, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:272 +assert_return(() => invoke($3, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:273 +assert_return(() => invoke($3, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:274 +assert_return(() => invoke($3, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:275 +assert_return(() => invoke($3, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:276 +assert_trap(() => invoke($3, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:277 +assert_trap(() => invoke($3, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:278 +assert_trap(() => invoke($3, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:279 +assert_trap(() => invoke($3, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:280 +assert_trap(() => invoke($3, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:281 +assert_trap(() => invoke($3, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:282 +assert_trap(() => invoke($3, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:283 +assert_trap(() => invoke($3, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:284 +assert_trap(() => invoke($3, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:285 +assert_trap(() => invoke($3, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:286 +assert_trap(() => invoke($3, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:287 +assert_trap(() => invoke($3, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:288 +assert_trap(() => invoke($3, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:289 +assert_trap(() => invoke($3, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:291 +let $4 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t1) (i32.const 3) func 1 3 1 4) + (elem (table $$t1) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 13) (i32.const 25) (i32.const 3))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:321 +invoke($4, `test`, []); + +// ./test/core/table_copy.wast:322 +assert_trap(() => invoke($4, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:323 +assert_trap(() => invoke($4, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:324 +assert_return(() => invoke($4, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:325 +assert_return(() => invoke($4, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:326 +assert_return(() => invoke($4, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:327 +assert_return(() => invoke($4, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:328 +assert_trap(() => invoke($4, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:329 +assert_trap(() => invoke($4, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:330 +assert_trap(() => invoke($4, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:331 +assert_trap(() => invoke($4, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:332 +assert_trap(() => invoke($4, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:333 +assert_trap(() => invoke($4, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:334 +assert_return(() => invoke($4, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:335 +assert_trap(() => invoke($4, `check_t0`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:336 +assert_trap(() => invoke($4, `check_t0`, [14]), `uninitialized element`); + +// ./test/core/table_copy.wast:337 +assert_trap(() => invoke($4, `check_t0`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:338 +assert_return(() => invoke($4, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:339 +assert_trap(() => invoke($4, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:340 +assert_trap(() => invoke($4, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:341 +assert_trap(() => invoke($4, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:342 +assert_trap(() => invoke($4, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:343 +assert_trap(() => invoke($4, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:344 +assert_trap(() => invoke($4, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:345 +assert_trap(() => invoke($4, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:346 +assert_trap(() => invoke($4, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:347 +assert_trap(() => invoke($4, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:348 +assert_trap(() => invoke($4, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:349 +assert_trap(() => invoke($4, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:350 +assert_trap(() => invoke($4, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:351 +assert_trap(() => invoke($4, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:352 +assert_trap(() => invoke($4, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:353 +assert_trap(() => invoke($4, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:354 +assert_trap(() => invoke($4, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:355 +assert_return(() => invoke($4, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:356 +assert_return(() => invoke($4, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:357 +assert_return(() => invoke($4, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:358 +assert_return(() => invoke($4, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:359 +assert_trap(() => invoke($4, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:360 +assert_trap(() => invoke($4, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:361 +assert_trap(() => invoke($4, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:362 +assert_trap(() => invoke($4, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:363 +assert_return(() => invoke($4, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:364 +assert_return(() => invoke($4, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:365 +assert_return(() => invoke($4, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:366 +assert_return(() => invoke($4, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:367 +assert_return(() => invoke($4, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:368 +assert_trap(() => invoke($4, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:369 +assert_trap(() => invoke($4, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:370 +assert_trap(() => invoke($4, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:371 +assert_trap(() => invoke($4, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:372 +assert_trap(() => invoke($4, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:373 +assert_trap(() => invoke($4, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:374 +assert_trap(() => invoke($4, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:375 +assert_trap(() => invoke($4, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:376 +assert_trap(() => invoke($4, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:377 +assert_trap(() => invoke($4, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:378 +assert_trap(() => invoke($4, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:379 +assert_trap(() => invoke($4, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:380 +assert_trap(() => invoke($4, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:381 +assert_trap(() => invoke($4, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:383 +let $5 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t1) (i32.const 3) func 1 3 1 4) + (elem (table $$t1) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 20) (i32.const 22) (i32.const 4))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:413 +invoke($5, `test`, []); + +// ./test/core/table_copy.wast:414 +assert_trap(() => invoke($5, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:415 +assert_trap(() => invoke($5, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:416 +assert_return(() => invoke($5, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:417 +assert_return(() => invoke($5, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:418 +assert_return(() => invoke($5, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:419 +assert_return(() => invoke($5, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:420 +assert_trap(() => invoke($5, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:421 +assert_trap(() => invoke($5, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:422 +assert_trap(() => invoke($5, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:423 +assert_trap(() => invoke($5, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:424 +assert_trap(() => invoke($5, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:425 +assert_trap(() => invoke($5, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:426 +assert_return(() => invoke($5, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:427 +assert_return(() => invoke($5, `check_t0`, [13]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:428 +assert_return(() => invoke($5, `check_t0`, [14]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:429 +assert_return(() => invoke($5, `check_t0`, [15]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:430 +assert_return(() => invoke($5, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:431 +assert_trap(() => invoke($5, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:432 +assert_trap(() => invoke($5, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:433 +assert_trap(() => invoke($5, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:434 +assert_trap(() => invoke($5, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:435 +assert_trap(() => invoke($5, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:436 +assert_trap(() => invoke($5, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:437 +assert_trap(() => invoke($5, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:438 +assert_trap(() => invoke($5, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:439 +assert_trap(() => invoke($5, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:440 +assert_trap(() => invoke($5, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:441 +assert_trap(() => invoke($5, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:442 +assert_trap(() => invoke($5, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:443 +assert_trap(() => invoke($5, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:444 +assert_trap(() => invoke($5, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:445 +assert_trap(() => invoke($5, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:446 +assert_trap(() => invoke($5, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:447 +assert_return(() => invoke($5, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:448 +assert_return(() => invoke($5, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:449 +assert_return(() => invoke($5, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:450 +assert_return(() => invoke($5, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:451 +assert_trap(() => invoke($5, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:452 +assert_trap(() => invoke($5, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:453 +assert_trap(() => invoke($5, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:454 +assert_trap(() => invoke($5, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:455 +assert_return(() => invoke($5, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:456 +assert_return(() => invoke($5, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:457 +assert_return(() => invoke($5, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:458 +assert_return(() => invoke($5, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:459 +assert_return(() => invoke($5, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:460 +assert_trap(() => invoke($5, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:461 +assert_trap(() => invoke($5, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:462 +assert_trap(() => invoke($5, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:463 +assert_trap(() => invoke($5, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:464 +assert_trap(() => invoke($5, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:465 +assert_trap(() => invoke($5, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:466 +assert_trap(() => invoke($5, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:467 +assert_trap(() => invoke($5, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:468 +assert_trap(() => invoke($5, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:469 +assert_trap(() => invoke($5, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:470 +assert_trap(() => invoke($5, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:471 +assert_trap(() => invoke($5, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:472 +assert_trap(() => invoke($5, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:473 +assert_trap(() => invoke($5, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:475 +let $6 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t1) (i32.const 3) func 1 3 1 4) + (elem (table $$t1) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 25) (i32.const 1) (i32.const 3))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:505 +invoke($6, `test`, []); + +// ./test/core/table_copy.wast:506 +assert_trap(() => invoke($6, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:507 +assert_trap(() => invoke($6, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:508 +assert_return(() => invoke($6, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:509 +assert_return(() => invoke($6, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:510 +assert_return(() => invoke($6, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:511 +assert_return(() => invoke($6, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:512 +assert_trap(() => invoke($6, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:513 +assert_trap(() => invoke($6, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:514 +assert_trap(() => invoke($6, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:515 +assert_trap(() => invoke($6, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:516 +assert_trap(() => invoke($6, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:517 +assert_trap(() => invoke($6, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:518 +assert_return(() => invoke($6, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:519 +assert_return(() => invoke($6, `check_t0`, [13]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:520 +assert_return(() => invoke($6, `check_t0`, [14]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:521 +assert_return(() => invoke($6, `check_t0`, [15]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:522 +assert_return(() => invoke($6, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:523 +assert_trap(() => invoke($6, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:524 +assert_trap(() => invoke($6, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:525 +assert_trap(() => invoke($6, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:526 +assert_trap(() => invoke($6, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:527 +assert_trap(() => invoke($6, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:528 +assert_trap(() => invoke($6, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:529 +assert_trap(() => invoke($6, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:530 +assert_trap(() => invoke($6, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:531 +assert_trap(() => invoke($6, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:532 +assert_return(() => invoke($6, `check_t0`, [26]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:533 +assert_return(() => invoke($6, `check_t0`, [27]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:534 +assert_trap(() => invoke($6, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:535 +assert_trap(() => invoke($6, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:536 +assert_trap(() => invoke($6, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:537 +assert_trap(() => invoke($6, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:538 +assert_trap(() => invoke($6, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:539 +assert_return(() => invoke($6, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:540 +assert_return(() => invoke($6, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:541 +assert_return(() => invoke($6, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:542 +assert_return(() => invoke($6, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:543 +assert_trap(() => invoke($6, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:544 +assert_trap(() => invoke($6, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:545 +assert_trap(() => invoke($6, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:546 +assert_trap(() => invoke($6, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:547 +assert_return(() => invoke($6, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:548 +assert_return(() => invoke($6, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:549 +assert_return(() => invoke($6, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:550 +assert_return(() => invoke($6, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:551 +assert_return(() => invoke($6, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:552 +assert_trap(() => invoke($6, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:553 +assert_trap(() => invoke($6, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:554 +assert_trap(() => invoke($6, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:555 +assert_trap(() => invoke($6, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:556 +assert_trap(() => invoke($6, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:557 +assert_trap(() => invoke($6, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:558 +assert_trap(() => invoke($6, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:559 +assert_trap(() => invoke($6, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:560 +assert_trap(() => invoke($6, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:561 +assert_trap(() => invoke($6, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:562 +assert_trap(() => invoke($6, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:563 +assert_trap(() => invoke($6, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:564 +assert_trap(() => invoke($6, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:565 +assert_trap(() => invoke($6, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:567 +let $7 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t1) (i32.const 3) func 1 3 1 4) + (elem (table $$t1) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 10) (i32.const 12) (i32.const 7))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:597 +invoke($7, `test`, []); + +// ./test/core/table_copy.wast:598 +assert_trap(() => invoke($7, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:599 +assert_trap(() => invoke($7, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:600 +assert_return(() => invoke($7, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:601 +assert_return(() => invoke($7, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:602 +assert_return(() => invoke($7, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:603 +assert_return(() => invoke($7, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:604 +assert_trap(() => invoke($7, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:605 +assert_trap(() => invoke($7, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:606 +assert_trap(() => invoke($7, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:607 +assert_trap(() => invoke($7, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:608 +assert_return(() => invoke($7, `check_t0`, [10]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:609 +assert_return(() => invoke($7, `check_t0`, [11]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:610 +assert_return(() => invoke($7, `check_t0`, [12]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:611 +assert_return(() => invoke($7, `check_t0`, [13]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:612 +assert_return(() => invoke($7, `check_t0`, [14]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:613 +assert_trap(() => invoke($7, `check_t0`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:614 +assert_trap(() => invoke($7, `check_t0`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:615 +assert_trap(() => invoke($7, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:616 +assert_trap(() => invoke($7, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:617 +assert_trap(() => invoke($7, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:618 +assert_trap(() => invoke($7, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:619 +assert_trap(() => invoke($7, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:620 +assert_trap(() => invoke($7, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:621 +assert_trap(() => invoke($7, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:622 +assert_trap(() => invoke($7, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:623 +assert_trap(() => invoke($7, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:624 +assert_trap(() => invoke($7, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:625 +assert_trap(() => invoke($7, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:626 +assert_trap(() => invoke($7, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:627 +assert_trap(() => invoke($7, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:628 +assert_trap(() => invoke($7, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:629 +assert_trap(() => invoke($7, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:630 +assert_trap(() => invoke($7, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:631 +assert_return(() => invoke($7, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:632 +assert_return(() => invoke($7, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:633 +assert_return(() => invoke($7, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:634 +assert_return(() => invoke($7, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:635 +assert_trap(() => invoke($7, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:636 +assert_trap(() => invoke($7, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:637 +assert_trap(() => invoke($7, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:638 +assert_trap(() => invoke($7, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:639 +assert_return(() => invoke($7, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:640 +assert_return(() => invoke($7, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:641 +assert_return(() => invoke($7, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:642 +assert_return(() => invoke($7, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:643 +assert_return(() => invoke($7, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:644 +assert_trap(() => invoke($7, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:645 +assert_trap(() => invoke($7, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:646 +assert_trap(() => invoke($7, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:647 +assert_trap(() => invoke($7, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:648 +assert_trap(() => invoke($7, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:649 +assert_trap(() => invoke($7, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:650 +assert_trap(() => invoke($7, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:651 +assert_trap(() => invoke($7, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:652 +assert_trap(() => invoke($7, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:653 +assert_trap(() => invoke($7, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:654 +assert_trap(() => invoke($7, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:655 +assert_trap(() => invoke($7, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:656 +assert_trap(() => invoke($7, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:657 +assert_trap(() => invoke($7, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:659 +let $8 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t1) (i32.const 3) func 1 3 1 4) + (elem (table $$t1) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 12) (i32.const 10) (i32.const 7))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:689 +invoke($8, `test`, []); + +// ./test/core/table_copy.wast:690 +assert_trap(() => invoke($8, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:691 +assert_trap(() => invoke($8, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:692 +assert_return(() => invoke($8, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:693 +assert_return(() => invoke($8, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:694 +assert_return(() => invoke($8, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:695 +assert_return(() => invoke($8, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:696 +assert_trap(() => invoke($8, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:697 +assert_trap(() => invoke($8, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:698 +assert_trap(() => invoke($8, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:699 +assert_trap(() => invoke($8, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:700 +assert_trap(() => invoke($8, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:701 +assert_trap(() => invoke($8, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:702 +assert_trap(() => invoke($8, `check_t0`, [12]), `uninitialized element`); + +// ./test/core/table_copy.wast:703 +assert_trap(() => invoke($8, `check_t0`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:704 +assert_return(() => invoke($8, `check_t0`, [14]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:705 +assert_return(() => invoke($8, `check_t0`, [15]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:706 +assert_return(() => invoke($8, `check_t0`, [16]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:707 +assert_return(() => invoke($8, `check_t0`, [17]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:708 +assert_return(() => invoke($8, `check_t0`, [18]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:709 +assert_trap(() => invoke($8, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:710 +assert_trap(() => invoke($8, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:711 +assert_trap(() => invoke($8, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:712 +assert_trap(() => invoke($8, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:713 +assert_trap(() => invoke($8, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:714 +assert_trap(() => invoke($8, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:715 +assert_trap(() => invoke($8, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:716 +assert_trap(() => invoke($8, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:717 +assert_trap(() => invoke($8, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:718 +assert_trap(() => invoke($8, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:719 +assert_trap(() => invoke($8, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:720 +assert_trap(() => invoke($8, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:721 +assert_trap(() => invoke($8, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:722 +assert_trap(() => invoke($8, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:723 +assert_return(() => invoke($8, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:724 +assert_return(() => invoke($8, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:725 +assert_return(() => invoke($8, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:726 +assert_return(() => invoke($8, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:727 +assert_trap(() => invoke($8, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:728 +assert_trap(() => invoke($8, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:729 +assert_trap(() => invoke($8, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:730 +assert_trap(() => invoke($8, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:731 +assert_return(() => invoke($8, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:732 +assert_return(() => invoke($8, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:733 +assert_return(() => invoke($8, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:734 +assert_return(() => invoke($8, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:735 +assert_return(() => invoke($8, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:736 +assert_trap(() => invoke($8, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:737 +assert_trap(() => invoke($8, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:738 +assert_trap(() => invoke($8, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:739 +assert_trap(() => invoke($8, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:740 +assert_trap(() => invoke($8, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:741 +assert_trap(() => invoke($8, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:742 +assert_trap(() => invoke($8, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:743 +assert_trap(() => invoke($8, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:744 +assert_trap(() => invoke($8, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:745 +assert_trap(() => invoke($8, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:746 +assert_trap(() => invoke($8, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:747 +assert_trap(() => invoke($8, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:748 +assert_trap(() => invoke($8, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:749 +assert_trap(() => invoke($8, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:751 +let $9 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t1) (i32.const 3) func 1 3 1 4) + (elem (table $$t1) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t1 $$t0 (i32.const 10) (i32.const 0) (i32.const 20))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:781 +invoke($9, `test`, []); + +// ./test/core/table_copy.wast:782 +assert_trap(() => invoke($9, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:783 +assert_trap(() => invoke($9, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:784 +assert_return(() => invoke($9, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:785 +assert_return(() => invoke($9, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:786 +assert_return(() => invoke($9, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:787 +assert_return(() => invoke($9, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:788 +assert_trap(() => invoke($9, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:789 +assert_trap(() => invoke($9, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:790 +assert_trap(() => invoke($9, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:791 +assert_trap(() => invoke($9, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:792 +assert_trap(() => invoke($9, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:793 +assert_trap(() => invoke($9, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:794 +assert_return(() => invoke($9, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:795 +assert_return(() => invoke($9, `check_t0`, [13]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:796 +assert_return(() => invoke($9, `check_t0`, [14]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:797 +assert_return(() => invoke($9, `check_t0`, [15]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:798 +assert_return(() => invoke($9, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:799 +assert_trap(() => invoke($9, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:800 +assert_trap(() => invoke($9, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:801 +assert_trap(() => invoke($9, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:802 +assert_trap(() => invoke($9, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:803 +assert_trap(() => invoke($9, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:804 +assert_trap(() => invoke($9, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:805 +assert_trap(() => invoke($9, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:806 +assert_trap(() => invoke($9, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:807 +assert_trap(() => invoke($9, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:808 +assert_trap(() => invoke($9, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:809 +assert_trap(() => invoke($9, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:810 +assert_trap(() => invoke($9, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:811 +assert_trap(() => invoke($9, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:812 +assert_trap(() => invoke($9, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:813 +assert_trap(() => invoke($9, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:814 +assert_trap(() => invoke($9, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:815 +assert_return(() => invoke($9, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:816 +assert_return(() => invoke($9, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:817 +assert_return(() => invoke($9, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:818 +assert_return(() => invoke($9, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:819 +assert_trap(() => invoke($9, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:820 +assert_trap(() => invoke($9, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:821 +assert_trap(() => invoke($9, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:822 +assert_trap(() => invoke($9, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:823 +assert_trap(() => invoke($9, `check_t1`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:824 +assert_return(() => invoke($9, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:825 +assert_return(() => invoke($9, `check_t1`, [13]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:826 +assert_return(() => invoke($9, `check_t1`, [14]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:827 +assert_return(() => invoke($9, `check_t1`, [15]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:828 +assert_trap(() => invoke($9, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:829 +assert_trap(() => invoke($9, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:830 +assert_trap(() => invoke($9, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:831 +assert_trap(() => invoke($9, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:832 +assert_trap(() => invoke($9, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:833 +assert_trap(() => invoke($9, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:834 +assert_return(() => invoke($9, `check_t1`, [22]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:835 +assert_return(() => invoke($9, `check_t1`, [23]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:836 +assert_return(() => invoke($9, `check_t1`, [24]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:837 +assert_return(() => invoke($9, `check_t1`, [25]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:838 +assert_return(() => invoke($9, `check_t1`, [26]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:839 +assert_trap(() => invoke($9, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:840 +assert_trap(() => invoke($9, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:841 +assert_trap(() => invoke($9, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:843 +let $10 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t0) (i32.const 3) func 1 3 1 4) + (elem (table $$t0) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (nop)) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:873 +invoke($10, `test`, []); + +// ./test/core/table_copy.wast:874 +assert_trap(() => invoke($10, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:875 +assert_trap(() => invoke($10, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:876 +assert_return(() => invoke($10, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:877 +assert_return(() => invoke($10, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:878 +assert_return(() => invoke($10, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:879 +assert_return(() => invoke($10, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:880 +assert_trap(() => invoke($10, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:881 +assert_trap(() => invoke($10, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:882 +assert_trap(() => invoke($10, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:883 +assert_trap(() => invoke($10, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:884 +assert_trap(() => invoke($10, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:885 +assert_trap(() => invoke($10, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:886 +assert_return(() => invoke($10, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:887 +assert_return(() => invoke($10, `check_t0`, [13]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:888 +assert_return(() => invoke($10, `check_t0`, [14]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:889 +assert_return(() => invoke($10, `check_t0`, [15]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:890 +assert_return(() => invoke($10, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:891 +assert_trap(() => invoke($10, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:892 +assert_trap(() => invoke($10, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:893 +assert_trap(() => invoke($10, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:894 +assert_trap(() => invoke($10, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:895 +assert_trap(() => invoke($10, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:896 +assert_trap(() => invoke($10, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:897 +assert_trap(() => invoke($10, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:898 +assert_trap(() => invoke($10, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:899 +assert_trap(() => invoke($10, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:900 +assert_trap(() => invoke($10, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:901 +assert_trap(() => invoke($10, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:902 +assert_trap(() => invoke($10, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:903 +assert_trap(() => invoke($10, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:904 +assert_trap(() => invoke($10, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:905 +assert_trap(() => invoke($10, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:906 +assert_trap(() => invoke($10, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:907 +assert_return(() => invoke($10, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:908 +assert_return(() => invoke($10, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:909 +assert_return(() => invoke($10, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:910 +assert_return(() => invoke($10, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:911 +assert_trap(() => invoke($10, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:912 +assert_trap(() => invoke($10, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:913 +assert_trap(() => invoke($10, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:914 +assert_trap(() => invoke($10, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:915 +assert_return(() => invoke($10, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:916 +assert_return(() => invoke($10, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:917 +assert_return(() => invoke($10, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:918 +assert_return(() => invoke($10, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:919 +assert_return(() => invoke($10, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:920 +assert_trap(() => invoke($10, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:921 +assert_trap(() => invoke($10, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:922 +assert_trap(() => invoke($10, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:923 +assert_trap(() => invoke($10, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:924 +assert_trap(() => invoke($10, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:925 +assert_trap(() => invoke($10, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:926 +assert_trap(() => invoke($10, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:927 +assert_trap(() => invoke($10, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:928 +assert_trap(() => invoke($10, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:929 +assert_trap(() => invoke($10, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:930 +assert_trap(() => invoke($10, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:931 +assert_trap(() => invoke($10, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:932 +assert_trap(() => invoke($10, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:933 +assert_trap(() => invoke($10, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:935 +let $11 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t0) (i32.const 3) func 1 3 1 4) + (elem (table $$t0) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t1 $$t1 (i32.const 13) (i32.const 2) (i32.const 3))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:965 +invoke($11, `test`, []); + +// ./test/core/table_copy.wast:966 +assert_trap(() => invoke($11, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:967 +assert_trap(() => invoke($11, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:968 +assert_return(() => invoke($11, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:969 +assert_return(() => invoke($11, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:970 +assert_return(() => invoke($11, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:971 +assert_return(() => invoke($11, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:972 +assert_trap(() => invoke($11, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:973 +assert_trap(() => invoke($11, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:974 +assert_trap(() => invoke($11, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:975 +assert_trap(() => invoke($11, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:976 +assert_trap(() => invoke($11, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:977 +assert_trap(() => invoke($11, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:978 +assert_return(() => invoke($11, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:979 +assert_return(() => invoke($11, `check_t0`, [13]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:980 +assert_return(() => invoke($11, `check_t0`, [14]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:981 +assert_return(() => invoke($11, `check_t0`, [15]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:982 +assert_return(() => invoke($11, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:983 +assert_trap(() => invoke($11, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:984 +assert_trap(() => invoke($11, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:985 +assert_trap(() => invoke($11, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:986 +assert_trap(() => invoke($11, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:987 +assert_trap(() => invoke($11, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:988 +assert_trap(() => invoke($11, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:989 +assert_trap(() => invoke($11, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:990 +assert_trap(() => invoke($11, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:991 +assert_trap(() => invoke($11, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:992 +assert_trap(() => invoke($11, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:993 +assert_trap(() => invoke($11, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:994 +assert_trap(() => invoke($11, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:995 +assert_trap(() => invoke($11, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:996 +assert_trap(() => invoke($11, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:997 +assert_trap(() => invoke($11, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:998 +assert_trap(() => invoke($11, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:999 +assert_return(() => invoke($11, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1000 +assert_return(() => invoke($11, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1001 +assert_return(() => invoke($11, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1002 +assert_return(() => invoke($11, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1003 +assert_trap(() => invoke($11, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1004 +assert_trap(() => invoke($11, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1005 +assert_trap(() => invoke($11, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1006 +assert_trap(() => invoke($11, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1007 +assert_return(() => invoke($11, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1008 +assert_return(() => invoke($11, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1009 +assert_return(() => invoke($11, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1010 +assert_return(() => invoke($11, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1011 +assert_return(() => invoke($11, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1012 +assert_trap(() => invoke($11, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:1013 +assert_trap(() => invoke($11, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1014 +assert_trap(() => invoke($11, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1015 +assert_trap(() => invoke($11, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1016 +assert_trap(() => invoke($11, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1017 +assert_trap(() => invoke($11, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1018 +assert_trap(() => invoke($11, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1019 +assert_trap(() => invoke($11, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1020 +assert_trap(() => invoke($11, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1021 +assert_trap(() => invoke($11, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1022 +assert_trap(() => invoke($11, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:1023 +assert_trap(() => invoke($11, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1024 +assert_trap(() => invoke($11, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1025 +assert_trap(() => invoke($11, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1027 +let $12 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t0) (i32.const 3) func 1 3 1 4) + (elem (table $$t0) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t1 $$t1 (i32.const 25) (i32.const 15) (i32.const 2))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:1057 +invoke($12, `test`, []); + +// ./test/core/table_copy.wast:1058 +assert_trap(() => invoke($12, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1059 +assert_trap(() => invoke($12, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1060 +assert_return(() => invoke($12, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1061 +assert_return(() => invoke($12, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1062 +assert_return(() => invoke($12, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1063 +assert_return(() => invoke($12, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1064 +assert_trap(() => invoke($12, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:1065 +assert_trap(() => invoke($12, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1066 +assert_trap(() => invoke($12, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1067 +assert_trap(() => invoke($12, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1068 +assert_trap(() => invoke($12, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1069 +assert_trap(() => invoke($12, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:1070 +assert_return(() => invoke($12, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1071 +assert_return(() => invoke($12, `check_t0`, [13]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1072 +assert_return(() => invoke($12, `check_t0`, [14]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1073 +assert_return(() => invoke($12, `check_t0`, [15]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1074 +assert_return(() => invoke($12, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1075 +assert_trap(() => invoke($12, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1076 +assert_trap(() => invoke($12, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1077 +assert_trap(() => invoke($12, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1078 +assert_trap(() => invoke($12, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1079 +assert_trap(() => invoke($12, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1080 +assert_trap(() => invoke($12, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1081 +assert_trap(() => invoke($12, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1082 +assert_trap(() => invoke($12, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1083 +assert_return(() => invoke($12, `check_t0`, [25]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1084 +assert_return(() => invoke($12, `check_t0`, [26]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1085 +assert_trap(() => invoke($12, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1086 +assert_trap(() => invoke($12, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1087 +assert_trap(() => invoke($12, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1088 +assert_trap(() => invoke($12, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1089 +assert_trap(() => invoke($12, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1090 +assert_trap(() => invoke($12, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:1091 +assert_return(() => invoke($12, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1092 +assert_return(() => invoke($12, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1093 +assert_return(() => invoke($12, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1094 +assert_return(() => invoke($12, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1095 +assert_trap(() => invoke($12, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1096 +assert_trap(() => invoke($12, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1097 +assert_trap(() => invoke($12, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1098 +assert_trap(() => invoke($12, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1099 +assert_return(() => invoke($12, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1100 +assert_return(() => invoke($12, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1101 +assert_return(() => invoke($12, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1102 +assert_return(() => invoke($12, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1103 +assert_return(() => invoke($12, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1104 +assert_trap(() => invoke($12, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:1105 +assert_trap(() => invoke($12, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1106 +assert_trap(() => invoke($12, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1107 +assert_trap(() => invoke($12, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1108 +assert_trap(() => invoke($12, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1109 +assert_trap(() => invoke($12, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1110 +assert_trap(() => invoke($12, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1111 +assert_trap(() => invoke($12, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1112 +assert_trap(() => invoke($12, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1113 +assert_trap(() => invoke($12, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1114 +assert_trap(() => invoke($12, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:1115 +assert_trap(() => invoke($12, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1116 +assert_trap(() => invoke($12, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1117 +assert_trap(() => invoke($12, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1119 +let $13 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t0) (i32.const 3) func 1 3 1 4) + (elem (table $$t0) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t1 $$t1 (i32.const 13) (i32.const 25) (i32.const 3))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:1149 +invoke($13, `test`, []); + +// ./test/core/table_copy.wast:1150 +assert_trap(() => invoke($13, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1151 +assert_trap(() => invoke($13, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1152 +assert_return(() => invoke($13, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1153 +assert_return(() => invoke($13, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1154 +assert_return(() => invoke($13, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1155 +assert_return(() => invoke($13, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1156 +assert_trap(() => invoke($13, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:1157 +assert_trap(() => invoke($13, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1158 +assert_trap(() => invoke($13, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1159 +assert_trap(() => invoke($13, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1160 +assert_trap(() => invoke($13, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1161 +assert_trap(() => invoke($13, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:1162 +assert_return(() => invoke($13, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1163 +assert_trap(() => invoke($13, `check_t0`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:1164 +assert_trap(() => invoke($13, `check_t0`, [14]), `uninitialized element`); + +// ./test/core/table_copy.wast:1165 +assert_trap(() => invoke($13, `check_t0`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:1166 +assert_return(() => invoke($13, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1167 +assert_trap(() => invoke($13, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1168 +assert_trap(() => invoke($13, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1169 +assert_trap(() => invoke($13, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1170 +assert_trap(() => invoke($13, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1171 +assert_trap(() => invoke($13, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1172 +assert_trap(() => invoke($13, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1173 +assert_trap(() => invoke($13, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1174 +assert_trap(() => invoke($13, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1175 +assert_trap(() => invoke($13, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1176 +assert_trap(() => invoke($13, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:1177 +assert_trap(() => invoke($13, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1178 +assert_trap(() => invoke($13, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1179 +assert_trap(() => invoke($13, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1180 +assert_trap(() => invoke($13, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1181 +assert_trap(() => invoke($13, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1182 +assert_trap(() => invoke($13, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:1183 +assert_return(() => invoke($13, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1184 +assert_return(() => invoke($13, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1185 +assert_return(() => invoke($13, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1186 +assert_return(() => invoke($13, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1187 +assert_trap(() => invoke($13, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1188 +assert_trap(() => invoke($13, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1189 +assert_trap(() => invoke($13, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1190 +assert_trap(() => invoke($13, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1191 +assert_return(() => invoke($13, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1192 +assert_return(() => invoke($13, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1193 +assert_return(() => invoke($13, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1194 +assert_return(() => invoke($13, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1195 +assert_return(() => invoke($13, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1196 +assert_trap(() => invoke($13, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:1197 +assert_trap(() => invoke($13, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1198 +assert_trap(() => invoke($13, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1199 +assert_trap(() => invoke($13, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1200 +assert_trap(() => invoke($13, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1201 +assert_trap(() => invoke($13, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1202 +assert_trap(() => invoke($13, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1203 +assert_trap(() => invoke($13, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1204 +assert_trap(() => invoke($13, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1205 +assert_trap(() => invoke($13, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1206 +assert_trap(() => invoke($13, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:1207 +assert_trap(() => invoke($13, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1208 +assert_trap(() => invoke($13, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1209 +assert_trap(() => invoke($13, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1211 +let $14 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t0) (i32.const 3) func 1 3 1 4) + (elem (table $$t0) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t1 $$t1 (i32.const 20) (i32.const 22) (i32.const 4))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:1241 +invoke($14, `test`, []); + +// ./test/core/table_copy.wast:1242 +assert_trap(() => invoke($14, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1243 +assert_trap(() => invoke($14, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1244 +assert_return(() => invoke($14, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1245 +assert_return(() => invoke($14, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1246 +assert_return(() => invoke($14, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1247 +assert_return(() => invoke($14, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1248 +assert_trap(() => invoke($14, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:1249 +assert_trap(() => invoke($14, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1250 +assert_trap(() => invoke($14, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1251 +assert_trap(() => invoke($14, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1252 +assert_trap(() => invoke($14, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1253 +assert_trap(() => invoke($14, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:1254 +assert_return(() => invoke($14, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1255 +assert_return(() => invoke($14, `check_t0`, [13]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1256 +assert_return(() => invoke($14, `check_t0`, [14]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1257 +assert_return(() => invoke($14, `check_t0`, [15]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1258 +assert_return(() => invoke($14, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1259 +assert_trap(() => invoke($14, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1260 +assert_trap(() => invoke($14, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1261 +assert_trap(() => invoke($14, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1262 +assert_trap(() => invoke($14, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1263 +assert_trap(() => invoke($14, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1264 +assert_trap(() => invoke($14, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1265 +assert_trap(() => invoke($14, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1266 +assert_trap(() => invoke($14, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1267 +assert_trap(() => invoke($14, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1268 +assert_trap(() => invoke($14, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:1269 +assert_trap(() => invoke($14, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1270 +assert_trap(() => invoke($14, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1271 +assert_trap(() => invoke($14, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1272 +assert_trap(() => invoke($14, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1273 +assert_trap(() => invoke($14, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1274 +assert_trap(() => invoke($14, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:1275 +assert_return(() => invoke($14, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1276 +assert_return(() => invoke($14, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1277 +assert_return(() => invoke($14, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1278 +assert_return(() => invoke($14, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1279 +assert_trap(() => invoke($14, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1280 +assert_trap(() => invoke($14, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1281 +assert_trap(() => invoke($14, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1282 +assert_trap(() => invoke($14, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1283 +assert_return(() => invoke($14, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1284 +assert_return(() => invoke($14, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1285 +assert_return(() => invoke($14, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1286 +assert_return(() => invoke($14, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1287 +assert_return(() => invoke($14, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1288 +assert_trap(() => invoke($14, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:1289 +assert_trap(() => invoke($14, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1290 +assert_trap(() => invoke($14, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1291 +assert_trap(() => invoke($14, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1292 +assert_trap(() => invoke($14, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1293 +assert_trap(() => invoke($14, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1294 +assert_trap(() => invoke($14, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1295 +assert_trap(() => invoke($14, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1296 +assert_trap(() => invoke($14, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1297 +assert_trap(() => invoke($14, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1298 +assert_trap(() => invoke($14, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:1299 +assert_trap(() => invoke($14, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1300 +assert_trap(() => invoke($14, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1301 +assert_trap(() => invoke($14, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1303 +let $15 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t0) (i32.const 3) func 1 3 1 4) + (elem (table $$t0) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t1 $$t1 (i32.const 25) (i32.const 1) (i32.const 3))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:1333 +invoke($15, `test`, []); + +// ./test/core/table_copy.wast:1334 +assert_trap(() => invoke($15, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1335 +assert_trap(() => invoke($15, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1336 +assert_return(() => invoke($15, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1337 +assert_return(() => invoke($15, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1338 +assert_return(() => invoke($15, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1339 +assert_return(() => invoke($15, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1340 +assert_trap(() => invoke($15, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:1341 +assert_trap(() => invoke($15, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1342 +assert_trap(() => invoke($15, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1343 +assert_trap(() => invoke($15, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1344 +assert_trap(() => invoke($15, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1345 +assert_trap(() => invoke($15, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:1346 +assert_return(() => invoke($15, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1347 +assert_return(() => invoke($15, `check_t0`, [13]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1348 +assert_return(() => invoke($15, `check_t0`, [14]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1349 +assert_return(() => invoke($15, `check_t0`, [15]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1350 +assert_return(() => invoke($15, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1351 +assert_trap(() => invoke($15, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1352 +assert_trap(() => invoke($15, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1353 +assert_trap(() => invoke($15, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1354 +assert_trap(() => invoke($15, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1355 +assert_trap(() => invoke($15, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1356 +assert_trap(() => invoke($15, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1357 +assert_trap(() => invoke($15, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1358 +assert_trap(() => invoke($15, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1359 +assert_trap(() => invoke($15, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1360 +assert_return(() => invoke($15, `check_t0`, [26]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1361 +assert_return(() => invoke($15, `check_t0`, [27]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1362 +assert_trap(() => invoke($15, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1363 +assert_trap(() => invoke($15, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1364 +assert_trap(() => invoke($15, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1365 +assert_trap(() => invoke($15, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1366 +assert_trap(() => invoke($15, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:1367 +assert_return(() => invoke($15, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1368 +assert_return(() => invoke($15, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1369 +assert_return(() => invoke($15, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1370 +assert_return(() => invoke($15, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1371 +assert_trap(() => invoke($15, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1372 +assert_trap(() => invoke($15, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1373 +assert_trap(() => invoke($15, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1374 +assert_trap(() => invoke($15, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1375 +assert_return(() => invoke($15, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1376 +assert_return(() => invoke($15, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1377 +assert_return(() => invoke($15, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1378 +assert_return(() => invoke($15, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1379 +assert_return(() => invoke($15, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1380 +assert_trap(() => invoke($15, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:1381 +assert_trap(() => invoke($15, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1382 +assert_trap(() => invoke($15, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1383 +assert_trap(() => invoke($15, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1384 +assert_trap(() => invoke($15, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1385 +assert_trap(() => invoke($15, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1386 +assert_trap(() => invoke($15, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1387 +assert_trap(() => invoke($15, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1388 +assert_trap(() => invoke($15, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1389 +assert_trap(() => invoke($15, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1390 +assert_trap(() => invoke($15, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:1391 +assert_trap(() => invoke($15, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1392 +assert_trap(() => invoke($15, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1393 +assert_trap(() => invoke($15, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1395 +let $16 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t0) (i32.const 3) func 1 3 1 4) + (elem (table $$t0) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t1 $$t1 (i32.const 10) (i32.const 12) (i32.const 7))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:1425 +invoke($16, `test`, []); + +// ./test/core/table_copy.wast:1426 +assert_trap(() => invoke($16, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1427 +assert_trap(() => invoke($16, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1428 +assert_return(() => invoke($16, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1429 +assert_return(() => invoke($16, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1430 +assert_return(() => invoke($16, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1431 +assert_return(() => invoke($16, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1432 +assert_trap(() => invoke($16, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:1433 +assert_trap(() => invoke($16, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1434 +assert_trap(() => invoke($16, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1435 +assert_trap(() => invoke($16, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1436 +assert_return(() => invoke($16, `check_t0`, [10]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1437 +assert_return(() => invoke($16, `check_t0`, [11]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1438 +assert_return(() => invoke($16, `check_t0`, [12]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1439 +assert_return(() => invoke($16, `check_t0`, [13]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1440 +assert_return(() => invoke($16, `check_t0`, [14]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1441 +assert_trap(() => invoke($16, `check_t0`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:1442 +assert_trap(() => invoke($16, `check_t0`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:1443 +assert_trap(() => invoke($16, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1444 +assert_trap(() => invoke($16, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1445 +assert_trap(() => invoke($16, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1446 +assert_trap(() => invoke($16, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1447 +assert_trap(() => invoke($16, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1448 +assert_trap(() => invoke($16, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1449 +assert_trap(() => invoke($16, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1450 +assert_trap(() => invoke($16, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1451 +assert_trap(() => invoke($16, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1452 +assert_trap(() => invoke($16, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:1453 +assert_trap(() => invoke($16, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1454 +assert_trap(() => invoke($16, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1455 +assert_trap(() => invoke($16, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1456 +assert_trap(() => invoke($16, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1457 +assert_trap(() => invoke($16, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1458 +assert_trap(() => invoke($16, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:1459 +assert_return(() => invoke($16, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1460 +assert_return(() => invoke($16, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1461 +assert_return(() => invoke($16, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1462 +assert_return(() => invoke($16, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1463 +assert_trap(() => invoke($16, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1464 +assert_trap(() => invoke($16, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1465 +assert_trap(() => invoke($16, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1466 +assert_trap(() => invoke($16, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1467 +assert_return(() => invoke($16, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1468 +assert_return(() => invoke($16, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1469 +assert_return(() => invoke($16, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1470 +assert_return(() => invoke($16, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1471 +assert_return(() => invoke($16, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1472 +assert_trap(() => invoke($16, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:1473 +assert_trap(() => invoke($16, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1474 +assert_trap(() => invoke($16, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1475 +assert_trap(() => invoke($16, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1476 +assert_trap(() => invoke($16, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1477 +assert_trap(() => invoke($16, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1478 +assert_trap(() => invoke($16, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1479 +assert_trap(() => invoke($16, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1480 +assert_trap(() => invoke($16, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1481 +assert_trap(() => invoke($16, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1482 +assert_trap(() => invoke($16, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:1483 +assert_trap(() => invoke($16, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1484 +assert_trap(() => invoke($16, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1485 +assert_trap(() => invoke($16, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1487 +let $17 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t0) (i32.const 3) func 1 3 1 4) + (elem (table $$t0) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t1 $$t1 (i32.const 12) (i32.const 10) (i32.const 7))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:1517 +invoke($17, `test`, []); + +// ./test/core/table_copy.wast:1518 +assert_trap(() => invoke($17, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1519 +assert_trap(() => invoke($17, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1520 +assert_return(() => invoke($17, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1521 +assert_return(() => invoke($17, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1522 +assert_return(() => invoke($17, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1523 +assert_return(() => invoke($17, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1524 +assert_trap(() => invoke($17, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:1525 +assert_trap(() => invoke($17, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1526 +assert_trap(() => invoke($17, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1527 +assert_trap(() => invoke($17, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1528 +assert_trap(() => invoke($17, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1529 +assert_trap(() => invoke($17, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:1530 +assert_trap(() => invoke($17, `check_t0`, [12]), `uninitialized element`); + +// ./test/core/table_copy.wast:1531 +assert_trap(() => invoke($17, `check_t0`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:1532 +assert_return(() => invoke($17, `check_t0`, [14]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1533 +assert_return(() => invoke($17, `check_t0`, [15]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1534 +assert_return(() => invoke($17, `check_t0`, [16]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1535 +assert_return(() => invoke($17, `check_t0`, [17]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1536 +assert_return(() => invoke($17, `check_t0`, [18]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1537 +assert_trap(() => invoke($17, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1538 +assert_trap(() => invoke($17, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1539 +assert_trap(() => invoke($17, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1540 +assert_trap(() => invoke($17, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1541 +assert_trap(() => invoke($17, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1542 +assert_trap(() => invoke($17, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1543 +assert_trap(() => invoke($17, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1544 +assert_trap(() => invoke($17, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:1545 +assert_trap(() => invoke($17, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1546 +assert_trap(() => invoke($17, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1547 +assert_trap(() => invoke($17, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1548 +assert_trap(() => invoke($17, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1549 +assert_trap(() => invoke($17, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1550 +assert_trap(() => invoke($17, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:1551 +assert_return(() => invoke($17, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1552 +assert_return(() => invoke($17, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1553 +assert_return(() => invoke($17, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1554 +assert_return(() => invoke($17, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1555 +assert_trap(() => invoke($17, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1556 +assert_trap(() => invoke($17, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1557 +assert_trap(() => invoke($17, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1558 +assert_trap(() => invoke($17, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1559 +assert_return(() => invoke($17, `check_t1`, [11]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1560 +assert_return(() => invoke($17, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1561 +assert_return(() => invoke($17, `check_t1`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1562 +assert_return(() => invoke($17, `check_t1`, [14]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1563 +assert_return(() => invoke($17, `check_t1`, [15]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1564 +assert_trap(() => invoke($17, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:1565 +assert_trap(() => invoke($17, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1566 +assert_trap(() => invoke($17, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1567 +assert_trap(() => invoke($17, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1568 +assert_trap(() => invoke($17, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1569 +assert_trap(() => invoke($17, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1570 +assert_trap(() => invoke($17, `check_t1`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1571 +assert_trap(() => invoke($17, `check_t1`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1572 +assert_trap(() => invoke($17, `check_t1`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1573 +assert_trap(() => invoke($17, `check_t1`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1574 +assert_trap(() => invoke($17, `check_t1`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:1575 +assert_trap(() => invoke($17, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1576 +assert_trap(() => invoke($17, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1577 +assert_trap(() => invoke($17, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1579 +let $18 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (elem (table $$t0) (i32.const 3) func 1 3 1 4) + (elem (table $$t0) (i32.const 11) func 6 3 2 5 7) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.copy $$t0 $$t1 (i32.const 10) (i32.const 0) (i32.const 20))) + (func (export "check_t0") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) + (func (export "check_t1") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) +)`); + +// ./test/core/table_copy.wast:1609 +invoke($18, `test`, []); + +// ./test/core/table_copy.wast:1610 +assert_trap(() => invoke($18, `check_t0`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1611 +assert_trap(() => invoke($18, `check_t0`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1612 +assert_return(() => invoke($18, `check_t0`, [2]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1613 +assert_return(() => invoke($18, `check_t0`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1614 +assert_return(() => invoke($18, `check_t0`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1615 +assert_return(() => invoke($18, `check_t0`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1616 +assert_trap(() => invoke($18, `check_t0`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:1617 +assert_trap(() => invoke($18, `check_t0`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1618 +assert_trap(() => invoke($18, `check_t0`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1619 +assert_trap(() => invoke($18, `check_t0`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1620 +assert_trap(() => invoke($18, `check_t0`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1621 +assert_trap(() => invoke($18, `check_t0`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:1622 +assert_return(() => invoke($18, `check_t0`, [12]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1623 +assert_return(() => invoke($18, `check_t0`, [13]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1624 +assert_return(() => invoke($18, `check_t0`, [14]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1625 +assert_return(() => invoke($18, `check_t0`, [15]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1626 +assert_return(() => invoke($18, `check_t0`, [16]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1627 +assert_trap(() => invoke($18, `check_t0`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1628 +assert_trap(() => invoke($18, `check_t0`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1629 +assert_trap(() => invoke($18, `check_t0`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1630 +assert_trap(() => invoke($18, `check_t0`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1631 +assert_trap(() => invoke($18, `check_t0`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1632 +assert_trap(() => invoke($18, `check_t0`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:1633 +assert_trap(() => invoke($18, `check_t0`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:1634 +assert_trap(() => invoke($18, `check_t0`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:1635 +assert_trap(() => invoke($18, `check_t0`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:1636 +assert_trap(() => invoke($18, `check_t0`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:1637 +assert_trap(() => invoke($18, `check_t0`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1638 +assert_trap(() => invoke($18, `check_t0`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1639 +assert_trap(() => invoke($18, `check_t0`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1640 +assert_trap(() => invoke($18, `check_t1`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:1641 +assert_trap(() => invoke($18, `check_t1`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:1642 +assert_trap(() => invoke($18, `check_t1`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:1643 +assert_return(() => invoke($18, `check_t1`, [3]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1644 +assert_return(() => invoke($18, `check_t1`, [4]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1645 +assert_return(() => invoke($18, `check_t1`, [5]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1646 +assert_return(() => invoke($18, `check_t1`, [6]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1647 +assert_trap(() => invoke($18, `check_t1`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:1648 +assert_trap(() => invoke($18, `check_t1`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:1649 +assert_trap(() => invoke($18, `check_t1`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:1650 +assert_trap(() => invoke($18, `check_t1`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:1651 +assert_trap(() => invoke($18, `check_t1`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:1652 +assert_return(() => invoke($18, `check_t1`, [12]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1653 +assert_return(() => invoke($18, `check_t1`, [13]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1654 +assert_return(() => invoke($18, `check_t1`, [14]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:1655 +assert_return(() => invoke($18, `check_t1`, [15]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:1656 +assert_trap(() => invoke($18, `check_t1`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:1657 +assert_trap(() => invoke($18, `check_t1`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:1658 +assert_trap(() => invoke($18, `check_t1`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:1659 +assert_trap(() => invoke($18, `check_t1`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:1660 +assert_trap(() => invoke($18, `check_t1`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:1661 +assert_trap(() => invoke($18, `check_t1`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:1662 +assert_return(() => invoke($18, `check_t1`, [22]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:1663 +assert_return(() => invoke($18, `check_t1`, [23]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:1664 +assert_return(() => invoke($18, `check_t1`, [24]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:1665 +assert_return(() => invoke($18, `check_t1`, [25]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:1666 +assert_return(() => invoke($18, `check_t1`, [26]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:1667 +assert_trap(() => invoke($18, `check_t1`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:1668 +assert_trap(() => invoke($18, `check_t1`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:1669 +assert_trap(() => invoke($18, `check_t1`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:1671 +let $19 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 28) (i32.const 1) (i32.const 3)) + ))`); + +// ./test/core/table_copy.wast:1694 +assert_trap(() => invoke($19, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:1696 +let $20 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 0xFFFFFFFE) (i32.const 1) (i32.const 2)) + ))`); + +// ./test/core/table_copy.wast:1719 +assert_trap(() => invoke($20, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:1721 +let $21 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 15) (i32.const 25) (i32.const 6)) + ))`); + +// ./test/core/table_copy.wast:1744 +assert_trap(() => invoke($21, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:1746 +let $22 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 15) (i32.const 0xFFFFFFFE) (i32.const 2)) + ))`); + +// ./test/core/table_copy.wast:1769 +assert_trap(() => invoke($22, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:1771 +let $23 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 15) (i32.const 25) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:1794 +invoke($23, `test`, []); + +// ./test/core/table_copy.wast:1796 +let $24 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 30) (i32.const 15) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:1819 +invoke($24, `test`, []); + +// ./test/core/table_copy.wast:1821 +let $25 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 31) (i32.const 15) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:1844 +assert_trap(() => invoke($25, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:1846 +let $26 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 15) (i32.const 30) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:1869 +invoke($26, `test`, []); + +// ./test/core/table_copy.wast:1871 +let $27 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 15) (i32.const 31) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:1894 +assert_trap(() => invoke($27, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:1896 +let $28 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 30) (i32.const 30) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:1919 +invoke($28, `test`, []); + +// ./test/core/table_copy.wast:1921 +let $29 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t0 $$t0 (i32.const 31) (i32.const 31) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:1944 +assert_trap(() => invoke($29, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:1946 +let $30 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t1 $$t0 (i32.const 28) (i32.const 1) (i32.const 3)) + ))`); + +// ./test/core/table_copy.wast:1969 +assert_trap(() => invoke($30, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:1971 +let $31 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t1 $$t0 (i32.const 0xFFFFFFFE) (i32.const 1) (i32.const 2)) + ))`); + +// ./test/core/table_copy.wast:1994 +assert_trap(() => invoke($31, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:1996 +let $32 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t1 $$t0 (i32.const 15) (i32.const 25) (i32.const 6)) + ))`); + +// ./test/core/table_copy.wast:2019 +assert_trap(() => invoke($32, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:2021 +let $33 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t1 $$t0 (i32.const 15) (i32.const 0xFFFFFFFE) (i32.const 2)) + ))`); + +// ./test/core/table_copy.wast:2044 +assert_trap(() => invoke($33, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:2046 +let $34 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t1 $$t0 (i32.const 15) (i32.const 25) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:2069 +invoke($34, `test`, []); + +// ./test/core/table_copy.wast:2071 +let $35 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t1 $$t0 (i32.const 30) (i32.const 15) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:2094 +invoke($35, `test`, []); + +// ./test/core/table_copy.wast:2096 +let $36 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t1 $$t0 (i32.const 31) (i32.const 15) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:2119 +assert_trap(() => invoke($36, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:2121 +let $37 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t1 $$t0 (i32.const 15) (i32.const 30) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:2144 +invoke($37, `test`, []); + +// ./test/core/table_copy.wast:2146 +let $38 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t1 $$t0 (i32.const 15) (i32.const 31) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:2169 +assert_trap(() => invoke($38, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:2171 +let $39 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t1 $$t0 (i32.const 30) (i32.const 30) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:2194 +invoke($39, `test`, []); + +// ./test/core/table_copy.wast:2196 +let $40 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.copy $$t1 $$t0 (i32.const 31) (i32.const 31) (i32.const 0)) + ))`); + +// ./test/core/table_copy.wast:2219 +assert_trap(() => invoke($40, `test`, []), `out of bounds table access`); + +// ./test/core/table_copy.wast:2221 +let $41 = instantiate(`(module + (type (func (result i32))) + (table 32 64 funcref) + (elem (i32.const 0) + $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`); + +// ./test/core/table_copy.wast:2247 +assert_trap(() => invoke($41, `run`, [24, 0, 16]), `out of bounds table access`); + +// ./test/core/table_copy.wast:2249 +assert_return(() => invoke($41, `test`, [0]), [value("i32", 0)]); + +// ./test/core/table_copy.wast:2250 +assert_return(() => invoke($41, `test`, [1]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:2251 +assert_return(() => invoke($41, `test`, [2]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:2252 +assert_return(() => invoke($41, `test`, [3]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:2253 +assert_return(() => invoke($41, `test`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:2254 +assert_return(() => invoke($41, `test`, [5]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:2255 +assert_return(() => invoke($41, `test`, [6]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:2256 +assert_return(() => invoke($41, `test`, [7]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:2257 +assert_trap(() => invoke($41, `test`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:2258 +assert_trap(() => invoke($41, `test`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:2259 +assert_trap(() => invoke($41, `test`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:2260 +assert_trap(() => invoke($41, `test`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:2261 +assert_trap(() => invoke($41, `test`, [12]), `uninitialized element`); + +// ./test/core/table_copy.wast:2262 +assert_trap(() => invoke($41, `test`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:2263 +assert_trap(() => invoke($41, `test`, [14]), `uninitialized element`); + +// ./test/core/table_copy.wast:2264 +assert_trap(() => invoke($41, `test`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:2265 +assert_trap(() => invoke($41, `test`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:2266 +assert_trap(() => invoke($41, `test`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:2267 +assert_trap(() => invoke($41, `test`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:2268 +assert_trap(() => invoke($41, `test`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:2269 +assert_trap(() => invoke($41, `test`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:2270 +assert_trap(() => invoke($41, `test`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:2271 +assert_trap(() => invoke($41, `test`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:2272 +assert_trap(() => invoke($41, `test`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:2273 +assert_trap(() => invoke($41, `test`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:2274 +assert_trap(() => invoke($41, `test`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:2275 +assert_trap(() => invoke($41, `test`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:2276 +assert_trap(() => invoke($41, `test`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:2277 +assert_trap(() => invoke($41, `test`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:2278 +assert_trap(() => invoke($41, `test`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:2279 +assert_trap(() => invoke($41, `test`, [30]), `uninitialized element`); + +// ./test/core/table_copy.wast:2280 +assert_trap(() => invoke($41, `test`, [31]), `uninitialized element`); + +// ./test/core/table_copy.wast:2282 +let $42 = instantiate(`(module + (type (func (result i32))) + (table 32 64 funcref) + (elem (i32.const 0) + $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7 $$f8) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`); + +// ./test/core/table_copy.wast:2308 +assert_trap(() => invoke($42, `run`, [23, 0, 15]), `out of bounds table access`); + +// ./test/core/table_copy.wast:2310 +assert_return(() => invoke($42, `test`, [0]), [value("i32", 0)]); + +// ./test/core/table_copy.wast:2311 +assert_return(() => invoke($42, `test`, [1]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:2312 +assert_return(() => invoke($42, `test`, [2]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:2313 +assert_return(() => invoke($42, `test`, [3]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:2314 +assert_return(() => invoke($42, `test`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:2315 +assert_return(() => invoke($42, `test`, [5]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:2316 +assert_return(() => invoke($42, `test`, [6]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:2317 +assert_return(() => invoke($42, `test`, [7]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:2318 +assert_return(() => invoke($42, `test`, [8]), [value("i32", 8)]); + +// ./test/core/table_copy.wast:2319 +assert_trap(() => invoke($42, `test`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:2320 +assert_trap(() => invoke($42, `test`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:2321 +assert_trap(() => invoke($42, `test`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:2322 +assert_trap(() => invoke($42, `test`, [12]), `uninitialized element`); + +// ./test/core/table_copy.wast:2323 +assert_trap(() => invoke($42, `test`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:2324 +assert_trap(() => invoke($42, `test`, [14]), `uninitialized element`); + +// ./test/core/table_copy.wast:2325 +assert_trap(() => invoke($42, `test`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:2326 +assert_trap(() => invoke($42, `test`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:2327 +assert_trap(() => invoke($42, `test`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:2328 +assert_trap(() => invoke($42, `test`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:2329 +assert_trap(() => invoke($42, `test`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:2330 +assert_trap(() => invoke($42, `test`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:2331 +assert_trap(() => invoke($42, `test`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:2332 +assert_trap(() => invoke($42, `test`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:2333 +assert_trap(() => invoke($42, `test`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:2334 +assert_trap(() => invoke($42, `test`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:2335 +assert_trap(() => invoke($42, `test`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:2336 +assert_trap(() => invoke($42, `test`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:2337 +assert_trap(() => invoke($42, `test`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:2338 +assert_trap(() => invoke($42, `test`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:2339 +assert_trap(() => invoke($42, `test`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:2340 +assert_trap(() => invoke($42, `test`, [30]), `uninitialized element`); + +// ./test/core/table_copy.wast:2341 +assert_trap(() => invoke($42, `test`, [31]), `uninitialized element`); + +// ./test/core/table_copy.wast:2343 +let $43 = instantiate(`(module + (type (func (result i32))) + (table 32 64 funcref) + (elem (i32.const 24) + $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`); + +// ./test/core/table_copy.wast:2369 +assert_trap(() => invoke($43, `run`, [0, 24, 16]), `out of bounds table access`); + +// ./test/core/table_copy.wast:2371 +assert_trap(() => invoke($43, `test`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:2372 +assert_trap(() => invoke($43, `test`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:2373 +assert_trap(() => invoke($43, `test`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:2374 +assert_trap(() => invoke($43, `test`, [3]), `uninitialized element`); + +// ./test/core/table_copy.wast:2375 +assert_trap(() => invoke($43, `test`, [4]), `uninitialized element`); + +// ./test/core/table_copy.wast:2376 +assert_trap(() => invoke($43, `test`, [5]), `uninitialized element`); + +// ./test/core/table_copy.wast:2377 +assert_trap(() => invoke($43, `test`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:2378 +assert_trap(() => invoke($43, `test`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:2379 +assert_trap(() => invoke($43, `test`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:2380 +assert_trap(() => invoke($43, `test`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:2381 +assert_trap(() => invoke($43, `test`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:2382 +assert_trap(() => invoke($43, `test`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:2383 +assert_trap(() => invoke($43, `test`, [12]), `uninitialized element`); + +// ./test/core/table_copy.wast:2384 +assert_trap(() => invoke($43, `test`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:2385 +assert_trap(() => invoke($43, `test`, [14]), `uninitialized element`); + +// ./test/core/table_copy.wast:2386 +assert_trap(() => invoke($43, `test`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:2387 +assert_trap(() => invoke($43, `test`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:2388 +assert_trap(() => invoke($43, `test`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:2389 +assert_trap(() => invoke($43, `test`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:2390 +assert_trap(() => invoke($43, `test`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:2391 +assert_trap(() => invoke($43, `test`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:2392 +assert_trap(() => invoke($43, `test`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:2393 +assert_trap(() => invoke($43, `test`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:2394 +assert_trap(() => invoke($43, `test`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:2395 +assert_return(() => invoke($43, `test`, [24]), [value("i32", 0)]); + +// ./test/core/table_copy.wast:2396 +assert_return(() => invoke($43, `test`, [25]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:2397 +assert_return(() => invoke($43, `test`, [26]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:2398 +assert_return(() => invoke($43, `test`, [27]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:2399 +assert_return(() => invoke($43, `test`, [28]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:2400 +assert_return(() => invoke($43, `test`, [29]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:2401 +assert_return(() => invoke($43, `test`, [30]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:2402 +assert_return(() => invoke($43, `test`, [31]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:2404 +let $44 = instantiate(`(module + (type (func (result i32))) + (table 32 64 funcref) + (elem (i32.const 23) + $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7 $$f8) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`); + +// ./test/core/table_copy.wast:2430 +assert_trap(() => invoke($44, `run`, [0, 23, 15]), `out of bounds table access`); + +// ./test/core/table_copy.wast:2432 +assert_trap(() => invoke($44, `test`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:2433 +assert_trap(() => invoke($44, `test`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:2434 +assert_trap(() => invoke($44, `test`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:2435 +assert_trap(() => invoke($44, `test`, [3]), `uninitialized element`); + +// ./test/core/table_copy.wast:2436 +assert_trap(() => invoke($44, `test`, [4]), `uninitialized element`); + +// ./test/core/table_copy.wast:2437 +assert_trap(() => invoke($44, `test`, [5]), `uninitialized element`); + +// ./test/core/table_copy.wast:2438 +assert_trap(() => invoke($44, `test`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:2439 +assert_trap(() => invoke($44, `test`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:2440 +assert_trap(() => invoke($44, `test`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:2441 +assert_trap(() => invoke($44, `test`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:2442 +assert_trap(() => invoke($44, `test`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:2443 +assert_trap(() => invoke($44, `test`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:2444 +assert_trap(() => invoke($44, `test`, [12]), `uninitialized element`); + +// ./test/core/table_copy.wast:2445 +assert_trap(() => invoke($44, `test`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:2446 +assert_trap(() => invoke($44, `test`, [14]), `uninitialized element`); + +// ./test/core/table_copy.wast:2447 +assert_trap(() => invoke($44, `test`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:2448 +assert_trap(() => invoke($44, `test`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:2449 +assert_trap(() => invoke($44, `test`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:2450 +assert_trap(() => invoke($44, `test`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:2451 +assert_trap(() => invoke($44, `test`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:2452 +assert_trap(() => invoke($44, `test`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:2453 +assert_trap(() => invoke($44, `test`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:2454 +assert_trap(() => invoke($44, `test`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:2455 +assert_return(() => invoke($44, `test`, [23]), [value("i32", 0)]); + +// ./test/core/table_copy.wast:2456 +assert_return(() => invoke($44, `test`, [24]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:2457 +assert_return(() => invoke($44, `test`, [25]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:2458 +assert_return(() => invoke($44, `test`, [26]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:2459 +assert_return(() => invoke($44, `test`, [27]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:2460 +assert_return(() => invoke($44, `test`, [28]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:2461 +assert_return(() => invoke($44, `test`, [29]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:2462 +assert_return(() => invoke($44, `test`, [30]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:2463 +assert_return(() => invoke($44, `test`, [31]), [value("i32", 8)]); + +// ./test/core/table_copy.wast:2465 +let $45 = instantiate(`(module + (type (func (result i32))) + (table 32 64 funcref) + (elem (i32.const 11) + $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`); + +// ./test/core/table_copy.wast:2491 +assert_trap(() => invoke($45, `run`, [24, 11, 16]), `out of bounds table access`); + +// ./test/core/table_copy.wast:2493 +assert_trap(() => invoke($45, `test`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:2494 +assert_trap(() => invoke($45, `test`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:2495 +assert_trap(() => invoke($45, `test`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:2496 +assert_trap(() => invoke($45, `test`, [3]), `uninitialized element`); + +// ./test/core/table_copy.wast:2497 +assert_trap(() => invoke($45, `test`, [4]), `uninitialized element`); + +// ./test/core/table_copy.wast:2498 +assert_trap(() => invoke($45, `test`, [5]), `uninitialized element`); + +// ./test/core/table_copy.wast:2499 +assert_trap(() => invoke($45, `test`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:2500 +assert_trap(() => invoke($45, `test`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:2501 +assert_trap(() => invoke($45, `test`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:2502 +assert_trap(() => invoke($45, `test`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:2503 +assert_trap(() => invoke($45, `test`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:2504 +assert_return(() => invoke($45, `test`, [11]), [value("i32", 0)]); + +// ./test/core/table_copy.wast:2505 +assert_return(() => invoke($45, `test`, [12]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:2506 +assert_return(() => invoke($45, `test`, [13]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:2507 +assert_return(() => invoke($45, `test`, [14]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:2508 +assert_return(() => invoke($45, `test`, [15]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:2509 +assert_return(() => invoke($45, `test`, [16]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:2510 +assert_return(() => invoke($45, `test`, [17]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:2511 +assert_return(() => invoke($45, `test`, [18]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:2512 +assert_trap(() => invoke($45, `test`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:2513 +assert_trap(() => invoke($45, `test`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:2514 +assert_trap(() => invoke($45, `test`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:2515 +assert_trap(() => invoke($45, `test`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:2516 +assert_trap(() => invoke($45, `test`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:2517 +assert_trap(() => invoke($45, `test`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:2518 +assert_trap(() => invoke($45, `test`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:2519 +assert_trap(() => invoke($45, `test`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:2520 +assert_trap(() => invoke($45, `test`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:2521 +assert_trap(() => invoke($45, `test`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:2522 +assert_trap(() => invoke($45, `test`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:2523 +assert_trap(() => invoke($45, `test`, [30]), `uninitialized element`); + +// ./test/core/table_copy.wast:2524 +assert_trap(() => invoke($45, `test`, [31]), `uninitialized element`); + +// ./test/core/table_copy.wast:2526 +let $46 = instantiate(`(module + (type (func (result i32))) + (table 32 64 funcref) + (elem (i32.const 24) + $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`); + +// ./test/core/table_copy.wast:2552 +assert_trap(() => invoke($46, `run`, [11, 24, 16]), `out of bounds table access`); + +// ./test/core/table_copy.wast:2554 +assert_trap(() => invoke($46, `test`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:2555 +assert_trap(() => invoke($46, `test`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:2556 +assert_trap(() => invoke($46, `test`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:2557 +assert_trap(() => invoke($46, `test`, [3]), `uninitialized element`); + +// ./test/core/table_copy.wast:2558 +assert_trap(() => invoke($46, `test`, [4]), `uninitialized element`); + +// ./test/core/table_copy.wast:2559 +assert_trap(() => invoke($46, `test`, [5]), `uninitialized element`); + +// ./test/core/table_copy.wast:2560 +assert_trap(() => invoke($46, `test`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:2561 +assert_trap(() => invoke($46, `test`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:2562 +assert_trap(() => invoke($46, `test`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:2563 +assert_trap(() => invoke($46, `test`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:2564 +assert_trap(() => invoke($46, `test`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:2565 +assert_trap(() => invoke($46, `test`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:2566 +assert_trap(() => invoke($46, `test`, [12]), `uninitialized element`); + +// ./test/core/table_copy.wast:2567 +assert_trap(() => invoke($46, `test`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:2568 +assert_trap(() => invoke($46, `test`, [14]), `uninitialized element`); + +// ./test/core/table_copy.wast:2569 +assert_trap(() => invoke($46, `test`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:2570 +assert_trap(() => invoke($46, `test`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:2571 +assert_trap(() => invoke($46, `test`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:2572 +assert_trap(() => invoke($46, `test`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:2573 +assert_trap(() => invoke($46, `test`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:2574 +assert_trap(() => invoke($46, `test`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:2575 +assert_trap(() => invoke($46, `test`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:2576 +assert_trap(() => invoke($46, `test`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:2577 +assert_trap(() => invoke($46, `test`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:2578 +assert_return(() => invoke($46, `test`, [24]), [value("i32", 0)]); + +// ./test/core/table_copy.wast:2579 +assert_return(() => invoke($46, `test`, [25]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:2580 +assert_return(() => invoke($46, `test`, [26]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:2581 +assert_return(() => invoke($46, `test`, [27]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:2582 +assert_return(() => invoke($46, `test`, [28]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:2583 +assert_return(() => invoke($46, `test`, [29]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:2584 +assert_return(() => invoke($46, `test`, [30]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:2585 +assert_return(() => invoke($46, `test`, [31]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:2587 +let $47 = instantiate(`(module + (type (func (result i32))) + (table 32 64 funcref) + (elem (i32.const 21) + $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`); + +// ./test/core/table_copy.wast:2613 +assert_trap(() => invoke($47, `run`, [24, 21, 16]), `out of bounds table access`); + +// ./test/core/table_copy.wast:2615 +assert_trap(() => invoke($47, `test`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:2616 +assert_trap(() => invoke($47, `test`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:2617 +assert_trap(() => invoke($47, `test`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:2618 +assert_trap(() => invoke($47, `test`, [3]), `uninitialized element`); + +// ./test/core/table_copy.wast:2619 +assert_trap(() => invoke($47, `test`, [4]), `uninitialized element`); + +// ./test/core/table_copy.wast:2620 +assert_trap(() => invoke($47, `test`, [5]), `uninitialized element`); + +// ./test/core/table_copy.wast:2621 +assert_trap(() => invoke($47, `test`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:2622 +assert_trap(() => invoke($47, `test`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:2623 +assert_trap(() => invoke($47, `test`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:2624 +assert_trap(() => invoke($47, `test`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:2625 +assert_trap(() => invoke($47, `test`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:2626 +assert_trap(() => invoke($47, `test`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:2627 +assert_trap(() => invoke($47, `test`, [12]), `uninitialized element`); + +// ./test/core/table_copy.wast:2628 +assert_trap(() => invoke($47, `test`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:2629 +assert_trap(() => invoke($47, `test`, [14]), `uninitialized element`); + +// ./test/core/table_copy.wast:2630 +assert_trap(() => invoke($47, `test`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:2631 +assert_trap(() => invoke($47, `test`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:2632 +assert_trap(() => invoke($47, `test`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:2633 +assert_trap(() => invoke($47, `test`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:2634 +assert_trap(() => invoke($47, `test`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:2635 +assert_trap(() => invoke($47, `test`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:2636 +assert_return(() => invoke($47, `test`, [21]), [value("i32", 0)]); + +// ./test/core/table_copy.wast:2637 +assert_return(() => invoke($47, `test`, [22]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:2638 +assert_return(() => invoke($47, `test`, [23]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:2639 +assert_return(() => invoke($47, `test`, [24]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:2640 +assert_return(() => invoke($47, `test`, [25]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:2641 +assert_return(() => invoke($47, `test`, [26]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:2642 +assert_return(() => invoke($47, `test`, [27]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:2643 +assert_return(() => invoke($47, `test`, [28]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:2644 +assert_trap(() => invoke($47, `test`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:2645 +assert_trap(() => invoke($47, `test`, [30]), `uninitialized element`); + +// ./test/core/table_copy.wast:2646 +assert_trap(() => invoke($47, `test`, [31]), `uninitialized element`); + +// ./test/core/table_copy.wast:2648 +let $48 = instantiate(`(module + (type (func (result i32))) + (table 32 64 funcref) + (elem (i32.const 24) + $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`); + +// ./test/core/table_copy.wast:2674 +assert_trap(() => invoke($48, `run`, [21, 24, 16]), `out of bounds table access`); + +// ./test/core/table_copy.wast:2676 +assert_trap(() => invoke($48, `test`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:2677 +assert_trap(() => invoke($48, `test`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:2678 +assert_trap(() => invoke($48, `test`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:2679 +assert_trap(() => invoke($48, `test`, [3]), `uninitialized element`); + +// ./test/core/table_copy.wast:2680 +assert_trap(() => invoke($48, `test`, [4]), `uninitialized element`); + +// ./test/core/table_copy.wast:2681 +assert_trap(() => invoke($48, `test`, [5]), `uninitialized element`); + +// ./test/core/table_copy.wast:2682 +assert_trap(() => invoke($48, `test`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:2683 +assert_trap(() => invoke($48, `test`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:2684 +assert_trap(() => invoke($48, `test`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:2685 +assert_trap(() => invoke($48, `test`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:2686 +assert_trap(() => invoke($48, `test`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:2687 +assert_trap(() => invoke($48, `test`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:2688 +assert_trap(() => invoke($48, `test`, [12]), `uninitialized element`); + +// ./test/core/table_copy.wast:2689 +assert_trap(() => invoke($48, `test`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:2690 +assert_trap(() => invoke($48, `test`, [14]), `uninitialized element`); + +// ./test/core/table_copy.wast:2691 +assert_trap(() => invoke($48, `test`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:2692 +assert_trap(() => invoke($48, `test`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:2693 +assert_trap(() => invoke($48, `test`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:2694 +assert_trap(() => invoke($48, `test`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:2695 +assert_trap(() => invoke($48, `test`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:2696 +assert_trap(() => invoke($48, `test`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:2697 +assert_trap(() => invoke($48, `test`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:2698 +assert_trap(() => invoke($48, `test`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:2699 +assert_trap(() => invoke($48, `test`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:2700 +assert_return(() => invoke($48, `test`, [24]), [value("i32", 0)]); + +// ./test/core/table_copy.wast:2701 +assert_return(() => invoke($48, `test`, [25]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:2702 +assert_return(() => invoke($48, `test`, [26]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:2703 +assert_return(() => invoke($48, `test`, [27]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:2704 +assert_return(() => invoke($48, `test`, [28]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:2705 +assert_return(() => invoke($48, `test`, [29]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:2706 +assert_return(() => invoke($48, `test`, [30]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:2707 +assert_return(() => invoke($48, `test`, [31]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:2709 +let $49 = instantiate(`(module + (type (func (result i32))) + (table 32 64 funcref) + (elem (i32.const 21) + $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7 $$f8 $$f9 $$f10) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`); + +// ./test/core/table_copy.wast:2735 +assert_trap(() => invoke($49, `run`, [21, 21, 16]), `out of bounds table access`); + +// ./test/core/table_copy.wast:2737 +assert_trap(() => invoke($49, `test`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:2738 +assert_trap(() => invoke($49, `test`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:2739 +assert_trap(() => invoke($49, `test`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:2740 +assert_trap(() => invoke($49, `test`, [3]), `uninitialized element`); + +// ./test/core/table_copy.wast:2741 +assert_trap(() => invoke($49, `test`, [4]), `uninitialized element`); + +// ./test/core/table_copy.wast:2742 +assert_trap(() => invoke($49, `test`, [5]), `uninitialized element`); + +// ./test/core/table_copy.wast:2743 +assert_trap(() => invoke($49, `test`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:2744 +assert_trap(() => invoke($49, `test`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:2745 +assert_trap(() => invoke($49, `test`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:2746 +assert_trap(() => invoke($49, `test`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:2747 +assert_trap(() => invoke($49, `test`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:2748 +assert_trap(() => invoke($49, `test`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:2749 +assert_trap(() => invoke($49, `test`, [12]), `uninitialized element`); + +// ./test/core/table_copy.wast:2750 +assert_trap(() => invoke($49, `test`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:2751 +assert_trap(() => invoke($49, `test`, [14]), `uninitialized element`); + +// ./test/core/table_copy.wast:2752 +assert_trap(() => invoke($49, `test`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:2753 +assert_trap(() => invoke($49, `test`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:2754 +assert_trap(() => invoke($49, `test`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:2755 +assert_trap(() => invoke($49, `test`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:2756 +assert_trap(() => invoke($49, `test`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:2757 +assert_trap(() => invoke($49, `test`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:2758 +assert_return(() => invoke($49, `test`, [21]), [value("i32", 0)]); + +// ./test/core/table_copy.wast:2759 +assert_return(() => invoke($49, `test`, [22]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:2760 +assert_return(() => invoke($49, `test`, [23]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:2761 +assert_return(() => invoke($49, `test`, [24]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:2762 +assert_return(() => invoke($49, `test`, [25]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:2763 +assert_return(() => invoke($49, `test`, [26]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:2764 +assert_return(() => invoke($49, `test`, [27]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:2765 +assert_return(() => invoke($49, `test`, [28]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:2766 +assert_return(() => invoke($49, `test`, [29]), [value("i32", 8)]); + +// ./test/core/table_copy.wast:2767 +assert_return(() => invoke($49, `test`, [30]), [value("i32", 9)]); + +// ./test/core/table_copy.wast:2768 +assert_return(() => invoke($49, `test`, [31]), [value("i32", 10)]); + +// ./test/core/table_copy.wast:2770 +let $50 = instantiate(`(module + (type (func (result i32))) + (table 128 128 funcref) + (elem (i32.const 112) + $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7 $$f8 $$f9 $$f10 $$f11 $$f12 $$f13 $$f14 $$f15) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`); + +// ./test/core/table_copy.wast:2796 +assert_trap(() => invoke($50, `run`, [0, 112, -32]), `out of bounds table access`); + +// ./test/core/table_copy.wast:2798 +assert_trap(() => invoke($50, `test`, [0]), `uninitialized element`); + +// ./test/core/table_copy.wast:2799 +assert_trap(() => invoke($50, `test`, [1]), `uninitialized element`); + +// ./test/core/table_copy.wast:2800 +assert_trap(() => invoke($50, `test`, [2]), `uninitialized element`); + +// ./test/core/table_copy.wast:2801 +assert_trap(() => invoke($50, `test`, [3]), `uninitialized element`); + +// ./test/core/table_copy.wast:2802 +assert_trap(() => invoke($50, `test`, [4]), `uninitialized element`); + +// ./test/core/table_copy.wast:2803 +assert_trap(() => invoke($50, `test`, [5]), `uninitialized element`); + +// ./test/core/table_copy.wast:2804 +assert_trap(() => invoke($50, `test`, [6]), `uninitialized element`); + +// ./test/core/table_copy.wast:2805 +assert_trap(() => invoke($50, `test`, [7]), `uninitialized element`); + +// ./test/core/table_copy.wast:2806 +assert_trap(() => invoke($50, `test`, [8]), `uninitialized element`); + +// ./test/core/table_copy.wast:2807 +assert_trap(() => invoke($50, `test`, [9]), `uninitialized element`); + +// ./test/core/table_copy.wast:2808 +assert_trap(() => invoke($50, `test`, [10]), `uninitialized element`); + +// ./test/core/table_copy.wast:2809 +assert_trap(() => invoke($50, `test`, [11]), `uninitialized element`); + +// ./test/core/table_copy.wast:2810 +assert_trap(() => invoke($50, `test`, [12]), `uninitialized element`); + +// ./test/core/table_copy.wast:2811 +assert_trap(() => invoke($50, `test`, [13]), `uninitialized element`); + +// ./test/core/table_copy.wast:2812 +assert_trap(() => invoke($50, `test`, [14]), `uninitialized element`); + +// ./test/core/table_copy.wast:2813 +assert_trap(() => invoke($50, `test`, [15]), `uninitialized element`); + +// ./test/core/table_copy.wast:2814 +assert_trap(() => invoke($50, `test`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:2815 +assert_trap(() => invoke($50, `test`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:2816 +assert_trap(() => invoke($50, `test`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:2817 +assert_trap(() => invoke($50, `test`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:2818 +assert_trap(() => invoke($50, `test`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:2819 +assert_trap(() => invoke($50, `test`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:2820 +assert_trap(() => invoke($50, `test`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:2821 +assert_trap(() => invoke($50, `test`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:2822 +assert_trap(() => invoke($50, `test`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:2823 +assert_trap(() => invoke($50, `test`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:2824 +assert_trap(() => invoke($50, `test`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:2825 +assert_trap(() => invoke($50, `test`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:2826 +assert_trap(() => invoke($50, `test`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:2827 +assert_trap(() => invoke($50, `test`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:2828 +assert_trap(() => invoke($50, `test`, [30]), `uninitialized element`); + +// ./test/core/table_copy.wast:2829 +assert_trap(() => invoke($50, `test`, [31]), `uninitialized element`); + +// ./test/core/table_copy.wast:2830 +assert_trap(() => invoke($50, `test`, [32]), `uninitialized element`); + +// ./test/core/table_copy.wast:2831 +assert_trap(() => invoke($50, `test`, [33]), `uninitialized element`); + +// ./test/core/table_copy.wast:2832 +assert_trap(() => invoke($50, `test`, [34]), `uninitialized element`); + +// ./test/core/table_copy.wast:2833 +assert_trap(() => invoke($50, `test`, [35]), `uninitialized element`); + +// ./test/core/table_copy.wast:2834 +assert_trap(() => invoke($50, `test`, [36]), `uninitialized element`); + +// ./test/core/table_copy.wast:2835 +assert_trap(() => invoke($50, `test`, [37]), `uninitialized element`); + +// ./test/core/table_copy.wast:2836 +assert_trap(() => invoke($50, `test`, [38]), `uninitialized element`); + +// ./test/core/table_copy.wast:2837 +assert_trap(() => invoke($50, `test`, [39]), `uninitialized element`); + +// ./test/core/table_copy.wast:2838 +assert_trap(() => invoke($50, `test`, [40]), `uninitialized element`); + +// ./test/core/table_copy.wast:2839 +assert_trap(() => invoke($50, `test`, [41]), `uninitialized element`); + +// ./test/core/table_copy.wast:2840 +assert_trap(() => invoke($50, `test`, [42]), `uninitialized element`); + +// ./test/core/table_copy.wast:2841 +assert_trap(() => invoke($50, `test`, [43]), `uninitialized element`); + +// ./test/core/table_copy.wast:2842 +assert_trap(() => invoke($50, `test`, [44]), `uninitialized element`); + +// ./test/core/table_copy.wast:2843 +assert_trap(() => invoke($50, `test`, [45]), `uninitialized element`); + +// ./test/core/table_copy.wast:2844 +assert_trap(() => invoke($50, `test`, [46]), `uninitialized element`); + +// ./test/core/table_copy.wast:2845 +assert_trap(() => invoke($50, `test`, [47]), `uninitialized element`); + +// ./test/core/table_copy.wast:2846 +assert_trap(() => invoke($50, `test`, [48]), `uninitialized element`); + +// ./test/core/table_copy.wast:2847 +assert_trap(() => invoke($50, `test`, [49]), `uninitialized element`); + +// ./test/core/table_copy.wast:2848 +assert_trap(() => invoke($50, `test`, [50]), `uninitialized element`); + +// ./test/core/table_copy.wast:2849 +assert_trap(() => invoke($50, `test`, [51]), `uninitialized element`); + +// ./test/core/table_copy.wast:2850 +assert_trap(() => invoke($50, `test`, [52]), `uninitialized element`); + +// ./test/core/table_copy.wast:2851 +assert_trap(() => invoke($50, `test`, [53]), `uninitialized element`); + +// ./test/core/table_copy.wast:2852 +assert_trap(() => invoke($50, `test`, [54]), `uninitialized element`); + +// ./test/core/table_copy.wast:2853 +assert_trap(() => invoke($50, `test`, [55]), `uninitialized element`); + +// ./test/core/table_copy.wast:2854 +assert_trap(() => invoke($50, `test`, [56]), `uninitialized element`); + +// ./test/core/table_copy.wast:2855 +assert_trap(() => invoke($50, `test`, [57]), `uninitialized element`); + +// ./test/core/table_copy.wast:2856 +assert_trap(() => invoke($50, `test`, [58]), `uninitialized element`); + +// ./test/core/table_copy.wast:2857 +assert_trap(() => invoke($50, `test`, [59]), `uninitialized element`); + +// ./test/core/table_copy.wast:2858 +assert_trap(() => invoke($50, `test`, [60]), `uninitialized element`); + +// ./test/core/table_copy.wast:2859 +assert_trap(() => invoke($50, `test`, [61]), `uninitialized element`); + +// ./test/core/table_copy.wast:2860 +assert_trap(() => invoke($50, `test`, [62]), `uninitialized element`); + +// ./test/core/table_copy.wast:2861 +assert_trap(() => invoke($50, `test`, [63]), `uninitialized element`); + +// ./test/core/table_copy.wast:2862 +assert_trap(() => invoke($50, `test`, [64]), `uninitialized element`); + +// ./test/core/table_copy.wast:2863 +assert_trap(() => invoke($50, `test`, [65]), `uninitialized element`); + +// ./test/core/table_copy.wast:2864 +assert_trap(() => invoke($50, `test`, [66]), `uninitialized element`); + +// ./test/core/table_copy.wast:2865 +assert_trap(() => invoke($50, `test`, [67]), `uninitialized element`); + +// ./test/core/table_copy.wast:2866 +assert_trap(() => invoke($50, `test`, [68]), `uninitialized element`); + +// ./test/core/table_copy.wast:2867 +assert_trap(() => invoke($50, `test`, [69]), `uninitialized element`); + +// ./test/core/table_copy.wast:2868 +assert_trap(() => invoke($50, `test`, [70]), `uninitialized element`); + +// ./test/core/table_copy.wast:2869 +assert_trap(() => invoke($50, `test`, [71]), `uninitialized element`); + +// ./test/core/table_copy.wast:2870 +assert_trap(() => invoke($50, `test`, [72]), `uninitialized element`); + +// ./test/core/table_copy.wast:2871 +assert_trap(() => invoke($50, `test`, [73]), `uninitialized element`); + +// ./test/core/table_copy.wast:2872 +assert_trap(() => invoke($50, `test`, [74]), `uninitialized element`); + +// ./test/core/table_copy.wast:2873 +assert_trap(() => invoke($50, `test`, [75]), `uninitialized element`); + +// ./test/core/table_copy.wast:2874 +assert_trap(() => invoke($50, `test`, [76]), `uninitialized element`); + +// ./test/core/table_copy.wast:2875 +assert_trap(() => invoke($50, `test`, [77]), `uninitialized element`); + +// ./test/core/table_copy.wast:2876 +assert_trap(() => invoke($50, `test`, [78]), `uninitialized element`); + +// ./test/core/table_copy.wast:2877 +assert_trap(() => invoke($50, `test`, [79]), `uninitialized element`); + +// ./test/core/table_copy.wast:2878 +assert_trap(() => invoke($50, `test`, [80]), `uninitialized element`); + +// ./test/core/table_copy.wast:2879 +assert_trap(() => invoke($50, `test`, [81]), `uninitialized element`); + +// ./test/core/table_copy.wast:2880 +assert_trap(() => invoke($50, `test`, [82]), `uninitialized element`); + +// ./test/core/table_copy.wast:2881 +assert_trap(() => invoke($50, `test`, [83]), `uninitialized element`); + +// ./test/core/table_copy.wast:2882 +assert_trap(() => invoke($50, `test`, [84]), `uninitialized element`); + +// ./test/core/table_copy.wast:2883 +assert_trap(() => invoke($50, `test`, [85]), `uninitialized element`); + +// ./test/core/table_copy.wast:2884 +assert_trap(() => invoke($50, `test`, [86]), `uninitialized element`); + +// ./test/core/table_copy.wast:2885 +assert_trap(() => invoke($50, `test`, [87]), `uninitialized element`); + +// ./test/core/table_copy.wast:2886 +assert_trap(() => invoke($50, `test`, [88]), `uninitialized element`); + +// ./test/core/table_copy.wast:2887 +assert_trap(() => invoke($50, `test`, [89]), `uninitialized element`); + +// ./test/core/table_copy.wast:2888 +assert_trap(() => invoke($50, `test`, [90]), `uninitialized element`); + +// ./test/core/table_copy.wast:2889 +assert_trap(() => invoke($50, `test`, [91]), `uninitialized element`); + +// ./test/core/table_copy.wast:2890 +assert_trap(() => invoke($50, `test`, [92]), `uninitialized element`); + +// ./test/core/table_copy.wast:2891 +assert_trap(() => invoke($50, `test`, [93]), `uninitialized element`); + +// ./test/core/table_copy.wast:2892 +assert_trap(() => invoke($50, `test`, [94]), `uninitialized element`); + +// ./test/core/table_copy.wast:2893 +assert_trap(() => invoke($50, `test`, [95]), `uninitialized element`); + +// ./test/core/table_copy.wast:2894 +assert_trap(() => invoke($50, `test`, [96]), `uninitialized element`); + +// ./test/core/table_copy.wast:2895 +assert_trap(() => invoke($50, `test`, [97]), `uninitialized element`); + +// ./test/core/table_copy.wast:2896 +assert_trap(() => invoke($50, `test`, [98]), `uninitialized element`); + +// ./test/core/table_copy.wast:2897 +assert_trap(() => invoke($50, `test`, [99]), `uninitialized element`); + +// ./test/core/table_copy.wast:2898 +assert_trap(() => invoke($50, `test`, [100]), `uninitialized element`); + +// ./test/core/table_copy.wast:2899 +assert_trap(() => invoke($50, `test`, [101]), `uninitialized element`); + +// ./test/core/table_copy.wast:2900 +assert_trap(() => invoke($50, `test`, [102]), `uninitialized element`); + +// ./test/core/table_copy.wast:2901 +assert_trap(() => invoke($50, `test`, [103]), `uninitialized element`); + +// ./test/core/table_copy.wast:2902 +assert_trap(() => invoke($50, `test`, [104]), `uninitialized element`); + +// ./test/core/table_copy.wast:2903 +assert_trap(() => invoke($50, `test`, [105]), `uninitialized element`); + +// ./test/core/table_copy.wast:2904 +assert_trap(() => invoke($50, `test`, [106]), `uninitialized element`); + +// ./test/core/table_copy.wast:2905 +assert_trap(() => invoke($50, `test`, [107]), `uninitialized element`); + +// ./test/core/table_copy.wast:2906 +assert_trap(() => invoke($50, `test`, [108]), `uninitialized element`); + +// ./test/core/table_copy.wast:2907 +assert_trap(() => invoke($50, `test`, [109]), `uninitialized element`); + +// ./test/core/table_copy.wast:2908 +assert_trap(() => invoke($50, `test`, [110]), `uninitialized element`); + +// ./test/core/table_copy.wast:2909 +assert_trap(() => invoke($50, `test`, [111]), `uninitialized element`); + +// ./test/core/table_copy.wast:2910 +assert_return(() => invoke($50, `test`, [112]), [value("i32", 0)]); + +// ./test/core/table_copy.wast:2911 +assert_return(() => invoke($50, `test`, [113]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:2912 +assert_return(() => invoke($50, `test`, [114]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:2913 +assert_return(() => invoke($50, `test`, [115]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:2914 +assert_return(() => invoke($50, `test`, [116]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:2915 +assert_return(() => invoke($50, `test`, [117]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:2916 +assert_return(() => invoke($50, `test`, [118]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:2917 +assert_return(() => invoke($50, `test`, [119]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:2918 +assert_return(() => invoke($50, `test`, [120]), [value("i32", 8)]); + +// ./test/core/table_copy.wast:2919 +assert_return(() => invoke($50, `test`, [121]), [value("i32", 9)]); + +// ./test/core/table_copy.wast:2920 +assert_return(() => invoke($50, `test`, [122]), [value("i32", 10)]); + +// ./test/core/table_copy.wast:2921 +assert_return(() => invoke($50, `test`, [123]), [value("i32", 11)]); + +// ./test/core/table_copy.wast:2922 +assert_return(() => invoke($50, `test`, [124]), [value("i32", 12)]); + +// ./test/core/table_copy.wast:2923 +assert_return(() => invoke($50, `test`, [125]), [value("i32", 13)]); + +// ./test/core/table_copy.wast:2924 +assert_return(() => invoke($50, `test`, [126]), [value("i32", 14)]); + +// ./test/core/table_copy.wast:2925 +assert_return(() => invoke($50, `test`, [127]), [value("i32", 15)]); + +// ./test/core/table_copy.wast:2927 +let $51 = instantiate(`(module + (type (func (result i32))) + (table 128 128 funcref) + (elem (i32.const 0) + $$f0 $$f1 $$f2 $$f3 $$f4 $$f5 $$f6 $$f7 $$f8 $$f9 $$f10 $$f11 $$f12 $$f13 $$f14 $$f15) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$targetOffs i32) (param $$srcOffs i32) (param $$len i32) + (table.copy (local.get $$targetOffs) (local.get $$srcOffs) (local.get $$len))))`); + +// ./test/core/table_copy.wast:2953 +assert_trap(() => invoke($51, `run`, [112, 0, -32]), `out of bounds table access`); + +// ./test/core/table_copy.wast:2955 +assert_return(() => invoke($51, `test`, [0]), [value("i32", 0)]); + +// ./test/core/table_copy.wast:2956 +assert_return(() => invoke($51, `test`, [1]), [value("i32", 1)]); + +// ./test/core/table_copy.wast:2957 +assert_return(() => invoke($51, `test`, [2]), [value("i32", 2)]); + +// ./test/core/table_copy.wast:2958 +assert_return(() => invoke($51, `test`, [3]), [value("i32", 3)]); + +// ./test/core/table_copy.wast:2959 +assert_return(() => invoke($51, `test`, [4]), [value("i32", 4)]); + +// ./test/core/table_copy.wast:2960 +assert_return(() => invoke($51, `test`, [5]), [value("i32", 5)]); + +// ./test/core/table_copy.wast:2961 +assert_return(() => invoke($51, `test`, [6]), [value("i32", 6)]); + +// ./test/core/table_copy.wast:2962 +assert_return(() => invoke($51, `test`, [7]), [value("i32", 7)]); + +// ./test/core/table_copy.wast:2963 +assert_return(() => invoke($51, `test`, [8]), [value("i32", 8)]); + +// ./test/core/table_copy.wast:2964 +assert_return(() => invoke($51, `test`, [9]), [value("i32", 9)]); + +// ./test/core/table_copy.wast:2965 +assert_return(() => invoke($51, `test`, [10]), [value("i32", 10)]); + +// ./test/core/table_copy.wast:2966 +assert_return(() => invoke($51, `test`, [11]), [value("i32", 11)]); + +// ./test/core/table_copy.wast:2967 +assert_return(() => invoke($51, `test`, [12]), [value("i32", 12)]); + +// ./test/core/table_copy.wast:2968 +assert_return(() => invoke($51, `test`, [13]), [value("i32", 13)]); + +// ./test/core/table_copy.wast:2969 +assert_return(() => invoke($51, `test`, [14]), [value("i32", 14)]); + +// ./test/core/table_copy.wast:2970 +assert_return(() => invoke($51, `test`, [15]), [value("i32", 15)]); + +// ./test/core/table_copy.wast:2971 +assert_trap(() => invoke($51, `test`, [16]), `uninitialized element`); + +// ./test/core/table_copy.wast:2972 +assert_trap(() => invoke($51, `test`, [17]), `uninitialized element`); + +// ./test/core/table_copy.wast:2973 +assert_trap(() => invoke($51, `test`, [18]), `uninitialized element`); + +// ./test/core/table_copy.wast:2974 +assert_trap(() => invoke($51, `test`, [19]), `uninitialized element`); + +// ./test/core/table_copy.wast:2975 +assert_trap(() => invoke($51, `test`, [20]), `uninitialized element`); + +// ./test/core/table_copy.wast:2976 +assert_trap(() => invoke($51, `test`, [21]), `uninitialized element`); + +// ./test/core/table_copy.wast:2977 +assert_trap(() => invoke($51, `test`, [22]), `uninitialized element`); + +// ./test/core/table_copy.wast:2978 +assert_trap(() => invoke($51, `test`, [23]), `uninitialized element`); + +// ./test/core/table_copy.wast:2979 +assert_trap(() => invoke($51, `test`, [24]), `uninitialized element`); + +// ./test/core/table_copy.wast:2980 +assert_trap(() => invoke($51, `test`, [25]), `uninitialized element`); + +// ./test/core/table_copy.wast:2981 +assert_trap(() => invoke($51, `test`, [26]), `uninitialized element`); + +// ./test/core/table_copy.wast:2982 +assert_trap(() => invoke($51, `test`, [27]), `uninitialized element`); + +// ./test/core/table_copy.wast:2983 +assert_trap(() => invoke($51, `test`, [28]), `uninitialized element`); + +// ./test/core/table_copy.wast:2984 +assert_trap(() => invoke($51, `test`, [29]), `uninitialized element`); + +// ./test/core/table_copy.wast:2985 +assert_trap(() => invoke($51, `test`, [30]), `uninitialized element`); + +// ./test/core/table_copy.wast:2986 +assert_trap(() => invoke($51, `test`, [31]), `uninitialized element`); + +// ./test/core/table_copy.wast:2987 +assert_trap(() => invoke($51, `test`, [32]), `uninitialized element`); + +// ./test/core/table_copy.wast:2988 +assert_trap(() => invoke($51, `test`, [33]), `uninitialized element`); + +// ./test/core/table_copy.wast:2989 +assert_trap(() => invoke($51, `test`, [34]), `uninitialized element`); + +// ./test/core/table_copy.wast:2990 +assert_trap(() => invoke($51, `test`, [35]), `uninitialized element`); + +// ./test/core/table_copy.wast:2991 +assert_trap(() => invoke($51, `test`, [36]), `uninitialized element`); + +// ./test/core/table_copy.wast:2992 +assert_trap(() => invoke($51, `test`, [37]), `uninitialized element`); + +// ./test/core/table_copy.wast:2993 +assert_trap(() => invoke($51, `test`, [38]), `uninitialized element`); + +// ./test/core/table_copy.wast:2994 +assert_trap(() => invoke($51, `test`, [39]), `uninitialized element`); + +// ./test/core/table_copy.wast:2995 +assert_trap(() => invoke($51, `test`, [40]), `uninitialized element`); + +// ./test/core/table_copy.wast:2996 +assert_trap(() => invoke($51, `test`, [41]), `uninitialized element`); + +// ./test/core/table_copy.wast:2997 +assert_trap(() => invoke($51, `test`, [42]), `uninitialized element`); + +// ./test/core/table_copy.wast:2998 +assert_trap(() => invoke($51, `test`, [43]), `uninitialized element`); + +// ./test/core/table_copy.wast:2999 +assert_trap(() => invoke($51, `test`, [44]), `uninitialized element`); + +// ./test/core/table_copy.wast:3000 +assert_trap(() => invoke($51, `test`, [45]), `uninitialized element`); + +// ./test/core/table_copy.wast:3001 +assert_trap(() => invoke($51, `test`, [46]), `uninitialized element`); + +// ./test/core/table_copy.wast:3002 +assert_trap(() => invoke($51, `test`, [47]), `uninitialized element`); + +// ./test/core/table_copy.wast:3003 +assert_trap(() => invoke($51, `test`, [48]), `uninitialized element`); + +// ./test/core/table_copy.wast:3004 +assert_trap(() => invoke($51, `test`, [49]), `uninitialized element`); + +// ./test/core/table_copy.wast:3005 +assert_trap(() => invoke($51, `test`, [50]), `uninitialized element`); + +// ./test/core/table_copy.wast:3006 +assert_trap(() => invoke($51, `test`, [51]), `uninitialized element`); + +// ./test/core/table_copy.wast:3007 +assert_trap(() => invoke($51, `test`, [52]), `uninitialized element`); + +// ./test/core/table_copy.wast:3008 +assert_trap(() => invoke($51, `test`, [53]), `uninitialized element`); + +// ./test/core/table_copy.wast:3009 +assert_trap(() => invoke($51, `test`, [54]), `uninitialized element`); + +// ./test/core/table_copy.wast:3010 +assert_trap(() => invoke($51, `test`, [55]), `uninitialized element`); + +// ./test/core/table_copy.wast:3011 +assert_trap(() => invoke($51, `test`, [56]), `uninitialized element`); + +// ./test/core/table_copy.wast:3012 +assert_trap(() => invoke($51, `test`, [57]), `uninitialized element`); + +// ./test/core/table_copy.wast:3013 +assert_trap(() => invoke($51, `test`, [58]), `uninitialized element`); + +// ./test/core/table_copy.wast:3014 +assert_trap(() => invoke($51, `test`, [59]), `uninitialized element`); + +// ./test/core/table_copy.wast:3015 +assert_trap(() => invoke($51, `test`, [60]), `uninitialized element`); + +// ./test/core/table_copy.wast:3016 +assert_trap(() => invoke($51, `test`, [61]), `uninitialized element`); + +// ./test/core/table_copy.wast:3017 +assert_trap(() => invoke($51, `test`, [62]), `uninitialized element`); + +// ./test/core/table_copy.wast:3018 +assert_trap(() => invoke($51, `test`, [63]), `uninitialized element`); + +// ./test/core/table_copy.wast:3019 +assert_trap(() => invoke($51, `test`, [64]), `uninitialized element`); + +// ./test/core/table_copy.wast:3020 +assert_trap(() => invoke($51, `test`, [65]), `uninitialized element`); + +// ./test/core/table_copy.wast:3021 +assert_trap(() => invoke($51, `test`, [66]), `uninitialized element`); + +// ./test/core/table_copy.wast:3022 +assert_trap(() => invoke($51, `test`, [67]), `uninitialized element`); + +// ./test/core/table_copy.wast:3023 +assert_trap(() => invoke($51, `test`, [68]), `uninitialized element`); + +// ./test/core/table_copy.wast:3024 +assert_trap(() => invoke($51, `test`, [69]), `uninitialized element`); + +// ./test/core/table_copy.wast:3025 +assert_trap(() => invoke($51, `test`, [70]), `uninitialized element`); + +// ./test/core/table_copy.wast:3026 +assert_trap(() => invoke($51, `test`, [71]), `uninitialized element`); + +// ./test/core/table_copy.wast:3027 +assert_trap(() => invoke($51, `test`, [72]), `uninitialized element`); + +// ./test/core/table_copy.wast:3028 +assert_trap(() => invoke($51, `test`, [73]), `uninitialized element`); + +// ./test/core/table_copy.wast:3029 +assert_trap(() => invoke($51, `test`, [74]), `uninitialized element`); + +// ./test/core/table_copy.wast:3030 +assert_trap(() => invoke($51, `test`, [75]), `uninitialized element`); + +// ./test/core/table_copy.wast:3031 +assert_trap(() => invoke($51, `test`, [76]), `uninitialized element`); + +// ./test/core/table_copy.wast:3032 +assert_trap(() => invoke($51, `test`, [77]), `uninitialized element`); + +// ./test/core/table_copy.wast:3033 +assert_trap(() => invoke($51, `test`, [78]), `uninitialized element`); + +// ./test/core/table_copy.wast:3034 +assert_trap(() => invoke($51, `test`, [79]), `uninitialized element`); + +// ./test/core/table_copy.wast:3035 +assert_trap(() => invoke($51, `test`, [80]), `uninitialized element`); + +// ./test/core/table_copy.wast:3036 +assert_trap(() => invoke($51, `test`, [81]), `uninitialized element`); + +// ./test/core/table_copy.wast:3037 +assert_trap(() => invoke($51, `test`, [82]), `uninitialized element`); + +// ./test/core/table_copy.wast:3038 +assert_trap(() => invoke($51, `test`, [83]), `uninitialized element`); + +// ./test/core/table_copy.wast:3039 +assert_trap(() => invoke($51, `test`, [84]), `uninitialized element`); + +// ./test/core/table_copy.wast:3040 +assert_trap(() => invoke($51, `test`, [85]), `uninitialized element`); + +// ./test/core/table_copy.wast:3041 +assert_trap(() => invoke($51, `test`, [86]), `uninitialized element`); + +// ./test/core/table_copy.wast:3042 +assert_trap(() => invoke($51, `test`, [87]), `uninitialized element`); + +// ./test/core/table_copy.wast:3043 +assert_trap(() => invoke($51, `test`, [88]), `uninitialized element`); + +// ./test/core/table_copy.wast:3044 +assert_trap(() => invoke($51, `test`, [89]), `uninitialized element`); + +// ./test/core/table_copy.wast:3045 +assert_trap(() => invoke($51, `test`, [90]), `uninitialized element`); + +// ./test/core/table_copy.wast:3046 +assert_trap(() => invoke($51, `test`, [91]), `uninitialized element`); + +// ./test/core/table_copy.wast:3047 +assert_trap(() => invoke($51, `test`, [92]), `uninitialized element`); + +// ./test/core/table_copy.wast:3048 +assert_trap(() => invoke($51, `test`, [93]), `uninitialized element`); + +// ./test/core/table_copy.wast:3049 +assert_trap(() => invoke($51, `test`, [94]), `uninitialized element`); + +// ./test/core/table_copy.wast:3050 +assert_trap(() => invoke($51, `test`, [95]), `uninitialized element`); + +// ./test/core/table_copy.wast:3051 +assert_trap(() => invoke($51, `test`, [96]), `uninitialized element`); + +// ./test/core/table_copy.wast:3052 +assert_trap(() => invoke($51, `test`, [97]), `uninitialized element`); + +// ./test/core/table_copy.wast:3053 +assert_trap(() => invoke($51, `test`, [98]), `uninitialized element`); + +// ./test/core/table_copy.wast:3054 +assert_trap(() => invoke($51, `test`, [99]), `uninitialized element`); + +// ./test/core/table_copy.wast:3055 +assert_trap(() => invoke($51, `test`, [100]), `uninitialized element`); + +// ./test/core/table_copy.wast:3056 +assert_trap(() => invoke($51, `test`, [101]), `uninitialized element`); + +// ./test/core/table_copy.wast:3057 +assert_trap(() => invoke($51, `test`, [102]), `uninitialized element`); + +// ./test/core/table_copy.wast:3058 +assert_trap(() => invoke($51, `test`, [103]), `uninitialized element`); + +// ./test/core/table_copy.wast:3059 +assert_trap(() => invoke($51, `test`, [104]), `uninitialized element`); + +// ./test/core/table_copy.wast:3060 +assert_trap(() => invoke($51, `test`, [105]), `uninitialized element`); + +// ./test/core/table_copy.wast:3061 +assert_trap(() => invoke($51, `test`, [106]), `uninitialized element`); + +// ./test/core/table_copy.wast:3062 +assert_trap(() => invoke($51, `test`, [107]), `uninitialized element`); + +// ./test/core/table_copy.wast:3063 +assert_trap(() => invoke($51, `test`, [108]), `uninitialized element`); + +// ./test/core/table_copy.wast:3064 +assert_trap(() => invoke($51, `test`, [109]), `uninitialized element`); + +// ./test/core/table_copy.wast:3065 +assert_trap(() => invoke($51, `test`, [110]), `uninitialized element`); + +// ./test/core/table_copy.wast:3066 +assert_trap(() => invoke($51, `test`, [111]), `uninitialized element`); + +// ./test/core/table_copy.wast:3067 +assert_trap(() => invoke($51, `test`, [112]), `uninitialized element`); + +// ./test/core/table_copy.wast:3068 +assert_trap(() => invoke($51, `test`, [113]), `uninitialized element`); + +// ./test/core/table_copy.wast:3069 +assert_trap(() => invoke($51, `test`, [114]), `uninitialized element`); + +// ./test/core/table_copy.wast:3070 +assert_trap(() => invoke($51, `test`, [115]), `uninitialized element`); + +// ./test/core/table_copy.wast:3071 +assert_trap(() => invoke($51, `test`, [116]), `uninitialized element`); + +// ./test/core/table_copy.wast:3072 +assert_trap(() => invoke($51, `test`, [117]), `uninitialized element`); + +// ./test/core/table_copy.wast:3073 +assert_trap(() => invoke($51, `test`, [118]), `uninitialized element`); + +// ./test/core/table_copy.wast:3074 +assert_trap(() => invoke($51, `test`, [119]), `uninitialized element`); + +// ./test/core/table_copy.wast:3075 +assert_trap(() => invoke($51, `test`, [120]), `uninitialized element`); + +// ./test/core/table_copy.wast:3076 +assert_trap(() => invoke($51, `test`, [121]), `uninitialized element`); + +// ./test/core/table_copy.wast:3077 +assert_trap(() => invoke($51, `test`, [122]), `uninitialized element`); + +// ./test/core/table_copy.wast:3078 +assert_trap(() => invoke($51, `test`, [123]), `uninitialized element`); + +// ./test/core/table_copy.wast:3079 +assert_trap(() => invoke($51, `test`, [124]), `uninitialized element`); + +// ./test/core/table_copy.wast:3080 +assert_trap(() => invoke($51, `test`, [125]), `uninitialized element`); + +// ./test/core/table_copy.wast:3081 +assert_trap(() => invoke($51, `test`, [126]), `uninitialized element`); + +// ./test/core/table_copy.wast:3082 +assert_trap(() => invoke($51, `test`, [127]), `uninitialized element`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/table_fill.wast.js b/js/src/jit-test/tests/wasm/spec/spec/table_fill.wast.js new file mode 100644 index 0000000000..6b2cc53da4 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/table_fill.wast.js @@ -0,0 +1,238 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/table_fill.wast + +// ./test/core/table_fill.wast:1 +let $0 = instantiate(`(module + (table $$t 10 externref) + + (func (export "fill") (param $$i i32) (param $$r externref) (param $$n i32) + (table.fill $$t (local.get $$i) (local.get $$r) (local.get $$n)) + ) + + (func (export "fill-abbrev") (param $$i i32) (param $$r externref) (param $$n i32) + (table.fill (local.get $$i) (local.get $$r) (local.get $$n)) + ) + + (func (export "get") (param $$i i32) (result externref) + (table.get $$t (local.get $$i)) + ) +)`); + +// ./test/core/table_fill.wast:17 +assert_return(() => invoke($0, `get`, [1]), [value('externref', null)]); + +// ./test/core/table_fill.wast:18 +assert_return(() => invoke($0, `get`, [2]), [value('externref', null)]); + +// ./test/core/table_fill.wast:19 +assert_return(() => invoke($0, `get`, [3]), [value('externref', null)]); + +// ./test/core/table_fill.wast:20 +assert_return(() => invoke($0, `get`, [4]), [value('externref', null)]); + +// ./test/core/table_fill.wast:21 +assert_return(() => invoke($0, `get`, [5]), [value('externref', null)]); + +// ./test/core/table_fill.wast:23 +assert_return(() => invoke($0, `fill`, [2, externref(1), 3]), []); + +// ./test/core/table_fill.wast:24 +assert_return(() => invoke($0, `get`, [1]), [value('externref', null)]); + +// ./test/core/table_fill.wast:25 +assert_return(() => invoke($0, `get`, [2]), [new ExternRefResult(1)]); + +// ./test/core/table_fill.wast:26 +assert_return(() => invoke($0, `get`, [3]), [new ExternRefResult(1)]); + +// ./test/core/table_fill.wast:27 +assert_return(() => invoke($0, `get`, [4]), [new ExternRefResult(1)]); + +// ./test/core/table_fill.wast:28 +assert_return(() => invoke($0, `get`, [5]), [value('externref', null)]); + +// ./test/core/table_fill.wast:30 +assert_return(() => invoke($0, `fill`, [4, externref(2), 2]), []); + +// ./test/core/table_fill.wast:31 +assert_return(() => invoke($0, `get`, [3]), [new ExternRefResult(1)]); + +// ./test/core/table_fill.wast:32 +assert_return(() => invoke($0, `get`, [4]), [new ExternRefResult(2)]); + +// ./test/core/table_fill.wast:33 +assert_return(() => invoke($0, `get`, [5]), [new ExternRefResult(2)]); + +// ./test/core/table_fill.wast:34 +assert_return(() => invoke($0, `get`, [6]), [value('externref', null)]); + +// ./test/core/table_fill.wast:36 +assert_return(() => invoke($0, `fill`, [4, externref(3), 0]), []); + +// ./test/core/table_fill.wast:37 +assert_return(() => invoke($0, `get`, [3]), [new ExternRefResult(1)]); + +// ./test/core/table_fill.wast:38 +assert_return(() => invoke($0, `get`, [4]), [new ExternRefResult(2)]); + +// ./test/core/table_fill.wast:39 +assert_return(() => invoke($0, `get`, [5]), [new ExternRefResult(2)]); + +// ./test/core/table_fill.wast:41 +assert_return(() => invoke($0, `fill`, [8, externref(4), 2]), []); + +// ./test/core/table_fill.wast:42 +assert_return(() => invoke($0, `get`, [7]), [value('externref', null)]); + +// ./test/core/table_fill.wast:43 +assert_return(() => invoke($0, `get`, [8]), [new ExternRefResult(4)]); + +// ./test/core/table_fill.wast:44 +assert_return(() => invoke($0, `get`, [9]), [new ExternRefResult(4)]); + +// ./test/core/table_fill.wast:46 +assert_return(() => invoke($0, `fill-abbrev`, [9, null, 1]), []); + +// ./test/core/table_fill.wast:47 +assert_return(() => invoke($0, `get`, [8]), [new ExternRefResult(4)]); + +// ./test/core/table_fill.wast:48 +assert_return(() => invoke($0, `get`, [9]), [value('externref', null)]); + +// ./test/core/table_fill.wast:50 +assert_return(() => invoke($0, `fill`, [10, externref(5), 0]), []); + +// ./test/core/table_fill.wast:51 +assert_return(() => invoke($0, `get`, [9]), [value('externref', null)]); + +// ./test/core/table_fill.wast:53 +assert_trap(() => invoke($0, `fill`, [8, externref(6), 3]), `out of bounds table access`); + +// ./test/core/table_fill.wast:57 +assert_return(() => invoke($0, `get`, [7]), [value('externref', null)]); + +// ./test/core/table_fill.wast:58 +assert_return(() => invoke($0, `get`, [8]), [new ExternRefResult(4)]); + +// ./test/core/table_fill.wast:59 +assert_return(() => invoke($0, `get`, [9]), [value('externref', null)]); + +// ./test/core/table_fill.wast:61 +assert_trap(() => invoke($0, `fill`, [11, null, 0]), `out of bounds table access`); + +// ./test/core/table_fill.wast:66 +assert_trap(() => invoke($0, `fill`, [11, null, 10]), `out of bounds table access`); + +// ./test/core/table_fill.wast:74 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-index-value-length-empty-vs-i32-i32 + (table.fill $$t) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_fill.wast:83 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-index-empty-vs-i32 + (table.fill $$t (ref.null extern) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_fill.wast:92 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-value-empty-vs + (table.fill $$t (i32.const 1) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_fill.wast:101 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-length-empty-vs-i32 + (table.fill $$t (i32.const 1) (ref.null extern)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_fill.wast:110 +assert_invalid( + () => instantiate(`(module + (table $$t 0 externref) + (func $$type-index-f32-vs-i32 + (table.fill $$t (f32.const 1) (ref.null extern) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_fill.wast:119 +assert_invalid( + () => instantiate(`(module + (table $$t 0 funcref) + (func $$type-value-vs-funcref (param $$r externref) + (table.fill $$t (i32.const 1) (local.get $$r) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_fill.wast:128 +assert_invalid( + () => instantiate(`(module + (table $$t 0 externref) + (func $$type-length-f32-vs-i32 + (table.fill $$t (i32.const 1) (ref.null extern) (f32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_fill.wast:138 +assert_invalid( + () => instantiate(`(module + (table $$t1 1 externref) + (table $$t2 1 funcref) + (func $$type-value-externref-vs-funcref-multi (param $$r externref) + (table.fill $$t2 (i32.const 0) (local.get $$r) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_fill.wast:149 +assert_invalid( + () => instantiate(`(module + (table $$t 1 externref) + (func $$type-result-empty-vs-num (result i32) + (table.fill $$t (i32.const 0) (ref.null extern) (i32.const 1)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/table_get.wast.js b/js/src/jit-test/tests/wasm/spec/spec/table_get.wast.js new file mode 100644 index 0000000000..d744cf692f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/table_get.wast.js @@ -0,0 +1,126 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/table_get.wast + +// ./test/core/table_get.wast:1 +let $0 = instantiate(`(module + (table $$t2 2 externref) + (table $$t3 3 funcref) + (elem (table $$t3) (i32.const 1) func $$dummy) + (func $$dummy) + + (func (export "init") (param $$r externref) + (table.set $$t2 (i32.const 1) (local.get $$r)) + (table.set $$t3 (i32.const 2) (table.get $$t3 (i32.const 1))) + ) + + (func (export "get-externref") (param $$i i32) (result externref) + (table.get (local.get $$i)) + ) + (func $$f3 (export "get-funcref") (param $$i i32) (result funcref) + (table.get $$t3 (local.get $$i)) + ) + + (func (export "is_null-funcref") (param $$i i32) (result i32) + (ref.is_null (call $$f3 (local.get $$i))) + ) +)`); + +// ./test/core/table_get.wast:24 +invoke($0, `init`, [externref(1)]); + +// ./test/core/table_get.wast:26 +assert_return(() => invoke($0, `get-externref`, [0]), [value('externref', null)]); + +// ./test/core/table_get.wast:27 +assert_return(() => invoke($0, `get-externref`, [1]), [new ExternRefResult(1)]); + +// ./test/core/table_get.wast:29 +assert_return(() => invoke($0, `get-funcref`, [0]), [value('anyfunc', null)]); + +// ./test/core/table_get.wast:30 +assert_return(() => invoke($0, `is_null-funcref`, [1]), [value("i32", 0)]); + +// ./test/core/table_get.wast:31 +assert_return(() => invoke($0, `is_null-funcref`, [2]), [value("i32", 0)]); + +// ./test/core/table_get.wast:33 +assert_trap(() => invoke($0, `get-externref`, [2]), `out of bounds table access`); + +// ./test/core/table_get.wast:34 +assert_trap(() => invoke($0, `get-funcref`, [3]), `out of bounds table access`); + +// ./test/core/table_get.wast:35 +assert_trap(() => invoke($0, `get-externref`, [-1]), `out of bounds table access`); + +// ./test/core/table_get.wast:36 +assert_trap(() => invoke($0, `get-funcref`, [-1]), `out of bounds table access`); + +// ./test/core/table_get.wast:41 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-index-empty-vs-i32 (result externref) + (table.get $$t) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_get.wast:50 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-index-f32-vs-i32 (result externref) + (table.get $$t (f32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_get.wast:60 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-result-externref-vs-empty + (table.get $$t (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_get.wast:69 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-result-externref-vs-funcref (result funcref) + (table.get $$t (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_get.wast:79 +assert_invalid( + () => instantiate(`(module + (table $$t1 1 funcref) + (table $$t2 1 externref) + (func $$type-result-externref-vs-funcref-multi (result funcref) + (table.get $$t2 (i32.const 0)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/table_grow.wast.js b/js/src/jit-test/tests/wasm/spec/spec/table_grow.wast.js new file mode 100644 index 0000000000..f5bea52154 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/table_grow.wast.js @@ -0,0 +1,271 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/table_grow.wast + +// ./test/core/table_grow.wast:1 +let $0 = instantiate(`(module + (table $$t 0 externref) + + (func (export "get") (param $$i i32) (result externref) (table.get $$t (local.get $$i))) + (func (export "set") (param $$i i32) (param $$r externref) (table.set $$t (local.get $$i) (local.get $$r))) + + (func (export "grow") (param $$sz i32) (param $$init externref) (result i32) + (table.grow $$t (local.get $$init) (local.get $$sz)) + ) + (func (export "grow-abbrev") (param $$sz i32) (param $$init externref) (result i32) + (table.grow (local.get $$init) (local.get $$sz)) + ) + (func (export "size") (result i32) (table.size $$t)) +)`); + +// ./test/core/table_grow.wast:16 +assert_return(() => invoke($0, `size`, []), [value("i32", 0)]); + +// ./test/core/table_grow.wast:17 +assert_trap(() => invoke($0, `set`, [0, externref(2)]), `out of bounds table access`); + +// ./test/core/table_grow.wast:18 +assert_trap(() => invoke($0, `get`, [0]), `out of bounds table access`); + +// ./test/core/table_grow.wast:20 +assert_return(() => invoke($0, `grow`, [1, null]), [value("i32", 0)]); + +// ./test/core/table_grow.wast:21 +assert_return(() => invoke($0, `size`, []), [value("i32", 1)]); + +// ./test/core/table_grow.wast:22 +assert_return(() => invoke($0, `get`, [0]), [value('externref', null)]); + +// ./test/core/table_grow.wast:23 +assert_return(() => invoke($0, `set`, [0, externref(2)]), []); + +// ./test/core/table_grow.wast:24 +assert_return(() => invoke($0, `get`, [0]), [new ExternRefResult(2)]); + +// ./test/core/table_grow.wast:25 +assert_trap(() => invoke($0, `set`, [1, externref(2)]), `out of bounds table access`); + +// ./test/core/table_grow.wast:26 +assert_trap(() => invoke($0, `get`, [1]), `out of bounds table access`); + +// ./test/core/table_grow.wast:28 +assert_return(() => invoke($0, `grow-abbrev`, [4, externref(3)]), [value("i32", 1)]); + +// ./test/core/table_grow.wast:29 +assert_return(() => invoke($0, `size`, []), [value("i32", 5)]); + +// ./test/core/table_grow.wast:30 +assert_return(() => invoke($0, `get`, [0]), [new ExternRefResult(2)]); + +// ./test/core/table_grow.wast:31 +assert_return(() => invoke($0, `set`, [0, externref(2)]), []); + +// ./test/core/table_grow.wast:32 +assert_return(() => invoke($0, `get`, [0]), [new ExternRefResult(2)]); + +// ./test/core/table_grow.wast:33 +assert_return(() => invoke($0, `get`, [1]), [new ExternRefResult(3)]); + +// ./test/core/table_grow.wast:34 +assert_return(() => invoke($0, `get`, [4]), [new ExternRefResult(3)]); + +// ./test/core/table_grow.wast:35 +assert_return(() => invoke($0, `set`, [4, externref(4)]), []); + +// ./test/core/table_grow.wast:36 +assert_return(() => invoke($0, `get`, [4]), [new ExternRefResult(4)]); + +// ./test/core/table_grow.wast:37 +assert_trap(() => invoke($0, `set`, [5, externref(2)]), `out of bounds table access`); + +// ./test/core/table_grow.wast:38 +assert_trap(() => invoke($0, `get`, [5]), `out of bounds table access`); + +// ./test/core/table_grow.wast:42 +let $1 = instantiate(`(module + (table $$t 0x10 funcref) + (elem declare func $$f) + (func $$f (export "grow") (result i32) + (table.grow $$t (ref.func $$f) (i32.const 0xffff_fff0)) + ) +)`); + +// ./test/core/table_grow.wast:50 +assert_return(() => invoke($1, `grow`, []), [value("i32", -1)]); + +// ./test/core/table_grow.wast:53 +let $2 = instantiate(`(module + (table $$t 0 externref) + (func (export "grow") (param i32) (result i32) + (table.grow $$t (ref.null extern) (local.get 0)) + ) +)`); + +// ./test/core/table_grow.wast:60 +assert_return(() => invoke($2, `grow`, [0]), [value("i32", 0)]); + +// ./test/core/table_grow.wast:61 +assert_return(() => invoke($2, `grow`, [1]), [value("i32", 0)]); + +// ./test/core/table_grow.wast:62 +assert_return(() => invoke($2, `grow`, [0]), [value("i32", 1)]); + +// ./test/core/table_grow.wast:63 +assert_return(() => invoke($2, `grow`, [2]), [value("i32", 1)]); + +// ./test/core/table_grow.wast:64 +assert_return(() => invoke($2, `grow`, [800]), [value("i32", 3)]); + +// ./test/core/table_grow.wast:67 +let $3 = instantiate(`(module + (table $$t 0 10 externref) + (func (export "grow") (param i32) (result i32) + (table.grow $$t (ref.null extern) (local.get 0)) + ) +)`); + +// ./test/core/table_grow.wast:74 +assert_return(() => invoke($3, `grow`, [0]), [value("i32", 0)]); + +// ./test/core/table_grow.wast:75 +assert_return(() => invoke($3, `grow`, [1]), [value("i32", 0)]); + +// ./test/core/table_grow.wast:76 +assert_return(() => invoke($3, `grow`, [1]), [value("i32", 1)]); + +// ./test/core/table_grow.wast:77 +assert_return(() => invoke($3, `grow`, [2]), [value("i32", 2)]); + +// ./test/core/table_grow.wast:78 +assert_return(() => invoke($3, `grow`, [6]), [value("i32", 4)]); + +// ./test/core/table_grow.wast:79 +assert_return(() => invoke($3, `grow`, [0]), [value("i32", 10)]); + +// ./test/core/table_grow.wast:80 +assert_return(() => invoke($3, `grow`, [1]), [value("i32", -1)]); + +// ./test/core/table_grow.wast:81 +assert_return(() => invoke($3, `grow`, [65536]), [value("i32", -1)]); + +// ./test/core/table_grow.wast:84 +let $4 = instantiate(`(module + (table $$t 10 funcref) + (func (export "grow") (param i32) (result i32) + (table.grow $$t (ref.null func) (local.get 0)) + ) + (elem declare func 1) + (func (export "check-table-null") (param i32 i32) (result funcref) + (local funcref) + (local.set 2 (ref.func 1)) + (block + (loop + (local.set 2 (table.get $$t (local.get 0))) + (br_if 1 (i32.eqz (ref.is_null (local.get 2)))) + (br_if 1 (i32.ge_u (local.get 0) (local.get 1))) + (local.set 0 (i32.add (local.get 0) (i32.const 1))) + (br_if 0 (i32.le_u (local.get 0) (local.get 1))) + ) + ) + (local.get 2) + ) +)`); + +// ./test/core/table_grow.wast:106 +assert_return(() => invoke($4, `check-table-null`, [0, 9]), [value('anyfunc', null)]); + +// ./test/core/table_grow.wast:107 +assert_return(() => invoke($4, `grow`, [10]), [value("i32", 10)]); + +// ./test/core/table_grow.wast:108 +assert_return(() => invoke($4, `check-table-null`, [0, 19]), [value('anyfunc', null)]); + +// ./test/core/table_grow.wast:113 +assert_invalid( + () => instantiate(`(module + (table $$t 0 externref) + (func $$type-init-size-empty-vs-i32-externref (result i32) + (table.grow $$t) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_grow.wast:122 +assert_invalid( + () => instantiate(`(module + (table $$t 0 externref) + (func $$type-size-empty-vs-i32 (result i32) + (table.grow $$t (ref.null extern)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_grow.wast:131 +assert_invalid( + () => instantiate(`(module + (table $$t 0 externref) + (func $$type-init-empty-vs-externref (result i32) + (table.grow $$t (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_grow.wast:140 +assert_invalid( + () => instantiate(`(module + (table $$t 0 externref) + (func $$type-size-f32-vs-i32 (result i32) + (table.grow $$t (ref.null extern) (f32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_grow.wast:149 +assert_invalid( + () => instantiate(`(module + (table $$t 0 funcref) + (func $$type-init-externref-vs-funcref (param $$r externref) (result i32) + (table.grow $$t (local.get $$r) (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_grow.wast:159 +assert_invalid( + () => instantiate(`(module + (table $$t 1 externref) + (func $$type-result-i32-vs-empty + (table.grow $$t (ref.null extern) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_grow.wast:168 +assert_invalid( + () => instantiate(`(module + (table $$t 1 externref) + (func $$type-result-i32-vs-f32 (result f32) + (table.grow $$t (ref.null extern) (i32.const 0)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/table_init.wast.js b/js/src/jit-test/tests/wasm/spec/spec/table_init.wast.js new file mode 100644 index 0000000000..a9457bbb2c --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/table_init.wast.js @@ -0,0 +1,3674 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/table_init.wast + +// ./test/core/table_init.wast:6 +let $0 = instantiate(`(module + (func (export "ef0") (result i32) (i32.const 0)) + (func (export "ef1") (result i32) (i32.const 1)) + (func (export "ef2") (result i32) (i32.const 2)) + (func (export "ef3") (result i32) (i32.const 3)) + (func (export "ef4") (result i32) (i32.const 4)) +)`); + +// ./test/core/table_init.wast:13 +register($0, `a`); + +// ./test/core/table_init.wast:15 +let $1 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.init $$t0 1 (i32.const 7) (i32.const 0) (i32.const 4))) + (func (export "check") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) +)`); + +// ./test/core/table_init.wast:41 +invoke($1, `test`, []); + +// ./test/core/table_init.wast:42 +assert_trap(() => invoke($1, `check`, [0]), `uninitialized element`); + +// ./test/core/table_init.wast:43 +assert_trap(() => invoke($1, `check`, [1]), `uninitialized element`); + +// ./test/core/table_init.wast:44 +assert_return(() => invoke($1, `check`, [2]), [value("i32", 3)]); + +// ./test/core/table_init.wast:45 +assert_return(() => invoke($1, `check`, [3]), [value("i32", 1)]); + +// ./test/core/table_init.wast:46 +assert_return(() => invoke($1, `check`, [4]), [value("i32", 4)]); + +// ./test/core/table_init.wast:47 +assert_return(() => invoke($1, `check`, [5]), [value("i32", 1)]); + +// ./test/core/table_init.wast:48 +assert_trap(() => invoke($1, `check`, [6]), `uninitialized element`); + +// ./test/core/table_init.wast:49 +assert_return(() => invoke($1, `check`, [7]), [value("i32", 2)]); + +// ./test/core/table_init.wast:50 +assert_return(() => invoke($1, `check`, [8]), [value("i32", 7)]); + +// ./test/core/table_init.wast:51 +assert_return(() => invoke($1, `check`, [9]), [value("i32", 1)]); + +// ./test/core/table_init.wast:52 +assert_return(() => invoke($1, `check`, [10]), [value("i32", 8)]); + +// ./test/core/table_init.wast:53 +assert_trap(() => invoke($1, `check`, [11]), `uninitialized element`); + +// ./test/core/table_init.wast:54 +assert_return(() => invoke($1, `check`, [12]), [value("i32", 7)]); + +// ./test/core/table_init.wast:55 +assert_return(() => invoke($1, `check`, [13]), [value("i32", 5)]); + +// ./test/core/table_init.wast:56 +assert_return(() => invoke($1, `check`, [14]), [value("i32", 2)]); + +// ./test/core/table_init.wast:57 +assert_return(() => invoke($1, `check`, [15]), [value("i32", 3)]); + +// ./test/core/table_init.wast:58 +assert_return(() => invoke($1, `check`, [16]), [value("i32", 6)]); + +// ./test/core/table_init.wast:59 +assert_trap(() => invoke($1, `check`, [17]), `uninitialized element`); + +// ./test/core/table_init.wast:60 +assert_trap(() => invoke($1, `check`, [18]), `uninitialized element`); + +// ./test/core/table_init.wast:61 +assert_trap(() => invoke($1, `check`, [19]), `uninitialized element`); + +// ./test/core/table_init.wast:62 +assert_trap(() => invoke($1, `check`, [20]), `uninitialized element`); + +// ./test/core/table_init.wast:63 +assert_trap(() => invoke($1, `check`, [21]), `uninitialized element`); + +// ./test/core/table_init.wast:64 +assert_trap(() => invoke($1, `check`, [22]), `uninitialized element`); + +// ./test/core/table_init.wast:65 +assert_trap(() => invoke($1, `check`, [23]), `uninitialized element`); + +// ./test/core/table_init.wast:66 +assert_trap(() => invoke($1, `check`, [24]), `uninitialized element`); + +// ./test/core/table_init.wast:67 +assert_trap(() => invoke($1, `check`, [25]), `uninitialized element`); + +// ./test/core/table_init.wast:68 +assert_trap(() => invoke($1, `check`, [26]), `uninitialized element`); + +// ./test/core/table_init.wast:69 +assert_trap(() => invoke($1, `check`, [27]), `uninitialized element`); + +// ./test/core/table_init.wast:70 +assert_trap(() => invoke($1, `check`, [28]), `uninitialized element`); + +// ./test/core/table_init.wast:71 +assert_trap(() => invoke($1, `check`, [29]), `uninitialized element`); + +// ./test/core/table_init.wast:73 +let $2 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.init $$t0 3 (i32.const 15) (i32.const 1) (i32.const 3))) + (func (export "check") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) +)`); + +// ./test/core/table_init.wast:99 +invoke($2, `test`, []); + +// ./test/core/table_init.wast:100 +assert_trap(() => invoke($2, `check`, [0]), `uninitialized element`); + +// ./test/core/table_init.wast:101 +assert_trap(() => invoke($2, `check`, [1]), `uninitialized element`); + +// ./test/core/table_init.wast:102 +assert_return(() => invoke($2, `check`, [2]), [value("i32", 3)]); + +// ./test/core/table_init.wast:103 +assert_return(() => invoke($2, `check`, [3]), [value("i32", 1)]); + +// ./test/core/table_init.wast:104 +assert_return(() => invoke($2, `check`, [4]), [value("i32", 4)]); + +// ./test/core/table_init.wast:105 +assert_return(() => invoke($2, `check`, [5]), [value("i32", 1)]); + +// ./test/core/table_init.wast:106 +assert_trap(() => invoke($2, `check`, [6]), `uninitialized element`); + +// ./test/core/table_init.wast:107 +assert_trap(() => invoke($2, `check`, [7]), `uninitialized element`); + +// ./test/core/table_init.wast:108 +assert_trap(() => invoke($2, `check`, [8]), `uninitialized element`); + +// ./test/core/table_init.wast:109 +assert_trap(() => invoke($2, `check`, [9]), `uninitialized element`); + +// ./test/core/table_init.wast:110 +assert_trap(() => invoke($2, `check`, [10]), `uninitialized element`); + +// ./test/core/table_init.wast:111 +assert_trap(() => invoke($2, `check`, [11]), `uninitialized element`); + +// ./test/core/table_init.wast:112 +assert_return(() => invoke($2, `check`, [12]), [value("i32", 7)]); + +// ./test/core/table_init.wast:113 +assert_return(() => invoke($2, `check`, [13]), [value("i32", 5)]); + +// ./test/core/table_init.wast:114 +assert_return(() => invoke($2, `check`, [14]), [value("i32", 2)]); + +// ./test/core/table_init.wast:115 +assert_return(() => invoke($2, `check`, [15]), [value("i32", 9)]); + +// ./test/core/table_init.wast:116 +assert_return(() => invoke($2, `check`, [16]), [value("i32", 2)]); + +// ./test/core/table_init.wast:117 +assert_return(() => invoke($2, `check`, [17]), [value("i32", 7)]); + +// ./test/core/table_init.wast:118 +assert_trap(() => invoke($2, `check`, [18]), `uninitialized element`); + +// ./test/core/table_init.wast:119 +assert_trap(() => invoke($2, `check`, [19]), `uninitialized element`); + +// ./test/core/table_init.wast:120 +assert_trap(() => invoke($2, `check`, [20]), `uninitialized element`); + +// ./test/core/table_init.wast:121 +assert_trap(() => invoke($2, `check`, [21]), `uninitialized element`); + +// ./test/core/table_init.wast:122 +assert_trap(() => invoke($2, `check`, [22]), `uninitialized element`); + +// ./test/core/table_init.wast:123 +assert_trap(() => invoke($2, `check`, [23]), `uninitialized element`); + +// ./test/core/table_init.wast:124 +assert_trap(() => invoke($2, `check`, [24]), `uninitialized element`); + +// ./test/core/table_init.wast:125 +assert_trap(() => invoke($2, `check`, [25]), `uninitialized element`); + +// ./test/core/table_init.wast:126 +assert_trap(() => invoke($2, `check`, [26]), `uninitialized element`); + +// ./test/core/table_init.wast:127 +assert_trap(() => invoke($2, `check`, [27]), `uninitialized element`); + +// ./test/core/table_init.wast:128 +assert_trap(() => invoke($2, `check`, [28]), `uninitialized element`); + +// ./test/core/table_init.wast:129 +assert_trap(() => invoke($2, `check`, [29]), `uninitialized element`); + +// ./test/core/table_init.wast:131 +let $3 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.init $$t0 1 (i32.const 7) (i32.const 0) (i32.const 4)) + (elem.drop 1) + (table.init $$t0 3 (i32.const 15) (i32.const 1) (i32.const 3)) + (elem.drop 3) + (table.copy $$t0 0 (i32.const 20) (i32.const 15) (i32.const 5)) + (table.copy $$t0 0 (i32.const 21) (i32.const 29) (i32.const 1)) + (table.copy $$t0 0 (i32.const 24) (i32.const 10) (i32.const 1)) + (table.copy $$t0 0 (i32.const 13) (i32.const 11) (i32.const 4)) + (table.copy $$t0 0 (i32.const 19) (i32.const 20) (i32.const 5))) + (func (export "check") (param i32) (result i32) + (call_indirect $$t0 (type 0) (local.get 0))) +)`); + +// ./test/core/table_init.wast:165 +invoke($3, `test`, []); + +// ./test/core/table_init.wast:166 +assert_trap(() => invoke($3, `check`, [0]), `uninitialized element`); + +// ./test/core/table_init.wast:167 +assert_trap(() => invoke($3, `check`, [1]), `uninitialized element`); + +// ./test/core/table_init.wast:168 +assert_return(() => invoke($3, `check`, [2]), [value("i32", 3)]); + +// ./test/core/table_init.wast:169 +assert_return(() => invoke($3, `check`, [3]), [value("i32", 1)]); + +// ./test/core/table_init.wast:170 +assert_return(() => invoke($3, `check`, [4]), [value("i32", 4)]); + +// ./test/core/table_init.wast:171 +assert_return(() => invoke($3, `check`, [5]), [value("i32", 1)]); + +// ./test/core/table_init.wast:172 +assert_trap(() => invoke($3, `check`, [6]), `uninitialized element`); + +// ./test/core/table_init.wast:173 +assert_return(() => invoke($3, `check`, [7]), [value("i32", 2)]); + +// ./test/core/table_init.wast:174 +assert_return(() => invoke($3, `check`, [8]), [value("i32", 7)]); + +// ./test/core/table_init.wast:175 +assert_return(() => invoke($3, `check`, [9]), [value("i32", 1)]); + +// ./test/core/table_init.wast:176 +assert_return(() => invoke($3, `check`, [10]), [value("i32", 8)]); + +// ./test/core/table_init.wast:177 +assert_trap(() => invoke($3, `check`, [11]), `uninitialized element`); + +// ./test/core/table_init.wast:178 +assert_return(() => invoke($3, `check`, [12]), [value("i32", 7)]); + +// ./test/core/table_init.wast:179 +assert_trap(() => invoke($3, `check`, [13]), `uninitialized element`); + +// ./test/core/table_init.wast:180 +assert_return(() => invoke($3, `check`, [14]), [value("i32", 7)]); + +// ./test/core/table_init.wast:181 +assert_return(() => invoke($3, `check`, [15]), [value("i32", 5)]); + +// ./test/core/table_init.wast:182 +assert_return(() => invoke($3, `check`, [16]), [value("i32", 2)]); + +// ./test/core/table_init.wast:183 +assert_return(() => invoke($3, `check`, [17]), [value("i32", 7)]); + +// ./test/core/table_init.wast:184 +assert_trap(() => invoke($3, `check`, [18]), `uninitialized element`); + +// ./test/core/table_init.wast:185 +assert_return(() => invoke($3, `check`, [19]), [value("i32", 9)]); + +// ./test/core/table_init.wast:186 +assert_trap(() => invoke($3, `check`, [20]), `uninitialized element`); + +// ./test/core/table_init.wast:187 +assert_return(() => invoke($3, `check`, [21]), [value("i32", 7)]); + +// ./test/core/table_init.wast:188 +assert_trap(() => invoke($3, `check`, [22]), `uninitialized element`); + +// ./test/core/table_init.wast:189 +assert_return(() => invoke($3, `check`, [23]), [value("i32", 8)]); + +// ./test/core/table_init.wast:190 +assert_return(() => invoke($3, `check`, [24]), [value("i32", 8)]); + +// ./test/core/table_init.wast:191 +assert_trap(() => invoke($3, `check`, [25]), `uninitialized element`); + +// ./test/core/table_init.wast:192 +assert_trap(() => invoke($3, `check`, [26]), `uninitialized element`); + +// ./test/core/table_init.wast:193 +assert_trap(() => invoke($3, `check`, [27]), `uninitialized element`); + +// ./test/core/table_init.wast:194 +assert_trap(() => invoke($3, `check`, [28]), `uninitialized element`); + +// ./test/core/table_init.wast:195 +assert_trap(() => invoke($3, `check`, [29]), `uninitialized element`); + +// ./test/core/table_init.wast:197 +let $4 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.init $$t1 1 (i32.const 7) (i32.const 0) (i32.const 4))) + (func (export "check") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) +)`); + +// ./test/core/table_init.wast:223 +invoke($4, `test`, []); + +// ./test/core/table_init.wast:224 +assert_trap(() => invoke($4, `check`, [0]), `uninitialized element`); + +// ./test/core/table_init.wast:225 +assert_trap(() => invoke($4, `check`, [1]), `uninitialized element`); + +// ./test/core/table_init.wast:226 +assert_return(() => invoke($4, `check`, [2]), [value("i32", 3)]); + +// ./test/core/table_init.wast:227 +assert_return(() => invoke($4, `check`, [3]), [value("i32", 1)]); + +// ./test/core/table_init.wast:228 +assert_return(() => invoke($4, `check`, [4]), [value("i32", 4)]); + +// ./test/core/table_init.wast:229 +assert_return(() => invoke($4, `check`, [5]), [value("i32", 1)]); + +// ./test/core/table_init.wast:230 +assert_trap(() => invoke($4, `check`, [6]), `uninitialized element`); + +// ./test/core/table_init.wast:231 +assert_return(() => invoke($4, `check`, [7]), [value("i32", 2)]); + +// ./test/core/table_init.wast:232 +assert_return(() => invoke($4, `check`, [8]), [value("i32", 7)]); + +// ./test/core/table_init.wast:233 +assert_return(() => invoke($4, `check`, [9]), [value("i32", 1)]); + +// ./test/core/table_init.wast:234 +assert_return(() => invoke($4, `check`, [10]), [value("i32", 8)]); + +// ./test/core/table_init.wast:235 +assert_trap(() => invoke($4, `check`, [11]), `uninitialized element`); + +// ./test/core/table_init.wast:236 +assert_return(() => invoke($4, `check`, [12]), [value("i32", 7)]); + +// ./test/core/table_init.wast:237 +assert_return(() => invoke($4, `check`, [13]), [value("i32", 5)]); + +// ./test/core/table_init.wast:238 +assert_return(() => invoke($4, `check`, [14]), [value("i32", 2)]); + +// ./test/core/table_init.wast:239 +assert_return(() => invoke($4, `check`, [15]), [value("i32", 3)]); + +// ./test/core/table_init.wast:240 +assert_return(() => invoke($4, `check`, [16]), [value("i32", 6)]); + +// ./test/core/table_init.wast:241 +assert_trap(() => invoke($4, `check`, [17]), `uninitialized element`); + +// ./test/core/table_init.wast:242 +assert_trap(() => invoke($4, `check`, [18]), `uninitialized element`); + +// ./test/core/table_init.wast:243 +assert_trap(() => invoke($4, `check`, [19]), `uninitialized element`); + +// ./test/core/table_init.wast:244 +assert_trap(() => invoke($4, `check`, [20]), `uninitialized element`); + +// ./test/core/table_init.wast:245 +assert_trap(() => invoke($4, `check`, [21]), `uninitialized element`); + +// ./test/core/table_init.wast:246 +assert_trap(() => invoke($4, `check`, [22]), `uninitialized element`); + +// ./test/core/table_init.wast:247 +assert_trap(() => invoke($4, `check`, [23]), `uninitialized element`); + +// ./test/core/table_init.wast:248 +assert_trap(() => invoke($4, `check`, [24]), `uninitialized element`); + +// ./test/core/table_init.wast:249 +assert_trap(() => invoke($4, `check`, [25]), `uninitialized element`); + +// ./test/core/table_init.wast:250 +assert_trap(() => invoke($4, `check`, [26]), `uninitialized element`); + +// ./test/core/table_init.wast:251 +assert_trap(() => invoke($4, `check`, [27]), `uninitialized element`); + +// ./test/core/table_init.wast:252 +assert_trap(() => invoke($4, `check`, [28]), `uninitialized element`); + +// ./test/core/table_init.wast:253 +assert_trap(() => invoke($4, `check`, [29]), `uninitialized element`); + +// ./test/core/table_init.wast:255 +let $5 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.init $$t1 3 (i32.const 15) (i32.const 1) (i32.const 3))) + (func (export "check") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) +)`); + +// ./test/core/table_init.wast:281 +invoke($5, `test`, []); + +// ./test/core/table_init.wast:282 +assert_trap(() => invoke($5, `check`, [0]), `uninitialized element`); + +// ./test/core/table_init.wast:283 +assert_trap(() => invoke($5, `check`, [1]), `uninitialized element`); + +// ./test/core/table_init.wast:284 +assert_return(() => invoke($5, `check`, [2]), [value("i32", 3)]); + +// ./test/core/table_init.wast:285 +assert_return(() => invoke($5, `check`, [3]), [value("i32", 1)]); + +// ./test/core/table_init.wast:286 +assert_return(() => invoke($5, `check`, [4]), [value("i32", 4)]); + +// ./test/core/table_init.wast:287 +assert_return(() => invoke($5, `check`, [5]), [value("i32", 1)]); + +// ./test/core/table_init.wast:288 +assert_trap(() => invoke($5, `check`, [6]), `uninitialized element`); + +// ./test/core/table_init.wast:289 +assert_trap(() => invoke($5, `check`, [7]), `uninitialized element`); + +// ./test/core/table_init.wast:290 +assert_trap(() => invoke($5, `check`, [8]), `uninitialized element`); + +// ./test/core/table_init.wast:291 +assert_trap(() => invoke($5, `check`, [9]), `uninitialized element`); + +// ./test/core/table_init.wast:292 +assert_trap(() => invoke($5, `check`, [10]), `uninitialized element`); + +// ./test/core/table_init.wast:293 +assert_trap(() => invoke($5, `check`, [11]), `uninitialized element`); + +// ./test/core/table_init.wast:294 +assert_return(() => invoke($5, `check`, [12]), [value("i32", 7)]); + +// ./test/core/table_init.wast:295 +assert_return(() => invoke($5, `check`, [13]), [value("i32", 5)]); + +// ./test/core/table_init.wast:296 +assert_return(() => invoke($5, `check`, [14]), [value("i32", 2)]); + +// ./test/core/table_init.wast:297 +assert_return(() => invoke($5, `check`, [15]), [value("i32", 9)]); + +// ./test/core/table_init.wast:298 +assert_return(() => invoke($5, `check`, [16]), [value("i32", 2)]); + +// ./test/core/table_init.wast:299 +assert_return(() => invoke($5, `check`, [17]), [value("i32", 7)]); + +// ./test/core/table_init.wast:300 +assert_trap(() => invoke($5, `check`, [18]), `uninitialized element`); + +// ./test/core/table_init.wast:301 +assert_trap(() => invoke($5, `check`, [19]), `uninitialized element`); + +// ./test/core/table_init.wast:302 +assert_trap(() => invoke($5, `check`, [20]), `uninitialized element`); + +// ./test/core/table_init.wast:303 +assert_trap(() => invoke($5, `check`, [21]), `uninitialized element`); + +// ./test/core/table_init.wast:304 +assert_trap(() => invoke($5, `check`, [22]), `uninitialized element`); + +// ./test/core/table_init.wast:305 +assert_trap(() => invoke($5, `check`, [23]), `uninitialized element`); + +// ./test/core/table_init.wast:306 +assert_trap(() => invoke($5, `check`, [24]), `uninitialized element`); + +// ./test/core/table_init.wast:307 +assert_trap(() => invoke($5, `check`, [25]), `uninitialized element`); + +// ./test/core/table_init.wast:308 +assert_trap(() => invoke($5, `check`, [26]), `uninitialized element`); + +// ./test/core/table_init.wast:309 +assert_trap(() => invoke($5, `check`, [27]), `uninitialized element`); + +// ./test/core/table_init.wast:310 +assert_trap(() => invoke($5, `check`, [28]), `uninitialized element`); + +// ./test/core/table_init.wast:311 +assert_trap(() => invoke($5, `check`, [29]), `uninitialized element`); + +// ./test/core/table_init.wast:313 +let $6 = instantiate(`(module + (type (func (result i32))) ;; type #0 + (import "a" "ef0" (func (result i32))) ;; index 0 + (import "a" "ef1" (func (result i32))) + (import "a" "ef2" (func (result i32))) + (import "a" "ef3" (func (result i32))) + (import "a" "ef4" (func (result i32))) ;; index 4 + (table $$t0 30 30 funcref) + (table $$t1 30 30 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 5)) ;; index 5 + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) ;; index 9 + (func (export "test") + (table.init $$t1 1 (i32.const 7) (i32.const 0) (i32.const 4)) + (elem.drop 1) + (table.init $$t1 3 (i32.const 15) (i32.const 1) (i32.const 3)) + (elem.drop 3) + (table.copy $$t1 1 (i32.const 20) (i32.const 15) (i32.const 5)) + (table.copy $$t1 1 (i32.const 21) (i32.const 29) (i32.const 1)) + (table.copy $$t1 1 (i32.const 24) (i32.const 10) (i32.const 1)) + (table.copy $$t1 1 (i32.const 13) (i32.const 11) (i32.const 4)) + (table.copy $$t1 1 (i32.const 19) (i32.const 20) (i32.const 5))) + (func (export "check") (param i32) (result i32) + (call_indirect $$t1 (type 0) (local.get 0))) +)`); + +// ./test/core/table_init.wast:347 +invoke($6, `test`, []); + +// ./test/core/table_init.wast:348 +assert_trap(() => invoke($6, `check`, [0]), `uninitialized element`); + +// ./test/core/table_init.wast:349 +assert_trap(() => invoke($6, `check`, [1]), `uninitialized element`); + +// ./test/core/table_init.wast:350 +assert_return(() => invoke($6, `check`, [2]), [value("i32", 3)]); + +// ./test/core/table_init.wast:351 +assert_return(() => invoke($6, `check`, [3]), [value("i32", 1)]); + +// ./test/core/table_init.wast:352 +assert_return(() => invoke($6, `check`, [4]), [value("i32", 4)]); + +// ./test/core/table_init.wast:353 +assert_return(() => invoke($6, `check`, [5]), [value("i32", 1)]); + +// ./test/core/table_init.wast:354 +assert_trap(() => invoke($6, `check`, [6]), `uninitialized element`); + +// ./test/core/table_init.wast:355 +assert_return(() => invoke($6, `check`, [7]), [value("i32", 2)]); + +// ./test/core/table_init.wast:356 +assert_return(() => invoke($6, `check`, [8]), [value("i32", 7)]); + +// ./test/core/table_init.wast:357 +assert_return(() => invoke($6, `check`, [9]), [value("i32", 1)]); + +// ./test/core/table_init.wast:358 +assert_return(() => invoke($6, `check`, [10]), [value("i32", 8)]); + +// ./test/core/table_init.wast:359 +assert_trap(() => invoke($6, `check`, [11]), `uninitialized element`); + +// ./test/core/table_init.wast:360 +assert_return(() => invoke($6, `check`, [12]), [value("i32", 7)]); + +// ./test/core/table_init.wast:361 +assert_trap(() => invoke($6, `check`, [13]), `uninitialized element`); + +// ./test/core/table_init.wast:362 +assert_return(() => invoke($6, `check`, [14]), [value("i32", 7)]); + +// ./test/core/table_init.wast:363 +assert_return(() => invoke($6, `check`, [15]), [value("i32", 5)]); + +// ./test/core/table_init.wast:364 +assert_return(() => invoke($6, `check`, [16]), [value("i32", 2)]); + +// ./test/core/table_init.wast:365 +assert_return(() => invoke($6, `check`, [17]), [value("i32", 7)]); + +// ./test/core/table_init.wast:366 +assert_trap(() => invoke($6, `check`, [18]), `uninitialized element`); + +// ./test/core/table_init.wast:367 +assert_return(() => invoke($6, `check`, [19]), [value("i32", 9)]); + +// ./test/core/table_init.wast:368 +assert_trap(() => invoke($6, `check`, [20]), `uninitialized element`); + +// ./test/core/table_init.wast:369 +assert_return(() => invoke($6, `check`, [21]), [value("i32", 7)]); + +// ./test/core/table_init.wast:370 +assert_trap(() => invoke($6, `check`, [22]), `uninitialized element`); + +// ./test/core/table_init.wast:371 +assert_return(() => invoke($6, `check`, [23]), [value("i32", 8)]); + +// ./test/core/table_init.wast:372 +assert_return(() => invoke($6, `check`, [24]), [value("i32", 8)]); + +// ./test/core/table_init.wast:373 +assert_trap(() => invoke($6, `check`, [25]), `uninitialized element`); + +// ./test/core/table_init.wast:374 +assert_trap(() => invoke($6, `check`, [26]), `uninitialized element`); + +// ./test/core/table_init.wast:375 +assert_trap(() => invoke($6, `check`, [27]), `uninitialized element`); + +// ./test/core/table_init.wast:376 +assert_trap(() => invoke($6, `check`, [28]), `uninitialized element`); + +// ./test/core/table_init.wast:377 +assert_trap(() => invoke($6, `check`, [29]), `uninitialized element`); + +// ./test/core/table_init.wast:378 +assert_invalid( + () => instantiate(`(module + (func (export "test") + (elem.drop 0)))`), + `unknown elem segment 0`, +); + +// ./test/core/table_init.wast:384 +assert_invalid( + () => instantiate(`(module + (func (export "test") + (table.init 0 (i32.const 12) (i32.const 1) (i32.const 1))))`), + `unknown table 0`, +); + +// ./test/core/table_init.wast:390 +assert_invalid( + () => instantiate(`(module + (elem funcref (ref.func 0)) + (func (result i32) (i32.const 0)) + (func (export "test") + (elem.drop 4)))`), + `unknown elem segment 4`, +); + +// ./test/core/table_init.wast:398 +assert_invalid( + () => instantiate(`(module + (elem funcref (ref.func 0)) + (func (result i32) (i32.const 0)) + (func (export "test") + (table.init 4 (i32.const 12) (i32.const 1) (i32.const 1))))`), + `unknown table 0`, +); + +// ./test/core/table_init.wast:407 +let $7 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (elem.drop 2) + ))`); + +// ./test/core/table_init.wast:429 +invoke($7, `test`, []); + +// ./test/core/table_init.wast:431 +let $8 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init 2 (i32.const 12) (i32.const 1) (i32.const 1)) + ))`); + +// ./test/core/table_init.wast:453 +assert_trap(() => invoke($8, `test`, []), `out of bounds table access`); + +// ./test/core/table_init.wast:455 +let $9 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init 1 (i32.const 12) (i32.const 1) (i32.const 1)) + (table.init 1 (i32.const 21) (i32.const 1) (i32.const 1))))`); + +// ./test/core/table_init.wast:477 +invoke($9, `test`, []); + +// ./test/core/table_init.wast:479 +let $10 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (elem.drop 1) + (elem.drop 1)))`); + +// ./test/core/table_init.wast:501 +invoke($10, `test`, []); + +// ./test/core/table_init.wast:503 +let $11 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (elem.drop 1) + (table.init 1 (i32.const 12) (i32.const 1) (i32.const 1))))`); + +// ./test/core/table_init.wast:525 +assert_trap(() => invoke($11, `test`, []), `out of bounds table access`); + +// ./test/core/table_init.wast:527 +let $12 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init 1 (i32.const 12) (i32.const 0) (i32.const 5)) + ))`); + +// ./test/core/table_init.wast:549 +assert_trap(() => invoke($12, `test`, []), `out of bounds table access`); + +// ./test/core/table_init.wast:551 +let $13 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init 1 (i32.const 12) (i32.const 2) (i32.const 3)) + ))`); + +// ./test/core/table_init.wast:573 +assert_trap(() => invoke($13, `test`, []), `out of bounds table access`); + +// ./test/core/table_init.wast:575 +let $14 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t0 1 (i32.const 28) (i32.const 1) (i32.const 3)) + ))`); + +// ./test/core/table_init.wast:597 +assert_trap(() => invoke($14, `test`, []), `out of bounds table access`); + +// ./test/core/table_init.wast:599 +let $15 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t0 1 (i32.const 12) (i32.const 4) (i32.const 0)) + ))`); + +// ./test/core/table_init.wast:621 +invoke($15, `test`, []); + +// ./test/core/table_init.wast:623 +let $16 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t0 1 (i32.const 12) (i32.const 5) (i32.const 0)) + ))`); + +// ./test/core/table_init.wast:645 +assert_trap(() => invoke($16, `test`, []), `out of bounds table access`); + +// ./test/core/table_init.wast:647 +let $17 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t0 1 (i32.const 30) (i32.const 2) (i32.const 0)) + ))`); + +// ./test/core/table_init.wast:669 +invoke($17, `test`, []); + +// ./test/core/table_init.wast:671 +let $18 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t0 1 (i32.const 31) (i32.const 2) (i32.const 0)) + ))`); + +// ./test/core/table_init.wast:693 +assert_trap(() => invoke($18, `test`, []), `out of bounds table access`); + +// ./test/core/table_init.wast:695 +let $19 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t0 1 (i32.const 30) (i32.const 4) (i32.const 0)) + ))`); + +// ./test/core/table_init.wast:717 +invoke($19, `test`, []); + +// ./test/core/table_init.wast:719 +let $20 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t0) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t0) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t0 1 (i32.const 31) (i32.const 5) (i32.const 0)) + ))`); + +// ./test/core/table_init.wast:741 +assert_trap(() => invoke($20, `test`, []), `out of bounds table access`); + +// ./test/core/table_init.wast:743 +let $21 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t1 1 (i32.const 26) (i32.const 1) (i32.const 3)) + ))`); + +// ./test/core/table_init.wast:765 +assert_trap(() => invoke($21, `test`, []), `out of bounds table access`); + +// ./test/core/table_init.wast:767 +let $22 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t1 1 (i32.const 12) (i32.const 4) (i32.const 0)) + ))`); + +// ./test/core/table_init.wast:789 +invoke($22, `test`, []); + +// ./test/core/table_init.wast:791 +let $23 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t1 1 (i32.const 12) (i32.const 5) (i32.const 0)) + ))`); + +// ./test/core/table_init.wast:813 +assert_trap(() => invoke($23, `test`, []), `out of bounds table access`); + +// ./test/core/table_init.wast:815 +let $24 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t1 1 (i32.const 28) (i32.const 2) (i32.const 0)) + ))`); + +// ./test/core/table_init.wast:837 +invoke($24, `test`, []); + +// ./test/core/table_init.wast:839 +let $25 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t1 1 (i32.const 29) (i32.const 2) (i32.const 0)) + ))`); + +// ./test/core/table_init.wast:861 +assert_trap(() => invoke($25, `test`, []), `out of bounds table access`); + +// ./test/core/table_init.wast:863 +let $26 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t1 1 (i32.const 28) (i32.const 4) (i32.const 0)) + ))`); + +// ./test/core/table_init.wast:885 +invoke($26, `test`, []); + +// ./test/core/table_init.wast:887 +let $27 = instantiate(`(module + (table $$t0 30 30 funcref) + (table $$t1 28 28 funcref) + (elem (table $$t1) (i32.const 2) func 3 1 4 1) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) + (elem (table $$t1) (i32.const 12) func 7 5 2 3 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) + (func (result i32) (i32.const 0)) + (func (result i32) (i32.const 1)) + (func (result i32) (i32.const 2)) + (func (result i32) (i32.const 3)) + (func (result i32) (i32.const 4)) + (func (result i32) (i32.const 5)) + (func (result i32) (i32.const 6)) + (func (result i32) (i32.const 7)) + (func (result i32) (i32.const 8)) + (func (result i32) (i32.const 9)) + (func (export "test") + (table.init $$t1 1 (i32.const 29) (i32.const 5) (i32.const 0)) + ))`); + +// ./test/core/table_init.wast:909 +assert_trap(() => invoke($27, `test`, []), `out of bounds table access`); + +// ./test/core/table_init.wast:911 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (i32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:920 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (i32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:929 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (i32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:938 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (f32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:947 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (f32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:956 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (f32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:965 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (f32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:974 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (i64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:983 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (i64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:992 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (i64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1001 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (i64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1010 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (f64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1019 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (f64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1028 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (f64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1037 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i32.const 1) (f64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1046 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (i32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1055 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (i32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1064 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (i32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1073 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (i32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1082 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (f32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1091 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (f32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1100 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (f32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1109 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (f32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1118 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (i64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1127 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (i64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1136 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (i64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1145 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (i64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1154 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (f64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1163 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (f64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1172 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (f64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1181 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f32.const 1) (f64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1190 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (i32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1199 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (i32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1208 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (i32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1217 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (i32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1226 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (f32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1235 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (f32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1244 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (f32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1253 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (f32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1262 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (i64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1271 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (i64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1280 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (i64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1289 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (i64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1298 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (f64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1307 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (f64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1316 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (f64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1325 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (i64.const 1) (f64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1334 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (i32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1343 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (i32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1352 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (i32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1361 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (i32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1370 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (f32.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1379 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (f32.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1388 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (f32.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1397 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (f32.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1406 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (i64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1415 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (i64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1424 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (i64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1433 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (i64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1442 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (f64.const 1) (i32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1451 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (f64.const 1) (f32.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1460 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (f64.const 1) (i64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1469 +assert_invalid( + () => instantiate(`(module + (table 10 funcref) + (elem funcref (ref.func $$f0) (ref.func $$f0) (ref.func $$f0)) + (func $$f0) + (func (export "test") + (table.init 0 (f64.const 1) (f64.const 1) (f64.const 1))))`), + `type mismatch`, +); + +// ./test/core/table_init.wast:1478 +let $28 = instantiate(`(module + (type (func (result i32))) + (table 32 64 funcref) + (elem funcref + (ref.func $$f0) (ref.func $$f1) (ref.func $$f2) (ref.func $$f3) + (ref.func $$f4) (ref.func $$f5) (ref.func $$f6) (ref.func $$f7) + (ref.func $$f8) (ref.func $$f9) (ref.func $$f10) (ref.func $$f11) + (ref.func $$f12) (ref.func $$f13) (ref.func $$f14) (ref.func $$f15)) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$offs i32) (param $$len i32) + (table.init 0 (local.get $$offs) (i32.const 0) (local.get $$len))))`); + +// ./test/core/table_init.wast:1506 +assert_trap(() => invoke($28, `run`, [24, 16]), `out of bounds table access`); + +// ./test/core/table_init.wast:1507 +assert_trap(() => invoke($28, `test`, [0]), `uninitialized element`); + +// ./test/core/table_init.wast:1508 +assert_trap(() => invoke($28, `test`, [1]), `uninitialized element`); + +// ./test/core/table_init.wast:1509 +assert_trap(() => invoke($28, `test`, [2]), `uninitialized element`); + +// ./test/core/table_init.wast:1510 +assert_trap(() => invoke($28, `test`, [3]), `uninitialized element`); + +// ./test/core/table_init.wast:1511 +assert_trap(() => invoke($28, `test`, [4]), `uninitialized element`); + +// ./test/core/table_init.wast:1512 +assert_trap(() => invoke($28, `test`, [5]), `uninitialized element`); + +// ./test/core/table_init.wast:1513 +assert_trap(() => invoke($28, `test`, [6]), `uninitialized element`); + +// ./test/core/table_init.wast:1514 +assert_trap(() => invoke($28, `test`, [7]), `uninitialized element`); + +// ./test/core/table_init.wast:1515 +assert_trap(() => invoke($28, `test`, [8]), `uninitialized element`); + +// ./test/core/table_init.wast:1516 +assert_trap(() => invoke($28, `test`, [9]), `uninitialized element`); + +// ./test/core/table_init.wast:1517 +assert_trap(() => invoke($28, `test`, [10]), `uninitialized element`); + +// ./test/core/table_init.wast:1518 +assert_trap(() => invoke($28, `test`, [11]), `uninitialized element`); + +// ./test/core/table_init.wast:1519 +assert_trap(() => invoke($28, `test`, [12]), `uninitialized element`); + +// ./test/core/table_init.wast:1520 +assert_trap(() => invoke($28, `test`, [13]), `uninitialized element`); + +// ./test/core/table_init.wast:1521 +assert_trap(() => invoke($28, `test`, [14]), `uninitialized element`); + +// ./test/core/table_init.wast:1522 +assert_trap(() => invoke($28, `test`, [15]), `uninitialized element`); + +// ./test/core/table_init.wast:1523 +assert_trap(() => invoke($28, `test`, [16]), `uninitialized element`); + +// ./test/core/table_init.wast:1524 +assert_trap(() => invoke($28, `test`, [17]), `uninitialized element`); + +// ./test/core/table_init.wast:1525 +assert_trap(() => invoke($28, `test`, [18]), `uninitialized element`); + +// ./test/core/table_init.wast:1526 +assert_trap(() => invoke($28, `test`, [19]), `uninitialized element`); + +// ./test/core/table_init.wast:1527 +assert_trap(() => invoke($28, `test`, [20]), `uninitialized element`); + +// ./test/core/table_init.wast:1528 +assert_trap(() => invoke($28, `test`, [21]), `uninitialized element`); + +// ./test/core/table_init.wast:1529 +assert_trap(() => invoke($28, `test`, [22]), `uninitialized element`); + +// ./test/core/table_init.wast:1530 +assert_trap(() => invoke($28, `test`, [23]), `uninitialized element`); + +// ./test/core/table_init.wast:1531 +assert_trap(() => invoke($28, `test`, [24]), `uninitialized element`); + +// ./test/core/table_init.wast:1532 +assert_trap(() => invoke($28, `test`, [25]), `uninitialized element`); + +// ./test/core/table_init.wast:1533 +assert_trap(() => invoke($28, `test`, [26]), `uninitialized element`); + +// ./test/core/table_init.wast:1534 +assert_trap(() => invoke($28, `test`, [27]), `uninitialized element`); + +// ./test/core/table_init.wast:1535 +assert_trap(() => invoke($28, `test`, [28]), `uninitialized element`); + +// ./test/core/table_init.wast:1536 +assert_trap(() => invoke($28, `test`, [29]), `uninitialized element`); + +// ./test/core/table_init.wast:1537 +assert_trap(() => invoke($28, `test`, [30]), `uninitialized element`); + +// ./test/core/table_init.wast:1538 +assert_trap(() => invoke($28, `test`, [31]), `uninitialized element`); + +// ./test/core/table_init.wast:1540 +let $29 = instantiate(`(module + (type (func (result i32))) + (table 32 64 funcref) + (elem funcref + (ref.func $$f0) (ref.func $$f1) (ref.func $$f2) (ref.func $$f3) + (ref.func $$f4) (ref.func $$f5) (ref.func $$f6) (ref.func $$f7) + (ref.func $$f8) (ref.func $$f9) (ref.func $$f10) (ref.func $$f11) + (ref.func $$f12) (ref.func $$f13) (ref.func $$f14) (ref.func $$f15)) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$offs i32) (param $$len i32) + (table.init 0 (local.get $$offs) (i32.const 0) (local.get $$len))))`); + +// ./test/core/table_init.wast:1568 +assert_trap(() => invoke($29, `run`, [25, 16]), `out of bounds table access`); + +// ./test/core/table_init.wast:1569 +assert_trap(() => invoke($29, `test`, [0]), `uninitialized element`); + +// ./test/core/table_init.wast:1570 +assert_trap(() => invoke($29, `test`, [1]), `uninitialized element`); + +// ./test/core/table_init.wast:1571 +assert_trap(() => invoke($29, `test`, [2]), `uninitialized element`); + +// ./test/core/table_init.wast:1572 +assert_trap(() => invoke($29, `test`, [3]), `uninitialized element`); + +// ./test/core/table_init.wast:1573 +assert_trap(() => invoke($29, `test`, [4]), `uninitialized element`); + +// ./test/core/table_init.wast:1574 +assert_trap(() => invoke($29, `test`, [5]), `uninitialized element`); + +// ./test/core/table_init.wast:1575 +assert_trap(() => invoke($29, `test`, [6]), `uninitialized element`); + +// ./test/core/table_init.wast:1576 +assert_trap(() => invoke($29, `test`, [7]), `uninitialized element`); + +// ./test/core/table_init.wast:1577 +assert_trap(() => invoke($29, `test`, [8]), `uninitialized element`); + +// ./test/core/table_init.wast:1578 +assert_trap(() => invoke($29, `test`, [9]), `uninitialized element`); + +// ./test/core/table_init.wast:1579 +assert_trap(() => invoke($29, `test`, [10]), `uninitialized element`); + +// ./test/core/table_init.wast:1580 +assert_trap(() => invoke($29, `test`, [11]), `uninitialized element`); + +// ./test/core/table_init.wast:1581 +assert_trap(() => invoke($29, `test`, [12]), `uninitialized element`); + +// ./test/core/table_init.wast:1582 +assert_trap(() => invoke($29, `test`, [13]), `uninitialized element`); + +// ./test/core/table_init.wast:1583 +assert_trap(() => invoke($29, `test`, [14]), `uninitialized element`); + +// ./test/core/table_init.wast:1584 +assert_trap(() => invoke($29, `test`, [15]), `uninitialized element`); + +// ./test/core/table_init.wast:1585 +assert_trap(() => invoke($29, `test`, [16]), `uninitialized element`); + +// ./test/core/table_init.wast:1586 +assert_trap(() => invoke($29, `test`, [17]), `uninitialized element`); + +// ./test/core/table_init.wast:1587 +assert_trap(() => invoke($29, `test`, [18]), `uninitialized element`); + +// ./test/core/table_init.wast:1588 +assert_trap(() => invoke($29, `test`, [19]), `uninitialized element`); + +// ./test/core/table_init.wast:1589 +assert_trap(() => invoke($29, `test`, [20]), `uninitialized element`); + +// ./test/core/table_init.wast:1590 +assert_trap(() => invoke($29, `test`, [21]), `uninitialized element`); + +// ./test/core/table_init.wast:1591 +assert_trap(() => invoke($29, `test`, [22]), `uninitialized element`); + +// ./test/core/table_init.wast:1592 +assert_trap(() => invoke($29, `test`, [23]), `uninitialized element`); + +// ./test/core/table_init.wast:1593 +assert_trap(() => invoke($29, `test`, [24]), `uninitialized element`); + +// ./test/core/table_init.wast:1594 +assert_trap(() => invoke($29, `test`, [25]), `uninitialized element`); + +// ./test/core/table_init.wast:1595 +assert_trap(() => invoke($29, `test`, [26]), `uninitialized element`); + +// ./test/core/table_init.wast:1596 +assert_trap(() => invoke($29, `test`, [27]), `uninitialized element`); + +// ./test/core/table_init.wast:1597 +assert_trap(() => invoke($29, `test`, [28]), `uninitialized element`); + +// ./test/core/table_init.wast:1598 +assert_trap(() => invoke($29, `test`, [29]), `uninitialized element`); + +// ./test/core/table_init.wast:1599 +assert_trap(() => invoke($29, `test`, [30]), `uninitialized element`); + +// ./test/core/table_init.wast:1600 +assert_trap(() => invoke($29, `test`, [31]), `uninitialized element`); + +// ./test/core/table_init.wast:1602 +let $30 = instantiate(`(module + (type (func (result i32))) + (table 160 320 funcref) + (elem funcref + (ref.func $$f0) (ref.func $$f1) (ref.func $$f2) (ref.func $$f3) + (ref.func $$f4) (ref.func $$f5) (ref.func $$f6) (ref.func $$f7) + (ref.func $$f8) (ref.func $$f9) (ref.func $$f10) (ref.func $$f11) + (ref.func $$f12) (ref.func $$f13) (ref.func $$f14) (ref.func $$f15)) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$offs i32) (param $$len i32) + (table.init 0 (local.get $$offs) (i32.const 0) (local.get $$len))))`); + +// ./test/core/table_init.wast:1630 +assert_trap(() => invoke($30, `run`, [96, 32]), `out of bounds table access`); + +// ./test/core/table_init.wast:1631 +assert_trap(() => invoke($30, `test`, [0]), `uninitialized element`); + +// ./test/core/table_init.wast:1632 +assert_trap(() => invoke($30, `test`, [1]), `uninitialized element`); + +// ./test/core/table_init.wast:1633 +assert_trap(() => invoke($30, `test`, [2]), `uninitialized element`); + +// ./test/core/table_init.wast:1634 +assert_trap(() => invoke($30, `test`, [3]), `uninitialized element`); + +// ./test/core/table_init.wast:1635 +assert_trap(() => invoke($30, `test`, [4]), `uninitialized element`); + +// ./test/core/table_init.wast:1636 +assert_trap(() => invoke($30, `test`, [5]), `uninitialized element`); + +// ./test/core/table_init.wast:1637 +assert_trap(() => invoke($30, `test`, [6]), `uninitialized element`); + +// ./test/core/table_init.wast:1638 +assert_trap(() => invoke($30, `test`, [7]), `uninitialized element`); + +// ./test/core/table_init.wast:1639 +assert_trap(() => invoke($30, `test`, [8]), `uninitialized element`); + +// ./test/core/table_init.wast:1640 +assert_trap(() => invoke($30, `test`, [9]), `uninitialized element`); + +// ./test/core/table_init.wast:1641 +assert_trap(() => invoke($30, `test`, [10]), `uninitialized element`); + +// ./test/core/table_init.wast:1642 +assert_trap(() => invoke($30, `test`, [11]), `uninitialized element`); + +// ./test/core/table_init.wast:1643 +assert_trap(() => invoke($30, `test`, [12]), `uninitialized element`); + +// ./test/core/table_init.wast:1644 +assert_trap(() => invoke($30, `test`, [13]), `uninitialized element`); + +// ./test/core/table_init.wast:1645 +assert_trap(() => invoke($30, `test`, [14]), `uninitialized element`); + +// ./test/core/table_init.wast:1646 +assert_trap(() => invoke($30, `test`, [15]), `uninitialized element`); + +// ./test/core/table_init.wast:1647 +assert_trap(() => invoke($30, `test`, [16]), `uninitialized element`); + +// ./test/core/table_init.wast:1648 +assert_trap(() => invoke($30, `test`, [17]), `uninitialized element`); + +// ./test/core/table_init.wast:1649 +assert_trap(() => invoke($30, `test`, [18]), `uninitialized element`); + +// ./test/core/table_init.wast:1650 +assert_trap(() => invoke($30, `test`, [19]), `uninitialized element`); + +// ./test/core/table_init.wast:1651 +assert_trap(() => invoke($30, `test`, [20]), `uninitialized element`); + +// ./test/core/table_init.wast:1652 +assert_trap(() => invoke($30, `test`, [21]), `uninitialized element`); + +// ./test/core/table_init.wast:1653 +assert_trap(() => invoke($30, `test`, [22]), `uninitialized element`); + +// ./test/core/table_init.wast:1654 +assert_trap(() => invoke($30, `test`, [23]), `uninitialized element`); + +// ./test/core/table_init.wast:1655 +assert_trap(() => invoke($30, `test`, [24]), `uninitialized element`); + +// ./test/core/table_init.wast:1656 +assert_trap(() => invoke($30, `test`, [25]), `uninitialized element`); + +// ./test/core/table_init.wast:1657 +assert_trap(() => invoke($30, `test`, [26]), `uninitialized element`); + +// ./test/core/table_init.wast:1658 +assert_trap(() => invoke($30, `test`, [27]), `uninitialized element`); + +// ./test/core/table_init.wast:1659 +assert_trap(() => invoke($30, `test`, [28]), `uninitialized element`); + +// ./test/core/table_init.wast:1660 +assert_trap(() => invoke($30, `test`, [29]), `uninitialized element`); + +// ./test/core/table_init.wast:1661 +assert_trap(() => invoke($30, `test`, [30]), `uninitialized element`); + +// ./test/core/table_init.wast:1662 +assert_trap(() => invoke($30, `test`, [31]), `uninitialized element`); + +// ./test/core/table_init.wast:1663 +assert_trap(() => invoke($30, `test`, [32]), `uninitialized element`); + +// ./test/core/table_init.wast:1664 +assert_trap(() => invoke($30, `test`, [33]), `uninitialized element`); + +// ./test/core/table_init.wast:1665 +assert_trap(() => invoke($30, `test`, [34]), `uninitialized element`); + +// ./test/core/table_init.wast:1666 +assert_trap(() => invoke($30, `test`, [35]), `uninitialized element`); + +// ./test/core/table_init.wast:1667 +assert_trap(() => invoke($30, `test`, [36]), `uninitialized element`); + +// ./test/core/table_init.wast:1668 +assert_trap(() => invoke($30, `test`, [37]), `uninitialized element`); + +// ./test/core/table_init.wast:1669 +assert_trap(() => invoke($30, `test`, [38]), `uninitialized element`); + +// ./test/core/table_init.wast:1670 +assert_trap(() => invoke($30, `test`, [39]), `uninitialized element`); + +// ./test/core/table_init.wast:1671 +assert_trap(() => invoke($30, `test`, [40]), `uninitialized element`); + +// ./test/core/table_init.wast:1672 +assert_trap(() => invoke($30, `test`, [41]), `uninitialized element`); + +// ./test/core/table_init.wast:1673 +assert_trap(() => invoke($30, `test`, [42]), `uninitialized element`); + +// ./test/core/table_init.wast:1674 +assert_trap(() => invoke($30, `test`, [43]), `uninitialized element`); + +// ./test/core/table_init.wast:1675 +assert_trap(() => invoke($30, `test`, [44]), `uninitialized element`); + +// ./test/core/table_init.wast:1676 +assert_trap(() => invoke($30, `test`, [45]), `uninitialized element`); + +// ./test/core/table_init.wast:1677 +assert_trap(() => invoke($30, `test`, [46]), `uninitialized element`); + +// ./test/core/table_init.wast:1678 +assert_trap(() => invoke($30, `test`, [47]), `uninitialized element`); + +// ./test/core/table_init.wast:1679 +assert_trap(() => invoke($30, `test`, [48]), `uninitialized element`); + +// ./test/core/table_init.wast:1680 +assert_trap(() => invoke($30, `test`, [49]), `uninitialized element`); + +// ./test/core/table_init.wast:1681 +assert_trap(() => invoke($30, `test`, [50]), `uninitialized element`); + +// ./test/core/table_init.wast:1682 +assert_trap(() => invoke($30, `test`, [51]), `uninitialized element`); + +// ./test/core/table_init.wast:1683 +assert_trap(() => invoke($30, `test`, [52]), `uninitialized element`); + +// ./test/core/table_init.wast:1684 +assert_trap(() => invoke($30, `test`, [53]), `uninitialized element`); + +// ./test/core/table_init.wast:1685 +assert_trap(() => invoke($30, `test`, [54]), `uninitialized element`); + +// ./test/core/table_init.wast:1686 +assert_trap(() => invoke($30, `test`, [55]), `uninitialized element`); + +// ./test/core/table_init.wast:1687 +assert_trap(() => invoke($30, `test`, [56]), `uninitialized element`); + +// ./test/core/table_init.wast:1688 +assert_trap(() => invoke($30, `test`, [57]), `uninitialized element`); + +// ./test/core/table_init.wast:1689 +assert_trap(() => invoke($30, `test`, [58]), `uninitialized element`); + +// ./test/core/table_init.wast:1690 +assert_trap(() => invoke($30, `test`, [59]), `uninitialized element`); + +// ./test/core/table_init.wast:1691 +assert_trap(() => invoke($30, `test`, [60]), `uninitialized element`); + +// ./test/core/table_init.wast:1692 +assert_trap(() => invoke($30, `test`, [61]), `uninitialized element`); + +// ./test/core/table_init.wast:1693 +assert_trap(() => invoke($30, `test`, [62]), `uninitialized element`); + +// ./test/core/table_init.wast:1694 +assert_trap(() => invoke($30, `test`, [63]), `uninitialized element`); + +// ./test/core/table_init.wast:1695 +assert_trap(() => invoke($30, `test`, [64]), `uninitialized element`); + +// ./test/core/table_init.wast:1696 +assert_trap(() => invoke($30, `test`, [65]), `uninitialized element`); + +// ./test/core/table_init.wast:1697 +assert_trap(() => invoke($30, `test`, [66]), `uninitialized element`); + +// ./test/core/table_init.wast:1698 +assert_trap(() => invoke($30, `test`, [67]), `uninitialized element`); + +// ./test/core/table_init.wast:1699 +assert_trap(() => invoke($30, `test`, [68]), `uninitialized element`); + +// ./test/core/table_init.wast:1700 +assert_trap(() => invoke($30, `test`, [69]), `uninitialized element`); + +// ./test/core/table_init.wast:1701 +assert_trap(() => invoke($30, `test`, [70]), `uninitialized element`); + +// ./test/core/table_init.wast:1702 +assert_trap(() => invoke($30, `test`, [71]), `uninitialized element`); + +// ./test/core/table_init.wast:1703 +assert_trap(() => invoke($30, `test`, [72]), `uninitialized element`); + +// ./test/core/table_init.wast:1704 +assert_trap(() => invoke($30, `test`, [73]), `uninitialized element`); + +// ./test/core/table_init.wast:1705 +assert_trap(() => invoke($30, `test`, [74]), `uninitialized element`); + +// ./test/core/table_init.wast:1706 +assert_trap(() => invoke($30, `test`, [75]), `uninitialized element`); + +// ./test/core/table_init.wast:1707 +assert_trap(() => invoke($30, `test`, [76]), `uninitialized element`); + +// ./test/core/table_init.wast:1708 +assert_trap(() => invoke($30, `test`, [77]), `uninitialized element`); + +// ./test/core/table_init.wast:1709 +assert_trap(() => invoke($30, `test`, [78]), `uninitialized element`); + +// ./test/core/table_init.wast:1710 +assert_trap(() => invoke($30, `test`, [79]), `uninitialized element`); + +// ./test/core/table_init.wast:1711 +assert_trap(() => invoke($30, `test`, [80]), `uninitialized element`); + +// ./test/core/table_init.wast:1712 +assert_trap(() => invoke($30, `test`, [81]), `uninitialized element`); + +// ./test/core/table_init.wast:1713 +assert_trap(() => invoke($30, `test`, [82]), `uninitialized element`); + +// ./test/core/table_init.wast:1714 +assert_trap(() => invoke($30, `test`, [83]), `uninitialized element`); + +// ./test/core/table_init.wast:1715 +assert_trap(() => invoke($30, `test`, [84]), `uninitialized element`); + +// ./test/core/table_init.wast:1716 +assert_trap(() => invoke($30, `test`, [85]), `uninitialized element`); + +// ./test/core/table_init.wast:1717 +assert_trap(() => invoke($30, `test`, [86]), `uninitialized element`); + +// ./test/core/table_init.wast:1718 +assert_trap(() => invoke($30, `test`, [87]), `uninitialized element`); + +// ./test/core/table_init.wast:1719 +assert_trap(() => invoke($30, `test`, [88]), `uninitialized element`); + +// ./test/core/table_init.wast:1720 +assert_trap(() => invoke($30, `test`, [89]), `uninitialized element`); + +// ./test/core/table_init.wast:1721 +assert_trap(() => invoke($30, `test`, [90]), `uninitialized element`); + +// ./test/core/table_init.wast:1722 +assert_trap(() => invoke($30, `test`, [91]), `uninitialized element`); + +// ./test/core/table_init.wast:1723 +assert_trap(() => invoke($30, `test`, [92]), `uninitialized element`); + +// ./test/core/table_init.wast:1724 +assert_trap(() => invoke($30, `test`, [93]), `uninitialized element`); + +// ./test/core/table_init.wast:1725 +assert_trap(() => invoke($30, `test`, [94]), `uninitialized element`); + +// ./test/core/table_init.wast:1726 +assert_trap(() => invoke($30, `test`, [95]), `uninitialized element`); + +// ./test/core/table_init.wast:1727 +assert_trap(() => invoke($30, `test`, [96]), `uninitialized element`); + +// ./test/core/table_init.wast:1728 +assert_trap(() => invoke($30, `test`, [97]), `uninitialized element`); + +// ./test/core/table_init.wast:1729 +assert_trap(() => invoke($30, `test`, [98]), `uninitialized element`); + +// ./test/core/table_init.wast:1730 +assert_trap(() => invoke($30, `test`, [99]), `uninitialized element`); + +// ./test/core/table_init.wast:1731 +assert_trap(() => invoke($30, `test`, [100]), `uninitialized element`); + +// ./test/core/table_init.wast:1732 +assert_trap(() => invoke($30, `test`, [101]), `uninitialized element`); + +// ./test/core/table_init.wast:1733 +assert_trap(() => invoke($30, `test`, [102]), `uninitialized element`); + +// ./test/core/table_init.wast:1734 +assert_trap(() => invoke($30, `test`, [103]), `uninitialized element`); + +// ./test/core/table_init.wast:1735 +assert_trap(() => invoke($30, `test`, [104]), `uninitialized element`); + +// ./test/core/table_init.wast:1736 +assert_trap(() => invoke($30, `test`, [105]), `uninitialized element`); + +// ./test/core/table_init.wast:1737 +assert_trap(() => invoke($30, `test`, [106]), `uninitialized element`); + +// ./test/core/table_init.wast:1738 +assert_trap(() => invoke($30, `test`, [107]), `uninitialized element`); + +// ./test/core/table_init.wast:1739 +assert_trap(() => invoke($30, `test`, [108]), `uninitialized element`); + +// ./test/core/table_init.wast:1740 +assert_trap(() => invoke($30, `test`, [109]), `uninitialized element`); + +// ./test/core/table_init.wast:1741 +assert_trap(() => invoke($30, `test`, [110]), `uninitialized element`); + +// ./test/core/table_init.wast:1742 +assert_trap(() => invoke($30, `test`, [111]), `uninitialized element`); + +// ./test/core/table_init.wast:1743 +assert_trap(() => invoke($30, `test`, [112]), `uninitialized element`); + +// ./test/core/table_init.wast:1744 +assert_trap(() => invoke($30, `test`, [113]), `uninitialized element`); + +// ./test/core/table_init.wast:1745 +assert_trap(() => invoke($30, `test`, [114]), `uninitialized element`); + +// ./test/core/table_init.wast:1746 +assert_trap(() => invoke($30, `test`, [115]), `uninitialized element`); + +// ./test/core/table_init.wast:1747 +assert_trap(() => invoke($30, `test`, [116]), `uninitialized element`); + +// ./test/core/table_init.wast:1748 +assert_trap(() => invoke($30, `test`, [117]), `uninitialized element`); + +// ./test/core/table_init.wast:1749 +assert_trap(() => invoke($30, `test`, [118]), `uninitialized element`); + +// ./test/core/table_init.wast:1750 +assert_trap(() => invoke($30, `test`, [119]), `uninitialized element`); + +// ./test/core/table_init.wast:1751 +assert_trap(() => invoke($30, `test`, [120]), `uninitialized element`); + +// ./test/core/table_init.wast:1752 +assert_trap(() => invoke($30, `test`, [121]), `uninitialized element`); + +// ./test/core/table_init.wast:1753 +assert_trap(() => invoke($30, `test`, [122]), `uninitialized element`); + +// ./test/core/table_init.wast:1754 +assert_trap(() => invoke($30, `test`, [123]), `uninitialized element`); + +// ./test/core/table_init.wast:1755 +assert_trap(() => invoke($30, `test`, [124]), `uninitialized element`); + +// ./test/core/table_init.wast:1756 +assert_trap(() => invoke($30, `test`, [125]), `uninitialized element`); + +// ./test/core/table_init.wast:1757 +assert_trap(() => invoke($30, `test`, [126]), `uninitialized element`); + +// ./test/core/table_init.wast:1758 +assert_trap(() => invoke($30, `test`, [127]), `uninitialized element`); + +// ./test/core/table_init.wast:1759 +assert_trap(() => invoke($30, `test`, [128]), `uninitialized element`); + +// ./test/core/table_init.wast:1760 +assert_trap(() => invoke($30, `test`, [129]), `uninitialized element`); + +// ./test/core/table_init.wast:1761 +assert_trap(() => invoke($30, `test`, [130]), `uninitialized element`); + +// ./test/core/table_init.wast:1762 +assert_trap(() => invoke($30, `test`, [131]), `uninitialized element`); + +// ./test/core/table_init.wast:1763 +assert_trap(() => invoke($30, `test`, [132]), `uninitialized element`); + +// ./test/core/table_init.wast:1764 +assert_trap(() => invoke($30, `test`, [133]), `uninitialized element`); + +// ./test/core/table_init.wast:1765 +assert_trap(() => invoke($30, `test`, [134]), `uninitialized element`); + +// ./test/core/table_init.wast:1766 +assert_trap(() => invoke($30, `test`, [135]), `uninitialized element`); + +// ./test/core/table_init.wast:1767 +assert_trap(() => invoke($30, `test`, [136]), `uninitialized element`); + +// ./test/core/table_init.wast:1768 +assert_trap(() => invoke($30, `test`, [137]), `uninitialized element`); + +// ./test/core/table_init.wast:1769 +assert_trap(() => invoke($30, `test`, [138]), `uninitialized element`); + +// ./test/core/table_init.wast:1770 +assert_trap(() => invoke($30, `test`, [139]), `uninitialized element`); + +// ./test/core/table_init.wast:1771 +assert_trap(() => invoke($30, `test`, [140]), `uninitialized element`); + +// ./test/core/table_init.wast:1772 +assert_trap(() => invoke($30, `test`, [141]), `uninitialized element`); + +// ./test/core/table_init.wast:1773 +assert_trap(() => invoke($30, `test`, [142]), `uninitialized element`); + +// ./test/core/table_init.wast:1774 +assert_trap(() => invoke($30, `test`, [143]), `uninitialized element`); + +// ./test/core/table_init.wast:1775 +assert_trap(() => invoke($30, `test`, [144]), `uninitialized element`); + +// ./test/core/table_init.wast:1776 +assert_trap(() => invoke($30, `test`, [145]), `uninitialized element`); + +// ./test/core/table_init.wast:1777 +assert_trap(() => invoke($30, `test`, [146]), `uninitialized element`); + +// ./test/core/table_init.wast:1778 +assert_trap(() => invoke($30, `test`, [147]), `uninitialized element`); + +// ./test/core/table_init.wast:1779 +assert_trap(() => invoke($30, `test`, [148]), `uninitialized element`); + +// ./test/core/table_init.wast:1780 +assert_trap(() => invoke($30, `test`, [149]), `uninitialized element`); + +// ./test/core/table_init.wast:1781 +assert_trap(() => invoke($30, `test`, [150]), `uninitialized element`); + +// ./test/core/table_init.wast:1782 +assert_trap(() => invoke($30, `test`, [151]), `uninitialized element`); + +// ./test/core/table_init.wast:1783 +assert_trap(() => invoke($30, `test`, [152]), `uninitialized element`); + +// ./test/core/table_init.wast:1784 +assert_trap(() => invoke($30, `test`, [153]), `uninitialized element`); + +// ./test/core/table_init.wast:1785 +assert_trap(() => invoke($30, `test`, [154]), `uninitialized element`); + +// ./test/core/table_init.wast:1786 +assert_trap(() => invoke($30, `test`, [155]), `uninitialized element`); + +// ./test/core/table_init.wast:1787 +assert_trap(() => invoke($30, `test`, [156]), `uninitialized element`); + +// ./test/core/table_init.wast:1788 +assert_trap(() => invoke($30, `test`, [157]), `uninitialized element`); + +// ./test/core/table_init.wast:1789 +assert_trap(() => invoke($30, `test`, [158]), `uninitialized element`); + +// ./test/core/table_init.wast:1790 +assert_trap(() => invoke($30, `test`, [159]), `uninitialized element`); + +// ./test/core/table_init.wast:1792 +let $31 = instantiate(`(module + (type (func (result i32))) + (table 160 320 funcref) + (elem funcref + (ref.func $$f0) (ref.func $$f1) (ref.func $$f2) (ref.func $$f3) + (ref.func $$f4) (ref.func $$f5) (ref.func $$f6) (ref.func $$f7) + (ref.func $$f8) (ref.func $$f9) (ref.func $$f10) (ref.func $$f11) + (ref.func $$f12) (ref.func $$f13) (ref.func $$f14) (ref.func $$f15)) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$offs i32) (param $$len i32) + (table.init 0 (local.get $$offs) (i32.const 0) (local.get $$len))))`); + +// ./test/core/table_init.wast:1820 +assert_trap(() => invoke($31, `run`, [97, 31]), `out of bounds table access`); + +// ./test/core/table_init.wast:1821 +assert_trap(() => invoke($31, `test`, [0]), `uninitialized element`); + +// ./test/core/table_init.wast:1822 +assert_trap(() => invoke($31, `test`, [1]), `uninitialized element`); + +// ./test/core/table_init.wast:1823 +assert_trap(() => invoke($31, `test`, [2]), `uninitialized element`); + +// ./test/core/table_init.wast:1824 +assert_trap(() => invoke($31, `test`, [3]), `uninitialized element`); + +// ./test/core/table_init.wast:1825 +assert_trap(() => invoke($31, `test`, [4]), `uninitialized element`); + +// ./test/core/table_init.wast:1826 +assert_trap(() => invoke($31, `test`, [5]), `uninitialized element`); + +// ./test/core/table_init.wast:1827 +assert_trap(() => invoke($31, `test`, [6]), `uninitialized element`); + +// ./test/core/table_init.wast:1828 +assert_trap(() => invoke($31, `test`, [7]), `uninitialized element`); + +// ./test/core/table_init.wast:1829 +assert_trap(() => invoke($31, `test`, [8]), `uninitialized element`); + +// ./test/core/table_init.wast:1830 +assert_trap(() => invoke($31, `test`, [9]), `uninitialized element`); + +// ./test/core/table_init.wast:1831 +assert_trap(() => invoke($31, `test`, [10]), `uninitialized element`); + +// ./test/core/table_init.wast:1832 +assert_trap(() => invoke($31, `test`, [11]), `uninitialized element`); + +// ./test/core/table_init.wast:1833 +assert_trap(() => invoke($31, `test`, [12]), `uninitialized element`); + +// ./test/core/table_init.wast:1834 +assert_trap(() => invoke($31, `test`, [13]), `uninitialized element`); + +// ./test/core/table_init.wast:1835 +assert_trap(() => invoke($31, `test`, [14]), `uninitialized element`); + +// ./test/core/table_init.wast:1836 +assert_trap(() => invoke($31, `test`, [15]), `uninitialized element`); + +// ./test/core/table_init.wast:1837 +assert_trap(() => invoke($31, `test`, [16]), `uninitialized element`); + +// ./test/core/table_init.wast:1838 +assert_trap(() => invoke($31, `test`, [17]), `uninitialized element`); + +// ./test/core/table_init.wast:1839 +assert_trap(() => invoke($31, `test`, [18]), `uninitialized element`); + +// ./test/core/table_init.wast:1840 +assert_trap(() => invoke($31, `test`, [19]), `uninitialized element`); + +// ./test/core/table_init.wast:1841 +assert_trap(() => invoke($31, `test`, [20]), `uninitialized element`); + +// ./test/core/table_init.wast:1842 +assert_trap(() => invoke($31, `test`, [21]), `uninitialized element`); + +// ./test/core/table_init.wast:1843 +assert_trap(() => invoke($31, `test`, [22]), `uninitialized element`); + +// ./test/core/table_init.wast:1844 +assert_trap(() => invoke($31, `test`, [23]), `uninitialized element`); + +// ./test/core/table_init.wast:1845 +assert_trap(() => invoke($31, `test`, [24]), `uninitialized element`); + +// ./test/core/table_init.wast:1846 +assert_trap(() => invoke($31, `test`, [25]), `uninitialized element`); + +// ./test/core/table_init.wast:1847 +assert_trap(() => invoke($31, `test`, [26]), `uninitialized element`); + +// ./test/core/table_init.wast:1848 +assert_trap(() => invoke($31, `test`, [27]), `uninitialized element`); + +// ./test/core/table_init.wast:1849 +assert_trap(() => invoke($31, `test`, [28]), `uninitialized element`); + +// ./test/core/table_init.wast:1850 +assert_trap(() => invoke($31, `test`, [29]), `uninitialized element`); + +// ./test/core/table_init.wast:1851 +assert_trap(() => invoke($31, `test`, [30]), `uninitialized element`); + +// ./test/core/table_init.wast:1852 +assert_trap(() => invoke($31, `test`, [31]), `uninitialized element`); + +// ./test/core/table_init.wast:1853 +assert_trap(() => invoke($31, `test`, [32]), `uninitialized element`); + +// ./test/core/table_init.wast:1854 +assert_trap(() => invoke($31, `test`, [33]), `uninitialized element`); + +// ./test/core/table_init.wast:1855 +assert_trap(() => invoke($31, `test`, [34]), `uninitialized element`); + +// ./test/core/table_init.wast:1856 +assert_trap(() => invoke($31, `test`, [35]), `uninitialized element`); + +// ./test/core/table_init.wast:1857 +assert_trap(() => invoke($31, `test`, [36]), `uninitialized element`); + +// ./test/core/table_init.wast:1858 +assert_trap(() => invoke($31, `test`, [37]), `uninitialized element`); + +// ./test/core/table_init.wast:1859 +assert_trap(() => invoke($31, `test`, [38]), `uninitialized element`); + +// ./test/core/table_init.wast:1860 +assert_trap(() => invoke($31, `test`, [39]), `uninitialized element`); + +// ./test/core/table_init.wast:1861 +assert_trap(() => invoke($31, `test`, [40]), `uninitialized element`); + +// ./test/core/table_init.wast:1862 +assert_trap(() => invoke($31, `test`, [41]), `uninitialized element`); + +// ./test/core/table_init.wast:1863 +assert_trap(() => invoke($31, `test`, [42]), `uninitialized element`); + +// ./test/core/table_init.wast:1864 +assert_trap(() => invoke($31, `test`, [43]), `uninitialized element`); + +// ./test/core/table_init.wast:1865 +assert_trap(() => invoke($31, `test`, [44]), `uninitialized element`); + +// ./test/core/table_init.wast:1866 +assert_trap(() => invoke($31, `test`, [45]), `uninitialized element`); + +// ./test/core/table_init.wast:1867 +assert_trap(() => invoke($31, `test`, [46]), `uninitialized element`); + +// ./test/core/table_init.wast:1868 +assert_trap(() => invoke($31, `test`, [47]), `uninitialized element`); + +// ./test/core/table_init.wast:1869 +assert_trap(() => invoke($31, `test`, [48]), `uninitialized element`); + +// ./test/core/table_init.wast:1870 +assert_trap(() => invoke($31, `test`, [49]), `uninitialized element`); + +// ./test/core/table_init.wast:1871 +assert_trap(() => invoke($31, `test`, [50]), `uninitialized element`); + +// ./test/core/table_init.wast:1872 +assert_trap(() => invoke($31, `test`, [51]), `uninitialized element`); + +// ./test/core/table_init.wast:1873 +assert_trap(() => invoke($31, `test`, [52]), `uninitialized element`); + +// ./test/core/table_init.wast:1874 +assert_trap(() => invoke($31, `test`, [53]), `uninitialized element`); + +// ./test/core/table_init.wast:1875 +assert_trap(() => invoke($31, `test`, [54]), `uninitialized element`); + +// ./test/core/table_init.wast:1876 +assert_trap(() => invoke($31, `test`, [55]), `uninitialized element`); + +// ./test/core/table_init.wast:1877 +assert_trap(() => invoke($31, `test`, [56]), `uninitialized element`); + +// ./test/core/table_init.wast:1878 +assert_trap(() => invoke($31, `test`, [57]), `uninitialized element`); + +// ./test/core/table_init.wast:1879 +assert_trap(() => invoke($31, `test`, [58]), `uninitialized element`); + +// ./test/core/table_init.wast:1880 +assert_trap(() => invoke($31, `test`, [59]), `uninitialized element`); + +// ./test/core/table_init.wast:1881 +assert_trap(() => invoke($31, `test`, [60]), `uninitialized element`); + +// ./test/core/table_init.wast:1882 +assert_trap(() => invoke($31, `test`, [61]), `uninitialized element`); + +// ./test/core/table_init.wast:1883 +assert_trap(() => invoke($31, `test`, [62]), `uninitialized element`); + +// ./test/core/table_init.wast:1884 +assert_trap(() => invoke($31, `test`, [63]), `uninitialized element`); + +// ./test/core/table_init.wast:1885 +assert_trap(() => invoke($31, `test`, [64]), `uninitialized element`); + +// ./test/core/table_init.wast:1886 +assert_trap(() => invoke($31, `test`, [65]), `uninitialized element`); + +// ./test/core/table_init.wast:1887 +assert_trap(() => invoke($31, `test`, [66]), `uninitialized element`); + +// ./test/core/table_init.wast:1888 +assert_trap(() => invoke($31, `test`, [67]), `uninitialized element`); + +// ./test/core/table_init.wast:1889 +assert_trap(() => invoke($31, `test`, [68]), `uninitialized element`); + +// ./test/core/table_init.wast:1890 +assert_trap(() => invoke($31, `test`, [69]), `uninitialized element`); + +// ./test/core/table_init.wast:1891 +assert_trap(() => invoke($31, `test`, [70]), `uninitialized element`); + +// ./test/core/table_init.wast:1892 +assert_trap(() => invoke($31, `test`, [71]), `uninitialized element`); + +// ./test/core/table_init.wast:1893 +assert_trap(() => invoke($31, `test`, [72]), `uninitialized element`); + +// ./test/core/table_init.wast:1894 +assert_trap(() => invoke($31, `test`, [73]), `uninitialized element`); + +// ./test/core/table_init.wast:1895 +assert_trap(() => invoke($31, `test`, [74]), `uninitialized element`); + +// ./test/core/table_init.wast:1896 +assert_trap(() => invoke($31, `test`, [75]), `uninitialized element`); + +// ./test/core/table_init.wast:1897 +assert_trap(() => invoke($31, `test`, [76]), `uninitialized element`); + +// ./test/core/table_init.wast:1898 +assert_trap(() => invoke($31, `test`, [77]), `uninitialized element`); + +// ./test/core/table_init.wast:1899 +assert_trap(() => invoke($31, `test`, [78]), `uninitialized element`); + +// ./test/core/table_init.wast:1900 +assert_trap(() => invoke($31, `test`, [79]), `uninitialized element`); + +// ./test/core/table_init.wast:1901 +assert_trap(() => invoke($31, `test`, [80]), `uninitialized element`); + +// ./test/core/table_init.wast:1902 +assert_trap(() => invoke($31, `test`, [81]), `uninitialized element`); + +// ./test/core/table_init.wast:1903 +assert_trap(() => invoke($31, `test`, [82]), `uninitialized element`); + +// ./test/core/table_init.wast:1904 +assert_trap(() => invoke($31, `test`, [83]), `uninitialized element`); + +// ./test/core/table_init.wast:1905 +assert_trap(() => invoke($31, `test`, [84]), `uninitialized element`); + +// ./test/core/table_init.wast:1906 +assert_trap(() => invoke($31, `test`, [85]), `uninitialized element`); + +// ./test/core/table_init.wast:1907 +assert_trap(() => invoke($31, `test`, [86]), `uninitialized element`); + +// ./test/core/table_init.wast:1908 +assert_trap(() => invoke($31, `test`, [87]), `uninitialized element`); + +// ./test/core/table_init.wast:1909 +assert_trap(() => invoke($31, `test`, [88]), `uninitialized element`); + +// ./test/core/table_init.wast:1910 +assert_trap(() => invoke($31, `test`, [89]), `uninitialized element`); + +// ./test/core/table_init.wast:1911 +assert_trap(() => invoke($31, `test`, [90]), `uninitialized element`); + +// ./test/core/table_init.wast:1912 +assert_trap(() => invoke($31, `test`, [91]), `uninitialized element`); + +// ./test/core/table_init.wast:1913 +assert_trap(() => invoke($31, `test`, [92]), `uninitialized element`); + +// ./test/core/table_init.wast:1914 +assert_trap(() => invoke($31, `test`, [93]), `uninitialized element`); + +// ./test/core/table_init.wast:1915 +assert_trap(() => invoke($31, `test`, [94]), `uninitialized element`); + +// ./test/core/table_init.wast:1916 +assert_trap(() => invoke($31, `test`, [95]), `uninitialized element`); + +// ./test/core/table_init.wast:1917 +assert_trap(() => invoke($31, `test`, [96]), `uninitialized element`); + +// ./test/core/table_init.wast:1918 +assert_trap(() => invoke($31, `test`, [97]), `uninitialized element`); + +// ./test/core/table_init.wast:1919 +assert_trap(() => invoke($31, `test`, [98]), `uninitialized element`); + +// ./test/core/table_init.wast:1920 +assert_trap(() => invoke($31, `test`, [99]), `uninitialized element`); + +// ./test/core/table_init.wast:1921 +assert_trap(() => invoke($31, `test`, [100]), `uninitialized element`); + +// ./test/core/table_init.wast:1922 +assert_trap(() => invoke($31, `test`, [101]), `uninitialized element`); + +// ./test/core/table_init.wast:1923 +assert_trap(() => invoke($31, `test`, [102]), `uninitialized element`); + +// ./test/core/table_init.wast:1924 +assert_trap(() => invoke($31, `test`, [103]), `uninitialized element`); + +// ./test/core/table_init.wast:1925 +assert_trap(() => invoke($31, `test`, [104]), `uninitialized element`); + +// ./test/core/table_init.wast:1926 +assert_trap(() => invoke($31, `test`, [105]), `uninitialized element`); + +// ./test/core/table_init.wast:1927 +assert_trap(() => invoke($31, `test`, [106]), `uninitialized element`); + +// ./test/core/table_init.wast:1928 +assert_trap(() => invoke($31, `test`, [107]), `uninitialized element`); + +// ./test/core/table_init.wast:1929 +assert_trap(() => invoke($31, `test`, [108]), `uninitialized element`); + +// ./test/core/table_init.wast:1930 +assert_trap(() => invoke($31, `test`, [109]), `uninitialized element`); + +// ./test/core/table_init.wast:1931 +assert_trap(() => invoke($31, `test`, [110]), `uninitialized element`); + +// ./test/core/table_init.wast:1932 +assert_trap(() => invoke($31, `test`, [111]), `uninitialized element`); + +// ./test/core/table_init.wast:1933 +assert_trap(() => invoke($31, `test`, [112]), `uninitialized element`); + +// ./test/core/table_init.wast:1934 +assert_trap(() => invoke($31, `test`, [113]), `uninitialized element`); + +// ./test/core/table_init.wast:1935 +assert_trap(() => invoke($31, `test`, [114]), `uninitialized element`); + +// ./test/core/table_init.wast:1936 +assert_trap(() => invoke($31, `test`, [115]), `uninitialized element`); + +// ./test/core/table_init.wast:1937 +assert_trap(() => invoke($31, `test`, [116]), `uninitialized element`); + +// ./test/core/table_init.wast:1938 +assert_trap(() => invoke($31, `test`, [117]), `uninitialized element`); + +// ./test/core/table_init.wast:1939 +assert_trap(() => invoke($31, `test`, [118]), `uninitialized element`); + +// ./test/core/table_init.wast:1940 +assert_trap(() => invoke($31, `test`, [119]), `uninitialized element`); + +// ./test/core/table_init.wast:1941 +assert_trap(() => invoke($31, `test`, [120]), `uninitialized element`); + +// ./test/core/table_init.wast:1942 +assert_trap(() => invoke($31, `test`, [121]), `uninitialized element`); + +// ./test/core/table_init.wast:1943 +assert_trap(() => invoke($31, `test`, [122]), `uninitialized element`); + +// ./test/core/table_init.wast:1944 +assert_trap(() => invoke($31, `test`, [123]), `uninitialized element`); + +// ./test/core/table_init.wast:1945 +assert_trap(() => invoke($31, `test`, [124]), `uninitialized element`); + +// ./test/core/table_init.wast:1946 +assert_trap(() => invoke($31, `test`, [125]), `uninitialized element`); + +// ./test/core/table_init.wast:1947 +assert_trap(() => invoke($31, `test`, [126]), `uninitialized element`); + +// ./test/core/table_init.wast:1948 +assert_trap(() => invoke($31, `test`, [127]), `uninitialized element`); + +// ./test/core/table_init.wast:1949 +assert_trap(() => invoke($31, `test`, [128]), `uninitialized element`); + +// ./test/core/table_init.wast:1950 +assert_trap(() => invoke($31, `test`, [129]), `uninitialized element`); + +// ./test/core/table_init.wast:1951 +assert_trap(() => invoke($31, `test`, [130]), `uninitialized element`); + +// ./test/core/table_init.wast:1952 +assert_trap(() => invoke($31, `test`, [131]), `uninitialized element`); + +// ./test/core/table_init.wast:1953 +assert_trap(() => invoke($31, `test`, [132]), `uninitialized element`); + +// ./test/core/table_init.wast:1954 +assert_trap(() => invoke($31, `test`, [133]), `uninitialized element`); + +// ./test/core/table_init.wast:1955 +assert_trap(() => invoke($31, `test`, [134]), `uninitialized element`); + +// ./test/core/table_init.wast:1956 +assert_trap(() => invoke($31, `test`, [135]), `uninitialized element`); + +// ./test/core/table_init.wast:1957 +assert_trap(() => invoke($31, `test`, [136]), `uninitialized element`); + +// ./test/core/table_init.wast:1958 +assert_trap(() => invoke($31, `test`, [137]), `uninitialized element`); + +// ./test/core/table_init.wast:1959 +assert_trap(() => invoke($31, `test`, [138]), `uninitialized element`); + +// ./test/core/table_init.wast:1960 +assert_trap(() => invoke($31, `test`, [139]), `uninitialized element`); + +// ./test/core/table_init.wast:1961 +assert_trap(() => invoke($31, `test`, [140]), `uninitialized element`); + +// ./test/core/table_init.wast:1962 +assert_trap(() => invoke($31, `test`, [141]), `uninitialized element`); + +// ./test/core/table_init.wast:1963 +assert_trap(() => invoke($31, `test`, [142]), `uninitialized element`); + +// ./test/core/table_init.wast:1964 +assert_trap(() => invoke($31, `test`, [143]), `uninitialized element`); + +// ./test/core/table_init.wast:1965 +assert_trap(() => invoke($31, `test`, [144]), `uninitialized element`); + +// ./test/core/table_init.wast:1966 +assert_trap(() => invoke($31, `test`, [145]), `uninitialized element`); + +// ./test/core/table_init.wast:1967 +assert_trap(() => invoke($31, `test`, [146]), `uninitialized element`); + +// ./test/core/table_init.wast:1968 +assert_trap(() => invoke($31, `test`, [147]), `uninitialized element`); + +// ./test/core/table_init.wast:1969 +assert_trap(() => invoke($31, `test`, [148]), `uninitialized element`); + +// ./test/core/table_init.wast:1970 +assert_trap(() => invoke($31, `test`, [149]), `uninitialized element`); + +// ./test/core/table_init.wast:1971 +assert_trap(() => invoke($31, `test`, [150]), `uninitialized element`); + +// ./test/core/table_init.wast:1972 +assert_trap(() => invoke($31, `test`, [151]), `uninitialized element`); + +// ./test/core/table_init.wast:1973 +assert_trap(() => invoke($31, `test`, [152]), `uninitialized element`); + +// ./test/core/table_init.wast:1974 +assert_trap(() => invoke($31, `test`, [153]), `uninitialized element`); + +// ./test/core/table_init.wast:1975 +assert_trap(() => invoke($31, `test`, [154]), `uninitialized element`); + +// ./test/core/table_init.wast:1976 +assert_trap(() => invoke($31, `test`, [155]), `uninitialized element`); + +// ./test/core/table_init.wast:1977 +assert_trap(() => invoke($31, `test`, [156]), `uninitialized element`); + +// ./test/core/table_init.wast:1978 +assert_trap(() => invoke($31, `test`, [157]), `uninitialized element`); + +// ./test/core/table_init.wast:1979 +assert_trap(() => invoke($31, `test`, [158]), `uninitialized element`); + +// ./test/core/table_init.wast:1980 +assert_trap(() => invoke($31, `test`, [159]), `uninitialized element`); + +// ./test/core/table_init.wast:1982 +let $32 = instantiate(`(module + (type (func (result i32))) + (table 64 64 funcref) + (elem funcref + (ref.func $$f0) (ref.func $$f1) (ref.func $$f2) (ref.func $$f3) + (ref.func $$f4) (ref.func $$f5) (ref.func $$f6) (ref.func $$f7) + (ref.func $$f8) (ref.func $$f9) (ref.func $$f10) (ref.func $$f11) + (ref.func $$f12) (ref.func $$f13) (ref.func $$f14) (ref.func $$f15)) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$offs i32) (param $$len i32) + (table.init 0 (local.get $$offs) (i32.const 0) (local.get $$len))))`); + +// ./test/core/table_init.wast:2010 +assert_trap(() => invoke($32, `run`, [48, -16]), `out of bounds table access`); + +// ./test/core/table_init.wast:2011 +assert_trap(() => invoke($32, `test`, [0]), `uninitialized element`); + +// ./test/core/table_init.wast:2012 +assert_trap(() => invoke($32, `test`, [1]), `uninitialized element`); + +// ./test/core/table_init.wast:2013 +assert_trap(() => invoke($32, `test`, [2]), `uninitialized element`); + +// ./test/core/table_init.wast:2014 +assert_trap(() => invoke($32, `test`, [3]), `uninitialized element`); + +// ./test/core/table_init.wast:2015 +assert_trap(() => invoke($32, `test`, [4]), `uninitialized element`); + +// ./test/core/table_init.wast:2016 +assert_trap(() => invoke($32, `test`, [5]), `uninitialized element`); + +// ./test/core/table_init.wast:2017 +assert_trap(() => invoke($32, `test`, [6]), `uninitialized element`); + +// ./test/core/table_init.wast:2018 +assert_trap(() => invoke($32, `test`, [7]), `uninitialized element`); + +// ./test/core/table_init.wast:2019 +assert_trap(() => invoke($32, `test`, [8]), `uninitialized element`); + +// ./test/core/table_init.wast:2020 +assert_trap(() => invoke($32, `test`, [9]), `uninitialized element`); + +// ./test/core/table_init.wast:2021 +assert_trap(() => invoke($32, `test`, [10]), `uninitialized element`); + +// ./test/core/table_init.wast:2022 +assert_trap(() => invoke($32, `test`, [11]), `uninitialized element`); + +// ./test/core/table_init.wast:2023 +assert_trap(() => invoke($32, `test`, [12]), `uninitialized element`); + +// ./test/core/table_init.wast:2024 +assert_trap(() => invoke($32, `test`, [13]), `uninitialized element`); + +// ./test/core/table_init.wast:2025 +assert_trap(() => invoke($32, `test`, [14]), `uninitialized element`); + +// ./test/core/table_init.wast:2026 +assert_trap(() => invoke($32, `test`, [15]), `uninitialized element`); + +// ./test/core/table_init.wast:2027 +assert_trap(() => invoke($32, `test`, [16]), `uninitialized element`); + +// ./test/core/table_init.wast:2028 +assert_trap(() => invoke($32, `test`, [17]), `uninitialized element`); + +// ./test/core/table_init.wast:2029 +assert_trap(() => invoke($32, `test`, [18]), `uninitialized element`); + +// ./test/core/table_init.wast:2030 +assert_trap(() => invoke($32, `test`, [19]), `uninitialized element`); + +// ./test/core/table_init.wast:2031 +assert_trap(() => invoke($32, `test`, [20]), `uninitialized element`); + +// ./test/core/table_init.wast:2032 +assert_trap(() => invoke($32, `test`, [21]), `uninitialized element`); + +// ./test/core/table_init.wast:2033 +assert_trap(() => invoke($32, `test`, [22]), `uninitialized element`); + +// ./test/core/table_init.wast:2034 +assert_trap(() => invoke($32, `test`, [23]), `uninitialized element`); + +// ./test/core/table_init.wast:2035 +assert_trap(() => invoke($32, `test`, [24]), `uninitialized element`); + +// ./test/core/table_init.wast:2036 +assert_trap(() => invoke($32, `test`, [25]), `uninitialized element`); + +// ./test/core/table_init.wast:2037 +assert_trap(() => invoke($32, `test`, [26]), `uninitialized element`); + +// ./test/core/table_init.wast:2038 +assert_trap(() => invoke($32, `test`, [27]), `uninitialized element`); + +// ./test/core/table_init.wast:2039 +assert_trap(() => invoke($32, `test`, [28]), `uninitialized element`); + +// ./test/core/table_init.wast:2040 +assert_trap(() => invoke($32, `test`, [29]), `uninitialized element`); + +// ./test/core/table_init.wast:2041 +assert_trap(() => invoke($32, `test`, [30]), `uninitialized element`); + +// ./test/core/table_init.wast:2042 +assert_trap(() => invoke($32, `test`, [31]), `uninitialized element`); + +// ./test/core/table_init.wast:2043 +assert_trap(() => invoke($32, `test`, [32]), `uninitialized element`); + +// ./test/core/table_init.wast:2044 +assert_trap(() => invoke($32, `test`, [33]), `uninitialized element`); + +// ./test/core/table_init.wast:2045 +assert_trap(() => invoke($32, `test`, [34]), `uninitialized element`); + +// ./test/core/table_init.wast:2046 +assert_trap(() => invoke($32, `test`, [35]), `uninitialized element`); + +// ./test/core/table_init.wast:2047 +assert_trap(() => invoke($32, `test`, [36]), `uninitialized element`); + +// ./test/core/table_init.wast:2048 +assert_trap(() => invoke($32, `test`, [37]), `uninitialized element`); + +// ./test/core/table_init.wast:2049 +assert_trap(() => invoke($32, `test`, [38]), `uninitialized element`); + +// ./test/core/table_init.wast:2050 +assert_trap(() => invoke($32, `test`, [39]), `uninitialized element`); + +// ./test/core/table_init.wast:2051 +assert_trap(() => invoke($32, `test`, [40]), `uninitialized element`); + +// ./test/core/table_init.wast:2052 +assert_trap(() => invoke($32, `test`, [41]), `uninitialized element`); + +// ./test/core/table_init.wast:2053 +assert_trap(() => invoke($32, `test`, [42]), `uninitialized element`); + +// ./test/core/table_init.wast:2054 +assert_trap(() => invoke($32, `test`, [43]), `uninitialized element`); + +// ./test/core/table_init.wast:2055 +assert_trap(() => invoke($32, `test`, [44]), `uninitialized element`); + +// ./test/core/table_init.wast:2056 +assert_trap(() => invoke($32, `test`, [45]), `uninitialized element`); + +// ./test/core/table_init.wast:2057 +assert_trap(() => invoke($32, `test`, [46]), `uninitialized element`); + +// ./test/core/table_init.wast:2058 +assert_trap(() => invoke($32, `test`, [47]), `uninitialized element`); + +// ./test/core/table_init.wast:2059 +assert_trap(() => invoke($32, `test`, [48]), `uninitialized element`); + +// ./test/core/table_init.wast:2060 +assert_trap(() => invoke($32, `test`, [49]), `uninitialized element`); + +// ./test/core/table_init.wast:2061 +assert_trap(() => invoke($32, `test`, [50]), `uninitialized element`); + +// ./test/core/table_init.wast:2062 +assert_trap(() => invoke($32, `test`, [51]), `uninitialized element`); + +// ./test/core/table_init.wast:2063 +assert_trap(() => invoke($32, `test`, [52]), `uninitialized element`); + +// ./test/core/table_init.wast:2064 +assert_trap(() => invoke($32, `test`, [53]), `uninitialized element`); + +// ./test/core/table_init.wast:2065 +assert_trap(() => invoke($32, `test`, [54]), `uninitialized element`); + +// ./test/core/table_init.wast:2066 +assert_trap(() => invoke($32, `test`, [55]), `uninitialized element`); + +// ./test/core/table_init.wast:2067 +assert_trap(() => invoke($32, `test`, [56]), `uninitialized element`); + +// ./test/core/table_init.wast:2068 +assert_trap(() => invoke($32, `test`, [57]), `uninitialized element`); + +// ./test/core/table_init.wast:2069 +assert_trap(() => invoke($32, `test`, [58]), `uninitialized element`); + +// ./test/core/table_init.wast:2070 +assert_trap(() => invoke($32, `test`, [59]), `uninitialized element`); + +// ./test/core/table_init.wast:2071 +assert_trap(() => invoke($32, `test`, [60]), `uninitialized element`); + +// ./test/core/table_init.wast:2072 +assert_trap(() => invoke($32, `test`, [61]), `uninitialized element`); + +// ./test/core/table_init.wast:2073 +assert_trap(() => invoke($32, `test`, [62]), `uninitialized element`); + +// ./test/core/table_init.wast:2074 +assert_trap(() => invoke($32, `test`, [63]), `uninitialized element`); + +// ./test/core/table_init.wast:2076 +let $33 = instantiate(`(module + (type (func (result i32))) + (table 16 16 funcref) + (elem funcref + (ref.func $$f0) (ref.func $$f1) (ref.func $$f2) (ref.func $$f3) + (ref.func $$f4) (ref.func $$f5) (ref.func $$f6) (ref.func $$f7) + (ref.func $$f8) (ref.func $$f9) (ref.func $$f10) (ref.func $$f11) + (ref.func $$f12) (ref.func $$f13) (ref.func $$f14) (ref.func $$f15)) + (func $$f0 (export "f0") (result i32) (i32.const 0)) + (func $$f1 (export "f1") (result i32) (i32.const 1)) + (func $$f2 (export "f2") (result i32) (i32.const 2)) + (func $$f3 (export "f3") (result i32) (i32.const 3)) + (func $$f4 (export "f4") (result i32) (i32.const 4)) + (func $$f5 (export "f5") (result i32) (i32.const 5)) + (func $$f6 (export "f6") (result i32) (i32.const 6)) + (func $$f7 (export "f7") (result i32) (i32.const 7)) + (func $$f8 (export "f8") (result i32) (i32.const 8)) + (func $$f9 (export "f9") (result i32) (i32.const 9)) + (func $$f10 (export "f10") (result i32) (i32.const 10)) + (func $$f11 (export "f11") (result i32) (i32.const 11)) + (func $$f12 (export "f12") (result i32) (i32.const 12)) + (func $$f13 (export "f13") (result i32) (i32.const 13)) + (func $$f14 (export "f14") (result i32) (i32.const 14)) + (func $$f15 (export "f15") (result i32) (i32.const 15)) + (func (export "test") (param $$n i32) (result i32) + (call_indirect (type 0) (local.get $$n))) + (func (export "run") (param $$offs i32) (param $$len i32) + (table.init 0 (local.get $$offs) (i32.const 8) (local.get $$len))))`); + +// ./test/core/table_init.wast:2104 +assert_trap(() => invoke($33, `run`, [0, -4]), `out of bounds table access`); + +// ./test/core/table_init.wast:2105 +assert_trap(() => invoke($33, `test`, [0]), `uninitialized element`); + +// ./test/core/table_init.wast:2106 +assert_trap(() => invoke($33, `test`, [1]), `uninitialized element`); + +// ./test/core/table_init.wast:2107 +assert_trap(() => invoke($33, `test`, [2]), `uninitialized element`); + +// ./test/core/table_init.wast:2108 +assert_trap(() => invoke($33, `test`, [3]), `uninitialized element`); + +// ./test/core/table_init.wast:2109 +assert_trap(() => invoke($33, `test`, [4]), `uninitialized element`); + +// ./test/core/table_init.wast:2110 +assert_trap(() => invoke($33, `test`, [5]), `uninitialized element`); + +// ./test/core/table_init.wast:2111 +assert_trap(() => invoke($33, `test`, [6]), `uninitialized element`); + +// ./test/core/table_init.wast:2112 +assert_trap(() => invoke($33, `test`, [7]), `uninitialized element`); + +// ./test/core/table_init.wast:2113 +assert_trap(() => invoke($33, `test`, [8]), `uninitialized element`); + +// ./test/core/table_init.wast:2114 +assert_trap(() => invoke($33, `test`, [9]), `uninitialized element`); + +// ./test/core/table_init.wast:2115 +assert_trap(() => invoke($33, `test`, [10]), `uninitialized element`); + +// ./test/core/table_init.wast:2116 +assert_trap(() => invoke($33, `test`, [11]), `uninitialized element`); + +// ./test/core/table_init.wast:2117 +assert_trap(() => invoke($33, `test`, [12]), `uninitialized element`); + +// ./test/core/table_init.wast:2118 +assert_trap(() => invoke($33, `test`, [13]), `uninitialized element`); + +// ./test/core/table_init.wast:2119 +assert_trap(() => invoke($33, `test`, [14]), `uninitialized element`); + +// ./test/core/table_init.wast:2120 +assert_trap(() => invoke($33, `test`, [15]), `uninitialized element`); + +// ./test/core/table_init.wast:2122 +let $34 = instantiate(`(module + (table 1 funcref) + ;; 65 elem segments. 64 is the smallest positive number that is encoded + ;; differently as a signed LEB. + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) (elem funcref) (elem funcref) (elem funcref) + (elem funcref) + (func (table.init 64 (i32.const 0) (i32.const 0) (i32.const 0))))`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/table_set.wast.js b/js/src/jit-test/tests/wasm/spec/spec/table_set.wast.js new file mode 100644 index 0000000000..fd9aae6bf0 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/table_set.wast.js @@ -0,0 +1,177 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/table_set.wast + +// ./test/core/table_set.wast:1 +let $0 = instantiate(`(module + (table $$t2 1 externref) + (table $$t3 2 funcref) + (elem (table $$t3) (i32.const 1) func $$dummy) + (func $$dummy) + + (func (export "get-externref") (param $$i i32) (result externref) + (table.get $$t2 (local.get $$i)) + ) + (func $$f3 (export "get-funcref") (param $$i i32) (result funcref) + (table.get $$t3 (local.get $$i)) + ) + + (func (export "set-externref") (param $$i i32) (param $$r externref) + (table.set (local.get $$i) (local.get $$r)) + ) + (func (export "set-funcref") (param $$i i32) (param $$r funcref) + (table.set $$t3 (local.get $$i) (local.get $$r)) + ) + (func (export "set-funcref-from") (param $$i i32) (param $$j i32) + (table.set $$t3 (local.get $$i) (table.get $$t3 (local.get $$j))) + ) + + (func (export "is_null-funcref") (param $$i i32) (result i32) + (ref.is_null (call $$f3 (local.get $$i))) + ) +)`); + +// ./test/core/table_set.wast:29 +assert_return(() => invoke($0, `get-externref`, [0]), [value('externref', null)]); + +// ./test/core/table_set.wast:30 +assert_return(() => invoke($0, `set-externref`, [0, externref(1)]), []); + +// ./test/core/table_set.wast:31 +assert_return(() => invoke($0, `get-externref`, [0]), [new ExternRefResult(1)]); + +// ./test/core/table_set.wast:32 +assert_return(() => invoke($0, `set-externref`, [0, null]), []); + +// ./test/core/table_set.wast:33 +assert_return(() => invoke($0, `get-externref`, [0]), [value('externref', null)]); + +// ./test/core/table_set.wast:35 +assert_return(() => invoke($0, `get-funcref`, [0]), [value('anyfunc', null)]); + +// ./test/core/table_set.wast:36 +assert_return(() => invoke($0, `set-funcref-from`, [0, 1]), []); + +// ./test/core/table_set.wast:37 +assert_return(() => invoke($0, `is_null-funcref`, [0]), [value("i32", 0)]); + +// ./test/core/table_set.wast:38 +assert_return(() => invoke($0, `set-funcref`, [0, null]), []); + +// ./test/core/table_set.wast:39 +assert_return(() => invoke($0, `get-funcref`, [0]), [value('anyfunc', null)]); + +// ./test/core/table_set.wast:41 +assert_trap(() => invoke($0, `set-externref`, [2, null]), `out of bounds table access`); + +// ./test/core/table_set.wast:42 +assert_trap(() => invoke($0, `set-funcref`, [3, null]), `out of bounds table access`); + +// ./test/core/table_set.wast:43 +assert_trap(() => invoke($0, `set-externref`, [-1, null]), `out of bounds table access`); + +// ./test/core/table_set.wast:44 +assert_trap(() => invoke($0, `set-funcref`, [-1, null]), `out of bounds table access`); + +// ./test/core/table_set.wast:46 +assert_trap(() => invoke($0, `set-externref`, [2, externref(0)]), `out of bounds table access`); + +// ./test/core/table_set.wast:47 +assert_trap(() => invoke($0, `set-funcref-from`, [3, 1]), `out of bounds table access`); + +// ./test/core/table_set.wast:48 +assert_trap(() => invoke($0, `set-externref`, [-1, externref(0)]), `out of bounds table access`); + +// ./test/core/table_set.wast:49 +assert_trap(() => invoke($0, `set-funcref-from`, [-1, 1]), `out of bounds table access`); + +// ./test/core/table_set.wast:54 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-index-value-empty-vs-i32-externref + (table.set $$t) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_set.wast:63 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-index-empty-vs-i32 + (table.set $$t (ref.null extern)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_set.wast:72 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-value-empty-vs-externref + (table.set $$t (i32.const 1)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_set.wast:81 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-size-f32-vs-i32 + (table.set $$t (f32.const 1) (ref.null extern)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_set.wast:90 +assert_invalid( + () => instantiate(`(module + (table $$t 10 funcref) + (func $$type-value-externref-vs-funcref (param $$r externref) + (table.set $$t (i32.const 1) (local.get $$r)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_set.wast:100 +assert_invalid( + () => instantiate(`(module + (table $$t1 1 externref) + (table $$t2 1 funcref) + (func $$type-value-externref-vs-funcref-multi (param $$r externref) + (table.set $$t2 (i32.const 0) (local.get $$r)) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_set.wast:111 +assert_invalid( + () => instantiate(`(module + (table $$t 10 externref) + (func $$type-result-empty-vs-num (result i32) + (table.set $$t (i32.const 0) (ref.null extern)) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/table_size.wast.js b/js/src/jit-test/tests/wasm/spec/spec/table_size.wast.js new file mode 100644 index 0000000000..a12edf0363 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/table_size.wast.js @@ -0,0 +1,172 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/table_size.wast + +// ./test/core/table_size.wast:1 +let $0 = instantiate(`(module + (table $$t0 0 externref) + (table $$t1 1 externref) + (table $$t2 0 2 externref) + (table $$t3 3 8 externref) + + (func (export "size-t0") (result i32) table.size) + (func (export "size-t1") (result i32) (table.size $$t1)) + (func (export "size-t2") (result i32) (table.size $$t2)) + (func (export "size-t3") (result i32) (table.size $$t3)) + + (func (export "grow-t0") (param $$sz i32) + (drop (table.grow $$t0 (ref.null extern) (local.get $$sz))) + ) + (func (export "grow-t1") (param $$sz i32) + (drop (table.grow $$t1 (ref.null extern) (local.get $$sz))) + ) + (func (export "grow-t2") (param $$sz i32) + (drop (table.grow $$t2 (ref.null extern) (local.get $$sz))) + ) + (func (export "grow-t3") (param $$sz i32) + (drop (table.grow $$t3 (ref.null extern) (local.get $$sz))) + ) +)`); + +// ./test/core/table_size.wast:26 +assert_return(() => invoke($0, `size-t0`, []), [value("i32", 0)]); + +// ./test/core/table_size.wast:27 +assert_return(() => invoke($0, `grow-t0`, [1]), []); + +// ./test/core/table_size.wast:28 +assert_return(() => invoke($0, `size-t0`, []), [value("i32", 1)]); + +// ./test/core/table_size.wast:29 +assert_return(() => invoke($0, `grow-t0`, [4]), []); + +// ./test/core/table_size.wast:30 +assert_return(() => invoke($0, `size-t0`, []), [value("i32", 5)]); + +// ./test/core/table_size.wast:31 +assert_return(() => invoke($0, `grow-t0`, [0]), []); + +// ./test/core/table_size.wast:32 +assert_return(() => invoke($0, `size-t0`, []), [value("i32", 5)]); + +// ./test/core/table_size.wast:34 +assert_return(() => invoke($0, `size-t1`, []), [value("i32", 1)]); + +// ./test/core/table_size.wast:35 +assert_return(() => invoke($0, `grow-t1`, [1]), []); + +// ./test/core/table_size.wast:36 +assert_return(() => invoke($0, `size-t1`, []), [value("i32", 2)]); + +// ./test/core/table_size.wast:37 +assert_return(() => invoke($0, `grow-t1`, [4]), []); + +// ./test/core/table_size.wast:38 +assert_return(() => invoke($0, `size-t1`, []), [value("i32", 6)]); + +// ./test/core/table_size.wast:39 +assert_return(() => invoke($0, `grow-t1`, [0]), []); + +// ./test/core/table_size.wast:40 +assert_return(() => invoke($0, `size-t1`, []), [value("i32", 6)]); + +// ./test/core/table_size.wast:42 +assert_return(() => invoke($0, `size-t2`, []), [value("i32", 0)]); + +// ./test/core/table_size.wast:43 +assert_return(() => invoke($0, `grow-t2`, [3]), []); + +// ./test/core/table_size.wast:44 +assert_return(() => invoke($0, `size-t2`, []), [value("i32", 0)]); + +// ./test/core/table_size.wast:45 +assert_return(() => invoke($0, `grow-t2`, [1]), []); + +// ./test/core/table_size.wast:46 +assert_return(() => invoke($0, `size-t2`, []), [value("i32", 1)]); + +// ./test/core/table_size.wast:47 +assert_return(() => invoke($0, `grow-t2`, [0]), []); + +// ./test/core/table_size.wast:48 +assert_return(() => invoke($0, `size-t2`, []), [value("i32", 1)]); + +// ./test/core/table_size.wast:49 +assert_return(() => invoke($0, `grow-t2`, [4]), []); + +// ./test/core/table_size.wast:50 +assert_return(() => invoke($0, `size-t2`, []), [value("i32", 1)]); + +// ./test/core/table_size.wast:51 +assert_return(() => invoke($0, `grow-t2`, [1]), []); + +// ./test/core/table_size.wast:52 +assert_return(() => invoke($0, `size-t2`, []), [value("i32", 2)]); + +// ./test/core/table_size.wast:54 +assert_return(() => invoke($0, `size-t3`, []), [value("i32", 3)]); + +// ./test/core/table_size.wast:55 +assert_return(() => invoke($0, `grow-t3`, [1]), []); + +// ./test/core/table_size.wast:56 +assert_return(() => invoke($0, `size-t3`, []), [value("i32", 4)]); + +// ./test/core/table_size.wast:57 +assert_return(() => invoke($0, `grow-t3`, [3]), []); + +// ./test/core/table_size.wast:58 +assert_return(() => invoke($0, `size-t3`, []), [value("i32", 7)]); + +// ./test/core/table_size.wast:59 +assert_return(() => invoke($0, `grow-t3`, [0]), []); + +// ./test/core/table_size.wast:60 +assert_return(() => invoke($0, `size-t3`, []), [value("i32", 7)]); + +// ./test/core/table_size.wast:61 +assert_return(() => invoke($0, `grow-t3`, [2]), []); + +// ./test/core/table_size.wast:62 +assert_return(() => invoke($0, `size-t3`, []), [value("i32", 7)]); + +// ./test/core/table_size.wast:63 +assert_return(() => invoke($0, `grow-t3`, [1]), []); + +// ./test/core/table_size.wast:64 +assert_return(() => invoke($0, `size-t3`, []), [value("i32", 8)]); + +// ./test/core/table_size.wast:69 +assert_invalid( + () => instantiate(`(module + (table $$t 1 externref) + (func $$type-result-i32-vs-empty + (table.size $$t) + ) + )`), + `type mismatch`, +); + +// ./test/core/table_size.wast:78 +assert_invalid( + () => instantiate(`(module + (table $$t 1 externref) + (func $$type-result-i32-vs-f32 (result f32) + (table.size $$t) + ) + )`), + `type mismatch`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/token.wast.js b/js/src/jit-test/tests/wasm/spec/spec/token.wast.js new file mode 100644 index 0000000000..0856848c1e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/token.wast.js @@ -0,0 +1,22 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/token.wast + +// ./test/core/token.wast:3 +assert_malformed(() => instantiate(`(func (drop (i32.const0))) `), `unknown operator`); + +// ./test/core/token.wast:7 +assert_malformed(() => instantiate(`(func br 0drop) `), `unknown operator`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/tokens.wast.js b/js/src/jit-test/tests/wasm/spec/spec/tokens.wast.js new file mode 100644 index 0000000000..e7b653f77e --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/tokens.wast.js @@ -0,0 +1,283 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/tokens.wast + +// ./test/core/tokens.wast:3 +let $0 = instantiate(`(module + (func(nop)) +)`); + +// ./test/core/tokens.wast:6 +let $1 = instantiate(`(module + (func (nop)nop) +)`); + +// ./test/core/tokens.wast:9 +let $2 = instantiate(`(module + (func nop(nop)) +)`); + +// ./test/core/tokens.wast:12 +let $3 = instantiate(`(module + (func(nop)(nop)) +)`); + +// ./test/core/tokens.wast:15 +let $4 = instantiate(`(module + (func $$f(nop)) +)`); + +// ./test/core/tokens.wast:18 +let $5 = instantiate(`(module + (func br 0(nop)) +)`); + +// ./test/core/tokens.wast:21 +let $6 = instantiate(`(module + (table 1 funcref) + (func) + (elem (i32.const 0)0) +)`); + +// ./test/core/tokens.wast:26 +let $7 = instantiate(`(module + (table 1 funcref) + (func $$f) + (elem (i32.const 0)$$f) +)`); + +// ./test/core/tokens.wast:31 +let $8 = instantiate(`(module + (memory 1) + (data (i32.const 0)"a") +)`); + +// ./test/core/tokens.wast:35 +let $9 = instantiate(`(module + (import "spectest" "print"(func)) +)`); + +// ./test/core/tokens.wast:42 +let $10 = instantiate(`(module + (func;;bla + ) +)`); + +// ./test/core/tokens.wast:46 +let $11 = instantiate(`(module + (func (nop);;bla + ) +)`); + +// ./test/core/tokens.wast:50 +let $12 = instantiate(`(module + (func nop;;bla + ) +)`); + +// ./test/core/tokens.wast:54 +let $13 = instantiate(`(module + (func $$f;;bla + ) +)`); + +// ./test/core/tokens.wast:58 +let $14 = instantiate(`(module + (func br 0;;bla + ) +)`); + +// ./test/core/tokens.wast:62 +let $15 = instantiate(`(module + (data "a";;bla + ) +)`); + +// ./test/core/tokens.wast:70 +let $16 = instantiate(`(module + (func (block $$l (i32.const 0) (br_table 0 $$l))) +)`); + +// ./test/core/tokens.wast:73 +assert_malformed( + () => instantiate(`(func (block $$l (i32.const 0) (br_table 0$$l))) `), + `unknown operator`, +); + +// ./test/core/tokens.wast:80 +let $17 = instantiate(`(module + (func (block $$l (i32.const 0) (br_table $$l 0))) +)`); + +// ./test/core/tokens.wast:83 +assert_malformed( + () => instantiate(`(func (block $$l (i32.const 0) (br_table $$l0))) `), + `unknown label`, +); + +// ./test/core/tokens.wast:90 +let $18 = instantiate(`(module + (func (block $$l (i32.const 0) (br_table $$l $$l))) +)`); + +// ./test/core/tokens.wast:93 +assert_malformed( + () => instantiate(`(func (block $$l (i32.const 0) (br_table $$l$$l))) `), + `unknown label`, +); + +// ./test/core/tokens.wast:100 +let $19 = instantiate(`(module + (func (block $$l0 (i32.const 0) (br_table $$l0))) +)`); + +// ./test/core/tokens.wast:103 +let $20 = instantiate(`(module + (func (block $$l$$l (i32.const 0) (br_table $$l$$l))) +)`); + +// ./test/core/tokens.wast:110 +let $21 = instantiate(`(module + (data "a") +)`); + +// ./test/core/tokens.wast:113 +assert_malformed(() => instantiate(`(data"a") `), `unknown operator`); + +// ./test/core/tokens.wast:120 +let $22 = instantiate(`(module + (data $$l "a") +)`); + +// ./test/core/tokens.wast:123 +assert_malformed(() => instantiate(`(data $$l"a") `), `unknown operator`); + +// ./test/core/tokens.wast:130 +let $23 = instantiate(`(module + (data $$l " a") +)`); + +// ./test/core/tokens.wast:133 +assert_malformed(() => instantiate(`(data $$l" a") `), `unknown operator`); + +// ./test/core/tokens.wast:140 +let $24 = instantiate(`(module + (data $$l "a ") +)`); + +// ./test/core/tokens.wast:143 +assert_malformed(() => instantiate(`(data $$l"a ") `), `unknown operator`); + +// ./test/core/tokens.wast:150 +let $25 = instantiate(`(module + (data $$l "a " "b") +)`); + +// ./test/core/tokens.wast:153 +assert_malformed(() => instantiate(`(data $$l"a ""b") `), `unknown operator`); + +// ./test/core/tokens.wast:160 +let $26 = instantiate(`(module + (data $$l "\u{f61a}\u{f4a9}") +)`); + +// ./test/core/tokens.wast:163 +assert_malformed(() => instantiate(`(data $$l"\u{f61a}\u{f4a9}") `), `unknown operator`); + +// ./test/core/tokens.wast:170 +let $27 = instantiate(`(module + (data $$l " \u{f61a}\u{f4a9}") +)`); + +// ./test/core/tokens.wast:173 +assert_malformed(() => instantiate(`(data $$l" \u{f61a}\u{f4a9}") `), `unknown operator`); + +// ./test/core/tokens.wast:180 +let $28 = instantiate(`(module + (data $$l "\u{f61a}\u{f4a9} ") +)`); + +// ./test/core/tokens.wast:183 +assert_malformed(() => instantiate(`(data $$l"\u{f61a}\u{f4a9} ") `), `unknown operator`); + +// ./test/core/tokens.wast:190 +let $29 = instantiate(`(module + (data "a" "b") +)`); + +// ./test/core/tokens.wast:193 +assert_malformed(() => instantiate(`(data "a""b") `), `unknown operator`); + +// ./test/core/tokens.wast:200 +let $30 = instantiate(`(module + (data "a" " b") +)`); + +// ./test/core/tokens.wast:203 +assert_malformed(() => instantiate(`(data "a"" b") `), `unknown operator`); + +// ./test/core/tokens.wast:210 +let $31 = instantiate(`(module + (data "a " "b") +)`); + +// ./test/core/tokens.wast:213 +assert_malformed(() => instantiate(`(data "a ""b") `), `unknown operator`); + +// ./test/core/tokens.wast:220 +let $32 = instantiate(`(module + (data "\u{f61a}\u{f4a9}" "\u{f61a}\u{f4a9}") +)`); + +// ./test/core/tokens.wast:223 +assert_malformed( + () => instantiate(`(data "\u{f61a}\u{f4a9}""\u{f61a}\u{f4a9}") `), + `unknown operator`, +); + +// ./test/core/tokens.wast:230 +let $33 = instantiate(`(module + (data "\u{f61a}\u{f4a9}" " \u{f61a}\u{f4a9}") +)`); + +// ./test/core/tokens.wast:233 +assert_malformed( + () => instantiate(`(data "\u{f61a}\u{f4a9}"" \u{f61a}\u{f4a9}") `), + `unknown operator`, +); + +// ./test/core/tokens.wast:240 +let $34 = instantiate(`(module + (data "\u{f61a}\u{f4a9} " "\u{f61a}\u{f4a9}") +)`); + +// ./test/core/tokens.wast:243 +assert_malformed( + () => instantiate(`(data "\u{f61a}\u{f4a9} ""\u{f61a}\u{f4a9}") `), + `unknown operator`, +); + +// ./test/core/tokens.wast:251 +assert_malformed(() => instantiate(`(func "a"x) `), `unknown operator`); + +// ./test/core/tokens.wast:257 +assert_malformed(() => instantiate(`(func "a"0) `), `unknown operator`); + +// ./test/core/tokens.wast:263 +assert_malformed(() => instantiate(`(func 0"a") `), `unknown operator`); + +// ./test/core/tokens.wast:269 +assert_malformed(() => instantiate(`(func "a"$$x) `), `unknown operator`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/traps.wast.js b/js/src/jit-test/tests/wasm/spec/spec/traps.wast.js new file mode 100644 index 0000000000..61fc4dcacc --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/traps.wast.js @@ -0,0 +1,200 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/traps.wast + +// ./test/core/traps.wast:5 +let $0 = instantiate(`(module + (func (export "no_dce.i32.div_s") (param $$x i32) (param $$y i32) + (drop (i32.div_s (local.get $$x) (local.get $$y)))) + (func (export "no_dce.i32.div_u") (param $$x i32) (param $$y i32) + (drop (i32.div_u (local.get $$x) (local.get $$y)))) + (func (export "no_dce.i64.div_s") (param $$x i64) (param $$y i64) + (drop (i64.div_s (local.get $$x) (local.get $$y)))) + (func (export "no_dce.i64.div_u") (param $$x i64) (param $$y i64) + (drop (i64.div_u (local.get $$x) (local.get $$y)))) +)`); + +// ./test/core/traps.wast:16 +assert_trap(() => invoke($0, `no_dce.i32.div_s`, [1, 0]), `integer divide by zero`); + +// ./test/core/traps.wast:17 +assert_trap(() => invoke($0, `no_dce.i32.div_u`, [1, 0]), `integer divide by zero`); + +// ./test/core/traps.wast:18 +assert_trap(() => invoke($0, `no_dce.i64.div_s`, [1n, 0n]), `integer divide by zero`); + +// ./test/core/traps.wast:19 +assert_trap(() => invoke($0, `no_dce.i64.div_u`, [1n, 0n]), `integer divide by zero`); + +// ./test/core/traps.wast:20 +assert_trap(() => invoke($0, `no_dce.i32.div_s`, [-2147483648, -1]), `integer overflow`); + +// ./test/core/traps.wast:21 +assert_trap(() => invoke($0, `no_dce.i64.div_s`, [-9223372036854775808n, -1n]), `integer overflow`); + +// ./test/core/traps.wast:23 +let $1 = instantiate(`(module + (func (export "no_dce.i32.rem_s") (param $$x i32) (param $$y i32) + (drop (i32.rem_s (local.get $$x) (local.get $$y)))) + (func (export "no_dce.i32.rem_u") (param $$x i32) (param $$y i32) + (drop (i32.rem_u (local.get $$x) (local.get $$y)))) + (func (export "no_dce.i64.rem_s") (param $$x i64) (param $$y i64) + (drop (i64.rem_s (local.get $$x) (local.get $$y)))) + (func (export "no_dce.i64.rem_u") (param $$x i64) (param $$y i64) + (drop (i64.rem_u (local.get $$x) (local.get $$y)))) +)`); + +// ./test/core/traps.wast:34 +assert_trap(() => invoke($1, `no_dce.i32.rem_s`, [1, 0]), `integer divide by zero`); + +// ./test/core/traps.wast:35 +assert_trap(() => invoke($1, `no_dce.i32.rem_u`, [1, 0]), `integer divide by zero`); + +// ./test/core/traps.wast:36 +assert_trap(() => invoke($1, `no_dce.i64.rem_s`, [1n, 0n]), `integer divide by zero`); + +// ./test/core/traps.wast:37 +assert_trap(() => invoke($1, `no_dce.i64.rem_u`, [1n, 0n]), `integer divide by zero`); + +// ./test/core/traps.wast:39 +let $2 = instantiate(`(module + (func (export "no_dce.i32.trunc_f32_s") (param $$x f32) (drop (i32.trunc_f32_s (local.get $$x)))) + (func (export "no_dce.i32.trunc_f32_u") (param $$x f32) (drop (i32.trunc_f32_u (local.get $$x)))) + (func (export "no_dce.i32.trunc_f64_s") (param $$x f64) (drop (i32.trunc_f64_s (local.get $$x)))) + (func (export "no_dce.i32.trunc_f64_u") (param $$x f64) (drop (i32.trunc_f64_u (local.get $$x)))) + (func (export "no_dce.i64.trunc_f32_s") (param $$x f32) (drop (i64.trunc_f32_s (local.get $$x)))) + (func (export "no_dce.i64.trunc_f32_u") (param $$x f32) (drop (i64.trunc_f32_u (local.get $$x)))) + (func (export "no_dce.i64.trunc_f64_s") (param $$x f64) (drop (i64.trunc_f64_s (local.get $$x)))) + (func (export "no_dce.i64.trunc_f64_u") (param $$x f64) (drop (i64.trunc_f64_u (local.get $$x)))) +)`); + +// ./test/core/traps.wast:50 +assert_trap( + () => invoke($2, `no_dce.i32.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + `invalid conversion to integer`, +); + +// ./test/core/traps.wast:51 +assert_trap( + () => invoke($2, `no_dce.i32.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + `invalid conversion to integer`, +); + +// ./test/core/traps.wast:52 +assert_trap( + () => invoke($2, `no_dce.i32.trunc_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/traps.wast:53 +assert_trap( + () => invoke($2, `no_dce.i32.trunc_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/traps.wast:54 +assert_trap( + () => invoke($2, `no_dce.i64.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + `invalid conversion to integer`, +); + +// ./test/core/traps.wast:55 +assert_trap( + () => invoke($2, `no_dce.i64.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), + `invalid conversion to integer`, +); + +// ./test/core/traps.wast:56 +assert_trap( + () => invoke($2, `no_dce.i64.trunc_f64_s`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/traps.wast:57 +assert_trap( + () => invoke($2, `no_dce.i64.trunc_f64_u`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + ]), + `invalid conversion to integer`, +); + +// ./test/core/traps.wast:59 +let $3 = instantiate(`(module + (memory 1) + + (func (export "no_dce.i32.load") (param $$i i32) (drop (i32.load (local.get $$i)))) + (func (export "no_dce.i32.load16_s") (param $$i i32) (drop (i32.load16_s (local.get $$i)))) + (func (export "no_dce.i32.load16_u") (param $$i i32) (drop (i32.load16_u (local.get $$i)))) + (func (export "no_dce.i32.load8_s") (param $$i i32) (drop (i32.load8_s (local.get $$i)))) + (func (export "no_dce.i32.load8_u") (param $$i i32) (drop (i32.load8_u (local.get $$i)))) + (func (export "no_dce.i64.load") (param $$i i32) (drop (i64.load (local.get $$i)))) + (func (export "no_dce.i64.load32_s") (param $$i i32) (drop (i64.load32_s (local.get $$i)))) + (func (export "no_dce.i64.load32_u") (param $$i i32) (drop (i64.load32_u (local.get $$i)))) + (func (export "no_dce.i64.load16_s") (param $$i i32) (drop (i64.load16_s (local.get $$i)))) + (func (export "no_dce.i64.load16_u") (param $$i i32) (drop (i64.load16_u (local.get $$i)))) + (func (export "no_dce.i64.load8_s") (param $$i i32) (drop (i64.load8_s (local.get $$i)))) + (func (export "no_dce.i64.load8_u") (param $$i i32) (drop (i64.load8_u (local.get $$i)))) + (func (export "no_dce.f32.load") (param $$i i32) (drop (f32.load (local.get $$i)))) + (func (export "no_dce.f64.load") (param $$i i32) (drop (f64.load (local.get $$i)))) +)`); + +// ./test/core/traps.wast:78 +assert_trap(() => invoke($3, `no_dce.i32.load`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:79 +assert_trap(() => invoke($3, `no_dce.i32.load16_s`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:80 +assert_trap(() => invoke($3, `no_dce.i32.load16_u`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:81 +assert_trap(() => invoke($3, `no_dce.i32.load8_s`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:82 +assert_trap(() => invoke($3, `no_dce.i32.load8_u`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:83 +assert_trap(() => invoke($3, `no_dce.i64.load`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:84 +assert_trap(() => invoke($3, `no_dce.i64.load32_s`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:85 +assert_trap(() => invoke($3, `no_dce.i64.load32_u`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:86 +assert_trap(() => invoke($3, `no_dce.i64.load16_s`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:87 +assert_trap(() => invoke($3, `no_dce.i64.load16_u`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:88 +assert_trap(() => invoke($3, `no_dce.i64.load8_s`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:89 +assert_trap(() => invoke($3, `no_dce.i64.load8_u`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:90 +assert_trap(() => invoke($3, `no_dce.f32.load`, [65536]), `out of bounds memory access`); + +// ./test/core/traps.wast:91 +assert_trap(() => invoke($3, `no_dce.f64.load`, [65536]), `out of bounds memory access`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/type.wast.js b/js/src/jit-test/tests/wasm/spec/spec/type.wast.js new file mode 100644 index 0000000000..f4d3ede687 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/type.wast.js @@ -0,0 +1,66 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/type.wast + +// ./test/core/type.wast:3 +let $0 = instantiate(`(module + (type (func)) + (type $$t (func)) + + (type (func (param i32))) + (type (func (param $$x i32))) + (type (func (result i32))) + (type (func (param i32) (result i32))) + (type (func (param $$x i32) (result i32))) + + (type (func (param f32 f64))) + (type (func (result i64 f32))) + (type (func (param i32 i64) (result f32 f64))) + + (type (func (param f32) (param f64))) + (type (func (param $$x f32) (param f64))) + (type (func (param f32) (param $$y f64))) + (type (func (param $$x f32) (param $$y f64))) + (type (func (result i64) (result f32))) + (type (func (param i32) (param i64) (result f32) (result f64))) + (type (func (param $$x i32) (param $$y i64) (result f32) (result f64))) + + (type (func (param f32 f64) (param $$x i32) (param f64 i32 i32))) + (type (func (result i64 i64 f32) (result f32 i32))) + (type + (func (param i32 i32) (param i64 i32) (result f32 f64) (result f64 i32)) + ) + + (type (func (param) (param $$x f32) (param) (param) (param f64 i32) (param))) + (type + (func (result) (result) (result i64 i64) (result) (result f32) (result)) + ) + (type + (func + (param i32 i32) (param i64 i32) (param) (param $$x i32) (param) + (result) (result f32 f64) (result f64 i32) (result) + ) + ) +)`); + +// ./test/core/type.wast:43 +assert_malformed( + () => instantiate(`(type (func (result i32) (param i32))) `), + `unexpected token`, +); + +// ./test/core/type.wast:47 +assert_malformed(() => instantiate(`(type (func (result $$x i32))) `), `unexpected token`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/unreachable.wast.js b/js/src/jit-test/tests/wasm/spec/spec/unreachable.wast.js new file mode 100644 index 0000000000..70eafb7db3 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/unreachable.wast.js @@ -0,0 +1,424 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/unreachable.wast + +// ./test/core/unreachable.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definitions + (func $$dummy) + (func $$dummy3 (param i32 i32 i32)) + + (func (export "type-i32") (result i32) (unreachable)) + (func (export "type-i64") (result i32) (unreachable)) + (func (export "type-f32") (result f64) (unreachable)) + (func (export "type-f64") (result f64) (unreachable)) + + (func (export "as-func-first") (result i32) + (unreachable) (i32.const -1) + ) + (func (export "as-func-mid") (result i32) + (call $$dummy) (unreachable) (i32.const -1) + ) + (func (export "as-func-last") + (call $$dummy) (unreachable) + ) + (func (export "as-func-value") (result i32) + (call $$dummy) (unreachable) + ) + + (func (export "as-block-first") (result i32) + (block (result i32) (unreachable) (i32.const 2)) + ) + (func (export "as-block-mid") (result i32) + (block (result i32) (call $$dummy) (unreachable) (i32.const 2)) + ) + (func (export "as-block-last") + (block (nop) (call $$dummy) (unreachable)) + ) + (func (export "as-block-value") (result i32) + (block (result i32) (nop) (call $$dummy) (unreachable)) + ) + (func (export "as-block-broke") (result i32) + (block (result i32) (call $$dummy) (br 0 (i32.const 1)) (unreachable)) + ) + + (func (export "as-loop-first") (result i32) + (loop (result i32) (unreachable) (i32.const 2)) + ) + (func (export "as-loop-mid") (result i32) + (loop (result i32) (call $$dummy) (unreachable) (i32.const 2)) + ) + (func (export "as-loop-last") + (loop (nop) (call $$dummy) (unreachable)) + ) + (func (export "as-loop-broke") (result i32) + (block (result i32) + (loop (result i32) (call $$dummy) (br 1 (i32.const 1)) (unreachable)) + ) + ) + + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (unreachable))) + ) + + (func (export "as-br_if-cond") + (block (br_if 0 (unreachable))) + ) + (func (export "as-br_if-value") (result i32) + (block (result i32) + (drop (br_if 0 (unreachable) (i32.const 1))) (i32.const 7) + ) + ) + (func (export "as-br_if-value-cond") (result i32) + (block (result i32) + (drop (br_if 0 (i32.const 6) (unreachable))) (i32.const 7) + ) + ) + + (func (export "as-br_table-index") + (block (br_table 0 0 0 (unreachable))) + ) + (func (export "as-br_table-value") (result i32) + (block (result i32) + (br_table 0 0 0 (unreachable) (i32.const 1)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-2") (result i32) + (block (result i32) + (block (result i32) (br_table 0 1 (unreachable) (i32.const 1))) + ) + ) + (func (export "as-br_table-value-index") (result i32) + (block (result i32) + (br_table 0 0 (i32.const 6) (unreachable)) (i32.const 7) + ) + ) + (func (export "as-br_table-value-and-index") (result i32) + (block (result i32) (br_table 0 0 (unreachable)) (i32.const 8)) + ) + + (func (export "as-return-value") (result i64) + (return (unreachable)) + ) + + (func (export "as-if-cond") (result i32) + (if (result i32) (unreachable) (then (i32.const 0)) (else (i32.const 1))) + ) + (func (export "as-if-then") (param i32 i32) (result i32) + (if (result i32) (local.get 0) (then (unreachable)) (else (local.get 1))) + ) + (func (export "as-if-else") (param i32 i32) (result i32) + (if (result i32) (local.get 0) (then (local.get 1)) (else (unreachable))) + ) + (func (export "as-if-then-no-else") (param i32 i32) (result i32) + (if (local.get 0) (then (unreachable))) (local.get 1) + ) + + (func (export "as-select-first") (param i32 i32) (result i32) + (select (unreachable) (local.get 0) (local.get 1)) + ) + (func (export "as-select-second") (param i32 i32) (result i32) + (select (local.get 0) (unreachable) (local.get 1)) + ) + (func (export "as-select-cond") (result i32) + (select (i32.const 0) (i32.const 1) (unreachable)) + ) + + (func (export "as-call-first") + (call $$dummy3 (unreachable) (i32.const 2) (i32.const 3)) + ) + (func (export "as-call-mid") + (call $$dummy3 (i32.const 1) (unreachable) (i32.const 3)) + ) + (func (export "as-call-last") + (call $$dummy3 (i32.const 1) (i32.const 2) (unreachable)) + ) + + (type $$sig (func (param i32 i32 i32))) + (table funcref (elem $$dummy3)) + (func (export "as-call_indirect-func") + (call_indirect (type $$sig) + (unreachable) (i32.const 1) (i32.const 2) (i32.const 3) + ) + ) + (func (export "as-call_indirect-first") + (call_indirect (type $$sig) + (i32.const 0) (unreachable) (i32.const 2) (i32.const 3) + ) + ) + (func (export "as-call_indirect-mid") + (call_indirect (type $$sig) + (i32.const 0) (i32.const 1) (unreachable) (i32.const 3) + ) + ) + (func (export "as-call_indirect-last") + (call_indirect (type $$sig) + (i32.const 0) (i32.const 1) (i32.const 2) (unreachable) + ) + ) + + (func (export "as-local.set-value") (local f32) + (local.set 0 (unreachable)) + ) + (func (export "as-local.tee-value") (result f32) (local f32) + (local.tee 0 (unreachable)) + ) + (global $$a (mut f32) (f32.const 0)) + (func (export "as-global.set-value") (result f32) + (global.set $$a (unreachable)) + ) + + (memory 1) + (func (export "as-load-address") (result f32) + (f32.load (unreachable)) + ) + (func (export "as-loadN-address") (result i64) + (i64.load8_s (unreachable)) + ) + + (func (export "as-store-address") + (f64.store (unreachable) (f64.const 7)) + ) + (func (export "as-store-value") + (i64.store (i32.const 2) (unreachable)) + ) + + (func (export "as-storeN-address") + (i32.store8 (unreachable) (i32.const 7)) + ) + (func (export "as-storeN-value") + (i64.store16 (i32.const 2) (unreachable)) + ) + + (func (export "as-unary-operand") (result f32) + (f32.neg (unreachable)) + ) + + (func (export "as-binary-left") (result i32) + (i32.add (unreachable) (i32.const 10)) + ) + (func (export "as-binary-right") (result i64) + (i64.sub (i64.const 10) (unreachable)) + ) + + (func (export "as-test-operand") (result i32) + (i32.eqz (unreachable)) + ) + + (func (export "as-compare-left") (result i32) + (f64.le (unreachable) (f64.const 10)) + ) + (func (export "as-compare-right") (result i32) + (f32.ne (f32.const 10) (unreachable)) + ) + + (func (export "as-convert-operand") (result i32) + (i32.wrap_i64 (unreachable)) + ) + + (func (export "as-memory.grow-size") (result i32) + (memory.grow (unreachable)) + ) +)`); + +// ./test/core/unreachable.wast:221 +assert_trap(() => invoke($0, `type-i32`, []), `unreachable`); + +// ./test/core/unreachable.wast:222 +assert_trap(() => invoke($0, `type-i64`, []), `unreachable`); + +// ./test/core/unreachable.wast:223 +assert_trap(() => invoke($0, `type-f32`, []), `unreachable`); + +// ./test/core/unreachable.wast:224 +assert_trap(() => invoke($0, `type-f64`, []), `unreachable`); + +// ./test/core/unreachable.wast:226 +assert_trap(() => invoke($0, `as-func-first`, []), `unreachable`); + +// ./test/core/unreachable.wast:227 +assert_trap(() => invoke($0, `as-func-mid`, []), `unreachable`); + +// ./test/core/unreachable.wast:228 +assert_trap(() => invoke($0, `as-func-last`, []), `unreachable`); + +// ./test/core/unreachable.wast:229 +assert_trap(() => invoke($0, `as-func-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:231 +assert_trap(() => invoke($0, `as-block-first`, []), `unreachable`); + +// ./test/core/unreachable.wast:232 +assert_trap(() => invoke($0, `as-block-mid`, []), `unreachable`); + +// ./test/core/unreachable.wast:233 +assert_trap(() => invoke($0, `as-block-last`, []), `unreachable`); + +// ./test/core/unreachable.wast:234 +assert_trap(() => invoke($0, `as-block-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:235 +assert_return(() => invoke($0, `as-block-broke`, []), [value("i32", 1)]); + +// ./test/core/unreachable.wast:237 +assert_trap(() => invoke($0, `as-loop-first`, []), `unreachable`); + +// ./test/core/unreachable.wast:238 +assert_trap(() => invoke($0, `as-loop-mid`, []), `unreachable`); + +// ./test/core/unreachable.wast:239 +assert_trap(() => invoke($0, `as-loop-last`, []), `unreachable`); + +// ./test/core/unreachable.wast:240 +assert_return(() => invoke($0, `as-loop-broke`, []), [value("i32", 1)]); + +// ./test/core/unreachable.wast:242 +assert_trap(() => invoke($0, `as-br-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:244 +assert_trap(() => invoke($0, `as-br_if-cond`, []), `unreachable`); + +// ./test/core/unreachable.wast:245 +assert_trap(() => invoke($0, `as-br_if-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:246 +assert_trap(() => invoke($0, `as-br_if-value-cond`, []), `unreachable`); + +// ./test/core/unreachable.wast:248 +assert_trap(() => invoke($0, `as-br_table-index`, []), `unreachable`); + +// ./test/core/unreachable.wast:249 +assert_trap(() => invoke($0, `as-br_table-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:250 +assert_trap(() => invoke($0, `as-br_table-value-2`, []), `unreachable`); + +// ./test/core/unreachable.wast:251 +assert_trap(() => invoke($0, `as-br_table-value-index`, []), `unreachable`); + +// ./test/core/unreachable.wast:252 +assert_trap(() => invoke($0, `as-br_table-value-and-index`, []), `unreachable`); + +// ./test/core/unreachable.wast:254 +assert_trap(() => invoke($0, `as-return-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:256 +assert_trap(() => invoke($0, `as-if-cond`, []), `unreachable`); + +// ./test/core/unreachable.wast:257 +assert_trap(() => invoke($0, `as-if-then`, [1, 6]), `unreachable`); + +// ./test/core/unreachable.wast:258 +assert_return(() => invoke($0, `as-if-then`, [0, 6]), [value("i32", 6)]); + +// ./test/core/unreachable.wast:259 +assert_trap(() => invoke($0, `as-if-else`, [0, 6]), `unreachable`); + +// ./test/core/unreachable.wast:260 +assert_return(() => invoke($0, `as-if-else`, [1, 6]), [value("i32", 6)]); + +// ./test/core/unreachable.wast:261 +assert_trap(() => invoke($0, `as-if-then-no-else`, [1, 6]), `unreachable`); + +// ./test/core/unreachable.wast:262 +assert_return(() => invoke($0, `as-if-then-no-else`, [0, 6]), [value("i32", 6)]); + +// ./test/core/unreachable.wast:264 +assert_trap(() => invoke($0, `as-select-first`, [0, 6]), `unreachable`); + +// ./test/core/unreachable.wast:265 +assert_trap(() => invoke($0, `as-select-first`, [1, 6]), `unreachable`); + +// ./test/core/unreachable.wast:266 +assert_trap(() => invoke($0, `as-select-second`, [0, 6]), `unreachable`); + +// ./test/core/unreachable.wast:267 +assert_trap(() => invoke($0, `as-select-second`, [1, 6]), `unreachable`); + +// ./test/core/unreachable.wast:268 +assert_trap(() => invoke($0, `as-select-cond`, []), `unreachable`); + +// ./test/core/unreachable.wast:270 +assert_trap(() => invoke($0, `as-call-first`, []), `unreachable`); + +// ./test/core/unreachable.wast:271 +assert_trap(() => invoke($0, `as-call-mid`, []), `unreachable`); + +// ./test/core/unreachable.wast:272 +assert_trap(() => invoke($0, `as-call-last`, []), `unreachable`); + +// ./test/core/unreachable.wast:274 +assert_trap(() => invoke($0, `as-call_indirect-func`, []), `unreachable`); + +// ./test/core/unreachable.wast:275 +assert_trap(() => invoke($0, `as-call_indirect-first`, []), `unreachable`); + +// ./test/core/unreachable.wast:276 +assert_trap(() => invoke($0, `as-call_indirect-mid`, []), `unreachable`); + +// ./test/core/unreachable.wast:277 +assert_trap(() => invoke($0, `as-call_indirect-last`, []), `unreachable`); + +// ./test/core/unreachable.wast:279 +assert_trap(() => invoke($0, `as-local.set-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:280 +assert_trap(() => invoke($0, `as-local.tee-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:281 +assert_trap(() => invoke($0, `as-global.set-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:283 +assert_trap(() => invoke($0, `as-load-address`, []), `unreachable`); + +// ./test/core/unreachable.wast:284 +assert_trap(() => invoke($0, `as-loadN-address`, []), `unreachable`); + +// ./test/core/unreachable.wast:286 +assert_trap(() => invoke($0, `as-store-address`, []), `unreachable`); + +// ./test/core/unreachable.wast:287 +assert_trap(() => invoke($0, `as-store-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:288 +assert_trap(() => invoke($0, `as-storeN-address`, []), `unreachable`); + +// ./test/core/unreachable.wast:289 +assert_trap(() => invoke($0, `as-storeN-value`, []), `unreachable`); + +// ./test/core/unreachable.wast:291 +assert_trap(() => invoke($0, `as-unary-operand`, []), `unreachable`); + +// ./test/core/unreachable.wast:293 +assert_trap(() => invoke($0, `as-binary-left`, []), `unreachable`); + +// ./test/core/unreachable.wast:294 +assert_trap(() => invoke($0, `as-binary-right`, []), `unreachable`); + +// ./test/core/unreachable.wast:296 +assert_trap(() => invoke($0, `as-test-operand`, []), `unreachable`); + +// ./test/core/unreachable.wast:298 +assert_trap(() => invoke($0, `as-compare-left`, []), `unreachable`); + +// ./test/core/unreachable.wast:299 +assert_trap(() => invoke($0, `as-compare-right`, []), `unreachable`); + +// ./test/core/unreachable.wast:301 +assert_trap(() => invoke($0, `as-convert-operand`, []), `unreachable`); + +// ./test/core/unreachable.wast:303 +assert_trap(() => invoke($0, `as-memory.grow-size`, []), `unreachable`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/unreached-valid.wast.js b/js/src/jit-test/tests/wasm/spec/spec/unreached-valid.wast.js new file mode 100644 index 0000000000..aece5191dc --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/unreached-valid.wast.js @@ -0,0 +1,88 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/unreached-valid.wast + +// ./test/core/unreached-valid.wast:1 +let $0 = instantiate(`(module + + ;; Check that both sides of the select are evaluated + (func (export "select-trap-left") (param $$cond i32) (result i32) + (select (unreachable) (i32.const 0) (local.get $$cond)) + ) + (func (export "select-trap-right") (param $$cond i32) (result i32) + (select (i32.const 0) (unreachable) (local.get $$cond)) + ) + + (func (export "select-unreached") + (unreachable) (select) + (unreachable) (i32.const 0) (select) + (unreachable) (i32.const 0) (i32.const 0) (select) + (unreachable) (i32.const 0) (i32.const 0) (i32.const 0) (select) + (unreachable) (f32.const 0) (i32.const 0) (select) + (unreachable) + ) + + (func (export "select_unreached_result_1") (result i32) + (unreachable) (i32.add (select)) + ) + + (func (export "select_unreached_result_2") (result i64) + (unreachable) (i64.add (select (i64.const 0) (i32.const 0))) + ) + + (func (export "unreachable-num") + (unreachable) + (select) + (i32.eqz) + (drop) + ) + (func (export "unreachable-ref") + (unreachable) + (select) + (ref.is_null) + (drop) + ) +)`); + +// ./test/core/unreached-valid.wast:42 +assert_trap(() => invoke($0, `select-trap-left`, [1]), `unreachable`); + +// ./test/core/unreached-valid.wast:43 +assert_trap(() => invoke($0, `select-trap-left`, [0]), `unreachable`); + +// ./test/core/unreached-valid.wast:44 +assert_trap(() => invoke($0, `select-trap-right`, [1]), `unreachable`); + +// ./test/core/unreached-valid.wast:45 +assert_trap(() => invoke($0, `select-trap-right`, [0]), `unreachable`); + +// ./test/core/unreached-valid.wast:49 +let $1 = instantiate(`(module + (func (export "meet-bottom") + (block (result f64) + (block (result f32) + (unreachable) + (br_table 0 1 1 (i32.const 1)) + ) + (drop) + (f64.const 0) + ) + (drop) + ) +)`); + +// ./test/core/unreached-valid.wast:63 +assert_trap(() => invoke($1, `meet-bottom`, []), `unreachable`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/unwind.wast.js b/js/src/jit-test/tests/wasm/spec/spec/unwind.wast.js new file mode 100644 index 0000000000..5567d3473d --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/unwind.wast.js @@ -0,0 +1,373 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/unwind.wast + +// ./test/core/unwind.wast:3 +let $0 = instantiate(`(module + (func (export "func-unwind-by-unreachable") + (i32.const 3) (i64.const 1) (unreachable) + ) + (func (export "func-unwind-by-br") + (i32.const 3) (i64.const 1) (br 0) + ) + (func (export "func-unwind-by-br-value") (result i32) + (i32.const 3) (i64.const 1) (br 0 (i32.const 9)) + ) + (func (export "func-unwind-by-br_if") + (i32.const 3) (i64.const 1) (drop (drop (br_if 0 (i32.const 1)))) + ) + (func (export "func-unwind-by-br_if-value") (result i32) + (i32.const 3) (i64.const 1) (drop (drop (br_if 0 (i32.const 9) (i32.const 1)))) + ) + (func (export "func-unwind-by-br_table") + (i32.const 3) (i64.const 1) (br_table 0 (i32.const 0)) + ) + (func (export "func-unwind-by-br_table-value") (result i32) + (i32.const 3) (i64.const 1) (br_table 0 (i32.const 9) (i32.const 0)) + ) + (func (export "func-unwind-by-return") (result i32) + (i32.const 3) (i64.const 1) (return (i32.const 9)) + ) + + (func (export "block-unwind-by-unreachable") + (block (i32.const 3) (i64.const 1) (unreachable)) + ) + (func (export "block-unwind-by-br") (result i32) + (block (i32.const 3) (i64.const 1) (br 0)) (i32.const 9) + ) + (func (export "block-unwind-by-br-value") (result i32) + (block (result i32) (i32.const 3) (i64.const 1) (br 0 (i32.const 9))) + ) + (func (export "block-unwind-by-br_if") (result i32) + (block (i32.const 3) (i64.const 1) (drop (drop (br_if 0 (i32.const 1))))) (i32.const 9) + ) + (func (export "block-unwind-by-br_if-value") (result i32) + (block (result i32) + (i32.const 3) (i64.const 1) (drop (drop (br_if 0 (i32.const 9) (i32.const 1)))) + ) + ) + (func (export "block-unwind-by-br_table") (result i32) + (block (i32.const 3) (i64.const 1) (br_table 0 (i32.const 0))) (i32.const 9) + ) + (func (export "block-unwind-by-br_table-value") (result i32) + (block (result i32) + (i32.const 3) (i64.const 1) (br_table 0 (i32.const 9) (i32.const 0)) + ) + ) + (func (export "block-unwind-by-return") (result i32) + (block (result i32) (i32.const 3) (i64.const 1) (return (i32.const 9))) + ) + + (func (export "block-nested-unwind-by-unreachable") (result i32) + (block (result i32) (i32.const 3) (block (i64.const 1) (unreachable))) + ) + (func (export "block-nested-unwind-by-br") (result i32) + (block (i32.const 3) (block (i64.const 1) (br 1)) (drop)) (i32.const 9) + ) + (func (export "block-nested-unwind-by-br-value") (result i32) + (block (result i32) + (i32.const 3) (block (i64.const 1) (br 1 (i32.const 9))) + ) + ) + (func (export "block-nested-unwind-by-br_if") (result i32) + (block (i32.const 3) (block (i64.const 1) (drop (br_if 1 (i32.const 1)))) (drop)) (i32.const 9) + ) + (func (export "block-nested-unwind-by-br_if-value") (result i32) + (block (result i32) + (i32.const 3) (block (i64.const 1) (drop (drop (br_if 1 (i32.const 9) (i32.const 1))))) + ) + ) + (func (export "block-nested-unwind-by-br_table") (result i32) + (block + (i32.const 3) (block (i64.const 1) (br_table 1 (i32.const 1))) + (drop) + ) + (i32.const 9) + ) + (func (export "block-nested-unwind-by-br_table-value") (result i32) + (block (result i32) + (i32.const 3) + (block (i64.const 1) (br_table 1 (i32.const 9) (i32.const 1))) + ) + ) + (func (export "block-nested-unwind-by-return") (result i32) + (block (result i32) + (i32.const 3) (block (i64.const 1) (return (i32.const 9))) + ) + ) + + (func (export "unary-after-unreachable") (result i32) + (f32.const 0) (unreachable) (i64.eqz) + ) + (func (export "unary-after-br") (result i32) + (block (result i32) (f32.const 0) (br 0 (i32.const 9)) (i64.eqz)) + ) + (func (export "unary-after-br_if") (result i32) + (block (result i32) + (i64.const 0) (drop (br_if 0 (i32.const 9) (i32.const 1))) (i64.eqz) + ) + ) + (func (export "unary-after-br_table") (result i32) + (block (result i32) + (f32.const 0) (br_table 0 0 (i32.const 9) (i32.const 0)) (i64.eqz) + ) + ) + (func (export "unary-after-return") (result i32) + (f32.const 0) (return (i32.const 9)) (i64.eqz) + ) + + (func (export "binary-after-unreachable") (result i32) + (f32.const 0) (f64.const 1) (unreachable) (i64.eq) + ) + (func (export "binary-after-br") (result i32) + (block (result i32) + (f32.const 0) (f64.const 1) (br 0 (i32.const 9)) (i64.eq) + ) + ) + (func (export "binary-after-br_if") (result i32) + (block (result i32) + (i64.const 0) (i64.const 1) (drop (br_if 0 (i32.const 9) (i32.const 1))) + (i64.eq) + ) + ) + (func (export "binary-after-br_table") (result i32) + (block (result i32) + (f32.const 0) (f64.const 1) (br_table 0 (i32.const 9) (i32.const 0)) + (i64.eq) + ) + ) + (func (export "binary-after-return") (result i32) + (f32.const 0) (f64.const 1) (return (i32.const 9)) (i64.eq) + ) + + (func (export "select-after-unreachable") (result i32) + (f32.const 0) (f64.const 1) (i64.const 0) (unreachable) (select) + ) + (func (export "select-after-br") (result i32) + (block (result i32) + (f32.const 0) (f64.const 1) (i64.const 0) (br 0 (i32.const 9)) (select) + ) + ) + (func (export "select-after-br_if") (result i32) + (block (result i32) + (i32.const 0) (i32.const 1) (i32.const 0) + (drop (br_if 0 (i32.const 9) (i32.const 1))) + (select) + ) + ) + (func (export "select-after-br_table") (result i32) + (block (result i32) + (f32.const 0) (f64.const 1) (i64.const 0) + (br_table 0 (i32.const 9) (i32.const 0)) + (select) + ) + ) + (func (export "select-after-return") (result i32) + (f32.const 0) (f64.const 1) (i64.const 1) (return (i32.const 9)) (select) + ) + + (func (export "block-value-after-unreachable") (result i32) + (block (result i32) (f32.const 0) (unreachable)) + ) + (func (export "block-value-after-br") (result i32) + (block (result i32) (f32.const 0) (br 0 (i32.const 9))) + ) + (func (export "block-value-after-br_if") (result i32) + (block (result i32) + (i32.const 0) (drop (br_if 0 (i32.const 9) (i32.const 1))) + ) + ) + (func (export "block-value-after-br_table") (result i32) + (block (result i32) + (f32.const 0) (br_table 0 0 (i32.const 9) (i32.const 0)) + ) + ) + (func (export "block-value-after-return") (result i32) + (block (result i32) (f32.const 0) (return (i32.const 9))) + ) + + (func (export "loop-value-after-unreachable") (result i32) + (loop (result i32) (f32.const 0) (unreachable)) + ) + (func (export "loop-value-after-br") (result i32) + (block (result i32) (loop (result i32) (f32.const 0) (br 1 (i32.const 9)))) + ) + (func (export "loop-value-after-br_if") (result i32) + (block (result i32) + (loop (result i32) + (i32.const 0) (drop (br_if 1 (i32.const 9) (i32.const 1))) + ) + ) + ) + + (func (export "loop-value-after-br_table") (result i32) + (block (result i32) + (loop (result i32) + (f32.const 0) (br_table 1 1 (i32.const 9) (i32.const 0)) + ) + ) + ) + (func (export "loop-value-after-return") (result i32) + (loop (result i32) (f32.const 0) (return (i32.const 9))) + ) +)`); + +// ./test/core/unwind.wast:212 +assert_trap(() => invoke($0, `func-unwind-by-unreachable`, []), `unreachable`); + +// ./test/core/unwind.wast:213 +assert_return(() => invoke($0, `func-unwind-by-br`, []), []); + +// ./test/core/unwind.wast:214 +assert_return(() => invoke($0, `func-unwind-by-br-value`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:215 +assert_return(() => invoke($0, `func-unwind-by-br_if`, []), []); + +// ./test/core/unwind.wast:216 +assert_return(() => invoke($0, `func-unwind-by-br_if-value`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:217 +assert_return(() => invoke($0, `func-unwind-by-br_table`, []), []); + +// ./test/core/unwind.wast:218 +assert_return(() => invoke($0, `func-unwind-by-br_table-value`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:219 +assert_return(() => invoke($0, `func-unwind-by-return`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:221 +assert_trap(() => invoke($0, `block-unwind-by-unreachable`, []), `unreachable`); + +// ./test/core/unwind.wast:222 +assert_return(() => invoke($0, `block-unwind-by-br`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:223 +assert_return(() => invoke($0, `block-unwind-by-br-value`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:224 +assert_return(() => invoke($0, `block-unwind-by-br_if`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:225 +assert_return(() => invoke($0, `block-unwind-by-br_if-value`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:226 +assert_return(() => invoke($0, `block-unwind-by-br_table`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:227 +assert_return(() => invoke($0, `block-unwind-by-br_table-value`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:228 +assert_return(() => invoke($0, `block-unwind-by-return`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:230 +assert_trap(() => invoke($0, `block-nested-unwind-by-unreachable`, []), `unreachable`); + +// ./test/core/unwind.wast:231 +assert_return(() => invoke($0, `block-nested-unwind-by-br`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:232 +assert_return(() => invoke($0, `block-nested-unwind-by-br-value`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:233 +assert_return(() => invoke($0, `block-nested-unwind-by-br_if`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:234 +assert_return(() => invoke($0, `block-nested-unwind-by-br_if-value`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:235 +assert_return(() => invoke($0, `block-nested-unwind-by-br_table`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:236 +assert_return(() => invoke($0, `block-nested-unwind-by-br_table-value`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:237 +assert_return(() => invoke($0, `block-nested-unwind-by-return`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:239 +assert_trap(() => invoke($0, `unary-after-unreachable`, []), `unreachable`); + +// ./test/core/unwind.wast:240 +assert_return(() => invoke($0, `unary-after-br`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:241 +assert_return(() => invoke($0, `unary-after-br_if`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:242 +assert_return(() => invoke($0, `unary-after-br_table`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:243 +assert_return(() => invoke($0, `unary-after-return`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:245 +assert_trap(() => invoke($0, `binary-after-unreachable`, []), `unreachable`); + +// ./test/core/unwind.wast:246 +assert_return(() => invoke($0, `binary-after-br`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:247 +assert_return(() => invoke($0, `binary-after-br_if`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:248 +assert_return(() => invoke($0, `binary-after-br_table`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:249 +assert_return(() => invoke($0, `binary-after-return`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:251 +assert_trap(() => invoke($0, `select-after-unreachable`, []), `unreachable`); + +// ./test/core/unwind.wast:252 +assert_return(() => invoke($0, `select-after-br`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:253 +assert_return(() => invoke($0, `select-after-br_if`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:254 +assert_return(() => invoke($0, `select-after-br_table`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:255 +assert_return(() => invoke($0, `select-after-return`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:257 +assert_trap(() => invoke($0, `block-value-after-unreachable`, []), `unreachable`); + +// ./test/core/unwind.wast:258 +assert_return(() => invoke($0, `block-value-after-br`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:259 +assert_return(() => invoke($0, `block-value-after-br_if`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:260 +assert_return(() => invoke($0, `block-value-after-br_table`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:261 +assert_return(() => invoke($0, `block-value-after-return`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:263 +assert_trap(() => invoke($0, `loop-value-after-unreachable`, []), `unreachable`); + +// ./test/core/unwind.wast:264 +assert_return(() => invoke($0, `loop-value-after-br`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:265 +assert_return(() => invoke($0, `loop-value-after-br_if`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:266 +assert_return(() => invoke($0, `loop-value-after-br_table`, []), [value("i32", 9)]); + +// ./test/core/unwind.wast:267 +assert_return(() => invoke($0, `loop-value-after-return`, []), [value("i32", 9)]); diff --git a/js/src/jit-test/tests/wasm/spec/spec/utf8-import-field.wast.js b/js/src/jit-test/tests/wasm/spec/spec/utf8-import-field.wast.js new file mode 100644 index 0000000000..658da5449f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/utf8-import-field.wast.js @@ -0,0 +1,2656 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/utf8-import-field.wast + +// ./test/core/utf8-import-field.wast:6 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\80" ;; "\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:21 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\8f" ;; "\\8f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:36 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\90" ;; "\\90" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:51 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\9f" ;; "\\9f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:66 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\a0" ;; "\\a0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:81 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\bf" ;; "\\bf" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:98 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\c2\\80\\80" ;; "\\c2\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:113 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\c2" ;; "\\c2" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:128 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\c2\\2e" ;; "\\c2." + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:145 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\c0\\80" ;; "\\c0\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:160 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\c0\\bf" ;; "\\c0\\bf" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:175 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\c1\\80" ;; "\\c1\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:190 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\c1\\bf" ;; "\\c1\\bf" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:205 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\c2\\00" ;; "\\c2\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:220 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\c2\\7f" ;; "\\c2\\7f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:235 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\c2\\c0" ;; "\\c2\\c0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:250 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\c2\\fd" ;; "\\c2\\fd" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:265 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\df\\00" ;; "\\df\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:280 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\df\\7f" ;; "\\df\\7f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:295 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\df\\c0" ;; "\\df\\c0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:310 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\df\\fd" ;; "\\df\\fd" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:327 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\e1\\80\\80\\80" ;; "\\e1\\80\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:342 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\e1\\80" ;; "\\e1\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:357 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e1\\80\\2e" ;; "\\e1\\80." + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:372 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\e1" ;; "\\e1" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:387 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\e1\\2e" ;; "\\e1." + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:404 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e0\\00\\a0" ;; "\\e0\\00\\a0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:419 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e0\\7f\\a0" ;; "\\e0\\7f\\a0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:434 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e0\\80\\80" ;; "\\e0\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:449 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e0\\80\\a0" ;; "\\e0\\80\\a0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:464 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e0\\9f\\a0" ;; "\\e0\\9f\\a0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:479 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e0\\9f\\bf" ;; "\\e0\\9f\\bf" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:494 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e0\\c0\\a0" ;; "\\e0\\c0\\a0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:509 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e0\\fd\\a0" ;; "\\e0\\fd\\a0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:524 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e1\\00\\80" ;; "\\e1\\00\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:539 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e1\\7f\\80" ;; "\\e1\\7f\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:554 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e1\\c0\\80" ;; "\\e1\\c0\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:569 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e1\\fd\\80" ;; "\\e1\\fd\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:584 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ec\\00\\80" ;; "\\ec\\00\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:599 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ec\\7f\\80" ;; "\\ec\\7f\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:614 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ec\\c0\\80" ;; "\\ec\\c0\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:629 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ec\\fd\\80" ;; "\\ec\\fd\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:644 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ed\\00\\80" ;; "\\ed\\00\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:659 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ed\\7f\\80" ;; "\\ed\\7f\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:674 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ed\\a0\\80" ;; "\\ed\\a0\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:689 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ed\\a0\\bf" ;; "\\ed\\a0\\bf" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:704 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ed\\bf\\80" ;; "\\ed\\bf\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:719 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ed\\bf\\bf" ;; "\\ed\\bf\\bf" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:734 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ed\\c0\\80" ;; "\\ed\\c0\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:749 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ed\\fd\\80" ;; "\\ed\\fd\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:764 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ee\\00\\80" ;; "\\ee\\00\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:779 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ee\\7f\\80" ;; "\\ee\\7f\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:794 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ee\\c0\\80" ;; "\\ee\\c0\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:809 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ee\\fd\\80" ;; "\\ee\\fd\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:824 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ef\\00\\80" ;; "\\ef\\00\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:839 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ef\\7f\\80" ;; "\\ef\\7f\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:854 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ef\\c0\\80" ;; "\\ef\\c0\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:869 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ef\\fd\\80" ;; "\\ef\\fd\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:886 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e0\\a0\\00" ;; "\\e0\\a0\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:901 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e0\\a0\\7f" ;; "\\e0\\a0\\7f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:916 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e0\\a0\\c0" ;; "\\e0\\a0\\c0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:931 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e0\\a0\\fd" ;; "\\e0\\a0\\fd" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:946 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e1\\80\\00" ;; "\\e1\\80\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:961 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e1\\80\\7f" ;; "\\e1\\80\\7f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:976 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e1\\80\\c0" ;; "\\e1\\80\\c0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:991 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\e1\\80\\fd" ;; "\\e1\\80\\fd" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1006 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ec\\80\\00" ;; "\\ec\\80\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1021 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ec\\80\\7f" ;; "\\ec\\80\\7f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1036 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ec\\80\\c0" ;; "\\ec\\80\\c0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1051 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ec\\80\\fd" ;; "\\ec\\80\\fd" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1066 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ed\\80\\00" ;; "\\ed\\80\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1081 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ed\\80\\7f" ;; "\\ed\\80\\7f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1096 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ed\\80\\c0" ;; "\\ed\\80\\c0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1111 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ed\\80\\fd" ;; "\\ed\\80\\fd" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1126 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ee\\80\\00" ;; "\\ee\\80\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1141 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ee\\80\\7f" ;; "\\ee\\80\\7f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1156 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ee\\80\\c0" ;; "\\ee\\80\\c0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1171 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ee\\80\\fd" ;; "\\ee\\80\\fd" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1186 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ef\\80\\00" ;; "\\ef\\80\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1201 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ef\\80\\7f" ;; "\\ef\\80\\7f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1216 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ef\\80\\c0" ;; "\\ef\\80\\c0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1231 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\ef\\80\\fd" ;; "\\ef\\80\\fd" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1248 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0f" ;; import section + "\\01" ;; length 1 + "\\05\\f1\\80\\80\\80\\80" ;; "\\f1\\80\\80\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1263 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\f1\\80\\80" ;; "\\f1\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1278 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\80\\80\\23" ;; "\\f1\\80\\80#" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1293 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\f1\\80" ;; "\\f1\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1308 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\f1\\80\\23" ;; "\\f1\\80#" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1323 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\f1" ;; "\\f1" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1338 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\f1\\23" ;; "\\f1#" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1355 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\00\\90\\90" ;; "\\f0\\00\\90\\90" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1370 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\7f\\90\\90" ;; "\\f0\\7f\\90\\90" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1385 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\80\\80\\80" ;; "\\f0\\80\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1400 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\80\\90\\90" ;; "\\f0\\80\\90\\90" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1415 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\8f\\90\\90" ;; "\\f0\\8f\\90\\90" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1430 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\8f\\bf\\bf" ;; "\\f0\\8f\\bf\\bf" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1445 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\c0\\90\\90" ;; "\\f0\\c0\\90\\90" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1460 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\fd\\90\\90" ;; "\\f0\\fd\\90\\90" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1475 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\00\\80\\80" ;; "\\f1\\00\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1490 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\7f\\80\\80" ;; "\\f1\\7f\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1505 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\c0\\80\\80" ;; "\\f1\\c0\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1520 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\fd\\80\\80" ;; "\\f1\\fd\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1535 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f3\\00\\80\\80" ;; "\\f3\\00\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1550 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f3\\7f\\80\\80" ;; "\\f3\\7f\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1565 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f3\\c0\\80\\80" ;; "\\f3\\c0\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1580 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f3\\fd\\80\\80" ;; "\\f3\\fd\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1595 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\00\\80\\80" ;; "\\f4\\00\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1610 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\7f\\80\\80" ;; "\\f4\\7f\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1625 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\90\\80\\80" ;; "\\f4\\90\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1640 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\bf\\80\\80" ;; "\\f4\\bf\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1655 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\c0\\80\\80" ;; "\\f4\\c0\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1670 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\fd\\80\\80" ;; "\\f4\\fd\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1685 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f5\\80\\80\\80" ;; "\\f5\\80\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1700 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f7\\80\\80\\80" ;; "\\f7\\80\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1715 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f7\\bf\\bf\\bf" ;; "\\f7\\bf\\bf\\bf" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1732 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\90\\00\\90" ;; "\\f0\\90\\00\\90" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1747 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\90\\7f\\90" ;; "\\f0\\90\\7f\\90" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1762 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\90\\c0\\90" ;; "\\f0\\90\\c0\\90" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1777 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\90\\fd\\90" ;; "\\f0\\90\\fd\\90" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1792 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\80\\00\\80" ;; "\\f1\\80\\00\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1807 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\80\\7f\\80" ;; "\\f1\\80\\7f\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1822 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\80\\c0\\80" ;; "\\f1\\80\\c0\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1837 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\80\\fd\\80" ;; "\\f1\\80\\fd\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1852 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f3\\80\\00\\80" ;; "\\f3\\80\\00\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1867 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f3\\80\\7f\\80" ;; "\\f3\\80\\7f\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1882 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f3\\80\\c0\\80" ;; "\\f3\\80\\c0\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1897 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f3\\80\\fd\\80" ;; "\\f3\\80\\fd\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1912 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\80\\00\\80" ;; "\\f4\\80\\00\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1927 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\80\\7f\\80" ;; "\\f4\\80\\7f\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1942 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\80\\c0\\80" ;; "\\f4\\80\\c0\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1957 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\80\\fd\\80" ;; "\\f4\\80\\fd\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1974 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\90\\90\\00" ;; "\\f0\\90\\90\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:1989 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\90\\90\\7f" ;; "\\f0\\90\\90\\7f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2004 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\90\\90\\c0" ;; "\\f0\\90\\90\\c0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2019 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f0\\90\\90\\fd" ;; "\\f0\\90\\90\\fd" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2034 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\80\\80\\00" ;; "\\f1\\80\\80\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2049 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\80\\80\\7f" ;; "\\f1\\80\\80\\7f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2064 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\80\\80\\c0" ;; "\\f1\\80\\80\\c0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2079 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f1\\80\\80\\fd" ;; "\\f1\\80\\80\\fd" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2094 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f3\\80\\80\\00" ;; "\\f3\\80\\80\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2109 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f3\\80\\80\\7f" ;; "\\f3\\80\\80\\7f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2124 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f3\\80\\80\\c0" ;; "\\f3\\80\\80\\c0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2139 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f3\\80\\80\\fd" ;; "\\f3\\80\\80\\fd" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2154 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\80\\80\\00" ;; "\\f4\\80\\80\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2169 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\80\\80\\7f" ;; "\\f4\\80\\80\\7f" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2184 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\80\\80\\c0" ;; "\\f4\\80\\80\\c0" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2199 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f4\\80\\80\\fd" ;; "\\f4\\80\\80\\fd" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2216 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\10" ;; import section + "\\01" ;; length 1 + "\\06\\f8\\80\\80\\80\\80\\80" ;; "\\f8\\80\\80\\80\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2231 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f8\\80\\80\\80" ;; "\\f8\\80\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2246 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0f" ;; import section + "\\01" ;; length 1 + "\\05\\f8\\80\\80\\80\\23" ;; "\\f8\\80\\80\\80#" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2261 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\f8\\80\\80" ;; "\\f8\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2276 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\f8\\80\\80\\23" ;; "\\f8\\80\\80#" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2291 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\f8\\80" ;; "\\f8\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2306 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\f8\\80\\23" ;; "\\f8\\80#" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2321 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\f8" ;; "\\f8" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2336 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\f8\\23" ;; "\\f8#" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2353 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0f" ;; import section + "\\01" ;; length 1 + "\\05\\f8\\80\\80\\80\\80" ;; "\\f8\\80\\80\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2368 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0f" ;; import section + "\\01" ;; length 1 + "\\05\\fb\\bf\\bf\\bf\\bf" ;; "\\fb\\bf\\bf\\bf\\bf" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2385 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\11" ;; import section + "\\01" ;; length 1 + "\\07\\fc\\80\\80\\80\\80\\80\\80" ;; "\\fc\\80\\80\\80\\80\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2400 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0f" ;; import section + "\\01" ;; length 1 + "\\05\\fc\\80\\80\\80\\80" ;; "\\fc\\80\\80\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2415 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\10" ;; import section + "\\01" ;; length 1 + "\\06\\fc\\80\\80\\80\\80\\23" ;; "\\fc\\80\\80\\80\\80#" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2430 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\fc\\80\\80\\80" ;; "\\fc\\80\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2445 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0f" ;; import section + "\\01" ;; length 1 + "\\05\\fc\\80\\80\\80\\23" ;; "\\fc\\80\\80\\80#" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2460 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\fc\\80\\80" ;; "\\fc\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2475 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\fc\\80\\80\\23" ;; "\\fc\\80\\80#" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2490 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\fc\\80" ;; "\\fc\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2505 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\03\\fc\\80\\23" ;; "\\fc\\80#" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2520 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\fc" ;; "\\fc" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2535 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\fc\\23" ;; "\\fc#" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2552 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\10" ;; import section + "\\01" ;; length 1 + "\\06\\fc\\80\\80\\80\\80\\80" ;; "\\fc\\80\\80\\80\\80\\80" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2567 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\10" ;; import section + "\\01" ;; length 1 + "\\06\\fd\\bf\\bf\\bf\\bf\\bf" ;; "\\fd\\bf\\bf\\bf\\bf\\bf" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2584 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\fe" ;; "\\fe" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2599 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\01\\ff" ;; "\\ff" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2614 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\fe\\ff" ;; "\\fe\\ff" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2629 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\00\\00\\fe\\ff" ;; "\\00\\00\\fe\\ff" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2644 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\02\\ff\\fe" ;; "\\ff\\fe" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-field.wast:2659 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\ff\\fe\\00\\00" ;; "\\ff\\fe\\00\\00" + "\\04\\74\\65\\73\\74" ;; "test" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/utf8-import-module.wast.js b/js/src/jit-test/tests/wasm/spec/spec/utf8-import-module.wast.js new file mode 100644 index 0000000000..8175cd2d2f --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/utf8-import-module.wast.js @@ -0,0 +1,2656 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/utf8-import-module.wast + +// ./test/core/utf8-import-module.wast:6 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\80" ;; "\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:21 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\8f" ;; "\\8f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:36 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\90" ;; "\\90" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:51 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\9f" ;; "\\9f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:66 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\a0" ;; "\\a0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:81 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\bf" ;; "\\bf" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:98 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\c2\\80\\80" ;; "\\c2\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:113 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\c2" ;; "\\c2" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:128 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\c2\\2e" ;; "\\c2." + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:145 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\c0\\80" ;; "\\c0\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:160 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\c0\\bf" ;; "\\c0\\bf" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:175 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\c1\\80" ;; "\\c1\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:190 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\c1\\bf" ;; "\\c1\\bf" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:205 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\c2\\00" ;; "\\c2\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:220 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\c2\\7f" ;; "\\c2\\7f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:235 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\c2\\c0" ;; "\\c2\\c0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:250 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\c2\\fd" ;; "\\c2\\fd" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:265 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\df\\00" ;; "\\df\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:280 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\df\\7f" ;; "\\df\\7f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:295 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\df\\c0" ;; "\\df\\c0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:310 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\df\\fd" ;; "\\df\\fd" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:327 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\e1\\80\\80\\80" ;; "\\e1\\80\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:342 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\e1\\80" ;; "\\e1\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:357 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e1\\80\\2e" ;; "\\e1\\80." + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:372 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\e1" ;; "\\e1" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:387 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\e1\\2e" ;; "\\e1." + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:404 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e0\\00\\a0" ;; "\\e0\\00\\a0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:419 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e0\\7f\\a0" ;; "\\e0\\7f\\a0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:434 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e0\\80\\80" ;; "\\e0\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:449 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e0\\80\\a0" ;; "\\e0\\80\\a0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:464 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e0\\9f\\a0" ;; "\\e0\\9f\\a0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:479 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e0\\9f\\bf" ;; "\\e0\\9f\\bf" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:494 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e0\\c0\\a0" ;; "\\e0\\c0\\a0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:509 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e0\\fd\\a0" ;; "\\e0\\fd\\a0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:524 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e1\\00\\80" ;; "\\e1\\00\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:539 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e1\\7f\\80" ;; "\\e1\\7f\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:554 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e1\\c0\\80" ;; "\\e1\\c0\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:569 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e1\\fd\\80" ;; "\\e1\\fd\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:584 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ec\\00\\80" ;; "\\ec\\00\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:599 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ec\\7f\\80" ;; "\\ec\\7f\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:614 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ec\\c0\\80" ;; "\\ec\\c0\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:629 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ec\\fd\\80" ;; "\\ec\\fd\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:644 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ed\\00\\80" ;; "\\ed\\00\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:659 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ed\\7f\\80" ;; "\\ed\\7f\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:674 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ed\\a0\\80" ;; "\\ed\\a0\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:689 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ed\\a0\\bf" ;; "\\ed\\a0\\bf" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:704 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ed\\bf\\80" ;; "\\ed\\bf\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:719 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ed\\bf\\bf" ;; "\\ed\\bf\\bf" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:734 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ed\\c0\\80" ;; "\\ed\\c0\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:749 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ed\\fd\\80" ;; "\\ed\\fd\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:764 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ee\\00\\80" ;; "\\ee\\00\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:779 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ee\\7f\\80" ;; "\\ee\\7f\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:794 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ee\\c0\\80" ;; "\\ee\\c0\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:809 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ee\\fd\\80" ;; "\\ee\\fd\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:824 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ef\\00\\80" ;; "\\ef\\00\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:839 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ef\\7f\\80" ;; "\\ef\\7f\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:854 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ef\\c0\\80" ;; "\\ef\\c0\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:869 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ef\\fd\\80" ;; "\\ef\\fd\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:886 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e0\\a0\\00" ;; "\\e0\\a0\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:901 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e0\\a0\\7f" ;; "\\e0\\a0\\7f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:916 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e0\\a0\\c0" ;; "\\e0\\a0\\c0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:931 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e0\\a0\\fd" ;; "\\e0\\a0\\fd" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:946 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e1\\80\\00" ;; "\\e1\\80\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:961 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e1\\80\\7f" ;; "\\e1\\80\\7f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:976 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e1\\80\\c0" ;; "\\e1\\80\\c0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:991 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\e1\\80\\fd" ;; "\\e1\\80\\fd" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1006 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ec\\80\\00" ;; "\\ec\\80\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1021 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ec\\80\\7f" ;; "\\ec\\80\\7f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1036 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ec\\80\\c0" ;; "\\ec\\80\\c0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1051 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ec\\80\\fd" ;; "\\ec\\80\\fd" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1066 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ed\\80\\00" ;; "\\ed\\80\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1081 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ed\\80\\7f" ;; "\\ed\\80\\7f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1096 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ed\\80\\c0" ;; "\\ed\\80\\c0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1111 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ed\\80\\fd" ;; "\\ed\\80\\fd" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1126 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ee\\80\\00" ;; "\\ee\\80\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1141 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ee\\80\\7f" ;; "\\ee\\80\\7f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1156 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ee\\80\\c0" ;; "\\ee\\80\\c0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1171 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ee\\80\\fd" ;; "\\ee\\80\\fd" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1186 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ef\\80\\00" ;; "\\ef\\80\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1201 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ef\\80\\7f" ;; "\\ef\\80\\7f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1216 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ef\\80\\c0" ;; "\\ef\\80\\c0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1231 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\ef\\80\\fd" ;; "\\ef\\80\\fd" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1248 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0f" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\05\\f1\\80\\80\\80\\80" ;; "\\f1\\80\\80\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1263 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\f1\\80\\80" ;; "\\f1\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1278 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\80\\80\\23" ;; "\\f1\\80\\80#" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1293 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\f1\\80" ;; "\\f1\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1308 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\f1\\80\\23" ;; "\\f1\\80#" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1323 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\f1" ;; "\\f1" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1338 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\f1\\23" ;; "\\f1#" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1355 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\00\\90\\90" ;; "\\f0\\00\\90\\90" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1370 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\7f\\90\\90" ;; "\\f0\\7f\\90\\90" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1385 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\80\\80\\80" ;; "\\f0\\80\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1400 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\80\\90\\90" ;; "\\f0\\80\\90\\90" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1415 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\8f\\90\\90" ;; "\\f0\\8f\\90\\90" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1430 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\8f\\bf\\bf" ;; "\\f0\\8f\\bf\\bf" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1445 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\c0\\90\\90" ;; "\\f0\\c0\\90\\90" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1460 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\fd\\90\\90" ;; "\\f0\\fd\\90\\90" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1475 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\00\\80\\80" ;; "\\f1\\00\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1490 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\7f\\80\\80" ;; "\\f1\\7f\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1505 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\c0\\80\\80" ;; "\\f1\\c0\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1520 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\fd\\80\\80" ;; "\\f1\\fd\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1535 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f3\\00\\80\\80" ;; "\\f3\\00\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1550 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f3\\7f\\80\\80" ;; "\\f3\\7f\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1565 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f3\\c0\\80\\80" ;; "\\f3\\c0\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1580 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f3\\fd\\80\\80" ;; "\\f3\\fd\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1595 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\00\\80\\80" ;; "\\f4\\00\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1610 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\7f\\80\\80" ;; "\\f4\\7f\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1625 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\90\\80\\80" ;; "\\f4\\90\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1640 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\bf\\80\\80" ;; "\\f4\\bf\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1655 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\c0\\80\\80" ;; "\\f4\\c0\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1670 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\fd\\80\\80" ;; "\\f4\\fd\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1685 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f5\\80\\80\\80" ;; "\\f5\\80\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1700 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f7\\80\\80\\80" ;; "\\f7\\80\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1715 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f7\\bf\\bf\\bf" ;; "\\f7\\bf\\bf\\bf" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1732 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\90\\00\\90" ;; "\\f0\\90\\00\\90" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1747 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\90\\7f\\90" ;; "\\f0\\90\\7f\\90" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1762 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\90\\c0\\90" ;; "\\f0\\90\\c0\\90" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1777 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\90\\fd\\90" ;; "\\f0\\90\\fd\\90" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1792 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\80\\00\\80" ;; "\\f1\\80\\00\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1807 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\80\\7f\\80" ;; "\\f1\\80\\7f\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1822 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\80\\c0\\80" ;; "\\f1\\80\\c0\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1837 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\80\\fd\\80" ;; "\\f1\\80\\fd\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1852 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f3\\80\\00\\80" ;; "\\f3\\80\\00\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1867 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f3\\80\\7f\\80" ;; "\\f3\\80\\7f\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1882 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f3\\80\\c0\\80" ;; "\\f3\\80\\c0\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1897 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f3\\80\\fd\\80" ;; "\\f3\\80\\fd\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1912 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\80\\00\\80" ;; "\\f4\\80\\00\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1927 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\80\\7f\\80" ;; "\\f4\\80\\7f\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1942 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\80\\c0\\80" ;; "\\f4\\80\\c0\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1957 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\80\\fd\\80" ;; "\\f4\\80\\fd\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1974 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\90\\90\\00" ;; "\\f0\\90\\90\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:1989 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\90\\90\\7f" ;; "\\f0\\90\\90\\7f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2004 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\90\\90\\c0" ;; "\\f0\\90\\90\\c0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2019 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f0\\90\\90\\fd" ;; "\\f0\\90\\90\\fd" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2034 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\80\\80\\00" ;; "\\f1\\80\\80\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2049 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\80\\80\\7f" ;; "\\f1\\80\\80\\7f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2064 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\80\\80\\c0" ;; "\\f1\\80\\80\\c0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2079 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f1\\80\\80\\fd" ;; "\\f1\\80\\80\\fd" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2094 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f3\\80\\80\\00" ;; "\\f3\\80\\80\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2109 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f3\\80\\80\\7f" ;; "\\f3\\80\\80\\7f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2124 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f3\\80\\80\\c0" ;; "\\f3\\80\\80\\c0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2139 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f3\\80\\80\\fd" ;; "\\f3\\80\\80\\fd" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2154 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\80\\80\\00" ;; "\\f4\\80\\80\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2169 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\80\\80\\7f" ;; "\\f4\\80\\80\\7f" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2184 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\80\\80\\c0" ;; "\\f4\\80\\80\\c0" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2199 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f4\\80\\80\\fd" ;; "\\f4\\80\\80\\fd" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2216 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\10" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\06\\f8\\80\\80\\80\\80\\80" ;; "\\f8\\80\\80\\80\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2231 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f8\\80\\80\\80" ;; "\\f8\\80\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2246 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0f" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\05\\f8\\80\\80\\80\\23" ;; "\\f8\\80\\80\\80#" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2261 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\f8\\80\\80" ;; "\\f8\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2276 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\f8\\80\\80\\23" ;; "\\f8\\80\\80#" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2291 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\f8\\80" ;; "\\f8\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2306 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\f8\\80\\23" ;; "\\f8\\80#" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2321 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\f8" ;; "\\f8" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2336 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\f8\\23" ;; "\\f8#" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2353 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0f" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\05\\f8\\80\\80\\80\\80" ;; "\\f8\\80\\80\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2368 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0f" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\05\\fb\\bf\\bf\\bf\\bf" ;; "\\fb\\bf\\bf\\bf\\bf" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2385 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\11" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\07\\fc\\80\\80\\80\\80\\80\\80" ;; "\\fc\\80\\80\\80\\80\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2400 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0f" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\05\\fc\\80\\80\\80\\80" ;; "\\fc\\80\\80\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2415 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\10" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\06\\fc\\80\\80\\80\\80\\23" ;; "\\fc\\80\\80\\80\\80#" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2430 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\fc\\80\\80\\80" ;; "\\fc\\80\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2445 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0f" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\05\\fc\\80\\80\\80\\23" ;; "\\fc\\80\\80\\80#" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2460 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\fc\\80\\80" ;; "\\fc\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2475 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\fc\\80\\80\\23" ;; "\\fc\\80\\80#" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2490 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\fc\\80" ;; "\\fc\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2505 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0d" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\03\\fc\\80\\23" ;; "\\fc\\80#" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2520 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\fc" ;; "\\fc" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2535 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\fc\\23" ;; "\\fc#" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2552 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\10" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\06\\fc\\80\\80\\80\\80\\80" ;; "\\fc\\80\\80\\80\\80\\80" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2567 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\10" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\06\\fd\\bf\\bf\\bf\\bf\\bf" ;; "\\fd\\bf\\bf\\bf\\bf\\bf" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2584 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\fe" ;; "\\fe" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2599 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0b" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\01\\ff" ;; "\\ff" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2614 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\fe\\ff" ;; "\\fe\\ff" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2629 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\00\\00\\fe\\ff" ;; "\\00\\00\\fe\\ff" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2644 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0c" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\02\\ff\\fe" ;; "\\ff\\fe" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-import-module.wast:2659 +assert_malformed( + () => instantiate(`(module binary + "\\00asm" "\\01\\00\\00\\00" + "\\02\\0e" ;; import section + "\\01" ;; length 1 + "\\04\\74\\65\\73\\74" ;; "test" + "\\04\\ff\\fe\\00\\00" ;; "\\ff\\fe\\00\\00" + "\\03" ;; GlobalImport + "\\7f" ;; i32 + "\\00" ;; immutable + )`), + `malformed UTF-8 encoding`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/utf8-invalid-encoding.wast.js b/js/src/jit-test/tests/wasm/spec/spec/utf8-invalid-encoding.wast.js new file mode 100644 index 0000000000..e0fe95f69d --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/utf8-invalid-encoding.wast.js @@ -0,0 +1,1033 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/utf8-invalid-encoding.wast + +// ./test/core/utf8-invalid-encoding.wast:1 +assert_malformed( + () => instantiate(`(func (export "\\00\\00\\fe\\ff")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:2 +assert_malformed(() => instantiate(`(func (export "\\80")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:3 +assert_malformed(() => instantiate(`(func (export "\\8f")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:4 +assert_malformed(() => instantiate(`(func (export "\\90")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:5 +assert_malformed(() => instantiate(`(func (export "\\9f")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:6 +assert_malformed(() => instantiate(`(func (export "\\a0")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:7 +assert_malformed(() => instantiate(`(func (export "\\bf")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:8 +assert_malformed( + () => instantiate(`(func (export "\\c0\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:9 +assert_malformed( + () => instantiate(`(func (export "\\c0\\bf")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:10 +assert_malformed( + () => instantiate(`(func (export "\\c1\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:11 +assert_malformed( + () => instantiate(`(func (export "\\c1\\bf")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:12 +assert_malformed( + () => instantiate(`(func (export "\\c2\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:13 +assert_malformed( + () => instantiate(`(func (export "\\c2\\2e")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:14 +assert_malformed( + () => instantiate(`(func (export "\\c2\\7f")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:15 +assert_malformed( + () => instantiate(`(func (export "\\c2\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:16 +assert_malformed( + () => instantiate(`(func (export "\\c2\\c0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:17 +assert_malformed(() => instantiate(`(func (export "\\c2")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:18 +assert_malformed( + () => instantiate(`(func (export "\\c2\\fd")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:19 +assert_malformed( + () => instantiate(`(func (export "\\df\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:20 +assert_malformed( + () => instantiate(`(func (export "\\df\\7f")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:21 +assert_malformed( + () => instantiate(`(func (export "\\df\\c0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:22 +assert_malformed( + () => instantiate(`(func (export "\\df\\fd")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:23 +assert_malformed( + () => instantiate(`(func (export "\\e0\\00\\a0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:24 +assert_malformed( + () => instantiate(`(func (export "\\e0\\7f\\a0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:25 +assert_malformed( + () => instantiate(`(func (export "\\e0\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:26 +assert_malformed( + () => instantiate(`(func (export "\\e0\\80\\a0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:27 +assert_malformed( + () => instantiate(`(func (export "\\e0\\9f\\a0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:28 +assert_malformed( + () => instantiate(`(func (export "\\e0\\9f\\bf")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:29 +assert_malformed( + () => instantiate(`(func (export "\\e0\\a0\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:30 +assert_malformed( + () => instantiate(`(func (export "\\e0\\a0\\7f")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:31 +assert_malformed( + () => instantiate(`(func (export "\\e0\\a0\\c0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:32 +assert_malformed( + () => instantiate(`(func (export "\\e0\\a0\\fd")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:33 +assert_malformed( + () => instantiate(`(func (export "\\e0\\c0\\a0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:34 +assert_malformed( + () => instantiate(`(func (export "\\e0\\fd\\a0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:35 +assert_malformed( + () => instantiate(`(func (export "\\e1\\00\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:36 +assert_malformed( + () => instantiate(`(func (export "\\e1\\2e")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:37 +assert_malformed( + () => instantiate(`(func (export "\\e1\\7f\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:38 +assert_malformed( + () => instantiate(`(func (export "\\e1\\80\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:39 +assert_malformed( + () => instantiate(`(func (export "\\e1\\80\\2e")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:40 +assert_malformed( + () => instantiate(`(func (export "\\e1\\80\\7f")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:41 +assert_malformed( + () => instantiate(`(func (export "\\e1\\80\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:42 +assert_malformed( + () => instantiate(`(func (export "\\e1\\80\\c0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:43 +assert_malformed( + () => instantiate(`(func (export "\\e1\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:44 +assert_malformed( + () => instantiate(`(func (export "\\e1\\80\\fd")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:45 +assert_malformed( + () => instantiate(`(func (export "\\e1\\c0\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:46 +assert_malformed(() => instantiate(`(func (export "\\e1")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:47 +assert_malformed( + () => instantiate(`(func (export "\\e1\\fd\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:48 +assert_malformed( + () => instantiate(`(func (export "\\ec\\00\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:49 +assert_malformed( + () => instantiate(`(func (export "\\ec\\7f\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:50 +assert_malformed( + () => instantiate(`(func (export "\\ec\\80\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:51 +assert_malformed( + () => instantiate(`(func (export "\\ec\\80\\7f")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:52 +assert_malformed( + () => instantiate(`(func (export "\\ec\\80\\c0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:53 +assert_malformed( + () => instantiate(`(func (export "\\ec\\80\\fd")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:54 +assert_malformed( + () => instantiate(`(func (export "\\ec\\c0\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:55 +assert_malformed( + () => instantiate(`(func (export "\\ec\\fd\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:56 +assert_malformed( + () => instantiate(`(func (export "\\ed\\00\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:57 +assert_malformed( + () => instantiate(`(func (export "\\ed\\7f\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:58 +assert_malformed( + () => instantiate(`(func (export "\\ed\\80\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:59 +assert_malformed( + () => instantiate(`(func (export "\\ed\\80\\7f")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:60 +assert_malformed( + () => instantiate(`(func (export "\\ed\\80\\c0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:61 +assert_malformed( + () => instantiate(`(func (export "\\ed\\80\\fd")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:62 +assert_malformed( + () => instantiate(`(func (export "\\ed\\a0\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:63 +assert_malformed( + () => instantiate(`(func (export "\\ed\\a0\\bf")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:64 +assert_malformed( + () => instantiate(`(func (export "\\ed\\bf\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:65 +assert_malformed( + () => instantiate(`(func (export "\\ed\\bf\\bf")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:66 +assert_malformed( + () => instantiate(`(func (export "\\ed\\c0\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:67 +assert_malformed( + () => instantiate(`(func (export "\\ed\\fd\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:68 +assert_malformed( + () => instantiate(`(func (export "\\ee\\00\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:69 +assert_malformed( + () => instantiate(`(func (export "\\ee\\7f\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:70 +assert_malformed( + () => instantiate(`(func (export "\\ee\\80\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:71 +assert_malformed( + () => instantiate(`(func (export "\\ee\\80\\7f")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:72 +assert_malformed( + () => instantiate(`(func (export "\\ee\\80\\c0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:73 +assert_malformed( + () => instantiate(`(func (export "\\ee\\80\\fd")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:74 +assert_malformed( + () => instantiate(`(func (export "\\ee\\c0\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:75 +assert_malformed( + () => instantiate(`(func (export "\\ee\\fd\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:76 +assert_malformed( + () => instantiate(`(func (export "\\ef\\00\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:77 +assert_malformed( + () => instantiate(`(func (export "\\ef\\7f\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:78 +assert_malformed( + () => instantiate(`(func (export "\\ef\\80\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:79 +assert_malformed( + () => instantiate(`(func (export "\\ef\\80\\7f")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:80 +assert_malformed( + () => instantiate(`(func (export "\\ef\\80\\c0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:81 +assert_malformed( + () => instantiate(`(func (export "\\ef\\80\\fd")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:82 +assert_malformed( + () => instantiate(`(func (export "\\ef\\c0\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:83 +assert_malformed( + () => instantiate(`(func (export "\\ef\\fd\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:84 +assert_malformed( + () => instantiate(`(func (export "\\f0\\00\\90\\90")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:85 +assert_malformed( + () => instantiate(`(func (export "\\f0\\7f\\90\\90")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:86 +assert_malformed( + () => instantiate(`(func (export "\\f0\\80\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:87 +assert_malformed( + () => instantiate(`(func (export "\\f0\\80\\90\\90")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:88 +assert_malformed( + () => instantiate(`(func (export "\\f0\\8f\\90\\90")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:89 +assert_malformed( + () => instantiate(`(func (export "\\f0\\8f\\bf\\bf")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:90 +assert_malformed( + () => instantiate(`(func (export "\\f0\\90\\00\\90")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:91 +assert_malformed( + () => instantiate(`(func (export "\\f0\\90\\7f\\90")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:92 +assert_malformed( + () => instantiate(`(func (export "\\f0\\90\\90\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:93 +assert_malformed( + () => instantiate(`(func (export "\\f0\\90\\90\\7f")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:94 +assert_malformed( + () => instantiate(`(func (export "\\f0\\90\\90\\c0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:95 +assert_malformed( + () => instantiate(`(func (export "\\f0\\90\\90\\fd")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:96 +assert_malformed( + () => instantiate(`(func (export "\\f0\\90\\c0\\90")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:97 +assert_malformed( + () => instantiate(`(func (export "\\f0\\90\\fd\\90")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:98 +assert_malformed( + () => instantiate(`(func (export "\\f0\\c0\\90\\90")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:99 +assert_malformed( + () => instantiate(`(func (export "\\f0\\fd\\90\\90")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:100 +assert_malformed( + () => instantiate(`(func (export "\\f1\\00\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:101 +assert_malformed( + () => instantiate(`(func (export "\\f1\\23")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:102 +assert_malformed( + () => instantiate(`(func (export "\\f1\\7f\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:103 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80\\00\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:104 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80\\23")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:105 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80\\7f\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:106 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80\\80\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:107 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80\\80\\23")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:108 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80\\80\\7f")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:109 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80\\80\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:110 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80\\80\\c0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:111 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:112 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80\\80\\fd")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:113 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80\\c0\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:114 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:115 +assert_malformed( + () => instantiate(`(func (export "\\f1\\80\\fd\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:116 +assert_malformed( + () => instantiate(`(func (export "\\f1\\c0\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:117 +assert_malformed(() => instantiate(`(func (export "\\f1")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:118 +assert_malformed( + () => instantiate(`(func (export "\\f1\\fd\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:119 +assert_malformed( + () => instantiate(`(func (export "\\f3\\00\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:120 +assert_malformed( + () => instantiate(`(func (export "\\f3\\7f\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:121 +assert_malformed( + () => instantiate(`(func (export "\\f3\\80\\00\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:122 +assert_malformed( + () => instantiate(`(func (export "\\f3\\80\\7f\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:123 +assert_malformed( + () => instantiate(`(func (export "\\f3\\80\\80\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:124 +assert_malformed( + () => instantiate(`(func (export "\\f3\\80\\80\\7f")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:125 +assert_malformed( + () => instantiate(`(func (export "\\f3\\80\\80\\c0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:126 +assert_malformed( + () => instantiate(`(func (export "\\f3\\80\\80\\fd")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:127 +assert_malformed( + () => instantiate(`(func (export "\\f3\\80\\c0\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:128 +assert_malformed( + () => instantiate(`(func (export "\\f3\\80\\fd\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:129 +assert_malformed( + () => instantiate(`(func (export "\\f3\\c0\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:130 +assert_malformed( + () => instantiate(`(func (export "\\f3\\fd\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:131 +assert_malformed( + () => instantiate(`(func (export "\\f4\\00\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:132 +assert_malformed( + () => instantiate(`(func (export "\\f4\\7f\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:133 +assert_malformed( + () => instantiate(`(func (export "\\f4\\80\\00\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:134 +assert_malformed( + () => instantiate(`(func (export "\\f4\\80\\7f\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:135 +assert_malformed( + () => instantiate(`(func (export "\\f4\\80\\80\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:136 +assert_malformed( + () => instantiate(`(func (export "\\f4\\80\\80\\7f")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:137 +assert_malformed( + () => instantiate(`(func (export "\\f4\\80\\80\\c0")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:138 +assert_malformed( + () => instantiate(`(func (export "\\f4\\80\\80\\fd")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:139 +assert_malformed( + () => instantiate(`(func (export "\\f4\\80\\c0\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:140 +assert_malformed( + () => instantiate(`(func (export "\\f4\\80\\fd\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:141 +assert_malformed( + () => instantiate(`(func (export "\\f4\\90\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:142 +assert_malformed( + () => instantiate(`(func (export "\\f4\\bf\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:143 +assert_malformed( + () => instantiate(`(func (export "\\f4\\c0\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:144 +assert_malformed( + () => instantiate(`(func (export "\\f4\\fd\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:145 +assert_malformed( + () => instantiate(`(func (export "\\f5\\80\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:146 +assert_malformed( + () => instantiate(`(func (export "\\f7\\80\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:147 +assert_malformed( + () => instantiate(`(func (export "\\f7\\bf\\bf\\bf")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:148 +assert_malformed( + () => instantiate(`(func (export "\\f8\\23")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:149 +assert_malformed( + () => instantiate(`(func (export "\\f8\\80\\23")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:150 +assert_malformed( + () => instantiate(`(func (export "\\f8\\80\\80\\23")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:151 +assert_malformed( + () => instantiate(`(func (export "\\f8\\80\\80\\80\\23")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:152 +assert_malformed( + () => instantiate(`(func (export "\\f8\\80\\80\\80\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:153 +assert_malformed( + () => instantiate(`(func (export "\\f8\\80\\80\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:154 +assert_malformed( + () => instantiate(`(func (export "\\f8\\80\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:155 +assert_malformed( + () => instantiate(`(func (export "\\f8\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:156 +assert_malformed( + () => instantiate(`(func (export "\\f8\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:157 +assert_malformed(() => instantiate(`(func (export "\\f8")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:158 +assert_malformed( + () => instantiate(`(func (export "\\fb\\bf\\bf\\bf\\bf")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:159 +assert_malformed( + () => instantiate(`(func (export "\\fc\\23")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:160 +assert_malformed( + () => instantiate(`(func (export "\\fc\\80\\23")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:161 +assert_malformed( + () => instantiate(`(func (export "\\fc\\80\\80\\23")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:162 +assert_malformed( + () => instantiate(`(func (export "\\fc\\80\\80\\80\\23")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:163 +assert_malformed( + () => instantiate(`(func (export "\\fc\\80\\80\\80\\80\\23")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:164 +assert_malformed( + () => instantiate(`(func (export "\\fc\\80\\80\\80\\80\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:165 +assert_malformed( + () => instantiate(`(func (export "\\fc\\80\\80\\80\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:166 +assert_malformed( + () => instantiate(`(func (export "\\fc\\80\\80\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:167 +assert_malformed( + () => instantiate(`(func (export "\\fc\\80\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:168 +assert_malformed( + () => instantiate(`(func (export "\\fc\\80\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:169 +assert_malformed( + () => instantiate(`(func (export "\\fc\\80")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:170 +assert_malformed(() => instantiate(`(func (export "\\fc")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:171 +assert_malformed( + () => instantiate(`(func (export "\\fd\\bf\\bf\\bf\\bf\\bf")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:172 +assert_malformed(() => instantiate(`(func (export "\\fe")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:173 +assert_malformed( + () => instantiate(`(func (export "\\fe\\ff")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:174 +assert_malformed(() => instantiate(`(func (export "\\ff")) `), `malformed UTF-8 encoding`); + +// ./test/core/utf8-invalid-encoding.wast:175 +assert_malformed( + () => instantiate(`(func (export "\\ff\\fe\\00\\00")) `), + `malformed UTF-8 encoding`, +); + +// ./test/core/utf8-invalid-encoding.wast:176 +assert_malformed( + () => instantiate(`(func (export "\\ff\\fe")) `), + `malformed UTF-8 encoding`, +); diff --git a/js/src/jit-test/tests/wasm/spec/tail-call/directives.txt b/js/src/jit-test/tests/wasm/spec/tail-call/directives.txt new file mode 100644 index 0000000000..223b6b843a --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/tail-call/directives.txt @@ -0,0 +1 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-tail-calls; skip-if: !wasmTailCallsEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/tail-call/harness/directives.txt b/js/src/jit-test/tests/wasm/spec/tail-call/harness/directives.txt new file mode 100644 index 0000000000..d41243abbb --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/tail-call/harness/directives.txt @@ -0,0 +1 @@ +|jit-test| skip-if: true \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/tail-call/harness/harness.js b/js/src/jit-test/tests/wasm/spec/tail-call/harness/harness.js new file mode 100644 index 0000000000..a96781e8ed --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/tail-call/harness/harness.js @@ -0,0 +1,448 @@ +"use strict"; + +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +if (!wasmIsSupported()) { + quit(); +} + +function bytes(type, bytes) { + var typedBuffer = new Uint8Array(bytes); + return wasmGlobalFromArrayBuffer(type, typedBuffer.buffer); +} +function value(type, value) { + return new WebAssembly.Global({ + value: type, + mutable: false, + }, value); +} + +function i8x16(elements) { + let typedBuffer = new Uint8Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i16x8(elements) { + let typedBuffer = new Uint16Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i32x4(elements) { + let typedBuffer = new Uint32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function i64x2(elements) { + let typedBuffer = new BigUint64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f32x4(elements) { + let typedBuffer = new Float32Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} +function f64x2(elements) { + let typedBuffer = new Float64Array(elements); + return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); +} + +function either(...arr) { + return new EitherVariants(arr); +} + +class F32x4Pattern { + constructor(x, y, z, w) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } +} + +class F64x2Pattern { + constructor(x, y) { + this.x = x; + this.y = y; + } +} + +class RefWithType { + constructor(type) { + this.type = type; + } + + formatExpected() { + return `RefWithType(${this.type})`; + } + + test(refGlobal) { + try { + new WebAssembly.Global({value: this.type}, refGlobal.value); + return true; + } catch (err) { + assertEq(err instanceof TypeError, true, `wrong type of error when creating global: ${err}`); + assertEq(!!err.message.match(/can only pass/), true, `wrong type of error when creating global: ${err}`); + return false; + } + } +} + +// ref.extern values created by spec tests will be JS objects of the form +// { [externsym]: }. Other externref values are possible to observe +// if extern.convert_any is used. +let externsym = Symbol("externref"); +function externref(s) { + return { [externsym]: s }; +} +function is_externref(x) { + return (x !== null && externsym in x) ? 1 : 0; +} +function is_funcref(x) { + return typeof x === "function" ? 1 : 0; +} +function eq_externref(x, y) { + return x === y ? 1 : 0; +} +function eq_funcref(x, y) { + return x === y ? 1 : 0; +} + +class ExternRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.extern ${this.n}`; + } + + test(global) { + // the global's value can either be an externref or just a plain old JS number + let result = global.value; + if (typeof global.value === "object" && externsym in global.value) { + result = global.value[externsym]; + } + return result === this.n; + } +} + +// ref.host values created by spectests will be whatever the JS API does to +// convert the given value to anyref. It should implicitly be like any.convert_extern. +function hostref(v) { + if (!wasmGcEnabled()) { + throw new Error("ref.host only works when wasm GC is enabled"); + } + + const { internalizeNum } = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(`(module + (func (import "test" "coerce") (param i32) (result anyref)) + (func (export "internalizeNum") (param i32) (result anyref) + (call 0 (local.get 0)) + ) + )`)), + { "test": { "coerce": x => x } }, + ).exports; + return internalizeNum(v); +} + +class HostRefResult { + constructor(n) { + this.n = n; + } + + formatExpected() { + return `ref.host ${this.n}`; + } + + test(externrefGlobal) { + assertEq(externsym in externrefGlobal.value, true, `HostRefResult only works with externref inputs`); + return externrefGlobal.value[externsym] === this.n; + } +} + +let spectest = { + externref: externref, + is_externref: is_externref, + is_funcref: is_funcref, + eq_externref: eq_externref, + eq_funcref: eq_funcref, + print: console.log.bind(console), + print_i32: console.log.bind(console), + print_i32_f32: console.log.bind(console), + print_f64_f64: console.log.bind(console), + print_f32: console.log.bind(console), + print_f64: console.log.bind(console), + global_i32: 666, + global_i64: 666n, + global_f32: 666, + global_f64: 666, + table: new WebAssembly.Table({ + initial: 10, + maximum: 20, + element: "anyfunc", + }), + memory: new WebAssembly.Memory({ initial: 1, maximum: 2 }), +}; + +let linkage = { + spectest, +}; + +function getInstance(instanceish) { + if (typeof instanceish === "string") { + assertEq( + instanceish in linkage, + true, + `'${instanceish}'' must be registered`, + ); + return linkage[instanceish]; + } + return instanceish; +} + +function instantiate(source) { + let bytecode = wasmTextToBinary(source); + let module = new WebAssembly.Module(bytecode); + let instance = new WebAssembly.Instance(module, linkage); + return instance.exports; +} + +function register(instanceish, name) { + linkage[name] = getInstance(instanceish); +} + +function invoke(instanceish, field, params) { + let func = getInstance(instanceish)[field]; + assertEq(func instanceof Function, true, "expected a function"); + return wasmLosslessInvoke(func, ...params); +} + +function get(instanceish, field) { + let global = getInstance(instanceish)[field]; + assertEq( + global instanceof WebAssembly.Global, + true, + "expected a WebAssembly.Global", + ); + return global; +} + +function assert_trap(thunk, message) { + try { + thunk(); + throw new Error("expected trap"); + } catch (err) { + if (err instanceof WebAssembly.RuntimeError) { + return; + } + throw err; + } +} + +let StackOverflow; +try { + (function f() { + 1 + f(); + })(); +} catch (e) { + StackOverflow = e.constructor; +} +function assert_exhaustion(thunk, message) { + try { + thunk(); + assertEq("normal return", "exhaustion"); + } catch (err) { + assertEq( + err instanceof StackOverflow, + true, + "expected exhaustion", + ); + } +} + +function assert_invalid(thunk, message) { + try { + thunk(); + assertEq("valid module", "invalid module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an invalid module", + ); + } +} + +function assert_unlinkable(thunk, message) { + try { + thunk(); + assertEq(true, false, "expected an unlinkable module"); + } catch (err) { + assertEq( + err instanceof WebAssembly.LinkError || + err instanceof WebAssembly.CompileError, + true, + "expected an unlinkable module", + ); + } +} + +function assert_malformed(thunk, message) { + try { + thunk(); + assertEq("valid module", "malformed module"); + } catch (err) { + assertEq( + err instanceof TypeError || + err instanceof SyntaxError || + err instanceof WebAssembly.CompileError || + err instanceof WebAssembly.LinkError, + true, + `expected a malformed module`, + ); + } +} + +function assert_exception(thunk) { + let thrown = false; + try { + thunk(); + } catch (err) { + thrown = true; + } + assertEq(thrown, true, "expected an exception to be thrown"); +} + +function assert_return(thunk, expected) { + let results = thunk(); + + if (results === undefined) { + results = []; + } else if (!Array.isArray(results)) { + results = [results]; + } + if (!Array.isArray(expected)) { + expected = [expected]; + } + + if (!compareResults(results, expected)) { + let got = results.map((x) => formatResult(x)).join(", "); + let wanted = expected.map((x) => formatExpected(x)).join(", "); + assertEq( + `[${got}]`, + `[${wanted}]`, + ); + assertEq(true, false, `${got} !== ${wanted}`); + } +} + +function formatResult(result) { + if (typeof (result) === "object") { + return wasmGlobalToString(result); + } else { + return `${result}`; + } +} + +function formatExpected(expected) { + if ( + expected === `f32_canonical_nan` || + expected === `f32_arithmetic_nan` || + expected === `f64_canonical_nan` || + expected === `f64_arithmetic_nan` + ) { + return expected; + } else if (expected instanceof F32x4Pattern) { + return `f32x4(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + }, ${formatExpected(expected.z)}, ${formatExpected(expected.w)})`; + } else if (expected instanceof F64x2Pattern) { + return `f64x2(${formatExpected(expected.x)}, ${ + formatExpected(expected.y) + })`; + } else if (expected instanceof EitherVariants) { + return expected.formatExpected(); + } else if (expected instanceof RefWithType) { + return expected.formatExpected(); + } else if (expected instanceof ExternRefResult) { + return expected.formatExpected(); + } else if (expected instanceof HostRefResult) { + return expected.formatExpected(); + } else if (typeof (expected) === "object") { + return wasmGlobalToString(expected); + } else { + throw new Error("unknown expected result"); + } +} + +class EitherVariants { + constructor(arr) { + this.arr = arr; + } + matches(v) { + return this.arr.some((e) => compareResult(v, e)); + } + formatExpected() { + return `either(${this.arr.map(formatExpected).join(", ")})`; + } +} + +function compareResults(results, expected) { + if (results.length !== expected.length) { + return false; + } + for (let i in results) { + if (expected[i] instanceof EitherVariants) { + return expected[i].matches(results[i]); + } + if (!compareResult(results[i], expected[i])) { + return false; + } + } + return true; +} + +function compareResult(result, expected) { + if ( + expected === `canonical_nan` || + expected === `arithmetic_nan` + ) { + return wasmGlobalIsNaN(result, expected); + } else if (expected === null) { + return result.value === null; + } else if (expected instanceof F32x4Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f32x4", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 1), expected.y) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 2), expected.z) && + compareResult(wasmGlobalExtractLane(result, "f32x4", 3), expected.w); + } else if (expected instanceof F64x2Pattern) { + return compareResult( + wasmGlobalExtractLane(result, "f64x2", 0), + expected.x, + ) && + compareResult(wasmGlobalExtractLane(result, "f64x2", 1), expected.y); + } else if (expected instanceof RefWithType) { + return expected.test(result); + } else if (expected instanceof ExternRefResult) { + return expected.test(result); + } else if (expected instanceof HostRefResult) { + return expected.test(result); + } else if (typeof (expected) === "object") { + return wasmGlobalsEqual(result, expected); + } else { + throw new Error("unknown expected result"); + } +} diff --git a/js/src/jit-test/tests/wasm/spec/tail-call/return_call.wast.js b/js/src/jit-test/tests/wasm/spec/tail-call/return_call.wast.js new file mode 100644 index 0000000000..2feda2e0a7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/tail-call/return_call.wast.js @@ -0,0 +1,283 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/return_call.wast + +// ./test/core/return_call.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definitions + (func $$const-i32 (result i32) (i32.const 0x132)) + (func $$const-i64 (result i64) (i64.const 0x164)) + (func $$const-f32 (result f32) (f32.const 0xf32)) + (func $$const-f64 (result f64) (f64.const 0xf64)) + + (func $$id-i32 (param i32) (result i32) (local.get 0)) + (func $$id-i64 (param i64) (result i64) (local.get 0)) + (func $$id-f32 (param f32) (result f32) (local.get 0)) + (func $$id-f64 (param f64) (result f64) (local.get 0)) + + (func $$f32-i32 (param f32 i32) (result i32) (local.get 1)) + (func $$i32-i64 (param i32 i64) (result i64) (local.get 1)) + (func $$f64-f32 (param f64 f32) (result f32) (local.get 1)) + (func $$i64-f64 (param i64 f64) (result f64) (local.get 1)) + + ;; Typing + + (func (export "type-i32") (result i32) (return_call $$const-i32)) + (func (export "type-i64") (result i64) (return_call $$const-i64)) + (func (export "type-f32") (result f32) (return_call $$const-f32)) + (func (export "type-f64") (result f64) (return_call $$const-f64)) + + (func (export "type-first-i32") (result i32) (return_call $$id-i32 (i32.const 32))) + (func (export "type-first-i64") (result i64) (return_call $$id-i64 (i64.const 64))) + (func (export "type-first-f32") (result f32) (return_call $$id-f32 (f32.const 1.32))) + (func (export "type-first-f64") (result f64) (return_call $$id-f64 (f64.const 1.64))) + + (func (export "type-second-i32") (result i32) + (return_call $$f32-i32 (f32.const 32.1) (i32.const 32)) + ) + (func (export "type-second-i64") (result i64) + (return_call $$i32-i64 (i32.const 32) (i64.const 64)) + ) + (func (export "type-second-f32") (result f32) + (return_call $$f64-f32 (f64.const 64) (f32.const 32)) + ) + (func (export "type-second-f64") (result f64) + (return_call $$i64-f64 (i64.const 64) (f64.const 64.1)) + ) + + ;; Recursion + + (func $$fac-acc (export "fac-acc") (param i64 i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (return_call $$fac-acc + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + ) + ) + ) + ) + + (func $$count (export "count") (param i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 0)) + (else (return_call $$count (i64.sub (local.get 0) (i64.const 1)))) + ) + ) + + (func $$even (export "even") (param i64) (result i32) + (if (result i32) (i64.eqz (local.get 0)) + (then (i32.const 44)) + (else (return_call $$odd (i64.sub (local.get 0) (i64.const 1)))) + ) + ) + (func $$odd (export "odd") (param i64) (result i32) + (if (result i32) (i64.eqz (local.get 0)) + (then (i32.const 99)) + (else (return_call $$even (i64.sub (local.get 0) (i64.const 1)))) + ) + ) +)`); + +// ./test/core/return_call.wast:80 +assert_return(() => invoke($0, `type-i32`, []), [value("i32", 306)]); + +// ./test/core/return_call.wast:81 +assert_return(() => invoke($0, `type-i64`, []), [value("i64", 356n)]); + +// ./test/core/return_call.wast:82 +assert_return(() => invoke($0, `type-f32`, []), [value("f32", 3890)]); + +// ./test/core/return_call.wast:83 +assert_return(() => invoke($0, `type-f64`, []), [value("f64", 3940)]); + +// ./test/core/return_call.wast:85 +assert_return(() => invoke($0, `type-first-i32`, []), [value("i32", 32)]); + +// ./test/core/return_call.wast:86 +assert_return(() => invoke($0, `type-first-i64`, []), [value("i64", 64n)]); + +// ./test/core/return_call.wast:87 +assert_return(() => invoke($0, `type-first-f32`, []), [value("f32", 1.32)]); + +// ./test/core/return_call.wast:88 +assert_return(() => invoke($0, `type-first-f64`, []), [value("f64", 1.64)]); + +// ./test/core/return_call.wast:90 +assert_return(() => invoke($0, `type-second-i32`, []), [value("i32", 32)]); + +// ./test/core/return_call.wast:91 +assert_return(() => invoke($0, `type-second-i64`, []), [value("i64", 64n)]); + +// ./test/core/return_call.wast:92 +assert_return(() => invoke($0, `type-second-f32`, []), [value("f32", 32)]); + +// ./test/core/return_call.wast:93 +assert_return(() => invoke($0, `type-second-f64`, []), [value("f64", 64.1)]); + +// ./test/core/return_call.wast:95 +assert_return(() => invoke($0, `fac-acc`, [0n, 1n]), [value("i64", 1n)]); + +// ./test/core/return_call.wast:96 +assert_return(() => invoke($0, `fac-acc`, [1n, 1n]), [value("i64", 1n)]); + +// ./test/core/return_call.wast:97 +assert_return(() => invoke($0, `fac-acc`, [5n, 1n]), [value("i64", 120n)]); + +// ./test/core/return_call.wast:98 +assert_return(() => invoke($0, `fac-acc`, [25n, 1n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/return_call.wast:103 +assert_return(() => invoke($0, `count`, [0n]), [value("i64", 0n)]); + +// ./test/core/return_call.wast:104 +assert_return(() => invoke($0, `count`, [1000n]), [value("i64", 0n)]); + +// ./test/core/return_call.wast:105 +assert_return(() => invoke($0, `count`, [1000000n]), [value("i64", 0n)]); + +// ./test/core/return_call.wast:107 +assert_return(() => invoke($0, `even`, [0n]), [value("i32", 44)]); + +// ./test/core/return_call.wast:108 +assert_return(() => invoke($0, `even`, [1n]), [value("i32", 99)]); + +// ./test/core/return_call.wast:109 +assert_return(() => invoke($0, `even`, [100n]), [value("i32", 44)]); + +// ./test/core/return_call.wast:110 +assert_return(() => invoke($0, `even`, [77n]), [value("i32", 99)]); + +// ./test/core/return_call.wast:111 +assert_return(() => invoke($0, `even`, [1000000n]), [value("i32", 44)]); + +// ./test/core/return_call.wast:112 +assert_return(() => invoke($0, `even`, [1000001n]), [value("i32", 99)]); + +// ./test/core/return_call.wast:113 +assert_return(() => invoke($0, `odd`, [0n]), [value("i32", 99)]); + +// ./test/core/return_call.wast:114 +assert_return(() => invoke($0, `odd`, [1n]), [value("i32", 44)]); + +// ./test/core/return_call.wast:115 +assert_return(() => invoke($0, `odd`, [200n]), [value("i32", 99)]); + +// ./test/core/return_call.wast:116 +assert_return(() => invoke($0, `odd`, [77n]), [value("i32", 44)]); + +// ./test/core/return_call.wast:117 +assert_return(() => invoke($0, `odd`, [1000000n]), [value("i32", 99)]); + +// ./test/core/return_call.wast:118 +assert_return(() => invoke($0, `odd`, [999999n]), [value("i32", 44)]); + +// ./test/core/return_call.wast:123 +assert_invalid( + () => instantiate(`(module + (func $$type-void-vs-num (result i32) (return_call 1) (i32.const 0)) + (func) + )`), + `type mismatch`, +); + +// ./test/core/return_call.wast:130 +assert_invalid( + () => instantiate(`(module + (func $$type-num-vs-num (result i32) (return_call 1) (i32.const 0)) + (func (result i64) (i64.const 1)) + )`), + `type mismatch`, +); + +// ./test/core/return_call.wast:138 +assert_invalid( + () => instantiate(`(module + (func $$arity-0-vs-1 (return_call 1)) + (func (param i32)) + )`), + `type mismatch`, +); + +// ./test/core/return_call.wast:145 +assert_invalid( + () => instantiate(`(module + (func $$arity-0-vs-2 (return_call 1)) + (func (param f64 i32)) + )`), + `type mismatch`, +); + +// ./test/core/return_call.wast:153 +let $1 = instantiate(`(module + (func $$arity-1-vs-0 (i32.const 1) (return_call 1)) + (func) +)`); + +// ./test/core/return_call.wast:158 +let $2 = instantiate(`(module + (func $$arity-2-vs-0 (f64.const 2) (i32.const 1) (return_call 1)) + (func) +)`); + +// ./test/core/return_call.wast:163 +assert_invalid( + () => instantiate(`(module + (func $$type-first-void-vs-num (return_call 1 (nop) (i32.const 1))) + (func (param i32 i32)) + )`), + `type mismatch`, +); + +// ./test/core/return_call.wast:170 +assert_invalid( + () => instantiate(`(module + (func $$type-second-void-vs-num (return_call 1 (i32.const 1) (nop))) + (func (param i32 i32)) + )`), + `type mismatch`, +); + +// ./test/core/return_call.wast:177 +assert_invalid( + () => instantiate(`(module + (func $$type-first-num-vs-num (return_call 1 (f64.const 1) (i32.const 1))) + (func (param i32 f64)) + )`), + `type mismatch`, +); + +// ./test/core/return_call.wast:184 +assert_invalid( + () => instantiate(`(module + (func $$type-second-num-vs-num (return_call 1 (i32.const 1) (f64.const 1))) + (func (param f64 i32)) + )`), + `type mismatch`, +); + +// ./test/core/return_call.wast:195 +assert_invalid( + () => instantiate(`(module (func $$unbound-func (return_call 1)))`), + `unknown function`, +); + +// ./test/core/return_call.wast:199 +assert_invalid( + () => instantiate(`(module (func $$large-func (return_call 1012321300)))`), + `unknown function`, +); diff --git a/js/src/jit-test/tests/wasm/spec/tail-call/return_call_indirect.wast.js b/js/src/jit-test/tests/wasm/spec/tail-call/return_call_indirect.wast.js new file mode 100644 index 0000000000..706aae5c18 --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/tail-call/return_call_indirect.wast.js @@ -0,0 +1,591 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/return_call_indirect.wast + +// ./test/core/return_call_indirect.wast:3 +let $0 = instantiate(`(module + ;; Auxiliary definitions + (type $$proc (func)) + (type $$out-i32 (func (result i32))) + (type $$out-i64 (func (result i64))) + (type $$out-f32 (func (result f32))) + (type $$out-f64 (func (result f64))) + (type $$over-i32 (func (param i32) (result i32))) + (type $$over-i64 (func (param i64) (result i64))) + (type $$over-f32 (func (param f32) (result f32))) + (type $$over-f64 (func (param f64) (result f64))) + (type $$f32-i32 (func (param f32 i32) (result i32))) + (type $$i32-i64 (func (param i32 i64) (result i64))) + (type $$f64-f32 (func (param f64 f32) (result f32))) + (type $$i64-f64 (func (param i64 f64) (result f64))) + (type $$over-i32-duplicate (func (param i32) (result i32))) + (type $$over-i64-duplicate (func (param i64) (result i64))) + (type $$over-f32-duplicate (func (param f32) (result f32))) + (type $$over-f64-duplicate (func (param f64) (result f64))) + + (func $$const-i32 (type $$out-i32) (i32.const 0x132)) + (func $$const-i64 (type $$out-i64) (i64.const 0x164)) + (func $$const-f32 (type $$out-f32) (f32.const 0xf32)) + (func $$const-f64 (type $$out-f64) (f64.const 0xf64)) + + (func $$id-i32 (type $$over-i32) (local.get 0)) + (func $$id-i64 (type $$over-i64) (local.get 0)) + (func $$id-f32 (type $$over-f32) (local.get 0)) + (func $$id-f64 (type $$over-f64) (local.get 0)) + + (func $$i32-i64 (type $$i32-i64) (local.get 1)) + (func $$i64-f64 (type $$i64-f64) (local.get 1)) + (func $$f32-i32 (type $$f32-i32) (local.get 1)) + (func $$f64-f32 (type $$f64-f32) (local.get 1)) + + (func $$over-i32-duplicate (type $$over-i32-duplicate) (local.get 0)) + (func $$over-i64-duplicate (type $$over-i64-duplicate) (local.get 0)) + (func $$over-f32-duplicate (type $$over-f32-duplicate) (local.get 0)) + (func $$over-f64-duplicate (type $$over-f64-duplicate) (local.get 0)) + + (table funcref + (elem + $$const-i32 $$const-i64 $$const-f32 $$const-f64 + $$id-i32 $$id-i64 $$id-f32 $$id-f64 + $$f32-i32 $$i32-i64 $$f64-f32 $$i64-f64 + $$fac $$fac-acc $$even $$odd + $$over-i32-duplicate $$over-i64-duplicate + $$over-f32-duplicate $$over-f64-duplicate + ) + ) + + ;; Syntax + + (func + (return_call_indirect (i32.const 0)) + (return_call_indirect (param i64) (i64.const 0) (i32.const 0)) + (return_call_indirect (param i64) (param) (param f64 i32 i64) + (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (i32.const 0) + ) + (return_call_indirect (result) (i32.const 0)) + ) + + (func (result i32) + (return_call_indirect (result i32) (i32.const 0)) + (return_call_indirect (result i32) (result) (i32.const 0)) + (return_call_indirect (param i64) (result i32) (i64.const 0) (i32.const 0)) + (return_call_indirect + (param) (param i64) (param) (param f64 i32 i64) (param) (param) + (result) (result i32) (result) (result) + (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (i32.const 0) + ) + ) + + (func (result i64) + (return_call_indirect (type $$over-i64) (param i64) (result i64) + (i64.const 0) (i32.const 0) + ) + ) + + ;; Typing + + (func (export "type-i32") (result i32) + (return_call_indirect (type $$out-i32) (i32.const 0)) + ) + (func (export "type-i64") (result i64) + (return_call_indirect (type $$out-i64) (i32.const 1)) + ) + (func (export "type-f32") (result f32) + (return_call_indirect (type $$out-f32) (i32.const 2)) + ) + (func (export "type-f64") (result f64) + (return_call_indirect (type $$out-f64) (i32.const 3)) + ) + + (func (export "type-index") (result i64) + (return_call_indirect (type $$over-i64) (i64.const 100) (i32.const 5)) + ) + + (func (export "type-first-i32") (result i32) + (return_call_indirect (type $$over-i32) (i32.const 32) (i32.const 4)) + ) + (func (export "type-first-i64") (result i64) + (return_call_indirect (type $$over-i64) (i64.const 64) (i32.const 5)) + ) + (func (export "type-first-f32") (result f32) + (return_call_indirect (type $$over-f32) (f32.const 1.32) (i32.const 6)) + ) + (func (export "type-first-f64") (result f64) + (return_call_indirect (type $$over-f64) (f64.const 1.64) (i32.const 7)) + ) + + (func (export "type-second-i32") (result i32) + (return_call_indirect (type $$f32-i32) + (f32.const 32.1) (i32.const 32) (i32.const 8) + ) + ) + (func (export "type-second-i64") (result i64) + (return_call_indirect (type $$i32-i64) + (i32.const 32) (i64.const 64) (i32.const 9) + ) + ) + (func (export "type-second-f32") (result f32) + (return_call_indirect (type $$f64-f32) + (f64.const 64) (f32.const 32) (i32.const 10) + ) + ) + (func (export "type-second-f64") (result f64) + (return_call_indirect (type $$i64-f64) + (i64.const 64) (f64.const 64.1) (i32.const 11) + ) + ) + + ;; Dispatch + + (func (export "dispatch") (param i32 i64) (result i64) + (return_call_indirect (type $$over-i64) (local.get 1) (local.get 0)) + ) + + (func (export "dispatch-structural") (param i32) (result i64) + (return_call_indirect (type $$over-i64-duplicate) + (i64.const 9) (local.get 0) + ) + ) + + ;; Multiple tables + + (table $$tab2 funcref (elem $$tab-f1)) + (table $$tab3 funcref (elem $$tab-f2)) + + (func $$tab-f1 (result i32) (i32.const 0x133)) + (func $$tab-f2 (result i32) (i32.const 0x134)) + + (func (export "call-tab") (param $$i i32) (result i32) + (if (i32.eq (local.get $$i) (i32.const 0)) + (then (return_call_indirect (type $$out-i32) (i32.const 0))) + ) + (if (i32.eq (local.get $$i) (i32.const 1)) + (then (return_call_indirect 1 (type $$out-i32) (i32.const 0))) + ) + (if (i32.eq (local.get $$i) (i32.const 2)) + (then (return_call_indirect $$tab3 (type $$out-i32) (i32.const 0))) + ) + (i32.const 0) + ) + + ;; Recursion + + (func $$fac (export "fac") (type $$over-i64) + (return_call_indirect (param i64 i64) (result i64) + (local.get 0) (i64.const 1) (i32.const 13) + ) + ) + + (func $$fac-acc (param i64 i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (return_call_indirect (param i64 i64) (result i64) + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + (i32.const 13) + ) + ) + ) + ) + + (func $$even (export "even") (param i32) (result i32) + (if (result i32) (i32.eqz (local.get 0)) + (then (i32.const 44)) + (else + (return_call_indirect (type $$over-i32) + (i32.sub (local.get 0) (i32.const 1)) + (i32.const 15) + ) + ) + ) + ) + (func $$odd (export "odd") (param i32) (result i32) + (if (result i32) (i32.eqz (local.get 0)) + (then (i32.const 99)) + (else + (return_call_indirect (type $$over-i32) + (i32.sub (local.get 0) (i32.const 1)) + (i32.const 14) + ) + ) + ) + ) +)`); + +// ./test/core/return_call_indirect.wast:213 +assert_return(() => invoke($0, `type-i32`, []), [value("i32", 306)]); + +// ./test/core/return_call_indirect.wast:214 +assert_return(() => invoke($0, `type-i64`, []), [value("i64", 356n)]); + +// ./test/core/return_call_indirect.wast:215 +assert_return(() => invoke($0, `type-f32`, []), [value("f32", 3890)]); + +// ./test/core/return_call_indirect.wast:216 +assert_return(() => invoke($0, `type-f64`, []), [value("f64", 3940)]); + +// ./test/core/return_call_indirect.wast:218 +assert_return(() => invoke($0, `type-index`, []), [value("i64", 100n)]); + +// ./test/core/return_call_indirect.wast:220 +assert_return(() => invoke($0, `type-first-i32`, []), [value("i32", 32)]); + +// ./test/core/return_call_indirect.wast:221 +assert_return(() => invoke($0, `type-first-i64`, []), [value("i64", 64n)]); + +// ./test/core/return_call_indirect.wast:222 +assert_return(() => invoke($0, `type-first-f32`, []), [value("f32", 1.32)]); + +// ./test/core/return_call_indirect.wast:223 +assert_return(() => invoke($0, `type-first-f64`, []), [value("f64", 1.64)]); + +// ./test/core/return_call_indirect.wast:225 +assert_return(() => invoke($0, `type-second-i32`, []), [value("i32", 32)]); + +// ./test/core/return_call_indirect.wast:226 +assert_return(() => invoke($0, `type-second-i64`, []), [value("i64", 64n)]); + +// ./test/core/return_call_indirect.wast:227 +assert_return(() => invoke($0, `type-second-f32`, []), [value("f32", 32)]); + +// ./test/core/return_call_indirect.wast:228 +assert_return(() => invoke($0, `type-second-f64`, []), [value("f64", 64.1)]); + +// ./test/core/return_call_indirect.wast:230 +assert_return(() => invoke($0, `dispatch`, [5, 2n]), [value("i64", 2n)]); + +// ./test/core/return_call_indirect.wast:231 +assert_return(() => invoke($0, `dispatch`, [5, 5n]), [value("i64", 5n)]); + +// ./test/core/return_call_indirect.wast:232 +assert_return(() => invoke($0, `dispatch`, [12, 5n]), [value("i64", 120n)]); + +// ./test/core/return_call_indirect.wast:233 +assert_return(() => invoke($0, `dispatch`, [17, 2n]), [value("i64", 2n)]); + +// ./test/core/return_call_indirect.wast:234 +assert_trap(() => invoke($0, `dispatch`, [0, 2n]), `indirect call type mismatch`); + +// ./test/core/return_call_indirect.wast:235 +assert_trap(() => invoke($0, `dispatch`, [15, 2n]), `indirect call type mismatch`); + +// ./test/core/return_call_indirect.wast:236 +assert_trap(() => invoke($0, `dispatch`, [20, 2n]), `undefined element`); + +// ./test/core/return_call_indirect.wast:237 +assert_trap(() => invoke($0, `dispatch`, [-1, 2n]), `undefined element`); + +// ./test/core/return_call_indirect.wast:238 +assert_trap(() => invoke($0, `dispatch`, [1213432423, 2n]), `undefined element`); + +// ./test/core/return_call_indirect.wast:240 +assert_return(() => invoke($0, `dispatch-structural`, [5]), [value("i64", 9n)]); + +// ./test/core/return_call_indirect.wast:241 +assert_return(() => invoke($0, `dispatch-structural`, [5]), [value("i64", 9n)]); + +// ./test/core/return_call_indirect.wast:242 +assert_return(() => invoke($0, `dispatch-structural`, [12]), [value("i64", 362880n)]); + +// ./test/core/return_call_indirect.wast:243 +assert_return(() => invoke($0, `dispatch-structural`, [17]), [value("i64", 9n)]); + +// ./test/core/return_call_indirect.wast:244 +assert_trap(() => invoke($0, `dispatch-structural`, [11]), `indirect call type mismatch`); + +// ./test/core/return_call_indirect.wast:245 +assert_trap(() => invoke($0, `dispatch-structural`, [16]), `indirect call type mismatch`); + +// ./test/core/return_call_indirect.wast:247 +assert_return(() => invoke($0, `call-tab`, [0]), [value("i32", 306)]); + +// ./test/core/return_call_indirect.wast:248 +assert_return(() => invoke($0, `call-tab`, [1]), [value("i32", 307)]); + +// ./test/core/return_call_indirect.wast:249 +assert_return(() => invoke($0, `call-tab`, [2]), [value("i32", 308)]); + +// ./test/core/return_call_indirect.wast:251 +assert_return(() => invoke($0, `fac`, [0n]), [value("i64", 1n)]); + +// ./test/core/return_call_indirect.wast:252 +assert_return(() => invoke($0, `fac`, [1n]), [value("i64", 1n)]); + +// ./test/core/return_call_indirect.wast:253 +assert_return(() => invoke($0, `fac`, [5n]), [value("i64", 120n)]); + +// ./test/core/return_call_indirect.wast:254 +assert_return(() => invoke($0, `fac`, [25n]), [value("i64", 7034535277573963776n)]); + +// ./test/core/return_call_indirect.wast:256 +assert_return(() => invoke($0, `even`, [0]), [value("i32", 44)]); + +// ./test/core/return_call_indirect.wast:257 +assert_return(() => invoke($0, `even`, [1]), [value("i32", 99)]); + +// ./test/core/return_call_indirect.wast:258 +assert_return(() => invoke($0, `even`, [100]), [value("i32", 44)]); + +// ./test/core/return_call_indirect.wast:259 +assert_return(() => invoke($0, `even`, [77]), [value("i32", 99)]); + +// ./test/core/return_call_indirect.wast:260 +assert_return(() => invoke($0, `even`, [100000]), [value("i32", 44)]); + +// ./test/core/return_call_indirect.wast:261 +assert_return(() => invoke($0, `even`, [111111]), [value("i32", 99)]); + +// ./test/core/return_call_indirect.wast:262 +assert_return(() => invoke($0, `odd`, [0]), [value("i32", 99)]); + +// ./test/core/return_call_indirect.wast:263 +assert_return(() => invoke($0, `odd`, [1]), [value("i32", 44)]); + +// ./test/core/return_call_indirect.wast:264 +assert_return(() => invoke($0, `odd`, [200]), [value("i32", 99)]); + +// ./test/core/return_call_indirect.wast:265 +assert_return(() => invoke($0, `odd`, [77]), [value("i32", 44)]); + +// ./test/core/return_call_indirect.wast:266 +assert_return(() => invoke($0, `odd`, [200002]), [value("i32", 99)]); + +// ./test/core/return_call_indirect.wast:267 +assert_return(() => invoke($0, `odd`, [300003]), [value("i32", 44)]); + +// ./test/core/return_call_indirect.wast:272 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (return_call_indirect (type $$sig) (result i32) (param i32) (i32.const 0) (i32.const 0) ) ) `), + `unexpected token`, +); + +// ./test/core/return_call_indirect.wast:284 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (return_call_indirect (param i32) (type $$sig) (result i32) (i32.const 0) (i32.const 0) ) ) `), + `unexpected token`, +); + +// ./test/core/return_call_indirect.wast:296 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (return_call_indirect (param i32) (result i32) (type $$sig) (i32.const 0) (i32.const 0) ) ) `), + `unexpected token`, +); + +// ./test/core/return_call_indirect.wast:308 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (return_call_indirect (result i32) (type $$sig) (param i32) (i32.const 0) (i32.const 0) ) ) `), + `unexpected token`, +); + +// ./test/core/return_call_indirect.wast:320 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (return_call_indirect (result i32) (param i32) (type $$sig) (i32.const 0) (i32.const 0) ) ) `), + `unexpected token`, +); + +// ./test/core/return_call_indirect.wast:332 +assert_malformed( + () => instantiate(`(table 0 funcref) (func (result i32) (return_call_indirect (result i32) (param i32) (i32.const 0) (i32.const 0) ) ) `), + `unexpected token`, +); + +// ./test/core/return_call_indirect.wast:344 +assert_malformed( + () => instantiate(`(table 0 funcref) (func (return_call_indirect (param $$x i32) (i32.const 0) (i32.const 0))) `), + `unexpected token`, +); + +// ./test/core/return_call_indirect.wast:351 +assert_malformed( + () => instantiate(`(type $$sig (func)) (table 0 funcref) (func (result i32) (return_call_indirect (type $$sig) (result i32) (i32.const 0)) ) `), + `inline function type`, +); + +// ./test/core/return_call_indirect.wast:361 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (return_call_indirect (type $$sig) (result i32) (i32.const 0)) ) `), + `inline function type`, +); + +// ./test/core/return_call_indirect.wast:371 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (return_call_indirect (type $$sig) (param i32) (i32.const 0) (i32.const 0) ) ) `), + `inline function type`, +); + +// ./test/core/return_call_indirect.wast:383 +assert_malformed( + () => instantiate(`(type $$sig (func (param i32 i32) (result i32))) (table 0 funcref) (func (result i32) (return_call_indirect (type $$sig) (param i32) (result i32) (i32.const 0) (i32.const 0) ) ) `), + `inline function type`, +); + +// ./test/core/return_call_indirect.wast:398 +assert_invalid( + () => instantiate(`(module + (type (func)) + (func $$no-table (return_call_indirect (type 0) (i32.const 0))) + )`), + `unknown table`, +); + +// ./test/core/return_call_indirect.wast:406 +assert_invalid( + () => instantiate(`(module + (type (func)) + (table 0 funcref) + (func $$type-void-vs-num (i32.eqz (return_call_indirect (type 0) (i32.const 0)))) + )`), + `type mismatch`, +); + +// ./test/core/return_call_indirect.wast:414 +assert_invalid( + () => instantiate(`(module + (type (func (result i64))) + (table 0 funcref) + (func $$type-num-vs-num (i32.eqz (return_call_indirect (type 0) (i32.const 0)))) + )`), + `type mismatch`, +); + +// ./test/core/return_call_indirect.wast:423 +assert_invalid( + () => instantiate(`(module + (type (func (param i32))) + (table 0 funcref) + (func $$arity-0-vs-1 (return_call_indirect (type 0) (i32.const 0))) + )`), + `type mismatch`, +); + +// ./test/core/return_call_indirect.wast:431 +assert_invalid( + () => instantiate(`(module + (type (func (param f64 i32))) + (table 0 funcref) + (func $$arity-0-vs-2 (return_call_indirect (type 0) (i32.const 0))) + )`), + `type mismatch`, +); + +// ./test/core/return_call_indirect.wast:440 +let $1 = instantiate(`(module + (type (func)) + (table 0 funcref) + (func $$arity-1-vs-0 (return_call_indirect (type 0) (i32.const 1) (i32.const 0))) +)`); + +// ./test/core/return_call_indirect.wast:446 +let $2 = instantiate(`(module + (type (func)) + (table 0 funcref) + (func $$arity-2-vs-0 + (return_call_indirect (type 0) (f64.const 2) (i32.const 1) (i32.const 0)) + ) +)`); + +// ./test/core/return_call_indirect.wast:454 +assert_invalid( + () => instantiate(`(module + (type (func (param i32))) + (table 0 funcref) + (func $$type-func-void-vs-i32 (return_call_indirect (type 0) (i32.const 1) (nop))) + )`), + `type mismatch`, +); + +// ./test/core/return_call_indirect.wast:462 +assert_invalid( + () => instantiate(`(module + (type (func (param i32))) + (table 0 funcref) + (func $$type-func-num-vs-i32 (return_call_indirect (type 0) (i32.const 0) (i64.const 1))) + )`), + `type mismatch`, +); + +// ./test/core/return_call_indirect.wast:471 +assert_invalid( + () => instantiate(`(module + (type (func (param i32 i32))) + (table 0 funcref) + (func $$type-first-void-vs-num + (return_call_indirect (type 0) (nop) (i32.const 1) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/return_call_indirect.wast:481 +assert_invalid( + () => instantiate(`(module + (type (func (param i32 i32))) + (table 0 funcref) + (func $$type-second-void-vs-num + (return_call_indirect (type 0) (i32.const 1) (nop) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/return_call_indirect.wast:491 +assert_invalid( + () => instantiate(`(module + (type (func (param i32 f64))) + (table 0 funcref) + (func $$type-first-num-vs-num + (return_call_indirect (type 0) (f64.const 1) (i32.const 1) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/return_call_indirect.wast:501 +assert_invalid( + () => instantiate(`(module + (type (func (param f64 i32))) + (table 0 funcref) + (func $$type-second-num-vs-num + (return_call_indirect (type 0) (i32.const 1) (f64.const 1) (i32.const 0)) + ) + )`), + `type mismatch`, +); + +// ./test/core/return_call_indirect.wast:515 +assert_invalid( + () => instantiate(`(module + (table 0 funcref) + (func $$unbound-type (return_call_indirect (type 1) (i32.const 0))) + )`), + `unknown type`, +); + +// ./test/core/return_call_indirect.wast:522 +assert_invalid( + () => instantiate(`(module + (table 0 funcref) + (func $$large-type (return_call_indirect (type 1012321300) (i32.const 0))) + )`), + `unknown type`, +); + +// ./test/core/return_call_indirect.wast:533 +assert_invalid( + () => instantiate(`(module (table funcref (elem 0 0)))`), + `unknown function 0`, +); diff --git a/js/src/jit-test/tests/wasm/stack.js b/js/src/jit-test/tests/wasm/stack.js new file mode 100644 index 0000000000..3c0dc72c58 --- /dev/null +++ b/js/src/jit-test/tests/wasm/stack.js @@ -0,0 +1,67 @@ +// Test instructions with no return value interposed between pushes and pops. +wasmFullPass(` (module + (memory 1) + + (func (result i32) + (local $local f64) + i32.const 0 + i32.const 16 + i32.store + i32.const 0 + i32.load + i32.const 0 + if + i32.const 0 + call $returnVoid + i32.const 21 + i32.store + i32.const 22 + drop + else + i32.const 0 + i32.const 17 + i32.store + end + block (result i32) + block (result i32) + i32.const 2 + if (result i32) + i32.const 500 + else + i32.const 501 + end + end + end + drop + i32.const 0 + i32.load + f64.const 5.0 + local.set $local + f64.const 5.0 + local.tee $local + drop + block + i32.const 0 + i32.const 18 + i32.store + nop + i32.const 0 + i32.const 19 + call $returnVoid + i32.store + loop + i32.const 1 + if + i32.const 0 + i32.const 20 + i32.store + end + end + end + i32.add + ) + + (func $returnVoid) + + (export "run" (func 0)) +)`, 33); diff --git a/js/src/jit-test/tests/wasm/start.js b/js/src/jit-test/tests/wasm/start.js new file mode 100644 index 0000000000..2591d30321 --- /dev/null +++ b/js/src/jit-test/tests/wasm/start.js @@ -0,0 +1,49 @@ +assertErrorMessage(() => wasmEvalText('(module (func) (start 0) (start 0))'), SyntaxError, /wasm text error/); +assertErrorMessage(() => wasmEvalText('(module (func) (start $unknown))'), SyntaxError, /failed to find/); + +wasmFailValidateText('(module (func) (start 1))', /unknown start function/); +wasmFailValidateText('(module (func (param i32)) (start 0))', /must be nullary/); +wasmFailValidateText('(module (func (param i32) (param f32)) (start 0))', /must be nullary/); +wasmFailValidateText('(module (func (param i32) (param f32) (param f64)) (start 0))', /must be nullary/); +wasmFailValidateText('(module (func (result f32)) (start 0))', /must not return anything/); + +// Basic use case. +var count = 0; +function inc() { count++; } +var exports = wasmEvalText(`(module (import "" "inc" (func $imp)) (func $f (call $imp)) (start $f))`, { "":{inc} }).exports; +assertEq(count, 1); +assertEq(Object.keys(exports).length, 0); + +count = 0; +exports = wasmEvalText(`(module (import "" "inc" (func)) (func $start (call 0)) (start $start) (export "" (func 0)))`, { "":{inc} }).exports; +assertEq(count, 1); +assertEq(typeof exports[""], 'function'); +assertEq(exports[""](), undefined); +assertEq(count, 2); + +// New API. +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; + +count = 0; +const m = new Module(wasmTextToBinary('(module (import "" "inc" (func $imp)) (func) (func $start (call $imp)) (start $start) (export "" (func $start)))')); +assertEq(count, 0); + +assertErrorMessage(() => new Instance(m), TypeError, /second argument must be an object/); +assertEq(count, 0); + +const i1 = new Instance(m, { "":{inc} }); +assertEq(count, 1); +i1.exports[""](); +assertEq(count, 2); + +const i2 = new Instance(m, { "":{inc} }); +assertEq(count, 3); + +function fail() { assertEq(true, false); } + +count = 0; +const m2 = new Module(wasmTextToBinary('(module (import "" "fail" (func)) (import "" "inc" (func $imp)) (func) (start $imp))')); +assertEq(count, 0); +new Instance(m2, {"":{ inc, fail }}); +assertEq(count, 1); diff --git a/js/src/jit-test/tests/wasm/stealing.js b/js/src/jit-test/tests/wasm/stealing.js new file mode 100644 index 0000000000..6e4e60b9b1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/stealing.js @@ -0,0 +1,17 @@ +var exp = wasmEvalText(`(module + (memory 1) + (export "mem" (memory 0)) + (func $f (result i32) (i32.load (i32.const 0))) + (export "f" (func $f)) +)`).exports; + +var ab = exp.mem.buffer; +new Int32Array(ab)[0] = 42; + +assertEq(exp.f(), 42); + +assertThrowsInstanceOf(() => detachArrayBuffer(ab), Error); +assertEq(exp.f(), 42); + +assertThrowsInstanceOf(() => serialize(ab, [ab]), Error); +assertEq(exp.f(), 42); diff --git a/js/src/jit-test/tests/wasm/streaming.js b/js/src/jit-test/tests/wasm/streaming.js new file mode 100644 index 0000000000..d87abe37be --- /dev/null +++ b/js/src/jit-test/tests/wasm/streaming.js @@ -0,0 +1,99 @@ +// |jit-test| skip-if: !wasmStreamingEnabled() + +load(libdir + "wasm-binary.js"); + +function testInstantiate(source, importObj, exportName, expectedValue) { + var result; + WebAssembly.instantiateStreaming(code, importObj).then(r => { result = r }); + drainJobQueue(); + assertEq(result !== undefined, true); + assertEq(result.module instanceof WebAssembly.Module, true); + assertEq(result.instance instanceof WebAssembly.Instance, true); + assertEq(result.instance.exports[exportName](), expectedValue); +} +function testBoth(source, exportName, expectedValue) { + var module; + WebAssembly.compileStreaming(code).then(m => { module = m }); + drainJobQueue(); + assertEq(module !== undefined, true); + assertEq(module instanceof WebAssembly.Module, true); + assertEq(new WebAssembly.Instance(module).exports[exportName](), expectedValue); + + testInstantiate(source, undefined, exportName, expectedValue); +} + +function testFailInstantiate(source, importObj, error) { + var caught = false; + WebAssembly.instantiateStreaming(source).catch(err => { + assertEq(err instanceof error, true); + caught = true; + }); + drainJobQueue(); + assertEq(caught, true); +} +function testFailBoth(source, error) { + var caught = false; + WebAssembly.compileStreaming(source).catch(err => { + assertEq(err instanceof error, true); + caught = true; + }); + drainJobQueue(); + assertEq(caught, true); + + testFailInstantiate(source, undefined, error); +} + +var code = wasmTextToBinary('(module (func (export "run") (result i32) i32.const 42))'); +testBoth(code, 'run', 42); +testFailBoth(42, TypeError); +testBoth(Promise.resolve(code), 'run', 42); +testFailBoth(Promise.resolve(42), TypeError); +testFailBoth(Promise.reject(new String("fail")), String); +testBoth({then(resolve) { resolve(code) }}, 'run', 42); +testFailBoth({then(resolve) { resolve(42) }}, TypeError); +testFailBoth(new Promise((resolve, reject) => { reject(new Error("hi")) }), Error); +testFailBoth(new Promise((resolve, reject) => { reject(new String("hi")) }), String); + +var code = wasmTextToBinary('(module (func $im (import "js" "foo") (result i32)) (func (export "run") (result i32) (i32.add (i32.const 1) (call $im))))'); +testInstantiate(code, {js:{foo() { return 42 }}}, 'run', 43); +testFailInstantiate(code, null, TypeError); +testFailInstantiate(code, {js:42}, TypeError); +testFailInstantiate(code, {js:{foo:42}}, TypeError); + +var text = `(module\n`; +text += ` (func (result i32) i32.const 0)\n`; +for (var i = 1; i <= 200; i++) + text += ` (func (result i32) (i32.add (i32.const ${i}) (call ${i-1})))\n`; +text += ` (func (export "run") (result i32) call 100)\n`; +text += `)`; +var code = wasmTextToBinary(text); + +// fuzzing-safe disables setBufferStreamParams +if (typeof setBufferStreamParams == 'function') { + assertEq(code.length > 1000, true); + for ([delayMillis, chunkSize] of [[0, 10], [1, 10], [0, 100], [1, 100], [0, 1000], [1, 1000], [10, 1000]]) { + setBufferStreamParams(delayMillis, chunkSize); + testBoth(code, 'run', 5050); + } + + setBufferStreamParams(1, 100); + var arr = []; + for (var i = 0; i < 10; i++) + arr.push(WebAssembly.instantiateStreaming(code)); + var results; + Promise.all(arr).then(r => results = r); + drainJobQueue(); + assertEq(results.length === 10, true); + for (var i = 0; i < 10; i++) + assertEq(results[i].instance.exports.run(), 5050); +} + +// No code section, but data section: +var code = wasmTextToBinary('(module (memory (import "js" "mem") 1) (data (i32.const 0) "a"))'); +var mem = new WebAssembly.Memory({initial:1}); +WebAssembly.instantiateStreaming(code, {js:{mem}}); +drainJobQueue(); +assertEq(new Uint8Array(mem.buffer)[0], 97); + +// Junk section before code section. +testFailBoth(moduleWithSections([{name: 100, body: [1, 2, 3]}, bodySection([])]), WebAssembly.CompileError); diff --git a/js/src/jit-test/tests/wasm/table-gc.js b/js/src/jit-test/tests/wasm/table-gc.js new file mode 100644 index 0000000000..c96c70311f --- /dev/null +++ b/js/src/jit-test/tests/wasm/table-gc.js @@ -0,0 +1,221 @@ +// |jit-test| --no-baseline; --no-blinterp +// Turn off baseline and since it messes up the GC finalization assertions by +// adding spurious edges to the GC graph. + +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Table = WebAssembly.Table; +const RuntimeError = WebAssembly.RuntimeError; + +var caller = `(type $v2i (func (result i32))) (func $call (param $i i32) (result i32) (call_indirect (type $v2i) (local.get $i))) (export "call" (func $call))` +var callee = i => `(func $f${i} (type $v2i) (i32.const ${i}))`; + +// A table should not hold exported functions alive and exported functions +// should not hold their originating table alive. Live exported functions should +// hold instances alive and instances hold imported tables alive. Nothing +// should hold the export object alive. +resetFinalizeCount(); +var i = wasmEvalText(`(module (table 2 funcref) (export "tbl" (table 0)) (elem (i32.const 0) $f0) ${callee(0)} ${caller})`); +var e = i.exports; +var t = e.tbl; +var f = t.get(0); +assertEq(f(), e.call(0)); +assertErrorMessage(() => e.call(1), RuntimeError, /indirect call to null/); +assertErrorMessage(() => e.call(2), RuntimeError, /index out of bounds/); +assertEq(finalizeCount(), 0); +i.edge = makeFinalizeObserver(); +t.edge = makeFinalizeObserver(); +f.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 0); +f.x = 42; +f = null; +gc(); +assertEq(finalizeCount(), 0); +f = t.get(0); +assertEq(f.x, 42); +gc(); +assertEq(finalizeCount(), 0); +i.exports = null; +e = null; +gc(); +assertEq(finalizeCount(), 0); +t = null; +gc(); +assertEq(finalizeCount(), 0); +i = null; +gc(); +assertEq(finalizeCount(), 0); +assertEq(f(), 0); +f = null; +gc(); +assertEq(finalizeCount(), 3); + +// A table should hold the instance of any of its elements alive. +resetFinalizeCount(); +var i = wasmEvalText(`(module (table 1 funcref) (export "tbl" (table 0)) (elem (i32.const 0) $f0) ${callee(0)} ${caller})`); +var e = i.exports; +var t = e.tbl; +var f = t.get(0); +i.edge = makeFinalizeObserver(); +t.edge = makeFinalizeObserver(); +f.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 0); +i.exports = null; +e = null; +gc(); +assertEq(finalizeCount(), 0); +f = null; +gc(); +assertEq(finalizeCount(), 0); +i = null; +gc(); +assertEq(finalizeCount(), 0); +t = null; +gc(); +assertEq(finalizeCount(), 3); + +// Null elements shouldn't keep anything alive. +resetFinalizeCount(); +var i = wasmEvalText(`(module (table 2 funcref) (export "tbl" (table 0)) ${caller})`); +var e = i.exports; +var t = e.tbl; +i.edge = makeFinalizeObserver(); +t.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 0); +i.exports = null; +e = null; +gc(); +assertEq(finalizeCount(), 0); +i = null; +gc(); +assertEq(finalizeCount(), 1); +t = null; +gc(); +assertEq(finalizeCount(), 2); + +// Before initialization, a table is not bound to any instance. +resetFinalizeCount(); +var i = wasmEvalText(`(module (func $f0 (result i32) (i32.const 0)) (export "f0" (func $f0)))`); +var t = new Table({initial:4, element:"anyfunc"}); +i.edge = makeFinalizeObserver(); +t.edge = makeFinalizeObserver(); +gc(); +assertEq(finalizeCount(), 0); +i = null; +gc(); +assertEq(finalizeCount(), 1); +t = null; +gc(); +assertEq(finalizeCount(), 2); + +// When a Table is created (uninitialized) and then first assigned, it keeps the +// first element's Instance alive (as above). +resetFinalizeCount(); +var i = wasmEvalText(`(module (func $f (result i32) (i32.const 42)) (export "f" (func $f)))`); +var f = i.exports.f; +var t = new Table({initial:1, element:"anyfunc"}); +i.edge = makeFinalizeObserver(); +f.edge = makeFinalizeObserver(); +t.edge = makeFinalizeObserver(); +t.set(0, f); +assertEq(t.get(0), f); +assertEq(t.get(0)(), 42); +gc(); +assertEq(finalizeCount(), 0); +f = null; +i.exports = null; +gc(); +assertEq(finalizeCount(), 0); +assertEq(t.get(0)(), 42); +i = null; +gc(); +assertEq(finalizeCount(), 0); +t.set(0, null); +assertEq(t.get(0), null); +gc(); +assertEq(finalizeCount(), 2); +t = null; +gc(); +assertEq(finalizeCount(), 3); + +// Once all of an instance's elements in a Table have been clobbered, the +// Instance should not be reachable. +resetFinalizeCount(); +var i1 = wasmEvalText(`(module (func $f1 (result i32) (i32.const 13)) (export "f1" (func $f1)))`); +var i2 = wasmEvalText(`(module (func $f2 (result i32) (i32.const 42)) (export "f2" (func $f2)))`); +var f1 = i1.exports.f1; +var f2 = i2.exports.f2; +var t = new Table({initial:2, element:"anyfunc"}); +i1.edge = makeFinalizeObserver(); +i2.edge = makeFinalizeObserver(); +f1.edge = makeFinalizeObserver(); +f2.edge = makeFinalizeObserver(); +t.edge = makeFinalizeObserver(); +t.set(0, f1); +t.set(1, f2); +gc(); +assertEq(finalizeCount(), 0); +f1 = f2 = null; +i1.exports = null; +i2.exports = null; +gc(); +assertEq(finalizeCount(), 0); +i1 = null; +i2 = null; +gc(); +assertEq(finalizeCount(), 0); +t.set(0, t.get(1)); +gc(); +assertEq(finalizeCount(), 2); +t.set(0, null); +t.set(1, null); +gc(); +assertEq(finalizeCount(), 4); +t = null; +gc(); +assertEq(finalizeCount(), 5); + +// Ensure that an instance that is only live on the stack cannot be GC even if +// there are no outstanding references. +resetFinalizeCount(); +const N = 10; +var tbl = new Table({initial:N, element:"anyfunc"}); +tbl.edge = makeFinalizeObserver(); +function runTest() { + tbl = null; + gc(); + assertEq(finalizeCount(), 0); + return 100; +} +var i = wasmEvalText( + `(module + (import "a" "b" (func $imp (result i32))) + (func $f (param i32) (result i32) (call $imp)) + (export "f" (func $f)) + )`, + {a:{b:runTest}} +); +i.edge = makeFinalizeObserver(); +tbl.set(0, i.exports.f); +var m = new Module(wasmTextToBinary(`(module + (import "a" "b" (table ${N} funcref)) + (type $i2i (func (param i32) (result i32))) + (func $f (param $i i32) (result i32) + (local.set $i (i32.sub (local.get $i) (i32.const 1))) + (i32.add + (i32.const 1) + (call_indirect (type $i2i) (local.get $i) (local.get $i)))) + (export "f" (func $f)) +)`)); +for (var i = 1; i < N; i++) { + var inst = new Instance(m, {a:{b:tbl}}); + inst.edge = makeFinalizeObserver(); + tbl.set(i, inst.exports.f); +} +inst = null; +assertEq(tbl.get(N - 1)(N - 1), 109); +gc(); +assertEq(finalizeCount(), N + 1); diff --git a/js/src/jit-test/tests/wasm/table-pre-barrier.js b/js/src/jit-test/tests/wasm/table-pre-barrier.js new file mode 100644 index 0000000000..4069f634ab --- /dev/null +++ b/js/src/jit-test/tests/wasm/table-pre-barrier.js @@ -0,0 +1,22 @@ +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Table = WebAssembly.Table; + +var i42 = new Instance(new Module(wasmTextToBinary(`(module (func (result i32) (i32.const 42)) (export "f" (func 0)))`))); +var i13 = new Instance(new Module(wasmTextToBinary(`(module (func (result i32) (i32.const 13)) (export "f" (func 0)))`))); +var t = new Table({element:"anyfunc", initial:1}); +t.set(0, i42.exports.f); + +assertEq(t.get(0)(), 42); + +verifyprebarriers(); +t.set(0, i13.exports.f); +verifyprebarriers(); + +assertEq(t.get(0)(), 13); + +verifyprebarriers(); +t.set(0, null); +verifyprebarriers(); + +assertEq(t.get(0), null); diff --git a/js/src/jit-test/tests/wasm/tables.js b/js/src/jit-test/tests/wasm/tables.js new file mode 100644 index 0000000000..3f0003b4a1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tables.js @@ -0,0 +1,400 @@ +const Module = WebAssembly.Module; +const Instance = WebAssembly.Instance; +const Table = WebAssembly.Table; +const Memory = WebAssembly.Memory; +const LinkError = WebAssembly.LinkError; +const RuntimeError = WebAssembly.RuntimeError; + +const badFuncRefError = /can only pass WebAssembly exported functions to funcref/; + +function assertSegmentFitError(f) { + assertErrorMessage(f, RuntimeError, /out of bounds/); +} + +var callee = i => `(func $f${i} (result i32) (i32.const ${i}))`; + +wasmFailValidateText(`(module (elem (i32.const 0) $f0) ${callee(0)})`, /elem segment requires a table/); +wasmFailValidateText(`(module (table 10 funcref) (elem (i32.const 0) 0))`, /element index out of range/); +wasmFailValidateText(`(module (table 10 funcref) (func) (elem (i32.const 0) 0 1))`, /element index out of range/); +wasmFailValidateText(`(module (table 10 funcref) (func) (elem (f32.const 0) 0) ${callee(0)})`, /type mismatch/); + +assertSegmentFitError(() => wasmEvalText(`(module (table 10 funcref) (elem (i32.const 10) $f0) ${callee(0)})`)); +assertSegmentFitError(() => wasmEvalText(`(module (table 10 funcref) (elem (i32.const 8) $f0 $f0 $f0) ${callee(0)})`)); +assertSegmentFitError(() => wasmEvalText(`(module (table 0 funcref) (func) (elem (i32.const 0x10001)))`)); + +assertSegmentFitError(() => wasmEvalText(`(module (import "globals" "a" (global i32)) (table 10 funcref) (elem (global.get 0) $f0) ${callee(0)})`, {globals:{a:10}})); +assertSegmentFitError(() => wasmEvalText(`(module (import "globals" "a" (global i32)) (table 10 funcref) (elem (global.get 0) $f0 $f0 $f0) ${callee(0)})`, {globals:{a:8}})); + +assertEq(new Module(wasmTextToBinary(`(module (table 10 funcref) (elem (i32.const 1) $f0 $f0) (elem (i32.const 0) $f0) ${callee(0)})`)) instanceof Module, true); +assertEq(new Module(wasmTextToBinary(`(module (table 10 funcref) (elem (i32.const 1) $f0 $f0) (elem (i32.const 2) $f0) ${callee(0)})`)) instanceof Module, true); +wasmEvalText(`(module (import "globals" "a" (global i32)) (table 10 funcref) (elem (i32.const 1) $f0 $f0) (elem (global.get 0) $f0) ${callee(0)})`, {globals:{a:0}}); +wasmEvalText(`(module (import "globals" "a" (global i32)) (table 10 funcref) (elem (global.get 0) $f0 $f0) (elem (i32.const 2) $f0) ${callee(0)})`, {globals:{a:1}}); + +// Explicit table index in a couple of ways, note this requires us to talk about the table type also. +assertEq(new Module(wasmTextToBinary(`(module + (table 10 funcref) + (table 10 funcref) + (elem 1 (i32.const 1) func $f0 $f0) + ${callee(0)})`)) instanceof Module, true); +assertEq(new Module(wasmTextToBinary(`(module + (table 10 funcref) + (table 10 funcref) + (elem (table 1) (i32.const 1) func $f0 $f0) + ${callee(0)})`)) instanceof Module, true); + +// With "funcref" rather than "func". +assertEq(new Module(wasmTextToBinary(`(module + (table 10 funcref) + (table 10 funcref) + (elem (table 1) (i32.const 1) funcref (ref.func $f0) (ref.func $f0)) + ${callee(0)})`)) instanceof Module, true); + +// Syntax for the offset, ditto. +assertEq(new Module(wasmTextToBinary(`(module + (table 10 funcref) + (table 10 funcref) + (elem 1 (offset (i32.const 1)) func $f0 $f0) + ${callee(0)})`)) instanceof Module, true); + +var m = new Module(wasmTextToBinary(` + (module + (import "globals" "table" (table 10 funcref)) + (import "globals" "a" (global i32)) + (elem (global.get 0) $f0 $f0) + ${callee(0)}) +`)); +var tbl = new Table({initial:50, element:"anyfunc"}); +assertEq(new Instance(m, {globals:{a:20, table:tbl}}) instanceof Instance, true); +assertSegmentFitError(() => new Instance(m, {globals:{a:50, table:tbl}})); + +var caller = `(type $v2i (func (result i32))) (func $call (param $i i32) (result i32) (call_indirect (type $v2i) (local.get $i))) (export "call" (func $call))` +var callee = i => `(func $f${i} (type $v2i) (i32.const ${i}))`; + +var call = wasmEvalText(`(module (table 10 funcref) ${callee(0)} ${caller})`).exports.call; +assertErrorMessage(() => call(0), RuntimeError, /indirect call to null/); +assertErrorMessage(() => call(10), RuntimeError, /index out of bounds/); + +var call = wasmEvalText(`(module (table 10 funcref) (elem (i32.const 0)) ${callee(0)} ${caller})`).exports.call; +assertErrorMessage(() => call(0), RuntimeError, /indirect call to null/); +assertErrorMessage(() => call(10), RuntimeError, /index out of bounds/); + +var call = wasmEvalText(`(module (table 10 funcref) (elem (i32.const 0) $f0) ${callee(0)} ${caller})`).exports.call; +assertEq(call(0), 0); +assertErrorMessage(() => call(1), RuntimeError, /indirect call to null/); +assertErrorMessage(() => call(2), RuntimeError, /indirect call to null/); +assertErrorMessage(() => call(10), RuntimeError, /index out of bounds/); + +var call = wasmEvalText(`(module (table 10 funcref) (elem (i32.const 1) $f0 $f1) (elem (i32.const 4) $f0 $f2) ${callee(0)} ${callee(1)} ${callee(2)} ${caller})`).exports.call; +assertErrorMessage(() => call(0), RuntimeError, /indirect call to null/); +assertEq(call(1), 0); +assertEq(call(2), 1); +assertErrorMessage(() => call(3), RuntimeError, /indirect call to null/); +assertEq(call(4), 0); +assertEq(call(5), 2); +assertErrorMessage(() => call(6), RuntimeError, /indirect call to null/); +assertErrorMessage(() => call(10), RuntimeError, /index out of bounds/); + +var imports = {a:{b:()=>42}}; +var call = wasmEvalText(`(module (import "a" "b" (func $f1)) (import "a" "b" (func $f2 (result i32))) (table 10 funcref) (elem (i32.const 0) $f0 $f1 $f2) ${callee(0)} ${caller})`, imports).exports.call; +assertEq(call(0), 0); +assertErrorMessage(() => call(1), RuntimeError, /indirect call signature mismatch/); +assertEq(call(2), 42); + +var tbl = new Table({initial:3, element:"anyfunc"}); +var call = wasmEvalText(`(module (import "a" "b" (table 3 funcref)) (export "tbl" (table 0)) (elem (i32.const 0) $f0 $f1) ${callee(0)} ${callee(1)} ${caller})`, {a:{b:tbl}}).exports.call; +assertEq(call(0), 0); +assertEq(call(1), 1); +assertEq(tbl.get(0)(), 0); +assertEq(tbl.get(1)(), 1); +assertErrorMessage(() => call(2), RuntimeError, /indirect call to null/); +assertEq(tbl.get(2), null); + +var exp = wasmEvalText(`(module (import "a" "b" (table 3 funcref)) (export "tbl" (table 0)) (elem (i32.const 2) $f2) ${callee(2)} ${caller})`, {a:{b:tbl}}).exports; +assertEq(exp.tbl, tbl); +assertEq(exp.call(0), 0); +assertEq(exp.call(1), 1); +assertEq(exp.call(2), 2); +assertEq(call(0), 0); +assertEq(call(1), 1); +assertEq(call(2), 2); +assertEq(tbl.get(0)(), 0); +assertEq(tbl.get(1)(), 1); +assertEq(tbl.get(2)(), 2); + +var exp1 = wasmEvalText(`(module (table 10 funcref) (export "tbl" (table 0)) (elem (i32.const 0) $f0 $f0) ${callee(0)} (export "f0" (func $f0)) ${caller})`).exports +assertEq(exp1.tbl.get(0), exp1.f0); +assertEq(exp1.tbl.get(1), exp1.f0); +assertEq(exp1.tbl.get(2), null); +assertEq(exp1.call(0), 0); +assertEq(exp1.call(1), 0); +assertErrorMessage(() => exp1.call(2), RuntimeError, /indirect call to null/); +var exp2 = wasmEvalText(`(module (import "a" "b" (table 10 funcref)) (export "tbl" (table 0)) (elem (i32.const 1) $f1 $f1) ${callee(1)} (export "f1" (func $f1)) ${caller})`, {a:{b:exp1.tbl}}).exports +assertEq(exp1.tbl, exp2.tbl); +assertEq(exp2.tbl.get(0), exp1.f0); +assertEq(exp2.tbl.get(1), exp2.f1); +assertEq(exp2.tbl.get(2), exp2.f1); +assertEq(exp1.call(0), 0); +assertEq(exp1.call(1), 1); +assertEq(exp1.call(2), 1); +assertEq(exp2.call(0), 0); +assertEq(exp2.call(1), 1); +assertEq(exp2.call(2), 1); + +var tbl = new Table({initial:3, element:"anyfunc"}); +var e1 = wasmEvalText(`(module (func $f (result i32) (i32.const 42)) (export "f" (func $f)))`).exports; +var e2 = wasmEvalText(`(module (func $g (result f32) (f32.const 10)) (export "g" (func $g)))`).exports; +var e3 = wasmEvalText(`(module (func $h (result i32) (i32.const 13)) (export "h" (func $h)))`).exports; +tbl.set(0, e1.f); +tbl.set(1, e2.g); +tbl.set(2, e3.h); +var e4 = wasmEvalText(`(module (import "a" "b" (table 3 funcref)) ${caller})`, {a:{b:tbl}}).exports; +assertEq(e4.call(0), 42); +assertErrorMessage(() => e4.call(1), RuntimeError, /indirect call signature mismatch/); +assertEq(e4.call(2), 13); + +var asmjsFun = (function() { "use asm"; function f() {} return f })(); +assertEq(isAsmJSFunction(asmjsFun), isAsmJSCompilationAvailable()); +assertErrorMessage(() => tbl.set(0, asmjsFun), TypeError, badFuncRefError); +assertErrorMessage(() => tbl.grow(1, asmjsFun), TypeError, badFuncRefError); + +var m = new Module(wasmTextToBinary(`(module + (type $i2i (func (param i32) (result i32))) + (import "a" "mem" (memory 1)) + (import "a" "tbl" (table 10 funcref)) + (import "a" "imp" (func $imp (result i32))) + (func $call (param $i i32) (result i32) + (i32.add + (call $imp) + (i32.add + (i32.load (i32.const 0)) + (if (result i32) (i32.eqz (local.get $i)) + (then (i32.const 0)) + (else + (local.set $i (i32.sub (local.get $i) (i32.const 1))) + (call_indirect (type $i2i) (local.get $i) (local.get $i))))))) + (export "call" (func $call)) +)`)); +var failTime = false; +var tbl = new Table({initial:10, element:"anyfunc"}); +var mem1 = new Memory({initial:1}); +var e1 = new Instance(m, {a:{mem:mem1, tbl, imp() {if (failTime) throw new Error("ohai"); return 1}}}).exports; +tbl.set(0, e1.call); +var mem2 = new Memory({initial:1}); +var e2 = new Instance(m, {a:{mem:mem2, tbl, imp() {return 10} }}).exports; +tbl.set(1, e2.call); +var mem3 = new Memory({initial:1}); +var e3 = new Instance(m, {a:{mem:mem3, tbl, imp() {return 100} }}).exports; +new Int32Array(mem1.buffer)[0] = 1000; +new Int32Array(mem2.buffer)[0] = 10000; +new Int32Array(mem3.buffer)[0] = 100000; +assertEq(e3.call(2), 111111); +failTime = true; +assertErrorMessage(() => e3.call(2), Error, "ohai"); + +// Call signatures are matched structurally: + +var call = wasmEvalText(`(module + (type $v2i1 (func (result i32))) + (type $v2i2 (func (result i32))) + (type $i2v (func (param i32))) + (table funcref (elem $a $b $c)) + (func $a (type $v2i1) (i32.const 0)) + (func $b (type $v2i2) (i32.const 1)) + (func $c (type $i2v)) + (func $call (param i32) (result i32) (call_indirect (type $v2i1) (local.get 0))) + (export "call" (func $call)) +)`).exports.call; +assertEq(call(0), 0); +assertEq(call(1), 1); +assertErrorMessage(() => call(2), RuntimeError, /indirect call signature mismatch/); + +var call = wasmEvalText(`(module + (type $A (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (type $B (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (type $C (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (type $D (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (type $E (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (type $F (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (type $G (func (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (param i32) (result i32))) + (table funcref (elem $a $b $c $d $e $f $g)) + (func $a (type $A) (local.get 7)) + (func $b (type $B) (local.get 8)) + (func $c (type $C) (local.get 9)) + (func $d (type $D) (local.get 10)) + (func $e (type $E) (local.get 11)) + (func $f (type $F) (local.get 12)) + (func $g (type $G) (local.get 13)) + (func $call (param i32) (result i32) + (call_indirect (type $A) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i32.const 42) (local.get 0))) + (export "call" (func $call)) +)`).exports.call; +assertEq(call(0), 42); +for (var i = 1; i < 7; i++) + assertErrorMessage(() => call(i), RuntimeError, /indirect call signature mismatch/); +assertErrorMessage(() => call(7), RuntimeError, /index out of bounds/); + +// Function identity isn't lost: +var tbl = wasmEvalText(`(module (table (export "tbl") funcref (elem $f)) (func $f))`).exports.tbl; +tbl.get(0).foo = 42; +gc(); +assertEq(tbl.get(0).foo, 42); + +(function testCrossRealmCall() { + var g = newGlobal({sameCompartmentAs: this}); + + // The memory.size builtin asserts cx->realm matches instance->realm so + // we call it here. + var src = ` + (module + (import "a" "t" (table 3 funcref)) + (import "a" "m" (memory 1)) + (func $f (result i32) (i32.add (i32.const 3) (memory.size))) + (elem (i32.const 0) $f)) + `; + g.mem = new Memory({initial:4}); + g.tbl = new Table({initial:3, element:"anyfunc"}); + var i1 = g.evaluate("new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`" + src + "`)), {a:{t:tbl,m:mem}})"); + + var call = new Instance(new Module(wasmTextToBinary(` + (module + (import "a" "t" (table 3 funcref)) + (import "a" "m" (memory 1)) + (type $v2i (func (result i32))) + (func $call (param $i i32) (result i32) (i32.add (call_indirect (type $v2i) (local.get $i)) (memory.size))) + (export "call" (func $call))) + `)), {a:{t:g.tbl,m:g.mem}}).exports.call; + + for (var i = 0; i < 10; i++) + assertEq(call(0), 11); +})(); + + +// Test active segments with a table index. + +{ + function makeIt(flag, tblindex) { + return new Uint8Array([0x00, 0x61, 0x73, 0x6d, + 0x01, 0x00, 0x00, 0x00, + 0x04, // Table section + 0x04, // Section size + 0x01, // One table + 0x70, // Type: FuncRef + 0x00, // Limits: Min only + 0x01, // Limits: Min + 0x09, // Elements section + 0x08, // Section size + 0x01, // One element segment + flag, // Flag should be 2, or > 2 if invalid + tblindex, // Table index must be 0, or > 0 if invalid + 0x41, // Init expr: i32.const + 0x00, // Init expr: zero (payload) + 0x0b, // Init expr: end + 0x00, // Extern kind: Function + 0x00]); // Zero functions + } + + // Should succeed because this is what an active segment with index looks like + new WebAssembly.Module(makeIt(0x02, 0x00)); + + // Should fail because the kind is unknown + assertErrorMessage(() => new WebAssembly.Module(makeIt(0x08, 0x00)), + WebAssembly.CompileError, + /invalid elem segment flags field/); + + // Should fail because the table index is invalid + assertErrorMessage(() => new WebAssembly.Module(makeIt(0x02, 0x01)), + WebAssembly.CompileError, + /table index out of range/); +} + +// table of externref +{ + const myArray = ["yay", "arrays"]; + const { set, get } = wasmEvalText(`(module + (table $t 2 externref) + + (func (export "set") (param i32 externref) + (table.set $t (local.get 0) (local.get 1)) + ) + (func (export "get") (param i32) (result externref) + (table.get $t (local.get 0)) + ) + )`).exports; + assertEq(get(0), null); + assertEq(get(1), null); + set(0, "hello"); + set(1, myArray); + assertEq(get(0), "hello"); + assertEq(get(1), myArray); +} + +// table of externref with active element segment +{ + const myArray = ["yay", "arrays"]; + const { get } = wasmEvalText(`(module + (global (import "test" "g1") externref) + (global (import "test" "g2") externref) + (table $t externref (elem (global.get 0) (global.get 1))) + + (func (export "get") (param i32) (result externref) + (table.get $t (local.get 0)) + ) + )`, { test: { g1: "hello", g2: myArray } }).exports; + assertEq(get(0), "hello"); + assertEq(get(1), myArray); +} + +// passive element segment of externref +{ + const myArray = ["yay", "arrays"]; + const { get } = wasmEvalText(`(module + (global (import "test" "g1") externref) + (global (import "test" "g2") externref) + (table $t 2 externref) + (elem $e externref (global.get 0) (global.get 1)) + + (func $start + (table.init $t $e (i32.const 0) (i32.const 0) (table.size $t)) + ) + (func (export "get") (param i32) (result externref) + (table.get $t (local.get 0)) + ) + + (start $start) + )`, { test: { g1: "hello", g2: myArray } }).exports; + assertEq(get(0), "hello"); + assertEq(get(1), myArray); +} + +// declared element segment of externref (literally useless but legal!) +{ + const myArray = ["yay", "arrays"]; + wasmEvalText(`(module + (global (import "test" "g1") externref) + (global (import "test" "g2") externref) + (elem $e declare externref (global.get 0) (global.get 1)) + )`, { test: { g1: "hello", g2: myArray } }); +} + +// result types are validated in element expressions +{ + assertErrorMessage(() => wasmEvalText(`(module + (elem $e externref (ref.func 0)) + (func) + )`), WebAssembly.CompileError, /expression has type (funcref|\(ref 0\)) but expected externref/); +} + +// non-GC: mutable globals are rejected (global.get is constant only if the global is constant) +if (!wasmGcEnabled()) { + assertErrorMessage(() => { + wasmEvalText(`(module + (global (import "test" "g1") (mut externref)) + (global (import "test" "g2") (mut externref)) + (table $t externref (elem (global.get 0) (global.get 1))) + + (func (export "get") (param i32) (result externref) + (table.get $t (local.get 0)) + ) + )`, { test: { g1: "hello", g2: ["yay", "arrays"] } }); + }, WebAssembly.CompileError, /global.get in initializer expression must reference a global immutable import/); +} diff --git a/js/src/jit-test/tests/wasm/tail-calls/bug1851568.js b/js/src/jit-test/tests/wasm/tail-calls/bug1851568.js new file mode 100644 index 0000000000..b9622042d8 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/bug1851568.js @@ -0,0 +1,20 @@ +wasmFailValidateText(`(module + (func (result i32 f64) + i32.const 1 + f64.const 2.0 + ) + (func (export "f") (result f64) + return_call 0 + ) +)`, /type mismatch/); + +wasmFailValidateText(`(module + (func (result i32 f64) + i32.const 1 + f64.const 2.0 + ) + (func (export "f") (result f32 i32 f64) + f32.const 3.14 + return_call 0 + ) +)`, /type mismatch/); diff --git a/js/src/jit-test/tests/wasm/tail-calls/bug1862473.js b/js/src/jit-test/tests/wasm/tail-calls/bug1862473.js new file mode 100644 index 0000000000..57e5ea2118 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/bug1862473.js @@ -0,0 +1,24 @@ +// |jit-test| --wasm-gc; skip-if: !wasmGcEnabled() + +var ins = wasmEvalText(`(module + (func $func1) + (func $func2 (param i32 arrayref arrayref i32 i32 i32 i32) + return_call $func1 + ) + (func (export "test") + i32.const 1 + ref.null array + ref.null array + i32.const -2 + i32.const -3 + i32.const -4 + i32.const -5 + call $func2 + + ref.null array + ref.cast (ref array) + drop + ) +)`); + +assertErrorMessage(() => ins.exports.test(), WebAssembly.RuntimeError, /bad cast/); diff --git a/js/src/jit-test/tests/wasm/tail-calls/bug1865044.js b/js/src/jit-test/tests/wasm/tail-calls/bug1865044.js new file mode 100644 index 0000000000..042e641f32 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/bug1865044.js @@ -0,0 +1,34 @@ +// |jit-test| --more-compartments; skip-variant-if: --wasm-test-serialization, true; skip-variant-if: --wasm-compiler=ion, true; skip-if: !wasmGcEnabled() || !('Function' in WebAssembly) + +a = newGlobal(); +a.b = this; +a.eval("(" + function () { + Debugger(b).onExceptionUnwind = function () {} +} + ")()"); +function c(d) { + binary = wasmTextToBinary(d) + e = new WebAssembly.Module(binary) + return new WebAssembly.Instance(e) +} +f = c(` +(type $g + (func (param i64 i64 funcref) (result i64)) +) +(func (export "vis") (param i64 i64 funcref) (result i64) + local.get 0 + local.get 1 + local.get 2 + local.get 2 + ref.cast (ref $g) + return_call_ref $g +) +`); +h = f.exports["vis"]; +i = new WebAssembly.Function({ + parameters: [ "i64", "i64", "funcref" ], results: ["i64"] +}, function () {}); + +assertErrorMessage( + () => h(3n, 1n, i), + TypeError, /can't convert undefined to BigInt/ +); diff --git a/js/src/jit-test/tests/wasm/tail-calls/bug1871605.js b/js/src/jit-test/tests/wasm/tail-calls/bug1871605.js new file mode 100644 index 0000000000..84f37a3e42 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/bug1871605.js @@ -0,0 +1,30 @@ +// |jit-test| --more-compartments; skip-variant-if: --wasm-test-serialization, true; skip-variant-if: --wasm-compiler=ion, true; skip-if: !wasmGcEnabled() + +var dbg = newGlobal() +dbg.parent = this +dbg.eval(` + Debugger(parent).onEnterFrame = function() {} +`) + +var wasm = `(module + (type $t1 (array (mut i32))) + (type $t2 (array (mut (ref null $t1)))) + (import "" "c" + (func $c + (param i32 (ref $t2)) + (result (ref $t2)))) + (func $f (result (ref $t2)) + (return_call $c + (i32.const 0) + (array.new $t2 (ref.null $t1) (i32.const 1500))) + ) + (func (export "test") + (drop (call $f)) + ) +)`; + +var ins = wasmEvalText(wasm, {"": { c() {},}}); +assertErrorMessage( + () => ins.exports.test(), + TypeError, /bad type/ +); diff --git a/js/src/jit-test/tests/wasm/tail-calls/bug1871606.js b/js/src/jit-test/tests/wasm/tail-calls/bug1871606.js new file mode 100644 index 0000000000..aa520d1f53 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/bug1871606.js @@ -0,0 +1,22 @@ +// |jit-test| --more-compartments; skip-variant-if: --wasm-test-serialization, true; skip-variant-if: --wasm-compiler=ion, true +dbg = newGlobal(); +dbg.b = this; +dbg.eval("(" + function() { + Debugger(b) +} + ")()"); +var ins = wasmEvalText(` + (table 1 funcref) + (type $d (func (param f64))) + (func $e + (export "test") + f64.const 0.0 + i32.const 0 + return_call_indirect (type $d) + ) + (elem (i32.const 0) $e) +`); + +assertErrorMessage( + () => ins.exports.test(), + WebAssembly.RuntimeError, /indirect call signature mismatch/ +); diff --git a/js/src/jit-test/tests/wasm/tail-calls/bug1871951.js b/js/src/jit-test/tests/wasm/tail-calls/bug1871951.js new file mode 100644 index 0000000000..6b3e481d59 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/bug1871951.js @@ -0,0 +1,75 @@ +// |jit-test| skip-variant-if: --wasm-test-serialization, true; skip-if: !wasmGcEnabled() + +gczeal(18) +function a(str, imports) { + b = wasmTextToBinary(str) + try { + c = new WebAssembly.Module(b) + } catch {} + return new WebAssembly.Instance(c, imports) +} +gczeal(10) +base = a(`(module + (global (export "rngState") + (mut i32) i32.const 1 + ) + (global $ttl (mut i32) (i32.const 100000)) + + (type $d (array (mut i32))) + (type $e (array (mut (ref null $d)))) + + (func $f + (param $arr (ref $d)) + (result (ref $d)) + + (global.set $ttl (i32.sub (global.get $ttl) (i32.const 1))) + (if (i32.eqz (global.get $ttl)) + (then + unreachable + ) + ) + + local.get $arr + ) + (func $createSecondaryArray (result (ref $d)) + (return_call $f + (array.new $d (i32.const 0) (i32.const 1)) + ) + ) + (func $g (export "createPrimaryArrayLoop") + (param i32) (param $arrarr (ref $e)) + (result (ref $e)) + + (call $createSecondaryArray (local.get $arrarr)) + (return_call $g + (i32.const 1) + local.get $arrarr + ) + ) +)`) +t58 = `(module + (type $d (array (mut i32))) + (type $e (array (mut (ref null $d)))) + + (import "" "rngState" (global $h (mut i32))) + (import "" "createPrimaryArrayLoop" (func $g (param i32 (ref $e)) (result (ref $e)))) + + (func $createPrimaryArray (result (ref $e)) + (return_call $g + i32.const 0 + (array.new $e (ref.null $d) (i32.const 500)) + ) + ) + (func (export "churn") (result i32) + (local $arrarr (ref $e)) + (local.set $arrarr (call $createPrimaryArray)) + + (global.get $h) + ) +)` +j = a(t58, {"": base.exports}) +fns = j.exports; + +assertErrorMessage(() => { + fns.churn(); +}, WebAssembly.RuntimeError, /unreachable executed/); diff --git a/js/src/jit-test/tests/wasm/tail-calls/directives.txt b/js/src/jit-test/tests/wasm/tail-calls/directives.txt new file mode 100644 index 0000000000..66e8161b9d --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/directives.txt @@ -0,0 +1 @@ +|jit-test| --wasm-tail-calls; test-also=--wasm-compiler=baseline; test-also=--wasm-compiler=ion; test-also=--wasm-test-serialization; skip-if: !wasmTailCallsEnabled(); include:wasm.js diff --git a/js/src/jit-test/tests/wasm/tail-calls/exceptions.js b/js/src/jit-test/tests/wasm/tail-calls/exceptions.js new file mode 100644 index 0000000000..fd05f37e53 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/exceptions.js @@ -0,0 +1,54 @@ +// |jit-test| --wasm-exceptions; skip-if: !wasmExceptionsEnabled() + +// Simple test with return_call. +var ins = wasmEvalText(`(module + (tag $exn) + (func $f0 (result i32) + throw $exn + ) + (func $f1 (result i32) + try + return_call $f0 + catch $exn + i32.const 3 + return + end + i32.const 4 + ) + (func (export "main") (result i32) + call $f1 + ) +)`); +assertErrorMessage(() => ins.exports.main(), WebAssembly.Exception, /.*/); + +// Test if return stub, created by introducing the slow path, +// not interfering with exception propagation. +var ins0 = wasmEvalText(`(module + (tag $exn) + (func $f0 (result i32) + throw $exn + ) + (func (export "f") (result i32) + call $f0 + ) + (export "t" (tag $exn)) +)`); +var ins = wasmEvalText(`(module + (import "" "t" (tag $exn)) + (import "" "f" (func $f0 (result i32))) + (func $f1 (result i32) + try + return_call $f0 + catch $exn + i32.const 3 + return + end + i32.const 4 + ) + (func (export "main") (result i32) + call $f1 + ) + )`, {"":ins0.exports,}); + +assertErrorMessage(() => ins.exports.main(), WebAssembly.Exception, /.*/); + \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/tail-calls/gc.js b/js/src/jit-test/tests/wasm/tail-calls/gc.js new file mode 100644 index 0000000000..10e5971e6d --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/gc.js @@ -0,0 +1,220 @@ +// |jit-test| --wasm-function-references; --wasm-gc; skip-if: !wasmGcEnabled() || getBuildConfiguration("simulator") + +// Tests GC references passed as arguments during return calls. +// Similar to js/src/jit-test/tests/wasm/gc/trailers-gc-stress.js + +let base = wasmEvalText(`(module + ;; A simple pseudo-random number generator. + ;; Produces numbers in the range 0 .. 2^16-1. + (global $rngState (export "rngState") + (mut i32) (i32.const 1) + ) + (func $rand (export "rand") (result i32) + (local $t i32) + ;; update $rngState + (local.set $t (global.get $rngState)) + (local.set $t (i32.mul (local.get $t) (i32.const 1103515245))) + (local.set $t (i32.add (local.get $t) (i32.const 12345))) + (global.set $rngState (local.get $t)) + ;; pull 16 random bits out of it + (local.set $t (i32.shr_u (local.get $t) (i32.const 15))) + (local.set $t (i32.and (local.get $t) (i32.const 0xFFFF))) + (local.get $t) + ) + + ;; Array types + (type $tArrayI32 (array (mut i32))) ;; "secondary array" above + (type $tArrayArrayI32 (array (mut (ref null $tArrayI32)))) ;; "primary array" + + (func $createSecondaryArrayLoop (export "createSecondaryArrayLoop") + (param $i i32) (param $arr (ref $tArrayI32)) + (result (ref $tArrayI32)) + (block $cont + (br_if $cont (i32.ge_u (local.get $i) (array.len (local.get $arr)))) + (array.set $tArrayI32 (local.get $arr) (local.get $i) (call $rand)) + (return_call $createSecondaryArrayLoop + (i32.add (local.get $i) (i32.const 1)) + (local.get $arr)) + ) + (local.get $arr) + ) + ;; Create an array ("secondary array") containing random numbers, with a + ;; size between 1 and 50, also randomly chosen. + (func $createSecondaryArray (export "createSecondaryArray") + (result (ref $tArrayI32)) + (return_call $createSecondaryArrayLoop + (i32.const 0) + (array.new $tArrayI32 + (i32.const 0) + (i32.add (i32.rem_u (call $rand) (i32.const 50)) (i32.const 1))) + ) + ) + + (func $createPrimaryArrayLoop (export "createPrimaryArrayLoop") + (param $i i32) (param $arrarr (ref $tArrayArrayI32)) + (result (ref $tArrayArrayI32)) + (block $cont + (br_if $cont (i32.ge_u (local.get $i) (array.len (local.get $arrarr)))) + (array.set $tArrayArrayI32 (local.get $arrarr) + (local.get $i) (call $createSecondaryArray)) + (return_call $createPrimaryArrayLoop + (i32.add (local.get $i) (i32.const 1)) + (local.get $arrarr)) + ) + (local.get $arrarr) + ) +)`); +let t = +`(module + ;; Array types (the same as in the base) + (type $tArrayI32 (array (mut i32))) ;; "secondary array" above + (type $tArrayArrayI32 (array (mut (ref null $tArrayI32)))) ;; "primary array" + + (import "" "rngState" (global $rngState (mut i32))) + (import "" "rand" (func $rand (result i32))) + (import "" "createSecondaryArrayLoop" + (func $createSecondaryArrayLoop + (param $i i32) (param $arr (ref $tArrayI32)) + (result (ref $tArrayI32)))) + (import "" "createPrimaryArrayLoop" + (func $createPrimaryArrayLoop + (param $i i32) (param $arrarr (ref $tArrayArrayI32)) + (result (ref $tArrayArrayI32)))) + + ;; Create an array ("secondary array") containing random numbers, with a + ;; size between 1 and 50, also randomly chosen. + ;; (Copy of the base one to create trampoline) + (func $createSecondaryArray (export "createSecondaryArray") + (result (ref $tArrayI32)) + (return_call $createSecondaryArrayLoop + (i32.const 0) + (array.new $tArrayI32 + (i32.const 0) + (i32.add (i32.rem_u (call $rand) (i32.const 50)) (i32.const 1))) + ) + ) + + ;; Create an array (the "primary array") of 1500 elements of + ;; type ref-of-tArrayI32. + (func $createPrimaryArray (export "createPrimaryArray") + (result (ref $tArrayArrayI32)) + (return_call $createPrimaryArrayLoop + (i32.const 0) + (array.new $tArrayArrayI32 (ref.null $tArrayI32) (i32.const 1500))) + ) + + ;; Use $createPrimaryArray to create an initial array. Then randomly replace + ;; elements for a while. + (func $churn (export "churn") (param $thresh i32) (result i32) + (local $i i32) + (local $j i32) + (local $finalSum i32) + (local $arrarr (ref $tArrayArrayI32)) + (local $arr (ref null $tArrayI32)) + (local $arrLen i32) + (local.set $arrarr (call $createPrimaryArray)) + ;; This loop iterates 500,000 times. Each iteration, it chooses + ;; a randomly element in $arrarr and replaces it with a new + ;; random array of 32-bit ints. + (loop $cont + ;; make $j be a random number in 0 .. $thresh-1. + ;; Then replace that index in $arrarr with a new random arrayI32. + (local.set $j (i32.rem_u (call $rand) (local.get $thresh))) + (array.set $tArrayArrayI32 (local.get $arrarr) + (local.get $j) (call $createSecondaryArray)) + (local.set $i (i32.add (local.get $i) (i32.const 1))) + (br_if $cont (i32.lt_u (local.get $i) (i32.const 500000))) + ) + + ;; Finally, compute a checksum by summing all the numbers + ;; in all secondary arrays. This simply assumes that all of the refs to + ;; secondary arrays are non-null, which isn't per-se guaranteed by the + ;; previous loop, but it works in this case because the RNG + ;; produces each index value to overwrite at least once. + (local.set $finalSum (i32.const 0)) + (local.set $i (i32.const 0)) ;; loop var for the outer loop + (loop $outer + ;; body of outer loop + ;; $arr = $arrarr[i] + (local.set $arr (array.get $tArrayArrayI32 (local.get $arrarr) + (local.get $i))) + ;; iterate over $arr + (local.set $arrLen (array.len (local.get $arr))) + (local.set $j (i32.const 0)) ;; loop var for the inner loop + (loop $inner + ;; body of inner loop + (local.set $finalSum + (i32.rotl (local.get $finalSum) (i32.const 1))) + (local.set $finalSum + (i32.xor (local.get $finalSum) + (array.get $tArrayI32 (local.get $arr) + (local.get $j)))) + ;; loop control for the inner loop + (local.set $j (i32.add (local.get $j) (i32.const 1))) + (br_if $inner (i32.lt_u (local.get $j) (local.get $arrLen))) + ) + ;; loop control for the outer loop + (local.set $i (i32.add (local.get $i) (i32.const 1))) + (br_if $outer (i32.lt_u (local.get $i) (i32.const 1500))) + ) + + ;; finally, roll in the final value of the RNG state + (i32.xor (local.get $finalSum) (global.get $rngState)) + ) +)`; + +let i = wasmEvalText(t, {"": base.exports,}); +let fns = i.exports; + +assertEq(fns.churn(800), -575895114); +assertEq(fns.churn(1200), -1164697516); + +wasmValidateText(`(module + (rec + (type $s1 (sub (struct (field i32)))) + (type $s2 (sub $s1 (struct (field i32 f32)))) + ) + (func (result (ref $s2)) + struct.new_default $s2 + ) + (func (export "f") (result (ref $s1)) + return_call 0 + ) +)`); + +wasmFailValidateText(`(module + (rec + (type $s1 (sub (struct (field i32)))) + (type $s2 (sub $s1 (struct (field i32 f32)))) + ) + (func (result (ref $s1)) + struct.new_default $s1 + ) + (func (export "f") (result (ref $s2)) + return_call 0 + ) +)`, /type mismatch/); + +wasmValidateText(`(module + (rec + (type $s1 (sub (struct (field i32)))) + (type $s2 (sub $s1 (struct (field i32 f32)))) + ) + (type $t (func (result (ref $s2)))) + (func (export "f") (param (ref $t)) (result (ref $s1)) + local.get 0 + return_call_ref $t + ) +)`); + +wasmFailValidateText(`(module + (rec + (type $s1 (sub (struct (field i32)))) + (type $s2 (sub $s1 (struct (field i32 f32)))) + ) + (type $t (func (result (ref $s1)))) + (func (export "f") (param (ref $t)) (result (ref $s2)) + local.get 0 + return_call_ref $t + ) +)`, /type mismatch/); diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus0.js b/js/src/jit-test/tests/wasm/tail-calls/litmus0.js new file mode 100644 index 0000000000..89e978c2e7 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus0.js @@ -0,0 +1,24 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// Loop implemented using tail calls - the call passes as many arguments as +// the function receives, of the same types. +// +// The variable ballast is intended to test that we handle various combinations +// of stack and register arguments properly. + +for ( let ballast=1; ballast < TailCallBallast; ballast++ ) { + let vals = iota(ballast,1); + let ps = vals.map(_ => 'i32').join(' ') + let es = vals.map(i => `(local.get ${1+i})`).join(' ') + let sum = vals.reduceRight((p,c) => `(i32.add (local.get ${c+1}) ${p})`, `(i32.const 0)`) + let sumv = vals.reduce((p,c) => p+c); + let text = ` +(module + (func $loop (export "loop") (param $n i32) (param $q i32) (param ${ps}) (result i32) + (if (result i32) (i32.eqz (local.get $n)) + (then (return (i32.add (local.get $q) ${sum}))) + (else (return_call $loop (i32.sub (local.get $n) (i32.const 1)) (i32.add (local.get $q) (i32.const 1)) ${es}))))) +`; + let ins = wasmEvalText(text); + assertEq(ins.exports.loop(TailCallIterations, ...vals), TailCallIterations + sumv); +} diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus1.js b/js/src/jit-test/tests/wasm/tail-calls/litmus1.js new file mode 100644 index 0000000000..7a86e3ce52 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus1.js @@ -0,0 +1,32 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// Mutually recursive functions implement a multi-entry loop using tail calls. +// The functions do not have the same signatures, so if all arguments are stack +// arguments then these use different amounts of stack space. +// +// The variable ballast is intended to test that we handle various combinations +// of stack and register arguments properly. + +for ( let ballast=1; ballast < TailCallBallast; ballast++ ) { + let vals = iota(ballast,1); + let ps = vals.map(_ => 'i32').join(' ') + let es = vals.map(i => `(local.get ${i})`).join(' ') + let sum = vals.reduceRight((p,c) => `(i32.add (local.get ${c}) ${p})`, `(i32.const 0)`) + let sumv = vals.reduce((p,c) => p+c); + let text = ` +(module + (func $odd (export "odd") (param $n i32) (param ${ps}) (param $dummy i32) (result i32) + (if (result i32) (i32.eqz (local.get $n)) + (then (return (i32.or (i32.shl ${sum} (i32.const 1)) (i32.const 0)))) + (else (return_call $even (i32.sub (local.get $n) (i32.const 1)) ${es})))) + + (func $even (export "even") (param $n i32) (param ${ps}) (result i32) + (if (result i32) (i32.eqz (local.get $n)) + (then (return (i32.or (i32.shl ${sum} (i32.const 1)) (i32.const 1)))) + (else (return_call $odd (i32.sub (local.get $n) (i32.const 1)) ${es} (i32.const 33))))))`; + + let ins = wasmEvalText(text); + assertEq(ins.exports.even(TailCallIterations, ...vals), (sumv*2) + 1); + assertEq(ins.exports.odd(TailCallIterations, ...vals, 33), (sumv*2) + 0); +} + diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus10.js b/js/src/jit-test/tests/wasm/tail-calls/litmus10.js new file mode 100644 index 0000000000..8ef83f1336 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus10.js @@ -0,0 +1,59 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// Tail-call litmus test with multiple results +// +// Mutually recursive functions implement a multi-entry loop using indirect +// cross-module tail calls. The functions do not have the same signatures, so +// if all arguments are stack arguments then these use different amounts of +// stack space. +// +// Cross-module mutual recursion must be set up by JS, which is a bit of hair. +// But this should not destroy the ability to tail-call. +// +// The mutable globals accessed after the call are there to attempt to ensure +// that the correct instance is restored after the chain of tail calls. + +var table = new WebAssembly.Table({initial:2, maximum:2, element:"funcref"}) + +var odd_cookie = 24680246; +var oddins = wasmEvalText(` +(module + (table (import "" "table") 2 2 funcref) + (type $even_t (func (param i32) (result i32 i32 i32))) + (global $glob (export "g") (mut i32) (i32.const ${odd_cookie})) + + (func $odd_entry (export "odd_entry") (param $n i32) (result i32 i32 i32 i32) + (call $odd (local.get $n) (i32.const 86)) + (global.get $glob)) + + (func $odd (export "odd") (param $n i32) (param $dummy i32) (result i32 i32 i32) + (if (result i32 i32 i32) (i32.eqz (local.get $n)) + (then (return (i32.const 0) (i32.const 32769) (i32.const -37))) + (else (return_call_indirect (type $even_t) (i32.sub (local.get $n) (i32.const 1)) (i32.const 0))))))`, + {"":{table}}); + +var even_cookie = 12345678; +var evenins = wasmEvalText(` +(module + (table (import "" "table") 2 2 funcref) + (type $odd_t (func (param i32 i32) (result i32 i32 i32))) + (global $glob (export "g") (mut i32) (i32.const ${even_cookie})) + + (func $even_entry (export "even_entry") (param $n i32) (result i32 i32 i32 i32) + (call $even (local.get $n)) + (global.get $glob)) + + (func $even (export "even") (param $n i32) (result i32 i32 i32) + (if (result i32 i32 i32) (i32.eqz (local.get $n)) + (then (return (i32.const 1) (i32.const -17) (i32.const 44021))) + (else (return_call_indirect (type $odd_t) (i32.sub (local.get $n) (i32.const 1)) (i32.const 33) (i32.const 1))))))`, + {"":{table}}); + + +table.set(0, evenins.exports.even); +table.set(1, oddins.exports.odd); + +assertSame(evenins.exports.even_entry(TailCallIterations), [1, -17, 44021, even_cookie]); +assertSame(oddins.exports.odd_entry(TailCallIterations+1, 33), [1, -17, 44021, odd_cookie]); +assertSame(evenins.exports.even_entry(TailCallIterations+1), [0, 32769, -37, even_cookie]); +assertSame(oddins.exports.odd_entry(TailCallIterations, 33), [0, 32769, -37, odd_cookie]); diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus11.js b/js/src/jit-test/tests/wasm/tail-calls/litmus11.js new file mode 100644 index 0000000000..78c7cd4c49 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus11.js @@ -0,0 +1,66 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// Once we exhaust the register arguments this will alternately grow and then +// shrink the stack frame across tail call boundaries because the increment of +// stack allocation is 16 bytes and our variability exceeds that. +// +// (This is not redundant with eg litmus0, because in that case all the +// functions have the same ballast. Here we have different ballast, so we get growing and +// shrinking.) +// +// See litmus13 for the same-module call_indirect case. +// See litmus16 for the cross-module call_indirect case. + +function ntimes(n, v) { + if (typeof v == "function") + return iota(n).map(v).join(' '); + return iota(n).map(_ => v).join(' '); +} + +function get_local(n) { + return `(local.get ${n})` +} + +function compute(ballast) { + return iota(ballast).reduce((p,g,n) => `(i32.or ${p} (local.get ${n}))`, + `(i32.const ${1 << ballast})`) +} + +function build(n, ballast) { + switch (n) { + case 0: + return ` +(func $f0 (export "f") (result i32) + (return_call $f1 (i32.const ${1 << n}))) +`; + case ballast: + return ` +(func $f${ballast} (param ${ntimes(ballast, 'i32')}) (result i32) + (if (result i32) (i32.eqz (global.get $glob)) + (then (return ${compute(ballast)})) + (else (block (result i32) + (global.set $glob (i32.sub (global.get $glob) (i32.const 1))) + (return_call $f0))))) +`; + default: + return ` +(func $f${n} (param ${ntimes(n, 'i32')}) (result i32) + (return_call $f${n+1} (i32.const ${1 << n}) ${ntimes(n, get_local)})) +` + } +} + +for ( let ballast=1; ballast < TailCallBallast; ballast++ ) { + + let vals = iota(ballast+1).map(v => 1 << v); + let sumv = vals.reduce((p,c) => p|c); + let text = ` +(module + (global $glob (mut i32) (i32.const ${TailCallIterations})) + ${ntimes(ballast, n => build(n, ballast))} + ${build(ballast, ballast)}) +`; + + let ins = wasmEvalText(text); + assertEq(ins.exports.f(), sumv); +} diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus12.js b/js/src/jit-test/tests/wasm/tail-calls/litmus12.js new file mode 100644 index 0000000000..8e488d19e2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus12.js @@ -0,0 +1,41 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// Basically try to assert that the instance is restored properly when +// performing an import call. We do this by accessing the instance once we get +// out of the tail call chain. + +// In this pure form, this test can't test for stack overflow as we can't do a loop of +// imported functions without return_call_indirect and a table. + +// TODO: Probably add a loop here with an indirect call +// TODO: More ballast will make it more likely that stack smashing is detected + +var insh = wasmEvalText(` +(module + (global $glob (export "glob") (mut i32) (i32.const 12345678)) + (func $h (export "h") (param i32) (result i32) + (local.get 0)))`); + +var insg = wasmEvalText(` +(module + (import "insh" "h" (func $h (param i32) (result i32))) + (global $glob (export "glob") (mut i32) (i32.const 24680246)) + (func $g (export "g") (param i32) (result i32) + (return_call $h (local.get 0))))`, {insh:insh.exports}); + +var insf = wasmEvalText(` +(module + (import "insg" "g" (func $g (param i32) (result i32))) + (global $glob (export "glob") (mut i32) (i32.const 36903690)) + (func $f (export "f") (param i32) (result i32) + (return_call $g (local.get 0))))`, {insg:insg.exports}); + +var start = wasmEvalText(` +(module + (import "insf" "f" (func $f (param i32) (result i32))) + (global $glob (export "glob") (mut i32) (i32.const 480480480)) + (func (export "run") (param i32) (result i32) + (i32.add (call $f (local.get 0)) (global.get $glob))))`, {insf:insf.exports}); + +assertEq(start.exports.run(37), 480480480 + 37); + diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus13.js b/js/src/jit-test/tests/wasm/tail-calls/litmus13.js new file mode 100644 index 0000000000..238bf09392 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus13.js @@ -0,0 +1,79 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// Once we exhaust the register arguments this will alternately grow and then +// shrink the stack frame across tail call boundaries because the increment of +// stack allocation is 16 bytes and our variability exceeds that. +// +// (This is not redundant with eg litmus2, because in that case all the +// functions have the same ballast. Here we have different ballast, so we get +// growing and shrinking.) +// +// See litmus11 for the direct-call case. +// See litmus16 for the cross-module call_indirect case. + +function ntimes(n, v) { + if (typeof v == "function") + return iota(n).map(v).join(' '); + return iota(n).map(_ => v).join(' '); +} + +function get_local(n) { + return `(local.get ${n})` +} + +function compute(ballast) { + return iota(ballast).reduce((p,g,n) => `(i32.or ${p} (local.get ${n}))`, + `(i32.const ${1 << ballast})`) +} + +function build(n, ballast) { + switch (n) { + case 0: + return ` +(func $f0 (export "f") (result i32) + (return_call_indirect (type $ty1) (i32.const ${1 << n}) (i32.const 1))) +`; + case ballast: + return ` +(func $f${ballast} (param ${ntimes(ballast, 'i32')}) (result i32) + (if (result i32) (i32.eqz (global.get $glob)) + (then (return ${compute(ballast)})) + (else (block (result i32) + (global.set $glob (i32.sub (global.get $glob) (i32.const 1))) + (return_call_indirect (type $ty0) (i32.const 0)))))) +`; + default: + return ` +(func $f${n} (param ${ntimes(n, 'i32')}) (result i32) + (return_call_indirect (type $ty${n+1}) (i32.const ${1 << n}) ${ntimes(n, get_local)} (i32.const ${n+1}))) +` + } +} + +function types(n) { + var ps = n == 0 ? '' : `(param ${ntimes(n, 'i32')})`; + return ` +(type $ty${n} (func ${ps} (result i32)))`; +} + +function funcnames(n) { + return ntimes(n, n => `$f${n}`) +} + +for ( let ballast=1; ballast < TailCallBallast; ballast++ ) { + + let vals = iota(ballast+1).map(v => 1 << v); + let sumv = vals.reduce((p,c) => p|c); + let text = ` +(module + ${ntimes(ballast+1, n => types(n))} + (table $t ${ballast+1} ${ballast+1} funcref) + (elem (table $t) (i32.const 0) func ${funcnames(ballast+1)}) + (global $glob (mut i32) (i32.const ${TailCallIterations})) + ${ntimes(ballast, n => build(n, ballast))} + ${build(ballast, ballast)}) +`; + + let ins = wasmEvalText(text); + assertEq(ins.exports.f(), sumv); +} diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus15.js b/js/src/jit-test/tests/wasm/tail-calls/litmus15.js new file mode 100644 index 0000000000..38596a6b43 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus15.js @@ -0,0 +1,72 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// On systems with up to four register arguments, this alternately grows and then shrinks +// the stack frame across tail call boundaries. All functions are in the same +// module. + +var ins = wasmEvalText(` +(module + (type $ty0 (func (result i32))) + (type $ty1 (func (param i32) (result i32))) + (type $ty2 (func (param i32 i32) (result i32))) + (type $ty3 (func (param i32 i32 i32) (result i32))) + (type $ty4 (func (param i32 i32 i32 i32) (result i32))) + (type $ty5 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $ty6 (func (param i32 i32 i32 i32 i32 i32) (result i32))) + (type $ty7 (func (param i32 i32 i32 i32 i32 i32 i32) (result i32))) + (type $ty8 (func (param i32 i32 i32 i32 i32 i32 i32 i32) (result i32))) + (type $ty9 (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32))) + + (table $t 10 10 funcref) + (elem (table $t) (i32.const 0) func $f $g $h $i $j $k $l $m $n $o) + + (global $glob (mut i32) (i32.const ${TailCallIterations})) + + (func $o (param i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32) + (if (result i32) (i32.eqz (global.get $glob)) + (then + (i32.or (i32.const 512) + (i32.or (local.get 0) + (i32.or (local.get 1) + (i32.or (local.get 2) + (i32.or (local.get 3) + (i32.or (local.get 4) + (i32.or (local.get 5) + (i32.or (local.get 6) + (i32.or (local.get 7) (local.get 8))))))))))) + (else + (block (result i32) + (global.set $glob (i32.sub (global.get $glob) (i32.const 1))) + (return_call_indirect (type $ty0) (i32.const 0)))))) + + (func $n (param i32 i32 i32 i32 i32 i32 i32 i32) (result i32) + (return_call_indirect (type $ty9) (i32.const 256) (local.get 0) (local.get 1) (local.get 2) (local.get 3) (local.get 4) (local.get 5) (local.get 6) (local.get 7) (i32.const 9))) + + (func $m (param i32 i32 i32 i32 i32 i32 i32) (result i32) + (return_call_indirect (type $ty8) (i32.const 128) (local.get 0) (local.get 1) (local.get 2) (local.get 3) (local.get 4) (local.get 5) (local.get 6) (i32.const 8))) + + (func $l (param i32 i32 i32 i32 i32 i32) (result i32) + (return_call_indirect (type $ty7) (i32.const 64) (local.get 0) (local.get 1) (local.get 2) (local.get 3) (local.get 4) (local.get 5) (i32.const 7))) + + (func $k (param i32 i32 i32 i32 i32) (result i32) + (return_call_indirect (type $ty6) (i32.const 32) (local.get 0) (local.get 1) (local.get 2) (local.get 3) (local.get 4) (i32.const 6))) + + (func $j (param i32 i32 i32 i32) (result i32) + (return_call_indirect (type $ty5) (i32.const 16) (local.get 0) (local.get 1) (local.get 2) (local.get 3) (i32.const 5))) + + (func $i (param i32 i32 i32) (result i32) + (return_call_indirect (type $ty4) (i32.const 8) (local.get 0) (local.get 1) (local.get 2) (i32.const 4))) + + (func $h (param i32 i32) (result i32) + (return_call_indirect (type $ty3) (i32.const 4) (local.get 0) (local.get 1) (i32.const 3))) + + (func $g (param i32) (result i32) + (return_call_indirect (type $ty2) (i32.const 2) (local.get 0) (i32.const 2))) + + (func $f (export "f") (result i32) + (return_call_indirect (type $ty1) (i32.const 1) (i32.const 1))))`); + +assertEq(ins.exports.f(), 1023); +print("OK") + + diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus16.js b/js/src/jit-test/tests/wasm/tail-calls/litmus16.js new file mode 100644 index 0000000000..716b0520d2 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus16.js @@ -0,0 +1,94 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// This alternately grows and then shrinks the stack frame across tail call boundaries. +// Here we go cross-module as well. There is enough ballast that the stack frame will +// alternately have to grow and shrink across some of the calls. +// +// We generate one module+instance per function so that every call is cross-instance. +// Each module has an "up" function (calling the next higher index) and a "down" function +// (calling the next lower index). The last "up" function decrements the global counter +// and optionally returns a result $down0 just calls $up0. +// +// TODO: Test that the proper instance is being restored? Or have we done that elsewhere? + +function ntimes(n, v) { + if (typeof v == "function") + return iota(n).map(v).join(' '); + return iota(n).map(_ => v).join(' '); +} + +function get_local(n) { + return `(local.get ${n})` +} + +function compute(ballast) { + return iota(ballast).reduce((p,_,n) => `(i32.or ${p} (local.get ${n}))`, + `(i32.const ${1 << ballast})`) +} + +function code(n, ballast) { + switch (n) { + case 0: + return ` +(func $up0 (export "f") (result i32) + (return_call_indirect (type $ty1) (i32.const ${1 << n}) (i32.const 1))) +(func $down0 (result i32) + (return_call $up0))`; + case ballast: + return ` +(func $up${ballast} (param ${ntimes(ballast, 'i32')}) (result i32) + (if (result i32) (i32.eqz (global.get $glob)) + (then (return ${compute(ballast)})) + (else + (block (result i32) + (global.set $glob (i32.sub (global.get $glob) (i32.const 1))) + (return_call_indirect (type $ty${ballast-1}) ${ntimes(ballast-1,get_local)} (i32.const ${ballast+1}))))))`; + default: + return ` +(func $up${n} (param ${ntimes(n, 'i32')}) (result i32) + (return_call_indirect (type $ty${n+1}) (i32.const ${1 << n}) ${ntimes(n, get_local)} (i32.const ${n+1}))) +(func $down${n} (param ${ntimes(n, 'i32')}) (result i32) + (return_call_indirect (type $ty${n-1}) ${ntimes(n-1, get_local)} (i32.const ${2*ballast-n+1})))`; + } +} + +function types(n, ballast) { + var tys = ''; + if (n > 0) + tys += ` +(type $ty${n-1} (func (param ${ntimes(n-1, 'i32')}) (result i32)))`; + if (n < ballast) + tys += ` +(type $ty${n+1} (func (param ${ntimes(n+1, 'i32')}) (result i32)))` + return tys; +} + +function inits(n, ballast) { + var inits = ` +(elem (i32.const ${n}) $up${n})` + if (n < ballast) + inits += ` +(elem (i32.const ${2*ballast-n}) $down${n})`; + return inits +} + +for (let ballast = 1; ballast < TailCallBallast; ballast++) { + let counter = new WebAssembly.Global({ mutable: true, value: "i32" }, TailCallIterations/10); + let table = new WebAssembly.Table({ initial: ballast * 2 + 1, maximum: ballast * 2 + 1, element: "anyfunc" }); + let tys = ntimes(ballast + 1, n => types(n)); + let vals = iota(ballast + 1).map(v => 1 << v); + let sumv = vals.reduce((p, c) => p | c); + let ins = []; + let imp = { "": { table, counter } }; + for (let i = 0; i <= ballast; i++) { + let txt = ` +(module + ${types(i, ballast)} + (import "" "table" (table $t ${ballast * 2 - 1} funcref)) + (import "" "counter" (global $glob (mut i32))) + ${inits(i, ballast)} + ${code(i, ballast)})`; + ins[i] = wasmEvalText(txt, imp); + } + assertEq(ins[0].exports.f(), sumv) +} diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus17.js b/js/src/jit-test/tests/wasm/tail-calls/litmus17.js new file mode 100644 index 0000000000..025c025305 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus17.js @@ -0,0 +1,27 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// Test that unwinding will find the right instance in the middle of a tail call +// chain. This test is mostly useful on the simulators, as they will walk the +// stack, looking for the innermost instance, on every memory reference. The +// logic of this test is that the setup intra-module tail call in mod2 will need +// to be recorded as possibly-inter-module because the subsequent inter-module +// call replaces the activation with one that is actually inter-module. + +let ins1 = wasmEvalText(` +(module + (memory (export "mem") 1 1) + (func (export "memref") (result i32) + (i32.load (i32.const 0))))`); + +let ins2 = wasmEvalText(` +(module + (import "mod1" "memref" (func $memref (result i32))) + + (func (export "run") (result i32) + (return_call $g)) + + (func $g (result i32) + (return_call $memref)))`, {mod1: ins1.exports}); + +(new Int32Array(ins1.exports.mem.buffer))[0] = 1337; +assertEq(ins2.exports.run(), 1337); diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus2.js b/js/src/jit-test/tests/wasm/tail-calls/litmus2.js new file mode 100644 index 0000000000..867bf6d677 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus2.js @@ -0,0 +1,36 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// Mutually recursive functions implement a multi-entry loop using indirect tail +// calls. The functions do not have the same signatures, so if all arguments +// are stack arguments then these use different amounts of stack space. +// +// The variable ballast is intended to test that we handle various combinations +// of stack and register arguments properly. + +for ( let ballast=1; ballast < TailCallBallast; ballast++ ) { + let vals = iota(ballast,1); + let ps = vals.map(_ => 'i32').join(' ') + let es = vals.map(i => `(local.get ${i})`).join(' ') + let sum = vals.reduceRight((p,c) => `(i32.add (local.get ${c}) ${p})`, `(i32.const 0)`) + let sumv = vals.reduce((p,c) => p+c); + let text = ` +(module + (table 2 2 funcref) + (elem (i32.const 0) $even $odd) + (type $t (func (param i32 ${ps}) (result i32))) + (type $q (func (param i32 ${ps} i32) (result i32))) + + (func $odd (export "odd") (param $n i32) (param ${ps}) (param $dummy i32) (result i32) + (if (result i32) (i32.eqz (local.get $n)) + (then (return (i32.or (i32.shl ${sum} (i32.const 1)) (i32.const 0)))) + (else (return_call_indirect (type $t) (i32.sub (local.get $n) (i32.const 1)) ${es} (i32.const 0))))) + + (func $even (export "even") (param $n i32) (param ${ps}) (result i32) + (if (result i32) (i32.eqz (local.get $n)) + (then (return (i32.or (i32.shl ${sum} (i32.const 1)) (i32.const 1)))) + (else (return_call_indirect (type $q) (i32.sub (local.get $n) (i32.const 1)) ${es} (i32.const 33) (i32.const 1))))))` + + let ins = wasmEvalText(text); + assertEq(ins.exports.even(TailCallIterations, ...vals), (sumv*2) + 1); + assertEq(ins.exports.odd(TailCallIterations, ...vals, 33), (sumv*2) + 0); +} diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus3.js b/js/src/jit-test/tests/wasm/tail-calls/litmus3.js new file mode 100644 index 0000000000..bdd0918717 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus3.js @@ -0,0 +1,36 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() || !wasmExceptionsEnabled() + +// Mutually recursive functions implement a multi-entry loop using tail calls, +// with exception handling. +// +// The functions do not have the same signatures, so if all arguments are stack +// arguments then these use different amounts of stack space. +// +// The "even" function will throw when the input is zero, so when an exception +// bubbles out of return_call it must not be caught by the exception handler in +// "odd", but must instead be delegated to the caller, which is JS code. + +var ins = wasmEvalText(` +(module + (tag $t) + (func $odd (export "odd") (param $n i32) (param $dummy i32) (result i32) + try (result i32) + (if (result i32) (i32.eqz (local.get $n)) + (then (return (i32.const 0))) + (else (return_call $even (i32.sub (local.get $n) (i32.const 1))))) + catch_all + unreachable + end) + + (func $even (export "even") (param $n i32) (result i32) + (if (result i32) (i32.eqz (local.get $n)) + (then (throw $t)) + (else (return_call $odd (i32.sub (local.get $n) (i32.const 1)) (i32.const 33))))) +) +`); + +assertErrorMessage(() => ins.exports.even(TailCallIterations), WebAssembly.Exception, /.*/); +assertEq(ins.exports.odd(TailCallIterations, 33), 0); + +assertEq(ins.exports.even(TailCallIterations+1), 0); +assertErrorMessage(() => ins.exports.odd(TailCallIterations+1, 33), WebAssembly.Exception, /.*/); diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus4.js b/js/src/jit-test/tests/wasm/tail-calls/litmus4.js new file mode 100644 index 0000000000..c16f712aac --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus4.js @@ -0,0 +1,43 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() || !wasmExceptionsEnabled() + +// Mutually recursive functions implement a multi-entry loop using indirect tail +// calls, with exception handling. +// +// The functions do not have the same signatures, so if all arguments are stack +// arguments then these use different amounts of stack space. +// +// The "even" function will throw when the input is zero, so when an exception +// bubbles out of return_call it must not be caught by the exception handler in +// "odd", but must instead be delegated to the caller, which is JS code. + +var ins = wasmEvalText(` +(module + (table 2 2 funcref) + (elem (i32.const 0) $even $odd) + (type $even_t (func (param i32) (result i32))) + (type $odd_t (func (param i32 i32) (result i32))) + (tag $t) + + (func $odd (export "odd") (param $n i32) (param $dummy i32) (result i32) + try (result i32) + (if (result i32) (i32.eqz (local.get $n)) + (then (return (i32.const 0))) + (else (return_call_indirect (type $even_t) (i32.sub (local.get $n) (i32.const 1)) + (i32.const 0)))) + catch_all + unreachable + end) + + (func $even (export "even") (param $n i32) (result i32) + (if (result i32) (i32.eqz (local.get $n)) + (then (throw $t)) + (else (return_call_indirect (type $odd_t) (i32.sub (local.get $n) (i32.const 1)) (i32.const 33) + (i32.const 1))))) +) +`); + +assertErrorMessage(() => ins.exports.even(TailCallIterations), WebAssembly.Exception, /.*/); +assertEq(ins.exports.odd(TailCallIterations, 33), 0); + +assertEq(ins.exports.even(TailCallIterations+1), 0); +assertErrorMessage(() => ins.exports.odd(TailCallIterations+1, 33), WebAssembly.Exception, /.*/); diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus5.js b/js/src/jit-test/tests/wasm/tail-calls/litmus5.js new file mode 100644 index 0000000000..d7b82c082b --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus5.js @@ -0,0 +1,68 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// Mutually recursive functions implement a multi-entry loop using indirect +// cross-module tail calls. The functions do not have the same signatures, so +// if all arguments are stack arguments then these use different amounts of +// stack space. +// +// Cross-module mutual recursion must be set up by JS, which is a bit of hair. +// But this should not destroy the ability to tail-call. +// +// The variable ballast is intended to test that we handle various combinations +// of stack and register arguments properly. +// +// The mutable globals accessed after the call are there to attempt to ensure +// that the correct instance is restored after the chain of tail calls. + +for ( let ballast=1; ballast < TailCallBallast; ballast++ ) { + let vals = iota(ballast,1); + let ps = vals.map(_ => 'i32').join(' ') + let es = vals.map(i => `(local.get ${i})`).join(' ') + let sum = vals.reduceRight((p,c) => `(i32.add (local.get ${c}) ${p})`, `(i32.const 0)`) + let sumv = vals.reduce((p,c) => p+c); + + let odd_cookie = 24680246; + let oddtext = ` +(module + (table (import "" "table") 2 2 funcref) + (type $even_t (func (param i32 ${ps}) (result i32))) + (global $glob (export "g") (mut i32) (i32.const ${odd_cookie})) + + (func $odd_entry (export "odd_entry") (param $n i32) (param ${ps}) (result i32) + (call $odd (local.get $n) ${es} (i32.const 86)) + (global.get $glob) + i32.add) + + (func $odd (export "odd") (param $n i32) (param ${ps}) (param $dummy i32) (result i32) + (if (result i32) (i32.eqz (local.get $n)) + (then (return (i32.or (i32.shl ${sum} (i32.const 1)) (i32.const 0)))) + (else (return_call_indirect (type $even_t) (i32.sub (local.get $n) (i32.const 1)) ${es} (i32.const 0))))))` + + let even_cookie = 12345678; + let eventext = ` +(module + (table (import "" "table") 2 2 funcref) + (type $odd_t (func (param i32 ${ps} i32) (result i32))) + (global $glob (export "g") (mut i32) (i32.const ${even_cookie})) + + (func $even_entry (export "even_entry") (param $n i32) (param ${ps}) (result i32) + (call $even (local.get $n) ${es}) + (global.get $glob) + i32.add) + + (func $even (export "even") (param $n i32) (param ${ps}) (result i32) + (if (result i32) (i32.eqz (local.get $n)) + (then (return (i32.or (i32.shl ${sum} (i32.const 1)) (i32.const 1)))) + (else (return_call_indirect (type $odd_t) (i32.sub (local.get $n) (i32.const 1)) ${es} (i32.const 33) (i32.const 1))))))` + + let table = new WebAssembly.Table({initial:2, maximum:2, element:"funcref"}) + + let oddins = wasmEvalText(oddtext, {"":{table}}); + let evenins = wasmEvalText(eventext, {"":{table}}); + + table.set(0, evenins.exports.even); + table.set(1, oddins.exports.odd); + + assertEq(evenins.exports.even_entry(TailCallIterations, ...vals), ((sumv*2) + 1) + even_cookie); + assertEq(oddins.exports.odd_entry(TailCallIterations, ...vals, 33), ((sumv*2) + 0) + odd_cookie); +} diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus6.js b/js/src/jit-test/tests/wasm/tail-calls/litmus6.js new file mode 100644 index 0000000000..6d9e8b9be6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus6.js @@ -0,0 +1,24 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// Tail-call litmus test with multiple results +// +// Mutually recursive functions implement a multi-entry loop using tail calls. +// The functions do not have the same signatures, so if all arguments are stack +// arguments then these use different amounts of stack space. + +var ins = wasmEvalText(` +(module + (func $odd (export "odd") (param $n i32) (param $dummy i32) (result i32 i32 i32) + (if (result i32 i32 i32) (i32.eqz (local.get $n)) + (then (return (i32.const 0) (i32.const 32769) (i32.const -37))) + (else (return_call $even (i32.sub (local.get $n) (i32.const 1)))))) + + (func $even (export "even") (param $n i32) (result i32 i32 i32) + (if (result i32 i32 i32) (i32.eqz (local.get $n)) + (then (return (i32.const 1) (i32.const -17) (i32.const 44021))) + (else (return_call $odd (i32.sub (local.get $n) (i32.const 1)) (i32.const 33))))) +) +`); + +assertSame(ins.exports.even(TailCallIterations), [1, -17, 44021]); +assertSame(ins.exports.odd(TailCallIterations, 33), [0, 32769, -37]); diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus7.js b/js/src/jit-test/tests/wasm/tail-calls/litmus7.js new file mode 100644 index 0000000000..43cfc8d3ed --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus7.js @@ -0,0 +1,29 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +// Tail-call litmus test with multiple results +// +// Mutually recursive functions implement a multi-entry loop using indirect tail +// calls. The functions do not have the same signatures, so if all arguments +// are stack arguments then these use different amounts of stack space. + +var ins = wasmEvalText(` +(module + (table 2 2 funcref) + (elem (i32.const 0) $even $odd) + (type $t (func (param i32) (result i32 i32 i32))) + (type $q (func (param i32 i32) (result i32 i32 i32))) + + (func $odd (export "odd") (param $n i32) (param $dummy i32) (result i32 i32 i32) + (if (result i32 i32 i32) (i32.eqz (local.get $n)) + (then (return (i32.const 0) (i32.const 32769) (i32.const -37))) + (else (return_call_indirect (type $t) (i32.sub (local.get $n) (i32.const 1)) (i32.const 0))))) + + (func $even (export "even") (param $n i32) (result i32 i32 i32) + (if (result i32 i32 i32) (i32.eqz (local.get $n)) + (then (return (i32.const 1) (i32.const -17) (i32.const 44021))) + (else (return_call_indirect (type $q) (i32.sub (local.get $n) (i32.const 1)) (i32.const 33) (i32.const 1))))) +) +`); + +assertSame(ins.exports.even(TailCallIterations), [1, -17, 44021]); +assertSame(ins.exports.odd(TailCallIterations, 33), [0, 32769, -37]); diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus8.js b/js/src/jit-test/tests/wasm/tail-calls/litmus8.js new file mode 100644 index 0000000000..4602664488 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus8.js @@ -0,0 +1,38 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() || !wasmExceptionsEnabled() + +// Tail-call litmus test with multiple results +// +// Mutually recursive functions implement a multi-entry loop using tail calls, +// with exception handling. +// +// The functions do not have the same signatures, so if all arguments are stack +// arguments then these use different amounts of stack space. +// +// The "even" function will throw when the input is zero, so when an exception +// bubbles out of return_call it must not be caught by the exception handler in +// "odd", but must instead be delegated to the caller, which is JS code. + +var ins = wasmEvalText(` +(module + (tag $t) + (func $odd (export "odd") (param $n i32) (param $dummy i32) (result i32 i32 i32) + try (result i32 i32 i32) + (if (result i32 i32 i32) (i32.eqz (local.get $n)) + (then (return (i32.const 0) (i32.const 32769) (i32.const -37))) + (else (return_call $even (i32.sub (local.get $n) (i32.const 1))))) + catch_all + unreachable + end) + + (func $even (export "even") (param $n i32) (result i32 i32 i32) + (if (result i32 i32 i32) (i32.eqz (local.get $n)) + (then (throw $t)) + (else (return_call $odd (i32.sub (local.get $n) (i32.const 1)) (i32.const 33))))) +) +`); + +assertErrorMessage(() => ins.exports.even(TailCallIterations), WebAssembly.Exception, /.*/); +assertSame(ins.exports.odd(TailCallIterations, 33), [0, 32769, -37]); + +assertErrorMessage(() => ins.exports.odd(TailCallIterations+1, 33), WebAssembly.Exception, /.*/); +assertSame(ins.exports.even(TailCallIterations+1), [0, 32769, -37]); diff --git a/js/src/jit-test/tests/wasm/tail-calls/litmus9.js b/js/src/jit-test/tests/wasm/tail-calls/litmus9.js new file mode 100644 index 0000000000..3bbde27111 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/litmus9.js @@ -0,0 +1,42 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() || !wasmExceptionsEnabled() + +// Tail-call litmus test with multiple results +// +// Mutually recursive functions implement a multi-entry loop using indirect tail +// calls, with exception handling. +// +// The functions do not have the same signatures, so if all arguments are stack +// arguments then these use different amounts of stack space. +// +// The "even" function will throw when the input is zero, so when an exception +// bubbles out of return_call it must not be caught by the exception handler in +// "odd", but must instead be delegated to the caller, which is JS code. + +var ins = wasmEvalText(` +(module + (table 2 2 funcref) + (elem (i32.const 0) $even $odd) + (type $even_t (func (param i32) (result i32 i32 i32))) + (type $odd_t (func (param i32 i32) (result i32 i32 i32))) + (tag $t) + + (func $odd (export "odd") (param $n i32) (param $dummy i32) (result i32 i32 i32) + try (result i32 i32 i32) + (if (result i32 i32 i32) (i32.eqz (local.get $n)) + (then (return (i32.const 0) (i32.const 32769) (i32.const -37))) + (else (return_call_indirect (type $even_t) (i32.sub (local.get $n) (i32.const 1)) + (i32.const 0)))) + catch_all + unreachable + end) + + (func $even (export "even") (param $n i32) (result i32 i32 i32) + (if (result i32 i32 i32) (i32.eqz (local.get $n)) + (then (throw $t)) + (else (return_call_indirect (type $odd_t) (i32.sub (local.get $n) (i32.const 1)) (i32.const 33) + (i32.const 1))))) +) +`); + +assertErrorMessage(() => ins.exports.even(TailCallIterations), WebAssembly.Exception, /.*/); +assertSame(ins.exports.odd(TailCallIterations, 33), [0, 32769, -37]); diff --git a/js/src/jit-test/tests/wasm/tail-calls/return-call-indirect-syntax.js b/js/src/jit-test/tests/wasm/tail-calls/return-call-indirect-syntax.js new file mode 100644 index 0000000000..aa0ab5eebf --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/return-call-indirect-syntax.js @@ -0,0 +1,117 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +function assertInvalidSyntax(module) { + assertErrorMessage(() => wasmTextToBinary(module), SyntaxError, + /wasm text error/); +} + +assertInvalidSyntax(` + (module + (type $sig (func (param i32) (result i32))) + (table 0 anyfunc) + (func (result i32) + (return_call_indirect (type $sig) (result i32) (param i32) + (i32.const 0) (i32.const 0) + ) + ) + )`); + +assertInvalidSyntax(` + (module + (type $sig (func (param i32 i32) (result i32 i32))) + (table 0 anyfunc) + (func (result i32) + (return_call_indirect (param i32) (type $sig) (result i32) + (i32.const 0) (i32.const 0) + ) + ) + )`); + +assertInvalidSyntax(` + (module + (type $sig (func (param i32) (result i32))) + (table 0 anyfunc) + (func (result i32) + (return_call_indirect (param i32) (result i32) (type $sig) + (i32.const 0) (i32.const 0) + ) + ) + )`); + +assertInvalidSyntax(` + (module + (type $sig (func (param i32) (result i32))) + (table 0 anyfunc) + (func (result i32) + (return_call_indirect (result i32) (type $sig) (param i32) + (i32.const 0) (i32.const 0) + ) + ) + )`); + +assertInvalidSyntax(` + (module + (type $sig (func (param i32) (result i32))) + (table 0 anyfunc) + (func (result i32) + (return_call_indirect (result i32) (param i32) (type $sig) + (i32.const 0) (i32.const 0) + ) + ) + )`); + +assertInvalidSyntax(` + (module + (table 0 anyfunc) + (func (result i32) + (return_call_indirect (result i32) (param i32) + (i32.const 0) (i32.const 0) + ) + ) + )`); + +assertInvalidSyntax(` + (module + (table 0 anyfunc) + (func (return_call_indirect (param $x i32) (i32.const 0) (i32.const 0))) + )`); + +assertInvalidSyntax(` + (module + (type $sig (func)) + (table 0 anyfunc) + (func (result i32) + (return_call_indirect (type $sig) (result i32) (i32.const 0)) + ) + )`); + +assertInvalidSyntax(` + (module + (type $sig (func (param i32) (result i32))) + (table 0 anyfunc) + (func (result i32) + (return_call_indirect (type $sig) (result i32) (i32.const 0)) + ) + )`); + +assertInvalidSyntax(` + (module + (type $sig (func (param i32) (result i32))) + (table 0 anyfunc) + (func + (return_call_indirect (type $sig) (param i32) + (i32.const 0) (i32.const 0) + ) + ) + )`); + +assertInvalidSyntax(` + (module + (type $sig (func (param i32 i32) (result i32))) + (table 0 anyfunc) + (func (result i32) + (return_call_indirect (type $sig) (param i32) (result i32) + (i32.const 0) (i32.const 0) + ) + ) + )`); diff --git a/js/src/jit-test/tests/wasm/tail-calls/return-call-indirect-validate.js b/js/src/jit-test/tests/wasm/tail-calls/return-call-indirect-validate.js new file mode 100644 index 0000000000..15c2142a55 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/return-call-indirect-validate.js @@ -0,0 +1,243 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +wasmValidateText( + `(module + (type (func)) + (table 0 funcref) + (func $arity-1-vs-0 + (return_call_indirect (type 0) + (i32.const 1) (i32.const 0))))`); + +wasmValidateText( + `(module + (type (func)) + (table 0 funcref) + (func $arity-1-vs-0 + (return_call_indirect (type 0) + (f64.const 2) (i32.const 1) (i32.const 0))))`); + +const constants = [{'type': 'i32', 'value': '0x132'}, + {'type': 'i64', 'value': '0x164'}, + {'type': 'f32', 'value': '0xf32'}, + {'type': 'f64', 'value': '0xf64'}]; + +function validateConst(type, value) { + wasmValidateText( + `(module + (type $out-${type} (func (result ${type}))) + (func $type-${type} (result ${type}) + (return_call_indirect (type $out-${type}) (i32.const 0))) + (func $const-${type} (result ${type}) + (${type}.const ${value})) + (func $t (result ${type}) + (return_call $type-${type})) + (table funcref (elem $const-${type})))`); +} +for (let {type, value} of constants) { + validateConst(type, value); +} + +function validateOneArg(type, value) { + wasmValidateText( + `(module + (type $f-${type} (func (param ${type}) (result ${type}))) + (func $id-${type} (param ${type}) (result ${type}) + (local.get 0)) + (func $t (result ${type}) + (return_call_indirect (type $f-${type}) (${type}.const ${value}) + (i32.const 0))) + (table funcref (elem $id-${type})))`); +} +for (let {type, value} of constants) { + validateOneArg(type, value); +} + +function validateTwoArgs(t0, v0, t1, v1) { + wasmValidateText( + `(module + (type $f (func (param ${t0} ${t1}) (result ${t1}))) + (func $second-${t0}-${t1} (param ${t0} ${t1}) (result ${t1}) + (local.get 1)) + (func $t (result ${t1}) + (return_call_indirect (type $f) + (${t0}.const ${v0}) (${t1}.const ${v1}) + (i32.const 0))) + (table funcref (elem $second-${t0}-${t1})))`); +} +for (let {type: t0, value: v0} of constants) { + for (let {type: t1, value: v1} of constants) { + validateTwoArgs(t0, v0, t1, v1); + } +} + +wasmValidateText( + `(module + (type $f (func (param i64) (result i64))) + (func $id-i64 (param i64) (result i64) + (local.get 0)) + (func $dispatch1 (param i32 i64) (result i64) + (return_call_indirect (type $f) (local.get 1) (local.get 0))) + (func $dispatch2 (param i32) (result i64) + (return_call_indirect (type $f) (i64.const 42) (local.get 0))) + (func $t1 (result i64) + (return_call $dispatch1 (i32.const 0) (i64.const 1))) + (func $t2 (result i64) + (return_call $dispatch2 (i32.const 100))) + (table funcref (elem $id-i64)))`); + +wasmValidateText( + `(module + (type $i64-i64 (func (param i64 i64) (result i64))) + (func $fac (type $i64-i64) + (return_call_indirect (type $i64-i64) + (local.get 0) (i64.const 1) (i32.const 0))) + + (func $fac-acc (param i64 i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (return_call_indirect (type $i64-i64) + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + (i32.const 0))))) + + (table funcref (elem $fac-acc)))`); + +wasmValidateText( + `(module + (type $t (func (param i32) (result i32))) + (func $even (param i32) (result i32) + (if (result i32) (i32.eqz (local.get 0)) + (then (i32.const 44)) + (else + (return_call_indirect (type $t) + (i32.sub (local.get 0) (i32.const 1)) + (i32.const 1))))) + (func $odd (param i32) (result i32) + (if (result i32) (i32.eqz (local.get 0)) + (then (i32.const 99)) + (else + (return_call_indirect (type $t) + (i32.sub (local.get 0) (i32.const 1)) + (i32.const 0))))) + (table funcref (elem $even $odd)))`); + +wasmFailValidateText( + `(module + (type (func)) + (func $no-table + (return_call_indirect (type 0) (i32.const 0))))`, + /call_indirect without a table/); + +wasmFailValidateText( + `(module + (type (func)) + (table 0 funcref) + (func $type-void-vs-num + (i32.eqz (return_call_indirect (type 0) (i32.const 0)))))`, + /unused values not explicitly dropped/); + +wasmFailValidateText( + `(module + (type (func)) + (table 0 funcref) + (func $type-void-vs-num (result i32) + (i32.eqz (return_call_indirect (type 0) (i32.const 0)))))`, + /type mismatch: expected 1 values, got 0 values/); + +wasmFailValidateText( + `(module + (type (func (result i64))) + (table 0 funcref) + (func $type-num-vs-num + (i32.eqz (return_call_indirect (type 0) (i32.const 0)))))`, + /type mismatch: expected 0 values, got 1 values/); + +wasmFailValidateText( + `(module + (type (func (result i64))) + (table 0 funcref) + (func $type-num-vs-num (result i32) + (i32.eqz (return_call_indirect (type 0) (i32.const 0)))))`, + /expression has type i64 but expected i32/); + +wasmFailValidateText( + `(module + (type (func (param i32))) + (table 0 funcref) + (func $arity-0-vs-1 + (return_call_indirect (type 0) (i32.const 0))))`, + /popping value from empty stack/); + +wasmFailValidateText( + `(module + (type (func (param f64 i32))) + (table 0 funcref) + (func $arity-0-vs-2 + (return_call_indirect (type 0) (i32.const 0))))`, + /popping value from empty stack/); + +wasmFailValidateText( + `(module + (type (func (param i32))) + (table 0 funcref) + (func $type-func-void-vs-i32 + (return_call_indirect (type 0) (i32.const 1) (nop))))`, + /popping value from empty stack/); + +wasmFailValidateText( + `(module + (type (func (param i32))) + (table 0 funcref) + (func $type-func-num-vs-i32 + (return_call_indirect (type 0) (i32.const 0) (i64.const 1))))`, + /expression has type i64 but expected i32/); + +wasmFailValidateText( + `(module + (type (func (param i32 i32))) + (table 0 funcref) + (func $type-first-void-vs-num + (return_call_indirect (type 0) (nop) (i32.const 1) (i32.const 0)) + ))`, + /popping value from empty stack/); + +wasmFailValidateText( + `(module + (type (func (param i32 i32))) + (table 0 funcref) + (func $type-second-void-vs-num + (return_call_indirect (type 0) (i32.const 1) (nop) (i32.const 0))))`, + /popping value from empty stack/); + +wasmFailValidateText( + `(module + (type (func (param i32 f64))) + (table 0 funcref) + (func $type-first-num-vs-num + (return_call_indirect (type 0) + (f64.const 1) (i32.const 1) (i32.const 0))))`, + /expression has type i32 but expected f64/); + +wasmFailValidateText( + `(module + (type (func (param f64 i32))) + (table 0 funcref) + (func $type-second-num-vs-num + (return_call_indirect (type 0) + (i32.const 1) (f64.const 1) (i32.const 0))))`, + /expression has type f64 but expected i32/); + +wasmFailValidateText( + `(module + (table 0 funcref) + (func $unbound-type + (return_call_indirect (type 1) (i32.const 0))))`, + /signature index out of range/); + +wasmFailValidateText( + `(module + (table 0 funcref) + (func $large-type + (return_call_indirect (type 1012321300) (i32.const 0))))`, + /signature index out of range/); diff --git a/js/src/jit-test/tests/wasm/tail-calls/return-call-profiling.js b/js/src/jit-test/tests/wasm/tail-calls/return-call-profiling.js new file mode 100644 index 0000000000..2946a16d71 --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/return-call-profiling.js @@ -0,0 +1,68 @@ +// Tests if the profiler (frame iterator) can unwind in the middle +// of collapse frame instructions. + +enableGeckoProfiling(); +try { + enableSingleStepProfiling(); +} catch (e) { + // continue anyway if single step profiling is not supported +} + +var ins = wasmEvalText(` +(module + (func $f (param i64 i64 i64 i64 i64 i64 i64 i64 i64) + local.get 0 + i64.eqz + br_if 0 + local.get 0 + return_call $g + ) + (func $g (param i64) + local.get 0 + i64.const 1 + i64.sub + i64.const 2 + i64.const 6 + i64.const 3 + i64.const 4 + i64.const 1 + i64.const 2 + i64.const 6 + i64.const 3 + return_call $f + ) + (func (export "run") (param i64) + local.get 0 + call $g + ) +)`); + +for (var i = 0; i < 10; i++) { + ins.exports.run(100n); +} + +// Also when trampoline is used. +var ins0 = wasmEvalText(`(module (func (export "t")))`); +var ins = wasmEvalText(` +(module + (import "" "t" (func $g)) + (func $f (return_call_indirect $t (i32.const 0))) + (table $t 1 1 funcref) + + (func (export "run") (param i64) + loop + local.get 0 + i64.eqz + br_if 1 + call $f + local.get 0 + i64.const 1 + i64.sub + local.set 0 + br 0 + end + ) + (elem (i32.const 0) $g) +)`, {"": {t: ins0.exports.t},}); + +ins.exports.run(10n); diff --git a/js/src/jit-test/tests/wasm/tail-calls/return-call-validate.js b/js/src/jit-test/tests/wasm/tail-calls/return-call-validate.js new file mode 100644 index 0000000000..344549f58f --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/return-call-validate.js @@ -0,0 +1,162 @@ +// |jit-test| skip-if: !wasmTailCallsEnabled() + +wasmValidateText( + `(module + (func $arity-1-vs-0 + (i32.const 1) (return_call 1)) + (func))`); + +wasmValidateText( + `(module + (func $arity-2-vs-0 + (f64.const 2) (i32.const 1) (return_call 1)) + (func))`); + +const constants = [{'type': 'i32', 'value': '0x132'}, + {'type': 'i64', 'value': '0x164'}, + {'type': 'f32', 'value': '0xf32'}, + {'type': 'f64', 'value': '0xf64'}]; + +function validateConst(type, value) { + wasmValidateText( + `(module + (func $const-${type} (result ${type}) + (${type}.const ${value})) + (func $trampoline-${type} (result ${type}) + (return_call $const-${type})) + (func $t (result ${type}) + (return_call $trampoline-${type})))`); +} +for (let {type, value} of constants) { + validateConst(type, value); +} + +function validateOneArg(type, value) { + wasmValidateText( + `(module + (func $id-${type} (param ${type}) (result ${type}) + (local.get 0)) + (func $t (result ${type}) + (return_call $id-${type} (${type}.const ${value}))))`); +} +for (let {type, value} of constants) { + validateOneArg(type, value); +} + +function validateTwoArgs(t0, v0, t1, v1) { + wasmValidateText( + `(module + (func $second-${t0}-${t1} (param ${t0} ${t1}) (result ${t1}) + (local.get 1)) + (func $t (result ${t1}) + (return_call $second-${t0}-${t1} + (${t0}.const ${v0}) (${t1}.const ${v1}))))`); +} +for (let {type: t0, value: v0} of constants) { + for (let {type: t1, value: v1} of constants) { + validateTwoArgs(t0, v0, t1, v1); + } +} + +wasmValidateText( + `(module + (func $fac-acc (param i64 i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (return_call $fac-acc + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)))))) + (func $t (result i64) + (return_call $fac-acc (i64.const 0) (i64.const 1))))`); + +wasmValidateText( + `(module + (func $count (param i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 0)) + (else (return_call $count (i64.sub (local.get 0) (i64.const 1)))))) + (func $t (result i64) + (return_call $count (i64.const 0))))`); + +wasmValidateText( + `(module + (func $even (param i64) (result i32) + (if (result i32) (i64.eqz (local.get 0)) + (then (i32.const 44)) + (else (return_call $odd (i64.sub (local.get 0) (i64.const 1)))))) + (func $odd (param i64) (result i32) + (if (result i32) (i64.eqz (local.get 0)) + (then (i32.const 99)) + (else (return_call $even (i64.sub (local.get 0) (i64.const 1)))))) + (func $t (result i32) + (return_call $even (i64.const 0))))`); + +wasmFailValidateText( + `(module + (func $type-void-vs-num (result i32) + (return_call 1) (i32.const 0)) + (func))`, + /type mismatch: expected 1 values, got 0 values/); + +wasmFailValidateText( + `(module + (func $type-num-vs-num (result i32) + (return_call 1) (i32.const 0)) + (func (result i64) + (i64.const 1)))`, + /expression has type i64 but expected i32/); + +wasmFailValidateText( + `(module + (func $arity-0-vs-1 + (return_call 1)) + (func (param i32)))`, + /popping value from empty stack/); + +wasmFailValidateText( + `(module + (func $arity-0-vs-2 + (return_call 1)) + (func (param f64 i32)))`, + /popping value from empty stack/); + +wasmFailValidateText( + `(module + (func $type-first-void-vs-num + (return_call 1 (nop) (i32.const 1))) + (func (param i32 i32)))`, + /popping value from empty stack/); + +wasmFailValidateText( + `(module + (func $type-second-void-vs-num + (return_call 1 (i32.const 1) (nop))) + (func (param i32 i32)))`, + /popping value from empty stack/); + +wasmFailValidateText( + `(module + (func $type-first-num-vs-num + (return_call 1 (f64.const 1) (i32.const 1))) + (func (param i32 f64)))`, + /expression has type i32 but expected f64/); + +wasmFailValidateText( + `(module + (func $type-second-num-vs-num + (return_call 1 (i32.const 1) (f64.const 1))) + (func (param f64 i32)))`, + /expression has type f64 but expected i32/); + +wasmFailValidateText( + `(module + (func $unbound-func + (return_call 1)))`, + /callee index out of range/); + +wasmFailValidateText( + `(module + (func $large-func + (return_call 1012321300)))`, + /callee index out of range/); diff --git a/js/src/jit-test/tests/wasm/tail-calls/return_call.js b/js/src/jit-test/tests/wasm/tail-calls/return_call.js new file mode 100644 index 0000000000..ddaa933aaf --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/return_call.js @@ -0,0 +1,305 @@ +var ins = wasmEvalText(`(module + (func $fac-acc (export "fac-acc") (param i64 i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (return_call $fac-acc + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + ) + ) + ) + ) + (func (export "main") (param i64) (result i64) + (call $fac-acc (local.get 0) (i64.const 1)) + ) +)`); + +// Check return call via wasm function +assertEq(ins.exports.main(5n), 120n); + +// Check return call directly via interpreter stub +const fac = ins.exports["fac-acc"]; +assertEq(fac(4n, 1n), 24n); + +// Check return call directly via jit stub +check_stub1: { + let options = getJitCompilerOptions(); + if (!options["baseline.enable"]) break check_stub1; + const check = function() { + fac(4n, 1n); + }; + for (let i = options["baseline.warmup.trigger"] + 1; i--;) + check(); +} + +// Return call of an import +var ins0 = wasmEvalText(`(module + (func $fac-acc (export "fac-acc") (param i64 i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (return_call $fac-acc + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + ) + ) + ) + ) +)`); + +var ins = wasmEvalText(`(module + (import "" "fac-acc" (func $fac-acc (param i64 i64) (result i64))) + (func (export "fac") (param i64) (result i64) + local.get 0 + i64.const 1 + return_call $fac-acc + ) + (func (export "main") (result i64) + i64.const 4 + call 1 + ) +)`, {"": {"fac-acc": ins0.exports["fac-acc"],}}); + +assertEq(ins.exports.main(), 24n); +assertEq(ins.exports.fac(3n, 1n), 6n); +check_stub2: { + let options = getJitCompilerOptions(); + if (!options["baseline.enable"]) break check_stub2; + const check = function() { + ins.exports.fac(3n, 1n) + }; + for (let i = options["baseline.warmup.trigger"] + 1; i--;) + check(); +} + +// Check with parameters area growth +var ins0 = wasmEvalText(`(module + (func $fac-acc (export "fac-acc") (param i64 i64 i64 i64 i64 i64 i64 i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (return_call $fac-acc + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + i64.const 1 i64.const 2 i64.const 3 i64.const 4 i64.const 5 i64.const 6 + ) + ) + ) + ) +)`); + +var ins = wasmEvalText(`(module + (import "" "fac-acc" (func $fac-acc (param i64 i64 i64 i64 i64 i64 i64 i64) (result i64))) + (func (export "fac") (param i64) (result i64) + local.get 0 + i64.const 1 + i64.const 1 i64.const 2 i64.const 3 i64.const 4 i64.const 5 i64.const 6 + return_call $fac-acc + ) + (func (export "main") (result i64) + i64.const 5 + call 1 + ) +)`, {"": {"fac-acc": ins0.exports["fac-acc"],}}); + +assertEq(ins.exports.main(), 120n); +assertEq(ins.exports.fac(3n, 1n), 6n); +check_stub3: { + let options = getJitCompilerOptions(); + if (!options["baseline.enable"]) break check_stub3; + const check = function() { + ins.exports.fac(4n, 1n) + }; + for (let i = options["baseline.warmup.trigger"] + 1; i--;) + check(); +} + +// Test multi-value returns. +var ins = wasmEvalText(`(module + (memory (export "memory") 1 1) + (func $rec (export "rec") (param i32 i32 i32 i32 i32 i32 i32) (result i32 i32 f32 f32) + (local f32 i32) + (if (result i32 i32 f32 f32) (i32.ge_u (local.get 0) (local.get 1)) + (then + (local.get 5) + (local.get 6) + (local.tee 7 (f32.div (f32.convert_i32_u (local.get 3)) (f32.convert_i32_u (local.get 2)))) + (f32.sqrt + (f32.sub + (f32.div (f32.convert_i32_u (local.get 4)) (f32.convert_i32_u (local.get 2))) + (f32.mul (local.get 7) (local.get 7)) + ) + ) + ) + (else + (return_call $rec + (i32.add (local.get 0) (i32.const 1)) + (local.get 1) + (i32.add (local.get 2) (i32.const 1)) + (i32.add (local.get 3) (local.tee 8 (i32.load8_u (local.get 0)))) + (i32.add (local.get 4) (i32.mul (local.get 8) (local.get 8))) + (if (result i32) (i32.gt_s (local.get 5) (local.get 8)) + (then (local.get 8)) (else (local.get 5)) + ) + (if (result i32) (i32.lt_s (local.get 6) (local.get 8)) + (then (local.get 8)) (else (local.get 6)) + ) + ) + ) + ) + ) + (func $main (export "main") (result i32 i32 f32 f32) + (call $rec + (i32.const 0) + (i32.const 6) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 1000) + (i32.const -1000) + ) + ) + (data (i32.const 0) "\\02\\13\\22\\04\\08\\30") +)`); + +const main = ins.exports["main"]; +assertEq(""+ main(), "2,48,19.16666603088379,16.836633682250977"); +assertEq("" + ins.exports.rec(1, 5, 0, 0, 0, 1000, -1000), "4,34,16.25,11.627016067504883"); +check_stub3: { + let options = getJitCompilerOptions(); + if (!options["baseline.enable"]) break check_stub3; + const check = function() { + ins.exports.rec(1, 5, 0, 0, 0, 1000, -1000); + }; + for (let i = options["baseline.warmup.trigger"] + 1; i--;) + check(); +} + +// Handling trap. +var ins = wasmEvalText(`(module + (func $fac-acc (export "fac") (param i64 i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (unreachable)) + (else + (return_call $fac-acc + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + ) + ) + ) + ) + (func (export "main") (param i64) (result i64) + (call $fac-acc (local.get 0) (i64.const 1)) + ) +)`); + +assertErrorMessage(() => ins.exports.main(4n), WebAssembly.RuntimeError, /unreachable executed/); +assertErrorMessage(() => ins.exports.fac(3n, 1n), WebAssembly.RuntimeError, /unreachable executed/); + +// Performance and stack growth: calculating sum of numbers 1..40000000 +var ins = wasmEvalText(`(module + (func $sum (param i32 i64) (result i64) + local.get 0 + i32.eqz + if + local.get 1 + return + else + local.get 0 + i32.const 1 + i32.sub + local.get 1 + local.get 0 + i64.extend_i32_s + i64.add + return_call $sum + end + unreachable + ) + + (func (export "main") (param i32) (result i64) + local.get 0 + i64.const 0 + call $sum + ) +)`); + +if (getBuildConfiguration("simulator")) { + assertEq(ins.exports.main(400000), 80000200000n); +} else { + assertEq(ins.exports.main(40000000), 800000020000000n); +} + +// GC/externref shall not cling to the trampoline frame. +// The `return_call` caller will create a trampoline because the callee is +// an import. The caller will create a GC object and will hold in its frame +// and a WeakMap. +// Test if the created object is in the WeakMap even after gc(). +var wm = new WeakMap(); +var ins = wasmEvalText(`(module + (import "" "test" (func $test)) + (func $sum (param i32 i64) (result i64) + local.get 0 + i32.eqz + if + call $test + local.get 1 + return + else + local.get 0 + i32.const 1 + i32.sub + local.get 1 + local.get 0 + i64.extend_i32_s + i64.add + return_call $sum + end + unreachable + ) + (export "sum" (func $sum)) +)`, {"": { + test() { + gc(); + assertEq(nondeterministicGetWeakMapKeys(wm).length, 0); + } +}}); + +var ins2 = wasmEvalText(`(module + (import "" "add_ref" (func $add_ref (result externref))) + (import "" "use_ref" (func $use_ref (param externref))) + (import "" "sum" (func $sum (param i32 i64) (result i64))) + (global $g1 (mut i32) (i32.const 0)) + (func (export "main_gc") (param i32) (result i64) + (local $ref externref) + call $add_ref + local.set $ref + + local.get $ref + call $use_ref + + block + global.get $g1 + br_if 0 + local.get 0 + i64.const 0 + return_call $sum + end + + local.get $ref + call $use_ref + i64.const -1 + ) +)`, {"": { + sum: ins.exports.sum, + add_ref() { + const obj = {}; wm.set(obj, 'foo'); return obj; + }, + use_ref(obj) { + assertEq(nondeterministicGetWeakMapKeys(wm).length, 1); + }, +}}); + +assertEq(ins2.exports.main_gc(400000), 80000200000n); +assertEq(nondeterministicGetWeakMapKeys(wm).length, 0); diff --git a/js/src/jit-test/tests/wasm/tail-calls/return_call_indirect.js b/js/src/jit-test/tests/wasm/tail-calls/return_call_indirect.js new file mode 100644 index 0000000000..f9639902fe --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/return_call_indirect.js @@ -0,0 +1,156 @@ +var ins0 = wasmEvalText(`(module + (func $fac-acc (export "fac-acc") (param i64 i64) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (return_call $fac-acc + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + ) + ) + ) + ) +)`); + +var ins = wasmEvalText(`(module + (import "" "fac-acc" (func $fac-acc (param i64 i64) (result i64))) + (type $ty (func (param i64 i64) (result i64))) + (table $t 1 1 funcref) + (func $f (export "fac") (param i64) (result i64) + local.get 0 + i64.const 1 + i32.const 0 + return_call_indirect $t (type $ty) + ) + (elem $t (i32.const 0) $fac-acc) + + (func (export "main") (result i64) + i64.const 5 + call $f + ) +)`, {"": {"fac-acc": ins0.exports["fac-acc"]}}); + +// Check return call via wasm function +assertEq(ins.exports.main(5n), 120n); + +// Check return call directly via interpreter stub +const fac = ins.exports["fac"]; +assertEq(fac(4n, 1n), 24n); + +// Check return call directly via jit stub +check_stub1: { + let options = getJitCompilerOptions(); + if (!options["baseline.enable"]) break check_stub1; + const check = function() { + fac(4n, 1n); + }; + for (let i = options["baseline.warmup.trigger"] + 1; i--;) + check(); +} + +// Invalid func type +var ins = wasmEvalText(`(module + (import "" "fac-acc" (func $fac-acc (param i64 i64) (result i64))) + (type $ty (func (param i64 i64) (result i64))) + (type $tz (func (param i64) (result i64))) + (table $t 1 1 funcref) + (func $f (export "fac") (param i64) (result i64) + local.get 0 + i64.const 1 + i32.const 0 + return_call_indirect $t (type $tz) + ) + (elem $t (i32.const 0) $fac-acc) + + (func (export "main") (result i64) + i64.const 5 + call $f + ) +)`, {"": {"fac-acc": ins0.exports["fac-acc"]}}); + +assertErrorMessage(() => ins.exports.main(), WebAssembly.RuntimeError, /indirect call signature mismatch/); +assertErrorMessage(() => ins.exports.fac(6n), WebAssembly.RuntimeError, /indirect call signature mismatch/); + +// Invalid func type, but testing when entry directly does invalid return_call_indirect. +var wasm = wasmTextToBinary(`(module + (global $g (export "g") (mut i32) (i32.const 0)) + (table 1 1 funcref) + (type $ft (func (param f64))) + (func $f (export "f") + unreachable + ) + (func $test (export "test") + global.get $g + br_if 0 + f64.const 0.0 + i32.const 0 + return_call_indirect (type $ft) + ) + (elem (i32.const 0) $f) +)`); + +var ins = new WebAssembly.Instance(new WebAssembly.Module(wasm)); +function check_err() { ins.exports.test(); } +assertErrorMessage(check_err, WebAssembly.RuntimeError, /indirect call signature mismatch/); + +var ins = new WebAssembly.Instance(new WebAssembly.Module(wasm)); +check_stub2: { + let options = getJitCompilerOptions(); + if (!options["baseline.enable"]) break check_stub2; + ins.exports.g.value = 1; + for (let i = options["baseline.warmup.trigger"] + 1; i--;) + check_err(); + ins.exports.g.value = 0; + assertErrorMessage(check_err, WebAssembly.RuntimeError, /indirect call signature mismatch/); +} + +var ins = new WebAssembly.Instance(new WebAssembly.Module(wasm)); +check_stub3: { + let options = getJitCompilerOptions(); + if (!options["ion.enable"]) break check_stub3; + ins.exports.g.value = 1; + var check_err2 = function() { for (var i = 0; i < 5; i++) ins.exports.test(); }; + for (let i = options["ion.warmup.trigger"]+2; i--;) + check_err2(); + ins.exports.g.value = 0; + assertErrorMessage(() => check_err2(), WebAssembly.RuntimeError, /indirect call signature mismatch/); +} + +// Performance and stack growth: calculating sum of numbers 1..40000000 +var ins = wasmEvalText(`(module + (table 1 1 funcref) + (type $rec (func (param i32 i64) (result i64))) + (func $sum (param i32 i64) (result i64) + local.get 0 + i32.eqz + if + local.get 1 + return + else + local.get 0 + i32.const 1 + i32.sub + local.get 1 + local.get 0 + i64.extend_i32_s + i64.add + i32.const 0 + return_call_indirect (type $rec) + end + unreachable + ) + (elem (i32.const 0) $sum) + + (func (export "main") (param i32) (result i64) + local.get 0 + i64.const 0 + i32.const 0 + return_call_indirect (type $rec) + ) +)`); + +if (getBuildConfiguration("simulator")) { + assertEq(ins.exports.main(400000), 80000200000n); +} else { + assertEq(ins.exports.main(40000000), 800000020000000n); +} diff --git a/js/src/jit-test/tests/wasm/tail-calls/return_call_ref.js b/js/src/jit-test/tests/wasm/tail-calls/return_call_ref.js new file mode 100644 index 0000000000..c5f250a41c --- /dev/null +++ b/js/src/jit-test/tests/wasm/tail-calls/return_call_ref.js @@ -0,0 +1,94 @@ +// |jit-test| --wasm-gc; skip-if: !wasmGcEnabled() +var ins = wasmEvalText(`(module + (type $t (func (param i64 i64 funcref) (result i64))) + (elem declare func $fac-acc $fac-acc-broken) + (func $fac-acc (export "fac-acc") (param i64 i64 funcref) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (return_call $vis + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + (local.get 2) + ) + ) + ) + ) + ;; same as $fac-acc but fails on i == 6 + (func $fac-acc-broken (param i64 i64 funcref) (result i64) + (if (result i64) (i64.eqz (local.get 0)) + (then (local.get 1)) + (else + (return_call $vis + (i64.sub (local.get 0) (i64.const 1)) + (i64.mul (local.get 0) (local.get 1)) + (select (result funcref) + (ref.null func) (local.get 2) + (i64.eq (local.get 0) (i64.const 6))) + ) + ) + ) + ) + (func $vis (export "vis") (param i64 i64 funcref) (result i64) + local.get 0 + local.get 1 + local.get 2 + local.get 2 + ref.cast (ref null $t) + return_call_ref $t + ) + (func $trap (export "trap") (param i64 i64 funcref) (result i64) + unreachable + ) + (func (export "main") (param i64) (result i64) + (call $vis (local.get 0) (i64.const 1) (ref.func $fac-acc)) + ) + (func (export "main_null") (param i64) (result i64) + (return_call $vis (local.get 0) (i64.const 1) (ref.null $t)) + ) + (func (export "main_broken") (param i64) (result i64) + (return_call $vis (local.get 0) (i64.const 1) (ref.func $fac-acc-broken)) + ) +)`); + +// Check return call via wasm function +assertEq(ins.exports.main(5n), 120n); + +// Check return call directly via interpreter stub +const fac = ins.exports["fac-acc"]; +const vis = ins.exports["vis"]; +assertEq(vis(4n, 1n, fac), 24n); + +// Calling into JavaScript (and back). +if ("Function" in WebAssembly) { + const visFn = new WebAssembly.Function({ + parameters: ["i64", "i64", "funcref"], + results: ["i64"] + }, function (i, n, fn) { + if (i <= 0n) { + return n; + } + return vis(i - 1n, i * n, fn); + }); + + assertEq(vis(3n, 1n, visFn), 6n); +} + +// Check return call directly via jit stub +check_stub1: { + let options = getJitCompilerOptions(); + if (!options["baseline.enable"]) break check_stub1; + const check = function() { + vis(4n, 1n, fac); + }; + for (let i = options["baseline.warmup.trigger"] + 1; i--;) + check(); +} + +// Handling traps. +const trap = ins.exports["trap"]; +assertErrorMessage(() => vis(4n, 1n, trap), WebAssembly.RuntimeError, /unreachable executed/); +const main_broken = ins.exports["main_broken"]; +assertErrorMessage(() => main_broken(8n), WebAssembly.RuntimeError, /dereferencing null pointer/); +const main_null = ins.exports["main_null"]; +assertErrorMessage(() => main_null(5n), WebAssembly.RuntimeError, /dereferencing null pointer/); diff --git a/js/src/jit-test/tests/wasm/text.js b/js/src/jit-test/tests/wasm/text.js new file mode 100644 index 0000000000..97af720008 --- /dev/null +++ b/js/src/jit-test/tests/wasm/text.js @@ -0,0 +1,123 @@ +var parsingError = /wasm text error/; + +assertErrorMessage(() => wasmEvalText(''), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('('), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(m'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(moduler'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func) (export "a'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func (local $a i32) (param $b f32)))'), SyntaxError, parsingError); + +assertErrorMessage(() => wasmEvalText('(module (func $a) (func) (export "a" (func $a)) (export "b" (func $b)))'), SyntaxError, /failed to find name/); +assertErrorMessage(() => wasmEvalText('(module (import "a" "b" (func $foo)) (import "a" "b" (func $foo)))'), SyntaxError, /duplicate func identifier/); +assertErrorMessage(() => wasmEvalText('(module (func $foo) (func $foo))'), SyntaxError, /duplicate func identifier/); +assertErrorMessage(() => wasmEvalText('(module (func (param $a i32) (local $a i32)))'), SyntaxError, /duplicate local identifier/); +assertErrorMessage(() => wasmEvalText('(module (func (local.get $a)))'), SyntaxError, /failed to find name/); +assertErrorMessage(() => wasmEvalText('(module (type $a (func)) (type $a (func (param i32))))'), SyntaxError, /duplicate type identifier/); +assertErrorMessage(() => wasmEvalText('(module (import "a" "" (func)) (func (call $abc)))'), SyntaxError, /failed to find name/); +assertErrorMessage(() => wasmEvalText('(module (type $a (func)) (func (type $b) (i32.const 13)))'), SyntaxError, /failed to find name/); +assertErrorMessage(() => wasmEvalText('(module (type $a (func)) (func (call_indirect (type $c) (i32.const 0) (local.get 0))))'), SyntaxError, /failed to find name/); +assertErrorMessage(() => wasmEvalText('(module (func (br $a)))'), SyntaxError, /failed to find name/); +assertErrorMessage(() => wasmEvalText('(module (func (block $a ) (br $a)))'), SyntaxError, /failed to find name/); + +assertErrorMessage(() => wasmEvalText(`(module (func (call ${0xffffffff})))`), WebAssembly.CompileError, /(callee index out of range)|(function index out of bounds)/); +assertErrorMessage(() => wasmEvalText(`(module (export "func" ${0xffffffff}))`), SyntaxError, parsingError); + +wasmEvalText('(module (func (param $a i32)))'); +wasmEvalText('(module (func (param i32)))'); +wasmEvalText('(module (func (param i32 i32 f32 f64 i32)))'); +assertErrorMessage(() => wasmEvalText('(module (func (param $a)))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func (param $a i32 i32)))'), SyntaxError, parsingError); + +wasmEvalText('(module (func (local $a i32)))'); +wasmEvalText('(module (func (local i32)))'); +wasmEvalText('(module (func (local i32 i32 f32 f64 i32)))'); +assertErrorMessage(() => wasmEvalText('(module (func (local $a)))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func (local $a i32 i32)))'), SyntaxError, parsingError); + +// Table +assertErrorMessage(() => wasmEvalText('(module (table (local $a)))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t 1))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t 1 10))'), SyntaxError, parsingError); +wasmEvalText('(module (table $t 1 10 funcref))'); +wasmEvalText('(module (table $t 1 funcref))'); +wasmEvalText('(module (table 0 funcref))'); + +assertErrorMessage(() => wasmEvalText('(module (table $t funcref))'), SyntaxError, parsingError); +wasmEvalText('(module (table $t funcref (elem)))'); +wasmEvalText('(module (func) (table $t funcref (elem 0 0 0)))'); + +const { Table } = WebAssembly; +const table = new Table({initial:1, element:"anyfunc"}); +assertErrorMessage(() => wasmEvalText('(module (table $t (import) 1 funcref))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t (import "mod" "field") 1 funcref (elem 1 2 3)))'), SyntaxError, parsingError); +wasmEvalText('(module (table $t (import "mod" "field") 1 funcref))', {mod: {field: table}}); + +assertErrorMessage(() => wasmEvalText('(module (table $t (export "mod") 1))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t (export "mod") funcref))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (table $t (export "mod") funcref 1 2 3))'), SyntaxError, parsingError); +assertEq(wasmEvalText('(module (table $t (export "tbl") funcref (elem)))').exports.tbl instanceof Table, true); +assertEq(wasmEvalText('(module (func) (table $t (export "tbl") funcref (elem 0 0 0)))').exports.tbl instanceof Table, true); + +// Functions. +assertErrorMessage(() => wasmEvalText('(module (func $t import))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func $t (import)))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (func $t (import "mod" "func" (local i32))))'), SyntaxError, parsingError); + +const func = i => 42 + i; +wasmEvalText('(module (func $t (import "mod" "func")))', { mod: {func} }); +wasmEvalText('(module (func $t (import "mod" "func") (param i32)))', { mod: {func} }); +wasmEvalText('(module (func $t (import "mod" "func") (result i32)))', { mod: {func} }); +wasmEvalText('(module (func $t (import "mod" "func") (param i32) (result i32)))', { mod: {func} }); +wasmEvalText('(module (func $t (import "mod" "func") (param i32)))', { mod: {func} }); + +assertErrorMessage(() => wasmEvalText('(module (func $t (import "mod" "func") (type)))', { mod: {func} }), SyntaxError, parsingError); +wasmEvalText('(module (type $t (func)) (func $t (import "mod" "func") (type $t)))', { mod: {func} }); + +assertErrorMessage(() => wasmEvalText('(module (func $t (export))))'), SyntaxError, parsingError); +wasmEvalText('(module (func (export "f")))'); +wasmEvalText('(module (func $f (export "f")))'); +wasmEvalText('(module (func $f (export "f") (param i32) (result i32) (i32.add (local.get 0) (i32.const 42))))'); + +assertErrorMessage(() => wasmEvalText(` + (module + (type $tf (func (param i32) (result i32))) + (func (import "mod" "a") (type $tf)) + (func (export "f1")) + (func (import "mod" "b") (type $tf)) + (func (export "f2")) + ) +`), SyntaxError, /import after function/); + +// Globals. +assertErrorMessage(() => wasmEvalText('(module (global $t (export)))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (global $t (export "g")))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (global $t (export "g") i32))'), WebAssembly.CompileError, /popping value/); +wasmEvalText('(module (global $t (export "g") i32 (i32.const 42)))'); + +assertErrorMessage(() => wasmEvalText('(module (global $t (import) i32))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (global $t (import "mod" "field")))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (global $t (import "mod" "field")) i32 (i32.const 42))'), SyntaxError, parsingError); +wasmEvalText('(module (global $t (import "mod" "field") i32))', { mod: {field: 42} }); + +assertErrorMessage(() => wasmEvalText(` + (module + (global (import "mod" "a") i32) + (global (export "f1") i32 (i32.const 42)) + (global (import "mod" "b") i32) + ) +`), SyntaxError, /import after global/); + +// Memory. +assertErrorMessage(() => wasmEvalText('(module (memory (export)))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (memory (export "g")))'), SyntaxError, parsingError); +wasmEvalText('(module (memory $t (export "g") 0))'); + +const mem = new WebAssembly.Memory({ initial: 1 }); +assertErrorMessage(() => wasmEvalText('(module (memory $t (import) 1))'), SyntaxError, parsingError); +assertErrorMessage(() => wasmEvalText('(module (memory $t (import "mod" "field")))'), SyntaxError, parsingError); +wasmEvalText('(module (memory $t (import "mod" "field") 1))', { mod: {field: mem} }); + +// Note: the s-expression text format is temporary, this file is mostly just to +// hold basic error smoke tests. diff --git a/js/src/jit-test/tests/wasm/timeout/1.js b/js/src/jit-test/tests/wasm/timeout/1.js new file mode 100644 index 0000000000..f731e7910f --- /dev/null +++ b/js/src/jit-test/tests/wasm/timeout/1.js @@ -0,0 +1,15 @@ +// |jit-test| exitstatus: 6; skip-if: !wasmIsSupported() + +// Don't include wasm.js in timeout tests: when wasm isn't supported, it will +// quit(0) which will cause the test to fail. + +var code = wasmTextToBinary(`(module + (func (export "iloop") + (loop $top br $top) + ) +)`); + +var i = new WebAssembly.Instance(new WebAssembly.Module(code)); +timeout(1); +i.exports.iloop(); +assertEq(true, false); diff --git a/js/src/jit-test/tests/wasm/timeout/2.js b/js/src/jit-test/tests/wasm/timeout/2.js new file mode 100644 index 0000000000..25267f226c --- /dev/null +++ b/js/src/jit-test/tests/wasm/timeout/2.js @@ -0,0 +1,30 @@ +// |jit-test| exitstatus: 6; skip-if: !wasmIsSupported() + +// Don't include wasm.js in timeout tests: when wasm isn't supported, it will +// quit(0) which will cause the test to fail. + +var tbl = new WebAssembly.Table({initial:1, element:"anyfunc"}); + +new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`(module + (import "imports" "tbl" (table 1 funcref)) + (func $iloop + loop $top + br $top + end + ) + (elem (i32.const 0) $iloop) +)`)), {imports:{tbl}}); + +var outer = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`(module + (import "imports" "tbl" (table 1 funcref)) + (type $v2v (func)) + (func (export "run") + i32.const 0 + call_indirect (type $v2v) + ) +)`)), {imports:{tbl}}); + +setJitCompilerOption('simulator.always-interrupt', 1); +timeout(1, () => { tbl.set(0, null); gc() }); +outer.exports.run(); +assertEq(true, false); diff --git a/js/src/jit-test/tests/wasm/timeout/debug-interrupt-1.js b/js/src/jit-test/tests/wasm/timeout/debug-interrupt-1.js new file mode 100644 index 0000000000..940bde07a1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/timeout/debug-interrupt-1.js @@ -0,0 +1,23 @@ +// |jit-test| exitstatus: 6; skip-if: !wasmDebuggingEnabled() + +// Don't include wasm.js in timeout tests: when wasm isn't supported, it will +// quit(0) which will cause the test to fail. + +// Note: this test triggers an interrupt and then iloops in Wasm code. If the +// interrupt fires before the Wasm code is compiled, the test relies on the +// JS interrupt check in onEnterFrame to catch it. Warp/Ion code however can +// elide the combined interrupt/overrecursion check in simple leaf functions. +// Long story short, set the Warp threshold to a non-zero value to prevent +// intermittent timeouts with --ion-eager. +setJitCompilerOption("ion.warmup.trigger", 30); + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("Debugger(parent).onEnterFrame = function() {};"); +timeout(0.01); +var code = wasmTextToBinary(`(module + (func (export "f1") + (loop $top br $top) + ) +)`); +new WebAssembly.Instance(new WebAssembly.Module(code)).exports.f1(); diff --git a/js/src/jit-test/tests/wasm/timeout/debug-interrupt-2.js b/js/src/jit-test/tests/wasm/timeout/debug-interrupt-2.js new file mode 100644 index 0000000000..7c0d16aeae --- /dev/null +++ b/js/src/jit-test/tests/wasm/timeout/debug-interrupt-2.js @@ -0,0 +1,28 @@ +// |jit-test| exitstatus: 6; skip-if: !wasmDebuggingEnabled() + +// Don't include wasm.js in timeout tests: when wasm isn't supported, it will +// quit(0) which will cause the test to fail. + +// Note: this test triggers an interrupt and then iloops in Wasm code. If the +// interrupt fires before the Wasm code is compiled, the test relies on the +// JS interrupt check in onEnterFrame to catch it. Warp/Ion code however can +// elide the combined interrupt/overrecursion check in simple leaf functions. +// Long story short, set the Warp threshold to a non-zero value to prevent +// intermittent timeouts with --ion-eager. +setJitCompilerOption("ion.warmup.trigger", 30); + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("Debugger(parent).onEnterFrame = function() {};"); +timeout(0.01); +var code = wasmTextToBinary(`(module + (func $f2 + loop $top + br $top + end + ) + (func (export "f1") + call $f2 + ) +)`); +new WebAssembly.Instance(new WebAssembly.Module(code)).exports.f1(); diff --git a/js/src/jit-test/tests/wasm/timeout/debug-noprofiling.js b/js/src/jit-test/tests/wasm/timeout/debug-noprofiling.js new file mode 100644 index 0000000000..5b1cdd4192 --- /dev/null +++ b/js/src/jit-test/tests/wasm/timeout/debug-noprofiling.js @@ -0,0 +1,31 @@ +// |jit-test| exitstatus: 6; skip-if: !wasmDebuggingEnabled() + +// Don't include wasm.js in timeout tests: when wasm isn't supported, it will +// quit(0) which will cause the test to fail. + +newGlobal({newCompartment: true}).Debugger().addDebuggee(this); + +var t = new WebAssembly.Table({ + initial: 1, + element: "anyfunc" +}); + +new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (import "imports" "t" (table 1 funcref)) + (func $iloop loop $top br $top end) + (elem (i32.const 0) $iloop)) +`)), { imports: { t } }); + +outer = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(` +(module + (import "imports" "t" (table 1 funcref)) + (type $v2v (func)) + (func (export "run") + i32.const 0 + call_indirect (type $v2v)) + )`)), { imports: { t } }); + +setJitCompilerOption('simulator.always-interrupt', 1); +timeout(1); +outer.exports.run(); diff --git a/js/src/jit-test/tests/wasm/timeout/directives.txt b/js/src/jit-test/tests/wasm/timeout/directives.txt new file mode 100644 index 0000000000..08048b372f --- /dev/null +++ b/js/src/jit-test/tests/wasm/timeout/directives.txt @@ -0,0 +1,2 @@ +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); + diff --git a/js/src/jit-test/tests/wasm/timeout/interrupt-multi-instance-activation.js b/js/src/jit-test/tests/wasm/timeout/interrupt-multi-instance-activation.js new file mode 100644 index 0000000000..05ac7ff51a --- /dev/null +++ b/js/src/jit-test/tests/wasm/timeout/interrupt-multi-instance-activation.js @@ -0,0 +1,28 @@ +// |jit-test| exitstatus: 6; skip-if: !wasmIsSupported() + +const {Module, Instance} = WebAssembly; + +const {innerWasm} = new Instance(new Module(wasmTextToBinary(`(module + (func (export "innerWasm") (result i32) + (local i32) + (loop $top + (local.set 0 (i32.add (local.get 0) (i32.const 1))) + (br_if $top (i32.lt_u (local.get 0) (i32.const 100000))) + ) + (local.get 0) + ) +)`))).exports; + +function middleJS() { + innerWasm(); +} + +const {outerWasm} = new Instance(new Module(wasmTextToBinary(`(module + (func $middleJS (import "" "middleJS")) + (func (export "outerWasm") (call $middleJS)) +)`)), {'':{middleJS}}).exports; + +timeout(1); +while (true) { + outerWasm(); +} diff --git a/js/src/jit-test/tests/wasm/timeout/interrupt-several-instances.js b/js/src/jit-test/tests/wasm/timeout/interrupt-several-instances.js new file mode 100644 index 0000000000..58dc642d16 --- /dev/null +++ b/js/src/jit-test/tests/wasm/timeout/interrupt-several-instances.js @@ -0,0 +1,21 @@ +// |jit-test| exitstatus: 6; skip-if: !wasmIsSupported() + +// Don't include wasm.js in timeout tests: when wasm isn't supported, it will +// quit(0) which will cause the test to fail. + +load(libdir + "asm.js"); + +var code = ` + var out = ffi.out; + function f() { + out(); + } + return f; +`; + +var ffi = {}; +ffi.out = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func (export "f") (loop $top (br $top))))'))).exports.f; + +timeout(1); +asmLink(asmCompile('glob', 'ffi', USE_ASM + code), this, ffi)(); +assertEq(true, false); diff --git a/js/src/jit-test/tests/wasm/timeout/stack-overflow.js b/js/src/jit-test/tests/wasm/timeout/stack-overflow.js new file mode 100644 index 0000000000..f286997a9c --- /dev/null +++ b/js/src/jit-test/tests/wasm/timeout/stack-overflow.js @@ -0,0 +1,97 @@ +// |jit-test| exitstatus: 3; skip-if: !wasmIsSupported() + +let { exports } = new WebAssembly.Instance( + new WebAssembly.Module(wasmTextToBinary(` + (module + (func (export "f") (param i32) (param i32) (param i32) (param i32) (result i32) + local.get 0 + i32.popcnt + local.get 1 + i32.popcnt + i32.add + + local.get 2 + i32.popcnt + local.get 3 + i32.popcnt + i32.add + + local.get 0 + local.get 1 + i32.sub + + local.get 2 + local.get 3 + i32.sub + + local.get 0 + local.get 1 + i32.mul + + local.get 2 + local.get 3 + i32.mul + + local.get 0 + local.get 2 + i32.sub + + local.get 1 + local.get 3 + i32.sub + + local.get 0 + local.get 1 + i32.add + + local.get 2 + local.get 3 + i32.add + + local.get 0 + local.get 2 + i32.add + + local.get 1 + local.get 3 + i32.add + + local.get 0 + i32.ctz + local.get 1 + i32.ctz + i32.add + + local.get 2 + i32.ctz + local.get 3 + i32.ctz + + local.get 0 + local.get 1 + local.get 2 + local.get 3 + call 0 + + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + ) + ) + `)) +); + +timeout(1, function() {}); +exports.f() diff --git a/js/src/jit-test/tests/wasm/timeout/while-profiling.js b/js/src/jit-test/tests/wasm/timeout/while-profiling.js new file mode 100644 index 0000000000..f9f485ae4a --- /dev/null +++ b/js/src/jit-test/tests/wasm/timeout/while-profiling.js @@ -0,0 +1,19 @@ +// |jit-test| exitstatus: 6; skip-if: !wasmIsSupported() || !getBuildConfiguration("arm-simulator") + +// Single-step profiling currently only works in the ARM simulator + +// Don't include wasm.js in timeout tests: when wasm isn't supported, it will +// quit(0) which will cause the test to fail. + +var code = wasmTextToBinary(`(module + (func (export "iloop") + (loop $top br $top) + ) +)`); + +enableGeckoProfiling(); +enableSingleStepProfiling(); +var i = new WebAssembly.Instance(new WebAssembly.Module(code)); +timeout(.1); +i.exports.iloop(); +assertEq(true, false); diff --git a/js/src/jit-test/tests/wasm/trap-exit-stack-alignment.js b/js/src/jit-test/tests/wasm/trap-exit-stack-alignment.js new file mode 100644 index 0000000000..2d953e04a9 --- /dev/null +++ b/js/src/jit-test/tests/wasm/trap-exit-stack-alignment.js @@ -0,0 +1,123 @@ +// Function with high register pressure to force spills without function calls +// even on ARM64, and with a trap exit. +let func = wasmEvalText(`(module + (func + (param i32) + (result i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local i32) + (local.set 2 (i32.add (local.get 0 i32.const 4))) + (local.set 3 (i32.add (local.get 0 i32.const 5))) + (local.set 4 (i32.add (local.get 0 i32.const 6))) + (local.set 5 (i32.add (local.get 0 i32.const 7))) + (local.set 6 (i32.add (local.get 0 i32.const 8))) + (local.set 7 (i32.add (local.get 0 i32.const 9))) + (local.set 8 (i32.add (local.get 0 i32.const 10))) + (local.set 9 (i32.add (local.get 0 i32.const 11))) + (local.set 10 (i32.add (local.get 0 i32.const 12))) + (local.set 11 (i32.add (local.get 0 i32.const 13))) + (local.set 12 (i32.add (local.get 0 i32.const 14))) + (local.set 13 (i32.add (local.get 0 i32.const 15))) + (local.set 14 (i32.add (local.get 0 i32.const 16))) + (local.set 15 (i32.add (local.get 0 i32.const 17))) + (local.set 16 (i32.add (local.get 0 i32.const 18))) + (local.set 17 (i32.add (local.get 0 i32.const 19))) + (local.set 18 (i32.add (local.get 0 i32.const 20))) + (local.set 19 (i32.add (local.get 0 i32.const 21))) + (local.set 20 (i32.add (local.get 0 i32.const 22))) + (local.set 21 (i32.add (local.get 0 i32.const 23))) + (local.set 22 (i32.add (local.get 0 i32.const 24))) + (local.set 23 (i32.add (local.get 0 i32.const 25))) + (local.set 24 (i32.add (local.get 0 i32.const 26))) + (local.set 25 (i32.add (local.get 0 i32.const 27))) + (local.set 26 (i32.add (local.get 0 i32.const 28))) + (local.set 7 (i32.div_s (local.get 0) (local.get 0))) + local.get 0 + local.get 1 + local.get 2 + local.get 3 + local.get 4 + local.get 5 + local.get 6 + local.get 7 + local.get 8 + local.get 9 + local.get 10 + local.get 11 + local.get 12 + local.get 13 + local.get 14 + local.get 15 + local.get 16 + local.get 17 + local.get 18 + local.get 19 + local.get 20 + local.get 21 + local.get 22 + local.get 23 + local.get 24 + local.get 25 + local.get 26 + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + i32.add + ) + (export "" (func 0)) +)`).exports[""]; +assertEq(func(1), 417); +assertEq(func(2), 442); +let ex; +try { + func(0); +} catch (e) { + ex = e; +} +assertEq(ex instanceof WebAssembly.RuntimeError, true); diff --git a/js/src/jit-test/tests/wasm/ub-san-interp-entry.js b/js/src/jit-test/tests/wasm/ub-san-interp-entry.js new file mode 100644 index 0000000000..218977d34e --- /dev/null +++ b/js/src/jit-test/tests/wasm/ub-san-interp-entry.js @@ -0,0 +1,4 @@ +var { table } = wasmEvalText(` + (module (func $add) (table (export "table") 10 funcref) (elem (i32.const 0) $add)) +`).exports +table.get(0)(); diff --git a/js/src/jit-test/tests/wasm/udiv.js b/js/src/jit-test/tests/wasm/udiv.js new file mode 100644 index 0000000000..446f23c202 --- /dev/null +++ b/js/src/jit-test/tests/wasm/udiv.js @@ -0,0 +1,68 @@ +function test_i32_udiv_n2() { + return wasmEvalText( + `(module + (type (;0;) (func (param i32) (result i32))) + (func (;0;) (type 0) (param i32) (result i32) + local.get 0 + i32.const -2 + i32.div_u) + (export "main" (func 0)))` + ).exports["main"]; +} +function test_i32_udiv_n1() { + return wasmEvalText( + `(module + (type (;0;) (func (param i32) (result i32))) + (func (;0;) (type 0) (param i32) (result i32) + local.get 0 + i32.const -1 + i32.div_u) + (export "main" (func 0)))` + ).exports["main"]; +} +function test_i32_udiv_p2() { + return wasmEvalText( + `(module + (type (;0;) (func (param i32) (result i32))) + (func (;0;) (type 0) (param i32) (result i32) + local.get 0 + i32.const 2 + i32.div_u) + (export "main" (func 0)))` + ).exports["main"]; +} +function test_i32_udiv_p1() { + return wasmEvalText( + `(module + (type (;0;) (func (param i32) (result i32))) + (func (;0;) (type 0) (param i32) (result i32) + local.get 0 + i32.const 1 + i32.div_u) + (export "main" (func 0)))` + ).exports["main"]; +} + +let udiv_p1 = test_i32_udiv_p1(); +assertEq(udiv_p1(1), 1); +assertEq(udiv_p1(2), 2); +assertEq(udiv_p1(0x7fffffff), 0x7fffffff); +assertEq(udiv_p1(-1), -1); // results are converted to i32. + +let udiv_p2 = test_i32_udiv_p2(); +assertEq(udiv_p2(1), 0); +assertEq(udiv_p2(2), 1); +assertEq(udiv_p2(0x7fffffff), 0x7fffffff >> 1); +assertEq(udiv_p2(-1), 0x7fffffff); // -1 is converted to u32. + +let udiv_n1 = test_i32_udiv_n1(); +assertEq(udiv_n1(1), 0); +assertEq(udiv_n1(2), 0); +assertEq(udiv_n1(0x7fffffff), 0); +assertEq(udiv_n1(-1), 1); + +let udiv_n2 = test_i32_udiv_n2(); +assertEq(udiv_n2(1), 0); +assertEq(udiv_n2(2), 0); +assertEq(udiv_n2(0x7fffffff), 0); +assertEq(udiv_n2(-1), 1); diff --git a/js/src/jit-test/tests/wasm/unsupported/README.md b/js/src/jit-test/tests/wasm/unsupported/README.md new file mode 100644 index 0000000000..9687e7a9b6 --- /dev/null +++ b/js/src/jit-test/tests/wasm/unsupported/README.md @@ -0,0 +1 @@ +DO NOT ADD A directives.txt FILE IN THIS DIRECTORY. THE TEST CASE MUST RUN WITH MINIMAL PRELIMINARIES. diff --git a/js/src/jit-test/tests/wasm/unsupported/requires-armv7.js b/js/src/jit-test/tests/wasm/unsupported/requires-armv7.js new file mode 100644 index 0000000000..d7dde1f6ad --- /dev/null +++ b/js/src/jit-test/tests/wasm/unsupported/requires-armv7.js @@ -0,0 +1,5 @@ +// |jit-test| skip-if: !getBuildConfiguration("arm"); --arm-hwcap=vfp + +// Wasm should be unavailable in this configuration: floating point without +// armv7, and armv7 is required for atomics and unaligned accesses. +assertEq(typeof WebAssembly, "undefined"); diff --git a/js/src/jit-test/tests/wasm/unsupported/requires-floatingpoint.js b/js/src/jit-test/tests/wasm/unsupported/requires-floatingpoint.js new file mode 100644 index 0000000000..e99d00b126 --- /dev/null +++ b/js/src/jit-test/tests/wasm/unsupported/requires-floatingpoint.js @@ -0,0 +1,4 @@ +// |jit-test| skip-if: !getBuildConfiguration("arm"); --arm-hwcap=armv7 + +// Wasm should be unavailable in this configuration: armv7 without floating point. +assertEq(typeof WebAssembly, "undefined"); diff --git a/js/src/jit-test/tests/wasm/utf8.js b/js/src/jit-test/tests/wasm/utf8.js new file mode 100644 index 0000000000..fdda7ab0ca --- /dev/null +++ b/js/src/jit-test/tests/wasm/utf8.js @@ -0,0 +1,36 @@ +/* +(module + (func (param i32) (result i32) + (i32.add (local.get 0) (local.get 0))) + (export "hello" (func 0))) +*/ + +var txt = +`00 61 73 6d 01 00 00 00 01 06 01 60 01 7f 01 7f + 03 02 01 00 07 09 01 05 68 65 6c 6c 6f 00 00 0a + 09 01 07 00 20 00 20 00 6a 0b` + +var bin = new Uint8Array(txt.split(" ").map((x) => parseInt(x, 16))); +var mod = new WebAssembly.Module(bin); +var ins = new WebAssembly.Instance(mod); + +assertEq(ins.exports.hello(37), 2*37); + +assertEq(bin[25], 0x65); // the 'e' in 'hello' +bin[25] = 0x85; // bad UTF-8 + +assertEq(WebAssembly.validate(bin), false); + +assertThrowsInstanceOf(() => new WebAssembly.Module(bin), WebAssembly.CompileError); + +assertThrowsInstanceOf(() => wasmEvalText(`(module (import "\u2603" "" (func))) `, {}), TypeError); + +{ + let i1 = wasmEvalText(` (module (func (export "\u2603")))`); + assertThrowsInstanceOf(() => wasmEvalText(`(module (import "" "\u2603" (func (result i32))))`, + { "": { "\u2603": i1.exports['\u2603'] } }), + WebAssembly.LinkError); + assertThrowsInstanceOf(() => wasmEvalText(`(module (import "\u2603" "" (func (result i32))))`, + { "\u2603": { "": i1.exports['\u2603'] } }), + WebAssembly.LinkError); +} diff --git a/js/src/jit-test/tests/wasm/validate.js b/js/src/jit-test/tests/wasm/validate.js new file mode 100644 index 0000000000..64babd86ee --- /dev/null +++ b/js/src/jit-test/tests/wasm/validate.js @@ -0,0 +1,23 @@ +const { validate } = WebAssembly; + +assertErrorMessage(() => validate(), Error, /At least 1 argument required/); + +const argError = /first argument must be an ArrayBuffer or typed array object/; +assertErrorMessage(() => validate(null), Error, argError); +assertErrorMessage(() => validate(true), Error, argError); +assertErrorMessage(() => validate(42), Error, argError); +assertErrorMessage(() => validate(NaN), Error, argError); +assertErrorMessage(() => validate('yo'), Error, argError); +assertErrorMessage(() => validate([]), Error, argError); +assertErrorMessage(() => validate({}), Error, argError); +assertErrorMessage(() => validate(Symbol.iterator), Error, argError); +assertErrorMessage(() => validate({ valueOf: () => new ArrayBuffer(65536) }), Error, argError); + +assertEq(validate(wasmTextToBinary(`(module)`)), true); + +assertEq(validate(wasmTextToBinary(`(module (export "run" (func 0)))`)), false); +assertEq(validate(wasmTextToBinary(`(module (func) (export "run" (func 0)))`)), true); + +// Feature-testing proof-of-concept. +assertEq(validate(wasmTextToBinary(`(module (memory 1) (func (result i32) (memory.size)))`)), true); +assertEq(validate(wasmTextToBinary(`(module (memory 1) (func (result i32) (memory.grow (i32.const 42))))`)), true); diff --git a/js/src/jit-test/tests/wasm/wasm-abi.js b/js/src/jit-test/tests/wasm/wasm-abi.js new file mode 100644 index 0000000000..0301bfffac --- /dev/null +++ b/js/src/jit-test/tests/wasm/wasm-abi.js @@ -0,0 +1,39 @@ +for (let numLocals of [3, 4, 5, 6, 17, 18, 19]) { + for (let numParams of [1, 2, 3, 4, 5, 6, 7, 8]) { + let locals = ` (local `; + let setLocals = ``; + let getLocals = ``; + let adds = ``; + let sum = 0; + for (let i = 0; i < numLocals; i++) { + sum += i + 1; + locals += `i32 `; + setLocals += ` (local.set ${i + 1} (i32.add (local.get 0) (i32.const ${i + 1})))\n`; + getLocals += ` local.get ${i + 1}\n`; + if (i > 0) + adds += ` i32.add\n`; + } + locals += `)\n`; + + var callee = ` (func $f (param `; + var caller = ` (call $f `; + for (let i = 0; i < numParams; i++) { + callee += `f32 `; + caller += `(f32.const ${i}) `; + } + callee += `))\n`; + caller += `)\n`; + + var code = `(module \n` + + callee + + ` (func (export "run") (param i32) (result i32)\n` + + locals + + setLocals + + caller + + getLocals + + adds + + ` )\n` + + `)`; + wasmFullPass(code, numLocals * 100 + sum, undefined, 100); + } +} diff --git a/js/src/jit-test/tests/wasm/widening-i32-after-call.js b/js/src/jit-test/tests/wasm/widening-i32-after-call.js new file mode 100644 index 0000000000..da8ade97dc --- /dev/null +++ b/js/src/jit-test/tests/wasm/widening-i32-after-call.js @@ -0,0 +1,50 @@ +// |jit-test| skip-if: !hasDisassembler() || !(wasmCompileMode() == "baseline" || wasmCompileMode() == "ion") || !(getBuildConfiguration("x64") && !getBuildConfiguration("arm64-simulator") && !getBuildConfiguration("mips64-simulator")) + +// We widen i32 results after calls on 64-bit platforms for two reasons: +// +// - it's a cheap mitigation for certain spectre problems, and +// - it makes the high bits of the 64-bit register conform to platform +// conventions, which they might not if the call was to C++ code +// especially. +// +// This is a whitebox test that explicit widening instructions are inserted +// after calls on x64. The widening is platform-specific; on x64, the upper +// bits are zeroed. + +// What we can't test here is the direct-call-from-JIT path, as the generated +// code is not available to wasmDis. + +var ins = wasmEvalText(` +(module + (import "" "wasm2import" (func $g (result i32))) + (memory 1) + (type $ty (func (result i32))) + (table $t 1 1 funcref) + (func $f (result i32) + (i32.const 37)) + (func (export "wasm2wasm") (result i32) + (call $f)) + (func (export "wasm2import") (result i32) + (call $g)) + (func (export "wasmIndirect") (result i32) + (call_indirect $t (type $ty) (i32.const 0))) + (func (export "instanceCall") (result i32) + (memory.size)) +)`, {'':{'wasm2import': function() {}}}); + +switch (wasmCompileMode()) { + case "ion": + assertEq(wasmDis(ins.exports.wasm2wasm, {tier:'stable', asString:true}).match(/call.*\n(?:.*lea.*%rsp\n)?.*mov %eax, %eax/).length, 1); + assertEq(wasmDis(ins.exports.wasm2import, {tier:'stable', asString:true}).match(/call.*\n(?:.*or \$0x00, %r14\n)?(?:.*movq.*\n)*(?:.*lea.*%rsp\n)?.*mov %eax, %eax/).length, 1); + assertEq(wasmDis(ins.exports.wasmIndirect, {tier:'stable', asString:true}).match(/call.*\n(?:.*movq.*\n)*(?:.*lea.*%rsp\n)?.*mov %eax, %eax/).length, 1); + assertEq(wasmDis(ins.exports.instanceCall, {tier:'stable', asString:true}).match(/call.*\n(?:.*movq.*\n)*.*mov %eax, %eax/).length, 1); + break; + case "baseline": + assertEq(wasmDis(ins.exports.wasm2wasm, {tier:'stable', asString:true}).match(/call.*\n.*lea.*%rsp\n.*mov %eax, %eax/).length, 1); + assertEq(wasmDis(ins.exports.wasm2import, {tier:'stable', asString:true}).match(/call.*\n(?:.*or \$0x00, %r14\n)?.*lea.*%rsp\n(?:.*movq.*\n)*.*mov %eax, %eax/).length, 1); + assertEq(wasmDis(ins.exports.wasmIndirect, {tier:'stable', asString:true}).match(/call.*\n.*lea.*%rsp\n(?:.*movq.*\n)*.*mov %eax, %eax/).length, 1); + assertEq(wasmDis(ins.exports.instanceCall, {tier:'stable', asString:true}).match(/call.*\n.*lea.*%rsp\n(?:.*movq.*\n)*.*mov %eax, %eax/).length, 1); + break; + default: + throw "Unexpected compile mode"; +} diff --git a/js/src/jit-test/tests/wasm/worker-kill.js b/js/src/jit-test/tests/wasm/worker-kill.js new file mode 100644 index 0000000000..36b5ab9562 --- /dev/null +++ b/js/src/jit-test/tests/wasm/worker-kill.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +evalInWorker(` + var code = "(module "; + for (var i = 0; i < 100; i++) + code += "(func (param i32) (result i32) (i32.add (i32.const 1) (local.get 0))) "; + code += ")"; + var buf = wasmTextToBinary(code); + WebAssembly.compile(buf); +`); diff --git a/js/src/jit-test/tests/watchtower/basic.js b/js/src/jit-test/tests/watchtower/basic.js new file mode 100644 index 0000000000..dd3bbb45ff --- /dev/null +++ b/js/src/jit-test/tests/watchtower/basic.js @@ -0,0 +1,87 @@ +function getLogString(obj) { + let log = getWatchtowerLog(); + return log.map(item => { + assertEq(item.object, obj); + if (typeof item.extra === "symbol") { + item.extra = ""; + } + return item.kind + (item.extra ? ": " + item.extra : ""); + }).join("\n"); +} + +function testBasic() { + let o = {}; + addWatchtowerTarget(o); + + o.x = 1; + o.y = 2; + o[Symbol()] = 3; + Object.defineProperty(o, "foo", {enumerable: false, configurable: false, value: 1}); + Object.defineProperty(o, "getter", {get() { return 123; }}); + o.__proto__ = {}; + o.__proto__ = null; + o[12345] = 1; // Sparse elements are included for now. + delete o.x; + Object.defineProperty(o, "y", {writable: false}); + Object.defineProperty(o, "x", {value: 0}); + Object.seal(o); + Object.freeze(o); + + let log = getLogString(o); + assertEq(log, +`add-prop: x +add-prop: y +add-prop: +add-prop: foo +add-prop: getter +proto-change +proto-change +add-prop: 12345 +remove-prop: x +change-prop: y +add-prop: x +freeze-or-seal +freeze-or-seal`); +} +for (var i = 0; i < 20; i++) { + testBasic(); +} + +// Object.assign edge case. +function testAssign() { + let o = {}; + o.x = 1; + delete o.x; + let from = {x: 1, y: 2, z: 3, a: 4}; + addWatchtowerTarget(o); + addWatchtowerTarget(from); + Object.assign(o, from); + let log = getLogString(o); + assertEq(log, "add-prop: x\nadd-prop: y\nadd-prop: z\nadd-prop: a"); +} +testAssign(); + +function testJit() { + for (var i = 0; i < 20; i++) { + let o = {}; + addWatchtowerTarget(o); + o.x = 1; + o.y = 2; + let log = getLogString(o); + assertEq(log, "add-prop: x\nadd-prop: y"); + } +} +testJit(); + +// array.length is a custom data property. +function testCustomDataProp() { + let o = []; + addWatchtowerTarget(o); + + Object.defineProperty(o, "length", {writable: false}); + let log = getLogString(o); + assertEq(log, "change-prop: length"); +} +for (var i = 0; i < 20; i++) { + testCustomDataProp(); +} diff --git a/js/src/jit-test/tests/watchtower/bug-1871949.js b/js/src/jit-test/tests/watchtower/bug-1871949.js new file mode 100644 index 0000000000..9b8b277b36 --- /dev/null +++ b/js/src/jit-test/tests/watchtower/bug-1871949.js @@ -0,0 +1,19 @@ +function getLogString(obj) { + let log = getWatchtowerLog(); + return log.map(item => { + assertEq(item.object, obj); + if (typeof item.extra === "symbol") { + item.extra = ""; + } + return item.kind + (item.extra ? ": " + item.extra : ""); + }).join("\n"); +} + +const entry = cacheEntry(""); +addWatchtowerTarget(entry); +evaluate(entry, { "saveIncrementalBytecode": true }); +let log = getLogString(entry); + +// Nothing is logged for the manipulation of reserved slots, as we +// lack infrastructure to track them thus far. +assertEq(log.length, 0); diff --git a/js/src/jit-test/tests/watchtower/megamorphic-has-prop.js b/js/src/jit-test/tests/watchtower/megamorphic-has-prop.js new file mode 100644 index 0000000000..98481c636e --- /dev/null +++ b/js/src/jit-test/tests/watchtower/megamorphic-has-prop.js @@ -0,0 +1,33 @@ +function hasOwnProp(o, p) { + return Object.prototype.hasOwnProperty.call(o, p); +} +function testHasProp() { + var C = Object.create(null); + C.protox = 0; + var B = Object.create(C); + var objs = []; + for (var i = 0; i < 50; i++) { + var A = Object.create(B); + A["x" + i] = 0; + A.ownx = 3; + objs.push(A); + } + for (var i = 0; i < 10; i++) { + for (var j = 0; j < objs.length; j++) { + var obj = objs[j]; + assertEq(hasOwnProp(obj, "protox"), false); + assertEq("protox" in obj, true); + assertEq(obj.protox, 0); + + assertEq(hasOwnProp(obj, "ownx"), true); + assertEq("ownx" in obj, true); + assertEq(obj.ownx, 3); + + assertEq("missing" in obj, false); + assertEq(hasOwnProp(obj, "missing"), false); + assertEq(obj.missing, undefined); + } + } +} +testHasProp(); + diff --git a/js/src/jit-test/tests/watchtower/megamorphic-invalidate.js b/js/src/jit-test/tests/watchtower/megamorphic-invalidate.js new file mode 100644 index 0000000000..b4c78359fa --- /dev/null +++ b/js/src/jit-test/tests/watchtower/megamorphic-invalidate.js @@ -0,0 +1,81 @@ +setJitCompilerOption("ic.force-megamorphic", 1); + +function testAddToIntermediate() { + var C = Object.create(null); + var B = Object.create(C); + var A = Object.create(B); + C.x = 1; + for (var i = 0; i < 50; i++) { + assertEq(A.x, i <= 45 ? 1 : 0); + if (i === 45) { + B.x = 0; + } + } +} +for (var i = 0; i < 5; i++) { + testAddToIntermediate(); +} + +function testAddToReceiver() { + var C = Object.create(null); + var B = Object.create(C); + var A = Object.create(B); + C.x = 1; + for (var i = 0; i < 50; i++) { + assertEq(A.x, i <= 45 ? 1 : 0); + if (i === 45) { + A.x = 0; + } + } +} +for (var i = 0; i < 5; i++) { + testAddToReceiver(); +} + +function testDelete() { + var C = Object.create(null); + var B = Object.create(C); + var A = Object.create(B); + C.x = 1; + for (var i = 0; i < 50; i++) { + assertEq(A.x, i <= 45 ? 1 : undefined); + if (i === 45) { + delete C.x; + } + } +} +for (var i = 0; i < 5; i++) { + testDelete(); +} + +function testDataToAccessor() { + var C = Object.create(null); + var B = Object.create(C); + var A = Object.create(B); + C.x = 1; + for (var i = 0; i < 50; i++) { + assertEq(A.x, i <= 45 ? 1 : 7); + if (i === 45) { + Object.defineProperty(C, "x", {get: () => 7}); + } + } +} +for (var i = 0; i < 5; i++) { + testDataToAccessor(); +} + +function testProtoChange() { + var C = Object.create(null); + var B = Object.create(C); + var A = Object.create(B); + C.x = 1; + for (var i = 0; i < 50; i++) { + assertEq(A.x, i <= 45 ? 1 : 8); + if (i === 45) { + Object.setPrototypeOf(B, {a: 0, b: 1, x: 8}); + } + } +} +for (var i = 0; i < 5; i++) { + testProtoChange(); +} diff --git a/js/src/jit-test/tests/watchtower/megamorphic-long-proto-chain.js b/js/src/jit-test/tests/watchtower/megamorphic-long-proto-chain.js new file mode 100644 index 0000000000..675f29333f --- /dev/null +++ b/js/src/jit-test/tests/watchtower/megamorphic-long-proto-chain.js @@ -0,0 +1,28 @@ +setJitCompilerOption("ic.force-megamorphic", 1); + +function objectWithHops(hops) { + var o = Object.create(null); + o.hops = hops; + for (var i = 0; i < hops; i++) { + o = Object.create(o); + } + return o; +} +function test() { + var objs = []; + for (var i = 0; i < 32; i++) { + objs.push(objectWithHops(230 + i)); + } + for (var i = 0; i < 130; i++) { + var o = objs[i % objs.length]; + assertEq(o.hops, 230 + (i % objs.length)); + assertEq("hops" in o, true); + assertEq(Object.hasOwnProperty.call(o, "hops"), false); + assertEq(o.missing, undefined); + assertEq("missing" in o, false); + assertEq(Object.hasOwnProperty.call(o, "missing"), false); + } +} +for (var i = 0; i < 10; i++) { + test(); +} diff --git a/js/src/jit-test/tests/watchtower/property-modification.js b/js/src/jit-test/tests/watchtower/property-modification.js new file mode 100644 index 0000000000..993cb5bdf8 --- /dev/null +++ b/js/src/jit-test/tests/watchtower/property-modification.js @@ -0,0 +1,36 @@ +function getLogString(obj) { + let log = getWatchtowerLog(); + return log.map(item => { + assertEq(item.object, obj); + if (typeof item.extra === "symbol") { + item.extra = ""; + } + return item.kind + (item.extra ? ": " + item.extra : ""); + }).join("\n"); +} + +function testBasic() { + let o = { a: 10 }; + addWatchtowerTarget(o); + + // modify-prop: a + o.a = 12; + let p = { a: 15 }; + + // modify-prop: a + Object.assign(o, p); + + // change-prop: a + Object.defineProperty(o, "a", { value: 19 }); + let log = getLogString(o); + + assertEq(log, + `modify-prop: a +modify-prop: a +change-prop: a`); +} + +for (var i = 0; i < 20; i++) { + console.log(`Iteration ${i}`); + testBasic(); +} diff --git a/js/src/jit-test/tests/xdr/asm.js b/js/src/jit-test/tests/xdr/asm.js new file mode 100644 index 0000000000..5e28e9da00 --- /dev/null +++ b/js/src/jit-test/tests/xdr/asm.js @@ -0,0 +1,19 @@ +load(libdir + 'bytecode-cache.js'); + +var test = (function () { + function f() { + var x = function inner() { + "use asm"; + function g() {} + return g; + }; + }; + return f.toString(); +})(); + +try { + evalWithCache(test, {}); +} catch (x) { + assertEq(x.message.includes("Asm.js is not supported by XDR") || + x.message.includes("XDR encoding failure"), true); +} diff --git a/js/src/jit-test/tests/xdr/async-lazy.js b/js/src/jit-test/tests/xdr/async-lazy.js new file mode 100644 index 0000000000..8f8c5acccc --- /dev/null +++ b/js/src/jit-test/tests/xdr/async-lazy.js @@ -0,0 +1,24 @@ +async function f1(a, b) { + let x = await 10; + return x; +}; +var toStringResult = f1.toString(); + +async function f2(a, b) { + // arguments.callee gets wrapped function from unwrapped function. + return arguments.callee; +}; + +relazifyFunctions(); + +// toString gets unwrapped function from wrapped function. +assertEq(f1.toString(), toStringResult); + +var ans = 0; +f1().then(x => { ans = x; }); +drainJobQueue(); +assertEq(ans, 10); + +f2().then(x => { ans = x; }); +drainJobQueue(); +assertEq(ans, f2); diff --git a/js/src/jit-test/tests/xdr/async.js b/js/src/jit-test/tests/xdr/async.js new file mode 100644 index 0000000000..2c75c89a98 --- /dev/null +++ b/js/src/jit-test/tests/xdr/async.js @@ -0,0 +1,35 @@ +load(libdir + 'bytecode-cache.js'); + +// Prevent relazification triggered by some zeal modes. +gczeal(0); + +async function f1(a, b) { + let x = await 10; + return x; +}; +var toStringResult = f1.toString(); + +var test = ` +async function f1(a, b) { + let x = await 10; + return x; +}; +// toString gets unwrapped function from wrapped function. +assertEq(f1.toString(), \`${toStringResult}\`); + +var ans = 0; +f1().then(x => { ans = x; }); +drainJobQueue(); +assertEq(ans, 10); + +async function f2(a, b) { + // arguments.callee gets wrapped function from unwrapped function. + return arguments.callee; +}; + +f2().then(x => { ans = x; }); +drainJobQueue(); +assertEq(ans, f2); +`; + +evalWithCache(test, { assertEqBytecode: true, checkFrozen: true}); diff --git a/js/src/jit-test/tests/xdr/bigint.js b/js/src/jit-test/tests/xdr/bigint.js new file mode 100644 index 0000000000..f15d0f317a --- /dev/null +++ b/js/src/jit-test/tests/xdr/bigint.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('BigInt' in this) +load(libdir + 'bytecode-cache.js'); + +let test = ` + assertEq(2n**64n - 1n, BigInt("0xffffFFFFffffFFFF")); +`; +evalWithCache(test, { + assertEqBytecode: true, + assertEqResult : true +}); diff --git a/js/src/jit-test/tests/xdr/bug1186973.js b/js/src/jit-test/tests/xdr/bug1186973.js new file mode 100644 index 0000000000..b6949799c1 --- /dev/null +++ b/js/src/jit-test/tests/xdr/bug1186973.js @@ -0,0 +1,17 @@ +// |jit-test| error: cache does not have the same size; skip-if: isLcovEnabled() + + +load(libdir + 'bytecode-cache.js'); + +var test = (function () { + function f(x) { + function ifTrue() {}; + function ifFalse() {}; + + if (generation % 2 == 0) + return ifTrue(); + return ifFalse(); + } + return f.toString() + "; f()"; +})(); +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); diff --git a/js/src/jit-test/tests/xdr/bug1390856.js b/js/src/jit-test/tests/xdr/bug1390856.js new file mode 100644 index 0000000000..b1dbbffdfa --- /dev/null +++ b/js/src/jit-test/tests/xdr/bug1390856.js @@ -0,0 +1,9 @@ +// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0 + +// Test main thread encode/decode OOM +oomTest(function() { + let t = cacheEntry(`function f() { function g() { }; return 3; };`); + + evaluate(t, { sourceIsLazy: true, saveIncrementalBytecode: true }); + evaluate(t, { sourceIsLazy: true, readBytecode: true }); +}); diff --git a/js/src/jit-test/tests/xdr/bug1427860.js b/js/src/jit-test/tests/xdr/bug1427860.js new file mode 100644 index 0000000000..fd6d6f0411 --- /dev/null +++ b/js/src/jit-test/tests/xdr/bug1427860.js @@ -0,0 +1,12 @@ +// |jit-test| --code-coverage; skip-if: !('oomAtAllocation' in this) + +let x = cacheEntry("function inner() { return 3; }; inner()"); +evaluate(x, { saveIncrementalBytecode: true }); + +try { + // Fail XDR decode with partial script + oomAtAllocation(20); + evaluate(x, { loadBytecode: true }); +} catch { } + +getLcovInfo(); diff --git a/js/src/jit-test/tests/xdr/bug1585158.js b/js/src/jit-test/tests/xdr/bug1585158.js new file mode 100644 index 0000000000..a64d5cf7aa --- /dev/null +++ b/js/src/jit-test/tests/xdr/bug1585158.js @@ -0,0 +1,12 @@ +gczeal(4); +evalWithCache(` + var obj = { a: 1, b: 2 }; + obj.a++; + assertEq(obj.a, 2); +`); +function evalWithCache(code) { + code = cacheEntry(code); + ctx_save = Object.create({}, { saveIncrementalBytecode: { value: true } }); + var res1 = evaluate(code, ctx_save); + var res2 = evaluate(code, Object.create(ctx_save, {})); +} diff --git a/js/src/jit-test/tests/xdr/bug1607895.js b/js/src/jit-test/tests/xdr/bug1607895.js new file mode 100644 index 0000000000..74050bddbd --- /dev/null +++ b/js/src/jit-test/tests/xdr/bug1607895.js @@ -0,0 +1,7 @@ +code = cacheEntry(` + function f() { + (function () {}) + }; + f() + `); +evaluate(code, { saveIncrementalBytecode: { value: true } }); diff --git a/js/src/jit-test/tests/xdr/bug1790615.js b/js/src/jit-test/tests/xdr/bug1790615.js new file mode 100644 index 0000000000..39a914345a --- /dev/null +++ b/js/src/jit-test/tests/xdr/bug1790615.js @@ -0,0 +1,19 @@ +// |jit-test| --fuzzing-safe; --cpu-count=2; --ion-offthread-compile=off; skip-if: !isAsmJSCompilationAvailable() + +load(libdir + "asserts.js"); + +function asmCompile() { + var f = Function.apply(null, arguments); + return f; +} +var code = asmCompile('glob', 'imp', 'b', ` +"use asm"; +function f(i,j) { + i=i|0; + j=j|0; +} +return f +`); +let g80 = newGlobal({newCompartment: true}); +// Compiling to a Stencil XDR should fail because XDR encoding does not support asm.js +assertThrowsInstanceOf(() => g80.compileToStencilXDR(code, {}), g80.Error); \ No newline at end of file diff --git a/js/src/jit-test/tests/xdr/class-relazify.js b/js/src/jit-test/tests/xdr/class-relazify.js new file mode 100644 index 0000000000..290202208f --- /dev/null +++ b/js/src/jit-test/tests/xdr/class-relazify.js @@ -0,0 +1,15 @@ +var code = cacheEntry(` +function f() { + class A { + constructor() {} + } + new A(); + relazifyFunctions(); + new A(); + relazifyFunctions(); +} +f(); +`); + +evaluate(code, {saveIncrementalBytecode: { value: true } }); +evaluate(code, {loadBytecode: { value: true } }); diff --git a/js/src/jit-test/tests/xdr/classes.js b/js/src/jit-test/tests/xdr/classes.js new file mode 100644 index 0000000000..3b83e41a48 --- /dev/null +++ b/js/src/jit-test/tests/xdr/classes.js @@ -0,0 +1,36 @@ +load(libdir + 'bytecode-cache.js'); + +// Prevent relazification triggered by some zeal modes. Relazification can cause +// test failures because lazy functions are XDR'd differently. +gczeal(0); + +var test = "new class extends class { } { constructor() { super(); } }()"; +evalWithCache(test, { assertEqBytecode : true }); + +var test = "new class { method() { super.toString(); } }().method()"; +evalWithCache(test, { assertEqBytecode : true }); + +// Test class constructor in lazy function +var test = ` + function f(delazify) { + function inner1() { + class Y { + constructor() {} + } + } + + function inner2() { + class Y { + constructor() {} + field1 = ""; + } + } + + if (delazify) { + inner1(); + inner2(); + } + } + f(generation > 0); +`; +evalWithCache(test, {}); diff --git a/js/src/jit-test/tests/xdr/debug-hook.js b/js/src/jit-test/tests/xdr/debug-hook.js new file mode 100644 index 0000000000..3abb138a80 --- /dev/null +++ b/js/src/jit-test/tests/xdr/debug-hook.js @@ -0,0 +1,20 @@ +var g = newGlobal({ newCompartment: true }); +var dbg = new Debugger(g); +var count = 0; + +dbg.onNewScript = script => { + count++; +}; + +var stencil = g.compileToStencil(`"a"`); +g.evalStencil(stencil); +assertEq(count, 1); + +count = 0; +dbg.onNewScript = script => { + count++; +}; + +var stencilXDR = g.compileToStencilXDR(`"b"`); +g.evalStencilXDR(stencilXDR); +assertEq(count, 1); diff --git a/js/src/jit-test/tests/xdr/debug-lazy.js b/js/src/jit-test/tests/xdr/debug-lazy.js new file mode 100644 index 0000000000..8c0405742d --- /dev/null +++ b/js/src/jit-test/tests/xdr/debug-lazy.js @@ -0,0 +1,19 @@ +load(libdir + 'bytecode-cache.js'); + +// Ensure that if a function is encoded when non-lazy but relazifiable, then +// decoded, the resulting script is marked as being non-lazy so that when the +// debugger tries to delazify things it doesn't get all confused. We just use +// findScripts() to trigger debugger delazification; we don't really care about +// the scripts themselves. +function checkAfter(ctx) { + var dbg = new Debugger(ctx.global); + var allScripts = dbg.findScripts(); + assertEq(allScripts.length == 0, false); +} + +test = ` + function f() { return true; }; + f(); + ` +evalWithCache(test, { assertEqBytecode: true, assertEqResult: true, + checkAfter: checkAfter, newCompartment: true}); diff --git a/js/src/jit-test/tests/xdr/decode-off-thread.js b/js/src/jit-test/tests/xdr/decode-off-thread.js new file mode 100644 index 0000000000..cacef62e46 --- /dev/null +++ b/js/src/jit-test/tests/xdr/decode-off-thread.js @@ -0,0 +1,54 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +function evalWithCacheLoadOffThread(code, ctx) { + ctx = ctx || {}; + ctx = Object.create(ctx, { + fileName: { value: "evalWithCacheCode.js" }, + lineNumber: { value: 0 } + }); + code = code instanceof Object ? code : cacheEntry(code); + + // We create a new global ... + if (!("global" in ctx)) + ctx.global = newGlobal(); + + var ctx_save = Object.create(ctx, { + saveIncrementalBytecode: { value: true } + }); + + ctx.global.generation = 0; + evaluate(code, ctx_save); + + offThreadDecodeStencil(code, ctx); + ctx.global.eval(` +stencil = finishOffThreadStencil(); +evalStencil(stencil); +`); +} + +var test; + +// Decode a constant. +test = ` + 1; +`; +evalWithCacheLoadOffThread(test, {}); + +// Decode object literals. +test = ` + var obj = { a: 1, b: 2 }; + obj.a++; + assertEq(obj.a, 2); +`; +evalWithCacheLoadOffThread(test, {}); + +// Decode functions. +test = ` + function g() { + return function f() { return 1; }; + }; + assertEq(g()(), 1); +`; +evalWithCacheLoadOffThread(test, {}); + + diff --git a/js/src/jit-test/tests/xdr/delazifications-atoms.js b/js/src/jit-test/tests/xdr/delazifications-atoms.js new file mode 100644 index 0000000000..91b9603a5b --- /dev/null +++ b/js/src/jit-test/tests/xdr/delazifications-atoms.js @@ -0,0 +1,14 @@ +let s = ` +function f1() { return "Atom_f1"; } +function f2() { return "Atom_f2"; } +function f3() { return "Atom_f3"; } + +assertEq(f1(), "Atom_f1"); +assertEq(f2(), "Atom_f2"); +assertEq(f3(), "Atom_f3"); +`; + +let c = cacheEntry(s); +let g = newGlobal(); +evaluate(c, {saveIncrementalBytecode:true}); +evaluate(c, {global:g, loadBytecode:true}); diff --git a/js/src/jit-test/tests/xdr/delazifications-nest.js b/js/src/jit-test/tests/xdr/delazifications-nest.js new file mode 100644 index 0000000000..0a8fc23a58 --- /dev/null +++ b/js/src/jit-test/tests/xdr/delazifications-nest.js @@ -0,0 +1,70 @@ +load(libdir + 'bytecode-cache.js'); + +let test = ` +// Put some unused atoms in the initial stencil, to verify that atoms are +// correctly mapped while merging stencils. +if (false) { + "unused text1"; + "unused text2"; + "unused text3"; + "unused text4"; + "unused text5"; +} + +var result = 0; + +function func() { + var anonFunc = function() { + // Method/accessor as inner-inner function. + var obj = { + method(name) { + // Test object literal. + var object = { + propA: 9, + propB: 10, + propC: 11, + }; + + // Test object property access. + return object["prop" + name]; + }, + get prop1() { + return 200; + }, + set prop2(value) { + result += value; + } + }; + result += obj.prop1; + obj.prop2 = 3000; + result += obj.method("B"); + }; + + function anotherFunc() { + return 40000; + } + + function unused() { + } + + class MyClass { + constructor() { + result += 500000; + } + } + + // Functions inside arrow parameters, that are parsed multiple times. + const arrow = (a = (b = c => { result += 6000000 }) => b) => a()(); + + // Delazify in the different order as definition. + new MyClass(); + anonFunc(); + result += anotherFunc(); + arrow(); +} +func(); + +result; +`; + +evalWithCache(test, { incremental: true, oassertEqResult : true }); diff --git a/js/src/jit-test/tests/xdr/delazify-findScript-lineCount.js b/js/src/jit-test/tests/xdr/delazify-findScript-lineCount.js new file mode 100644 index 0000000000..7846f1128b --- /dev/null +++ b/js/src/jit-test/tests/xdr/delazify-findScript-lineCount.js @@ -0,0 +1,54 @@ +function testDelazify(i) { + var g = newGlobal({ newCompartment: true }); + var dbg = new Debugger(g); + + dbg.onDebuggerStatement = (frame) => { + var allScripts = dbg.findScripts(); + var j = 0; + for (let script of allScripts) { + if (i == -1 || i == j) { + // Delazify. + try { + script.lineCount; + } catch (e) { + } + } + j++; + } + }; + + var cache = cacheEntry(` +function f( + a = ( + b = ( + c = function g() { + }, + ) => { + }, + d = ( + e = ( + f = ( + ) => { + }, + ) => { + }, + ) => { + }, + ) => { + }, +) { +} +debugger; +`); + + evaluate(cache, { global: g, saveIncrementalBytecode: true }); + evaluate(cache, { global: g, loadBytecode: true }); +} + +// Delazify all. +testDelazify(-1); + +// Delazify specific function and its ancestor. +for (var i = 0; i < 30; i++) { + testDelazify(i); +} diff --git a/js/src/jit-test/tests/xdr/delazify-findScript-parameterNames.js b/js/src/jit-test/tests/xdr/delazify-findScript-parameterNames.js new file mode 100644 index 0000000000..5ee955a40b --- /dev/null +++ b/js/src/jit-test/tests/xdr/delazify-findScript-parameterNames.js @@ -0,0 +1,54 @@ +function testDelazify(i) { + var g = newGlobal({ newCompartment: true }); + var dbg = new Debugger(g); + + dbg.onDebuggerStatement = (frame) => { + var allScripts = dbg.findScripts(); + var j = 0; + for (let script of allScripts) { + if (i == -1 || i == j) { + // Delazify. + try { + script.parameterNames; + } catch (e) { + } + } + j++; + } + }; + + var cache = cacheEntry(` +function f( + a = ( + b = ( + c = function g() { + }, + ) => { + }, + d = ( + e = ( + f = ( + ) => { + }, + ) => { + }, + ) => { + }, + ) => { + }, +) { +} +debugger; +`); + + evaluate(cache, { global: g, saveIncrementalBytecode: true }); + evaluate(cache, { global: g, loadBytecode: true }); +} + +// Delazify all. +testDelazify(-1); + +// Delazify specific function and its ancestor. +for (var i = 0; i < 30; i++) { + testDelazify(i); +} diff --git a/js/src/jit-test/tests/xdr/force-full-parse.js b/js/src/jit-test/tests/xdr/force-full-parse.js new file mode 100644 index 0000000000..4012677055 --- /dev/null +++ b/js/src/jit-test/tests/xdr/force-full-parse.js @@ -0,0 +1,19 @@ +load(libdir + 'bytecode-cache.js'); + +var test = ` +function f() { + function f1() { + return 1; + } + function f2() { + return 20; + } + return f1() + f2(); +} +function g() { + return 300; +} +f() + g(); +`; +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true, + forceFullParse: true, }); diff --git a/js/src/jit-test/tests/xdr/function-flags.js b/js/src/jit-test/tests/xdr/function-flags.js new file mode 100644 index 0000000000..62c69752b7 --- /dev/null +++ b/js/src/jit-test/tests/xdr/function-flags.js @@ -0,0 +1,40 @@ +load(libdir + 'bytecode-cache.js'); + +var test; + +// Ensure that if a function is encoded we don't encode its "name +// resolved" flag. +test = ` + function f() { delete f.name; return f.hasOwnProperty('name'); } + f(); + ` +evalWithCache(test, { assertEqBytecode: true, assertEqResult: true }); + +test = ` + function f() { return f.hasOwnProperty('name'); } + f(); + ` +evalWithCache(test, { assertEqBytecode: true, assertEqResult: true }); + +// Ensure that if a function is encoded we don't encode its "length +// resolved" flag. +test = ` + function f() { delete f.length; return f.hasOwnProperty('length'); } + f(); + ` +evalWithCache(test, { assertEqBytecode: true, assertEqResult: true }); + +test = ` + function f() { return f.hasOwnProperty('length'); } + f(); + ` +evalWithCache(test, { assertEqBytecode: true, assertEqResult: true }); + +// And make sure our bytecode is actually not reflecting the flags, +// not that we ignore them on decode. +test = ` + function f() { return f.hasOwnProperty('length') || f.hasOwnProperty('name'); } + f(); + ` +evalWithCache(test, { assertEqBytecode: true, assertEqResult: true }); + diff --git a/js/src/jit-test/tests/xdr/incremental-encoder.js b/js/src/jit-test/tests/xdr/incremental-encoder.js new file mode 100644 index 0000000000..d8a97f6327 --- /dev/null +++ b/js/src/jit-test/tests/xdr/incremental-encoder.js @@ -0,0 +1,66 @@ +// |jit-test| skip-if: isLcovEnabled() + +load(libdir + 'bytecode-cache.js'); +var test = ""; + +// Check that without cloneSingleton, we can safely encode object literal which +// have mutations. +test = ` + var obj = { a: 1, b: 2 }; + obj.a++; + assertEq(obj.a, 2); +`; +evalWithCache(test, { + incremental: true, + assertEqResult : true +}); + + +// Encode lazy functions. +test = ` + function f() { return 1; }; + 1; +`; +evalWithCache(test, { + incremental: true, + assertEqResult : true +}); + + +// Encode delazified functions. +test = ` + function f() { return 1; }; + f(); +`; +evalWithCache(test, { + incremental: true, + assertEqResult : true +}); + +// Encode inner functions. +test = ` + function g() { + return function f() { return 1; }; + }; + g()(); +`; +evalWithCache(test, { + incremental: true, + assertEqResult : true +}); + +// Extra zeal GCs can cause isRelazifiableFunction() to become true after we +// record its value by throwing away JIT code for the function. +gczeal(0); + +// Relazified functions are encoded as non-lazy-script, when the encoding is +// incremental. +test = ` + assertEq(isLazyFunction(f), generation == 0 || generation == 3); + function f() { return isRelazifiableFunction(f); }; + expect = f(); + assertEq(isLazyFunction(f), false); + relazifyFunctions(f); + assertEq(isLazyFunction(f), expect); +`; +evalWithCache(test, { incremental: true }); diff --git a/js/src/jit-test/tests/xdr/incremental-oom.js b/js/src/jit-test/tests/xdr/incremental-oom.js new file mode 100644 index 0000000000..ef202d112d --- /dev/null +++ b/js/src/jit-test/tests/xdr/incremental-oom.js @@ -0,0 +1,10 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// Delazify a function while encoding bytecode. +oomTest(() => { + let code = cacheEntry(` + function f() { } + f(); + `); + evaluate(code, { saveIncrementalBytecode: true }); +}); diff --git a/js/src/jit-test/tests/xdr/lazy-class-definition.js b/js/src/jit-test/tests/xdr/lazy-class-definition.js new file mode 100644 index 0000000000..ac29c9acf0 --- /dev/null +++ b/js/src/jit-test/tests/xdr/lazy-class-definition.js @@ -0,0 +1,51 @@ +load(libdir + 'bytecode-cache.js'); + +// Bury the class definition deep in a lazy function to hit edge cases of lazy +// script handling. + +test = ` + function f1() { + function f2() { + function f3() { + class C { + constructor() { + this.x = 42; + } + } + return new C; + } + return f3(); + } + return f2(); + } + if (generation >= 2) { + assertEq(f1().x, 42); + } +`; +evalWithCache(test, {}); + +// NOTE: Fields currently force full parsing, but this test may be more +// interesting in future. +test = ` + function f1() { + function f2() { + function f3() { + class C { + y = 12; + + constructor() { + this.x = 42; + } + } + return new C; + } + return f3(); + } + return f2(); + } + if (generation >= 2) { + assertEq(f1().x, 42); + assertEq(f1().y, 12); + } +`; +evalWithCache(test, {}); diff --git a/js/src/jit-test/tests/xdr/lazy.js b/js/src/jit-test/tests/xdr/lazy.js new file mode 100644 index 0000000000..00bcf1e306 --- /dev/null +++ b/js/src/jit-test/tests/xdr/lazy.js @@ -0,0 +1,164 @@ +load(libdir + 'bytecode-cache.js'); +var test = ""; +var checkAfter; + +// code a function which has both used and unused inner functions. +test = (function () { + function f(x) { + function ifTrue() { + return true; + }; + function ifFalse() { + return false; + }; + + if (x) return ifTrue(); + else return ifFalse(); + } + + return f.toString() + "; f(true)"; +})(); +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); + +// code a function which uses different inner functions based on the generation. +test = (function () { + function f(x) { + function ifTrue() { + return true; + }; + function ifFalse() { + return false; + }; + + if (x) return ifTrue(); + else return ifFalse(); + } + + return f.toString() + "; f((generation % 2) == 0)"; +})(); +evalWithCache(test, { }); + +// Code a function which has an enclosing scope. +test = (function () { + function f() { + var upvar = ""; + function g() { upvar += ""; return upvar; } + return g; + } + + return f.toString() + "; f()();"; +})(); +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); + +// Code a lazy function which has an enclosing scope. +test = (function () { + function f() { + var upvar = ""; + function g() { upvar += ""; return upvar; } + return g; + } + + return f.toString() + "; f();"; +})(); +evalWithCache(test, { assertEqBytecode: true }); + +// (basic/bug535930) Code an enclosing scope which is a Call object. +test = (function () { + return "(" + (function () { + p = function () { + Set() + }; + var Set = function () {}; + for (var x = 0; x < 5; x++) { + Set = function (z) { + return function () { + [z] + } + } (x) + } + }).toString() + ")()"; +})(); +evalWithCache(test, { assertEqBytecode: true }); + +// Code an arrow function, and execute it. +test = (function () { + function f() { + var g = (a) => a + a; + return g; + } + + return f.toString() + "; f()(1);"; +})(); +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); + +// Code an arrow function, and do not execute it. +test = (function () { + function f() { + var g = (a) => a + a; + return g; + } + + return f.toString() + "; f();"; +})(); +evalWithCache(test, { assertEqBytecode: true }); + +// Extra zeal GCs can cause isRelazifiableFunction() to become true after we +// record its value by throwing away JIT code for the function. +gczeal(0); + +// Ensure that decoded functions can be relazified. +test = "function f() { }; f();" + + "assertEq(isLazyFunction(f), false);" + + "var expect = isRelazifiableFunction(f);"; +checkAfter = function (ctx) { + relazifyFunctions(); // relazify f, if possible. + evaluate("assertEq(isLazyFunction(f), expect);", ctx); +}; +evalWithCache(test, { + assertEqBytecode: true, // Check that we re-encode the same thing. + assertEqResult: true, // The function should remain relazifiable, if it was + // during the first run. + checkAfter: checkAfter // Check that relazifying the restored function works + // if the original was relazifiable. +}); + +// Ensure that decoded functions can be relazified, even if they have free +// variables. +test = "function f() { return isRelazifiableFunction(f) }; var expect = f();" + + "assertEq(isLazyFunction(f), false);" + + "expect"; +checkAfter = function (ctx) { + relazifyFunctions(); // relazify f, if possible. + evaluate("assertEq(isLazyFunction(f), expect);", ctx); +}; +evalWithCache(test, { + assertEqBytecode: true, // Check that we re-encode the same thing. + assertEqResult: true, // The function should remain relazifiable, if it was + // during the first run. + checkAfter: checkAfter // Check that relazifying the restored function works + // if the original was relazifiable. +}); + +// Ensure that if a function is encoded when non-lazy but relazifiable, then +// decoded, relazified, and then delazified, the result actually works. +test = ` + function f() { return true; }; + var canBeLazy = isRelazifiableFunction(f) || isLazyFunction(f); + relazifyFunctions(); + assertEq(isLazyFunction(f), canBeLazy); + f()` +evalWithCache(test, { assertEqBytecode: true, assertEqResult: true }); + +// And more of the same, in a slightly different way +var g1 = newGlobal({ cloneSingletons: true }); +var g2 = newGlobal(); +var res = "function f(){}"; +var code = cacheEntry(res + "; f();"); +evaluate(code, {global:g1, saveIncrementalBytecode: {value: true}}); +evaluate(code, {global:g2, loadBytecode: true}); +gc(); +assertEq(g2.f.toString(), res); + +// Another relazification case. +var src = "function f() { return 3; }; f(); relazifyFunctions(); 4"; +evalWithCache(src, {assertEqBytecode: true, assertEqResult: true}); diff --git a/js/src/jit-test/tests/xdr/load-nonsyntactic.js b/js/src/jit-test/tests/xdr/load-nonsyntactic.js new file mode 100644 index 0000000000..a5a2e838ce --- /dev/null +++ b/js/src/jit-test/tests/xdr/load-nonsyntactic.js @@ -0,0 +1,55 @@ +var nonSyntacticEnvironment = { field: 10 }; + +var source = ` +function f() { + function g() { + function h() { + // Load out of non syntactic environment. + return field; + } + return h(); + } + return g(); +} + +f()` + +function check(before, after) { + var code = cacheEntry(source); + var res = evaluate(code, before); + assertEq(res, 10); + res = evaluate(code, after); + assertEq(res, 10); +} + + +check({ envChainObject: nonSyntacticEnvironment, saveIncrementalBytecode: true, }, + { envChainObject: nonSyntacticEnvironment, loadBytecode: true }) + + +try { + var global = newGlobal(); + global.field = 10; + check({ envChainObject: nonSyntacticEnvironment, saveIncrementalBytecode: true, }, + { global: global, loadBytecode: true }) + + // Should have thrown + assertEq(false, true) +} catch (e) { + assertEq(/Incompatible cache contents/.test(e.message), true); +} + +try { + check({ global: global, saveIncrementalBytecode: true }, + { envChainObject: nonSyntacticEnvironment, loadBytecode: true }) + + // Should have thrown + assertEq(false, true) +} catch (e) { + assertEq(/Incompatible cache contents/.test(e.message), true); +} + + +var nonSyntacticEnvironmentTwo = { field: 10 }; +check({ envChainObject: nonSyntacticEnvironment, saveIncrementalBytecode: true, }, + { envChainObject: nonSyntacticEnvironmentTwo, loadBytecode: true }) diff --git a/js/src/jit-test/tests/xdr/module-exports.js b/js/src/jit-test/tests/xdr/module-exports.js new file mode 100644 index 0000000000..2c1bff3172 --- /dev/null +++ b/js/src/jit-test/tests/xdr/module-exports.js @@ -0,0 +1,19 @@ +const count = 10; + +let s = ""; +for (let i = 0; i < count; i++) + s += "export let e" + i + " = " + (i * i) + ";\n"; +let stencil = compileToStencilXDR(s, {module: true}); +let m = instantiateModuleStencilXDR(stencil); +let a = registerModule('a', m); + +stencil = compileToStencilXDR("import * as ns from 'a'", {module: true}); +m = instantiateModuleStencilXDR(stencil); +let b = registerModule('b', m); + +moduleLink(b); +moduleEvaluate(b); + +let ns = a.namespace; +for (let i = 0; i < count; i++) + assertEq(ns["e" + i], i * i); diff --git a/js/src/jit-test/tests/xdr/module-imports.js b/js/src/jit-test/tests/xdr/module-imports.js new file mode 100644 index 0000000000..2e77268917 --- /dev/null +++ b/js/src/jit-test/tests/xdr/module-imports.js @@ -0,0 +1,25 @@ +const count = 10; + +let stencil = compileToStencilXDR("export let a = 1;", {module: true}); +let m = instantiateModuleStencilXDR(stencil); +let a = registerModule('a', m); + +let s = ""; +for (let i = 0; i < count; i++) { + s += "import { a as i" + i + " } from 'a';\n"; + s += "assertEq(i" + i + ", 1);\n"; +} + +stencil = compileToStencilXDR(s, {module: true}); +m = instantiateModuleStencilXDR(stencil); +let b = registerModule('b', m); + +moduleLink(b); +moduleEvaluate(b); + + +stencil = compileToStencilXDR("import * as nsa from 'a'; import * as nsb from 'b';", {module: true}); +m = instantiateModuleStencilXDR(stencil); + +moduleLink(m); +moduleEvaluate(m); diff --git a/js/src/jit-test/tests/xdr/module-oom.js b/js/src/jit-test/tests/xdr/module-oom.js new file mode 100644 index 0000000000..14aef8e0af --- /dev/null +++ b/js/src/jit-test/tests/xdr/module-oom.js @@ -0,0 +1,26 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// OOM tests for xdr module parsing. + +const sa = +`export default 20; + export let a = 22; + export function f(x, y) { return x + y } +`; + +const sb = +`import x from "a"; + import { a as y } from "a"; + import * as ns from "a"; + ns.f(x, y); +`; + +oomTest(() => { + let stencil = compileToStencilXDR(sa, {module: true}); + let m = instantiateModuleStencilXDR(stencil); + let a = registerModule('a', m); + + stencil = compileToStencilXDR(sb, {module: true}); + m = instantiateModuleStencilXDR(stencil); + let b = registerModule('b', m); +}); diff --git a/js/src/jit-test/tests/xdr/module.js b/js/src/jit-test/tests/xdr/module.js new file mode 100644 index 0000000000..ef518bcf85 --- /dev/null +++ b/js/src/jit-test/tests/xdr/module.js @@ -0,0 +1,92 @@ +// |jit-test| + +load(libdir + "asserts.js"); + +async function parseAndEvaluate(source) { + let stencil = compileToStencilXDR(source, {module: true}); + let m = instantiateModuleStencilXDR(stencil); + moduleLink(m); + await moduleEvaluate(m); + return m; +} + +(async () => { + // Check the evaluation of an empty module succeeds. + await parseAndEvaluate(""); +})(); + +(async () => { + // Check that evaluation returns evaluation promise, + // and promise is always the same. + let stencil = compileToStencilXDR("1", {module: true}); + let m = instantiateModuleStencilXDR(stencil); + moduleLink(m); + assertEq(typeof moduleEvaluate(m), "object"); + assertEq(moduleEvaluate(m) instanceof Promise, true); + assertEq(moduleEvaluate(m), moduleEvaluate(m)); +})(); + +(async () => { + // Check top level variables are initialized by evaluation. + let stencil = compileToStencilXDR("export var x = 2 + 2;", {module: true}); + let m = instantiateModuleStencilXDR(stencil); + assertEq(typeof getModuleEnvironmentValue(m, "x"), "undefined"); + moduleLink(m); + await moduleEvaluate(m); + assertEq(getModuleEnvironmentValue(m, "x"), 4); +})(); + +(async () => { + let m = await parseAndEvaluate("export let x = 2 * 3;"); + assertEq(getModuleEnvironmentValue(m, "x"), 6); + + // Set up a module to import from. + let stencil = compileToStencilXDR( + `var x = 1; + export { x }; + export default 2; + export function f(x) { return x + 1; }`, + {module: true}); + let mod = instantiateModuleStencilXDR(stencil); + let a = registerModule('a', mod); + + // Check we can evaluate top level definitions. + await parseAndEvaluate("var foo = 1;"); + await parseAndEvaluate("let foo = 1;"); + await parseAndEvaluate("const foo = 1"); + await parseAndEvaluate("function foo() {}"); + await parseAndEvaluate("class foo { constructor() {} }"); + + // Check we can evaluate all module-related syntax. + await parseAndEvaluate("export var foo = 1;"); + await parseAndEvaluate("export let foo = 1;"); + await parseAndEvaluate("export const foo = 1;"); + await parseAndEvaluate("var x = 1; export { x };"); + await parseAndEvaluate("export default 1"); + await parseAndEvaluate("export default function() {};"); + await parseAndEvaluate("export default function foo() {};"); + await parseAndEvaluate("import a from 'a';"); + await parseAndEvaluate("import { x } from 'a';"); + await parseAndEvaluate("import * as ns from 'a';"); + await parseAndEvaluate("export * from 'a'"); + await parseAndEvaluate("export default class { constructor() {} };"); + await parseAndEvaluate("export default class foo { constructor() {} };"); + + // Test default import + m = await parseAndEvaluate("import a from 'a'; export { a };") + assertEq(getModuleEnvironmentValue(m, "a"), 2); + + // Test named import + m = await parseAndEvaluate("import { x as y } from 'a'; export { y };") + assertEq(getModuleEnvironmentValue(m, "y"), 1); + + // Call exported function + m = await parseAndEvaluate("import { f } from 'a'; export let x = f(3);") + assertEq(getModuleEnvironmentValue(m, "x"), 4); + + // Import access in functions + m = await parseAndEvaluate("import { x } from 'a'; function f() { return x; }") + let f = getModuleEnvironmentValue(m, "f"); + assertEq(f(), 1); +})(); +drainJobQueue(); diff --git a/js/src/jit-test/tests/xdr/off-thread-inner-fcn.js b/js/src/jit-test/tests/xdr/off-thread-inner-fcn.js new file mode 100644 index 0000000000..4112428092 --- /dev/null +++ b/js/src/jit-test/tests/xdr/off-thread-inner-fcn.js @@ -0,0 +1,11 @@ +// |jit-test| skip-if: helperThreadCount() === 0 + +offThreadCompileToStencil(`function outer() { + // enough inner functions to make JS::Vector realloc + let inner1 = () => {}; + let inner2 = () => {}; + let inner3 = () => {}; + let inner4 = () => {}; + let inner5 = () => {}; +} `); +const stencil = finishOffThreadStencil(); diff --git a/js/src/jit-test/tests/xdr/option-mismatch.js b/js/src/jit-test/tests/xdr/option-mismatch.js new file mode 100644 index 0000000000..b6b27fffe5 --- /dev/null +++ b/js/src/jit-test/tests/xdr/option-mismatch.js @@ -0,0 +1,23 @@ +var source = ` +function f() { + function g() { + return 10; + } + return g(); +} + +f()` + +var code = cacheEntry(source); + + +var res = evaluate(code, { saveIncrementalBytecode: true, }) +assertEq(res, 10) + +try { + // We should throw here because we have incompatible options! + res = evaluate(code, { loadBytecode: true, sourceIsLazy: true }) + assertEq(true, false); +} catch (e) { + assertEq(/Incompatible cache contents/.test(e.message), true); +} \ No newline at end of file diff --git a/js/src/jit-test/tests/xdr/private-fields.js b/js/src/jit-test/tests/xdr/private-fields.js new file mode 100644 index 0000000000..52b7bdd5aa --- /dev/null +++ b/js/src/jit-test/tests/xdr/private-fields.js @@ -0,0 +1,9 @@ +load(libdir + 'bytecode-cache.js'); + +function test() { + class A { + #x; + } +}; + +evalWithCache(test.toString(), { assertEqBytecode: true, assertEqResult: true }); diff --git a/js/src/jit-test/tests/xdr/relazify.js b/js/src/jit-test/tests/xdr/relazify.js new file mode 100644 index 0000000000..f867071d88 --- /dev/null +++ b/js/src/jit-test/tests/xdr/relazify.js @@ -0,0 +1,31 @@ +// |jit-test| skip-if: isLcovEnabled() + +load(libdir + 'bytecode-cache.js'); +var test = ""; +gczeal(0); + +// Check that a GC can relazify decoded functions. +// +// Generations 0 and 3 are executed from the source, thus f is not executed yet. +// Generations 1 and 2 are decoded, thus we recorded the delazified f function. +test = ` + function f() { return 1; }; + assertEq(isLazyFunction(f), generation == 0 || generation == 3); + f(); + expect = isRelazifiableFunction(f); + assertEq(isLazyFunction(f), false); +`; +evalWithCache(test, { + checkAfter: function (ctx) { + relazifyFunctions(); // relazify f, if possible. + evaluate("assertEq(isLazyFunction(f), expect);", ctx); + } +}); + +evalWithCache(test, { + incremental: true, + checkAfter: function (ctx) { + relazifyFunctions(); // relazify f, if possible. + evaluate("assertEq(isLazyFunction(f), expect);", ctx); + } +}); diff --git a/js/src/jit-test/tests/xdr/runonce.js b/js/src/jit-test/tests/xdr/runonce.js new file mode 100644 index 0000000000..b9e154ba0b --- /dev/null +++ b/js/src/jit-test/tests/xdr/runonce.js @@ -0,0 +1,6 @@ +load(libdir + "asserts.js") + +// Incremental XDR doesn't have run-once script restrictions. +evaluate(cacheEntry(""), { saveIncrementalBytecode: true }); +evaluate(cacheEntry(""), { saveIncrementalBytecode: true, isRunOnce: false }); +evaluate(cacheEntry(""), { saveIncrementalBytecode: true, isRunOnce: true }); diff --git a/js/src/jit-test/tests/xdr/scope.js b/js/src/jit-test/tests/xdr/scope.js new file mode 100644 index 0000000000..02a135509a --- /dev/null +++ b/js/src/jit-test/tests/xdr/scope.js @@ -0,0 +1,19 @@ +load(libdir + 'bytecode-cache.js'); +var test = ""; + +// code a function which has both used and unused inner functions. +test = (function () { + function f() { + var x = 3; + (function() { + with(obj) { + (function() { + assertEq(x, 2); + })(); + } + })(); + }; + + return "var obj = { x : 2 };" + f.toString() + "; f()"; +})(); +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); diff --git a/js/src/jit-test/tests/xdr/script-source-fields.js b/js/src/jit-test/tests/xdr/script-source-fields.js new file mode 100644 index 0000000000..68d4f3d2a6 --- /dev/null +++ b/js/src/jit-test/tests/xdr/script-source-fields.js @@ -0,0 +1,23 @@ +const code = ` +debugger; +`; +let g = newGlobal({newCompartment: true}); +let dbg = new Debugger(g); +const bytes = g.compileToStencilXDR(code, { + fileName: "test-filename.js", + lineNumber: 12, + forceFullParse: true, + displayURL: "display-url.js", + sourceMapURL: "source-map-url.js", +}); +let hit = false; +dbg.onDebuggerStatement = frame => { + hit = true; + const source = frame.script.source; + assertEq(source.url, "test-filename.js"); + assertEq(source.displayURL, "display-url.js"); + assertEq(source.sourceMapURL, "source-map-url.js"); + assertEq(source.startLine, 12); +}; +g.evalStencilXDR(bytes, {}); +assertEq(hit, true); diff --git a/js/src/jit-test/tests/xdr/share-bytecode.js b/js/src/jit-test/tests/xdr/share-bytecode.js new file mode 100644 index 0000000000..d139c94cfa --- /dev/null +++ b/js/src/jit-test/tests/xdr/share-bytecode.js @@ -0,0 +1,12 @@ + +let entry = cacheEntry(` + function f() { } + f() // Delazify + f // Return function object +`); + +let f1 = evaluate(entry, {saveIncrementalBytecode: true}); +let f2 = evaluate(entry, {loadBytecode: true}); + +// Reading from XDR should still deduplicate to same bytecode +assertEq(hasSameBytecodeData(f1, f2), true) diff --git a/js/src/jit-test/tests/xdr/stencil-arg.js b/js/src/jit-test/tests/xdr/stencil-arg.js new file mode 100644 index 0000000000..94ec8f3edc --- /dev/null +++ b/js/src/jit-test/tests/xdr/stencil-arg.js @@ -0,0 +1,25 @@ +const tests = [ + () => evalStencil(1), + () => evalStencil({}), + () => evalStencil([]), + () => evalStencilXDR(1), + () => evalStencilXDR({}), + () => evalStencilXDR([]), + () => instantiateModuleStencil(1), + () => instantiateModuleStencil({}), + () => instantiateModuleStencil([]), + () => instantiateModuleStencilXDR(1), + () => instantiateModuleStencilXDR({}), + () => instantiateModuleStencilXDR([]), +]; + +for (const test of tests) { + let caught = false; + try { + test(); + } catch (e) { + assertEq(/Stencil( XDR)? object expected/.test(e.message), true); + caught = true; + } + assertEq(caught, true); +} diff --git a/js/src/jit-test/tests/xdr/stencil-can-lazily-parse-mismatch.js b/js/src/jit-test/tests/xdr/stencil-can-lazily-parse-mismatch.js new file mode 100644 index 0000000000..351dbc9648 --- /dev/null +++ b/js/src/jit-test/tests/xdr/stencil-can-lazily-parse-mismatch.js @@ -0,0 +1,71 @@ +// |jit-test| skip-if: isLcovEnabled() +// Code coverage forces full-parse. + +load(libdir + 'asserts.js'); + +const code = `var a = 10;`; + +function testCompile(sourceIsLazy1, sourceIsLazy2, + forceFullParse1, forceFullParse2) { + const stencil = compileToStencil(code, { sourceIsLazy: sourceIsLazy1, + forceFullParse: forceFullParse1 }); + // The laziness options are ignored for instantiation, and no error is thrown. + evalStencil(stencil, { sourceIsLazy: sourceIsLazy2, + forceFullParse: forceFullParse2 }); +} + +function testOffThreadCompile(sourceIsLazy1, sourceIsLazy2, + forceFullParse1, forceFullParse2) { + offThreadCompileToStencil(code, { sourceIsLazy: sourceIsLazy1, + forceFullParse: forceFullParse1 }); + const stencil = finishOffThreadStencil(); + // The laziness options are ignored for instantiation, and no error is thrown. + evalStencil(stencil, { sourceIsLazy: sourceIsLazy2, + forceFullParse: forceFullParse2 }); +} + +function testXDR(sourceIsLazy1, sourceIsLazy2, + forceFullParse1, forceFullParse2) { + const xdr = compileToStencilXDR(code, { sourceIsLazy: sourceIsLazy1, + forceFullParse: forceFullParse1 }); + // The compile options are ignored when decoding, and no error is thrown. + evalStencilXDR(xdr, { sourceIsLazy: sourceIsLazy2, + forceFullParse: forceFullParse2 }); +} + +function testOffThreadXDR(sourceIsLazy1, sourceIsLazy2, + forceFullParse1, forceFullParse2) { + const t = cacheEntry(code); + evaluate(t, { sourceIsLazy: sourceIsLazy1, + forceFullParse: forceFullParse1, + saveIncrementalBytecode: true }); + + // The compile options are ignored when decoding, and no error is thrown. + offThreadDecodeStencil(t, { sourceIsLazy: sourceIsLazy2, + forceFullParse: forceFullParse2 }); + const stencil = finishOffThreadStencil(); + + // The laziness options are ignored for instantiation, and no error is thrown. + evalStencil(stencil, { sourceIsLazy: sourceIsLazy2, + forceFullParse: forceFullParse2 }); +} + +const optionsList = [ + [true, false, false, false], + [false, true, false, false], + [false, false, true, false], + [false, false, false, true], + [true, false, true, false], + [false, true, false, true], +]; + +for (const options of optionsList) { + testCompile(...options); + if (helperThreadCount() > 0) { + testOffThreadCompile(...options); + } + testXDR(...options); + if (helperThreadCount() > 0) { + testOffThreadXDR(...options); + } +} diff --git a/js/src/jit-test/tests/xdr/stencil-oom.js b/js/src/jit-test/tests/xdr/stencil-oom.js new file mode 100644 index 0000000000..f57e8f82f8 --- /dev/null +++ b/js/src/jit-test/tests/xdr/stencil-oom.js @@ -0,0 +1,12 @@ +// |jit-test| skip-if: !('oomTest' in this) + +const sa = ` +function f(x, y) { return x + y } +let a = 10, b = 20; +f(a, b); +`; + +oomTest(() => { + let stencil = compileToStencilXDR(sa); + evalStencilXDR(stencil); +}); diff --git a/js/src/jit-test/tests/xdr/stencil.js b/js/src/jit-test/tests/xdr/stencil.js new file mode 100644 index 0000000000..f7ac1c4012 --- /dev/null +++ b/js/src/jit-test/tests/xdr/stencil.js @@ -0,0 +1,99 @@ + +load(libdir + "asserts.js"); + +/* + * This exercises stencil XDR encoding and decoding using a broad + * smoke testing. + * + * A set of scripts exercising various codepaths are XDR-encoded, + * then decoded, and then executed. Their output is compared to + * the execution of the scripts through a normal path and the + * outputs checked. + */ + +/* + * Exercises global scope access and object literals, as well as some + * simple object destructuring. + */ +const testGlobal0 = 13; +let testGlobal1 = undefined; +var testGlobal2 = undefined; + +const SCRIPT_0 = ` +testGlobal1 = 123456789012345678901234567890n; +testGlobal2 = {'foo':3, 'bar': [1, 2, 3], + '4': 'zing'}; +var testGlobal3 = /NewlyDefinedGlobal/; +function testGlobal4(a, {b}) { + return a + b.foo + b['bar'].reduce((a,b) => (a+b), 0); + + b[4].length + + + testGlobal3.toString().length; +}; +testGlobal4(Number(testGlobal1), {b:testGlobal2}) +`; + +/* + * Exercises function scopes, lexical scopes, var and let + * within them, and some longer identifiers, and array destructuring in + * arguments. Also contains some tiny atoms and globls access. + */ +const SCRIPT_1 = ` +function foo(a, b, c) { + var q = a * (b + c); + let bix = function (d, e) { + let x = a + d; + var y = e * b; + const a0 = q + x + y; + for (let i = 0; i < 3; i++) { + y = a0 + Math.PI + y; + } + return y; + }; + function bang(d, [e, f]) { + let reallyLongIdentifierName = a + d; + var y = e * b; + const z = reallyLongIdentifierName + f; + return z; + } + return bix(1, 2) + bang(3, [4, 5, 6]); +} +foo(1, 2, 3) +`; + +/* + * Exercises eval and with scopes, object destructuring, function rest + * arguments. + */ +const SCRIPT_2 = ` +function foo(with_obj, ...xs) { + const [x0, x1, ...xrest] = xs; + eval('var x2 = x0 + x1'); + var sum = []; + with (with_obj) { + sum.push(x2 + xrest.length); + } + sum.push(x2 + xrest.length); + return sum; +} +foo({x2: 99}, 1, 2, 3, 4, 5, 6) +`; + +function test_script(script_str) { + const eval_f = eval; + const options = { + fileName: "compileToStencilXDR-DATA.js", + lineNumber: 1, + forceFullParse: true, + }; + const bytes = compileToStencilXDR(script_str, options); + const result = evalStencilXDR(bytes, options); + assertDeepEq(result, eval_f(script_str)); +} + +function tests() { + test_script(SCRIPT_0); + test_script(SCRIPT_1); + test_script(SCRIPT_2); +} + +tests() diff --git a/js/src/jit-test/tests/xdr/tagged-template-literals-2.js b/js/src/jit-test/tests/xdr/tagged-template-literals-2.js new file mode 100644 index 0000000000..901d20017c --- /dev/null +++ b/js/src/jit-test/tests/xdr/tagged-template-literals-2.js @@ -0,0 +1,4 @@ +var code = cacheEntry("(x => JSON.stringify(x))`bar`;"); +var g = newGlobal({ cloneSingletons: true }); +assertEq("[\"bar\"]", evaluate(code, { global: g, saveIncrementalBytecode: true })); +assertEq("[\"bar\"]", evaluate(code, { global: g, saveIncrementalBytecode: true })); diff --git a/js/src/jit-test/tests/xdr/tagged-template-literals.js b/js/src/jit-test/tests/xdr/tagged-template-literals.js new file mode 100644 index 0000000000..b37f3bbbf3 --- /dev/null +++ b/js/src/jit-test/tests/xdr/tagged-template-literals.js @@ -0,0 +1,4 @@ +var code = cacheEntry("assertEq('bar', String.raw`bar`);"); +var g = newGlobal({ cloneSingletons: true }); +evaluate(code, { global: g, saveIncrementalBytecode: true }); +evaluate(code, { global: g, loadBytecode: true }) diff --git a/js/src/jit-test/tests/xdr/trivial.js b/js/src/jit-test/tests/xdr/trivial.js new file mode 100644 index 0000000000..52ec42f397 --- /dev/null +++ b/js/src/jit-test/tests/xdr/trivial.js @@ -0,0 +1,46 @@ +load(libdir + 'bytecode-cache.js'); +var test = ""; + +// code a constant. +test = "1;"; +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); + +// code a string constant. +test = "'string';"; +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); + +// code a global variable access. +test = "generation;"; +evalWithCache(test, { assertEqBytecode: true }); + +// code an object constant. +test = "var obj = { a: 1, b: 2 };"; +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); + +// code object literal with mutations. +test = "var obj = { a: 1, b: 2 }; obj.a++; assertEq(obj.a, 2);"; +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); + +// code object literals with mutations. +test = "var obj = { a: 1, b: { c: 3, d: 4 } }; obj.b.c++; assertEq(obj.b.c, 4);"; +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); + +// code a function which is used. +test = "function f() { return 1; }; f();"; +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); + +// code a function which is not used. +test = "function f() { return 1; }; 1;"; +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); + +// code a function which has an object literal. +test = "function f() { return { x: 2 }; }; f();"; +evalWithCache(test, { assertEqBytecode: true }); + +// code call site object +test = "function f(a) { return a; }; f`a${4}b`;"; +evalWithCache(test, { assertEqBytecode: true, checkFrozen: true}); + +// code RegExp constants. +test = "'fooooooo'.match(/(f.+)/)[1].replace(/o/g, 'O')"; +evalWithCache(test, { assertEqBytecode: true, assertEqResult : true }); -- cgit v1.2.3